Geant4-11
RandGamma.icc
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// -----------------------------------------------------------------------
4// HEP Random
5// --- RandGamma ---
6// inlined functions implementation file
7// -----------------------------------------------------------------------
8
9// =======================================================================
10// Gabriele Cosmo - Created: 19th August 1998
11// =======================================================================
12
13namespace CLHEP {
14
15inline RandGamma::RandGamma(HepRandomEngine & anEngine, double k,
16 double lambda )
17: HepRandom(), localEngine(&anEngine, do_nothing_deleter()),
18 defaultK(k), defaultLambda(lambda) {}
19
20inline RandGamma::RandGamma(HepRandomEngine * anEngine, double k,
21 double lambda )
22: HepRandom(), localEngine(anEngine),
23 defaultK(k), defaultLambda(lambda) {}
24
25inline double RandGamma::shoot() {
26 return shoot( 1.0, 1.0 );
27}
28
29inline double RandGamma::shoot( HepRandomEngine* anEngine ) {
30 return shoot( anEngine, 1.0, 1.0 );
31}
32
33inline double RandGamma::operator()() {
34 return fire( defaultK, defaultLambda );
35}
36
37inline double RandGamma::operator()( double k, double lambda ) {
38 return fire( k, lambda );
39}
40
41inline double RandGamma::fire() {
42 return fire( defaultK, defaultLambda );
43}
44
45} // namespace CLHEP