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 94 of file InDetGNNTrackingConfig.py.

94 def GNNEndToEndTrackMaker(flags, name="GNNEndToEndTrackMaker", **kwargs):
95  """Sets up a GNNTrackMaker algorithm and returns it."""
96 
97  acc = ComponentAccumulator()
98 
99 
100  SeedFitterTool = acc.popToolsAndMerge(SeedFitterToolCfg(flags))
101  kwargs.setdefault("SeedFitterTool", SeedFitterTool)
102 
103  from TrkConfig.CommonTrackFitterConfig import ITkTrackFitterCfg
104  InDetTrackFitter = acc.popToolsAndMerge(ITkTrackFitterCfg(flags))
105  kwargs.setdefault("TrackFitter", InDetTrackFitter)
106 
107  if flags.Tracking.GNN.useTrackFinder:
108  InDetGNNTrackFinderTool = acc.popToolsAndMerge(GNNTrackFinderToolCfg(flags))
109  kwargs.setdefault("GNNTrackFinderTool", InDetGNNTrackFinderTool)
110  kwargs.setdefault("GNNTrackReaderTool", None)
111  elif flags.Tracking.GNN.useTrackReader:
112  InDetGNNTrackReader = acc.popToolsAndMerge(GNNTrackReaderToolCfg(flags))
113  kwargs.setdefault("GNNTrackReaderTool", InDetGNNTrackReader)
114  kwargs.setdefault("GNNTrackFinderTool", None)
115  else:
116  raise RuntimeError("GNNTrackFinder or GNNTrackReader must be enabled!")
117 
118  acc.addEventAlgo(CompFactory.InDet.SiSPGNNTrackMaker(name, **kwargs))
119  return acc
120 

◆ GNNSeedingTrackMakerCfg()

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

Definition at line 121 of file InDetGNNTrackingConfig.py.

