Geometry update.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Oct 2001 08:36:19 +0000 (08:36 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Oct 2001 08:36:19 +0000 (08:36 +0000)
STRUCT/AliSHILv0.cxx

index 16bc1e9eecf81a05dbd5e3a80c2112dd5a1af132..7e470b400d4c11157d1f0088f7990eb810b0c0d8 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.13  2001/04/23 23:12:41  morsch
+Overlap in closing cone corrected (thanks to Ivana Hrivnacova)
+
 Revision 1.12  2001/03/16 16:26:05  morsch
 Put vacuum in beam-pipe not air.
 
@@ -99,7 +102,7 @@ AliSHILv0::AliSHILv0(const char *name, const char *title)
   SetMarkerSize(0.4);
   // Pb  cone not yet compatible with muon chamber inner radii
   // Switched off by default
-  fPbCone=kFALSE;
+  fPbCone=kTRUE;
 }
  
 //_____________________________________________________________________________
@@ -120,7 +123,7 @@ void AliSHILv0::CreateGeometry()
   */
   //End_Html
 
-    Float_t cpar[5], cpar0[5], tpar[3], par1[39], par2[27], par3[27], 
+    Float_t cpar[5], cpar0[5], tpar[3], par1[39], pars1[100], par2[27], par3[27], 
        par4[21], par0[45];
     Float_t dz, dZ;
   
@@ -136,8 +139,6 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
 // Material of the rear part of the shield
   Int_t iHeavy=kNiCuW;
   if (fPbCone) iHeavy=kPb;
-  
-  
 //
 // Mother volume
 //
@@ -147,64 +148,129 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   
   par0[0]  = 0.;
   par0[1]  = 360.;
-  par0[2]  = 13.;
+  par0[2]  = 28.;
 
   Float_t dl=(zvac12-zstart)/2.;
   dz=zstart+dl;
 //
+// start
   par0[3]  = -dl;
   par0[4]  = 0.;
   par0[5]  = zstart * TMath::Tan(accMin);
-
-  par0[6]  = -dl+dRear1;
+// recess station 1
+  par0[6]  = -dz+zch11;
   par0[7]  = 0.;
-  par0[8]  = zRear * TMath::Tan(accMin);
+  par0[8]  = zch11 * TMath::Tan(accMin);
 
-  par0[9]  = -dl+dRear1;
+  par0[9]   = par0[6];
   par0[10]  = 0.;
-  par0[11]  = R11;
+  par0[11]  = 17.9;
 
-  par0[12]  = -dz+zvac4;
+  par0[12]  = -dz+zch12;
   par0[13]  = 0.;
-  par0[14]  = R11;
-
-  par0[15]  = -dz+zvac4;
-  par0[16] = 0.;
-  par0[17] = R21;
+  par0[14]  = 17.9;
 
-  par0[18] = -dz+zvac6;
-  par0[19] = 0.;
-  par0[20] = R21;
+  par0[15]  = par0[12];
+  par0[16]  = 0.;
+  par0[17]  = zch12 * TMath::Tan(accMin);
+// recess station 2
+  par0[18]  = -dz+zch21;
+  par0[19]  = 0.;
+  par0[20]  = zch21 * TMath::Tan(accMin);
 
-  par0[21] = -dz+zvac6;
+  par0[21]  = -dz+zch21;
   par0[22] = 0.;
-  par0[23] = zvac6 * TMath::Tan(accMin);
+  par0[23] = 23.;
 
-  par0[24] = -dz+zConeE;
+  par0[24]  = -dz+zch22;
   par0[25] = 0.;
-  par0[26] = 30.;
+  par0[26] = 23.;
 
-  par0[27] = -dz+zvac10;
-  par0[28] = 0.;
-  par0[29] = 30.;
-
-  par0[30] = -dz+zvac10;
+  par0[27]  = -dz+zch22;
+  par0[28]  = 0.;
+  par0[29]  = zch22 * TMath::Tan(accMin);
+//
+  par0[30] = -dz+zvac6;
   par0[31] = 0.;
-  par0[32] = R42;
-
-  par0[33] = -dz+zvac11;
+  par0[32] = zvac6 * TMath::Tan(accMin);
+// end of 2 deg cone
+  par0[33] = -dz+zConeE;
   par0[34] = 0.;
-  par0[35] = R42;
+  par0[35] = 30.;
 
-  par0[36] = -dz+zvac11;
+  par0[36] = -dz+zch31;
   par0[37] = 0.;
-  par0[38] = R43;
+  par0[38] = 30.;
 
-  par0[39] = -dz+zvac12;
+  par0[39] = -dz+zch31;
   par0[40] = 0.;
-  par0[41] = R43;
+  par0[41] = 29.;
+
+  par0[42] = -dz+zch32;
+  par0[43] = 0.;
+  par0[44] = 29.;
+// start of 1.6 deg cone
+  par0[45] = -dz+zch32;
+  par0[46] = 0.;
+  par0[47] = 30.+(zch32-zConeE)*TMath::Tan(thetaOpenPbO);
+// recess station 4
+  par0[48] = -dz+zch41;
+  par0[49] = 0.;
+  par0[50] = 30.+(zch41-zConeE)*TMath::Tan(thetaOpenPbO);
+
+  par0[51] = -dz+zch41;
+  par0[52] = 0.;
+  par0[53] = 37.5;
+
+  par0[54] = -dz+zch42;
+  par0[55] = 0.;
+  par0[56] = 37.5;
+
+  par0[57] = -dz+zch42;
+  par0[58] = 0.;
+  par0[59] = 30.+(zch42-zConeE)*TMath::Tan(thetaOpenPbO);
+
+// recess station 5
+
+  par0[60] = -dz+zch51;
+  par0[61] = 0.;
+  par0[62] = 30.+(zch51-zConeE)*TMath::Tan(thetaOpenPbO);
+
+  par0[63] = -dz+zch51;
+  par0[64] = 0.;
+  par0[65] = 37.5;
+
+  par0[66] = -dz+zch52;
+  par0[67] = 0.;
+  par0[68] = 37.5;
+
+  par0[69] = -dz+zch52;
+  par0[70] = 0.;
+  par0[71] = 30.+(zch52-zConeE)*TMath::Tan(thetaOpenPbO);
+
+// end of cone
+
+  par0[72] = -dz+zvac10;
+  par0[73] = 0.;
+  par0[74] = 30.+(zvac10-zConeE)*TMath::Tan(thetaOpenPbO);
+
+  par0[75] = -dz+zvac10;
+  par0[76] = 0.;
+  par0[77] = R42;
+
+  par0[78] = -dz+zvac11;
+  par0[79] = 0.;
+  par0[80] = R42;
+
+  par0[81] = -dz+zvac11;
+  par0[82] = 0.;
+  par0[83] = R43;
 
