diff --git a/src/classes/PRunListCollection.cpp b/src/classes/PRunListCollection.cpp index e570a260..cf2652e6 100644 --- a/src/classes/PRunListCollection.cpp +++ b/src/classes/PRunListCollection.cpp @@ -151,7 +151,7 @@ Bool_t PRunListCollection::Add(Int_t runNo, EPMusrHandleTag tag) success = false; break; case PRUN_NON_MUSR: - fRunNonMusrList.push_back(new PRunNonMusr(fMsrInfo, fData, runNo, tag)); + fRunNonMusrList.push_back(new PRunNonMusr(fMsrInfo, fData, runNo, tag, fTheoAsData)); if (!fRunNonMusrList[fRunNonMusrList.size()-1]->IsValid()) success = false; break; diff --git a/src/classes/PRunNonMusr.cpp b/src/classes/PRunNonMusr.cpp index 1e063c7e..f36ee553 100644 --- a/src/classes/PRunNonMusr.cpp +++ b/src/classes/PRunNonMusr.cpp @@ -60,7 +60,8 @@ PRunNonMusr::PRunNonMusr() : PRunBase() * \param runNo number of the run within the msr-file * \param tag tag showing what shall be done: kFit == fitting, kView == viewing */ -PRunNonMusr::PRunNonMusr(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) : PRunBase(msrInfo, rawData, runNo, tag) +PRunNonMusr::PRunNonMusr(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData) : + PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData) { // get the proper run fRawRunData = fRawData->GetRunData(*(fRunInfo->GetRunName())); @@ -440,7 +441,7 @@ Bool_t PRunNonMusr::PrepareViewData() // typically take 1000 points to calculate the theory, except if there are more data points, than take that number Double_t xStep; - if (fData.GetX()->size() > 1000.0) + if ((fData.GetX()->size() > 1000.0) || fTheoAsData) xStep = (xMax-xMin)/fData.GetX()->size(); else xStep = (xMax-xMin)/1000.0; diff --git a/src/include/PRunNonMusr.h b/src/include/PRunNonMusr.h index 77ad5730..a874b51d 100644 --- a/src/include/PRunNonMusr.h +++ b/src/include/PRunNonMusr.h @@ -40,7 +40,7 @@ class PRunNonMusr : public PRunBase { public: PRunNonMusr(); - PRunNonMusr(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag); + PRunNonMusr(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData); virtual ~PRunNonMusr(); virtual Double_t CalcChiSquare(const std::vector& par); @@ -65,6 +65,7 @@ class PRunNonMusr : public PRunBase UInt_t fNoOfFitBins; ///< number of bins to be be fitted Int_t fPacking; ///< packing for this particular run. Either given in the RUN- or GLOBAL-block. + Bool_t fTheoAsData; ///< true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers Int_t fStartTimeBin; ///< bin at which the fit starts Int_t fEndTimeBin; ///< bin at which the fit ends