#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, lut2db_cfg::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.
|
private |
Definition at line 119 of file EnergyScaleCorrection.cc.
References eostools::cat(), alignCSCRings::corr, Exception, mps_fire::result, and scales_.
Referenced by readScalesFromFile().
|
private |
Definition at line 136 of file EnergyScaleCorrection.cc.
References eostools::cat(), alignCSCRings::corr, Exception, mps_fire::result, and scales_.
|
private |
Definition at line 160 of file EnergyScaleCorrection.cc.
References eostools::cat(), alignCSCRings::corr, Exception, and smearings_.
Referenced by readSmearingsFromFile().
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 category, Exception, mps_fire::result, and scales_.
Referenced by PhotonEnergyCalibrator::calibrate(), ElectronEnergyCalibrator::calibrate(), scaleCorr(), and scaleCorrUncert().
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 category, Exception, mps_fire::result, and smearings_.
Referenced by PhotonEnergyCalibrator::calibrate(), ElectronEnergyCalibrator::calibrate(), and smearingSigma().
|
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(), category, HLT_FULL_cff::distance, Puppi_cff::etaMax, Puppi_cff::etaMin, HLT_FULL_cff::etMin, Exception, mergeVDriftHistosByStation::file, contentValuesFiles::fullPath, geometryCSVtoXML::line, test_db_connect::runMax, test_db_connect::runMin, cms::cuda::stream, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EnergyScaleCorrection().
|
private |
Definition at line 256 of file EnergyScaleCorrection.cc.
References addSmearing(), category, ECALELF, Puppi_cff::etaMax, Puppi_cff::etaMin, Exception, mergeVDriftHistosByStation::file, contentValuesFiles::fullPath, GLOBE, M_PI_2, phi, rho, test_db_connect::runMax, test_db_connect::runMin, smearingType_, AlCaHLTBitMon_QueryRunRegistry::string, and UNKNOWN.
Referenced by 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().
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().
void EnergyScaleCorrection::setSmearingType | ( | FileFormat | value | ) |
Definition at line 180 of file EnergyScaleCorrection.cc.
References smearingType_, UNKNOWN, and relativeConstraints::value.
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.
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().