-  gMC->Gsvolu("YMOT", "PCON", idtmed[kVacuum], par0, 42);
+  par0[84] = -dz+zvac12;
+  par0[85] = 0.;
+  par0[86] = R43;
+
+  gMC->Gsvolu("YMOT", "PCON", idtmed[kVacuum], par0, 87);
   dz=zstart+dl;
   gMC->Gspos("YMOT", 1, "ALIC", 0., 0., dz, 0, "ONLY");  
 //
@@ -228,9 +294,9 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   par1[7]  = rAbs+ (zvac1-zOpen) * TMath::Tan(thetaOpen1);
   par1[8]  = zvac1 * TMath::Tan(accMin);
 
-  par1[9]  = par1[6]+dr11;
+  par1[9]  = par1[6]+dr11/2.;
   par1[10] = par1[7]+dr11;
-  par1[11] = (zvac1+dr11) * TMath::Tan(accMin);
+  par1[11] = (zvac1+dr11/2.) * TMath::Tan(accMin);
 
   par1[12] = -dl+dRear1;
   par1[13] = par1[10];
@@ -253,7 +319,7 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   par1[26] = R11;
 
   par1[27] = par1[24]+dr12;
-  par1[28] = par1[25]-dr12;
+  par1[28] = par1[25]-dr12; 
   par1[29] = R11;
 
   par1[30] = par1[27]+dB1;
@@ -265,17 +331,20 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   par1[35] = R11;
 
   par1[36] = -dl+zvac4-zstart;
-  par1[37] = par1[34]+(zvac4-zvac3)*TMath::Tan(thetaOpen2);
+  par1[37] = par1[34];
   par1[38] = R11;
 
-  Float_t r2=par1[34];
-  Float_t rBox=par1[31]-0.1;
+  Float_t r2  = par1[37];
+  Float_t rBox= par1[31]-0.1;
+  Float_t rc1 = par1[7];
 
   gMC->Gsvolu("YGO1", "PCON", idtmed[kNiCuW], par1, 39);
-  { // Begin local scope for i
-      for (Int_t i=4; i<38; i+=3) par1[i]  = 0;
-  } // End local scope for i
-  gMC->Gsvolu("YMO1", "PCON", idtmed[kVacuum+40], par1, 39);
+  Int_t i;
+  
+  for (i=0; i<39; i++)  pars1[i]  = par1[i];
+  for (i=4; i<38; i+=3) pars1[i]  = 0.;
+
+  gMC->Gsvolu("YMO1", "PCON", idtmed[kVacuum+40], pars1, 39);
   gMC->Gspos("YGO1", 1, "YMO1", 0., 0., 0., 0, "ONLY");  
   dZ+=dl;
   gMC->Gspos("YMO1", 1, "YMOT", 0., 0., dZ, 0, "ONLY");  
@@ -283,12 +352,13 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
 
 //
 // Steel envelope
-  tpar[0]=R11-dRSteel1;
+  tpar[0]=R11-dRSteel2;
   tpar[1]=R11;
-  tpar[2]=dl-dRear1/2;
+  tpar[2]=(zvac4-zvac3)/2.;
   gMC->Gsvolu("YSE1", "TUBE", idtmed[kNiCuW], tpar, 3);
   dz=dl-tpar[2];
   gMC->Gspos("YSE1", 1, "YGO1", 0., 0., dz, 0, "ONLY");
+
 //
 // 1st section: vacuum system
 //
@@ -336,66 +406,83 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   
 
   tpar[0]=0;
-  tpar[1]=rB1+hB1;
+  tpar[1]=rB1+hB1+0.5;
   tpar[2]=10.*lB1/2.;
   gMC->Gsvolu("YBM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
-  dz=-tpar[2]+lB1/2.;
-  { // Begin local scope for i
-      for (Int_t i=0; i<10; i++) {
-         gMC->Gspos("YBU1", i+1 , "YBM1", 0., 0., dz, 0, "ONLY"); 
-         dz+=lB1;
-      }
-  } // End local scope for i
-  dz=-dl+(zvac1-zstart)+dr11+tpar[2];
+  Float_t bsize = tpar[2];
+  tpar[0]=rB1+hB1;
+  gMC->Gsvolu("YBI1", "TUBE", idtmed[kInsulation+40], tpar, 3);
+  gMC->Gspos("YBI1", 2, "YBM1", 0., 0., 0., 0, "ONLY"); 
+
+  dz=-bsize+lB1/2.;
+
+  for (i=0; i<10; i++) {
+    gMC->Gspos("YBU1", i+1 , "YBM1", 0., 0., dz, 0, "ONLY"); 
+    dz+=lB1;
+  }
+
+  dz=-dl+(zvac1-zstart)+dr11+bsize;
   gMC->Gspos("YBM1", 1, "YMO1", 0., 0., dz, 0, "ONLY"); 
 
-  dz=dl-dr13-(zvac4-zvac3)-tpar[2];
+  dz=dl-dr13-(zvac4-zvac3)-bsize;
   gMC->Gspos("YBM1", 2, "YMO1", 0., 0., dz, 0, "ONLY"); 
 
+
 //
 // Flange
 
   tpar[0]=0;
-  tpar[1]=rF1;
+  tpar[1]=rF1+0.6;
   tpar[2]=dF1/2.;
   gMC->Gsvolu("YFM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
-
-  tpar[0]=rF1-2.;
-  tpar[1]=rF1;
+// Steel
+  tpar[0]=rB1;
+  tpar[1]=rF1+0.6;
   tpar[2]=dF1/2.;
   gMC->Gsvolu("YF11", "TUBE", idtmed[kSteel+40], tpar, 3);
-  gMC->Gspos("YF11", 1, "YFM1", 0., 0., 0., 0, "ONLY"); 
+// Insulation
+  tpar[0]=rF1;
+  tpar[1]=rF1+0.5;
+  tpar[2]=dF1/2.;
+  gMC->Gsvolu("YF12", "TUBE", idtmed[kInsulation+40], tpar, 3);
 
-  tpar[0]=rB1;
-  tpar[1]=rF1-2.;
-  tpar[2]=dFlange/2.;
-  gMC->Gsvolu("YF12", "TUBE", idtmed[kSteel+40], tpar, 3);
-  dz=-dF1/2.+tpar[2];
-  gMC->Gspos("YF12", 1, "YFM1", 0., 0., dz, 0, "ONLY"); 
-  dz= dF1/2.-tpar[2];
-  gMC->Gspos("YF12", 2, "YFM1", 0., 0., dz, 0, "ONLY"); 
+
+  gMC->Gspos("YF11", 1, "YFM1", 0., 0., 0., 0, "ONLY"); 
+  gMC->Gspos("YF12", 1, "YFM1", 0., 0., 0., 0, "ONLY"); 
 
   dz=-dl+(zvac2-zstart);
   gMC->Gspos("YFM1", 2, "YMO1", 0., 0., dz, 0, "ONLY"); 
 
 //
 // pipe between flange and bellows
+//
+// Steel 
   tpar[0]=rB1-dTubeS;
-  tpar[1]=rB1;
+  tpar[1]=rB1+0.6;
   tpar[2]=2.*(dB1+dr12-10.*lB1)/4.;
   gMC->Gsvolu("YPF1", "TUBE", idtmed[kSteel+40], tpar, 3);
+// Insulation
+  tpar[0]=rB1;
+  tpar[1]=rB1+0.5;
+  gMC->Gsvolu("YPS1", "TUBE", idtmed[kInsulation+40], tpar, 3);
+  gMC->Gspos("YPS1", 1, "YPF1", 0., 0., 0., 0, "ONLY"); 
+
   dz=-dl+(zvac2-zstart)-dF1/2.-tpar[2];
   gMC->Gspos("YPF1", 1, "YMO1", 0., 0., dz, 0, "ONLY"); 
   dz=-dl+(zvac2-zstart)+dF1/2.+tpar[2];
   gMC->Gspos("YPF1", 2, "YMO1", 0., 0., dz, 0, "ONLY"); 
 
+// Pipe+Heating     1.5 mm 
+// Heating Jacket   5.0 mm
+// Protection       1.0 mm
+// ========================
+//                  7.5 mm
 // pipe and heating jackets outside bellows
 //
 // left side
-  cpar0[0]=(zvac1-zstart)/2;
-  cpar0[1]=rVacu+(zstart-zOpen)*TMath::Tan(thetaOpen1)-0.05;
-  cpar0[2]=rAbs +(zstart-zOpen)*TMath::Tan(thetaOpen1);
+  cpar0[0]=(zvac1+dr11-zstart)/2;
+  cpar0[1]=rVacu-0.05  +(zstart-zOpen)*TMath::Tan(thetaOpen1);
+  cpar0[2]=rVacu+0.7   +(zstart-zOpen)*TMath::Tan(thetaOpen1);
   cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpen1);
   cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpen1);
   gMC->Gsvolu("YV11", "CONE", idtmed[kSteel+40], cpar0, 5);
