1 #ifndef _TIMBER_JETRECALIBRATOR 2 #define _TIMBER_JETRECALIBRATOR 8 #include "Collection.h" 9 #include "JME_common.h" 10 #include <ROOT/RVec.hxx> 11 #include "CondFormats/JetMETObjects/interface/FactorizedJetCorrector.h" 12 #include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h" 13 #include "CondFormats/JetMETObjects/interface/JetCorrectionUncertainty.h" 15 typedef std::string str;
16 typedef ROOT::VecOps::RVec<float> rvec_f;
17 typedef std::vector<JetCorrectorParameters> vJCP;
26 str _jecTag, _jetType, _uncertType;
29 FactorizedJetCorrector* _JetCorrector;
32 JetCorrectorParameters _L1JetPar, _L2JetPar, _L3JetPar, _ResJetPar;
33 JetCorrectionUncertainty* _JetUncertainty;
52 str uncertType,
int upToLevel=3
72 _JetCorrector->setJetPhi(jet.phi);
73 _JetCorrector->setJetEta(jet.eta);
74 _JetCorrector->setJetPt(jet.pt * (1. - jet.rawFactor));
75 _JetCorrector->setJetA(jet.area);
76 _JetCorrector->setRho(fixedGridRhoFastjetAll);
77 _correction = _JetCorrector->getCorrection() * (1. - jet.rawFactor);
90 _JetUncertainty->setJetPhi(jet.phi);
91 _JetUncertainty->setJetEta(jet.eta);
92 _JetUncertainty->setJetPt(_correction * jet.pt);
93 _uncertainty = delta*_JetUncertainty->getUncertainty(
true);
void CalculateUncertainty(T jet, float delta=1)
Calculate the correction uncertainty for a given jet and store the value internally. WARNING: CalculateCorrection must be run first.
Definition: JetRecalibrator.h:88
C++ class to handle the extraction of JES objects (aka JEC) starting from the JEC tags and jet types...
Definition: JME_common.h:57
JetRecalibrator()
Construct a new Jet Recalibrator object.
Definition: JetRecalibrator.cc:3
float GetCorrection()
Return the internally stored correction value that was calculated during CalculateCorrection.
Definition: JetRecalibrator.h:105
C++ class to recalibrate the of jets. Initialized with basic parameters and calculations done on vec...
Definition: JetRecalibrator.h:23
void CalculateCorrection(T jet, float fixedGridRhoFastjetAll)
Calculate the correction for a given jet and rho and store the value internally.
Definition: JetRecalibrator.h:71
float GetUncertainty()
Return the internally stored uncertainty value that was calculated during CalculateUncertainty.
Definition: JetRecalibrator.h:112