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();