Merge with TRD-develop
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometryHole.cxx
index 73a34d8..8376049 100644 (file)
 
 /*
 $Log$
+Revision 1.1.4.4  2000/10/15 23:40:01  cblume
+Remove AliTRDconst
+
+Revision 1.1.4.3  2000/10/06 16:49:46  cblume
+Made Getters const
+
+Revision 1.1.4.2  2000/10/04 16:34:58  cblume
+Replace include files by forward declarations
+
+Revision 1.1.4.1  2000/09/22 14:43:41  cblume
+Allow the pad/timebin-dimensions to be changed after initialization
+
+Revision 1.3  2000/10/02 21:28:19  fca
+Removal of useless dependecies via forward declarations
+
+Revision 1.2  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.1  2000/02/28 19:01:42  cblume
 Add new TRD classes
 
@@ -26,6 +44,8 @@ Add new TRD classes
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "AliMC.h"
+
 #include "AliTRDgeometryHole.h"
 
 ClassImp(AliTRDgeometryHole)
@@ -60,7 +80,7 @@ void AliTRDgeometryHole::Init()
   Int_t iplan;
 
   // The length of the inner chambers
-  for (iplan = 0; iplan < kNplan; iplan++) 
+  for (iplan = 0; iplan < fgkNplan; iplan++) 
     fClengthI[iplan] = 110.0;
 
   // The length of the middle chambers
@@ -121,9 +141,22 @@ void AliTRDgeometryHole::Init()
   //                                             
 
   // The pad row (z-direction)
-  for (iplan = 0; iplan < kNplan; iplan++) {
+  SetRowPadSize(4.5);
+
+}
 
-    for (Int_t isect = 0; isect < kNsect; isect++) {
+//_____________________________________________________________________________
+void AliTRDgeometryHole::SetRowPadSize(Float_t size)
+{
+  //
+  // Redefines the pad size in row direction
+  //
+
+  fRowPadSize = size;
+
+  for (Int_t iplan = 0; iplan < fgkNplan; iplan++) {
+
+    for (Int_t isect = 0; isect < fgkNsect; isect++) {
       Float_t clengthI = fClengthI[iplan];
       Float_t clengthM = fClengthM1[iplan];
       Float_t clengthO = fClengthO1[iplan];
@@ -142,21 +175,21 @@ void AliTRDgeometryHole::Init()
         clengthO = fClengthO3[iplan];
         break;
       };
-      fRowMax[iplan][0][isect] = 1 + TMath::Nint((clengthO - 2. * kCcthick) 
+      fRowMax[iplan][0][isect] = 1 + TMath::Nint((clengthO - 2. * fgkCcthick) 
                                                            / fRowPadSize - 0.5);
-      fRowMax[iplan][1][isect] = 1 + TMath::Nint((clengthM - 2. * kCcthick) 
+      fRowMax[iplan][1][isect] = 1 + TMath::Nint((clengthM - 2. * fgkCcthick) 
                                                            / fRowPadSize - 0.5);
-      fRowMax[iplan][2][isect] = 1 + TMath::Nint((clengthI - 2. * kCcthick) 
+      fRowMax[iplan][2][isect] = 1 + TMath::Nint((clengthI - 2. * fgkCcthick) 
                                                            / fRowPadSize - 0.5);
-      fRowMax[iplan][3][isect] = 1 + TMath::Nint((clengthM - 2. * kCcthick) 
+      fRowMax[iplan][3][isect] = 1 + TMath::Nint((clengthM - 2. * fgkCcthick) 
                                                            / fRowPadSize - 0.5);
-      fRowMax[iplan][4][isect] = 1 + TMath::Nint((clengthO - 2. * kCcthick) 
+      fRowMax[iplan][4][isect] = 1 + TMath::Nint((clengthO - 2. * fgkCcthick) 
                                                            / fRowPadSize - 0.5);
-      fRow0[iplan][0][isect]   = -clengthI/2. - clengthM - clengthO + kCcthick; 
-      fRow0[iplan][1][isect]   = -clengthI/2. - clengthM            + kCcthick;
-      fRow0[iplan][2][isect]   = -clengthI/2.                       + kCcthick;
-      fRow0[iplan][3][isect]   =  clengthI/2.                       + kCcthick; 
-      fRow0[iplan][4][isect]   =  clengthI/2. + clengthM            + kCcthick; 
+      fRow0[iplan][0][isect]   = -clengthI/2. - clengthM - clengthO + fgkCcthick; 
+      fRow0[iplan][1][isect]   = -clengthI/2. - clengthM            + fgkCcthick;
+      fRow0[iplan][2][isect]   = -clengthI/2.                       + fgkCcthick;
+      fRow0[iplan][3][isect]   =  clengthI/2.                       + fgkCcthick; 
+      fRow0[iplan][4][isect]   =  clengthI/2. + clengthM            + fgkCcthick; 
     }
 
   }
@@ -174,6 +207,7 @@ void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
 
   const Int_t kNparTrd = 4;
   const Int_t kNparCha = 3;
+  const Int_t kNplan   = fgkNplan;
 
   Float_t parTrd[kNparTrd];
   Float_t parCha[kNparCha];
@@ -183,24 +217,24 @@ void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
   AliTRDgeometry::CreateGeometry(idtmed);
 
   // The TRD mother volume for one sector (Air) (dimensions identical to BTR1)
-  parTrd[0] = kSwidth1/2.;
-  parTrd[1] = kSwidth2/2.;
-  parTrd[2] = kSlenTR1/2.;
-  parTrd[3] = kSheight/2.;
+  parTrd[0] = fgkSwidth1/2.;
+  parTrd[1] = fgkSwidth2/2.;
+  parTrd[2] = fgkSlenTR1/2.;
+  parTrd[3] = fgkSheight/2.;
   gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
   
   // The TRD mother volume for one sector (Air) (dimensions identical to BTR2)
-  parTrd[0] = kSwidth1/2.;
-  parTrd[1] = kSwidth2/2.;
-  parTrd[2] = kSlenTR2/2.;
-  parTrd[3] = kSheight/2.;
+  parTrd[0] = fgkSwidth1/2.;
+  parTrd[1] = fgkSwidth2/2.;
+  parTrd[2] = fgkSlenTR2/2.;
+  parTrd[3] = fgkSheight/2.;
   gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
 
   // The TRD mother volume for one sector (Air) (dimensions identical to BTR3)
-  parTrd[0] = kSwidth1/2.;
-  parTrd[1] = kSwidth2/2.;
-  parTrd[2] = kSlenTR3/2.;
-  parTrd[3] = kSheight/2.;
+  parTrd[0] = fgkSwidth1/2.;
+  parTrd[1] = fgkSwidth2/2.;
+  parTrd[2] = fgkSlenTR3/2.;
+  parTrd[3] = fgkSheight/2.;
   gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
 
   // Position the chambers in the TRD mother volume
@@ -211,37 +245,37 @@ void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
     // the aluminum frame
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthI[iplan-1]/2.;
-    parCha[2] = kCaframe/2.;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
     ypos       = 0.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAFI",iplan       ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
 
     // the inner part of the aluminum frame
-    parCha[0] = fCwidth[iplan-1]/2.   - kCathick;
-    parCha[1] = fClengthI[iplan-1]/2. - kCathick;
-    parCha[2] = kCaframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.   - fgkCathick;
+    parCha[1] = fClengthI[iplan-1]/2. - fgkCathick;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
     ypos       = 0.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAII",iplan       ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
 
     // the carbon frame
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthI[iplan-1]/2.;
-    parCha[2] = kCcframe/2.;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
     ypos       = 0.;
-    zpos       = kCcframe/2.            - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCcframe/2.            - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCFI",iplan       ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
 
     // the inner part of the carbon frame
-    parCha[0] = fCwidth[iplan-1]/2.   - kCcthick;
-    parCha[1] = fClengthI[iplan-1]/2. - kCcthick;
-    parCha[2] = kCcframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.   - fgkCcthick;
+    parCha[1] = fClengthI[iplan-1]/2. - fgkCcthick;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
     ypos       = 0.;
-    zpos       = kCcframe/2.            - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCcframe/2.            - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCII",iplan       ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
 
     // The middle chambers --------------------------------------------------------------
@@ -249,69 +283,69 @@ void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
     // the aluminum frame
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthM1[iplan-1]/2.;
-    parCha[2] = kCaframe/2.;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
-    ypos       = fClengthI[iplan-1]/2.  + fClengthM1[iplan-1]/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthI[iplan-1]/2.+ fClengthM1[iplan-1]/2.;
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAFM",iplan         ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
     gMC->Gsposp("UAFM",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthM2[iplan-1]/2.;
-    parCha[2] = kCaframe/2.;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
-    ypos       = fClengthM2[iplan-1]/2. - kSlenTR2/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
 
     // the inner part of the aluminum frame
-    parCha[0] = fCwidth[iplan-1]/2.    - kCathick;
-    parCha[1] = fClengthM1[iplan-1]/2. - kCathick;
-    parCha[2] = kCaframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
+    parCha[1] = fClengthM1[iplan-1]/2. - fgkCathick;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
-    ypos       = fClengthI[iplan-1]/2.  + fClengthM1[iplan-1]/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAIM",iplan         ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
     gMC->Gsposp("UAIM",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
-    parCha[0] = fCwidth[iplan-1]/2.    - kCathick;
-    parCha[1] = fClengthM2[iplan-1]/2. - kCathick;
-    parCha[2] = kCaframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
+    parCha[1] = fClengthM2[iplan-1]/2. - fgkCathick;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
-    ypos       = fClengthM2[iplan-1]/2. - kSlenTR2/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
 
     // the carbon frame
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthM1[iplan-1]/2.;
-    parCha[2] = kCcframe/2.;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
-    zpos       = kCcframe/2.           - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCcframe/2.         - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCFM",iplan         ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
     gMC->Gsposp("UCFM",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthM2[iplan-1]/2.;
-    parCha[2] = kCcframe/2.;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
-    ypos       = fClengthM2[iplan-1]/2. - kSlenTR2/2.;
-    zpos       = kCcframe/2.            - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
+    zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
 
     // the inner part of the carbon frame
-    parCha[0] = fCwidth[iplan-1]/2.    - kCcthick;
-    parCha[1] = fClengthM1[iplan-1]/2. - kCcthick;
-    parCha[2] = kCcframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
+    parCha[1] = fClengthM1[iplan-1]/2. - fgkCcthick;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
-    zpos       = kCcframe/2.           - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCcframe/2.         - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCIM",iplan         ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
     gMC->Gsposp("UCIM",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
-    parCha[0] = fCwidth[iplan-1]/2.    - kCcthick;
-    parCha[1] = fClengthM2[iplan-1]/2. - kCcthick;
-    parCha[2] = kCcframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
+    parCha[1] = fClengthM2[iplan-1]/2. - fgkCcthick;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
-    ypos       = fClengthM2[iplan-1]/2. - kSlenTR2/2.;
-    zpos       = kCcframe/2.            - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthM2[iplan-1]/2. - fgkSlenTR2/2.;
+    zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
 
     // The outer chambers ---------------------------------------------------------------
@@ -319,97 +353,97 @@ void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
     // the aluminum frame
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthO1[iplan-1]/2.;
-    parCha[2] = kCaframe/2.;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]    + fClengthO1[iplan-1]/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAFO",iplan         ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
     gMC->Gsposp("UAFO",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthO2[iplan-1]/2.;
-    parCha[2] = kCaframe/2.;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
-    ypos       = fClengthM2[iplan-1]    + fClengthO2[iplan-1]/2. - kSlenTR2/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthM2[iplan-1]   + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthO3[iplan-1]/2.;
-    parCha[2] = kCaframe/2.;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
-    ypos       = fClengthO3[iplan-1]/2. - kSlenTR3/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
 
     // the inner part of the aluminum frame
-    parCha[0] = fCwidth[iplan-1]/2.    - kCathick;
-    parCha[1] = fClengthO1[iplan-1]/2. - kCathick;
-    parCha[2] = kCaframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
+    parCha[1] = fClengthO1[iplan-1]/2. - fgkCathick;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]    + fClengthO1[iplan-1]/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAIO",iplan         ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
     gMC->Gsposp("UAIO",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
-    parCha[0] = fCwidth[iplan-1]/2.    - kCathick;
-    parCha[1] = fClengthO2[iplan-1]/2. - kCathick;
-    parCha[2] = kCaframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
+    parCha[1] = fClengthO2[iplan-1]/2. - fgkCathick;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
-    ypos       = fClengthM2[iplan-1]    + fClengthO2[iplan-1]/2. - kSlenTR2/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthM2[iplan-1]   + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
-    parCha[0] = fCwidth[iplan-1]/2.    - kCathick;
-    parCha[1] = fClengthO3[iplan-1]/2. - kCathick;
-    parCha[2] = kCaframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCathick;
+    parCha[1] = fClengthO3[iplan-1]/2. - fgkCathick;
+    parCha[2] = fgkCaframe/2.;
     xpos       = 0.;
-    ypos       = fClengthO3[iplan-1]/2. - kSlenTR3/2.;
-    zpos       = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
+    zpos       = fgkCheight - fgkCaframe/2. - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
 
     // the carbon frame
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthO1[iplan-1]/2.;
-    parCha[2] = kCcframe/2.;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]    + fClengthO1[iplan-1]/2.;
-    zpos       = kCcframe/2.           - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCcframe/2.         - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCFO",iplan,         "TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
     gMC->Gsposp("UCFO",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthO2[iplan-1]/2.;
-    parCha[2] = kCcframe/2.;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
-    ypos       = fClengthM2[iplan-1]    + fClengthO2[iplan-1]/2. - kSlenTR2/2.;
-    zpos       = kCcframe/2.            - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthM2[iplan-1]    + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
+    zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
     parCha[0] = fCwidth[iplan-1]/2.;
     parCha[1] = fClengthO3[iplan-1]/2.;
-    parCha[2] = kCcframe/2.;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
-    ypos       = fClengthO3[iplan-1]/2. - kSlenTR3/2.;
-    zpos       = kCcframe/2.            - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
+    zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
 
     // the inner part of the carbon frame
-    parCha[0] = fCwidth[iplan-1]/2.    - kCcthick;
-    parCha[1] = fClengthO1[iplan-1]/2. - kCcthick;
-    parCha[2] = kCcframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
+    parCha[1] = fClengthO1[iplan-1]/2. - fgkCcthick;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
     ypos       = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]    + fClengthO1[iplan-1]/2.;
-    zpos       = kCcframe/2.           - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    zpos       = fgkCcframe/2.         - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCIO",iplan         ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
     gMC->Gsposp("UCIO",iplan+  kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
-    parCha[0] = fCwidth[iplan-1]/2.    - kCcthick;
-    parCha[1] = fClengthO2[iplan-1]/2. - kCcthick;
-    parCha[2] = kCcframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
+    parCha[1] = fClengthO2[iplan-1]/2. - fgkCcthick;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
-    ypos       = fClengthM2[iplan-1]    + fClengthO2[iplan-1]/2. - kSlenTR2/2.;
-    zpos       = kCcframe/2.            - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthM2[iplan-1]    + fClengthO2[iplan-1]/2. - fgkSlenTR2/2.;
+    zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
-    parCha[0] = fCwidth[iplan-1]/2.    - kCcthick;
-    parCha[1] = fClengthO3[iplan-1]/2. - kCcthick;
-    parCha[2] = kCcframe/2.;
+    parCha[0] = fCwidth[iplan-1]/2.    - fgkCcthick;
+    parCha[1] = fClengthO3[iplan-1]/2. - fgkCcthick;
+    parCha[2] = fgkCcframe/2.;
     xpos       = 0.;
-    ypos       = fClengthO3[iplan-1]/2. - kSlenTR3/2.;
-    zpos       = kCcframe/2.            - kSheight/2. + (iplan-1) * (kCheight + kCspace);
+    ypos       = fClengthO3[iplan-1]/2. - fgkSlenTR3/2.;
+    zpos       = fgkCcframe/2.          - fgkSheight/2. + (iplan-1) * (fgkCheight + fgkCspace);
     gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
 
   }