FairRoot/PandaRoot
|
Contains stepper and energy loss/noise matrix calculation. More...
#include <GFMaterialEffects.h>
Public Member Functions | |
void | setEnergyLossBetheBloch (bool opt=true) |
void | setNoiseBetheBloch (bool opt=true) |
void | setNoiseCoulomb (bool opt=true) |
void | setEnergyLossBrems (bool opt=true) |
void | setNoiseBrems (bool opt=true) |
double | effects (const std::vector< TVector3 > &points, const std::vector< double > &pointPaths, const double &mom, const int &pdg, const bool &doNoise=false, TMatrixT< double > *noise=NULL, const TMatrixT< double > *jacobian=NULL, const TVector3 *directionBefore=NULL, const TVector3 *directionAfter=NULL) |
Calculates energy loss in the travelled path, optional calculation of noise matrix. More... | |
double | stepper (const double &maxDist, const double &posx, const double &posy, const double &posz, const double &dirx, const double &diry, const double &dirz, const double &mom, const int &pdg) |
Returns maximum length so that a specified momentum loss will not be exceeded. More... | |
double | stepper (const double &maxDist, const TVector3 &pos, const TVector3 &dir, const double &mom, const int &pdg) |
Static Public Member Functions | |
static GFMaterialEffects * | getInstance () |
static void | destruct () |
Private Member Functions | |
GFMaterialEffects () | |
virtual | ~GFMaterialEffects () |
void | getParameters () |
sets fmatDensity, fmatZ, fmatA, fradiationLength, fmEE, fcharge, fmass; More... | |
void | calcBeta (double mom) |
sets fbeta, fgamma, fgammasquare; must only be used after calling getParameters() More... | |
double | energyLossBetheBloch (const double &mom) |
Returns energy loss. More... | |
void | noiseBetheBloch (const double &mom, TMatrixT< double > *noise) const |
calculation of energy loss straggeling More... | |
void | noiseCoulomb (const double &mom, TMatrixT< double > *noise, const TMatrixT< double > *jacobian, const TVector3 *directionBefore, const TVector3 *directionAfter) const |
calculation of multiple scattering More... | |
double | energyLossBrems (const double &mom) const |
Returns energy loss. More... | |
void | noiseBrems (const double &mom, TMatrixT< double > *noise) const |
calculation of energy loss straggeling More... | |
Private Attributes | |
bool | fEnergyLossBetheBloch |
bool | fNoiseBetheBloch |
bool | fNoiseCoulomb |
bool | fEnergyLossBrems |
bool | fNoiseBrems |
const double | me |
double | fstep |
double | fbeta |
double | fdedx |
double | fgamma |
double | fgammaSquare |
double | fmatDensity |
double | fmatZ |
double | fmatA |
double | fradiationLength |
double | fmEE |
int | fpdg |
double | fcharge |
double | fmass |
Static Private Attributes | |
static GFMaterialEffects * | finstance = NULL |
Contains stepper and energy loss/noise matrix calculation.
It provides functionality to limit the stepsize of an extrapolation in order not to exceed a specified maximum momentum loss. After propagation, the energy loss for the given length and (optionally) the noise matrix can be calculated. You have to set which energy-loss and noise mechanisms you want to use. At the moment, per default all energy loss and noise options are ON.
Definition at line 47 of file GFMaterialEffects.h.
|
private |
Definition at line 40 of file GFMaterialEffects.cxx.
Referenced by getInstance().
|
privatevirtual |
Definition at line 60 of file GFMaterialEffects.cxx.
|
private |
sets fbeta, fgamma, fgammasquare; must only be used after calling getParameters()
Definition at line 209 of file GFMaterialEffects.cxx.
References fbeta, fgamma, fgammaSquare, fmass, and sqrt().
Referenced by effects(), and stepper().
|
static |
double GFMaterialEffects::effects | ( | const std::vector< TVector3 > & | points, |
const std::vector< double > & | pointPaths, | ||
const double & | mom, | ||
const int & | pdg, | ||
const bool & | doNoise = false , |
||
TMatrixT< double > * | noise = NULL , |
||
const TMatrixT< double > * | jacobian = NULL , |
||
const TVector3 * | directionBefore = NULL , |
||
const TVector3 * | directionAfter = NULL |
||
) |
Calculates energy loss in the travelled path, optional calculation of noise matrix.
Definition at line 76 of file GFMaterialEffects.cxx.
References calcBeta(), energyLossBetheBloch(), energyLossBrems(), fEnergyLossBetheBloch, fEnergyLossBrems, fmatZ, fNoiseBetheBloch, fNoiseBrems, fNoiseCoulomb, fpdg, fstep, getParameters(), gGeoManager, i, noiseBetheBloch(), noiseBrems(), noiseCoulomb(), and X.
Referenced by RKTrackRep::Extrap().
|
private |
Returns energy loss.
Uses Bethe Bloch formula to calculate energy loss. Calcuates and sets fdedx which needed also for noiseBetheBloch. Therefore it is not a const function!
Definition at line 223 of file GFMaterialEffects.cxx.
References exp(), fabs(), fbeta, fcharge, fdedx, fgammaSquare, fmass, fmatA, fmatDensity, fmatZ, fmEE, fstep, log(), me, mom, and sqrt().
Referenced by effects(), and stepper().
|
private |
Returns energy loss.
Can be called with any pdg, but only calculates energy loss for electrons and positrons (otherwise returns 0). Uses a gaussian approximation (Bethe-Heitler formula with Migdal corrections). For positrons the energy loss is weighed with a correction factor.
Definition at line 403 of file GFMaterialEffects.cxx.
References C(), E0, fabs(), fbeta, fmass, fmatA, fmatDensity, fmatZ, fpdg, fstep, log(), me, mom, sqrt(), T, W, X, and Y.
Referenced by effects(), and stepper().
|
static |
Definition at line 63 of file GFMaterialEffects.cxx.
References finstance, and GFMaterialEffects().
Referenced by RKTrackRep::Extrap(), and RKTrackRep::RKutta().
|
private |
sets fmatDensity, fmatZ, fmatA, fradiationLength, fmEE, fcharge, fmass;
Definition at line 194 of file GFMaterialEffects.cxx.
References fcharge, fmass, fmatA, fmatDensity, fmatZ, fmEE, fpdg, fradiationLength, gGeoManager, and MeanExcEnergy_get().
Referenced by effects(), and stepper().
|
private |
calculation of energy loss straggeling
For the energy loss straggeling, different formulas are used for different regions:
Needs fdedx, which is calculated in energyLossBetheBloch, so it has to be calles afterwards!
Definition at line 246 of file GFMaterialEffects.cxx.
References alpha, exp(), f1, f2, fbeta, fcharge, fdedx, fgamma, fgammaSquare, fmass, fmatA, fmatDensity, fmatZ, fstep, log(), and me.
Referenced by effects().
|
private |
calculation of energy loss straggeling
Can be called with any pdg, but only calculates straggeling for electrons and positrons.
Definition at line 565 of file GFMaterialEffects.cxx.
References fabs(), fmass, fpdg, fradiationLength, and fstep.
Referenced by effects().
|
private |
calculation of multiple scattering
With the calculated multiple scattering angle, two noise matrices are calculated:
\[ \left(\begin{array}{c} x'\\ y'\\ z'\\ a_{x}'\\ a_{y}'\\ a_{z}'\\ \frac{q}{p}'\end{array}\right)=\left(\begin{array}{ccccccc} \cos\psi & \sin\psi & 0\\ -\cos\vartheta\sin\psi & \cos\vartheta\cos\psi & \sin\psi\\ \sin\vartheta\sin\psi & -\sin\vartheta\cos\psi & \cos\vartheta\\ & & & \cos\psi & \sin\psi & 0\\ & & & -\cos\vartheta\sin\psi & \cos\vartheta\cos\psi & \sin\psi\\ & & & \sin\vartheta\sin\psi & -\sin\vartheta\cos\psi & \cos\vartheta\\ & & & & & & 1\end{array}\right)\left(\begin{array}{c} x\\ y\\ z\\ a_{x}\\ a_{y}\\ a_{z}\\ \frac{q}{p}\end{array}\right)=R^{T}\left(\begin{array}{c} x\\ y\\ z\\ a_{x}\\ a_{y}\\ a_{z}\\ \frac{q}{p}\end{array}\right)\]
Now the global coordinate system cs is:
\[ \left(\begin{array}{c} x\\ y\\ z\\ a_{x}\\ a_{y}\\ a_{z}\\ \frac{q}{p}\end{array}\right)=\left(\begin{array}{ccccccc} \cos\psi & -\cos\vartheta\sin\psi & \sin\vartheta\sin\psi\\ \sin\psi & \cos\vartheta\cos\psi & -\sin\vartheta\cos\psi\\ 0 & \sin\psi & \cos\vartheta\\ & & & \cos\psi & -\cos\vartheta\sin\psi & \sin\vartheta\sin\psi\\ & & & \sin\psi & \cos\vartheta\cos\psi & -\sin\vartheta\cos\psi\\ & & & 0 & \sin\psi & \cos\vartheta\\ & & & & & & 1\end{array}\right)\left(\begin{array}{c} x'\\ y'\\ z'\\ a_{x}'\\ a_{y}'\\ a_{z}'\\ \frac{q}{p}'\end{array}\right)=R\left(\begin{array}{c} x'\\ y'\\ z'\\ a_{x}'\\ a_{y}'\\ a_{z}'\\ \frac{q}{p}'\end{array}\right) \]
with the Euler angles
\begin{eqnarray*} \psi & = & \begin{cases} \begin{cases} \frac{\pi}{2} & a_{x} \geq 0 \\ \frac{3\pi}{2} & a_{x} < 0 \end{cases} & a_{y}=0 \mbox{ resp. } |a_{y}|<10^{-14} \\ - \arctan \frac{a_{x}}{a_{y}} & a_{y} < 0 \\ \pi - \arctan \frac{a_{x}}{a_{y}} & a_{y} > 0 \end{cases} \\ \vartheta & = & \arccos a_{z} \end{eqnarray*}
\(M\) is the multiple scattering error-matrix in the \(\theta\) coordinate system. \(\theta_{1/2}=0\) are the multiple scattering angles. There is only an error in direction (which later leads to an error in position, when \(N_{before}\) is propagated with \(T\)).
\[ M=\left(\begin{array}{cc} \sigma^{2} & 0\\ 0 & \sigma^{2}\end{array}\right)\]
This translates into the noise matrix \(\overline{M}\) in the local cs' via jacobian J. The mean scattering angle is always 0, this means that \(\theta_{1/2}=0\)):
\begin{eqnarray*} x' & = & x'\\ y' & = & y'\\ z' & = & z'\\ a_{x}' & = & \sin\theta_{1}\\ a_{y}' & = & \sin\theta_{2}\\ a_{z}' & = & \sqrt{1-\sin^{2}\theta_{1}-\sin^{2}\theta_{2}}\\ \frac{q}{p}' & = & \frac{q}{p}'\end{eqnarray*}
\[ M=\left(\begin{array}{cc} \sigma^{2} & 0\\ 0 & \sigma^{2}\end{array}\right)\]
\[ J=\frac{\partial\left(x',y',z',a_{x}',a_{y}',a_{z}',\frac{q}{p}'\right)}{\partial\left(\theta_{1},\theta_{2}\right)}\]
\[ J=\left(\begin{array}{cc} 0 & 0\\ 0 & 0\\ 0 & 0\\ \cos\theta_{1} & 0\\ 0 & \cos\theta_{2}\\ -\frac{\cos\theta_{1}\sin\theta_{1}}{\sqrt{\cos^{2}\theta_{1}-\sin^{2}\theta_{2}}} & -\frac{\cos\theta_{2}\sin\theta_{2}}{\sqrt{\cos^{2}\theta_{1}-\sin^{2}\theta_{2}}}\\ 0 & 0\end{array}\right) \overset{\theta_{1/2}=0}{=} \left(\begin{array}{cc} 0 & 0\\ 0 & 0\\ 0 & 0\\ 1 & 0\\ 0 & 1\\ 0 & 0\\ 0 & 0\end{array}\right)\]
\[ \overline{M}=J\: M\: J^{T}=\left(\begin{array}{ccccccc} 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & \sigma^{2} & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & \sigma^{2} & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0\end{array}\right)\]
The following transformation brings the noise matrix into the global coordinate system cs, resulting in \(N\) :
\[ N=R\overline{M}R^{T}=\sigma^{2}\left(\begin{array}{ccccccc} 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & \cos^{2}\psi+\cos^{2}\theta-\cos^{2}\theta\cos^{2}\psi & \cos\psi\sin\psi\sin^{2}\theta & -\cos\theta\sin\psi\sin\theta & 0\\ 0 & 0 & 0 & \cos\psi\sin\psi\sin^{2}\theta & \sin^{2}\psi+\cos^{2}\theta\cos^{2}\psi & \cos\theta\cos\psi\sin\theta & 0\\ 0 & 0 & 0 & -\cos\theta\sin\psi\sin\theta & \cos\theta\cos\psi\sin\theta & \sin^{2}\theta & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0\end{array}\right)\]
Now two \(N\) are calculated: \(N_{before}\) (at the start point, with initial direction #directionBefore) and \(N_{after}\) (at the final point, with direction #directionAfter). \(N_{before}\) is the propagated with the #jacobian of extrapolation \(T\). The new covariance matrix with multiple scattering in global cs is:
\begin{eqnarray*} C_{new} & = C_{old} + 0.5 \cdot T N_{before} T^{T} + 0.5 \cdot N_{after} \end{eqnarray*}
See also: Track following in dense media and inhomogeneous magnetic fields, A.Fontana, P.Genova, L.Lavezzi and A.Rotondi; PANDA Report PV/01-07
Definition at line 309 of file GFMaterialEffects.cxx.
References cos(), fabs(), fbeta, fmatZ, fradiationLength, fstep, log(), mom, sigma2, sin(), and sqrt().
Referenced by effects().
|
inline |
Definition at line 58 of file GFMaterialEffects.h.
References fEnergyLossBetheBloch.
|
inline |
|
inline |
|
inline |
|
inline |
double GFMaterialEffects::stepper | ( | const double & | maxDist, |
const double & | posx, | ||
const double & | posy, | ||
const double & | posz, | ||
const double & | dirx, | ||
const double & | diry, | ||
const double & | dirz, | ||
const double & | mom, | ||
const int & | pdg | ||
) |
Returns maximum length so that a specified momentum loss will not be exceeded.
The stepper returns the maximum length that the particle may travel, so that a specified relative momentum loss will not be exceeded.
Definition at line 139 of file GFMaterialEffects.cxx.
References calcBeta(), energyLossBetheBloch(), energyLossBrems(), fEnergyLossBetheBloch, fEnergyLossBrems, fmatZ, fpdg, fstep, getParameters(), gGeoManager, and X.
Referenced by RKTrackRep::RKutta(), and stepper().
|
inline |
Definition at line 89 of file GFMaterialEffects.h.
References mom, and stepper().
|
private |
Definition at line 345 of file GFMaterialEffects.h.
Referenced by calcBeta(), energyLossBetheBloch(), energyLossBrems(), noiseBetheBloch(), and noiseCoulomb().
|
private |
Definition at line 357 of file GFMaterialEffects.h.
Referenced by energyLossBetheBloch(), getParameters(), and noiseBetheBloch().
|
private |
Definition at line 346 of file GFMaterialEffects.h.
Referenced by energyLossBetheBloch(), and noiseBetheBloch().
|
private |
Definition at line 334 of file GFMaterialEffects.h.
Referenced by effects(), setEnergyLossBetheBloch(), and stepper().
|
private |
Definition at line 337 of file GFMaterialEffects.h.
Referenced by effects(), setEnergyLossBrems(), and stepper().
|
private |
Definition at line 347 of file GFMaterialEffects.h.
Referenced by calcBeta(), and noiseBetheBloch().
|
private |
Definition at line 348 of file GFMaterialEffects.h.
Referenced by calcBeta(), energyLossBetheBloch(), and noiseBetheBloch().
|
staticprivate |
Definition at line 52 of file GFMaterialEffects.h.
Referenced by destruct(), and getInstance().
|
private |
Definition at line 358 of file GFMaterialEffects.h.
Referenced by calcBeta(), energyLossBetheBloch(), energyLossBrems(), getParameters(), noiseBetheBloch(), and noiseBrems().
|
private |
Definition at line 352 of file GFMaterialEffects.h.
Referenced by energyLossBetheBloch(), energyLossBrems(), getParameters(), and noiseBetheBloch().
|
private |
Definition at line 350 of file GFMaterialEffects.h.
Referenced by energyLossBetheBloch(), energyLossBrems(), getParameters(), and noiseBetheBloch().
|
private |
Definition at line 351 of file GFMaterialEffects.h.
Referenced by effects(), energyLossBetheBloch(), energyLossBrems(), getParameters(), noiseBetheBloch(), noiseCoulomb(), and stepper().
|
private |
Definition at line 354 of file GFMaterialEffects.h.
Referenced by energyLossBetheBloch(), and getParameters().
|
private |
Definition at line 335 of file GFMaterialEffects.h.
Referenced by effects(), and setNoiseBetheBloch().
|
private |
Definition at line 338 of file GFMaterialEffects.h.
Referenced by effects(), and setNoiseBrems().
|
private |
Definition at line 336 of file GFMaterialEffects.h.
Referenced by effects(), and setNoiseCoulomb().
|
private |
Definition at line 356 of file GFMaterialEffects.h.
Referenced by effects(), energyLossBrems(), getParameters(), noiseBrems(), and stepper().
|
private |
Definition at line 353 of file GFMaterialEffects.h.
Referenced by getParameters(), noiseBrems(), and noiseCoulomb().
|
private |
Definition at line 342 of file GFMaterialEffects.h.
Referenced by effects(), energyLossBetheBloch(), energyLossBrems(), noiseBetheBloch(), noiseBrems(), noiseCoulomb(), and stepper().
|
private |
Definition at line 340 of file GFMaterialEffects.h.
Referenced by energyLossBetheBloch(), energyLossBrems(), and noiseBetheBloch().