#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.
|
private |
Definition at line 119 of file EnergyScaleCorrection.cc.
References eostools::cat(), validateAlignments::category, alignCSCRings::corr, Exception, mps_fire::result, test_db_connect::runMax, test_db_connect::runMin, and scales_.
Referenced by readScalesFromFile().
|
private |
Definition at line 136 of file EnergyScaleCorrection.cc.
References eostools::cat(), alignCSCRings::corr, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, cosmicPhotonAnalyzer_cfi::etMax, photonAnalyzer_cfi::etMin, Exception, PedestalClient_cfi::gain, cosmicPhotonAnalyzer_cfi::r9Max, photonAnalyzer_cfi::r9Min, mps_fire::result, test_db_connect::runMax, test_db_connect::runMin, and scales_.
|
private |
Definition at line 160 of file EnergyScaleCorrection.cc.
References eostools::cat(), validateAlignments::category, alignCSCRings::corr, Exception, phi, rho, 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 validateAlignments::category, EgHLTOffHistBins_cfi::et, PVValHelper::eta, Exception, electrons_cff::r9, mps_fire::result, fileCollector::runnr, 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 validateAlignments::category, EgHLTOffHistBins_cfi::et, PVValHelper::eta, Exception, electrons_cff::r9, mps_fire::result, fileCollector::runnr, 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(), validateAlignments::category, HLT_2024v10_cff::distance, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, cosmicPhotonAnalyzer_cfi::etMax, photonAnalyzer_cfi::etMin, Exception, geometryDiff::file, corrVsCorr::filename, contentValuesFiles::fullPath, PedestalClient_cfi::gain, mps_splice::line, hgcalPlots::ncols, cosmicPhotonAnalyzer_cfi::r9Max, photonAnalyzer_cfi::r9Min, 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(), validateAlignments::category, ECALELF, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, Exception, geometryDiff::file, corrVsCorr::filename, contentValuesFiles::fullPath, GLOBE, M_PI_2, phi, cosmicPhotonAnalyzer_cfi::r9Max, photonAnalyzer_cfi::r9Min, 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 EgHLTOffHistBins_cfi::et, PVValHelper::eta, getScaleCorr(), kDefaultScaleVal_, electrons_cff::r9, and convertSQLiteXML::runNumber.
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 EgHLTOffHistBins_cfi::et, PVValHelper::eta, getScaleCorr(), electrons_cff::r9, convertSQLiteXML::runNumber, and scaleCorr().
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.
References EgHLTOffHistBins_cfi::et, PVValHelper::eta, kPhi, kRho, HLTSiStripMonitoring_cff::nSigma, electrons_cff::r9, and fileCollector::runnr.
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 EgHLTOffHistBins_cfi::et, PVValHelper::eta, getSmearCorr(), kDefaultSmearVal_, electrons_cff::r9, fileCollector::runnr, 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().