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 | Static Public Member Functions
JetCorrector Class Referenceabstract

#include <JetCorrector.h>

Inheritance diagram for JetCorrector:
ChainedJetCorrector JetPartonCorrector L1FastjetCorrector L1JPTOffsetCorrector L1OffsetCorrector L6SLBCorrector LXXXCorrector TauJetCorrector

Public Types

typedef
reco::Particle::LorentzVector 
LorentzVector
 

Public Member Functions

virtual double correction (const LorentzVector &fJet) const =0
 get correction using Jet information only More...
 
virtual double correction (const reco::Jet &fJet) const =0
 apply correction using Jet information only More...
 
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...
 
virtual bool eventRequired () const =0
 if correction needs event information More...
 
 JetCorrector ()
 
virtual bool refRequired () const =0
 if correction needs the jet reference More...
 
virtual bool vectorialCorrection () const
 if vectorial correction is provided More...
 
virtual ~JetCorrector ()
 

Static Public Member Functions

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 19 of file JetCorrector.h.

Member Typedef Documentation

Definition at line 23 of file JetCorrector.h.

Constructor & Destructor Documentation

JetCorrector::JetCorrector ( )
inline

Definition at line 25 of file JetCorrector.h.

25 {};
virtual JetCorrector::~JetCorrector ( )
inlinevirtual

Definition at line 26 of file JetCorrector.h.

26 {};

Member Function Documentation

virtual double JetCorrector::correction ( const LorentzVector fJet) const
pure virtual
virtual double JetCorrector::correction ( const reco::Jet fJet) const
pure virtual
double JetCorrector::correction ( const reco::Jet fJet,
const edm::Event fEvent,
const edm::EventSetup fSetup 
) const
virtual

apply correction using all event information

Reimplemented in L1JPTOffsetCorrector, L1OffsetCorrector, L1FastjetCorrector, and ChainedJetCorrector.

Definition at line 14 of file JetCorrector.cc.

References correction(), eventRequired(), and refRequired().

16  {
17  if (eventRequired () && !refRequired()) {
18  edm::LogError ("Missing Jet Correction Method")
19  << "Undefined Jet Correction method requiring event data is called" << std::endl;
20  return 0;
21  }
22  return correction (fJet);
23 }
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
virtual bool eventRequired() const =0
if correction needs event information
virtual bool refRequired() const =0
if correction needs the jet reference
double JetCorrector::correction ( const reco::Jet fJet,
const edm::RefToBase< reco::Jet > &  fJetRef,
const edm::Event fEvent,
const edm::EventSetup fSetup 
) const
virtual

apply correction using all event information

Reimplemented in L6SLBCorrector, and ChainedJetCorrector.

Definition at line 25 of file JetCorrector.cc.

References correction(), eventRequired(), and refRequired().

28  {
29  if (eventRequired () && refRequired()) {
30  edm::LogError ("Missing Jet Correction Method")
31  << "Undefined Jet Correction method requiring event data and jet reference is called" << std::endl;
32  return 0;
33  }
34  return correction (fJet);
35 }
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
virtual bool eventRequired() const =0
if correction needs event information
virtual bool refRequired() const =0
if correction needs the jet reference
double JetCorrector::correction ( const reco::Jet fJet,
const edm::RefToBase< reco::Jet > &  fJetRef,
const edm::Event fEvent,
const edm::EventSetup fSetup,
LorentzVector corrected 
) const
virtual

Apply vectorial correction using all event information.

Definition at line 37 of file JetCorrector.cc.

References correction(), and vectorialCorrection().

41  {
42  if ( vectorialCorrection() ) {
43  edm::LogError ("Missing Jet Correction Method")
44  << "Undefined Jet (vectorial) correction method requiring event data is called" << std::endl;
45  return 0;
46  }
47  return correction (fJet);
48 }
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
virtual bool vectorialCorrection() const
if vectorial correction is provided
Definition: JetCorrector.h:66
virtual bool JetCorrector::eventRequired ( ) const
pure virtual
const JetCorrector * JetCorrector::getJetCorrector ( const std::string &  fName,
const edm::EventSetup fSetup 
)
static

retrieve corrector from the event setup. troughs exception if something is missing

Definition at line 50 of file JetCorrector.cc.

References edm::EventSetup::get(), edm::eventsetup::EventSetupRecord::get(), patZpeak::handle, and record.

Referenced by FlavorJetCorrectionExample::analyze(), PartonJetCorrectionExample::analyze(), CMSDAS11DijetTestAnalyzer::analyze(), JetCorExample< Jet >::analyze(), CMSDAS11DijetAnalyzer::analyze(), BTagPerformanceAnalyzerOnData::analyze(), BTagPerformanceAnalyzerMC::analyze(), calcTopMass::analyze(), DiJetAnalyzer::analyze(), ExoticaDQM::analyze(), GammaJetAnalysis::analyze(), L1JPTOffsetCorrector::correction(), HLTOfflineDQMTopSingleLepton::MonitorSingleLepton::fill(), HLTOfflineDQMTopDiLepton::MonitorDiLepton::fill(), TopSingleLepton::MonitorEnsemble::fill(), SingleTopTChannelLepton::MonitorEnsemble::fill(), TopDiLeptonOffline::MonitorEnsemble::fill(), NoPileUpPFMEtDataProducer::produce(), reco::PFMETProducerMVA::produce(), SelectionStepHLT< Object >::select(), SelectionStep< Object >::select(), CorrectJet::setEventSetup(), and MVAJetIdMaker::SetVars().

50  {
53  record.get (fName, handle);
54  return &*handle;
55 }
JetCorrectorParameters::Record record
Definition: classes.h:7
void get(HolderT &iHolder) const
tuple handle
Definition: patZpeak.py:22
const T & get() const
Definition: EventSetup.h:55
virtual bool JetCorrector::refRequired ( ) const
pure virtual

if correction needs the jet reference

Implemented in L6SLBCorrector, L1OffsetCorrector, L1FastjetCorrector, L1JPTOffsetCorrector, LXXXCorrector, and ChainedJetCorrector.

Referenced by correction().

bool JetCorrector::vectorialCorrection ( ) const
inlinevirtual

if vectorial correction is provided

Definition at line 66 of file JetCorrector.h.

Referenced by CMSDAS11DijetTestAnalyzer::analyze(), and correction().

66 { return false; }