]>
Commit | Line | Data |
---|---|---|
a713db22 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | //////////////////////////////////////////////////////////// | |
17 | // Factory for muon chambers, segmentations and response // | |
18 | //////////////////////////////////////////////////////////// | |
19 | ||
20 | /* $Id$ */ | |
21 | ||
22 | #include "AliMUONFactoryV2.h" | |
23 | #include "AliRun.h" | |
24 | #include "AliSegmentation.h" | |
25 | #include "AliLog.h" | |
26 | ||
27 | #include "AliMUON.h" | |
28 | #include "AliMUONConstants.h" | |
29 | #include "AliMUONTriggerConstants.h" | |
30 | #include "AliMUONChamber.h" | |
31 | #include "AliMUONResponseV0.h" | |
32 | #include "AliMUONGeometryModule.h" | |
33 | #include "AliMUONGeometryStore.h" | |
34 | #include "AliMUONGeometrySegmentation.h" | |
35 | #include "AliMUONSt12QuadrantSegmentation.h" | |
36 | #include "AliMUONSt345SlatSegmentation.h" | |
37 | #include "AliMUONTriggerSegmentation.h" | |
38 | #include "AliMUONResponseTrigger.h" | |
39 | ||
40 | ClassImp(AliMUONFactoryV2) | |
41 | ||
42 | //__________________________________________________________________________ | |
43 | AliMUONFactoryV2::AliMUONFactoryV2() | |
44 | : AliMUONFactory(), | |
45 | fMUON(0), | |
46 | fResponse0(0) | |
47 | { | |
48 | // FactoryV2 inherite from Factory for switching in AliMUONv1::Init() | |
49 | // to be changed when old segmentation will be removed. | |
50 | } | |
51 | ||
52 | //__________________________________________________________________________ | |
53 | AliMUONFactoryV2::AliMUONFactoryV2(const AliMUONFactoryV2& rhs) | |
54 | : AliMUONFactory(rhs) | |
55 | { | |
56 | // Protected copy constructor | |
57 | ||
58 | AliFatal("Not implemented."); | |
59 | } | |
60 | ||
61 | //__________________________________________________________________________ | |
62 | ||
63 | AliMUONFactoryV2::~AliMUONFactoryV2() | |
64 | { | |
65 | // | |
66 | } | |
67 | ||
68 | //__________________________________________________________________________ | |
69 | AliMUONFactoryV2& AliMUONFactoryV2::operator=(const AliMUONFactoryV2& rhs) | |
70 | { | |
71 | // Protected assignement operator | |
72 | ||
73 | if (this == &rhs) return *this; | |
74 | ||
75 | AliFatal("Not implemented."); | |
76 | ||
77 | return *this; | |
78 | } | |
79 | ||
80 | //__________________________________________________________________________ | |
81 | void AliMUONFactoryV2::BuildCommon() | |
82 | { | |
83 | // | |
84 | // Construct the default response. | |
85 | // | |
86 | ||
87 | // Default response: 5 mm of gas | |
88 | fResponse0 = new AliMUONResponseV0; | |
89 | fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085) | |
90 | fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840) | |
91 | fResponse0->SetPitch(AliMUONConstants::Pitch()); // anode-cathode distance | |
92 | fResponse0->SetSigmaIntegration(10.); | |
93 | fResponse0->SetChargeSlope(10); | |
94 | fResponse0->SetChargeSpread(0.18, 0.18); | |
95 | fResponse0->SetMaxAdc(4096); | |
96 | fResponse0->SetSaturation(3000); | |
97 | fResponse0->SetZeroSuppression(6); | |
98 | } | |
99 | ||
100 | //__________________________________________________________________________ | |
101 | void AliMUONFactoryV2::BuildStation1() | |
102 | { | |
103 | //-------------------------------------------------------- | |
104 | // Configuration for Chamber TC1/2 (Station 1) ---------- | |
105 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
106 | ||
107 | ||
108 | // Response for 4 mm of gas (station 1) | |
109 | // automatic consistency with width of sensitive medium in CreateGeometry ???? | |
110 | AliMUONResponseV0* responseSt1 = new AliMUONResponseV0; | |
111 | // Mathieson parameters from L.Kharmandarian's thesis, page 190 | |
112 | responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900) | |
113 | responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700) | |
114 | responseSt1->SetPitch(AliMUONConstants::PitchSt1()); // anode-cathode distance | |
115 | responseSt1->SetSigmaIntegration(10.); | |
116 | // ChargeSlope larger to compensate for the smaller anode-cathode distance | |
117 | // and keep the same most probable ADC channel for mip's | |
118 | responseSt1->SetChargeSlope(62.5); | |
119 | // assumed proportionality to anode-cathode distance for ChargeSpread | |
120 | responseSt1->SetChargeSpread(0.144, 0.144); | |
121 | responseSt1->SetMaxAdc(4096); | |
122 | responseSt1->SetSaturation(3000); | |
123 | responseSt1->SetZeroSuppression(6); | |
124 | ||
125 | // Quadrant segmentations: | |
126 | AliMUONSt12QuadrantSegmentation* bendSt1 | |
127 | = new AliMUONSt12QuadrantSegmentation(kStation1, kBendingPlane); | |
128 | AliMUONSt12QuadrantSegmentation* nonbendSt1 | |
129 | = new AliMUONSt12QuadrantSegmentation(kStation1, kNonBendingPlane); | |
130 | ||
131 | AliMUONGeometrySegmentation* segmentation[2]; | |
132 | ||
133 | for (Int_t chamber = 0; chamber < 2; chamber++) { | |
134 | ||
135 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
136 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
137 | ||
138 | // id detection elt for chamber 1 | |
139 | Int_t id0 = (chamber+1)*100; | |
140 | ||
141 | //-------------------------------------------------------- | |
142 | // Configuration for Chamber TC1/2 (Station 1) ---------- | |
143 | ||
144 | ||
145 | fMUON->SetNsec(chamber,2); | |
146 | ||
147 | // cathode 0 | |
148 | segmentation[0]->Add(id0, bendSt1); | |
149 | segmentation[0]->Add(id0 + 1, nonbendSt1); | |
150 | segmentation[0]->Add(id0 + 50, bendSt1); | |
151 | segmentation[0]->Add(id0 + 51, nonbendSt1); | |
152 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); | |
153 | ||
154 | // cathode 1 | |
155 | segmentation[1]->Add(id0, nonbendSt1); | |
156 | segmentation[1]->Add(id0 + 1, bendSt1); | |
157 | segmentation[1]->Add(id0 + 50, nonbendSt1); | |
158 | segmentation[1]->Add(id0 + 51, bendSt1); | |
159 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); | |
160 | ||
161 | fMUON->SetResponseModel(chamber, responseSt1); // special response | |
162 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
163 | ||
164 | } | |
165 | } | |
166 | ||
167 | //__________________________________________________________________________ | |
168 | void AliMUONFactoryV2::BuildStation2() | |
169 | { | |
170 | // | |
171 | //-------------------------------------------------------- | |
172 | // Configuration for Chamber TC3/4 (Station 2) ----------- | |
173 | ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
174 | ||
175 | ||
176 | // Quadrant segmentations: | |
177 | AliMUONSt12QuadrantSegmentation* bendSt2 | |
178 | = new AliMUONSt12QuadrantSegmentation(kStation2, kBendingPlane); | |
179 | AliMUONSt12QuadrantSegmentation* nonbendSt2 | |
180 | = new AliMUONSt12QuadrantSegmentation(kStation2, kNonBendingPlane); | |
181 | ||
182 | AliMUONGeometrySegmentation* segmentation[2]; | |
183 | ||
184 | for (Int_t chamber = 2; chamber < 4; chamber++) { | |
185 | ||
186 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
187 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
188 | ||
189 | // id detection elt for chamber 1 | |
190 | Int_t id0 = (chamber+1)*100; | |
191 | ||
192 | //-------------------------------------------------------- | |
193 | // Configuration for Chamber TC3/4 (Station 2) ---------- | |
194 | ||
195 | ||
196 | fMUON->SetNsec(chamber,2); | |
197 | ||
198 | // cathode 0 | |
199 | segmentation[0]->Add(id0, bendSt2); | |
200 | segmentation[0]->Add(id0 + 1, nonbendSt2); | |
201 | segmentation[0]->Add(id0 + 50, bendSt2); | |
202 | segmentation[0]->Add(id0 + 51, nonbendSt2); | |
203 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); | |
204 | ||
205 | // cathode 1 | |
206 | segmentation[1]->Add(id0, nonbendSt2); | |
207 | segmentation[1]->Add(id0 + 1, bendSt2); | |
208 | segmentation[1]->Add(id0 + 50, nonbendSt2); | |
209 | segmentation[1]->Add(id0 + 51, bendSt2); | |
210 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); | |
211 | ||
212 | fMUON->SetResponseModel(chamber, fResponse0); // normal response | |
213 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
214 | ||
215 | } | |
216 | } | |
217 | ||
218 | ||
219 | //__________________________________________________________________________ | |
220 | void AliMUONFactoryV2::BuildStation3() | |
221 | { | |
222 | //-------------------------------------------------------- | |
223 | // Configuration for Chamber TC5/6 (Station 3) ---------- | |
224 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
225 | ||
226 | AliMUONGeometrySegmentation* segmentation[2]; | |
227 | ||
228 | //Slats Segmentations | |
229 | AliMUONSt345SlatSegmentation *slatsegB[4]; // Types of segmentation for St3 | |
230 | AliMUONSt345SlatSegmentation *slatsegNB[4]; | |
231 | // Bending | |
232 | ||
233 | Int_t ndiv[4] ={ 4, 4, 2, 1}; // densities zones | |
234 | for(Int_t i=0; i<4; i++) { | |
235 | slatsegB[i] = new AliMUONSt345SlatSegmentation(1); | |
236 | slatsegB[i]->SetPadSize(10.,0.5); | |
237 | slatsegB[i]->SetPadDivision(ndiv); | |
238 | slatsegB[i]->SetId(1); // Id elt ???? | |
239 | slatsegB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
240 | slatsegNB[i] = new AliMUONSt345SlatSegmentation(0); | |
241 | slatsegNB[i]->SetPadSize(0.713,10.); // Nbending | |
242 | slatsegNB[i]->SetPadDivision(ndiv); | |
243 | slatsegNB[i]->SetId(1); | |
244 | slatsegNB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
245 | } | |
246 | ||
247 | // Type 112200 for 500, 501, 508, 509, 510, 517 | |
248 | // in Ch5 (similar for Ch6) for the futur official numbering | |
249 | // Type 112200 for 503, 504, 505, 555, 554, 553 | |
250 | // in Ch5 (similar for Ch6) actual numbering in the code to be changed in jan05 | |
251 | Int_t n0[4] = { 0, 2, 2, 0 }; | |
252 | slatsegB[0]->SetPcbBoards(n0); | |
253 | slatsegB[0]->Init(0); | |
254 | slatsegNB[0]->SetPcbBoards(n0); | |
255 | slatsegNB[0]->Init(0); | |
256 | ||
257 | // Type 122200 for 502, 507, 511, 516 (similar in Ch6) | |
258 | // for future official numbering of ALICE | |
259 | // Type 122200 for 502, 506, 556, 552 (similiarin Ch6) | |
260 | // for actual numbering in muon code to be changed in jan05 | |
261 | Int_t n1[4] = { 0, 1, 3, 0 }; | |
262 | slatsegB[1]->SetPcbBoards(n1); | |
263 | slatsegB[1]->Init(0); | |
264 | slatsegNB[1]->SetPcbBoards(n1); | |
265 | slatsegNB[1]->Init(0); | |
266 | ||
267 | // Type 222000 for 503, 506, 512, 515 (similar in Ch6) | |
268 | // for future official numbering of ALICE | |
269 | // Type 222000 for 501, 507, 557, 551 (similiarin Ch6) | |
270 | // for actual numbering in muon code to be changed in jan05 | |
271 | Int_t n2[4] = { 0, 0, 3, 0 }; | |
272 | slatsegB[2]->SetPcbBoards(n2); | |
273 | slatsegB[2]->Init(0); | |
274 | slatsegNB[2]->SetPcbBoards(n2); | |
275 | slatsegNB[2]->Init(0); | |
276 | ||
277 | // Type 220000 for 504, 505, 513, 514 (similar in Ch6) | |
278 | // for future official numbering of ALICE | |
279 | // Type 220000 for 500, 508, 558, 550 (similiarin Ch6) | |
280 | // for actual numbering in muon code to be changed in jan05 | |
281 | Int_t n3[4] = { 0, 0, 2, 0 }; | |
282 | slatsegB[3]->SetPcbBoards(n3); | |
283 | slatsegB[3]->Init(0); | |
284 | slatsegNB[3]->SetPcbBoards(n3); | |
285 | slatsegNB[3]->Init(0); | |
286 | ||
287 | for (Int_t chamber = 4; chamber < 6; chamber++) { | |
288 | ||
289 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
290 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
291 | ||
292 | // id detection elt for chamber 1 | |
293 | Int_t id0 = (chamber+1)*100; | |
294 | ||
295 | //-------------------------------------------------------- | |
296 | // Configuration for Chamber TC3/4 (Station 2) ---------- | |
297 | ||
298 | ||
299 | fMUON->SetNsec(chamber,2); | |
300 | ||
301 | // cathode 0 | |
302 | // type 220000 | |
303 | segmentation[0]->Add(id0, slatsegB[3]); | |
304 | segmentation[0]->Add(id0+ 8, slatsegB[3]); | |
305 | segmentation[0]->Add(id0+50, slatsegB[3]); | |
306 | segmentation[0]->Add(id0+58, slatsegB[3]); | |
307 | // type 222000 | |
308 | segmentation[0]->Add(id0+ 1, slatsegB[2]); | |
309 | segmentation[0]->Add(id0+ 7, slatsegB[2]); | |
310 | segmentation[0]->Add(id0+51, slatsegB[2]); | |
311 | segmentation[0]->Add(id0+57, slatsegB[2]); | |
312 | // type 122200 | |
313 | segmentation[0]->Add(id0+ 2, slatsegB[1]); | |
314 | segmentation[0]->Add(id0+ 6, slatsegB[1]); | |
315 | segmentation[0]->Add(id0+52, slatsegB[1]); | |
316 | segmentation[0]->Add(id0+56, slatsegB[1]); | |
317 | // type 112200 | |
318 | segmentation[0]->Add(id0+ 3, slatsegB[0]); | |
319 | segmentation[0]->Add(id0+ 4, slatsegB[0]); | |
320 | segmentation[0]->Add(id0+ 5, slatsegB[0]); | |
321 | segmentation[0]->Add(id0+53, slatsegB[0]); | |
322 | segmentation[0]->Add(id0+54, slatsegB[0]); | |
323 | segmentation[0]->Add(id0+55, slatsegB[0]); | |
324 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); | |
325 | ||
326 | // cathode 1 | |
327 | // type 220000 | |
328 | segmentation[1]->Add(id0, slatsegNB[3]); | |
329 | segmentation[1]->Add(id0+ 8, slatsegNB[3]); | |
330 | segmentation[1]->Add(id0+50, slatsegNB[3]); | |
331 | segmentation[1]->Add(id0+58, slatsegNB[3]); | |
332 | // type 222000 | |
333 | segmentation[1]->Add(id0+ 1, slatsegNB[2]); | |
334 | segmentation[1]->Add(id0+ 7, slatsegNB[2]); | |
335 | segmentation[1]->Add(id0+51, slatsegNB[2]); | |
336 | segmentation[1]->Add(id0+57, slatsegNB[2]); | |
337 | // type 122200 | |
338 | segmentation[1]->Add(id0+ 2, slatsegNB[1]); | |
339 | segmentation[1]->Add(id0+ 6, slatsegNB[1]); | |
340 | segmentation[1]->Add(id0+52, slatsegNB[1]); | |
341 | segmentation[1]->Add(id0+56, slatsegNB[1]); | |
342 | // type 112200 | |
343 | segmentation[1]->Add(id0+ 3, slatsegNB[0]); | |
344 | segmentation[1]->Add(id0+ 4, slatsegNB[0]); | |
345 | segmentation[1]->Add(id0+ 5, slatsegNB[0]); | |
346 | segmentation[1]->Add(id0+53, slatsegNB[0]); | |
347 | segmentation[1]->Add(id0+54, slatsegNB[0]); | |
348 | segmentation[1]->Add(id0+55, slatsegNB[0]); | |
349 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); | |
350 | ||
351 | fMUON->SetResponseModel(chamber, fResponse0); | |
352 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
353 | } | |
354 | } | |
355 | ||
356 | ||
357 | //__________________________________________________________________________ | |
358 | void AliMUONFactoryV2::BuildStation4() | |
359 | { | |
360 | //-------------------------------------------------------- | |
361 | // Configuration for Chamber TC7/8 (Station 4) ---------- | |
362 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
363 | ||
364 | ||
365 | AliMUONGeometrySegmentation* segmentation[2]; | |
366 | ||
367 | //Slats Segmentations | |
368 | AliMUONSt345SlatSegmentation *slatsegB[7]; // Types of segmentation for St4 | |
369 | AliMUONSt345SlatSegmentation *slatsegNB[7]; | |
370 | // Bending | |
371 | ||
372 | Int_t ndiv[4] ={ 4, 4, 2, 1}; // densities zones | |
373 | for(Int_t i = 0; i < 7; i++) { | |
374 | slatsegB[i] = new AliMUONSt345SlatSegmentation(1); | |
375 | slatsegB[i]->SetPadSize(10.,0.5); | |
376 | slatsegB[i]->SetPadDivision(ndiv); | |
377 | slatsegB[i]->SetId(1); | |
378 | slatsegB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
379 | slatsegNB[i] = new AliMUONSt345SlatSegmentation(0); | |
380 | slatsegNB[i]->SetPadSize(0.713,10.); | |
381 | slatsegNB[i]->SetPadDivision(ndiv); | |
382 | slatsegNB[i]->SetId(1); | |
383 | slatsegNB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
384 | } | |
385 | ||
386 | Int_t n4[4] = { 0, 1, 2, 2 }; | |
387 | slatsegB[0]->SetPcbBoards(n4); | |
388 | slatsegB[0]->Init(0); // 0 detection element id | |
389 | slatsegNB[0]->SetPcbBoards(n4); | |
390 | slatsegNB[0]->Init(0); // 0 detection element id | |
391 | ||
392 | // Type 112233 for 701, 712, 714, 725 in Ch7 (similar for Ch8) | |
393 | // for the futur official numbering | |
394 | // Type 112233 for 705, 707, 755, 757 in Ch7 (similar for Ch8) | |
395 | // actual numbering in the code to be changed in jan05 | |
396 | // Type 112233 for 901, 902, 911, 912, 914, 915, 924, 925 in Ch9 | |
397 | // (similar for Ch10) for the futur official numbering | |
398 | // Type 112233 for 904, 905, 907, 908, 954, 955, 957, 958 in Ch9 | |
399 | // (similar for Ch10) actual numbering in the code to be changed in jan05 | |
400 | Int_t n5[4] = { 0, 2, 2, 2 }; | |
401 | slatsegB[1]->SetPcbBoards(n5); | |
402 | slatsegB[1]->Init(0); // 0 detection element id | |
403 | slatsegNB[1]->SetPcbBoards(n5); | |
404 | slatsegNB[1]->Init(0); // 0 detection element id | |
405 | ||
406 | // Type 112230 for 702, 711, 715, 724 in Ch7 (similar for Ch8) | |
407 | // for the futur official numbering | |
408 | // Type 112230 for 704, 708, 754, 758 in Ch7 (similar for Ch8) | |
409 | // actual numbering in the code to be changed in jan05 | |
410 | Int_t n6[4] = { 0, 2, 2, 1 }; | |
411 | slatsegB[2]->SetPcbBoards(n6); | |
412 | slatsegB[2]->Init(0); // 0 detection element id | |
413 | slatsegNB[2]->SetPcbBoards(n6); | |
414 | slatsegNB[2]->Init(0); // 0 detection element id | |
415 | ||
416 | // Type 222330 for 703, 710, 716, 723 in Ch7 (similar for Ch8) | |
417 | // for the futur official numbering | |
418 | // Type 222330 for 703, 709, 753, 759 in Ch7 (similar for Ch8) | |
419 | // actual numbering in the code to be changed in jan05 | |
420 | Int_t n7[4] = { 0, 0, 3, 2 }; | |
421 | slatsegB[3]->SetPcbBoards(n7); | |
422 | slatsegB[3]->Init(0); // 0 detection element id | |
423 | slatsegNB[3]->SetPcbBoards(n7); | |
424 | slatsegNB[4]->Init(0); // 0 detection element id | |
425 | ||
426 | // Type 223300 for 704, 709, 717, 722 in Ch7 (similar for Ch8) | |
427 | // for the futur official numbering | |
428 | // Type 223300 for 702, 710, 752, 760 in Ch7 (similar for Ch8) | |
429 | // actual numbering in the code to be changed in jan05 | |
430 | Int_t n8[4] = { 0, 0, 2, 2 }; | |
431 | slatsegB[4]->SetPcbBoards(n8); | |
432 | slatsegB[4]->Init(0); // 0 detection element id | |
433 | slatsegNB[4]->SetPcbBoards(n8); | |
434 | slatsegNB[4]->Init(0); // 0 detection element id | |
435 | ||
436 | // Type 333000 for 705, 708, 718, 721 in Ch7 (similar for Ch8) | |
437 | // for the futur official numbering | |
438 | // Type 333000 for 701, 711, 751, 761 in Ch7 (similar for Ch8) | |
439 | // actual numbering in the code to be changed in jan05 | |
440 | // Type 333000 for 906, 907, 919, 920 in Ch9 (similar for Ch10) | |
441 | // for the futur official numbering | |
442 | // Type 333000 for 900, 912, 950, 962 in Ch9 (similar for Ch10) | |
443 | // actual numbering in the code to be changed in jan05 | |
444 | Int_t n9[4] = { 0, 0, 0, 3 }; | |
445 | slatsegB[5]->SetPcbBoards(n9); | |
446 | slatsegB[5]->Init(0); // 0 detection element id | |
447 | slatsegNB[5]->SetPcbBoards(n9); | |
448 | slatsegNB[5]->Init(0); // 0 detection element id | |
449 | ||
450 | // Type 330000 for 706, 707, 719, 720 in Ch7 (similar for Ch8) | |
451 | // for the futur official numbering | |
452 | // Type 330000 for 700, 712, 750, 762 in Ch7 (similar for Ch8) | |
453 | // actual numbering in the code to be changed in jan05 | |
454 | Int_t n10[4] = { 0, 0, 0, 2 }; | |
455 | slatsegB[6]->SetPcbBoards(n10); | |
456 | slatsegB[6]->Init(0); // 0 detection element id | |
457 | slatsegNB[6]->SetPcbBoards(n10); | |
458 | slatsegNB[6]->Init(0); // 0 detection element id | |
459 | ||
460 | ||
461 | for (Int_t chamber = 6; chamber < 8; chamber++) { | |
462 | ||
463 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
464 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
465 | ||
466 | // id detection elt for chamber 1 | |
467 | Int_t id0 = (chamber+1)*100; | |
468 | ||
469 | //-------------------------------------------------------- | |
470 | // Configuration for Chamber TC6/7 (Station 4) ---------- | |
471 | ||
472 | ||
473 | fMUON->SetNsec(chamber,2); | |
474 | ||
475 | // cathode 0 | |
476 | // type 122330 | |
477 | segmentation[0]->Add(id0+ 6, slatsegB[0]); | |
478 | segmentation[0]->Add(id0+56, slatsegB[0]); | |
479 | ||
480 | // type 112233 | |
481 | segmentation[0]->Add(id0+ 5, slatsegB[1]); | |
482 | segmentation[0]->Add(id0+ 7, slatsegB[1]); | |
483 | segmentation[0]->Add(id0+55, slatsegB[1]); | |
484 | segmentation[0]->Add(id0+57, slatsegB[1]); | |
485 | ||
486 | // type 112230 | |
487 | segmentation[0]->Add(id0+ 4, slatsegB[2]); | |
488 | segmentation[0]->Add(id0+ 8, slatsegB[2]); | |
489 | segmentation[0]->Add(id0+54, slatsegB[2]); | |
490 | segmentation[0]->Add(id0+58, slatsegB[2]); | |
491 | ||
492 | // type 222330 | |
493 | segmentation[0]->Add(id0+ 3, slatsegB[3]); | |
494 | segmentation[0]->Add(id0+ 9, slatsegB[3]); | |
495 | segmentation[0]->Add(id0+53, slatsegB[3]); | |
496 | segmentation[0]->Add(id0+59, slatsegB[3]); | |
497 | ||
498 | // type 223300 | |
499 | segmentation[0]->Add(id0+ 2, slatsegB[4]); | |
500 | segmentation[0]->Add(id0+10, slatsegB[4]); | |
501 | segmentation[0]->Add(id0+52, slatsegB[4]); | |
502 | segmentation[0]->Add(id0+60, slatsegB[4]); | |
503 | ||
504 | // type 333000 | |
505 | segmentation[0]->Add(id0+ 1, slatsegB[5]); | |
506 | segmentation[0]->Add(id0+11, slatsegB[5]); | |
507 | segmentation[0]->Add(id0+51, slatsegB[5]); | |
508 | segmentation[0]->Add(id0+61, slatsegB[5]); | |
509 | ||
510 | // type 330000 | |
511 | segmentation[0]->Add(id0 , slatsegB[6]); | |
512 | segmentation[0]->Add(id0+12, slatsegB[6]); | |
513 | segmentation[0]->Add(id0+50, slatsegB[6]); | |
514 | segmentation[0]->Add(id0+62, slatsegB[6]); | |
515 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); | |
516 | ||
517 | // cathode 1 | |
518 | // type 122330 | |
519 | segmentation[1]->Add(id0+ 6, slatsegNB[0]); | |
520 | segmentation[1]->Add(id0+56, slatsegNB[0]); | |
521 | ||
522 | // type 112233 | |
523 | segmentation[1]->Add(id0+ 5, slatsegNB[1]); | |
524 | segmentation[1]->Add(id0+ 7, slatsegNB[1]); | |
525 | segmentation[1]->Add(id0+55, slatsegNB[1]); | |
526 | segmentation[1]->Add(id0+57, slatsegNB[1]); | |
527 | ||
528 | // type 112230 | |
529 | segmentation[1]->Add(id0+ 4, slatsegNB[2]); | |
530 | segmentation[1]->Add(id0+ 8, slatsegNB[2]); | |
531 | segmentation[1]->Add(id0+54, slatsegNB[2]); | |
532 | segmentation[1]->Add(id0+58, slatsegNB[2]); | |
533 | ||
534 | // type 222330 | |
535 | segmentation[1]->Add(id0+ 3, slatsegNB[3]); | |
536 | segmentation[1]->Add(id0+ 9, slatsegNB[3]); | |
537 | segmentation[1]->Add(id0+53, slatsegNB[3]); | |
538 | segmentation[1]->Add(id0+59, slatsegNB[3]); | |
539 | ||
540 | // type 223300 | |
541 | segmentation[1]->Add(id0+ 2, slatsegNB[4]); | |
542 | segmentation[1]->Add(id0+10, slatsegNB[4]); | |
543 | segmentation[1]->Add(id0+52, slatsegNB[4]); | |
544 | segmentation[1]->Add(id0+60, slatsegNB[4]); | |
545 | ||
546 | // type 333000 | |
547 | segmentation[1]->Add(id0+ 1, slatsegNB[5]); | |
548 | segmentation[1]->Add(id0+11, slatsegNB[5]); | |
549 | segmentation[1]->Add(id0+51, slatsegNB[5]); | |
550 | segmentation[1]->Add(id0+61, slatsegNB[5]); | |
551 | ||
552 | // type 330000 | |
553 | segmentation[1]->Add(id0 , slatsegNB[6]); | |
554 | segmentation[1]->Add(id0+12, slatsegNB[6]); | |
555 | segmentation[1]->Add(id0+50, slatsegNB[6]); | |
556 | segmentation[1]->Add(id0+62, slatsegNB[6]); | |
557 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); | |
558 | ||
559 | fMUON->SetResponseModel(chamber, fResponse0); | |
560 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
561 | } | |
562 | } | |
563 | ||
564 | //__________________________________________________________________________ | |
565 | void AliMUONFactoryV2::BuildStation5() | |
566 | { | |
567 | //-------------------------------------------------------- | |
568 | // Configuration for Chamber TC9/10 (Station 5) --------- | |
569 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
570 | ||
571 | AliMUONGeometrySegmentation* segmentation[2]; | |
572 | ||
573 | //Slats Segmentations | |
574 | AliMUONSt345SlatSegmentation *slatsegB[6]; // Types of segmentation for St5 | |
575 | AliMUONSt345SlatSegmentation *slatsegNB[6]; | |
576 | // Bending | |
577 | ||
578 | Int_t ndiv[4] ={ 4, 4, 2, 1}; // densities zones | |
579 | for(Int_t i = 0; i < 6; i++) { | |
580 | slatsegB[i] = new AliMUONSt345SlatSegmentation(1); | |
581 | slatsegB[i]->SetPadSize(10.,0.5); | |
582 | slatsegB[i]->SetPadDivision(ndiv); | |
583 | slatsegB[i]->SetId(1); | |
584 | slatsegB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
585 | slatsegNB[i] = new AliMUONSt345SlatSegmentation(0); | |
586 | slatsegNB[i]->SetPadSize(0.713,10.); | |
587 | slatsegNB[i]->SetPadDivision(ndiv); | |
588 | slatsegNB[i]->SetId(1); | |
589 | slatsegNB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
590 | } | |
591 | ||
592 | // Type 122330 for 900, 913 in Ch9 (similar for Ch10) | |
593 | // for the futur official numbering | |
594 | // Type 122330 for 906, 956 in Ch9 (similar for Ch10) | |
595 | // actual numbering in the code to be changed in jan05 | |
596 | Int_t n4[4] = { 0, 1, 2, 2 }; | |
597 | slatsegB[0]->SetPcbBoards(n4); | |
598 | slatsegB[0]->Init(0); // 0 detection element id | |
599 | slatsegNB[0]->SetPcbBoards(n4); | |
600 | slatsegNB[0]->Init(0); // 0 detection element id | |
601 | ||
602 | // Type 112233 for 901, 902, 911, 912, 914, 915, 924, 925 in Ch9 | |
603 | // (similar for Ch10) for the futur official numbering | |
604 | // Type 112233 for 904, 905, 907, 908, 954, 955, 957, 958 in Ch9 | |
605 | // (similar for Ch10) actual numbering in the code to be changed in jan05 | |
606 | Int_t n5[4] = { 0, 2, 2, 2 }; | |
607 | slatsegB[1]->SetPcbBoards(n5); | |
608 | slatsegB[1]->Init(0); // 0 detection element id | |
609 | slatsegNB[1]->SetPcbBoards(n5); | |
610 | slatsegNB[1]->Init(0); // 0 detection element id | |
611 | ||
612 | // Type 333000 for 906, 907, 919, 920 in Ch9 (similar for Ch10) | |
613 | // for the futur official numbering | |
614 | // Type 333000 for 900, 912, 950, 962 in Ch9 (similar for Ch10) | |
615 | // actual numbering in the code to be changed in jan05 | |
616 | Int_t n9[4] = { 0, 0, 0, 3 }; | |
617 | slatsegB[2]->SetPcbBoards(n9); | |
618 | slatsegB[2]->Init(0); // 0 detection element id | |
619 | slatsegNB[2]->SetPcbBoards(n9); | |
620 | slatsegNB[2]->Init(0); // 0 detection element id | |
621 | ||
622 | // Type 222333 for 903, 910, 916, 923 in Ch9 (similar for Ch10) | |
623 | // for the futur official numbering | |
624 | // Type 222333 for 903, 909, 953, 959 in Ch9 (similar for Ch10) | |
625 | // actual numbering in the code to be changed in jan05 | |
626 | Int_t n11[4] = { 0, 0, 3, 3 }; | |
627 | slatsegB[3]->SetPcbBoards(n11); | |
628 | slatsegB[3]->Init(0); // 0 detection element id | |
629 | slatsegNB[3]->SetPcbBoards(n11); | |
630 | slatsegNB[3]->Init(0); // 0 detection element id | |
631 | ||
632 | // Type 223330 for 904, 909, 917, 922 in Ch9 (similar for Ch10) | |
633 | // for the futur official numbering | |
634 | // Type 223330 for 902, 910, 952, 960 in Ch9 (similar for Ch10) | |
635 | // actual numbering in the code to be changed in jan05 | |
636 | Int_t n12[4] = { 0, 0, 2, 3 }; | |
637 | slatsegB[4]->SetPcbBoards(n12); | |
638 | slatsegB[4]->Init(0); // 0 detection element id | |
639 | slatsegNB[4]->SetPcbBoards(n12); | |
640 | slatsegNB[4]->Init(0); // 0 detection element id | |
641 | ||
642 | // Type 333300 for 905, 908, 918, 921 in Ch9 (similar for Ch10) | |
643 | // for the futur official numbering | |
644 | // Type 333300 for 901, 911, 951, 961 in Ch9 (similar for Ch10) | |
645 | // actual numbering in the code to be changed in jan05 | |
646 | Int_t n13[4] = { 0, 0, 0, 4 }; | |
647 | slatsegB[5]->SetPcbBoards(n13); | |
648 | slatsegB[5]->Init(0); // 0 detection element id | |
649 | slatsegNB[5]->SetPcbBoards(n13); | |
650 | slatsegNB[5]->Init(0); // 0 detection element id | |
651 | ||
652 | for (Int_t chamber = 8; chamber < 10; chamber++) { | |
653 | ||
654 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
655 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
656 | ||
657 | // id detection elt for chamber 1 | |
658 | Int_t id0 = (chamber+1)*100; | |
659 | ||
660 | //-------------------------------------------------------- | |
661 | // Configuration for Chamber TC8/9 (Station 5) ---------- | |
662 | ||
663 | ||
664 | fMUON->SetNsec(chamber,2); | |
665 | ||
666 | // cathode 0 | |
667 | // type 122330 | |
668 | segmentation[0]->Add(id0+ 6, slatsegB[0]); | |
669 | segmentation[0]->Add(id0+56, slatsegB[0]); | |
670 | ||
671 | // type 112233 | |
672 | segmentation[0]->Add(id0+ 4, slatsegB[1]); | |
673 | segmentation[0]->Add(id0+ 5, slatsegB[1]); | |
674 | segmentation[0]->Add(id0+ 7, slatsegB[1]); | |
675 | segmentation[0]->Add(id0+ 8, slatsegB[1]); | |
676 | segmentation[0]->Add(id0+54, slatsegB[1]); | |
677 | segmentation[0]->Add(id0+55, slatsegB[1]); | |
678 | segmentation[0]->Add(id0+57, slatsegB[1]); | |
679 | segmentation[0]->Add(id0+58, slatsegB[1]); | |
680 | ||
681 | // type 333000 | |
682 | segmentation[0]->Add(id0 , slatsegB[2]); | |
683 | segmentation[0]->Add(id0+12, slatsegB[2]); | |
684 | segmentation[0]->Add(id0+50, slatsegB[2]); | |
685 | segmentation[0]->Add(id0+62, slatsegB[2]); | |
686 | ||
687 | // type 222333 | |
688 | segmentation[0]->Add(id0+ 3, slatsegB[3]); | |
689 | segmentation[0]->Add(id0+ 9, slatsegB[3]); | |
690 | segmentation[0]->Add(id0+53, slatsegB[3]); | |
691 | segmentation[0]->Add(id0+59, slatsegB[3]); | |
692 | ||
693 | // type 223330 | |
694 | segmentation[0]->Add(id0+ 2, slatsegB[4]); | |
695 | segmentation[0]->Add(id0+10, slatsegB[4]); | |
696 | segmentation[0]->Add(id0+52, slatsegB[4]); | |
697 | segmentation[0]->Add(id0+60, slatsegB[4]); | |
698 | ||
699 | // type 333300 | |
700 | segmentation[0]->Add(id0+ 1, slatsegB[5]); | |
701 | segmentation[0]->Add(id0+11, slatsegB[5]); | |
702 | segmentation[0]->Add(id0+51, slatsegB[5]); | |
703 | segmentation[0]->Add(id0+61, slatsegB[5]); | |
704 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); | |
705 | ||
706 | // cathode 1 | |
707 | // type 122330 | |
708 | segmentation[1]->Add(id0+ 6, slatsegNB[0]); | |
709 | segmentation[1]->Add(id0+56, slatsegNB[0]); | |
710 | ||
711 | // type 112233 | |
712 | segmentation[1]->Add(id0+ 4, slatsegNB[1]); | |
713 | segmentation[1]->Add(id0+ 5, slatsegNB[1]); | |
714 | segmentation[1]->Add(id0+ 7, slatsegNB[1]); | |
715 | segmentation[1]->Add(id0+ 8, slatsegNB[1]); | |
716 | segmentation[1]->Add(id0+54, slatsegNB[1]); | |
717 | segmentation[1]->Add(id0+55, slatsegNB[1]); | |
718 | segmentation[1]->Add(id0+57, slatsegNB[1]); | |
719 | segmentation[1]->Add(id0+58, slatsegNB[1]); | |
720 | ||
721 | // type 333000 | |
722 | segmentation[1]->Add(id0 , slatsegNB[2]); | |
723 | segmentation[1]->Add(id0+12, slatsegNB[2]); | |
724 | segmentation[1]->Add(id0+50, slatsegNB[2]); | |
725 | segmentation[1]->Add(id0+62, slatsegNB[2]); | |
726 | ||
727 | // type 222333 | |
728 | segmentation[1]->Add(id0+ 3, slatsegNB[3]); | |
729 | segmentation[1]->Add(id0+ 9, slatsegNB[3]); | |
730 | segmentation[1]->Add(id0+53, slatsegNB[3]); | |
731 | segmentation[1]->Add(id0+59, slatsegNB[3]); | |
732 | ||
733 | // type 223330 | |
734 | segmentation[1]->Add(id0+ 2, slatsegNB[4]); | |
735 | segmentation[1]->Add(id0+10, slatsegNB[4]); | |
736 | segmentation[1]->Add(id0+52, slatsegNB[4]); | |
737 | segmentation[1]->Add(id0+60, slatsegNB[4]); | |
738 | ||
739 | // type 333300 | |
740 | segmentation[1]->Add(id0+ 1, slatsegNB[5]); | |
741 | segmentation[1]->Add(id0+11, slatsegNB[5]); | |
742 | segmentation[1]->Add(id0+51, slatsegNB[5]); | |
743 | segmentation[1]->Add(id0+61, slatsegNB[5]); | |
744 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); | |
745 | ||
746 | fMUON->SetResponseModel(chamber, fResponse0); | |
747 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
748 | } | |
749 | } | |
750 | ||
751 | //__________________________________________________________________________ | |
752 | void AliMUONFactoryV2::BuildStation6() | |
753 | { | |
754 | // Create Trigger geometry segmentation for given chamber and cathod | |
755 | ||
756 | ||
757 | AliMUONGeometrySegmentation *chamberSeg[2]; | |
758 | // Cluster-size off | |
759 | AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger; | |
760 | // Cluster-size on | |
761 | // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1; | |
762 | ||
763 | for (Int_t chamber = 10; chamber < 14; chamber++) { | |
764 | ||
765 | //Trigger Segmentations | |
766 | AliMUONTriggerSegmentation *trigSegX[9]; | |
767 | AliMUONTriggerSegmentation *trigSegY[9]; | |
768 | for(Int_t i=0; i<9; i++) { | |
769 | trigSegX[i] = new AliMUONTriggerSegmentation(0); | |
770 | trigSegY[i] = new AliMUONTriggerSegmentation(1); | |
771 | } | |
772 | ||
773 | AliMUONChamber *iChamber, *iChamber1; | |
774 | iChamber1 = &fMUON->Chamber(10); | |
775 | iChamber = &fMUON->Chamber(chamber); | |
776 | Float_t zpos1= - iChamber1->Z(); | |
777 | Float_t zpos = - iChamber->Z(); | |
778 | Float_t zRatio = zpos / zpos1; | |
779 | ||
780 | // init | |
781 | Int_t nStrip[7]={0,0,0,0,0,0,0}; | |
782 | Float_t stripYsize[7]={0.,0.,0.,0.,0.,0.,0.}; | |
783 | Float_t stripXsize[7]={0.,0.,0.,0.,0.,0.,0.}; | |
784 | ||
785 | // chamber 8 cathode 0 | |
786 | for (Int_t i=0; i<7; i++) nStrip[i]=16; | |
787 | for (Int_t i=0; i<7; i++) | |
788 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
789 | for (Int_t i=0; i<6; i++) | |
790 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
791 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
792 | trigSegX[8]->Init(0,1,nStrip,stripYsize,stripXsize,0.); | |
793 | ||
794 | // chamber 8 cathode 1 | |
795 | for (Int_t i=0; i<6; i++) nStrip[i]=8; | |
796 | nStrip[6]=16; | |
797 | for (Int_t i=0; i<7; i++) | |
798 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
799 | for (Int_t i=0; i<7; i++) | |
800 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
801 | trigSegY[8]->Init(0,1,nStrip,stripYsize,stripXsize,0.); | |
802 | ||
803 | // chamber 7 cathode 0 | |
804 | for (Int_t i=0; i<6; i++) nStrip[i]=32; | |
805 | nStrip[7]=16; | |
806 | for (Int_t i=0; i<6; i++) | |
807 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
808 | stripYsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
809 | for (Int_t i=0; i<6; i++) | |
810 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
811 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
812 | trigSegX[7]->Init(0,2,nStrip,stripYsize,stripXsize,0.); | |
813 | ||
814 | // chamber 7 cathode 1 | |
815 | for (Int_t i=0; i<6; i++) nStrip[i]=8; | |
816 | nStrip[6]=16; | |
817 | for (Int_t i=0; i<7; i++) | |
818 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
819 | for (Int_t i=0; i<7; i++) | |
820 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
821 | trigSegY[7]->Init(0,2,nStrip,stripYsize,stripXsize,0.); | |
822 | ||
823 | // chamber 6 cathode 0 | |
824 | for (Int_t i=0; i<6; i++) nStrip[i]=32; | |
825 | nStrip[7]=16; | |
826 | for (Int_t i=0; i<6; i++) | |
827 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
828 | stripYsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
829 | for (Int_t i=0; i<6; i++) | |
830 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
831 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
832 | trigSegX[6]->Init(0,3,nStrip,stripYsize,stripXsize,0.); | |
833 | ||
834 | // chamber 6 cathode 1 | |
835 | for (Int_t i=0; i<5; i++) nStrip[i]=16; | |
836 | nStrip[5]=8; | |
837 | nStrip[6]=16; | |
838 | for (Int_t i=0; i<7; i++) | |
839 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
840 | for (Int_t i=0; i<5; i++) | |
841 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
842 | stripXsize[5]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
843 | stripXsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
844 | trigSegY[6]->Init(0,3,nStrip,stripYsize,stripXsize,0.); | |
845 | ||
846 | // chamber 5 cathode 0 | |
847 | nStrip[0]=48; | |
848 | for (Int_t i=1; i<3; i++) nStrip[i]=64; | |
849 | for (Int_t i=3; i<6; i++) nStrip[i]=32; | |
850 | nStrip[6]=16; | |
851 | for (Int_t i=0; i<3; i++) | |
852 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(0)*zRatio; | |
853 | for (Int_t i=3; i<6; i++) | |
854 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
855 | stripYsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
856 | for (Int_t i=0; i<6; i++) | |
857 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
858 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
859 | trigSegX[5]->Init(0,4,nStrip,stripYsize,stripXsize,AliMUONTriggerConstants::StripLength(0)*zRatio); | |
860 | ||
861 | // chamber 5 cathode 1 | |
862 | for (Int_t i=0; i<5; i++) nStrip[i]=16; | |
863 | nStrip[5]=8; | |
864 | nStrip[6]=16; | |
865 | stripYsize[0]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
866 | for (Int_t i=1; i<7; i++) | |
867 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
868 | for (Int_t i=0; i<5; i++) | |
869 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
870 | stripXsize[5]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
871 | stripXsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
872 | trigSegY[5]->Init(0,4,nStrip,stripYsize,stripXsize,AliMUONTriggerConstants::StripLength(0)*zRatio); | |
873 | ||
874 | // chamber 4 cathode 0 | |
875 | nStrip[0]=0; | |
876 | for (Int_t i=1; i<3; i++) nStrip[i]=64; | |
877 | for (Int_t i=3; i<6; i++) nStrip[i]=32; | |
878 | nStrip[6]=16; | |
879 | stripYsize[0]=0.; | |
880 | for (Int_t i=1; i<3; i++) | |
881 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(0)*zRatio; | |
882 | for (Int_t i=3; i<6; i++) | |
883 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
884 | stripYsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
885 | stripXsize[0]=0; | |
886 | stripXsize[1]=AliMUONTriggerConstants::StripLength(0)*zRatio; | |
887 | for (Int_t i=2; i<6; i++) | |
888 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
889 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
890 | trigSegX[4]->Init(0,5,nStrip,stripYsize,stripXsize,0.); | |
891 | ||
892 | // chamber 4 cathode 1 | |
893 | nStrip[0]=0; | |
894 | nStrip[1]=8; | |
895 | for (Int_t i=2; i<5; i++) nStrip[i]=16; | |
896 | nStrip[5]=8; | |
897 | nStrip[6]=16; | |
898 | stripYsize[0]=0.; | |
899 | for (Int_t i=1; i<7; i++) | |
900 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
901 | stripXsize[0]=0.; | |
902 | for (Int_t i=1; i<5; i++) | |
903 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
904 | stripXsize[5]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
905 | stripXsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
906 | trigSegY[4]->Init(0,5,nStrip,stripYsize,stripXsize,0.); | |
907 | ||
908 | // chamber 3 cathode 0 | |
909 | nStrip[0]=48; | |
910 | for (Int_t i=1; i<3; i++) nStrip[i]=64; | |
911 | for (Int_t i=3; i<6; i++) nStrip[i]=32; | |
912 | nStrip[6]=16; | |
913 | for (Int_t i=0; i<3; i++) | |
914 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(0)*zRatio; | |
915 | for (Int_t i=3; i<6; i++) | |
916 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
917 | stripYsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
918 | for (Int_t i=0; i<6; i++) | |
919 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
920 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
921 | trigSegX[3]->Init(0,6,nStrip,stripYsize,stripXsize,0.); | |
922 | ||
923 | // chamber 3 cathode 1 | |
924 | for (Int_t i=0; i<5; i++) nStrip[i]=16; | |
925 | nStrip[5]=8; | |
926 | nStrip[6]=16; | |
927 | stripYsize[0]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
928 | for (Int_t i=1; i<7; i++) | |
929 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
930 | for (Int_t i=0; i<5; i++) | |
931 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
932 | stripXsize[5]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
933 | stripXsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
934 | trigSegY[3]->Init(0,6,nStrip,stripYsize,stripXsize,0.); | |
935 | ||
936 | // chamber 2 cathode 0 | |
937 | for (Int_t i=0; i<6; i++) nStrip[i]=32; | |
938 | nStrip[7]=16; | |
939 | for (Int_t i=0; i<6; i++) | |
940 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
941 | stripYsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
942 | for (Int_t i=0; i<6; i++) | |
943 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
944 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
945 | trigSegX[2]->Init(0,7,nStrip,stripYsize,stripXsize,0.); | |
946 | ||
947 | // chamber 2 cathode 1 | |
948 | for (Int_t i=0; i<5; i++) nStrip[i]=16; | |
949 | nStrip[5]=8; | |
950 | nStrip[6]=16; | |
951 | for (Int_t i=0; i<7; i++) | |
952 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
953 | for (Int_t i=0; i<5; i++) | |
954 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
955 | stripXsize[5]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
956 | stripXsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
957 | trigSegY[2]->Init(0,7,nStrip,stripYsize,stripXsize,0.); | |
958 | ||
959 | // chamber 1 cathode 0 | |
960 | for (Int_t i=0; i<6; i++) nStrip[i]=32; | |
961 | nStrip[7]=16; | |
962 | for (Int_t i=0; i<6; i++) | |
963 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(1)*zRatio; | |
964 | stripYsize[6]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
965 | for (Int_t i=0; i<6; i++) | |
966 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
967 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
968 | trigSegX[1]->Init(0,8,nStrip,stripYsize,stripXsize,0.); | |
969 | ||
970 | // chamber 1 cathode 1 | |
971 | for (Int_t i=0; i<6; i++) nStrip[i]=8; | |
972 | nStrip[6]=16; | |
973 | for (Int_t i=0; i<7; i++) | |
974 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
975 | for (Int_t i=0; i<7; i++) | |
976 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
977 | trigSegY[1]->Init(0,8,nStrip,stripYsize,stripXsize,0.); | |
978 | ||
979 | // chamber 0 cathode 0 | |
980 | for (Int_t i=0; i<7; i++) nStrip[i]=16; | |
981 | for (Int_t i=0; i<7; i++) | |
982 | stripYsize[i]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
983 | for (Int_t i=0; i<6; i++) | |
984 | stripXsize[i]=AliMUONTriggerConstants::StripLength(1)*zRatio; | |
985 | stripXsize[6]=AliMUONTriggerConstants::StripLength(2)*zRatio; | |
986 | trigSegX[0]->Init(0,9,nStrip,stripYsize,stripXsize,0.); | |
987 | ||
988 | // chamber 0 cathode 1 | |
989 | for (Int_t i = 0; i < 6; i++) nStrip[i]=8; | |
990 | nStrip[6]=16; | |
991 | for (Int_t i = 0; i < 7; i++) | |
992 | stripYsize[i]=AliMUONTriggerConstants::StripLength(3)*zRatio; | |
993 | for (Int_t i = 0; i < 7; i++) | |
994 | stripXsize[i]=AliMUONTriggerConstants::StripWidth(2)*zRatio; | |
995 | trigSegY[0]->Init(0,9,nStrip,stripYsize,stripXsize,0.); | |
996 | ||
997 | ||
998 | chamberSeg[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
999 | chamberSeg[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
1000 | ||
1001 | fMUON->SetNsec(chamber,2); | |
1002 | ||
1003 | Int_t id0 = (chamber+1)*100; | |
1004 | ||
1005 | // printf("in CreateTriggerSegmentation here 0 id0=%i \n",id0); | |
1006 | ||
1007 | for (Int_t i = 0; i < 9; i++) { | |
1008 | ||
1009 | // cathode 0 | |
1010 | chamberSeg[0]->Add(id0+i, trigSegX[i]); | |
1011 | chamberSeg[0]->Add(id0+50+i, trigSegX[i]); | |
1012 | fMUON->SetSegmentationModel(chamber, 1, chamberSeg[0]); | |
1013 | ||
1014 | // cathode 1 | |
1015 | chamberSeg[1]->Add(id0+i, trigSegY[i]); | |
1016 | chamberSeg[1]->Add(id0+50+i, trigSegY[i]); | |
1017 | fMUON->SetSegmentationModel(chamber, 2, chamberSeg[1]); | |
1018 | ||
1019 | } | |
1020 | ||
1021 | fMUON->SetResponseModel(chamber, responseTrigger0); | |
1022 | fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on cathodes | |
1023 | ||
1024 | ||
1025 | // printf("in CreateTriggerSegmentation here 1\n"); | |
1026 | ||
1027 | if (!id0) { | |
1028 | AliWarning(Form("Segmentation for chamber %d is not yet defined",chamber)); | |
1029 | return ; | |
1030 | } | |
1031 | } | |
1032 | } | |
1033 | //__________________________________________________________________________ | |
1034 | void AliMUONFactoryV2::Build(AliMUON* where, const char* what) | |
1035 | { | |
1036 | // | |
1037 | // Construct MUON from chambers, segmentation and responses | |
1038 | // | |
1039 | ||
1040 | fMUON = where; | |
1041 | char tmp[20]; | |
1042 | strcpy(tmp, what); | |
1043 | ||
1044 | if (strcmp(tmp, "default")==0) { | |
1045 | // Set default parameters | |
1046 | fMUON->SetIshunt(0); | |
1047 | fMUON->SetMaxStepGas(0.1); | |
1048 | fMUON->SetMaxStepAlu(0.1); | |
1049 | ||
1050 | // Build all stations | |
1051 | BuildCommon(); | |
1052 | BuildStation1(); | |
1053 | BuildStation2(); | |
1054 | BuildStation3(); | |
1055 | BuildStation4(); | |
1056 | BuildStation5(); | |
1057 | BuildStation6(); | |
1058 | } | |
1059 | else | |
1060 | AliDebug(0,"Non default version of MUON selected. You have to construct yourself the MUON elements !!"); | |
1061 | } | |
1062 | ||
1063 | //__________________________________________________________________________ | |
1064 | void AliMUONFactoryV2::BuildStation(AliMUON* where, Int_t stationNumber) | |
1065 | { | |
1066 | // | |
1067 | // Construct MUON from chambers, segmentation and responses | |
1068 | // | |
1069 | // Version 0 | |
1070 | // | |
1071 | // First define the number of planes that are segmented (1 or 2) by a call | |
1072 | // to SetNsec. | |
1073 | // Then chose for each chamber (chamber plane) the segmentation | |
1074 | // and response model. | |
1075 | // They should be equal for the two chambers of each station. In a future | |
1076 | // version this will be enforced. | |
1077 | // | |
1078 | ||
1079 | fMUON = where; | |
1080 | if (!fResponse0) BuildCommon(); | |
1081 | ||
1082 | switch (stationNumber) { | |
1083 | case 1: BuildStation1(); break; | |
1084 | case 2: BuildStation2(); break; | |
1085 | case 3: BuildStation3(); break; | |
1086 | case 4: BuildStation4(); break; | |
1087 | case 5: BuildStation5(); break; | |
1088 | case 6: BuildStation6(); break; | |
1089 | ||
1090 | default: AliFatal("Wrong station number"); | |
1091 | } | |
1092 | } |