Modifications needed by the HBT analysis (P.Skowronski)
[u/mrichter/AliRoot.git] / MUON / AliMUONFactory.cxx
CommitLineData
be3bb6c1 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
88cb7938 20/* $Id$ */
ba030c0e 21
be3bb6c1 22#include "AliMUONFactory.h"
23#include "AliMUON.h"
24#include "AliMUONChamber.h"
25#include "AliMUONResponseV0.h"
26#include "AliMUONResponseTrigger.h"
27#include "AliMUONSegmentationV0.h"
28#include "AliMUONSegmentationV01.h"
29#include "AliMUONSegmentationV02.h"
30#include "AliMUONSegmentationV04.h"
31#include "AliMUONSegmentationV05.h"
32#include "AliMUONSegmentationSlat.h"
33#include "AliMUONSegmentationSlatN.h"
34#include "AliMUONSegmentationTrigger.h"
35#include "AliMUONSegmentationTriggerX.h"
36#include "AliMUONSegmentationTriggerY.h"
37
38ClassImp(AliMUONFactory)
39
ba030c0e 40//__________________________________________________________________________
41AliMUONFactory::AliMUONFactory()
42 : TObject(),
43 fMUON(0),
44 fResponse0(0)
be3bb6c1 45{
46//
ba030c0e 47}
be3bb6c1 48
ba030c0e 49//__________________________________________________________________________
50AliMUONFactory::~AliMUONFactory()
51{
be3bb6c1 52//
ba030c0e 53}
54
55//__________________________________________________________________________
56void AliMUONFactory::BuildCommon()
57{
be3bb6c1 58//
ba030c0e 59// Construct the default response.
be3bb6c1 60//
ba030c0e 61
be3bb6c1 62 // Default response: 5 mm of gas
ba030c0e 63 fResponse0 = new AliMUONResponseV0;
64 fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
65 fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
66 fResponse0->SetPitch(0.25); // anode-cathode distance
67 fResponse0->SetSigmaIntegration(10.);
4ac9d21e 68 fResponse0->SetChargeSlope(10);
ba030c0e 69 fResponse0->SetChargeSpread(0.18, 0.18);
70 fResponse0->SetMaxAdc(4096);
4ac9d21e 71 fResponse0->SetSaturation(3000);
ba030c0e 72 fResponse0->SetZeroSuppression(6);
73}
74
75//__________________________________________________________________________
76void AliMUONFactory::BuildStation1()
77{
78//--------------------------------------------------------
79// Configuration for Chamber TC1/2 (Station 1) ----------
80//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81
be3bb6c1 82 // Response for 4 mm of gas (station 1)
83 // automatic consistency with width of sensitive medium in CreateGeometry ????
84 AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
85 // Mathieson parameters from L.Kharmandarian's thesis, page 190
86 responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
87 responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
88 responseSt1->SetPitch(0.20); // anode-cathode distance
89 responseSt1->SetSigmaIntegration(10.);
90 // ChargeSlope larger to compensate for the smaller anode-cathode distance
91 // and keep the same most probable ADC channel for mip's
92 responseSt1->SetChargeSlope(62.5);
93 // assumed proportionality to anode-cathode distance for ChargeSpread
94 responseSt1->SetChargeSpread(0.144, 0.144);
95 responseSt1->SetMaxAdc(4096);
4ac9d21e 96 responseSt1->SetSaturation(3000);
be3bb6c1 97 responseSt1->SetZeroSuppression(6);
98
ba030c0e 99 //--------------------------------------------------------
100 // Configuration for Chamber TC1/2 (Station 1) ----------
101
be3bb6c1 102 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
103 Int_t nseg1[4]={4, 4, 2, 1};
104//
ba030c0e 105 Int_t chamber=1;
106// ^^^^^^^^^^^^^^^^
107 fMUON->SetNsec(chamber-1,2);
be3bb6c1 108//
109 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
110
111 seg11->SetSegRadii(rseg1);
112 seg11->SetPadSize(2.4, 0.4); // smaller pad size
113 seg11->SetDAnod(0.20); // smaller distance between anode wires
114 seg11->SetPadDivision(nseg1);
115
ba030c0e 116 fMUON->SetSegmentationModel(chamber-1, 1, seg11);
be3bb6c1 117
118 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
119 seg12->SetSegRadii(rseg1);
120 seg12->SetPadSize(0.6, 1.6); // smaller pad size
121 seg12->SetDAnod(0.20); // smaller distance between anode wires
122 seg12->SetPadDivision(nseg1);
123
ba030c0e 124 fMUON->SetSegmentationModel(chamber-1, 2, seg12);
be3bb6c1 125
ba030c0e 126 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
127 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
be3bb6c1 128
129 chamber=2;
130// ^^^^^^^^^
131//
ba030c0e 132 fMUON->SetNsec(chamber-1,2);
be3bb6c1 133//
134 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
135 seg21->SetSegRadii(rseg1);
136 seg21->SetPadSize(2.4, 0.4); // smaller pad size
137 seg21->SetDAnod(0.20); // smaller distance between anode wires
138 seg21->SetPadDivision(nseg1);
ba030c0e 139 fMUON->SetSegmentationModel(chamber-1, 1, seg21);
be3bb6c1 140//
141 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
142 seg22->SetSegRadii(rseg1);
143 seg22->SetPadSize(0.6, 1.6); // smaller pad size
144 seg22->SetDAnod(0.20); // smaller distance between anode wires
145 seg22->SetPadDivision(nseg1);
ba030c0e 146 fMUON->SetSegmentationModel(chamber-1, 2, seg22);
be3bb6c1 147
ba030c0e 148 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
149 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
be3bb6c1 150
ba030c0e 151}
152
153//__________________________________________________________________________
154void AliMUONFactory::BuildStation2()
155{
be3bb6c1 156//
157//--------------------------------------------------------
158// Configuration for Chamber TC3/4 (Station 2) -----------
159///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160// Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
ba030c0e 161
9af8b94b 162 Float_t rseg2[4]={23.5, 53.5, 90.5, 122.5};
be3bb6c1 163 Int_t nseg2[4]={4, 4, 2, 1};
164//
ba030c0e 165 Int_t chamber=3;
166// ^^^^^^^^^^^^^^^^
167 fMUON->SetNsec(chamber-1,2);
be3bb6c1 168//
169 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
170 seg31->SetSegRadii(rseg2);
171 seg31->SetPadSize(3.0, 0.5);
172 seg31->SetDAnod(3.0/3./4);
173 seg31->SetPadDivision(nseg2);
ba030c0e 174 fMUON->SetSegmentationModel(chamber-1, 1, seg31);
be3bb6c1 175//
176 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
177 seg32->SetSegRadii(rseg2);
178 seg32->SetPadSize(0.75, 2.0);
179 seg32->SetPadDivision(nseg2);
180 seg32->SetDAnod(3.0/3./4);
181
ba030c0e 182 fMUON->SetSegmentationModel(chamber-1, 2, seg32);
be3bb6c1 183
ba030c0e 184 fMUON->SetResponseModel(chamber-1, fResponse0);
185 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
be3bb6c1 186
187 chamber=4;
188// ^^^^^^^^^
189//
ba030c0e 190 fMUON->SetNsec(chamber-1,2);
be3bb6c1 191//
192 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
193 seg41->SetSegRadii(rseg2);
194 seg41->SetPadSize(3.0, 0.5);
195 seg41->SetDAnod(3.0/3./4);
196 seg41->SetPadDivision(nseg2);
ba030c0e 197 fMUON->SetSegmentationModel(chamber-1, 1, seg41);
be3bb6c1 198//
199 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
200 seg42->SetSegRadii(rseg2);
201 seg42->SetPadSize(0.75, 2.0);
202 seg42->SetPadDivision(nseg2);
203 seg42->SetDAnod(3.0/3./4);
204
ba030c0e 205 fMUON->SetSegmentationModel(chamber-1, 2, seg42);
be3bb6c1 206
ba030c0e 207 fMUON->SetResponseModel(chamber-1, fResponse0);
208 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
209}
be3bb6c1 210
211
ba030c0e 212//__________________________________________________________________________
213void AliMUONFactory::BuildStation3()
214{
be3bb6c1 215//--------------------------------------------------------
216// Configuration for Chamber TC5/6 (Station 3) ----------
217//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ba030c0e 218
be3bb6c1 219 Int_t nseg3[4]={4, 4, 2, 1};
220 Int_t npcb5[36] = {0,0,2,0,
221 0,0,3,0,
222 0,1,3,0,
223 0,2,2,0,
224 0,1,2,0,
225 0,2,2,0,
226 0,1,3,0,
227 0,0,3,0,
228 0,0,2,0};
229
230 Float_t shift = 1.5/2.;
231 Float_t xpos5[9] = {2., 2., 2., 2.,33., 2., 2., 2., 2.};
232 Float_t ypos5 = -(20.+4.*(40.-2.*shift));
233
ba030c0e 234 Int_t chamber=5;
235 fMUON->SetNsec(chamber-1,2);
be3bb6c1 236 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
237 seg51->SetNSlats(9);
238 seg51->SetShift(shift);
239 seg51->SetNPCBperSector(npcb5);
240 seg51->SetSlatXPositions(xpos5);
241 seg51->SetSlatYPosition(ypos5);
242 seg51->SetPadSize(10.,0.5);
243 seg51->SetDAnod(0.25);
244 seg51->SetPadDivision(nseg3);
ba030c0e 245 fMUON->SetSegmentationModel(chamber-1, 1, seg51);
be3bb6c1 246
247 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
248 seg52->SetNSlats(9);
249 seg52->SetShift(shift);
250 seg52->SetNPCBperSector(npcb5);
251 seg52->SetSlatXPositions(xpos5);
252 seg52->SetSlatYPosition(ypos5);
253 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
254 seg52->SetDAnod(0.25);
255 seg52->SetPadDivision(nseg3);
ba030c0e 256 fMUON->SetSegmentationModel(chamber-1, 2, seg52);
257 fMUON->SetResponseModel(chamber-1, fResponse0);
258 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
be3bb6c1 259
260 chamber=6;
ba030c0e 261 fMUON->SetNsec(chamber-1,2);
be3bb6c1 262 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
263 seg61->SetNSlats(9);
264 seg61->SetShift(shift);
265 seg61->SetNPCBperSector(npcb5);
266 seg61->SetSlatXPositions(xpos5);
267 seg61->SetSlatYPosition(ypos5);
268 seg61->SetPadSize(10.,0.5);
269 seg61->SetDAnod(0.25);
270 seg61->SetPadDivision(nseg3);
ba030c0e 271 fMUON->SetSegmentationModel(chamber-1, 1, seg61);
be3bb6c1 272
273 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
274 seg62->SetNSlats(9);
275 seg62->SetShift(shift);
276 seg62->SetNPCBperSector(npcb5);
277 seg62->SetSlatXPositions(xpos5);
278 seg62->SetSlatYPosition(ypos5);
279 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
280 seg62->SetDAnod(0.25);
281 seg62->SetPadDivision(nseg3);
ba030c0e 282 fMUON->SetSegmentationModel(chamber-1, 2, seg62);
283 fMUON->SetResponseModel(chamber-1, fResponse0);
284 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
285}
286
be3bb6c1 287
ba030c0e 288//__________________________________________________________________________
289void AliMUONFactory::BuildStation4()
290{
be3bb6c1 291//--------------------------------------------------------
292// Configuration for Chamber TC7/8 (Station 4) ----------
293//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294
295 Int_t nseg4[4]={4, 4, 2, 1};
296
ba030c0e 297 Int_t chamber=7;
298// ^^^^^^^^^^^^^^^^
be3bb6c1 299
ba030c0e 300 fMUON->SetNsec(chamber-1,2);
be3bb6c1 301//
302 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
ba030c0e 303 Float_t shift = 1.5/2.;
be3bb6c1 304 Int_t npcb7[44] = {0,0,0,3,
305 0,0,2,2,
306 0,0,3,2,
307 0,2,2,1,
308 0,2,2,1,
309 0,1,2,1,
310 0,2,2,1,
311 0,2,2,1,
312 0,0,3,2,
313 0,0,2,2,
314 0,0,0,3};
315 Float_t xpos7[11] = {2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2.};
316 Float_t ypos7 = -(20.+5.*(40.-2.*shift));
317
318 seg71->SetNSlats(11);
319 seg71->SetShift(shift);
320 seg71->SetNPCBperSector(npcb7);
321 seg71->SetSlatXPositions(xpos7);
322 seg71->SetSlatYPosition(ypos7);
323
324 seg71->SetPadSize(10.,0.5);
325 seg71->SetDAnod(0.25);
326 seg71->SetPadDivision(nseg4);
ba030c0e 327 fMUON->SetSegmentationModel(chamber-1, 1, seg71);
be3bb6c1 328
329 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
330
ba030c0e 331 fMUON->SetSegmentationModel(chamber-1, 2, seg72);
be3bb6c1 332 seg72->SetNSlats(11);
333 seg72->SetShift(shift);
334 seg72->SetNPCBperSector(npcb7);
335 seg72->SetSlatXPositions(xpos7);
336 seg72->SetSlatYPosition(ypos7);
337 seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
338 seg72->SetDAnod(0.25);
339 seg72->SetPadDivision(nseg4);
340
ba030c0e 341 fMUON->SetResponseModel(chamber-1, fResponse0);
342 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
be3bb6c1 343
344 chamber=8;
345// ^^^^^^^^^
ba030c0e 346 fMUON->SetNsec(chamber-1,2);
be3bb6c1 347//
348 AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
349
350 seg81->SetNSlats(11);
351 seg81->SetShift(shift);
352 seg81->SetNPCBperSector(npcb7);
353 seg81->SetSlatXPositions(xpos7);
354 seg81->SetSlatYPosition(ypos7);
355 seg81->SetPadSize(10.,0.5);
356 seg81->SetDAnod(0.25);
357 seg81->SetPadDivision(nseg4);
ba030c0e 358 fMUON->SetSegmentationModel(chamber-1, 1, seg81);
be3bb6c1 359
360 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
361
ba030c0e 362 fMUON->SetSegmentationModel(chamber-1, 2, seg82);
be3bb6c1 363 seg82->SetNSlats(11);
364 seg82->SetShift(shift);
365 seg82->SetNPCBperSector(npcb7);
366 seg82->SetSlatXPositions(xpos7);
367 seg82->SetSlatYPosition(ypos7);
368 seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
369 seg82->SetDAnod(0.25);
370 seg82->SetPadDivision(nseg4);
371
ba030c0e 372 fMUON->SetResponseModel(chamber-1, fResponse0);
373 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
374}
be3bb6c1 375
ba030c0e 376//__________________________________________________________________________
377void AliMUONFactory::BuildStation5()
378{
be3bb6c1 379//--------------------------------------------------------
380// Configuration for Chamber TC9/10 (Station 5) ---------
381//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
be3bb6c1 382
ba030c0e 383 Int_t chamber=9;
384// ^^^^^^^^^^^^^^^^
385
386 fMUON->SetNsec(chamber-1,2);
be3bb6c1 387//
388 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
ba030c0e 389
390 Int_t nseg4[4]={4, 4, 2, 1};
391 Float_t shift = 1.5/2.;
be3bb6c1 392 Int_t npcb9[52] = {0,0,0,3,
393 0,0,0,4,
394 0,0,2,3,
395 0,0,3,3,
396 0,2,2,2,
397 0,2,2,2,
398 0,1,2,2,
399 0,2,2,2,
400 0,2,2,2,
401 0,0,3,3,
402 0,0,2,3,
403 0,0,0,4,
404 0,0,0,3};
405
406 Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2., 2.};
407 Float_t ypos9 = -(20.+6.*(40.-2.*shift));
408
409 seg91->SetNSlats(13);
410 seg91->SetShift(shift);
411 seg91->SetNPCBperSector(npcb9);
412 seg91->SetSlatXPositions(xpos9);
413 seg91->SetSlatYPosition(ypos9);
414 seg91->SetPadSize(10.,0.5);
415 seg91->SetDAnod(0.25);
416 seg91->SetPadDivision(nseg4);
ba030c0e 417 fMUON->SetSegmentationModel(chamber-1, 1, seg91);
be3bb6c1 418
419 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
420
ba030c0e 421 fMUON->SetSegmentationModel(chamber-1, 2, seg92);
be3bb6c1 422 seg92->SetNSlats(13);
423 seg92->SetShift(shift);
424 seg92->SetNPCBperSector(npcb9);
425 seg92->SetSlatXPositions(xpos9);
426 seg92->SetSlatYPosition(ypos9);
427 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
428 seg92->SetDAnod(0.25);
429 seg92->SetPadDivision(nseg4);
430
ba030c0e 431 fMUON->SetResponseModel(chamber-1, fResponse0);
432 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
be3bb6c1 433
434 chamber=10;
435// ^^^^^^^^^
ba030c0e 436 fMUON->SetNsec(chamber-1,2);
be3bb6c1 437//
438 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
439
440 seg101->SetNSlats(13);
441 seg101->SetShift(shift);
442 seg101->SetNPCBperSector(npcb9);
443 seg101->SetSlatXPositions(xpos9);
444 seg101->SetSlatYPosition(ypos9);
445 seg101->SetPadSize(10.,0.5);
446 seg101->SetDAnod(0.25);
447 seg101->SetPadDivision(nseg4);
ba030c0e 448 fMUON->SetSegmentationModel(chamber-1, 1, seg101);
be3bb6c1 449
450 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
451
ba030c0e 452 fMUON->SetSegmentationModel(chamber-1, 2, seg102);
be3bb6c1 453 seg102->SetNSlats(13);
454 seg102->SetShift(shift);
455 seg102->SetNPCBperSector(npcb9);
456 seg102->SetSlatXPositions(xpos9);
457 seg102->SetSlatYPosition(ypos9);
458 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
459 seg102->SetDAnod(0.25);
460 seg102->SetPadDivision(nseg4);
461
ba030c0e 462 fMUON->SetResponseModel(chamber-1, fResponse0);
463 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
464}
be3bb6c1 465
ba030c0e 466//__________________________________________________________________________
467void AliMUONFactory::BuildStation6()
468{
be3bb6c1 469//--------------------------------------------------------
470// Configuration for Trigger Stations --------------------
471//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ba030c0e 472
be3bb6c1 473// Cluster-size off
474 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
475// Cluster-size on
476// AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
477
ba030c0e 478 Int_t chamber=11;
479 fMUON->SetNsec(chamber-1,2);
be3bb6c1 480 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
ba030c0e 481 fMUON->SetSegmentationModel(chamber-1, 1, seg111);
be3bb6c1 482 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
ba030c0e 483 fMUON->SetSegmentationModel(chamber-1, 2, seg112);
be3bb6c1 484
ba030c0e 485 fMUON->SetResponseModel(chamber-1, responseTrigger0);
486 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
be3bb6c1 487
488
489 chamber=12;
ba030c0e 490 fMUON->SetNsec(chamber-1,2);
be3bb6c1 491 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
ba030c0e 492 fMUON->SetSegmentationModel(chamber-1, 1, seg121);
be3bb6c1 493 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
ba030c0e 494 fMUON->SetSegmentationModel(chamber-1, 2, seg122);
be3bb6c1 495
ba030c0e 496 fMUON->SetResponseModel(chamber-1, responseTrigger0);
497 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
be3bb6c1 498
499 chamber=13;
ba030c0e 500 fMUON->SetNsec(chamber-1,2);
be3bb6c1 501 AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
ba030c0e 502 fMUON->SetSegmentationModel(chamber-1, 1, seg131);
be3bb6c1 503 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
ba030c0e 504 fMUON->SetSegmentationModel(chamber-1, 2, seg132);
505 fMUON->SetResponseModel(chamber-1, responseTrigger0);
506 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
be3bb6c1 507
508 chamber=14;
ba030c0e 509 fMUON->SetNsec(chamber-1,2);
be3bb6c1 510 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
ba030c0e 511 fMUON->SetSegmentationModel(chamber-1, 1, seg141);
be3bb6c1 512 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
ba030c0e 513 fMUON->SetSegmentationModel(chamber-1, 2, seg142);
be3bb6c1 514
ba030c0e 515 fMUON->SetResponseModel(chamber-1, responseTrigger0);
516 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
517}
518
519//__________________________________________________________________________
520void AliMUONFactory::Build(AliMUON* where, const char* what)
521{
522//
523// Construct MUON from chambers, segmentation and responses
524//
525
526 fMUON = where;
527 char tmp[20];
528 strcpy(tmp, what);
529
530 if (strcmp(tmp, "default")==0) {
531 // Set default parameters
532 fMUON->SetIshunt(0);
533 fMUON->SetMaxStepGas(0.1);
534 fMUON->SetMaxStepAlu(0.1);
535
536 // Build all stations
537 BuildCommon();
538 BuildStation1();
539 BuildStation2();
540 BuildStation3();
541 BuildStation4();
542 BuildStation5();
543 BuildStation6();
544 }
545 else {
546 if(fMUON->GetDebug()) {
9e1a0ddb 547 printf("\nAliMUONFactory: --------AliMUONFactory------------------------------");
548 printf("\nAliMUONFactory: Non default version of MUON selected ");
549 printf("\nAliMUONFactory: You have to construct yourself the MUON elements !!");
550 printf("\nAliMUONFactory: ----------------------------------------------------");
551 }
be3bb6c1 552 }
553}
554
ba030c0e 555//__________________________________________________________________________
556void AliMUONFactory::BuildStation(AliMUON* where, Int_t stationNumber)
557{
558//
559// Construct MUON from chambers, segmentation and responses
560//
561// Version 0
562//
563// First define the number of planes that are segmented (1 or 2) by a call
564// to SetNsec.
565// Then chose for each chamber (chamber plane) the segmentation
566// and response model.
567// They should be equal for the two chambers of each station. In a future
568// version this will be enforced.
569//
570
571 fMUON = where;
572 if (!fResponse0) BuildCommon();
573
574 switch (stationNumber) {
575 case 1: BuildStation1(); break;
576 case 2: BuildStation2(); break;
577 case 3: BuildStation3(); break;
578 case 4: BuildStation4(); break;
579 case 5: BuildStation5(); break;
580 case 6: BuildStation6(); break;
581
582 default: Fatal("Build", "Wrong station number");
583 }
584}