@@ -409,48 +496,30 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   cpar[4]=cpar0[3]+0.65;
   gMC->Gsvolu("YI11", "CONE", idtmed[kInsulation+40], cpar, 5);
   gMC->Gspos("YI11", 1, "YV11", 0., 0., 0., 0, "ONLY"); 
-//
-// clearance
-  cpar[1]=cpar0[1]+0.75;
-  cpar[2]=cpar0[1]+1.25;
-  cpar[3]=cpar0[3]+0.75;
-  cpar[4]=cpar0[3]+1.25;
-  gMC->Gsvolu("YP11", "CONE", idtmed[kVacuum+40], cpar, 5);
-  gMC->Gspos("YP11", 1, "YV11", 0., 0., 0., 0, "ONLY"); 
-  
   dz=-dl+cpar0[0];
   gMC->Gspos("YV11", 1, "YMO1", 0., 0., dz, 0, "ONLY"); 
+
 // right side
-  dTubeS=0.35;
-  dVacuS+=0.25;
+  dTubeS  = 0.35;
+  dVacuS += 0.25;
   
-  cpar0[0]=(zvac4-zvac3)/2;
-  cpar0[1]=rB1;
-  cpar0[2]=cpar0[1]+dVacuS;
-
-  cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
-  cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
+  cpar0[0] = (zvac4-zvac3)/2;
+  cpar0[1] = rB1;
+  cpar0[2] = cpar0[1]+dVacuS;
+  cpar0[3] = cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
+  cpar0[4] = cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
   gMC->Gsvolu("YV12", "CONE", idtmed[kSteel], cpar0, 5);
   Float_t r2V=cpar0[3];
 //
 // insulation
-  cpar[0]=cpar0[0];
-  cpar[1]=cpar0[1]+dTubeS;
-  cpar[2]=cpar0[1]+dTubeS+dInsuS;
-  cpar[3]=cpar0[3]+dTubeS;
-  cpar[4]=cpar0[3]+dTubeS+dInsuS;
+  cpar[0] = cpar0[0];
+  cpar[1] = cpar0[1]+dTubeS;
+  cpar[2] = cpar0[1]+dTubeS+dInsuS;
+  cpar[3] = cpar0[3]+dTubeS;
+  cpar[4] = cpar0[3]+dTubeS+dInsuS;
   gMC->Gsvolu("YI12", "CONE", idtmed[kInsulation], cpar, 5);
   gMC->Gspos("YI12", 1, "YV12", 0., 0., 0., 0, "ONLY"); 
 
-//
-// clearance
-  cpar[1]=cpar0[1]+dTubeS+dInsuS+dEnveS;
-  cpar[2]=cpar0[1]+dTubeS+dInsuS+dEnveS+dFreeS;
-  cpar[3]=cpar0[3]+dTubeS+dInsuS+dEnveS;
-  cpar[4]=cpar0[3]+dTubeS+dInsuS+dEnveS+dFreeS;
-  gMC->Gsvolu("YP12", "CONE", idtmed[kAir], cpar, 5);
-  gMC->Gspos("YP12", 1, "YV12", 0., 0., 0., 0, "ONLY"); 
-  
   dz=dl-cpar0[0];
   gMC->Gspos("YV12", 1, "YMO1", 0., 0., dz, 0, "ONLY"); 
 //
@@ -460,40 +529,59 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
 
   par2[0]  = 0.;
   par2[1]  = 360.;
-  par2[2]  = 6.;
+  par2[2]  = 11.;
   dl=(zvac7-zvac4)/2.;
-// recess station 2   
+// recess station 2
   par2[3]  = -dl;
-  par2[4]  = r2+(zvac4-zvac3) * TMath::Tan(thetaOpen2);
+  par2[4]  = r2;
   par2[5]  = R21;
 
-  par2[6]  = -dl+(zvac6-zvac4);
-  par2[7]  = r2+(zvac6-zvac3) * TMath::Tan(thetaOpen2);
+  par2[6]  = -dl+.1;
+  par2[7]  = r2;
   par2[8]  = R21;
 
-  par2[9] = -dl+(zvac6-zvac4);
-  par2[10] = par2[7];
-  par2[11] = zvac6*TMath::Tan(accMin);
+  par2[9]   = -dl+(zvac6-zvac4);
+  par2[10]  = r2+(zvac6-zvac4-10.) * TMath::Tan(thetaOpen2);
+  par2[11]  = R21;
 
-// Start of Pb section
-  par2[12] = -dl+(zPb-zvac4);
-  par2[13] = r2+(zPb-zvac3) * TMath::Tan(thetaOpen2);
-  par2[14] = zPb*TMath::Tan(accMin);
+  par2[12] = -dl+(zvac6-zvac4);
+  par2[13] = par2[10];
+  par2[14] = zvac6*TMath::Tan(accMin);
 
+// Start of Pb section
+  par2[15] = -dl+(zPb-zvac4);
+  par2[16] = r2+(zPb-zvac4-10.) * TMath::Tan(thetaOpen2);
+  par2[17] = zPb*TMath::Tan(accMin);
 //
 // end of cone following 2 deg line
