- Compute parameter covariances including absorber dispersion effects
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackExtrap.h
CommitLineData
c04e3238 1#ifndef ALIMUONTRACKEXTRAP_H
2#define ALIMUONTRACKEXTRAP_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/*$Id$*/
7// Revision of includes 07/05/2004
8
9/// \ingroup rec
10/// \class AliMUONTrackExtrap
11/// \brief Track parameters in ALICE dimuon spectrometer
12///
13//////////////////////////////////////////////////////////////
14/// Tools for track extrapolation in ALICE dimuon spectrometer
15//////////////////////////////////////////////////////////////
16
17#include <TObject.h>
690d2205 18#include <TMatrixD.h>
c04e3238 19
20class AliMagF;
21class AliMUONTrackParam;
22
23class AliMUONTrackExtrap : public TObject
24{
25 public:
26 /// Constructor
27 AliMUONTrackExtrap() : TObject(){};
28 /// Destructor
29 virtual ~AliMUONTrackExtrap(){};
30
31 /// set field map
32 static void SetField(const AliMagF* magField) {fgkField = magField;}
33
208f139e 34 static Double_t GetImpactParamFromBendingMomentum(Double_t bendingMomentum);
35 static Double_t GetBendingMomentumFromImpactParam(Double_t impactParam);
36
690d2205 37 // Linearly extrapolate track parameters and covariances
019df241 38 static void LinearExtrapToZ(AliMUONTrackParam* trackParam, Double_t zEnd);
690d2205 39
40 // Extrapolate track parameters in magnetic field
019df241 41 static void ExtrapToZ(AliMUONTrackParam *trackParam, Double_t zEnd);
690d2205 42
43 // Extrapolate track parameters and covariances in magnetic field
ea94c18b 44 static void ExtrapToZCov(AliMUONTrackParam* trackParam, Double_t zEnd, Bool_t updatePropagator = kFALSE);
690d2205 45
46 // Extrapolate track parameters to vertex, corrected for multiple scattering and energy loss effects
47 // Add branson correction resolution and energy loss fluctuation to parameter covariances
48 static void ExtrapToVertex(AliMUONTrackParam* trackParam,
49 Double_t xVtx, Double_t yVtx, Double_t zVtx,
50 Double_t errXVtx, Double_t errYVtx);
51
52 // Extrapolate track parameters to vertex, corrected for multiple scattering effects only
53 // Add branson correction resolution to parameter covariances
54 static void ExtrapToVertexWithoutELoss(AliMUONTrackParam* trackParam,
55 Double_t xVtx, Double_t yVtx, Double_t zVtx,
56 Double_t errXVtx, Double_t errYVtx);
57
58 // Extrapolate track parameters to vertex, corrected for energy loss effects only
59 // Add dispersion due to multiple scattering and energy loss fluctuation to parameter covariances
60 static void ExtrapToVertexWithoutBranson(AliMUONTrackParam* trackParam, Double_t zVtx);
61
62 // Extrapolate track parameters to vertex without multiple scattering and energy loss corrections
63 // Add dispersion due to multiple scattering to parameter covariances
208f139e 64 static void ExtrapToVertexUncorrected(AliMUONTrackParam* trackParam, Double_t zVtx);
fac70e25 65
66 static Double_t TotalMomentumEnergyLoss(AliMUONTrackParam* trackParam, Double_t xVtx, Double_t yVtx, Double_t zVtx);
c04e3238 67
ea94c18b 68 static Double_t GetMCSAngle2(const AliMUONTrackParam& param, Double_t dZ, Double_t x0);
69 static void AddMCSEffect(AliMUONTrackParam *param, Double_t dZ, Double_t x0);
208f139e 70
c04e3238 71 static void ExtrapOneStepRungekutta(Double_t charge, Double_t step, Double_t* vect, Double_t* vout);
72
73
74 private:
4284483e 75 static const AliMagF* fgkField; //!< field map
76 static const Bool_t fgkUseHelix; //!< Tell whether to use Helix or not (default is Runge-Kutta)
77 static const Int_t fgkMaxStepNumber; //!< Maximum number of steps for track extrapolation
78 static const Double_t fgkHelixStepLength; //!< Step lenght for track extrapolation (used in Helix)
79 static const Double_t fgkRungeKuttaMaxResidue;//!< Maximal distance (in Z) to destination to stop the track extrapolation (used in Runge-Kutta)
80
c04e3238 81 // Functions
71a2d3aa 82
83 /// Not implemented
c04e3238 84 AliMUONTrackExtrap(const AliMUONTrackExtrap& trackExtrap);
71a2d3aa 85 /// Not implemented
c04e3238 86 AliMUONTrackExtrap& operator=(const AliMUONTrackExtrap& trackExtrap);
87
4284483e 88 static void ExtrapToZHelix(AliMUONTrackParam *trackParam, Double_t Z);
89 static void ExtrapToZRungekutta(AliMUONTrackParam *trackParam, Double_t Z);
90
91 static void ConvertTrackParamForExtrap(AliMUONTrackParam* trackParam, Double_t forwardBackward, Double_t *v3);
eb3178e9 92 static void RecoverTrackParam(Double_t *v3, Double_t Charge, AliMUONTrackParam* trackParam);
c04e3238 93
690d2205 94 static void ExtrapToVertex(AliMUONTrackParam* trackParam,
95 Double_t xVtx, Double_t yVtx, Double_t zVtx,
96 Double_t errXVtx, Double_t errYVtx,
97 Bool_t correctForMCS, Bool_t correctForEnergyLoss);
98
8cde4af5 99 static void AddMCSEffectInAbsorber(AliMUONTrackParam* trackParam, Double_t pathLength, Double_t f0, Double_t f1, Double_t f2);
690d2205 100 static void CorrectMCSEffectInAbsorber(AliMUONTrackParam* param,
101 Double_t xVtx, Double_t yVtx, Double_t zVtx,
102 Double_t errXVtx, Double_t errYVtx,
103 Double_t absZBeg, Double_t pathLength, Double_t f0, Double_t f1, Double_t f2);
104 static void CorrectELossEffectInAbsorber(AliMUONTrackParam* param, Double_t eLoss, Double_t sigmaELoss2);
105 static void GetAbsorberCorrectionParam(Double_t trackXYZIn[3], Double_t trackXYZOut[3], Double_t pTotal,
106 Double_t &pathLength, Double_t &f0, Double_t &f1, Double_t &f2,
107 Double_t &meanRho, Double_t &totalELoss, Double_t &sigmaELoss2);
8cde4af5 108
84f061ef 109 static Double_t BetheBloch(Double_t pTotal, Double_t pathLength, Double_t rho, Double_t atomicA, Double_t atomicZ);
690d2205 110 static Double_t EnergyLossFluctuation2(Double_t pTotal, Double_t pathLength, Double_t rho, Double_t atomicA, Double_t atomicZ);
111
112 static void Cov2CovP(const TMatrixD &param, TMatrixD &cov);
113 static void CovP2Cov(const TMatrixD &param, TMatrixD &cov);
c04e3238 114
115 static void ExtrapOneStepHelix(Double_t charge, Double_t step, Double_t *vect, Double_t *vout);
116 static void ExtrapOneStepHelix3(Double_t field, Double_t step, Double_t *vect, Double_t *vout);
117
118 static void GetField(Double_t *Position, Double_t *Field);
119
120 ClassDef(AliMUONTrackExtrap, 0) // Tools for track extrapolation in ALICE dimuon spectrometer
121};
122
123#endif