Commit 13323793 authored by Ross John Hunter's avatar Ross John Hunter
Browse files

Remove redundant plot

parent 5201d06f
Pipeline #3089711 failed with stage
in 18 seconds
......@@ -614,28 +614,30 @@ def main():
if not args.TOS_match_to:
args.TOS_match_to = ",".join(particles_that_have_tos_effs_in_tree)
for mcp, denom_key, logx in product(args.TOS_match_to.split(','), denoms, [True, False]):
# All TOS effs w.r.t. this particle
tos_lines_this_mcp = [tos_line for tos_line in tos_lines if tos_line.split("_")[0] == mcp]
# Plot the shape hist
eff_histos[denom_key + "__distr"].Draw("HIST")
events_with_this_denom = get_events_in_plot(
denom_key)
if len(dec_lines) > 1:
# If not then this plot ends up the same as one produced below
for mcp, denom_key, logx in product(args.TOS_match_to.split(','), denoms, [True, False]):
# All TOS effs w.r.t. this particle
tos_lines_this_mcp = [tos_line for tos_line in tos_lines if tos_line.split("_")[0] == mcp]
# Plot the shape hist
eff_histos[denom_key + "__distr"].Draw("HIST")
events_with_this_denom = get_events_in_plot(
denom_key)
for tos_line in tos_lines_this_mcp:
eff_histos["{}__{}__eff".format(
denom_key, tos_line)].Draw("SAME PE0")
for tos_line in tos_lines_this_mcp:
eff_histos["{}__{}__eff".format(
denom_key, tos_line)].Draw("SAME PE0")
line_at_one, legend = plot_legend_and_line_at_one(
[denom_key], tos_lines_this_mcp, events_with_this_denom,
denom_key, logx)
line_at_one.Draw("SAME")
if not args.no_legend: legend.Draw()
line_at_one, legend = plot_legend_and_line_at_one(
[denom_key], tos_lines_this_mcp, events_with_this_denom,
denom_key, logx)
line_at_one.Draw("SAME")
if not args.no_legend: legend.Draw()
c.Print('{}TOSEfficiencies__{}__{}__{}.{}'.format(
args.plot_prefix, mcp, denom_key,
("log" if logx else "") + var.replace(
':', '_'), args.plot_format))
c.Print('{}TOSEfficiencies__{}__{}__{}.{}'.format(
args.plot_prefix, mcp, denom_key,
("log" if logx else "") + var.replace(
':', '_'), args.plot_format))
# Now make a plot for each line with all the specified denominators
for line in lines:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment