Geant4  10.00.p03
RandLandau.icc
Go to the documentation of this file.
1 // $Id:$
2 // -*- C++ -*-
3 //
4 // -----------------------------------------------------------------------
5 // HEP Random
6 // --- RandLandau ---
7 // inlined functions implementation file
8 // -----------------------------------------------------------------------
9 // This file is part of Geant4 (simulation toolkit for HEP).
10 
11 // =======================================================================
12 // Gabriele Cosmo - Created: 19th August 1998
13 // M Fischler - Added some inline methods that had been in the .cc file,
14 // which are shells for calls to transform(r): 30 Sep 1999
15 // =======================================================================
16 
17 // Constructors
18 // ------------
19 
20 namespace CLHEP {
21 
22 RandLandau::RandLandau(HepRandomEngine & anEngine )
23 : HepRandom(), localEngine(&anEngine, do_nothing_deleter())
24 {}
25 
26 RandLandau::RandLandau(HepRandomEngine * anEngine )
27 : HepRandom(), localEngine(anEngine)
28 {}
29 
30 // Getting a Landau deviate - static methods
31 // -------------------------------------------
32 
33 double RandLandau::shoot()
34 {
35  HepRandomEngine* anEngine = HepRandom::getTheEngine();
36  return transform (anEngine->flat());
37 }
38 
39 double RandLandau::shoot( HepRandomEngine* anotherEngine )
40 {
41  return transform (anotherEngine->flat());
42 }
43 
44 // Getting a Landau deviate - instance methods
45 // ---------------------------------------------
46 
47 double RandLandau::fire() {
48  return transform(localEngine->flat());
49 }
50 
51 double RandLandau::operator()() {
52  return transform(localEngine->flat());
53 }
54 
55 } // namespace CLHEP