Hi, I’m trying to use the TF1::GetX method to calculate the asymmetric half-widths of a function, but in some degenerate cases, the half-width point is outside the function range (or doesn’t exist). What does TF1::GetX return in that case? I tried looking deeper into the Brent solver thing, but it wasn’t ever clear.
Here is my example PyROOT code that tries to do this:
f_double_expo = ROOT.TF1("f_double_expo","expo(0)+expo(2)",minx,maxx)
f_double_expo.SetParameters(3.5,-475,5.6,-11563)
f_double_expo.SetNpx(1000)
f_p = g.Fit(f_double_expo,"RSWM")
mode = f_double_expo.GetMaximumX(minx,maxx,1e-10,1000)
mode_y = f_double_expo(mode)
upper_width = f_double_expo.GetX(mode_y/2.0,mode,maxx,1e-10,1000)
lower_width = f_double_expo.GetX(mode_y/2.0,minx,mode,1e-10,1000)
The problem in this particular example is that upper_width and lower_width are both equal! In fact, lower_width ends up being greater than mode, even though I set mode as an upper limit. What is going on?
Jean-François