CMS 3D CMS Logo

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

#include <LXXXCorrectorImpl.h>

Inheritance diagram for LXXXCorrectorImpl:
reco::JetCorrectorImpl

Public Types

typedef LXXXCorrectorImplMaker Maker
 
- Public Types inherited from reco::JetCorrectorImpl
typedef reco::Particle::LorentzVector LorentzVector
 

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...
 
 LXXXCorrectorImpl (std::shared_ptr< FactorizedJetCorrectorCalculator const > calculator, unsigned int level)
 
bool refRequired () const override
 if correction needs the jet reference More...
 
- Public Member Functions inherited from reco::JetCorrectorImpl
virtual double correction (const reco::Jet &fJet, const edm::RefToBase< reco::Jet > &fJetRef) const
 apply correction using Ref More...
 
virtual double correction (const reco::Jet &fJet, const edm::RefToBase< reco::Jet > &fJetRef, LorentzVector &corrected) const
 Apply vectorial correction. More...
 
 JetCorrectorImpl ()
 
virtual bool vectorialCorrection () const
 if vectorial correction is provided More...
 
virtual ~JetCorrectorImpl ()
 

Private Attributes

std::shared_ptr< FactorizedJetCorrectorCalculator const > mCorrector
 
unsigned int mLevel
 

Detailed Description

Definition at line 29 of file LXXXCorrectorImpl.h.

Member Typedef Documentation

◆ Maker

Definition at line 31 of file LXXXCorrectorImpl.h.

Constructor & Destructor Documentation

◆ LXXXCorrectorImpl()

LXXXCorrectorImpl::LXXXCorrectorImpl ( std::shared_ptr< FactorizedJetCorrectorCalculator const >  calculator,
unsigned int  level 
)

Definition at line 52 of file LXXXCorrectorImpl.cc.

54  : mLevel(level), mCorrector(calculator) {}

Member Function Documentation

◆ correction() [1/2]

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

get correction using Jet information only

Implements reco::JetCorrectorImpl.

Definition at line 58 of file LXXXCorrectorImpl.cc.

58  {
59  // L4 correction requires more information than a simple 4-vector
60  if (mLevel == 4) {
61  throw cms::Exception("Invalid jet type") << "L4EMFCorrection is applicable to CaloJets only";
62  return 1;
63  }
64 
66  values.setJetEta(fJet.eta());
67  values.setJetE(fJet.energy());
68  values.setJetPt(fJet.pt());
69  values.setJetPhi(fJet.phi());
70 
71  return mCorrector->getCorrection(values);
72 }

References Exception, mCorrector, mLevel, and contentValuesCheck::values.

Referenced by correction().

◆ correction() [2/2]

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

apply correction using Jet information only

Implements reco::JetCorrectorImpl.

Definition at line 76 of file LXXXCorrectorImpl.cc.

76  {
77  double result = 1.;
78  // L4 correction applies to Calojets only
79  if (mLevel == 4) {
80  const reco::CaloJet& caloJet = dynamic_cast<const reco::CaloJet&>(fJet);
82  values.setJetEta(fJet.eta());
83  values.setJetPt(fJet.pt());
84  values.setJetEMF(caloJet.emEnergyFraction());
85  result = mCorrector->getCorrection(values);
86  } else
87  result = correction(fJet.p4());
88  return result;
89 }

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

◆ refRequired()

bool LXXXCorrectorImpl::refRequired ( ) const
inlineoverridevirtual

if correction needs the jet reference

Implements reco::JetCorrectorImpl.

Definition at line 43 of file LXXXCorrectorImpl.h.

43 { return false; }

Member Data Documentation

◆ mCorrector

std::shared_ptr<FactorizedJetCorrectorCalculator const> LXXXCorrectorImpl::mCorrector
private

Definition at line 48 of file LXXXCorrectorImpl.h.

Referenced by correction().

◆ mLevel

unsigned int LXXXCorrectorImpl::mLevel
private

Definition at line 47 of file LXXXCorrectorImpl.h.

Referenced by correction().

personalPlayback.level
level
Definition: personalPlayback.py:22
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
LXXXCorrectorImpl::mCorrector
std::shared_ptr< FactorizedJetCorrectorCalculator const > mCorrector
Definition: LXXXCorrectorImpl.h:48
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
LXXXCorrectorImpl::mLevel
unsigned int mLevel
Definition: LXXXCorrectorImpl.h:47
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
Exception
Definition: hltDiff.cc:245
mps_fire.result
result
Definition: mps_fire.py:311
LXXXCorrectorImpl::correction
double correction(const LorentzVector &fJet) const override
get correction using Jet information only
Definition: LXXXCorrectorImpl.cc:58
reco::CaloJet::emEnergyFraction
float emEnergyFraction() const
Definition: CaloJet.h:97