]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSv11GeometrySSD.cxx
fix in calling of gaussian spread function
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySSD.cxx
index 12eea58740cd1c9f11bd81949b0785c89280b964..76c8557a336468bd9f581e7b604880df2351982e 100644 (file)
@@ -42,8 +42,8 @@
 /////////////////////////////////////////////////////////////////////////////////
 // Names of the Sensitive Volumes of Layer 5 and Layer 6
 /////////////////////////////////////////////////////////////////////////////////
-const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName5 = "ITSssdSensitivL5";
-const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName6 = "ITSssdSensitivL6";
+const char* AliITSv11GeometrySSD::fgkSSDsensitiveVolName5 = "ITSssdSensitivL5";
+const char* AliITSv11GeometrySSD::fgkSSDsensitiveVolName6 = "ITSssdSensitivL6";
 /////////////////////////////////////////////////////////////////////////////////
 //Parameters for SSD Geometry
 /////////////////////////////////////////////////////////////////////////////////
@@ -494,7 +494,7 @@ const Double_t AliITSv11GeometrySSD::fgkEndCapSupportMiddleRadius[2] = {377.0*fg
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowRadius[2] = {375.0*fgkmm,435.0*fgkmm};
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportHighWidth = 20.0*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowWidth[2] = {3.0*fgkmm,3.0*fgkmm};
-const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5ITSPosition = 625.0*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5ITSPosition = 624.9*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5Position = 2.5*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6ITSPosition = 635.0*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6Position = 2.5*fgkmm;
@@ -523,25 +523,7 @@ const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportRadius = 297.5*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportWidth = 6.28*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkSSDCentralAL3SupportLength = 60.0*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkSSDCentralAL3SupportWidth = 2.5*fgkSSDCentralSupportWidth;
-/////////////////////////////////////////////////////////////////////////////////
-// SSD Cables Parameters (lengths are in mm and angles in degrees)
-/////////////////////////////////////////////////////////////////////////////////
-const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5TubeRadiusMin = 11.9*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay6TubeRadiusMin = 11.9*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5RightSideHeight = 7.*fgkmm;  // to be fixed in order to reproduce material budget
-const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay6RightSideHeight = 7.*fgkmm;  // to be fixed in order to reproduce material budget
-const Double_t AliITSv11GeometrySSD::fgkSSDCableAngle = 22.5;
-const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5RightSideWaterHeight = 2.5*fgkmm;  // to be fixed in order to reproduce material budget
-const Double_t AliITSv11GeometrySSD::fgkSSDCablesPatchPanel2RB26Angle[2] = {25.0,53.2};
-const Double_t AliITSv11GeometrySSD::fgkSSDCablesPatchPanel2RB24Angle[2] = {23.0,53.6};
-const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26ITSDistance = 975.0*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24ITSDistance = 1020.0*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26Radius = 451.3*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24Radius = 451.3*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanelHeight = 87.5*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDCableMaterialBudgetHeight = 20.0*fgkmm;
-//const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26Radius = fgkSSDPConeExternalRadius;
-//const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24Radius = fgkSSDPConeExternalRadius;
+
 /////////////////////////////////////////////////////////////////////////////////
 ClassImp(AliITSv11GeometrySSD)
 /////////////////////////////////////////////////////////////////////////////////
@@ -613,92 +595,80 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD():
   ////////////////////////
   // Standard constructor
   ////////////////////////
+  for(Int_t i=0; i<fgkendladdermountingblocknumber; i++){
+    fendladdermountingblockcombitrans[i] = NULL;
+  }
+  for (Int_t i=0; i < fgkcarbonfibersupportnumber; i++) {
+    fcarbonfibersupport[i] = 0;
+    fcarbonfibersupportmatrix[i] = 0;
+  }
+  for (Int_t i=0; i < fgkcarbonfiberjunctionumber; i++) {
+    fcarbonfiberjunctionmatrix[i] = 0;
+  }
+  for (Int_t i=0; i < fgkcarbonfiberlowersupportnumber; i++) {
+    fcarbonfiberlowersupport[i] = 0;
+    fcarbonfiberlowersupportrans[0] = 0;
+  }
+  for (Int_t i=0; i < fgkvolumekind; i++) {
+    fssdsensorsupport[i] = 0;
+  }
+  for (Int_t i=0; i < fgkssdsensorsupportnumber; i++) {
+    fssdsensorsupportmatrix[i] = 0;
+  }
+  for (Int_t i=0; i < fgkcoolingtubesupportnumber; i++) {
+    fcoolingtubesupportmatrix[i] = 0;
+  }
+  for (Int_t i=0; i < fgkhybridcompnumber; i++) {
+    fssdhybridcomponent[i] = 0;
+  }
+  for (Int_t i=0; i < fgkcoolingblocknumber; i++) {
+    fcoolingblockmatrix[i] = 0;
+  }
+  for (Int_t i=0; i < fgkflexnumber; i++) {
+    fstiffenerflexmatrix[i] = 0;
+    fendflexmatrix[i] = 0;
+  }
+  for (Int_t i=0; i < fgkendladdercoolingtubenumber; i++) {
+    fendladdercoolingtube[i] = 0;
+    for (Int_t j = 0; j < 2; j++) 
+      fendladdercoolingtubematrix[i][j] = 0;
+  }
+  for (Int_t i=0; i < fgkendlabbercarbonfiberjunctionumber; i++) {
+    fendladdercarbonfiberjunction[i] = 0;
+  }
+  for (Int_t i=0; i < fgkendladdercarbonfiberjunctionmatrixnumber; i++) {
+    fendladdercarbonfiberjunctionmatrix[i] = 0;
+  }
+  for (Int_t i=0; i < fgkendladdercarbonfibermatrixnumber; i++) {
+    fendladdercarbonfibermatrix[i] = 0;
+  }
+  for (Int_t i=0; i < fgkendladdermountingblocknumber; i++) {
+    fendladdermountingblockclipmatrix[i] = 0;
+  }
+  for (Int_t i = 0; i < fgkendladderlowersuppnumber+1; i++) {
+    fendladderlowersupptrans[i] = 0;
+  }
+  for (Int_t i = 0; i < fgkladdercablesnumber; i++) {
+    fladdercablematrix[i] = 0;
+  }
+  for (Int_t i = 0; i < fgkladdersegmentnumber; i++) {
+    fladdersegment[i] = 0;
+  }
+  for (Int_t i = 0; i < fgkladdernumber; i++) {
+    fladder[i] = 0;
+    fladdermatrix[i] = 0;
+    fssdsensormatrix[i] = 0;
+    flayermatrix[i] = 0;
+  }
+  for (Int_t i = 0; i < 2; i++) {
+    fLay5LadderSupport[i] = 0;
+    fLay6LadderSupport[i] = 0;
+    fcoolingtubematrix[i] = NULL;
+    fendladdersegment[i] = NULL;
+    fendladdersegmentmatrix[i] = NULL;
+  }
 }
-/////////////////////////////////////////////////////////////////////////////////
-AliITSv11GeometrySSD::AliITSv11GeometrySSD(const AliITSv11GeometrySSD &s):
-  AliITSv11Geometry(s.GetDebug()),
-  fSSDChipMedium(s.fSSDChipMedium),
-  fSSDChipGlueMedium(s.fSSDChipGlueMedium),
-  fSSDStiffenerMedium(s.fSSDStiffenerMedium),
-  fSSDStiffenerConnectorMedium(s.fSSDStiffenerConnectorMedium),
-  fSSDStiffener0603CapacitorMedium(s.fSSDStiffener0603CapacitorMedium),
-  fSSDStiffener1812CapacitorMedium(s.fSSDStiffener1812CapacitorMedium),
-  fSSDStiffenerCapacitorCapMedium(s.fSSDStiffenerCapacitorCapMedium),
-  fSSDStiffenerHybridWireMedium(s.fSSDStiffenerHybridWireMedium),
-  fSSDKaptonFlexMedium(s.fSSDKaptonFlexMedium),
-  fSSDAlTraceFlexMedium(s.fSSDAlTraceFlexMedium),
-  fSSDAlTraceLadderCableMedium(s.fSSDAlTraceLadderCableMedium),
-  fSSDKaptonLadderCableMedium(s.fSSDKaptonLadderCableMedium),
-  fSSDKaptonChipCableMedium(s.fSSDKaptonChipCableMedium),
-  fSSDAlTraceChipCableMedium(s.fSSDAlTraceChipCableMedium),
-  fSSDAlCoolBlockMedium(s.fSSDAlCoolBlockMedium),
-  fSSDSensorMedium(s.fSSDSensorMedium),
-  fSSDSensorSupportMedium(s.fSSDSensorSupportMedium),
-  fSSDCarbonFiberMedium(s.fSSDCarbonFiberMedium),
-  fSSDTubeHolderMedium(s.fSSDTubeHolderMedium),
-  fSSDCoolingTubeWater(s.fSSDCoolingTubeWater),
-  fSSDCoolingTubePhynox(s.fSSDCoolingTubePhynox),
-  fSSDSupportRingAl(s.fSSDSupportRingAl),
-  fSSDMountingBlockMedium(s.fSSDMountingBlockMedium),
-  fSSDRohaCellCone(s.fSSDRohaCellCone),
-  fSSDAir(s.fSSDAir),
-  fSSDCopper(s.fSSDCopper),  
-  fSSDSn(s.fSSDSn),
-  fCreateMaterials(s.fCreateMaterials),
-  fTransformationMatrices(s.fTransformationMatrices),
-  fBasicObjects(s.fBasicObjects),
-  fcarbonfiberjunction(s.fcarbonfiberjunction),
-  fcoolingtubesupport(s.fcoolingtubesupport),
-  fhybridmatrix(s.fhybridmatrix),
-  fssdcoolingblocksystem(s.fssdcoolingblocksystem),
-  fcoolingblocksystematrix(s.fcoolingblocksystematrix),
-  fssdstiffenerflex(s.fssdstiffenerflex),
-  fssdendflex(s.fssdendflex),
-  fcoolingtube(s.fcoolingtube),
-  fendladdercoolingtubesupportmatrix(s.fendladdercoolingtubesupportmatrix),
-  fendladdermountingblock(s.fendladdermountingblock),
-  fendladdermountingblockclip(s.fendladdermountingblockclip),
-  fSSDSensor5(s.fSSDSensor5),
-  fSSDSensor6(s.fSSDSensor6),
-  fSSDLayer5(s.fSSDLayer5),    
-  fSSDLayer6(s.fSSDLayer6),
-  fMotherVol(s.fMotherVol),
-  fLay5LadderSupportRing(s.fLay5LadderSupportRing),
-  fLay6LadderSupportRing(s.fLay6LadderSupportRing),
-  fgkEndCapSupportSystem(s.fgkEndCapSupportSystem),
-  fSSDCone(s.fSSDCone),
-  fColorCarbonFiber(s.fColorCarbonFiber),
-  fColorRyton(s.fColorRyton),
-  fColorPhynox(s.fColorPhynox),
-  fColorSilicon(s.fColorSilicon),
-  fColorAl(s.fColorAl),
-  fColorNiSn(s.fColorNiSn),
-  fColorKapton(s.fColorKapton),
-  fColorPolyhamide(s.fColorPolyhamide),
-  fColorStiffener(s.fColorStiffener),
-  fColorEpoxy(s.fColorEpoxy),
-  fColorWater(s.fColorWater),
-  fColorG10(s.fColorG10)
-{
-  ////////////////////////
-  // Copy Constructor
-  ////////////////////////
-}
-/////////////////////////////////////////////////////////////////////////////////
-AliITSv11GeometrySSD& AliITSv11GeometrySSD::
-operator=(const AliITSv11GeometrySSD &s){
-  ////////////////////////
-  // Assignment operator
-  ////////////////////////
-  this->~AliITSv11GeometrySSD();
-  new(this) AliITSv11GeometrySSD(s); 
-  return *this;
-/*     
-  if(&s == this) return *this;
-  fMotherVol = s.fMotherVol;
-  return *this;
- */
-}
+
 ///////////////////////////////////////////////////////////////////////////////
 void AliITSv11GeometrySSD::CreateTransformationMatrices(){
   ///////////////////////////////////////////////////////////////////////  
@@ -1159,21 +1129,21 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
   TGeoTranslation** localendladdercarbonfiberjunctiontrans[fgkendlabbercarbonfiberjunctionumber];    
   for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
       localendladdercarbonfiberjunctionmatrix[i] 
-            = new TGeoCombiTrans*[fgkendladdercabonfiberjunctionmatrixnumber];
+            = new TGeoCombiTrans*[fgkendladdercarbonfiberjunctionmatrixnumber];
       localendladdercarbonfiberjunctionrot[i] 
-            = new TGeoRotation*[fgkendladdercabonfiberjunctionmatrixnumber];
+            = new TGeoRotation*[fgkendladdercarbonfiberjunctionmatrixnumber];
       localendladdercarbonfiberjunctiontrans[i] 
-            = new TGeoTranslation*[fgkendladdercabonfiberjunctionmatrixnumber];
+            = new TGeoTranslation*[fgkendladdercarbonfiberjunctionmatrixnumber];
       fendladdercarbonfiberjunctionmatrix[i]
-            = new TGeoHMatrix*[fgkendladdercabonfiberjunctionmatrixnumber];
+            = new TGeoHMatrix*[fgkendladdercarbonfiberjunctionmatrixnumber];
   }
   for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)    
-      for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
+      for(Int_t j=0; j<fgkendladdercarbonfiberjunctionmatrixnumber; j++){
             localendladdercarbonfiberjunctionrot[i][j] = new TGeoRotation();
             localendladdercarbonfiberjunctiontrans[i][j] = new TGeoTranslation();
       }
   for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)     
-      for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++)
+      for(Int_t j=0; j<fgkendladdercarbonfiberjunctionmatrixnumber; j++)
           localendladdercarbonfiberjunctionrot[i][j]->SetAngles(120.*j,0.,0.);
   for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
       localendladdercarbonfiberjunctiontrans[i][1]->SetTranslation(fgkCarbonFiberTriangleLength,
@@ -1198,7 +1168,7 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
                                *localendladdercarbonfiberjunctionglobalrot[i]);
   }
   for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)    
