]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/src/AliL3Track.h
Using TMath::Abs instead of fabs
[u/mrichter/AliRoot.git] / HLT / src / AliL3Track.h
CommitLineData
108615fc 1#ifndef ALIL3TRACK_H
2#define ALIL3TRACK_H
3
4#include <string.h>
5
6#include "AliL3RootTypes.h"
7
6d4f1901 8class AliL3Vertex;
9
108615fc 10class AliL3Track {
11
12 private:
13
14 Int_t fNHits;
15
16 Int_t fMCid; //Assigned id from MC data.
eeddc64d 17
18 Double_t fKappa; // Signed curvature (projected to a circle)
19 Double_t fRadius; // Radius of the helix (projected to a circle)
20 Double_t fCenterX; // x coordinate of the center of the helix (projected to a circle)
21 Double_t fCenterY; // y coordinate of the center of the helix (projected to a circle)
108615fc 22 Bool_t fFromMainVertex; // true if tracks origin is the main vertex, otherwise false
23
24 Int_t fRowRange[2]; //Subsector where this track was build
25 Int_t fSector; //Sector # where this track was build
26
27 //data from momentum fit
28 Int_t fQ; //charge measured fit
29
30 //track parameters:
eeddc64d 31 Double_t fTanl; //tan of dipangle
32 Double_t fPsi; //azimuthal angle of the momentum
33 Double_t fPt; //transverse momentum
34 Double_t fLength; //length of track (s)
108615fc 35
36 Double_t fPterr;
37 Double_t fPsierr;
38 Double_t fZ0err;
39 Double_t fTanlerr;
40
eeddc64d 41 Double_t fPhi0; //azimuthal angle of the first point
42 Double_t fR0; //radius of the first point
43 Double_t fZ0; //z coordinate of the first point (fFirstPoint[2])
44
108615fc 45 Double_t fFirstPoint[3];
46 Double_t fLastPoint[3];
47 Double_t fPoint[3];
48 Double_t fPointPsi; //azimuthal angle of the momentum at Point
eeddc64d 49
50
108615fc 51 Bool_t fIsPoint; //Helix crosses the X-plane
52 Bool_t IsPoint(Bool_t ispoint) {fIsPoint = ispoint;return fIsPoint;}
53
54 Bool_t fIsLocal; //Track given in local coordinates.
55
68a27388 56 UInt_t fHitNumbers[159]; //Array of hit numbers for this track
108615fc 57
58 protected:
59
60 static Float_t BFACT;
108615fc 61 static Double_t pi;
62
63 public:
64
65 AliL3Track();
66 virtual ~AliL3Track();
67
68 virtual void Set(AliL3Track* track);
203925a9 69 virtual Int_t Compare(const AliL3Track *track) const;
6d24ee88 70 virtual void CalculateHelix();
108615fc 71
6d4f1901 72 Bool_t CalculateReferencePoint(Double_t angle,Double_t radius=132);//Calculate Reference Point
108615fc 73 Bool_t CalculateEdgePoint(Double_t angle);//Calculate crossing point with line
eeddc64d 74 Bool_t CalculatePoint(Double_t xplane); //Calculate crossing point with X-plane
108615fc 75 Bool_t IsPoint() {return fIsPoint;}
0391971c 76 Double_t GetCrossingAngle(Int_t padrow);
77 Bool_t GetCrossingPoint(Int_t padrow,Float_t *xyz);
108615fc 78 Double_t GetDistance(Double_t x0,Double_t x1){return 0;}
0391971c 79
6d4f1901 80 void GetClosestPoint(AliL3Vertex *vertex,Double_t &closest_x,Double_t &closest_y,Double_t &closest_z);
203925a9 81 void Rotate(Int_t slice,Bool_t tolocal=kFALSE);
108615fc 82 Bool_t IsLocal() {return fIsLocal;}
83
84 // getter
85 Double_t GetFirstPointX() {return fFirstPoint[0];}
86 Double_t GetFirstPointY() {return fFirstPoint[1];}
87 Double_t GetFirstPointZ() {return fFirstPoint[2];}
88 Double_t GetLastPointX() {return fLastPoint[0];}
89 Double_t GetLastPointY() {return fLastPoint[1];}
90 Double_t GetLastPointZ() {return fLastPoint[2];}
91
92 Double_t GetPointPsi() {return fPointPsi;}
93 Double_t GetPointX() {return fPoint[0];}
94 Double_t GetPointY() {return fPoint[1];}
95 Double_t GetPointZ() {return fPoint[2];}
96
97 Double_t GetPt() const {return fPt;}
98 Double_t GetTgl() const {return fTanl;}
108615fc 99 Double_t GetPsi() const {return fPsi;}
eeddc64d 100 Double_t GetPhi0() const {return fPhi0;}
108615fc 101 Double_t GetR0() const {return fR0;}
2d04dcbf 102 Double_t GetZ0() const {return fFirstPoint[2];}
103 //Double_t GetZ0() const {return fZ0;}
104
eeddc64d 105 Double_t GetKappa() const {return fKappa;}
106 Double_t GetRadius() const {return fRadius;}
107 Double_t GetCenterX() const {return fCenterX;}
108 Double_t GetCenterY() const {return fCenterY;}
108615fc 109
203925a9 110 Int_t GetNHits() const {return fNHits;}
108615fc 111 Int_t GetNumberOfPoints() const {return fNHits;}
eeddc64d 112 Bool_t ComesFromMainVertex() const {return fFromMainVertex;}
108615fc 113
eeddc64d 114 Double_t GetPx() const {return fPt*cos(fPsi);}
115 Double_t GetPy() const {return fPt*sin(fPsi);}
116 Double_t GetPz() const {return fPt*fTanl;}
108615fc 117
eeddc64d 118 Double_t GetP() const;
119 Double_t GetPseudoRapidity() const;
203925a9 120 //Double_t GetEta() const;
108615fc 121 Double_t GetRapidity() const;
122
eeddc64d 123 Int_t GetCharge() const {return fQ;}
108615fc 124 Int_t GetMCid() const {return fMCid;}
eeddc64d 125 Double_t GetLength() const {return fLength;}
108615fc 126
eeddc64d 127 Int_t GetFirstRow() const {return fRowRange[0];}
108615fc 128 Int_t GetLastRow() const {return fRowRange[1];}
129
130 UInt_t *GetHitNumbers() {return fHitNumbers;}
131
132 // setter
203925a9 133
108615fc 134 void SetMCid(Int_t f) {fMCid = f;}
135 void SetFirstPoint(Double_t f,Double_t g,Double_t h) {fFirstPoint[0]=f; fFirstPoint[1]=g; fFirstPoint[2]=h;}
136 void SetLastPoint(Double_t f,Double_t g,Double_t h) {fLastPoint[0]=f; fLastPoint[1]=g; fLastPoint[2]=h;}
137
138 void SetHits(Int_t nhits,UInt_t *hits) {memcpy(fHitNumbers,hits,nhits*sizeof(UInt_t));}
139
140 void SetPhi0(Double_t f) {fPhi0 = f;}
141 void SetPsi(Double_t f) {fPsi = f;}
142 void SetR0(Double_t f) {fR0 = f;}
143 void SetTgl(Double_t f) {fTanl =f;}
2d04dcbf 144 //void SetZ0(Double_t f) {fZ0 = f;}
145 void SetZ0(Double_t f) {fFirstPoint[2] = f;}
108615fc 146 void SetPt(Double_t f) {fPt = f;}
147 void SetLength(Double_t f) {fLength = f;}
148 void SetPterr(Double_t f) {fPterr = f;}
149 void SetPsierr(Double_t f) {fPsierr = f;}
150 void SetZ0err(Double_t f) {fZ0err = f;}
151 void SetTglerr(Double_t f) {fTanlerr = f;}
152 void SetKappa(Double_t f) {fKappa = f;}
153
154 void SetNHits(Int_t f) {fNHits = f;}
155
eeddc64d 156 void SetRowRange(Int_t f,Int_t g) {fRowRange[0]=f; fRowRange[1]=g;}
157 void SetSector(Int_t f) {fSector = f;}
108615fc 158
eeddc64d 159 void SetRadius(Double_t f) {fRadius = f;}
160 void SetCenterX(Double_t f) {fCenterX = f;}
161 void SetCenterY(Double_t f) {fCenterY = f;}
108615fc 162
eeddc64d 163 void SetCharge(Int_t f) {fQ = f;}
108615fc 164
eeddc64d 165 void ComesFromMainVertex(Bool_t f) {fFromMainVertex = f;}
108615fc 166
2d04dcbf 167 ClassDef(AliL3Track,1) //Base track class
108615fc 168};
169
170#endif
eeddc64d 171