Error calculation in case message: p.d.f value is less than

Hi all,

For my analysis, I am trying to perform a template fit to measure which fraction of events f match one of two hypotheses in data. Because I use only two templates, during the fit, the total number of events is fixed to the number of events in the data and only the fraction f is kept floating.

For validation, I ran pseudo-experiments in the scenario where I expect the fit to give me f = 1. But since I do not want to bias my results, I do not require f to be in the physical range 0-1. The result of my pseudo-experiments gives me a perfect gaussian distribution of the fitted f’ s with mean 1 and rms 0.35. However, the errors on this fit parameter are not gaussian distributed. There is a tail at the low side of the gaussian, and this tail seems to be linked with the occurrence of the error message:

[#0] ERROR:Eval – RooAbsReal::logEvalError(pdfPass) evaluation error,
origin : RooAddPdf::pdfPass[ nCor * Cor + nUnCor * UnCor ]
message : p.d.f value is less than zero (-0.060584), forcing value to zero

Since, I cannot throw away these pseudo-experiments, I was wondering if there was a way to change the default error calculation in RooFit for those cases, so that I would get a proper error back?
Or how I can properly diagnose these cases, since the covQual, the status and the edm are all properly described. Is there a method of RooFitResult I can call which will indicate that this error occurred?

Thank you for any advice,