-  par2[15] = -dl+(zConeE-zvac4);
-  par2[16] = r2+(zConeE-zvac3) * TMath::Tan(thetaOpen2);
-  par2[17] = 30.;
-
-  par2[18] = -dl+(zvac7-zvac4);
-  par2[19] = r2+(zvac7-zvac3) * TMath::Tan(thetaOpen2);
+  par2[18] = -dl+(zConeE-zvac4);
+  par2[19] = r2+(zConeE-zvac4-10.) * TMath::Tan(thetaOpen2);
   par2[20] = 30.;
+// recess station 3
+  par2[21] = -dl+(zch31-zvac4);
+  par2[22] = r2+(zch31-zvac4-10.) * TMath::Tan(thetaOpen2);
+  par2[23] = 30.;
+
+  par2[24] = -dl+(zch31-zvac4);
+  par2[25] = r2+(zch31-zvac4-10.) * TMath::Tan(thetaOpen2);
+  par2[26] = 29.;
 
+  par2[27] = -dl+(zch32-zvac4);
+  par2[28] = r2+(zch32-zvac4-10.) * TMath::Tan(thetaOpen2);
+  par2[29] = 29.;
+
+  par2[30] = -dl+(zch32-zvac4);
+  par2[31] = r2+(zch32-zvac4-10.) * TMath::Tan(thetaOpen2);
+  par2[32] = 30.;
+
+  par2[33] = -dl+(zvac7-zvac4);
+  par2[34] = r2+(zvac7-zvac4-10.) * TMath::Tan(thetaOpen2);
+  par2[35] = 30.;
+
+  gMC->Gsvolu("YGO2", "PCON", idtmed[kSteel+40], par2, 36);
 
-  gMC->Gsvolu("YGO2", "PCON", idtmed[kNiCuW+40], par2, 21);
 //
-// Lead cone option replacing Tungsten 
+// Lead cone 
 //
   Float_t parPb[12];
   parPb[0]  = 0.;
@@ -502,118 +590,56 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   Float_t dlPb=(zvac7-zPb)/2.;
   
   parPb[3]  = -dlPb;
-  parPb[4]  = 17.657;
-  parPb[5]  = zPb*TMath::Tan(accMin);
+  parPb[4]  =  r2+(zPb-zvac4-10.) * TMath::Tan(thetaOpen2);
+  parPb[5]  =  zPb*TMath::Tan(accMin)-dRSteel2;
   
   parPb[6]  = -dlPb+(zConeE-zPb);
-  parPb[7]  = parPb[4]+(zConeE-zPb)*TMath::Tan(thetaOpenPb);
-  parPb[8]  = 30.;
+  parPb[7]  =  r2+(zConeE-zvac4-10.) * TMath::Tan(thetaOpen2);
+  parPb[8]  = 26.;
   
   parPb[9]   = dlPb;
-  parPb[10]  = parPb[7]+(zvac7-zConeE)*TMath::Tan(thetaOpenPb);
-  parPb[11]  = 30.;
-  
-  Float_t rPbLast=parPb[10];
-  
+  parPb[10]  =  r2+(zvac7-zvac4-10.) * TMath::Tan(thetaOpen2);
+  parPb[11]  = 26.;
 
   gMC->Gsvolu("YXO2", "PCON", idtmed[kPb], parPb, 12);   
   gMC->Gspos("YXO2", 1, "YGO2", 0., 0., (zPb-zvac4)/2., 0, "ONLY");  
 
-  parPb[4]  = r2+(zPb-zvac3) * TMath::Tan(thetaOpen2);
-  parPb[5]  = 17.657;
+//
+// W cone 
+//
+  Float_t parW[15];
+  parW[0]  = 0.;
+  parW[1]  = 360.;
+  parW[2]  = 4.;
+  Float_t dlW=(zPb-zvac4)/2.;
   
-  parPb[7]  = r2+(zConeE-zvac3) * TMath::Tan(thetaOpen2);
-  parPb[8]  = parPb[5]+(zConeE-zPb)*TMath::Tan(thetaOpenPb);
+  parW[3]   = -dlW;
+  parW[4]   =  r2;
+  parW[5]   =  R21-dRSteel2;
   
-  parPb[10]  = r2+(zvac7-zvac3) * TMath::Tan(thetaOpen2);
-  parPb[11]  = parPb[8]+(zvac7-zConeE)*TMath::Tan(thetaOpenPb);
+  parW[6]   = -dlW+(zvac6-zvac4)+dRSteel2;
+  parW[7]   =  r2+(zvac6-zvac4+dRSteel2) * TMath::Tan(thetaOpen2);
+  parW[8]   =  R21-dRSteel2;
+  parW[9]   = -dlW+(zvac6-zvac4)+dRSteel2;
+  parW[10]  =  r2+(zvac6-zvac4+dRSteel2) * TMath::Tan(thetaOpen2);
+  parW[11]  =  (zvac6+dRSteel2)*TMath::Tan(accMin)-dRSteel2;
+  parW[12]   = dlW;
+  parW[13]  =  r2+(zPb-zvac4) * TMath::Tan(thetaOpen2);
+  parW[14]  = zPb*TMath::Tan(accMin)-dRSteel2;
 
-  gMC->Gsvolu("YYO2", "PCON", idtmed[iHeavy+40], parPb, 12);     
-  gMC->Gspos("YYO2", 1, "YGO2", 0., 0., (zPb-zvac4)/2., 0, "ONLY");  
-  
+  gMC->Gsvolu("YYO2", "PCON", idtmed[kNiCuW], parW, 15);         
+  gMC->Gspos("YYO2", 1, "YGO2", 0., 0., -(zvac7-zPb)/2., 0, "ONLY");  
 
-  { // Begin local scope for i
-      for (Int_t i=4; i<23; i+=3) par2[i]  = 0;
-  } // End local scope for i
+  for (i=4; i<35; i+=3) par2[i]  = 0;
           
-  gMC->Gsvolu("YMO2", "PCON", idtmed[kVacuum+40], par2, 24);
+  gMC->Gsvolu("YMO2", "PCON", idtmed[kVacuum+40], par2, 36);
   gMC->Gspos("YGO2", 1, "YMO2", 0., 0., 0., 0, "ONLY");  
   dZ+=dl;
   gMC->Gspos("YMO2", 1, "YMOT", 0., 0., dZ, 0, "ONLY");  
   dZ+=dl;
 //
