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 **************************************************************************/
18 Revision 1.16 2001/01/27 08:50:50 morsch
19 Call non default constructors of segmentation classes.
21 Revision 1.15 2001/01/17 20:57:45 hristov
22 Unused variable removed
24 Revision 1.14 2000/12/21 22:42:55 morsch
25 Constructor contains default set-up for segmentation.
26 Record charged particles only.
28 Revision 1.13 2000/10/06 10:03:38 morsch
29 Call to gMC->VolId() moved to Init()
31 Revision 1.12 2000/10/02 21:28:09 fca
32 Removal of useless dependecies via forward declarations
34 Revision 1.11 2000/06/27 07:31:07 morsch
35 fChambers = 0; deleted from constructor.
37 Revision 1.10 2000/06/26 14:02:38 morsch
38 Add class AliMUONConstants with MUON specific constants using static memeber data and access methods.
40 Revision 1.9 2000/06/15 07:58:49 morsch
41 Code from MUON-dev joined
43 Revision 1.8.4.9 2000/06/12 19:20:49 morsch
44 Constructor sets default geometry, segmentation and response parameters.
46 Revision 1.8.4.8 2000/06/09 21:55:28 morsch
47 Most coding rule violations corrected.
49 Revision 1.8.4.7 2000/05/02 13:15:18 morsch
50 Coding rule violations RS3, RN13 corected
52 Revision 1.8.4.6 2000/05/02 10:24:26 morsch
53 Public access to fdGas and fdAlu of AliMUONChamber replaced by getters.
55 Revision 1.8.4.5 2000/04/26 19:58:47 morsch
56 Obsolete reference to trig_ removed.
58 Revision 1.8.4.4 2000/04/19 19:42:47 morsch
61 Revision 1.8.4.3 2000/02/17 08:17:43 morsch
62 Gammas and neutrons are also scored in the stepmanager
65 /////////////////////////////////////////////////////////
66 // Manager and hits classes for set:MUON version 0 //
67 /////////////////////////////////////////////////////////
72 #include <TLorentzVector.h>
75 #include "AliMUONv0.h"
76 #include "AliMUONChamber.h"
80 #include "AliMUONHit.h"
81 #include "AliMUONPadHit.h"
82 #include "AliCallf77.h"
84 #include "AliMUONResponseV0.h"
85 #include "AliMUONResponseTrigger.h"
86 #include "AliMUONSegmentationV0.h"
87 #include "AliMUONSegmentationV01.h"
88 #include "AliMUONSegmentationV02.h"
89 #include "AliMUONSegmentationV04.h"
90 #include "AliMUONSegmentationV05.h"
91 #include "AliMUONSegmentationSlat.h"
92 #include "AliMUONSegmentationSlatN.h"
93 #include "AliMUONSegmentationTrigger.h"
94 #include "AliMUONSegmentationTriggerX.h"
95 #include "AliMUONSegmentationTriggerY.h"
96 #include "AliMUONConstants.h"
100 //___________________________________________
101 AliMUONv0::AliMUONv0() : AliMUON()
107 //___________________________________________
108 AliMUONv0::AliMUONv0(const char *name, const char *title)
109 : AliMUON(name,title)
117 // First define the number of planes that are segmented (1 or 2) by a call
119 // Then chose for each chamber (chamber plane) the segmentation
120 // and response model.
121 // They should be equal for the two chambers of each station. In a future
122 // version this will be enforced.
126 // Default response: 5 mm of gas
127 AliMUONResponseV0* response0 = new AliMUONResponseV0;
128 response0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
129 response0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
130 response0->SetPitch(0.25); // anode-cathode distance
131 response0->SetSigmaIntegration(10.);
132 response0->SetChargeSlope(50);
133 response0->SetChargeSpread(0.18, 0.18);
134 response0->SetMaxAdc(4096);
135 response0->SetZeroSuppression(6);
137 // Response for 4 mm of gas (station 1)
138 // automatic consistency with width of sensitive medium in CreateGeometry ????
139 AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
140 // Mathieson parameters from L.Kharmandarian's thesis, page 190
141 responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
142 responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
143 responseSt1->SetPitch(0.20); // anode-cathode distance
144 responseSt1->SetSigmaIntegration(10.);
145 // ChargeSlope larger to compensate for the smaller anode-cathode distance
146 // and keep the same most probable ADC channel for mip's
147 responseSt1->SetChargeSlope(62.5);
148 // assumed proportionality to anode-cathode distance for ChargeSpread
149 responseSt1->SetChargeSpread(0.144, 0.144);
150 responseSt1->SetMaxAdc(4096);
151 responseSt1->SetZeroSuppression(6);
153 //--------------------------------------------------------
154 // Configuration for Chamber TC1/2 (Station 1) ----------
155 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
157 Int_t nseg1[4]={4, 4, 2, 1};
161 SetNsec(chamber-1,2);
163 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
165 seg11->SetSegRadii(rseg1);
166 // seg11->SetPadSize(3, 0.5);
167 seg11->SetPadSize(2.4, 0.4); // smaller pad size
168 // seg11->SetDAnod(3.0/3./4);
169 seg11->SetDAnod(0.20); // smaller distance between anode wires
170 seg11->SetPadDivision(nseg1);
172 SetSegmentationModel(chamber-1, 1, seg11);
174 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
175 seg12->SetSegRadii(rseg1);
176 // seg12->SetPadSize(0.75, 2.0);
177 seg12->SetPadSize(0.6, 1.6); // smaller pad size
178 // seg12->SetDAnod(3.0/3./4);
179 seg12->SetDAnod(0.20); // smaller distance between anode wires
180 seg12->SetPadDivision(nseg1);
182 SetSegmentationModel(chamber-1, 2, seg12);
184 // SetResponseModel(chamber-1, response0);
185 SetResponseModel(chamber-1, responseSt1); // special response
186 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
191 SetNsec(chamber-1,2);
193 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
194 seg21->SetSegRadii(rseg1);
195 // seg21->SetPadSize(3, 0.5);
196 seg21->SetPadSize(2.4, 0.4); // smaller pad size
197 // seg21->SetDAnod(3.0/3./4);
198 seg21->SetDAnod(0.20); // smaller distance between anode wires
199 seg21->SetPadDivision(nseg1);
200 SetSegmentationModel(chamber-1, 1, seg21);
202 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
203 seg22->SetSegRadii(rseg1);
204 // seg22->SetPadSize(0.75, 2.);
205 seg22->SetPadSize(0.6, 1.6); // smaller pad size
206 // seg22->SetDAnod(3.0/3./4);
207 seg22->SetDAnod(0.20); // smaller distance between anode wires
208 seg22->SetPadDivision(nseg1);
209 SetSegmentationModel(chamber-1, 2, seg22);
211 // SetResponseModel(chamber-1, response0);
212 SetResponseModel(chamber-1, responseSt1); // special response
213 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
216 //--------------------------------------------------------
217 // Configuration for Chamber TC3/4 (Station 2) -----------
218 ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
219 // Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
220 Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5};
221 Int_t nseg2[4]={4, 4, 2, 1};
225 SetNsec(chamber-1,2);
227 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
228 seg31->SetSegRadii(rseg2);
229 seg31->SetPadSize(3.0, 0.5);
230 seg31->SetDAnod(3.0/3./4);
231 seg31->SetPadDivision(nseg2);
232 SetSegmentationModel(chamber-1, 1, seg31);
234 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
235 seg32->SetSegRadii(rseg2);
236 seg32->SetPadSize(0.75, 2.0);
237 seg32->SetPadDivision(nseg2);
238 seg32->SetDAnod(3.0/3./4);
240 SetSegmentationModel(chamber-1, 2, seg32);
242 SetResponseModel(chamber-1, response0);
243 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
248 SetNsec(chamber-1,2);
250 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
251 seg41->SetSegRadii(rseg2);
252 seg41->SetPadSize(3.0, 0.5);
253 seg41->SetDAnod(3.0/3./4);
254 seg41->SetPadDivision(nseg2);
255 SetSegmentationModel(chamber-1, 1, seg41);
257 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
258 seg42->SetSegRadii(rseg2);
259 seg42->SetPadSize(0.75, 2.0);
260 seg42->SetPadDivision(nseg2);
261 seg42->SetDAnod(3.0/3./4);
263 SetSegmentationModel(chamber-1, 2, seg42);
265 SetResponseModel(chamber-1, response0);
266 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
269 //--------------------------------------------------------
270 // Configuration for Chamber TC5/6 (Station 3) ----------
271 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
272 Int_t nseg3[4]={4, 4, 2, 1};
273 Int_t npcb5[36] = {0,0,2,0,
283 Float_t shift = 1.5/2.;
284 // Float_t xpos5[8] = {2., 2., 2., 42., 42., 2., 2., 2.};
285 Float_t xpos5[9] = {2., 2., 2., 2.,32., 2., 2., 2., 2.};
286 Float_t ypos5 = -(20.+4.*(40.-2.*shift));
289 SetNsec(chamber-1,2);
290 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
292 seg51->SetShift(shift);
293 seg51->SetNPCBperSector(npcb5);
294 seg51->SetSlatXPositions(xpos5);
295 seg51->SetSlatYPosition(ypos5);
296 seg51->SetPadSize(10.,0.5);
297 seg51->SetDAnod(0.25);
298 seg51->SetPadDivision(nseg3);
299 SetSegmentationModel(chamber-1, 1, seg51);
301 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
303 seg52->SetShift(shift);
304 seg52->SetNPCBperSector(npcb5);
305 seg52->SetSlatXPositions(xpos5);
306 seg52->SetSlatYPosition(ypos5);
307 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
308 seg52->SetDAnod(0.25);
309 seg52->SetPadDivision(nseg3);
310 SetSegmentationModel(chamber-1, 2, seg52);
311 SetResponseModel(chamber-1, response0);
312 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
315 SetNsec(chamber-1,2);
316 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
318 seg61->SetShift(shift);
319 seg61->SetNPCBperSector(npcb5);
320 seg61->SetSlatXPositions(xpos5);
321 seg61->SetSlatYPosition(ypos5);
322 seg61->SetPadSize(10.,0.5);
323 seg61->SetDAnod(0.25);
324 seg61->SetPadDivision(nseg3);
325 SetSegmentationModel(chamber-1, 1, seg61);
327 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
329 seg62->SetShift(shift);
330 seg62->SetNPCBperSector(npcb5);
331 seg62->SetSlatXPositions(xpos5);
332 seg62->SetSlatYPosition(ypos5);
333 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
334 seg62->SetDAnod(0.25);
335 seg62->SetPadDivision(nseg3);
336 SetSegmentationModel(chamber-1, 2, seg62);
337 SetResponseModel(chamber-1, response0);
338 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
340 //--------------------------------------------------------
341 // Configuration for Chamber TC7/8 (Station 4) ----------
342 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
344 Int_t nseg4[4]={4, 4, 2, 1};
349 SetNsec(chamber-1,2);
351 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
352 Int_t npcb7[44] = {0,0,0,3,
363 Float_t xpos7[11] = {2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2.};
364 Float_t ypos7 = -(20.+5.*(40.-2.*shift));
366 seg71->SetNSlats(11);
367 seg71->SetShift(shift);
368 seg71->SetNPCBperSector(npcb7);
369 seg71->SetSlatXPositions(xpos7);
370 seg71->SetSlatYPosition(ypos7);
372 seg71->SetPadSize(10.,0.5);
373 seg71->SetDAnod(0.25);
374 seg71->SetPadDivision(nseg4);
375 SetSegmentationModel(chamber-1, 1, seg71);
377 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
379 SetSegmentationModel(chamber-1, 2, seg72);
380 seg72->SetNSlats(11);
381 seg72->SetShift(shift);
382 seg72->SetNPCBperSector(npcb7);
383 seg72->SetSlatXPositions(xpos7);
384 seg72->SetSlatYPosition(ypos7);
385 seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
386 seg72->SetDAnod(0.25);
387 seg72->SetPadDivision(nseg4);
389 SetResponseModel(chamber-1, response0);
390 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
394 SetNsec(chamber-1,2);
396 AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
398 seg81->SetNSlats(11);
399 seg81->SetShift(shift);
400 seg81->SetNPCBperSector(npcb7);
401 seg81->SetSlatXPositions(xpos7);
402 seg81->SetSlatYPosition(ypos7);
403 seg81->SetPadSize(10.,0.5);
404 seg81->SetDAnod(0.25);
405 seg81->SetPadDivision(nseg4);
406 SetSegmentationModel(chamber-1, 1, seg81);
408 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
410 SetSegmentationModel(chamber-1, 2, seg82);
411 seg82->SetNSlats(11);
412 seg82->SetShift(shift);
413 seg82->SetNPCBperSector(npcb7);
414 seg82->SetSlatXPositions(xpos7);
415 seg82->SetSlatYPosition(ypos7);
416 seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
417 seg82->SetDAnod(0.25);
418 seg82->SetPadDivision(nseg4);
420 SetResponseModel(chamber-1, response0);
421 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
424 //--------------------------------------------------------
425 // Configuration for Chamber TC9/10 (Station 5) ---------
426 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
430 SetNsec(chamber-1,2);
432 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
433 Int_t npcb9[52] = {0,0,0,3,
447 // Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 39.5 , 2., 2., 2., 2., 2., 2.};
448 Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2., 2.};
449 Float_t ypos9 = -(20.+6.*(40.-2.*shift));
451 seg91->SetNSlats(13);
452 seg91->SetShift(shift);
453 seg91->SetNPCBperSector(npcb9);
454 seg91->SetSlatXPositions(xpos9);
455 seg91->SetSlatYPosition(ypos9);
456 seg91->SetPadSize(10.,0.5);
457 seg91->SetDAnod(0.25);
458 seg91->SetPadDivision(nseg4);
459 SetSegmentationModel(chamber-1, 1, seg91);
461 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
463 SetSegmentationModel(chamber-1, 2, seg92);
464 seg92->SetNSlats(13);
465 seg92->SetShift(shift);
466 seg92->SetNPCBperSector(npcb9);
467 seg92->SetSlatXPositions(xpos9);
468 seg92->SetSlatYPosition(ypos9);
469 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
470 seg92->SetDAnod(0.25);
471 seg92->SetPadDivision(nseg4);
473 SetResponseModel(chamber-1, response0);
474 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
478 SetNsec(chamber-1,2);
480 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
482 seg101->SetNSlats(13);
483 seg101->SetShift(shift);
484 seg101->SetNPCBperSector(npcb9);
485 seg101->SetSlatXPositions(xpos9);
486 seg101->SetSlatYPosition(ypos9);
487 seg101->SetPadSize(10.,0.5);
488 seg101->SetDAnod(0.25);
489 seg101->SetPadDivision(nseg4);
490 SetSegmentationModel(chamber-1, 1, seg101);
492 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
494 SetSegmentationModel(chamber-1, 2, seg102);
495 seg102->SetNSlats(13);
496 seg102->SetShift(shift);
497 seg102->SetNPCBperSector(npcb9);
498 seg102->SetSlatXPositions(xpos9);
499 seg102->SetSlatYPosition(ypos9);
500 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
501 seg102->SetDAnod(0.25);
502 seg102->SetPadDivision(nseg4);
504 SetResponseModel(chamber-1, response0);
505 Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
507 //--------------------------------------------------------
508 // Configuration for Trigger Stations --------------------
509 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
511 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
513 // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
516 SetNsec(chamber-1,2);
517 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
518 SetSegmentationModel(chamber-1, 1, seg111);
519 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
520 SetSegmentationModel(chamber-1, 2, seg112);
522 SetResponseModel(chamber-1, responseTrigger0);
523 Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
527 SetNsec(chamber-1,2);
528 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
529 SetSegmentationModel(chamber-1, 1, seg121);
530 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
531 SetSegmentationModel(chamber-1, 2, seg122);
533 SetResponseModel(chamber-1, responseTrigger0);
534 Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
537 SetNsec(chamber-1,2);
538 AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
539 SetSegmentationModel(chamber-1, 1, seg131);
540 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
541 SetSegmentationModel(chamber-1, 2, seg132);
542 SetResponseModel(chamber-1, responseTrigger0);
543 Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
546 SetNsec(chamber-1,2);
547 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
548 SetSegmentationModel(chamber-1, 1, seg141);
549 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
550 SetSegmentationModel(chamber-1, 2, seg142);
552 SetResponseModel(chamber-1, responseTrigger0);
553 Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
556 void AliMUONv0::CreateGeometry()
558 // Creates coarse geometry for hit density simulations
559 Int_t *idtmed = fIdtmed->GetArray()-1099;
561 Float_t zpos, dAlu, tpar[3];
562 Int_t idAir=idtmed[1100];
563 Int_t idAlu=idtmed[1103];
565 AliMUONChamber *iChamber;
566 // Loop over all chambers (tracking and trigger)
567 for (Int_t ch = 0; ch < AliMUONConstants::NCh(); ch++) {
571 iChamber=(AliMUONChamber*) (*fChambers)[ch];
574 dAlu=iChamber->DAlu();
575 if (ch < AliMUONConstants::NTrackingCh()) {
577 sprintf(alu,"CA0%1d",ch);
578 sprintf(gas,"CG0%1d",ch);
581 sprintf(alu,"CA%2d",ch);
582 sprintf(gas,"CG%2d",ch);
585 tpar[0] = iChamber->RInner();
586 tpar[1] = iChamber->ROuter();
587 tpar[2] = (dAlu+0.2)/2.;
588 if (ch !=4 && ch !=5) {
589 gMC->Gsvolu(alu, "TUBE", idAlu, tpar, 3);
591 gMC->Gsvolu(gas, "TUBE", idAir, tpar, 3);
593 gMC->Gsvolu(alu, "TUBE", idAlu, tpar, 3);
595 gMC->Gsvolu(gas, "TUBE", idAir, tpar, 3);
597 gMC->Gspos(gas, 1, alu, 0., 0., 0., 0, "ONLY");
598 gMC->Gspos(alu, 1, "ALIC", 0., 0., zpos, 0, "ONLY");
602 //___________________________________________
603 void AliMUONv0::CreateMaterials()
605 // Creates materials for coarse geometry
606 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
607 AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
609 Float_t epsil = .001; // Tracking precision,
610 Float_t stemax = -1.; // Maximum displacement for multiple scat
611 Float_t tmaxfd = -20.; // Maximum angle due to field deflection
612 Float_t deemax = -.3; // Maximum fractional energy loss, DLS
614 Int_t isxfld = gAlice->Field()->Integ();
615 Float_t sxmgmx = gAlice->Field()->Max();
619 AliMedium(1, "AIR_CH_US ", 15, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
620 AliMedium(4, "ALU_CH_US ", 9, 0, isxfld, sxmgmx, tmaxfd, fMaxStepAlu,
621 fMaxDestepAlu, epsil, stmin);
625 void AliMUONv0::Init()
628 // Initialize Tracking Chambers
631 printf("\n\n\n Start Init for version 0 - CPC chamber type\n\n\n");
632 for (Int_t i=0; i<AliMUONConstants::NCh(); i++) {
633 // Initialise chamber
634 ((AliMUONChamber*) (*fChambers)[i])->Init();
635 // Set sensitive volume Id
636 if (i < AliMUONConstants::NTrackingCh()) {
638 sprintf(vName,"CG0%1d",i);
641 sprintf(vName,"CG%2d",i);
643 ((AliMUONChamber*) (*fChambers)[i])->SetGid(gMC->VolId(vName));
647 void AliMUONv0::StepManager()
650 // Step manager for hit density simulations
660 static Float_t hits[15];
662 TClonesArray &lhits = *fHits;
664 // Only gas gap inside chamber
665 // Tag chambers and record hits when track enters
667 id=gMC->CurrentVolID(copy);
669 for (Int_t i=1; i<=AliMUONConstants::NCh(); i++) {
670 if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){
675 if (idvol == -1) return;
677 // Get current particle id (ipart), track position (pos) and momentum (mom)
678 gMC->TrackPosition(pos);
679 gMC->TrackMomentum(mom);
681 ipart = gMC->TrackPid();
683 // record hits when track enters ...
684 if( !(gMC->TrackCharge()) ) return;
685 if( gMC->IsTrackEntering()) {
686 Double_t tc = mom[0]*mom[0]+mom[1]*mom[1];
687 Double_t rt = TMath::Sqrt(tc);
688 theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg;
689 phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg;
690 hits[0] = Float_t(ipart); // Geant3 particle type
691 hits[1] = pos[0]; // X-position for hit
692 hits[2] = pos[1]; // Y-position for hit
693 hits[3] = pos[2]; // Z-position for hit
694 hits[4] = theta; // theta angle of incidence
695 hits[5] = phi; // phi angle of incidence
696 hits[8] = -1; // first padhit
697 hits[9] = -1; // last pad hit
698 hits[10] = mom[3]; // hit Energy
699 hits[11] = mom[0]; // Px
700 hits[12] = mom[1]; // Py
701 hits[13] = mom[2]; // Pz
702 hits[14] = gMC->TrackTime(); // time of flight
704 AliMUONHit(fIshunt,gAlice->CurrentTrack(),vol,hits);