]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliExternalTrackParam.h
AliITSVertexerTracks becomes AliVertexerTrack (M.Masera, F.Prino)
[u/mrichter/AliRoot.git] / STEER / AliExternalTrackParam.h
1 #ifndef ALIEXTERNALTRACKPARAM_H
2 #define ALIEXTERNALTRACKPARAM_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
8 /*****************************************************************************
9  *              "External" track parametrisation class                       *
10  *                                                                           *
11  *      external param0:   local Y-coordinate of a track (cm)                *
12  *      external param1:   local Z-coordinate of a track (cm)                *
13  *      external param2:   local sine of the track momentum azimuthal angle  *
14  *      external param3:   tangent of the track momentum dip angle           *
15  *      external param4:   1/pt (1/(GeV/c))                                  *
16  *                                                                           *
17  * The parameters are estimated at an exact position x in a local coord.     *
18  * system rotated by angle alpha with respect to the global coord.system.    *
19  *        Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch                     *
20  *****************************************************************************/
21 #include "TObject.h"
22
23 const Double_t kB2C=0.299792458e-3;
24 const Double_t kAlmost1=0.999;
25 const Double_t kAlmost0=1e-33;
26 const Double_t kVeryBig=1./kAlmost0;
27
28 class AliKalmanTrack;
29 class AliStrLine;
30 class AliESDVertex;
31
32 class AliExternalTrackParam: public TObject {
33  public:
34   AliExternalTrackParam();
35   AliExternalTrackParam(Double_t x, Double_t alpha, 
36                         const Double_t param[5], const Double_t covar[15]);
37   AliExternalTrackParam(const AliKalmanTrack& track);
38
39   void Reset();
40   void Set(const AliKalmanTrack& track);
41
42   const Double_t *GetParameter() const {return fP;}
43   const Double_t *GetCovariance() const {return fC;}
44   Double_t GetSigmaY2() const {return fC[0];}
45   Double_t GetSigmaZ2() const {return fC[2];}
46   Double_t GetX() const {return fX;}
47   Double_t GetY()    const {return fP[0];}
48   Double_t GetZ()    const {return fP[1];}
49   Double_t GetAlpha() const {return fAlpha;}
50   Double_t GetSign() const {return (fP[4]>0) ? 1 : -1;}
51   Double_t GetP() const;
52   Double_t GetD(Double_t xv, Double_t yv, Double_t b) const; 
53   Double_t GetLinearD(Double_t xv, Double_t yv) const; 
54   Bool_t CorrectForMaterial(Double_t d, Double_t x0, Double_t mass);
55   Double_t GetPredictedChi2(Double_t p[2],Double_t cov[3]) const;
56   Bool_t Update(Double_t p[2],Double_t cov[3]);
57   Bool_t Rotate(Double_t alpha);
58   Bool_t PropagateTo(Double_t x, Double_t b);
59   Bool_t Propagate(Double_t alpha, Double_t x, Double_t b) {
60     if (Rotate(alpha))
61       if (PropagateTo(x,b)) return kTRUE;
62     return kFALSE;
63   }
64
65   void GetHelixParameters(Double_t h[6], Double_t b) const;
66   Double_t GetDCA(const AliExternalTrackParam *p, Double_t b,
67     Double_t &xthis,Double_t &xp) const;
68   Double_t PropagateToDCA(AliExternalTrackParam *p, Double_t b);
69   Bool_t PropagateToDCA(const AliESDVertex *vtx, Double_t b, Double_t maxd);
70
71   Bool_t GetPxPyPz(Double_t *p) const;
72   Bool_t GetXYZ(Double_t *p) const;
73   Bool_t GetCovarianceXYZPxPyPz(Double_t cv[21]) const;
74   Bool_t GetPxPyPzAt(Double_t x, Double_t b, Double_t p[3]) const;
75   Bool_t GetXYZAt(Double_t x, Double_t b, Double_t r[3]) const;
76   void ApproximateHelixWithLine(Double_t xk, Double_t b, AliStrLine *line);
77   void Print(Option_t* option = "") const;
78   // MI
79   virtual Bool_t   CorrectForMaterial(Double_t d, Double_t x0, Double_t rho, Double_t mass);
80   virtual Bool_t   PropagateTo(Double_t x, Double_t mass, Double_t maxStep, Bool_t rotateTo=kTRUE);
81
82 private:
83   Double_t             fX;     // X coordinate for the point of parametrisation
84   Double_t             fAlpha; // Local <-->global coor.system rotation angle
85   Double_t             fP[5];  // The track parameters
86   Double_t             fC[15]; // The track parameter covariance matrix
87
88   ClassDef(AliExternalTrackParam, 4)
89 };
90
91 #endif