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 **************************************************************************/
19 ///////////////////////////////////////////////////////////////////////////////
21 // Photon Multiplicity Detector Version 1 //
25 <img src="picts/AliPMDv1Class.gif">
29 ///////////////////////////////////////////////////////////////////////////////
32 #include "Riostream.h"
34 #include <TVirtualMC.h>
41 static Int_t kdet, ncell_sm, ncell_hole;
42 static Float_t zdist, zdist1;
43 static Float_t sm_length, sm_thick, cell_radius, cell_wall, cell_depth;
44 static Float_t boundary, th_base, th_air, th_pcb;
45 static Float_t th_lead, th_steel;
49 //_____________________________________________________________________________
53 // Default constructor
58 //_____________________________________________________________________________
59 AliPMDv1::AliPMDv1(const char *name, const char *title)
63 // Standard constructor
68 //_____________________________________________________________________________
69 void AliPMDv1::CreateGeometry()
72 // Create geometry for Photon Multiplicity Detector Version 3 :
77 <img src="picts/AliPMDv1.gif">
82 <img src="picts/AliPMDv1Tree.gif">
90 //_____________________________________________________________________________
91 void AliPMDv1::CreateSupermodule()
94 // Creates the geometry of the cells, places them in supermodule which
95 // is a rhombus object.
97 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
98 // *** HEXAGONAL CELLS WITH CELL RADIUS 0.25 cm (see "GetParameters")
99 // -- Author : S. Chattopadhyay, 02/04/1999.
101 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is placed inside another
102 // hexagonal cell made of Cu (ECCU) with larger radius, compared to ECAR. The difference
103 // in radius gives the dimension of half width of each cell wall.
104 // These cells are placed as 72 x 72 array in a
105 // rhombus shaped supermodule (EHC1). The rhombus shaped modules are designed
106 // to have closed packed structure.
108 // Each supermodule (ESMA, ESMB), made of G10 is filled with following components
109 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
110 // EHC1 --> Rhombus shaped parallelopiped containing the hexagonal cells
111 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
113 // ESMA, ESMB are placed in EMM1 along with EMPB (Pb converter)
114 // and EMFE (iron support)
117 // ESMB --> Normal supermodule, mirror image of ESMA
118 // EMPB --> Pb converter
119 // EMFE --> Fe backing
120 // ESMA --> Normal supermodule
122 // ESMX, ESMY are placed in EMM2 along with EMPB (Pb converter)
123 // and EMFE (iron support)
126 // ESMY --> Special supermodule, mirror image of ESMX,
127 // EMPB --> Pb converter
128 // EMFE --> Fe backing
129 // ESMX --> First of the two Special supermodules near the hole
132 // ESMQ --> Special supermodule, mirror image of ESMX,
133 // EMPB --> Pb converter
134 // EMFE --> Fe backing
135 // ESMP --> Second of the two Special supermodules near the hole
137 // EMM2 and EMM3 are used to create the hexagonal HOLE
143 // ---------------------------------------------------------------------------
145 // EHOL EMM1 EMM2 EMM3 EALM
147 // -------------------- -------------------- --------------------
148 // | | | | | | | | | | | |
149 // ESMB EMPB EMFE ESMA ESMY EMPB EMFE ESMX ESMQ EMPB EMFE ESMP
151 // ------------ ------------ -------------
153 // EAIR EHC1 EAIR EAIR EHC2 EAIR EAIR EHC3 EAIR
164 const Float_t root3_2 = TMath::Sqrt(3.) /2.;
165 Int_t *idtmed = fIdtmed->GetArray()-599;
167 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
168 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
170 zdist = TMath::Abs(zdist1);
173 //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu
174 // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension
175 //(1mm tolerance on both side and 5mm thick G10 wall)
178 // **** CELL SIZE 20 mm^2 EQUIVALENT
180 // Inner hexagon filled with gas (Ar+CO2)
182 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
184 hexd2[4]= - cell_depth/2.;
185 hexd2[7]= cell_depth/2.;
186 hexd2[6]= cell_radius - cell_wall;
187 hexd2[9]= cell_radius - cell_wall;
189 gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
190 gMC->Gsatt("ECAR", "SEEN", 0);
192 // Outer hexagon made of Copper
194 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
195 //total wall thickness=0.2*2
197 hexd1[4]= - cell_depth/2.;
198 hexd1[7]= cell_depth/2.;
199 hexd1[6]= cell_radius;
200 hexd1[9]= cell_radius;
202 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
203 gMC->Gsatt("ECCU", "SEEN", 1);
205 // --- place inner hex inside outer hex
207 gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
209 // Rhombus shaped supermodules (defined by PARA)
211 // volume for SUPERMODULE
213 Float_t dpara_sm1[6] = {12.5,12.5,0.8,30.,0.,0.};
214 dpara_sm1[0]=(ncell_sm+0.25)*hexd1[6] ;
215 dpara_sm1[1] = dpara_sm1[0] *root3_2;
216 dpara_sm1[2] = sm_thick/2.;
219 gMC->Gsvolu("ESMA","PARA", idtmed[607], dpara_sm1, 6);
220 gMC->Gsatt("ESMA", "SEEN", 0);
222 gMC->Gsvolu("ESMB","PARA", idtmed[607], dpara_sm1, 6);
223 gMC->Gsatt("ESMB", "SEEN", 0);
225 // Air residing between the PCB and the base
227 Float_t dpara_air[6] = {12.5,12.5,8.,30.,0.,0.};
228 dpara_air[0]= dpara_sm1[0];
229 dpara_air[1]= dpara_sm1[1];
230 dpara_air[2]= th_air/2.;
232 gMC->Gsvolu("EAIR","PARA", idtmed[698], dpara_air, 6);
233 gMC->Gsatt("EAIR", "SEEN", 0);
235 // volume for honeycomb chamber EHC1
237 Float_t dpara1[6] = {12.5,12.5,0.4,30.,0.,0.};
238 dpara1[0] = dpara_sm1[0];
239 dpara1[1] = dpara_sm1[1];
240 dpara1[2] = cell_depth/2.;
242 gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6);
243 gMC->Gsatt("EHC1", "SEEN", 1);
247 // Place hexagonal cells ECCU cells inside EHC1 (72 X 72)
251 yb = -dpara1[1] + (1./root3_2)*hexd1[6];
254 for (j = 1; j <= ncell_sm; ++j) {
255 xb =-(dpara1[0] + dpara1[1]*0.577) + 2*hexd1[6]; //0.577=tan(30deg)
257 xb = xb+(xrow-1)*hexd1[6];
259 for (i = 1; i <= ncell_sm; ++i) {
260 number = i+(j-1)*ncell_sm;
261 gMC->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY");
265 yb += (hexd1[6]*TMath::Sqrt(3.));
269 // Place EHC1 and EAIR into ESMA and ESMB
271 Float_t z_air1,z_air2,z_gas;
273 //ESMA is normal supermodule with base at bottom, with EHC1
274 z_air1= -dpara_sm1[2] + th_base + dpara_air[2];
275 gMC->Gspos("EAIR", 1, "ESMA", 0., 0., z_air1, 0, "ONLY");
276 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2];
277 gMC->Gspos("EHC1", 1, "ESMA", 0., 0., z_gas, 0, "ONLY");
278 z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2];
279 gMC->Gspos("EAIR", 2, "ESMA", 0., 0., z_air2, 0, "ONLY");
281 // ESMB is mirror image of ESMA, with base at top, with EHC1
283 z_air1= -dpara_sm1[2] + th_pcb + dpara_air[2];
284 gMC->Gspos("EAIR", 3, "ESMB", 0., 0., z_air1, 0, "ONLY");
285 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2];
286 gMC->Gspos("EHC1", 2, "ESMB", 0., 0., z_gas, 0, "ONLY");
287 z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2];
288 gMC->Gspos("EAIR", 4, "ESMB", 0., 0., z_air2, 0, "ONLY");
291 // special supermodule EMM2(GEANT only) containing 6 unit modules
293 // volume for SUPERMODULE
295 Float_t dpara_sm2[6] = {12.5,12.5,0.8,30.,0.,0.};
296 dpara_sm2[0]=(ncell_sm+0.25)*hexd1[6] ;
297 dpara_sm2[1] = (ncell_sm - ncell_hole + 0.25) * root3_2 * hexd1[6];
298 dpara_sm2[2] = sm_thick/2.;
300 gMC->Gsvolu("ESMX","PARA", idtmed[607], dpara_sm2, 6);
301 gMC->Gsatt("ESMX", "SEEN", 0);
303 gMC->Gsvolu("ESMY","PARA", idtmed[607], dpara_sm2, 6);
304 gMC->Gsatt("ESMY", "SEEN", 0);
306 Float_t dpara2[6] = {12.5,12.5,0.4,30.,0.,0.};
307 dpara2[0] = dpara_sm2[0];
308 dpara2[1] = dpara_sm2[1];
309 dpara2[2] = cell_depth/2.;
311 gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6);
312 gMC->Gsatt("EHC2", "SEEN", 1);
315 // Air residing between the PCB and the base
317 Float_t dpara2_air[6] = {12.5,12.5,8.,30.,0.,0.};
318 dpara2_air[0]= dpara_sm2[0];
319 dpara2_air[1]= dpara_sm2[1];
320 dpara2_air[2]= th_air/2.;
322 gMC->Gsvolu("EAIX","PARA", idtmed[698], dpara2_air, 6);
323 gMC->Gsatt("EAIX", "SEEN", 0);
325 // Place hexagonal single cells ECCU inside EHC2
326 // skip cells which go into the hole in top left corner.
329 yb = -dpara2[1] + (1./root3_2)*hexd1[6];
331 for (j = 1; j <= (ncell_sm - ncell_hole); ++j) {
332 xb =-(dpara2[0] + dpara2[1]*0.577) + 2*hexd1[6];
334 xb = xb+(xrow-1)*hexd1[6];
336 for (i = 1; i <= ncell_sm; ++i) {
337 number = i+(j-1)*ncell_sm;
338 gMC->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY");
342 yb += (hexd1[6]*TMath::Sqrt(3.));
346 // ESMX is normal supermodule with base at bottom, with EHC2
348 z_air1= -dpara_sm2[2] + th_base + dpara2_air[2];
349 gMC->Gspos("EAIX", 1, "ESMX", 0., 0., z_air1, 0, "ONLY");
350 z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2];
351 gMC->Gspos("EHC2", 1, "ESMX", 0., 0., z_gas, 0, "ONLY");
352 z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2];
353 gMC->Gspos("EAIX", 2, "ESMX", 0., 0., z_air2, 0, "ONLY");
355 // ESMY is mirror image of ESMX with base at bottom, with EHC2
357 z_air1= -dpara_sm2[2] + th_pcb + dpara2_air[2];
358 gMC->Gspos("EAIX", 3, "ESMY", 0., 0., z_air1, 0, "ONLY");
359 z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2];
360 gMC->Gspos("EHC2", 2, "ESMY", 0., 0., z_gas, 0, "ONLY");
361 z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2];
362 gMC->Gspos("EAIX", 4, "ESMY", 0., 0., z_air2, 0, "ONLY");
367 // special supermodule EMM3 (GEANT only) containing 2 unit modules
369 // volume for SUPERMODULE
371 Float_t dpara_sm3[6] = {12.5,12.5,0.8,30.,0.,0.};
372 dpara_sm3[0]=(ncell_sm - ncell_hole +0.25)*hexd1[6] ;
373 dpara_sm3[1] = (ncell_hole + 0.25) * hexd1[6] * root3_2;
374 dpara_sm3[2] = sm_thick/2.;
376 gMC->Gsvolu("ESMP","PARA", idtmed[607], dpara_sm3, 6);
377 gMC->Gsatt("ESMP", "SEEN", 0);
379 gMC->Gsvolu("ESMQ","PARA", idtmed[607], dpara_sm3, 6);
380 gMC->Gsatt("ESMQ", "SEEN", 0);
382 Float_t dpara3[6] = {12.5,12.5,0.4,30.,0.,0.};
383 dpara3[0] = dpara_sm3[0];
384 dpara3[1] = dpara_sm3[1];
385 dpara3[2] = cell_depth/2.;
387 gMC->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6);
388 gMC->Gsatt("EHC3", "SEEN", 1);
391 // Air residing between the PCB and the base
393 Float_t dpara3_air[6] = {12.5,12.5,8.,30.,0.,0.};
394 dpara3_air[0]= dpara_sm3[0];
395 dpara3_air[1]= dpara_sm3[1];
396 dpara3_air[2]= th_air/2.;
398 gMC->Gsvolu("EAIP","PARA", idtmed[698], dpara3_air, 6);
399 gMC->Gsatt("EAIP", "SEEN", 0);
402 // Place hexagonal single cells ECCU inside EHC3
403 // skip cells which go into the hole in top left corner.
406 yb = -dpara3[1] + (1./root3_2)*hexd1[6];
408 for (j = 1; j <= ncell_hole; ++j) {
409 xb =-(dpara3[0] + dpara3[1]*0.577) + 2*hexd1[6];
411 xb = xb+(xrow-1)*hexd1[6];
413 for (i = 1; i <= (ncell_sm - ncell_hole); ++i) {
414 number = i+(j-1)*(ncell_sm - ncell_hole);
415 gMC->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY");
419 yb += (hexd1[6]*TMath::Sqrt(3.));
422 // ESMP is normal supermodule with base at bottom, with EHC3
424 z_air1= -dpara_sm3[2] + th_base + dpara3_air[2];
425 gMC->Gspos("EAIP", 1, "ESMP", 0., 0., z_air1, 0, "ONLY");
426 z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2];
427 gMC->Gspos("EHC3", 1, "ESMP", 0., 0., z_gas, 0, "ONLY");
428 z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2];
429 gMC->Gspos("EAIP", 2, "ESMP", 0., 0., z_air2, 0, "ONLY");
431 // ESMQ is mirror image of ESMP with base at bottom, with EHC3
433 z_air1= -dpara_sm3[2] + th_pcb + dpara3_air[2];
434 gMC->Gspos("EAIP", 3, "ESMQ", 0., 0., z_air1, 0, "ONLY");
435 z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2];
436 gMC->Gspos("EHC3", 2, "ESMQ", 0., 0., z_gas, 0, "ONLY");
437 z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2];
438 gMC->Gspos("EAIP", 4, "ESMQ", 0., 0., z_air2, 0, "ONLY");
442 //_____________________________________________________________________________
444 void AliPMDv1::CreatePMD()
447 // Create final detector from supermodules
449 // -- Author : Y.P. VIYOGI, 07/05/1996.
450 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
451 // -- Modified: For New Geometry YPV, March 2001.
454 const Float_t root3_2 = TMath::Sqrt(3.)/2.;
455 const Float_t pi = 3.14159;
461 Int_t jhrot12,jhrot13, irotdm;
463 Int_t *idtmed = fIdtmed->GetArray()-599;
465 // VOLUMES Names : begining with "E" for all PMD volumes,
466 // The names of SIZE variables begin with S and have more meaningful
467 // characters as shown below.
469 // VOLUME SIZE MEDIUM : REMARKS
470 // ------ ----- ------ : ---------------------------
472 // EPMD GASPMD AIR : INSIDE PMD and its SIZE
474 // *** Define the EPMD Volume and fill with air ***
477 // Gaspmd, the dimension of HEXAGONAL mother volume of PMD,
480 Float_t gaspmd[10] = {0.,360.,6,2,-4.,12.,150.,4.,12.,150.};
482 gaspmd[5] = ncell_hole * cell_radius * 2. * root3_2;
483 gaspmd[8] = gaspmd[5];
485 gMC->Gsvolu("EPMD", "PGON", idtmed[698], gaspmd, 10);
486 gMC->Gsatt("EPMD", "SEEN", 0);
488 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
490 AliMatrix(jhrot12, 90., 120., 90., 210., 0., 0.);
491 AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
494 Float_t dm_thick = 2. * sm_thick + th_lead + th_steel;
496 // dpara_emm1 array contains parameters of the imaginary volume EMM1,
497 // EMM1 is a master module of type 1, which has 24 copies in the PMD.
498 // EMM1 : normal volume as in old cases
501 Float_t dpara_emm1[6] = {12.5,12.5,0.8,30.,0.,0.};
502 dpara_emm1[0] = sm_length/2.;
503 dpara_emm1[1] = dpara_emm1[0] *root3_2;
504 dpara_emm1[2] = dm_thick/2.;
506 gMC->Gsvolu("EMM1","PARA", idtmed[698], dpara_emm1, 6);
507 gMC->Gsatt("EMM1", "SEEN", 1);
510 // --- DEFINE Modules, iron, and lead volumes
512 // Pb Convertor for EMM1
513 Float_t dpara_pb1[6] = {12.5,12.5,8.,30.,0.,0.};
514 dpara_pb1[0] = sm_length/2.;
515 dpara_pb1[1] = dpara_pb1[0] * root3_2;
516 dpara_pb1[2] = th_lead/2.;
518 gMC->Gsvolu("EPB1","PARA", idtmed[600], dpara_pb1, 6);
519 gMC->Gsatt ("EPB1", "SEEN", 0);
521 // Fe Support for EMM1
522 Float_t dpara_fe1[6] = {12.5,12.5,8.,30.,0.,0.};
523 dpara_fe1[0] = dpara_pb1[0];
524 dpara_fe1[1] = dpara_pb1[1];
525 dpara_fe1[2] = th_steel/2.;
527 gMC->Gsvolu("EFE1","PARA", idtmed[618], dpara_fe1, 6);
528 gMC->Gsatt ("EFE1", "SEEN", 0);
533 // position supermodule ESMA, ESMB, EPB1, EFE1 inside EMM1
535 Float_t z_ps,z_pb,z_fe,z_cv;
537 z_ps = - dpara_emm1[2] + sm_thick/2.;
538 gMC->Gspos("ESMB", 1, "EMM1", 0., 0., z_ps, 0, "ONLY");
539 z_pb=z_ps+sm_thick/2.+dpara_pb1[2];
540 gMC->Gspos("EPB1", 1, "EMM1", 0., 0., z_pb, 0, "ONLY");
541 z_fe=z_pb+dpara_pb1[2]+dpara_fe1[2];
542 gMC->Gspos("EFE1", 1, "EMM1", 0., 0., z_fe, 0, "ONLY");
543 z_cv=z_fe+dpara_fe1[2]+sm_thick/2.;
544 gMC->Gspos("ESMA", 1, "EMM1", 0., 0., z_cv, 0, "ONLY");
548 // EMM2 : special master module having full row of cells but the number
549 // of rows limited by hole.
551 Float_t dpara_emm2[6] = {12.5,12.5,0.8,30.,0.,0.};
552 dpara_emm2[0] = sm_length/2.;
553 dpara_emm2[1] = (ncell_sm - ncell_hole + 0.25) * cell_radius * root3_2;
554 dpara_emm2[2] = dm_thick/2.;
556 gMC->Gsvolu("EMM2","PARA", idtmed[698], dpara_emm2, 6);
557 gMC->Gsatt("EMM2", "SEEN", 1);
560 // Pb Convertor for EMM2
561 Float_t dpara_pb2[6] = {12.5,12.5,8.,30.,0.,0.};
562 dpara_pb2[0] = dpara_emm2[0];
563 dpara_pb2[1] = dpara_emm2[1];
564 dpara_pb2[2] = th_lead/2.;
566 gMC->Gsvolu("EPB2","PARA", idtmed[600], dpara_pb2, 6);
567 gMC->Gsatt ("EPB2", "SEEN", 0);
569 // Fe Support for EMM2
570 Float_t dpara_fe2[6] = {12.5,12.5,8.,30.,0.,0.};
571 dpara_fe2[0] = dpara_pb2[0];
572 dpara_fe2[1] = dpara_pb2[1];
573 dpara_fe2[2] = th_steel/2.;
575 gMC->Gsvolu("EFE2","PARA", idtmed[618], dpara_fe2, 6);
576 gMC->Gsatt ("EFE2", "SEEN", 0);
580 // position supermodule ESMX, ESMY inside EMM2
582 z_ps = - dpara_emm2[2] + sm_thick/2.;
583 gMC->Gspos("ESMY", 1, "EMM2", 0., 0., z_ps, 0, "ONLY");
584 z_pb = z_ps + sm_thick/2.+dpara_pb2[2];
585 gMC->Gspos("EPB2", 1, "EMM2", 0., 0., z_pb, 0, "ONLY");
586 z_fe = z_pb + dpara_pb2[2]+dpara_fe2[2];
587 gMC->Gspos("EFE2", 1, "EMM2", 0., 0., z_fe, 0, "ONLY");
588 z_cv = z_fe + dpara_fe2[2]+sm_thick/2.;
589 gMC->Gspos("ESMX", 1, "EMM2", 0., 0., z_cv, 0, "ONLY");
593 // EMM3 : special master module having truncated rows and columns of cells
596 Float_t dpara_emm3[6] = {12.5,12.5,0.8,30.,0.,0.};
597 dpara_emm3[0] = dpara_emm2[1]/root3_2;
598 dpara_emm3[1] = (ncell_hole + 0.25) * cell_radius *root3_2;
599 dpara_emm3[2] = dm_thick/2.;
601 gMC->Gsvolu("EMM3","PARA", idtmed[698], dpara_emm3, 6);
602 gMC->Gsatt("EMM3", "SEEN", 1);
605 // Pb Convertor for EMM3
606 Float_t dpara_pb3[6] = {12.5,12.5,8.,30.,0.,0.};
607 dpara_pb3[0] = dpara_emm3[0];
608 dpara_pb3[1] = dpara_emm3[1];
609 dpara_pb3[2] = th_lead/2.;
611 gMC->Gsvolu("EPB3","PARA", idtmed[600], dpara_pb3, 6);
612 gMC->Gsatt ("EPB3", "SEEN", 0);
614 // Fe Support for EMM3
615 Float_t dpara_fe3[6] = {12.5,12.5,8.,30.,0.,0.};
616 dpara_fe3[0] = dpara_pb3[0];
617 dpara_fe3[1] = dpara_pb3[1];
618 dpara_fe3[2] = th_steel/2.;
620 gMC->Gsvolu("EFE3","PARA", idtmed[618], dpara_fe3, 6);
621 gMC->Gsatt ("EFE3", "SEEN", 0);
625 // position supermodule ESMP, ESMQ inside EMM3
627 z_ps = - dpara_emm3[2] + sm_thick/2.;
628 gMC->Gspos("ESMQ", 1, "EMM3", 0., 0., z_ps, 0, "ONLY");
629 z_pb = z_ps + sm_thick/2.+dpara_pb3[2];
630 gMC->Gspos("EPB3", 1, "EMM3", 0., 0., z_pb, 0, "ONLY");
631 z_fe = z_pb + dpara_pb3[2]+dpara_fe3[2];
632 gMC->Gspos("EFE3", 1, "EMM3", 0., 0., z_fe, 0, "ONLY");
633 z_cv = z_fe + dpara_fe3[2] + sm_thick/2.;
634 gMC->Gspos("ESMP", 1, "EMM3", 0., 0., z_cv, 0, "ONLY");
637 // EHOL is a tube structure made of air
641 //d_hole[1] = ncell_hole * cell_radius *2. * root3_2 + boundary;
642 //d_hole[2] = dm_thick/2.;
644 //gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3);
645 //gMC->Gsatt("EHOL", "SEEN", 1);
647 //Al-rod as boundary of the supermodules
650 Al_rod[0] = sm_length * 3/2. - gaspmd[5]/2 - boundary ;
651 Al_rod[1] = boundary - 0.5*cell_radius*root3_2;
652 Al_rod[2] = dm_thick/2.;
654 gMC->Gsvolu("EALM","BOX ", idtmed[698], Al_rod, 3);
655 gMC->Gsatt ("EALM", "SEEN", 1);
657 xalm[0]=Al_rod[0] + gaspmd[5] + 3.0*boundary;
663 yalm[1]=xalm[0]*root3_2;
666 // delx = full side of the supermodule
667 Float_t delx=sm_length * 3.;
668 Float_t x1= delx*root3_2 /2.;
672 // placing master modules and Al-rod in PMD
674 Float_t dx = sm_length;
675 Float_t dy = dx * root3_2;
677 Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2.,
679 -3.*dx/2., -dx/2., dx/2.};
681 Float_t ysup[9] = {dy, dy, dy,
685 // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes
687 Float_t xoff = boundary * TMath::Tan(pi/6.);
688 Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-boundary/root3_2};
689 Float_t ymod[3] = {-x1 - boundary, x1 + boundary, 0.};
690 Float_t xpos[9], ypos[9], x2, y2, x3, y3;
692 Float_t xemm2 = sm_length/2. -
693 (ncell_sm + ncell_hole + 0.25) * cell_radius * 0.5
695 Float_t yemm2 = -(ncell_sm + ncell_hole + 0.25) * cell_radius * root3_2
698 Float_t xemm3 = (ncell_sm + 0.5 * ncell_hole + 0.25) * cell_radius + xoff;
699 Float_t yemm3 = - (ncell_hole - 0.25) * cell_radius * root3_2 - boundary;
701 Float_t theta[3] = {0., 2.*pi/3., 4.*pi/3.};
702 Int_t irotate[3] = {0, jhrot12, jhrot13};
707 gMC->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY");
708 x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
709 y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
711 gMC->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY");
713 x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
714 y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
716 gMC->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY");
720 xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - ysup[i]*TMath::Sin(theta[j]);
721 ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) + ysup[i]*TMath::Cos(theta[j]);
724 printf("%s: %f %f \n", ClassName(), xpos[i], ypos[i]);
729 printf("\n%s: Num_mod %d\n",ClassName(),num_mod);
731 gMC->Gspos("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY");
737 // place EHOL in the centre of EPMD
738 // gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY");
740 // --- Place the EPMD in ALICE
745 gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY");
750 //_____________________________________________________________________________
751 void AliPMDv1::DrawModule()
754 // Draw a shaded view of the Photon Multiplicity Detector
757 gMC->Gsatt("*", "seen", -1);
758 gMC->Gsatt("alic", "seen", 0);
760 // Set the visibility of the components
762 gMC->Gsatt("ECAR","seen",0);
763 gMC->Gsatt("ECCU","seen",1);
764 gMC->Gsatt("EHC1","seen",1);
765 gMC->Gsatt("EHC1","seen",1);
766 gMC->Gsatt("EHC2","seen",1);
767 gMC->Gsatt("EMM1","seen",1);
768 gMC->Gsatt("EHOL","seen",1);
769 gMC->Gsatt("EPMD","seen",0);
771 gMC->Gdopt("hide", "on");
772 gMC->Gdopt("shad", "on");
773 gMC->Gsatt("*", "fill", 7);
774 gMC->SetClipBox(".");
775 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
777 gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02);
778 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
780 //gMC->Gdman(17, 5, "MAN");
781 gMC->Gdopt("hide", "off");
784 //_____________________________________________________________________________
785 void AliPMDv1::CreateMaterials()
788 // Create materials for the PMD
790 // ORIGIN : Y. P. VIYOGI
793 // --- The Argon- CO2 mixture ---
794 Float_t ag[2] = { 39.95 };
795 Float_t zg[2] = { 18. };
796 Float_t wg[2] = { .8,.2 };
797 Float_t dar = .001782; // --- Ar density in g/cm3 ---
799 Float_t ac[2] = { 12.,16. };
800 Float_t zc[2] = { 6.,8. };
801 Float_t wc[2] = { 1.,2. };
802 Float_t dc = .001977;
803 Float_t dco = .002; // --- CO2 density in g/cm3 ---
805 Float_t absl, radl, a, d, z;
809 //Float_t dxe=0.005858;
812 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
813 Float_t zsteel[4] = { 26.,24.,28.,14. };
814 Float_t wsteel[4] = { .715,.18,.1,.005 };
816 Int_t *idtmed = fIdtmed->GetArray()-599;
817 Int_t isxfld = gAlice->Field()->Integ();
818 Float_t sxmgmx = gAlice->Field()->Max();
820 // --- Define the various materials for GEANT ---
821 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
823 AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4);
824 AliMixture(3, "CO2 $", ac, zc, dc, -2, wc);
825 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
826 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
827 AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3);
828 AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.);
829 AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.);
830 AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7);
831 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
832 AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9);
833 AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.);
834 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
835 // AliMaterial(31, "Xenon$", 131.3, 54., dxe, x0xe, 6.5e4);
837 AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.);
838 AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.);
839 AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16);
840 AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.);
842 // define gas-mixtures
845 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
848 dg = (dar * 4 + dco) / 5;
849 AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg);
851 // Define tracking media
852 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
853 AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
854 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
855 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
856 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
857 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
858 AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
859 AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
860 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10);
861 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1);
862 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
863 AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
864 AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
865 AliMedium(19, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
866 // AliMedium(31, "Xenon $", 31, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
868 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
869 gMC->Gstpar(idtmed[600], "LOSS", 3.);
870 gMC->Gstpar(idtmed[600], "DRAY", 1.);
872 gMC->Gstpar(idtmed[603], "LOSS", 3.);
873 gMC->Gstpar(idtmed[603], "DRAY", 1.);
875 gMC->Gstpar(idtmed[604], "LOSS", 3.);
876 gMC->Gstpar(idtmed[604], "DRAY", 1.);
878 gMC->Gstpar(idtmed[605], "LOSS", 3.);
879 gMC->Gstpar(idtmed[605], "DRAY", 1.);
881 gMC->Gstpar(idtmed[606], "LOSS", 3.);
882 gMC->Gstpar(idtmed[606], "DRAY", 1.);
884 gMC->Gstpar(idtmed[607], "LOSS", 3.);
885 gMC->Gstpar(idtmed[607], "DRAY", 1.);
887 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
888 // --- without affecting the hit patterns ---
889 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
890 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
891 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
892 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
893 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
894 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
895 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
896 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
897 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
898 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
899 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
900 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
901 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
902 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
903 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
904 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
905 gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
906 gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
907 gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
908 gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
910 // --- Prevent particles stopping in the gas due to energy cut-off ---
911 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
912 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
913 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
914 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
915 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
918 //_____________________________________________________________________________
919 void AliPMDv1::Init()
922 // Initialises PMD detector after it has been built
928 printf("\n%s: ",ClassName());
929 for(i=0;i<35;i++) printf("*");
930 printf(" PMD_INIT ");
931 for(i=0;i<35;i++) printf("*");
932 printf("\n%s: ",ClassName());
933 printf(" PMD simulation package (v1) initialised\n");
934 printf("%s: parameters of pmd\n",ClassName());
935 printf("%s: %10.2f %10.2f %10.2f \
936 %10.2f\n",ClassName(),cell_radius,cell_wall,cell_depth,zdist1 );
937 printf("%s: ",ClassName());
938 for(i=0;i<80;i++) printf("*");
942 Int_t *idtmed = fIdtmed->GetArray()-599;
943 fMedSens=idtmed[605-1];
946 //_____________________________________________________________________________
947 void AliPMDv1::StepManager()
950 // Called at each step in the PMD
953 Float_t hits[4], destep;
954 Float_t center[3] = {0,0,0};
958 if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
960 gMC->CurrentVolID(copy);
962 //namep=gMC->CurrentVolName();
963 //printf("Current vol is %s \n",namep);
966 gMC->CurrentVolOffID(1,copy);
968 //namep=gMC->CurrentVolOffName(1);
969 //printf("Current vol 11 is %s \n",namep);
972 gMC->CurrentVolOffID(2,copy);
974 //namep=gMC->CurrentVolOffName(2);
975 //printf("Current vol 22 is %s \n",namep);
979 // if(strncmp(namep,"EHC1",4))vol[2]=1;
981 gMC->CurrentVolOffID(3,copy);
983 //namep=gMC->CurrentVolOffName(3);
984 //printf("Current vol 33 is %s \n",namep);
987 gMC->CurrentVolOffID(4,copy);
989 //namep=gMC->CurrentVolOffName(4);
990 //printf("Current vol 44 is %s \n",namep);
993 //printf("volume number %d,%d,%d,%d,%d,%f \n",vol[0],vol[1],vol[2],vol[3],vol[4],destep*1000000);
995 gMC->Gdtom(center,hits,1);
996 hits[3] = destep*1e9; //Number in eV
997 AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
1002 //------------------------------------------------------------------------
1005 void AliPMDv1::GetParameters()
1007 Int_t ncell_um, num_um;
1013 cell_depth=0.25 * 2.;
1016 ncell_sm=ncell_um * num_um; //no. of cells in a row in one supermodule
1017 sm_length= ((ncell_sm + 0.25 ) * cell_radius) * 2.;
1023 sm_thick = th_base + th_air + th_pcb + cell_depth + th_pcb + th_air + th_pcb;