-      for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
+      for(Int_t j=0; j<fgkendladdercarbonfiberjunctionmatrixnumber; j++){
             localendladdercarbonfiberjunctionmatrix[i][j] = 
                   new TGeoCombiTrans(*localendladdercarbonfiberjunctiontrans[i][j],
                                      *localendladdercarbonfiberjunctionrot[i][j]);
@@ -1265,6 +1235,7 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
             new TGeoTranslation(0.0,(1-i)*(fgkEndLadderMountingBlockPosition[i]
                         +  0.5*fgkSSDMountingBlockWidth),
                         -  0.5*fgkCarbonFiberLowerSupportHeight);
+  fendladderlowersupptrans[0]->SetDz(-0.5*fgkCarbonFiberLowerSupportHeight-fgkSSDTolerance);
   fendladderlowersupptrans[2] = new TGeoTranslation(0.0,
                                                                         fgkCarbonFiberLowerSupportVolumePosition[1]
                                                                +    fgkCarbonFiberLowerSupportVolumePosition[0],
@@ -1625,7 +1596,7 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
   }
  delete localladdermotherrot;
  for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){    
-      for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
+      for(Int_t j=0; j<fgkendladdercarbonfiberjunctionmatrixnumber; j++){
             delete localendladdercarbonfiberjunctionmatrix[i][j];
             delete localendladdercarbonfiberjunctionrot[i][j];
             delete localendladdercarbonfiberjunctiontrans[i][j];
@@ -1801,9 +1772,9 @@ void AliITSv11GeometrySSD::SetSSDSensor(){
                                                 0.5*fgkSSDSensorHeight,
                                                 0.5*ssdsensitivelength);
   TGeoVolume* ssdsensorsensitiveLay5 = 
-       new TGeoVolume(fgSSDsensitiveVolName5,ssdsensorsensitiveshape,fSSDSensorMedium);
+       new TGeoVolume(fgkSSDsensitiveVolName5,ssdsensorsensitiveshape,fSSDSensorMedium);
   TGeoVolume* ssdsensorsensitiveLay6 = 
-       new TGeoVolume(fgSSDsensitiveVolName6,ssdsensorsensitiveshape,fSSDSensorMedium);
+       new TGeoVolume(fgkSSDsensitiveVolName6,ssdsensorsensitiveshape,fSSDSensorMedium);
   ssdsensorsensitiveLay5->SetLineColor(fColorSilicon);
   ssdsensorsensitiveLay6->SetLineColor(fColorSilicon);
   TGeoBBox* ssdsensorinsensitiveshape[2];
@@ -1873,14 +1844,14 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){
   ////////////////////
   vertexposition[0][0] = new TVector3();
   vertexposition[0][1] = new TVector3(fgkCarbonFiberSupportXAxisLength,
-                                                                         fgkCarbonFiberSupportYAxisLength);
+                                     fgkCarbonFiberSupportYAxisLength, 0);
   vertexposition[0][2] = new TVector3(carbonfibersupportxaxisEdgeproj,
                                                                          carbonfibersupportxaxisEdgeproj
-                                          *                      TMath::Tan(theta));
+                                     *                   TMath::Tan(theta), 0);
   vertexposition[0][3] = new TVector3(fgkCarbonFiberSupportXAxisLength
                                           -                      carbonfibersupportxaxisEdgeproj,
                                                                          fgkCarbonFiberSupportYAxisLength
-                                          -                      vertexposition[0][2]->Y());
+                                     - vertexposition[0][2]->Y(), 0);
   ////////////////////////////////////////////////////
   //Setting the parameters for Isometry Transformation
   ////////////////////////////////////////////////////
@@ -1891,7 +1862,7 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){
   param[0] = 0., param[1] = 1., param[2] = 0., param[3] = -symmetryplaneposition;
   for(Int_t j=0; j<kvertexnumber; j++) vertexposition[1][j] = 
     new TVector3((GetReflection(vertexposition[0][j],param))->X(),
-                (GetReflection(vertexposition[0][j],param))->Y());
+                (GetReflection(vertexposition[0][j],param))->Y(), 0);
   const char* carbonfibersupportshapename[kshapesnumber] = 
                                                {"CarbonFiberSupportShape1","CarbonFiberSupportShape2"};
   const char* carbonfibersupportname[kshapesnumber] = 
@@ -1940,10 +1911,10 @@ TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunction(Double_t width){
                        *                         TMath::DegToRad()),
                                                  fgkCarbonFiberJunctionEdge[0]
                        *                         TMath::Sin(fgkCarbonFiberJunctionAngle[0]
-                       *                         TMath::DegToRad()));
-  vertex[4] = new TVector3(fgkCarbonFiberJunctionLength,
-                                                  fgkCarbonFiberJunctionEdge[1]);
-  vertex[5] = new TVector3(fgkCarbonFiberJunctionLength); 
+                                       * TMath::DegToRad()), 0);
+  vertex[4] = new TVector3(fgkCarbonFiberJunctionLength-fgkSSDTolerance,
+                          fgkCarbonFiberJunctionEdge[1], 0);
+  vertex[5] = new TVector3(fgkCarbonFiberJunctionLength-fgkSSDTolerance, 0, 0); 
   vertex[1] = GetReflection(vertex[5],reflectionparam);        
   vertex[2] = GetReflection(vertex[4],reflectionparam);        
   Double_t xvertexpoints[6], yvertexpoints[6];
@@ -1975,24 +1946,24 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberLowerSupportList(){
   for(Int_t i = 0; i<kshapesnumber; i++) vertexposition[i] = 
                                                 new TVector3*[kvertexnumber];
   //First Shape Vertex Positioning
-  vertexposition[0][0] = new TVector3(fgkCarbonFiberLowerSupportLowerLenght);
+  vertexposition[0][0] = new TVector3(fgkCarbonFiberLowerSupportLowerLenght, 0, 0);
   vertexposition[0][1] = new TVector3(fgkCarbonFiberTriangleLength
-                                          -            fgkCarbonFiberLowerSupportLowerLenght);
+                                     - fgkCarbonFiberLowerSupportLowerLenght, 0, 0);
   vertexposition[0][2] = new TVector3();
-  vertexposition[0][3] = new TVector3(fgkCarbonFiberTriangleLength);
+  vertexposition[0][3] = new TVector3(fgkCarbonFiberTriangleLength, 0, 0);
   //Second Shape Vertex Positioning
   Double_t theta = TMath::ATan((fgkCarbonFiberLowerSupportVolumePosition[1]
                                 -                              fgkCarbonFiberLowerSupportVolumePosition[0])
                                 /                              fgkCarbonFiberTriangleLength);
   vertexposition[1][0] = new TVector3(vertexposition[0][0]->X(),
                                                                vertexposition[0][0]->X()*TMath::Tan(theta)
-                                +                              fgkCarbonFiberLowerSupportVolumePosition[0]);
+                                     + fgkCarbonFiberLowerSupportVolumePosition[0], 0);
   vertexposition[1][1] = new TVector3(vertexposition[0][1]->X(),
                                                                vertexposition[0][1]->X()*TMath::Tan(theta)
-                                +                              fgkCarbonFiberLowerSupportVolumePosition[0]);
-  vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0]);
+                                     + fgkCarbonFiberLowerSupportVolumePosition[0], 0);
+  vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0], 0);
   vertexposition[1][3] = new TVector3(fgkCarbonFiberTriangleLength,
-                                                               fgkCarbonFiberLowerSupportVolumePosition[1]);
+                                     fgkCarbonFiberLowerSupportVolumePosition[1], 0);
   const char* carbonfiberlowersupportshapename[kshapesnumber] = 
                          {"CarbonFiberLowerSupportShape1","CarbonFiberLowerSupportShape2"};
   const char* carbonfiberlowersupportname[kshapesnumber] = 
@@ -2023,7 +1994,7 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberLowerSupportList(){
 }
 ///////////////////////////////////////////////////////////////////////////////
 TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupport(Double_t length, Double_t height, 
-                                                                Double_t width, Double_t* thickness)const{
+                                                                Double_t width, const Double_t* thickness)const{
   /////////////////////////////////////////////////////////////
   // Method generating the Sensor Support   
   /////////////////////////////////////////////////////////////  
@@ -2031,11 +2002,11 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupport(Double_t length, Double_t
        TGeoXtru* ssdsensorsupportshape = new TGeoXtru(2);      
     TVector3* vertexposition[kvertexnumber];
        vertexposition[0] = new TVector3();     
-       vertexposition[1] = new TVector3(0.0,length);   
-       vertexposition[2] = new TVector3(thickness[1],vertexposition[1]->Y());  
-       vertexposition[3] = new TVector3(vertexposition[2]->X(),thickness[0]);  
-       vertexposition[4] = new TVector3(height,vertexposition[3]->Y());        
-       vertexposition[5] = new TVector3(vertexposition[4]->X());       
+       vertexposition[1] = new TVector3(0.0,length,0); 
+       vertexposition[2] = new TVector3(thickness[1],vertexposition[1]->Y(),0);        
+       vertexposition[3] = new TVector3(vertexposition[2]->X(),thickness[0],0);        
+       vertexposition[4] = new TVector3(height,vertexposition[3]->Y(),0);      
+       vertexposition[5] = new TVector3(vertexposition[4]->X(),0,0);   
        Double_t xvertexpoints[6], yvertexpoints[6];
        for(Int_t i=0; i<kvertexnumber; i++) 
                xvertexpoints[i] = vertexposition[i]->X(), 
@@ -2069,22 +2040,22 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
   ///////////////////////////////////////
   TVector3** vertexposition = new TVector3*[kvertexnumber];
 
-  Double_t Router = fgkCoolingTubeSupportRmin/CosD(phi/nedges);  //  Recalc inner radius so that tube fits inside  
-  vertexposition[0] = new TVector3(Router*CosD(angle),
-                                                                  Router*SinD(angle));
+  Double_t router = fgkCoolingTubeSupportRmin/CosD(phi/nedges);  //  Recalc inner radius so that tube fits inside  
+  vertexposition[0] = new TVector3(router*CosD(angle),
+                                  router*SinD(angle), 0);
   vertexposition[1] = new TVector3(fgkCoolingTubeSupportRmax*CosD(angle),
-                                                                  fgkCoolingTubeSupportRmax*SinD(angle));
+                                  fgkCoolingTubeSupportRmax*SinD(angle),0);
   vertexposition[2] = new TVector3(vertexposition[1]->X(),
-                                                                  fgkCoolingTubeSupportRmax);
+                                  fgkCoolingTubeSupportRmax, 0);
   vertexposition[3] = new TVector3(-vertexposition[1]->X(),
-                                                                  fgkCoolingTubeSupportRmax);
+                                  fgkCoolingTubeSupportRmax, 0);
   vertexposition[4] = new TVector3(-vertexposition[1]->X(),
-                                                                   vertexposition[1]->Y());
+                                  vertexposition[1]->Y(), 0);
 
   for(Int_t i=0; i<nedges; i++)
        vertexposition[i+5] = 
-               new TVector3(Router*CosD(psi+i*(2.*phi/nedges)),
-                            Router*SinD(psi+i*(2.*phi/nedges)));
+               new TVector3(router*CosD(psi+i*(2.*phi/nedges)),
+                            router*SinD(psi+i*(2.*phi/nedges)), 0);
   ///////////////////////////////////////////////////////////////////////
   // TGeoXTru Volume definition for Cooling Tube Support Arc Part
   ///////////////////////////////////////////////////////////////////////
@@ -2182,14 +2153,14 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
    ////////////////////////////////////////
   // Positioning the vertices for TGeoXTru
   ////////////////////////////////////////
-  virtualvertex[0] = new TVector3(-fgkCoolingTubeSupportRmax,-fgkCoolingTubeSupportRmax); 
-  virtualvertex[1] = new TVector3(virtualvertex[0]->X(),-virtualvertex[0]->Y());
-  virtualvertex[2] = new TVector3(-virtualvertex[0]->X(),virtualvertex[1]->Y());
-  virtualvertex[3] = new TVector3(virtualvertex[2]->X(),0.5*fgkCoolingTubeSupportHeight);
-  virtualvertex[4] = new TVector3(virtualvertex[3]->X()+boxlength,virtualvertex[3]->Y());
-  virtualvertex[5] = new TVector3(virtualvertex[4]->X(),-virtualvertex[4]->Y());
-  virtualvertex[6] = new TVector3(virtualvertex[3]->X(),-virtualvertex[3]->Y());
-  virtualvertex[7] = new TVector3(virtualvertex[2]->X(),-virtualvertex[2]->Y());
+  virtualvertex[0] = new TVector3(-fgkCoolingTubeSupportRmax,-fgkCoolingTubeSupportRmax, 0); 
+  virtualvertex[1] = new TVector3(virtualvertex[0]->X(),-virtualvertex[0]->Y(),0);
+  virtualvertex[2] = new TVector3(-virtualvertex[0]->X(),virtualvertex[1]->Y(),0);
+  virtualvertex[3] = new TVector3(virtualvertex[2]->X(),0.5*fgkCoolingTubeSupportHeight,0);
+  virtualvertex[4] = new TVector3(virtualvertex[3]->X()+boxlength,virtualvertex[3]->Y(),0);
+  virtualvertex[5] = new TVector3(virtualvertex[4]->X(),-virtualvertex[4]->Y(),0);
+  virtualvertex[6] = new TVector3(virtualvertex[3]->X(),-virtualvertex[3]->Y(),0);
+  virtualvertex[7] = new TVector3(virtualvertex[2]->X(),-virtualvertex[2]->Y(),0);
   Double_t xmothervertex[kvirtualvertexnumber], ymothervertex[kvirtualvertexnumber];
   for(Int_t i=0; i< kvirtualvertexnumber; i++)
        xmothervertex[i] = virtualvertex[i]->X(),
@@ -2271,12 +2242,12 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
     xmothervertex[i][2] = 0.5*(fgkSSDSensorLength-ssdstiffenerseparation); //0.5*fgkSSDStiffenerWidth;
     ymothervertex[i][2] = -0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight -fgkSSDChipCablesHeight[i+2];
     xmothervertex[i][3] = xmothervertex[i][2];
-    ymothervertex[i][3] = ymothervertex[i][2]+fgkSSDChipCablesHeight[0]+fgkSSDChipCablesHeight[1];
+    ymothervertex[i][3] = ymothervertex[i][2]+fgkSSDChipCablesHeight[0]+fgkSSDChipCablesHeight[1]+fgkSSDTolerance;
 
     xmothervertex[i][4] = xmothervertex[i][2]-0.4;  
     ymothervertex[i][4] = ymothervertex[i][3];
     xmothervertex[i][5] = xmothervertex[i][4];
-    ymothervertex[i][5] = ymothervertex[i][4]+2*ssdchipcablesradius[i];
+    ymothervertex[i][5] = ymothervertex[i][4]+2*ssdchipcablesradius[i]-fgkSSDTolerance;
 
     xmothervertex[i][6] = 0.5*fgkSSDStiffenerWidth+ssdchipcablesradius[i]+0.3*fgkmm;
     ymothervertex[i][6] = ymothervertex[i][5];
