Update for Ds
[u/mrichter/AliRoot.git] / ITS / AliITSv11Hybrid.cxx
index 034acc3..df34a89 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.              *
  **************************************************************************/
 
 
+/* $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
+//  is set in AliITSInitGeometry.cxx
 // 
 // Ludovic Gaudichet  (gaudichet@to.infn.it)
 //
 //========================================================================
 
+
+
+// $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 <TGeoGlobalMagField.h>
+#include <TGeoManager.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 <TLorentzVector.h>
+#include <TString.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)
 
 //______________________________________________________________________
 AliITSv11Hybrid::AliITSv11Hybrid():
-  AliITS(),
-  fGeomDetOut(kFALSE),
-  fGeomDetIn(kFALSE),
   fByThick(kTRUE),
   fMajorVersion(IsVersion()),
   fMinorVersion(-1),
@@ -82,52 +116,64 @@ AliITSv11Hybrid::AliITSv11Hybrid():
   fRails(0),
   fFluid(0),
   fIDMother(0),
-  fSDDgeom(0)
+  fInitGeom((AliITSVersion_t)fMajorVersion,fMinorVersion),
+  fSPDgeom(0),
+  fSDDgeom(0),
+  fSSDgeom(0),
+  fSupgeom(0)
  {
-    //    Standard default constructor for the ITS version 10.
+    //    Standard default constructor
     // Inputs:
     //   none.
     // Outputs:
     //   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 *name, const char *title) 
+AliITSv11Hybrid::AliITSv11Hybrid(const char *title) 
   : AliITS("ITS", title),
-    fGeomDetOut(kFALSE),
-    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),
-    fSDDgeom(0) {
-    //    Standard constructor for the ITS version 10.
+    fInitGeom((AliITSVersion_t)fMajorVersion,fMinorVersion),
+    fSPDgeom(0),
+    fSDDgeom(0),
+    fSSDgeom(0),
+    fSupgeom(0)
+{
+    //    Standard constructor for the v11Hybrid geometry.
     // Inputs:
-    //   const char * name   Ignored, set to "ITS"
     //   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];
-  fIdName[0] = name; // removes warning message
-  fIdName[0] = "ITS1";
-  fIdName[1] = "ITS2";
+
+  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();
@@ -136,9 +182,15 @@ AliITSv11Hybrid::AliITSv11Hybrid(const char *name, const char *title)
     fIdName[2] = "ITS3";
     fIdName[3] = "ITS4";
   }
+  
+  if (AliITSInitGeometry::SSDIsTGeoNative()) {
+    fIdName[4] = fSSDgeom->GetSenstiveVolumeName5();
+    fIdName[5] = fSSDgeom->GetSenstiveVolumeName6();
+  } else {
+    fIdName[4] = "ITS5";
+    fIdName[5] = "ITS6";
+  }
 
-  fIdName[4] = "ITS5";
-  fIdName[5] = "ITS6";
   fIdSens    = new Int_t[fIdN];
   for(i=0;i<fIdN;i++) fIdSens[i] = 0;
   SetThicknessDet1();
@@ -147,14 +199,81 @@ AliITSv11Hybrid::AliITSv11Hybrid(const char *name, const char *title)
   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),
+    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 * name   Ignored, set to "ITS"
+    //   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];
+
+  (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();
+  } 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();
+  
 }
+
 //______________________________________________________________________
 AliITSv11Hybrid::~AliITSv11Hybrid() {
     //    Standard destructor
@@ -164,12 +283,15 @@ AliITSv11Hybrid::~AliITSv11Hybrid() {
     //   none.
     // Return:
     //   none.
+  delete fSPDgeom;
   delete fSDDgeom;
+  delete fSSDgeom;
+  delete fSupgeom;
 }
 
 //______________________________________________________________________
-void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t dAlpha,
-                     Double_t dxSign, Double_t yShift, Bool_t yFlip, Bool_t yRot180)
+void AliITSv11Hybrid::SetT2Lmatrix(Int_t uid, Double_t yShift, 
+                                  Bool_t yFlip, Bool_t yRot180)
   const {
 
   //
@@ -178,34 +300,35 @@ void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t dAlpha,
   //
   // 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));
-  Double_t al = TMath::ATan2(rotMatrix[1],rotMatrix[0]) + dAlpha;
+  Double_t al = TMath::ATan2(rotMatrix[1],rotMatrix[0]);
   if (yRot180) {
-    al = TMath::ATan2(rotMatrix[1],-rotMatrix[0]) + dAlpha;
+    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( dxSign*(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;
@@ -217,9 +340,7 @@ void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t dAlpha,
 }
 
 //______________________________________________________________________
-void AliITSv11Hybrid::AddAlignableVolumes() const
-{
-  //
+void AliITSv11Hybrid::AddAlignableVolumes() const{
   // Creates entries for alignable volumes associating the symbolic volume
   // name with the corresponding volume path.
   // 
@@ -228,6 +349,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");
 
@@ -236,135 +363,309 @@ 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 c3 =1; c3<=4; c3++){
+       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 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(), 0, 1, -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(), TMath::Pi(), -1, -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";
     TString ladder;
-    TString wafer;
+    TString sensor;
 
     for(Int_t c1 = 0; c1<14; c1++) {
 
@@ -376,28 +677,31 @@ 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++) {
 
-       wafer = ladder;
-       wafer += str1;
-       wafer += c2;
-       wafer += str2;    // one wafer
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
+       sensor = ladder;
+       sensor += str1;
+       sensor += c2;
        strEntryName2 = strEntryName1;
        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(),sensor.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),sensor.Data()));
 
-       SetT2Lmatrix(strEntryName2.Data(), TMath::Pi(), -1, 0, kFALSE, c2>=3);
+       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";
     
     for(Int_t c1 = 0; c1<22; c1++) {
 
@@ -409,27 +713,32 @@ 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++) {
 
-       wafer = ladder;
-       wafer += str1;
-       wafer += c2;
-       wafer += str2;    // one wafer
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
+       sensor = ladder;
+       sensor += str1;
+       sensor += c2;
        strEntryName2 = strEntryName1;
        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(),sensor.Data(),modUID))
+         AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
+                   strEntryName2.Data(),sensor.Data()));
 
-       SetT2Lmatrix(strEntryName2.Data(), TMath::Pi(), -1, 0, kFALSE, c2>=4);
+       SetT2Lmatrix(modUID, 0, kFALSE, c2>=4);
       }
     }
 
-  } else {  // else old geometry
+  } else {  // else old SDD geometry
 
+    layerId = AliGeomManager::kSDD1;
+    modnum = 0;
+    
     TString str0 = "ALIC_1/ITSV_1/ITSD_1/IT34_1/I004_";
     TString str1 = "/I302_";
     
@@ -445,25 +754,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(), TMath::Pi(), -1, 0, kFALSE);
+       SetT2Lmatrix(modUID, 0, kFALSE);
       }
     }
 
+    layerId = AliGeomManager::kSDD2;
+    modnum = 0;
     str0 = "ALIC_1/ITSV_1/ITSD_1/IT34_1/I005_";
     str1 = "/I402_";
 
@@ -476,38 +788,119 @@ 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!!");    
+       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 SDD
+
+  //===== SSD layers =====
+  if (AliITSInitGeometry::SSDIsTGeoNative()) { // new SSD geometry
+
+    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;
+
+    for(Int_t c1 = 0; c1<34; c1++) {
+
+      ladder = str0;
+      ladder += c1; // the set of wafers from one ladder
+      strEntryName1 = strSSD;
+      strEntryName1 += 4;
+      strEntryName1 += strLadder;
+      strEntryName1 += c1;
+      //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
+      if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
+       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;
+       //wafer += str2;    // one wafer
+       strEntryName2 = strEntryName1;
+       strEntryName2 += strSensor;
+       strEntryName2 += c2;
        //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(), TMath::Pi(), -1, 0, kFALSE);
+       SetT2Lmatrix(modUID, 0, kFALSE, kFALSE);
       }
     }
 
-  }   // end SDD
+    layerId = AliGeomManager::kSSD2;
+    modnum = 0;
+    str0 = "/ALIC_1/ITSV_1/ITSssdLayer6_1/ITSssdLay6Ladd_"; // SSD layer2
+    str1 = "/ITSssdSensor6_";
+    str2 = "";
+    
+    for(Int_t c1 = 0; c1<38; c1++) {
+
+      ladder = str0;
+      ladder += c1; // the set of wafers from one ladder
+      strEntryName1 = strSSD;
+      strEntryName1 += 5;
+      strEntryName1 += strLadder;
+      strEntryName1 += c1;
+      //printf("%s    ==    %s\n",strEntryName1.Data(),ladder.Data());
+      if(!gGeoManager->SetAlignableEntry(strEntryName1.Data(),ladder.Data()))
+       AliFatal(Form("Unable to set alignable entry 1! %s :: %s",
+                 strEntryName1.Data(),ladder.Data()));
 
+      for(Int_t c2 =0; c2<25; c2++) {
 
-  //===== SSD layer1 =====
-  {
+       modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
+       wafer = ladder;
+       wafer += str1;
+       wafer += c2;
+       //wafer += str2;    // one wafer
+       strEntryName2 = strEntryName1;
+       strEntryName2 += strSensor;
+       strEntryName2 += c2;
+       //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(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;
     TString wafer;
 
     for(Int_t c1 = 1; c1<=34; c1++){
-
+      
       ladder = str0;
       ladder += c1; // the set of wafers from one ladder
       strEntryName1 = strSSD;
@@ -515,36 +908,33 @@ 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());
+       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(), TMath::Pi(), -1, 0, kFALSE);
+       SetT2Lmatrix(modUID, 0, kFALSE);
       }
     }
-  }
-
-  //===== SSD layer2 =====
-  {
-    TString str0 = "ALIC_1/ITSV_1/ITSD_1/IT56_1/I569_";
-    TString str1 = "/I566_";
-
-    TString ladder;
-    TString wafer;
-
+    
+    layerId = AliGeomManager::kSSD2;
+    modnum = 0;
+    str0 = "ALIC_1/ITSV_1/ITSD_1/IT56_1/I569_";
+    str1 = "/I566_";
+    
     for(Int_t c1 = 1; c1<=38; c1++){
-
+      
       ladder = str0;
       ladder += c1; // the set of wafers from one ladder
       strEntryName1 = strSSD;
@@ -552,81 +942,26 @@ 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());
+       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(), TMath::Pi(), -1, 0, kFALSE);
+       SetT2Lmatrix(modUID, 0, kFALSE);
       }
     }
-  }
-}
-//______________________________________________________________________
-void AliITSv11Hybrid::BuildGeometry(){
-    //    Geometry builder for the ITS version 10. Event Display geometry.
-    // Inputs:
-    //   none.
-    // Outputs:
-    //   none.
-    // Return:
-    //   none.
-
-    TNode *node, *top;
-    
-    const Int_t kColorITS=kYellow;
-    //
-    top = gAlice->GetGeometry()->GetNode("alice");
-
-
-    new TTUBE("S_layer1","Layer1 of ITS","void",
-             3.8095,3.8095+1.03*9.36/100.,14.35);
-    top->cd();
-    node = new TNode("Layer1","Layer1","S_layer1",0,0,0,"");
-    node->SetLineColor(kColorITS);
-    fNodes->Add(node);
-
-    new TTUBE("S_layer2","Layer2 of ITS","void",7.,7.+1.03*9.36/100.,14.35);
-    top->cd();
-    node = new TNode("Layer2","Layer2","S_layer2",0,0,0,"");
-    node->SetLineColor(kColorITS);
-    fNodes->Add(node);
-
-    new TTUBE("S_layer3","Layer3 of ITS","void",15.,15.+0.94*9.36/100.,25.1);
-    top->cd();
-    node = new TNode("Layer3","Layer3","S_layer3",0,0,0,"");
-    node->SetLineColor(kColorITS);
-    fNodes->Add(node);
-
-    new TTUBE("S_layer4","Layer4 of ITS","void",24.1,24.1+0.95*9.36/100.,32.1);
-    top->cd();
-    node = new TNode("Layer4","Layer4","S_layer4",0,0,0,"");
-    node->SetLineColor(kColorITS);
-    fNodes->Add(node);
-
-    new TTUBE("S_layer5","Layer5 of ITS","void",
-             38.5,38.5+0.91*9.36/100.,49.405);
-    top->cd();
-    node = new TNode("Layer5","Layer5","S_layer5",0,0,0,"");
-    node->SetLineColor(kColorITS);
-    fNodes->Add(node);
-
-    new TTUBE("S_layer6","Layer6 of ITS","void",
-             43.5765,43.5765+0.87*9.36/100.,55.27);
-    top->cd();
-    node = new TNode("Layer6","Layer6","S_layer6",0,0,0,"");
-    node->SetLineColor(kColorITS);
-    fNodes->Add(node);
+  } // end SSD geometry 
 }
 
 //______________________________________________________________________
@@ -640,11 +975,58 @@ void AliITSv11Hybrid::CreateGeometry() {
   TGeoManager *geoManager = gGeoManager;
 
   CreateOldGeometry();
-  TGeoVolume *vITS = geoManager->GetVolume("ITSV");
+
+  TGeoVolume *vITSV = geoManager->GetVolume("ITSV");
+  TGeoVolume *vITSS = geoManager->GetVolume("ITSS");
+
+
+  const Char_t *cvsDate="$Date$";
+  const Char_t *cvsRevision="$Revision$";
+  const Int_t kLength=100;
+  Char_t vstrng[kLength];
+  if(fInitGeom.WriteVersionString(vstrng,kLength,(AliITSVersion_t)IsVersion(),
+                            fMinorVersion,cvsDate,cvsRevision)) {
+    vITSV->SetTitle(vstrng);
+    vITSS->SetTitle(vstrng);
+  }
+
+  if (AliITSInitGeometry::SPDIsTGeoNative()) {
+    fSPDgeom->SPDSector(vITSV);
+  }
 
   if (AliITSInitGeometry::SDDIsTGeoNative()) {
-    fSDDgeom->Layer3(vITS);
-    fSDDgeom->Layer4(vITS);
+    fSDDgeom->Layer3(vITSV);
+    fSDDgeom->Layer4(vITSV);
+    fSDDgeom->ForwardLayer3(vITSV);
+    fSDDgeom->ForwardLayer4(vITSV);
+  }
+
+  if (AliITSInitGeometry::SSDIsTGeoNative()) {
+    fSSDgeom->Layer5(vITSV);
+    fSSDgeom->Layer6(vITSV);
+    fSSDgeom->LadderSupportLayer5(vITSV);
+    fSSDgeom->LadderSupportLayer6(vITSV);
+    fSSDgeom->EndCapSupportSystemLayer6(vITSV);
+    fSSDgeom->EndCapSupportSystemLayer5(vITSV);
+  }
+
+  if (AliITSInitGeometry::SPDshieldIsTGeoNative())
+    fSupgeom->SPDCone(vITSV);
+
+  if (AliITSInitGeometry::SDDconeIsTGeoNative())
+    fSupgeom->SDDCone(vITSV);
+
+  if (AliITSInitGeometry::SSDconeIsTGeoNative())
+    fSupgeom->SSDCone(vITSV);
+
+  if (AliITSInitGeometry::ServicesAreTGeoNative()) {
+    fSDDgeom->SDDCables(vITSV);
+    fSSDgeom->SSDCables(vITSV);
+    fSupgeom->ServicesCableSupport(vITSS);
+  }
+
+  if (AliITSInitGeometry::SupportIsTGeoNative()) {
+    fSupgeom->ITSTPCSupports(vITSS);
   }
 }
 
@@ -683,7 +1065,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 };
@@ -1271,16 +1653,19 @@ 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");
+    new TGeoVolumeAssembly("ITSS");
 
     // --- Place the ghost volume in its mother volume (ALIC) and make it 
     //     invisible
     //    gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY");
     //gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., idrotm[199], "MANY");
-    //gMC->Gsatt("ITSV", "SEEN", 0);
+    //gGeoManager->SetVolumeAttribute("ITSV", "SEEN", 0);
 
     //gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "MANY"); //=== LG
     gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY"); //=== LG
+    gMC->Gspos("ITSS", 1, "ALIC", 0., 0., 0., 0, "ONLY"); //=== MS
 
 
     // --- Define ghost volume containing the six layers and fill it with air 
@@ -1317,7 +1702,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
     // --- Place the ghost volume in its mother volume (ITSV) and make it 
     //     invisible
     //gMC->Gspos("ITSD", 1, "ITSV", 0., 0., 0., 0, "ONLY");
-    //gMC->Gsatt("ITSD", "SEEN", 0);
+    //gGeoManager->SetVolumeAttribute("ITSD", "SEEN", 0);
 
     //======================================================================
     // Let's make ITSD an assembly, because we can then add the new geometry
@@ -1330,9 +1715,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 ----------------------------
   
@@ -1714,7 +2105,6 @@ void AliITSv11Hybrid::CreateOldGeometry(){
 
   // --- Define SDD volumes ------------------------------------------
 
-  
   cos30 = cos(30.*3.14159/180.);
   sin30 = sin(30.*3.14159/180.);
 
@@ -2434,53 +2824,93 @@ 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;
   dits[1] = 360;
   dits[2] = 12;
+  //
   dits[3] = -59.7;
   dits[4] = 27;
   dits[5] = 28.6;
+
   dits[6] = -42.7;
   dits[7] = 10;
   dits[8] = 28.6;
-  dits[9] = -34.65;
+
+  //   dits[9] = -34.65;
+  dits[9] = -33.55;
   dits[10] = 10;
   dits[11] = 28.6;
-  dits[12] = -34.65;
+  
+  //   dits[12] = -34.65;
+  dits[12] = -33.55;
   dits[13] = 10;
   dits[14] = 23.495;
-  dits[15] = -23.7;
+
+  //dits[15] = -23.7;
+  dits[15] = -26.2;
   dits[16] = 10;
   dits[17] = 23.495;
-  dits[18] = -23.7;
+
+  //dits[18] = -23.7;
+  dits[18] = -26.2;
   dits[19] = 10;
   dits[20] = 14.595;
-  dits[21] = 23.7;
+
+  //dits[21] = 23.7;
+  dits[21] = 26.2;
   dits[22] = 10;
   dits[23] = 14.595;
-  dits[24] = 23.7;
+
+  //dits[24] = 23.7;
+  dits[24] = 26.2;
   dits[25] = 10;
   dits[26] = 23.495;
-  dits[27] = 34.65;
+
+//   dits[27] = 34.65;
+  dits[27] = 33.55;
   dits[28] = 10;
   dits[29] = 23.495;
-  dits[30] = 34.65;
+
+//   dits[30] = 34.65;
+  dits[30] = 33.55;
   dits[31] = 10;
   dits[32] = 28.6;
+
   dits[33] = 42.7;
   dits[34] = 10;
   dits[35] = 28.6;
+
   dits[36] = 59.7;
   dits[37] = 27.2637;
-  dits[38] = 28.6;             
+  dits[38] = 28.6;
+
+  if (! AliITSInitGeometry::SDDIsTGeoNative()) {
+    dits[9] = -34.65;
+    dits[12] = -34.65;
+    dits[15] = -23.7;
+    dits[18] = -23.7;
+    dits[21] = 23.7;
+    dits[24] = 23.7;
+    dits[27] = 34.65;
+    dits[30] = 34.65;
+  } 
   gMC->Gsvolu("IS02", "PCON", idtmed[204], dits, 39);
   
   dits[0] = 0;
@@ -2586,7 +3016,10 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dits[2] = 7.74;
   gMC->Gsvolu("I202", "BOX ", idtmed[272], dits, 3);
 
-  dits[0] = 1;
+  if (AliITSInitGeometry::SDDIsTGeoNative())
+    dits[0] = 0.9;
+  else
+    dits[0] = 1;
   dits[1] = 1;
   dits[2] = 9.14;
   gMC->Gsvolu("I203", "BOX ", idtmed[272], dits, 3);
@@ -2614,42 +3047,65 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dits[0] = 0;
   dits[1] = 360;
   dits[2] = 12;
+
   dits[3] = -zmax;
-  dits[4] = 46;         
-  dits[5] = 49.25;       
+  dits[4] = 46;
+  dits[5] = 49.25;
+
   dits[6] = -61.2;
   dits[7] = 28.7;
-  dits[8] = 49.25;       
+  dits[8] = 49.25;
+
   dits[9] = -57.5;
   dits[10] = 28.7;
-  dits[11] = 49.25;      
+  dits[11] = 49.25;
+   
   dits[12] = -57.5;
   dits[13] = 28.7;
   dits[14] = 43.5;
-  dits[15] = -49.2;
+
+  //dits[15] = -49.2;
+  dits[15] = -53.4-0.75;
   dits[16] = 28.7;
   dits[17] = 43.5;
-  dits[18] = -49.2;
+
+  //dits[18] = -49.2;
+  dits[18] = -53.4-0.75;
   dits[19] = 28.7;
   dits[20] = 36.85;
-  dits[21] = 50.6;
+
+  //dits[21] = 50.6;
+  dits[21] = 53.4+0.75;
   dits[22] = 28.7;
   dits[23] = 36.85;
-  dits[24] = 50.6;
+
+  dits[24] = 53.4+0.75;
+  //dits[24] = 50.6;
   dits[25] = 28.7;
   dits[26] = 43.5;
+
   dits[27] = 57.5;
   dits[28] = 28.7;
   dits[29] = 43.5;
+
   dits[30] = 57.5;
   dits[31] = 28.7;
-  dits[32] = 49.25;      
+  dits[32] = 49.25;
+  
   dits[33] = 61.2;
   dits[34] = 28.7;
   dits[35] = 49.25;      
   dits[36] = zmax;
   dits[37] = 46;      
-  dits[38] = 49.25;      
+  dits[38] = 49.25;
+
+  if (! AliITSInitGeometry::SSDIsTGeoNative()) {
+    dits[15] = -49.2;
+    dits[18] = -49.2;
+    dits[21] = 50.6;
+    dits[24] = 50.6;
+  }
+  
   gMC->Gsvolu("IS01", "PCON", idtmed[204], dits, 39);   // SSD cone mother volume
   
   dits[0] = 0;
@@ -2781,16 +3237,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");      
@@ -2851,19 +3307,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");
@@ -2894,28 +3371,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");
@@ -2942,7 +3421,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");  
   }
     
@@ -3042,8 +3521,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");
@@ -3151,7 +3630,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
@@ -3559,8 +4038,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");
@@ -3614,13 +4095,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");
@@ -3654,8 +4137,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");
@@ -3724,13 +4209,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");
   }
@@ -3749,29 +4236,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");
@@ -3792,10 +4281,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");
@@ -3815,6 +4306,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");
@@ -3837,7 +4330,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");
@@ -3858,69 +4354,81 @@ 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
-  gMC->Gspos("I219",1,"IS01",0.0,0.0,-50.25,0,"ONLY");            // this will change after PPR to be symmetric
+  // Unfortunately the following piece is not compatible with new SSD
+  if (! AliITSInitGeometry::SSDIsTGeoNative())
+    gMC->Gspos("I219",1,"IS01",0.0,0.0,-50.25,0,"ONLY");            // this will change after PPR to be symmetric
   gMC->Gspos("I211",2,"IS01",0.0,0.0,56.5,idrotm[701],"ONLY");   
-  gMC->Gspos("I219",2,"IS01",0.0,0.0,51.65,idrotm[701],"ONLY");   // this will change after PPR to be symmetric
+
+  // Unfortunately the following piece is not compatible with new SSD
+  if (! AliITSInitGeometry::SSDIsTGeoNative())
+    gMC->Gspos("I219",2,"IS01",0.0,0.0,51.65,idrotm[701],"ONLY");   // this will change after PPR to be symmetric
   gMC->Gspos("I217",2,"IS01",0.0,0.0,45.8,idrotm[701],"ONLY");    // this will change after PPR to be symmetric
   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("I216",9,"IS01",0.0,0.0,45.5,idrotm[714],"ONLY");
-  gMC->Gspos("I216",11,"IS01",0.0,0.0,45.5,idrotm[715],"ONLY");
-  gMC->Gspos("I216",12,"IS01",0.0,0.0,45.5,idrotm[716],"ONLY");
-  gMC->Gspos("I216",3,"IS01",0.0,0.0,45.5,idrotm[717],"ONLY");
-  gMC->Gspos("I216",5,"IS01",0.0,0.0,45.5,idrotm[718],"ONLY");
-  gMC->Gspos("I216",7,"IS01",0.0,0.0,45.5,idrotm[719],"ONLY");
-  gMC->Gspos("I216",10,"IS01",0.0,0.0,-44,idrotm[720],"ONLY");
-  gMC->Gspos("I216",1,"IS01",0.0,0.0,-44,idrotm[721],"ONLY");
-  gMC->Gspos("I216",2,"IS01",0.0,0.0,-44,idrotm[722],"ONLY");
-  gMC->Gspos("I216",4,"IS01",0.0,0.0,-44,idrotm[723],"ONLY");
-  gMC->Gspos("I216",6,"IS01",0.0,0.0,-44,idrotm[724],"ONLY");
-  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("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()) {
+    gMC->Gspos("I216",9,"IS01",0.0,0.0,45.5,idrotm[714],"ONLY");
+    gMC->Gspos("I216",11,"IS01",0.0,0.0,45.5,idrotm[715],"ONLY");
+    gMC->Gspos("I216",12,"IS01",0.0,0.0,45.5,idrotm[716],"ONLY");
+    gMC->Gspos("I216",3,"IS01",0.0,0.0,45.5,idrotm[717],"ONLY");
+    gMC->Gspos("I216",5,"IS01",0.0,0.0,45.5,idrotm[718],"ONLY");
+    gMC->Gspos("I216",7,"IS01",0.0,0.0,45.5,idrotm[719],"ONLY");
+    gMC->Gspos("I216",10,"IS01",0.0,0.0,-44,idrotm[720],"ONLY");
+    gMC->Gspos("I216",1,"IS01",0.0,0.0,-44,idrotm[721],"ONLY");
+    gMC->Gspos("I216",2,"IS01",0.0,0.0,-44,idrotm[722],"ONLY");
+    gMC->Gspos("I216",4,"IS01",0.0,0.0,-44,idrotm[723],"ONLY");
+    gMC->Gspos("I216",6,"IS01",0.0,0.0,-44,idrotm[724],"ONLY");
+    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],"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
   //     into ITS mother volume ITSD
     
   if (! AliITSInitGeometry::SPDIsTGeoNative())
-    gMC->Gspos("IT12",1,"ITSD",0.0,0.0,0.0,0,"MANY");  // SPD mother volume
+    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,"MANY");  // SDD cones/supports
+    gMC->Gspos("IS02",1,"ITSD",0.0,0.0,0.0,0,"ONLY");  // SDD cones/supports
   if (! AliITSInitGeometry::SSDconeIsTGeoNative())
-    gMC->Gspos("IS01",1,"ITSD",0.0,0.0,0.0,0,"MANY");  // SSD cones/supports
+    gMC->Gspos("IS01",1,"ITSD",0.0,0.0,0.0,0,"ONLY");  // SSD cones/supports
         
 
   // ****************************  SERVICES  *********************************
@@ -3981,7 +4489,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
   
@@ -4012,7 +4519,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   // --- 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;     
@@ -4020,12 +4527,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;      
@@ -4033,13 +4541,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;      
@@ -4047,12 +4556,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;    
@@ -4060,159 +4570,382 @@ 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[2] = (186.6 - 101.1)/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., -(-101.1-dgh[2]), idrotm[199], "ONLY");  
+
+  dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+  dgh[1] = 64.0;
+  dgh[2] = 64.0+1.0;
+  dgh[3] = 46.;
+  dgh[4] = 46.+1.0;
+  dgh[5] = 12.;
+  dgh[6] = 168.;
+  gMC->Gsvolu("ICU9", "CONS", idtmed[213], dgh, 7);   
+  gMC->Gspos("ICU9", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), 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[2] = (186.6 - 101.1)/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., -(-101.1-dgh[2]), idrotm[199], "ONLY");    
+
+  dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+  dgh[1] = 64.0;
+  dgh[2] = 64.0+1.0;
+  dgh[3] = 46.;
+  dgh[4] = 46.+1.0;
+  dgh[5] = 192.;
+  dgh[6] = 348.;
+  gMC->Gsvolu("ICU0", "CONS", idtmed[213], dgh, 7);   
+  gMC->Gspos("ICU0", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
   //     THE ABSORBER - CARBON PART - UPPER PART
   
   dgh[0] = 46.+1.0;  
   dgh[1] = 46.+1.0+1.5; 
-  dgh[2] = (ztpc-97.5)/2.;
+//  dgh[2] = (ztpc-97.5)/2.;
+  dgh[2] = (186.6 - 101.1)/2.;
   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., -(-101.1-dgh[2]), idrotm[199], "ONLY");   
   
+  dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+  dgh[1] = 64.0+1.0;
+  dgh[2] = 64.0+1.0+1.5;
+  dgh[3] = 46.+1.0;
+  dgh[4] = 46.+1.0+1.5;
+  dgh[5] = 12.;
+  dgh[6] = 168.;
+  gMC->Gsvolu("ICC9", "CONS", idtmed[225], dgh, 7);   
+  gMC->Gspos("ICC9", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
   //     THE ABSORBER - CARBON PART - LOWER PART
   
   dgh[0] = 46.+1.0;   
   dgh[1] = 46.+1.0+1.5;  
-  dgh[2] = (ztpc-97.5)/2.;
+//  dgh[2] = (ztpc-97.5)/2.;
+  dgh[2] = (186.6 - 101.1)/2.;
   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., -(-101.1-dgh[2]), idrotm[199], "ONLY");      
+
+  dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+  dgh[1] = 64.0+1.0;
+  dgh[2] = 64.0+1.0+1.5;
+  dgh[3] = 46.+1.0;
+  dgh[4] = 46.+1.0+1.5;
+  dgh[5] = 192.;
+  dgh[6] = 348.;
+  gMC->Gsvolu("ICC0", "CONS", idtmed[225], dgh, 7);   
+  gMC->Gspos("ICC0", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
+  // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
+  //     THE ABSORBER - ALUMINUM PART - UPPER PART
+  
+  dgh[0] = 46.+1.0+1.5;  
+  dgh[1] = 46.+1.0+1.5+0.4; 
+//  dgh[2] = (ztpc-97.5)/2.;
+  dgh[2] = (186.6 - 101.1)/2.;
+  dgh[3] = 12.;
+  dgh[4] = 168.;  
+  gMC->Gsvolu("ICK5", "TUBS", idtmed[210], dgh, 5);   
+  //  gMC->Gspos("ICC5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
+  gMC->Gspos("ICK5", 1, "ITSV", 0., 0., -(-101.1-dgh[2]), idrotm[199], "ONLY");   
+  
+  dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+  dgh[1] = 64.0+1.0+1.5;
+  dgh[2] = 64.0+1.0+1.5+0.4;
+  dgh[3] = 46.+1.0+1.5;
+  dgh[4] = 46.+1.0+1.5+0.4;
+  dgh[5] = 12.;
+  dgh[6] = 168.;
+  gMC->Gsvolu("ICK9", "CONS", idtmed[210], dgh, 7);   
+  gMC->Gspos("ICK9", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+5.5; 
+  dgh[2] = 4.0/2;
+  dgh[3] = 12.;
+  dgh[4] = 168.;  
+  gMC->Gsvolu("IKK7", "TUBS", idtmed[210], dgh, 5);   
+//  gMC->Gspos("IKK7", 1, "ITSV", 0., 0., -(-101.1-dgh[2]), idrotm[199], "ONLY");   
+  gMC->Gspos("IKK7", 1, "ITSV", 0., 0., -(-186.6+dgh[2]+5+4+34+31.8), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+0.3; 
+  dgh[2] = 34.0/2;
+  dgh[3] = 12.;
+  dgh[4] = 168.;  
+  gMC->Gsvolu("IKK5", "TUBS", idtmed[210], dgh, 5);   
+//  gMC->Gspos("IKK5", 1, "ITSV", 0., 0., -(-101.1-dgh[2]-4), idrotm[199], "ONLY");   
+  gMC->Gspos("IKK5", 1, "ITSV", 0., 0., -(-186.6+dgh[2]+5+4+31.8), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+5.5; 
+  dgh[2] = 4.0/2;
+  dgh[3] = 12.;
+  dgh[4] = 168.;  
+  gMC->Gsvolu("IKK3", "TUBS", idtmed[210], dgh, 5);   
+//  gMC->Gspos("IKK3", 1, "ITSV", 0., 0., -(-101.1-dgh[2]-4-34), idrotm[199], "ONLY");   
+  gMC->Gspos("IKK3", 1, "ITSV", 0., 0., -(-186.6+dgh[2]+5+31.8), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+6.0; 
+  dgh[2] = 5.0/2;
+  dgh[3] = 12.;
+  dgh[4] = 168.;  
+  gMC->Gsvolu("IKK1", "TUBS", idtmed[210], dgh, 5);   
+//  gMC->Gspos("IKK1", 1, "ITSV", 0., 0., -(-101.1-dgh[2]-4-34-4), idrotm[199], "ONLY");   
+  gMC->Gspos("IKK1", 1, "ITSV", 0., 0., -(-186.6+dgh[2]+31.8), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+0.3; 
+  dgh[2] = 31.8/2;
+  dgh[3] = 12.;
+  dgh[4] = 168.;  
+  gMC->Gsvolu("IKK9", "TUBS", idtmed[210], dgh, 5);   
+  gMC->Gspos("IKK9", 1, "ITSV", 0., 0., -(-186.6+dgh[2]), idrotm[199], "ONLY");
+
+
+  dgh[0] = 66.2/2;
+  dgh[1] = 46.+1.0+1.5+0.4+12.5;
+  dgh[2] = 46.+1.0+1.5+0.4+12.5+0.3;
+  dgh[3] = 46.+1.0+1.5+0.4;  
+  dgh[4] = 46.+1.0+1.5+0.4+0.3;
+  dgh[5] = 12.;
+  dgh[6] = 168.;
+  gMC->Gsvolu("ICK7", "CONS", idtmed[210], dgh, 7);   
+  gMC->Gspos("ICK7", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
+  // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
+  //     THE ABSORBER - ALUMINUM PART - LOWER PART
+  
+  dgh[0] = 46.+1.0+1.5;   
+  dgh[1] = 46.+1.0+1.5+0.4;  
+//  dgh[2] = (ztpc-97.5)/2.;
+  dgh[2] = (186.6 - 101.1)/2.;
+  dgh[3] = 192.;
+  dgh[4] = 348.;  
+  gMC->Gsvolu("ICK6", "TUBS", idtmed[210], dgh, 5);   
+  //  gMC->Gspos("ICC6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY"); 
+  gMC->Gspos("ICK6", 1, "ITSV", 0., 0., -(-101.1-dgh[2]), idrotm[199], "ONLY");      
+
+  dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+  dgh[1] = 64.0+1.0+1.5;
+  dgh[2] = 64.0+1.0+1.5+0.4;
+  dgh[3] = 46.+1.0+1.5;
+  dgh[4] = 46.+1.0+1.5+0.4;
+  dgh[5] = 192.;
+  dgh[6] = 348.;
+  gMC->Gsvolu("ICK0", "CONS", idtmed[210], dgh, 7);   
+  gMC->Gspos("ICK0", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+5.5; 
+  dgh[2] = 4.0/2;
+  dgh[3] = 192.;
+  dgh[4] = 348.;  
+  gMC->Gsvolu("IKK8", "TUBS", idtmed[210], dgh, 5);   
+//  gMC->Gspos("IKK8", 1, "ITSV", 0., 0., -(-101.1-dgh[2]), idrotm[199], "ONLY");   
+  gMC->Gspos("IKK8", 1, "ITSV", 0., 0., -(-186.6+dgh[2]+5+4+34+31.8), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;   
+  dgh[1] = 46.+1.0+1.5+0.4+0.3;  
+  dgh[2] = 34.0/2;
+  dgh[3] = 192.;
+  dgh[4] = 348.;  
+  gMC->Gsvolu("IKK6", "TUBS", idtmed[210], dgh, 5);   
+//  gMC->Gspos("IKK6", 1, "ITSV", 0., 0., -(-101.1-dgh[2]-4), idrotm[199], "ONLY");      
+  gMC->Gspos("IKK6", 1, "ITSV", 0., 0., -(-186.6+dgh[2]+5+4+31.8), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+5.5; 
+  dgh[2] = 4.0/2;
+  dgh[3] = 192.;
+  dgh[4] = 348.;  
+  gMC->Gsvolu("IKK4", "TUBS", idtmed[210], dgh, 5);   
+//  gMC->Gspos("IKK4", 1, "ITSV", 0., 0., -(-101.1-dgh[2]-4-34), idrotm[199], "ONLY");   
+  gMC->Gspos("IKK4", 1, "ITSV", 0., 0., -(-186.6+dgh[2]+5+31.8), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+6.0; 
+  dgh[2] = 5.0/2;
+  dgh[3] = 192.;
+  dgh[4] = 348.;  
+  gMC->Gsvolu("IKK2", "TUBS", idtmed[210], dgh, 5);   
+//  gMC->Gspos("IKK2", 1, "ITSV", 0., 0., -(-101.1-dgh[2]-4-34-4), idrotm[199], "ONLY");   
+  gMC->Gspos("IKK2", 1, "ITSV", 0., 0., -(-186.6+dgh[2]+31.8), idrotm[199], "ONLY");
+
+
+  dgh[0] = 46.+1.0+1.5+0.4;  
+  dgh[1] = 46.+1.0+1.5+0.4+0.3; 
+  dgh[2] = 31.8/2;
+  dgh[3] = 192.;
+  dgh[4] = 348.;  
+  gMC->Gsvolu("IKK0", "TUBS", idtmed[210], dgh, 5);   
+  gMC->Gspos("IKK0", 1, "ITSV", 0., 0., -(-186.6+dgh[2]), idrotm[199], "ONLY");
+
+
+  dgh[0] = 66.2/2;
+  dgh[1] = 46.+1.0+1.5+0.4+12.5;
+  dgh[2] = 46.+1.0+1.5+0.4+12.5+0.3;
+  dgh[3] = 46.+1.0+1.5+0.4;  
+  dgh[4] = 46.+1.0+1.5+0.4+0.3;
+  dgh[5] = 192.;
+  dgh[6] = 348.;
+  gMC->Gsvolu("ICK8", "CONS", idtmed[210], dgh, 7);   
+  gMC->Gspos("ICK8", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
 
   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
   //     COPPER PART - UPPER PART
     
-  dgh[0] = 46.;   
+  dgh[0] = 64.0;   
   dgh[1] = 74.5;
   dgh[2] = 0.5;
   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
     
-  dgh[0] = 46.; 
+  dgh[0] = 64.0; 
   dgh[1] = 74.5;
   dgh[2] = 0.5;
   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
   
-  dgh[0] = 46.+1.0;  
+  dgh[0] = 64.0+1.0;  
   dgh[1] = 74.5;
   dgh[2] = 0.75;
   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
   
-  dgh[0] = 46.+1.0;  
+  dgh[0] = 64.0+1.0;  
   dgh[1] = 74.5;
   dgh[2] = 0.75;
   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");      
   
   }
 
@@ -4226,9 +4959,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       
@@ -4246,8 +4979,8 @@ void AliITSv11Hybrid::CreateOldGeometry(){
   dgh[1] = 59.;
   dgh[2] = 0.6;    
   gMC->Gsvolu("ICYL", "TUBE", idtmed[210], dgh, 3);   
-  gMC->Gspos("ICYL", 1, "ALIC", 0., 0., -74.1,idrotm[199], "ONLY");   
-  gMC->Gspos("ICYL", 2, "ALIC", 0., 0., 74.1, 0, "ONLY"); 
+  gMC->Gspos("ICYL", 1, "ITSS", 0., 0., -74.1,idrotm[199], "ONLY");   
+  gMC->Gspos("ICYL", 2, "ITSS", 0., 0., 74.1, 0, "ONLY"); 
 
   // --- DEFINE SUPPORTS FOR RAILS ATTACHED TO THE CYLINDERS
 
@@ -4255,14 +4988,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, "ITSS", 53.4292, 10.7053, -79.75,idrotm[199],"ONLY");    
+  gMC->Gspos("ISR1", 2, "ITSS", 53.4292, -10.7053, -79.75,idrotm[199],"ONLY");   
+  gMC->Gspos("ISR1", 3, "ITSS", -53.4292, 10.7053, -79.75,idrotm[199],"ONLY"); 
+  gMC->Gspos("ISR1", 4, "ITSS", -53.4292, -10.7053, -79.75,idrotm[199],"ONLY");  
+  gMC->Gspos("ISR1", 5, "ITSS", 53.4292, 10.7053, 79.75,idrotm[199],"ONLY");   
+  gMC->Gspos("ISR1", 6, "ITSS", 53.4292, -10.7053, 79.75,idrotm[199],"ONLY");   
+  gMC->Gspos("ISR1", 7, "ITSS", -53.4292, 10.7053, 79.75,idrotm[199],"ONLY"); 
+  gMC->Gspos("ISR1", 8, "ITSS", -53.4292, -10.7053, 79.75,idrotm[199],"ONLY");
   
   // --- DEFINE SUPPORTS FOR RAILS ATTACHED TO THE ABSORBER
 
@@ -4270,9 +5003,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, "ITSS", -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, "ITSS", 53.5, 0., 125.5, 0, "ONLY");  
   
   dgh[0] = 5.-2.;        
   dgh[1] = 12.-2.;         
@@ -4288,20 +5021,12 @@ 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, "ITSS", 0., 54., 77., 0, "ONLY"); 
+  gMC->Gspos("ISR6", 2, "ITSS", 0., 54., -77., 0, "ONLY"); 
+  gMC->Gspos("ISR6", 3, "ITSS", 0., -54., -77., 0, "ONLY");                   
 
   }
 
-
-  // --- Outputs the geometry tree in the EUCLID/CAD format 
-  
-  if (fEuclidOut) {
-    gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
-  }
-
-
   {
     if (!gGeoManager) {
       AliError("TGeoManager doesn't exist !");
@@ -4513,10 +5238,7 @@ void AliITSv11Hybrid::CreateOldGeometry(){
       }
       while (strcmp(sddName, toTransform->GetName()) == 0);
     }
-
-
   }
-
 }
 //______________________________________________________________________
 void AliITSv11Hybrid::CreateMaterials(){
@@ -4536,8 +5258,8 @@ void AliITSv11Hybrid::CreateMaterials(){
     // Return:
     //   none.
 
-    Int_t   ifield = gAlice->Field()->Integ();
-    Float_t fieldm = gAlice->Field()->Max();
+    Int_t   ifield = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
+    Float_t fieldm = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
 
     Float_t tmaxfd = 0.1; // 1.0; // Degree
     Float_t stemax = 1.0; // cm
@@ -4577,7 +5299,7 @@ void AliITSv11Hybrid::CreateMaterials(){
     Float_t aCM55J[4]={12.0107,14.0067,15.9994,1.00794};
     Float_t zCM55J[4]={6.,7.,8.,1.};
     Float_t wCM55J[4]={0.908508078,0.010387573,0.055957585,0.025146765};
-    Float_t dCM55J = 1.63;
+    Float_t dCM55J = 1.8;
 
     //ALCM55J
 
@@ -4595,11 +5317,18 @@ void AliITSv11Hybrid::CreateMaterials(){
 
     //Inox
     
-    Float_t aINOX[9]={12.0107,54.9380, 28.0855,30.9738,32.066,58.6928,55.9961,95.94,55.845};
+    Float_t aINOX[9]={12.0107,54.9380, 28.0855,30.9738,32.066,58.6928,51.9961,95.94,55.845};
     Float_t zINOX[9]={6.,25.,14.,15.,16., 28.,24.,42.,26.};
     Float_t wINOX[9]={0.0003,0.02,0.01,0.00045,0.0003,0.12,0.17,0.025,0.654};
     Float_t dINOX = 8.03;
 
+    //AISI 304 L (from F.Tosello's web page - M.S. 18 Oct 10)
+    
+    Float_t a304L[8]={12.0107,54.9380, 28.0855,30.9738,32.066,58.6928,51.9961,55.845};
+    Float_t z304L[8]={6.,25.,14.,15.,16., 28.,24.,26.};
+    Float_t w304L[8]={0.0003,0.02,0.01,0.00045,0.003,0.0925,0.19,0.6865};
+    Float_t d304L = 8.03;
+
     //SDD HV microcable
 
     Float_t aHVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
@@ -4628,12 +5357,19 @@ void AliITSv11Hybrid::CreateMaterials(){
     Float_t wALVm[5]={0.392653705471,0.0128595919215,0.041626868025,0.118832707289, 0.431909};
     Float_t dALVm = 2.0502;
 
-    //X7R capacitors
+    //X7R capacitors - updated from F.Tosello's web page - M.S. 18 Oct 10
+
+    Float_t aX7R[6]={137.327,47.867,15.9994,58.6928,63.5460,118.710};
+    Float_t zX7R[6]={56.,22.,8.,28.,29.,50.};
+    Float_t wX7R[6]={0.524732,0.176736,0.179282,0.079750,0.019750,0.019750};
+    Float_t dX7R = 6.07914;
+
+    //X7R weld, i.e. Sn 60% Pb 40% (from F.Tosello's web page - M.S. 15 Oct 10)
 
-    Float_t aX7R[7]={137.327,47.867,15.9994,58.6928,63.5460,118.710,207.2};
-    Float_t zX7R[7]={56.,22.,8.,28.,29.,50.,82.};
-    Float_t wX7R[7]={0.251639432,0.084755042,0.085975822,0.038244751,0.009471271,0.321736471,0.2081768};
-    Float_t dX7R = 7.14567;
+    Float_t aX7Rweld[2]={118.71 , 207.20};
+    Float_t zX7Rweld[2]={ 50.   ,  82.  };
+    Float_t wX7Rweld[2]={  0.60 ,   0.40};
+    Float_t dX7Rweld   = 8.52358;
 
     // AIR
 
@@ -4672,8 +5408,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
 //
@@ -4684,12 +5420,33 @@ void AliITSv11Hybrid::CreateMaterials(){
     Float_t wInAl[5] = {.816164, .131443,.0330906,.0183836,.000919182};
     Float_t dInAl    = 3.075;
 
+    // Aluminum alloy with 12% Copper - 21 Oct 10
+
+    Float_t aAlCu12[2] = {26.9815, 63.546};
+    Float_t zAlCu12[2] = {13.    , 29.   };
+    Float_t wAlCu12[2] = { 0.88  ,  0.12 };
+    Float_t dAlCu12    = 2.96;
+
     // Kapton
 
     Float_t aKapton[4]={1.00794,12.0107, 14.010,15.9994};
     Float_t zKapton[4]={1.,6.,7.,8.};
     Float_t wKapton[4]={0.026362,0.69113,0.07327,0.209235};
     Float_t dKapton   = 1.42;
+    
+    // Kapton + Cu (for Pixel Bus)
+
+    Float_t aKaptonCu[5]={1.00794, 12.0107, 14.010, 15.9994, 63.5460};
+    Float_t zKaptonCu[5]={1., 6., 7., 8., 29.};
+    Float_t wKaptonCuBus[5];
+    
+    // Kapton + Cu (for Pixel MCM)
+
+    Float_t wKaptonCuMCM[5];
+    
+    // Kapton + Cu (mix of two above)
+
+    Float_t wKaptonCuMix[5];
 
     //SDD ruby sph.
     Float_t aAlOxide[2]  = { 26.981539,15.9994};
@@ -4697,6 +5454,90 @@ 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;
+
+    // Tetrafluorethylene-Perfluorpropylene (FEP) - 08 Mar 10
+    Float_t aFEP[2] = { 12.0107, 18.9984};
+    Float_t zFEP[2] = {  6.    ,  9.    };
+    Float_t wFEP[2] = {  1.    ,  2.    };
+    Float_t dFEP    = 2.15;
+
+    // PVC (C2H3Cl)n - 08 Jul 10
+    Float_t aPVC[3] = { 12.0107, 1.00794, 35.4527};
+    Float_t zPVC[3] = {  6.    , 1.     , 35.   };
+    Float_t wPVC[3] = {  2.    , 3.     ,  1.   };
+    Float_t dPVC    = 1.3;
+
+    // PBT (Polybutylene terephthalate = C12-H12-O4) - 01 Sep 10
+    Float_t aPBT[3] = { 12.0107, 1.00794, 15.9994};
+    Float_t zPBT[3] = {  6.    , 1.     ,  8.   };
+    Float_t wPBT[3] = { 12.    ,12.     ,  4.   };
+    Float_t dPBT    = 1.31;
+
+    // POLYAX (POLYAX = C37-H24-O6-N2) - 03 Sep 10
+    Float_t aPOLYAX[4] = { 12.0107, 1.00794, 15.9994, 14.00674};
+    Float_t zPOLYAX[4] = {  6.    , 1.     ,  8.    ,  7.     };
+    Float_t wPOLYAX[4] = { 37.    ,24.     ,  6.    ,  2.     };
+    Float_t dPOLYAX    = 1.27;
+
+    // PPS (PPS = C6-H4-S) - 05 Sep 10
+    Float_t aPPS[3] = { 12.0107, 1.00794, 32.066};
+    Float_t zPPS[3] = {  6.    , 1.     , 16.   };
+    Float_t wPPS[3] = {  6.    , 4.     ,  1.   };
+    Float_t dPPS    = 1.35;
+
+    // Megolon (Polyolefin = (C-H2)n) - 20 Oct 10
+    Float_t aMegolon[2] = { 12.0107, 1.00794};
+    Float_t zMegolon[2] = {  6.    , 1.     };
+    Float_t wMegolon[2] = {  1.    , 2.     };
+    Float_t dMegolon    = 1.51; // Mean of various types
+
+    // Standard glass (from glassproperties.com/glasses - M.S. 21 Oct 10)
+    Float_t aStdGlass[7] = {15.9994  ,28.0855  ,22.98977 ,40.078   ,
+                           24.305   ,26.981539,39.0983  };
+    Float_t zStdGlass[7] = { 8.      ,14.      ,11.      ,20.      ,
+                           12.      ,13.      ,19.      };
+    Float_t wStdGlass[7] = { 0.468377, 0.348239, 0.096441, 0.071469,
+                            0.006030, 0.005293, 0.004151};
+    Float_t dStdGlass    = 2.53;
+
+    // Glass Fiber (from F.Tosello's web page - M.S. 15 Oct 10)
+    Float_t aGlass[11] = {15.9994  ,28.0855  ,40.078   ,26.981539,10.811   ,
+               24.305   ,39.0983  ,22.98977 ,18.9984  ,47.867   ,55.845};
+    Float_t zGlass[11] = { 8.      ,14.      ,20       ,13       , 5       ,
+               12.      ,19       ,11       , 9       ,22       ,26    };
+    Float_t wGlass[11] = { 0.473610, 0.252415, 0.135791, 0.068803, 0.023293,
+                0.015076, 0.008301, 0.007419, 0.007000, 0.004795, 0.003497};
+    Float_t dGlass = 2.61;
+
+    // Ryton R-4 04 (from F.Tosello's web page - M.S. 15 Oct 10)
+    Float_t aRyton[14] = {15.9994  ,28.0855  ,40.078   ,26.981539,10.811   ,
+                         24.305   ,39.0983  ,22.98977 ,18.9984  ,47.867   ,
+                         55.845   ,12.0107  , 1.00794 ,32.066   };
+    Float_t zRyton[14] = { 8.      ,14.      ,20.      ,13.      , 5.      ,
+                         12.      ,19.      ,11.      , 9.      ,22.      ,
+                         26.      , 6.      , 1.      ,16.      };
+    Float_t wRyton[14] = { 0.189445, 0.100966, 0.054316, 0.027521, 0.009317,
+                          0.006030, 0.003320, 0.002968, 0.002800, 0.001918,
+                          0.001399, 0.399760, 0.022365, 0.177875};
+    Float_t dRyton = 1.65;
+
+    // Plexiglas (Poly(methyl methacrylate) (C5O2H8)n - M.S. 05 nov 10)
+    Float_t aPlexy[3] = { 12.0107, 15.9994,  1.00794};
+    Float_t zPlexy[3] = {  6.    , 8.     ,  1.   };
+    Float_t wPlexy[3] = {  5.    , 2.     ,  8.   };
+    Float_t dPlexy    = 1.18;
+
+    //SSD NiSn capacitor ends
+    Float_t aNiSn[2]  = { 56.6934,118.710};
+    Float_t zNiSn[2]  = {     28.,     50.};
+    Float_t wNiSn[2]  = {0.33, 0.67};
+    Float_t dNiSn     = wNiSn[0]*8.908 + wNiSn[1]*7.310;
+
     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);
 
@@ -4753,6 +5594,73 @@ void AliITSv11Hybrid::CreateMaterials(){
     AliMixture(27,"GEN Air$",aAir,zAir,dAir,4,wAir);
     AliMedium(27,"GEN Air$",27,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
 
+    AliMixture(35,"PLEXYGLAS$",aPlexy,zPlexy,dPlexy,-3,wPlexy);
+    AliMedium(35,"PLEXYGLAS$",35,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(36,"STDGLASS$",aStdGlass,zStdGlass,dStdGlass,7,wStdGlass);
+    AliMedium(36,"STDGLASS$",36,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(37,"ALCU12$",aAlCu12,zAlCu12,dAlCu12,2,wAlCu12);
+    AliMedium(37,"ALCU12$",37,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(38,"MEGOLON$",aMegolon,zMegolon,dMegolon,-2,wMegolon);
+    AliMedium(38,"MEGOLON$",38,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(39,"RYTON$",aRyton,zRyton,dRyton,14,wRyton);
+    AliMedium(39,"RYTON$",39,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(40,"GLASS FIBER$",aGlass,zGlass,dGlass,11,wGlass);
+    AliMedium(40,"GLASS FIBER$",40,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(41,"AISI304L$",a304L,z304L,d304L,8,w304L);
+    AliMedium(41,"AISI304L$",41,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMaterial(42,"NICKEL$",0.58693E+02,0.28000E+02,0.89080E+01,0.14200E+01,0.99900E+03);
+    AliMedium(42,"NICKEL$",42,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+               
+    AliMixture(43,"SDD X7R weld$",aX7Rweld,zX7Rweld,dX7Rweld,2,wX7Rweld);
+    AliMedium(43,"SDD X7R weld$",43,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(44,"PPS$",aPPS,zPPS,dPPS,-3,wPPS);
+    AliMedium(44,"PPS$",44,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(45,"POLYAX$",aPOLYAX,zPOLYAX,dPOLYAX,-4,wPOLYAX);
+    AliMedium(45,"POLYAX$",45,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(46,"PBT$",aPBT,zPBT,dPBT,-3,wPBT);
+    AliMedium(46,"PBT$",46,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(47,"PVC$",aPVC,zPVC,dPVC,-3,wPVC);
+    AliMedium(47,"PVC$",47,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    Double_t cuFrac = 0.56;
+    Double_t kFrac  = 1.0 - cuFrac;
+    Double_t cuDens = 8.96;
+    Float_t dKaptonCuBus   = cuFrac * cuDens + kFrac * dKapton;
+    for (Int_t j=0; j<4; j++)
+      wKaptonCuBus[j] = wKapton[j]*kFrac;
+    wKaptonCuBus[4] = cuFrac;
+    AliMixture(48, "SPD-BUS CU KAPTON", aKaptonCu, zKaptonCu, dKaptonCuBus, 5, wKaptonCuBus);
+    AliMedium(48,"SPD-BUS CU KAPTON$",48,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+    
+    cuFrac = 0.5;
+    kFrac  = 1.0 - cuFrac;
+    Float_t dKaptonCuMCM   = cuFrac * cuDens + kFrac * dKapton;
+    for (Int_t j=0; j<4; j++)
+      wKaptonCuMCM[j] = wKapton[j]*kFrac;
+    wKaptonCuMCM[4] = cuFrac;
+    AliMixture(49, "SPD-MCM CU KAPTON", aKaptonCu, zKaptonCu, dKaptonCuMCM, 5, wKaptonCuMCM);
+    AliMedium(49,"SPD-MCM CU KAPTON$",49,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+    
+    cuFrac = (0.56 + 0.5) / 2.0;
+    kFrac  = 1.0 - cuFrac;
+    Float_t dKaptonCuMix   = cuFrac * cuDens + kFrac * dKapton;
+    for (Int_t j=0; j<4; j++)
+      wKaptonCuMix[j] = wKapton[j]*kFrac;
+    wKaptonCuMix[4] = cuFrac;
+    AliMixture(50, "SPD-MIX CU KAPTON", aKaptonCu, zKaptonCu, dKaptonCuMix, 5, wKaptonCuMix);
+    AliMedium(50,"SPD-MIX CU KAPTON$",50,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
     AliMaterial(51,"SPD SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
     AliMedium(51,"SPD SI$",51,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
@@ -4771,6 +5679,10 @@ void AliITSv11Hybrid::CreateMaterials(){
     AliMixture(56, "SPD KAPTON(POLYCH2)", aKapton, zKapton, dKapton, 4, wKapton);
     AliMedium(56,"SPD KAPTON(POLYCH2)$",56,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
+    // Gaseous Freon has same chemical composition but air density at 1.7 atm
+    AliMixture(59,"GASEOUS FREON$",afre,zfre,1.7*dAir,-2,wfre);
+    AliMedium(59,"GASEOUS FREON$",59,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
     AliMixture(61,"EPOXY$",aEpoxy,zEpoxy,dEpoxy,-3,wEpoxy);
     AliMedium(61,"EPOXY$",61,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
@@ -4786,6 +5698,12 @@ void AliITSv11Hybrid::CreateMaterials(){
     AliMixture(65,"INOX$",aINOX,zINOX,dINOX,9,wINOX);
     AliMedium(65,"INOX$",65,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
+    AliMixture(66,"NiSn$",aNiSn,zNiSn,dNiSn,2,wNiSn);
+    AliMedium(66,"NiSn$",66,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMaterial(67,"Sn$", 118.710, 50., 7.310, 1.206, 999.);
+    AliMedium(67,"Sn$",67,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
     AliMixture(68,"ROHACELL$",arohac,zrohac,drohac,-4,wrohac);
     AliMedium(68,"ROHACELL$",68,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
@@ -4820,7 +5738,7 @@ void AliITSv11Hybrid::CreateMaterials(){
     AliMixture(76,"SPDBUS(AL+KPT+EPOX)$",aSPDbus,zSPDbus,dSPDbus,5,wSPDbus);
     AliMedium(76,"SPDBUS(AL+KPT+EPOX)$",76,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
                
-    AliMixture(77,"SDD X7R capacitors$",aX7R,zX7R,dX7R,7,wX7R);
+    AliMixture(77,"SDD X7R capacitors$",aX7R,zX7R,dX7R,6,wX7R);
     AliMedium(77,"SDD X7R capacitors$",77,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
     AliMixture(78,"SDD ruby sph. Al2O3$",aAlOxide,zAlOxide,dAlOxide,2,wAlOxide);
@@ -5005,7 +5923,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)
@@ -5032,128 +5950,162 @@ 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);
-}
 
-//______________________________________________________________________
-void AliITSv11Hybrid::InitAliITSgeom(){
-    //     Based on the geometry tree defined in Geant 3.21, this
-    // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS geometry
-    // sturture.
-    // Inputs:
-    //   none.
-    // Outputs:
-    //   none.
-    // Return:
-    //   none.
+    AliMixture(98,"SDD OPTICFIB$",aoptfib,zoptfib,doptfib,-2,woptfib);
+    AliMedium(98,"SDD OPTICFIB$",98,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    AliMixture(95,"SSD FEP$",aFEP,zFEP,dFEP,-2,wFEP);
+    AliMedium(95,"SSD FEP$",95,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    // Mean material for low-voltage cables on SPD trays Side A
+    // (Copper + PolyEthylene (C2-H4)) (D.Elia for cable number and
+    // cross-section area, M.Sitta for elemental computation) - 26 Feb 10
+    wW[0] = 0.323024;//H
+    wW[2] = 0.515464;//Cu
+    wW[1] = 0.161512;//C
+    wW[3] = 0.000000;//O
+    wW[4] = 0.000000;//S
+    wW[5] = 0.000000;//F
+    wW[6] = 0.000000;//Sn
+    wW[7] = 0.000000;//Pb
+    wW[8] = 0.000000;//Cr
+    wW[9] = 0.000000;//Si
+    wW[10] = 0.000000;//Ni
+    wW[11] = 0.000000;//Ca
+
+    den = 5.078866;
+    AliMixture(60,"SPD_LOWCABLES$",aA,zZ,den,+3,wW);
+    AliMedium(60,"SPD_LOWCABLES$",60,0,ifield,fieldm,tmaxfd,stemax,
+             deemax,epsil,stmin);
 
-  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};
-    const TString knames[2][knlayers] = {
-     {"/ALIC_1/ITSV_1/ITSD_1/IT12_1/I12A_%d/I10A_%d/I103_%d/I101_1/ITS1_1", // lay=1
-      "/ALIC_1/ITSV_1/ITSD_1/IT12_1/I12A_%d/I20A_%d/I1D3_%d/I1D1_1/ITS2_1", // lay=2
-      "/ALIC_1/ITSV_1/ITSD_1/IT34_1/I004_%d/I302_%d/ITS3_%d", // lay=3
-      "/ALIC_1/ITSV_1/ITSD_1/IT34_1/I005_%d/I402_%d/ITS4_%d", // lay=4
-      "/ALIC_1/ITSV_1/ITSD_1/IT56_1/I565_%d/I562_%d/ITS5_%d", // lay=5
-      "/ALIC_1/ITSV_1/ITSD_1/IT56_1/I569_%d/I566_%d/ITS6_%d"},// lay=6
-     {"/ALIC_1/ITSV_1/ITSD_1/IT12_1/I12B_%d/I10B_%d/I107_%d/I101_1/ITS1_1", // lay=1
-      "/ALIC_1/ITSV_1/ITSD_1/IT12_1/I12B_%d/I20B_%d/I1D7_%d/I1D1_1/ITS2_1", // lay=2
-      "/ALIC_1/ITSV_1/ITSD_1/IT34_1/I004_%d/I302_%d/ITS3_%d", // lay=3
-      "/ALIC_1/ITSV_1/ITSD_1/IT34_1/I005_%d/I402_%d/ITS4_%d", // lay=4
-      "/ALIC_1/ITSV_1/ITSD_1/IT56_1/I565_%d/I562_%d/ITS5_%d", // lay=5
-      "/ALIC_1/ITSV_1/ITSD_1/IT56_1/I569_%d/I566_%d/ITS6_%d"}
-    };
-    const Int_t kitsGeomTreeCopys[knlayers][kndeep]= {{10, 2, 4},// lay=1
-                                                     {10, 4, 4},// lay=2
-                                                     {14, 6, 1},// lay=3
-                                                     {22, 8, 1},// lay=4
-                                                     {34,22, 1},// lay=5
-                                                     {38,25, 1}};//lay=6
-    Int_t       nlad[knlayers],ndet[knlayers];
-    Int_t       mod,lay,lad=0,det=0,i,j,k,cp0,cp1,cp2;
-    TString path,shapeName;
-    TGeoHMatrix materix;
-    Double_t trans[3]={3*0.0},rot[10]={9*0.0,1.0};
-    TArrayD shapePar;
-    TArrayF shapeParF;
-    Bool_t shapeDefined[3]={kFALSE,kFALSE,kFALSE};
-
-    AliDebug(1,"Reading Geometry transformation directly from Modler.");
-    mod = 0;
-    for(i=0;i<knlayers;i++){
-        k = 1;
-        for(j=0;j<kndeep;j++) if(kitsGeomTreeCopys[i][j]!=0)
-            k *= TMath::Abs(kitsGeomTreeCopys[i][j]);
-        mod += k;
-    } // end for i
+    // Mean material for high-voltage cables on SPD trays Side A & C
+    // (Copper + HD PolyEthylene (C2-H2)) (D.Elia for cable number and
+    // cross-section area, M.Sitta for elemental computation) - 10 Jun 10
+    wW[0] = 0.083766;//H
+    wW[2] = 0.417136;//Cu
+    wW[1] = 0.499098;//C
+    wW[3] = 0.000000;//O
+    wW[4] = 0.000000;//S
+    wW[5] = 0.000000;//F
+    wW[6] = 0.000000;//Sn
+    wW[7] = 0.000000;//Pb
+    wW[8] = 0.000000;//Cr
+    wW[9] = 0.000000;//Si
+    wW[10] = 0.000000;//Ni
+    wW[11] = 0.000000;//Ca
+
+    den = 1.514930;
+    AliMixture(58,"SPD_HICABLES$",aA,zZ,den,+3,wW);
+    AliMedium(58,"SPD_HICABLES$",58,0,ifield,fieldm,tmaxfd,stemax,
+             deemax,epsil,stmin);
 
-    SetITSgeom(0);
-    nlad[0]=20;nlad[1]=40;nlad[2]=14;nlad[3]=22;nlad[4]=34;nlad[5]=38;
-    ndet[0]= 4;ndet[1]= 4;ndet[2]= 6;ndet[3]= 8;ndet[4]=22;ndet[5]=25;
-    AliITSgeom* geom = new AliITSgeom(0,6,nlad,ndet,mod);
-    SetITSgeom(geom);
-    mod = 0;
-    for(lay=1;lay<=knlayers;lay++){
-        for(cp0=1;cp0<=kitsGeomTreeCopys[lay-1][0];cp0++){
-            for(cp1=1;cp1<=kitsGeomTreeCopys[lay-1][1];cp1++){
-                for(cp2=1;cp2<=kitsGeomTreeCopys[lay-1][2];cp2++){
-                    path.Form(knames[fMinorVersion-1][lay-1].Data(),
-                              cp0,cp1,cp2);
-                    switch (lay){
-                    case 1:{
-                        det = cp2;
-                        lad = cp1+2*(cp0-1);
-                    }break;
-                    case 2:{
-                        det = cp2;
-                        lad = cp1+4*(cp0-1);
-                    } break;
-                    case 3: case 4: case 5: case 6:{
-                        det = cp1;
-                        lad = cp0;
-                    } break;
-                    } // end switch
-                         //AliInfo(Form("path=%s lay=%d lad=%d det=%d",
-                         //             path.Data(),lay,lad,det));
-                    gMC->GetTransformation(path.Data(),materix);
-                    gMC->GetShape(path.Data(),shapeName,shapePar);
-                    shapeParF.Set(shapePar.GetSize());
-                    for(i=0;i<shapePar.GetSize();i++) shapeParF[i]=shapePar[i];
-                    geom->CreateMatrix(mod,lay,lad,det,kidet[lay-1],trans,rot);
-                    geom->SetTrans(mod,materix.GetTranslation());
-                    geom->SetRotMatrix(mod,materix.GetRotationMatrix());
-                   geom->GetGeomMatrix(mod)->SetPath(path.Data());
-                    switch (lay){
-                    case 1: case 2:
-                       if(!shapeDefined[kSPD]){
-                        geom->ReSetShape(kSPD,new AliITSgeomSPD425Short(
-                                shapeParF.GetSize(),shapeParF.GetArray()));
-                       shapeDefined[kSPD] = kTRUE;
-                    }break;
-                    case 3: case 4:
-                       if(!shapeDefined[kSDD]){
-                        geom->ReSetShape(kSDD,new AliITSgeomSDD256(
-                                shapeParF.GetSize(),shapeParF.GetArray()));
-                       shapeDefined[kSDD] = kTRUE;
-                    }break;
-                    case 5: case 6:
-                       if(!shapeDefined[kSSD]){
-                        geom->ReSetShape(kSSD,new AliITSgeomSSD75and275(
-                                shapeParF.GetSize(),shapeParF.GetArray()));
-                       shapeDefined[kSSD] = kTRUE;
-                    }break;
-                    default:{
-                    }break;
-                    } // end switch
-                    mod++;
-                } /// end for cp2
-            } // end for cp1
-        } // end for cp0
-    } // end for lay
-    return;
+    // PolyUrethane [C25-H42-N2-O6] - 07 Mar 10
+    zZ[2] =  7.0; aA[2] =  14.0067; // Nitrogen - From Root TGeoElementTable
+
+    wW[0] = 0.090724;//H
+    wW[2] = 0.060035;//N
+    wW[1] = 0.643513;//C
+    wW[3] = 0.205728;//O
+    wW[4] = 0.000000;//S
+    wW[5] = 0.000000;//F
+    wW[6] = 0.000000;//Sn
+    wW[7] = 0.000000;//Pb
+    wW[8] = 0.000000;//Cr
+    wW[9] = 0.000000;//Si
+    wW[10] = 0.000000;//Ni
+    wW[11] = 0.000000;//Ca
+
+    den = 1.158910;
+    AliMixture(67,"POLYURETHANE$",aA,zZ,den,+4,wW);
+    AliMedium(67,"POLYURETHANE$",67,0,ifield,fieldm,tmaxfd,stemax,
+             deemax,epsil,stmin);
+
+    //  POM (Polyoxymethylene = (CH2O)n ) - 02 May 10
+    zZ[2] =  8.0; aA[2] =  15.9994; // Oxigen
+
+    wW[0] = 0.067137;//H
+    wW[1] = 0.400016;//C
+    wW[2] = 0.532847;//O
+    wW[3] = 0.000000;//O
+    wW[4] = 0.000000;//S
+    wW[5] = 0.000000;//F
+    wW[6] = 0.000000;//Sn
+    wW[7] = 0.000000;//Pb
+    wW[8] = 0.000000;//Cr
+    wW[9] = 0.000000;//Si
+    wW[10] = 0.000000;//Ni
+    wW[11] = 0.000000;//Ca
+
+    den = 1.4200;
+    AliMixture(57,"POLYOXYMETHYLENE$",aA,zZ,den,+3,wW);
+    AliMedium(57,"POLYOXYMETHYLENE$",57,0,ifield,fieldm,tmaxfd,stemax,
+             deemax,epsil,stmin);
+
+
+    // Anticorodal (Aliminum alloy) - 08 nov 10
+    // A,Z from Root TGeoElementTable, W from Web sites
+    zZ[0] = 13.0; aA[0] =  26.9815; // Aluminium
+    zZ[1] = 29.0; aA[1] =  63.546 ; // Copper
+    zZ[2] = 26.0; aA[2] =  55.845 ; // Iron
+    zZ[3] = 25.0; aA[3] =  54.938 ; // Manganese
+    zZ[4] = 12.0; aA[4] =  24.305 ; // Magnesium
+    zZ[5] = 14.0; aA[5] =  28.0855; // Silicon
+    zZ[6] = 30.0; aA[6] =  65.39  ; // Zinc
+    zZ[7] = 24.0; aA[7] =  51.9961; // Chromium
+    zZ[8] = 22.0; aA[8] =  47.867 ; // Titanium
+
+    wW[1] = 0.001000;//Cu
+    wW[2] = 0.005000;//Fe
+    wW[3] = 0.007000;//Mn - mean value
+    wW[4] = 0.009000;//Mg - mean value
+    wW[5] = 0.001000;//Si - mean value
+    wW[6] = 0.002000;//Zn
+    wW[7] = 0.002500;//Cr
+    wW[8] = 0.001000;//Ti
+
+    Double_t totFrac = 0;
+    for (Int_t j=1; j<9; j++)
+      totFrac += wW[j];
+    wW[0] = 1. - totFrac;//Al - the remainder
+
+    den = 2.69;
+    AliMixture(93,"ANTICORODAL$",aA,zZ,den,+9,wW);
+    AliMedium(93,"ANTICORODAL$",93,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+
+    // Hokotol (another Aluminium alloy) - 08 nov 10
+    // A,Z from Root TGeoElementTable, W from Web sites
+    zZ[0] = 13.0; aA[0] =  26.9815; // Aluminium
+    zZ[1] = 29.0; aA[1] =  63.546 ; // Copper
+    zZ[2] = 26.0; aA[2] =  55.845 ; // Iron
+    zZ[3] = 25.0; aA[3] =  54.938 ; // Manganese
+    zZ[4] = 12.0; aA[4] =  24.305 ; // Magnesium
+    zZ[5] = 14.0; aA[5] =  28.0855; // Silicon
+    zZ[6] = 30.0; aA[6] =  65.39  ; // Zinc
+    zZ[7] = 24.0; aA[7] =  51.9961; // Chromium
+    zZ[8] = 22.0; aA[8] =  47.867 ; // Titanium
+    zZ[9] = 40.0; aA[9] =  91.224 ; // Zirconium
+
+    wW[1] = 0.020500;//Cu - mean value
+    wW[2] = 0.000300;//Fe
+    wW[3] = 0.022000;//Mn - mean value
+    wW[4] = 0.001000;//Mg - mean value
+    wW[5] = 0.002000;//Si - mean value
+    wW[6] = 0.066500;//Zn
+    wW[7] = 0.005000;//Cr
+    wW[8] = 0.000600;//Ti
+    wW[9] = 0.001650;//Zr - mean value
+
+    totFrac = 0;
+    for (Int_t j=1; j<10; j++)
+      totFrac += wW[j];
+    wW[0] = 1. - totFrac;//Al - the remainder
+
+    den = 2.69;
+    AliMixture(34,"HOKOTOL$",aA,zZ,den,+10,wW);
+    AliMedium(34,"HOKOTOL$",34,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
+    
 }
+
 //______________________________________________________________________
 void AliITSv11Hybrid::Init(){
     //     Initialise the ITS after it has been created.
@@ -5166,22 +6118,12 @@ void AliITSv11Hybrid::Init(){
 
     AliDebug(1,Form("Init: Major version %d Minor version %d",fMajorVersion,
                 fMinorVersion));
-    //
-    /*  obsolete initialization of AliITSgeom from external "det" file
-    if(fRead[0]=='\0') strncpy(fRead,fEuclidGeomDet,60);
-    if(fWrite[0]=='\0') strncpy(fWrite,fEuclidGeomDet,60);
-    AliITSgeom* geom = new AliITSgeom();
-    SetITSgeom(geom);
-    if(fGeomDetIn) GetITSgeom()->ReadNewFile(fRead);
-    else this->InitAliITSgeom();
-    */
     UpdateInternalGeometry();
     AliITS::Init();
