#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 | 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::vector< std::pair< CorrectionCategory, ScaleCorrection > > | scales_ |
std::vector< std::pair< CorrectionCategory, SmearCorrection > > | smearings_ |
FileFormat | smearingType_ |
Static Private Attributes | |
static constexpr float | kDefaultScaleVal_ = 1.0 |
static constexpr float | kDefaultSmearVal_ = 0.0 |
Definition at line 19 of file EnergyScaleCorrection.h.
Enumerator | |
---|---|
kErrStatBitNr | |
kErrSystBitNr | |
kErrGainBitNr | |
kErrNrBits | |
kErrNone | |
kErrStat | |
kErrSyst | |
kErrGain | |
kErrStatSyst | |
kErrStatGain | |
kErrSystGain | |
kErrStatSystGain |
Definition at line 36 of file EnergyScaleCorrection.h.
EnergyScaleCorrection::EnergyScaleCorrection | ( | const std::string & | correctionFileName, |
unsigned int | genSeed = 0 |
||
) |
Definition at line 11 of file EnergyScaleCorrection.cc.
References Exception, corrVsCorr::filename, readScalesFromFile(), readSmearingsFromFile(), scales_, smearings_, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 134 of file EnergyScaleCorrection.h.
|
inline |
Definition at line 135 of file EnergyScaleCorrection.h.
References addScale(), addSmearing(), python.rootplot.argparse::category, stringResolutionProvider_cfi::et, PVValHelper::eta, corrVsCorr::filename, getScaleCorr(), getSmearCorr(), kErrNone, gsfElectronCkfTrackCandidateMaker_cff::nSigma, nSigmaPhi, phi, electrons_cff::r9, readScalesFromFile(), readSmearingsFromFile(), rho, scaleCorr(), scaleCorrUncert(), setSmearingType(), smearingSigma(), and AlCaHLTBitMon_QueryRunRegistry::string.
|
private |
Definition at line 127 of file EnergyScaleCorrection.cc.
References eostools::cat(), corr, Exception, mps_fire::result, and scales_.
Referenced by readScalesFromFile(), and ~EnergyScaleCorrection().
|
private |
Definition at line 144 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 75 of file EnergyScaleCorrection.cc.
References python.rootplot.argparse::category, SoftLeptonByDistance_cfi::distance, 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 101 of file EnergyScaleCorrection.cc.
References python.rootplot.argparse::category, SoftLeptonByDistance_cfi::distance, Exception, mps_fire::result, and smearings_.
Referenced by PhotonEnergyCalibrator::calibrate(), ElectronEnergyCalibrator::calibrate(), smearingSigma(), and ~EnergyScaleCorrection().
|
private |
Definition at line 172 of file EnergyScaleCorrection.cc.
References addScale(), python.rootplot.argparse::category, Exception, FrontierConditions_GlobalTag_cff::file, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EnergyScaleCorrection(), and ~EnergyScaleCorrection().
|
private |
Definition at line 197 of file EnergyScaleCorrection.cc.
References addSmearing(), python.rootplot.argparse::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 33 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 43 of file EnergyScaleCorrection.cc.
References getScaleCorr(), scaleCorr(), and EnergyScaleCorrection::ScaleCorrection::scaleErr().
Referenced by ~EnergyScaleCorrection().
void EnergyScaleCorrection::setSmearingType | ( | FileFormat | value | ) |
Definition at line 163 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 53 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 63 of file EnergyScaleCorrection.cc.
References getSmearCorr(), kDefaultSmearVal_, and EnergyScaleCorrection::SmearCorrection::sigma().
|
staticprivate |
Definition at line 164 of file EnergyScaleCorrection.h.
Referenced by scaleCorr().
|
staticprivate |
Definition at line 165 of file EnergyScaleCorrection.h.
Referenced by smearingSigma().
|
private |
Definition at line 169 of file EnergyScaleCorrection.h.
Referenced by addScale(), EnergyScaleCorrection(), and getScaleCorr().
|
private |
Definition at line 170 of file EnergyScaleCorrection.h.
Referenced by addSmearing(), EnergyScaleCorrection(), and getSmearCorr().
|
private |
Definition at line 168 of file EnergyScaleCorrection.h.
Referenced by readSmearingsFromFile(), and setSmearingType().