1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 ////////////////////////////////////////////////////////////
17 // Factory for muon chambers, segmentations and response //
18 ////////////////////////////////////////////////////////////
23 #include "AliMUONFactory.h"
25 #include "AliMUONChamber.h"
26 #include "AliMUONResponseV0.h"
27 #include "AliMUONResponseTrigger.h"
28 #include "AliMUONSegmentationV0.h"
29 #include "AliMUONSegmentationV01.h"
30 #include "AliMUONSegmentationV02.h"
31 #include "AliMUONSegmentationV04.h"
32 #include "AliMUONSegmentationV05.h"
33 #include "AliMUONSegmentationSlat.h"
34 #include "AliMUONSegmentationSlatN.h"
35 #include "AliMUONSegmentationTrigger.h"
36 #include "AliMUONSegmentationTriggerX.h"
37 #include "AliMUONSegmentationTriggerY.h"
39 ClassImp(AliMUONFactory)
42 void AliMUONFactory::Build(AliMUON* where, const char* what)
45 // Construct MUON from chambers, segmentation and responses
48 AliMUON* pMUON = where;
51 if (strcmp(tmp, "default")==0) {
53 printf("\n--------AliMUONFactory------------------------------");
54 printf("\n Non default version of MUON selected ");
55 printf("\n You have to construct yourself the MUON elements !!");
56 printf("\n----------------------------------------------------");
59 pMUON->SetMaxStepGas(0.1);
60 pMUON->SetMaxStepAlu(0.1);
64 // First define the number of planes that are segmented (1 or 2) by a call
66 // Then chose for each chamber (chamber plane) the segmentation
67 // and response model.
68 // They should be equal for the two chambers of each station. In a future
69 // version this will be enforced.
73 // Default response: 5 mm of gas
74 AliMUONResponseV0* response0 = new AliMUONResponseV0;
75 response0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
76 response0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
77 response0->SetPitch(0.25); // anode-cathode distance
78 response0->SetSigmaIntegration(10.);
79 response0->SetChargeSlope(50);
80 response0->SetChargeSpread(0.18, 0.18);
81 response0->SetMaxAdc(4096);
82 response0->SetZeroSuppression(6);
84 // Response for 4 mm of gas (station 1)
85 // automatic consistency with width of sensitive medium in CreateGeometry ????
86 AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
87 // Mathieson parameters from L.Kharmandarian's thesis, page 190
88 responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
89 responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
90 responseSt1->SetPitch(0.20); // anode-cathode distance
91 responseSt1->SetSigmaIntegration(10.);
92 // ChargeSlope larger to compensate for the smaller anode-cathode distance
93 // and keep the same most probable ADC channel for mip's
94 responseSt1->SetChargeSlope(62.5);
95 // assumed proportionality to anode-cathode distance for ChargeSpread
96 responseSt1->SetChargeSpread(0.144, 0.144);
97 responseSt1->SetMaxAdc(4096);
98 responseSt1->SetZeroSuppression(6);
100 //--------------------------------------------------------
101 // Configuration for Chamber TC1/2 (Station 1) ----------
102 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
104 Int_t nseg1[4]={4, 4, 2, 1};
108 pMUON->SetNsec(chamber-1,2);
110 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
112 seg11->SetSegRadii(rseg1);
113 seg11->SetPadSize(2.4, 0.4); // smaller pad size
114 seg11->SetDAnod(0.20); // smaller distance between anode wires
115 seg11->SetPadDivision(nseg1);
117 pMUON->SetSegmentationModel(chamber-1, 1, seg11);
119 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
120 seg12->SetSegRadii(rseg1);
121 seg12->SetPadSize(0.6, 1.6); // smaller pad size
122 seg12->SetDAnod(0.20); // smaller distance between anode wires
123 seg12->SetPadDivision(nseg1);
125 pMUON->SetSegmentationModel(chamber-1, 2, seg12);
127 pMUON->SetResponseModel(chamber-1, responseSt1); // special response
128 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
133 pMUON->SetNsec(chamber-1,2);
135 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
136 seg21->SetSegRadii(rseg1);
137 seg21->SetPadSize(2.4, 0.4); // smaller pad size
138 seg21->SetDAnod(0.20); // smaller distance between anode wires
139 seg21->SetPadDivision(nseg1);
140 pMUON->SetSegmentationModel(chamber-1, 1, seg21);
142 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
143 seg22->SetSegRadii(rseg1);
144 seg22->SetPadSize(0.6, 1.6); // smaller pad size
145 seg22->SetDAnod(0.20); // smaller distance between anode wires
146 seg22->SetPadDivision(nseg1);
147 pMUON->SetSegmentationModel(chamber-1, 2, seg22);
149 pMUON->SetResponseModel(chamber-1, responseSt1); // special response
150 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
153 //--------------------------------------------------------
154 // Configuration for Chamber TC3/4 (Station 2) -----------
155 ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156 // Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
157 Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5};
158 Int_t nseg2[4]={4, 4, 2, 1};
162 pMUON->SetNsec(chamber-1,2);
164 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
165 seg31->SetSegRadii(rseg2);
166 seg31->SetPadSize(3.0, 0.5);
167 seg31->SetDAnod(3.0/3./4);
168 seg31->SetPadDivision(nseg2);
169 pMUON->SetSegmentationModel(chamber-1, 1, seg31);
171 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
172 seg32->SetSegRadii(rseg2);
173 seg32->SetPadSize(0.75, 2.0);
174 seg32->SetPadDivision(nseg2);
175 seg32->SetDAnod(3.0/3./4);
177 pMUON->SetSegmentationModel(chamber-1, 2, seg32);
179 pMUON->SetResponseModel(chamber-1, response0);
180 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
185 pMUON->SetNsec(chamber-1,2);
187 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
188 seg41->SetSegRadii(rseg2);
189 seg41->SetPadSize(3.0, 0.5);
190 seg41->SetDAnod(3.0/3./4);
191 seg41->SetPadDivision(nseg2);
192 pMUON->SetSegmentationModel(chamber-1, 1, seg41);
194 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
195 seg42->SetSegRadii(rseg2);
196 seg42->SetPadSize(0.75, 2.0);
197 seg42->SetPadDivision(nseg2);
198 seg42->SetDAnod(3.0/3./4);
200 pMUON->SetSegmentationModel(chamber-1, 2, seg42);
202 pMUON->SetResponseModel(chamber-1, response0);
203 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
206 //--------------------------------------------------------
207 // Configuration for Chamber TC5/6 (Station 3) ----------
208 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
209 Int_t nseg3[4]={4, 4, 2, 1};
210 Int_t npcb5[36] = {0,0,2,0,
220 Float_t shift = 1.5/2.;
221 Float_t xpos5[9] = {2., 2., 2., 2.,33., 2., 2., 2., 2.};
222 Float_t ypos5 = -(20.+4.*(40.-2.*shift));
225 pMUON->SetNsec(chamber-1,2);
226 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
228 seg51->SetShift(shift);
229 seg51->SetNPCBperSector(npcb5);
230 seg51->SetSlatXPositions(xpos5);
231 seg51->SetSlatYPosition(ypos5);
232 seg51->SetPadSize(10.,0.5);
233 seg51->SetDAnod(0.25);
234 seg51->SetPadDivision(nseg3);
235 pMUON->SetSegmentationModel(chamber-1, 1, seg51);
237 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
239 seg52->SetShift(shift);
240 seg52->SetNPCBperSector(npcb5);
241 seg52->SetSlatXPositions(xpos5);
242 seg52->SetSlatYPosition(ypos5);
243 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
244 seg52->SetDAnod(0.25);
245 seg52->SetPadDivision(nseg3);
246 pMUON->SetSegmentationModel(chamber-1, 2, seg52);
247 pMUON->SetResponseModel(chamber-1, response0);
248 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
251 pMUON->SetNsec(chamber-1,2);
252 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
254 seg61->SetShift(shift);
255 seg61->SetNPCBperSector(npcb5);
256 seg61->SetSlatXPositions(xpos5);
257 seg61->SetSlatYPosition(ypos5);
258 seg61->SetPadSize(10.,0.5);
259 seg61->SetDAnod(0.25);
260 seg61->SetPadDivision(nseg3);
261 pMUON->SetSegmentationModel(chamber-1, 1, seg61);
263 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
265 seg62->SetShift(shift);
266 seg62->SetNPCBperSector(npcb5);
267 seg62->SetSlatXPositions(xpos5);
268 seg62->SetSlatYPosition(ypos5);
269 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
270 seg62->SetDAnod(0.25);
271 seg62->SetPadDivision(nseg3);
272 pMUON->SetSegmentationModel(chamber-1, 2, seg62);
273 pMUON->SetResponseModel(chamber-1, response0);
274 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
276 //--------------------------------------------------------
277 // Configuration for Chamber TC7/8 (Station 4) ----------
278 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
280 Int_t nseg4[4]={4, 4, 2, 1};
285 pMUON->SetNsec(chamber-1,2);
287 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
288 Int_t npcb7[44] = {0,0,0,3,
299 Float_t xpos7[11] = {2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2.};
300 Float_t ypos7 = -(20.+5.*(40.-2.*shift));
302 seg71->SetNSlats(11);
303 seg71->SetShift(shift);
304 seg71->SetNPCBperSector(npcb7);
305 seg71->SetSlatXPositions(xpos7);
306 seg71->SetSlatYPosition(ypos7);
308 seg71->SetPadSize(10.,0.5);
309 seg71->SetDAnod(0.25);
310 seg71->SetPadDivision(nseg4);
311 pMUON->SetSegmentationModel(chamber-1, 1, seg71);
313 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
315 pMUON->SetSegmentationModel(chamber-1, 2, seg72);
316 seg72->SetNSlats(11);
317 seg72->SetShift(shift);
318 seg72->SetNPCBperSector(npcb7);
319 seg72->SetSlatXPositions(xpos7);
320 seg72->SetSlatYPosition(ypos7);
321 seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
322 seg72->SetDAnod(0.25);
323 seg72->SetPadDivision(nseg4);
325 pMUON->SetResponseModel(chamber-1, response0);
326 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
330 pMUON->SetNsec(chamber-1,2);
332 AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
334 seg81->SetNSlats(11);
335 seg81->SetShift(shift);
336 seg81->SetNPCBperSector(npcb7);
337 seg81->SetSlatXPositions(xpos7);
338 seg81->SetSlatYPosition(ypos7);
339 seg81->SetPadSize(10.,0.5);
340 seg81->SetDAnod(0.25);
341 seg81->SetPadDivision(nseg4);
342 pMUON->SetSegmentationModel(chamber-1, 1, seg81);
344 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
346 pMUON->SetSegmentationModel(chamber-1, 2, seg82);
347 seg82->SetNSlats(11);
348 seg82->SetShift(shift);
349 seg82->SetNPCBperSector(npcb7);
350 seg82->SetSlatXPositions(xpos7);
351 seg82->SetSlatYPosition(ypos7);
352 seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
353 seg82->SetDAnod(0.25);
354 seg82->SetPadDivision(nseg4);
356 pMUON->SetResponseModel(chamber-1, response0);
357 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
360 //--------------------------------------------------------
361 // Configuration for Chamber TC9/10 (Station 5) ---------
362 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
366 pMUON->SetNsec(chamber-1,2);
368 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
369 Int_t npcb9[52] = {0,0,0,3,
383 Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2., 2.};
384 Float_t ypos9 = -(20.+6.*(40.-2.*shift));
386 seg91->SetNSlats(13);
387 seg91->SetShift(shift);
388 seg91->SetNPCBperSector(npcb9);
389 seg91->SetSlatXPositions(xpos9);
390 seg91->SetSlatYPosition(ypos9);
391 seg91->SetPadSize(10.,0.5);
392 seg91->SetDAnod(0.25);
393 seg91->SetPadDivision(nseg4);
394 pMUON->SetSegmentationModel(chamber-1, 1, seg91);
396 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
398 pMUON->SetSegmentationModel(chamber-1, 2, seg92);
399 seg92->SetNSlats(13);
400 seg92->SetShift(shift);
401 seg92->SetNPCBperSector(npcb9);
402 seg92->SetSlatXPositions(xpos9);
403 seg92->SetSlatYPosition(ypos9);
404 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
405 seg92->SetDAnod(0.25);
406 seg92->SetPadDivision(nseg4);
408 pMUON->SetResponseModel(chamber-1, response0);
409 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
413 pMUON->SetNsec(chamber-1,2);
415 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
417 seg101->SetNSlats(13);
418 seg101->SetShift(shift);
419 seg101->SetNPCBperSector(npcb9);
420 seg101->SetSlatXPositions(xpos9);
421 seg101->SetSlatYPosition(ypos9);
422 seg101->SetPadSize(10.,0.5);
423 seg101->SetDAnod(0.25);
424 seg101->SetPadDivision(nseg4);
425 pMUON->SetSegmentationModel(chamber-1, 1, seg101);
427 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
429 pMUON->SetSegmentationModel(chamber-1, 2, seg102);
430 seg102->SetNSlats(13);
431 seg102->SetShift(shift);
432 seg102->SetNPCBperSector(npcb9);
433 seg102->SetSlatXPositions(xpos9);
434 seg102->SetSlatYPosition(ypos9);
435 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
436 seg102->SetDAnod(0.25);
437 seg102->SetPadDivision(nseg4);
439 pMUON->SetResponseModel(chamber-1, response0);
440 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
442 //--------------------------------------------------------
443 // Configuration for Trigger Stations --------------------
444 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
446 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
448 // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
451 pMUON->SetNsec(chamber-1,2);
452 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
453 pMUON->SetSegmentationModel(chamber-1, 1, seg111);
454 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
455 pMUON->SetSegmentationModel(chamber-1, 2, seg112);
457 pMUON->SetResponseModel(chamber-1, responseTrigger0);
458 pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
462 pMUON->SetNsec(chamber-1,2);
463 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
464 pMUON->SetSegmentationModel(chamber-1, 1, seg121);
465 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
466 pMUON->SetSegmentationModel(chamber-1, 2, seg122);
468 pMUON->SetResponseModel(chamber-1, responseTrigger0);
469 pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
472 pMUON->SetNsec(chamber-1,2);
473 AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
474 pMUON->SetSegmentationModel(chamber-1, 1, seg131);
475 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
476 pMUON->SetSegmentationModel(chamber-1, 2, seg132);
477 pMUON->SetResponseModel(chamber-1, responseTrigger0);
478 pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
481 pMUON->SetNsec(chamber-1,2);
482 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
483 pMUON->SetSegmentationModel(chamber-1, 1, seg141);
484 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
485 pMUON->SetSegmentationModel(chamber-1, 2, seg142);
487 pMUON->SetResponseModel(chamber-1, responseTrigger0);
488 pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
490 printf("\n--------AliMUONFactory------------------------------");
491 printf("\n Non default version of MUON selected ");
492 printf("\n You have to construct yourself the MUON elements !!");
493 printf("\n----------------------------------------------------");