Logo ROOT   6.14/05
Reference Guide
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
ROOT::Math::VavilovFast Class Reference

Class describing a Vavilov distribution.

The probability density function of the Vavilov distribution as function of Landau's parameter is given by:

\[ p(\lambda_L; \kappa, \beta^2) = \frac{1}{2 \pi i}\int_{c-i\infty}^{c+i\infty} \phi(s) e^{\lambda_L s} ds\]

where \(\phi(s) = e^{C} e^{\psi(s)}\) with \( C = \kappa (1+\beta^2 \gamma )\) and \(\psi(s)= s \ln \kappa + (s+\beta^2 \kappa) \cdot \left ( \int \limits_{0}^{1} \frac{1 - e^{\frac{-st}{\kappa}}}{t} \,d t- \gamma \right ) - \kappa \, e^{\frac{-s}{\kappa}}\). \( \gamma = 0.5772156649\dots\) is Euler's constant.

For the class VavilovFast, Pdf returns the Vavilov distribution as function of Landau's parameter \(\lambda_L = \lambda_V/\kappa - \ln \kappa\), which is the convention used in the CERNLIB routines, and in the tables by S.M. Seltzer and M.J. Berger: Energy loss stragglin of protons and mesons: Tabulation of the Vavilov distribution, pp 187-203 in: National Research Council (U.S.), Committee on Nuclear Science: Studies in penetration of charged particles in matter, Nat. Akad. Sci. Publication 1133, Nucl. Sci. Series Report No. 39, Washington (Nat. Akad. Sci.) 1964, 388 pp. Available from Google books

Therefore, for small values of \(\kappa < 0.01\), pdf approaches the Landau distribution.

