Why root is not “alerting” the user that he tried to give a value outside the range of the variable ? Of course, the user could make all the checks by himself, but is there a kind of “option” to get automaticly informed ?
I have quickly checked through the sources and RooRealVar::setVal() clamps the value, but, as you said does not emit any warning. I am inviting @jonas to this topic; he might consider adding a warning if that is useful to enough RooFit users.
As @jalopezg said, currently there is no way to get such warning. I will do something about this, but I don’t know what exactly. I think there should at least be a warning, but then there needs to be also a recommendation for people who want the clamping behavior and then get rid of the warning.
I put this on the agenda for the next RooFit developers meeting, and once we converged to a solution I will follow up on the GitHub issue thread.