 ROOT   Reference Guide 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:

• 9.9us per call to SetKappaBeta2 or constructor
• 0.095us per call to Pdf, Cdf
• 3.7us per first call to Quantile after SetKappaBeta2 or constructor
• 0.137us per subsequent call to Quantile

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...

~VavilovFast () override
Destructor. More...

double Cdf (double x) const override
Evaluate the Vavilov cumulative probability density function. More...

double Cdf (double x, double kappa, double beta2) override
Evaluate the Vavilov cumulative probability density function, and set kappa and beta2, if necessary. More...

double Cdf_c (double x) const override
Evaluate the Vavilov complementary cumulative probability density function. More...

double Cdf_c (double x, double kappa, double beta2) override
Evaluate the Vavilov complementary cumulative probability density function, and set kappa and beta2, if necessary. More...

double GetBeta2 () const override
Return the current value of $$\beta^2$$. More...

double GetKappa () const override
Return the current value of $$\kappa$$. More...

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

double GetLambdaMin () const override
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 override
Evaluate the Vavilov probability density function. More...

double Pdf (double x, double kappa, double beta2) override
Evaluate the Vavilov probability density function, and set kappa and beta2, if necessary. More...

double Quantile (double z) const override
Evaluate the inverse of the Vavilov cumulative probability density function. More...

double Quantile (double z, double kappa, double beta2) override
Evaluate the inverse of the Vavilov cumulative probability density function, and set kappa and beta2, if necessary. More...

double Quantile_c (double z) const override
Evaluate the inverse of the complementary Vavilov cumulative probability density function. More...

double Quantile_c (double z, double kappa, double beta2) override
Evaluate the inverse of the complementary Vavilov cumulative probability density function, and set kappa and beta2, if necessary. More...

void SetKappaBeta2 (double kappa, double beta2) override
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 Cdf (double x) const =0
Evaluate the Vavilov cumulative probability density function. More...

virtual double Cdf (double x, double kappa, double beta2)=0
Evaluate the Vavilov cumulative probability density function, and set kappa and beta2, if necessary. More...

virtual double Cdf_c (double x) const =0
Evaluate the Vavilov complementary cumulative probability density function. More...

virtual double Cdf_c (double x, double kappa, double beta2)=0
Evaluate the Vavilov complementary cumulative probability density function, and set kappa and beta2, if necessary. More...

virtual double GetBeta2 () const =0
Return the current value of $$\beta^2$$. More...

virtual double GetKappa () const =0
Return the current value of $$\kappa$$. More...

virtual double GetLambdaMax () const =0
Return the maximum value of $$\lambda$$ for which $$p(\lambda; \kappa, \beta^2)$$ is nonzero in the current approximation. More...

virtual double GetLambdaMin () const =0
Return the minimum value of $$\lambda$$ for which $$p(\lambda; \kappa, \beta^2)$$ is nonzero in the current approximation. 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 Pdf (double x) const =0
Evaluate the Vavilov probability density function. More...

virtual double Pdf (double x, double kappa, double beta2)=0
Evaluate the Vavilov probability density function, and set kappa and beta2, if necessary. More...

virtual double Quantile (double z) const =0
Evaluate the inverse of the Vavilov cumulative probability density function. More...

virtual double Quantile (double z, double kappa, double beta2)=0
Evaluate the inverse of the Vavilov cumulative probability density function, and set kappa and beta2, if necessary. More...

virtual double Quantile_c (double z) const =0
Evaluate the inverse of the complementary Vavilov cumulative probability density function. More...

virtual double Quantile_c (double z, double kappa, double beta2)=0
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)=0
Change $$\kappa$$ and $$\beta^2$$ and recalculate coefficients 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 

double fBeta2

double fHC 

int fItype

double fKappa

int fNpt

double fWCM 

## Static Private Attributes

static VavilovFastfgInstance = 0

#include <Math/VavilovFast.h>

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

## ◆ VavilovFast()

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

Initialize an object to calculate the Vavilov distribution.

Parameters
 kappa The parameter $$\kappa$$, which must be in the range $$0.01 \le \kappa \le 12$$ beta2 The 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 ( )
override

Destructor.

Definition at line 57 of file VavilovFast.cxx.

## ◆ Cdf() [1/2]

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

Evaluate the Vavilov cumulative probability density function.

Parameters
 x The 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 )
overridevirtual

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

Parameters
 x The Landau parameter $$x = \lambda_L$$ kappa The parameter $$\kappa$$, which must be in the range $$0.01 \le \kappa \le 12$$ beta2 The 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
overridevirtual

Evaluate the Vavilov complementary cumulative probability density function.

Parameters
 x The 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 )
overridevirtual

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

Parameters
 x The Landau parameter $$x = \lambda_L$$ kappa The parameter $$\kappa$$, which must be in the range $$0.01 \le \kappa \le 12$$ beta2 The 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
overridevirtual

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
 kappa The parameter $$\kappa$$, which must be in the range $$0.01 \le \kappa \le 12$$ beta2 The 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
overridevirtual

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
overridevirtual

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
overridevirtual

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
overridevirtual

Evaluate the Vavilov probability density function.

Parameters
 x The 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 )
overridevirtual

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

Parameters
 x The Landau parameter $$x = \lambda_L$$ kappa The parameter $$\kappa$$, which must be in the range $$0.01 \le \kappa \le 12$$ beta2 The 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
overridevirtual

Evaluate the inverse of the Vavilov cumulative probability density function.

Parameters
 z The 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 )
overridevirtual

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

Parameters
 z The argument $$z$$, which must be in the range $$0 \le z \le 1$$ kappa The parameter $$\kappa$$, which must be in the range $$0.01 \le \kappa \le 12$$ beta2 The 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
overridevirtual

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

Parameters
 z The 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 )
overridevirtual

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

Parameters
 z The argument $$z$$, which must be in the range $$0 \le z \le 1$$ kappa The parameter $$\kappa$$, which must be in the range $$0.01 \le \kappa \le 12$$ beta2 The 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 )
overridevirtual

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

Parameters
 kappa The parameter $$\kappa$$, which must be in the range $$0.01 \le \kappa \le 12$$ beta2 The 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.

## ◆ fAC

 double ROOT::Math::VavilovFast::fAC
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
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
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: