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 CLHEP_THREAD_LOCAL float fe[256]
static CLHEP_THREAD_LOCAL float wn[128]
static bool ziggurat_init()
static float ziggurat_nfix(long hz, HepRandomEngine *anEngine)
float fire(float mean, float stdDev)
static float shoot(HepRandomEngine *anotherEngine)
static float ziggurat_UNI(HepRandomEngine *anEngine)
std::shared_ptr< HepRandomEngine > localEngine
RandGaussZiggurat(HepRandomEngine &anEngine, double mean=0.0, double stdDev=1.0)
static std::string distributionName()
static unsigned long ziggurat_SHR3(HepRandomEngine *anEngine)
static HepRandomEngine * getTheEngine()
static float shoot(float mean, float stdDev)
static CLHEP_THREAD_LOCAL unsigned long kn[128]
void fireArray(const int size, float *vect)
#define CLHEP_THREAD_LOCAL
static CLHEP_THREAD_LOCAL unsigned long ke[256]
static float ziggurat_RNOR(HepRandomEngine *anEngine)
virtual ~RandGaussZiggurat()
std::ostream & put(std::ostream &os) const
static float shoot(HepRandomEngine *anotherEngine, float mean, float stdDev)
static void shootArray(const int size, float *vect, float mean=0.0, float stdDev=1.0)
static CLHEP_THREAD_LOCAL float fn[128]
static CLHEP_THREAD_LOCAL bool ziggurat_is_init
static CLHEP_THREAD_LOCAL float we[256]
virtual double operator()()
HepRandomEngine & engine()