#include <PhotonEnergyCalibratorRun2.h>
Public Member Functions | |
void | calibrate (SimplePhoton &photon, edm::StreamID const &id=edm::StreamID::invalidStreamID()) const |
void | calibrate (reco::Photon &photon, unsigned int runNumber, edm::StreamID const &id=edm::StreamID::invalidStreamID()) const |
void | initPrivateRng (TRandom *rnd) |
PhotonEnergyCalibratorRun2 () | |
PhotonEnergyCalibratorRun2 (bool isMC, bool synchronization, std::string correctionFile) | |
~PhotonEnergyCalibratorRun2 () | |
Protected Member Functions | |
double | gauss (edm::StreamID const &id) const |
Protected Attributes | |
EnergyScaleCorrection_class | _correctionRetriever |
bool | isMC_ |
TRandom * | rng_ |
std::vector< double > | scales_ |
std::vector< double > | smearings_ |
bool | synchronization_ |
Definition at line 11 of file PhotonEnergyCalibratorRun2.h.
|
inline |
Definition at line 14 of file PhotonEnergyCalibratorRun2.h.
PhotonEnergyCalibratorRun2::PhotonEnergyCalibratorRun2 | ( | bool | isMC, |
bool | synchronization, | ||
std::string | correctionFile | ||
) |
Definition at line 7 of file PhotonEnergyCalibratorRun2.cc.
PhotonEnergyCalibratorRun2::~PhotonEnergyCalibratorRun2 | ( | ) |
Definition at line 15 of file PhotonEnergyCalibratorRun2.cc.
void PhotonEnergyCalibratorRun2::calibrate | ( | SimplePhoton & | photon, |
edm::StreamID const & | id = edm::StreamID::invalidStreamID() |
||
) | const |
Correct this electron. StreamID is needed when used with CMSSW Random Number Generator
Definition at line 28 of file PhotonEnergyCalibratorRun2.cc.
References _correctionRetriever, funct::abs(), assert(), corr, gauss(), SimplePhoton::getEta(), SimplePhoton::getNewEnergy(), SimplePhoton::getNewEnergyError(), SimplePhoton::getR9(), SimplePhoton::getRunNumber(), EnergyScaleCorrection_class::getSmearingSigma(), SimplePhoton::isEB(), SimplePhoton::isMC(), isMC_, pileupReCalc_HLTpaths::scale, EnergyScaleCorrection_class::ScaleCorrection(), SimplePhoton::setNewEnergy(), and SimplePhoton::setNewEnergyError().
Referenced by calibrate().
void PhotonEnergyCalibratorRun2::calibrate | ( | reco::Photon & | photon, |
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 22 of file PhotonEnergyCalibratorRun2.cc.
References calibrate(), isMC_, PileupJetIDParams_cfi::simple, and SimplePhoton::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 51 of file PhotonEnergyCalibratorRun2.cc.
References Exception, edm::RandomNumberGenerator::getEngine(), edm::Service< T >::isAvailable(), rng_, and synchronization_.
Referenced by calibrate().
void PhotonEnergyCalibratorRun2::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 18 of file PhotonEnergyCalibratorRun2.cc.
References rng_.
|
protected |
Definition at line 44 of file PhotonEnergyCalibratorRun2.h.
Referenced by calibrate().
|
protected |
Definition at line 35 of file PhotonEnergyCalibratorRun2.h.
Referenced by calibrate().
|
protected |
Definition at line 36 of file PhotonEnergyCalibratorRun2.h.
Referenced by gauss(), and initPrivateRng().
|
protected |
Definition at line 38 of file PhotonEnergyCalibratorRun2.h.
|
protected |
Definition at line 37 of file PhotonEnergyCalibratorRun2.h.
|
protected |
Definition at line 35 of file PhotonEnergyCalibratorRun2.h.
Referenced by gauss().