#include <ElectronEnergyCalibratorRun2.h>
Public Member Functions | |
void | calibrate (SimpleElectron &electron, edm::StreamID const &id=edm::StreamID::invalidStreamID()) const |
void | calibrate (reco::GsfElectron &electron, unsigned int runNumber, edm::StreamID const &id=edm::StreamID::invalidStreamID()) const |
ElectronEnergyCalibratorRun2 () | |
ElectronEnergyCalibratorRun2 (EpCombinationTool &combinator, bool isMC, bool synchronization, std::string) | |
void | initPrivateRng (TRandom *rnd) |
~ElectronEnergyCalibratorRun2 () | |
Protected Member Functions | |
double | gauss (edm::StreamID const &id) const |
Protected Attributes | |
EnergyScaleCorrection_class | _correctionRetriever |
EpCombinationTool * | epCombinationTool_ |
bool | isMC_ |
TRandom * | rng_ |
bool | synchronization_ |
Definition at line 13 of file ElectronEnergyCalibratorRun2.h.
|
inline |
Definition at line 16 of file ElectronEnergyCalibratorRun2.h.
ElectronEnergyCalibratorRun2::ElectronEnergyCalibratorRun2 | ( | EpCombinationTool & | combinator, |
bool | isMC, | ||
bool | synchronization, | ||
std::string | correctionFile | ||
) |
Definition at line 7 of file ElectronEnergyCalibratorRun2.cc.
References _correctionRetriever, EnergyScaleCorrection_class::doScale, EnergyScaleCorrection_class::doSmearings, and isMC_.
ElectronEnergyCalibratorRun2::~ElectronEnergyCalibratorRun2 | ( | ) |
Definition at line 26 of file ElectronEnergyCalibratorRun2.cc.
void ElectronEnergyCalibratorRun2::calibrate | ( | SimpleElectron & | electron, |
edm::StreamID const & | id = edm::StreamID::invalidStreamID() |
||
) | const |
Correct this electron. StreamID is needed when used with CMSSW Random Number Generator
Definition at line 40 of file ElectronEnergyCalibratorRun2.cc.
References _correctionRetriever, funct::abs(), assert(), EpCombinationTool::combine(), corr, epCombinationTool_, gauss(), SimpleElectron::getEta(), SimpleElectron::getNewEnergy(), SimpleElectron::getNewEnergyError(), SimpleElectron::getR9(), SimpleElectron::getRunNumber(), EnergyScaleCorrection_class::getSmearingSigma(), SimpleElectron::isEB(), SimpleElectron::isMC(), isMC_, pileupReCalc_HLTpaths::scale, EnergyScaleCorrection_class::ScaleCorrection(), SimpleElectron::setNewEnergy(), and SimpleElectron::setNewEnergyError().
Referenced by calibrate().
void ElectronEnergyCalibratorRun2::calibrate | ( | reco::GsfElectron & | electron, |
unsigned int | runNumber, | ||
edm::StreamID const & | id = edm::StreamID::invalidStreamID() |
||
) | const |
Correct this electron. StreamID is needed when used with CMSSW Random Number Generator
Definition at line 34 of file ElectronEnergyCalibratorRun2.cc.
References calibrate(), isMC_, PileupJetIDParams_cfi::simple, and SimpleElectron::writeTo().
|
protected |
Return a number distributed as a unit gaussian, drawn from the private RNG if initPrivateRng was called, or from the CMSSW RandomNumberGenerator service If synchronization is set to true, it returns a fixed number (1.0)
Definition at line 64 of file ElectronEnergyCalibratorRun2.cc.
References Exception, edm::RandomNumberGenerator::getEngine(), edm::Service< T >::isAvailable(), rng, rng_, and synchronization_.
Referenced by calibrate().
void ElectronEnergyCalibratorRun2::initPrivateRng | ( | TRandom * | rnd | ) |
Initialize with a random number generator (if not done, it will use the CMSSW service) Caller code owns the TRandom.
Definition at line 29 of file ElectronEnergyCalibratorRun2.cc.
References rng_.
|
protected |
Definition at line 44 of file ElectronEnergyCalibratorRun2.h.
Referenced by calibrate(), and ElectronEnergyCalibratorRun2().
|
protected |
Definition at line 36 of file ElectronEnergyCalibratorRun2.h.
Referenced by calibrate().
|
protected |
Definition at line 37 of file ElectronEnergyCalibratorRun2.h.
Referenced by calibrate(), and ElectronEnergyCalibratorRun2().
|
protected |
Definition at line 38 of file ElectronEnergyCalibratorRun2.h.
Referenced by gauss(), and initPrivateRng().
|
protected |
Definition at line 37 of file ElectronEnergyCalibratorRun2.h.
Referenced by gauss().