]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Activated possibility of having dead zones around sensor. Example in the Config.C
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Apr 2013 18:11:17 +0000 (18:11 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Apr 2013 18:11:17 +0000 (18:11 +0000)
ITS/UPGRADE/AliITSUSegmentationPix.cxx
ITS/UPGRADE/AliITSUSegmentationPix.h
ITS/UPGRADE/testITSU/Config.C

index f9ba14acc34ff46c94ce3956da3651ad0ed27c6a..0d4d79619959ed51a83fbab20a5b6711cd2d0a19 100644 (file)
@@ -41,15 +41,19 @@ const char* AliITSUSegmentationPix::fgkSegmListName = "ITSUSegmentations";
 
 //_____________________________________________________________________________RS
 AliITSUSegmentationPix::AliITSUSegmentationPix(UInt_t id, int nchips,int ncol,int nrow,
-                                                  double pitchX,double pitchZ,
-                                                  double thickness,
-                                                  double pitchLftC,double pitchRgtC,
-                                                  double edgL,double edgR,double edgT,double edgB)
+                                                  float pitchX,float pitchZ,
+                                                  float thickness,
+                                                  float pitchLftC,float pitchRgtC,
+                                                  float edgL,float edgR,float edgT,float edgB)
 : AliITSsegmentation()
   ,fGuardLft(edgL)
   ,fGuardRgt(edgR)
   ,fGuardTop(edgT)
   ,fGuardBot(edgB)
+  ,fShiftXLoc(0.5*(edgT-edgB))
+  ,fShiftZLoc(0.5*(edgR-edgL))
+  ,fDxActive(0)
+  ,fDzActive(0)
   ,fPitchX(pitchX)
   ,fPitchZ(pitchZ)
   ,fPitchZLftCol(pitchLftC<0 ? pitchZ:pitchLftC)
@@ -67,9 +71,11 @@ AliITSUSegmentationPix::AliITSUSegmentationPix(UInt_t id, int nchips,int ncol,in
 {
   // Default constructor, sizes in cm
   if (nchips) SetUniqueID( AliITSUGeomTGeo::ComposeDetTypeID(id) );
-  fChipDZ = (fNColPerChip-2)*fPitchZ + fPitchZLftCol + fPitchZRgtCol;
-  SetDetSize( fNRow*fPitchX /*+fGuardTop+fGuardBot*/,
-             fNChips*fChipDZ /*+fGuardLft+fGuardRgt*/,
+  fChipDZ = (fNColPerChip-2)*fPitchZ;
+  fDxActive = fNRow*fPitchX;
+  fDzActive = fNChips*fChipDZ;
+  SetDetSize( fDxActive + fGuardTop+fGuardBot,
+             fDzActive + fGuardLft+fGuardRgt,
              thickness);
   //
 }
@@ -77,7 +83,7 @@ AliITSUSegmentationPix::AliITSUSegmentationPix(UInt_t id, int nchips,int ncol,in
 //_____________________________________________________________________________RS
 void AliITSUSegmentationPix::GetPadIxz(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const 
 {
-  //  Returns pixel coordinates (ix,iz) for given coordinates (x,z counted from col/row 0:0)
+  //  Returns pixel coordinates (ix,iz) for given coordinates (x,z counted from corner of col/row 0:0)
   //  expects x, z in cm.
   ix = int(x/fPitchX);     
   iz = int(Z2Col(z));
@@ -93,7 +99,7 @@ void AliITSUSegmentationPix::GetPadIxz(Float_t x,Float_t z,Int_t &ix,Int_t &iz)
 void AliITSUSegmentationPix::GetPadTxz(Float_t &x,Float_t &z) const
 {
   //  local transformation of real local coordinates (x,z)
-  //  expects x, z in cm
+  //  expects x, z in cm (wrt corner of col/row 0:0
   x /= fPitchX;
   z = Z2Col(z);
   //
@@ -103,7 +109,7 @@ void AliITSUSegmentationPix::GetPadTxz(Float_t &x,Float_t &z) const
 void AliITSUSegmentationPix::GetPadCxz(Int_t ix,Int_t iz,Float_t &x,Float_t&z) const
 {
   // Transform from pixel to real local coordinates
-  // returns x, z in cm. 
+  // returns x, z in cm. wrt corner of col/row 0:0
   x = Float_t((ix+0.5)*fPitchX);
   z = Col2Z(iz);
   //
@@ -123,7 +129,7 @@ Float_t AliITSUSegmentationPix::Z2Col(Float_t z) const
 //_____________________________________________________________________________RS
 Float_t AliITSUSegmentationPix::Col2Z(Int_t col) const 
 {
-  // convert column number (from 0) to Z coordinate
+  // convert column number (from 0) to Z coordinate wrt bottom left corner of the active matrix
   int nchip = col/fNColPerChip;
   col %= fNColPerChip;
   float z = nchip*fChipDZ;
@@ -151,6 +157,10 @@ AliITSUSegmentationPix& AliITSUSegmentationPix::operator=(const AliITSUSegmentat
   fPitchZLftCol = src.fPitchZLftCol;
   fPitchZ = src.fPitchZ;
   fPitchX = src.fPitchX;
+  fShiftXLoc = src.fShiftXLoc;
+  fShiftZLoc = src.fShiftZLoc;
+  fDxActive = src.fDxActive;
+  fDzActive = src.fDzActive;
   //
   fGuardBot = src.fGuardBot;
   fGuardTop = src.fGuardTop;
@@ -163,8 +173,8 @@ AliITSUSegmentationPix& AliITSUSegmentationPix::operator=(const AliITSUSegmentat
   delete fDiodShidtMatX; fDiodShidtMatX = 0;
   delete fDiodShidtMatZ; fDiodShidtMatZ = 0;
   if (fDiodShiftMatDim) {
-    fDiodShidtMatX = new Double32_t[fDiodShiftMatDim];
-    fDiodShidtMatZ = new Double32_t[fDiodShiftMatDim];
+    fDiodShidtMatX = new Float_t[fDiodShiftMatDim];
+    fDiodShidtMatZ = new Float_t[fDiodShiftMatDim];
     for (int i=fDiodShiftMatDim;i--;) {
       fDiodShidtMatX[i] = src.fDiodShidtMatX[i];
       fDiodShidtMatZ[i] = src.fDiodShidtMatZ[i];
@@ -181,6 +191,10 @@ AliITSUSegmentationPix::AliITSUSegmentationPix(const AliITSUSegmentationPix &src
   ,fGuardRgt(src.fGuardRgt)
   ,fGuardTop(src.fGuardTop)
   ,fGuardBot(src.fGuardBot)
+  ,fShiftXLoc(src.fShiftXLoc)
+  ,fShiftZLoc(src.fShiftZLoc)
+  ,fDxActive(src.fDxActive)
+  ,fDzActive(src.fDzActive)
   ,fPitchX(src.fPitchX)
   ,fPitchZ(src.fPitchZ)
   ,fPitchZLftCol(src.fPitchZLftCol)
@@ -198,8 +212,8 @@ AliITSUSegmentationPix::AliITSUSegmentationPix(const AliITSUSegmentationPix &src
 {
   // copy constructor
   if (fDiodShiftMatDim) {
-    fDiodShidtMatX = new Double32_t[fDiodShiftMatDim];
-    fDiodShidtMatZ = new Double32_t[fDiodShiftMatDim];
+    fDiodShidtMatX = new Float_t[fDiodShiftMatDim];
+    fDiodShidtMatZ = new Float_t[fDiodShiftMatDim];
     for (int i=fDiodShiftMatDim;i--;) {
       fDiodShidtMatX[i] = src.fDiodShidtMatX[i];
       fDiodShidtMatZ[i] = src.fDiodShidtMatZ[i];
@@ -271,11 +285,11 @@ Bool_t AliITSUSegmentationPix::LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &i
   //   kTRUE if point x,z is inside sensitive volume, kFALSE otherwise.
   //   A value of -1 for ix or iz indecates that this point is outside of the
   //   detector segmentation as defined.
-  x += 0.5*Dx();
-  z += 0.5*Dz();
+  x += 0.5*DxActive() + fShiftXLoc; // get X,Z wrt bottom/left corner
+  z += 0.5*DzActive() + fShiftZLoc;
   ix = iz = -1;
-  if(x<0 || x>Dx()) return kFALSE; // outside x range.
-  if(z<0 || z>Dz()) return kFALSE; // outside z range.
+  if(x<0 || x>DxActive()) return kFALSE; // outside x range.
+  if(z<0 || z>DzActive()) return kFALSE; // outside z range.
   ix = int(x/fPitchX);
   iz = Z2Col(z);
   return kTRUE; // Found ix and iz, return.
@@ -284,7 +298,7 @@ Bool_t AliITSUSegmentationPix::LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &i
 //______________________________________________________________________
 void AliITSUSegmentationPix::DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const
 {
-// Transformation from Detector cell coordiantes to Geant detector centerd 
+// Transformation from Detector cell coordiantes to Geant detector centere
 // local coordinates (cm).
 // Input:
 // Int_t    ix        detector x cell coordinate. Has the range 0<=ix<fNRow.
@@ -297,13 +311,12 @@ void AliITSUSegmentationPix::DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z)
 // If ix and or iz is outside of the segmentation range a value of -0.5*Dx()
 // or -0.5*Dz() is returned.
   //
-  x = -0.5*Dx(); // default value.
-  z = -0.5*Dz(); // default value.
-  // RS: to check: why we don't do strict check for [0:n)
+  x = -0.5*DxActive(); // default value.
+  z = -0.5*DzActive(); // default value.
   if(ix<0 || ix>=fNRow) {AliWarning(Form("Obtained row %d is not in range [%d:%d)",ix,0,fNRow)); return;} // outside of detector 
   if(iz<0 || iz>=fNCol) {AliWarning(Form("Obtained col %d is not in range [%d:%d)",ix,0,fNCol)); return;} // outside of detector 
-  x += (ix+0.5)*fPitchX;       // RS: we go to the center of the pad, i.e. + pitch/2, not to the boundary as in SPD
-  z += Col2Z(iz); 
+  x += (ix+0.5)*fPitchX - fShiftXLoc;       // RS: we go to the center of the pad, i.e. + pitch/2, not to the boundary as in SPD
+  z += Col2Z(iz)        - fShiftZLoc
   return; // Found x and z, return.
 }
 
@@ -324,8 +337,8 @@ void AliITSUSegmentationPix::CellBoundries(Int_t ix,Int_t iz,Double_t &xl,Double
   //                    respect to the center of the sensitive volulme.
   // Double_t   zu       detector local coordinate upper bounds z in cm with 
   //                    respect to the center of the sensitive volulme.
-  // If ix and or iz is outside of the segmentation range a value of -0.5*Dx()
-  // and -0.5*Dx() or -0.5*Dz() and -0.5*Dz() are returned.
+  // If ix and or iz is outside of the segmentation range a value of -0.5*DxActive()
+  // and -0.5*DxActive() or -0.5*DzActive() and -0.5*DzActive() are returned.
   Float_t x,z;
   DetToLocal(ix,iz,x,z);
   //
@@ -357,7 +370,7 @@ Int_t AliITSUSegmentationPix::GetChipFromChannel(Int_t, Int_t iz) const
 //______________________________________________________________________
 Int_t AliITSUSegmentationPix::GetChipFromLocal(Float_t, Float_t zloc) const 
 {
-  // returns chip number (in range 0-4) starting from local coordinates
+  // returns chip number (in range 0-4) starting from local Geant coordinates
   Int_t ix0,iz;
   if (!LocalToDet(0,zloc,ix0,iz)) {
     AliWarning("Bad local coordinate");
@@ -369,7 +382,7 @@ Int_t AliITSUSegmentationPix::GetChipFromLocal(Float_t, Float_t zloc) const
 //______________________________________________________________________
 Int_t AliITSUSegmentationPix::GetChipsInLocalWindow(Int_t* array, Float_t zmin, Float_t zmax, Float_t, Float_t) const 
 {
-  // returns the number of chips containing a road defined by given local coordinate limits
+  // returns the number of chips containing a road defined by given local Geant coordinate limits
   //
   if (zmin>zmax) {
     AliWarning("Bad coordinate limits: zmin>zmax!");
@@ -378,8 +391,8 @@ Int_t AliITSUSegmentationPix::GetChipsInLocalWindow(Int_t* array, Float_t zmin,
   //
   Int_t nChipInW = 0;
   //
-  Float_t zminDet = -0.5*Dz();
-  Float_t zmaxDet =  0.5*Dz();
+  Float_t zminDet = -0.5*DzActive()-fShiftZLoc;
+  Float_t zmaxDet =  0.5*DzActive()-fShiftZLoc;
   if(zmin<zminDet) zmin=zminDet;
   if(zmax>zmaxDet) zmax=zmaxDet;
 
@@ -485,7 +498,7 @@ void AliITSUSegmentationPix::LoadSegmentations(TObjArray* dest, const char* inpf
 }
 
 //______________________________________________________________________
-void AliITSUSegmentationPix::SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Double_t *shiftX, const Double_t *shiftZ)
+void AliITSUSegmentationPix::SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Float_t *shiftX, const Float_t *shiftZ)
 {
   // set matrix of periodic shifts of diod center. provided arrays must be in the format shift[nrow][ncol]
   if (fDiodShiftMatDim) {
@@ -498,8 +511,8 @@ void AliITSUSegmentationPix::SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Dou
   fDiodShiftMatNRow = nrow;
   fDiodShiftMatDim = fDiodShiftMatNCol*fDiodShiftMatNRow;
   if (fDiodShiftMatDim) {
-    fDiodShidtMatX = new Double32_t[fDiodShiftMatDim];
-    fDiodShidtMatZ = new Double32_t[fDiodShiftMatDim];    
+    fDiodShidtMatX = new Float_t[fDiodShiftMatDim];
+    fDiodShidtMatZ = new Float_t[fDiodShiftMatDim];    
     for (int ir=0;ir<fDiodShiftMatNRow;ir++) {
       for (int ic=0;ic<fDiodShiftMatNCol;ic++) {
        int cnt = ic+ir*fDiodShiftMatNCol;
@@ -510,18 +523,44 @@ void AliITSUSegmentationPix::SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Dou
   }
   
 }
+//______________________________________________________________________
+void AliITSUSegmentationPix::SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Double_t *shiftX, const Double_t *shiftZ)
+{
+  // set matrix of periodic shifts of diod center. provided arrays must be in the format shift[nrow][ncol]
+  if (fDiodShiftMatDim) {
+    delete fDiodShidtMatX;
+    delete fDiodShidtMatZ;
+    fDiodShidtMatX = fDiodShidtMatZ = 0;
+  }
+  //
+  fDiodShiftMatNCol = ncol;
+  fDiodShiftMatNRow = nrow;
+  fDiodShiftMatDim = fDiodShiftMatNCol*fDiodShiftMatNRow;
+  if (fDiodShiftMatDim) {
+    fDiodShidtMatX = new Float_t[fDiodShiftMatDim];
+    fDiodShidtMatZ = new Float_t[fDiodShiftMatDim];    
+    for (int ir=0;ir<fDiodShiftMatNRow;ir++) {
+      for (int ic=0;ic<fDiodShiftMatNCol;ic++) {
+       int cnt = ic+ir*fDiodShiftMatNCol;
+       fDiodShidtMatX[cnt] = shiftX ? shiftX[cnt] : 0.;
+       fDiodShidtMatZ[cnt] = shiftZ ? shiftZ[cnt] : 0.;
+      }
+    }
+  }
+}
 
 //______________________________________________________________________
 void AliITSUSegmentationPix::Print(Option_t* option) const
 {
   // print itself
   const double kmc=1e4;
-  printf("Segmentation %d: Size: DX: %.1f DZ: %.1f DY: %.1f | Pitch: X:%.1f Z:%.1f\n",
-        GetUniqueID(),kmc*Dx(),kmc*Dy(),kmc*Dz(),kmc*Dpx(1),kmc*Dpz(1));
+  printf("Segmentation %d: Active Size: DX: %.1f DZ: %.1f DY: %.1f | Pitch: X:%.1f Z:%.1f\n",
+        GetUniqueID(),kmc*DxActive(),kmc*Dy(),kmc*DzActive(),kmc*Dpx(1),kmc*Dpz(1));
+  printf("Passive Edges: Bottom: %.1f Right: %.1f Top: %.1f Left: %.1f -> DX: %.1f DZ: %.1f Shift: x:%.1f z:%.1f\n",
+        kmc*fGuardBot,kmc*fGuardRgt,kmc*fGuardTop,kmc*fGuardLft,kmc*Dx(),kmc*Dz(),kmc*fShiftXLoc,kmc*fShiftZLoc);
   printf("%d chips along Z: chip Ncol=%d Nrow=%d\n",fNChips, fNColPerChip,fNRow);
   if (Abs(fPitchZLftCol-fPitchZ)>1e-5) printf("Special left  column pitch: %.1f\n",fPitchZLftCol*kmc);
   if (Abs(fPitchZRgtCol-fPitchZ)>1e-5) printf("Special right column pitch: %.1f\n",fPitchZRgtCol*kmc);
-  printf("Guard-rings: Left: %.1f Right: %.1f Top: %.1f Bottom: %.1f\n",kmc*fGuardLft,kmc*fGuardRgt,kmc*fGuardTop,kmc*fGuardBot);
   //
   if (fDiodShiftMatDim) {
     double dx,dz=0;
index 93f098eaa1c692f50e05f3345202be5c87dc031c..5d98facbed1395be0b4de30f1857429348465f56 100644 (file)
@@ -11,10 +11,10 @@ class AliITSUSegmentationPix :
 public AliITSsegmentation {
  public:
   AliITSUSegmentationPix(UInt_t id=0, int nchips=0,int ncol=0,int nrow=0,
-                          double pitchX=0,double pitchZ=0,
-                          double thickness=0,
-                          double pitchLftC=-1,double pitchRgtC=-1,
-                          double edgL=0,double edgR=0,double edgT=0,double edgB=0);
+                        float pitchX=0,float pitchZ=0,
+                        float thickness=0,
+                        float pitchLftC=-1,float pitchRgtC=-1,
+                        float edgL=0,float edgR=0,float edgT=0,float edgB=0);
   
   //  AliITSUSegmentationPix(Option_t *opt="" );
   AliITSUSegmentationPix(const AliITSUSegmentationPix &source);
@@ -42,14 +42,22 @@ public AliITSsegmentation {
   //
   virtual Int_t    GetChipFromChannel(Int_t, Int_t iz) const;
   //
-  virtual Float_t Dpx(Int_t ix=0) const;
-  virtual Float_t Dpz(Int_t iz)   const;
+  virtual Float_t  Dpx(Int_t ix=0) const;
+  virtual Float_t  Dpz(Int_t iz)   const;
+  Float_t          DxActive()      const {return fDxActive;}
+  Float_t          DzActive()      const {return fDzActive;}
+  Float_t          GetShiftXLoc()  const {return fShiftXLoc;}
+  Float_t          GetShiftZLoc()  const {return fShiftZLoc;}
+  Float_t          GetGuardLft()   const {return fGuardLft;}
+  Float_t          GetGuardRgt()   const {return fGuardRgt;}
+  Float_t          GetGuardTop()   const {return fGuardTop;}
+  Float_t          GetGuardBot()   const {return fGuardBot;}
   //
-  Int_t   GetNRow()               const {return fNRow;}
-  Int_t   GetNCol()               const {return fNCol;}
+  Int_t            GetNRow()       const {return fNRow;}
+  Int_t            GetNCol()       const {return fNCol;}
   //
-  virtual Int_t                   Npx() const {return GetNRow();}
-  virtual Int_t                   Npz() const {return GetNCol();}
+  virtual Int_t    Npx()           const {return GetNRow();}
+  virtual Int_t    Npz()           const {return GetNCol();}
   //
   virtual void Neighbours(Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]) const;
   //
@@ -58,6 +66,7 @@ public AliITSsegmentation {
   //
   virtual Int_t                    GetDetTypeID()              const {return GetUniqueID();}
   //
+  void         SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Float_t *shiftX, const Float_t *shiftZ);
   void         SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Double_t *shiftX, const Double_t *shiftZ);
   void         GetDiodShift(Int_t row,Int_t col, Float_t &dx,Float_t &dz) const;
   void         GetDiodShift(Int_t row,Int_t col, Double_t &dx,Double_t &dz) const {float dxf,dzf; GetDiodShift(row,col,dxf,dzf); dx=dxf; dz=dzf; }
@@ -71,29 +80,33 @@ public AliITSsegmentation {
   Float_t Col2Z(Int_t col) const;
   //
  protected:
-    Double_t fGuardLft;        // left guard edge
-    Double_t fGuardRgt;        // right guard edge
-    Double_t fGuardTop;        // upper guard edge
-    Double_t fGuardBot;        // bottom guard edge
-    Double_t fPitchX;          // default pitch in X
-    Double_t fPitchZ;          // default pitch in Z
-    Double_t fPitchZLftCol;    // Z pitch of left column of each chip
-    Double_t fPitchZRgtCol;    // Z pitch of right column of each chip
-    Double_t fChipDZ;          // aux: chip size along Z
-    Int_t    fNChips;          // number of chips per module
-    Int_t    fNColPerChip;     // number of columns per chip
-    Int_t    fNRow;            // number of rows
-    Int_t    fNCol;            // number of columns (total)
+    Float_t fGuardLft;        // left guard edge
+    Float_t fGuardRgt;        // right guard edge
+    Float_t fGuardTop;        // upper guard edge
+    Float_t fGuardBot;        // bottom guard edge
+    Float_t fShiftXLoc;       // shift in local X of sensitive area wrt geometry center
+    Float_t fShiftZLoc;       // shift in local Z of sensitive area wrt geometry center
+    Float_t fDxActive;        // size of active area in X
+    Float_t fDzActive;        // size of active area in Z    
+    Float_t fPitchX;          // default pitch in X
+    Float_t fPitchZ;          // default pitch in Z
+    Float_t fPitchZLftCol;    // Z pitch of left column of each chip
+    Float_t fPitchZRgtCol;    // Z pitch of right column of each chip
+    Float_t fChipDZ;          // aux: chip size along Z
+    Int_t   fNChips;          // number of chips per module
+    Int_t   fNColPerChip;     // number of columns per chip
+    Int_t   fNRow;            // number of rows
+    Int_t   fNCol;            // number of columns (total)
     //
-    Int_t    fDiodShiftMatNCol; // periodicity of diod shift in columns
-    Int_t    fDiodShiftMatNRow; // periodicity of diod shift in rows
-    Int_t    fDiodShiftMatDim;  // dimension of diod shift matrix
-    Double32_t* fDiodShidtMatX; //[fDiodShiftMatDim] diod shift in X (along column), in fraction of X pitch
-    Double32_t* fDiodShidtMatZ; //[fDiodShiftMatDim] diod shift in Z (along row), in fraction of Z pitch
+    Int_t   fDiodShiftMatNCol; // periodicity of diod shift in columns
+    Int_t   fDiodShiftMatNRow; // periodicity of diod shift in rows
+    Int_t   fDiodShiftMatDim;  // dimension of diod shift matrix
+    Float_t* fDiodShidtMatX; //[fDiodShiftMatDim] diod shift in X (along column), in fraction of X pitch
+    Float_t* fDiodShidtMatZ; //[fDiodShiftMatDim] diod shift in Z (along row), in fraction of Z pitch
     //
     static const char* fgkSegmListName; // pattern for segmentations list name
     //
-  ClassDef(AliITSUSegmentationPix,2) //Segmentation class upgrade pixels 
+  ClassDef(AliITSUSegmentationPix,3) //Segmentation class upgrade pixels 
 
 };
 
index 2517aded0a6bbcf134f11ba2e084afe6122a2a0e..996caaa34659eecbd802bfddd830715382381528 100644 (file)
@@ -294,7 +294,9 @@ void Config()
       //
       const int kDiodShift_NCol_M32terP31 = 2;
       const int kDiodShift_NRow_M32terP31 = 1;
-
+      //
+      const double kReadOutEdge = 0.1;   // width of the readout edge (passive bottom)
+      const double kGuardRing   = 0.005; // width of passive area on left/right/top of the sensor
       const double kDiodShiftM32terP31X[ kDiodShift_NCol_M32terP31 ][ kDiodShift_NRow_M32terP31 ] = {0.30,-0.19};
       const double kDiodShiftM32terP31Z[ kDiodShift_NCol_M32terP31 ][ kDiodShift_NRow_M32terP31 ] = {0.0 , 0.0 };
       // create segmentations:
@@ -304,7 +306,13 @@ void Config()
                                                                350,  //835,  // nrows
                                                                33.e-4,  // default row pitch in cm
                                                                20.e-4,  // default col pitch in cm
-                                                               18.e-4  // sensor thickness in cm
+                                                               18.e-4,  // 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->SetDiodShiftMatrix(kDiodShift_NRow_M32terP31,kDiodShift_NCol_M32terP31, &kDiodShiftM32terP31X[0][0], &kDiodShiftM32terP31Z[0][0]);
       seg0->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
@@ -314,7 +322,13 @@ void Config()
                                                                700,//835,  // nrows
                                                                33.e-4,  // default row pitch in cm
                                                                20.e-4,  // default col pitch in cm
-                                                               18.e-4  // sensor thickness in cm
+                                                               18.e-4,  // 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
       seg1->SetDiodShiftMatrix(kDiodShift_NRow_M32terP31,kDiodShift_NCol_M32terP31, &kDiodShiftM32terP31X[0][0], &kDiodShiftM32terP31Z[0][0]);
       seg1->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
@@ -324,45 +338,47 @@ void Config()
                                                                700,//835,  // nrows
                                                                33.e-4,  // default row pitch in cm
                                                                20.e-4,  // default col pitch in cm
-                                                               18.e-4   // sensor thickness in cm
-                                                               );    // see AliITSUSegmentationPix.h for extra options
+                                                               18.e-4,   // 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      
       seg2->SetDiodShiftMatrix(kDiodShift_NRow_M32terP31,kDiodShift_NCol_M32terP31, &kDiodShiftM32terP31X[0][0], &kDiodShiftM32terP31Z[0][0]);
       seg2->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
       //
       int nmod,nlad; // modules per ladded, n ladders
       // sum of insensitive boarder around module (in cm)
-      Float_t deadX = 0.1;  // on each side
-      Float_t deadZ = 0.01; // on each side
       double tilt = 10.;     double thickLr = 0.05;
       //      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);
       AliITSUv11 *ITS  = new AliITSUv11("ITS Upgrade",7);
       nmod = 9;
       nlad = 12;
-      ITS->DefineLayerTurbo(0,0., 2.2,  nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
+      ITS->DefineLayerTurbo(0,0., 2.2,  nmod*seg0->Dz(), nlad, nmod, seg0->Dx(), tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
       nmod = 9;
       nlad = 16;
-      ITS->DefineLayerTurbo(1,0., 2.8,  nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
+      ITS->DefineLayerTurbo(1,0., 2.8,  nmod*seg0->Dz(), nlad, nmod, seg0->Dx(), tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
       nmod = 9;
       nlad = 20;
-      ITS->DefineLayerTurbo(2,0., 3.6,  nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
+      ITS->DefineLayerTurbo(2,0., 3.6,  nmod*seg0->Dz(), nlad, nmod, seg0->Dx(), tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
       nmod = 29;
       nlad = 48;
-      ITS->DefineLayerTurbo(3,0., 20.0, nmod*(seg1->Dz()+deadZ*2), nlad, nmod, seg1->Dx()+deadX*2, tilt, thickLr, seg1->Dy(), seg1->GetDetTypeID());
+      ITS->DefineLayerTurbo(3,0., 20.0, nmod*seg1->Dz(), nlad, nmod, seg1->Dx(), tilt, thickLr, seg1->Dy(), seg1->GetDetTypeID());
       nmod = 29;
       nlad = 48;
-      ITS->DefineLayerTurbo(4,0., 22.0, nmod*(seg1->Dz()+deadZ*2), nlad, nmod, seg1->Dx()+deadX*2, tilt, thickLr, seg1->Dy(), seg1->GetDetTypeID());
+      ITS->DefineLayerTurbo(4,0., 22.0, nmod*seg1->Dz(), nlad, nmod, seg1->Dx(), tilt, thickLr, seg1->Dy(), seg1->GetDetTypeID());
       nmod = 50;
       nlad = 94;
-      ITS->DefineLayerTurbo(5,0., 40.0, nmod*(seg2->Dz()+deadZ*2), nlad, nmod, seg2->Dx()+deadX*2, tilt, thickLr, seg2->Dy(), seg2->GetDetTypeID()); //41 creates ovl!
+      ITS->DefineLayerTurbo(5,0., 40.0, nmod*seg2->Dz(), nlad, nmod, seg2->Dx(), tilt, thickLr, seg2->Dy(), seg2->GetDetTypeID()); //41 creates ovl!
       nmod = 50;
       nlad = 94;
-      ITS->DefineLayerTurbo(6,0., 43.0, nmod*(seg2->Dz()+deadZ*2), nlad, nmod, seg2->Dx()+deadX*2, tilt, thickLr, seg2->Dy(), seg2->GetDetTypeID()); 
+      ITS->DefineLayerTurbo(6,0., 43.0, nmod*seg2->Dz(), nlad, nmod, seg2->Dx(), tilt, thickLr, seg2->Dy(), seg2->GetDetTypeID()); 
       //
-
     }
  
-
   if (iTPC)
     {
       //============================ TPC parameters ===================