]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSv11GeometrySPD.cxx
Updates in Lc->V0bachelor analysis (Annalisa)
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySPD.cxx
index e5c1b81476dad38931a8fff16bd6d71e45f5f581..944b19459207cb4b3339224e9fb4b430f48237af 100644 (file)
@@ -79,6 +79,8 @@
 #include <TGeoVolume.h>
 #include <TGeoXtru.h>
 #include <TGeoPcon.h>
+#include <TGeoPgon.h>
+#include <TGeoArb8.h>
 
 // AliRoot includes
 #include "AliLog.h"
@@ -87,6 +89,7 @@
 
 // Declaration file
 #include "AliITSv11GeometrySPD.h"
+#include "AliITSv11GeomCableRound.h"
 
 // Constant definistions
 const Double_t AliITSv11GeometrySPD::fgkGapLadder    =
@@ -94,6 +97,9 @@ const Double_t AliITSv11GeometrySPD::fgkGapLadder    =
 const Double_t AliITSv11GeometrySPD::fgkGapHalfStave =
                      AliITSv11Geometry::fgkmicron*120.; // 120 microns
 
+using std::endl;
+using std::cout;
+using std::ios;
 ClassImp(AliITSv11GeometrySPD)
 //______________________________________________________________________
 AliITSv11GeometrySPD::AliITSv11GeometrySPD(/*Double_t gap*/):
@@ -213,7 +219,7 @@ AliITSv11GeometrySPD& AliITSv11GeometrySPD::operator=(const
 }
 //______________________________________________________________________
 TGeoMedium* AliITSv11GeometrySPD::GetMedium(const char* mediumName,
-                                            TGeoManager *mgr) const
+                                            const TGeoManager *mgr) const
 {
     //
     // This function is used to recovery any medium
@@ -223,7 +229,7 @@ TGeoMedium* AliITSv11GeometrySPD::GetMedium(const char* mediumName,
     //
      Char_t itsMediumName[30];
 
-     sprintf(itsMediumName, "ITS_%s", mediumName);
+     snprintf(itsMediumName, 30, "ITS_%s", mediumName);
      TGeoMedium* medium = mgr->GetMedium(itsMediumName);
      if (!medium) AliError(Form("Medium <%s> not found", mediumName));
 
@@ -298,15 +304,18 @@ void AliITSv11GeometrySPD::SPDSector(TGeoVolume *moth, TGeoManager *mgr)
     Int_t i, j, k;
     Double_t angle, radiusSector, xAAtubeCenter0, yAAtubeCenter0;
     TGeoCombiTrans *secRot = new TGeoCombiTrans(), *comrot;
-    TGeoVolume *vCarbonFiberSector;
+    TGeoVolume *vCarbonFiberSector[10];
     TGeoMedium *medSPDcf;
 
     // Define an assembly and fill it with the support of
     // a single carbon fiber sector and staves in it
     medSPDcf = GetMedium("SPD C (M55J)$", mgr);
-    vCarbonFiberSector = new TGeoVolumeAssembly("ITSSPDCarbonFiberSectorV");
-    vCarbonFiberSector->SetMedium(medSPDcf);
-    CarbonFiberSector(vCarbonFiberSector, xAAtubeCenter0, yAAtubeCenter0, mgr);
+    for(Int_t is=0; is<10; is++)
+    {
+           vCarbonFiberSector[is] = new TGeoVolumeAssembly("ITSSPDCarbonFiberSectorV");
+           vCarbonFiberSector[is]->SetMedium(medSPDcf);
+           CarbonFiberSector(vCarbonFiberSector[is], is, xAAtubeCenter0, yAAtubeCenter0, mgr);
+    }
 
     // Compute the radial shift out of the sectors
     radiusSector = kBeamPipeRadius + kSPDclossesStaveAA + staveThicknessAA;
@@ -343,7 +352,7 @@ void AliITSv11GeometrySPD::SPDSector(TGeoVolume *moth, TGeoManager *mgr)
         secRot->SetDx(shiftX);
         secRot->SetDy(shiftY);
         comrot  = new TGeoCombiTrans(*secRot);
-        vcenteral->AddNode(vCarbonFiberSector,i+1,comrot);
+        vcenteral->AddNode(vCarbonFiberSector[i],i+1,comrot);
         for(j=0;j<2;j++)for(k=0;k<6;k++) // Transform Tube ends for each sector
             comrot->LocalToMaster(tub[j][k],fTubeEndSector[i][j][k]);
         if(GetDebug(5)) {
@@ -358,11 +367,16 @@ void AliITSv11GeometrySPD::SPDSector(TGeoVolume *moth, TGeoManager *mgr)
     delete secRot;
 
     CreateCones(moth);
+    CreateServices(moth);
 }
 //______________________________________________________________________
-void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
+void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth, Int_t sect,
      Double_t &xAAtubeCenter0, Double_t &yAAtubeCenter0, TGeoManager *mgr)
 {
+    // The method has been modified in order to build a support sector
+    // whose shape is dependent on the sector number; the aim is to get
+    // as close as possible to the shape inferred from alignment
+    // and avoid as much as possible overlaps generated by alignment.
     //
     // Define the detail SPD Carbon fiber support Sector geometry.
     // Based on the drawings:
@@ -399,7 +413,6 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     //TGeoMedium *medSPDal      = 0;//SPD support cone SDD mounting bracket Al
     TGeoMedium *medSPDcf     = GetMedium("SPD C (M55J)$", mgr);
     TGeoMedium *medSPDss     = GetMedium("INOX$", mgr);
-    TGeoMedium *medSPDair    = GetMedium("AIR$", mgr);
     TGeoMedium *medSPDcoolfl = GetMedium("Freon$", mgr); //ITSspdCoolingFluid
     //
     const Double_t ksecDz           =  0.5 * 500.0 * fgkmm;
@@ -425,58 +438,80 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     const Double_t ksecX0   = -10.725 * fgkmm;
     const Double_t ksecY0   = -14.853 * fgkmm;
     const Double_t ksecR0   =  -0.8   * fgkmm; // external
-    const Double_t ksecX1   = -13.187 * fgkmm;
-    const Double_t ksecY1   = -19.964 * fgkmm;
-    const Double_t ksecR1   =  +0.6   * fgkmm; // internal  // (modif. by Alberto)
-    //const Double_t ksecR1   =  +0.8   * fgkmm; // internal  // (modif. by Alberto)
-
-    // const Double_t ksecDip0 = 5.9 * fgkmm;
-    //
-    //const Double_t ksecX2   =  -3.883 * fgkmm;
-    const Double_t ksecX2   =  -3.833 * fgkmm; // (corr. by Alberto)
-    const Double_t ksecY2   = -17.805 * fgkmm;
-    const Double_t ksecR2   =  +0.6  * fgkmm; // internal (guess)
-    const Double_t ksecX3   =  -3.123 * fgkmm;
-    const Double_t ksecY3   = -14.618 * fgkmm;
-    const Double_t ksecR3   =  -0.6   * fgkmm; // external
-    //const Double_t ksecDip1 = 8.035 * fgkmm;
-    //
-    const Double_t ksecX4   = +11.280 * fgkmm;
-    const Double_t ksecY4   = -14.473 * fgkmm;
-    const Double_t ksecR4   =  +0.8   * fgkmm; // internal
-    const Double_t ksecX5   = +19.544 * fgkmm;
-    const Double_t ksecY5   = +10.961 * fgkmm;
-    const Double_t ksecR5   =  +0.8   * fgkmm; // internal
-    //const Double_t ksecDip2 = 4.553 * fgkmm;
-    //
-    const Double_t ksecX6   = +10.830 * fgkmm;
-    const Double_t ksecY6   = +16.858 * fgkmm;
-    const Double_t ksecR6   =  +0.6   * fgkmm; // internal
-    const Double_t ksecX7   = +11.581 * fgkmm;
-    const Double_t ksecY7   = +13.317 * fgkmm;
-    const Double_t ksecR7   =  -0.6   * fgkmm; // external
-    //const Double_t ksecDip3 = 6.978 * fgkmm;
-    //
-    const Double_t ksecX8   =  -0.733 * fgkmm;
-    const Double_t ksecY8   = +17.486 * fgkmm;
-    const Double_t ksecR8   =  +0.6   * fgkmm; // internal
-    const Double_t ksecX9   =  +0.562 * fgkmm;
-    //const Double_t ksecY9 = +14.486 * fgkmm; // correction by
-    const Double_t ksecY9   = +14.107 * fgkmm; // Alberto
-    const Double_t ksecR9   =  -0.6   * fgkmm; // external
-    //const Double_t ksecDip4 = 6.978 * fgkmm;
-    //
-    const Double_t ksecX10  = -12.252 * fgkmm;
-    const Double_t ksecY10  = +16.298 * fgkmm;
-    const Double_t ksecR10  =  +0.6   * fgkmm; // internal
-    const Double_t ksecX11  = -10.445 * fgkmm;
-    const Double_t ksecY11  = +13.162 * fgkmm;
-    const Double_t ksecR11  =  -0.6   * fgkmm; // external
-    //const Double_t ksecDip5 = 6.978 * fgkmm;
-    //
-    const Double_t ksecX12  = -22.276 * fgkmm;
-    const Double_t ksecY12  = +12.948 * fgkmm;
-    const Double_t ksecR12  =  +0.85  * fgkmm; // internal
+
+    const Double_t ksecR1   =  +0.6   * fgkmm;
+    const Double_t ksecR2   =  +0.6   * fgkmm;
+    const Double_t ksecR3   =  -0.6   * fgkmm;
+    const Double_t ksecR4   =  +0.8   * fgkmm;
+    const Double_t ksecR5   =  +0.8   * fgkmm;
+    const Double_t ksecR6   =  +0.6   * fgkmm;
+    const Double_t ksecR7   =  -0.6   * fgkmm;
+    const Double_t ksecR8   =  +0.6   * fgkmm;
+    const Double_t ksecR9   =  -0.6   * fgkmm;
+    const Double_t ksecR10   =  +0.6   * fgkmm;
+    const Double_t ksecR11   =  -0.6   * fgkmm;
+    const Double_t ksecR12   =  +0.85   * fgkmm;
+
+//    // IDEAL GEOMETRY
+//     const Double_t ksecX1[10] ={-1.3187,-1.3187,-1.3187,-1.3187,-1.3187,-1.3187,-1.3187,-1.3187,-1.3187,-1.3187};
+//     const Double_t ksecY1[10] ={-1.9964,-1.9964,-1.9964,-1.9964,-1.9964,-1.9964,-1.9964,-1.9964,-1.9964,-1.9964};
+//     const Double_t ksecX2[10] ={-0.3833,-0.3833,-0.3833,-0.3833,-0.3833,-0.3833,-0.3833,-0.3833,-0.3833,-0.3833};
+//     const Double_t ksecY2[10] ={-1.7805,-1.7805,-1.7805,-1.7805,-1.7805,-1.7805,-1.7805,-1.7805,-1.7805,-1.7805};
+//     const Double_t ksecX3[10] ={-0.3123,-0.3123,-0.3123,-0.3123,-0.3123,-0.3123,-0.3123,-0.3123,-0.3123,-0.3123};
+//     const Double_t ksecY3[10] ={-1.4618,-1.4618,-1.4618,-1.4618,-1.4618,-1.4618,-1.4618,-1.4618,-1.4618,-1.4618};
+//     const Double_t ksecX4[10] ={+1.1280,+1.1280,+1.1280,+1.1280,+1.1280,+1.1280,+1.1280,+1.1280,+1.1280,+1.1280};
+//     const Double_t ksecY4[10] ={-1.4473,-1.4473,-1.4473,-1.4473,-1.4473,-1.4473,-1.4473,-1.4473,-1.4473,-1.4473};
+//     const Double_t ksecX5[10] ={+1.9544,+1.9544,+1.9544,+1.9544,+1.9544,+1.9544,+1.9544,+1.9544,+1.9544,+1.9544};
+//     const Double_t ksecY5[10] ={+1.0961,+1.0961,+1.0961,+1.0961,+1.0961,+1.0961,+1.0961,+1.0961,+1.0961,+1.0961};
+//     const Double_t ksecX6[10] ={+1.0830,+1.0830,+1.0830,+1.0830,+1.0830,+1.0830,+1.0830,+1.0830,+1.0830,+1.0830};
+//     const Double_t ksecY6[10] ={+1.6868,+1.6868,+1.6868,+1.6868,+1.6868,+1.6868,+1.6868,+1.6868,+1.6868,+1.6868};
+//     const Double_t ksecX7[10] ={+1.1581,+1.1581,+1.1581,+1.1581,+1.1581,+1.1581,+1.1581,+1.1581,+1.1581,+1.1581};
+//     const Double_t ksecY7[10] ={+1.3317,+1.3317,+1.3317,+1.3317,+1.3317,+1.3317,+1.3317,+1.3317,+1.3317,+1.3317};
+//     const Double_t ksecX8[10] ={-0.0733,-0.0733,-0.0733,-0.0733,-0.0733,-0.0733,-0.0733,-0.0733,-0.0733,-0.0733};
+//     const Double_t ksecY8[10] ={+1.7486,+1.7486,+1.7486,+1.7486,+1.7486,+1.7486,+1.7486,+1.7486,+1.7486,+1.7486};
+//     const Double_t ksecX9[10] ={+0.0562,+0.0562,+0.0562,+0.0562,+0.0562,+0.0562,+0.0562,+0.0562,+0.0562,+0.0562};
+//     const Double_t ksecY9[10] ={+1.4107,+1.4107,+1.4107,+1.4107,+1.4107,+1.4107,+1.4107,+1.4107,+1.4107,+1.4107};
+//     const Double_t ksecX10[10]={-1.2252,-1.2252,-1.2252,-1.2252,-1.2252,-1.2252,-1.2252,-1.2252,-1.2252,-1.2252};
+//     const Double_t ksecY10[10]={+1.6298,+1.6298,+1.6298,+1.6298,+1.6298,+1.6298,+1.6298,+1.6298,+1.6298,+1.6298};
+//     const Double_t ksecX11[10]={-1.0445,-1.0445,-1.0445,-1.0445,-1.0445,-1.0445,-1.0445,-1.0445,-1.0445,-1.0445};
+//     const Double_t ksecY11[10]={+1.3162,+1.3162,+1.3162,+1.3162,+1.3162,+1.3162,+1.3162,+1.3162,+1.3162,+1.3162};
+//     const Double_t ksecX12[10]={-2.2276,-2.2276,-2.2276,-2.2276,-2.2276,-2.2276,-2.2276,-2.2276,-2.2276,-2.2276};
+//     const Double_t ksecY12[10]={+1.2948,+1.2948,+1.2948,+1.2948,+1.2948,+1.2948,+1.2948,+1.2948,+1.2948,+1.2948};
+  
+
+//    MODIFIED GEOMETRY according with partial alignment of Staves relative to Sectors
+//    last numbers: 2010/06/11 (ML)
+
+    const Double_t ksecX1[10]={-1.305917, -1.322242, -1.300649, -1.298700, -1.290830, -1.274307, -1.276433, -1.286468, -1.274381, -1.314864};
+    const Double_t ksecY1[10]={-1.997857, -2.018611, -2.005854, -2.004897, -1.995517, -2.002552, -1.995860, -2.021062, -2.012931, -2.043967};
+    const Double_t ksecX2[10]={-0.366115, -0.385562, -0.372689, -0.365682, -0.348432, -0.348442, -0.342468, -0.354071, -0.346900, -0.381275};
+    const Double_t ksecY2[10]={-1.801679, -1.808306, -1.759315, -1.778851, -1.811655, -1.747888, -1.773811, -1.792427, -1.764514, -1.820324};
+//     const Double_t ksecX1[10]={-1.305917, -1.322242, -1.300649, -1.298700, -1.290830, -1.274307, -1.276433, -1.286468, -1.274381, -1.325864};
+//     const Double_t ksecY1[10]={-1.997857, -2.018611, -2.005854, -2.004897, -1.995517, -2.002552, -1.995860, -2.021062, -2.012931, -2.032967};
+//     const Double_t ksecX2[10]={-0.366115, -0.385562, -0.372689, -0.365682, -0.348432, -0.348442, -0.342468, -0.354071, -0.346900, -0.392275};
+//     const Double_t ksecY2[10]={-1.801679, -1.808306, -1.759315, -1.778851, -1.811655, -1.747888, -1.773811, -1.792427, -1.764514, -1.809324};
+    const Double_t ksecX3[10]={-0.314030, -0.315531, -0.347521, -0.337675, -0.300420, -0.378487, -0.330729, -0.330850, -0.362360, -0.321097};
+    const Double_t ksecY3[10]={-1.452488, -1.460418, -1.447060, -1.443146, -1.472410, -1.430019, -1.469073, -1.472048, -1.462010, -1.444355};
+    const Double_t ksecX4[10]={1.124299, 1.124162, 1.089523, 1.095520, 1.136171, 1.058616, 1.105626, 1.106433, 1.077455, 1.117946};
+    const Double_t ksecY4[10]={-1.458714, -1.452649, -1.465297, -1.492717, -1.494665, -1.447732, -1.493369, -1.488126, -1.452925, -1.443447};
+    const Double_t ksecX5[10]={1.951621, 1.939284, 1.931830, 1.935235, 1.952206, 1.939082, 1.924822, 1.940114, 1.918160, 1.960017};
+    const Double_t ksecY5[10]={1.092731, 1.118870, 1.129765, 1.129422, 1.081511, 1.127387, 1.103960, 1.101784, 1.121428, 1.150110};
+    const Double_t ksecX6[10]={1.070070, 1.048297, 1.035920, 1.049049, 1.083621, 1.045882, 1.050399, 1.067823, 1.037967, 1.070850};
+    const Double_t ksecY6[10]={1.667590, 1.678571, 1.681383, 1.696892, 1.676520, 1.683470, 1.689988, 1.691111, 1.698432, 1.712770};
+    const Double_t ksecX7[10]={1.139398, 1.150471, 1.150074, 1.132807, 1.150192, 1.124064, 1.124335, 1.137723, 1.143056, 1.130568};
+    const Double_t ksecY7[10]={1.345588, 1.356062, 1.342468, 1.320467, 1.335807, 1.334477, 1.328622, 1.347184, 1.319861, 1.308420};
+    const Double_t ksecX8[10]={-0.096963, -0.098603, -0.095286, -0.099990, -0.075132, -0.121593, -0.108673, -0.104237, -0.092082, -0.104044};
+    const Double_t ksecY8[10]={1.751207, 1.731467, 1.726908, 1.734219, 1.766159, 1.718203, 1.741891, 1.739743, 1.728288, 1.718046};
+    const Double_t ksecX9[10]={0.047615, 0.087875, 0.034917, 0.071603, 0.026468, 0.091619, 0.051994, 0.059947, 0.079785, 0.043443};
+    const Double_t ksecY9[10]={1.414699, 1.403187, 1.399061, 1.403430, 1.435056, 1.384557, 1.397692, 1.420269, 1.391372, 1.398954};
+    const Double_t ksecX10[10]={-1.233255, -1.186874, -1.246702, -1.213368, -1.259425, -1.190067, -1.225655, -1.224171, -1.197833, -1.237182};
+    const Double_t ksecY10[10]={1.635767, 1.646249, 1.617336, 1.608928, 1.636944, 1.602583, 1.630504, 1.629065, 1.624295, 1.620934};
+    const Double_t ksecX11[10]={-1.018270, -1.031317, -0.960524, -1.001155, -1.045437, -0.986867, -1.002685, -1.017369, -1.005614, -0.985385};
+    const Double_t ksecY11[10]={1.318108, 1.330683, 1.301572, 1.314410, 1.326680, 1.295226, 1.306372, 1.309414, 1.306542, 1.307086};
+    const Double_t ksecX12[10]={-2.199004, -2.214964, -2.139247, -2.180547, -2.224505, -2.165324, -2.175883, -2.193485, -2.183227, -2.161570};
+    const Double_t ksecY12[10]={1.317677, 1.303982, 1.317057, 1.324766, 1.339537, 1.312715, 1.359642, 1.343638, 1.330234, 1.340836};
+
+
     const Double_t ksecR13  =  -0.8   * fgkmm; // external
     const Double_t ksecAngleSide13 = 36.0 * fgkDegree;
     //
@@ -516,22 +551,22 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     // in the format of arrays (???)
     const Int_t ksecNPoints = (ksecNPointsPerRadii + 1) * ksecNRadii + 8;
     Double_t secX[ksecNRadii] = {
-        ksecX0,  ksecX1,  -1000.0,
-        ksecX2,  ksecX3,  -1000.0,
-        ksecX4,  ksecX5,  -1000.0,
-        ksecX6,  ksecX7,  -1000.0,
-        ksecX8,  ksecX9,  -1000.0,
-        ksecX10, ksecX11, -1000.0,
-        ksecX12, -1000.0
+        ksecX0,  ksecX1[sect],  -1000.0,
+        ksecX2[sect],  ksecX3[sect],  -1000.0,
+        ksecX4[sect],  ksecX5[sect],  -1000.0,
+        ksecX6[sect],  ksecX7[sect],  -1000.0,
+        ksecX8[sect],  ksecX9[sect],  -1000.0,
+        ksecX10[sect], ksecX11[sect], -1000.0,
+        ksecX12[sect], -1000.0
     };
     Double_t secY[ksecNRadii] = {
-        ksecY0,  ksecY1,  -1000.0,
-        ksecY2,  ksecY3,  -1000.0,
-        ksecY4,  ksecY5,  -1000.0,
-        ksecY6,  ksecY7,  -1000.0,
-        ksecY8,  ksecY9,  -1000.0,
-        ksecY10, ksecY11, -1000.0,
-        ksecY12, -1000.0
+        ksecY0,  ksecY1[sect],  -1000.0,
+        ksecY2[sect],  ksecY3[sect],  -1000.0,
+        ksecY4[sect],  ksecY5[sect],  -1000.0,
+        ksecY6[sect],  ksecY7[sect],  -1000.0,
+        ksecY8[sect],  ksecY9[sect],  -1000.0,
+        ksecY10[sect], ksecY11[sect], -1000.0,
+        ksecY12[sect], -1000.0
     };
     Double_t secR[ksecNRadii] = {
         ksecR0,  ksecR1,  -.5 * ksecDipLength - ksecDipRadii,
@@ -563,6 +598,7 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     const Int_t ksecDipIndex[ksecNCoolingTubeDips] = {2, 5, 8, 11, 14, 17};
     Double_t secAngleStart[ksecNRadii];
     Double_t secAngleEnd[ksecNRadii];
+    for(Int_t i = 0; i < ksecNRadii; i++)secAngleEnd[i] = 0.;
     Double_t secAngleStart2[ksecNRadii];
     Double_t secAngleEnd2[ksecNRadii];
     Double_t secAngleTurbo[ksecNCoolingTubeDips] = {0., 0., 0., 0., 0., 0.0};
@@ -572,7 +608,8 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     Double_t  xpp2[ksecNPoints], ypp2[ksecNPoints];
     Double_t *xp[ksecNRadii],   *xp2[ksecNRadii];
     Double_t *yp[ksecNRadii],   *yp2[ksecNRadii];
-    TGeoXtru *sA0,  *sA1, *sB0, *sB1,*sB2;
+    TGeoXtru *sA0,  *sA1, *sB0, *sB1;
+    TGeoCompositeShape *sA2, *sB2;
     TGeoBBox *sB3;
     TGeoEltu *sTA0, *sTA1;
     TGeoTube *sTB0, *sTB1; //,*sM0;
@@ -734,7 +771,7 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
         } // end if GetDebug(3)
     } // end for i
     sA0 = new TGeoXtru(2);
-    sA0->SetName("ITS SPD Carbon fiber support Sector A0");
+    sA0->SetName("SectorA0");
     sA0->DefinePolygon(m, xpp, ypp);
     sA0->DefineSection(0, -ksecDz);
     sA0->DefineSection(1,  ksecDz);
@@ -794,10 +831,13 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
         } // end for k
     } // end for i
     sA1 = new TGeoXtru(2);
