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/AliPMDv0Class.gif">
29 ///////////////////////////////////////////////////////////////////////////////
32 #include <Riostream.h>
33 #include <TGeoManager.h>
34 #include <TGeoGlobalMagField.h>
35 #include <TVirtualMC.h>
44 const Int_t AliPMDv0::fgkNcellHole = 24; // Hole dimension
45 const Float_t AliPMDv0::fgkCellRadius = 0.25; // Radius of a hexagonal cell
46 const Float_t AliPMDv0::fgkCellWall = 0.02; // Thickness of cell Wall
47 const Float_t AliPMDv0::fgkCellDepth = 0.50; // Gas thickness
48 const Float_t AliPMDv0::fgkBoundary = 0.7; // Thickness of Boundary wall
49 const Float_t AliPMDv0::fgkThBase = 0.3; // Thickness of Base plate
50 const Float_t AliPMDv0::fgkThAir = 0.1; // Thickness of Air
51 const Float_t AliPMDv0::fgkThPCB = 0.16; // Thickness of PCB
52 const Float_t AliPMDv0::fgkThLead = 1.5; // Thickness of Pb
53 const Float_t AliPMDv0::fgkThSteel = 0.5; // Thickness of Steel
54 const Float_t AliPMDv0::fgkZdist = 361.5; // z-position of the detector
55 const Float_t AliPMDv0::fgkSqroot3 = 1.7320508;// Square Root of 3
56 const Float_t AliPMDv0::fgkSqroot3by2 = 0.8660254;// Square Root of 3 by 2
57 const Float_t AliPMDv0::fgkPi = 3.14159; // pi
61 //_____________________________________________________________________________
69 // Default constructor
73 //_____________________________________________________________________________
74 AliPMDv0::AliPMDv0(const char *name, const char *title):
82 // Standard constructor
86 //_____________________________________________________________________________
87 void AliPMDv0::CreateGeometry()
90 // Create geometry for Photon Multiplicity Detector Version 3 :
95 <img src="picts/AliPMDv0.gif">
100 <img src="picts/AliPMDv0Tree.gif">
108 //_____________________________________________________________________________
109 void AliPMDv0::CreateSupermodule()
112 // Creates the geometry of the cells, places them in supermodule which
113 // is a rhombus object.
115 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
116 // *** HEXAGONAL CELLS WITH CELL RADIUS 0.25 cm (see "GetParameters")
117 // -- Author : S. Chattopadhyay, 02/04/1999.
119 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is placed inside another
120 // hexagonal cell made of Cu (ECCU) with larger radius, compared to ECAR. The difference
121 // in radius gives the dimension of half width of each cell wall.
122 // These cells are placed as 72 x 72 array in a
123 // rhombus shaped supermodule (EHC1). The rhombus shaped modules are designed
124 // to have closed packed structure.
126 // Each supermodule (ESMA, ESMB), made of G10 is filled with following components
127 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
128 // EHC1 --> Rhombus shaped parallelopiped containing the hexagonal cells
129 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
131 // ESMA, ESMB are placed in EMM1 along with EMPB (Pb converter)
132 // and EMFE (iron support)
135 // ESMB --> Normal supermodule, mirror image of ESMA
136 // EMPB --> Pb converter
137 // EMFE --> Fe backing
138 // ESMA --> Normal supermodule
140 // ESMX, ESMY are placed in EMM2 along with EMPB (Pb converter)
141 // and EMFE (iron support)
144 // ESMY --> Special supermodule, mirror image of ESMX,
145 // EMPB --> Pb converter
146 // EMFE --> Fe backing
147 // ESMX --> First of the two Special supermodules near the hole
150 // ESMQ --> Special supermodule, mirror image of ESMX,
151 // EMPB --> Pb converter
152 // EMFE --> Fe backing
153 // ESMP --> Second of the two Special supermodules near the hole
155 // EMM2 and EMM3 are used to create the hexagonal HOLE
161 // ---------------------------------------------------------------------------
163 // EHOL EMM1 EMM2 EMM3 EALM
165 // -------------------- -------------------- --------------------
166 // | | | | | | | | | | | |
167 // ESMB EMPB EMFE ESMA ESMY EMPB EMFE ESMX ESMQ EMPB EMFE ESMP
169 // ------------ ------------ -------------
171 // EAIR EHC1 EAIR EAIR EHC2 EAIR EAIR EHC3 EAIR
182 Int_t *idtmed = fIdtmed->GetArray()-599;
184 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
185 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
187 //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu
188 // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension
189 //(1mm tolerance on both side and 5mm thick G10 wall)
191 // **** 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]= -fgkCellDepth/2.;
197 hexd2[7]= fgkCellDepth/2.;
198 hexd2[6]= fgkCellRadius - fgkCellWall;
199 hexd2[9]= fgkCellRadius - fgkCellWall;
201 // Gas replaced by vacuum for v0(insensitive) version of PMD.
203 gMC->Gsvolu("ECAR", "PGON", idtmed[697], hexd2,10);
204 gGeoManager->SetVolumeAttribute("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};
210 hexd1[4]= -fgkCellDepth/2.;
211 hexd1[7]= fgkCellDepth/2.;
212 hexd1[6]= fgkCellRadius;
213 hexd1[9]= fgkCellRadius;
215 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
216 gGeoManager->SetVolumeAttribute("ECCU", "SEEN", 1);
218 // --- place inner hex inside outer hex
220 gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
222 // Rhombus shaped supermodules (defined by PARA)
224 // volume for SUPERMODULE
226 Float_t dparasm1[6] = {12.5,12.5,0.8,30.,0.,0.};
227 dparasm1[0] = (fNcellSM+0.25)*hexd1[6] ;
228 dparasm1[1] = dparasm1[0] *fgkSqroot3by2;
229 dparasm1[2] = fSMthick/2.;
232 gMC->Gsvolu("ESMA","PARA", idtmed[607], dparasm1, 6);
233 gGeoManager->SetVolumeAttribute("ESMA", "SEEN", 0);
235 gMC->Gsvolu("ESMB","PARA", idtmed[607], dparasm1, 6);
236 gGeoManager->SetVolumeAttribute("ESMB", "SEEN", 0);
238 // Air residing between the PCB and the base
240 Float_t dparaair[6] = {12.5,12.5,8.,30.,0.,0.};
241 dparaair[0]= dparasm1[0];
242 dparaair[1]= dparasm1[1];
243 dparaair[2]= fgkThAir/2.;
245 gMC->Gsvolu("EAIR","PARA", idtmed[698], dparaair, 6);
246 gGeoManager->SetVolumeAttribute("EAIR", "SEEN", 0);
248 // volume for honeycomb chamber EHC1
250 Float_t dpara1[6] = {12.5,12.5,0.4,30.,0.,0.};
251 dpara1[0] = dparasm1[0];
252 dpara1[1] = dparasm1[1];
253 dpara1[2] = fgkCellDepth/2.;
255 gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6);
256 gGeoManager->SetVolumeAttribute("EHC1", "SEEN", 1);
258 // Place hexagonal cells ECCU cells inside EHC1 (72 X 72)
262 yb = -dpara1[1] + (1./fgkSqroot3by2)*hexd1[6];
265 for (j = 1; j <= fNcellSM; ++j) {
266 xb =-(dpara1[0] + dpara1[1]*0.577) + 2*hexd1[6]; //0.577=tan(30deg)
268 xb = xb+(xrow-1)*hexd1[6];
270 for (i = 1; i <= fNcellSM; ++i) {
271 number = i+(j-1)*fNcellSM;
272 gMC->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY");
276 yb += (hexd1[6]*fgkSqroot3);
280 // Place EHC1 and EAIR into ESMA and ESMB
282 Float_t zAir1,zAir2,zGas;
284 //ESMA is normal supermodule with base at bottom, with EHC1
285 zAir1= -dparasm1[2] + fgkThBase + dparaair[2];
286 gMC->Gspos("EAIR", 1, "ESMA", 0., 0., zAir1, 0, "ONLY");
287 zGas=zAir1+dparaair[2]+ fgkThPCB + dpara1[2];
288 //Line below Commented for version 0 of PMD routine
289 // gMC->Gspos("EHC1", 1, "ESMA", 0., 0., zGas, 0, "ONLY");
290 zAir2=zGas+dpara1[2]+ fgkThPCB + dparaair[2];
291 gMC->Gspos("EAIR", 2, "ESMA", 0., 0., zAir2, 0, "ONLY");
293 // ESMB is mirror image of ESMA, with base at top, with EHC1
295 zAir1= -dparasm1[2] + fgkThPCB + dparaair[2];
296 gMC->Gspos("EAIR", 3, "ESMB", 0., 0., zAir1, 0, "ONLY");
297 zGas=zAir1+dparaair[2]+ fgkThPCB + dpara1[2];
298 //Line below Commented for version 0 of PMD routine
299 // gMC->Gspos("EHC1", 2, "ESMB", 0., 0., zGas, 0, "ONLY");
300 zAir2=zGas+dpara1[2]+ fgkThPCB + dparaair[2];
301 gMC->Gspos("EAIR", 4, "ESMB", 0., 0., zAir2, 0, "ONLY");
304 // special supermodule EMM2(GEANT only) containing 6 unit modules
305 // volume for SUPERMODULE
307 Float_t dparasm2[6] = {12.5,12.5,0.8,30.,0.,0.};
308 dparasm2[0]=(fNcellSM+0.25)*hexd1[6] ;
309 dparasm2[1] = (fNcellSM - fgkNcellHole + 0.25) * fgkSqroot3by2 * hexd1[6];
310 dparasm2[2] = fSMthick/2.;
312 gMC->Gsvolu("ESMX","PARA", idtmed[607], dparasm2, 6);
313 gGeoManager->SetVolumeAttribute("ESMX", "SEEN", 0);
315 gMC->Gsvolu("ESMY","PARA", idtmed[607], dparasm2, 6);
316 gGeoManager->SetVolumeAttribute("ESMY", "SEEN", 0);
318 Float_t dpara2[6] = {12.5,12.5,0.4,30.,0.,0.};
319 dpara2[0] = dparasm2[0];
320 dpara2[1] = dparasm2[1];
321 dpara2[2] = fgkCellDepth/2.;
323 gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6);
324 gGeoManager->SetVolumeAttribute("EHC2", "SEEN", 1);
327 // Air residing between the PCB and the base
329 Float_t dpara2Air[6] = {12.5,12.5,8.,30.,0.,0.};
330 dpara2Air[0]= dparasm2[0];
331 dpara2Air[1]= dparasm2[1];
332 dpara2Air[2]= fgkThAir/2.;
334 gMC->Gsvolu("EAIX","PARA", idtmed[698], dpara2Air, 6);
335 gGeoManager->SetVolumeAttribute("EAIX", "SEEN", 0);
337 // Place hexagonal single cells ECCU inside EHC2
338 // skip cells which go into the hole in top left corner.
341 yb = -dpara2[1] + (1./fgkSqroot3by2)*hexd1[6];
343 for (j = 1; j <= (fNcellSM - fgkNcellHole); ++j) {
344 xb =-(dpara2[0] + dpara2[1]*0.577) + 2*hexd1[6];
346 xb = xb+(xrow-1)*hexd1[6];
348 for (i = 1; i <= fNcellSM; ++i) {
349 number = i+(j-1)*fNcellSM;
350 gMC->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY");
354 yb += (hexd1[6]*fgkSqroot3);
358 // ESMX is normal supermodule with base at bottom, with EHC2
360 zAir1= -dparasm2[2] + fgkThBase + dpara2Air[2];
361 gMC->Gspos("EAIX", 1, "ESMX", 0., 0., zAir1, 0, "ONLY");
362 zGas=zAir1+dpara2Air[2]+ fgkThPCB + dpara2[2];
363 //Line below Commented for version 0 of PMD routine
364 // gMC->Gspos("EHC2", 1, "ESMX", 0., 0., zGas, 0, "ONLY");
365 zAir2=zGas+dpara2[2]+ fgkThPCB + dpara2Air[2];
366 gMC->Gspos("EAIX", 2, "ESMX", 0., 0., zAir2, 0, "ONLY");
368 // ESMY is mirror image of ESMX with base at bottom, with EHC2
370 zAir1= -dparasm2[2] + fgkThPCB + dpara2Air[2];
371 gMC->Gspos("EAIX", 3, "ESMY", 0., 0., zAir1, 0, "ONLY");
372 zGas=zAir1+dpara2Air[2]+ fgkThPCB + dpara2[2];
373 //Line below Commented for version 0 of PMD routine
374 // gMC->Gspos("EHC2", 2, "ESMY", 0., 0., zGas, 0, "ONLY");
375 zAir2=zGas+dpara2[2]+ fgkThPCB + dpara2Air[2];
376 gMC->Gspos("EAIX", 4, "ESMY", 0., 0., zAir2, 0, "ONLY");
379 // special supermodule EMM3 (GEANT only) containing 2 unit modules
380 // volume for SUPERMODULE
382 Float_t dparaSM3[6] = {12.5,12.5,0.8,30.,0.,0.};
383 dparaSM3[0]=(fNcellSM - fgkNcellHole +0.25)*hexd1[6] ;
384 dparaSM3[1] = (fgkNcellHole + 0.25) * hexd1[6] * fgkSqroot3by2;
385 dparaSM3[2] = fSMthick/2.;
387 gMC->Gsvolu("ESMP","PARA", idtmed[607], dparaSM3, 6);
388 gGeoManager->SetVolumeAttribute("ESMP", "SEEN", 0);
390 gMC->Gsvolu("ESMQ","PARA", idtmed[607], dparaSM3, 6);
391 gGeoManager->SetVolumeAttribute("ESMQ", "SEEN", 0);
393 Float_t dpara3[6] = {12.5,12.5,0.4,30.,0.,0.};
394 dpara3[0] = dparaSM3[0];
395 dpara3[1] = dparaSM3[1];
396 dpara3[2] = fgkCellDepth/2.;
398 gMC->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6);
399 gGeoManager->SetVolumeAttribute("EHC3", "SEEN", 1);
401 // Air residing between the PCB and the base
403 Float_t dpara3Air[6] = {12.5,12.5,8.,30.,0.,0.};
404 dpara3Air[0]= dparaSM3[0];
405 dpara3Air[1]= dparaSM3[1];
406 dpara3Air[2]= fgkThAir/2.;
408 gMC->Gsvolu("EAIP","PARA", idtmed[698], dpara3Air, 6);
409 gGeoManager->SetVolumeAttribute("EAIP", "SEEN", 0);
412 // Place hexagonal single cells ECCU inside EHC3
413 // skip cells which go into the hole in top left corner.
416 yb = -dpara3[1] + (1./fgkSqroot3by2)*hexd1[6];
418 for (j = 1; j <= fgkNcellHole; ++j) {
419 xb =-(dpara3[0] + dpara3[1]*0.577) + 2*hexd1[6];
421 xb = xb+(xrow-1)*hexd1[6];
423 for (i = 1; i <= (fNcellSM - fgkNcellHole); ++i) {
424 number = i+(j-1)*(fNcellSM - fgkNcellHole);
425 gMC->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY");
429 yb += (hexd1[6]*fgkSqroot3);
432 // ESMP is normal supermodule with base at bottom, with EHC3
434 zAir1= -dparaSM3[2] + fgkThBase + dpara3Air[2];
435 gMC->Gspos("EAIP", 1, "ESMP", 0., 0., zAir1, 0, "ONLY");
436 zGas=zAir1+dpara3Air[2]+ fgkThPCB + dpara3[2];
437 //Line below Commented for version 0 of PMD routine
438 // gMC->Gspos("EHC3", 1, "ESMP", 0., 0., zGas, 0, "ONLY");
439 zAir2=zGas+dpara3[2]+ fgkThPCB + dpara3Air[2];
440 gMC->Gspos("EAIP", 2, "ESMP", 0., 0., zAir2, 0, "ONLY");
442 // ESMQ is mirror image of ESMP with base at bottom, with EHC3
444 zAir1= -dparaSM3[2] + fgkThPCB + dpara3Air[2];
445 gMC->Gspos("EAIP", 3, "ESMQ", 0., 0., zAir1, 0, "ONLY");
446 zGas=zAir1+dpara3Air[2]+ fgkThPCB + dpara3[2];
447 //Line below Commented for version 0 of PMD routine
448 // gMC->Gspos("EHC3", 2, "ESMQ", 0., 0., zGas, 0, "ONLY");
449 zAir2=zGas+dpara3[2]+ fgkThPCB + dpara3Air[2];
450 gMC->Gspos("EAIP", 4, "ESMQ", 0., 0., zAir2, 0, "ONLY");
454 //_____________________________________________________________________________
456 void AliPMDv0::CreatePMD()
459 // Create final detector from supermodules
461 // -- Author : Y.P. VIYOGI, 07/05/1996.
462 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
463 // -- Modified: For New Geometry YPV, March 2001.
468 Int_t jhrot12,jhrot13, irotdm;
469 Int_t *idtmed = fIdtmed->GetArray()-599;
471 // VOLUMES Names : begining with "E" for all PMD volumes,
472 // The names of SIZE variables begin with S and have more meaningful
473 // characters as shown below.
474 // VOLUME SIZE MEDIUM : REMARKS
475 // ------ ----- ------ : ---------------------------
476 // EPMD GASPMD AIR : INSIDE PMD and its SIZE
477 // *** Define the EPMD Volume and fill with air ***
478 // Gaspmd, the dimension of HEXAGONAL mother volume of PMD,
481 Float_t gaspmd[10] = {0.,360.,6,2,-4.,12.,150.,4.,12.,150.};
483 gaspmd[5] = fgkNcellHole * fgkCellRadius * 2. * fgkSqroot3by2;
484 gaspmd[8] = gaspmd[5];
486 gMC->Gsvolu("EPMD", "PGON", idtmed[698], gaspmd, 10);
487 gGeoManager->SetVolumeAttribute("EPMD", "SEEN", 0);
489 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
491 AliMatrix(jhrot12, 90., 120., 90., 210., 0., 0.);
492 AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
495 Float_t dmthick = 2. * fSMthick + fgkThLead + fgkThSteel;
497 // dparaemm1 array contains parameters of the imaginary volume EMM1,
498 // EMM1 is a master module of type 1, which has 24 copies in the PMD.
499 // EMM1 : normal volume as in old cases
502 Float_t dparaemm1[6] = {12.5,12.5,0.8,30.,0.,0.};
503 dparaemm1[0] = fSMLength/2.;
504 dparaemm1[1] = dparaemm1[0] *fgkSqroot3by2;
505 dparaemm1[2] = dmthick/2.;
507 gMC->Gsvolu("EMM1","PARA", idtmed[698], dparaemm1, 6);
508 gGeoManager->SetVolumeAttribute("EMM1", "SEEN", 1);
511 // --- DEFINE Modules, iron, and lead volumes
512 // Pb Convertor for EMM1
514 Float_t dparapb1[6] = {12.5,12.5,8.,30.,0.,0.};
515 dparapb1[0] = fSMLength/2.;
516 dparapb1[1] = dparapb1[0] * fgkSqroot3by2;
517 dparapb1[2] = fgkThLead/2.;
519 gMC->Gsvolu("EPB1","PARA", idtmed[600], dparapb1, 6);
520 gGeoManager->SetVolumeAttribute ("EPB1", "SEEN", 0);
522 // Fe Support for EMM1
523 Float_t dparafe1[6] = {12.5,12.5,8.,30.,0.,0.};
524 dparafe1[0] = dparapb1[0];
525 dparafe1[1] = dparapb1[1];
526 dparafe1[2] = fgkThSteel/2.;
528 gMC->Gsvolu("EFE1","PARA", idtmed[618], dparafe1, 6);
529 gGeoManager->SetVolumeAttribute ("EFE1", "SEEN", 0);
532 // position supermodule ESMA, ESMB, EPB1, EFE1 inside EMM1
534 Float_t zps,zpb,zfe,zcv;
536 zps = -dparaemm1[2] + fSMthick/2.;
537 gMC->Gspos("ESMB", 1, "EMM1", 0., 0., zps, 0, "ONLY");
538 zpb = zps+fSMthick/2.+dparapb1[2];
539 gMC->Gspos("EPB1", 1, "EMM1", 0., 0., zpb, 0, "ONLY");
540 zfe = zpb+dparapb1[2]+dparafe1[2];
541 gMC->Gspos("EFE1", 1, "EMM1", 0., 0., zfe, 0, "ONLY");
542 zcv = zfe+dparafe1[2]+fSMthick/2.;
543 gMC->Gspos("ESMA", 1, "EMM1", 0., 0., zcv, 0, "ONLY");
545 // EMM2 : special master module having full row of cells but the number
546 // of rows limited by hole.
548 Float_t dparaemm2[6] = {12.5,12.5,0.8,30.,0.,0.};
549 dparaemm2[0] = fSMLength/2.;
550 dparaemm2[1] = (fNcellSM - fgkNcellHole + 0.25)*fgkCellRadius*fgkSqroot3by2;
551 dparaemm2[2] = dmthick/2.;
553 gMC->Gsvolu("EMM2","PARA", idtmed[698], dparaemm2, 6);
554 gGeoManager->SetVolumeAttribute("EMM2", "SEEN", 1);
556 // Pb Convertor for EMM2
557 Float_t dparapb2[6] = {12.5,12.5,8.,30.,0.,0.};
558 dparapb2[0] = dparaemm2[0];
559 dparapb2[1] = dparaemm2[1];
560 dparapb2[2] = fgkThLead/2.;
562 gMC->Gsvolu("EPB2","PARA", idtmed[600], dparapb2, 6);
563 gGeoManager->SetVolumeAttribute ("EPB2", "SEEN", 0);
565 // Fe Support for EMM2
566 Float_t dparafe2[6] = {12.5,12.5,8.,30.,0.,0.};
567 dparafe2[0] = dparapb2[0];
568 dparafe2[1] = dparapb2[1];
569 dparafe2[2] = fgkThSteel/2.;
571 gMC->Gsvolu("EFE2","PARA", idtmed[618], dparafe2, 6);
572 gGeoManager->SetVolumeAttribute ("EFE2", "SEEN", 0);
574 // position supermodule ESMX, ESMY inside EMM2
576 zps = -dparaemm2[2] + fSMthick/2.;
577 gMC->Gspos("ESMY", 1, "EMM2", 0., 0., zps, 0, "ONLY");
578 zpb = zps + fSMthick/2.+dparapb2[2];
579 gMC->Gspos("EPB2", 1, "EMM2", 0., 0., zpb, 0, "ONLY");
580 zfe = zpb + dparapb2[2]+dparafe2[2];
581 gMC->Gspos("EFE2", 1, "EMM2", 0., 0., zfe, 0, "ONLY");
582 zcv = zfe + dparafe2[2]+fSMthick/2.;
583 gMC->Gspos("ESMX", 1, "EMM2", 0., 0., zcv, 0, "ONLY");
585 // EMM3 : special master module having truncated rows and columns of cells
588 Float_t dparaemm3[6] = {12.5,12.5,0.8,30.,0.,0.};
589 dparaemm3[0] = dparaemm2[1]/fgkSqroot3by2;
590 dparaemm3[1] = (fgkNcellHole + 0.25) * fgkCellRadius *fgkSqroot3by2;
591 dparaemm3[2] = dmthick/2.;
593 gMC->Gsvolu("EMM3","PARA", idtmed[698], dparaemm3, 6);
594 gGeoManager->SetVolumeAttribute("EMM3", "SEEN", 1);
596 // Pb Convertor for EMM3
597 Float_t dparapb3[6] = {12.5,12.5,8.,30.,0.,0.};
598 dparapb3[0] = dparaemm3[0];
599 dparapb3[1] = dparaemm3[1];
600 dparapb3[2] = fgkThLead/2.;
602 gMC->Gsvolu("EPB3","PARA", idtmed[600], dparapb3, 6);
603 gGeoManager->SetVolumeAttribute ("EPB3", "SEEN", 0);
605 // Fe Support for EMM3
606 Float_t dparafe3[6] = {12.5,12.5,8.,30.,0.,0.};
607 dparafe3[0] = dparapb3[0];
608 dparafe3[1] = dparapb3[1];
609 dparafe3[2] = fgkThSteel/2.;
611 gMC->Gsvolu("EFE3","PARA", idtmed[618], dparafe3, 6);
612 gGeoManager->SetVolumeAttribute ("EFE3", "SEEN", 0);
614 // position supermodule ESMP, ESMQ inside EMM3
616 zps = -dparaemm3[2] + fSMthick/2.;
617 gMC->Gspos("ESMQ", 1, "EMM3", 0., 0., zps, 0, "ONLY");
618 zpb = zps + fSMthick/2.+dparapb3[2];
619 gMC->Gspos("EPB3", 1, "EMM3", 0., 0., zpb, 0, "ONLY");
620 zfe = zpb + dparapb3[2]+dparafe3[2];
621 gMC->Gspos("EFE3", 1, "EMM3", 0., 0., zfe, 0, "ONLY");
622 zcv = zfe + dparafe3[2] + fSMthick/2.;
623 gMC->Gspos("ESMP", 1, "EMM3", 0., 0., zcv, 0, "ONLY");
626 // EHOL is a tube structure made of air
630 //d_hole[1] = fgkNcellHole * fgkCellRadius *2. * fgkSqroot3by2 + boundary;
631 //d_hole[2] = dmthick/2.;
633 //gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3);
634 //gGeoManager->SetVolumeAttribute("EHOL", "SEEN", 1);
636 //Al-rod as boundary of the supermodules
639 alRod[0] = fSMLength * 3/2. - gaspmd[5]/2 - fgkBoundary ;
640 alRod[1] = fgkBoundary;
641 alRod[2] = dmthick/2.;
643 gMC->Gsvolu("EALM","BOX ", idtmed[698], alRod, 3);
644 gGeoManager->SetVolumeAttribute ("EALM", "SEEN", 1);
646 xalm[0]=alRod[0] + gaspmd[5] + 3.0*fgkBoundary;
652 yalm[1]=xalm[0]*fgkSqroot3by2;
655 // delx = full side of the supermodule
656 Float_t delx=fSMLength * 3.;
657 Float_t x1= delx*fgkSqroot3by2 /2.;
660 // placing master modules and Al-rod in PMD
662 Float_t dx = fSMLength;
663 Float_t dy = dx * fgkSqroot3by2;
664 Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2.,
666 -3.*dx/2., -dx/2., dx/2.};
668 Float_t ysup[9] = {dy, dy, dy,
672 // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes
674 Float_t xoff = fgkBoundary * TMath::Tan(fgkPi/6.);
675 Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-fgkBoundary/fgkSqroot3by2};
676 Float_t ymod[3] = {-x1 - fgkBoundary, x1 + fgkBoundary, 0.};
677 Float_t xpos[9], ypos[9], x2, y2, x3, y3;
679 Float_t xemm2 = fSMLength/2. -
680 (fNcellSM + fgkNcellHole + 0.25) * fgkCellRadius * 0.5
682 Float_t yemm2 = -(fNcellSM + fgkNcellHole + 0.25)*fgkCellRadius*fgkSqroot3by2
685 Float_t xemm3 = (fNcellSM + 0.5 * fgkNcellHole + 0.25) * fgkCellRadius +
687 Float_t yemm3 = - (fgkNcellHole - 0.25) * fgkCellRadius * fgkSqroot3by2 -
690 Float_t theta[3] = {0., 2.*fgkPi/3., 4.*fgkPi/3.};
691 Int_t irotate[3] = {0, jhrot12, jhrot13};
694 for (j=0; j<3; ++j) {
695 gMC->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY");
696 x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
697 y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
699 gMC->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY");
701 x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
702 y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
704 gMC->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY");
706 for (i=1; i<9; ++i) {
707 xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) -
708 ysup[i]*TMath::Sin(theta[j]);
709 ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) +
710 ysup[i]*TMath::Cos(theta[j]);
712 AliDebugClass(1,Form("xpos: %f, ypos: %f", xpos[i], ypos[i]));
716 AliDebugClass(1,Form("nummod %d",nummod));
718 gMC->Gspos("EMM1", nummod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY");
724 // place EHOL in the centre of EPMD
725 // gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY");
727 // --- Place the EPMD in ALICE
732 gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY");
737 //_____________________________________________________________________________
738 void AliPMDv0::CreateMaterials()
741 // Create materials for the PMD
743 // ORIGIN : Y. P. VIYOGI
746 // cout << " Inside create materials " << endl;
748 Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
749 Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
751 // --- Define the various materials for GEANT ---
753 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
757 Float_t dAr = 0.001782; // --- Ar density in g/cm3 ---
758 Float_t x0Ar = 19.55 / dAr;
759 AliMaterial(2, "Argon$", 39.95, 18., dAr, x0Ar, 6.5e4);
763 Float_t aCO2[2] = { 12.,16. };
764 Float_t zCO2[2] = { 6.,8. };
765 Float_t wCO2[2] = { 1.,2. };
766 Float_t dCO2 = 0.001977;
767 AliMixture(3, "CO2 $", aCO2, zCO2, dCO2, -2, wCO2);
769 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
773 Float_t aArCO2[3] = {39.948,12.0107,15.9994};
774 Float_t zArCO2[3] = {18.,6.,8.};
775 Float_t wArCO2[3] = {0.7,0.08,0.22};
776 Float_t dArCO2 = dAr * 0.7 + dCO2 * 0.3;
777 AliMixture(5, "ArCO2$", aArCO2, zArCO2, dArCO2, 3, wArCO2);
779 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
783 Float_t aG10[4]={1.,12.011,15.9994,28.086};
784 Float_t zG10[4]={1.,6.,8.,14.};
785 //PH Float_t wG10[4]={0.148648649,0.104054054,0.483499056,0.241666667};
786 Float_t wG10[4]={0.15201,0.10641,0.49444,0.24714};
787 AliMixture(8,"G10",aG10,zG10,1.7,4,wG10);
789 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
792 Float_t aSteel[4] = { 55.847,51.9961,58.6934,28.0855 };
793 Float_t zSteel[4] = { 26.,24.,28.,14. };
794 Float_t wSteel[4] = { .715,.18,.1,.005 };
795 Float_t dSteel = 7.88;
796 AliMixture(19, "STAINLESS STEEL$", aSteel, zSteel, dSteel, 4, wSteel);
800 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
801 Float_t zAir[4]={6.,7.,8.,18.};
802 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
803 Float_t dAir1 = 1.20479E-10;
804 Float_t dAir = 1.20479E-3;
805 AliMixture(98, "Vacum$", aAir, zAir, dAir1, 4, wAir);
806 AliMixture(99, "Air $", aAir, zAir, dAir , 4, wAir);
808 // Define tracking media
809 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
810 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
811 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .10, .1);
812 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
813 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
814 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
815 AliMedium(19, "S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
816 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .10, 10);
817 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .10, .1);
821 //_____________________________________________________________________________
822 void AliPMDv0::Init()
825 // Initialises PMD detector after it has been built
830 if(AliLog::GetGlobalDebugLevel()>0) {
831 printf("\n%s: ",ClassName());
832 for(i=0;i<35;i++) printf("*");
833 printf(" PMD_INIT ");
834 for(i=0;i<35;i++) printf("*");
835 printf("\n%s: ",ClassName());
836 printf(" PMD simulation package (v0) initialised\n");
837 printf("%s: parameters of pmd\n", ClassName());
838 printf("%s: %10.2f %10.2f %10.2f \
839 %10.2f\n",ClassName(),fgkCellRadius,fgkCellWall,fgkCellDepth,fgkZdist );
840 printf("%s: ",ClassName());
841 for(i=0;i<80;i++) printf("*");
844 Int_t *idtmed = fIdtmed->GetArray()-599;
845 fMedSens=idtmed[605-1];
846 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
847 // removed all Gstpar and energy cut-offs moved to galice.cuts
850 //_____________________________________________________________________________
851 void AliPMDv0::StepManager()
854 // Called at each step in the PMD
857 Float_t hits[5], destep;
858 Float_t center[3] = {0,0,0};
862 if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) {
864 gMC->CurrentVolID(copy);
866 gMC->CurrentVolOffID(1,copy);
868 gMC->CurrentVolOffID(2,copy);
870 gMC->CurrentVolOffID(3,copy);
872 gMC->CurrentVolOffID(4,copy);
874 gMC->CurrentVolOffID(5,copy);
877 gMC->Gdtom(center,hits,1);
878 hits[3] = destep*1e9; //Number in eV
880 // this is for pile-up events
881 hits[4] = gMC->TrackTime();
883 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
888 //------------------------------------------------------------------------
891 void AliPMDv0::GetParameters()
893 // This gives all the parameters of the detector
894 // such as Length of Supermodules
895 // thickness of the Supermodule
897 Int_t ncellum, numum;
900 fNcellSM = ncellum * numum; //no. of cells in a row in one supermodule
901 fSMLength = (fNcellSM + 0.25 )*fgkCellRadius*2.;
902 fSMthick = fgkThBase + fgkThAir + fgkThPCB + fgkCellDepth +
903 fgkThPCB + fgkThAir + fgkThPCB;