# Don't understand the error messages of RooFit, ERROR:Eval

**URL:** <https://root-forum.cern.ch/t/dont-understand-the-error-messages-of-roofit-error-eval/19458>\
**Category:** Roofit and RooStats\
**Created:** [July 1, 2015, 8:49pm UTC](https://root-forum.cern.ch/t/dont-understand-the-error-messages-of-roofit-error-eval/19458 "2015-07-01T20:49:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![junhui.private](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/779978/32.png) [@junhui.private](https://root-forum.cern.ch/u/junhui.private)\
**Post date:** [July 1, 2015, 8:49pm UTC](https://root-forum.cern.ch/t/dont-understand-the-error-messages-of-roofit-error-eval/19458/1 "2015-07-01T20:49:39Z")

</div>

Hi,

I’ve launched a RooFit to do analysis of setting an UPPER LIMIT.

The background model is a linear function. The signal model is a kind of complicated, represented as “OOnePdf”.

```auto
   w.factory("BkgLinearPdf:bkg_pdf(x[0,10], a[2.5,1.0,30.0], b[-0.013,-0.012])");/// a,interceipt; b, slope.
   w.factory("OOnePdf:sig_pdf(x[0,10],cof[1.0,0.0,1.0E1])");
      w.factory("SUM:model(nsig[0,15]*sig_pdf, nbkg[0,15]*bkg_pdf)");
```

I’ve set the “cof” as POI.

Although these error messages appeared, the scripts finished their running, and produced a few plots, as attached.

```auto

............... Lots of "ERROR:Eval" omitted here ....................

[#0] ERROR:Eval -- RooAbsReal::logEvalError(sig_pdf) evaluation error, 
 origin : OOnePdf::sig_pdf[x=x cof=cof]
 message : p.d.f normalization integral is zero or negative
 server values: x=x=3.21682, cof=cof=0 +/- 0
[#0] ERROR:Eval -- RooAbsReal::logEvalError(sig_pdf) evaluation error, 
 origin : OOnePdf::sig_pdf[x=x cof=cof]
 message : p.d.f normalization integral is zero or negative
 server values: x=x=2.01278, cof=cof=0 +/- 0
[#0] ERROR:Eval -- RooAbsReal::logEvalError(sig_pdf) evaluation error, 
 origin : OOnePdf::sig_pdf[x=x cof=cof]
 message : p.d.f normalization integral is zero or negative
 server values: x=x=4.22553, cof=cof=0 +/- 0
[#0] ERROR:Eval -- RooAbsReal::logEvalError(sig_pdf) evaluation error, 
 origin : OOnePdf::sig_pdf[x=x cof=cof]
 message : p.d.f normalization integral is zero or negative
 server values: x=x=10, cof=cof=0 +/- 0
Error in <TFoam::MakeActiveList>: Integrand function is zero  

Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
The computed upper limit is: 8.84616
Expected upper limits, using the B (alternate) model : 
 expected limit (median) 0
 expected limit (-1 sig) 0
 expected limit (+1 sig) 6.34615
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1
Error: Cannot compute CLs because CLb = 0. Returning CLs = -1

```

[53ScannedPointsToys100And50.pdf](https://root-forum.cern.ch/uploads/default/original/2X/a/abcd3044e4766c7669146ed374ff1afbef5f901f.pdf) (20.7 KB)

My questions are :  
1). How one can interpret those error messages correctly ? How they might originate from ?

2). There’re totally 53 scanned points, some of these points have CLs = -1.  
Can I understand like this : only the points of “CLb = 0 and CLs = -1” are meaningless, wile the points “CLb != 0 and CLs != -1” are meaningful ?

Thanks !

Best,  
Junhui

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [July 30, 2015, 7:35am UTC](https://root-forum.cern.ch/t/dont-understand-the-error-messages-of-roofit-error-eval/19458/2 "2015-07-30T07:35:19Z")

</div>

Hi,

Thi errors, are evaluation error, often occurring because the pdf for those parameter values returns a zero or a negative value. If possible you should try to avoid that the parameters go in that range, but since we don;t use a minimisation algorithm supporting non trivial constraint in the parameter this sometimes cannot be avoided. If at the end the program succeeded to move to a good region, then it is not a problem, otherwise the fit will not succeed to converge.

The points where CLs=-1 are probably where the fit did not converge.

Lorenzo
