ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetGNNTracking
python
InDetGNNTrackingConfigFlags.py
Go to the documentation of this file.
1
#
2
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
#
4
from
AthenaConfiguration.AthConfigFlags
import
AthConfigFlags
5
from
AthOnnxComps.OnnxRuntimeFlags
import
OnnxRuntimeType
6
from
AthenaConfiguration.Enums
import
FlagEnum
7
8
9
class
GNNTrackFinderToolType
(FlagEnum):
10
TrackReader =
"TrackReader"
11
TrackFinder =
"TrackFinder"
12
Triton =
"Triton"
13
ActsPipeline =
"ActsPipeline"
14
15
16
class
ActsGNNTrackBuilderType
(FlagEnum):
17
JunctionRemoval =
"junctionremoval"
18
EdgeLayerConnector =
"edgelayerconnector"
19
DWalk =
"dwalk"
20
21
22
def
createGNNTrackingConfigFlags
():
23
"""Create flags for configuring the GNN tracking."""
24
icf = AthConfigFlags()
25
icf.addFlag(
"Tracking.GNN.ToolType"
, GNNTrackFinderToolType.TrackReader, type=GNNTrackFinderToolType)
26
icf.addFlag(
"Tracking.GNN.usePixelHitsOnly"
,
False
)
27
28
# Dump objects
29
icf.addFlag(
"Tracking.GNN.DumpObjects.NtupleFileName"
,
"/DumpObjects/"
)
30
icf.addFlag(
"Tracking.GNN.DumpObjects.NtupleTreeName"
,
"GNN4ITk"
)
31
32
# GNN Track finder tool
33
icf.addFlag(
"Tracking.GNN.TrackFinder.inputMLModelDir"
,
"TrainedMLModels4ITk"
)
34
icf.addFlag(
"Tracking.GNN.TrackFinder.ORTExeProvider"
, OnnxRuntimeType.CPU)
35
36
# GNN Track Reader Tool
37
icf.addFlag(
"Tracking.GNN.TrackReader.inputTracksDir"
,
"gnntracks"
)
38
icf.addFlag(
"Tracking.GNN.TrackReader.csvPrefix"
,
"track"
)
39
40
icf.addFlag(
"Tracking.GNN.useClusterTracks"
,
False
)
41
42
# the following cuts are applied to the tracks before the track fitting
43
icf.addFlag(
"Tracking.GNN.minPixelClusters"
, 1)
44
icf.addFlag(
"Tracking.GNN.minStripClusters"
, 0)
45
icf.addFlag(
"Tracking.GNN.minClusters"
, 6)
46
47
# the following cuts are applied to the tracks after the track fitting
48
icf.addFlag(
"Tracking.GNN.etamax"
, 4.0)
49
import
AthenaCommon.SystemOfUnits
as
Units
50
icf.addFlag(
"Tracking.GNN.pTmin"
, 400. * Units.MeV)
51
52
# this option applies eta dependent track selection to the output tracks
53
icf.addFlag(
"Tracking.GNN.doRecoTrackCuts"
,
True
)
54
55
# this option turns on the recovery attempts for failed track fits
56
icf.addFlag(
"Tracking.GNN.doRecoverFailedFits"
,
True
)
57
58
# this option turns on the ambiguity resolution, False by default
59
icf.addFlag(
"Tracking.GNN.doAmbiResolution"
,
False
)
60
61
# Triton Tool
62
icf.addFlag(
"Tracking.GNN.Triton.url"
,
"localhost"
)
63
icf.addFlag(
"Tracking.GNN.Triton.model"
,
"MetricLearning"
)
64
icf.addFlag(
"Tracking.GNN.Triton.port"
, 8001)
65
icf.addFlag(
"Tracking.GNN.spacepointFeatures"
,
"r,phi,z,cluster_x_1,cluster_y_1,cluster_z_1,cluster_x_2,cluster_y_2,cluster_z_2,count_1,charge_count_1,loc_eta_1,loc_phi_1,localDir0_1,localDir1_1,localDir2_1,lengthDir0_1,lengthDir1_1,lengthDir2_1,glob_eta_1,glob_phi_1,eta_angle_1,phi_angle_1,count_2,charge_count_2,loc_eta_2,loc_phi_2,localDir0_2,localDir1_2,localDir2_2,lengthDir0_2,lengthDir1_2,lengthDir2_2,glob_eta_2,glob_phi_2,eta_angle_2,phi_angle_2,eta,cluster_r_1,cluster_phi_1,cluster_eta_1,cluster_r_2,cluster_phi_2,cluster_eta_2"
)
66
67
# ACTS GNN Pipeline Tool
68
icf.addFlag(
"Tracking.GNN.ActsPipeline.moduleMapPath"
,
""
)
69
icf.addFlag(
"Tracking.GNN.ActsPipeline.gnnPath"
,
""
)
70
icf.addFlag(
71
"Tracking.GNN.ActsPipeline.trackBuilder"
,
72
ActsGNNTrackBuilderType.JunctionRemoval,
73
type=ActsGNNTrackBuilderType,
74
)
75
icf.addFlag(
76
"Tracking.GNN.ActsPipeline.edgeCut"
,
77
lambda
prevFlags: 0.01
78
if
prevFlags.Tracking.GNN.ActsPipeline.trackBuilder
79
== ActsGNNTrackBuilderType.DWalk
80
else
0.5,
81
)
82
icf.addFlag(
"Tracking.GNN.ActsPipeline.numTrtContexts"
, 1)
83
icf.addFlag(
"Tracking.GNN.ActsPipeline.minCandidateMeasurements"
, 3)
84
icf.addFlag(
"Tracking.GNN.ActsPipeline.saveEdgeScore"
,
False
)
85
icf.addFlag(
"Tracking.GNN.ActsPipeline.elcMaxHitsPerTrack"
, 30)
86
87
return
icf
88
python.InDetGNNTrackingConfigFlags.ActsGNNTrackBuilderType
Definition
InDetGNNTrackingConfigFlags.py:16
python.InDetGNNTrackingConfigFlags.GNNTrackFinderToolType
Definition
InDetGNNTrackingConfigFlags.py:9
python.InDetGNNTrackingConfigFlags.createGNNTrackingConfigFlags
createGNNTrackingConfigFlags()
Definition
InDetGNNTrackingConfigFlags.py:22
Generated on
for ATLAS Offline Software by
1.17.0