48def TruthVertexDecoratorsCfg(flags, jetCollections=None, **kwargs):
49 """Convenience: schedule truth vertex decorator + one summary alg per jet collection.
50
51 TruthVertexDecoratorAlg runs first (decorates truth particles once), then
52 one JetTruthVertexSummaryDecoratorAlg is scheduled per entry in
53 ``jetCollections`` (reads the TP decorations, writes per-jet summary
54 decorations keyed to that jet container).
55
56 Args:
57 flags: Athena ConfigFlags.
58 jetCollections: list of ``(jetContainer, drThreshold)`` tuples. Each
59 entry schedules a summary alg reading the given jet container and
60 matching truth vertices to those jets within ``drThreshold``.
61 Defaults to ``[("AntiKt4EMPFlowJets", 0.4)]``.
62 **kwargs: forwarded to ``TruthVertexDecoratorCfg`` (the TP decorator).
63 """
64 if jetCollections is None:
65 jetCollections = [("AntiKt4EMPFlowJets", 0.4)]
66 acc = ComponentAccumulator()
67 acc.merge(TruthVertexDecoratorCfg(flags, **kwargs))
68 for (jet_container, dr) in jetCollections:
69 acc.merge(JetTruthVertexSummaryDecoratorCfg(
70 flags,
71 name=f"JetTruthVertexSummaryDecoratorAlg_{jet_container}",
72 jetContainer=jet_container,
73 drThreshold=dr,
74 ))
75 return acc