some more stuff for musrview

This commit is contained in:
nemu
2008-04-10 14:19:06 +00:00
parent 3f7be57024
commit 5dfce315b3
3 changed files with 152 additions and 5 deletions

View File

@ -411,5 +411,30 @@ bool PRunSingleHisto::PrepareData()
fNoOfFitBins++;
}
// fill theory vector for kView
if (kView) {
// feed the parameter vector
std::vector<double> par;
PMsrParamList *paramList = fMsrInfo->GetMsrParamList();
for (unsigned int i=0; i<paramList->size(); i++)
par.push_back((*paramList)[i].fValue);
fData.fTheoryTimeStart = -t0*fTimeResolution;
fData.fTheoryTimeStep = fTimeResolution;
for (unsigned int i=0; i<runData->fDataBin[histoNo].size(); i++) {
if ((int)i-(int)t0 < 0) {
fData.fTheory.push_back(0.0);
} else {
time = fData.fTheoryTimeStart + i*fTimeResolution;
value = fTheory->Func(time, par, fFuncValues);
fData.fTheory.push_back(value);
}
}
// clean up
par.clear();
}
return true;
}