]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
1) Diod shift is made property of the AliITSUSegmentationPix, provided via
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Apr 2013 21:59:42 +0000 (21:59 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Apr 2013 21:59:42 +0000 (21:59 +0000)
special matrix, see Config.C of this revision.
2) The shift is automatically corrected for during the clusterization.
3) Added to AliITSUClusterizer (via recoparam) layer-wise option
to allow clusters made of pixels with common corners (but not sides), in order
to decrease the cluster splitting, see testITSU/MakeITSRecoParam.C of this rev.
4) testITSU/itsupcdb.tar.gz is updated with recoparam obj. allowing diagonal
clusters on all layers

14 files changed:
ITS/UPGRADE/AliITSUClusterizer.cxx
ITS/UPGRADE/AliITSUClusterizer.h
ITS/UPGRADE/AliITSUHit.cxx
ITS/UPGRADE/AliITSUHit.h
ITS/UPGRADE/AliITSURecoParam.cxx
ITS/UPGRADE/AliITSURecoParam.h
ITS/UPGRADE/AliITSUReconstructor.cxx
ITS/UPGRADE/AliITSUSegmentationPix.cxx
ITS/UPGRADE/AliITSUSegmentationPix.h
ITS/UPGRADE/AliITSUSimulationPix.cxx
ITS/UPGRADE/AliITSUSimulationPix.h
ITS/UPGRADE/testITSU/Config.C
ITS/UPGRADE/testITSU/MakeITSRecoParam.C
ITS/UPGRADE/testITSU/itsupcdb.tar.gz

index a6458032d84cfb94ccac372cf65bc9601bcc75d1..e30b11b3cc76f120450302e9a6cc2a269ff95311 100644 (file)
@@ -20,6 +20,7 @@ ClassImp(AliITSUClusterizer)
 //______________________________________________________________________________
 AliITSUClusterizer::AliITSUClusterizer(Int_t initNRow) 
 :  fVolID(-1)
+  ,fAllowDiagonalClusterization(kFALSE)
   ,fSegm(0)
   ,fRecoParam(0)
   ,fInputDigits(0)
