next up previous index
Next: G116 Vavilov Density Up: CERNLIB Previous: G110 Landau Distribution

G115 Approximate Vavilov Distribution and its Inverse

Routine ID: G115
Author(s): A. Rotondi, P. Montagna, K.S. KölbigLibrary: MATHLIB
Submitter: K.S. KölbigSubmitted: 10.12.1993
Language: FortranRevised:

The VAVLOV package contains subprograms for fast approximate calculation of functions related to the Vavilov distribution.

For κ>0 and 0 ≤β2≤1 , the Vavilov density function is mathematically defined by

φV(λ;κ,β2) = {12πi} ∫c-i&inf;c+i&inf;eλs f(s;κ,β2) ds,

where c is an arbitrary real constant and

f(s;κ,β2) = C(κ,β2) exps lnκ+ (s+κβ2) [ ln({sκ})+E1({sκ}) ]-κ exp(-{sκ}) .

E1(x)=∫0xt-1 (1-e-t) dt is the exponential integral, C(κ,β2)=expκ(1+β2γ) , and γ=0.57721...  is Euler's constant.

The Vavilov distribution function is defined by

ΦV(λ;κ,β2) = ∫-&inf;λφV(λ;κ,β2) dλ

and its inverse by ΨV(x;κ,β2)=ΦV-1(x;κ,β2) .

The function ΨV(x;κ,β2) can be used to generate Vavilov random numbers (see Usage).

Structure:

SUBROUTINE and FUNCTION subprograms
User Entry Names: VAVSET, VAVDEN, VAVDIS, VAVRND, VAVRAN
External References: LOCATF (E106), DENLAN, DISLAN (G110)
COMMON Block Names and Lenghts: /G115C1/ 226

Usage:

    CALL VAVSET(RKAPPA,BETA2,MODE)
sets auxiliary quantities used in VAVDEN, VAVDIS and VAVRND; this call has to precede a reference to any of these entries.
RKAPPA
The variable κ (the straggling parameter); (0.01 ≤κ≤12 ).
BETA2
The variable β2 (the square of velocity in unit c); (0 ≤β2≤1 ).
MODE
= 1;
= 0 in the particular case that VAVDEN only is referenced after the call to VAVSET.
In any arithmetic expression,
VAVDEN(X)φV(X;RKAPPA,BETA2) ,
VAVDIS(X)ΦV(X;RKAPPA,BETA2) ,
VAVRND(X)ΨV(X;RKAPPA,BETA2) ,

RKAPPA and BETA2 are defined by the last call to VAVSET prior to a reference to VAVDEN, VAVDIS, or VAVRND.

To generate a set of Vavilov random numbers with identical κ

and β2 , VAVSET should be called once and then VAVRND be referenced repeatedly, using as argument X a random number from a uniform distribution over the interval (0,1).

In any arithmetic expression, VAVRAN(RKAPPA,BETA2,X) has an approximate value of ΨV(X;RKAPPA,BETA2) .

To generate one Vavilov random number for given values of κ

and β2 , VAVRAN should be used, using as argument X a random number from a uniform distribution over the interval (0,1).

VAVDEN, VAVDIS, VAVRND, VAVRAN and X, RKAPPA, BETA2 are of type REAL, and MODE is of type INTEGER.

Method:

The method is discribed in Ref. 1.

Accuracy:

The accuracy depends on the parameters. Although often rather poor from a mathematical point of view, it is usually sufficient for the intended application in physics (see Notes).

Restrictions:

No test is made whether the parameters κ and β2

are in the specified ranges.

Notes:

  1. Representing the Vavilov functions by approximations which are both fast and accurate is a difficult task. In view of the requirements in physics, speed is much more important than accuracy. This is taken into account for the present routines.
  2. For a more accurate, but much slower, calculation of the Vavilov density and distribution functions, use VVILOV (G116).
  3. For κ≤0.01 , the Vavilov distribution can be replaced by the Landau distribution ( LANDAU (G110)), taking into account that λV=(λL-lnκ)/κ .
  4. For κ≥10 , the Vavilov distribution can be replaced by the Gaussian distribution with mean
    μ=γ-1-β2-lnκ and variance σ2=(2-β2)/(2κ) .

References:

  1. A. Rotondi and P. Montagna, Fast calculation of Vavilov distribution, Nucl. Instr. and Meth. B47 (1990) 215--224.

G116



next up previous index
Next: G116 Vavilov Density Up: CERNLIB Previous: G110 Landau Distribution


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995