]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSv11GeometrySSD.cxx
Correction of the Z position of Q2 quadrupole from Chiara Oppedisano
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySSD.cxx
index e735c6bace6ec4c9c1f32506bacb06ce5bbd6bd9..d78d926527e5c2bc7c45054d6e5ea3e438c14ceb 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"
 /////////////////////////////////////////////////////////////////////////////////
 // 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;
+/////////////////////////////////////////////////////////////////////////////////
 // Layer5 (lengths are in mm and angles in degrees)
 /////////////////////////////////////////////////////////////////////////////////
 const Double_t AliITSv11GeometrySSD::fgkSSDLay5LadderLength      = 950.7*fgkmm;
@@ -166,7 +174,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 +207,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 +258,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       
@@ -421,7 +435,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 +487,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 +495,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::fgkSSDPatchPanelHeigth = 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 +565,9 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD():
   fSSDCoolingTubePhynox(),
   fSSDSupportRingAl(),
   fSSDMountingBlockMedium(),
+  fSSDRohaCellCone(),
   fSSDAir(),
+  fSSDCopper(),
   fCreateMaterials(kFALSE),
   fTransformationMatrices(kFALSE),
   fBasicObjects(kFALSE),
@@ -528,6 +588,8 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD():
   fMotherVol(),
   fLay5LadderSupportRing(),
   fLay6LadderSupportRing(),
+  fgkEndCapSupportSystem(),
+  fSSDCone(),
   fColorCarbonFiber(4),
   fColorRyton(5),
   fColorPhynox(14),
@@ -569,7 +631,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),
@@ -590,6 +654,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),
@@ -1128,7 +1194,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 +1259,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];
@@ -1501,20 +1569,17 @@ 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++) 
@@ -1758,7 +1823,7 @@ void AliITSv11GeometrySSD::CreateBasicObjects(){
   /////////////////////////////////////////////////////////////
   // Carbon Fiber Junction 
   /////////////////////////////////////////////////////////////
-  fcarbonfiberjunction = GetCarbonFiberJunction(fgkCarbonFiberJunctionWidth);
+  fcarbonfiberjunction = GetCarbonFiberJunction(fgkCarbonFiberJunctionWidth-fgkSSDTolerance);
   /////////////////////////////////////////////////////////////
   // Carbon Fiber Lower Support
   /////////////////////////////////////////////////////////////
@@ -1819,9 +1884,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 +1927,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 +1956,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++){ 
@@ -1953,9 +2018,9 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){
   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] = 
+  const char* carbonfibersupportshapename[kshapesnumber] = 
                                                {"CarbonFiberSupportShape1","CarbonFiberSupportShape2"};
-  char* carbonfibersupportname[kshapesnumber] = 
+  const char* carbonfibersupportname[kshapesnumber] = 
                                                {"CarbonFiberSupport1","CarbonFiberSupport2"};
   TGeoArb8* carbonfibersupportshape[kshapesnumber]; 
   TGeoVolume* carbonfibersupport[kshapesnumber];
@@ -1992,8 +2057,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 +2119,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];
@@ -2277,10 +2342,10 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
   // 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];
   /////////////////////////////////////////////////////////////
@@ -2340,7 +2405,8 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
       ymothervertex[i][11] = ymothervertex[i][0];
   }
   TGeoXtru* ssdhybridmothershape[kmothernumber];
-  TGeoVolume* ssdhybridmother[kmothernumber];
+//  TGeoVolume* ssdhybridmother[kmothernumber];
+  TGeoVolumeAssembly* ssdhybridmother[kmothernumber];
   const char* ssdhybridmothername[kmothernumber] = {"SSDHybridMother1","SSDHybridMother2"};
   for(Int_t i=0; i<kmothernumber; i++){
       ssdhybridmothershape[i] = new TGeoXtru(2);
@@ -2349,15 +2415,16 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
       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);
+//      ssdhybridmother[i] = new TGeoVolume(ssdhybridmothername[i],ssdhybridmothershape[i],
+//                                          fSSDAir);
+      ssdhybridmother[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);  
@@ -2385,7 +2452,7 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
   const Int_t knapacitor0603number = 5;
   TGeoBBox* capacitor0603shape =  new TGeoBBox("Capacitor0603Shape",
                                                                                         0.5*fgkSSDCapacitor0603Length,
-                                                                                        0.5*fgkSSDCapacitor0603Width,
+                                                                                        0.5*(fgkSSDCapacitor0603Width),
                                                                                         0.5*fgkSSDCapacitor0603Height);
   TGeoVolume* capacitor0603 = new TGeoVolume("Capacitor0603",capacitor0603shape,
                                              fSSDStiffener0603CapacitorMedium); 
@@ -2396,7 +2463,7 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
             for(Int_t k=1; k<knapacitor0603number+1; k++){
                   ssdhybridmother[i]->AddNode(capacitor0603,knapacitor0603number*j+k,
                         new TGeoTranslation((k-3.)/6*fgkSSDStiffenerLength,
-                                             j*ssdstiffenerseparation
+                                           j*ssdstiffenerseparation
                         +                    0.5*((j==0? 1:-1)*fgkSSDStiffenerWidth
                         +                    (j==0? -1:+1)*fgkSSDCapacitor0603Width),
                         -                    0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height)));
@@ -2435,8 +2502,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 +2581,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);
@@ -2559,9 +2627,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 +2642,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,16 +2699,17 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
                                                                                           + fgkCoolingTubeRmax));
   coolingsystemothershape->DefineSection(1, 0.5*(fgkSSDCoolingBlockHoleCenter
                                                                                           + fgkCoolingTubeRmax));
-  TGeoVolume* coolingsystemother = new TGeoVolume("CoolingBlockSystem",
-                                                         coolingsystemothershape,fSSDAir);
+  TGeoVolume* coolingsystemother = new TGeoVolumeAssembly("CoolingBlockSystem");
+//  TGeoVolume* coolingsystemother = new TGeoVolume("CoolingBlockSystem",
+//                                                       coolingsystemothershape,fSSDAir);
   /////////////////////////////////////////////////////////////
   // SSD Cooling Tube Part 
   /////////////////////////////////////////////////////////////
   TGeoTube* coolingtubeshape[fgkcoolingtubenumber];
   coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                                                0.5*fgkSSDCoolingBlockWidth); 
+                                                                                0.5*(fgkSSDCoolingBlockWidth-fgkSSDTolerance)); 
   coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                        0.5*fgkSSDCoolingBlockWidth);
+                                                                        0.5*(fgkSSDCoolingBlockWidth-fgkSSDTolerance));
   TGeoVolume* coolingtube[fgkcoolingtubenumber];
   coolingtube[0] = new TGeoVolume("OuterCoolingTube",coolingtubeshape[0],
                                                                        fSSDCoolingTubePhynox);
@@ -2667,15 +2730,13 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
   // Deallocating memory
   /////////////////////////////////////////////////////////////
        delete coolingblocktransvector;
-    delete localcoolingblocktrans;
        delete localcoolingblockrot;
-       delete localcoolingblockmatrix;
        delete localcoolingtubetrans;
        delete localcoolingtuberot;
   /////////////////////////////////////////////////////////////
   // Checking overlaps 
   /////////////////////////////////////////////////////////////
-       coolingsystemother->CheckOverlaps(0.01);
+       //coolingsystemother->CheckOverlaps(0.01);
   /////////////////////////////////////////////////////////////
        return coolingsystemother;
 }
@@ -2758,8 +2819,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 +2850,6 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{
                                         +                                         fgkSSDFlexHeight[1])); 
     ssdflexmother->AddNode(ssdflex[i],1,ssdflextrans[i]);
   }
-  ssdflexmother->CheckOverlaps(0.01);
   return ssdflexmother;
 }
 /////////////////////////////////////////////////////////////////////////////////
@@ -2801,7 +2862,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 +2966,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 
   //////////////////////////////////////
@@ -2944,7 +3007,7 @@ for(Int_t i=0; i<karcnumber; i++){
   for(Int_t i=0; i<kendflexlayernumber+1; i++) delete transvector[i];  
   delete deltatransvector;
   /////////////////////////////////////////////////////////////
-  ssdendflexmother->CheckOverlaps(0.01);
+  //ssdendflexmother->CheckOverlaps(0.01);
   return ssdendflexmother;
 }
 ///////////////////////////////////////////////////////////////////////////////
@@ -3154,7 +3217,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]
@@ -3229,7 +3292,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();
@@ -3265,40 +3328,41 @@ TList* AliITSv11GeometrySSD::GetCoolingTubeList()const{
    // Ladder Cooling Tubes
    coolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
                                          0.25 * (fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
-                                                 -     2.*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth));
+                                                 -     2.*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
+                                                 -0.5*fgkSSDTolerance);
    coolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
                                                                                 coolingtubeshape[0][0]->GetDz());
    coolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
                                                                                 0.5*(fgkSSDModuleStiffenerPosition[1]
-                                                 -                                       fgkSSDSensorOverlap));
+                                                 -                                       fgkSSDSensorOverlap-fgkSSDTolerance));
    coolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
                                                                                 coolingtubeshape[1][0]->GetDz());
    coolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                                                0.5*fgkSSDModuleStiffenerPosition[1]);
+                                                                                0.5*(fgkSSDModuleStiffenerPosition[1]-fgkSSDTolerance));
    coolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                                coolingtubeshape[2][0]->GetDz());
+                                                                                coolingtubeshape[2][0]->GetDz()-0.5*fgkSSDTolerance);
    // End Ladder Cooling Tubes 
    TGeoTube** endladdercoolingtubeshape[fgkendladdercoolingtubenumber];
    for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++) 
-       endladdercoolingtubeshape[i] = new      TGeoTube*[2];
+   endladdercoolingtubeshape[i] = new  TGeoTube*[2];
    endladdercoolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
                                                        0.50 * (fgkEndLadderMountingBlockPosition[0]
-                                                 -                     fgkendladdercoolingsupportdistance[0]));
+                                                 -                     fgkendladdercoolingsupportdistance[0]-fgkSSDTolerance));
    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));
+                                                 -                     fgkCoolingTubeSupportWidth-fgkSSDTolerance));
    endladdercoolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[1][0]->GetDz());
+                                                                       endladdercoolingtubeshape[1][0]->GetDz()-0.5*fgkSSDTolerance);
    endladdercoolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
                                                        0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0]
                                                  -                     fgkEndLadderMountingBlockPosition[0]
                                                  -                     fgkendladdercoolingsupportdistance[1]           
-                                                 -                     fgkCoolingTubeSupportWidth));
+                                                 -                     fgkCoolingTubeSupportWidth-fgkSSDTolerance));
    endladdercoolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[2][0]->GetDz());
+                                                                       endladdercoolingtubeshape[2][0]->GetDz()-0.5*fgkSSDTolerance);
    endladdercoolingtubeshape[3][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
                                                          0.50 * (fgkMountingBlockToSensorSupport
                                                        - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth)
@@ -3307,13 +3371,13 @@ TList* AliITSv11GeometrySSD::GetCoolingTubeList()const{
                                                        +                 fgkEndLadderCarbonFiberLowerJunctionLength[1]
                                                        -                 fgkendladdercoolingsupportdistance[2]
                                                        -                 fgkEndLadderMountingBlockPosition[1]
-                                                       -                 fgkCoolingTubeSupportWidth));
+                                                       -                 fgkCoolingTubeSupportWidth-fgkSSDTolerance));
    endladdercoolingtubeshape[3][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[3][0]->GetDz());
