#include <PhotonEnergyCalibrator.h>
Public Types | |
enum | EventType { EventType::DATA, EventType::MC } |
Public Member Functions | |
std::array< float, EGEnergySysIndex::kNrSysErrs > | calibrate (reco::Photon &photon, const unsigned int runNumber, const EcalRecHitCollection *recHits, edm::StreamID const &id, const EventType eventType) const |
std::array< float, EGEnergySysIndex::kNrSysErrs > | calibrate (reco::Photon &photon, const unsigned int runNumber, const EcalRecHitCollection *recHits, const float smearNrSigma, const EventType eventType) const |
void | initPrivateRng (TRandom *rnd) |
PhotonEnergyCalibrator () | |
PhotonEnergyCalibrator (const std::string &correctionFile) | |
void | setMinEt (float val) |
~PhotonEnergyCalibrator () | |
Private Member Functions | |
double | gauss (edm::StreamID const &id) const |
void | setEnergyAndSystVarations (const float scale, const float smearNrSigma, const float et, const EnergyScaleCorrection::ScaleCorrection &scaleCorr, const EnergyScaleCorrection::SmearCorrection &smearCorr, reco::Photon &photon, std::array< float, EGEnergySysIndex::kNrSysErrs > &energyData) const |
Private Attributes | |
EnergyScaleCorrection | correctionRetriever_ |
float | minEt_ |
TRandom * | rng_ |
Static Private Attributes | |
static const EnergyScaleCorrection::ScaleCorrection | defaultScaleCorr_ |
static const EnergyScaleCorrection::SmearCorrection | defaultSmearCorr_ |
Definition at line 20 of file PhotonEnergyCalibrator.h.
|
strong |
Enumerator | |
---|---|
DATA | |
MC |
Definition at line 22 of file PhotonEnergyCalibrator.h.
|
inline |
Definition at line 27 of file PhotonEnergyCalibrator.h.
PhotonEnergyCalibrator::PhotonEnergyCalibrator | ( | const std::string & | correctionFile | ) |
Definition at line 12 of file PhotonEnergyCalibrator.cc.
|
inline |
Definition at line 29 of file PhotonEnergyCalibrator.h.
std::array< float, EGEnergySysIndex::kNrSysErrs > PhotonEnergyCalibrator::calibrate | ( | reco::Photon & | photon, |
const unsigned int | runNumber, | ||
const EcalRecHitCollection * | recHits, | ||
edm::StreamID const & | id, | ||
const EventType | eventType | ||
) | const |
Correct this photon. StreamID is needed when used with CMSSW Random Number Generator
Definition at line 17 of file PhotonEnergyCalibrator.cc.
References hcalcalib_dqm_sourceclient-live_cfg::eventType, gauss(), displacedMuons_cfi::photon, FastTrackerRecHitMaskProducer_cfi::recHits, and convertSQLiteXML::runNumber.
std::array< float, EGEnergySysIndex::kNrSysErrs > PhotonEnergyCalibrator::calibrate | ( | reco::Photon & | photon, |
const unsigned int | runNumber, | ||
const EcalRecHitCollection * | recHits, | ||
const float | smearNrSigma, | ||
const EventType | eventType | ||
) | const |
Definition at line 26 of file PhotonEnergyCalibrator.cc.
References funct::abs(), correctionRetriever_, DATA, defaultScaleCorr_, defaultSmearCorr_, EgHLTOffHistBins_cfi::et, hcalcalib_dqm_sourceclient-live_cfg::eventType, EnergyScaleCorrection::getScaleCorr(), EnergyScaleCorrection::getSmearCorr(), edm::isNotFinite(), EGEnergySysIndex::kEcalErrPostCorr, EGEnergySysIndex::kEcalErrPreCorr, EGEnergySysIndex::kEcalTrkErrPostCorr, EGEnergySysIndex::kEcalTrkErrPreCorr, EGEnergySysIndex::kEcalTrkPostCorr, EGEnergySysIndex::kEcalTrkPreCorr, EcalRecHit::kHasSwitchToGain1, EcalRecHit::kHasSwitchToGain6, EGEnergySysIndex::kScaleValue, EGEnergySysIndex::kSmearNrSigma, EGEnergySysIndex::kSmearValue, MC, minEt_, displacedMuons_cfi::photon, FastTrackerRecHitMaskProducer_cfi::recHits, convertSQLiteXML::runNumber, EnergyScaleCorrection::ScaleCorrection::scale(), setEnergyAndSystVarations(), and EnergyScaleCorrection::SmearCorrection::sigma().
|
private |
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 144 of file PhotonEnergyCalibrator.cc.
References Exception, edm::RandomNumberGenerator::getEngine(), edm::Service< T >::isAvailable(), and rng_.
Referenced by calibrate().
void PhotonEnergyCalibrator::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 15 of file PhotonEnergyCalibrator.cc.
References rng_.
Referenced by CalibratedPhotonProducerT< T >::CalibratedPhotonProducerT().
|
private |
Definition at line 89 of file PhotonEnergyCalibrator.cc.
References alignCSCRings::corr, EgHLTOffHistBins_cfi::et, EGEnergySysIndex::kEcalErrPostCorr, EGEnergySysIndex::kEcalErrPreCorr, EGEnergySysIndex::kEcalPostCorr, EGEnergySysIndex::kEcalPreCorr, EnergyScaleCorrection::kErrStatSystGain, EGEnergySysIndex::kScaleDown, EGEnergySysIndex::kScaleGainDown, EGEnergySysIndex::kScaleGainUp, EGEnergySysIndex::kScaleStatDown, EGEnergySysIndex::kScaleStatUp, EGEnergySysIndex::kScaleSystDown, EGEnergySysIndex::kScaleSystUp, EGEnergySysIndex::kScaleUp, EGEnergySysIndex::kSmearDown, EGEnergySysIndex::kSmearPhiDown, EGEnergySysIndex::kSmearPhiUp, EGEnergySysIndex::kSmearRhoDown, EGEnergySysIndex::kSmearRhoUp, EGEnergySysIndex::kSmearUp, displacedMuons_cfi::photon, pfClustersFromCombinedCaloHF_cfi::scale, EnergyScaleCorrection::ScaleCorrection::scaleErr(), EnergyScaleCorrection::ScaleCorrection::scaleErrGain(), EnergyScaleCorrection::ScaleCorrection::scaleErrStat(), EnergyScaleCorrection::ScaleCorrection::scaleErrSyst(), and EnergyScaleCorrection::SmearCorrection::sigma().
Referenced by calibrate().
|
inline |
Definition at line 36 of file PhotonEnergyCalibrator.h.
References minEt_, and heppy_batch::val.
Referenced by CalibratedPhotonProducerT< T >::CalibratedPhotonProducerT().
|
private |
Definition at line 67 of file PhotonEnergyCalibrator.h.
Referenced by calibrate().
|
staticprivate |
Definition at line 72 of file PhotonEnergyCalibrator.h.
Referenced by calibrate().
|
staticprivate |
Definition at line 73 of file PhotonEnergyCalibrator.h.
Referenced by calibrate().
|
private |
Definition at line 69 of file PhotonEnergyCalibrator.h.
Referenced by calibrate(), and setMinEt().
|
private |
Definition at line 68 of file PhotonEnergyCalibrator.h.
Referenced by gauss(), and initPrivateRng().