1 #ifndef ALITPCTRACKERSECTOR_H
2 #define ALITPCTRACKERSECTOR_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 /* $Id: AliTPCtrackerSector.h 25837 2008-05-16 16:39:00Z marian $ */
9 //-------------------------------------------------------
10 // TPC tracker - helper classes for cluster storing
15 //-------------------------------------------------------
17 #include "TClonesArray.h"
21 class TTreeSRedirector;
25 class AliTPCtrackerRow : public TObject{
29 void InsertCluster(const AliTPCclusterMI *c, UInt_t index);
31 operator int() const {return fN;}
32 Int_t GetN() const {return fN;}
33 const AliTPCclusterMI* operator[](Int_t i) const {return fClusters[i];}
34 UInt_t GetIndex(Int_t i) const {return fIndex[i];}
35 Int_t Find(Double_t z) const;
36 AliTPCclusterMI * FindNearest(Double_t y, Double_t z, Double_t roady, Double_t roadz) const;
37 AliTPCclusterMI * FindNearest2(Double_t y, Double_t z, Double_t roady, Double_t roadz, UInt_t & index) const;
39 void SetX(Double_t x) {fX=x;}
40 Double_t GetX() const {return fX;}
41 Float_t GetDeadZone() const {return fDeadZone;}
42 void SetDeadZone(Float_t d) {fDeadZone=d;}
43 Int_t GetN1() const {return fN1;}
44 void SetN1(Int_t n) {fN1=n;}
45 Int_t GetN2() const {return fN2;}
46 void SetN2(Int_t n) {fN2=n;}
47 TClonesArray* GetClusters1() const {return fClusters1;}
48 TClonesArray* GetClusters2() const {return fClusters2;}
49 void SetCluster1(Int_t i, const AliTPCclusterMI &cl);
50 void SetCluster2(Int_t i, const AliTPCclusterMI &cl);
52 AliTPCclusterMI* GetCluster1(Int_t i) const {return (fClusters1)?(AliTPCclusterMI*) fClusters1->At(i):NULL;}
53 AliTPCclusterMI* GetCluster2(Int_t i) const {return (fClusters2)?(AliTPCclusterMI*) fClusters2->At(i):NULL;}
55 Short_t GetFastCluster(Int_t i) const {return fFastCluster[i];}
56 void SetFastCluster(Int_t i, Short_t cl);
57 Int_t IncrementN1() { return ++fN1;}
58 Int_t IncrementN2() { return ++fN2;}
61 AliTPCtrackerRow & operator=(const AliTPCtrackerRow & );
62 AliTPCtrackerRow(const AliTPCtrackerRow& /*r*/); //dummy copy constructor
63 Float_t fDeadZone; // the width of the dead zone
64 TClonesArray *fClusters1; //array with clusters 1
65 Int_t fN1; //number of clusters on left side
66 TClonesArray *fClusters2; //array with clusters 2
67 Int_t fN2; // number of clusters on right side of the TPC
68 Short_t fFastCluster[510]; //index of the nearest cluster at given position
69 Int_t fN; //number of clusters
70 const AliTPCclusterMI *fClusters[kMaxClusterPerRow]; //pointers to clusters
71 // indexes for cluster at given position z
72 // AliTPCclusterMI *fClustersArray; //
73 UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters
74 Double_t fX; //X-coordinate of this row
75 ClassDef(AliTPCtrackerRow,0)
79 //**************** Internal tracker class **********************
80 class AliTPCtrackerSector: public TObject {
82 AliTPCtrackerSector():
90 f2PadPitchLength(0.) {}
91 ~AliTPCtrackerSector() { delete[] fRow; }
92 AliTPCtrackerRow& operator[](Int_t i) const { return *(fRow+i); }
93 Int_t GetNRows() const { return fN; }
94 void Setup(const AliTPCParam *par, Int_t flag);
95 Double_t GetX(Int_t l) const {return fRow[l].GetX();}
96 Double_t GetMaxY(Int_t l) const {
97 return GetX(l)*TMath::Tan(0.5*GetAlpha());
99 Double_t GetAlpha() const {return fAlpha;}
100 Double_t GetAlphaShift() const {return fAlphaShift;}
101 //Int_t GetFirst(){return fFirstRow;}
102 Int_t GetNClInSector(Int_t side);
103 Int_t GetRowNumber(Double_t x) const;
104 Double_t GetPadPitchWidth() const {return fPadPitchWidth;}
105 Double_t GetPadPitchLength() const {return fPadPitchLength;}
106 Double_t GetPadPitchLength(Float_t x) const {return (x<200) ? fPadPitchLength:f2PadPitchLength ;}
108 void InsertCluster(AliTPCclusterMI *cl, Int_t size, const AliTPCParam *par);
110 Int_t GetNClInSector(Int_t side) const;
111 Int_t GetNClUsedInSector(Int_t side) const;
114 AliTPCtrackerSector & operator=(const AliTPCtrackerSector & );
115 AliTPCtrackerSector(const AliTPCtrackerSector &/*s*/); //dummy copy contructor
116 Int_t fN; //number of pad rows
117 //Int_t fFirstRow; //offset
118 AliTPCtrackerRow *fRow; //array of pad rows
119 Double_t fAlpha; //opening angle
120 Double_t fAlphaShift; //shift angle;
121 Double_t fPadPitchWidth; //pad pitch width
122 Double_t fPadPitchLength; //pad pitch length
123 Double_t f1PadPitchLength; //pad pitch length
124 Double_t f2PadPitchLength; //pad pitch length
125 ClassDef(AliTPCtrackerSector,1)