I have been trying to fit an unbinned data using RooBernstein pdf in sidebands only. The fit does not look good.
Following are the fitting and plotting lines from my code: Fitting: c0_bpoly1 = r.RooRealVar(“c0_bpoly1”,“c0_bpoly1”,1) c1_bpoly1 = r.RooRealVar(“c1_bpoly1”,“c1_bpoly1”,0.1,0,5) bpoly1 = r.RooBernstein(“bpoly1”,“bpoly1”,Hm,r.RooArgList(c0_bpoly1,c1_bpoly1)) bpoly1.fitTo(blinded_data_obs,r.RooFit.Range(“unblindReg_1,unblindReg_2”),r.RooFit.Minimizer(“Minuit2”,“minimize”),r.RooFit.Save()) Plotting: c=r.TCanvas() xframe = Hm.frame() blinded_data_obs.plotOn(xframe) bpoly1.plotOn(xframe,r.RooFit.Range(“total”),r.RooFit.NormRange(“unblindReg_1,unblindReg_2”),r.RooFit.LineColor(2)) xframe.Draw() c.Draw()
I see this issue has been asked several times (similar issue fixed for RooChebyshev) in the following threads . Is there any solution mentioned somewhere? Please help .