+                                                                       endladdercoolingtubeshape[3][0]->GetDz()-0.5*fgkSSDTolerance);
    endladdercoolingtubeshape[4][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
-                                                         0.50 * fgkendladdercoolingsupportdistance[2]);
+                                                         0.50 * (fgkendladdercoolingsupportdistance[2]-fgkSSDTolerance));
    endladdercoolingtubeshape[4][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
-                                                                       endladdercoolingtubeshape[4][0]->GetDz());
+                                                                       endladdercoolingtubeshape[4][0]->GetDz()-0.5*fgkSSDTolerance);
    // Ladder Cooling Tubes
    TGeoVolume** coolingtube[fgkcoolingtubenumber];
    for(Int_t i=0; i<fgkcoolingtubenumber; i++) coolingtube[i] = 
@@ -3369,9 +3433,10 @@ TList* AliITSv11GeometrySSD::GetCoolingTubeList()const{
                                                                endladdercoolingtubeshape[4][1],
                                                                fSSDCoolingTubeWater);
    for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++){
-       endladdercoolingtube[i][0]->SetLineColor(fColorPhynox);
-       endladdercoolingtube[i][1]->SetLineColor(fColorWater);
+               endladdercoolingtube[i][0]->SetLineColor(fColorPhynox);
+               endladdercoolingtube[i][1]->SetLineColor(fColorWater);
    }
+  
   /////////////////////////////////////////////////////////////
   // Virtual Volume containing Cooling Tubes
   /////////////////////////////////////////////////////////////
@@ -3633,9 +3698,10 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth,
                                                          +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);
+  new TGeoBBox(0.5*dx,0.5*dy,0.5*dz,boxorigin);
+  TGeoVolumeAssembly* ssdchipcablesmother = new TGeoVolumeAssembly("SSDChipCablesMother");
+//  TGeoVolume* ssdchipcablesmother = new TGeoVolume("SSDChipCablesMother",
+//                       ssdchipcablesmotherbox,fSSDAir);
   /////////////////////////////////////////////////////////////
   // Rotation and Translation Definition for positioning 
   /////////////////////////////////////////////////////////////
@@ -3674,70 +3740,15 @@ TList* AliITSv11GeometrySSD::GetSSDChipSystem(){
   /////////////////////////////////////////////////////////////
   TGeoVolume* ssdchipassembly = GetSSDChips();
   TList* ssdchipsystemlist = new TList();
-  const Int_t knedges = 20;
+//  const Int_t knedges = 20;
+  const Int_t knedges = 5;
   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];
+
+  TGeoVolumeAssembly* 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);
+    chipsystemother[i] = new TGeoVolumeAssembly(chipsytemothername[i]);
   }
   /////////////////////////////////////////////////////////////
   // SSD Chip Cables
@@ -3768,10 +3779,9 @@ TList* AliITSv11GeometrySSD::GetSSDChipSystem(){
                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]);     
+       ssdchipsystemlist->Add(chipsystemother[i]);     
   }
   /////////////////////////////////////////////////////////////
   // Deallocating memory
@@ -3781,13 +3791,14 @@ TList* AliITSv11GeometrySSD::GetSSDChipSystem(){
                delete ssdchipcablesrot[i][j];
                delete ssdchipcablestrans[i][j];
        }
-       delete ssdchipcablesrot[i];
-       delete ssdchipcablestrans[i];
+       delete [] ssdchipcablesrot[i];
+       delete [] ssdchipcablestrans[i];
   }
   /////////////////////////////////////////////////////////////
   return ssdchipsystemlist;
 }
-///////////////////////////////////////////////////////////////////////////////
+
+//_____________________________________________________________________________
 TGeoVolume* AliITSv11GeometrySSD::GetSSDChips() const{
   /////////////////////////////////////////////////////////////
   // SSD Chip Assembly Generation    
@@ -3817,7 +3828,7 @@ 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,
@@ -3859,8 +3870,9 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDChips() const{
                                                                        xmothervertex,ymothervertex);
   ssdchipmothershape->DefineSection(0,-0.5*fgkSSDChipHeight);
   ssdchipmothershape->DefineSection(1, 0.5*fgkSSDChipHeight);
-  TGeoVolume* ssdchipmother = new TGeoVolume("SSDChipContainer",
-                                                         ssdchipmothershape,fSSDAir);
+//  TGeoVolume* ssdchipmother = new TGeoVolume("SSDChipContainer",
+//                                                       ssdchipmothershape,fSSDAir);
+  TGeoVolumeAssembly* ssdchipmother = new TGeoVolumeAssembly("SSDChipContainer");
    /////////////////////////////////////////////////////////////
   for(Int_t i=0; i<kssdchiprownumber; i++)
     for(Int_t j=0; j<fgkSSDChipNumber; j++) 
@@ -3935,7 +3947,7 @@ 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] = 
@@ -4046,7 +4058,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetLadderCableAssembly(Int_t n, Double_t ssden
   // Method generating Ladder Cable Volumes Assembly   
   /////////////////////////////////////////////////////////////
   TGeoVolume* laddercableassembly = new TGeoVolumeAssembly("LadderCableAssembly");
-  char laddercabletransname[30];
+  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,
@@ -4062,7 +4074,7 @@ TList* AliITSv11GeometrySSD::GetLadderCableAssemblyList(Int_t n, Double_t ssdend
   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);
@@ -4171,35 +4183,35 @@ 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[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]);                                                                   
@@ -4207,9 +4219,7 @@ void AliITSv11GeometrySSD::SetEndLadderSegment(){
   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[1]->AddNode(fendladdercoolingtube[4],2,fendladdercoolingtubematrix[1][3]);                           
 }
 ///////////////////////////////////////////////////////////////////////////////
 void AliITSv11GeometrySSD::SetLadder(){
@@ -4252,16 +4262,91 @@ void AliITSv11GeometrySSD::SetLadder(){
        xmothervertex[1][i] = xmothervertex[0][i];
        ymothervertex[1][i] = ymothervertex[0][i];
   }
-  const char* laddername[fgkladdernumber] = {"ITSssdLay5Ladd","ITSssdLay6Ladd"};
+///////////////////////////////////////////////////////////////////////////
+// Disalignement Mother Volume corrections 25/08/08
+///////////////////////////////////////////////////////////////////////////
+  TGeoXtru* leftladdershape[fgkladdernumber];  
+  TGeoXtru* centersensorladdershape[fgkladdernumber];  
+  TGeoXtru* rightladdershape[fgkladdernumber]; 
   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
+   leftladdershape[i] = new TGeoXtru(2);
+   centersensorladdershape[i] = new TGeoXtru(2);
+   rightladdershape[i] = new TGeoXtru(2);
+   }
+  //////////////////////////////////////
+   // Setting the names for shapes  
+  //////////////////////////////////////
+  leftladdershape[0]->SetName("Lay5LeftLadderSegmentContainer");
+  leftladdershape[1]->SetName("Lay6LeftLadderSegmentContainer");
+  centersensorladdershape[0]->SetName("Lay5CenterSensorContainer");
+  centersensorladdershape[1]->SetName("Lay6CenterSensorContainer");
+  rightladdershape[0]->SetName("Lay5RightLadderSegmentContainer");
+  rightladdershape[1]->SetName("Lay6RightLadderSegmentContainer");
+  //////////////////////////////////////
+  Double_t xleftladdervertex[fgkladdernumber][kmothervertexnumber];
+  Double_t yleftladdervertex[fgkladdernumber][kmothervertexnumber];
+  Double_t xcentersensorvertex[fgkladdernumber][kmothervertexnumber];
+  Double_t ycentersensorvertex[fgkladdernumber][kmothervertexnumber];
+  Double_t xrightladdervertex[fgkladdernumber][kmothervertexnumber];
+  Double_t yrightladdervertex[fgkladdernumber][kmothervertexnumber];
+  for(Int_t i=0; i<fgkladdernumber; i++)
+       for(Int_t j=0; j<kmothervertexnumber; j++){
+               xleftladdervertex[i][j] = xmothervertex[i][j];
+               yleftladdervertex[i][j] = ymothervertex[i][j];
+               xcentersensorvertex[i][j] = xmothervertex[i][j];
+               ycentersensorvertex[i][j] = ymothervertex[i][j];
+               xrightladdervertex[i][j] = xmothervertex[i][j];
+               yrightladdervertex[i][j] = ymothervertex[i][j];
+       }
+       xcentersensorvertex[0][0] -= fgkSSDModuleSideDisalignment;      
+       xcentersensorvertex[0][1] =  xcentersensorvertex[0][0];
+       xcentersensorvertex[0][6] = -xcentersensorvertex[0][1];
+       xcentersensorvertex[0][7] = -xcentersensorvertex[0][0];
+
+       xcentersensorvertex[1][0] = xcentersensorvertex[0][0];  
+       xcentersensorvertex[1][1] = xcentersensorvertex[0][1];
+       xcentersensorvertex[1][6] = xcentersensorvertex[0][6];
+       xcentersensorvertex[1][7] = xcentersensorvertex[0][7];
+
+       ycentersensorvertex[0][0] -= fgkSSDModuleVerticalDisalignment;  
+       ycentersensorvertex[0][7] = ycentersensorvertex[0][0];
+
+       ycentersensorvertex[1][0] = ycentersensorvertex[0][0];  
+       ycentersensorvertex[1][7] = ycentersensorvertex[0][7];
+       for(Int_t i=0; i<fgkladdernumber; i++){
+               // Left Ladder Piece
+               leftladdershape[i]->DefinePolygon(kmothervertexnumber,xleftladdervertex[i],
+                                                                                 yleftladdervertex[i]);
+               leftladdershape[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]);
+               leftladdershape[i]->DefineSection(1,-fgkEndLadderCarbonFiberLowerJunctionLength[1]
+                                                                                       +1.45*fgkSSDMountingBlockWidth);
+               // 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);
+               // Right Ladder Piece
+               rightladdershape[i]->DefinePolygon(kmothervertexnumber,xrightladdervertex[i],
+                                                                                 yrightladdervertex[i]);
+               rightladdershape[i]->DefineSection(0,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
+                                                                                       +fgkEndLadderCarbonFiberLowerJunctionLength[0]
+                                                                                       -2.4*fgkSSDMountingBlockWidth);
+               rightladdershape[i]->DefineSection(1,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
                                                                                        +fgkEndLadderCarbonFiberLowerJunctionLength[0]);
-    fladder[i] = new TGeoVolume(laddername[i],laddershape[i],fSSDAir);
-       fladder[i]->SetLineColor(4);
- }
+       }
+       TGeoCompositeShape* laddershapecontainer[2];
+       laddershapecontainer[0] = new TGeoCompositeShape("Lay5LadderCompositeShape",
+                                                         "Lay5LeftLadderSegmentContainer+Lay5CenterSensorContainer+Lay5RightLadderSegmentContainer");
+       laddershapecontainer[1] = new TGeoCompositeShape("Lay6LadderCompositeShape",
+                                                         "Lay6LeftLadderSegmentContainer+Lay6CenterSensorContainer+Lay6RightLadderSegmentContainer");
+       const char* laddername[fgkladdernumber] = {"ITSssdLay5Ladd","ITSssdLay6Ladd"};
+    for(Int_t i=0; i<fgkladdernumber; i++){
+               fladder[i] = new TGeoVolume(laddername[i],laddershapecontainer[i],fSSDAir);
+               fladder[i]->SetLineColor(4);
+       }
 ///////////////////////////////////////////////////////////////////////////
  if(!fCreateMaterials) CreateMaterials();
  if(!fTransformationMatrices) CreateTransformationMatrices();
@@ -4279,6 +4364,7 @@ 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]);
        }
