]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSv11Hybrid.cxx
- AliITSv11GeometrySupport.cxx : the wings of the ITS support rings
[u/mrichter/AliRoot.git] / ITS / AliITSv11Hybrid.cxx
index ef59b129afdbcd591acc4ef783deec59e01acb25..9f72cb41d1aa0dade326478d6897ddcfca5fde72 100644 (file)
@@ -1,5 +1,5 @@
 /**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
  * Author: The ALICE Off-line Project.                                    *
  * Contributors are mentioned in the code where appropriate.              *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-// $Id$
 
-// $Log$
-// Revision 1.4  2007/05/09 20:40:41  masera
-// Bug fix (V11Hybrid geometry)
-//
-// Revision 1.3  2007/05/08 16:57:42  masera
-// Updates concerning the geometry: versioning system, new V11hybrid version, bug fixes (B.Nilsend and L. Gaudichet
-//
+/* $Id$ */
+
 
 //========================================================================
 //
 //            Geometry of the Inner Tracking System
-//
+//           ---------------------------------------
 //  This geometry is a mix between the old geometry (originally coded
 //  in AliITSvPPRasymmFMD) and the new TGeo geometry (v11).
 //  The flags which indicate whether the old or the new part is used
 //
 //========================================================================
 
+
+
+// $Log: AliITSv11Hybrid.cxx,v $
+// Revision 1.14  2008/01/10 11:14:13  masera
+// SPD/SDD thermal shield and SPD cones updated (M. Sitta)
+//
+// Revision 1.13  2007/12/20 16:58:46  masera
+// bug fixes for SPD1 and SDD1 (A. Dainese)
+//
+// Revision 1.12  2007/12/17 14:48:23  masera
+// Thermal shield between SPD and SDD (M. Sitta)
+//
+// Revision 1.11  2007/11/22 08:32:48  masera
+// Second thermal shield updated in agreement with the installed one. Correction concerning the chemical composition of Rohacell (M.Sitta)
+//
+// Revision 1.10  2007/11/19 17:01:26  masera
+// SSD ladder supports + endcaps systems (E. Cattaruzza)
+//
+// Revision 1.9  2007/10/21 19:22:53  masera
+// Coding conventions
+//
+// Revision 1.8  2007/10/21 18:59:10  masera
+// SPD new geometry added to Hybrid V11
+//
+// Revision 1.7  2007/08/24 14:32:57  hristov
+// Introduction of SPD half-stave volumes, cleaning and new code (in relation to new SPD geometry) in AliITSv11Hybrid (Ludovic)
+//
+// Revision 1.6  2007/07/27 08:12:39  morsch
+// Write all track references into the same branch.
+//
+// Revision 1.5  2007/06/28 10:17:25  masera
+// Introduction of the new SSD geometry in simulation (AliITSv11Hybrid) and suppression of overlaps between old and new parts
+//
+// Revision 1.4  2007/05/09 20:40:41  masera
+// Bug fix (V11Hybrid geometry)
+//
+// Revision 1.3  2007/05/08 16:57:42  masera
+// Updates concerning the geometry: versioning system, new V11hybrid version, bug fixes (B.Nilsend and L. Gaudichet
+//
+
+
 #include <TClonesArray.h>
 #include <TGeometry.h>
 #include <TLorentzVector.h>
 #include <TGeoMatrix.h>
 #include <TGeoPhysicalNode.h>
-#include <TArrayD.h>
-#include <TArrayF.h>
 #include <TString.h>
 #include <TNode.h>
 #include <TTUBE.h>
 #include <TGeoManager.h>
 #include <TGeoVolume.h>
+#include <TGeoXtru.h>
 #include <TVirtualMC.h>
 
 #include "AliITS.h"
 #include "AliITSDetTypeSim.h"
 #include "AliITSgeom.h"
-#include "AliITSgeomSDD.h"
-#include "AliITSgeomSPD.h"
-#include "AliITSgeomSSD.h"
 #include "AliITShit.h"
-#include "AliITSresponseSDD.h"
 #include "AliITSCalibrationSDD.h"
-#include "AliITSCalibrationSPD.h"
-#include "AliITSCalibrationSSD.h"
 #include "AliITSsegmentationSDD.h"
 #include "AliITSsegmentationSPD.h"
 #include "AliITSsegmentationSSD.h"
 #include "AliRun.h"
 #include "AliTrackReference.h"
 #include "AliITSInitGeometry.h"
+#include "AliITSv11GeometrySPD.h"
 #include "AliITSv11GeometrySDD.h"
 #include "AliITSv11GeometrySSD.h"
+#include "AliITSv11GeometrySupport.h"
+#include "AliGeomManager.h"
 
 
-#define GEANTGEOMETRY kTRUE
-
 ClassImp(AliITSv11Hybrid)
 
 //______________________________________________________________________
@@ -95,8 +124,10 @@ AliITSv11Hybrid::AliITSv11Hybrid():
   fFluid(0),
   fIDMother(0),
   fInitGeom((AliITSVersion_t)fMajorVersion,fMinorVersion),
+  fSPDgeom(0),
   fSDDgeom(0),
