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 <TVirtualMC.h>
41 const Int_t AliPMDv0::fgkNcellHole = 24; // Hole dimension
42 const Float_t AliPMDv0::fgkCellRadius = 0.25; // Radius of a hexagonal cell
43 const Float_t AliPMDv0::fgkCellWall = 0.02; // Thickness of cell Wall
44 const Float_t AliPMDv0::fgkCellDepth = 0.50; // Gas thickness
45 const Float_t AliPMDv0::fgkBoundary = 0.7; // Thickness of Boundary wall
46 const Float_t AliPMDv0::fgkThBase = 0.3; // Thickness of Base plate
47 const Float_t AliPMDv0::fgkThAir = 0.1; // Thickness of Air
48 const Float_t AliPMDv0::fgkThPCB = 0.16; // Thickness of PCB
49 const Float_t AliPMDv0::fgkThLead = 1.5; // Thickness of Pb
50 const Float_t AliPMDv0::fgkThSteel = 0.5; // Thickness of Steel
51 const Float_t AliPMDv0::fgkZdist = 361.5; // z-position of the detector
52 const Float_t AliPMDv0::fgkSqroot3 = 1.7320508;// Square Root of 3
53 const Float_t AliPMDv0::fgkSqroot3by2 = 0.8660254;// Square Root of 3 by 2
54 const Float_t AliPMDv0::fgkPi = 3.14159; // pi
58 //_____________________________________________________________________________
66 // Default constructor
70 //_____________________________________________________________________________
71 AliPMDv0::AliPMDv0(const char *name, const char *title):
79 // Standard constructor
83 //_____________________________________________________________________________
84 void AliPMDv0::CreateGeometry()
87 // Create geometry for Photon Multiplicity Detector Version 3 :
92 <img src="picts/AliPMDv0.gif">
97 <img src="picts/AliPMDv0Tree.gif">
105 //_____________________________________________________________________________
106 void AliPMDv0::CreateSupermodule()
109 // Creates the geometry of the cells, places them in supermodule which
110 // is a rhombus object.
112 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
113 // *** HEXAGONAL CELLS WITH CELL RADIUS 0.25 cm (see "GetParameters")
114 // -- Author : S. Chattopadhyay, 02/04/1999.
116 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is placed inside another
117 // hexagonal cell made of Cu (ECCU) with larger radius, compared to ECAR. The difference
118 // in radius gives the dimension of half width of each cell wall.
119 // These cells are placed as 72 x 72 array in a
120 // rhombus shaped supermodule (EHC1). The rhombus shaped modules are designed
121 // to have closed packed structure.
123 // Each supermodule (ESMA, ESMB), made of G10 is filled with following components
124 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
125 // EHC1 --> Rhombus shaped parallelopiped containing the hexagonal cells
126 // EAIR --> Air gap between gas hexagonal cells and G10 backing.
128 // ESMA, ESMB are placed in EMM1 along with EMPB (Pb converter)
129 // and EMFE (iron support)
132 // ESMB --> Normal supermodule, mirror image of ESMA
133 // EMPB --> Pb converter
134 // EMFE --> Fe backing
135 // ESMA --> Normal supermodule
137 // ESMX, ESMY are placed in EMM2 along with EMPB (Pb converter)
138 // and EMFE (iron support)
141 // ESMY --> Special supermodule, mirror image of ESMX,
142 // EMPB --> Pb converter
143 // EMFE --> Fe backing
144 // ESMX --> First of the two Special supermodules near the hole
147 // ESMQ --> Special supermodule, mirror image of ESMX,
148 // EMPB --> Pb converter
149 // EMFE --> Fe backing
150 // ESMP --> Second of the two Special supermodules near the hole
152 // EMM2 and EMM3 are used to create the hexagonal HOLE
158 // ---------------------------------------------------------------------------
160 // EHOL EMM1 EMM2 EMM3 EALM
162 // -------------------- -------------------- --------------------
163 // | | | | | | | | | | | |
164 // ESMB EMPB EMFE ESMA ESMY EMPB EMFE ESMX ESMQ EMPB EMFE ESMP
166 // ------------ ------------ -------------
168 // EAIR EHC1 EAIR EAIR EHC2 EAIR EAIR EHC3 EAIR
179 Int_t *idtmed = fIdtmed->GetArray()-599;
181 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
182 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
184 //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu
185 // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension
186 //(1mm tolerance on both side and 5mm thick G10 wall)
188 // **** CELL SIZE 20 mm^2 EQUIVALENT
189 // Inner hexagon filled with gas (Ar+CO2)
191 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
193 hexd2[4]= -fgkCellDepth/2.;
194 hexd2[7]= fgkCellDepth/2.;
195 hexd2[6]= fgkCellRadius - fgkCellWall;
196 hexd2[9]= fgkCellRadius - fgkCellWall;
198 // Gas replaced by vacuum for v0(insensitive) version of PMD.
200 gMC->Gsvolu("ECAR", "PGON", idtmed[697], hexd2,10);
201 gMC->Gsatt("ECAR", "SEEN", 0);
203 // Outer hexagon made of Copper
205 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
207 hexd1[4]= -fgkCellDepth/2.;
208 hexd1[7]= fgkCellDepth/2.;
209 hexd1[6]= fgkCellRadius;
210 hexd1[9]= fgkCellRadius;
212 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
213 gMC->Gsatt("ECCU", "SEEN", 1);
215 // --- place inner hex inside outer hex
217 gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
219 // Rhombus shaped supermodules (defined by PARA)
221 // volume for SUPERMODULE
223 Float_t dparasm1[6] = {12.5,12.5,0.8,30.,0.,0.};
224 dparasm1[0] = (fNcellSM+0.25)*hexd1[6] ;
225 dparasm1[1] = dparasm1[0] *fgkSqroot3by2;
226 dparasm1[2] = fSMthick/2.;
229 gMC->Gsvolu("ESMA","PARA", idtmed[607], dparasm1, 6);
230 gMC->Gsatt("ESMA", "SEEN", 0);
232 gMC->Gsvolu("ESMB","PARA", idtmed[607], dparasm1, 6);
233 gMC->Gsatt("ESMB", "SEEN", 0);
235 // Air residing between the PCB and the base
237 Float_t dparaair[6] = {12.5,12.5,8.,30.,0.,0.};
238 dparaair[0]= dparasm1[0];
239 dparaair[1]= dparasm1[1];
240 dparaair[2]= fgkThAir/2.;
242 gMC->Gsvolu("EAIR","PARA", idtmed[698], dparaair, 6);
243 gMC->Gsatt("EAIR", "SEEN", 0);
245 // volume for honeycomb chamber EHC1
247 Float_t dpara1[6] = {12.5,12.5,0.4,30.,0.,0.};
248 dpara1[0] = dparasm1[0];
249 dpara1[1] = dparasm1[1];
250 dpara1[2] = fgkCellDepth/2.;
252 gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6);
253 gMC->Gsatt("EHC1", "SEEN", 1);
255 // Place hexagonal cells ECCU cells inside EHC1 (72 X 72)
259 yb = -dpara1[1] + (1./fgkSqroot3by2)*hexd1[6];
262 for (j = 1; j <= fNcellSM; ++j) {
263 xb =-(dpara1[0] + dpara1[1]*0.577) + 2*hexd1[6]; //0.577=tan(30deg)
265 xb = xb+(xrow-1)*hexd1[6];
267 for (i = 1; i <= fNcellSM; ++i) {
268 number = i+(j-1)*fNcellSM;
269 gMC->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY");
273 yb += (hexd1[6]*fgkSqroot3);
277 // Place EHC1 and EAIR into ESMA and ESMB
279 Float_t zAir1,zAir2,zGas;
281 //ESMA is normal supermodule with base at bottom, with EHC1
282 zAir1= -dparasm1[2] + fgkThBase + dparaair[2];
283 gMC->Gspos("EAIR", 1, "ESMA", 0., 0., zAir1, 0, "ONLY");
284 zGas=zAir1+dparaair[2]+ fgkThPCB + dpara1[2];
285 //Line below Commented for version 0 of PMD routine
286 // gMC->Gspos("EHC1", 1, "ESMA", 0., 0., zGas, 0, "ONLY");
287 zAir2=zGas+dpara1[2]+ fgkThPCB + dparaair[2];
288 gMC->Gspos("EAIR", 2, "ESMA", 0., 0., zAir2, 0, "ONLY");
290 // ESMB is mirror image of ESMA, with base at top, with EHC1
292 zAir1= -dparasm1[2] + fgkThPCB + dparaair[2];
293 gMC->Gspos("EAIR", 3, "ESMB", 0., 0., zAir1, 0, "ONLY");
294 zGas=zAir1+dparaair[2]+ fgkThPCB + dpara1[2];
295 //Line below Commented for version 0 of PMD routine
296 // gMC->Gspos("EHC1", 2, "ESMB", 0., 0., zGas, 0, "ONLY");
297 zAir2=zGas+dpara1[2]+ fgkThPCB + dparaair[2];
298 gMC->Gspos("EAIR", 4, "ESMB", 0., 0., zAir2, 0, "ONLY");
301 // special supermodule EMM2(GEANT only) containing 6 unit modules
302 // volume for SUPERMODULE
304 Float_t dparasm2[6] = {12.5,12.5,0.8,30.,0.,0.};
305 dparasm2[0]=(fNcellSM+0.25)*hexd1[6] ;
306 dparasm2[1] = (fNcellSM - fgkNcellHole + 0.25) * fgkSqroot3by2 * hexd1[6];
307 dparasm2[2] = fSMthick/2.;
309 gMC->Gsvolu("ESMX","PARA", idtmed[607], dparasm2, 6);
310 gMC->Gsatt("ESMX", "SEEN", 0);
312 gMC->Gsvolu("ESMY","PARA", idtmed[607], dparasm2, 6);
313 gMC->Gsatt("ESMY", "SEEN", 0);
315 Float_t dpara2[6] = {12.5,12.5,0.4,30.,0.,0.};
316 dpara2[0] = dparasm2[0];
317 dpara2[1] = dparasm2[1];
318 dpara2[2] = fgkCellDepth/2.;
320 gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6);
321 gMC->Gsatt("EHC2", "SEEN", 1);
324 // Air residing between the PCB and the base
326 Float_t dpara2Air[6] = {12.5,12.5,8.,30.,0.,0.};
327 dpara2Air[0]= dparasm2[0];
328 dpara2Air[1]= dparasm2[1];
329 dpara2Air[2]= fgkThAir/2.;
331 gMC->Gsvolu("EAIX","PARA", idtmed[698], dpara2Air, 6);
332 gMC->Gsatt("EAIX", "SEEN", 0);
334 // Place hexagonal single cells ECCU inside EHC2
335 // skip cells which go into the hole in top left corner.
338 yb = -dpara2[1] + (1./fgkSqroot3by2)*hexd1[6];
340 for (j = 1; j <= (fNcellSM - fgkNcellHole); ++j) {
341 xb =-(dpara2[0] + dpara2[1]*0.577) + 2*hexd1[6];
343 xb = xb+(xrow-1)*hexd1[6];
345 for (i = 1; i <= fNcellSM; ++i) {
346 number = i+(j-1)*fNcellSM;
347 gMC->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY");
351 yb += (hexd1[6]*fgkSqroot3);
355 // ESMX is normal supermodule with base at bottom, with EHC2
357 zAir1= -dparasm2[2] + fgkThBase + dpara2Air[2];
358 gMC->Gspos("EAIX", 1, "ESMX", 0., 0., zAir1, 0, "ONLY");
359 zGas=zAir1+dpara2Air[2]+ fgkThPCB + dpara2[2];
360 //Line below Commented for version 0 of PMD routine
361 // gMC->Gspos("EHC2", 1, "ESMX", 0., 0., zGas, 0, "ONLY");
362 zAir2=zGas+dpara2[2]+ fgkThPCB + dpara2Air[2];
363 gMC->Gspos("EAIX", 2, "ESMX", 0., 0., zAir2, 0, "ONLY");
365 // ESMY is mirror image of ESMX with base at bottom, with EHC2
367 zAir1= -dparasm2[2] + fgkThPCB + dpara2Air[2];
368 gMC->Gspos("EAIX", 3, "ESMY", 0., 0., zAir1, 0, "ONLY");
369 zGas=zAir1+dpara2Air[2]+ fgkThPCB + dpara2[2];
370 //Line below Commented for version 0 of PMD routine
371 // gMC->Gspos("EHC2", 2, "ESMY", 0., 0., zGas, 0, "ONLY");
372 zAir2=zGas+dpara2[2]+ fgkThPCB + dpara2Air[2];
373 gMC->Gspos("EAIX", 4, "ESMY", 0., 0., zAir2, 0, "ONLY");
376 // special supermodule EMM3 (GEANT only) containing 2 unit modules
377 // volume for SUPERMODULE
379 Float_t dparaSM3[6] = {12.5,12.5,0.8,30.,0.,0.};
380 dparaSM3[0]=(fNcellSM - fgkNcellHole +0.25)*hexd1[6] ;
381 dparaSM3[1] = (fgkNcellHole + 0.25) * hexd1[6] * fgkSqroot3by2;
382 dparaSM3[2] = fSMthick/2.;
384 gMC->Gsvolu("ESMP","PARA", idtmed[607], dparaSM3, 6);
385 gMC->Gsatt("ESMP", "SEEN", 0);
387 gMC->Gsvolu("ESMQ","PARA", idtmed[607], dparaSM3, 6);
388 gMC->Gsatt("ESMQ", "SEEN", 0);
390 Float_t dpara3[6] = {12.5,12.5,0.4,30.,0.,0.};
391 dpara3[0] = dparaSM3[0];
392 dpara3[1] = dparaSM3[1];
393 dpara3[2] = fgkCellDepth/2.;
395 gMC->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6);
396 gMC->Gsatt("EHC3", "SEEN", 1);
398 // Air residing between the PCB and the base
400 Float_t dpara3Air[6] = {12.5,12.5,8.,30.,0.,0.};
401 dpara3Air[0]= dparaSM3[0];
402 dpara3Air[1]= dparaSM3[1];
403 dpara3Air[2]= fgkThAir/2.;
405 gMC->Gsvolu("EAIP","PARA", idtmed[698], dpara3Air, 6);
406 gMC->Gsatt("EAIP", "SEEN", 0);
409 // Place hexagonal single cells ECCU inside EHC3
410 // skip cells which go into the hole in top left corner.
413 yb = -dpara3[1] + (1./fgkSqroot3by2)*hexd1[6];
415 for (j = 1; j <= fgkNcellHole; ++j) {
416 xb =-(dpara3[0] + dpara3[1]*0.577) + 2*hexd1[6];
418 xb = xb+(xrow-1)*hexd1[6];
420 for (i = 1; i <= (fNcellSM - fgkNcellHole); ++i) {
421 number = i+(j-1)*(fNcellSM - fgkNcellHole);
422 gMC->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY");
426 yb += (hexd1[6]*fgkSqroot3);
429 // ESMP is normal supermodule with base at bottom, with EHC3
431 zAir1= -dparaSM3[2] + fgkThBase + dpara3Air[2];
432 gMC->Gspos("EAIP", 1, "ESMP", 0., 0., zAir1, 0, "ONLY");
433 zGas=zAir1+dpara3Air[2]+ fgkThPCB + dpara3[2];
434 //Line below Commented for version 0 of PMD routine
435 // gMC->Gspos("EHC3", 1, "ESMP", 0., 0., zGas, 0, "ONLY");
436 zAir2=zGas+dpara3[2]+ fgkThPCB + dpara3Air[2];
437 gMC->Gspos("EAIP", 2, "ESMP", 0., 0., zAir2, 0, "ONLY");
439 // ESMQ is mirror image of ESMP with base at bottom, with EHC3
441 zAir1= -dparaSM3[2] + fgkThPCB + dpara3Air[2];
442 gMC->Gspos("EAIP", 3, "ESMQ", 0., 0., zAir1, 0, "ONLY");
443 zGas=zAir1+dpara3Air[2]+ fgkThPCB + dpara3[2];
444 //Line below Commented for version 0 of PMD routine
445 // gMC->Gspos("EHC3", 2, "ESMQ", 0., 0., zGas, 0, "ONLY");
446 zAir2=zGas+dpara3[2]+ fgkThPCB + dpara3Air[2];
447 gMC->Gspos("EAIP", 4, "ESMQ", 0., 0., zAir2, 0, "ONLY");
451 //_____________________________________________________________________________
453 void AliPMDv0::CreatePMD()
456 // Create final detector from supermodules
458 // -- Author : Y.P. VIYOGI, 07/05/1996.
459 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
460 // -- Modified: For New Geometry YPV, March 2001.
465 Int_t jhrot12,jhrot13, irotdm;
466 Int_t *idtmed = fIdtmed->GetArray()-599;
468 // VOLUMES Names : begining with "E" for all PMD volumes,
469 // The names of SIZE variables begin with S and have more meaningful
470 // characters as shown below.
471 // VOLUME SIZE MEDIUM : REMARKS
472 // ------ ----- ------ : ---------------------------
473 // EPMD GASPMD AIR : INSIDE PMD and its SIZE
474 // *** 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] = fgkNcellHole * fgkCellRadius * 2. * fgkSqroot3by2;
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 dmthick = 2. * fSMthick + fgkThLead + fgkThSteel;
494 // dparaemm1 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 dparaemm1[6] = {12.5,12.5,0.8,30.,0.,0.};
500 dparaemm1[0] = fSMLength/2.;
501 dparaemm1[1] = dparaemm1[0] *fgkSqroot3by2;
502 dparaemm1[2] = dmthick/2.;
504 gMC->Gsvolu("EMM1","PARA", idtmed[698], dparaemm1, 6);
505 gMC->Gsatt("EMM1", "SEEN", 1);
508 // --- DEFINE Modules, iron, and lead volumes
509 // Pb Convertor for EMM1
511 Float_t dparapb1[6] = {12.5,12.5,8.,30.,0.,0.};
512 dparapb1[0] = fSMLength/2.;
513 dparapb1[1] = dparapb1[0] * fgkSqroot3by2;
514 dparapb1[2] = fgkThLead/2.;
516 gMC->Gsvolu("EPB1","PARA", idtmed[600], dparapb1, 6);
517 gMC->Gsatt ("EPB1", "SEEN", 0);
519 // Fe Support for EMM1
520 Float_t dparafe1[6] = {12.5,12.5,8.,30.,0.,0.};
521 dparafe1[0] = dparapb1[0];
522 dparafe1[1] = dparapb1[1];
523 dparafe1[2] = fgkThSteel/2.;
525 gMC->Gsvolu("EFE1","PARA", idtmed[618], dparafe1, 6);
526 gMC->Gsatt ("EFE1", "SEEN", 0);
529 // position supermodule ESMA, ESMB, EPB1, EFE1 inside EMM1
531 Float_t zps,zpb,zfe,zcv;
533 zps = -dparaemm1[2] + fSMthick/2.;
534 gMC->Gspos("ESMB", 1, "EMM1", 0., 0., zps, 0, "ONLY");
535 zpb = zps+fSMthick/2.+dparapb1[2];
536 gMC->Gspos("EPB1", 1, "EMM1", 0., 0., zpb, 0, "ONLY");
537 zfe = zpb+dparapb1[2]+dparafe1[2];
538 gMC->Gspos("EFE1", 1, "EMM1", 0., 0., zfe, 0, "ONLY");
539 zcv = zfe+dparafe1[2]+fSMthick/2.;
540 gMC->Gspos("ESMA", 1, "EMM1", 0., 0., zcv, 0, "ONLY");
542 // EMM2 : special master module having full row of cells but the number
543 // of rows limited by hole.
545 Float_t dparaemm2[6] = {12.5,12.5,0.8,30.,0.,0.};
546 dparaemm2[0] = fSMLength/2.;
547 dparaemm2[1] = (fNcellSM - fgkNcellHole + 0.25)*fgkCellRadius*fgkSqroot3by2;
548 dparaemm2[2] = dmthick/2.;
550 gMC->Gsvolu("EMM2","PARA", idtmed[698], dparaemm2, 6);
551 gMC->Gsatt("EMM2", "SEEN", 1);
553 // Pb Convertor for EMM2
554 Float_t dparapb2[6] = {12.5,12.5,8.,30.,0.,0.};
555 dparapb2[0] = dparaemm2[0];
556 dparapb2[1] = dparaemm2[1];
557 dparapb2[2] = fgkThLead/2.;
559 gMC->Gsvolu("EPB2","PARA", idtmed[600], dparapb2, 6);
560 gMC->Gsatt ("EPB2", "SEEN", 0);
562 // Fe Support for EMM2
563 Float_t dparafe2[6] = {12.5,12.5,8.,30.,0.,0.};
564 dparafe2[0] = dparapb2[0];
565 dparafe2[1] = dparapb2[1];
566 dparafe2[2] = fgkThSteel/2.;
568 gMC->Gsvolu("EFE2","PARA", idtmed[618], dparafe2, 6);
569 gMC->Gsatt ("EFE2", "SEEN", 0);
571 // position supermodule ESMX, ESMY inside EMM2
573 zps = -dparaemm2[2] + fSMthick/2.;
574 gMC->Gspos("ESMY", 1, "EMM2", 0., 0., zps, 0, "ONLY");
575 zpb = zps + fSMthick/2.+dparapb2[2];
576 gMC->Gspos("EPB2", 1, "EMM2", 0., 0., zpb, 0, "ONLY");
577 zfe = zpb + dparapb2[2]+dparafe2[2];
578 gMC->Gspos("EFE2", 1, "EMM2", 0., 0., zfe, 0, "ONLY");
579 zcv = zfe + dparafe2[2]+fSMthick/2.;
580 gMC->Gspos("ESMX", 1, "EMM2", 0., 0., zcv, 0, "ONLY");
582 // EMM3 : special master module having truncated rows and columns of cells
585 Float_t dparaemm3[6] = {12.5,12.5,0.8,30.,0.,0.};
586 dparaemm3[0] = dparaemm2[1]/fgkSqroot3by2;
587 dparaemm3[1] = (fgkNcellHole + 0.25) * fgkCellRadius *fgkSqroot3by2;
588 dparaemm3[2] = dmthick/2.;
590 gMC->Gsvolu("EMM3","PARA", idtmed[698], dparaemm3, 6);
591 gMC->Gsatt("EMM3", "SEEN", 1);
593 // Pb Convertor for EMM3
594 Float_t dparapb3[6] = {12.5,12.5,8.,30.,0.,0.};
595 dparapb3[0] = dparaemm3[0];
596 dparapb3[1] = dparaemm3[1];
597 dparapb3[2] = fgkThLead/2.;
599 gMC->Gsvolu("EPB3","PARA", idtmed[600], dparapb3, 6);
600 gMC->Gsatt ("EPB3", "SEEN", 0);
602 // Fe Support for EMM3
603 Float_t dparafe3[6] = {12.5,12.5,8.,30.,0.,0.};
604 dparafe3[0] = dparapb3[0];
605 dparafe3[1] = dparapb3[1];
606 dparafe3[2] = fgkThSteel/2.;
608 gMC->Gsvolu("EFE3","PARA", idtmed[618], dparafe3, 6);
609 gMC->Gsatt ("EFE3", "SEEN", 0);
611 // position supermodule ESMP, ESMQ inside EMM3
613 zps = -dparaemm3[2] + fSMthick/2.;
614 gMC->Gspos("ESMQ", 1, "EMM3", 0., 0., zps, 0, "ONLY");
615 zpb = zps + fSMthick/2.+dparapb3[2];
616 gMC->Gspos("EPB3", 1, "EMM3", 0., 0., zpb, 0, "ONLY");
617 zfe = zpb + dparapb3[2]+dparafe3[2];
618 gMC->Gspos("EFE3", 1, "EMM3", 0., 0., zfe, 0, "ONLY");
619 zcv = zfe + dparafe3[2] + fSMthick/2.;
620 gMC->Gspos("ESMP", 1, "EMM3", 0., 0., zcv, 0, "ONLY");
623 // EHOL is a tube structure made of air
627 //d_hole[1] = fgkNcellHole * fgkCellRadius *2. * fgkSqroot3by2 + boundary;
628 //d_hole[2] = dmthick/2.;
630 //gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3);
631 //gMC->Gsatt("EHOL", "SEEN", 1);
633 //Al-rod as boundary of the supermodules
636 alRod[0] = fSMLength * 3/2. - gaspmd[5]/2 - fgkBoundary ;
637 alRod[1] = fgkBoundary;
638 alRod[2] = dmthick/2.;
640 gMC->Gsvolu("EALM","BOX ", idtmed[698], alRod, 3);
641 gMC->Gsatt ("EALM", "SEEN", 1);
643 xalm[0]=alRod[0] + gaspmd[5] + 3.0*fgkBoundary;
649 yalm[1]=xalm[0]*fgkSqroot3by2;
652 // delx = full side of the supermodule
653 Float_t delx=fSMLength * 3.;
654 Float_t x1= delx*fgkSqroot3by2 /2.;
657 // placing master modules and Al-rod in PMD
659 Float_t dx = fSMLength;
660 Float_t dy = dx * fgkSqroot3by2;
661 Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2.,
663 -3.*dx/2., -dx/2., dx/2.};
665 Float_t ysup[9] = {dy, dy, dy,
669 // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes
671 Float_t xoff = fgkBoundary * TMath::Tan(fgkPi/6.);
672 Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-fgkBoundary/fgkSqroot3by2};
673 Float_t ymod[3] = {-x1 - fgkBoundary, x1 + fgkBoundary, 0.};
674 Float_t xpos[9], ypos[9], x2, y2, x3, y3;
676 Float_t xemm2 = fSMLength/2. -
677 (fNcellSM + fgkNcellHole + 0.25) * fgkCellRadius * 0.5
679 Float_t yemm2 = -(fNcellSM + fgkNcellHole + 0.25)*fgkCellRadius*fgkSqroot3by2
682 Float_t xemm3 = (fNcellSM + 0.5 * fgkNcellHole + 0.25) * fgkCellRadius +
684 Float_t yemm3 = - (fgkNcellHole - 0.25) * fgkCellRadius * fgkSqroot3by2 -
687 Float_t theta[3] = {0., 2.*fgkPi/3., 4.*fgkPi/3.};
688 Int_t irotate[3] = {0, jhrot12, jhrot13};
691 for (j=0; j<3; ++j) {
692 gMC->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY");
693 x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
694 y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
696 gMC->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY");
698 x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
699 y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
701 gMC->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY");
703 for (i=1; i<9; ++i) {
704 xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) -
705 ysup[i]*TMath::Sin(theta[j]);
706 ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) +
707 ysup[i]*TMath::Cos(theta[j]);
709 AliDebugClass(1,Form("xpos: %f, ypos: %f", xpos[i], ypos[i]));
713 AliDebugClass(1,Form("nummod %d",nummod));
715 gMC->Gspos("EMM1", nummod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY");
721 // place EHOL in the centre of EPMD
722 // gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY");
724 // --- Place the EPMD in ALICE
729 gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY");
734 //_____________________________________________________________________________
735 void AliPMDv0::DrawModule() const
738 // Draw a shaded view of the Photon Multiplicity Detector
741 gMC->Gsatt("*", "seen", -1);
742 gMC->Gsatt("alic", "seen", 0);
744 // Set the visibility of the components
746 gMC->Gsatt("ECAR","seen",0);
747 gMC->Gsatt("ECCU","seen",1);
748 gMC->Gsatt("EHC1","seen",1);
749 gMC->Gsatt("EHC1","seen",1);
750 gMC->Gsatt("EHC2","seen",1);
751 gMC->Gsatt("EMM1","seen",1);
752 gMC->Gsatt("EHOL","seen",1);
753 gMC->Gsatt("EPMD","seen",0);
755 gMC->Gdopt("hide", "on");
756 gMC->Gdopt("shad", "on");
757 gMC->Gsatt("*", "fill", 7);
758 gMC->SetClipBox(".");
759 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
761 gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02);
762 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
764 //gMC->Gdman(17, 5, "MAN");
765 gMC->Gdopt("hide", "off");
768 //_____________________________________________________________________________
769 void AliPMDv0::CreateMaterials()
772 // Create materials for the PMD
774 // ORIGIN : Y. P. VIYOGI
777 // cout << " Inside create materials " << endl;
779 Int_t isxfld = gAlice->Field()->Integ();
780 Float_t sxmgmx = gAlice->Field()->Max();
782 // --- Define the various materials for GEANT ---
784 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
788 Float_t dAr = 0.001782; // --- Ar density in g/cm3 ---
789 Float_t x0Ar = 19.55 / dAr;
790 AliMaterial(2, "Argon$", 39.95, 18., dAr, x0Ar, 6.5e4);
794 Float_t aCO2[2] = { 12.,16. };
795 Float_t zCO2[2] = { 6.,8. };
796 Float_t wCO2[2] = { 1.,2. };
797 Float_t dCO2 = 0.001977;
798 AliMixture(3, "CO2 $", aCO2, zCO2, dCO2, -2, wCO2);
800 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
804 Float_t aArCO2[3] = {39.948,12.0107,15.9994};
805 Float_t zArCO2[3] = {18.,6.,8.};
806 Float_t wArCO2[3] = {0.7,0.08,0.22};
807 Float_t dArCO2 = dAr * 0.7 + dCO2 * 0.3;
808 AliMixture(5, "ArCO2$", aArCO2, zArCO2, dArCO2, 3, wArCO2);
810 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
814 Float_t aG10[4]={1.,12.011,15.9994,28.086};
815 Float_t zG10[4]={1.,6.,8.,14.};
816 //PH Float_t wG10[4]={0.148648649,0.104054054,0.483499056,0.241666667};
817 Float_t wG10[4]={0.15201,0.10641,0.49444,0.24714};
818 AliMixture(8,"G10",aG10,zG10,1.7,4,wG10);
820 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
823 Float_t aSteel[4] = { 55.847,51.9961,58.6934,28.0855 };
824 Float_t zSteel[4] = { 26.,24.,28.,14. };
825 Float_t wSteel[4] = { .715,.18,.1,.005 };
826 Float_t dSteel = 7.88;
827 AliMixture(19, "STAINLESS STEEL$", aSteel, zSteel, dSteel, 4, wSteel);
831 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
832 Float_t zAir[4]={6.,7.,8.,18.};
833 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
834 Float_t dAir1 = 1.20479E-10;
835 Float_t dAir = 1.20479E-3;
836 AliMixture(98, "Vacum$", aAir, zAir, dAir1, 4, wAir);
837 AliMixture(99, "Air $", aAir, zAir, dAir , 4, wAir);
839 // Define tracking media
840 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
841 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
842 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .10, .1);
843 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
844 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
845 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
846 AliMedium(19, "S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
847 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .10, 10);
848 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .10, .1);
852 //_____________________________________________________________________________
853 void AliPMDv0::Init()
856 // Initialises PMD detector after it has been built
861 if(AliLog::GetGlobalDebugLevel()>0) {
862 printf("\n%s: ",ClassName());
863 for(i=0;i<35;i++) printf("*");
864 printf(" PMD_INIT ");
865 for(i=0;i<35;i++) printf("*");
866 printf("\n%s: ",ClassName());
867 printf(" PMD simulation package (v0) initialised\n");
868 printf("%s: parameters of pmd\n", ClassName());
869 printf("%s: %10.2f %10.2f %10.2f \
870 %10.2f\n",ClassName(),fgkCellRadius,fgkCellWall,fgkCellDepth,fgkZdist );
871 printf("%s: ",ClassName());
872 for(i=0;i<80;i++) printf("*");
875 Int_t *idtmed = fIdtmed->GetArray()-599;
876 fMedSens=idtmed[605-1];
877 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
878 gMC->Gstpar(idtmed[600], "LOSS", 3.);
879 gMC->Gstpar(idtmed[600], "DRAY", 1.);
881 gMC->Gstpar(idtmed[603], "LOSS", 3.);
882 gMC->Gstpar(idtmed[603], "DRAY", 1.);
884 gMC->Gstpar(idtmed[604], "LOSS", 3.);
885 gMC->Gstpar(idtmed[604], "DRAY", 1.);
887 gMC->Gstpar(idtmed[605], "LOSS", 3.);
888 gMC->Gstpar(idtmed[605], "DRAY", 1.);
890 gMC->Gstpar(idtmed[606], "LOSS", 3.);
891 gMC->Gstpar(idtmed[606], "DRAY", 1.);
893 gMC->Gstpar(idtmed[607], "LOSS", 3.);
894 gMC->Gstpar(idtmed[607], "DRAY", 1.);
896 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
897 // --- without affecting the hit patterns ---
898 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
899 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
900 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
901 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
902 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
903 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
904 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
905 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
906 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
907 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
908 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
909 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
910 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
911 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
912 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
913 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
914 // gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
915 // gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
916 // gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
917 // gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
919 // --- Prevent particles stopping in the gas due to energy cut-off ---
920 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
921 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
922 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
923 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
924 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
927 //_____________________________________________________________________________
928 void AliPMDv0::StepManager()
931 // Called at each step in the PMD
934 Float_t hits[4], destep;
935 Float_t center[3] = {0,0,0};
939 if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) {
941 gMC->CurrentVolID(copy);
943 //namep=gMC->CurrentVolName();
944 //printf("Current vol is %s \n",namep);
947 gMC->CurrentVolOffID(1,copy);
949 //namep=gMC->CurrentVolOffName(1);
950 //printf("Current vol 11 is %s \n",namep);
953 gMC->CurrentVolOffID(2,copy);
955 //namep=gMC->CurrentVolOffName(2);
956 //printf("Current vol 22 is %s \n",namep);
960 // if(strncmp(namep,"EHC1",4))vol[2]=1;
962 gMC->CurrentVolOffID(3,copy);
964 //namep=gMC->CurrentVolOffName(3);
965 //printf("Current vol 33 is %s \n",namep);
968 gMC->CurrentVolOffID(4,copy);
970 //namep=gMC->CurrentVolOffName(4);
971 //printf("Current vol 44 is %s \n",namep);
974 //printf("volume number %d,%d,%d,%d,%d,%f \n",vol[0],vol[1],vol[2],vol[3],vol[4],destep*1000000);
976 gMC->Gdtom(center,hits,1);
977 hits[3] = destep*1e9; //Number in eV
978 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
983 //------------------------------------------------------------------------
986 void AliPMDv0::GetParameters()
988 // This gives all the parameters of the detector
989 // such as Length of Supermodules
990 // thickness of the Supermodule
992 Int_t ncellum, numum;
995 fNcellSM = ncellum * numum; //no. of cells in a row in one supermodule
996 fSMLength = (fNcellSM + 0.25 )*fgkCellRadius*2.;
997 fSMthick = fgkThBase + fgkThAir + fgkThPCB + fgkCellDepth +
998 fgkThPCB + fgkThAir + fgkThPCB;