I fit a data histogram (dh) with a function (model) and I would like to retrieve the value of the post-fit function and its error in a given x.
What I do to retrieve the value of the function in a given x is:
RooFitResult* filters = model.fitTo(dh, RooFit::Minimizer(“Minuit”, “migradimproved”), RooFit::NumCPU(4), RooFit::Save(true), RooFit::Extended(true), RooFit::PrintLevel(-1));
RooCurve* curve = frame->getCurve("main_curve"); pdf = curve->Eval( x );[/code]
Is this the correct way to proceed?
I didn’t manage to get the error of the function in a given x, would you have any suggestion?
Thanks a lot for your help.