dirty fix of skewedGaussian evaluation for musrview
This commit is contained in:
@ -851,8 +851,9 @@ bool PRunAsymmetry::PrepareViewData(PRawRunData* runData, unsigned int histoNo[2
|
|||||||
for (unsigned int i=0; i<size; i++) {
|
for (unsigned int i=0; i<size; i++) {
|
||||||
time = startTime + (double)i*fTimeResolution;
|
time = startTime + (double)i*fTimeResolution;
|
||||||
value = fTheory->Func(time, par, fFuncValues);
|
value = fTheory->Func(time, par, fFuncValues);
|
||||||
if (value > 1.0e2)
|
if (value > 10.0) { // dirty hack needs to be fixed!!
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
|
}
|
||||||
fData.fTheory.push_back(value);
|
fData.fTheory.push_back(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -638,20 +638,17 @@ cout << endl << ">> data start time = " << fData.fDataTimeStart;
|
|||||||
// calculate theory
|
// calculate theory
|
||||||
unsigned int size = runData->fDataBin[histoNo].size();
|
unsigned int size = runData->fDataBin[histoNo].size();
|
||||||
double startTime = -fT0s[0]*fTimeResolution;
|
double startTime = -fT0s[0]*fTimeResolution;
|
||||||
|
double theoryValue;
|
||||||
fData.fTheoryTimeStart = startTime;
|
fData.fTheoryTimeStart = startTime;
|
||||||
//cout << endl << ">> theory start time = " << fData.fTheoryTimeStart;
|
//cout << endl << ">> theory start time = " << fData.fTheoryTimeStart;
|
||||||
fData.fTheoryTimeStep = fTimeResolution;
|
fData.fTheoryTimeStep = fTimeResolution;
|
||||||
for (unsigned int i=0; i<size; i++) {
|
for (unsigned int i=0; i<size; i++) {
|
||||||
time = startTime + (double)i*fTimeResolution;
|
time = startTime + (double)i*fTimeResolution;
|
||||||
fData.fTheory.push_back(N0*TMath::Exp(-time/tau)*(1+fTheory->Func(time, par, fFuncValues))+bkg);
|
theoryValue = fTheory->Func(time, par, fFuncValues);
|
||||||
if (i==126) {
|
if (theoryValue > 10.0) { // dirty hack needs to be fixed!!
|
||||||
cout << endl << ">> time = " << time;
|
theoryValue = 0.0;
|
||||||
cout << endl << ">> value = " << N0*TMath::Exp(-time/tau)*(1+fTheory->Func(time, par, fFuncValues))+bkg;
|
}
|
||||||
cout << endl << ">> N0 = " << N0;
|
fData.fTheory.push_back(N0*TMath::Exp(-time/tau)*(1+theoryValue)+bkg);
|
||||||
cout << endl << ">> bkg = " << bkg;
|
|
||||||
cout << endl << ">> TMath::Exp(-time/tau) = " << TMath::Exp(-time/tau);
|
|
||||||
cout << endl << ">> theory = " << fTheory->Func(time, par, fFuncValues);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
@ -853,11 +850,16 @@ cout << endl << "--------------------------------";
|
|||||||
// calculate theory
|
// calculate theory
|
||||||
unsigned int size = runData->fDataBin[histoNo].size();
|
unsigned int size = runData->fDataBin[histoNo].size();
|
||||||
double startTime = -fT0s[0]*fTimeResolution;
|
double startTime = -fT0s[0]*fTimeResolution;
|
||||||
|
double theoryValue;
|
||||||
fData.fTheoryTimeStart = startTime;
|
fData.fTheoryTimeStart = startTime;
|
||||||
fData.fTheoryTimeStep = fTimeResolution;
|
fData.fTheoryTimeStep = fTimeResolution;
|
||||||
for (unsigned int i=0; i<size; i++) {
|
for (unsigned int i=0; i<size; i++) {
|
||||||
time = startTime + (double)i*fTimeResolution;
|
time = startTime + (double)i*fTimeResolution;
|
||||||
fData.fTheory.push_back(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(theoryValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
|
Reference in New Issue
Block a user