-  fSSDgeom(0)
+  fSSDgeom(0),
+  fSupgeom(0)
  {
     //    Standard default constructor
     // Inputs:
@@ -105,12 +136,85 @@ AliITSv11Hybrid::AliITSv11Hybrid():
     //   none.
     // Return:
     //   none.
-    Int_t i;
-    for(i=0;i<60;i++) fRead[i] = '\0';
-    for(i=0;i<60;i++) fWrite[i] = '\0';
-    for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0';
-    strncpy(fRead,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymmFMD.det",60);
 }
+
+//______________________________________________________________________
+AliITSv11Hybrid::AliITSv11Hybrid(const char *title) 
+  : AliITS("ITS", title),
+    fGeomDetOut(kFALSE),
+    fGeomDetIn(kFALSE),
+    fByThick(kTRUE),
+    fMajorVersion(IsVersion()),
+    fMinorVersion(1),
+    fDet1(200.0),
+    fDet2(200.0),
+    fChip1(150.0),
+    fChip2(150.0),
+    fRails(0),
+    fFluid(1),
+    fIDMother(0),
+    fInitGeom((AliITSVersion_t)fMajorVersion,fMinorVersion),
+    fSPDgeom(0),
+    fSDDgeom(0),
+    fSSDgeom(0),
+    fSupgeom(0)
+{
+    //    Standard constructor for the v11Hybrid geometry.
+    // Inputs:
+    //   const char * title  Arbitrary title
+    // Outputs:
+    //   none.
+    // Return:
+    //   none.
+  Int_t i;
+  
+  fSPDgeom = new AliITSv11GeometrySPD();
+  fSDDgeom = new AliITSv11GeometrySDD(0);
+  fSSDgeom = new AliITSv11GeometrySSD();
+  fSupgeom = new AliITSv11GeometrySupport();
+
+  fIdN = 6;
+  fIdName = new TString[fIdN];
+
+  if (AliITSInitGeometry::SPDIsTGeoNative()) {
+    fIdName[0] = fSPDgeom->GetSenstiveVolumeName1();
+    fIdName[1] = fSPDgeom->GetSenstiveVolumeName2();
+  } else {
+    fIdName[0] = "ITS1";
+    fIdName[1] = "ITS2";
+  }
+
+  if (AliITSInitGeometry::SDDIsTGeoNative()) {
+    fIdName[2] = fSDDgeom->GetSenstiveVolumeName3();
+    fIdName[3] = fSDDgeom->GetSenstiveVolumeName4();
+  } else {
+    fIdName[2] = "ITS3";
+    fIdName[3] = "ITS4";
+  }
+  
+  if (AliITSInitGeometry::SSDIsTGeoNative()) {
+    fIdName[4] = fSSDgeom->GetSenstiveVolumeName5();
+    fIdName[5] = fSSDgeom->GetSenstiveVolumeName6();
+  } else {
+    fIdName[4] = "ITS5";
+    fIdName[5] = "ITS6";
+  }
+
+  fIdSens    = new Int_t[fIdN];
+  for(i=0;i<fIdN;i++) fIdSens[i] = 0;
+  SetThicknessDet1();
+  SetThicknessDet2();
+  SetThicknessChip1();
+  SetThicknessChip2();
+  SetDensityServicesByThickness();
+  
+  fEuclidGeometry="$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.euc";
+  strncpy(fEuclidGeomDet,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det",60);
+  strncpy(fRead,fEuclidGeomDet,60);
+  strncpy(fWrite,fEuclidGeomDet,60);
+  strncpy(fRead,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymmFMD.det",60);
+}
+
 //______________________________________________________________________
 AliITSv11Hybrid::AliITSv11Hybrid(const char *name, const char *title) 
   : AliITS("ITS", title),
@@ -118,17 +222,20 @@ AliITSv11Hybrid::AliITSv11Hybrid(const char *name, const char *title)
     fGeomDetIn(kFALSE),
     fByThick(kTRUE),
     fMajorVersion(IsVersion()),
-    fMinorVersion(0),
-    fDet1(0),
-    fDet2(0),
-    fChip1(0),
-    fChip2(0),
+    fMinorVersion(1),
+    fDet1(200.0),
+    fDet2(200.0),
+    fChip1(150.0),
+    fChip2(150.0),
     fRails(0),
-    fFluid(0),
+    fFluid(1),
     fIDMother(0),
     fInitGeom((AliITSVersion_t)fMajorVersion,fMinorVersion),
+    fSPDgeom(0),
     fSDDgeom(0),
-    fSSDgeom(0) {
+    fSSDgeom(0),
+    fSupgeom(0)
+{
     //    Standard constructor for the v11Hybrid geometry.
     // Inputs:
     //   const char * name   Ignored, set to "ITS"
@@ -139,15 +246,24 @@ AliITSv11Hybrid::AliITSv11Hybrid(const char *name, const char *title)
     //   none.
   Int_t i;
   
+  fSPDgeom = new AliITSv11GeometrySPD();
   fSDDgeom = new AliITSv11GeometrySDD(0);
   fSSDgeom = new AliITSv11GeometrySSD();
+  fSupgeom = new AliITSv11GeometrySupport();
 
   fIdN = 6;
   fIdName = new TString[fIdN];
-  fIdName[0] = name; // removes warning message
-  fIdName[0] = "ITS1";
-  fIdName[1] = "ITS2";
-  
+
+  (void) name; // removes warning message
+
+  if (AliITSInitGeometry::SPDIsTGeoNative()) {
+    fIdName[0] = fSPDgeom->GetSenstiveVolumeName1();
+    fIdName[1] = fSPDgeom->GetSenstiveVolumeName2();
+  } else {
+    fIdName[0] = "ITS1";
+    fIdName[1] = "ITS2";
+  }
+
   if (AliITSInitGeometry::SDDIsTGeoNative()) {
     fIdName[2] = fSDDgeom->GetSenstiveVolumeName3();
     fIdName[3] = fSDDgeom->GetSenstiveVolumeName4();
@@ -177,8 +293,8 @@ AliITSv11Hybrid::AliITSv11Hybrid(const char *name, const char *title)
   strncpy(fRead,fEuclidGeomDet,60);
   strncpy(fWrite,fEuclidGeomDet,60);
   strncpy(fRead,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymmFMD.det",60);
-
 }
+
 //______________________________________________________________________
 AliITSv11Hybrid::~AliITSv11Hybrid() {
     //    Standard destructor
@@ -188,14 +304,14 @@ AliITSv11Hybrid::~AliITSv11Hybrid() {
     //   none.
     // Return:
     //   none.
+  delete fSPDgeom;
   delete fSDDgeom;
   delete fSSDgeom;
+  delete fSupgeom;
 }
 
-
-
 //______________________________________________________________________
-void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t yShift, 
+void AliITSv11Hybrid::SetT2Lmatrix(Int_t uid, Double_t yShift, 
                                   Bool_t yFlip, Bool_t yRot180)
   const {
 
@@ -205,12 +321,8 @@ void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t yShift,
   //
   // This function is used in AddAlignableVolumes()
 
-  TGeoPNEntry *alignableEntry = gGeoManager->GetAlignableEntry(name);
-  const char *path = alignableEntry->GetTitle();
-
-  if (!gGeoManager->cd(path))
-    AliFatal(Form("Volume path %s not valid!",path));
-  TGeoHMatrix* globMatrix = gGeoManager->GetCurrentMatrix();
+  TGeoPNEntry *alignableEntry = gGeoManager->GetAlignableEntryByUID(uid);
+  TGeoHMatrix* globMatrix = alignableEntry->GetGlobalOrig();
 
   Double_t *gtrans = globMatrix->GetTranslation(), rotMatrix[9];
   memcpy(&rotMatrix[0], globMatrix->GetRotationMatrix(), 9*sizeof(Double_t));
@@ -218,21 +330,26 @@ void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t yShift,
   if (yRot180) {
     al = TMath::ATan2(rotMatrix[1],-rotMatrix[0]);
   }
+  Double_t xShift = gtrans[0]*TMath::Cos(al)+gtrans[1]*TMath::Sin(al);
+  Double_t zShift = -gtrans[2];
 
   TGeoHMatrix *matLtoT = new TGeoHMatrix;
-  matLtoT->SetDx( gtrans[0]*TMath::Cos(al)+gtrans[1]*TMath::Sin(al) ); // translation
+  matLtoT->SetDx( xShift ); // translation
   matLtoT->SetDy( yShift );
-  matLtoT->SetDz(-gtrans[2]);
+  matLtoT->SetDz( zShift );
   rotMatrix[0]= 0;  rotMatrix[1]= 1;  rotMatrix[2]= 0; // + rotation
   rotMatrix[3]= 1;  rotMatrix[4]= 0;  rotMatrix[5]= 0;
   rotMatrix[6]= 0;  rotMatrix[7]= 0;  rotMatrix[8]=-1;
   if (yFlip) rotMatrix[3] = -1;  // flipping in y  (for SPD1)
+  if (yFlip) rotMatrix[1] = -1;  // flipping in y  (for SPD1)
 
   if (yRot180) { // rotation of pi around the axis perpendicular to the wafer
+    if (yFlip) matLtoT->SetDx( -xShift ); // flipping in y  (for SPD1)
     matLtoT->SetDy( -yShift );
-    rotMatrix[3] = -1;
-    matLtoT->SetDz(gtrans[2]);
+    matLtoT->SetDz( -zShift );
     rotMatrix[8]=1;
+    rotMatrix[3] = -1;
+    if (yFlip) rotMatrix[3] = 1;  // flipping in y  (for SPD1)
   }
 
   TGeoRotation rot;
@@ -243,71 +360,8 @@ void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t yShift,
   alignableEntry->SetMatrix(matTtoL);
 }
 
-
-
-
-
-/*
-//______________________________________________________________________
-void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t dAlpha,
-                     Double_t dxSign, Double_t yShift, Bool_t yFlip, Bool_t yRot180)
-  const {
-
-  //
-  // Creates the TGeo Local to Tracking transformation matrix
-  // and sends it to the corresponding TGeoPNEntry 
-  //
-  // This function is used in AddAlignableVolumes()
-
-  TGeoPNEntry *alignableEntry = gGeoManager->GetAlignableEntry(name);
-  const char *path = alignableEntry->GetTitle();
-
-  if (!gGeoManager->cd(path))
-    AliFatal(Form("Volume path %s not valid!",path));
-  TGeoHMatrix* globMatrix = gGeoManager->GetCurrentMatrix();
-
-  Double_t *gtransL1 = globMatrix->GetTranslation(), rotMatrixL1[9];
-  memcpy(&rotMatrixL1[0], globMatrix->GetRotationMatrix(), 9*sizeof(Double_t));
-
-  // L1 is the real local reference system. We will define L2, which is a
-  // more practical "local" reference system. L2 has his z axis parallel
-  // to the global z axis and y is the axis perpendicular to the sensor plane.
-  Double_t  rotMatrixL2[9];
-
-
-
-  // We know the transformation from L2 to Tracking
-  Double_t al = TMath::ATan2(rotMatrixL2[1],rotMatrixL2[0]) + dAlpha;
-  Double_t transL2toT[3] = { gtransL1[0]*TMath::Cos(al)+gtransL1[1]*TMath::Sin(al),
-                            yShift,
-                            -gtrans[2]};
-
-  TGeoHMatrix *matLtoT = new TGeoHMatrix;
-  matLtoT->SetDx( dxSign*(gtrans[0]*TMath::Cos(al)+gtrans[1]*TMath::Sin(al)) ); // translation
-  matLtoT->SetDy( yShift );
-  matLtoT->SetDz(-gtrans[2]);
-  rotMatrix[0]= 0;  rotMatrix[1]= 1;  rotMatrix[2]= 0; // + rotation
-  rotMatrix[3]= 1;  rotMatrix[4]= 0;  rotMatrix[5]= 0;
-  rotMatrix[6]= 0;  rotMatrix[7]= 0;  rotMatrix[8]=-1;
-  if (yFlip) rotMatrix[3] = -1;  // flipping in y  (for SPD1)
-
-
-  TGeoRotation rot;
-  rot.SetMatrix(rotMatrix);
-  matLtoT->MultiplyLeft(&rot);
-  TGeoHMatrix *matTtoL = new TGeoHMatrix(matLtoT->Inverse());
-  delete matLtoT;
-  alignableEntry->SetMatrix(matTtoL);
-}
-*/
-
-
-
-
 //______________________________________________________________________
-void AliITSv11Hybrid::AddAlignableVolumes() const
-{
-  //
+void AliITSv11Hybrid::AddAlignableVolumes() const{
   // Creates entries for alignable volumes associating the symbolic volume
   // name with the corresponding volume path.
   // 
@@ -316,6 +370,12 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
   // system
   // For this, this function has to run before the misalignment because we
   // are using the ideal positions in the AliITSgeom object.
+  // Inputs:
+  //   none.
+  // Outputs:
+  //   none.
+  // Return:
+  //   none.
 
   AliInfo("Add ITS alignable volumes");
 
@@ -324,129 +384,305 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
     return;
   }
 
-  if( !gGeoManager->SetAlignableEntry("ITS","ALIC_1/ITSV_1") )
-    AliFatal("Unable to set alignable entry!!");    
+  AliGeomManager::ELayerID layerId;
+  Int_t modUID, modnum;
 
-  //Double_t al, *gtrans, rotMatrix[9];
+  if( !gGeoManager->SetAlignableEntry("ITS","ALIC_1/ITSV_1") )
+    AliFatal(Form("Unable to set alignable entry ! %s :: %s",
+                  "ITS","ALIC_1/ITSV_1"));    
 
   TString strSPD = "ITS/SPD";
   TString strSDD = "ITS/SDD";
   TString strSSD = "ITS/SSD";
   TString strStave = "/Stave";
+  TString strHalfStave = "/HalfStave";
   TString strLadder = "/Ladder";
   TString strSector = "/Sector";
   TString strSensor = "/Sensor";
   TString strEntryName1;
   TString strEntryName2;
   TString strEntryName3;
+  TString strEntryName4;
 
-  //===== SPD layer1 =====
-  {
-    TString str0 = "ALIC_1/ITSV_1/ITSD_1/IT12_1/I12B_";
-    TString str1 = "/I10B_";
-    TString str2 = "/I107_";
+  //===== SPD layers =====
+  
+  if (AliITSInitGeometry::SPDIsTGeoNative()) { // new SPD geometry
+
+    TString str0 = "ALIC_1/ITSV_1/ITSSPD_1/ITSSPDCarbonFiberSectorV_";
+    TString str1 = "/ITSSPDSensitiveVirtualvolumeM0_1/ITSSPDlay1-Stave_";
+    TString str1Bis = "/ITSSPDhalf-Stave";
+    TString str1Tierce = "_1";
+    TString str2 = "/ITSSPDlay1-Ladder_";
   
     TString sector;
     TString stave;
+    TString halfStave;
     TString module;
 
-    for(Int_t c1 = 1; c1<=10; c1++){
+    layerId = AliGeomManager::kSPD1;
+    modnum = 0;
+    
+    for(Int_t cSect = 0; cSect<10; cSect++) {
 
       sector = str0;
-      sector += c1; // this is one full sector
+      sector += cSect+1; // this is one full sector
       strEntryName1 = strSPD;
       strEntryName1 += 0;
       strEntryName1 += strSector;
-      strEntryName1 += (c1-1);
+      strEntryName1 += cSect;
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),sector.Data()))
-       AliFatal("Unable to set alignable entry!!");    
-      //printf("%s   ==   %s\n",strEntryName1.Data(),sector.Data());
-      
-      for(Int_t c2 =1; c2<=2; c2++){
+       AliFatal(Form("New lay 1: Unable to set alignable entry 1! %s::%s",
+                 strEntryName1.Data(),sector.Data()));
+
+      for(Int_t cStave=0; cStave<2; cStave++) {
        
        stave = sector;
        stave += str1;
-       stave += c2;
+       stave += cStave+1;
        strEntryName2 = strEntryName1;
        strEntryName2 += strStave;
-       strEntryName2 += (c2-1);
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),stave.Data()))
-         AliFatal("Unable to set alignable entry!!");    
-       //printf("%s   ==   %s\n",strEntryName2.Data(),stave.Data()); // this is a stave
+       strEntryName2 += cStave;
+
+       for(Int_t cHS=0; cHS<2; cHS++) {
+
+         halfStave = stave;
+         halfStave += str1Bis;
+         halfStave += cHS;
+         halfStave += str1Tierce;
+         strEntryName3 = strEntryName2;
+         strEntryName3 += strHalfStave;
+         strEntryName3 += cHS;
+
+         if(!gGeoManager->SetAlignableEntry(strEntryName3.Data(),
+                                             halfStave.Data()))
+           AliFatal(Form("New lay 1: Unable to set alignable entry 3! %s::%s",
+                          strEntryName3.Data(),halfStave.Data()));    
 
-       for(Int_t c3 =1; c3<=4; c3++){
+         for(Int_t cLad=0; cLad<2; cLad++) {
          
-         module = stave;
-         module += str2;
-         module += c3;
+           modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
+           module = halfStave;
+           module += str2;
+           module += cLad+cHS*2+1;
+           strEntryName4 = strEntryName3;
+           strEntryName4 += strLadder;
+           strEntryName4 += cLad+cHS*2;
+           if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),module.Data(),modUID))
+             AliFatal(Form("New lay 1: Unable to set alignable entry 4! %s::%s",
+                       strEntryName4.Data(),module.Data()));
+
+           SetT2Lmatrix(modUID, 0.0081, kTRUE, kTRUE);
+           // 0.0081 is the shift between the centers of alignable 
+            // and sensitive volumes. It is directly extracted from 
+            // the new SPD geometry
+         } // end for cLad
+       } // end for cHS
+      } // end for cStave
+    } // end for cSect
+
+    layerId = AliGeomManager::kSPD2;
+    modnum = 0;
+    str1 = "/ITSSPDSensitiveVirtualvolumeM0_1/ITSSPDlay2-Stave_";
+    str2 = "/ITSSPDlay2-Ladder_";
+
+    for(Int_t cSect = 0; cSect<10; cSect++) {
+
+      sector = str0;
+      sector += cSect+1; // this is one full sector
+      strEntryName1 = strSPD;
+      strEntryName1 += 1;
+      strEntryName1 += strSector;
+      strEntryName1 += cSect;
+      
+      for(Int_t cStave=0; cStave<4; cStave++) {
+       
+       stave = sector;
+       stave += str1;
+       stave += cStave+1;
+       strEntryName2 = strEntryName1;
+       strEntryName2 += strStave;
+       strEntryName2 += cStave;
+
+       for(Int_t cHS=0; cHS<2; cHS++) {
+
+         halfStave = stave;
+         halfStave += str1Bis;
+         halfStave += cHS;
+         halfStave += str1Tierce;
          strEntryName3 = strEntryName2;
-         strEntryName3 += strLadder;
-         strEntryName3 += (c3-1);
-         if(!gGeoManager->SetAlignableEntry(strEntryName3.Data(),module.Data()))
-           AliFatal("Unable to set alignable entry!!");    
-         //printf("%s   ==   %s\n",strEntryName3.Data(),module.Data());
-
-         SetT2Lmatrix(strEntryName3.Data(), -fChip1*0.0001/2., kTRUE);
-       }
-      }
-    }
-  }
+         strEntryName3 += strHalfStave;
+         strEntryName3 += cHS;
+
+         if(!gGeoManager->SetAlignableEntry(strEntryName3.Data(),
+                                             halfStave.Data()))
+           AliFatal(Form("New lay 2: Unable to set alignable entry 3! %s::%s",
+                     strEntryName3.Data(),halfStave.Data()));    
+
+         for(Int_t cLad=0; cLad<2; cLad++) {
+
+           modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
+           module = halfStave;
+           module += str2;
+           module += cLad+cHS*2 +1;
+           strEntryName4 = strEntryName3;
+           strEntryName4 += strLadder;
+           strEntryName4 += cLad+cHS*2;
+           if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),module.Data(),modUID))
+             AliFatal(Form("New lay 2: Unable to set alignable entry 4! %s::%s",
+                       strEntryName4.Data(),module.Data()));
+
+           SetT2Lmatrix(modUID, -0.0081, kFALSE);
+         } // end for cLad
+       } // end for cHS
+      } // end for cStave
+    } // cSect
+
+  } else {  // else old SPD geometry
 
-  //===== SPD layer2 =====
-  {
     TString str0 = "ALIC_1/ITSV_1/ITSD_1/IT12_1/I12B_";
-    TString str1 = "/I20B_";
-    TString str2 = "/I1D7_";
+    TString str1 = "/I10B_";
+    TString str1Bis = "/L1H-STAVE";
+    TString str1Tierce = "_1";
+    TString str2 = "/I107_";
   
     TString sector;
     TString stave;
+    TString halfStave;
     TString module;
 
-    for(Int_t c1 = 1; c1<=10; c1++){
+    layerId = AliGeomManager::kSPD1;
+    modnum = 0;
+
+    for(Int_t cSect = 0; cSect<10; cSect++) {
 
       sector = str0;
-      sector += c1; // this is one full sector
+      sector += cSect+1; // this is one full sector
       strEntryName1 = strSPD;
-      strEntryName1 += 1;
+      strEntryName1 += 0;
       strEntryName1 += strSector;
-      strEntryName1 += (c1-1);
+      strEntryName1 += cSect;
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),sector.Data()))
-       AliFatal("Unable to set alignable entry!!");    
-      //printf("%s   ==   %s\n",strEntryName1.Data(),sector.Data());
-      
-      for(Int_t c2 =1; c2<=4; c2++){
+       AliFatal(Form("Old lay1: Unable to set alignable entry 1! %s::%s",
+                 strEntryName1.Data(),sector.Data()));    
+
+      for(Int_t cStave = 0; cStave<2; cStave++) {
+
+       stave = sector;
+       stave += str1;
+       stave += cStave+1;
+       strEntryName2 = strEntryName1;
+       strEntryName2 += strStave;
+       strEntryName2 += cStave;
+        // this is a stave
+       //printf("%s   ==   %s\n",strEntryName2.Data(),stave.Data()); 
+
+       for(Int_t cHS=0; cHS<2; cHS++) {
+
+         halfStave = stave;
+         halfStave += str1Bis;
+         halfStave += cHS;
+         halfStave += str1Tierce;
+         strEntryName3 = strEntryName2;
+         strEntryName3 += strHalfStave;
+         strEntryName3 += cHS;
+          // this is a half-stave
+         //printf("%s   ==   %s\n",strEntryName3.Data(),halfStave.Data()); 
+         if(!gGeoManager->SetAlignableEntry(strEntryName3.Data(),
+                                             halfStave.Data()))
+           AliFatal(Form("Old lay 1: Unable to set alignable entry 3! %s::%s",
+                     strEntryName3.Data(),halfStave.Data()));
+
+         for(Int_t cLadder = 0; cLadder<2; cLadder++) {
+           
+           modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
+           module = halfStave;
+           module += str2;
+           module += cLadder+cHS*2+1;
+           strEntryName4 = strEntryName3;
+           strEntryName4 += strLadder;
+           strEntryName4 += cLadder+cHS*2;
+           //printf("%s   ==   %s\n",strEntryName4.Data(),module.Data());
+           if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),module.Data(),modUID))
+             AliFatal(Form("Old lay 1: Unable to set alignable entry 4! %s::%s",
+                   strEntryName4.Data(),module.Data()));
+
+           SetT2Lmatrix(modUID, -fChip1*0.0001/2., kTRUE);
+         } // end for cLadder
+       } // end for cHS
+      } // end for cStave
+    } // end for cSect
+
+    layerId = AliGeomManager::kSPD2;
+    modnum = 0;
+
+    str1Bis = "/L2H-STAVE";
+    str1 = "/I20B_";
+    str2 = "/I1D7_";
+
+    for(Int_t cSect = 0; cSect<10; cSect++) {
+
+      sector = str0;
+      sector += cSect+1; // this is one full sector
+      strEntryName1 = strSPD;
+      strEntryName1 += 1;
+      strEntryName1 += strSector;
+      strEntryName1 += cSect;
+      //if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),sector.Data()))
+      //       AliFatal(Form("Unable to set alignable entry!!");    
+      // we don't need the previous lines because the whole sector is 
+      // already define with first layer ...
+
+      for(Int_t cStave =0; cStave<4; cStave++) {
        
        stave = sector;
        stave += str1;
-       stave += c2;
+       stave += cStave+1;
        strEntryName2 = strEntryName1;
        strEntryName2 += strStave;
-       strEntryName2 += (c2-1);
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),stave.Data()))
-         AliFatal("Unable to set alignable entry!!");    
-       //printf("%s   ==   %s\n",strEntryName2.Data(),stave.Data()); // this is a stave
+       strEntryName2 += cStave;
 
