I have a plot that I am fitting a Gaussian to, I would like to read the fit parameters of that process so I can check if any bin is overly filled (hot channels). When I try and do this I get a seg fault from root and get told
My code looks like this:
[code]
self.dig_cont[tra][sta][pla]=ROOT.TH1D(dig_name,dig_titl,216,0,215)
fit_hist = self.dig_cont[tra][sta][pla].Fit(“gaus”)
const = fit_hist.Parameter(1)[/code]
where dig_cont has been filled previously.
From output it looks like the fit is working properly, I get the parameters output to the screen. I just need to work with them in code.
As an aside. Is there a built-in way to compare bin contents with a fit, or another function? My thought on the subject was to take the parameters, find the value at x = bin and then do a GetBinContents(bin) and compare the results.
If it helps I’ve linked to an image of what the data output looks like when I’m not asking for parameters: