]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSv11GeometrySSD.cxx
changed the order of call of endofcycle so that images are produced
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySSD.cxx
index 050926c6e85860995d06cf2a80f2f3429a236148..62486d399fa8bb664aa2b308681420b2e7091205 100644 (file)
 #include "TList.h"
 #include "TGeoMatrix.h"
 #include "TGeoCompositeShape.h"
+#include "TGeoBoolNode.h"
 #include "TGeoTube.h"
 #include "TGeoBBox.h"
 #include "TGeoXtru.h"
 #include "TGeoTorus.h"
 #include "TGeoPgon.h"
+#include "TGeoPcon.h"
 #include "TRotation.h"
 #include "AliITSv11GeometrySSD.h"
+#include "Riostream.h"
 /////////////////////////////////////////////////////////////////////////////////
 // Names of the Sensitive Volumes of Layer 5 and Layer 6
 /////////////////////////////////////////////////////////////////////////////////
-const char* AliITSv11GeometrySSD::fgSDDsensitiveVolName5 = "ITSsddSensitivL5";
-const char* AliITSv11GeometrySSD::fgSDDsensitiveVolName6 = "ITSsddSensitivL6";
+const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName5 = "ITSssdSensitivL5";
+const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName6 = "ITSssdSensitivL6";
 /////////////////////////////////////////////////////////////////////////////////
 //Parameters for SSD Geometry
 /////////////////////////////////////////////////////////////////////////////////
+// Variable for Vertical Disalignement of Modules
+/////////////////////////////////////////////////////////////////////////////////
+const Double_t AliITSv11GeometrySSD::fgkSSDTolerance = 0.0001*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDModuleVerticalDisalignment = 0.2*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDModuleSideDisalignment     = 0.2*fgkmm;
+// For ladders:
+const Double_t AliITSv11GeometrySSD::fgkSSDLadderVerticalDisalignment = 0.520*fgkmm;
+/////////////////////////////////////////////////////////////////////////////////
 // Layer5 (lengths are in mm and angles in degrees)
 /////////////////////////////////////////////////////////////////////////////////
 const Double_t AliITSv11GeometrySSD::fgkSSDLay5LadderLength      = 950.7*fgkmm;
@@ -166,7 +177,10 @@ const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportLength                =
 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportWidth          =  
                                                                                                                                         2.000*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2]      =
-                                                                                                    { 4.620*fgkmm, 5.180*fgkmm};
+                                                                                                    { 4.620*fgkmm-fgkSSDModuleVerticalDisalignment, 
+                                                                                                      5.220*fgkmm-fgkSSDModuleVerticalDisalignment};
+//const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2]      =
+//                                                                                                  { 4.520*fgkmm, 5.130*fgkmm};
 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportThickness[2]   = 
                                                                                                         { 0.450*fgkmm, 0.450*fgkmm};
 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportPosition       
@@ -196,10 +210,12 @@ const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesHeight[4]   =
                                  {  0.014*fgkmm,  0.010*fgkmm, fgkSSDModuleCoolingBlockToSensor
                                                                  -  (fgkSSDSensorSideSupportHeight[1]
                                                                  -   fgkSSDSensorSideSupportHeight[0])
+                                                                 -   fgkSSDModuleVerticalDisalignment
                                                                  -   fgkSSDCoolingBlockHoleCenter
                                                                  -   fgkSSDStiffenerHeight
                                                                  -   fgkSSDChipHeight-fgkSSDSensorHeight,
                                                                          fgkSSDModuleCoolingBlockToSensor
+                                                                 -   fgkSSDModuleVerticalDisalignment  
                                                                  -   fgkSSDCoolingBlockHoleCenter
                                                                  -       fgkSSDStiffenerHeight
                                                                  -   fgkSSDChipHeight-fgkSSDSensorHeight};
@@ -245,6 +261,7 @@ const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportYAxisLength
 /////////////////////////////////////////////////////////////////////////////////
 // Carbon Fiber Lower Support Parameters (lengths are in mm)
 /////////////////////////////////////////////////////////////////////////////////
+const Double_t AliITSv11GeometrySSD::fgkLowerSupportToSensorZ           = 11.575*fgkmm;  
 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportWidth             
                                                                                                                                          =  0.950*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportLowerLenght       
@@ -330,7 +347,7 @@ const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleRadius           =
                                                                                                                                          1.0*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleEdge        =   
                                                                                                                                          6.0*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleHeigth      =  
+const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleHeight      =  
                                                                                                                                          4.0*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleRadius[2]   =
                                                          {  1.5*fgkmm,fgkSSDMountingBlockScrewHoleEdge/6.};
@@ -367,7 +384,7 @@ const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportUpHeight[2] = {fgkSS
                                                                                                    +  0.5*fgkCoolingTubeSupportHeight
                                                                                                    +  fgkSSDModuleCoolingBlockToSensor
                                                                                                        -  fgkMountingBlockSupportRadius[1]};
-const Double_t AliITSv11GeometrySSD::fgkLadderSupportHeigth = 10.0*fgkmm; // To be verified
+const Double_t AliITSv11GeometrySSD::fgkLadderSupportHeight = 10.0*fgkmm; // To be verified
 const Double_t AliITSv11GeometrySSD::fgkLadderSupportRingLay5Position = 451.35*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkLadderSupportRingLay6Position = 510.00*fgkmm;
 /////////////////////////////////////////////////////////////////////////////////
@@ -421,7 +438,7 @@ const Double_t AliITSv11GeometrySSD::fgkEndCapSideCoverThickness = 0.4*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackLength[3] = 
                                                                                                           {62.0*fgkmm,21.87*fgkmm};
 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackWidth[2] = 
-                                                                                                           {47.1*fgkmm,0.35*fgkmm};
+                                                                                                           {47.0*fgkmm,0.35*fgkmm};
 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackThickness = 
                                                                                                                                          1.0*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardLength = 61.8*fgkmm;
@@ -473,7 +490,7 @@ const Double_t AliITSv11GeometrySSD::fgkEndCapEffectiveCableRadiusMax = 1.575*fg
 /////////////////////////////////////////////////////////////////////////////////
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLength[2] = {70.424*fgkmm,72.919*fgkmm};
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportMiddleRadius[2] = {377.0*fgkmm,437.0*fgkmm};
-const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowRadius[2] = {365.0*fgkmm,430.0*fgkmm};
+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;
@@ -481,6 +498,50 @@ const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5Position = 2.5*fg
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6ITSPosition = 635.0*fgkmm;
 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6Position = 2.5*fgkmm;
 /////////////////////////////////////////////////////////////////////////////////
+// SSD Cone Parameters (lengths are in mm and angles in degrees)
+/////////////////////////////////////////////////////////////////////////////////
+const Double_t AliITSv11GeometrySSD::fgkSSDLowerPConeRadius = 296.5*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeAngle = 39.0; 
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeZLength[2] = {168.0*fgkmm,153.0*fgkmm};
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeLittleHoleRadius = 317.5*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeLittleHoleLength = 20.*fgkmm;  
+const Double_t AliITSv11GeometrySSD::fgkSSDConeMiddleRadius = 350.*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeMiddleLength = 30.*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeMiddleWidth = 40.*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpRadius = 400.*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpMaxRadius = 459.*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpMiddleRadius = 472.5*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeDownRadius = 282.0*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeTrapezoidAngle = 42.0;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeTrapezoidBasis = 200.0*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeExternalRadius = 492.5*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeRadiusWidth = 16.75*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDPConeLength = 168.0*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportLength = 1020.*fgkmm;
+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)
 /////////////////////////////////////////////////////////////////////////////////
 AliITSv11GeometrySSD::AliITSv11GeometrySSD(): 
@@ -507,7 +568,9 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD():
   fSSDCoolingTubePhynox(),
   fSSDSupportRingAl(),
   fSSDMountingBlockMedium(),
+  fSSDRohaCellCone(),
   fSSDAir(),
+  fSSDCopper(),
   fCreateMaterials(kFALSE),
   fTransformationMatrices(kFALSE),
   fBasicObjects(kFALSE),
@@ -518,6 +581,7 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD():
   fcoolingblocksystematrix(),
   fssdstiffenerflex(),
   fssdendflex(),
+  fcoolingtube(0),
   fendladdercoolingtubesupportmatrix(),
   fendladdermountingblock(),
   fendladdermountingblockclip(),
@@ -528,6 +592,8 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD():
   fMotherVol(),
   fLay5LadderSupportRing(),
   fLay6LadderSupportRing(),
+  fgkEndCapSupportSystem(),
+  fSSDCone(),
   fColorCarbonFiber(4),
   fColorRyton(5),
   fColorPhynox(14),
@@ -569,7 +635,9 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(const AliITSv11GeometrySSD &s):
   fSSDCoolingTubePhynox(s.fSSDCoolingTubePhynox),
   fSSDSupportRingAl(s.fSSDSupportRingAl),
   fSSDMountingBlockMedium(s.fSSDMountingBlockMedium),
+  fSSDRohaCellCone(s.fSSDRohaCellCone),
   fSSDAir(s.fSSDAir),
+  fSSDCopper(s.fSSDCopper),
   fCreateMaterials(s.fCreateMaterials),
   fTransformationMatrices(s.fTransformationMatrices),
   fBasicObjects(s.fBasicObjects),
@@ -580,6 +648,7 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(const AliITSv11GeometrySSD &s):
   fcoolingblocksystematrix(s.fcoolingblocksystematrix),
   fssdstiffenerflex(s.fssdstiffenerflex),
   fssdendflex(s.fssdendflex),
+  fcoolingtube(s.fcoolingtube),
   fendladdercoolingtubesupportmatrix(s.fendladdercoolingtubesupportmatrix),
   fendladdermountingblock(s.fendladdermountingblock),
   fendladdermountingblockclip(s.fendladdermountingblockclip),
@@ -590,6 +659,8 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(const AliITSv11GeometrySSD &s):
   fMotherVol(s.fMotherVol),
   fLay5LadderSupportRing(s.fLay5LadderSupportRing),
   fLay6LadderSupportRing(s.fLay6LadderSupportRing),
+  fgkEndCapSupportSystem(s.fgkEndCapSupportSystem),
+  fSSDCone(s.fSSDCone),
   fColorCarbonFiber(s.fColorCarbonFiber),
   fColorRyton(s.fColorRyton),
   fColorPhynox(s.fColorPhynox),
@@ -923,77 +994,24 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
   /////////////////////////////////////////////////////////////
   TGeoRotation* localcoolingtuberot = new TGeoRotation();      
   localcoolingtuberot->SetAngles(0.,90.,0.);
-  TGeoTranslation** localcoolingtubetrans[4];
-  TVector3** localcoolingtubevect[4];
-  for(Int_t i=0; i<4; i++){
-       localcoolingtubevect[i] = new TVector3*[2];
-       localcoolingtubetrans[i] = new TGeoTranslation*[2];
-       fcoolingtubematrix[i] = new TGeoHMatrix*[2];
-  }
-  localcoolingtubevect[0][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
+  TGeoTranslation* localcoolingtubetrans[2];
+  TVector3* localcoolingtubevect[2];
+
+  localcoolingtubevect[0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
                                                  -fgkCarbonFiberTriangleLength),
-                                                 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
-                                                                fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
-                                                 +      0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
-                                                 -      0.5*(fgkCarbonFiberLowerSupportWidth
-                                                 +      fgkSSDSensorCenterSupportLength
-                                                 -      fgkSSDSensorCenterSupportThickness[0])+
-                                                        0.5*fgkSSDSensorLength-0.25*(fgkSSDSensorLength
-                                                 -  2.0*fgkSSDModuleStiffenerPosition[1]
-                                                 -      2.0*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
-                                                 -  0.5*fgkCoolingTubeSupportWidth,
+                                           fgkCarbonFiberJunctionWidth         // Y-coord is local Z, from sensor translation 
+                                           - fgkCarbonFiberLowerSupportWidth 
+                                           - fgkLowerSupportToSensorZ ,
                                                  -  0.5*fgkCoolingTubeSupportHeight);  
-  localcoolingtubevect[0][1] = new TVector3(localcoolingtubevect[0][0]->X(),
-                                                       localcoolingtubevect[0][0]->Y()+0.5*(fgkSSDSensorLength
-                                                 -  2.0*fgkSSDModuleStiffenerPosition[1]
-                                                 -      2.0*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
-                                                 +  fgkCoolingTubeSupportWidth,
-                                                 localcoolingtubevect[0][0]->Z());     
-  localcoolingtubevect[1][0] = new TVector3(-localcoolingtubevect[0][0]->X()
-                                                        +                               fgkCarbonFiberTriangleLength,
-                                                                                        localcoolingtubevect[0][0]->Y(),
-                                                                                        localcoolingtubevect[0][0]->Z());
-  localcoolingtubevect[1][1] = new TVector3(-localcoolingtubevect[0][1]->X()
-                                                        +                               fgkCarbonFiberTriangleLength,
-                                                                                        localcoolingtubevect[0][1]->Y(),
-                                                                                        localcoolingtubevect[0][1]->Z());
-  localcoolingtubevect[2][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
-                                                 -     fgkCarbonFiberTriangleLength),
-                                                 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
-                                                                fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
-                                                 +      0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
-                                                 -      0.5*(fgkCarbonFiberLowerSupportWidth
-                                                 +      fgkSSDSensorCenterSupportLength
-                                                 -      fgkSSDSensorCenterSupportThickness[0])
-                                                 +  fgkSSDModuleStiffenerPosition[1]
-                                                 -  0.5*(fgkSSDModuleStiffenerPosition[1]-fgkSSDSensorOverlap),
-                                                 -  0.5*fgkCoolingTubeSupportHeight);  
-  localcoolingtubevect[2][1] = new TVector3(-localcoolingtubevect[2][0]->X()
-                                                        +                               fgkCarbonFiberTriangleLength,
-                                                                                        localcoolingtubevect[2][0]->Y(),
-                                                                                        localcoolingtubevect[2][0]->Z());      
-  localcoolingtubevect[3][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
-                                                 -     fgkCarbonFiberTriangleLength),
-                                                 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
-                                                                fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
-                                                 +      0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
-                                                 -      0.5*(fgkCarbonFiberLowerSupportWidth
-                                                 +      fgkSSDSensorCenterSupportLength
-                                                 -      fgkSSDSensorCenterSupportThickness[0])
-                                                 +      fgkSSDSensorLength
-                                                 -      0.5*fgkSSDModuleStiffenerPosition[1],
-                                                 -  0.5*fgkCoolingTubeSupportHeight);  
-  localcoolingtubevect[3][1] = new TVector3(-localcoolingtubevect[3][0]->X()
-                                                 + fgkCarbonFiberTriangleLength,
-                                                       localcoolingtubevect[3][0]->Y(),
-                                                 - 0.5*fgkCoolingTubeSupportHeight);   
-  for(Int_t i=0; i<4; i++) 
+  localcoolingtubevect[1] = new TVector3( -localcoolingtubevect[0]->X()+fgkCarbonFiberTriangleLength,
+                                             localcoolingtubevect[0]->Y(),
+                                             localcoolingtubevect[0]->Z());
        for(Int_t j=0; j<2; j++){
-               localcoolingtubetrans[i][j] = 
-                       new TGeoTranslation(localcoolingtubevect[i][j]->X(),
-                                                               localcoolingtubevect[i][j]->Y(),
-                                                               localcoolingtubevect[i][j]->Z());
-               fcoolingtubematrix[i][j] = new TGeoHMatrix((*localcoolingtubetrans[i][j])
+               localcoolingtubetrans[j] = 
+                       new TGeoTranslation(localcoolingtubevect[j]->X(),
+                                                               localcoolingtubevect[j]->Y(),
+                                                               localcoolingtubevect[j]->Z());
+               fcoolingtubematrix[j] = new TGeoHMatrix((*localcoolingtubetrans[j])
                                                          *                                     (*localcoolingtuberot));
        }
   /////////////////////////////////////////////////////////////
@@ -1002,110 +1020,38 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
   TGeoRotation* localendlladdercoolingtuberot = new TGeoRotation();    
   localendlladdercoolingtuberot->SetAngles(0.,90.,0.);
   TGeoTranslation** localendlladdercoolingtubetrans[2];
-  localendlladdercoolingtubetrans[0] = new TGeoTranslation*[6];
-  localendlladdercoolingtubetrans[1] = new TGeoTranslation*[4];
+  localendlladdercoolingtubetrans[0] = new TGeoTranslation*[2];
+  localendlladdercoolingtubetrans[1] = new TGeoTranslation*[2];
   for(Int_t i=0; i<2; i++)     
-       for(Int_t j=0; j<(i==0?6:4); j++)       
+       for(Int_t j=0; j<2; j++)        
                localendlladdercoolingtubetrans[i][j] = new TGeoTranslation();
+
+  Double_t sensZshift = 0.5*fgkCarbonFiberJunctionWidth - fgkCarbonFiberLowerSupportWidth - fgkLowerSupportToSensorZ;
   localendlladdercoolingtubetrans[0][0]->SetTranslation(-(fgkCoolingTubeSupportLength
                                                                        -        fgkCoolingTubeSupportRmax)
                                                                        +        fgkCarbonFiberJunctionLength,
-                                                                         0.5*(fgkEndLadderMountingBlockPosition[0]
-                                                                       -    fgkendladdercoolingsupportdistance[0]),
+                                                       0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[0]+sensZshift),
                                                                        - 0.5*fgkCoolingTubeSupportHeight);
   localendlladdercoolingtubetrans[0][1]->SetTranslation((fgkCoolingTubeSupportLength
                                                                        -        fgkCoolingTubeSupportRmax)
                                                                        -        fgkCarbonFiberJunctionLength
                                                                        +    fgkCarbonFiberTriangleLength,
-                                                                         0.5*(fgkEndLadderMountingBlockPosition[0]
-                                                                       -    fgkendladdercoolingsupportdistance[0]),
+                                                       0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[0]+sensZshift),
                                                                        - 0.5*fgkCoolingTubeSupportHeight);
-  localendlladdercoolingtubetrans[0][2]->SetTranslation(-(fgkCoolingTubeSupportLength
-                                                                       -   fgkCoolingTubeSupportRmax)
-                                                                       +       fgkCarbonFiberJunctionLength,
-                                                                          fgkEndLadderMountingBlockPosition[0]
-                                                                       -   fgkendladdercoolingsupportdistance[0]
-                                                 +                0.5*(fgkendladdercoolingsupportdistance[0]
-                                                 +                             fgkendladdercoolingsupportdistance[1]
-                                                 +                             fgkCoolingTubeSupportWidth),
-                                                                       - 0.5*fgkCoolingTubeSupportHeight);     
-  localendlladdercoolingtubetrans[0][3]->SetTranslation((fgkCoolingTubeSupportLength
-                                                                       -        fgkCoolingTubeSupportRmax)
-                                                                       -        fgkCarbonFiberJunctionLength
-                                                                       +    fgkCarbonFiberTriangleLength,
-                                                                          fgkEndLadderMountingBlockPosition[0]
-                                                                       -   fgkendladdercoolingsupportdistance[0]
-                                                 +                0.5*(fgkendladdercoolingsupportdistance[0]
-                                                 +                             fgkendladdercoolingsupportdistance[1]
-                                                 +                             fgkCoolingTubeSupportWidth),
-                                                                       - 0.5*fgkCoolingTubeSupportHeight);     
-  localendlladdercoolingtubetrans[0][4]->SetTranslation(-(fgkCoolingTubeSupportLength
-                                                                       -   fgkCoolingTubeSupportRmax)
-                                                                       +       fgkCarbonFiberJunctionLength,
-                                                                       fgkEndLadderCarbonFiberLowerJunctionLength[0]
-                                                 - 0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0]
-                                                 -                     fgkEndLadderMountingBlockPosition[0]
-                                                 -                     fgkendladdercoolingsupportdistance[1]           
-                                                 -                     fgkCoolingTubeSupportWidth),
-                                                                       - 0.5*fgkCoolingTubeSupportHeight);      
-  localendlladdercoolingtubetrans[0][5]->SetTranslation((fgkCoolingTubeSupportLength
-                                                                       -        fgkCoolingTubeSupportRmax)
-                                                                       -        fgkCarbonFiberJunctionLength
-                                                                       +    fgkCarbonFiberTriangleLength,
-                                                                       fgkEndLadderCarbonFiberLowerJunctionLength[0]
-                                                 - 0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0]
-                                                 -                     fgkEndLadderMountingBlockPosition[0]
-                                                 -                     fgkendladdercoolingsupportdistance[1]           
-                                                 -                     fgkCoolingTubeSupportWidth),
-                                                                       - 0.5*fgkCoolingTubeSupportHeight);      
+
   localendlladdercoolingtubetrans[1][0]->SetTranslation(-(fgkCoolingTubeSupportLength
-                                                                       -   fgkCoolingTubeSupportRmax)
-                                                                       +       fgkCarbonFiberJunctionLength,
-                                                       - 0.50 * (fgkMountingBlockToSensorSupport
-                                                       - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth)
-                                                       -                 fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1]
-                                                       +                 fgkSSDSensorOverlap
-                                                       +                 fgkEndLadderCarbonFiberLowerJunctionLength[1]
-                                                       -                 fgkendladdercoolingsupportdistance[2]
-                                                       -                 fgkEndLadderMountingBlockPosition[1]
-                                                       -                 fgkCoolingTubeSupportWidth)
-                                                       +                 fgkEndLadderCarbonFiberLowerJunctionLength[1]
-                                                       -                 fgkendladdercoolingsupportdistance[2]
-                                                       -                 fgkCoolingTubeSupportWidth,
+                                                         -   fgkCoolingTubeSupportRmax)
+                                                       +       fgkCarbonFiberJunctionLength,
+                                                       0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1]-sensZshift),
                                                  -             0.5*fgkCoolingTubeSupportHeight);        
   localendlladdercoolingtubetrans[1][1]->SetTranslation((fgkCoolingTubeSupportLength
                                                  -      fgkCoolingTubeSupportRmax)
                                                  -      fgkCarbonFiberJunctionLength
                                                  +    fgkCarbonFiberTriangleLength,
-                                                 - 0.50 * (fgkMountingBlockToSensorSupport
-                                                       - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth)
-                                                       -                 fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1]
-                                                       +                 fgkSSDSensorOverlap
-                                                       +                 fgkEndLadderCarbonFiberLowerJunctionLength[1]
-                                                       -                 fgkendladdercoolingsupportdistance[2]
-                                                       -                 fgkEndLadderMountingBlockPosition[1]
-                                                       -                 fgkCoolingTubeSupportWidth)
-                                                       +                 fgkEndLadderCarbonFiberLowerJunctionLength[1]
-                                                       -                 fgkendladdercoolingsupportdistance[2]
-                                                       -                 fgkCoolingTubeSupportWidth,
+                                                       0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1]-sensZshift),
                                                  -             0.5*fgkCoolingTubeSupportHeight);        
-  localendlladdercoolingtubetrans[1][2]->SetTranslation(-(fgkCoolingTubeSupportLength
-                                                                       -   fgkCoolingTubeSupportRmax)
-                                                                       +       fgkCarbonFiberJunctionLength,
-                                                                               fgkEndLadderCarbonFiberLowerJunctionLength[1]
-                                                                       - 0.5*fgkendladdercoolingsupportdistance[2],
-                                                                       - 0.5*fgkCoolingTubeSupportHeight);      
-  localendlladdercoolingtubetrans[1][3]->SetTranslation((fgkCoolingTubeSupportLength
-                                                                       -        fgkCoolingTubeSupportRmax)
-                                                                       -        fgkCarbonFiberJunctionLength
-                                                                       +    fgkCarbonFiberTriangleLength,
-                                                                               fgkEndLadderCarbonFiberLowerJunctionLength[1]
-                                                                       - 0.5*fgkendladdercoolingsupportdistance[2],
-                                                                       - 0.5*fgkCoolingTubeSupportHeight);      
-  fendladdercoolingtubematrix[0] = new TGeoHMatrix*[6]; 
-  fendladdercoolingtubematrix[1] = new TGeoHMatrix*[4]; 
   for(Int_t i=0; i<2; i++)
-       for(Int_t j=0; j<(i==0?6:4); j++){
+       for(Int_t j=0; j<2; j++){
                fendladdercoolingtubematrix[i][j] = new TGeoHMatrix(*localendlladdercoolingtuberot);
                fendladdercoolingtubematrix[i][j]->MultiplyLeft(localendlladdercoolingtubetrans[i][j]); 
        }
@@ -1128,7 +1074,8 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
                       -                0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
                       -       fgkSSDSensorCenterSupportThickness[0]),
                       -      (fgkSSDModuleCoolingBlockToSensor+0.5*fgkCoolingTubeSupportHeight
-                      -       fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight)); 
+                      -       fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight
+                                         -       fgkSSDModuleVerticalDisalignment)); 
   fhybridmatrix = new TGeoHMatrix();
   for(Int_t i=0; i<khybridmatrixnumber; i++) fhybridmatrix->MultiplyLeft(localhybridtrans[i]);
   /////////////////////////////////////////////////////////////
@@ -1192,7 +1139,8 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
   Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
                             * TMath::DegToRad()*ssdflexradiusmax
                                                               - fgkSSDFlexLength[2]-TMath::Pi()
-                                                              * fgkSSDStiffenerHeight-fgkSSDFlexLength[0];
+                                                              * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
+                                                                                  - 0.1*fgkSSDFlexFullLength;
   Double_t trans = ssdflexboxlength*CosD(2.*fgkSSDFlexAngle)
                             + (ssdflexradiusmax-fgkSSDStiffenerHeight)*SinD(2.*fgkSSDFlexAngle)
                             +      fgkSSDFlexLength[2];
@@ -1374,6 +1322,8 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
   localladdercablerot[1]->SetAngles(90.,60.,-90.);
   localladdercablerot[2]->SetRotation((*localladdercablerot[1])
                                                 *                        (*localladdercablerot[0]));
+  //TGeoRotation* localladdercablerot = new TGeoRotation();    
+  //localladdercablerot->SetAngles(90.,0.,0.);
   ////////////////////////////////////////////
   // LocalLadderCableCombiTransMatrix
   ////////////////////////////////////////////
@@ -1501,22 +1451,20 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
   TGeoTranslation* localssdsensortrans[2];
   for(Int_t i=0; i<2; i++) localssdsensortrans[i] = new TGeoTranslation();
   localssdsensortrans[0]->SetTranslation(0.5*fgkCarbonFiberTriangleLength,
-                                         -             (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
-                              fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
-                      +                0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
-                      -                0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
-                      -       fgkSSDSensorCenterSupportThickness[0])+0.5*fgkSSDSensorLength,
+                                        fgkCarbonFiberJunctionWidth 
+                                        - fgkCarbonFiberLowerSupportWidth 
+                                        - fgkLowerSupportToSensorZ,
                                                        0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight
-                                         -             fgkSSDModuleCoolingBlockToSensor+(fgkSSDSensorSideSupportHeight[1]
+                                         -             fgkSSDModuleCoolingBlockToSensor
+                                         +    (fgkSSDSensorSideSupportHeight[1]
                                          -             fgkSSDSensorSideSupportHeight[0]));
   localssdsensortrans[1]->SetTranslation(0.5*fgkCarbonFiberTriangleLength,
-                                         -        (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
-                              fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
-                      +                0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
-                      -                0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
-                      -       fgkSSDSensorCenterSupportThickness[0])+0.5*fgkSSDSensorLength,
+                                        fgkCarbonFiberJunctionWidth 
+                                        - fgkCarbonFiberLowerSupportWidth 
+                                        - fgkLowerSupportToSensorZ,
                                                    0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight
                                                        -fgkSSDModuleCoolingBlockToSensor);
+
   for(Int_t i=0; i<2; i++) 
        localssdsensorcombitrans[i] = new TGeoCombiTrans(*localssdsensortrans[i],
                                                                                                         *localssdsensorrot);   
@@ -1649,13 +1597,9 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
        delete localcoolingtubesupportrot[i];
        delete localcoolingtubesupportrans[i];
   }
-  for(Int_t i=0; i<4; i++){
-       for(Int_t j=0; j<2; j++){
-               delete localcoolingtubevect[i][j];
-               delete localcoolingtubetrans[i][j];
-       }
-       delete [] localcoolingtubevect[i];
-       delete [] localcoolingtubetrans[i];
+  for(Int_t j=0; j<2; j++){
+    delete localcoolingtubevect[j];
+    delete localcoolingtubetrans[j];
   }
  delete endladdermountingblockrot;
  for(Int_t i=0; i<khybridmatrixnumber; i++) delete localhybridtrans[i];
@@ -1667,8 +1611,8 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){
  }
  delete localendlladdercoolingtuberot;
  for(Int_t i=0; i<2; i++){
-       for(Int_t j=0; j<(i==0?6:4); j++)
-               delete localendlladdercoolingtubetrans[i][j];
+       for(Int_t j=0; j<2; j++)
+         delete localendlladdercoolingtubetrans[i][j];
        delete [] localendlladdercoolingtubetrans[i];
   }
 
