Class for the storage of jet correction factors. More...
#include "DataFormats/PatCandidates/interface/JetCorrFactors.h"
Public Types | |
typedef std::pair< std::string, std::vector< float > > | CorrectionFactor |
enum | Flavor { GLUON, UDS, CHARM, BOTTOM, NONE } |
Public Member Functions | |
float | correction (unsigned int level, Flavor flavor=NONE) const |
std::string | correctionLabel (unsigned int level) const |
std::vector< std::string > | correctionLabels () const |
std::string | correctionLabelString () const |
bool | flavorDependent (unsigned int level) const |
std::string | jecFlavor (const Flavor &flavor) const |
Flavor | jecFlavor (std::string flavor) const |
std::string | jecLevel (const unsigned int &level) const |
int | jecLevel (const std::string &level) const |
std::string | jecSet () const |
JetCorrFactors () | |
JetCorrFactors (const std::string &label, const std::vector< CorrectionFactor > &jec) | |
unsigned int | numberOfCorrectionLevels () const |
void | print () const |
Static Public Attributes | |
static const unsigned int | MAX_FLAVORS = 4 |
Private Member Functions | |
bool | flavorDependent (const CorrectionFactor &jec) const |
bool | flavorIndependent (const CorrectionFactor &jec) const |
bool | isValid (const CorrectionFactor &jec) const |
Private Attributes | |
std::vector< CorrectionFactor > | jec_ |
std::string | label_ |
Class for the storage of jet correction factors.
Class for the storage of jet correction factors that have been calculated during pat tuple production. The class is created to deal with a flexible number and order of the JES correction factors, which are expected to be nested. I.e. each correction level implies that all previous correction have been applied in advance. This scheme corresponds to the jet energy correction scheme propagated by the JetMET PAG. In dividual levels of JEC are safed as CorrectionFactor, which is a
std::pair<std::string, std::vector<float> >.
The std::string contains a human readable label indicating the corection level, the std::vector<float> contains the JEC factors, which are expected to have a length of 1 or 5. In this scheme the vector of length 1 is reserved for flavor independent CorrectionFactors, while the vector of length 5 corresponds to flavor dependent CorrectionFactors. The individual positions within the vector are expected to be distributed according to the Flavor enumerator of the class as:
GLUON, UDS, CHARM, BOTTOM, NONE
The structure is checked in the constructor of the class. The function correction returns potentially flavor dependent correction factor of the JES relative to an uncorrected jet. To move from one correction level to another correction level the initial correction level of the jet need to be uncorrected before applying the final correction factor. The class is expected to be used from within the pat::Jet only, this is taken care of automatically.
Definition at line 37 of file JetCorrFactors.h.
typedef std::pair<std::string, std::vector<float> > pat::JetCorrFactors::CorrectionFactor |
Definition at line 45 of file JetCorrFactors.h.
Enumerator | |
---|---|
GLUON | |
UDS | |
CHARM | |
BOTTOM | |
NONE |
Definition at line 47 of file JetCorrFactors.h.
|
inline |
Definition at line 53 of file JetCorrFactors.h.
JetCorrFactors::JetCorrFactors | ( | const std::string & | label, |
const std::vector< CorrectionFactor > & | jec | ||
) |
Definition at line 14 of file JetCorrFactors.cc.
References Exception, and isValid().
Definition at line 72 of file JetCorrFactors.cc.
References correctionLabelString(), Exception, flavorDependent(), jec_, and NONE.
Referenced by print().
|
inline |
Definition at line 75 of file JetCorrFactors.h.
References jec_, and AlCaHLTBitMon_QueryRunRegistry::string.
std::vector< std::string > JetCorrFactors::correctionLabels | ( | ) | const |
Definition at line 100 of file JetCorrFactors.cc.
References jec_, and HLT_25ns14e33_v1_cff::labels.
std::string JetCorrFactors::correctionLabelString | ( | ) | const |
Definition at line 89 of file JetCorrFactors.cc.
References python.multivaluedict::append(), customizeTrackingMonitorSeedNumber::idx, jec_, HLT_25ns14e33_v1_cff::labels, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by correction().
|
inline |
Definition at line 77 of file JetCorrFactors.h.
References jec_, and MAX_FLAVORS.
Referenced by correction(), isValid(), and print().
|
inlineprivate |
Definition at line 85 of file JetCorrFactors.h.
References MAX_FLAVORS.
|
inlineprivate |
|
inlineprivate |
Definition at line 89 of file JetCorrFactors.h.
References flavorDependent(), and flavorIndependent().
Referenced by JetCorrFactors(), and core.AutoHandle.AutoHandle::ReallyLoad().
std::string JetCorrFactors::jecFlavor | ( | const Flavor & | flavor | ) | const |
Definition at line 42 of file JetCorrFactors.cc.
References BOTTOM, CHARM, GLUON, NONE, and UDS.
JetCorrFactors::Flavor JetCorrFactors::jecFlavor | ( | std::string | flavor | ) | const |
Definition at line 50 of file JetCorrFactors.cc.
References BOTTOM, CHARM, Exception, GLUON, NONE, create_public_lumi_plots::transform, and UDS.
|
inline |
int JetCorrFactors::jecLevel | ( | const std::string & | level | ) | const |
Definition at line 63 of file JetCorrFactors.cc.
References jec_.
|
inline |
|
inline |
void JetCorrFactors::print | ( | void | ) | const |
Definition at line 110 of file JetCorrFactors.cc.
References correction(), flavorDependent(), jec_, python.rootplot.argparse::message, and NONE.
|
private |
Definition at line 101 of file JetCorrFactors.h.
Referenced by correction(), correctionLabel(), correctionLabels(), correctionLabelString(), flavorDependent(), jecLevel(), numberOfCorrectionLevels(), and print().
|
private |
Definition at line 93 of file JetCorrFactors.h.
Referenced by Mixins._Labelable::_findDependencies(), jecSet(), and Mixins._Labelable::setLabel().
|
static |
Definition at line 49 of file JetCorrFactors.h.
Referenced by flavorDependent().