1 ///////////////////////////////////////////////////////////////////////////////
3 // Photon Multiplicity Detector Version 1 //
7 <img src="picts/AliPMDv0Class.gif">
11 ///////////////////////////////////////////////////////////////////////////////
17 static Float_t smod2[3], smod3[3], smod4[3];
18 static Int_t maxbox, kdet;
19 static Float_t thgas,thmin,thmax,zdist,zdist1,thlow,
22 static Float_t xbox[40][40], ybox[40][40];
23 static Int_t pindex[40][40];
26 //_____________________________________________________________________________
27 AliPMDv0::AliPMDv0() : AliPMD()
30 // Default constructor
35 //_____________________________________________________________________________
36 AliPMDv0::AliPMDv0(const char *name, const char *title)
40 // Standard constructor
45 //_____________________________________________________________________________
46 void AliPMDv0::Coordnew()
49 // Find coordinates for pad geometry
51 // Author Y.P. Viyogi, VECC Calcutta
54 Float_t th1, th2, dbox, dist;
55 //Float_t xoff[40][40], yoff[40][40];
58 Int_t xoff1[3], yoff1[3], l;
59 Float_t rhigh, dmax, hole;
63 th1 = thmin * kPI / 180;
64 th2 = thmax * kPI / 180;
65 /* ESTIMATES FOR OCTAGON */
66 dist = zdist * TMath::Tan(th2);
67 /* *** 04.06.97 Fixed Module size of 6 cm, 0 mm boundary. */
68 /* *** variable pad sizes of 0.3 mm, 0.5 mm, 1.0 mm and 1.2 mm */
70 maxbox = Int_t(dist / dbox + .5);
72 /* NOW GET THE HOLE SIZE ETC. */
73 hole = zdist * TMath::Tan(th1);
74 nhol = Int_t(hole / dbox + .5);
77 rlow = zdist * TMath::Tan(thlow * kPI / 180);
78 rhigh = zdist * TMath::Tan(thhigh * kPI / 180);
79 for (i = 1; i <= 40; ++i) {
80 for (j = 1; j <= 40; ++j) {
90 // NOW START PLACING THE BOXES IN VARIOUS LAYERS, START FROM THE CENTRE
93 for(i=0;i<3;i++) yoff1[i]=0;
95 // PRINT*,'MAXBOX=',MAXBOX
96 for (i = 1; i <= maxbox; ++i) {
98 for(j=0;j<3;j++) xoff1[j]=0;
99 for (j = 1; j <= maxbox; ++j) {
100 rr = sqrt(xx*xx+yy*yy);
101 if (rr >= hole && rr <= dmax) {
104 //if (rr < rlow) index[j][i] = 1;
105 //else if (rr > rhigh) index[j][i] = 3;
109 //xoff[j][i] = xoff1[index[j][i] - 1];
110 //yoff[j][i] = yoff1[index[j][i] - 1];
112 if (kdet == 1) kk = 1; else kk = 0;
113 for (l = 1; l <= 3; ++l)
114 xoff1[l - 1] += fNumPads[l + kk - 1];
118 if (kdet == 1) kk = 1; else kk=0;
120 for (l = 1; l <= 3; ++l)
121 yoff1[l - 1] += fNumPads[l + kk - 1];
126 //_____________________________________________________________________________
127 void AliPMDv0::Coordinates()
130 // SUBROUTINE TO COMPUTE THE X- AND Y- COORDINATES OF THE BOXES
131 // WHICH CAN FIT INTO THE CIRCULAR REGION BETWEEN THE GIVEN ANGLES.
132 // INPUT : ZDIST, THMIN, THMAX, PADSIZE (FOR INSIDE and OUTSIDE PMD).
133 // ALL DIMENSIONS IN CM.
134 // -- Author : Y.P. VIYOGI, 10/05/1996.
136 Float_t hole, dmax, dbox;
142 Float_t rhigh, rr, xx, yy, th1, th2;
146 // ESTIMATES FOR OCTAGON
147 dist = zdist * TMath::Tan(th2);
148 // *** 04.06.97 Fixed Module size of 24 cm, 3 mm boundary.
149 // *** variable pad sizes of 8 mm, 10 mm, 12mm and 15 mm
151 maxbox = Int_t(dist / dbox + .5);
153 // NOW GET THE HOLE SIZE ETC.
154 hole = zdist * TMath::Tan(th1);
155 nhol = Int_t(hole / dbox + .5);
158 rlow = zdist * TMath::Tan(thlow*kPI/180);
159 rhigh = zdist * TMath::Tan(thhigh*kPI/180);
160 for (i = 0; i < 40; ++i) {
161 for (j = 0; j < 40; ++j) {
168 // NOW START PLACING THE BOXES IN VARIOUS LAYERS, START FROM THE CENTRE
171 for (i = 0; i < maxbox; ++i) {
173 for (j = 0; j < maxbox; ++j) {
174 rr = TMath::Sqrt(xx*xx + yy*yy);
175 if (rr >= hole && rr <= dmax) { // BOX CAN BE FITTED
177 if (rr < rlow) pindex[j][i] = 1;
178 if (rr > rhigh) pindex[j][i] = 3;
189 //_____________________________________________________________________________
190 void AliPMDv0::CreateGeometry()
193 // Create geometry for Photon Multiplicity Detector Version 1
197 <img src="picts/AliPMDv0.gif">
202 <img src="picts/AliPMDv0Tree.gif">
209 //_____________________________________________________________________________
210 void AliPMDv0::CreateInside()
213 // Create inside of Pads
215 // -- Author : Y.P. VIYOGI, 07/05/1996.
216 // -- Modified: P.V.K.S.Baba(JU), 15-12-97.
218 Float_t sipmd[3] = { 300.,300.,5. };
222 Float_t xiqa[4], yiqa[4];
223 Int_t inum2, inum3, inum4, i, j, k;
225 Float_t zd, xd, yd, xp, yp, zp;
228 Int_t *idtmed = fIdtmed->GetArray()-599;
230 // VOLUMES Names : begining with D for all PMD volumes,
231 // The names of SIZE variables begin with S and have more meaningful
232 // characters as shown below.
234 // VOLUME SIZE MEDIUM : REMARKS
235 // ------ ----- ------ : ---------------------------
237 // DPMD SIPMD AIR : INSIDE PMD and its SIZE
241 // *** Define the DPMD Volume and fill with air ***
243 gMC->Gsvolu("DPMD", "BOX ", idtmed[698], sipmd, 3);
245 // *** Define DIQU Volume and fill with air
246 siqad[0] = sipmd[0] / 2. - 1.;
247 siqad[1] = sipmd[1] / 2. - 1.;
249 gMC->Gsvolu("DIQU","BOX ", idtmed[698], siqad, 3);
250 gMC->Gsatt("DIQU", "SEEN", 1);
253 // --- Place the modules in INSIDE PMD (DPMD)
254 // --- FIRST CALCULATE THE COORDINATES OF THE MODULES WHICH CAN BE
262 AliMatrix(idrotm[1], 90., 0., 90., 90., 0., 0.);
263 AliMatrix(idrotm[2], 90., 180., 90., 90., 0., 0.);
264 AliMatrix(idrotm[3], 90., 180., 90., 270., 0., 0.);
265 AliMatrix(idrotm[4], 90., 0., 90., 270., 0., 0.);
266 // **** Filling the DIQU Vol. (One Quadrant)
270 for (i = 0; i < maxbox; ++i) {
272 for (j = 0; j < i2; ++j) {
273 if (xbox[j][i] <= 0 && ybox[j][i] <= 0) continue;
274 xd = xbox[j][i] - siqad[0];
275 yd = ybox[j][i] - siqad[1];
276 if (pindex[j][i] == 1) {
278 gMC->Gsposp("DM11", inum2, "DIQU", xd, yd, zd, 0, "ONLY", smod2, 3);
280 if (pindex[j][i] == 2) {
282 gMC->Gsposp("DM12", inum3, "DIQU", xd, yd, zd, 0, "ONLY", smod3, 3);
284 if (pindex[j][i] == 3) {
286 gMC->Gsposp("DM13", inum4, "DIQU", xd, yd, zd, 0, "ONLY", smod4, 3);
299 for (k = 1; k <= i2; ++k) {
300 gMC->Gsposp("DIQU", k, "DPMD", xiqa[k-1], yiqa[k-1], zd, idrotm[k], "ONLY", siqad, 3);
303 // --- Place the DPMD in ALICE with front edge 6.0m from vertex ---
307 gMC->Gspos("DPMD", 1, "ALIC", xp, yp, zp, 0, "ONLY");
311 //_____________________________________________________________________________
312 void AliPMDv0::CreatePads()
315 // Create the geometry of the pads
316 // *** DEFINITION OF THE GEOMETRY OF THE PMD ***
317 // *** DIFFERENT PADS WITH SIZES 8 MM, 10 MM, 12 MM AND 15 MM SQUARE
318 // -- Author : Y.P. VIYOGI, 04/06/1997.
319 // -- Modified: P.V.K.S.Baba(JU), 13-12-97.
322 Float_t /* scpv1[3], */ scpv2[3] /*, scpv3[3], scpv4[3] */;
323 Float_t spsw1[3], spsw2[3];//, spsw3[3], spsw4[3];
324 Float_t sw[3], xc, yc, zc;
326 Float_t spb[3], pad1, pad2, pad3, pad4;
327 // VOLUMES Names : begining with D for all PMD volumes,
329 // DM11 : MODULE TYPE
331 // The names of SIZE variables begin with S and have more meaningful
332 // characters as shown below.
334 // VOLUME SIZE MEDIUM : REMARKS
335 // ------ ----- ------ : ---------------------------
337 // DPPB SPB PB : PB Converter and its SIZE
338 // DPFE SFE FE : FE Support Plate and its SIZE
340 // DW11 SPSW3 G10 : PRESHOWER
341 // DV11 SCPV3 G10 : CPV
342 // ****************** VOLUME TREE ******************
347 // -------------------------------------------------
350 // DV11( CPV) DPFE DPPB DW11(Preshower)
351 // ************************************************************
355 Int_t *idtmed = fIdtmed->GetArray()-599;
361 zdist = TMath::Abs(zdist1);
365 numqu = Int_t(fGeo[2]);
371 npad2 = Int_t(24/fPadSize[1]);
373 spsw2[0] = (npad2 * pad2)/2 + edge;
375 spsw2[2] = (thgas + .4) / 2;
379 // The modules (DW11 and DV11 are filed with gas, G10 plate is ignored)
380 gMC->Gsvolu("DW11","BOX ", idtmed[604], spsw2, 3);
381 gMC->Gsatt("DW11", "SEEN", 1);
382 gMC->Gsvolu("DV11","BOX ", idtmed[604], spsw2, 3);
383 gMC->Gsatt("DV11", "SEEN", 1);
385 // --- DEFINE MODULES, IRON, TUNGSTEN AND LEAD VOLUMES
391 gMC->Gsvolu("DPPB","BOX ", idtmed[600], spb, 3);
392 gMC->Gsatt("DPPB", "SEEN", 1);
397 gMC->Gsvolu("DPW ","BOX ", idtmed[600], sw, 3);
398 gMC->Gsatt("DPW ", "SEEN", 1);
403 gMC->Gsvolu("DPFE","BOX ", idtmed[605], sfe, 3);
404 gMC->Gsatt("DPFE", "SEEN", 1);
408 smod2[2] = spsw2[2] + sfe[2] + spb[2] + scpv2[2];
409 gMC->Gsvolu("DM11", "BOX ", idtmed[698], smod2, 3);
411 // --- place gas box (as CPV), iron support, lead converter and gas box
412 // --- (preshower) in the module
415 // --- First the CPV box
416 zc = -(spsw2[2] + sfe[2] + spb[2] + spsw2[2]) + spsw2[2];
417 gMC->Gspos("DV11", 1, "DM11", xc, yc, zc, 0, "ONLY");
418 // --- Then iron support plate
419 zc = zc + sfe[2] + spsw2[2];
420 gMC->Gspos("DPFE", 1, "DM11", xc, yc, zc, 0, "ONLY");
421 // --- Then lead converter plate
422 zc = zc + sfe[2] + spb[2];
423 gMC->Gspos("DPPB", 1, "DM11", xc, yc, zc, 0, "ONLY");
424 // --- Lastly the preshower box
425 zc = zc + spb[2] + spsw2[2];
426 gMC->Gspos("DW11", 1, "DM11", xc, yc, zc, 0, "ONLY");
430 //_____________________________________________________________________________
431 void AliPMDv0::DrawModule()
434 // Draw a shaded view of the Photon Multiplicity Detector
437 gMC->Gsatt("*", "seen", -1);
438 gMC->Gsatt("alic", "seen", 0);
440 // Set the visibility of the components
442 gMC->Gsatt("DW11","seen",0);
443 gMC->Gsatt("DV11","seen",0);
444 gMC->Gsatt("DPPB","seen",1);
445 gMC->Gsatt("DPW ","seen",1);
446 gMC->Gsatt("DPFE","seen",1);
447 gMC->Gsatt("DM11","seen",1);
448 gMC->Gsatt("DPMD","seen",0);
449 gMC->Gsatt("DIQU","seen",0);
451 gMC->Gdopt("hide", "on");
452 gMC->Gdopt("shad", "on");
453 gMC->Gsatt("*", "fill", 7);
454 gMC->SetClipBox(".");
455 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
457 gMC->Gdraw("alic", 40, 30, 0, 22, 15.5, .04, .04);
458 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
459 gMC->Gdman(17, 5, "MAN");
460 gMC->Gdopt("hide", "off");
463 //_____________________________________________________________________________
464 void AliPMDv0::CreateMaterials()
467 // Create materials for the PMD version 1
469 // ORIGIN : Y. P. VIYOGI
472 // --- The Argon- CO2 mixture ---
473 Float_t ag[2] = { 39.95 };
474 Float_t zg[2] = { 18. };
475 Float_t wg[2] = { .8,.2 };
476 Float_t dar = .001782; // --- Ar density in g/cm3 ---
478 Float_t ac[2] = { 12.,16. };
479 Float_t zc[2] = { 6.,8. };
480 Float_t wc[2] = { 1.,2. };
481 Float_t dc = .001977;
482 Float_t dco = .002; // --- CO2 density in g/cm3 ---
484 Float_t absl, radl, a, d, z;
490 Int_t *idtmed = fIdtmed->GetArray()-599;
491 Int_t isxfld = gAlice->Field()->Integ();
492 Float_t sxmgmx = gAlice->Field()->Max();
494 // --- Define the various materials for GEANT ---
495 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
497 AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4);
498 AliMixture(3, "CO2 $", ac, zc, dc, -2, wc);
499 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
500 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
501 AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3);
502 AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999);
503 AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.);
504 AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7);
505 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
506 AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9);
508 AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.);
509 AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.);
510 AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16);
511 AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.);
513 // define gas-mixtures
516 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
519 dg = (dar * 4 + dco) / 5;
520 AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg);
522 // Define tracking media
523 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
524 AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
525 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
526 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
527 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
528 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
529 AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1);
530 AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
531 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10);
532 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1);
533 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
534 AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
536 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
537 gMC->Gstpar(idtmed[600], "LOSS", 3.);
538 gMC->Gstpar(idtmed[600], "DRAY", 1.);
540 gMC->Gstpar(idtmed[603], "LOSS", 3.);
541 gMC->Gstpar(idtmed[603], "DRAY", 1.);
543 gMC->Gstpar(idtmed[604], "LOSS", 3.);
544 gMC->Gstpar(idtmed[604], "DRAY", 1.);
546 gMC->Gstpar(idtmed[605], "LOSS", 3.);
547 gMC->Gstpar(idtmed[605], "DRAY", 1.);
549 gMC->Gstpar(idtmed[606], "LOSS", 3.);
550 gMC->Gstpar(idtmed[606], "DRAY", 1.);
552 gMC->Gstpar(idtmed[607], "LOSS", 3.);
553 gMC->Gstpar(idtmed[607], "DRAY", 1.);
555 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
556 // --- without affecting the hit patterns ---
557 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
558 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
559 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
560 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
561 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
562 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
563 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
564 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
565 gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
566 gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
567 gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
568 gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
569 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
570 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
571 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
572 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
573 gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
574 gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
575 gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
576 gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
578 // --- Prevent particles stopping in the gas due to energy cut-off ---
579 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
580 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
581 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
582 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
583 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
586 //_____________________________________________________________________________
587 void AliPMDv0::Init()
590 // Initialises PMD detector after it has been built
596 for(i=0;i<35;i++) printf("*");
597 printf(" PMD_INIT ");
598 for(i=0;i<35;i++) printf("*");
600 printf(" PMD simulation package initialised\n");
601 printf(" parameters of pmd\n");
602 printf("%6d %10.2f %10.2f %10.2f %10.2f %10.2f\n",kdet,thmin,thmax,zdist,thlow,thhigh);
604 for(i=0;i<80;i++) printf("*");
607 Int_t *idtmed = fIdtmed->GetArray()-599;
608 fMedSens=idtmed[605-1];
611 //_____________________________________________________________________________
612 void AliPMDv0::StepManager()
615 // Called at each step in the PMD
618 Float_t hits[4], destep;
619 Float_t center[3] = {0,0,0};
623 if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
625 gMC->CurrentVolID(copy);
627 gMC->CurrentVolOffID(1,copy);
629 gMC->CurrentVolOffID(2,copy);
630 namep=gMC->CurrentVolOffName(2);
632 if(strncmp(namep,"DW11",4))vol[2]=1;
633 if(strncmp(namep,"DV11",4))vol[2]=2;
634 gMC->CurrentVolOffID(3,copy);
636 gMC->CurrentVolOffID(4,copy);
638 gMC->Gdtom(center,hits,1);
639 hits[3] = destep*1e9; //Number in eV
640 AddHit(gAlice->CurrentTrack(), vol, hits);