#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.
References calibrate(), electrons_cff::correctionFile, initPrivateRng(), edm::StreamID::invalidStreamID(), ElectronMVANtuplizer_cfg::isMC, muons2muons_cfi::photon, convertSQLiteXML::runNumber, AlCaHLTBitMon_QueryRunRegistry::string, and ~PhotonEnergyCalibratorRun2().
PhotonEnergyCalibratorRun2::PhotonEnergyCalibratorRun2 | ( | bool | isMC, |
bool | synchronization, | ||
std::string | correctionFile | ||
) |
Definition at line 7 of file PhotonEnergyCalibratorRun2.cc.
References _correctionRetriever, EnergyScaleCorrection_class::doScale, EnergyScaleCorrection_class::doSmearings, and isMC_.
PhotonEnergyCalibratorRun2::~PhotonEnergyCalibratorRun2 | ( | ) |
Definition at line 23 of file PhotonEnergyCalibratorRun2.cc.
Referenced by PhotonEnergyCalibratorRun2().
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 36 of file PhotonEnergyCalibratorRun2.cc.
References _correctionRetriever, funct::abs(), corr, stringResolutionProvider_cfi::et, gauss(), SimplePhoton::getEta(), SimplePhoton::getNewEnergy(), SimplePhoton::getNewEnergyError(), SimplePhoton::getR9(), SimplePhoton::getRunNumber(), EnergyScaleCorrection_class::getSmearingSigma(), SimplePhoton::isEB(), SimplePhoton::isMC(), isMC_, Scenarios_cff::scale, EnergyScaleCorrection_class::ScaleCorrection(), SimplePhoton::setNewEnergy(), and SimplePhoton::setNewEnergyError().
Referenced by calibrate(), PhotonEnergyCalibratorRun2(), and CalibratedPhotonProducerRun2T< T >::produce().
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 30 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 59 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 26 of file PhotonEnergyCalibratorRun2.cc.
References rng_.
Referenced by CalibratedPhotonProducerRun2T< T >::CalibratedPhotonProducerRun2T(), and PhotonEnergyCalibratorRun2().
|
protected |
Definition at line 44 of file PhotonEnergyCalibratorRun2.h.
Referenced by calibrate(), and PhotonEnergyCalibratorRun2().
|
protected |
Definition at line 35 of file PhotonEnergyCalibratorRun2.h.
Referenced by calibrate(), and PhotonEnergyCalibratorRun2().
|
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().