ATLAS Offline Software
SiSPSeededTrackFinderConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 # Configuration of SiSPSeededTrackFinder package
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from TrkConfig.TrackingPassFlags import RoIStrategy
6 from AthenaConfiguration.Enums import ProductionStep
7 
8 def SiSPSeededTrackFinderCfg(flags, name="InDetSiSpTrackFinder", **kwargs):
10 
11  if "TrackTool" not in kwargs:
12  from InDetConfig.SiTrackMakerConfig import SiTrackMaker_xkCfg
13  kwargs.setdefault("TrackTool", acc.popToolsAndMerge(
14  SiTrackMaker_xkCfg(flags)))
15 
16  if "PropagatorTool" not in kwargs:
17  from TrkConfig.TrkExRungeKuttaPropagatorConfig import InDetPropagatorCfg
18  InDetPropagator = acc.popToolsAndMerge(InDetPropagatorCfg(flags))
19  acc.addPublicTool(InDetPropagator)
20  kwargs.setdefault("PropagatorTool", InDetPropagator)
21 
22  if "TrackSummaryTool" not in kwargs:
23  from TrkConfig.TrkTrackSummaryToolConfig import (
24  InDetTrackSummaryToolNoHoleSearchCfg)
25  kwargs.setdefault("TrackSummaryTool", acc.popToolsAndMerge(
27 
28  if "SeedsTool" not in kwargs:
29  from InDetConfig.SiSpacePointsSeedToolConfig import (
30  SiSpacePointsSeedMakerCfg)
31  kwargs.setdefault("SeedsTool", acc.popToolsAndMerge(
33 
34  if flags.Tracking.ActiveConfig.usePrdAssociationTool:
35  # not all classes have that property !!!
36  kwargs.setdefault("PRDtoTrackMap", (
37  'InDetPRDtoTrackMap' + flags.Tracking.ActiveConfig.extension))
38 
39  kwargs.setdefault("useZBoundFinding",
40  flags.Tracking.ActiveConfig.doZBoundary)
41 
42  if flags.Common.ProductionStep is ProductionStep.PileUpPretracking:
43  kwargs.setdefault("EventInfoKey", flags.Overlay.BkgPrefix + "EventInfo")
44 
45  # Heavy-ion config
46  kwargs.setdefault("useZvertexTool",
47  flags.Tracking.ActiveConfig.extension in ["HeavyIon", "VtxLumiHeavyIon"])
48  if flags.Tracking.ActiveConfig.extension in ["HeavyIon", "VtxLumiHeavyIon"]:
49  # Optimization from Igor
50  kwargs.setdefault("FreeClustersCut", 2)
51  kwargs.setdefault("useMBTSTimeDiff", True)
52 
53  # Z-coordinates primary vertices finder (only for collisions)
54  if "ZvertexTool" not in kwargs:
55  from InDetConfig.SiZvertexToolConfig import SiZvertexMaker_xkCfg
56  kwargs.setdefault("ZvertexTool", acc.popToolsAndMerge(
57  SiZvertexMaker_xkCfg(flags)))
58 
59  acc.addEventAlgo(CompFactory.InDet.SiSPSeededTrackFinder(
60  name+flags.Tracking.ActiveConfig.extension, **kwargs))
61  return acc
62 
63 def TrigSiSPSeededTrackFinderCfg(flags, name="InDetTrigSiSpTrackFinder", **kwargs):
64  acc = ComponentAccumulator()
65 
66  if "TracksLocation" not in kwargs:
67  kwargs.setdefault("TracksLocation", flags.Tracking.ActiveConfig.trkTracks_IDTrig)
68 
69  kwargs.setdefault("SpacePointsSCTName","SCT_TrigSpacePoints")
70  kwargs.setdefault("SpacePointsPixelName","PixelTrigSpacePoints")
71 
72  if "TrackTool" not in kwargs:
73  from InDetConfig.SiTrackMakerConfig import TrigSiTrackMaker_xkCfg
74  kwargs.setdefault("TrackTool", acc.popToolsAndMerge(
75  TrigSiTrackMaker_xkCfg(flags)))
76 
77  #for the time being no need of InDetTrigPropagator
78  # acc.popToolsAndMerge(InDetPropagatorCfg(flags, name="InDetTrigPropagator"))
79 
80  if "TrackSummaryTool" not in kwargs:
81  from TrkConfig.TrkTrackSummaryToolConfig import (
82  InDetTrigFastTrackSummaryToolCfg)
83  kwargs.setdefault("TrackSummaryTool", acc.popToolsAndMerge(
85 
86  if "SeedsTool" not in kwargs:
87  from InDetConfig.SiSpacePointsSeedToolConfig import (
88  TrigSiSpacePointsSeedMakerCfg)
89  kwargs.setdefault("SeedsTool", acc.popToolsAndMerge(
91 
92  # Heavy-ion config (TODO the steering for the trigger)
93  kwargs.setdefault("useMBTSTimeDiff", False)
94  kwargs.setdefault("useZvertexTool", False)
95  kwargs.setdefault("useZBoundFinding",
96  flags.Tracking.ActiveConfig.doZBoundary)
97  if flags.Reco.EnableHI:
98  # Heavy Ion optimization from Igor
99  kwargs.setdefault("FreeClustersCut", 2)
100 
101 
102  if flags.Tracking.ActiveConfig.usePrdAssociationTool:
103  # not all classes have that property !!!
104  kwargs.setdefault("PRDtoTrackMap", (
105  'InDetPRDtoTrackMap' + flags.Tracking.ActiveConfig.input_name))
106  else:
107  kwargs.setdefault("PRDtoTrackMap", "")
108 
109  acc.merge(SiSPSeededTrackFinderCfg(flags, name, **kwargs))
110  return acc
111 
112 def ITkSiSPSeededTrackFinderCfg(flags, name="ITkSiSpTrackFinder", **kwargs):
113  acc = ComponentAccumulator()
114 
115  if "TrackTool" not in kwargs:
116  from InDetConfig.SiTrackMakerConfig import ITkSiTrackMaker_xkCfg
117  kwargs.setdefault("TrackTool", acc.popToolsAndMerge(
118  ITkSiTrackMaker_xkCfg(flags)))
119 
120  if "PropagatorTool" not in kwargs:
121  from TrkConfig.TrkExRungeKuttaPropagatorConfig import ITkPropagatorCfg
122  ITkPropagator = acc.popToolsAndMerge(ITkPropagatorCfg(flags))
123  acc.addPublicTool(ITkPropagator)
124  kwargs.setdefault("PropagatorTool", ITkPropagator)
125 
126  if "TrackSummaryTool" not in kwargs:
127  from TrkConfig.TrkTrackSummaryToolConfig import (
128  ITkTrackSummaryToolNoHoleSearchCfg)
129  kwargs.setdefault("TrackSummaryTool", acc.popToolsAndMerge(
131 
132  if "SeedsTool" not in kwargs:
133  ITkSiSpacePointsSeedMaker = None
134 
135  if (flags.Tracking.ActiveConfig.extension != "Conversion" and
136  flags.Tracking.ActiveConfig.doActsToAthenaSeed):
137  from ActsConfig.ActsSeedingConfig import (
138  ActsSiSpacePointsSeedMakerToolCfg)
139  ITkSiSpacePointsSeedMaker = acc.popToolsAndMerge(
141  else:
142  from InDetConfig.SiSpacePointsSeedToolConfig import (
143  ITkSiSpacePointsSeedMakerCfg)
144  ITkSiSpacePointsSeedMaker = acc.popToolsAndMerge(
146 
147  kwargs.setdefault("SeedsTool", ITkSiSpacePointsSeedMaker)
148 
149  if flags.Tracking.ActiveConfig.usePrdAssociationTool:
150  # not all classes have that property !!!
151  kwargs.setdefault("PRDtoTrackMap", (
152  'ITkPRDtoTrackMap' + flags.Tracking.ActiveConfig.extension))
153 
154  kwargs.setdefault("useZvertexTool", False)
155  kwargs.setdefault("useZBoundFinding",
156  flags.Tracking.ActiveConfig.doZBoundary)
157  kwargs.setdefault("ITKGeometry", True)
158  kwargs.setdefault("SpacePointsSCTName", "ITkStripSpacePoints"
159  if flags.Tracking.ActiveConfig.useITkStripSeeding else "")
160  kwargs.setdefault("SpacePointsPixelName", "ITkPixelSpacePoints"
161  if flags.Tracking.ActiveConfig.useITkPixelSeeding else "")
162  if flags.Common.ProductionStep is ProductionStep.PileUpPretracking:
163  kwargs.setdefault("EventInfoKey", flags.Overlay.BkgPrefix + "EventInfo")
164 
165  if flags.Tracking.doITkFastTracking:
166  kwargs.setdefault("doFastTracking", True)
167  kwargs.setdefault("writeHolesFromPattern", True)
168 
169  if 'InDetEtaDependentCutsSvc' not in kwargs:
170  from InDetConfig.InDetEtaDependentCutsConfig import (
171  ITkEtaDependentCutsSvcCfg)
172  acc.merge(ITkEtaDependentCutsSvcCfg(flags))
173  kwargs.setdefault("InDetEtaDependentCutsSvc", acc.getService(
174  "ITkEtaDependentCutsSvc"+flags.Tracking.ActiveConfig.extension))
175 
176  acc.addEventAlgo(CompFactory.InDet.SiSPSeededTrackFinder(
177  name+flags.Tracking.ActiveConfig.extension, **kwargs))
178  return acc
179 
180 
182  flags, name="ITkSiSpTrackFinderROIConv", **kwargs):
183  from InDetConfig.InDetCaloClusterROISelectorConfig import (
184  ITkCaloClusterROIPhiRZContainerMakerCfg)
186 
187  if "RegSelTool_Strip" not in kwargs:
188  from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg
189  kwargs.setdefault("RegSelTool_Strip", acc.popToolsAndMerge(
190  regSelTool_ITkStrip_Cfg(flags)))
191 
192  kwargs.setdefault("useITkConvSeeded", True)
193  kwargs.setdefault("EMROIPhiRZContainer",
194  "ITkCaloClusterROIPhiRZ15GeVUnordered")
195 
196  if "SeedsTool" not in kwargs:
197  if flags.Tracking.ActiveConfig.doActsToAthenaSeed:
198  from ActsConfig.ActsSeedingConfig import ActsSiSpacePointsSeedMakerToolCfg
199  kwargs.setdefault("SeedsTool", acc.popToolsAndMerge(ActsSiSpacePointsSeedMakerToolCfg(flags)))
200  else:
201  from InDetConfig.SiSpacePointsSeedToolConfig import ITkSiSpacePointsSeedMakerCfg
202  kwargs.setdefault("SeedsTool", acc.popToolsAndMerge(ITkSiSpacePointsSeedMakerCfg(flags)))
203 
204  acc.merge(ITkSiSPSeededTrackFinderCfg(flags, name, **kwargs))
205  return acc
206 
207 
208 def SiSPSeededTrackFinderRoICfg(flags, name="InDetSiSpTrackFinderRoI", **kwargs):
209  acc = ComponentAccumulator()
210 
211  if "TrackTool" not in kwargs:
212  from InDetConfig.SiTrackMakerConfig import SiTrackMaker_xkCfg
213  kwargs.setdefault("TrackTool", acc.popToolsAndMerge(
214  SiTrackMaker_xkCfg(flags)))
215 
216  if "TrackSummaryTool" not in kwargs:
217  from TrkConfig.TrkTrackSummaryToolConfig import (
218  InDetTrackSummaryToolNoHoleSearchCfg)
219  kwargs.setdefault("TrackSummaryTool", acc.popToolsAndMerge(
221 
222  if "SeedsTool" not in kwargs:
223  from InDetConfig.SiSpacePointsSeedToolConfig import (
224  SiSpacePointsSeedMakerCfg)
225  kwargs.setdefault("SeedsTool", acc.popToolsAndMerge(
227 
228  if flags.Tracking.ActiveConfig.usePrdAssociationTool:
229  kwargs.setdefault("PRDtoTrackMap", (
230  'InDetPRDtoTrackMap' + flags.Tracking.ActiveConfig.extension))
231 
232  if "ZWindowRoISeedTool" not in kwargs:
233  if flags.Tracking.ActiveConfig.RoIStrategy is RoIStrategy.LeadTracks:
234  from InDetConfig.ZWindowRoISeedToolConfig import (
235  LeadTracksRoISeedToolCfg as ZWindowRoISeedToolCfg)
236  elif flags.Tracking.ActiveConfig.RoIStrategy is RoIStrategy.Random:
237  from InDetConfig.ZWindowRoISeedToolConfig import (
238  RandomRoISeedToolCfg as ZWindowRoISeedToolCfg)
239  elif flags.Tracking.ActiveConfig.RoIStrategy is RoIStrategy.File:
240  from InDetConfig.ZWindowRoISeedToolConfig import (
241  FileRoISeedToolCfg as ZWindowRoISeedToolCfg)
242  elif flags.Tracking.ActiveConfig.RoIStrategy is RoIStrategy.TruthHS:
243  from InDetConfig.ZWindowRoISeedToolConfig import (
244  TruthHSRoISeedToolCfg as ZWindowRoISeedToolCfg)
245  kwargs.setdefault("ZWindowRoISeedTool", acc.popToolsAndMerge(
246  ZWindowRoISeedToolCfg(flags)))
247 
248  kwargs.setdefault("doRandomSpot", flags.Tracking.ActiveConfig.doRandomSpot)
249  if (flags.Tracking.ActiveConfig.doRandomSpot and
250  "RandomRoISeedTool" not in kwargs):
251  from InDetConfig.ZWindowRoISeedToolConfig import RandomRoISeedToolCfg
252  kwargs.setdefault("RandomRoISeedTool", acc.popToolsAndMerge(
253  RandomRoISeedToolCfg(flags)))
254 
255  kwargs.setdefault("useRoIWidth", flags.Tracking.ActiveConfig.z0WindowRoI>0)
256  kwargs.setdefault("VxOutputName",
257  "RoIVertices"+flags.Tracking.ActiveConfig.extension)
258 
259  acc.addEventAlgo(CompFactory.InDet.SiSPSeededTrackFinderRoI(
260  name+flags.Tracking.ActiveConfig.extension, **kwargs))
261 
262  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrkTrackSummaryToolConfig.InDetTrigFastTrackSummaryToolCfg
def InDetTrigFastTrackSummaryToolCfg(flags, name="InDetTrigFastTrackSummaryTool", **kwargs)
Definition: TrkTrackSummaryToolConfig.py:71
python.InDetEtaDependentCutsConfig.ITkEtaDependentCutsSvcCfg
def ITkEtaDependentCutsSvcCfg(flags, name='ITkEtaDependentCutsSvc', **kwargs)
Definition: InDetEtaDependentCutsConfig.py:7
python.SiSpacePointsSeedToolConfig.SiSpacePointsSeedMakerCfg
def SiSpacePointsSeedMakerCfg(flags, **kwargs)
Definition: SiSpacePointsSeedToolConfig.py:131
python.SiSpacePointsSeedToolConfig.TrigSiSpacePointsSeedMakerCfg
def TrigSiSpacePointsSeedMakerCfg(flags, **kwargs)
Definition: SiSpacePointsSeedToolConfig.py:164
python.InDetCaloClusterROISelectorConfig.ITkCaloClusterROIPhiRZContainerMakerCfg
def ITkCaloClusterROIPhiRZContainerMakerCfg(flags, name="ITkCaloClusterROIPhiRZContainerMaker", **kwargs)
Definition: InDetCaloClusterROISelectorConfig.py:69
RegSelToolConfig.regSelTool_ITkStrip_Cfg
def regSelTool_ITkStrip_Cfg(flags)
Definition: RegSelToolConfig.py:128
python.SiSPSeededTrackFinderConfig.SiSPSeededTrackFinderCfg
def SiSPSeededTrackFinderCfg(flags, name="InDetSiSpTrackFinder", **kwargs)
Definition: SiSPSeededTrackFinderConfig.py:8
python.ZWindowRoISeedToolConfig.RandomRoISeedToolCfg
def RandomRoISeedToolCfg(flags, **kwargs)
Definition: ZWindowRoISeedToolConfig.py:29
python.SiSPSeededTrackFinderConfig.ITkSiSPSeededTrackFinderROIConvCfg
def ITkSiSPSeededTrackFinderROIConvCfg(flags, name="ITkSiSpTrackFinderROIConv", **kwargs)
Definition: SiSPSeededTrackFinderConfig.py:181
python.TrkExRungeKuttaPropagatorConfig.ITkPropagatorCfg
def ITkPropagatorCfg(flags, name='ITkPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:40
python.SiZvertexToolConfig.SiZvertexMaker_xkCfg
def SiZvertexMaker_xkCfg(flags, name="InDetZvertexMaker", **kwargs)
Definition: SiZvertexToolConfig.py:6
ActsSeedingConfig.ActsSiSpacePointsSeedMakerToolCfg
ComponentAccumulator ActsSiSpacePointsSeedMakerToolCfg(flags, str name='ActsSiSpacePointsSeedMakerTool', **kwargs)
Definition: ActsSeedingConfig.py:174
python.SiSPSeededTrackFinderConfig.SiSPSeededTrackFinderRoICfg
def SiSPSeededTrackFinderRoICfg(flags, name="InDetSiSpTrackFinderRoI", **kwargs)
Definition: SiSPSeededTrackFinderConfig.py:208
python.SiTrackMakerConfig.SiTrackMaker_xkCfg
def SiTrackMaker_xkCfg(flags, name="InDetSiTrackMaker", **kwargs)
Definition: SiTrackMakerConfig.py:7
python.SiSPSeededTrackFinderConfig.TrigSiSPSeededTrackFinderCfg
def TrigSiSPSeededTrackFinderCfg(flags, name="InDetTrigSiSpTrackFinder", **kwargs)
Definition: SiSPSeededTrackFinderConfig.py:63
python.SiSpacePointsSeedToolConfig.ITkSiSpacePointsSeedMakerCfg
def ITkSiSpacePointsSeedMakerCfg(flags, name="ITkSpSeedsMaker", **kwargs)
Definition: SiSpacePointsSeedToolConfig.py:203
python.SiTrackMakerConfig.TrigSiTrackMaker_xkCfg
def TrigSiTrackMaker_xkCfg(flags, name="TrigSiTrackMaker", **kwargs)
Definition: SiTrackMakerConfig.py:119
python.TrkExRungeKuttaPropagatorConfig.InDetPropagatorCfg
def InDetPropagatorCfg(flags, name='InDetPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:20
python.SiSPSeededTrackFinderConfig.ITkSiSPSeededTrackFinderCfg
def ITkSiSPSeededTrackFinderCfg(flags, name="ITkSiSpTrackFinder", **kwargs)
Definition: SiSPSeededTrackFinderConfig.py:112
python.TrkTrackSummaryToolConfig.InDetTrackSummaryToolNoHoleSearchCfg
def InDetTrackSummaryToolNoHoleSearchCfg(flags, name='InDetTrackSummaryToolNoHoleSearch', **kwargs)
Definition: TrkTrackSummaryToolConfig.py:47
python.SiTrackMakerConfig.ITkSiTrackMaker_xkCfg
def ITkSiTrackMaker_xkCfg(flags, name="ITkSiTrackMaker", **kwargs)
Definition: SiTrackMakerConfig.py:163
python.TrkTrackSummaryToolConfig.ITkTrackSummaryToolNoHoleSearchCfg
def ITkTrackSummaryToolNoHoleSearchCfg(flags, name='ITkTrackSummaryToolNoHoleSearch', **kwargs)
Definition: TrkTrackSummaryToolConfig.py:115