CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
LXXXCorrector Class Reference

#include <LXXXCorrector.h>

Inheritance diagram for LXXXCorrector:
JetCorrector

Public Member Functions

double correction (const LorentzVector &fJet) const override
 get correction using Jet information only More...
 
double correction (const reco::Jet &fJet) const override
 apply correction using Jet information only More...
 
bool eventRequired () const override
 if correction needs event information More...
 
 LXXXCorrector (const JetCorrectorParameters &fConfig, const edm::ParameterSet &fParameters)
 
bool refRequired () const override
 if correction needs the jet reference More...
 
 ~LXXXCorrector () override
 
- Public Member Functions inherited from JetCorrector
virtual double correction (const reco::Jet &fJet, const edm::Event &fEvent, const edm::EventSetup &fSetup) const
 apply correction using all event information More...
 
virtual double correction (const reco::Jet &fJet, const edm::RefToBase< reco::Jet > &fJetRef, const edm::Event &fEvent, const edm::EventSetup &fSetup) const
 apply correction using all event information More...
 
virtual double correction (const reco::Jet &fJet, const edm::RefToBase< reco::Jet > &fJetRef, const edm::Event &fEvent, const edm::EventSetup &fSetup, LorentzVector &corrected) const
 Apply vectorial correction using all event information. More...
 
 JetCorrector ()
 
virtual bool vectorialCorrection () const
 if vectorial correction is provided More...
 
virtual ~JetCorrector ()
 

Private Attributes

FactorizedJetCorrectorCalculatormCorrector
 
unsigned mLevel
 

Additional Inherited Members

- Public Types inherited from JetCorrector
typedef reco::Particle::LorentzVector LorentzVector
 
- Static Public Member Functions inherited from JetCorrector
static const JetCorrectorgetJetCorrector (const std::string &fName, const edm::EventSetup &fSetup)
 retrieve corrector from the event setup. troughs exception if something is missing More...
 

Detailed Description

Definition at line 15 of file LXXXCorrector.h.

Constructor & Destructor Documentation

◆ LXXXCorrector()

LXXXCorrector::LXXXCorrector ( const JetCorrectorParameters fConfig,
const edm::ParameterSet fParameters 
)

Definition at line 19 of file LXXXCorrector.cc.

19  {
20  string level = fParam.definitions().level();
21  if (level == "L2Relative")
22  mLevel = 2;
23  else if (level == "L3Absolute")
24  mLevel = 3;
25  else if (level == "L4EMF")
26  mLevel = 4;
27  else if (level == "L5Flavor")
28  mLevel = 5;
29  else if (level == "L7Parton")
30  mLevel = 7;
31  else if (level == "L2L3Residual")
32  mLevel = 8;
33  else
34  throw cms::Exception("LXXXCorrector") << " unknown correction level " << level;
35  vector<JetCorrectorParameters> vParam;
36  vParam.push_back(fParam);
38 }

References JetCorrectorParameters::definitions(), Exception, personalPlayback::level, and JetCorrectorParameters::Definitions::level().

◆ ~LXXXCorrector()

LXXXCorrector::~LXXXCorrector ( )
override

Definition at line 42 of file LXXXCorrector.cc.

42 { delete mCorrector; }

Member Function Documentation

◆ correction() [1/2]

double LXXXCorrector::correction ( const LorentzVector fJet) const
overridevirtual

get correction using Jet information only

Implements JetCorrector.

Definition at line 46 of file LXXXCorrector.cc.

46  {
47  // L4 correction requires more information than a simple 4-vector
48  if (mLevel == 4) {
49  throw cms::Exception("Invalid jet type") << "L4EMFCorrection is applicable to CaloJets only";
50  return 1;
51  }
52 
54  values.setJetEta(fJet.eta());
55  values.setJetE(fJet.energy());
56  values.setJetPt(fJet.pt());
57  values.setJetPhi(fJet.phi());
58 
60 }

References Exception, and contentValuesCheck::values.

◆ correction() [2/2]

double LXXXCorrector::correction ( const reco::Jet fJet) const
overridevirtual

apply correction using Jet information only

Implements JetCorrector.

Definition at line 64 of file LXXXCorrector.cc.

64  {
65  double result = 1.;
66  // L4 correction applies to Calojets only
67  if (mLevel == 4) {
68  const reco::CaloJet& caloJet = dynamic_cast<const reco::CaloJet&>(fJet);
70  values.setJetEta(fJet.eta());
71  values.setJetPt(fJet.pt());
72  values.setJetEMF(caloJet.emEnergyFraction());
74  } else
75  result = correction(fJet.p4());
76  return result;
77 }

References pfMETCorrectionType0_cfi::correction, reco::CaloJet::emEnergyFraction(), reco::LeafCandidate::eta(), reco::LeafCandidate::p4(), reco::LeafCandidate::pt(), mps_fire::result, and contentValuesCheck::values.

◆ eventRequired()

bool LXXXCorrector::eventRequired ( ) const
inlineoverridevirtual

if correction needs event information

Implements JetCorrector.

Definition at line 30 of file LXXXCorrector.h.

30 { return false; }

◆ refRequired()

bool LXXXCorrector::refRequired ( ) const
inlineoverridevirtual

if correction needs the jet reference

Implements JetCorrector.

Definition at line 33 of file LXXXCorrector.h.

33 { return false; }

Member Data Documentation

◆ mCorrector

FactorizedJetCorrectorCalculator* LXXXCorrector::mCorrector
private

Definition at line 38 of file LXXXCorrector.h.

◆ mLevel

unsigned LXXXCorrector::mLevel
private

Definition at line 37 of file LXXXCorrector.h.

personalPlayback.level
level
Definition: personalPlayback.py:22
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
FactorizedJetCorrectorCalculator::getCorrection
float getCorrection(VariableValues &) const
Definition: FactorizedJetCorrectorCalculator.cc:272
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
FactorizedJetCorrectorCalculator::VariableValues
Definition: FactorizedJetCorrectorCalculator.h:18
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
LXXXCorrector::mCorrector
FactorizedJetCorrectorCalculator * mCorrector
Definition: LXXXCorrector.h:38
FactorizedJetCorrectorCalculator
Definition: FactorizedJetCorrectorCalculator.h:16
Exception
Definition: hltDiff.cc:246
LXXXCorrector::correction
double correction(const LorentzVector &fJet) const override
get correction using Jet information only
Definition: LXXXCorrector.cc:46
LXXXCorrector::mLevel
unsigned mLevel
Definition: LXXXCorrector.h:37
mps_fire.result
result
Definition: mps_fire.py:303
reco::CaloJet::emEnergyFraction
float emEnergyFraction() const
Definition: CaloJet.h:97