00001 //-------------------------------------------------------------------------- 00002 // 00003 // Environment: 00004 // This software is part of the EvtGen package developed jointly 00005 // for the BaBar and CLEO collaborations. If you use all or part 00006 // of it, please give an appropriate acknowledgement. 00007 // 00008 // Copyright Information: See EvtGen/COPYRIGHT 00009 // Copyright (C) 1998 Caltech, UCSB 00010 // 00011 // Module: EvtGen/EvtRandom.hh 00012 // 00013 // Description:Source of random numbers for EvtGen code 00014 // 00015 // Modification history: 00016 // 00017 // RYD March 24, 1998 Module created 00018 // 00019 //------------------------------------------------------------------------ 00020 00021 #ifndef KKMCRANDOM_H 00022 #define KKMCRANDOM_H 00023 00024 #include "CLHEP/Random/RandomEngine.h" 00025 00026 00027 class KKMCRandom{ 00028 00029 public: 00030 00031 static double Flat(double min, double max); 00032 static double Flat(double max); 00033 static double Flat(); 00034 static void FlatArray(double* vect, const int size); 00035 00036 static double random(); 00037 00038 //This class does not take ownership of the random engine; 00039 //the caller needs to make sure that the engine is not 00040 //destroyed. 00041 static void setRandomEngine(CLHEP::HepRandomEngine* randomEngine); 00042 00043 private: 00044 00045 static CLHEP::HepRandomEngine* _randomEngine; 00046 00047 }; 00048 00049 #endif 00050