-    if(fGeomDetOut) GetITSgeom()->WriteNewFile(fWrite);
 
-    //
     fIDMother = gMC->VolId("ITSV"); // ITS Mother Volume ID.
 }
+
 //______________________________________________________________________
 void AliITSv11Hybrid::SetDefaults(){
     // sets the default segmentation, response, digit and raw cluster classes
@@ -5192,92 +6134,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!");
@@ -5285,59 +6149,6 @@ void AliITSv11Hybrid::SetDefaults(){
     return;
 }
 //______________________________________________________________________
-void AliITSv11Hybrid::DrawModule() const{
-    //     Draw a shaded view of the FMD version 10.
-    // Inputs:
-    //   none.
-    // Outputs:
-    //   none.
-    // Return:
-    //   none.
-
-    // Set everything unseen
-    gMC->Gsatt("*", "seen", -1);
-    // 
-    // Set ALIC mother visible
-    gMC->Gsatt("ALIC","SEEN",0);
-    //
-    // Set the volumes visible
-    gMC->Gsatt("ITSD","SEEN",0);
-    gMC->Gsatt("ITS1","SEEN",1);
-    gMC->Gsatt("ITS2","SEEN",1);
-    gMC->Gsatt("ITS3","SEEN",1);
-    gMC->Gsatt("ITS4","SEEN",1);
-    gMC->Gsatt("ITS5","SEEN",1);
-    gMC->Gsatt("ITS6","SEEN",1);
-    //
-    gMC->Gsatt("IPCB","SEEN",1);
-    gMC->Gsatt("ICO2","SEEN",1);
-    gMC->Gsatt("ICER","SEEN",0);
-    gMC->Gsatt("ISI2","SEEN",0);
-    gMC->Gsatt("IPLA","SEEN",0);
-    gMC->Gsatt("ICO3","SEEN",0);
-    gMC->Gsatt("IEPX","SEEN",0);
-    gMC->Gsatt("ISI3","SEEN",1);
-    gMC->Gsatt("ISUP","SEEN",0);
-    gMC->Gsatt("ICHO","SEEN",0);
-    gMC->Gsatt("ICMO","SEEN",0);
-    gMC->Gsatt("ICMD","SEEN",0);
-    gMC->Gsatt("ICCO","SEEN",1);
-    gMC->Gsatt("ICCM","SEEN",0);
-    gMC->Gsatt("ITMD","SEEN",0);
-    gMC->Gsatt("ITTT","SEEN",1);
-    //
-    gMC->Gdopt("hide", "on");
-    gMC->Gdopt("shad", "on");
-    gMC->Gsatt("*", "fill", 7);
-    gMC->SetClipBox(".");
-    gMC->SetClipBox("*", 0, 300, -300, 300, -300, 300);
-    gMC->DefaultRange();
-    gMC->Gdraw("alic", 40, 30, 0, 11, 10, .07, .07);
-    gMC->Gdhead(1111, "Inner Tracking System Version 1");
-    gMC->Gdman(17, 6, "MAN");
-}
-
-//______________________________________________________________________
 void AliITSv11Hybrid::StepManager(){
     //    Called for every step in the ITS, then calles the AliITShit class
     // creator with the information to be recoreded about that hit.
@@ -5353,108 +6164,106 @@ void AliITSv11Hybrid::StepManager(){
     // Return:
     //   none.
 
-    static TLorentzVector position0;
-    static Int_t stat0=0;
-
-    if(!(this->IsActive())) {
-       return;
-    } // end if !Active volume.
-
+    if(!(this->IsActive())) return;
     if(!(gMC->TrackCharge())) return;
 
-    Int_t kk = 0, copy;
+    Int_t copy, lay = 0;
     Int_t id = gMC->CurrentVolID(copy);
-    while ((id != fIdSens[kk]) && (kk<6)) ++kk;
 
-    if((kk<6) && (gMC->IsTrackExiting())) {
-       copy = fTrackReferences->GetEntriesFast();
-       TClonesArray &lTR = *fTrackReferences;
-       // Fill TrackReference structure with this new TrackReference.
-       new(lTR[copy]) AliTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber());
+    Bool_t notSens = kFALSE;
+    while ((lay<fIdN)  && (notSens = id != fIdSens[lay])) ++lay;
+    if (notSens) return;
+
+    if(gMC->IsTrackExiting()) {
+       AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS);
     } // if Outer ITS mother Volume
 
-    Int_t   copy1, copy2;  
-    Int_t   vol[5];
-    TClonesArray &lhits = *fHits;
+    static TLorentzVector position, momentum; // Saves on calls to construtors
+    static AliITShit hit;// Saves on calls to constructors
 
+    TClonesArray &lhits = *(Hits());
+    Int_t   cpn0, cpn1, mod, status = 0;
+    //
     // Track status
-    vol[3] = 0;
-    vol[4] = 0;
-    if(gMC->IsTrackInside())      vol[3] +=  1;
-    if(gMC->IsTrackEntering())    vol[3] +=  2;
-    if(gMC->IsTrackExiting())     vol[3] +=  4;
-    if(gMC->IsTrackOut())         vol[3] +=  8;
-    if(gMC->IsTrackDisappeared()) vol[3] += 16;
-    if(gMC->IsTrackStop())        vol[3] += 32;
-    if(gMC->IsTrackAlive())       vol[3] += 64;
+    if(gMC->IsTrackInside())      status +=  1;
+    if(gMC->IsTrackEntering())    status +=  2;
+    if(gMC->IsTrackExiting())     status +=  4;
+    if(gMC->IsTrackOut())         status +=  8;
+    if(gMC->IsTrackDisappeared()) status += 16;
+    if(gMC->IsTrackStop())        status += 32;
+    if(gMC->IsTrackAlive())       status += 64;
 
-    // Fill hit structure.
-    vol[0] = kk+1;
-    Int_t sddModPos = 1, sddLaddPos = 2, sddIndShift = 0;
-    if (AliITSInitGeometry::SDDIsTGeoNative()) {
-      sddModPos     = 2;
-      sddLaddPos    = 3;
-      sddIndShift   = 1;
-    };
-
-    switch (kk) {
-
-    case 0: { // SPD
-
-      gMC->CurrentVolOffID(2,copy);  // det 1<->4
-      vol[1] = copy;
-      gMC->CurrentVolOffID(3,copy1); // lad 1<->2
-      gMC->CurrentVolOffID(4,copy2); // mod 1<->10
-      vol[2] = copy1+(copy2-1)*2; //# of ladders in one module  = 2
-    } break;
-
-    case 1: {
-
-      gMC->CurrentVolOffID(2,copy);  // 1<->4
-      vol[1] = copy;
-      gMC->CurrentVolOffID(3,copy1); // 1<->4
-      gMC->CurrentVolOffID(4,copy2); // 1<->10
-      vol[2] = copy1+(copy2-1)*4; //# of ladders in one module  = 4
-    } break;
-
-    case 2: // SDD
-    case 3: {
-
-      gMC->CurrentVolOffID(sddModPos, copy); // 1<->6  and 1<->8
-      vol[1] = copy + sddIndShift;
-      gMC->CurrentVolOffID(sddLaddPos, copy);// 1<->14 and 1<->22
-      vol[2] = copy + sddIndShift;
-    } break;
-
-    case 5: // SSD
-    case 4: {
-
-      gMC->CurrentVolOffID(1,copy); // 1<->22 and 1<->25
-      vol[1] = copy;
-      gMC->CurrentVolOffID(2,copy); // 1<->34 and 1<->38
-      vol[2] = copy;
-    } break;
-
-    default: return; // not an ITS volume?
-    }
+    //
+    // retrieve the indices with the volume path
+    //
+    switch (lay) {
+    case 0:case 1: // SPD
+      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;
+      if (AliITSInitGeometry::SDDIsTGeoNative()) {
+       gMC->CurrentVolOffID(2,cpn1);
+       gMC->CurrentVolOffID(3,cpn0);
+      } else {
+       gMC->CurrentVolOffID(1,cpn1);
+       gMC->CurrentVolOffID(2,cpn0);
+      };
+      break;
+    case 4:case 5: // SSD
+      copy = 1;
+      //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);
 
-    TLorentzVector position, momentum;
+    //
+    // Fill hit structure.
+    //
+    hit.SetModule(mod);
+    hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber());
     gMC->TrackPosition(position);
     gMC->TrackMomentum(momentum);
-    vol[4] = stat0;
-    if(gMC->IsTrackEntering()) {
-       position0 = position;
-       stat0 = vol[3];
-       return;
+    hit.SetPosition(position);
+    hit.SetTime(gMC->TrackTime());
+    hit.SetMomentum(momentum);
+    hit.SetStatus(status);
+    hit.SetEdep(gMC->Edep());
+    hit.SetShunt(GetIshunt());
+    if(gMC->IsTrackEntering()){
+        hit.SetStartPosition(position);
+        hit.SetStartTime(gMC->TrackTime());
+        hit.SetStartStatus(status);
+        return; // don't save entering hit.
     } // end if IsEntering
     // Fill hit structure with this new hit.
-    
-    new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,
-                                  gMC->Edep(),gMC->TrackTime(),position,
-                                  position0,momentum);
-
-    position0 = position;
-    stat0 = vol[3];
+    //Info("StepManager","Calling Copy Constructor");
+    new(lhits[fNhits++]) AliITShit(hit); // Use Copy Construtor.
+    // Save old position... for next hit.
+    hit.SetStartPosition(position);
+    hit.SetStartTime(gMC->TrackTime());
+    hit.SetStartStatus(status);
 
     return;
 }
+