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 ///////////////////////////////////////////////////////////////////////////////
20 // Photon Multiplicity Detector Version 1 //
24 <img src="picts/AliPMDv3Class.gif">
28 ///////////////////////////////////////////////////////////////////////////////
38 static Int_t kdet, ncell_sm, ncell_hole;
39 static Float_t zdist, zdist1;
40 static Float_t sm_length, sm_thick, cell_radius, cell_wall, cell_depth;
41 static Float_t boundary, th_base, th_air, th_pcb;
42 static Float_t th_lead, th_steel;
46 //_____________________________________________________________________________
50 // Default constructor
55 //_____________________________________________________________________________
56 AliPMDv3::AliPMDv3(const char *name, const char *title)
60 // Standard constructor
65 //_____________________________________________________________________________
66 void AliPMDv3::CreateGeometry()
69 // Create geometry for Photon Multiplicity Detector Version 3 :
74 <img src="picts/AliPMDv3.gif">
79 <img src="picts/AliPMDv3Tree.gif">
87 //_____________________________________________________________________________
88 void AliPMDv3::CreateSupermodule()
91 // Creates the geometry of the cells, places them in supermodule which
92 // is a rhombus object.
94 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
95 // *** HEXAGONAL CELLS WITH 10 MM SQUARE EQUIVALENT
96 // -- Author : S. Chattopadhyay, 02/04/1999.
98 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is placed inside another
99 // hexagonal cell made of Cu (ECCU) with larger radius, compared to ECAR. The difference
100 // in radius gives the dimension of half width of each cell wall.
101 // These cells are placed as 72 x 72 array in a
102 // rhombus shaped supermodule (EHC1). The rhombus shaped modules are designed
103 // to have closed packed structure.
105 // Each supermodule (ESM1 or ESM2), made of G10 is filled with following components
106 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
107 // EHC1 --> Rhombus shaped parallelopiped containing the hexagonal cells
108 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
110 // ESM1 is placed in EMM1 along with EMPB (Pb converter) and EMFE (iron support)
112 // ESM1 --> Normal supermodule
113 // EMPB --> Pb converter
114 // EMFE --> Fe backing
116 // ESM2 is placed in EMM2 along with EMPB (Pb converter) and EMFE (iron support)
118 // ESM2 --> Special supermodule containing the cut for the hole
119 // EMPB --> Pb converter
120 // EMFE --> Fe backing
126 // -------------------------------------------------------------------
128 // EHOL EMM1 EMM2 EALM
130 // ---------------------- ------------------------
132 // ESM1 EMPB EMFE ESM1 ESM2 EMPB EMFE ESM2
134 // ------------ -------------
136 // EAIR EHC1 EAIR EAIR EHC2 EAIR
147 const Float_t root3_2 = TMath::Sqrt(3.) /2.;
148 Int_t *idtmed = fIdtmed->GetArray()-599;
150 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
151 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
153 zdist = TMath::Abs(zdist1);
156 //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu
157 // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension
158 //(1mm tolerance on both side and 5mm thick G10 wall)
161 // **** CELL SIZE 20mm^2 EQUIVALENT
163 // Inner hexagon filled with gas (Ar+CO2)
165 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
167 hexd2[4]= - cell_depth/2.;
168 hexd2[7]= cell_depth/2.;
169 hexd2[6]= cell_radius - cell_wall;
170 hexd2[9]= cell_radius - cell_wall;
172 gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
173 gMC->Gsatt("ECAR", "SEEN", 0);
175 // Outer hexagon made of Copper
177 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
178 //total wall thickness=0.2*2
180 hexd1[4]= - cell_depth/2.;
181 hexd1[7]= cell_depth/2.;
182 hexd1[6]= cell_radius;
183 hexd1[9]= cell_radius;
185 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
186 gMC->Gsatt("ECCU", "SEEN", 1);
189 // Rhombus shaped supermodules (defined by PARA)
191 // volume for SUPERMODULE
193 Float_t dpara_sm[6] = {12.5,12.5,0.8,30.,0.,0.};
194 dpara_sm[0]=(ncell_sm+0.25)*hexd1[6] ;
195 dpara_sm[1] = dpara_sm[0] *root3_2;
196 dpara_sm[2] = sm_thick/2.;
198 // G10 inner part of supermodule, these will be 9 in all, one being special
200 Float_t dpara_g10[6] = {12.5,12.5,8.,30.,0.,0.};
201 dpara_g10[0]= dpara_sm[0];
202 dpara_g10[1]= dpara_sm[1];
203 dpara_g10[2]= dpara_sm[2];
206 gMC->Gsvolu("ESM1","PARA", idtmed[607], dpara_g10, 6);
207 gMC->Gsatt("ESM1", "SEEN", 0);
209 gMC->Gsvolu("ESM2","PARA", idtmed[607], dpara_g10, 6);
210 gMC->Gsatt("ESM2", "SEEN", 0);
212 // Air residing between the PCB and the base
214 Float_t dpara_air[6] = {12.5,12.5,8.,30.,0.,0.};
215 dpara_air[0]= dpara_sm[0];
216 dpara_air[1]= dpara_sm[1];
217 dpara_air[2]= th_air/2.;
219 gMC->Gsvolu("EAIR","PARA", idtmed[698], dpara_air, 6);
220 gMC->Gsatt("EAIR", "SEEN", 0);
222 // volume for honeycomb chamber (EHC1 and EHC2)
224 Float_t dpara[6] = {12.5,12.5,0.4,30.,0.,0.};
225 dpara[0] = dpara_sm[0];
226 dpara[1] = dpara_sm[1];
227 dpara[2] = cell_depth/2.;
229 gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara, 6);
230 gMC->Gsatt("EHC1", "SEEN", 1);
232 gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara, 6);
233 gMC->Gsatt("EHC2", "SEEN", 1);
235 // --- place inner hex inside outer hex
237 gMC->Gsposp("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY", hexd2, 10);
239 // Place outer hex ECCU cells inside EHC1 (72 X 72)
243 yb = -dpara[1] + (1./root3_2)*hexd1[6];
246 for (j = 1; j <= ncell_sm; ++j) {
247 xb =-(dpara[0] + dpara[1]*0.577) + 2*hexd1[6]; //0.577=tan(30deg)
249 xb = xb+(xrow-1)*hexd1[6];
251 for (i = 1; i <= ncell_sm; ++i) {
252 number = i+(j-1)*ncell_sm;
253 gMC->Gsposp("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
257 yb += (hexd1[6]*TMath::Sqrt(3.));
261 // Place outer hex ECCU inside EHC2
262 // skip cells which go into the hole in top left corner.
265 yb = -dpara[1] + (1./root3_2)*hexd1[6];
267 for (j = 1; j <= ncell_sm; ++j) {
268 xb =-(dpara[0] + dpara[1]*0.577) + 2*hexd1[6];
270 xb = xb+(xrow-1)*hexd1[6];
272 for (i = 1; i <= ncell_sm; ++i) {
273 number = i+(j-1)*ncell_sm;
274 if(i > ncell_hole || j <= (ncell_sm - ncell_hole))
276 gMC->Gsposp("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
281 yb += (hexd1[6]*TMath::Sqrt(3.));
284 // Place EHC1 and EAIR into ESM1; EHC2 and EAIR into ESM2
286 Float_t z_air1,z_air2,z_gas;
288 z_air1= -dpara_g10[2] + th_base + dpara_air[2];
289 gMC->Gspos("EAIR", 1, "ESM1", 0., 0., z_air1, 0, "ONLY");
290 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara[2];
291 gMC->Gspos("EHC1", 1, "ESM1", 0., 0., z_gas, 0, "ONLY");
292 z_air2=z_gas+dpara[2]+ th_pcb + dpara_air[2];
293 gMC->Gspos("EAIR", 2, "ESM1", 0., 0., z_air2, 0, "ONLY");
295 z_air1= -dpara_g10[2] + th_base + dpara_air[2];
296 gMC->Gspos("EAIR", 1, "ESM2", 0., 0., z_air1, 0, "ONLY");
297 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara[2];
298 gMC->Gspos("EHC2", 1, "ESM2", 0., 0., z_gas, 0, "ONLY");
299 z_air2=z_gas+dpara[2]+ th_pcb + dpara_air[2];
300 gMC->Gspos("EAIR", 2, "ESM2", 0., 0., z_air2, 0, "ONLY");
304 //_____________________________________________________________________________
306 void AliPMDv3::CreatePMD()
309 // Create final detector from supermodules
311 // -- Author : Y.P. VIYOGI, 07/05/1996.
312 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
313 // -- Modified: For New Geometry YPV, March 2001.
316 // Gaspmd, the dimension of TUBE mother volume of PMD,
318 Float_t gaspmd[3] = { 0.,150.,10.};
320 const Float_t root3_2 = TMath::Sqrt(3.)/2.;
321 const Float_t pi = 3.14159;
327 Int_t jhrot12,jhrot13, irotdm;
329 Int_t *idtmed = fIdtmed->GetArray()-599;
331 // VOLUMES Names : begining with D for all PMD volumes,
332 // The names of SIZE variables begin with S and have more meaningful
333 // characters as shown below.
335 // VOLUME SIZE MEDIUM : REMARKS
336 // ------ ----- ------ : ---------------------------
338 // EPMD GASPMD AIR : INSIDE PMD and its SIZE
340 // *** Define the EPMD Volume and fill with air ***
342 gMC->Gsvolu("EPMD", "TUBE", idtmed[698], gaspmd, 3);
343 gMC->Gsatt("EPMD", "SEEN", 0);
345 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
347 AliMatrix(jhrot12, 90., 120., 90., 210., 0., 0.);
348 AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
350 // dpara_emm1 array contains parameters of the imaginary volume EMM1,
351 // this is just a little more than the side of a supermodule.
353 Float_t dm_thick = 2. * sm_thick + th_lead + th_steel;
355 Float_t dpara_emm1[6] = {12.5,12.5,0.8,30.,0.,0.};
356 dpara_emm1[0] = sm_length/2.;
357 dpara_emm1[1] = dpara_emm1[0] *root3_2;
358 dpara_emm1[2] = dm_thick/2.;
360 // EMM1 : normal volume as in old cases
361 gMC->Gsvolu("EMM1","PARA", idtmed[698], dpara_emm1, 6);
362 gMC->Gsatt("EMM1", "SEEN", 1);
364 // EMM2 : special volume containing special supermodule
365 gMC->Gsvolu("EMM2","PARA", idtmed[698], dpara_emm1, 6);
366 gMC->Gsatt("EMM2", "SEEN", 1);
369 // --- DEFINE MODules, iron, and lead voLUMES
371 //place ESM1 into EMM1 and ESM2 into EMM2 along with EMPB and EMFE
373 Float_t dx = sm_length;
374 Float_t dy = dx * root3_2;
376 Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2.,
378 -3.*dx/2., -dx/2., dx/2.};
380 Float_t ysup[9] = {dy, dy, dy,
386 // volume for SUPERMODULE
389 Float_t dpara_pb[6] = {12.5,12.5,8.,30.,0.,0.};
390 dpara_pb[0] = sm_length/2.;
391 dpara_pb[1] = dpara_pb[0] * root3_2;
392 dpara_pb[2] = th_lead/2.;
394 gMC->Gsvolu("EMPB","PARA", idtmed[600], dpara_pb, 6);
395 gMC->Gsatt ("EMPB", "SEEN", 0);
398 Float_t dpara_fe[6] = {12.5,12.5,8.,30.,0.,0.};
399 dpara_fe[0] = dpara_pb[0];
400 dpara_fe[1] = dpara_pb[1];
401 dpara_fe[2] = th_steel/2.;
403 gMC->Gsvolu("EMFE","PARA", idtmed[618], dpara_fe, 6);
404 gMC->Gsatt ("EMFE", "SEEN", 0);
406 // position supermodule ESM1 inside EMM1
408 Float_t z_ps,z_pb,z_fe,z_cv;
410 z_ps = - dpara_emm1[2] + sm_thick/2.;
411 gMC->Gspos("ESM1", 2, "EMM1", 0., 0., z_ps, irotdm, "ONLY");
412 z_pb=z_ps+sm_thick/2.+dpara_pb[2];
413 gMC->Gspos("EMPB", 1, "EMM1", 0., 0., z_pb, 0, "ONLY");
414 z_fe=z_pb+dpara_pb[2]+dpara_fe[2];
415 gMC->Gspos("EMFE", 1, "EMM1", 0., 0., z_fe, 0, "ONLY");
416 z_cv=z_fe+dpara_fe[2]+sm_thick/2.;
417 gMC->Gspos("ESM1", 1, "EMM1", 0., 0., z_cv, 0, "ONLY");
419 // position supermodule ESM2 inside EMM2
421 z_ps = - dpara_emm1[2] + sm_thick/2.;
422 gMC->Gspos("ESM2", 2, "EMM2", 0., 0., z_ps, irotdm, "ONLY");
423 z_pb = z_ps + sm_thick/2.+dpara_pb[2];
424 gMC->Gspos("EMPB", 1, "EMM2", 0., 0., z_pb, 0, "ONLY");
425 z_fe = z_pb + dpara_pb[2]+dpara_fe[2];
426 gMC->Gspos("EMFE", 1, "EMM2", 0., 0., z_fe, 0, "ONLY");
427 z_cv = z_fe + dpara_fe[2]+sm_thick/2.;
428 gMC->Gspos("ESM2", 1, "EMM2", 0., 0., z_cv, 0, "ONLY");
431 // EHOL is a tube structure made of air
435 d_hole[1] = ncell_hole * cell_radius *2. * root3_2 + boundary;
436 d_hole[2] = dm_thick/2.;
438 gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3);
439 gMC->Gsatt("EHOL", "SEEN", 1);
441 //Al-rod as boundary of the supermodules
444 Al_rod[0] = sm_length * 3/2.;
445 Al_rod[1] = boundary;
446 Al_rod[2] = dm_thick/2.;
448 gMC->Gsvolu("EALM","BOX ", idtmed[698], Al_rod, 3);
449 gMC->Gsatt ("EALM", "SEEN", 1);
457 yalm[1]=xalm[0]*root3_2;
460 // delx = full side of the supermodule
461 Float_t delx=sm_length * 3.;
462 Float_t x1= delx*root3_2 /2.;
465 // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes
467 Float_t xoff = boundary * TMath::Tan(pi/6.);
468 Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-boundary/root3_2};
469 Float_t ymod[3] = {-x1 - boundary, x1 + boundary, 0.};
470 Float_t xpos[9], ypos[9];
471 Float_t theta[3] = {0., 2.*pi/3., 4.*pi/3.};
472 Int_t irotate[3] = {0, jhrot12, jhrot13};
476 gMC->Gsposp("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY", Al_rod, 3);
479 xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - ysup[i]*TMath::Sin(theta[j]);
480 ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) + ysup[i]*TMath::Cos(theta[j]);
482 if(fDebug) printf("%s: %f %f \n", ClassName(), xpos[i], ypos[i]);
484 num_mod = i + 1 + j*9;
486 printf("\n%s: Num_mod %d\n",ClassName(),num_mod);
489 gMC->Gsposp("EMM2", num_mod, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY", dpara_emm1, 6);
492 gMC->Gsposp("EMM1", num_mod, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY", dpara_emm1, 6);
498 // place EHOL in the centre of EPMD
499 gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY");
501 // --- Place the EPMD in ALICE
506 gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY");
511 //_____________________________________________________________________________
512 void AliPMDv3::DrawModule()
515 // Draw a shaded view of the Photon Multiplicity Detector
518 gMC->Gsatt("*", "seen", -1);
519 gMC->Gsatt("alic", "seen", 0);
521 // Set the visibility of the components
523 gMC->Gsatt("ECAR","seen",0);
524 gMC->Gsatt("ECCU","seen",1);
525 gMC->Gsatt("EHC1","seen",1);
526 gMC->Gsatt("EHC1","seen",1);
527 gMC->Gsatt("EHC2","seen",1);
528 gMC->Gsatt("EMM1","seen",1);
529 gMC->Gsatt("EHOL","seen",1);
530 gMC->Gsatt("EPMD","seen",0);
532 gMC->Gdopt("hide", "on");
533 gMC->Gdopt("shad", "on");
534 gMC->Gsatt("*", "fill", 7);
535 gMC->SetClipBox(".");
536 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
538 gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02);
539 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
541 //gMC->Gdman(17, 5, "MAN");
542 gMC->Gdopt("hide", "off");
545 //_____________________________________________________________________________
546 void AliPMDv3::CreateMaterials()
549 // Create materials for the PMD
551 // ORIGIN : Y. P. VIYOGI
554 // --- The Argon- CO2 mixture ---
555 Float_t ag[2] = { 39.95 };
556 Float_t zg[2] = { 18. };
557 Float_t wg[2] = { .8,.2 };
558 Float_t dar = .001782; // --- Ar density in g/cm3 ---
560 Float_t ac[2] = { 12.,16. };
561 Float_t zc[2] = { 6.,8. };
562 Float_t wc[2] = { 1.,2. };
563 Float_t dc = .001977;
564 Float_t dco = .002; // --- CO2 density in g/cm3 ---
566 Float_t absl, radl, a, d, z;
570 //Float_t dxe=0.005858;
573 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
574 Float_t zsteel[4] = { 26.,24.,28.,14. };
575 Float_t wsteel[4] = { .715,.18,.1,.005 };
577 Int_t *idtmed = fIdtmed->GetArray()-599;
578 Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
579 Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
581 // --- Define the various materials for GEANT ---
582 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
584 AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4);
585 AliMixture(3, "CO2 $", ac, zc, dc, -2, wc);
586 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
587 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
588 AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3);
589 AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.);
590 AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.);
591 AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7);
592 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
593 AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9);
594 AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.);
595 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
596 // AliMaterial(31, "Xenon$", 131.3, 54., dxe, x0xe, 6.5e4);
598 AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.);
599 AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.);
600 AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16);
601 AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.);
603 // define gas-mixtures
606 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
609 dg = (dar * 4 + dco) / 5;
610 AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg);
612 // Define tracking media
613 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
614 AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
615 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
616 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
617 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
618 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
619 AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
620 AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
621 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10);
622 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1);
623 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
624 AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
625 AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
626 AliMedium(19, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
627 // AliMedium(31, "Xenon $", 31, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
629 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
630 gMC->Gstpar(idtmed[600], "LOSS", 3.);
631 gMC->Gstpar(idtmed[600], "DRAY", 1.);
633 gMC->Gstpar(idtmed[603], "LOSS", 3.);
634 gMC->Gstpar(idtmed[603], "DRAY", 1.);
636 gMC->Gstpar(idtmed[604], "LOSS", 3.);
637 gMC->Gstpar(idtmed[604], "DRAY", 1.);
639 gMC->Gstpar(idtmed[605], "LOSS", 3.);
640 gMC->Gstpar(idtmed[605], "DRAY", 1.);
642 gMC->Gstpar(idtmed[606], "LOSS", 3.);
643 gMC->Gstpar(idtmed[606], "DRAY", 1.);
645 gMC->Gstpar(idtmed[607], "LOSS", 3.);
646 gMC->Gstpar(idtmed[607], "DRAY", 1.);
648 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
649 // --- without affecting the hit patterns ---
650 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
651 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
652 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
653 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
654 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
655 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
656 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
657 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
658 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
659 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
660 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
661 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
662 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
663 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
664 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
665 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
666 gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
667 gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
668 gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
669 gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
671 // --- Prevent particles stopping in the gas due to energy cut-off ---
672 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
673 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
674 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
675 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
676 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
679 //_____________________________________________________________________________
680 void AliPMDv3::Init()
683 // Initialises PMD detector after it has been built
689 printf("\n%s: ",ClassName());
690 for(i=0;i<35;i++) printf("*");
691 printf(" PMD_INIT ");
692 for(i=0;i<35;i++) printf("*");
694 printf("%s: PMD simulation package (v3) initialised\n",
696 printf("%s: parameters of pmd\n",ClassName());
697 printf("%s: %10.2f %10.2f %10.2f %10.2f\n",ClassName(),
698 cell_radius,cell_wall,cell_depth,zdist1 );
699 printf("%s: ",ClassName());
700 for(i=0;i<80;i++) printf("*");
704 Int_t *idtmed = fIdtmed->GetArray()-599;
705 fMedSens=idtmed[605-1];
708 //_____________________________________________________________________________
709 void AliPMDv3::StepManager()
712 // Called at each step in the PMD
715 Float_t hits[4], destep;
716 Float_t center[3] = {0,0,0};
720 if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
722 gMC->CurrentVolID(copy);
724 //namep=gMC->CurrentVolName();
725 //printf("Current vol is %s \n",namep);
728 gMC->CurrentVolOffID(1,copy);
730 //namep=gMC->CurrentVolOffName(1);
731 //printf("Current vol 11 is %s \n",namep);
734 gMC->CurrentVolOffID(2,copy);
736 //namep=gMC->CurrentVolOffName(2);
737 //printf("Current vol 22 is %s \n",namep);
741 // if(strncmp(namep,"EHC1",4))vol[2]=1;
743 gMC->CurrentVolOffID(3,copy);
745 //namep=gMC->CurrentVolOffName(3);
746 //printf("Current vol 33 is %s \n",namep);
749 gMC->CurrentVolOffID(4,copy);
751 //namep=gMC->CurrentVolOffName(4);
752 //printf("Current vol 44 is %s \n",namep);
755 //printf("volume number %d,%d,%d,%d,%d,%f \n",vol[0],vol[1],vol[2],vol[3],vol[4],destep*1000000);
757 gMC->Gdtom(center,hits,1);
758 hits[3] = destep*1e9; //Number in eV
759 AddHit(gAlice->CurrentTrack(), vol, hits);
764 //------------------------------------------------------------------------
767 void AliPMDv3::GetParameters()
769 Int_t ncell_um, num_um;
775 cell_depth=0.25 * 2.;
778 ncell_sm=ncell_um * num_um; //no. of cells in a row in one supermodule
779 sm_length= ((ncell_sm + 0.25 ) * cell_radius) * 2.;
785 sm_thick = th_base + th_air + th_pcb + cell_depth + th_pcb + th_air + th_pcb;