]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCtracker.h
Cleaned up some more in AliL3MemHandler, by removing the AliL3Transform in
[u/mrichter/AliRoot.git] / TPC / AliTPCtracker.h
CommitLineData
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 "AliTPCClustersArray.h"
73042f01 16
b9de75e1 17#include "AliTPCreco.h"
73042f01 18
19class TFile;
b9de75e1 20class AliTPCParam;
73042f01 21
b9de75e1 22class AliTPCtracker : public AliTracker {
73042f01 23public:
e502c8c2 24 AliTPCtracker():AliTracker(),fkNIS(0),fkNOS(0) {
25 fInnerSec=fOuterSec=0; fSeeds=0;
26 }
f38c8ae5 27 AliTPCtracker(const AliTPCParam *par, Int_t eventn=0);
b9de75e1 28 ~AliTPCtracker();
29
30 Int_t ReadSeeds(const TFile *in);
31
32 void LoadInnerSectors();
33 void UnloadInnerSectors();
34 void LoadOuterSectors();
35 void UnloadOuterSectors();
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);
40
41 virtual void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
42
43public:
73042f01 44//**************** Internal tracker class **********************
45 class AliTPCRow {
46 public:
47 AliTPCRow() {fN=0;}
48 void InsertCluster(const AliTPCcluster *c, UInt_t index);
49 operator int() const {return fN;}
50 const AliTPCcluster* operator[](Int_t i) const {return fClusters[i];}
51 UInt_t GetIndex(Int_t i) const {return fIndex[i];}
52 Int_t Find(Double_t y) const;
b9de75e1 53 void SetX(Double_t x) {fX=x;}
54 Double_t GetX() const {return fX;}
73042f01 55
56 private:
b9de75e1 57 Int_t fN; //number of clusters
58 const AliTPCcluster *fClusters[kMaxClusterPerRow]; //pointers to clusters
59 UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters
60 Double_t fX; //X-coordinate of this row
73042f01 61
62 private:
63 AliTPCRow(const AliTPCRow& r); //dummy copy constructor
64 AliTPCRow &operator=(const AliTPCRow& r); //dummy assignment operator
65 };
66
67//**************** Internal tracker class **********************
68 class AliTPCSector {
69 public:
70 AliTPCSector() { fN=0; fRow = 0; }
b9de75e1 71 ~AliTPCSector() { delete[] fRow; }
73042f01 72 AliTPCRow& operator[](Int_t i) const { return *(fRow+i); }
73 Int_t GetNRows() const { return fN; }
b9de75e1 74 void Setup(const AliTPCParam *par, Int_t flag);
75 Double_t GetX(Int_t l) const {return fRow[l].GetX();}
76 Double_t GetMaxY(Int_t l) const {
77 return GetX(l)*TMath::Tan(0.5*GetAlpha());
78 }
79 Double_t GetAlpha() const {return fAlpha;}
80 Double_t GetAlphaShift() const {return fAlphaShift;}
81 Int_t GetRowNumber(Double_t x) const {
82 //return pad row number for this x
f03e3423 83 Double_t r;
84 if (fN < 63){
85 r=fRow[fN-1].GetX();
86 if (x > r) return fN;
87 r=fRow[0].GetX();
88 if (x < r) return -1;
89 return Int_t((x-r)/fPadPitchLength + 0.5);}
90 else{
91 r=fRow[fN-1].GetX();
92 if (x > r) return fN;
93 r=fRow[0].GetX();
94 if (x < r) return -1;
95 Double_t r1=fRow[64].GetX();
96 if(x<r1){
97 return Int_t((x-r)/f1PadPitchLength + 0.5);}
98 else{
99 return (Int_t((x-r1)/f2PadPitchLength + 0.5)+64);}
100 }
b9de75e1 101 }
102 Double_t GetPadPitchWidth() const {return fPadPitchWidth;}
103 Double_t GetPadPitchLength() const {return fPadPitchLength;}
104
105 private:
106 Int_t fN; //number of pad rows
73042f01 107 AliTPCRow *fRow; //array of pad rows
b9de75e1 108 Double_t fAlpha; //opening angle
109 Double_t fAlphaShift; //shift angle;
110 Double_t fPadPitchWidth; //pad pitch width
f03e3423 111 Double_t fPadPitchLength; //pad pitch length
112 Double_t f1PadPitchLength; //pad pitch length
113 Double_t f2PadPitchLength;
73042f01 114 private:
115 AliTPCSector(const AliTPCSector &s); //dummy copy contructor
116 AliTPCSector& operator=(const AliTPCSector &s);//dummy assignment operator
117 };
118
73042f01 119//**************** Internal tracker class **********************
120 class AliTPCseed : public AliTPCtrack {
121 public:
122 AliTPCseed():AliTPCtrack(){}
b9de75e1 123 AliTPCseed(const AliTPCtrack &t):AliTPCtrack(t){}
124 AliTPCseed(const AliKalmanTrack &t, Double_t a):AliTPCtrack(t,a){}
73042f01 125 AliTPCseed(UInt_t index, const Double_t xx[5],
126 const Double_t cc[15], Double_t xr, Double_t alpha):
127 AliTPCtrack(index, xx, cc, xr, alpha) {}
128 void SetSampledEdx(Float_t q, Int_t i) {
be9c5115 129 Double_t s=GetSnp(), t=GetTgl();
130 q *= TMath::Sqrt((1-s*s)/(1+t*t));
d4cf1daa 131 fdEdxSample[i]=q;
73042f01 132 }
73042f01 133 void CookdEdx(Double_t low=0.05, Double_t up=0.70);
134
135 private:
d4cf1daa 136 Float_t fdEdxSample[200]; //array of dE/dx samples
73042f01 137 };
138
139private:
b9de75e1 140 void MakeSeeds(Int_t i1, Int_t i2);
141 Int_t FollowProlongation(AliTPCseed& t, Int_t rf=0);
142 Int_t FollowBackProlongation(AliTPCseed &s, const AliTPCtrack &t);
143
144 AliTPCtracker(const AliTPCtracker& r); //dummy copy constructor
145 AliTPCtracker &operator=(const AliTPCtracker& r);//dummy assignment operator
146
147 const Int_t fkNIS; //number of inner sectors
148 AliTPCSector *fInnerSec; //array of inner sectors;
149 const Int_t fkNOS; //number of outer sectors
150 AliTPCSector *fOuterSec; //array of outer sectors;
73042f01 151
b9de75e1 152 Int_t fN; //number of loaded sectors
153 AliTPCSector *fSectors; //pointer to loaded sectors;
154
7f6ddf58 155 Int_t fEventN; //event number
b9de75e1 156 AliTPCClustersArray fClustersArray; //array of TPC clusters
7f6ddf58 157 TObjArray *fSeeds; //array of track seeds
b9de75e1 158};
73042f01 159
160#endif
161
162