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
3bccc9d2
Commit
3bccc9d2
authored
Sep 17, 2020
by
Dorothea Vom Bruch
Browse files
Merge branch 'apearce-implicit-mc-scheduling' into 'master'
Avoid explicit MC unpacker scheduling See merge request
!20
parents
bb7750ee
c0546629
Pipeline
#1945216
passed with stage
in 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
HltEfficiencyChecker/python/HltEfficiencyChecker/config.py
View file @
3bccc9d2
...
...
@@ -24,6 +24,25 @@ from Hlt2Conf.data_from_file import mc_unpackers, make_mc_track_info
from
RecoConf.hlt1_allen
import
make_allen_dec_reports
def
_mc_decay_tree_tuple_input_transform
(
MCParticles
,
MCVertices
,
MCTrackInfo
):
return
dict
(
ExtraInputs
=
[
MCParticles
,
MCVertices
,
MCTrackInfo
])
def
_mc_decay_tree_tuple
(
**
kwargs
):
"""Return an MCDecayTreeTuple configured with MC inputs."""
all_objects
=
mc_unpackers
()
particles
=
all_objects
[
"MCParticles"
]
vertices
=
all_objects
[
"MCVertices"
]
return
MCDecayTreeTuple
(
MCParticles
=
particles
,
MCVertices
=
vertices
,
MCTrackInfo
=
make_mc_track_info
(),
# The input transform allows PyConf to figure out the inputs to this
# algorithm that it will need to declare to the scheduler
input_transform
=
_mc_decay_tree_tuple_input_transform
,
**
kwargs
)
def
run_allen_in_moore_with_tuples
(
options
,
descriptor_template
=
None
,
public_tools
=
[]):
...
...
@@ -100,19 +119,13 @@ def add_efficiency_tuples_allen(allen_node, descriptor_template=None):
tool_list
=
[
ttei
.
getFullName
(),
ttt
.
getFullName
()]
if
efficiency_mode
:
decay
,
branches
,
_
=
parse_descriptor_template
(
descriptor_template
)
mcdtt
=
MCD
ecay
T
ree
T
uple
(
mcdtt
=
_mc_d
ecay
_t
ree
_t
uple
(
Decay
=
decay
,
Branches
=
branches
,
ToolList
=
tool_list
+
[
mcttkin
.
getFullName
(),
mcttrec
.
getFullName
()])
nodes
=
[
# Puts the MCParticle info into the data flow
mc_unpackers
()[
"MCParticles"
],
mc_unpackers
()[
"MCVertices"
],
make_mc_track_info
(),
mcdtt
]
nodes
=
[
mcdtt
]
else
:
et
=
EventTuple
(
ToolList
=
tool_list
)
nodes
=
[
et
]
...
...
@@ -209,19 +222,13 @@ def add_efficiency_tuples(moore_cf, descriptor_template=None):
tool_list
=
[
ttei
.
getFullName
(),
ttt
.
getFullName
()]
if
efficiency_mode
:
decay
,
branches
,
_
=
parse_descriptor_template
(
descriptor_template
)
mcdtt
=
MCD
ecay
T
ree
T
uple
(
mcdtt
=
_mc_d
ecay
_t
ree
_t
uple
(
Decay
=
decay
,
Branches
=
branches
,
ToolList
=
tool_list
+
[
mcttkin
.
getFullName
(),
mcttrec
.
getFullName
()])
nodes
=
[
# Puts the MCParticle info into the data flow
mc_unpackers
()[
"MCParticles"
],
mc_unpackers
()[
"MCVertices"
],
make_mc_track_info
(),
mcdtt
]
nodes
=
[
mcdtt
]
else
:
et
=
EventTuple
(
ToolList
=
tool_list
)
nodes
=
[
et
]
...
...
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