]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added method for noise suppression in SDD before cluster finding (F. Prino)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Apr 2008 14:56:36 +0000 (14:56 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Apr 2008 14:56:36 +0000 (14:56 +0000)
ITS/AliITSClusterFinderV2SDD.cxx
ITS/AliITSClusterFinderV2SDD.h

index 70343290db6ad7b36ecc6ffc342bb0d0774c9700..bc0a7138770b7cb65e1eafaa8c9f6d6d2fca5d74 100644 (file)
@@ -131,6 +131,7 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins,
   TClonesArray &cl=*clusters;
   for (Int_t s=0; s<2; s++)
     for (Int_t i=0; i<nMaxBin; i++) {
+      NoiseSuppress(i,s,nzBins,bins[s],cal);
       if (bins[s][i].IsUsed()) continue;
       Int_t idx[32]; UInt_t msk[32]; Int_t npeaks=0;
       FindPeaks(i, nzBins, bins[s], idx, msk, npeaks);
@@ -354,5 +355,54 @@ void AliITSClusterFinderV2SDD::FindClustersSDD(AliITSRawStream* input,
   Info("FindClustersSDD", "found clusters in ITS SDD: %d", nClustersSDD);
 }
 
+//______________________________________________________________________
+void AliITSClusterFinderV2SDD::NoiseSuppress(Int_t k, Int_t sid,Int_t nzBins, AliBin* bins, AliITSCalibrationSDD* cal) const {
+  // applies zero suppression using the measured noise of each anode
+  // threshold values from ALICE-INT-1999-28 V10
+  Float_t factL=2.2; 
+  Float_t factH=4.0;
+  //
+
+  Int_t iAn=(k%nzBins)-1;
+  if(iAn<0 || iAn>255) return;
+  if(sid==1) iAn+=256;
+  Int_t nLow=0, nHigh=0;
+  Float_t noise=cal->GetNoiseAfterElectronics(iAn);
+  Float_t noisem1=noise;
+  if(iAn>1) noisem1=cal->GetNoiseAfterElectronics(iAn-1);
+  Float_t noisep1=noise;
+  if(iAn<511) noisep1=cal->GetNoiseAfterElectronics(iAn+1);
+  Float_t tL=noise*factL;
+  Float_t tH=noise*factH;
+  Float_t tLp1=noisep1*factL;
+  Float_t tHp1=noisep1*factH;
+  Float_t tLm1=noisem1*factL;
+  Float_t tHm1=noisem1*factH;
+  Float_t cC=bins[k].GetQ();
+  if(cC<=tL){
+    bins[k].SetQ(0);
+    bins[k].SetMask(0xFFFFFFFE);
+    return;
+  }
+  nLow++; // cC is greater than tL
+  if(cC>tH) nHigh++;
+  Int_t sS=bins[k-1].GetQ();
+  if(sS>tLm1) nLow++;
+  if(sS>tHm1) nHigh++;
+  Int_t nN=bins[k+1].GetQ();
+  if(nN>tLp1) nLow++;
+  if(nN>tHp1) nHigh++;
+  Int_t eE=bins[k-nzBins].GetQ();
+  if(eE>tL) nLow++;
+  if(eE>tH) nHigh++;
+  Int_t wW=bins[k+nzBins].GetQ();
+  if(wW>tL) nLow++;
+  if(wW>tH) nHigh++;
+  if(nLow<3 || nHigh<1){
+    bins[k].SetQ(0);
+    bins[k].SetMask(0xFFFFFFFE);
+  }
+}
+
 
 
index 5b9e15ce8bec2889d89792f91901d5a050cfbd43..5f37157e9bdacb9fb89e94458a7a4a2b1b963eb4 100644 (file)
@@ -28,7 +28,7 @@ public:
   enum {kHybridsPerDDL = 24};   // number of hybrids in each DDL 
 
  protected:
-
+  void NoiseSuppress(Int_t k, Int_t sid, Int_t nzBins, AliBin* bins, AliITSCalibrationSDD* cal) const;
   void FindClustersSDD(TClonesArray *digits);
   void FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nMaxZ,
                       TClonesArray *dig, TClonesArray *clusters=0x0);