]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDv1.cxx
Adding the cdb entry for the default GRP values
[u/mrichter/AliRoot.git] / PMD / AliPMDv1.cxx
index 65eab38883edce589a590acbfe54353ab3588596..71e8c15649732be4aba4afa2ab99c35a88cd22ac 100644 (file)
@@ -158,7 +158,6 @@ void AliPMDv1::CreateSupermodule()
   hexd2[9] =  fgkCellRadius - fgkCellWall;
   
   gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
-  gMC->Gsatt("ECAR", "SEEN", 0);
   //******************************************************//
 
   // STEP - II
@@ -173,8 +172,6 @@ void AliPMDv1::CreateSupermodule()
   hexd1[9] =  fgkCellRadius;
 
   gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
-  gMC->Gsatt("ECCU", "SEEN", 0);
-  gMC->Gsatt("ECCU", "COLO", 4);
 
   // Place  inner hex (sensitive volume) inside outer hex (copper)
   
@@ -194,7 +191,6 @@ void AliPMDv1::CreateSupermodule()
   dbox1[2] = fgkCellDepth/2.;
   
   gMC->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3);
-  gMC->Gsatt("EST1", "SEEN", 0);
 
   // volume for second strip EST2 
 
@@ -205,7 +201,6 @@ void AliPMDv1::CreateSupermodule()
   dbox2[2] = dbox1[2];
 
   gMC->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3);
-  gMC->Gsatt("EST2", "SEEN", 0);
 
   // Place hexagonal cells ECCU placed inside EST1 
   xb = 0.; 
@@ -255,7 +250,6 @@ void AliPMDv1::CreateSupermodule()
 
   //Create a BOX, Material AIR
   gMC->Gsvolu("EHC1","BOX", idtmed[698], dbox3, 3);
-  gMC->Gsatt("EHC1", "SEEN", 0);  
   // Place rectangular strips EST1 inside EHC1 unit module
   xb = dbox3[0]-dbox1[0];  
   
@@ -303,7 +297,6 @@ void AliPMDv1::CreateSupermodule()
   
   //Create a BOX of AIR
   gMC->Gsvolu("EHC2","BOX", idtmed[698], dbox4, 3);
-  gMC->Gsatt("EHC2", "SEEN", 0);
 
   // Place rectangular strips EST2 inside EHC2 unit module
   xb = dbox4[0]-dbox2[0]; 
@@ -358,7 +351,6 @@ void AliPMDv1::CreateSupermodule()
   
   //Top and Bottom PCB is a BOX of Material G10
   gMC->Gsvolu("EPCA","BOX", idtmed[607], dboxPcbA, 3);
-  gMC->Gsatt("EPCA", "SEEN", 0);
   //--------------------------------------------------------//  
   //Back Plane : EBKA
   //==================
@@ -374,7 +366,6 @@ void AliPMDv1::CreateSupermodule()
   
   //Back PLane PCB of MAterial G10
   gMC->Gsvolu("EBKA","BOX", idtmed[607], dboxBPlaneA, 3);
-  gMC->Gsatt("EBKA", "SEEN", 0);
   //-------------------------------------------------------------//  
 
  //---------- That was all in the Z -direction of Unit Module A----//
@@ -402,12 +393,10 @@ void AliPMDv1::CreateSupermodule()
   //FOR PRESHOWER
   //Air gap is a BOX of Material Air
   gMC->Gsvolu("ECGA","BOX", idtmed[698], dboxAir3A, 3);
-  gMC->Gsatt("ECGA", "SEEN", 0);
 
   //FOR VETO
   //Air gap is a BOX of Material Air
   gMC->Gsvolu("ECVA","BOX", idtmed[698], dboxAir3A, 3);
-  gMC->Gsatt("ECVA", "SEEN", 0);
   //-------------------------------------------------//  
 
  //-------------------------------------------------//
@@ -425,12 +414,10 @@ void AliPMDv1::CreateSupermodule()
   //FOR PRESHOWER
   //G10 BOX 
   gMC->Gsvolu("EDGA","BOX", idtmed[607], dboxGGA, 3);
-  gMC->Gsatt("EDGA", "SEEN", 0);
 
   //FOR VETO
   //G10 BOX 
   gMC->Gsvolu("EDVA","BOX", idtmed[607], dboxGGA, 3);
-  gMC->Gsatt("EDVA", "SEEN", 0);
 
   //-------------------------------------------------//  
   //----------------------------------------------------------//
@@ -442,21 +429,20 @@ void AliPMDv1::CreateSupermodule()
   // Z-dimension 1.03/2 = 0.515 cm
   //------------------------------------------------------//
   // A Stainless Steel Boundary Channel to house the unit module
