]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
global variables are removed
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Nov 2003 11:53:05 +0000 (11:53 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Nov 2003 11:53:05 +0000 (11:53 +0000)
PMD/AliPMDv1.cxx
PMD/AliPMDv1.h

index 5826f69886325ce1bcca9ea66802ec82a7011c09..d8f2e4ea46dd1d472f83e5f32cf57c7dce98e494 100644 (file)
@@ -14,6 +14,9 @@
  **************************************************************************/
 /*
 $Log$
+Revision 1.31  2003/10/31 12:25:36  bnandi
+variable names are changed according to ALICE convention
+
 Revision 1.30  2003/10/23 16:32:19  hristov
 MC-dependent part of AliRun extracted in AliMC (F.Carminati)
 
@@ -62,16 +65,17 @@ June 2003
 #include "Riostream.h"
 #include <TVirtualMC.h>
 #include "AliMC.h"
-static Int_t     gAliNcolUM1, gAliNcolUM2, gAliNrowUM1, gAliNrowUM2;
-static Int_t     gAliKdet;
-static Float_t   gAliSMLengthax, gAliSMLengthay;
-static Float_t   gAliSMLengthbx, gAliSMLengthby;
-static Float_t   gAliZdist, gAliZdist1;
-static Float_t   gAliSMthick, gAliCellRadius, gAliCellWall, gAliCellDepth;
-static Float_t   gAliBoundary, gAliThBase, gAliThAir, gAliThPCB;
-static Float_t   gAliThLead, gAliThSteel;
 
+/* 
+   static Int_t     gAliNcolUM1, gAliNcolUM2, gAliNrowUM1, gAliNrowUM2;
+   static Int_t     gAliKdet;
+   static Float_t   gAliSMLengthax, gAliSMLengthay;
+   static Float_t   gAliSMLengthbx, gAliSMLengthby;
+   static Float_t   gAliZdist, gAliZdist1;
+   static Float_t   gAliSMthick, gAliCellRadius, gAliCellWall, gAliCellDepth;
+   static Float_t   gAliBoundary, gAliThBase, gAliThAir, gAliThPCB;
+   static Float_t   gAliThLead, gAliThSteel;
+*/
 ClassImp(AliPMDv1)
  
   //_____________________________________________________________________________
@@ -124,26 +128,28 @@ void AliPMDv1::CreateSupermodule()
 
   
   Int_t i,j;
-  Float_t xb, yb, zb;
   Int_t number;
   Int_t ihrotm,irotdm;
-  const Float_t kroot3by2 = TMath::Sqrt(3.) /2.; 
-  const Float_t kroot3 = TMath::Sqrt(3.); 
+  Float_t xb, yb, zb;
+
+  //  const Float_t kroot3by2 = TMath::Sqrt(3.) /2.; 
+  //  const Float_t kroot3 = TMath::Sqrt(3.); 
+
   Int_t *idtmed = fIdtmed->GetArray()-599;
  
   AliMatrix(ihrotm, 90., 30.,   90.,  120., 0., 0.);
   AliMatrix(irotdm, 90., 180.,  90.,  270., 180., 0.);
  
-  gAliZdist = TMath::Abs(gAliZdist1);
+  //  gAliZdist = TMath::Abs(gAliZdist1);
 
   // First create the sensitive medium of a hexagon cell (ECAR)
   // Inner hexagon filled with gas (Ar+CO2)
   
   Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
-  hexd2[4] = -gAliCellDepth/2.;
-  hexd2[7] =  gAliCellDepth/2.;
-  hexd2[6] =  gAliCellRadius - gAliCellWall;
-  hexd2[9] =  gAliCellRadius - gAliCellWall;
+  hexd2[4] = -fgkCellDepth/2.;
+  hexd2[7] =  fgkCellDepth/2.;
+  hexd2[6] =  fgkCellRadius - fgkCellWall;
+  hexd2[9] =  fgkCellRadius - fgkCellWall;
   
   gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
   gMC->Gsatt("ECAR", "SEEN", 0);
@@ -152,10 +158,10 @@ void AliPMDv1::CreateSupermodule()
   // Outer hexagon made of Copper
   
   Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
-  hexd1[4] = -gAliCellDepth/2.;
-  hexd1[7] =  gAliCellDepth/2.;
-  hexd1[6] =  gAliCellRadius;
-  hexd1[9] =  gAliCellRadius;
+  hexd1[4] = -fgkCellDepth/2.;
+  hexd1[7] =  fgkCellDepth/2.;
+  hexd1[6] =  fgkCellRadius;
+  hexd1[9] =  fgkCellRadius;
 
   gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
   gMC->Gsatt("ECCU", "SEEN", 0);
@@ -170,9 +176,9 @@ void AliPMDv1::CreateSupermodule()
   // volume for first strip EST1 made of AIR 
 
   Float_t dbox1[3];
-  dbox1[0] = gAliNcolUM1*gAliCellRadius;
-  dbox1[1] = gAliCellRadius/kroot3by2;
-  dbox1[2] = gAliCellDepth/2.;
+  dbox1[0] = fgkNcolUM1*fgkCellRadius;
+  dbox1[1] = fgkCellRadius/fgkSqroot3by2;
+  dbox1[2] = fgkCellDepth/2.;
   
   gMC->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3);
   gMC->Gsatt("EST1", "SEEN", 0);
