Go to the documentation of this file.
2 #include <CLHEP/Random/RandGaussQ.h>
36 float smear = 0.0,
scale = 1.0;
38 float et =
photon.getNewEnergy() / cosh(aeta);
43 double newEcalEnergy, newEcalEnergyError;
47 newEcalEnergyError = std::hypot(
photon.getNewEnergyError() *
corr, smear * newEcalEnergy);
50 newEcalEnergyError = std::hypot(
photon.getNewEnergyError() *
scale, smear * newEcalEnergy);
52 photon.setNewEnergy(newEcalEnergy);
53 photon.setNewEnergyError(newEcalEnergyError);
65 <<
"XXXXXXX requires the RandomNumberGeneratorService\n"
66 "which is not present in the configuration file. You must add the service\n"
67 "in the configuration file or remove the modules that require it.";
69 CLHEP::RandGaussQ gaussDistribution(rng->
getEngine(
id), 0.0, 1.0);
70 return gaussDistribution.fire();
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
void writeTo(reco::Photon &out) const
double gauss(edm::StreamID const &id) const
float getSmearingSigma(int runNumber, bool isEBEle, float R9Ele, float etaSCEle, float EtEle, paramSmear_t par, float nSigma=0.) const
float ScaleCorrection(unsigned int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle) const
method to get energy scale corrections
Abs< T >::type abs(const T &t)
void calibrate(SimplePhoton &photon, edm::StreamID const &id=edm::StreamID::invalidStreamID()) const
EnergyScaleCorrection_class _correctionRetriever
void initPrivateRng(TRandom *rnd)
~PhotonEnergyCalibratorRun2()
PhotonEnergyCalibratorRun2()