]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDtrack.h
367978ac1444fabac7f46f65e4c1b20be20abcde
[u/mrichter/AliRoot.git] / STEER / AliESDtrack.h
1 #ifndef ALIESDTRACK_H
2 #define ALIESDTRACK_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //-------------------------------------------------------------------------
7 //                          Class AliESDtrack
8 //   This is the class to deal with during the physical analysis of data
9 //      
10 //         Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
11 //-------------------------------------------------------------------------
12 #include "TObject.h"
13 #include <TBits.h>
14
15 class AliKalmanTrack;
16
17 class AliESDtrack : public TObject {
18 public:
19   AliESDtrack();
20   virtual ~AliESDtrack() {}
21   void SetStatus(ULong_t flags) {fFlags|=flags;}
22   void ResetStatus(ULong_t flags) {fFlags&=~flags;}
23   Bool_t UpdateTrackParams(AliKalmanTrack *t, ULong_t flags);
24   void SetIntegratedLength(Double_t l) {fTrackLength=l;}
25   void SetIntegratedTimes(const Double_t *times);
26   void SetESDpid(const Double_t *p);
27   void GetESDpid(Double_t *p) const;
28   
29   ULong_t GetStatus() const {return fFlags;}
30   Int_t GetLabel() const {return fLabel;}
31   Double_t GetAlpha() const {return fRalpha;}
32   void GetExternalParameters(Double_t &x, Double_t p[5]) const;
33   void GetExternalCovariance(Double_t cov[15]) const;
34   Double_t GetIntegratedLength() const {return fTrackLength;}
35   void GetIntegratedTimes(Double_t *times) const;
36   Double_t GetMass() const;
37   Double_t GetP() const;
38   void GetPxPyPz(Double_t *p) const;
39   void GetXYZ(Double_t *r) const;
40   Int_t GetSign() const {return (fRp[4]<0) ? 1 : -1;} 
41
42   void SetConstrainedTrackParams(AliKalmanTrack *t, Double_t chi2);
43
44   Double_t GetConstrainedAlpha() const {return fCalpha;}
45   Double_t GetConstrainedChi2() const {return fCchi2;}
46   void GetConstrainedExternalParameters(Double_t &x, Double_t p[5]) const;
47   void GetConstrainedExternalCovariance(Double_t cov[15]) const;
48
49   void GetConstrainedPxPyPz(Double_t *p) const;
50   void GetConstrainedXYZ(Double_t *r) const;
51
52   void GetInnerPxPyPz(Double_t *p) const;
53   void GetInnerXYZ(Double_t *r) const;
54   void GetInnerExternalParameters(Double_t &x, Double_t p[5]) const;//skowron
55   void GetInnerExternalCovariance(Double_t cov[15]) const;//skowron
56   Double_t GetInnerAlpha() const {return fIalpha;}
57   
58   
59   void GetOuterPxPyPz(Double_t *p) const;
60   void GetOuterXYZ(Double_t *r) const;
61
62   void SetITSpid(const Double_t *p);
63   void GetITSpid(Double_t *p) const;
64   Float_t GetITSsignal() const {return fITSsignal;}
65   Float_t GetITSchi2() const {return fITSchi2;}
66   Int_t GetITSclusters(UInt_t *idx) const;
67   Int_t GetITSLabel() const {return fITSLabel;}
68
69   void SetTPCpid(const Double_t *p);
70   void GetTPCpid(Double_t *p) const;
71   Float_t GetTPCsignal() const {return fTPCsignal;}
72   Float_t GetTPCchi2() const {return fTPCchi2;}
73   Int_t GetTPCclusters(Int_t *idx) const;
74   Int_t GetTPCLabel() const {return fTPCLabel;}
75   const TBits& GetTPCClusterMap(){return fTPCClusterMap;}
76   
77   void SetTRDpid(const Double_t *p);
78   void GetTRDpid(Double_t *p) const;
79   Float_t GetTRDsignal() const {return fTRDsignal;}
80   Float_t GetTRDchi2() const {return fTRDchi2;}
81   Int_t GetTRDclusters(UInt_t *idx) const;
82   void    SetTRDpid(Int_t iSpecies, Float_t p);
83   Float_t GetTRDpid(Int_t iSpecies) const;
84   Int_t GetTRDLabel() const {return fTRDLabel;}
85
86
87   void SetTOFsignal(Double_t tof) {fTOFsignal=tof;}
88   Float_t GetTOFsignal() const {return fTOFsignal;}
89   Float_t GetTOFchi2() const {return fTOFchi2;}
90   void    SetTOFpid(const Double_t *p);
91   void    GetTOFpid(Double_t *p) const;
92   UInt_t  GetTOFcluster() const {return fTOFindex;}
93   void  SetTOFcluster(UInt_t index) {fTOFindex=index;}
94   
95   void    SetRICHsignal(Double_t beta) {fRICHsignal=beta;}
96   Float_t GetRICHsignal() const {return fRICHsignal;}
97   void    SetRICHpid(const Double_t *p);
98   void    GetRICHpid(Double_t *p) const;
99   
100   void SetPHOSposition(const Double_t *pos)  {
101     fPHOSpos[0] = pos[0]; fPHOSpos[1]=pos[1]; fPHOSpos[2]=pos[2];
102   }
103   void SetPHOSsignal(Double_t ene) {fPHOSsignal = ene; }
104   void SetPHOSpid(const Double_t *p);
105   void GetPHOSposition(Double_t *pos) const {
106     pos[0]=fPHOSpos[0]; pos[1]=fPHOSpos[1]; pos[2]=fPHOSpos[2];
107   }
108   Float_t GetPHOSsignal() const {return fPHOSsignal;}
109   void GetPHOSpid(Double_t *p) const;  
110
111   Bool_t IsOn(Int_t mask){ return (fFlags&mask)>0;}
112   Bool_t IsRICH(){ return fFlags&kRICHpid;}
113   enum {
114     kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
115     kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
116     kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
117     kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
118     kPHOSpid=0x10000, kRICHpid=0x20000,
119     kTRDStop=0x20000000,
120     kESDpid=0x40000000,
121     kTIME=0x80000000
122   }; 
123   enum {kSPECIES=5}; // Number of particle species recognized by the PID
124
125 protected:
126   ULong_t   fFlags;        // Reconstruction status flags 
127   Int_t     fLabel;        // Track label
128
129   Float_t   fTrackLength;         // Track length
130   Float_t   fTrackTime[kSPECIES]; // TOFs estimated by the tracking
131   Float_t   fR[kSPECIES];         // combined "detector response probability"
132
133   Int_t     fStopVertex;          // Index of stop vertex
134
135 //Running track parameters
136   Double_t fRalpha;  // track rotation angle
137   Double_t fRx;      // X-coordinate of the track reference plane 
138   Double_t fRp[5];   // external track parameters  
139   Double_t fRc[15];  // external cov. matrix of the track parameters
140
141 //Track parameters constrained to the primary vertex
142   Double_t fCalpha,fCx,fCp[5],fCc[15];
143   Double_t fCchi2; //chi2 at the primary vertex
144
145 //Track parameters at the inner wall of the TPC
146   Double_t fIalpha,fIx,fIp[5],fIc[15];
147
148 //Track parameters at the radius of the PHOS
149   Double_t fOalpha,fOx,fOp[5],fOc[15];
150
151   // ITS related track information
152   Float_t fITSchi2;        // chi2 in the ITS
153   Int_t   fITSncls;        // number of clusters assigned in the ITS
154   UInt_t  fITSindex[6];    //! indices of the assigned ITS clusters
155   Float_t fITSsignal;      // detector's PID signal
156   Float_t fITSr[kSPECIES]; // "detector response probabilities" (for the PID)
157   Int_t   fITSLabel;       // label according TPC
158
159   // TPC related track information
160   Float_t fTPCchi2;        // chi2 in the TPC
161   Int_t   fTPCncls;        // number of clusters assigned in the TPC
162   UInt_t  fTPCindex[180];  //! indices of the assigned TPC clusters
163   TBits   fTPCClusterMap;  // Map of clusters, one bit per padrow; 1 if has a cluster on given padrow
164   Float_t fTPCsignal;      // detector's PID signal
165   Float_t fTPCr[kSPECIES]; // "detector response probabilities" (for the PID)
166   Int_t   fTPCLabel;       // label according TPC
167
168   // TRD related track information
169   Float_t fTRDchi2;        // chi2 in the TRD
170   Int_t   fTRDncls;        // number of clusters assigned in the TRD
171   UInt_t  fTRDindex[90];   //! indices of the assigned TRD clusters
172   Float_t fTRDsignal;      // detector's PID signal
173   Float_t fTRDr[kSPECIES]; // "detector response probabilities" (for the PID)
174   Int_t   fTRDLabel;       // label according TRD
175
176   // TOF related track information
177   Float_t fTOFchi2;        // chi2 in the TOF
178   UInt_t  fTOFindex;       // index of the assigned TOF cluster
179   Float_t fTOFsignal;      // detector's PID signal
180   Float_t fTOFr[kSPECIES]; // "detector response probabilities" (for the PID)
181
182   // PHOS related track information 
183   Float_t fPHOSpos[3]; //position localised by PHOS in global coordinate system
184   Float_t fPHOSsignal; // energy measured by PHOS
185   Float_t fPHOSr[kSPECIES]; // PID information from PHOS
186
187   // HMPID related track information
188   Float_t fRICHsignal;     // detector's PID signal (beta for RICH)
189   Float_t fRICHr[kSPECIES];// "detector response probabilities" (for the PID)
190         
191   ClassDef(AliESDtrack,3)  //ESDtrack 
192 };
193
194 #endif 
195