]>
Commit | Line | Data |
---|---|---|
ba030c0e | 1 | #ifndef ALI_MUON_ST1_SEGMENTATION_H |
2 | #define ALI_MUON_ST1_SEGMENTATION_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
30178c30 | 8 | // Revision of includes 07/05/2004 |
ba030c0e | 9 | |
10 | // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay | |
11 | // | |
12 | // Class AliMUONSt1Segmentation | |
13 | // ----------------------------- | |
14 | // Segmentation for MUON station 1 using the external | |
15 | // mapping package | |
16 | ||
5f91c9e8 | 17 | #include "AliMpPlaneType.h" |
ba030c0e | 18 | |
19 | #include "AliSegmentation.h" | |
20 | ||
21 | class TObjArray; | |
22 | ||
5f91c9e8 | 23 | class AliMpPlane; |
24 | class AliMpPlaneSegmentation; | |
25 | class AliMpVPadIterator; | |
3c25381f | 26 | class AliMpPad; |
ba030c0e | 27 | |
28 | class AliMUONChamber; | |
29 | ||
30 | class AliMUONSt1Segmentation : public AliSegmentation | |
31 | { | |
32 | public: | |
5f91c9e8 | 33 | AliMUONSt1Segmentation(const AliMpPlaneType planeType); |
ba030c0e | 34 | AliMUONSt1Segmentation(); |
35 | ||
36 | virtual ~AliMUONSt1Segmentation(); | |
37 | ||
38 | // | |
39 | // methods derived from base class | |
40 | // | |
41 | ||
42 | // Set Chamber Segmentation Parameters | |
43 | // | |
44 | virtual void SetPadSize(Float_t p1, Float_t p2); | |
45 | // Pad size Dx*Dy | |
46 | virtual void SetDAnod(Float_t D); | |
47 | // Anode Pitch | |
48 | ||
49 | // Transform from pad (wire) to real coordinates and vice versa | |
50 | // | |
51 | virtual Float_t GetAnod(Float_t xhit) const; | |
52 | // Anode wire coordinate closest to xhit | |
53 | virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t& ix, Int_t& iy); | |
54 | virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy) ; | |
55 | // Transform from pad to real coordinates | |
56 | virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y, Float_t& z); | |
57 | virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y); | |
58 | // Transform from real to pad coordinates | |
59 | ||
60 | ||
61 | // Initialisation | |
62 | // | |
63 | virtual void Init(Int_t chamber); | |
64 | ||
65 | // Get member data | |
66 | // | |
67 | virtual Float_t Dpx() const; | |
68 | virtual Float_t Dpy() const; | |
69 | // Pad size in x, y | |
3c25381f | 70 | virtual Float_t Dpx(Int_t isector) const; |
71 | virtual Float_t Dpy(Int_t isector) const; | |
ba030c0e | 72 | // Pad size in x, y by Sector |
73 | virtual Int_t Npx() const; | |
74 | virtual Int_t Npy() const; | |
75 | // Maximum number of Pads in y | |
76 | ||
3c25381f | 77 | virtual void SetPad(Int_t ix, Int_t iy); |
ba030c0e | 78 | // Set pad position |
3c25381f | 79 | virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit); |
ba030c0e | 80 | // Set hit position |
81 | ||
82 | // Iterate over pads | |
83 | // | |
84 | virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, | |
85 | Float_t dx, Float_t dy); | |
86 | virtual void NextPad(); | |
87 | virtual Int_t MorePads(); | |
88 | ||
89 | virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, | |
90 | Float_t X, Float_t Y, Int_t* dummy) ; | |
91 | // Distance between 1 pad and a position | |
92 | virtual void GetNParallelAndOffset(Int_t iX, Int_t iY, | |
93 | Int_t* Nparallel, Int_t* Offset); | |
94 | // Number of pads read in parallel and offset to add to x | |
95 | // (specific to LYON, but mandatory for display) | |
96 | virtual void Neighbours(Int_t iX, Int_t iY, | |
97 | Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]); | |
98 | // Get next neighbours | |
99 | ||
100 | // Current values | |
101 | // | |
102 | virtual Int_t Ix(); | |
103 | virtual Int_t Iy(); | |
104 | // Current pad cursor during disintegration | |
105 | // x, y-coordinate | |
106 | virtual Int_t ISector(); | |
107 | // current sector | |
108 | ||
109 | virtual Int_t Sector(Int_t ix, Int_t iy); | |
110 | virtual Int_t Sector(Float_t x, Float_t y); | |
111 | // calculate sector from pad coordinates | |
112 | ||
113 | virtual void IntegrationLimits(Float_t& x1, Float_t& x2, | |
114 | Float_t& y1, Float_t& y2); | |
115 | // Current integration limits | |
116 | ||
117 | // Signal Generation | |
118 | // | |
119 | virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z); | |
120 | // Signal Generation Condition during Stepping | |
121 | virtual void SigGenInit(Float_t x, Float_t y, Float_t z); | |
122 | // Initialise signal generation at coord (x,y,z) | |
123 | ||
124 | ||
125 | virtual void GiveTestPoints(Int_t& n, Float_t* x, Float_t* y) const; | |
126 | // Test points for auto calibration | |
127 | virtual void Draw(const char *opt = "") const; | |
128 | // Draw the segmentation zones | |
129 | ||
130 | // Function for systematic corrections | |
131 | // | |
3c25381f | 132 | virtual void SetCorrFunc(Int_t isec, TF1* func); |
ba030c0e | 133 | // Set the correction function |
3c25381f | 134 | virtual TF1* CorrFunc(Int_t isec) const; |
ba030c0e | 135 | // Get the correction Function |
136 | ||
30178c30 | 137 | protected: |
138 | AliMUONSt1Segmentation(const AliMUONSt1Segmentation& rhs); | |
139 | ||
ba030c0e | 140 | // operators |
141 | AliMUONSt1Segmentation& operator=(const AliMUONSt1Segmentation & rhs); | |
142 | ||
30178c30 | 143 | private: |
ba030c0e | 144 | // methods |
5f91c9e8 | 145 | void UpdateCurrentPadValues(const AliMpPad& pad); |
ba030c0e | 146 | |
147 | // constants | |
148 | static const Float_t fgkWireD; // default wire pitch | |
149 | static const Float_t fgkLengthUnit;// conversion between length units | |
150 | // from mapping (mm) to AliRoot (cm) | |
151 | ||
152 | // data members | |
153 | ||
154 | // From mapping | |
155 | // | |
5f91c9e8 | 156 | AliMpPlane* fPlane; // plane (from mapping) |
157 | AliMpPlaneSegmentation* fPlaneSegmentation;// plane segmantation (from mapping) | |
158 | AliMpVPadIterator* fPlaneIterator; // ! iterator over pads | |
ba030c0e | 159 | |
160 | // Wire pitch | |
161 | // | |
162 | Float_t fWireD; // wire pitch | |
163 | // (smaller distance between anode wires) | |
164 | ||
165 | // Reference to mother chamber | |
166 | // | |
167 | AliMUONChamber* fChamber; // ! Reference to mother chamber | |
168 | Int_t fId; // Identifier | |
169 | Float_t fRmin; // inner radius | |
170 | Float_t fRmax; // outer radius | |
171 | Float_t fZ; // z-position of chamber | |
172 | ||
173 | // Current pad during integration (cursor for disintegration) | |
174 | // | |
175 | Int_t fIx; // ! pad coord. x | |
176 | Int_t fIy; // ! pad coord. y | |
177 | Float_t fX; // ! real coord. x | |
178 | Float_t fY; // ! real ccord. y | |
179 | Int_t fSector; // ! Current sector | |
180 | ||
181 | // Current pad and wire during tracking (cursor at hit centre) | |
182 | // | |
183 | Float_t fXhit; // ! x-position of hit | |
184 | Float_t fYhit; // ! y-position of hit | |
185 | ||
186 | // Reference point to define signal generation condition | |
187 | // | |
188 | Int_t fIxt; // ! pad coord. x | |
189 | Int_t fIyt; // ! pad coord. y | |
190 | Int_t fIwt; // ! wire number | |
191 | Float_t fXt; // ! x | |
192 | Float_t fYt; // ! y | |
193 | ||
194 | TObjArray* fCorrA; // ! Array of correction functions | |
195 | ||
196 | ClassDef(AliMUONSt1Segmentation,1) // Station1 segmentation | |
197 | }; | |
198 | ||
199 | #endif //ALI_MUON_ST1_SEGMENTATION_H | |
200 | ||
201 | ||
202 | ||
203 | ||
204 | ||
205 | ||
206 | ||
207 |