@@ -1758,7 +1702,7 @@ void AliITSv11GeometrySSD::CreateBasicObjects(){
   /////////////////////////////////////////////////////////////
   // Carbon Fiber Junction 
   /////////////////////////////////////////////////////////////
-  fcarbonfiberjunction = GetCarbonFiberJunction(fgkCarbonFiberJunctionWidth);
+  fcarbonfiberjunction = GetCarbonFiberJunction(fgkCarbonFiberJunctionWidth-fgkSSDTolerance);
   /////////////////////////////////////////////////////////////
   // Carbon Fiber Lower Support
   /////////////////////////////////////////////////////////////
@@ -1785,7 +1729,7 @@ void AliITSv11GeometrySSD::CreateBasicObjects(){
   /////////////////////////////////////////////////////////////
   // SSD Cooling Tube Support
   /////////////////////////////////////////////////////////////
-  Int_t edgesnumber = 16;
+  Int_t edgesnumber = 3;
   fcoolingtubesupport = GetCoolingTubeSupport(edgesnumber);      
   /////////////////////////////////////////////////////////////
   // SSD Hybrid
@@ -1800,12 +1744,7 @@ void AliITSv11GeometrySSD::CreateBasicObjects(){
    /////////////////////////////////////////////////////////////
   // SSD Cooling Tube
   /////////////////////////////////////////////////////////////
-  TList* coolingtubelist = GetCoolingTubeList();       
-  for(Int_t i=0; i<fgkcoolingtubenumber; i++)  
-       fcoolingtube[i] = (TGeoVolume*)coolingtubelist->At(i);
-  for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++) 
-       fendladdercoolingtube[i] = 
-                       (TGeoVolume*)coolingtubelist->At(fgkcoolingtubenumber+i);
+  CreateCoolingTubes();
   /////////////////////////////////////////////////////////////
   // SSD Flex  
   /////////////////////////////////////////////////////////////
@@ -1819,9 +1758,9 @@ void AliITSv11GeometrySSD::CreateBasicObjects(){
                                                   new TGeoVolume*[fgkendlabbercarbonfiberjunctionumber];
   for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
     fendladdercarbonfiberjunction[i][0] = 
-                 GetCarbonFiberJunction(fgkEndLadderCarbonFiberLowerJunctionLength[i]);
+                 GetCarbonFiberJunction(fgkEndLadderCarbonFiberLowerJunctionLength[i]-fgkSSDTolerance);
     fendladdercarbonfiberjunction[i][1] = 
-                 GetCarbonFiberJunction(fgkEndLadderCarbonFiberUpperJunctionLength[i]);
+                 GetCarbonFiberJunction(fgkEndLadderCarbonFiberUpperJunctionLength[i]-fgkSSDTolerance);
   }
   ///////////////////////////////////
   // End Ladder Mounting Block
@@ -1862,9 +1801,9 @@ void AliITSv11GeometrySSD::SetSSDSensor(){
                                                 0.5*fgkSSDSensorHeight,
                                                 0.5*ssdsensitivelength);
   TGeoVolume* ssdsensorsensitiveLay5 = 
-       new TGeoVolume(fgSDDsensitiveVolName5,ssdsensorsensitiveshape,fSSDSensorMedium);
+       new TGeoVolume(fgSSDsensitiveVolName5,ssdsensorsensitiveshape,fSSDSensorMedium);
   TGeoVolume* ssdsensorsensitiveLay6 = 
-       new TGeoVolume(fgSDDsensitiveVolName6,ssdsensorsensitiveshape,fSSDSensorMedium);
+       new TGeoVolume(fgSSDsensitiveVolName6,ssdsensorsensitiveshape,fSSDSensorMedium);
   ssdsensorsensitiveLay5->SetLineColor(fColorSilicon);
   ssdsensorsensitiveLay6->SetLineColor(fColorSilicon);
   TGeoBBox* ssdsensorinsensitiveshape[2];
@@ -1891,9 +1830,9 @@ void AliITSv11GeometrySSD::SetSSDSensor(){
                                                                                             0.5*fgkSSDSensorWidth,
                                                                                             0.5*fgkSSDSensorHeight,
                                                                                             0.5*fgkSSDSensorLength);
-  fSSDSensor5 = new TGeoVolume("ITSsddSensor5",virtualSSDSensorShape,
+  fSSDSensor5 = new TGeoVolume("ITSssdSensor5",virtualSSDSensorShape,
                                                                                 fSSDAir);      
-  fSSDSensor6 = new TGeoVolume("ITSsddSensor6",virtualSSDSensorShape,
+  fSSDSensor6 = new TGeoVolume("ITSssdSensor6",virtualSSDSensorShape,
                                                                                 fSSDAir);      
   /////////////////////////////////////////////////////////////
   for(Int_t i=0; i<4; i++){ 
@@ -1951,11 +1890,11 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){
   Double_t* param = new Double_t[4]; 
   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());
-  char* carbonfibersupportshapename[kshapesnumber] = 
+    new TVector3((GetReflection(vertexposition[0][j],param))->X(),
+                (GetReflection(vertexposition[0][j],param))->Y());
+  const char* carbonfibersupportshapename[kshapesnumber] = 
                                                {"CarbonFiberSupportShape1","CarbonFiberSupportShape2"};
-  char* carbonfibersupportname[kshapesnumber] = 
+  const char* carbonfibersupportname[kshapesnumber] = 
                                                {"CarbonFiberSupport1","CarbonFiberSupport2"};
   TGeoArb8* carbonfibersupportshape[kshapesnumber]; 
   TGeoVolume* carbonfibersupport[kshapesnumber];
@@ -1992,8 +1931,8 @@ TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunction(Double_t width){
   /////////////////////////////////////////////////////////////
   const Int_t kvertexnumber = 6;
   TGeoXtru* carbonfiberjunctionshape = new TGeoXtru(2);
-  Double_t reflectionparam[3] = {TMath::Tan(fgkCarbonFiberJunctionAngle[0]
-                                                         *  TMath::DegToRad()),-1.,0.};
+  Double_t reflectionparam[4] = {TMath::Tan(fgkCarbonFiberJunctionAngle[0]
+                                           *  TMath::DegToRad()),-1.,0.,0.};
   TVector3* vertex[kvertexnumber];
   vertex[0] = new TVector3();
   vertex[3] = new TVector3(fgkCarbonFiberJunctionEdge[0]
@@ -2054,9 +1993,9 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberLowerSupportList(){
   vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0]);
   vertexposition[1][3] = new TVector3(fgkCarbonFiberTriangleLength,
                                                                fgkCarbonFiberLowerSupportVolumePosition[1]);
-  char* carbonfiberlowersupportshapename[kshapesnumber] = 
+  const char* carbonfiberlowersupportshapename[kshapesnumber] = 
                          {"CarbonFiberLowerSupportShape1","CarbonFiberLowerSupportShape2"};
-  char* carbonfiberlowersupportname[kshapesnumber] = 
+  const char* carbonfiberlowersupportname[kshapesnumber] = 
                          {"CarbonFiberLowerSupport1","CarbonFiberLowerSupport2"};
   TGeoArb8* carbonfiberlowersupportshape[kshapesnumber];
   TGeoVolume* carbonfiberlowersupport[kshapesnumber];
@@ -2129,8 +2068,10 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
   // Vertex Positioning for TGeoXTru
   ///////////////////////////////////////
   TVector3** vertexposition = new TVector3*[kvertexnumber];
-  vertexposition[0] = new TVector3(fgkCoolingTubeSupportRmin*CosD(angle),
-                                                                  fgkCoolingTubeSupportRmin*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));
   vertexposition[1] = new TVector3(fgkCoolingTubeSupportRmax*CosD(angle),
                                                                   fgkCoolingTubeSupportRmax*SinD(angle));
   vertexposition[2] = new TVector3(vertexposition[1]->X(),
@@ -2139,10 +2080,11 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
                                                                   fgkCoolingTubeSupportRmax);
   vertexposition[4] = new TVector3(-vertexposition[1]->X(),
                                                                    vertexposition[1]->Y());
+
   for(Int_t i=0; i<nedges; i++)
        vertexposition[i+5] = 
-               new TVector3(fgkCoolingTubeSupportRmin*CosD(psi+i*(2.*phi/nedges)),
-                                        fgkCoolingTubeSupportRmin*SinD(psi+i*(2.*phi/nedges)));
+               new TVector3(Router*CosD(psi+i*(2.*phi/nedges)),
+                            Router*SinD(psi+i*(2.*phi/nedges)));
   ///////////////////////////////////////////////////////////////////////
   // TGeoXTru Volume definition for Cooling Tube Support Arc Part
   ///////////////////////////////////////////////////////////////////////
@@ -2259,8 +2201,10 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
                                                                                                                                         ymothervertex);
   virtualCoolingTubeSupportShape->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
   virtualCoolingTubeSupportShape->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
-  TGeoVolume* virtualcoolingtubesupport = new TGeoVolume("CoolingTubeSupport",
-                                                                virtualCoolingTubeSupportShape,fSSDAir);
+  /*TGeoVolume* virtualcoolingtubesupport = new TGeoVolume("CoolingTubeSupport",
+    virtualCoolingTubeSupportShape,fSSDAir); */
+  TGeoVolume* virtualcoolingtubesupport = new TGeoVolumeAssembly("CoolingTubeSupport");
+
   ////////////////////////////////////////
   // Positioning Volumes in Virtual Volume
   ////////////////////////////////////////
@@ -2269,18 +2213,18 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
   virtualcoolingtubesupport->AddNode(coolingtubesupportarc,1,coolingtubesupportrot);
   virtualcoolingtubesupport->AddNode(coolingtubesupportbox,1);
   virtualcoolingtubesupport->AddNode(coolingtubesupportseg,1);
-  virtualcoolingtubesupport->AddNode(coolingtubearc[0],1,coolingtubesupportrot);
-  virtualcoolingtubesupport->AddNode(coolingtubearc[1],1,coolingtubesupportrot);
-  virtualcoolingtubesupport->AddNode(coolingtubeseg[0],1);
-  virtualcoolingtubesupport->AddNode(coolingtubeseg[1],1);
+  //virtualcoolingtubesupport->AddNode(coolingtubearc[0],1,coolingtubesupportrot);
+  //virtualcoolingtubesupport->AddNode(coolingtubearc[1],1,coolingtubesupportrot);
+  //virtualcoolingtubesupport->AddNode(coolingtubeseg[0],1);
+  //virtualcoolingtubesupport->AddNode(coolingtubeseg[1],1);
   /////////////////////////////////////////////////////////////
   // Deallocating memory
   /////////////////////////////////////////////////////////////
   delete [] vertexposition;
-  delete xvertexpoints;
-  delete yvertexpoints;
-  delete xvert;
-  delete yvert;
+  delete [] xvertexpoints;
+  delete [] yvertexpoints;
+  delete [] xvert;
+  delete [] yvert;
   for(Int_t i=0; i< kvirtualvertexnumber; i++)
        delete virtualvertex[i];
   /////////////////////////////////////////////////////////////
@@ -2305,109 +2249,118 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
   // Mother Volumes Containers 
   /////////////////////////////////////////////////////////////
   const Int_t kmothernumber = 2;
-  const Int_t kmothervertexnumber = 12;
+  const Int_t kmothervertexnumber = 8;
   Double_t xmothervertex[kmothernumber][kmothervertexnumber]; 
   Double_t ymothervertex[kmothernumber][kmothervertexnumber]; 
-  ///////////////////////
-  // Setting the vertices 
-  ///////////////////////
-  xmothervertex[0][0]  = -0.5*fgkSSDStiffenerLength;
-  xmothervertex[0][1]  = xmothervertex[0][0]; 
-  xmothervertex[0][2]  = fgkSSDFlexLength[0]-0.5*fgkSSDStiffenerLength;
-  xmothervertex[0][3]  = xmothervertex[0][2];
-  xmothervertex[0][4]  = xmothervertex[0][0];
-  xmothervertex[0][5]  = xmothervertex[0][4];
-  xmothervertex[0][6]  = -xmothervertex[0][0];
-  xmothervertex[0][7]  = xmothervertex[0][6];
-  xmothervertex[0][8]  = -xmothervertex[0][2];
-  xmothervertex[0][9]  = xmothervertex[0][8];
-  xmothervertex[0][10] = xmothervertex[0][7];
-  xmothervertex[0][11] = xmothervertex[0][10];
-  for(Int_t i=0; i<kmothervertexnumber; i++) xmothervertex[1][i] = xmothervertex[0][i];
-  for(Int_t i = 0; i<kmothernumber; i++){
-      ymothervertex[i][0]  = -(fgkSSDChipWidth-(0.5*fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist)
-                           + ssdchipcablesradius[i]+fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2]);
-      ymothervertex[i][1]  = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth-fgkSSDFlexWidth[0];
-      ymothervertex[i][2]  = ymothervertex[i][1];
-      ymothervertex[i][3]  = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth;
-      ymothervertex[i][4]  = ymothervertex[i][3];
-      ymothervertex[i][5]  = ymothervertex[i][4]+0.5*fgkSSDStiffenerWidth-ymothervertex[i][0];
-      ymothervertex[i][6]  = ymothervertex[i][5];
-      ymothervertex[i][7]  = 0.5*fgkSSDStiffenerWidth+fgkSSDFlexWidth[0];
-      ymothervertex[i][8]  = ymothervertex[i][7];
-      ymothervertex[i][9]  = 0.5*fgkSSDStiffenerWidth;
-      ymothervertex[i][10] = ymothervertex[i][9];
-      ymothervertex[i][11] = ymothervertex[i][0];
-  }
-  TGeoXtru* ssdhybridmothershape[kmothernumber];
-  TGeoVolume* ssdhybridmother[kmothernumber];
+
+  TGeoVolumeAssembly* ssdhybridassembly[kmothernumber];
+  TGeoVolume* ssdhybridmother[kmothernumber][2];
+
+  TGeoRotation hybridmotherrotR(TGeoRotation("",-90.0,0.0,0.0)*TGeoRotation("",0.0,90.0,0.0)*TGeoRotation("",90.,180.,-90));
+  TGeoRotation hybridmotherrotL(TGeoRotation("",180.,0.0,0.0)*hybridmotherrotR);
+  TGeoRotation *hybridmotherrotInv = new TGeoRotation(hybridmotherrotR.Inverse());
+
   const char* ssdhybridmothername[kmothernumber] = {"SSDHybridMother1","SSDHybridMother2"};
   for(Int_t i=0; i<kmothernumber; i++){
-      ssdhybridmothershape[i] = new TGeoXtru(2);
-      ssdhybridmothershape[i]->DefinePolygon(kmothervertexnumber,xmothervertex[i],
-                                          ymothervertex[i]);
-      ssdhybridmothershape[i]->DefineSection(0,-0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight      
-                                               -fgkSSDChipCablesHeight[i+2]);
-      ssdhybridmothershape[i]->DefineSection(1, 0.5*fgkSSDStiffenerHeight);
-      ssdhybridmother[i] = new TGeoVolume(ssdhybridmothername[i],ssdhybridmothershape[i],
-                                          fSSDAir);
+    xmothervertex[i][0] = -0.5*fgkSSDStiffenerWidth;
+    ymothervertex[i][0] = 0.5*fgkSSDStiffenerHeight;
+    xmothervertex[i][1] = -0.5*fgkSSDStiffenerWidth;
+    ymothervertex[i][1] = -0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight      
+      -fgkSSDChipCablesHeight[i+2];
+    
+    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];
+
+    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];
+
+    xmothervertex[i][6] = 0.5*fgkSSDStiffenerWidth+ssdchipcablesradius[i]+0.3*fgkmm;
+    ymothervertex[i][6] = ymothervertex[i][5];
+    
+    xmothervertex[i][7] = xmothervertex[i][6];
+    ymothervertex[i][7] = 0.5*fgkSSDStiffenerHeight;
+    /*
+    for (Int_t j = 0; j<8; j++) {
+      cout << "vtx " << j << " " <<  xmothervertex[i][j] << " " << ymothervertex[i][j] << endl;
+    }
+    */
+    TGeoXtru *shape = new TGeoXtru(2);
+    shape->DefinePolygon(8,xmothervertex[i],ymothervertex[i]);
+    shape->DefineSection(0,-0.5*fgkSSDStiffenerLength);
+    shape->DefineSection(1,0.5*fgkSSDStiffenerLength);
+    ssdhybridmother[i][0] = new TGeoVolume(TString(ssdhybridmothername[i])+"L",shape,fSSDAir);
+    ssdhybridmother[i][1] = new TGeoVolume(TString(ssdhybridmothername[i])+"R",shape,fSSDAir);
+    ssdhybridassembly[i] = new TGeoVolumeAssembly(ssdhybridmothername[i]);
    }   
   /////////////////////////////////////////////////////////////
   // SSD Stiffener   
   /////////////////////////////////////////////////////////////
   TGeoBBox* ssdstiffenershape = new TGeoBBox("SSDStiffenerShape",
                                              0.5*fgkSSDStiffenerLength,
-                                             0.5*fgkSSDStiffenerWidth,
+                                             0.5*(fgkSSDStiffenerWidth-fgkSSDTolerance),
                                              0.5*fgkSSDStiffenerHeight);
   TGeoVolume* ssdstiffener = new TGeoVolume("SSDStiffener",ssdstiffenershape,
                                             fSSDStiffenerMedium);  
   ssdstiffener->SetLineColor(fColorStiffener); 
-  TGeoTranslation* ssdstiffenertrans[kssdstiffenernumber];
-  for(Int_t i=0; i<kssdstiffenernumber; i++) 
-      ssdstiffenertrans[i] = new TGeoTranslation(0.,i*ssdstiffenerseparation,0.);
-  /////////////////////////////////////////////////////////////
-  // SSD Chip System   
-  /////////////////////////////////////////////////////////////
-  TList* ssdchipsystemlist = GetSSDChipSystem(); 
-  Double_t ssdchipseparation = fgkSSDSensorLength
-                             - 2.*fgkSSDModuleStiffenerPosition[1]
-                             - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
-                             - 0.5*fgkSSDChipWidth);
-  Double_t ssdchipsystemlength = (fgkSSDChipNumber-1)*(fgkSSDChipLength 
-                              +  fgkSSDChipSeparationLength)+fgkSSDChipCablesLength[1];
-  TGeoTranslation* ssdchipsystemtrans = new TGeoTranslation(0.5*fgkSSDChipCablesLength[1]
-                                      - 0.5*ssdchipsystemlength,
-                                        0.5*(ssdstiffenerseparation-ssdchipseparation),
-                                      - 0.5*(fgkSSDChipHeight+fgkSSDStiffenerHeight));         
+
 ////////////////////////////
 // Capacitor 0603-2200 nF
 ///////////////////////////
   const Int_t knapacitor0603number = 5;
   TGeoBBox* capacitor0603shape =  new TGeoBBox("Capacitor0603Shape",
-                                                                                        0.5*fgkSSDCapacitor0603Length,
-                                                                                        0.5*fgkSSDCapacitor0603Width,
-                                                                                        0.5*fgkSSDCapacitor0603Height);
+                                              0.5*fgkSSDCapacitor0603Length,
+                                              0.5*(fgkSSDCapacitor0603Width),
+                                              0.5*fgkSSDCapacitor0603Height);
   TGeoVolume* capacitor0603 = new TGeoVolume("Capacitor0603",capacitor0603shape,
                                              fSSDStiffener0603CapacitorMedium); 
   capacitor0603->SetLineColor(fColorAl);
+
+  TGeoVolume* ssdchip = GetSSDChip();
+
+  const Int_t knedges = 5;
+  TGeoVolume *ssdchipcables[2];
+
   for(Int_t i=0; i<kmothernumber; i++){
+    for(Int_t j=0; j<kssdstiffenernumber; j++){
+      ssdhybridmother[i][j]->AddNode(ssdstiffener,1,hybridmotherrotInv);
+      for(Int_t k=1; k<knapacitor0603number+1; k++){
+       ssdhybridmother[i][j]->AddNode(capacitor0603,k,
+                                      new TGeoCombiTrans("",
+                                                         -0.5*(fgkSSDStiffenerWidth - fgkSSDCapacitor0603Width),
+                                                         -0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height),
+                                                         (k-3.)/6*fgkSSDStiffenerLength,
+                                                         hybridmotherrotInv));
+      }
+    }
+    
+    GetSSDChipCables(ssdchipcables[0],ssdchipcables[1],fgkSSDChipCablesHeight[i+2],knedges);
+    for(Int_t k=0; k<fgkSSDChipNumber; k++){
+      TGeoTranslation *chipcabletrans = new TGeoTranslation("",0.5*fgkSSDStiffenerWidth-fgkSSDChipWidth,
+                                                           - 0.5*fgkSSDStiffenerHeight - fgkSSDChipHeight
+                                                           - fgkSSDChipCablesHeight[i+2],
+                                                           (k+0.5-fgkSSDChipNumber/2)*
+                                                           (fgkSSDChipLength + fgkSSDChipSeparationLength));
+      TGeoCombiTrans *chiptrans = new TGeoCombiTrans("",0.5*(fgkSSDStiffenerWidth-fgkSSDChipWidth),
+                                                    - 0.5*(fgkSSDChipHeight+fgkSSDStiffenerHeight),
+                                                    (k+0.5-fgkSSDChipNumber/2)*(fgkSSDChipLength + fgkSSDChipSeparationLength),
+                                                    hybridmotherrotInv);
       for(Int_t j=0; j<kssdstiffenernumber; j++){
-            ssdhybridmother[i]->AddNode(ssdstiffener,j+1,ssdstiffenertrans[j]);
-            for(Int_t k=1; k<knapacitor0603number+1; k++){
-                  ssdhybridmother[i]->AddNode(capacitor0603,knapacitor0603number*j+k,
-                        new TGeoTranslation((k-3.)/6*fgkSSDStiffenerLength,
-                                             j*ssdstiffenerseparation
-                        +                    0.5*((j==0? 1:-1)*fgkSSDStiffenerWidth
-                        +                    (j==0? -1:+1)*fgkSSDCapacitor0603Width),
-                        -                    0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height)));
-            }
-      } 
-      ssdhybridmother[i]->AddNode((TGeoVolume*)ssdchipsystemlist->At(i),i+1,ssdchipsystemtrans);
-      ssdhybridlist->Add(ssdhybridmother[i]);
+       ssdhybridmother[i][j]->AddNode(ssdchipcables[j],k+1,chipcabletrans);
+       ssdhybridmother[i][j]->AddNode(ssdchip,k+1,chiptrans);
+      }
+    }  
+    // Final placement by assembly
+    ssdhybridassembly[i]->AddNode(ssdhybridmother[i][0],1,new TGeoCombiTrans(TGeoTranslation("",0,0,0),hybridmotherrotL));
+    ssdhybridassembly[i]->AddNode(ssdhybridmother[i][1],1,new TGeoCombiTrans(TGeoTranslation("",0,ssdstiffenerseparation,0),hybridmotherrotR));
+    ssdhybridlist->Add(ssdhybridassembly[i]);
   }    
-/////////////////////////////////////////////////////////////
-// Mother Volume Containing Capacitor Part 
-/////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////
+  // Mother Volume Containing Capacitor Part 
+  /////////////////////////////////////////////////////////////
   const Int_t kcapacitormothernumber = 8;
   Double_t xcapacitorvertex[kcapacitormothernumber];
   Double_t ycapacitorvertex[kcapacitormothernumber];  
@@ -2435,8 +2388,9 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
                                               ycapacitorvertex);
   ssdhybridcapacitormothershape->DefineSection(0,0.5*fgkSSDStiffenerHeight);
   ssdhybridcapacitormothershape->DefineSection(1, 0.5*fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height);
-  TGeoVolume* ssdhybridcapacitormother = new TGeoVolume("SSDHybridCapacitorMother",ssdhybridcapacitormothershape,
-                                          fSSDAir);
+//  TGeoVolume* ssdhybridcapacitormother = new TGeoVolume("SSDHybridCapacitorMother",ssdhybridcapacitormothershape,
+//                                          fSSDAir);
+  TGeoVolumeAssembly* ssdhybridcapacitormother = new TGeoVolumeAssembly("SSDHybridCapacitorMother");
 ////////////////////////////
 // Connector 
 ///////////////////////////
@@ -2513,8 +2467,8 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
                                 - fgkSSDConnectorSeparation;
   Double_t wirey = ssdstiffenerseparation+fgkSSDStiffenerWidth
                                 - 2.*fgkSSDConnectorPosition[1]-fgkSSDConnectorWidth;
-  Double_t ssdwireradius = TMath::Sqrt(TMath::Power(wirex,2.)
-                                        + TMath::Power(wirey,2));
+  Double_t ssdwireradius = TMath::Sqrt(wirex*wirex+wirey*wirey);
+
   Double_t wireangle = TMath::ATan(wirex/wirey);
   TGeoTube *hybridwireshape = new TGeoTube("HybridWireShape", 0., 
                                                fgkSSDWireRadius, 0.5*ssdwireradius);
@@ -2546,7 +2500,6 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
   /////////////////////////////////////////////////////////////
   delete hybridwirecombitrans[0];
   delete hybridwirecombitrans[1];
-  delete ssdchipsystemlist;
   return ssdhybridlist;
   /////////////////////////////////////////////////////////////
 }
@@ -2559,9 +2512,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
   /////////////////////////////////////////////////////////////
   TGeoRotation* localcoolingblockrot = new TGeoRotation();
   localcoolingblockrot->SetAngles(0.,90.,0.);
-  TGeoCombiTrans* localcoolingblockmatrix = 
-       new TGeoCombiTrans(0.,0.5*fgkSSDCoolingBlockWidth,0.,localcoolingblockrot);
-  TGeoTranslation* localcoolingblocktrans;  
+  TGeoCombiTrans localcoolingblockmatrix(0.,0.5*fgkSSDCoolingBlockWidth,0.,localcoolingblockrot);
   TVector3* coolingblocktransvector;
   coolingblocktransvector = new TVector3(fgkSSDModuleSensorSupportDistance
                                                                + fgkSSDCoolingBlockLength,
@@ -2576,23 +2527,19 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
   localcoolingtuberot->SetAngles(0.0,90.0,0.0);
   TGeoTranslation* localcoolingtubetrans = new TGeoTranslation();
   localcoolingtubetrans->SetTranslation(0.5*fgkSSDCoolingBlockLength,
-                                                                               0.5*fgkSSDCoolingBlockWidth,
-                                                                                       fgkSSDCoolingBlockHoleCenter);
-  TGeoCombiTrans* localcoolingtubematrix = new TGeoCombiTrans(*localcoolingtubetrans,
-                                                                                                                         *localcoolingtuberot);
+                                       0.5*fgkSSDCoolingBlockWidth,
+                                       fgkSSDCoolingBlockHoleCenter);
+  TGeoCombiTrans localcoolingtubematrix (*localcoolingtubetrans,*localcoolingtuberot);
   Double_t coolingtubedistance = fgkCoolingTubeSupportRmax-fgkCoolingTubeSupportRmin;
   for(Int_t i=0; i<kcoolingblocktransnumber; i++){
-         for(Int_t j=0; j<kcoolingblocktransnumber; j++){
-               localcoolingblocktrans= 
-                    new TGeoTranslation(i*coolingblocktransvector->X()+2*coolingtubedistance,
-                                                                j*coolingblocktransvector->Y(),
-                                                                - 0.5*(fgkSSDCoolingBlockHoleCenter
-                                                            + fgkCoolingTubeRmax));
-               coolingblockmatrix[2*i+j] = new TGeoHMatrix((*localcoolingblocktrans)
-                                                                *(*localcoolingblockmatrix));
-               coolingtubematrix[2*i+j] = new TGeoHMatrix((*localcoolingblocktrans)
-                                                                *(*localcoolingtubematrix));
-       }
+    for(Int_t j=0; j<kcoolingblocktransnumber; j++){
+      TGeoTranslation localcoolingblocktrans(i*coolingblocktransvector->X()+2*coolingtubedistance,
+                                            j*coolingblocktransvector->Y(),
+                                            - 0.5*(fgkSSDCoolingBlockHoleCenter
+                                                   + fgkCoolingTubeRmax));
+      coolingblockmatrix[2*i+j] = new TGeoHMatrix(localcoolingblocktrans*localcoolingblockmatrix);
+      coolingtubematrix[2*i+j] = new TGeoHMatrix(localcoolingblocktrans*localcoolingtubematrix);
+    }
   }
   /////////////////////////////////////////////////////////////
   // Virtual Volume containing CoolingBlock System   
@@ -2637,47 +2584,21 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
                                                                                           + fgkCoolingTubeRmax));
   coolingsystemothershape->DefineSection(1, 0.5*(fgkSSDCoolingBlockHoleCenter
                                                                                           + fgkCoolingTubeRmax));
-  TGeoVolume* coolingsystemother = new TGeoVolume("CoolingBlockSystem",
-                                                         coolingsystemothershape,fSSDAir);
-  /////////////////////////////////////////////////////////////
-  // SSD Cooling Tube Part 
-  /////////////////////////////////////////////////////////////
-  TGeoTube* coolingtubeshape[fgkcoolingtubenumber];
-  coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                                                0.5*fgkSSDCoolingBlockWidth); 
-  coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                        0.5*fgkSSDCoolingBlockWidth);
-  TGeoVolume* coolingtube[fgkcoolingtubenumber];
-  coolingtube[0] = new TGeoVolume("OuterCoolingTube",coolingtubeshape[0],
-                                                                       fSSDCoolingTubePhynox);
-  coolingtube[1] = new TGeoVolume("InnerCoolingTube",coolingtubeshape[1],
-                                                                       fSSDCoolingTubeWater);
-  coolingtube[0]->SetLineColor(fColorPhynox);
-  coolingtube[1]->SetLineColor(fColorWater);
+  TGeoVolume* coolingsystemother = new TGeoVolumeAssembly("CoolingBlockSystem");
   TGeoVolume* ssdcoolingblock = GetSSDCoolingBlock(30);
   /////////////////////////////////////////////////////////////
   // Adding Cooling block to mother volume
   /////////////////////////////////////////////////////////////
-   for(Int_t i=0; i<kcoolingblocknumber; i++){ 
-       coolingsystemother->AddNode(ssdcoolingblock,i+1,coolingblockmatrix[i]);
-       coolingsystemother->AddNode(coolingtube[0],i+1,coolingtubematrix[i]);
-       coolingsystemother->AddNode(coolingtube[1],i+1,coolingtubematrix[i]);
+  for(Int_t i=0; i<kcoolingblocknumber; i++){ 
+    coolingsystemother->AddNode(ssdcoolingblock,i+1,coolingblockmatrix[i]);
   }
   /////////////////////////////////////////////////////////////
   // Deallocating memory
   /////////////////////////////////////////////////////////////
-       delete coolingblocktransvector;
-    delete localcoolingblocktrans;
-       delete localcoolingblockrot;
-       delete localcoolingblockmatrix;
-       delete localcoolingtubetrans;
-       delete localcoolingtuberot;
-  /////////////////////////////////////////////////////////////
-  // Checking overlaps 
-  /////////////////////////////////////////////////////////////
-       //coolingsystemother->CheckOverlaps(0.01);
-  /////////////////////////////////////////////////////////////
-       return coolingsystemother;
+  delete coolingblocktransvector;
+  delete localcoolingblockrot;
+
+  return coolingsystemother;
 }
 /////////////////////////////////////////////////////////////////////////////////
 TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{
@@ -2758,8 +2679,9 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{
                                                                    ymothervertex);
   ssdflexmothershape->DefineSection(0,-1.5*fgkSSDFlexHeight[0]-2.*fgkSSDFlexHeight[1]);
   ssdflexmothershape->DefineSection(1, 0.5*fgkSSDFlexHeight[0]);
-  TGeoVolume* ssdflexmother = new TGeoVolume("SSDFlexMother",ssdflexmothershape,
-                                                                                        fSSDAir);
+  TGeoVolumeAssembly* ssdflexmother = new TGeoVolumeAssembly("SSDFlexMother");
+//  TGeoVolume* ssdflexmother = new TGeoVolume("SSDFlexMother",ssdflexmothershape,
+//                                                                                      fSSDAir);
   /////////////////////////////////////////////////////////////
   // SSDFlex Layer Shapes
   /////////////////////////////////////////////////////////////
@@ -2788,7 +2710,6 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{
                                         +                                         fgkSSDFlexHeight[1])); 
     ssdflexmother->AddNode(ssdflex[i],1,ssdflextrans[i]);
   }
-  //ssdflexmother->CheckOverlaps(0.01);
   return ssdflexmother;
 }
 /////////////////////////////////////////////////////////////////////////////////
@@ -2801,7 +2722,8 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDEndFlex(){
   Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
                                                * TMath::DegToRad()*ssdflexradiusmax
                                                - fgkSSDFlexLength[2]-TMath::Pi()
-                                               * fgkSSDStiffenerHeight-fgkSSDFlexLength[0];
+                                               * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
+                                                       - 0.1*fgkSSDFlexFullLength;
   const Int_t knedges = 20;  
   const Int_t karcnumber = 2;
   TVector3* vertexposition[karcnumber*(knedges+1)];
@@ -2904,8 +2826,9 @@ for(Int_t i=0; i<karcnumber; i++){
                                                                           xmothervertex,ymothervertex);
   ssdendflexmothershape->DefineSection(0,-0.5*fgkSSDFlexWidth[0]);
   ssdendflexmothershape->DefineSection(1, 0.5*fgkSSDFlexWidth[0]);
-  TGeoVolume* ssdendflexmother = new TGeoVolume("SSDEndFlexMother",
-                                                                ssdendflexmothershape,fSSDAir);        
+//  TGeoVolume* ssdendflexmother = new TGeoVolume("SSDEndFlexMother",
+//                                                              ssdendflexmothershape,fSSDAir);        
+  TGeoVolumeAssembly* ssdendflexmother = new TGeoVolumeAssembly("SSDEndFlexMother");
   //////////////////////////////////////
   // End Flex TGeoXtru Layer Definition 
   //////////////////////////////////////
@@ -2976,6 +2899,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
                         - fgkSSDMountingBlockHeight[0];
   yvertex[6] = yvertex[5];
   yvertex[7] = yvertex[0];
+
   ///////////////////////////////////////////////////////////////////////
   // TGeoXTru Volume definition for Mounting Block Part
   ///////////////////////////////////////////////////////////////////////
@@ -3154,7 +3078,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
   xmothervertex[8] = -0.25*(fgkSSDMountingBlockLength[0]-fgkSSDMountingBlockLength[1]); 
   xmothervertex[9] = xmothervertex[8]; 
   ymothervertex[0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor
-                        +      fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0];
+                              + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0];
   ymothervertex[1] = 0.5*fgkSSDMountingBlockHeight[0]+fgkMountingBlockClipThickness;
   ymothervertex[2] = ymothervertex[1];
   ymothervertex[3] = ymothervertex[2]+(fgkSSDMountingBlockHeight[1]
@@ -3166,6 +3090,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
   ymothervertex[7] = ymothervertex[6]-fgkMountingBlockClipThickness;
   ymothervertex[8] = ymothervertex[7];
   ymothervertex[9] = ymothervertex[0];
+
   ///////////////////////////////////////////////////////////////////////
   // TGeoXTru Volume definition for Mounting Block Clip Part
   ///////////////////////////////////////////////////////////////////////
@@ -3229,7 +3154,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
   Int_t edgesnumber[2] = {50,6};
   Double_t section[2] = {-0.5*(ymothervertex[3]-ymothervertex[2]),
                                                 +0.5*(ymothervertex[3]-ymothervertex[2])};
-  TGeoXtru* clipscrewshape = GetScrewShape(radius,edgesnumber,section);
+  TGeoShape* clipscrewshape = GetScrewShape(radius,edgesnumber,section);
   TGeoVolume* clipscrew = new TGeoVolume("ClipScrewShape",clipscrewshape,fSSDSupportRingAl);
   clipscrew->SetLineColor(12);
   TGeoRotation* screwrot = new TGeoRotation();
@@ -3255,183 +3180,87 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
   return ssdmountingblockclip;
 }
 ///////////////////////////////////////////////////////////////////////////////
