1 #ifndef FastSimulation_Utilities_RandomEngineAndDistribution_H 2 #define FastSimulation_Utilities_RandomEngineAndDistribution_H 4 #include "CLHEP/Random/RandFlat.h" 5 #include "CLHEP/Random/RandGaussQ.h" 6 #include "CLHEP/Random/RandPoissonQ.h" 10 class HepRandomEngine;
14 class LuminosityBlockIndex;
27 CLHEP::HepRandomEngine&
theEngine()
const {
return *engine_; }
33 CLHEP::RandFlat flatDistribution(*engine_);
40 return rootEngine_->Gaus(
mean,sigma);
42 CLHEP::RandGaussQ gaussianDistribution(*engine_);
43 return mean + sigma * gaussianDistribution.fire();
49 return rootEngine_->Poisson(mean);
51 CLHEP::RandPoissonQ poissonDistribution(*engine_);
52 return poissonDistribution.fire(mean);
61 #endif // FastSimulation_Utilities_RandomEngineAndDistribution_H double flatShoot(double xmin=0.0, double xmax=1.0) const
CLHEP::HepRandomEngine & theEngine() const
CLHEP::HepRandomEngine * engine_
double gaussShoot(double mean=0.0, double sigma=1.0) const
unsigned int poissonShoot(double mean) const