Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
CLHEP::RandGaussZiggurat Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/geant4/v4_10_4_p02ba/source/geant4.10.04.p02/source/externals/clhep/include/CLHEP/Random/RandGaussZiggurat.h"

Inheritance diagram for CLHEP::RandGaussZiggurat:
CLHEP::RandGauss CLHEP::HepRandom

Public Member Functions

 RandGaussZiggurat (HepRandomEngine &anEngine, double mean=0.0, double stdDev=1.0)
 
 RandGaussZiggurat (HepRandomEngine *anEngine, double mean=0.0, double stdDev=1.0)
 
virtual ~RandGaussZiggurat ()
 
float fire ()
 
float fire (float mean, float stdDev)
 
void fireArray (const int size, float *vect)
 
void fireArray (const int size, double *vect)
 
void fireArray (const int size, float *vect, float mean, float stdDev)
 
void fireArray (const int size, double *vect, double mean, double stdDev)
 
virtual double operator() ()
 
virtual double operator() (double mean, double stdDev)
 
std::ostream & put (std::ostream &os) const
 
std::istream & get (std::istream &is)
 
std::string name () const
 
HepRandomEngineengine ()
 
double fire (double mean, double stdDev)
 
bool getF () const
 
void setF (bool val)
 
double flat ()
 
double flat (HepRandomEngine *theNewEngine)
 
void flatArray (const int size, double *vect)
 
void flatArray (HepRandomEngine *theNewEngine, const int size, double *vect)
 

Static Public Member Functions

static float shoot ()
 
static float shoot (float mean, float stdDev)
 
static void shootArray (const int size, float *vect, float mean=0.0, float stdDev=1.0)
 
static void shootArray (const int size, double *vect, double mean=0.0, double stdDev=1.0)
 
static float shoot (HepRandomEngine *anotherEngine)
 
static float shoot (HepRandomEngine *anotherEngine, float mean, float stdDev)
 
static void shootArray (HepRandomEngine *anotherEngine, const int size, float *vect, float mean=0.0, float stdDev=1.0)
 
static void shootArray (HepRandomEngine *anotherEngine, const int size, double *vect, double mean=0.0, double stdDev=1.0)
 
static std::string distributionName ()
 
static bool ziggurat_init ()
 
static double shoot (double mean, double stdDev)
 
static double shoot (HepRandomEngine *anEngine, double mean, double stdDev)
 
static bool getFlag ()
 
static void setFlag (bool val)
 
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 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 std::ostream & saveStaticRandomStates (std::ostream &os)
 
static std::istream & restoreStaticRandomStates (std::istream &is)
 
static void showEngineStatus ()
 
static int createInstance ()
 

Protected Member Functions

double normal ()
 

Static Protected Member Functions

static unsigned long ziggurat_SHR3 (HepRandomEngine *anEngine)
 
static float ziggurat_UNI (HepRandomEngine *anEngine)
 
static float ziggurat_RNOR (HepRandomEngine *anEngine)
 
static float ziggurat_nfix (long hz, HepRandomEngine *anEngine)
 
static double getVal ()
 
static void setVal (double nextVal)
 

Protected Attributes

double defaultMean
 
double defaultStdDev
 
std::shared_ptr< HepRandomEnginelocalEngine
 

Static Protected Attributes

static CLHEP_THREAD_LOCAL unsigned long kn [128]
 
static CLHEP_THREAD_LOCAL unsigned long ke [256]
 
static CLHEP_THREAD_LOCAL float wn [128]
 
static CLHEP_THREAD_LOCAL float fn [128]
 
static CLHEP_THREAD_LOCAL float we [256]
 
static CLHEP_THREAD_LOCAL float fe [256]
 
static CLHEP_THREAD_LOCAL bool ziggurat_is_init
 
static const long seedTable [215][2]
 

Private Member Functions

 RandGaussZiggurat (const RandGaussZiggurat &d)
 

Detailed Description

Author
ATLAS

Definition at line 37 of file RandGaussZiggurat.h.

Constructor & Destructor Documentation

CLHEP::RandGaussZiggurat::RandGaussZiggurat ( HepRandomEngine anEngine,
double  mean = 0.0,
double  stdDev = 1.0 
)
inline

Definition at line 137 of file RandGaussZiggurat.h.

Referenced by ziggurat_RNOR().

