-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
- [V ] Checked for duplicates
Describe the bug
The second-order RooChebyshev class produces negative values for certain parameter range around c1=-0.5 and c2=-0.55.
These negative values are then handled differently in different versions of ROOT


Expected behavior
A preferred solution would be to set negative values to 0 as in ROOT 6.20, because setting them to +inf is causing the fits to diverge.
Is it possible to avoid the negative values in RooChebychev in the first place?
To Reproduce
The code which produces the plots above:
import ROOT
canvas = ROOT.TCanvas("cv1", "cv1", 700, 500)
#ROOT.__version__ = '6.20/04' # Earlier pyROOT implementations have no __version__
mass = ROOT.RooRealVar("KS_M", "m(#pi^{+}#pi^{-}) GeV/c^{2}", 0.47, 0.53)
frame = mass.frame(ROOT.RooFit.Bins(100), ROOT.RooFit.Title(ROOT.__version__))
c1 = ROOT.RooRealVar("c1", " 1st cheb parameter",-0.5, -1, 1)
c2 = ROOT.RooRealVar("c2", " 2nd cheb parameter", -0.55, -1, 1)
bkg = ROOT.RooChebychev("bkg", "Chebyshev Polynomial", mass, ROOT.RooArgList(c1, c2))
bkg.plotOn(frame)
canvas.cd()
frame.Draw()
canvas.Draw()
canvas.Update()
canvas.SaveAs(f'pdf/chebtest_{ROOT.__version__.replace("/","")}.png')
input()
Setup
I used 6.20 and 6.24 ROOT versions on Ubuntu 18.04.