-  Float_t fDboxss1[3];
-  fDboxss1[0]           = dboxGGA[0]+fgkSSBoundary; 
-  fDboxss1[1]           = dboxGGA[1]+fgkSSBoundary;       
-  fDboxss1[2]           = fgkThSS/2.;
+
+  Float_t dboxSS1[3];
+  dboxSS1[0]           = dboxGGA[0]+fgkSSBoundary; 
+  dboxSS1[1]           = dboxGGA[1]+fgkSSBoundary;       
+  dboxSS1[2]           = fgkThSS/2.;
   
   //FOR PRESHOWER
 
   //Stainless Steel boundary - Material Stainless Steel
-  gMC->Gsvolu("ESSA","BOX", idtmed[618], fDboxss1, 3);
-  gMC->Gsatt("ESSA", "SEEN", 0);
+  gMC->Gsvolu("ESSA","BOX", idtmed[618], dboxSS1, 3);
 
   //FOR VETO
   //Stainless Steel boundary - Material Stainless Steel
-  gMC->Gsvolu("ESVA","BOX", idtmed[618], fDboxss1, 3);
-  gMC->Gsatt("ESVA", "SEEN", 0);
+  gMC->Gsvolu("ESVA","BOX", idtmed[618], dboxSS1, 3);
 
   //----------------------------------------------------------------//
 
@@ -539,19 +525,17 @@ void AliPMDv1::CreateSupermodule()
   //----------------------------------------------------------//
   // A  unit module type A of Air
   // Dimensions of Unit Module same as SS boundary channel
-  Float_t fDboxum1[3];
-  fDboxum1[0] = fDboxss1[0];
-  fDboxum1[1] = fDboxss1[1];
-  fDboxum1[2] = fgkThSS/2. +0.15; // 0.15 added to accomodate Base Plate at
+  Float_t dboxUM1[3];
+  dboxUM1[0] = dboxSS1[0];
+  dboxUM1[1] = dboxSS1[1];
+  dboxUM1[2] = fgkThSS/2. +0.15; // 0.15 added to accomodate Base Plate at
   // the bottom and the backplane PCB at the top.
 
   //FOR PRESHOWER
   //Create a Unit module of above dimensions Material : AIR
-  gMC->Gsvolu("EUM1","BOX", idtmed[698], fDboxum1, 3);
-  gMC->Gsatt("EUM1", "SEEN", 0);
+  gMC->Gsvolu("EUM1","BOX", idtmed[698], dboxUM1, 3);
   //FOR VETO
-  gMC->Gsvolu("EUV1","BOX", idtmed[698], fDboxum1, 3);
-  gMC->Gsatt("EUV1", "SEEN", 0);
+  gMC->Gsvolu("EUV1","BOX", idtmed[698], dboxUM1, 3);
 
   //----------------------------------------------------------------//
 
@@ -561,19 +545,18 @@ void AliPMDv1::CreateSupermodule()
   // Base plate is as big as the final UM dimensions that is as 
   // SS boundary channel
   Float_t dboxBaseA[3];
-  dboxBaseA[0]       = fDboxss1[0];
-  dboxBaseA[1]       = fDboxss1[1];       
+  dboxBaseA[0]       = dboxSS1[0];
+  dboxBaseA[1]       = dboxSS1[1];       
   dboxBaseA[2]       = fgkThBase/2.;
   
   //Base Blate is a G10 BOX
   gMC->Gsvolu("EBPA","BOX", idtmed[607], dboxBaseA, 3);
-  gMC->Gsatt("EBPA", "SEEN", 0);
   //----------------------------------------------------//  
 
   //FOR VETO
   //- Placing of all components of UM in AIR BOX EUM1--//
   //(1)   FIRST PUT THE BASE PLATE
-  Float_t zbaseplate = -fDboxum1[2] + fgkThBase/2.;
+  Float_t zbaseplate = -dboxUM1[2] + fgkThBase/2.;
   gMC->Gspos("EBPA", 1, "EUV1", 0., 0., zbaseplate, 0, "ONLY");
 
   //(2)   NEXT PLACING the SS BOX 
@@ -586,7 +569,7 @@ void AliPMDv1::CreateSupermodule()
 
   //FOR PRESHOWER
   // (3) Positioning the Backplane PCB 0.1 cm
-  zbkp = -fDboxum1[2] + fgkThBKP/2.;
+  zbkp = -dboxUM1[2] + fgkThBKP/2.;
   gMC->Gspos("EBKA", 1, "EUM1", 0., 0., zbkp, 0, "ONLY");
 
   //(2)   NEXT PLACING the SS BOX 
@@ -616,7 +599,6 @@ void AliPMDv1::CreateSupermodule()
   
   //Top and Bottom PCB is a BOX of Material G10
   gMC->Gsvolu("EPCB","BOX", idtmed[607], dboxPcbB, 3);
-  gMC->Gsatt("EPCB", "SEEN", 0);
   //--------------------------------------------------------//  
   //Back Plane : EBKB
   //==================
