]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderV2SPD.cxx
In Open() and GotoEvent() try the ESD operations first, fallback to run-loader.
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2SPD.cxx
index 7bc163403971e4b0709212bd6d431041fa9e2c84..f3f672c54f4396c9a322304b47267794842d229a 100644 (file)
@@ -21,6 +21,7 @@
 ////////////////////////////////////////////////////////////////////////////
 
 
+#include "AliITSCalibrationSPD.h"
 #include "AliITSClusterFinderV2SPD.h"
 #include "AliITSRecPoint.h"
 #include "AliITSgeomTGeo.h"
@@ -86,8 +87,26 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T
   
   //Cluster finder for SPD (from digits and from rawdata)
 
+  static AliITSRecoParam *repa = NULL;
+  if(!repa){
+    repa = (AliITSRecoParam*) AliITSReconstructor::GetRecoParam();
+    if(!repa){
+      repa = AliITSRecoParam::GetHighFluxParam();
+      AliWarning("Using default AliITSRecoParam class");
+    }
+  }
   const TGeoHMatrix *mT2L=AliITSgeomTGeo::GetTracking2LocalMatrix(iModule);
-  
+
+  AliITSCalibrationSPD *cal =  
+       (AliITSCalibrationSPD*) fDetTypeRec->GetCalibrationModel(iModule); 
+  // Loop on bad pixels and reset them
+  for(Int_t ipix = 0; ipix<cal->GetNrBad(); ipix++){
+    Int_t row, col;
+    cal->GetBadPixel(ipix,row,col);
+    Int_t index = (row+1) * nzbins + (col+1);
+    bins[index].SetQ(0);
+    bins[index].SetMask(0xFFFFFFFE);
+  }
   Int_t nclu=0;
   for(Int_t iBin =0; iBin < maxBins;iBin++){
     if(bins[iBin].IsUsed()) continue;
@@ -156,7 +175,7 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T
     Int_t idz=3;
 
     // Switch the unfolding OFF/ON
-    if(!AliITSReconstructor::GetRecoParam()->GetUseUnfoldingInClusterFinderSPD()) {
+    if(!repa->GetUseUnfoldingInClusterFinderSPD()) {
       idy=ymax-ymin+1;
       idz=zmax-zmin+1;
     }
@@ -275,6 +294,7 @@ void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStream* input,
   delete [] binsSPDInit;
   delete [] binsSPD;
   
+  // AliDebug(1,Form("found clusters in ITS SPD: %d", nClustersSPD));
   Info("FindClustersSPD", "found clusters in ITS SPD: %d", nClustersSPD);
 }
 
@@ -306,7 +326,5 @@ void AliITSClusterFinderV2SPD::FindClustersSPD(TClonesArray *digits) {
   Int_t nClustersSPD = ClustersSPD(bins,digits,0,kMAXBIN,kNzBins,fModule,kFALSE); 
   delete [] bins;
 
-  Info("FindClustersSPD", "found clusters in ITS SPD: %d", nClustersSPD);
+  AliDebug(1,Form("found clusters in ITS SPD: %d", nClustersSPD));
 }
-
-