For values \(\kappa > 10\), the Gauss approximation should be used with \(\mu\) and \(\sigma\) given by Vavilov::mean(kappa, beta2) and sqrt(Vavilov::variance(kappa, beta2).

For values \(\kappa > 10\), the Gauss approximation should be used with \(\mu\) and \(\sigma\) given by Vavilov::mean(kappa, beta2) and sqrt(Vavilov::variance(kappa, beta2).

The original Vavilov pdf is obtained by v.Pdf(lambdaV/kappa-log(kappa))/kappa.

For detailed description see A. Rotondi and P. Montagna, Fast calculation of Vavilov distribution, Nucl. Instr. and Meth. B47 (1990) 215-224, which has been implemented in CERNLIB (G115).

The class stores coefficients needed to calculate \(p(\lambda; \kappa, \beta^2)\) for fixed values of \(\kappa\) and \(\beta^2\). Changing these values is computationally expensive.

The parameter \(\kappa\) must be in the range \(0.01 \le \kappa \le 12\).

The parameter \(\beta^2\) must be in the range \(0 \le \beta^2 \le 1\).

Average times on a Pentium Core2 Duo P8400 2.26GHz:

Benno List, June 2010

Definition at line 116 of file VavilovFast.h.

Public Member Functions

 VavilovFast (double kappa=1, double beta2=1)
 Initialize an object to calculate the Vavilov distribution. More...
 
virtual ~VavilovFast ()
 Destructor. More...
 
double Cdf (double x) const
 Evaluate the Vavilov cumulative probability density function. More...
 
double Cdf (double x, double kappa, double beta2)
 Evaluate the Vavilov cumulative probability density function, and set kappa and beta2, if necessary. More...
 
double Cdf_c (double x) const
 Evaluate the Vavilov complementary cumulative probability density function. More...
 
double Cdf_c (double x, double kappa, double beta2)
 Evaluate the Vavilov complementary cumulative probability density function, and set kappa and beta2, if necessary. More...
 
virtual double GetBeta2 () const
 Return the current value of \(\beta^2\). More...
 
virtual double GetKappa () const
 Return the current value of \(\kappa\). More...
 
virtual double GetLambdaMax () const
 Return the maximum value of \(\lambda\) for which \(p(\lambda; \kappa, \beta^2)\) is nonzero in the current approximation. More...
 
virtual double GetLambdaMin () const
 Return the minimum value of \(\lambda\) for which \(p(\lambda; \kappa, \beta^2)\) is nonzero in the current approximation. More...
 
double Pdf (double x) const
 Evaluate the Vavilov probability density function. More...
 
double Pdf (double x, double kappa, double beta2)
 Evaluate the Vavilov probability density function, and set kappa and beta2, if necessary. More...
 
double Quantile (double z) const
 Evaluate the inverse of the Vavilov cumulative probability density function. More...
 
double Quantile (double z, double kappa, double beta2)
 Evaluate the inverse of the Vavilov cumulative probability density function, and set kappa and beta2, if necessary. More...
 
double Quantile_c (double z) const
 Evaluate the inverse of the complementary Vavilov cumulative probability density function. More...
 
double Quantile_c (double z, double kappa, double beta2)
 Evaluate the inverse of the complementary Vavilov cumulative probability density function, and set kappa and beta2, if necessary. More...
 
virtual void SetKappaBeta2 (double kappa, double beta2)
 Change \(\kappa\) and \(\beta^2\) and recalculate coefficients if necessary. More...
 
- Public Member Functions inherited from ROOT::Math::Vavilov
 Vavilov ()
 Default constructor. More...
 
virtual ~Vavilov ()
 Destructor. More...
 
virtual double Kurtosis () const
 Return the theoretical kurtosis \(\gamma_2 = \frac{1/3 - \beta^2/4}{\kappa^3 \sigma^4}\). More...
 
virtual double Mean () const
 Return the theoretical mean \(\mu = \gamma-1- \ln \kappa - \beta^2\), where \(\gamma = 0.5772\dots\) is Euler's constant. More...
 
virtual double Mode () const
 Return the value of \(\lambda\) where the pdf is maximal. More...
 
virtual double Mode (double kappa, double beta2)
 Return the value of \(\lambda\) where the pdf is maximal function, and set kappa and beta2, if necessary. More...
 
virtual double Skewness () const
 Return the theoretical skewness \(\gamma_1 = \frac{1/2 - \beta^2/3}{\kappa^2 \sigma^3} \). More...
 
virtual double Variance () const
 Return the theoretical variance \(\sigma^2 = \frac{1 - \beta^2/2}{\kappa}\). More...
 

Static Public Member Functions

static VavilovFastGetInstance ()
 Returns a static instance of class VavilovFast. More...
 
static VavilovFastGetInstance (double kappa, double beta2)
 Returns a static instance of class VavilovFast, and sets the values of kappa and beta2. More...
 
- Static Public Member Functions inherited from ROOT::Math::Vavilov
static double Kurtosis (double kappa, double beta2)
 Return the theoretical kurtosis \(\gamma_2 = \frac{1/3 - \beta^2/4}{\kappa^3 \sigma^4}\). More...
 
static double Mean (double kappa, double beta2)
 Return the theoretical Mean \(\mu = \gamma-1- \ln \kappa - \beta^2\). More...
 
static double Skewness (double kappa, double beta2)
 Return the theoretical skewness \(\gamma_1 = \frac{1/2 - \beta^2/3}{\kappa^2 \sigma^3} \). More...
 
static double Variance (double kappa, double beta2)
 Return the theoretical Variance \(\sigma^2 = \frac{1 - \beta^2/2}{\kappa}\). More...
 

Private Attributes

double fAC [14]
 
double fBeta2
 
double fHC [9]
 
int fItype
 
double fKappa
 
int fNpt
 
double fWCM [201]
 

Static Private Attributes

static VavilovFastfgInstance = 0
 

#include <Math/VavilovFast.h>

Inheritance diagram for ROOT::Math::VavilovFast:
[legend]

Constructor & Destructor Documentation

◆ VavilovFast()

ROOT::Math::VavilovFast::VavilovFast ( double  kappa = 1,
double  beta2 = 1 
)

Initialize an object to calculate the Vavilov distribution.

Parameters
kappaThe parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \)
beta2The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \)