-TList* AliITSv11GeometrySSD::GetCoolingTubeList()const{
+void AliITSv11GeometrySSD::CreateCoolingTubes() {
   /////////////////////////////////////////////////////////////
   // Method generating the Cooling Tube 
+  // sets fcoolingtube and returns list for endladdercoolingtube
   /////////////////////////////////////////////////////////////  
-   TGeoTube** coolingtubeshape[fgkcoolingtubenumber];
-   for(Int_t i=0; i<fgkcoolingtubenumber; i++) coolingtubeshape[i] = 
-                                                                                               new     TGeoTube*[2];
-   // Ladder Cooling Tubes
-   coolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                         0.25 * (fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
-                                                 -     2.*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth));
-   coolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                                coolingtubeshape[0][0]->GetDz());
-   coolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                                                0.5*(fgkSSDModuleStiffenerPosition[1]
-                                                 -                                       fgkSSDSensorOverlap));
-   coolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                                coolingtubeshape[1][0]->GetDz());
-   coolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                                                0.5*fgkSSDModuleStiffenerPosition[1]);
-   coolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                                coolingtubeshape[2][0]->GetDz());
-   // End Ladder Cooling Tubes 
-   TGeoTube** endladdercoolingtubeshape[fgkendladdercoolingtubenumber];
-   for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++) 
-       endladdercoolingtubeshape[i] = new      TGeoTube*[2];
-   endladdercoolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                       0.50 * (fgkEndLadderMountingBlockPosition[0]
-                                                 -                     fgkendladdercoolingsupportdistance[0]));
-   endladdercoolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[0][0]->GetDz());
-   endladdercoolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                       0.50 * (fgkendladdercoolingsupportdistance[0]
-                                                 +                     fgkendladdercoolingsupportdistance[1]
-                                                 -                     fgkCoolingTubeSupportWidth));
-   endladdercoolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[1][0]->GetDz());
-   endladdercoolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                       0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0]
-                                                 -                     fgkEndLadderMountingBlockPosition[0]
-                                                 -                     fgkendladdercoolingsupportdistance[1]           
-                                                 -                     fgkCoolingTubeSupportWidth));
-   endladdercoolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[2][0]->GetDz());
-   endladdercoolingtubeshape[3][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                         0.50 * (fgkMountingBlockToSensorSupport
-                                                       - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth)
-                                                       -                 fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1]
-                                                       +                 fgkSSDSensorOverlap
-                                                       +                 fgkEndLadderCarbonFiberLowerJunctionLength[1]
-                                                       -                 fgkendladdercoolingsupportdistance[2]
-                                                       -                 fgkEndLadderMountingBlockPosition[1]
-                                                       -                 fgkCoolingTubeSupportWidth));
-   endladdercoolingtubeshape[3][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[3][0]->GetDz());
-   endladdercoolingtubeshape[4][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                         0.50 * fgkendladdercoolingsupportdistance[2]);
-   endladdercoolingtubeshape[4][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[4][0]->GetDz());
-   // Ladder Cooling Tubes
-   TGeoVolume** coolingtube[fgkcoolingtubenumber];
-   for(Int_t i=0; i<fgkcoolingtubenumber; i++) coolingtube[i] = 
-                                                                                        new TGeoVolume*[2];
-   coolingtube[0][0] = new TGeoVolume("OuterCoolingTube1",coolingtubeshape[0][0],
-                                                                         fSSDCoolingTubePhynox);
-   coolingtube[0][1] = new TGeoVolume("InnerCoolingTube1",coolingtubeshape[0][1],
-                                                                         fSSDCoolingTubeWater);
-   coolingtube[1][0] = new TGeoVolume("OuterCoolingTube2",coolingtubeshape[1][0],
-                                                                         fSSDCoolingTubePhynox);
-   coolingtube[1][1] = new TGeoVolume("InnerCoolingTube2",coolingtubeshape[1][1],
-                                                                         fSSDCoolingTubeWater);
-   coolingtube[2][0] = new TGeoVolume("OuterCoolingTube3",coolingtubeshape[2][0],
-                                                                         fSSDCoolingTubePhynox);
-   coolingtube[2][1] = new TGeoVolume("InnerCoolingTube3",coolingtubeshape[2][1],
-                                                                         fSSDCoolingTubeWater);
-   for(Int_t i=0; i<fgkcoolingtubenumber; i++){
-       coolingtube[i][0]->SetLineColor(fColorPhynox);
-       coolingtube[i][1]->SetLineColor(fColorWater);
-   }
-   // End Ladder Cooling Tubes 
-   TGeoVolume** endladdercoolingtube[fgkendladdercoolingtubenumber];
-   for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++) 
-   endladdercoolingtube[i] = new TGeoVolume*[2];
-   endladdercoolingtube[0][0] = new TGeoVolume("OuterEndLadderCoolingTube1",
-                                                               endladdercoolingtubeshape[0][0],
-                                                               fSSDCoolingTubePhynox);
-   endladdercoolingtube[0][1] = new TGeoVolume("InnerEndlLadderCoolingTube1",
-                                                               endladdercoolingtubeshape[0][1],
-                                                               fSSDCoolingTubeWater);
-   endladdercoolingtube[1][0] = new TGeoVolume("OuterEndLadderCoolingTube2",
-                                                               endladdercoolingtubeshape[1][0],
-                                                               fSSDCoolingTubePhynox);
-   endladdercoolingtube[1][1] = new TGeoVolume("InnerEndlLadderCoolingTube2",
-                                                               endladdercoolingtubeshape[1][1],
-                                                               fSSDCoolingTubeWater);
-   endladdercoolingtube[2][0] = new TGeoVolume("OuterEndLadderCoolingTube3",
-                                                               endladdercoolingtubeshape[2][0],
-                                                               fSSDCoolingTubePhynox);
-   endladdercoolingtube[2][1] = new TGeoVolume("InnerEndlLadderCoolingTube3",
-                                                               endladdercoolingtubeshape[2][1],
-                                                               fSSDCoolingTubeWater);
-   endladdercoolingtube[3][0] = new TGeoVolume("OuterEndLadderCoolingTube4",
-                                                               endladdercoolingtubeshape[3][0],
-                                                               fSSDCoolingTubePhynox);
-   endladdercoolingtube[3][1] = new TGeoVolume("InnerEndlLadderCoolingTube4",
-                                                               endladdercoolingtubeshape[3][1],
-                                                               fSSDCoolingTubeWater);
-   endladdercoolingtube[4][0] = new TGeoVolume("OuterEndLadderCoolingTube5",
-                                                               endladdercoolingtubeshape[4][0],
-                                                               fSSDCoolingTubePhynox);
-   endladdercoolingtube[4][1] = new TGeoVolume("InnerEndlLadderCoolingTube5",
-                                                               endladdercoolingtubeshape[4][1],
-                                                               fSSDCoolingTubeWater);
-   for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++){
-       endladdercoolingtube[i][0]->SetLineColor(fColorPhynox);
-       endladdercoolingtube[i][1]->SetLineColor(fColorWater);
-   }
+  TGeoTube *coolingtubeshape[2];
+  // Ladder Cooling Tubes
+
+  // MvL: Simplified cooling tubes
+  coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,0.5*fgkCoolingTubeLength);
+  coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin,coolingtubeshape[0]->GetDz());
+
+  // End Ladder Cooling Tubes  
+  TGeoTube** endladdercoolingtubeshape[fgkendladdercoolingtubenumber];
+  for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++) 
+    endladdercoolingtubeshape[i] = new TGeoTube*[2];
+
+  Double_t sensZshift = 0.5*fgkCarbonFiberJunctionWidth - fgkCarbonFiberLowerSupportWidth - fgkLowerSupportToSensorZ;
+  endladdercoolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
+                                                0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[0] - sensZshift));
+  endladdercoolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
+                                                endladdercoolingtubeshape[0][0]->GetDz());
+  endladdercoolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
+                                                0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1] + sensZshift));
+  endladdercoolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
+                                                endladdercoolingtubeshape[1][0]->GetDz()-0.5*fgkSSDTolerance);
+  // Ladder Cooling Tubes
+  TGeoVolume* coolingtube[2];
+  coolingtube[0] = new TGeoVolume("OuterCoolingTube1",coolingtubeshape[0], fSSDCoolingTubePhynox);
+  coolingtube[1] = new TGeoVolume("InnerCoolingTube1",coolingtubeshape[1], fSSDCoolingTubeWater);
+  coolingtube[0]->SetLineColor(fColorPhynox);
+  coolingtube[1]->SetLineColor(fColorWater);
+
+  // End Ladder Cooling Tubes  
+  TGeoVolume** endladdercoolingtube[fgkendladdercoolingtubenumber];
+  for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++) 
+    endladdercoolingtube[i] = new TGeoVolume*[2];
+  endladdercoolingtube[0][0] = new TGeoVolume("OuterEndLadderCoolingTube1",
+                                             endladdercoolingtubeshape[0][0],
+                                             fSSDCoolingTubePhynox);
+  endladdercoolingtube[0][1] = new TGeoVolume("InnerEndlLadderCoolingTube1",
+                                             endladdercoolingtubeshape[0][1],
+                                             fSSDCoolingTubeWater);
+  endladdercoolingtube[1][0] = new TGeoVolume("OuterEndLadderCoolingTube2",
+                                             endladdercoolingtubeshape[1][0],
+                                             fSSDCoolingTubePhynox);
+  endladdercoolingtube[1][1] = new TGeoVolume("InnerEndlLadderCoolingTube2",
+                                             endladdercoolingtubeshape[1][1],
+                                             fSSDCoolingTubeWater);
+  for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++){
+    endladdercoolingtube[i][0]->SetLineColor(fColorPhynox);
+    endladdercoolingtube[i][1]->SetLineColor(fColorWater);
+  }
+  
   /////////////////////////////////////////////////////////////
   // Virtual Volume containing Cooling Tubes
   /////////////////////////////////////////////////////////////
   // Ladder Cooling Tubes
-  TGeoTube* virtualcoolingtubeshape[fgkcoolingtubenumber];
-  for(Int_t i=0; i<fgkcoolingtubenumber; i++)
-  virtualcoolingtubeshape[i] = new TGeoTube(coolingtubeshape[i][1]->GetRmin(),
-                                                                                       coolingtubeshape[i][0]->GetRmax(),
-                                                                                       coolingtubeshape[i][0]->GetDz());
-  TGeoVolume* virtualcoolingtube[fgkcoolingtubenumber];
-  virtualcoolingtube[0] = new TGeoVolume("CoolingTube1",virtualcoolingtubeshape[0],
-                                                                         fSSDAir);
-  virtualcoolingtube[1] = new TGeoVolume("CoolingTube2",virtualcoolingtubeshape[1],
-                                                                         fSSDAir);
-  virtualcoolingtube[2] = new TGeoVolume("CoolingTube3",virtualcoolingtubeshape[2],
-                                                                         fSSDAir);
+  TGeoTube* virtualcoolingtubeshape = new TGeoTube(coolingtubeshape[1]->GetRmin(),
+                                                  coolingtubeshape[0]->GetRmax(),
+                                                  coolingtubeshape[0]->GetDz());
+  fcoolingtube = new TGeoVolume("CoolingTube1",virtualcoolingtubeshape, fSSDAir);
+  fcoolingtube->AddNode(coolingtube[0],1);
+  fcoolingtube->AddNode(coolingtube[1],1);
+
   // End Ladder Cooling Tubes
   TGeoTube* endladdervirtualcoolingtubeshape[fgkendladdercoolingtubenumber];
   for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
-  endladdervirtualcoolingtubeshape[i] = new TGeoTube(endladdercoolingtubeshape[i][1]->GetRmin(),
-                                                                                       endladdercoolingtubeshape[i][0]->GetRmax(),
-                                                                                       endladdercoolingtubeshape[i][0]->GetDz());
-  TGeoVolume* endladdervirtualcoolingtube[fgkendladdercoolingtubenumber];
-  endladdervirtualcoolingtube[0] = new TGeoVolume("EndLadderCoolingTube1",
-                                                                         endladdervirtualcoolingtubeshape[0],
-                                                                         fSSDAir);
-  endladdervirtualcoolingtube[1] = new TGeoVolume("EndLadderCoolingTube2",
-                                                                         endladdervirtualcoolingtubeshape[1],
-                                                                         fSSDAir);
-  endladdervirtualcoolingtube[2] = new TGeoVolume("EndLadderCoolingTube3",
-                                                                         endladdervirtualcoolingtubeshape[2],
-                                                                         fSSDAir);
-  endladdervirtualcoolingtube[3] = new TGeoVolume("EndLadderCoolingTube4",
-                                                                         endladdervirtualcoolingtubeshape[3],
-                                                                         fSSDAir);
-  endladdervirtualcoolingtube[4] = new TGeoVolume("EndLadderCoolingTube5",
-                                                                         endladdervirtualcoolingtubeshape[4],
-                                                                         fSSDAir);
-  TList* coolingtubelist = new TList();
-  for(Int_t i=0; i<fgkcoolingtubenumber; i++){
-       virtualcoolingtube[i]->AddNode(coolingtube[i][0],1);
-       virtualcoolingtube[i]->AddNode(coolingtube[i][1],1);
-    coolingtubelist->Add(virtualcoolingtube[i]);
-  }
-       endladdervirtualcoolingtube[0]->AddNode(endladdercoolingtube[0][0],1);
-       endladdervirtualcoolingtube[0]->AddNode(endladdercoolingtube[0][1],1);
-    coolingtubelist->Add(endladdervirtualcoolingtube[0]);
-       endladdervirtualcoolingtube[1]->AddNode(endladdercoolingtube[1][0],1);
-       endladdervirtualcoolingtube[1]->AddNode(endladdercoolingtube[1][1],1);
-    coolingtubelist->Add(endladdervirtualcoolingtube[1]);
-       endladdervirtualcoolingtube[2]->AddNode(endladdercoolingtube[2][0],1);
-       endladdervirtualcoolingtube[2]->AddNode(endladdercoolingtube[2][1],1);
-    coolingtubelist->Add(endladdervirtualcoolingtube[2]);
-       endladdervirtualcoolingtube[3]->AddNode(endladdercoolingtube[3][0],1);
-       endladdervirtualcoolingtube[3]->AddNode(endladdercoolingtube[3][1],1);
-    coolingtubelist->Add(endladdervirtualcoolingtube[3]);
-       endladdervirtualcoolingtube[4]->AddNode(endladdercoolingtube[4][0],1);
-       endladdervirtualcoolingtube[4]->AddNode(endladdercoolingtube[4][1],1);
-    coolingtubelist->Add(endladdervirtualcoolingtube[4]);
-  return coolingtubelist;
+    endladdervirtualcoolingtubeshape[i] = new TGeoTube(endladdercoolingtubeshape[i][1]->GetRmin(),
+                                                      endladdercoolingtubeshape[i][0]->GetRmax(),
+                                                      endladdercoolingtubeshape[i][0]->GetDz());
+  fendladdercoolingtube[0] = new TGeoVolume("EndLadderCoolingTube1",
+                                           endladdervirtualcoolingtubeshape[0],
+                                           fSSDAir);
+  fendladdercoolingtube[1] = new TGeoVolume("EndLadderCoolingTube2",
+                                           endladdervirtualcoolingtubeshape[1],
+                                           fSSDAir);
+  fendladdercoolingtube[0]->AddNode(endladdercoolingtube[0][0],1);
+  fendladdercoolingtube[0]->AddNode(endladdercoolingtube[0][1],1);
+  fendladdercoolingtube[1]->AddNode(endladdercoolingtube[1][0],1);
+  fendladdercoolingtube[1]->AddNode(endladdercoolingtube[1][1],1);  
 }
 ///////////////////////////////////////////////////////////////////////////////
 TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){
@@ -3501,20 +3330,20 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){
   // Deallocating memory
   /////////////////////////////////////////////////////////////
   delete [] vertexposition;
-  delete xvertexpoints;
-  delete yvertexpoints;
+  delete [] xvertexpoints;
+  delete [] yvertexpoints;
   /////////////////////////////////////////////////////////////
   return ssdcoolingblock;
 }
 /////////////////////////////////////////////////////////////////////////////////
-TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth, Int_t nedges){
+void AliITSv11GeometrySSD::GetSSDChipCables(TGeoVolume *&cableL, TGeoVolume *&cableR, Double_t SSDChipCablesHeight, Int_t nedges){
   ///////////////////////////////////////////////////////
-  const Int_t kssdchipcablesnumber    = 2;
-  const Int_t kssdchipcableslaynumber = 2;
-  const Int_t kvertexnumber                      = 4*(nedges+1)+4;
+  static const Int_t kssdchipcablesnumber    = 2;  // Number of cables: left and right
+  static const Int_t kssdchipcableslaynumber = 2;  // Number of layers: Al and Kapton
+  static const Int_t kvertexnumber                       = 4*(nedges+1)+4;
   Int_t ssdchipcablescolor[kssdchipcableslaynumber] = {fColorAl,fColorPolyhamide};
   Double_t ssdchipcablesradius[kssdchipcableslaynumber];
-  ssdchipcablesradius[0] = 0.25*(SSDChipCablesHeigth
+  ssdchipcablesradius[0] = 0.25*(SSDChipCablesHeight
                                                 -  fgkSSDChipCablesHeight[0]
                                                 -  fgkSSDChipCablesHeight[1]);
   ssdchipcablesradius[1] = ssdchipcablesradius[0]-fgkSSDChipCablesHeight[0];
@@ -3555,11 +3384,11 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth,
   TVector3* vertex = new TVector3();
   TVector3* transvector[kssdchipcableslaynumber];
   transvector[0] = new TVector3(fgkSSDChipWidth,
-                                                               SSDChipCablesHeigth-ssdchipcablesradius[0]);
+                                                               SSDChipCablesHeight-ssdchipcablesradius[0]);
   transvector[1] = new TVector3();
-  TGeoXtru* ssdchipcableshape[kssdchipcableslaynumber*kssdchipcableslaynumber];
-  TGeoVolume* ssdchipcable[kssdchipcableslaynumber*kssdchipcableslaynumber];
-  const char* ssdchipcablename[kssdchipcableslaynumber*kssdchipcableslaynumber] = 
+  TGeoXtru* ssdchipcableshape[kssdchipcableslaynumber*kssdchipcablesnumber];
+  TGeoVolume* ssdchipcable[kssdchipcableslaynumber*kssdchipcablesnumber];
+  const char* ssdchipcablename[kssdchipcableslaynumber*kssdchipcablesnumber] = 
                {"SSDChipcableAllay1Left","SSDChipcableKaptonlay2Left",
                 "SSDChipcableAllay1Right","SSDChipcableKaptonlay2Right"};
   for(Int_t k=0; k<kssdchipcablesnumber; k++){
@@ -3568,9 +3397,9 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth,
                                 +               fgkSSDChipCablesHeight[0]
                                 +               fgkSSDChipCablesHeight[1]);  
        for(Int_t i=0; i<kssdchipcableslaynumber; i++){
-               vertexposition[i][0] = new TVector3(0.,SSDChipCablesHeigth
+               vertexposition[i][0] = new TVector3(0.,SSDChipCablesHeight
                                                         - fgkSSDChipCablesHeight[0]-i*fgkSSDChipCablesHeight[1]);
-               vertexposition[i][1] = new TVector3(0.,SSDChipCablesHeigth
+               vertexposition[i][1] = new TVector3(0.,SSDChipCablesHeight
                                                         - i*fgkSSDChipCablesHeight[0]);
                vertexposition[i][2*(nedges+1)+2] = 
                                        new TVector3(fgkSSDChipWidth+ssdchipcablesradius[0]
@@ -3623,34 +3452,38 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth,
   /////////////////////////////////////////////////////////////
   // Mother Volume definition 
   /////////////////////////////////////////////////////////////
-  Double_t ssdchipseparation = fgkSSDSensorLength
-                                                        - 2.*fgkSSDModuleStiffenerPosition[1]
-                                                        - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
-                                                        - 0.5*fgkSSDChipWidth)-fgkSSDChipWidth;
-  Double_t boxorigin[3] = {-0.5*ssdchipseparation,0.,0.5*SSDChipCablesHeigth}; 
-  Double_t dx = ssdchipseparation+2.*(fgkSSDChipWidth+ssdchipcablesradius[0]
-                                                         +fgkSSDChipCablesWidth[1]
-                                                         +fgkSSDChipCablesWidth[2]);
-  Double_t dy = fgkSSDChipCablesLength[1];
-  Double_t dz = SSDChipCablesHeigth;
-  TGeoBBox* ssdchipcablesmotherbox = new TGeoBBox(0.5*dx,0.5*dy,0.5*dz,boxorigin);
-  TGeoVolume* ssdchipcablesmother = new TGeoVolume("SSDChipCablesMother",
-                         ssdchipcablesmotherbox,fSSDAir);
-  /////////////////////////////////////////////////////////////
-  // Rotation and Translation Definition for positioning 
-  /////////////////////////////////////////////////////////////
-  TGeoRotation* ssdchipcablesrot[5];
-  ssdchipcablesrot[0] = new TGeoRotation("",90.,180.,-90);
-  ssdchipcablesrot[1] = new TGeoRotation("",0.0,90.0,0.0);
-  ssdchipcablesrot[2] = new TGeoRotation((*ssdchipcablesrot[1])*(*ssdchipcablesrot[0]));
-  ssdchipcablesrot[3] = new TGeoRotation("",180.,0.0,0.0);
-  ssdchipcablesrot[4] = new TGeoRotation((*ssdchipcablesrot[3])*(*ssdchipcablesrot[2]));
-  TGeoCombiTrans* ssdchipcablescombitrans = new TGeoCombiTrans(-ssdchipseparation,
-                                                                                                               0.,0.,ssdchipcablesrot[2]);
-  ssdchipcablesmother->AddNode(ssdchipcable[0],1,ssdchipcablesrot[4]);
-  ssdchipcablesmother->AddNode(ssdchipcable[1],1,ssdchipcablesrot[4]);
-  ssdchipcablesmother->AddNode(ssdchipcable[2],1,ssdchipcablescombitrans);
-  ssdchipcablesmother->AddNode(ssdchipcable[3],1,ssdchipcablescombitrans);
+  static const Int_t kmothervertexnumber = 8;
+  Double_t xmothervertex[kmothervertexnumber];
+  Double_t ymothervertex[kmothervertexnumber];
+  xmothervertex[0] = xvertexpoints[0][1];
+  ymothervertex[0] = yvertexpoints[0][1];
+  xmothervertex[1] = xvertexpoints[0][2+nedges/2];
+  ymothervertex[1] = yvertexpoints[0][1];
+  xmothervertex[2] = xvertexpoints[0][2+nedges/2];
+  ymothervertex[2] = yvertexpoints[0][2+nedges];
+  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];
+  xmothervertex[5] = xvertexpoints[0][4+2*nedges];
+  ymothervertex[5] = yvertexpoints[0][4+2*nedges];
+  xmothervertex[6] = xvertexpoints[1][5+2*nedges];
+  ymothervertex[6] = yvertexpoints[1][5+2*nedges];
+  xmothervertex[7] = xvertexpoints[0][1];
+  ymothervertex[7] = yvertexpoints[1][5+2*nedges];
+  TGeoXtru *ssdchipcablemothershape = new TGeoXtru(2);
+  ssdchipcablemothershape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex);
+  ssdchipcablemothershape->DefineSection(0,-0.5*fgkSSDChipCablesLength[1]);
+  ssdchipcablemothershape->DefineSection(1,+0.5*fgkSSDChipCablesLength[1]);
+
+  cableL = new TGeoVolume("SSDChipCableMotherLeft",ssdchipcablemothershape,fSSDAir);
+  cableR = new TGeoVolume("SSDChipCableMotherRight",ssdchipcablemothershape,fSSDAir);
+
+  cableL->AddNode(ssdchipcable[0],1);
+  cableL->AddNode(ssdchipcable[1],1);
+  cableR->AddNode(ssdchipcable[2],1);
+  cableR->AddNode(ssdchipcable[3],1);  
+
   /////////////////////////////////////////////////////////////
   // Deallocating memory
   /////////////////////////////////////////////////////////////
@@ -3661,138 +3494,13 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth,
   for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete [] vertexposition[i];
   for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete transvector[i];
   delete vertex; 
-  delete ssdchipcablesrot[0];
-  delete ssdchipcablesrot[1];
-  delete ssdchipcablesrot[3];
   /////////////////////////////////////////////////////////////
-  return ssdchipcablesmother;
 }
-///////////////////////////////////////////////////////////////////////////////
-TList* AliITSv11GeometrySSD::GetSSDChipSystem(){
-  /////////////////////////////////////////////////////////////
-  // SSD Chip Assembly
-  /////////////////////////////////////////////////////////////
-  TGeoVolume* ssdchipassembly = GetSSDChips();
-  TList* ssdchipsystemlist = new TList();
-  const Int_t knedges = 20;
-  const Int_t kchipsystemnumber = 2;
-  /////////////////////////////////////////////////////////////
-  // Mother Volume containing SSDChipSystem
-  /////////////////////////////////////////////////////////////
-  TGeoXtru* chipsystemothershape[kchipsystemnumber];
-  for(Int_t i=0; i<kchipsystemnumber; i++) chipsystemothershape[i] = new TGeoXtru(2);
-  const Int_t kmothervertexnumber = 12;  
-  Double_t xmothervertex[kchipsystemnumber][kmothervertexnumber];
-  Double_t ymothervertex[kchipsystemnumber][kmothervertexnumber];
-  Double_t ssdchipcablesradius[kchipsystemnumber];
-  Double_t ssdchipseparation = fgkSSDSensorLength
-                            - 2.*fgkSSDModuleStiffenerPosition[1]
-                            - 2.*(fgkSSDStiffenerWidth
-                            - fgkSSDStiffenerToChipDist-0.5*fgkSSDChipWidth);
-  for(Int_t i=0; i<kchipsystemnumber; i++)
-       ssdchipcablesradius[i] = 0.25*(fgkSSDChipCablesHeight[i+2]
-                                                  -  fgkSSDChipCablesHeight[0]
-                                                  -  fgkSSDChipCablesHeight[1]);
-  ///////////////////////
-  // Setting the vertices 
-  ///////////////////////
-  xmothervertex[0][0]  = -0.5*fgkSSDChipCablesLength[1];  
-  xmothervertex[0][1]  = xmothervertex[0][0];  
-  xmothervertex[0][2]  = (fgkSSDChipNumber-1)*(fgkSSDChipLength
-                                          + fgkSSDChipSeparationLength)+0.5*fgkSSDChipCablesLength[1];  
-  xmothervertex[0][3]  = xmothervertex[0][2];  
-  xmothervertex[0][4]  = 0.5*fgkSSDChipCablesLength[1];  
-  xmothervertex[0][5]  = xmothervertex[0][4];  
-  xmothervertex[0][6]  = xmothervertex[0][2]-0.5*fgkSSDChipCablesLength[1];  
-  xmothervertex[0][7]  = xmothervertex[0][6]; 
-  xmothervertex[0][8]  = 0.0;  
-  xmothervertex[0][9]  = xmothervertex[0][8];  
-  xmothervertex[0][10] = xmothervertex[0][4];  
-  xmothervertex[0][11] = xmothervertex[0][10];  
-  for(Int_t i=0; i<kmothervertexnumber; i++) 
-       xmothervertex[1][i] = xmothervertex[0][i]; 
-  for(Int_t i=0; i<kchipsystemnumber; i++){
-       ymothervertex[i][0]  = -0.5*fgkSSDChipWidth-ssdchipcablesradius[i]
-                                                - fgkSSDChipCablesWidth[1]-fgkSSDChipCablesWidth[2];
-       ymothervertex[i][1]  = ssdchipseparation-ymothervertex[i][0];
-       ymothervertex[i][2]  = ymothervertex[i][1];
-       ymothervertex[i][3]  = ymothervertex[i][0];
-       ymothervertex[i][4]  = ymothervertex[i][0];
-       ymothervertex[i][5]  = 0.5*fgkSSDChipWidth;
-       ymothervertex[i][6]  = ymothervertex[i][5];
-       ymothervertex[i][7]  = ssdchipseparation-0.5*fgkSSDChipWidth;
-       ymothervertex[i][8]  = ymothervertex[i][7];
-       ymothervertex[i][9]  = ymothervertex[i][5];
-       ymothervertex[i][10] = ymothervertex[i][5];
-       ymothervertex[i][11] = ymothervertex[i][4];
-  }
-  //////////////////////////////////////////////////////////
-  TGeoVolume* chipsystemother[kchipsystemnumber];
-  const char* chipsytemothername[kchipsystemnumber] = 
-                                       {"SSDChipSytemother1","SSDChipSytemother2"};
-  for(Int_t i=0; i<kchipsystemnumber; i++){
-    chipsystemothershape[i]->DefinePolygon(kmothervertexnumber,
-                                                                       xmothervertex[i],ymothervertex[i]);
-    chipsystemothershape[i]->DefineSection(0,-fgkSSDChipCablesHeight[i+2]
-                                                                                 -0.5*fgkSSDChipHeight);
-    chipsystemothershape[i]->DefineSection(1,0.5*fgkSSDChipHeight);
-    chipsystemother[i] = new TGeoVolume(chipsytemothername[i],
-                                                         chipsystemothershape[i],fSSDAir);
-  }
-  /////////////////////////////////////////////////////////////
-  // SSD Chip Cables
-  /////////////////////////////////////////////////////////////
-  TGeoVolume* ssdchipcables[kchipsystemnumber];
-  TGeoRotation** ssdchipcablesrot[kchipsystemnumber];
-  TGeoTranslation** ssdchipcablestrans[kchipsystemnumber];
-  TGeoCombiTrans** ssdchipcablescombitrans[kchipsystemnumber];
-  //////////////////
-  for(Int_t i=0; i<kchipsystemnumber; i++){
-               ssdchipcables[i] = 
-               GetSSDChipCables(fgkSSDChipCablesHeight[i+2],knedges);
-               ssdchipcablestrans[i] = new TGeoTranslation*[fgkSSDChipNumber];
-               ssdchipcablesrot[i] = new TGeoRotation*[fgkSSDChipNumber];
-               ssdchipcablescombitrans[i] = new TGeoCombiTrans*[fgkSSDChipNumber];
-  }
-  for(Int_t i=0; i<kchipsystemnumber; i++){
-       for(Int_t j=0; j<fgkSSDChipNumber; j++){
-               ssdchipcablestrans[i][j] = new TGeoTranslation();
-               ssdchipcablesrot[i][j] = new TGeoRotation();
-               ssdchipcablescombitrans[i][j] = new TGeoCombiTrans();
-               ssdchipcablesrot[i][j]->SetAngles(-90.0,0.0,0.0);
-               ssdchipcablestrans[i][j]->SetTranslation(j*(fgkSSDChipLength
-                                                 +                fgkSSDChipSeparationLength),
-                                                                                       0.5*fgkSSDChipWidth,
-                                                 -                                     0.5*fgkSSDChipHeight
-                                                 -                                     fgkSSDChipCablesHeight[i+2]);
-               ssdchipcablescombitrans[i][j]->SetRotation(*ssdchipcablesrot[i][j]);
-               ssdchipcablescombitrans[i][j]->SetTranslation(*ssdchipcablestrans[i][j]);
-               chipsystemother[i]->AddNode(ssdchipcables[i],j+1,ssdchipcablescombitrans[i][j]);
-
-       }
-       chipsystemother[i]->AddNode(ssdchipassembly,i+1);
-               ssdchipsystemlist->Add(chipsystemother[i]);     
-  }
-  /////////////////////////////////////////////////////////////
-  // Deallocating memory
-  /////////////////////////////////////////////////////////////
-  for(Int_t i=0; i<kchipsystemnumber; i++){
-       for(Int_t j=0; j<fgkSSDChipNumber; j++){
-               delete ssdchipcablesrot[i][j];
-               delete ssdchipcablestrans[i][j];
-       }
-       delete ssdchipcablesrot[i];
-       delete ssdchipcablestrans[i];
-  }
-  /////////////////////////////////////////////////////////////
-  return ssdchipsystemlist;
-}
-///////////////////////////////////////////////////////////////////////////////
-TGeoVolume* AliITSv11GeometrySSD::GetSSDChips() const{
+//_____________________________________________________________________________
+TGeoVolume* AliITSv11GeometrySSD::GetSSDChip() const{
   /////////////////////////////////////////////////////////////
   // SSD Chip Assembly Generation    
   /////////////////////////////////////////////////////////////
-  const Int_t kssdchiprownumber = 2;
   TGeoBBox* ssdchipcompshape[2];
   ssdchipcompshape[0] =  new TGeoBBox("SSDChipCompShape",
                                                                                0.5*fgkSSDChipLength,
@@ -3817,77 +3525,58 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDChips() const{
   TGeoBBox* ssdvirtualchipshape = new TGeoBBox("SSDChipShape",0.5*fgkSSDChipLength,
                                                                                                                 0.5*fgkSSDChipWidth,
                                                                                                                 0.5*fgkSSDChipHeight);
-  TGeoVolume* ssdchip = new TGeoVolume("SSDChip",ssdvirtualchipshape,fSSDAir);  
+  TGeoVolume* ssdchip = new TGeoVolume("SSDChip",ssdvirtualchipshape,fSSDAir);
   /////////////////////////////////////////////////////////////
   for(Int_t i=0; i<2; i++) ssdchip->AddNode(ssdchipcomp[i],1,ssdchipcomptrans[i]);
-  Double_t ssdchipseparation[2] = {fgkSSDChipLength+fgkSSDChipSeparationLength,
-                                                 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
-                                  -  2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
-                                  -  0.5*fgkSSDChipWidth)};
-  /////////////////////////////////////////////////////////////
-  // Virtual Volume containing SSDChipAssembly   
-  /////////////////////////////////////////////////////////////
-  TGeoXtru* ssdchipmothershape = new TGeoXtru(2);
-  const Int_t kssdmothervertexnumber = 2*fgkSSDChipNumber;  
-  Double_t xmothervertex[kssdmothervertexnumber];
-  Double_t ymothervertex[kssdmothervertexnumber];
-  ///////////////////////
-  // Setting the vertices 
-  ///////////////////////
-  xmothervertex[0] = -0.5*fgkSSDChipLength,ymothervertex[0] = -0.5*fgkSSDChipWidth;
-  xmothervertex[1] = xmothervertex[0], ymothervertex[1] = ssdchipseparation[1]
-                                  - ymothervertex[0];
-  xmothervertex[2] = (fgkSSDChipNumber-1)*ssdchipseparation[0]-xmothervertex[0];
-  ymothervertex[2] = ymothervertex[1];
-  xmothervertex[3] = xmothervertex[2], ymothervertex[3] = ymothervertex[0];
-  xmothervertex[4] = ssdchipseparation[0]+xmothervertex[0];
-  ymothervertex[4] = ymothervertex[0];
-  xmothervertex[5] = xmothervertex[4], ymothervertex[5] = -ymothervertex[4];
-  xmothervertex[6] = (fgkSSDChipNumber-1)*ssdchipseparation[0]
-                                  + (0.5*fgkSSDChipLength-fgkSSDChipWidth);
-  ymothervertex[6] = ymothervertex[5];
-  xmothervertex[7] = xmothervertex[6], ymothervertex[7] = ymothervertex[2]
-                                  - fgkSSDChipWidth;
-  xmothervertex[8] = -0.5*fgkSSDChipLength+fgkSSDChipWidth;
-  ymothervertex[8] = ymothervertex[7];
-  xmothervertex[9] = -0.5*fgkSSDChipLength+fgkSSDChipWidth;
-  ymothervertex[9] = ymothervertex[6];
-  xmothervertex[10] = -xmothervertex[0], ymothervertex[10] = ymothervertex[9];
-  xmothervertex[11] = xmothervertex[10], ymothervertex[11] = ymothervertex[0];
-  //////////////////////////////////////////////////////////
-  ssdchipmothershape->DefinePolygon(kssdmothervertexnumber,
-                                                                       xmothervertex,ymothervertex);
-  ssdchipmothershape->DefineSection(0,-0.5*fgkSSDChipHeight);
-  ssdchipmothershape->DefineSection(1, 0.5*fgkSSDChipHeight);
-  TGeoVolume* ssdchipmother = new TGeoVolume("SSDChipContainer",
-                                                         ssdchipmothershape,fSSDAir);
-   /////////////////////////////////////////////////////////////
-  for(Int_t i=0; i<kssdchiprownumber; i++)
-    for(Int_t j=0; j<fgkSSDChipNumber; j++) 
-               ssdchipmother->AddNode(ssdchip,fgkSSDChipNumber*i+j+1,
-               new TGeoTranslation(j*ssdchipseparation[0],i*ssdchipseparation[1],0.));
-  return ssdchipmother;
+  return ssdchip;
 }
 /////////////////////////////////////////////////////////////////////////////////
 TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelength){
   /////////////////////////////////////////////////////////////
   // Method returning a List containing pointers to Ladder Cable Volumes    
+  //
+  // Return list contains 3 assemblies: cable box, cable arb shape and the end part of the cable
+  //                                    each contains 2 volumes, one for polyamide and one for aluminium
   /////////////////////////////////////////////////////////////
   const Int_t kladdercablesegmentnumber = 2;
   /////////////////////////////////////////
   // LadderSegmentBBox Volume
   /////////////////////////////////////////
-  TGeoBBox* laddercablesegmentbboxshape[kladdercablesegmentnumber];
+  static TGeoBBox* laddercablesegmentbboxshape[kladdercablesegmentnumber] = {0,0};
   const char* laddercablesegmentbboxshapename[kladdercablesegmentnumber] = 
                                {"LadderCableSegmentBBoxShape1","LadderCableSegmentBBoxShape2"};
+
+
+  const char* laddercablesegmentbboxname[kladdercablesegmentnumber] = 
+                                                 {"LadderCableSegmentBBox1","LadderCableSegmentBBox2"};
+  static TGeoVolume* laddercablesegmentbbox[kladdercablesegmentnumber];
+
+  static TGeoTranslation* laddercablesegmentbboxtrans[kladdercablesegmentnumber] = {
+                                                  new TGeoTranslation("LadderCableSegmentBBoxTrans1",
+                                                                                          0.5*fgkSSDFlexWidth[0],
+                                                                                          0.5*fgkSSDLadderCableWidth,
+                                                                      0.5*fgkSSDFlexHeight[0]),
+                                                  new TGeoTranslation("LadderCableSegmentBBoxTrans2",
+                                                                                          0.5*fgkSSDFlexWidth[0],
+                                                                                          0.5*fgkSSDLadderCableWidth,
+                                                                                          fgkSSDFlexHeight[0]
+                                                                                          +0.5*fgkSSDFlexHeight[1])
+                                                                                   };
+  static TGeoVolume* laddercablesegmentbboxassembly =                                             new TGeoVolumeAssembly("LadderCableSegmentBBoxAssembly") ;
+  static TGeoVolume* laddercablesegmentarbassembly = 
+                                                  new TGeoVolumeAssembly("LadderCableSegmentArbAssembly"); 
+
+  static TGeoArb8* laddercablesegmentarbshape[kladdercablesegmentnumber];
+  static TGeoVolume* laddercablesegmentarb[kladdercablesegmentnumber];
+
+  if (laddercablesegmentbboxshape[0] == 0) { 
+    // Initialise static shapes and volumes 
   for(Int_t i=0; i<kladdercablesegmentnumber; i++) laddercablesegmentbboxshape[i] = 
                                                  new TGeoBBox(laddercablesegmentbboxshapename[i],
                                                                           0.5*fgkSSDFlexWidth[0],
                                                                           0.5*fgkSSDLadderCableWidth,
                                                                           0.5*fgkSSDFlexHeight[i]); 
-  const char* laddercablesegmentbboxname[kladdercablesegmentnumber] = 
-                                                 {"LadderCableSegmentBBox1","LadderCableSegmentBBox2"};
-  TGeoVolume* laddercablesegmentbbox[kladdercablesegmentnumber];
+
   for(Int_t i=0; i<kladdercablesegmentnumber; i++){ 
                        laddercablesegmentbbox[i] =
                                                  new TGeoVolume(laddercablesegmentbboxname[i],
@@ -3897,20 +3586,7 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen
                        laddercablesegmentbbox[i]->SetLineColor(i==0 ? fColorAl : 
                                                                                                                   fColorPolyhamide);
   }
-  TGeoTranslation* laddercablesegmentbboxtrans[kladdercablesegmentnumber];                                                                               
-  laddercablesegmentbboxtrans[0] = 
-                                                  new TGeoTranslation("LadderCableSegmentBBoxTrans1",
-                                                                                          0.5*fgkSSDFlexWidth[0],
-                                                                                          0.5*fgkSSDLadderCableWidth,
-                                                                                          0.5*fgkSSDFlexHeight[0]);
-  laddercablesegmentbboxtrans[1] = 
-                                                  new TGeoTranslation("LadderCableSegmentBBoxTrans2",
-                                                                                          0.5*fgkSSDFlexWidth[0],
-                                                                                          0.5*fgkSSDLadderCableWidth,
-                                                                                          fgkSSDFlexHeight[0]
-                                                                                          +0.5*fgkSSDFlexHeight[1]);
-  TGeoVolume* laddercablesegmentbboxassembly = 
-                                                  new TGeoVolumeAssembly("LadderCableSegmentBBoxAssembly"); 
+  
   for(Int_t i=0; i<kladdercablesegmentnumber; i++)  
                laddercablesegmentbboxassembly->AddNode(laddercablesegmentbbox[i],1,
                                                                                            laddercablesegmentbboxtrans[i]);
@@ -3935,9 +3611,9 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen
   }
   Double_t laddercablesegmentwidth[2][2] = {{fgkSSDFlexHeight[0],fgkSSDFlexHeight[0]},
                                                                            {fgkSSDFlexHeight[1],fgkSSDFlexHeight[1]}}; 
-  char* laddercablesegmentarbshapename[kladdercablesegmentnumber] = 
+  const char* laddercablesegmentarbshapename[kladdercablesegmentnumber] = 
                                        {"LadderCableSegmentArbShape1","LadderCableSegmentArbShape2"};
-  TGeoArb8* laddercablesegmentarbshape[kladdercablesegmentnumber];
+
   for(Int_t i = 0; i< kladdercablesegmentnumber; i++) laddercablesegmentarbshape[i] = 
                                        GetArbShape(laddercablesegmentvertexposition[i],
                                                                laddercablesegmentwidth[i],
@@ -3945,7 +3621,7 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen
                                                                laddercablesegmentarbshapename[i]);
   const char* laddercablesegmentarbname[kladdercablesegmentnumber] = 
                                                  {"LadderCableSegmentArb1","LadderCableSegmentArb2"};
-  TGeoVolume* laddercablesegmentarb[kladdercablesegmentnumber];
+
   for(Int_t i=0; i<kladdercablesegmentnumber; i++){
                         laddercablesegmentarb[i] =
                                                   new TGeoVolume(laddercablesegmentarbname[i],
@@ -3966,13 +3642,13 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen
                                                         + fgkSSDFlexWidth[0],0.,0.,
                                                   new TGeoRotation((*laddercablesegmentarbrot[1])
                                                     *(*laddercablesegmentarbrot[0])));
-  TGeoVolume* laddercablesegmentarbassembly = 
-                                                  new TGeoVolumeAssembly("LadderCableSegmentArbAssembly"); 
   for(Int_t i=0; i<kladdercablesegmentnumber; i++)
   laddercablesegmentarbassembly->AddNode(laddercablesegmentarb[i],1,
                                                                                   laddercablesegmentarbcombitrans);
+  }  // End of static initialisations
 /////////////////////////////////////////
 // End Ladder Cable Volume
+// Note: this part depends explicitly on the length passed as an argument to the function
 /////////////////////////////////////////
   TGeoBBox* ladderendcablesegmentbboxshape[kladdercablesegmentnumber];
   const char* ladderendcablesegmentbboxshapename[kladdercablesegmentnumber] = 
@@ -4017,11 +3693,13 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen
   laddercablesegmentlist->Add(laddercablesegmentarbassembly);
   laddercablesegmentlist->Add(ladderendcablesegmentbboxassembly);
   return laddercablesegmentlist;
-  }
+}
+
 /////////////////////////////////////////////////////////////////////////////////
 TGeoVolume* AliITSv11GeometrySSD::GetLadderCable(Int_t n, Double_t ssdendladdercablelength){
   /////////////////////////////////////////////////////////////
-  // Method generating Ladder Cable Volumes Assemblies    
+  // Method generating Ladder Cable of given length (n modules + end)
+  // Called by GetLadderCableAssembly
   /////////////////////////////////////////////////////////////
   TList* laddercablesegmentlist = GetLadderCableSegment(ssdendladdercablelength);
   TGeoVolume* laddercable = new TGeoVolumeAssembly("LadderCable"); 
@@ -4031,38 +3709,43 @@ TGeoVolume* AliITSv11GeometrySSD::GetLadderCable(Int_t n, Double_t ssdendladderc
                                                        fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
                                                        i*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
     laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(0),i+1,laddercabletrans);  
-       if(i!=n-1) laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(1),i+1,laddercabletrans);  
+    if(i!=n-1) laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(1),i+1,laddercabletrans);  
   }
   TGeoTranslation* endladdercabletrans = new TGeoTranslation("EndLadderCableTrans",
                                          (n-1)*fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0],
-                                                                fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
-                                         (n-1)*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
+                                                            fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
+                                                            (n-1)*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
   laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(2),1,endladdercabletrans);
   return laddercable;
 }
 /////////////////////////////////////////////////////////////////////////////////
 TGeoVolume* AliITSv11GeometrySSD::GetLadderCableAssembly(Int_t n, Double_t ssdendladdercablelength){
-  /////////////////////////////////////////////////////////////
-  // Method generating Ladder Cable Volumes Assembly   
-  /////////////////////////////////////////////////////////////
-  TGeoVolume* laddercableassembly = new TGeoVolumeAssembly("LadderCableAssembly");
-  char laddercabletransname[30];
+  ///////////////////////////////////////////////////////////////////
+  // Main method generating Ladder Cable bundles containing n cables
+  ///////////////////////////////////////////////////////////////////
+  Double_t totalLength = ssdendladdercablelength+(n-1)*fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0];
+  Double_t cableOrig[3] = {0.5*totalLength,1.5*fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],0.5*n*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1])};
+  TGeoBBox *laddercableshape = new TGeoBBox(0.5*totalLength,0.5*fgkSSDLadderCableWidth,0.5*n*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]),cableOrig);
+  TGeoVolume* laddercable = new TGeoVolume("LadderCableMother", laddercableshape, fSSDAir);
+  char laddercabletransname[100];
   for(Int_t i=0; i<n; i++){ 
        sprintf(laddercabletransname,"LadderCableTrans%i",i+1);
-    laddercableassembly->AddNode(GetLadderCable(n-i,ssdendladdercablelength),i+1,
-       new TGeoTranslation(laddercabletransname,i*fgkCarbonFiberJunctionWidth,0.,0.));
+       laddercable->AddNode(GetLadderCable(n-i,ssdendladdercablelength),i+1,
+                            new TGeoTranslation(laddercabletransname,i*fgkCarbonFiberJunctionWidth,0,0));
   }
