AliPhysics  5364b50 (5364b50)
AliLandauGaus Class Reference

#include <AliLandauGaus.h>

Public Types

enum  {
  kC = 0, kDelta, kXi, kSigma,
  kSigmaN, kN, kA
}
 

Static Public Member Functions

Constants

Enumeration of colors

static Double_t MPShift ()
 
static Double_t SigmaShiftC ()
 
static Double_t SigmaShiftP ()
 
static Double_t InvSq2Pi ()
 
static Double_t NSigma ()
 
static Int_t NSteps ()
 
Function calculations
static Double_t Fl (Double_t x, Double_t delta, Double_t xi)
 
static Double_t F (Double_t x, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n)
 
static Double_t Fi (Double_t x, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t i)
 
static Double_t DFidPar (Double_t x, UShort_t ipar, Double_t dp, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t i)
 
static Double_t Fn (Double_t x, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t n, const Double_t *a)
 
static void IPars (Int_t i, Double_t &delta, Double_t &xi, Double_t &sigma)
 
static Bool_t EnableSigmaShift (Short_t val=-1)
 
static Double_t SigmaShift (Int_t i, Double_t xi, Double_t sigma)
 
Utilities for defining TF1 objects
static TF1 * MakeF1 (Double_t c, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Double_t xmin, Double_t xmax)
 
static TF1 * MakeFi (Double_t c, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t i, Double_t xmin, Double_t xmax)
 
static TF1 * MakeFn (Double_t c, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t n, const Double_t *a, Double_t xmin, Double_t xmax)
 
static TF1 * MakeComposite (Double_t c1, Double_t delta, Double_t xi1, Double_t sigma, Double_t c2, Double_t xi2, Double_t xmin, Double_t xmax)
 
static Color_t GetIColor (Int_t i)
 
static Double_t F1Func (Double_t *xp, Double_t *pp)
 
static Double_t FnFunc (Double_t *xp, Double_t *pp)
 
static Double_t FiFunc (Double_t *xp, Double_t *pp)
 
static Double_t CompFunc (Double_t *xp, Double_t *pp)
 

Detailed Description

This class contains static member functions to calculate the energy loss stragling - most notably the N-particle energy loss as a sum of convolutions of a Landau and Gauss distribution.

That is, for a single particle we have the function \( f(x)\):

