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 ()
 
 JetCorrectorImpl (const JetCorrectorImpl &)=delete
 
const JetCorrectorImploperator= (const JetCorrectorImpl &)=delete
 
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) {}
std::shared_ptr< FactorizedJetCorrectorCalculator const > corrector_

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.

References Exception.

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

◆ 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.

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

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 }
double pt() const final
transverse momentum
std::shared_ptr< FactorizedJetCorrectorCalculator const > corrector_
double energy() const final
energy
double eta() const final
momentum pseudorapidity

◆ 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().