2D fit is taking too long

Dear Experts,

I am trying to do a 2D fit and 7 different components for which I would like to know the yield. I have prepared the macro. but I the fit is taking forever to run and what I see on screen is:

[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 4.88546e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 4.92596e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 4.14639e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 4.23894e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 5.098e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 4.2511e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 6.26361e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 4.20815e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 4.04565e+06
[#0] WARNING:Eval – RooAbsPdf::getLogVal(model) WARNING: large likelihood value: 3.41217e+06

I am attaching the complete folder that I am using 2dfit.tar.gz (1.4 MB). I am unable to understand the mistake.I don’t even know how the fit would like. Would you please help.

Regards,
Sanjeeda

I guess @moneta can help you .

Hi,
I will investigate your problem, but now running your code I get this error:

libc++abi.dylib: terminating with uncaught exception of type std::logic_error: Each RooFit object needs a name. Objects representing the same entity (e.g. an observable 'x') are identified using their name.

I see you have not provided a name for some of the inputs to your model. This is needed.

Lorenzo

Thank you @moneta.
From what I understand, the name is the first argument when I define a variable. Eg: in RooRealVar delta_J_sig("#delta_{J}", “delta”, 12, -20., 20.);, #delta_{J} is the name. If this is so, then I have provided the names for all such parameters.
I am not sure why this message is there.

By the way, I let the code run and finally, I get an output like:

. I think I need to check the parameters to get a good fit.

Please let me know if there is any thing else which you think is wrong.

Hi,
It is possible that older versions of ROOT allow to define variables without names. This is not anymore possible now.
Please post your update script so I can try it
Thank you
Lorenzo

hI @moneta
Thanks for your response. I have made the changes and here’s the new folder.2dfit_new.tar.gz (1.2 MB)

Please let me know if there is still any mistake.

Sincerely,
Sanjeeda

Hi,
I see two macros there. Which one should I run, kk_2dfit_sig.C ?

no, plese run only kk_2dfit.C.

Hi,
Thanks, I can run your code. It is true it takes some time, and after ~ 20min, I get a plot similar to you.
I will check if something can be done to improve it.
Also with the current ROOT master I am getting some warnings in the definition of the normalization set of the RooAddPdf that needs to be understood

Lorenzo

1 Like

Thanks a lot @moneta. Meanwhile, I am also trying to check if It can be improved.

I see also you define with same name different parameters. I don’t know if this causes the slowdown, but I would avoid doing this. Names should be unique in the RooFit model computational graph.

One additional thing is when doing the minimization avoid using strategy 2, but just use strategy 1, that is faster

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.