-  return laddercableassembly;
+  return laddercable;
 }
 /////////////////////////////////////////////////////////////////////////////////
 TList* AliITSv11GeometrySSD::GetLadderCableAssemblyList(Int_t n, Double_t ssdendladdercablelength){
   /////////////////////////////////////////////////////////////
   // Method generating Ladder Cable List Assemblies  
+  // containing two cables bundles, i.e. P+N readout for one endcap
   /////////////////////////////////////////////////////////////  
-  const Int_t kladdercableassemblynumber = 2;
+  const Int_t kladdercableassemblynumber = 2; 
   TGeoVolume* laddercableassembly = GetLadderCableAssembly(n,ssdendladdercablelength);
   TGeoVolume* ladderCable[kladdercableassemblynumber];
-  char laddercableassemblyname[30];
+  char laddercableassemblyname[100];
   TList* laddercableassemblylist = new TList();
   for(Int_t i=0; i<kladdercableassemblynumber; i++){ 
        sprintf(laddercableassemblyname,"LadderCableAssembly%i",i+1);
@@ -4083,6 +3766,19 @@ void AliITSv11GeometrySSD::SetLadderSegment(){
   /////////////////////////////////////////////////////////////
   fladdersegment[0] = new TGeoVolumeAssembly("LadderSegment1");        
   fladdersegment[1] = new TGeoVolumeAssembly("LadderSegment2");        
+
+  /* MvL: tried to create mother volume. Requires changes in all rotations, bc xtru is always along z-axis
+  TGeoXtru *laddersegmentshape = new TGeoXtru(2);
+  static const Int_t ntrianglevtx = 3;
+  Double_t xtrianglevtx[ntrianglevtx]={-0.5*fgkCarbonFiberTriangleLength,fgkCarbonFiberTriangleLength, 0};
+  Double_t ytrianglevtx[ntrianglevtx]={0, 0, fgkCarbonFiberTriangleLength * TMath::Sin(fgkCarbonFiberTriangleAngle*TMath::DegToRad())};
+  laddersegmentshape->DefinePolygon(ntrianglevtx,xtrianglevtx,ytrianglevtx);
+  laddersegmentshape->DefineSection(0,0);
+  laddersegmentshape->DefineSection(1,fgkCarbonFiberJunctionWidth);  // MVL
+  fladdersegment[0] = new TGeoVolume("LadderSegment1",laddersegmentshape,fSSDAir);     
+  fladdersegment[1] = new TGeoVolume("LadderSegment2",laddersegmentshape,fSSDAir);     
+  */
+
   if(!fCreateMaterials) CreateMaterials();
   if(!fTransformationMatrices) CreateTransformationMatrices();
   if(!fBasicObjects) CreateBasicObjects();
@@ -4095,16 +3791,18 @@ void AliITSv11GeometrySSD::SetLadderSegment(){
                                                                                        fcarbonfibersupportmatrix[j]);
   }
   // Placing Carbon Fiber Junction
-    for(Int_t j=0; j<fgkcarbonfiberjunctionumber; j++)
+       for(Int_t j=0; j<fgkcarbonfiberjunctionumber; j++) {
         fladdersegment[i]->AddNode(fcarbonfiberjunction,j+1,
                                                                   fcarbonfiberjunctionmatrix[j]);
+  }
   // Placing Carbon Fiber Lower Support
-       for(Int_t j=0; j<fgkcarbonfiberlowersupportnumber; j++)
+    for(Int_t j=0; j<fgkcarbonfiberlowersupportnumber; j++) {
                fladdersegment[i]->AddNode(fcarbonfiberlowersupport[j],j+1,
                                                           fcarbonfiberlowersupportrans[j]);    
+    }
   // Placing SSD Sensor Support
     for(Int_t j=0; j<fgkssdsensorsupportnumber; j++) 
-       fladdersegment[i]->AddNode(j<2 ? fssdsensorsupport[0][i] :
+        fladdersegment[i]->AddNode(j<2 ? fssdsensorsupport[0][i] :
                                                                     fssdsensorsupport[1][i],
                                                           j+1,fssdsensorsupportmatrix[j]);
   // Placing SSD Cooling Tube Support 
@@ -4112,11 +3810,8 @@ void AliITSv11GeometrySSD::SetLadderSegment(){
                fladdersegment[i]->AddNode(fcoolingtubesupport,j+1,
                                                                   fcoolingtubesupportmatrix[j]);
   // Placing SSD Cooling Tube  
-       for(Int_t j=0; j<2; j++)
-               for(Int_t k=0; k<2; k++){
-               fladdersegment[i]->AddNode(fcoolingtube[0],2*j+k+1,fcoolingtubematrix[j][k]);
-               fladdersegment[i]->AddNode(fcoolingtube[j+1],k+1,fcoolingtubematrix[2+j][k]);
-               }
+       fladdersegment[i]->AddNode(fcoolingtube,1,fcoolingtubematrix[0]);
+       fladdersegment[i]->AddNode(fcoolingtube,2,fcoolingtubematrix[1]);
   // Placing SSD Hybrid
     switch(i){
        case 0: 
@@ -4129,12 +3824,12 @@ void AliITSv11GeometrySSD::SetLadderSegment(){
                break;
        }
        // Placing Cooling Block System
-    fladdersegment[i]->AddNode(fssdcoolingblocksystem,1,fcoolingblocksystematrix);
+      fladdersegment[i]->AddNode(fssdcoolingblocksystem,1,fcoolingblocksystematrix);
        // Placing SSD Flex
-       for(Int_t j=0; j<fgkflexnumber; j++){
-      fladdersegment[i]->AddNode(fssdstiffenerflex,j+1,fstiffenerflexmatrix[j]);
-      fladdersegment[i]->AddNode(fssdendflex,j+1,fendflexmatrix[j]);
-       }
+      for(Int_t j=0; j<fgkflexnumber; j++){
+       fladdersegment[i]->AddNode(fssdstiffenerflex,j+1,fstiffenerflexmatrix[j]);
+       fladdersegment[i]->AddNode(fssdendflex,j+1,fendflexmatrix[j]);
+      }
    }
 }
 ///////////////////////////////////////////////////////////////////////////////
@@ -4171,45 +3866,37 @@ void AliITSv11GeometrySSD::SetEndLadderSegment(){
   /////////////////////////////////////////////////////////////
   for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
        fendladdersegment[i]->AddNode(fendladdermountingblock,i+1,
-                                                                        fendladdermountingblockcombitrans[i]);
+                                    fendladdermountingblockcombitrans[i]);
   /////////////////////////////////////////////////////////////
-  // End Ladder Mounting Block
+  // End Ladder Mounting Block Clip
   /////////////////////////////////////////////////////////////
   for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
        for(Int_t j=0; j<2; j++)
-               fendladdersegment[i]->AddNode(fendladdermountingblockclip,i+1,
-                                                                        fendladdermountingblockclipmatrix[i][j]);
+               fendladdersegment[i]->AddNode(fendladdermountingblockclip,j+1,
+                                             fendladdermountingblockclipmatrix[i][j]);
   /////////////////////////////////////////////////////////////
   // End Ladder Lower Supports
   /////////////////////////////////////////////////////////////
   fendladdersegment[0]->AddNode(fcarbonfiberlowersupport[0],1,
-                                                               fendladderlowersupptrans[0]);
+                               fendladderlowersupptrans[0]);
   fendladdersegment[1]->AddNode(fcarbonfiberlowersupport[0],2,
-                                                               fendladderlowersupptrans[1]);
+                               fendladderlowersupptrans[1]);
   fendladdersegment[1]->AddNode(fcarbonfiberlowersupport[0],3,
-                                                               fendladderlowersupptrans[2]);
+                               fendladderlowersupptrans[2]);
   /////////////////////////////////////////////////////////////
   // End Ladder Cooling Tube Support
   /////////////////////////////////////////////////////////////
   for(Int_t i=0; i<2; i++) 
        for(Int_t j=0; j<(i==0?4:2); j++)   
-               fendladdersegment[i]->AddNode(fcoolingtubesupport,
-                                                                         j+1,fendladdercoolingtubesupportmatrix[i][j]);
+               fendladdersegment[i]->AddNode(fcoolingtubesupport,j+1,
+                                             fendladdercoolingtubesupportmatrix[i][j]);
   /////////////////////////////////////////////////////////////
   // End Ladder Cooling Tube Support
   /////////////////////////////////////////////////////////////
-  fendladdersegment[0]->AddNode(fendladdercoolingtube[0],1,fendladdercoolingtubematrix[0][0]);                                                                   
-  fendladdersegment[0]->AddNode(fendladdercoolingtube[0],2,fendladdercoolingtubematrix[0][1]);                                                                   
-  fendladdersegment[0]->AddNode(fendladdercoolingtube[1],1,fendladdercoolingtubematrix[0][2]);                                                                   
-  fendladdersegment[0]->AddNode(fendladdercoolingtube[1],2,fendladdercoolingtubematrix[0][3]);                                                                   
-  fendladdersegment[0]->AddNode(fendladdercoolingtube[2],1,fendladdercoolingtubematrix[0][4]);                                                                   
-  fendladdersegment[0]->AddNode(fendladdercoolingtube[2],2,fendladdercoolingtubematrix[0][5]);                                                                   
-  fendladdersegment[1]->AddNode(fendladdercoolingtube[3],1,fendladdercoolingtubematrix[1][0]);                                                                   
-  fendladdersegment[1]->AddNode(fendladdercoolingtube[3],2,fendladdercoolingtubematrix[1][1]);                                                                   
-  fendladdersegment[1]->AddNode(fendladdercoolingtube[4],1,fendladdercoolingtubematrix[1][2]);                                                                   
-  fendladdersegment[1]->AddNode(fendladdercoolingtube[4],2,fendladdercoolingtubematrix[1][3]);                                                                   
- // fendladdersegment[0]->CheckOverlaps(0.01);
- // fendladdersegment[1]->CheckOverlaps(0.01);
+  fendladdersegment[0]->AddNode(fendladdercoolingtube[0],1,fendladdercoolingtubematrix[0][0]); 
+  fendladdersegment[0]->AddNode(fendladdercoolingtube[0],2,fendladdercoolingtubematrix[0][1]);
+  fendladdersegment[1]->AddNode(fendladdercoolingtube[1],1,fendladdercoolingtubematrix[1][0]);
+  fendladdersegment[1]->AddNode(fendladdercoolingtube[1],2,fendladdercoolingtubematrix[1][1]); 
 }
 ///////////////////////////////////////////////////////////////////////////////
 void AliITSv11GeometrySSD::SetLadder(){
@@ -4252,16 +3939,119 @@ void AliITSv11GeometrySSD::SetLadder(){
        xmothervertex[1][i] = xmothervertex[0][i];
        ymothervertex[1][i] = ymothervertex[0][i];
   }
+///////////////////////////////////////////////////////////////////////////
+// Disalignement Mother Volume corrections 25/08/08
+///////////////////////////////////////////////////////////////////////////
+  TGeoXtru* leftladdershape1[fgkladdernumber]; 
+  TGeoXtru* leftladdershape2[fgkladdernumber]; 
+  TGeoXtru* centersensorladdershape[fgkladdernumber];  
+  TGeoXtru* rightladdershape1[fgkladdernumber];        
+  TGeoXtru* rightladdershape2[fgkladdernumber];        
+  for(Int_t i=0; i<fgkladdernumber; i++){
+    leftladdershape1[i] = new TGeoXtru(2);
+    leftladdershape2[i] = new TGeoXtru(2);
+    centersensorladdershape[i] = new TGeoXtru(2);
+    rightladdershape1[i] = new TGeoXtru(2);
+    rightladdershape2[i] = new TGeoXtru(2);
+  }
+  //////////////////////////////////////
+  // Setting the names for shapes  
+  //////////////////////////////////////
+  leftladdershape1[0]->SetName("Lay5Left1LadderSegmentContainer");
+  leftladdershape2[0]->SetName("Lay5Left2LadderSegmentContainer");
+  leftladdershape1[1]->SetName("Lay6Left1LadderSegmentContainer");
+  leftladdershape2[1]->SetName("Lay6Left2LadderSegmentContainer");
+  centersensorladdershape[0]->SetName("Lay5CenterSensorContainer");
+  centersensorladdershape[1]->SetName("Lay6CenterSensorContainer");
+  rightladdershape1[0]->SetName("Lay5Right1LadderSegmentContainer");
+  rightladdershape2[0]->SetName("Lay5Right2LadderSegmentContainer");
+  rightladdershape1[1]->SetName("Lay6Right1LadderSegmentContainer");
+  rightladdershape2[1]->SetName("Lay6Right2LadderSegmentContainer");
+  //////////////////////////////////////
+  Double_t xend1laddervertex[fgkladdernumber][kmothervertexnumber];
+  Double_t yend1laddervertex[fgkladdernumber][kmothervertexnumber];
+  Double_t xcentersensorvertex[fgkladdernumber][kmothervertexnumber];
+  Double_t ycentersensorvertex[fgkladdernumber][kmothervertexnumber];
+  Double_t xend2laddervertex[fgkladdernumber][kmothervertexnumber];
+  Double_t yend2laddervertex[fgkladdernumber][kmothervertexnumber];
+  for(Int_t i=0; i<fgkladdernumber; i++) {
+    for(Int_t j=0; j<kmothervertexnumber; j++){
+      xcentersensorvertex[i][j] = xmothervertex[i][j];
+      ycentersensorvertex[i][j] = ymothervertex[i][j];
+      xend1laddervertex[i][j] = xmothervertex[i][j];
+      yend1laddervertex[i][j] = ymothervertex[i][j];
+      xend2laddervertex[i][j] = xmothervertex[i][j];
+      yend2laddervertex[i][j] = ymothervertex[i][j];
+    }
+    // Add some space around sensors to accommodate misalignments
+    xcentersensorvertex[i][0] -= fgkSSDModuleSideDisalignment; 
+    xcentersensorvertex[i][1] =  xcentersensorvertex[0][0];
+    xcentersensorvertex[i][6] = -xcentersensorvertex[0][1];
+    xcentersensorvertex[i][7] = -xcentersensorvertex[0][0];
+    
+    ycentersensorvertex[i][0] -= fgkSSDModuleVerticalDisalignment;     
+    ycentersensorvertex[i][7] = ycentersensorvertex[0][0];
+    
+    // Center Ladder Piece
+    centersensorladdershape[i]->DefinePolygon(kmothervertexnumber,xcentersensorvertex[i],
+                                             ycentersensorvertex[i]);
+    centersensorladdershape[i]->DefineSection(0, - fgkEndLadderCarbonFiberLowerJunctionLength[1]
+                                                + 1.45*fgkSSDMountingBlockWidth);
+    centersensorladdershape[i]->DefineSection(1,   ssdlaysensorsnumber[i] * fgkCarbonFiberJunctionWidth
+                                                + fgkEndLadderCarbonFiberLowerJunctionLength[0]
+                                                - 2.4*fgkSSDMountingBlockWidth);
+
+    // Left and Right Ladder Pieces: Mother volumes around ladder mounting areas 
+
+    // Cuts off first corner (neg x)
+    xend1laddervertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];
+    xend1laddervertex[i][1] = -0.5*fgkSSDMountingBlockLength[0];
+    // Cuts off last part (pos x)
+    xend2laddervertex[i][6] = 0.5*fgkSSDMountingBlockLength[0];
+    xend2laddervertex[i][7] = 0.5*fgkSSDMountingBlockLength[0];
+
+    leftladdershape1[i]->DefinePolygon(kmothervertexnumber,xend1laddervertex[i],  
+                                      yend1laddervertex[i]);
+    leftladdershape1[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]);
+    leftladdershape1[i]->DefineSection(1,  fendladdersegmentmatrix[0][i]->GetTranslation()[2]    
+                                        - fgkEndLadderMountingBlockPosition[0]);
+    
+    leftladdershape2[i]->DefinePolygon(kmothervertexnumber,xend2laddervertex[i],  
+                                      yend2laddervertex[i]);
+    leftladdershape2[i]->DefineSection(0,  fendladdersegmentmatrix[0][i]->GetTranslation()[2]    
+                                        - fgkEndLadderMountingBlockPosition[0]); 
+    leftladdershape2[i]->DefineSection(1,- fgkEndLadderCarbonFiberLowerJunctionLength[1] 
+                                      + 1.45*fgkSSDMountingBlockWidth);  // connect to main volume at -1.6725 cm
+
+    rightladdershape1[i]->DefinePolygon(kmothervertexnumber,xend1laddervertex[i],
+                                       yend1laddervertex[i]);
+    rightladdershape1[i]->DefineSection(0,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
+                                       +fgkEndLadderCarbonFiberLowerJunctionLength[0]
+                                       -2.4*fgkSSDMountingBlockWidth);
+    rightladdershape1[i]->DefineSection(1,fendladdersegmentmatrix[1][i]->GetTranslation()[2]
+                                       + fgkEndLadderMountingBlockPosition[1]);
+
+    rightladdershape2[i]->DefinePolygon(kmothervertexnumber,xend2laddervertex[i],
+                                       yend2laddervertex[i]);
+    rightladdershape2[i]->DefineSection(0, fendladdersegmentmatrix[1][i]->GetTranslation()[2]
+                                          + fgkEndLadderMountingBlockPosition[1]);
+    rightladdershape2[i]->DefineSection(1,  ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
+                                         + fgkEndLadderCarbonFiberLowerJunctionLength[0]);
+  }
+  TGeoCompositeShape* laddershapecontainer[2];
+  laddershapecontainer[0] = new TGeoCompositeShape("Lay5LadderCompositeShape",
+                                                  "Lay5Left1LadderSegmentContainer+Lay5Left2LadderSegmentContainer"
+                                                  "+Lay5CenterSensorContainer"
+                                                  "+Lay5Right1LadderSegmentContainer+Lay5Right2LadderSegmentContainer");
+  laddershapecontainer[1] = new TGeoCompositeShape("Lay6LadderCompositeShape",
+                                                  "Lay6Left1LadderSegmentContainer+Lay6Left2LadderSegmentContainer"
+                                                  "+Lay6CenterSensorContainer"
+                                                  "+Lay6Right1LadderSegmentContainer+Lay6Right2LadderSegmentContainer");
   const char* laddername[fgkladdernumber] = {"ITSssdLay5Ladd","ITSssdLay6Ladd"};
   for(Int_t i=0; i<fgkladdernumber; i++){
-       laddershape[i]->DefinePolygon(kmothervertexnumber,xmothervertex[i],
-                                                                   ymothervertex[i]);
-    laddershape[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]);
-    laddershape[i]->DefineSection(1,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
-                                                                                       +fgkEndLadderCarbonFiberLowerJunctionLength[0]);
-    fladder[i] = new TGeoVolume(laddername[i],laddershape[i],fSSDAir);
-       fladder[i]->SetLineColor(4);
- }
+    fladder[i] = new TGeoVolume(laddername[i],laddershapecontainer[i],fSSDAir);
+    fladder[i]->SetLineColor(4);
+  }
 ///////////////////////////////////////////////////////////////////////////
  if(!fCreateMaterials) CreateMaterials();
  if(!fTransformationMatrices) CreateTransformationMatrices();
