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