Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb
MooreAnalysis
Commits
13323793
Commit
13323793
authored
Oct 05, 2021
by
Ross John Hunter
Browse files
Remove redundant plot
parent
5201d06f
Pipeline
#3089711
failed with stage
in 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
HltEfficiencyChecker/scripts/hlt_line_efficiencies.py
View file @
13323793
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment