CMS 3D CMS Logo

Public Member Functions

PATJetCorrExtractor Class Reference

#include <PATJetCorrExtractor.h>

List of all members.

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, Exception, and format_vstring().

  {
    reco::Candidate::LorentzVector corrJetP4;

    try {
      corrJetP4 = jet.correctedP4(jetCorrLabel);
    } catch( cms::Exception e ) {
      throw cms::Exception("InvalidRequest") 
        << "The JEC level " << jetCorrLabel << " does not exist !!\n"
        << "Available levels = " << format_vstring(jet.availableJECLevels()) << ".\n";
    }

    return corrJetP4;
  }