-    sA1->SetName("ITS SPD Carbon fiber support Sector Air A1");
+    sA1->SetName("SectorA1");
     sA1->DefinePolygon(m, xpp2, ypp2);
-    sA1->DefineSection(0, -ksecDz);
-    sA1->DefineSection(1,  ksecDz);
+    sA1->DefineSection(0, -ksecDz-ksecCthick2);
+    sA1->DefineSection(1,  ksecDz+ksecCthick2);
+
+    sA2 = new TGeoCompositeShape("ITS SPD Carbon fiber support Sector A0",
+                                "SectorA0-SectorA1");
     //
     // Error in TGeoEltu. Semi-axis X must be < Semi-axis Y (?).
     sTA0 = new TGeoEltu("ITS SPD Cooling Tube TA0", 0.5 * ksecCoolTubeFlatY,
@@ -808,7 +848,7 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     SPDsectorShape(ksecNRadii,secX2,secY2,secR2,secAngleStart2,secAngleEnd2,
                    ksecNPointsPerRadii, m, xp, yp);
     sB0 = new TGeoXtru(2);
-    sB0->SetName("ITS SPD Carbon fiber support Sector End B0");
+    sB0->SetName("EndB0");
     sB0->DefinePolygon(m, xpp, ypp);
     sB0->DefineSection(0, ksecDz);
     sB0->DefineSection(1, ksecDz + ksecZEndLen);
@@ -844,50 +884,40 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     InsidePoint(xpp[m-2],ypp[m-2],xpp[m-1],ypp[m-1],xpp[0],ypp[0],
                 ksecCthick2,xpp2[i2],ypp2[i2]);
     sB1 = new TGeoXtru(2);
-    sB1->SetName("ITS SPD Carbon fiber support Sector Air End B1");
+    sB1->SetName("EndB1");
     sB1->DefinePolygon(i2+1, xpp2, ypp2);
-    sB1->DefineSection(0,sB0->GetZ(0));
-    sB1->DefineSection(1,sB0->GetZ(1)-ksecCthick2);
-    const Double_t kspdEndHoleRadius1=5.698*fgkmm;
-    const Double_t kspdEndHoleRadius2=2.336*fgkmm;
-    const Double_t kspdEndHoleDisplacement=6.29*fgkmm;
-    k = (m-1)/4;
-    for(i=0;i<=k;i++){
-        t= ((Double_t)i)/((Double_t)(k));
-        if(!CFHolePoints(t,kspdEndHoleRadius1,kspdEndHoleRadius2,
-                         kspdEndHoleDisplacement,xpp2[i],ypp2[i])){
-            Warning("CarbonFiberSector","CFHolePoints failed "
-                    "i=%d m=%d k=%d t=%e",i,m,k,t);
-        } // end if
-        // simitry in each quadrant.
-        xpp2[2*k-i] = -xpp2[i];
-        ypp2[2*k-i] =  ypp2[i];
-        xpp2[2*k+i] = -xpp2[i];
-        ypp2[2*k+i] = -ypp2[i];
-        xpp2[4*k-i] =  xpp2[i];
-        ypp2[4*k-i] = -ypp2[i];
-    }// end for i
-    //xpp2[m-1] = xpp2[0]; // begining point in
-    //ypp2[m-1] = ypp2[0]; // comment with end point
-    sB2 = new TGeoXtru(2);
-    sB2->SetName("ITS SPD Hole in Carbon fiber support End plate");
-    sB2->DefinePolygon(4*k, xpp2, ypp2);
-    sB2->DefineSection(0,sB1->GetZ(1));
-    sB2->DefineSection(1,sB0->GetZ(1));
+    sB1->DefineSection(0,sB0->GetZ(0)-ksecCthick2);
+    sB1->DefineSection(1,sB0->GetZ(1)+ksecCthick2);
+
+    sB2 = new TGeoCompositeShape("ITS SPD Carbon fiber support Sector End B0",
+                                "EndB0-EndB1");
     // SPD sector mount blocks
     const Double_t kMountBlock[3] = {0.5*(1.8-0.2)*fgkmm,0.5*22.0*fgkmm,
                                      0.5*45.0*fgkmm};
     sB3 = new TGeoBBox((Double_t*)kMountBlock);
+    // SPD sector mount block screws and nuts (M.S. - 27 oct 2012)
+    const Double_t kMountBlockM3ScrewR = 0.5*3.0*fgkmm; // Metric screw
+    const Double_t kMountBlockHead1R   = 0.5*8.0*fgkmm;
+    const Double_t kMountBlockHead1H   = 1.0*fgkmm;
+    const Double_t kMountBlockHead2R   = 0.5*6.0*fgkmm;
+    const Double_t kMountBlockHead2H   = 2.7*fgkmm;
+    const Double_t kMountBlockM3NutR   = 1.8*kMountBlockM3ScrewR; // Metric nut
+    const Double_t kMountBlockM3NutH   = kMountBlockM3NutR; // Metric nut
+    TGeoTube *sM3 = new TGeoTube(0, kMountBlockM3ScrewR, sB3->GetDX());
+    TGeoTube *sD1 = new TGeoTube(0, kMountBlockHead1R,kMountBlockHead1H/2);
+    TGeoTube *sD2 = new TGeoTube(0, kMountBlockHead2R,kMountBlockHead2H/2);
+    TGeoPgon *sN3 = new TGeoPgon(0, 360, 6, 2);
+    sN3->DefineSection(0,-kMountBlockM3NutH/2, 0, kMountBlockM3NutR);
+    sN3->DefineSection(1, kMountBlockM3NutH/2, 0, kMountBlockM3NutR);
     // SPD sector cooling tubes
     sTB0 = new TGeoTube("ITS SPD Cooling Tube End TB0", 0.0,
-                   0.5*ksecCoolTubeROuter,0.5*(sB1->GetZ(1)-sB1->GetZ(0)));
+                   0.5*ksecCoolTubeROuter,0.5*(sB0->GetZ(1)-sB0->GetZ(0)));
     sTB1 = new TGeoTube("ITS SPD Cooling Tube End coolant TB0", 0.0,
                         sTB0->GetRmax() - ksecCoolTubeThick,sTB0->GetDz());
     //
     if(GetDebug(3)) {
         if(medSPDcf) medSPDcf->Dump(); else AliInfo("medSPDcf = 0");
         if(medSPDss) medSPDss->Dump(); else AliInfo("medSPDss = 0");
-        if(medSPDair) medSPDair->Dump(); else AliInfo("medSPDAir = 0");
         if(medSPDcoolfl) medSPDcoolfl->Dump();else AliInfo("medSPDcoolfl = 0");
         sA0->InspectShape();
         sA1->InspectShape();
@@ -902,19 +932,12 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     StavesInSector(vM0);
     // create other volumes with some graphical settings
     TGeoVolume *vA0 = new TGeoVolume("ITSSPDCarbonFiberSupportSectorA0",
-                                     sA0, medSPDcf);
+                                     sA2, medSPDcf);
     vA0->SetVisibility(kTRUE);
     vA0->SetLineColor(4); // Blue
     vA0->SetLineWidth(1);
     vA0->SetFillColor(vA0->GetLineColor());
     vA0->SetFillStyle(4010); // 10% transparent
