ATLAS Offline Software
Functions
python.InDetGNNTrackingConfig Namespace Reference

Functions

def DumpObjectsCfg (flags, name="DumpObjects", outfile="Dump_GNN4Itk.root", **kwargs)
 
def GNNTrackFinderToolCfg (flags, name='GNNTrackFinderTool', **kwargs)
 
def SeedFitterToolCfg (flags, name="SeedFitterTool", **kwargs)
 
def SpacepointFeatureToolCfg (flags, name="SpacepointFeatureTool", **kwargs)
 
def GNNTrackReaderToolCfg (flags, name='GNNTrackReaderTool', **kwargs)
 
def GNNTrackMakerCfg (flags, name="GNNTrackMaker", **kwargs)
 
def GNNEndToEndTrackMaker (flags, name="GNNEndToEndTrackMaker", **kwargs)
 
def GNNSeedingTrackMakerCfg (flags, name="GNNSeedingTrackMaker", **kwargs)
 

Function Documentation

◆ DumpObjectsCfg()

def python.InDetGNNTrackingConfig.DumpObjectsCfg (   flags,
  name = "DumpObjects",
  outfile = "Dump_GNN4Itk.root",
**  kwargs 
)
create algorithm which dumps GNN training information to ROOT file

Definition at line 10 of file InDetGNNTrackingConfig.py.

10 def DumpObjectsCfg(
11  flags, name="DumpObjects", outfile="Dump_GNN4Itk.root", **kwargs):
12  '''
13  create algorithm which dumps GNN training information to ROOT file
14  '''
15  acc = ComponentAccumulator()
16 
17  acc.addService(
18  CompFactory.THistSvc(
19  Output=[f"{name} DATAFILE='{outfile}', OPT='RECREATE'"]
20  )
21  )
22 
23  kwargs.setdefault("NtupleFileName", flags.Tracking.GNN.DumpObjects.NtupleFileName)
24  kwargs.setdefault("NtupleTreeName", flags.Tracking.GNN.DumpObjects.NtupleTreeName)
25  kwargs.setdefault("rootFile", True)
26 
27  acc.addEventAlgo(CompFactory.InDet.DumpObjects(name, **kwargs))
28  return acc
29 

◆ GNNEndToEndTrackMaker()

def python.InDetGNNTrackingConfig.GNNEndToEndTrackMaker (   flags,
  name = "GNNEndToEndTrackMaker",
**  kwargs 
)
Sets up a GNNTrackMaker algorithm and returns it.

Definition at line 106 of file InDetGNNTrackingConfig.py.

