PandaRoot
3.52/src/utilities/PhotosRandom.h
Go to the documentation of this file.
1 #ifndef _PhotosRandom_included_
2 #define _PhotosRandom_included_
3 
17 namespace Photospp {
18 
19 class PhotosRandom {
20  public:
21  /* Change the seed. Default is s1=1802 and s2=9373
22  These values must be in range [0,31327] and [0,30080] respectively */
23  static void setSeed(int s1, int s2);
24 
25  /* Initialization routine. Must be called at least once before
26  the generator can be used. */
27  static void initialize();
28 
29  /* Uniform distribution between 0 and 1 */
30  static double randomReal();
31 
32  protected:
33  static bool init;
34  static int iseed[2];
35  static int i97;
36  static int j97;
37  static double uran[97];
38  static double cran;
39  static const double cdran;
40  static const double cmran;
41 };
42 
43 } // namespace Photospp
44 #endif
Photos random number generator rewritten from PHOTOS FORTRAN.
static const double cmran
Definition: PhotosRandom.h:40
Definition: Log.h:30
static void initialize()
static int iseed[2]
Definition: PhotosRandom.h:34
static const double cdran
Definition: PhotosRandom.h:39
static double cran
Definition: PhotosRandom.h:38
static void setSeed(int s1, int s2)
static double randomReal()
static double uran[97]
Definition: PhotosRandom.h:37