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(const AliMUONFactory& rhs)
53 // Protected copy constructor
55 Fatal("AliMUONFactoryModule", "Not implemented.");
58 //__________________________________________________________________________
59 AliMUONFactory::~AliMUONFactory()
64 //__________________________________________________________________________
65 AliMUONFactory& AliMUONFactory::operator=(const AliMUONFactory& rhs)
67 // Protected assignement operator
69 if (this == &rhs) return *this;
71 Fatal("operator=", "Not implemented.");
76 //__________________________________________________________________________
77 void AliMUONFactory::BuildCommon()
80 // Construct the default response.
83 // Default response: 5 mm of gas
84 fResponse0 = new AliMUONResponseV0;
85 fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
86 fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
87 fResponse0->SetPitch(0.25); // anode-cathode distance
88 fResponse0->SetSigmaIntegration(10.);
89 fResponse0->SetChargeSlope(10);
90 fResponse0->SetChargeSpread(0.18, 0.18);
91 fResponse0->SetMaxAdc(4096);
92 fResponse0->SetSaturation(3000);
93 fResponse0->SetZeroSuppression(6);
96 //__________________________________________________________________________
97 void AliMUONFactory::BuildStation1()
99 //--------------------------------------------------------
100 // Configuration for Chamber TC1/2 (Station 1) ----------
101 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103 // Response for 4 mm of gas (station 1)
104 // automatic consistency with width of sensitive medium in CreateGeometry ????
105 AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
106 // Mathieson parameters from L.Kharmandarian's thesis, page 190
107 responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
108 responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
109 responseSt1->SetPitch(0.20); // anode-cathode distance
110 responseSt1->SetSigmaIntegration(10.);
111 // ChargeSlope larger to compensate for the smaller anode-cathode distance
112 // and keep the same most probable ADC channel for mip's
113 responseSt1->SetChargeSlope(62.5);
114 // assumed proportionality to anode-cathode distance for ChargeSpread
115 responseSt1->SetChargeSpread(0.144, 0.144);
116 responseSt1->SetMaxAdc(4096);
117 responseSt1->SetSaturation(3000);
118 responseSt1->SetZeroSuppression(6);
120 //--------------------------------------------------------
121 // Configuration for Chamber TC1/2 (Station 1) ----------
123 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
124 Int_t nseg1[4]={4, 4, 2, 1};
128 fMUON->SetNsec(chamber-1,2);
130 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
132 seg11->SetSegRadii(rseg1);
133 seg11->SetPadSize(2.4, 0.4); // smaller pad size
134 seg11->SetDAnod(0.20); // smaller distance between anode wires
135 seg11->SetPadDivision(nseg1);
137 fMUON->SetSegmentationModel(chamber-1, 1, seg11);
139 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
140 seg12->SetSegRadii(rseg1);
141 seg12->SetPadSize(0.6, 1.6); // smaller pad size
142 seg12->SetDAnod(0.20); // smaller distance between anode wires
143 seg12->SetPadDivision(nseg1);
145 fMUON->SetSegmentationModel(chamber-1, 2, seg12);
147 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
148 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
153 fMUON->SetNsec(chamber-1,2);
155 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
156 seg21->SetSegRadii(rseg1);
157 seg21->SetPadSize(2.4, 0.4); // smaller pad size
158 seg21->SetDAnod(0.20); // smaller distance between anode wires
159 seg21->SetPadDivision(nseg1);
160 fMUON->SetSegmentationModel(chamber-1, 1, seg21);
162 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
163 seg22->SetSegRadii(rseg1);
164 seg22->SetPadSize(0.6, 1.6); // smaller pad size
165 seg22->SetDAnod(0.20); // smaller distance between anode wires
166 seg22->SetPadDivision(nseg1);
167 fMUON->SetSegmentationModel(chamber-1, 2, seg22);
169 fMUON->SetResponseModel(chamber-1, responseSt1); // special response
170 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
174 //__________________________________________________________________________
175 void AliMUONFactory::BuildStation2()
178 //--------------------------------------------------------
179 // Configuration for Chamber TC3/4 (Station 2) -----------
180 ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
181 // Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
183 Float_t rseg2[4]={23.5, 53.5, 90.5, 122.5};
184 Int_t nseg2[4]={4, 4, 2, 1};
188 fMUON->SetNsec(chamber-1,2);
190 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
191 seg31->SetSegRadii(rseg2);
192 seg31->SetPadSize(3.0, 0.5);
193 seg31->SetDAnod(3.0/3./4);
194 seg31->SetPadDivision(nseg2);
195 fMUON->SetSegmentationModel(chamber-1, 1, seg31);
197 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
198 seg32->SetSegRadii(rseg2);
199 seg32->SetPadSize(0.75, 2.0);
200 seg32->SetPadDivision(nseg2);
201 seg32->SetDAnod(3.0/3./4);
203 fMUON->SetSegmentationModel(chamber-1, 2, seg32);
205 fMUON->SetResponseModel(chamber-1, fResponse0);
206 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
211 fMUON->SetNsec(chamber-1,2);
213 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
214 seg41->SetSegRadii(rseg2);
215 seg41->SetPadSize(3.0, 0.5);
216 seg41->SetDAnod(3.0/3./4);
217 seg41->SetPadDivision(nseg2);
218 fMUON->SetSegmentationModel(chamber-1, 1, seg41);
220 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
221 seg42->SetSegRadii(rseg2);
222 seg42->SetPadSize(0.75, 2.0);
223 seg42->SetPadDivision(nseg2);
224 seg42->SetDAnod(3.0/3./4);
226 fMUON->SetSegmentationModel(chamber-1, 2, seg42);
228 fMUON->SetResponseModel(chamber-1, fResponse0);
229 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
233 //__________________________________________________________________________
234 void AliMUONFactory::BuildStation3()
236 //--------------------------------------------------------
237 // Configuration for Chamber TC5/6 (Station 3) ----------
238 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240 Int_t nseg3[4]={4, 4, 2, 1};
241 Int_t npcb5[36] = {0,0,2,0,
251 Float_t shift = 1.5/2.;
252 Float_t xpos5[9] = {2., 2., 2., 2.,33., 2., 2., 2., 2.};
253 Float_t ypos5 = -(20.+4.*(40.-2.*shift));
256 fMUON->SetNsec(chamber-1,2);
257 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
259 seg51->SetShift(shift);
260 seg51->SetNPCBperSector(npcb5);
261 seg51->SetSlatXPositions(xpos5);
262 seg51->SetSlatYPosition(ypos5);
263 seg51->SetPadSize(10.,0.5);
264 seg51->SetDAnod(0.25);
265 seg51->SetPadDivision(nseg3);
266 fMUON->SetSegmentationModel(chamber-1, 1, seg51);
268 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
270 seg52->SetShift(shift);
271 seg52->SetNPCBperSector(npcb5);
272 seg52->SetSlatXPositions(xpos5);
273 seg52->SetSlatYPosition(ypos5);
274 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
275 seg52->SetDAnod(0.25);
276 seg52->SetPadDivision(nseg3);
277 fMUON->SetSegmentationModel(chamber-1, 2, seg52);
278 fMUON->SetResponseModel(chamber-1, fResponse0);
279 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
282 fMUON->SetNsec(chamber-1,2);
283 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
285 seg61->SetShift(shift);
286 seg61->SetNPCBperSector(npcb5);
287 seg61->SetSlatXPositions(xpos5);
288 seg61->SetSlatYPosition(ypos5);
289 seg61->SetPadSize(10.,0.5);
290 seg61->SetDAnod(0.25);
291 seg61->SetPadDivision(nseg3);
292 fMUON->SetSegmentationModel(chamber-1, 1, seg61);
294 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
296 seg62->SetShift(shift);
297 seg62->SetNPCBperSector(npcb5);
298 seg62->SetSlatXPositions(xpos5);
299 seg62->SetSlatYPosition(ypos5);
300 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
301 seg62->SetDAnod(0.25);
302 seg62->SetPadDivision(nseg3);
303 fMUON->SetSegmentationModel(chamber-1, 2, seg62);
304 fMUON->SetResponseModel(chamber-1, fResponse0);
305 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
309 //__________________________________________________________________________
310 void AliMUONFactory::BuildStation4()
312 //--------------------------------------------------------
313 // Configuration for Chamber TC7/8 (Station 4) ----------
314 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
316 Int_t nseg4[4]={4, 4, 2, 1};
321 fMUON->SetNsec(chamber-1,2);
323 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
324 Float_t shift = 1.5/2.;
325 Int_t npcb7[44] = {0,0,0,3,
336 Float_t xpos7[11] = {2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2.};
337 Float_t ypos7 = -(20.+5.*(40.-2.*shift));
339 seg71->SetNSlats(11);
340 seg71->SetShift(shift);
341 seg71->SetNPCBperSector(npcb7);
342 seg71->SetSlatXPositions(xpos7);
343 seg71->SetSlatYPosition(ypos7);
345 seg71->SetPadSize(10.,0.5);
346 seg71->SetDAnod(0.25);
347 seg71->SetPadDivision(nseg4);
348 fMUON->SetSegmentationModel(chamber-1, 1, seg71);
350 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
352 fMUON->SetSegmentationModel(chamber-1, 2, seg72);
353 seg72->SetNSlats(11);
354 seg72->SetShift(shift);
355 seg72->SetNPCBperSector(npcb7);
356 seg72->SetSlatXPositions(xpos7);
357 seg72->SetSlatYPosition(ypos7);
358 seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
359 seg72->SetDAnod(0.25);
360 seg72->SetPadDivision(nseg4);
362 fMUON->SetResponseModel(chamber-1, fResponse0);
363 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
367 fMUON->SetNsec(chamber-1,2);
369 AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
371 seg81->SetNSlats(11);
372 seg81->SetShift(shift);
373 seg81->SetNPCBperSector(npcb7);
374 seg81->SetSlatXPositions(xpos7);
375 seg81->SetSlatYPosition(ypos7);
376 seg81->SetPadSize(10.,0.5);
377 seg81->SetDAnod(0.25);
378 seg81->SetPadDivision(nseg4);
379 fMUON->SetSegmentationModel(chamber-1, 1, seg81);
381 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
383 fMUON->SetSegmentationModel(chamber-1, 2, seg82);
384 seg82->SetNSlats(11);
385 seg82->SetShift(shift);
386 seg82->SetNPCBperSector(npcb7);
387 seg82->SetSlatXPositions(xpos7);
388 seg82->SetSlatYPosition(ypos7);
389 seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
390 seg82->SetDAnod(0.25);
391 seg82->SetPadDivision(nseg4);
393 fMUON->SetResponseModel(chamber-1, fResponse0);
394 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
397 //__________________________________________________________________________
398 void AliMUONFactory::BuildStation5()
400 //--------------------------------------------------------
401 // Configuration for Chamber TC9/10 (Station 5) ---------
402 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
407 fMUON->SetNsec(chamber-1,2);
409 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
411 Int_t nseg4[4]={4, 4, 2, 1};
412 Float_t shift = 1.5/2.;
413 Int_t npcb9[52] = {0,0,0,3,
427 Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2., 2.};
428 Float_t ypos9 = -(20.+6.*(40.-2.*shift));
430 seg91->SetNSlats(13);
431 seg91->SetShift(shift);
432 seg91->SetNPCBperSector(npcb9);
433 seg91->SetSlatXPositions(xpos9);
434 seg91->SetSlatYPosition(ypos9);
435 seg91->SetPadSize(10.,0.5);
436 seg91->SetDAnod(0.25);
437 seg91->SetPadDivision(nseg4);
438 fMUON->SetSegmentationModel(chamber-1, 1, seg91);
440 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
442 fMUON->SetSegmentationModel(chamber-1, 2, seg92);
443 seg92->SetNSlats(13);
444 seg92->SetShift(shift);
445 seg92->SetNPCBperSector(npcb9);
446 seg92->SetSlatXPositions(xpos9);
447 seg92->SetSlatYPosition(ypos9);
448 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
449 seg92->SetDAnod(0.25);
450 seg92->SetPadDivision(nseg4);
452 fMUON->SetResponseModel(chamber-1, fResponse0);
453 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
457 fMUON->SetNsec(chamber-1,2);
459 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
461 seg101->SetNSlats(13);
462 seg101->SetShift(shift);
463 seg101->SetNPCBperSector(npcb9);
464 seg101->SetSlatXPositions(xpos9);
465 seg101->SetSlatYPosition(ypos9);
466 seg101->SetPadSize(10.,0.5);
467 seg101->SetDAnod(0.25);
468 seg101->SetPadDivision(nseg4);
469 fMUON->SetSegmentationModel(chamber-1, 1, seg101);
471 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
473 fMUON->SetSegmentationModel(chamber-1, 2, seg102);
474 seg102->SetNSlats(13);
475 seg102->SetShift(shift);
476 seg102->SetNPCBperSector(npcb9);
477 seg102->SetSlatXPositions(xpos9);
478 seg102->SetSlatYPosition(ypos9);
479 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
480 seg102->SetDAnod(0.25);
481 seg102->SetPadDivision(nseg4);
483 fMUON->SetResponseModel(chamber-1, fResponse0);
484 fMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
487 //__________________________________________________________________________
488 void AliMUONFactory::BuildStation6()
490 //--------------------------------------------------------
491 // Configuration for Trigger Stations --------------------
492 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
495 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
497 // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
500 fMUON->SetNsec(chamber-1,2);
501 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
502 fMUON->SetSegmentationModel(chamber-1, 1, seg111);
503 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
504 fMUON->SetSegmentationModel(chamber-1, 2, seg112);
506 fMUON->SetResponseModel(chamber-1, responseTrigger0);
507 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
511 fMUON->SetNsec(chamber-1,2);
512 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
513 fMUON->SetSegmentationModel(chamber-1, 1, seg121);
514 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
515 fMUON->SetSegmentationModel(chamber-1, 2, seg122);
517 fMUON->SetResponseModel(chamber-1, responseTrigger0);
518 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
521 fMUON->SetNsec(chamber-1,2);
522 AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
523 fMUON->SetSegmentationModel(chamber-1, 1, seg131);
524 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
525 fMUON->SetSegmentationModel(chamber-1, 2, seg132);
526 fMUON->SetResponseModel(chamber-1, responseTrigger0);
527 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
530 fMUON->SetNsec(chamber-1,2);
531 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
532 fMUON->SetSegmentationModel(chamber-1, 1, seg141);
533 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
534 fMUON->SetSegmentationModel(chamber-1, 2, seg142);
536 fMUON->SetResponseModel(chamber-1, responseTrigger0);
537 fMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
540 //__________________________________________________________________________
541 void AliMUONFactory::Build(AliMUON* where, const char* what)
544 // Construct MUON from chambers, segmentation and responses
551 if (strcmp(tmp, "default")==0) {
552 // Set default parameters
554 fMUON->SetMaxStepGas(0.1);
555 fMUON->SetMaxStepAlu(0.1);
557 // Build all stations
567 if(fMUON->GetDebug()) {
568 printf("\nAliMUONFactory: --------AliMUONFactory------------------------------");
569 printf("\nAliMUONFactory: Non default version of MUON selected ");
570 printf("\nAliMUONFactory: You have to construct yourself the MUON elements !!");
571 printf("\nAliMUONFactory: ----------------------------------------------------");
576 //__________________________________________________________________________
577 void AliMUONFactory::BuildStation(AliMUON* where, Int_t stationNumber)
580 // Construct MUON from chambers, segmentation and responses
584 // First define the number of planes that are segmented (1 or 2) by a call
586 // Then chose for each chamber (chamber plane) the segmentation
587 // and response model.
588 // They should be equal for the two chambers of each station. In a future
589 // version this will be enforced.
593 if (!fResponse0) BuildCommon();
595 switch (stationNumber) {
596 case 1: BuildStation1(); break;
597 case 2: BuildStation2(); break;
598 case 3: BuildStation3(); break;
599 case 4: BuildStation4(); break;
600 case 5: BuildStation5(); break;
601 case 6: BuildStation6(); break;
603 default: Fatal("Build", "Wrong station number");