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
Version
Revision:
1.5
Id:
PATJetCorrExtractor.h,v 1.5 2012/02/13 14:12:12 veelken Exp

Definition at line 53 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 57 of file PATJetCorrExtractor.h.

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

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