#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.
References _correctionRetriever, EnergyScaleCorrection_class::doScale, EnergyScaleCorrection_class::doSmearings, and isMC_.
PhotonEnergyCalibratorRun2::~PhotonEnergyCalibratorRun2 | ( | ) |
Definition at line 22 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 34 of file PhotonEnergyCalibratorRun2.cc.
References _correctionRetriever, funct::abs(), cms::cuda::assert(), alignCSCRings::corr, EgHLTOffHistBins_cfi::et, gauss(), EnergyScaleCorrection_class::getSmearingSigma(), Matriplex::hypot(), isMC_, displacedMuons_cfi::photon, l1tEGammaCrystalsEmulatorProducer_cfi::scale, and EnergyScaleCorrection_class::ScaleCorrection().
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 26 of file PhotonEnergyCalibratorRun2.cc.
References calibrate(), isMC_, displacedMuons_cfi::photon, convertSQLiteXML::runNumber, 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 56 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 24 of file PhotonEnergyCalibratorRun2.cc.
References rng_.
Referenced by CalibratedPhotonProducerRun2T< T >::CalibratedPhotonProducerRun2T().
|
protected |
Definition at line 46 of file PhotonEnergyCalibratorRun2.h.
Referenced by calibrate(), and PhotonEnergyCalibratorRun2().
|
protected |
Definition at line 37 of file PhotonEnergyCalibratorRun2.h.
Referenced by calibrate(), and PhotonEnergyCalibratorRun2().
|
protected |
Definition at line 38 of file PhotonEnergyCalibratorRun2.h.
Referenced by gauss(), and initPrivateRng().
|
protected |
Definition at line 40 of file PhotonEnergyCalibratorRun2.h.
|
protected |
Definition at line 39 of file PhotonEnergyCalibratorRun2.h.
|
protected |
Definition at line 37 of file PhotonEnergyCalibratorRun2.h.
Referenced by gauss().