Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
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(λL;κ,β2)=12πicic+iϕ(s)eλLsds

where ϕ(s)=eCeψ(s) with C=κ(1+β2γ) and ψ(s)=slnκ+(s+β2κ)(011estκtdtγ)κesκ. γ=0.5772156649 is Euler's constant.

For the class VavilovFast, Pdf returns the Vavilov distribution as function of Landau's parameter λL=λV/κlnκ, 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 κ<0.01, pdf approaches the Landau distribution.

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

For values κ>10, the Gauss approximation should be used with μ and σ 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(λ;κ,β2) for fixed values of κ and β2. Changing these values is computationally expensive.

The parameter κ must be in the range 0.01κ12.

The parameter β2 must be in the range 0β21.

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.
 
 ~VavilovFast () override
 Destructor.
 
double Cdf (double x) const override
 Evaluate the Vavilov cumulative probability density function.
 
double Cdf (double x, double kappa, double beta2) override
 Evaluate the Vavilov cumulative probability density function, and set kappa and beta2, if necessary.
 
double Cdf_c (double x) const override
 Evaluate the Vavilov complementary cumulative probability density function.
 
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.
 
double GetBeta2 () const override
 Return the current value of β2.
 
double GetKappa () const override
 Return the current value of κ.
 
double GetLambdaMax () const override
 Return the maximum value of λ for which p(λ;κ,β2) is nonzero in the current approximation.
 
double GetLambdaMin () const override
 Return the minimum value of λ for which p(λ;κ,β2) is nonzero in the current approximation.
 
double Pdf (double x) const override
 Evaluate the Vavilov probability density function.
 
double Pdf (double x, double kappa, double beta2) override
 Evaluate the Vavilov probability density function, and set kappa and beta2, if necessary.
 
double Quantile (double z) const override
 Evaluate the inverse of the Vavilov cumulative probability density function.
 
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.
 
double Quantile_c (double z) const override
 Evaluate the inverse of the complementary Vavilov cumulative probability density function.
 
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.
 
void SetKappaBeta2 (double kappa, double beta2) override
 Change κ and β2 and recalculate coefficients if necessary.
 
- Public Member Functions inherited from ROOT::Math::Vavilov
 Vavilov ()
 Default constructor.
 
virtual ~Vavilov ()
 Destructor.
 
virtual double Kurtosis () const
 Return the theoretical kurtosis γ2=1/3β2/4κ3σ4.
 
virtual double Mean () const
 Return the theoretical mean μ=γ1lnκβ2, where γ=0.5772 is Euler's constant.
 
virtual double Mode () const
 Return the value of λ where the pdf is maximal.
 
virtual double Mode (double kappa, double beta2)
 Return the value of λ where the pdf is maximal function, and set kappa and beta2, if necessary.
 
virtual double Skewness () const
 Return the theoretical skewness γ1=1/2β2/3κ2σ3.
 
virtual double Variance () const
 Return the theoretical variance σ2=1β2/2κ.
 

Static Public Member Functions

static VavilovFastGetInstance ()
 Returns a static instance of class VavilovFast.
 
static VavilovFastGetInstance (double kappa, double beta2)
 Returns a static instance of class VavilovFast, and sets the values of kappa and beta2.
 
- Static Public Member Functions inherited from ROOT::Math::Vavilov
static double Kurtosis (double kappa, double beta2)
 Return the theoretical kurtosis γ2=1/3β2/4κ3σ4.
 
static double Mean (double kappa, double beta2)
 Return the theoretical Mean μ=γ1lnκβ2.
 
static double Skewness (double kappa, double beta2)
 Return the theoretical skewness γ1=1/2β2/3κ2σ3.
 
static double Variance (double kappa, double beta2)
 Return the theoretical Variance σ2=1β2/2κ.
 

Private Attributes

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

Static Private Attributes

static VavilovFastfgInstance = nullptr
 

#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 κ, which must be in the range 0.01κ12
beta2The parameter β2, which must be in the range 0β21

Definition at line 51 of file VavilovFast.cxx.

◆ ~VavilovFast()

ROOT::Math::VavilovFast::~VavilovFast ( )
override

Destructor.

Definition at line 57 of file VavilovFast.cxx.

Member Function Documentation

◆ Cdf() [1/2]

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

Evaluate the Vavilov cumulative probability density function.

Parameters
xThe Landau parameter x=λ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
xThe Landau parameter x=λL
kappaThe parameter κ, which must be in the range 0.01κ12
beta2The parameter β2, which must be in the range 0β21

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
xThe Landau parameter x=λ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
xThe Landau parameter x=λL
kappaThe parameter κ, which must be in the range 0.01κ12
beta2The parameter β2, which must be in the range 0β21

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 β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 κ, which must be in the range 0.01κ12
beta2The parameter β2, which must be in the range 0β21

Definition at line 571 of file VavilovFast.cxx.

◆ GetKappa()

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

Return the current value of κ.

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 λ for which p(λ;κ,β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 λ for which p(λ;κ,β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
xThe Landau parameter x=λ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
xThe Landau parameter x=λL
kappaThe parameter κ, which must be in the range 0.01κ12
beta2The parameter β2, which must be in the range 0β21

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
zThe argument z, which must be in the range 0z1

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
zThe argument z, which must be in the range 0z1
kappaThe parameter κ, which must be in the range 0.01κ12
beta2The parameter β2, which must be in the range 0β21

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
zThe argument z, which must be in the range 0z1

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
zThe argument z, which must be in the range 0z1
kappaThe parameter κ, which must be in the range 0.01κ12
beta2The parameter β2, which must be in the range 0β21

Implements ROOT::Math::Vavilov.

Definition at line 545 of file VavilovFast.cxx.

◆ SetKappaBeta2()

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

Change κ and β2 and recalculate coefficients if necessary.

Parameters
kappaThe parameter κ, which must be in the range 0.01κ12
beta2The parameter β2, which must be in the range 0β21

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 = nullptr
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:

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