@@ -4334,11 +4420,9 @@ void AliITSv11GeometrySSD::SetLadder(){
                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 +4438,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,26 +4453,6 @@ 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];
 }
 ////////////////////////////////////////////////////////////////////////////////
@@ -4551,17 +4502,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 +4591,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);
@@ -4677,7 +4628,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 +4638,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
                                                                                                  -fgkMountingBlockSupportWidth[0]);
     centerladdersupportpiece[i] = new TGeoVolume(centerladdersupportpiecename,
                                                                          centerladdersupportpieceshape[i],
-                                                                                 fSSDSupportRingAl);
+                                                                                 fSSDCarbonFiberMedium);
        centerladdersupportpiece[i]->SetLineColor(fColorAl);
   }
   /////////////////////////////////////////////////////////////
@@ -4710,8 +4661,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
@@ -4745,7 +4696,7 @@ 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
@@ -4779,7 +4730,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        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 +4744,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++){
   ////////////////////////////////////////////
@@ -4822,7 +4773,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 
@@ -4850,7 +4801,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 +4809,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();
@@ -4879,9 +4830,10 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
   TGeoXtru* downmotherladdersupportshape[fgklayernumber];
   TGeoVolume* downmotherladdersupport[fgklayernumber]; 
   TGeoXtru* upmotherladdersupportshape[fgklayernumber];
-  TGeoVolume* upmotherladdersupport[fgklayernumber]; 
-  char upmotheladdersupportname[30];
-  char downmotheladdersupportname[30];
+//  TGeoVolume* upmotherladdersupport[fgklayernumber]; 
+  TGeoVolumeAssembly* upmotherladdersupport[fgklayernumber];   
+  char upmotheladdersupportname[100];
+  char downmotheladdersupportname[100];
   for(Int_t i=0; i<fgklayernumber; i++){
        xmothervertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]
                                                    -  mountingsupportedge[i];
@@ -4921,8 +4873,9 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
                                                                   +                       fgkSSDMountingBlockHeight[1]
                                                                   -                       0.5*fgkCoolingTubeSupportHeight
                                                                   -                       fgkSSDModuleCoolingBlockToSensor);
-    upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname,
-                                                                                         upmotherladdersupportshape[i],fSSDAir);
+       upmotherladdersupport[i] = new TGeoVolumeAssembly(upmotheladdersupportname);
+//    upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname,
+//                                                                                       upmotherladdersupportshape[i],fSSDAir);
   }
   for(Int_t i=0; i<fgklayernumber; i++){
        /////////////////////////
@@ -4984,15 +4937,15 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
                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++){
                        downmotherladdersupport[i]->AddNode(mountingblocksupportboxdown[i][j],k+1,laddersupportmatrix[k]);
-                       upmotherladdersupport[i]->AddNode(mountingblocksupportboxup[i][j],k+1,laddersupportmatrix[k]);
+//                     upmotherladdersupport[i]->AddNode(mountingblocksupportboxup[i][j],k+1,laddersupportmatrix[k]);
                }
        }
        for(Int_t k=0; k<2; k++){
@@ -5003,11 +4956,11 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
            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]);
