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 118 of file EnergyScaleCorrection_class.h.
Enumerator | |
---|---|
UNKNOWN | |
GLOBE | |
ECALELF_TOY | |
ECALELF |
Definition at line 120 of file EnergyScaleCorrection_class.h.
Enumerator | |
---|---|
kNone | |
kRho | |
kPhi | |
kNParamSmear |
Definition at line 122 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 DMR_cfg::cerr, beamvalidation::exit(), corrVsCorr::filename, ReadFromFile(), ReadSmearingFromFile(), scales, smearings, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 128 of file EnergyScaleCorrection_class.h.
EnergyScaleCorrection_class::~EnergyScaleCorrection_class | ( | void | ) |
dummy constructor needed in ElectronEnergyCalibratorRun2
Definition at line 42 of file EnergyScaleCorrection_class.cc.
|
private |
Definition at line 175 of file EnergyScaleCorrection_class.cc.
References eostools::cat(), DMR_cfg::cerr, alignCSCRings::corr, gather_cfg::cout, beamvalidation::exit(), and scales.
Referenced by ReadFromFile().
|
private |
Definition at line 202 of file EnergyScaleCorrection_class.cc.
References eostools::cat(), DMR_cfg::cerr, alignCSCRings::corr, gather_cfg::cout, beamvalidation::exit(), phi, rho, and smearings.
Referenced by ReadSmearingFromFile().
|
private |
returns the correction value class
Definition at line 71 of file EnergyScaleCorrection_class.cc.
References validateAlignments::category, gather_cfg::cout, convertSQLiteXML::runNumber, and scales.
Referenced by getScaleStatUncertainty(), and getScaleSystUncertainty().
|
private |
Definition at line 105 of file EnergyScaleCorrection_class.cc.
References validateAlignments::category, gather_cfg::cout, convertSQLiteXML::runNumber, correctionValue_class::scale, and scales.
Referenced by ScaleCorrection().
|
private |
Definition at line 61 of file EnergyScaleCorrection_class.cc.
References getScaleCorrection(), convertSQLiteXML::runNumber, and correctionValue_class::scale_err.
Referenced by ScaleCorrectionUncertainty().
|
private |
Definition at line 66 of file EnergyScaleCorrection_class.cc.
References getScaleCorrection(), convertSQLiteXML::runNumber, 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 376 of file EnergyScaleCorrection_class.cc.
References validateAlignments::category, convertSQLiteXML::runNumber, 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 336 of file EnergyScaleCorrection_class.cc.
References kPhi, kRho, HLTSiStripMonitoring_cff::nSigma, and convertSQLiteXML::runNumber.
Referenced by ElectronEnergyCalibratorRun2::calibrate(), and PhotonEnergyCalibratorRun2::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 345 of file EnergyScaleCorrection_class.cc.
References simBeamSpotPI::alpha, validateAlignments::category, DMR_cfg::cerr, funct::cos(), gather_cfg::cout, phi, rho, convertSQLiteXML::runNumber, 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 144 of file EnergyScaleCorrection_class.cc.
References AddScale(), validateAlignments::category, DMR_cfg::cerr, gather_cfg::cout, beamvalidation::exit(), corrVsCorr::filename, contentValuesFiles::fullPath, test_db_connect::runMax, and test_db_connect::runMin.
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 257 of file EnergyScaleCorrection_class.cc.
References AddSmearing(), cms::cuda::assert(), validateAlignments::category, DMR_cfg::cerr, gather_cfg::cout, ECALELF, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, beamvalidation::exit(), 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_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 44 of file EnergyScaleCorrection_class.cc.
References pfMETCorrectionType0_cfi::correction, doScale, getScaleOffset(), and convertSQLiteXML::runNumber.
Referenced by ElectronEnergyCalibratorRun2::calibrate(), and PhotonEnergyCalibratorRun2::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 53 of file EnergyScaleCorrection_class.cc.
References getScaleStatUncertainty(), getScaleSystUncertainty(), convertSQLiteXML::runNumber, and mathSSE::sqrt().
|
inline |
Definition at line 194 of file EnergyScaleCorrection_class.h.
References smearingType_, UNKNOWN, and relativeConstraints::value.
bool EnergyScaleCorrection_class::doScale |
Definition at line 124 of file EnergyScaleCorrection_class.h.
Referenced by ElectronEnergyCalibratorRun2::ElectronEnergyCalibratorRun2(), PhotonEnergyCalibratorRun2::PhotonEnergyCalibratorRun2(), and ScaleCorrection().
bool EnergyScaleCorrection_class::doSmearings |
Definition at line 124 of file EnergyScaleCorrection_class.h.
Referenced by ElectronEnergyCalibratorRun2::ElectronEnergyCalibratorRun2(), and PhotonEnergyCalibratorRun2::PhotonEnergyCalibratorRun2().
|
private |
Definition at line 180 of file EnergyScaleCorrection_class.h.
Referenced by AddScale(), EnergyScaleCorrection_class(), getScaleCorrection(), and getScaleOffset().
|
private |
Definition at line 180 of file EnergyScaleCorrection_class.h.
|
private |
Definition at line 181 of file EnergyScaleCorrection_class.h.
Referenced by AddSmearing(), EnergyScaleCorrection_class(), getSmearingRho(), and getSmearingSigma().
|
private |
Definition at line 181 of file EnergyScaleCorrection_class.h.
Referenced by getSmearingRho(), and getSmearingSigma().
|
private |
Definition at line 178 of file EnergyScaleCorrection_class.h.
Referenced by ReadSmearingFromFile(), and SetSmearingType().