]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderV2SPD.cxx
- AliITSInitGeometry.cxx (updated): fgkOldSSDcone changed from kTRUE to
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2SPD.cxx
index f73d843d2fca9f17d0ec4144337cb9aded8b8d4a..c574df15f39206eb91aa154dae4c36ee754fdd92 100644 (file)
 //            Implementation of the ITS clusterer V2 class                //
 //                                                                        //
 //          Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch            //
+//          Unfolding switch from AliITSRecoParam: D. Elia, INFN Bari     //
 //                                                                        //
-///////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
 
 
 #include "AliITSClusterFinderV2SPD.h"
 #include "AliITSRecPoint.h"
 #include "AliITSgeomTGeo.h"
 #include "AliITSDetTypeRec.h"
+#include "AliITSReconstructor.h"
 #include "AliRawReader.h"
 #include "AliITSRawStreamSPD.h"
 #include <TClonesArray.h>
@@ -84,6 +86,14 @@ 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*) AliITSReconstructor::GetRecoParamDefault();
+      AliWarning("Using default AliITSRecoParam class");
+    }
+  }
   const TGeoHMatrix *mT2L=AliITSgeomTGeo::GetTracking2LocalMatrix(iModule);
   
   Int_t nclu=0;
@@ -152,6 +162,13 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T
     if((iModule <= fLastSPD1) &&idy<3) idy=3;
     if((iModule > fLastSPD1) &&idy<4) idy=4;
     Int_t idz=3;
+
+    // Switch the unfolding OFF/ON
+    if(!repa->GetUseUnfoldingInClusterFinderSPD()) {
+      idy=ymax-ymin+1;
+      idz=zmax-zmin+1;
+    }
     for(Int_t iiz=zmin; iiz<=zmax;iiz+=idz){
       for(Int_t iiy=ymin;iiy<=ymax;iiy+=idy){
 
@@ -266,7 +283,7 @@ void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStream* input,
   delete [] binsSPDInit;
   delete [] binsSPD;
   
-  Info("FindClustersSPD", "found clusters in ITS SPD: %d", nClustersSPD);
+  AliDebug(1,Form("found clusters in ITS SPD: %d", nClustersSPD));
 }
 
 
@@ -294,8 +311,10 @@ void AliITSClusterFinderV2SPD::FindClustersSPD(TClonesArray *digits) {
      bins[index].SetMask(1);
   }
    
-  ClustersSPD(bins,digits,0,kMAXBIN,kNzBins,fModule,kFALSE); 
+  Int_t nClustersSPD = ClustersSPD(bins,digits,0,kMAXBIN,kNzBins,fModule,kFALSE); 
   delete [] bins;
+
+  AliDebug(1,Form("found clusters in ITS SPD: %d", nClustersSPD));
 }