]>
Commit | Line | Data |
---|---|---|
9350f379 | 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 */ | |
5 | ||
6 | ||
7 | /* $Id: AliTPCtrackerSector.h 25837 2008-05-16 16:39:00Z marian $ */ | |
8 | ||
9 | //------------------------------------------------------- | |
10 | // TPC tracker - helper classes for cluster storing | |
11 | // and navigation | |
12 | // | |
13 | // | |
14 | // Origin: | |
15 | //------------------------------------------------------- | |
16 | ||
17 | ||
18 | //class TFile; | |
19 | class AliTPCParam; | |
20 | class TTreeSRedirector; | |
21 | ||
22 | ||
23 | ||
24 | class AliTPCtrackerRow : public TObject{ | |
25 | public: | |
26 | AliTPCtrackerRow(); | |
27 | ~AliTPCtrackerRow(); | |
28 | void InsertCluster(const AliTPCclusterMI *c, UInt_t index); | |
29 | void ResetClusters(); | |
30 | operator int() const {return fN;} | |
31 | Int_t GetN() const {return fN;} | |
32 | const AliTPCclusterMI* operator[](Int_t i) const {return fClusters[i];} | |
33 | UInt_t GetIndex(Int_t i) const {return fIndex[i];} | |
17c1d106 | 34 | Int_t Find(Double_t z) const; |
9350f379 | 35 | AliTPCclusterMI * FindNearest(Double_t y, Double_t z, Double_t roady, Double_t roadz) const; |
36 | AliTPCclusterMI * FindNearest2(Double_t y, Double_t z, Double_t roady, Double_t roadz, UInt_t & index) const; | |
37 | ||
38 | void SetX(Double_t x) {fX=x;} | |
39 | Double_t GetX() const {return fX;} | |
40 | Float_t GetDeadZone() const {return fDeadZone;} | |
41 | void SetDeadZone(Float_t d) {fDeadZone=d;} | |
42 | Int_t GetN1() const {return fN1;} | |
43 | void SetN1(Int_t n) {fN1=n;} | |
44 | Int_t GetN2() const {return fN2;} | |
45 | void SetN2(Int_t n) {fN2=n;} | |
46 | AliTPCclusterMI* GetClusters1() const {return fClusters1;} | |
47 | AliTPCclusterMI* GetClusters2() const {return fClusters2;} | |
48 | void SetClusters1(AliTPCclusterMI* cl) {fClusters1=cl;} | |
49 | void SetClusters2(AliTPCclusterMI* cl) {fClusters2=cl;} | |
50 | void SetCluster1(Int_t i, const AliTPCclusterMI &cl) {fClusters1[i]=cl;} | |
51 | void SetCluster2(Int_t i, const AliTPCclusterMI &cl) {fClusters2[i]=cl;} | |
52 | AliTPCclusterMI* GetCluster1(Int_t i) const {return &fClusters1[i];} | |
53 | AliTPCclusterMI* GetCluster2(Int_t i) const {return &fClusters2[i];} | |
54 | Short_t GetFastCluster(Int_t i) const {return fFastCluster[i];} | |
55 | void SetFastCluster(Int_t i, Short_t cl); | |
aa7f1a5a | 56 | Int_t IncrementN1() { return ++fN1;} |
57 | Int_t IncrementN2() { return ++fN2;} | |
9350f379 | 58 | |
59 | private: | |
60 | AliTPCtrackerRow & operator=(const AliTPCtrackerRow & ); | |
61 | AliTPCtrackerRow(const AliTPCtrackerRow& /*r*/); //dummy copy constructor | |
62 | Float_t fDeadZone; // the width of the dead zone | |
63 | AliTPCclusterMI *fClusters1; //array with clusters 1 | |
64 | Int_t fN1; //number of clusters on left side | |
65 | AliTPCclusterMI *fClusters2; //array with clusters 2 | |
66 | Int_t fN2; // number of clusters on right side of the TPC | |
67 | Short_t fFastCluster[510]; //index of the nearest cluster at given position | |
68 | Int_t fN; //number of clusters | |
69 | const AliTPCclusterMI *fClusters[kMaxClusterPerRow]; //pointers to clusters | |
70 | // indexes for cluster at given position z | |
71 | // AliTPCclusterMI *fClustersArray; // | |
72 | UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters | |
73 | Double_t fX; //X-coordinate of this row | |
74 | ClassDef(AliTPCtrackerRow,0) | |
75 | }; | |
76 | ||
77 | ||
78 | //**************** Internal tracker class ********************** | |
79 | class AliTPCtrackerSector: public TObject { | |
80 | public: | |
81 | AliTPCtrackerSector(): | |
82 | fN(0), | |
83 | fRow(0), | |
84 | fAlpha(0.), | |
85 | fAlphaShift(0.), | |
86 | fPadPitchWidth(0.), | |
87 | fPadPitchLength(0.), | |
88 | f1PadPitchLength(0.), | |
aa7f1a5a | 89 | f2PadPitchLength(0.) {} |
9350f379 | 90 | ~AliTPCtrackerSector() { delete[] fRow; } |
91 | AliTPCtrackerRow& operator[](Int_t i) const { return *(fRow+i); } | |
92 | Int_t GetNRows() const { return fN; } | |
93 | void Setup(const AliTPCParam *par, Int_t flag); | |
94 | Double_t GetX(Int_t l) const {return fRow[l].GetX();} | |
95 | Double_t GetMaxY(Int_t l) const { | |
96 | return GetX(l)*TMath::Tan(0.5*GetAlpha()); | |
97 | } | |
98 | Double_t GetAlpha() const {return fAlpha;} | |
99 | Double_t GetAlphaShift() const {return fAlphaShift;} | |
100 | //Int_t GetFirst(){return fFirstRow;} | |
101 | Int_t GetRowNumber(Double_t x) const; | |
102 | Double_t GetPadPitchWidth() const {return fPadPitchWidth;} | |
103 | Double_t GetPadPitchLength() const {return fPadPitchLength;} | |
104 | Double_t GetPadPitchLength(Float_t x) const {return (x<200) ? fPadPitchLength:f2PadPitchLength ;} | |
105 | ||
aa7f1a5a | 106 | void InsertCluster(AliTPCclusterMI *cl, Int_t size, const AliTPCParam *par); |
107 | ||
9350f379 | 108 | private: |
109 | AliTPCtrackerSector & operator=(const AliTPCtrackerSector & ); | |
110 | AliTPCtrackerSector(const AliTPCtrackerSector &/*s*/); //dummy copy contructor | |
111 | Int_t fN; //number of pad rows | |
112 | //Int_t fFirstRow; //offset | |
113 | AliTPCtrackerRow *fRow; //array of pad rows | |
114 | Double_t fAlpha; //opening angle | |
115 | Double_t fAlphaShift; //shift angle; | |
116 | Double_t fPadPitchWidth; //pad pitch width | |
117 | Double_t fPadPitchLength; //pad pitch length | |
118 | Double_t f1PadPitchLength; //pad pitch length | |
119 | Double_t f2PadPitchLength; //pad pitch length | |
120 | ClassDef(AliTPCtrackerSector,1) | |
121 | }; | |
122 | ||
123 | ||
124 | ||
125 | #endif | |
126 | ||
127 |