106 def GNNEndToEndTrackMaker(flags, name="GNNEndToEndTrackMaker", **kwargs):
107  """Sets up a GNNTrackMaker algorithm and returns it."""
108 
109  acc = ComponentAccumulator()
110 
111 
112  SeedFitterTool = acc.popToolsAndMerge(SeedFitterToolCfg(flags))
113  kwargs.setdefault("SeedFitterTool", SeedFitterTool)
114 
115  from TrkConfig.CommonTrackFitterConfig import ITkTrackFitterCfg
116  InDetTrackFitter = acc.popToolsAndMerge(ITkTrackFitterCfg(flags))
117  kwargs.setdefault("TrackFitter", InDetTrackFitter)
118 
119  if "TrackSummaryTool" not in kwargs:
120  from TrkConfig.TrkTrackSummaryToolConfig import ITkTrackSummaryToolCfg
121 
122  kwargs.setdefault(
123  "TrackSummaryTool", acc.popToolsAndMerge(ITkTrackSummaryToolCfg(flags))
124  )
125 
126  if flags.Tracking.GNN.useTrackFinder:
127  InDetGNNTrackFinderTool = acc.popToolsAndMerge(GNNTrackFinderToolCfg(flags))
128  kwargs.setdefault("GNNTrackFinderTool", InDetGNNTrackFinderTool)
129  kwargs.setdefault("GNNTrackReaderTool", None)
130  elif flags.Tracking.GNN.useTrackReader:
131  InDetGNNTrackReader = acc.popToolsAndMerge(GNNTrackReaderToolCfg(flags))
132  kwargs.setdefault("GNNTrackReaderTool", InDetGNNTrackReader)
133  kwargs.setdefault("GNNTrackFinderTool", None)
134  else:
135  raise RuntimeError("GNNTrackFinder or GNNTrackReader must be enabled!")
136 
137  kwargs.setdefault("areInputClusters", flags.Tracking.GNN.useClusterTracks)
138  kwargs.setdefault("doRecoTrackCuts", flags.Tracking.GNN.doRecoTrackCuts)
139 
140  # add eta dependent cut service
141  if "InDetEtaDependentCutSvc" not in kwargs:
142  from InDetConfig.InDetEtaDependentCutsConfig import ITkEtaDependentCutsSvcCfg
143  acc.merge(ITkEtaDependentCutsSvcCfg(flags))
144  kwargs.setdefault("InDetEtaDependentCutsSvc", acc.getService("ITkEtaDependentCutsSvc"+flags.Tracking.ActiveConfig.extension))
145 
146  kwargs.setdefault("minClusters", flags.Tracking.GNN.minClusters)
147  kwargs.setdefault("pTmin", flags.Tracking.GNN.pTmin)
148  kwargs.setdefault("etamax", flags.Tracking.GNN.etamax)
149  kwargs.setdefault("minPixelClusters", flags.Tracking.GNN.minPixelClusters)
150  kwargs.setdefault("minStripClusters", flags.Tracking.GNN.minStripClusters)
151 
152  acc.addEventAlgo(CompFactory.InDet.SiSPGNNTrackMaker(name, **kwargs))
153  return acc
154 

◆ GNNSeedingTrackMakerCfg()

def python.InDetGNNTrackingConfig.GNNSeedingTrackMakerCfg (   flags,
  name = "GNNSeedingTrackMaker",
**  kwargs 
)
Sets up a GNN for seeding algorithm and returns it.

Definition at line 155 of file InDetGNNTrackingConfig.py.

