Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Random.h

Go to the documentation of this file.
00001 // -*- C++ -*- $Id: Random.h,v 1.2 2001/02/19 18:29:57 burnett Exp $
00002 //
00003 // This is the definition of the Random class.
00004 //
00005 // This developed from the Random class of MC++, and now simply uses
00006 // CLHEP's HepRandom, but provides static functions, 
00007 //
00008 // Author: Toby Burnett
00009 
00010 #ifndef __RANDOM_H
00011 #define __RANDOM_H
00012 #ifdef index
00013 #undef index 
00014 #endif
00015 
00016 #include "CLHEP/Random/Random.h"
00017 #include "CLHEP/Random/RandExponential.h"
00018 #include "CLHEP/Random/RandGauss.h"
00019 #include "CLHEP/Random/RandBreitWigner.h"
00020 #include "CLHEP/Random/RandFlat.h"
00021 
00027 class Random {
00028 
00029 
00030 public:
00031 
00032     static  double flat(){return RandFlat::shoot();}
00033     static  double flat(double width )
00034                          {return RandFlat::shoot(width);}
00035 
00036     static  double flat( double a, double b )
00037                          {return RandFlat::shoot(a,b);}
00038 /*
00039 
00040     static  double exponential()
00041                          {return RandExponential::shoot();}
00042 */
00043 
00044     static  double exponential( double mean )
00045                     {return RandExponential::shoot(mean);}
00046     static  double gauss( )
00047                     {return RandGauss::shoot();}
00048 /*
00049     static  double gauss( double mean, double variance )
00050                     {return RandGauss::shoot(mean, variance);}
00051 
00052     static  double breitWigner( double a, double b)
00053                     {return RandBreitWigner::shoot(a,b);}
00054 */
00055     static  double breitWigner( double a, double b, double c)
00056                     {return RandBreitWigner::shoot(a,b,c);}
00057 
00058     static HepRandom& generator(){return *HepRandom::getTheGenerator();}
00059 };
00060 
00061 #endif
00062 

Generated at Mon Nov 26 18:18:34 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000