-               upmotherladdersupport[i]->AddNode(sideladdersupportpiece[i],k+1,laddersupportmatrix[k]);
-               upmotherladdersupport[i]->AddNode(centerladdersupportpiece[i],k+1,laddersupportmatrix[k]);
-               upmotherladdersupport[i]->AddNode(mountingblockpieceup[i],k+1,laddersupportmatrix[k]);
-               upmotherladdersupport[i]->AddNode(mountingblocksupportrapezoidup[i],k+1,laddersupportmatrix[k]);
+//             upmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]);
+//             upmotherladdersupport[i]->AddNode(sideladdersupportpiece[i],k+1,laddersupportmatrix[k]);
+//             upmotherladdersupport[i]->AddNode(centerladdersupportpiece[i],k+1,laddersupportmatrix[k]);
+//             upmotherladdersupport[i]->AddNode(mountingblockpieceup[i],k+1,laddersupportmatrix[k]);
+//             upmotherladdersupport[i]->AddNode(mountingblocksupportrapezoidup[i],k+1,laddersupportmatrix[k]);
        }
   }
   TList* laddersupportlist = new TList();
@@ -5033,14 +4986,14 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
        delete [] xcenterlowervertex[i];
        delete [] ycenterlowervertex[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 +5018,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])));
@@ -5135,7 +5088,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]-fgkLadderSupportHeigth;
+  } 
+  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 +5136,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
   /////////////////////////////////////////////////////////////
@@ -5185,15 +5169,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 +5238,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 +5255,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 +5288,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 +5450,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 +5560,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 +5934,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 +6751,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 +6963,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 +7024,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 +7086,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 +7094,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 +7123,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 +7139,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 +7150,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 +7158,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 +7202,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 +7219,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",
@@ -7212,8 +7288,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
     printf("Error::AliITSv11GeometrySSD: 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
@@ -7244,8 +7319,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
     printf("Error::AliITSv11GeometrySSD: 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
@@ -7304,8 +7378,866 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
   }
  }
  ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::SSDCone(TGeoVolume* moth){
+  /////////////////////////////////////////////////////////////
+  // Setting Ladder Support of Layer 6. 
+  /////////////////////////////////////////////////////////////
+  if (! moth) {
+    printf("Error::AliITSv11GeometrySSD: 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) {
+    printf("Error::AliITSv11GeometrySSD: 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*fgkSSDPatchPanelHeigth+2.8;
+  ssdcablepatchpanel3BB26radiusmax[0] = ssdcablepatchpanel3BB26radiusmin[0]
+                                                                         + fgkSSDCablesLay5RightSideHeight
+                                                                         + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeigth;
+  ssdcablepatchpanel3BB26radiusmin[1] = fgkSSDPatchPanel2RB26Radius;
+  ssdcablepatchpanel3BB26radiusmax[1] = ssdcablepatchpanel3BB26radiusmin[1]
+                                                                         + 0.*fgkSSDCablesLay5RightSideHeight
+                                                                         + 0.*fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeigth;
+  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*fgkSSDPatchPanelHeigth;
+  ssdcableitsring3BB26pconrmax[0] = ssdcableitsring3BB26pconrmin[0]
+                                                                 + fgkSSDCablesLay5RightSideHeight
+                                                                 + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeigth;
+  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*fgkSSDPatchPanelHeigth;
+  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*fgkSSDPatchPanelHeigth;
+  ssdcableitsring3BB24pconrmax[0] = ssdcableitsring3BB24pconrmin[0]
+                                                                 + fgkSSDCablesLay5RightSideHeight
+                                                                 + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeigth;
+  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 
   /////////////////////////////////////////////////////////////
@@ -7387,7 +8319,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 +8333,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,7 +8427,7 @@ 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)
@@ -7559,8 +8498,10 @@ void AliITSv11GeometrySSD::CreateMaterials(){
   // Material for Support Rings
   /////////////////////////////////////////////////////////////////////
   fSSDSupportRingAl = GetMedium("AL$");
+  fSSDRohaCellCone = GetMedium("ROHACELL$");
   /////////////////////////////////////////////////////////////////////
   fSSDAir = GetMedium("SDD AIR$");
+  fSSDCopper = GetMedium("COPPER$");
   fCreateMaterials = kTRUE;
 }
 /////////////////////////////////////////////////////////////////////