-       for(Int_t c3 =1; c3<=4; c3++){
-         
-         module = stave;
-         module += str2;
-         module += c3;
+       for(Int_t cHS=0; cHS<2; cHS++) {
+
+         halfStave = stave;
+         halfStave += str1Bis;
+         halfStave += cHS;
+         halfStave += str1Tierce;
          strEntryName3 = strEntryName2;
-         strEntryName3 += strLadder;
-         strEntryName3 += (c3-1);
-         if(!gGeoManager->SetAlignableEntry(strEntryName3.Data(),module.Data()))
-           AliFatal("Unable to set alignable entry!!");
-         //printf("%s   ==   %s\n",strEntryName3.Data(),module.Data());
-
-         SetT2Lmatrix(strEntryName3.Data(), -fChip2*0.0001/2., kFALSE);
-       }
-      }
-    }
-  }
+         strEntryName3 += strHalfStave;
+         strEntryName3 += cHS;
+          // this is a half-stave
+         //printf("%s   ==   %s\n",strEntryName3.Data(),halfStave.Data()); 
+         if(!gGeoManager->SetAlignableEntry(strEntryName3.Data(),
+                                             halfStave.Data()))
+           AliFatal(Form("Old lay 2: Unable to set alignable entry 3! %s::%s",
+                     strEntryName3.Data(),halfStave.Data()));
+
+         for(Int_t cLad =0; cLad<2; cLad++) {
+
+           modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
+           module = halfStave;
+           module += str2;
+           module += cLad+cHS*2+1;
+           strEntryName4 = strEntryName3;
+           strEntryName4 += strLadder;
+           strEntryName4 += cLad+cHS*2;
+           //printf("%s   ==   %s\n",strEntryName4.Data(),module.Data());
+           if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),module.Data(),modUID))
+             AliFatal(Form("Old lay2: Unable to set alignable entry 4! %s::%s",
+                       strEntryName4.Data(),module.Data()));
+
+           SetT2Lmatrix(modUID, -fChip2*0.0001/2., kFALSE);
+         } // end for cLad
+       } // end for cHS
+      } // end for cStave
+    } // end for cSect
+  } // end if AliITSInitGeometry::SPSIsTGeoNative().
 
   //===== SDD layers =====
   if (AliITSInitGeometry::SDDIsTGeoNative()) { // new SDD geometry
     
+    layerId = AliGeomManager::kSDD1;
+    modnum = 0;
     TString str0 = "/ALIC_1/ITSV_1/ITSsddLayer3_1/ITSsddLadd_"; // SDD layer1
     TString str1 = "/ITSsddSensor3_";
     TString str2 = "/ITSsddWafer3_1";
@@ -463,10 +699,12 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
       strEntryName1 += c1;
       //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
-       AliFatal("Unable to set alignable entry!!");    
+       AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                 strEntryName1.Data(),ladder.Data()));
 
       for(Int_t c2 =0; c2<6; c2++) {
 
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
        wafer = ladder;
        wafer += str1;
        wafer += c2;
@@ -475,13 +713,20 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
        strEntryName2 += strSensor;
        strEntryName2 += c2;
        //printf("%s    ==    %s\n",strEntryName2.Data(),wafer.Data());
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
-         AliFatal("Unable to set alignable entry!!");
-
-       SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, c2>=3);
+       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),wafer.Data()));
+
+       if(c1 != 2) { 
+       SetT2Lmatrix(modUID, 0, kFALSE, c2>=3);
+                 } else {// for ladder 2, mounted with a pi rot around y
+         SetT2Lmatrix(modUID, 0, kFALSE, c2<3);
+         }
       }
     }
 
+    layerId = AliGeomManager::kSDD2;
+    modnum = 0;
     str0 = "/ALIC_1/ITSV_1/ITSsddLayer4_1/ITSsddLadd_"; // SDD layer2
     str1 = "/ITSsddSensor4_";
     str2 = "/ITSsddWafer4_1";
@@ -496,10 +741,12 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
       strEntryName1 += c1;
       //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
-       AliFatal("Unable to set alignable entry!!");    
+       AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                 strEntryName1.Data(),ladder.Data()));
 
       for(Int_t c2 =0; c2<8; c2++) {
 
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
        wafer = ladder;
        wafer += str1;
        wafer += c2;
@@ -508,15 +755,19 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
        strEntryName2 += strSensor;
        strEntryName2 += c2;
        //printf("%s    ==    %s\n",strEntryName2.Data(),wafer.Data());
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
-         AliFatal("Unable to set alignable entry!!");  
+       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),wafer.Data()));
 
-       SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, c2>=4);
+       SetT2Lmatrix(modUID, 0, kFALSE, c2>=4);
       }
     }
 
   } else {  // else old SDD geometry
 
+    layerId = AliGeomManager::kSDD1;
+    modnum = 0;
+    
     TString str0 = "ALIC_1/ITSV_1/ITSD_1/IT34_1/I004_";
     TString str1 = "/I302_";
     
@@ -532,25 +783,28 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
       strEntryName1 +=strLadder;
       strEntryName1 += (c1-1);
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
-       AliFatal("Unable to set alignable entry!!");    
-      //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
+       AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                 strEntryName1.Data(),ladder.Data()));
 
       for(Int_t c2 =1; c2<=6; c2++){
 
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
        wafer = ladder;
        wafer += str1;
        wafer += c2;    // one wafer
        strEntryName2 = strEntryName1;
        strEntryName2 += strSensor;
        strEntryName2 += (c2-1);
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
-         AliFatal("Unable to set alignable entry!!");    
-       //printf("%s    ==    %s\n",strEntryName2.Data(),wafer.Data());
+       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),wafer.Data()));
 
-       SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE);
+       SetT2Lmatrix(modUID, 0, kFALSE);
       }
     }
 
+    layerId = AliGeomManager::kSDD2;
+    modnum = 0;
     str0 = "ALIC_1/ITSV_1/ITSD_1/IT34_1/I005_";
     str1 = "/I402_";
 
@@ -563,31 +817,34 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
       strEntryName1 +=strLadder;
       strEntryName1 += (c1-1);
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
-       AliFatal("Unable to set alignable entry!!");    
-      //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
+       AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                 strEntryName1.Data(),ladder.Data()));
 
       for(Int_t c2 =1; c2<=8; c2++){
 
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
        wafer = ladder;
        wafer += str1;
        wafer += c2;    // one wafer
        strEntryName2 = strEntryName1;
        strEntryName2 += strSensor;
        strEntryName2 += (c2-1);
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
-         AliFatal("Unable to set alignable entry!!");    
-       //printf("%s    ==    %s\n",strEntryName2.Data(),wafer.Data());
+       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s,%s",
+                        strEntryName2.Data(),wafer.Data()));
 
-       SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE);
+       SetT2Lmatrix(modUID, 0, kFALSE);
       }
     }
   }   // end SDD
 
-  //===== SSD layer1 =====
+  //===== SSD layers =====
   if (AliITSInitGeometry::SSDIsTGeoNative()) { // new SSD geometry
 
-    TString str0 = "/ALIC_1/ITSV_1/ITSssdLayer5_1/ITSssdLay5Ladd_"; // SSD layer1
-    TString str1 = "/ITSsddSensor5_";
+    layerId = AliGeomManager::kSSD1;
+    modnum = 0;
+    TString str0 = "/ALIC_1/ITSV_1/ITSssdLayer5_1/ITSssdLay5Ladd_";//SSD layer1
+    TString str1 = "/ITSssdSensor5_";
     TString str2 = "";
     TString ladder;
     TString wafer;
@@ -602,10 +859,12 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
       strEntryName1 += c1;
       //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
-       AliFatal("Unable to set alignable entry!!");    
+       AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                 strEntryName1.Data(),ladder.Data()));
 
       for(Int_t c2 =0; c2<22; c2++) {
 
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
        wafer = ladder;
        wafer += str1;
        wafer += c2;
@@ -614,15 +873,18 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
        strEntryName2 += strSensor;
        strEntryName2 += c2;
        //printf("%s    ==    %s\n",strEntryName2.Data(),wafer.Data());
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
-         AliFatal("Unable to set alignable entry!!");
+       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),wafer.Data()));
 
-       SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, kFALSE);
+       SetT2Lmatrix(modUID, 0, kFALSE, kFALSE);
       }
     }
 
+    layerId = AliGeomManager::kSSD2;
+    modnum = 0;
     str0 = "/ALIC_1/ITSV_1/ITSssdLayer6_1/ITSssdLay6Ladd_"; // SSD layer2
-    str1 = "/ITSsddSensor6_";
+    str1 = "/ITSssdSensor6_";
     str2 = "";
     
     for(Int_t c1 = 0; c1<38; c1++) {
@@ -635,10 +897,12 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
       strEntryName1 += c1;
       //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
-       AliFatal("Unable to set alignable entry!!");    
+       AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                 strEntryName1.Data(),ladder.Data()));
 
       for(Int_t c2 =0; c2<25; c2++) {
 
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
        wafer = ladder;
        wafer += str1;
        wafer += c2;
@@ -647,14 +911,18 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
        strEntryName2 += strSensor;
        strEntryName2 += c2;
        //printf("%s    ==    %s\n",strEntryName2.Data(),wafer.Data());
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
-         AliFatal("Unable to set alignable entry!!");  
+       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),wafer.Data()));
 
-       SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, kFALSE);
+       SetT2Lmatrix(modUID, 0, kFALSE, kFALSE);
       }
     }
     
   } else { // else old SSD geometry
+    
+    layerId = AliGeomManager::kSSD1;
+    modnum = 0;
     TString str0 = "ALIC_1/ITSV_1/ITSD_1/IT56_1/I565_";
     TString str1 = "/I562_";
     TString ladder;
@@ -669,26 +937,28 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
       strEntryName1 +=strLadder;
       strEntryName1 += (c1-1);
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
-       AliFatal("Unable to set alignable entry!!");    
-      //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
-      
+          AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                   strEntryName1.Data(),ladder.Data()));
+
       for(Int_t c2 = 1; c2<=22; c2++){
        
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
        wafer = ladder;
        wafer += str1;
        wafer += c2;     // one wafer
        strEntryName2 = strEntryName1;
        strEntryName2 += strSensor;
        strEntryName2 += (c2-1);
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
-         AliFatal("Unable to set alignable entry!!");    
-       //printf("%s    ==    %s\n",strEntryName2.Data(),wafer.Data());
-       
-       SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE);
+       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),wafer.Data()));
+
+       SetT2Lmatrix(modUID, 0, kFALSE);
       }
     }
     
-    //===== SSD layer2 =====
+    layerId = AliGeomManager::kSSD2;
+    modnum = 0;
     str0 = "ALIC_1/ITSV_1/ITSD_1/IT56_1/I569_";
     str1 = "/I566_";
     
@@ -701,22 +971,23 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
       strEntryName1 +=strLadder;
       strEntryName1 += (c1-1);
       if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
-       AliFatal("Unable to set alignable entry!!");    
-      //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
-      
+       AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                 strEntryName1.Data(),ladder.Data()));
+
       for(Int_t c2 = 1; c2<=25; c2++){
        
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
        wafer = ladder;
        wafer += str1;
        wafer += c2;     // one wafer
        strEntryName2 = strEntryName1;
        strEntryName2 += strSensor;
        strEntryName2 += (c2-1);
-       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
-         AliFatal("Unable to set alignable entry!!");    
-       //printf("%s    ==    %s\n",strEntryName2.Data(),wafer.Data());
-       
-       SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE);
+       if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),wafer.Data()));
+
+       SetT2Lmatrix(modUID, 0, kFALSE);
       }
     }
   } // end SSD geometry 