Definition at line 51 of file VavilovFast.cxx.

◆ ~VavilovFast()

ROOT::Math::VavilovFast::~VavilovFast ( )
virtual

Destructor.

Definition at line 57 of file VavilovFast.cxx.

Member Function Documentation

◆ Cdf() [1/2]

double ROOT::Math::VavilovFast::Cdf ( double  x) const
virtual

Evaluate the Vavilov cumulative probability density function.

Parameters
xThe Landau parameter \(x = \lambda_L\)

Implements ROOT::Math::Vavilov.

Definition at line 425 of file VavilovFast.cxx.

◆ Cdf() [2/2]

double ROOT::Math::VavilovFast::Cdf ( double  x,
double  kappa,
double  beta2 
)
virtual

Evaluate the Vavilov cumulative probability density function, and set kappa and beta2, if necessary.

Parameters
xThe Landau parameter \(x = \lambda_L\)
kappaThe parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \)
beta2The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \)

Implements ROOT::Math::Vavilov.

Definition at line 443 of file VavilovFast.cxx.

◆ Cdf_c() [1/2]

double ROOT::Math::VavilovFast::Cdf_c ( double  x) const
virtual

Evaluate the Vavilov complementary cumulative probability density function.

Parameters
xThe Landau parameter \(x = \lambda_L\)

Implements ROOT::Math::Vavilov.

Definition at line 439 of file VavilovFast.cxx.

◆ Cdf_c() [2/2]

double ROOT::Math::VavilovFast::Cdf_c ( double  x,
double  kappa,
double  beta2 
)
virtual

Evaluate the Vavilov complementary cumulative probability density function, and set kappa and beta2, if necessary.

Parameters
xThe Landau parameter \(x = \lambda_L\)
kappaThe parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \)
beta2The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \)

Implements ROOT::Math::Vavilov.

Definition at line 461 of file VavilovFast.cxx.

◆ GetBeta2()

double ROOT::Math::VavilovFast::GetBeta2 ( ) const
virtual

Return the current value of \(\beta^2\).

Implements ROOT::Math::Vavilov.

Definition at line 562 of file VavilovFast.cxx.

◆ GetInstance() [1/2]

VavilovFast * ROOT::Math::VavilovFast::GetInstance ( )
static

Returns a static instance of class VavilovFast.

Definition at line 566 of file VavilovFast.cxx.

◆ GetInstance() [2/2]

VavilovFast * ROOT::Math::VavilovFast::GetInstance ( double  kappa,
double  beta2 
)
static

Returns a static instance of class VavilovFast, and sets the values of kappa and beta2.

Parameters
kappaThe parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \)
beta2The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \)

Definition at line 571 of file VavilovFast.cxx.

◆ GetKappa()

double ROOT::Math::VavilovFast::GetKappa ( ) const
virtual

Return the current value of \(\kappa\).

Implements ROOT::Math::Vavilov.

Definition at line 558 of file VavilovFast.cxx.

◆ GetLambdaMax()

double ROOT::Math::VavilovFast::GetLambdaMax ( ) const
virtual

Return the maximum value of \(\lambda\) for which \(p(\lambda; \kappa, \beta^2)\) is nonzero in the current approximation.

Implements ROOT::Math::Vavilov.

Definition at line 554 of file VavilovFast.cxx.

◆ GetLambdaMin()

double ROOT::Math::VavilovFast::GetLambdaMin ( ) const
virtual

Return the minimum value of \(\lambda\) for which \(p(\lambda; \kappa, \beta^2)\) is nonzero in the current approximation.

Implements ROOT::Math::Vavilov.

Definition at line 550 of file VavilovFast.cxx.

◆ Pdf() [1/2]

double ROOT::Math::VavilovFast::Pdf ( double  x) const
virtual

Evaluate the Vavilov probability density function.

Parameters
xThe Landau parameter \(x = \lambda_L\)

Implements ROOT::Math::Vavilov.

Definition at line 363 of file VavilovFast.cxx.

◆ Pdf() [2/2]

double ROOT::Math::VavilovFast::Pdf ( double  x,
double  kappa,
double  beta2 
)
virtual

Evaluate the Vavilov probability density function, and set kappa and beta2, if necessary.

Parameters
xThe Landau parameter \(x = \lambda_L\)
kappaThe parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \)
beta2The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \)

Implements ROOT::Math::Vavilov.

Definition at line 407 of file VavilovFast.cxx.

◆ Quantile() [1/2]

double ROOT::Math::VavilovFast::Quantile ( double  z) const
virtual

Evaluate the inverse of the Vavilov cumulative probability density function.

Parameters
zThe argument \(z\), which must be in the range \(0 \le z \le 1\)

Implements ROOT::Math::Vavilov.

Definition at line 479 of file VavilovFast.cxx.

◆ Quantile() [2/2]

double ROOT::Math::VavilovFast::Quantile ( double  z,
double  kappa,
double  beta2 
)
virtual

Evaluate the inverse of the Vavilov cumulative probability density function, and set kappa and beta2, if necessary.

Parameters
zThe argument \(z\), which must be in the range \(0 \le z \le 1\)
kappaThe parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \)
beta2The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \)

Implements ROOT::Math::Vavilov.

Definition at line 535 of file VavilovFast.cxx.

◆ Quantile_c() [1/2]

double ROOT::Math::VavilovFast::Quantile_c ( double  z) const
virtual

Evaluate the inverse of the complementary Vavilov cumulative probability density function.

Parameters
zThe argument \(z\), which must be in the range \(0 \le z \le 1\)

Implements ROOT::Math::Vavilov.

Definition at line 540 of file VavilovFast.cxx.

◆ Quantile_c() [2/2]

double ROOT::Math::VavilovFast::Quantile_c ( double  z,
double  kappa,
double  beta2 
)
virtual

Evaluate the inverse of the complementary Vavilov cumulative probability density function, and set kappa and beta2, if necessary.

Parameters
zThe argument \(z\), which must be in the range \(0 \le z \le 1\)
kappaThe parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \)
beta2The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \)

Implements ROOT::Math::Vavilov.

Definition at line 545 of file VavilovFast.cxx.

◆ SetKappaBeta2()

void ROOT::Math::VavilovFast::SetKappaBeta2 ( double  kappa,
double  beta2 
)
virtual

Change \(\kappa\) and \(\beta^2\) and recalculate coefficients if necessary.

Parameters
kappaThe parameter \(\kappa\), which must be in the range \(0.01 \le \kappa \le 12 \)
beta2The parameter \(\beta^2\), which must be in the range \(0 \le \beta^2 \le 1 \)

Implements ROOT::Math::Vavilov.

Definition at line 62 of file VavilovFast.cxx.

Member Data Documentation

◆ fAC

double ROOT::Math::VavilovFast::fAC[14]
private

Definition at line 273 of file VavilovFast.h.

◆ fBeta2

double ROOT::Math::VavilovFast::fBeta2
private

Definition at line 271 of file VavilovFast.h.

◆ fgInstance

VavilovFast * ROOT::Math::VavilovFast::fgInstance = 0
staticprivate

Definition at line 279 of file VavilovFast.h.

◆ fHC

double ROOT::Math::VavilovFast::fHC[9]
private

Definition at line 274 of file VavilovFast.h.

◆ fItype

int ROOT::Math::VavilovFast::fItype
private

Definition at line 276 of file VavilovFast.h.

◆ fKappa

double ROOT::Math::VavilovFast::fKappa
private

Definition at line 270 of file VavilovFast.h.

◆ fNpt

int ROOT::Math::VavilovFast::fNpt
private

Definition at line 277 of file VavilovFast.h.

◆ fWCM

double ROOT::Math::VavilovFast::fWCM[201]
private

Definition at line 275 of file VavilovFast.h.

Libraries for ROOT::Math::VavilovFast:
[legend]

The documentation for this class was generated from the following files: