]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliSimDigits.cxx
Adding switch to operate with smaller memory.
[u/mrichter/AliRoot.git] / TPC / AliSimDigits.cxx
index 6340493a62daa9c81edadd66998f64c0f10d02c9..3257e952e3ab84d453cbcaa7358e70bea9ae3cbb 100644 (file)
@@ -421,4 +421,37 @@ TClonesArray *  AliSimDigits::GenerTPCClonesArray(TClonesArray * arr)
     }    
   return digits;
 }
+void AliSimDigits::GlitchFilter(){
+  //
+  //  glitch filter, optionally
+  //
+  
+  for (Int_t i=0;i<fNcols;i++){ //pads
+    for(Int_t j=1;j<fNrows-1;j++){ //time bins
+      // first and last time bins are checked separately
+      if(GetDigitFast(j,i)){// nonzero digit
+        if (!GetDigitFast(j-1,i) && !GetDigitFast(j+1,i)) {
+          SetDigitFast(0,j,i);
+          SetTrackIDFast(-2,j,i,0);
+          SetTrackIDFast(-2,j,i,1);
+          SetTrackIDFast(-2,j,i,2);
+       }
+      }
+    }//time
+   
+    if(GetDigitFast(0,i) && !GetDigitFast(1,i)) {
+        SetDigitFast(0,0,i);
+        SetTrackIDFast(-2,0,i,0);
+        SetTrackIDFast(-2,0,i,1);
+        SetTrackIDFast(-2,0,i,2);
+    }
+    if(GetDigitFast(fNrows-1,i) && !GetDigitFast(fNrows-2,i)){ 
+       SetDigitFast(0,fNrows-1,i);
+       SetTrackIDFast(-2,fNrows-1,i,0);
+       SetTrackIDFast(-2,fNrows-1,i,1);
+       SetTrackIDFast(-2,fNrows-1,i,2);    
+    }
+  }//pads
+}