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