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 "AliMUONSegmentationV01.h"
28 #include "AliMUONSegmentationV02.h"
29 #include "AliMUONSegmentationSlat.h"
30 #include "AliMUONSegmentationSlatN.h"
31 #include "AliMUONSegmentationTriggerX.h"
32 #include "AliMUONSegmentationTriggerY.h"
35 ClassImp(AliMUONFactory)
37 //__________________________________________________________________________
38 AliMUONFactory::AliMUONFactory()
46 //__________________________________________________________________________
47 AliMUONFactory::AliMUONFactory(const AliMUONFactory& rhs)
50 // Protected copy constructor
52 AliFatal("Not implemented.");
55 //__________________________________________________________________________
57 AliMUONFactory::~AliMUONFactory()
62 //__________________________________________________________________________
63 AliMUONFactory& AliMUONFactory::operator=(const AliMUONFactory& rhs)
65 // Protected assignement operator
67 if (this == &rhs) return *this;
69 AliFatal("Not implemented.");
74 //__________________________________________________________________________
75 void AliMUONFactory::BuildCommon()
78 // Construct the default response.
81 // Default response: 5 mm of gas
82 fResponse0 = new AliMUONResponseV0;
83 fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
84 fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
85 fResponse0->SetPitch(0.25); // anode-cathode distance
86 fResponse0->SetSigmaIntegration(10.);
87 fResponse0->SetChargeSlope(10);
88 fResponse0->SetChargeSpread(0.18, 0.18);
89 fResponse0->SetMaxAdc(4096);
90 fResponse0->SetSaturation(3000);
91 fResponse0->SetZeroSuppression(6);
94 //__________________________________________________________________________
95 void AliMUONFactory::BuildStation1()
97 //--------------------------------------------------------
98 // Configuration for Chamber TC1/2 (Station 1) ----------
99 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101 // Response for 4 mm of gas (station 1)
102 // automatic consistency with width of sensitive medium in CreateGeometry ????
103 AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
104 // Mathieson parameters from L.Kharmandarian's thesis, page 190
105 responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
106 responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
107 responseSt1->SetPitch(0.20); // anode-cathode distance
108 responseSt1->SetSigmaIntegration(10.);
109 // ChargeSlope larger to compensate for the smaller anode-cathode distance
110 // and keep the same most probable ADC channel for mip's
111 responseSt1->SetChargeSlope(62.5);
112 // assumed proportionality to anode-cathode distance for ChargeSpread
113 responseSt1->SetChargeSpread(0.144, 0.144);
114 responseSt1->SetMaxAdc(4096);
115 responseSt1->SetSaturation(3000);
116 responseSt1->SetZeroSuppression(6);
118 //--------------------------------------------------------
119 // Configuration for Chamber TC1/2 (Station 1) ----------
121 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
122 Int_t nseg1[4]={4, 4, 2, 1};
126 fMUON->SetNsec(chamber-1,2);
128 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
130 seg11->SetSegRadii(rseg1);
131 seg11->SetPadSize(2.4, 0.4); // smaller pad size
132 seg11->SetDAnod(0.20); // smaller distance between anode wires
133 seg11->SetPadDivision(nseg1);
135 fMUON->SetSegmentationModel(chamber-1, 1, seg11);
137 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
138 seg12->SetSegRadii(rseg1);
139 seg12->SetPadSize(0.6, 1.6); // smaller pad size
140 seg12->SetDAnod(0.20); // smaller distance between anode wires
141 seg12->SetPadDivision(nseg1);
143 fMUON->SetSegmentationModel(chamber-1, 2, seg12);
145 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
146 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
151 fMUON->SetNsec(chamber-1,2);
153 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
154 seg21->SetSegRadii(rseg1);
155 seg21->SetPadSize(2.4, 0.4); // smaller pad size
156 seg21->SetDAnod(0.20); // smaller distance between anode wires
157 seg21->SetPadDivision(nseg1);
158 fMUON->SetSegmentationModel(chamber-1, 1, seg21);
160 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
161 seg22->SetSegRadii(rseg1);
162 seg22->SetPadSize(0.6, 1.6); // smaller pad size
163 seg22->SetDAnod(0.20); // smaller distance between anode wires
164 seg22->SetPadDivision(nseg1);
165 fMUON->SetSegmentationModel(chamber-1, 2, seg22);
167 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
168 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
172 //__________________________________________________________________________
173 void AliMUONFactory::BuildStation2()
176 //--------------------------------------------------------
177 // Configuration for Chamber TC3/4 (Station 2) -----------
178 ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179 // Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
181 Float_t rseg2[4]={23.5, 53.5, 90.5, 122.5};
182 Int_t nseg2[4]={4, 4, 2, 1};
186 fMUON->SetNsec(chamber-1,2);
188 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
189 seg31->SetSegRadii(rseg2);
190 seg31->SetPadSize(3.0, 0.5);
191 seg31->SetDAnod(3.0/3./4);
192 seg31->SetPadDivision(nseg2);
193 fMUON->SetSegmentationModel(chamber-1, 1, seg31);
195 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
196 seg32->SetSegRadii(rseg2);
197 seg32->SetPadSize(0.75, 2.0);
198 seg32->SetPadDivision(nseg2);
199 seg32->SetDAnod(3.0/3./4);
201 fMUON->SetSegmentationModel(chamber-1, 2, seg32);
203 fMUON->SetResponseModel(chamber-1, fResponse0);
204 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
209 fMUON->SetNsec(chamber-1,2);
211 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
212 seg41->SetSegRadii(rseg2);
213 seg41->SetPadSize(3.0, 0.5);
214 seg41->SetDAnod(3.0/3./4);
215 seg41->SetPadDivision(nseg2);
216 fMUON->SetSegmentationModel(chamber-1, 1, seg41);
218 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
219 seg42->SetSegRadii(rseg2);
220 seg42->SetPadSize(0.75, 2.0);
221 seg42->SetPadDivision(nseg2);
222 seg42->SetDAnod(3.0/3./4);
224 fMUON->SetSegmentationModel(chamber-1, 2, seg42);
226 fMUON->SetResponseModel(chamber-1, fResponse0);
227 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
231 //__________________________________________________________________________
232 void AliMUONFactory::BuildStation3()
234 //--------------------------------------------------------
235 // Configuration for Chamber TC5/6 (Station 3) ----------
236 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
238 Int_t nseg3[4]={4, 4, 2, 1};
239 Int_t npcb5[36] = {0,0,2,0,
249 Float_t shift = 0.; // no more constant overlap between slats
251 Float_t xpos5[9] = {1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25};
252 Float_t ypos5[9] = {-146.5, -112.8, -75.5, -37.8, 0.0, 37.8, 75.5, 112.8, 146.5};
254 for (Int_t i = 0; i < 9; i++) ypos5[i] -= 20.; // origin in segmentation at the bottom of the slat !
257 fMUON->SetNsec(chamber-1,2);
258 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
260 seg51->SetShift(shift);
261 seg51->SetNPCBperSector(npcb5);
262 seg51->SetSlatXPositions(xpos5);
263 seg51->SetSlatYPositions(ypos5);
264 seg51->SetPadSize(10.,0.5);
265 seg51->SetDAnod(0.25);
266 seg51->SetPadDivision(nseg3);
267 fMUON->SetSegmentationModel(chamber-1, 1, seg51);
269 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
271 seg52->SetShift(shift);
272 seg52->SetNPCBperSector(npcb5);
273 seg52->SetSlatXPositions(xpos5);
274 seg52->SetSlatYPositions(ypos5);
275 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
276 seg52->SetDAnod(0.25);
277 seg52->SetPadDivision(nseg3);
278 fMUON->SetSegmentationModel(chamber-1, 2, seg52);
279 fMUON->SetResponseModel(chamber-1, fResponse0);
280 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
283 fMUON->SetNsec(chamber-1,2);
284 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
286 seg61->SetShift(shift);
287 seg61->SetNPCBperSector(npcb5);
288 seg61->SetSlatXPositions(xpos5);
289 seg61->SetSlatYPositions(ypos5);
290 seg61->SetPadSize(10.,0.5);
291 seg61->SetDAnod(0.25);
292 seg61->SetPadDivision(nseg3);
293 fMUON->SetSegmentationModel(chamber-1, 1, seg61);
295 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
297 seg62->SetShift(shift);
298 seg62->SetNPCBperSector(npcb5);
299 seg62->SetSlatXPositions(xpos5);
300 seg62->SetSlatYPositions(ypos5);
301 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
302 seg62->SetDAnod(0.25);
303 seg62->SetPadDivision(nseg3);
304 fMUON->SetSegmentationModel(chamber-1, 2, seg62);
305 fMUON->SetResponseModel(chamber-1, fResponse0);
306 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
310 //__________________________________________________________________________
311 void AliMUONFactory::BuildStation4()
313 //--------------------------------------------------------
314 // Configuration for Chamber TC7/8 (Station 4) ----------
315 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
317 Int_t nseg4[4]={4, 4, 2, 1};
322 fMUON->SetNsec(chamber-1,2);
324 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
327 Int_t npcb7[52] = {0,0,0,2,
340 Float_t xpos7[13] = {1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 39.45, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25};
341 Float_t ypos7[13] = {-204.1, -175.5, -138.5, -109.2, -72.6, -38.2, 0.0,
342 38.2, 72.6, 109.2, 138.5, 175.5, 204.1};
343 Float_t ypos8[13] = {-208.6, -180.0, -143.0, -113.6, -76.05, -38.2, 0.0,
344 38.2, 76.05, 113.6, 143.0, 180.0, 208.6};
345 for (Int_t i = 0; i < 13; i++) {
350 seg71->SetNSlats(13);
351 seg71->SetShift(shift);
352 seg71->SetNPCBperSector(npcb7);
353 seg71->SetSlatXPositions(xpos7);
354 seg71->SetSlatYPositions(ypos7);
356 seg71->SetPadSize(10.,0.5);
357 seg71->SetDAnod(0.25);
358 seg71->SetPadDivision(nseg4);
359 fMUON->SetSegmentationModel(chamber-1, 1, seg71);
361 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
363 fMUON->SetSegmentationModel(chamber-1, 2, seg72);
364 seg72->SetNSlats(13);
365 seg72->SetShift(shift);
366 seg72->SetNPCBperSector(npcb7);
367 seg72->SetSlatXPositions(xpos7);
368 seg72->SetSlatYPositions(ypos7);
369 seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
370 seg72->SetDAnod(0.25);
371 seg72->SetPadDivision(nseg4);
373 fMUON->SetResponseModel(chamber-1, fResponse0);
374 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
378 fMUON->SetNsec(chamber-1,2);
380 AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
382 seg81->SetNSlats(13);
383 seg81->SetShift(shift);
384 seg81->SetNPCBperSector(npcb7);
385 seg81->SetSlatXPositions(xpos7);
386 seg81->SetSlatYPositions(ypos8);
387 seg81->SetPadSize(10.,0.5);
388 seg81->SetDAnod(0.25);
389 seg81->SetPadDivision(nseg4);
390 fMUON->SetSegmentationModel(chamber-1, 1, seg81);
392 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
394 fMUON->SetSegmentationModel(chamber-1, 2, seg82);
395 seg82->SetNSlats(13);
396 seg82->SetShift(shift);
397 seg82->SetNPCBperSector(npcb7);
398 seg82->SetSlatXPositions(xpos7);
399 seg82->SetSlatYPositions(ypos8);
400 seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
401 seg82->SetDAnod(0.25);
402 seg82->SetPadDivision(nseg4);
404 fMUON->SetResponseModel(chamber-1, fResponse0);
405 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
408 //__________________________________________________________________________
409 void AliMUONFactory::BuildStation5()
411 //--------------------------------------------------------
412 // Configuration for Chamber TC9/10 (Station 5) ---------
413 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
418 fMUON->SetNsec(chamber-1,2);
420 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
422 Int_t nseg4[4]={4, 4, 2, 1};
425 Int_t npcb9[52] = {0,0,0,3,
439 Float_t xpos9[13] = {1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 39.45, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25};
440 Float_t ypos9[13] = {-224.8, -188.05, -151.0, -113.7, -76.1, -38.2, 0.0,
441 38.2, 76.1, 113.7, 151.0, 188.05, 224.8};
443 for (Int_t i = 0; i < 13; i++) ypos9[i] -= 20.;
446 seg91->SetNSlats(13);
447 seg91->SetShift(shift);
448 seg91->SetNPCBperSector(npcb9);
449 seg91->SetSlatXPositions(xpos9);
450 seg91->SetSlatYPositions(ypos9);
451 seg91->SetPadSize(10.,0.5);
452 seg91->SetDAnod(0.25);
453 seg91->SetPadDivision(nseg4);
454 fMUON->SetSegmentationModel(chamber-1, 1, seg91);
456 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
458 fMUON->SetSegmentationModel(chamber-1, 2, seg92);
459 seg92->SetNSlats(13);
460 seg92->SetShift(shift);
461 seg92->SetNPCBperSector(npcb9);
462 seg92->SetSlatXPositions(xpos9);
463 seg92->SetSlatYPositions(ypos9);
464 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
465 seg92->SetDAnod(0.25);
466 seg92->SetPadDivision(nseg4);
468 fMUON->SetResponseModel(chamber-1, fResponse0);
469 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
473 fMUON->SetNsec(chamber-1,2);
475 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
477 seg101->SetNSlats(13);
478 seg101->SetShift(shift);
479 seg101->SetNPCBperSector(npcb9);
480 seg101->SetSlatXPositions(xpos9);
481 seg101->SetSlatYPositions(ypos9);
482 seg101->SetPadSize(10.,0.5);
483 seg101->SetDAnod(0.25);
484 seg101->SetPadDivision(nseg4);
485 fMUON->SetSegmentationModel(chamber-1, 1, seg101);
487 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
489 fMUON->SetSegmentationModel(chamber-1, 2, seg102);
490 seg102->SetNSlats(13);
491 seg102->SetShift(shift);
492 seg102->SetNPCBperSector(npcb9);
493 seg102->SetSlatXPositions(xpos9);
494 seg102->SetSlatYPositions(ypos9);
495 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
496 seg102->SetDAnod(0.25);
497 seg102->SetPadDivision(nseg4);
499 fMUON->SetResponseModel(chamber-1, fResponse0);
500 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
503 //__________________________________________________________________________
504 void AliMUONFactory::BuildStation6()
506 //--------------------------------------------------------
507 // Configuration for Trigger Stations --------------------
508 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
511 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
513 // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
516 fMUON->SetNsec(chamber-1,2);
517 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
518 fMUON->SetSegmentationModel(chamber-1, 1, seg111);
519 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
520 fMUON->SetSegmentationModel(chamber-1, 2, seg112);
522 fMUON->SetResponseModel(chamber-1, responseTrigger0);
523 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
527 fMUON->SetNsec(chamber-1,2);
528 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
529 fMUON->SetSegmentationModel(chamber-1, 1, seg121);
530 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
531 fMUON->SetSegmentationModel(chamber-1, 2, seg122);
533 fMUON->SetResponseModel(chamber-1, responseTrigger0);
534 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
537 fMUON->SetNsec(chamber-1,2);
538 AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
539 fMUON->SetSegmentationModel(chamber-1, 1, seg131);
540 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
541 fMUON->SetSegmentationModel(chamber-1, 2, seg132);
542 fMUON->SetResponseModel(chamber-1, responseTrigger0);
543 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
546 fMUON->SetNsec(chamber-1,2);
547 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
548 fMUON->SetSegmentationModel(chamber-1, 1, seg141);
549 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
550 fMUON->SetSegmentationModel(chamber-1, 2, seg142);
552 fMUON->SetResponseModel(chamber-1, responseTrigger0);
553 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
556 //__________________________________________________________________________
557 void AliMUONFactory::Build(AliMUON* where, const char* what)
560 // Construct MUON from chambers, segmentation and responses
567 if (strcmp(tmp, "default")==0) {
568 // Set default parameters
570 fMUON->SetMaxStepGas(0.1);
571 fMUON->SetMaxStepAlu(0.1);
573 // Build all stations
583 AliDebug(0,"Non default version of MUON selected. You have to construct yourself the MUON elements !!");
586 //__________________________________________________________________________
587 void AliMUONFactory::BuildStation(AliMUON* where, Int_t stationNumber)
590 // Construct MUON from chambers, segmentation and responses
594 // First define the number of planes that are segmented (1 or 2) by a call
596 // Then chose for each chamber (chamber plane) the segmentation
597 // and response model.
598 // They should be equal for the two chambers of each station. In a future
599 // version this will be enforced.
603 if (!fResponse0) BuildCommon();
605 switch (stationNumber) {
606 case 1: BuildStation1(); break;
607 case 2: BuildStation2(); break;
608 case 3: BuildStation3(); break;
609 case 4: BuildStation4(); break;
610 case 5: BuildStation5(); break;
611 case 6: BuildStation6(); break;
613 default: AliFatal("Wrong station number");