@@ -632,7 +614,6 @@ void AliPMDv1::CreateSupermodule()
   
   //Back PLane PCB of MAterial G10
   gMC->Gsvolu("EBKB","BOX", idtmed[607], dboxBPlaneB, 3);
-  gMC->Gsatt("EBKB", "SEEN", 0);
   //-------------------------------------------------------------//  
 
  //---------- That was all in the Z -direction of Unit Module B----//
@@ -658,10 +639,8 @@ void AliPMDv1::CreateSupermodule()
   //PRESHOWER
   //Air gap is a BOX of Material Air
   gMC->Gsvolu("ECGB","BOX", idtmed[698], dboxAir3B, 3);
-  gMC->Gsatt("ECGB", "SEEN", 0);
   //VETO
   gMC->Gsvolu("ECVB","BOX", idtmed[698], dboxAir3B, 3);
-  gMC->Gsatt("ECVB", "SEEN", 0);
 
   //-------------------------------------------------//  
 
@@ -680,10 +659,8 @@ void AliPMDv1::CreateSupermodule()
   //PRESHOWER
   //G10 BOX 
   gMC->Gsvolu("EDGB","BOX", idtmed[607], dboxGGB, 3);
-  gMC->Gsatt("EDGB", "SEEN", 0);
   //VETO
   gMC->Gsvolu("EDVB","BOX", idtmed[607], dboxGGB, 3);
-  gMC->Gsatt("EDVB", "SEEN", 0);
   //-------------------------------------------------//  
   //----------------------------------------------------------//
   //Stainless Steel Bounadry : ESSB
@@ -694,18 +671,17 @@ void AliPMDv1::CreateSupermodule()
   // Z-dimension 1.03/2 = 0.515 cm
   //------------------------------------------------------//
   // A Stainless Steel Boundary Channel to house the unit module
-  Float_t fDboxss2[3];
-  fDboxss2[0]           = dboxGGB[0]+fgkSSBoundary; 
-  fDboxss2[1]           = dboxGGB[1]+fgkSSBoundary;       
-  fDboxss2[2]           = fgkThSS/2.;
+
+  Float_t dboxSS2[3];
+  dboxSS2[0]  = dboxGGB[0] + fgkSSBoundary; 
+  dboxSS2[1]  = dboxGGB[1] + fgkSSBoundary;       
+  dboxSS2[2]  = fgkThSS/2.;
   
   //PRESHOWER
   //Stainless Steel boundary - Material Stainless Steel
-  gMC->Gsvolu("ESSB","BOX", idtmed[618], fDboxss2, 3);
-  gMC->Gsatt("ESSB", "SEEN", 0);
+  gMC->Gsvolu("ESSB","BOX", idtmed[618], dboxSS2, 3);
   //VETO
-  gMC->Gsvolu("ESVB","BOX", idtmed[618], fDboxss2, 3);
-  gMC->Gsatt("ESVB", "SEEN", 0);
+  gMC->Gsvolu("ESVB","BOX", idtmed[618], dboxSS2, 3);
   //----------------------------------------------------------------//
 
   //----------------------------------------------------------------//
@@ -784,20 +760,19 @@ void AliPMDv1::CreateSupermodule()
   //----------------------------------------------------------//
   // A  unit module type B of Air
   // Dimensions of Unit Module same as SS boundary channel
-  Float_t fDboxum2[3];
-  fDboxum2[0] = fDboxss2[0];
-  fDboxum2[1] = fDboxss2[1];
-  fDboxum2[2] = fgkThSS/2. +0.15; // 0.15 added to accomodate Base Plate at
+
+  Float_t dboxUM2[3];
+  dboxUM2[0] = dboxSS2[0];
+  dboxUM2[1] = dboxSS2[1];
+  dboxUM2[2] = fgkThSS/2. +0.15; // 0.15 added to accomodate Base Plate at
   // the bottom and the backplane PCB at the top.
 
   //PRESHOWER
   //Create a Unit module of above dimensions Material : AIR
-  gMC->Gsvolu("EUM2","BOX", idtmed[698], fDboxum2, 3);
-  gMC->Gsatt("EUM2", "SEEN", 0);
+  gMC->Gsvolu("EUM2","BOX", idtmed[698], dboxUM2, 3);
 
   //VETO
-  gMC->Gsvolu("EUV2","BOX", idtmed[698], fDboxum2, 3);
-  gMC->Gsatt("EUV2", "SEEN", 0);
+  gMC->Gsvolu("EUV2","BOX", idtmed[698], dboxUM2, 3);
   //----------------------------------------------------------------//
 
   //BASE PLATE : EBPB
@@ -806,19 +781,18 @@ void AliPMDv1::CreateSupermodule()
   // Base plate is as big as the final UM dimensions that is as 
   // SS boundary channel
   Float_t dboxBaseB[3];
