29 if (prob < 0 || prob > 1)
return 0;
31 for (
Int_t i=0;i<ntot;i++) {
32 if (Rndm() > prob)
continue;
80 double x = z * 6.28318530717958623;
83 return mean + g *
sigma;
108 const Double_t kPhln = 0.4515827053;
131 result = kHp*y-kHp1;
break; }
135 result = (rn>0) ? (1+rn) : (-1+rn);
142 z = (rn>0) ? 2-rn : -2-rn;
147 if ((y+kD1)*(kD3+
x)<kD2) {
148 result = rn;
break; }
149 else if (kHzmp-y<
exp(-(z*z+kPhln)/2)) {
151 else if (y+kHzm<
exp(-(x+kPhln)/2)) {
152 result = rn;
break; }
167 if ((y-kAs+x)*(kCs+
x)+kBs<0) {
168 result = rn;
break; }
170 if (rn*rn<4*(kB-
log(x))) {
171 result = rn;
break; }
175 return mean + sigma *
result;
193 if (sigma <= 0)
return 0;
216 if (mean <= 0)
return 0;
224 if (pir <= expmean)
break;
229 else if (mean < 1E9) {
245 t = 0.9*(1.0 + y*
y)*
TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g);
246 }
while( Rndm() > t );
248 return static_cast<Int_t> (
em);
268 if (mean <= 0)
return 0;
276 if (pir <= expmean)
break;
281 else if (mean < 1E9) {
297 t = 0.9*(1.0 + y*
y)*
TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g);
298 }
while( Rndm() > t );
318 x = z * 6.28318530717958623;
340 z = r* ( -1. + 8.0 *
r2 );
360 return (b-a) * Rndm() +
a;
XYZVector ans(TestRotation const &t, XYZVector const &v_in)
Double_t BreitWigner(Double_t x, Double_t mean=0, Double_t gamma=1)
Calculate a Breit Wigner function with mean and gamma.
Double_t Floor(Double_t x)
Namespace for new ROOT classes and functions.
constexpr Double_t TwoPi()
Double_t Landau(Double_t x, Double_t mean, Double_t sigma)
Double_t Gaus(Double_t x, Double_t mean, Double_t sigma)
Gauss.
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
Double_t Binomial(Int_t n, Int_t k)
Calculate the binomial coefficient n over k.
static const double x1[5]
Namespace for new Math classes and functions.
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...
Definition of the generic impelmentation class for the RandomFunctions.
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.
Double_t Sqrt(Double_t x)
constexpr Double_t PiOver2()
unsigned int r2[N_CITIES]