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