Read and get energy scale and smearings from .dat files. More...
#include <Calibration/ZFitter/src/EnergyScaleCorrection_class.cc>
Public Types | |
enum | fileFormat_t { UNKNOWN =0, GLOBE, ECALELF_TOY, ECALELF } |
enum | paramSmear_t { kNone = 0, kRho, kPhi, kNParamSmear } |
Public Member Functions | |
EnergyScaleCorrection_class (std::string correctionFileName, unsigned int genSeed=0) | |
EnergyScaleCorrection_class () | |
float | getSmearingRho (int runNumber, bool isEBEle, float R9Ele, float etaSCEle, float EtEle) const |
public for sigmaE estimate More... | |
float | getSmearingSigma (int runNumber, bool isEBEle, float R9Ele, float etaSCEle, float EtEle, paramSmear_t par, float nSigma=0.) const |
float | getSmearingSigma (int runNumber, bool isEBEle, float R9Ele, float etaSCEle, float EtEle, float nSigma_rho, float nSigma_phi) const |
float | ScaleCorrection (unsigned int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle) const |
method to get energy scale corrections More... | |
float | ScaleCorrectionUncertainty (unsigned int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle) const |
method to get scale correction uncertainties: it's stat+syst in eta x R9 categories More... | |
void | SetSmearingType (fileFormat_t value) |
~EnergyScaleCorrection_class (void) | |
dummy constructor needed in ElectronEnergyCalibratorRun2 More... | |
Public Attributes | |
bool | doScale |
bool | doSmearings |
Private Member Functions | |
void | AddScale (TString category_, int runMin_, int runMax_, double deltaP_, double err_deltaP_, double err_syst_deltaP) |
void | AddSmearing (TString category_, int runMin_, int runMax_, double rho, double err_rho, double phi, double err_phi, double Emean, double err_Emean) |
correctionValue_class | getScaleCorrection (unsigned int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle) const |
returns the correction value class More... | |
float | getScaleOffset (unsigned int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle) const |
float | getScaleStatUncertainty (unsigned int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle) const |
float | getScaleSystUncertainty (unsigned int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle) const |
void | ReadFromFile (TString filename) |
category "runNumber" runMin runMax deltaP err_deltaP_per_bin err_deltaP_stat err_deltaP_syst More... | |
void | ReadSmearingFromFile (TString filename) |
File structure: category constTerm alpha;. More... | |
Private Attributes | |
correction_map_t | scales |
correction_map_t | scales_not_defined |
correction_map_t | smearings |
correction_map_t | smearings_not_defined |
fileFormat_t | smearingType_ |
Read and get energy scale and smearings from .dat files.
Definition at line 131 of file EnergyScaleCorrection_class.h.
Enumerator | |
---|---|
UNKNOWN | |
GLOBE | |
ECALELF_TOY | |
ECALELF |
Definition at line 135 of file EnergyScaleCorrection_class.h.
Enumerator | |
---|---|
kNone | |
kRho | |
kPhi | |
kNParamSmear |
Definition at line 142 of file EnergyScaleCorrection_class.h.
EnergyScaleCorrection_class::EnergyScaleCorrection_class | ( | std::string | correctionFileName, |
unsigned int | genSeed = 0 |
||
) |
Definition at line 19 of file EnergyScaleCorrection_class.cc.
References ecal_dqm_sourceclient-live_cfg::cerr, cmsRelvalreport::exit, lut2db_cfg::filename, ReadFromFile(), ReadSmearingFromFile(), scales, smearings, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 153 of file EnergyScaleCorrection_class.h.
EnergyScaleCorrection_class::~EnergyScaleCorrection_class | ( | void | ) |
dummy constructor needed in ElectronEnergyCalibratorRun2
Definition at line 45 of file EnergyScaleCorrection_class.cc.
|
private |
Definition at line 193 of file EnergyScaleCorrection_class.cc.
References eostools::cat(), ecal_dqm_sourceclient-live_cfg::cerr, corr, gather_cfg::cout, cmsRelvalreport::exit, correctionCategory_class::runmax, correctionCategory_class::runmin, correctionValue_class::scale, correctionValue_class::scale_err, correctionValue_class::scale_err_syst, and scales.
Referenced by ReadFromFile().
|
private |
Definition at line 221 of file EnergyScaleCorrection_class.cc.
References eostools::cat(), ecal_dqm_sourceclient-live_cfg::cerr, corr, gather_cfg::cout, correctionValue_class::Emean, correctionValue_class::Emean_err, cmsRelvalreport::exit, phi, correctionValue_class::phi, correctionValue_class::phi_err, rho, correctionValue_class::rho, correctionValue_class::rho_err, correctionCategory_class::runmax, correctionCategory_class::runmin, and smearings.
Referenced by ReadSmearingFromFile().
|
private |
returns the correction value class
Definition at line 86 of file EnergyScaleCorrection_class.cc.
References python.rootplot.argparse::category, gather_cfg::cout, and scales.
Referenced by getScaleStatUncertainty(), and getScaleSystUncertainty().
|
private |
Definition at line 119 of file EnergyScaleCorrection_class.cc.
References python.rootplot.argparse::category, gather_cfg::cout, correctionValue_class::scale, and scales.
Referenced by ScaleCorrection().
|
private |
Definition at line 73 of file EnergyScaleCorrection_class.cc.
References getScaleCorrection(), and correctionValue_class::scale_err.
Referenced by ScaleCorrectionUncertainty().
|
private |
Definition at line 79 of file EnergyScaleCorrection_class.cc.
References getScaleCorrection(), and correctionValue_class::scale_err_syst.
Referenced by ScaleCorrectionUncertainty().
float EnergyScaleCorrection_class::getSmearingRho | ( | int | runNumber, |
bool | isEBEle, | ||
float | R9Ele, | ||
float | etaSCEle, | ||
float | EtEle | ||
) | const |
public for sigmaE estimate
Definition at line 395 of file EnergyScaleCorrection_class.cc.
References python.rootplot.argparse::category, smearings, and smearings_not_defined.
float EnergyScaleCorrection_class::getSmearingSigma | ( | int | runNumber, |
bool | isEBEle, | ||
float | R9Ele, | ||
float | etaSCEle, | ||
float | EtEle, | ||
paramSmear_t | par, | ||
float | nSigma = 0. |
||
) | const |
Definition at line 354 of file EnergyScaleCorrection_class.cc.
Referenced by PhotonEnergyCalibratorRun2::calibrate(), and ElectronEnergyCalibratorRun2::calibrate().
float EnergyScaleCorrection_class::getSmearingSigma | ( | int | runNumber, |
bool | isEBEle, | ||
float | R9Ele, | ||
float | etaSCEle, | ||
float | EtEle, | ||
float | nSigma_rho, | ||
float | nSigma_phi | ||
) | const |
Definition at line 361 of file EnergyScaleCorrection_class.cc.
References alpha, python.rootplot.argparse::category, ecal_dqm_sourceclient-live_cfg::cerr, funct::cos(), gather_cfg::cout, phi, rho, funct::sin(), smearings, smearings_not_defined, and mathSSE::sqrt().
|
private |
category "runNumber" runMin runMax deltaP err_deltaP_per_bin err_deltaP_stat err_deltaP_syst
Input file structure: category "runNumber" runMin runMax deltaP err_deltaP(stat on single bins) err_deltaP_stat(to be used) err_deltaP_syst(to be used)
Definition at line 158 of file EnergyScaleCorrection_class.cc.
References AddScale(), python.rootplot.argparse::category, ecal_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, cmsRelvalreport::exit, and contentValuesFiles::fullPath.
Referenced by EnergyScaleCorrection_class().
|
private |
File structure: category constTerm alpha;.
File structure: EBlowEtaBad8TeV 0 0.0 1.0 -999. 0.94 -999999 999999 6.73 0. 7.7e-3 6.32e-4 0.00 0.16 EBlowEtaGold8TeV 0 0.0 1.0 0.94 999. -999999 999999 6.60 0. 7.4e-3 6.50e-4 0.00 0.16 EBhighEtaBad8TeV 0 1.0 1.5 -999. 0.94 -999999 999999 6.73 0. 1.26e-2 1.03e-3 0.00 0.07 EBhighEtaGold8TeV 0 1.0 1.5 0.94 999. -999999 999999 6.52 0. 1.12e-2 1.32e-3 0.00 0.22
EElowEtaBad8TeV 0 1.5 2.0 -999. 0.94 -999999 999999 0. 0. 1.98e-2 3.03e-3 0. 0. EElowEtaGold8TeV 0 1.5 2.0 0.94 999. -999999 999999 0. 0. 1.63e-2 1.22e-3 0. 0. EEhighEtaBad8TeV 0 2.0 3.0 -999. 0.94 -999999 999999 0. 0. 1.92e-2 9.22e-4 0. 0. EEhighEtaGold8TeV 0 2.0 3.0 0.94 999. -999999 999999 0. 0. 1.86e-2 7.81e-4 0. 0.
Definition at line 272 of file EnergyScaleCorrection_class.cc.
References AddSmearing(), assert(), python.rootplot.argparse::category, ecal_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, ECALELF, HLT_25ns10e33_v2_cff::etaMax, HLT_25ns10e33_v2_cff::etaMin, cmsRelvalreport::exit, contentValuesFiles::fullPath, GLOBE, M_PI_2, phi, rho, smearingType_, AlCaHLTBitMon_QueryRunRegistry::string, and UNKNOWN.
Referenced by EnergyScaleCorrection_class().
float EnergyScaleCorrection_class::ScaleCorrection | ( | unsigned int | runNumber, |
bool | isEBEle, | ||
double | R9Ele, | ||
double | etaSCEle, | ||
double | EtEle | ||
) | const |
method to get energy scale corrections
Definition at line 52 of file EnergyScaleCorrection_class.cc.
References doScale, and getScaleOffset().
Referenced by PhotonEnergyCalibratorRun2::calibrate(), and ElectronEnergyCalibratorRun2::calibrate().
float EnergyScaleCorrection_class::ScaleCorrectionUncertainty | ( | unsigned int | runNumber, |
bool | isEBEle, | ||
double | R9Ele, | ||
double | etaSCEle, | ||
double | EtEle | ||
) | const |
method to get scale correction uncertainties: it's stat+syst in eta x R9 categories
Definition at line 63 of file EnergyScaleCorrection_class.cc.
References getScaleStatUncertainty(), getScaleSystUncertainty(), and mathSSE::sqrt().
|
inline |
Definition at line 192 of file EnergyScaleCorrection_class.h.
References smearingType_, UNKNOWN, and relativeConstraints::value.
bool EnergyScaleCorrection_class::doScale |
Definition at line 149 of file EnergyScaleCorrection_class.h.
Referenced by ElectronEnergyCalibratorRun2::ElectronEnergyCalibratorRun2(), PhotonEnergyCalibratorRun2::PhotonEnergyCalibratorRun2(), and ScaleCorrection().
bool EnergyScaleCorrection_class::doSmearings |
Definition at line 149 of file EnergyScaleCorrection_class.h.
Referenced by ElectronEnergyCalibratorRun2::ElectronEnergyCalibratorRun2(), and PhotonEnergyCalibratorRun2::PhotonEnergyCalibratorRun2().
|
private |
Definition at line 185 of file EnergyScaleCorrection_class.h.
Referenced by AddScale(), EnergyScaleCorrection_class(), getScaleCorrection(), and getScaleOffset().
|
private |
Definition at line 185 of file EnergyScaleCorrection_class.h.
|
private |
Definition at line 186 of file EnergyScaleCorrection_class.h.
Referenced by AddSmearing(), EnergyScaleCorrection_class(), getSmearingRho(), and getSmearingSigma().
|
private |
Definition at line 186 of file EnergyScaleCorrection_class.h.
Referenced by getSmearingRho(), and getSmearingSigma().
|
private |
Definition at line 183 of file EnergyScaleCorrection_class.h.
Referenced by ReadSmearingFromFile(), and SetSmearingType().