From b4c70d2d4e992e0aa92f8d0b80e87dc8f69fdf81 Mon Sep 17 00:00:00 2001 From: nemu Date: Thu, 29 May 2008 05:40:33 +0000 Subject: [PATCH] dirty fix of skewedGaussian evaluation for musrview --- src/classes/PRunAsymmetry.cpp | 3 ++- src/classes/PRunSingleHisto.cpp | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/classes/PRunAsymmetry.cpp b/src/classes/PRunAsymmetry.cpp index f01de0de..cb2ab71d 100644 --- a/src/classes/PRunAsymmetry.cpp +++ b/src/classes/PRunAsymmetry.cpp @@ -851,8 +851,9 @@ bool PRunAsymmetry::PrepareViewData(PRawRunData* runData, unsigned int histoNo[2 for (unsigned int i=0; iFunc(time, par, fFuncValues); - if (value > 1.0e2) + if (value > 10.0) { // dirty hack needs to be fixed!! value = 0.0; + } fData.fTheory.push_back(value); } diff --git a/src/classes/PRunSingleHisto.cpp b/src/classes/PRunSingleHisto.cpp index 625cc6d3..641ac246 100644 --- a/src/classes/PRunSingleHisto.cpp +++ b/src/classes/PRunSingleHisto.cpp @@ -638,20 +638,17 @@ cout << endl << ">> data start time = " << fData.fDataTimeStart; // calculate theory unsigned int size = runData->fDataBin[histoNo].size(); double startTime = -fT0s[0]*fTimeResolution; + double theoryValue; fData.fTheoryTimeStart = startTime; //cout << endl << ">> theory start time = " << fData.fTheoryTimeStart; fData.fTheoryTimeStep = fTimeResolution; for (unsigned int i=0; iFunc(time, par, fFuncValues))+bkg); -if (i==126) { -cout << endl << ">> time = " << time; -cout << endl << ">> value = " << N0*TMath::Exp(-time/tau)*(1+fTheory->Func(time, par, fFuncValues))+bkg; -cout << endl << ">> N0 = " << N0; -cout << endl << ">> bkg = " << bkg; -cout << endl << ">> TMath::Exp(-time/tau) = " << TMath::Exp(-time/tau); -cout << endl << ">> theory = " << fTheory->Func(time, par, fFuncValues); -} + theoryValue = fTheory->Func(time, par, fFuncValues); + if (theoryValue > 10.0) { // dirty hack needs to be fixed!! + theoryValue = 0.0; + } + fData.fTheory.push_back(N0*TMath::Exp(-time/tau)*(1+theoryValue)+bkg); } // clean up @@ -853,11 +850,16 @@ cout << endl << "--------------------------------"; // calculate theory unsigned int size = runData->fDataBin[histoNo].size(); double startTime = -fT0s[0]*fTimeResolution; + double theoryValue; fData.fTheoryTimeStart = startTime; fData.fTheoryTimeStep = fTimeResolution; for (unsigned int i=0; iFunc(time, par, fFuncValues)); + theoryValue = fTheory->Func(time, par, fFuncValues); + if (theoryValue > 10.0) { // dirty hack needs to be fixed!! + theoryValue = 0.0; + } + fData.fTheory.push_back(theoryValue); } // clean up