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