-// Steel envelope
-//
-// (1)
-  tpar[0]=R11-dRSteel1;
-  tpar[1]=R21;
-  tpar[2]=2;
-  gMC->Gsvolu("YS21", "TUBE", idtmed[kSteel], tpar, 3);
-  dz=-dl+tpar[2];
-  gMC->Gspos("YS21", 1, "YGO2", 0., 0., dz, 0, "ONLY");  
-  dz+=tpar[2];
-// (2)
-  tpar[0]=R21-dRSteel2;
-  tpar[1]=R21;
-  tpar[2]=(zvac6-zvac5)/2.;
-  gMC->Gsvolu("YS22", "TUBE", idtmed[kSteel], tpar, 3);
-  dz+=tpar[2];
-  gMC->Gspos("YS22", 1, "YGO2", 0., 0., dz, 0, "ONLY");  
-  dz+=tpar[2];
-// (3)  
-  cpar[0]=2.;
-  cpar[1]=R21-dRSteel2;
-  cpar[2]=zvac6 * TMath::Tan(accMin);
-  cpar[3]=cpar[1];
-  cpar[4]=cpar[2]+4.*TMath::Tan(accMin);
-  gMC->Gsvolu("YS23", "CONE", idtmed[kSteel], cpar, 5);
-  dz+=cpar[0];
-  gMC->Gspos("YS23", 1, "YGO2", 0., 0., dz, 0, "ONLY");
-  dz+=cpar[0];
-// (4)
-  cpar[0]=(zPb-zvac6-4.)/2;
-  cpar[2]=cpar[4];
-  cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
-  cpar[1]=cpar[2]-dRSteel2;
-  cpar[3]=cpar[4]-dRSteel2;
-
-  gMC->Gsvolu("YS24", "CONE", idtmed[kSteel], cpar, 5);
-  dz+=cpar[0];
-  gMC->Gspos("YS24", 1, "YGO2", 0., 0., dz, 0, "ONLY");  
-  dz+=cpar[0];
-
-// (5) 
-  cpar[0]=(zConeE-zPb)/2;
-  cpar[2]=cpar[4];
-  cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
-  cpar[1]=cpar[2]-dRSteel2;
-  cpar[3]=cpar[4]-dRSteel2;
-
-  gMC->Gsvolu("YS25", "CONE", idtmed[kSteel], cpar, 5);
-  dz=-dlPb+cpar[0];
-  gMC->Gspos("YS25", 1, "YXO2", 0., 0., dz, 0, "ONLY");  
-  dz+=cpar[0];
-// (6)
-  tpar[0]=26.;
-  tpar[1]=30.;
-  tpar[2]=(zvac7-zConeE)/2.;
-
-  gMC->Gsvolu("YS26", "TUBE", idtmed[kSteel], tpar, 3);
-  dz+=tpar[2];
-  gMC->Gspos("YS26", 1, "YXO2", 0., 0., dz, 0, "ONLY");  
-  dz = -tpar[2];
-  
-// Recess in steel for station 3
-//
-  tpar[0]=29.;
-  tpar[1]=30.;
-  tpar[2]=(zch32-zch31)/2.;
-  gMC->Gsvolu("YS27", "TUBE", idtmed[kAir], tpar, 3);
-  dz+=(tpar[2]+zch31-zConeE);
-  
-  gMC->Gspos("YS27", 1, "YS26", 0., 0., dz, 0, "ONLY");  
-      
-// 
 //
 // 2nd section: vacuum system 
 //
@@ -632,18 +658,7 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   cpar[4]=cpar0[3]+dTubeS+dInsuS;
   gMC->Gsvolu("YI21", "CONE", idtmed[kInsulation+40], cpar, 5);
   gMC->Gspos("YI21", 1, "YV21", 0., 0., 0., 0, "ONLY"); 
-//
-// clearance
-  cpar[1]=cpar0[1]+dTubeS+dInsuS+dEnveS;
-  cpar[2]=cpar0[1]+dTubeS+dInsuS+dEnveS+dFreeS;
-  cpar[3]=cpar0[3]+dTubeS+dInsuS+dEnveS;
-  cpar[4]=cpar0[3]+dTubeS+dInsuS+dEnveS+dFreeS;
-  gMC->Gsvolu("YP21", "CONE", idtmed[kAir+40], cpar, 5);
-  gMC->Gspos("YP21", 1, "YV21", 0., 0., 0., 0, "ONLY"); 
-  
-  dz=0.;
-  gMC->Gspos("YV21", 1, "YMO2", 0., 0., dz, 0, "ONLY"); 
-
+  gMC->Gspos("YV21", 1, "YMO2", 0., 0., 0., 0, "ONLY"); 
 
 //
 // Third Section: Bellows and Flange 
@@ -682,7 +697,7 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   par3[23] = 30.;
 
   par3[24] = par3[21]+dr23;
-  par3[25] = par3[22]-dr23;
+  par3[25] = par3[22];
   par3[26] = 30.;
 //
   rBox=par3[22]-0.1;
@@ -690,16 +705,8 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   
   gMC->Gsvolu("YGO3", "PCON", idtmed[iHeavy+40], par3, 27);
 
-  parPb[0]  = dl;
-  parPb[1]  = rPbLast;
-  parPb[2]  = 30;
-  parPb[3]  = parPb[1]+2.*dl*TMath::Tan(thetaOpenPb);
-  parPb[4]  = 30;
-  gMC->Gsvolu("YXO3", "CONE", idtmed[kPb], parPb, 5);
-  gMC->Gspos("YXO3", 1, "YGO3", 0., 0., 0., 0, "ONLY");  
-  { // Begin local scope for i
-      for (Int_t i=4; i<26; i+=3) par3[i]  = 0;
-  } // End local scope for i
+  for (i=4; i<26; i+=3) par3[i]  = 0;
+
   gMC->Gsvolu("YMO3", "PCON", idtmed[kVacuum+40], par3, 27);
   gMC->Gspos("YGO3", 1, "YMO3", 0., 0., 0., 0, "ONLY");  
 
@@ -709,7 +716,7 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   tpar[1]=30;
   tpar[2]=dl;
   gMC->Gsvolu("YS31", "TUBE", idtmed[kSteel], tpar, 3);
-  gMC->Gspos("YS31", 1, "YXO3", 0., 0., 0., 0, "ONLY");  
+  gMC->Gspos("YS31", 1, "YGO3", 0., 0., 0., 0, "ONLY");  
   dZ+=dl;
   gMC->Gspos("YMO3", 1, "YMOT", 0., 0., dZ, 0, "ONLY");  
   dZ+=dl;
