Skip to content
Snippets Groups Projects
Commit 46c7dd68 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

backwards_ecal: put PLOT_TITLE to legend

parent e7d9c8f6
Branches
Tags
No related merge requests found
......@@ -154,6 +154,11 @@ rule backwards_ecal:
directory("results/backwards_ecal/{CAMPAIGN}/")
shell:
"""
if [[ "{wildcards.CAMPAIGN}" == "local" ]]; then
export PLOT_TITLE="Benchmark simulation"
else
export PLOT_TITLE="\\textbf{{ePIC}} Simulation {wildcards.CAMPAIGN}"
fi
env \
MATPLOTLIBRC={input.matplotlibrc} \
DETECTOR_CONFIG=""" + DETECTOR_CONFIG + """ \
......
......@@ -127,7 +127,7 @@ fractions_below = {}
for ix, energy in enumerate(energies):
energy_value = float(energy.replace("GeV", "").replace("MeV", "e-3"))
clf_label = "leading cluster"
clf_label = PLOT_TITLE
def clf(events):
return ak.drop_none(ak.max(events["EcalEndcapNClusters.energy"], axis=-1)) / energy_value
e_pred = clf(e_eval[energy])
......@@ -242,7 +242,7 @@ rocs = {}
for ix, energy in enumerate(energies):
energy_value = float(energy.replace("GeV", "").replace("MeV", "e-3"))
clf_label = "leading cluster"
clf_label = PLOT_TITLE
def clf(events):
return ak.drop_none(ak.max(events["EcalEndcapNClusters.energy"], axis=-1)) / energy_value
e_pred = clf(e_eval[energy])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment