Hi Jonas,
Thank you for the response! I understand what you mean about normform(t), though I thought that because RooFit uses numerical techniques to get the integral (at least this is what I thought RooAbsPdf’s createIntegral did), I didn’t realize it would cancel out b. So just to understand better, this createIntegral uses the pdf’s function explicitly, rather than something like trapezoidal sums?
In regards to the fit, I tried both of your suggestions for using RooFit to get a flat function. If I try the modification of the RooGeneric pdf, where I have the function “0.0*time + b” and use pdfint for the RooExtendPdf, this returns very incorrect values ( I expect b to be at 30) with a very large uncertainty, as shown below:
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
Minuit2Minimizer: Minimize with max-calls 500 convergence for edm < 1 strategy 2
[#1] INFO:NumericIntegration -- RooRealIntegral::init(sigpdf_Int[time]) using numeric integrator RooRombergIntegrator to calculate Int(time)
Warning in <Minuit2>: VariableMetricBuilder No improvement in line search
Minuit2Minimizer : Valid minimum - status = 0
FVAL = 409695.313443333202
Edm = 3.63797880709171255e-12
Nfcn = 28
b = 10.41 +/- 23.6608 (limited)
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
[#1] INFO:NumericIntegration -- RooRealIntegral::init(sigpdf_Int[time]) using numeric integrator RooRombergIntegrator to calculate Int(time)
When I use an EML with RooUniform and a RooAbsReal of N events, after propagating N to b and propagating the N uncertainty of \sqrt{n_{obs}} to \delta b, this returns exactly what the root fit returns.
What I would like to understand is why the RooGenericPdf has such an incorrect value and such a high uncertainty on it. I took a look at the negative log likelihood of fit parameter b (from extendedPdf.createNLL(*data) as a function of b), and it looks flat, so I can understand that the uncertainty would be high, but then how did the fit converge at all?
The reason I’ve been trying to fit a flat line is because I am interested in expanding the pdf from just a flat line to a sinusoidal function, with some offset (so b+a*cos(\omega t + \phi), for example). When I try to fit this more complicated function about the same data, I’d hope for a to be zero with some uncertainty. But because I’ve gotten such large uncertainty values using RooGenericPdfs with this flat (and sinusoidal) fit, it’s hard to make a convincing statement about the sinousoidal amplitude.
Is there a reason that using a RooGenericPdf, even if it has time dependence (be it this dummy dependency for the flat fit, or a physical sinusoidal dependence) would give such high uncertainty values?
Again, thank you for your help!
Respectfully,
Becky