ATLAS Offline Software
InDetTrackSummaryHelperToolConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 # Configuration of InDetTrackSummaryHelperTool package
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 
7 def InDetTrackSummaryHelperToolCfg(flags, name='InDetSummaryHelper', **kwargs):
8  if flags.Detector.GeometryITk:
9  name = name.replace("InDet", "ITk")
10  return ITkTrackSummaryHelperToolCfg(flags, name, **kwargs)
11 
12  result = ComponentAccumulator()
13 
14  if "HoleSearch" not in kwargs:
15  from InDetConfig.InDetTrackHoleSearchConfig import (
16  InDetTrackHoleSearchToolCfg)
17  kwargs.setdefault("HoleSearch", result.popToolsAndMerge(
19 
20  if not flags.Detector.EnableTRT:
21  kwargs.setdefault("TRTStrawSummarySvc", "")
22 
23  kwargs.setdefault("usePixel", flags.Detector.EnablePixel)
24  kwargs.setdefault("useSCT", flags.Detector.EnableSCT)
25  kwargs.setdefault("useTRT", flags.Detector.EnableTRT)
26 
27  result.setPrivateTools(
28  CompFactory.InDet.InDetTrackSummaryHelperTool(name, **kwargs))
29  return result
30 
31 
33  flags, name='InDetSummaryHelperNoHoleSearch', **kwargs):
34  kwargs.setdefault("HoleSearch", None)
35  return InDetTrackSummaryHelperToolCfg(flags, name, **kwargs)
36 
37 
39  flags, name="InDetTrigSummaryHelper", **kwargs):
40 
41  result = ComponentAccumulator()
42 
43  kwargs.setdefault("useTRT", flags.Detector.EnableTRT)
44 
45  # can always set HoleSearchTool - the actual search is controlled by
46  # TrackSummaryTool cfg
47  if "HoleSearch" not in kwargs:
48  from InDetConfig.InDetTrackHoleSearchConfig import (
49  TrigHoleSearchToolCfg)
50  kwargs.setdefault("HoleSearch", result.popToolsAndMerge(
51  TrigHoleSearchToolCfg(flags)))
52 
53  # Kept for consistency with previous config but unclear if different from
54  # default TRT_StrawStatusSummaryTool loaded in C++
55  if "TRTStrawSummarySvc" not in kwargs:
56  from TRT_ConditionsServices.TRT_ConditionsServicesConfig import (
57  TRT_StrawStatusSummaryToolCfg)
58  kwargs.setdefault("TRTStrawSummarySvc", result.popToolsAndMerge(
60 
61  kwargs.setdefault("usePixel", flags.Detector.EnablePixel)
62  kwargs.setdefault("useSCT", flags.Detector.EnableSCT)
63 
64  result.setPrivateTools(
65  CompFactory.InDet.InDetTrackSummaryHelperTool(name, **kwargs))
66  return result
67 
68 
70  flags, name="InDetTrigSummaryHelperSharedHits", **kwargs):
71  return TrigTrackSummaryHelperToolCfg(flags, name,
72  DoSharedHits=True,
73  **kwargs)
74 
75 
77  flags, name="InDetTrigSummaryHelperSiOnly", **kwargs):
78  return TrigTrackSummaryHelperToolCfg(flags, name,
79  useTRT=False,
80  TRTStrawSummarySvc=None,
81  **kwargs)
82 
83 
84 def ITkTrackSummaryHelperToolCfg(flags, name='ITkSummaryHelper', **kwargs):
85  result = ComponentAccumulator()
86 
87  if "HoleSearch" not in kwargs:
88  from InDetConfig.InDetTrackHoleSearchConfig import (
89  ITkTrackHoleSearchToolCfg)
90  kwargs.setdefault("HoleSearch", result.popToolsAndMerge(
92 
93  kwargs.setdefault("TRTStrawSummarySvc", "")
94  kwargs.setdefault("usePixel", flags.Detector.EnableITkPixel)
95  kwargs.setdefault("useSCT", flags.Detector.EnableITkStrip)
96  kwargs.setdefault("useTRT", False)
97 
98  result.setPrivateTools(
99  CompFactory.InDet.InDetTrackSummaryHelperTool(name, **kwargs))
100  return result
101 
102 
104  flags, name='ITkSummaryHelperNoHoleSearch', **kwargs):
105  kwargs.setdefault("HoleSearch", None)
106  return ITkTrackSummaryHelperToolCfg(flags, name, **kwargs)
107 
108 
110  flags, name='CombinedMuonIDSummaryHelper', **kwargs):
111  result = ComponentAccumulator()
112 
113  if "HoleSearch" not in kwargs:
114  from InDetConfig.InDetTrackHoleSearchConfig import (
115  CombinedMuonIDHoleSearchCfg)
116  kwargs.setdefault("HoleSearch", result.popToolsAndMerge(
118 
119  result.setPrivateTools(result.popToolsAndMerge(
120  InDetTrackSummaryHelperToolCfg(flags, name, **kwargs)))
121  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.InDetTrackSummaryHelperToolConfig.TrigTrackSummaryHelperToolSiOnlyCfg
def TrigTrackSummaryHelperToolSiOnlyCfg(flags, name="InDetTrigSummaryHelperSiOnly", **kwargs)
Definition: InDetTrackSummaryHelperToolConfig.py:76
python.TRT_ConditionsServicesConfig.TRT_StrawStatusSummaryToolCfg
def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", forceLegacyAccess=False, **kwargs)
Definition: TRT_ConditionsServicesConfig.py:23
python.InDetTrackHoleSearchConfig.CombinedMuonIDHoleSearchCfg
def CombinedMuonIDHoleSearchCfg(flags, name='CombinedMuonIDHoleSearch', **kwargs)
Definition: InDetTrackHoleSearchConfig.py:77
python.InDetTrackSummaryHelperToolConfig.TrigTrackSummaryHelperToolCfg
def TrigTrackSummaryHelperToolCfg(flags, name="InDetTrigSummaryHelper", **kwargs)
Definition: InDetTrackSummaryHelperToolConfig.py:38
python.InDetTrackSummaryHelperToolConfig.InDetSummaryHelperNoHoleSearchCfg
def InDetSummaryHelperNoHoleSearchCfg(flags, name='InDetSummaryHelperNoHoleSearch', **kwargs)
Definition: InDetTrackSummaryHelperToolConfig.py:32
python.InDetTrackSummaryHelperToolConfig.TrigTrackSummaryHelperToolSharedHitsCfg
def TrigTrackSummaryHelperToolSharedHitsCfg(flags, name="InDetTrigSummaryHelperSharedHits", **kwargs)
Definition: InDetTrackSummaryHelperToolConfig.py:69
python.InDetTrackSummaryHelperToolConfig.ITkSummaryHelperNoHoleSearchCfg
def ITkSummaryHelperNoHoleSearchCfg(flags, name='ITkSummaryHelperNoHoleSearch', **kwargs)
Definition: InDetTrackSummaryHelperToolConfig.py:103
python.InDetTrackSummaryHelperToolConfig.CombinedMuonIDSummaryHelperToolCfg
def CombinedMuonIDSummaryHelperToolCfg(flags, name='CombinedMuonIDSummaryHelper', **kwargs)
Definition: InDetTrackSummaryHelperToolConfig.py:109
python.InDetTrackHoleSearchConfig.ITkTrackHoleSearchToolCfg
def ITkTrackHoleSearchToolCfg(flags, name='ITkHoleSearchTool', **kwargs)
Definition: InDetTrackHoleSearchConfig.py:56
python.InDetTrackHoleSearchConfig.TrigHoleSearchToolCfg
def TrigHoleSearchToolCfg(flags, name="InDetTrigHoleSearchTool", **kwargs)
Definition: InDetTrackHoleSearchConfig.py:34
python.InDetTrackHoleSearchConfig.InDetTrackHoleSearchToolCfg
def InDetTrackHoleSearchToolCfg(flags, name='InDetHoleSearchTool', **kwargs)
Definition: InDetTrackHoleSearchConfig.py:8
python.InDetTrackSummaryHelperToolConfig.ITkTrackSummaryHelperToolCfg
def ITkTrackSummaryHelperToolCfg(flags, name='ITkSummaryHelper', **kwargs)
Definition: InDetTrackSummaryHelperToolConfig.py:84
python.InDetTrackSummaryHelperToolConfig.InDetTrackSummaryHelperToolCfg
def InDetTrackSummaryHelperToolCfg(flags, name='InDetSummaryHelper', **kwargs)
Definition: InDetTrackSummaryHelperToolConfig.py:7