#include <L1FastjetCorrector.h>
Public Member Functions | |
virtual double | correction (const LorentzVector &fJet) const |
apply correction using Jet information only | |
virtual double | correction (const reco::Jet &fJet) const |
apply correction using Jet information only | |
virtual double | correction (const reco::Jet &fJet, const edm::Event &fEvent, const edm::EventSetup &fSetup) const |
apply correction using all event information | |
virtual bool | eventRequired () const |
if correction needs event information | |
L1FastjetCorrector (const JetCorrectorParameters &fParam, const edm::ParameterSet &fConfig) | |
virtual bool | refRequired () const |
if correction needs the jet reference | |
virtual | ~L1FastjetCorrector () |
Private Attributes | |
FactorizedJetCorrector * | mCorrector |
edm::InputTag | srcRho_ |
Definition at line 17 of file L1FastjetCorrector.h.
L1FastjetCorrector::L1FastjetCorrector | ( | const JetCorrectorParameters & | fParam, |
const edm::ParameterSet & | fConfig | ||
) |
Definition at line 23 of file L1FastjetCorrector.cc.
References JetCorrectorParameters::definitions(), and mCorrector.
: srcRho_(fConfig.getParameter<edm::InputTag>("srcRho")) { if (fParam.definitions().level() != "L1FastJet") throw cms::Exception("L1FastjetCorrector")<<" correction level: "<<fParam.definitions().level()<<" is not L1FastJet"; vector<JetCorrectorParameters> vParam; vParam.push_back(fParam); mCorrector = new FactorizedJetCorrector(vParam); }
L1FastjetCorrector::~L1FastjetCorrector | ( | ) | [virtual] |
double L1FastjetCorrector::correction | ( | const LorentzVector & | fJet | ) | const [virtual] |
apply correction using Jet information only
Implements JetCorrector.
Definition at line 45 of file L1FastjetCorrector.cc.
References Exception.
{ throw cms::Exception("EventRequired") <<"Wrong interface correction(LorentzVector), event required!"; return 1.0; }
double L1FastjetCorrector::correction | ( | const reco::Jet & | fJet | ) | const [virtual] |
apply correction using Jet information only
Implements JetCorrector.
Definition at line 54 of file L1FastjetCorrector.cc.
References Exception.
{ throw cms::Exception("EventRequired") <<"Wrong interface correction(reco::Jet), event required!"; return 1.0; }
double L1FastjetCorrector::correction | ( | const reco::Jet & | fJet, |
const edm::Event & | fEvent, | ||
const edm::EventSetup & | fSetup | ||
) | const [virtual] |
apply correction using all event information
Reimplemented from JetCorrector.
Definition at line 63 of file L1FastjetCorrector.cc.
References reco::LeafCandidate::eta(), edm::Event::getByLabel(), FactorizedJetCorrector::getCorrection(), reco::Jet::jetArea(), mCorrector, reco::LeafCandidate::pt(), query::result, rho, FactorizedJetCorrector::setJetA(), FactorizedJetCorrector::setJetEta(), FactorizedJetCorrector::setJetPt(), FactorizedJetCorrector::setRho(), and srcRho_.
{ edm::Handle<double> rho; fEvent.getByLabel(srcRho_,rho); double result(1.0); mCorrector->setJetEta(fJet.eta()); mCorrector->setJetPt(fJet.pt()); mCorrector->setJetA(fJet.jetArea()); mCorrector->setRho(*rho); result = mCorrector->getCorrection(); return result; }
virtual bool L1FastjetCorrector::eventRequired | ( | ) | const [inline, virtual] |
if correction needs event information
Implements JetCorrector.
Definition at line 36 of file L1FastjetCorrector.h.
{ return true; }
virtual bool L1FastjetCorrector::refRequired | ( | ) | const [inline, virtual] |
if correction needs the jet reference
Implements JetCorrector.
Definition at line 39 of file L1FastjetCorrector.h.
{ return false; }
Definition at line 44 of file L1FastjetCorrector.h.
Referenced by correction(), L1FastjetCorrector(), and ~L1FastjetCorrector().
edm::InputTag L1FastjetCorrector::srcRho_ [private] |
Definition at line 43 of file L1FastjetCorrector.h.
Referenced by correction().