@@ -4279,13 +4069,14 @@ void AliITSv11GeometrySSD::SetLadder(){
        //////////////////////////                                              
        /// Placing SSD Sensor
        //////////////////////////              
+        if(i==0&&ssdlaysensorsnumber[i]-j-1==13) fSSDSensor5->SetLineColor(kRed);
                fladder[i]->AddNode(i==0?fSSDSensor5:fSSDSensor6,ssdlaysensorsnumber[i]-j-1,
                                                        fssdsensormatrix[i][j]);
        }
        ///////////////////////////////                                         
        /// Placing End Ladder Segment
        ///////////////////////////////         
-    fladder[i]->AddNode(fendladdersegment[0],1,fendladdersegmentmatrix[0][i]);
+       fladder[i]->AddNode(fendladdersegment[0],1,fendladdersegmentmatrix[0][i]);
        fladder[i]->AddNode(fendladdersegment[1],1,fendladdersegmentmatrix[1][i]);
    }
 /////////////////////////////////////////////////////////////////////////////                                          
@@ -4329,16 +4120,16 @@ void AliITSv11GeometrySSD::SetLadder(){
                                                         + fgkEndLadderCarbonFiberLowerJunctionLength[0]-0.000001*kendladdercablecorrection;
   TList* laddercableassemblylist[4];
   const Int_t kendladdercablesnumber = 4;
+  TGeoRotation *laddercablerot = new TGeoRotation();
+  laddercablerot->SetAngles(90.,60.,-90.);
   for(Int_t i=0; i<fgkladdercablesnumber; i++)
        for(Int_t j=0; j<kendladdercablesnumber; j++){
                laddercableassemblylist[j] = 
                GetLadderCableAssemblyList(sidecablenumber[i][j<2?0:1],
                                                                   ssdendladdercablelength[j]);
-           fladder[i]->AddNode((TGeoVolume*)laddercableassemblylist[j]->At(j%2==0?0:1),
+                       fladder[i]->AddNode((TGeoVolume*)laddercableassemblylist[j]->At(j%2==0?0:1),
                                                                        j<2?1:2,fladdercablematrix[i][j]);
   }
-//  fladder[0]->CheckOverlaps(0.01);
-//  fladder[1]->CheckOverlaps(0.01);
 }
 ////////////////////////////////////////////////////////////////////////////////
 void AliITSv11GeometrySSD::SetLayer(){
@@ -4354,121 +4145,8 @@ void AliITSv11GeometrySSD::SetLayer(){
   /////////////////////////////////////////////////////////////
   // Generating mother volumes for Layer5 and Layer6
   /////////////////////////////////////////////////////////////
-  TGeoXtru* ssdladdermothershape = (TGeoXtru*)fladder[0]->GetShape();
-  TGeoXtru* layercontainershape[fgklayernumber];
-  for(Int_t i=0; i<fgklayernumber; i++) layercontainershape[i] = new TGeoXtru(2);
-  const Int_t kladdercontainernumber = 8;
-  TVector3* laddercontainervertex[kladdercontainernumber];
-  for(Int_t i=0; i<kladdercontainernumber; i++) laddercontainervertex[i] = 
-               new TVector3(ssdladdermothershape->GetX(i),
-                                        ssdladdermothershape->GetY(i)-ssdladdermothershape->GetY(0));
-  TVector3** transvector[fgklayernumber];      
-  Double_t layerradius = 0.;
-  Double_t layerladderangleposition[fgklayernumber] = 
-               {360./fgkSSDLay5LadderNumber,360./fgkSSDLay6LadderNumber};
-  Double_t** rotationangle = new Double_t*[fgklayernumber];
-  for(Int_t i=0; i<fgklayernumber; i++) rotationangle[i] = 
-                                                                       new Double_t[kssdlayladdernumber[i]];
-  for(Int_t i=0; i<fgklayernumber; i++) transvector[i] = new TVector3*[kssdlayladdernumber[i]];        
-  for(Int_t i=0; i<fgklayernumber; i++)
-       for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
-               switch(i){
-                       case 0: //Ladder of Layer5  
-                       layerradius = (j%2==0 ? fgkSSDLay5RadiusMin: fgkSSDLay5RadiusMax);
-                       break;
-                       case 1: //Ladder of Layer6 
-                       layerradius = (j%2==0 ? fgkSSDLay6RadiusMin: fgkSSDLay6RadiusMax);
-                       break;
-               }
-               transvector[i][j] = new TVector3(layerradius*CosD(90.0+j*layerladderangleposition[i]),
-                                                         layerradius*SinD(90.0+j*layerladderangleposition[i]));
-               rotationangle[i][j] = j*layerladderangleposition[i]*TMath::DegToRad();
-       }
-  TVector3** layercontainervertex[fgklayernumber];
-  for(Int_t i=0; i<fgklayernumber; i++) layercontainervertex[i] = 
-                                       new TVector3*[5*(1+kssdlayladdernumber[i])];
-  Int_t uplayerindex[2] = {0,7};
-  Int_t downlayerindex[4] = {1,0,7,6};
-  for(Int_t i=0; i<fgklayernumber; i++){
-       Int_t vertexindex = 0; 
-       layercontainervertex[i][0] = new TVector3(0.,laddercontainervertex[0]->Y()); 
-       layercontainervertex[i][1] = new TVector3(0.,laddercontainervertex[3]->Y());
-       layercontainervertex[i][2] = new TVector3(*laddercontainervertex[3]);
-       for(Int_t j=0; j<3; j++){
-               layercontainervertex[i][j]->RotateZ(rotationangle[i][0]);
-          *layercontainervertex[i][j] += *transvector[i][0];
-               vertexindex++;
-       }
-       for(Int_t j=1; j<kssdlayladdernumber[i]; j++){
-               for(Int_t l=0; l<2; l++){
-                       layercontainervertex[i][vertexindex] = new TVector3(l==0?
-                                                                                                * laddercontainervertex[4]:
-                                                                                                * laddercontainervertex[3]); 
-                       layercontainervertex[i][vertexindex]->RotateZ(rotationangle[i][j]);
-                  *layercontainervertex[i][vertexindex] += *transvector[i][j];
-                       vertexindex++;
-               }
-       }
-       layercontainervertex[i][vertexindex] = new TVector3(*laddercontainervertex[4]);
-       layercontainervertex[i][vertexindex]->RotateZ(rotationangle[i][0]);
-       *layercontainervertex[i][vertexindex]+= *transvector[i][0];
-       layercontainervertex[i][vertexindex+1] = new TVector3(*layercontainervertex[i][1]);
-       layercontainervertex[i][vertexindex+2] = new TVector3(*layercontainervertex[i][0]);
-       vertexindex+=3;
-    for(Int_t j=0; j<2; j++){
-               layercontainervertex[i][vertexindex] = new TVector3(*laddercontainervertex[7-j]);
-               layercontainervertex[i][vertexindex]->RotateZ(rotationangle[i][0]);
-               *layercontainervertex[i][vertexindex] += *transvector[i][0];
-               vertexindex++;
-       }
-       for(Int_t j=1; j<kssdlayladdernumber[i]; j++){
-               if(j%2!=0){
-                       for(Int_t l=0; l<2; l++){
-                               layercontainervertex[i][vertexindex] = new TVector3(*laddercontainervertex[uplayerindex[l]]);
-                               layercontainervertex[i][vertexindex]->RotateZ(rotationangle[i][kssdlayladdernumber[i]-j]);
-                          *layercontainervertex[i][vertexindex] += *transvector[i][kssdlayladdernumber[i]-j];
-                               vertexindex++;
-                       }
-               }
-               else{
-                       for(Int_t l=0; l<4; l++){
-                               layercontainervertex[i][vertexindex] = 
-                                                       new TVector3(*laddercontainervertex[downlayerindex[l]]);
-                               layercontainervertex[i][vertexindex]->RotateZ(rotationangle[i][kssdlayladdernumber[i]-j]);
-                          *layercontainervertex[i][vertexindex] += *transvector[i][kssdlayladdernumber[i]-j];
-                               vertexindex++;
-                       }
-               }
-       }
-       layercontainervertex[i][vertexindex] = 
-                                       new TVector3(*laddercontainervertex[1]); 
-       layercontainervertex[i][vertexindex+1] = 
-                                       new TVector3(*laddercontainervertex[0]); 
-       for(Int_t j=0; j<2; j++){
-               layercontainervertex[i][vertexindex+j]->RotateZ(rotationangle[i][0]);
-          *layercontainervertex[i][vertexindex+j] += *transvector[i][0];
-       }
-       layercontainervertex[i][vertexindex+2] = 
-                                       new TVector3(*layercontainervertex[i][0]); 
-  }
-  Double_t** xlayervertex = new Double_t*[fgklayernumber];
-  Double_t** ylayervertex = new Double_t*[fgklayernumber];
-  for(Int_t i=0; i<fgklayernumber; i++){ 
-       xlayervertex[i] = new Double_t[5*(1+kssdlayladdernumber[i])]; 
-       ylayervertex[i] = new Double_t[5*(1+kssdlayladdernumber[i])]; 
-  }
-  for(Int_t i=0; i<fgklayernumber; i++)
-       for(Int_t j=0; j<5*(1+kssdlayladdernumber[i]); j++){
-               xlayervertex[i][j] = layercontainervertex[i][j]->X();
-               ylayervertex[i][j] = layercontainervertex[i][j]->Y();
-       }
-  for(Int_t i=0; i<fgklayernumber; i++){
-       layercontainershape[i]->DefinePolygon(5*(1+kssdlayladdernumber[i]),xlayervertex[i],ylayervertex[i]);
-    layercontainershape[i]->DefineSection(0,-0.5*(i==0?fgkSSDLay5LadderLength:fgkSSDLay6LadderLength));
-    layercontainershape[i]->DefineSection(1,0.5*(i==0?fgkSSDLay5LadderLength:fgkSSDLay6LadderLength));
-  }
-  fSSDLayer5 = new TGeoVolume("ITSssdLayer5",layercontainershape[0],fSSDAir);  
-  fSSDLayer6 = new TGeoVolume("ITSssdLayer6",layercontainershape[1],fSSDAir);  
+  fSSDLayer5 = new TGeoVolumeAssembly("ITSssdLayer5");  
+  fSSDLayer6 = new TGeoVolumeAssembly("ITSssdLayer6");  
   Int_t *ladderindex[fgklayernumber];
   Int_t index[fgklayernumber] = {8,9};
   for(Int_t i=0; i<fgklayernumber; i++) ladderindex[i] = new Int_t[kssdlayladdernumber[i]];
@@ -4482,27 +4160,7 @@ void AliITSv11GeometrySSD::SetLayer(){
   /////////////////////////////////////////////////////////////
   // Deallocating memory
   /////////////////////////////////////////////////////////////
-  for(Int_t i=0; i<kladdercontainernumber; i++) delete laddercontainervertex[i];
-  for(Int_t i=0; i<fgklayernumber; i++){
-       for(Int_t j=0; j<kssdlayladdernumber[i]; j++) delete transvector[i][j];
-       delete [] transvector[i];
-  }
-  for(Int_t i=0; i<fgklayernumber; i++){
-       delete [] rotationangle[i];
-  }
-  delete rotationangle;                
-  for(Int_t i=0; i<fgklayernumber; i++){
-       for(Int_t j=0; j<5*(1+kssdlayladdernumber[i]); j++)
-               delete layercontainervertex[i][j];
-       delete [] layercontainervertex[i];
-  }            
-  for(Int_t i=0; i<fgklayernumber; i++){ 
-       delete [] xlayervertex[i];
-       delete [] ylayervertex[i];
-  }
-  delete xlayervertex;
-  delete ylayervertex;
-  for(Int_t i=0; i<fgklayernumber; i++) delete ladderindex[i];
+  for(Int_t i=0; i<fgklayernumber; i++) delete [] ladderindex[i];
 }
 ////////////////////////////////////////////////////////////////////////////////
 void AliITSv11GeometrySSD::Layer5(TGeoVolume* moth){
@@ -4510,7 +4168,7 @@ void AliITSv11GeometrySSD::Layer5(TGeoVolume* moth){
   // Insert the layer 5 in the mother volume. 
   /////////////////////////////////////////////////////////////
   if (! moth) {
-    printf("Error::AliITSv11GeometrySSD: Can't insert layer5, mother is null!\n");
+    AliError("Can't insert layer5, mother is null!\n");
     return;
   };
   if(!fSSDLayer5) SetLayer();
@@ -4525,7 +4183,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   // Insert the layer 6 in the mother volume. 
   /////////////////////////////////////////////////////////////
   if (! moth) {
-    printf("Error::AliITSv11GeometrySSD: Can't insert layer6, mother is null!\n");
+    AliError("AliITSv11GeometrySSD: Can't insert layer6, mother is null!\n");
     return;
   };
   if(!fSSDLayer6) SetLayer();
@@ -4551,17 +4209,17 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   for(Int_t i=0; i<fgklayernumber; i++){
        mountingblockratio[i] = fgkSSDMountingBlockLength[0]/fgkMountingBlockSupportRadius[i];
     mountingsupportedge[i]    = 0.5*fgkMountingBlockSupportRadius[i]
-                                                         *(TMath::Sqrt(4.0-TMath::Power(mountingblockratio[i],2))
+                                                          * (TMath::Sqrt((2.-mountingblockratio[i])*(2.+mountingblockratio[i]))
                                                          * TMath::Sin(2.0*TMath::Pi()/kssdlayladdernumber[i])
                                                          - mountingblockratio[i]*(1.0+TMath::Cos(2.0*TMath::Pi()
                                                          / kssdlayladdernumber[i])));
     theta[i] = TMath::ASin(0.5*mountingblockratio[i]+mountingsupportedge[i]/fgkMountingBlockSupportRadius[i]);
     phi[i]   = TMath::ASin(0.5*mountingblockratio[i]);
        mountingsupportedgevector[i] = new TVector3();
-    mountingsupportedgevector[i]->SetX(-0.5*fgkSSDMountingBlockLength[0]);
-       mountingsupportedgevector[i]->SetY(fgkMountingBlockSupportRadius[i]*TMath::Sqrt(1.
-                                                                -TMath::Power(mountingsupportedgevector[i]->X()
-                                                                /                         fgkMountingBlockSupportRadius[i],2)));
+        mountingsupportedgevector[i]->SetX(-0.5*fgkSSDMountingBlockLength[0]);
+       mountingsupportedgevector[i]->SetY(fgkMountingBlockSupportRadius[i]*TMath::Sqrt(
+                                                       (1.-mountingsupportedgevector[i]->X()/fgkMountingBlockSupportRadius[i])*
+                                                       (1.+mountingsupportedgevector[i]->X()/fgkMountingBlockSupportRadius[i])));
     psi0[i] = 0.5*TMath::Pi()-phi[i];  
     deltapsi[i] = (theta[i]+phi[i])/nedges;
   }
@@ -4640,10 +4298,10 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   TGeoVolume* centermountingblocksupport[fgklayernumber];
   TGeoVolume* sideladdersupportpiece[fgklayernumber];
   TGeoVolume* centerladdersupportpiece[fgklayernumber];
-  char sidemountingblockname[40];
-  char centermountingblockname[40];
-  char sideladdersupportpiecename[40];
-  char centerladdersupportpiecename[40];
+  char sidemountingblockname[100];
+  char centermountingblockname[100];
+  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);
@@ -4665,6 +4323,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        centermountingsupportshape[i]->DefineSection(0,0.);
     centermountingsupportshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]
                                                                                                  -fgkMountingBlockSupportWidth[0]);
+
     centermountingblocksupport[i] = new TGeoVolume(centermountingblockname,
                                                                          centermountingsupportshape[i],
                                                                                  fSSDAlCoolBlockMedium);
@@ -4677,7 +4336,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
     sideladdersupportpieceshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
     sideladdersupportpiece[i] = new TGeoVolume(sideladdersupportpiecename,
                                                                          sideladdersupportpieceshape[i],
-                                                                                 fSSDSupportRingAl);
+                                                                                 fSSDCarbonFiberMedium);
        sideladdersupportpiece[i]->SetLineColor(fColorAl);
        centerladdersupportpieceshape[i] = new TGeoXtru(2);
     centerladdersupportpieceshape[i]->DefinePolygon(indexedge[i]+3,
@@ -4687,7 +4346,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
                                                                                                  -fgkMountingBlockSupportWidth[0]);
     centerladdersupportpiece[i] = new TGeoVolume(centerladdersupportpiecename,
                                                                          centerladdersupportpieceshape[i],
-                                                                                 fSSDSupportRingAl);
+                                                                                 fSSDCarbonFiberMedium);
        centerladdersupportpiece[i]->SetLineColor(fColorAl);
   }
   /////////////////////////////////////////////////////////////
@@ -4710,8 +4369,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   Double_t mountingblockpieceupyvertex[fgklayernumber][8];
   Double_t mountingblockpiecedownxvertex[fgklayernumber][8];
   Double_t mountingblockpiecedownyvertex[fgklayernumber][8];
-  char mountingblockpiecedownname[34];
-  char mountingblockpieceupname[34];
+  char mountingblockpiecedownname[100];
+  char mountingblockpieceupname[100];
   for(Int_t i=0; i<fgklayernumber; i++){
     ///////////////////////////
     // Mounting Block Down Vertex
@@ -4720,7 +4379,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
     sprintf(mountingblockpiecedownname,"MountingBlockPieceDownLay%d",i+5);
        mountingblockpiecedownxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];        
        mountingblockpiecedownyvertex[i][0] = fgkMountingBlockSupportRadius[i]
-                                                                               + fgkMountingBlockSupportDownHeight;
+                                             + fgkMountingBlockSupportDownHeight 
+                                              - fgkSSDLadderVerticalDisalignment;
        mountingblockpiecedownxvertex[i][1] = mountingblockpiecedownxvertex[i][0];      
        mountingblockpiecedownyvertex[i][1] = mountingblockpiecedownyvertex[i][0]
                                                                                + fgkSSDMountingBlockHeight[1]
@@ -4745,8 +4405,9 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        mountingblockpiecedownshape[i]->DefineSection(0,0.0);
        mountingblockpiecedownshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
        mountingblockpiecedown[i] = new TGeoVolume(mountingblockpiecedownname,
-                                                                mountingblockpiecedownshape[i],fSSDSupportRingAl);
+                                                                mountingblockpiecedownshape[i],fSSDMountingBlockMedium);
        mountingblockpiecedown[i]->SetLineColor(fColorG10);
+
     ///////////////////////////
     // Mounting Block Up Vertex
     ///////////////////////////
@@ -4754,7 +4415,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        sprintf(mountingblockpieceupname,"MountingBlockPieceUpLay%d",i+5);
        mountingblockpieceupxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];  
        mountingblockpieceupyvertex[i][0] = fgkMountingBlockSupportRadius[i]
-                                                                               + fgkMountingBlockSupportUpHeight[i];
+                                                                               + fgkMountingBlockSupportUpHeight[i]
+                                              - fgkSSDLadderVerticalDisalignment;
        mountingblockpieceupxvertex[i][1] = mountingblockpieceupxvertex[i][0];  
        mountingblockpieceupyvertex[i][1] = mountingblockpieceupyvertex[i][0]
                                                                                + fgkSSDMountingBlockHeight[1]
@@ -4774,12 +4436,13 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        mountingblockpieceupyvertex[i][6] = mountingblockpieceupyvertex[i][5];
        mountingblockpieceupxvertex[i][7] = mountingblockpieceupxvertex[i][6];  
        mountingblockpieceupyvertex[i][7] = mountingblockpieceupyvertex[i][0];
+
        mountingblockpieceupshape[i]->DefinePolygon(8,mountingblockpieceupxvertex[i],
                                                                                                         mountingblockpieceupyvertex[i]);
        mountingblockpieceupshape[i]->DefineSection(0,0.0);
        mountingblockpieceupshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
        mountingblockpieceup[i] = new TGeoVolume(mountingblockpieceupname,
-                                                               mountingblockpieceupshape[i],fSSDSupportRingAl);
+                                                               mountingblockpieceupshape[i],fSSDMountingBlockMedium);
        mountingblockpieceup[i]->SetLineColor(fColorG10);
  }
   ///////////////////////////////////////////////////////////////////
@@ -4793,8 +4456,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   Double_t mountingblocksupportrapezoidownyvertex[fgklayernumber][5];
   Double_t mountingblocksupportrapezoidupxvertex[fgklayernumber][5];
   Double_t mountingblocksupportrapezoidupyvertex[fgklayernumber][5];
-  char mountingblocksupportrapezoidowname[40];
-  char mountingblocksupportrapezoidupname[40];
+  char mountingblocksupportrapezoidowname[100];
+  char mountingblocksupportrapezoidupname[100];
   Double_t scalefactor = 3./4.;
   for(Int_t i=0; i<fgklayernumber; i++){
   ////////////////////////////////////////////
@@ -4815,6 +4478,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        mountingblocksupportrapezoidownyvertex[i][3] = mountingblocksupportrapezoidownyvertex[i][2];
        mountingblocksupportrapezoidownxvertex[i][4] = mountingblocksupportrapezoidownxvertex[i][3];
        mountingblocksupportrapezoidownyvertex[i][4] = mountingblocksupportrapezoidownyvertex[i][0];
+
        mountingblocksupportrapezoidownshape[i]->DefinePolygon(5,mountingblocksupportrapezoidownxvertex[i],
                                                                                                               mountingblocksupportrapezoidownyvertex[i]);
        mountingblocksupportrapezoidownshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
@@ -4822,7 +4486,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        mountingblocksupportrapezoidownshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
        sprintf(mountingblocksupportrapezoidowname,"MountingBlockSuppTrapezoidDownLay%d",i+5);
        mountingblocksupportrapezoidown[i] = new TGeoVolume(mountingblocksupportrapezoidowname,
-                                                               mountingblocksupportrapezoidownshape[i],fSSDMountingBlockMedium);
+                                                               mountingblocksupportrapezoidownshape[i],fSSDCarbonFiberMedium);
        mountingblocksupportrapezoidown[i]->SetLineColor(9);
   ////////////////////////////////////////////
   // Mounting Block Support Up Trapezoid Vertex 
@@ -4843,6 +4507,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        mountingblocksupportrapezoidupyvertex[i][3] = mountingblocksupportrapezoidupyvertex[i][2];
        mountingblocksupportrapezoidupxvertex[i][4] = mountingblocksupportrapezoidupxvertex[i][3];
        mountingblocksupportrapezoidupyvertex[i][4] = mountingblocksupportrapezoidupyvertex[i][0];
+
        mountingblocksupportrapezoidupshape[i]->DefinePolygon(5,mountingblocksupportrapezoidupxvertex[i],
                                                                                                               mountingblocksupportrapezoidupyvertex[i]);
        mountingblocksupportrapezoidupshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
@@ -4850,7 +4515,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        mountingblocksupportrapezoidupshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
        sprintf(mountingblocksupportrapezoidupname,"MountingBlockSuppTrapezoidUpLay%d",i+5);
        mountingblocksupportrapezoidup[i] = new TGeoVolume(mountingblocksupportrapezoidupname,
-                                                               mountingblocksupportrapezoidupshape[i],fSSDMountingBlockMedium);
+                                                               mountingblocksupportrapezoidupshape[i],fSSDCarbonFiberMedium);
        mountingblocksupportrapezoidup[i]->SetLineColor(9);
   }
   ///////////////////////////////////////////////////////////////////
@@ -4858,8 +4523,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxup[i] = new TGeoVolume*[3];
   Double_t boxoriginup[fgklayernumber][2][3];
   Double_t boxorigindown[fgklayernumber][2][3];
-  char mountingblocksupportboxdownname[34];
-  char mountingblocksupportboxupname[34];
+  char mountingblocksupportboxdownname[100];
+  char mountingblocksupportboxupname[100];
   TGeoRotation* mountingblocksupportrot = new TGeoRotation();
   mountingblocksupportrot->SetAngles(90.,180.,-90);
   TGeoRotation* globalrefladdersupportrot = new TGeoRotation();
@@ -4880,8 +4545,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   TGeoVolume* downmotherladdersupport[fgklayernumber]; 
   TGeoXtru* upmotherladdersupportshape[fgklayernumber];
   TGeoVolume* upmotherladdersupport[fgklayernumber]; 
-  char upmotheladdersupportname[30];
-  char downmotheladdersupportname[30];
+  char upmotheladdersupportname[100];
+  char downmotheladdersupportname[100];
   for(Int_t i=0; i<fgklayernumber; i++){
        xmothervertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]
                                                    -  mountingsupportedge[i];
@@ -4901,18 +4566,25 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        ymothervertex[i][6] = ymothervertex[i][5];
        xmothervertex[i][7] = xmothervertex[i][6];
        ymothervertex[i][7] = ymothervertex[i][0];
+
        sprintf(downmotheladdersupportname,"LadderSupportDownLay%d",i+5);
        sprintf(upmotheladdersupportname,"LadderSupportUpLay%d",i+5);
-    downmotherladdersupportshape[i] = new TGeoXtru(2);
+
+       downmotherladdersupportshape[i] = new TGeoXtru(2);
        downmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]);
        downmotherladdersupportshape[i]->DefineSection(0,ysidevertex[i][0]);
-    downmotherladdersupportshape[i]->DefineSection(1,ysidevertex[i][1]
+       downmotherladdersupportshape[i]->DefineSection(1,ysidevertex[i][1]
                                                                   +                       fgkMountingBlockSupportDownHeight
                                                                   +                       fgkSSDMountingBlockHeight[1]
                                                                   -                       0.5*fgkCoolingTubeSupportHeight
-                                                                  -                       fgkSSDModuleCoolingBlockToSensor);
-    downmotherladdersupport[i] = new TGeoVolume(downmotheladdersupportname,
-                                                                         downmotherladdersupportshape[i],fSSDAir);
+                                                                  -                       fgkSSDModuleCoolingBlockToSensor
+                                                      - fgkSSDLadderVerticalDisalignment);
+       
+//                                                - fgkSSDModuleVerticalDisalignment);
+       //downmotherladdersupport[i] = new TGeoVolumeAssembly(downmotheladdersupportname);
+
+        downmotherladdersupport[i] = new TGeoVolume(downmotheladdersupportname,
+                                                                         downmotherladdersupportshape[i],fSSDAir);
     upmotherladdersupportshape[i] = new TGeoXtru(2);
        upmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]);
        upmotherladdersupportshape[i]->DefineSection(0,ysidevertex[i][0]);
@@ -4920,8 +4592,10 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
                                                                   +                       fgkMountingBlockSupportUpHeight[i]
                                                                   +                       fgkSSDMountingBlockHeight[1]
                                                                   -                       0.5*fgkCoolingTubeSupportHeight
-                                                                  -                       fgkSSDModuleCoolingBlockToSensor);
-    upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname,
+                                                                  -                       fgkSSDModuleCoolingBlockToSensor
+                                                - fgkSSDLadderVerticalDisalignment);
+
+     upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname,
                                                                                          upmotherladdersupportshape[i],fSSDAir);
   }
   for(Int_t i=0; i<fgklayernumber; i++){
@@ -4930,7 +4604,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        /////////////////////////
        boxorigindown[i][0][0] = -0.5*mountingsupportedge[i];
        boxorigindown[i][0][1] =  fgkMountingBlockSupportRadius[i]
-                                                  +  0.5*fgkMountingBlockSupportDownHeight;
+                                                  +  0.5*fgkMountingBlockSupportDownHeight
+                                 - 0.5*fgkSSDLadderVerticalDisalignment;
        boxorigindown[i][0][2] =  fgkMountingBlockSupportWidth[1]
                                                   -  0.5*fgkMountingBlockSupportWidth[0];
   
@@ -4941,13 +4616,13 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
                                                   
        boxoriginup[i][0][0] = -0.5*mountingsupportedge[i];
        boxoriginup[i][0][1] = fgkMountingBlockSupportRadius[i]
-                                                + 0.5*fgkMountingBlockSupportUpHeight[i];
+                              + 0.5*fgkMountingBlockSupportUpHeight[i]
+                              - 0.5*fgkSSDLadderVerticalDisalignment;
        boxoriginup[i][0][2] = fgkMountingBlockSupportWidth[1]
                                                 - 0.5*fgkMountingBlockSupportWidth[0];
   
        boxoriginup[i][1][0] = 0.0;
-       boxoriginup[i][1][1] = fgkMountingBlockSupportRadius[i]
-                                                + 0.5*fgkMountingBlockSupportUpHeight[i];
+       boxoriginup[i][1][1] = boxoriginup[i][0][1];
        boxoriginup[i][1][2] = 0.5*(fgkMountingBlockSupportWidth[1]
                                                 - fgkMountingBlockSupportWidth[0]);
   
@@ -4956,38 +4631,38 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        /////////////////////////
        mountingblocksupportboxdownshape[i][0] = new TGeoBBox(0.5*(mountingsupportedge[i]
                                                                                 +  fgkSSDMountingBlockLength[0]),
-                                                                                       0.5*fgkMountingBlockSupportDownHeight,
+                                                                                       0.5*fgkMountingBlockSupportDownHeight - 0.5*fgkSSDLadderVerticalDisalignment,
                                                                                        0.5*fgkMountingBlockSupportWidth[0],
                                                                                        boxorigindown[i][0]);
-    mountingblocksupportboxdownshape[i][1] = new TGeoBBox(0.5*fgkSSDMountingBlockLength[0],
-                                                                                       0.5*fgkMountingBlockSupportDownHeight,
+       mountingblocksupportboxdownshape[i][1] = new TGeoBBox(0.5*fgkSSDMountingBlockLength[0],
+                                                                                       0.5*fgkMountingBlockSupportDownHeight - 0.5*fgkSSDLadderVerticalDisalignment,
                                                                                        0.5*(fgkMountingBlockSupportWidth[1]
                                                                                 -  fgkMountingBlockSupportWidth[0]),
                                                                                        boxorigindown[i][1]);
                                                                                        
        mountingblocksupportboxupshape[i][0] = new TGeoBBox(0.5*(mountingsupportedge[i]
                                                                                 +  fgkSSDMountingBlockLength[0]),
-                                                                                       0.5*fgkMountingBlockSupportUpHeight[i],
+                                                                                       0.5*fgkMountingBlockSupportUpHeight[i] - 0.5*fgkSSDLadderVerticalDisalignment,
                                                                                        0.5*fgkMountingBlockSupportWidth[0],
                                                                                        boxoriginup[i][0]);
-                                                                                       
+
        mountingblocksupportboxupshape[i][1] = new TGeoBBox(0.5*fgkSSDMountingBlockLength[0],
-                                                                                       0.5*fgkMountingBlockSupportUpHeight[i],
+                                                                                       0.5*fgkMountingBlockSupportUpHeight[i] - 0.5*fgkSSDLadderVerticalDisalignment,
                                                                                        0.5*(fgkMountingBlockSupportWidth[1]
                                                                     -  fgkMountingBlockSupportWidth[0]),
                                                                                        boxoriginup[i][1]);
        ///////////////////////////////////////
-    // Adding the Volumes to Mother Volume    
+       // 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],
-                                                                                 fSSDMountingBlockMedium);
+                                                                                 fSSDCarbonFiberMedium);
                mountingblocksupportboxup[i][j] = new TGeoVolume(mountingblocksupportboxupname,
                                                                                  mountingblocksupportboxupshape[i][j],
-                                                                                 fSSDMountingBlockMedium);
+                                                                                 fSSDCarbonFiberMedium);
                mountingblocksupportboxdown[i][j]->SetLineColor(9);
                mountingblocksupportboxup[i][j]->SetLineColor(9);
                for(Int_t k=0; k<2; k++){
@@ -5000,7 +4675,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
                downmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]);
                downmotherladdersupport[i]->AddNode(sideladdersupportpiece[i],k+1,laddersupportmatrix[k]);
                downmotherladdersupport[i]->AddNode(centerladdersupportpiece[i],k+1,laddersupportmatrix[k]);
