Hi experts,

I want to caluclate the error on the integral in a subrange with RooFit, using a composite signal+bg model, the bg model being a Bernstein polynomial. Learning from previous discussions I managed to do this, however I observe something strange with RooBernstein with more than 3 free parameters.

I attached a minimal macro, I calculate the integral error first from the total S+B model (error is 240), and then only for the bernstein component, and now suddenly the error is about 6000, though I use the same covariance matrix from the same fit. This makes no sense to my mind. But when eliminating one order of the bernstein the two uncertainties are about the same size again. It also works fine with an exponential as bg model btw. I tested it with Root 5.34 and 5.32.

Am I doing something wrong? Is there a way to stabilize the uncertainty even when the bernstein has more than 3 free parameters?

Thanks

Jana

fitanderror.C (2.08 KB)