ATLAS Offline Software
SiTrackMakerConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 # Configuration of SiTrackMakerTool_xk package
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 from AthenaConfiguration.Enums import BeamType
5 
6 
7 def SiTrackMaker_xkCfg(flags, name="InDetSiTrackMaker", **kwargs):
8  # To produce BeamSpotData and AtlasFieldCacheCondObj
9  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
10  from MagFieldServices.MagFieldServicesConfig import (
11  AtlasFieldCacheCondAlgCfg)
12  acc = BeamSpotCondAlgCfg(flags)
13  acc.merge(AtlasFieldCacheCondAlgCfg(flags))
14 
15  if "RoadTool" not in kwargs:
16  from InDetConfig.SiDetElementsRoadToolConfig import (
17  SiDetElementsRoadMaker_xkCfg)
18  kwargs.setdefault("RoadTool", acc.popToolsAndMerge(
20 
21  if "CombinatorialTrackFinder" not in kwargs:
22  from InDetConfig.SiCombinatorialTrackFinderToolConfig import (
23  SiCombinatorialTrackFinder_xkCfg)
24  kwargs.setdefault("CombinatorialTrackFinder", acc.popToolsAndMerge(
26 
27  kwargs.setdefault("useSCT", flags.Tracking.ActiveConfig.useSCT)
28  kwargs.setdefault("usePixel", flags.Tracking.ActiveConfig.usePixel)
29 
30  kwargs.setdefault("pTmin", flags.Tracking.ActiveConfig.minPT)
31  kwargs.setdefault("pTminBrem", flags.Tracking.ActiveConfig.minPTBrem)
32  kwargs.setdefault("nClustersMin", flags.Tracking.ActiveConfig.minClusters)
33  kwargs.setdefault("nHolesMax", flags.Tracking.ActiveConfig.nHolesMax)
34  kwargs.setdefault("nHolesGapMax", flags.Tracking.ActiveConfig.nHolesGapMax)
35  kwargs.setdefault("UseSeedFilter",
36  flags.Tracking.ActiveConfig.useSeedFilter)
37  kwargs.setdefault("Xi2max", flags.Tracking.ActiveConfig.Xi2max)
38  kwargs.setdefault("Xi2maxNoAdd", flags.Tracking.ActiveConfig.Xi2maxNoAdd)
39  kwargs.setdefault("nWeightedClustersMin",
40  flags.Tracking.ActiveConfig.nWeightedClustersMin)
41 
42  kwargs.setdefault("CosmicTrack", flags.Beam.Type is BeamType.Cosmics)
43  kwargs.setdefault("Xi2maxMultiTracks", flags.Tracking.ActiveConfig.Xi2max)
44  kwargs.setdefault("useSSSseedsFilter", True)
45  kwargs.setdefault("doMultiTracksProd", True)
46 
47  kwargs.setdefault("useBremModel",
48  flags.Tracking.ActiveConfig.doBremRecoverySi)
49  kwargs.setdefault("doCaloSeededBrem", flags.Tracking.doCaloSeededBrem)
50 
51  if kwargs["useBremModel"] and kwargs["doCaloSeededBrem"]:
52  from InDetConfig.InDetCaloClusterROISelectorConfig import (
53  CaloClusterROIPhiRZContainerMakerCfg)
54  acc.merge(CaloClusterROIPhiRZContainerMakerCfg(flags))
55 
56  kwargs.setdefault("doHadCaloSeedSSS", flags.Tracking.doHadCaloSeededSSS)
57 
58  if kwargs["doHadCaloSeedSSS"]:
59  from InDetConfig.InDetCaloClusterROISelectorConfig import (
60  HadCaloClusterROIPhiRZContainerMakerCfg)
62 
63  kwargs.setdefault("phiWidth", flags.Tracking.phiWidthBrem)
64  kwargs.setdefault("etaWidth", flags.Tracking.etaWidthBrem)
65  kwargs.setdefault("EMROIPhiRZContainer", "InDetCaloClusterROIPhiRZ0GeV")
66  kwargs.setdefault("HadROIPhiRZContainer", "InDetHadCaloClusterROIPhiRZ")
67  kwargs.setdefault("UseAssociationTool",
68  flags.Tracking.ActiveConfig.usePrdAssociationTool)
69 
70  if flags.Beam.Type is BeamType.Cosmics:
71  kwargs.setdefault("TrackPatternRecoInfo",
72  'SiSpacePointsSeedMaker_Cosmic')
73 
74  elif flags.Tracking.ActiveConfig.extension == "LowPt":
75  kwargs.setdefault("TrackPatternRecoInfo",
76  'SiSpacePointsSeedMaker_LowMomentum')
77 
78  elif (flags.Tracking.ActiveConfig.extension == "VeryLowPt" or
79  (flags.Tracking.ActiveConfig.extension == "Pixel" and
80  flags.Tracking.doMinBias)):
81  kwargs.setdefault("TrackPatternRecoInfo",
82  'SiSpacePointsSeedMaker_VeryLowMomentum')
83 
84  elif flags.Tracking.ActiveConfig.extension == "HeavyIon":
85  kwargs.setdefault("TrackPatternRecoInfo",
86  'SiSpacePointsSeedMaker_HeavyIon')
87 
88  elif flags.Tracking.ActiveConfig.extension == "BeamGas":
89  kwargs.setdefault("TrackPatternRecoInfo",
90  'SiSpacePointsSeedMaker_BeamGas')
91 
92  elif flags.Tracking.ActiveConfig.extension == "Forward":
93  kwargs.setdefault("TrackPatternRecoInfo",
94  'SiSpacePointsSeedMaker_ForwardTracks')
95 
96  elif "LargeD0" in flags.Tracking.ActiveConfig.extension:
97  kwargs.setdefault("TrackPatternRecoInfo",
98  'SiSpacePointsSeedMaker_LargeD0')
99 
100  else:
101  kwargs.setdefault("TrackPatternRecoInfo", 'SiSPSeededFinder')
102 
103  # Enable storing seeds if requested.
104  # Always for primary pass. Only if appropriate flag is set for other passes.
105  if (flags.Tracking.doStoreTrackSeeds and
106  (flags.Tracking.ActiveConfig.extension == "" or flags.Tracking.ActiveConfig.storeTrackSeeds) and
107  "SeedToTrackConversion" not in kwargs):
108  from InDetConfig.SeedToTrackConversionToolConfig import (
109  SeedToTrackConversionToolCfg)
110  kwargs.setdefault("SeedToTrackConversion", acc.popToolsAndMerge(
112  kwargs.setdefault("SeedSegmentsWrite", True)
113 
114  acc.setPrivateTools(CompFactory.InDet.SiTrackMaker_xk(
115  name+flags.Tracking.ActiveConfig.extension, **kwargs))
116  return acc
117 
118 
119 def TrigSiTrackMaker_xkCfg(flags, name="TrigSiTrackMaker", **kwargs):
120  # To produce BeamSpotData and AtlasFieldCacheCondObj
121  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
122  from MagFieldServices.MagFieldServicesConfig import (
123  AtlasFieldCacheCondAlgCfg)
124  acc = BeamSpotCondAlgCfg(flags)
125  acc.merge(AtlasFieldCacheCondAlgCfg(flags))
126 
127  if "RoadTool" not in kwargs:
128  from InDetConfig.SiDetElementsRoadToolConfig import (
129  SiDetElementsRoadMaker_xkCfg)
130  kwargs.setdefault("RoadTool", acc.popToolsAndMerge(
132 
133  if "CombinatorialTrackFinder" not in kwargs:
134  from InDetConfig.SiCombinatorialTrackFinderToolConfig import (
135  SiCombinatorialTrackFinder_xk_Trig_Cfg)
136  kwargs.setdefault("CombinatorialTrackFinder", acc.popToolsAndMerge(
138 
139  kwargs.setdefault("pTmin", flags.Tracking.ActiveConfig.minPT)
140  kwargs.setdefault("nClustersMin", flags.Tracking.ActiveConfig.nClustersMin)
141  kwargs.setdefault("nHolesMax", flags.Tracking.ActiveConfig.nHolesMax)
142  kwargs.setdefault("nHolesGapMax",
143  flags.Tracking.ActiveConfig.nHolesGapMax)
144  kwargs.setdefault("UseSeedFilter",
145  flags.Tracking.ActiveConfig.useSeedFilter)
146  kwargs.setdefault("Xi2max", flags.Tracking.ActiveConfig.Xi2max)
147  kwargs.setdefault("Xi2maxNoAdd", flags.Tracking.ActiveConfig.Xi2maxNoAdd)
148  kwargs.setdefault("nWeightedClustersMin",
149  flags.Tracking.ActiveConfig.nWeightedClustersMin)
150  kwargs.setdefault("Xi2maxMultiTracks", flags.Tracking.ActiveConfig.Xi2max)
151  kwargs.setdefault("UseAssociationTool", False)
152 
153  kwargs.setdefault("useBremModel",
154  flags.Tracking.ActiveConfig.doBremRecoverySi)
155 
156  kwargs.setdefault("CosmicTrack",
157  flags.Tracking.ActiveConfig.input_name == "cosmics")
158 
159  acc.setPrivateTools(CompFactory.InDet.SiTrackMaker_xk(name, **kwargs))
160  return acc
161 
162 
163 def ITkSiTrackMaker_xkCfg(flags, name="ITkSiTrackMaker", **kwargs):
164  # To produce BeamSpotData and AtlasFieldCacheCondObj
165  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
166  from MagFieldServices.MagFieldServicesConfig import (
167  AtlasFieldCacheCondAlgCfg)
168  acc = BeamSpotCondAlgCfg(flags)
169  acc.merge(AtlasFieldCacheCondAlgCfg(flags))
170 
171  if "RoadTool" not in kwargs:
172  from InDetConfig.SiDetElementsRoadToolConfig import (
173  ITkSiDetElementsRoadMaker_xkCfg)
174  kwargs.setdefault("RoadTool", acc.popToolsAndMerge(
176 
177  if "CombinatorialTrackFinder" not in kwargs:
178  from InDetConfig.SiCombinatorialTrackFinderToolConfig import (
179  ITkSiCombinatorialTrackFinder_xkCfg)
180  kwargs.setdefault("CombinatorialTrackFinder", acc.popToolsAndMerge(
182 
183  kwargs.setdefault("useSCT", flags.Tracking.ActiveConfig.useITkStrip)
184  kwargs.setdefault("usePixel", flags.Tracking.ActiveConfig.useITkPixel)
185  kwargs.setdefault("etaBins", flags.Tracking.ActiveConfig.etaBins)
186  kwargs.setdefault("pTBins", flags.Tracking.ActiveConfig.minPT)
187  kwargs.setdefault("pTmin", flags.Tracking.ActiveConfig.minPT[0])
188  kwargs.setdefault("pTminBrem", flags.Tracking.ActiveConfig.minPTBrem[0])
189  kwargs.setdefault("nClustersMin",
190  min(flags.Tracking.ActiveConfig.minClusters))
191  kwargs.setdefault("nHolesMax", flags.Tracking.ActiveConfig.nHolesMax[0])
192  kwargs.setdefault("nHolesGapMax",
193  flags.Tracking.ActiveConfig.nHolesGapMax[0])
194  kwargs.setdefault("UseSeedFilter",
195  flags.Tracking.ActiveConfig.useSeedFilter)
196  kwargs.setdefault("Xi2max", flags.Tracking.ActiveConfig.Xi2max[0])
197  kwargs.setdefault("Xi2maxNoAdd", flags.Tracking.ActiveConfig.Xi2maxNoAdd[0])
198  kwargs.setdefault("nWeightedClustersMin",
199  flags.Tracking.ActiveConfig.nWeightedClustersMin[0])
200  kwargs.setdefault("CosmicTrack", flags.Beam.Type is BeamType.Cosmics)
201  kwargs.setdefault("Xi2maxMultiTracks",
202  flags.Tracking.ActiveConfig.Xi2max[0])
203  kwargs.setdefault("doMultiTracksProd", True)
204 
205  # Disabled for second passes in reco
206  kwargs.setdefault("useBremModel",
207  flags.Tracking.ActiveConfig.doBremRecoverySi)
208  kwargs.setdefault("doCaloSeededBrem", flags.Tracking.doCaloSeededBrem)
209 
210  if kwargs["useBremModel"] and kwargs["doCaloSeededBrem"]:
211  from InDetConfig.InDetCaloClusterROISelectorConfig import (
212  ITkCaloClusterROIPhiRZContainerMakerCfg)
214 
215  kwargs.setdefault("doHadCaloSeedSSS", flags.Tracking.doHadCaloSeededSSS)
216 
217  if kwargs["doHadCaloSeedSSS"]:
218  from InDetConfig.InDetCaloClusterROISelectorConfig import (
219  ITkHadCaloClusterROIPhiRZContainerMakerCfg)
221 
222  kwargs.setdefault("phiWidth", flags.Tracking.phiWidthBrem)
223  kwargs.setdefault("etaWidth", flags.Tracking.etaWidthBrem)
224  kwargs.setdefault("EMROIPhiRZContainer", "ITkCaloClusterROIPhiRZ0GeV")
225  kwargs.setdefault("HadROIPhiRZContainer", "ITkHadCaloClusterROIPhiRZ")
226  kwargs.setdefault("UseAssociationTool",
227  flags.Tracking.ActiveConfig.usePrdAssociationTool)
228  kwargs.setdefault("ITKGeometry", True)
229 
230  if flags.Beam.Type is BeamType.Cosmics:
231  kwargs.setdefault("TrackPatternRecoInfo",
232  'SiSpacePointsSeedMaker_Cosmic')
233 
234  elif flags.Tracking.ActiveConfig.extension == "Conversion":
235  kwargs.setdefault("TrackPatternRecoInfo",
236  'SiSpacePointsSeedMaker_ITkConversionTracks')
237 
238  elif flags.Tracking.ActiveConfig.extension == "LargeD0":
239  kwargs.setdefault("TrackPatternRecoInfo",
240  'SiSpacePointsSeedMaker_LargeD0')
241 
242  elif flags.Tracking.ActiveConfig.extension == "LowPt":
243  kwargs.setdefault("TrackPatternRecoInfo",
244  'SiSpacePointsSeedMaker_LowMomentum')
245 
246  else:
247  kwargs.setdefault("TrackPatternRecoInfo", 'SiSPSeededFinder')
248 
249  if (flags.Tracking.doStoreTrackSeeds and
250  "SeedToTrackConversion" not in kwargs):
251  from InDetConfig.SeedToTrackConversionToolConfig import (
252  ITkSeedToTrackConversionToolCfg)
253  kwargs.setdefault("SeedToTrackConversion", acc.popToolsAndMerge(
255  kwargs.setdefault("SeedSegmentsWrite", True)
256 
257  acc.setPrivateTools(CompFactory.InDet.SiTrackMaker_xk(
258  name+flags.Tracking.ActiveConfig.extension, **kwargs))
259  return acc
python.SeedToTrackConversionToolConfig.ITkSeedToTrackConversionToolCfg
def ITkSeedToTrackConversionToolCfg(flags, name="ITkSeedToTrackConversionTool", **kwargs)
Definition: SeedToTrackConversionToolConfig.py:34
python.SiDetElementsRoadToolConfig.ITkSiDetElementsRoadMaker_xkCfg
def ITkSiDetElementsRoadMaker_xkCfg(flags, name="ITkSiRoadMaker", **kwargs)
Definition: SiDetElementsRoadToolConfig.py:61
python.SiCombinatorialTrackFinderToolConfig.SiCombinatorialTrackFinder_xkCfg
def SiCombinatorialTrackFinder_xkCfg(flags, name="InDetSiComTrackFinder", **kwargs)
Definition: SiCombinatorialTrackFinderToolConfig.py:66
python.BeamSpotConditionsConfig.BeamSpotCondAlgCfg
def BeamSpotCondAlgCfg(flags, name="BeamSpotCondAlg", **kwargs)
Definition: BeamSpotConditionsConfig.py:7
python.SiCombinatorialTrackFinderToolConfig.ITkSiCombinatorialTrackFinder_xkCfg
def ITkSiCombinatorialTrackFinder_xkCfg(flags, name="ITkSiComTrackFinder", **kwargs)
Definition: SiCombinatorialTrackFinderToolConfig.py:205
python.SeedToTrackConversionToolConfig.SeedToTrackConversionToolCfg
def SeedToTrackConversionToolCfg(flags, name="SeedToTrackConversionTool", **kwargs)
Definition: SeedToTrackConversionToolConfig.py:6
python.SiDetElementsRoadToolConfig.SiDetElementsRoadMaker_xkCfg
def SiDetElementsRoadMaker_xkCfg(flags, name="InDetSiRoadMaker", **kwargs)
Definition: SiDetElementsRoadToolConfig.py:8
python.SiCombinatorialTrackFinderToolConfig.SiCombinatorialTrackFinder_xk_Trig_Cfg
def SiCombinatorialTrackFinder_xk_Trig_Cfg(flags, name="InDetTrigSiComTrackFinder", **kwargs)
Definition: SiCombinatorialTrackFinderToolConfig.py:145
python.InDetCaloClusterROISelectorConfig.CaloClusterROIPhiRZContainerMakerCfg
def CaloClusterROIPhiRZContainerMakerCfg(flags, name="CaloClusterROIPhiRZContainerMaker", **kwargs)
Definition: InDetCaloClusterROISelectorConfig.py:7
python.InDetCaloClusterROISelectorConfig.ITkCaloClusterROIPhiRZContainerMakerCfg
def ITkCaloClusterROIPhiRZContainerMakerCfg(flags, name="ITkCaloClusterROIPhiRZContainerMaker", **kwargs)
Definition: InDetCaloClusterROISelectorConfig.py:69
python.InDetCaloClusterROISelectorConfig.HadCaloClusterROIPhiRZContainerMakerCfg
def HadCaloClusterROIPhiRZContainerMakerCfg(flags, name="HadCaloClusterROIPhiRZContainerMaker", **kwargs)
Definition: InDetCaloClusterROISelectorConfig.py:131
python.InDetCaloClusterROISelectorConfig.ITkHadCaloClusterROIPhiRZContainerMakerCfg
def ITkHadCaloClusterROIPhiRZContainerMakerCfg(flags, name="ITkHadCaloClusterROIPhiRZContainerMaker", **kwargs)
Definition: InDetCaloClusterROISelectorConfig.py:178
min
#define min(a, b)
Definition: cfImp.cxx:40
python.SiTrackMakerConfig.SiTrackMaker_xkCfg
def SiTrackMaker_xkCfg(flags, name="InDetSiTrackMaker", **kwargs)
Definition: SiTrackMakerConfig.py:7
python.SiTrackMakerConfig.TrigSiTrackMaker_xkCfg
def TrigSiTrackMaker_xkCfg(flags, name="TrigSiTrackMaker", **kwargs)
Definition: SiTrackMakerConfig.py:119
python.SiTrackMakerConfig.ITkSiTrackMaker_xkCfg
def ITkSiTrackMaker_xkCfg(flags, name="ITkSiTrackMaker", **kwargs)
Definition: SiTrackMakerConfig.py:163
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8