test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual double correction (const LorentzVector &fJet) const override
 get correction using Jet information only More...
 
virtual 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)
 
virtual 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 30 of file LXXXCorrectorImpl.h.

Member Typedef Documentation

Definition at line 33 of file LXXXCorrectorImpl.h.

Constructor & Destructor Documentation

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

Definition at line 61 of file LXXXCorrectorImpl.cc.

61  :
62  mLevel(level),
63  mCorrector(calculator)
64 {
65 }
tuple level
Definition: testEve_cfg.py:34
std::shared_ptr< FactorizedJetCorrectorCalculator const > mCorrector

Member Function Documentation

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

get correction using Jet information only

Implements reco::JetCorrectorImpl.

Definition at line 69 of file LXXXCorrectorImpl.cc.

References Exception, mCorrector, mLevel, FactorizedJetCorrectorCalculator::VariableValues::setJetE(), FactorizedJetCorrectorCalculator::VariableValues::setJetEta(), FactorizedJetCorrectorCalculator::VariableValues::setJetPhi(), FactorizedJetCorrectorCalculator::VariableValues::setJetPt(), and makeHLTPrescaleTable::values.

Referenced by correction().

70 {
71  // L4 correction requires more information than a simple 4-vector
72  if (mLevel == 4) {
73  throw cms::Exception("Invalid jet type") << "L4EMFCorrection is applicable to CaloJets only";
74  return 1;
75  }
76 
78  values.setJetEta(fJet.eta());
79  values.setJetE(fJet.energy());
80  values.setJetPt(fJet.pt());
81  values.setJetPhi(fJet.phi());
82 
83  return mCorrector->getCorrection(values);
84 }
std::shared_ptr< FactorizedJetCorrectorCalculator const > mCorrector
double LXXXCorrectorImpl::correction ( const reco::Jet fJet) const
overridevirtual

apply correction using Jet information only

Implements reco::JetCorrectorImpl.

Definition at line 88 of file LXXXCorrectorImpl.cc.

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

89 {
90  double result = 1.;
91  // L4 correction applies to Calojets only
92  if (mLevel == 4) {
93  const reco::CaloJet& caloJet = dynamic_cast <const reco::CaloJet&> (fJet);
95  values.setJetEta(fJet.eta());
96  values.setJetPt(fJet.pt());
97  values.setJetEMF(caloJet.emEnergyFraction());
98  result = mCorrector->getCorrection(values);
99  }
100  else
101  result = correction(fJet.p4());
102  return result;
103 }
Jets made from CaloTowers.
Definition: CaloJet.h:29
tuple result
Definition: mps_fire.py:84
virtual double correction(const LorentzVector &fJet) const override
get correction using Jet information only
virtual double eta() const final
momentum pseudorapidity
std::shared_ptr< FactorizedJetCorrectorCalculator const > mCorrector
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
float emEnergyFraction() const
Definition: CaloJet.h:102
virtual double pt() const final
transverse momentum
virtual bool LXXXCorrectorImpl::refRequired ( ) const
inlineoverridevirtual

if correction needs the jet reference

Implements reco::JetCorrectorImpl.

Definition at line 45 of file LXXXCorrectorImpl.h.

45 { return false; }

Member Data Documentation

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

Definition at line 50 of file LXXXCorrectorImpl.h.

Referenced by correction().

unsigned int LXXXCorrectorImpl::mLevel
private

Definition at line 49 of file LXXXCorrectorImpl.h.

Referenced by correction().