@@ -790,29 +1061,50 @@ void AliITSv11Hybrid::CreateGeometry() {
   TGeoManager *geoManager = gGeoManager;
 
   CreateOldGeometry();
-  TGeoVolume *vITS = geoManager->GetVolume("ITSV");
-
-  TGeoVolume *vIS02 = geoManager->GetVolume("IS02");
 
+  TGeoVolume *vITS  = geoManager->GetVolume("ITSV");
 
 
   const Char_t *cvsDate="$Date$";
   const Char_t *cvsRevision="$Revision$";
-  const Int_t length=100;
-  Char_t vstrng[length];
-  if(fInitGeom.WriteVersionString(vstrng,length,(AliITSVersion_t)IsVersion(),
+  const Int_t kLength=100;
+  Char_t vstrng[kLength];
+  if(fInitGeom.WriteVersionString(vstrng,kLength,(AliITSVersion_t)IsVersion(),
                             fMinorVersion,cvsDate,cvsRevision))
     vITS->SetTitle(vstrng);
 
+  if (AliITSInitGeometry::SPDIsTGeoNative()) {
+    fSPDgeom->SPDSector(vITS);
+  }
+
   if (AliITSInitGeometry::SDDIsTGeoNative()) {
     fSDDgeom->Layer3(vITS);
     fSDDgeom->Layer4(vITS);
-    fSDDgeom->ForwardLayer3(vIS02);
-    fSDDgeom->ForwardLayer4(vIS02);
+    fSDDgeom->ForwardLayer3(vITS);
+    fSDDgeom->ForwardLayer4(vITS);
   }
+
   if (AliITSInitGeometry::SSDIsTGeoNative()) {
     fSSDgeom->Layer5(vITS);
     fSSDgeom->Layer6(vITS);
+    fSSDgeom->LadderSupportLayer5(vITS);
+    fSSDgeom->LadderSupportLayer6(vITS);
+    fSSDgeom->EndCapSupportSystemLayer6(vITS);
+    fSSDgeom->EndCapSupportSystemLayer5(vITS);
+  }
+
+  if (AliITSInitGeometry::SPDshieldIsTGeoNative())
+    fSupgeom->SPDCone(vITS);
+
+  if (AliITSInitGeometry::SDDconeIsTGeoNative())
+    fSupgeom->SDDCone(vITS);
+
+  if (AliITSInitGeometry::SSDconeIsTGeoNative())
+    fSupgeom->SSDCone(vITS);
+
+  if (AliITSInitGeometry::ServicesAreTGeoNative()) {
+    fSDDgeom->SDDCables(vITS);
+    fSSDgeom->SSDCables(vITS);
   }
 }
 
@@ -851,7 +1143,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
     //End_Html
     //INNER RADII OF THE SILICON LAYERS 
     // Float_t rl[6]    = { 3.8095,7.,15.,24.,38.1,43.5765 };   
-    //THICKNESSES OF LAYERS (in % radiation length)
+    //THICKNESSES OF LAYERS (in % radiation kLength)
     Float_t drl[6]   = { 1.03,1.03,0.94,0.95,0.91,0.87 };   
     //HALF LENGTHS OF LAYERS  
     // Float_t dzl[6]   = { 14.35,14.35,25.1,32.1,49.405,55.27 };
@@ -1439,7 +1731,8 @@ void AliITSv11Hybrid::CreateOldGeometry(){
     dgh[48] = ztpc+4.+0.1;
     dgh[49] = 62.0;//62.4;
     dgh[50] = 85.;
-    gMC->Gsvolu("ITSV", "PCON", idtmed[205], dgh, 51);
+//    gMC->Gsvolu("ITSV", "PCON", idtmed[205], dgh, 51);
+    new TGeoVolumeAssembly("ITSV");
 
     // --- Place the ghost volume in its mother volume (ALIC) and make it 
     //     invisible
@@ -1498,9 +1791,15 @@ void AliITSv11Hybrid::CreateOldGeometry(){
     //======================================================================
 
     //TGeoVolumeAssembly *dITS = new TGeoVolumeAssembly("ITSD");
+    if (! AliITSInitGeometry::SPDshieldIsTGeoNative() ||
+        ! AliITSInitGeometry::SPDIsTGeoNative()       ||
+        ! AliITSInitGeometry::SDDIsTGeoNative()       ||
+        ! AliITSInitGeometry::SSDIsTGeoNative()       ||
+        ! AliITSInitGeometry::SDDconeIsTGeoNative()   ||
+        ! AliITSInitGeometry::SSDconeIsTGeoNative()   ) {
     new TGeoVolumeAssembly("ITSD");
     gMC->Gspos("ITSD", 1, "ITSV", 0., 0., 0., idrotm[199], "ONLY");
-
+    }
 
   // --- Define SPD (option 'b') volumes ----------------------------
   
@@ -1882,7 +2181,6 @@ void AliITSv11Hybrid::CreateOldGeometry(){
 
   // --- Define SDD volumes ------------------------------------------
 
-  
   cos30 = cos(30.*3.14159/180.);
   sin30 = sin(30.*3.14159/180.);
 
@@ -2602,12 +2900,21 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dits[2] = 39.4;      
   gMC->Gsvolu("ICY1", "TUBE", idtmed[208], dits, 3);
          
-  // --- Define volume of second cylinder between SDD and SSD --------------
-  dits[0] = (59.5-0.128)/2.;      
+  // --- Define volumes of second cylinder between SDD and SSD ------------
+  // --- (from B. Giraudo plots - M.S. 20 Nov 2007)
+  dits[0] = 59.5/2. - 0.06;
   dits[1] = 59.5/2.;
-  dits[2] = 56.2;      // was 57
+  dits[2] = 102/2.;      // was 57
   gMC->Gsvolu("ICY2", "TUBE", idtmed[208], dits, 3);
 
+  dits[1] = dits[0];
+  dits[0] = dits[1] - 0.5;
+  gMC->Gsvolu("ICY3", "TUBE", idtmed[267], dits, 3);
+
+  dits[1] = dits[0];
+  dits[0] = dits[1] - 0.06;
+  gMC->Gsvolu("ICY4", "TUBE", idtmed[208], dits, 3);
+
   // --- Define volumes of SDD cone ---------------------------------- 
 
   dits[0] = 0;
@@ -3006,16 +3313,16 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   //if (option == 2) {
   if (! AliITSInitGeometry::SPDIsTGeoNative()) {
 
-     gMC->Gspos("I12B",1,"IT12",0.0,0.0,0.0,0,"MANY");
-     gMC->Gspos("I12B",8,"IT12",0.0,0.0,0.0,idrotm[233],"MANY");
-     gMC->Gspos("I12B",7,"IT12",0.0,0.0,0.0,idrotm[244],"MANY");
-     gMC->Gspos("I12B",6,"IT12",0.0,0.0,0.0,idrotm[236],"MANY");
-     gMC->Gspos("I12B",2,"IT12",0.0,0.0,0.0,idrotm[245],"MANY");
-     gMC->Gspos("I12B",3,"IT12",0.0,0.0,0.0,idrotm[234],"MANY");
-     gMC->Gspos("I12B",4,"IT12",0.0,0.0,0.0,idrotm[246],"MANY");
-     gMC->Gspos("I12B",5,"IT12",0.0,0.0,0.0,idrotm[247],"MANY");
-     gMC->Gspos("I12B",9,"IT12",0.0,0.0,0.0,idrotm[248],"MANY");
-     gMC->Gspos("I12B",10,"IT12",0.0,0.0,0.0,idrotm[249],"MANY");
+     gMC->Gspos("I12B",1,"IT12",0.0,0.0,0.0,0,"ONLY");
+     gMC->Gspos("I12B",8,"IT12",0.0,0.0,0.0,idrotm[233],"ONLY");
+     gMC->Gspos("I12B",7,"IT12",0.0,0.0,0.0,idrotm[244],"ONLY");
+     gMC->Gspos("I12B",6,"IT12",0.0,0.0,0.0,idrotm[236],"ONLY");
+     gMC->Gspos("I12B",2,"IT12",0.0,0.0,0.0,idrotm[245],"ONLY");
+     gMC->Gspos("I12B",3,"IT12",0.0,0.0,0.0,idrotm[234],"ONLY");
+     gMC->Gspos("I12B",4,"IT12",0.0,0.0,0.0,idrotm[246],"ONLY");
+     gMC->Gspos("I12B",5,"IT12",0.0,0.0,0.0,idrotm[247],"ONLY");
+     gMC->Gspos("I12B",9,"IT12",0.0,0.0,0.0,idrotm[248],"ONLY");
+     gMC->Gspos("I12B",10,"IT12",0.0,0.0,0.0,idrotm[249],"ONLY");
      deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  // see definition of idrotm[238]
          deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);  // see definition of idrotm[238]
      gMC->Gspos("I10B",2,"I12B",0.203+deltax,3.8206+deltay,0.0,idrotm[238],"ONLY");      
@@ -3076,19 +3383,40 @@ void AliITSv11Hybrid::CreateOldGeometry(){
      gMC->Gspos("I124",1,"I12B",-0.4965,6.8742,0.0,idrotm[215],"ONLY");
      gMC->Gspos("I105",3,"I10B",-0.05,-0.01,-16.844,idrotm[201],"ONLY");
      gMC->Gspos("I105",4,"I10B",-0.05,-0.01,16.844,0,"ONLY");
-     gMC->Gspos("I107",2,"I10B",-0.0455,-di10b[1]+di107[1],3.536,0,"ONLY");
-     gMC->Gspos("I107",1,"I10B",-0.0455,-di10b[1]+di107[1],10.708,0,"ONLY");
-     gMC->Gspos("I107",4,"I10B",-0.0455,-di10b[1]+di107[1],-10.708,0,"ONLY");
-     gMC->Gspos("I107",3,"I10B",-0.0455,-di10b[1]+di107[1],-3.536,0,"ONLY");
+
+     // Insertion of half-stave level in old SPD1
+     gGeoManager->MakeVolumeAssembly("L1H-STAVE0");
+     gGeoManager->MakeVolumeAssembly("L1H-STAVE1");
+     gMC->Gspos("L1H-STAVE0",1,"I10B",0,0,0,0,"ONLY");
+     gMC->Gspos("L1H-STAVE1",1,"I10B",0,0,0,0,"ONLY");
+     gMC->Gspos("I107",1,"L1H-STAVE0",-0.0455,-di10b[1]+di107[1],10.708,0,"ONLY");
+     gMC->Gspos("I107",2,"L1H-STAVE0",-0.0455,-di10b[1]+di107[1],3.536,0,"ONLY");
+     gMC->Gspos("I107",3,"L1H-STAVE1",-0.0455,-di10b[1]+di107[1],-3.536,0,"ONLY");
+     gMC->Gspos("I107",4,"L1H-STAVE1",-0.0455,-di10b[1]+di107[1],-10.708,0,"ONLY");
+     //      gMC->Gspos("I107",2,"I10B",-0.0455,-di10b[1]+di107[1],3.536,0,"ONLY");
+     //      gMC->Gspos("I107",1,"I10B",-0.0455,-di10b[1]+di107[1],10.708,0,"ONLY");
+     //      gMC->Gspos("I107",4,"I10B",-0.0455,-di10b[1]+di107[1],-10.708,0,"ONLY");
+     //      gMC->Gspos("I107",3,"I10B",-0.0455,-di10b[1]+di107[1],-3.536,0,"ONLY");
+
+    // Insertion of half-stave level in old SPD2
+     gGeoManager->MakeVolumeAssembly("L2H-STAVE0");
+     gGeoManager->MakeVolumeAssembly("L2H-STAVE1");
+     gMC->Gspos("L2H-STAVE0",1,"I20B",0,0,0,0,"ONLY");
+     gMC->Gspos("L2H-STAVE1",1,"I20B",0,0,0,0,"ONLY");
+     gMC->Gspos("I1D7",1,"L2H-STAVE0",-0.0455,-di20b[1]+di1d7[1],10.708,0,"ONLY");
+     gMC->Gspos("I1D7",2,"L2H-STAVE0",-0.0455,-di20b[1]+di1d7[1],3.536,0,"ONLY");
+     gMC->Gspos("I1D7",3,"L2H-STAVE1",-0.0455,-di20b[1]+di1d7[1],-3.536,0,"ONLY");
+     gMC->Gspos("I1D7",4,"L2H-STAVE1",-0.0455,-di20b[1]+di1d7[1],-10.708,0,"ONLY");
+//      gMC->Gspos("I1D7",2,"I20B",-0.0455,-di20b[1]+di1d7[1],3.536,0,"ONLY");
+//      gMC->Gspos("I1D7",1,"I20B",-0.0455,-di20b[1]+di1d7[1],10.708,0,"ONLY");
+//      gMC->Gspos("I1D7",4,"I20B",-0.0455,-di20b[1]+di1d7[1],-10.708,0,"ONLY");
+//      gMC->Gspos("I1D7",3,"I20B",-0.0455,-di20b[1]+di1d7[1],-3.536,0,"ONLY");
+
      gMC->Gspos("I109",1,"I10B",-0.138,0.015,-16.844,idrotm[201],"ONLY");
      gMC->Gspos("I109",2,"I10B",-0.138,0.015,16.844,0,"ONLY");
      gMC->Gspos("I108",1,"I10B",-0.138,-di10b[1]+2.*di107[1]+di108[1],0.0,0,"ONLY");
      gMC->Gspos("I105",1,"I20B",-0.05,-0.01,-16.844,idrotm[201],"ONLY");
      gMC->Gspos("I105",2,"I20B",-0.05,-0.01,16.844,0,"ONLY");
-     gMC->Gspos("I1D7",2,"I20B",-0.0455,-di20b[1]+di1d7[1],3.536,0,"ONLY");
-     gMC->Gspos("I1D7",1,"I20B",-0.0455,-di20b[1]+di1d7[1],10.708,0,"ONLY");
-     gMC->Gspos("I1D7",4,"I20B",-0.0455,-di20b[1]+di1d7[1],-10.708,0,"ONLY");
-     gMC->Gspos("I1D7",3,"I20B",-0.0455,-di20b[1]+di1d7[1],-3.536,0,"ONLY");
      gMC->Gspos("I109",3,"I20B",-0.138,0.015,-16.844,idrotm[201],"ONLY");
      gMC->Gspos("I109",4,"I20B",-0.138,0.015,16.844,0,"ONLY");
      gMC->Gspos("I108",2,"I20B",-0.138,-di20b[1]+2.*di1d7[1]+di108[1],0.0,0,"ONLY");
@@ -3119,28 +3447,30 @@ void AliITSv11Hybrid::CreateOldGeometry(){
      gMC->Gspos("ITS1",1,"I101",0.0,0.0,0.0,0,"ONLY");
      gMC->Gspos("ITS2",1,"I1D1",0.0,0.0,0.0,0,"ONLY");
      gMC->Gspos("I651",1,"IT12",0.0,0.0,26.05,0,"ONLY");
-     gMC->Gspos("I651",2,"IT12",0.0,0.0,-26.05,0,"ONLY");     
-     gMC->Gspos("I650",16,"IT12",0.0,0.0,22.0,idrotm[1104],"MANY");
-     gMC->Gspos("I650",20,"IT12",0.0,0.0,22.0,idrotm[1130],"MANY");
-     gMC->Gspos("I650",18,"IT12",0.0,0.0,22.0,idrotm[1117],"MANY");
-     gMC->Gspos("I650",1,"IT12",0.0,0.0,22.0,0,"MANY");
-     gMC->Gspos("I650",4,"IT12",0.0,0.0,22.0,idrotm[1106],"MANY");
-     gMC->Gspos("I650",6,"IT12",0.0,0.0,22.0,idrotm[1039],"MANY");
-     gMC->Gspos("I650",8,"IT12",0.0,0.0,22.0,idrotm[1107],"MANY");
-     gMC->Gspos("I650",10,"IT12",0.0,0.0,22.0,idrotm[1065],"MANY");
-     gMC->Gspos("I650",12,"IT12",0.0,0.0,22.0,idrotm[1078],"MANY");
-     gMC->Gspos("I650",14,"IT12",0.0,0.0,22.0,idrotm[1091],"MANY");
-     gMC->Gspos("I650",19,"IT12",0.0,0.0,-22.0,idrotm[1108],"MANY");
-     gMC->Gspos("I650",2,"IT12",0.0,0.0,-22.0,idrotm[1109],"MANY");
-     gMC->Gspos("I650",3,"IT12",0.0,0.0,-22.0,idrotm[1110],"MANY");
-     gMC->Gspos("I650",5,"IT12",0.0,0.0,-22.0,idrotm[1111],"MANY");
-     gMC->Gspos("I650",7,"IT12",0.0,0.0,-22.0,idrotm[1112],"MANY");
-     gMC->Gspos("I650",9,"IT12",0.0,0.0,-22.0,idrotm[1113],"MANY");
-     gMC->Gspos("I650",11,"IT12",0.0,0.0,-22.0,idrotm[1114],"MANY");
-     gMC->Gspos("I650",13,"IT12",0.0,0.0,-22.0,idrotm[1115],"MANY");
-     gMC->Gspos("I650",15,"IT12",0.0,0.0,-22.0,idrotm[1116],"MANY");
-     gMC->Gspos("I650",17,"IT12",0.0,0.0,-22.0,idrotm[1118],"MANY");
-     gMC->Gspos("I666",1,"I650",0.0,0.0,0.25,idrotm[1003],"MANY");
+     gMC->Gspos("I651",2,"IT12",0.0,0.0,-26.05,0,"ONLY");
+     
+     gMC->Gspos("I650",16,"IT12",0.0,0.0,22.0,idrotm[1104],"ONLY");
+     gMC->Gspos("I650",20,"IT12",0.0,0.0,22.0,idrotm[1130],"ONLY");
+     gMC->Gspos("I650",18,"IT12",0.0,0.0,22.0,idrotm[1117],"ONLY");
+     gMC->Gspos("I650",1,"IT12",0.0,0.0,22.0,0,"ONLY");
+     gMC->Gspos("I650",4,"IT12",0.0,0.0,22.0,idrotm[1106],"ONLY");
+     gMC->Gspos("I650",6,"IT12",0.0,0.0,22.0,idrotm[1039],"ONLY");
+     gMC->Gspos("I650",8,"IT12",0.0,0.0,22.0,idrotm[1107],"ONLY");
+     gMC->Gspos("I650",10,"IT12",0.0,0.0,22.0,idrotm[1065],"ONLY");
+     gMC->Gspos("I650",12,"IT12",0.0,0.0,22.0,idrotm[1078],"ONLY");
+     gMC->Gspos("I650",14,"IT12",0.0,0.0,22.0,idrotm[1091],"ONLY");
+     gMC->Gspos("I650",19,"IT12",0.0,0.0,-22.0,idrotm[1108],"ONLY");
+     gMC->Gspos("I650",2,"IT12",0.0,0.0,-22.0,idrotm[1109],"ONLY");
+     gMC->Gspos("I650",3,"IT12",0.0,0.0,-22.0,idrotm[1110],"ONLY");
+     gMC->Gspos("I650",5,"IT12",0.0,0.0,-22.0,idrotm[1111],"ONLY");
+     gMC->Gspos("I650",7,"IT12",0.0,0.0,-22.0,idrotm[1112],"ONLY");
+     gMC->Gspos("I650",9,"IT12",0.0,0.0,-22.0,idrotm[1113],"ONLY");
+     gMC->Gspos("I650",11,"IT12",0.0,0.0,-22.0,idrotm[1114],"ONLY");
+     gMC->Gspos("I650",13,"IT12",0.0,0.0,-22.0,idrotm[1115],"ONLY");
+     gMC->Gspos("I650",15,"IT12",0.0,0.0,-22.0,idrotm[1116],"ONLY");
+     gMC->Gspos("I650",17,"IT12",0.0,0.0,-22.0,idrotm[1118],"ONLY");
+     gMC->Gspos("I666",1,"I650",0.0,0.0,0.25,idrotm[1003],"ONLY");
+
      gMC->Gspos("I667",1,"I650",0.1102,0.9945,0.45,idrotm[1088],"ONLY");
      gMC->Gspos("I669",3,"I650",0.1883,4.0372,-3.2,0,"ONLY");
      gMC->Gspos("I671",3,"I650",0.1883,4.0372,0.6,0,"ONLY");
@@ -3167,7 +3497,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
      gMC->Gspos("I672",1,"I671",0.0,0.0,0.0,0,"ONLY");
      gMC->Gspos("I674",1,"I673",0.0,0.0,0.0,0,"MANY");
      gMC->Gspos("I675",1,"I673",0.0,0.0,-0.5,0,"ONLY");
-     gMC->Gspos("I677",1,"I676",0.0,0.0,0.0,0,"MANY");
+     gMC->Gspos("I677",1,"I676",0.0,0.0,0.0,0,"ONLY");
      gMC->Gspos("I678",1,"I676",0.0,0.0,-0.95,0,"ONLY");  
   }
     
@@ -3267,8 +3597,8 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I034", 3,"I018", -1.6,     -1.775,  1.35,   idrotm[348], "ONLY");
   gMC->Gspos("I034", 4,"I018",  1.6,     -1.775, -2.65,   idrotm[312], "ONLY");
 
-  gMC->Gspos("I035", 1,"I018",  1.7,     -0.55, iI018dits[2]-iI035dits[2], 0, "MANY");
-  gMC->Gspos("I035", 2,"I018", -1.7,     -0.55, iI018dits[2]-iI035dits[2], 0, "MANY");
+  gMC->Gspos("I035", 1,"I018",  1.7,     -0.55, iI018dits[2]-iI035dits[2], 0, "ONLY");
+  gMC->Gspos("I035", 2,"I018", -1.7,     -0.55, iI018dits[2]-iI035dits[2], 0, "ONLY");
 
   gMC->Gspos("I036", 1,"I018",  0.3087,   1.7191, 3.56,   idrotm[346], "ONLY");
   gMC->Gspos("I036", 2,"I018",  0.3087,   1.7191,-0.11,   idrotm[346], "ONLY");
@@ -3376,7 +3706,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I421", 1,"I420", 0.0, 0.0, 0.0, idrotm[312], "ONLY");
   gMC->Gspos("I420", 1,"I028", -iI028dits[0]/3., iI028dits[1]-iI420dits[1], 0.0, 0, "ONLY");
   gMC->Gspos("I424", 1,"I028", xI424, yI424, 0.0, 0, "ONLY");
-  gMC->Gspos("I028", 1,"I024", 0.0, iI028dits[1]-iI024dits[1], iI024dits[2]-iI028dits[2], 0, "MANY");
+  gMC->Gspos("I028", 1,"I024", 0.0, iI028dits[1]-iI024dits[1], iI024dits[2]-iI028dits[2], 0, "ONLY");
 
 
   // -- build the SDD ladder 3
@@ -3784,8 +4114,10 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I556",2,"I553",1.0311,0.2033,-2.203,idrotm[577],"ONLY");
   gMC->Gspos("I556",4,"I553",-1.031,0.2033,-0.287,idrotm[579],"ONLY");
   gMC->Gspos("I559",2,"I553",-2.25,-1.615,0.0,idrotm[573],"ONLY");
-  gMC->Gspos("I561",1,"I553",2.1,-1.615,-0.24,0,"MANY");
-  gMC->Gspos("I561",2,"I553",-2.1,-1.615,-0.24,idrotm[573],"MANY");
+
+  gMC->Gspos("I561",1,"I553",2.1,-1.615,-0.24,0,"ONLY");
+  gMC->Gspos("I561",2,"I553",-2.1,-1.615,-0.24,idrotm[573],"ONLY");
+
   gMC->Gspos("I519",37,"I523",0.0001,-1.79,-0.99,idrotm[586],"ONLY");
   gMC->Gspos("I519",36,"I523",-3.2986,-1.79,-1.2943,0,"ONLY");
   gMC->Gspos("I519",35,"I523",-3.2986,-1.71,-1.2943,0,"ONLY");
@@ -3839,13 +4171,15 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I519",1,"I523",3.302,-1.71,-1.2943,0,"ONLY");
   gMC->Gspos("I520",1,"I523",2.2501,-1.845,-1.19,0,"ONLY");
   gMC->Gspos("I521",1,"I523",2.8161,-1.7075,-0.982,0,"ONLY");
-  gMC->Gspos("I522",1,"I523",2.2501,-1.655,-1.3,idrotm[583],"MANY");
-  gMC->Gspos("I522",2,"I523",-2.2499,-1.655,-1.3,idrotm[583],"MANY");
+
+  gMC->Gspos("I522",1,"I523",2.2501,-1.655,-1.3,idrotm[583],"ONLY");
+  gMC->Gspos("I522",2,"I523",-2.2499,-1.655,-1.3,idrotm[583],"ONLY");
+
   gMC->Gspos("I542",2,"I523",-2.2499,-1.615,0.0,idrotm[573],"ONLY");
   gMC->Gspos("I541",2,"I523",-2.2499,-1.615,0.0,idrotm[573],"ONLY");
   gMC->Gspos("I541",1,"I523",2.2501,-1.615,0.0,0,"ONLY");
   gMC->Gspos("I542",1,"I523",2.2501,-1.615,0.0,0,"ONLY");
-  gMC->Gspos("I543",1,"I523",2.1001,-1.615,0.955,0,"MANY");
+  gMC->Gspos("I543",1,"I523",2.1001,-1.615,0.955,0,"ONLY");
   gMC->Gspos("I543",2,"I523",-2.0999,-1.615,0.955,idrotm[573],"MANY");
   gMC->Gspos("I537",2,"I523",1.7501,-1.52,0.0,idrotm[583],"ONLY");
   gMC->Gspos("I538",2,"I523",1.8368,-1.3122,0.0,idrotm[575],"ONLY");
@@ -3879,8 +4213,10 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I549",2,"I544",0.12,1.6613,0.0,idrotm[575],"ONLY");
   gMC->Gspos("I549",3,"I544",-1.8367,-1.3122,0.0,idrotm[581],"ONLY");
   gMC->Gspos("I548",3,"I544",-1.75,-1.52,0.0,idrotm[583],"ONLY");
-  gMC->Gspos("I552",1,"I544",2.1,-1.615,-0.24,0,"MANY");
-  gMC->Gspos("I552",2,"I544",-2.1,-1.615,-0.24,idrotm[573],"MANY");
+
+  gMC->Gspos("I552",1,"I544",2.1,-1.615,-0.24,0,"ONLY");
+  gMC->Gspos("I552",2,"I544",-2.1,-1.615,-0.24,idrotm[573],"ONLY");
+
   gMC->Gspos("I515",12,"I516",-1.6896,-1.7075,-0.9822,0,"ONLY");
   gMC->Gspos("I515",11,"I516",-1.6896,-1.7925,-0.9822,0,"ONLY");
   gMC->Gspos("I513",37,"I516",0.0,-1.79,-1.035,idrotm[586],"ONLY");
@@ -3949,13 +4285,15 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I529",1,"I516",1.8,-1.75,-0.195,idrotm[571],"ONLY");
   gMC->Gspos("I530",1,"I516",0.0,-1.785,1.905,idrotm[571],"ONLY");
   gMC->Gspos("I529",2,"I516",-1.8,-1.75,-0.195,idrotm[572],"ONLY");
-  gMC->Gspos("I517",1,"I516",2.25,-1.655,-1.3,idrotm[583],"MANY");
-  gMC->Gspos("I517",2,"I516",-2.25,-1.655,-1.3,idrotm[584],"MANY");
+
+  gMC->Gspos("I517",1,"I516",2.25,-1.655,-1.3,idrotm[583],"ONLY");
+  gMC->Gspos("I517",2,"I516",-2.25,-1.655,-1.3,idrotm[584],"ONLY");
+
   gMC->Gspos("I531",2,"I516",-2.25,-1.615,0.0,idrotm[573],"ONLY");
   gMC->Gspos("I531",1,"I516",2.25,-1.615,0.0,0,"ONLY");
   gMC->Gspos("I532",1,"I516",2.25,-1.615,0.0,0,"ONLY");
   gMC->Gspos("I532",2,"I516",-2.25,-1.615,0.0,idrotm[573],"ONLY");
-  gMC->Gspos("I533",1,"I516",2.1,-1.615,0.955,0,"MANY");
+  gMC->Gspos("I533",1,"I516",2.1,-1.615,0.955,0,"ONLY");
   gMC->Gspos("I533",2,"I516",-2.1,-1.615,0.955,idrotm[573],"MANY");
   gMC->Gspos("ITS5",1,"I562",0.0,0.0,0.0,0,"ONLY");
   }
@@ -3974,29 +4312,31 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   if (! AliITSInitGeometry::SDDconeIsTGeoNative()) {
   gMC->Gspos("ICY1",1,"IS02",0.0,0.0,0.,0,"ONLY");    
   gMC->Gspos("ICY2",1,"IS01",0.0,0.0,0.,0,"ONLY");    
+  gMC->Gspos("ICY3",1,"IS01",0.0,0.0,0.,0,"ONLY");    
+  gMC->Gspos("ICY4",1,"IS01",0.0,0.0,0.,0,"ONLY");    
 
   // --- Place volumes of SDD cone ---------------------------------- 
   
-  gMC->Gspos("I093",1,"IS02",0.0,0.0,0.0,0,"MANY");
-  gMC->Gspos("I093",2,"IS02",0.0,0.0,0.0,idrotm[856],"MANY");
-  gMC->Gspos("I099",4,"IS02",0.0,0.0,0.0,idrotm[857],"MANY");
-  gMC->Gspos("I099",3,"IS02",0.0,0.0,0.0,idrotm[858],"MANY");
-  gMC->Gspos("I099",5,"IS02",0.0,0.0,0.0,idrotm[859],"MANY");
-  gMC->Gspos("I099",6,"IS02",0.0,0.0,0.0,idrotm[860],"MANY");
-  gMC->Gspos("I099",7,"IS02",0.0,0.0,0.0,idrotm[861],"MANY");
-  gMC->Gspos("I099",2,"IS02",0.0,0.0,0.0,idrotm[862],"MANY");
-  gMC->Gspos("I200",4,"IS02",0.0,0.0,0.0,idrotm[863],"MANY");
-  gMC->Gspos("I200",3,"IS02",0.0,0.0,0.0,idrotm[864],"MANY");
-  gMC->Gspos("I200",2,"IS02",0.0,0.0,0.0,idrotm[865],"MANY");
-  gMC->Gspos("I200",13,"IS02",0.0,0.0,0.0,idrotm[867],"MANY");
-  gMC->Gspos("I200",12,"IS02",0.0,0.0,0.0,idrotm[869],"MANY");
-  gMC->Gspos("I200",11,"IS02",0.0,0.0,0.0,idrotm[870],"MANY");
-  gMC->Gspos("I200",10,"IS02",0.0,0.0,0.0,idrotm[871],"MANY");
-  gMC->Gspos("I200",9,"IS02",0.0,0.0,0.0,idrotm[872],"MANY");
-  gMC->Gspos("I200",8,"IS02",0.0,0.0,0.0,idrotm[873],"MANY");
-  gMC->Gspos("I200",7,"IS02",0.0,0.0,0.0,idrotm[874],"MANY");
-  gMC->Gspos("I200",6,"IS02",0.0,0.0,0.0,idrotm[875],"MANY");
-  gMC->Gspos("I200",5,"IS02",0.0,0.0,0.0,idrotm[876],"MANY");
+  gMC->Gspos("I093",1,"IS02",0.0,0.0,0.0,0,"ONLY");
+  gMC->Gspos("I093",2,"IS02",0.0,0.0,0.0,idrotm[856],"ONLY");
+  gMC->Gspos("I099",4,"IS02",0.0,0.0,0.0,idrotm[857],"ONLY");
+  gMC->Gspos("I099",3,"IS02",0.0,0.0,0.0,idrotm[858],"ONLY");
+  gMC->Gspos("I099",5,"IS02",0.0,0.0,0.0,idrotm[859],"ONLY");
+  gMC->Gspos("I099",6,"IS02",0.0,0.0,0.0,idrotm[860],"ONLY");
+  gMC->Gspos("I099",7,"IS02",0.0,0.0,0.0,idrotm[861],"ONLY");
+  gMC->Gspos("I099",2,"IS02",0.0,0.0,0.0,idrotm[862],"ONLY");
+  gMC->Gspos("I200",4,"IS02",0.0,0.0,0.0,idrotm[863],"ONLY");
+  gMC->Gspos("I200",3,"IS02",0.0,0.0,0.0,idrotm[864],"ONLY");
+  gMC->Gspos("I200",2,"IS02",0.0,0.0,0.0,idrotm[865],"ONLY");
+  gMC->Gspos("I200",13,"IS02",0.0,0.0,0.0,idrotm[867],"ONLY");
+  gMC->Gspos("I200",12,"IS02",0.0,0.0,0.0,idrotm[869],"ONLY");
+  gMC->Gspos("I200",11,"IS02",0.0,0.0,0.0,idrotm[870],"ONLY");
+  gMC->Gspos("I200",10,"IS02",0.0,0.0,0.0,idrotm[871],"ONLY");
+  gMC->Gspos("I200",9,"IS02",0.0,0.0,0.0,idrotm[872],"ONLY");
+  gMC->Gspos("I200",8,"IS02",0.0,0.0,0.0,idrotm[873],"ONLY");
+  gMC->Gspos("I200",7,"IS02",0.0,0.0,0.0,idrotm[874],"ONLY");
+  gMC->Gspos("I200",6,"IS02",0.0,0.0,0.0,idrotm[875],"ONLY");
+  gMC->Gspos("I200",5,"IS02",0.0,0.0,0.0,idrotm[876],"ONLY");
   gMC->Gspos("I090",2,"IS02",0.0,0.0,-39.4,0,"ONLY");    
   gMC->Gspos("I090",1,"IS02",0.0,0.0,39.4,idrotm[856],"ONLY");  
   gMC->Gspos("I099",9,"IS02",0.0,0.0,0.0,idrotm[877],"ONLY");
@@ -4017,10 +4357,12 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I200",21,"IS02",0.0,0.0,0.0,idrotm[892],"ONLY");
   gMC->Gspos("I200",20,"IS02",0.0,0.0,0.0,idrotm[868],"ONLY");
   gMC->Gspos("I200",19,"IS02",0.0,0.0,0.0,idrotm[893],"ONLY");
-  gMC->Gspos("I098",1,"IS02",0.0,0.0,33.6,0,"MANY");    
-  gMC->Gspos("I097",1,"IS02",0.0,0.0,26.6,0,"MANY");    
-  gMC->Gspos("I097",2,"IS02",0.0,0.0,-26.6,idrotm[856],"MANY");  
-  gMC->Gspos("I098",2,"IS02",0.0,0.0,-33.6,idrotm[856],"MANY");  
+
+  gMC->Gspos("I098",1,"IS02",0.0,0.0,33.6,0,"ONLY");    
+  gMC->Gspos("I097",1,"IS02",0.0,0.0,26.6,0,"ONLY");    
+  gMC->Gspos("I097",2,"IS02",0.0,0.0,-26.6,idrotm[856],"ONLY");  
+  gMC->Gspos("I098",2,"IS02",0.0,0.0,-33.6,idrotm[856],"ONLY"); 
   gMC->Gspos("I202",1,"IS02",12.1,0.0,33.84,0,"ONLY");
   gMC->Gspos("I202",6,"IS02",-6.05,-10.4789,33.84,idrotm[930],"ONLY");
   gMC->Gspos("I202",5,"IS02",-6.05,10.4789,33.84,idrotm[929],"ONLY");
@@ -4040,6 +4382,8 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I203",2,"IS02",10.9227,18.9186,42.24,idrotm[853],"ONLY");
   gMC->Gspos("I203",1,"IS02",21.8453,0.0,42.24,0,"ONLY");
   gMC->Gspos("I095",1,"I098",0.0,0.0,0.0,0,"ONLY");
+
+  //I096 and I098 are real volume that are really overlapping, can not use ONLY
   gMC->Gspos("I096",23,"I098",22.77,0.0,0.0,idrotm[894],"MANY");
   gMC->Gspos("I096",14,"I098",22.3754,6.57,0.0,idrotm[895],"MANY");
   gMC->Gspos("I096",3,"I098",19.1553,12.3104,0.0,idrotm[896],"MANY");
@@ -4062,7 +4406,10 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I096",10,"I098",15.2714,-17.6241,0.0,idrotm[914],"MANY");
   gMC->Gspos("I096",21,"I098",19.1553,-12.3104,0.0,idrotm[915],"MANY");
   gMC->Gspos("I096",12,"I098",22.3754,-6.57,0.0,idrotm[916],"MANY");
+
   gMC->Gspos("I094",1,"I097",0.0,0.0,0.0,0,"ONLY");
+
+  // idem
   gMC->Gspos("I096",1,"I097",13.87,0.0,0.0,idrotm[894],"MANY");
   gMC->Gspos("I096",32,"I097",13.037,6.2783,0.0,idrotm[917],"MANY");
   gMC->Gspos("I096",25,"I097",8.6478,10.844,0.0,idrotm[918],"MANY");
@@ -4083,8 +4430,8 @@ void AliITSv11Hybrid::CreateOldGeometry(){
 
   if (! AliITSInitGeometry::SSDconeIsTGeoNative()) {
 
-  gMC->Gspos("I212",2,"IS01",0.0,0.0,0.0,idrotm[701],"MANY");
-  gMC->Gspos("I212",1,"IS01",0.0,0.0,0.0,0,"MANY");
+  gMC->Gspos("I212",2,"IS01",0.0,0.0,0.0,idrotm[701],"ONLY");
+  gMC->Gspos("I212",1,"IS01",0.0,0.0,0.0,0,"ONLY");
   gMC->Gspos("I211",1,"IS01",0.0,0.0,-56.5,0,"ONLY");
 
   gMC->Gspos("I217",1,"IS01",0.0,0.0,-44.4,0,"ONLY");             // this will change after PPR to be symmetric
@@ -4100,19 +4447,20 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I214",2,"IS01",0.0,0.0,67.25,idrotm[701],"ONLY");   
   gMC->Gspos("I213",2,"IS01",0.0,0.0,62.25,idrotm[701],"ONLY");  
   gMC->Gspos("I213",1,"IS01",0.0,0.0,-62.25,0,"ONLY");             
-  gMC->Gspos("I214",1,"IS01",0.0,0.0,-67.25,0,"ONLY");           
-  gMC->Gspos("I215",19,"IS01",0.0,0.0,0.0,idrotm[702],"MANY");
-  gMC->Gspos("I215",21,"IS01",0.0,0.0,0.0,idrotm[703],"MANY");
-  gMC->Gspos("I215",23,"IS01",0.0,0.0,0.0,idrotm[704],"MANY");
-  gMC->Gspos("I215",24,"IS01",0.0,0.0,0.0,idrotm[705],"MANY");
-  gMC->Gspos("I215",3,"IS01",0.0,0.0,0.0,idrotm[706],"MANY");
-  gMC->Gspos("I215",5,"IS01",0.0,0.0,0.0,idrotm[707],"MANY");
-  gMC->Gspos("I215",7,"IS01",0.0,0.0,0.0,idrotm[708],"MANY");
-  gMC->Gspos("I215",9,"IS01",0.0,0.0,0.0,idrotm[709],"MANY");
-  gMC->Gspos("I215",11,"IS01",0.0,0.0,0.0,idrotm[710],"MANY");
-  gMC->Gspos("I215",13,"IS01",0.0,0.0,0.0,idrotm[711],"MANY");
-  gMC->Gspos("I215",15,"IS01",0.0,0.0,0.0,idrotm[712],"MANY");
-  gMC->Gspos("I215",17,"IS01",0.0,0.0,0.0,idrotm[713],"MANY");
+  gMC->Gspos("I214",1,"IS01",0.0,0.0,-67.25,0,"ONLY");
+      
+  gMC->Gspos("I215",19,"IS01",0.0,0.0,0.0,idrotm[702],"ONLY");
+  gMC->Gspos("I215",21,"IS01",0.0,0.0,0.0,idrotm[703],"ONLY");
+  gMC->Gspos("I215",23,"IS01",0.0,0.0,0.0,idrotm[704],"ONLY");
+  gMC->Gspos("I215",24,"IS01",0.0,0.0,0.0,idrotm[705],"ONLY");
+  gMC->Gspos("I215",3,"IS01",0.0,0.0,0.0,idrotm[706],"ONLY");
+  gMC->Gspos("I215",5,"IS01",0.0,0.0,0.0,idrotm[707],"ONLY");
+  gMC->Gspos("I215",7,"IS01",0.0,0.0,0.0,idrotm[708],"ONLY");
+  gMC->Gspos("I215",9,"IS01",0.0,0.0,0.0,idrotm[709],"ONLY");
+  gMC->Gspos("I215",11,"IS01",0.0,0.0,0.0,idrotm[710],"ONLY");
+  gMC->Gspos("I215",13,"IS01",0.0,0.0,0.0,idrotm[711],"ONLY");
+  gMC->Gspos("I215",15,"IS01",0.0,0.0,0.0,idrotm[712],"ONLY");
+  gMC->Gspos("I215",17,"IS01",0.0,0.0,0.0,idrotm[713],"ONLY");
 
   // Unfortunately the following piece is not compatible with new SSD
   if (! AliITSInitGeometry::SSDIsTGeoNative()) {
@@ -4130,18 +4478,18 @@ void AliITSv11Hybrid::CreateOldGeometry(){
     gMC->Gspos("I216",8,"IS01",0.0,0.0,-44,idrotm[725],"ONLY");
   }
 
-  gMC->Gspos("I215",1,"IS01",0.0,0.0,0.0,idrotm[726],"MANY");
-  gMC->Gspos("I215",2,"IS01",0.0,0.0,0.0,idrotm[727],"MANY");
-  gMC->Gspos("I215",4,"IS01",0.0,0.0,0.0,idrotm[728],"MANY");
-  gMC->Gspos("I215",6,"IS01",0.0,0.0,0.0,idrotm[729],"MANY");
-  gMC->Gspos("I215",8,"IS01",0.0,0.0,0.0,idrotm[733],"MANY");
-  gMC->Gspos("I215",10,"IS01",0.0,0.0,0.0,idrotm[730],"MANY");
-  gMC->Gspos("I215",12,"IS01",0.0,0.0,0.0,idrotm[731],"MANY");
-  gMC->Gspos("I215",14,"IS01",0.0,0.0,0.0,idrotm[768],"MANY");
-  gMC->Gspos("I215",16,"IS01",0.0,0.0,0.0,idrotm[732],"MANY");
-  gMC->Gspos("I215",18,"IS01",0.0,0.0,0.0,idrotm[734],"MANY");
-  gMC->Gspos("I215",20,"IS01",0.0,0.0,0.0,idrotm[798],"MANY");
-  gMC->Gspos("I215",22,"IS01",0.0,0.0,0.0,idrotm[735],"MANY");
+  gMC->Gspos("I215",1,"IS01",0.0,0.0,0.0,idrotm[726],"ONLY");
+  gMC->Gspos("I215",2,"IS01",0.0,0.0,0.0,idrotm[727],"ONLY");
+  gMC->Gspos("I215",4,"IS01",0.0,0.0,0.0,idrotm[728],"ONLY");
+  gMC->Gspos("I215",6,"IS01",0.0,0.0,0.0,idrotm[729],"ONLY");
+  gMC->Gspos("I215",8,"IS01",0.0,0.0,0.0,idrotm[733],"ONLY");
+  gMC->Gspos("I215",10,"IS01",0.0,0.0,0.0,idrotm[730],"ONLY");
+  gMC->Gspos("I215",12,"IS01",0.0,0.0,0.0,idrotm[731],"ONLY");
+  gMC->Gspos("I215",14,"IS01",0.0,0.0,0.0,idrotm[768],"ONLY");
+  gMC->Gspos("I215",16,"IS01",0.0,0.0,0.0,idrotm[732],"ONLY");
+  gMC->Gspos("I215",18,"IS01",0.0,0.0,0.0,idrotm[734],"ONLY");
+  gMC->Gspos("I215",20,"IS01",0.0,0.0,0.0,idrotm[798],"ONLY");
+  gMC->Gspos("I215",22,"IS01",0.0,0.0,0.0,idrotm[735],"ONLY");
   }
                    
   // --- Place subdetectors' mother volumes and supports' mother volumes
@@ -4150,9 +4498,9 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   if (! AliITSInitGeometry::SPDIsTGeoNative())
     gMC->Gspos("IT12",1,"ITSD",0.0,0.0,0.0,0,"ONLY");  // SPD mother volume
   if (! AliITSInitGeometry::SDDIsTGeoNative())
-    gMC->Gspos("IT34",1,"ITSD",0.0,0.0,0.0,0,"MANY");  // SDD mother volume
+    gMC->Gspos("IT34",1,"ITSD",0.0,0.0,0.0,0,"ONLY");  // SDD mother volume
   if (! AliITSInitGeometry::SSDIsTGeoNative())
-    gMC->Gspos("IT56",1,"ITSD",0.0,0.0,0.0,0,"MANY");  // SSD mother volume
+    gMC->Gspos("IT56",1,"ITSD",0.0,0.0,0.0,0,"ONLY");  // SSD mother volume
   if (! AliITSInitGeometry::SDDconeIsTGeoNative())
     gMC->Gspos("IS02",1,"ITSD",0.0,0.0,0.0,0,"ONLY");  // SDD cones/supports
   if (! AliITSInitGeometry::SSDconeIsTGeoNative())
@@ -4217,7 +4565,6 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("I2CC", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
   gMC->Gspos("I2CC", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");  
 
-
   // --- DEFINE PATCH PANELS AT THE END OF THE ITS CONES
   //     UPPER PART
   
@@ -4244,11 +4591,13 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   gMC->Gspos("IPA2", 1, "ITSV", 0., 0., 95.25, 0, "ONLY");  
   gMC->Gspos("IPA2", 2, "ITSV", 0., 0., -95.25, idrotm[200], "ONLY"); 
 
+  } // Move this graph down as you implement services in TGeo - M.S. 28may08
+
 
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - COPPER PART
   //     UPPER PART
   
-  dgh[0] = (ztpc-97.5)/2.;
+  dgh[0] = (ztpc-97.5-2.3)/2.;
   dgh[1] = 46.2;     
   dgh[2] = 46.2+1.0;  
   dgh[3] = 62.3;     
@@ -4256,12 +4605,13 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[5] = 12.;    
   dgh[6] = 168.;
   gMC->Gsvolu("ICU1", "CONS", idtmed[213], dgh, 7);    
-  gMC->Gspos("ICU1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");   
+  //  gMC->Gspos("ICU1", 1, "ITSV", 0., 0.,97.5+dgh[0], 0, "ONLY");   
+  gMC->Gspos("ICU1", 1, "ITSV", 0., 0.,-(97.5+dgh[0]+4.6), idrotm[199], "ONLY");   
   
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - COPPER PART
   //     LOWER PART
   
-  dgh[0] = (ztpc-97.5)/2.;
+  dgh[0] = (ztpc-97.5-2.3)/2.;
   dgh[1] = 46.2;      
   dgh[2] = 46.2+1.0;  
   dgh[3] = 62.3;      
@@ -4269,13 +4619,14 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[5] = 192.;    
   dgh[6] = 348.;
   gMC->Gsvolu("ICU2", "CONS", idtmed[213], dgh, 7);    
-  gMC->Gspos("ICU2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");  
+  //  gMC->Gspos("ICU2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");  
+  gMC->Gspos("ICU2", 1, "ITSV", 0., 0., -(97.5+dgh[0]+4.6), idrotm[199], "ONLY");  
 
 
    // -- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - CARBON PART
    //     UPPER PART
   
-  dgh[0] = (ztpc-97.5)/2.;
+  dgh[0] = (ztpc-97.5-2.3)/2.;
   dgh[1] = 46.2+1.0;      
   dgh[2] = 46.2+1.0+1.5;  
   dgh[3] = 62.3+1.0;      
@@ -4283,12 +4634,13 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[5] = 12.;    
   dgh[6] = 168.;  
   gMC->Gsvolu("ICC1", "CONS", idtmed[225], dgh, 7);    
-  gMC->Gspos("ICC1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");   
+  //  gMC->Gspos("ICC1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");  
+  gMC->Gspos("ICC1", 1, "ITSV", 0., 0., -(97.5+dgh[0]+4.6), idrotm[199], "ONLY");   
   
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - CARBON PART
   //     LOWER PART
   
-  dgh[0] = (ztpc-97.5)/2.;
+  dgh[0] = (ztpc-97.5-2.3)/2.;
   dgh[1] = 46.2+1.0;    
   dgh[2] = 46.2+1.0+1.5;
   dgh[3] = 62.3+1.0;    
@@ -4296,73 +4648,80 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[5] = 192.;    
   dgh[6] = 348.;  
   gMC->Gsvolu("ICC2", "CONS", idtmed[225], dgh, 7);    
-  gMC->Gspos("ICC2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");  
+  //  gMC->Gspos("ICC2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");
+  gMC->Gspos("ICC2", 1, "ITSV", 0., 0., -(97.5+dgh[0]+4.6), idrotm[199], "ONLY");  
    
   // -- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - COPPER PART
   //     UPPER PART
     
-  dgh[0] = 62.; 
+  dgh[0] = 62.2
   dgh[1] = 74.5;
   dgh[2] = 0.5;
   dgh[3] = 12.;
   dgh[4] = 168.;
   gMC->Gsvolu("ICU3", "TUBS", idtmed[213], dgh, 5);    
-  gMC->Gspos("ICU3", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");  
+  //  gMC->Gspos("ICU3", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY"); 
+  gMC->Gspos("ICU3", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]+1.), idrotm[199], "ONLY");  
 
   // -- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - COPPER PART
   //     LOWER PART
   
-  dgh[0] = 62. 
+  dgh[0] = 62.2; 
   dgh[1] = 74.5;
   dgh[2] = 0.5;
   dgh[3] = 192.;
   dgh[4] = 348.;
   gMC->Gsvolu("ICU4", "TUBS", idtmed[213], dgh, 5);    
-  gMC->Gspos("ICU4", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");
+  //  gMC->Gspos("ICU4", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");
+  gMC->Gspos("ICU4", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]+1.), idrotm[199], "ONLY");
 
   // -- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - CARBON PART
   //    UPPER PART
 
-  dgh[0] = 62.1;  
+  dgh[0] = 64.8;  
   dgh[1] = 74.5;
   dgh[2] = 0.75;
   dgh[3] = 12.;
   dgh[4] = 168.;
   gMC->Gsvolu("ICC3", "TUBS", idtmed[225], dgh, 5);    
-  gMC->Gspos("ICC3", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");   
+  //  gMC->Gspos("ICC3", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");  
+  gMC->Gspos("ICC3", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), idrotm[199], "ONLY");   
     
   // -- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - CARBON PART
   //    LOWER PART
 
-  dgh[0] = 62.1;  
+  dgh[0] = 64.8;  
   dgh[1] = 74.5;
   dgh[2] = 0.75;
   dgh[3] = 192.;
   dgh[4] = 348.;
   gMC->Gsvolu("ICC4", "TUBS", idtmed[225], dgh, 5);    
-  gMC->Gspos("ICC4", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");  
+  //  gMC->Gspos("ICC4", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");  
+  gMC->Gspos("ICC4", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), idrotm[199], "ONLY");  
   
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
   //     THE ABSORBER - COPPER PART - UPPER PART
   
   dgh[0] = 46.;      
   dgh[1] = 46.+1.0;  
-  dgh[2] = (ztpc-97.5+1.5)/2.;
+  dgh[2] = (ztpc-97.5+1.5-2.5)/2.;
   dgh[3] = 12.;
   dgh[4] = 168.;
   gMC->Gsvolu("ICU5", "TUBS", idtmed[213], dgh, 5);   
-  gMC->Gspos("ICU5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");  
+  //  gMC->Gspos("ICU5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");  
+  gMC->Gspos("ICU5", 1, "ITSV", 0., 0., -(-97.5-dgh[2]), idrotm[199], "ONLY");  
   
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
   //     THE ABSORBER - COPPER PART - LOWER PART
   
   dgh[0] = 46.;  
   dgh[1] = 46.+1.0;  
-  dgh[2] = (ztpc-97.5+1.5)/2.;
+  dgh[2] = (ztpc-97.5+1.5-2.5)/2.;
   dgh[3] = 192.;
   dgh[4] = 348.;  
   gMC->Gsvolu("ICU6", "TUBS", idtmed[213], dgh, 5);   
-  gMC->Gspos("ICU6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");    
+  //  gMC->Gspos("ICU6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY"); 
+  gMC->Gspos("ICU6", 1, "ITSV", 0., 0., -(-97.5-dgh[2]), idrotm[199], "ONLY");    
   
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
   //     THE ABSORBER - CARBON PART - UPPER PART
@@ -4373,7 +4732,8 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[3] = 12.;
   dgh[4] = 168.;  
   gMC->Gsvolu("ICC5", "TUBS", idtmed[225], dgh, 5);   
-  gMC->Gspos("ICC5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");   
+  //  gMC->Gspos("ICC5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
+  gMC->Gspos("ICC5", 1, "ITSV", 0., 0., -(-97.5-dgh[2]), idrotm[199], "ONLY");   
   
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
   //     THE ABSORBER - CARBON PART - LOWER PART
@@ -4384,7 +4744,8 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[3] = 192.;
   dgh[4] = 348.;  
   gMC->Gsvolu("ICC6", "TUBS", idtmed[225], dgh, 5);   
-  gMC->Gspos("ICC6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");      
+  //  gMC->Gspos("ICC6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY"); 
+  gMC->Gspos("ICC6", 1, "ITSV", 0., 0., -(-97.5-dgh[2]), idrotm[199], "ONLY");      
 
   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
   //     COPPER PART - UPPER PART
@@ -4395,7 +4756,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[3] = 12.;
   dgh[4] = 168.;  
   gMC->Gsvolu("ICU7", "TUBS", idtmed[213], dgh, 5);   
-  gMC->Gspos("ICU7", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]), 0, "ONLY");  
+  gMC->Gspos("ICU7", 1, "ITSV", 0., 0., (ztpc+1.5+dgh[2]), idrotm[199], "ONLY");  
   
   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
   //     COPPER PART - LOWER PART
@@ -4406,7 +4767,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[3] = 192.;
   dgh[4] = 348.;   
   gMC->Gsvolu("ICU8", "TUBS", idtmed[213], dgh, 5);   
-  gMC->Gspos("ICU8", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]), 0, "ONLY");      
+  gMC->Gspos("ICU8", 1, "ITSV", 0., 0., (ztpc+1.5+dgh[2]), idrotm[199], "ONLY");      
     
   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
   //     CARBON PART - UPPER PART
@@ -4417,7 +4778,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[3] = 12.;
   dgh[4] = 168.;   
   gMC->Gsvolu("ICC7", "TUBS", idtmed[225], dgh, 5);   
-  gMC->Gspos("ICC7", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), 0, "ONLY"); 
+  gMC->Gspos("ICC7", 1, "ITSV", 0., 0., (ztpc+dgh[2]), idrotm[199], "ONLY"); 
   
   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
   //     CARBON PART - LOWER PART
@@ -4428,29 +4789,31 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[3] = 192.;
   dgh[4] = 348.;     
   gMC->Gsvolu("ICC8", "TUBS", idtmed[225], dgh, 5);   
-  gMC->Gspos("ICC8", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), 0, "ONLY");        
+  gMC->Gspos("ICC8", 1, "ITSV", 0., 0., (ztpc+dgh[2]), idrotm[199], "ONLY");        
+
+
     
   // --- DEFINE HOOK TO THE TPC ON OTHER SIDE W.R.T. THE ABSORBER - UPPER PART
   
-  dgh[0] = 74.5;
-  dgh[1] = 79.5;
+  dgh[0] = 74.7;
+  dgh[1] = 75.3;
   dgh[2] = 2.5;
   dgh[3] = 12.;
   dgh[4] = 168.;    
   gMC->Gsvolu("IHK1", "TUBS", idtmed[264], dgh, 5);  
-  gMC->Gspos("IHK1", 1, "ITSV", 0., 0., -ztpc-dgh[2], 0, "ONLY");   
+  gMC->Gspos("IHK1", 1, "ITSV", 0., 0., -(-ztpc-dgh[2]), idrotm[199], "ONLY");   
   
   // --- DEFINE HOOK TO THE TPC ON OTHER SIDE W.R.T. THE ABSORBER - LOWER PART
   
-  dgh[0] = 74.5;
-  dgh[1] = 79.5;
+  dgh[0] = 74.7;
+  dgh[1] = 75.3;
   dgh[2] = 2.5;
   dgh[3] = 192.;
   dgh[4] = 348.;    
   gMC->Gsvolu("IHK2", "TUBS", idtmed[264], dgh, 5);  
-  gMC->Gspos("IHK2", 1, "ITSV", 0., 0., -ztpc-dgh[2], 0, "ONLY");      
+  gMC->Gspos("IHK2", 1, "ITSV", 0., 0., -(-ztpc-dgh[2]), idrotm[199], "ONLY");      
   
-  }
+//  }
 
 
   // --- DEFINE RAILS BETWEEN THE ITS AND THE TPC
