]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinder.cxx
Updating geometry for new scintillaton modules
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinder.cxx
index 0402675cd0d44bbfc75ccbc4b68938b27fa5920c..6c1bd7ffec0912eca3f8e77e71b0959b751863f7 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
+//
+// Base Class used to find
+// the reconstructed points for ITS
+// See also AliITSClusterFinderSPD, AliITSClusterFinderSDD, 
+// AliITSClusterFinderSDD
+//
 
 #include "AliITSClusterFinder.h"
-#include "AliITSdigit.h"
+#include "AliITSdigitSPD.h"
+#include "AliITSdigitSDD.h"
+#include "AliITSdigitSSD.h"
 #include "AliRun.h"
 #include "AliITS.h"
 
@@ -72,7 +80,8 @@ AliITSClusterFinder::~AliITSClusterFinder(){
     fNPeaks       = 0;
 }
 //__________________________________________________________________________
-AliITSClusterFinder::AliITSClusterFinder(const AliITSClusterFinder &source){
+AliITSClusterFinder::AliITSClusterFinder(const AliITSClusterFinder &source) :
+    TObject(source){
     //     Copy Constructor 
     if(&source == this) return;
     this->fDigits = source.fDigits;
@@ -138,7 +147,7 @@ void AliITSClusterFinder::FindRawClusters(Int_t module){
     TObjArray *clust0=0; // A spacific cluster of digits
     TObjArray *clust1=0; // A spacific cluster of digits
     AliITSdigit *dig=0; // locat pointer to a digit
-    Int_t i=0,nc=0,j[4],k,k2;
+    Int_t i=0,nc=0,j[4],k,k2=0;
 
     // Copy all digits for this module into a local TObjArray.
     for(i=0;i<ndigits;i++) digs->AddAt(new AliITSdigit(*((AliITSdigit*)(fDigits->At(i)))),i);
@@ -159,8 +168,7 @@ void AliITSClusterFinder::FindRawClusters(Int_t module){
                if(clust0->IndexOf(dig)>=0) break;
            } // end for k
            if(k>=nc){
-               Error("FindRawClusters","Digit not found as expected");
-               abort();
+               Fatal("FindRawClusters","Digit not found as expected");
            } // end if
            if(j[1]>=0){
                dig = (AliITSdigit*)(digs->At(j[1]));
@@ -170,8 +178,7 @@ void AliITSClusterFinder::FindRawClusters(Int_t module){
                    if(clust1->IndexOf(dig)>=0) break;
                } // end for k2
                if(k2>=nc){
-                   Error("FindRawClusters","Digit not found as expected");
-                   abort();
+                   Fatal("FindRawClusters","Digit not found as expected");
                } // end if
            } // end if j[1]>=0
            // Found cluster with neighboring digits add this one to it.
@@ -219,7 +226,7 @@ void AliITSClusterFinder::FindRawClusters(Int_t module){
     delete digs;
 }
 //______________________________________________________________________
-Bool_t AliITSClusterFinder::IsNeighbor(TObjArray *digs,Int_t i,Int_t n[]){
+Bool_t AliITSClusterFinder::IsNeighbor(TObjArray *digs,Int_t i,Int_t n[]) const{
     // Locagical function which checks to see if digit i has a neighbor.
     // If so, then it returns kTRUE and its neighbor index j.
     // This routine checks if the digits are side by side or one before the