error feed fStep rather than fPosError for expected chisq. Tweaked the param rounding for expected chisq.

This commit is contained in:
2025-07-04 16:31:50 +02:00
parent 4176bceee1
commit 297a0d95cc

View File

@ -2305,7 +2305,7 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
for (UInt_t i=0; i<fParams.size(); i++) {
param.push_back(fParams[i].fValue);
err.push_back(fParams[i].fPosError);
err.push_back(fParams[i].fStep);
}
// CalcExpectedChiSquare handles both, chisq and mlh
@ -3200,14 +3200,14 @@ PDoubleVector PFitter::ParamRound(const PDoubleVector &par, const PDoubleVector
double dval;
for (unsigned int i=0; i<par.size(); i++) {
if (err[i] != 0.0) {
exp = floor(log10(fabs(err[i]))-2);
exp = floor(log10(fabs(err[i]))-1);
dval = round(par[i]*pow(10.0, -exp))/pow(10.0, -exp);
par_r[i] = dval;
} else {
par_r[i] = par[i];
}
}
return par_r;
}