|
[yoda-svn] r529 - trunk/include/YODAblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Sep 24 16:13:20 BST 2012
Author: dgrell Date: Mon Sep 24 16:13:20 2012 New Revision: 529 Log: Improved fuzzy edge comparison in Axis1D Modified: trunk/include/YODA/Axis1D.h Modified: trunk/include/YODA/Axis1D.h ============================================================================== --- trunk/include/YODA/Axis1D.h Fri Sep 21 13:45:44 2012 (r528) +++ trunk/include/YODA/Axis1D.h Mon Sep 24 16:13:20 2012 (r529) @@ -409,11 +409,11 @@ Bin ¤tBin = bins[i]; double new_low = currentBin.lowEdge(); - double reldiff = (new_low - last_high) / (new_low + last_high); - double eps = 1.0e-12; + double reldiff = (new_low - last_high) / currentBin.width(); + double eps = 1.0e-10; if( reldiff < -eps ) { throw RangeError("Bin edges overlap"); - } else if ( ! reldiff < eps ) { // do not swap, this works with the NaN from underflow + } else if ( reldiff > eps ) { indexes.push_back(-1); edgeCuts.push_back(new_low); }
More information about the yoda-svn mailing list |