Commit 2d29697f authored by Peilian Li's avatar Peilian Li
Browse files

Merge branch 'master' into b2cc_upgrade

parents 17a50738 3bccc9d2
Pipeline #1972848 passed with stage
in 25 seconds
......@@ -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 = MCDecayTreeTuple(
mcdtt = _mc_decay_tree_tuple(
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 = MCDecayTreeTuple(
mcdtt = _mc_decay_tree_tuple(
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]
......
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