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 **************************************************************************/
17 Revision 1.16 2002/11/21 22:57:02 alibrary
18 Removing AliMC and AliMCProcess
20 Revision 1.15 2002/10/23 07:36:35 alibrary
21 Introducing Riostream.h
23 Revision 1.14 2001/05/21 17:44:04 hristov
24 Backslash to continue strings
26 Revision 1.13 2001/05/21 10:59:09 morsch
27 Printouts in debug mode only.
29 Revision 1.12 2001/05/21 09:39:28 morsch
30 Minor modifications on the geometry. (Tapan Nayak)
32 Revision 1.11 2001/05/14 14:01:04 morsch
33 AliPMDv0 coarse geometry and AliPMDv1 detailed simulation, completely revised versions by Tapan Nayak.
37 ///////////////////////////////////////////////////////////////////////////////
39 // Photon Multiplicity Detector Version 1 //
43 <img src="picts/AliPMDv0Class.gif">
47 ///////////////////////////////////////////////////////////////////////////////
54 #include "Riostream.h"
56 static Int_t kdet, ncell_sm, ncell_hole;
57 static Float_t zdist, zdist1;
58 static Float_t sm_length, sm_thick, cell_radius, cell_wall, cell_depth;
59 static Float_t boundary, th_base, th_air, th_pcb;
60 static Float_t th_lead, th_steel;
64 //_____________________________________________________________________________
68 // Default constructor
73 //_____________________________________________________________________________
74 AliPMDv0::AliPMDv0(const char *name, const char *title)
78 // Standard constructor
83 //_____________________________________________________________________________
84 void AliPMDv0::CreateGeometry()
87 // Create geometry for Photon Multiplicity Detector Version 3 :
92 <img src="picts/AliPMDv0.gif">
97 <img src="picts/AliPMDv0Tree.gif">
105 //_____________________________________________________________________________
106 void AliPMDv0::CreateSupermodule()
109 // Creates the geometry of the cells, places them in supermodule which
110 // is a rhombus object.
112 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
113 // *** HEXAGONAL CELLS WITH CELL RADIUS 0.25 cm (see "GetParameters")
114 // -- Author : S. Chattopadhyay, 02/04/1999.
116 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is placed inside another
117 // hexagonal cell made of Cu (ECCU) with larger radius, compared to ECAR. The difference
118 // in radius gives the dimension of half width of each cell wall.
119 // These cells are placed as 72 x 72 array in a
120 // rhombus shaped supermodule (EHC1). The rhombus shaped modules are designed
121 // to have closed packed structure.
123 // Each supermodule (ESMA, ESMB), made of G10 is filled with following components
124 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
125 // EHC1 --> Rhombus shaped parallelopiped containing the hexagonal cells
126 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
128 // ESMA, ESMB are placed in EMM1 along with EMPB (Pb converter)
129 // and EMFE (iron support)
132 // ESMB --> Normal supermodule, mirror image of ESMA
133 // EMPB --> Pb converter
134 // EMFE --> Fe backing
135 // ESMA --> Normal supermodule
137 // ESMX, ESMY are placed in EMM2 along with EMPB (Pb converter)
138 // and EMFE (iron support)
141 // ESMY --> Special supermodule, mirror image of ESMX,
142 // EMPB --> Pb converter
143 // EMFE --> Fe backing
144 // ESMX --> First of the two Special supermodules near the hole
147 // ESMQ --> Special supermodule, mirror image of ESMX,
148 // EMPB --> Pb converter
149 // EMFE --> Fe backing
150 // ESMP --> Second of the two Special supermodules near the hole
152 // EMM2 and EMM3 are used to create the hexagonal HOLE
158 // ---------------------------------------------------------------------------
160 // EHOL EMM1 EMM2 EMM3 EALM
162 // -------------------- -------------------- --------------------
163 // | | | | | | | | | | | |
164 // ESMB EMPB EMFE ESMA ESMY EMPB EMFE ESMX ESMQ EMPB EMFE ESMP
166 // ------------ ------------ -------------
168 // EAIR EHC1 EAIR EAIR EHC2 EAIR EAIR EHC3 EAIR
179 const Float_t root3_2 = TMath::Sqrt(3.) /2.;
180 Int_t *idtmed = fIdtmed->GetArray()-599;
182 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
183 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
185 zdist = TMath::Abs(zdist1);
188 //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu
189 // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension
190 //(1mm tolerance on both side and 5mm thick G10 wall)
193 // **** CELL SIZE 20 mm^2 EQUIVALENT
195 // Inner hexagon filled with gas (Ar+CO2)
197 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
199 hexd2[4]= - cell_depth/2.;
200 hexd2[7]= cell_depth/2.;
201 hexd2[6]= cell_radius - cell_wall;
202 hexd2[9]= cell_radius - cell_wall;
204 // Gas replaced by vacuum for v0(insensitive) version of PMD.
206 gMC->Gsvolu("ECAR", "PGON", idtmed[697], hexd2,10);
207 gMC->Gsatt("ECAR", "SEEN", 0);
209 // Outer hexagon made of Copper
211 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
212 //total wall thickness=0.2*2
214 hexd1[4]= - cell_depth/2.;
215 hexd1[7]= cell_depth/2.;
216 hexd1[6]= cell_radius;
217 hexd1[9]= cell_radius;
219 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
220 gMC->Gsatt("ECCU", "SEEN", 1);
222 // --- place inner hex inside outer hex
224 gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
226 // Rhombus shaped supermodules (defined by PARA)
228 // volume for SUPERMODULE
230 Float_t dpara_sm1[6] = {12.5,12.5,0.8,30.,0.,0.};
231 dpara_sm1[0]=(ncell_sm+0.25)*hexd1[6] ;
232 dpara_sm1[1] = dpara_sm1[0] *root3_2;
233 dpara_sm1[2] = sm_thick/2.;
236 gMC->Gsvolu("ESMA","PARA", idtmed[607], dpara_sm1, 6);
237 gMC->Gsatt("ESMA", "SEEN", 0);
239 gMC->Gsvolu("ESMB","PARA", idtmed[607], dpara_sm1, 6);
240 gMC->Gsatt("ESMB", "SEEN", 0);
242 // Air residing between the PCB and the base
244 Float_t dpara_air[6] = {12.5,12.5,8.,30.,0.,0.};
245 dpara_air[0]= dpara_sm1[0];
246 dpara_air[1]= dpara_sm1[1];
247 dpara_air[2]= th_air/2.;
249 gMC->Gsvolu("EAIR","PARA", idtmed[698], dpara_air, 6);
250 gMC->Gsatt("EAIR", "SEEN", 0);
252 // volume for honeycomb chamber EHC1
254 Float_t dpara1[6] = {12.5,12.5,0.4,30.,0.,0.};
255 dpara1[0] = dpara_sm1[0];
256 dpara1[1] = dpara_sm1[1];
257 dpara1[2] = cell_depth/2.;
259 gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6);
260 gMC->Gsatt("EHC1", "SEEN", 1);
264 // Place hexagonal cells ECCU cells inside EHC1 (72 X 72)
268 yb = -dpara1[1] + (1./root3_2)*hexd1[6];
271 for (j = 1; j <= ncell_sm; ++j) {
272 xb =-(dpara1[0] + dpara1[1]*0.577) + 2*hexd1[6]; //0.577=tan(30deg)
274 xb = xb+(xrow-1)*hexd1[6];
276 for (i = 1; i <= ncell_sm; ++i) {
277 number = i+(j-1)*ncell_sm;
278 gMC->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY");
282 yb += (hexd1[6]*TMath::Sqrt(3.));
286 // Place EHC1 and EAIR into ESMA and ESMB
288 Float_t z_air1,z_air2,z_gas;
290 //ESMA is normal supermodule with base at bottom, with EHC1
291 z_air1= -dpara_sm1[2] + th_base + dpara_air[2];
292 gMC->Gspos("EAIR", 1, "ESMA", 0., 0., z_air1, 0, "ONLY");
293 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2];
294 //Line below Commented for version 0 of PMD routine
295 // gMC->Gspos("EHC1", 1, "ESMA", 0., 0., z_gas, 0, "ONLY");
296 z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2];
297 gMC->Gspos("EAIR", 2, "ESMA", 0., 0., z_air2, 0, "ONLY");
299 // ESMB is mirror image of ESMA, with base at top, with EHC1
301 z_air1= -dpara_sm1[2] + th_pcb + dpara_air[2];
302 gMC->Gspos("EAIR", 3, "ESMB", 0., 0., z_air1, 0, "ONLY");
303 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2];
304 //Line below Commented for version 0 of PMD routine
305 // gMC->Gspos("EHC1", 2, "ESMB", 0., 0., z_gas, 0, "ONLY");
306 z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2];
307 gMC->Gspos("EAIR", 4, "ESMB", 0., 0., z_air2, 0, "ONLY");
310 // special supermodule EMM2(GEANT only) containing 6 unit modules
312 // volume for SUPERMODULE
314 Float_t dpara_sm2[6] = {12.5,12.5,0.8,30.,0.,0.};
315 dpara_sm2[0]=(ncell_sm+0.25)*hexd1[6] ;
316 dpara_sm2[1] = (ncell_sm - ncell_hole + 0.25) * root3_2 * hexd1[6];
317 dpara_sm2[2] = sm_thick/2.;
319 gMC->Gsvolu("ESMX","PARA", idtmed[607], dpara_sm2, 6);
320 gMC->Gsatt("ESMX", "SEEN", 0);
322 gMC->Gsvolu("ESMY","PARA", idtmed[607], dpara_sm2, 6);
323 gMC->Gsatt("ESMY", "SEEN", 0);
325 Float_t dpara2[6] = {12.5,12.5,0.4,30.,0.,0.};
326 dpara2[0] = dpara_sm2[0];
327 dpara2[1] = dpara_sm2[1];
328 dpara2[2] = cell_depth/2.;
330 gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6);
331 gMC->Gsatt("EHC2", "SEEN", 1);
334 // Air residing between the PCB and the base
336 Float_t dpara2_air[6] = {12.5,12.5,8.,30.,0.,0.};
337 dpara2_air[0]= dpara_sm2[0];
338 dpara2_air[1]= dpara_sm2[1];
339 dpara2_air[2]= th_air/2.;
341 gMC->Gsvolu("EAIX","PARA", idtmed[698], dpara2_air, 6);
342 gMC->Gsatt("EAIX", "SEEN", 0);
344 // Place hexagonal single cells ECCU inside EHC2
345 // skip cells which go into the hole in top left corner.
348 yb = -dpara2[1] + (1./root3_2)*hexd1[6];
350 for (j = 1; j <= (ncell_sm - ncell_hole); ++j) {
351 xb =-(dpara2[0] + dpara2[1]*0.577) + 2*hexd1[6];
353 xb = xb+(xrow-1)*hexd1[6];
355 for (i = 1; i <= ncell_sm; ++i) {
356 number = i+(j-1)*ncell_sm;
357 gMC->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY");
361 yb += (hexd1[6]*TMath::Sqrt(3.));
365 // ESMX is normal supermodule with base at bottom, with EHC2
367 z_air1= -dpara_sm2[2] + th_base + dpara2_air[2];
368 gMC->Gspos("EAIX", 1, "ESMX", 0., 0., z_air1, 0, "ONLY");
369 z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2];
370 //Line below Commented for version 0 of PMD routine
371 // gMC->Gspos("EHC2", 1, "ESMX", 0., 0., z_gas, 0, "ONLY");
372 z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2];
373 gMC->Gspos("EAIX", 2, "ESMX", 0., 0., z_air2, 0, "ONLY");
375 // ESMY is mirror image of ESMX with base at bottom, with EHC2
377 z_air1= -dpara_sm2[2] + th_pcb + dpara2_air[2];
378 gMC->Gspos("EAIX", 3, "ESMY", 0., 0., z_air1, 0, "ONLY");
379 z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2];
380 //Line below Commented for version 0 of PMD routine
381 // gMC->Gspos("EHC2", 2, "ESMY", 0., 0., z_gas, 0, "ONLY");
382 z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2];
383 gMC->Gspos("EAIX", 4, "ESMY", 0., 0., z_air2, 0, "ONLY");
388 // special supermodule EMM3 (GEANT only) containing 2 unit modules
390 // volume for SUPERMODULE
392 Float_t dpara_sm3[6] = {12.5,12.5,0.8,30.,0.,0.};
393 dpara_sm3[0]=(ncell_sm - ncell_hole +0.25)*hexd1[6] ;
394 dpara_sm3[1] = (ncell_hole + 0.25) * hexd1[6] * root3_2;
395 dpara_sm3[2] = sm_thick/2.;
397 gMC->Gsvolu("ESMP","PARA", idtmed[607], dpara_sm3, 6);
398 gMC->Gsatt("ESMP", "SEEN", 0);
400 gMC->Gsvolu("ESMQ","PARA", idtmed[607], dpara_sm3, 6);
401 gMC->Gsatt("ESMQ", "SEEN", 0);
403 Float_t dpara3[6] = {12.5,12.5,0.4,30.,0.,0.};
404 dpara3[0] = dpara_sm3[0];
405 dpara3[1] = dpara_sm3[1];
406 dpara3[2] = cell_depth/2.;
408 gMC->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6);
409 gMC->Gsatt("EHC3", "SEEN", 1);
412 // Air residing between the PCB and the base
414 Float_t dpara3_air[6] = {12.5,12.5,8.,30.,0.,0.};
415 dpara3_air[0]= dpara_sm3[0];
416 dpara3_air[1]= dpara_sm3[1];
417 dpara3_air[2]= th_air/2.;
419 gMC->Gsvolu("EAIP","PARA", idtmed[698], dpara3_air, 6);
420 gMC->Gsatt("EAIP", "SEEN", 0);
423 // Place hexagonal single cells ECCU inside EHC3
424 // skip cells which go into the hole in top left corner.
427 yb = -dpara3[1] + (1./root3_2)*hexd1[6];
429 for (j = 1; j <= ncell_hole; ++j) {
430 xb =-(dpara3[0] + dpara3[1]*0.577) + 2*hexd1[6];
432 xb = xb+(xrow-1)*hexd1[6];
434 for (i = 1; i <= (ncell_sm - ncell_hole); ++i) {
435 number = i+(j-1)*(ncell_sm - ncell_hole);
436 gMC->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY");
440 yb += (hexd1[6]*TMath::Sqrt(3.));
443 // ESMP is normal supermodule with base at bottom, with EHC3
445 z_air1= -dpara_sm3[2] + th_base + dpara3_air[2];
446 gMC->Gspos("EAIP", 1, "ESMP", 0., 0., z_air1, 0, "ONLY");
447 z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2];
448 //Line below Commented for version 0 of PMD routine
449 // gMC->Gspos("EHC3", 1, "ESMP", 0., 0., z_gas, 0, "ONLY");
450 z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2];
451 gMC->Gspos("EAIP", 2, "ESMP", 0., 0., z_air2, 0, "ONLY");
453 // ESMQ is mirror image of ESMP with base at bottom, with EHC3
455 z_air1= -dpara_sm3[2] + th_pcb + dpara3_air[2];
456 gMC->Gspos("EAIP", 3, "ESMQ", 0., 0., z_air1, 0, "ONLY");
457 z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2];
458 //Line below Commented for version 0 of PMD routine
459 // gMC->Gspos("EHC3", 2, "ESMQ", 0., 0., z_gas, 0, "ONLY");
460 z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2];
461 gMC->Gspos("EAIP", 4, "ESMQ", 0., 0., z_air2, 0, "ONLY");
465 //_____________________________________________________________________________
467 void AliPMDv0::CreatePMD()
470 // Create final detector from supermodules
472 // -- Author : Y.P. VIYOGI, 07/05/1996.
473 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
474 // -- Modified: For New Geometry YPV, March 2001.
477 const Float_t root3_2 = TMath::Sqrt(3.)/2.;
478 const Float_t pi = 3.14159;
484 Int_t jhrot12,jhrot13, irotdm;
486 Int_t *idtmed = fIdtmed->GetArray()-599;
488 // VOLUMES Names : begining with "E" for all PMD volumes,
489 // The names of SIZE variables begin with S and have more meaningful
490 // characters as shown below.
492 // VOLUME SIZE MEDIUM : REMARKS
493 // ------ ----- ------ : ---------------------------
495 // EPMD GASPMD AIR : INSIDE PMD and its SIZE
497 // *** Define the EPMD Volume and fill with air ***
500 // Gaspmd, the dimension of HEXAGONAL mother volume of PMD,
503 Float_t gaspmd[10] = {0.,360.,6,2,-4.,12.,150.,4.,12.,150.};
505 gaspmd[5] = ncell_hole * cell_radius * 2. * root3_2;
506 gaspmd[8] = gaspmd[5];
508 gMC->Gsvolu("EPMD", "PGON", idtmed[698], gaspmd, 10);
509 gMC->Gsatt("EPMD", "SEEN", 0);
511 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
513 AliMatrix(jhrot12, 90., 120., 90., 210., 0., 0.);
514 AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
517 Float_t dm_thick = 2. * sm_thick + th_lead + th_steel;
519 // dpara_emm1 array contains parameters of the imaginary volume EMM1,
520 // EMM1 is a master module of type 1, which has 24 copies in the PMD.
521 // EMM1 : normal volume as in old cases
524 Float_t dpara_emm1[6] = {12.5,12.5,0.8,30.,0.,0.};
525 dpara_emm1[0] = sm_length/2.;
526 dpara_emm1[1] = dpara_emm1[0] *root3_2;
527 dpara_emm1[2] = dm_thick/2.;
529 gMC->Gsvolu("EMM1","PARA", idtmed[698], dpara_emm1, 6);
530 gMC->Gsatt("EMM1", "SEEN", 1);
533 // --- DEFINE Modules, iron, and lead volumes
535 // Pb Convertor for EMM1
536 Float_t dpara_pb1[6] = {12.5,12.5,8.,30.,0.,0.};
537 dpara_pb1[0] = sm_length/2.;
538 dpara_pb1[1] = dpara_pb1[0] * root3_2;
539 dpara_pb1[2] = th_lead/2.;
541 gMC->Gsvolu("EPB1","PARA", idtmed[600], dpara_pb1, 6);
542 gMC->Gsatt ("EPB1", "SEEN", 0);
544 // Fe Support for EMM1
545 Float_t dpara_fe1[6] = {12.5,12.5,8.,30.,0.,0.};
546 dpara_fe1[0] = dpara_pb1[0];
547 dpara_fe1[1] = dpara_pb1[1];
548 dpara_fe1[2] = th_steel/2.;
550 gMC->Gsvolu("EFE1","PARA", idtmed[618], dpara_fe1, 6);
551 gMC->Gsatt ("EFE1", "SEEN", 0);
556 // position supermodule ESMA, ESMB, EPB1, EFE1 inside EMM1
558 Float_t z_ps,z_pb,z_fe,z_cv;
560 z_ps = - dpara_emm1[2] + sm_thick/2.;
561 gMC->Gspos("ESMB", 1, "EMM1", 0., 0., z_ps, 0, "ONLY");
562 z_pb=z_ps+sm_thick/2.+dpara_pb1[2];
563 gMC->Gspos("EPB1", 1, "EMM1", 0., 0., z_pb, 0, "ONLY");
564 z_fe=z_pb+dpara_pb1[2]+dpara_fe1[2];
565 gMC->Gspos("EFE1", 1, "EMM1", 0., 0., z_fe, 0, "ONLY");
566 z_cv=z_fe+dpara_fe1[2]+sm_thick/2.;
567 gMC->Gspos("ESMA", 1, "EMM1", 0., 0., z_cv, 0, "ONLY");
571 // EMM2 : special master module having full row of cells but the number
572 // of rows limited by hole.
574 Float_t dpara_emm2[6] = {12.5,12.5,0.8,30.,0.,0.};
575 dpara_emm2[0] = sm_length/2.;
576 dpara_emm2[1] = (ncell_sm - ncell_hole + 0.25) * cell_radius * root3_2;
577 dpara_emm2[2] = dm_thick/2.;
579 gMC->Gsvolu("EMM2","PARA", idtmed[698], dpara_emm2, 6);
580 gMC->Gsatt("EMM2", "SEEN", 1);
583 // Pb Convertor for EMM2
584 Float_t dpara_pb2[6] = {12.5,12.5,8.,30.,0.,0.};
585 dpara_pb2[0] = dpara_emm2[0];
586 dpara_pb2[1] = dpara_emm2[1];
587 dpara_pb2[2] = th_lead/2.;
589 gMC->Gsvolu("EPB2","PARA", idtmed[600], dpara_pb2, 6);
590 gMC->Gsatt ("EPB2", "SEEN", 0);
592 // Fe Support for EMM2
593 Float_t dpara_fe2[6] = {12.5,12.5,8.,30.,0.,0.};
594 dpara_fe2[0] = dpara_pb2[0];
595 dpara_fe2[1] = dpara_pb2[1];
596 dpara_fe2[2] = th_steel/2.;
598 gMC->Gsvolu("EFE2","PARA", idtmed[618], dpara_fe2, 6);
599 gMC->Gsatt ("EFE2", "SEEN", 0);
603 // position supermodule ESMX, ESMY inside EMM2
605 z_ps = - dpara_emm2[2] + sm_thick/2.;
606 gMC->Gspos("ESMY", 1, "EMM2", 0., 0., z_ps, 0, "ONLY");
607 z_pb = z_ps + sm_thick/2.+dpara_pb2[2];
608 gMC->Gspos("EPB2", 1, "EMM2", 0., 0., z_pb, 0, "ONLY");
609 z_fe = z_pb + dpara_pb2[2]+dpara_fe2[2];
610 gMC->Gspos("EFE2", 1, "EMM2", 0., 0., z_fe, 0, "ONLY");
611 z_cv = z_fe + dpara_fe2[2]+sm_thick/2.;
612 gMC->Gspos("ESMX", 1, "EMM2", 0., 0., z_cv, 0, "ONLY");
616 // EMM3 : special master module having truncated rows and columns of cells
619 Float_t dpara_emm3[6] = {12.5,12.5,0.8,30.,0.,0.};
620 dpara_emm3[0] = dpara_emm2[1]/root3_2;
621 dpara_emm3[1] = (ncell_hole + 0.25) * cell_radius *root3_2;
622 dpara_emm3[2] = dm_thick/2.;
624 gMC->Gsvolu("EMM3","PARA", idtmed[698], dpara_emm3, 6);
625 gMC->Gsatt("EMM3", "SEEN", 1);
628 // Pb Convertor for EMM3
629 Float_t dpara_pb3[6] = {12.5,12.5,8.,30.,0.,0.};
630 dpara_pb3[0] = dpara_emm3[0];
631 dpara_pb3[1] = dpara_emm3[1];
632 dpara_pb3[2] = th_lead/2.;
634 gMC->Gsvolu("EPB3","PARA", idtmed[600], dpara_pb3, 6);
635 gMC->Gsatt ("EPB3", "SEEN", 0);
637 // Fe Support for EMM3
638 Float_t dpara_fe3[6] = {12.5,12.5,8.,30.,0.,0.};
639 dpara_fe3[0] = dpara_pb3[0];
640 dpara_fe3[1] = dpara_pb3[1];
641 dpara_fe3[2] = th_steel/2.;
643 gMC->Gsvolu("EFE3","PARA", idtmed[618], dpara_fe3, 6);
644 gMC->Gsatt ("EFE3", "SEEN", 0);
648 // position supermodule ESMP, ESMQ inside EMM3
650 z_ps = - dpara_emm3[2] + sm_thick/2.;
651 gMC->Gspos("ESMQ", 1, "EMM3", 0., 0., z_ps, 0, "ONLY");
652 z_pb = z_ps + sm_thick/2.+dpara_pb3[2];
653 gMC->Gspos("EPB3", 1, "EMM3", 0., 0., z_pb, 0, "ONLY");
654 z_fe = z_pb + dpara_pb3[2]+dpara_fe3[2];
655 gMC->Gspos("EFE3", 1, "EMM3", 0., 0., z_fe, 0, "ONLY");
656 z_cv = z_fe + dpara_fe3[2] + sm_thick/2.;
657 gMC->Gspos("ESMP", 1, "EMM3", 0., 0., z_cv, 0, "ONLY");
660 // EHOL is a tube structure made of air
664 //d_hole[1] = ncell_hole * cell_radius *2. * root3_2 + boundary;
665 //d_hole[2] = dm_thick/2.;
667 //gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3);
668 //gMC->Gsatt("EHOL", "SEEN", 1);
670 //Al-rod as boundary of the supermodules
673 Al_rod[0] = sm_length * 3/2. - gaspmd[5]/2 - boundary ;
674 Al_rod[1] = boundary;
675 Al_rod[2] = dm_thick/2.;
677 gMC->Gsvolu("EALM","BOX ", idtmed[698], Al_rod, 3);
678 gMC->Gsatt ("EALM", "SEEN", 1);
680 xalm[0]=Al_rod[0] + gaspmd[5] + 3.0*boundary;
686 yalm[1]=xalm[0]*root3_2;
689 // delx = full side of the supermodule
690 Float_t delx=sm_length * 3.;
691 Float_t x1= delx*root3_2 /2.;
695 // placing master modules and Al-rod in PMD
697 Float_t dx = sm_length;
698 Float_t dy = dx * root3_2;
700 Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2.,
702 -3.*dx/2., -dx/2., dx/2.};
704 Float_t ysup[9] = {dy, dy, dy,
708 // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes
710 Float_t xoff = boundary * TMath::Tan(pi/6.);
711 Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-boundary/root3_2};
712 Float_t ymod[3] = {-x1 - boundary, x1 + boundary, 0.};
713 Float_t xpos[9], ypos[9], x2, y2, x3, y3;
715 Float_t xemm2 = sm_length/2. -
716 (ncell_sm + ncell_hole + 0.25) * cell_radius * 0.5
718 Float_t yemm2 = -(ncell_sm + ncell_hole + 0.25) * cell_radius * root3_2
721 Float_t xemm3 = (ncell_sm + 0.5 * ncell_hole + 0.25) * cell_radius + xoff;
722 Float_t yemm3 = - (ncell_hole - 0.25) * cell_radius * root3_2 - boundary;
724 Float_t theta[3] = {0., 2.*pi/3., 4.*pi/3.};
725 Int_t irotate[3] = {0, jhrot12, jhrot13};
728 for (j=0; j<3; ++j) {
729 gMC->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY");
730 x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
731 y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
733 gMC->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY");
735 x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
736 y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
738 gMC->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY");
740 for (i=1; i<9; ++i) {
741 xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - ysup[i]*TMath::Sin(theta[j]);
742 ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) + ysup[i]*TMath::Cos(theta[j]);
744 printf("%s: %f %f \n", ClassName(), xpos[i], ypos[i]);
749 printf("\n%s: Num_mod %d\n",ClassName(),num_mod);
751 gMC->Gspos("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY");
757 // place EHOL in the centre of EPMD
758 // gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY");
760 // --- Place the EPMD in ALICE
765 gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY");
770 //_____________________________________________________________________________
771 void AliPMDv0::DrawModule()
774 // Draw a shaded view of the Photon Multiplicity Detector
777 gMC->Gsatt("*", "seen", -1);
778 gMC->Gsatt("alic", "seen", 0);
780 // Set the visibility of the components
782 gMC->Gsatt("ECAR","seen",0);
783 gMC->Gsatt("ECCU","seen",1);
784 gMC->Gsatt("EHC1","seen",1);
785 gMC->Gsatt("EHC1","seen",1);
786 gMC->Gsatt("EHC2","seen",1);
787 gMC->Gsatt("EMM1","seen",1);
788 gMC->Gsatt("EHOL","seen",1);
789 gMC->Gsatt("EPMD","seen",0);
791 gMC->Gdopt("hide", "on");
792 gMC->Gdopt("shad", "on");
793 gMC->Gsatt("*", "fill", 7);
794 gMC->SetClipBox(".");
795 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
797 gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02);
798 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
800 //gMC->Gdman(17, 5, "MAN");
801 gMC->Gdopt("hide", "off");
804 //_____________________________________________________________________________
805 void AliPMDv0::CreateMaterials()
808 // Create materials for the PMD
810 // ORIGIN : Y. P. VIYOGI
813 // --- The Argon- CO2 mixture ---
814 Float_t ag[2] = { 39.95 };
815 Float_t zg[2] = { 18. };
816 Float_t wg[2] = { .8,.2 };
817 Float_t dar = .001782; // --- Ar density in g/cm3 ---
819 Float_t ac[2] = { 12.,16. };
820 Float_t zc[2] = { 6.,8. };
821 Float_t wc[2] = { 1.,2. };
822 Float_t dc = .001977;
823 Float_t dco = .002; // --- CO2 density in g/cm3 ---
825 Float_t absl, radl, a, d, z;
829 //Float_t dxe=0.005858;
832 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
833 Float_t zsteel[4] = { 26.,24.,28.,14. };
834 Float_t wsteel[4] = { .715,.18,.1,.005 };
836 Int_t *idtmed = fIdtmed->GetArray()-599;
837 Int_t isxfld = gAlice->Field()->Integ();
838 Float_t sxmgmx = gAlice->Field()->Max();
840 // --- Define the various materials for GEANT ---
841 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
843 AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4);
844 AliMixture(3, "CO2 $", ac, zc, dc, -2, wc);
845 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
846 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
847 AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3);
848 AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.);
849 AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.);
850 AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7);
851 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
852 AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9);
853 AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.);
854 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
855 // AliMaterial(31, "Xenon$", 131.3, 54., dxe, x0xe, 6.5e4);
857 AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.);
858 AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.);
859 AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16);
860 AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.);
862 // define gas-mixtures
865 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
868 dg = (dar * 4 + dco) / 5;
869 AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg);
871 // Define tracking media
872 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
873 AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
874 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
875 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
876 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
877 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
878 AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
879 AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
880 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10);
881 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1);
882 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
883 AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
884 AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
885 AliMedium(19, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
886 // AliMedium(31, "Xenon $", 31, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
888 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
889 gMC->Gstpar(idtmed[600], "LOSS", 3.);
890 gMC->Gstpar(idtmed[600], "DRAY", 1.);
892 gMC->Gstpar(idtmed[603], "LOSS", 3.);
893 gMC->Gstpar(idtmed[603], "DRAY", 1.);
895 gMC->Gstpar(idtmed[604], "LOSS", 3.);
896 gMC->Gstpar(idtmed[604], "DRAY", 1.);
898 gMC->Gstpar(idtmed[605], "LOSS", 3.);
899 gMC->Gstpar(idtmed[605], "DRAY", 1.);
901 gMC->Gstpar(idtmed[606], "LOSS", 3.);
902 gMC->Gstpar(idtmed[606], "DRAY", 1.);
904 gMC->Gstpar(idtmed[607], "LOSS", 3.);
905 gMC->Gstpar(idtmed[607], "DRAY", 1.);
907 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
908 // --- without affecting the hit patterns ---
909 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
910 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
911 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
912 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
913 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
914 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
915 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
916 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
917 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
918 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
919 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
920 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
921 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
922 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
923 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
924 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
925 gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
926 gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
927 gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
928 gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
930 // --- Prevent particles stopping in the gas due to energy cut-off ---
931 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
932 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
933 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
934 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
935 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
938 //_____________________________________________________________________________
939 void AliPMDv0::Init()
942 // Initialises PMD detector after it has been built
948 printf("\n%s: ",ClassName());
949 for(i=0;i<35;i++) printf("*");
950 printf(" PMD_INIT ");
951 for(i=0;i<35;i++) printf("*");
952 printf("\n%s: ",ClassName());
953 printf(" PMD simulation package (v0) initialised\n");
954 printf("%s: parameters of pmd\n", ClassName());
955 printf("%s: %10.2f %10.2f %10.2f \
956 %10.2f\n",ClassName(),cell_radius,cell_wall,cell_depth,zdist1 );
957 printf("%s: ",ClassName());
958 for(i=0;i<80;i++) printf("*");
961 Int_t *idtmed = fIdtmed->GetArray()-599;
962 fMedSens=idtmed[605-1];
965 //_____________________________________________________________________________
966 void AliPMDv0::StepManager()
969 // Called at each step in the PMD
972 Float_t hits[4], destep;
973 Float_t center[3] = {0,0,0};
977 if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
979 gMC->CurrentVolID(copy);
981 //namep=gMC->CurrentVolName();
982 //printf("Current vol is %s \n",namep);
985 gMC->CurrentVolOffID(1,copy);
987 //namep=gMC->CurrentVolOffName(1);
988 //printf("Current vol 11 is %s \n",namep);
991 gMC->CurrentVolOffID(2,copy);
993 //namep=gMC->CurrentVolOffName(2);
994 //printf("Current vol 22 is %s \n",namep);
998 // if(strncmp(namep,"EHC1",4))vol[2]=1;
1000 gMC->CurrentVolOffID(3,copy);
1002 //namep=gMC->CurrentVolOffName(3);
1003 //printf("Current vol 33 is %s \n",namep);
1006 gMC->CurrentVolOffID(4,copy);
1008 //namep=gMC->CurrentVolOffName(4);
1009 //printf("Current vol 44 is %s \n",namep);
1012 //printf("volume number %d,%d,%d,%d,%d,%f \n",vol[0],vol[1],vol[2],vol[3],vol[4],destep*1000000);
1014 gMC->Gdtom(center,hits,1);
1015 hits[3] = destep*1e9; //Number in eV
1016 AddHit(gAlice->CurrentTrack(), vol, hits);
1021 //------------------------------------------------------------------------
1024 void AliPMDv0::GetParameters()
1026 Int_t ncell_um, num_um;
1032 cell_depth=0.25 * 2.;
1035 ncell_sm=ncell_um * num_um; //no. of cells in a row in one supermodule
1036 sm_length= ((ncell_sm + 0.25 ) * cell_radius) * 2.;
1042 sm_thick = th_base + th_air + th_pcb + cell_depth + th_pcb + th_air + th_pcb;