]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenBase/EvtRandomEngine.hh
AliDecayer realisation for the EvtGen code and EvtGen itself.
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtRandomEngine.hh
1 //--------------------------------------------------------------------------
2 //
3 // Environment:
4 //      This software is part of the EvtGen package developed jointly
5 //      for the BaBar and CLEO collaborations.  If you use all or part
6 //      of it, please give an appropriate acknowledgement.
7 //
8 // Copyright Information: See EvtGen/COPYRIGHT
9 //      Copyright (C) 1998      Caltech, UCSB
10 //
11 // Module: EvtGen/EvtRandom.hh
12 //
13 // Description:Class to generate random numbers. Single member
14 //             function random is expected to return a random
15 //             number in the range ]0..1[.
16 //
17 // Modification history:
18 //
19 //    RYD     December 25, 1999         Module created
20 //    RYD     October 2, 2006           Converted to a pure interface class 
21 //
22 //------------------------------------------------------------------------
23
24 #ifndef EVTRANDOMENGINE_HH
25 #define EVTRANDOMENGINE_HH
26
27 #include <TRandom.h>
28
29 class EvtRandomEngine{
30
31 public:
32
33   virtual ~EvtRandomEngine() {};
34
35   virtual double random()=0;
36
37 private:
38
39 };
40
41 //define class for generating random numbers (I put this in place of the commented part)
42 class EvtNUMRandomEngine:public EvtRandomEngine{
43 public:
44   double random(){return  gRandom->Rndm();}
45 };
46
47
48 //old lines: those are in the macro testEvtGen.cc    
49 /*
50 //define class for generating random numbers
51 class EvtCLHEPRandomEngine:public EvtRandomEngine{
52 public:
53   double random();
54 };
55
56 #ifdef NOCLHEPNAMESPACE
57 namespace CLHEP {
58 typedef HepJamesRandom HepJamesRandom ;
59 }
60 #endif
61
62 double EvtCLHEPRandomEngine::random(){
63   static CLHEP::HepJamesRandom randengine;
64   return randengine.flat();
65 }
66 */
67
68 #endif
69
70