]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCclustererMI.h
Additional protection
[u/mrichter/AliRoot.git] / TPC / AliTPCclustererMI.h
index 5793521e667b07399299c4dc3a2eae09860065af..01b1c3804401097c6ad58bae0bad9efc2dea0ae6 100644 (file)
@@ -15,6 +15,7 @@
 //-------------------------------------------------------
 #include <Rtypes.h>
 #include <TObject.h>
+#include <AliTPCRecoParam.h>
 #define kMAXCLUSTER 2500
 
 class TFile;
@@ -62,7 +63,7 @@ private:
   void FindClusters(AliTPCCalROC * noiseROC);
   Bool_t AcceptCluster(AliTPCclusterMI*c);
   Double_t  ProcesSignal(Float_t * signal, Int_t nchannels, Int_t id[3], Double_t &rms, Double_t &pedestalCalib);
-  void ProcessSectorData(Float_t** allBins, Int_t** allSigBins, Int_t*  allNSigBins);
+  void ProcessSectorData();
   
   Float_t * fBins;       //!digits array
   Int_t   * fSigBins; //!digits array containg only timebins above threshold
@@ -96,6 +97,13 @@ private:
   Bool_t  fBDumpSignal; // dump signal flag
   Bool_t  fBClonesArray; // output clusters stored in TClonesArray 
 
+  // Non-persistent arrays
+
+  Float_t** fAllBins; //! All sector bins
+  Int_t** fAllSigBins;//! All signal bins in a sector
+  Int_t*  fAllNSigBins;//! Number of signal bins in a sector
+
+
   ClassDef(AliTPCclustererMI,2)  // Time Projection Chamber digits
 };
 
@@ -109,6 +117,17 @@ inline Bool_t AliTPCclustererMI::IsMaximum(Float_t q,Int_t max,const Float_t *bi
   if (bins[+max-1] >= q) return kFALSE; 
   if (bins[+max+1] > q) return kFALSE; 
   if (bins[-max+1] >= q) return kFALSE;
+  //
+  //
+  if (fRecoParam->GetClusterMaxRange(1)>0){  //local maxima in z on more than 1 time bin 
+    if (bins[-2] > q) return kFALSE;
+    if (bins[ 2] > q) return kFALSE;
+  }
+  if (fRecoParam->GetClusterMaxRange(0)>0){  //local maxima in y on more than pad 
+    if (bins[-2*max] > q) return kFALSE;
+    if (bins[ 2*max] > q) return kFALSE;
+  }
+
   return kTRUE; 
 }