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 //-------------------------------------------------------
14 #include "AliTPCtrack.h"
15 #include "AliTPCParam.h"
17 #define kMAXCLUSTER 2500
23 static Int_t Clusters2Tracks(const AliTPCParam *par, TFile *of);
25 //**************** Internal tracker class **********************
29 void InsertCluster(const AliTPCcluster *c, UInt_t index);
30 operator int() const {return fN;}
31 const AliTPCcluster* operator[](Int_t i) const {return fClusters[i];}
32 UInt_t GetIndex(Int_t i) const {return fIndex[i];}
33 Int_t Find(Double_t y) const;
36 unsigned fN; //number of clusters
37 const AliTPCcluster *fClusters[kMAXCLUSTER]; //pointers to clusters
38 UInt_t fIndex[kMAXCLUSTER]; //indeces of clusters
41 AliTPCRow(const AliTPCRow& r); //dummy copy constructor
42 AliTPCRow &operator=(const AliTPCRow& r); //dummy assignment operator
45 //**************** Internal tracker class **********************
48 AliTPCSector() { fN=0; fRow = 0; }
49 virtual ~AliTPCSector() { delete[] fRow; }
50 static void SetParam(const AliTPCParam *p) { fgParam=p; }
51 AliTPCRow& operator[](Int_t i) const { return *(fRow+i); }
52 Int_t GetNRows() const { return fN; }
53 virtual Double_t GetX(Int_t l) const = 0;
54 virtual Double_t GetMaxY(Int_t l) const = 0;
55 virtual Double_t GetAlpha() const = 0;
56 virtual Double_t GetAlphaShift() const = 0;
57 virtual Int_t GetRowNumber(Double_t x) const = 0;
58 virtual Double_t GetPadPitchWidth() const = 0;
61 unsigned fN; //number of pad rows
62 AliTPCRow *fRow; //array of pad rows
63 static const AliTPCParam *fgParam; //TPC parameters
66 AliTPCSector(const AliTPCSector &s); //dummy copy contructor
67 AliTPCSector& operator=(const AliTPCSector &s);//dummy assignment operator
70 //**************** Internal tracker class **********************
71 class AliTPCSSector : public AliTPCSector {
74 Double_t GetX(Int_t l) const { return fgParam->GetPadRowRadiiLow(l); }
75 Double_t GetMaxY(Int_t l) const {
76 return GetX(l)*TMath::Tan(0.5*GetAlpha());
78 Double_t GetAlpha() const {return fgParam->GetInnerAngle();}
79 Double_t GetAlphaShift() const {return fgParam->GetInnerAngleShift();}
80 Double_t GetPadPitchWidth() const {
81 return fgParam->GetInnerPadPitchWidth();
83 Int_t GetRowNumber(Double_t x) const;
86 //**************** Internal tracker class **********************
87 class AliTPCLSector : public AliTPCSector {
90 Double_t GetX(Int_t l) const { return fgParam->GetPadRowRadiiUp(l); }
91 Double_t GetMaxY(Int_t l) const {
92 return GetX(l)*TMath::Tan(0.5*GetAlpha());
94 Double_t GetAlpha() const {return fgParam->GetOuterAngle();}
95 Double_t GetAlphaShift() const {return fgParam->GetOuterAngleShift();}
96 Double_t GetPadPitchWidth() const {
97 return fgParam->GetOuterPadPitchWidth();
99 Int_t GetRowNumber(Double_t x) const;
102 //**************** Internal tracker class **********************
103 class AliTPCseed : public AliTPCtrack {
105 AliTPCseed():AliTPCtrack(){}
106 AliTPCseed(UInt_t index, const Double_t xx[5],
107 const Double_t cc[15], Double_t xr, Double_t alpha):
108 AliTPCtrack(index, xx, cc, xr, alpha) {}
109 void SetSampledEdx(Float_t q, Int_t i) {
110 Double_t s=GetSnp(), t=GetTgl();
111 q *= TMath::Sqrt((1-s*s)/(1+t*t));
114 void UseClusters(AliTPCClustersArray *ca, Int_t n=0);
115 void CookdEdx(Double_t low=0.05, Double_t up=0.70);
118 Float_t fdEdxSample[200]; //array of dE/dx samples
123 FindProlongation(AliTPCseed& t,const AliTPCSector *sec,Int_t s,Int_t rf=0);
125 MakeSeeds(TObjArray &sd,const AliTPCSector *s,Int_t max,Int_t i1,Int_t i2);
128 inline AliTPCtracker::AliTPCSSector::AliTPCSSector() {
129 //default constructor
131 fprintf(stderr,"AliTPCSSector: parameters are not set !\n");
134 fN=fgParam->GetNRowLow();
135 fRow=new AliTPCRow[fN];
139 Int_t AliTPCtracker::AliTPCSSector::GetRowNumber(Double_t x) const {
140 //return pad row number for this x
141 Double_t r=fgParam->GetPadRowRadiiLow(fgParam->GetNRowLow()-1);
142 if (x > r) return fgParam->GetNRowLow();
143 r=fgParam->GetPadRowRadiiLow(0);
144 if (x < r) return -1;
145 return Int_t((x-r)/fgParam->GetInnerPadPitchLength() + 0.5);
148 inline AliTPCtracker::AliTPCLSector::AliTPCLSector(){
149 //default constructor
151 fprintf(stderr,"AliTPCLSector: parameters are not set !\n");
154 fN=fgParam->GetNRowUp();
155 fRow=new AliTPCRow[fN];
159 Int_t AliTPCtracker::AliTPCLSector::GetRowNumber(Double_t x) const {
160 //return pad row number for this x
161 Double_t r=fgParam->GetPadRowRadiiUp(fgParam->GetNRowUp()-1);
162 if (x > r) return fgParam->GetNRowUp();
163 r=fgParam->GetPadRowRadiiUp(0);
164 if (x < r) return -1;
165 return Int_t((x-r)/fgParam->GetOuterPadPitchLength() + 0.5);
168 //-----------------------------------------------------------------