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 ///////////////////////////////////////////////////////////////////////////////
39 static Int_t kdet, ncell_sm, ncell_hole;
40 static Float_t zdist, zdist1;
41 static Float_t sm_length, sm_thick, cell_radius, cell_wall, cell_depth;
42 static Float_t boundary, th_base, th_air, th_pcb;
43 static Float_t th_lead, th_steel;
47 //_____________________________________________________________________________
51 // Default constructor
56 //_____________________________________________________________________________
57 AliPMDv1::AliPMDv1(const char *name, const char *title)
61 // Standard constructor
66 //_____________________________________________________________________________
67 void AliPMDv1::CreateGeometry()
70 // Create geometry for Photon Multiplicity Detector Version 3 :
75 <img src="picts/AliPMDv1.gif">
80 <img src="picts/AliPMDv1Tree.gif">
88 //_____________________________________________________________________________
89 void AliPMDv1::CreateSupermodule()
92 // Creates the geometry of the cells, places them in supermodule which
93 // is a rhombus object.
95 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
96 // *** HEXAGONAL CELLS WITH CELL RADIUS 0.25 cm (see "GetParameters")
97 // -- Author : S. Chattopadhyay, 02/04/1999.
99 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is placed inside another
100 // hexagonal cell made of Cu (ECCU) with larger radius, compared to ECAR. The difference
101 // in radius gives the dimension of half width of each cell wall.
102 // These cells are placed as 72 x 72 array in a
103 // rhombus shaped supermodule (EHC1). The rhombus shaped modules are designed
104 // to have closed packed structure.
106 // Each supermodule (ESMA, ESMB), made of G10 is filled with following components
107 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
108 // EHC1 --> Rhombus shaped parallelopiped containing the hexagonal cells
109 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
111 // ESMA, ESMB are placed in EMM1 along with EMPB (Pb converter)
112 // and EMFE (iron support)
115 // ESMB --> Normal supermodule, mirror image of ESMA
116 // EMPB --> Pb converter
117 // EMFE --> Fe backing
118 // ESMA --> Normal supermodule
120 // ESMX, ESMY are placed in EMM2 along with EMPB (Pb converter)
121 // and EMFE (iron support)
124 // ESMY --> Special supermodule, mirror image of ESMX,
125 // EMPB --> Pb converter
126 // EMFE --> Fe backing
127 // ESMX --> First of the two Special supermodules near the hole
130 // ESMQ --> Special supermodule, mirror image of ESMX,
131 // EMPB --> Pb converter
132 // EMFE --> Fe backing
133 // ESMP --> Second of the two Special supermodules near the hole
135 // EMM2 and EMM3 are used to create the hexagonal HOLE
141 // ---------------------------------------------------------------------------
143 // EHOL EMM1 EMM2 EMM3 EALM
145 // -------------------- -------------------- --------------------
146 // | | | | | | | | | | | |
147 // ESMB EMPB EMFE ESMA ESMY EMPB EMFE ESMX ESMQ EMPB EMFE ESMP
149 // ------------ ------------ -------------
151 // EAIR EHC1 EAIR EAIR EHC2 EAIR EAIR EHC3 EAIR
162 const Float_t root3_2 = TMath::Sqrt(3.) /2.;
163 Int_t *idtmed = fIdtmed->GetArray()-599;
165 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
166 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
168 zdist = TMath::Abs(zdist1);
171 //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu
172 // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension
173 //(1mm tolerance on both side and 5mm thick G10 wall)
176 // **** CELL SIZE 20 mm^2 EQUIVALENT
178 // Inner hexagon filled with gas (Ar+CO2)
180 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
182 hexd2[4]= - cell_depth/2.;
183 hexd2[7]= cell_depth/2.;
184 hexd2[6]= cell_radius - cell_wall;
185 hexd2[9]= cell_radius - cell_wall;
187 gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
188 gMC->Gsatt("ECAR", "SEEN", 0);
190 // Outer hexagon made of Copper
192 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
193 //total wall thickness=0.2*2
195 hexd1[4]= - cell_depth/2.;
196 hexd1[7]= cell_depth/2.;
197 hexd1[6]= cell_radius;
198 hexd1[9]= cell_radius;
200 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
201 gMC->Gsatt("ECCU", "SEEN", 1);
203 // --- place inner hex inside outer hex
205 gMC->Gsposp("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY", hexd2, 10);
207 // Rhombus shaped supermodules (defined by PARA)
209 // volume for SUPERMODULE
211 Float_t dpara_sm1[6] = {12.5,12.5,0.8,30.,0.,0.};
212 dpara_sm1[0]=(ncell_sm+0.25)*hexd1[6] ;
213 dpara_sm1[1] = dpara_sm1[0] *root3_2;
214 dpara_sm1[2] = sm_thick/2.;
217 gMC->Gsvolu("ESMA","PARA", idtmed[607], dpara_sm1, 6);
218 gMC->Gsatt("ESMA", "SEEN", 0);
220 gMC->Gsvolu("ESMB","PARA", idtmed[607], dpara_sm1, 6);
221 gMC->Gsatt("ESMB", "SEEN", 0);
223 // Air residing between the PCB and the base
225 Float_t dpara_air[6] = {12.5,12.5,8.,30.,0.,0.};
226 dpara_air[0]= dpara_sm1[0];
227 dpara_air[1]= dpara_sm1[1];
228 dpara_air[2]= th_air/2.;
230 gMC->Gsvolu("EAIR","PARA", idtmed[698], dpara_air, 6);
231 gMC->Gsatt("EAIR", "SEEN", 0);
233 // volume for honeycomb chamber EHC1
235 Float_t dpara1[6] = {12.5,12.5,0.4,30.,0.,0.};
236 dpara1[0] = dpara_sm1[0];
237 dpara1[1] = dpara_sm1[1];
238 dpara1[2] = cell_depth/2.;
240 gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6);
241 gMC->Gsatt("EHC1", "SEEN", 1);
245 // Place hexagonal cells ECCU cells inside EHC1 (72 X 72)
249 yb = -dpara1[1] + (1./root3_2)*hexd1[6];
252 for (j = 1; j <= ncell_sm; ++j) {
253 xb =-(dpara1[0] + dpara1[1]*0.577) + 2*hexd1[6]; //0.577=tan(30deg)
255 xb = xb+(xrow-1)*hexd1[6];
257 for (i = 1; i <= ncell_sm; ++i) {
258 number = i+(j-1)*ncell_sm;
259 gMC->Gsposp("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
263 yb += (hexd1[6]*TMath::Sqrt(3.));
267 // Place EHC1 and EAIR into ESMA and ESMB
269 Float_t z_air1,z_air2,z_gas;
271 //ESMA is normal supermodule with base at bottom, with EHC1
272 z_air1= -dpara_sm1[2] + th_base + dpara_air[2];
273 gMC->Gspos("EAIR", 1, "ESMA", 0., 0., z_air1, 0, "ONLY");
274 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2];
275 gMC->Gspos("EHC1", 1, "ESMA", 0., 0., z_gas, 0, "ONLY");
276 z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2];
277 gMC->Gspos("EAIR", 2, "ESMA", 0., 0., z_air2, 0, "ONLY");
279 // ESMB is mirror image of ESMA, with base at top, with EHC1
281 z_air1= -dpara_sm1[2] + th_pcb + dpara_air[2];
282 gMC->Gspos("EAIR", 3, "ESMB", 0., 0., z_air1, 0, "ONLY");
283 z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2];
284 gMC->Gspos("EHC1", 2, "ESMB", 0., 0., z_gas, 0, "ONLY");
285 z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2];
286 gMC->Gspos("EAIR", 4, "ESMB", 0., 0., z_air2, 0, "ONLY");
289 // special supermodule EMM2(GEANT only) containing 6 unit modules
291 // volume for SUPERMODULE
293 Float_t dpara_sm2[6] = {12.5,12.5,0.8,30.,0.,0.};
294 dpara_sm2[0]=(ncell_sm+0.25)*hexd1[6] ;
295 dpara_sm2[1] = (ncell_sm - ncell_hole + 0.25) * root3_2 * hexd1[6];
296 dpara_sm2[2] = sm_thick/2.;
298 gMC->Gsvolu("ESMX","PARA", idtmed[607], dpara_sm2, 6);
299 gMC->Gsatt("ESMX", "SEEN", 0);
301 gMC->Gsvolu("ESMY","PARA", idtmed[607], dpara_sm2, 6);
302 gMC->Gsatt("ESMY", "SEEN", 0);
304 Float_t dpara2[6] = {12.5,12.5,0.4,30.,0.,0.};
305 dpara2[0] = dpara_sm2[0];
306 dpara2[1] = dpara_sm2[1];
307 dpara2[2] = cell_depth/2.;
309 gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6);
310 gMC->Gsatt("EHC2", "SEEN", 1);
313 // Air residing between the PCB and the base
315 Float_t dpara2_air[6] = {12.5,12.5,8.,30.,0.,0.};
316 dpara2_air[0]= dpara_sm2[0];
317 dpara2_air[1]= dpara_sm2[1];
318 dpara2_air[2]= th_air/2.;
320 gMC->Gsvolu("EAIX","PARA", idtmed[698], dpara2_air, 6);
321 gMC->Gsatt("EAIX", "SEEN", 0);
323 // Place hexagonal single cells ECCU inside EHC2
324 // skip cells which go into the hole in top left corner.
327 yb = -dpara2[1] + (1./root3_2)*hexd1[6];
329 for (j = 1; j <= (ncell_sm - ncell_hole); ++j) {
330 xb =-(dpara2[0] + dpara2[1]*0.577) + 2*hexd1[6];
332 xb = xb+(xrow-1)*hexd1[6];
334 for (i = 1; i <= ncell_sm; ++i) {
335 number = i+(j-1)*ncell_sm;
336 gMC->Gsposp("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
340 yb += (hexd1[6]*TMath::Sqrt(3.));
344 // ESMX is normal supermodule with base at bottom, with EHC2
346 z_air1= -dpara_sm2[2] + th_base + dpara2_air[2];
347 gMC->Gspos("EAIX", 1, "ESMX", 0., 0., z_air1, 0, "ONLY");
348 z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2];
349 gMC->Gspos("EHC2", 1, "ESMX", 0., 0., z_gas, 0, "ONLY");
350 z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2];
351 gMC->Gspos("EAIX", 2, "ESMX", 0., 0., z_air2, 0, "ONLY");
353 // ESMY is mirror image of ESMX with base at bottom, with EHC2
355 z_air1= -dpara_sm2[2] + th_pcb + dpara2_air[2];
356 gMC->Gspos("EAIX", 3, "ESMY", 0., 0., z_air1, 0, "ONLY");
357 z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2];
358 gMC->Gspos("EHC2", 2, "ESMY", 0., 0., z_gas, 0, "ONLY");
359 z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2];
360 gMC->Gspos("EAIX", 4, "ESMY", 0., 0., z_air2, 0, "ONLY");
365 // special supermodule EMM3 (GEANT only) containing 2 unit modules
367 // volume for SUPERMODULE
369 Float_t dpara_sm3[6] = {12.5,12.5,0.8,30.,0.,0.};
370 dpara_sm3[0]=(ncell_sm - ncell_hole +0.25)*hexd1[6] ;
371 dpara_sm3[1] = (ncell_hole + 0.25) * hexd1[6] * root3_2;
372 dpara_sm3[2] = sm_thick/2.;
374 gMC->Gsvolu("ESMP","PARA", idtmed[607], dpara_sm3, 6);
375 gMC->Gsatt("ESMP", "SEEN", 0);
377 gMC->Gsvolu("ESMQ","PARA", idtmed[607], dpara_sm3, 6);
378 gMC->Gsatt("ESMQ", "SEEN", 0);
380 Float_t dpara3[6] = {12.5,12.5,0.4,30.,0.,0.};
381 dpara3[0] = dpara_sm3[0];
382 dpara3[1] = dpara_sm3[1];
383 dpara3[2] = cell_depth/2.;
385 gMC->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6);
386 gMC->Gsatt("EHC3", "SEEN", 1);
389 // Air residing between the PCB and the base
391 Float_t dpara3_air[6] = {12.5,12.5,8.,30.,0.,0.};
392 dpara3_air[0]= dpara_sm3[0];
393 dpara3_air[1]= dpara_sm3[1];
394 dpara3_air[2]= th_air/2.;
396 gMC->Gsvolu("EAIP","PARA", idtmed[698], dpara3_air, 6);
397 gMC->Gsatt("EAIP", "SEEN", 0);
400 // Place hexagonal single cells ECCU inside EHC3
401 // skip cells which go into the hole in top left corner.
404 yb = -dpara3[1] + (1./root3_2)*hexd1[6];
406 for (j = 1; j <= ncell_hole; ++j) {
407 xb =-(dpara3[0] + dpara3[1]*0.577) + 2*hexd1[6];
409 xb = xb+(xrow-1)*hexd1[6];
411 for (i = 1; i <= (ncell_sm - ncell_hole); ++i) {
412 number = i+(j-1)*(ncell_sm - ncell_hole);
413 gMC->Gsposp("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
417 yb += (hexd1[6]*TMath::Sqrt(3.));
420 // ESMP is normal supermodule with base at bottom, with EHC3
422 z_air1= -dpara_sm3[2] + th_base + dpara3_air[2];
423 gMC->Gspos("EAIP", 1, "ESMP", 0., 0., z_air1, 0, "ONLY");
424 z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2];
425 gMC->Gspos("EHC3", 1, "ESMP", 0., 0., z_gas, 0, "ONLY");
426 z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2];
427 gMC->Gspos("EAIP", 2, "ESMP", 0., 0., z_air2, 0, "ONLY");
429 // ESMQ is mirror image of ESMP with base at bottom, with EHC3
431 z_air1= -dpara_sm3[2] + th_pcb + dpara3_air[2];
432 gMC->Gspos("EAIP", 3, "ESMQ", 0., 0., z_air1, 0, "ONLY");
433 z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2];
434 gMC->Gspos("EHC3", 2, "ESMQ", 0., 0., z_gas, 0, "ONLY");
435 z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2];
436 gMC->Gspos("EAIP", 4, "ESMQ", 0., 0., z_air2, 0, "ONLY");
440 //_____________________________________________________________________________
442 void AliPMDv1::CreatePMD()
445 // Create final detector from supermodules
447 // -- Author : Y.P. VIYOGI, 07/05/1996.
448 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
449 // -- Modified: For New Geometry YPV, March 2001.
452 const Float_t root3_2 = TMath::Sqrt(3.)/2.;
453 const Float_t pi = 3.14159;
459 Int_t jhrot12,jhrot13, irotdm;
461 Int_t *idtmed = fIdtmed->GetArray()-599;
463 // VOLUMES Names : begining with "E" for all PMD volumes,
464 // The names of SIZE variables begin with S and have more meaningful
465 // characters as shown below.
467 // VOLUME SIZE MEDIUM : REMARKS
468 // ------ ----- ------ : ---------------------------
470 // EPMD GASPMD AIR : INSIDE PMD and its SIZE
472 // *** Define the EPMD Volume and fill with air ***
475 // Gaspmd, the dimension of HEXAGONAL mother volume of PMD,
478 Float_t gaspmd[10] = {0.,360.,6,2,-4.,12.,150.,4.,12.,150.};
480 gaspmd[5] = ncell_hole * cell_radius * 2. * root3_2;
481 gaspmd[8] = gaspmd[5];
483 gMC->Gsvolu("EPMD", "PGON", idtmed[698], gaspmd, 10);
484 gMC->Gsatt("EPMD", "SEEN", 0);
486 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
488 AliMatrix(jhrot12, 90., 120., 90., 210., 0., 0.);
489 AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
492 Float_t dm_thick = 2. * sm_thick + th_lead + th_steel;
494 // dpara_emm1 array contains parameters of the imaginary volume EMM1,
495 // EMM1 is a master module of type 1, which has 24 copies in the PMD.
496 // EMM1 : normal volume as in old cases
499 Float_t dpara_emm1[6] = {12.5,12.5,0.8,30.,0.,0.};
500 dpara_emm1[0] = sm_length/2.;
501 dpara_emm1[1] = dpara_emm1[0] *root3_2;
502 dpara_emm1[2] = dm_thick/2.;
504 gMC->Gsvolu("EMM1","PARA", idtmed[698], dpara_emm1, 6);
505 gMC->Gsatt("EMM1", "SEEN", 1);
508 // --- DEFINE Modules, iron, and lead volumes
510 // Pb Convertor for EMM1
511 Float_t dpara_pb1[6] = {12.5,12.5,8.,30.,0.,0.};
512 dpara_pb1[0] = sm_length/2.;
513 dpara_pb1[1] = dpara_pb1[0] * root3_2;
514 dpara_pb1[2] = th_lead/2.;
516 gMC->Gsvolu("EPB1","PARA", idtmed[600], dpara_pb1, 6);
517 gMC->Gsatt ("EPB1", "SEEN", 0);
519 // Fe Support for EMM1
520 Float_t dpara_fe1[6] = {12.5,12.5,8.,30.,0.,0.};
521 dpara_fe1[0] = dpara_pb1[0];
522 dpara_fe1[1] = dpara_pb1[1];
523 dpara_fe1[2] = th_steel/2.;
525 gMC->Gsvolu("EFE1","PARA", idtmed[618], dpara_fe1, 6);
526 gMC->Gsatt ("EFE1", "SEEN", 0);
531 // position supermodule ESMA, ESMB, EPB1, EFE1 inside EMM1
533 Float_t z_ps,z_pb,z_fe,z_cv;
535 z_ps = - dpara_emm1[2] + sm_thick/2.;
536 gMC->Gspos("ESMB", 1, "EMM1", 0., 0., z_ps, 0, "ONLY");
537 z_pb=z_ps+sm_thick/2.+dpara_pb1[2];
538 gMC->Gspos("EPB1", 1, "EMM1", 0., 0., z_pb, 0, "ONLY");
539 z_fe=z_pb+dpara_pb1[2]+dpara_fe1[2];
540 gMC->Gspos("EFE1", 1, "EMM1", 0., 0., z_fe, 0, "ONLY");
541 z_cv=z_fe+dpara_fe1[2]+sm_thick/2.;
542 gMC->Gspos("ESMA", 1, "EMM1", 0., 0., z_cv, 0, "ONLY");
546 // EMM2 : special master module having full row of cells but the number
547 // of rows limited by hole.
549 Float_t dpara_emm2[6] = {12.5,12.5,0.8,30.,0.,0.};
550 dpara_emm2[0] = sm_length/2.;
551 dpara_emm2[1] = (ncell_sm - ncell_hole + 0.25) * cell_radius * root3_2;
552 dpara_emm2[2] = dm_thick/2.;
554 gMC->Gsvolu("EMM2","PARA", idtmed[698], dpara_emm2, 6);
555 gMC->Gsatt("EMM2", "SEEN", 1);
558 // Pb Convertor for EMM2
559 Float_t dpara_pb2[6] = {12.5,12.5,8.,30.,0.,0.};
560 dpara_pb2[0] = dpara_emm2[0];
561 dpara_pb2[1] = dpara_emm2[1];
562 dpara_pb2[2] = th_lead/2.;
564 gMC->Gsvolu("EPB2","PARA", idtmed[600], dpara_pb2, 6);
565 gMC->Gsatt ("EPB2", "SEEN", 0);
567 // Fe Support for EMM2
568 Float_t dpara_fe2[6] = {12.5,12.5,8.,30.,0.,0.};
569 dpara_fe2[0] = dpara_pb2[0];
570 dpara_fe2[1] = dpara_pb2[1];
571 dpara_fe2[2] = th_steel/2.;
573 gMC->Gsvolu("EFE2","PARA", idtmed[618], dpara_fe2, 6);
574 gMC->Gsatt ("EFE2", "SEEN", 0);
578 // position supermodule ESMX, ESMY inside EMM2
580 z_ps = - dpara_emm2[2] + sm_thick/2.;
581 gMC->Gspos("ESMY", 1, "EMM2", 0., 0., z_ps, 0, "ONLY");
582 z_pb = z_ps + sm_thick/2.+dpara_pb2[2];
583 gMC->Gspos("EPB2", 1, "EMM2", 0., 0., z_pb, 0, "ONLY");
584 z_fe = z_pb + dpara_pb2[2]+dpara_fe2[2];
585 gMC->Gspos("EFE2", 1, "EMM2", 0., 0., z_fe, 0, "ONLY");
586 z_cv = z_fe + dpara_fe2[2]+sm_thick/2.;
587 gMC->Gspos("ESMX", 1, "EMM2", 0., 0., z_cv, 0, "ONLY");
591 // EMM3 : special master module having truncated rows and columns of cells
594 Float_t dpara_emm3[6] = {12.5,12.5,0.8,30.,0.,0.};
595 dpara_emm3[0] = dpara_emm2[1]/root3_2;
596 dpara_emm3[1] = (ncell_hole + 0.25) * cell_radius *root3_2;
597 dpara_emm3[2] = dm_thick/2.;
599 gMC->Gsvolu("EMM3","PARA", idtmed[698], dpara_emm3, 6);
600 gMC->Gsatt("EMM3", "SEEN", 1);
603 // Pb Convertor for EMM3
604 Float_t dpara_pb3[6] = {12.5,12.5,8.,30.,0.,0.};
605 dpara_pb3[0] = dpara_emm3[0];
606 dpara_pb3[1] = dpara_emm3[1];
607 dpara_pb3[2] = th_lead/2.;
609 gMC->Gsvolu("EPB3","PARA", idtmed[600], dpara_pb3, 6);
610 gMC->Gsatt ("EPB3", "SEEN", 0);
612 // Fe Support for EMM3
613 Float_t dpara_fe3[6] = {12.5,12.5,8.,30.,0.,0.};
614 dpara_fe3[0] = dpara_pb3[0];
615 dpara_fe3[1] = dpara_pb3[1];
616 dpara_fe3[2] = th_steel/2.;
618 gMC->Gsvolu("EFE3","PARA", idtmed[618], dpara_fe3, 6);
619 gMC->Gsatt ("EFE3", "SEEN", 0);
623 // position supermodule ESMP, ESMQ inside EMM3
625 z_ps = - dpara_emm3[2] + sm_thick/2.;
626 gMC->Gspos("ESMQ", 1, "EMM3", 0., 0., z_ps, 0, "ONLY");
627 z_pb = z_ps + sm_thick/2.+dpara_pb3[2];
628 gMC->Gspos("EPB3", 1, "EMM3", 0., 0., z_pb, 0, "ONLY");
629 z_fe = z_pb + dpara_pb3[2]+dpara_fe3[2];
630 gMC->Gspos("EFE3", 1, "EMM3", 0., 0., z_fe, 0, "ONLY");
631 z_cv = z_fe + dpara_fe3[2] + sm_thick/2.;
632 gMC->Gspos("ESMP", 1, "EMM3", 0., 0., z_cv, 0, "ONLY");
635 // EHOL is a tube structure made of air
639 //d_hole[1] = ncell_hole * cell_radius *2. * root3_2 + boundary;
640 //d_hole[2] = dm_thick/2.;
642 //gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3);
643 //gMC->Gsatt("EHOL", "SEEN", 1);
645 //Al-rod as boundary of the supermodules
648 Al_rod[0] = sm_length * 3/2. - gaspmd[5]/2 - boundary ;
649 Al_rod[1] = boundary;
650 Al_rod[2] = dm_thick/2.;
652 gMC->Gsvolu("EALM","BOX ", idtmed[698], Al_rod, 3);
653 gMC->Gsatt ("EALM", "SEEN", 1);
655 xalm[0]=Al_rod[0] + gaspmd[5] + 3.0*boundary;
661 yalm[1]=xalm[0]*root3_2;
664 // delx = full side of the supermodule
665 Float_t delx=sm_length * 3.;
666 Float_t x1= delx*root3_2 /2.;
670 // placing master modules and Al-rod in PMD
672 Float_t dx = sm_length;
673 Float_t dy = dx * root3_2;
675 Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2.,
677 -3.*dx/2., -dx/2., dx/2.};
679 Float_t ysup[9] = {dy, dy, dy,
683 // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes
685 Float_t xoff = boundary * TMath::Tan(pi/6.);
686 Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-boundary/root3_2};
687 Float_t ymod[3] = {-x1 - boundary, x1 + boundary, 0.};
688 Float_t xpos[9], ypos[9], x2, y2, x3, y3;
690 Float_t xemm2 = sm_length/2. -
691 (ncell_sm + ncell_hole + 0.25) * cell_radius * 0.5
693 Float_t yemm2 = -(ncell_sm + ncell_hole + 0.25) * cell_radius * root3_2
696 Float_t xemm3 = (ncell_sm + 0.5 * ncell_hole + 0.25) * cell_radius + xoff;
697 Float_t yemm3 = - (ncell_hole - 0.25) * cell_radius * root3_2 - boundary;
699 Float_t theta[3] = {0., 2.*pi/3., 4.*pi/3.};
700 Int_t irotate[3] = {0, jhrot12, jhrot13};
705 gMC->Gsposp("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY", Al_rod, 3);
706 x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
707 y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
709 gMC->Gsposp("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY", dpara_emm2, 6);
711 x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
712 y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
714 gMC->Gsposp("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY", dpara_emm3, 6);
718 xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - ysup[i]*TMath::Sin(theta[j]);
719 ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) + ysup[i]*TMath::Cos(theta[j]);
721 printf("%f %f \n", xpos[i], ypos[i]);
725 printf("\nNum_mod %d\n",num_mod);
727 gMC->Gsposp("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY", dpara_emm1, 6);
733 // place EHOL in the centre of EPMD
734 // gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY");
736 // --- Place the EPMD in ALICE
741 gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY");
746 //_____________________________________________________________________________
747 void AliPMDv1::DrawModule()
750 // Draw a shaded view of the Photon Multiplicity Detector
753 gMC->Gsatt("*", "seen", -1);
754 gMC->Gsatt("alic", "seen", 0);
756 // Set the visibility of the components
758 gMC->Gsatt("ECAR","seen",0);
759 gMC->Gsatt("ECCU","seen",1);
760 gMC->Gsatt("EHC1","seen",1);
761 gMC->Gsatt("EHC1","seen",1);
762 gMC->Gsatt("EHC2","seen",1);
763 gMC->Gsatt("EMM1","seen",1);
764 gMC->Gsatt("EHOL","seen",1);
765 gMC->Gsatt("EPMD","seen",0);
767 gMC->Gdopt("hide", "on");
768 gMC->Gdopt("shad", "on");
769 gMC->Gsatt("*", "fill", 7);
770 gMC->SetClipBox(".");
771 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
773 gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02);
774 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
776 //gMC->Gdman(17, 5, "MAN");
777 gMC->Gdopt("hide", "off");
780 //_____________________________________________________________________________
781 void AliPMDv1::CreateMaterials()
784 // Create materials for the PMD
786 // ORIGIN : Y. P. VIYOGI
789 // --- The Argon- CO2 mixture ---
790 Float_t ag[2] = { 39.95 };
791 Float_t zg[2] = { 18. };
792 Float_t wg[2] = { .8,.2 };
793 Float_t dar = .001782; // --- Ar density in g/cm3 ---
795 Float_t ac[2] = { 12.,16. };
796 Float_t zc[2] = { 6.,8. };
797 Float_t wc[2] = { 1.,2. };
798 Float_t dc = .001977;
799 Float_t dco = .002; // --- CO2 density in g/cm3 ---
801 Float_t absl, radl, a, d, z;
805 //Float_t dxe=0.005858;
808 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
809 Float_t zsteel[4] = { 26.,24.,28.,14. };
810 Float_t wsteel[4] = { .715,.18,.1,.005 };
812 Int_t *idtmed = fIdtmed->GetArray()-599;
813 Int_t isxfld = gAlice->Field()->Integ();
814 Float_t sxmgmx = gAlice->Field()->Max();
816 // --- Define the various materials for GEANT ---
817 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
819 AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4);
820 AliMixture(3, "CO2 $", ac, zc, dc, -2, wc);
821 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
822 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
823 AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3);
824 AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.);
825 AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.);
826 AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7);
827 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
828 AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9);
829 AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.);
830 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
831 // AliMaterial(31, "Xenon$", 131.3, 54., dxe, x0xe, 6.5e4);
833 AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.);
834 AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.);
835 AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16);
836 AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.);
838 // define gas-mixtures
841 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
844 dg = (dar * 4 + dco) / 5;
845 AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg);
847 // Define tracking media
848 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
849 AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
850 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
851 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
852 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
853 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
854 AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
855 AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
856 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10);
857 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1);
858 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
859 AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
860 AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
861 AliMedium(19, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
862 // AliMedium(31, "Xenon $", 31, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
864 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
865 gMC->Gstpar(idtmed[600], "LOSS", 3.);
866 gMC->Gstpar(idtmed[600], "DRAY", 1.);
868 gMC->Gstpar(idtmed[603], "LOSS", 3.);
869 gMC->Gstpar(idtmed[603], "DRAY", 1.);
871 gMC->Gstpar(idtmed[604], "LOSS", 3.);
872 gMC->Gstpar(idtmed[604], "DRAY", 1.);
874 gMC->Gstpar(idtmed[605], "LOSS", 3.);
875 gMC->Gstpar(idtmed[605], "DRAY", 1.);
877 gMC->Gstpar(idtmed[606], "LOSS", 3.);
878 gMC->Gstpar(idtmed[606], "DRAY", 1.);
880 gMC->Gstpar(idtmed[607], "LOSS", 3.);
881 gMC->Gstpar(idtmed[607], "DRAY", 1.);
883 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
884 // --- without affecting the hit patterns ---
885 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
886 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
887 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
888 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
889 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
890 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
891 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
892 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
893 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
894 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
895 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
896 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
897 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
898 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
899 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
900 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
901 gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
902 gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
903 gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
904 gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
906 // --- Prevent particles stopping in the gas due to energy cut-off ---
907 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
908 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
909 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
910 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
911 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
914 //_____________________________________________________________________________
915 void AliPMDv1::Init()
918 // Initialises PMD detector after it has been built
924 for(i=0;i<35;i++) printf("*");
925 printf(" PMD_INIT ");
926 for(i=0;i<35;i++) printf("*");
928 printf(" PMD simulation package (v1) initialised\n");
929 printf(" parameters of pmd\n");
930 printf("%10.2f %10.2f %10.2f %10.2f\n", cell_radius,cell_wall,cell_depth,zdist1 );
932 for(i=0;i<80;i++) printf("*");
935 Int_t *idtmed = fIdtmed->GetArray()-599;
936 fMedSens=idtmed[605-1];
939 //_____________________________________________________________________________
940 void AliPMDv1::StepManager()
943 // Called at each step in the PMD
946 Float_t hits[4], destep;
947 Float_t center[3] = {0,0,0};
951 if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
953 gMC->CurrentVolID(copy);
955 //namep=gMC->CurrentVolName();
956 //printf("Current vol is %s \n",namep);
959 gMC->CurrentVolOffID(1,copy);
961 //namep=gMC->CurrentVolOffName(1);
962 //printf("Current vol 11 is %s \n",namep);
965 gMC->CurrentVolOffID(2,copy);
967 //namep=gMC->CurrentVolOffName(2);
968 //printf("Current vol 22 is %s \n",namep);
972 // if(strncmp(namep,"EHC1",4))vol[2]=1;
974 gMC->CurrentVolOffID(3,copy);
976 //namep=gMC->CurrentVolOffName(3);
977 //printf("Current vol 33 is %s \n",namep);
980 gMC->CurrentVolOffID(4,copy);
982 //namep=gMC->CurrentVolOffName(4);
983 //printf("Current vol 44 is %s \n",namep);
986 //printf("volume number %d,%d,%d,%d,%d,%f \n",vol[0],vol[1],vol[2],vol[3],vol[4],destep*1000000);
988 gMC->Gdtom(center,hits,1);
989 hits[3] = destep*1e9; //Number in eV
990 AddHit(gAlice->CurrentTrack(), vol, hits);
995 //------------------------------------------------------------------------
998 void AliPMDv1::GetParameters()
1000 Int_t ncell_um, num_um;
1006 cell_depth=0.25 * 2.;
1009 ncell_sm=ncell_um * num_um; //no. of cells in a row in one supermodule
1010 sm_length= ((ncell_sm + 0.25 ) * cell_radius) * 2.;
1016 sm_thick = th_base + th_air + th_pcb + cell_depth + th_pcb + th_air + th_pcb;