I am using RooJohnson+Gauss to describe the mass distribution of my signal and one background. I see there is a difference in the results when updating the root version from 6.18 to 6.20. Mainly, a drop of the mass distribution in the lower mass side is observed in the new version (see the red and the magenta distributions in the attachment, left is the new version, I do here a simultaneous MC-data fit). I could figure out that the difference is somehow related to the setting of the massThreshold. So, setting the massThreshold to be equivalent to my lower limit of the mass fit range, will result in the drop. To fix it in the new version, I had to go to a lower massThreshold than the low limit of my fit range.
My questions would be then: was there a bug in the old version that has been fixed recently, for example, the massThreshold was ignored so that I haven’t seen this drop earlier, or are you aware of other reasons? Shall I go to lower massThreshold than the actual fit range?
By comparing the RooJhonson class, I could see this line is newly added https://root.cern/doc/v620/RooJohnson_8cxx_source.html#l00079, not sure though if related!
I’d ask @moneta and @StephanH to give a hand with this one.
It might take some time since they are busy / off at the moment.
the line you point to does not make a difference for the fit. It will just warn if you allow a parameter to go into a region where the PDF might be undefined.
The other thing that changed between those ROOT versions, though, is that RooJohnson supports the faster batch evaluations. Are you using
BatchMode(true) to speed up the fits? If yes, there might be a small difference in how the mass threshold is handled.
thanks for your reply. Yes I am using batch mode. Is there a strong reason to use the massThreshold in RooJohnson? since we normally define a fit range to all PDFs.
Is there a preferred value for the massThreshold, or the default will be always correct?
I don’t know why the mass threshold exists. I found it in the reference implementation before it was added to ROOT. If you don’t see why you should use it, you likely don’t need it either, so set it to a strongly negative value, so it doesn’t have any effect.
That’s, in fact, what the constructor does if you don’t pass it:
RooJohnson(const char *name, const char *title,
RooAbsReal& mass, RooAbsReal& mu, RooAbsReal& lambda,
RooAbsReal& gamma, RooAbsReal& delta,
double massThreshold = -std::numeric_limits<double>::max());
If you see a difference between
BatchMode(true), we need to investigate, but looking at the code, the mass threshold shouldn’t have any effect if you set it low enough (or don’t pass it at all).
Indeed, looking at the implementation, I couldn’t get quite well the need of the massThreshold.
I originally posted because I didn’t know if there is a recommendation of the value to be set, since being exactly at the fit range wasn’t looking good as you saw in the plot earlier.
However, not setting the massThreshold (i.e., to a strongly negative value), just tested, produced similar results to the old version, which is what I want, I believe.
I am testing
BatchMode(false), and I will let you know if there is a difference. If I understood correctly, then it should give similar results to the old version, since the batch evaluations weren’t implemented there yet.
so as expected, there is no difference between turning on and off the Batch mode when skipping the massThreshold. However, I was expecting setting the massThreshold to the fit range together with
BatchMode(false) would reproduce the old version since the batch evaluation wasn’t there, but no, in fact, the drop in the distributions is still there. Anyway, I think I will just skip the massThreshold.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.