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