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;
81 double radius = std::sqrt(-2*std::log(
y));
82 double g = radius * std::sin(
x);
108 const Double_t kPhln = 0.4515827053;
135 result = (rn>0) ? (1+rn) : (-1+rn);
142 z = (rn>0) ? 2-rn : -2-rn;
147 if ((
y+kD1)*(kD3+
x)<kD2) {
149 else if (kHzmp-
y<exp(-(z*z+kPhln)/2)) {
151 else if (
y+kHzm<exp(-(
x+kPhln)/2)) {
167 if ((
y-kAs+
x)*(kCs+
x)+kBs<0) {
170 if (rn*rn<4*(kB-log(
x))) {
193 if (
sigma <= 0)
return 0;
216 if (mean <= 0)
return 0;
224 if (pir <= expmean)
break;
229 else if (mean < 1E9) {
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) {
298 }
while( Rndm() > t );
318 x = z * 6.28318530717958623;
340 z =
r* ( -1. + 8.0 * r2 );
360 return (
b-
a) * Rndm() +
a;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char x1
Definition of the generic implementation class for the RandomFunctions.
double landau_quantile(double z, double xi=1)
Inverse ( ) of the cumulative distribution function of the lower tail of the Landau distribution (lan...
Namespace for new Math classes and functions.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.
Double_t Floor(Double_t x)
Rounds x downward, returning the largest integral value that is not greater than x.
constexpr Double_t PiOver2()
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
constexpr Double_t TwoPi()