]>
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); | |
ecbcb19e | 185 | segmentation[0]->Add(id0 + 3, nonbendSt1); |
186 | segmentation[0]->Add(id0 + 2, bendSt1); | |
187 | segmentation[0]->Add(id0 + 1, nonbendSt1); | |
79b4ba23 | 188 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); |
a713db22 | 189 | |
190 | // cathode 1 | |
191 | segmentation[1]->Add(id0, nonbendSt1); | |
ecbcb19e | 192 | segmentation[1]->Add(id0 + 3, bendSt1); |
193 | segmentation[1]->Add(id0 + 2, nonbendSt1); | |
a713db22 | 194 | segmentation[1]->Add(id0 + 1, bendSt1); |
a713db22 | 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); | |
b413978f | 240 | segmentation[0]->Add(id0 + 3, nonbendSt2); |
241 | segmentation[0]->Add(id0 + 2, bendSt2); | |
242 | segmentation[0]->Add(id0 + 1, nonbendSt2); | |
79b4ba23 | 243 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); |
a713db22 | 244 | |
245 | // cathode 1 | |
246 | segmentation[1]->Add(id0, nonbendSt2); | |
b413978f | 247 | segmentation[1]->Add(id0 + 3, bendSt2); |
248 | segmentation[1]->Add(id0 + 2, nonbendSt2); | |
a713db22 | 249 | segmentation[1]->Add(id0 + 1, bendSt2); |
a713db22 | 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 | ||
a713db22 | 337 | fMUON->SetNsec(chamber,2); |
338 | ||
339 | // cathode 0 | |
340 | // type 220000 | |
e856ab99 | 341 | segmentation[0]->Add(id0+14, slatsegB[3]); |
342 | segmentation[0]->Add(id0+ 4, slatsegB[3]); | |
343 | segmentation[0]->Add(id0+13, slatsegB[3]); | |
344 | segmentation[0]->Add(id0+ 5, slatsegB[3]); | |
a713db22 | 345 | // type 222000 |
e856ab99 | 346 | segmentation[0]->Add(id0+15, slatsegB[2]); |
347 | segmentation[0]->Add(id0+ 3, slatsegB[2]); | |
348 | segmentation[0]->Add(id0+12, slatsegB[2]); | |
349 | segmentation[0]->Add(id0+ 6, slatsegB[2]); | |
a713db22 | 350 | // type 122200 |
e856ab99 | 351 | segmentation[0]->Add(id0+16, slatsegB[1]); |
352 | segmentation[0]->Add(id0+ 2, slatsegB[1]); | |
353 | segmentation[0]->Add(id0+11, slatsegB[1]); | |
354 | segmentation[0]->Add(id0+ 7, slatsegB[1]); | |
a713db22 | 355 | // type 112200 |
e856ab99 | 356 | segmentation[0]->Add(id0+17, slatsegB[0]); |
357 | segmentation[0]->Add(id0, slatsegB[0]); | |
358 | segmentation[0]->Add(id0+ 1, slatsegB[0]); | |
359 | segmentation[0]->Add(id0+10, slatsegB[0]); | |
360 | segmentation[0]->Add(id0+ 9, slatsegB[0]); | |
361 | segmentation[0]->Add(id0+ 8, slatsegB[0]); | |
79b4ba23 | 362 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); |
a713db22 | 363 | |
364 | // cathode 1 | |
365 | // type 220000 | |
e856ab99 | 366 | segmentation[1]->Add(id0+14, slatsegNB[3]); |
367 | segmentation[1]->Add(id0+ 4, slatsegNB[3]); | |
368 | segmentation[1]->Add(id0+13, slatsegNB[3]); | |
369 | segmentation[1]->Add(id0+ 5, slatsegNB[3]); | |
a713db22 | 370 | // type 222000 |
e856ab99 | 371 | segmentation[1]->Add(id0+15, slatsegNB[2]); |
372 | segmentation[1]->Add(id0+ 3, slatsegNB[2]); | |
373 | segmentation[1]->Add(id0+12, slatsegNB[2]); | |
374 | segmentation[1]->Add(id0+ 6, slatsegNB[2]); | |
a713db22 | 375 | // type 122200 |
e856ab99 | 376 | segmentation[1]->Add(id0+16, slatsegNB[1]); |
377 | segmentation[1]->Add(id0+ 2, slatsegNB[1]); | |
378 | segmentation[1]->Add(id0+11, slatsegNB[1]); | |
379 | segmentation[1]->Add(id0+ 7, slatsegNB[1]); | |
a713db22 | 380 | // type 112200 |
e856ab99 | 381 | segmentation[1]->Add(id0+17, slatsegNB[0]); |
382 | segmentation[1]->Add(id0, slatsegNB[0]); | |
383 | segmentation[1]->Add(id0+ 1, slatsegNB[0]); | |
384 | segmentation[1]->Add(id0+10, slatsegNB[0]); | |
385 | segmentation[1]->Add(id0+ 9, slatsegNB[0]); | |
386 | segmentation[1]->Add(id0+ 8, slatsegNB[0]); | |
a713db22 | 387 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); |
388 | ||
389 | fMUON->SetResponseModel(chamber, fResponse0); | |
390 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
391 | } | |
392 | } | |
79b4ba23 | 393 | |
a713db22 | 394 | //__________________________________________________________________________ |
395 | void AliMUONFactoryV2::BuildStation4() | |
396 | { | |
397 | //-------------------------------------------------------- | |
398 | // Configuration for Chamber TC7/8 (Station 4) ---------- | |
399 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
400 | ||
401 | ||
402 | AliMUONGeometrySegmentation* segmentation[2]; | |
403 | ||
404 | //Slats Segmentations | |
405 | AliMUONSt345SlatSegmentation *slatsegB[7]; // Types of segmentation for St4 | |
406 | AliMUONSt345SlatSegmentation *slatsegNB[7]; | |
407 | // Bending | |
408 | ||
409 | Int_t ndiv[4] ={ 4, 4, 2, 1}; // densities zones | |
410 | for(Int_t i = 0; i < 7; i++) { | |
411 | slatsegB[i] = new AliMUONSt345SlatSegmentation(1); | |
dd1f2c35 | 412 | fDESegmentations->Add(slatsegB[i]); |
a713db22 | 413 | slatsegB[i]->SetPadSize(10.,0.5); |
414 | slatsegB[i]->SetPadDivision(ndiv); | |
415 | slatsegB[i]->SetId(1); | |
416 | slatsegB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
417 | slatsegNB[i] = new AliMUONSt345SlatSegmentation(0); | |
dd1f2c35 | 418 | fDESegmentations->Add(slatsegNB[i]); |
a9d4d160 | 419 | slatsegNB[i]->SetPadSize(1./1.4,10.); |
a713db22 | 420 | slatsegNB[i]->SetPadDivision(ndiv); |
421 | slatsegNB[i]->SetId(1); | |
422 | slatsegNB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
423 | } | |
424 | ||
425 | Int_t n4[4] = { 0, 1, 2, 2 }; | |
426 | slatsegB[0]->SetPcbBoards(n4); | |
427 | slatsegB[0]->Init(0); // 0 detection element id | |
428 | slatsegNB[0]->SetPcbBoards(n4); | |
429 | slatsegNB[0]->Init(0); // 0 detection element id | |
430 | ||
431 | // Type 112233 for 701, 712, 714, 725 in Ch7 (similar for Ch8) | |
432 | // for the futur official numbering | |
433 | // Type 112233 for 705, 707, 755, 757 in Ch7 (similar for Ch8) | |
434 | // actual numbering in the code to be changed in jan05 | |
435 | // Type 112233 for 901, 902, 911, 912, 914, 915, 924, 925 in Ch9 | |
436 | // (similar for Ch10) for the futur official numbering | |
437 | // Type 112233 for 904, 905, 907, 908, 954, 955, 957, 958 in Ch9 | |
438 | // (similar for Ch10) actual numbering in the code to be changed in jan05 | |
439 | Int_t n5[4] = { 0, 2, 2, 2 }; | |
440 | slatsegB[1]->SetPcbBoards(n5); | |
441 | slatsegB[1]->Init(0); // 0 detection element id | |
442 | slatsegNB[1]->SetPcbBoards(n5); | |
443 | slatsegNB[1]->Init(0); // 0 detection element id | |
444 | ||
445 | // Type 112230 for 702, 711, 715, 724 in Ch7 (similar for Ch8) | |
446 | // for the futur official numbering | |
447 | // Type 112230 for 704, 708, 754, 758 in Ch7 (similar for Ch8) | |
448 | // actual numbering in the code to be changed in jan05 | |
449 | Int_t n6[4] = { 0, 2, 2, 1 }; | |
450 | slatsegB[2]->SetPcbBoards(n6); | |
451 | slatsegB[2]->Init(0); // 0 detection element id | |
452 | slatsegNB[2]->SetPcbBoards(n6); | |
453 | slatsegNB[2]->Init(0); // 0 detection element id | |
454 | ||
455 | // Type 222330 for 703, 710, 716, 723 in Ch7 (similar for Ch8) | |
456 | // for the futur official numbering | |
457 | // Type 222330 for 703, 709, 753, 759 in Ch7 (similar for Ch8) | |
458 | // actual numbering in the code to be changed in jan05 | |
459 | Int_t n7[4] = { 0, 0, 3, 2 }; | |
460 | slatsegB[3]->SetPcbBoards(n7); | |
461 | slatsegB[3]->Init(0); // 0 detection element id | |
462 | slatsegNB[3]->SetPcbBoards(n7); | |
f1501d74 | 463 | slatsegNB[3]->Init(0); // 0 detection element id |
a713db22 | 464 | |
465 | // Type 223300 for 704, 709, 717, 722 in Ch7 (similar for Ch8) | |
466 | // for the futur official numbering | |
467 | // Type 223300 for 702, 710, 752, 760 in Ch7 (similar for Ch8) | |
468 | // actual numbering in the code to be changed in jan05 | |
469 | Int_t n8[4] = { 0, 0, 2, 2 }; | |
470 | slatsegB[4]->SetPcbBoards(n8); | |
471 | slatsegB[4]->Init(0); // 0 detection element id | |
472 | slatsegNB[4]->SetPcbBoards(n8); | |
473 | slatsegNB[4]->Init(0); // 0 detection element id | |
474 | ||
475 | // Type 333000 for 705, 708, 718, 721 in Ch7 (similar for Ch8) | |
476 | // for the futur official numbering | |
477 | // Type 333000 for 701, 711, 751, 761 in Ch7 (similar for Ch8) | |
478 | // actual numbering in the code to be changed in jan05 | |
479 | // Type 333000 for 906, 907, 919, 920 in Ch9 (similar for Ch10) | |
480 | // for the futur official numbering | |
481 | // Type 333000 for 900, 912, 950, 962 in Ch9 (similar for Ch10) | |
482 | // actual numbering in the code to be changed in jan05 | |
483 | Int_t n9[4] = { 0, 0, 0, 3 }; | |
484 | slatsegB[5]->SetPcbBoards(n9); | |
485 | slatsegB[5]->Init(0); // 0 detection element id | |
486 | slatsegNB[5]->SetPcbBoards(n9); | |
487 | slatsegNB[5]->Init(0); // 0 detection element id | |
488 | ||
489 | // Type 330000 for 706, 707, 719, 720 in Ch7 (similar for Ch8) | |
490 | // for the futur official numbering | |
491 | // Type 330000 for 700, 712, 750, 762 in Ch7 (similar for Ch8) | |
492 | // actual numbering in the code to be changed in jan05 | |
493 | Int_t n10[4] = { 0, 0, 0, 2 }; | |
494 | slatsegB[6]->SetPcbBoards(n10); | |
495 | slatsegB[6]->Init(0); // 0 detection element id | |
496 | slatsegNB[6]->SetPcbBoards(n10); | |
497 | slatsegNB[6]->Init(0); // 0 detection element id | |
498 | ||
499 | ||
500 | for (Int_t chamber = 6; chamber < 8; chamber++) { | |
501 | ||
502 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
503 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
79b4ba23 | 504 | |
a713db22 | 505 | // id detection elt for chamber 1 |
506 | Int_t id0 = (chamber+1)*100; | |
507 | ||
508 | //-------------------------------------------------------- | |
509 | // Configuration for Chamber TC6/7 (Station 4) ---------- | |
510 | ||
511 | ||
512 | fMUON->SetNsec(chamber,2); | |
513 | ||
514 | // cathode 0 | |
515 | // type 122330 | |
e856ab99 | 516 | segmentation[0]->Add(id0+13, slatsegB[0]); |
517 | segmentation[0]->Add(id0 , slatsegB[0]); | |
a713db22 | 518 | |
519 | // type 112233 | |
e856ab99 | 520 | segmentation[0]->Add(id0+14, slatsegB[1]); |
521 | segmentation[0]->Add(id0+12, slatsegB[1]); | |
522 | segmentation[0]->Add(id0+25, slatsegB[1]); | |
523 | segmentation[0]->Add(id0+ 1, slatsegB[1]); | |
a713db22 | 524 | |
525 | // type 112230 | |
e856ab99 | 526 | segmentation[0]->Add(id0+15, slatsegB[2]); |
527 | segmentation[0]->Add(id0+11, slatsegB[2]); | |
528 | segmentation[0]->Add(id0+24, slatsegB[2]); | |
529 | segmentation[0]->Add(id0+ 2, slatsegB[2]); | |
a713db22 | 530 | |
531 | // type 222330 | |
e856ab99 | 532 | segmentation[0]->Add(id0+16, slatsegB[3]); |
533 | segmentation[0]->Add(id0+10, slatsegB[3]); | |
534 | segmentation[0]->Add(id0+23, slatsegB[3]); | |
a713db22 | 535 | segmentation[0]->Add(id0+ 3, slatsegB[3]); |
a713db22 | 536 | |
537 | // type 223300 | |
e856ab99 | 538 | segmentation[0]->Add(id0+17, slatsegB[4]); |
539 | segmentation[0]->Add(id0+ 9, slatsegB[4]); | |
540 | segmentation[0]->Add(id0+22, slatsegB[4]); | |
541 | segmentation[0]->Add(id0+ 4, slatsegB[4]); | |
a713db22 | 542 | |
543 | // type 333000 | |
e856ab99 | 544 | segmentation[0]->Add(id0+18, slatsegB[5]); |
545 | segmentation[0]->Add(id0+ 8, slatsegB[5]); | |
546 | segmentation[0]->Add(id0+21, slatsegB[5]); | |
547 | segmentation[0]->Add(id0+ 5, slatsegB[5]); | |
a713db22 | 548 | |
549 | // type 330000 | |
e856ab99 | 550 | segmentation[0]->Add(id0+19, slatsegB[6]); |
551 | segmentation[0]->Add(id0+ 7, slatsegB[6]); | |
552 | segmentation[0]->Add(id0+20, slatsegB[6]); | |
553 | segmentation[0]->Add(id0+ 6, slatsegB[6]); | |
79b4ba23 | 554 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); |
a713db22 | 555 | |
556 | // cathode 1 | |
557 | // type 122330 | |
e856ab99 | 558 | segmentation[1]->Add(id0+13, slatsegNB[0]); |
559 | segmentation[1]->Add(id0 , slatsegNB[0]); | |
a713db22 | 560 | |
561 | // type 112233 | |
e856ab99 | 562 | segmentation[1]->Add(id0+14, slatsegNB[1]); |
563 | segmentation[1]->Add(id0+12, slatsegNB[1]); | |
564 | segmentation[1]->Add(id0+25, slatsegNB[1]); | |
565 | segmentation[1]->Add(id0+ 1, slatsegNB[1]); | |
a713db22 | 566 | |
567 | // type 112230 | |
e856ab99 | 568 | segmentation[1]->Add(id0+15, slatsegNB[2]); |
569 | segmentation[1]->Add(id0+11, slatsegNB[2]); | |
570 | segmentation[1]->Add(id0+24, slatsegNB[2]); | |
571 | segmentation[1]->Add(id0+ 2, slatsegNB[2]); | |
a713db22 | 572 | |
573 | // type 222330 | |
e856ab99 | 574 | segmentation[1]->Add(id0+16, slatsegNB[3]); |
575 | segmentation[1]->Add(id0+10, slatsegNB[3]); | |
576 | segmentation[1]->Add(id0+23, slatsegNB[3]); | |
a713db22 | 577 | segmentation[1]->Add(id0+ 3, slatsegNB[3]); |
a713db22 | 578 | |
579 | // type 223300 | |
e856ab99 | 580 | segmentation[1]->Add(id0+17, slatsegNB[4]); |
581 | segmentation[1]->Add(id0+ 9, slatsegNB[4]); | |
582 | segmentation[1]->Add(id0+22, slatsegNB[4]); | |
583 | segmentation[1]->Add(id0+ 4, slatsegNB[4]); | |
a713db22 | 584 | |
585 | // type 333000 | |
e856ab99 | 586 | segmentation[1]->Add(id0+18, slatsegNB[5]); |
587 | segmentation[1]->Add(id0+ 8, slatsegNB[5]); | |
588 | segmentation[1]->Add(id0+21, slatsegNB[5]); | |
589 | segmentation[1]->Add(id0+ 5, slatsegNB[5]); | |
a713db22 | 590 | |
591 | // type 330000 | |
e856ab99 | 592 | segmentation[1]->Add(id0+19, slatsegNB[6]); |
593 | segmentation[1]->Add(id0+ 7, slatsegNB[6]); | |
594 | segmentation[1]->Add(id0+20, slatsegNB[6]); | |
595 | segmentation[1]->Add(id0+ 6, slatsegNB[6]); | |
a713db22 | 596 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); |
597 | ||
598 | fMUON->SetResponseModel(chamber, fResponse0); | |
599 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
600 | } | |
601 | } | |
602 | ||
603 | //__________________________________________________________________________ | |
604 | void AliMUONFactoryV2::BuildStation5() | |
79b4ba23 | 605 | { |
a713db22 | 606 | //-------------------------------------------------------- |
607 | // Configuration for Chamber TC9/10 (Station 5) --------- | |
608 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
609 | ||
610 | AliMUONGeometrySegmentation* segmentation[2]; | |
611 | ||
612 | //Slats Segmentations | |
613 | AliMUONSt345SlatSegmentation *slatsegB[6]; // Types of segmentation for St5 | |
614 | AliMUONSt345SlatSegmentation *slatsegNB[6]; | |
615 | // Bending | |
616 | ||
617 | Int_t ndiv[4] ={ 4, 4, 2, 1}; // densities zones | |
618 | for(Int_t i = 0; i < 6; i++) { | |
619 | slatsegB[i] = new AliMUONSt345SlatSegmentation(1); | |
dd1f2c35 | 620 | fDESegmentations->Add(slatsegB[i]); |
a713db22 | 621 | slatsegB[i]->SetPadSize(10.,0.5); |
622 | slatsegB[i]->SetPadDivision(ndiv); | |
623 | slatsegB[i]->SetId(1); | |
624 | slatsegB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
625 | slatsegNB[i] = new AliMUONSt345SlatSegmentation(0); | |
dd1f2c35 | 626 | fDESegmentations->Add(slatsegNB[i]); |
a9d4d160 | 627 | slatsegNB[i]->SetPadSize(1./1.4,10.); |
a713db22 | 628 | slatsegNB[i]->SetPadDivision(ndiv); |
629 | slatsegNB[i]->SetId(1); | |
630 | slatsegNB[i]->SetDAnod(AliMUONConstants::Pitch()); | |
631 | } | |
632 | ||
633 | // Type 122330 for 900, 913 in Ch9 (similar for Ch10) | |
634 | // for the futur official numbering | |
635 | // Type 122330 for 906, 956 in Ch9 (similar for Ch10) | |
636 | // actual numbering in the code to be changed in jan05 | |
637 | Int_t n4[4] = { 0, 1, 2, 2 }; | |
638 | slatsegB[0]->SetPcbBoards(n4); | |
639 | slatsegB[0]->Init(0); // 0 detection element id | |
640 | slatsegNB[0]->SetPcbBoards(n4); | |
641 | slatsegNB[0]->Init(0); // 0 detection element id | |
642 | ||
643 | // Type 112233 for 901, 902, 911, 912, 914, 915, 924, 925 in Ch9 | |
644 | // (similar for Ch10) for the futur official numbering | |
645 | // Type 112233 for 904, 905, 907, 908, 954, 955, 957, 958 in Ch9 | |
646 | // (similar for Ch10) actual numbering in the code to be changed in jan05 | |
647 | Int_t n5[4] = { 0, 2, 2, 2 }; | |
648 | slatsegB[1]->SetPcbBoards(n5); | |
649 | slatsegB[1]->Init(0); // 0 detection element id | |
650 | slatsegNB[1]->SetPcbBoards(n5); | |
651 | slatsegNB[1]->Init(0); // 0 detection element id | |
652 | ||
653 | // Type 333000 for 906, 907, 919, 920 in Ch9 (similar for Ch10) | |
654 | // for the futur official numbering | |
655 | // Type 333000 for 900, 912, 950, 962 in Ch9 (similar for Ch10) | |
656 | // actual numbering in the code to be changed in jan05 | |
657 | Int_t n9[4] = { 0, 0, 0, 3 }; | |
658 | slatsegB[2]->SetPcbBoards(n9); | |
659 | slatsegB[2]->Init(0); // 0 detection element id | |
660 | slatsegNB[2]->SetPcbBoards(n9); | |
661 | slatsegNB[2]->Init(0); // 0 detection element id | |
662 | ||
663 | // Type 222333 for 903, 910, 916, 923 in Ch9 (similar for Ch10) | |
664 | // for the futur official numbering | |
665 | // Type 222333 for 903, 909, 953, 959 in Ch9 (similar for Ch10) | |
666 | // actual numbering in the code to be changed in jan05 | |
667 | Int_t n11[4] = { 0, 0, 3, 3 }; | |
668 | slatsegB[3]->SetPcbBoards(n11); | |
669 | slatsegB[3]->Init(0); // 0 detection element id | |
670 | slatsegNB[3]->SetPcbBoards(n11); | |
671 | slatsegNB[3]->Init(0); // 0 detection element id | |
672 | ||
673 | // Type 223330 for 904, 909, 917, 922 in Ch9 (similar for Ch10) | |
674 | // for the futur official numbering | |
675 | // Type 223330 for 902, 910, 952, 960 in Ch9 (similar for Ch10) | |
676 | // actual numbering in the code to be changed in jan05 | |
677 | Int_t n12[4] = { 0, 0, 2, 3 }; | |
678 | slatsegB[4]->SetPcbBoards(n12); | |
679 | slatsegB[4]->Init(0); // 0 detection element id | |
680 | slatsegNB[4]->SetPcbBoards(n12); | |
681 | slatsegNB[4]->Init(0); // 0 detection element id | |
682 | ||
683 | // Type 333300 for 905, 908, 918, 921 in Ch9 (similar for Ch10) | |
684 | // for the futur official numbering | |
685 | // Type 333300 for 901, 911, 951, 961 in Ch9 (similar for Ch10) | |
686 | // actual numbering in the code to be changed in jan05 | |
687 | Int_t n13[4] = { 0, 0, 0, 4 }; | |
688 | slatsegB[5]->SetPcbBoards(n13); | |
689 | slatsegB[5]->Init(0); // 0 detection element id | |
690 | slatsegNB[5]->SetPcbBoards(n13); | |
691 | slatsegNB[5]->Init(0); // 0 detection element id | |
692 | ||
693 | for (Int_t chamber = 8; chamber < 10; chamber++) { | |
694 | ||
695 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
696 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
697 | ||
698 | // id detection elt for chamber 1 | |
699 | Int_t id0 = (chamber+1)*100; | |
700 | ||
701 | //-------------------------------------------------------- | |
702 | // Configuration for Chamber TC8/9 (Station 5) ---------- | |
703 | ||
704 | ||
705 | fMUON->SetNsec(chamber,2); | |
706 | ||
707 | // cathode 0 | |
708 | // type 122330 | |
e856ab99 | 709 | segmentation[0]->Add(id0+13, slatsegB[0]); |
710 | segmentation[0]->Add(id0 , slatsegB[0]); | |
a713db22 | 711 | |
712 | // type 112233 | |
e856ab99 | 713 | segmentation[0]->Add(id0+15, slatsegB[1]); |
714 | segmentation[0]->Add(id0+14, slatsegB[1]); | |
715 | segmentation[0]->Add(id0+12, slatsegB[1]); | |
716 | segmentation[0]->Add(id0+11, slatsegB[1]); | |
717 | segmentation[0]->Add(id0+24, slatsegB[1]); | |
718 | segmentation[0]->Add(id0+25, slatsegB[1]); | |
719 | segmentation[0]->Add(id0+ 1, slatsegB[1]); | |
720 | segmentation[0]->Add(id0+ 2, slatsegB[1]); | |
a713db22 | 721 | |
722 | // type 333000 | |
e856ab99 | 723 | segmentation[0]->Add(id0+19, slatsegB[2]); |
724 | segmentation[0]->Add(id0+ 7, slatsegB[2]); | |
725 | segmentation[0]->Add(id0+20, slatsegB[2]); | |
726 | segmentation[0]->Add(id0+ 6, slatsegB[2]); | |
a713db22 | 727 | |
728 | // type 222333 | |
e856ab99 | 729 | segmentation[0]->Add(id0+16, slatsegB[3]); |
730 | segmentation[0]->Add(id0+10, slatsegB[3]); | |
731 | segmentation[0]->Add(id0+23, slatsegB[3]); | |
a713db22 | 732 | segmentation[0]->Add(id0+ 3, slatsegB[3]); |
a713db22 | 733 | |
734 | // type 223330 | |
e856ab99 | 735 | segmentation[0]->Add(id0+17, slatsegB[4]); |
736 | segmentation[0]->Add(id0+ 9, slatsegB[4]); | |
737 | segmentation[0]->Add(id0+22, slatsegB[4]); | |
738 | segmentation[0]->Add(id0+ 4, slatsegB[4]); | |
a713db22 | 739 | |
740 | // type 333300 | |
e856ab99 | 741 | segmentation[0]->Add(id0+18, slatsegB[5]); |
742 | segmentation[0]->Add(id0+ 8, slatsegB[5]); | |
743 | segmentation[0]->Add(id0+21, slatsegB[5]); | |
744 | segmentation[0]->Add(id0+ 5, slatsegB[5]); | |
a713db22 | 745 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); |
746 | ||
747 | // cathode 1 | |
748 | // type 122330 | |
e856ab99 | 749 | segmentation[1]->Add(id0+13, slatsegNB[0]); |
750 | segmentation[1]->Add(id0 , slatsegNB[0]); | |
a713db22 | 751 | |
752 | // type 112233 | |
e856ab99 | 753 | segmentation[1]->Add(id0+15, slatsegNB[1]); |
754 | segmentation[1]->Add(id0+14, slatsegNB[1]); | |
755 | segmentation[1]->Add(id0+12, slatsegNB[1]); | |
756 | segmentation[1]->Add(id0+11, slatsegNB[1]); | |
757 | segmentation[1]->Add(id0+24, slatsegNB[1]); | |
758 | segmentation[1]->Add(id0+25, slatsegNB[1]); | |
759 | segmentation[1]->Add(id0+ 1, slatsegNB[1]); | |
760 | segmentation[1]->Add(id0+ 2, slatsegNB[1]); | |
a713db22 | 761 | |
762 | // type 333000 | |
e856ab99 | 763 | segmentation[1]->Add(id0+19 , slatsegNB[2]); |
764 | segmentation[1]->Add(id0+ 7, slatsegNB[2]); | |
765 | segmentation[1]->Add(id0+20, slatsegNB[2]); | |
766 | segmentation[1]->Add(id0+ 6, slatsegNB[2]); | |
a713db22 | 767 | |
768 | // type 222333 | |
e856ab99 | 769 | segmentation[1]->Add(id0+16, slatsegNB[3]); |
770 | segmentation[1]->Add(id0+10, slatsegNB[3]); | |
771 | segmentation[1]->Add(id0+23, slatsegNB[3]); | |
a713db22 | 772 | segmentation[1]->Add(id0+ 3, slatsegNB[3]); |
a713db22 | 773 | |
774 | // type 223330 | |
e856ab99 | 775 | segmentation[1]->Add(id0+17, slatsegNB[4]); |
776 | segmentation[1]->Add(id0+ 9, slatsegNB[4]); | |
777 | segmentation[1]->Add(id0+22, slatsegNB[4]); | |
778 | segmentation[1]->Add(id0+ 4, slatsegNB[4]); | |
a713db22 | 779 | |
780 | // type 333300 | |
e856ab99 | 781 | segmentation[1]->Add(id0+18, slatsegNB[5]); |
782 | segmentation[1]->Add(id0+ 8, slatsegNB[5]); | |
783 | segmentation[1]->Add(id0+21, slatsegNB[5]); | |
784 | segmentation[1]->Add(id0+ 5, slatsegNB[5]); | |
a713db22 | 785 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); |
79b4ba23 | 786 | |
787 | fMUON->SetResponseModel(chamber, fResponse0); | |
a713db22 | 788 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread |
789 | } | |
790 | } | |
791 | ||
792 | //__________________________________________________________________________ | |
793 | void AliMUONFactoryV2::BuildStation6() | |
79b4ba23 | 794 | { |
a713db22 | 795 | // Create Trigger geometry segmentation for given chamber and cathod |
796 | ||
797 | ||
79b4ba23 | 798 | AliMUONGeometrySegmentation *chamberSeg[2]; |
a713db22 | 799 | // Cluster-size off |
79b4ba23 | 800 | AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger; |
a713db22 | 801 | // Cluster-size on |
79b4ba23 | 802 | // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1; |
803 | ||
804 | for (Int_t chamber = 10; chamber < 14; chamber++) { | |
805 | ||
806 | //Trigger Segmentation | |
807 | AliMUONTriggerSegmentation *trigSegX[9]; | |
808 | AliMUONTriggerSegmentation *trigSegY[9]; | |
809 | for(Int_t i=0; i<9; i++) { | |
810 | trigSegX[i] = new AliMUONTriggerSegmentation(1); | |
811 | trigSegY[i] = new AliMUONTriggerSegmentation(0); | |
dd1f2c35 | 812 | fDESegmentations->Add(trigSegX[i]); |
813 | fDESegmentations->Add(trigSegY[i]); | |
79b4ba23 | 814 | trigSegX[i]->SetLineNumber(9-i); |
815 | trigSegY[i]->SetLineNumber(9-i); | |
816 | } | |
817 | ||
818 | AliMUONChamber *iChamber, *iChamber1; | |
819 | iChamber1 = &fMUON->Chamber(10); | |
820 | iChamber = &fMUON->Chamber(chamber); | |
821 | Float_t zpos1= - iChamber1->Z(); | |
822 | Float_t zpos = - iChamber->Z(); | |
823 | Float_t zRatio = zpos / zpos1; | |
824 | ||
825 | // init | |
826 | Float_t stripWidth[3]={0.,0.,0.}; // 1.0625 2.125 4.25 | |
827 | Float_t stripLength[4]={0.,0.,0.,0.}; // 17. 34. 51. 68. | |
828 | for (Int_t i=0; i<3; i++) | |
829 | stripWidth[i]=AliMUONTriggerConstants::StripWidth(i)*zRatio; | |
830 | for (Int_t i=0; i<4; i++) | |
831 | stripLength[i]=AliMUONTriggerConstants::StripLength(i)*zRatio; | |
832 | Int_t nStrip[7]={0,0,0,0,0,0,0}; | |
833 | Float_t stripYsize[7]={0.,0.,0.,0.,0.,0.,0.}; | |
834 | Float_t stripXsize[7]={0.,0.,0.,0.,0.,0.,0.}; | |
835 | ||
836 | // chamber 8 0 cathode 0 | |
837 | for (Int_t i=0; i<7; i++) nStrip[i]=16; | |
838 | for (Int_t i=0; i<7; i++) stripYsize[i]=stripWidth[2]; | |
839 | for (Int_t i=0; i<6; i++) stripXsize[i]=stripLength[1]; | |
840 | stripXsize[6]=stripLength[2]; | |
841 | trigSegX[8]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
842 | trigSegX[0]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
843 | ||
844 | // chamber 8 7 1 0 cathode 1 | |
845 | for (Int_t i=0; i<6; i++) nStrip[i]=8; | |
c753a2eb | 846 | nStrip[6]=16; |
79b4ba23 | 847 | for (Int_t i=0; i<7; i++) stripYsize[i]=stripLength[3]; |
848 | for (Int_t i=0; i<7; i++) stripXsize[i]=stripWidth[2]; | |
849 | trigSegY[8]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
850 | trigSegY[7]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
851 | trigSegY[1]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
852 | trigSegY[0]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
a713db22 | 853 | |
79b4ba23 | 854 | // chamber 7 6 2 1 cathode 0 |
855 | for (Int_t i=0; i<6; i++) nStrip[i]=32; | |
856 | nStrip[6]=16; | |
857 | for (Int_t i=0; i<6; i++) stripYsize[i]=stripWidth[1]; | |
858 | stripYsize[6]=stripWidth[2]; | |
859 | for (Int_t i=0; i<6; i++) stripXsize[i]=stripLength[1]; | |
860 | stripXsize[6]=stripLength[2]; | |
861 | trigSegX[7]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
862 | trigSegX[6]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
863 | trigSegX[2]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
864 | trigSegX[1]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
865 | ||
866 | // chamber 6 2 cathode 1 | |
867 | for (Int_t i=0; i<5; i++) nStrip[i]=16; | |
868 | for (Int_t i=5; i<6; i++) nStrip[i]=8; | |
869 | nStrip[6]=16; | |
870 | for (Int_t i=0; i<7; i++) stripYsize[i]=stripLength[3]; | |
871 | for (Int_t i=0; i<5; i++) stripXsize[i]=stripWidth[1]; | |
872 | for (Int_t i=5; i<7; i++) stripXsize[i]=stripWidth[2]; | |
873 | trigSegY[6]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
874 | trigSegY[2]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
875 | ||
876 | // chamber 5 3 cathode 0 | |
877 | nStrip[0]=48; | |
878 | for (Int_t i=1; i<3; i++) nStrip[i]=64; | |
879 | for (Int_t i=3; i<6; i++) nStrip[i]=32; | |
880 | nStrip[6]=16; | |
881 | for (Int_t i=0; i<3; i++) stripYsize[i]=stripWidth[0]; | |
882 | for (Int_t i=3; i<6; i++) stripYsize[i]=stripWidth[1]; | |
883 | stripYsize[6]=stripWidth[2]; | |
884 | for (Int_t i=0; i<6; i++) stripXsize[i]=stripLength[1]; | |
885 | stripXsize[6]=stripLength[2]; | |
886 | trigSegX[5]->Init(0,nStrip,stripYsize,stripXsize,stripLength[0]); | |
887 | trigSegX[3]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
888 | ||
889 | // chamber 5 3 cathode 1 | |
890 | for (Int_t i=0; i<5; i++) nStrip[i]=16; | |
891 | for (Int_t i=5; i<6; i++) nStrip[5]=8; | |
892 | nStrip[6]=16; | |
893 | stripYsize[0]=stripLength[2]; | |
4ee2174e | 894 | for (Int_t i=1; i<7; i++) stripYsize[i]=stripLength[3]; |
79b4ba23 | 895 | for (Int_t i=0; i<5; i++) stripXsize[i]=stripWidth[1]; |
896 | for (Int_t i=5; i<7; i++) stripXsize[i]=stripWidth[2]; | |
897 | trigSegY[5]->Init(0,nStrip,stripYsize,stripXsize,stripLength[0]); | |
898 | trigSegY[3]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
899 | ||
900 | // chamber 4 cathode 0 | |
901 | nStrip[0]=0; | |
902 | for (Int_t i=1; i<3; i++) nStrip[i]=64; | |
903 | for (Int_t i=3; i<6; i++) nStrip[i]=32; | |
904 | nStrip[6]=16; | |
905 | stripYsize[0]=0.; | |
906 | for (Int_t i=1; i<3; i++) stripYsize[i]=stripWidth[0]; | |
907 | for (Int_t i=3; i<6; i++) stripYsize[i]=stripWidth[1]; | |
908 | stripYsize[6]=stripWidth[2]; | |
909 | stripXsize[0]=0; | |
910 | stripXsize[1]=stripLength[0]; | |
911 | for (Int_t i=2; i<6; i++) stripXsize[i]=stripLength[1]; | |
912 | stripXsize[6]=stripLength[2]; | |
913 | trigSegX[4]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
914 | ||
915 | // chamber 4 cathode 1 | |
916 | nStrip[0]=0; | |
917 | nStrip[1]=8; | |
918 | for (Int_t i=2; i<5; i++) nStrip[i]=16; | |
919 | for (Int_t i=5; i<6; i++) nStrip[i]=8; | |
920 | nStrip[6]=16; | |
921 | stripYsize[0]=0.; | |
922 | for (Int_t i=1; i<7; i++) stripYsize[i]=stripLength[3]; | |
923 | stripXsize[0]=0.; | |
924 | for (Int_t i=1; i<5; i++) stripXsize[i]=stripWidth[1]; | |
925 | for (Int_t i=5; i<7; i++) stripXsize[i]=stripWidth[2]; | |
926 | trigSegY[4]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
927 | ||
928 | chamberSeg[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
929 | chamberSeg[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
930 | ||
931 | fMUON->SetNsec(chamber,2); | |
932 | Int_t icount=chamber-10; // chamber counter (0 1 2 3) | |
933 | Int_t id0=(10+icount+1)*100; | |
934 | ||
935 | ||
936 | // printf("in CreateTriggerSegmentation here 0 id0=%i \n",id0); | |
937 | ||
938 | for (Int_t i = 0; i < 9; i++) { | |
939 | ||
940 | // cathode 0 | |
941 | chamberSeg[0]->Add(id0+i, trigSegX[i]); | |
942 | chamberSeg[0]->Add(id0+50+i, trigSegX[i]); | |
943 | fMUON->SetSegmentationModel(chamber, 1, chamberSeg[0]); | |
944 | ||
945 | // cathode 1 | |
946 | chamberSeg[1]->Add(id0+i, trigSegY[i]); | |
947 | chamberSeg[1]->Add(id0+50+i, trigSegY[i]); | |
948 | fMUON->SetSegmentationModel(chamber, 2, chamberSeg[1]); | |
949 | ||
950 | } | |
951 | ||
952 | fMUON->SetResponseModel(chamber, responseTrigger0); | |
953 | fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on cathodes | |
a713db22 | 954 | |
955 | ||
79b4ba23 | 956 | // printf("in CreateTriggerSegmentation here 1\n"); |
a713db22 | 957 | |
79b4ba23 | 958 | if (!id0) { |
959 | AliWarning(Form("Segmentation for chamber %d is not yet defined",chamber)); | |
960 | return ; | |
961 | } | |
a713db22 | 962 | } |
79b4ba23 | 963 | } |
a713db22 | 964 | //__________________________________________________________________________ |
965 | void AliMUONFactoryV2::Build(AliMUON* where, const char* what) | |
966 | { | |
967 | // | |
968 | // Construct MUON from chambers, segmentation and responses | |
969 | // | |
970 | ||
971 | fMUON = where; | |
972 | char tmp[20]; | |
973 | strcpy(tmp, what); | |
974 | ||
975 | if (strcmp(tmp, "default")==0) { | |
976 | // Set default parameters | |
977 | fMUON->SetIshunt(0); | |
978 | fMUON->SetMaxStepGas(0.1); | |
979 | fMUON->SetMaxStepAlu(0.1); | |
980 | ||
3bf95daf | 981 | // Build stations |
a713db22 | 982 | BuildCommon(); |
3bf95daf | 983 | if (IsGeometryDefined(0)) BuildStation1(); |
984 | if (IsGeometryDefined(2)) BuildStation2(); | |
985 | if (IsGeometryDefined(4)) BuildStation3(); | |
986 | if (IsGeometryDefined(6)) BuildStation4(); | |
987 | if (IsGeometryDefined(8)) BuildStation5(); | |
988 | if (IsGeometryDefined(10)) BuildStation6(); | |
a713db22 | 989 | } |
990 | else | |
991 | AliDebug(0,"Non default version of MUON selected. You have to construct yourself the MUON elements !!"); | |
992 | } | |
993 | ||
994 | //__________________________________________________________________________ | |
995 | void AliMUONFactoryV2::BuildStation(AliMUON* where, Int_t stationNumber) | |
996 | { | |
997 | // | |
998 | // Construct MUON from chambers, segmentation and responses | |
999 | // | |
1000 | // Version 0 | |
1001 | // | |
1002 | // First define the number of planes that are segmented (1 or 2) by a call | |
1003 | // to SetNsec. | |
1004 | // Then chose for each chamber (chamber plane) the segmentation | |
1005 | // and response model. | |
1006 | // They should be equal for the two chambers of each station. In a future | |
1007 | // version this will be enforced. | |
1008 | // | |
1009 | ||
1010 | fMUON = where; | |
1011 | if (!fResponse0) BuildCommon(); | |
1012 | ||
1013 | switch (stationNumber) { | |
1014 | case 1: BuildStation1(); break; | |
1015 | case 2: BuildStation2(); break; | |
1016 | case 3: BuildStation3(); break; | |
1017 | case 4: BuildStation4(); break; | |
1018 | case 5: BuildStation5(); break; | |
1019 | case 6: BuildStation6(); break; | |
1020 | ||
1021 | default: AliFatal("Wrong station number"); | |
1022 | } | |
1023 | } |