@@ -2564,7 +2535,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
   coolingblocktransvector = new TVector3(fgkCoolingTubeSeparation,
                                                                  fgkSSDSensorLength
                                                                - 2.*fgkSSDModuleStiffenerPosition[1]
-                                                               - fgkSSDCoolingBlockWidth);
+                                        - fgkSSDCoolingBlockWidth, 0);
   const Int_t kcoolingblocktransnumber = 2;
   const Int_t kcoolingblocknumber = 4;
   TGeoHMatrix* coolingblockmatrix[kcoolingblocknumber];
@@ -2730,14 +2701,14 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDEndFlex(){
   TVector3* referencetrans[karcnumber];
   referencetrans[0] = new TVector3(ssdflexboxlength*CosD(2.*fgkSSDFlexAngle)
                                        +                          radius[0]*SinD(2.*fgkSSDFlexAngle),
-                                                                  radius[0]);
+                                  radius[0], 0);
   referencetrans[1] = new TVector3(referencetrans[0]->X()
                                        +              fgkSSDFlexLength[2],
-     -              fgkSSDStiffenerHeight);
+                                  -              fgkSSDStiffenerHeight, 0);
 for(Int_t i=0; i<karcnumber; i++){
        for(Int_t j=0; j<knedges+1; j++){
                vertexposition[j+i*(knedges+1)] = new TVector3(radius[i]*CosD(angle[i]),
-                                                                                              radius[i]*SinD(angle[i]));
+                                                        radius[i]*SinD(angle[i]), 0);
                angle[i] +=  deltangle[i]*(1.0-2.0*i);
        }       
   }
@@ -2771,29 +2742,30 @@ for(Int_t i=0; i<karcnumber; i++){
        }
   }
   for(Int_t i=0; i<kendflexlayernumber; i++){
-       vertex[i][0] = new TVector3(transvector[i]->X(),transvector[i]->Y());
-       vertex[i][1] = new TVector3(transvector[i+1]->X(),transvector[i+1]->Y());
+    vertex[i][0] = new TVector3(transvector[i]->X(),transvector[i]->Y(),0);
+    vertex[i][1] = new TVector3(transvector[i+1]->X(),transvector[i+1]->Y(),0);
        for(Int_t j=0; j<karcnumber*(knedges+1); j++){
                if(j<(knedges+1)){
                        vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[0][i+1],
-                                                                                 vertexposition[j]->Y()*ratioradius[0][i+1]);
+                                               vertexposition[j]->Y()*ratioradius[0][i+1], 0);
                        vertex[i][j+2]->RotateZ(referenceangle[0]);
                        *vertex[i][j+2] += *referencetrans[0];
                        vertex[i][4*(knedges+1)-j+1] = 
                                                         new TVector3(vertexposition[j]->X()*ratioradius[0][i],
-                                                                                 vertexposition[j]->Y()*ratioradius[0][i]);
+                                vertexposition[j]->Y()*ratioradius[0][i], 0);
                        vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[0]);
                        *vertex[i][4*(knedges+1)-j+1] += *referencetrans[0];
                }
                else{
                
                        vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[1][i+1],
-                                                                                 vertexposition[j]->Y()*ratioradius[1][i+1]);
+                                               vertexposition[j]->Y()*ratioradius[1][i+1],0);
                        vertex[i][j+2]->RotateZ(referenceangle[1]);
                        *vertex[i][j+2] += *referencetrans[1];
                        vertex[i][4*(knedges+1)-j+1] = 
                                                         new TVector3(vertexposition[j]->X()*ratioradius[1][i],
-                                                                                 vertexposition[j]->Y()*ratioradius[1][i]);
+                                      vertexposition[j]->Y()*ratioradius[1][i],
+                                      0);
                        vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[1]);
                        *vertex[i][4*(knedges+1)-j+1] += *referencetrans[1];
           }
@@ -2927,7 +2899,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
        screwvertex[i] = new TVector3(fgkSSDMountingBlockScrewHoleRadius[0]
                                   *CosD(phi0+i*deltaphi),
                                   fgkSSDMountingBlockScrewHoleRadius[0]
-                                  *SinD(phi0+i*deltaphi));
+                                     *SinD(phi0+i*deltaphi), 0);
   Double_t xscrewvertex[kscrewvertexnumber+6];
   Double_t yscrewvertex[kscrewvertexnumber+6];
   xscrewvertex[0] = - fgkSSDMountingBlockScrewHoleRadius[0];   
@@ -3016,11 +2988,11 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
   xmothervertex[6]  = xvertex[5]+fgkSSDMountingBlockLength[2];
   ymothervertex[6]  = ymothervertex[5];
   xmothervertex[7]  = xmothervertex[6];
-  ymothervertex[7]  = ymothervertex[4];
+  ymothervertex[7]  = ymothervertex[4] - fgkSSDTolerance;
   xmothervertex[8]  = xmothervertex[7]
                                        + 0.5*(fgkSSDMountingBlockLength[1]
                                        -          fgkSSDMountingBlockLength[2]);
-  ymothervertex[8]  = ymothervertex[4];
+  ymothervertex[8]  = ymothervertex[7];
   xmothervertex[9]  = xmothervertex[8];
   ymothervertex[9]  = ymothervertex[2];
   xmothervertex[10] = xvertex[0]+fgkSSDMountingBlockLength[0];
@@ -3267,25 +3239,25 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){
   // Vertex Positioning for TGeoXTru
   ///////////////////////////////////////
   TVector3** vertexposition = new TVector3*[2*kvertexnumber+nedges+1];
-  vertexposition[0] = new TVector3(0.0,0.0);
-  vertexposition[1] = new TVector3(0.0,fgkSSDCoolingBlockHeight[1]);
+  vertexposition[0] = new TVector3(0.0,0.0, 0.);
+  vertexposition[1] = new TVector3(0.0,fgkSSDCoolingBlockHeight[1],0);
   vertexposition[2] = new TVector3(fgkSSDCoolingBlockHoleLength[1],
-                                         vertexposition[1]->Y());
+                                  vertexposition[1]->Y(),0);
   vertexposition[3] = new TVector3(vertexposition[2]->X(),
-                                         vertexposition[2]->Y()+fgkSSDCoolingBlockHeight[2]);
-  vertexposition[4] = new TVector3(vertexposition[1]->X(),vertexposition[3]->Y());
+                                  vertexposition[2]->Y()+fgkSSDCoolingBlockHeight[2],0);
+  vertexposition[4] = new TVector3(vertexposition[1]->X(),vertexposition[3]->Y(),0);
   vertexposition[5] = new TVector3(vertexposition[4]->X(),
-                                       + vertexposition[3]->Y()+fgkSSDCoolingBlockHoleRadius[1]);
+                                  + vertexposition[3]->Y()+fgkSSDCoolingBlockHoleRadius[1],0);
   vertexposition[6] = new TVector3(Xfrom2Points(vertexposition[5]->X(),
                                          vertexposition[5]->Y(),0.5*(fgkSSDCoolingBlockLength
                                        - fgkSSDCoolingBlockHoleLength[0]
                                        - 4.*fgkSSDCoolingBlockHoleRadius[1]),
                                          fgkSSDCoolingBlockHeight[0]
                                        - fgkSSDCoolingBlockHoleRadius[1],
-                                         fgkSSDCoolingBlockHeight[0]),fgkSSDCoolingBlockHeight[0]);
+                                               fgkSSDCoolingBlockHeight[0]),fgkSSDCoolingBlockHeight[0], 0);
   vertexposition[7] = new TVector3(0.5*(fgkSSDCoolingBlockLength
                                        - fgkSSDCoolingBlockHoleLength[0]),
-                                         vertexposition[6]->Y());
+                                  vertexposition[6]->Y(), 0);
   Double_t alpha = TMath::ACos(0.5*fgkSSDCoolingBlockHoleLength[0]
                           / fgkSSDCoolingBlockHoleRadius[0])*TMath::RadToDeg();
   Double_t phi = 180.-alpha;
@@ -3293,10 +3265,11 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){
   Double_t deltapsi = psi/nedges;
   Double_t radius = fgkSSDCoolingBlockHoleRadius[0]/CosD(0.5*deltapsi);
   TVector3* transvector = new TVector3(0.5*fgkSSDCoolingBlockLength,
-                                                 fgkSSDCoolingBlockHoleCenter);
+                                      fgkSSDCoolingBlockHoleCenter, 0);
   for(Int_t i=0; i<nedges+1; i++){
        vertexposition[kvertexnumber+i] = new TVector3(radius*CosD(phi+i*deltapsi),
-                                                                                              radius*SinD(phi+i*deltapsi));
+                                                  radius*SinD(phi+i*deltapsi),
+                                                  0);
    *vertexposition[kvertexnumber+i] += (*transvector);
   }
   Double_t param[4] = {1.0,0.0,0.0,-0.5*fgkSSDCoolingBlockLength};  
@@ -3370,16 +3343,14 @@ void AliITSv11GeometrySSD::GetSSDChipCables(TGeoVolume *&cableL, TGeoVolume *&ca
   Double_t phi = 180.;
   Double_t deltaphi = 180./nedges;
   Double_t angle = 0.0;
-  Double_t **xvertexpoints = new Double_t*[kssdchipcableslaynumber];
-  Double_t **yvertexpoints = new Double_t*[kssdchipcableslaynumber];
-  for(Int_t i=0; i<kssdchipcableslaynumber;i++){
-       xvertexpoints[i] = new Double_t[kvertexnumber];
-       yvertexpoints[i] = new Double_t[kvertexnumber];
-  }  
+
+  Double_t xvertexpoints[kssdchipcableslaynumber][kvertexnumber];
+  Double_t yvertexpoints[kssdchipcableslaynumber][kvertexnumber];
+
   TVector3* vertex = new TVector3();
   TVector3* transvector[kssdchipcableslaynumber];
   transvector[0] = new TVector3(fgkSSDChipWidth,
-                                                               SSDChipCablesHeight-ssdchipcablesradius[0]);
+                               SSDChipCablesHeight-ssdchipcablesradius[0], 0);
   transvector[1] = new TVector3();
   TGeoXtru* ssdchipcableshape[kssdchipcableslaynumber*kssdchipcablesnumber];
   TGeoVolume* ssdchipcable[kssdchipcableslaynumber*kssdchipcablesnumber];
@@ -3393,19 +3364,19 @@ void AliITSv11GeometrySSD::GetSSDChipCables(TGeoVolume *&cableL, TGeoVolume *&ca
                                 +               fgkSSDChipCablesHeight[1]);  
        for(Int_t i=0; i<kssdchipcableslaynumber; i++){
                vertexposition[i][0] = new TVector3(0.,SSDChipCablesHeight
-                                                        - fgkSSDChipCablesHeight[0]-i*fgkSSDChipCablesHeight[1]);
+                                             - fgkSSDChipCablesHeight[0]-i*fgkSSDChipCablesHeight[1], 0);
                vertexposition[i][1] = new TVector3(0.,SSDChipCablesHeight
-                                                        - i*fgkSSDChipCablesHeight[0]);
+                                                   - i*fgkSSDChipCablesHeight[0], 0);
                vertexposition[i][2*(nedges+1)+2] = 
                                        new TVector3(fgkSSDChipWidth+ssdchipcablesradius[0]
                                +                                fgkSSDChipCablesWidth[1]
                                +                                fgkSSDChipCablesWidth[2],
                                                                ((1.-i)*fgkSSDChipCablesHeight[i]
-                               +                                fgkSSDChipCablesHeight[1]));
+                               + fgkSSDChipCablesHeight[1]), 0);
         vertexposition[i][2*(nedges+1)+3] = 
                                        new TVector3(vertexposition[i][2*(nedges+1)+2]->X(),
                                                                 vertexposition[i][2*(nedges+1)+2]->Y()
-                               -                                fgkSSDChipCablesHeight[i]);
+                      - fgkSSDChipCablesHeight[i], 0);
            for(Int_t j=0; j<nedges+1; j++){            
                    angle = 0.5*phi+TMath::Power(-1,i+1)*j*deltaphi;
                        vertex->SetX(ssdchipcablesradius[0]*CosD(angle));
@@ -3414,14 +3385,14 @@ void AliITSv11GeometrySSD::GetSSDChipCables(TGeoVolume *&cableL, TGeoVolume *&ca
                                                new TVector3(*vertex+*transvector[i]);
                        vertexposition[1][(nedges+1)*i+j+2] = 
                                                new TVector3(vertex->X()*ratio[2*i]+transvector[i]->X(),
-                                                                        vertex->Y()*ratio[2*i]+transvector[i]->Y());
+                                      vertex->Y()*ratio[2*i]+transvector[i]->Y(), 0);
                        vertexposition[0][(4-i)*(nedges+1)+4-j-1] = 
                                                new TVector3(*vertexposition[1][(nedges+1)*i+j+2]);
                        vertexposition[1][(4-i)*(nedges+1)+4-j-1] = 
                                                new TVector3(vertex->X()*ratio[2*i+1]
                                                        +                        transvector[i]->X(),
                                                                                 vertex->Y()*ratio[2*i+1]
-                                                       +                transvector[i]->Y());
+                                      + transvector[i]->Y(), 0);
                }
        }
        for(Int_t i=0; i<kssdchipcableslaynumber; i++){
@@ -3459,9 +3430,9 @@ void AliITSv11GeometrySSD::GetSSDChipCables(TGeoVolume *&cableL, TGeoVolume *&ca
   xmothervertex[3] = xvertexpoints[0][3+nedges];
   ymothervertex[3] = yvertexpoints[0][3+nedges];
   xmothervertex[4] = xvertexpoints[0][3+2*nedges];
-  ymothervertex[4] = yvertexpoints[0][3+2*nedges];
+  ymothervertex[4] = yvertexpoints[0][3+2*nedges]+fgkSSDTolerance;
   xmothervertex[5] = xvertexpoints[0][4+2*nedges];
-  ymothervertex[5] = yvertexpoints[0][4+2*nedges];
+  ymothervertex[5] = yvertexpoints[0][4+2*nedges]+fgkSSDTolerance;
   xmothervertex[6] = xvertexpoints[1][5+2*nedges];
   ymothervertex[6] = yvertexpoints[1][5+2*nedges];
   xmothervertex[7] = xvertexpoints[0][1];
@@ -3482,10 +3453,6 @@ void AliITSv11GeometrySSD::GetSSDChipCables(TGeoVolume *&cableL, TGeoVolume *&ca
   /////////////////////////////////////////////////////////////
   // Deallocating memory
   /////////////////////////////////////////////////////////////
-  for(Int_t i=0; i<kssdchipcableslaynumber;i++){
-       delete [] xvertexpoints[i];
-       delete [] yvertexpoints[i];
-  }
   for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete [] vertexposition[i];
   for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete transvector[i];
   delete vertex; 
@@ -3594,15 +3561,15 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen
                                                                                                  new TVector3*[kvertexnumber];
 //Shape Vertex Positioning
   for(Int_t i=0; i<kladdercablesegmentnumber; i++){
-       laddercablesegmentvertexposition[i][0] = new TVector3(0.,i*fgkSSDFlexHeight[0]);
+    laddercablesegmentvertexposition[i][0] = new TVector3(0.,i*fgkSSDFlexHeight[0], 0);
        laddercablesegmentvertexposition[i][1] = new TVector3(fgkSSDLadderCableWidth,
-                                                                                                                 i*fgkSSDFlexHeight[0]);
+                                                             i*fgkSSDFlexHeight[0], 0);
        laddercablesegmentvertexposition[i][2] = new TVector3(0.,fgkSSDFlexHeight[0]
                                                                                   +                         fgkSSDFlexHeight[1]
-                                                                                  +                      i*fgkSSDFlexHeight[0]);
+                                                             + i*fgkSSDFlexHeight[0], 0);
        laddercablesegmentvertexposition[i][3] = 
                                                   new TVector3(laddercablesegmentvertexposition[i][1]->X(),
-                                                                               laddercablesegmentvertexposition[i][2]->Y());
+                                                               laddercablesegmentvertexposition[i][2]->Y(), 0);
   }
   Double_t laddercablesegmentwidth[2][2] = {{fgkSSDFlexHeight[0],fgkSSDFlexHeight[0]},
                                                                            {fgkSSDFlexHeight[1],fgkSSDFlexHeight[1]}}; 
