]>
Commit | Line | Data |
---|---|---|
5de7d27f | 1 | #ifndef ALIMUONSEGMENTATIONSLAT_H |
2 | #define ALIMUONSEGMENTATIONSLAT_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 | // Segmentation classes for slat modules // | |
10 | // to be used with AluMUONSegmentationSlat // | |
11 | ///////////////////////////////////////////////////// | |
12 | ||
13 | #include "AliSegmentation.h" | |
14 | ||
15 | class TArrayI; | |
16 | class TObjArray; | |
17 | class AliMUONSegmentationSlatModule; | |
18 | class AliMUONChamber; | |
19 | ||
20 | ||
21 | class AliMUONSegmentationSlat : | |
22 | public AliSegmentation { | |
23 | public: | |
24 | AliMUONSegmentationSlat(); | |
e9e4cdf2 | 25 | AliMUONSegmentationSlat(Int_t nsec); |
c2c0190f | 26 | virtual ~AliMUONSegmentationSlat(); |
5de7d27f | 27 | // |
28 | // Set Chamber Segmentation Parameters | |
29 | // | |
30 | // Pad size Dx*Dy | |
31 | virtual void SetPadSize(Float_t p1, Float_t p2); | |
32 | // Anod Pitch | |
33 | virtual void SetDAnod(Float_t D) {fWireD = D;}; | |
34 | ||
35 | // Anod wire coordinate closest to xhit | |
36 | virtual Float_t GetAnod(Float_t xhit) const; | |
37 | ||
38 | void SetPadDivision(Int_t ndiv[4]); | |
39 | ||
40 | // Transform from pad to real coordinates | |
41 | virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy); | |
42 | // Transform from real to pad coordinates | |
43 | virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z); | |
44 | // Initialisation | |
45 | virtual void Init(Int_t chamber); | |
46 | // | |
47 | // Get member data | |
48 | // | |
49 | // | |
50 | // Pad size in x | |
51 | virtual Float_t Dpx() const {return fDpx;} | |
52 | ||
53 | // Pad size in y | |
54 | virtual Float_t Dpy() const {return fDpy;} | |
55 | // Pad size in x by Sector | |
56 | virtual Float_t Dpx(Int_t isec) const; | |
57 | // Pad size in y by Sector | |
58 | virtual Float_t Dpy(Int_t isec) const; | |
59 | // Maximum number of Pads in x | |
60 | virtual Int_t Npx() const {return fNpx;} | |
61 | // Maximum number of Pads in y | |
62 | virtual Int_t Npy() const {return fNpy;} | |
63 | // | |
64 | virtual void SetPad(Int_t ix,Int_t iy); | |
65 | ||
66 | virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit); | |
67 | // | |
68 | // Iterate over pads | |
69 | // Initialiser | |
70 | virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy); | |
71 | // Stepper | |
72 | virtual void NextPad(); | |
73 | // Condition | |
74 | virtual Int_t MorePads(); | |
75 | // Get next neighbours | |
76 | virtual void Neighbours | |
77 | (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]); | |
78 | virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *dummy) {return 0.;} | |
79 | virtual void GetNParallelAndOffset(Int_t iX, Int_t iY, | |
80 | Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;} | |
81 | // | |
82 | // Current Pad during Integration | |
83 | // x-coordinate | |
84 | virtual Int_t Ix(); | |
85 | // y-coordinate | |
86 | virtual Int_t Iy(); | |
87 | // current sector | |
88 | virtual Int_t ISector(); | |
89 | // calculate sector from pad coordinates | |
90 | virtual Int_t Sector(Int_t ix, Int_t iy); | |
91 | // | |
92 | // Signal Generation Condition during Stepping | |
93 | virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z); | |
94 | // Initialise signal generation at coord (x,y,z) | |
95 | virtual void SigGenInit(Float_t x, Float_t y, Float_t z); | |
96 | ||
97 | // | |
98 | // Integration | |
99 | // Current integration limits | |
100 | virtual void IntegrationLimits | |
101 | (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2); | |
102 | // | |
103 | // Class specific methods | |
104 | virtual void SetNSlats(Int_t nslats) {fNSlats = nslats;} | |
105 | virtual void SetShift(Float_t shift) {fShift = shift;} | |
106 | virtual void SetNPCBperSector(Int_t *npcb); | |
107 | virtual void SetSlatXPositions(Float_t *xpos); | |
2b202c2e | 108 | virtual void SetSlatYPosition(Float_t ypos) {fYPosOrigin = ypos;} |
5de7d27f | 109 | virtual AliMUONSegmentationSlatModule* Slat(Int_t index) const; |
110 | ||
111 | // Not used | |
112 | // Test points for auto calibration | |
113 | virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const {;} | |
114 | // Draw the segmentation zones | |
aaf4addd | 115 | virtual void Draw(const char *opt = "") const; |
116 | ||
5de7d27f | 117 | |
118 | // Function for systematic corrections | |
119 | // Set the correction function | |
120 | virtual void SetCorrFunc(Int_t, TF1*) {;} | |
121 | ||
122 | // Get the correction Function | |
123 | virtual TF1* CorrFunc(Int_t) const {return NULL;} | |
124 | protected: | |
125 | ||
126 | virtual void GlobalToLocal( | |
127 | Float_t x, Float_t y, Float_t z, Int_t &islat, Float_t &xlocal, Float_t &ylocal); | |
128 | virtual void GlobalToLocal( | |
129 | Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal); | |
130 | ||
131 | virtual void LocalToGlobal( | |
132 | Int_t islat, Float_t xlocal, Float_t ylocal, Float_t &x, Float_t &y, Float_t &z); | |
133 | virtual void LocalToGlobal( | |
134 | Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy); | |
2b202c2e | 135 | virtual void SetSymmetry(Int_t ix); |
136 | virtual void SetSymmetry(Float_t x); | |
5de7d27f | 137 | // Factory method for associated slat module class |
138 | virtual AliMUONSegmentationSlatModule* CreateSlatModule(); | |
139 | ||
140 | protected: | |
141 | ||
142 | AliMUONChamber* fChamber; // Parent Chamber | |
aaf4addd | 143 | Int_t fId; // Identifier |
5de7d27f | 144 | // |
145 | // Geometry | |
146 | // | |
147 | Float_t fWireD; // Wire Pitch | |
148 | Int_t fNSlats; // Number of slats | |
2b202c2e | 149 | Int_t fPcb[15][4]; // PcbSegmentation |
150 | Float_t fXPosition[15]; // x-position of slats | |
151 | Float_t fYPosOrigin; // y-Position of lowest slat | |
152 | Float_t fYPosition[15]; // y-position of slats | |
153 | Float_t fSlatX[15]; // Slat x-dimension | |
5de7d27f | 154 | Float_t fSlatY; // Slat y-dimension |
155 | Float_t fDpx; // Pad size x | |
156 | Float_t fDpy; // Pad size y | |
157 | Int_t fNpx; // maximum number of pads in x | |
158 | Int_t fNpy; // maximum number of pads in y | |
2b202c2e | 159 | Int_t fSym; // signs for symmetry trafo |
5de7d27f | 160 | Float_t fShift; // Half overlap of pad planes |
161 | Float_t fDz; // Half distance between slat planes | |
162 | ||
163 | TArrayI* fNDiv; // Pad size division | |
164 | // Slats | |
aaf4addd | 165 | TObjArray* fSlats; // Array of Slats |
5de7d27f | 166 | // Proxy data |
aaf4addd | 167 | AliMUONSegmentationSlatModule* fCurrentSlat; // Pointer to current slat |
168 | Int_t fSlatIndex; // Current slat index | |
169 | ClassDef(AliMUONSegmentationSlat,1) // Segmentation for Muon Chamber built from Slat Modules | |
5de7d27f | 170 | }; |
171 | ||
172 | ||
173 | #endif | |
174 | ||
175 | ||
176 | ||
177 | ||
178 | ||
179 | ||
180 | ||
181 | ||
182 |