@@ -4462,9 +4825,9 @@ void AliITSv11Hybrid::CreateOldGeometry(){
      dgh[1] = 8.;           
      dgh[2] = 190.;         
      gMC->Gsvolu("IRA1", "BOX ", idtmed[268], dgh, 3);
-     gMC->Gspos("IRA1", 1, "ITSV", 53.5, 0., -69.5, 0, "ONLY");   
+     gMC->Gspos("IRA1", 1, "ITSV", 53.5, 0., 69.5, idrotm[199], "ONLY");   
      gMC->Gsvolu("IRA2", "BOX ", idtmed[268], dgh, 3);    
-     gMC->Gspos("IRA2", 1, "ITSV", -53.5, 0., -69.5, 0, "ONLY");    
+     gMC->Gspos("IRA2", 1, "ITSV", -53.5, 0., 69.5, idrotm[199], "ONLY");    
 
      dgh[0] = 2.-0.5;// 0.5 was determined in such a way that the aluminum area is 20.9 cm^2      
      dgh[1] = 8.-0.5;// 0.5 was determined in such a way that the aluminum area is 20.9 cm^2       
@@ -4491,14 +4854,14 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[1] = 3.;
   dgh[2] = 5.;// 5. comes from the fact that the volume has to be 567.6/2 cm^3
   gMC->Gsvolu("ISR1", "TUBE", idtmed[284], dgh, 3);   
-  gMC->Gspos("ISR1", 1, "ITSV", 53.4292, 10.7053, 79.75, 0, "ONLY");    
-  gMC->Gspos("ISR1", 2, "ITSV", 53.4292, -10.7053, 79.75, 0, "ONLY");   
-  gMC->Gspos("ISR1", 3, "ITSV", -53.4292, 10.7053, 79.75, 0, "ONLY"); 
-  gMC->Gspos("ISR1", 4, "ITSV", -53.4292, -10.7053, 79.75, 0, "ONLY");  
-  gMC->Gspos("ISR1", 5, "ITSV", 53.4292, 10.7053, -79.75, 0, "ONLY");   
-  gMC->Gspos("ISR1", 6, "ITSV", 53.4292, -10.7053, -79.75, 0, "ONLY");   
-  gMC->Gspos("ISR1", 7, "ITSV", -53.4292, 10.7053, -79.75, 0, "ONLY"); 
-  gMC->Gspos("ISR1", 8, "ITSV", -53.4292, -10.7053, -79.75, 0, "ONLY");
+  gMC->Gspos("ISR1", 1, "ITSV", 53.4292, 10.7053, -79.75,idrotm[199],"ONLY");    
+  gMC->Gspos("ISR1", 2, "ITSV", 53.4292, -10.7053, -79.75,idrotm[199],"ONLY");   
+  gMC->Gspos("ISR1", 3, "ITSV", -53.4292, 10.7053, -79.75,idrotm[199],"ONLY"); 
+  gMC->Gspos("ISR1", 4, "ITSV", -53.4292, -10.7053, -79.75,idrotm[199],"ONLY");  
+  gMC->Gspos("ISR1", 5, "ITSV", 53.4292, 10.7053, 79.75,idrotm[199],"ONLY");   
+  gMC->Gspos("ISR1", 6, "ITSV", 53.4292, -10.7053, 79.75,idrotm[199],"ONLY");   
+  gMC->Gspos("ISR1", 7, "ITSV", -53.4292, 10.7053, 79.75,idrotm[199],"ONLY"); 
+  gMC->Gspos("ISR1", 8, "ITSV", -53.4292, -10.7053, 79.75,idrotm[199],"ONLY");
   
   // --- DEFINE SUPPORTS FOR RAILS ATTACHED TO THE ABSORBER
 
@@ -4506,9 +4869,9 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[1] = 12.;         
   dgh[2] = 5.;         
   gMC->Gsvolu("ISR2", "BOX ", idtmed[210], dgh, 3);   
-  gMC->Gspos("ISR2", 1, "ITSV", -53.5, 0., -125.5, idrotm[199], "MANY");
+  gMC->Gspos("ISR2", 1, "ITSV", -53.5, 0., 125.5, 0, "ONLY");
   gMC->Gsvolu("ISR3", "BOX ", idtmed[210], dgh, 3);   
-  gMC->Gspos("ISR3", 1, "ITSV", 53.5, 0., -125.5, idrotm[199], "MANY");  
+  gMC->Gspos("ISR3", 1, "ITSV", 53.5, 0., 125.5, 0, "ONLY");  
   
   dgh[0] = 5.-2.;        
   dgh[1] = 12.-2.;         
@@ -4524,9 +4887,9 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[1] = 5.;         
   dgh[2] = 2.;         
   gMC->Gsvolu("ISR6", "TUBE", idtmed[210], dgh, 3);   
-  gMC->Gspos("ISR6", 1, "ITSV", 0., 54., -77., idrotm[199], "MANY"); 
-  gMC->Gspos("ISR6", 2, "ITSV", 0., 54., 77., idrotm[199], "MANY"); 
-  gMC->Gspos("ISR6", 3, "ITSV", 0., -54., 77., idrotm[199], "MANY");                   
+  gMC->Gspos("ISR6", 1, "ITSV", 0., 54., 77., 0, "ONLY"); 
+  gMC->Gspos("ISR6", 2, "ITSV", 0., 54., -77., 0, "ONLY"); 
+  gMC->Gspos("ISR6", 3, "ITSV", 0., -54., -77., 0, "ONLY");                   
 
   }
 
