Skip to content

Commit

Permalink
fix significance optimization (#854)
Browse files Browse the repository at this point in the history
Co-authored-by: Luigi Dello Stritto <[email protected]>
  • Loading branch information
DelloStritto and Luigi Dello Stritto authored Feb 2, 2024
1 parent b91a205 commit 80a621e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions machine_learning_hep/optimiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def do_efficiency(self):
plt.ylabel('Model Efficiency', fontsize=20)
plt.title("Efficiency vs Threshold", fontsize=20)
# FIXME: Different future signal selection?
df_sig = self.df_mltest[self.df_mltest["ismcprompt"] == 1]
df_sig = self.df_mltest_applied[self.df_mltest_applied["ismcprompt"] == 1]
for name in self.p_classname:
eff_array, eff_err_array, x_axis = calc_sigeff_steps(self.p_nstepsign, df_sig, name)
plt.figure(fig_eff.number)
Expand Down Expand Up @@ -661,8 +661,8 @@ def do_significance(self):
df_fonll_Lc = df_fonll.Get(self.p_fonllparticle+"_"+self.p_fonllband)
bin_min = df_fonll_Lc.FindBin(self.p_binmin)
bin_max = df_fonll_Lc.FindBin(self.p_binmax)
prod_cross = df_fonll_Lc.Integral(bin_min, bin_max)* self.p_fragf * 1e-12 / delta_pt
signal_yield = 2. * prod_cross * delta_pt * acc * self.p_taa * self.p_br \
prod_cross = df_fonll_Lc.Integral(bin_min, bin_max) * self.p_fragf * 1e-12 / delta_pt
signal_yield = 2. * prod_cross * delta_pt * acc * self.p_taa \
/ (self.p_sigmamb * self.p_fprompt)
#now we plot the fonll expectation
cFONLL = TCanvas('cFONLL', 'The FONLL expectation')
Expand All @@ -675,7 +675,7 @@ def do_significance(self):
df_fonll.query('(pt >= @self.p_binmin) and (pt < @self.p_binmax)')\
[self.p_fonllband]
prod_cross = df_fonll_in_pt.sum() * self.p_fragf * 1e-12 / delta_pt
signal_yield = 2. * prod_cross * delta_pt * self.p_br * acc * self.p_taa \
signal_yield = 2. * prod_cross * delta_pt * acc * self.p_taa \
/ (self.p_sigmamb * self.p_fprompt)
#now we plot the fonll expectation
fig = plt.figure(figsize=(20, 15))
Expand Down Expand Up @@ -729,7 +729,7 @@ def do_significance(self):
plt.xticks(fontsize=18)
plt.yticks(fontsize=18)

df_sig = self.df_mltest[self.df_mltest["ismcprompt"] == 1]
df_sig = self.df_mltest_applied[self.df_mltest_applied["ismcprompt"] == 1]

for name in self.p_classname:
eff_array, eff_err_array, x_axis = calc_sigeff_steps(self.p_nstepsign, df_sig, name)
Expand Down

0 comments on commit 80a621e

Please sign in to comment.