174 if (prob < 0 || prob > 1)
return 0;
176 for (
Int_t i=0;i<ntot;i++) {
177 if (
Rndm() > prob)
continue;
247 const Double_t kPhln = 0.4515827053;
270 result = kHp*y-kHp1;
break; }
274 result = (rn>0) ? (1+rn) : (-1+rn);
281 z = (rn>0) ? 2-rn : -2-rn;
286 if ((y+kD1)*(kD3+
x)<kD2) {
287 result = rn;
break; }
288 else if (kHzmp-y<
exp(-(z*z+kPhln)/2)) {
290 else if (y+kHzm<
exp(-(x+kPhln)/2)) {
291 result = rn;
break; }
306 if ((y-kAs+x)*(kCs+
x)+kBs<0) {
307 result = rn;
break; }
309 if (rn*rn<4*(kB-
log(x))) {
310 result = rn;
break; }
314 return mean + sigma *
result;
342 if (sigma <= 0)
return 0;
365 if (mean <= 0)
return 0;
373 if (pir <= expmean)
break;
378 else if (mean < 1E9) {
394 t = 0.9*(1.0 + y*
y)*
TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g);
395 }
while(
Rndm() > t );
397 return static_cast<Int_t> (
em);
417 if (mean <= 0)
return 0;
425 if (pir <= expmean)
break;
430 else if (mean < 1E9) {
446 t = 0.9*(1.0 + y*
y)*
TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g);
447 }
while(
Rndm() > t );
466 x = z * 6.28318530717958623;
481 x = z * 6.28318530717958623;
514 #ifdef OLD_TRANDOM_IMPL 515 const Double_t kCONS = 4.6566128730774E-10;
516 const Int_t kMASK24 = 2147483392;
520 if (jy)
return kCONS*jy;
525 const Double_t kCONS = 4.6566128730774E-10;
526 fSeed = (1103515245 *
fSeed + 12345) & 0x7fffffffUL;
537 const Double_t kCONS = 4.6566128730774E-10;
540 fSeed = (1103515245 *
fSeed + 12345) & 0x7fffffffUL;
550 const Double_t kCONS = 4.6566128730774E-10;
553 fSeed = (1103515245 *
fSeed + 12345) & 0x7fffffffUL;
596 z = r* ( -1. + 8.0 *
r2 );
618 return x1 + (x2-
x1)*ans;
virtual const char * GetName() const
Returns name of object.
XYZVector ans(TestRotation const &t, XYZVector const &v_in)
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
virtual Double_t PoissonD(Double_t mean)
Generates a random number according to a Poisson law.
Double_t Floor(Double_t x)
virtual Int_t Binomial(Int_t ntot, Double_t prob)
Generates a random integer N according to the binomial law.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
constexpr Double_t TwoPi()
virtual void RndmArray(Int_t n, Float_t *array)
Return an array of n random numbers uniformly distributed in ]0,1].
virtual ~TRandom()
Default destructor.
This class defines a UUID (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDent...
static const double x2[5]
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t tau
you should not use this method at all Int_t Int_t Double_t Double_t em
This is the base class for the ROOT Random number generators.
The TNamed class is the base class for all named ROOT classes.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
virtual TFile * GetFile() const
virtual Double_t Rndm()
Machine independent random number generator.
R__EXTERN TSystem * gSystem
char * Form(const char *fmt,...)
virtual void WriteRandom(const char *filename) const
Writes random generator status to filename.
R__EXTERN TRandom * gRandom
virtual void Circle(Double_t &x, Double_t &y, Double_t r)
Generates random vectors, uniformly distributed over a circle of given radius.
static const double x1[5]
Describe directory structure in memory.
virtual void ReadRandom(const char *filename)
Reads saved random generator status from filename.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
virtual Double_t BreitWigner(Double_t mean=0, Double_t gamma=1)
Return a number distributed following a BreitWigner function with mean and gamma. ...
virtual void Sphere(Double_t &x, Double_t &y, Double_t &z, Double_t r)
Generates random vectors, uniformly distributed over the surface of a sphere of given radius...
you should not use this method at all Int_t Int_t z
double landau_quantile(double z, double xi=1)
Inverse ( ) of the cumulative distribution function of the lower tail of the Landau distribution (lan...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
Double_t Sqrt(Double_t x)
virtual Double_t Landau(Double_t mean=0, Double_t sigma=1)
Generate a random number following a Landau distribution with location parameter mu and scale paramet...
void GetUUID(UChar_t uuid[16]) const
Return uuid in specified buffer (16 byte = 128 bits).
constexpr Double_t PiOver2()
unsigned int r2[N_CITIES]
virtual Double_t Exp(Double_t tau)
Returns an exponential deviate.