1 #ifndef ALITPCTRACKER_H
2 #define ALITPCTRACKER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //-------------------------------------------------------
11 // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
12 //-------------------------------------------------------
13 #include "AliTracker.h"
14 #include "AliTPCtrack.h"
15 #include "AliTPCClustersArray.h"
17 #include "AliTPCreco.h"
22 class AliTPCtracker : public AliTracker {
24 AliTPCtracker():AliTracker(),fkNIS(0),fkNOS(0) {}
25 AliTPCtracker(const AliTPCParam *par);
28 Int_t ReadSeeds(const TFile *in);
30 void LoadInnerSectors();
31 void UnloadInnerSectors();
32 void LoadOuterSectors();
33 void UnloadOuterSectors();
35 AliCluster *GetCluster(Int_t index) const;
36 Int_t Clusters2Tracks(const TFile *in, TFile *out);
37 Int_t PropagateBack(const TFile *in, TFile *out);
39 virtual void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
42 //**************** Internal tracker class **********************
46 void InsertCluster(const AliTPCcluster *c, UInt_t index);
47 operator int() const {return fN;}
48 const AliTPCcluster* operator[](Int_t i) const {return fClusters[i];}
49 UInt_t GetIndex(Int_t i) const {return fIndex[i];}
50 Int_t Find(Double_t y) const;
51 void SetX(Double_t x) {fX=x;}
52 Double_t GetX() const {return fX;}
55 Int_t fN; //number of clusters
56 const AliTPCcluster *fClusters[kMaxClusterPerRow]; //pointers to clusters
57 UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters
58 Double_t fX; //X-coordinate of this row
61 AliTPCRow(const AliTPCRow& r); //dummy copy constructor
62 AliTPCRow &operator=(const AliTPCRow& r); //dummy assignment operator
65 //**************** Internal tracker class **********************
68 AliTPCSector() { fN=0; fRow = 0; }
69 ~AliTPCSector() { delete[] fRow; }
70 AliTPCRow& operator[](Int_t i) const { return *(fRow+i); }
71 Int_t GetNRows() const { return fN; }
72 void Setup(const AliTPCParam *par, Int_t flag);
73 Double_t GetX(Int_t l) const {return fRow[l].GetX();}
74 Double_t GetMaxY(Int_t l) const {
75 return GetX(l)*TMath::Tan(0.5*GetAlpha());
77 Double_t GetAlpha() const {return fAlpha;}
78 Double_t GetAlphaShift() const {return fAlphaShift;}
79 Int_t GetRowNumber(Double_t x) const {
80 //return pad row number for this x
81 Double_t r=fRow[fN-1].GetX();
85 return Int_t((x-r)/fPadPitchLength + 0.5);
87 Double_t GetPadPitchWidth() const {return fPadPitchWidth;}
88 Double_t GetPadPitchLength() const {return fPadPitchLength;}
91 Int_t fN; //number of pad rows
92 AliTPCRow *fRow; //array of pad rows
93 Double_t fAlpha; //opening angle
94 Double_t fAlphaShift; //shift angle;
95 Double_t fPadPitchWidth; //pad pitch width
96 Double_t fPadPitchLength; //pad pitch length
99 AliTPCSector(const AliTPCSector &s); //dummy copy contructor
100 AliTPCSector& operator=(const AliTPCSector &s);//dummy assignment operator
103 //**************** Internal tracker class **********************
104 class AliTPCseed : public AliTPCtrack {
106 AliTPCseed():AliTPCtrack(){}
107 AliTPCseed(const AliTPCtrack &t):AliTPCtrack(t){}
108 AliTPCseed(const AliKalmanTrack &t, Double_t a):AliTPCtrack(t,a){}
109 AliTPCseed(UInt_t index, const Double_t xx[5],
110 const Double_t cc[15], Double_t xr, Double_t alpha):
111 AliTPCtrack(index, xx, cc, xr, alpha) {}
112 void SetSampledEdx(Float_t q, Int_t i) {
113 Double_t s=GetSnp(), t=GetTgl();
114 q *= TMath::Sqrt((1-s*s)/(1+t*t));
117 void CookdEdx(Double_t low=0.05, Double_t up=0.70);
120 Float_t fdEdxSample[200]; //array of dE/dx samples
124 void MakeSeeds(Int_t i1, Int_t i2);
125 Int_t FollowProlongation(AliTPCseed& t, Int_t rf=0);
126 Int_t FollowBackProlongation(AliTPCseed &s, const AliTPCtrack &t);
128 AliTPCtracker(const AliTPCtracker& r); //dummy copy constructor
129 AliTPCtracker &operator=(const AliTPCtracker& r);//dummy assignment operator
131 const Int_t fkNIS; //number of inner sectors
132 AliTPCSector *fInnerSec; //array of inner sectors;
133 const Int_t fkNOS; //number of outer sectors
134 AliTPCSector *fOuterSec; //array of outer sectors;
136 Int_t fN; //number of loaded sectors
137 AliTPCSector *fSectors; //pointer to loaded sectors;
139 AliTPCClustersArray fClustersArray; //array of TPC clusters
140 TObjArray *fSeeds; //array of track seeds