ATLAS Offline Software
TrkConfigFlags.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 BeamType, LHCPeriod, FlagEnum,HIMode
5 import AthenaCommon.SystemOfUnits as Units
6 
7 class PrimaryPassConfig(FlagEnum):
8  VtxLumi = 'VtxLumi'
9  VtxLumiHeavyIon = 'VtxLumiHeavyIon'
10  VtxBeamSpot = 'VtxBeamSpot'
11  Cosmics = 'Cosmics'
12  HeavyIon = 'HeavyIon'
13  HighPileup = 'HighPileup'
14  UPC = 'UPC'
15  HIP = 'HIP'
16  MinBias = 'MinBias'
17  Default = 'Main'
18 
19 
20 class ITkPrimaryPassConfig(FlagEnum):
21  FTF = 'ITkFTF'
22  FastTracking = 'ITkFast'
23  HeavyIon = 'ITkHeavyIon'
24  Default = 'ITkMain'
25 
26 class TrackFitterType(FlagEnum):
27  DistributedKalmanFilter = 'DistributedKalmanFilter'
28  GlobalChi2Fitter = 'GlobalChi2Fitter'
29  GaussianSumFilter = 'GaussianSumFilter'
30 
31 
32 class KalmanUpdatorType(FlagEnum):
33  KalmanUpdator = 'KalmanUpdator'
34  KalmanUpdator_xk = 'KalmanUpdator_xk'
35  KalmanUpdatorSMatrix = 'KalmanUpdatorSMatrix'
36 
37 
38 class PixelClusterSplittingType(FlagEnum):
39  NeuralNet = 'NeuralNet'
40  Truth = 'Truth'
41 
42 
43 class TrackingComponent(FlagEnum):
44  AthenaChain = "AthenaChain" # full Athena Chain (default)
45  ActsChain = "ActsChain" # full Acts Chain
46  ActsFastChain = "ActsFastChain" # fast tracking Acts Chain
47  ActsHeavyIon = "ActsHeavyIon"
48  # Validation options
49  ActsValidateClusters = "ActsValidateClusters"
50  ActsValidateSpacePoints = "ActsValidateSpacePoints"
51  ActsValidateSeeds = "ActsValidateSeeds"
52  ActsValidateConversionSeeds = "ActsValidateConversionSeeds"
53  ActsValidateLargeRadiusSeeds = "ActsValidateLargeRadiusSeeds"
54  ActsValidateTracks = "ActsValidateTracks"
55  ActsValidateAmbiguityResolution = "ActsValidateAmbiguityResolution"
56 
57  # GNN
58  GNNChain = "GNNChain"
59  # FPGA
60  FPGAChain = "FPGAChain"
61 
63  icf = AthConfigFlags()
64 
65  # Turn running of truth matching on and off (by default on for MC off for data)
66  icf.addFlag("Tracking.doTruth", lambda prevFlags: prevFlags.Input.isMC)
67 
68  # control which fitter to be used
69  icf.addFlag("Tracking.trackFitterType",
70  TrackFitterType.GlobalChi2Fitter, type=TrackFitterType)
71  # control which measurement updator to load as InDetUpdator
72  icf.addFlag("Tracking.kalmanUpdator",
73  KalmanUpdatorType.KalmanUpdatorSMatrix, type=KalmanUpdatorType)
74 
75  icf.addFlag("Tracking.materialInteractions", lambda prevFlags:
76  prevFlags.Beam.Type is not BeamType.SingleBeam)
77  # Control which type of particle hypothesis to use for the material interactions
78  # 0=non-interacting,1=electron,2=muon,3=pion,4=kaon,5=proton. See ParticleHypothesis.h for full definition.
79  icf.addFlag("Tracking.materialInteractionsType", lambda prevFlags:
80  2 if prevFlags.Beam.Type is BeamType.Cosmics else 3)
81 
82  # Turn on running of Brem Recovery in tracking
83  icf.addFlag("Tracking.doBremRecovery", lambda prevFlags: (
84  prevFlags.Detector.EnableCalo and
85  not (prevFlags.Tracking.PrimaryPassConfig in
86  [PrimaryPassConfig.VtxLumi, PrimaryPassConfig.VtxLumiHeavyIon, PrimaryPassConfig.VtxBeamSpot] or
87  prevFlags.Tracking.doLowMu or
88  prevFlags.Beam.Type is not BeamType.Collisions or
89  not prevFlags.BField.solenoidOn)))
90  icf.addFlag("Tracking.doCaloSeededBrem", lambda prevFlags: (
91  prevFlags.Detector.EnableCalo and prevFlags.Tracking.doBremRecovery))
92  icf.addFlag("Tracking.phiWidthBrem", 0.3)
93  icf.addFlag("Tracking.etaWidthBrem", 0.2)
94  # Use Recover SSS to Calo ROIs
95  icf.addFlag("Tracking.doHadCaloSeededSSS", False)
96  # Use Calo ROIs to seed specific cuts for the ambi
97  icf.addFlag("Tracking.doCaloSeededAmbi", lambda prevFlags:
98  prevFlags.Detector.EnableCalo)
99  # control if the shared hits are recorded in TrackPatricles
100  icf.addFlag("Tracking.doSharedHits", True)
101  # Switch for running TIDE Ambi
102  icf.addFlag("Tracking.doTIDE_Ambi", lambda prevFlags:
103  not (prevFlags.Beam.Type is BeamType.Cosmics))
104  # Switch to use truth-based pixel cluster splitting emulation
105  icf.addFlag("Tracking.doPixelTruthSplit", lambda prevFlags:
106  prevFlags.GeoModel.Run >= LHCPeriod.Run4)
107  # Use simple position and error estimate for on-track pixel cluster
108  icf.addFlag("Tracking.doPixelDigitalClustering", False)
109  # Try to split pixel clusters
110  icf.addFlag("Tracking.doPixelClusterSplitting",
111  lambda prevFlags: not (prevFlags.Beam.Type is BeamType.Cosmics))
112  # choose splitter type: NeuralNet or AnalogClus
113  icf.addFlag("Tracking.pixelClusterSplittingType", lambda prevFlags:
114  PixelClusterSplittingType.NeuralNet
115  if prevFlags.GeoModel.Run <= LHCPeriod.Run3
116  else PixelClusterSplittingType.Truth,
117  type=PixelClusterSplittingType)
118  # Cut value for splitting clusters into two parts
119  icf.addFlag("Tracking.pixelClusterSplitProb1",
120  lambda prevFlags: (
121  0.5 if prevFlags.GeoModel.Run is LHCPeriod.Run1 else 0.55))
122  # Cut value for splitting clusters into three parts
123  icf.addFlag("Tracking.pixelClusterSplitProb2",
124  lambda prevFlags: (
125  0.5 if prevFlags.GeoModel.Run is LHCPeriod.Run1 else 0.45))
126  # Skip ambiguity solver in hadronic ROI
127  icf.addFlag("Tracking.doSkipAmbiROI", False)
128 
129  # Guaranteed not-subtracted topo clusters even in heavy ions
130  icf.addFlag("Tracking.TopoClusters", "CaloTopoClusters")
131  icf.addFlag("Tracking.EgammaTopoClusters", "egammaTopoClusters")
132 
133  # Express track parameters wrt. to : 'BeamLine','BeamSpot','Vertex' (first primary vertex)
134  icf.addFlag("Tracking.perigeeExpression", lambda prevFlags:
135  "Vertex" if (prevFlags.Tracking.PrimaryPassConfig in [
136  PrimaryPassConfig.HeavyIon, PrimaryPassConfig.VtxLumiHeavyIon])
137  else "BeamLine")
138 
139  # Tracking passes/configurations scheduled
140 
141  def doLargeD0(flags):
142  if flags.GeoModel.Run <= LHCPeriod.Run3:
143  return not ((flags.Beam.Type in
144  [BeamType.SingleBeam, BeamType.Cosmics]) or
145  flags.Tracking.PrimaryPassConfig in [
146  PrimaryPassConfig.HeavyIon,
147  PrimaryPassConfig.UPC,
148  PrimaryPassConfig.HIP,
149  PrimaryPassConfig.VtxLumi,
150  PrimaryPassConfig.VtxLumiHeavyIon,
151  PrimaryPassConfig.VtxBeamSpot,
152  PrimaryPassConfig.HighPileup])
153  else: # LRT disabled by default for Run4 for now
154  return False
155 
156  icf.addFlag("Tracking.doLargeD0", doLargeD0)
157  icf.addFlag("Tracking.storeSeparateLargeD0Container", True)
158 
159  # Special configuration for low-mu runs
160  icf.addFlag("Tracking.doLowMu", False)
161  # Turn running of doLowPt second pass on and off
162  icf.addFlag("Tracking.doLowPt",
163  lambda prevFlags: prevFlags.Tracking.doLowMu)
164 
165  # Turn on to save the Track Seeds in a xAOD track collecting for development studies
166  icf.addFlag("Tracking.doStoreTrackSeeds", False)
167  # Save SiSP tracks (input to the ambiguity solver)
168  icf.addFlag("Tracking.doStoreSiSPSeededTracks", False)
169  # Turn writing of seed validation ntuple on and off
170  icf.addFlag("Tracking.writeSeedValNtuple", False)
171  # Save xAOD TrackMeasurementValidation + TrackStateValidation containers
172  icf.addFlag("Tracking.writeExtendedSi_PRDInfo", False)
173  icf.addFlag("Tracking.writeExtendedTRT_PRDInfo", False)
174 
175  # Only keep entries in xAOD TrackMeasurementValidation + TrackStateValidation containers for tracks passing user cut
176  # Indicate detector technology from which clusters should be thinned
177  icf.addFlag("Tracking.thinPixelClustersOnTrack", False)
178  icf.addFlag("Tracking.thinSCTClustersOnTrack", False)
179  icf.addFlag("Tracking.thinTRTClustersOnTrack", False)
180  icf.addFlag("Tracking.thinInDetClustersOnTrack",
181  lambda prevFlags: (
182  prevFlags.Tracking.thinPixelClustersOnTrack or
183  prevFlags.Tracking.thinSCTClustersOnTrack or
184  prevFlags.Tracking.thinTRTClustersOnTrack ))
185 
186  # For cluster thinning (if enabled): list of containers and selection strings used in ThinInDetClustersAlg
187  icf.addFlag("Tracking.thinInDetClustersTrackContainers", ["InDetTrackParticles"])
188  icf.addFlag("Tracking.thinInDetClustersPixelMSOSContainers", ["PixelMSOSs"])
189  icf.addFlag("Tracking.thinInDetClustersSCTMSOSContainers", ["SCT_MSOSs"])
190  icf.addFlag("Tracking.thinInDetClustersTRTMSOSContainers", ["TRT_MSOSs"])
191  icf.addFlag("Tracking.thinInDetClustersSelectionStrings", ["InDetTrackParticles.pt > (1*GeV)"])
192 
193  # Toggle track slimming
194  icf.addFlag("Tracking.doSlimming", lambda prevFlags:
195  not (prevFlags.Beam.Type in
196  [BeamType.SingleBeam, BeamType.Cosmics] or
197  prevFlags.Tracking.PrimaryPassConfig in [
198  PrimaryPassConfig.VtxLumi,
199  PrimaryPassConfig.VtxLumiHeavyIon,
200  PrimaryPassConfig.VtxBeamSpot,
201  PrimaryPassConfig.HighPileup]))
202 
203 
204 
205  # The following flags are only used in InDet configurations for now
206  # No corresponding ITk config is available yet
207 
208  icf.addFlag("Tracking.useNewParamTRT", lambda prevFlags:
209  prevFlags.Tracking.PrimaryPassConfig is not(
210  PrimaryPassConfig.HeavyIon))
211 
212  # --- run back tracking and TRT only in RoI seed regions
213  icf.addFlag("Tracking.BackTracking.doRoISeeded", lambda prevFlags:
214  prevFlags.Detector.EnableCalo and not(
215  prevFlags.Tracking.doLowMu or
216  prevFlags.Tracking.PrimaryPassConfig is (
217  PrimaryPassConfig.HeavyIon) or
218  prevFlags.Beam.Type is BeamType.Cosmics or
219  prevFlags.Tracking.doMinBias))
220 
221  # --- defaults for backtracking
222  def BackTrackingMinPt(flags):
223  if flags.Tracking.doMinBias:
224  return 0.4 * Units.GeV * flags.BField.configuredSolenoidFieldScale
225  elif (flags.Tracking.doLowMu or
226  flags.Tracking.PrimaryPassConfig in [
227  PrimaryPassConfig.HeavyIon, PrimaryPassConfig.VtxLumiHeavyIon] or
228  flags.Beam.Type is BeamType.Cosmics):
229  return 1.0 * Units.GeV * flags.BField.configuredSolenoidFieldScale
230  else:
231  return 3.0 * Units.GeV * flags.BField.configuredSolenoidFieldScale
232  icf.addFlag("Tracking.BackTracking.minPt", BackTrackingMinPt)
233  icf.addFlag("Tracking.BackTracking.TRTSegFinderPtBins", 50)
234  icf.addFlag("Tracking.BackTracking.maxTRTSharedFrac", 0.7)
235  icf.addFlag("Tracking.BackTracking.maxSecondaryImpact", 100.0 * Units.mm)
236  icf.addFlag("Tracking.BackTracking.minClusters", 4)
237  icf.addFlag("Tracking.BackTracking.minSiNotShared", 4)
238  # cut is now on number of shared modules
239  icf.addFlag("Tracking.BackTracking.maxShared", 1)
240  icf.addFlag("Tracking.BackTracking.minTRT", lambda prevFlags:
241  10 if (prevFlags.Tracking.doLowMu or
242  prevFlags.Tracking.PrimaryPassConfig is (
243  PrimaryPassConfig.HeavyIon))
244  else 15)
245  icf.addFlag("Tracking.BackTracking.minTRTPrecFrac", lambda prevFlags:
246  0. if (prevFlags.Tracking.doLowMu or
247  prevFlags.Tracking.PrimaryPassConfig is (
248  PrimaryPassConfig.HeavyIon))
249  else 0.3)
250 
251  icf.addFlag("Tracking.BackTracking.maxHoles", lambda prevFlags:
252  2 if (prevFlags.Tracking.doLowMu or
253  prevFlags.Tracking.PrimaryPassConfig is (
254  PrimaryPassConfig.HeavyIon))
255  else 1)
256  icf.addFlag("Tracking.BackTracking.maxPixelHoles", lambda prevFlags:
257  2 if (prevFlags.Tracking.doLowMu or
258  prevFlags.Tracking.PrimaryPassConfig is (
259  PrimaryPassConfig.HeavyIon))
260  else 1)
261  icf.addFlag("Tracking.BackTracking.maxSCTHoles", lambda prevFlags:
262  2 if (prevFlags.Tracking.doLowMu or
263  prevFlags.Tracking.PrimaryPassConfig is (
264  PrimaryPassConfig.HeavyIon))
265  else 1)
266  icf.addFlag("Tracking.BackTracking.maxDoubleHoles", lambda prevFlags:
267  1 if (prevFlags.Tracking.doLowMu or
268  prevFlags.Tracking.PrimaryPassConfig is (
269  PrimaryPassConfig.HeavyIon))
270  else 0)
271  icf.addFlag("Tracking.BackTracking.nHolesMax", 2)
272  icf.addFlag("Tracking.BackTracking.nHolesGapMax", 2)
273 
274  # extension finder in back tracking
275  icf.addFlag("Tracking.BackTracking.rejectShortExtensions", lambda prevFlags:
276  not(prevFlags.Beam.Type is BeamType.Cosmics or
277  prevFlags.Tracking.doLowMu or
278  prevFlags.Tracking.PrimaryPassConfig is (
279  PrimaryPassConfig.HeavyIon)))
280  # cut in Si Extensions before fit
281  icf.addFlag("Tracking.BackTracking.SiExtensionCuts", lambda prevFlags:
282  not(prevFlags.Tracking.doLowMu or
283  prevFlags.Tracking.PrimaryPassConfig is (
284  PrimaryPassConfig.HeavyIon)))
285  icf.addFlag("Tracking.BackTracking.minRoIClusterEt", lambda prevFlags:
286  0. if (prevFlags.Tracking.doLowMu or
287  prevFlags.Tracking.PrimaryPassConfig in [
288  PrimaryPassConfig.HeavyIon, PrimaryPassConfig.VtxLumiHeavyIon] or
289  prevFlags.Beam.Type is BeamType.Cosmics or
290  prevFlags.Tracking.doMinBias)
291  else 6.*Units.GeV * prevFlags.BField.configuredSolenoidFieldScale)
292 
293  # TRT standalone configuration
294  def TRTStandaloneMinPt(flags):
295  if flags.Tracking.doMinBias:
296  return 0.4 * Units.GeV * flags.BField.configuredSolenoidFieldScale
297  elif flags.Tracking.doLowMu or (
298  flags.Tracking.PrimaryPassConfig is PrimaryPassConfig.HeavyIon):
299  return 1.0 * Units.GeV * flags.BField.configuredSolenoidFieldScale
300  else:
301  return 2.0 * Units.GeV * flags.BField.configuredSolenoidFieldScale
302  icf.addFlag("Tracking.TRTStandalone.minPt", TRTStandaloneMinPt)
303  icf.addFlag("Tracking.TRTStandalone.minTRTPrecFrac", 0.15)
304  icf.addFlag("Tracking.TRTStandalone.minTRT", 15)
305 
306  icf.addFlag("Tracking.TRTStandalone.startArOriginalPerigee", False)
307 
308  # Turn on InDetRecStatistics
309  icf.addFlag("Tracking.doStats", False)
310  # Switch for track observer tool
311  icf.addFlag("Tracking.doTIDE_AmbiTrackMonitoring", False)
312  # use beam spot position in pixel NN
313  icf.addFlag("Tracking.useBeamSpotInfoNN", True)
314  # Threshold for NN cut in large D0 tracking for tracks in ambi
315  icf.addFlag("Tracking.nnCutLargeD0Threshold", -1.0)
316  # Use broad cluster errors for Pixel
317  icf.addFlag("Tracking.useBroadPixClusterErrors", False)
318  # Use broad cluster errors for SCT
319  icf.addFlag("Tracking.useBroadSCTClusterErrors", False)
320 
321  # Tracking passes/configurations scheduled
322 
323  # Turn running of track segment creation in pixel on and off
324  icf.addFlag("Tracking.doTrackSegmentsPixel",
325  lambda prevFlags: (
326  prevFlags.Detector.EnablePixel and (
327  prevFlags.Tracking.doMinBias or
328  prevFlags.Tracking.doLowMu or
329  prevFlags.Beam.Type is BeamType.Cosmics)))
330  # Turn running of track segment creation in SCT on and off
331  icf.addFlag("Tracking.doTrackSegmentsSCT",
332  lambda prevFlags: (
333  prevFlags.Detector.EnableSCT and (
334  prevFlags.Tracking.doLowMu or
335  prevFlags.Beam.Type is BeamType.Cosmics)))
336  # Turn running of track segment creation in TRT on and off
337  icf.addFlag("Tracking.doTrackSegmentsTRT",
338  lambda prevFlags: (
339  prevFlags.Detector.EnableTRT and
340  (prevFlags.Tracking.doLowMu or
341  prevFlags.Beam.Type is BeamType.Cosmics)))
342  # turn on / off TRT extensions
343  icf.addFlag("Tracking.doTRTExtension",
344  lambda prevFlags: prevFlags.Detector.EnableTRT)
345  # control to run TRT Segment finding (do it always after new tracking!)
346  icf.addFlag("Tracking.doTRTSegments",
347  lambda prevFlags: (prevFlags.Detector.EnableTRT and
348  (prevFlags.Tracking.doBackTracking or
349  prevFlags.Tracking.doTRTStandalone)))
350  # Turn running of backtracking on and off
351  icf.addFlag("Tracking.doBackTracking", lambda prevFlags: (
352  prevFlags.Detector.EnableTRT and
353  not(prevFlags.Beam.Type in [BeamType.SingleBeam, BeamType.Cosmics] or
354  prevFlags.Tracking.PrimaryPassConfig in [
355  PrimaryPassConfig.HeavyIon,
356  PrimaryPassConfig.VtxLumi,
357  PrimaryPassConfig.VtxLumiHeavyIon,
358  PrimaryPassConfig.VtxBeamSpot,
359  PrimaryPassConfig.HighPileup])))
360  # control TRT Standalone
361  icf.addFlag("Tracking.doTRTStandalone", lambda prevFlags: (
362  prevFlags.Detector.EnableTRT and
363  not(prevFlags.Tracking.PrimaryPassConfig in [
364  PrimaryPassConfig.HeavyIon,
365  PrimaryPassConfig.VtxLumi,
366  PrimaryPassConfig.VtxLumiHeavyIon,
367  PrimaryPassConfig.VtxBeamSpot,
368  PrimaryPassConfig.HighPileup])))
369 
370  # Turn running of doForwardTracks pass on and off
371  icf.addFlag("Tracking.doForwardTracks", lambda prevFlags: (
372  prevFlags.Detector.EnablePixel and
373  not(prevFlags.Beam.Type in [BeamType.SingleBeam, BeamType.Cosmics] or
374  prevFlags.Tracking.PrimaryPassConfig in [
375  PrimaryPassConfig.HeavyIon,
376  PrimaryPassConfig.VtxLumi,
377  PrimaryPassConfig.VtxLumiHeavyIon,
378  PrimaryPassConfig.VtxBeamSpot,
379  PrimaryPassConfig.HighPileup] or
380  prevFlags.Tracking.doMinBias or
381  prevFlags.Tracking.doLowMu)))
382  icf.addFlag("Tracking.doTrackSegmentsDisappearing",
383  lambda prevFlags: (
384  not((prevFlags.Tracking.PrimaryPassConfig is
385  PrimaryPassConfig.HeavyIon) or
386  prevFlags.Beam.Type is BeamType.Cosmics)))
387 
388  # Turn running of doVeryLowPt third pass on and off
389  icf.addFlag("Tracking.doVeryLowPt", False)
390  # Turn running of doLargeD0 second pass down to 100 MeV on and off
391  icf.addFlag("Tracking.doLowPtLargeD0", False)
392  # Switch for running LowPtRoI settings
393  icf.addFlag("Tracking.doLowPtRoI", False)
394  # Switch for running UPC settings
395  icf.addFlag("Tracking.doUPC", lambda prevFlags: prevFlags.Reco.HIMode is HIMode.UPC)
396  # Switch for running HIP settings
397  icf.addFlag("Tracking.doHIP", lambda prevFlags: prevFlags.Reco.HIMode is HIMode.HIP)
398  # Switch for running MinBias settings (UPC or HIP turn this ON)
399  icf.addFlag("Tracking.doMinBias", lambda prevFlags:
400  prevFlags.Tracking.doUPC or prevFlags.Tracking.doHIP)
401  # Turn running of BeamGas second pass on and off
402  icf.addFlag("Tracking.doBeamGas",
403  lambda prevFlags: prevFlags.Beam.Type is BeamType.SingleBeam)
404  # Special reconstruction for BLS physics
405  icf.addFlag("Tracking.doBLS", False)
406 
407  # Special pass using truth information for pattern recognition, runs in parallel to/instead of the first pass
408  icf.addFlag("Tracking.doPseudoTracking", False)
409  # Special pass using truth information for pattern recognition, removes assumed in-efficencies applied to PseudoTracking
410  icf.addFlag("Tracking.doIdealPseudoTracking", False)
411 
412 
413 
414  # The following flags are only used in ITk configurations
415 
416  # Turn running of ITk FastTracking on and off
417  icf.addFlag("Tracking.doITkFastTracking", False)
418 
419  # Turn running of Conversion second tracking pass on and off
420  icf.addFlag("Tracking.doITkConversion",
421  lambda prevFlags: not prevFlags.Tracking.doITkFastTracking)
422 
423  # Allows TrigFastTrackFinder to be run as an offline algorithm by replacing
424  # SiSPSeededTrackFinder
425  icf.addFlag("Tracking.useITkFTF", False)
426 
427  # GNN for ITk flags
428  from InDetGNNTracking.InDetGNNTrackingConfigFlags import createGNNTrackingConfigFlags
429  icf.join(createGNNTrackingConfigFlags())
430 
431  # enable reco steps
432  icf.addFlag("Tracking.recoChain", [TrackingComponent.AthenaChain])
433 
434 
435 
436  # Tracking pass flags
437 
438  # InDet
439 
440  from TrkConfig.TrackingPassFlags import (
441  createTrackingPassFlags, createHighPileupTrackingPassFlags,
442  createMinBiasTrackingPassFlags, createUPCTrackingPassFlags,
443  createHIPTrackingPassFlags, createR3LargeD0TrackingPassFlags,
444  createLowPtLargeD0TrackingPassFlags,
445  createLowPtTrackingPassFlags, createVeryLowPtTrackingPassFlags,
446  createLowPtRoITrackingPassFlags, createForwardTracksTrackingPassFlags,
447  createBeamGasTrackingPassFlags, createVtxLumiTrackingPassFlags, createVtxLumiHeavyIonTrackingPassFlags,
448  createVtxBeamSpotTrackingPassFlags, createCosmicsTrackingPassFlags,
449  createHeavyIonTrackingPassFlags, createPixelTrackingPassFlags,
450  createDisappearingTrackingPassFlags, createSCTTrackingPassFlags,
451  createTRTTrackingPassFlags, createTRTStandaloneTrackingPassFlags)
452 
453  def primaryPass(flags):
454  if flags.Beam.Type is BeamType.Cosmics:
455  return PrimaryPassConfig.Cosmics
456  elif flags.Reco.EnableHI:
457  if flags.Tracking.doUPC: #For UPC
458  return PrimaryPassConfig.UPC
459  elif flags.Tracking.doHIP: #For HIP
460  return PrimaryPassConfig.HIP
461  else: #For HI (default)
462  return PrimaryPassConfig.HeavyIon
463  elif flags.Tracking.doMinBias:
464  return PrimaryPassConfig.MinBias
465  else:
466  return PrimaryPassConfig.Default
467 
468  icf.addFlag("Tracking.PrimaryPassConfig", lambda prevFlags:
469  primaryPass(prevFlags), type=PrimaryPassConfig)
470 
471  # Set up for first tracking pass, updated for second passes
472  icf.addFlagsCategory("Tracking.MainPass",
473  createTrackingPassFlags, prefix=True)
474  icf.addFlagsCategory("Tracking.HighPileupPass",
475  createHighPileupTrackingPassFlags, prefix=True)
476  icf.addFlagsCategory("Tracking.UPCPass",
477  createUPCTrackingPassFlags, prefix=True)
478  icf.addFlagsCategory("Tracking.HIPPass",
479  createHIPTrackingPassFlags, prefix=True)
480  icf.addFlagsCategory("Tracking.MinBiasPass",
481  createMinBiasTrackingPassFlags, prefix=True)
482  icf.addFlagsCategory("Tracking.R3LargeD0Pass",
483  createR3LargeD0TrackingPassFlags, prefix=True)
484  icf.addFlagsCategory("Tracking.LowPtLargeD0Pass",
485  createLowPtLargeD0TrackingPassFlags, prefix=True)
486  icf.addFlagsCategory("Tracking.LowPtPass",
487  createLowPtTrackingPassFlags, prefix=True)
488  icf.addFlagsCategory("Tracking.VeryLowPtPass",
489  createVeryLowPtTrackingPassFlags, prefix=True)
490  icf.addFlagsCategory("Tracking.LowPtRoIPass",
491  createLowPtRoITrackingPassFlags, prefix=True)
492  icf.addFlagsCategory("Tracking.ForwardPass",
493  createForwardTracksTrackingPassFlags, prefix=True)
494  icf.addFlagsCategory("Tracking.BeamGasPass",
495  createBeamGasTrackingPassFlags, prefix=True)
496  icf.addFlagsCategory("Tracking.VtxLumiPass",
497  createVtxLumiTrackingPassFlags, prefix=True)
498  icf.addFlagsCategory("Tracking.VtxLumiHeavyIonPass",
499  createVtxLumiHeavyIonTrackingPassFlags, prefix=True)
500  icf.addFlagsCategory("Tracking.VtxBeamSpotPass",
501  createVtxBeamSpotTrackingPassFlags, prefix=True)
502  icf.addFlagsCategory("Tracking.CosmicsPass",
503  createCosmicsTrackingPassFlags, prefix=True)
504  icf.addFlagsCategory("Tracking.HeavyIonPass",
505  createHeavyIonTrackingPassFlags, prefix=True)
506  icf.addFlagsCategory("Tracking.PixelPass",
507  createPixelTrackingPassFlags, prefix=True)
508  icf.addFlagsCategory("Tracking.DisappearingPass",
509  createDisappearingTrackingPassFlags, prefix=True)
510  icf.addFlagsCategory("Tracking.SCTPass",
511  createSCTTrackingPassFlags, prefix=True)
512  icf.addFlagsCategory("Tracking.TRTPass",
513  createTRTTrackingPassFlags, prefix=True)
514  icf.addFlagsCategory("Tracking.TRTStandalonePass",
515  createTRTStandaloneTrackingPassFlags, prefix=True)
516 
517  # ITk
518 
519  from TrkConfig.TrackingPassFlags import (
520  createITkTrackingPassFlags, createITkLargeD0TrackingPassFlags,
521  createITkConversionTrackingPassFlags,
522  createITkFastTrackingPassFlags, createITkLargeD0FastTrackingPassFlags,
523  createITkFTFPassFlags, createITkFTFLargeD0PassFlags, createITkLowPtTrackingPassFlags,
524  createITkHeavyIonTrackingPassFlags)
525 
526  def itkPrimaryPass(flags):
527  if flags.Tracking.useITkFTF:
528  return ITkPrimaryPassConfig.FTF
529  elif flags.Tracking.doITkFastTracking:
530  return ITkPrimaryPassConfig.FastTracking
531  elif flags.Reco.EnableHI:
532  return ITkPrimaryPassConfig.HeavyIon
533  else:
534  return ITkPrimaryPassConfig.Default
535 
536  icf.addFlag("Tracking.ITkPrimaryPassConfig", lambda prevFlags:
537  itkPrimaryPass(prevFlags), type=ITkPrimaryPassConfig)
538 
539  icf.addFlagsCategory ("Tracking.ITkMainPass",
540  createITkTrackingPassFlags, prefix=True)
541  icf.addFlagsCategory ("Tracking.ITkLargeD0Pass",
542  createITkLargeD0TrackingPassFlags, prefix=True)
543  icf.addFlagsCategory ("Tracking.ITkConversionPass",
544  createITkConversionTrackingPassFlags, prefix=True)
545  icf.addFlagsCategory ("Tracking.ITkLowPtPass",
546  createITkLowPtTrackingPassFlags, prefix=True)
547  icf.addFlagsCategory ("Tracking.ITkFastPass",
548  createITkFastTrackingPassFlags, prefix=True)
549  icf.addFlagsCategory ("Tracking.ITkLargeD0FastPass",
550  createITkLargeD0FastTrackingPassFlags, prefix=True)
551  icf.addFlagsCategory ("Tracking.ITkFTFPass",
552  createITkFTFPassFlags, prefix=True)
553  icf.addFlagsCategory ("Tracking.ITkFTFLargeD0Pass",
554  createITkFTFLargeD0PassFlags, prefix=True)
555  icf.addFlagsCategory ("Tracking.ITkHeavyIonPass",
556  createITkHeavyIonTrackingPassFlags, prefix=True)
557 
558  # Acts
559  from ActsConfig.ActsTrackingPassFlags import (
560  createActsTrackingPassFlags,
561  createActsFastTrackingPassFlags,
562  createActsLargeRadiusTrackingPassFlags,
563  createActsConversionTrackingPassFlags,
564  createActsLowPtTrackingPassFlags,
565  createActsValidateClustersTrackingPassFlags,
566  createActsValidateSpacePointsTrackingPassFlags,
567  createActsValidateSeedsTrackingPassFlags,
568  createActsValidateConversionSeedsTrackingPassFlags,
569  createActsValidateLargeRadiusSeedsTrackingPassFlags,
570  createActsValidateTracksTrackingPassFlags,
571  createActsValidateAmbiguityResolutionTrackingPassFlags,
572  createActsHeavyIonTrackingPassFlags
573  )
574 
575  icf.addFlagsCategory ("Tracking.ITkActsPass",
576  createActsTrackingPassFlags, prefix=True)
577  icf.addFlagsCategory ("Tracking.ITkActsFastPass",
578  createActsFastTrackingPassFlags, prefix=True)
579  icf.addFlagsCategory ("Tracking.ITkActsLargeRadiusPass",
580  createActsLargeRadiusTrackingPassFlags, prefix=True)
581  icf.addFlagsCategory ('Tracking.ITkActsConversionPass',
582  createActsConversionTrackingPassFlags, prefix=True)
583  icf.addFlagsCategory ('Tracking.ITkActsLowPtPass',
584  createActsLowPtTrackingPassFlags, prefix=True)
585  icf.addFlagsCategory ("Tracking.ITkActsValidateClustersPass",
586  createActsValidateClustersTrackingPassFlags, prefix=True)
587  icf.addFlagsCategory ("Tracking.ITkActsValidateSpacePointsPass",
588  createActsValidateSpacePointsTrackingPassFlags, prefix=True)
589  icf.addFlagsCategory ("Tracking.ITkActsValidateSeedsPass",
590  createActsValidateSeedsTrackingPassFlags, prefix=True)
591  icf.addFlagsCategory ("Tracking.ITkActsValidateConversionSeedsPass",
592  createActsValidateConversionSeedsTrackingPassFlags, prefix=True)
593  icf.addFlagsCategory ("Tracking.ITkActsValidateLargeRadiusSeedsPass",
594  createActsValidateLargeRadiusSeedsTrackingPassFlags, prefix=True)
595  icf.addFlagsCategory ("Tracking.ITkActsValidateTracksPass",
596  createActsValidateTracksTrackingPassFlags, prefix=True)
597  icf.addFlagsCategory ("Tracking.ITkActsValidateAmbiguityResolutionPass",
598  createActsValidateAmbiguityResolutionTrackingPassFlags, prefix=True)
599  icf.addFlagsCategory ("Tracking.ITkActsHeavyIonPass",
600  createActsHeavyIonTrackingPassFlags, prefix=True)
601 
602  # GNN
603  from InDetGNNTracking.InDetGNNTrackingFlags import createGNNTrackingPassFlags
604  icf.addFlagsCategory ("Tracking.ITkGNNPass",
605  createGNNTrackingPassFlags, prefix=True)
606  #FPGA
607  from TrkConfig.InDetFPGATrackingFlags import createFPGATrackingPassFlags
608  icf.addFlagsCategory ("Tracking.ITkFPGAPass",
609  createFPGATrackingPassFlags, prefix=True)
610 
611 
612 
613 
614  # Vertexing flags
615  from TrkConfig.VertexFindingFlags import createPriVertexingFlags
616  icf.addFlagsCategory("Tracking.PriVertex",
617  createPriVertexingFlags, prefix=True)
618 
619  # Turn on the primary vertex reconstruction
620  icf.addFlag("Tracking.doVertexFinding",
621  lambda prevFlags: prevFlags.Beam.Type is not BeamType.Cosmics)
622  # Turn on the secondary vertex V0 finder
623  icf.addFlag("Tracking.doV0Finder", False)
624 
625  icf.addFlag('Tracking.TruthClusterSplittingEff', 0.9)
626 
627  return icf
python.TrkConfigFlags.TrackFitterType
Definition: TrkConfigFlags.py:26
python.TrkConfigFlags.createTrackingConfigFlags
def createTrackingConfigFlags()
Definition: TrkConfigFlags.py:62
SystemOfUnits
python.InDetGNNTrackingConfigFlags.createGNNTrackingConfigFlags
def createGNNTrackingConfigFlags()
Definition: InDetGNNTrackingConfigFlags.py:7
python.TrkConfigFlags.PrimaryPassConfig
Definition: TrkConfigFlags.py:7
python.TrkConfigFlags.ITkPrimaryPassConfig
Definition: TrkConfigFlags.py:20
python.TrkConfigFlags.PixelClusterSplittingType
Definition: TrkConfigFlags.py:38
python.TrkConfigFlags.TrackingComponent
Definition: TrkConfigFlags.py:43
python.TrkConfigFlags.KalmanUpdatorType
Definition: TrkConfigFlags.py:32