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