@@ -765,12 +772,12 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   tpar[2]=7.*lB2/2.;
   gMC->Gsvolu("YBM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
   dz=-tpar[2]+lB2/2.;
-  { // Begin local scope for i
-      for (Int_t i=0; i<7; i++) {
-         gMC->Gspos("YBU2", i+1 , "YBM2", 0., 0.,dz , 0, "ONLY"); 
-         dz+=lB2;
-      }
-  } // End local scope for i
+
+  for (i=0; i<7; i++) {
+    gMC->Gspos("YBU2", i+1 , "YBM2", 0., 0.,dz , 0, "ONLY"); 
+    dz+=lB2;
+  }
+
   dz=-dl+dr21+tpar[2];
   gMC->Gspos("YBM2", 1, "YMO3", 0., 0., dz, 0, "ONLY"); 
 
@@ -815,47 +822,45 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   dz=dr21/2.-dr23/2.+dF2/2.+tpar[2];
   gMC->Gspos("YPF2", 2, "YMO3", 0., 0., dz, 0, "ONLY"); 
 
+  Float_t dHorZ=20.;
+  
 //
 // 4th section: rear shield and closing cone
 //
   par4[0]  = 0.;
   par4[1]  = 360.;
-  par4[2]  = 6.;
+  par4[2]  = 7.;
   dl=(zvac12-zvac9)/2.;
   
   par4[3]  = -dl;
   par4[4]  = r3;
   par4[5]  = 30.;
 
-  par4[6]  = -dl+(zvac10-zvac9);
-  par4[7]  = r3+(zvac10-zvac9) * TMath::Tan(thetaOpen3);
+  par4[6]  = -dl+dHorZ;
+  par4[7]  = r3;
   par4[8]  = 30.;
 
-  par4[9]  = par4[6];
-  par4[10] = par4[7];
-  par4[11] = R42;
+  par4[9]  = -dl+(zvac10-zvac9);
+  par4[10]  = r3+(zvac10-zvac9-dHorZ) * TMath::Tan(thetaOpen3);
+  par4[11]  = 30.;
 
-  par4[12] = -dl+(zvac11-zvac9);
-  par4[13] = r3+(zvac11-zvac9) * TMath::Tan(thetaOpen3);
+  par4[12]  = par4[9];
+  par4[13] = par4[10];
   par4[14] = R42;
 
-  par4[15] = par4[12];
-  par4[16] = par4[13];
-  par4[17] = R43;
+  par4[15] = -dl+(zvac11-zvac9);
+  par4[16] = r3+(zvac11-zvac9-dHorZ) * TMath::Tan(thetaOpen3);
+  par4[17] = R42;
 
-  par4[18] = -dl+(zvac12-zvac9);
-  par4[19] = rAbs;
+  par4[18] = par4[15];
+  par4[19] = par4[16];
   par4[20] = R43;
 
-  gMC->Gsvolu("YGO4", "PCON", idtmed[iHeavy+40], par4, 21);
+  par4[21] = -dl+(zvac12-zvac9);
+  par4[22] = rVacu+dVacuS;
+  par4[23] = R43;
 
-  parPb[0]  = (zvac10-zvac9)/2.;
-  parPb[1]  = parPb[3];
-  parPb[2]  = 30;
-  parPb[3]  = parPb[1]+2.*parPb[0]*TMath::Tan(thetaOpenPb);
-  parPb[4]  = 30;
-  gMC->Gsvolu("YXO4", "CONE", idtmed[kPb], parPb, 5);
-  gMC->Gspos("YXO4", 1, "YGO4", 0., 0., -dl+parPb[0], 0, "ONLY");  
+  gMC->Gsvolu("YGO4", "PCON", idtmed[iHeavy+40], par4, 24);
 
   parPb[0]  = (zvac12-zvac10)/2.;
   parPb[1]  = parPb[3];
@@ -864,11 +869,10 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   parPb[4]  = 31.;
   gMC->Gsvolu("YXO5", "CONE", idtmed[kPb], parPb, 5);
   gMC->Gspos("YXO5", 1, "YGO4", 0., 0., -dl+(zvac10-zvac9)+parPb[0], 0, "ONLY");  
-  { // Begin local scope for i
-      for (Int_t i=4; i<20; i+=3) par4[i]  = 0;
-  } // End local scope for i
 
-  gMC->Gsvolu("YMO4", "PCON", idtmed[kVacuum+40], par4, 21);
+  for (i=4; i<23; i+=3) par4[i]  = 0;
+
+  gMC->Gsvolu("YMO4", "PCON", idtmed[kVacuum+40], par4, 24);
   gMC->Gspos("YGO4", 1, "YMO4", 0., 0., 0., 0, "ONLY");  
 
 
@@ -880,9 +884,9 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
 // Closing concrete cone 
 //
   cpar[0]=(zvac12-zvac11)/2.;
-  cpar[1] = r3+(zvac11-zvac9) * TMath::Tan(thetaOpen3);
+  cpar[1] = r3+(zvac11-zvac9-dHorZ) * TMath::Tan(thetaOpen3);
   cpar[2] = cpar[1]+0.001;
-  cpar[3] = rAbs;
+  cpar[3] = rVacu+dVacuS;
   cpar[4] = cpar[2];
   gMC->Gsvolu("YCC4", "CONE", idtmed[kConcrete+40], cpar, 5);
   dz=dl-cpar[0];
@@ -896,21 +900,13 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   tpar[2]=(zvac10-zvac9)/2.;
   gMC->Gsvolu("YS41", "TUBE", idtmed[kSteel], tpar, 3);
   dz+=tpar[2];
-  gMC->Gspos("YS41", 1, "YXO4", 0., 0., 0., 0, "ONLY");  
+  gMC->Gspos("YS41", 1, "YGO4", 0., 0., dz, 0, "ONLY");  
   dz+=tpar[2];
-/*
-  tpar[0]=30.;
-  tpar[1]=R41;
-  tpar[2]=2.;
-  gMC->Gsvolu("YS42", "TUBE", idtmed[kSteel], tpar, 3);
-  dz+=tpar[2];
-  gMC->Gspos("YS42", 1, "YGO4", 0., 0., dz, 0, "ONLY");  
-  dz+=tpar[2];
-*/
+
   tpar[0]=R41-dRSteel2;
   tpar[1]=R41;
   tpar[2]=(zvac11-zvac10)/2.;
-  gMC->Gsvolu("YS43", "TUBE", idtmed[kSteel], tpar, 3);
+  gMC->Gsvolu("YS43", "TUBE", idtmed[kPb], tpar, 3);
   dz+=tpar[2];
   gMC->Gspos("YS43", 1, "YGO4", 0., 0., dz, 0, "ONLY");  
 //
@@ -952,7 +948,7 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   tpar[0]=0.;
   tpar[1]=R43;
   tpar[2]=50.;
-  gMC->Gsvolu("YAEM", "TUBE", idtmed[kVacuum], tpar, 3);
+  gMC->Gsvolu("YAEM", "TUBE", idtmed[kAir], tpar, 3);
   tpar[0]=rAbs;
   tpar[1]=R43;
   tpar[2]=50.;
@@ -970,9 +966,12 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
 // 4th section: vacuum system 
 //
 // up to closing cone
+  
+  Float_t r3V=r3-dr23+dVacuS-1.6;
+
   cpar0[0]=(zvac11-zvac9)/2;
-  cpar0[1]=r3-dVacuS;
-  cpar0[2]=r3;
+  cpar0[1]=r3V-dVacuS;
+  cpar0[2]=r3V;
   cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpen3);
   cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpen3);
   gMC->Gsvolu("YV31", "CONE", idtmed[kSteel+40], cpar0, 5);
@@ -985,22 +984,13 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   cpar[4]=cpar0[3]+dTubeS+dInsuS;
   gMC->Gsvolu("YI31", "CONE", idtmed[kInsulation+40], cpar, 5);
   gMC->Gspos("YI31", 1, "YV31", 0., 0., 0., 0, "ONLY"); 
