1 /***************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 Revision 1.30 2003/10/23 16:32:19 hristov
18 MC-dependent part of AliRun extracted in AliMC (F.Carminati)
20 Revision 1.29 2003/10/13 05:28:59 bnandi
21 gaspmd[2] value changed 0.25->7.0 because of overlap
23 Revision 1.28 2003/10/08 12:59:08 bnandi
26 Revision 1.27 2003/10/08 12:56:58 bnandi
27 gaspmd[2] value changed from 7.0 to 0.25
29 Revision 1.26 2003/10/03 06:04:10 bnandi
30 z_psa and z_psb bugs fixed
32 Revision 1.25 2003/10/01 11:08:04 bnandi
35 Revision 1.24 2003/10/01 08:32:51 hristov
36 CurrentTrack replaced by GetCurrentTrackNumber
38 Revision 1.23 2003/10/01 05:07:51 bnandi
39 New geometry in new Alice Coordinate system
41 New rectangular geometry for ALICE PMD - Bedanga Mohanty and Y. P. Viyogi
45 ///////////////////////////////////////////////////////////////////////////////
47 // Photon Multiplicity Detector Version 1 //
51 <img src="picts/AliPMDv1Class.gif">
55 ///////////////////////////////////////////////////////////////////////////////
62 #include "Riostream.h"
63 #include <TVirtualMC.h>
66 static Int_t gAliNcolUM1, gAliNcolUM2, gAliNrowUM1, gAliNrowUM2;
67 static Int_t gAliKdet;
68 static Float_t gAliSMLengthax, gAliSMLengthay;
69 static Float_t gAliSMLengthbx, gAliSMLengthby;
70 static Float_t gAliZdist, gAliZdist1;
71 static Float_t gAliSMthick, gAliCellRadius, gAliCellWall, gAliCellDepth;
72 static Float_t gAliBoundary, gAliThBase, gAliThAir, gAliThPCB;
73 static Float_t gAliThLead, gAliThSteel;
77 //_____________________________________________________________________________
81 // Default constructor
86 //_____________________________________________________________________________
87 AliPMDv1::AliPMDv1(const char *name, const char *title)
91 // Standard constructor
96 //_____________________________________________________________________________
97 void AliPMDv1::CreateGeometry()
99 // Create geometry for Photon Multiplicity Detector
106 //_____________________________________________________________________________
107 void AliPMDv1::CreateSupermodule()
110 // Creates the geometry of the cells of PMD, places them in supermodule
111 // which is a rectangular object.
112 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is
113 // placed inside another hexagonal cell made of Cu (ECCU) with larger
114 // radius, compared to ECAR. The difference in radius gives the dimension
115 // of half width of each cell wall.
116 // These cells are placed in a rectangular strip which are of 2 types
118 // 2 types of unit modules are made EUM1 and EUM2 which contains these strips
120 // Each supermodule (ESMA, ESMB), made of G10 is filled with following
121 //components. They have 9 unit moudles inside them
122 // ESMA, ESMB are placed in EPMD along with EMPB (Pb converter)
123 // and EMFE (iron support)
130 const Float_t kroot3by2 = TMath::Sqrt(3.) /2.;
131 const Float_t kroot3 = TMath::Sqrt(3.);
132 Int_t *idtmed = fIdtmed->GetArray()-599;
134 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
135 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
137 gAliZdist = TMath::Abs(gAliZdist1);
139 // First create the sensitive medium of a hexagon cell (ECAR)
140 // Inner hexagon filled with gas (Ar+CO2)
142 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
143 hexd2[4] = -gAliCellDepth/2.;
144 hexd2[7] = gAliCellDepth/2.;
145 hexd2[6] = gAliCellRadius - gAliCellWall;
146 hexd2[9] = gAliCellRadius - gAliCellWall;
148 gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
149 gMC->Gsatt("ECAR", "SEEN", 0);
151 // Place the sensitive medium inside a hexagon copper cell (ECCU)
152 // Outer hexagon made of Copper
154 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
155 hexd1[4] = -gAliCellDepth/2.;
156 hexd1[7] = gAliCellDepth/2.;
157 hexd1[6] = gAliCellRadius;
158 hexd1[9] = gAliCellRadius;
160 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
161 gMC->Gsatt("ECCU", "SEEN", 0);
163 // Place inner hex (sensitive volume) inside outer hex (copper)
165 gMC->Gsposp("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY", hexd2, 10);
167 // Now create Rectangular TWO strips (EST1, EST2)
168 // of 1 column and 48 or 96 cells length
170 // volume for first strip EST1 made of AIR
173 dbox1[0] = gAliNcolUM1*gAliCellRadius;
174 dbox1[1] = gAliCellRadius/kroot3by2;
175 dbox1[2] = gAliCellDepth/2.;
177 gMC->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3);
178 gMC->Gsatt("EST1", "SEEN", 0);
180 // volume for second strip EST2
183 dbox2[0] = gAliNcolUM2*gAliCellRadius;
187 gMC->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3);
188 gMC->Gsatt("EST2", "SEEN", 0);
190 // Place hexagonal cells ECCU placed inside EST1
193 xb = -(dbox1[0]) + gAliCellRadius;
194 for (i = 1; i <= gAliNcolUM1; ++i)
197 gMC->Gsposp("ECCU", number, "EST1", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
198 xb += (gAliCellRadius*2.);
200 // Place hexagonal cells ECCU placed inside EST2
203 xb = -(dbox2[0]) + gAliCellRadius;
204 for (i = 1; i <= gAliNcolUM2; ++i)
207 gMC->Gsposp("ECCU", number, "EST2", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
208 xb += (gAliCellRadius*2.);
213 // 2 types of rectangular shaped unit modules EUM1 and EUM2 (defined by BOX)
218 dbox3[0] = dbox1[0]+gAliCellRadius/2.;
219 dbox3[1] = (dbox1[1]*gAliNrowUM1)-(gAliCellRadius*kroot3*(gAliNrowUM1-1)/6.);
220 dbox3[2] = gAliCellDepth/2.;
222 gMC->Gsvolu("EUM1","BOX", idtmed[698], dbox3, 3);
223 gMC->Gsatt("EUM1", "SEEN", 1);
225 // Place rectangular strips EST1 inside EUM1 unit module
227 yb = -dbox3[1]+dbox1[1];
228 for (j = 1; j <= gAliNrowUM1; ++j)
232 xb =gAliCellRadius/2.0;
236 xb = -gAliCellRadius/2.0;
239 gMC->Gsposp("EST1",number, "EUM1", xb, yb , 0. , 0, "MANY",dbox1,3);
240 yb = (-dbox3[1]+dbox1[1])+j*1.0*gAliCellRadius*kroot3;
246 dbox4[0] = dbox2[0]+gAliCellRadius/2.;
247 dbox4[1] =(dbox2[1]*gAliNrowUM2)-(gAliCellRadius*kroot3*(gAliNrowUM2-1)/6.);
250 gMC->Gsvolu("EUM2","BOX", idtmed[698], dbox4, 3);
251 gMC->Gsatt("EUM2", "SEEN", 1);
253 // Place rectangular strips EST2 inside EUM2 unit module
255 yb = -dbox4[1]+dbox2[1];
256 for (j = 1; j <= gAliNrowUM2; ++j)
260 xb =gAliCellRadius/2.0;
264 xb = -gAliCellRadius/2.0;
267 gMC->Gsposp("EST2",number, "EUM2", xb, yb , 0. , 0, "MANY",dbox2,3);
268 yb = (-dbox4[1]+dbox2[1])+j*1.0*gAliCellRadius*kroot3;
271 // 2 types of Rectangular shaped supermodules (BOX)
272 //each with 6 unit modules
274 // volume for SUPERMODULE ESMA
275 //Space added to provide a gapping for HV between UM's
278 dboxSM1[0] = 3.0*dbox3[0]+(2.0*0.025);
279 dboxSM1[1] = 2.0*dbox3[1]+0.025;
280 dboxSM1[2] = gAliCellDepth/2.;
282 gMC->Gsvolu("ESMA","BOX", idtmed[698], dboxSM1, 3);
283 gMC->Gsatt("ESMA", "SEEN", 1);
285 //Position the 6 unit modules in EMSA
286 Float_t xa1,xa2,xa3,ya1,ya2;
287 xa1 = -dboxSM1[0] + dbox3[0];
289 xa3 = dboxSM1[0] - dbox3[0];
290 ya1 = dboxSM1[1] - dbox3[1];
291 ya2 = -dboxSM1[1] + dbox3[1];
293 gMC->Gsposp("EUM1", 1, "ESMA", xa1, ya1, 0., 0, "ONLY",dbox3,3);
294 gMC->Gsposp("EUM1", 2, "ESMA", xa2, ya1, 0., 0, "ONLY",dbox3,3);
295 gMC->Gsposp("EUM1", 3, "ESMA", xa3, ya1, 0., 0, "ONLY",dbox3,3);
296 gMC->Gsposp("EUM1", 4, "ESMA", xa1, ya2, 0., 0, "ONLY",dbox3,3);
297 gMC->Gsposp("EUM1", 5, "ESMA", xa2, ya2, 0., 0, "ONLY",dbox3,3);
298 gMC->Gsposp("EUM1", 6, "ESMA", xa3, ya2, 0., 0, "ONLY",dbox3,3);
301 // volume for SUPERMODULE ESMB
302 //Space is added to provide a gapping for HV between UM's
304 dboxSM2[0] = 2.0*dbox4[0]+0.025;
305 dboxSM2[1] = 3.0*dbox4[1]+(2.0*0.025);
306 dboxSM2[2] = gAliCellDepth/2.;
308 gMC->Gsvolu("ESMB","BOX", idtmed[698], dboxSM2, 3);
309 gMC->Gsatt("ESMB", "SEEN", 1);
311 //Position the 6 unit modules in EMSB
312 Float_t xb1,xb2,yb1,yb2,yb3;
313 xb1 = -dboxSM2[0] +dbox4[0];
314 xb2 = dboxSM2[0]-dbox4[0];
315 yb1 = dboxSM2[1]-dbox4[1];
317 yb3 = -dboxSM2[1]+dbox4[1];
319 gMC->Gsposp("EUM2", 1, "ESMB", xb1, yb1, 0., 0, "ONLY",dbox4,3);
320 gMC->Gsposp("EUM2", 2, "ESMB", xb2, yb1, 0., 0, "ONLY",dbox4,3);
321 gMC->Gsposp("EUM2", 3, "ESMB", xb1, yb2, 0., 0, "ONLY",dbox4,3);
322 gMC->Gsposp("EUM2", 4, "ESMB", xb2, yb2, 0., 0, "ONLY",dbox4,3);
323 gMC->Gsposp("EUM2", 5, "ESMB", xb1, yb3, 0., 0, "ONLY",dbox4,3);
324 gMC->Gsposp("EUM2", 6, "ESMB", xb2, yb3, 0., 0, "ONLY",dbox4,3);
327 // Make a 3mm thick G10 Base plate for ESMA
329 dboxG1a[0] = dboxSM1[0];
330 dboxG1a[1] = dboxSM1[1];
331 dboxG1a[2] = gAliThBase/2.;
333 gMC->Gsvolu("EBPA","BOX", idtmed[607], dboxG1a, 3);
334 gMC->Gsatt("EBPA", "SEEN", 1);
336 // Make a 1.6mm thick G10 PCB for ESMA
338 dboxG2a[0] = dboxSM1[0];
339 dboxG2a[1] = dboxSM1[1];
340 dboxG2a[2] = gAliThPCB/2.;
342 gMC->Gsvolu("EPCA","BOX", idtmed[607], dboxG2a, 3);
343 gMC->Gsatt("EPCA", "SEEN", 1);
346 // Make a Full module EFPA of AIR to place EBPA,
347 // 1mm AIR, EPCA, ESMA,EPCA for PMD
350 dboxAlla[0] = dboxSM1[0];
351 dboxAlla[1] = dboxSM1[1];
352 dboxAlla[2] = (gAliThBase+0.1+gAliThPCB+dboxSM1[2]+gAliThPCB)/2.;
354 gMC->Gsvolu("EFPA","BOX", idtmed[698], dboxAlla, 3);
355 gMC->Gsatt("EFPA", "SEEN", 1);
358 // Make a Full module EFCA of AIR to place EBPA,
359 // 1mm AIR, EPCA, ESMA,EPC for CPV
360 Float_t dboxAlla2[3];
361 dboxAlla2[0] = dboxSM1[0];
362 dboxAlla2[1] = dboxSM1[1];
363 dboxAlla2[2] = (gAliThBase+0.1+gAliThPCB+dboxSM1[2]+gAliThPCB)/2.;
365 gMC->Gsvolu("EFCA","BOX", idtmed[698], dboxAlla2, 3);
366 gMC->Gsatt("EFCA", "SEEN", 1);
368 // Now place everything in EFPA for PMD
370 Float_t zbpa,zpcba1,zpcba2,zsma;
371 zpcba1 = - dboxAlla[2]+gAliThPCB/2.0;
372 gMC->Gsposp("EPCA", 1, "EFPA", 0., 0., zpcba1, 0, "ONLY",dboxG2a,3);
373 zsma = zpcba1+dboxSM1[2];
374 gMC->Gsposp("ESMA", 1, "EFPA", 0., 0., zsma, 0, "ONLY",dboxSM1,3);
375 zpcba2 = zsma+gAliThPCB/2.0;
376 gMC->Gsposp("EPCA", 2, "EFPA", 0., 0., zpcba2, 0, "ONLY",dboxG2a,3);
377 zbpa = zpcba2+0.1+gAliThBase/2.0; // 0.1 for 0.1 mm Air gap
378 gMC->Gsposp("EBPA", 1, "EFPA", 0., 0., zbpa, 0, "ONLY",dboxG1a,3);
380 // Now place everything in EFCA for CPV
382 Float_t zbpa2,zpcba12,zpcba22,zsma2;
383 zbpa2 = - dboxAlla2[2]+gAliThBase/2.0;
384 gMC->Gsposp("EBPA", 1, "EFCA", 0., 0., zbpa2, 0, "ONLY",dboxG1a,3);
385 zpcba12 = zbpa2+0.1+gAliThPCB/2.0;
386 gMC->Gsposp("EPCA", 1, "EFCA", 0., 0., zpcba12, 0, "ONLY",dboxG2a,3);
387 zsma2 = zpcba12+dboxSM1[2];
388 gMC->Gsposp("ESMA", 1, "EFCA", 0., 0., zsma2, 0, "ONLY",dboxSM1,3);
389 zpcba22 = zsma2+gAliThPCB/2.0;
390 gMC->Gsposp("EPCA", 2, "EFCA", 0., 0., zpcba22, 0, "ONLY",dboxG2a,3);
394 // Make a 3mm thick G10 Base plate for ESMB
396 dboxG1b[0] = dboxSM2[0];
397 dboxG1b[1] = dboxSM2[1];
398 dboxG1b[2] = gAliThBase/2.;
400 gMC->Gsvolu("EBPB","BOX", idtmed[607], dboxG1b, 3);
401 gMC->Gsatt("EBPB", "SEEN", 1);
403 // Make a 1.6mm thick G10 PCB for ESMB
405 dboxG2b[0] = dboxSM2[0];
406 dboxG2b[1] = dboxSM2[1];
407 dboxG2b[2] = gAliThPCB/2.;
409 gMC->Gsvolu("EPCB","BOX", idtmed[607], dboxG2b, 3);
410 gMC->Gsatt("EPCB", "SEEN", 1);
413 // Make a Full module EFPB of AIR to place EBPB,
414 //1mm AIR, EPCB, ESMB,EPCB for PMD
416 dboxAllb[0] = dboxSM2[0];
417 dboxAllb[1] = dboxSM2[1];
418 dboxAllb[2] = (gAliThBase+0.1+gAliThPCB+dboxSM2[2]+gAliThPCB)/2.;
420 gMC->Gsvolu("EFPB","BOX", idtmed[698], dboxAllb, 3);
421 gMC->Gsatt("EFPB", "SEEN", 1);
423 // Make a Full module EFCB of AIR to place EBPB,
424 //1mm AIR, EPCB, ESMB,EPCB for CPV
425 Float_t dboxAllb2[3];
426 dboxAllb2[0] = dboxSM2[0];
427 dboxAllb2[1] = dboxSM2[1];
428 dboxAllb2[2] = (gAliThBase+0.1+gAliThPCB+dboxSM2[2]+gAliThPCB)/2.;
430 gMC->Gsvolu("EFCB","BOX", idtmed[698], dboxAllb2, 3);
431 gMC->Gsatt("EFCB", "SEEN", 1);
434 // Now place everything in EFPB for PMD
436 Float_t zbpb,zpcbb1,zpcbb2,zsmb;
437 zpcbb1 = - dboxAllb[2]+gAliThPCB/2.0;
438 gMC->Gsposp("EPCB", 1, "EFPB", 0., 0., zpcbb1, 0, "ONLY",dboxG2b,3);
439 zsmb = zpcbb1+dboxSM2[2];
440 gMC->Gsposp("ESMB", 1, "EFPB", 0., 0., zsmb, 0, "ONLY",dboxSM2,3);
441 zpcbb2 = zsmb+gAliThPCB/2.0;
442 gMC->Gsposp("EPCB", 2, "EFPB", 0., 0., zpcbb2, 0, "ONLY",dboxG2b,3);
443 zbpb = zpcbb2+0.1+gAliThBase/2.0; // 0.1 for 0.1 mm Air gap
444 gMC->Gsposp("EBPB", 1, "EFPB", 0., 0., zbpb, 0, "ONLY",dboxG1b,3);
447 // Now place everything in EFCB for CPV
449 Float_t zbpb2,zpcbb12,zpcbb22,zsmb2;
450 zbpb2 = - dboxAllb2[2]+gAliThBase/2.0;
451 gMC->Gsposp("EBPB", 1, "EFCB", 0., 0., zbpb2, 0, "ONLY",dboxG1b,3);
452 zpcbb12 = zbpb2+0.1+gAliThPCB/2.0;
453 gMC->Gsposp("EPCB", 1, "EFCB", 0., 0., zpcbb12, 0, "ONLY",dboxG2b,3);
454 zsmb2 = zpcbb12+dboxSM2[2];
455 gMC->Gsposp("ESMB", 1, "EFCB", 0., 0., zsmb2, 0, "ONLY",dboxSM2,3);
456 zpcbb22 = zsmb2+gAliThPCB/2.0;
457 gMC->Gsposp("EPCB", 2, "EFCB", 0., 0., zpcbb22, 0, "ONLY",dboxG2b,3);
460 // Master MODULE EMPA of aluminum for PMD
461 fDboxmm1[0] = dboxSM1[0]+gAliBoundary;
462 fDboxmm1[1] = dboxSM1[1]+gAliBoundary;
463 fDboxmm1[2] = dboxAlla[2];
465 gMC->Gsvolu("EMPA","BOX", idtmed[603], fDboxmm1, 3);
466 gMC->Gsatt("EMPA", "SEEN", 1);
468 // Master MODULE EMCA of aluminum for CPV
469 fDboxmm12[0] = dboxSM1[0]+gAliBoundary;
470 fDboxmm12[1] = dboxSM1[1]+gAliBoundary;
471 fDboxmm12[2] = dboxAlla[2];
473 gMC->Gsvolu("EMCA","BOX", idtmed[603], fDboxmm12, 3);
474 gMC->Gsatt("EMCA", "SEEN", 1);
477 //Position EFMA inside EMMA for PMD and CPV
478 gMC->Gsposp("EFPA", 1, "EMPA", 0., 0., 0., 0, "ONLY",dboxAlla,3);
479 gMC->Gsposp("EFCA", 1, "EMCA", 0., 0., 0., 0, "ONLY",dboxAlla2,3);
482 // Master MODULE EMPB of aluminum for PMD
483 fDboxmm2[0] = dboxSM2[0]+gAliBoundary;
484 fDboxmm2[1] = dboxSM2[1]+gAliBoundary;
485 fDboxmm2[2] = dboxAllb[2];
487 gMC->Gsvolu("EMPB","BOX", idtmed[603], fDboxmm2, 3);
488 gMC->Gsatt("EMPB", "SEEN", 1);
490 // Master MODULE EMCB of aluminum for CPV
491 fDboxmm22[0] = dboxSM2[0]+gAliBoundary;
492 fDboxmm22[1] = dboxSM2[1]+gAliBoundary;
493 fDboxmm22[2] = dboxAllb[2];
495 gMC->Gsvolu("EMCB","BOX", idtmed[603], fDboxmm22, 3);
496 gMC->Gsatt("EMCB", "SEEN", 1);
499 //Position EFMB inside EMMB
500 gMC->Gsposp("EFPB", 1, "EMPB", 0., 0., 0., 0, "ONLY",dboxAllb,3);
501 gMC->Gsposp("EFCB", 1, "EMCB", 0., 0., 0., 0, "ONLY",dboxAllb2,3);
505 //_____________________________________________________________________________
507 void AliPMDv1::CreatePMD()
510 // Create final detector from supermodules
511 // -- Author : Bedanga and Viyogi June 2003
514 Int_t jhrot12,jhrot13, irotdm;
515 Int_t *idtmed = fIdtmed->GetArray()-599;
517 //VOLUMES Names : begining with "E" for all PMD volumes,
519 // --- DEFINE Iron, and lead volumes for SM A
522 dboxPba[0] = gAliSMLengthax;
523 dboxPba[1] = gAliSMLengthay;
524 dboxPba[2] = gAliThLead/2.;
526 gMC->Gsvolu("EPBA","BOX", idtmed[600], dboxPba, 3);
527 gMC->Gsatt ("EPBA", "SEEN", 0);
531 dboxFea[0] = gAliSMLengthax;
532 dboxFea[1] = gAliSMLengthay;
533 dboxFea[2] = gAliThSteel/2.;
535 gMC->Gsvolu("EFEA","BOX", idtmed[618], dboxFea, 3);
536 gMC->Gsatt ("EFEA", "SEEN", 0);
538 // --- DEFINE Iron, and lead volumes for SM B
541 dboxPbb[0] = gAliSMLengthbx;
542 dboxPbb[1] = gAliSMLengthby;
543 dboxPbb[2] = gAliThLead/2.;
545 gMC->Gsvolu("EPBB","BOX", idtmed[600], dboxPbb, 3);
546 gMC->Gsatt ("EPBB", "SEEN", 0);
550 dboxFeb[0] = gAliSMLengthbx;
551 dboxFeb[1] = gAliSMLengthby;
552 dboxFeb[2] = gAliThSteel/2.;
554 gMC->Gsvolu("EFEB","BOX", idtmed[618], dboxFeb, 3);
555 gMC->Gsatt ("EFEB", "SEEN", 0);
558 // Gaspmd, the dimension of RECTANGULAR mother volume of PMD,
560 Float_t gaspmd[3] = {81.5,94.5,7.};
561 gaspmd[0] = gAliSMLengthax+gAliSMLengthbx;
562 gaspmd[1] = gAliSMLengthay+gAliSMLengthby;
565 gMC->Gsvolu("EPMD", "BOX", idtmed[698], gaspmd, 3);
566 gMC->Gsatt("EPMD", "SEEN", 1);
568 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
570 AliMatrix(jhrot12, 90., 180., 90., 270., 0., 0.);
571 AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
575 xsma = -(gAliSMLengthbx)/1.0;
576 ysma = gAliSMLengthby;
577 xsmb = -gAliSMLengthax;
578 ysmb = -gAliSMLengthay;
580 //Complete detector for Type A
581 //Position Super modules type A for both CPV and PMD in EPMD
582 Float_t zpsa,zpba,zfea,zcva;
584 zpsa = - gaspmd[2] + gAliSMthick/2.;
586 gMC->Gsposp("EMPA", 1, "EPMD", xsma, ysma, zpsa, 0, "ONLY",fDboxmm1,3);
587 gMC->Gsposp("EMPA", 2, "EPMD", -xsma, -ysma, zpsa, jhrot12, "ONLY",fDboxmm1,3);
588 zpba=zpsa+gAliSMthick/2.+dboxPba[2];
589 gMC->Gsposp("EPBA", 1, "EPMD", xsma, ysma, zpba, 0, "ONLY",dboxPba,3);
590 gMC->Gsposp("EPBA", 2, "EPMD", -xsma, -ysma, zpba, 0, "ONLY",dboxPba,3);
591 zfea=zpba+dboxPba[2]+dboxFea[2];
592 gMC->Gsposp("EFEA", 1, "EPMD", xsma, ysma, zfea, 0, "ONLY",dboxFea,3);
593 gMC->Gsposp("EFEA", 2, "EPMD", -xsma, -ysma, zfea, 0, "ONLY",dboxFea,3);
594 zcva=zfea+dboxFea[2]+gAliSMthick/2.;
595 gMC->Gsposp("EMCA", 1, "EPMD", xsma, ysma, zcva, 0, "ONLY",fDboxmm12,3);
596 gMC->Gsposp("EMCA", 2, "EPMD", -xsma,-ysma, zcva, jhrot12, "ONLY",fDboxmm12,3);
598 //Complete detector for Type B
599 //Position Super modules type B for both CPV and PMD in EPMD
600 Float_t zpsb,zpbb,zfeb,zcvb;
601 zpsb = - gaspmd[2] + gAliSMthick/2.;
603 gMC->Gsposp("EMPB", 3, "EPMD", xsmb, ysmb, zpsb, 0, "ONLY",fDboxmm2,3);
604 gMC->Gsposp("EMPB", 4, "EPMD", -xsmb, -ysmb, zpsb, jhrot12, "ONLY",fDboxmm2,3);
605 zpbb=zpsb+gAliSMthick/2.+dboxPbb[2];
606 gMC->Gsposp("EPBB", 3, "EPMD", xsmb, ysmb, zpbb, 0, "ONLY",dboxPbb,3);
607 gMC->Gsposp("EPBB", 4, "EPMD", -xsmb, -ysmb, zpbb, 0, "ONLY",dboxPbb,3);
608 zfeb=zpbb+dboxPbb[2]+dboxFeb[2];
609 gMC->Gsposp("EFEB", 3, "EPMD", xsmb, ysmb, zfeb, 0, "ONLY",dboxFeb,3);
610 gMC->Gsposp("EFEB", 4, "EPMD", -xsmb, -ysmb, zfeb, 0, "ONLY",dboxFeb,3);
611 zcvb=zfeb+dboxFeb[2]+gAliSMthick/2.;
612 gMC->Gsposp("EMCB", 3, "EPMD", xsmb, ysmb, zcvb, 0, "ONLY",fDboxmm22,3);
613 gMC->Gsposp("EMCB", 4, "EPMD", -xsmb,-ysmb, zcvb, jhrot12, "ONLY",fDboxmm22,3);
615 // --- Place the EPMD in ALICE
620 //Position Full PMD in ALICE
621 gMC->Gsposp("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY",gaspmd,3);
626 //_____________________________________________________________________________
627 void AliPMDv1::DrawModule() const
629 // Draw a shaded view of the Photon Multiplicity Detector
631 // cout << " Inside Draw Modules " << endl;
633 gMC->Gsatt("*", "seen", -1);
634 gMC->Gsatt("alic", "seen", 0);
636 // Set the visibility of the components
638 gMC->Gsatt("ECAR","seen",0);
639 gMC->Gsatt("ECCU","seen",1);
640 gMC->Gsatt("EST1","seen",1);
641 gMC->Gsatt("EST2","seen",1);
642 gMC->Gsatt("EUM1","seen",1);
643 gMC->Gsatt("EUM2","seen",1);
644 gMC->Gsatt("ESMA","seen",1);
645 gMC->Gsatt("EPMD","seen",1);
647 gMC->Gdopt("hide", "on");
648 gMC->Gdopt("shad", "on");
649 gMC->Gsatt("*", "fill", 7);
650 gMC->SetClipBox(".");
651 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
653 gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02);
654 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
656 //gMC->Gdman(17, 5, "MAN");
657 gMC->Gdopt("hide", "off");
659 cout << " Outside Draw Modules " << endl;
662 //_____________________________________________________________________________
663 void AliPMDv1::CreateMaterials()
665 // Create materials for the PMD
667 // ORIGIN : Y. P. VIYOGI
669 // cout << " Inside create materials " << endl;
670 // --- The Argon- CO2 mixture ---
671 Float_t ag[2] = { 39.95 };
672 Float_t zg[2] = { 18. };
673 Float_t wg[2] = { .7,.3 };
674 Float_t dar = .001782; // --- Ar density in g/cm3 ---
676 Float_t ac[2] = { 12.,16. };
677 Float_t zc[2] = { 6.,8. };
678 Float_t wc[2] = { 1.,2. };
679 Float_t dc = .001977;
680 Float_t dco = .002; // --- CO2 density in g/cm3 ---
682 Float_t absl, radl, a, d, z;
687 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
688 Float_t zsteel[4] = { 26.,24.,28.,14. };
689 Float_t wsteel[4] = { .715,.18,.1,.005 };
691 Int_t *idtmed = fIdtmed->GetArray()-599;
692 Int_t isxfld = gAlice->Field()->Integ();
693 Float_t sxmgmx = gAlice->Field()->Max();
695 // --- Define the various materials for GEANT ---
696 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
698 AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4);
699 AliMixture(3, "CO2 $", ac, zc, dc, -2, wc);
700 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
701 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
702 AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3);
703 AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.);
704 AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.);
705 AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7);
706 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
707 AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9);
708 AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.);
709 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
710 // AliMaterial(31, "Xenon$", 131.3, 54., dxe, x0xe, 6.5e4);
712 AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.);
713 AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.);
714 AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16);
715 AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.);
717 // define gas-mixtures
720 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
723 dg = (dar * 4 + dco) / 5;
724 AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg);
726 // Define tracking media
727 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
728 AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
729 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
730 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
731 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
732 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
733 AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
734 AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
735 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10);
736 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1);
737 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
738 AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
739 AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
740 AliMedium(19, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
741 // AliMedium(31, "Xenon $", 31, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
743 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
744 gMC->Gstpar(idtmed[600], "LOSS", 3.);
745 gMC->Gstpar(idtmed[600], "DRAY", 1.);
747 gMC->Gstpar(idtmed[603], "LOSS", 3.);
748 gMC->Gstpar(idtmed[603], "DRAY", 1.);
750 gMC->Gstpar(idtmed[604], "LOSS", 3.);
751 gMC->Gstpar(idtmed[604], "DRAY", 1.);
753 gMC->Gstpar(idtmed[605], "LOSS", 3.);
754 gMC->Gstpar(idtmed[605], "DRAY", 1.);
756 gMC->Gstpar(idtmed[606], "LOSS", 3.);
757 gMC->Gstpar(idtmed[606], "DRAY", 1.);
759 gMC->Gstpar(idtmed[607], "LOSS", 3.);
760 gMC->Gstpar(idtmed[607], "DRAY", 1.);
762 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
763 // --- without affecting the hit patterns ---
764 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
765 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
766 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
767 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
768 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
769 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
770 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
771 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
772 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
773 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
774 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
775 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
776 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
777 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
778 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
779 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
780 gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
781 gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
782 gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
783 gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
785 // --- Prevent particles stopping in the gas due to energy cut-off ---
786 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
787 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
788 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
789 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
790 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
792 cout << " Outside create materials " << endl;
796 //_____________________________________________________________________________
797 void AliPMDv1::Init()
800 // Initialises PMD detector after it has been built
806 cout << " Inside Init " << endl;
808 printf("\n%s: ",ClassName());
809 for(i=0;i<35;i++) printf("*");
810 printf(" PMD_INIT ");
811 for(i=0;i<35;i++) printf("*");
812 printf("\n%s: ",ClassName());
813 printf(" PMD simulation package (v1) initialised\n");
814 printf("%s: parameters of pmd\n",ClassName());
815 printf("%s: %10.2f %10.2f %10.2f \
816 %10.2f\n",ClassName(),gAliCellRadius,gAliCellWall,gAliCellDepth,gAliZdist1 );
817 printf("%s: ",ClassName());
818 for(i=0;i<80;i++) printf("*");
822 Int_t *idtmed = fIdtmed->GetArray()-599;
823 fMedSens=idtmed[605-1];
827 //_____________________________________________________________________________
828 void AliPMDv1::StepManager()
831 // Called at each step in the PMD
835 Float_t hits[4], destep;
836 Float_t center[3] = {0,0,0};
840 if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
842 gMC->CurrentVolID(copy);
843 //namep=gMC->CurrentVolName();
844 //printf("Current vol is %s \n",namep);
847 gMC->CurrentVolOffID(1,copy);
848 //namep=gMC->CurrentVolOffName(1);
849 //printf("Current vol 11 is %s \n",namep);
852 gMC->CurrentVolOffID(2,copy);
853 //namep=gMC->CurrentVolOffName(2);
854 //printf("Current vol 22 is %s \n",namep);
857 // if(strncmp(namep,"EHC1",4))vol[2]=1;
859 gMC->CurrentVolOffID(3,copy);
860 //namep=gMC->CurrentVolOffName(3);
861 //printf("Current vol 33 is %s \n",namep);
864 gMC->CurrentVolOffID(4,copy);
865 //namep=gMC->CurrentVolOffName(4);
866 //printf("Current vol 44 is %s \n",namep);
869 gMC->CurrentVolOffID(5,copy);
870 //namep=gMC->CurrentVolOffName(5);
871 //printf("Current vol 55 is %s \n",namep);
874 gMC->CurrentVolOffID(6,copy);
875 //namep=gMC->CurrentVolOffName(6);
876 //printf("Current vol 66 is %s \n",namep);
879 gMC->CurrentVolOffID(7,copy);
880 //namep=gMC->CurrentVolOffName(7);
881 //printf("Current vol 77 is %s \n",namep);
885 //printf("volume number %4d %4d %4d %4d %4d %4d %4d %4d %10.3f \n",vol[0],vol[1],vol[2],vol[3],vol[4],vol[5],vol[6],vol[7],destep*1000000);
887 gMC->Gdtom(center,hits,1);
888 hits[3] = destep*1e9; //Number in eV
889 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
895 //------------------------------------------------------------------------
898 void AliPMDv1::GetParameters()
900 // This gives all the parameters of the detector
901 // such as thickness of the Pb plate, Cell Radius,
902 // Cell thickness, number of rows, number of columns etc.
904 const Float_t kroot3 = TMath::Sqrt(3.);
905 const Float_t kroot3by2 = TMath::Sqrt(3.) /2.;
907 gAliCellRadius = 0.25;
909 gAliCellDepth = 0.25 * 2.;
913 gAliNrowUM1 = 96;//each strip has 1 row
914 gAliNrowUM2 = 48;//each strip has 1 row
916 gAliSMLengthax = (3.0*(gAliNcolUM1*gAliCellRadius+gAliCellRadius/2.)
917 + (2.0*0.025)) + 0.7;
918 gAliSMLengthbx = 2.0*(gAliNcolUM2*gAliCellRadius+gAliCellRadius/2.)
921 gAliSMLengthay = 2.0*(((gAliCellRadius/kroot3by2)*gAliNrowUM1)
922 - (gAliCellRadius*kroot3*(gAliNrowUM1-1)/6.))
924 gAliSMLengthby = 3.0*(((gAliCellRadius/kroot3by2)*gAliNrowUM2)
925 - (gAliCellRadius*kroot3*(gAliNrowUM2-1)/6.))
934 gAliSMthick = gAliThBase + gAliThAir + gAliThPCB
935 + gAliCellDepth + gAliThPCB + gAliThAir + gAliThPCB;