-    TGeoVolume *vA1 = new TGeoVolume("ITSSPDCarbonFiberSupportSectorAirA1",
-                                     sA1, medSPDair);
-    vA1->SetVisibility(kTRUE);
-    vA1->SetLineColor(7); // light Blue
-    vA1->SetLineWidth(1);
-    vA1->SetFillColor(vA1->GetLineColor());
-    vA1->SetFillStyle(4090); // 90% transparent
     TGeoVolume *vTA0 = new TGeoVolume("ITSSPDCoolingTubeTA0", sTA0, medSPDss);
     vTA0->SetVisibility(kTRUE);
     vTA0->SetLineColor(15); // gray
@@ -929,33 +952,47 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     vTA1->SetFillColor(vTA1->GetLineColor());
     vTA1->SetFillStyle(4000); // 0% transparent
     TGeoVolume *vB0 = new TGeoVolume("ITSSPDCarbonFiberSupportSectorEndB0",
-                                     sB0, medSPDcf);
+                                     sB2, medSPDcf);
     vB0->SetVisibility(kTRUE);
     vB0->SetLineColor(1); // Black
     vB0->SetLineWidth(1);
     vB0->SetFillColor(vB0->GetLineColor());
     vB0->SetFillStyle(4000); // 0% transparent
-    TGeoVolume *vB1 = new TGeoVolume("ITSSPDCarbonFiberSupportSectorEndAirB1",
-                                     sB1, medSPDair);
-    vB1->SetVisibility(kTRUE);
-    vB1->SetLineColor(0); // white
-    vB1->SetLineWidth(1);
-    vB1->SetFillColor(vB1->GetLineColor());
-    vB1->SetFillStyle(4100); // 100% transparent
-    TGeoVolume *vB2 = new TGeoVolume("ITSSPDCarbonFiberSupportSectorEndAirB2",
-                                     sB2, medSPDair);
-    vB2->SetVisibility(kTRUE);
-    vB2->SetLineColor(0); // white
-    vB2->SetLineWidth(1);
-    vB2->SetFillColor(vB2->GetLineColor());
-    vB2->SetFillStyle(4100); // 100% transparent
     TGeoVolume *vB3 = new TGeoVolume(
         "ITSSPDCarbonFiberSupportSectorMountBlockB3",sB3, medSPDcf);
     vB3->SetVisibility(kTRUE);
-    vB3->SetLineColor(1); // Black
+    vB3->SetLineColor(26); // Brown shade
     vB3->SetLineWidth(1);
     vB3->SetFillColor(vB3->GetLineColor());
     vB3->SetFillStyle(4000); // 0% transparent
+    TGeoVolume *vM3 = new TGeoVolume(
+        "ITSSPDCarbonFiberSupportSectorMountBlockScrewM3",sM3, medSPDss);
+    vM3->SetVisibility(kTRUE);
+    vM3->SetLineColor(kGray); // Gray
+    vM3->SetLineWidth(1);
+    vM3->SetFillColor(vM3->GetLineColor());
+    vM3->SetFillStyle(4000); // 0% transparent
+    TGeoVolume *vD1 = new TGeoVolume(
+        "ITSSPDCarbonFiberSupportSectorMountBlockScrewHead1",sD1, medSPDss);
+    vD1->SetVisibility(kTRUE);
+    vD1->SetLineColor(kGray); // Gray
+    vD1->SetLineWidth(1);
+    vD1->SetFillColor(vD1->GetLineColor());
+    vD1->SetFillStyle(4000); // 0% transparent
+    TGeoVolume *vD2 = new TGeoVolume(
+        "ITSSPDCarbonFiberSupportSectorMountBlockScrewHead2",sD2, medSPDss);
+    vD2->SetVisibility(kTRUE);
+    vD2->SetLineColor(kGray); // Gray
+    vD2->SetLineWidth(1);
+    vD2->SetFillColor(vD2->GetLineColor());
+    vD2->SetFillStyle(4000); // 0% transparent
+    TGeoVolume *vN3 = new TGeoVolume(
+        "ITSSPDCarbonFiberSupportSectorMountBlockScrewNut",sN3, medSPDss);
+    vN3->SetVisibility(kTRUE);
+    vN3->SetLineColor(kGray); // Gray
+    vN3->SetLineWidth(1);
+    vN3->SetFillColor(vN3->GetLineColor());
+    vN3->SetFillStyle(4000); // 0% transparent
     TGeoVolume *vTB0 = new TGeoVolume("ITSSPDCoolingTubeEndTB0",sTB0,medSPDss);
     vTB0->SetVisibility(kTRUE);
     vTB0->SetLineColor(15); // gray
@@ -972,9 +1009,6 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
 
     // add volumes to mother container passed as argument of this method
     moth->AddNode(vM0,1,0); // Add virtual volume to mother
-    vA0->AddNode(vA1,1,0); // Put air inside carbon fiber.
-    vB0->AddNode(vB1,1,0); // Put air inside carbon fiber ends.
-    vB0->AddNode(vB2,1,0); // Put air wholes inside carbon fiber ends
     vTA0->AddNode(vTA1,1,0); // Put cooling liquid indide tube middel.
     vTB0->AddNode(vTB1,1,0); // Put cooling liquid inside tube end.
     Double_t tubeEndLocal[3]={0.0,0.0,sTA0->GetDz()};
@@ -982,10 +1016,13 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
         x0 = secX3[ksecDipIndex[i]];
         y0 = secY3[ksecDipIndex[i]];
         t = 90.0 - secAngleTurbo[i];
-        trans = new TGeoTranslation("",x0,y0,0.5*(sB1->GetZ(0)+sB1->GetZ(1)));
-        vB1->AddNode(vTB0, i+1, trans);
+       z0 = 0.5*(sB1->GetZ(0)+sB1->GetZ(1));
+        trans = new TGeoTranslation("",x0,y0,z0);
+        vM0->AddNode(vTB0, i+1, trans);
         // Find location of tube ends for later use.
         trans->LocalToMaster(tubeEndLocal,fTubeEndSector[0][0][i]);
+        trans = new TGeoTranslation("",x0,y0,-z0);
+        vM0->AddNode(vTB0, i+1+ksecNCoolingTubeDips, trans);
         rot = new TGeoRotation("", 0.0, 0.0, t);
         rotrans = new TGeoCombiTrans("", x0, y0, 0.0, rot);
         vM0->AddNode(vTA0, i+1, rotrans);
@@ -998,6 +1035,22 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     // Find location of tube ends for later use.
     for(i=0;i<ksecNCoolingTubeDips;i++) rot->LocalToMaster(
                             fTubeEndSector[0][0][i],fTubeEndSector[0][1][i]);