137  : RandGauss(anEngine, mean, stdDev)
138 {
139 }
RandGauss(HepRandomEngine &anEngine, double mean=0.0, double stdDev=1.0)
CLHEP::RandGaussZiggurat::RandGaussZiggurat ( HepRandomEngine anEngine,
double  mean = 0.0,
double  stdDev = 1.0 
)
inline

Definition at line 141 of file RandGaussZiggurat.h.

141  : RandGauss(anEngine, mean, stdDev)
142 {
143 }
RandGauss(HepRandomEngine &anEngine, double mean=0.0, double stdDev=1.0)
virtual CLHEP::RandGaussZiggurat::~RandGaussZiggurat ( )
virtual
CLHEP::RandGaussZiggurat::RandGaussZiggurat ( const RandGaussZiggurat d)
private

Member Function Documentation

static int CLHEP::HepRandom::createInstance ( )
staticinherited
static std::string CLHEP::RandGaussZiggurat::distributionName ( )
inlinestatic

Definition at line 87 of file RandGaussZiggurat.h.

References ziggurat_init().

87 {return "RandGaussZiggurat";}
HepRandomEngine& CLHEP::RandGaussZiggurat::engine ( )
virtual

Reimplemented from CLHEP::RandGauss.

Referenced by fire().

float CLHEP::RandGaussZiggurat::fire ( )
inline

Definition at line 67 of file RandGaussZiggurat.h.

References CLHEP::RandGauss::defaultMean, CLHEP::RandGauss::defaultStdDev, CLHEP::RandGauss::localEngine, and ziggurat_RNOR().

std::shared_ptr< HepRandomEngine > localEngine
Definition: RandGauss.h:155
double defaultMean
Definition: RandGauss.h:152
static float ziggurat_RNOR(HepRandomEngine *anEngine)
double defaultStdDev
Definition: RandGauss.h:153
float CLHEP::RandGaussZiggurat::fire ( float  mean,
float  stdDev 
)
inline

Definition at line 69 of file RandGaussZiggurat.h.

References engine(), fireArray(), CLHEP::RandGauss::localEngine, extractScale::mean, name(), operator()(), put(), string, and ziggurat_RNOR().

69 {return ziggurat_RNOR(localEngine.get()) * stdDev + mean;};
std::shared_ptr< HepRandomEngine > localEngine
Definition: RandGauss.h:155
static float ziggurat_RNOR(HepRandomEngine *anEngine)
double CLHEP::RandGauss::fire ( double  mean,
double  stdDev 
)
inlineinherited
void CLHEP::RandGaussZiggurat::fireArray ( const int  size,
float *  vect 
)

Referenced by fire().

void CLHEP::RandGaussZiggurat::fireArray ( const int  size,
double *  vect 
)
void CLHEP::RandGaussZiggurat::fireArray ( const int  size,
float *  vect,
float  mean,
float  stdDev 
)
void CLHEP::RandGaussZiggurat::fireArray ( const int  size,
double *  vect,
double  mean,
double  stdDev 
)
double CLHEP::HepRandom::flat ( )
inherited
double CLHEP::HepRandom::flat ( HepRandomEngine theNewEngine)
inlineinherited
void CLHEP::HepRandom::flatArray ( const int  size,
double *  vect 
)
inherited
void CLHEP::HepRandom::flatArray ( HepRandomEngine theNewEngine,
const int  size,
double *  vect 
)
inlineinherited
std::istream& CLHEP::RandGaussZiggurat::get ( std::istream &  is)
virtual

Reimplemented from CLHEP::RandGauss.

bool CLHEP::RandGauss::getF ( ) const
inlineinherited

Definition at line 116 of file RandGauss.h.

116 {return set;}
static bool CLHEP::RandGauss::getFlag ( )
staticinherited
static HepRandomEngine* CLHEP::HepRandom::getTheEngine ( )
staticinherited
static HepRandom* CLHEP::HepRandom::getTheGenerator ( )
staticinherited
static long CLHEP::HepRandom::getTheSeed ( )
staticinherited
static const long* CLHEP::HepRandom::getTheSeeds ( )
staticinherited
static void CLHEP::HepRandom::getTheTableSeeds ( long *  seeds,
int  index 
)
staticinherited
static double CLHEP::RandGauss::getVal ( )
staticprotectedinherited

Referenced by CLHEP::RandGauss::setF().

std::string CLHEP::RandGaussZiggurat::name ( ) const
virtual
double CLHEP::RandGauss::normal ( )
protectedinherited

