Go to the documentation of this file.
2 #include <CLHEP/Random/RandGaussQ.h>
11 : epCombinationTool_(&combinator),
39 float smear = 0.0,
scale = 1.0;
41 float et =
electron.getNewEnergy() / cosh(aeta);
47 double newEcalEnergy, newEcalEnergyError;
51 newEcalEnergyError = std::hypot(
electron.getNewEnergyError() *
corr, smear * newEcalEnergy);
54 newEcalEnergyError = std::hypot(
electron.getNewEnergyError() *
scale, smear * newEcalEnergy);
56 electron.setNewEnergy(newEcalEnergy);
57 electron.setNewEnergyError(newEcalEnergyError);
70 <<
"XXXXXXX requires the RandomNumberGeneratorService\n"
71 "which is not present in the configuration file. You must add the service\n"
72 "in the configuration file or remove the modules that require it.";
74 CLHEP::RandGaussQ gaussDistribution(rng->
getEngine(
id), 0.0, 1.0);
75 return gaussDistribution.fire();
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
double gauss(edm::StreamID const &id) const
EnergyScaleCorrection_class _correctionRetriever
ElectronEnergyCalibratorRun2()
float getSmearingSigma(int runNumber, bool isEBEle, float R9Ele, float etaSCEle, float EtEle, paramSmear_t par, float nSigma=0.) const
EpCombinationTool * epCombinationTool_
float ScaleCorrection(unsigned int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle) const
method to get energy scale corrections
~ElectronEnergyCalibratorRun2()
void calibrate(SimpleElectron &electron, edm::StreamID const &id=edm::StreamID::invalidStreamID()) const
void writeTo(reco::GsfElectron &out) const
void initPrivateRng(TRandom *rnd)
Abs< T >::type abs(const T &t)