@@ -180,7 +186,7 @@ void AliPMDv1::CreateSupermodule()
   // volume for second strip EST2 
 
   Float_t dbox2[3];
-  dbox2[0] = gAliNcolUM2*gAliCellRadius;
+  dbox2[0] = fgkNcolUM2*fgkCellRadius;
   dbox2[1] = dbox1[1];
   dbox2[2] = dbox1[2];
 
@@ -190,22 +196,22 @@ void AliPMDv1::CreateSupermodule()
   // Place hexagonal cells ECCU placed inside EST1 
   yb = 0.; 
   zb = 0.;
-  xb = -(dbox1[0]) + gAliCellRadius; 
-  for (i = 1; i <= gAliNcolUM1; ++i) 
+  xb = -(dbox1[0]) + fgkCellRadius; 
+  for (i = 1; i <= fgkNcolUM1; ++i) 
        {
          number = i;
          gMC->Gsposp("ECCU", number, "EST1", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
-         xb += (gAliCellRadius*2.);
+         xb += (fgkCellRadius*2.);
        }
   // Place hexagonal cells ECCU placed inside EST2 
       yb = 0.; 
       zb = 0.;
-      xb = -(dbox2[0]) + gAliCellRadius; 
-      for (i = 1; i <= gAliNcolUM2; ++i) 
+      xb = -(dbox2[0]) + fgkCellRadius; 
+      for (i = 1; i <= fgkNcolUM2; ++i) 
        {
          number = i;
          gMC->Gsposp("ECCU", number, "EST2", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
-         xb += (gAliCellRadius*2.);
+         xb += (fgkCellRadius*2.);
        }
 
 
@@ -215,9 +221,9 @@ void AliPMDv1::CreateSupermodule()
   // Create EUM1
 
   Float_t dbox3[3];
-  dbox3[0] = dbox1[0]+gAliCellRadius/2.;
-  dbox3[1] = (dbox1[1]*gAliNrowUM1)-(gAliCellRadius*kroot3*(gAliNrowUM1-1)/6.); 
-  dbox3[2] = gAliCellDepth/2.;
+  dbox3[0] = dbox1[0]+fgkCellRadius/2.;
+  dbox3[1] = (dbox1[1]*fgkNrowUM1)-(fgkCellRadius*fgkSqroot3*(fgkNrowUM1-1)/6.); 
+  dbox3[2] = fgkCellDepth/2.;
   
   gMC->Gsvolu("EUM1","BOX", idtmed[698], dbox3, 3);
   gMC->Gsatt("EUM1", "SEEN", 1);
@@ -225,26 +231,26 @@ void AliPMDv1::CreateSupermodule()
   // Place rectangular strips EST1 inside EUM1 unit module
 
   yb = -dbox3[1]+dbox1[1];  
-  for (j = 1; j <= gAliNrowUM1; ++j)  
+  for (j = 1; j <= fgkNrowUM1; ++j)  
     {
       if(j%2 == 0)
        {
-      xb =gAliCellRadius/2.0;
+      xb = fgkCellRadius/2.0;
        }
       else
        {
-         xb = -gAliCellRadius/2.0;
+         xb = -fgkCellRadius/2.0;
        }
       number = j;
       gMC->Gsposp("EST1",number, "EUM1", xb, yb , 0. , 0, "MANY",dbox1,3);
-      yb = (-dbox3[1]+dbox1[1])+j*1.0*gAliCellRadius*kroot3;
+      yb = (-dbox3[1]+dbox1[1])+j*1.0*fgkCellRadius*fgkSqroot3;
     }
 
   // Create EUM2
 
   Float_t dbox4[3];
-  dbox4[0] = dbox2[0]+gAliCellRadius/2.;
-  dbox4[1] =(dbox2[1]*gAliNrowUM2)-(gAliCellRadius*kroot3*(gAliNrowUM2-1)/6.); 
+  dbox4[0] = dbox2[0] + fgkCellRadius/2.;
+  dbox4[1] =(dbox2[1]*fgkNrowUM2)-(fgkCellRadius*fgkSqroot3*(fgkNrowUM2-1)/6.); 
   dbox4[2] = dbox3[2];
 
   gMC->Gsvolu("EUM2","BOX", idtmed[698], dbox4, 3);
@@ -253,19 +259,19 @@ void AliPMDv1::CreateSupermodule()
   // Place rectangular strips EST2 inside EUM2 unit module
 
   yb = -dbox4[1]+dbox2[1]; 
-  for (j = 1; j <= gAliNrowUM2; ++j) 
+  for (j = 1; j <= fgkNrowUM2; ++j) 
       {
       if(j%2 == 0)
        {
-      xb =gAliCellRadius/2.0;
+      xb = fgkCellRadius/2.0;
        }
       else
        {
-         xb = -gAliCellRadius/2.0;
+         xb = -fgkCellRadius/2.0;
        }
       number = j;
       gMC->Gsposp("EST2",number, "EUM2", xb, yb , 0. , 0, "MANY",dbox2,3);
-      yb = (-dbox4[1]+dbox2[1])+j*1.0*gAliCellRadius*kroot3;
+      yb = (-dbox4[1]+dbox2[1])+j*1.0*fgkCellRadius*fgkSqroot3;
     }
 
   // 2 types of Rectangular shaped supermodules (BOX) 
@@ -277,7 +283,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxSM1[3];
   dboxSM1[0] = 3.0*dbox3[0]+(2.0*0.025);
   dboxSM1[1] = 2.0*dbox3[1]+0.025;
-  dboxSM1[2] = gAliCellDepth/2.;
+  dboxSM1[2] = fgkCellDepth/2.;
 
   gMC->Gsvolu("ESMA","BOX", idtmed[698], dboxSM1, 3);
   gMC->Gsatt("ESMA", "SEEN", 1);
@@ -303,7 +309,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxSM2[3];
   dboxSM2[0] = 2.0*dbox4[0]+0.025;
   dboxSM2[1] = 3.0*dbox4[1]+(2.0*0.025);
-  dboxSM2[2] = gAliCellDepth/2.;
+  dboxSM2[2] = fgkCellDepth/2.;
   
   gMC->Gsvolu("ESMB","BOX", idtmed[698], dboxSM2, 3);
   gMC->Gsatt("ESMB", "SEEN", 1);
@@ -328,7 +334,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxG1a[3];
   dboxG1a[0] = dboxSM1[0]; 
   dboxG1a[1] = dboxSM1[1];       
-  dboxG1a[2] = gAliThBase/2.;
+  dboxG1a[2] = fgkThBase/2.;
 
   gMC->Gsvolu("EBPA","BOX", idtmed[607], dboxG1a, 3);
   gMC->Gsatt("EBPA", "SEEN", 1);
@@ -337,7 +343,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxG2a[3];
   dboxG2a[0] = dboxSM1[0]; 
   dboxG2a[1] = dboxSM1[1];       
-  dboxG2a[2] = gAliThPCB/2.;
+  dboxG2a[2] = fgkThPCB/2.;
 
   gMC->Gsvolu("EPCA","BOX", idtmed[607], dboxG2a, 3);
   gMC->Gsatt("EPCA", "SEEN", 1);
@@ -349,7 +355,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxAlla[3];
   dboxAlla[0] = dboxSM1[0]; 
   dboxAlla[1] = dboxSM1[1];       
-  dboxAlla[2] = (gAliThBase+0.1+gAliThPCB+dboxSM1[2]+gAliThPCB)/2.;
+  dboxAlla[2] = (fgkThBase+fgkThAir+fgkThPCB+dboxSM1[2]+fgkThPCB)/2.;
 
   gMC->Gsvolu("EFPA","BOX", idtmed[698], dboxAlla, 3);
   gMC->Gsatt("EFPA", "SEEN", 1);
@@ -360,7 +366,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxAlla2[3];
   dboxAlla2[0] = dboxSM1[0]; 
   dboxAlla2[1] = dboxSM1[1];       
-  dboxAlla2[2] = (gAliThBase+0.1+gAliThPCB+dboxSM1[2]+gAliThPCB)/2.;
+  dboxAlla2[2] = (fgkThBase+fgkThAir+fgkThPCB+dboxSM1[2]+fgkThPCB)/2.;
 
   gMC->Gsvolu("EFCA","BOX", idtmed[698], dboxAlla2, 3);
   gMC->Gsatt("EFCA", "SEEN", 1);
@@ -368,25 +374,25 @@ void AliPMDv1::CreateSupermodule()
   // Now place everything in EFPA for PMD
 
   Float_t zbpa,zpcba1,zpcba2,zsma; 
-  zpcba1 = - dboxAlla[2]+gAliThPCB/2.0;
+  zpcba1 = - dboxAlla[2]+fgkThPCB/2.0;
   gMC->Gsposp("EPCA", 1, "EFPA", 0., 0., zpcba1, 0, "ONLY",dboxG2a,3);
   zsma = zpcba1+dboxSM1[2];
   gMC->Gsposp("ESMA", 1, "EFPA", 0., 0., zsma, 0, "ONLY",dboxSM1,3);
-  zpcba2 = zsma+gAliThPCB/2.0;
+  zpcba2 = zsma+fgkThPCB/2.0;
   gMC->Gsposp("EPCA", 2, "EFPA", 0., 0., zpcba2, 0, "ONLY",dboxG2a,3);
-  zbpa = zpcba2+0.1+gAliThBase/2.0; // 0.1 for 0.1 mm Air gap 
+  zbpa = zpcba2+fgkThAir+fgkThBase/2.0;
   gMC->Gsposp("EBPA", 1, "EFPA", 0., 0., zbpa, 0, "ONLY",dboxG1a,3);
 
   // Now place everything in EFCA for CPV
 
   Float_t zbpa2,zpcba12,zpcba22,zsma2; 
-  zbpa2 = - dboxAlla2[2]+gAliThBase/2.0;
+  zbpa2 = - dboxAlla2[2]+fgkThBase/2.0;
   gMC->Gsposp("EBPA", 1, "EFCA", 0., 0., zbpa2, 0, "ONLY",dboxG1a,3);
-  zpcba12 = zbpa2+0.1+gAliThPCB/2.0;
+  zpcba12 = zbpa2+fgkThAir+fgkThPCB/2.0;
   gMC->Gsposp("EPCA", 1, "EFCA", 0., 0., zpcba12, 0, "ONLY",dboxG2a,3);
   zsma2 = zpcba12+dboxSM1[2];
   gMC->Gsposp("ESMA", 1, "EFCA", 0., 0., zsma2, 0, "ONLY",dboxSM1,3);
-  zpcba22 = zsma2+gAliThPCB/2.0;
+  zpcba22 = zsma2+fgkThPCB/2.0;
   gMC->Gsposp("EPCA", 2, "EFCA", 0., 0., zpcba22, 0, "ONLY",dboxG2a,3);
 
 
@@ -395,7 +401,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxG1b[3];
   dboxG1b[0] = dboxSM2[0]; 
   dboxG1b[1] = dboxSM2[1];       
-  dboxG1b[2] = gAliThBase/2.;
+  dboxG1b[2] = fgkThBase/2.;
 
   gMC->Gsvolu("EBPB","BOX", idtmed[607], dboxG1b, 3);
   gMC->Gsatt("EBPB", "SEEN", 1);
@@ -404,7 +410,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxG2b[3];
   dboxG2b[0] = dboxSM2[0]; 
   dboxG2b[1] = dboxSM2[1];       
-  dboxG2b[2] = gAliThPCB/2.;
+  dboxG2b[2] = fgkThPCB/2.;
 
   gMC->Gsvolu("EPCB","BOX", idtmed[607], dboxG2b, 3);
   gMC->Gsatt("EPCB", "SEEN", 1);
@@ -415,7 +421,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxAllb[3];
   dboxAllb[0] = dboxSM2[0]; 
   dboxAllb[1] = dboxSM2[1];       
-  dboxAllb[2] = (gAliThBase+0.1+gAliThPCB+dboxSM2[2]+gAliThPCB)/2.;
+  dboxAllb[2] = (fgkThBase+fgkThAir+fgkThPCB+dboxSM2[2]+fgkThPCB)/2.;
 
   gMC->Gsvolu("EFPB","BOX", idtmed[698], dboxAllb, 3);
   gMC->Gsatt("EFPB", "SEEN", 1);
@@ -425,7 +431,7 @@ void AliPMDv1::CreateSupermodule()
   Float_t dboxAllb2[3];
   dboxAllb2[0] = dboxSM2[0]; 
   dboxAllb2[1] = dboxSM2[1];       
-  dboxAllb2[2] = (gAliThBase+0.1+gAliThPCB+dboxSM2[2]+gAliThPCB)/2.;
+  dboxAllb2[2] = (fgkThBase+fgkThAir+fgkThPCB+dboxSM2[2]+fgkThPCB)/2.;
 
   gMC->Gsvolu("EFCB","BOX", idtmed[698], dboxAllb2, 3);
   gMC->Gsatt("EFCB", "SEEN", 1);
@@ -434,40 +440,40 @@ void AliPMDv1::CreateSupermodule()
   // Now place everything in EFPB for PMD
 
   Float_t zbpb,zpcbb1,zpcbb2,zsmb; 
-  zpcbb1 = - dboxAllb[2]+gAliThPCB/2.0;
+  zpcbb1 = - dboxAllb[2]+fgkThPCB/2.0;
   gMC->Gsposp("EPCB", 1, "EFPB", 0., 0., zpcbb1, 0, "ONLY",dboxG2b,3);
   zsmb = zpcbb1+dboxSM2[2];
   gMC->Gsposp("ESMB", 1, "EFPB", 0., 0., zsmb, 0, "ONLY",dboxSM2,3);
-  zpcbb2 = zsmb+gAliThPCB/2.0;
+  zpcbb2 = zsmb+fgkThPCB/2.0;
   gMC->Gsposp("EPCB", 2, "EFPB", 0., 0., zpcbb2, 0, "ONLY",dboxG2b,3);
-  zbpb = zpcbb2+0.1+gAliThBase/2.0; // 0.1 for 0.1 mm Air gap 
+  zbpb = zpcbb2+fgkThAir+fgkThBase/2.0;
   gMC->Gsposp("EBPB", 1, "EFPB", 0., 0., zbpb, 0, "ONLY",dboxG1b,3);
 
 
   // Now place everything in EFCB for CPV
 
   Float_t zbpb2,zpcbb12,zpcbb22,zsmb2; 
-  zbpb2 = - dboxAllb2[2]+gAliThBase/2.0;
+  zbpb2 = - dboxAllb2[2]+fgkThBase/2.0;
   gMC->Gsposp("EBPB", 1, "EFCB", 0., 0., zbpb2, 0, "ONLY",dboxG1b,3);
-  zpcbb12 = zbpb2+0.1+gAliThPCB/2.0;
+  zpcbb12 = zbpb2+0.1+fgkThPCB/2.0;
   gMC->Gsposp("EPCB", 1, "EFCB", 0., 0., zpcbb12, 0, "ONLY",dboxG2b,3);
   zsmb2 = zpcbb12+dboxSM2[2];
   gMC->Gsposp("ESMB", 1, "EFCB", 0., 0., zsmb2, 0, "ONLY",dboxSM2,3);
-  zpcbb22 = zsmb2+gAliThPCB/2.0;
+  zpcbb22 = zsmb2+fgkThPCB/2.0;
   gMC->Gsposp("EPCB", 2, "EFCB", 0., 0., zpcbb22, 0, "ONLY",dboxG2b,3);
 
 
   // Master MODULE EMPA of aluminum for PMD
-  fDboxmm1[0] = dboxSM1[0]+gAliBoundary; 
-  fDboxmm1[1] = dboxSM1[1]+gAliBoundary;       
+  fDboxmm1[0] = dboxSM1[0]+fgkBoundary; 
+  fDboxmm1[1] = dboxSM1[1]+fgkBoundary;       
   fDboxmm1[2] = dboxAlla[2];
 
   gMC->Gsvolu("EMPA","BOX", idtmed[603], fDboxmm1, 3);
   gMC->Gsatt("EMPA", "SEEN", 1);
 
   // Master MODULE EMCA of aluminum for CPV
-  fDboxmm12[0] = dboxSM1[0]+gAliBoundary; 
-  fDboxmm12[1] = dboxSM1[1]+gAliBoundary;       
+  fDboxmm12[0] = dboxSM1[0]+fgkBoundary; 
+  fDboxmm12[1] = dboxSM1[1]+fgkBoundary;       
   fDboxmm12[2] = dboxAlla[2];
 
   gMC->Gsvolu("EMCA","BOX", idtmed[603], fDboxmm12, 3);
@@ -480,16 +486,16 @@ void AliPMDv1::CreateSupermodule()
 
 
   // Master MODULE EMPB of aluminum for PMD
-  fDboxmm2[0] = dboxSM2[0]+gAliBoundary; 
-  fDboxmm2[1] = dboxSM2[1]+gAliBoundary;       
+  fDboxmm2[0] = dboxSM2[0]+fgkBoundary; 
+  fDboxmm2[1] = dboxSM2[1]+fgkBoundary;       
   fDboxmm2[2] = dboxAllb[2];
 
   gMC->Gsvolu("EMPB","BOX", idtmed[603], fDboxmm2, 3);
   gMC->Gsatt("EMPB", "SEEN", 1);
 
   // Master MODULE EMCB of aluminum for CPV
-  fDboxmm22[0] = dboxSM2[0]+gAliBoundary; 
-  fDboxmm22[1] = dboxSM2[1]+gAliBoundary;       
+  fDboxmm22[0] = dboxSM2[0]+fgkBoundary; 
+  fDboxmm22[1] = dboxSM2[1]+fgkBoundary;       
   fDboxmm22[2] = dboxAllb[2];
 
   gMC->Gsvolu("EMCB","BOX", idtmed[603], fDboxmm22, 3);
@@ -500,6 +506,7 @@ void AliPMDv1::CreateSupermodule()
   gMC->Gsposp("EFPB", 1, "EMPB", 0., 0., 0., 0, "ONLY",dboxAllb,3);
   gMC->Gsposp("EFCB", 1, "EMCB", 0., 0., 0., 0, "ONLY",dboxAllb2,3);
 
+
 }
  
 //_____________________________________________________________________________
@@ -519,18 +526,18 @@ void AliPMDv1::CreatePMD()
   // --- DEFINE Iron, and lead volumes  for SM A
   
   Float_t dboxPba[3];
-  dboxPba[0] = gAliSMLengthax;
-  dboxPba[1] = gAliSMLengthay;
-  dboxPba[2] = gAliThLead/2.;
+  dboxPba[0] = fSMLengthax;
+  dboxPba[1] = fSMLengthay;
+  dboxPba[2] = fgkThLead/2.;
   
   gMC->Gsvolu("EPBA","BOX", idtmed[600], dboxPba, 3);
   gMC->Gsatt ("EPBA", "SEEN", 0);
   
   //   Fe Support 
   Float_t dboxFea[3];
-  dboxFea[0] = gAliSMLengthax;
-  dboxFea[1] = gAliSMLengthay;
-  dboxFea[2] = gAliThSteel/2.;
+  dboxFea[0] = fSMLengthax;
+  dboxFea[1] = fSMLengthay;
+  dboxFea[2] = fgkThSteel/2.;
   
   gMC->Gsvolu("EFEA","BOX", idtmed[618], dboxFea, 3);
   gMC->Gsatt ("EFEA", "SEEN", 0);
@@ -538,18 +545,18 @@ void AliPMDv1::CreatePMD()
   // --- DEFINE Iron, and lead volumes  for SM B
 
   Float_t dboxPbb[3];
-  dboxPbb[0] = gAliSMLengthbx;
-  dboxPbb[1] = gAliSMLengthby;
-  dboxPbb[2] = gAliThLead/2.;
+  dboxPbb[0] = fSMLengthbx;
+  dboxPbb[1] = fSMLengthby;
+  dboxPbb[2] = fgkThLead/2.;
   
   gMC->Gsvolu("EPBB","BOX", idtmed[600], dboxPbb, 3);
   gMC->Gsatt ("EPBB", "SEEN", 0);
   
   //   Fe Support 
   Float_t dboxFeb[3];
-  dboxFeb[0] = gAliSMLengthbx;
-  dboxFeb[1] = gAliSMLengthby;
-  dboxFeb[2] = gAliThSteel/2.;
+  dboxFeb[0] = fSMLengthbx;
+  dboxFeb[1] = fSMLengthby;
+  dboxFeb[2] = fgkThSteel/2.;
   
   gMC->Gsvolu("EFEB","BOX", idtmed[618], dboxFeb, 3);
   gMC->Gsatt ("EFEB", "SEEN", 0);
@@ -558,9 +565,8 @@ void AliPMDv1::CreatePMD()
   // Gaspmd, the dimension of RECTANGULAR mother volume of PMD,
 
   Float_t gaspmd[3] = {81.5,94.5,7.};
-  gaspmd[0] = gAliSMLengthax+gAliSMLengthbx;
-  gaspmd[1] = gAliSMLengthay+gAliSMLengthby;
-
+  gaspmd[0] = fSMLengthax + fSMLengthbx;
+  gaspmd[1] = fSMLengthay + fSMLengthby;
 
   gMC->Gsvolu("EPMD", "BOX", idtmed[698], gaspmd, 3);
   gMC->Gsatt("EPMD", "SEEN", 1);
@@ -572,50 +578,50 @@ void AliPMDv1::CreatePMD()
 
   Float_t xsma,ysma;
   Float_t xsmb,ysmb;
-  xsma = -(gAliSMLengthbx)/1.0;
-  ysma = gAliSMLengthby;
-  xsmb = -gAliSMLengthax;
-  ysmb = -gAliSMLengthay;
+  xsma = -fSMLengthbx;
+  ysma =  fSMLengthby;
+  xsmb = -fSMLengthax;
+  ysmb = -fSMLengthay;
 
   //Complete detector for Type A
   //Position Super modules type A for both CPV and PMD in EPMD  
   Float_t zpsa,zpba,zfea,zcva; 
 
-  zpsa = - gaspmd[2] + gAliSMthick/2.;
+  zpsa = - gaspmd[2] + fSMthick/2.;
 
   gMC->Gsposp("EMPA", 1, "EPMD", xsma, ysma, zpsa, 0, "ONLY",fDboxmm1,3);
   gMC->Gsposp("EMPA", 2, "EPMD", -xsma, -ysma, zpsa, jhrot12, "ONLY",fDboxmm1,3);
-  zpba=zpsa+gAliSMthick/2.+dboxPba[2];
+  zpba=zpsa+fSMthick/2.+dboxPba[2];
   gMC->Gsposp("EPBA", 1, "EPMD", xsma, ysma, zpba, 0, "ONLY",dboxPba,3);
   gMC->Gsposp("EPBA", 2, "EPMD", -xsma, -ysma, zpba, 0, "ONLY",dboxPba,3);
   zfea=zpba+dboxPba[2]+dboxFea[2];
   gMC->Gsposp("EFEA", 1, "EPMD", xsma, ysma, zfea, 0, "ONLY",dboxFea,3);
   gMC->Gsposp("EFEA", 2, "EPMD", -xsma, -ysma, zfea, 0, "ONLY",dboxFea,3);
-  zcva=zfea+dboxFea[2]+gAliSMthick/2.;
+  zcva=zfea+dboxFea[2]+fSMthick/2.;
   gMC->Gsposp("EMCA", 1, "EPMD", xsma, ysma, zcva, 0, "ONLY",fDboxmm12,3);
   gMC->Gsposp("EMCA", 2, "EPMD", -xsma,-ysma, zcva, jhrot12, "ONLY",fDboxmm12,3);
  
   //Complete detector for Type B
   //Position Super modules type B for both CPV and PMD in EPMD  
   Float_t zpsb,zpbb,zfeb,zcvb; 
-  zpsb = - gaspmd[2] + gAliSMthick/2.;
+  zpsb = - gaspmd[2] + fSMthick/2.;
   
   gMC->Gsposp("EMPB", 3, "EPMD", xsmb, ysmb, zpsb, 0, "ONLY",fDboxmm2,3);
   gMC->Gsposp("EMPB", 4, "EPMD", -xsmb, -ysmb, zpsb, jhrot12, "ONLY",fDboxmm2,3);
-  zpbb=zpsb+gAliSMthick/2.+dboxPbb[2];
+  zpbb=zpsb+fSMthick/2.+dboxPbb[2];
   gMC->Gsposp("EPBB", 3, "EPMD", xsmb, ysmb, zpbb, 0, "ONLY",dboxPbb,3);
   gMC->Gsposp("EPBB", 4, "EPMD", -xsmb, -ysmb, zpbb, 0, "ONLY",dboxPbb,3);
   zfeb=zpbb+dboxPbb[2]+dboxFeb[2];
   gMC->Gsposp("EFEB", 3, "EPMD", xsmb, ysmb, zfeb, 0, "ONLY",dboxFeb,3);
   gMC->Gsposp("EFEB", 4, "EPMD", -xsmb, -ysmb, zfeb, 0, "ONLY",dboxFeb,3);
-  zcvb=zfeb+dboxFeb[2]+gAliSMthick/2.;
+  zcvb=zfeb+dboxFeb[2]+fSMthick/2.;
   gMC->Gsposp("EMCB", 3, "EPMD", xsmb, ysmb, zcvb, 0, "ONLY",fDboxmm22,3);
   gMC->Gsposp("EMCB", 4, "EPMD", -xsmb,-ysmb, zcvb, jhrot12, "ONLY",fDboxmm22,3);
   
   // --- Place the EPMD in ALICE 
   xp = 0.;
   yp = 0.;
-  zp = gAliZdist1;
+  zp = fgkZdist;
 
   //Position Full PMD in ALICE   
   gMC->Gsposp("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY",gaspmd,3);
@@ -670,14 +676,14 @@ void AliPMDv1::CreateMaterials()
   // --- The Argon- CO2 mixture --- 
   Float_t ag[2] = { 39.95 };
   Float_t zg[2] = { 18. };
-  Float_t wg[2] = { .7,.3 };
-  Float_t dar   = .001782;   // --- Ar density in g/cm3 --- 
+  Float_t wg[2] = { 0.7,0.3 };
+  Float_t dar   = 0.001782;   // --- Ar density in g/cm3 --- 
   // --- CO2 --- 
   Float_t ac[2] = { 12.,16. };
   Float_t zc[2] = { 6.,8. };
   Float_t wc[2] = { 1.,2. };
-  Float_t dc    = .001977;
-  Float_t dco   = .002;  // --- CO2 density in g/cm3 ---
+  Float_t dc    = 0.001977;
+  Float_t dco   = 0.002;  // --- CO2 density in g/cm3 ---
   
   Float_t absl, radl, a, d, z;
   Float_t dg;
@@ -801,7 +807,7 @@ void AliPMDv1::Init()
   //
 
   Int_t i;
-  gAliKdet=1;
+  //  gAliKdet=1;
   //
   cout << " Inside Init " << endl;
   if(fDebug) {
@@ -813,7 +819,7 @@ void AliPMDv1::Init()
       printf("                 PMD simulation package (v1) initialised\n");
       printf("%s: parameters of pmd\n",ClassName());
       printf("%s: %10.2f %10.2f %10.2f \
-      %10.2f\n",ClassName(),gAliCellRadius,gAliCellWall,gAliCellDepth,gAliZdist1 );
+      %10.2f\n",ClassName(),fgkCellRadius,fgkCellWall,fgkCellDepth,fgkZdist );
       printf("%s: ",ClassName());
       for(i=0;i<80;i++) printf("*");
       printf("\n");
@@ -834,7 +840,7 @@ void AliPMDv1::StepManager()
   Int_t   copy;
   Float_t hits[4], destep;
   Float_t center[3] = {0,0,0};
-  Int_t   vol[8]; //5
+  Int_t   vol[8];
   //const char *namep;
   
   if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
@@ -898,45 +904,23 @@ void AliPMDv1::StepManager()
 void AliPMDv1::GetParameters()
 {
   // This gives all the parameters of the detector
-  // such as thickness of the Pb plate, Cell Radius,
-  // Cell thickness, number of rows, number of columns etc.
+  // such as Length of Supermodules, type A, type B,
+  // thickness of the Supermodule
   //
-  const Float_t kroot3 = TMath::Sqrt(3.); 
-  const Float_t kroot3by2 = TMath::Sqrt(3.) /2.; 
-  //
-  gAliCellRadius = 0.25;
-  gAliCellWall   = 0.02;
-  gAliCellDepth  = 0.25 * 2.;
-  //
-  gAliNcolUM1    = 48;
-  gAliNcolUM2    = 96;
-  gAliNrowUM1    = 96;//each strip has 1 row
-  gAliNrowUM2    = 48;//each strip has 1 row
-  //
-  gAliSMLengthax = (3.0*(gAliNcolUM1*gAliCellRadius+gAliCellRadius/2.)
-                   + (2.0*0.025)) + 0.7;
-  gAliSMLengthbx = 2.0*(gAliNcolUM2*gAliCellRadius+gAliCellRadius/2.)
-    + 0.025 + 0.7; 
-
-  gAliSMLengthay = 2.0*(((gAliCellRadius/kroot3by2)*gAliNrowUM1)
-                       - (gAliCellRadius*kroot3*(gAliNrowUM1-1)/6.))
-    + 0.025 + 0.7;
-  gAliSMLengthby = 3.0*(((gAliCellRadius/kroot3by2)*gAliNrowUM2)
-                       - (gAliCellRadius*kroot3*(gAliNrowUM2-1)/6.))
-    + (2.0*0.025) + 0.7;
-  //
-  gAliBoundary   = 0.7;
-  //
-  gAliThBase     = 0.3;
-  gAliThAir      = 0.1;
-  gAliThPCB      = 0.16;
-  //
-  gAliSMthick    = gAliThBase + gAliThAir + gAliThPCB 
-    + gAliCellDepth + gAliThPCB + gAliThAir + gAliThPCB;
-  //
-  gAliThLead     = 1.5;
-  gAliThSteel    = 0.5;
   
-  gAliZdist1     = 361.5;
+  fSMLengthax = (3.0*(fgkNcolUM1*fgkCellRadius+fgkCellRadius/2.)
+                + (2.0*fgkGap)) + fgkBoundary;
+  fSMLengthbx = 2.0*(fgkNcolUM2*fgkCellRadius+fgkCellRadius/2.)
+    + fgkGap + fgkBoundary; 
+  
+  fSMLengthay = 2.0*(((fgkCellRadius/fgkSqroot3by2)*fgkNrowUM1)
+                    - (fgkCellRadius*fgkSqroot3*(fgkNrowUM1-1)/6.))
+    + fgkGap + fgkBoundary;
+  fSMLengthby = 3.0*(((fgkCellRadius/fgkSqroot3by2)*fgkNrowUM2)
+                    - (fgkCellRadius*fgkSqroot3*(fgkNrowUM2-1)/6.))
+    + (2.0*fgkGap) + fgkBoundary;
+  
+  fSMthick    = fgkThBase + fgkThAir + fgkThPCB 
+    + fgkCellDepth + fgkThPCB + fgkThAir + fgkThPCB;
   
 }
index caae6d0bb4e29b45a333e2576db0cac6e3b9aee1..6a93bfaaaf2aa470b18e9c25fbea93720ecd6cfb 100644 (file)
@@ -31,11 +31,35 @@ public:
   virtual void  DrawModule() const;
 
 private:
-  Int_t   fMedSens;        // Sensitive Medium Ar+CO2
-  Float_t fDboxmm1[3];     // Master MODULE EMPA of aluminum for PMD
-  Float_t fDboxmm12[3];    // Master MODULE EMCA of aluminum for CPV
-  Float_t fDboxmm2[3];     // Master MODULE EMPB of aluminum for PMD
-  Float_t fDboxmm22[3];    // Master MODULE EMCB of aluminum for CPV
+
+  static const Int_t   fgkNcolUM1    = 48;  // Number of cols in UM, type 1
+  static const Int_t   fgkNcolUM2    = 96;  // Number of cols in UM, type 2
+  static const Int_t   fgkNrowUM1    = 96;  // Number of rows in UM, type 1
+  static const Int_t   fgkNrowUM2    = 48;  // Number of rows in UM, type 2
+  static const Float_t fgkCellRadius = 0.25;      // Radius of a hexagonal cell
+  static const Float_t fgkCellWall   = 0.02;      // Thickness of cell Wall
+  static const Float_t fgkCellDepth  = 0.50;      // Gas thickness
+  static const Float_t fgkBoundary   = 0.7;       // Thickness of Boundary wall
+  static const Float_t fgkThBase     = 0.3;       // Thickness of Base plate
+  static const Float_t fgkThAir      = 0.1;       // Thickness of Air
+  static const Float_t fgkThPCB      = 0.16;      // Thickness of PCB
+  static const Float_t fgkThLead     = 1.5;       // Thickness of Pb
+  static const Float_t fgkThSteel    = 0.5;       // Thickness of Steel
+  static const Float_t fgkGap        = 0.025;     // Air Gap
+  static const Float_t fgkZdist      = 361.5;     // z-position of the detector
+  static const Float_t fgkSqroot3    = 1.7320508; // Square Root of 3
+  static const Float_t fgkSqroot3by2 = 0.8660254; // Square Root of 3 by 2
+
+  Float_t fSMthick;     // Thickness of the supermodule
+  Float_t fSMLengthax;  // Supermodule length along X, type A
+  Float_t fSMLengthay;  // Supermodule length along Y, type A
+  Float_t fSMLengthbx;  // Supermodule length along X, type B
+  Float_t fSMLengthby;  // Supermodule length along Y, type A
+  Int_t   fMedSens;     // Sensitive Medium Ar+CO2
+  Float_t fDboxmm1[3];  // Master MODULE EMPA of aluminum for PMD
+  Float_t fDboxmm12[3]; // Master MODULE EMCA of aluminum for CPV
+  Float_t fDboxmm2[3];  // Master MODULE EMPB of aluminum for PMD
+  Float_t fDboxmm22[3]; // Master MODULE EMCB of aluminum for CPV
  
   ClassDef(AliPMDv1,1)     //Hits manager for set:PMD
 };