From 73ac3d8d7531603ce280704e16c9c529644e2265 Mon Sep 17 00:00:00 2001 From: nemu Date: Thu, 5 Mar 2009 12:51:39 +0000 Subject: [PATCH] if N = # data points > 1000, take N points to calculate the theory vector, otherwise take 1000 points --- src/classes/PRunNonMusr.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/classes/PRunNonMusr.cpp b/src/classes/PRunNonMusr.cpp index 46fb7a52..d2a3df79 100644 --- a/src/classes/PRunNonMusr.cpp +++ b/src/classes/PRunNonMusr.cpp @@ -341,7 +341,13 @@ bool PRunNonMusr::PrepareViewData() } // cout << endl << ">> after the xmin/xmax loop." << endl; - double xStep = (xMax-xMin)/1000.0; + // typically take 1000 points to calculate the theory, except if there are more data points, than take that number + double xStep; + if (fData.fX.size() > 1000.0) + xStep = fData.fX.size(); + else + xStep = (xMax-xMin)/1000.0; + double xx = xAbsMin; do { // fill x-vector