ERROR:Eval--RooAbsReal::logEvalError message in RooFit

Hello RooFit experts

I am using root_v5.22.00 to compile and execute this code (attached)
the idea is :
I am constructing my RooAbsPdf of RooAbsReal that depends on 4 variables time+3 angles .
the problem is :
I get this error message constantly :

[#0] ERROR:Eval -- RooAbsReal::logEvalError(term_U_B) evaluation error, origin : RooBDecay::term_U_B[ convSet=(res_gauss_conv_exp(-@0/@1)*cosh(@0*@2/2)_t_tau_DG_[term_U_B], res_gauss_conv_exp(-@0/@1)*sinh(@0*@2/2)_t_tau_DG_[term_U_B], res_gauss_conv_exp(-@0/@1)*cos(@0*@2)_t_tau_dm_[term_U_B], res_gauss_conv_exp(-@0/@1)*sin(@0*@2)_t_tau_dm_[term_U_B]) t=t tau=tau dgamma=DG f0=0.000000 f1=sinh_U_n_B f2=cos_U_p_B f3=sin_U_n_B dm=dm ] message : p.d.f value is less than zero (-0.000188), forcing value to zero

The error claims that I am using a negative Pdf (term_U_B ), the term_U_B is a RooAbsReal and not a RooAbsPdf , so I think it is perfectly fine for this term to have a negative values.
Moreover, this code works perfectly fine with root_v5.18_SL4 and give the proper results.

I wonder if you can help me fix this problem appeared in the new root version
Thanks very much for your help , and I am sorry for the long code
test.C (10.2 KB)

Hi,

If I look into your error message I see


origin : RooBDecay::term_U_B[convSet=(res_gauss_conv_exp(-@0/@1)cosh(@0@2/2)t_tau_DG[term_U_B],
^^^^^^^^^^^^

which suggests term_U_B is a ‘RooBDecay’ object which is really a RooAbsPdf
(It is of course also an RooAbsReal, as RooAbsPdf inherits from RooAbsReal, but
that is not relevent here)

What concrete class did you expect/intend term_U_B to be?

Wouter

Hi,

Now looking at your example

RooAbsReal *term_U_B = new RooBDecay(“term_U_B”,“term_U_B”,*t,*tau,*DG,//
RooRealConstant::value(0),//Coff_Of_Cosh
*sinh_U_n_B,
*cos_U_p_B,
*sin_U_n_B,
*dm,
*res_gauss,
RooBDecay::SingleSided
);

I see that term_U_B is explicitly declared as a RooBDecay, which is a p.d.f.

NB: What has changed between RooFit versions is that diagnostic error messages
have improved and provide more detailed pinpointing of the origin of evaluation
errors in composite p.d.f.s.

Wouter

Hello wouter ,

thanks very much for your help ,

I intend to use RooAbsReal here (i.e term_U_B is a real function NOT a Pdf ), But in the same time I want this use the class RooBDecay for that, because it is much easier to me to convolute with resolution model via this class.
I understand that RooBDecay could be declared as RooAbsReal. do I misunderstood ?
could you point out what is the best solution in this case ?
thanks very much

Hi,

RooBDecay is indeed also a RooAbsReal, but if you use it in a fit you use it as a RooAbsPdf, thus normalization and positive definiteness checking
is always enabled in that form.

You can in general extract by hand the components of RooBDecay
which are the ‘basis function’ (exp(|t|), exp(|t|)sin(mt) etc…)
convoluted with the resolution function. For this you use the RooAbsAnaConvPdf::convolution method.

Tutorial macro $ROOTSYS/tutorials/roofit/rf704_amplitudefit.C (which is on a slightly different subject) illustrates how this can be done.

Wouter

NB: I am offline May 16-31

Hello,
I have the same problem that is reported in this thread.
Using the Root5.22.00 version when I generate the events I get a lot of error message that are not printed with the 5.18 nor with the 5.24. Like in the example reported in the thread this is not a real fault I should care of.

Unfortunately I am sticked to the 5.22 version, since I want to submit my jobs on the grid using the pre-installed root versions. I also need that the log file is not too big otherwise i fill up all the space…

Is there a way to disable the RooAbsReal::logEvalError messages?
Thanks
Stefania

Hi,

You can in general disable or filter any type of error message generated by RooFit by altering the message service configuration. Examples of how to do that are given in example macro $ROOTSYS/tutorials/roofit/rf506_msgservice.C

Wouter