]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCTrack.h
added skeleton for HLTpendolino library
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCTrack.h
CommitLineData
3cde846d 1// XEmacs -*-C++-*-
a6c02c85 2// @(#) $Id$
4aa41877 3// Original: AliHLTTrack.h,v 1.18 2005/03/31 04:48:58 cvetan
3cde846d 4
a6c02c85 5#ifndef ALIHLTTPCTRACK_H
6#define ALIHLTTPCTRACK_H
7
297174de 8//* This file is property of and copyright by the ALICE HLT Project *
9//* ALICE Experiment at CERN, All rights reserved. *
10//* See cxx source for full Copyright notice *
3cde846d 11
12/** @file AliHLTTPCTrack.h
4fdaad1e 13 @author Anders Vestbo, Uli Frankenfeld, maintained by Matthias Richter
3cde846d 14 @date
15 @brief HLT TPC track base class (conformal mapping)
16*/
17
18#include "AliTPCtrack.h"
19
a6c02c85 20class AliHLTTPCVertex;
21class AliHLTTPCSpacePointData;
22
3cde846d 23/**
24 * @class AliHLTTPCTrack
25 * This class implements the representation of a TPC track, used by the
26 * HLT conformal mapping track finder. <br>
27 * It was originally separated from the offline TPC track class, but in
28 * order to adjust the output format to the offline ESD, AliHLTTPCTrack
29 * now inherits from AliHLTtrack.
297174de 30 *
31 * @ingroup alihlt_tpc
3cde846d 32 */
33class AliHLTTPCTrack : public AliTPCtrack {
a6c02c85 34
35 public:
36
37 AliHLTTPCTrack();
38 virtual ~AliHLTTPCTrack();
39
3cde846d 40 /**
41 * Copy track parameters.
42 * @param track pointer to source track
43 */
44 virtual void Copy(AliHLTTPCTrack* track);
5d2abf3b 45 using AliTPCtrack::Copy; //TODO: Check if "virtual void Copy(TObject*)" does what it is supposed to do.
3cde846d 46
47 /**
48 * Compare two tracks by the number of hits
49 * @return 0 if equal number of hits,
50 * 1 if this > track
51 * -1 if this < track
52 */
a6c02c85 53 virtual Int_t Compare(const AliHLTTPCTrack *track) const;
5d2abf3b 54 using AliTPCtrack::Compare; //TODO: Check if "virtual Int_t Compare(TObject*)" does what it is supposed to do.
3cde846d 55
56 /**
57 * Fit the assigned spacepoints to a helix.
58 * The function sets teh track parameters.
59 */
a6c02c85 60 virtual void CalculateHelix();
61
62 Bool_t CalculateReferencePoint(Double_t angle,Double_t radius=132);//Calculate Reference Point
63 Bool_t CalculateEdgePoint(Double_t angle);//Calculate crossing point with line
64 Bool_t CalculatePoint(Double_t xplane); //Calculate crossing point with X-plane
65 Bool_t IsPoint() {return fIsPoint;}
66 Double_t GetCrossingAngle(Int_t padrow,Int_t slice=-1);
67 Bool_t GetCrossingPoint(Int_t padrow,Float_t *xyz);
68 Double_t GetDistance(Double_t /*x0*/,Double_t /*x1*/){return 0;}
69 void UpdateToFirstPoint();
2a083ac4 70 void GetClosestPoint(AliHLTTPCVertex *vertex,Double_t &closestX,Double_t &closestY,Double_t &closestZ);
a6c02c85 71 void Rotate(Int_t slice,Bool_t tolocal=kFALSE);
72 Bool_t IsLocal() const {return fIsLocal;}
5d2abf3b 73 virtual void Print(Option_t* option = "") const;
74 using AliTPCtrack::Print;
a6c02c85 75
76 // getter
77 Double_t GetFirstPointX() const {return fFirstPoint[0];}
78 Double_t GetFirstPointY() const {return fFirstPoint[1];}
79 Double_t GetFirstPointZ() const {return fFirstPoint[2];}
80 Double_t GetLastPointX() const {return fLastPoint[0];}
81 Double_t GetLastPointY() const {return fLastPoint[1];}
82 Double_t GetLastPointZ() const {return fLastPoint[2];}
83
84 Double_t GetPointPsi() const {return fPointPsi;}
85 Double_t GetPointX() const {return fPoint[0];}
86 Double_t GetPointY() const {return fPoint[1];}
87 Double_t GetPointZ() const {return fPoint[2];}
88
89 Double_t GetPt() const {return fPt;}
90 Double_t GetTgl() const {return fTanl;}
91 Double_t GetPsi() const {return fPsi;}
92 Double_t GetPhi0() const {return fPhi0;}
93 Double_t GetR0() const {return fR0;}
94 Double_t GetZ0() const {return fFirstPoint[2];}
95 Float_t GetPID() const {return fPID;}
96
97 Double_t GetPterr() const {return fPterr;}
98 Double_t GetPsierr() const {return fPsierr;}
99 Double_t GetTglerr() const {return fTanlerr;}
31f11c63 100 Double_t GetZ0err() const {return fZ0err;}
101 Double_t GetY0err() const {return fY0err;}
102
a6c02c85 103 Double_t GetKappa() const {return fKappa;}
104 Double_t GetRadius() const {return fRadius;}
105 Double_t GetCenterX() const {return fCenterX;}
106 Double_t GetCenterY() const {return fCenterY;}
107
108 Int_t GetNHits() const {return fNHits;}
109 Int_t GetNumberOfPoints() const {return fNHits;}
110 Bool_t ComesFromMainVertex() const {return fFromMainVertex;}
111
112 Double_t GetPx() const {return fPt*cos(fPsi);}
113 Double_t GetPy() const {return fPt*sin(fPsi);}
114 Double_t GetPz() const {return fPt*fTanl;}
115
116 Double_t GetP() const;
117 Double_t GetPseudoRapidity() const;
118 Double_t GetRapidity() const;
119
120 Int_t GetCharge() const {return fQ;}
121 Int_t GetMCid() const {return fMCid;}
122 Double_t GetLength() const {return fLength;}
1ee9dca4 123 Double_t GetLengthXY() const ;
124 Double_t GetLengthTot() const;
125
a6c02c85 126 Int_t GetFirstRow() const {return fRowRange[0];}
127 Int_t GetLastRow() const {return fRowRange[1];}
128 Int_t GetSector() const {return fSector;}
129
130 UInt_t *GetHitNumbers() {return fHitNumbers;}
131
132 // setter
133 void SetPID(Float_t pid) {fPID=pid;}
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;}
25097926 137 void SetHits(Int_t nhits,UInt_t *hits);
a6c02c85 138 void SetPhi0(Double_t f) {fPhi0 = f;}
139 void SetPsi(Double_t f) {fPsi = f;}
140 void SetR0(Double_t f) {fR0 = f;}
141 void SetTgl(Double_t f) {fTanl =f;}
142 void SetZ0(Double_t f) {fFirstPoint[2] = f;}
143 void SetPt(Double_t f) {fPt = f;}
144 void SetLength(Double_t f) {fLength = f;}
145 void SetPterr(Double_t f) {fPterr = f;}
146 void SetPsierr(Double_t f) {fPsierr = f;}
147 void SetZ0err(Double_t f) {fZ0err = f;}
31f11c63 148 void SetY0err(Double_t f) {fY0err = f;}
a6c02c85 149 void SetTglerr(Double_t f) {fTanlerr = f;}
150 void SetKappa(Double_t f) {fKappa = f;}
151 void SetNHits(Int_t f) {fNHits = f;}
152 void SetRowRange(Int_t f,Int_t g) {fRowRange[0]=f; fRowRange[1]=g;}
153 void SetSector(Int_t f) {fSector = f;}
154 void SetRadius(Double_t f) {fRadius = f;}
155 void SetCenterX(Double_t f) {fCenterX = f;}
156 void SetCenterY(Double_t f) {fCenterY = f;}
157 void SetCharge(Int_t f) {fQ = f;}
158 void ComesFromMainVertex(Bool_t f) {fFromMainVertex = f;}
159
3cde846d 160 /**
161 * Convert all track parameters to the format of AliKalmanTrack
162 * The AliKalmanTrack class implements the track parametrization for offline ITS, TPC
163 * and TRD tracking. The function calculates and sets the parameters of the
164 * parent class (Note: AliHLTTPCTrack inherits from AliTPCtrack and thus
165 * AliKalmanTrack).
166 */
167 int Convert2AliKalmanTrack();
168
a6c02c85 169 private:
170
171 Int_t fNHits; //Number of hits
172 Int_t fMCid; //Assigned id from MC data.
173
174 Double_t fKappa; // Signed curvature (projected to a circle)
175 Double_t fRadius; // Radius of the helix (projected to a circle)
176 Double_t fCenterX; // x coordinate of the center of the helix (projected to a circle)
177 Double_t fCenterY; // y coordinate of the center of the helix (projected to a circle)
178 Bool_t fFromMainVertex; // true if tracks origin is the main vertex, otherwise false
179
180 Int_t fRowRange[2]; //Subsector where this track was build
181 Int_t fSector; //Sector # where this track was build
182
183 //data from momentum fit
184 Int_t fQ; //charge measured fit
185
186 //track parameters:
187 Double_t fTanl; //tan of dipangle
188 Double_t fPsi; //azimuthal angle of the momentum
189 Double_t fPt; //transverse momentum
190 Double_t fLength; //length of track (s)
191
192 Double_t fPterr; //error in pt
193 Double_t fPsierr; //error in psi
194 Double_t fZ0err; //error in first point
31f11c63 195 Double_t fY0err; //error in first point
a6c02c85 196 Double_t fTanlerr; //error in tanl
197
198 Double_t fPhi0; //azimuthal angle of the first point
199 Double_t fR0; //radius of the first point
200 Double_t fZ0; //z coordinate of the first point (fFirstPoint[2])
201
202 Double_t fFirstPoint[3]; //first point
203 Double_t fLastPoint[3]; //last point
204 Double_t fPoint[3]; //point
205 Double_t fPointPsi; //azimuthal angle of the momentum at Point
206
207 Bool_t fIsPoint; //Helix crosses the X-plane
208 Bool_t fIsLocal; //Track given in local coordinates.
209
210 Float_t fPID; //pid
25097926 211 static const int fgkHitArraySize=159; // size of hit array
212 UInt_t fHitNumbers[fgkHitArraySize]; //Array of hit numbers for this track
a6c02c85 213
214 Bool_t IsPoint(Bool_t ispoint) {fIsPoint = ispoint;return fIsPoint;}
215
3cde846d 216 ClassDef(AliHLTTPCTrack,2) //Base track class
a6c02c85 217};
218#endif