diff --git a/DataFormats/PatCandidates/src/MET.cc b/DataFormats/PatCandidates/src/MET.cc index 90074783c599a..33d7465a3a6f5 100644 --- a/DataFormats/PatCandidates/src/MET.cc +++ b/DataFormats/PatCandidates/src/MET.cc @@ -343,7 +343,8 @@ void MET::setUncShift(double px, double py, double sumEt, METUncertainty shift, // which is performed independently shift = (MET::METUncertainty)(METUncertainty::METUncertaintySize + shift + 1); const PackedMETUncertainty &ref = corrections_[METCorrectionType::Smear]; - uncertainties_[shift].set(px - ref.dpx() - this->px(), py - ref.dpy() - this->py(), sumEt - ref.dsumEt() - this->sumEt() ); + uncertainties_[shift].set( + px - ref.dpx() - this->px(), py - ref.dpy() - this->py(), sumEt - ref.dsumEt() - this->sumEt()); } else uncertainties_[shift].set(px - this->px(), py - this->py(), sumEt - this->sumEt()); } diff --git a/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h b/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h index 0e1cbe8e9a958..aac2c1b6902ab 100644 --- a/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h +++ b/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h @@ -66,14 +66,10 @@ namespace PFJetMETcorrInputProducer_namespace { // therefore general template just returns 1 // specialized template for pat::Jets returns desired userFloat value if available template - class RetrieveJerT - { - public: - RetrieveJerT(){} - float operator()(const T& jet) const - { - return 1.0; - } + class RetrieveJerT { + public: + RetrieveJerT() {} + float operator()(const T& jet) const { return 1.0; } }; } // namespace PFJetMETcorrInputProducer_namespace @@ -213,7 +209,7 @@ class PFJetMETcorrInputProducerT : public edm::stream::EDProducer<> { corrJetP4 = jetCorrExtractor_(jet, jetCorr.product(), jetCorrEtaMax_, &rawJetP4); // retrieve JER factors in case of pat::Jets (done via specialized template defined for pat::Jets) and apply it const static PFJetMETcorrInputProducer_namespace::RetrieveJerT retrieveJER{}; - corrJetP4*=retrieveJER(jet); + corrJetP4 *= retrieveJER(jet); if (corrJetP4.pt() > type1JetPtThreshold_) { reco::Candidate::LorentzVector rawJetP4offsetCorr = rawJetP4; diff --git a/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h b/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h index f58c360ffac2f..23d176a039e85 100644 --- a/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h +++ b/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h @@ -288,7 +288,7 @@ class SmearedJetProducerT : public edm::stream::EDProducer<> { } T smearedJet = jet; - SmearedJetProducer_namespace::SmearJet(smearedJet,smearFactor); + SmearedJetProducer_namespace::SmearJet(smearedJet, smearFactor); if (m_debug) { std::cout << "smeared jet (" << smearFactor << "): pt: " << smearedJet.pt() << " eta: " << smearedJet.eta() diff --git a/PhysicsTools/PatUtils/plugins/PATPFJetMETcorrInputProducer.cc b/PhysicsTools/PatUtils/plugins/PATPFJetMETcorrInputProducer.cc index cee1b876c24c7..b1559cf5cc453 100644 --- a/PhysicsTools/PatUtils/plugins/PATPFJetMETcorrInputProducer.cc +++ b/PhysicsTools/PatUtils/plugins/PATPFJetMETcorrInputProducer.cc @@ -29,8 +29,8 @@ namespace PFJetMETcorrInputProducer_namespace { else uncorrected_jet = jet.p4(); // remove JER correction factor from pat::Jets - if(jet.hasUserFloat("SmearFactor")) { - uncorrected_jet*=(1.0/jet.userFloat("SmearFactor")); + if (jet.hasUserFloat("SmearFactor")) { + uncorrected_jet *= (1.0 / jet.userFloat("SmearFactor")); } return uncorrected_jet; } @@ -40,17 +40,15 @@ namespace PFJetMETcorrInputProducer_namespace { // retrieve JER factor if it was saved previously // otherwise just return 1 template <> - class RetrieveJerT - { - public: - RetrieveJerT(){} - float operator()(const pat::Jet& jet) const - { - if(jet.hasUserFloat("SmearFactor")) { - return jet.userFloat("SmearFactor"); - } - else return 1.0; - } + class RetrieveJerT { + public: + RetrieveJerT() {} + float operator()(const pat::Jet& jet) const { + if (jet.hasUserFloat("SmearFactor")) { + return jet.userFloat("SmearFactor"); + } else + return 1.0; + } }; } // namespace PFJetMETcorrInputProducer_namespace diff --git a/PhysicsTools/PatUtils/plugins/SmearedJetProducer.cc b/PhysicsTools/PatUtils/plugins/SmearedJetProducer.cc index 90ef39157c050..27a3394760a83 100644 --- a/PhysicsTools/PatUtils/plugins/SmearedJetProducer.cc +++ b/PhysicsTools/PatUtils/plugins/SmearedJetProducer.cc @@ -3,18 +3,18 @@ #include "DataFormats/PatCandidates/interface/Jet.h" namespace SmearedJetProducer_namespace { - // template function to apply JER - template - void SmearJet(T& jet, float smearfactor) { - jet.scaleEnergy(smearfactor); - } - // template specialization for pat::Jets to store the JER factor - template <> - void SmearJet(pat::Jet& jet, float smearfactor) { - jet.scaleEnergy(smearfactor); - jet.addUserFloat("SmearFactor",smearfactor); - } -} + // template function to apply JER + template + void SmearJet(T& jet, float smearfactor) { + jet.scaleEnergy(smearfactor); + } + // template specialization for pat::Jets to store the JER factor + template <> + void SmearJet(pat::Jet& jet, float smearfactor) { + jet.scaleEnergy(smearfactor); + jet.addUserFloat("SmearFactor", smearfactor); + } +} // namespace SmearedJetProducer_namespace #include "PhysicsTools/PatUtils/interface/SmearedJetProducerT.h"