]>
Commit | Line | Data |
---|---|---|
73042f01 | 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 */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------- | |
9 | // TPC tracker | |
10 | // | |
11 | // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch | |
12 | //------------------------------------------------------- | |
b9de75e1 | 13 | #include "AliTracker.h" |
73042f01 | 14 | #include "AliTPCtrack.h" |
b9de75e1 | 15 | #include "AliTPCreco.h" |
bcc04e2a | 16 | #include "AliTPCcluster.h" |
9c9d2487 | 17 | #include "AliBarrelTrack.h" |
73042f01 | 18 | |
19 | class TFile; | |
b9de75e1 | 20 | class AliTPCParam; |
bcc04e2a | 21 | class TObjArray; |
73042f01 | 22 | |
b9de75e1 | 23 | class AliTPCtracker : public AliTracker { |
73042f01 | 24 | public: |
e502c8c2 | 25 | AliTPCtracker():AliTracker(),fkNIS(0),fkNOS(0) { |
26 | fInnerSec=fOuterSec=0; fSeeds=0; | |
e3f7105e | 27 | fParam = 0; |
e502c8c2 | 28 | } |
bcc04e2a | 29 | AliTPCtracker(const AliTPCParam *par); |
b9de75e1 | 30 | ~AliTPCtracker(); |
31 | ||
32 | Int_t ReadSeeds(const TFile *in); | |
33 | ||
e24ea474 | 34 | Int_t LoadClusters(); |
bcc04e2a | 35 | void UnloadClusters(); |
73042f01 | 36 | |
b9de75e1 | 37 | AliCluster *GetCluster(Int_t index) const; |
38 | Int_t Clusters2Tracks(const TFile *in, TFile *out); | |
39 | Int_t PropagateBack(const TFile *in, TFile *out); | |
e24ea474 | 40 | Int_t PropagateBack(const TFile *in, const TFile *in2, TFile *out); |
08dba16b | 41 | Int_t RefitInward(TFile *outTracks, TFile *inTracks); |
b9de75e1 | 42 | |
43 | virtual void CookLabel(AliKalmanTrack *t,Float_t wrong) const; | |
44 | ||
45 | public: | |
73042f01 | 46 | //**************** Internal tracker class ********************** |
47 | class AliTPCRow { | |
48 | public: | |
bcc04e2a | 49 | AliTPCRow() { |
50 | fN=0; | |
51 | fSize=kMaxClusterPerRow/8; | |
52 | fClusterArray=new AliTPCcluster[fSize]; | |
53 | } | |
54 | ~AliTPCRow() {delete[] fClusterArray;} | |
55 | void InsertCluster(const AliTPCcluster *c, Int_t sec, Int_t row); | |
56 | void ResetClusters() {fN=0;} | |
73042f01 | 57 | operator int() const {return fN;} |
bcc04e2a | 58 | const AliTPCcluster *operator[](Int_t i) const {return fClusters[i];} |
59 | const AliTPCcluster *GetUnsortedCluster(Int_t i) const { | |
60 | return fClusterArray+i; | |
61 | } | |
73042f01 | 62 | UInt_t GetIndex(Int_t i) const {return fIndex[i];} |
63 | Int_t Find(Double_t y) const; | |
b9de75e1 | 64 | void SetX(Double_t x) {fX=x;} |
65 | Double_t GetX() const {return fX;} | |
73042f01 | 66 | |
67 | private: | |
b9de75e1 | 68 | Int_t fN; //number of clusters |
69 | const AliTPCcluster *fClusters[kMaxClusterPerRow]; //pointers to clusters | |
bcc04e2a | 70 | Int_t fSize; //size of array of clusters |
71 | AliTPCcluster *fClusterArray; //array of clusters | |
b9de75e1 | 72 | UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters |
73 | Double_t fX; //X-coordinate of this row | |
73042f01 | 74 | |
75 | private: | |
76 | AliTPCRow(const AliTPCRow& r); //dummy copy constructor | |
77 | AliTPCRow &operator=(const AliTPCRow& r); //dummy assignment operator | |
78 | }; | |
79 | ||
80 | //**************** Internal tracker class ********************** | |
81 | class AliTPCSector { | |
82 | public: | |
83 | AliTPCSector() { fN=0; fRow = 0; } | |
b9de75e1 | 84 | ~AliTPCSector() { delete[] fRow; } |
73042f01 | 85 | AliTPCRow& operator[](Int_t i) const { return *(fRow+i); } |
86 | Int_t GetNRows() const { return fN; } | |
b9de75e1 | 87 | void Setup(const AliTPCParam *par, Int_t flag); |
88 | Double_t GetX(Int_t l) const {return fRow[l].GetX();} | |
89 | Double_t GetMaxY(Int_t l) const { | |
90 | return GetX(l)*TMath::Tan(0.5*GetAlpha()); | |
91 | } | |
92 | Double_t GetAlpha() const {return fAlpha;} | |
93 | Double_t GetAlphaShift() const {return fAlphaShift;} | |
94 | Int_t GetRowNumber(Double_t x) const { | |
95 | //return pad row number for this x | |
f03e3423 | 96 | Double_t r; |
b46635a4 | 97 | if (fN < 64){ |
f03e3423 | 98 | r=fRow[fN-1].GetX(); |
99 | if (x > r) return fN; | |
100 | r=fRow[0].GetX(); | |
101 | if (x < r) return -1; | |
29fe0389 | 102 | return Int_t((x-r)/f1PadPitchLength + 0.5);} |
f03e3423 | 103 | else{ |
104 | r=fRow[fN-1].GetX(); | |
105 | if (x > r) return fN; | |
106 | r=fRow[0].GetX(); | |
107 | if (x < r) return -1; | |
108 | Double_t r1=fRow[64].GetX(); | |
109 | if(x<r1){ | |
110 | return Int_t((x-r)/f1PadPitchLength + 0.5);} | |
111 | else{ | |
112 | return (Int_t((x-r1)/f2PadPitchLength + 0.5)+64);} | |
113 | } | |
b9de75e1 | 114 | } |
115 | Double_t GetPadPitchWidth() const {return fPadPitchWidth;} | |
b9de75e1 | 116 | |
117 | private: | |
118 | Int_t fN; //number of pad rows | |
73042f01 | 119 | AliTPCRow *fRow; //array of pad rows |
b9de75e1 | 120 | Double_t fAlpha; //opening angle |
121 | Double_t fAlphaShift; //shift angle; | |
122 | Double_t fPadPitchWidth; //pad pitch width | |
bcc04e2a | 123 | Double_t f1PadPitchLength; //pad pitch length |
124 | Double_t f2PadPitchLength; //pad pitch length | |
73042f01 | 125 | private: |
126 | AliTPCSector(const AliTPCSector &s); //dummy copy contructor | |
127 | AliTPCSector& operator=(const AliTPCSector &s);//dummy assignment operator | |
128 | }; | |
129 | ||
73042f01 | 130 | //**************** Internal tracker class ********************** |
131 | class AliTPCseed : public AliTPCtrack { | |
132 | public: | |
133 | AliTPCseed():AliTPCtrack(){} | |
b9de75e1 | 134 | AliTPCseed(const AliTPCtrack &t):AliTPCtrack(t){} |
135 | AliTPCseed(const AliKalmanTrack &t, Double_t a):AliTPCtrack(t,a){} | |
73042f01 | 136 | AliTPCseed(UInt_t index, const Double_t xx[5], |
137 | const Double_t cc[15], Double_t xr, Double_t alpha): | |
138 | AliTPCtrack(index, xx, cc, xr, alpha) {} | |
139 | void SetSampledEdx(Float_t q, Int_t i) { | |
be9c5115 | 140 | Double_t s=GetSnp(), t=GetTgl(); |
141 | q *= TMath::Sqrt((1-s*s)/(1+t*t)); | |
d4cf1daa | 142 | fdEdxSample[i]=q; |
73042f01 | 143 | } |
73042f01 | 144 | void CookdEdx(Double_t low=0.05, Double_t up=0.70); |
145 | ||
146 | private: | |
d4cf1daa | 147 | Float_t fdEdxSample[200]; //array of dE/dx samples |
73042f01 | 148 | }; |
149 | ||
150 | private: | |
08dba16b | 151 | |
b9de75e1 | 152 | void MakeSeeds(Int_t i1, Int_t i2); |
153 | Int_t FollowProlongation(AliTPCseed& t, Int_t rf=0); | |
154 | Int_t FollowBackProlongation(AliTPCseed &s, const AliTPCtrack &t); | |
08dba16b | 155 | Int_t FollowRefitInward(AliTPCseed *seed, AliTPCtrack *track); |
b9de75e1 | 156 | |
157 | AliTPCtracker(const AliTPCtracker& r); //dummy copy constructor | |
158 | AliTPCtracker &operator=(const AliTPCtracker& r);//dummy assignment operator | |
159 | ||
160 | const Int_t fkNIS; //number of inner sectors | |
bcc04e2a | 161 | AliTPCSector *fInnerSec; //array of inner sectors |
b9de75e1 | 162 | const Int_t fkNOS; //number of outer sectors |
bcc04e2a | 163 | AliTPCSector *fOuterSec; //array of outer sectors |
73042f01 | 164 | |
bcc04e2a | 165 | Int_t fN; //number of "active" sectors |
166 | AliTPCSector *fSectors; //pointer to "active" sectors; | |
e3f7105e | 167 | |
168 | AliTPCParam *fParam; //! TPC parameters for outer reference plane [SR, GSI, 18.02.2003] | |
169 | TObjArray *fSeeds; //array of track seeds | |
9c9d2487 | 170 | |
171 | // [SR, 01.04.2003] | |
172 | void SetBarrelTree(const char *mode); | |
173 | void StoreBarrelTrack(AliTPCtrack *ps, Int_t refPlane, Int_t isIn); | |
174 | ||
175 | // [SR, 01.04.2003] | |
176 | TFile *fBarrelFile; // file with "barrel" tracks | |
177 | TTree *fBarrelTree; // tree with "barrel" tracks | |
178 | TBranch *fBarrelBranch; | |
179 | TClonesArray *fBarrelArray; | |
180 | AliBarrelTrack *fBarrelTrack; | |
181 | ||
b9de75e1 | 182 | }; |
73042f01 | 183 | |
184 | #endif | |
185 | ||
186 |