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.15 2002/10/23 07:36:35 alibrary
18 Introducing Riostream.h
20 Revision 1.14 2001/05/21 17:44:04 hristov
21 Backslash to continue strings
23 Revision 1.13 2001/05/21 10:59:09 morsch
24 Printouts in debug mode only.
26 Revision 1.12 2001/05/21 09:39:28 morsch
27 Minor modifications on the geometry. (Tapan Nayak)
29 Revision 1.11 2001/05/14 14:01:04 morsch
30 AliPMDv0 coarse geometry and AliPMDv1 detailed simulation, completely revised versions by Tapan Nayak.
34 ///////////////////////////////////////////////////////////////////////////////
36 // Photon Multiplicity Detector Version 1 //
40 <img src="picts/AliPMDv0Class.gif">
44 ///////////////////////////////////////////////////////////////////////////////
51 #include "Riostream.h"
53 static Int_t kdet, ncell_sm, ncell_hole;
54 static Float_t zdist, zdist1;
55 static Float_t sm_length, sm_thick, cell_radius, cell_wall, cell_depth;
56 static Float_t boundary, th_base, th_air, th_pcb;
57 static Float_t th_lead, th_steel;
61 //_____________________________________________________________________________
65 // Default constructor
70 //_____________________________________________________________________________
71 AliPMDv0::AliPMDv0(const char *name, const char *title)
75 // Standard constructor
80 //_____________________________________________________________________________
81 void AliPMDv0::CreateGeometry()
84 // Create geometry for Photon Multiplicity Detector Version 3 :
89 <img src="picts/AliPMDv0.gif">
94 <img src="picts/AliPMDv0Tree.gif">
102 //_____________________________________________________________________________
103 void AliPMDv0::CreateSupermodule()
106 // Creates the geometry of the cells, places them in supermodule which
107 // is a rhombus object.
109 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
110 // *** HEXAGONAL CELLS WITH CELL RADIUS 0.25 cm (see "GetParameters")
111 // -- Author : S. Chattopadhyay, 02/04/1999.
113 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is placed inside another
114 // hexagonal cell made of Cu (ECCU) with larger radius, compared to ECAR. The difference
115 // in radius gives the dimension of half width of each cell wall.
116 // These cells are placed as 72 x 72 array in a
117 // rhombus shaped supermodule (EHC1). The rhombus shaped modules are designed
118 // to have closed packed structure.
120 // Each supermodule (ESMA, ESMB), made of G10 is filled with following components
121 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
122 // EHC1 --> Rhombus shaped parallelopiped containing the hexagonal cells
123 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
125 // ESMA, ESMB are placed in EMM1 along with EMPB (Pb converter)
126 // and EMFE (iron support)
129 // ESMB --> Normal supermodule, mirror image of ESMA
130 // EMPB --> Pb converter
131 // EMFE --> Fe backing
132 // ESMA --> Normal supermodule
134 // ESMX, ESMY are placed in EMM2 along with EMPB (Pb converter)
135 // and EMFE (iron support)
138 // ESMY --> Special supermodule, mirror image of ESMX,
139 // EMPB --> Pb converter
140 // EMFE --> Fe backing
141 // ESMX --> First of the two Special supermodules near the hole
144 // ESMQ --> Special supermodule, mirror image of ESMX,
145 // EMPB --> Pb converter
146 // EMFE --> Fe backing
147 // ESMP --> Second of the two Special supermodules near the hole
149 // EMM2 and EMM3 are used to create the hexagonal HOLE
155 // ---------------------------------------------------------------------------
157 // EHOL EMM1 EMM2 EMM3 EALM
159 // -------------------- -------------------- --------------------
160 // | | | | | | | | | | | |
161 // ESMB EMPB EMFE ESMA ESMY EMPB EMFE ESMX ESMQ EMPB EMFE ESMP
163 // ------------ ------------ -------------
165 // EAIR EHC1 EAIR EAIR EHC2 EAIR EAIR EHC3 EAIR
176 const Float_t root3_2 = TMath::Sqrt(3.) /2.;
177 Int_t *idtmed = fIdtmed->GetArray()-599;
179 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
180 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
182 zdist = TMath::Abs(zdist1);
185 //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu
186 // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension
187 //(1mm tolerance on both side and 5mm thick G10 wall)
190 // **** CELL SIZE 20 mm^2 EQUIVALENT
192 // Inner hexagon filled with gas (Ar+CO2)
194 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
196 hexd2[4]= - cell_depth/2.;
197 hexd2[7]= cell_depth/2.;
198 hexd2[6]= cell_radius - cell_wall;
199 hexd2[9]= cell_radius - cell_wall;
201 // Gas replaced by vacuum for v0(insensitive) version of PMD.
203 gMC->Gsvolu("ECAR", "PGON", idtmed[697], hexd2,10);
204 gMC->Gsatt("ECAR", "SEEN", 0);
206 // Outer hexagon made of Copper
208 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
209 //total wall thickness=0.2*2
211 hexd1[4]= - cell_depth/2.;
212 hexd1[7]= cell_depth/2.;
213 hexd1[6]= cell_radius;
214 hexd1[9]= cell_radius;
216 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
217 gMC->Gsatt("ECCU", "SEEN", 1);
219 // --- place inner hex inside outer hex
221 gMC->Gsposp("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY", hexd2, 10);
223 // Rhombus shaped supermodules (defined by PARA)
225 // volume for SUPERMODULE
227 Float_t dpara_sm1[6] = {12.5,12.5,0.8,30.,0.,0.};
228 dpara_sm1[0]=(ncell_sm+0.25)*hexd1[6] ;
229 dpara_sm1[1] = dpara_sm1[0] *root3_2;
230 dpara_sm1[2] = sm_thick/2.;
233 gMC->Gsvolu("ESMA","PARA", idtmed[607], dpara_sm1, 6);
234 gMC->Gsatt("ESMA", "SEEN", 0);
236 gMC->Gsvolu("ESMB","PARA", idtmed[607], dpara_sm1, 6);
237 gMC->Gsatt("ESMB", "SEEN", 0);
239 // Air residing between the PCB and the base
241 Float_t dpara_air[6] = {12.5,12.5,8.,30.,0.,0.};
242 dpara_air[0]= dpara_sm1[0];
243 dpara_air[1]= dpara_sm1[1];
244 dpara_air[2]= th_air/2.;
246 gMC->Gsvolu("EAIR","PARA", idtmed[698], dpara_air, 6);
247 gMC->Gsatt("EAIR", "SEEN", 0);
249 // volume for honeycomb chamber EHC1
251 Float_t dpara1[6] = {12.5,12.5,0.4,30.,0.,0.};
252 dpara1[0] = dpara_sm1[0];
253 dpara1[1] = dpara_sm1[1];
254 dpara1[2] = cell_depth/2.;
256 gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6);
257 gMC->Gsatt("EHC1", "SEEN", 1);
261 // Place hexagonal cells ECCU cells inside EHC1 (72 X 72)
265 yb = -dpara1[1] + (1./root3_2)*hexd1[6];
268 for (j = 1; j <= ncell_sm; ++j) {
269 xb =-(dpara1[0] + dpara1[1]*0.577) + 2*hexd1[6]; //0.577=tan(30deg)
271 xb = xb+(xrow-1)*hexd1[6];
273 for (i = 1; i <= ncell_sm; ++i) {
274 number = i+(j-1)*ncell_sm;
275 gMC->Gsposp("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
279 yb += (hexd1[6]*TMath::Sqrt(3.));
283 // Place EHC1 and EAIR into ESMA and ESMB
285 Float_t z_air1,z_air2,z_gas;
287 //ESMA is normal supermodule with base at bottom, with EHC1
288 z_air1= -dpara_sm1[2] + th_base + dpara_air[2];
289 gMC->Gspos("EAIR", 1, "ESMA", 0., 0., z_air1, 0, "ONLY");
290 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2];
291 //Line below Commented for version 0 of PMD routine
292 // gMC->Gspos("EHC1", 1, "ESMA", 0., 0., z_gas, 0, "ONLY");
293 z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2];
294 gMC->Gspos("EAIR", 2, "ESMA", 0., 0., z_air2, 0, "ONLY");
296 // ESMB is mirror image of ESMA, with base at top, with EHC1
298 z_air1= -dpara_sm1[2] + th_pcb + dpara_air[2];
299 gMC->Gspos("EAIR", 3, "ESMB", 0., 0., z_air1, 0, "ONLY");
300 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2];
301 //Line below Commented for version 0 of PMD routine
302 // gMC->Gspos("EHC1", 2, "ESMB", 0., 0., z_gas, 0, "ONLY");
303 z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2];
304 gMC->Gspos("EAIR", 4, "ESMB", 0., 0., z_air2, 0, "ONLY");
307 // special supermodule EMM2(GEANT only) containing 6 unit modules
309 // volume for SUPERMODULE
311 Float_t dpara_sm2[6] = {12.5,12.5,0.8,30.,0.,0.};
312 dpara_sm2[0]=(ncell_sm+0.25)*hexd1[6] ;
313 dpara_sm2[1] = (ncell_sm - ncell_hole + 0.25) * root3_2 * hexd1[6];
314 dpara_sm2[2] = sm_thick/2.;
316 gMC->Gsvolu("ESMX","PARA", idtmed[607], dpara_sm2, 6);
317 gMC->Gsatt("ESMX", "SEEN", 0);
319 gMC->Gsvolu("ESMY","PARA", idtmed[607], dpara_sm2, 6);
320 gMC->Gsatt("ESMY", "SEEN", 0);
322 Float_t dpara2[6] = {12.5,12.5,0.4,30.,0.,0.};
323 dpara2[0] = dpara_sm2[0];
324 dpara2[1] = dpara_sm2[1];
325 dpara2[2] = cell_depth/2.;
327 gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6);
328 gMC->Gsatt("EHC2", "SEEN", 1);
331 // Air residing between the PCB and the base
333 Float_t dpara2_air[6] = {12.5,12.5,8.,30.,0.,0.};
334 dpara2_air[0]= dpara_sm2[0];
335 dpara2_air[1]= dpara_sm2[1];
336 dpara2_air[2]= th_air/2.;
338 gMC->Gsvolu("EAIX","PARA", idtmed[698], dpara2_air, 6);
339 gMC->Gsatt("EAIX", "SEEN", 0);
341 // Place hexagonal single cells ECCU inside EHC2
342 // skip cells which go into the hole in top left corner.
345 yb = -dpara2[1] + (1./root3_2)*hexd1[6];
347 for (j = 1; j <= (ncell_sm - ncell_hole); ++j) {
348 xb =-(dpara2[0] + dpara2[1]*0.577) + 2*hexd1[6];
350 xb = xb+(xrow-1)*hexd1[6];
352 for (i = 1; i <= ncell_sm; ++i) {
353 number = i+(j-1)*ncell_sm;
354 gMC->Gsposp("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
358 yb += (hexd1[6]*TMath::Sqrt(3.));
362 // ESMX is normal supermodule with base at bottom, with EHC2
364 z_air1= -dpara_sm2[2] + th_base + dpara2_air[2];
365 gMC->Gspos("EAIX", 1, "ESMX", 0., 0., z_air1, 0, "ONLY");
366 z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2];
367 //Line below Commented for version 0 of PMD routine
368 // gMC->Gspos("EHC2", 1, "ESMX", 0., 0., z_gas, 0, "ONLY");
369 z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2];
370 gMC->Gspos("EAIX", 2, "ESMX", 0., 0., z_air2, 0, "ONLY");
372 // ESMY is mirror image of ESMX with base at bottom, with EHC2
374 z_air1= -dpara_sm2[2] + th_pcb + dpara2_air[2];
375 gMC->Gspos("EAIX", 3, "ESMY", 0., 0., z_air1, 0, "ONLY");
376 z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2];
377 //Line below Commented for version 0 of PMD routine
378 // gMC->Gspos("EHC2", 2, "ESMY", 0., 0., z_gas, 0, "ONLY");
379 z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2];
380 gMC->Gspos("EAIX", 4, "ESMY", 0., 0., z_air2, 0, "ONLY");
385 // special supermodule EMM3 (GEANT only) containing 2 unit modules
387 // volume for SUPERMODULE
389 Float_t dpara_sm3[6] = {12.5,12.5,0.8,30.,0.,0.};
390 dpara_sm3[0]=(ncell_sm - ncell_hole +0.25)*hexd1[6] ;
391 dpara_sm3[1] = (ncell_hole + 0.25) * hexd1[6] * root3_2;
392 dpara_sm3[2] = sm_thick/2.;
394 gMC->Gsvolu("ESMP","PARA", idtmed[607], dpara_sm3, 6);
395 gMC->Gsatt("ESMP", "SEEN", 0);
397 gMC->Gsvolu("ESMQ","PARA", idtmed[607], dpara_sm3, 6);
398 gMC->Gsatt("ESMQ", "SEEN", 0);
400 Float_t dpara3[6] = {12.5,12.5,0.4,30.,0.,0.};
401 dpara3[0] = dpara_sm3[0];
402 dpara3[1] = dpara_sm3[1];
403 dpara3[2] = cell_depth/2.;
405 gMC->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6);
406 gMC->Gsatt("EHC3", "SEEN", 1);
409 // Air residing between the PCB and the base
411 Float_t dpara3_air[6] = {12.5,12.5,8.,30.,0.,0.};
412 dpara3_air[0]= dpara_sm3[0];
413 dpara3_air[1]= dpara_sm3[1];
414 dpara3_air[2]= th_air/2.;
416 gMC->Gsvolu("EAIP","PARA", idtmed[698], dpara3_air, 6);
417 gMC->Gsatt("EAIP", "SEEN", 0);
420 // Place hexagonal single cells ECCU inside EHC3
421 // skip cells which go into the hole in top left corner.
424 yb = -dpara3[1] + (1./root3_2)*hexd1[6];
426 for (j = 1; j <= ncell_hole; ++j) {
427 xb =-(dpara3[0] + dpara3[1]*0.577) + 2*hexd1[6];
429 xb = xb+(xrow-1)*hexd1[6];
431 for (i = 1; i <= (ncell_sm - ncell_hole); ++i) {
432 number = i+(j-1)*(ncell_sm - ncell_hole);
433 gMC->Gsposp("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
437 yb += (hexd1[6]*TMath::Sqrt(3.));
440 // ESMP is normal supermodule with base at bottom, with EHC3
442 z_air1= -dpara_sm3[2] + th_base + dpara3_air[2];
443 gMC->Gspos("EAIP", 1, "ESMP", 0., 0., z_air1, 0, "ONLY");
444 z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2];
445 //Line below Commented for version 0 of PMD routine
446 // gMC->Gspos("EHC3", 1, "ESMP", 0., 0., z_gas, 0, "ONLY");
447 z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2];
448 gMC->Gspos("EAIP", 2, "ESMP", 0., 0., z_air2, 0, "ONLY");
450 // ESMQ is mirror image of ESMP with base at bottom, with EHC3
452 z_air1= -dpara_sm3[2] + th_pcb + dpara3_air[2];
453 gMC->Gspos("EAIP", 3, "ESMQ", 0., 0., z_air1, 0, "ONLY");
454 z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2];
455 //Line below Commented for version 0 of PMD routine
456 // gMC->Gspos("EHC3", 2, "ESMQ", 0., 0., z_gas, 0, "ONLY");
457 z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2];
458 gMC->Gspos("EAIP", 4, "ESMQ", 0., 0., z_air2, 0, "ONLY");
462 //_____________________________________________________________________________
464 void AliPMDv0::CreatePMD()
467 // Create final detector from supermodules
469 // -- Author : Y.P. VIYOGI, 07/05/1996.
470 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
471 // -- Modified: For New Geometry YPV, March 2001.
474 const Float_t root3_2 = TMath::Sqrt(3.)/2.;
475 const Float_t pi = 3.14159;
481 Int_t jhrot12,jhrot13, irotdm;
483 Int_t *idtmed = fIdtmed->GetArray()-599;
485 // VOLUMES Names : begining with "E" for all PMD volumes,
486 // The names of SIZE variables begin with S and have more meaningful
487 // characters as shown below.
489 // VOLUME SIZE MEDIUM : REMARKS
490 // ------ ----- ------ : ---------------------------
492 // EPMD GASPMD AIR : INSIDE PMD and its SIZE
494 // *** Define the EPMD Volume and fill with air ***
497 // Gaspmd, the dimension of HEXAGONAL mother volume of PMD,
500 Float_t gaspmd[10] = {0.,360.,6,2,-4.,12.,150.,4.,12.,150.};
502 gaspmd[5] = ncell_hole * cell_radius * 2. * root3_2;
503 gaspmd[8] = gaspmd[5];
505 gMC->Gsvolu("EPMD", "PGON", idtmed[698], gaspmd, 10);
506 gMC->Gsatt("EPMD", "SEEN", 0);
508 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
510 AliMatrix(jhrot12, 90., 120., 90., 210., 0., 0.);
511 AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
514 Float_t dm_thick = 2. * sm_thick + th_lead + th_steel;
516 // dpara_emm1 array contains parameters of the imaginary volume EMM1,
517 // EMM1 is a master module of type 1, which has 24 copies in the PMD.
518 // EMM1 : normal volume as in old cases
521 Float_t dpara_emm1[6] = {12.5,12.5,0.8,30.,0.,0.};
522 dpara_emm1[0] = sm_length/2.;
523 dpara_emm1[1] = dpara_emm1[0] *root3_2;
524 dpara_emm1[2] = dm_thick/2.;
526 gMC->Gsvolu("EMM1","PARA", idtmed[698], dpara_emm1, 6);
527 gMC->Gsatt("EMM1", "SEEN", 1);
530 // --- DEFINE Modules, iron, and lead volumes
532 // Pb Convertor for EMM1
533 Float_t dpara_pb1[6] = {12.5,12.5,8.,30.,0.,0.};
534 dpara_pb1[0] = sm_length/2.;
535 dpara_pb1[1] = dpara_pb1[0] * root3_2;
536 dpara_pb1[2] = th_lead/2.;
538 gMC->Gsvolu("EPB1","PARA", idtmed[600], dpara_pb1, 6);
539 gMC->Gsatt ("EPB1", "SEEN", 0);
541 // Fe Support for EMM1
542 Float_t dpara_fe1[6] = {12.5,12.5,8.,30.,0.,0.};
543 dpara_fe1[0] = dpara_pb1[0];
544 dpara_fe1[1] = dpara_pb1[1];
545 dpara_fe1[2] = th_steel/2.;
547 gMC->Gsvolu("EFE1","PARA", idtmed[618], dpara_fe1, 6);
548 gMC->Gsatt ("EFE1", "SEEN", 0);
553 // position supermodule ESMA, ESMB, EPB1, EFE1 inside EMM1
555 Float_t z_ps,z_pb,z_fe,z_cv;
557 z_ps = - dpara_emm1[2] + sm_thick/2.;
558 gMC->Gspos("ESMB", 1, "EMM1", 0., 0., z_ps, 0, "ONLY");
559 z_pb=z_ps+sm_thick/2.+dpara_pb1[2];
560 gMC->Gspos("EPB1", 1, "EMM1", 0., 0., z_pb, 0, "ONLY");
561 z_fe=z_pb+dpara_pb1[2]+dpara_fe1[2];
562 gMC->Gspos("EFE1", 1, "EMM1", 0., 0., z_fe, 0, "ONLY");
563 z_cv=z_fe+dpara_fe1[2]+sm_thick/2.;
564 gMC->Gspos("ESMA", 1, "EMM1", 0., 0., z_cv, 0, "ONLY");
568 // EMM2 : special master module having full row of cells but the number
569 // of rows limited by hole.
571 Float_t dpara_emm2[6] = {12.5,12.5,0.8,30.,0.,0.};
572 dpara_emm2[0] = sm_length/2.;
573 dpara_emm2[1] = (ncell_sm - ncell_hole + 0.25) * cell_radius * root3_2;
574 dpara_emm2[2] = dm_thick/2.;
576 gMC->Gsvolu("EMM2","PARA", idtmed[698], dpara_emm2, 6);
577 gMC->Gsatt("EMM2", "SEEN", 1);
580 // Pb Convertor for EMM2
581 Float_t dpara_pb2[6] = {12.5,12.5,8.,30.,0.,0.};
582 dpara_pb2[0] = dpara_emm2[0];
583 dpara_pb2[1] = dpara_emm2[1];
584 dpara_pb2[2] = th_lead/2.;
586 gMC->Gsvolu("EPB2","PARA", idtmed[600], dpara_pb2, 6);
587 gMC->Gsatt ("EPB2", "SEEN", 0);
589 // Fe Support for EMM2
590 Float_t dpara_fe2[6] = {12.5,12.5,8.,30.,0.,0.};
591 dpara_fe2[0] = dpara_pb2[0];
592 dpara_fe2[1] = dpara_pb2[1];
593 dpara_fe2[2] = th_steel/2.;
595 gMC->Gsvolu("EFE2","PARA", idtmed[618], dpara_fe2, 6);
596 gMC->Gsatt ("EFE2", "SEEN", 0);
600 // position supermodule ESMX, ESMY inside EMM2
602 z_ps = - dpara_emm2[2] + sm_thick/2.;
603 gMC->Gspos("ESMY", 1, "EMM2", 0., 0., z_ps, 0, "ONLY");
604 z_pb = z_ps + sm_thick/2.+dpara_pb2[2];
605 gMC->Gspos("EPB2", 1, "EMM2", 0., 0., z_pb, 0, "ONLY");
606 z_fe = z_pb + dpara_pb2[2]+dpara_fe2[2];
607 gMC->Gspos("EFE2", 1, "EMM2", 0., 0., z_fe, 0, "ONLY");
608 z_cv = z_fe + dpara_fe2[2]+sm_thick/2.;
609 gMC->Gspos("ESMX", 1, "EMM2", 0., 0., z_cv, 0, "ONLY");
613 // EMM3 : special master module having truncated rows and columns of cells
616 Float_t dpara_emm3[6] = {12.5,12.5,0.8,30.,0.,0.};
617 dpara_emm3[0] = dpara_emm2[1]/root3_2;
618 dpara_emm3[1] = (ncell_hole + 0.25) * cell_radius *root3_2;
619 dpara_emm3[2] = dm_thick/2.;
621 gMC->Gsvolu("EMM3","PARA", idtmed[698], dpara_emm3, 6);
622 gMC->Gsatt("EMM3", "SEEN", 1);
625 // Pb Convertor for EMM3
626 Float_t dpara_pb3[6] = {12.5,12.5,8.,30.,0.,0.};
627 dpara_pb3[0] = dpara_emm3[0];
628 dpara_pb3[1] = dpara_emm3[1];
629 dpara_pb3[2] = th_lead/2.;
631 gMC->Gsvolu("EPB3","PARA", idtmed[600], dpara_pb3, 6);
632 gMC->Gsatt ("EPB3", "SEEN", 0);
634 // Fe Support for EMM3
635 Float_t dpara_fe3[6] = {12.5,12.5,8.,30.,0.,0.};
636 dpara_fe3[0] = dpara_pb3[0];
637 dpara_fe3[1] = dpara_pb3[1];
638 dpara_fe3[2] = th_steel/2.;
640 gMC->Gsvolu("EFE3","PARA", idtmed[618], dpara_fe3, 6);
641 gMC->Gsatt ("EFE3", "SEEN", 0);
645 // position supermodule ESMP, ESMQ inside EMM3
647 z_ps = - dpara_emm3[2] + sm_thick/2.;
648 gMC->Gspos("ESMQ", 1, "EMM3", 0., 0., z_ps, 0, "ONLY");
649 z_pb = z_ps + sm_thick/2.+dpara_pb3[2];
650 gMC->Gspos("EPB3", 1, "EMM3", 0., 0., z_pb, 0, "ONLY");
651 z_fe = z_pb + dpara_pb3[2]+dpara_fe3[2];
652 gMC->Gspos("EFE3", 1, "EMM3", 0., 0., z_fe, 0, "ONLY");
653 z_cv = z_fe + dpara_fe3[2] + sm_thick/2.;
654 gMC->Gspos("ESMP", 1, "EMM3", 0., 0., z_cv, 0, "ONLY");
657 // EHOL is a tube structure made of air
661 //d_hole[1] = ncell_hole * cell_radius *2. * root3_2 + boundary;
662 //d_hole[2] = dm_thick/2.;
664 //gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3);
665 //gMC->Gsatt("EHOL", "SEEN", 1);
667 //Al-rod as boundary of the supermodules
670 Al_rod[0] = sm_length * 3/2. - gaspmd[5]/2 - boundary ;
671 Al_rod[1] = boundary;
672 Al_rod[2] = dm_thick/2.;
674 gMC->Gsvolu("EALM","BOX ", idtmed[698], Al_rod, 3);
675 gMC->Gsatt ("EALM", "SEEN", 1);
677 xalm[0]=Al_rod[0] + gaspmd[5] + 3.0*boundary;
683 yalm[1]=xalm[0]*root3_2;
686 // delx = full side of the supermodule
687 Float_t delx=sm_length * 3.;
688 Float_t x1= delx*root3_2 /2.;
692 // placing master modules and Al-rod in PMD
694 Float_t dx = sm_length;
695 Float_t dy = dx * root3_2;
697 Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2.,
699 -3.*dx/2., -dx/2., dx/2.};
701 Float_t ysup[9] = {dy, dy, dy,
705 // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes
707 Float_t xoff = boundary * TMath::Tan(pi/6.);
708 Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-boundary/root3_2};
709 Float_t ymod[3] = {-x1 - boundary, x1 + boundary, 0.};
710 Float_t xpos[9], ypos[9], x2, y2, x3, y3;
712 Float_t xemm2 = sm_length/2. -
713 (ncell_sm + ncell_hole + 0.25) * cell_radius * 0.5
715 Float_t yemm2 = -(ncell_sm + ncell_hole + 0.25) * cell_radius * root3_2
718 Float_t xemm3 = (ncell_sm + 0.5 * ncell_hole + 0.25) * cell_radius + xoff;
719 Float_t yemm3 = - (ncell_hole - 0.25) * cell_radius * root3_2 - boundary;
721 Float_t theta[3] = {0., 2.*pi/3., 4.*pi/3.};
722 Int_t irotate[3] = {0, jhrot12, jhrot13};
727 gMC->Gsposp("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY", Al_rod, 3);
728 x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
729 y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
731 gMC->Gsposp("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY", dpara_emm2, 6);
733 x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
734 y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
736 gMC->Gsposp("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY", dpara_emm3, 6);
740 xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - ysup[i]*TMath::Sin(theta[j]);
741 ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) + ysup[i]*TMath::Cos(theta[j]);
743 printf("%s: %f %f \n", ClassName(), xpos[i], ypos[i]);
748 printf("\n%s: Num_mod %d\n",ClassName(),num_mod);
750 gMC->Gsposp("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY", dpara_emm1, 6);
756 // place EHOL in the centre of EPMD
757 // gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY");
759 // --- Place the EPMD in ALICE
764 gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY");
769 //_____________________________________________________________________________
770 void AliPMDv0::DrawModule()
773 // Draw a shaded view of the Photon Multiplicity Detector
776 gMC->Gsatt("*", "seen", -1);
777 gMC->Gsatt("alic", "seen", 0);
779 // Set the visibility of the components
781 gMC->Gsatt("ECAR","seen",0);
782 gMC->Gsatt("ECCU","seen",1);
783 gMC->Gsatt("EHC1","seen",1);
784 gMC->Gsatt("EHC1","seen",1);
785 gMC->Gsatt("EHC2","seen",1);
786 gMC->Gsatt("EMM1","seen",1);
787 gMC->Gsatt("EHOL","seen",1);
788 gMC->Gsatt("EPMD","seen",0);
790 gMC->Gdopt("hide", "on");
791 gMC->Gdopt("shad", "on");
792 gMC->Gsatt("*", "fill", 7);
793 gMC->SetClipBox(".");
794 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
796 gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02);
797 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
799 //gMC->Gdman(17, 5, "MAN");
800 gMC->Gdopt("hide", "off");
803 //_____________________________________________________________________________
804 void AliPMDv0::CreateMaterials()
807 // Create materials for the PMD
809 // ORIGIN : Y. P. VIYOGI
812 // --- The Argon- CO2 mixture ---
813 Float_t ag[2] = { 39.95 };
814 Float_t zg[2] = { 18. };
815 Float_t wg[2] = { .8,.2 };
816 Float_t dar = .001782; // --- Ar density in g/cm3 ---
818 Float_t ac[2] = { 12.,16. };
819 Float_t zc[2] = { 6.,8. };
820 Float_t wc[2] = { 1.,2. };
821 Float_t dc = .001977;
822 Float_t dco = .002; // --- CO2 density in g/cm3 ---
824 Float_t absl, radl, a, d, z;
828 //Float_t dxe=0.005858;
831 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
832 Float_t zsteel[4] = { 26.,24.,28.,14. };
833 Float_t wsteel[4] = { .715,.18,.1,.005 };
835 Int_t *idtmed = fIdtmed->GetArray()-599;
836 Int_t isxfld = gAlice->Field()->Integ();
837 Float_t sxmgmx = gAlice->Field()->Max();
839 // --- Define the various materials for GEANT ---
840 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
842 AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4);
843 AliMixture(3, "CO2 $", ac, zc, dc, -2, wc);
844 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
845 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
846 AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3);
847 AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.);
848 AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.);
849 AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7);
850 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
851 AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9);
852 AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.);
853 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
854 // AliMaterial(31, "Xenon$", 131.3, 54., dxe, x0xe, 6.5e4);
856 AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.);
857 AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.);
858 AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16);
859 AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.);
861 // define gas-mixtures
864 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
867 dg = (dar * 4 + dco) / 5;
868 AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg);
870 // Define tracking media
871 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
872 AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
873 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
874 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
875 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
876 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
877 AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
878 AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
879 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10);
880 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1);
881 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
882 AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
883 AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
884 AliMedium(19, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
885 // AliMedium(31, "Xenon $", 31, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
887 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
888 gMC->Gstpar(idtmed[600], "LOSS", 3.);
889 gMC->Gstpar(idtmed[600], "DRAY", 1.);
891 gMC->Gstpar(idtmed[603], "LOSS", 3.);
892 gMC->Gstpar(idtmed[603], "DRAY", 1.);
894 gMC->Gstpar(idtmed[604], "LOSS", 3.);
895 gMC->Gstpar(idtmed[604], "DRAY", 1.);
897 gMC->Gstpar(idtmed[605], "LOSS", 3.);
898 gMC->Gstpar(idtmed[605], "DRAY", 1.);
900 gMC->Gstpar(idtmed[606], "LOSS", 3.);
901 gMC->Gstpar(idtmed[606], "DRAY", 1.);
903 gMC->Gstpar(idtmed[607], "LOSS", 3.);
904 gMC->Gstpar(idtmed[607], "DRAY", 1.);
906 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
907 // --- without affecting the hit patterns ---
908 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
909 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
910 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
911 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
912 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
913 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
914 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
915 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
916 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
917 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
918 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
919 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
920 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
921 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
922 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
923 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
924 gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
925 gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
926 gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
927 gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
929 // --- Prevent particles stopping in the gas due to energy cut-off ---
930 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
931 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
932 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
933 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
934 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
937 //_____________________________________________________________________________
938 void AliPMDv0::Init()
941 // Initialises PMD detector after it has been built
947 printf("\n%s: ",ClassName());
948 for(i=0;i<35;i++) printf("*");
949 printf(" PMD_INIT ");
950 for(i=0;i<35;i++) printf("*");
951 printf("\n%s: ",ClassName());
952 printf(" PMD simulation package (v0) initialised\n");
953 printf("%s: parameters of pmd\n", ClassName());
954 printf("%s: %10.2f %10.2f %10.2f \
955 %10.2f\n",ClassName(),cell_radius,cell_wall,cell_depth,zdist1 );
956 printf("%s: ",ClassName());
957 for(i=0;i<80;i++) printf("*");
960 Int_t *idtmed = fIdtmed->GetArray()-599;
961 fMedSens=idtmed[605-1];
964 //_____________________________________________________________________________
965 void AliPMDv0::StepManager()
968 // Called at each step in the PMD
971 Float_t hits[4], destep;
972 Float_t center[3] = {0,0,0};
976 if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
978 gMC->CurrentVolID(copy);
980 //namep=gMC->CurrentVolName();
981 //printf("Current vol is %s \n",namep);
984 gMC->CurrentVolOffID(1,copy);
986 //namep=gMC->CurrentVolOffName(1);
987 //printf("Current vol 11 is %s \n",namep);
990 gMC->CurrentVolOffID(2,copy);
992 //namep=gMC->CurrentVolOffName(2);
993 //printf("Current vol 22 is %s \n",namep);
997 // if(strncmp(namep,"EHC1",4))vol[2]=1;
999 gMC->CurrentVolOffID(3,copy);
1001 //namep=gMC->CurrentVolOffName(3);
1002 //printf("Current vol 33 is %s \n",namep);
1005 gMC->CurrentVolOffID(4,copy);
1007 //namep=gMC->CurrentVolOffName(4);
1008 //printf("Current vol 44 is %s \n",namep);
1011 //printf("volume number %d,%d,%d,%d,%d,%f \n",vol[0],vol[1],vol[2],vol[3],vol[4],destep*1000000);
1013 gMC->Gdtom(center,hits,1);
1014 hits[3] = destep*1e9; //Number in eV
1015 AddHit(gAlice->CurrentTrack(), vol, hits);
1020 //------------------------------------------------------------------------
1023 void AliPMDv0::GetParameters()
1025 Int_t ncell_um, num_um;
1031 cell_depth=0.25 * 2.;
1034 ncell_sm=ncell_um * num_um; //no. of cells in a row in one supermodule
1035 sm_length= ((ncell_sm + 0.25 ) * cell_radius) * 2.;
1041 sm_thick = th_base + th_air + th_pcb + cell_depth + th_pcb + th_air + th_pcb;