CMS 3D CMS Logo

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

#include <L1OffsetCorrectorImpl.h>

Inheritance diagram for L1OffsetCorrectorImpl:
reco::JetCorrectorImpl

Public Types

typedef L1OffsetCorrectorImplMaker 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...
 
 L1OffsetCorrectorImpl (std::shared_ptr< FactorizedJetCorrectorCalculator const > calculator, int npv)
 
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 > corrector_
 
int npv_
 

Detailed Description

Definition at line 35 of file L1OffsetCorrectorImpl.h.

Member Typedef Documentation

Definition at line 38 of file L1OffsetCorrectorImpl.h.

Constructor & Destructor Documentation

L1OffsetCorrectorImpl::L1OffsetCorrectorImpl ( std::shared_ptr< FactorizedJetCorrectorCalculator const >  calculator,
int  npv 
)

Definition at line 63 of file L1OffsetCorrectorImpl.cc.

64  :
65  corrector_(calculator),
66  npv_(npv)
67 {
68 }
std::shared_ptr< FactorizedJetCorrectorCalculator const > corrector_

Member Function Documentation

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

get correction using Jet information only

Implements reco::JetCorrectorImpl.

Definition at line 73 of file L1OffsetCorrectorImpl.cc.

References Exception.

74 {
75  throw cms::Exception("EventRequired")
76  <<"Wrong interface correction(LorentzVector), event required!";
77  return 1.0;
78 }
double L1OffsetCorrectorImpl::correction ( const reco::Jet fJet) const
overridevirtual

apply correction using Jet information only

Implements reco::JetCorrectorImpl.

Definition at line 82 of file L1OffsetCorrectorImpl.cc.

References corrector_, reco::LeafCandidate::energy(), reco::LeafCandidate::eta(), npv_, reco::LeafCandidate::pt(), mps_fire::result, FactorizedJetCorrectorCalculator::VariableValues::setJetE(), FactorizedJetCorrectorCalculator::VariableValues::setJetEta(), FactorizedJetCorrectorCalculator::VariableValues::setJetPt(), FactorizedJetCorrectorCalculator::VariableValues::setNPV(), and MuonErrorMatrixValues_cff::values.

83 {
84  double result = 1.;
85  if (npv_ > 0) {
87  values.setJetEta(fJet.eta());
88  values.setJetPt(fJet.pt());
89  values.setJetE(fJet.energy());
90  values.setNPV(npv_);
91  result = corrector_->getCorrection(values);
92  }
93  return result;
94 }
double eta() const final
momentum pseudorapidity
double pt() const final
transverse momentum
double energy() const final
energy
std::shared_ptr< FactorizedJetCorrectorCalculator const > corrector_
bool L1OffsetCorrectorImpl::refRequired ( ) const
inlineoverridevirtual

if correction needs the jet reference

Implements reco::JetCorrectorImpl.

Definition at line 53 of file L1OffsetCorrectorImpl.h.

53 { return false; }

Member Data Documentation

std::shared_ptr<FactorizedJetCorrectorCalculator const> L1OffsetCorrectorImpl::corrector_
private

Definition at line 57 of file L1OffsetCorrectorImpl.h.

Referenced by correction().

int L1OffsetCorrectorImpl::npv_
private

Definition at line 58 of file L1OffsetCorrectorImpl.h.

Referenced by correction().