ATLAS Offline Software
Loading...
Searching...
No Matches
TruthVertexDecoratorConfig Namespace Reference

Functions

 TruthVertexDecoratorCfg (flags, name="TruthVertexDecoratorAlg", **kwargs)
 JetTruthVertexSummaryDecoratorCfg (flags, name="JetTruthVertexSummaryDecoratorAlg", **kwargs)
 TruthVertexDecoratorsCfg (flags, jetCollections=None, **kwargs)

Function Documentation

◆ JetTruthVertexSummaryDecoratorCfg()

TruthVertexDecoratorConfig.JetTruthVertexSummaryDecoratorCfg ( flags,
name = "JetTruthVertexSummaryDecoratorAlg",
** kwargs )
Configure JetTruthVertexSummaryDecoratorAlg.

Decorates jets with counts of associated truth vertices by type
(b, c, tau, strange, pion, material interaction, other).
Reads truth particle decorations produced by TruthVertexDecoratorAlg.

Definition at line 30 of file TruthVertexDecoratorConfig.py.

32):
33 """Configure JetTruthVertexSummaryDecoratorAlg.
34
35 Decorates jets with counts of associated truth vertices by type
36 (b, c, tau, strange, pion, material interaction, other).
37 Reads truth particle decorations produced by TruthVertexDecoratorAlg.
38 """
39 acc = ComponentAccumulator()
40 acc.addEventAlgo(
41 CompFactory.ParticleJetTools.JetTruthVertexSummaryDecoratorAlg(
42 name, **kwargs
43 )
44 )
45 return acc
46
47

◆ TruthVertexDecoratorCfg()

TruthVertexDecoratorConfig.TruthVertexDecoratorCfg ( flags,
name = "TruthVertexDecoratorAlg",
** kwargs )
Configure TruthVertexDecoratorAlg.

Decorates tracks and truth particles with truth vertex labels
(vertex ID, vertex type, PV distance, etc.) using the FatVertex
classification.

Definition at line 7 of file TruthVertexDecoratorConfig.py.

7def TruthVertexDecoratorCfg(flags, name="TruthVertexDecoratorAlg", **kwargs):
8 """Configure TruthVertexDecoratorAlg.
9
10 Decorates tracks and truth particles with truth vertex labels
11 (vertex ID, vertex type, PV distance, etc.) using the FatVertex
12 classification.
13 """
14 acc = ComponentAccumulator()
15
16 from InDetTrackSystematicsTools.InDetTrackSystematicsToolsConfig import (
17 InDetTrackTruthOriginToolCfg,
18 )
19 kwargs.setdefault(
20 "trackTruthOriginTool",
21 acc.popToolsAndMerge(InDetTrackTruthOriginToolCfg(flags)),
22 )
23
24 acc.addEventAlgo(
25 CompFactory.ParticleJetTools.TruthVertexDecoratorAlg(name, **kwargs)
26 )
27 return acc
28
29

◆ TruthVertexDecoratorsCfg()

TruthVertexDecoratorConfig.TruthVertexDecoratorsCfg ( flags,
jetCollections = None,
** kwargs )
Convenience: schedule truth vertex decorator + one summary alg per jet collection.

TruthVertexDecoratorAlg runs first (decorates truth particles once), then
one JetTruthVertexSummaryDecoratorAlg is scheduled per entry in
``jetCollections`` (reads the TP decorations, writes per-jet summary
decorations keyed to that jet container).

Args:
    flags: Athena ConfigFlags.
    jetCollections: list of ``(jetContainer, drThreshold)`` tuples. Each
        entry schedules a summary alg reading the given jet container and
        matching truth vertices to those jets within ``drThreshold``.
        Defaults to ``[("AntiKt4EMPFlowJets", 0.4)]``.
    **kwargs: forwarded to ``TruthVertexDecoratorCfg`` (the TP decorator).

Definition at line 48 of file TruthVertexDecoratorConfig.py.

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