-           downmotherladdersupport[i]->AddNode(mountingblockpiecedown[i],k+1,laddersupportmatrix[k]);
+               downmotherladdersupport[i]->AddNode(mountingblockpiecedown[i],k+1,laddersupportmatrix[k]);
                downmotherladdersupport[i]->AddNode(mountingblocksupportrapezoidown[i],k+1,laddersupportmatrix[k]);
                upmotherladdersupport[i]->AddNode(centermountingblocksupport[i],k+1,laddersupportmatrix[k]);
                upmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]);
@@ -5032,15 +4707,17 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        delete [] ysidelowervertex[i];
        delete [] xcenterlowervertex[i];
        delete [] ycenterlowervertex[i];
+       delete [] xmothervertex[i];
+       delete [] ymothervertex[i];
   }
-  delete xsidevertex;
-  delete ysidevertex;
-  delete xcentervertex;
-  delete ycentervertex;
-  delete xsidelowervertex;
-  delete ysidelowervertex;
-  delete xcenterlowervertex;
-  delete ycenterlowervertex;
+  delete [] xsidevertex;
+  delete [] ysidevertex;
+  delete [] xcentervertex;
+  delete [] ycentervertex;
+  delete [] xsidelowervertex;
+  delete [] ysidelowervertex;
+  delete [] xcenterlowervertex;
+  delete [] ycenterlowervertex;
   delete globalrefladdersupportrot;
   delete mountingblocksupportrot;
   /////////////////////
@@ -5065,7 +4742,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   for(Int_t i=0; i<fgklayernumber; i++){
        mountingblockratio[i] = fgkSSDMountingBlockLength[0]/fgkMountingBlockSupportRadius[i];
     mountingsupportedge[i]    = 0.5*fgkMountingBlockSupportRadius[i]
-                                                         *(TMath::Sqrt(4.0-TMath::Power(mountingblockratio[i],2))
+                                                          *(TMath::Sqrt((2.-mountingblockratio[i])*(2.+mountingblockratio[i]))
                                                          * TMath::Sin(2.0*TMath::Pi()/kssdlayladdernumber[i])
                                                          - mountingblockratio[i]*(1.0+TMath::Cos(2.0*TMath::Pi()
                                                          / kssdlayladdernumber[i])));
@@ -5121,8 +4798,8 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
        ringsupportvertex[i][2*kssdlayladdernumber[i]+1] = new TVector3(*ringsupportvertex[i][0]);
     for(Int_t j=0; j<nedges+1; j++){
                ringsupportvertex[i][2*kssdlayladdernumber[i]+2+j] = 
-                       new TVector3((ringsupportvertex[i][0]->Y()-fgkLadderSupportHeigth)*CosD(90.0-j*angle),
-                                                (ringsupportvertex[i][0]->Y()-fgkLadderSupportHeigth)*SinD(90.0-j*angle));
+                       new TVector3((ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*CosD(90.0-j*angle),
+                                                (ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*SinD(90.0-j*angle));
        }
   }
   Double_t **xmothervertex = new Double_t*[fgklayernumber];
@@ -5135,7 +4812,38 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                ymothervertex[i][j] = ringsupportvertex[i][j]->Y();
        }
   }
-  char lowerladdersupportname[30];
+////////////////////////////////////////////////////////////////////////////////
+// Start Corrections 13/06/08
+////////////////////////////////////////////////////////////////////////////////
+  char lowerladderpconsupportname[100];
+  TGeoPcon* lowerladderpconsupportshape[fgklayernumber];
+  TGeoVolume* lowerladderpconsupport[fgklayernumber]; 
+  Double_t lowerladderpconezsection[2] = {0.,fgkMountingBlockSupportWidth[1]};
+  Double_t lowerladderpconradiusmax[fgklayernumber];
+  Double_t lowerladderpconradiusmin[fgklayernumber];
+  TGeoRotation* lowerladdersupportrot = new TGeoRotation();
+  lowerladdersupportrot->SetAngles(90.,180.,-90);
+  for(Int_t i=0; i<fgklayernumber; i++){
+       lowerladderpconradiusmax[i] = fgkMountingBlockSupportRadius[i]
+                                                               *                          TMath::Cos(theta[i]);
+    lowerladderpconradiusmin[i] = lowerladderpconradiusmax[i]-fgkLadderSupportHeight;
+  } 
+  for(Int_t i=0; i<fgklayernumber; i++){
+///////////////////////////  Modified Version ?///////////////////
+    lowerladderpconsupportshape[i] = new TGeoPcon(0.,360.,2);
+       for(Int_t j=0; j<2; j++) lowerladderpconsupportshape[i]->DefineSection(j,
+                                                        lowerladderpconezsection[j],lowerladderpconradiusmin[i],
+                                                        lowerladderpconradiusmax[i]);
+       sprintf(lowerladderpconsupportname,"LowerLadderPConSupportNameLay%d",i+5);
+       lowerladderpconsupport[i] = new TGeoVolume(lowerladderpconsupportname,lowerladderpconsupportshape[i],fSSDSupportRingAl);
+    lowerladderpconsupport[i]->SetLineColor(fColorAl);
+       (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladderpconsupport[i],1);
+       (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladderpconsupport[i],2,lowerladdersupportrot);
+ }
+////////////////////////////////////////////////////////////////////////////////
+// End Corrections 13/06/08
+////////////////////////////////////////////////////////////////////////////////
+  /*char lowerladdersupportname[30];
   TGeoXtru* lowerladdersupportshape[fgklayernumber];
   TGeoVolume* lowerladdersupport[fgklayernumber];
   TGeoRotation* lowerladdersupportrot = new TGeoRotation();
@@ -5152,7 +4860,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
        lowerladdersupport[i]->SetLineColor(fColorAl);
        (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladdersupport[i],1);
        (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladdersupport[i],2,lowerladdersupportrot);
-  }
+  }*/
   /////////////////////////////////////////////////////////////
   // Deallocating memory
   /////////////////////////////////////////////////////////////
@@ -5165,8 +4873,8 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
        delete [] xmothervertex[i];
        delete [] ymothervertex[i];
   }
-  delete xmothervertex;
-  delete ymothervertex; 
+  delete [] xmothervertex;
+  delete [] ymothervertex; 
   delete globalrot;
   for(Int_t i=0; i<fgklayernumber; i++){
        for(Int_t j=0; j<kssdlayladdernumber[i]; j++)
@@ -5185,15 +4893,15 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   const Int_t kendcapcoverplatesmallholenumber[2] = {4,9}; 
   Double_t holesection[2] = {-0.5*fgkEndCapCoverPlateThickness,
                                                          0.5*fgkEndCapCoverPlateThickness};
-  TGeoXtru* endcapcoverplatesmallholeshape = GetHoleShape(fgkEndCapCoverPlateSmallHoleRadius,
+  TGeoShape* endcapcoverplatesmallholeshape = GetHoleShape(fgkEndCapCoverPlateSmallHoleRadius,
                                                                                                              nendcapcoverplateholedges,holesection);
   TGeoVolume* endcapcoverplatesmallhole = new TGeoVolume("EndCapCoverPlateSmallHole",
-                                                                                 endcapcoverplatesmallholeshape,fSSDAir);
+                                                                                 endcapcoverplatesmallholeshape,fSSDAlCoolBlockMedium);
   endcapcoverplatesmallhole->SetLineColor(6);
-  TGeoXtru* endcapcoverplatebigholeshape = GetHoleShape(fgkEndCapCoverPlateBigHoleRadius,
+  TGeoShape* endcapcoverplatebigholeshape = GetHoleShape(fgkEndCapCoverPlateBigHoleRadius,
                                                                                                              nendcapcoverplateholedges,holesection);
   TGeoVolume* endcapcoverplatebighole = new TGeoVolume("EndCapCoverPlateBigHole",
-                                                                                 endcapcoverplatebigholeshape,fSSDAir);
+                                                                                 endcapcoverplatebigholeshape,fSSDAlCoolBlockMedium);
   endcapcoverplatebighole->SetLineColor(6);
   //////////////////////////
   // Screw Piece Definition 
@@ -5254,13 +4962,13 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                                 0.5*fgkEndCapCoverPlateThickness,boxorigin[3]);
   
   endcapcoverplatebox[0] = new TGeoVolume("EndCapCoverPlateBox1",endcapcoverplateboxshape[0],
-                                                                          fSSDAir);
+                                                                          fSSDAlCoolBlockMedium);
   endcapcoverplatebox[1] = new TGeoVolume("EndCapCoverPlateBox2",endcapcoverplateboxshape[1],
-                                                                          fSSDAir);
+                                                                          fSSDAlCoolBlockMedium);
   endcapcoverplatebox[2] = new TGeoVolume("EndCapCoverPlateBox3",endcapcoverplateboxshape[2],
-                                                                          fSSDAir);
+                                                                          fSSDAlCoolBlockMedium);
   endcapcoverplatebox[3] = new TGeoVolume("EndCapCoverPlateBox4",endcapcoverplateboxshape[3],
-                                                                          fSSDAir);
+                                                                          fSSDAlCoolBlockMedium);
   endcapcoverplatebox[0]->SetLineColor(6);
   endcapcoverplatebox[1]->SetLineColor(6);
   endcapcoverplatebox[2]->SetLineColor(6);
@@ -5271,10 +4979,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                                        0.5*fgkEndCapCoverPlateThickness,
                                                                                        endcapfillingboxorigin);
   TGeoVolume* endcapfillingbox = new TGeoVolume("EndCapFillingBox",endcapfillingboxshape,
-                                                                          fSSDAir);
+                                                                          fSSDAlCoolBlockMedium);
   endcapfillingbox->SetLineColor(6);
   ////////////////////////////
-  // Contour Xtru Definition 
+  // Contour shape Definition 
   ////////////////////////////
   const Int_t kcontourvertexnumber = 10;
   Double_t xcontourvertex[kcontourvertexnumber];
@@ -5304,16 +5012,112 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                        + fgkEndCapCoverPlateSmallHoleRadius;
   ycontourvertex[8] = ycontourvertex[7];
   ycontourvertex[9] = ycontourvertex[0];
-  TGeoXtru* contourshape = new TGeoXtru(2);
-  contourshape->DefinePolygon(kcontourvertexnumber,xcontourvertex,ycontourvertex);  
-  contourshape->DefineSection(0,-0.5*fgkEndCapCoverPlateThickness);
-  contourshape->DefineSection(1,+0.5*fgkEndCapCoverPlateThickness);
-  TGeoVolume* contour = new TGeoVolume("EndCapCoverPlateContour",contourshape,fSSDAir);
+
+  Double_t xboxin, dxboxin, yboxin, dyboxin;
+  Double_t xboxout, dxboxout, yboxout, dyboxout;
+  Double_t coordmin, coordmax;
+  coordmin = -fgkEndCapCoverPlateLength[0];
+  coordmax = fgkEndCapCoverPlateLength[1]-xcontourvertex[0];
+  xboxout = 0.5*(coordmin+coordmax);
+  dxboxout = 0.5*(coordmax-coordmin);
+  coordmin = -0.5*(fgkEndCapCoverPlateWidth[0]-fgkEndCapCoverPlateWidth[2]
+                                       - (kendcapcoverplatesmallholenumber[1]-1)
+                                       * fgkEndCapCoverPlateSmallHoleSeparation[2]);
+  coordmax = (kendcapcoverplatesmallholenumber[1]-1)
+                                       * fgkEndCapCoverPlateSmallHoleSeparation[2]-ycontourvertex[0];
+  yboxout = 0.5*(coordmin+coordmax);
+  dyboxout = 0.5*(coordmax-coordmin);
+  coordmin = -fgkEndCapCoverPlateSmallHoleRadius;
+  coordmax = fgkEndCapCoverPlateLength[1]+fgkEndCapCoverPlateSmallHoleRadius;
+  xboxin = 0.5*(coordmin+coordmax);
+  dxboxin = 0.5*(coordmax-coordmin);
+  coordmin = -fgkEndCapCoverPlateSmallHoleRadius;
+  coordmax = (kendcapcoverplatesmallholenumber[1]-1)
+                                       * fgkEndCapCoverPlateSmallHoleSeparation[2]
+                                       + fgkEndCapCoverPlateSmallHoleRadius;
+  yboxin = 0.5*(coordmin+coordmax);
+  dyboxin = 0.5*(coordmax-coordmin);
+  new TGeoBBox("EndCapCoverPlateContourBoxOut", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
+  TGeoTranslation *trendCapCoverPlateContourboxout = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut",
+                                                         xboxout, yboxout, 0.);
+  trendCapCoverPlateContourboxout->RegisterYourself();
+  new TGeoBBox("EndCapCoverPlateContourBoxIn",  dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
+  TGeoTranslation *trendCapCoverPlateContourboxin = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn",
+                                                         xboxin, yboxin, 0.);
+  trendCapCoverPlateContourboxin->RegisterYourself();
+  TGeoCompositeShape *contourshape = new TGeoCompositeShape("contourShape", 
+        "EndCapCoverPlateContourBoxOut:SSD_trEndCapCoverPlateContourBoxOut-EndCapCoverPlateContourBoxIn:SSD_trEndCapCoverPlateContourBoxIn");
+
+  TGeoVolume* contour = new TGeoVolume("EndCapCoverPlateContour",contourshape,
+                                                                          fSSDAlCoolBlockMedium);
   contour->SetLineColor(6);
   /////////////////////////////
-  // Hole Contour Xtru Definition 
+  // Hole Contour Shape Definition 
   ////////////////////////////
-  const Int_t kholecontourvertexnumber = 10;
+  coordmin = xcontourvertex[0];
+  coordmax = coordmin+fgkEndCapCoverPlateLength[2];
+  xboxout = 0.5*(coordmin+coordmax);
+  dxboxout = 0.5*(coordmax-coordmin);
+  coordmin = ycontourvertex[1];
+  coordmax = ycontourvertex[1]+fgkEndCapCoverPlateWidth[2];
+  yboxout = 0.5*(coordmin+coordmax);
+  dyboxout = 0.5*(coordmax-coordmin);
+  coordmin = xcontourvertex[0]+ 0.5*(fgkEndCapCoverPlateLength[2]
+                                                  - 2.*fgkEndCapCoverPlateBigHoleRadius);
+  coordmax = coordmin + 2.*fgkEndCapCoverPlateBigHoleRadius;
+  xboxin = 0.5*(coordmin+coordmax);
+  dxboxin = 0.5*(coordmax-coordmin);
+  coordmin = ycontourvertex[1]+0.5*(fgkEndCapCoverPlateWidth[2]
+                                                  - 2.*fgkEndCapCoverPlateBigHoleRadius);;
+  coordmax = coordmin +2.*fgkEndCapCoverPlateBigHoleRadius;
+  yboxin = 0.5*(coordmin+coordmax);
+  dyboxin = 0.5*(coordmax-coordmin);
+  new TGeoBBox("EndCapCoverPlateContourBoxOut1", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
+  TGeoTranslation *trendCapCoverPlateContourboxout1 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut1",
+                                                         xboxout, yboxout, 0.);
+  trendCapCoverPlateContourboxout1->RegisterYourself();
+  new TGeoBBox("EndCapCoverPlateContourBoxIn1",  dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
+  TGeoTranslation *trendCapCoverPlateContourboxin1 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn1",
+                                                         xboxin, yboxin, 0.);
+  trendCapCoverPlateContourboxin1->RegisterYourself();
+  TGeoCompositeShape *contourshape1 = new TGeoCompositeShape("contourShape1", 
+        "EndCapCoverPlateContourBoxOut1:SSD_trEndCapCoverPlateContourBoxOut1-EndCapCoverPlateContourBoxIn1:SSD_trEndCapCoverPlateContourBoxIn1");
+
+
+  coordmin = xcontourvertex[0]+fgkEndCapCoverPlateLength[5];
+  coordmax = coordmin+fgkEndCapCoverPlateLength[2];
+  xboxout = 0.5*(coordmin+coordmax);
+  dxboxout = 0.5*(coordmax-coordmin);
+  coordmin = ycontourvertex[0]-(fgkEndCapCoverPlateWidth[1]
+                                                  - fgkEndCapCoverPlateWidth[0]);
+  coordmax = ycontourvertex[0];
+  yboxout = 0.5*(coordmin+coordmax);
+  dyboxout = 0.5*(coordmax-coordmin);
+  coordmin = xcontourvertex[0]+fgkEndCapCoverPlateLength[5]+ 0.5*(fgkEndCapCoverPlateLength[2]
+                                                  - 2.*fgkEndCapCoverPlateBigHoleRadius);
+  coordmax = coordmin + 2.*fgkEndCapCoverPlateBigHoleRadius;
+  xboxin = 0.5*(coordmin+coordmax);
+  dxboxin = 0.5*(coordmax-coordmin);
+  coordmin = ycontourvertex[0]-(fgkEndCapCoverPlateWidth[1]
+                                                  - fgkEndCapCoverPlateWidth[0])+0.5*(fgkEndCapCoverPlateWidth[1]
+                                                  - fgkEndCapCoverPlateWidth[0]
+                                                  - 2.*fgkEndCapCoverPlateBigHoleRadius);
+  coordmax = coordmin+2.*fgkEndCapCoverPlateBigHoleRadius;
+  yboxin = 0.5*(coordmin+coordmax);
+  dyboxin = 0.5*(coordmax-coordmin);
+  new TGeoBBox("EndCapCoverPlateContourBoxOut2", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
+  TGeoTranslation *trendCapCoverPlateContourboxout2 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut2",
+                                                         xboxout, yboxout, 0.);
+  trendCapCoverPlateContourboxout2->RegisterYourself();
+  new TGeoBBox("EndCapCoverPlateContourBoxIn2",  dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
+  TGeoTranslation *trendCapCoverPlateContourboxin2 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn2",
+                                                         xboxin, yboxin, 0.);
+  trendCapCoverPlateContourboxin2->RegisterYourself();
+  TGeoCompositeShape *contourshape2 = new TGeoCompositeShape("contourShape2", 
+        "EndCapCoverPlateContourBoxOut2:SSD_trEndCapCoverPlateContourBoxOut2-EndCapCoverPlateContourBoxIn2:SSD_trEndCapCoverPlateContourBoxIn2");
+  
+//  const Int_t kholecontourvertexnumber = 10;
+
   Double_t xholecontourvertex[2][kcontourvertexnumber];
   Double_t yholecontourvertex[2][kcontourvertexnumber];
   xholecontourvertex[0][0] = xcontourvertex[0];
@@ -5370,23 +5174,12 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   yholecontourvertex[1][8] = yholecontourvertex[1][7];
   yholecontourvertex[1][9] = yholecontourvertex[1][0];
 
-  TGeoXtru* holecontourshape[2];
-  holecontourshape[0] = new TGeoXtru(2);
-  holecontourshape[0]->DefinePolygon(kholecontourvertexnumber,xholecontourvertex[0],
-                                                                 yholecontourvertex[0]);  
-  holecontourshape[0]->DefineSection(0,-0.5*fgkEndCapCoverPlateThickness);
-  holecontourshape[0]->DefineSection(1,+0.5*fgkEndCapCoverPlateThickness);
-
-  holecontourshape[1] = new TGeoXtru(2);
-  holecontourshape[1]->DefinePolygon(kholecontourvertexnumber,xholecontourvertex[1],
-                                                                 yholecontourvertex[1]);  
-  holecontourshape[1]->DefineSection(0,-0.5*fgkEndCapCoverPlateThickness);
-  holecontourshape[1]->DefineSection(1,+0.5*fgkEndCapCoverPlateThickness);
-
   TGeoVolume* holecontour[2];
-  holecontour[0] = new TGeoVolume("EndCapCoverPlateContour1",holecontourshape[0],fSSDAir);
+  holecontour[0] = new TGeoVolume("EndCapCoverPlateContour1",contourshape1,
+                                                                 fSSDAlCoolBlockMedium);
   holecontour[0]->SetLineColor(6);
-  holecontour[1] = new TGeoVolume("EndCapCoverPlateContour2",holecontourshape[1],fSSDAir);
+  holecontour[1] = new TGeoVolume("EndCapCoverPlateContour2",contourshape2,
+                                                                 fSSDAlCoolBlockMedium);
   holecontour[1]->SetLineColor(6);
   TGeoTranslation* holecontourtrans = new TGeoTranslation(fgkEndCapCoverPlateLength[3]
                                                                        +     fgkEndCapCoverPlateLength[2],0.,0.);
@@ -5491,14 +5284,14 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   TGeoVolume* endcapcoolingtubetorus[5];
   TGeoTube* endcapcoolingtubeshape[4];
   TGeoVolume* endcapcoolingtube[4];
-  char endcapcoolingtubetorusname[30];
-  char endcapcoolingtubename[30];
+  char endcapcoolingtubetorusname[100];
+  char endcapcoolingtubename[100];
   TGeoTorus* endcapcoolingwatertubetorushape[5];
   TGeoVolume* endcapcoolingwatertubetorus[5];
   TGeoTube* endcapcoolingwatertubeshape[4];
   TGeoVolume* endcapcoolingwatertube[4];
-  char endcapcoolingwatertubetorusname[30];
-  char endcapcoolingwatertubename[30];
+  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);
@@ -5865,10 +5658,19 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   yvertex[12] = yvertex[9]+2.*fgkEndCapSideCoverWidth[5]+fgkEndCapSideCoverLength[4]; 
   yvertex[13] = yvertex[12];
   yvertex[14] = yvertex[6];
-  TGeoXtru* endcapsidecovershape = new TGeoXtru(2);
-  endcapsidecovershape->DefinePolygon(kvertexnumber,xvertex,yvertex); 
-  endcapsidecovershape->DefineSection(0,-0.5*fgkEndCapSideCoverThickness);
-  endcapsidecovershape->DefineSection(1,0.5*fgkEndCapSideCoverThickness);
+  TGeoXtru* endcapsidecovershapeout = new TGeoXtru(2);
+  endcapsidecovershapeout->SetName("endcapsidecovershapeout");
+  endcapsidecovershapeout->DefinePolygon(7,xvertex,yvertex); 
+  endcapsidecovershapeout->DefineSection(0,-0.5*fgkEndCapSideCoverThickness);
+  endcapsidecovershapeout->DefineSection(1,0.5*fgkEndCapSideCoverThickness);
+  TGeoXtru* endcapsidecovershapein = new TGeoXtru(2);
+  endcapsidecovershapein->SetName("endcapsidecovershapein");
+  endcapsidecovershapein->DefinePolygon(6,&xvertex[8],&yvertex[8]); 
+  endcapsidecovershapein->DefineSection(0,-0.5*fgkEndCapSideCoverThickness-0.01);
+  endcapsidecovershapein->DefineSection(1,0.5*fgkEndCapSideCoverThickness+0.01);
+
+
+  TGeoCompositeShape* endcapsidecovershape = new TGeoCompositeShape("endcapsidecovershape", "endcapsidecovershapeout-endcapsidecovershapein");
   TGeoVolume* endcapsidecover = new TGeoVolume("EndCapSideCover",
                                                                endcapsidecovershape,fSSDCoolingTubePhynox);
   endcapsidecover->SetLineColor(fColorPhynox);
@@ -6673,7 +6475,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   Double_t screwcoverplatesection[2] = {0.5*fgkEndCapCoverPlateThickness,
                                                                                fgkEndCapCoverPlateThickness
                                                                         +  fgkEndCapCoolingTubeRadiusMax};
-  TGeoXtru* screwcoverplateshape = GetScrewShape(screwcoverplateradius,
+  TGeoShape* screwcoverplateshape = GetScrewShape(screwcoverplateradius,
                                                                                                 screwcoverplatedgesnumber,
                                                                                                 screwcoverplatesection);
   TGeoVolume* screwcoverplate = new TGeoVolume("EndCapScrewCoverPlate",
@@ -6885,8 +6687,8 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                                                                   *endcapeffectivecablesrot);
   endcapeffectivecablescombitrans[1]  = new TGeoCombiTrans(*endcapeffectivecablestrans[1],
                                                                                                                   *endcapeffectivecablesrot);
-  for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapeffectivecables[0],1,
-                                                                                                         endcapeffectivecablescombitrans[0]);
+//  for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapeffectivecables[0],1,
+//                                                                                                       endcapeffectivecablescombitrans[0]);
   for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapeffectivecables[1],1,
                                                                                                          endcapeffectivecablescombitrans[1]);
   /////////////////////////////////////////////////////////////
@@ -6946,14 +6748,13 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                                                                        Double_t radiusmax, 
                                                                                                                        Double_t width, 
                                                                                                                        Int_t ncables,
-                                                                                                                       char* volname){
+                                                                                                                       const char* volname){
   /////////////////////////////////////////////////////////////
   // Generating EndCap High Voltage Tubes 
   /////////////////////////////////////////////////////////////
   Double_t effectiveinneradius = TMath::Sqrt(ncables)*radiusmin;
-  Double_t effectiveouteradius = TMath::Sqrt(TMath::Power(effectiveinneradius,2.)
-                                                          +             TMath::Power(radiusmax,2.)
-                               -             TMath::Power(radiusmin,2.));
+  Double_t effectiveouteradius = TMath::Sqrt(effectiveinneradius*effectiveinneradius+(radiusmax-radiusmin)*(radiusmax-radiusmin));
+
   TGeoTube* effectiveinnertubeshape = new TGeoTube(0.,effectiveinneradius,0.5*width);
   TGeoTube* effectiveoutertubeshape = new TGeoTube(effectiveinneradius,
                                                                                                   effectiveouteradius,0.5*width);
@@ -7009,7 +6810,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   ////////////////////////////////////
   TGeoXtru* upendcapsupportshape[klayernumber];
   TGeoVolume* upendcapsupport[klayernumber]; 
-  char upendcapsupportname[30]; 
+  char upendcapsupportname[100]; 
   for(Int_t i=0; i<klayernumber; i++){
    upendcapsupportshape[i] = new TGeoXtru(2);
    sprintf(upendcapsupportname,"UpEndCapSupportPieceLayer%i",i+5);
@@ -7017,8 +6818,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
    upendcapsupportshape[i]->DefineSection(0,0.);
    upendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportHighWidth);
    upendcapsupport[i] = new TGeoVolume(upendcapsupportname,upendcapsupportshape[i],
-                                                                       fSSDCoolingTubePhynox);
-//   upendcapsupport[i]->SetLineColor(fColorPhynox);
+                                                                       fSSDSupportRingAl);
    upendcapsupport[i]->SetLineColor(5);
   }
   ///////////////////////////////////////////////
@@ -7047,7 +6847,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   ////////////////////////////////////  
   TGeoXtru* downendcapsupportshape[klayernumber];
   TGeoVolume* downendcapsupport[klayernumber]; 
-  char downendcapsupportname[30]; 
+  char downendcapsupportname[100]; 
   for(Int_t i=0; i<klayernumber; i++){
        downendcapsupportshape[i] = new TGeoXtru(2);
     sprintf(downendcapsupportname,"DownEndCapSupportPieceLayer%i",i+5);
@@ -7063,8 +6863,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                downendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportHighWidth);
        }
     downendcapsupport[i] = new TGeoVolume(downendcapsupportname,
-                                                               downendcapsupportshape[i],fSSDCoolingTubePhynox);
-//     downendcapsupport[i]->SetLineColor(fColorPhynox);
+                                                               downendcapsupportshape[i],fSSDSupportRingAl);
        downendcapsupport[i]->SetLineColor(5);
   }
   ///////////////////////////////////////////////
@@ -7075,7 +6874,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   TGeoPgon* endcapsupportmothershape[klayernumber];
   TGeoVolume** endcapsupportmother;
   endcapsupportmother = new TGeoVolume*[klayernumber];
-  char endcapsupportmothername[30];
+  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);
@@ -7083,7 +6882,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
     endcapsupportmothershape[i]->DefineSection(1,fgkEndCapSupportHighWidth,
                                                                                          ydownvertex[i][0],yupvertex[i][1]);
     endcapsupportmother[i] = new TGeoVolume(endcapsupportmothername,endcapsupportmothershape[i],
-                                                                                       fSSDCoolingTubePhynox); 
+                                                                                       fSSDAir);       
   }
   ////////////////////////////////////
   TGeoRotation** endcapsupportrot[klayernumber];
@@ -7127,7 +6926,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   // Setting TGeoPgon Volume for Mother Container
   ///////////////////////////////////////////////
   TGeoPgon* endcapsupportsystemshape[klayernumber];
-  char endcapsupportsystemothername[30];
+  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);
@@ -7144,6 +6943,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
                                                                                           +2.*endcapassemblycenter[2])
                                                                                           /CosD(0.5*upedgeangle[i]));
   }
+  fgkEndCapSupportSystem = new TGeoVolume*[4];
   fgkEndCapSupportSystem[0] = new TGeoVolume("EndCapSupportSystemLayer5Sx",
                                                                          endcapsupportsystemshape[0],fSSDAir); 
   fgkEndCapSupportSystem[1] = new TGeoVolume("EndCapSupportSystemLayer5Dx",
@@ -7198,7 +6998,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
        for(Int_t j=0; j<kssdlayladdernumber[i]+2; j++){
                delete endcapassemblyrot[i][j];
        }
-       delete endcapassemblyrot[i];
+       delete [] endcapassemblyrot[i];
        delete endcapassemblymatrix[i][0];
        delete endcapassemblymatrix[i][1];
   }
@@ -7209,11 +7009,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   // Setting End Cap Support + End Cap Assembly of Layer 5. 
   /////////////////////////////////////////////////////////////
   if (! moth) {
-    printf("Error::AliITSv11GeometrySSD: Can't insert end cap support of layer5, mother is null!\n");
+    AliError("Can't insert end cap support of layer5, mother is null!\n");
     return;
   };
