![]() |
AliPhysics
35e5fca (35e5fca)
|
#include <AliLandauGaus.h>
Public Types | |
enum | { kC = 0, kDelta, kXi, kSigma, kSigmaN, kN, kA } |
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.
anonymous enum |
Enumeration of parameters
Enumerator | |
---|---|
kC | |
kDelta | |
kXi | |
kSigma | |
kSigmaN | |
kN | |
kA |
Definition at line 114 of file AliLandauGaus.h.
Utility function for TF1 definition
pp | Array of parameters |
xp | Pointer to independent variable |
Definition at line 697 of file AliLandauGaus.h.
Referenced by MakeComposite().
|
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
x | Where to evaluate |
ipar | Parameter number |
dp | \( \epsilon\delta p_i\) for some value of \(\epsilon\) |
delta | \( \Delta_p\) |
xi | \( \xi\) |
sigma | \( \sigma\) |
sigma_n | \( \sigma_n\) |
i | \( i\) |
Definition at line 580 of file AliLandauGaus.h.
Set and check if sigma shift is enabled
val | if <0, then only check. Otherwise set enabled (>0) or not (=0) |
Definition at line 480 of file AliLandauGaus.h.
Referenced by AliFMDCorrELossFit::CacheBins(), AliFMDEnergyFitter::CreateOutputObjects(), IPars(), AliFMDEnergyFitter::MakeCorrectionsObject(), and AliFMDEnergyFitter::SetEnableDeltaShift().
|
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()
x | where 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 \) |
Definition at line 527 of file AliLandauGaus.h.
Referenced by CompFunc(), F1Func(), and Fi().
Utility function for TF1 definition
pp | Array of parameters |
xp | Pointer to independent variable |
Definition at line 655 of file AliLandauGaus.h.
Referenced by MakeF1().
|
inlinestatic |
Evaluate
\[ f_i(x;\Delta_p,\xi,\sigma') = f(x;\Delta_{p,i},\xi_i,\sigma_i') \]
corresponding to \( i\) particles.
x | Where to evaluate |
delta | \( \Delta\) |
xi | \( \xi\) |
sigma | \( \sigma\) |
sigma_n | \( \sigma_n\) |
i | \( i \) |
Definition at line 553 of file AliLandauGaus.h.
Referenced by DFidPar(), AliFMDCorrELossFit::ELossFit::EvaluateWeighted(), FiFunc(), and Fn().
Utility function for TF1 definition
pp | Array of parameters |
xp | Pointer to independent variable |
Definition at line 668 of file AliLandauGaus.h.
Referenced by MakeFi().
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\).
x | Where to evaluate \( f'_{L}\) |
delta | Most probable value |
xi | The 'width' of the distribution |
Definition at line 520 of file AliLandauGaus.h.
|
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).
x | Where to evaluate \( f_N\) |
delta | \( \Delta_1\) |
xi | \( \xi_1\) |
sigma | \( \sigma_1\) |
sigma_n | \( \sigma_n\) |
n | \( N\) in the sum above. |
a | Array of size \( N-1\) of the weights \( a_i\) for \( i > 1\) |
Definition at line 568 of file AliLandauGaus.h.
Referenced by AliFMDCorrELossFit::ELossFit::Evaluate(), and FnFunc().
Utility function for TF1 definition
pp | Array of parameters |
xp | Pointer to independent variable |
Definition at line 682 of file AliLandauGaus.h.
Referenced by MakeFn().
|
inlinestatic |
Get the color of the \( i\) particle response
i | Particle number |
Definition at line 637 of file AliLandauGaus.h.
|
inlinestatic |
Normalization constant
Definition at line 155 of file AliLandauGaus.h.
Referenced by F().
|
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*}
i | Number of particles |
delta | Input: single particle, output \( i\) particle |
xi | Input: single particle, output \( i\) particle |
sigma | Input: single particle, output \( i\) particle |
Definition at line 488 of file AliLandauGaus.h.
Referenced by TestF::DoUnit(), and Fi().
|
inlinestatic |
Make a TF1 object that describes the convoluted energy loss of primary and secondary particles.
c1 | Primary weight |
delta | Most-probable value |
xi1 | Primary width |
sigma | Gaussian variance |
c2 | Secondary weight |
xi2 | Secondary with |
xmin | Least x |
xmax | Largest x |
Definition at line 782 of file AliLandauGaus.h.
Referenced by AliLandauGausFitter::FitComposite().
|
inlinestatic |
Generate a TF1 object of \( f_1\)
c | Constant |
delta | \( \Delta_1\) |
xi | \( \xi_1\) |
sigma | \( \sigma_1\) |
sigma_n | \( \sigma_n\) |
xmin | Least value of range |
xmax | Largest value of range |
Definition at line 715 of file AliLandauGaus.h.
Referenced by AliLandauGausFitter::Fit1Particle(), AliLandauGausFitter::FitComposite(), and AliFMDCorrELossFit::ELossFit::GetF1().
|
inlinestatic |
Generate a TF1 object of \( f_I\)
c | Constant |
delta | \( \Delta_1\) |
xi | \( \xi_1\) |
sigma | \( \sigma_1\) |
sigma_n | \( \sigma_n\) |
i | \( i\) - the number of particles |
xmin | Least value of range |
xmax | Largest value of range |
Definition at line 760 of file AliLandauGaus.h.
Referenced by AliFMDCorrELossFit::ELossFit::Draw(), TestF::Test::Fi(), and AliFMDCorrELossFit::ELossFit::GetF1().
|
inlinestatic |
Generate a TF1 object of \( f_N\)
c | Constant |
delta | \( \Delta_1\) |
xi | \( \xi_1\) |
sigma | \( \sigma_1\) |
sigma_n | \( \sigma_n\) |
n | \( N\) - how many particles to sum to |
a | Array of size \( N-1\) of the weights \( a_i\) for \( i > 1\) |
xmin | Least value of range |
xmax | Largest value of range |
Definition at line 734 of file AliLandauGaus.h.
Referenced by AliFMDCorrELossFit::ELossFit::Draw(), AliLandauGausFitter::FitNParticle(), AliFMDCorrELossFit::ELossFit::GetF1(), and TestF::Test::Run().
|
inlinestatic |
The shift of the most probable value for the ROOT function TMath::Landau
Definition at line 137 of file AliLandauGaus.h.
Referenced by Fl().
|
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().
|
inlinestatic |
Number of steps to do in the Landau, Gaussiam convolution
Definition at line 164 of file AliLandauGaus.h.
Referenced by F().
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\).
i | Number of particles |
xi | Landau width \(\xi\) |
sigma | Gaussian variance \(\sigma\) |
Definition at line 507 of file AliLandauGaus.h.
Referenced by IPars().
|
inlinestatic |
Constant of \(\sigma\) shift
Definition at line 143 of file AliLandauGaus.h.
Referenced by SigmaShift().
|
inlinestatic |
Power factor of \(\sigma\) shift
Definition at line 149 of file AliLandauGaus.h.
Referenced by SigmaShift().