Skip to content
Snippets Groups Projects
Commit 3816c6ed authored by Patrick Koppenburg's avatar Patrick Koppenburg :leaves:
Browse files

Merge branch 'apearce-dtt-mc-truth' into 'master'

Allow stream definition in MC matching helper

See merge request lhcb/Analysis!770
parents d099dcad 4796cb8e
Branches master
No related tags found
No related merge requests found
......@@ -72,7 +72,12 @@ def associateSequence(prefix, debug):
return seq
def makeTruth(input, rels, toollist):
def makeTruth(input, rels, toollist, stream="/Event"):
"""Configure MC association algorithms on the `input` DecayTreeTuple.
The `stream` argument defines the TES prefix (`RootInTES`) under which both
the MC particles and the relations tables live.
"""
from Configurables import TupleToolMCTruth, DaVinciSmartAssociator, P2MCPFromProtoP
from Configurables import MCMatchObjP2MCRelator, TupleToolMCBackgroundInfo, BackgroundCategory
MCTruth = TupleToolMCTruth()
......@@ -82,6 +87,7 @@ def makeTruth(input, rels, toollist):
input.addTool(MCTruth)
input.TupleToolMCTruth.addTool(DaVinciSmartAssociator)
input.TupleToolMCTruth.DaVinciSmartAssociator.RootInTES = stream
input.TupleToolMCTruth.DaVinciSmartAssociator.RedoNeutral = False
input.TupleToolMCTruth.DaVinciSmartAssociator.addTool(P2MCPFromProtoP)
input.TupleToolMCTruth.DaVinciSmartAssociator.P2MCPFromProtoP.Locations = rels
......@@ -96,6 +102,7 @@ def makeTruth(input, rels, toollist):
input.addTool(TupleToolMCBackgroundInfo)
input.TupleToolMCBackgroundInfo.addTool(BackgroundCategory)
input.TupleToolMCBackgroundInfo.BackgroundCategory.RootInTES = stream
input.TupleToolMCBackgroundInfo.BackgroundCategory.vetoNeutralRedo = True
input.TupleToolMCBackgroundInfo.BackgroundCategory.addTool(P2MCPFromProtoP)
input.TupleToolMCBackgroundInfo.BackgroundCategory.P2MCPFromProtoP.Locations = rels
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment