I am using ROOT 6.26/10 and I am doing a fit on a x-y dataset with the chi2FitTo function. My code at the moment is practically equivalent to rf609_xychi2fit.py. For my study, I would like to expand it in order to perform fits in sub-ranges.
The issues is that when I pass the option YVar to the fit function, the function cannot accept a Range option, while it accepts it when no YVar is provided.
This is also what it is reported in the documentation (for master) chi2FitTo[1/5] vs chi2FitTo[4/5] and looking directly at the code situation is similar.
Is there any fundamental reason while the various options Range, NumCPU, Optimize cannot be called when YVar is in the list?
Hello @jonas,
thank you very much for the prompt action and fix. Yes this solves my question!
I have a related question concerning subranges though, since looking at the pull request you have fixed RooDataset::reduce() function for XY datasets. I guess that in order to fit in subranges I have to create from scratch a reduced version of the total dataset instead of starting from the total RooDataset and then use the reduce function. Is this correct? (I think I figured out by myself that this is the case but would like to have a confirmation )
Also I think I have a weird behaviour of residHist plot, not sure if it is related. As soon as I have a MLE confirming this I will open another post
I guess that in order to fit in subranges I have to create from scratch a reduced version of the total dataset instead of starting from the total RooDataset and then use the reduce function. Is this correct?
Yes, that is correct. You can’t use reduce() in the existing ROOT releases because it “forgets” to copy over the uncertainties. Indeed you need to create the reduced dataset manually.
Also I think I have a weird behaviour of residHist plot, not sure if it is related. As soon as I have a MLE confirming this I will open another post
I don’t know if it is related, but it will certainly be worth its own forum post