I am using a framework called xmlAnaWSBuilder ( more info here ) which is a tool for creating RooFit workspaces using 1-d observables .
This project is really nice and does an excelent job when it comes to REAL data.
To my understanding it creates a NLL and uses RooMinimizer ( see here ) to also obtain the best parameters for some exponential functions used to model the background.
However this is not working properly as the background exponential parameter errors are higher than expected for mc data as the SumW2 error is not calculated. I don’t see any usage of the fitTo function ((see here for doc) that utilizes the SumW2Error() method.
I was wondering whether there is a way to calculate the correct sumw2 errors through createNLL and RooMinimizer.
I also found these helper functions : FitHelpers that might do the trick but I would like some expert opinions as I am a newbie in such topics.
The relevant helper function that fitTo() uses internally in unfortunately not part of the public interface, but you can take a look at the code and do the same of course:
If it turns out that you want to do the covariance matrix corrections also when using createNLL+RooMinimizer, please open a GitHub issue where you request to make the relevant methods public, probably as member functions of the RooMinimizer I guess.