Geant4-11
RandGauss.icc
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// -----------------------------------------------------------------------
4// HEP Random
5// --- RandGauss ---
6// inlined functions implementation file
7// -----------------------------------------------------------------------
8// This file is part of Geant4 (simulation toolkit for HEP).
9
10// =======================================================================
11// Gabriele Cosmo - Created: 19th August 1998
12// =======================================================================
13
14namespace CLHEP {
15
16inline RandGauss::RandGauss(HepRandomEngine & anEngine, double mean,
17 double stdDev )
18: HepRandom(), defaultMean(mean), defaultStdDev(stdDev),
19 localEngine(&anEngine, do_nothing_deleter()), set(false), nextGauss(0.0){}
20
21inline RandGauss::RandGauss(HepRandomEngine * anEngine, double mean,
22 double stdDev )
23: HepRandom(), defaultMean(mean), defaultStdDev(stdDev),
24 localEngine(anEngine), set(false), nextGauss(0.0) {}
25
26inline double RandGauss::shoot(double mean, double stdDev) {
27 return shoot()*stdDev + mean;
28}
29
30inline double RandGauss::shoot(HepRandomEngine* anEngine,
31 double mean, double stdDev) {
32 return shoot(anEngine)*stdDev + mean;
33}
34
35inline double RandGauss::fire() {
36 return normal()*defaultStdDev + defaultMean;
37}
38
39inline double RandGauss::fire(double mean, double stdDev) {
40 return normal()*stdDev + mean;
41}
42
43} // namespace CLHEP