@@ -160,7 +161,12 @@ void AliITSUClusterizer::Transform(AliITSUClusterPix *cluster,AliITSUClusterizer
   int charge=0;
   for (AliITSUClusterizerClusterDigit *idigit=cand->fFirstDigit;idigit;idigit=idigit->fNext) {
     AliITSdigit* dig = idigit->fDigit;
-    fSegm->DetToLocal(dig->GetCoord2(),dig->GetCoord1(),cx,cz);
+    fSegm->DetToLocal(dig->GetCoord2(),dig->GetCoord1(),cx,cz); // center of pixel
+    //
+    // account for possible diod shift
+    double ddx,ddz, dx=fSegm->Dpx(dig->GetCoord2()), dz=fSegm->Dpz(dig->GetCoord1());
+    fSegm->GetDiodShift(dig->GetCoord2(),dig->GetCoord1(),ddx,ddz);
+    //
     charge += dig->GetSignal();
     x += cx;
     z += cz;
@@ -168,8 +174,10 @@ void AliITSUClusterizer::Transform(AliITSUClusterPix *cluster,AliITSUClusterizer
     if (cx>xmx) xmx=cx;
     if (cz<zmn) zmn=cz;
     if (cz>zmx) zmx=cz;
-    px += fSegm->Dpx(dig->GetCoord2());
-    pz += fSegm->Dpz(dig->GetCoord1());
+    x += ddx*dx;
+    z += ddz*dz;
+    px += dx;
+    pz += dz;
     //
     if (!fRawData) {
       for(Int_t dlab=0;dlab<maxLbinDigit;dlab++){
@@ -277,7 +285,8 @@ void AliITSUClusterizer::Clusterize()
       lastV=iDigit->fDigit->GetCoord2(); 
     }
     // skip cluster parts before this digit
-    while (iPrevRow && iPrevRow->fUEnd<iDigit->fDigit->GetCoord1()) {
+    int limCol = iDigit->fDigit->GetCoord1()-fAllowDiagonalClusterization;
+    while (iPrevRow && iPrevRow->fUEnd < limCol) {
       iPrevRow=iPrevRow->fNextInRow;
     }
     // find the longest continous line of digits [iDigit,pDigit]=[iDigit,jDigit)
@@ -295,7 +304,7 @@ void AliITSUClusterizer::Clusterize()
       AttachDigitToCand(cand,pDigit);
       ++lastU1;
     }
-    --lastU1;
+    if (!fAllowDiagonalClusterization) --lastU1;
     AliITSUClusterizerClusterPart *part=AllocPart();
     part->fUBegin=lastU ;
     part->fUEnd  =lastU1;
index a25e8303867b02bc88405832eb6a5d044017f067..5a6b11623a656dfc44097553612136b29d728f09 100644 (file)
@@ -25,6 +25,7 @@ class AliITSUClusterizer : public TObject
   void SetLayerID(Int_t id)                            {fLayerID = id;}\r
   void SetVolID(Int_t id)                              {fVolID = id;}\r
   void SetNRow(Int_t nrow);\r
+  void SetAllowDiagonalClusterization(Bool_t v)        {fAllowDiagonalClusterization = v;}\r
   void PrepareLorentzAngleCorrection(Double_t bz);\r
   //\r
   // interface methods\r
@@ -81,6 +82,8 @@ class AliITSUClusterizer : public TObject
   AliCluster*                     NextCluster() {return (AliCluster*)fOutputClusters->New(fOutputClusters->GetEntriesFast());}\r
   \r
   // modifiers\r
+  void SetAllowDiagonalClusterization();\r
+\r
   void AttachDigitToCand(AliITSUClusterizerClusterCand *cand,AliITSUClusterizerClusterDigit *digit);\r
   void AttachPartToCand(AliITSUClusterizerClusterCand *cand,AliITSUClusterizerClusterPart *part);\r
   void DetachPartFromCand(AliITSUClusterizerClusterCand *cand,AliITSUClusterizerClusterPart *part);\r
@@ -94,6 +97,7 @@ class AliITSUClusterizer : public TObject
  protected:\r
   //\r
   Int_t fVolID;                             // Volume id (module index)\r
+  Bool_t fAllowDiagonalClusterization;      // allow clusters with pixels having common corners only\r
   const AliITSUSegmentationPix* fSegm;      // Segmentation or local coord calc.\r
   const AliITSURecoParam*       fRecoParam; // reco params\r
   //\r
index 5d60992c1653c2a56e76741b2a9fead3eae368b3..2ab817c3926e6a9a5cb9427c7138cdb3303a5bd0 100644 (file)
@@ -125,3 +125,12 @@ Int_t AliITSUHit::GetDetector() const
   if (!gm) AliFatal("NULL pointer to the geometry!");
   return gm->GetModIdInLadder(fModule);
 }  
+
+//______________________________________________________________________
+void AliITSUHit::Print(Option_t *option) const 
+{
+  // print itself
+  printf("Mod%4d Tr:%5d DE:%.2e TOF: %.3e| P:%.3f %.3f %.3f |>%.4f %.4f %.4f >%.4f %.4f %.4f\n",
+        fModule,fTrack,fDestep,fTof,fPx,fPy,fPz, fx0,fy0,fz0,fX,fY,fZ);
+
+}
index f5a28808b0aea17ada17f9f0ba7f7c20829cb03d..a6f240e3a1067c1143968fba68c3d3b9dbdb01ce 100644 (file)
@@ -33,7 +33,8 @@ class AliITSUHit : public AliITShit {
   virtual void  GetPositionL(Double_t &x,Double_t &y,Double_t &z,Double_t &t) {Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;t=tf;}
   virtual void  GetPositionL(Double_t &x,Double_t &y,Double_t &z) {Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;}
   virtual void  GetPositionL0(Double_t &x,Double_t &y,Double_t &z,Double_t &t);
-  
+  //
+  virtual void Print(Option_t *option="") const;
   //
  protected:
 
index a093bbe79f86d6002262b9441c3ce0f2717740d7..cdc3cc14b0b46248d9d96e14a69414315bf6bfc7 100644 (file)
@@ -37,6 +37,7 @@ const Double_t AliITSURecoParam::fgkSigmaRoadZ                    = 1.;//1000e-4
 const Double_t AliITSURecoParam::fgkMaxTr2ClChi2                  = 15.;
 const Double_t AliITSURecoParam::fgkTanLorentzAngle               = 0;
 const Double_t AliITSURecoParam::fgkMissPenalty                   = 2.0;
+const Bool_t   AliITSURecoParam::fgkAllowDiagonalClusterization   = kFALSE;
 //
 // hardwired params for TPC-ITS border layer
 const Double_t AliITSURecoParam::fgkTPCITSWallRMin                = 50.;
@@ -61,6 +62,7 @@ AliITSURecoParam::AliITSURecoParam()
   ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
   ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
      //
+  ,fAllowDiagonalClusterization(0)
   ,fTanLorentzAngle(0)
   ,fSigmaY2(0)
   ,fSigmaZ2(0)
@@ -88,6 +90,7 @@ AliITSURecoParam::AliITSURecoParam(Int_t nLr)
   ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
   ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
      //
+  ,fAllowDiagonalClusterization(0)
   ,fTanLorentzAngle(0)
   ,fSigmaY2(0)
   ,fSigmaZ2(0)
@@ -110,6 +113,7 @@ AliITSURecoParam::~AliITSURecoParam()
   delete[] fSigmaZ2;
   delete[] fMaxTr2ClChi2;
   delete[] fMissPenalty;
+  delete[] fAllowDiagonalClusterization;
   fTrackingConditions.Delete();
 }
 
@@ -153,8 +157,10 @@ void  AliITSURecoParam::SetNLayers(Int_t n)
   fSigmaZ2 = new Double_t[n];
   fMaxTr2ClChi2 = new Double_t[n];
   fMissPenalty  = new Double_t[n];
+  fAllowDiagonalClusterization = new Bool_t[n];
   //
   for (int i=n;i--;) {
+    fAllowDiagonalClusterization[i] = fgkAllowDiagonalClusterization;
     fTanLorentzAngle[i] = fgkTanLorentzAngle;
     fSigmaY2[i] = fgkSigmaRoadY*fgkSigmaRoadY;
     fSigmaZ2[i] = fgkSigmaRoadZ*fgkSigmaRoadZ;
@@ -196,6 +202,22 @@ void  AliITSURecoParam::SetMaxTr2ClChi2(Int_t lr, Double_t v)
   fMaxTr2ClChi2[lr] = v;
 }
 
+//_____________________________________________________________________________
+void  AliITSURecoParam::SetMissPenalty(Int_t lr, Double_t v)
+{
+  // set Lorentz angle value
+  if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
+  fMissPenalty[lr] = v;
+}
+
+//_____________________________________________________________________________
+void  AliITSURecoParam::SetAllowDiagonalClusterization(Int_t lr, Bool_t v)
+{
+  // set Lorentz angle value
+  if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
+  fAllowDiagonalClusterization[lr] = v;
+}
+
 //========================================================================
 //_____________________________________________________________________________
 void AliITSURecoParam::Print(Option_t *) const
index e072416f001566e10f04b2efd13022ff8a5a5f04..2b424bbdbdc777335d6421cc83395a2eeb153ef9 100644 (file)
@@ -36,6 +36,7 @@ class AliITSURecoParam : public AliDetectorRecoParam
   Double_t    GetSigmaZ2(Int_t lr)               const;
   Double_t    GetMaxTr2ClChi2(Int_t lr)          const;
   Double_t    GetMissPenalty(Int_t lr)           const;
+  Bool_t      GetAllowDiagonalClusterization(Int_t lr) const;
   //
   Double_t    GetNSigmaRoadY()                   const {return fNSigmaRoadY;}
   Double_t    GetNSigmaRoadZ()                   const {return fNSigmaRoadZ;}
@@ -54,6 +55,7 @@ class AliITSURecoParam : public AliDetectorRecoParam
   void        SetSigmaZ2(Int_t lr, Double_t v);
   void        SetMaxTr2ClChi2(Int_t lr, Double_t v);
   void        SetMissPenalty(Int_t lr, Double_t v);
+  void        SetAllowDiagonalClusterization(Int_t lr, Bool_t v);
   //
   void        SetMaxDforV0dghtrForProlongation(Double_t v)            {fMaxDforV0dghtrForProlongation = v;}
   void        SetMaxDForProlongation(Double_t v)                      {fMaxDForProlongation = v;}
@@ -85,6 +87,7 @@ class AliITSURecoParam : public AliDetectorRecoParam
   Double_t       fTPCITSWallZSpanH;     // half Z span
   Double_t       fTPCITSWallMaxStep;    // max tracking step
   //
+  Bool_t*        fAllowDiagonalClusterization; //[fNLayers] allow clusters of pixels with common corners only
   Double_t*      fTanLorentzAngle;  //[fNLayers] Optional Lorentz angle for each layer
   Double_t*      fSigmaY2;          //[fNLayers] addition to road width^2
   Double_t*      fSigmaZ2;          //[fNLayers] addition to road width^2
@@ -112,11 +115,14 @@ class AliITSURecoParam : public AliDetectorRecoParam
   static const Double_t fgkTPCITSWallZSpanH;                   // half Z span
   static const Double_t fgkTPCITSWallMaxStep;                  // max tracking step
   //
+  // clusterization options
+  static const Bool_t   fgkAllowDiagonalClusterization;        // clusters of pixels with common corners
+  //
  private:
   AliITSURecoParam(const AliITSURecoParam & param);
   AliITSURecoParam & operator=(const AliITSURecoParam &param);
 
-  ClassDef(AliITSURecoParam,1) // ITS reco parameters
+  ClassDef(AliITSURecoParam,2) // ITS reco parameters
 };
 
 //_____________________________________________________________________________
@@ -154,6 +160,13 @@ inline Double_t AliITSURecoParam::GetMissPenalty(Int_t lr) const
   return (lr<fNLayers)&&fMissPenalty ? fMissPenalty[lr]:fgkMissPenalty; //0;
 }
 
+//_____________________________________________________________________________
+inline Bool_t AliITSURecoParam::GetAllowDiagonalClusterization(Int_t lr) const
+{
+  // are diagonal clusters permitted
+  return (lr<fNLayers)&&fAllowDiagonalClusterization ? fAllowDiagonalClusterization[lr]:fgkAllowDiagonalClusterization;
+}
+
 #endif
 
 
index 36a6af5860722a8ee4b6ce6c4eb55f9d037063b0..0fe045cfb3fb0e23436e2fae3eb1dd0758f97c56 100644 (file)
@@ -143,6 +143,7 @@ void AliITSUReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) c
   double bz = 0;
   if (field == 0) AliError("Cannot get magnetic field from TGeoGlobalMagField");
   else bz = field->SolenoidField();
