diff --git a/CondFormats/SiStripObjects/interface/SiStripConfObject.h b/CondFormats/SiStripObjects/interface/SiStripConfObject.h index 89e5cb02c8957..8e291ca7ae3a2 100644 --- a/CondFormats/SiStripObjects/interface/SiStripConfObject.h +++ b/CondFormats/SiStripObjects/interface/SiStripConfObject.h @@ -61,7 +61,7 @@ class SiStripConfObject template valueType get( const std::string & name ) const { - valueType returnValue; + valueType returnValue = 0; parMap::const_iterator it = parameters.find(name); std::stringstream ss; if( it != parameters.end() ) { @@ -74,7 +74,6 @@ class SiStripConfObject return returnValue; } - bool isParameter( const std::string & name ) const { return( parameters.find(name) != parameters.end() ); @@ -90,6 +89,8 @@ class SiStripConfObject parMap parameters; }; +template <> +std::string SiStripConfObject::get( const std::string & name ) const; template <> bool SiStripConfObject::put >( const std::string & name, const std::vector & inputValue ); template <> diff --git a/CondFormats/SiStripObjects/src/SiStripConfObject.cc b/CondFormats/SiStripObjects/src/SiStripConfObject.cc index f4d39c1dccd13..fa2fd8f4a99d6 100644 --- a/CondFormats/SiStripObjects/src/SiStripConfObject.cc +++ b/CondFormats/SiStripObjects/src/SiStripConfObject.cc @@ -1,4 +1,21 @@ #include "CondFormats/SiStripObjects/interface/SiStripConfObject.h" +#include + +template <> +std::string SiStripConfObject::get( const std::string & name ) const +{ + std::string returnValue; + parMap::const_iterator it = parameters.find(name); + std::stringstream ss; + if( it != parameters.end() ) { + ss << it->second; + ss >> returnValue; + } + else { + std::cout << "WARNING: parameter " << name << " not found. Returning default value" << std::endl; + } + return returnValue; +} template <> bool SiStripConfObject::put >( const std::string & name, const std::vector & inputValue ) diff --git a/RecoEgamma/EgammaHFProducers/plugins/HLTHFRecoEcalCandidateProducer.cc b/RecoEgamma/EgammaHFProducers/plugins/HLTHFRecoEcalCandidateProducer.cc index 834967a621e06..52f814c134fcc 100644 --- a/RecoEgamma/EgammaHFProducers/plugins/HLTHFRecoEcalCandidateProducer.cc +++ b/RecoEgamma/EgammaHFProducers/plugins/HLTHFRecoEcalCandidateProducer.cc @@ -31,7 +31,7 @@ HLTHFRecoEcalCandidateProducer::HLTHFRecoEcalCandidateProducer(edm::ParameterSet const& conf): hfclusters_(conf.getParameter("hfclusters")), HFDBversion_(conf.existsAs("HFDBversion") ? conf.getParameter("HFDBversion"):99),//do nothing - HFDBvector_(conf.existsAs("HFDBvector") ? conf.getParameter >("HFDBvector"):defaultDB_), + HFDBvector_(conf.existsAs("HFDBvector") ? conf.getParameter >("HFDBvector"):std::vector{}), Cut2D_(conf.getParameter("intercept2DCut")), defaultSlope2D_((Cut2D_<=0.83)?(0.475):((Cut2D_>0.83 && Cut2D_<=0.9)?(0.275):(0.2))),//fix for hlt unable to add slope variable now hfvars_(HFDBversion_,HFDBvector_), diff --git a/RecoEgamma/EgammaHFProducers/plugins/HLTHFRecoEcalCandidateProducer.h b/RecoEgamma/EgammaHFProducers/plugins/HLTHFRecoEcalCandidateProducer.h index b8e354f0b86f8..df9d3ec6b3fdb 100644 --- a/RecoEgamma/EgammaHFProducers/plugins/HLTHFRecoEcalCandidateProducer.h +++ b/RecoEgamma/EgammaHFProducers/plugins/HLTHFRecoEcalCandidateProducer.h @@ -30,7 +30,6 @@ class HLTHFRecoEcalCandidateProducer : public edm::EDProducer { int HFDBversion_; std::vector HFDBvector_; bool doPU_; - std::vector defaultDB_; double Cut2D_; double defaultSlope2D_; reco::HFValueStruct hfvars_; diff --git a/RecoEgamma/EgammaPhotonAlgos/src/InOutConversionSeedFinder.cc b/RecoEgamma/EgammaPhotonAlgos/src/InOutConversionSeedFinder.cc index da7f0f42014fb..3529138ae3d12 100644 --- a/RecoEgamma/EgammaPhotonAlgos/src/InOutConversionSeedFinder.cc +++ b/RecoEgamma/EgammaPhotonAlgos/src/InOutConversionSeedFinder.cc @@ -320,7 +320,7 @@ void InOutConversionSeedFinder::startSeed( const FreeTrajectoryState * fts, cons std::vector bcVec; //std::cout << "InOutConversionSeedFinder::startSeed charge assumed for the in-out track " << track2Charge_ << "\n"; - Geom::Phi theConvPhi( stateAtPreviousLayer.globalPosition().phi()); + // Geom::Phi theConvPhi( stateAtPreviousLayer.globalPosition().phi()); //std::cout << "InOutConversionSeedFinder::startSeed stateAtPreviousLayer phi " << stateAtPreviousLayer.globalPosition().phi() << " R " << stateAtPreviousLayer.globalPosition().perp() << " Z " << stateAtPreviousLayer.globalPosition().z() << "\n"; bcVec = getSecondCaloClusters(stateAtPreviousLayer.globalPosition(),track2Charge_); diff --git a/RecoEgamma/EgammaPhotonAlgos/src/PhotonEnergyCorrector.cc b/RecoEgamma/EgammaPhotonAlgos/src/PhotonEnergyCorrector.cc index 39dc257bfc49e..10ece1ff41b12 100644 --- a/RecoEgamma/EgammaPhotonAlgos/src/PhotonEnergyCorrector.cc +++ b/RecoEgamma/EgammaPhotonAlgos/src/PhotonEnergyCorrector.cc @@ -59,7 +59,7 @@ PhotonEnergyCorrector::PhotonEnergyCorrector( const edm::ParameterSet& config, e weightsfromDB_= config.getParameter("regressionWeightsFromDB"); w_file_ = config.getParameter("energyRegressionWeightsFileLocation"); if (weightsfromDB_) w_db_ = config.getParameter("energyRegressionWeightsDBLocation"); - else w_db_ == "none" ; + else w_db_ = "none" ; regressionCorrector_ = new EGEnergyCorrector(); diff --git a/RecoJets/JetProducers/plugins/CompoundJetProducer.cc b/RecoJets/JetProducers/plugins/CompoundJetProducer.cc index 042705039febe..e9e2fdf5fc208 100644 --- a/RecoJets/JetProducers/plugins/CompoundJetProducer.cc +++ b/RecoJets/JetProducers/plugins/CompoundJetProducer.cc @@ -9,12 +9,6 @@ using namespace reco; using namespace edm; using namespace cms; -namespace { - const bool debug = false; - -} - - CompoundJetProducer::CompoundJetProducer(edm::ParameterSet const& conf): VirtualJetProducer( conf ) { diff --git a/RecoJets/JetProducers/plugins/SubEventGenJetProducer.cc b/RecoJets/JetProducers/plugins/SubEventGenJetProducer.cc index a4186f2087c66..684eb8a3dc46c 100644 --- a/RecoJets/JetProducers/plugins/SubEventGenJetProducer.cc +++ b/RecoJets/JetProducers/plugins/SubEventGenJetProducer.cc @@ -11,11 +11,6 @@ using namespace reco; using namespace edm; using namespace cms; -namespace { - const bool debug = false; - -} - namespace { bool checkHydro(const reco::GenParticle * p){ const Candidate* m1 = p->mother(); diff --git a/RecoLocalCalo/Castor/src/CastorClusterProducer.cc b/RecoLocalCalo/Castor/src/CastorClusterProducer.cc index 3353e49dadcf6..0024193d78fcb 100644 --- a/RecoLocalCalo/Castor/src/CastorClusterProducer.cc +++ b/RecoLocalCalo/Castor/src/CastorClusterProducer.cc @@ -75,7 +75,6 @@ class CastorClusterProducer : public edm::EDProducer { // constants, enums and typedefs // -const double MYR2D = 180/M_PI; // // static data member definitions diff --git a/RecoLocalCalo/Castor/src/CastorTowerProducer.cc b/RecoLocalCalo/Castor/src/CastorTowerProducer.cc index 31d076c993cf2..2da27f6cc73b6 100644 --- a/RecoLocalCalo/Castor/src/CastorTowerProducer.cc +++ b/RecoLocalCalo/Castor/src/CastorTowerProducer.cc @@ -74,7 +74,6 @@ class CastorTowerProducer : public edm::stream::EDProducer<> { // constants, enums and typedefs // -const double MYR2D = 180/M_PI; // // static data member definitions diff --git a/RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecAnalFitAlgo.h b/RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecAnalFitAlgo.h index 38c5050ebb1cd..2a3f86b3d3cad 100644 --- a/RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecAnalFitAlgo.h +++ b/RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecAnalFitAlgo.h @@ -37,7 +37,6 @@ template class EcalUncalibRecHitRecAnalFitAlgo : public EcalUncalibRecH }; double pedestalFunction(double* var, double* par) { - double x = var[0]; double ped = par[0]; return ped; }; diff --git a/RecoLocalCalo/HcalRecAlgos/src/ZdcSimpleRecAlgo.cc b/RecoLocalCalo/HcalRecAlgos/src/ZdcSimpleRecAlgo.cc index cb62ac9ee027c..5d45549fd8287 100644 --- a/RecoLocalCalo/HcalRecAlgos/src/ZdcSimpleRecAlgo.cc +++ b/RecoLocalCalo/HcalRecAlgos/src/ZdcSimpleRecAlgo.cc @@ -243,131 +243,3 @@ ZDCRecHit ZdcSimpleRecAlgo::reconstruct(const ZDCDataFrame& digi, const std::vec throw cms::Exception("ZDCSimpleRecoAlgos::exiting process"); } - -static const float wpksamp0_zdc = 0.500053; -static const float scale_zdc = 0.999683; -static const int num_bins_zdc = 100; - -static const float actual_ns_zdc[num_bins_zdc] = { - 0.00250, // 0.000-0.010 - 0.08000, // 0.010-0.020 - 0.16000, // 0.020-0.030 - 0.23750, // 0.030-0.040 - 0.31750, // 0.040-0.050 - 0.39500, // 0.050-0.060 - 0.47500, // 0.060-0.070 - 0.55500, // 0.070-0.080 - 0.63000, // 0.080-0.090 - 0.70000, // 0.090-0.100 - 0.77000, // 0.100-0.110 - 0.84000, // 0.110-0.120 - 0.91000, // 0.120-0.130 - 0.98000, // 0.130-0.140 - 1.05000, // 0.140-0.150 - 1.12000, // 0.150-0.160 - 1.19000, // 0.160-0.170 - 1.26000, // 0.170-0.180 - 1.33000, // 0.180-0.190 - 1.40000, // 0.190-0.200 - 1.47000, // 0.200-0.210 - 1.54000, // 0.210-0.220 - 1.61000, // 0.220-0.230 - 1.68000, // 0.230-0.240 - 1.75000, // 0.240-0.250 - 1.82000, // 0.250-0.260 - 1.89000, // 0.260-0.270 - 1.96000, // 0.270-0.280 - 2.03000, // 0.280-0.290 - 2.10000, // 0.290-0.300 - 2.17000, // 0.300-0.310 - 2.24000, // 0.310-0.320 - 2.31000, // 0.320-0.330 - 2.38000, // 0.330-0.340 - 2.45000, // 0.340-0.350 - 2.52000, // 0.350-0.360 - 2.59000, // 0.360-0.370 - 2.68500, // 0.370-0.380 - 2.79250, // 0.380-0.390 - 2.90250, // 0.390-0.400 - 3.01000, // 0.400-0.410 - 3.11750, // 0.410-0.420 - 3.22500, // 0.420-0.430 - 3.33500, // 0.430-0.440 - 3.44250, // 0.440-0.450 - 3.55000, // 0.450-0.460 - 3.73250, // 0.460-0.470 - 4.02000, // 0.470-0.480 - 4.30750, // 0.480-0.490 - 4.59500, // 0.490-0.500 - 6.97500, // 0.500-0.510 -10.98750, // 0.510-0.520 -13.03750, // 0.520-0.530 -14.39250, // 0.530-0.540 -15.39500, // 0.540-0.550 -16.18250, // 0.550-0.560 -16.85250, // 0.560-0.570 -17.42750, // 0.570-0.580 -17.91500, // 0.580-0.590 -18.36250, // 0.590-0.600 -18.76500, // 0.600-0.610 -19.11250, // 0.610-0.620 -19.46000, // 0.620-0.630 -19.76500, // 0.630-0.640 -20.03500, // 0.640-0.650 -20.30250, // 0.650-0.660 -20.57250, // 0.660-0.670 -20.79250, // 0.670-0.680 -21.00250, // 0.680-0.690 -21.21000, // 0.690-0.700 -21.42000, // 0.700-0.710 -21.62750, // 0.710-0.720 -21.79000, // 0.720-0.730 -21.95250, // 0.730-0.740 -22.11500, // 0.740-0.750 -22.27750, // 0.750-0.760 -22.44000, // 0.760-0.770 -22.60500, // 0.770-0.780 -22.73250, // 0.780-0.790 -22.86000, // 0.790-0.800 -22.98500, // 0.800-0.810 -23.11250, // 0.810-0.820 -23.23750, // 0.820-0.830 -23.36500, // 0.830-0.840 -23.49000, // 0.840-0.850 -23.61750, // 0.850-0.860 -23.71500, // 0.860-0.870 -23.81250, // 0.870-0.880 -23.91250, // 0.880-0.890 -24.01000, // 0.890-0.900 -24.10750, // 0.900-0.910 -24.20750, // 0.910-0.920 -24.30500, // 0.920-0.930 -24.40500, // 0.930-0.940 -24.50250, // 0.940-0.950 -24.60000, // 0.950-0.960 -24.68250, // 0.960-0.970 -24.76250, // 0.970-0.980 -24.84000, // 0.980-0.990 -24.92000 // 0.990-1.000 -}; - -/* -float timeshift_ns_zdc(float wpksamp) { - float flx = (num_bins_zdc*(wpksamp - wpksamp0_zdc)/scale_zdc); - int index = (int)flx; - float yval; - - if (index < 0) return actual_ns_zdc[0]; - else if (index >= num_bins_zdc-1) return actual_ns_zdc[num_bins_zdc-1]; - - // else interpolate: - float y1 = actual_ns_zdc[index]; - float y2 = actual_ns_zdc[index+1]; - - // float delta_x = 1/(float)num_bins_zdc; - // yval = y1 + (y2-y1)*(flx-(float)index)/delta_x; - - yval = y1 + (y2-y1)*(flx-(float)index); - return yval; -} -*/ diff --git a/RecoLocalMuon/CSCEfficiency/src/CSCEfficiency.cc b/RecoLocalMuon/CSCEfficiency/src/CSCEfficiency.cc index c6f178dd73d0a..36e52f83a8a4b 100644 --- a/RecoLocalMuon/CSCEfficiency/src/CSCEfficiency.cc +++ b/RecoLocalMuon/CSCEfficiency/src/CSCEfficiency.cc @@ -940,7 +940,6 @@ void CSCEfficiency::fillRechitsSegments_info(edm::Handle for(size_t jRH = 0; jRHlocalPosition().x() - allRechits[idRH.endcap()-1][idRH.station()-1][idRH.ring()-1][idRH.chamber()-FirstCh][idRH.layer()-1][jRH].first.x(); float yDiff = iRH->localPosition().y() - diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc index 125c1d259bb7c..a530c2ed5fe5d 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc @@ -31,9 +31,6 @@ using namespace std; //#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc namespace { - constexpr float degsPerRad = 57.29578; - constexpr float HALF_PI = 1.57079632679489656; - constexpr float PI = 2*HALF_PI; #ifndef NEW_CPEERROR //const bool useNewSimplerErrors = true; const bool useNewSimplerErrors = false; // must be tha same as in generic diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc index 40b03daf1e38a..dd967e5d6db27 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc @@ -21,8 +21,6 @@ using namespace std; //#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc namespace { - constexpr float HALF_PI = 1.57079632679489656; - constexpr float PI = 2*HALF_PI; constexpr float micronsToCm = 1.0e-4; #ifndef NEW_CPEERROR //const bool useNewSimplerErrors = true; // must be the same as in base diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPETemplateReco.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPETemplateReco.cc index 93cb46398f5c6..031cf94d689cc 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPETemplateReco.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPETemplateReco.cc @@ -30,9 +30,6 @@ using namespace SiPixelTemplateReco; using namespace std; namespace { - constexpr float PI = 3.141593; - constexpr float HALFPI = PI * 0.5; - constexpr float degsPerRad = 57.29578; constexpr float micronsToCm = 1.0e-4; constexpr int cluster_matrix_size_x = 13; constexpr int cluster_matrix_size_y = 21; diff --git a/RecoLocalTracker/SiStripRecHitConverter/interface/StripCPEfromTrackAngle.h b/RecoLocalTracker/SiStripRecHitConverter/interface/StripCPEfromTrackAngle.h index 131a7cea08983..c571a4bf9b3a0 100644 --- a/RecoLocalTracker/SiStripRecHitConverter/interface/StripCPEfromTrackAngle.h +++ b/RecoLocalTracker/SiStripRecHitConverter/interface/StripCPEfromTrackAngle.h @@ -7,7 +7,8 @@ class StripCPEfromTrackAngle : public StripCPE { public: - StripClusterParameterEstimator::LocalValues + using StripCPE::localParameters; + StripClusterParameterEstimator::LocalValues localParameters( const SiStripCluster&, const GeomDetUnit&, const LocalTrajectoryParameters&) const; StripCPEfromTrackAngle( edm::ParameterSet & conf, diff --git a/RecoMuon/L3MuonProducer/src/L3TkMuonProducer.cc b/RecoMuon/L3MuonProducer/src/L3TkMuonProducer.cc index 41216b5f1de77..49fb0aba3218b 100755 --- a/RecoMuon/L3MuonProducer/src/L3TkMuonProducer.cc +++ b/RecoMuon/L3MuonProducer/src/L3TkMuonProducer.cc @@ -65,7 +65,7 @@ bool L3TkMuonProducer::sharedSeed(const L3MuonTrajectorySeed& s1,const L3MuonTra //quit right away if first detId does not match. front exist because of ==0 ->quit test if(i1_b->geographicalId() != i2_b->geographicalId()) return false; //then check hit by hit if they are the same - for (i1=i1_b,i2=i2_b;i1!=i1_e,i2!=i2_e;++i1,++i2){ + for (i1=i1_b,i2=i2_b;i1!=i1_e && i2!=i2_e;++i1,++i2){ if (!i1->sharesInput(&(*i2),TrackingRecHit::all)) return false; } return true; diff --git a/RecoMuon/MuonSeedGenerator/src/SETFilter.cc b/RecoMuon/MuonSeedGenerator/src/SETFilter.cc index 461198c835546..5fc6d1316eb2d 100644 --- a/RecoMuon/MuonSeedGenerator/src/SETFilter.cc +++ b/RecoMuon/MuonSeedGenerator/src/SETFilter.cc @@ -28,6 +28,7 @@ // there is an existing sorter somewhere in the CMSSW code (I think) - delete that struct sorter { //bigger first! + sorter() {} bool operator() (TransientTrackingRecHit::ConstRecHitPointer hit_1, TransientTrackingRecHit::ConstRecHitPointer hit_2) const { if(hit_1->det()->subDetector() != GeomDetEnumerators::CSC || diff --git a/RecoTracker/FinalTrackSelectors/src/TrackerTrackHitFilter.cc b/RecoTracker/FinalTrackSelectors/src/TrackerTrackHitFilter.cc index 88091cae529a9..a83d4dbc779e9 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackerTrackHitFilter.cc +++ b/RecoTracker/FinalTrackSelectors/src/TrackerTrackHitFilter.cc @@ -227,10 +227,10 @@ void TrackerTrackHitFilter::parseStoN(const std::string &str) { throw cms::Exception("Configuration") << "Rule for S to N cut '" << str << "' not understood.\n"; } else{ - std::string match_0=(match[0].first,match[0].second); - match_1=(match[1].first,match[1].second); - match_2=(match[2].first,match[2].second); - match_3=(match[3].first,match[3].second); + std::string match_0=match[0].second; + match_1=match[1].second; + match_2=match[2].second; + match_3=match[3].second; } diff --git a/RecoVertex/KinematicFit/interface/ConstrainedTreeBuilderT.h b/RecoVertex/KinematicFit/interface/ConstrainedTreeBuilderT.h index b9aea22c7ab56..4ab34793a705a 100644 --- a/RecoVertex/KinematicFit/interface/ConstrainedTreeBuilderT.h +++ b/RecoVertex/KinematicFit/interface/ConstrainedTreeBuilderT.h @@ -107,7 +107,7 @@ ConstrainedTreeBuilderT::buildTree(const std::vector rParticles; int n=0; // assert(initialParticles.size()==nTrk); - for( ; i != initialParticles.end(), iStates != finalStates.end(); ++i,++iStates) + for( ; i != initialParticles.end() && iStates != finalStates.end(); ++i,++iStates) { AlgebraicVector7 p = iStates->kinematicParameters().vector(); double a = - iStates->particleCharge() * diff --git a/RecoVertex/KinematicFit/src/ConstrainedTreeBuilder.cc b/RecoVertex/KinematicFit/src/ConstrainedTreeBuilder.cc index 152a9967df765..5f14b1227ea6a 100644 --- a/RecoVertex/KinematicFit/src/ConstrainedTreeBuilder.cc +++ b/RecoVertex/KinematicFit/src/ConstrainedTreeBuilder.cc @@ -60,7 +60,7 @@ RefCountedKinematicTree ConstrainedTreeBuilder::buildTree(const std::vector::const_iterator iStates = finalStates.begin(); std::vector rParticles; int n=0; - for( ; i != initialParticles.end(), iStates != finalStates.end(); ++i,++iStates) + for( ; i != initialParticles.end() && iStates != finalStates.end(); ++i,++iStates) { AlgebraicVector7 p = iStates->kinematicParameters().vector(); double a = - iStates->particleCharge() * diff --git a/RecoVertex/KinematicFit/src/FinalTreeBuilder.cc b/RecoVertex/KinematicFit/src/FinalTreeBuilder.cc index d5f09d0edf4d5..5421a42d4700c 100644 --- a/RecoVertex/KinematicFit/src/FinalTreeBuilder.cc +++ b/RecoVertex/KinematicFit/src/FinalTreeBuilder.cc @@ -105,7 +105,7 @@ RefCountedKinematicTree FinalTreeBuilder::buildTree(const CachingVertex<6>& vtx, std::vector::const_iterator j; std::vector::const_iterator i; - for(j=input.begin(), i=refTracks.begin(); j !=input.end(), i !=refTracks.end();++j, ++i) + for(j=input.begin(), i=refTracks.begin(); j !=input.end() && i !=refTracks.end();++j, ++i) { RefCountedLinearizedTrackState lT = (*i)->linearizedTrack(); KinematicRefittedTrackState * rS= dynamic_cast(&(*((*i)->refittedState()))); diff --git a/RecoVertex/TertiaryTracksVertexFinder/src/Flight2DSvFilter.cc b/RecoVertex/TertiaryTracksVertexFinder/src/Flight2DSvFilter.cc index e6a3efebae757..89ad839c5bc38 100644 --- a/RecoVertex/TertiaryTracksVertexFinder/src/Flight2DSvFilter.cc +++ b/RecoVertex/TertiaryTracksVertexFinder/src/Flight2DSvFilter.cc @@ -14,7 +14,7 @@ Flight2DSvFilter::Flight2DSvFilter () { } -Flight2DSvFilter::Flight2DSvFilter ( double maxDist2D=2.5 , double minDist2D=0.01 , double minSign2D=3.0 , int minTracks=2 ) { +Flight2DSvFilter::Flight2DSvFilter ( double maxDist2D, double minDist2D, double minSign2D, int minTracks) { // init. data members maxFlightDist2D = maxDist2D ; // cm minFlightDist2D = minDist2D ; // cm diff --git a/RecoVertex/VertexTools/src/InvariantMassFromVertex.cc b/RecoVertex/VertexTools/src/InvariantMassFromVertex.cc index 547c197d86edf..ef263b652f796 100644 --- a/RecoVertex/VertexTools/src/InvariantMassFromVertex.cc +++ b/RecoVertex/VertexTools/src/InvariantMassFromVertex.cc @@ -32,7 +32,7 @@ InvariantMassFromVertex::LorentzVector InvariantMassFromVertex::p4 (const Cachin std::vector::const_iterator i_s = refTracks.begin(); std::vector::const_iterator i_m = masses.begin(); - for( ;i_s !=refTracks.end(), i_m != masses.end(); ++i_s, ++i_m) { + for( ;i_s !=refTracks.end() && i_m != masses.end(); ++i_s, ++i_m) { GlobalVector momentum = (**i_s).refittedState()->freeTrajectoryState().momentum(); totalP4 += LorentzVector(momentum.x(), momentum.y(), momentum.z(), *i_m); } @@ -107,7 +107,7 @@ double InvariantMassFromVertex::uncertainty(const LorentzVector & totalP4, std::vector::const_iterator i_m = masses.begin(); int i_int = 0; - for( ;rt_i !=refTracks.end(), i_m != masses.end(); ++rt_i, ++i_m) { + for( ;rt_i !=refTracks.end() && i_m != masses.end(); ++rt_i, ++i_m) { double a; AlgebraicVector5 param = (**rt_i).refittedState()->parameters(); // rho, theta, phi,tr_im, z_im diff --git a/TrackingTools/TransientTrackingRecHit/interface/RecHitComparatorByPosition.h b/TrackingTools/TransientTrackingRecHit/interface/RecHitComparatorByPosition.h index a243ff9b62936..c6e4e47c5f291 100644 --- a/TrackingTools/TransientTrackingRecHit/interface/RecHitComparatorByPosition.h +++ b/TrackingTools/TransientTrackingRecHit/interface/RecHitComparatorByPosition.h @@ -3,6 +3,7 @@ #include "TrackingTools/TransientTrackingRecHit/interface/TValidTrackingRecHit.h" class RecHitComparatorByPosition{ public: + RecHitComparatorByPosition() {} bool operator() (const TrackingRecHit* a, const TrackingRecHit* b) const ; bool equals(const TrackingRecHit* a, const TrackingRecHit* b) const ; };