155 def GNNSeedingTrackMakerCfg(flags, name="GNNSeedingTrackMaker", **kwargs):
156  """Sets up a GNN for seeding algorithm and returns it."""
157  acc = ComponentAccumulator()
158 
159  from InDetConfig.SiCombinatorialTrackFinderToolConfig import SiDetElementBoundaryLinksCondAlg_xk_ITkPixel_Cfg, SiDetElementBoundaryLinksCondAlg_xk_ITkStrip_Cfg
162 
163  # To produce AtlasFieldCacheCondObj
164  from MagFieldServices.MagFieldServicesConfig import (
165  AtlasFieldCacheCondAlgCfg)
166  acc.merge(AtlasFieldCacheCondAlgCfg(flags))
167 
168  from TrkConfig.TrkRIO_OnTrackCreatorConfig import ITkRotCreatorCfg
169  ITkRotCreator = acc.popToolsAndMerge(ITkRotCreatorCfg(
170  flags, name="ITkRotCreator"+flags.Tracking.ActiveConfig.extension))
171  acc.addPublicTool(ITkRotCreator)
172  kwargs.setdefault("RIOonTrackTool", ITkRotCreator)
173 
174  from TrkConfig.TrkExRungeKuttaPropagatorConfig import (
175  RungeKuttaPropagatorCfg)
176  ITkPatternPropagator = acc.popToolsAndMerge(
177  RungeKuttaPropagatorCfg(flags, name="ITkPatternPropagator"))
178  acc.addPublicTool(ITkPatternPropagator)
179  kwargs.setdefault("PropagatorTool", ITkPatternPropagator)
180 
181  from TrkConfig.TrkMeasurementUpdatorConfig import KalmanUpdator_xkCfg
182  ITkPatternUpdator = acc.popToolsAndMerge(
183  KalmanUpdator_xkCfg(flags, name="ITkPatternUpdator"))
184  acc.addPublicTool(ITkPatternUpdator)
185  kwargs.setdefault("UpdatorTool", ITkPatternUpdator)
186 
187  from InDetConfig.InDetBoundaryCheckToolConfig import ITkBoundaryCheckToolCfg
188  kwargs.setdefault("BoundaryCheckTool", acc.popToolsAndMerge(
189  ITkBoundaryCheckToolCfg(flags)))
190 
191  from PixelConditionsTools.ITkPixelConditionsSummaryConfig import (
192  ITkPixelConditionsSummaryCfg)
193  kwargs.setdefault("PixelSummaryTool", acc.popToolsAndMerge(
195 
196  from SCT_ConditionsTools.ITkStripConditionsToolsConfig import (
197  ITkStripConditionsSummaryToolCfg)
198  kwargs.setdefault("StripSummaryTool", acc.popToolsAndMerge(
200 
201  if flags.Tracking.GNN.useTrackFinder:
202  kwargs.setdefault("GNNTrackFinderTool", acc.popToolsAndMerge(GNNTrackFinderToolCfg(flags)))
203  kwargs.setdefault("GNNTrackReaderTool", None)
204  elif flags.Tracking.GNN.useTrackReader:
205  kwargs.setdefault("GNNTrackReaderTool", acc.popToolsAndMerge(GNNTrackReaderToolCfg(flags)))
206  kwargs.setdefault("GNNTrackFinderTool", None)
207  else:
208  raise RuntimeError("GNNTrackFinder or GNNTrackReader must be enabled!")
209 
210  kwargs.setdefault("SeedFitterTool", acc.popToolsAndMerge(SeedFitterToolCfg(flags)))
211 
212  from TrkConfig.CommonTrackFitterConfig import ITkTrackFitterCfg
213  kwargs.setdefault("TrackFitter", acc.popToolsAndMerge(ITkTrackFitterCfg(flags)))
214 
215  from InDetConfig.SiDetElementsRoadToolConfig import ITkSiDetElementsRoadMaker_xkCfg
216  kwargs.setdefault("RoadTool", acc.popToolsAndMerge(ITkSiDetElementsRoadMaker_xkCfg(flags)))
217 
218  # configurations for Kalman filter.
219  # similar to https://gitlab.cern.ch/atlas/athena/-/blob/main/InnerDetector/InDetConfig/python/SiTrackMakerConfig.py#L188
220  kwargs.setdefault("nClustersMin", flags.Tracking.ActiveConfig.minClusters[0])
221  kwargs.setdefault("nWeightedClustersMin", flags.Tracking.ActiveConfig.nWeightedClustersMin[0])
222  kwargs.setdefault("nHolesMax", flags.Tracking.ActiveConfig.nHolesMax[0])
223  kwargs.setdefault("nHolesGapMax", flags.Tracking.ActiveConfig.nHolesGapMax[0])
224 
225  kwargs.setdefault("pTmin", flags.Tracking.ActiveConfig.minPT[0])
226  kwargs.setdefault("pTminBrem", flags.Tracking.ActiveConfig.minPTBrem[0])
227  kwargs.setdefault("Xi2max", flags.Tracking.ActiveConfig.Xi2max[0])
228  kwargs.setdefault("Xi2maxNoAdd", flags.Tracking.ActiveConfig.Xi2maxNoAdd[0])
229  kwargs.setdefault("Xi2maxMultiTracks", flags.Tracking.ActiveConfig.Xi2max[0])
230  kwargs.setdefault("doMultiTracksProd", False)
231 
232  acc.addEventAlgo(CompFactory.InDet.GNNSeedingTrackMaker(name, **kwargs))
233  return acc

◆ GNNTrackFinderToolCfg()

def python.InDetGNNTrackingConfig.GNNTrackFinderToolCfg (   flags,
  name = 'GNNTrackFinderTool',
**  kwargs 
)
Sets up a GNNTrackFinderTool tool and returns it.

Definition at line 30 of file InDetGNNTrackingConfig.py.

30 def GNNTrackFinderToolCfg(flags, name='GNNTrackFinderTool', **kwargs):
31  """Sets up a GNNTrackFinderTool tool and returns it."""
32  acc = ComponentAccumulator()
33 
34 
35  kwargs.setdefault("embeddingDim", flags.Tracking.GNN.TrackFinder.embeddingDim)
36  kwargs.setdefault("rVal", flags.Tracking.GNN.TrackFinder.rVal)
37  kwargs.setdefault("knnVal", flags.Tracking.GNN.TrackFinder.knnVal)
38  kwargs.setdefault("filterCut", flags.Tracking.GNN.TrackFinder.filterCut)
39  kwargs.setdefault("inputMLModelDir", flags.Tracking.GNN.TrackFinder.inputMLModelDir)
40  kwargs.setdefault("ccCut", flags.Tracking.GNN.TrackFinder.ccCut)
41  kwargs.setdefault("walkMin", flags.Tracking.GNN.TrackFinder.walkMin)
42  kwargs.setdefault("walkMax", flags.Tracking.GNN.TrackFinder.walkMax)
43  kwargs.setdefault("EmbeddingFeatureNames", flags.Tracking.GNN.TrackFinder.EmbeddingFeatureNames)
44  kwargs.setdefault("EmbeddingFeatureScales", flags.Tracking.GNN.TrackFinder.EmbeddingFeatureScales)
45  kwargs.setdefault("FilterFeatureNames", flags.Tracking.GNN.TrackFinder.FilterFeatureNames)
46  kwargs.setdefault("FilterFeatureScales", flags.Tracking.GNN.TrackFinder.FilterFeatureScales)
47  kwargs.setdefault("GNNFeatureNames", flags.Tracking.GNN.TrackFinder.GNNFeatureNames)
48  kwargs.setdefault("GNNFeatureScales", flags.Tracking.GNN.TrackFinder.GNNFeatureScales)
49 
50  from AthOnnxComps.OnnxRuntimeInferenceConfig import OnnxRuntimeInferenceToolCfg
51  ort_exe_provider = flags.Tracking.GNN.TrackFinder.ORTExeProvider
52  kwargs.setdefault("Embedding", acc.popToolsAndMerge(
53  OnnxRuntimeInferenceToolCfg(flags, str(Path(kwargs["inputMLModelDir"]) / "embedding.onnx"),
54  ort_exe_provider, name="Embedding")
55  ))
56  kwargs.setdefault("Filtering", acc.popToolsAndMerge(
57  OnnxRuntimeInferenceToolCfg(flags, str(Path(kwargs["inputMLModelDir"]) / "filtering.onnx"),
58  ort_exe_provider, name="Filtering")
59  ))
60  kwargs.setdefault("GNN", acc.popToolsAndMerge(
61  OnnxRuntimeInferenceToolCfg(flags, str(Path(kwargs["inputMLModelDir"]) / "gnn.onnx"),
62  ort_exe_provider, name="GNN")
63  ))
64 
65  acc.setPrivateTools(CompFactory.InDet.SiGNNTrackFinderTool(name, **kwargs))
66  return acc
67 
68 

◆ GNNTrackMakerCfg()

def python.InDetGNNTrackingConfig.GNNTrackMakerCfg (   flags,
  name = "GNNTrackMaker",
**  kwargs 
)
Sets up a GNNTrackMaker algorithm and returns it.

Definition at line 98 of file InDetGNNTrackingConfig.py.

98 def GNNTrackMakerCfg(flags, name="GNNTrackMaker", **kwargs):
99  """Sets up a GNNTrackMaker algorithm and returns it."""
100 
101  if flags.Tracking.GNN.usePixelHitsOnly:
102  return GNNSeedingTrackMakerCfg(flags, name, **kwargs)
103 
104  return GNNEndToEndTrackMaker(flags, name, **kwargs)
105 

◆ GNNTrackReaderToolCfg()

def python.InDetGNNTrackingConfig.GNNTrackReaderToolCfg (   flags,
  name = 'GNNTrackReaderTool',
**  kwargs 
)
Set up a GNNTrackReader tool and return it.

Definition at line 87 of file InDetGNNTrackingConfig.py.

87 def GNNTrackReaderToolCfg(flags, name='GNNTrackReaderTool', **kwargs):
88  """Set up a GNNTrackReader tool and return it."""
89  acc = ComponentAccumulator()
90 
91 
92  kwargs.setdefault("inputTracksDir", flags.Tracking.GNN.TrackReader.inputTracksDir)
93  kwargs.setdefault("csvPrefix", flags.Tracking.GNN.TrackReader.csvPrefix)
94 
95  acc.setPrivateTools(CompFactory.InDet.GNNTrackReaderTool(name, **kwargs))
96  return acc
97 

◆ SeedFitterToolCfg()

def python.InDetGNNTrackingConfig.SeedFitterToolCfg (   flags,
  name = "SeedFitterTool",
**  kwargs 
)
Sets up a SeedFitter tool and returns it.

Definition at line 69 of file InDetGNNTrackingConfig.py.

69 def SeedFitterToolCfg(flags, name="SeedFitterTool", **kwargs):
70  """Sets up a SeedFitter tool and returns it."""
71  acc = ComponentAccumulator()
72 
73 
74  acc.setPrivateTools(CompFactory.InDet.SeedFitterTool(name, **kwargs))
75  return acc
76 
77 

◆ SpacepointFeatureToolCfg()

def python.InDetGNNTrackingConfig.SpacepointFeatureToolCfg (   flags,
  name = "SpacepointFeatureTool",
**  kwargs 
)
Sets up a SpacepointFeature tool and returns it.

Definition at line 78 of file InDetGNNTrackingConfig.py.

78 def SpacepointFeatureToolCfg(flags, name="SpacepointFeatureTool", **kwargs):
79  """Sets up a SpacepointFeature tool and returns it."""
80  acc = ComponentAccumulator()
81 
82 
83  acc.setPrivateTools(CompFactory.InDet.SpacepointFeatureTool(name, **kwargs))
84  return acc
85 
86 
python.InDetGNNTrackingConfig.GNNSeedingTrackMakerCfg
def GNNSeedingTrackMakerCfg(flags, name="GNNSeedingTrackMaker", **kwargs)
Definition: InDetGNNTrackingConfig.py:155
python.TrkRIO_OnTrackCreatorConfig.ITkRotCreatorCfg
def ITkRotCreatorCfg(flags, name='ITkRotCreator', **kwargs)
Definition: TrkRIO_OnTrackCreatorConfig.py:134
python.SiDetElementsRoadToolConfig.ITkSiDetElementsRoadMaker_xkCfg
def ITkSiDetElementsRoadMaker_xkCfg(flags, name="ITkSiRoadMaker", **kwargs)
Definition: SiDetElementsRoadToolConfig.py:61
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrkMeasurementUpdatorConfig.KalmanUpdator_xkCfg
def KalmanUpdator_xkCfg(flags, name='KalmanUpdator_xk', **kwargs)
Definition: TrkMeasurementUpdatorConfig.py:14
python.InDetBoundaryCheckToolConfig.ITkBoundaryCheckToolCfg
def ITkBoundaryCheckToolCfg(flags, name='ITkBoundaryCheckTool', **kwargs)
Definition: InDetBoundaryCheckToolConfig.py:102
python.InDetEtaDependentCutsConfig.ITkEtaDependentCutsSvcCfg
def ITkEtaDependentCutsSvcCfg(flags, name='ITkEtaDependentCutsSvc', **kwargs)
Definition: InDetEtaDependentCutsConfig.py:7
ITkPixelConditionsSummaryConfig.ITkPixelConditionsSummaryCfg
def ITkPixelConditionsSummaryCfg(flags, name="ITkPixelConditionsSummary", **kwargs)
Definition: ITkPixelConditionsSummaryConfig.py:13
python.CommonTrackFitterConfig.ITkTrackFitterCfg
def ITkTrackFitterCfg(flags, name='ITkTrackFitter', **kwargs)
ITk configs #####.
Definition: CommonTrackFitterConfig.py:126
python.SiCombinatorialTrackFinderToolConfig.SiDetElementBoundaryLinksCondAlg_xk_ITkStrip_Cfg
def SiDetElementBoundaryLinksCondAlg_xk_ITkStrip_Cfg(flags, name="ITkSiDetElementBoundaryLinksStripCondAlg", **kwargs)
Definition: SiCombinatorialTrackFinderToolConfig.py:51
python.InDetGNNTrackingConfig.SeedFitterToolCfg
def SeedFitterToolCfg(flags, name="SeedFitterTool", **kwargs)
Definition: InDetGNNTrackingConfig.py:69
python.TrkExRungeKuttaPropagatorConfig.RungeKuttaPropagatorCfg
def RungeKuttaPropagatorCfg(flags, name='AtlasRungeKuttaPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:9
python.InDetGNNTrackingConfig.GNNEndToEndTrackMaker
def GNNEndToEndTrackMaker(flags, name="GNNEndToEndTrackMaker", **kwargs)
Definition: InDetGNNTrackingConfig.py:106
python.InDetGNNTrackingConfig.GNNTrackFinderToolCfg
def GNNTrackFinderToolCfg(flags, name='GNNTrackFinderTool', **kwargs)
Definition: InDetGNNTrackingConfig.py:30
python.TrkTrackSummaryToolConfig.ITkTrackSummaryToolCfg
def ITkTrackSummaryToolCfg(flags, name='ITkTrackSummaryTool', **kwargs)
Definition: TrkTrackSummaryToolConfig.py:94
python.InDetGNNTrackingConfig.GNNTrackReaderToolCfg
def GNNTrackReaderToolCfg(flags, name='GNNTrackReaderTool', **kwargs)
Definition: InDetGNNTrackingConfig.py:87
python.OnnxRuntimeInferenceConfig.OnnxRuntimeInferenceToolCfg
def OnnxRuntimeInferenceToolCfg(flags, str model_fname=None, Optional[OnnxRuntimeType] execution_provider=None, name="OnnxRuntimeInferenceTool", **kwargs)
Definition: OnnxRuntimeInferenceConfig.py:9
python.ITkStripConditionsToolsConfig.ITkStripConditionsSummaryToolCfg
def ITkStripConditionsSummaryToolCfg(flags, name="ITkStripConditionsSummaryTool", **kwargs)
Definition: ITkStripConditionsToolsConfig.py:17
str
Definition: BTagTrackIpAccessor.cxx:11
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8
python.InDetGNNTrackingConfig.DumpObjectsCfg
def DumpObjectsCfg(flags, name="DumpObjects", outfile="Dump_GNN4Itk.root", **kwargs)
Definition: InDetGNNTrackingConfig.py:10
python.SiCombinatorialTrackFinderToolConfig.SiDetElementBoundaryLinksCondAlg_xk_ITkPixel_Cfg
def SiDetElementBoundaryLinksCondAlg_xk_ITkPixel_Cfg(flags, name="ITkSiDetElementBoundaryLinksPixelCondAlg", **kwargs)
Definition: SiCombinatorialTrackFinderToolConfig.py:36
python.InDetGNNTrackingConfig.SpacepointFeatureToolCfg
def SpacepointFeatureToolCfg(flags, name="SpacepointFeatureTool", **kwargs)
Definition: InDetGNNTrackingConfig.py:78
python.InDetGNNTrackingConfig.GNNTrackMakerCfg
def GNNTrackMakerCfg(flags, name="GNNTrackMaker", **kwargs)
Definition: InDetGNNTrackingConfig.py:98