+    // Put screws inside the mounting block
+    const Double_t kMountingBlockScrew1ZPos =  0.7 *fgkcm;
+    const Double_t kMountingBlockScrew2ZPos =  2.01*fgkcm;
+    const Double_t kMountingBlockScrew34Pos =  0.51*fgkcm;
+    vB3->AddNode(vM3, 1, new TGeoCombiTrans(0, 0,
+                                (sB3->GetDZ()-kMountingBlockScrew1ZPos),
+                                           new TGeoRotation("",90,90,90)));
+    vB3->AddNode(vM3, 2, new TGeoCombiTrans(0, 0,
+                                (sB3->GetDZ()-kMountingBlockScrew2ZPos),
+                                           new TGeoRotation("",90,90,90)));
+    vB3->AddNode(vM3, 3, new TGeoCombiTrans(0,-kMountingBlockScrew34Pos,
+                               -(sB3->GetDZ()-kMountingBlockScrew34Pos),
+                                           new TGeoRotation("",90,90,90)));
+    vB3->AddNode(vM3, 4, new TGeoCombiTrans(0, kMountingBlockScrew34Pos,
+                               -(sB3->GetDZ()-kMountingBlockScrew34Pos),
+                                           new TGeoRotation("",90,90,90)));
     // left side
     t = -TMath::RadToDeg()*TMath::ATan2(
                                    sB0->GetX(0)-sB0->GetX(sB0->GetNvert()-1),
@@ -1010,26 +1063,120 @@ void AliITSv11GeometrySPD::CarbonFiberSector(TGeoVolume *moth,
     z0 = sB0->GetZ(0)+sB3->GetDZ();
     rotrans = new TGeoCombiTrans("",x0,y0,z0,rot);
     vM0->AddNode(vB3,1,rotrans); // Put Mounting bracket on sector
+    // the screw heads and nuts
+    Double_t h = sM3->GetDz() + sD1->GetDz();
+    Double_t zt = sB3->GetDZ()-kMountingBlockScrew1ZPos;
+    vM0->AddNode(vD1, 1, new TGeoCombiTrans(x0+h*CosD(180+t), y0+h*SinD(180+t),
+                                           z0+zt,
+                                           new TGeoRotation("",90+t,90,90)));
+    h = sM3->GetDz() + sD2->GetDz() + ksecCthick2 + 0.06;
+    zt = sB3->GetDZ()-kMountingBlockScrew2ZPos;
+    vM0->AddNode(vD2, 1, new TGeoCombiTrans(x0+h*CosD(180+t), y0+h*SinD(180+t),
+                                           z0+zt,
+                                           new TGeoRotation("",90+t,90,90)));
+    Double_t loc[3],mas[3];
+    loc[0]=0;
+    loc[1]=-kMountingBlockScrew34Pos;
+    loc[2]=-(sB3->GetDZ()-kMountingBlockScrew34Pos);
+    rotrans->LocalToMaster(loc,mas);
+    vM0->AddNode(vD2, 2, new TGeoCombiTrans(mas[0]+h*CosD(180+t),
+                                           mas[1]+h*SinD(180+t),
+                                           mas[2],
+                                           new TGeoRotation("",90+t,90,90)));
+    loc[1]=kMountingBlockScrew34Pos;
+    rotrans->LocalToMaster(loc,mas);
+    vM0->AddNode(vD2, 3, new TGeoCombiTrans(mas[0]+h*CosD(180+t),
+                                           mas[1]+h*SinD(180+t),
+                                           mas[2],
+                                           new TGeoRotation("",90+t,90,90)));
+
+    rot = new TGeoRotation("",t,180.0,0.0);// z & x axis rotation
     rotrans = new TGeoCombiTrans("",x0,y0,-z0,rot);
     vM0->AddNode(vB3,2,rotrans); // Put Mounting bracket on sector
+    h = sM3->GetDz() + sN3->GetZ(1);
+    zt = sB3->GetDZ()-kMountingBlockScrew1ZPos;
+    vM0->AddNode(vN3, 1, new TGeoCombiTrans(x0+h*CosD(180+t), y0+h*SinD(180+t),
+                                          -z0-zt,
+                                           new TGeoRotation("",90+t,90,90)));
+    h += ksecCthick2 + 0.06;
+    zt = sB3->GetDZ()-kMountingBlockScrew2ZPos;
+    vM0->AddNode(vN3, 2, new TGeoCombiTrans(x0+h*CosD(180+t), y0+h*SinD(180+t),
+                                          -z0-zt,
+                                           new TGeoRotation("",90+t,90,90)));
+    loc[1]=-kMountingBlockScrew34Pos;
+    rotrans->LocalToMaster(loc,mas);
+    vM0->AddNode(vN3, 3, new TGeoCombiTrans(mas[0]+h*CosD(180+t),
+                                           mas[1]+h*SinD(180+t),
+                                           mas[2],
+                                           new TGeoRotation("",90+t,90,90)));
+    loc[1]=kMountingBlockScrew34Pos;
+    rotrans->LocalToMaster(loc,mas);
+    vM0->AddNode(vN3, 4, new TGeoCombiTrans(mas[0]+h*CosD(180+t),
+                                           mas[1]+h*SinD(180+t),
+                                           mas[2],
+                                           new TGeoRotation("",90+t,90,90)));
+
     t *= -1.0;
     rot = new TGeoRotation("",t,0.0,0.0); // z axis rotation
-  
     x0 = -0.5*(sB0->GetX(0)+sB0->GetX(sB0->GetNvert()-1))-3.5*
         sB3->GetDX()*TMath::Cos(t*TMath::DegToRad());
     y0 = 0.5*(sB0->GetY(0)+sB0->GetY(sB0->GetNvert()-1))-3.5*
         sB3->GetDX()*TMath::Sin(t*TMath::DegToRad());
     rotrans = new TGeoCombiTrans("",1.01*x0,y0,z0,rot);
     vM0->AddNode(vB3,3,rotrans); // Put Mounting bracket on sector
+    h = sM3->GetDz() + sN3->GetZ(1);
+    zt = sB3->GetDZ()-kMountingBlockScrew1ZPos;
+    vM0->AddNode(vN3, 5, new TGeoCombiTrans(x0-h*CosD(180-t), y0+h*SinD(180-t),
+                                           z0+zt,
+                                           new TGeoRotation("",90+t,90,90)));
+    h += ksecCthick2 + 0.02;
+    zt = sB3->GetDZ()-kMountingBlockScrew2ZPos;
+    vM0->AddNode(vN3, 6, new TGeoCombiTrans(x0-h*CosD(180-t), y0+h*SinD(180-t),
+                                           z0+zt,
+                                           new TGeoRotation("",90+t,90,90)));
+    loc[1]=-kMountingBlockScrew34Pos;
+    rotrans->LocalToMaster(loc,mas);
+    vM0->AddNode(vN3, 7, new TGeoCombiTrans(mas[0]-h*CosD(180-t),
+                                           mas[1]+h*SinD(180-t),
+                                           mas[2],
+                                           new TGeoRotation("",90+t,90,90)));
+    loc[1]=kMountingBlockScrew34Pos;
+    rotrans->LocalToMaster(loc,mas);
+    vM0->AddNode(vN3, 8, new TGeoCombiTrans(mas[0]-h*CosD(180-t),
+                                           mas[1]+h*SinD(180-t),
+                                           mas[2],
+                                           new TGeoRotation("",90+t,90,90)));
+
+    rot = new TGeoRotation("",t,180.0,0.0); // z & x axis rotation
     rotrans = new TGeoCombiTrans("",1.01*x0,y0,-z0,rot);
     vM0->AddNode(vB3,4,rotrans); // Put Mounting bracket on sector
+    h = sM3->GetDz() + sD1->GetDz();
+    zt = sB3->GetDZ()-kMountingBlockScrew1ZPos;
+    vM0->AddNode(vD1, 2, new TGeoCombiTrans(x0-h*CosD(180-t), y0+h*SinD(180-t),
+                                          -z0-zt,
+                                           new TGeoRotation("",90+t,90,90)));
+    h = sM3->GetDz() + sD2->GetDz() + ksecCthick2 + 0.02;
+    zt = sB3->GetDZ()-kMountingBlockScrew2ZPos;
+    vM0->AddNode(vD2, 4, new TGeoCombiTrans(x0-h*CosD(180-t), y0+h*SinD(180-t),
+                                          -z0-zt,
+                                           new TGeoRotation("",90+t,90,90)));
+    loc[1]=-kMountingBlockScrew34Pos;
+    rotrans->LocalToMaster(loc,mas);
+    vM0->AddNode(vD2, 5, new TGeoCombiTrans(mas[0]-h*CosD(180-t),
+                                           mas[1]+h*SinD(180-t),
+                                           mas[2],
+                                           new TGeoRotation("",90+t,90,90)));
+    loc[1]=kMountingBlockScrew34Pos;
+    rotrans->LocalToMaster(loc,mas);
+    vM0->AddNode(vD2, 6, new TGeoCombiTrans(mas[0]-h*CosD(180-t),
+                                           mas[1]+h*SinD(180-t),
+                                           mas[2],
+                                           new TGeoRotation("",90+t,90,90)));
+
     if(GetDebug(3)){
         vM0->PrintNodes();
         vA0->PrintNodes();
-        vA1->PrintNodes();
         vB0->PrintNodes();
-        vB1->PrintNodes();
-        vB2->PrintNodes();
         vB3->PrintNodes();
         vTA0->PrintNodes();
         vTA1->PrintNodes();
@@ -1355,6 +1502,10 @@ TGeoVolume* AliITSv11GeometrySPD::CreateClip(TArrayD &sizes,Bool_t isDummy,
     // with a finite thickness for all the shape
     // Its local reference frame is such that point A corresponds to origin.
     //
+
+  // MODIFIED geometry
+    Double_t sposty = fgkmm * -0.5; // lower internal side to avoid overlaps with modified geometry
+
     Double_t fullLength      = fgkmm * 12.6;    // = x4 - x0
     Double_t flatLength      = fgkmm *  5.4;    // = x4 - x3
     Double_t inclLongLength  = fgkmm *  5.0;    // = 5-6
@@ -1396,6 +1547,9 @@ TGeoVolume* AliITSv11GeometrySPD::CreateClip(TArrayD &sizes,Bool_t isDummy,
     y[6] = y[1] + thickness;
     y[7] = y[0] + thickness;
 
+    y[0] += sposty;
+    y[7] += sposty;
+
     sizes.Set(7);
     sizes[0] = totalLength;
     sizes[1] = fullHeight;
@@ -1570,16 +1724,16 @@ TGeoCompositeShape* AliITSv11GeometrySPD::CreateGroundingFoilShape
     } // end if itype==1
     switch (itype) {
     case 0:
-        sprintf(type,"Kap");
+        snprintf(type,10,"Kap");
         break;
     case 1:
-        sprintf(type,"Alu");
+        snprintf(type,10, "Alu");
         break;
     case 2:
-        sprintf(type,"Glue1");
+        snprintf(type,10,"Glue1");
         break;
     case 3:
-        sprintf(type,"Glue2");
+        snprintf(type,10,"Glue2");
         break;
     }
     // we divide the shape in several slices along the horizontal
@@ -1614,6 +1768,8 @@ TGeoCompositeShape* AliITSv11GeometrySPD::CreateGroundingFoilShape
     shGroundFull = new TGeoBBox(Form("ITSSPDSHgFoil%sFull", type),
                                 0.5*length,0.5*width, 0.5*thickness);
 
+    if(GetDebug(5)) shGroundFull->Print(); // Avoid Coverity warning
+
     // create the polygonal shape to be subtracted to give the correct
     // shape to the borders its vertices are defined in sugh a way that
     // this polygonal will be placed in the correct place considered
@@ -1705,9 +1861,8 @@ TGeoCompositeShape* AliITSv11GeometrySPD::CreateGroundingFoilShape
     Double_t holeY = 0.5*(width - holeWidth) - widthMin;
 
     // create a shape for the holes (common)
-    TGeoBBox *shHole = 0;
-    shHole = new TGeoBBox(Form("ITSSPD%sGfoilHole", type),0.5*holeLength,
-                          0.5*holeWidth, thickness);
+    new TGeoBBox(Form("ITSSPD%sGfoilHole", type),0.5*holeLength,
+                       0.5*holeWidth, thickness);
 
     // insert the holes in the XTRU shape:
     // starting from the first value of X, they are simply
@@ -1728,7 +1883,7 @@ TGeoCompositeShape* AliITSv11GeometrySPD::CreateGroundingFoilShape
             holeX += holeSepX2;
         } // end if else if's
         //cout << i << " --> X = " << holeX << endl;
-        sprintf(name,"ITSSPDTRgFoil%sHole%d", type, i);
+        snprintf(name,200,"ITSSPDTRgFoil%sHole%d", type, i);
         transHole[i] = new TGeoTranslation(name, holeX, holeY, 0.0);
         transHole[i]->RegisterYourself();
         strComposite.Append(Form("ITSSPD%sGfoilHole:%s", type, name));
@@ -1771,7 +1926,7 @@ TGeoVolumeAssembly* AliITSv11GeometrySPD::CreateGroundingFoil(Bool_t isRight,
     // create a suffix to be used in the names of all shapes
     //
     char suf[5];
-    if (isRight) strcpy(suf, "R"); else strcpy(suf, "L");
+    if (isRight) strncpy(suf, "R", 5); else strncpy(suf, "L", 5);
     // this volume will be created in order to ease its placement in
     // the half-stave; then, it is added here the small distance of
     // the "central" edge of each volume from the Z=0 plane in the stave
@@ -1946,7 +2101,7 @@ TGeoVolumeAssembly* AliITSv11GeometrySPD::CreateMCM(Bool_t isRight,
 
     // to distinguish the "left" and "right" objects, a suffix is created
     char suf[5];
-    if (isRight) strcpy(suf, "R"); else strcpy(suf, "L");
+    if (isRight) strncpy(suf, "R", 5); else strncpy(suf, "L", 5);
 
     // ** MEDIA **
     TGeoMedium *medBase = GetMedium("SPD KAPTON(POLYCH2)$",mgr);// ??? MCM BASE
@@ -2252,6 +2407,9 @@ TGeoVolumeAssembly* AliITSv11GeometrySPD::CreatePixelBus
     Double_t extThickness       = fgkmm * 0.25;
     Double_t ext1Length         = fgkmm * (26.7 - 10.0);
     Double_t ext2Length         = fgkmm * 284.0 - ext1Length + extThickness;
+    Double_t ext2LengthL2       = fgkmm * 130.0;
+    Double_t ext4Length         = fgkmm * 40.0;
+    Double_t ext4Twist          =  66.54; //deg
     Double_t extWidth           = fgkmm * 11.0;
     Double_t extHeight          = fgkmm * 2.5;
 
@@ -2329,9 +2487,41 @@ TGeoVolumeAssembly* AliITSv11GeometrySPD::CreatePixelBus
     TGeoVolume *cap = mgr->MakeBox("ITSSPDcapacitor", medCap, 0.5*capThickness,
                                    0.5*capWidth, 0.5*capLength);
 
-    TGeoVolume *ext1 = mgr->MakeBox("Extender1", medExt, 0.5*extThickness, 0.5*extWidth, 0.5*ext1Length);
-    TGeoVolume *ext2 = mgr->MakeBox("Extender2", medExt, 0.5*extHeight - 2.*extThickness, 0.5*extWidth, 0.5*extThickness);
-    TGeoVolume *ext3 = mgr->MakeBox("Extender3", medExt, 0.5*extThickness, 0.5*(extWidth-0.8*fgkmm), 0.5*ext2Length + extThickness); // Hardcode fix of a small overlap
+    char extname[12];
+    snprintf(extname,12,"Extender1l%d",ilayer);
+    TGeoVolume *ext1 = mgr->MakeBox(extname, medExt, 0.5*extThickness, 0.5*extWidth, 0.5*ext1Length);
+    snprintf(extname,12,"Extender2l%d",ilayer);
+    TGeoVolume *ext2 = mgr->MakeBox(extname, medExt, 0.5*extHeight - 2.*extThickness, 0.5*extWidth, 0.5*extThickness);
+    TGeoVolume *ext3=0;
+    snprintf(extname,12,"Extender3l%d",ilayer);
+    TGeoVolume *ext4=0;
+    snprintf(extname,12,"Extender3l%d",ilayer);
+    if (ilayer==1) {
+      Double_t halflen=(0.5*ext2Length + extThickness);
+      Double_t xprof[6],yprof[6];
+      Double_t alpha=24;
+      xprof[0] = -halflen;
+      yprof[0] = -0.5*extThickness;
+      xprof[1] = halflen/2;
+      yprof[1] = yprof[0];
+      xprof[2] = xprof[1] + 0.5*halflen*CosD(alpha);
+      yprof[2] = yprof[1] + 0.5*halflen*SinD(alpha);
+      xprof[3] = xprof[2] - extThickness*SinD(alpha);
+      yprof[3] = yprof[2] + extThickness*CosD(alpha);
+      InsidePoint(xprof[0], yprof[0], xprof[1], yprof[1], xprof[2], yprof[2],
+                 extThickness, xprof[4], yprof[4]);
+      xprof[5] = xprof[0];
+      yprof[5] = 0.5*extThickness;
+      TGeoXtru *ext3sh = new TGeoXtru(2);
+      ext3sh->DefinePolygon(6, xprof, yprof);
+      ext3sh->DefineSection(0, -0.5*(extWidth-0.8*fgkmm));
+      ext3sh->DefineSection(1,  0.5*(extWidth-0.8*fgkmm));
+      ext3 = new TGeoVolume(extname, ext3sh, medExt);
+    } else {
+      ext3 = mgr->MakeBox(extname, medExt, 0.5*extThickness, 0.5*(extWidth-0.8*fgkmm), 0.5*ext2LengthL2 + extThickness); // Hardcode fix of a small overlap
+      ext4= mgr->MakeGtra("Extender4l2", medExt, 0.5*ext4Length, 0, 0, ext4Twist, 0.5*(extWidth-0.8*fgkmm), 0.5*extThickness, 0.5*extThickness, 0, 0.5*(extWidth-0.8*fgkmm), 0.5*extThickness, 0.5*extThickness, 0);
+      ext4->SetLineColor(kGray);
+    }
     bus->SetLineColor(kYellow + 2);
     pt1000->SetLineColor(kGreen + 3);
     res->SetLineColor(kRed + 1);
@@ -2411,17 +2601,40 @@ TGeoVolumeAssembly* AliITSv11GeometrySPD::CreatePixelBus
     x += 0.5*(extHeight - 3.*extThickness);
     TGeoTranslation *trExt2 = new TGeoTranslation(x, y, z);
     if (isRight) {
+      if (ilayer==1)
         z -= 0.5 * (ext2Length - extThickness) + 2.5*extThickness;
+      else
+        z -= 0.5 * (ext2LengthL2 - extThickness) + 2.5*extThickness;
     }
     else {
+      if (ilayer==1)
         z += 0.5 * (ext2Length - extThickness) + 2.5*extThickness;
+      else
+        z += 0.5 * (ext2LengthL2 - extThickness) + 2.5*extThickness;
     }
     x += 0.5*(extHeight - extThickness) - 2.*extThickness;
-    TGeoTranslation *trExt3 = new TGeoTranslation(x, y, z);
+    TGeoCombiTrans *trExt3=0;
+    if (ilayer==1) {
+      if (isRight)
+       trExt3 = new TGeoCombiTrans(x, y, z, new TGeoRotation("",0.,-90.,90.));
+      else
+       trExt3 = new TGeoCombiTrans(x, y, z, new TGeoRotation("",0., 90.,90.));
+    } else
+      trExt3 = new TGeoCombiTrans(x, y, z, 0);
     container->AddNode(ext1, 0, trExt1);
     container->AddNode(ext2, 0, trExt2);
     container->AddNode(ext3, 0, trExt3);
-
+    if (ilayer==2) {
+      TGeoCombiTrans *trExt4=0;
+      if (isRight) {
+       z -= ( ((TGeoBBox*)ext3->GetShape())->GetDZ() + ((TGeoGtra*)ext4->GetShape())->GetDZ() );
+       trExt4 = new TGeoCombiTrans(x, y, z, new TGeoRotation("", ext4Twist/2,0,0));
+      } else {
+       z += ( ((TGeoBBox*)ext3->GetShape())->GetDZ() + ((TGeoGtra*)ext4->GetShape())->GetDZ() );
+       trExt4 = new TGeoCombiTrans(x, y, z, new TGeoRotation("",-ext4Twist/2,0,0));
+      }
+      container->AddNode(ext4, 0, trExt4);
+    }
     sizes[3] = yRef + pt1000Y;
     sizes[4] = zRef + pt1000Z[2];
     sizes[5] = zRef + pt1000Z[7];
@@ -2463,6 +2676,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
     Double_t ext2Length   = fgkmm * 285.0 - ext1Length + extThickness;
 
     const Double_t kCableThickness  =   1.5  *fgkmm;
+    Double_t cableL0 =  10.0 * fgkmm;
     Double_t cableL1 = 340.0 * fgkmm - extThickness - ext1Length - ext2Length;
     Double_t cableL2 = 300.0 * fgkmm;
     //Double_t cableL3 = 570.0 * fgkmm;
@@ -2471,7 +2685,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
     Double_t cableW2 =  30.0 * fgkmm;
     Double_t cableW3 =  50.0 * fgkmm;
 
-    const Double_t kMCMLength       =   cableL1 + cableL2 + cableL3;
+    const Double_t kMCMLength       =   cableL0 + cableL1 + cableL2 + cableL3;
     const Double_t kMCMWidth        =   cableW1;
     const Double_t kMCMThickness    =   1.2  *fgkmm;
 
@@ -2483,7 +2697,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
     const Double_t kConeTubeRmax    =   3.0  *fgkmm;
 
     const Double_t kHorizTubeLen    = 150.0  *fgkmm;
-    const Double_t kYtoHalfStave    =   7.3  *fgkmm;
+    const Double_t kYtoHalfStave    =   9.5  *fgkmm;
 
     const Double_t kWaterCoolRMax   =   2.6  *fgkmm;
     const Double_t kWaterCoolThick  =   0.04 *fgkmm;
@@ -2503,7 +2717,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
     const Double_t kCollThickness   =  10.0  *fgkmm;
     const Double_t kCollTubeThick   =   1.0  *fgkmm;
     const Double_t kCollTubeRadius  =   7.0  *fgkmm;
-    const Double_t kCollTubeLength  = 190.0  *fgkmm;
+    const Double_t kCollTubeLength  = 205.0  *fgkmm;
 
     const Double_t kOptFibDiamet    =   4.5  *fgkmm;
 
@@ -2513,20 +2727,23 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
     Int_t kPurple = 6; // Purple (Root does not define it)
 
     TGeoVolumeAssembly* container[5];
-    container[0] = new TGeoVolumeAssembly("ITSSPDConeModule");
+    if (sideC)
+    container[0] = new TGeoVolumeAssembly("ITSSPDConeModuleC");
+    else
+    container[0] = new TGeoVolumeAssembly("ITSSPDConeModuleA");
     container[1] = new TGeoVolumeAssembly("ITSSPDCoolingModuleSideA");
     container[2] = new TGeoVolumeAssembly("ITSSPDCoolingModuleSideC");
     container[3] = new TGeoVolumeAssembly("ITSSPDPatchPanelModule");
     container[4] = new TGeoVolumeAssembly("ITSSPDWaterCooling");
 
     // The extender on the cone as a Xtru
-    x[0] = 0.0;
+    x[0] = -cableL0;
     y[0] = 0.0 + 0.5 * cableW1;
 
-    x[1] = x[0] + cableL1 - 0.5*(cableW2 - cableW1);
+    x[1] = x[0] + cableL0 + cableL1 - 0.5*(cableW2 - cableW1);
     y[1] = y[0];
 
-    x[2] = x[0] + cableL1;
+    x[2] = x[0] + cableL0 + cableL1;
     y[2] = y[1] + 0.5*(cableW2 - cableW1);
 
     x[3] = x[2] + cableL2;
@@ -2571,7 +2788,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
                                   0.5*cableW2,
                                   0.5*thickness);
     Char_t string[255];
-    sprintf(string, "%s-%s", shOut->GetName(), shIn->GetName());
+    snprintf(string, 255, "%s-%s", shOut->GetName(), shIn->GetName());
     TGeoCompositeShape *shPlate = new TGeoCompositeShape("ITSSPDPlate_shape",
                                 string);
 
@@ -2588,7 +2805,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
     volCollTube->SetLineColor(kAzure);
 
     // The cooling tube on the cone as a Ctub
-    Double_t tubeLength = shCable->GetX(5) - shCable->GetX(0) + kYtoHalfStave;
+    Double_t tubeLength = shCable->GetX(5) - shCable->GetX(0) + kYtoHalfStave -0.85;
     TGeoCtub *shTube = new TGeoCtub(0, kConeTubeRmax, 0.5*tubeLength, 0, 360,
                                    0, SinD(angrot/2), -CosD(angrot/2),
                                    0,              0,              1);
@@ -2643,7 +2860,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
     volCylGasFr->SetLineColor(kPurple);
 
     // The optical fibers bundle on the cone as a Tube
-    Double_t optLength = shCable->GetX(5) - shCable->GetX(0) + kYtoHalfStave;
+    Double_t optLength = shCable->GetX(5) - shCable->GetX(0) + kYtoHalfStave -0.85;
     TGeoTube *shOptFibs = new TGeoTube(0., 0.5*kOptFibDiamet, 0.5*optLength);
 
     TGeoVolume *volOptFibs = new TGeoVolume("ITSSPDOpticalFibersOnCone",
@@ -2711,7 +2928,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
 
     container[0]->AddNode(volCable, 1, 0);
 
-    xloc = shMCMExt->GetDX();
+    xloc = shMCMExt->GetDX() - cableL0;
     zloc = shMCMExt->GetDZ();
     container[0]->AddNode(volMCMExt, 1,
                          new TGeoTranslation( xloc, 0.,-zloc));
@@ -2738,7 +2955,7 @@ TList* AliITSv11GeometrySPD::CreateConeModule(Bool_t sideC, const Double_t angro
       container[0]->AddNode(volCollTube, 1, trCollTube);
     }
         
-    Double_t dxPatch = 2.9;
+    Double_t dxPatch = 2.75;
     Double_t dzPatch = 2.8;
     TGeoCombiTrans *tr2 = new TGeoCombiTrans(1.7*ext2Length - dxPatch, 0.0, dzPatch, rot2);
     container[3]->AddNode(volPatch, 0, tr2);
@@ -2814,7 +3031,7 @@ void AliITSv11GeometrySPD::CreateCones(TGeoVolume *moth) const
     const Int_t kNumberOfModules    =  10;
 
     const Double_t kInnerRadius     =  80.775*fgkmm;
-    const Double_t kZTrans          = 452.000*fgkmm;
+    const Double_t kZTrans          = 451.800*fgkmm;
     const Double_t kAlphaRot        =  46.500*fgkDegree;
     const Double_t kAlphaSpaceCool  =   9.200*fgkDegree;
 
@@ -2939,6 +3156,769 @@ void AliITSv11GeometrySPD::CreateCones(TGeoVolume *moth) const
 }
 
 
+//______________________________________________________________________
+void AliITSv11GeometrySPD::CreateServices(TGeoVolume *moth) const
+{
+    //
+    // New method to implement SPD services
+    //
+    // Created:      25 Jul 2012  Mario Sitta
+    // Updated:      15 Nov 2012  Mario Sitta
+    //
+    // Data provided by C.Gargiulo from CAD
+
+    // Cooling manifolds
+    const Double_t kCoolManifWidth    = fgkmm * 22.0;
+    const Double_t kCoolManifLength   = fgkmm * 50.0;
+    const Double_t kCoolManifThick    = fgkmm *  7.0;
+    const Double_t kCoolManifFitR1out = fgkmm *  4.0;
+    const Double_t kCoolManifFitH1    = fgkmm *  2.5;
+    const Double_t kCoolManifFitR2out = fgkmm *  4.0;
+    const Double_t kCoolManifFitR2in  = fgkmm *  3.2;
+    const Double_t kCoolManifFitH2    = fgkmm *  7.0;
+    const Double_t kCoolManifFitZPos  = fgkmm *  2.0; // TO BE CHECKED!
+    const Double_t kCoolManifCollR1   = fgkmm *  3.0;
+    const Double_t kCoolManifCollH1   = fgkmm *  2.5;
+    const Double_t kCoolManifCollR2   = fgkmm *  1.5;
+    const Double_t kCoolManifCollH2   = fgkmm *  5.0;
+    const Double_t kCoolManifCollXPos = fgkmm *  5.0;
+    const Double_t kCoolManifCollDZ   = fgkmm * 13.0;
+    const Double_t kCoolManifCollZ0   = fgkmm *  9.0;
+
+    const Double_t kCoolManifRPosCAD  = fgkmm * 76.2;
+    const Double_t kCoolManifZPos     = fgkcm * 33.97;// 34.0 - 0.03 toll.
+    // Manifold supports
+    const Double_t kManifSuppWidth    = fgkmm * 24.0; // TO BE CHECKED!
+    const Double_t kManifSuppLen1     = fgkmm * 17.9;
+    const Double_t kManifSuppLen2     = fgkmm * 54.2;
+    const Double_t kManifSuppLen3     = fgkmm *  7.9;
+    const Double_t kManifSuppThick    = fgkmm *  1.5;
+    const Double_t kSuppScrewXPos     = fgkmm *  4.0;
+    const Double_t kSuppScrewZPos     = fgkmm *  3.0;
+    const Double_t kRThermalShield    = fgkcm *  9.9255; // MUST match with GeometrySupport
+    // Sector supports
+    const Double_t kSectSuppWidth     = fgkmm * 15.0;
+    const Double_t kSectSuppLen1      = fgkmm * 16.9; // TO BE CHECKED!
+    const Double_t kSectSuppLen2      = fgkmm * 35.1; // TO BE CHECKED!
+    const Double_t kSectSuppThick     = fgkmm *  1.5;
+    const Double_t kSectSuppDepth     = fgkmm * 17.78; // MUST match with GeometrySupport
+    const Double_t kSectScrewZPos     = fgkmm *  5.1; // TO BE CHECKED!
+
+    const Double_t kSectSuppZPos      = fgkcm * 26.5;
+    // Sector clips
+    const Double_t kSectClipLength    = fgkmm * 30.0;
+    const Double_t kSectClipWidth     = fgkmm * 28.53;
+    const Double_t kSectClipThick1    = fgkmm *  2.0;
+    const Double_t kSectClipThick2    = fgkmm *  0.715;
+    const Double_t kSectClipInStave   = fgkmm * 11.0; // Tuned
+    const Double_t kSectClipAngle     =         29.0; // Degree. Tuned
+    // M3 screws
+    const Double_t kScrewM3Diam       = fgkmm *  3.0;
+    const Double_t kScrewM3HeadThick  = fgkmm *  2.0;
+    const Double_t kScrewM3HeadRmin   = fgkmm *  1.5;
+    const Double_t kScrewM3HeadRmax   = fgkmm *  2.5;
+    const Double_t kScrewM3OutManifH  = fgkmm *  1.5;
+    // Central set pin (in sector support)
+    const Double_t kSetPinDiam        = fgkmm *  6.0;
+    const Double_t kSetPinHeadDiam    = fgkmm *  8.0;
+    const Double_t kSetPinHeadRmin    = fgkmm *  1.5;
+    const Double_t kSetPinHeadThick   = fgkmm *  1.5;
+    const Double_t kSetPinOutClipH    = fgkmm *  1.0;
+
+    // Local variables
+    Double_t xprof[12], yprof[12];
+    Double_t radius, theta;
+    Double_t xpos, ypos, zpos;
+    Double_t tmp;
+
+
+    // The cooling manifold: an Assembly
+    TGeoVolumeAssembly *coolmanifA = new TGeoVolumeAssembly("ITSSPDCoolManifSideA");
+    TGeoVolumeAssembly *coolmanifC = new TGeoVolumeAssembly("ITSSPDCoolManifSideC");
+
+    // The various parts of the manifold
+    TGeoBBox *manifblksh = new TGeoBBox(kCoolManifWidth/2,
+                                       kCoolManifThick/2,
+                                       kCoolManifLength/2);
+
+    TGeoBBox *manifinscubesh = new TGeoBBox(kCoolManifFitR2out,
+                                           kCoolManifFitR2out,
+                                           kCoolManifFitR2out);
+
+    TGeoTube *manifinscyl1sh = new TGeoTube(0, // TO BE CHECKED!
+                                           kCoolManifFitR1out,
+                                           kCoolManifFitH1/2);
+
+    TGeoTube *manifinscyl2sh = new TGeoTube(kCoolManifFitR2in,
+                                           kCoolManifFitR2out,
+                                           kCoolManifFitH2/2);
+
+    TGeoTube *manifcollcyl1sh = new TGeoTube(0,
+                                            kCoolManifCollR1,
+                                            kCoolManifCollH1/2);
+
+    TGeoTube *manifcollcyl2sh = new TGeoTube(0,
+                                            kCoolManifCollR2,
+                                            kCoolManifCollH2/2);
+
+    // The cooling manifold supports
+    const Double_t kCoolManifRPos = kCoolManifRPosCAD  +
+                             (manifinscubesh->GetDY() +
+                            2*manifinscyl1sh->GetDz() +
+                              manifblksh->GetDY()     );
+
+    const Double_t kManifSuppDepth = kRThermalShield -
+                                   (kCoolManifRPos + manifblksh->GetDY());
+
+    TGeoXtru *suppmanifsh = new TGeoXtru(2);
+
+    xprof[ 0] = kManifSuppLen2/2 + kManifSuppThick;
+    yprof[ 0] = 0;
+    xprof[ 1] = xprof[0];
+    yprof[ 1] = kManifSuppDepth;
+    xprof[ 2] = kManifSuppLen2/2 + kManifSuppLen3;
+    yprof[ 2] = yprof[1];
+    xprof[ 3] = xprof[2];
+    yprof[ 3] = yprof[2] + kManifSuppThick;
+    xprof[ 4] = kManifSuppLen2/2;
+    yprof[ 4] = yprof[3];
+    xprof[ 5] = xprof[4];
+    yprof[ 5] = kManifSuppThick;
+    xprof[ 6] = -xprof[5];
+    yprof[ 6] =  yprof[5];
+    xprof[ 7] = -xprof[4];
+    yprof[ 7] =  yprof[4];
+    xprof[ 8] = -(kManifSuppLen2/2 + kManifSuppLen1);
+    yprof[ 8] =  yprof[3];
+    xprof[ 9] =  xprof[8];
+    yprof[ 9] =  yprof[2];
+    xprof[10] = -xprof[1];
+    yprof[10] =  yprof[1];
+    xprof[11] = -xprof[0];
+    yprof[11] =  yprof[0];
+
+    suppmanifsh->DefinePolygon(12,xprof,yprof);
+    suppmanifsh->DefineSection(0,-kManifSuppWidth/2);
+    suppmanifsh->DefineSection(1, kManifSuppWidth/2);
+
+    // The screw head and body
+    TGeoTube *suppscrewbodysh = new TGeoTube(0, kScrewM3Diam/2,
+                                            kManifSuppThick/2);
+
+    TGeoPcon *suppscrewheadsh = new TGeoPcon(0, 360, 4);
+    suppscrewheadsh->DefineSection(0,-kScrewM3HeadThick/2,0, kScrewM3HeadRmax);
+    suppscrewheadsh->DefineSection(1, 0,                  0, kScrewM3HeadRmax);
+    suppscrewheadsh->DefineSection(2, 0,   kScrewM3HeadRmin, kScrewM3HeadRmax);
+    suppscrewheadsh->DefineSection(3, kScrewM3HeadThick/2,
+                                        kScrewM3HeadRmin, kScrewM3HeadRmax);
+
+    TGeoTube *clipscrewbodysh = new TGeoTube(0, kScrewM3Diam/2,
+                                            kSectClipThick1/2);
+
+    // The screw segment below the manifold and the sector clip
+    TGeoTube *screwoutmanifsh = new TGeoTube(0, kScrewM3Diam/2,
+                                            kScrewM3OutManifH/2);
+
+    // The sector supports
+    TGeoXtru *suppsectsh = new TGeoXtru(2);
+
+    xprof[ 0] = kSectSuppLen2/2 + kSectSuppThick;
+    yprof[ 0] = 0;
+    xprof[ 1] = xprof[0];
+    yprof[ 1] = kSectSuppDepth;
+    xprof[ 2] = kSectSuppLen2/2 + kSectSuppLen1;
+    yprof[ 2] = yprof[1];
+    xprof[ 3] = xprof[2];
+    yprof[ 3] = yprof[2] + kSectSuppThick;
+    xprof[ 4] = kSectSuppLen2/2;
+    yprof[ 4] = yprof[3];
+    xprof[ 5] = xprof[4];
+    yprof[ 5] = kSectSuppThick;
+    xprof[ 6] = -xprof[5];
+    yprof[ 6] =  yprof[5];
+    xprof[ 7] = -xprof[4];
+    yprof[ 7] =  yprof[4];
+    xprof[ 8] = -xprof[3];
+    yprof[ 8] =  yprof[3];
+    xprof[ 9] = -xprof[2];
+    yprof[ 9] =  yprof[2];
+    xprof[10] = -xprof[1];
+    yprof[10] =  yprof[1];
+    xprof[11] = -xprof[0];
+    yprof[11] =  yprof[0];
+
+    suppsectsh->DefinePolygon(12,xprof,yprof);
+    suppsectsh->DefineSection(0,-kSectSuppWidth/2);
+    suppsectsh->DefineSection(1, kSectSuppWidth/2);
+
+    // The sector clips
+    TGeoXtru *sectclipsh = new TGeoXtru(2);
+
+    xprof[ 0] =  kSectClipWidth/2;
+    yprof[ 0] =  0;
+    xprof[ 1] = -kSectClipWidth/2;
+    yprof[ 1] =  yprof[0];
+    xprof[ 2] =  xprof[1];
+    yprof[ 2] = -kSectClipThick1;
+    xprof[ 3] =  kSectClipWidth/2 - kSectClipThick2;
+    yprof[ 3] =  yprof[2];
+    xprof[ 4] =  xprof[3] + kSectClipInStave*SinD(kSectClipAngle);
+    yprof[ 4] = -kSectClipInStave*CosD(kSectClipAngle);
+    xprof[ 5] =  xprof[4] + kSectClipThick2*CosD(kSectClipAngle);
+    yprof[ 5] =  yprof[4] + kSectClipThick2*SinD(kSectClipAngle);
+
+    sectclipsh->DefinePolygon(6,xprof,yprof);
+    sectclipsh->DefineSection(0,-kSectClipLength/2);
+    sectclipsh->DefineSection(1, kSectClipLength/2);
+
+    // The central set pin head and body
+    TGeoTube *setpinbodysh = new TGeoTube(0, kSetPinDiam/2,
+                                         kSectSuppThick/2);
+
+    TGeoTube *setpinheadsh = new TGeoTube(kSetPinHeadRmin, kSetPinHeadDiam/2,
+                                         kSetPinHeadThick/2);
+
+    TGeoTube *pinclipbodysh = new TGeoTube(0, kSetPinDiam/2,
+                                          kSectClipThick1/2);
+
+    // The set pin segment below the sector clip
+    TGeoTube *setpinoutclipsh = new TGeoTube(0, kSetPinDiam/2,
+                                            kSetPinOutClipH/2);
+
+
+    // We have the shapes: now create the real volumes
+    TGeoMedium *medInox  = GetMedium("INOX$");
+    TGeoMedium *medCu    = GetMedium("COPPER$");
+    TGeoMedium *medSPDcf = GetMedium("SPD shield$");
+
+    TGeoVolume *manifblk = new TGeoVolume("ITSSPDBlkManif",
+                                         manifblksh,medInox);
+    manifblk->SetLineColor(kGreen+2);
+
+    TGeoVolume *manifinscube = new TGeoVolume("ITSSPDInsCubeManif",
+                                             manifinscubesh,medCu);
+    manifinscube->SetLineColor(kYellow);
+
+    TGeoVolume *manifinscyl1 = new TGeoVolume("ITSSPDInsCyl1Manif",
+                                             manifinscyl1sh,medCu);
+    manifinscyl1->SetLineColor(kYellow);
+
+    TGeoVolume *manifinscyl2 = new TGeoVolume("ITSSPDInsCyl2Manif",
+                                             manifinscyl2sh,medCu);
+    manifinscyl2->SetLineColor(kYellow);
+
+    TGeoVolume *manifcollcyl1 = new TGeoVolume("ITSSPDCollCyl1Manif",
+                                              manifcollcyl1sh,medCu);
+    manifcollcyl1->SetLineColor(kYellow);
+
+    TGeoVolume *manifcollcyl2 = new TGeoVolume("ITSSPDCollCyl2Manif",
+                                              manifcollcyl2sh,medCu);
+    manifcollcyl2->SetLineColor(kYellow);
+
+    TGeoVolume *suppmanif = new TGeoVolume("ITSSPDCoolManifSupp",
+                                              suppmanifsh,medSPDcf);
+    suppmanif->SetLineColor(7);
+
+    TGeoVolume *suppscrewbody = new TGeoVolume("ITSSPDSuppScrewBody",
+                                              suppscrewbodysh,medInox);
+    suppscrewbody->SetLineColor(kGray);
+
+    xpos = kCoolManifLength/2 - kSuppScrewZPos;
+    ypos = suppscrewbodysh->GetDz();
+    zpos = kCoolManifWidth/2  - kSuppScrewXPos;
+    suppmanif->AddNode(suppscrewbody, 1, new TGeoCombiTrans( xpos, ypos, zpos,
+                                        new TGeoRotation("",0,90,0)));
+    suppmanif->AddNode(suppscrewbody, 2, new TGeoCombiTrans( xpos, ypos,-zpos,
+                                        new TGeoRotation("",0,90,0)));
+    suppmanif->AddNode(suppscrewbody, 3, new TGeoCombiTrans(-xpos, ypos, zpos,
+                                        new TGeoRotation("",0,90,0)));
+    suppmanif->AddNode(suppscrewbody, 4, new TGeoCombiTrans(-xpos, ypos,-zpos,
+                                        new TGeoRotation("",0,90,0)));
+
+    TGeoVolume *suppscrewhead = new TGeoVolume("ITSSPDSuppScrewHead",
+                                              suppscrewheadsh,medInox);
+    suppscrewhead->SetLineColor(kGray);
+
+    TGeoVolume *screwoutmanif = new TGeoVolume("ITSSPDSuppScrewOutManif",
+                                              screwoutmanifsh,medInox);
+    screwoutmanif->SetLineColor(kGray);
+
+    TGeoVolume *suppsect = new TGeoVolume("ITSSPDCoolSectorSupp",
+                                         suppsectsh,medSPDcf);
+    suppsect->SetLineColor(7);
+
+    xpos = kSectSuppLen2/2 - kSectScrewZPos;
+    ypos = suppscrewbodysh->GetDz();
+    suppsect->AddNode(suppscrewbody, 1, new TGeoCombiTrans( xpos, ypos, 0,
+                                       new TGeoRotation("",0,90,0)));
+    suppsect->AddNode(suppscrewbody, 2, new TGeoCombiTrans(-xpos, ypos, 0,
+                                       new TGeoRotation("",0,90,0)));
+
+    TGeoVolume *setpinbody = new TGeoVolume("ITSSPDSetPinBody",
+                                           setpinbodysh,medInox);
+    setpinbody->SetLineColor(kGray);
+
+    ypos = setpinbodysh->GetDz();
+    suppsect->AddNode(setpinbody, 1, new TGeoCombiTrans( 0, ypos, 0,
+                                       new TGeoRotation("",0,90,0)));
+
+    TGeoVolume *setpinhead = new TGeoVolume("ITSSPDSetPinHead",
+                                           setpinheadsh,medInox);
+    setpinhead->SetLineColor(kGray);
+
+    TGeoVolume *sectclip = new TGeoVolume("ITSSPDCoolSectorClip",
+                                         sectclipsh,medSPDcf);
+    sectclip->SetLineColor(7);
+
+    TGeoVolume *clipscrewbody = new TGeoVolume("ITSSPDClipScrewBody",
+                                              clipscrewbodysh,medInox);
+    clipscrewbody->SetLineColor(kGray);
+
+    ypos = -clipscrewbodysh->GetDz();
+    zpos = kSectSuppLen2/2 - kSectScrewZPos;
+    sectclip->AddNode(clipscrewbody, 1, new TGeoCombiTrans( 0, ypos, zpos,
+                                       new TGeoRotation("",0,90,0)));
+    sectclip->AddNode(clipscrewbody, 2, new TGeoCombiTrans( 0, ypos,-zpos,
+                                       new TGeoRotation("",0,90,0)));
+
+    TGeoVolume *pinclipbody = new TGeoVolume("ITSSPDClipPinBody",
+                                            pinclipbodysh,medInox);
+    pinclipbody->SetLineColor(kGray);
+
+    ypos = -pinclipbodysh->GetDz();
+    sectclip->AddNode(pinclipbody, 1, new TGeoCombiTrans( 0, ypos, 0,
+                                       new TGeoRotation("",0,90,0)));
+
+    TGeoVolume *setpinoutclip = new TGeoVolume("ITSSPDSetPinOutClip",
+                                              setpinoutclipsh,medInox);
+    setpinoutclip->SetLineColor(kGray);
+
+
+    // Add all volumes in the assemblies
+    coolmanifA->AddNode(manifblk,1,0);
+    coolmanifC->AddNode(manifblk,1,0);
+
+    ypos = manifblksh->GetDY() + manifinscyl1sh->GetDz();
+    zpos = manifblksh->GetDZ() - manifinscyl1sh->GetRmax() - kCoolManifFitZPos;
+    coolmanifA->AddNode(manifinscyl1, 1, new TGeoCombiTrans(0, -ypos, zpos,
+                                        new TGeoRotation("",0,90,0)));
+    coolmanifC->AddNode(manifinscyl1, 1, new TGeoCombiTrans(0, -ypos, zpos,
+                                        new TGeoRotation("",0,90,0)));
+
+    ypos += (manifinscyl1sh->GetDz() + manifinscubesh->GetDY());
+    coolmanifA->AddNode(manifinscube, 1, new TGeoTranslation(0, -ypos, zpos));
+    coolmanifC->AddNode(manifinscube, 1, new TGeoTranslation(0, -ypos, zpos));
+
+    zpos += (manifinscubesh->GetDZ() + manifinscyl2sh->GetDz());
+    coolmanifA->AddNode(manifinscyl2, 1, new TGeoTranslation(0, -ypos, zpos));
+    coolmanifC->AddNode(manifinscyl2, 1, new TGeoTranslation(0, -ypos, zpos));
+
+    ypos = manifblksh->GetDY();
+    coolmanifA->AddNode(suppmanif, 1, new TGeoCombiTrans(0, ypos, 0,
+                                        new TGeoRotation("",-90,90,90)));
+    coolmanifC->AddNode(suppmanif, 1, new TGeoCombiTrans(0, ypos, 0,
+                                        new TGeoRotation("",-90,90,90)));
+
+    ypos += (kManifSuppThick + kScrewM3HeadThick/2);
+    xpos = kCoolManifWidth/2   - kSuppScrewXPos;
+    zpos = kCoolManifLength/2  - kSuppScrewZPos;
+    coolmanifA->AddNode(suppscrewhead, 1, new TGeoCombiTrans( xpos, ypos, zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(suppscrewhead, 1, new TGeoCombiTrans( xpos, ypos, zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifA->AddNode(suppscrewhead, 2, new TGeoCombiTrans( xpos, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(suppscrewhead, 2, new TGeoCombiTrans( xpos, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifA->AddNode(suppscrewhead, 3, new TGeoCombiTrans(-xpos, ypos, zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(suppscrewhead, 3, new TGeoCombiTrans(-xpos, ypos, zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifA->AddNode(suppscrewhead, 4, new TGeoCombiTrans(-xpos, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(suppscrewhead, 4, new TGeoCombiTrans(-xpos, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+
+    ypos = manifblksh->GetDY() + screwoutmanifsh->GetDz();
+    coolmanifA->AddNode(screwoutmanif, 1, new TGeoCombiTrans( xpos,-ypos, zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(screwoutmanif, 1, new TGeoCombiTrans( xpos,-ypos, zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifA->AddNode(screwoutmanif, 2, new TGeoCombiTrans( xpos,-ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(screwoutmanif, 2, new TGeoCombiTrans( xpos,-ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifA->AddNode(screwoutmanif, 3, new TGeoCombiTrans(-xpos,-ypos, zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(screwoutmanif, 3, new TGeoCombiTrans(-xpos,-ypos, zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifA->AddNode(screwoutmanif, 4, new TGeoCombiTrans(-xpos,-ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(screwoutmanif, 4, new TGeoCombiTrans(-xpos,-ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+
+    ypos = manifblksh->GetDY() + suppmanifsh->GetY(1) - suppsectsh->GetY(1);
+    zpos = manifblksh->GetDZ() + (kCoolManifZPos - kSectSuppZPos);
+    coolmanifA->AddNode(suppsect, 1, new TGeoCombiTrans(0, ypos,-zpos,
+                                        new TGeoRotation("",-90,90,90)));
+    coolmanifC->AddNode(suppsect, 1, new TGeoCombiTrans(0, ypos,-zpos,
+                                        new TGeoRotation("",-90,90,90)));
+
+    tmp = ypos; // Save it to avoid recomputing
+
+    ypos += (kSectSuppThick + kScrewM3HeadThick/2);
+    zpos += (kSectSuppLen2/2 - kSectScrewZPos);
+    coolmanifA->AddNode(suppscrewhead, 5, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(suppscrewhead, 5, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    zpos -= 2*(kSectSuppLen2/2 - kSectScrewZPos);
+    coolmanifA->AddNode(suppscrewhead, 6, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(suppscrewhead, 6, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+
+    ypos = tmp + kSectSuppThick + kSetPinHeadThick/2;
+    zpos += (kSectSuppLen2/2 - kSectScrewZPos);
+    coolmanifA->AddNode(setpinhead, 1, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(setpinhead, 1, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+
+    ypos = tmp - 8.e-5; // Avoid microscopic overlap
+    tmp = ypos;
+    coolmanifA->AddNode(sectclip, 1, new TGeoTranslation( 0, ypos,-zpos));
+    coolmanifC->AddNode(sectclip, 1, new TGeoCombiTrans ( 0, ypos,-zpos,
+                                         new TGeoRotation("",-90,180,90)));
+
+    ypos -= (kSectClipThick1 + setpinoutclipsh->GetDz());
+    coolmanifA->AddNode(setpinoutclip, 1, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(setpinoutclip, 1, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+
+    ypos = tmp - (kSectClipThick1 + screwoutmanifsh->GetDz());
+    zpos += (kSectSuppLen2/2 - kSectScrewZPos);
+    coolmanifA->AddNode(screwoutmanif, 5, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(screwoutmanif, 5, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    zpos -= 2*(kSectSuppLen2/2 - kSectScrewZPos);
+    coolmanifA->AddNode(screwoutmanif, 6, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+    coolmanifC->AddNode(screwoutmanif, 6, new TGeoCombiTrans( 0, ypos,-zpos,
+                                         new TGeoRotation("",0,-90,0)));
+
+    xpos = manifblksh->GetDX() - kCoolManifCollXPos;
+    ypos = manifblksh->GetDY() + manifcollcyl1sh->GetDz();
+    zpos =-manifblksh->GetDZ() + kCoolManifCollZ0;
+    for (Int_t i=0; i<3; i++) {
+      coolmanifA->AddNode(manifcollcyl1, 2*i+1,
+                         new TGeoCombiTrans( xpos, -ypos, zpos,
+                                            new TGeoRotation("",0,90,0)));
+      coolmanifA->AddNode(manifcollcyl1, 2*i+2,
+                         new TGeoCombiTrans(-xpos, -ypos, zpos,
+                                            new TGeoRotation("",0,90,0)));
+      coolmanifC->AddNode(manifcollcyl1, 2*i+1,
+                         new TGeoCombiTrans( xpos, -ypos, zpos,
+                                            new TGeoRotation("",0,90,0)));
+      coolmanifC->AddNode(manifcollcyl1, 2*i+2,
+                         new TGeoCombiTrans(-xpos, -ypos, zpos,
+                                            new TGeoRotation("",0,90,0)));
+      Double_t y = ypos + manifcollcyl1sh->GetDz() + manifcollcyl2sh->GetDz();
+      coolmanifA->AddNode(manifcollcyl2, 2*i+1,
+                         new TGeoCombiTrans( xpos, -y, zpos,
+                                            new TGeoRotation("",0,90,0)));
+      coolmanifA->AddNode(manifcollcyl2, 2*i+2,
+                         new TGeoCombiTrans(-xpos, -y, zpos,
+                                            new TGeoRotation("",0,90,0)));
+      coolmanifC->AddNode(manifcollcyl2, 2*i+1,
+                         new TGeoCombiTrans( xpos, -y, zpos,
+                                            new TGeoRotation("",0,90,0)));
+      coolmanifC->AddNode(manifcollcyl2, 2*i+2,
+                         new TGeoCombiTrans(-xpos, -y, zpos,
+                                            new TGeoRotation("",0,90,0)));
+
+      zpos += kCoolManifCollDZ;
+    }
+
+    // Now add the cooling tubes to the assembly
+    CreateCoolingTubes(coolmanifA, kFALSE);
+    CreateCoolingTubes(coolmanifC, kTRUE);
+
+
+    // Finally put everything in the mother volume
+    radius = kCoolManifRPos + 1.e-5; // Avoid microscopic overlap
+    zpos = kCoolManifZPos + manifblksh->GetDZ();
+    for (Int_t i=0; i<10; i++) {
+      theta = 36.*i;
+      moth->AddNode(coolmanifA, i+1, new TGeoCombiTrans(radius*SinD(theta),
+                                                       radius*CosD(theta),
+                                                       zpos,
+                                         new TGeoRotation("",-theta,0,0)));
+      moth->AddNode(coolmanifC, i+1, new TGeoCombiTrans(radius*SinD(theta),
+                                                       radius*CosD(theta),
+                                                      -zpos,
+                                         new TGeoRotation("",90-theta,180,-90)));
+    }
+
+
+}
+
+
+//______________________________________________________________________
+void AliITSv11GeometrySPD::CreateCoolingTubes(TGeoVolume *moth, Bool_t sideC) const
+{
+    //
+    // Private method to implement SPD cooling tubes
+    // going from the manifolds to the staves
+    // Since their form is quite complicate (especially on Side C
+    // where capillaries are located) a separate method is used
+    // If sideC is true, the cooling tubes on Side C are created
+    // along with the cooling loops (aka "capillaries"), otherwise
+    // the (simpler) tubes on Side A get created.
+    //
+    // In all variables:  L = Left (X > 0)   R = Right (X < 0)
+    //
+    // Created:      10 Nov 2012  Mario Sitta
+    //
+    // Data provided by C.Gargiulo from CAD
+
+    // Cooling manifolds - THESE VALUES *MUST* MATCH WITH CALLING METHOD!
+    const Double_t kCoolManifWidth    = fgkmm * 22.0;
+    const Double_t kCoolManifLength   = fgkmm * 50.0;
+    const Double_t kCoolManifThick    = fgkmm *  7.0;
+    const Double_t kCoolManifCollH1   = fgkmm *  2.5;
+    const Double_t kCoolManifCollH2   = fgkmm *  5.0;
+    // Cooling pipes
+    const Double_t kCoolPipeSideARin  = fgkmm *  1.5;
+    const Double_t kCoolPipeSideARout = fgkmm *  1.8;
+    const Double_t kCoolPipeSideCRin  = fgkmm *  0.5;
+    const Double_t kCoolPipeSideCRout = fgkmm *  0.85;
+    const Double_t kCoolPipeHeight    = fgkmm *  1.923;
+    const Double_t kCoolPipeCRadiusL[3] = {11.0, 14.0, 31.34};// TO BE CHECKED!
+    const Double_t kCoolPipeCRadiusR[3] = {12.0, 14.0, 35.54};// TO BE CHECKED!
+    const Double_t kCoolPipeARadiusL12[2] = {14.0, 30.0};
+    const Double_t kCoolPipeARadiusR12[2] = {14.0, 30.0};
+    const Double_t kCoolPipeARadiusL34[2] = {22.0, 30.0};
+    const Double_t kCoolPipeARadiusR34[2] = {22.0, 30.0};
+    const Double_t kCoolPipeARadiusL[3]= {14.0, 14.0, 31.34}; // TO BE CHECKED!
+    const Double_t kCoolPipeARadiusR[3]= {14.0, 14.0, 35.54}; // TO BE CHECKED!
+    const Double_t kCoolPipeZSPD      = fgkcm *  8.47;
+    // Cooling pipes position - THESE VALUES *MUST* MATCH WITH CALLING METHOD!
+    const Double_t kCoolManifCollXPos = fgkmm *  5.0;
+    const Double_t kCoolManifCollDZ   = fgkmm * 13.0;
+    const Double_t kCoolManifCollZ0   = fgkmm *  9.0;
+
+    Int_t kPurple = 6; // Purple (Root does not define it)
+
+    // Local variables
+    Double_t xpos, ypos, zpos;
+    Char_t pipename[11];
+
+    //
+    TGeoMedium *medPhynox  = GetMedium("PHYNOX$");
+    TGeoMedium *medFreon   = GetMedium("Freon$");
+    TGeoMedium *medGasFr   = GetMedium("GASEOUS FREON$");
+
+    // The cooling tubes are created as CableRound volumes
+    // because it's easier to compose them piece by piece
+    AliITSv11GeomCableRound *coolpipe[6];
+
+    if (sideC)
+      for (Int_t i = 0; i<6; i++) {
+       snprintf(pipename,11,"coolPipeC%d",i+1);
+       coolpipe[i] = new AliITSv11GeomCableRound(pipename,kCoolPipeSideCRout);
+       coolpipe[i]->SetNLayers(2);
+       coolpipe[i]->SetLayer(0, kCoolPipeSideCRin, medFreon, kPurple);
+       coolpipe[i]->SetLayer(1,(kCoolPipeSideCRout-kCoolPipeSideCRin),
+                             medPhynox, kYellow);
+      }
+    else
+      for (Int_t i = 0; i<6; i++) {
+       snprintf(pipename,11,"coolPipeA%d",i+1);
+       coolpipe[i] = new AliITSv11GeomCableRound(pipename,kCoolPipeSideARout);
+       coolpipe[i]->SetNLayers(2);
+       coolpipe[i]->SetLayer(0, kCoolPipeSideARin, medGasFr, kPurple);
+       coolpipe[i]->SetLayer(1,(kCoolPipeSideARout-kCoolPipeSideARin),
+                             medPhynox, kYellow);
+      }
+
+     // Now place them in the mother assembly
+     xpos = kCoolManifWidth/2  - kCoolManifCollXPos;
+     ypos = kCoolManifThick/2  + kCoolManifCollH1 + kCoolManifCollH2;
+     zpos =-kCoolManifLength/2 + kCoolManifCollZ0;
+
+     if (sideC) { // On Side C tubes are simpler and can be created in a loop
+
+       for (Int_t i=0; i<3; i++) {
+
+        Double_t coordL[3] = { xpos,-ypos,zpos};
+        Double_t coordR[3] = {-xpos,-ypos,zpos};
+        Double_t vect[3] = {0, 1, 0};
+        coolpipe[2*i]->AddCheckPoint(moth, 0, coordL, vect);
+        coolpipe[2*i+1]->AddCheckPoint(moth, 0, coordR, vect);
+        coordL[1] -= kCoolPipeHeight;
+        coordR[1] = coordL[1];
+        coolpipe[2*i]->AddCheckPoint(moth, 1, coordL, vect);
+        coolpipe[2*i+1]->AddCheckPoint(moth, 1, coordR, vect);
+        coordL[1] -= kCoolPipeCRadiusL[i]*fgkmm;
+        coordL[2] -= kCoolPipeCRadiusL[i]*fgkmm;
+        coordR[1] -= kCoolPipeCRadiusR[i]*fgkmm;
+        coordR[2] -= kCoolPipeCRadiusR[i]*fgkmm;
+        vect[1] = 0;
+        vect[2] = -1;
+        coolpipe[2*i]->AddCheckPoint(moth, 2, coordL, vect);
+        coolpipe[2*i+1]->AddCheckPoint(moth, 2, coordR, vect);
+        coordL[2] = -kCoolPipeZSPD;
+        coordR[2] = -kCoolPipeZSPD;
+        coolpipe[2*i]->AddCheckPoint(moth, 3, coordL, vect);
+        coolpipe[2*i+1]->AddCheckPoint(moth, 3, coordR, vect);
+
+        zpos += kCoolManifCollDZ;
+       }
+
+       for (Int_t i=0; i<6; i++) {
+        coolpipe[i]->SetInitialNode(moth);
+        
+        coolpipe[i]->CreateAndInsertTubeSegment(1);
+        coolpipe[i]->CreateAndInsertTorusSegment(2,180);
+        coolpipe[i]->CreateAndInsertTubeSegment(3);
+       }
+
+     } else { // On Side A tubes are all different so are created one by one
+
+       Double_t coordL[3] = { xpos,-ypos,zpos};
+       Double_t coordR[3] = {-xpos,-ypos,zpos};
+       Double_t vect[3] = {0, 1, 0};
+       coolpipe[0]->AddCheckPoint(moth, 0, coordL, vect);
+       coolpipe[1]->AddCheckPoint(moth, 0, coordR, vect);
+       coordL[1] -= kCoolPipeHeight;
+       coordR[1] = coordL[1];
+       coolpipe[0]->AddCheckPoint(moth, 1, coordL, vect);
+       coolpipe[1]->AddCheckPoint(moth, 1, coordR, vect);
+       coordL[1] -=    SinD(45) *kCoolPipeARadiusL12[0]*fgkmm;
+       coordL[2] -= (1+CosD(45))*kCoolPipeARadiusL12[0]*fgkmm;
+       coordR[1] -=    SinD(45) *kCoolPipeARadiusR12[0]*fgkmm;
+       coordR[2] -= (1+CosD(45))*kCoolPipeARadiusR12[0]*fgkmm;
+       vect[1] = TMath::Sqrt(2);
+       vect[2] = -vect[1];
+       coolpipe[0]->AddCheckPoint(moth, 2, coordL, vect);
+       coolpipe[1]->AddCheckPoint(moth, 2, coordR, vect);
+       coordL[1] += (1-CosD(45))*kCoolPipeARadiusL12[1]*fgkmm;
+       coordL[2] -=    SinD(45) *kCoolPipeARadiusL12[1]*fgkmm;
+       coordR[1] += (1-CosD(45))*kCoolPipeARadiusR12[1]*fgkmm;
+       coordR[2] -=    SinD(45) *kCoolPipeARadiusR12[1]*fgkmm;
+       vect[1] = 0;
+       vect[2] = -1;
+       coolpipe[0]->AddCheckPoint(moth, 3, coordL, vect);
+       coolpipe[1]->AddCheckPoint(moth, 3, coordR, vect);
+       coordL[2] = -kCoolPipeZSPD;
+       coordR[2] = -kCoolPipeZSPD;
+       coolpipe[0]->AddCheckPoint(moth, 4, coordL, vect);
+       coolpipe[1]->AddCheckPoint(moth, 4, coordR, vect);
+
+       coolpipe[0]->SetInitialNode(moth); 
+       coolpipe[0]->CreateAndInsertTubeSegment(1);
+       coolpipe[0]->CreateAndInsertTorusSegment(2,180);
+       coolpipe[0]->CreateAndInsertTorusSegment(3,180);
+       coolpipe[0]->CreateAndInsertTubeSegment(4);
+
+       coolpipe[1]->SetInitialNode(moth); 
+       coolpipe[1]->CreateAndInsertTubeSegment(1);
+       coolpipe[1]->CreateAndInsertTorusSegment(2,180);
+       coolpipe[1]->CreateAndInsertTorusSegment(3,180);
+       coolpipe[1]->CreateAndInsertTubeSegment(4);
+
+       zpos += kCoolManifCollDZ;
+
+       coordL[0] = xpos; coordL[1] = -ypos; coordL[2] = zpos;
+       coordR[0] =-xpos; coordR[1] = -ypos; coordR[2] = zpos;
+       vect[0] = 0; vect[1] = 1; vect[2] = 0;
+
+       coolpipe[2]->AddCheckPoint(moth, 0, coordL, vect);
+       coolpipe[3]->AddCheckPoint(moth, 0, coordR, vect);
+       coordL[1] -= kCoolPipeHeight;
+       coordR[1] = coordL[1];
+       coolpipe[2]->AddCheckPoint(moth, 1, coordL, vect);
+       coolpipe[3]->AddCheckPoint(moth, 1, coordR, vect);
+       coordL[1] -=    SinD(45) *kCoolPipeARadiusL34[0]*fgkmm;
+       coordL[2] -= (1+CosD(45))*kCoolPipeARadiusL34[0]*fgkmm;
+       coordR[1] -=    SinD(45) *kCoolPipeARadiusR34[0]*fgkmm;
+       coordR[2] -= (1+CosD(45))*kCoolPipeARadiusR34[0]*fgkmm;
+       vect[1] = TMath::Sqrt(2);
+       vect[2] = -vect[1];
+       coolpipe[2]->AddCheckPoint(moth, 2, coordL, vect);
+       coolpipe[3]->AddCheckPoint(moth, 2, coordR, vect);
+       coordL[1] += (1-CosD(45))*kCoolPipeARadiusL34[1]*fgkmm;
+       coordL[2] -=    SinD(45) *kCoolPipeARadiusL34[1]*fgkmm;
+       coordR[1] += (1-CosD(45))*kCoolPipeARadiusR34[1]*fgkmm;
+       coordR[2] -=    SinD(45) *kCoolPipeARadiusR34[1]*fgkmm;
+       vect[1] = 0;
+       vect[2] = -1;
+       coolpipe[2]->AddCheckPoint(moth, 3, coordL, vect);
+       coolpipe[3]->AddCheckPoint(moth, 3, coordR, vect);
+       coordL[2] = -kCoolPipeZSPD;
+       coordR[2] = -kCoolPipeZSPD;
+       coolpipe[2]->AddCheckPoint(moth, 4, coordL, vect);
+       coolpipe[3]->AddCheckPoint(moth, 4, coordR, vect);
+
+       coolpipe[2]->SetInitialNode(moth); 
+       coolpipe[2]->CreateAndInsertTubeSegment(1);
+       coolpipe[2]->CreateAndInsertTorusSegment(2,180);
+       coolpipe[2]->CreateAndInsertTorusSegment(3,180);
+       coolpipe[2]->CreateAndInsertTubeSegment(4);
+
+       coolpipe[3]->SetInitialNode(moth); 
+       coolpipe[3]->CreateAndInsertTubeSegment(1);
+       coolpipe[3]->CreateAndInsertTorusSegment(2,180);
+       coolpipe[3]->CreateAndInsertTorusSegment(3,180);
+       coolpipe[3]->CreateAndInsertTubeSegment(4);
+
+       zpos += kCoolManifCollDZ;
+
+       coordL[0] = xpos; coordL[1] = -ypos; coordL[2] = zpos;
+       coordR[0] =-xpos; coordR[1] = -ypos; coordR[2] = zpos;
+       vect[0] = 0; vect[1] = 1; vect[2] = 0;
+
+       coolpipe[4]->AddCheckPoint(moth, 0, coordL, vect);
+       coolpipe[5]->AddCheckPoint(moth, 0, coordR, vect);
+       coordL[1] -= kCoolPipeHeight;
+       coordR[1] = coordL[1];
+       coolpipe[4]->AddCheckPoint(moth, 1, coordL, vect);
+       coolpipe[5]->AddCheckPoint(moth, 1, coordR, vect);
+       coordL[1] -= kCoolPipeARadiusL[2]*fgkmm;
+       coordL[2] -= kCoolPipeARadiusL[2]*fgkmm;
+       coordR[1] -= kCoolPipeARadiusR[2]*fgkmm;
+       coordR[2] -= kCoolPipeARadiusR[2]*fgkmm;
+       vect[1] = 0;
+       vect[2] = -1;
+       coolpipe[4]->AddCheckPoint(moth, 2, coordL, vect);
+       coolpipe[5]->AddCheckPoint(moth, 2, coordR, vect);
+       coordL[2] = -kCoolPipeZSPD;
+       coordR[2] = -kCoolPipeZSPD;
+       coolpipe[4]->AddCheckPoint(moth, 3, coordL, vect);
+       coolpipe[5]->AddCheckPoint(moth, 3, coordR, vect);
+
+       coolpipe[4]->SetInitialNode(moth);
+       coolpipe[4]->CreateAndInsertTubeSegment(1);
+       coolpipe[4]->CreateAndInsertTorusSegment(2,180);
+       coolpipe[4]->CreateAndInsertTubeSegment(3);
+
+       coolpipe[5]->SetInitialNode(moth);
+       coolpipe[5]->CreateAndInsertTubeSegment(1);
+       coolpipe[5]->CreateAndInsertTorusSegment(2,180);
+       coolpipe[5]->CreateAndInsertTubeSegment(3);
+
+     } // if (sideC)
+
+     if(GetDebug(3))
+       for (Int_t i=0; i<6; i++)
+        coolpipe[i]->PrintCheckPoints();
+
+}
+
+
 //______________________________________________________________________
 TGeoVolume* AliITSv11GeometrySPD::CreateExtender(
     const Double_t *extenderParams, const TGeoMedium *extenderMedium,
@@ -3216,7 +4196,7 @@ Int_t layer,Int_t idxCentral,Int_t idxSide,TArrayD &sizes,TGeoManager *mgr)
     CreateClip(clipSize, kTRUE, mgr);
     // define clip movements (width direction)
     sizes[3] = xBus + 0.5*busThickness;
-    sizes[4] = 0.5 * (fullWidth - busWidth) - clipSize[6] - fgkmm*0.48;
+    sizes[4] = 0.5 * (fullWidth - busWidth) - clipSize[6] - fgkmm*0.26;
     sizes[5] = zBus + busSize[4];
     sizes[6] = zBus + busSize[5];
 
@@ -3473,27 +4453,7 @@ void AliITSv11GeometrySPD::StavesInSector(TGeoVolume *moth, TGeoManager *mgr)
     
     
     // Add a box representing the collector for cooling tubes
-    Double_t collWidth     = fgkmm * 22.0;
-    Double_t collLength    = fgkmm * 50.0;
-    Double_t collThickness = fgkmm *  7.0;
-    Double_t collInSize    = fgkmm * 10.5;
-    
-    TGeoMedium *medColl   = GetMedium("INOX$");
-    TGeoMedium *medCollIn = GetMedium("COPPER$");
-    TGeoVolume *vColl     = mgr->MakeBox("ITSSPDSectorTubeColl"  , medColl, 0.5*collWidth, 0.5*collThickness, 0.5*collLength);
-    TGeoVolume *vCollIn   = mgr->MakeBox("ITSSPDSectorTubeCollIn", medCollIn, 0.5*collInSize, 0.5*collInSize, 0.5*collInSize);
-    vColl->SetLineColor(kGreen+2);
-    vCollIn->SetLineColor(kYellow);
-    
-    TGeoTranslation *tr1 = new TGeoTranslation( 0.1, 1.2,  35.0);
-    TGeoTranslation *tr2 = new TGeoTranslation(-0.1, 1.2, -35.0);
-    TGeoTranslation *tr3 = new TGeoTranslation( 0.1, 1.2 - 0.5*(collThickness+collInSize),  35.0 + 0.5*(collLength - collInSize));
-    TGeoTranslation *tr4 = new TGeoTranslation(-0.1, 1.2 - 0.5*(collThickness+collInSize), -35.0 - 0.5*(collLength - collInSize));
-    
-    moth->AddNode(vColl, 0, tr1);
-    moth->AddNode(vColl, 1, tr2);
-    moth->AddNode(vCollIn, 0, tr3);
-    moth->AddNode(vCollIn, 1, tr4);
+    // MOVED TO CreateServices() - M.S. 25 jul 12
     
 }
 //______________________________________________________________________
@@ -3619,15 +4579,19 @@ void AliITSv11GeometrySPD::ReadAscii(istream* is)
     //   none.
     //
     Int_t i,j,k,n;
-    Double_t gapLadder,GapHalfStave;
-
-    *is>>gapLadder>>GapHalfStave>>n;
+    Double_t gapLadder,gapHalfStave;
+    const Int_t kLimits = 100;
+    *is>>gapLadder>>gapHalfStave>>n;
     if(n!=6){
-        Warning("ReadAscii","fAddStave Array !=6 n=%d",n);
+      AliError(Form("fAddStave Array !=6 n=%d",n));
         return;
     } // end if
     for(i=0;i<n;i++) *is>>fAddStave[i];
     *is>>n;
+    if(n<0 || n> kLimits){
+      AliError("Anomalous value for parameter n");
+      return;
+    } 
     fSPDsectorX0.Set(n);
     fSPDsectorY0.Set(n);
     fSPDsectorX1.Set(n);