Hi how’s it going. I’ve noticed that when fitting data with RooMinimizer() the RooChi2Var() variable does not support multiple ranges. To be more specific, when passing RooFit::Range(“LEFT,RIGHT”) argument to RooChi2Var() the full range is used instead.
Older fitting algorithms, like RooAbsPdf’s fitTo() and chi2FitTo() do work as intended. As far as I understand, RooMinimizer is newer and favorable option to use today. If I am correct, the demonstrated issue should be considered as a bug, not just an improvement.
Here is the link to the Gist that reproduces the issue: https://gist.github.com/petrstepanov/132701b0c27f319fc326ef2d1e2bddde
Let me know if I missed something and there is a way to make RooChi2Var() and RooMinimizer() work as intended.