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 ////////////////////////////////////////////////////////////
22 #include "AliMUONFactory.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"
38 ClassImp(AliMUONFactory)
40 //__________________________________________________________________________
41 AliMUONFactory::AliMUONFactory()
49 //__________________________________________________________________________
50 AliMUONFactory::~AliMUONFactory()
55 //__________________________________________________________________________
56 void AliMUONFactory::BuildCommon()
59 // Construct the default response.
62 // Default response: 5 mm of gas
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.);
68 fResponse0->SetChargeSlope(50);
69 fResponse0->SetChargeSpread(0.18, 0.18);
70 fResponse0->SetMaxAdc(4096);
71 fResponse0->SetZeroSuppression(6);
74 //__________________________________________________________________________
75 void AliMUONFactory::BuildStation1()
77 //--------------------------------------------------------
78 // Configuration for Chamber TC1/2 (Station 1) ----------
79 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 // Response for 4 mm of gas (station 1)
82 // automatic consistency with width of sensitive medium in CreateGeometry ????
83 AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
84 // Mathieson parameters from L.Kharmandarian's thesis, page 190
85 responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
86 responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
87 responseSt1->SetPitch(0.20); // anode-cathode distance
88 responseSt1->SetSigmaIntegration(10.);
89 // ChargeSlope larger to compensate for the smaller anode-cathode distance
90 // and keep the same most probable ADC channel for mip's
91 responseSt1->SetChargeSlope(62.5);
92 // assumed proportionality to anode-cathode distance for ChargeSpread
93 responseSt1->SetChargeSpread(0.144, 0.144);
94 responseSt1->SetMaxAdc(4096);
95 responseSt1->SetZeroSuppression(6);
97 //--------------------------------------------------------
98 // Configuration for Chamber TC1/2 (Station 1) ----------
100 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
101 Int_t nseg1[4]={4, 4, 2, 1};
105 fMUON->SetNsec(chamber-1,2);
107 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
109 seg11->SetSegRadii(rseg1);
110 seg11->SetPadSize(2.4, 0.4); // smaller pad size
111 seg11->SetDAnod(0.20); // smaller distance between anode wires
112 seg11->SetPadDivision(nseg1);
114 fMUON->SetSegmentationModel(chamber-1, 1, seg11);
116 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
117 seg12->SetSegRadii(rseg1);
118 seg12->SetPadSize(0.6, 1.6); // smaller pad size
119 seg12->SetDAnod(0.20); // smaller distance between anode wires
120 seg12->SetPadDivision(nseg1);
122 fMUON->SetSegmentationModel(chamber-1, 2, seg12);
124 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
125 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
130 fMUON->SetNsec(chamber-1,2);
132 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
133 seg21->SetSegRadii(rseg1);
134 seg21->SetPadSize(2.4, 0.4); // smaller pad size
135 seg21->SetDAnod(0.20); // smaller distance between anode wires
136 seg21->SetPadDivision(nseg1);
137 fMUON->SetSegmentationModel(chamber-1, 1, seg21);
139 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
140 seg22->SetSegRadii(rseg1);
141 seg22->SetPadSize(0.6, 1.6); // smaller pad size
142 seg22->SetDAnod(0.20); // smaller distance between anode wires
143 seg22->SetPadDivision(nseg1);
144 fMUON->SetSegmentationModel(chamber-1, 2, seg22);
146 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
147 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
151 //__________________________________________________________________________
152 void AliMUONFactory::BuildStation2()
155 //--------------------------------------------------------
156 // Configuration for Chamber TC3/4 (Station 2) -----------
157 ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
158 // Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
160 Float_t rseg2[4]={23.5, 53.5, 90.5, 122.5};
161 Int_t nseg2[4]={4, 4, 2, 1};
165 fMUON->SetNsec(chamber-1,2);
167 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
168 seg31->SetSegRadii(rseg2);
169 seg31->SetPadSize(3.0, 0.5);
170 seg31->SetDAnod(3.0/3./4);
171 seg31->SetPadDivision(nseg2);
172 fMUON->SetSegmentationModel(chamber-1, 1, seg31);
174 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
175 seg32->SetSegRadii(rseg2);
176 seg32->SetPadSize(0.75, 2.0);
177 seg32->SetPadDivision(nseg2);
178 seg32->SetDAnod(3.0/3./4);
180 fMUON->SetSegmentationModel(chamber-1, 2, seg32);
182 fMUON->SetResponseModel(chamber-1, fResponse0);
183 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
188 fMUON->SetNsec(chamber-1,2);
190 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
191 seg41->SetSegRadii(rseg2);
192 seg41->SetPadSize(3.0, 0.5);
193 seg41->SetDAnod(3.0/3./4);
194 seg41->SetPadDivision(nseg2);
195 fMUON->SetSegmentationModel(chamber-1, 1, seg41);
197 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
198 seg42->SetSegRadii(rseg2);
199 seg42->SetPadSize(0.75, 2.0);
200 seg42->SetPadDivision(nseg2);
201 seg42->SetDAnod(3.0/3./4);
203 fMUON->SetSegmentationModel(chamber-1, 2, seg42);
205 fMUON->SetResponseModel(chamber-1, fResponse0);
206 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
210 //__________________________________________________________________________
211 void AliMUONFactory::BuildStation3()
213 //--------------------------------------------------------
214 // Configuration for Chamber TC5/6 (Station 3) ----------
215 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
217 Int_t nseg3[4]={4, 4, 2, 1};
218 Int_t npcb5[36] = {0,0,2,0,
228 Float_t shift = 1.5/2.;
229 Float_t xpos5[9] = {2., 2., 2., 2.,33., 2., 2., 2., 2.};
230 Float_t ypos5 = -(20.+4.*(40.-2.*shift));
233 fMUON->SetNsec(chamber-1,2);
234 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
236 seg51->SetShift(shift);
237 seg51->SetNPCBperSector(npcb5);
238 seg51->SetSlatXPositions(xpos5);
239 seg51->SetSlatYPosition(ypos5);
240 seg51->SetPadSize(10.,0.5);
241 seg51->SetDAnod(0.25);
242 seg51->SetPadDivision(nseg3);
243 fMUON->SetSegmentationModel(chamber-1, 1, seg51);
245 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
247 seg52->SetShift(shift);
248 seg52->SetNPCBperSector(npcb5);
249 seg52->SetSlatXPositions(xpos5);
250 seg52->SetSlatYPosition(ypos5);
251 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
252 seg52->SetDAnod(0.25);
253 seg52->SetPadDivision(nseg3);
254 fMUON->SetSegmentationModel(chamber-1, 2, seg52);
255 fMUON->SetResponseModel(chamber-1, fResponse0);
256 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
259 fMUON->SetNsec(chamber-1,2);
260 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
262 seg61->SetShift(shift);
263 seg61->SetNPCBperSector(npcb5);
264 seg61->SetSlatXPositions(xpos5);
265 seg61->SetSlatYPosition(ypos5);
266 seg61->SetPadSize(10.,0.5);
267 seg61->SetDAnod(0.25);
268 seg61->SetPadDivision(nseg3);
269 fMUON->SetSegmentationModel(chamber-1, 1, seg61);
271 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
273 seg62->SetShift(shift);
274 seg62->SetNPCBperSector(npcb5);
275 seg62->SetSlatXPositions(xpos5);
276 seg62->SetSlatYPosition(ypos5);
277 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
278 seg62->SetDAnod(0.25);
279 seg62->SetPadDivision(nseg3);
280 fMUON->SetSegmentationModel(chamber-1, 2, seg62);
281 fMUON->SetResponseModel(chamber-1, fResponse0);
282 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
286 //__________________________________________________________________________
287 void AliMUONFactory::BuildStation4()
289 //--------------------------------------------------------
290 // Configuration for Chamber TC7/8 (Station 4) ----------
291 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
293 Int_t nseg4[4]={4, 4, 2, 1};
298 fMUON->SetNsec(chamber-1,2);
300 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
301 Float_t shift = 1.5/2.;
302 Int_t npcb7[44] = {0,0,0,3,
313 Float_t xpos7[11] = {2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2.};
314 Float_t ypos7 = -(20.+5.*(40.-2.*shift));
316 seg71->SetNSlats(11);
317 seg71->SetShift(shift);
318 seg71->SetNPCBperSector(npcb7);
319 seg71->SetSlatXPositions(xpos7);
320 seg71->SetSlatYPosition(ypos7);
322 seg71->SetPadSize(10.,0.5);
323 seg71->SetDAnod(0.25);
324 seg71->SetPadDivision(nseg4);
325 fMUON->SetSegmentationModel(chamber-1, 1, seg71);
327 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
329 fMUON->SetSegmentationModel(chamber-1, 2, seg72);
330 seg72->SetNSlats(11);
331 seg72->SetShift(shift);
332 seg72->SetNPCBperSector(npcb7);
333 seg72->SetSlatXPositions(xpos7);
334 seg72->SetSlatYPosition(ypos7);
335 seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
336 seg72->SetDAnod(0.25);
337 seg72->SetPadDivision(nseg4);
339 fMUON->SetResponseModel(chamber-1, fResponse0);
340 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
344 fMUON->SetNsec(chamber-1,2);
346 AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
348 seg81->SetNSlats(11);
349 seg81->SetShift(shift);
350 seg81->SetNPCBperSector(npcb7);
351 seg81->SetSlatXPositions(xpos7);
352 seg81->SetSlatYPosition(ypos7);
353 seg81->SetPadSize(10.,0.5);
354 seg81->SetDAnod(0.25);
355 seg81->SetPadDivision(nseg4);
356 fMUON->SetSegmentationModel(chamber-1, 1, seg81);
358 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
360 fMUON->SetSegmentationModel(chamber-1, 2, seg82);
361 seg82->SetNSlats(11);
362 seg82->SetShift(shift);
363 seg82->SetNPCBperSector(npcb7);
364 seg82->SetSlatXPositions(xpos7);
365 seg82->SetSlatYPosition(ypos7);
366 seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
367 seg82->SetDAnod(0.25);
368 seg82->SetPadDivision(nseg4);
370 fMUON->SetResponseModel(chamber-1, fResponse0);
371 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
374 //__________________________________________________________________________
375 void AliMUONFactory::BuildStation5()
377 //--------------------------------------------------------
378 // Configuration for Chamber TC9/10 (Station 5) ---------
379 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
384 fMUON->SetNsec(chamber-1,2);
386 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
388 Int_t nseg4[4]={4, 4, 2, 1};
389 Float_t shift = 1.5/2.;
390 Int_t npcb9[52] = {0,0,0,3,
404 Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2., 2.};
405 Float_t ypos9 = -(20.+6.*(40.-2.*shift));
407 seg91->SetNSlats(13);
408 seg91->SetShift(shift);
409 seg91->SetNPCBperSector(npcb9);
410 seg91->SetSlatXPositions(xpos9);
411 seg91->SetSlatYPosition(ypos9);
412 seg91->SetPadSize(10.,0.5);
413 seg91->SetDAnod(0.25);
414 seg91->SetPadDivision(nseg4);
415 fMUON->SetSegmentationModel(chamber-1, 1, seg91);
417 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
419 fMUON->SetSegmentationModel(chamber-1, 2, seg92);
420 seg92->SetNSlats(13);
421 seg92->SetShift(shift);
422 seg92->SetNPCBperSector(npcb9);
423 seg92->SetSlatXPositions(xpos9);
424 seg92->SetSlatYPosition(ypos9);
425 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
426 seg92->SetDAnod(0.25);
427 seg92->SetPadDivision(nseg4);
429 fMUON->SetResponseModel(chamber-1, fResponse0);
430 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
434 fMUON->SetNsec(chamber-1,2);
436 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
438 seg101->SetNSlats(13);
439 seg101->SetShift(shift);
440 seg101->SetNPCBperSector(npcb9);
441 seg101->SetSlatXPositions(xpos9);
442 seg101->SetSlatYPosition(ypos9);
443 seg101->SetPadSize(10.,0.5);
444 seg101->SetDAnod(0.25);
445 seg101->SetPadDivision(nseg4);
446 fMUON->SetSegmentationModel(chamber-1, 1, seg101);
448 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
450 fMUON->SetSegmentationModel(chamber-1, 2, seg102);
451 seg102->SetNSlats(13);
452 seg102->SetShift(shift);
453 seg102->SetNPCBperSector(npcb9);
454 seg102->SetSlatXPositions(xpos9);
455 seg102->SetSlatYPosition(ypos9);
456 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
457 seg102->SetDAnod(0.25);
458 seg102->SetPadDivision(nseg4);
460 fMUON->SetResponseModel(chamber-1, fResponse0);
461 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
464 //__________________________________________________________________________
465 void AliMUONFactory::BuildStation6()
467 //--------------------------------------------------------
468 // Configuration for Trigger Stations --------------------
469 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
472 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
474 // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
477 fMUON->SetNsec(chamber-1,2);
478 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
479 fMUON->SetSegmentationModel(chamber-1, 1, seg111);
480 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
481 fMUON->SetSegmentationModel(chamber-1, 2, seg112);
483 fMUON->SetResponseModel(chamber-1, responseTrigger0);
484 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
488 fMUON->SetNsec(chamber-1,2);
489 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
490 fMUON->SetSegmentationModel(chamber-1, 1, seg121);
491 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
492 fMUON->SetSegmentationModel(chamber-1, 2, seg122);
494 fMUON->SetResponseModel(chamber-1, responseTrigger0);
495 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
498 fMUON->SetNsec(chamber-1,2);
499 AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
500 fMUON->SetSegmentationModel(chamber-1, 1, seg131);
501 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
502 fMUON->SetSegmentationModel(chamber-1, 2, seg132);
503 fMUON->SetResponseModel(chamber-1, responseTrigger0);
504 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
507 fMUON->SetNsec(chamber-1,2);
508 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
509 fMUON->SetSegmentationModel(chamber-1, 1, seg141);
510 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
511 fMUON->SetSegmentationModel(chamber-1, 2, seg142);
513 fMUON->SetResponseModel(chamber-1, responseTrigger0);
514 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
517 //__________________________________________________________________________
518 void AliMUONFactory::Build(AliMUON* where, const char* what)
521 // Construct MUON from chambers, segmentation and responses
528 if (strcmp(tmp, "default")==0) {
529 // Set default parameters
531 fMUON->SetMaxStepGas(0.1);
532 fMUON->SetMaxStepAlu(0.1);
534 // Build all stations
544 if(fMUON->GetDebug()) {
545 printf("\nAliMUONFactory: --------AliMUONFactory------------------------------");
546 printf("\nAliMUONFactory: Non default version of MUON selected ");
547 printf("\nAliMUONFactory: You have to construct yourself the MUON elements !!");
548 printf("\nAliMUONFactory: ----------------------------------------------------");
553 //__________________________________________________________________________
554 void AliMUONFactory::BuildStation(AliMUON* where, Int_t stationNumber)
557 // Construct MUON from chambers, segmentation and responses
561 // First define the number of planes that are segmented (1 or 2) by a call
563 // Then chose for each chamber (chamber plane) the segmentation
564 // and response model.
565 // They should be equal for the two chambers of each station. In a future
566 // version this will be enforced.
570 if (!fResponse0) BuildCommon();
572 switch (stationNumber) {
573 case 1: BuildStation1(); break;
574 case 2: BuildStation2(); break;
575 case 3: BuildStation3(); break;
576 case 4: BuildStation4(); break;
577 case 5: BuildStation5(); break;
578 case 6: BuildStation6(); break;
580 default: Fatal("Build", "Wrong station number");