]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/Rec/AliTPCtrackerSector.h
ATO-17
[u/mrichter/AliRoot.git] / TPC / Rec / AliTPCtrackerSector.h
CommitLineData
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;
19class AliTPCParam;
20class TTreeSRedirector;
21
22
23
24class AliTPCtrackerRow : public TObject{
25public:
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;}
bfa00fba 46 TClonesArray* GetClusters1() const {return fClusters1;}
47 TClonesArray* GetClusters2() const {return fClusters2;}
48 void SetCluster1(Int_t i, const AliTPCclusterMI &cl);
49 void SetCluster2(Int_t i, const AliTPCclusterMI &cl);
9a836cc2 50
51 AliTPCclusterMI* GetCluster1(Int_t i) const {return (fClusters1)?(AliTPCclusterMI*) fClusters1->At(i):NULL;}
52 AliTPCclusterMI* GetCluster2(Int_t i) const {return (fClusters2)?(AliTPCclusterMI*) fClusters2->At(i):NULL;}
53
9350f379 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
59private:
60 AliTPCtrackerRow & operator=(const AliTPCtrackerRow & );
61 AliTPCtrackerRow(const AliTPCtrackerRow& /*r*/); //dummy copy constructor
62 Float_t fDeadZone; // the width of the dead zone
bfa00fba 63 TClonesArray *fClusters1; //array with clusters 1
9350f379 64 Int_t fN1; //number of clusters on left side
bfa00fba 65 TClonesArray *fClusters2; //array with clusters 2
9350f379 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 **********************
79class 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;}
9a836cc2 101 Int_t GetNClInSector(Int_t side);
9350f379 102 Int_t GetRowNumber(Double_t x) const;
103 Double_t GetPadPitchWidth() const {return fPadPitchWidth;}
104 Double_t GetPadPitchLength() const {return fPadPitchLength;}
105 Double_t GetPadPitchLength(Float_t x) const {return (x<200) ? fPadPitchLength:f2PadPitchLength ;}
106
aa7f1a5a 107 void InsertCluster(AliTPCclusterMI *cl, Int_t size, const AliTPCParam *par);
108
5576d489 109 Int_t GetNClInSector(Int_t side) const;
110 Int_t GetNClUsedInSector(Int_t side) const;
111
9350f379 112 private:
113 AliTPCtrackerSector & operator=(const AliTPCtrackerSector & );
114 AliTPCtrackerSector(const AliTPCtrackerSector &/*s*/); //dummy copy contructor
115 Int_t fN; //number of pad rows
116 //Int_t fFirstRow; //offset
117 AliTPCtrackerRow *fRow; //array of pad rows
118 Double_t fAlpha; //opening angle
119 Double_t fAlphaShift; //shift angle;
120 Double_t fPadPitchWidth; //pad pitch width
121 Double_t fPadPitchLength; //pad pitch length
122 Double_t f1PadPitchLength; //pad pitch length
123 Double_t f2PadPitchLength; //pad pitch length
124 ClassDef(AliTPCtrackerSector,1)
125};
126
127
128
129#endif
130
131