-  dboxBaseB[0]       = fDboxss2[0];
-  dboxBaseB[1]       = fDboxss2[1];       
+  dboxBaseB[0]       = dboxSS2[0];
+  dboxBaseB[1]       = dboxSS2[1];       
   dboxBaseB[2]       = fgkThBase/2.;
   
   //Base Blate is a G10 BOX
   gMC->Gsvolu("EBPB","BOX", idtmed[607], dboxBaseB, 3);
-  gMC->Gsatt("EBPB", "SEEN", 0);
   //----------------------------------------------------//  
 
   //VETO
   //- Placing of all components of UM in AIR BOX EUM2--//
   //(1)   FIRST PUT THE BASE PLATE
-  Float_t zbaseplate2 = -fDboxum2[2] + fgkThBase/2.;
+  Float_t zbaseplate2 = -dboxUM2[2] + fgkThBase/2.;
   gMC->Gspos("EBPB", 1, "EUV2", 0., 0., zbaseplate2, 0, "ONLY");
 
   //(2)   NEXT PLACING the SS BOX 
@@ -833,7 +807,7 @@ void AliPMDv1::CreateSupermodule()
 
   //FOR PRESHOWER
   // (3) Positioning the Backplane PCB 0.1 cm
-  zbkp2 = -fDboxum2[2] + fgkThBKP/2.;
+  zbkp2 = -dboxUM2[2] + fgkThBKP/2.;
   gMC->Gspos("EBKB", 1, "EUM2", 0., 0., zbkp2, 0, "ONLY");
 
   //(2)   NEXT PLACING the SS BOX 
@@ -854,20 +828,18 @@ void AliPMDv1::CreateSupermodule()
   // Dimensions of Unit Module same as SS boundary channel
 
   Float_t dboxPba[3];
-  dboxPba[0] = fDboxum1[0];
-  dboxPba[1] = fDboxum1[1];
+  dboxPba[0] = dboxUM1[0];
+  dboxPba[1] = dboxUM1[1];
   dboxPba[2] = fgkThLead/2.;
   // Lead of UM dimension
   gMC->Gsvolu("EPB1","BOX", idtmed[600], dboxPba, 3);
-  gMC->Gsatt ("EPB1", "SEEN", 0);
 
   Float_t dboxPbb[3];
-  dboxPbb[0] = fDboxum2[0];
-  dboxPbb[1] = fDboxum2[1];
+  dboxPbb[0] = dboxUM2[0];
+  dboxPbb[1] = dboxUM2[1];
   dboxPbb[2] = fgkThLead/2.;
   // Lead of UM dimension
   gMC->Gsvolu("EPB2","BOX", idtmed[600], dboxPbb, 3);
-  gMC->Gsatt ("EPB2", "SEEN", 0);
 
   //----------------------------------------------------------------//
 
@@ -880,25 +852,23 @@ void AliPMDv1::CreateSupermodule()
   // in x-direction and 0.1cm along y-direction
 
   Float_t dboxSM1[3];
-  dboxSM1[0] = 3.0*fDboxum1[0] + (2.0*0.075);
-  dboxSM1[1] = 2.0*fDboxum1[1] +  0.05;
-  dboxSM1[2] = fDboxum1[2];
+  dboxSM1[0] = 3.0*dboxUM1[0] + (2.0*0.075);
+  dboxSM1[1] = 2.0*dboxUM1[1] +  0.05;
+  dboxSM1[2] = dboxUM1[2];
 
   //FOR PRESHOWER  
   gMC->Gsvolu("ESMA","BOX", idtmed[698], dboxSM1, 3);
-  gMC->Gsatt("ESMA", "SEEN", 0);
   
   //FOR VETO
   gMC->Gsvolu("EMVA","BOX", idtmed[698], dboxSM1, 3);
-  gMC->Gsatt("EMVA", "SEEN", 0);
 
   //Position the 6 unit modules in EMSA
   Float_t xa1,xa2,xa3,ya1,ya2; 
-  xa1 =  dboxSM1[0] - fDboxum1[0];
-  xa2 = xa1 - fDboxum1[0] - 0.15 - fDboxum1[0];
-  xa3 = xa2 - fDboxum1[0] - 0.15 - fDboxum1[0];
-  ya1 = dboxSM1[1]  - fDboxum1[1];
-  ya2 = ya1 - fDboxum1[1] - 0.1 - fDboxum1[1];
+  xa1 =  dboxSM1[0] - dboxUM1[0];
+  xa2 = xa1 - dboxUM1[0] - 0.15 - dboxUM1[0];
+  xa3 = xa2 - dboxUM1[0] - 0.15 - dboxUM1[0];
+  ya1 = dboxSM1[1]  - dboxUM1[1];
+  ya2 = ya1 - dboxUM1[1] - 0.1 - dboxUM1[1];
 
   //PRESHOWER
   gMC->Gspos("EUM1", 1, "ESMA", xa1, ya1, 0., 0, "ONLY");
