In the code below. Clearly if the pdf evaluates exactly
to one,
its log is zero and we get this spurious error message.
Zero is a perfectly legal value and using it to
indicate an error condition is not a good idea.
Besides the case of negative probability is already handled
inside getLogVal. I suggest getting rid of this WARNING.
Double_t term =
_dataClone->weight()*_pdfClone->getLogVal(_normSet);
cout << i << " " << term << endl;
sumWeight += _dataClone->weight() ;
// If any event evaluates with zero probability,
abort calculation
if(term == 0) {
cout << "RooNLLVar::evaluatePartition(" << GetName()
<< "): WARNING: event " << i << " has zero or
negative probability" << endl ;
return 0 ;
}