Hi all,
I am using TF1NormSum to fit my data. The result of the fitting looks fine as you see below. I am trying to draw the 2 functions that I used but they show as a line as you see in the attached picture. I have copied the part that I did to draw the functions. Is there something wrong that I did?
Thanks in advance,
****************************************
Minimizer is Minuit2 / Migrad
Chi2 = 161.695
NDf = 46
Edm = 1.94849e-06
NCalls = 2152
NSig = 39031.7 +/- 390.32
Nbkgd = 47021.2 +/- 408.417
Mean = 0.939 (fixed)
Sigma = 0.035457 +/- 0.00030317 (limited)
Alpha = -0.523113 +/- 0.0103072 (limited)
N = 16304.6 +/- 1842.89 (limited)
p0 = -1.67539e+06 +/- 73357.9
p1 = 5.24474e+06 +/- 156862
p2 = 3.17266e+06 +/- 177887
p3 = -2.32717e+07 +/- 533497
p4 = 1.87577e+07 +/- 348942
# ++++ Plot Signal curve +++++++
f_crys.SetLineColor(kMagenta)
for i in range(0,f_crys.GetNpar()):
f_crys.SetParameter(i,f_sum.GetParameter(i+2))
integral = f_crys.Integral( 0.5, 1.2)
f_crys.SetParameter(0, f_sum.GetParameter(0) / integral)
f_crys.Draw("same")
print(f_sum.GetParameter(0) / integral)
# ++++ Plot bkgd curve +++++++
f_bc.SetLineColor(kBlue)
for i in range(0,f_bc.GetNpar()):
f_bc.SetParameter(i,f_sum.GetParameter(i+5))
f_bc.Draw("same")