From f0b288d78a08889965c93fc57409da6ea09359c0 Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Fri, 17 Jul 2020 17:45:06 +0200 Subject: [PATCH] clang format --- DataFormats/TauReco/src/PFTau.cc | 4 +- .../plugins/HcalDigiToRawuHTR.cc | 6 +- .../plugins/SiPixelRawToDigi.cc | 4 +- RecoBTag/CTagging/src/CharmTagger.cc | 2 +- .../plugins/BTagProbabilityToDiscriminator.cc | 6 +- .../src/CandidateChargeBTagComputer.cc | 4 +- .../plugins/DeepFlavourTagInfoProducer.cc | 5 +- .../TemplatedSecondaryVertexProducer.cc | 8 +- ...ateBoostedDoubleSecondaryVertexComputer.cc | 4 +- RecoBTag/SoftLepton/src/ElectronTagger.cc | 2 +- RecoBTag/SoftLepton/src/MuonTagger.cc | 2 +- .../src/GenericMVAComputerCache.cc | 2 +- .../src/GenericMVAJetTagComputer.cc | 2 +- .../src/EndcapPiZeroDiscriminatorAlgo.cc | 2 +- .../src/HybridClusterAlgo.cc | 2 +- .../src/PFECALSuperClusterAlgo.cc | 2 +- .../src/GsfElectronAlgo.cc | 2 +- .../plugins/CalibratedElectronProducers.cc | 4 +- .../plugins/CalibratedPhotonProducers.cc | 4 +- RecoEgamma/EgammaTools/src/EgammaPCAHelper.cc | 1 - .../src/ElectronMVAEstimatorRun2.cc | 2 +- .../plugins/PhotonMVAEstimator.cc | 2 +- RecoHI/HiJetAlgos/src/HiGenCleaner.cc | 2 +- .../src/LinInterpolatedTable1D.cc | 5 +- .../plugins/FFTJetEFlowSmoother.cc | 1 - .../plugins/FFTJetPatRecoProducer.cc | 1 - .../plugins/FFTJetPileupProcessor.cc | 4 +- .../FFTJetProducers/plugins/FFTJetProducer.cc | 1 - .../FFTJetProducers/plugins/FFTJetTreeDump.cc | 2 +- .../src/FFTJetParameterParser.cc | 97 +++++---- .../src/FixedGridEnergyDensity.cc | 2 +- .../JetProducers/plugins/CATopJetProducer.cc | 25 ++- .../plugins/FastjetJetProducer.cc | 3 +- .../JetProducers/plugins/HTTTopJetProducer.cc | 30 +-- .../JetProducers/plugins/NjettinessAdder.cc | 4 +- .../plugins/PileupJetIdProducer.cc | 4 +- .../src/EcalDeadChannelRecoveryBDTG.cc | 2 +- .../plugins/EcalDetailedTimeRecHitProducer.cc | 5 +- .../src/PulseShapeFitOOTPileupCorrection.cc | 12 +- RecoLocalMuon/CSCSegment/src/CSCSegAlgoRU.cc | 2 +- RecoLocalMuon/DTSegment/src/DTLinearFit.cc | 2 +- .../src/SiStripApvShotCleaner.cc | 1 - .../src/SiStripRawProcessingFactory.cc | 4 +- RecoMuon/TrackingTools/src/MuonTrackLoader.cc | 20 +- .../plugins/CTPPSPixelLocalTrackProducer.cc | 2 +- .../CTPPSDiamondRecHitProducerAlgorithm.cc | 4 +- .../Local/src/RPixPlaneCombinatoryTracking.cc | 1 - .../src/TotemTimingRecHitProducerAlgorithm.cc | 2 +- .../plugins/Cluster3DPCACalculator.cc | 2 +- .../plugins/CorrectedECALPFClusterProducer.cc | 4 +- .../plugins/PFClusterProducer.cc | 4 +- .../plugins/importers/EGPhotonImporter.cc | 22 +-- .../importers/GeneralTracksImporter.cc | 4 +- .../GeneralTracksImporterWithVeto.cc | 4 +- .../plugins/importers/SuperClusterImporter.cc | 2 +- .../PFProducer/src/PFEGammaAlgo.cc | 2 +- RecoParticleFlow/PFProducer/src/PFMuonAlgo.cc | 1 - .../plugins/HGCalTrackCollectionProducer.cc | 2 +- .../PFTracking/plugins/PFElecTkProducer.cc | 12 +- .../src/PFDisplacedVertexCandidateFinder.cc | 4 +- .../PFTracking/src/PFDisplacedVertexFinder.cc | 4 +- .../bin/PixelClusterShapeExtractor.cc | 2 +- .../plugins/PFRecoTauChargedHadronProducer.cc | 2 +- .../PFRecoTauDiscriminationByIsolation.cc | 2 +- ...coTauDiscriminationByIsolationContainer.cc | 2 +- .../PFRecoTauDiscriminationByNProngs.cc | 5 +- .../RecoTau/plugins/RecoTauPiZeroProducer.cc | 1 - RecoTauTag/RecoTau/plugins/RecoTauProducer.cc | 1 - .../plugins/TauDiscriminantCutMultiplexer.cc | 4 +- .../src/PFTauPrimaryVertexProducerBase.cc | 2 +- .../RecoTau/src/RecoTauCommonUtilities.cc | 2 +- .../plugins/TrajectorySegmentBuilder.cc | 145 +++++++------- .../CkfPattern/src/CkfTrajectoryBuilder.cc | 25 ++- ...inedHitPairGeneratorForPhotonConversion.cc | 5 +- .../plugins/TrackMerger.cc | 2 +- .../plugins/TkStripMeasurementDet.cc | 20 +- .../src/TkClonerImpl.cc | 6 +- .../src/AnnealingGhostTrackFitter.cc | 2 +- .../src/GhostTrackVertexFinder.cc | 2 +- RecoVertex/KalmanVertexFit/plugins/KVFTest.cc | 1 - RecoVertex/V0Producer/src/V0Fitter.cc | 14 +- .../TrackFitters/src/KFTrajectoryFitter.cc | 184 +++++++++--------- 82 files changed, 365 insertions(+), 441 deletions(-) diff --git a/DataFormats/TauReco/src/PFTau.cc b/DataFormats/TauReco/src/PFTau.cc index e7a0844d17070..9f622170f15f5 100644 --- a/DataFormats/TauReco/src/PFTau.cc +++ b/DataFormats/TauReco/src/PFTau.cc @@ -1,9 +1,7 @@ #include - - #include "DataFormats/Common/interface/RefToPtr.h" - #include "DataFormats/TauReco/interface/PFTau.h" +#include "DataFormats/TauReco/interface/PFTau.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" //using namespace std; diff --git a/EventFilter/HcalRawToDigi/plugins/HcalDigiToRawuHTR.cc b/EventFilter/HcalRawToDigi/plugins/HcalDigiToRawuHTR.cc index 2123fcad7be7a..6e77221303a17 100644 --- a/EventFilter/HcalRawToDigi/plugins/HcalDigiToRawuHTR.cc +++ b/EventFilter/HcalRawToDigi/plugins/HcalDigiToRawuHTR.cc @@ -30,7 +30,7 @@ #include #include - #include +#include #include /* QUESTION: what about dual FED readout? */ @@ -251,8 +251,8 @@ void HcalDigiToRawuHTR::produce(edm::StreamID id, edm::Event& iEvent, const edm: int fedId = FEDNumbering::MINHCALuTCAFEDID + crateId; if (fedMap.find(fedId) == fedMap.end()) { /* QUESTION: where should the orbit number come from? */ - fedMap[fedId] = std::make_unique( - fedId, iEvent.id().event(), iEvent.orbitNumber(), iEvent.bunchCrossing()); + fedMap[fedId] = + std::make_unique(fedId, iEvent.id().event(), iEvent.orbitNumber(), iEvent.bunchCrossing()); } fedMap[fedId]->addUHTR(uhtr->second, crateId, slotId); } // end loop over uhtr containers diff --git a/EventFilter/SiPixelRawToDigi/plugins/SiPixelRawToDigi.cc b/EventFilter/SiPixelRawToDigi/plugins/SiPixelRawToDigi.cc index 15a5018531e50..93d3f023d44e8 100644 --- a/EventFilter/SiPixelRawToDigi/plugins/SiPixelRawToDigi.cc +++ b/EventFilter/SiPixelRawToDigi/plugins/SiPixelRawToDigi.cc @@ -8,10 +8,8 @@ #include "SiPixelRawToDigi.h" +#include - #include - - #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/ESTransientHandle.h" diff --git a/RecoBTag/CTagging/src/CharmTagger.cc b/RecoBTag/CTagging/src/CharmTagger.cc index 93803f73a08ba..f5f860210626a 100644 --- a/RecoBTag/CTagging/src/CharmTagger.cc +++ b/RecoBTag/CTagging/src/CharmTagger.cc @@ -12,7 +12,7 @@ #include #include #include - #include +#include CharmTagger::Tokens::Tokens(const edm::ParameterSet &configuration, edm::ESConsumesCollector &&cc) { if (configuration.getParameter("useCondDB")) { diff --git a/RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc b/RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc index b8c7b5f672d72..8adbff6f4e2bf 100644 --- a/RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc +++ b/RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc @@ -79,12 +79,12 @@ class BTagProbabilityToDiscriminator : public edm::stream::EDProducer<> { }; BTagProbabilityToDiscriminator::BTagProbabilityToDiscriminator(const edm::ParameterSet &iConfig) { - for (const auto& discriminator : iConfig.getParameter("discriminators")) { + for (const auto &discriminator : iConfig.getParameter("discriminators")) { Discriminator current; current.name = discriminator.getParameter("name"); produces(current.name); - for (const auto& intag : discriminator.getParameter("numerator")) { + for (const auto &intag : discriminator.getParameter("numerator")) { if (jet_tags_.find(intag.encode()) == jet_tags_.end()) { // new // probability jet_tags_[intag.encode()] = consumes(intag); @@ -92,7 +92,7 @@ BTagProbabilityToDiscriminator::BTagProbabilityToDiscriminator(const edm::Parame current.numerator.push_back(intag.encode()); } - for (const auto& intag : discriminator.getParameter("denominator")) { + for (const auto &intag : discriminator.getParameter("denominator")) { if (jet_tags_.find(intag.encode()) == jet_tags_.end()) { // new // probability jet_tags_[intag.encode()] = consumes(intag); diff --git a/RecoBTag/Combined/src/CandidateChargeBTagComputer.cc b/RecoBTag/Combined/src/CandidateChargeBTagComputer.cc index d39a229904a25..c8e320040580a 100644 --- a/RecoBTag/Combined/src/CandidateChargeBTagComputer.cc +++ b/RecoBTag/Combined/src/CandidateChargeBTagComputer.cc @@ -1,8 +1,6 @@ #include - - - #include "RecoBTag/Combined/interface/CandidateChargeBTagComputer.h" +#include "RecoBTag/Combined/interface/CandidateChargeBTagComputer.h" CandidateChargeBTagComputer::Tokens::Tokens(const edm::ParameterSet& parameters, edm::ESConsumesCollector&& cc) { if (parameters.getParameter("useCondDB")) { diff --git a/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc b/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc index e9c65b5aab730..009b3ec778229 100644 --- a/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc +++ b/RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc @@ -55,7 +55,7 @@ class HistogramProbabilityEstimator; #include "FWCore/Framework/interface/EventSetupRecord.h" #include "FWCore/Framework/interface/EventSetupRecordImplementation.h" #include "FWCore/Framework/interface/EventSetupRecordKey.h" - #include +#include class DeepFlavourTagInfoProducer : public edm::stream::EDProducer<> { public: @@ -465,7 +465,8 @@ void DeepFlavourTagInfoProducer::checkEventSetup(const edm::EventSetup& iSetup) iSetup.get().get(calib2DHandle); ESHandle calib3DHandle; iSetup.get().get(calib3DHandle); - probabilityEstimator_ = std::make_unique(calib3DHandle.product(), calib2DHandle.product()); + probabilityEstimator_ = + std::make_unique(calib3DHandle.product(), calib2DHandle.product()); } calibrationCacheId3D_ = cacheId3D; diff --git a/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc b/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc index f12b2c63323bb..ee4c48c7a4f26 100644 --- a/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc +++ b/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc @@ -690,10 +690,10 @@ void TemplatedSecondaryVertexProducer::produce(edm::Event &event, con if (useGhostTrack) vertexRecoGT = std::make_unique( vtxRecoPSet.getParameter("maxFitChi2"), - vtxRecoPSet.getParameter("mergeThreshold"), - vtxRecoPSet.getParameter("primcut"), - vtxRecoPSet.getParameter("seccut"), - getGhostTrackFitType(vtxRecoPSet.getParameter("fitType"))); + vtxRecoPSet.getParameter("mergeThreshold"), + vtxRecoPSet.getParameter("primcut"), + vtxRecoPSet.getParameter("seccut"), + getGhostTrackFitType(vtxRecoPSet.getParameter("fitType"))); else vertexReco = std::make_unique(vtxRecoPSet); diff --git a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc index d64c81ffbc77a..a2eb0098376cd 100644 --- a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc +++ b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc @@ -1,8 +1,6 @@ #include - - - #include "RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h" +#include "RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" diff --git a/RecoBTag/SoftLepton/src/ElectronTagger.cc b/RecoBTag/SoftLepton/src/ElectronTagger.cc index e6ceb0d512278..3406e50101436 100644 --- a/RecoBTag/SoftLepton/src/ElectronTagger.cc +++ b/RecoBTag/SoftLepton/src/ElectronTagger.cc @@ -1,7 +1,7 @@ #include #include - #include +#include #include "CondFormats/DataRecord/interface/BTauGenericMVAJetTagComputerRcd.h" #include "CondFormats/DataRecord/interface/GBRWrapperRcd.h" diff --git a/RecoBTag/SoftLepton/src/MuonTagger.cc b/RecoBTag/SoftLepton/src/MuonTagger.cc index 6a8505ffcd625..dbfbf2bf74e88 100644 --- a/RecoBTag/SoftLepton/src/MuonTagger.cc +++ b/RecoBTag/SoftLepton/src/MuonTagger.cc @@ -5,7 +5,7 @@ #include #include - #include +#include #include "RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h" #include "DataFormats/BTauReco/interface/SoftLeptonTagInfo.h" diff --git a/RecoBTau/JetTagComputer/src/GenericMVAComputerCache.cc b/RecoBTau/JetTagComputer/src/GenericMVAComputerCache.cc index 2ee475b4eda90..32fcf9a29b3c0 100644 --- a/RecoBTau/JetTagComputer/src/GenericMVAComputerCache.cc +++ b/RecoBTau/JetTagComputer/src/GenericMVAComputerCache.cc @@ -1,7 +1,7 @@ #include #include - #include +#include #include #include "CondFormats/PhysicsToolsObjects/interface/MVAComputer.h" diff --git a/RecoBTau/JetTagComputer/src/GenericMVAJetTagComputer.cc b/RecoBTau/JetTagComputer/src/GenericMVAJetTagComputer.cc index f994231fe3751..83e6e3c95af41 100644 --- a/RecoBTau/JetTagComputer/src/GenericMVAJetTagComputer.cc +++ b/RecoBTau/JetTagComputer/src/GenericMVAJetTagComputer.cc @@ -3,7 +3,7 @@ #include #include - #include +#include #include "FWCore/Utilities/interface/Exception.h" #include "FWCore/Framework/interface/EventSetup.h" diff --git a/RecoEcal/EgammaClusterAlgos/src/EndcapPiZeroDiscriminatorAlgo.cc b/RecoEcal/EgammaClusterAlgos/src/EndcapPiZeroDiscriminatorAlgo.cc index c8fe33c95252d..a56ad911214be 100644 --- a/RecoEcal/EgammaClusterAlgos/src/EndcapPiZeroDiscriminatorAlgo.cc +++ b/RecoEcal/EgammaClusterAlgos/src/EndcapPiZeroDiscriminatorAlgo.cc @@ -104,7 +104,7 @@ vector EndcapPiZeroDiscriminatorAlgo::findPreshVector(ESDetId strip, // to avoid problem in case number of strips is less than 11 vector vout_ElevenStrips_Energy; vout_ElevenStrips_Energy.reserve(11); - for (int i = 0; i < 11; i++) { + for (int i = 0; i < 11; i++) { vout_ElevenStrips_Energy.push_back(0.); } diff --git a/RecoEcal/EgammaClusterAlgos/src/HybridClusterAlgo.cc b/RecoEcal/EgammaClusterAlgos/src/HybridClusterAlgo.cc index 96189c041d735..2a187f5a3ddaf 100644 --- a/RecoEcal/EgammaClusterAlgos/src/HybridClusterAlgo.cc +++ b/RecoEcal/EgammaClusterAlgos/src/HybridClusterAlgo.cc @@ -321,7 +321,7 @@ void HybridClusterAlgo::mainSearch(const EcalRecHitCollection* hits, const CaloS std::vector OwnerShip; std::vector LumpEnergy; OwnerShip.reserve(int(dominoEnergy.size())); - for (int i = 0; i < int(dominoEnergy.size()); ++i) + for (int i = 0; i < int(dominoEnergy.size()); ++i) OwnerShip.push_back(-1); //Loop over peaks. diff --git a/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc b/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc index c9265d23108b2..637eb349f8b77 100644 --- a/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc +++ b/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc @@ -20,7 +20,7 @@ #include #include #include - #include +#include #include using namespace std; diff --git a/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc b/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc index 16d62dd6f3827..c15d7f30e0a8f 100644 --- a/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc +++ b/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc @@ -30,7 +30,7 @@ #include #include - #include +#include using namespace edm; using namespace reco; diff --git a/RecoEgamma/EgammaTools/plugins/CalibratedElectronProducers.cc b/RecoEgamma/EgammaTools/plugins/CalibratedElectronProducers.cc index a6c75c4517fb9..f251c32d2da23 100644 --- a/RecoEgamma/EgammaTools/plugins/CalibratedElectronProducers.cc +++ b/RecoEgamma/EgammaTools/plugins/CalibratedElectronProducers.cc @@ -33,7 +33,7 @@ #include - #include +#include template class CalibratedElectronProducerT : public edm::stream::EDProducer<> { @@ -119,7 +119,7 @@ void CalibratedElectronProducerT::fillDescriptions(edm::ConfigurationDescript desc.add("semiDeterministic", true); std::vector valMapsProduced; valMapsProduced.reserve(valMapsToStore_.size()); - for (auto varToStore : valMapsToStore_) + for (auto varToStore : valMapsToStore_) valMapsProduced.push_back(EGEnergySysIndex::name(varToStore)); desc.add>("valueMapsStored", valMapsProduced) ->setComment( diff --git a/RecoEgamma/EgammaTools/plugins/CalibratedPhotonProducers.cc b/RecoEgamma/EgammaTools/plugins/CalibratedPhotonProducers.cc index e1330078d9e91..e5b8598f1589e 100644 --- a/RecoEgamma/EgammaTools/plugins/CalibratedPhotonProducers.cc +++ b/RecoEgamma/EgammaTools/plugins/CalibratedPhotonProducers.cc @@ -28,7 +28,7 @@ #include #include - #include +#include template class CalibratedPhotonProducerT : public edm::stream::EDProducer<> { @@ -109,7 +109,7 @@ void CalibratedPhotonProducerT::fillDescriptions(edm::ConfigurationDescriptio desc.add("semiDeterministic", true); std::vector valMapsProduced; valMapsProduced.reserve(valMapsToStore_.size()); - for (auto varToStore : valMapsToStore_) + for (auto varToStore : valMapsToStore_) valMapsProduced.push_back(EGEnergySysIndex::name(varToStore)); desc.add>("valueMapsStored", valMapsProduced) ->setComment( diff --git a/RecoEgamma/EgammaTools/src/EgammaPCAHelper.cc b/RecoEgamma/EgammaTools/src/EgammaPCAHelper.cc index 2fb1fa0d24d74..43fc19676ffcb 100644 --- a/RecoEgamma/EgammaTools/src/EgammaPCAHelper.cc +++ b/RecoEgamma/EgammaTools/src/EgammaPCAHelper.cc @@ -12,7 +12,6 @@ #include #include - using namespace hgcal; EGammaPCAHelper::EGammaPCAHelper() diff --git a/RecoEgamma/ElectronIdentification/src/ElectronMVAEstimatorRun2.cc b/RecoEgamma/ElectronIdentification/src/ElectronMVAEstimatorRun2.cc index b80242e00bb6e..1f66daa4b1c28 100644 --- a/RecoEgamma/ElectronIdentification/src/ElectronMVAEstimatorRun2.cc +++ b/RecoEgamma/ElectronIdentification/src/ElectronMVAEstimatorRun2.cc @@ -98,7 +98,7 @@ float ElectronMVAEstimatorRun2::mvaValue(const reco::Candidate* candidate, std::vector vars; vars.reserve(nVariables_[iCategory]); - for (int i = 0; i < nVariables_[iCategory]; ++i) { + for (int i = 0; i < nVariables_[iCategory]; ++i) { vars.push_back(mvaVarMngr_.getValue(variables_[iCategory][i], *electron, auxVariables)); } diff --git a/RecoEgamma/PhotonIdentification/plugins/PhotonMVAEstimator.cc b/RecoEgamma/PhotonIdentification/plugins/PhotonMVAEstimator.cc index 72b2fe13d89fe..1141ad5d8132f 100644 --- a/RecoEgamma/PhotonIdentification/plugins/PhotonMVAEstimator.cc +++ b/RecoEgamma/PhotonIdentification/plugins/PhotonMVAEstimator.cc @@ -116,7 +116,7 @@ float PhotonMVAEstimator::mvaValue(const reco::Candidate* candPtr, std::vector vars; vars.reserve(nVariables_[iCategory]); - for (int i = 0; i < nVariables_[iCategory]; ++i) { + for (int i = 0; i < nVariables_[iCategory]; ++i) { vars.push_back(mvaVarMngr_.getValue(variables_[iCategory][i], *phoPtr, auxVars)); } diff --git a/RecoHI/HiJetAlgos/src/HiGenCleaner.cc b/RecoHI/HiJetAlgos/src/HiGenCleaner.cc index d44ad843c7931..6460882621a4b 100644 --- a/RecoHI/HiJetAlgos/src/HiGenCleaner.cc +++ b/RecoHI/HiJetAlgos/src/HiGenCleaner.cc @@ -95,7 +95,7 @@ void HiGenCleaner::produce(edm::StreamID, edm::Event& iEvent, const edm::Eve vector selection; selection.reserve(jetsize); - for (int ijet = 0; ijet < jetsize; ++ijet) { + for (int ijet = 0; ijet < jetsize; ++ijet) { selection.push_back(-1); } diff --git a/RecoJets/FFTJetAlgorithms/src/LinInterpolatedTable1D.cc b/RecoJets/FFTJetAlgorithms/src/LinInterpolatedTable1D.cc index 75c895b14ff28..9f8561ab11d42 100644 --- a/RecoJets/FFTJetAlgorithms/src/LinInterpolatedTable1D.cc +++ b/RecoJets/FFTJetAlgorithms/src/LinInterpolatedTable1D.cc @@ -1,7 +1,5 @@ #include - - #include "RecoJets/FFTJetAlgorithms/interface/LinInterpolatedTable1D.h" namespace fftjetcms { @@ -58,8 +56,7 @@ namespace fftjetcms { points.push_back(std::pair(data_[0], xmin_)); } - return std::make_unique( - points, npoints, leftExtrapolationLinear, rightExtrapolationLinear); + return std::make_unique(points, npoints, leftExtrapolationLinear, rightExtrapolationLinear); } double LinInterpolatedTable1D::operator()(const double& x) const { diff --git a/RecoJets/FFTJetProducers/plugins/FFTJetEFlowSmoother.cc b/RecoJets/FFTJetProducers/plugins/FFTJetEFlowSmoother.cc index 394e26a59afb3..6ad1bc0297a63 100644 --- a/RecoJets/FFTJetProducers/plugins/FFTJetEFlowSmoother.cc +++ b/RecoJets/FFTJetProducers/plugins/FFTJetEFlowSmoother.cc @@ -19,7 +19,6 @@ #include #include - // FFTJet headers #include "fftjet/FrequencyKernelConvolver.hh" #include "fftjet/DiscreteGauss2d.hh" diff --git a/RecoJets/FFTJetProducers/plugins/FFTJetPatRecoProducer.cc b/RecoJets/FFTJetProducers/plugins/FFTJetPatRecoProducer.cc index 4dcefbad14966..7bcaa78d3349b 100644 --- a/RecoJets/FFTJetProducers/plugins/FFTJetPatRecoProducer.cc +++ b/RecoJets/FFTJetProducers/plugins/FFTJetPatRecoProducer.cc @@ -19,7 +19,6 @@ #include #include - // FFTJet headers #include "fftjet/ProximityClusteringTree.hh" #include "fftjet/ClusteringSequencer.hh" diff --git a/RecoJets/FFTJetProducers/plugins/FFTJetPileupProcessor.cc b/RecoJets/FFTJetProducers/plugins/FFTJetPileupProcessor.cc index e97f4c5af1233..ef2c11b6cf34f 100644 --- a/RecoJets/FFTJetProducers/plugins/FFTJetPileupProcessor.cc +++ b/RecoJets/FFTJetProducers/plugins/FFTJetPileupProcessor.cc @@ -20,7 +20,6 @@ #include #include - // FFTJet headers #include "fftjet/FrequencyKernelConvolver.hh" #include "fftjet/DiscreteGauss2d.hh" @@ -163,8 +162,7 @@ FFTJetPileupProcessor::FFTJetPileupProcessor(const edm::ParameterSet& ps) if (minScale <= 0.0 || maxScale < minScale || nScales == 0U) throw cms::Exception("FFTJetBadConfig") << "invalid filter scales" << std::endl; - filterScales = - std::make_unique(minScale, maxScale, nScales); + filterScales = std::make_unique(minScale, maxScale, nScales); percentileData.resize(nScales * nPercentiles); diff --git a/RecoJets/FFTJetProducers/plugins/FFTJetProducer.cc b/RecoJets/FFTJetProducers/plugins/FFTJetProducer.cc index 109e7e0ac4f34..1630f23aec963 100644 --- a/RecoJets/FFTJetProducers/plugins/FFTJetProducer.cc +++ b/RecoJets/FFTJetProducers/plugins/FFTJetProducer.cc @@ -22,7 +22,6 @@ #include #include - #include "fftjet/peakEtLifetime.hh" // Header for this class diff --git a/RecoJets/FFTJetProducers/plugins/FFTJetTreeDump.cc b/RecoJets/FFTJetProducers/plugins/FFTJetTreeDump.cc index 515e0bcf45073..7dca7d1c01291 100644 --- a/RecoJets/FFTJetProducers/plugins/FFTJetTreeDump.cc +++ b/RecoJets/FFTJetProducers/plugins/FFTJetTreeDump.cc @@ -21,7 +21,7 @@ #include #include - #include +#include // FFTJet headers #include "fftjet/ProximityClusteringTree.hh" diff --git a/RecoJets/FFTJetProducers/src/FFTJetParameterParser.cc b/RecoJets/FFTJetProducers/src/FFTJetParameterParser.cc index 2508044a5a5bf..ba7ce31b97dc7 100644 --- a/RecoJets/FFTJetProducers/src/FFTJetParameterParser.cc +++ b/RecoJets/FFTJetProducers/src/FFTJetParameterParser.cc @@ -122,8 +122,8 @@ static bool parse_jet_member_function(const char* fname, fftjet::JetProperty > fftjet_Grid2d_parser(const edm::ParameterSet& ps) { - typedef std::unique_ptr > return_type; + std::unique_ptr> fftjet_Grid2d_parser(const edm::ParameterSet& ps) { + typedef std::unique_ptr> return_type; fftjet::Grid2d* g = nullptr; // Check if the grid should be read from file @@ -150,7 +150,7 @@ namespace fftjetcms { // Check if the grid data is provided if (ps.exists("data")) { - const std::vector& data = ps.getParameter >("data"); + const std::vector& data = ps.getParameter>("data"); if (data.size() == nEtaBins * nPhiBins) g->blockSet(&data[0], nEtaBins, nPhiBins); else { @@ -163,8 +163,8 @@ namespace fftjetcms { return return_type(g); } - std::unique_ptr > fftjet_PeakSelector_parser(const edm::ParameterSet& ps) { - typedef std::unique_ptr > return_type; + std::unique_ptr> fftjet_PeakSelector_parser(const edm::ParameterSet& ps) { + typedef std::unique_ptr> return_type; const std::string peakselector_type = ps.getParameter("Class"); @@ -347,8 +347,8 @@ namespace fftjetcms { return std::unique_ptr(nullptr); } - std::unique_ptr > fftjet_ScaleSet_parser(const edm::ParameterSet& ps) { - typedef std::unique_ptr > return_type; + std::unique_ptr> fftjet_ScaleSet_parser(const edm::ParameterSet& ps) { + typedef std::unique_ptr> return_type; const std::string className = ps.getParameter("Class"); @@ -370,7 +370,7 @@ namespace fftjetcms { } if (!className.compare("UserSet")) { - return_type scales(new std::vector(ps.getParameter >("scales"))); + return_type scales(new std::vector(ps.getParameter>("scales"))); // Verify that all scales are positive and unique const unsigned nscales = scales->size(); @@ -389,13 +389,13 @@ namespace fftjetcms { return return_type(nullptr); } - std::unique_ptr > fftjet_ClusteringTreeSparsifier_parser( + std::unique_ptr> fftjet_ClusteringTreeSparsifier_parser( const edm::ParameterSet& ps) { - typedef std::unique_ptr > return_type; + typedef std::unique_ptr> return_type; const int maxLevelNumber = ps.getParameter("maxLevelNumber"); const unsigned filterMask = ps.getParameter("filterMask"); - const std::vector userScalesV = ps.getParameter >("userScales"); + const std::vector userScalesV = ps.getParameter>("userScales"); const unsigned nUserScales = userScalesV.size(); const double* userScales = nUserScales ? &userScalesV[0] : nullptr; @@ -403,9 +403,9 @@ namespace fftjetcms { maxLevelNumber, filterMask, userScales, nUserScales); } - std::unique_ptr > fftjet_DistanceCalculator_parser( + std::unique_ptr> fftjet_DistanceCalculator_parser( const edm::ParameterSet& ps) { - typedef std::unique_ptr > return_type; + typedef std::unique_ptr> return_type; const std::string calc_type = ps.getParameter("Class"); @@ -441,7 +441,7 @@ namespace fftjetcms { const double xmax = ps.getParameter("xmax"); const bool leftExtrapolationLinear = ps.getParameter("leftExtrapolationLinear"); const bool rightExtrapolationLinear = ps.getParameter("rightExtrapolationLinear"); - const std::vector data(ps.getParameter >("data")); + const std::vector data(ps.getParameter>("data")); if (data.empty()) return std::unique_ptr(nullptr); else @@ -454,12 +454,11 @@ namespace fftjetcms { const double xmax = ps.getParameter("xmax"); const double flow = ps.getParameter("flow"); const double fhigh = ps.getParameter("fhigh"); - const std::vector data(ps.getParameter >("data")); + const std::vector data(ps.getParameter>("data")); if (data.empty()) return std::unique_ptr(nullptr); else - return std::make_unique( - &data[0], data.size(), xmin, xmax, flow, fhigh); + return std::make_unique(&data[0], data.size(), xmin, xmax, flow, fhigh); } std::unique_ptr fftjet_LinearInterpolator2d_parser(const edm::ParameterSet& ps) { @@ -473,7 +472,7 @@ namespace fftjetcms { return std::unique_ptr(ip); } - std::unique_ptr > fftjet_PeakFunctor_parser(const edm::ParameterSet& ps) { + std::unique_ptr> fftjet_PeakFunctor_parser(const edm::ParameterSet& ps) { typedef fftjet::Functor1 ptr_type; typedef std::unique_ptr return_type; @@ -538,7 +537,7 @@ namespace fftjetcms { } if (!property_type.compare("CompositeFunctor")) { - std::unique_ptr > fcn1 = + std::unique_ptr> fcn1 = fftjet_Function_parser(ps.getParameter("function1")); return_type fcn2 = fftjet_PeakFunctor_parser(ps.getParameter("function2")); fftjet::Functor1* f1 = fcn1.get(); @@ -565,7 +564,7 @@ namespace fftjetcms { } if (!property_type.compare("MagnitudeDependent")) { - std::unique_ptr > fcn1 = + std::unique_ptr> fcn1 = fftjet_Function_parser(ps.getParameter("function")); fftjet::Functor1* f1 = fcn1.get(); if (f1) { @@ -576,7 +575,7 @@ namespace fftjetcms { } if (!property_type.compare("PeakEtaDependent")) { - std::unique_ptr > fcn1 = + std::unique_ptr> fcn1 = fftjet_Function_parser(ps.getParameter("function")); fftjet::Functor1* f1 = fcn1.get(); if (f1) { @@ -589,7 +588,7 @@ namespace fftjetcms { return return_type(nullptr); } - std::unique_ptr > > fftjet_JetFunctor_parser( + std::unique_ptr>> fftjet_JetFunctor_parser( const edm::ParameterSet& ps) { typedef fftjet::Functor1 ptr_type; typedef std::unique_ptr return_type; @@ -607,7 +606,7 @@ namespace fftjetcms { } if (!property_type.compare("JetEtaDependent")) { - std::unique_ptr > fcn1 = + std::unique_ptr> fcn1 = fftjet_Function_parser(ps.getParameter("function")); fftjet::Functor1* f1 = fcn1.get(); if (f1) { @@ -648,7 +647,7 @@ namespace fftjetcms { } if (!property_type.compare("CompositeFunctor")) { - std::unique_ptr > fcn1 = + std::unique_ptr> fcn1 = fftjet_Function_parser(ps.getParameter("function1")); return_type fcn2 = fftjet_JetFunctor_parser(ps.getParameter("function2")); fftjet::Functor1* f1 = fcn1.get(); @@ -675,7 +674,7 @@ namespace fftjetcms { } if (!property_type.compare("MagnitudeDependent")) { - std::unique_ptr > fcn1 = + std::unique_ptr> fcn1 = fftjet_Function_parser(ps.getParameter("function")); fftjet::Functor1* f1 = fcn1.get(); if (f1) { @@ -688,10 +687,10 @@ namespace fftjetcms { return return_type(nullptr); } - std::unique_ptr, fftjet::RecombinedJet > > + std::unique_ptr, fftjet::RecombinedJet>> fftjet_JetDistance_parser(const edm::ParameterSet& ps) { typedef std::unique_ptr< - fftjet::Functor2, fftjet::RecombinedJet > > + fftjet::Functor2, fftjet::RecombinedJet>> return_type; const std::string distance_type = ps.getParameter("Class"); @@ -707,8 +706,8 @@ namespace fftjetcms { return return_type(nullptr); } - std::unique_ptr > fftjet_Function_parser(const edm::ParameterSet& ps) { - typedef std::unique_ptr > return_type; + std::unique_ptr> fftjet_Function_parser(const edm::ParameterSet& ps) { + typedef std::unique_ptr> return_type; const std::string fcn_type = ps.getParameter("Class"); @@ -765,7 +764,7 @@ namespace fftjetcms { } if (!fcn_type.compare("PileupGrid2d")) { - std::unique_ptr > grid = fftjet_Grid2d_parser(ps.getParameter("Grid2d")); + std::unique_ptr> grid = fftjet_Grid2d_parser(ps.getParameter("Grid2d")); const double rhoFactor = ps.getParameter("rhoFactor"); const fftjet::Grid2d* g = grid.get(); @@ -778,7 +777,7 @@ namespace fftjetcms { return return_type(nullptr); } - std::unique_ptr > fftjet_PeakMagnitudeMapper2d_parser( + std::unique_ptr> fftjet_PeakMagnitudeMapper2d_parser( const edm::ParameterSet& ps) { std::unique_ptr responseCurve = fftjet_LinearInterpolator2d_parser(ps.getParameter("responseCurve")); @@ -789,18 +788,17 @@ namespace fftjetcms { const double maxMagnitude = ps.getParameter("maxMagnitude"); const unsigned nMagPoints = ps.getParameter("nMagPoints"); - return (std::make_unique >( - *responseCurve, - new fftjetcms::PeakAbsEta(), - true, - minPredictor, - maxPredictor, - nPredPoints, - maxMagnitude, - nMagPoints)); + return (std::make_unique>(*responseCurve, + new fftjetcms::PeakAbsEta(), + true, + minPredictor, + maxPredictor, + nPredPoints, + maxMagnitude, + nMagPoints)); } - std::unique_ptr > > fftjet_JetMagnitudeMapper2d_parser( + std::unique_ptr>> fftjet_JetMagnitudeMapper2d_parser( const edm::ParameterSet& ps) { std::unique_ptr responseCurve = fftjet_LinearInterpolator2d_parser(ps.getParameter("responseCurve")); @@ -811,15 +809,14 @@ namespace fftjetcms { const double maxMagnitude = ps.getParameter("maxMagnitude"); const unsigned nMagPoints = ps.getParameter("nMagPoints"); - return (std::make_unique >( - *responseCurve, - new fftjetcms::JetAbsEta(), - true, - minPredictor, - maxPredictor, - nPredPoints, - maxMagnitude, - nMagPoints)); + return (std::make_unique>(*responseCurve, + new fftjetcms::JetAbsEta(), + true, + minPredictor, + maxPredictor, + nPredPoints, + maxMagnitude, + nMagPoints)); } } // namespace fftjetcms diff --git a/RecoJets/JetAlgorithms/src/FixedGridEnergyDensity.cc b/RecoJets/JetAlgorithms/src/FixedGridEnergyDensity.cc index 75260f50ad1bb..b94bad9f52bd3 100644 --- a/RecoJets/JetAlgorithms/src/FixedGridEnergyDensity.cc +++ b/RecoJets/JetAlgorithms/src/FixedGridEnergyDensity.cc @@ -12,7 +12,7 @@ float FixedGridEnergyDensity::fixedGridRho(EtaRegion etaRegion) { //define the phi bins vector phibins; phibins.reserve(10); - for (int i = 0; i < 10; i++) + for (int i = 0; i < 10; i++) phibins.push_back(-TMath::Pi() + (2 * i + 1) * TMath::TwoPi() / 20.); //define the eta bins vector etabins; diff --git a/RecoJets/JetProducers/plugins/CATopJetProducer.cc b/RecoJets/JetProducers/plugins/CATopJetProducer.cc index 26e34fd7196ee..3d8a55f2b978d 100644 --- a/RecoJets/JetProducers/plugins/CATopJetProducer.cc +++ b/RecoJets/JetProducers/plugins/CATopJetProducer.cc @@ -41,25 +41,22 @@ CATopJetProducer::CATopJetProducer(edm::ParameterSet const& conf) "useMaxTower"), // use max tower as adjacency criterion, otherwise use centroid - NOT USED conf.getParameter("sumEtEtaCut"), // eta for event SumEt - NOT USED conf.getParameter("etFrac") // fraction of event sumEt / 2 for a jet to be considered "hard" -NOT USED - ); + ); } else if (tagAlgo_ == FJ_CMS_TOPTAG) { - fjCMSTopTagger_ = - std::make_unique(conf.getParameter("ptFrac"), - conf.getParameter("rFrac"), - conf.getParameter("adjacencyParam")); + fjCMSTopTagger_ = std::make_unique(conf.getParameter("ptFrac"), + conf.getParameter("rFrac"), + conf.getParameter("adjacencyParam")); } else if (tagAlgo_ == FJ_JHU_TOPTAG) { - fjJHUTopTagger_ = - std::make_unique(conf.getParameter("ptFrac"), - conf.getParameter("deltaRCut"), - conf.getParameter("cosThetaWMax")); + fjJHUTopTagger_ = std::make_unique(conf.getParameter("ptFrac"), + conf.getParameter("deltaRCut"), + conf.getParameter("cosThetaWMax")); } else if (tagAlgo_ == FJ_NSUB_TAG) { fastjet::JetDefinition::Plugin* plugin = new fastjet::SISConePlugin(0.6, 0.75); fastjet::JetDefinition NsubJetDef(plugin); - fjNSUBTagger_ = std::make_unique( - NsubJetDef, - conf.getParameter("tau2Cut"), - conf.getParameter("cosThetaSCut"), - conf.getParameter("useExclusive")); + fjNSUBTagger_ = std::make_unique(NsubJetDef, + conf.getParameter("tau2Cut"), + conf.getParameter("cosThetaSCut"), + conf.getParameter("useExclusive")); } } diff --git a/RecoJets/JetProducers/plugins/FastjetJetProducer.cc b/RecoJets/JetProducers/plugins/FastjetJetProducer.cc index 2bf2170c55c58..fd547fbfd288d 100644 --- a/RecoJets/JetProducers/plugins/FastjetJetProducer.cc +++ b/RecoJets/JetProducers/plugins/FastjetJetProducer.cc @@ -429,8 +429,7 @@ void FastjetJetProducer::runAlgorithm(edm::Event& iEvent, edm::EventSetup const& unique_ptr subtractor; unique_ptr bge_rho_grid; if (correctShape_) { - bge_rho_grid = std::make_unique( - gridMaxRapidity_, gridSpacing_); + bge_rho_grid = std::make_unique(gridMaxRapidity_, gridSpacing_); bge_rho_grid->set_particles(fjInputs_); subtractor = std::make_unique(bge_rho_grid.get()); subtractor->set_use_rho_m(); diff --git a/RecoJets/JetProducers/plugins/HTTTopJetProducer.cc b/RecoJets/JetProducers/plugins/HTTTopJetProducer.cc index 0f4963246f96e..bab56fc283c06 100644 --- a/RecoJets/JetProducers/plugins/HTTTopJetProducer.cc +++ b/RecoJets/JetProducers/plugins/HTTTopJetProducer.cc @@ -63,21 +63,21 @@ HTTTopJetProducer::HTTTopJetProducer(edm::ParameterSet const& conf) fromHTTTopJetProducer_ = true; fjHEPTopTagger_ = std::make_unique(optimalR_, - qJets_, - minSubjetPt_, - minCandPt_, - subjetMass_, - muCut_, - filtR_, - filtN_, - mode_, - minCandMass_, - maxCandMass_, - massRatioWidth_, - minM23Cut_, - minM13Cut_, - maxM13Cut_, - rejectMinR_); + qJets_, + minSubjetPt_, + minCandPt_, + subjetMass_, + muCut_, + filtR_, + filtN_, + mode_, + minCandMass_, + maxCandMass_, + massRatioWidth_, + minM23Cut_, + minM13Cut_, + maxM13Cut_, + rejectMinR_); } void HTTTopJetProducer::produce(edm::Event& e, const edm::EventSetup& c) { diff --git a/RecoJets/JetProducers/plugins/NjettinessAdder.cc b/RecoJets/JetProducers/plugins/NjettinessAdder.cc index 6a90c87896104..3ebebe9868da6 100644 --- a/RecoJets/JetProducers/plugins/NjettinessAdder.cc +++ b/RecoJets/JetProducers/plugins/NjettinessAdder.cc @@ -1,8 +1,6 @@ #include - - - #include "RecoJets/JetProducers/interface/NjettinessAdder.h" +#include "RecoJets/JetProducers/interface/NjettinessAdder.h" #include "FWCore/Framework/interface/MakerMacros.h" diff --git a/RecoJets/JetProducers/plugins/PileupJetIdProducer.cc b/RecoJets/JetProducers/plugins/PileupJetIdProducer.cc index 89911c091c363..3686624a3fb1d 100644 --- a/RecoJets/JetProducers/plugins/PileupJetIdProducer.cc +++ b/RecoJets/JetProducers/plugins/PileupJetIdProducer.cc @@ -18,10 +18,8 @@ Description: [one line class summary] #include "RecoJets/JetProducers/plugins/PileupJetIdProducer.h" +#include - #include - - GBRForestsAndConstants::GBRForestsAndConstants(edm::ParameterSet const& iConfig) : runMvas_(iConfig.getParameter("runMvas")), produceJetIds_(iConfig.getParameter("produceJetIds")), diff --git a/RecoLocalCalo/EcalDeadChannelRecoveryAlgos/src/EcalDeadChannelRecoveryBDTG.cc b/RecoLocalCalo/EcalDeadChannelRecoveryAlgos/src/EcalDeadChannelRecoveryBDTG.cc index 06e12c2610d77..76cfd79ba14bc 100644 --- a/RecoLocalCalo/EcalDeadChannelRecoveryAlgos/src/EcalDeadChannelRecoveryBDTG.cc +++ b/RecoLocalCalo/EcalDeadChannelRecoveryAlgos/src/EcalDeadChannelRecoveryBDTG.cc @@ -14,7 +14,7 @@ #include #include - #include +#include #include template <> diff --git a/RecoLocalCalo/EcalRecProducers/plugins/EcalDetailedTimeRecHitProducer.cc b/RecoLocalCalo/EcalRecProducers/plugins/EcalDetailedTimeRecHitProducer.cc index 309213bb06f20..1be3e5b65a689 100644 --- a/RecoLocalCalo/EcalRecProducers/plugins/EcalDetailedTimeRecHitProducer.cc +++ b/RecoLocalCalo/EcalRecProducers/plugins/EcalDetailedTimeRecHitProducer.cc @@ -22,7 +22,7 @@ #include #include - #include +#include #include "Geometry/CaloGeometry/interface/CaloGeometry.h" #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" @@ -152,7 +152,8 @@ void EcalDetailedTimeRecHitProducer::produce(edm::Event& evt, const edm::EventSe { assert((*VertexHandle)[0].vertexId() == 0); const SimVertex* myVertex = &(*VertexHandle)[0]; - vertex = std::make_unique(myVertex->position().x(), myVertex->position().y(), myVertex->position().z()); + vertex = std::make_unique( + myVertex->position().x(), myVertex->position().y(), myVertex->position().z()); } } } diff --git a/RecoLocalCalo/HcalRecAlgos/src/PulseShapeFitOOTPileupCorrection.cc b/RecoLocalCalo/HcalRecAlgos/src/PulseShapeFitOOTPileupCorrection.cc index 00f34521a415d..cbfa7d51bddd5 100644 --- a/RecoLocalCalo/HcalRecAlgos/src/PulseShapeFitOOTPileupCorrection.cc +++ b/RecoLocalCalo/HcalRecAlgos/src/PulseShapeFitOOTPileupCorrection.cc @@ -99,12 +99,12 @@ void PulseShapeFitOOTPileupCorrection::resetPulseShapeTemplate(const HcalPulseSh ++cntsetPulseShape; psfPtr_ = std::make_unique( ps, pedestalConstraint_, timeConstraint_, addPulseJitter_, pulseJitter_, timeMean_, pedMean_, nSamples); - spfunctor_ = std::make_unique( - psfPtr_.get(), &FitterFuncs::PulseShapeFunctor::singlePulseShapeFunc, 3); - dpfunctor_ = std::make_unique( - psfPtr_.get(), &FitterFuncs::PulseShapeFunctor::doublePulseShapeFunc, 5); - tpfunctor_ = std::make_unique( - psfPtr_.get(), &FitterFuncs::PulseShapeFunctor::triplePulseShapeFunc, 7); + spfunctor_ = + std::make_unique(psfPtr_.get(), &FitterFuncs::PulseShapeFunctor::singlePulseShapeFunc, 3); + dpfunctor_ = + std::make_unique(psfPtr_.get(), &FitterFuncs::PulseShapeFunctor::doublePulseShapeFunc, 5); + tpfunctor_ = + std::make_unique(psfPtr_.get(), &FitterFuncs::PulseShapeFunctor::triplePulseShapeFunc, 7); } constexpr char const *varNames[] = {"time", "energy", "time1", "energy1", "time2", "energy2", "ped"}; diff --git a/RecoLocalMuon/CSCSegment/src/CSCSegAlgoRU.cc b/RecoLocalMuon/CSCSegment/src/CSCSegAlgoRU.cc index 6518f239dcf2f..f6620a0973e9c 100644 --- a/RecoLocalMuon/CSCSegment/src/CSCSegAlgoRU.cc +++ b/RecoLocalMuon/CSCSegment/src/CSCSegAlgoRU.cc @@ -17,7 +17,7 @@ #include #include - #include +#include CSCSegAlgoRU::CSCSegAlgoRU(const edm::ParameterSet& ps) : CSCSegmentAlgorithm(ps), myName("CSCSegAlgoRU") { doCollisions = ps.getParameter("doCollisions"); diff --git a/RecoLocalMuon/DTSegment/src/DTLinearFit.cc b/RecoLocalMuon/DTSegment/src/DTLinearFit.cc index 955f2d527924b..efa991004445f 100644 --- a/RecoLocalMuon/DTSegment/src/DTLinearFit.cc +++ b/RecoLocalMuon/DTSegment/src/DTLinearFit.cc @@ -280,7 +280,7 @@ void DTLinearFit::fit4Var(const vector& xfit, int nppar4 = 0; sigy.reserve(nptfit); - for (int j = 0; j < nptfit; j++) + for (int j = 0; j < nptfit; j++) sigy.push_back(sigma); float a = 0.; diff --git a/RecoLocalTracker/SiStripClusterizer/src/SiStripApvShotCleaner.cc b/RecoLocalTracker/SiStripClusterizer/src/SiStripApvShotCleaner.cc index f3697ee277a95..d9459df051eac 100644 --- a/RecoLocalTracker/SiStripClusterizer/src/SiStripApvShotCleaner.cc +++ b/RecoLocalTracker/SiStripClusterizer/src/SiStripApvShotCleaner.cc @@ -2,7 +2,6 @@ #include #include - //Uncomment the following #define to have print debug //#define DEBUGME diff --git a/RecoLocalTracker/SiStripZeroSuppression/src/SiStripRawProcessingFactory.cc b/RecoLocalTracker/SiStripZeroSuppression/src/SiStripRawProcessingFactory.cc index 406c47c3ab3bc..b5619491e6fcd 100644 --- a/RecoLocalTracker/SiStripZeroSuppression/src/SiStripRawProcessingFactory.cc +++ b/RecoLocalTracker/SiStripZeroSuppression/src/SiStripRawProcessingFactory.cc @@ -1,8 +1,6 @@ #include - - - #include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripRawProcessingFactory.h" +#include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripRawProcessingFactory.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripRawProcessingAlgorithms.h" diff --git a/RecoMuon/TrackingTools/src/MuonTrackLoader.cc b/RecoMuon/TrackingTools/src/MuonTrackLoader.cc index 3dfa9e3e8ce86..722bbfc8722cb 100644 --- a/RecoMuon/TrackingTools/src/MuonTrackLoader.cc +++ b/RecoMuon/TrackingTools/src/MuonTrackLoader.cc @@ -8,9 +8,7 @@ #include - - - #include "RecoMuon/TrackingTools/interface/MuonTrackLoader.h" +#include "RecoMuon/TrackingTools/interface/MuonTrackLoader.h" #include "RecoMuon/TrackingTools/interface/MuonPatternRecoDumper.h" #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h" @@ -298,14 +296,14 @@ OrphanHandle MuonTrackLoader::loadTracks(TrajectoryContai auto const& hit = (*recHitCollection)[ih]; auto hits = MuonTrackLoader::unpackHit(hit); for (auto hh : hits) { - if - UNLIKELY(!track.appendHitPattern(*hh, ttopo)) break; + if UNLIKELY (!track.appendHitPattern(*hh, ttopo)) + break; } if (theUpdatingAtVtx && updateResult.first) { for (auto hh : hits) { - if - UNLIKELY(!updateResult.second.appendHitPattern(*hh, ttopo)) break; + if UNLIKELY (!updateResult.second.appendHitPattern(*hh, ttopo)) + break; } } } @@ -618,14 +616,14 @@ OrphanHandle MuonTrackLoader::loadTracks( auto const& hit = (*recHitCollection)[ih]; auto hits = MuonTrackLoader::unpackHit(hit); for (auto hh : hits) { - if - UNLIKELY(!track.appendHitPattern(*hh, ttopo)) break; + if UNLIKELY (!track.appendHitPattern(*hh, ttopo)) + break; } if (theUpdatingAtVtx && updateResult.first) { for (auto hh : hits) { - if - UNLIKELY(!updateResult.second.appendHitPattern(*hh, ttopo)) break; + if UNLIKELY (!updateResult.second.appendHitPattern(*hh, ttopo)) + break; } } } diff --git a/RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc b/RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc index 1c20835e499f4..1958695182918 100644 --- a/RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc +++ b/RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc @@ -26,7 +26,7 @@ #include - #include +#include #include #include "FWCore/Framework/interface/Frameworkfwd.h" diff --git a/RecoPPS/Local/src/CTPPSDiamondRecHitProducerAlgorithm.cc b/RecoPPS/Local/src/CTPPSDiamondRecHitProducerAlgorithm.cc index bd7d3ae5edbf7..00153c916af71 100644 --- a/RecoPPS/Local/src/CTPPSDiamondRecHitProducerAlgorithm.cc +++ b/RecoPPS/Local/src/CTPPSDiamondRecHitProducerAlgorithm.cc @@ -8,10 +8,8 @@ #include - - #include "FWCore/Utilities/interface/isFinite.h" - #include "RecoPPS/Local/interface/CTPPSDiamondRecHitProducerAlgorithm.h" +#include "RecoPPS/Local/interface/CTPPSDiamondRecHitProducerAlgorithm.h" //---------------------------------------------------------------------------------------------------- diff --git a/RecoPPS/Local/src/RPixPlaneCombinatoryTracking.cc b/RecoPPS/Local/src/RPixPlaneCombinatoryTracking.cc index 5052af06df23e..f2966bc4d4f18 100644 --- a/RecoPPS/Local/src/RPixPlaneCombinatoryTracking.cc +++ b/RecoPPS/Local/src/RPixPlaneCombinatoryTracking.cc @@ -5,7 +5,6 @@ #include #include - #include "DataFormats/Math/interface/Error.h" #include "DataFormats/Math/interface/AlgebraicROOTObjects.h" #include "CondFormats/PPSObjects/interface/CTPPSPixelIndices.h" diff --git a/RecoPPS/Local/src/TotemTimingRecHitProducerAlgorithm.cc b/RecoPPS/Local/src/TotemTimingRecHitProducerAlgorithm.cc index b67b9f0b120f0..8767063855025 100644 --- a/RecoPPS/Local/src/TotemTimingRecHitProducerAlgorithm.cc +++ b/RecoPPS/Local/src/TotemTimingRecHitProducerAlgorithm.cc @@ -13,7 +13,7 @@ #include - #include +#include //---------------------------------------------------------------------------------------------------- diff --git a/RecoParticleFlow/PFClusterProducer/plugins/Cluster3DPCACalculator.cc b/RecoParticleFlow/PFClusterProducer/plugins/Cluster3DPCACalculator.cc index 470a968486f5a..1d8b9fe8cc540 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/Cluster3DPCACalculator.cc +++ b/RecoParticleFlow/PFClusterProducer/plugins/Cluster3DPCACalculator.cc @@ -4,7 +4,7 @@ #include #include - #include +#include #include "vdt/vdtMath.h" diff --git a/RecoParticleFlow/PFClusterProducer/plugins/CorrectedECALPFClusterProducer.cc b/RecoParticleFlow/PFClusterProducer/plugins/CorrectedECALPFClusterProducer.cc index 3cba7cc451761..d82b65071aa7e 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/CorrectedECALPFClusterProducer.cc +++ b/RecoParticleFlow/PFClusterProducer/plugins/CorrectedECALPFClusterProducer.cc @@ -4,9 +4,7 @@ // user include files #include - - - #include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/Event.h" diff --git a/RecoParticleFlow/PFClusterProducer/plugins/PFClusterProducer.cc b/RecoParticleFlow/PFClusterProducer/plugins/PFClusterProducer.cc index 7171d12450cf5..7da97f3930427 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/PFClusterProducer.cc +++ b/RecoParticleFlow/PFClusterProducer/plugins/PFClusterProducer.cc @@ -1,9 +1,7 @@ #include "PFClusterProducer.h" +#include - #include - - #ifdef PFLOW_DEBUG #define LOGVERB(x) edm::LogVerbatim(x) #define LOGWARN(x) edm::LogWarning(x) diff --git a/RecoParticleFlow/PFProducer/plugins/importers/EGPhotonImporter.cc b/RecoParticleFlow/PFProducer/plugins/importers/EGPhotonImporter.cc index 8b8f4e24d66ce..3f32bdd3c9746 100644 --- a/RecoParticleFlow/PFProducer/plugins/importers/EGPhotonImporter.cc +++ b/RecoParticleFlow/PFProducer/plugins/importers/EGPhotonImporter.cc @@ -8,7 +8,7 @@ #include - #include +#include class EGPhotonImporter : public BlockElementImporterBase { public: @@ -48,16 +48,16 @@ EGPhotonImporter::EGPhotonImporter(const edm::ParameterSet& conf, edm::ConsumesC const float loose_hoe = selDef.getParameter("LooseHoverE"); const float combIso = selDef.getParameter("combIsoConstTerm"); _selector = std::make_unique((float)_selectionChoice, - minEt, - trackIso_const, - trackIso_slope, - ecalIso_const, - ecalIso_slope, - hcalIso_const, - hcalIso_slope, - hoe, - combIso, - loose_hoe); + minEt, + trackIso_const, + trackIso_slope, + ecalIso_const, + ecalIso_slope, + hcalIso_const, + hcalIso_slope, + hoe, + combIso, + loose_hoe); } void EGPhotonImporter::importToBlock(const edm::Event& e, BlockElementImporterBase::ElementList& elems) const { diff --git a/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporter.cc b/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporter.cc index 4ae1cce481f0f..ba626de503260 100644 --- a/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporter.cc +++ b/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporter.cc @@ -1,13 +1,11 @@ #include - - #include "DataFormats/Common/interface/ValueMap.h" #include "DataFormats/MuonReco/interface/Muon.h" #include "DataFormats/ParticleFlowReco/interface/PFBlockElementTrack.h" #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h" #include "DataFormats/TrackReco/interface/Track.h" - #include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "RecoParticleFlow/PFProducer/interface/BlockElementImporterBase.h" #include "RecoParticleFlow/PFProducer/interface/PFMuonAlgo.h" #include "RecoParticleFlow/PFTracking/interface/PFTrackAlgoTools.h" diff --git a/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporterWithVeto.cc b/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporterWithVeto.cc index 15342709a6982..d1f6285eb0788 100644 --- a/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporterWithVeto.cc +++ b/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporterWithVeto.cc @@ -1,13 +1,11 @@ #include - - #include "DataFormats/Common/interface/ValueMap.h" #include "DataFormats/MuonReco/interface/Muon.h" #include "DataFormats/ParticleFlowReco/interface/PFBlockElementTrack.h" #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h" #include "DataFormats/TrackReco/interface/Track.h" - #include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "RecoParticleFlow/PFProducer/interface/BlockElementImporterBase.h" #include "RecoParticleFlow/PFProducer/interface/PFMuonAlgo.h" #include "RecoParticleFlow/PFTracking/interface/PFTrackAlgoTools.h" diff --git a/RecoParticleFlow/PFProducer/plugins/importers/SuperClusterImporter.cc b/RecoParticleFlow/PFProducer/plugins/importers/SuperClusterImporter.cc index 7526035a7d1d3..aa39240af1a2d 100644 --- a/RecoParticleFlow/PFProducer/plugins/importers/SuperClusterImporter.cc +++ b/RecoParticleFlow/PFProducer/plugins/importers/SuperClusterImporter.cc @@ -16,7 +16,7 @@ inline double ptFast(const double energy, const math::XYZPoint& position, const #include - #include +#include class SuperClusterImporter : public BlockElementImporterBase { public: diff --git a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc index b45bd5df3d4b6..1303926c8fbc6 100644 --- a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc @@ -1812,7 +1812,7 @@ reco::SuperCluster PFEGammaAlgo::buildRefinedSuperCluster(const PFEGammaAlgo::Pr std::vector psClusterPointers; psClusterPointers.reserve(psclusters.size()); - for (auto const& psc : psclusters) { + for (auto const& psc : psclusters) { psClusterPointers.push_back(psc->clusterRef().get()); } auto calibratedEnergies = thePFEnergyCalibration_.calibrateEndcapClusterEnergies( diff --git a/RecoParticleFlow/PFProducer/src/PFMuonAlgo.cc b/RecoParticleFlow/PFProducer/src/PFMuonAlgo.cc index b2d555c8d305c..51e46d238c2f1 100644 --- a/RecoParticleFlow/PFProducer/src/PFMuonAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFMuonAlgo.cc @@ -10,7 +10,6 @@ #include #include - using namespace std; using namespace reco; using namespace boost; diff --git a/RecoParticleFlow/PFTracking/plugins/HGCalTrackCollectionProducer.cc b/RecoParticleFlow/PFTracking/plugins/HGCalTrackCollectionProducer.cc index a7213cd1302d5..043a0b2b4e4cb 100644 --- a/RecoParticleFlow/PFTracking/plugins/HGCalTrackCollectionProducer.cc +++ b/RecoParticleFlow/PFTracking/plugins/HGCalTrackCollectionProducer.cc @@ -40,7 +40,7 @@ #include - #include +#include class HGCalTrackCollectionProducer : public edm::stream::EDProducer<> { public: diff --git a/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc b/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc index ef8f7ab5c00d5..a3a4c16e6faea 100644 --- a/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc +++ b/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc @@ -18,9 +18,7 @@ #include - - - #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" +#include "DataFormats/EgammaCandidates/interface/GsfElectron.h" #include "DataFormats/EgammaReco/interface/ElectronSeed.h" #include "DataFormats/GsfTrackReco/interface/GsfTrack.h" #include "DataFormats/ParticleFlowReco/interface/GsfPFRecTrack.h" @@ -1115,10 +1113,10 @@ void PFElecTkProducer::beginRun(const edm::Run& run, const EventSetup& iSetup) { TransientTrackBuilder thebuilder = *(builder.product()); convBremFinder_ = std::make_unique(thebuilder, - mvaConvBremFinderIDBarrelLowPt_, - mvaConvBremFinderIDBarrelHighPt_, - mvaConvBremFinderIDEndcapsLowPt_, - mvaConvBremFinderIDEndcapsHighPt_); + mvaConvBremFinderIDBarrelLowPt_, + mvaConvBremFinderIDBarrelHighPt_, + mvaConvBremFinderIDEndcapsLowPt_, + mvaConvBremFinderIDEndcapsHighPt_); } // ------------ method called once each job just after ending the event loop ------------ diff --git a/RecoParticleFlow/PFTracking/src/PFDisplacedVertexCandidateFinder.cc b/RecoParticleFlow/PFTracking/src/PFDisplacedVertexCandidateFinder.cc index 3f4ca6a7a9fdc..7b21f1b043a2b 100644 --- a/RecoParticleFlow/PFTracking/src/PFDisplacedVertexCandidateFinder.cc +++ b/RecoParticleFlow/PFTracking/src/PFDisplacedVertexCandidateFinder.cc @@ -1,8 +1,6 @@ #include - - - #include "RecoParticleFlow/PFTracking/interface/PFDisplacedVertexCandidateFinder.h" +#include "RecoParticleFlow/PFTracking/interface/PFDisplacedVertexCandidateFinder.h" #include "DataFormats/GeometryVector/interface/GlobalVector.h" #include "DataFormats/TrackReco/interface/Track.h" diff --git a/RecoParticleFlow/PFTracking/src/PFDisplacedVertexFinder.cc b/RecoParticleFlow/PFTracking/src/PFDisplacedVertexFinder.cc index 61af110b96c0b..cbdf10387c375 100644 --- a/RecoParticleFlow/PFTracking/src/PFDisplacedVertexFinder.cc +++ b/RecoParticleFlow/PFTracking/src/PFDisplacedVertexFinder.cc @@ -1,8 +1,6 @@ #include - - - #include "RecoParticleFlow/PFTracking/interface/PFDisplacedVertexFinder.h" +#include "RecoParticleFlow/PFTracking/interface/PFDisplacedVertexFinder.h" #include "RecoParticleFlow/PFTracking/interface/PFTrackAlgoTools.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/RecoPixelVertexing/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc b/RecoPixelVertexing/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc index 7ed699305b29b..4a71ff6428798 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc +++ b/RecoPixelVertexing/PixelLowPtUtilities/bin/PixelClusterShapeExtractor.cc @@ -33,7 +33,7 @@ #include #include - #include +#include #include diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronProducer.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronProducer.cc index 0366e587fb445..4aeacced9e497 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronProducer.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronProducer.cc @@ -51,7 +51,7 @@ #include #include #include - #include +#include #include class PFRecoTauChargedHadronProducer : public edm::stream::EDProducer<> { diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolation.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolation.cc index 6f1acf0b365dc..608bfdb1456e5 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolation.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolation.cc @@ -8,7 +8,7 @@ #include "RecoTauTag/RecoTau/interface/ConeTools.h" #include "RecoTauTag/RecoTau/interface/RecoTauQualityCuts.h" #include "RecoTauTag/RecoTau/interface/RecoTauVertexAssociator.h" - #include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h" +#include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h" #include #include diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolationContainer.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolationContainer.cc index c49355dfc4b81..4e42933c777d9 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolationContainer.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolationContainer.cc @@ -8,7 +8,7 @@ #include "RecoTauTag/RecoTau/interface/ConeTools.h" #include "RecoTauTag/RecoTau/interface/RecoTauQualityCuts.h" #include "RecoTauTag/RecoTau/interface/RecoTauVertexAssociator.h" - #include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h" +#include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h" #include #include diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByNProngs.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByNProngs.cc index 9ad8a0b99871f..521e35ef303f3 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByNProngs.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByNProngs.cc @@ -3,11 +3,10 @@ #include #include - - #include +#include #include "DataFormats/VertexReco/interface/Vertex.h" - #include "RecoTauTag/RecoTau/interface/RecoTauQualityCuts.h" +#include "RecoTauTag/RecoTau/interface/RecoTauQualityCuts.h" #include "RecoTauTag/RecoTau/interface/RecoTauVertexAssociator.h" /* class PFRecoTauDiscriminationByNProngs diff --git a/RecoTauTag/RecoTau/plugins/RecoTauPiZeroProducer.cc b/RecoTauTag/RecoTau/plugins/RecoTauPiZeroProducer.cc index 2c5fc24ffaca6..987c28c119fbc 100644 --- a/RecoTauTag/RecoTau/plugins/RecoTauPiZeroProducer.cc +++ b/RecoTauTag/RecoTau/plugins/RecoTauPiZeroProducer.cc @@ -17,7 +17,6 @@ #include #include - #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ESHandle.h" diff --git a/RecoTauTag/RecoTau/plugins/RecoTauProducer.cc b/RecoTauTag/RecoTau/plugins/RecoTauProducer.cc index 50c7718aceac7..c64ba60e3c275 100644 --- a/RecoTauTag/RecoTau/plugins/RecoTauProducer.cc +++ b/RecoTauTag/RecoTau/plugins/RecoTauProducer.cc @@ -21,7 +21,6 @@ #include #include - #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ESHandle.h" diff --git a/RecoTauTag/RecoTau/plugins/TauDiscriminantCutMultiplexer.cc b/RecoTauTag/RecoTau/plugins/TauDiscriminantCutMultiplexer.cc index 72ccf24168ed8..c568e0ea5b64e 100644 --- a/RecoTauTag/RecoTau/plugins/TauDiscriminantCutMultiplexer.cc +++ b/RecoTauTag/RecoTau/plugins/TauDiscriminantCutMultiplexer.cc @@ -23,10 +23,8 @@ #include #include +#include - #include - - #include "CondFormats/PhysicsToolsObjects/interface/PhysicsTGraphPayload.h" #include "CondFormats/DataRecord/interface/PhysicsTGraphPayloadRcd.h" #include "CondFormats/PhysicsToolsObjects/interface/PhysicsTFormulaPayload.h" diff --git a/RecoTauTag/RecoTau/src/PFTauPrimaryVertexProducerBase.cc b/RecoTauTag/RecoTau/src/PFTauPrimaryVertexProducerBase.cc index 88e6c50d0e340..60a26365b90bc 100644 --- a/RecoTauTag/RecoTau/src/PFTauPrimaryVertexProducerBase.cc +++ b/RecoTauTag/RecoTau/src/PFTauPrimaryVertexProducerBase.cc @@ -192,7 +192,7 @@ void PFTauPrimaryVertexProducerBase::produce(edm::Event& iEvent, const edm::Even TransientVertex transVtx; std::vector transTracks; transTracks.reserve(nonTauTracks.size()); - for (const auto track : nonTauTracks) { + for (const auto track : nonTauTracks) { transTracks.push_back(transTrackBuilder->build(*track)); } bool fitOK(true); diff --git a/RecoTauTag/RecoTau/src/RecoTauCommonUtilities.cc b/RecoTauTag/RecoTau/src/RecoTauCommonUtilities.cc index e729865cec0b9..582649b850462 100644 --- a/RecoTauTag/RecoTau/src/RecoTauCommonUtilities.cc +++ b/RecoTauTag/RecoTau/src/RecoTauCommonUtilities.cc @@ -63,7 +63,7 @@ namespace reco { std::vector pfCandidates(const Jet& jet, const std::vector& particleIds, bool sort) { std::vector pdgIds; pdgIds.reserve(particleIds.size()); - for (auto particleId : particleIds) + for (auto particleId : particleIds) pdgIds.push_back(translateTypeToAbsPdgId(particleId)); return pfCandidatesByPdgId(jet, pdgIds, sort); } diff --git a/RecoTracker/CkfPattern/plugins/TrajectorySegmentBuilder.cc b/RecoTracker/CkfPattern/plugins/TrajectorySegmentBuilder.cc index 7204e311b5d55..ea1e914dfa6c8 100644 --- a/RecoTracker/CkfPattern/plugins/TrajectorySegmentBuilder.cc +++ b/RecoTracker/CkfPattern/plugins/TrajectorySegmentBuilder.cc @@ -96,26 +96,25 @@ TrajectorySegmentBuilder::TempTrajectoryContainer TrajectorySegmentBuilder::segm ++ngrp; int nhit(0); for (auto const& m : gr.measurements()) - if - LIKELY(m.recHitR().isValid()) nhit++; + if LIKELY (m.recHitR().isValid()) + nhit++; if (nhit > 1) ncomb *= nhit; - if - UNLIKELY(ncomb > MAXCOMB) { - edm::LogInfo("TrajectorySegmentBuilder") - << " found " << measGroups.size() << " groups and more than " << static_cast(MAXCOMB) - << " combinations - limiting to " << (ngrp - 1) << " groups"; - truncate = true; + if UNLIKELY (ncomb > MAXCOMB) { + edm::LogInfo("TrajectorySegmentBuilder") + << " found " << measGroups.size() << " groups and more than " << static_cast(MAXCOMB) + << " combinations - limiting to " << (ngrp - 1) << " groups"; + truncate = true; - statCount.truncated(); + statCount.truncated(); - break; - } + break; + } } // cout << "Groups / combinations = " << measGroups.size() << " " << ncomb << endl; - if - UNLIKELY(truncate && ngrp > 0) measGroups.resize(ngrp - 1); + if UNLIKELY (truncate && ngrp > 0) + measGroups.resize(ngrp - 1); #endif @@ -169,8 +168,8 @@ TrajectorySegmentBuilder::TempTrajectoryContainer TrajectorySegmentBuilder::segm TempTrajectoryContainer candidates = addGroup(startingTrajectory, measGroups.begin(), measGroups.end()); - if - UNLIKELY(theDbgFlg) cout << "TSB: back with " << candidates.size() << " candidates" << endl; + if UNLIKELY (theDbgFlg) + cout << "TSB: back with " << candidates.size() << " candidates" << endl; // // add invalid hit - try to get first detector hit by the extrapolation @@ -178,8 +177,8 @@ TrajectorySegmentBuilder::TempTrajectoryContainer TrajectorySegmentBuilder::segm updateWithInvalidHit(startingTrajectory, measGroups, candidates); - if - UNLIKELY(theDbgFlg) cout << "TSB: " << candidates.size() << " candidates after invalid hit" << endl; + if UNLIKELY (theDbgFlg) + cout << "TSB: " << candidates.size() << " candidates after invalid hit" << endl; statCount.incr(measGroups.size(), candidates.size(), theLockedHits.size()); @@ -219,19 +218,18 @@ TrajectorySegmentBuilder::TempTrajectoryContainer TrajectorySegmentBuilder::addG vector ret; if (begin == end) { //std::cout << "TrajectorySegmentBuilder::addGroup" << " traj.empty()=" << traj.empty() << "EMPTY" << std::endl; - if - UNLIKELY(theDbgFlg) cout << "TSB::addGroup : no groups left" << endl; + if UNLIKELY (theDbgFlg) + cout << "TSB::addGroup : no groups left" << endl; if (!traj.empty()) ret.push_back(traj); return ret; } - if - UNLIKELY(theDbgFlg) - cout << "TSB::addGroup : traj.size() = " << traj.measurements().size() << " first group at " - << &(*begin) - // << " nr. of candidates = " << candidates.size() - << endl; + if UNLIKELY (theDbgFlg) + cout << "TSB::addGroup : traj.size() = " << traj.measurements().size() << " first group at " + << &(*begin) + // << " nr. of candidates = " << candidates.size() + << endl; TempTrajectoryContainer updatedTrajectories; updatedTrajectories.reserve(2); @@ -243,9 +241,8 @@ TrajectorySegmentBuilder::TempTrajectoryContainer TrajectorySegmentBuilder::addG } else { updateCandidates(traj, begin->measurements(), updatedTrajectories); } - if - UNLIKELY(theDbgFlg) - cout << "TSB::addGroup : updating with first group - " << updatedTrajectories.size() << " trajectories" << endl; + if UNLIKELY (theDbgFlg) + cout << "TSB::addGroup : updating with first group - " << updatedTrajectories.size() << " trajectories" << endl; } else { auto&& meas = redoMeasurements(traj, begin->detGroup()); if (!meas.empty()) { @@ -254,9 +251,8 @@ TrajectorySegmentBuilder::TempTrajectoryContainer TrajectorySegmentBuilder::addG } else { updateCandidates(traj, meas, updatedTrajectories); } - if - UNLIKELY(theDbgFlg) - cout << "TSB::addGroup : updating" << updatedTrajectories.size() << " trajectories-1" << endl; + if UNLIKELY (theDbgFlg) + cout << "TSB::addGroup : updating" << updatedTrajectories.size() << " trajectories-1" << endl; } } // keep old trajectory @@ -266,25 +262,22 @@ TrajectorySegmentBuilder::TempTrajectoryContainer TrajectorySegmentBuilder::addG if (begin + 1 != end) { ret.reserve(4); // a good upper bound for (auto const& ut : updatedTrajectories) { - if - UNLIKELY(theDbgFlg) - cout << "TSB::addGroup : trying to extend candidate at " << &ut << " size " << ut.measurements().size() << endl; + if UNLIKELY (theDbgFlg) + cout << "TSB::addGroup : trying to extend candidate at " << &ut << " size " << ut.measurements().size() << endl; vector&& finalTrajectories = addGroup(ut, begin + 1, end); - if - UNLIKELY(theDbgFlg) - cout << "TSB::addGroup : " << finalTrajectories.size() << " finalised candidates before cleaning" << endl; + if UNLIKELY (theDbgFlg) + cout << "TSB::addGroup : " << finalTrajectories.size() << " finalised candidates before cleaning" << endl; //B.M. to be ported later // V.I. only mark invalidate cleanCandidates(finalTrajectories); - if - UNLIKELY(theDbgFlg) { - int ntf = 0; - for (auto const& t : finalTrajectories) - if (t.isValid()) - ++ntf; - cout << "TSB::addGroup : got " << ntf << " finalised candidates" << endl; - } + if UNLIKELY (theDbgFlg) { + int ntf = 0; + for (auto const& t : finalTrajectories) + if (t.isValid()) + ++ntf; + cout << "TSB::addGroup : got " << ntf << " finalised candidates" << endl; + } for (auto& t : finalTrajectories) if (t.isValid()) @@ -342,8 +335,8 @@ vector TrajectorySegmentBuilder::redoMeasurements(const T // // loop over all dets // - if - UNLIKELY(theDbgFlg) cout << "TSB::redoMeasurements : nr. of measurements / group ="; + if UNLIKELY (theDbgFlg) + cout << "TSB::redoMeasurements : nr. of measurements / group ="; tracking::TempMeasurements tmps; @@ -351,8 +344,8 @@ vector TrajectorySegmentBuilder::redoMeasurements(const T pair compat = GeomDetCompatibilityChecker().isCompatible( det.det(), traj.lastMeasurement().updatedState(), theGeomPropagator, theEstimator); - if - UNLIKELY(theDbgFlg && !compat.first) std::cout << " 0"; + if UNLIKELY (theDbgFlg && !compat.first) + std::cout << " 0"; if (!compat.first) continue; @@ -363,13 +356,13 @@ vector TrajectorySegmentBuilder::redoMeasurements(const T for (std::size_t i = 0; i != tmps.size(); ++i) result.emplace_back(compat.second, std::move(tmps.hits[i]), tmps.distances[i], &theLayer); - if - UNLIKELY(theDbgFlg) std::cout << " " << tmps.size(); + if UNLIKELY (theDbgFlg) + std::cout << " " << tmps.size(); tmps.clear(); } - if - UNLIKELY(theDbgFlg) cout << endl; + if UNLIKELY (theDbgFlg) + cout << endl; std::sort(result.begin(), result.end(), TrajMeasLessEstim()); @@ -402,10 +395,9 @@ void TrajectorySegmentBuilder::updateWithInvalidHit(TempTrajectory& traj, // add the hit candidates.push_back(traj); updateTrajectory(candidates.back(), *im); - if - UNLIKELY(theDbgFlg) - cout << "TrajectorySegmentBuilder::updateWithInvalidHit " - << "added inactive hit" << endl; + if UNLIKELY (theDbgFlg) + cout << "TrajectorySegmentBuilder::updateWithInvalidHit " + << "added inactive hit" << endl; return; } } @@ -424,8 +416,8 @@ void TrajectorySegmentBuilder::updateWithInvalidHit(TempTrajectory& traj, for (auto im = measurements.rbegin(); im != measurements.rend(); ++im) { // only use invalid hits auto const& hit = im->recHitR(); - if - LIKELY(hit.isValid()) continue; + if LIKELY (hit.isValid()) + continue; // check, if the extrapolation traverses the Det auto const& predState = im->predictedState(); @@ -437,16 +429,14 @@ void TrajectorySegmentBuilder::updateWithInvalidHit(TempTrajectory& traj, } } } - if - UNLIKELY(theDbgFlg && iteration == 0) - cout << "TrajectorySegmentBuilder::updateWithInvalidHit: " - << " did not find invalid hit on 1st iteration" << endl; + if UNLIKELY (theDbgFlg && iteration == 0) + cout << "TrajectorySegmentBuilder::updateWithInvalidHit: " + << " did not find invalid hit on 1st iteration" << endl; } - if - UNLIKELY(theDbgFlg) - cout << "TrajectorySegmentBuilder::updateWithInvalidHit: " - << " did not find invalid hit" << endl; + if UNLIKELY (theDbgFlg) + cout << "TrajectorySegmentBuilder::updateWithInvalidHit: " + << " did not find invalid hit" << endl; } vector TrajectorySegmentBuilder::unlockedMeasurements(const vector& measurements) const { @@ -459,20 +449,19 @@ vector TrajectorySegmentBuilder::unlockedMeasurements(con for (auto const& m : measurements) { auto const& testHit = m.recHitR(); - if - UNLIKELY(!testHit.isValid()) continue; + if UNLIKELY (!testHit.isValid()) + continue; bool found(false); - if - LIKELY(theLockHits) { - for (auto const& h : theLockedHits) { - if (h->hit()->sharesInput(testHit.hit(), TrackingRecHit::all)) { - found = true; - break; - } + if LIKELY (theLockHits) { + for (auto const& h : theLockedHits) { + if (h->hit()->sharesInput(testHit.hit(), TrackingRecHit::all)) { + found = true; + break; } } - if - LIKELY(!found) result.push_back(m); + } + if LIKELY (!found) + result.push_back(m); } return result; } diff --git a/RecoTracker/CkfPattern/src/CkfTrajectoryBuilder.cc b/RecoTracker/CkfPattern/src/CkfTrajectoryBuilder.cc index f2712492a150e..36984bfd67fef 100644 --- a/RecoTracker/CkfPattern/src/CkfTrajectoryBuilder.cc +++ b/RecoTracker/CkfPattern/src/CkfTrajectoryBuilder.cc @@ -328,19 +328,18 @@ void CkfTrajectoryBuilder::findCompatibleMeasurements(const TrajectorySeed& seed TSOS stateToUse = stateAndLayers.first; //Added protection before asking for the lastLayer on the trajectory - if - UNLIKELY(!traj.empty() && (*il) == traj.lastLayer()) { - LogDebug("CkfPattern") << " self propagating in findCompatibleMeasurements.\n from: \n" << stateToUse; - //self navigation case - // go to a middle point first - TransverseImpactPointExtrapolator middle; - GlobalPoint center(0, 0, 0); - stateToUse = middle.extrapolate(stateToUse, center, *fwdPropagator); - - if (!stateToUse.isValid()) - continue; - LogDebug("CkfPattern") << "to: " << stateToUse; - } + if UNLIKELY (!traj.empty() && (*il) == traj.lastLayer()) { + LogDebug("CkfPattern") << " self propagating in findCompatibleMeasurements.\n from: \n" << stateToUse; + //self navigation case + // go to a middle point first + TransverseImpactPointExtrapolator middle; + GlobalPoint center(0, 0, 0); + stateToUse = middle.extrapolate(stateToUse, center, *fwdPropagator); + + if (!stateToUse.isValid()) + continue; + LogDebug("CkfPattern") << "to: " << stateToUse; + } LayerMeasurements layerMeasurements(theMeasurementTracker->measurementTracker(), *theMeasurementTracker); std::vector&& tmp = diff --git a/RecoTracker/ConversionSeedGenerators/plugins/CombinedHitPairGeneratorForPhotonConversion.cc b/RecoTracker/ConversionSeedGenerators/plugins/CombinedHitPairGeneratorForPhotonConversion.cc index c07ad874c3c3d..cd50047445a9d 100644 --- a/RecoTracker/ConversionSeedGenerators/plugins/CombinedHitPairGeneratorForPhotonConversion.cc +++ b/RecoTracker/ConversionSeedGenerators/plugins/CombinedHitPairGeneratorForPhotonConversion.cc @@ -1,12 +1,11 @@ #include "CombinedHitPairGeneratorForPhotonConversion.h" - - #include +#include #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/Framework/interface/Event.h" - #include "HitPairGeneratorFromLayerPairForPhotonConversion.h" +#include "HitPairGeneratorFromLayerPairForPhotonConversion.h" #include "FWCore/Utilities/interface/RunningAverage.h" namespace { diff --git a/RecoTracker/FinalTrackSelectors/plugins/TrackMerger.cc b/RecoTracker/FinalTrackSelectors/plugins/TrackMerger.cc index 1b04b55e49b69..fe36eba89fdf1 100644 --- a/RecoTracker/FinalTrackSelectors/plugins/TrackMerger.cc +++ b/RecoTracker/FinalTrackSelectors/plugins/TrackMerger.cc @@ -193,7 +193,7 @@ void TrackMerger::sortByHitPosition(const GlobalVector &v, for (unsigned int i = 0; i < nhits; ++i) ttrh[i] = theBuilder->build(hits[i]); std::sort(ttrh.begin(), ttrh.end(), GlobalMomentumSort(v)); - for (const auto& hit : ttrh) + for (const auto &hit : ttrh) ownHits.push_back(*hit); } diff --git a/RecoTracker/MeasurementDet/plugins/TkStripMeasurementDet.cc b/RecoTracker/MeasurementDet/plugins/TkStripMeasurementDet.cc index 6d655fb7d712f..3a5517e7d857e 100644 --- a/RecoTracker/MeasurementDet/plugins/TkStripMeasurementDet.cc +++ b/RecoTracker/MeasurementDet/plugins/TkStripMeasurementDet.cc @@ -22,8 +22,8 @@ TkStripMeasurementDet::TkStripMeasurementDet(const GeomDet* gdet, StMeasurementC // fast check if the det contains any useful cluster bool TkStripMeasurementDet::empty(const MeasurementTrackerEvent& data) const { - if - UNLIKELY((!isActive(data)) || isEmpty(data.stripData())) return true; + if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData())) + return true; const detset& detSet = data.stripData().detSet(index()); for (auto ci = detSet.begin(); ci != detSet.end(); ++ci) { @@ -39,8 +39,8 @@ bool TkStripMeasurementDet::empty(const MeasurementTrackerEvent& data) const { TkStripMeasurementDet::RecHitContainer TkStripMeasurementDet::recHits(const TrajectoryStateOnSurface& ts, const MeasurementTrackerEvent& data) const { RecHitContainer result; - if - UNLIKELY((!isActive(data)) || isEmpty(data.stripData())) return result; + if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData())) + return result; const detset& detSet = data.stripData().detSet(index()); result.reserve(detSet.size()); for (new_const_iterator ci = detSet.begin(); ci != detSet.end(); ++ci) { @@ -62,8 +62,8 @@ bool TkStripMeasurementDet::recHits(SimpleHitContainer& result, const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator& est, const MeasurementTrackerEvent& data) const { - if - UNLIKELY((!isActive(data)) || isEmpty(data.stripData())) return false; + if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData())) + return false; auto oldSize = result.size(); int utraj = specificGeomDet().specificTopology().measurementPosition(stateOnThisDet.localPosition()).x(); @@ -104,8 +104,8 @@ bool TkStripMeasurementDet::simpleRecHits(const TrajectoryStateOnSurface& stateO const MeasurementEstimator& est, const MeasurementTrackerEvent& data, std::vector& result) const { - if - UNLIKELY((!isActive(data)) || isEmpty(data.stripData())) return false; + if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData())) + return false; auto oldSize = result.size(); @@ -141,8 +141,8 @@ bool TkStripMeasurementDet::recHits(const TrajectoryStateOnSurface& stateOnThisD const MeasurementTrackerEvent& data, RecHitContainer& result, std::vector& diffs) const { - if - UNLIKELY((!isActive(data)) || isEmpty(data.stripData())) return false; + if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData())) + return false; auto oldSize = result.size(); auto const& cpepar = cpe()->getAlgoParam(specificGeomDet(), stateOnThisDet.localParameters()); diff --git a/RecoTracker/TransientTrackingRecHit/src/TkClonerImpl.cc b/RecoTracker/TransientTrackingRecHit/src/TkClonerImpl.cc index e14f6d2cfc18e..b8c2b24f19888 100644 --- a/RecoTracker/TransientTrackingRecHit/src/TkClonerImpl.cc +++ b/RecoTracker/TransientTrackingRecHit/src/TkClonerImpl.cc @@ -53,8 +53,7 @@ std::unique_ptr TkClonerImpl::operator()(Phase2TrackerRec const Phase2TrackerCluster1D& clust = hit.phase2OTCluster(); const PixelGeomDetUnit& gdu = (const PixelGeomDetUnit&)*(hit.detUnit()); auto&& params = phase2TrackerCPE->localParameters(clust, gdu, tsos); - return std::make_unique( - params.first, params.second, *hit.det(), hit.cluster()); + return std::make_unique(params.first, params.second, *hit.det(), hit.cluster()); } TrackingRecHit::ConstRecHitPointer TkClonerImpl::makeShared(SiPixelRecHit const& hit, @@ -90,8 +89,7 @@ TrackingRecHit::ConstRecHitPointer TkClonerImpl::makeShared(Phase2TrackerRecHit1 const Phase2TrackerCluster1D& clust = hit.phase2OTCluster(); const PixelGeomDetUnit& gdu = (const PixelGeomDetUnit&)*(hit.detUnit()); auto&& params = phase2TrackerCPE->localParameters(clust, gdu, tsos); - return std::make_unique( - params.first, params.second, *hit.det(), hit.cluster()); + return std::make_unique(params.first, params.second, *hit.det(), hit.cluster()); } namespace { diff --git a/RecoVertex/GhostTrackFitter/src/AnnealingGhostTrackFitter.cc b/RecoVertex/GhostTrackFitter/src/AnnealingGhostTrackFitter.cc index e6a5d8fdd6586..2d8f870e71e06 100644 --- a/RecoVertex/GhostTrackFitter/src/AnnealingGhostTrackFitter.cc +++ b/RecoVertex/GhostTrackFitter/src/AnnealingGhostTrackFitter.cc @@ -1,6 +1,6 @@ #include - #include +#include #include "RecoVertex/VertexTools/interface/GeometricAnnealing.h" diff --git a/RecoVertex/GhostTrackFitter/src/GhostTrackVertexFinder.cc b/RecoVertex/GhostTrackFitter/src/GhostTrackVertexFinder.cc index 15de17e7d6c3a..a95031d881486 100644 --- a/RecoVertex/GhostTrackFitter/src/GhostTrackVertexFinder.cc +++ b/RecoVertex/GhostTrackFitter/src/GhostTrackVertexFinder.cc @@ -4,7 +4,7 @@ #include #include - #include +#include #include #include diff --git a/RecoVertex/KalmanVertexFit/plugins/KVFTest.cc b/RecoVertex/KalmanVertexFit/plugins/KVFTest.cc index 2aee28fc9a358..c7c6be3743a7f 100644 --- a/RecoVertex/KalmanVertexFit/plugins/KVFTest.cc +++ b/RecoVertex/KalmanVertexFit/plugins/KVFTest.cc @@ -19,7 +19,6 @@ #include #include - using namespace reco; using namespace edm; using namespace std; diff --git a/RecoVertex/V0Producer/src/V0Fitter.cc b/RecoVertex/V0Producer/src/V0Fitter.cc index c5d9de7376ac7..7a5c43e8ad973 100644 --- a/RecoVertex/V0Producer/src/V0Fitter.cc +++ b/RecoVertex/V0Producer/src/V0Fitter.cc @@ -33,7 +33,7 @@ #include "CommonTools/CandUtils/interface/AddFourMomenta.h" #include "DataFormats/VertexReco/interface/Vertex.h" #include - #include +#include // pdg mass constants namespace { @@ -278,11 +278,15 @@ void V0Fitter::fitAll(const edm::Event& iEvent, } if (thePositiveRefTrack == nullptr || theNegativeRefTrack == nullptr) continue; - trajPlus = std::make_unique(thePositiveRefTrack->trajectoryStateClosestToPoint(vtxPos)); - trajMins = std::make_unique(theNegativeRefTrack->trajectoryStateClosestToPoint(vtxPos)); + trajPlus = + std::make_unique(thePositiveRefTrack->trajectoryStateClosestToPoint(vtxPos)); + trajMins = + std::make_unique(theNegativeRefTrack->trajectoryStateClosestToPoint(vtxPos)); } else { - trajPlus = std::make_unique(posTransTkPtr->trajectoryStateClosestToPoint(vtxPos)); - trajMins = std::make_unique(negTransTkPtr->trajectoryStateClosestToPoint(vtxPos)); + trajPlus = + std::make_unique(posTransTkPtr->trajectoryStateClosestToPoint(vtxPos)); + trajMins = + std::make_unique(negTransTkPtr->trajectoryStateClosestToPoint(vtxPos)); } if (trajPlus.get() == nullptr || trajMins.get() == nullptr || !trajPlus->isValid() || !trajMins->isValid()) diff --git a/TrackingTools/TrackFitters/src/KFTrajectoryFitter.cc b/TrackingTools/TrackFitters/src/KFTrajectoryFitter.cc index 4573f1abab58c..3af4db5c3c8c6 100644 --- a/TrackingTools/TrackFitters/src/KFTrajectoryFitter.cc +++ b/TrackingTools/TrackFitters/src/KFTrajectoryFitter.cc @@ -35,9 +35,8 @@ Trajectory KFTrajectoryFitter::fitOne(const TrajectorySeed& aSeed, if (hits.empty()) return Trajectory(); - if - UNLIKELY(aSeed.direction() == anyDirection) - throw cms::Exception("KFTrajectoryFitter", "TrajectorySeed::direction() requested but not set"); + if UNLIKELY (aSeed.direction() == anyDirection) + throw cms::Exception("KFTrajectoryFitter", "TrajectorySeed::direction() requested but not set"); std::unique_ptr p_cloned = SetPropagationDirection(*thePropagator, aSeed.direction()); @@ -71,113 +70,104 @@ Trajectory KFTrajectoryFitter::fitOne(const TrajectorySeed& aSeed, // if UNLIKELY(hit.det() == nullptr) continue; - if - UNLIKELY((!hit.isValid()) && hit.surface() == nullptr) { - LogDebug("TrackFitters") << " Error: invalid hit with no GeomDet attached .... skipping"; - continue; - } + if UNLIKELY ((!hit.isValid()) && hit.surface() == nullptr) { + LogDebug("TrackFitters") << " Error: invalid hit with no GeomDet attached .... skipping"; + continue; + } // if (hit.det() && hit.geographicalId()<1000U) LogDebug("TrackFitters")<< "Problem 0 det id for " << typeid(hit).name() << ' ' << hit.det()->geographicalId() ; // if (hit.isValid() && hit.geographicalId()<1000U) LogDebug("TrackFitters")<< "Problem 0 det id for " << typeid(hit).name() << ' ' << hit.det()->geographicalId(); if (hitcounter != 1) //no propagation needed for the first hit predTsos = p_cloned->propagate(currTsos, *(hit.surface())); - if - UNLIKELY(!predTsos.isValid()) { - LogDebug("TrackFitters") << "SOMETHING WRONG !" - << "\n" - << "KFTrajectoryFitter: predicted tsos not valid!\n" - << "current TSOS: " << currTsos << "\n"; - - if (hit.surface()) - LogTrace("TrackFitters") << "next Surface: " << hit.surface()->position() << "\n"; - - if (myTraj.foundHits() >= minHits_) { - LogDebug("TrackFitters") << " breaking trajectory" - << "\n"; - break; - } else { - LogDebug("TrackFitters") << " killing trajectory" - << "\n"; - return Trajectory(); - } + if UNLIKELY (!predTsos.isValid()) { + LogDebug("TrackFitters") << "SOMETHING WRONG !" + << "\n" + << "KFTrajectoryFitter: predicted tsos not valid!\n" + << "current TSOS: " << currTsos << "\n"; + + if (hit.surface()) + LogTrace("TrackFitters") << "next Surface: " << hit.surface()->position() << "\n"; + + if (myTraj.foundHits() >= minHits_) { + LogDebug("TrackFitters") << " breaking trajectory" + << "\n"; + break; + } else { + LogDebug("TrackFitters") << " killing trajectory" + << "\n"; + return Trajectory(); } + } - if - LIKELY(hit.isValid()) { - assert((hit.geographicalId() != 0U) | !hit.canImproveWithTrack()); - assert(hit.surface() != nullptr); - //update - LogTrace("TrackFitters") << "THE HIT IS VALID: updating hit with predTsos"; - assert((!hit.canImproveWithTrack()) | (nullptr != theHitCloner)); - assert((!hit.canImproveWithTrack()) | (nullptr != dynamic_cast((ihit).get()))); - auto preciseHit = theHitCloner->makeShared(ihit, predTsos); - dump(*preciseHit, hitcounter, "TrackFitters"); - assert(preciseHit->isValid()); - assert((preciseHit->geographicalId() != 0U) | (!preciseHit->canImproveWithTrack())); - assert(preciseHit->surface() != nullptr); - - if - UNLIKELY(!preciseHit->isValid()) { - LogTrace("TrackFitters") << "THE Precise HIT IS NOT VALID: using currTsos = predTsos" + if LIKELY (hit.isValid()) { + assert((hit.geographicalId() != 0U) | !hit.canImproveWithTrack()); + assert(hit.surface() != nullptr); + //update + LogTrace("TrackFitters") << "THE HIT IS VALID: updating hit with predTsos"; + assert((!hit.canImproveWithTrack()) | (nullptr != theHitCloner)); + assert((!hit.canImproveWithTrack()) | (nullptr != dynamic_cast((ihit).get()))); + auto preciseHit = theHitCloner->makeShared(ihit, predTsos); + dump(*preciseHit, hitcounter, "TrackFitters"); + assert(preciseHit->isValid()); + assert((preciseHit->geographicalId() != 0U) | (!preciseHit->canImproveWithTrack())); + assert(preciseHit->surface() != nullptr); + + if UNLIKELY (!preciseHit->isValid()) { + LogTrace("TrackFitters") << "THE Precise HIT IS NOT VALID: using currTsos = predTsos" + << "\n"; + currTsos = predTsos; + myTraj.push(TM(predTsos, ihit, 0, theGeometry->idToLayer((ihit)->geographicalId()))); + } else { + LogTrace("TrackFitters") << "THE Precise HIT IS VALID: updating currTsos" + << "\n"; + currTsos = updator()->update(predTsos, *preciseHit); + //check for valid hits with no det (refitter with constraints) + bool badState = (!currTsos.isValid()) || + (hit.geographicalId().det() == DetId::Tracker && + (std::abs(currTsos.localParameters().qbp()) > 100 || + std::abs(currTsos.localParameters().position().y()) > 1000 || + std::abs(currTsos.localParameters().position().x()) > 1000)) || + edm::isNotFinite(currTsos.localParameters().qbp()) || !currTsos.localError().posDef(); + if UNLIKELY (badState) { + if (!currTsos.isValid()) { + edm::LogError("FailedUpdate") << "updating with the hit failed. Not updating the trajectory with the hit"; + + } else if (edm::isNotFinite(currTsos.localParameters().qbp())) { + edm::LogError("TrajectoryNaN") << "Trajectory has NaN"; + + } else if (!currTsos.localError().posDef()) { + edm::LogError("TrajectoryNotPosDef") << "Trajectory covariance is not positive-definite"; + + } else { + LogTrace("FailedUpdate") << "updated state is valid but pretty bad, skipping. currTsos " << currTsos + << "\n predTsos " << predTsos; + } + myTraj.push(TM(predTsos, ihit, 0, theGeometry->idToLayer((ihit)->geographicalId()))); + //There is a no-fail policy here. So, it's time to give up + //Keep the traj with invalid TSOS so that it's clear what happened + if (myTraj.foundHits() >= minHits_) { + LogDebug("TrackFitters") << " breaking trajectory" << "\n"; - currTsos = predTsos; - myTraj.push(TM(predTsos, ihit, 0, theGeometry->idToLayer((ihit)->geographicalId()))); + break; + } else { + LogDebug("TrackFitters") << " killing trajectory" + << "\n"; + return Trajectory(); } - else { - LogTrace("TrackFitters") << "THE Precise HIT IS VALID: updating currTsos" - << "\n"; - currTsos = updator()->update(predTsos, *preciseHit); - //check for valid hits with no det (refitter with constraints) - bool badState = (!currTsos.isValid()) || - (hit.geographicalId().det() == DetId::Tracker && - (std::abs(currTsos.localParameters().qbp()) > 100 || - std::abs(currTsos.localParameters().position().y()) > 1000 || - std::abs(currTsos.localParameters().position().x()) > 1000)) || - edm::isNotFinite(currTsos.localParameters().qbp()) || !currTsos.localError().posDef(); - if - UNLIKELY(badState) { - if (!currTsos.isValid()) { - edm::LogError("FailedUpdate") - << "updating with the hit failed. Not updating the trajectory with the hit"; - - } else if (edm::isNotFinite(currTsos.localParameters().qbp())) { - edm::LogError("TrajectoryNaN") << "Trajectory has NaN"; - - } else if (!currTsos.localError().posDef()) { - edm::LogError("TrajectoryNotPosDef") << "Trajectory covariance is not positive-definite"; - - } else { - LogTrace("FailedUpdate") << "updated state is valid but pretty bad, skipping. currTsos " << currTsos - << "\n predTsos " << predTsos; - } - myTraj.push(TM(predTsos, ihit, 0, theGeometry->idToLayer((ihit)->geographicalId()))); - //There is a no-fail policy here. So, it's time to give up - //Keep the traj with invalid TSOS so that it's clear what happened - if (myTraj.foundHits() >= minHits_) { - LogDebug("TrackFitters") << " breaking trajectory" - << "\n"; - break; - } else { - LogDebug("TrackFitters") << " killing trajectory" - << "\n"; - return Trajectory(); - } - } - else { - if (preciseHit->det()) { - myTraj.push(TM(predTsos, - currTsos, - preciseHit, - estimator()->estimate(predTsos, *preciseHit).second, - theGeometry->idToLayer(preciseHit->geographicalId()))); - } else { - myTraj.push(TM(predTsos, currTsos, preciseHit, estimator()->estimate(predTsos, *preciseHit).second)); - } + } else { + if (preciseHit->det()) { + myTraj.push(TM(predTsos, + currTsos, + preciseHit, + estimator()->estimate(predTsos, *preciseHit).second, + theGeometry->idToLayer(preciseHit->geographicalId()))); + } else { + myTraj.push(TM(predTsos, currTsos, preciseHit, estimator()->estimate(predTsos, *preciseHit).second)); } } } - else { // invalid hit + } else { // invalid hit dump(hit, hitcounter, "TrackFitters"); //no update LogDebug("TrackFitters") << "THE HIT IS NOT VALID: using currTsos"