Fix for savannah bug report 87728 (Laurent) + fix invalid read found with valgrind...
authorlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Oct 2011 08:26:49 +0000 (08:26 +0000)
committerlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Oct 2011 08:26:49 +0000 (08:26 +0000)
MUON/AliMUONClusterSplitterMLEM.cxx

index a758b34..feca1e2 100644 (file)
@@ -440,7 +440,7 @@ AliMUONClusterSplitterMLEM::Fit(const AliMUONCluster& cluster,
        param[j] = parOk[j]; 
       }
       param[fNpar] = 0.6;
-      parmin[fNpar] = 0; 
+      parmin[fNpar] = 1E-9; 
       parmax[fNpar++] = 1; 
     }
       
@@ -945,7 +945,7 @@ AliMUONClusterSplitterMLEM::Split(const AliMUONCluster& cluster,
         
         // Flag clusters for fit
         nForFit = 0;
-        while (minGroup[nForFit] >= 0 && nForFit < 3)
+        while (nForFit < 3 && minGroup[nForFit] >= 0)
         {
           if (fDebug) cout << clustNumb[minGroup[nForFit]] << " ";
           clustFit[nForFit] = clustNumb[minGroup[nForFit]];