#include <CorrectJet.h>
Public Member Functions | |
CorrectJet () | |
CorrectJet (const std::string &corrector) | |
reco::Jet | operator() (const reco::Jet &jet) const |
Returns the corrected jet. | |
void | setEventSetup (const edm::EventSetup &es) |
Private Attributes | |
const JetCorrector * | m_corrector |
std::string | m_correctorName |
Correct jets
Definition at line 16 of file CorrectJet.h.
CorrectJet::CorrectJet | ( | ) | [inline] |
Definition at line 19 of file CorrectJet.h.
{}
CorrectJet::CorrectJet | ( | const std::string & | corrector | ) | [inline] |
Definition at line 20 of file CorrectJet.h.
: m_corrector(0), m_correctorName(corrector) {}
Returns the corrected jet.
Definition at line 32 of file CorrectJet.h.
References JetCorrector::correction(), m_corrector, reco::LeafCandidate::p4(), reco::Jet::scaleEnergy(), and reco::LeafCandidate::vertex().
{ reco::Jet correctedJet(jet.p4(), jet.vertex()); if (m_corrector) correctedJet.scaleEnergy(m_corrector->correction(jet)); return correctedJet; }
void CorrectJet::setEventSetup | ( | const edm::EventSetup & | es | ) | [inline] |
Definition at line 23 of file CorrectJet.h.
References JetCorrector::getJetCorrector(), m_corrector, and m_correctorName.
Referenced by BTagPerformanceAnalyzerMC::getJetWithFlavour(), and MatchJet::matchCollections().
{ if (!m_correctorName.empty()) m_corrector = JetCorrector::getJetCorrector(m_correctorName, es); else m_corrector = 0; }
const JetCorrector* CorrectJet::m_corrector [private] |
Definition at line 41 of file CorrectJet.h.
Referenced by operator()(), and setEventSetup().
std::string CorrectJet::m_correctorName [private] |
Definition at line 42 of file CorrectJet.h.
Referenced by setEventSetup().