121 def GNNSeedingTrackMakerCfg(flags, name="GNNSeedingTrackMaker", **kwargs):
122  """Sets up a GNN for seeding algorithm and returns it."""
123  acc = ComponentAccumulator()
124 
125  from InDetConfig.SiCombinatorialTrackFinderToolConfig import SiDetElementBoundaryLinksCondAlg_xk_ITkPixel_Cfg, SiDetElementBoundaryLinksCondAlg_xk_ITkStrip_Cfg
128 
129  # To produce AtlasFieldCacheCondObj
130  from MagFieldServices.MagFieldServicesConfig import (
131  AtlasFieldCacheCondAlgCfg)
132  acc.merge(AtlasFieldCacheCondAlgCfg(flags))
133 
134  from TrkConfig.TrkRIO_OnTrackCreatorConfig import ITkRotCreatorCfg
135  ITkRotCreator = acc.popToolsAndMerge(ITkRotCreatorCfg(
136  flags, name="ITkRotCreator"+flags.Tracking.ActiveConfig.extension))
137  acc.addPublicTool(ITkRotCreator)
138  kwargs.setdefault("RIOonTrackTool", ITkRotCreator)
139 
140  from TrkConfig.TrkExRungeKuttaPropagatorConfig import (
141  RungeKuttaPropagatorCfg)
142  ITkPatternPropagator = acc.popToolsAndMerge(
143  RungeKuttaPropagatorCfg(flags, name="ITkPatternPropagator"))
144  acc.addPublicTool(ITkPatternPropagator)
145  kwargs.setdefault("PropagatorTool", ITkPatternPropagator)
146 
147  from TrkConfig.TrkMeasurementUpdatorConfig import KalmanUpdator_xkCfg
148  ITkPatternUpdator = acc.popToolsAndMerge(
149  KalmanUpdator_xkCfg(flags, name="ITkPatternUpdator"))
150  acc.addPublicTool(ITkPatternUpdator)
151  kwargs.setdefault("UpdatorTool", ITkPatternUpdator)
152 
153  from InDetConfig.InDetBoundaryCheckToolConfig import ITkBoundaryCheckToolCfg
154  kwargs.setdefault("BoundaryCheckTool", acc.popToolsAndMerge(
155  ITkBoundaryCheckToolCfg(flags)))
156 
157  from PixelConditionsTools.ITkPixelConditionsSummaryConfig import (
158  ITkPixelConditionsSummaryCfg)
159  kwargs.setdefault("PixelSummaryTool", acc.popToolsAndMerge(
161 
162  from SCT_ConditionsTools.ITkStripConditionsToolsConfig import (
163  ITkStripConditionsSummaryToolCfg)
164  kwargs.setdefault("StripSummaryTool", acc.popToolsAndMerge(
166 
167  if flags.Tracking.GNN.useTrackFinder:
168  kwargs.setdefault("GNNTrackFinderTool", acc.popToolsAndMerge(GNNTrackFinderToolCfg(flags)))
169  kwargs.setdefault("GNNTrackReaderTool", None)
170  elif flags.Tracking.GNN.useTrackReader:
171  kwargs.setdefault("GNNTrackReaderTool", acc.popToolsAndMerge(GNNTrackReaderToolCfg(flags)))
172  kwargs.setdefault("GNNTrackFinderTool", None)
173  else:
174  raise RuntimeError("GNNTrackFinder or GNNTrackReader must be enabled!")
175 
176  kwargs.setdefault("SeedFitterTool", acc.popToolsAndMerge(SeedFitterToolCfg(flags)))
177 
178  from TrkConfig.CommonTrackFitterConfig import ITkTrackFitterCfg
179  kwargs.setdefault("TrackFitter", acc.popToolsAndMerge(ITkTrackFitterCfg(flags)))
180 
181  from InDetConfig.SiDetElementsRoadToolConfig import ITkSiDetElementsRoadMaker_xkCfg
182  kwargs.setdefault("RoadTool", acc.popToolsAndMerge(ITkSiDetElementsRoadMaker_xkCfg(flags)))
183 
184  # configurations for Kalman filter.
185  # similar to https://gitlab.cern.ch/atlas/athena/-/blob/main/InnerDetector/InDetConfig/python/SiTrackMakerConfig.py#L188
186  kwargs.setdefault("nClustersMin", flags.Tracking.ActiveConfig.minClusters[0])
187  kwargs.setdefault("nWeightedClustersMin", flags.Tracking.ActiveConfig.nWeightedClustersMin[0])
188  kwargs.setdefault("nHolesMax", flags.Tracking.ActiveConfig.nHolesMax[0])
189  kwargs.setdefault("nHolesGapMax", flags.Tracking.ActiveConfig.nHolesGapMax[0])
190 
191  kwargs.setdefault("pTmin", flags.Tracking.ActiveConfig.minPT[0])
192  kwargs.setdefault("pTminBrem", flags.Tracking.ActiveConfig.minPTBrem[0])
193  kwargs.setdefault("Xi2max", flags.Tracking.ActiveConfig.Xi2max[0])
194  kwargs.setdefault("Xi2maxNoAdd", flags.Tracking.ActiveConfig.Xi2maxNoAdd[0])
195  kwargs.setdefault("Xi2maxMultiTracks", flags.Tracking.ActiveConfig.Xi2max[0])
196  kwargs.setdefault("doMultiTracksProd", False)
197 
198  acc.addEventAlgo(CompFactory.InDet.GNNSeedingTrackMaker(name, **kwargs))
199  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 
41  from AthOnnxComps.OnnxRuntimeInferenceConfig import OnnxRuntimeInferenceToolCfg
42  ort_exe_provider = flags.Tracking.GNN.TrackFinder.ORTExeProvider
43  kwargs.setdefault("Embedding", acc.popToolsAndMerge(
44  OnnxRuntimeInferenceToolCfg(flags, Path(kwargs["inputMLModelDir"]) / "embedding.onnx", ort_exe_provider)
45  ))
46  kwargs.setdefault("Filtering", acc.popToolsAndMerge(
47  OnnxRuntimeInferenceToolCfg(flags, Path(kwargs["inputMLModelDir"]) / "filtering.onnx", ort_exe_provider)
48  ))
49  kwargs.setdefault("GNN", acc.popToolsAndMerge(
50  OnnxRuntimeInferenceToolCfg(flags, Path(kwargs["inputMLModelDir"]) / "gnn.onnx", ort_exe_provider)
51  ))
52 
53  acc.setPrivateTools(CompFactory.InDet.SiGNNTrackFinderTool(name, **kwargs))
54  return acc
55 
56 

◆ GNNTrackMakerCfg()

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

Definition at line 86 of file InDetGNNTrackingConfig.py.

86 def GNNTrackMakerCfg(flags, name="GNNTrackMaker", **kwargs):
87  """Sets up a GNNTrackMaker algorithm and returns it."""
88 
89  if flags.Tracking.GNN.usePixelHitsOnly:
90  return GNNSeedingTrackMakerCfg(flags, name, **kwargs)
91  else:
92  return GNNEndToEndTrackMaker(flags, name, **kwargs)
93 

◆ GNNTrackReaderToolCfg()

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

Definition at line 75 of file InDetGNNTrackingConfig.py.

75 def GNNTrackReaderToolCfg(flags, name='GNNTrackReaderTool', **kwargs):
76  """Set up a GNNTrackReader tool and return it."""
77  acc = ComponentAccumulator()
78 
79 
80  kwargs.setdefault("inputTracksDir", flags.Tracking.GNN.TrackReader.inputTracksDir)
81  kwargs.setdefault("csvPrefix", flags.Tracking.GNN.TrackReader.csvPrefix)
82 
83  acc.setPrivateTools(CompFactory.InDet.GNNTrackReaderTool(name, **kwargs))
84  return acc
85 

◆ SeedFitterToolCfg()

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

Definition at line 57 of file InDetGNNTrackingConfig.py.

57 def SeedFitterToolCfg(flags, name="SeedFitterTool", **kwargs):
58  """Sets up a SeedFitter tool and returns it."""
59  acc = ComponentAccumulator()
60 
61 
62  acc.setPrivateTools(CompFactory.InDet.SeedFitterTool(name, **kwargs))
63  return acc
64 
65 

◆ SpacepointFeatureToolCfg()

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

Definition at line 66 of file InDetGNNTrackingConfig.py.

66 def SpacepointFeatureToolCfg(flags, name="SpacepointFeatureTool", **kwargs):
67  """Sets up a SpacepointFeature tool and returns it."""
68  acc = ComponentAccumulator()
69 
70 
71  acc.setPrivateTools(CompFactory.InDet.SpacepointFeatureTool(name, **kwargs))
72  return acc
73 
74 
python.InDetGNNTrackingConfig.GNNSeedingTrackMakerCfg
def GNNSeedingTrackMakerCfg(flags, name="GNNSeedingTrackMaker", **kwargs)
Definition: InDetGNNTrackingConfig.py:121
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
ITkPixelConditionsSummaryConfig.ITkPixelConditionsSummaryCfg
def ITkPixelConditionsSummaryCfg(flags, name="ITkPixelConditionsSummary", **kwargs)
Definition: ITkPixelConditionsSummaryConfig.py:12
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:57
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:94
python.InDetGNNTrackingConfig.GNNTrackFinderToolCfg
def GNNTrackFinderToolCfg(flags, name='GNNTrackFinderTool', **kwargs)
Definition: InDetGNNTrackingConfig.py:30
python.InDetGNNTrackingConfig.GNNTrackReaderToolCfg
def GNNTrackReaderToolCfg(flags, name='GNNTrackReaderTool', **kwargs)
Definition: InDetGNNTrackingConfig.py:75
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:16
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:66
python.InDetGNNTrackingConfig.GNNTrackMakerCfg
def GNNTrackMakerCfg(flags, name="GNNTrackMaker", **kwargs)
Definition: InDetGNNTrackingConfig.py:86