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