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