[Rivet-svn] r2016 - trunk/include/LWH

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Nov 5 15:23:31 GMT 2009


Author: hoeth
Date: Thu Nov  5 15:23:31 2009
New Revision: 2016

Log:
Fix division-by-zero problem

Modified:
   trunk/include/LWH/HistogramFactory.h

Modified: trunk/include/LWH/HistogramFactory.h
==============================================================================
--- trunk/include/LWH/HistogramFactory.h	Thu Nov  5 15:11:00 2009	(r2015)
+++ trunk/include/LWH/HistogramFactory.h	Thu Nov  5 15:23:31 2009	(r2016)
@@ -643,7 +643,7 @@
         x->setErrorMinus(binwidth/2.0);
 
         double yval(0), yerrup(0), yerrdown(0);
-        if ( h1.binHeight(j) == 0 || h2.binHeight(j) == 0 ) {
+        if ( h1.binHeight(i) == 0 || h2.binHeight(j) == 0 ) {
           /// @todo Bad way of handling div by zero!
           yval = 0.0;
           yerrup = 0.0;


More information about the Rivet-svn mailing list