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 Revision 1.2.10.1 2002/10/11 06:56:47 hristov
23 Updating VirtualMC to v3-09-02
25 Revision 1.3 2002/09/02 14:35:14 morsch
26 New segmentation radii for Station 2.
28 Revision 1.2 2001/05/16 14:57:17 alibrary
29 New files for folders and Stack
31 Revision 1.1 2001/04/06 11:24:43 morsch
32 Dependency on implementations of AliSegmentation and AliMUONResponse moved to AliMUONFactory class.
33 Static method Build() builds the MUON system out of chambers, segmentation and response.
36 #include "AliMUONFactory.h"
38 #include "AliMUONChamber.h"
39 #include "AliMUONResponseV0.h"
40 #include "AliMUONResponseTrigger.h"
41 #include "AliMUONSegmentationV0.h"
42 #include "AliMUONSegmentationV01.h"
43 #include "AliMUONSegmentationV02.h"
44 #include "AliMUONSegmentationV04.h"
45 #include "AliMUONSegmentationV05.h"
46 #include "AliMUONSegmentationSlat.h"
47 #include "AliMUONSegmentationSlatN.h"
48 #include "AliMUONSegmentationTrigger.h"
49 #include "AliMUONSegmentationTriggerX.h"
50 #include "AliMUONSegmentationTriggerY.h"
52 ClassImp(AliMUONFactory)
55 void AliMUONFactory::Build(AliMUON* where, const char* what)
58 // Construct MUON from chambers, segmentation and responses
61 AliMUON* pMUON = where;
64 if (strcmp(tmp, "default")==0) {
65 if(pMUON->GetDebug()) {
67 printf("\nAliMUONFactory: --------AliMUONFactory------------------------------");
68 printf("\nAliMUONFactory: Non default version of MUON selected ");
69 printf("\nAliMUONFactory: You have to construct yourself the MUON elements !!");
70 printf("\nAliMUONFactory: ----------------------------------------------------");
73 pMUON->SetMaxStepGas(0.1);
74 pMUON->SetMaxStepAlu(0.1);
78 // First define the number of planes that are segmented (1 or 2) by a call
80 // Then chose for each chamber (chamber plane) the segmentation
81 // and response model.
82 // They should be equal for the two chambers of each station. In a future
83 // version this will be enforced.
87 // Default response: 5 mm of gas
88 AliMUONResponseV0* response0 = new AliMUONResponseV0;
89 response0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
90 response0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
91 response0->SetPitch(0.25); // anode-cathode distance
92 response0->SetSigmaIntegration(10.);
93 response0->SetChargeSlope(50);
94 response0->SetChargeSpread(0.18, 0.18);
95 response0->SetMaxAdc(4096);
96 response0->SetZeroSuppression(6);
98 // Response for 4 mm of gas (station 1)
99 // automatic consistency with width of sensitive medium in CreateGeometry ????
100 AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
101 // Mathieson parameters from L.Kharmandarian's thesis, page 190
102 responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
103 responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
104 responseSt1->SetPitch(0.20); // anode-cathode distance
105 responseSt1->SetSigmaIntegration(10.);
106 // ChargeSlope larger to compensate for the smaller anode-cathode distance
107 // and keep the same most probable ADC channel for mip's
108 responseSt1->SetChargeSlope(62.5);
109 // assumed proportionality to anode-cathode distance for ChargeSpread
110 responseSt1->SetChargeSpread(0.144, 0.144);
111 responseSt1->SetMaxAdc(4096);
112 responseSt1->SetZeroSuppression(6);
114 //--------------------------------------------------------
115 // Configuration for Chamber TC1/2 (Station 1) ----------
116 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
118 Int_t nseg1[4]={4, 4, 2, 1};
122 pMUON->SetNsec(chamber-1,2);
124 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
126 seg11->SetSegRadii(rseg1);
127 seg11->SetPadSize(2.4, 0.4); // smaller pad size
128 seg11->SetDAnod(0.20); // smaller distance between anode wires
129 seg11->SetPadDivision(nseg1);
131 pMUON->SetSegmentationModel(chamber-1, 1, seg11);
133 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
134 seg12->SetSegRadii(rseg1);
135 seg12->SetPadSize(0.6, 1.6); // smaller pad size
136 seg12->SetDAnod(0.20); // smaller distance between anode wires
137 seg12->SetPadDivision(nseg1);
139 pMUON->SetSegmentationModel(chamber-1, 2, seg12);
141 pMUON->SetResponseModel(chamber-1, responseSt1); // special response
142 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
147 pMUON->SetNsec(chamber-1,2);
149 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
150 seg21->SetSegRadii(rseg1);
151 seg21->SetPadSize(2.4, 0.4); // smaller pad size
152 seg21->SetDAnod(0.20); // smaller distance between anode wires
153 seg21->SetPadDivision(nseg1);
154 pMUON->SetSegmentationModel(chamber-1, 1, seg21);
156 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
157 seg22->SetSegRadii(rseg1);
158 seg22->SetPadSize(0.6, 1.6); // smaller pad size
159 seg22->SetDAnod(0.20); // smaller distance between anode wires
160 seg22->SetPadDivision(nseg1);
161 pMUON->SetSegmentationModel(chamber-1, 2, seg22);
163 pMUON->SetResponseModel(chamber-1, responseSt1); // special response
164 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
167 //--------------------------------------------------------
168 // Configuration for Chamber TC3/4 (Station 2) -----------
169 ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170 // Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
171 Float_t rseg2[4]={23.5, 53.5, 90.5, 122.5};
172 Int_t nseg2[4]={4, 4, 2, 1};
176 pMUON->SetNsec(chamber-1,2);
178 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
179 seg31->SetSegRadii(rseg2);
180 seg31->SetPadSize(3.0, 0.5);
181 seg31->SetDAnod(3.0/3./4);
182 seg31->SetPadDivision(nseg2);
183 pMUON->SetSegmentationModel(chamber-1, 1, seg31);
185 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
186 seg32->SetSegRadii(rseg2);
187 seg32->SetPadSize(0.75, 2.0);
188 seg32->SetPadDivision(nseg2);
189 seg32->SetDAnod(3.0/3./4);
191 pMUON->SetSegmentationModel(chamber-1, 2, seg32);
193 pMUON->SetResponseModel(chamber-1, response0);
194 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
199 pMUON->SetNsec(chamber-1,2);
201 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
202 seg41->SetSegRadii(rseg2);
203 seg41->SetPadSize(3.0, 0.5);
204 seg41->SetDAnod(3.0/3./4);
205 seg41->SetPadDivision(nseg2);
206 pMUON->SetSegmentationModel(chamber-1, 1, seg41);
208 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
209 seg42->SetSegRadii(rseg2);
210 seg42->SetPadSize(0.75, 2.0);
211 seg42->SetPadDivision(nseg2);
212 seg42->SetDAnod(3.0/3./4);
214 pMUON->SetSegmentationModel(chamber-1, 2, seg42);
216 pMUON->SetResponseModel(chamber-1, response0);
217 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
220 //--------------------------------------------------------
221 // Configuration for Chamber TC5/6 (Station 3) ----------
222 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
223 Int_t nseg3[4]={4, 4, 2, 1};
224 Int_t npcb5[36] = {0,0,2,0,
234 Float_t shift = 1.5/2.;
235 Float_t xpos5[9] = {2., 2., 2., 2.,33., 2., 2., 2., 2.};
236 Float_t ypos5 = -(20.+4.*(40.-2.*shift));
239 pMUON->SetNsec(chamber-1,2);
240 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
242 seg51->SetShift(shift);
243 seg51->SetNPCBperSector(npcb5);
244 seg51->SetSlatXPositions(xpos5);
245 seg51->SetSlatYPosition(ypos5);
246 seg51->SetPadSize(10.,0.5);
247 seg51->SetDAnod(0.25);
248 seg51->SetPadDivision(nseg3);
249 pMUON->SetSegmentationModel(chamber-1, 1, seg51);
251 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
253 seg52->SetShift(shift);
254 seg52->SetNPCBperSector(npcb5);
255 seg52->SetSlatXPositions(xpos5);
256 seg52->SetSlatYPosition(ypos5);
257 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
258 seg52->SetDAnod(0.25);
259 seg52->SetPadDivision(nseg3);
260 pMUON->SetSegmentationModel(chamber-1, 2, seg52);
261 pMUON->SetResponseModel(chamber-1, response0);
262 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
265 pMUON->SetNsec(chamber-1,2);
266 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
268 seg61->SetShift(shift);
269 seg61->SetNPCBperSector(npcb5);
270 seg61->SetSlatXPositions(xpos5);
271 seg61->SetSlatYPosition(ypos5);
272 seg61->SetPadSize(10.,0.5);
273 seg61->SetDAnod(0.25);
274 seg61->SetPadDivision(nseg3);
275 pMUON->SetSegmentationModel(chamber-1, 1, seg61);
277 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
279 seg62->SetShift(shift);
280 seg62->SetNPCBperSector(npcb5);
281 seg62->SetSlatXPositions(xpos5);
282 seg62->SetSlatYPosition(ypos5);
283 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
284 seg62->SetDAnod(0.25);
285 seg62->SetPadDivision(nseg3);
286 pMUON->SetSegmentationModel(chamber-1, 2, seg62);
287 pMUON->SetResponseModel(chamber-1, response0);
288 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
290 //--------------------------------------------------------
291 // Configuration for Chamber TC7/8 (Station 4) ----------
292 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294 Int_t nseg4[4]={4, 4, 2, 1};
299 pMUON->SetNsec(chamber-1,2);
301 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
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 pMUON->SetSegmentationModel(chamber-1, 1, seg71);
327 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
329 pMUON->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 pMUON->SetResponseModel(chamber-1, response0);
340 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
344 pMUON->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 pMUON->SetSegmentationModel(chamber-1, 1, seg81);
358 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
360 pMUON->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 pMUON->SetResponseModel(chamber-1, response0);
371 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
374 //--------------------------------------------------------
375 // Configuration for Chamber TC9/10 (Station 5) ---------
376 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
380 pMUON->SetNsec(chamber-1,2);
382 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
383 Int_t npcb9[52] = {0,0,0,3,
397 Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2., 2.};
398 Float_t ypos9 = -(20.+6.*(40.-2.*shift));
400 seg91->SetNSlats(13);
401 seg91->SetShift(shift);
402 seg91->SetNPCBperSector(npcb9);
403 seg91->SetSlatXPositions(xpos9);
404 seg91->SetSlatYPosition(ypos9);
405 seg91->SetPadSize(10.,0.5);
406 seg91->SetDAnod(0.25);
407 seg91->SetPadDivision(nseg4);
408 pMUON->SetSegmentationModel(chamber-1, 1, seg91);
410 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
412 pMUON->SetSegmentationModel(chamber-1, 2, seg92);
413 seg92->SetNSlats(13);
414 seg92->SetShift(shift);
415 seg92->SetNPCBperSector(npcb9);
416 seg92->SetSlatXPositions(xpos9);
417 seg92->SetSlatYPosition(ypos9);
418 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
419 seg92->SetDAnod(0.25);
420 seg92->SetPadDivision(nseg4);
422 pMUON->SetResponseModel(chamber-1, response0);
423 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
427 pMUON->SetNsec(chamber-1,2);
429 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
431 seg101->SetNSlats(13);
432 seg101->SetShift(shift);
433 seg101->SetNPCBperSector(npcb9);
434 seg101->SetSlatXPositions(xpos9);
435 seg101->SetSlatYPosition(ypos9);
436 seg101->SetPadSize(10.,0.5);
437 seg101->SetDAnod(0.25);
438 seg101->SetPadDivision(nseg4);
439 pMUON->SetSegmentationModel(chamber-1, 1, seg101);
441 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
443 pMUON->SetSegmentationModel(chamber-1, 2, seg102);
444 seg102->SetNSlats(13);
445 seg102->SetShift(shift);
446 seg102->SetNPCBperSector(npcb9);
447 seg102->SetSlatXPositions(xpos9);
448 seg102->SetSlatYPosition(ypos9);
449 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
450 seg102->SetDAnod(0.25);
451 seg102->SetPadDivision(nseg4);
453 pMUON->SetResponseModel(chamber-1, response0);
454 pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
456 //--------------------------------------------------------
457 // Configuration for Trigger Stations --------------------
458 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
460 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
462 // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
465 pMUON->SetNsec(chamber-1,2);
466 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
467 pMUON->SetSegmentationModel(chamber-1, 1, seg111);
468 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
469 pMUON->SetSegmentationModel(chamber-1, 2, seg112);
471 pMUON->SetResponseModel(chamber-1, responseTrigger0);
472 pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
476 pMUON->SetNsec(chamber-1,2);
477 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
478 pMUON->SetSegmentationModel(chamber-1, 1, seg121);
479 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
480 pMUON->SetSegmentationModel(chamber-1, 2, seg122);
482 pMUON->SetResponseModel(chamber-1, responseTrigger0);
483 pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
486 pMUON->SetNsec(chamber-1,2);
487 AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
488 pMUON->SetSegmentationModel(chamber-1, 1, seg131);
489 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
490 pMUON->SetSegmentationModel(chamber-1, 2, seg132);
491 pMUON->SetResponseModel(chamber-1, responseTrigger0);
492 pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
495 pMUON->SetNsec(chamber-1,2);
496 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
497 pMUON->SetSegmentationModel(chamber-1, 1, seg141);
498 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
499 pMUON->SetSegmentationModel(chamber-1, 2, seg142);
501 pMUON->SetResponseModel(chamber-1, responseTrigger0);
502 pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
504 if(pMUON->GetDebug()) {
505 printf("\nAliMUONFactory: --------AliMUONFactory------------------------------");
506 printf("\nAliMUONFactory: Non default version of MUON selected ");
507 printf("\nAliMUONFactory: You have to construct yourself the MUON elements !!");
508 printf("\nAliMUONFactory: ----------------------------------------------------");