@@ -3725,9 +3692,9 @@ TGeoVolume* AliITSv11GeometrySSD::GetLadderCableAssembly(Int_t n, Double_t ssden
   TGeoVolume* laddercable = new TGeoVolume("LadderCableMother", laddercableshape, fSSDAir);
   char laddercabletransname[100];
   for(Int_t i=0; i<n; i++){ 
-       sprintf(laddercabletransname,"LadderCableTrans%i",i+1);
-       laddercable->AddNode(GetLadderCable(n-i,ssdendladdercablelength),i+1,
-                            new TGeoTranslation(laddercabletransname,i*fgkCarbonFiberJunctionWidth,0,0));
+    snprintf(laddercabletransname,100,"LadderCableTrans%i",i+1);
+    laddercable->AddNode(GetLadderCable(n-i,ssdendladdercablelength),i+1,
+                        new TGeoTranslation(laddercabletransname,i*fgkCarbonFiberJunctionWidth,0,0));
   }
   return laddercable;
 }
@@ -3743,7 +3710,7 @@ TList* AliITSv11GeometrySSD::GetLadderCableAssemblyList(Int_t n, Double_t ssdend
   char laddercableassemblyname[100];
   TList* laddercableassemblylist = new TList();
   for(Int_t i=0; i<kladdercableassemblynumber; i++){ 
-       sprintf(laddercableassemblyname,"LadderCableAssembly%i",i+1);
+    snprintf(laddercableassemblyname,100,"LadderCableAssembly%i",i+1);
        ladderCable[i] = new TGeoVolumeAssembly(laddercableassemblyname);
        ladderCable[i]->AddNode(laddercableassembly,i+1,i==0 ? NULL :
                                         new TGeoCombiTrans((n-1)
@@ -3840,7 +3807,7 @@ void AliITSv11GeometrySSD::SetEndLadderSegment(){
   if(!fTransformationMatrices) CreateTransformationMatrices();
   if(!fBasicObjects) CreateBasicObjects();
   for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
-       for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++)
+       for(Int_t j=0; j<fgkendladdercarbonfiberjunctionmatrixnumber; j++)
                fendladdersegment[i]->AddNode(j==2 ? 
                                                        fendladdercarbonfiberjunction[i][1] : 
                                                        fendladdercarbonfiberjunction[i][0],
@@ -4229,7 +4196,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   for(Int_t i=0; i<fgklayernumber; i++){
        for(Int_t j=0; j<nedges+1; j++){
                vertex[i][j] = new TVector3(fgkMountingBlockSupportRadius[i]*TMath::Cos(psi0[i]+j*deltapsi[i]),
-                                                                   fgkMountingBlockSupportRadius[i]*TMath::Sin(psi0[i]+j*deltapsi[i]));
+                                           fgkMountingBlockSupportRadius[i]*TMath::Sin(psi0[i]+j*deltapsi[i]), 0);
                if(vertex[i][j]->X()>mountingsupportedgevector[i]->X()) indexedge[i]++;
                vertexlist[i]->Add(vertex[i][j]);
        }
@@ -4299,11 +4266,11 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   char sideladdersupportpiecename[100];
   char centerladdersupportpiecename[100];
   for(Int_t i=0; i<fgklayernumber; i++){ 
-       sprintf(sidemountingblockname,"MountingBlockSupportSideLay%dArc",i+5);
-       sprintf(centermountingblockname,"MountingBlockSupportCenterLay%dArc",i+5);
-       sprintf(sideladdersupportpiecename,"SideLadderSupportPieceLay%d",i+5);
-       sprintf(centerladdersupportpiecename,"CenterLadderSupportPieceLay%d",i+5);
-       sidemountingblocksupportshape[i] = new TGeoXtru(2);
+    snprintf(sidemountingblockname,100,"MountingBlockSupportSideLay%dArc",i+5);
+    snprintf(centermountingblockname,100,"MountingBlockSupportCenterLay%dArc",i+5);
+    snprintf(sideladdersupportpiecename,100,"SideLadderSupportPieceLay%d",i+5);
+    snprintf(centerladdersupportpiecename,100,"CenterLadderSupportPieceLay%d",i+5);
+    sidemountingblocksupportshape[i] = new TGeoXtru(2);
     sidemountingblocksupportshape[i]->DefinePolygon(vertexlist[i]->GetSize()+2,
                                                                                                xsidevertex[i],ysidevertex[i]);
     sidemountingblocksupportshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
@@ -4372,7 +4339,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
     // Mounting Block Down Vertex
     ///////////////////////////
        mountingblockpiecedownshape[i] = new TGeoXtru(2);
-    sprintf(mountingblockpiecedownname,"MountingBlockPieceDownLay%d",i+5);
+       snprintf(mountingblockpiecedownname,100,"MountingBlockPieceDownLay%d",i+5);
        mountingblockpiecedownxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];        
        mountingblockpiecedownyvertex[i][0] = fgkMountingBlockSupportRadius[i]
                                              + fgkMountingBlockSupportDownHeight 
@@ -4408,7 +4375,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
     // Mounting Block Up Vertex
     ///////////////////////////
        mountingblockpieceupshape[i] = new TGeoXtru(2);
-       sprintf(mountingblockpieceupname,"MountingBlockPieceUpLay%d",i+5);
+       snprintf(mountingblockpieceupname,100,"MountingBlockPieceUpLay%d",i+5);
        mountingblockpieceupxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];  
        mountingblockpieceupyvertex[i][0] = fgkMountingBlockSupportRadius[i]
                                                                                + fgkMountingBlockSupportUpHeight[i]
@@ -4480,7 +4447,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        mountingblocksupportrapezoidownshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
                                                                                                                        -fgkMountingBlockSupportWidth[0]);
        mountingblocksupportrapezoidownshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
-       sprintf(mountingblocksupportrapezoidowname,"MountingBlockSuppTrapezoidDownLay%d",i+5);
+       snprintf(mountingblocksupportrapezoidowname,100,"MountingBlockSuppTrapezoidDownLay%d",i+5);
        mountingblocksupportrapezoidown[i] = new TGeoVolume(mountingblocksupportrapezoidowname,
                                                                mountingblocksupportrapezoidownshape[i],fSSDCarbonFiberMedium);
        mountingblocksupportrapezoidown[i]->SetLineColor(9);
@@ -4509,7 +4476,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        mountingblocksupportrapezoidupshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
                                                                                                                        -fgkMountingBlockSupportWidth[0]);
        mountingblocksupportrapezoidupshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
-       sprintf(mountingblocksupportrapezoidupname,"MountingBlockSuppTrapezoidUpLay%d",i+5);
+       snprintf(mountingblocksupportrapezoidupname,100,"MountingBlockSuppTrapezoidUpLay%d",i+5);
        mountingblocksupportrapezoidup[i] = new TGeoVolume(mountingblocksupportrapezoidupname,
                                                                mountingblocksupportrapezoidupshape[i],fSSDCarbonFiberMedium);
        mountingblocksupportrapezoidup[i]->SetLineColor(9);
@@ -4563,8 +4530,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        xmothervertex[i][7] = xmothervertex[i][6];
        ymothervertex[i][7] = ymothervertex[i][0];
 
-       sprintf(downmotheladdersupportname,"LadderSupportDownLay%d",i+5);
-       sprintf(upmotheladdersupportname,"LadderSupportUpLay%d",i+5);
+       snprintf(downmotheladdersupportname,100,"LadderSupportDownLay%d",i+5);
+       snprintf(upmotheladdersupportname,100,"LadderSupportUpLay%d",i+5);
 
        downmotherladdersupportshape[i] = new TGeoXtru(2);
        downmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]);
