#include <EnergyScaleCorrection.h>
Classes | |
class | CorrectionCategory |
class | ScaleCorrection |
struct | SmearCorrection |
class | Sorter |
Public Types | |
enum | FileFormat { UNKNOWN = 0, GLOBE, ECALELF_TOY, ECALELF } |
enum | ParamSmear { kNone = 0, kRho, kPhi, kNParamSmear } |
enum | ScaleNuisances { kErrStatBitNr = 0, kErrSystBitNr = 1, kErrGainBitNr = 2, kErrNrBits = 3, kErrNone = 0, kErrStat = 1, kErrSyst = 2, kErrGain = 4, kErrStatSyst = 3, kErrStatGain = 5, kErrSystGain = 6, kErrStatSystGain = 7 } |
Public Member Functions | |
EnergyScaleCorrection (const std::string &correctionFileName, unsigned int genSeed=0) | |
EnergyScaleCorrection () | |
const ScaleCorrection * | getScaleCorr (unsigned int runnr, double et, double eta, double r9, unsigned int gainSeed) const |
const SmearCorrection * | getSmearCorr (unsigned int runnr, double et, double eta, double r9, unsigned int gainSeed) const |
float | scaleCorr (unsigned int runnr, double et, double eta, double r9, unsigned int gainSeed=12, std::bitset< kErrNrBits > uncBitMask=kErrNone) const |
float | scaleCorrUncert (unsigned int runnr, double et, double eta, double r9, unsigned int gainSeed, std::bitset< kErrNrBits > uncBitMask=kErrNone) const |
void | setSmearingType (FileFormat value) |
float | smearingSigma (int runnr, double et, double eta, double r9, unsigned int gainSeed, ParamSmear par, float nSigma=0.) const |
float | smearingSigma (int runnr, double et, double eta, double r9, unsigned int gainSeed, float nSigmaRho, float nSigmaPhi) const |
~EnergyScaleCorrection () | |
Private Member Functions | |
void | addScale (const std::string &category, int runMin, int runMax, double deltaP, double errDeltaP, double errSystDeltaP, double errDeltaPGain) |
void | addScale (int runMin, int runMax, double etaMin, double etaMax, double r9Min, double r9Max, double etMin, double etMax, unsigned int gain, double energyScale, double energyScaleErrStat, double energyScaleErrSyst, double energyScaleErrGain) |
void | addSmearing (const std::string &category, int runMin, int runMax, double rho, double errRho, double phi, double errPhi, double eMean, double errEMean) |
void | readScalesFromFile (const std::string &filename) |
void | readSmearingsFromFile (const std::string &filename) |
Private Attributes | |
std::map< CorrectionCategory, ScaleCorrection > | scales_ |
std::map< CorrectionCategory, SmearCorrection > | smearings_ |
FileFormat | smearingType_ |
Static Private Attributes | |
static constexpr float | kDefaultScaleVal_ = 1.0 |
static constexpr float | kDefaultSmearVal_ = 0.0 |
Definition at line 18 of file EnergyScaleCorrection.h.
Enumerator | |
---|---|
kErrStatBitNr | |
kErrSystBitNr | |
kErrGainBitNr | |
kErrNrBits | |
kErrNone | |
kErrStat | |
kErrSyst | |
kErrGain | |
kErrStatSyst | |
kErrStatGain | |
kErrSystGain | |
kErrStatSystGain |
Definition at line 24 of file EnergyScaleCorrection.h.
EnergyScaleCorrection::EnergyScaleCorrection | ( | const std::string & | correctionFileName, |
unsigned int | genSeed = 0 |
||
) |
Definition at line 13 of file EnergyScaleCorrection.cc.
References Exception, corrVsCorr::filename, readScalesFromFile(), readSmearingsFromFile(), scales_, smearings_, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 128 of file EnergyScaleCorrection.h.
|
inline |
Definition at line 129 of file EnergyScaleCorrection.h.
References addScale(), addSmearing(), taus_updatedMVAIds_cff::category, stringResolutionProvider_cfi::et, PVValHelper::eta, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, conversionPostprocessing_cfi::etMax, btagDijet_cfi::etMin, corrVsCorr::filename, muonCSCDigis_cfi::gain, getScaleCorr(), getSmearCorr(), kErrNone, gsfElectronCkfTrackCandidateMaker_cff::nSigma, nSigmaPhi, phi, electrons_cff::r9, photonValidator_cfi::r9Max, photonValidator_cfi::r9Min, readScalesFromFile(), readSmearingsFromFile(), rho, scaleCorr(), scaleCorrUncert(), setSmearingType(), smearingSigma(), and AlCaHLTBitMon_QueryRunRegistry::string.
|
private |
Definition at line 119 of file EnergyScaleCorrection.cc.
References eostools::cat(), corr, Exception, mps_fire::result, and scales_.
Referenced by readScalesFromFile(), and ~EnergyScaleCorrection().
|
private |
Definition at line 136 of file EnergyScaleCorrection.cc.
References eostools::cat(), corr, Exception, mps_fire::result, and scales_.
|
private |
Definition at line 160 of file EnergyScaleCorrection.cc.
References eostools::cat(), corr, Exception, and smearings_.
Referenced by readSmearingsFromFile(), and ~EnergyScaleCorrection().
const EnergyScaleCorrection::ScaleCorrection * EnergyScaleCorrection::getScaleCorr | ( | unsigned int | runnr, |
double | et, | ||
double | eta, | ||
double | r9, | ||
unsigned int | gainSeed | ||
) | const |
Definition at line 77 of file EnergyScaleCorrection.cc.
References taus_updatedMVAIds_cff::category, Exception, mps_fire::result, and scales_.
Referenced by PhotonEnergyCalibrator::calibrate(), ElectronEnergyCalibrator::calibrate(), scaleCorr(), scaleCorrUncert(), and ~EnergyScaleCorrection().
const EnergyScaleCorrection::SmearCorrection * EnergyScaleCorrection::getSmearCorr | ( | unsigned int | runnr, |
double | et, | ||
double | eta, | ||
double | r9, | ||
unsigned int | gainSeed | ||
) | const |
Definition at line 98 of file EnergyScaleCorrection.cc.
References taus_updatedMVAIds_cff::category, Exception, mps_fire::result, and smearings_.
Referenced by PhotonEnergyCalibrator::calibrate(), ElectronEnergyCalibrator::calibrate(), smearingSigma(), and ~EnergyScaleCorrection().
|
private |
< Min eta value for the bin
< Max eta value for the bin
< Min R9 vaule for the bin
< Max R9 value for the bin
< Min Et value for the bin
< Max Et value for the bin
< 12, 6, 1, 61 (double gain switch)
Definition at line 188 of file EnergyScaleCorrection.cc.
References addScale(), taus_updatedMVAIds_cff::category, SoftLeptonByDistance_cfi::distance, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, conversionPostprocessing_cfi::etMax, btagDijet_cfi::etMin, Exception, FrontierConditions_GlobalTag_cff::file, muonCSCDigis_cfi::gain, mps_splice::line, hgcalPlots::ncols, photonValidator_cfi::r9Max, photonValidator_cfi::r9Min, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EnergyScaleCorrection(), and ~EnergyScaleCorrection().
|
private |
Definition at line 256 of file EnergyScaleCorrection.cc.
References addSmearing(), taus_updatedMVAIds_cff::category, ECALELF, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, Exception, FrontierConditions_GlobalTag_cff::file, GLOBE, M_PI_2, phi, photonValidator_cfi::r9Max, photonValidator_cfi::r9Min, rho, smearingType_, AlCaHLTBitMon_QueryRunRegistry::string, and UNKNOWN.
Referenced by EnergyScaleCorrection(), and ~EnergyScaleCorrection().
float EnergyScaleCorrection::scaleCorr | ( | unsigned int | runnr, |
double | et, | ||
double | eta, | ||
double | r9, | ||
unsigned int | gainSeed = 12 , |
||
std::bitset< kErrNrBits > | uncBitMask = kErrNone |
||
) | const |
Definition at line 32 of file EnergyScaleCorrection.cc.
References getScaleCorr(), kDefaultScaleVal_, and EnergyScaleCorrection::ScaleCorrection::scale().
Referenced by scaleCorrUncert(), and ~EnergyScaleCorrection().
float EnergyScaleCorrection::scaleCorrUncert | ( | unsigned int | runnr, |
double | et, | ||
double | eta, | ||
double | r9, | ||
unsigned int | gainSeed, | ||
std::bitset< kErrNrBits > | uncBitMask = kErrNone |
||
) | const |
Definition at line 45 of file EnergyScaleCorrection.cc.
References getScaleCorr(), scaleCorr(), and EnergyScaleCorrection::ScaleCorrection::scaleErr().
Referenced by ~EnergyScaleCorrection().
void EnergyScaleCorrection::setSmearingType | ( | FileFormat | value | ) |
Definition at line 180 of file EnergyScaleCorrection.cc.
References smearingType_, UNKNOWN, and relativeConstraints::value.
Referenced by ~EnergyScaleCorrection().
float EnergyScaleCorrection::smearingSigma | ( | int | runnr, |
double | et, | ||
double | eta, | ||
double | r9, | ||
unsigned int | gainSeed, | ||
ParamSmear | par, | ||
float | nSigma = 0. |
||
) | const |
Definition at line 58 of file EnergyScaleCorrection.cc.
Referenced by ~EnergyScaleCorrection().
float EnergyScaleCorrection::smearingSigma | ( | int | runnr, |
double | et, | ||
double | eta, | ||
double | r9, | ||
unsigned int | gainSeed, | ||
float | nSigmaRho, | ||
float | nSigmaPhi | ||
) | const |
Definition at line 67 of file EnergyScaleCorrection.cc.
References getSmearCorr(), kDefaultSmearVal_, and EnergyScaleCorrection::SmearCorrection::sigma().
|
staticprivate |
Definition at line 192 of file EnergyScaleCorrection.h.
Referenced by scaleCorr().
|
staticprivate |
Definition at line 193 of file EnergyScaleCorrection.h.
Referenced by smearingSigma().
|
private |
Definition at line 197 of file EnergyScaleCorrection.h.
Referenced by addScale(), EnergyScaleCorrection(), and getScaleCorr().
|
private |
Definition at line 198 of file EnergyScaleCorrection.h.
Referenced by addSmearing(), EnergyScaleCorrection(), and getSmearCorr().
|
private |
Definition at line 196 of file EnergyScaleCorrection.h.
Referenced by readSmearingsFromFile(), and setSmearingType().