30 #include <thrust/random.h>
49 fRndNumbers(_rnd), fNDaughters(_ndaughters)
58 a = (a + 0x7ed55d16) + (a << 12);
59 a = (a ^ 0xc761c23c) ^ (a >> 19);
60 a = (a + 0x165667b1) + (a << 5);
61 a = (a + 0xd3a2646c) ^ (a << 9);
62 a = (a + 0xfd7046c5) + (a << 3);
63 a = (a ^ 0xb55a4f09) ^ (a >> 16);
73 thrust::random::default_random_engine randEng(seed);
74 thrust::uniform_real_distribution<GReal_t> uniDist(0.0, 1.0);
77 fRndNumbers[idx] = uniDist(randEng);
97 thrust::random::default_random_engine randEng;
99 thrust::uniform_real_distribution<GReal_t> uniDist(0.0, 1.0);
101 return uniDist(randEng);
__host__ __device__ GUInt_t hash(GUInt_t a)
hash function.
RandGen(const GInt_t _ndaughters, GReal_t *_rnd)
RandGen ctor.
GInt_t fNDaughters
Number of daughter particles.
long GLong_t
Signed long integer 4 bytes (long)
unsigned int GUInt_t
Unsigned integer 4 bytes (unsigned int)
Typedef for useful container classes used in MCBooster.
Fill a given vector with random numbers between 0 and 1.
double GReal_t
Double 8 bytes or float 4 bytes.
GReal_t * fRndNumbers
Pointer to the array of random numbers.
int GInt_t
Signed integer 4 bytes (int)
__host__ __device__ void operator()(GLong_t idx)
operator().
__host__ __device__ GReal_t operator()(GInt_t idx)
RandGen2 ctor.