]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 1 | #ifndef ALIMUONSEGMENTATIONV1_H |
2 | #define ALIMUONSEGMENTATIONV1_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 | ||
a30a000f | 8 | #include "AliSegmentation.h" |
a9e2aefa | 9 | |
10 | const Int_t kNzone = 3; // Specific for chamber with equal pads | |
11 | const Int_t kNzonem1 = 2; // kNzone - 1 | |
12 | const Int_t kNzoneCUT = 30; | |
13 | ||
14 | class AliMUONSegmentationV1 : | |
a30a000f | 15 | public AliSegmentation { |
a9e2aefa | 16 | public: |
17 | AliMUONSegmentationV1(); | |
18 | AliMUONSegmentationV1(const AliMUONSegmentationV1 & segmentation); | |
19 | virtual ~AliMUONSegmentationV1(){} | |
20 | // | |
21 | // Set Chamber Segmentation Parameters | |
22 | // Set Number of zones | |
23 | void SetNzone(Int_t N) {fNzone = N;}; | |
24 | // Pad size Dx*Dy | |
25 | virtual void SetPadSize(Float_t p1, Float_t p2); | |
26 | // Set Sense wire offset | |
27 | void SetSensOffset(Float_t Offset) {fSensOffset = Offset;}; | |
28 | // Anod Pitch | |
29 | void SetDAnod(Float_t D) {fDAnod = D;}; | |
30 | // max x and y for the zone in number of pads units | |
31 | //(WARNING : first pad is labelled 0 !!) | |
32 | virtual void AddCut(Int_t Zone, Int_t nX, Int_t nY); | |
33 | // Apply default cut | |
34 | virtual void DefaultCut(void); | |
35 | // | |
36 | // Initialisation | |
d81db581 | 37 | virtual void Init(Int_t id); |
a9e2aefa | 38 | // |
39 | // Get member data | |
40 | // | |
41 | // Pad size in x | |
94de3818 | 42 | virtual Float_t Dpx() const {return fDpx;} |
a9e2aefa | 43 | // Pad size in y |
94de3818 | 44 | virtual Float_t Dpy() const {return fDpy;} |
a9e2aefa | 45 | // Pad size in x by Sector |
f7b62f08 | 46 | virtual Float_t Dpx(Int_t /*i*/) const {return fDpx;} |
a9e2aefa | 47 | // Pad size in y by Sector |
f7b62f08 | 48 | virtual Float_t Dpy(Int_t /*i*/)const {return fDpy;} |
a9e2aefa | 49 | // Maximum number of Pads in x |
94de3818 | 50 | virtual Int_t Npx() const {return fNpx;} |
a9e2aefa | 51 | // Maximum number of Pads in y |
94de3818 | 52 | virtual Int_t Npy() const {return fNpy;} |
a9e2aefa | 53 | // |
54 | // Get the zone of segmentation | |
55 | virtual Int_t GetZone(Float_t X, Float_t Y); | |
56 | virtual Int_t GetZone(Int_t X, Int_t Y); | |
57 | // | |
58 | // Transform from pad (wire) to real coordinates and vice versa | |
59 | virtual Int_t GetiAnod(Float_t xhit); | |
60 | // Anod wire coordinate closest to xhit | |
c3eff6ad | 61 | virtual Float_t GetAnod(Float_t xhit) const; |
a9e2aefa | 62 | // Transform from pad to real coordinates |
a30a000f | 63 | virtual void GetPadI(Float_t x ,Float_t y , Int_t &ix, Int_t &iy); |
f7b62f08 | 64 | virtual void GetPadI(Float_t x, Float_t y , Float_t /*z*/, Int_t &ix, Int_t &iy) |
a30a000f | 65 | {GetPadI(x, y, ix, iy);} |
a9e2aefa | 66 | // Transform from real to pad coordinates |
a30a000f | 67 | virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y); |
68 | virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z) | |
3e1872ed | 69 | {z=fZ; GetPadC(ix, iy, x , y);} |
a9e2aefa | 70 | // Set pad position |
71 | virtual void SetPad(Int_t ix, Int_t iy); | |
72 | // Set hit position | |
73 | virtual void SetHit(Float_t xhit, Float_t yhit); | |
f7b62f08 | 74 | virtual void SetHit(Float_t xhit, Float_t yhit, Float_t /*zhit*/) |
24b005db | 75 | {SetHit(xhit, yhit);} |
a9e2aefa | 76 | // |
77 | // Iterate over pads | |
78 | // Set Pad coordinates | |
79 | virtual void SetPadCoord(Int_t iX, Int_t iY); | |
80 | // Initialiser | |
81 | virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy); | |
f7b62f08 | 82 | virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t /*zhit*/, Float_t dx, Float_t dy) |
24b005db | 83 | {FirstPad(xhit, yhit, dx, dy);} |
a9e2aefa | 84 | // Stepper |
85 | virtual void NextPad(); | |
86 | // Condition | |
87 | virtual Int_t MorePads(); | |
88 | // Get next neighbours | |
89 | virtual void Neighbours // implementation Neighbours function | |
90 | (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist); | |
91 | virtual void NeighboursDiag // with diagonal elements | |
92 | (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist); | |
93 | virtual void NeighboursNonDiag // without diagonal elements | |
94 | (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist); | |
95 | void CleanNeighbours(Int_t* Nlist, Int_t *Xlist, Int_t *Ylist); | |
96 | // | |
97 | // Current pad cursor during disintegration | |
98 | // x-coordinate | |
99 | virtual Int_t Ix(Int_t trueX, Int_t trueY); | |
100 | virtual Int_t Ix(); | |
101 | // y-coordinate | |
c3eff6ad | 102 | virtual Int_t Iy() {return fIy;} |
a9e2aefa | 103 | // current sector |
104 | virtual Int_t ISector(); | |
105 | // calculate sector from pad coordinates | |
f7b62f08 | 106 | virtual Int_t Sector(Int_t /*ix*/, Int_t /*iy*/) {return 1;} |
107 | virtual Int_t Sector(Float_t /*x*/, Float_t /*y*/) {return 1;} | |
a9e2aefa | 108 | // Position of pad in perellel read-out |
109 | virtual Int_t IsParallel2(Int_t iX, Int_t iY); | |
110 | virtual Int_t IsParallel3(Int_t iX, Int_t iY); | |
111 | // Number of pads read in parallel | |
112 | virtual Int_t NParallel2(Int_t iX, Int_t iY); | |
113 | virtual Int_t NParallel3(Int_t iX, Int_t iY); | |
114 | // | |
115 | // Number of pads read in parallel and offset to add to x | |
116 | virtual void GetNParallelAndOffset(Int_t iX, Int_t iY, | |
117 | Int_t *Nparallel, Int_t *Offset); | |
118 | // Minimum distance between 1 pad and a position | |
119 | virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *Offset); | |
120 | // | |
121 | // Signal Generation Condition during Stepping | |
122 | Int_t SigGenCond(Float_t x, Float_t y, Float_t z); | |
123 | // Initialise signal generation at coord (x,y,z) | |
124 | void SigGenInit(Float_t x, Float_t y, Float_t z); | |
125 | // Test points for auto calibration | |
c3eff6ad | 126 | void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const; |
a9e2aefa | 127 | // Current integration limits |
128 | virtual void IntegrationLimits | |
129 | (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2); | |
130 | // Draw the segmentation zones | |
c3eff6ad | 131 | virtual void Draw(const char * = "") const {} |
a9e2aefa | 132 | // Function for systematic corrections |
133 | // Set the correction function | |
f7b62f08 | 134 | virtual void SetCorrFunc(Int_t /*dum*/, TF1* func) {fCorr=func;} |
a9e2aefa | 135 | // Get the correction function |
c3eff6ad | 136 | virtual TF1* CorrFunc(Int_t) const {return fCorr;} |
a9e2aefa | 137 | // |
138 | AliMUONSegmentationV1& operator=(const AliMUONSegmentationV1& rhs); | |
139 | ClassDef(AliMUONSegmentationV1,1) // Implementation of the Lyon type chamber segmentation with parallel read-out | |
140 | protected: | |
141 | // | |
142 | // Implementation of the segmentation data | |
143 | // Version This models rectangular pads with the same dimensions all | |
144 | // over the cathode plane but let the possibilit for different design. | |
145 | // | |
146 | // geometry | |
147 | Int_t fNzone; // Number of differents sensitive zones | |
148 | Float_t fDpx; // X pad width | |
149 | Float_t fDpy; // Y pad width | |
150 | Int_t fNZoneCut[kNzonem1]; // Number of cuts for given zone | |
151 | Int_t fZoneX[kNzonem1][kNzoneCUT]; // X descriptor of zone segmentations | |
152 | Int_t fZoneY[kNzonem1][kNzoneCUT]; // Y descriptor of zone segmentations | |
153 | Float_t frSensMax2; // square of maximum sensitive radius | |
154 | Float_t frSensMin2; // square of minimum sensitive radius | |
155 | Int_t fNpx; // Maximum number of pads along x | |
156 | Int_t fNpy; // Maximum number of pads along y | |
157 | Float_t fDAnod; // Anod gap | |
158 | Float_t fSensOffset; // Offset of sensitive zone with respect to quadrant (positive) | |
159 | ||
160 | // Chamber region consideres during disintegration (lower left and upper right corner) | |
161 | // | |
ecfa008b | 162 | Int_t fIxmin; // lower left x |
163 | Int_t fIxmax; // lower left y | |
164 | Int_t fIymin; // upper right x | |
165 | Int_t fIymax; // upper right y | |
a9e2aefa | 166 | // |
167 | // Current pad during integration (cursor for disintegration) | |
ecfa008b | 168 | Int_t fIx; // pad coord. x |
169 | Int_t fIy; // pad coord. y | |
170 | Float_t fX; // real coord. x | |
171 | Float_t fY; // real ccord. y | |
a9e2aefa | 172 | // |
173 | // Current pad and wire during tracking (cursor at hit centre) | |
ecfa008b | 174 | Int_t fIxt; // x-position of hit |
175 | Int_t fIyt; // y-position of hit | |
a9e2aefa | 176 | // Reference point to define signal generation condition |
ecfa008b | 177 | Int_t fIwt; // wire number |
178 | Float_t fXt; // x | |
179 | Float_t fYt; // y | |
180 | Float_t fXhit; // x-position of hit | |
181 | Float_t fYhit; // y-position of hit | |
3e1872ed | 182 | Float_t fZ; // z-position of chamber |
a9e2aefa | 183 | |
184 | TF1* fCorr; // correction function | |
185 | }; | |
186 | ||
187 | #endif | |
188 | ||
189 |