|
[yoda-svn] r301 - trunk/include/YODAblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Aug 19 10:17:01 BST 2011
Author: mkawalec Date: Fri Aug 19 10:17:00 2011 New Revision: 301 Log: Corrected cutterX/Y to work with non-equispaced grids correctly - tests needed. Outflows not yet corrected... Modified: trunk/include/YODA/Histo2D.h Modified: trunk/include/YODA/Histo2D.h ============================================================================== --- trunk/include/YODA/Histo2D.h Thu Aug 18 23:44:01 2011 (r300) +++ trunk/include/YODA/Histo2D.h Fri Aug 19 10:17:00 2011 (r301) @@ -300,7 +300,7 @@ if (atY < lowEdgeY() || atY > highEdgeY()) throw RangeError("Y is outside the grid"); vector<HistoBin1D> tempBins; - for (double i = binByCoord(lowEdgeX(), atY).midpoint().first; i < highEdgeX(); i += binByCoord(lowEdgeX(), atY).widthX()) { + for (double i = binByCoord(lowEdgeX(), atY).xMin(); i < highEdgeX(); i += binByCoord(i, atY).widthX()) { const HistoBin2D& b2 = binByCoord(i, atY); const Dbn1D dbn2(b2.numEntries(), b2.sumW(), b2.sumW2(), b2.sumWX(), b2.sumWX2()); tempBins.push_back(HistoBin1D(b2.lowEdgeX(), b2.highEdgeX(), dbn2)); @@ -332,7 +332,7 @@ if (atX < lowEdgeX() || atX > highEdgeX()) throw RangeError("X is outside the grid"); vector<HistoBin1D> tempBins; - for (double i = binByCoord(atX, lowEdgeY()).midpoint().second; i < highEdgeY(); i += binByCoord(atX, lowEdgeY()).widthY()) { + for (double i = binByCoord(atX, lowEdgeY()).yMin(); i < highEdgeY(); i += binByCoord(atX, i).widthY()) { const HistoBin2D& b2 = binByCoord(atX, i); const Dbn1D dbn2(b2.numEntries(), b2.sumW(), b2.sumW2(), b2.sumWX(), b2.sumWX2()); tempBins.push_back(HistoBin1D(b2.lowEdgeY(), b2.highEdgeY(), dbn2));
More information about the yoda-svn mailing list |