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 MessageLogger_cfi::cerr, cmsRelvalreport::exit, corrVsCorr::filename, ReadFromFile(), ReadSmearingFromFile(), scales, smearings, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 153 of file EnergyScaleCorrection_class.h.
References corrVsCorr::filename, gsfElectronCkfTrackCandidateMaker_cff::nSigma, and convertSQLiteXML::runNumber.
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(), MessageLogger_cfi::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(), MessageLogger_cfi::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 taus_updatedMVAIds_cff::category, gather_cfg::cout, and scales.
Referenced by getScaleStatUncertainty(), and getScaleSystUncertainty().
|
private |
Definition at line 119 of file EnergyScaleCorrection_class.cc.
References taus_updatedMVAIds_cff::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 396 of file EnergyScaleCorrection_class.cc.
References taus_updatedMVAIds_cff::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 355 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 362 of file EnergyScaleCorrection_class.cc.
References alpha, taus_updatedMVAIds_cff::category, MessageLogger_cfi::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(), taus_updatedMVAIds_cff::category, MessageLogger_cfi::cerr, gather_cfg::cout, and cmsRelvalreport::exit.
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(), taus_updatedMVAIds_cff::category, MessageLogger_cfi::cerr, gather_cfg::cout, ECALELF, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, cmsRelvalreport::exit, GLOBE, M_PI_2, phi, photonValidator_cfi::r9Max, photonValidator_cfi::r9Min, 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 pat::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().