ATLAS Offline Software
Loading...
Searching...
No Matches
ActsConfigFlags.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.AthConfigFlags import AthConfigFlags
4from AthenaConfiguration.Enums import FlagEnum
5
6class SeedingStrategy(FlagEnum):
7 GridTriplet = "GridTriplet"
8 Gbts = "Gbts"
9 GbtsFtf = "GbtsFtf"
10 F150 = "F150"
11
13 Greedy = "GreedySolver"
14 ScoreBased = "ScoreBasedAmbiguitySolver"
15
16# Define the Ambiguity resolution strategy modes
17# OUTSIDE_TF : run the ambiguity resolution in a separate algorithm
18# END_OF_TF : run the ambiguity resolution at the end of the track finding, on the track candidate container
19# DURING_TF : remove the tracks that share too many hits during track finding, when deciding good candidates
20class AmbiguitySolverMode(FlagEnum):
21 OUTSIDE_TF = 0
22 END_OF_TF = 1
23 DURING_TF = 2
24
25# Define the Pixel cluster calibration error strategy modes (the errors that will be used for filtering)
26# CALIBRATED : load the calibration constants from database
27# PITCH : if we used broad clusters during clustering (so the error is the cluster width) rescale it by the number of pixels
28# to assign the pitch as error to the cluster
29class PixelErrorStrategy(FlagEnum):
30 CALIBRATED = 0
31 PITCH = 1
32
33# Define the Strip clustering errors assigned to the measurements during clustering
34# These errors will be used during track finding
35# PITCH : assign the pitch as cluster error
36# WIDTH : use the cluster width as cluster error
37# TUNED : use an error 1.05 x pitch for 1strip clusters, a 0.27 x width for 2strip clusters and width for >=3strip clusters
39 PITCH = 0
40 WIDTH = 1
41 TUNED = 2
42
43# Define the Strip cluster calibration error strategy modes (the errors that will be used for filtering)
44# CLUSTERING : Use directly the clustering errors
45# PITCH : if we used broad clusters during clustering (so the error is the cluster width) rescale it by the number of pixels
46# to assign the pitch as error to the cluster
47class StripErrorStrategy(FlagEnum):
48 CLUSTERING = 0
49 PITCH = 1
50
51class TrackFitterType(FlagEnum):
52 KalmanFitter = 'KalmanFitter' # default ACTS fitter to choose
53 GaussianSumFitter = 'GaussianSumFitter' # new experimental implementation
54 GlobalChiSquareFitter = 'GlobalChiSquareFitter' # new experimental implementation
55
56# Flag for pixel calibration strategy during track finding
57# - use cluster as is (Uncalibrated)
58# - perform AnalogueClustering either before selecting
59# measurements for extending tracks (AnalogueClustering)
60# - or only apply the AnalogueClustering to selected measurements
61# (AnalogueClusteringAfterSelection)
62# - or perform AnalogueClustering with NN corrections
64 Uncalibrated = "Uncalibrated"
65 AnalogueClustering = "AnalogueClustering"
66 AnalogueClusteringAfterSelection = "AnalogueClusteringAfterSelection"
67 NNClustering = "NNClustering"
68
69# Flag for strip calibration strategy during track finding
70# - use cluster as is (Uncalibrated)
71# - use strip pitch / sqrt(12) as error either before selecting
72# measurements for extending tracks (DigitalCalibration)
73# - or only apply it to selected measurements (DigitalCalibrationAfterSelection)
75 Uncalibrated = "Uncalibrated"
76 DigitalCalibration = "DigitalCalibration"
77 DigitalCalibrationAfterSelection = "DigitalCalibrationAfterSelection"
78
80 actscf = AthConfigFlags()
81
82 # General Flags
83 actscf.addFlag('Acts.EDM.PersistifyClusters', lambda pcf: pcf.Acts.EDM.PersistifySpacePoints)
84 actscf.addFlag('Acts.EDM.PersistifySpacePoints', False)
85 actscf.addFlag('Acts.EDM.PersistifyTracks', False)
86 # set to True to use the PhaseII pixel and strip RAW data EDM
87 actscf.addFlag('Acts.EDM.PhaseII', False)
88 actscf.addFlag('Acts.useCache', False)
89
90 # Scheduling
91 from InDetConfig.ITkActsHelpers import primaryPassUsesActs
92 actscf.addFlag('Acts.doITkConversion', lambda pcf: (
93 pcf.Detector.EnableCalo and primaryPassUsesActs(pcf)))
94 actscf.addFlag('Acts.doLargeRadius', True)
95 actscf.addFlag('Acts.doLowPt', False)
96
97 # Geometry Flags
98
99 # MaterialSource can be:
100 # a path to a local JSON file
101 # 'Default' : material map source is evaluated from the geometry tag
102 # 'None' : no material map is provided
103 actscf.addFlag('Acts.TrackingGeometry.MaterialSource', 'Default')
104 actscf.addFlag('Acts.TrackingGeometry.MaterialCalibrationFolder', 'ACTS/MaterialMaps/ITk')
105 actscf.addFlag('Acts.TrackingGeometry.MaterialFileExtension', '')
106 actscf.addFlag('Acts.TrackingGeometry.UseBlueprint', False)
107 actscf.addFlag('Acts.TrackingGeometry.ObjDebugOutput', False)
108
109
110 actscf.addFlag('Acts.TrackingGeometry.InsertITkPassiveMaterialLayers', False)
111 actscf.addFlag('Acts.TrackingGeometry.PassiveITkInnerPixelBarrelLayerRadii', [70.])
112 actscf.addFlag('Acts.TrackingGeometry.PassiveITkInnerPixelBarrelLayerHalflengthZ', [240.])
113 actscf.addFlag('Acts.TrackingGeometry.PassiveITkInnerPixelBarrelLayerThickness', [1.])
114 actscf.addFlag('Acts.TrackingGeometry.PassiveITkOuterPixelBarrelLayerRadii', [195., 260.])
115 actscf.addFlag('Acts.TrackingGeometry.PassiveITkOuterPixelBarrelLayerHalflengthZ', [370., 370.])
116 actscf.addFlag('Acts.TrackingGeometry.PassiveITkOuterPixelBarrelLayerThickness', [1., 1.])
117 actscf.addFlag('Acts.TrackingGeometry.PassiveITkStripBarrelLayerRadii', [480., 665., 880.])
118 actscf.addFlag('Acts.TrackingGeometry.PassiveITkStripBarrelLayerHalflengthZ', [1370., 1370., 1370.])
119 actscf.addFlag('Acts.TrackingGeometry.PassiveITkStripBarrelLayerThickness', [1., 1., 1.])
120 # Monitoring
121 actscf.addFlag('Acts.doMonitoring', False)
122 actscf.addFlag('Acts.doAnalysis', False)
123 actscf.addFlag('Acts.doAnalysisNtuples', lambda pcf: pcf.Acts.doAnalysis)
124 actscf.addFlag('Acts.Clusters.doAnalysis', lambda pcf: pcf.Acts.doAnalysis)
125 actscf.addFlag('Acts.SpacePoints.doAnalysis', lambda pcf: pcf.Acts.doAnalysis)
126 actscf.addFlag('Acts.Seeds.doAnalysis', lambda pcf: pcf.Acts.doAnalysis)
127 actscf.addFlag('Acts.Tracks.doAnalysis', lambda pcf: pcf.Acts.doAnalysis)
128 actscf.addFlag('Acts.Particles.doAnalysis', lambda pcf: pcf.Acts.doAnalysis)
129 actscf.addFlag('Acts.storeTrackStateInfo', False)
130 actscf.addFlag('Acts.doTruthInspection', False)
131
132 # Cluster
133 actscf.addFlag("Acts.Clusters.UseWeightedPosition", False)
134 actscf.addFlag("Acts.Clusters.RetrieveChargeInformation", lambda pcf: not pcf.Tracking.doPixelDigitalClustering)
135 actscf.addFlag("Acts.Clusters.StripClusteringErrorMode", StripClusteringErrorMode.PITCH,type=StripClusteringErrorMode)
136 actscf.addFlag("Acts.Clusters.UsePixelBroadErrors", False)
137
138 # SpacePoint
139 actscf.addFlag('Acts.SpacePoints.useBeamSpotConstraintStrips', True)
140
141 # Seeding
142 actscf.addFlag("Acts.SeedingStrategy", SeedingStrategy.GridTriplet, type=SeedingStrategy) # Define Seeding Strategy
143
144 # Track finding
145 actscf.addFlag('Acts.PixelCalibrationStrategy', PixelCalibrationStrategy.Uncalibrated, type=PixelCalibrationStrategy)
146 actscf.addFlag('Acts.StripCalibrationStrategy', StripCalibrationStrategy.Uncalibrated, type=StripCalibrationStrategy)
147 actscf.addFlag('Acts.doRotCorrection', True)
148 actscf.addFlag('Acts.doPrintTrackStates', False)
149 actscf.addFlag('Acts.skipDuplicateSeeds', True)
150 actscf.addFlag('Acts.doTwoWayCKF', True) # run CKF twice, first with forward propagation with smoothing, then with backward propagation
151 actscf.addFlag('Acts.useStripSeedsFirst', False) # switch order of seed collections
152 actscf.addFlag('Acts.useHGTDClusterInTrackFinding', False) # use HGTD cluster in track finding
153 actscf.addFlag('Acts.branchStopperMeasCutReduce', 2)
154 actscf.addFlag('Acts.branchStopperAbsEtaMeasCut', 1.2)
155 actscf.addFlag('Acts.forceTrackOnSeed', lambda pcf: not(pcf.Acts.SeedingStrategy is SeedingStrategy.GbtsFtf and
156 pcf.Acts.PixelCalibrationStrategy is PixelCalibrationStrategy.AnalogueClusteringAfterSelection)) # forceTrackOnSeed does not seem to work with GBTS seeds and analogue cluster calibration
157
158 # Ambiguity resolution
159 actscf.addFlag('Acts.doAmbiguityResolution', True)
160 actscf.addFlag('Acts.AmbiguitySolverStrategy', AmbiguitySolverStrategy.Greedy, type=AmbiguitySolverStrategy) # Define Ambiguity Solver Strategy
161 actscf.addFlag('Acts.AmbiguitySolverMode', lambda pcf: AmbiguitySolverMode.OUTSIDE_TF if pcf.Acts.doAmbiguityResolution else AmbiguitySolverMode.DURING_TF, type=AmbiguitySolverMode)
162
163 # Calibrations
164 actscf.addFlag('Acts.OnTrackCalibration.performCovarianceCalibration', True) # perform calibration of covariance during on track analogue cluster calibration
165
166 # Track fitting
167 actscf.addFlag('Acts.writeTrackCollection', False) # save to file (ESD, AOD) the Resolved and Refitted track collections
168 actscf.addFlag('Acts.fitFromPRD', False) # Acts.writeTrackCollection needs to be True for either cases. If Acts.fitFromPRD is False, fit from ROT; else, fit from PRD
169 actscf.addFlag('Acts.trackFitterType', TrackFitterType.KalmanFitter, type=TrackFitterType) # Define Tracking algorithm for refitting
170
171 # GSF specific flags
172 actscf.addFlag("Acts.GsfRefitLegacyTrk", False) # Refit Legacy tracks using ACTS GSF
173 actscf.addFlag("Acts.GsfRefitActs", False) # Refit ACTS tracks using ACTS GSF
174 actscf.addFlag("Acts.GsfMaxComponents", 12)
175 actscf.addFlag("Acts.GsfComponentMergeMethod", 'MaxWeight')
176 actscf.addFlag("Acts.GsfDirectNavigation", False)
177 actscf.addFlag("Acts.GsfOutlierChi2Cut", 1e4) # Effectively no cut. Compatible with legacy
178 actscf.addFlag("Acts.extrapolateElectronsLegacy", False) # Use legacy calo extrapolation with ACTS tracks
179
180 # Decorations
181 actscf.addFlag('Acts.decoratePRD.sdoSiHit', lambda pcf: pcf.Tracking.doTIDE_AmbiTrackMonitoring)
182
183 # GNN specific flags (scoped)
184 actscf.addFlag("Acts.GNN.Enable", False)
185 actscf.addFlag("Acts.GNN.ModuleMapPath", "<default>")
186 actscf.addFlag("Acts.GNN.ModelPath", "<default>")
187 actscf.addFlag("Acts.GNN.NumTrtContexts", 1)
188 actscf.addFlag("Acts.GNN.MaxGpuInstances", 1)
189 actscf.addFlag("Acts.GNN.VarianceInflation", 1.0)
190 actscf.addFlag("Acts.GNN.TightSeeds", False)
191 actscf.addFlag("Acts.GNN.MinCandidateMeasurements", 7)
192 actscf.addFlag("Acts.GNN.MinDeltaR", 15.0)
193 actscf.addFlag("Acts.GNN.EdgeCut", 0.5)
194 actscf.addFlag("Acts.GNN.RelaxCentralHoleSel", False)
195 actscf.addFlag("Acts.GNN.RelaxMeasurementSel", True)
196 actscf.addFlag("Acts.GNN.OfflineZ0Sel", False)
197
198 return actscf