24#ifndef RandGaussZiggurat_h
25#define RandGaussZiggurat_h 1
50 static inline float shoot(
float mean,
float stdDev ) {
return shoot()*stdDev + mean;}
52 static void shootArray (
const int size,
float* vect,
float mean=0.0,
float stdDev=1.0 );
53 static void shootArray (
const int size,
double* vect,
double mean=0.0,
double stdDev=1.0 );
62 static void shootArray (
HepRandomEngine* anotherEngine,
const int size,
double* vect,
double mean=0.0,
double stdDev=1.0 );
71 void fireArray (
const int size,
float* vect);
72 void fireArray (
const int size,
double* vect);
73 void fireArray (
const int size,
float* vect,
float mean,
float stdDev );
74 void fireArray (
const int size,
double* vect,
double mean,
double stdDev );
77 virtual double operator()(
double mean,
double stdDev );
81 std::ostream &
put ( std::ostream & os )
const;
82 std::istream &
get ( std::istream & is );
84 std::string
name()
const;
118 unsigned long iz=hz&127;
119 return ((
unsigned long)std::abs(hz)<
kn[iz]) ? hz*
wn[iz] :
ziggurat_nfix(hz,anEngine);
static HepRandomEngine * getTheEngine()
static void shootArray(const int size, float *vect, float mean=0.0, float stdDev=1.0)
static CLHEP_THREAD_LOCAL unsigned long ke[256]
static float shoot(float mean, float stdDev)
std::istream & get(std::istream &is)
static bool ziggurat_init()
void fireArray(const int size, float *vect)
static float ziggurat_nfix(long hz, HepRandomEngine *anEngine)
static float ziggurat_UNI(HepRandomEngine *anEngine)
static CLHEP_THREAD_LOCAL float fn[128]
std::ostream & put(std::ostream &os) const
static float ziggurat_RNOR(HepRandomEngine *anEngine)
virtual double operator()()
static CLHEP_THREAD_LOCAL unsigned long kn[128]
float fire(float mean, float stdDev)
static CLHEP_THREAD_LOCAL float fe[256]
HepRandomEngine & engine()
static float shoot(HepRandomEngine *anotherEngine, float mean, float stdDev)
RandGaussZiggurat(HepRandomEngine &anEngine, double mean=0.0, double stdDev=1.0)
static CLHEP_THREAD_LOCAL float we[256]
static float shoot(HepRandomEngine *anotherEngine)
virtual ~RandGaussZiggurat()
static unsigned long ziggurat_SHR3(HepRandomEngine *anEngine)
static CLHEP_THREAD_LOCAL float wn[128]
static CLHEP_THREAD_LOCAL bool ziggurat_is_init
static std::string distributionName()
std::shared_ptr< HepRandomEngine > localEngine
#define CLHEP_THREAD_LOCAL