-  if(!fgkEndCapSupportSystem[0]) SetEndCapSupportAssembly();
-  if(!fgkEndCapSupportSystem[1]) SetEndCapSupportAssembly();
+  if(!fgkEndCapSupportSystem) SetEndCapSupportAssembly();
   TGeoTranslation* endcapsupportsystemITSCentertrans[2];
   endcapsupportsystemITSCentertrans[0] = new TGeoTranslation(0.,0.,
                                                                                                fgkEndCapSupportCenterLay5ITSPosition
@@ -7241,11 +7040,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   // Setting End Cap Support + End Cap Assembly of Layer 6. 
   /////////////////////////////////////////////////////////////
   if (! moth) {
-    printf("Error::AliITSv11GeometrySSD: Can't insert end cap support of layer6, mother is null!\n");
+    AliError("Can't insert end cap support of layer6, mother is null!\n");
     return;
   };
-  if(!fgkEndCapSupportSystem[2]) SetEndCapSupportAssembly();
-  if(!fgkEndCapSupportSystem[3]) SetEndCapSupportAssembly();
+  if(!fgkEndCapSupportSystem) SetEndCapSupportAssembly();
   TGeoTranslation* endcapsupportsystemITSCentertrans[2];
   endcapsupportsystemITSCentertrans[0] = new TGeoTranslation(0.,0.,
                                                                                                fgkEndCapSupportCenterLay6ITSPosition
@@ -7273,7 +7071,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   // Setting Ladder Support of Layer 5. 
   /////////////////////////////////////////////////////////////
   if (! moth) {
-    printf("Error::AliITSv11GeometrySSD: Can't insert ladder lupport of layer5, mother is null!\n");
+    AliError("Can't insert ladder lupport of layer5, mother is null!\n");
     return;
   };
   if(!fLay5LadderSupportRing) SetLadderSupport(100);
@@ -7291,7 +7089,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   // Setting Ladder Support of Layer 6. 
   /////////////////////////////////////////////////////////////
   if (! moth) {
-    printf("Error::AliITSv11GeometrySSD: Can't insert ladder lupport of layer6, mother is null!\n");
+    AliError("Can't insert ladder lupport of layer6, mother is null!\n");
     return;
   };
   if(!fLay6LadderSupportRing) SetLadderSupport(100);
@@ -7304,37 +7102,906 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   }
  }
  ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::SSDCone(TGeoVolume* moth){
+  /////////////////////////////////////////////////////////////
+  // Setting Ladder Support of Layer 6. 
+  /////////////////////////////////////////////////////////////
+  if (! moth) {
+    AliError("Can't insert SSD Cone, mother is null!\n");
+    return;
+  };
+  if(!fSSDCone) SetSSDCone();
+  TGeoTranslation* ssdconetrans = new TGeoTranslation(0.,0.,0.5*fgkSSDCentralSupportLength
+                                                               +                                         fgkSSDCentralAL3SupportLength);
+    moth->AddNode(fSSDCone,1,ssdconetrans);
+}
+ ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::SetSSDCone(){
+  /////////////////////////////////////////////////////////////
+  // Method generating SSDCone 
+  /////////////////////////////////////////////////////////////
+  if(!fCreateMaterials) CreateMaterials();
+  fSSDCone = new TGeoVolumeAssembly("ITSssdCone");
+  Double_t ssdpconesectionradiusmax[16];
+  Double_t ssdpconesectionradiusmin[16];
+  Double_t ssdpconezsection[16];
+  TGeoPcon* ssdpconelittleholeshape[8];
+  TGeoVolume* ssdpconelittlehole[8];
+  ssdpconezsection[0] = (fgkSSDPConeZLength[0]-fgkSSDPConeZLength[1]);
+  ssdpconesectionradiusmin[0] = fgkSSDLowerPConeRadius;
+  ssdpconesectionradiusmax[0] = ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
+                                                     / SinD(fgkSSDPConeAngle)
+                                                         + ssdpconesectionradiusmin[0];
+  ssdpconesectionradiusmin[1] = fgkSSDPConeLittleHoleRadius
+                                                         - ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
+                                                         / SinD(fgkSSDPConeAngle);
+  ssdpconesectionradiusmax[1] = fgkSSDPConeLittleHoleRadius; 
+  ssdpconezsection[1] = (ssdpconesectionradiusmin[1]-ssdpconesectionradiusmin[0])
+                                         * TanD(fgkSSDPConeAngle)+ssdpconezsection[0];
+  ssdpconelittleholeshape[0] = new TGeoPcon(0.,360.,2);    
+  for(Int_t i=0; i<2;i++) ssdpconelittleholeshape[0]->DefineSection(i,ssdpconezsection[i],
+                                                 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]); 
+  ssdpconelittlehole[0] = new TGeoVolume("SSDConeLittleHole1",ssdpconelittleholeshape[0],fSSDCarbonFiberMedium);
+  ssdpconelittlehole[0]->SetLineColor(4);
+  /////////////////////////////////////////////////////////////
+  ssdpconezsection[2] = ssdpconezsection[1];  
+  ssdpconesectionradiusmin[2] = ssdpconesectionradiusmin[1];
+  ssdpconesectionradiusmax[2] = ssdpconesectionradiusmax[1];
+  ssdpconesectionradiusmin[3] = fgkSSDPConeLittleHoleRadius+fgkSSDPConeLittleHoleLength
+                                                         - ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
+                                                         / SinD(fgkSSDPConeAngle);
+  ssdpconesectionradiusmax[3] = ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
+                                                         / SinD(fgkSSDPConeAngle)+ssdpconesectionradiusmin[3];
+  ssdpconezsection[3] = (ssdpconesectionradiusmin[3]-ssdpconesectionradiusmin[2])
+                                         * TanD(fgkSSDPConeAngle)+ssdpconezsection[2];
+  Double_t ssdpconelittleholeangle = fgkSSDPConeLittleHoleLength/fgkSSDPConeLittleHoleRadius
+                                                                  * TMath::RadToDeg();
+  ssdpconelittleholeshape[1] = new TGeoPcon(30.+0.5*ssdpconelittleholeangle,
+                                                                                                         60.-ssdpconelittleholeangle,2);    
+  for(Int_t i=2;i<4;i++) ssdpconelittleholeshape[1]->DefineSection(i-2,ssdpconezsection[i],
+                                                 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]); 
+  ssdpconelittlehole[1] = new TGeoVolume("SSDConeLittleHole2",ssdpconelittleholeshape[1],fSSDCarbonFiberMedium);
+  ssdpconelittlehole[1]->SetLineColor(4);
+  TGeoRotation* ssdconelittleholerot[6];
+  for(Int_t i=0; i<6; i++){
+       ssdconelittleholerot[i] = new TGeoRotation();
+    ssdconelittleholerot[i]->SetAngles(i*60,0.,0.);
+  }
+  /////////////////////////////////////////////////////////////
+  ssdpconezsection[4] = ssdpconezsection[3];  
+  ssdpconesectionradiusmin[4] = ssdpconesectionradiusmin[3];
+  ssdpconesectionradiusmax[4] = ssdpconesectionradiusmax[3];
+  ssdpconesectionradiusmin[5] = fgkSSDConeMiddleRadius-ssdpconezsection[0]
+                                                         * CosD(fgkSSDPConeAngle)
+                                                         / SinD(fgkSSDPConeAngle);
+  ssdpconesectionradiusmax[5] = fgkSSDConeMiddleRadius;
+  ssdpconezsection[5] = (ssdpconesectionradiusmin[5]-ssdpconesectionradiusmin[4])
+                                         * TanD(fgkSSDPConeAngle)+ssdpconezsection[4];
+  ssdpconelittleholeshape[2] = new TGeoPcon(0.,360.,2);
+  for(Int_t i=4; i<6;i++) ssdpconelittleholeshape[2]->DefineSection(i-4,ssdpconezsection[i],
+                                                 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]); 
+  ssdpconelittlehole[2] = new TGeoVolume("SSDConeLittleHole3",ssdpconelittleholeshape[2],fSSDCarbonFiberMedium);
+  ssdpconelittlehole[2]->SetLineColor(4);
+  ///////////////////////////////////////////////////
+  ssdpconezsection[6] = ssdpconezsection[5];  
+  ssdpconesectionradiusmin[6] = ssdpconesectionradiusmin[5];
+  ssdpconesectionradiusmax[6] = ssdpconesectionradiusmax[5];
+  ssdpconesectionradiusmin[7] = fgkSSDConeMiddleRadius+fgkSSDPConeMiddleLength
+                                                         -ssdpconezsection[0]
+                                                         * CosD(fgkSSDPConeAngle)
+                                                         / SinD(fgkSSDPConeAngle);
+  ssdpconesectionradiusmax[7] = fgkSSDConeMiddleRadius+fgkSSDPConeMiddleLength;
+  ssdpconezsection[7] = (ssdpconesectionradiusmin[7]-ssdpconesectionradiusmin[6])
+                                         * TanD(fgkSSDPConeAngle)+ssdpconezsection[6];
+  Double_t ssdpconemiddleholeangle = fgkSSDPConeMiddleWidth/fgkSSDConeMiddleRadius
+                                                                  * TMath::RadToDeg();
+  ssdpconelittleholeshape[3] = new TGeoPcon(22.5+0.5*ssdpconemiddleholeangle,
+                                                                                                         45.-ssdpconemiddleholeangle,2);    
+  for(Int_t i=6;i<8;i++) ssdpconelittleholeshape[3]->DefineSection(i-6,ssdpconezsection[i],
+                                                 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]); 
+  ssdpconelittlehole[3] = new TGeoVolume("SSDConeLittleHole4",ssdpconelittleholeshape[3],fSSDCarbonFiberMedium);
+  ssdpconelittlehole[3]->SetLineColor(4);
+  TGeoRotation* ssdconemiddleholerot[8];
+  for(Int_t i=0; i<8; i++){
+       ssdconemiddleholerot[i] = new TGeoRotation();
+    ssdconemiddleholerot[i]->SetAngles(i*45,0.,0.);
+  }
+  /////////////////////////////////////////////////////////////
+  ssdpconezsection[8] = ssdpconezsection[7];  
+  ssdpconesectionradiusmin[8] = ssdpconesectionradiusmin[7];
+  ssdpconesectionradiusmax[8] = ssdpconesectionradiusmax[7];
+  ssdpconesectionradiusmin[9] = fgkSSDPConeUpRadius-ssdpconezsection[0]
+                                                         * CosD(fgkSSDPConeAngle)
+                                                         / SinD(fgkSSDPConeAngle);
+  ssdpconesectionradiusmax[9] = fgkSSDPConeUpRadius;
+  ssdpconezsection[9] = (ssdpconesectionradiusmin[9]-ssdpconesectionradiusmin[8])
+                                         * TanD(fgkSSDPConeAngle)+ssdpconezsection[8];
+  ssdpconelittleholeshape[4] = new TGeoPcon(0.,360.,2);
+  for(Int_t i=8; i<10;i++) ssdpconelittleholeshape[4]->DefineSection(i-8,ssdpconezsection[i],
+                                                 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]); 
+  ssdpconelittlehole[4] = new TGeoVolume("SSDConeLittleHole5",ssdpconelittleholeshape[4],fSSDCarbonFiberMedium);
+  ssdpconelittlehole[4]->SetLineColor(4);
+  /////////////////////////////////////////////////////////////
+  Double_t ssdconetrapezoidheight = fgkSSDPConeUpMaxRadius-fgkSSDPConeUpRadius;
+  Double_t ssdconetrapezoidbasis = fgkSSDPConeTrapezoidBasis-2.0
+                                                                * (0.5*ssdconetrapezoidheight/TanD(fgkSSDPConeTrapezoidAngle)
+                                                                -  0.5*ssdconetrapezoidheight/(fgkSSDPConeUpMaxRadius
+                                                                -  0.5*ssdconetrapezoidheight)*(0.5*fgkSSDPConeTrapezoidBasis
+                                                                -  0.5*ssdconetrapezoidheight/TanD(fgkSSDPConeTrapezoidAngle)));
+  Double_t ssdconetrapezoidsection = (2.0*TMath::Pi()*fgkSSDPConeUpMaxRadius-8.0*ssdconetrapezoidbasis)/8.;
+  Double_t ssdpconetrapezoidsectionangle = ssdconetrapezoidsection/fgkSSDPConeUpMaxRadius
+                                                                                * TMath::RadToDeg();
+  ssdpconezsection[10] = ssdpconezsection[9];
+  ssdpconesectionradiusmin[10] = ssdpconesectionradiusmin[9];
+  ssdpconesectionradiusmax[10] = ssdpconesectionradiusmax[9];
+  ssdpconesectionradiusmin[11] = fgkSSDPConeUpMaxRadius-ssdpconezsection[0]
+                                                         * CosD(fgkSSDPConeAngle)
+                                                         / SinD(fgkSSDPConeAngle);
+  ssdpconesectionradiusmax[11] = fgkSSDPConeUpMaxRadius;
+  ssdpconezsection[11] = (ssdpconesectionradiusmin[11]-ssdpconesectionradiusmin[10])
+                                          * TanD(fgkSSDPConeAngle)+ssdpconezsection[10];
+  ssdpconelittleholeshape[5] = new TGeoPcon(90.-0.5*ssdpconetrapezoidsectionangle,
+                                                                                       ssdpconetrapezoidsectionangle,2);    
+  for(Int_t i=10;i<12;i++) ssdpconelittleholeshape[5]->DefineSection(i-10,ssdpconezsection[i],
+                                                 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]); 
+  ssdpconelittlehole[5] = new TGeoVolume("SSDConeLittleHole6",ssdpconelittleholeshape[5],fSSDCarbonFiberMedium);
+  ssdpconelittlehole[5]->SetLineColor(4);
+  TGeoRotation* ssdconeupradiusrot[8];
+  for(Int_t i=0; i<8; i++){
+       ssdconeupradiusrot[i] = new TGeoRotation();
+    ssdconeupradiusrot[i]->SetAngles(i*45,0.,0.);
+  }
+  /////////////////////////////////////////////////////////////
+  ssdpconezsection[12] = ssdpconezsection[11];
+  ssdpconezsection[13] = ssdpconezsection[12]+fgkSSDPConeRadiusWidth;  
+  ssdpconesectionradiusmin[12] = ssdpconesectionradiusmin[11]; 
+  ssdpconesectionradiusmax[12] = fgkSSDPConeExternalRadius;
+  ssdpconesectionradiusmin[13] = ssdpconesectionradiusmin[12];
+  ssdpconesectionradiusmax[13] = fgkSSDPConeExternalRadius;
+  ssdpconelittleholeshape[6] = new TGeoPcon(0.,360.,2);
+  for(Int_t i=12; i<14;i++) ssdpconelittleholeshape[6]->DefineSection(i-12,ssdpconezsection[i],
+                                                 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]); 
+  ssdpconelittlehole[6] = new TGeoVolume("SSDConeLittleHole7",ssdpconelittleholeshape[6],fSSDCarbonFiberMedium);
+  ssdpconelittlehole[6]->SetLineColor(4);
+  /////////////////////////////////////////////////////////////
+  ssdpconezsection[14] = 0.0;
+  ssdpconezsection[15] = ssdpconezsection[0];
+  ssdpconesectionradiusmin[14] = ssdpconesectionradiusmin[0];
+  ssdpconesectionradiusmax[14] = ssdpconesectionradiusmin[14];
+  ssdpconesectionradiusmin[15] = ssdpconesectionradiusmin[0];
+  ssdpconesectionradiusmax[15] = ssdpconesectionradiusmax[0];
+  ssdpconelittleholeshape[7] = new TGeoPcon(0.,360.,2);
+  for(Int_t i=14; i<16;i++) ssdpconelittleholeshape[7]->DefineSection(i-14,ssdpconezsection[i],
+                                                 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]); 
+  ssdpconelittlehole[7] = new TGeoVolume("SSDConeLittleHole8",ssdpconelittleholeshape[7],fSSDCarbonFiberMedium);
+  ssdpconelittlehole[7]->SetLineColor(4);
+  /////////////////////////////////////////////////////////////
+  TGeoTube* ssdtubeconeshape[2];
+  TGeoVolume* ssdtubecone[2];
+  TGeoTranslation* ssdtubeconetrans[2];
+  ssdtubeconeshape[0] = new TGeoTube(fgkSSDPConeUpMiddleRadius,
+                                                                          fgkSSDPConeExternalRadius,
+                                                                          0.5*(fgkSSDPConeLength-ssdpconezsection[13]));
+  ssdtubeconeshape[1] = new TGeoTube(fgkSSDPConeDownRadius,ssdpconesectionradiusmin[0],
+                                                                          0.5*ssdpconezsection[0]); 
+  ssdtubecone[0] = new TGeoVolume("SSDConeTube1",ssdtubeconeshape[0],fSSDSupportRingAl);
+  ssdtubecone[1] = new TGeoVolume("SSDConeTube2",ssdtubeconeshape[1],fSSDSupportRingAl);
+  ssdtubeconetrans[0] = new TGeoTranslation(0.,0.,
+                                               0.5*(fgkSSDPConeLength-ssdpconezsection[13])
+                                         + ssdpconezsection[13]);
+  ssdtubeconetrans[1] = new TGeoTranslation(0.,0.,0.5*ssdpconezsection[0]);
+  ssdtubecone[0]->SetLineColor(4);
+  ssdtubecone[1]->SetLineColor(4);
+  /////////////////////////////////////////////////////////////
+  // Mother Volume Container
+  /////////////////////////////////////////////////////////////
+  Double_t ssdconemotherradiusmin[8];
+  Double_t ssdconemotherradiusmax[8];
+  Double_t ssdconemothersection[8]; 
+  ssdconemotherradiusmin[0] = fgkSSDPConeDownRadius;
+  ssdconemotherradiusmax[0] = ssdpconesectionradiusmin[0];
+  ssdconemotherradiusmin[1] = fgkSSDPConeDownRadius;
+  ssdconemotherradiusmax[1] = ssdpconesectionradiusmax[0];
+  ssdconemotherradiusmin[2] = ssdpconesectionradiusmin[0];
+  ssdconemotherradiusmax[2] = ssdpconesectionradiusmax[0];
+  ssdconemotherradiusmin[3] = ssdpconesectionradiusmin[11];
+  ssdconemotherradiusmax[3] = ssdpconesectionradiusmax[11];
+  ssdconemotherradiusmin[4] = ssdpconesectionradiusmin[12];
+  ssdconemotherradiusmax[4] = ssdpconesectionradiusmax[12];
+  ssdconemotherradiusmin[5] = ssdpconesectionradiusmin[13];
+  ssdconemotherradiusmax[5] = ssdpconesectionradiusmax[13];
+  ssdconemotherradiusmin[6] = fgkSSDPConeUpMiddleRadius;
+  ssdconemotherradiusmax[6] = fgkSSDPConeExternalRadius;
+  ssdconemotherradiusmin[7] = fgkSSDPConeUpMiddleRadius;
+  ssdconemotherradiusmax[7] = fgkSSDPConeExternalRadius;
+  ssdconemothersection[0] = 0.0;
+  ssdconemothersection[1] = ssdpconezsection[0];
+  ssdconemothersection[2] = ssdpconezsection[0];
+  ssdconemothersection[3] = ssdpconezsection[11];
+  ssdconemothersection[4] = ssdpconezsection[11];
+  ssdconemothersection[5] = ssdpconezsection[13];
+  ssdconemothersection[6] = ssdpconezsection[13];
+  ssdconemothersection[7] = fgkSSDPConeLength;
+  TGeoPcon* ssdconemothershape = new TGeoPcon(0.,360,8);
+  for(Int_t i=0; i<8; i++) ssdconemothershape->DefineSection(i,ssdconemothersection[i],
+                                                                       ssdconemotherradiusmin[i],ssdconemotherradiusmax[i]);
+  TGeoVolume* ssdconemother = new TGeoVolume("SSDMotherCone",ssdconemothershape,fSSDAir);
+  /////////////////////////////////////////////////////////////
+  //Placing the Volumes into Mother 
+  /////////////////////////////////////////////////////////////
+  ssdconemother->AddNode(ssdpconelittlehole[0],1);
+  for(Int_t i=0; i<6; i++){
+       ssdconemother->AddNode(ssdpconelittlehole[1],i+1,ssdconelittleholerot[i]);
+  }
+  ssdconemother->AddNode(ssdpconelittlehole[2],1);
+  for(Int_t i=0; i<8; i++){
+    ssdconemother->AddNode(ssdpconelittlehole[3],i+1,ssdconemiddleholerot[i]);
+  }
+  ssdconemother->AddNode(ssdpconelittlehole[4],1);
+  for(Int_t i=0; i<8; i++){
+    ssdconemother->AddNode(ssdpconelittlehole[5],i+1,ssdconeupradiusrot[i]);
+  }
+  ssdconemother->AddNode(ssdpconelittlehole[6],1);
+  ssdconemother->AddNode(ssdpconelittlehole[7],1);
+  ssdconemother->AddNode(ssdtubecone[0],1,ssdtubeconetrans[0]);
+  ssdconemother->AddNode(ssdtubecone[1],1,ssdtubeconetrans[1]);
+  /////////////////////////////////////////////////////////////
+  // ITS General Support
+  /////////////////////////////////////////////////////////////
+  TGeoTube* ssdcentralsupportshape = new TGeoTube(fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth,
+                                                               fgkSSDCentralSupportRadius,0.5*fgkSSDCentralSupportLength); 
+  TGeoVolume* ssdcentralsupport = new TGeoVolume("SSDCentralSupport",ssdcentralsupportshape,fSSDRohaCellCone);
+  TGeoTranslation* ssdcentralsupportrans = new TGeoTranslation(0.,0.,-0.5*fgkSSDCentralSupportLength
+                                                                            - fgkSSDCentralAL3SupportLength);
+  ssdcentralsupport->SetLineColor(4);
+  fSSDCone->AddNode(ssdcentralsupport,1,ssdcentralsupportrans);
+  TGeoTube* ssdcentralal3supportshape = new TGeoTube(fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth,
+                                                               fgkSSDCentralSupportRadius,0.25*fgkSSDCentralAL3SupportLength);
+  TGeoVolume* ssdcentralal3support = new TGeoVolume("SSDCentralAl3Support",ssdcentralal3supportshape,fSSDSupportRingAl);
+  TGeoTranslation* ssdcentralal3supportrans[3]; 
+  ssdcentralal3supportrans[0] = new TGeoTranslation(0.,0.,-0.75*fgkSSDCentralAL3SupportLength);
+  ssdcentralal3supportrans[1] = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
+                                                         - 1.25*fgkSSDCentralAL3SupportLength);
+  ssdcentralal3support->SetLineColor(4);
+  fSSDCone->AddNode(ssdcentralal3support,1,ssdcentralal3supportrans[0]);
+  fSSDCone->AddNode(ssdcentralal3support,2,ssdcentralal3supportrans[1]);
+  TGeoPcon* ssdpconcentralal3shape = new TGeoPcon(0.,360.,2);
+  Double_t ssdpconcentralradiusmin[2];
+  Double_t ssdpconcentralradiusmax[2];
+  Double_t ssdpconcentralsection[2];
+  ssdpconcentralradiusmin[0] = fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth;  
+  ssdpconcentralradiusmin[1] = fgkSSDCentralSupportRadius-fgkSSDCentralAL3SupportWidth;  
+  ssdpconcentralradiusmax[0] = fgkSSDCentralSupportRadius;
+  ssdpconcentralradiusmax[1] = fgkSSDCentralSupportRadius;
+  ssdpconcentralsection[0] = -0.5*fgkSSDCentralAL3SupportLength; 
+  ssdpconcentralsection[1] = 0.;
+  for(Int_t i=0; i<2;i++) ssdpconcentralal3shape->DefineSection(i,ssdpconcentralsection[i],
+                                                 ssdpconcentralradiusmin[i],ssdpconcentralradiusmax[i]); 
+  TGeoVolume* ssdpconcentralal3 = new TGeoVolume("SSDPConeCentralAl3",ssdpconcentralal3shape,fSSDSupportRingAl);
+  ssdpconcentralal3->SetLineColor(4);
+  fSSDCone->AddNode(ssdpconcentralal3,1);
+  TGeoRotation* ssdcentralal3supportrot = new TGeoRotation();
+  ssdcentralal3supportrot->SetAngles(90.,180,-90.);
+  ssdcentralal3supportrans[2] = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
+                                                               -2.*fgkSSDCentralAL3SupportLength);
+  TGeoCombiTrans* ssdcentralal3supporcombitrans = new TGeoCombiTrans(*ssdcentralal3supportrans[2],
+                                                                                                                    *ssdcentralal3supportrot);
+  fSSDCone->AddNode(ssdpconcentralal3,2,ssdcentralal3supporcombitrans);
+  TGeoRotation* ssdconemotherot = new TGeoRotation();
+  ssdconemotherot->SetAngles(90.,180.,-90.);
+  TGeoTranslation* ssdconemothertrans = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
+                                                                                                                       -2.*fgkSSDCentralAL3SupportLength);
+  TGeoCombiTrans* ssdconemothercombitrans = new TGeoCombiTrans(*ssdconemothertrans,*ssdconemotherot);
+  fSSDCone->AddNode(ssdconemother,1);
+  fSSDCone->AddNode(ssdconemother,2,ssdconemothercombitrans);
+  /////////////////////////////////////////////////////////////
+  // Deallocating memory
+  /////////////////////////////////////////////////////////////
+  delete ssdcentralal3supportrot;
+  delete ssdcentralal3supportrans[2];
+  delete ssdconemotherot;
+  delete ssdconemothertrans;
+  /////////////////////////////////////////////////////////////
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::SSDCables(TGeoVolume* moth){
+  /////////////////////////////////////////////////////////////
+  // Setting SSD Cables
+  /////////////////////////////////////////////////////////////
+  if (! moth) {
+    AliError("Can't insert SSD Cables, mother is null!\n");
+    return;
+  };
+  TGeoVolume* ssdcables = SetSSDCables();
+  moth->AddNode(ssdcables,1);
+}
+ ////////////////////////////////////////////////////////////////////////////////
+ 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);
+  ////////////////////////////////////
+  //  Double_t cablescapacity[20];
+  //  cablescapacity[0] = ssdcablelay5rightubeshape->Capacity();
+  ////////////////////////////////////
+  ssdcablesmother->AddNode(ssdcablelay5righttube,1,ssdcablelay5rightrans);
+  ////////////////////////////////////
+  // TGeoPCone Volumes
+  ///////////////////////////////////
+  TGeoPcon* ssdcableslay5pconshape[3];
+  TGeoVolume* ssdcableslay5pcon[3]; 
+  ssdcableslay5pconshape[0] = new TGeoPcon(0.,360.,2);   
+  Double_t ssdcableslay5pconzsection[6];
+  Double_t ssdcableslay5pconrmin[6];
+  Double_t ssdcableslay5pconrmax[6];
+  ssdcableslay5pconrmin[0] = ssdcablelay5rightubeshape->GetRmin();
+  ssdcableslay5pconrmax[0] = ssdcablelay5rightubeshape->GetRmax();
+  ssdcableslay5pconrmin[1] = fgkSSDPConeUpRadius*(1.0+ssdcablelayvertical);
+  ssdcableslay5pconrmax[1] = ssdcableslay5pconrmin[1]+fgkSSDCablesLay5RightSideHeight;
+  ssdcableslay5pconzsection[0] = fgkEndCapSupportCenterLay5ITSPosition
+                                                          + fgkEndCapSupportCenterLay5Position
+                                                          + 2.*ssdcablelay5rightubeshape->GetDz();
+  ssdcableslay5pconzsection[1] = 0.5*fgkSSDCentralSupportLength
+                                                          + fgkSSDCentralAL3SupportLength
+                                                          + (fgkSSDPConeUpRadius-fgkSSDLowerPConeRadius)
+                                                          * TanD(fgkSSDPConeAngle);      
+  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);
+////////////////////////////////////
+//  cablescapacity[1] = ssdcableslay5pconshape[0]->Capacity();
+////////////////////////////////////
+  ssdcableslay5pconzsection[2] = ssdcableslay5pconzsection[1];
+  ssdcableslay5pconzsection[3] = 0.5*fgkSSDCentralSupportLength
+                                                          + fgkSSDCentralAL3SupportLength
+                                                          + 0.25*TanD(fgkSSDPConeAngle)*(fgkSSDPConeUpMaxRadius
+                                                          + 3.*fgkSSDPConeUpRadius-4.*fgkSSDLowerPConeRadius);
+  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);   
+  ssdcableslay5pconrmin[2] = ssdcableslay5pconrmin[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;
+  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,
+                                                                                  ssdcableangle,2);   
+  ssdcableslay5pconrmin[4] = ssdcableslay5pconrmin[3];
+  ssdcableslay5pconrmax[4] = ssdcableslay5pconrmax[3];
+  ssdcableslay5pconrmin[5] = ssdcableslay5pconrmin[4];
+  ssdcableslay5pconrmax[5] = ssdcableslay5pconrmax[4];
+  ssdcableslay5pconzsection[4] = ssdcableslay5pconzsection[3];
+  ssdcableslay5pconzsection[5] = (ssdcableslay5pconrmin[5]-fgkSSDLowerPConeRadius)
+                                                          * TanD(fgkSSDPConeAngle)
+                                                          + 0.5*fgkSSDCentralSupportLength
+                                                          + fgkSSDCentralAL3SupportLength;
+  ssdcableslay5pconzsection[5]-= ssdcablelaylateral;
+  for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[2]->DefineSection(i,ssdcableslay5pconzsection[i+4],
+                                                 ssdcableslay5pconrmin[i+4],ssdcableslay5pconrmax[i+4]); 
+  ssdcableslay5pcon[2] = new TGeoVolume("SSDCableLay5RightSidePCon3",ssdcableslay5pconshape[2],fSSDCopper);
+  ssdcableslay5pcon[2]->SetLineColor(9);
+////////////////////////////////////
+  TGeoRotation* ssdcableslay5pconrot[4];       
+  for(Int_t i=0; i<4; i++){
+   ssdcableslay5pconrot[i] = new TGeoRotation();
+   ssdcableslay5pconrot[i]->SetAngles(90.0*i,0.,0.);
+   ssdcablesmother->AddNode(ssdcableslay5pcon[1],i+1,ssdcableslay5pconrot[i]);
+   ssdcablesmother->AddNode(ssdcableslay5pcon[2],i+1,ssdcableslay5pconrot[i]);         
+  }
+  ////////////////////////////////////
+  //cablescapacity[2] = 4.0*ssdcableslay5pconshape[1]->Capacity();
+  //cablescapacity[3] = 4.0*ssdcableslay5pconshape[2]->Capacity();
+  ////////////////////////////////////
+  // 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);  
+  TGeoHMatrix* ssdcablesLay5RightPConToLeftMatrix[4];  
+  for(Int_t i=0; i<4; i++){ ssdcablesLay5RightPConToLeftMatrix[i] = 
+       new TGeoHMatrix((*ssdcablesLay5RightPConToLeftRot)*(*ssdcableslay5pconrot[i]));
+       ssdcablesmother->AddNode(ssdcableslay5pcon[1],i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
+    ssdcablesmother->AddNode(ssdcableslay5pcon[2],i+5,ssdcablesLay5RightPConToLeftMatrix[i]);          
+  }
+  ////////////////////////////////////
+  //cablescapacity[4] = ssdcablelay5rightubeshape->Capacity();
+  //cablescapacity[5] = ssdcableslay5pconshape[0]->Capacity();
+  //cablescapacity[6] = 4.*ssdcableslay5pconshape[1]->Capacity();
+  //cablescapacity[7] = 4.*ssdcableslay5pconshape[2]->Capacity();
+  /////////////////////////////////////////////////////////////
+  // Water Tubes Layer 5
+  /////////////////////////
+  TGeoTube* ssdcablelay5rightubewatershape = new TGeoTube(ssdcableslay5rightsideradiusmax,
+                                                                                    ssdcableslay5rightsideradiusmax
+                                                                              + fgkSSDCablesLay5RightSideWaterHeight,
+                                                                                    0.5*ssdcablelay5rightsidelength); 
+  TGeoVolume* ssdcablelay5rightwatertube = new TGeoVolume("SSDCableLay5RightSideWaterTube",
+                                                                                                        ssdcablelay5rightubewatershape,
+                                                                                                        fSSDCoolingTubeWater);
+  ssdcablelay5rightwatertube->SetLineColor(7);
+  ssdcablesmother->AddNode(ssdcablelay5rightwatertube,1,ssdcablelay5rightrans);
+  ssdcablesmother->AddNode(ssdcablelay5rightwatertube,2,ssdcablesLay5RightTubeToLeftrans);
+  ////////////////////////////////////
+  // TGeoPCone Water Volumes Layer 
+  ///////////////////////////////////
+  TGeoPcon* ssdcableslay5pconwatershape[3];
+  TGeoVolume* ssdcableslay5pconwater[3]; 
+  ssdcableslay5pconwatershape[0] = new TGeoPcon(0.,360.,2);   
+  Double_t ssdcableslay5pconwaterzsection[6];
+  Double_t ssdcableslay5pcwateronrmin[6];
+  Double_t ssdcableslay5pconwaterrmax[6];
+  ssdcableslay5pcwateronrmin[0] = ssdcableslay5pconrmax[0];
+  ssdcableslay5pconwaterrmax[0] = ssdcableslay5pcwateronrmin[0]
+                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+  ssdcableslay5pcwateronrmin[1] = ssdcableslay5pconrmax[1];
+  ssdcableslay5pconwaterrmax[1] = ssdcableslay5pcwateronrmin[1]
+                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+  ssdcableslay5pconwaterzsection[0] = ssdcableslay5pconzsection[0];
+  ssdcableslay5pconwaterzsection[1] = ssdcableslay5pconzsection[1];
+  for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[0]->DefineSection(i,ssdcableslay5pconwaterzsection[i],
+                                                 ssdcableslay5pcwateronrmin[i],ssdcableslay5pconwaterrmax[i]); 
+  ssdcableslay5pconwater[0] = new TGeoVolume("SSDCableLay5RightSidePConWater1",
+                                                          ssdcableslay5pconwatershape[0],fSSDCoolingTubeWater);
+  ssdcableslay5pconwater[0]->SetLineColor(7);
+  ssdcablesmother->AddNode(ssdcableslay5pconwater[0],1);
+  ssdcablesmother->AddNode(ssdcableslay5pconwater[0],2,ssdcablesLay5RightPConToLeftRot);
+////////////////////////////////////
+  ssdcableslay5pconwaterzsection[2] = ssdcableslay5pconzsection[2];
+  ssdcableslay5pconwaterzsection[3] = ssdcableslay5pconzsection[3];
+  ssdcableslay5pconwatershape[1] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
+                                                                                               ssdcableangle,2);   
+  ssdcableslay5pcwateronrmin[2] = ssdcableslay5pconrmax[1];
+  ssdcableslay5pconwaterrmax[2] = ssdcableslay5pcwateronrmin[2]
+                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+  ssdcableslay5pcwateronrmin[3] = ssdcableslay5pconrmax[3];
+  ssdcableslay5pconwaterrmax[3] = ssdcableslay5pcwateronrmin[3]
+                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+  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,
+                                                                                               ssdcableangle,2);   
+  ssdcableslay5pcwateronrmin[4] = ssdcableslay5pconrmax[3];
+  ssdcableslay5pconwaterrmax[4] = ssdcableslay5pcwateronrmin[4]
+                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+  ssdcableslay5pcwateronrmin[5] = ssdcableslay5pconrmax[4];
+  ssdcableslay5pconwaterrmax[5] = ssdcableslay5pcwateronrmin[4]
+                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+  ssdcableslay5pconwaterzsection[4] = ssdcableslay5pconzsection[4];
+  ssdcableslay5pconwaterzsection[5] = ssdcableslay5pconzsection[5];
+  for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[2]->DefineSection(i,ssdcableslay5pconwaterzsection[i+4],
+                                                 ssdcableslay5pcwateronrmin[i+4],ssdcableslay5pconwaterrmax[i+4]); 
+  ssdcableslay5pconwater[2] = new TGeoVolume("SSDCableLay5RightSidePConWater3",
+                                                          ssdcableslay5pconwatershape[2],fSSDCoolingTubeWater);
+  ssdcableslay5pconwater[2]->SetLineColor(7);
+////////////////////////////////////
+  TGeoRotation* ssdcableslay5pconwaterot[4];   
+  TGeoHMatrix* ssdcablesLay5RightPConWaterToLeftMatrix[4];  
+  for(Int_t i=0; i<4; i++){
+   ssdcableslay5pconwaterot[i] = new TGeoRotation();
+   ssdcableslay5pconwaterot[i]->SetAngles(90.0*i+45.0,0.,0.);
+   ssdcablesLay5RightPConWaterToLeftMatrix[i] = 
+       new TGeoHMatrix((*ssdcablesLay5RightPConToLeftRot)*(*ssdcableslay5pconwaterot[i]));
+       ssdcablesmother->AddNode(ssdcableslay5pconwater[1],i+1,ssdcableslay5pconwaterot[i]);
+       ssdcablesmother->AddNode(ssdcableslay5pconwater[1],i+5,ssdcablesLay5RightPConWaterToLeftMatrix[i]);
+       ssdcablesmother->AddNode(ssdcableslay5pconwater[2],i+1,ssdcableslay5pconwaterot[i]);
+       ssdcablesmother->AddNode(ssdcableslay5pconwater[2],i+5,ssdcablesLay5RightPConWaterToLeftMatrix[i]);
+  }
+  /////////////////////////
+  // SSD Layer 6 Cables
+  /////////////////////////
+  Double_t ssdcableslay6rigthsideradiusmin = fgkEndCapSupportMiddleRadius[1]+fgkSSDCablesLay6TubeRadiusMin;  
+  Double_t ssdcablelay6rightsidelength = 2.*ssdcablelay5rightsidelength;
+  Double_t ssdcableslay6rightsideradiusmax = ssdcableslay6rigthsideradiusmin+fgkSSDCablesLay6RightSideHeight; 
+  TGeoTube* ssdcablelay6rightubeshape = new TGeoTube(ssdcableslay6rigthsideradiusmin,
+                                                                                               ssdcableslay6rightsideradiusmax,
+                                                                                               0.5*ssdcablelay6rightsidelength); 
+  TGeoVolume* ssdcablelay6righttube = new TGeoVolume("SSDCableLay6RightSideTube",
+                                                                                                        ssdcablelay6rightubeshape,
+                                                                                                        fSSDCopper);
+  ssdcablelay6righttube->SetLineColor(9);
+  TGeoTranslation* ssdcablelay6rightrans = 
+                                         new TGeoTranslation(0.,0.,fgkEndCapSupportCenterLay6ITSPosition
+                                                                                +              fgkEndCapSupportCenterLay6Position
+                                                                                +      0.5*ssdcablelay6rightsidelength);
+  TGeoTranslation* ssdcablesLay6RightTubeToLeftrans = new TGeoTranslation(0.,0.,
+                                                                                                       - 0.5*ssdcablelay6rightsidelength
+                                                                                                       - fgkEndCapSupportCenterLay6Position
+                                                                                                   - fgkEndCapSupportCenterLay6ITSPosition);
+  ssdcablesmother->AddNode(ssdcablelay6righttube,1,ssdcablelay6rightrans);
+  ssdcablesmother->AddNode(ssdcablelay6righttube,2,ssdcablesLay6RightTubeToLeftrans);
+  ////////////////////////////////////
+  //cablescapacity[8] = 2.*ssdcablelay6rightubeshape->Capacity();
+  ////////////////////////////////////
+  TGeoPcon* ssdcableslay6pconshape = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
+                                                                                  ssdcableangle,2);   
+  TGeoVolume* ssdcableslay6pcon;
+  Double_t ssdcableslay6pconrmin[2];
+  Double_t ssdcableslay6pconrmax[2];
+  Double_t ssdcableslay6pconzsection[2];
+  ssdcableslay6pconrmin[0] = ssdcableslay6rigthsideradiusmin;
+  ssdcableslay6pconrmax[0] = ssdcableslay6rightsideradiusmax;
+  ssdcableslay6pconrmin[1] = ssdcableslay6pconrmin[0];
+  ssdcableslay6pconrmax[1] = ssdcableslay6pconrmax[0];
+  ssdcableslay6pconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
+                                                          + fgkEndCapSupportCenterLay6Position
+                                                          + ssdcablelay6rightsidelength;
+  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);
+  for(Int_t i=0; i<4; i++){
+   ssdcablesmother->AddNode(ssdcableslay6pcon,i+1,ssdcableslay5pconrot[i]);
+   ssdcablesmother->AddNode(ssdcableslay6pcon,i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
+  }
+  ////////////////////////////////////
+  //cablescapacity[9] = 8.*ssdcableslay6pconshape->Capacity();
+  /////////////////////////
+  // Water Tubes Layer 6
+  /////////////////////////
+  TGeoTube* ssdcablelay6righwatertubeshape = new TGeoTube(ssdcableslay6rightsideradiusmax,
+                                                                                                                 ssdcableslay6rightsideradiusmax
+                                                                                  +                      fgkSSDCablesLay5RightSideWaterHeight,
+                                                                                                                 0.5*ssdcablelay6rightsidelength); 
+  TGeoVolume* ssdcablelay6rightwatertube = new TGeoVolume("SSDCableLay6RightSideWaterTube",
+                                                                                                        ssdcablelay6righwatertubeshape,
+                                                                                                        fSSDCoolingTubeWater);
+  ssdcablelay6rightwatertube->SetLineColor(7);
+  ssdcablesmother->AddNode(ssdcablelay6rightwatertube,1,ssdcablelay6rightrans);
+  ssdcablesmother->AddNode(ssdcablelay6rightwatertube,2,ssdcablesLay6RightTubeToLeftrans);
+  TGeoPcon* ssdcableslay6waterpconshape = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
+                                                                                  ssdcableangle,2);   
+  TGeoVolume* ssdcableslay6waterpcon;
+  Double_t ssdcableslay6waterpconrmin[2];
+  Double_t ssdcableslay6waterpconrmax[2];
+  Double_t ssdcableslay6waterpconzsection[2];
+  ssdcableslay6waterpconrmin[0] = ssdcableslay6rightsideradiusmax;
+  ssdcableslay6waterpconrmax[0] = ssdcableslay6rightsideradiusmax
+                                                           + fgkSSDCablesLay5RightSideWaterHeight;
+  ssdcableslay6waterpconrmin[1] = ssdcableslay6waterpconrmin[0];
+  ssdcableslay6waterpconrmax[1] = ssdcableslay6waterpconrmax[0];
+  ssdcableslay6waterpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
+                                                          + fgkEndCapSupportCenterLay6Position
+                                                          + ssdcablelay6rightsidelength;
+  ssdcableslay6waterpconzsection[1] = ssdcableslay5pconwaterzsection[5];
+  for(Int_t i=0; i<2;i++) ssdcableslay6waterpconshape->DefineSection(i,ssdcableslay6waterpconzsection[i],
+                                                 ssdcableslay6waterpconrmin[i],ssdcableslay6waterpconrmax[i]); 
+  ssdcableslay6waterpcon = new TGeoVolume("SSDCableLay6RightSideWaterPCon",
+                                                          ssdcableslay6waterpconshape,fSSDCoolingTubeWater);
+  ssdcableslay6waterpcon->SetLineColor(7);
+  TGeoRotation* ssdcableslay6pconwaterot[4];   
+  TGeoRotation* ssdcablesLay6RightPConToLeftRot = new TGeoRotation();
+  ssdcablesLay6RightPConToLeftRot->SetAngles(90.,180.,-90);
+  TGeoHMatrix* ssdcablesLay6RightPConToLeftMatrix[4];  
+  for(Int_t i=0; i<4; i++){
+   ssdcableslay6pconwaterot[i] = new TGeoRotation();
+   ssdcableslay6pconwaterot[i]->SetAngles(90.0*i+45.0,0.,0.);
+   ssdcablesLay6RightPConToLeftMatrix[i] = new TGeoHMatrix((*ssdcablesLay6RightPConToLeftRot)
+                                                                                * (*ssdcableslay6pconwaterot[i]));   
+   ssdcablesmother->AddNode(ssdcableslay6waterpcon,i+1,ssdcableslay6pconwaterot[i]);
+   ssdcablesmother->AddNode(ssdcableslay6waterpcon,i+5,ssdcablesLay6RightPConToLeftMatrix[i]);
+  }
+  ////////////////////////////////////////
+  // From ITS Ring to Patch Panel3-RB26
+  ////////////////////////////////////////
+  Double_t ssdcablepatchpanel3BB26radiusmin[2];
+  Double_t ssdcablepatchpanel3BB26radiusmax[2];
+  Double_t ssdcablepatchpanel3RB26zsection[2];
+  ssdcablepatchpanel3BB26radiusmin[0] = ssdcableslay5pconrmin[3]-0.5*fgkSSDPatchPanelHeight+2.8;
+  ssdcablepatchpanel3BB26radiusmax[0] = ssdcablepatchpanel3BB26radiusmin[0]
+                                                                         + fgkSSDCablesLay5RightSideHeight
+                                                                         + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
+  ssdcablepatchpanel3BB26radiusmin[1] = fgkSSDPatchPanel2RB26Radius;
+  ssdcablepatchpanel3BB26radiusmax[1] = ssdcablepatchpanel3BB26radiusmin[1]
+                                                                         + 0.*fgkSSDCablesLay5RightSideHeight
+                                                                         + 0.*fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
+  ssdcablepatchpanel3RB26zsection[0] = 0.5*fgkSSDCentralSupportLength
+                                                                                + fgkSSDCentralAL3SupportLength
+                                                                                + fgkSSDPConeZLength[0];
+  ssdcablepatchpanel3RB26zsection[1] = fgkSSDPatchPanel2RB26ITSDistance;  
+  TGeoPcon* ssdcablepatchpanel3RB26pconshape = 
+                                                               new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB26Angle[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];
+  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[2]->SetAngles(180.0,0.0,0.0);
+  ssdcablepatchpanel3B26rot[3]->SetAngles(180.0+fgkSSDCablesPatchPanel2RB26Angle[0]
+                                                                 +                       fgkSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
+  for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB26pcon,i+1,ssdcablepatchpanel3B26rot[i]);
+  ////////////////////////////////////
+  //cablescapacity[10] = 4.*ssdcablepatchpanel3RB26pconshape->Capacity();
+  ////////////////////////////////////////
+  //  ITS Ring Cables RB26 Part
+  ////////////////////////////////////////
+  Double_t ssdcableitsring3BB26pconzsection[2];
+  Double_t ssdcableitsring3BB26pconrmin[2];
+  Double_t ssdcableitsring3BB26pconrmax[2];
+  ssdcableitsring3BB26pconzsection[0] = 0.5*fgkSSDCentralSupportLength
+                                                                         + 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[1] = ssdcablepatchpanel3BB26radiusmin[0];
+  ssdcableitsring3BB26pconrmax[1] = ssdcablepatchpanel3BB26radiusmax[0];
+  TGeoPcon* ssdcableitsring3BB26pconshape[4];
+  ssdcableitsring3BB26pconshape[0] = new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB26Angle[0]
+                                                                  -              0.5*ssdcableangle,ssdcableangle
+                                                                  +                            (fgkSSDCablesPatchPanel2RB26Angle[0]
+                                                                  -                             fgkSSDCableAngle),2);
+  ssdcableitsring3BB26pconshape[1] = new TGeoPcon(90.0+fgkSSDCablesPatchPanel2RB26Angle[1]
+                                                                  -              0.5*ssdcableangle,ssdcableangle
+                                                                  +                      3.0*fgkSSDCableAngle
+                                                                  -                      fgkSSDCablesPatchPanel2RB26Angle[1],2);
+  ssdcableitsring3BB26pconshape[2] = new TGeoPcon(270-fgkSSDCablesPatchPanel2RB26Angle[0]
+                                                                  -              0.5*ssdcableangle,ssdcableangle
+                                                                  -                      fgkSSDCableAngle
+                                                                  +                      fgkSSDCablesPatchPanel2RB26Angle[0],2);
+  ssdcableitsring3BB26pconshape[3] = new TGeoPcon(270.0+fgkSSDCablesPatchPanel2RB26Angle[1]
+                                                                  -              0.5*ssdcableangle,ssdcableangle
+                                                                  +                      3.0*fgkSSDCableAngle
+                                                                  -                      fgkSSDCablesPatchPanel2RB26Angle[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],
+                                                        ssdcableitsring3BB26pconrmax[j]); 
+  TGeoVolume* ssdcableitsring3BB26pcon[4];
+  ssdcableitsring3BB26pcon[0] = new TGeoVolume("SSDCableITSRing3RB26Part1",
+                                                                                               ssdcableitsring3BB26pconshape[0],fSSDCopper);
+  ssdcableitsring3BB26pcon[1] = new TGeoVolume("SSDCableITSRing3RB26Part2",
+                                                                                               ssdcableitsring3BB26pconshape[1],fSSDCopper);
+  ssdcableitsring3BB26pcon[2] = new TGeoVolume("SSDCableITSRing3RB26Part3",
+                                                                                               ssdcableitsring3BB26pconshape[2],fSSDCopper);
+  ssdcableitsring3BB26pcon[3] = new TGeoVolume("SSDCableITSRing3RB26Part4",
+                                                                                               ssdcableitsring3BB26pconshape[3],fSSDCopper);
+  for(Int_t i=0;i<4;i++){
+       ssdcableitsring3BB26pcon[i]->SetLineColor(9);
+       ssdcablesmother->AddNode(ssdcableitsring3BB26pcon[i],1);
+}
+  ////////////////////////////////////
+  //cablescapacity[11] = ssdcableitsring3BB26pconshape[0]->Capacity()
+  //                            + ssdcableitsring3BB26pconshape[1]->Capacity() 
+  //                            + ssdcableitsring3BB26pconshape[2]->Capacity() 
+  //                            + ssdcableitsring3BB26pconshape[3]->Capacity(); 
+  ////////////////////////////////////////
+  // From ITS Ring to Patch Panel2-RB24
+  ////////////////////////////////////////
+  Double_t ssdcablepatchpanel3BB24radiusmin[2];
+  Double_t ssdcablepatchpanel3BB24radiusmax[2];
+  Double_t ssdcablepatchpanel3RB24zsection[2];
+  ssdcablepatchpanel3BB24radiusmin[0] = ssdcablepatchpanel3BB26radiusmin[0];
+  ssdcablepatchpanel3BB24radiusmax[0] = ssdcablepatchpanel3BB26radiusmax[0];
+  ssdcablepatchpanel3BB24radiusmin[1] = fgkSSDPatchPanel2RB24Radius;
+  ssdcablepatchpanel3BB24radiusmax[1] = ssdcablepatchpanel3BB24radiusmin[1]
+                                                                         + 0.*fgkSSDCablesLay5RightSideHeight
+                                                                         + 0.*fgkSSDCablesLay6RightSideHeight
+                                                                         + 0.5*fgkSSDPatchPanelHeight;
+  ssdcablepatchpanel3RB24zsection[0] = -0.5*fgkSSDCentralSupportLength
+                                                                        -  fgkSSDCentralAL3SupportLength
+                                                                        -  fgkSSDPConeZLength[0];
+  ssdcablepatchpanel3RB24zsection[1] = -fgkSSDPatchPanel2RB24ITSDistance;  
+  TGeoPcon* ssdcablepatchpanel3RB24pconshape = 
+                                                               new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB24Angle[1]
+                                                                                               - 0.5*ssdcableangle,ssdcableangle,2);   
+  for(Int_t i=0; i<2;i++) ssdcablepatchpanel3RB24pconshape->DefineSection(i,ssdcablepatchpanel3RB24zsection[i],
+                                                 ssdcablepatchpanel3BB24radiusmin[i],ssdcablepatchpanel3BB24radiusmax[i]); 
+  TGeoVolume* ssdcablepatchpanel3RB24pcon = new TGeoVolume("SSDCablePatchPanel3RB24",
+                                                                                               ssdcablepatchpanel3RB24pconshape,
+                                                                                               fSSDCopper);
+  ssdcablepatchpanel3RB24pcon->SetLineColor(9);
+  TGeoRotation* ssdcablepatchpanel3B24rot[3];
+  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[2]->SetAngles(174.0,0.0,0.0);
+  ssdcablepatchpanel3B24rot[3]->SetAngles(180.0+fgkSSDCablesPatchPanel2RB24Angle[0]
+                                                                 +                       fgkSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
+  for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB24pcon,i+1,ssdcablepatchpanel3B24rot[i]);
+  ////////////////////////////////////
+  //cablescapacity[12] = 4.*ssdcablepatchpanel3RB24pconshape->Capacity();
+  ////////////////////////////////////////
+  //  ITS Ring Cables RB24 Part
+  ////////////////////////////////////////
+  Double_t ssdcableitsring3BB24pconzsection[2];
+  Double_t ssdcableitsring3BB24pconrmin[2];
+  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[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);
+  for(Int_t i=0;i<4;i++)
+       for(Int_t j=0; j<2; j++) ssdcableitsring3BB24pconshape[i]->DefineSection(j,ssdcableitsring3BB24pconzsection[j],
+                                                        ssdcableitsring3BB24pconrmin[j],
+                                                        ssdcableitsring3BB24pconrmax[j]); 
+  TGeoVolume* ssdcableitsring3BB24pcon[4];
+  ssdcableitsring3BB24pcon[0] = new TGeoVolume("SSDCableITSRing3RB24Part1",
+                                                                                               ssdcableitsring3BB24pconshape[0],fSSDCopper);
+  ssdcableitsring3BB24pcon[1] = new TGeoVolume("SSDCableITSRing3RB24Part2",
+                                                                                               ssdcableitsring3BB24pconshape[1],fSSDCopper);
+  ssdcableitsring3BB24pcon[2] = new TGeoVolume("SSDCableITSRing3RB24Part3",
+                                                                                               ssdcableitsring3BB24pconshape[2],fSSDCopper);
+  ssdcableitsring3BB24pcon[3] = new TGeoVolume("SSDCableITSRing3RB24Part4",
+                                                                                               ssdcableitsring3BB24pconshape[3],fSSDCopper);
+  for(Int_t i=0;i<4;i++){
+       ssdcableitsring3BB24pcon[i]->SetLineColor(9);
+       ssdcablesmother->AddNode(ssdcableitsring3BB24pcon[i],1);
+}
+  ////////////////////////////////////
+  //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);
+
+  TGeoPcon* ssdcablelay6materialbudgetpconshape = 
+                                       new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle,2); 
+  TGeoVolume* ssdcablelay6materialbudgetpcon;
+  Double_t ssdcablelay6materialbudgetpconrmin[2];
+  Double_t ssdcablelay6materialbudgetpconrmax[2];
+  Double_t ssdcablelay6materialbudgetpconzsection[2];
+  ssdcablelay6materialbudgetpconrmin[0] = ssdcableslay6rightsideradiusmax
+                                                                               + fgkSSDCablesLay5RightSideWaterHeight;
+  ssdcablelay6materialbudgetpconrmax[0] = ssdcablelay6materialbudgetpconrmin[0]
+                                                                               + fgkSSDCableMaterialBudgetHeight;
+  ssdcablelay6materialbudgetpconrmin[1] = ssdcablelay6materialbudgetpconrmin[0];
+  ssdcablelay6materialbudgetpconrmax[1] = ssdcablelay6materialbudgetpconrmax[0];
+  ssdcablelay6materialbudgetpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
+                                                                                       + fgkEndCapSupportCenterLay6Position
+                                                                                       + ssdcablelay6rightsidelength;
+  ssdcablelay6materialbudgetpconzsection[1] = ssdcableslay5pconwaterzsection[5];
+  for(Int_t i=0; i<2;i++) ssdcablelay6materialbudgetpconshape->DefineSection(i,
+                                                 ssdcablelay6materialbudgetpconzsection[i],
+                                                 ssdcablelay6materialbudgetpconrmin[i],
+                                                 ssdcablelay6materialbudgetpconrmax[i]); 
+  ssdcablelay6materialbudgetpcon = new TGeoVolume("SSDCableLay6MaterialBudgetPCon",
+                                                          ssdcablelay6materialbudgetpconshape,fSSDCopper);
+  ssdcablelay6materialbudgetpcon->SetLineColor(9);
+  for(Int_t i=0; i<4; i++){
+   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;*/
+  return ssdcablesmother;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
 TGeoArb8* AliITSv11GeometrySSD::GetArbShape(TVector3* vertexpos[], Double_t* width, 
-                                                                       Double_t height, char* shapename, Int_t isign) const{
+                                            Double_t height, const char* shapename, Int_t isign) const{
   /////////////////////////////////////////////////////////////
   // Method generating an Arb shape 
   /////////////////////////////////////////////////////////////
   const Int_t kvertexnumber = 8;
   const Int_t ktransvectnumber = 2;
-  TVector3* vertex[kvertexnumber];
-  TVector3* transvector[2];
-  for(Int_t i=0; i<ktransvectnumber; i++) transvector[i] = new TVector3(0.,width[i]);
+  TVector3 vertex[kvertexnumber];
+  TVector3 transvector[2];
+  for(Int_t i=0; i<ktransvectnumber; i++) transvector[i].SetY(width[i]);
   /////////////////////////////////////////////////////////////
   //Setting the vertices for TGeoArb8
   /////////////////////////////////////////////////////////////
-  vertex[0] = new TVector3(*vertexpos[0]);
-  vertex[1] = new TVector3(*vertexpos[1]);
-  vertex[2] = new TVector3(*vertex[1]+isign*(*transvector[0]));
-  vertex[3] = new TVector3(*vertex[0]+isign*(*transvector[0]));
-  vertex[4] = new TVector3(*vertexpos[2]);
-  vertex[5] = new TVector3(*vertexpos[3]);
-  vertex[6] = new TVector3(*vertex[5]+isign*(*transvector[1]));
-  vertex[7] = new TVector3(*vertex[4]+isign*(*transvector[1]));
+  vertex[0] = *vertexpos[0];
+  vertex[1] = *vertexpos[1];
+  vertex[2] = vertex[1]; 
+  vertex[3] = vertex[0]; 
+  vertex[4] = *vertexpos[2];
+  vertex[5] = *vertexpos[3];
+  vertex[6] = vertex[5];
+  vertex[7] = vertex[4];
+
+  // NB: order of points is clockwise
+  if (isign < 0) {
+    vertex[2] -= transvector[0];
+    vertex[3] -= transvector[0];
+    vertex[6] -= transvector[1];
+    vertex[7] -= transvector[1];
+  }
+  else {
+    vertex[0] += transvector[0];
+    vertex[1] += transvector[0];
+    vertex[4] += transvector[1];
+    vertex[5] += transvector[1];
+  }
+
   /////////////////////////////////////////////////////////////
   TGeoArb8* arbshape = new TGeoArb8(shapename,0.5*height);
-  for(Int_t i = 0; i<kvertexnumber;i++) 
-                                                       arbshape->SetVertex(i,vertex[i]->X(),vertex[i]->Y());
-  /////////////////////////////////////////////////////////////
-  // Deallocating memory
-  /////////////////////////////////////////////////////////////
-  for(Int_t i=0; i< kvertexnumber; i++) delete vertex[i];  
-  for(Int_t i=0; i< ktransvectnumber; i++) delete transvector[i];  
-  /////////////////////////////////////////////////////////////
+  for(Int_t i = 0; i<kvertexnumber;i++) {
+    arbshape->SetVertex(i,vertex[i].X(),vertex[i].Y());
+  }
+
   return arbshape;
 } 
 ///////////////////////////////////////////////////////////////////////////////
@@ -7387,7 +8054,7 @@ TGeoXtru* AliITSv11GeometrySSD::GetArcShape(Double_t phi, Double_t rmin,
        return arcshape;
 }
 ////////////////////////////////////////////////////////////////////////////////
-TGeoXtru* AliITSv11GeometrySSD::GetScrewShape(Double_t* radius,Int_t* edgesnumber,Double_t* section) const {
+TGeoShape* AliITSv11GeometrySSD::GetScrewShape(Double_t* radius,Int_t* edgesnumber,Double_t* section) const {
   ///////////////////////////////////////////////////////////////////////
   // Method Generating the Screw Shape  
   // radius[0]: outer radius
@@ -7401,52 +8068,59 @@ TGeoXtru* AliITSv11GeometrySSD::GetScrewShape(Double_t* radius,Int_t* edgesnumbe
   Double_t inradius = radius[1];
   Int_t outvertexnumber = edgesnumber[0];
   Int_t invertexnumber = edgesnumber[1];
-  Double_t* xscrewvertex = new Double_t[outvertexnumber+invertexnumber+2];
-  Double_t* yscrewvertex = new Double_t[outvertexnumber+invertexnumber+2];
-  for(Int_t i=0; i<outvertexnumber+1; i++){
+  Double_t* xscrewvertex = new Double_t[outvertexnumber+invertexnumber];
+  Double_t* yscrewvertex = new Double_t[outvertexnumber+invertexnumber];
+  for(Int_t i=0; i<outvertexnumber; i++){
        xscrewvertex[i] = outradius*CosD(90.+i*360./outvertexnumber);
        yscrewvertex[i] = outradius*SinD(90.+i*360./outvertexnumber);
   }
-  for(Int_t i=0; i<invertexnumber+1; i++){
-       xscrewvertex[outvertexnumber+i+1] = inradius*CosD(90.-i*360./invertexnumber);
-       yscrewvertex[outvertexnumber+i+1] = inradius*SinD(90.-i*360./invertexnumber);
+  for(Int_t i=0; i<invertexnumber; i++){
+       xscrewvertex[outvertexnumber+i] = inradius*CosD(90.+i*360./invertexnumber);
+       yscrewvertex[outvertexnumber+i] = inradius*SinD(90.+i*360./invertexnumber);
   }
-  TGeoXtru* screwshape = new TGeoXtru(2);
-  screwshape->DefinePolygon(outvertexnumber+invertexnumber+2,xscrewvertex,yscrewvertex);
-  screwshape->DefineSection(0,section[0]);
-  screwshape->DefineSection(1,section[1]);
+  TGeoXtru* screwshapeout = new TGeoXtru(2);
+  screwshapeout->DefinePolygon(outvertexnumber,xscrewvertex,yscrewvertex);
+  screwshapeout->DefineSection(0,section[0]);
+  screwshapeout->DefineSection(1,section[1]);
+  TGeoXtru* screwshapein = new TGeoXtru(2);
+  screwshapein->DefinePolygon(invertexnumber,&xscrewvertex[outvertexnumber],&yscrewvertex[outvertexnumber]);
+  screwshapein->DefineSection(0,section[0]-0.01); // make inner part bigger in Z
+  screwshapein->DefineSection(1,section[1]+0.01); // safer when we subtract it
+  TGeoSubtraction *snode = new TGeoSubtraction(screwshapeout, screwshapein);
+  TGeoCompositeShape *screwshape = new TGeoCompositeShape("", snode);
+  
   delete [] xscrewvertex;
   delete [] yscrewvertex;
   return screwshape;
 }
 ////////////////////////////////////////////////////////////////////////////////
-TGeoXtru* AliITSv11GeometrySSD::GetHoleShape(Double_t radius, Int_t nedges, Double_t *section) const {
+TGeoShape* AliITSv11GeometrySSD::GetHoleShape(Double_t radius, Int_t nedges, Double_t *section) const {
   ///////////////////////////////////////////////////////////////////////
   // Method Generating the Hole Shape  
   // radius of the Hole
   // nedges: number of edges to approximate the circle
   ///////////////////////////////////////////////////////////////////////
-  Int_t vertexnumber = nedges+6;
-  Double_t* xholevertex = new Double_t[vertexnumber];
-  Double_t* yholevertex = new Double_t[vertexnumber];
-  xholevertex[0] = radius;
-  xholevertex[1] = xholevertex[0];
-  xholevertex[2] = -xholevertex[1];
-  xholevertex[3] = xholevertex[2];
-  xholevertex[4] = xholevertex[0];
-  yholevertex[0] = 0.;
-  yholevertex[1] = -radius;
-  yholevertex[2] = yholevertex[1];
-  yholevertex[3] = -yholevertex[1];
-  yholevertex[4] = yholevertex[3];
-  for(Int_t i=0; i<nedges+1; i++){
-       xholevertex[i+5] = radius*CosD(i*360./nedges);
-       yholevertex[i+5] = radius*SinD(i*360./nedges);
+  Double_t* xholevertex = new Double_t[nedges];
+  Double_t* yholevertex = new Double_t[nedges];
+  Double_t z  = 0.5*(section[0]+section[1]);
+  Double_t dz = 0.5*(section[1]-section[0]);
+  TGeoTranslation *tr = 0;
+  if (TMath::Abs(z) > TGeoShape::Tolerance()) {
+     tr = new TGeoTranslation(0.,0.,z);
+     tr->RegisterYourself();
+  }   
+  TGeoBBox *box = new TGeoBBox("",radius,radius,dz);
+  for(Int_t i=0; i<nedges; i++){
+       xholevertex[i] = radius*CosD(i*360./nedges);
+       yholevertex[i] = radius*SinD(i*360./nedges);
   }
-  TGeoXtru* holeshape = new TGeoXtru(2);
-  holeshape->DefinePolygon(vertexnumber,xholevertex,yholevertex);
-  holeshape->DefineSection(0,section[0]);
-  holeshape->DefineSection(1,section[1]);
+  TGeoXtru* holeshapeout = new TGeoXtru(2);
+  holeshapeout->DefinePolygon(nedges,xholevertex,yholevertex);
+  holeshapeout->DefineSection(0,section[0]-0.01); // make subtracted part larger in Z
+  holeshapeout->DefineSection(1,section[1]+0.01);
+  TGeoSubtraction *snode = new TGeoSubtraction(box,holeshapeout,tr);
+  TGeoCompositeShape *holeshape = new TGeoCompositeShape("", snode);
+  
   delete [] xholevertex;
   delete [] yholevertex;
   return holeshape;
@@ -7488,11 +8162,11 @@ TGeoMedium* AliITSv11GeometrySSD::GetMedium(const char* mediumName) {
   /////////////////////////////////////////////////////////////
   // Method returning the Medium type 
   /////////////////////////////////////////////////////////////
-  char ch[30];
+  char ch[100];
   sprintf(ch, "ITS_%s",mediumName);
   TGeoMedium* medium =  gGeoManager->GetMedium(ch);
   if (! medium)
-    printf("Error(AliITSv11GeometrySSD)::medium %s not found !\n", mediumName);
+    AliError(Form("medium %s not found !\n", mediumName));
   return medium;
 }
 ////////////////////////////////////////////////////////////////////////////////
@@ -7559,8 +8233,10 @@ void AliITSv11GeometrySSD::CreateMaterials(){
   // Material for Support Rings
   /////////////////////////////////////////////////////////////////////
   fSSDSupportRingAl = GetMedium("AL$");
+  fSSDRohaCellCone = GetMedium("ROHACELL$");
   /////////////////////////////////////////////////////////////////////
   fSSDAir = GetMedium("SDD AIR$");
+  fSSDCopper = GetMedium("COPPER$");
   fCreateMaterials = kTRUE;
 }
 /////////////////////////////////////////////////////////////////////