+  const AliITSURecoParam* recPar = GetRecoParam();
   //
   for (int ilr=0;ilr<fGeom->GetNLayers();ilr++) {
     //
@@ -151,7 +152,8 @@ void AliITSUReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) c
     clFinder->SetSegmentation((AliITSUSegmentationPix*)fGeom->GetSegmentation(ilr));
     clFinder->SetLayerID(ilr);
     clFinder->SetClusters(fClusters[ilr]);
-    clFinder->SetRecoParam(GetRecoParam()); // RS: Do we need to set it for every event?
+    clFinder->SetRecoParam(recPar); // RS: Do we need to set it for every event?
+    clFinder->SetAllowDiagonalClusterization(recPar->GetAllowDiagonalClusterization(ilr));
     clFinder->PrepareLorentzAngleCorrection(bz);
     //
     int modF=fGeom->GetFirstModIndex(ilr);
index 3a2d3cb0febb1f81f3c1f58572469f8e49916293..dd368a4682fe52a92147a21fd5613c7544d4346b 100644 (file)
@@ -59,6 +59,11 @@ AliITSUSegmentationPix::AliITSUSegmentationPix(UInt_t id, int nchips,int ncol,in
   ,fNColPerChip(nchips>0 ? ncol/nchips:0)
   ,fNRow(nrow)
   ,fNCol(ncol)
+  ,fDiodShiftMatNCol(0)
+  ,fDiodShiftMatNRow(0)
+  ,fDiodShiftMatDim(0)
+  ,fDiodShidtMatX(0)
+  ,fDiodShidtMatZ(0)
 {
   // Default constructor, sizes in cm
   if (nchips) SetUniqueID( AliITSUGeomTGeo::ComposeDetTypeID(id) );
@@ -152,6 +157,20 @@ AliITSUSegmentationPix& AliITSUSegmentationPix::operator=(const AliITSUSegmentat
   fGuardRgt = src.fGuardRgt;
   fGuardLft = src.fGuardLft;
   //
+  fDiodShiftMatNCol = src.fDiodShiftMatNCol;
+  fDiodShiftMatNRow = src.fDiodShiftMatNRow;
+  fDiodShiftMatDim  = src.fDiodShiftMatDim;
+  delete fDiodShidtMatX; fDiodShidtMatX = 0;
+  delete fDiodShidtMatZ; fDiodShidtMatZ = 0;
+  if (fDiodShiftMatDim) {
+    fDiodShidtMatX = new Double32_t[fDiodShiftMatDim];
+    fDiodShidtMatZ = new Double32_t[fDiodShiftMatDim];
+    for (int i=fDiodShiftMatDim;i--;) {
+      fDiodShidtMatX[i] = src.fDiodShidtMatX[i];
+      fDiodShidtMatZ[i] = src.fDiodShidtMatZ[i];
+    }
+  }
+  //
   return *this;
 }
 
@@ -171,7 +190,21 @@ AliITSUSegmentationPix::AliITSUSegmentationPix(const AliITSUSegmentationPix &src
   ,fNColPerChip(src.fNColPerChip)
   ,fNRow(src.fNRow)
   ,fNCol(src.fNCol)  
+  ,fDiodShiftMatNCol(src.fDiodShiftMatNCol)
+  ,fDiodShiftMatNRow(src.fDiodShiftMatNRow)
+  ,fDiodShiftMatDim(src.fDiodShiftMatDim)
+  ,fDiodShidtMatX(0)
+  ,fDiodShidtMatZ(0)
 {
+  // copy constructor
+  if (fDiodShiftMatDim) {
+    fDiodShidtMatX = new Double32_t[fDiodShiftMatDim];
+    fDiodShidtMatZ = new Double32_t[fDiodShiftMatDim];
+    for (int i=fDiodShiftMatDim;i--;) {
+      fDiodShidtMatX[i] = src.fDiodShidtMatX[i];
+      fDiodShidtMatZ[i] = src.fDiodShidtMatZ[i];
+    }
+  }
 }
 
 //____________________________________________________________________________RS
@@ -450,3 +483,66 @@ void AliITSUSegmentationPix::LoadSegmentations(TObjArray* dest, const char* inpf
   delete arr;
   //
 }
+
+//______________________________________________________________________
+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 Double32_t[fDiodShiftMatDim];
+    fDiodShidtMatZ = new Double32_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("%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;
+    printf("Diod shift periodicity pattern (X,Z[row][col])\n");
+    for (int irow=0;irow<fDiodShiftMatNRow;irow++) {
+      for (int icol=0;icol<fDiodShiftMatNCol;icol++) { 
+       GetDiodShift(irow,icol,dx,dz);
+       printf("%.1f/%.1f |",kmc*dx,kmc*dz);
+      }
+      printf("\n");
+    }
+  }
+}
+
+//______________________________________________________________________
+void AliITSUSegmentationPix::GetDiodShift(Int_t row,Int_t col, Float_t &dx,Float_t &dz) const
+{
+  // obtain optional diod shift
+  if (!fDiodShiftMatDim) {dx=dz=0; return;}
+  int cnt = (col%fDiodShiftMatNCol) + (row%fDiodShiftMatNRow)*fDiodShiftMatNCol;
+  dx = fDiodShidtMatX[cnt];
+  dz = fDiodShidtMatZ[cnt];  
+  //
+}
index 262694b31877b31020bba6e69a08fdfd82d74bf0..93f098eaa1c692f50e05f3345202be5c87dc031c 100644 (file)
@@ -54,9 +54,14 @@ public AliITSsegmentation {
   virtual void Neighbours(Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]) const;
   //
   virtual void PrintDefaultParameters() const {AliWarning("No def. parameters defined as const static data members");}
+  virtual void Print(Option_t* option = "") const;
   //
   virtual Int_t                    GetDetTypeID()              const {return GetUniqueID();}
   //
+  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; }
+  //
   Bool_t                           Store(const char* outf);
   static AliITSUSegmentationPix*   LoadWithID(UInt_t id, const char* inpf);
   static void                      LoadSegmentations(TObjArray* dest, const char* inpf);
@@ -80,9 +85,15 @@ public AliITSsegmentation {
     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
+    //
     static const char* fgkSegmListName; // pattern for segmentations list name
     //
-  ClassDef(AliITSUSegmentationPix,1) //Segmentation class upgrade pixels 
+  ClassDef(AliITSUSegmentationPix,2) //Segmentation class upgrade pixels 
 
 };
 
index 01e85b74db4ae88d4b6edd1210c816768cc76127..0acb2e2333f38d34a6951da2cd7545513427f522 100644 (file)
@@ -426,9 +426,14 @@ void AliITSUSimulationPix::SpreadCharge2D(Double_t x0,Double_t z0, Double_t dy,
       //
       fSeg->DetToLocal(ix,iz,x,z); // pixel center
       xdioshift = zdioshift = 0;
+      double dxi = fSeg->Dpx(ix);
+      double dzi = fSeg->Dpz(iz);
       CalcDiodeShiftInPixel(ix,iz,xdioshift,zdioshift);    // Check and apply diode shift if needed
-      double dxi = 0.5*fSeg->Dpx(ix);
-      double dzi = 0.5*fSeg->Dpz(iz);
+      xdioshift *= dxi;
+      zdioshift *= dzi;
+      dxi *= 0.5;
+      dzi *= 0.5;
+      //      printf("DShift: %d %d -> %.4f %.4f\n",ix,iz,xdioshift,zdioshift);
       x1  = (x + xdioshift) - x0;   // calculate distance of cell boundaries from injection center
       z1  = (z + zdioshift) - z0;
       x2  = x1 + dxi; // Upper
@@ -860,7 +865,7 @@ Int_t AliITSUSimulationPix::GetReadOutCycle(Int_t row, Int_t col, Double_t hitTi
 }
 
 //_______________________________________________________________________
-void AliITSUSimulationPix::CalcDiodeShiftInPixel(Int_t xlin, Int_t zcol, Float_t &x, Float_t &)
+void AliITSUSimulationPix::CalcDiodeShiftInPixel(Int_t xrow, Int_t zcol, Float_t &x, Float_t &z)
 {
   //
   // Calculates the shift of the diode wrt the geometric center of the pixel.
@@ -868,16 +873,7 @@ void AliITSUSimulationPix::CalcDiodeShiftInPixel(Int_t xlin, Int_t zcol, Float_t
   // The shift can depend on the column or line or both...
   // The x and z are passed in cm 
   //
-  
-  TString parTitle = fResponseParam->GetTitle();
-  
-  // M32terP31 is staggered the diode shift within pixel depends on the column
-  if ( parTitle.Contains("M32terP31") ) 
-  {
-    if ( zcol%2 == 0 )    x += 0.30 * fSeg->Dpx(xlin);
-    else                  x -= 0.19 * fSeg->Dpx(xlin);
-  }
-  
+  ((AliITSUSegmentationPix*)fSeg)->GetDiodShift(xrow,zcol,x,z);  
+  //
 }
 //_______________________________________________________________________
index b09ff08431b0dcf186d7985e4ca63720aa089660..a2a11a02da7386b7df50563a68d9d30fb5e810fd 100644 (file)
@@ -97,7 +97,7 @@ public:
   Int_t GetReadOutCycle(Int_t row, Int_t col, Double_t hitTime);
   Int_t GetReadOutCycleRollingShutter(Int_t row, Int_t col, Double_t hitTime);
   //
-  void CalcDiodeShiftInPixel(Int_t xlin, Int_t zcol, Float_t &x, Float_t &z);
+  void CalcDiodeShiftInPixel(Int_t xrow, Int_t zcol, Float_t &x, Float_t &z);
   //
  private:
   void SpreadCharge2D(Double_t x0,Double_t z0, Double_t dy, Int_t ix0,Int_t iz0,
index ee67fa0a1ef7fdaf9f6a33430e129c04d9c91175..2517aded0a6bbcf134f11ba2e084afe6122a2a0e 100644 (file)
@@ -163,7 +163,7 @@ void Config()
   if (generatorFlag==0) {
     // Fast generator with parametrized pi,kaon,proton distributions
     
-    int     nParticles = 30;//14022;
+    int  nParticles = 100;//14022;
     AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
     gener->SetMomentumRange(0.1, 10.);
     gener->SetPhiRange(0., 360.);
@@ -292,6 +292,11 @@ void Config()
     {
       //=================== ITS parameters ============================
       //
+      const int kDiodShift_NCol_M32terP31 = 2;
+      const int kDiodShift_NRow_M32terP31 = 1;
+
+      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:
       AliITSUSegmentationPix* seg0 = new AliITSUSegmentationPix(0,    // segID (0:9)
                                                                5,    // chips per module
@@ -301,6 +306,7 @@ void Config()
                                                                20.e-4,  // default col pitch in cm
                                                                18.e-4  // sensor thickness in cm
                                                                );    // see AliITSUSegmentationPix.h for extra options
+      seg0->SetDiodShiftMatrix(kDiodShift_NRow_M32terP31,kDiodShift_NCol_M32terP31, &kDiodShiftM32terP31X[0][0], &kDiodShiftM32terP31Z[0][0]);
       seg0->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
       AliITSUSegmentationPix* seg1 = new AliITSUSegmentationPix(1,    // segID (0:9)
                                                                5*2,    // chips per module
@@ -310,6 +316,7 @@ void Config()
                                                                20.e-4,  // default col pitch in cm
                                                                18.e-4  // sensor thickness in cm
                                                                );    // see AliITSUSegmentationPix.h for extra options
+      seg1->SetDiodShiftMatrix(kDiodShift_NRow_M32terP31,kDiodShift_NCol_M32terP31, &kDiodShiftM32terP31X[0][0], &kDiodShiftM32terP31Z[0][0]);
       seg1->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
       AliITSUSegmentationPix* seg2 = new AliITSUSegmentationPix(2,    // segID (0:9)
                                                                5*2,    // chips per module
@@ -319,6 +326,7 @@ void Config()
                                                                20.e-4,  // default col pitch in cm
                                                                18.e-4   // sensor thickness in cm
                                                                );    // 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
index 6069f631ca8a4a4cd308a4416a48bc96f10e7428..e4fbc43a94a37fb309a7a194b87ed65370c364fd 100644 (file)
@@ -34,10 +34,11 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     recoParamArray->AddLast(itsRecoParam);
   }
   //
+  int nBranch[7] = {3,3,3,3,3,3,3}; // max branching for the seed on layer
+  int nCands[7]  = {250,200,150,100,60,40,20}; // max branching for the TPC seed
+  //
   {
     AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetLowFluxParam();
-    int nBranch[7] = {3,3,3,3,3,3,3}; // max branching for the seed on layer
-    int nCands[7]  = {250,200,150,100,60,40,20}; // max branching for the TPC seed
     //
     itsRecoParam->SetNLayers(nLr);
     //
@@ -46,6 +47,8 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     itsRecoParam->SetTitle("LowMult");
     recoParamArray->AddLast(itsRecoParam);
     //******************************************************************
+    for (int i=0;i<nLr;i++) itsRecoParam->SetAllowDiagonalClusterization(i,kTRUE);
+    //  
     // Add tracking conditions >>>
     trCond = new AliITSUTrackCond();
     trCond->SetNLayers(nLr); 
@@ -70,12 +73,10 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     trCond->AddGroupPattern( kBit5|kBit6 );
     //    
     itsRecoParam->AddTrackingCondition(trCond);
-    // Add tracking conditions >>>
+    // Add tracking conditions <<<
   }
   {
     AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetHighFluxParam();
-    for (int i=0;i<nLr;i++) trCond->SetMaxBranches(i,nBranch[i]);
-    for (int i=0;i<nLr;i++) trCond->SetMaxCandidates(i,nCands[i]);
     //
     itsRecoParam->SetNLayers(nLr);
     //
@@ -84,6 +85,8 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     itsRecoParam->SetTitle("HighMult");
     recoParamArray->AddLast(itsRecoParam);
     //******************************************************************
+    for (int i=0;i<nLr;i++) itsRecoParam->SetAllowDiagonalClusterization(i,kTRUE);
+    //
     // Add tracking conditions >>>
     trCond = new AliITSUTrackCond();
     trCond->SetNLayers(nLr); 
@@ -105,7 +108,7 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     trCond->AddGroupPattern( kBit5|kBit6 );
     //    
     itsRecoParam->AddTrackingCondition(trCond);
-    // Add tracking conditions >>>
+    // Add tracking conditions <<<
     //
   }
   //
index dd2b0821377821e50d93d25eca07a21f43b2d4d1..fd27dd6890626976d57b36413b45dd24d7139016 100644 (file)
Binary files a/ITS/UPGRADE/testITSU/itsupcdb.tar.gz and b/ITS/UPGRADE/testITSU/itsupcdb.tar.gz differ