@@ -4651,14 +4618,14 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        // Adding the Volumes to Mother Volume    
        ///////////////////////////////////////
        for(Int_t j=0; j<2; j++){
-               sprintf(mountingblocksupportboxdownname,"MountingBlockSuppDownLay%dBox%d",i+5,j+1);
-               sprintf(mountingblocksupportboxupname,"MountingBlockSuppUpLay%dBox%d",i+5,j+1);
-               mountingblocksupportboxdown[i][j] = new TGeoVolume(mountingblocksupportboxdownname,
-                                                                                 mountingblocksupportboxdownshape[i][j],
-                                                                                 fSSDCarbonFiberMedium);
-               mountingblocksupportboxup[i][j] = new TGeoVolume(mountingblocksupportboxupname,
-                                                                                 mountingblocksupportboxupshape[i][j],
-                                                                                 fSSDCarbonFiberMedium);
+         snprintf(mountingblocksupportboxdownname,100,"MountingBlockSuppDownLay%dBox%d",i+5,j+1);
+         snprintf(mountingblocksupportboxupname,100,"MountingBlockSuppUpLay%dBox%d",i+5,j+1);
+         mountingblocksupportboxdown[i][j] = new TGeoVolume(mountingblocksupportboxdownname,
+                                                            mountingblocksupportboxdownshape[i][j],
+                                                            fSSDCarbonFiberMedium);
+         mountingblocksupportboxup[i][j] = new TGeoVolume(mountingblocksupportboxupname,
+                                                          mountingblocksupportboxupshape[i][j],
+                                                          fSSDCarbonFiberMedium);
                mountingblocksupportboxdown[i][j]->SetLineColor(9);
                mountingblocksupportboxup[i][j]->SetLineColor(9);
                for(Int_t k=0; k<2; k++){
@@ -4778,12 +4745,12 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   for(Int_t i=0; i<fgklayernumber; i++){
     ringsupportvertex[i] = new TVector3*[2*kssdlayladdernumber[i]+3+nedges];   
        ringsupportvertex[i][0] = new TVector3(0.,fgkMountingBlockSupportRadius[i]
-                                                       *                          TMath::Cos(theta[i]));
+                                          * TMath::Cos(theta[i]), 0);
        ringsupportvertex[i][1] = new TVector3(-0.5*fgkSSDMountingBlockLength[0]
                                                        -                          mountingsupportedge[i],
-                                                                                  ringsupportvertex[i][0]->Y());
+                                              ringsupportvertex[i][0]->Y(), 0);
        ringsupportvertex[i][2] = new TVector3(0.5*fgkSSDMountingBlockLength[0],
-                                                                                  ringsupportvertex[i][1]->Y());                                                                               
+                                              ringsupportvertex[i][1]->Y(),0);                                                                                 
     ringsupportvertex[i][2]->RotateZ(theta[i]+phi[i]);
        for(Int_t j=1; j<kssdlayladdernumber[i]; j++){
           ringsupportvertex[i][2*j+1] = new TVector3(*ringsupportvertex[i][1]);        
@@ -4795,7 +4762,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
     for(Int_t j=0; j<nedges+1; j++){
                ringsupportvertex[i][2*kssdlayladdernumber[i]+2+j] = 
                        new TVector3((ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*CosD(90.0-j*angle),
-                                                (ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*SinD(90.0-j*angle));
+                              (ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*SinD(90.0-j*angle), 0);
        }
   }
   Double_t **xmothervertex = new Double_t*[fgklayernumber];
@@ -4830,7 +4797,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
        for(Int_t j=0; j<2; j++) lowerladderpconsupportshape[i]->DefineSection(j,
                                                         lowerladderpconezsection[j],lowerladderpconradiusmin[i],
                                                         lowerladderpconradiusmax[i]);
-       sprintf(lowerladderpconsupportname,"LowerLadderPConSupportNameLay%d",i+5);
+       snprintf(lowerladderpconsupportname,100,"LowerLadderPConSupportNameLay%d",i+5);
        lowerladderpconsupport[i] = new TGeoVolume(lowerladderpconsupportname,lowerladderpconsupportshape[i],fSSDSupportRingAl);
     lowerladderpconsupport[i]->SetLineColor(fColorAl);
        (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladderpconsupport[i],1);
@@ -5268,6 +5235,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   mothercoverplate->AddNode(holecontour[0],2,holecontourtrans);
   mothercoverplate->AddNode(holecontour[1],1);  
   mothercoverplate->AddNode(contour,1);
+  
+  for (Int_t i = 0; i < kendcapcoverplatesmallholenumber[0]; i++) 
+    delete [] endcapcoverplatesmallholetrans[i];
+  delete [] endcapcoverplatesmallholetrans;
   /////////////////////////////////
   return mothercoverplate;     
  }
@@ -5289,30 +5260,30 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   char endcapcoolingwatertubetorusname[100];
   char endcapcoolingwatertubename[100];
   for(Int_t i=0; i<5; i++){
-       sprintf(endcapcoolingtubetorusname,"EndCapCoolingTubeTorus%d",i+1);
-       sprintf(endcapcoolingtubename,"EndCapCoolingTube%d",i+1);
-       sprintf(endcapcoolingwatertubetorusname,"EndCapCoolingWaterTubeTorus%d",i+1);
-       sprintf(endcapcoolingwatertubename,"EndCapCoolingWaterTube%d",i+1);
-       if(i==3){
-               endcapcoolingtubetorushape[i] = new TGeoTorus(fgkEndCapCoolingTubeAxialRadius[0],
-                                                                               fgkEndCapCoolingTubeRadiusMin,
-                                                                               fgkEndCapCoolingTubeRadiusMax,
-                                                                               90.0,fgkEndCapCoolingTubeAngle[3]);
-               endcapcoolingwatertubetorushape[i] = new TGeoTorus(fgkEndCapCoolingTubeAxialRadius[0],
-                                                                               0.,fgkEndCapCoolingTubeRadiusMin,
-                                                                               90.0,fgkEndCapCoolingTubeAngle[3]);
+    snprintf(endcapcoolingtubetorusname,100,"EndCapCoolingTubeTorus%d",i+1);
+    snprintf(endcapcoolingtubename,100,"EndCapCoolingTube%d",i+1);
+    snprintf(endcapcoolingwatertubetorusname,100,"EndCapCoolingWaterTubeTorus%d",i+1);
+    snprintf(endcapcoolingwatertubename,100,"EndCapCoolingWaterTube%d",i+1);
+    if(i==3){
+      endcapcoolingtubetorushape[i] = new TGeoTorus(fgkEndCapCoolingTubeAxialRadius[0],
+                                                   fgkEndCapCoolingTubeRadiusMin,
+                                                   fgkEndCapCoolingTubeRadiusMax,
+                                                   90.0,fgkEndCapCoolingTubeAngle[3]);
+      endcapcoolingwatertubetorushape[i] = new TGeoTorus(fgkEndCapCoolingTubeAxialRadius[0],
+                                                        0.,fgkEndCapCoolingTubeRadiusMin,
+                                                        90.0,fgkEndCapCoolingTubeAngle[3]);
+    }
+    else{
+      endcapcoolingtubetorushape[i] = new TGeoTorus(i!=4?fgkEndCapCoolingTubeAxialRadius[0]
+                                                   :fgkEndCapCoolingTubeAxialRadius[1],
+                                                   fgkEndCapCoolingTubeRadiusMin,
+                                                   fgkEndCapCoolingTubeRadiusMax,
+                                                   0.,fgkEndCapCoolingTubeAngle[i]);
+      endcapcoolingwatertubetorushape[i] = new TGeoTorus(i!=4?fgkEndCapCoolingTubeAxialRadius[0]
+                                                        :fgkEndCapCoolingTubeAxialRadius[1],
+                                                        0.,fgkEndCapCoolingTubeRadiusMin,
+                                                        0.,fgkEndCapCoolingTubeAngle[i]);
     }
-       else{
-               endcapcoolingtubetorushape[i] = new TGeoTorus(i!=4?fgkEndCapCoolingTubeAxialRadius[0]
-                                                                         :fgkEndCapCoolingTubeAxialRadius[1],
-                                                                          fgkEndCapCoolingTubeRadiusMin,
-                                                                          fgkEndCapCoolingTubeRadiusMax,
-                                                                   0.,fgkEndCapCoolingTubeAngle[i]);
-               endcapcoolingwatertubetorushape[i] = new TGeoTorus(i!=4?fgkEndCapCoolingTubeAxialRadius[0]
-                                                                              :fgkEndCapCoolingTubeAxialRadius[1],
-                                                                                0.,fgkEndCapCoolingTubeRadiusMin,
-                                                                        0.,fgkEndCapCoolingTubeAngle[i]);
-       }
        endcapcoolingtubetorus[i] = new TGeoVolume(endcapcoolingtubetorusname,
                                                                                           endcapcoolingtubetorushape[i],
                                                                                           fSSDCoolingTubePhynox);
@@ -5753,7 +5724,8 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                endcapsidecoverboxtrans[2*(kendcapcoverholenumber[0]-1)+3
                                                                +i*(kendcapcoverholenumber[1]-1)+j]);
        }
-       return endcapsidecovermother;
+  delete [] endcapsidecoverboxtrans;
+  return endcapsidecovermother;
  } 
  ////////////////////////////////////////////////////////////////////////////////
  TGeoVolume** AliITSv11GeometrySSD::GetEndCapCards() const { 
@@ -6809,7 +6781,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   char upendcapsupportname[100]; 
   for(Int_t i=0; i<klayernumber; i++){
    upendcapsupportshape[i] = new TGeoXtru(2);
-   sprintf(upendcapsupportname,"UpEndCapSupportPieceLayer%i",i+5);
+   snprintf(upendcapsupportname,100,"UpEndCapSupportPieceLayer%i",i+5);
    upendcapsupportshape[i]->DefinePolygon(knedges+3,xupvertex[i],yupvertex[i]); 
    upendcapsupportshape[i]->DefineSection(0,0.);
    upendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportHighWidth);
@@ -6846,7 +6818,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   char downendcapsupportname[100]; 
   for(Int_t i=0; i<klayernumber; i++){
        downendcapsupportshape[i] = new TGeoXtru(2);
-    sprintf(downendcapsupportname,"DownEndCapSupportPieceLayer%i",i+5);
+       snprintf(downendcapsupportname,100,"DownEndCapSupportPieceLayer%i",i+5);
        downendcapsupportshape[i] = new TGeoXtru(2);
        downendcapsupportshape[i]->DefinePolygon(2*(knedges+1),xdownvertex[i],ydownvertex[i]); 
     if(i==0){
@@ -6873,7 +6845,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   char endcapsupportmothername[100];
   for(Int_t i=0; i<klayernumber; i++){
        endcapsupportmothershape[i] = new TGeoPgon(0.0,360.0,kssdlayladdernumber[i],2);
-    sprintf(endcapsupportmothername,"EndCapSupportMotherLayer%i",i+5);
+       snprintf(endcapsupportmothername,100,"EndCapSupportMotherLayer%i",i+5);
        endcapsupportmothershape[i]->DefineSection(0,0.,ydownvertex[i][0],yupvertex[i][1]);     
     endcapsupportmothershape[i]->DefineSection(1,fgkEndCapSupportHighWidth,
                                                                                          ydownvertex[i][0],yupvertex[i][1]);
@@ -6925,7 +6897,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   char endcapsupportsystemothername[100];
   for(Int_t i=0; i<klayernumber; i++){
        endcapsupportsystemshape[i] = new TGeoPgon(0.0,360.0,kssdlayladdernumber[i],2);
-    sprintf(endcapsupportsystemothername,"EndCapSupportSystemLayer%i",i+5);
+       snprintf(endcapsupportsystemothername,100,"EndCapSupportSystemLayer%i",i+5);
        endcapsupportsystemshape[i]->DefineSection(0,-(fgkEndCapCoverPlateWidth[1]
                                                                                             - fgkEndCapCoverPlateWidth[0]),*radiusmin[i],
                                                                                          (*radiusmax[i]*CosD(0.5*upedgeangle[i])
@@ -7413,43 +7385,53 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
 }
  ////////////////////////////////////////////////////////////////////////////////
  TGeoVolume* AliITSv11GeometrySSD::SetSSDCables(){
-  /////////////////////////////////////////////////////////////
-  // Method generating SSDCables
-  /////////////////////////////////////////////////////////////
-  // SSD Layer 5 Cables
-  //////////////////////////////////////////////////////////////////////////////////////////////////
-  TGeoVolumeAssembly* ssdcablesmother = new TGeoVolumeAssembly("SSDCables");
-  Double_t ssdcablelayvertical = 0.05; // Internal variables to control overlapping with SDD cables
-  Double_t ssdcablelaylateral = 0.55;   // Internal variables to control overlapping with SDD cables
-  Double_t ssdcablesfactor = 0.5;     // Internal variables to control overlapping with SDD cables
-  //////////////////////////////////////////////////////////////////////////////////////////////////
-  Double_t ssdcableslay5rigthsideradiusmin = fgkEndCapSupportMiddleRadius[0]+fgkSSDCablesLay5TubeRadiusMin;  
-  Double_t ssdcableslay5endconedistance = (ssdcableslay5rigthsideradiusmin
-                                                                           -  fgkSSDLowerPConeRadius)
-                                                                           * TanD(fgkSSDPConeAngle);
-  Double_t ssdcableslay5startconedistance = fgkEndCapSupportCenterLay5ITSPosition
-                                                                             + fgkEndCapSupportCenterLay5Position
-                                                                             - 0.5*fgkSSDCentralSupportLength-fgkSSDCentralAL3SupportLength;
-  Double_t ssdcablelay5rightsidelength = ssdcableslay5endconedistance
-                                                                          - ssdcableslay5startconedistance; 
-  ssdcablelay5rightsidelength *= ssdcablesfactor;
-  Double_t ssdcableslay5rightsideradiusmax = ssdcableslay5rigthsideradiusmin+fgkSSDCablesLay5RightSideHeight; 
-  TGeoTube* ssdcablelay5rightubeshape = new TGeoTube(ssdcableslay5rigthsideradiusmin,
-                                                                                               ssdcableslay5rightsideradiusmax,
-                                                                                               0.5*ssdcablelay5rightsidelength); 
-  TGeoVolume* ssdcablelay5righttube = new TGeoVolume("SSDCableLay5RightSideTube",
-                                                                                                        ssdcablelay5rightubeshape,
-                                                                                                        fSSDCopper);
-  ssdcablelay5righttube->SetLineColor(9);
-  TGeoTranslation* ssdcablelay5rightrans = 
-                                         new TGeoTranslation(0.,0.,fgkEndCapSupportCenterLay5ITSPosition
-                                                                                +              fgkEndCapSupportCenterLay5Position
-                                                                                +      0.5*ssdcablelay5rightsidelength);
+   /////////////////////////////////////////////////////////////
+   // Method generating SSDCables
+   /////////////////////////////////////////////////////////////
+
+   /////////////////////////////////////////////////////////////////////////////////
+   // SSD Cables Parameters (lengths are in mm and angles in degrees)
+   /////////////////////////////////////////////////////////////////////////////////
+   
+   const Double_t kSSDCablesLay5TubeRadiusMin = 11.9*fgkmm;
+   const Double_t kSSDCablesLay6TubeRadiusMin = 11.9*fgkmm;
+   
+   // Cable thickness for rings at outer Z
+   // Average: 9/2 = 4.5 cables per quadrant
+   // Ideally 1/16 * 38(34) cables, but take factor to (1/8) to accomodate kinks and loops (there are only 2 different cable lengths); 21 mm^2 Cu each
+
+   const Double_t kSSDCablesLay5RingArea = 21.*34./8.*fgkmm*fgkmm;  // to be fixed in order to reproduce material budget
+   const Double_t kSSDCablesLay6RingArea = 21.*38./8.*fgkmm*fgkmm;  // to be fixed in order to reproduce material budget
+   
+   
+   const Double_t kSSDCablesHeight = 3.2*fgkmm;  // 3.2 mm*13 cm width = 18 cables, 185g/m each Add fudge factor of 2 to get to ~25 kg measured
+
+   const Double_t kSSDCableAngle = 22.5;
+   // MvL: remove water?
+   const Double_t kSSDCablesLay5RightSideWaterHeight = 2.5*fgkmm;  // to be fixed in order to reproduce material budget
+   const Double_t kSSDCablesPatchPanel2RB26Angle[2] = {25.0,53.2};
+   const Double_t kSSDCablesPatchPanel2RB24Angle[2] = {23.0,53.6};
+   const Double_t kSSDPatchPanel2RB26ITSDistance = 975.0*fgkmm;
+   const Double_t kSSDPatchPanel2RB24ITSDistance = 1020.0*fgkmm;
+   const Double_t kSSDPatchPanel2RB26Radius = 451.3*fgkmm;
+   const Double_t kSSDPatchPanel2RB24Radius = 451.3*fgkmm;
+   const Double_t kSSDPatchPanelHeight = 87.5*fgkmm;
+   
+   // SSD Layer 5 Cables
+   //////////////////////////////////////////////////////////////////////////////////////////////////
+   TGeoVolumeAssembly* ssdcablesmother = new TGeoVolumeAssembly("SSDCables");
+   Double_t ssdcablelayvertical = 0.05; // Internal variables to control overlapping with SDD cables
+   Double_t ssdcablelaylateral = 0.55;   // Internal variables to control overlapping with SDD cables
+   //////////////////////////////////////////////////////////////////////////////////////////////////
+  // Printf(Form("Cable ring: rad min: %g length %g thick %g", ssdcableslay5rigthsideradiusmin, ssdcablelay5rightsidelength, kSSDCablesLay5RingArea/ssdcablelay5rightsidelength));
+  
+
+  
   ////////////////////////////////////
   //  Double_t cablescapacity[20];
   //  cablescapacity[0] = ssdcablelay5rightubeshape->Capacity();
   ////////////////////////////////////
-  ssdcablesmother->AddNode(ssdcablelay5righttube,1,ssdcablelay5rightrans);
+  //ssdcablesmother->AddNode(ssdcablelay5righttube,1,ssdcablelay5rightrans);
   ////////////////////////////////////
   // TGeoPCone Volumes
   ///////////////////////////////////
@@ -7459,26 +7441,41 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   Double_t ssdcableslay5pconzsection[6];
   Double_t ssdcableslay5pconrmin[6];
   Double_t ssdcableslay5pconrmax[6];
-  ssdcableslay5pconrmin[0] = ssdcablelay5rightubeshape->GetRmin();
-  ssdcableslay5pconrmax[0] = ssdcablelay5rightubeshape->GetRmax();
+  ssdcableslay5pconrmin[0] = fgkEndCapSupportMiddleRadius[0]+kSSDCablesLay5TubeRadiusMin;
   ssdcableslay5pconrmin[1] = fgkSSDPConeUpRadius*(1.0+ssdcablelayvertical);
-  ssdcableslay5pconrmax[1] = ssdcableslay5pconrmin[1]+fgkSSDCablesLay5RightSideHeight;
+
   ssdcableslay5pconzsection[0] = fgkEndCapSupportCenterLay5ITSPosition
-                                                          + fgkEndCapSupportCenterLay5Position
-                                                          + 2.*ssdcablelay5rightubeshape->GetDz();
+                                 + fgkEndCapSupportCenterLay5Position;
+                                //+ 2.*ssdcablelay5rightsidelength;  // removing this generates overlap with the water ring 
+                                // Keeping it generates overlap with the cones...
+  // SSDCables/SSDCableLay5RightSideWaterTube_2 ovlp=0.0939792
   ssdcableslay5pconzsection[1] = 0.5*fgkSSDCentralSupportLength
                                                           + fgkSSDCentralAL3SupportLength
                                                           + (fgkSSDPConeUpRadius-fgkSSDLowerPConeRadius)
                                                           * TanD(fgkSSDPConeAngle);      
+  Double_t dz = ssdcableslay5pconzsection[1]-ssdcableslay5pconzsection[0];
+  Double_t pconethickness = kSSDCablesLay5RingArea/TMath::Abs(dz);
+  ssdcableslay5pconrmax[0] = ssdcableslay5pconrmin[0]+pconethickness;
+  ssdcableslay5pconrmax[1] = ssdcableslay5pconrmin[1]+pconethickness;
+  //Printf(Form("pcone: r1 %g  r2 %g z1 %g z2 %g thickness %g", ssdcableslay5pconrmax[0], ssdcableslay5pconrmax[1], 
+  //         ssdcableslay5pconzsection[0],ssdcableslay5pconzsection[1],pconethickness));
+  
   for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[0]->DefineSection(i,ssdcableslay5pconzsection[i],
                                                  ssdcableslay5pconrmin[i],ssdcableslay5pconrmax[i]); 
   ssdcableslay5pcon[0] = new TGeoVolume("SSDCableLay5RightSidePCon1",
                                                           ssdcableslay5pconshape[0],fSSDCopper);
   ssdcableslay5pcon[0]->SetLineColor(9);
   ssdcablesmother->AddNode(ssdcableslay5pcon[0],1);
+
+  Double_t totvol = ssdcableslay5pcon[0]->Capacity();
+  // Printf(Form("Cables, lay5, pCone,volume: %g", ssdcableslay5pcon[0]->Capacity()));
 ////////////////////////////////////
 //  cablescapacity[1] = ssdcableslay5pconshape[0]->Capacity();
 ////////////////////////////////////
+
+  //
+  //   PCon 2 and 3 are cables going through/towards holes in supports
+  //
   ssdcableslay5pconzsection[2] = ssdcableslay5pconzsection[1];
   ssdcableslay5pconzsection[3] = 0.5*fgkSSDCentralSupportLength
                                                           + fgkSSDCentralAL3SupportLength
@@ -7487,20 +7484,21 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   Double_t ssdcableangle = (fgkSSDPConeTrapezoidBasis-2.*(fgkSSDPConeUpMaxRadius
                                             -  fgkSSDPConeUpRadius)/TanD(fgkSSDPConeTrapezoidAngle))
                                                 /  fgkSSDPConeUpRadius*TMath::RadToDeg()*2;
-  ssdcableslay5pconshape[1] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
-                                                                                  ssdcableangle,2);   
+  ssdcableslay5pconshape[1] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
+                                                                                  ssdcableangle,2);
+  // Printf(Form("PCon2, phi %g dphi %g ",90.0-kSSDCableAngle-0.5*ssdcableangle, ssdcableangle));
   ssdcableslay5pconrmin[2] = ssdcableslay5pconrmin[1];
-  ssdcableslay5pconrmax[2] = ssdcableslay5pconrmax[1];
+  ssdcableslay5pconrmax[2] = ssdcableslay5pconrmax[1]; 
   ssdcableslay5pconrmin[3] = 0.25*(fgkSSDPConeUpMaxRadius+3.*fgkSSDPConeUpRadius
                                                   - 4.*fgkSSDLowerPConeRadius)+fgkSSDLowerPConeRadius;
   ssdcableslay5pconrmin[3]*=(1.0+ssdcablelayvertical);
-  ssdcableslay5pconrmax[3] = ssdcableslay5pconrmin[3]+fgkSSDCablesLay5RightSideHeight;
+  ssdcableslay5pconrmax[3] = ssdcableslay5pconrmin[3] + kSSDCablesHeight; 
   for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[1]->DefineSection(i,ssdcableslay5pconzsection[i+2],
                                                  ssdcableslay5pconrmin[i+2],ssdcableslay5pconrmax[i+2]); 
   ssdcableslay5pcon[1] = new TGeoVolume("SSDCableLay5RightSidePCon2",ssdcableslay5pconshape[1],fSSDCopper);
   ssdcableslay5pcon[1]->SetLineColor(9);
   ////////////////////////////////////
-  ssdcableslay5pconshape[2] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
+  ssdcableslay5pconshape[2] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
                                                                                   ssdcableangle,2);   
   ssdcableslay5pconrmin[4] = ssdcableslay5pconrmin[3];
   ssdcableslay5pconrmax[4] = ssdcableslay5pconrmax[3];
@@ -7523,6 +7521,8 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
    ssdcableslay5pconrot[i]->SetAngles(90.0*i,0.,0.);
    ssdcablesmother->AddNode(ssdcableslay5pcon[1],i+1,ssdcableslay5pconrot[i]);
    ssdcablesmother->AddNode(ssdcableslay5pcon[2],i+1,ssdcableslay5pconrot[i]);         
+   // Printf(Form("Pcon2, Pcon3, vol %g %g",ssdcableslay5pcon[1]->Capacity(),ssdcableslay5pcon[2]->Capacity()));
+   totvol += ssdcableslay5pcon[1]->Capacity()+ssdcableslay5pcon[2]->Capacity();
   }
   ////////////////////////////////////
   //cablescapacity[2] = 4.0*ssdcableslay5pconshape[1]->Capacity();
@@ -7530,11 +7530,6 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   ////////////////////////////////////
   // Positioning Left SSD Cables Part
   ////////////////////////////////////
-  TGeoTranslation* ssdcablesLay5RightTubeToLeftrans = new TGeoTranslation(0.,0.,
-                                                                                                       - 0.5*ssdcablelay5rightsidelength
-                                                                                                       - fgkEndCapSupportCenterLay5Position
-                                                                                                   - fgkEndCapSupportCenterLay5ITSPosition);
-  ssdcablesmother->AddNode(ssdcablelay5righttube,2,ssdcablesLay5RightTubeToLeftrans);  
   TGeoRotation* ssdcablesLay5RightPConToLeftRot = new TGeoRotation();
   ssdcablesLay5RightPConToLeftRot->SetAngles(90.,180.,-90);
   ssdcablesmother->AddNode(ssdcableslay5pcon[0],2,ssdcablesLay5RightPConToLeftRot);  
@@ -7552,9 +7547,41 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   /////////////////////////////////////////////////////////////
   // Water Tubes Layer 5
   /////////////////////////
+  /*  Remove ring; could be replaced with a PCone next to/on top of the cables
+
+   //
+   // MvL: Remove ring; put everything in PCone
+   //
+   // Need to keep dimensions for water ring...
+
+   Double_t ssdcablesfactor = 0.5;     // Internal variables to control overlapping with SDD cables
+
+  Double_t ssdcableslay5rigthsideradiusmin = fgkEndCapSupportMiddleRadius[0]+kSSDCablesLay5TubeRadiusMin;  
+  Double_t ssdcableslay5endconedistance = (ssdcableslay5rigthsideradiusmin
+                                                                           -  fgkSSDLowerPConeRadius)
+                                                                           * TanD(fgkSSDPConeAngle);
+  Double_t ssdcableslay5startconedistance = fgkEndCapSupportCenterLay5ITSPosition
+                                                                             + fgkEndCapSupportCenterLay5Position
+                                                                             - 0.5*fgkSSDCentralSupportLength-fgkSSDCentralAL3SupportLength;
+  Double_t ssdcablelay5rightsidelength = ssdcableslay5endconedistance
+                                                                          - ssdcableslay5startconedistance; 
+  ssdcablelay5rightsidelength *= ssdcablesfactor;
+  Double_t ssdcableslay5rightsideradiusmax = ssdcableslay5rigthsideradiusmin+kSSDCablesLay5RingArea/ssdcablelay5rightsidelength; 
+
+
+  TGeoTranslation* ssdcablelay5rightrans = 
+                                         new TGeoTranslation(0.,0.,fgkEndCapSupportCenterLay5ITSPosition
+                                                                   + fgkEndCapSupportCenterLay5Position
+                                                                   + 0.5*ssdcablelay5rightsidelength);
+
+  TGeoTranslation* ssdcablesLay5RightTubeToLeftrans = new TGeoTranslation(0.,0.,
+                                                                                                       - 0.5*ssdcablelay5rightsidelength
+                                                                                                       - fgkEndCapSupportCenterLay5Position
+                                                                                                   - fgkEndCapSupportCenterLay5ITSPosition);
+
   TGeoTube* ssdcablelay5rightubewatershape = new TGeoTube(ssdcableslay5rightsideradiusmax,
                                                                                     ssdcableslay5rightsideradiusmax
-                                                                              + fgkSSDCablesLay5RightSideWaterHeight,
+                                                                              + kSSDCablesLay5RightSideWaterHeight,
                                                                                     0.5*ssdcablelay5rightsidelength); 
   TGeoVolume* ssdcablelay5rightwatertube = new TGeoVolume("SSDCableLay5RightSideWaterTube",
                                                                                                         ssdcablelay5rightubewatershape,
@@ -7562,6 +7589,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   ssdcablelay5rightwatertube->SetLineColor(7);
   ssdcablesmother->AddNode(ssdcablelay5rightwatertube,1,ssdcablelay5rightrans);
   ssdcablesmother->AddNode(ssdcablelay5rightwatertube,2,ssdcablesLay5RightTubeToLeftrans);
+  */
   ////////////////////////////////////
   // TGeoPCone Water Volumes Layer 
   ///////////////////////////////////
@@ -7573,10 +7601,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   Double_t ssdcableslay5pconwaterrmax[6];
   ssdcableslay5pcwateronrmin[0] = ssdcableslay5pconrmax[0];
   ssdcableslay5pconwaterrmax[0] = ssdcableslay5pcwateronrmin[0]
-                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+                                                               + kSSDCablesLay5RightSideWaterHeight;
   ssdcableslay5pcwateronrmin[1] = ssdcableslay5pconrmax[1];
   ssdcableslay5pconwaterrmax[1] = ssdcableslay5pcwateronrmin[1]
-                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+                                                               + kSSDCablesLay5RightSideWaterHeight;
   ssdcableslay5pconwaterzsection[0] = ssdcableslay5pconzsection[0];
   ssdcableslay5pconwaterzsection[1] = ssdcableslay5pconzsection[1];
   for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[0]->DefineSection(i,ssdcableslay5pconwaterzsection[i],
@@ -7589,28 +7617,28 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
 ////////////////////////////////////
   ssdcableslay5pconwaterzsection[2] = ssdcableslay5pconzsection[2];
   ssdcableslay5pconwaterzsection[3] = ssdcableslay5pconzsection[3];
-  ssdcableslay5pconwatershape[1] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
+  ssdcableslay5pconwatershape[1] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
                                                                                                ssdcableangle,2);   
   ssdcableslay5pcwateronrmin[2] = ssdcableslay5pconrmax[1];
   ssdcableslay5pconwaterrmax[2] = ssdcableslay5pcwateronrmin[2]
-                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+                                                               + kSSDCablesLay5RightSideWaterHeight;
   ssdcableslay5pcwateronrmin[3] = ssdcableslay5pconrmax[3];
   ssdcableslay5pconwaterrmax[3] = ssdcableslay5pcwateronrmin[3]
-                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+                                                               + kSSDCablesLay5RightSideWaterHeight;
   for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[1]->DefineSection(i,ssdcableslay5pconwaterzsection[i+2],
                                                  ssdcableslay5pcwateronrmin[i+2],ssdcableslay5pconwaterrmax[i+2]); 
   ssdcableslay5pconwater[1] = new TGeoVolume("SSDCableLay5RightSidePConWater2",
                                                           ssdcableslay5pconwatershape[1],fSSDCoolingTubeWater);
   ssdcableslay5pconwater[1]->SetLineColor(7);
 ////////////////////////////////////
-  ssdcableslay5pconwatershape[2] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
+  ssdcableslay5pconwatershape[2] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
                                                                                                ssdcableangle,2);   
   ssdcableslay5pcwateronrmin[4] = ssdcableslay5pconrmax[3];
   ssdcableslay5pconwaterrmax[4] = ssdcableslay5pcwateronrmin[4]
-                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+                                                               + kSSDCablesLay5RightSideWaterHeight;
   ssdcableslay5pcwateronrmin[5] = ssdcableslay5pconrmax[4];
   ssdcableslay5pconwaterrmax[5] = ssdcableslay5pcwateronrmin[4]
-                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+                                                               + kSSDCablesLay5RightSideWaterHeight;
   ssdcableslay5pconwaterzsection[4] = ssdcableslay5pconzsection[4];
   ssdcableslay5pconwaterzsection[5] = ssdcableslay5pconzsection[5];
   for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[2]->DefineSection(i,ssdcableslay5pconwaterzsection[i+4],
@@ -7634,9 +7662,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   /////////////////////////
   // SSD Layer 6 Cables
   /////////////////////////
-  Double_t ssdcableslay6rigthsideradiusmin = fgkEndCapSupportMiddleRadius[1]+fgkSSDCablesLay6TubeRadiusMin;  
-  Double_t ssdcablelay6rightsidelength = 2.*ssdcablelay5rightsidelength;
-  Double_t ssdcableslay6rightsideradiusmax = ssdcableslay6rigthsideradiusmin+fgkSSDCablesLay6RightSideHeight; 
+  Double_t ssdcableslay6rigthsideradiusmin = fgkEndCapSupportMiddleRadius[1]+kSSDCablesLay6TubeRadiusMin;  
+  Double_t ssdcablelay6rightsidelength = 2.; // cm  was 2.*ssdcablelay5rightsidelength;
+  Double_t ssdcableslay6rightsideradiusmax = ssdcableslay6rigthsideradiusmin+kSSDCablesLay6RingArea/ssdcablelay6rightsidelength;
+  // Printf(Form("Lay 6 cables, length %g, radius %g, thickness %g", ssdcablelay6rightsidelength, ssdcableslay6rigthsideradiusmin, kSSDCablesLay6RingArea/ssdcablelay6rightsidelength));
   TGeoTube* ssdcablelay6rightubeshape = new TGeoTube(ssdcableslay6rigthsideradiusmin,
                                                                                                ssdcableslay6rightsideradiusmax,
                                                                                                0.5*ssdcablelay6rightsidelength); 
@@ -7654,10 +7683,15 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                                                    - fgkEndCapSupportCenterLay6ITSPosition);
   ssdcablesmother->AddNode(ssdcablelay6righttube,1,ssdcablelay6rightrans);
   ssdcablesmother->AddNode(ssdcablelay6righttube,2,ssdcablesLay6RightTubeToLeftrans);
+  // Printf(Form("Cables; ring layer 6, volume: %g",ssdcablelay6rightubeshape->Capacity()));
+  totvol += ssdcablelay6rightubeshape->Capacity();
   ////////////////////////////////////
   //cablescapacity[8] = 2.*ssdcablelay6rightubeshape->Capacity();
   ////////////////////////////////////
-  TGeoPcon* ssdcableslay6pconshape = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
+  // MvL: PCon is part of connection to patch panels;
+  // removed since current volume is too thick; now absorbed in rings+connections
+  /*
+  TGeoPcon* ssdcableslay6pconshape = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
                                                                                   ssdcableangle,2);   
   TGeoVolume* ssdcableslay6pcon;
   Double_t ssdcableslay6pconrmin[2];
@@ -7673,6 +7707,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   ssdcableslay6pconzsection[1] = ssdcableslay5pconwaterzsection[5];
   for(Int_t i=0; i<2;i++) ssdcableslay6pconshape->DefineSection(i,ssdcableslay6pconzsection[i],
                                                  ssdcableslay6pconrmin[i],ssdcableslay6pconrmax[i]); 
+  
   ssdcableslay6pcon = new TGeoVolume("SSDCableLay6RightSidePCon",
                                                           ssdcableslay6pconshape,fSSDCopper);
   ssdcableslay6pcon->SetLineColor(9);
@@ -7680,6 +7715,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
    ssdcablesmother->AddNode(ssdcableslay6pcon,i+1,ssdcableslay5pconrot[i]);
    ssdcablesmother->AddNode(ssdcableslay6pcon,i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
   }
+  */
   ////////////////////////////////////
   //cablescapacity[9] = 8.*ssdcableslay6pconshape->Capacity();
   /////////////////////////
@@ -7687,7 +7723,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   /////////////////////////
   TGeoTube* ssdcablelay6righwatertubeshape = new TGeoTube(ssdcableslay6rightsideradiusmax,
                                                                                                                  ssdcableslay6rightsideradiusmax
-                                                                                  +                      fgkSSDCablesLay5RightSideWaterHeight,
+                                                                                  +                      kSSDCablesLay5RightSideWaterHeight,
                                                                                                                  0.5*ssdcablelay6rightsidelength); 
   TGeoVolume* ssdcablelay6rightwatertube = new TGeoVolume("SSDCableLay6RightSideWaterTube",
                                                                                                         ssdcablelay6righwatertubeshape,
@@ -7695,7 +7731,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   ssdcablelay6rightwatertube->SetLineColor(7);
   ssdcablesmother->AddNode(ssdcablelay6rightwatertube,1,ssdcablelay6rightrans);
   ssdcablesmother->AddNode(ssdcablelay6rightwatertube,2,ssdcablesLay6RightTubeToLeftrans);
-  TGeoPcon* ssdcableslay6waterpconshape = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
+  TGeoPcon* ssdcableslay6waterpconshape = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
                                                                                   ssdcableangle,2);   
   TGeoVolume* ssdcableslay6waterpcon;
   Double_t ssdcableslay6waterpconrmin[2];
@@ -7703,7 +7739,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   Double_t ssdcableslay6waterpconzsection[2];
   ssdcableslay6waterpconrmin[0] = ssdcableslay6rightsideradiusmax;
   ssdcableslay6waterpconrmax[0] = ssdcableslay6rightsideradiusmax
-                                                           + fgkSSDCablesLay5RightSideWaterHeight;
+                                                           + kSSDCablesLay5RightSideWaterHeight;
   ssdcableslay6waterpconrmin[1] = ssdcableslay6waterpconrmin[0];
   ssdcableslay6waterpconrmax[1] = ssdcableslay6waterpconrmax[0];
   ssdcableslay6waterpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
@@ -7733,35 +7769,37 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   Double_t ssdcablepatchpanel3BB26radiusmin[2];
   Double_t ssdcablepatchpanel3BB26radiusmax[2];
   Double_t ssdcablepatchpanel3RB26zsection[2];
-  ssdcablepatchpanel3BB26radiusmin[0] = ssdcableslay5pconrmin[3]-0.5*fgkSSDPatchPanelHeight+2.8;
+  ssdcablepatchpanel3BB26radiusmin[0] = ssdcableslay5pconrmin[3]-0.5*kSSDPatchPanelHeight;// +2.8+0.003;//Avoid small overlap with SPDshieldring;
   ssdcablepatchpanel3BB26radiusmax[0] = ssdcablepatchpanel3BB26radiusmin[0]
-                                                                         + fgkSSDCablesLay5RightSideHeight
-                                                                         + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
-  ssdcablepatchpanel3BB26radiusmin[1] = fgkSSDPatchPanel2RB26Radius;
+                                        + kSSDCablesHeight;
+  ssdcablepatchpanel3BB26radiusmin[1] = kSSDPatchPanel2RB26Radius;
   ssdcablepatchpanel3BB26radiusmax[1] = ssdcablepatchpanel3BB26radiusmin[1]
-                                                                         + 0.*fgkSSDCablesLay5RightSideHeight
-                                                                         + 0.*fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
+                                       + kSSDCablesHeight;
   ssdcablepatchpanel3RB26zsection[0] = 0.5*fgkSSDCentralSupportLength
-                                                                                + fgkSSDCentralAL3SupportLength
+                                       + fgkSSDCentralAL3SupportLength
                                                                                 + fgkSSDPConeZLength[0];
-  ssdcablepatchpanel3RB26zsection[1] = fgkSSDPatchPanel2RB26ITSDistance;  
+  ssdcablepatchpanel3RB26zsection[1] = kSSDPatchPanel2RB26ITSDistance;  
+  // Printf(Form("RB26 cable length %g",ssdcablepatchpanel3RB26zsection[1]-ssdcablepatchpanel3RB26zsection[0]));
+  // Printf(Form("Angular range %g",ssdcableangle));
+
   TGeoPcon* ssdcablepatchpanel3RB26pconshape = 
-                                                               new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB26Angle[0]
+                                                               new TGeoPcon(90.0-kSSDCablesPatchPanel2RB26Angle[0]
                                                                                                - 0.5*ssdcableangle,ssdcableangle,2);   
   for(Int_t i=0; i<2;i++) ssdcablepatchpanel3RB26pconshape->DefineSection(i,ssdcablepatchpanel3RB26zsection[i],
                                                  ssdcablepatchpanel3BB26radiusmin[i],ssdcablepatchpanel3BB26radiusmax[i]); 
   TGeoVolume* ssdcablepatchpanel3RB26pcon = new TGeoVolume("SSDCablePatchPanel3RB26",
                                                                                                ssdcablepatchpanel3RB26pconshape,fSSDCopper);
   ssdcablepatchpanel3RB26pcon->SetLineColor(9);
-  TGeoRotation* ssdcablepatchpanel3B26rot[3];
+  TGeoRotation* ssdcablepatchpanel3B26rot[4];
   for(Int_t i=0; i<4; i++) ssdcablepatchpanel3B26rot[i] = new TGeoRotation();
   ssdcablepatchpanel3B26rot[0]->SetAngles(0.0,0.0,0.0);
-  ssdcablepatchpanel3B26rot[1]->SetAngles(fgkSSDCablesPatchPanel2RB26Angle[0]
-                                                                 +                       fgkSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
+  ssdcablepatchpanel3B26rot[1]->SetAngles(kSSDCablesPatchPanel2RB26Angle[0]
+                                         kSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
   ssdcablepatchpanel3B26rot[2]->SetAngles(180.0,0.0,0.0);
-  ssdcablepatchpanel3B26rot[3]->SetAngles(180.0+fgkSSDCablesPatchPanel2RB26Angle[0]
-                                                                 +                       fgkSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
+  ssdcablepatchpanel3B26rot[3]->SetAngles(180.0 + kSSDCablesPatchPanel2RB26Angle[0]
+                                               kSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
   for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB26pcon,i+1,ssdcablepatchpanel3B26rot[i]);
+  // Printf(Form("Cable to patch panels RB26 volume: %g (x4)",ssdcablepatchpanel3RB26pcon->Capacity()));
   ////////////////////////////////////
   //cablescapacity[10] = 4.*ssdcablepatchpanel3RB26pconshape->Capacity();
   ////////////////////////////////////////
@@ -7774,29 +7812,28 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                          + fgkSSDCentralAL3SupportLength
                                                                          + (4.0/5.0)*fgkSSDPConeZLength[0];
   ssdcableitsring3BB26pconzsection[1] = ssdcablepatchpanel3RB26zsection[0];
-  ssdcableitsring3BB26pconrmin[0] = fgkSSDPConeUpRadius-0.5*fgkSSDPatchPanelHeight;
-  ssdcableitsring3BB26pconrmax[0] = ssdcableitsring3BB26pconrmin[0]
-                                                                 + fgkSSDCablesLay5RightSideHeight
-                                                                 + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
+  ssdcableitsring3BB26pconrmin[0] = fgkSSDPConeUpRadius-0.5*kSSDPatchPanelHeight;
+  ssdcableitsring3BB26pconrmax[0] = ssdcableitsring3BB26pconrmin[0] + 2.5*kSSDCablesHeight; // widths of cable bunch is about half of patch panels; need factor 2.5
+
   ssdcableitsring3BB26pconrmin[1] = ssdcablepatchpanel3BB26radiusmin[0];
   ssdcableitsring3BB26pconrmax[1] = ssdcablepatchpanel3BB26radiusmax[0];
   TGeoPcon* ssdcableitsring3BB26pconshape[4];
-  ssdcableitsring3BB26pconshape[0] = new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB26Angle[0]
+  ssdcableitsring3BB26pconshape[0] = new TGeoPcon(90.0 - kSSDCablesPatchPanel2RB26Angle[0]
                                                                   -              0.5*ssdcableangle,ssdcableangle
-                                                                  +                            (fgkSSDCablesPatchPanel2RB26Angle[0]
-                                                                  -                             fgkSSDCableAngle),2);
-  ssdcableitsring3BB26pconshape[1] = new TGeoPcon(90.0+fgkSSDCablesPatchPanel2RB26Angle[1]
+                                                                  +                            (kSSDCablesPatchPanel2RB26Angle[0]
+                                                                  -                             kSSDCableAngle),2);
+  ssdcableitsring3BB26pconshape[1] = new TGeoPcon(90.0 + kSSDCablesPatchPanel2RB26Angle[1]
                                                                   -              0.5*ssdcableangle,ssdcableangle
-                                                                  +                      3.0*fgkSSDCableAngle
-                                                                  -                      fgkSSDCablesPatchPanel2RB26Angle[1],2);
-  ssdcableitsring3BB26pconshape[2] = new TGeoPcon(270-fgkSSDCablesPatchPanel2RB26Angle[0]
+                                                                  +                      3.0*kSSDCableAngle
+                                                                  -                      kSSDCablesPatchPanel2RB26Angle[1],2);
+  ssdcableitsring3BB26pconshape[2] = new TGeoPcon(270-kSSDCablesPatchPanel2RB26Angle[0]
                                                                   -              0.5*ssdcableangle,ssdcableangle
-                                                                  -                      fgkSSDCableAngle
-                                                                  +                      fgkSSDCablesPatchPanel2RB26Angle[0],2);
-  ssdcableitsring3BB26pconshape[3] = new TGeoPcon(270.0+fgkSSDCablesPatchPanel2RB26Angle[1]
+                                                                  -                      kSSDCableAngle
+                                                                  +                      kSSDCablesPatchPanel2RB26Angle[0],2);
+  ssdcableitsring3BB26pconshape[3] = new TGeoPcon(270.0+kSSDCablesPatchPanel2RB26Angle[1]
                                                                   -              0.5*ssdcableangle,ssdcableangle
-                                                                  +                      3.0*fgkSSDCableAngle
-                                                                  -                      fgkSSDCablesPatchPanel2RB26Angle[1],2);
+                                                                  +                      3.0*kSSDCableAngle
+                                                                  -                      kSSDCablesPatchPanel2RB26Angle[1],2);
   for(Int_t i=0;i<4;i++)
        for(Int_t j=0; j<2; j++) ssdcableitsring3BB26pconshape[i]->DefineSection(j,ssdcableitsring3BB26pconzsection[j],
                                                         ssdcableitsring3BB26pconrmin[j],
@@ -7813,7 +7850,9 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   for(Int_t i=0;i<4;i++){
        ssdcableitsring3BB26pcon[i]->SetLineColor(9);
        ssdcablesmother->AddNode(ssdcableitsring3BB26pcon[i],1);
+       //Printf(Form("Cable to patch panels RB26 volume part 2: %g (%d)",ssdcableitsring3BB26pcon[i]->Capacity(),i));
 }
+
   ////////////////////////////////////
   //cablescapacity[11] = ssdcableitsring3BB26pconshape[0]->Capacity()
   //                            + ssdcableitsring3BB26pconshape[1]->Capacity() 
@@ -7827,17 +7866,16 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   Double_t ssdcablepatchpanel3RB24zsection[2];
   ssdcablepatchpanel3BB24radiusmin[0] = ssdcablepatchpanel3BB26radiusmin[0];
   ssdcablepatchpanel3BB24radiusmax[0] = ssdcablepatchpanel3BB26radiusmax[0];
-  ssdcablepatchpanel3BB24radiusmin[1] = fgkSSDPatchPanel2RB24Radius;
+  ssdcablepatchpanel3BB24radiusmin[1] = kSSDPatchPanel2RB24Radius;
   ssdcablepatchpanel3BB24radiusmax[1] = ssdcablepatchpanel3BB24radiusmin[1]
-                                                                         + 0.*fgkSSDCablesLay5RightSideHeight
-                                                                         + 0.*fgkSSDCablesLay6RightSideHeight
-                                                                         + 0.5*fgkSSDPatchPanelHeight;
+                                        + kSSDCablesHeight;
   ssdcablepatchpanel3RB24zsection[0] = -0.5*fgkSSDCentralSupportLength
                                                                         -  fgkSSDCentralAL3SupportLength
                                                                         -  fgkSSDPConeZLength[0];
-  ssdcablepatchpanel3RB24zsection[1] = -fgkSSDPatchPanel2RB24ITSDistance;  
+  ssdcablepatchpanel3RB24zsection[1] = -kSSDPatchPanel2RB24ITSDistance;  
+  //Printf(Form("RB24 cable length %g",ssdcablepatchpanel3RB24zsection[1]-ssdcablepatchpanel3RB24zsection[0]));
   TGeoPcon* ssdcablepatchpanel3RB24pconshape = 
-                                                               new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB24Angle[1]
+                                                               new TGeoPcon(90.0-kSSDCablesPatchPanel2RB24Angle[1]
                                                                                                - 0.5*ssdcableangle,ssdcableangle,2);   
   for(Int_t i=0; i<2;i++) ssdcablepatchpanel3RB24pconshape->DefineSection(i,ssdcablepatchpanel3RB24zsection[i],
                                                  ssdcablepatchpanel3BB24radiusmin[i],ssdcablepatchpanel3BB24radiusmax[i]); 
@@ -7845,15 +7883,16 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                                                ssdcablepatchpanel3RB24pconshape,
                                                                                                fSSDCopper);
   ssdcablepatchpanel3RB24pcon->SetLineColor(9);
-  TGeoRotation* ssdcablepatchpanel3B24rot[3];
+  TGeoRotation* ssdcablepatchpanel3B24rot[4];
   for(Int_t i=0; i<4; i++) ssdcablepatchpanel3B24rot[i] = new TGeoRotation();
   ssdcablepatchpanel3B24rot[0]->SetAngles(-6.0,0.0,0.0);
-  ssdcablepatchpanel3B24rot[1]->SetAngles(fgkSSDCablesPatchPanel2RB24Angle[0]
-                                                                 +                       fgkSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
+  ssdcablepatchpanel3B24rot[1]->SetAngles(kSSDCablesPatchPanel2RB24Angle[0]
+                                         kSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
   ssdcablepatchpanel3B24rot[2]->SetAngles(174.0,0.0,0.0);
-  ssdcablepatchpanel3B24rot[3]->SetAngles(180.0+fgkSSDCablesPatchPanel2RB24Angle[0]
-                                                                 +                       fgkSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
+  ssdcablepatchpanel3B24rot[3]->SetAngles(180.0+kSSDCablesPatchPanel2RB24Angle[0]
+                                         kSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
   for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB24pcon,i+1,ssdcablepatchpanel3B24rot[i]);
+  //Printf(Form("Cable to patch panels RB24 volume: %g (x4)",ssdcablepatchpanel3RB24pcon->Capacity()));
   ////////////////////////////////////
   //cablescapacity[12] = 4.*ssdcablepatchpanel3RB24pconshape->Capacity();
   ////////////////////////////////////////
@@ -7864,25 +7903,24 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   Double_t ssdcableitsring3BB24pconrmax[2];
   ssdcableitsring3BB24pconzsection[0] = -ssdcableitsring3BB26pconzsection[0];
   ssdcableitsring3BB24pconzsection[1] = ssdcablepatchpanel3RB24zsection[0];
-  ssdcableitsring3BB24pconrmin[0] = fgkSSDPConeUpRadius-0.5*fgkSSDPatchPanelHeight;
-  ssdcableitsring3BB24pconrmax[0] = ssdcableitsring3BB24pconrmin[0]
-                                                                 + fgkSSDCablesLay5RightSideHeight
-                                                                 + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
+  ssdcableitsring3BB24pconrmin[0] = fgkSSDPConeUpRadius-0.5*kSSDPatchPanelHeight;
+  ssdcableitsring3BB24pconrmax[0] = ssdcableitsring3BB24pconrmin[0] + 2.5*kSSDCablesHeight;  // Cable bunch width smaller; make it thicker
+
   ssdcableitsring3BB24pconrmin[1] = ssdcablepatchpanel3BB24radiusmin[0];
   ssdcableitsring3BB24pconrmax[1] = ssdcablepatchpanel3BB24radiusmax[0];
   TGeoPcon* ssdcableitsring3BB24pconshape[4];
-  ssdcableitsring3BB24pconshape[0] = new TGeoPcon(fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle
-                                                                  +                            (90.0-fgkSSDCablesPatchPanel2RB24Angle[1]
-                                                                  -                             fgkSSDCableAngle),2);
-  ssdcableitsring3BB24pconshape[1] = new TGeoPcon(90.0+fgkSSDCableAngle-0.5*ssdcableangle,
-                                                                    ssdcableangle-fgkSSDCableAngle
-                                                                  +                      fgkSSDCablesPatchPanel2RB24Angle[0],2);
-  ssdcableitsring3BB24pconshape[2] = new TGeoPcon(180.0+fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle
-                                                                  -                      fgkSSDCableAngle
-                                                                  +                      90.0-fgkSSDCablesPatchPanel2RB24Angle[1],2);
-  ssdcableitsring3BB24pconshape[3] = new TGeoPcon(270.0+fgkSSDCableAngle-0.5*ssdcableangle,
-                                                                                                 ssdcableangle-fgkSSDCableAngle
-                                                                  +                      fgkSSDCablesPatchPanel2RB24Angle[0],2);
+  ssdcableitsring3BB24pconshape[0] = new TGeoPcon(kSSDCableAngle-0.5*ssdcableangle,ssdcableangle
+                                                              + (90.0-kSSDCablesPatchPanel2RB24Angle[1]
+                                                                  - kSSDCableAngle),2);
+  ssdcableitsring3BB24pconshape[1] = new TGeoPcon(90.0+kSSDCableAngle-0.5*ssdcableangle,
+                                                                    ssdcableangle-kSSDCableAngle
+                                                                  + kSSDCablesPatchPanel2RB24Angle[0],2);
+  ssdcableitsring3BB24pconshape[2] = new TGeoPcon(180.0+kSSDCableAngle-0.5*ssdcableangle,ssdcableangle
+                                                                  - kSSDCableAngle
+                                                                  + 90.0 - kSSDCablesPatchPanel2RB24Angle[1],2);
+  ssdcableitsring3BB24pconshape[3] = new TGeoPcon(270.0+kSSDCableAngle-0.5*ssdcableangle,
+                                                                  ssdcableangle-kSSDCableAngle
+                                                                  + kSSDCablesPatchPanel2RB24Angle[0],2);
   for(Int_t i=0;i<4;i++)
        for(Int_t j=0; j<2; j++) ssdcableitsring3BB24pconshape[i]->DefineSection(j,ssdcableitsring3BB24pconzsection[j],
                                                         ssdcableitsring3BB24pconrmin[j],
@@ -7899,37 +7937,28 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   for(Int_t i=0;i<4;i++){
        ssdcableitsring3BB24pcon[i]->SetLineColor(9);
        ssdcablesmother->AddNode(ssdcableitsring3BB24pcon[i],1);
+       // Printf(Form("Cable to patch panels RB24 (part 2) volume: %g (%d)",ssdcableitsring3BB24pcon[i]->Capacity(),i));
 }
+
   ////////////////////////////////////
   //cablescapacity[13] = ssdcableitsring3BB24pconshape[0]->Capacity()
   //                                    + ssdcableitsring3BB24pconshape[1]->Capacity()
   //                                    + ssdcableitsring3BB24pconshape[2]->Capacity()
   //                                    + ssdcableitsring3BB24pconshape[3]->Capacity();
-  ////////////////////////////////////
-  // Volumes for Material Budget 
-  ////////////////////////////////////
-  TGeoTube* ssdcablelay6materialbudgetubeshape = new TGeoTube(ssdcableslay6rightsideradiusmax
-                                                                                          +     fgkSSDCablesLay5RightSideWaterHeight,
-                                                                                                        ssdcableslay6rightsideradiusmax
-                                                                                          +     fgkSSDCablesLay5RightSideWaterHeight
-                                                                                          +     fgkSSDCableMaterialBudgetHeight,0.5*ssdcablelay6rightsidelength); 
-  TGeoVolume* ssdcablelay6materialbudgetube = new TGeoVolume("SSDCableLay6MaterialBudgetTube",
-                                                                                                        ssdcablelay6materialbudgetubeshape,
-                                                                                                        fSSDCopper);
-  ssdcablelay6materialbudgetube->SetLineColor(9);
-  ssdcablesmother->AddNode(ssdcablelay6materialbudgetube,1,ssdcablelay6rightrans);
-  ssdcablesmother->AddNode(ssdcablelay6materialbudgetube,2,ssdcablesLay6RightTubeToLeftrans);
 
+  // MvL: Pcon are connection to patch panels (part of)
+  // Removed; do not contribute much; put into ring structure
+  /*
   TGeoPcon* ssdcablelay6materialbudgetpconshape = 
-                                       new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle,2); 
+                                       new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,ssdcableangle,2); 
   TGeoVolume* ssdcablelay6materialbudgetpcon;
   Double_t ssdcablelay6materialbudgetpconrmin[2];
   Double_t ssdcablelay6materialbudgetpconrmax[2];
   Double_t ssdcablelay6materialbudgetpconzsection[2];
   ssdcablelay6materialbudgetpconrmin[0] = ssdcableslay6rightsideradiusmax
-                                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+                                                                               + kSSDCablesLay5RightSideWaterHeight;
   ssdcablelay6materialbudgetpconrmax[0] = ssdcablelay6materialbudgetpconrmin[0]
-                                                                               + fgkSSDCableMaterialBudgetHeight;
+                                                                               + kSSDCableMaterialBudgetHeight;
   ssdcablelay6materialbudgetpconrmin[1] = ssdcablelay6materialbudgetpconrmin[0];
   ssdcablelay6materialbudgetpconrmax[1] = ssdcablelay6materialbudgetpconrmax[0];
   ssdcablelay6materialbudgetpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
@@ -7947,16 +7976,18 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
    ssdcablesmother->AddNode(ssdcablelay6materialbudgetpcon,i+1,ssdcableslay5pconrot[i]);
    ssdcablesmother->AddNode(ssdcablelay6materialbudgetpcon,i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
   }
+  */
 ////////////////////////////////////
  /* cablescapacity[14] = 2.*ssdcablelay6materialbudgetubeshape->Capacity();
   cablescapacity[15] = 2.*ssdcablelay6materialbudgetpconshape->Capacity();
   Double_t ssdcablesvolume = 0.0;
   for(Int_t i=0;i<16;i++) ssdcablesvolume+=cablescapacity[i];
   std::cout << ssdcablesvolume << std::endl;*/
+  // Printf(Form("Total volume (one side; without conn to patch panel): %g",totvol));
   return ssdcablesmother;
  }
  ////////////////////////////////////////////////////////////////////////////////
-TGeoArb8* AliITSv11GeometrySSD::GetArbShape(TVector3* vertexpos[], Double_t* width, 
+TGeoArb8* AliITSv11GeometrySSD::GetArbShape(TVector3 const * const vertexpos[4] , const Double_t* width, 
                                             Double_t height, const char* shapename, Int_t isign) const{
   /////////////////////////////////////////////////////////////
   // Method generating an Arb shape 
@@ -8013,8 +8044,8 @@ TGeoXtru* AliITSv11GeometrySSD::GetArcShape(Double_t phi, Double_t rmin,
        Double_t angle = 0.;
     for(Int_t i=0; i<nedges+1; i++){ 
                angle = 90.+0.5*phi-i*(phi/nedges);
-               vertexposition[0][i] = new TVector3(rmin*CosD(angle),rmin*SinD(angle));
-               vertexposition[1][i] = new TVector3(rmax*CosD(angle),rmax*SinD(angle));
+               vertexposition[0][i] = new TVector3(rmin*CosD(angle),rmin*SinD(angle),0);
+               vertexposition[1][i] = new TVector3(rmax*CosD(angle),rmax*SinD(angle),0);
        }
        Double_t *xvertexpoints = new Double_t[kvertexnumber];
        Double_t *yvertexpoints = new Double_t[kvertexnumber];
@@ -8050,7 +8081,7 @@ TGeoXtru* AliITSv11GeometrySSD::GetArcShape(Double_t phi, Double_t rmin,
        return arcshape;
 }
 ////////////////////////////////////////////////////////////////////////////////
-TGeoShape* AliITSv11GeometrySSD::GetScrewShape(Double_t* radius,Int_t* edgesnumber,Double_t* section) const {
+TGeoShape* AliITSv11GeometrySSD::GetScrewShape(const Double_t* radius,const Int_t* edgesnumber,const Double_t* section) const {
   ///////////////////////////////////////////////////////////////////////
   // Method Generating the Screw Shape  
   // radius[0]: outer radius
@@ -8090,7 +8121,7 @@ TGeoShape* AliITSv11GeometrySSD::GetScrewShape(Double_t* radius,Int_t* edgesnumb
   return screwshape;
 }
 ////////////////////////////////////////////////////////////////////////////////
-TGeoShape* AliITSv11GeometrySSD::GetHoleShape(Double_t radius, Int_t nedges, Double_t *section) const {
+TGeoShape* AliITSv11GeometrySSD::GetHoleShape(Double_t radius, Int_t nedges, const Double_t *section) const {
   ///////////////////////////////////////////////////////////////////////
   // Method Generating the Hole Shape  
   // radius of the Hole
@@ -8122,7 +8153,7 @@ TGeoShape* AliITSv11GeometrySSD::GetHoleShape(Double_t radius, Int_t nedges, Dou
   return holeshape;
 }
 ////////////////////////////////////////////////////////////////////////////////
-TVector3* AliITSv11GeometrySSD::GetReflection(TVector3* vector,Double_t* param) const{
+TVector3* AliITSv11GeometrySSD::GetReflection(const TVector3* vector,const Double_t* param) const{
   /////////////////////////////////////////////////////////////
   // Given an axis specified by param, it gives the reflection of the point
   // respect to the axis
@@ -8138,7 +8169,7 @@ TVector3* AliITSv11GeometrySSD::GetReflection(TVector3* vector,Double_t* param)
   return reflectedvector;
 }
 ////////////////////////////////////////////////////////////////////////////////
-TGeoHMatrix* AliITSv11GeometrySSD::AddTranslationToHMatrix(TGeoHMatrix* ct,
+TGeoHMatrix* AliITSv11GeometrySSD::AddTranslationToHMatrix(const TGeoHMatrix* ct,
                                                        Double_t dx,
                                                        Double_t dy,
                                                        Double_t dz) const{
@@ -8159,7 +8190,7 @@ TGeoMedium* AliITSv11GeometrySSD::GetMedium(const char* mediumName) {
   // Method returning the Medium type 
   /////////////////////////////////////////////////////////////
   char ch[100];
-  sprintf(ch, "ITS_%s",mediumName);
+  snprintf(ch,100, "ITS_%s",mediumName);
   TGeoMedium* medium =  gGeoManager->GetMedium(ch);
   if (! medium)
     AliError(Form("medium %s not found !\n", mediumName));
@@ -8238,3 +8269,4 @@ void AliITSv11GeometrySSD::CreateMaterials(){
   fCreateMaterials = kTRUE;
 }
 /////////////////////////////////////////////////////////////////////
+