]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderSPD.cxx
Example macro for the creation of tags (P.Christakoglou)
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderSPD.cxx
index 40d22e99ae50b32ed641a65a9d3f581f798f6a12..a56bf3cd2ccfe839e6d47a2b0a9f8e03da97ebff 100644 (file)
 //  for Silicon pixels                                                    // 
 //                                                                        //
 ////////////////////////////////////////////////////////////////////////////        
+
 #include "AliITSClusterFinderSPD.h"
-#include "AliITS.h"
-#include "AliITSdigitSPD.h"
+#include "AliITSDetTypeRec.h"
 #include "AliITSRawClusterSPD.h"
 #include "AliITSRecPoint.h"
-#include "AliITSresponseSPD.h"
+#include "AliITSdigitSPD.h"
 #include "AliITSsegmentationSPD.h"
-#include "AliRun.h"
+#include "AliLog.h"
 
 //#define DEBUG
 
@@ -38,9 +38,8 @@ fMinNCells(0){
     // constructor
 }
 //----------------------------------------------------------
-AliITSClusterFinderSPD::AliITSClusterFinderSPD(AliITSsegmentation *seg,
-                                               AliITSresponse *res):
-AliITSClusterFinder(seg,res),
+AliITSClusterFinderSPD::AliITSClusterFinderSPD(AliITSDetTypeRec* dettyp):
+AliITSClusterFinder(dettyp),
 fDz(0.0),
 fDx(0.0),
 fMinNCells(0){
@@ -50,10 +49,10 @@ fMinNCells(0){
     SetDz();
 }
 //----------------------------------------------------------
-AliITSClusterFinderSPD::AliITSClusterFinderSPD(AliITSsegmentation *seg,
+AliITSClusterFinderSPD::AliITSClusterFinderSPD(AliITSDetTypeRec* dettyp,
                                                TClonesArray *digits,
                                                TClonesArray *recp):
-AliITSClusterFinder(seg,0),
+AliITSClusterFinder(dettyp,digits),
 fDz(0.0),
 fDx(0.0),
 fMinNCells(0){
@@ -109,10 +108,8 @@ void AliITSClusterFinderSPD::FindRawClusters(Int_t module){
     AliITSdigitSPD *dig;
     Int_t ndig=0,i;
     /*
-    if(GetDebug(4)){
-        cout << "SPD - FindRawclusters"<<endl;
+    AliDebug(4," ");
         scanf("%d",&ndig);
-    } // end if GetDebug
     */
     for(ndig=0; ndig<ndigits; ndig++) {
         dig= (AliITSdigitSPD*)GetDigit(ndig);
@@ -121,28 +118,22 @@ void AliITSClusterFinderSPD::FindRawClusters(Int_t module){
         digtr1[digitcount] = dig->GetTrack(0);
         digtr2[digitcount] = -3;
         digtr3[digitcount] = -3;
-        if(GetDebug(5)){
-            cout << "digtr1["<<digitcount <<"]="<<digtr1[digitcount];
-            cout << " fTracks["<<0<<"]="<<dig->GetTrack(0)<<": ";
-        } // end if GetDebug
+        AliDebug(5,Form("digtr1[%d]=%d fTracks[%d]=%d: ",
+                       digitcount,digtr1[digitcount],0,dig->GetTrack(0)));
         i=1;
         while(digtr1[digitcount]==dig->GetTrack(i) && i<dig->GetNTracks()) i++;
-        if(GetDebug(5)) cout << " fTracks["<<i<<"]="<<dig->GetTrack(i);
+        AliDebug(5,Form(" fTracks[%d]=%d",i,dig->GetTrack(i)));
         if(i<dig->GetNTracks()){
             digtr2[digitcount] = dig->GetTrack(i);
-            if(GetDebug(5)) cout<<"digtr2["<<digitcount <<"]="
-                                <<digtr2[digitcount]<<": ";
+            AliDebug(5,Form("digtr2[%d]=%d: ",digitcount,digtr2[digitcount]));
             while((digtr1[digitcount]==dig->GetTrack(i) || 
                    digtr2[digitcount]==dig->GetTrack(i))&&
                   i<=dig->GetNTracks()) i++;
             if(i<dig->GetNTracks()) digtr3[digitcount] = dig->GetTrack(i);
-            if(GetDebug(5)){
-                cout << " fTracks["<<i<<"]=";
-                if(i<dig->GetNTracks()) cout <<dig->GetTrack(i);
-                cout << "digtr3["<<digitcount <<"]="<<digtr3[digitcount];
-            } // end if GetDebug
+           AliDebug(5,Form(" fTracks[%d]=%d digtr3[%d]=%d",
+                           i,i<dig->GetNTracks()?dig->GetTrack(i):-1,digitcount,digtr3[digitcount]));
         } // end if
-        if(GetDebug(4)) cout<<endl;
+    //        if(GetDebug(4)) cout<<endl;
         digtr4[digitcount] = dig->GetSignal();
         digitcount++;
     } // end for ndig
@@ -389,7 +380,7 @@ void AliITSClusterFinderSPD::ClusterFinder(Int_t ndigits,Int_t digx[],
                                                              (Double_t) ndzmin,
                                                              (Double_t) ndzmax,
                                                              0,GetModule());
-        fITS->AddCluster(0,clust);
+       fDetTypeRec->AddCluster(0,clust);
         delete clust;
     }//end loop on clusters   
     delete[] ifpad;
@@ -434,6 +425,6 @@ void AliITSClusterFinderSPD::DigitToPoint(Int_t nclus,
         rnew.fTracks[0]=tr1clus[i];
         rnew.fTracks[1]=tr2clus[i];
         rnew.fTracks[2]=tr3clus[i];
-        fITS->AddRecPoint(rnew); 
+       fDetTypeRec->AddRecPoint(rnew); 
     } // end for i
 }