Skip to content

Commit

Permalink
backwards_ecal: smooth fil_between, adjust xlim
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl committed Dec 19, 2024
1 parent 46c7dd6 commit e1cea9e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions benchmarks/backwards_ecal/backwards_ecal.org
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,17 @@ for clf_label, sigma_rel_FWHM_cb in sigmas_rel_FWHM_cb.items():
lw=0.5,
label=f"Functional fit: ${np.ceil(stochastic * 10) / 10:.1f}\% / \sqrt{{E}} \oplus {np.ceil(constant * 10) / 10:.1f}\%$",
)
xmin = np.min(energy_values)
xmax = np.max(energy_values) * 1.05
xs = np.arange(xmin, xmax + 0.1, 0.1)
plt.fill_between(
energy_values,
np.sqrt((2 / np.sqrt(energy_values)) ** 2 + 1 ** 2),
np.sqrt((2 / np.sqrt(energy_values)) ** 2 + 3 ** 2),
alpha=0.2, color="black", label=r"YR requirement $2\% / \sqrt{E} \oplus (1-3)\%$",
xs,
np.sqrt((2 / np.sqrt(xs)) ** 2 + 1 ** 2),
np.sqrt((2 / np.sqrt(xs)) ** 2 + 3 ** 2),
lw=0., alpha=0.2, color="black", label=r"YR requirement $2\% / \sqrt{E} \oplus (1-3)\%$",
)
plt.ylim(top=10.)
plt.xlim(0., xmax)
plt.ylim(top=6.)
plt.legend()
plt.xlabel("Energy, GeV", loc="right")
plt.ylabel(r"$\sigma_{E} / E$ derived from FWHM, %", loc="top")
Expand Down Expand Up @@ -296,6 +300,8 @@ for clf_label, roc in rocs.items():
marker=".",
label=f"{clf_label}",
)
xmax = np.max(energy_values) * 1.05
plt.xlim(0., xmax)
plt.yscale("log")
plt.legend()
plt.xlabel("Energy, GeV")
Expand Down

0 comments on commit e1cea9e

Please sign in to comment.