@@ -920,24 +890,22 @@ void AliPMDv1::CreateSupermodule()
   // volume for SUPERMODULE ESMB 
   //Space is added to provide a gapping for HV between UM's
   Float_t dboxSM2[3];
-  dboxSM2[0] = 2.0*fDboxum2[0] + 0.075; 
-  dboxSM2[1] = 3.0*fDboxum2[1] + (2.0*0.05);
-  dboxSM2[2] = fDboxum2[2];
+  dboxSM2[0] = 2.0*dboxUM2[0] + 0.075; 
+  dboxSM2[1] = 3.0*dboxUM2[1] + (2.0*0.05);
+  dboxSM2[2] = dboxUM2[2];
   
   //PRESHOWER
   gMC->Gsvolu("ESMB","BOX", idtmed[698], dboxSM2, 3);
-  gMC->Gsatt("ESMB", "SEEN", 0);
   //VETO 
   gMC->Gsvolu("EMVB","BOX", idtmed[698], dboxSM2, 3);
-  gMC->Gsatt("EMVB", "SEEN", 0);
 
   //Position the 6 unit modules in EMSB
   Float_t xb1,xb2,yb1,yb2,yb3; 
-  xb1 = dboxSM2[0] - fDboxum2[0];
-  xb2 = xb1 - fDboxum2[0] - 0.15 - fDboxum2[0];
-  yb1 = dboxSM2[1]-fDboxum2[1];
-  yb2 = yb1 - fDboxum2[1] - 0.1 -  fDboxum2[1];
-  yb3 = yb2 - fDboxum2[1] - 0.1 -  fDboxum2[1];
+  xb1 = dboxSM2[0] - dboxUM2[0];
+  xb2 = xb1 - dboxUM2[0] - 0.15 - dboxUM2[0];
+  yb1 = dboxSM2[1] - dboxUM2[1];
+  yb2 = yb1 - dboxUM2[1] - 0.1 -  dboxUM2[1];
+  yb3 = yb2 - dboxUM2[1] - 0.1 -  dboxUM2[1];
 
 
   //PRESHOWER  
@@ -966,21 +934,20 @@ void AliPMDv1::CreateSupermodule()
   //Space added to provide a gapping for HV between UM's
 
   Float_t dboxSMPb1[3];
-  dboxSMPb1[0] = 3.0*fDboxum1[0] + (2.0*0.075);
-  dboxSMPb1[1] = 2.0*fDboxum1[1] +  0.05;
+  dboxSMPb1[0] = 3.0*dboxUM1[0] + (2.0*0.075);
+  dboxSMPb1[1] = 2.0*dboxUM1[1] +  0.05;
   dboxSMPb1[2] = fgkThLead/2.;
   
   gMC->Gsvolu("ESPA","BOX", idtmed[698], dboxSMPb1, 3);
-  gMC->Gsatt("ESPA", "SEEN", 0);
   
 
   //Position the 6 unit modules in ESMPbA
   Float_t xpa1,xpa2,xpa3,ypa1,ypa2; 
-  xpa1 = -dboxSMPb1[0] + fDboxum1[0];
-  xpa2 = xpa1 + fDboxum1[0] + 0.15 + fDboxum1[0];
-  xpa3 = xpa2 + fDboxum1[0] + 0.15 + fDboxum1[0];
-  ypa1 = dboxSMPb1[1]  - fDboxum1[1];
-  ypa2 = ypa1 - fDboxum1[1] - 0.1 - fDboxum1[1];
+  xpa1 = -dboxSMPb1[0] + dboxUM1[0];
+  xpa2 = xpa1 + dboxUM1[0] + 0.15 + dboxUM1[0];
+  xpa3 = xpa2 + dboxUM1[0] + 0.15 + dboxUM1[0];
+  ypa1 = dboxSMPb1[1]  - dboxUM1[1];
+  ypa2 = ypa1 - dboxUM1[1] - 0.1 - dboxUM1[1];
 
 
   gMC->Gspos("EPB1", 1, "ESPA", xpa1, ypa1, 0., 0, "ONLY");
@@ -994,20 +961,19 @@ void AliPMDv1::CreateSupermodule()
   // volume for SUPERMODULE ESMPbB 
   //Space is added to provide a gapping for HV between UM's
   Float_t dboxSMPb2[3];
-  dboxSMPb2[0] = 2.0*fDboxum2[0] + 0.075;
-  dboxSMPb2[1] = 3.0*fDboxum2[1] + (2.0*0.05);
+  dboxSMPb2[0] = 2.0*dboxUM2[0] + 0.075;
+  dboxSMPb2[1] = 3.0*dboxUM2[1] + (2.0*0.05);
   dboxSMPb2[2] = fgkThLead/2.;
 
   gMC->Gsvolu("ESPB","BOX", idtmed[698], dboxSMPb2, 3);
