Ranged fit give poor results

Dear RooFit experts,

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

Then the fit result would be terrible:

The output log http://www-wisconsin.cern.ch/~yanght/for_Alex/output seems to be okay. Please let me know if you have any hints. Thank you.

Cheers,

Hongtao

Hi,

I have preapred a macro that could repeat this problem in case you want to play with it:

www-wisconsin.cern.ch/~yanght/fo … ple.tar.gz

Cheers,

Hongtao

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

Delo

Hi Delo,

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

Delo[/quote]

I agree.
I didn’t notice the fitted values were so different

Delo

Hi all,

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.

Cheers,

Hongtao