I have been trying to use createNLL to generate a specific test statistic.
I was originally using ROOT 5.30 but was noticing a lot of memory issues. I noticed on here that there were similar problems discussed and fixed in later versions. I therefore decided to source ROOT from lxplus and try using 5.32 and higher, to see if my code would run faster.
My code is loading some pdfs and using those, but I seem to have tracked the problem down, at least on the surface to the RooPoisson pdf.
I am generating data, say, with a RooPoisson* P1, with some mean. I take this to be my signal pdf. I then also have a background pdf which is also RooPoisson* P2, but has some other mean value.
I generate the data with P1 and then use createNLL on P1 and P2 with the same dataset. I then construct the likelihood ratio.
Now it seems that in version 5.30 this was working fine (although I have had issues with 2D pdfs, but not the Poissons). When I use 5.32 (and newer versions up to the 5.34 release candiate) the evaluation of the signal pdf NLL always seems to return the same value!
I then also generate data using P2 and use createNLL again with this new dataset and I observe the same behaviour - ie the pdf which was used to generate the data is evaluating to the same NLL every iteration.
Has there been a change from 5.30 to 5.32+ which could have broken the NLL evaluation in the RooPoisson class in this way, or am I doing something wrong?
For completeness, the method I am using with the NLL is to create a single instance of it and the use the setData(*data, kFALSE) on later iterations. I am also using the same technique with another group of pdfs, this time generated with RooKeysPdf and I am not observing this behaviour which again leads me to believe there may be an issue with RooPoisson?
I find it odd that the same code compiles and runs under 5.30 and gives sensible results but changing to 5.32+ means that the pdf being evaluated with the dataset it generated is giving fixed (and large) values for the NLL.