#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;
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() ;
fDetTypeID(0),\r
fIsTurbo(0),\r
fBuildLevel(0),\r
- fStaveModel(kModel0)\r
+ fStaveModel(AliITSUv0::kModelDummy)\r
{\r
//\r
// Standard constructor\r
fDetTypeID(0),\r
fIsTurbo(0),\r
fBuildLevel(0),\r
- fStaveModel(kModel0)\r
+ fStaveModel(AliITSUv0::kModelDummy)\r
{\r
//\r
// Constructor setting debugging level\r
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
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
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
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);
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:
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
#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
"p-p","Pb-Pb"
};
-enum AliITSUModel_t {
- kModelDummy,
- kModel0,
- kModel1,
- kModel21,
- kModel22
-};
-
-
-void CreateITSU();
Float_t EtaToTheta(Float_t arg);
if (iITS)
{
//=================== ITS parameters ============================
- CreateITSU();
+ gROOT->ProcessLine(".x CreateITSU.C");
+ // CreateITSU();
}
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));
- //
-
-}
--- /dev/null
+#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));
+ //
+
+}