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 **************************************************************************/
20 ///////////////////////////////////////////////////////////////////////////////
22 // Photon Multiplicity Detector Version 1 //
26 <img src="picts/AliPMDv1Class.gif">
30 ///////////////////////////////////////////////////////////////////////////////
37 static Int_t maxbox, kdet;
38 static Float_t thmin,thmax,zdist,zdist1,thlow,thhigh;
42 //_____________________________________________________________________________
46 // Default constructor
51 //_____________________________________________________________________________
52 AliPMDv1::AliPMDv1(const char *name, const char *title)
56 // Standard constructor
60 //_____________________________________________________________________________
61 void AliPMDv1::CreateGeometry()
64 // Create geometry for Photon Multiplicity Detector Version 1
68 <img src="picts/AliPMDv1.gif">
73 <img src="picts/AliPMDv1Tree.gif">
80 //_____________________________________________________________________________
81 void AliPMDv1::CreateInside()
84 // Create inside of Pads
86 // -- Author : Y.P. VIYOGI, 07/05/1996.
87 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
88 // Sipmd, the dimension of TUBE mother volume of PMD, other dimensions
89 // like sip01.. are to place more tubes in the volume at different eta bins.
90 Float_t sipmd[3] = { 40.,270.,15.};
91 Float_t sip01[3] = { 10.,57.89,25.};
92 Float_t sip02[3] = { 10.,64.03,25.};
93 Float_t sip03[3] = { 10.,70.80,25.};
94 Float_t sip04[3] = { 10.,78.32,25.};
95 Float_t sip05[3] = { 10.,86.68,25.};
96 Float_t sip06[3] = { 10.,95.91,25.};
97 Float_t sip07[3] = { 10.,106.14,25.};
98 Float_t sip08[3] = { 10.,117.48,25.};
99 Float_t sip09[3] = { 10.,130.18,25.};
100 Float_t sip10[3] = { 10.,144.18,25.};
101 Float_t sip11[3] = { 10.,159.87,25.};
102 Float_t sip12[3] = { 10.,177.43,25.};
103 Float_t sip13[3] = { 10.,197.11,25.};
104 Float_t sip14[3] = { 10.,219.28,25.};
105 Float_t sipmdl[5] = { 10.,310.,25.,90.,270. };
106 Float_t sipmdr[5] = { 10.,310.,25.,270.,90. };
108 const Float_t root3_4 = sqrt(3)/4.;
109 const Float_t root3_2 = sqrt(3)/2.;
110 // Float_t xiqa[4], yiqa[4];
114 // Int_t idrotm[100];
116 Int_t jhrotc,jhrotac;
118 // const Float_t delx=78.8;
119 const Float_t delx=76.75;
120 // const Float_t dely=delx*root3_2;
121 // const Float_t delz=1.6/2.;
122 AliMatrix(jhrotc, 90., 30., 90., 120., 0., 0.);
123 AliMatrix(jhrotac, 90., 330., 90., 240., 0., 0.);
124 AliMatrix(jhrotd, 90., 90., 90., 180., 90., 0.);
125 Float_t x1= delx*root3_4;
126 Float_t x2= delx*root3_4 + delx*root3_2;
127 Float_t x3= delx*root3_4 + 2*delx*root3_2;
128 Float_t xpos[13]={-x1,-x1,-x1,-x1,-x2,-x2,-x2,-x2,-x2,-x3,-x3,-x3,-x3};
130 Float_t ypos[13]={(-70.-x4-delx),-(70.+x4),(70.+x4),(70.+x4+delx),-x4+2*delx,-x4+delx,-x4,-x4-delx,-x4-2*delx,-3*x4-delx,-x4-delx/2.,-3*x4+delx,-3*x4+2*delx};
131 // Float_t ypos[13]={(-70.-x4-delx),-(70.+x4),(70.+x4),(70.+x4+delx),(4*dely),(2*dely),0.,-(2*dely),-(4*dely),-3*x4-delx,-x4-delx/2.,-3*x4+delx,-3*x4+2*delx};
132 Int_t *idtmed = fIdtmed->GetArray()-599;
134 // VOLUMES Names : begining with D for all PMD volumes,
135 // The names of SIZE variables begin with S and have more meaningful
136 // characters as shown below.
138 // VOLUME SIZE MEDIUM : REMARKS
139 // ------ ----- ------ : ---------------------------
141 // DPMD SIPMD AIR : INSIDE PMD and its SIZE
145 // *** Define the DPMD Volume and fill with air ***
147 gMC->Gsvolu("DPMD", "TUBE", idtmed[698], sipmd, 3);
148 gMC->Gsvolu("PM01", "TUBE", idtmed[698], sip01, 3);
149 gMC->Gsvolu("PM02", "TUBE", idtmed[698], sip02, 3);
150 gMC->Gsvolu("PM03", "TUBE", idtmed[698], sip03, 3);
151 gMC->Gsvolu("PM04", "TUBE", idtmed[698], sip04, 3);
152 gMC->Gsvolu("PM05", "TUBE", idtmed[698], sip05, 3);
153 gMC->Gsvolu("PM06", "TUBE", idtmed[698], sip06, 3);
154 gMC->Gsvolu("PM07", "TUBE", idtmed[698], sip07, 3);
155 gMC->Gsvolu("PM08", "TUBE", idtmed[698], sip08, 3);
156 gMC->Gsvolu("PM09", "TUBE", idtmed[698], sip09, 3);
157 gMC->Gsvolu("PM10", "TUBE", idtmed[698], sip10, 3);
158 gMC->Gsvolu("PM11", "TUBE", idtmed[698], sip11, 3);
159 gMC->Gsvolu("PM12", "TUBE", idtmed[698], sip12, 3);
160 gMC->Gsvolu("PM13", "TUBE", idtmed[698], sip13, 3);
161 gMC->Gsvolu("PM14", "TUBE", idtmed[698], sip14, 3);
162 gMC->Gsvolu("PMDL", "TUBS", idtmed[698], sipmdl, 5);
163 gMC->Gsvolu("PMDR", "TUBS", idtmed[698], sipmdr, 5);
165 const Int_t npad2=72;
166 Float_t hexd1[10] = {0.,360.,6,2,-0.4,0.,0.53,0.4,0.,0.53};
167 Float_t dpara_sm[6] = {12.5,12.5,0.8,30.,0.,0.};
168 dpara_sm[0]=(npad2+0.25)*hexd1[6] + 1.2;
169 dpara_sm[1] = dpara_sm[0] *root3_2;
170 Float_t dpara_dm11[6] = {12.5,12.5,0.8,30.,0.,0.};
171 dpara_dm11[0]=dpara_sm[0]+.01;
172 dpara_dm11[1] = dpara_dm11[0] *root3_2;
173 dpara_dm11[2]= 6.2/2.;
175 for (i = 0; i < 2; ++i) {
177 gMC->Gsposp("DM11", num_mod, "DPMD", xpos[i],ypos[i],0., jhrotac, "ONLY", dpara_dm11, 6);
178 gMC->Gsposp("DM11", num_mod+13, "DPMD", TMath::Abs(xpos[i]),ypos[i],0., jhrotc, "ONLY", dpara_dm11, 6);
179 printf("Num_mod %d\n",num_mod);
182 for (i = 2; i < maxbox; ++i) {
184 gMC->Gsposp("DM11", num_mod, "DPMD", xpos[i],ypos[i],0., jhrotc, "ONLY", dpara_dm11, 6);
185 gMC->Gsposp("DM11", num_mod+13, "DPMD", TMath::Abs(xpos[i]),ypos[i],0., jhrotac, "ONLY", dpara_dm11, 6);
186 printf("Num_mod %d\n",num_mod);
188 // gMC->Gspos("PM01", 1, "DPMD", 0.,0.,0., 0, "ONLY");
189 // gMC->Gspos("PM02", 1, "DPMD", 0.,0.,0., 0, "ONLY");
190 // gMC->Gspos("PM03", 1, "DPMD", 0.,0.,0., 0, "ONLY");
191 // gMC->Gspos("PM04", 1, "DPMD", 0.,0.,0., 0, "ONLY");
192 // gMC->Gspos("PM05", 1, "DPMD", 0.,0.,0., 0, "ONLY");
193 // gMC->Gspos("PM06", 1, "DPMD", 0.,0.,0., 0, "ONLY");
194 // gMC->Gspos("PM07", 1, "DPMD", 0.,0.,0., 0, "ONLY");
195 // gMC->Gspos("PM08", 1, "DPMD", 0.,0.,0., 0, "ONLY");
196 // gMC->Gspos("PM09", 1, "DPMD", 0.,0.,0., 0, "ONLY");
197 // gMC->Gspos("PM10", 1, "DPMD", 0.,0.,0., 0, "ONLY");
198 // gMC->Gspos("PM11", 1, "DPMD", 0.,0.,0., 0, "ONLY");
199 // gMC->Gspos("PM12", 1, "DPMD", 0.,0.,0., 0, "ONLY");
200 // gMC->Gspos("PM13", 1, "DPMD", 0.,0.,0., 0, "ONLY");
201 // gMC->Gspos("PM14", 1, "DPMD", 0.,0.,0., 0, "ONLY");
202 // --- Place the DPMD in ALICE with front edge 5.8m from vertex ---
206 // gMC->Gspos("PMDL", 1, "DPMD", xp,yp,0., 0, "ONLY");
207 // gMC->Gspos("PMDR", 1, "DPMD", xp,yp,0., 0, "ONLY");
208 gMC->Gspos("DPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY");
212 //_____________________________________________________________________________
213 void AliPMDv1::CreatePads()
216 // Create the geometry of the pads
217 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
218 // *** HEXAGONAL PADS WITH 10 MM SQUARE EQUIVALENT
219 // -- Author : S. Chattopadhyay, 02/04/1999.
221 // Basic unit is DP11, a hexagonal cell, which is placed inside another
222 // hexagonal cell (DS11) of larger radius, compared to DP11. The difference in r// adius gives the dimension of half width of each cell wall.
223 // These cells are placed as 72 x 72 array in a
224 // rhombus shaped supermodule (DW11). The rhombus shaped modules are designed
225 // to have closed packed structure.
226 // Each supermodule (SUPR), made of G10 is filled with following components
227 // SMSS --> SS backing,
228 // SMAR --> Gap between gas hexagonal cells and G10 backing.
229 // DW11 --> Ar-Co2 filled gas hexagonal cells.
231 // These supermodules are placed inside the main module (DM11), with Fe and
232 // Pb converter positioned between CPV and PMD.
234 // SUPR (rotated to place steel on the other side), this works as preshower
235 // when PMD is placed in -ve z.
236 // SUPB --> Pb converter
237 // SUFE --> Fe backing
238 // SUPR --> supermodule without rotation (this acts as CPV).
241 const Int_t npad2 = 72;
242 Float_t hexd1[10] = {0.,360.,6,2,-0.4,0.,0.53,0.4,0.,0.53};
243 //total wall thickness=0.2*2
244 Float_t hexd2[10] = {0.,360.,6,2,-0.4,0.,0.51,0.4,0.,0.51};
246 Float_t xb, yb, zb;//, sw[3];
249 const Float_t root3_cons = sqrt(3) /2.;
250 Int_t *idtmed = fIdtmed->GetArray()-599;
252 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
253 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
255 zdist = TMath::Abs(zdist1);
258 Float_t dpara[6] = {12.5,12.5,0.4,30.,0.,0.};
259 dpara[0]=(npad2+0.25)*hexd1[6];
260 dpara[1] = dpara[0] *root3_cons;
262 //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu
263 // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension
264 //(1mm tolerance on both side and 5mm thick G10 wall)
267 // **** PAD SIZE 10 MM SQUARE EQUIVALENT
269 // Inner hex filled with gas
270 gMC->Gsvolu("DP11", "PGON", idtmed[604], hexd2,10);
271 gMC->Gsatt("DP11", "SEEN", 1);
273 // Outer hex filled with Plastic
274 //plastic gMC->Gsvolu("DS11", "PGON", idtmed[616], hexd1,10);
276 gMC->Gsvolu("DS11", "PGON", idtmed[601], hexd1,10);
277 gMC->Gsatt("DS11", "SEEN", 1);
278 // --- place inner hex inside outer hex
279 gMC->Gsposp("DP11", 1, "DS11", 0., 0., 0., 0, "ONLY", hexd2, 10);
280 // Rhombus shaped supermodules (defined by PARA)
281 // volume for SUPERMODULE
282 Float_t dpara_sm[6] = {12.5,12.5,0.8,30.,0.,0.};
283 dpara_sm[0]=(npad2+0.25)*hexd1[6] + 1.2;
284 dpara_sm[1] = dpara_sm[0] *root3_cons;
286 gMC->Gsvolu("SUPR","PARA", idtmed[607], dpara_sm, 6);
287 gMC->Gsatt("SUPR", "SEEN", 1);
289 Float_t dpara_ss[6] = {12.5,12.5,8.,30.,0.,0.};
290 dpara_ss[0]= dpara[0];
291 dpara_ss[1]= dpara[1];
294 gMC->Gsvolu("SMSS","PARA", idtmed[601], dpara_ss, 6);
295 gMC->Gsatt("SMSS", "SEEN", 1);
297 Float_t dpara_air[6] = {12.5,12.5,8.,30.,0.,0.};
298 dpara_air[0]= dpara[0] - 0.5;
299 dpara_air[1]= dpara_air[0] * root3_cons;
300 dpara_air[2]= 0.1/2.;
301 // gMC->Gsvolu("SMAR","PARA", idtmed[604], dpara_air, 6);
302 gMC->Gsvolu("SMAR","PARA", idtmed[698], dpara_air, 6);
303 gMC->Gsatt("SMAR", "SEEN", 1);
305 // volume for gas chamber (DW11)
307 // gMC->Gsvolu("DW11","PARA", idtmed[604], dpara, 6);
308 gMC->Gsvolu("DW11","PARA", idtmed[698], dpara, 6);
309 gMC->Gsatt("DW11", "SEEN", 1);
310 // Place outer hex inside DW11
311 yb = -dpara[1] + (1./root3_cons)*hexd1[6];
313 for (j = 1; j <= npad2; ++j) {
314 xb =-(dpara[0] + dpara[1]*0.577) + 2*hexd1[6];
316 xb = xb+(xrow-1)*hexd1[6];
318 for (i = 1; i <= npad2; ++i) {
319 number = i+(j-1)*npad2;
320 gMC->Gsposp("DS11", number, "DW11", xb, yb, zb, ihrotm, "ONLY", hexd1, 10);
324 yb += (hexd1[6]*sqrt(3.));
326 Float_t z_ss,z_air1,z_air2,z_gas;
327 // Place other components inside super module
328 z_ss=-dpara_sm[2]+dpara_ss[2];
329 gMC->Gspos("SMSS", 1, "SUPR", 0., 0., z_ss, 0, "ONLY");
330 z_air1=z_ss+dpara_ss[2] +dpara_air[2];
331 gMC->Gspos("SMAR", 1, "SUPR", 0., 0., z_air1, 0, "ONLY");
332 z_gas=z_air1+dpara_air[2]+dpara[2]+0.1;
333 gMC->Gspos("DW11", 1, "SUPR", 0., 0., z_gas, 0, "ONLY");
334 z_air2=z_gas+dpara[2]+0.1+dpara_air[2];
335 gMC->Gspos("SMAR", 2, "SUPR", 0., 0., z_air2, 0, "ONLY");
337 // --- DEFINE MODules, iron, and lead voLUMES
340 // volume for SUPERMODULE
342 Float_t dpara_pb[6] = {12.5,12.5,8.,30.,0.,0.};
343 dpara_pb[0]=dpara_sm[0];
344 dpara_pb[1]=dpara_sm[1];
345 // dpara_pb[2]=1.1/2.;
347 gMC->Gsvolu("SUPB","PARA", idtmed[600], dpara_pb, 6);
348 gMC->Gsatt("SUPB", "SEEN", 1);
350 Float_t dpara_fe[6] = {12.5,12.5,8.,30.,0.,0.};
351 dpara_fe[0]=dpara_sm[0];
352 dpara_fe[1]=dpara_sm[1];
354 gMC->Gsvolu("SUFE","PARA", idtmed[601], dpara_fe, 6);
355 gMC->Gsatt("SUFE", "SEEN", 1);
357 Float_t dpara_dm11[6] = {12.5,12.5,0.8,30.,0.,0.};
358 dpara_dm11[0]=dpara_sm[0]+.01;
359 dpara_dm11[1] = dpara_dm11[0] *root3_cons;
360 dpara_dm11[2]= 6.2/2.;
363 gMC->Gsvolu("DM11","PARA", idtmed[698], dpara_dm11, 6);
364 gMC->Gsatt("DM11", "SEEN", 1);
365 // position super module inside DM11
366 Float_t z_ps,z_pb,z_fe,z_cv;
367 z_ps=-dpara_dm11[2]+dpara_sm[2];
368 gMC->Gspos("SUPR", 1, "DM11", 0., 0., z_ps, irotdm, "ONLY");
369 z_pb=z_ps+dpara_sm[2]+dpara_pb[2];
370 gMC->Gspos("SUPB", 1, "DM11", 0., 0., z_pb, 0, "ONLY");
371 z_fe=z_pb+dpara_pb[2]+dpara_fe[2];
372 gMC->Gspos("SUFE", 1, "DM11", 0., 0., z_fe, 0, "ONLY");
373 z_cv=z_fe+dpara_fe[2]+dpara_sm[2];
374 gMC->Gspos("SUPR", 2, "DM11", 0., 0., z_cv, 0, "ONLY");
378 //_____________________________________________________________________________
379 void AliPMDv1::DrawModule()
382 // Draw a shaded view of the Photon Multiplicity Detector
385 gMC->Gsatt("*", "seen", -1);
386 gMC->Gsatt("alic", "seen", 0);
388 // Set the visibility of the components
390 gMC->Gsatt("DP11","seen",0);
391 gMC->Gsatt("DS11","seen",1);
392 gMC->Gsatt("DW11","seen",0);
393 gMC->Gsatt("DM11","seen",1);
394 gMC->Gsatt("DPMD","seen",0);
396 gMC->Gdopt("hide", "on");
397 gMC->Gdopt("shad", "on");
398 gMC->Gsatt("*", "fill", 7);
399 gMC->SetClipBox(".");
400 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
402 gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02);
403 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
404 //gMC->Gdman(17, 5, "MAN");
405 gMC->Gdopt("hide", "off");
408 //_____________________________________________________________________________
409 void AliPMDv1::CreateMaterials()
412 // Create materials for the PMD version 1
414 // ORIGIN : Y. P. VIYOGI
417 // --- The Argon- CO2 mixture ---
418 Float_t ag[2] = { 39.95 };
419 Float_t zg[2] = { 18. };
420 Float_t wg[2] = { .8,.2 };
421 Float_t dar = .001782; // --- Ar density in g/cm3 ---
423 Float_t ac[2] = { 12.,16. };
424 Float_t zc[2] = { 6.,8. };
425 Float_t wc[2] = { 1.,2. };
426 Float_t dc = .001977;
427 Float_t dco = .002; // --- CO2 density in g/cm3 ---
429 Float_t absl, radl, a, d, z;
434 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
435 Float_t zsteel[4] = { 26.,24.,28.,14. };
436 Float_t wsteel[4] = { .715,.18,.1,.005 };
438 Int_t *idtmed = fIdtmed->GetArray()-599;
439 Int_t isxfld = gAlice->Field()->Integ();
440 Float_t sxmgmx = gAlice->Field()->Max();
442 // --- Define the various materials for GEANT ---
443 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
445 AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4);
446 AliMixture(3, "CO2 $", ac, zc, dc, -2, wc);
447 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
448 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
449 AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3);
450 AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.);
451 AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.);
452 AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7);
453 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
454 AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9);
455 AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.);
457 AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.);
458 AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.);
459 AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16);
460 AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.);
461 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
462 // define gas-mixtures
465 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
468 dg = (dar * 4 + dco) / 5;
469 AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg);
471 // Define tracking media
472 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
473 AliMedium(2, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
474 AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
475 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
476 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
477 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
478 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
479 AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
480 AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
481 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10);
482 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1);
483 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
484 AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
485 AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
487 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
488 gMC->Gstpar(idtmed[600], "LOSS", 3.);
489 gMC->Gstpar(idtmed[600], "DRAY", 1.);
491 gMC->Gstpar(idtmed[603], "LOSS", 3.);
492 gMC->Gstpar(idtmed[603], "DRAY", 1.);
494 gMC->Gstpar(idtmed[604], "LOSS", 3.);
495 gMC->Gstpar(idtmed[604], "DRAY", 1.);
497 gMC->Gstpar(idtmed[605], "LOSS", 3.);
498 gMC->Gstpar(idtmed[605], "DRAY", 1.);
500 gMC->Gstpar(idtmed[606], "LOSS", 3.);
501 gMC->Gstpar(idtmed[606], "DRAY", 1.);
503 gMC->Gstpar(idtmed[607], "LOSS", 3.);
504 gMC->Gstpar(idtmed[607], "DRAY", 1.);
506 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
507 // --- without affecting the hit patterns ---
508 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
509 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
510 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
511 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
512 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
513 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
514 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
515 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
516 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
517 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
518 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
519 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
520 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
521 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
522 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
523 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
524 gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
525 gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
526 gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
527 gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
529 // --- Prevent particles stopping in the gas due to energy cut-off ---
530 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
531 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
532 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
533 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
534 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
537 //_____________________________________________________________________________
538 void AliPMDv1::Init()
541 // Initialises PMD detector after it has been built
547 for(i=0;i<35;i++) printf("*");
548 printf(" PMD_INIT ");
549 for(i=0;i<35;i++) printf("*");
551 printf(" PMD simulation package (v1) initialised\n");
552 printf(" parameters of pmd\n");
553 printf("%6d %10.2f %10.2f %10.2f %10.2f %10.2f\n",kdet,thmin,thmax,zdist,thlow,thhigh);
555 for(i=0;i<80;i++) printf("*");
558 Int_t *idtmed = fIdtmed->GetArray()-599;
559 fMedSens=idtmed[605-1];
562 //_____________________________________________________________________________
563 void AliPMDv1::StepManager()
566 // Called at each step in the PMD
569 Float_t hits[4], destep;
570 Float_t center[3] = {0,0,0};
574 if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
576 gMC->CurrentVolID(copy);
577 // namep=gMC->CurrentVolName();
578 // printf("Current vol is %s \n",namep);
580 gMC->CurrentVolOffID(1,copy);
581 // namep=gMC->CurrentVolOffName(1);
582 // printf("Current vol 11 is %s \n",namep);
584 gMC->CurrentVolOffID(2,copy);
585 // namep=gMC->CurrentVolOffName(2);
586 // printf("Current vol 22 is %s \n",namep);
588 // if(strncmp(namep,"DW11",4))vol[2]=1;
589 gMC->CurrentVolOffID(3,copy);
590 // namep=gMC->CurrentVolOffName(3);
591 // printf("Current vol 33 is %s \n",namep);
593 gMC->CurrentVolOffID(4,copy);
594 // namep=gMC->CurrentVolOffName(4);
595 // printf("Current vol 44 is %s \n",namep);
597 // printf("volume number %d,%d,%d,%d,%d \n",vol[0],vol[1],vol[2],vol[3],vol[4]);
598 gMC->Gdtom(center,hits,1);
599 hits[3] = destep*1e9; //Number in eV
600 AddHit(gAlice->CurrentTrack(), vol, hits);