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