CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
LXXXCorrector Class Reference

#include <LXXXCorrector.h>

Inheritance diagram for LXXXCorrector:
JetCorrector

Public Member Functions

virtual double correction (const LorentzVector &fJet) const
 get correction using Jet information only More...
 
virtual double correction (const reco::Jet &fJet) const
 apply correction using Jet information only More...
 
virtual bool eventRequired () const
 if correction needs event information More...
 
 LXXXCorrector (const JetCorrectorParameters &fConfig, const edm::ParameterSet &fParameters)
 
virtual bool refRequired () const
 if correction needs the jet reference More...
 
virtual ~LXXXCorrector ()
 
- 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 16 of file LXXXCorrector.h.

Constructor & Destructor Documentation

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

Definition at line 20 of file LXXXCorrector.cc.

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

21 {
22  string level = fParam.definitions().level();
23  if (level == "L2Relative")
24  mLevel = 2;
25  else if (level == "L3Absolute")
26  mLevel = 3;
27  else if (level == "L4EMF")
28  mLevel = 4;
29  else if (level == "L5Flavor")
30  mLevel = 5;
31  else if (level == "L7Parton")
32  mLevel = 7;
33  else
34  throw cms::Exception("LXXXCorrector")<<" unknown correction level "<<level;
35  vector<JetCorrectorParameters> vParam;
36  vParam.push_back(fParam);
38 }
unsigned mLevel
Definition: LXXXCorrector.h:39
FactorizedJetCorrectorCalculator * mCorrector
Definition: LXXXCorrector.h:40
tuple level
Definition: testEve_cfg.py:34
LXXXCorrector::~LXXXCorrector ( )
virtual

Definition at line 42 of file LXXXCorrector.cc.

43 {
44  delete mCorrector;
45 }
FactorizedJetCorrectorCalculator * mCorrector
Definition: LXXXCorrector.h:40

Member Function Documentation

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

get correction using Jet information only

Implements JetCorrector.

Definition at line 49 of file LXXXCorrector.cc.

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

50 {
51  // L4 correction requires more information than a simple 4-vector
52  if (mLevel == 4) {
53  throw cms::Exception("Invalid jet type") << "L4EMFCorrection is applicable to CaloJets only";
54  return 1;
55  }
56 
58  values.setJetEta(fJet.eta());
59  values.setJetE(fJet.energy());
60  values.setJetPt(fJet.pt());
61  values.setJetPhi(fJet.phi());
62 
63  return mCorrector->getCorrection(values);
64 }
unsigned mLevel
Definition: LXXXCorrector.h:39
FactorizedJetCorrectorCalculator * mCorrector
Definition: LXXXCorrector.h:40
double LXXXCorrector::correction ( const reco::Jet fJet) const
virtual

apply correction using Jet information only

Implements JetCorrector.

Definition at line 68 of file LXXXCorrector.cc.

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

69 {
70  double result = 1.;
71  // L4 correction applies to Calojets only
72  if (mLevel == 4) {
73  const reco::CaloJet& caloJet = dynamic_cast <const reco::CaloJet&> (fJet);
75  values.setJetEta(fJet.eta());
76  values.setJetPt(fJet.pt());
77  values.setJetEMF(caloJet.emEnergyFraction());
78  result = mCorrector->getCorrection(values);
79  }
80  else
81  result = correction(fJet.p4());
82  return result;
83 }
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual double correction(const LorentzVector &fJet) const
get correction using Jet information only
tuple result
Definition: mps_fire.py:95
unsigned mLevel
Definition: LXXXCorrector.h:39
FactorizedJetCorrectorCalculator * mCorrector
Definition: LXXXCorrector.h:40
virtual double eta() const final
momentum pseudorapidity
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 LXXXCorrector::eventRequired ( ) const
inlinevirtual

if correction needs event information

Implements JetCorrector.

Definition at line 32 of file LXXXCorrector.h.

32 {return false;}
virtual bool LXXXCorrector::refRequired ( ) const
inlinevirtual

if correction needs the jet reference

Implements JetCorrector.

Definition at line 35 of file LXXXCorrector.h.

35 { return false; }

Member Data Documentation

FactorizedJetCorrectorCalculator* LXXXCorrector::mCorrector
private

Definition at line 40 of file LXXXCorrector.h.

unsigned LXXXCorrector::mLevel
private

Definition at line 39 of file LXXXCorrector.h.