-  gMC->Gsatt("ESPB", "SEEN", 0);
  
   //Position the 6 unit modules in ESMPbB
   Float_t xpb1,xpb2,ypb1,ypb2,ypb3; 
-  xpb1 = -dboxSMPb2[0] + fDboxum2[0];
-  xpb2 = xpb1 + fDboxum2[0] + 0.15 + fDboxum2[0];
-  ypb1 = dboxSMPb2[1]  - fDboxum2[1];
-  ypb2 = ypb1 - fDboxum2[1] - 0.1 -  fDboxum2[1];
-  ypb3 = ypb2 - fDboxum2[1] - 0.1 -  fDboxum2[1];
+  xpb1 = -dboxSMPb2[0] + dboxUM2[0];
+  xpb2 = xpb1 + dboxUM2[0] + 0.15 + dboxUM2[0];
+  ypb1 = dboxSMPb2[1]  - dboxUM2[1];
+  ypb2 = ypb1 - dboxUM2[1] - 0.1 -  dboxUM2[1];
+  ypb3 = ypb2 - dboxUM2[1] - 0.1 -  dboxUM2[1];
 
 
   gMC->Gspos("EPB2", 1, "ESPB", xpb1, ypb1, 0., 0, "ONLY");
@@ -1033,8 +999,6 @@ void AliPMDv1::CreateSupermodule()
   dboxFEE[2] = 1.20;
 
   gMC->Gsvolu("EFEE","BOX", idtmed[607], dboxFEE, 3);
-  gMC->Gsatt("EFEE", "SEEN", 0);
-  gMC->Gsatt("EFEE", "COLO", 4);
 
   //Mother volume to accomodate FEE boards
   // It should have the dimension 
@@ -1050,7 +1014,6 @@ void AliPMDv1::CreateSupermodule()
   
   //Volume of same dimension as Back PLane of Material AIR
   gMC->Gsvolu("EFBA","BOX", idtmed[698], dboxFEEBPlaneA, 3);
-  gMC->Gsatt("EFBA", "SEEN", 0);
 
   //TYPE B
   Float_t dboxFEEBPlaneB[3];
@@ -1060,49 +1023,48 @@ void AliPMDv1::CreateSupermodule()
   
   //Back PLane PCB of MAterial G10
   gMC->Gsvolu("EFBB","BOX", idtmed[698], dboxFEEBPlaneB, 3);
-  gMC->Gsatt("EFBB", "SEEN", 0);
 
   //Placing the FEE boards in the Mother volume of AIR
 
   //Type A 
 
-  Float_t x_fee; // X-position of FEE board
-  Float_t y_fee; // Y-position of FEE board
-  Float_t z_fee = 0.0; // Z-position of FEE board
+  Float_t xFee; // X-position of FEE board
+  Float_t yFee; // Y-position of FEE board
+  Float_t zFee = 0.0; // Z-position of FEE board
 
-  Float_t x_a    = 0.25; //distance from the border to 1st FEE board
-  Float_t y_a    = 4.00; //distance from the border to 1st FEE board
-  Float_t x_sepa = 1.70; //Distance between two FEE boards
-  Float_t y_sepa = 8.00; //Distance between two FEE boards
+  Float_t xA    = 0.25; //distance from the border to 1st FEE board
+  Float_t yA    = 4.00; //distance from the border to 1st FEE board
+  Float_t xSepa = 1.70; //Distance between two FEE boards
+  Float_t ySepa = 8.00; //Distance between two FEE boards
 
   
   // FEE Boards EFEE placed inside EFBA
   number = 1;
-  y_fee =  dboxFEEBPlaneA[1] - y_a;  
+  yFee =  dboxFEEBPlaneA[1] - yA;  
   for (i = 1; i <= 6; ++i) 
     {
-      x_fee = -dboxFEEBPlaneA[0] + x_a
+      xFee = -dboxFEEBPlaneA[0] + xA
       for (j = 1; j <= 12; ++j) 
        {
-         gMC->Gspos("EFEE", number, "EFBA", x_fee,y_fee,z_fee, 0, "ONLY");
-         x_fee += x_sepa;
+         gMC->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY");
+         xFee += xSepa;
          number += 1;
        }
-      y_fee -= y_sepa; 
+      yFee -= ySepa; 
     }
   // FEE Boards EFEE placed inside EFBB
   number = 1;
-  y_fee =  dboxFEEBPlaneB[1] - y_a;  
+  yFee =  dboxFEEBPlaneB[1] - yA;  
   for (i = 1; i <= 3; ++i) 
     {
-      x_fee = -dboxFEEBPlaneB[0] + x_a
+      xFee = -dboxFEEBPlaneB[0] + xA
       for (j = 1; j <= 24; ++j) 
        {
-         gMC->Gspos("EFEE", number, "EFBB", x_fee,y_fee,z_fee, 0, "ONLY");
-         x_fee += x_sepa;
+         gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY");
+         xFee += xSepa;
          number += 1;
        }
-      y_fee -= y_sepa; 
+      yFee -= ySepa; 
     }
 
 
