Geant4  10.07
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RandGeneral Class Reference
Inheritance diagram for RandGeneral:
HepRandom

Public Member Functions

 RandGeneral (const double *aProbFunc, int theProbSize, int IntType=0)
 
 RandGeneral (HepRandomEngine &anEngine, const double *aProbFunc, int theProbSize, int IntType=0)
 
 RandGeneral (HepRandomEngine *anEngine, const double *aProbFunc, int theProbSize, int IntType=0)
 
virtual ~RandGeneral ()
 
double shoot ()
 
void shootArray (const int size, double *vect)
 
double shoot (HepRandomEngine *anEngine)
 
void shootArray (HepRandomEngine *anEngine, const int size, double *vect)
 
double fire ()
 
void fireArray (const int size, double *vect)
 
double operator() ()
 
std::ostream & put (std::ostream &os) const
 
std::istream & get (std::istream &is)
 
std::string name () const
 
HepRandomEngineengine ()
 
- Public Member Functions inherited from HepRandom
 HepRandom ()
 
 HepRandom (long seed)
 
 HepRandom (HepRandomEngine &algorithm)
 
 HepRandom (HepRandomEngine *algorithm)
 
virtual ~HepRandom ()
 
double flat ()
 
void flatArray (const int size, double *vect)
 
double flat (HepRandomEngine *theNewEngine)
 
void flatArray (HepRandomEngine *theNewEngine, const int size, double *vect)
 

Static Public Member Functions

static std::string distributionName ()
 
- Static Public Member Functions inherited from HepRandom
static void setTheSeed (long seed, int lux=3)
 
static long getTheSeed ()
 
static void setTheSeeds (const long *seeds, int aux=-1)
 
static const long * getTheSeeds ()
 
static void getTheTableSeeds (long *seeds, int index)
 
static HepRandomgetTheGenerator ()
 
static void setTheEngine (HepRandomEngine *theNewEngine)
 
static HepRandomEnginegetTheEngine ()
 
static void saveEngineStatus (const char filename[]="Config.conf")
 
static void restoreEngineStatus (const char filename[]="Config.conf")
 
static std::ostream & saveFullState (std::ostream &os)
 
static std::istream & restoreFullState (std::istream &is)
 
static std::ostream & saveDistState (std::ostream &os)
 
static std::istream & restoreDistState (std::istream &is)
 
static std::ostream & saveStaticRandomStates (std::ostream &os)
 
static std::istream & restoreStaticRandomStates (std::istream &is)
 
static void showEngineStatus ()
 
static int createInstance ()
 
static std::string distributionName ()
 

Private Member Functions

void prepareTable (const double *aProbFunc)
 
void useFlatDistribution ()
 
double mapRandom (double rand) const
 

Private Attributes

std::shared_ptr< HepRandomEnginelocalEngine
 
std::vector< double > theIntegralPdf
 
int nBins
 
double oneOverNbins
 
int InterpolationType
 

Additional Inherited Members

- Static Protected Attributes inherited from HepRandom
static const long seedTable [215][2]
 

Detailed Description

Author

Constructor & Destructor Documentation

RandGeneral ( const double *  aProbFunc,
int  theProbSize,
int  IntType = 0 
)
RandGeneral ( HepRandomEngine anEngine,
const double *  aProbFunc,
int  theProbSize,
int  IntType = 0 
)
RandGeneral ( HepRandomEngine anEngine,
const double *  aProbFunc,
int  theProbSize,
int  IntType = 0 
)
virtual ~RandGeneral ( )
virtual

Member Function Documentation

double shoot ( )
void shootArray ( const int  size,
double *  vect 
)
double shoot ( HepRandomEngine anEngine)
void shootArray ( HepRandomEngine anEngine,
const int  size,
double *  vect 
)
double fire ( )
void fireArray ( const int  size,
double *  vect 
)
double operator() ( )
virtual

Reimplemented from HepRandom.

std::ostream& put ( std::ostream &  os) const
virtual

Reimplemented from HepRandom.

std::istream& get ( std::istream &  is)
virtual

Reimplemented from HepRandom.

std::string name ( ) const
virtual

Reimplemented from HepRandom.

HepRandomEngine& engine ( )
virtual

Reimplemented from HepRandom.

static std::string distributionName ( )
static
void prepareTable ( const double *  aProbFunc)
private
void useFlatDistribution ( )
private
double mapRandom ( double  rand) const
private

Member Data Documentation

std::shared_ptr<HepRandomEngine> localEngine
private
std::vector<double> theIntegralPdf
private
int nBins
private
double oneOverNbins
private
int InterpolationType
private