]>
Commit | Line | Data |
---|---|---|
9c9d2487 | 1 | |
2 | #ifndef AliBarrelTrack_H | |
3 | #define AliBarrelTrack_H | |
4 | ||
5 | #include "TObject.h" | |
6 | #include "TMath.h" | |
7 | ||
8 | class AliBarrelTrack : public TObject { | |
9 | ||
10 | protected: | |
11 | ||
12 | Int_t fLabel; // kine tree index | |
13 | ||
14 | Int_t fRefPlane; // id of the reference plane | |
15 | Int_t fIsIn; // direction | |
16 | ||
17 | Double_t fX; // Kalman Time | |
18 | Double_t fAlpha; // sector angle | |
19 | ||
20 | // state vector | |
21 | Double_t fZ; // Z in global cs | |
22 | Double_t fY; // Y in local cs corresponds to r-phi | |
23 | Double_t fTgLambda; // Tangent of the dip angle | |
24 | Double_t fSnPhi; // Sin | |
25 | Double_t f1Pt; // inverse of momentum | |
26 | ||
27 | ||
28 | // covariance matrix | |
29 | Double_t fCz; | |
30 | Double_t fCy; | |
31 | Double_t fCtg; | |
32 | Double_t fCphi; | |
33 | Double_t fCpt; | |
34 | ||
35 | ||
36 | // track time/length | |
37 | Double_t fTimeHypothesis[5]; // time for all hypoptheses | |
38 | Double_t fLength; // track length | |
39 | ||
40 | // performance info | |
41 | Int_t fNClusters; // Number of clusters | |
42 | Int_t fNWrong; // Number of wrong clusters | |
43 | Double_t fChi2; // Chi 2 | |
44 | Int_t fNRotate; // number of rotations / sector crossing | |
45 | ||
46 | Double_t fMass; // mass hypothesis | |
47 | Double_t fdEdX; // dE/dX | |
48 | ||
49 | public: | |
50 | ||
51 | AliBarrelTrack(); | |
52 | ~AliBarrelTrack() {} | |
53 | ||
54 | // Setters | |
55 | ||
56 | void SetLabel(Int_t label); | |
57 | void SetX(Double_t x, Double_t alpha); | |
58 | void SetRefPlane(Int_t nRefPlane, Int_t isIn); | |
59 | void SetNClusters(Int_t nClusters, Double_t chi2); | |
9c75d176 | 60 | void SetTime(Double_t time[5], Double_t length); |
9c9d2487 | 61 | void SetStateVector(Double_t vec[5]); // external parameters |
62 | void SetCovarianceMatrix(Double_t vec[15]); // external parameters | |
63 | ||
64 | void SetNWrongClusters(Int_t n) {fNWrong = n;} | |
65 | void SetNRotate(Int_t n) {fNRotate = n;} | |
66 | ||
67 | void SetMass(Double_t mass) {fMass = mass;} | |
68 | void SetdEdX(Double_t dEdX) {fdEdX = dEdX;} | |
69 | ||
70 | // Getters | |
71 | ||
72 | // standard | |
73 | Int_t GetLabel() const {return fLabel;} | |
74 | Int_t GetNClusters() const {return fNClusters;} | |
75 | Int_t GetNWrongClusters() const {return fNWrong;} | |
76 | Int_t GetNRotate() const {return fNRotate;} | |
77 | ||
78 | Int_t GetRefPlane() const {return fRefPlane;} | |
79 | ||
80 | Double_t GetX() const {return fX;} | |
81 | Double_t Y() const {return fY;} | |
82 | Double_t Z() const {return fZ;} | |
83 | ||
84 | Double_t GetMass() const {return fMass;} | |
85 | ||
86 | // track oriented variables | |
87 | Double_t Pt() const {return (f1Pt==0)? 0 : 1./f1Pt;} | |
88 | Double_t TgLambda() const {return fTgLambda;} | |
89 | Double_t Eta() const {return -TMath::Log(TMath::Tan(0.25 *TMath::Pi()-0.5*Lambda()));} | |
90 | Double_t Phi() const {return TMath::ASin(fSnPhi);} | |
91 | ||
92 | ||
93 | // uncertainties | |
94 | Double_t DeltaY() const {return TMath::Sqrt(fCy);} | |
95 | Double_t DeltaZ() const {return TMath::Sqrt(fCz);} | |
96 | Double_t DeltaTgLambda() const {return TMath::Sqrt(fCtg);} | |
97 | Double_t DeltaSnPhi() const {return TMath::Sqrt(fCphi);} | |
98 | Double_t DeltaPt() const {return Pt() - 1./(Pt() + TMath::Sqrt(fCpt));} | |
99 | ||
100 | ||
101 | // reference oriented variables | |
102 | Double_t Px() const {return TMath::Cos(Phi()+fAlpha) * Pt();} | |
103 | Double_t Py() const {return TMath::Sin(Phi()+fAlpha) * Pt();} | |
104 | Double_t Pz() const {return fTgLambda*Pt();} | |
105 | Double_t P() const {return Pt()*(fTgLambda+1);} | |
106 | ||
107 | Double_t Lambda() const {return TMath::ATan(fTgLambda);} | |
108 | ||
109 | ClassDef(AliBarrelTrack,1) | |
110 | }; | |
111 | ||
112 | ||
113 | #endif |