diff --git a/machine_learning_hep/fitting/roofitter.py b/machine_learning_hep/fitting/roofitter.py index b26dfe32c4..8c15d5e3ef 100644 --- a/machine_learning_hep/fitting/roofitter.py +++ b/machine_learning_hep/fitting/roofitter.py @@ -193,12 +193,12 @@ def create_text_info(x_1, y_1, x_2, y_2): return text_info -def add_text_info_fit(text_info, frame, ws): +def add_text_info_fit(text_info, frame, roows): chi2 = frame.chiSquare() - mean_sgn = ws.var("mean") - sigma_sgn = ws.var("sigma_g1") - sigmawide_sgn = ws.var("sigma_wide") - refl_frac = ws.var("frac_refl") + mean_sgn = roows.var("mean") + sigma_sgn = roows.var("sigma_g1") + sigmawide_sgn = roows.var("sigma_wide") + refl_frac = roows.var("frac_refl") text_info.AddText(f"#chi^{{2}}/ndf = {chi2:.2f}") text_info.AddText(f"#mu = {mean_sgn.getVal():.3f} #pm {mean_sgn.getError():.3f}") text_info.AddText(f"#sigma = {sigma_sgn.getVal():.3f} #pm {sigma_sgn.getError():.3f}") @@ -207,8 +207,6 @@ def add_text_info_fit(text_info, frame, ws): if refl_frac: text_info.AddText(f"refl.frac. = {refl_frac.getVal():.3f} #pm {refl_frac.getError():.3f}") - return - def add_text_info_perf(text_info, sig, sig_err, bkg, bkg_err, s_over_b, s_over_b_err, signif, signif_err): @@ -216,5 +214,3 @@ def add_text_info_perf(text_info, sig, sig_err, bkg, bkg_err, s_over_b, s_over_b text_info.AddText(f"B(3#sigma) = {bkg:.0f} #pm {bkg_err:.0f}") text_info.AddText(f"S/B(3#sigma) = {s_over_b:.3f} #pm {s_over_b_err:.3f}") text_info.AddText(f"Signif(3#sigma) = {signif:.1f} #pm {signif_err:.1f}") - - return