]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Made the declaration of AliITSUModel_t member of AliITSUv0.
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Jun 2013 10:30:05 +0000 (10:30 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Jun 2013 10:30:05 +0000 (10:30 +0000)
Made kModelDummy default model for the AliITSUv0Layer
Extracted CreateITSU to separated macro CreateITSU.C which Config.C
runs as an external root macro.

ITS/UPGRADE/AliITSUv0.h
ITS/UPGRADE/AliITSUv0Layer.cxx
ITS/UPGRADE/AliITSUv0Layer.h
ITS/UPGRADE/testITSU/Config.C
ITS/UPGRADE/testITSU/CreateITSU.C [new file with mode: 0644]

index cb1cedef25a942388f894a98dffe1e277c795575..570674df5dae93ff0647ad67f9af2cff7721c4d1 100644 (file)
 
 #include "AliITSU.h"
 
-typedef enum {
-  kModelDummy=0,
-  kModel0=1,
-  kModel1=2, 
-  kModel21=3,
-  kModel22=4,
-  kModel3=5,
-} AliITSUModel_t;
-
-
 class  AliITSUv0Layer;
 //class  AliITSv11GeomBeamPipe;
 class  TGeoVolume;
@@ -35,6 +25,18 @@ class  TGeoVolumeAssembly;
 class AliITSUv0 : public AliITSU {
 
  public:
+
+
+  typedef enum {
+    kModelDummy=0,
+    kModel0=1,
+    kModel1=2, 
+    kModel21=3,
+    kModel22=4,
+    kModel3=5
+  } AliITSUModel_t;
+  
+
   AliITSUv0();
   AliITSUv0(const char *title, const Int_t nlay);
   virtual       ~AliITSUv0() ;
index de20a75ce19c33bab9c17d3e70f781321adbdf26..3c6e0164d5a10274a448d645d962b73c260330fd 100644 (file)
@@ -67,7 +67,7 @@ AliITSUv0Layer::AliITSUv0Layer():
   fDetTypeID(0),\r
   fIsTurbo(0),\r
   fBuildLevel(0),\r
-  fStaveModel(kModel0)\r
+  fStaveModel(AliITSUv0::kModelDummy)\r
 {\r
   //\r
   // Standard constructor\r
@@ -90,7 +90,7 @@ AliITSUv0Layer::AliITSUv0Layer(Int_t debug):
   fDetTypeID(0),\r
   fIsTurbo(0),\r
   fBuildLevel(0),\r
-  fStaveModel(kModel0)\r
+  fStaveModel(AliITSUv0::kModelDummy)\r
 {\r
   //\r
   // Constructor setting debugging level\r
@@ -113,7 +113,7 @@ AliITSUv0Layer::AliITSUv0Layer(Int_t lay, Int_t debug):
   fDetTypeID(0),\r
   fIsTurbo(0),\r
   fBuildLevel(0),\r
-  fStaveModel(kModel0)\r
+  fStaveModel(AliITSUv0::kModelDummy)\r
 {\r
   //\r
   // Constructor setting layer number and debugging level\r
@@ -136,7 +136,7 @@ AliITSUv0Layer::AliITSUv0Layer(Int_t lay, Bool_t turbo, Int_t debug):
   fDetTypeID(0),\r
   fIsTurbo(turbo),\r
   fBuildLevel(0),\r
-  fStaveModel(kModel0)\r
+  fStaveModel(AliITSUv0::kModelDummy)\r
 {\r
   //\r
   // Constructor setting layer number and debugging level\r
@@ -455,22 +455,22 @@ TGeoVolume* AliITSUv0Layer::CreateStaveStruct(const Double_t xlad,
   TGeoVolume *mechLaddVol = 0;\r
 \r
   switch (fStaveModel) {\r
-    case kModelDummy:\r
+    case AliITSUv0::kModelDummy:\r
       mechLaddVol = CreateStaveModelDummy(xlad,zlad,mgr);\r
       break;\r
-    case kModel0:\r
+    case AliITSUv0::kModel0:\r
       mechLaddVol = CreateStaveModel0(xlad,zlad,mgr);\r
       break;\r
-    case kModel1:\r
+    case AliITSUv0::kModel1:\r
       mechLaddVol = CreateStaveModel1(xlad,zlad,mgr);\r
       break;\r
-    case kModel21:\r
+    case AliITSUv0::kModel21:\r
       mechLaddVol = CreateStaveModel21(xlad,zlad,mgr);\r
       break;\r
-    case kModel22:\r
+    case AliITSUv0::kModel22:\r
       mechLaddVol = CreateStaveModel22(xlad,zlad,mgr);\r
       break;\r
-    case kModel3:\r
+    case AliITSUv0::kModel3:\r
       mechLaddVol = CreateStaveModel3(xlad,zlad,mgr);\r
       break;\r
     default:\r
index 32132745371543e97f016de5dab7901f59909440..f76e777aaaa117069273b63a9183f1706abe6975 100644 (file)
@@ -48,7 +48,7 @@ class AliITSUv0Layer : public AliITSv11Geometry {
     Double_t  GetPhi0()        const {return fPhi0;};
     Double_t  GetZLength()     const {return fZLength;};
     Int_t     GetDetType()     const {return fDetTypeID;}
-    AliITSUModel_t GetStaveModel() const {return fStaveModel;}
+    AliITSUv0::AliITSUModel_t GetStaveModel() const {return fStaveModel;}
     //
     void      SetLadderThick(Double_t t)    {fLadderThick = t;};
     void      SetLadderTilt(Double_t t);
@@ -61,7 +61,7 @@ class AliITSUv0Layer : public AliITSv11Geometry {
     void      SetZLength(Double_t z)        {fZLength   = z;};
     void      SetDetType(Int_t tp)          {fDetTypeID = tp;}
     void      SetBuildLevel(Int_t buildLevel){fBuildLevel=buildLevel;}
-    void      SetStaveModel(AliITSUModel_t model) {fStaveModel=model;}
+    void      SetStaveModel(AliITSUv0::AliITSUModel_t model) {fStaveModel=model;}
     virtual void CreateLayer(TGeoVolume *moth);
 
   private:
@@ -97,7 +97,7 @@ class AliITSUv0Layer : public AliITSv11Geometry {
     Bool_t    fIsTurbo;     // True if this layer is a "turbo" layer
     Int_t     fBuildLevel;  // Used for material studies
 
-    AliITSUModel_t fStaveModel; // The stave model
+    AliITSUv0::AliITSUModel_t fStaveModel; // The stave model
 
     // Parameters for the Upgrade geometry
 
index 49680afdda8472f0b8e6fea95e5dfffc006c2358..afd1490dbc445ce298ce4ce491a71ff4366d7c7d 100644 (file)
@@ -48,7 +48,7 @@
 #include <TVirtualMagField.h>
 #endif
 
-Int_t generatorFlag = 1;
+Int_t generatorFlag = 0;
 
 /* $Id: Config.C 47147 2011-02-07 11:46:44Z amastros $ */
 enum PprTrigConf_t
@@ -60,16 +60,6 @@ const char * pprTrigConfName[] = {
   "p-p","Pb-Pb"
 };
 
-enum AliITSUModel_t {
-  kModelDummy,
-  kModel0,
-  kModel1,
-  kModel21,
-  kModel22  
-};
-
-
-void CreateITSU();
 
 Float_t EtaToTheta(Float_t arg);
 
@@ -351,7 +341,8 @@ void Config()
   if (iITS)
     {
       //=================== ITS parameters ============================
-      CreateITSU();
+      gROOT->ProcessLine(".x CreateITSU.C");
+      //    CreateITSU();
 
     }
  
@@ -460,164 +451,3 @@ Float_t EtaToTheta(Float_t arg){
   return (180./TMath::Pi())*2.*atan(exp(-arg));
 }
 
-//---------------------------------------
-void CreateITSU()
-{
-  // build ITS upgrade detector
-  // sensitive area 13x15mm (X,Z) with 20x20 micron pitch, 2mm dead zone on readout side and 50 micron guardring
-  const double kSensThick = 18e-4;
-  const double kPitchX = 20e-4;
-  const double kPitchZ = 20e-4;
-  const int    kNRow   = 650; 
-  const int    kNCol   = 750;
-  const int    kNChips = 2;
-  const double kLrTick03 = 195e-4;   // -> effective thickness for ~0.3%X layers
-  const double kLrTick08 = 600e-4;   // -> effective thickness for ~0.8%X layers
-  //
-  const double kReadOutEdge = 0.2;   // width of the readout edge (passive bottom)
-  const double kGuardRing   = 50e-4; // width of passive area on left/right/top of the sensor
-  // create segmentations:
-  AliITSUSegmentationPix* seg0 = new AliITSUSegmentationPix(0,        // segID (0:9)
-                                                           kNChips,  // chips per module
-                                                           kNChips*kNCol,    // ncols (total for module)
-                                                           kNRow,    // nrows
-                                                           kPitchX,  // default row pitch in cm
-                                                           kPitchZ,  // default col pitch in cm
-                                                           kSensThick,  // sensor thickness in cm
-                                                           -1,     // no special left col between chips
-                                                           -1,     // no special right col between chips
-                                                           kGuardRing, // left
-                                                           kGuardRing, // right
-                                                           kGuardRing, // top
-                                                           kReadOutEdge  // bottom
-                                                           );    // see AliITSUSegmentationPix.h for extra options
-  seg0->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
-  //
-  AliITSUSegmentationPix* seg1 = new AliITSUSegmentationPix(1,        // segID (0:9)
-                                                           kNChips,  // chips per module
-                                                           kNChips*kNCol,    // ncols (total for module)
-                                                           2*kNRow,    // nrows for oute layers
-                                                           kPitchX,  // default row pitch in cm
-                                                           kPitchZ,  // default col pitch in cm
-                                                           kSensThick,  // sensor thickness in cm
-                                                           -1,     // no special left col between chips
-                                                           -1,     // no special right col between chips
-                                                           kGuardRing, // left
-                                                           kGuardRing, // right
-                                                           kReadOutEdge, // top   !!! readout from both sides
-                                                           kReadOutEdge  // bottom
-                                                           );    // see AliITSUSegmentationPix.h for extra options
-  seg1->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
-  //
-  seg0->Print();
-  seg1->Print();
-  //
-  const double kMinOvl = 0.005; // require active zones overlap
-  const double kPhi0 = 0.;  // az.angle of 1st stave
-  const double kTilt = 10.; // tilt in degrees
-  double dzLr,rLr,ovlA,xActProj;
-  AliITSUSegmentationPix* seg=0;
-  int nStaveLr,nModPerStaveLr,idLr;
-  //      virtual void   DefineLayerTurbo(const Int_t nlay, const Double_t r,  const Double_t zlen, const Int_t nladd,   const Int_t nmod, const Double_t width,
-  //                             const Double_t tilt,   const Double_t lthick = 0.,    const Double_t dthick = 0.,   const UInt_t detType=0);
-  AliITSUv0 *ITS  = new AliITSUv0("ITS Upgrade",7);
-  ITS->SetStaveModel(kModel22);
-  //
-  // INNER LAYERS
-  idLr = 0;
-  rLr = 2.2;
-  dzLr = 2*11.2;   // min Z to cover
-  seg = seg0;
-  nModPerStaveLr = 1+dzLr/seg->Dz();
-  ovlA = -1;
-  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
-  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
-  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
-  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f\% (%d micron)\n",
-        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
-  //
-  idLr = 1;
-  rLr = 2.8;
-  dzLr = 2*12.1;
-  seg = seg0;
-  nModPerStaveLr = 1+dzLr/seg->Dz();
-  ovlA = -1;
-  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
-  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
-  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
-  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f\% (%d micron)\n",
-        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
-  //
-  idLr = 2;
-  rLr = 3.6;
-  dzLr = 2*13.4;
-  seg = seg0;
-  nModPerStaveLr = 1+dzLr/seg->Dz();
-  ovlA = -1;
-  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
-  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
-  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
-  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f\% (%d micron)\n",
-        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
-  //
-  // 
-  // MIDDLE LAYERS (double side readout sensors)
-  idLr = 3;
-  rLr = 20.0;
-  dzLr = 2*39.0;
-  seg = seg1;
-  nModPerStaveLr = 1+dzLr/seg->Dz();
-  ovlA = -1;
-  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
-  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
-  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
-  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f\% (%d micron)\n",
-        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
-  //
-  idLr = 4;
-  rLr = 22.0;
-  dzLr = 2*41.8;
-  seg = seg1;
-  nModPerStaveLr = 1+dzLr/seg->Dz();
-  ovlA = -1;
-  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
-  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
-  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
-  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f\% (%d micron)\n",
-        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
-  //
-  // 
-  // OUTER LAYERS (double side readout sensors)
-  idLr = 5;
-  rLr = 40.0;
-  dzLr = 2*71.2;
-  seg = seg1;
-  nModPerStaveLr = 1+dzLr/seg->Dz();
-  ovlA = -1;
-  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
-  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
-  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
-  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f\% (%d micron)\n",
-        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
-  //
-  idLr = 6;
-  rLr = 43.0;
-  dzLr = 2*74.3;
-  seg = seg1;
-  nModPerStaveLr = 1+dzLr/seg->Dz();
-  ovlA = -1;
-  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
-  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
-  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
-  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f\% (%d micron)\n",
-        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
-  //
-  
-}
diff --git a/ITS/UPGRADE/testITSU/CreateITSU.C b/ITS/UPGRADE/testITSU/CreateITSU.C
new file mode 100644 (file)
index 0000000..d64829e
--- /dev/null
@@ -0,0 +1,170 @@
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TSystem.h>
+#endif
+
+//---------------------------------------
+void CreateITSU()
+{
+  //
+  gSystem->Load("libITSUpgradeBase.so");
+  gSystem->Load("libITSUpgradeSim.so");
+
+
+  // build ITS upgrade detector
+  // sensitive area 13x15mm (X,Z) with 20x20 micron pitch, 2mm dead zone on readout side and 50 micron guardring
+  const double kSensThick = 18e-4;
+  const double kPitchX = 20e-4;
+  const double kPitchZ = 20e-4;
+  const int    kNRow   = 650; 
+  const int    kNCol   = 750;
+  const int    kNChips = 2;
+  const double kLrTick03 = 195e-4;   // -> effective thickness for ~0.3%X layers
+  const double kLrTick08 = 600e-4;   // -> effective thickness for ~0.8%X layers
+  //
+  const double kReadOutEdge = 0.2;   // width of the readout edge (passive bottom)
+  const double kGuardRing   = 50e-4; // width of passive area on left/right/top of the sensor
+  // create segmentations:
+  AliITSUSegmentationPix* seg0 = new AliITSUSegmentationPix(0,        // segID (0:9)
+                                                           kNChips,  // chips per module
+                                                           kNChips*kNCol,    // ncols (total for module)
+                                                           kNRow,    // nrows
+                                                           kPitchX,  // default row pitch in cm
+                                                           kPitchZ,  // default col pitch in cm
+                                                           kSensThick,  // sensor thickness in cm
+                                                           -1,     // no special left col between chips
+                                                           -1,     // no special right col between chips
+                                                           kGuardRing, // left
+                                                           kGuardRing, // right
+                                                           kGuardRing, // top
+                                                           kReadOutEdge  // bottom
+                                                           );    // see AliITSUSegmentationPix.h for extra options
+  seg0->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
+  //
+  AliITSUSegmentationPix* seg1 = new AliITSUSegmentationPix(1,        // segID (0:9)
+                                                           kNChips,  // chips per module
+                                                           kNChips*kNCol,    // ncols (total for module)
+                                                           2*kNRow,    // nrows for oute layers
+                                                           kPitchX,  // default row pitch in cm
+                                                           kPitchZ,  // default col pitch in cm
+                                                           kSensThick,  // sensor thickness in cm
+                                                           -1,     // no special left col between chips
+                                                           -1,     // no special right col between chips
+                                                           kGuardRing, // left
+                                                           kGuardRing, // right
+                                                           kReadOutEdge, // top   !!! readout from both sides
+                                                           kReadOutEdge  // bottom
+                                                           );    // see AliITSUSegmentationPix.h for extra options
+  seg1->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
+  //
+  seg0->Print();
+  seg1->Print();
+  //
+  const double kMinOvl = 0.005; // require active zones overlap
+  const double kPhi0 = 0.;  // az.angle of 1st stave
+  const double kTilt = 10.; // tilt in degrees
+  double dzLr,rLr,ovlA,xActProj;
+  AliITSUSegmentationPix* seg=0;
+  int nStaveLr,nModPerStaveLr,idLr;
+  //      virtual void   DefineLayerTurbo(const Int_t nlay, const Double_t r,  const Double_t zlen, const Int_t nladd,   const Int_t nmod, const Double_t width,
+  //                             const Double_t tilt,   const Double_t lthick = 0.,    const Double_t dthick = 0.,   const UInt_t detType=0);
+  AliITSUv0 *ITS  = new AliITSUv0("ITS Upgrade",7);
+  ITS->SetStaveModel(AliITSUv0::kModel22);
+  //
+  // INNER LAYERS
+  idLr = 0;
+  rLr = 2.2;
+  dzLr = 2*11.2;   // min Z to cover
+  seg = seg0;
+  nModPerStaveLr = 1+dzLr/seg->Dz();
+  ovlA = -1;
+  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
+  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
+  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
+  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f (%d micron)\n",
+        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1.e4));
+  //
+  idLr = 1;
+  rLr = 2.8;
+  dzLr = 2*12.1;
+  seg = seg0;
+  nModPerStaveLr = 1+dzLr/seg->Dz();
+  ovlA = -1;
+  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
+  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
+  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
+  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f (%d micron)\n",
+        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
+  //
+  idLr = 2;
+  rLr = 3.6;
+  dzLr = 2*13.4;
+  seg = seg0;
+  nModPerStaveLr = 1+dzLr/seg->Dz();
+  ovlA = -1;
+  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
+  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
+  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
+  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f (%d micron)\n",
+        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
+  //
+  // 
+  // MIDDLE LAYERS (double side readout sensors)
+  idLr = 3;
+  rLr = 20.0;
+  dzLr = 2*39.0;
+  seg = seg1;
+  nModPerStaveLr = 1+dzLr/seg->Dz();
+  ovlA = -1;
+  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
+  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
+  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
+  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f (%d micron)\n",
+        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
+  //
+  idLr = 4;
+  rLr = 22.0;
+  dzLr = 2*41.8;
+  seg = seg1;
+  nModPerStaveLr = 1+dzLr/seg->Dz();
+  ovlA = -1;
+  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
+  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
+  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
+  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f (%d micron)\n",
+        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
+  //
+  // 
+  // OUTER LAYERS (double side readout sensors)
+  idLr = 5;
+  rLr = 40.0;
+  dzLr = 2*71.2;
+  seg = seg1;
+  nModPerStaveLr = 1+dzLr/seg->Dz();
+  ovlA = -1;
+  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
+  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
+  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
+  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f (%d micron)\n",
+        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
+  //
+  idLr = 6;
+  rLr = 43.0;
+  dzLr = 2*74.3;
+  seg = seg1;
+  nModPerStaveLr = 1+dzLr/seg->Dz();
+  ovlA = -1;
+  xActProj = seg->DxActive()*TMath::Cos(kTilt*TMath::DegToRad()); // effective r-phi coverage by single stave
+  nStaveLr = 1 + rLr*TMath::Pi()*2/xActProj;
+  do { ovlA = 1.-rLr*TMath::Pi()*2/nStaveLr/xActProj; } while ( kMinOvl>=0 && ovlA<kMinOvl && nStaveLr++ );            
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
+  printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d -> Active Overlap:%.1f (%d micron)\n",
+        idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr,ovlA*100,int(ovlA*xActProj*1e4));
+  //
+  
+}