Hello.
I would like to do a simple fit of an exponential pdf to a distribution obtained from simulation with weighted events. Sometimes, I might want to constrain a bit the slope of the exponential with an external constraint. Without the constraint, the fit is working smoothly, whatever option I used for SumW2Error. In the constrained fit, if I do not try to use the MC statistical power (i.e. SumW2Error = false), then it seems to be fine. But if I try to use SumW2Error, the fit with the constraint does not seem to do what I expect : the uncertainty on the slope is larger than the smaller between the uncertainty without the constraint and the uncertainty built in the constraint, and the fitted slope is not where I expected it to be.
I attached a simple macro and a dataset to reproduce what I see. I am just doing
root.exe miniFsupersimple.C
within root 6.36.04.
What am I doing wrong ?
Best,
Jean-Baptiste
miniFsupersimple.C (4.8 KB)
aDS.root (29.5 KB)