CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
PATJetCorrExtractor Class Reference

#include <PATJetCorrExtractor.h>

Public Member Functions

reco::Candidate::LorentzVector operator() (const pat::Jet &jet, const std::string &jetCorrLabel, const edm::Event *evt=0, const edm::EventSetup *es=0, double jetCorrEtaMax=9.9, const reco::Candidate::LorentzVector *rawJetP4_specified=0)
 

Detailed Description

Retrieve jet energy correction factor for pat::Jets (of either PF-type or Calo-type)

NOTE: this specialization of the "generic" template defined in JetMETCorrections/Type1MET/interface/JetCorrExtractorT.h is to be used for pat::Jets only

Author
Christian Veelken, LLR

Definition at line 51 of file PATJetCorrExtractor.h.

Member Function Documentation

reco::Candidate::LorentzVector PATJetCorrExtractor::operator() ( const pat::Jet jet,
const std::string &  jetCorrLabel,
const edm::Event evt = 0,
const edm::EventSetup es = 0,
double  jetCorrEtaMax = 9.9,
const reco::Candidate::LorentzVector rawJetP4_specified = 0 
)
inline

Definition at line 55 of file PATJetCorrExtractor.h.

References pat::Jet::availableJECLevels(), pat::Jet::correctedP4(), alignCSCRings::e, edm::hlt::Exception, and format_vstring().

59  {
61 
62  try {
63  corrJetP4 = jet.correctedP4(jetCorrLabel);
64  } catch( cms::Exception e ) {
65  throw cms::Exception("InvalidRequest")
66  << "The JEC level " << jetCorrLabel << " does not exist !!\n"
67  << "Available levels = " << format_vstring(jet.availableJECLevels()) << ".\n";
68  }
69 
70  return corrJetP4;
71  }
const std::vector< std::string > availableJECLevels(const int &set=0) const
Definition: Jet.cc:229
const LorentzVector & correctedP4(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.h:146
std::string format_vstring(const std::vector< std::string > &vs)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41