-//
-// clearance
-  cpar[1]=cpar0[2]-dProtS-dFreeS;
-  cpar[2]=cpar0[2]-dProtS;
-  cpar[3]=cpar0[4]-dProtS-dFreeS;
-  cpar[4]=cpar0[4]-dProtS;
-  gMC->Gsvolu("YP31", "CONE", idtmed[kVacuum+40], cpar, 5);
-  gMC->Gspos("YP31", 1, "YV31", 0., 0., 0., 0, "ONLY"); 
-  
   dz=-dl+cpar[0];
   gMC->Gspos("YV31", 1, "YMO4", 0., 0., dz, 0, "ONLY"); 
 //
 // closing cone
   cpar0[0]=(zvac12-zvac11)/2;
-  cpar0[1]=r3-dVacuS+(zvac11-zvac9)*TMath::Tan(thetaOpen3);
-  cpar0[2]=r3       +(zvac11-zvac9)*TMath::Tan(thetaOpen3);
+  cpar0[1]=r3V-dVacuS+(zvac11-zvac9)*TMath::Tan(thetaOpen3);
+  cpar0[2]=r3V       +(zvac11-zvac9)*TMath::Tan(thetaOpen3);
   cpar0[3]=rVacu;
   cpar0[4]=rVacu+dTubeS+dInsuS+dProtS+dFreeS;
   gMC->Gsvolu("YV32", "CONE", idtmed[kSteel+40], cpar0, 5);
