I am experiencing some problem when I try to perform fit in a subrange. Following are the details:
Now I am trying to fit a distribution with polynomial (5th order Bernstein). The full range is 100-180. Now I would like to fit it from 108. If I restrict the range of variable to be (108-180) at definition:
RooRealVar x(“x”,“x”,108,180)
Then the fit result looks good:
However, if I do not restrict x but use “setRange(108,180,“window”)” and then use “Range” option in the fitTo function:
model->fitTo(histdata, Range(“window”), Extended(true)) // model is an extended pdf. Doing binned fit
I think I have a similar problem and my guess is that is an issue of normalization
but I don’t have any idea how to solve it. I tried with
Range(“R1,R2”) and
NormRange(“R1,R2”)
when plotting the result but it didn’t help
Thank you for your reply. Actually I believe this is not normalization problem since the parameter values are away from the reasonable ones.
Cheers,
Hongtao
[quote=“delo”]Hi,
I think I have a similar problem and my guess is that is an issue of normalization
but I don’t have any idea how to solve it. I tried with
Range(“R1,R2”) and
NormRange(“R1,R2”)
when plotting the result but it didn’t help
The reason is that RooBernstein do not have analytical calculation available of integrals over subranges. RooChebychev has the same problem. I think it would be great if RooFit authors can fix this issue since RooBernstein and RooChebychev are more useful than RooPolynomial.