@@ -4905,8 +5268,8 @@ void AliITSv11Hybrid::CreateMaterials(){
       // rohacell: C9 H13 N1 O2
     Float_t arohac[4] = {12.01,  1.01, 14.010, 16.};
     Float_t zrohac[4] = { 6.,    1.,    7.,     8.};
-    Float_t wrohac[4] = { 9.,   13.,    1.,     2.};
-    Float_t drohac    = 0.05;
+    Float_t wrohac[4] = { 14.,   10.,    2.,     6.};
+    Float_t drohac    = 0.052;
 
     // If he/she means stainless steel (inox) + Aluminium and Zeff=15.3383 then
 //
@@ -4930,6 +5293,12 @@ void AliITSv11Hybrid::CreateMaterials(){
     Float_t wAlOxide[2]  = {0.4707, 0.5293};
     Float_t dAlOxide     = 3.97;
 
+    // Silica for optical fibers: Si O2
+    Float_t aoptfib[2] = { 28.0855, 15.9994};
+    Float_t zoptfib[2] = { 14.,      8.    };
+    Float_t woptfib[2] = {  1.,      2.    };
+    Float_t doptfib    = 2.55;
+
     AliMaterial(1,"SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
     AliMedium(1,"SI$",1,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
@@ -5238,7 +5607,7 @@ void AliITSv11Hybrid::CreateMaterials(){
 
     // Special media
 
-    AliMaterial(90,"SPD shield$", 12.011, 6., 1.93/10. , 22.1*10., 999);
+    AliMaterial(90,"SPD shield$", 12.011, 6., 1.93 , 22.36, 999);
     AliMedium(90,"SPD shield$",90,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
 
     // SPD End Ladder (data from Petra Riedler)
@@ -5265,10 +5634,13 @@ void AliITSv11Hybrid::CreateMaterials(){
     */
     AliMaterial(96, "SSD cone$",63.546, 29., 1.15, 1.265, 999);
     AliMedium(96,"SSD cone$",96,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
+
+    AliMixture(98,"SDD OPTICFIB$",aoptfib,zoptfib,doptfib,-2,woptfib);
+    AliMedium(98,"SDD OPTICFIB$",98,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 }
 
 //______________________________________________________________________
-void AliITSv11Hybrid::InitAliITSgeom(){
+void AliITSv11Hybrid::InitAliITSgeom() const {
     //     Based on the geometry tree defined in Geant 3.21, this
     // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS geometry
     // sturture.
@@ -5281,6 +5653,7 @@ void AliITSv11Hybrid::InitAliITSgeom(){
 
   Error("InitAliITSgeom", "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQq Im I used?");
 
+  /*
     const Int_t knlayers = 6;
     const Int_t kndeep = 3;
     const AliITSDetector kidet[knlayers]={kSPD,kSPD,kSDD,kSDD,kSSD,kSSD};
@@ -5386,6 +5759,7 @@ void AliITSv11Hybrid::InitAliITSgeom(){
         } // end for cp0
     } // end for lay
     return;
+  */
 }
 
 //______________________________________________________________________
@@ -5417,92 +5791,14 @@ void AliITSv11Hybrid::SetDefaults(){
     // Return:
     //   none.
 
-    const Float_t kconv = 1.0e+04; // convert cm to microns
-
     if(!fDetTypeSim){
        Warning("SetDefaults","Error fDetTypeSim not defined");
        return;
     }
 
-    AliITSgeomSPD  *s0;
-    AliITSgeomSDD  *s1;
-    AliITSgeomSSD  *s2;
-    Int_t i;
-    Float_t bx[256],bz[280];
-
     fDetTypeSim->SetDefaults();
     
-    //SPD
-    s0 = (AliITSgeomSPD*) GetITSgeom()->GetShape(kSPD);
-    // Get shape info. Do it this way for now.
-    //AliITSCalibrationSPD* resp0=new AliITSCalibrationSPD();
-    AliITSsegmentationSPD* seg0 = 
-       (AliITSsegmentationSPD*)fDetTypeSim->GetSegmentationModel(0);
-    seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD
-                    s0->GetDz()*2.*kconv, // for now.
-                    s0->GetDy()*2.*kconv); // x,z,y full width in microns.
-    seg0->SetNPads(256,160);// Number of Bins in x and z
-    for(i=000;i<256;i++) bx[i] =  50.0; // in x all are 50 microns.
-    for(i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below
-    for(i=160;i<280;i++) bz[i] =   0.0; // Outside of detector.
-    bz[ 31] = bz[ 32] = 625.0; // first chip boundry
-    bz[ 63] = bz[ 64] = 625.0; // first chip boundry
-    bz[ 95] = bz[ 96] = 625.0; // first chip boundry
-    bz[127] = bz[128] = 625.0; // first chip boundry
-    bz[160] = 425.0; // Set so that there is no zero pixel size for fNz.
-    seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
-    SetSegmentationModel(kSPD,seg0);
-    // set digit and raw cluster classes to be used
-    const char *kData0=(fDetTypeSim->GetCalibrationModel(
-                           GetITSgeom()->GetStartSPD()))->DataType();
-    if (strstr(kData0,"real")) fDetTypeSim->SetDigitClassName(kSPD,
-                                                             "AliITSdigit");
-    else fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD");
-    // SDD
-    s1 = (AliITSgeomSDD*) GetITSgeom()->GetShape(kSDD);
-    // Get shape info. Do it this way for now.
-
-    //AliITSCalibrationSDD* resp1=new AliITSCalibrationSDD("simulated");
-    AliITSsegmentationSDD* seg1 = 
-       (AliITSsegmentationSDD*)fDetTypeSim->GetSegmentationModel(1);
-    seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD
-                    s1->GetDz()*2.*kconv, // for now.
-                    s1->GetDy()*2.*kconv); // x,z,y full width in microns.
-    seg1->SetNPads(256,256);// Use AliITSgeomSDD for now
-    SetSegmentationModel(kSDD,seg1);
-    const char *kData1=(fDetTypeSim->GetCalibrationModel(
-                           GetITSgeom()->GetStartSDD()))->DataType();
-    AliITSCalibrationSDD* rsp = 
-       (AliITSCalibrationSDD*)fDetTypeSim->GetCalibrationModel(
-           GetITSgeom()->GetStartSDD());
-    const char *kopt=rsp->GetZeroSuppOption();
-    if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){
-       fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit");
-    } else fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD");
-    // SSD  Layer 5
-
-    s2 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);
-    // Get shape info. Do it this way for now.
-
-
-    //SetCalibrationModel(GetITSgeom()->GetStartSSD(),
-    // new AliITSCalibrationSSD("simulated"));
-    AliITSsegmentationSSD* seg2 = 
-       (AliITSsegmentationSSD*)fDetTypeSim->GetSegmentationModel(2);
-    seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD
-                    s2->GetDz()*2.*kconv, // for now.
-                    s2->GetDy()*2.*kconv); // x,z,y full width in microns.
-    seg2->SetPadSize(95.,0.); // strip x pitch in microns
-    seg2->SetNPads(768,0); // number of strips on each side.
-    seg2->SetAngles(0.0075,0.0275); // strip angels rad P and N side.
-    seg2->SetAnglesLay5(0.0075,0.0275); // strip angels rad P and N side.
-    seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side.
-    SetSegmentationModel(kSSD,seg2); 
-        const char *kData2=(fDetTypeSim->GetCalibrationModel(
-                               GetITSgeom()->GetStartSSD()))->DataType();
-    if(strstr(kData2,"real") ) fDetTypeSim->SetDigitClassName(kSSD,
-                                                             "AliITSdigit");
-    else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD");
+
     if(fgkNTYPES>3){
        Warning("SetDefaults",
                "Only the four basic detector types are initialised!");
@@ -5589,11 +5885,7 @@ void AliITSv11Hybrid::StepManager(){
     if (notSens) return;
 
     if(gMC->IsTrackExiting()) {
-      copy = fTrackReferences->GetEntriesFast();
-      TClonesArray &lTR = *fTrackReferences;
-      // Fill TrackReference structure with this new TrackReference.
-      new(lTR[copy]) AliTrackReference(
-                    gAlice->GetMCApp()->GetCurrentTrackNumber());
+       AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS);
     } // if Outer ITS mother Volume
 
     static TLorentzVector position, momentum; // Saves on calls to construtors
@@ -5611,12 +5903,20 @@ void AliITSv11Hybrid::StepManager(){
     if(gMC->IsTrackStop())        status += 32;
     if(gMC->IsTrackAlive())       status += 64;
 
+    //
+    // retrieve the indices with the volume path
     //
     switch (lay) {
     case 0:case 1: // SPD
-      gMC->CurrentVolOffID(2,copy);
-      gMC->CurrentVolOffID(3,cpn1);
-      gMC->CurrentVolOffID(4,cpn0);
+      if (AliITSInitGeometry::SPDIsTGeoNative()) {
+       gMC->CurrentVolOffID(1,copy); // ladder
+       gMC->CurrentVolOffID(3,cpn1); // stave
+       gMC->CurrentVolOffID(5,cpn0); // sector
+      } else {
+       gMC->CurrentVolOffID(2,copy);
+       gMC->CurrentVolOffID(4,cpn1);
+       gMC->CurrentVolOffID(5,cpn0);
+      };
       break;
     case 2:case 3: // SDD
       copy = 1;
@@ -5630,19 +5930,22 @@ void AliITSv11Hybrid::StepManager(){
       break;
     case 4:case 5: // SSD
       copy = 1;
-      if (AliITSInitGeometry::SSDIsTGeoNative()) {
-      gMC->CurrentVolOffID(1,cpn1);
-      gMC->CurrentVolOffID(2,cpn0);
-      } else {
+      //if (AliITSInitGeometry::SSDIsTGeoNative()) {
+      // same levels for old and new geom
       gMC->CurrentVolOffID(1,cpn1);
       gMC->CurrentVolOffID(2,cpn0);
-      };
       break;
     default:
       AliError(Form("Invalid value: lay= %d . Not an ITS sensitive volume",lay));
       return; // not an ITS sensitive volume.
     } //
+
     fInitGeom.DecodeDetector(mod,lay+1,cpn0,cpn1,copy);
+    // We should not need to pass by the switch !
+    // This is time consuming...
+    // therefore DecodeDetectorv11Hybrid(...) shouldn't be private !
+    // and we should be able to use instead :
+    //fInitGeom.DecodeDetectorv11Hybrid(mod,lay+1,cpn0,cpn1,copy);
 
     //
     // Fill hit structure.
@@ -5673,3 +5976,4 @@ void AliITSv11Hybrid::StepManager(){
 
     return;
 }
+