Referenced by CLHEP::RandGauss::setF().

virtual double CLHEP::RandGaussZiggurat::operator() ( )
virtual

Reimplemented from CLHEP::RandGauss.

Referenced by fire().

virtual double CLHEP::RandGaussZiggurat::operator() ( double  mean,
double  stdDev 
)
virtual

Reimplemented from CLHEP::RandGauss.

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

Reimplemented from CLHEP::RandGauss.

Referenced by fire().

static std::istream& CLHEP::RandGauss::restoreDistState ( std::istream &  is)
staticinherited

Referenced by CLHEP::RandGauss::setF().

static void CLHEP::RandGauss::restoreEngineStatus ( const char  filename[] = "Config.conf")
staticinherited

Referenced by CLHEP::RandGauss::setF().

static std::istream& CLHEP::RandGauss::restoreFullState ( std::istream &  is)
staticinherited

Referenced by CLHEP::RandGauss::setF().

static std::istream& CLHEP::HepRandom::restoreStaticRandomStates ( std::istream &  is)
staticinherited
static std::ostream& CLHEP::RandGauss::saveDistState ( std::ostream &  os)
staticinherited

Referenced by CLHEP::RandGauss::setF().

static void CLHEP::RandGauss::saveEngineStatus ( const char  filename[] = "Config.conf")
staticinherited

Referenced by CLHEP::RandGauss::setF().

static std::ostream& CLHEP::RandGauss::saveFullState ( std::ostream &  os)
staticinherited

Referenced by CLHEP::RandGauss::setF().

static std::ostream& CLHEP::HepRandom::saveStaticRandomStates ( std::ostream &  os)
staticinherited
void CLHEP::RandGauss::setF ( bool  val)
inlineinherited
static void CLHEP::RandGauss::setFlag ( bool  val)
staticinherited
static void CLHEP::HepRandom::setTheEngine ( HepRandomEngine theNewEngine)
staticinherited
static void CLHEP::HepRandom::setTheSeed ( long  seed,
int  lux = 3 
)
staticinherited
static void CLHEP::HepRandom::setTheSeeds ( const long *  seeds,
int  aux = -1 
)
staticinherited
static void CLHEP::RandGauss::setVal ( double  nextVal)
staticprotectedinherited

Referenced by CLHEP::RandGauss::setF().

static float CLHEP::RandGaussZiggurat::shoot ( )
inlinestatic

Definition at line 49 of file RandGaussZiggurat.h.

References CLHEP::HepRandom::getTheEngine(), and ziggurat_RNOR().

static float ziggurat_RNOR(HepRandomEngine *anEngine)
static HepRandomEngine * getTheEngine()
static float CLHEP::RandGaussZiggurat::shoot ( float  mean,
float  stdDev 
)
inlinestatic

Definition at line 50 of file RandGaussZiggurat.h.

References extractScale::mean, shoot(), shootArray(), and gen_flatrecord::size.

Referenced by shoot().

50 {return shoot()*stdDev + mean;};
static float CLHEP::RandGaussZiggurat::shoot ( HepRandomEngine anotherEngine)
inlinestatic

Definition at line 58 of file RandGaussZiggurat.h.

References ziggurat_RNOR().

58 {return ziggurat_RNOR(anotherEngine);};
static float ziggurat_RNOR(HepRandomEngine *anEngine)
static float CLHEP::RandGaussZiggurat::shoot ( HepRandomEngine anotherEngine,
float  mean,
float  stdDev 
)
inlinestatic

Definition at line 59 of file RandGaussZiggurat.h.

References extractScale::mean, shoot(), and shootArray().

Referenced by shoot().

59 {return shoot(anotherEngine)*stdDev + mean;};
static double CLHEP::RandGauss::shoot ( double  mean,
double  stdDev 
)
inlinestaticinherited
static double CLHEP::RandGauss::shoot ( HepRandomEngine anEngine,
double  mean,
double  stdDev 
)
inlinestaticinherited
static void CLHEP::RandGaussZiggurat::shootArray ( const int  size,
float *  vect,
float  mean = 0.0,
float  stdDev = 1.0 
)
static

Referenced by shoot().

