I am doing a fit for the decay time of particle to obtain the lifetime.
For the purpose of my question, consider I only have the signal component.
so my lifetime pdf is , f(t,dt) = f(dt) X f(t|dt)
f(t|dt) is convolution of exponential with a gaussian resolution function using event level errors in decay time.
f(dt) is the pdf for error dt in decay time t.
All the fits are the unbinned maximum likelihood fits
- If I fit for just f(t|dt), fit results are good, decent chi-square/ndf, MIGRAD converged and MINOS gives an accurate error. attached data set and fit macro
d_lifetime1.C (4.8 KB)
dsm_new.txt (864.7 KB)
- If I fit for just f(dt) , fit results are good, MIGRAD converged and MINOS gives an accurate error. Attached are dataset and fit macro.
t_error.C (4.9 KB)
signal_new.txt (451.2 KB)
But when I use RooProdPdf sig_3d(“sig_3d”,“sig_3d”,f(dt),Conditional(f(t),t));
see attached dataset and fit macro
ds_lifetime.C (6.2 KB)
dsm_new.txt (864.7 KB)
The fit converge well with decent chi-square/ndf and residuals but I got lots of following warning
I don’t understand the reason for the above warning, since I didn’t get any such warning when I tried the fit for t and dt separately.
I made sure all the initial values, lower and upper limits for shape parameters are same as when used for fitting t and dt separately
I also tried fixing the shape parameters for dt, but again I get the same problem.
I understand that my results with final pdf even with warning messages is correct since Migrad converged well,
Intermediate warnings might come from fitter trying to scan over wrong parameter space?
If any RooFit expert can comment on the possible reason for the above warning message and how to avoid them ?
may be @moneta has an idea.
Sorry for the late answer. First of all, thanks a lot for asking in this forum. I really like your application of RooFit. Would you mind if I use your data files for benchmarking?
I made some investigations with your code and learned that it had probably nothing to do with the parameter space. Even if I restrict all parameters to 1 % around the best fit value, I could still see the warnings.
However, I would not worry further about this warning as long as the fit converges. The evaluations are done without normalization – that’s why the values can get arbitrary large depending on your problem. The fact that you don’t get the warning if you don’t do the conditional fit doesn’t worry me, as the normalization factors are different for the conditional case.
If you want to silence the warning, you can configure the RooMsgService that is explained in this tutorial. Just add the following lines at the beginning of your script:
I think these are all the relevant streams, otherwise check with
RooMsgService::instance().Print() if there is still a stream with
If you have a recent ROOT version, I can propose a nicer solution for you. You can consider using the faster batched evaluation mode by adding
RooFit::BatchMode(true) to the arguments of RooAbsPdf::fitTo. This mode doesn’t print warnings for large likelihood values, and you will get a nice speedup! When I run your conditional fit code on my machine, it takes 18 seconds in batch mode instead of 55 seconds.
I hope this answers your question, otherwise please let me know!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.