rivet is hosted by Hepforge, IPPP Durham
Rivet::BWHelpers Namespace Reference

Functions

double CDF (double x, double mu, double gamma)
 CDF for the Breit-Wigner distribution.
double antiCDF (double p, double mu, double gamma)
 inverse CDF for the Breit-Wigner distribution

Function Documentation

double Rivet::BWHelpers::antiCDF ( double  p,
double  mu,
double  gamma 
) [inline]

inverse CDF for the Breit-Wigner distribution

Definition at line 247 of file MathUtils.hh.

Referenced by Rivet::BWspace().

                                                             {
      const double xn = std::tan(M_PI*(p-0.5));
      return gamma*xn + mu;
    }
double Rivet::BWHelpers::CDF ( double  x,
double  mu,
double  gamma 
) [inline]

CDF for the Breit-Wigner distribution.

Definition at line 240 of file MathUtils.hh.

Referenced by Rivet::BWspace().

                                                         {
      // normalize to (0;1) distribution
      const double xn = (x - mu)/gamma;
      return std::atan(xn)/M_PI + 0.5;
    }