\[ f(x;\Delta_p,\xi,\sigma') = \frac{1}{\sigma' \sqrt{2 \pi}} \int_{-\infty}^{+\infty} dx' f'_{L}(x',\Delta_p,\xi) \exp{-\frac{(x-x')^2}{2\sigma'^2}} \]

where \( f'_{L}\) is the Landau distribution, \(\Delta_p\) the most probable energy loss, \( \xi\) the width of the Landau, and \( \sigma'^2=\sigma^2-\sigma_n^2 \). Here, \(\sigma\) is the variance of the Gaussian, and \(\sigma_n\) is a parameter modelling noise in the detector.

for \( i\) particles this is modified to

\[ f_i(x;\Delta_{p},\xi,\sigma')=f(x;\Delta_{p,i},\xi_i,\sigma_i') \]

corresponding to \( i\) particles i.e., with the substitutions

\begin{eqnarray*} \Delta_p \rightarrow \Delta_{p,i}&=& i(\Delta_p + \xi\log(i))\\ \xi \rightarrow \xi_i &=& i \xi\\ \sigma \rightarrow \sigma_i &=& \sqrt{i}\sigma\\ \sigma'^2 \rightarrow \sigma_i'^2 &=& \sigma_n^2 + \sigma_i^2 \end{eqnarray*}

Because of the convolution with a Gaussian, the most-probable-value \(\Delta_p'\) of the resulting distribution is not really at the Landau most-probable-value \(\Delta_p\). In fact we find that \(\Delta_p' > \Delta_p\).

Ideally, one would find an analytic expression for this shift by solving

\begin{eqnarray} 0 &=& \frac{d f_i(x;\Delta_p,\xi,\sigma)}{d\Delta}\\ &=& \frac{d}{d\Delta}\frac{1}{\sigma' \sqrt{2 \pi}} \int_{-\infty}^{+\infty} dx' f'_{L}(x',\Delta_p,\xi) \exp{-\frac{(x-x')^2}{2\sigma'^2}} \end{eqnarray}

for \( x\) as a function of \(\Delta_p,\xi,\sigma,i\). However, do to the complex nature of the Landau distribution this is not really feasible.

Instead, the shift was studied numerically. Landau-Gauss distributions for \(i=1,\ldots\) where generated with varying \(\xi\) and \(\sigma\). The distributions was then numerically differentiated and the root \(\Delta_p'\) of that derivative found numerically. The difference \(\delta\Delta_p=\Delta_p'-\Delta_p\) was then studied as a function of the \(\sigma,\xi\) parameters and an approximate expression was found

\[ \delta\Delta_p \approx \frac{c \sigma u}{(1+1/i)^{p u^{3/2}}} \]

where \( u=\sigma/\xi\). The parameters \(c\) and \(p\) is found to depend on \( u\) only weakly, and for practical applications where \(u\approx1\), we set \( c=p=1/2\).

For the evaluating the full energy loss distribution from f \( 1+2+\ldots,n\) particles, we evaluate

\[ f_N(x;\Delta_p,\xi,\sigma')=\sum_{i=1}^N a_i f_i(x;\Delta_p,\xi,\sigma',a) \]

where \( f(x;\Delta_p,\xi,\sigma')\) is the convolution of a Landau with a Gaussian (see LandauGaus), and \( a\) is a vector of weights for each \( f_i\). Note that \( a_1 = 1\).

Everything is defined in this header file to make it easy to move this code around. Nothing here's meant to be persistent, so we can easily do that.

References:

Definition at line 110 of file AliLandauGaus.h.

Member Enumeration Documentation

anonymous enum

Enumeration of parameters

Enumerator
kC 
kDelta 
kXi 
kSigma 
kSigmaN 
kN 
kA 

Definition at line 114 of file AliLandauGaus.h.

Member Function Documentation

Double_t AliLandauGaus::CompFunc ( Double_t xp,
Double_t pp 
)
inlinestatic

Utility function for TF1 definition

Parameters
ppArray of parameters
xpPointer to independent variable
See also
AliLandauGaus::F
Returns
Landau convolved with a Gauss

Definition at line 697 of file AliLandauGaus.h.

Referenced by MakeComposite(), and NSteps().

Double_t AliLandauGaus::DFidPar ( Double_t  x,
UShort_t  ipar,
Double_t  dp,
Double_t  delta,
Double_t  xi,
Double_t  sigma,
Double_t  sigma_n,
Int_t  i 
)
inlinestatic

Numerically evaluate

\[ \left.\frac{\partial f_i}{\partial p_i}\right|_{x} \]

where \( p_i\) is the \( i^{\mbox{th}}\) parameter. The mapping of the parameters is given by

  • 0: \(\Delta\)
  • 1: \(\xi\)
  • 2: \(\sigma\)
  • 3: \(\sigma_n\)
Parameters
xWhere to evaluate
iparParameter number
dp\( \epsilon\delta p_i\) for some value of \(\epsilon\)
delta\( \Delta_p\)
xi\( \xi\)
sigma\( \sigma\)
sigma_n\( \sigma_n\)
i\( i\)
Returns
\( f_i\) evaluated

Definition at line 580 of file AliLandauGaus.h.

Referenced by NSteps().

Bool_t AliLandauGaus::EnableSigmaShift ( Short_t  val = -1)
inlinestatic

Set and check if sigma shift is enabled

Parameters
valif <0, then only check. Otherwise set enabled (>0) or not (=0)
Returns
whether the sigma shift is enabled or not

Definition at line 480 of file AliLandauGaus.h.

Referenced by AliFMDCorrELossFit::CacheBins(), AliFMDEnergyFitter::CreateOutputObjects(), IPars(), AliFMDEnergyFitter::MakeCorrectionsObject(), NSteps(), AliFMDEnergyFitter::SetEnableDeltaShift(), and TestF::StepIt().

Double_t AliLandauGaus::F ( Double_t  x,
Double_t  delta,
Double_t  xi,
Double_t  sigma,
Double_t  sigma_n 
)
inlinestatic

Calculate the value of a Landau convolved with a Gaussian

\[ f(x;\Delta_p,\xi,\sigma') = \frac{1}{\sigma' \sqrt{2 \pi}} \int_{-\infty}^{+\infty} dx' f'_{L}(x';\Delta_p,\xi) \exp{-\frac{(x-x')^2}{2\sigma'^2}} \]

Note that this function uses the constants NSteps() and NSigma()

Parameters
xwhere to evaluate \( f\)
delta\( \Delta_p\) of \( f(x;\Delta_p,\xi,\sigma')\)
xi\( \xi\) of \( f(x;\Delta_p,\xi,\sigma')\)
sigma\( \sigma\) of \(\sigma'^2=\sigma^2-\sigma_n^2 \)
sigma_n\( \sigma_n\) of \(\sigma'^2=\sigma^2-\sigma_n^2 \)
Returns
\( f\) evaluated at \( x\).

Definition at line 527 of file AliLandauGaus.h.

Referenced by CompFunc(), F1Func(), Fi(), and NSteps().

Double_t AliLandauGaus::F1Func ( Double_t xp,
Double_t pp 
)
inlinestatic

Utility function for TF1 definition

Parameters
ppArray of parameters
xpPointer to independent variable
See also
AliLandauGaus::F
Returns
Landau convolved with a Gauss

Definition at line 655 of file AliLandauGaus.h.

Referenced by MakeF1(), and NSteps().

Double_t AliLandauGaus::Fi ( Double_t  x,
Double_t  delta,
Double_t  xi,
Double_t  sigma,
Double_t  sigma_n,
Int_t  i 
)
inlinestatic

Evaluate

\[ f_i(x;\Delta_p,\xi,\sigma') = f(x;\Delta_{p,i},\xi_i,\sigma_i') \]

corresponding to \( i\) particles.

Parameters
xWhere to evaluate
delta\( \Delta\)
xi\( \xi\)
sigma\( \sigma\)
sigma_n\( \sigma_n\)
i\( i \)
Returns
\( f_i \) evaluated

Definition at line 553 of file AliLandauGaus.h.

Referenced by DFidPar(), AliFMDCorrELossFit::ELossFit::EvaluateWeighted(), FiFunc(), Fn(), and NSteps().

Double_t AliLandauGaus::FiFunc ( Double_t xp,
Double_t pp 
)
inlinestatic

Utility function for TF1 definition

Parameters
ppArray of parameters
xpPointer to independent variable
See also
AliLandauGaus::Fn
Returns
Landau convolved with a Gauss

Definition at line 668 of file AliLandauGaus.h.

Referenced by MakeFi(), and NSteps().

Double_t AliLandauGaus::Fl ( Double_t  x,
Double_t  delta,
Double_t  xi 
)
inlinestatic

Calculate the shifted Landau

\[ f'_{L}(x;\Delta_p,\xi) = f_L(x;\Delta_p+0.22278298\xi) \]

where \( f_{L}\) is the ROOT implementation of the Landau distribution (known to have \(\Delta_{p}=-0.22278298\) for \(\Delta_p=0,\xi=1\).

Parameters
xWhere to evaluate \( f'_{L}\)
deltaMost probable value
xiThe 'width' of the distribution
Returns
\( f'_{L}(x;\Delta,\xi) \)

Definition at line 520 of file AliLandauGaus.h.

Referenced by F(), Fi(), and NSteps().

Double_t AliLandauGaus::Fn ( Double_t  x,
Double_t  delta,
Double_t  xi,
Double_t  sigma,
Double_t  sigma_n,
Int_t  n,
const Double_t a 
)
inlinestatic

Evaluate

\[ f_N(x;\Delta_p,\xi,\sigma')=\sum_{i=1}^N a_i f_i(x;\Delta_p,\xi,\sigma',a) \]

where \( f(x;\Delta_p,\xi,\sigma')\) is the convolution of a Landau with a Gaussian (see LandauGaus).

Parameters
xWhere to evaluate \( f_N\)
delta\( \Delta_1\)
xi\( \xi_1\)
sigma\( \sigma_1\)
sigma_n\( \sigma_n\)
n\( N\) in the sum above.
aArray of size \( N-1\) of the weights \( a_i\) for \( i > 1\)
Returns
\( f_N(x;\Delta,\xi,\sigma')\)

Definition at line 568 of file AliLandauGaus.h.

Referenced by AliFMDCorrELossFit::ELossFit::Evaluate(), FnFunc(), and NSteps().

Double_t AliLandauGaus::FnFunc ( Double_t xp,
Double_t pp 
)
inlinestatic

Utility function for TF1 definition

Parameters
ppArray of parameters
xpPointer to independent variable
See also
AliLandauGaus::Fn
Returns
Landau convolved with a Gauss

Definition at line 682 of file AliLandauGaus.h.

Referenced by MakeFn(), and NSteps().

Color_t AliLandauGaus::GetIColor ( Int_t  i)
inlinestatic

Get the color of the \( i\) particle response

Parameters
iParticle number
Returns
Color

Definition at line 637 of file AliLandauGaus.h.

Referenced by MakeF1(), MakeFi(), MakeFn(), NSteps(), and TestF::StepIt().

static Double_t AliLandauGaus::InvSq2Pi ( )
inlinestatic

Normalization constant

Returns
The landau-gauss normalization constant

Definition at line 155 of file AliLandauGaus.h.

Referenced by F().

void AliLandauGaus::IPars ( Int_t  i,
Double_t delta,
Double_t xi,
Double_t sigma 
)
inlinestatic

Get parameters for the \( i\) particle response.

\begin{eqnarray*} \Delta \rightarrow \Delta_i &=& i(\Delta + \xi\log(i))\\ \xi \rightarrow \xi_i &=& i \xi\\ \sigma \rightarrow \sigma_i &=& \sqrt{i}\sigma\\ \sigma'^2 \rightarrow \sigma_i'^2 &=& \sigma_n^2 + \sigma_i^2 \end{eqnarray*}

Parameters
iNumber of particles
deltaInput: single particle, output \( i\) particle
xiInput: single particle, output \( i\) particle
sigmaInput: single particle, output \( i\) particle

Definition at line 488 of file AliLandauGaus.h.

Referenced by TestF::DoUnit(), Fi(), NSteps(), and TestF::StepIt().

TF1 * AliLandauGaus::MakeComposite ( Double_t  c1,
Double_t  delta,
Double_t  xi1,
Double_t  sigma,
Double_t  c2,
Double_t  xi2,
Double_t  xmin,
Double_t  xmax 
)
inlinestatic

Make a TF1 object that describes the convoluted energy loss of primary and secondary particles.

Parameters
c1Primary weight
deltaMost-probable value
xi1Primary width
sigmaGaussian variance
c2Secondary weight
xi2Secondary with
xminLeast x
xmaxLargest x
Returns
Pointer to newly allocated TF1 object

Definition at line 782 of file AliLandauGaus.h.

Referenced by AliLandauGausFitter::FitComposite(), and NSteps().

TF1 * AliLandauGaus::MakeF1 ( Double_t  c,
Double_t  delta,
Double_t  xi,
Double_t  sigma,
Double_t  sigma_n,
Double_t  xmin,
Double_t  xmax 
)
inlinestatic

Generate a TF1 object of \( f_1\)

Parameters
cConstant
delta\( \Delta_1\)
xi\( \xi_1\)
sigma\( \sigma_1\)
sigma_n\( \sigma_n\)
xminLeast value of range
xmaxLargest value of range
Returns
Newly allocated TF1 object

Definition at line 715 of file AliLandauGaus.h.

Referenced by AliLandauGausFitter::Fit1Particle(), AliLandauGausFitter::FitComposite(), AliFMDCorrELossFit::ELossFit::GetF1(), and NSteps().

TF1 * AliLandauGaus::MakeFi ( Double_t  c,
Double_t  delta,
Double_t  xi,
Double_t  sigma,
Double_t  sigma_n,
Int_t  i,
Double_t  xmin,
Double_t  xmax 
)
inlinestatic

Generate a TF1 object of \( f_I\)

Parameters
cConstant
delta\( \Delta_1\)
xi\( \xi_1\)
sigma\( \sigma_1\)
sigma_n\( \sigma_n\)
i\( i\) - the number of particles
xminLeast value of range
xmaxLargest value of range
Returns
Newly allocated TF1 object

Definition at line 760 of file AliLandauGaus.h.

Referenced by AliFMDCorrELossFit::ELossFit::Draw(), TestF::Test::Fi(), AliFMDCorrELossFit::ELossFit::GetF1(), and NSteps().

TF1 * AliLandauGaus::MakeFn ( Double_t  c,
Double_t  delta,
Double_t  xi,
Double_t  sigma,
Double_t  sigma_n,
Int_t  n,
const Double_t a,
Double_t  xmin,
Double_t  xmax 
)
inlinestatic

Generate a TF1 object of \( f_N\)

Parameters
cConstant
delta\( \Delta_1\)
xi\( \xi_1\)
sigma\( \sigma_1\)
sigma_n\( \sigma_n\)
n\( N\) - how many particles to sum to
aArray of size \( N-1\) of the weights \( a_i\) for \( i > 1\)
xminLeast value of range
xmaxLargest value of range
Returns
Newly allocated TF1 object

Definition at line 734 of file AliLandauGaus.h.

Referenced by AliFMDCorrELossFit::ELossFit::Draw(), AliLandauGausFitter::FitNParticle(), AliFMDCorrELossFit::ELossFit::GetF1(), NSteps(), and TestF::Test::Run().

static Double_t AliLandauGaus::MPShift ( )
inlinestatic

The shift of the most probable value for the ROOT function TMath::Landau

Returns
Shift of TMath::Landau

Definition at line 137 of file AliLandauGaus.h.

Referenced by Fl().

static Double_t AliLandauGaus::NSigma ( )
inlinestatic

How many sigma's of the Gaussian in the Landau, Gaussian convolution to integrate over

Definition at line 160 of file AliLandauGaus.h.

Referenced by F().

static Int_t AliLandauGaus::NSteps ( )
inlinestatic

Number of steps to do in the Landau, Gaussiam convolution

Definition at line 164 of file AliLandauGaus.h.

Referenced by F().

Double_t AliLandauGaus::SigmaShift ( Int_t  i,
Double_t  xi,
Double_t  sigma 
)
inlinestatic

Get the shift of the MPV due to convolution with a Gaussian.

\[ \delta\Delta_p \approx \frac{c \sigma u}{(1+1/i)^{p u^{3/2}}} \]

where \( u=\sigma/\xi\).

Parameters
iNumber of particles
xiLandau width \(\xi\)
sigmaGaussian variance \(\sigma\)
Returns
The shift

Definition at line 507 of file AliLandauGaus.h.

Referenced by IPars(), and NSteps().

static Double_t AliLandauGaus::SigmaShiftC ( )
inlinestatic

Constant of \(\sigma\) shift

Returns
Constant of \(\sigma\) shift

Definition at line 143 of file AliLandauGaus.h.

Referenced by SigmaShift().

static Double_t AliLandauGaus::SigmaShiftP ( )
inlinestatic

Power factor of \(\sigma\) shift

Returns
Power factor of \(\sigma\) shift

Definition at line 149 of file AliLandauGaus.h.

Referenced by SigmaShift().


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