Fit a RooPlot

Hi all,
I’m doing a MC study like the one in this template: ROOT: tutorials/roofit/rf801_mcstudy.py File Reference
I obtain a plot filled with the fitted parameter obtained in each iteration (frame1 = mcstudy.plotParam(mean, Bins=40)), and what I would like to do is to fit the resulting histogram with a gaussian, and save the fitted parameters. I’m not able to do that with a RooPlot object, tho. Any advice?
For mcstudy.plotPull there’s an option ‘FitGauss’, but not in mcstudy.plotParam unfortunately.

Thanks,
MD

I think @moneta or @jonas can help you

Hi! In this case, you should use RooMCStudy::fitParDataSet() to get a handle on a dataset with all fit results that you can use as usual in RooFit.

Hope that helps,
Jonas

1 Like

Thanks @jonas, that is what I was looking for! :smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.