@@ -1115,7 +1077,6 @@ void AliPMDv1::CreateSupermodule()
 
   //Type A
   gMC->Gsvolu("EFSA","BOX", idtmed[698],dboxEFSA, 3);
-  gMC->Gsatt("EFSA", "SEEN", 0);
 
   //Distance between the two backplanes of two UMs
   //in x-direction is 0.92 and ydirection is 0.95
@@ -1126,7 +1087,6 @@ void AliPMDv1::CreateSupermodule()
 
   //Type A
   gMC->Gsvolu("EFSB","BOX", idtmed[698],dboxEFSB, 3);
-  gMC->Gsatt("EFSB", "SEEN", 0);
 
 
   Float_t xfs1,xfs2,xfs3,yfs1,yfs2,yfs3; 
@@ -1188,7 +1148,6 @@ void AliPMDv1::CreatePMD()
   dboxFea[2] = fgkThSteel/2.;
   
   gMC->Gsvolu("EFEA","BOX", idtmed[618], dboxFea, 3);
-  gMC->Gsatt ("EFEA", "SEEN", 0);
 
   // --- DEFINE Iron volumes  for SM B
   
@@ -1199,7 +1158,6 @@ void AliPMDv1::CreatePMD()
   dboxFeb[2] = fgkThSteel/2.;
   
   gMC->Gsvolu("EFEB","BOX", idtmed[618], dboxFeb, 3);
-  gMC->Gsatt ("EFEB", "SEEN", 0);
 
   AliMatrix(irotdm, 90., 0.,  90.,  90., 180., 0.);
   AliMatrix(jhrot12, 90., 180., 90., 270., 0., 0.);
@@ -1216,9 +1174,7 @@ void AliPMDv1::CreatePMD()
   gaspmd[2] = fSMthick;
 
   gMC->Gsvolu("EPM1", "BOX", idtmed[698], gaspmd, 3);
-  gMC->Gsatt("EPM1", "SEEN", 1);
   gMC->Gsvolu("EPM2", "BOX", idtmed[698], gaspmd, 3);
-  gMC->Gsatt("EPM2", "SEEN", 1);
 
   //Complete detector for Type A
   //Position Super modules type A for both CPV and PMD in EPMD  
@@ -1262,9 +1218,7 @@ void AliPMDv1::CreatePMD()
   gaspmd[2] = fSMthick; 
 
   gMC->Gsvolu("EPM3", "BOX", idtmed[698], gaspmd, 3);
-  gMC->Gsatt("EPM3", "SEEN", 1);
   gMC->Gsvolu("EPM4", "BOX", idtmed[698], gaspmd, 3);
-  gMC->Gsatt("EPM4", "SEEN", 1);
 
   //Complete detector for Type B
   //Position Super modules type B for both CPV and PMD in EPMD  
@@ -1380,7 +1334,6 @@ void AliPMDv1::CreateMaterials()
   //
   //  cout << " Inside create materials " << endl;
 
-  Int_t *idtmed = fIdtmed->GetArray()-599;
   Int_t isxfld = gAlice->Field()->Integ();
   Float_t sxmgmx = gAlice->Field()->Max();
   
@@ -1451,6 +1404,25 @@ void AliPMDv1::CreateMaterials()
   AliMedium(98, "Vacuum  $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .10, 10);
   AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .10, .1);
   
