]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONClusterFinderPeakFit.cxx
Updated list of classes
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterFinderPeakFit.cxx
index 4ab7ccb3f0797118edb9dcb29571a58c17eea841..24a488104ee84aa1c7ec89a8e96fad1abdd0e0c3 100644 (file)
@@ -240,6 +240,9 @@ AliMUONClusterFinderPeakFit::NextCluster()
   // if the cluster list is exhausted, we need to go to the next
   // pre-cluster and treat it
 
+  fClusterList.Delete(); // reset the list of clusters for this pre-cluster
+  fClusterNumber = -1; 
+    
   fPreCluster = fPreClusterFinder->NextCluster();
   
   if (!fPreCluster)
@@ -248,9 +251,6 @@ AliMUONClusterFinderPeakFit::NextCluster()
     return 0x0;
   }
     
-  fClusterList.Delete(); // reset the list of clusters for this pre-cluster
-  fClusterNumber = -1; 
-  
   WorkOnPreCluster();
 
   // WorkOnPreCluster may have used only part of the pads, so we check that
@@ -1029,8 +1029,8 @@ void AliMUONClusterFinderPeakFit::FindClusterCOG(AliMUONCluster& cluster,
   Double_t yc = fHistAnode->GetYaxis()->GetBinCenter(ic);
   Double_t xc = fHistAnode->GetXaxis()->GetBinCenter(jc);
   Double_t cont = fHistAnode->GetCellContent(jc,ic);
-  AliMUONPad* pixPtr = new AliMUONPad (xc, yc, wx, wy, cont);
-  if (fDebug) pixPtr->Print("full"); 
+  AliMUONPad pixel(xc, yc, wx, wy, cont);
+  if (fDebug) pixel.Print("full"); 
 
   Int_t npad = cluster.Multiplicity();
   
@@ -1040,7 +1040,7 @@ void AliMUONClusterFinderPeakFit::FindClusterCOG(AliMUONCluster& cluster,
   for (Int_t j = 0; j < npad; ++j) 
   {
     AliMUONPad* pad = cluster.Pad(j);
-    if ( Overlap(*pad,*pixPtr) )
+    if ( Overlap(*pad,pixel) )
     {
       if (fDebug) { cout << j << " "; pad->Print("full"); }
       if (pad->Charge() > qMax[pad->Cathode()]) {