I’ve written a script that generates a RooDataSet from a product of 2 PDFs, a RooGenericPdf and a RooExponential. Then I fit the DataSet with the product of 2 pdfs that were used to generate the data, the parameters in the generic pdf are fixed and slope of the exponential can vary.
When I run the fit it finishes with no errors but the slope of the exponential is not the same as the slope used to generate the dataset and it clearly incorrect when plotted with the dataset. There are no errors to indicate what is going wrong here but the answer is incorrect. I’ve attached the script and the output I get when I run it.
Any help about what I’m doing wrong you be greatly appreciated.
Thanks,
Hannah
generate_and_fit_decay_time.cxx (3.44 KB)
plots_forgenerate_and_fit_decay_time.root (18 KB)
output.txt (3.93 KB)