static void CLHEP::RandGaussZiggurat::shootArray ( const int  size,
double *  vect,
double  mean = 0.0,
double  stdDev = 1.0 
)
static
static void CLHEP::RandGaussZiggurat::shootArray ( HepRandomEngine anotherEngine,
const int  size,
float *  vect,
float  mean = 0.0,
float  stdDev = 1.0 
)
static
static void CLHEP::RandGaussZiggurat::shootArray ( HepRandomEngine anotherEngine,
const int  size,
double *  vect,
double  mean = 0.0,
double  stdDev = 1.0 
)
static
static void CLHEP::HepRandom::showEngineStatus ( )
staticinherited
static bool CLHEP::RandGaussZiggurat::ziggurat_init ( )
static

Referenced by distributionName(), and ziggurat_RNOR().

static float CLHEP::RandGaussZiggurat::ziggurat_nfix ( long  hz,
HepRandomEngine anEngine 
)
staticprotected

Referenced by ziggurat_RNOR().

static float CLHEP::RandGaussZiggurat::ziggurat_RNOR ( HepRandomEngine anEngine)
inlinestaticprotected

Definition at line 115 of file RandGaussZiggurat.h.

References std::abs(), d, RandGaussZiggurat(), ziggurat_init(), ziggurat_nfix(), and ziggurat_SHR3().

Referenced by fire(), and shoot().

115  {
117  long hz=(signed)ziggurat_SHR3(anEngine);
118  unsigned long iz=hz&127;
119  return ((unsigned long)std::abs(hz)<kn[iz]) ? hz*wn[iz] : ziggurat_nfix(hz,anEngine);
120  };
static CLHEP_THREAD_LOCAL bool ziggurat_is_init
static CLHEP_THREAD_LOCAL float wn[128]
float abs(float number)
Definition: d0nt_math.hpp:39
static unsigned long ziggurat_SHR3(HepRandomEngine *anEngine)
static bool ziggurat_init()
static float ziggurat_nfix(long hz, HepRandomEngine *anEngine)
static CLHEP_THREAD_LOCAL unsigned long kn[128]
static unsigned long CLHEP::RandGaussZiggurat::ziggurat_SHR3 ( HepRandomEngine anEngine)
inlinestaticprotected

Definition at line 113 of file RandGaussZiggurat.h.

Referenced by ziggurat_RNOR().

113 {return (unsigned int)(*anEngine);};
static float CLHEP::RandGaussZiggurat::ziggurat_UNI ( HepRandomEngine anEngine)
inlinestaticprotected

Definition at line 114 of file RandGaussZiggurat.h.

References CLHEP::HepRandomEngine::flat().

114 {return anEngine->flat();};

Member Data Documentation

double CLHEP::RandGauss::defaultMean
protectedinherited

Definition at line 152 of file RandGauss.h.

Referenced by fire().

double CLHEP::RandGauss::defaultStdDev
protectedinherited

Definition at line 153 of file RandGauss.h.

Referenced by fire().

CLHEP_THREAD_LOCAL float CLHEP::RandGaussZiggurat::fe[256]
staticprotected

Definition at line 109 of file RandGaussZiggurat.h.

CLHEP_THREAD_LOCAL float CLHEP::RandGaussZiggurat::fn[128]
staticprotected

Definition at line 109 of file RandGaussZiggurat.h.

CLHEP_THREAD_LOCAL unsigned long CLHEP::RandGaussZiggurat::ke[256]
staticprotected

Definition at line 108 of file RandGaussZiggurat.h.

CLHEP_THREAD_LOCAL unsigned long CLHEP::RandGaussZiggurat::kn[128]
staticprotected

Definition at line 108 of file RandGaussZiggurat.h.

std::shared_ptr<HepRandomEngine> CLHEP::RandGauss::localEngine
protectedinherited

Definition at line 155 of file RandGauss.h.

Referenced by fire().

const long CLHEP::HepRandom::seedTable
staticprotectedinherited

Definition at line 157 of file Random.h.

CLHEP_THREAD_LOCAL float CLHEP::RandGaussZiggurat::we[256]
staticprotected

Definition at line 109 of file RandGaussZiggurat.h.

CLHEP_THREAD_LOCAL float CLHEP::RandGaussZiggurat::wn[128]
staticprotected

Definition at line 109 of file RandGaussZiggurat.h.

CLHEP_THREAD_LOCAL bool CLHEP::RandGaussZiggurat::ziggurat_is_init
staticprotected

Definition at line 111 of file RandGaussZiggurat.h.


The documentation for this class was generated from the following file: