I have a custom PDF class made with RooClassFactory::makePdf(…)
The PDF contains a 2D histogram that is generated on the fly that’s proportional to the PDF in XY, Z[x,y] ~ N*P(x,y). So in the evaluate(), I can just use bin content of Z(x,y) to evaluate the probabilities and return that value in the evaluate().
It works fine most of the time when Z[x,y] are well populated, when I went to a parameter region where Z[x,y] only has a few bins filled (~ 10 bins) I get these warnings for every bin in the PDF / Z.
[#0] WARNING:Plotting – WARNING: Function evaluation error(s) at coordinates [x]=1.09339 [y]=0.00143
~ 8000 of these for each x , y
[#0] WARNING:Plotting – WARNING: Function evaluation error(s) at coordinates [x]=9.95408 [y]=2.99375
And the PDF plotted by createHistogram(“x,y”,…) comes up completely empty. I check that some of the bins have non-zero values and the warning still comes up. I did this by adding a cout to the evaulate()
cout<<"x = “<<x<<” y = “<<y<<” binFound “<<binFound<<” Z = "<GetBinContent(binFound)<<endl;
This gives outputs like this in non-zero bins in Z(x,y)…
x = 1.53239 y = 2.40143 binFound = 3617 Z = 6.9320
[#0] WARNING:Plotting – WARNING: Function evaluation error(s) at coordinates [x]=1.53239 [y]=2.40143
It’s interesting that the code still complaints that it cannot evaluate the function at this coordinate even though Z(x,y) returns a reasonably value. There were many 0s returned by the evaluate() before, does this put the PDF into a mode where it just assume that the PDF is no valid?