@@ -1047,131 +1037,200 @@ enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
   cpar[3]=R11;
   cpar[4]=(zRear+2.*cpar[0])*TMath::Tan(accMin);
   gMC->Gsvolu("YCS1", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=zRear+cpar[0];
-  gMC->Gspos("YCS1", 1, "ALIC", 0., 0., dz, 0, "ONLY");
+  dz=-(zvac12-zstart)/2.+(zRear-zstart)+cpar[0];
+  gMC->Gspos("YCS1", 1, "YMOT", 0., 0., dz, 0, "ONLY");
 
-/*
   cpar[0]=(zvac4-zch12)/2.;
   cpar[1]=R11;
-  cpar[2]=(zvac4-2.*cpar[0])*TMath::Tan(accMin);
+  cpar[2]=zch12*TMath::Tan(accMin);
   cpar[3]=R11;
-  cpar[4]=R21;
-  gMC->Gsvolu("YCS2", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=zvac4-cpar[0];
-  gMC->Gspos("YCS2", 1, "ALIC", 0., 0., dz, 0, "ONLY");
+  cpar[4]=(zch12+2.*cpar[0])*TMath::Tan(accMin);
+  gMC->Gsvolu("YCS3", "CONE", idtmed[kNiCuW], cpar, 5);
+  dz=-(zvac12-zstart)/2.+(zch12-zstart)+cpar[0];
+  gMC->Gspos("YCS3", 1, "YMOT", 0., 0., dz, 0, "ONLY");
 
 
-  cpar[0]=(zch12-zch11-2.)/2.;
+// Recess station 1
+
+  cpar[0]=(zch12-zch11)/2.;
   cpar[1]=R11;
-  cpar[2]=(zch11+2.)*TMath::Tan(accMin);
+  cpar[2]=18.;
   cpar[3]=R11;
-  cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
-  gMC->Gsvolu("YCS3", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=(zch11+zch12)/2.;
-  gMC->Gspos("YCS3", 1, "ALIC", 0., 0., dz, 0, "ONLY");
-*/
+  cpar[4]=17.9;
+  gMC->Gsvolu("YCS2", "CONE", idtmed[kAir], cpar, 5);
+  dz=-(zvac12-zstart)/2.+(zch11-zstart)+cpar[0];
+  gMC->Gspos("YCS2", 1, "YMOT", 0., 0., dz, 0, "ONLY");
+
+  Float_t ptubs[5];
+  ptubs[0] = R11;
+  ptubs[1] = 17.9;
+  ptubs[2] =   0.;
+// phi_min, phi_max
+  ptubs[3] =   0.;
+  ptubs[4] =  90.;  
+  gMC->Gsvolu("YCR0", "TUBS", idtmed[kNiCuW], ptubs, 0);
+  Int_t idrotm[1799];
+  
+  AliMatrix(idrotm[1701],90.,   0., 90.,  90., 0., 0.);
+  AliMatrix(idrotm[1702],90.,  90., 90., 180., 0., 0.);
+  AliMatrix(idrotm[1703],90., 180., 90., 270., 0., 0.); 
+  AliMatrix(idrotm[1704],90., 270., 90.,   0., 0., 0.); 
+  //  Int_t ipos;
+  
+  dz=-cpar[0];
+// 1.
+  ptubs[2]=6.5/2.;
+  dz+=ptubs[2];
+  gMC->Gsposp("YCR0", 1, "YCS2", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
+  gMC->Gsposp("YCR0", 2, "YCS2", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
+  dz+=ptubs[2];
+  dz+=1.5;
+// 2.
+  ptubs[2]=5.0/2.;
+  dz+=ptubs[2];
+  gMC->Gsposp("YCR0", 3, "YCS2", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
+  gMC->Gsposp("YCR0", 4, "YCS2", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
+  dz+=ptubs[2];
+  dz+=1.5;
+// 3. 
+  ptubs[2]=5.0/2.;
+  dz+=ptubs[2];
+  gMC->Gsposp("YCR0", 5, "YCS2", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
+  gMC->Gsposp("YCR0", 6, "YCS2", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
+  dz+=ptubs[2];
+  dz+=1.5;
+// 4. 
+  ptubs[2]=6.5/2.;
+  dz+=ptubs[2];
+  gMC->Gsposp("YCR0", 7, "YCS2", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
+  gMC->Gsposp("YCR0", 8, "YCS2", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
+  dz+=ptubs[2];
+  dz+=1.5;
+
 
+  
   cpar[0]=(zch21-zvac4)/2.;
   cpar[1]=R21;
   cpar[2]=zvac4*TMath::Tan(accMin);
   cpar[3]=R21;
   cpar[4]=(zvac4+2.*cpar[0])*TMath::Tan(accMin);
   gMC->Gsvolu("YCS4", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=zvac4+cpar[0];
-  gMC->Gspos("YCS4", 1, "ALIC", 0., 0., dz, 0, "ONLY");
-  
-/*
+  dz=-(zvac12-zstart)/2.+(zvac4-zstart)+cpar[0];
+  gMC->Gspos("YCS4", 1, "YMOT", 0., 0., dz, 0, "ONLY");
+
   cpar[0]=(zvac6-zch22)/2.;
   cpar[1]=R21;
-  cpar[2]=(zvac6-2.*cpar[0])*TMath::Tan(accMin);
+  cpar[2]=zch22*TMath::Tan(accMin);
   cpar[3]=R21;
-  cpar[4]=zvac6*TMath::Tan(accMin);
-  gMC->Gsvolu("YCS5", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=zvac6-cpar[0];
-  gMC->Gspos("YCS5", 1, "ALIC", 0., 0., dz, 0, "ONLY");
-
-
-  cpar[0]=(zch22-zch21-2.)/2.;
+  cpar[4]=(zch22+2.*cpar[0])*TMath::Tan(accMin);
+  gMC->Gsvolu("YCS6", "CONE", idtmed[kNiCuW], cpar, 5);
+  dz=-(zvac12-zstart)/2.+(zch22-zstart)+cpar[0];
+  gMC->Gspos("YCS6", 1, "YMOT", 0., 0., dz, 0, "ONLY");
+  
+// Recess station 2
+  cpar[0]=(zch22-zch21)/2.;
   cpar[1]=R21;
-  cpar[2]=(zch21+2.)*TMath::Tan(accMin);
+  cpar[2]=23.;
   cpar[3]=R21;
-  cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
-  gMC->Gsvolu("YCS6", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=(zch21+zch22)/2.;
-  gMC->Gspos("YCS6", 1, "ALIC", 0., 0., dz, 0, "ONLY");
-*/
+  cpar[4]=23.;
+  gMC->Gsvolu("YCS5", "CONE", idtmed[kAir], cpar, 5);
+  dz=-(zvac12-zstart)/2.+(zch21-zstart)+cpar[0];
+  gMC->Gspos("YCS5", 1, "YMOT", 0., 0., dz, 0, "ONLY");
+
+  ptubs[0] = R21;
+  ptubs[1] = 23;
+  ptubs[2] =   0.;
+  ptubs[3] =   0.;
+  ptubs[4] =  90.;  
+  gMC->Gsvolu("YCR1", "TUBS", idtmed[kNiCuW], ptubs, 0);
+
+  dz=-cpar[0];
+// 1.
+  ptubs[2]=7.5/2.;
+  dz+=ptubs[2];
+  gMC->Gsposp("YCR1", 1, "YCS5", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
+  gMC->Gsposp("YCR1", 2, "YCS5", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
+  dz+=ptubs[2];
+  dz+=1.5;
+// 2.
+  ptubs[2]=6.0/2.;
+  dz+=ptubs[2];
+  gMC->Gsposp("YCR1", 3, "YCS5", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
+  gMC->Gsposp("YCR1", 4, "YCS5", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
+  dz+=ptubs[2];
+  dz+=1.5;
+// 3. 
+  ptubs[2]=6.0/2.;
+  dz+=ptubs[2];
+  gMC->Gsposp("YCR1", 5, "YCS5", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
+  gMC->Gsposp("YCR1", 6, "YCS5", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
+  dz+=ptubs[2];
+  dz+=1.5;
+// 4. 
+  ptubs[2]=7.5/2.;
+  dz+=ptubs[2];
+  gMC->Gsposp("YCR1", 7, "YCS5", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
+  gMC->Gsposp("YCR1", 8, "YCS5", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
+  dz+=ptubs[2];
+  dz+=1.5;
+
 //
 // Outer Pb Cone
-  
-  if (fPbCone) {
 
+  if (fPbCone) {
+      dl = (zvac10-zch32)/2.;
+      dz = dl+zch32;
+      
       par0[0]  = 0.;
       par0[1]  = 360.;
       par0[2]  = 10.;
-/*
-//    start of cone
-      par0[3]  = zConeE;
-      par0[4]  = 30.;
-      par0[5]  = 30.01;
-//    3rd station
-      par0[6]  = zch31;
-      par0[7]  = 30.;
-      par0[8]  = 30.+(zch31-zConeE)*TMath::Tan(thetaOpenPbO);
-
-      par0[9]   = zch31;
-      par0[10]  = 30.0;
-      par0[11]  = par0[8]-1.;
-      
 
-      par0[12]  = zch32;
-      par0[13]  = 30.0;
-      par0[14]  = par0[11];
-*/
-      par0[ 3]  = zch32;
+      par0[ 3]  = -dl;
       par0[ 4]  = 30.;
       par0[ 5]  = 30.+(zch32-zConeE)*TMath::Tan(thetaOpenPbO);
 
 //    4th station
-      par0[ 6]  = zch41;
+      par0[ 6]  = -dz + zch41;
       par0[ 7]  = 30.;
       par0[ 8]  = 30.+(zch41-zConeE)*TMath::Tan(thetaOpenPbO);
 
-      par0[ 9]   = zch41;
+      par0[ 9]  = -dz + zch41;
       par0[10]  = 30.;
       par0[11]  = 37.5;  
                                           // recess erice2000
-      par0[12]  = zch42;
+      par0[12]  = -dz + zch42;
       par0[13]  = 30.;
       par0[14]  = par0[11];
 
-      par0[15]  = zch42;
+      par0[15]  = -dz + zch42;
       par0[16]  = 30.;
       par0[17]  = 30.+(zch42-zConeE)*TMath::Tan(thetaOpenPbO);
 
 //    5th station
-      par0[18]  = zch51;
+      par0[18]  = -dz + zch51;
       par0[19]  = 30.;
       par0[20]  = 30.+(zch51-zConeE)*TMath::Tan(thetaOpenPbO);
 
-      par0[21]  = zch51;
+      par0[21]  = -dz + zch51;
       par0[22]  = 30.;
-      par0[23]  = 37.5;                                            // recess erice2000
+      par0[23]  = 37.5;  // recess erice2000
 
-      par0[24]  = zch52;
+      par0[24]  = -dz + zch52;
       par0[25]  = 30.;
       par0[26]  = par0[23];
 
-      par0[27]  = zch52;
+      par0[27]  = -dz + zch52;
       par0[28]  = 30.;
       par0[29]  = 30.+(zch52-zConeE)*TMath::Tan(thetaOpenPbO);
 // end of cone
-      par0[30]  = zFilterIn;
+      par0[30]  = +dl;
       par0[31]  = 30.;
       par0[32]  = par0[29];
 //
       gMC->Gsvolu("YOPB", "PCON", idtmed[kPb], par0, 33);
-      dz=0.;
-      gMC->Gspos("YOPB", 1, "ALIC", 0., 0., dz, 0, "ONLY");
+      dz = -(zvac12-zstart)/2. + (zch32-zstart) + dl;
+      gMC->Gspos("YOPB", 1, "YMOT", 0., 0., dz, 0, "ONLY");
   }
 }
 
@@ -1182,15 +1241,16 @@ void AliSHILv0::Init()
   //
   Int_t i;
   //
+  
   if(fDebug) {
-    printf("\n%s: ",ClassName());
-    for(i=0;i<35;i++) printf("*");
-    printf(" SHILv0_INIT ");
-    for(i=0;i<35;i++) printf("*");
-    printf("\n%s: ",ClassName());
-    //
-    // Here the SHIL initialisation code (if any!)
-    for(i=0;i<80;i++) printf("*");
-    printf("\n");
+      printf("\n%s: ",ClassName());
+      for(i=0;i<35;i++) printf("*");
+      printf(" SHILv0_INIT ");
+      for(i=0;i<35;i++) printf("*");
+      printf("\n%s: ",ClassName());
+      //
+      // Here the SHIL initialisation code (if any!)
+      for(i=0;i<80;i++) printf("*");
+      printf("\n");
   }
 }