+  AliDebug(1,"Outside create materials");
+
+}
+
+//_____________________________________________________________________________
+void AliPMDv1::Init()
+{
+  //
+  // Initialises PMD detector after it has been built
+  //
+
+  //
+  AliDebug(2,"Inside Init");
+  AliDebug(2,"PMD simulation package (v1) initialised");
+  AliDebug(2,"parameters of pmd");
+  AliDebug(2,Form("%10.2f %10.2f %10.2f %10.2f\n",
+                 fgkCellRadius,fgkCellWall,fgkCellDepth,fgkZdist));
+  Int_t *idtmed = fIdtmed->GetArray()-599;
+  fMedSens=idtmed[605-1];
   // --- Generate explicitly delta rays in the iron, aluminium and lead --- 
   gMC->Gstpar(idtmed[600], "LOSS", 3.);
   gMC->Gstpar(idtmed[600], "DRAY", 1.);
@@ -1493,27 +1465,56 @@ void AliPMDv1::CreateMaterials()
   gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
   gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
   gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
-
-  AliDebug(1,"Outside create materials");
-
-}
-
-//_____________________________________________________________________________
-void AliPMDv1::Init()
-{
-  //
-  // Initialises PMD detector after it has been built
-  //
-
-  //
-  AliDebug(2,"Inside Init");
-  AliDebug(2,"PMD simulation package (v1) initialised");
-  AliDebug(2,"parameters of pmd");
-  AliDebug(2,Form("%10.2f %10.2f %10.2f %10.2f\n",
-                 fgkCellRadius,fgkCellWall,fgkCellDepth,fgkZdist));
-  Int_t *idtmed = fIdtmed->GetArray()-599;
-  fMedSens=idtmed[605-1];
-
+  // Visualization of volumes
+  gMC->Gsatt("ECAR", "SEEN", 0);
+  gMC->Gsatt("ECCU", "SEEN", 0);
+  gMC->Gsatt("ECCU", "COLO", 4);
+  gMC->Gsatt("EST1", "SEEN", 0);
+  gMC->Gsatt("EST2", "SEEN", 0);
+  gMC->Gsatt("EHC1", "SEEN", 0);  
+  gMC->Gsatt("EHC2", "SEEN", 0);
+  gMC->Gsatt("EPCA", "SEEN", 0);
+  gMC->Gsatt("EBKA", "SEEN", 0);
+  gMC->Gsatt("ECGA", "SEEN", 0);
+  gMC->Gsatt("ECVA", "SEEN", 0);
+  gMC->Gsatt("EDGA", "SEEN", 0);
+  gMC->Gsatt("EDVA", "SEEN", 0);
+  gMC->Gsatt("ESSA", "SEEN", 0);
+  gMC->Gsatt("ESVA", "SEEN", 0);
+  gMC->Gsatt("EUM1", "SEEN", 0);
+  gMC->Gsatt("EUV1", "SEEN", 0);
+  gMC->Gsatt("EBPA", "SEEN", 0);
+  gMC->Gsatt("EPCB", "SEEN", 0);
+  gMC->Gsatt("EBKB", "SEEN", 0);
+  gMC->Gsatt("ECGB", "SEEN", 0);
+  gMC->Gsatt("ECVB", "SEEN", 0);
+  gMC->Gsatt("EDGB", "SEEN", 0);
+  gMC->Gsatt("EDVB", "SEEN", 0);
+  gMC->Gsatt("ESSB", "SEEN", 0);
+  gMC->Gsatt("ESVB", "SEEN", 0);
+  gMC->Gsatt("EUM2", "SEEN", 0);
+  gMC->Gsatt("EUV2", "SEEN", 0);
+  gMC->Gsatt("EBPB", "SEEN", 0);
+  gMC->Gsatt("EPB1", "SEEN", 0);
+  gMC->Gsatt("EPB2", "SEEN", 0);
+  gMC->Gsatt("ESMA", "SEEN", 0);
+  gMC->Gsatt("EMVA", "SEEN", 0);
+  gMC->Gsatt("ESMB", "SEEN", 0);
+  gMC->Gsatt("EMVB", "SEEN", 0);
+  gMC->Gsatt("ESPA", "SEEN", 0);
+  gMC->Gsatt("ESPB", "SEEN", 0);
+  gMC->Gsatt("EFEE", "SEEN", 0);
+  gMC->Gsatt("EFEE", "COLO", 4);
+  gMC->Gsatt("EFBA", "SEEN", 0);
+  gMC->Gsatt("EFBB", "SEEN", 0);
+  gMC->Gsatt("EFSA", "SEEN", 0);
+  gMC->Gsatt("EFSB", "SEEN", 0);
+  gMC->Gsatt("EFEA", "SEEN", 0);
+  gMC->Gsatt("EFEB", "SEEN", 0);
+  gMC->Gsatt("EPM1", "SEEN", 1);
+  gMC->Gsatt("EPM2", "SEEN", 1);
+  gMC->Gsatt("EPM3", "SEEN", 1);
+  gMC->Gsatt("EPM4", "SEEN", 1);
 }
 
 //_____________________________________________________________________________
@@ -1654,4 +1655,39 @@ void AliPMDv1::GetParameters()
 
   
 }
+// ---------------------------------------------------------------
+void AliPMDv1::AddAlignableVolumes() const
+{
+  //
+  // Create entries for alignable volumes associating the symbolic volume
+  // name with the corresponding volume path. Needs to be syncronized with
+  // eventual changes in the geometry.
+  // 
+  SetSectorAlignable();
+
+}
+// ----------------------------------------------------------------
+void AliPMDv1::SetSectorAlignable() const
+{
+  // 
+
+  TString vpsector = "ALIC_1/EPM";
+  TString vpappend = "_1";
 
+  TString snsector="PMD/Sector";
+
+  TString volpath, symname;
+  
+  for(Int_t cnt=1; cnt<=4; cnt++){
+    volpath = vpsector;
+    volpath += cnt;
+    volpath += vpappend;
+    symname = snsector;
+    symname += cnt;
+    if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data()))
+      {
+       AliFatal("Unable to set alignable entry!");
+      }
+  }
+}
+// ------------------------------------------------------------------