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

◆ Maker

Definition at line 37 of file L1OffsetCorrectorImpl.h.

Constructor & Destructor Documentation

◆ L1OffsetCorrectorImpl()

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

Definition at line 57 of file L1OffsetCorrectorImpl.cc.

59  : corrector_(calculator), npv_(npv) {}

Member Function Documentation

◆ correction() [1/2]

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

get correction using Jet information only

Implements reco::JetCorrectorImpl.

Definition at line 64 of file L1OffsetCorrectorImpl.cc.

64  {
65  throw cms::Exception("EventRequired") << "Wrong interface correction(LorentzVector), event required!";
66  return 1.0;
67 }

References Exception.

◆ correction() [2/2]

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

apply correction using Jet information only

Implements reco::JetCorrectorImpl.

Definition at line 71 of file L1OffsetCorrectorImpl.cc.

71  {
72  double result = 1.;
73  if (npv_ > 0) {
75  values.setJetEta(fJet.eta());
76  values.setJetPt(fJet.pt());
77  values.setJetE(fJet.energy());
78  values.setNPV(npv_);
79  result = corrector_->getCorrection(values);
80  }
81  return result;
82 }

References corrector_, reco::LeafCandidate::energy(), reco::LeafCandidate::eta(), npv_, reco::LeafCandidate::pt(), mps_fire::result, and contentValuesCheck::values.

◆ refRequired()

bool L1OffsetCorrectorImpl::refRequired ( ) const
inlineoverridevirtual

if correction needs the jet reference

Implements reco::JetCorrectorImpl.

Definition at line 51 of file L1OffsetCorrectorImpl.h.

51 { return false; }

Member Data Documentation

◆ corrector_

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

Definition at line 55 of file L1OffsetCorrectorImpl.h.

Referenced by correction().

◆ npv_

int L1OffsetCorrectorImpl::npv_
private

Definition at line 56 of file L1OffsetCorrectorImpl.h.

Referenced by correction().

L1OffsetCorrectorImpl::npv_
int npv_
Definition: L1OffsetCorrectorImpl.h:56
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
L1OffsetCorrectorImpl::corrector_
std::shared_ptr< FactorizedJetCorrectorCalculator const > corrector_
Definition: L1OffsetCorrectorImpl.h:55
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
Exception
Definition: hltDiff.cc:245
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
mps_fire.result
result
Definition: mps_fire.py:311