]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add properly the index for the first event in the loop to get the original cluster...
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Fri, 8 Aug 2014 08:04:53 +0000 (10:04 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Fri, 8 Aug 2014 13:46:47 +0000 (15:46 +0200)
PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx

index 6119460419e48ad4f9035b93fe4b82ce0e2872f4..aed6dcc4951a599a84e2320e6fa4123b3309a032 100755 (executable)
@@ -2012,7 +2012,8 @@ void AliAnaPi0::MakeAnalysisFillHistograms()
     // Recover original cluster
     Int_t iclus1 = -1 ;
     AliVCluster * cluster1 = FindCluster(clusters,p1->GetCaloLabel(0),iclus1);
-    
+    if(!cluster1) printf("AliAnaPi0 - Cluster1 not found!\n");
+
     //---------------------------------
     //Second loop on photons/clusters
     //---------------------------------
@@ -2031,8 +2032,12 @@ void AliAnaPi0::MakeAnalysisFillHistograms()
       
       //------------------------------------------
       // Recover original cluster
-      AliVCluster * cluster2 = FindCluster(clusters,p2->GetCaloLabel(0),iclus1); // start new loop from iclus1 to gain some time
-      
+      Int_t iclus2 = -1;
+      AliVCluster * cluster2 = FindCluster(clusters,p2->GetCaloLabel(0),iclus2,iclus1+1);
+      // start new loop from iclus1+1 to gain some time
+      if(!cluster2) printf("AliAnaPi0 - Cluster2 not found!\n");
+
+      // Get the TOF,l0 and ncells from the clusters
       Float_t tof1  = -1;
       Float_t l01   = -1;
       Int_t ncell1  = 0;