]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliExternalTrackParam.h
Parameters of miscalibration in the head of the file (Marian)
[u/mrichter/AliRoot.git] / STEER / AliExternalTrackParam.h
CommitLineData
51ad6848 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
49d13e89 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 *****************************************************************************/
a5e407e9 21#include "TObject.h"
6c94f330 22#include "TMath.h"
a5e407e9 23
49d13e89 24const Double_t kAlmost1=0.999;
25const Double_t kAlmost0=1e-33;
26const Double_t kVeryBig=1./kAlmost0;
27
5773defd 28const Double_t kB2C=0.299792458e-3;
29const Double_t kAlmost0Field=1.e-13;
7b5ef2e6 30const Double_t kMostProbablePt=0.35;
5773defd 31
f76701bf 32class AliESDVertex;
51ad6848 33
a5e407e9 34class AliExternalTrackParam: public TObject {
51ad6848 35 public:
36 AliExternalTrackParam();
6c94f330 37 AliExternalTrackParam(const AliExternalTrackParam &);
51ad6848 38 AliExternalTrackParam(Double_t x, Double_t alpha,
39 const Double_t param[5], const Double_t covar[15]);
1530f89c 40 virtual ~AliExternalTrackParam(){}
ac3eaff4 41
6c94f330 42 void Set(Double_t x,Double_t alpha,
43 const Double_t param[5], const Double_t covar[15]);
c9ec41e8 44 void Reset();
6c94f330 45 void ResetCovariance(Double_t s2) {
46 fC[0]*= s2;
47 fC[1] = 0.; fC[2]*= s2;
48 fC[3] = 0.; fC[4] = 0.; fC[5]*= s2;
49 fC[6] = 0.; fC[7] = 0.; fC[8] = 0.; fC[9]*= s2;
7b5ef2e6 50 fC[10]= 0.; fC[11]= 0.; fC[12]= 0.; fC[13]= 0.; fC[14]*=s2;
6c94f330 51 }
c9ec41e8 52
49d13e89 53 const Double_t *GetParameter() const {return fP;}
54 const Double_t *GetCovariance() const {return fC;}
6c94f330 55
56 Double_t GetAlpha() const {return fAlpha;}
c7bafca9 57 Double_t GetX() const {return fX;}
2d57349e 58 Double_t GetY() const {return fP[0];}
59 Double_t GetZ() const {return fP[1];}
6c94f330 60 Double_t GetSnp() const {return fP[2];}
61 Double_t GetTgl() const {return fP[3];}
62 Double_t Get1Pt() const {return fP[4];}
63
64 Double_t GetSigmaY2() const {return fC[0];}
65 Double_t GetSigmaZY() const {return fC[1];}
66 Double_t GetSigmaZ2() const {return fC[2];}
67 Double_t GetSigmaSnpY() const {return fC[3];}
68 Double_t GetSigmaSnpZ() const {return fC[4];}
69 Double_t GetSigmaSnp2() const {return fC[5];}
70 Double_t GetSigmaTglY() const {return fC[6];}
71 Double_t GetSigmaTglZ() const {return fC[7];}
72 Double_t GetSigmaTglSnp() const {return fC[8];}
73 Double_t GetSigmaTgl2() const {return fC[9];}
74 Double_t GetSigma1PtY() const {return fC[10];}
75 Double_t GetSigma1PtZ() const {return fC[11];}
76 Double_t GetSigma1PtSnp() const {return fC[12];}
77 Double_t GetSigma1PtTgl() const {return fC[13];}
78 Double_t GetSigma1Pt2() const {return fC[14];}
79
c9ec41e8 80 Double_t GetSign() const {return (fP[4]>0) ? 1 : -1;}
81 Double_t GetP() const;
6c94f330 82 Double_t GetPt() const {
83 return (TMath::Abs(fP[4])>kAlmost0) ? 1./fP[4]:TMath::Sign(kVeryBig,fP[4]);
84 }
1d99986f 85 Double_t Get1P() const;
1530f89c 86 Double_t GetC(Double_t b) const {return fP[4]*b*kB2C;}
87 void GetDZ(Double_t x,Double_t y,Double_t z,Double_t b,Float_t dz[2]) const;
c7bafca9 88 Double_t GetD(Double_t xv, Double_t yv, Double_t b) const;
49d13e89 89 Double_t GetLinearD(Double_t xv, Double_t yv) const;
c7bafca9 90 Bool_t CorrectForMaterial(Double_t d, Double_t x0, Double_t mass);
49d13e89 91 Double_t GetPredictedChi2(Double_t p[2],Double_t cov[3]) const;
92 Bool_t Update(Double_t p[2],Double_t cov[3]);
93 Bool_t Rotate(Double_t alpha);
94 Bool_t PropagateTo(Double_t x, Double_t b);
95 Bool_t Propagate(Double_t alpha, Double_t x, Double_t b) {
96 if (Rotate(alpha))
97 if (PropagateTo(x,b)) return kTRUE;
98 return kFALSE;
99 }
100
c7bafca9 101 void GetHelixParameters(Double_t h[6], Double_t b) const;
102 Double_t GetDCA(const AliExternalTrackParam *p, Double_t b,
103 Double_t &xthis,Double_t &xp) const;
104 Double_t PropagateToDCA(AliExternalTrackParam *p, Double_t b);
f76701bf 105 Bool_t PropagateToDCA(const AliESDVertex *vtx, Double_t b, Double_t maxd);
c7bafca9 106
c9ec41e8 107 Bool_t GetPxPyPz(Double_t *p) const;
108 Bool_t GetXYZ(Double_t *p) const;
109 Bool_t GetCovarianceXYZPxPyPz(Double_t cv[21]) const;
110 Bool_t GetPxPyPzAt(Double_t x, Double_t b, Double_t p[3]) const;
111 Bool_t GetXYZAt(Double_t x, Double_t b, Double_t r[3]) const;
7cf7bb6c 112 Bool_t GetYAt(Double_t x, Double_t b, Double_t &y) const;
6c94f330 113 Bool_t GetZAt(Double_t x, Double_t b, Double_t &z) const;
c9ec41e8 114 void Print(Option_t* option = "") const;
c194ba83 115 Double_t GetSnpAt(Double_t x,Double_t b) const;
6c94f330 116
117protected:
118 Double_t &Par(Int_t i) {return fP[i];}
119 Double_t &Cov(Int_t i) {return fC[i];}
120
c9ec41e8 121private:
49d13e89 122 Double_t fX; // X coordinate for the point of parametrisation
123 Double_t fAlpha; // Local <-->global coor.system rotation angle
124 Double_t fP[5]; // The track parameters
125 Double_t fC[15]; // The track parameter covariance matrix
c9ec41e8 126
127 ClassDef(AliExternalTrackParam, 4)
51ad6848 128};
129
130#endif