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(const char* name)
46 //__________________________________________________________________________
47 AliMUONFactory::AliMUONFactory()
55 //__________________________________________________________________________
56 AliMUONFactory::AliMUONFactory(const AliMUONFactory& rhs)
59 // Protected copy constructor
61 AliFatal("Not implemented.");
64 //__________________________________________________________________________
66 AliMUONFactory::~AliMUONFactory()
71 //__________________________________________________________________________
72 AliMUONFactory& AliMUONFactory::operator=(const AliMUONFactory& rhs)
74 // Protected assignement operator
76 if (this == &rhs) return *this;
78 AliFatal("Not implemented.");
83 //__________________________________________________________________________
84 void AliMUONFactory::BuildCommon()
87 // Construct the default response.
90 // Default response: 5 mm of gas
91 fResponse0 = new AliMUONResponseV0;
92 fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
93 fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
94 fResponse0->SetPitch(0.25); // anode-cathode distance
95 fResponse0->SetSigmaIntegration(10.);
96 fResponse0->SetChargeSlope(10);
97 fResponse0->SetChargeSpread(0.18, 0.18);
98 fResponse0->SetMaxAdc(4096);
99 fResponse0->SetSaturation(3000);
100 fResponse0->SetZeroSuppression(6);
103 //__________________________________________________________________________
104 void AliMUONFactory::BuildStation1()
106 //--------------------------------------------------------
107 // Configuration for Chamber TC1/2 (Station 1) ----------
108 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110 // Response for 4 mm of gas (station 1)
111 // automatic consistency with width of sensitive medium in CreateGeometry ????
112 AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
113 // Mathieson parameters from L.Kharmandarian's thesis, page 190
114 responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
115 responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
116 responseSt1->SetPitch(0.20); // anode-cathode distance
117 responseSt1->SetSigmaIntegration(10.);
118 // ChargeSlope larger to compensate for the smaller anode-cathode distance
119 // and keep the same most probable ADC channel for mip's
120 responseSt1->SetChargeSlope(62.5);
121 // assumed proportionality to anode-cathode distance for ChargeSpread
122 responseSt1->SetChargeSpread(0.144, 0.144);
123 responseSt1->SetMaxAdc(4096);
124 responseSt1->SetSaturation(3000);
125 responseSt1->SetZeroSuppression(6);
127 //--------------------------------------------------------
128 // Configuration for Chamber TC1/2 (Station 1) ----------
130 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
131 Int_t nseg1[4]={4, 4, 2, 1};
135 fMUON->SetNsec(chamber-1,2);
137 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
139 seg11->SetSegRadii(rseg1);
140 seg11->SetPadSize(2.4, 0.4); // smaller pad size
141 seg11->SetDAnod(0.20); // smaller distance between anode wires
142 seg11->SetPadDivision(nseg1);
144 fMUON->SetSegmentationModel(chamber-1, 1, seg11);
146 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
147 seg12->SetSegRadii(rseg1);
148 seg12->SetPadSize(0.6, 1.6); // smaller pad size
149 seg12->SetDAnod(0.20); // smaller distance between anode wires
150 seg12->SetPadDivision(nseg1);
152 fMUON->SetSegmentationModel(chamber-1, 2, seg12);
154 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
155 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
160 fMUON->SetNsec(chamber-1,2);
162 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
163 seg21->SetSegRadii(rseg1);
164 seg21->SetPadSize(2.4, 0.4); // smaller pad size
165 seg21->SetDAnod(0.20); // smaller distance between anode wires
166 seg21->SetPadDivision(nseg1);
167 fMUON->SetSegmentationModel(chamber-1, 1, seg21);
169 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
170 seg22->SetSegRadii(rseg1);
171 seg22->SetPadSize(0.6, 1.6); // smaller pad size
172 seg22->SetDAnod(0.20); // smaller distance between anode wires
173 seg22->SetPadDivision(nseg1);
174 fMUON->SetSegmentationModel(chamber-1, 2, seg22);
176 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
177 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
181 //__________________________________________________________________________
182 void AliMUONFactory::BuildStation2()
185 //--------------------------------------------------------
186 // Configuration for Chamber TC3/4 (Station 2) -----------
187 ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188 // Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
190 Float_t rseg2[4]={23.5, 53.5, 90.5, 122.5};
191 Int_t nseg2[4]={4, 4, 2, 1};
195 fMUON->SetNsec(chamber-1,2);
197 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
198 seg31->SetSegRadii(rseg2);
199 seg31->SetPadSize(3.0, 0.5);
200 seg31->SetDAnod(3.0/3./4);
201 seg31->SetPadDivision(nseg2);
202 fMUON->SetSegmentationModel(chamber-1, 1, seg31);
204 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
205 seg32->SetSegRadii(rseg2);
206 seg32->SetPadSize(0.75, 2.0);
207 seg32->SetPadDivision(nseg2);
208 seg32->SetDAnod(3.0/3./4);
210 fMUON->SetSegmentationModel(chamber-1, 2, seg32);
212 fMUON->SetResponseModel(chamber-1, fResponse0);
213 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
218 fMUON->SetNsec(chamber-1,2);
220 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
221 seg41->SetSegRadii(rseg2);
222 seg41->SetPadSize(3.0, 0.5);
223 seg41->SetDAnod(3.0/3./4);
224 seg41->SetPadDivision(nseg2);
225 fMUON->SetSegmentationModel(chamber-1, 1, seg41);
227 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
228 seg42->SetSegRadii(rseg2);
229 seg42->SetPadSize(0.75, 2.0);
230 seg42->SetPadDivision(nseg2);
231 seg42->SetDAnod(3.0/3./4);
233 fMUON->SetSegmentationModel(chamber-1, 2, seg42);
235 fMUON->SetResponseModel(chamber-1, fResponse0);
236 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
240 //__________________________________________________________________________
241 void AliMUONFactory::BuildStation3()
243 //--------------------------------------------------------
244 // Configuration for Chamber TC5/6 (Station 3) ----------
245 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
247 Int_t nseg3[4]={4, 4, 2, 1};
248 Int_t npcb5[36] = {0,0,2,0,
258 Float_t shift = 0.; // no more constant overlap between slats
260 Float_t xpos5[9] = {1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25};
261 Float_t ypos5[9] = {-146.5, -112.8, -75.5, -37.8, 0.0, 37.8, 75.5, 112.8, 146.5};
263 for (Int_t i = 0; i < 9; i++) ypos5[i] -= 20.; // origin in segmentation at the bottom of the slat !
266 fMUON->SetNsec(chamber-1,2);
267 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
269 seg51->SetShift(shift);
270 seg51->SetNPCBperSector(npcb5);
271 seg51->SetSlatXPositions(xpos5);
272 seg51->SetSlatYPositions(ypos5);
273 seg51->SetPadSize(10.,0.5);
274 seg51->SetDAnod(0.25);
275 seg51->SetPadDivision(nseg3);
276 fMUON->SetSegmentationModel(chamber-1, 1, seg51);
278 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
280 seg52->SetShift(shift);
281 seg52->SetNPCBperSector(npcb5);
282 seg52->SetSlatXPositions(xpos5);
283 seg52->SetSlatYPositions(ypos5);
284 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
285 seg52->SetDAnod(0.25);
286 seg52->SetPadDivision(nseg3);
287 fMUON->SetSegmentationModel(chamber-1, 2, seg52);
288 fMUON->SetResponseModel(chamber-1, fResponse0);
289 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
292 fMUON->SetNsec(chamber-1,2);
293 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
295 seg61->SetShift(shift);
296 seg61->SetNPCBperSector(npcb5);
297 seg61->SetSlatXPositions(xpos5);
298 seg61->SetSlatYPositions(ypos5);
299 seg61->SetPadSize(10.,0.5);
300 seg61->SetDAnod(0.25);
301 seg61->SetPadDivision(nseg3);
302 fMUON->SetSegmentationModel(chamber-1, 1, seg61);
304 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
306 seg62->SetShift(shift);
307 seg62->SetNPCBperSector(npcb5);
308 seg62->SetSlatXPositions(xpos5);
309 seg62->SetSlatYPositions(ypos5);
310 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
311 seg62->SetDAnod(0.25);
312 seg62->SetPadDivision(nseg3);
313 fMUON->SetSegmentationModel(chamber-1, 2, seg62);
314 fMUON->SetResponseModel(chamber-1, fResponse0);
315 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
319 //__________________________________________________________________________
320 void AliMUONFactory::BuildStation4()
322 //--------------------------------------------------------
323 // Configuration for Chamber TC7/8 (Station 4) ----------
324 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
326 Int_t nseg4[4]={4, 4, 2, 1};
331 fMUON->SetNsec(chamber-1,2);
333 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
336 Int_t npcb7[52] = {0,0,0,2,
349 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};
350 Float_t ypos7[13] = {-204.1, -175.5, -138.5, -109.2, -72.6, -38.2, 0.0,
351 38.2, 72.6, 109.2, 138.5, 175.5, 204.1};
352 Float_t ypos8[13] = {-208.6, -180.0, -143.0, -113.6, -76.05, -38.2, 0.0,
353 38.2, 76.05, 113.6, 143.0, 180.0, 208.6};
354 for (Int_t i = 0; i < 13; i++) {
359 seg71->SetNSlats(13);
360 seg71->SetShift(shift);
361 seg71->SetNPCBperSector(npcb7);
362 seg71->SetSlatXPositions(xpos7);
363 seg71->SetSlatYPositions(ypos7);
365 seg71->SetPadSize(10.,0.5);
366 seg71->SetDAnod(0.25);
367 seg71->SetPadDivision(nseg4);
368 fMUON->SetSegmentationModel(chamber-1, 1, seg71);
370 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
372 fMUON->SetSegmentationModel(chamber-1, 2, seg72);
373 seg72->SetNSlats(13);
374 seg72->SetShift(shift);
375 seg72->SetNPCBperSector(npcb7);
376 seg72->SetSlatXPositions(xpos7);
377 seg72->SetSlatYPositions(ypos7);
378 seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
379 seg72->SetDAnod(0.25);
380 seg72->SetPadDivision(nseg4);
382 fMUON->SetResponseModel(chamber-1, fResponse0);
383 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
387 fMUON->SetNsec(chamber-1,2);
389 AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
391 seg81->SetNSlats(13);
392 seg81->SetShift(shift);
393 seg81->SetNPCBperSector(npcb7);
394 seg81->SetSlatXPositions(xpos7);
395 seg81->SetSlatYPositions(ypos8);
396 seg81->SetPadSize(10.,0.5);
397 seg81->SetDAnod(0.25);
398 seg81->SetPadDivision(nseg4);
399 fMUON->SetSegmentationModel(chamber-1, 1, seg81);
401 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
403 fMUON->SetSegmentationModel(chamber-1, 2, seg82);
404 seg82->SetNSlats(13);
405 seg82->SetShift(shift);
406 seg82->SetNPCBperSector(npcb7);
407 seg82->SetSlatXPositions(xpos7);
408 seg82->SetSlatYPositions(ypos8);
409 seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
410 seg82->SetDAnod(0.25);
411 seg82->SetPadDivision(nseg4);
413 fMUON->SetResponseModel(chamber-1, fResponse0);
414 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
417 //__________________________________________________________________________
418 void AliMUONFactory::BuildStation5()
420 //--------------------------------------------------------
421 // Configuration for Chamber TC9/10 (Station 5) ---------
422 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
427 fMUON->SetNsec(chamber-1,2);
429 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
431 Int_t nseg4[4]={4, 4, 2, 1};
434 Int_t npcb9[52] = {0,0,0,3,
448 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};
449 Float_t ypos9[13] = {-224.8, -188.05, -151.0, -113.7, -76.1, -38.2, 0.0,
450 38.2, 76.1, 113.7, 151.0, 188.05, 224.8};
452 for (Int_t i = 0; i < 13; i++) ypos9[i] -= 20.;
455 seg91->SetNSlats(13);
456 seg91->SetShift(shift);
457 seg91->SetNPCBperSector(npcb9);
458 seg91->SetSlatXPositions(xpos9);
459 seg91->SetSlatYPositions(ypos9);
460 seg91->SetPadSize(10.,0.5);
461 seg91->SetDAnod(0.25);
462 seg91->SetPadDivision(nseg4);
463 fMUON->SetSegmentationModel(chamber-1, 1, seg91);
465 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
467 fMUON->SetSegmentationModel(chamber-1, 2, seg92);
468 seg92->SetNSlats(13);
469 seg92->SetShift(shift);
470 seg92->SetNPCBperSector(npcb9);
471 seg92->SetSlatXPositions(xpos9);
472 seg92->SetSlatYPositions(ypos9);
473 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
474 seg92->SetDAnod(0.25);
475 seg92->SetPadDivision(nseg4);
477 fMUON->SetResponseModel(chamber-1, fResponse0);
478 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
482 fMUON->SetNsec(chamber-1,2);
484 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
486 seg101->SetNSlats(13);
487 seg101->SetShift(shift);
488 seg101->SetNPCBperSector(npcb9);
489 seg101->SetSlatXPositions(xpos9);
490 seg101->SetSlatYPositions(ypos9);
491 seg101->SetPadSize(10.,0.5);
492 seg101->SetDAnod(0.25);
493 seg101->SetPadDivision(nseg4);
494 fMUON->SetSegmentationModel(chamber-1, 1, seg101);
496 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
498 fMUON->SetSegmentationModel(chamber-1, 2, seg102);
499 seg102->SetNSlats(13);
500 seg102->SetShift(shift);
501 seg102->SetNPCBperSector(npcb9);
502 seg102->SetSlatXPositions(xpos9);
503 seg102->SetSlatYPositions(ypos9);
504 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
505 seg102->SetDAnod(0.25);
506 seg102->SetPadDivision(nseg4);
508 fMUON->SetResponseModel(chamber-1, fResponse0);
509 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
512 //__________________________________________________________________________
513 void AliMUONFactory::BuildStation6()
515 //--------------------------------------------------------
516 // Configuration for Trigger Stations --------------------
517 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
520 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
522 // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
525 fMUON->SetNsec(chamber-1,2);
526 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
527 fMUON->SetSegmentationModel(chamber-1, 1, seg111);
528 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
529 fMUON->SetSegmentationModel(chamber-1, 2, seg112);
531 fMUON->SetResponseModel(chamber-1, responseTrigger0);
532 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
536 fMUON->SetNsec(chamber-1,2);
537 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
538 fMUON->SetSegmentationModel(chamber-1, 1, seg121);
539 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
540 fMUON->SetSegmentationModel(chamber-1, 2, seg122);
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 *seg131=new AliMUONSegmentationTriggerX;
548 fMUON->SetSegmentationModel(chamber-1, 1, seg131);
549 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
550 fMUON->SetSegmentationModel(chamber-1, 2, seg132);
551 fMUON->SetResponseModel(chamber-1, responseTrigger0);
552 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
555 fMUON->SetNsec(chamber-1,2);
556 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
557 fMUON->SetSegmentationModel(chamber-1, 1, seg141);
558 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
559 fMUON->SetSegmentationModel(chamber-1, 2, seg142);
561 fMUON->SetResponseModel(chamber-1, responseTrigger0);
562 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
565 //__________________________________________________________________________
566 void AliMUONFactory::Build(AliMUON* where, const char* what)
569 // Construct MUON from chambers, segmentation and responses
576 if (strcmp(tmp, "default")==0) {
577 // Set default parameters
579 fMUON->SetMaxStepGas(0.1);
580 fMUON->SetMaxStepAlu(0.1);
582 // Build all stations
592 AliDebug(0,"Non default version of MUON selected. You have to construct yourself the MUON elements !!");
595 //__________________________________________________________________________
596 void AliMUONFactory::BuildStation(AliMUON* where, Int_t stationNumber)
599 // Construct MUON from chambers, segmentation and responses
603 // First define the number of planes that are segmented (1 or 2) by a call
605 // Then chose for each chamber (chamber plane) the segmentation
606 // and response model.
607 // They should be equal for the two chambers of each station. In a future
608 // version this will be enforced.
612 if (!fResponse0) BuildCommon();
614 switch (stationNumber) {
615 case 1: BuildStation1(); break;
616 case 2: BuildStation2(); break;
617 case 3: BuildStation3(); break;
618 case 4: BuildStation4(); break;
619 case 5: BuildStation5(); break;
620 case 6: BuildStation6(); break;
622 default: AliFatal("Wrong station number");