1 #ifndef JetMETCorrections_Type1MET_JetCorrExtractorT_h
2 #define JetMETCorrections_Type1MET_JetCorrExtractorT_h
33 double getCorrection(
const T& rawJet,
const std::string& jetCorrLabel,
39 <<
"Failed to access Jet corrections for = " << jetCorrLabel <<
" !!\n";
40 return jetCorrector->
correction(rawJet, evt, es);
45 if ( x > 0. )
return +1.;
46 else if ( x < 0. )
return -1.;
58 double jetCorrEtaMax = 9.9,
68 (*rawJetP4_specified) : rawJet.p4();
70 double jetCorrFactor = 1.;
71 if ( fabs(rawJetP4.eta()) < jetCorrEtaMax ) {
72 jetCorrFactor = getCorrection(rawJet, jetCorrLabel, *evt, *es);
75 modJetPolarP4.SetEta(sign(rawJetP4.eta())*jetCorrEtaMax);
80 modJet.setP4(modJetP4);
82 jetCorrFactor = getCorrection(modJet, jetCorrLabel, *evt, *es);
86 corrJetP4 *= jetCorrFactor;
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
math::XYZTLorentzVector LorentzVector
Lorentz vector.
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.