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
CorrectJet Class Reference

#include <CorrectJet.h>

Public Member Functions

 CorrectJet ()
 
 CorrectJet (const std::string &corrector)
 
reco::Jet operator() (const reco::Jet &jet) const
 Returns the corrected jet. More...
 
void setEventSetup (const edm::EventSetup &es)
 

Private Attributes

const JetCorrectorm_corrector
 
std::string m_correctorName
 

Detailed Description

Correct jets

Definition at line 16 of file CorrectJet.h.

Constructor & Destructor Documentation

CorrectJet::CorrectJet ( )
inline

Definition at line 19 of file CorrectJet.h.

19 {}
CorrectJet::CorrectJet ( const std::string &  corrector)
inline

Definition at line 20 of file CorrectJet.h.

20  :
21  m_corrector(0), m_correctorName(corrector) {}
std::string m_correctorName
Definition: CorrectJet.h:42
const JetCorrector * m_corrector
Definition: CorrectJet.h:41

Member Function Documentation

reco::Jet CorrectJet::operator() ( const reco::Jet jet) const
inline

Returns the corrected jet.

Definition at line 32 of file CorrectJet.h.

References JetCorrector::correction(), m_corrector, reco::LeafCandidate::p4(), reco::Jet::scaleEnergy(), and reco::LeafCandidate::vertex().

33  {
34  reco::Jet correctedJet(jet.p4(), jet.vertex());
35  if (m_corrector)
36  correctedJet.scaleEnergy(m_corrector->correction(jet));
37  return correctedJet;
38  }
virtual const Point & vertex() const
vertex position
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
Base class for all types of Jets.
Definition: Jet.h:21
virtual void scaleEnergy(double fScale)
scale energy of the jet
Definition: Jet.cc:445
const JetCorrector * m_corrector
Definition: CorrectJet.h:41
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
void CorrectJet::setEventSetup ( const edm::EventSetup es)
inline

Definition at line 23 of file CorrectJet.h.

References JetCorrector::getJetCorrector(), m_corrector, and m_correctorName.

Referenced by BTagPerformanceAnalyzerMC::getJetWithFlavour(), and MatchJet::matchCollections().

24  {
25  if (!m_correctorName.empty())
27  else
28  m_corrector = 0;
29  }
std::string m_correctorName
Definition: CorrectJet.h:42
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:51
const JetCorrector * m_corrector
Definition: CorrectJet.h:41

Member Data Documentation

const JetCorrector* CorrectJet::m_corrector
private

Definition at line 41 of file CorrectJet.h.

Referenced by operator()(), and setEventSetup().

std::string CorrectJet::m_correctorName
private

Definition at line 42 of file CorrectJet.h.

Referenced by setEventSetup().