4 // -----------------------------------------------------------------------
7 // inlined functions implementation file
8 // -----------------------------------------------------------------------
9 // This file is part of Geant4 (simulation toolkit for HEP).
11 // =======================================================================
12 // M. Fischler - Created: 24 Janm 2000
14 // M. Fischler - Modified fire() to use local engine, not getTheEngine()
16 // =======================================================================
23 RandGaussQ::RandGaussQ(HepRandomEngine & anEngine, double mean,
25 : RandGauss(anEngine, mean, stdDev) {}
27 RandGaussQ::RandGaussQ(HepRandomEngine * anEngine, double mean,
29 : RandGauss(anEngine, mean, stdDev) {}
31 // Getting a Gaussian deviate - static methods
32 // -------------------------------------------
34 double RandGaussQ::shoot()
36 HepRandomEngine* anEngine = HepRandom::getTheEngine();
37 return transformQuick (anEngine->flat());
40 double RandGaussQ::shoot( HepRandomEngine* anotherEngine )
42 return transformQuick (anotherEngine->flat());
45 double RandGaussQ::shoot(double mean, double stdDev) {
46 return shoot()*stdDev + mean;
49 double RandGaussQ::shoot(HepRandomEngine* anotherEngine,
50 double mean, double stdDev) {
51 return shoot(anotherEngine)*stdDev + mean;
54 // Getting a Gaussian deviate - instance methods
55 // ---------------------------------------------
57 double RandGaussQ::fire() {
58 return transformQuick(localEngine->flat()) * defaultStdDev + defaultMean;
61 double RandGaussQ::fire(double mean, double stdDev) {
62 return transformQuick(localEngine->flat()) * stdDev + mean;