ATLAS Offline Software
Functions | Variables
python.ITkTrackRecoConfig Namespace Reference

Functions

def CombinedTrackingPassFlagSets (flags)
 
def ITkClusterSplitProbabilityContainerName (flags)
 
ComponentAccumulator ITkStoreTrackSeparateContainerCfg (flags, str TrackContainer="", str ClusterSplitProbContainer="")
 
def ITkTrackRecoPassCfg (flags, str previousActsExtension=None, list[str] InputCombinedITkTracks=None, list[str] InputCombinedActsTracks=None, list[str] InputExtendedITkTracks=None, list[str] StatTrackCollections=None, list[str] StatTrackTruthCollections=None, str ClusterSplitProbContainer="")
 
ComponentAccumulator ITkActsTrackFinalCfg (flags, list[str] InputCombinedITkTracks=None, ActsTrackContainerName="ActsInDetTrackParticles")
 
def ITkTrackFinalCfg (flags, list[str] InputCombinedITkTracks=None, list[str] StatTrackCollections=None, list[str] StatTrackTruthCollections=None)
 
def ITkStatsCfg (flags, StatTrackCollections=None, StatTrackTruthCollections=None)
 
def ITkActsExtendedPRDInfoCfg (flags)
 
def ITkExtendedPRDInfoCfg (flags)
 
ComponentAccumulator ITkTrackRecoCfg (flags)
 Main ITk tracking config #####################. More...
 

Variables

list _flags_set = []
 
list _extensions_list = []
 
list _actsExtensions = ['Acts', 'ActsFast', 'ActsConversion', 'ActsLargeRadius', 'ActsLowPt']
 
list _outputExtensions = []
 
 flags = initConfigFlags()
 
 EnableCalo
 
 Files
 
 useITkFTF
 
 doITkFastTracking
 
 top_acc = MainServicesCfg(flags)
 
 OutputLevel
 
 withDetails
 
 True
 
 summariseProps
 
 sc = top_acc.run(5)
 

Function Documentation

◆ CombinedTrackingPassFlagSets()

def python.ITkTrackRecoConfig.CombinedTrackingPassFlagSets (   flags)

Definition at line 13 of file ITkTrackRecoConfig.py.

14  global _flags_set
15  if _flags_set:
16  return _flags_set
17 
18  flags_set = []
19 
20  # Primary Pass(es)
21  from TrkConfig.TrkConfigFlags import TrackingComponent
22  validation_configurations = {
23  TrackingComponent.ActsValidateClusters : "ActsValidateClusters",
24  TrackingComponent.ActsValidateSpacePoints : "ActsValidateSpacePoints",
25  TrackingComponent.ActsValidateSeeds : "ActsValidateSeeds",
26  TrackingComponent.ActsValidateConversionSeeds : "ActsValidateConversionSeeds",
27  TrackingComponent.ActsValidateLargeRadiusSeeds: "ActsValidateLargeRadiusSeeds",
28  TrackingComponent.ActsValidateTracks : "ActsValidateTracks",
29  TrackingComponent.ActsValidateAmbiguityResolution : "ActsValidateAmbiguityResolution",
30  }
31 
32  # Athena Pass
33  if TrackingComponent.AthenaChain in flags.Tracking.recoChain:
34  flags_set += [flags.cloneAndReplace(
35  "Tracking.ActiveConfig",
36  f"Tracking.{flags.Tracking.ITkPrimaryPassConfig.value}Pass")]
37 
38  # Acts Pass
39  if TrackingComponent.ActsChain in flags.Tracking.recoChain:
40  flags_set += [flags.cloneAndReplace(
41  "Tracking.ActiveConfig",
42  "Tracking.ITkActsPass")]
43 
44  # Acts Fast Pass
45  if TrackingComponent.ActsFastChain in flags.Tracking.recoChain:
46  flags_set += [flags.cloneAndReplace(
47  "Tracking.ActiveConfig",
48  "Tracking.ITkActsFastPass")]
49 
50  # Acts Heavy Ion Pass
51  if TrackingComponent.ActsHeavyIon in flags.Tracking.recoChain:
52  flags_set += [flags.cloneAndReplace(
53  "Tracking.ActiveConfig",
54  "Tracking.ITkActsHeavyIonPass")]
55 
56  # GNN pass
57  if TrackingComponent.GNNChain in flags.Tracking.recoChain:
58  flags_set += [flags.cloneAndReplace(
59  "Tracking.ActiveConfig",
60  "Tracking.ITkGNNPass")]
61 
62  # Acts Large Radius Pass
63  if flags.Acts.doLargeRadius:
64  flags_set += [flags.cloneAndReplace(
65  "Tracking.ActiveConfig",
66  "Tracking.ITkActsLargeRadiusPass")]
67 
68  # Acts Conversion Pass
69  if flags.Detector.EnableCalo and flags.Acts.doITkConversion and \
70  TrackingComponent.ActsValidateConversionSeeds not in flags.Tracking.recoChain:
71  flags_set += [flags.cloneAndReplace(
72  "Tracking.ActiveConfig",
73  "Tracking.ITkActsConversionPass")]
74 
75  # Acts Low Pt Pass
76  if flags.Acts.doLowPt:
77  flags_set += [flags.cloneAndReplace(
78  "Tracking.ActiveConfig",
79  "Tracking.ITkActsLowPtPass")]
80 
81  # Acts Validation Passes
82  for [configuration, key] in validation_configurations.items():
83  if configuration in flags.Tracking.recoChain:
84  toAdd = eval(f"flags.cloneAndReplace('Tracking.ActiveConfig', 'Tracking.ITk{key}Pass')")
85  flags_set += [toAdd]
86 
87  # LRT
88  if flags.Tracking.doLargeD0:
89  if flags.Tracking.useITkFTF:
90  flagsLRT = flags.cloneAndReplace("Tracking.ActiveConfig",
91  "Tracking.ITkFTFLargeD0Pass")
92  elif flags.Tracking.doITkFastTracking:
93  flagsLRT = flags.cloneAndReplace("Tracking.ActiveConfig",
94  "Tracking.ITkLargeD0FastPass")
95  else:
96  flagsLRT = flags.cloneAndReplace("Tracking.ActiveConfig",
97  "Tracking.ITkLargeD0Pass")
98  flags_set += [flagsLRT]
99 
100 
101  if TrackingComponent.FPGAChain in flags.Tracking.recoChain:
102  flags_set += [flags.cloneAndReplace(
103  "Tracking.ActiveConfig",
104  "Tracking.ITkFPGAPass")]
105 
106  # Photon conversion tracking reco
107  if flags.Detector.EnableCalo and flags.Tracking.doITkConversion:
108  flagsConv = flags.cloneAndReplace("Tracking.ActiveConfig",
109  "Tracking.ITkConversionPass")
110  flags_set += [flagsConv]
111 
112  # LowPt
113  if flags.Tracking.doLowPt:
114  flagsLowPt = flags.cloneAndReplace("Tracking.ActiveConfig",
115  "Tracking.ITkLowPtPass")
116  flags_set += [flagsLowPt]
117 
118  _flags_set = flags_set # Put into cache
119 
120  return flags_set
121 
122 

◆ ITkActsExtendedPRDInfoCfg()

def python.ITkTrackRecoConfig.ITkActsExtendedPRDInfoCfg (   flags)

Definition at line 427 of file ITkTrackRecoConfig.py.

427 def ITkActsExtendedPRDInfoCfg(flags):
428  result = ComponentAccumulator()
429 
430  #Add the truth origin to the truth particles
431  from InDetConfig.InDetPrepRawDataToxAODConfig import ITkActsPixelPrepDataToxAODCfg
432  result.merge(ITkActsPixelPrepDataToxAODCfg(flags))
433 
434  return result
435 

◆ ITkActsTrackFinalCfg()

ComponentAccumulator python.ITkTrackRecoConfig.ITkActsTrackFinalCfg (   flags,
list[str]   InputCombinedITkTracks = None,
  ActsTrackContainerName = "ActsInDetTrackParticles" 
)

Definition at line 294 of file ITkTrackRecoConfig.py.

294 def ITkActsTrackFinalCfg(flags,
295  InputCombinedITkTracks: list[str] = None,
296  ActsTrackContainerName="ActsInDetTrackParticles") -> ComponentAccumulator:
297  # Inputs must not be None
298  assert InputCombinedITkTracks is not None and isinstance(InputCombinedITkTracks, list)
299 
300  acc = ComponentAccumulator()
301  if len(InputCombinedITkTracks) == 0:
302  return acc
303 
304  # Schedule Track particle creation
305  from ActsConfig.ActsTrackFindingConfig import ActsTrackToTrackParticleCnvAlgCfg
306  acc.merge(ActsTrackToTrackParticleCnvAlgCfg(flags, "ActsCombinedTrackToTrackParticleCnvAlg",
307  ACTSTracksLocation=InputCombinedITkTracks,
308  TrackParticlesOutKey=ActsTrackContainerName))
309  if flags.Tracking.doTruth :
310  from ActsConfig.ActsTruthConfig import ActsTrackParticleTruthDecorationAlgCfg
311  track_to_truth_maps=[]
312  for track_container in InputCombinedITkTracks :
313  track_to_truth_maps += [f'{track_container}ToTruthParticleAssociation']
314  # note: suppress stat dumps from ActsTrackParticleTruthDecorationAlg if there is only
315  # a single input collection, because it duplicates in that case the output of
316  # the TrackFindingValidationAlg
318  flags,
319  name=f'{ActsTrackContainerName}TruthDecorationAlg',
320  TrackToTruthAssociationMaps = track_to_truth_maps,
321  TrackParticleContainerName = ActsTrackContainerName,
322  OutputLevel=WARNING if len(InputCombinedITkTracks)==1 else INFO,
323  ComputeTrackRecoEfficiency=False if len(InputCombinedITkTracks)==1 else True
324  ))
325  return acc
326 

◆ ITkClusterSplitProbabilityContainerName()

def python.ITkTrackRecoConfig.ITkClusterSplitProbabilityContainerName (   flags)

Definition at line 123 of file ITkTrackRecoConfig.py.

124  flags_set = CombinedTrackingPassFlagSets(flags)
125  extension = flags_set[-1].Tracking.ActiveConfig.extension
126  ClusterSplitProbContainer = "ITkAmbiguityProcessorSplitProb" + extension
127  return ClusterSplitProbContainer
128 
129 

◆ ITkExtendedPRDInfoCfg()

def python.ITkTrackRecoConfig.ITkExtendedPRDInfoCfg (   flags)

Definition at line 436 of file ITkTrackRecoConfig.py.

436 def ITkExtendedPRDInfoCfg(flags):
437  result = ComponentAccumulator()
438 
439  if flags.Tracking.doTIDE_AmbiTrackMonitoring:
440  from InDetConfig.InDetPrepRawDataToxAODConfig import (
441  ITkPixelPrepDataToxAOD_ExtraTruthCfg as PixelPrepDataToxAODCfg,
442  ITkStripPrepDataToxAOD_ExtraTruthCfg as StripPrepDataToxAODCfg)
443  else:
444  from InDetConfig.InDetPrepRawDataToxAODConfig import (
445  ITkPixelPrepDataToxAODCfg as PixelPrepDataToxAODCfg,
446  ITkStripPrepDataToxAODCfg as StripPrepDataToxAODCfg)
447 
448  result.merge(PixelPrepDataToxAODCfg(
449  flags,
450  ClusterSplitProbabilityName=(
451  "" if flags.Tracking.doITkFastTracking else
453  result.merge(StripPrepDataToxAODCfg(flags))
454 
455  from DerivationFrameworkInDet.InDetToolsConfig import (
456  ITkTSOS_CommonKernelCfg)
457  result.merge(ITkTSOS_CommonKernelCfg(flags))
458 
459  if flags.Tracking.doStoreSiSPSeededTracks:
460  listOfExtensionsRequesting = [
461  e for e in _extensions_list if (e=='') or
462  flags.Tracking[f"ITk{e}Pass"].storeSiSPSeededTracks ]
463  from DerivationFrameworkInDet.InDetToolsConfig import (
464  ITkSiSPTSOS_CommonKernelCfg)
465  result.merge(ITkSiSPTSOS_CommonKernelCfg(flags, listOfExtensions = listOfExtensionsRequesting))
466 
467  if flags.Input.isMC:
468  listOfExtensionsRequesting = [
469  e for e in _extensions_list if (e=='') or
470  (flags.Tracking[f"ITk{e}Pass"].storeSiSPSeededTracks and
471  flags.Tracking[f"ITk{e}Pass"].storeSeparateContainer) ]
472  from InDetPhysValMonitoring.InDetPhysValDecorationConfig import (
473  ITkPhysHitDecoratorAlgCfg)
474  for extension in listOfExtensionsRequesting:
475  result.merge(ITkPhysHitDecoratorAlgCfg(
476  flags,
477  name=f"ITkPhysHit{extension}DecoratorAlg",
478  TrackParticleContainerName=f"InDet{extension}TrackParticles"))
479 
480  return result
481 
482 

◆ ITkStatsCfg()

def python.ITkTrackRecoConfig.ITkStatsCfg (   flags,
  StatTrackCollections = None,
  StatTrackTruthCollections = None 
)

Definition at line 405 of file ITkTrackRecoConfig.py.

405 def ITkStatsCfg(flags, StatTrackCollections=None,
406  StatTrackTruthCollections=None):
407  result = ComponentAccumulator()
408 
409  from InDetConfig.InDetRecStatisticsConfig import (
410  ITkRecStatisticsAlgCfg)
411  result.merge(ITkRecStatisticsAlgCfg(
412  flags,
413  TrackCollectionKeys=StatTrackCollections,
414  TrackTruthCollectionKeys=(
415  StatTrackTruthCollections if flags.Tracking.doTruth else [])))
416 
417  if flags.Tracking.doTruth:
418  from InDetConfig.InDetTrackClusterAssValidationConfig import (
419  ITkTrackClusterAssValidationCfg)
420  result.merge(ITkTrackClusterAssValidationCfg(
421  flags,
422  TracksLocation=StatTrackCollections))
423 
424  return result
425 
426 

◆ ITkStoreTrackSeparateContainerCfg()

ComponentAccumulator python.ITkTrackRecoConfig.ITkStoreTrackSeparateContainerCfg (   flags,
str   TrackContainer = "",
str   ClusterSplitProbContainer = "" 
)

Definition at line 130 of file ITkTrackRecoConfig.py.

131  TrackContainer: str ="",
132  ClusterSplitProbContainer: str = "") -> ComponentAccumulator:
133  result = ComponentAccumulator()
134  extension = flags.Tracking.ActiveConfig.extension
135  if hasattr(flags.TrackOverlay, "ActiveConfig"):
136  doTrackOverlay = getattr(flags.TrackOverlay.ActiveConfig, "doTrackOverlay", None)
137  else:
138  doTrackOverlay = flags.Overlay.doTrackOverlay
139 
140  if doTrackOverlay:
141  # schedule merger to combine signal and background tracks
142  InputTracks = [flags.Overlay.SigPrefix+TrackContainer,
143  flags.Overlay.BkgPrefix+TrackContainer]
144  AssociationMapName = ("PRDtoTrackMapMerge_Resolved" +
145  extension + "Tracks")
146  MergerOutputTracks = TrackContainer
147 
148  from TrkConfig.TrkTrackCollectionMergerConfig import TrackCollectionMergerAlgCfg
149  result.merge(TrackCollectionMergerAlgCfg(
150  flags,
151  name="TrackCollectionMergerAlgCfg"+extension,
152  InputCombinedTracks=InputTracks,
153  OutputCombinedTracks=MergerOutputTracks,
154  AssociationMapName=AssociationMapName))
155 
156  # Run truth, but only do this for non ACTS workflows
157  if flags.Tracking.doTruth and extension not in _actsExtensions:
158  from InDetConfig.ITkTrackTruthConfig import ITkTrackTruthCfg
159  result.merge(ITkTrackTruthCfg(
160  flags,
161  Tracks=TrackContainer,
162  DetailedTruth=TrackContainer+"DetailedTruth",
163  TracksTruth=TrackContainer+"TruthCollection"))
164 
165  # Create track particles from all the different track collections
166  # We have different algorithms depending on the EDM being used
167  if extension not in _actsExtensions:
168  # Workflows that use Trk Tracks
169  from xAODTrackingCnv.xAODTrackingCnvConfig import ITkTrackParticleCnvAlgCfg
170  result.merge(ITkTrackParticleCnvAlgCfg(
171  flags,
172  name=extension + "TrackParticleCnvAlg",
173  TrackContainerName=TrackContainer,
174  xAODTrackParticlesFromTracksContainerName=(
175  "InDet" + extension + "TrackParticles"),
176  ClusterSplitProbabilityName=(
177  "" if flags.Tracking.doITkFastTracking else
178  ClusterSplitProbContainer),
179  AssociationMapName=""))
180  else:
181  # Workflows that use Acts Tracks
182  from ActsConfig.ActsTrackFindingConfig import ActsTrackToTrackParticleCnvAlgCfg
183  # The following few lines will disappear once we have imposed a proper nomenclature for our algorithms and collection
184  prefix = flags.Tracking.ActiveConfig.extension
185  result.merge(ActsTrackToTrackParticleCnvAlgCfg(flags, f"{prefix}ResolvedTrackToAltTrackParticleCnvAlg",
186  ACTSTracksLocation=TrackContainer,
187  TrackParticlesOutKey=f'{TrackContainer}ParticlesAlt'))
188 
189  if flags.Tracking.doTruth :
190  from ActsConfig.ActsTruthConfig import ActsTrackParticleTruthDecorationAlgCfg
191  result.merge(ActsTrackParticleTruthDecorationAlgCfg(flags,
192  name=f'{TrackContainer}ParticleTruthDecorationAlg',
193  TrackToTruthAssociationMaps = [f'{TrackContainer}ToTruthParticleAssociation'],
194  TrackParticleContainerName = f'{TrackContainer}ParticlesAlt'
195  ))
196  return result
197 
198 
199 # Returns CA + ClusterSplitProbContainer

◆ ITkTrackFinalCfg()

def python.ITkTrackRecoConfig.ITkTrackFinalCfg (   flags,
list[str]   InputCombinedITkTracks = None,
list[str]   StatTrackCollections = None,
list[str]   StatTrackTruthCollections = None 
)

Definition at line 327 of file ITkTrackRecoConfig.py.

327 def ITkTrackFinalCfg(flags,
328  InputCombinedITkTracks: list[str] = None,
329  StatTrackCollections: list[str] = None,
330  StatTrackTruthCollections: list[str] = None):
331  # None of the input collection is supposed to be None
332  assert InputCombinedITkTracks is not None and isinstance(InputCombinedITkTracks, list)
333  assert StatTrackCollections is not None and isinstance(StatTrackCollections, list)
334  assert StatTrackTruthCollections is not None and isinstance(StatTrackTruthCollections, list)
335 
336  # If there are no tracks return directly
337  result = ComponentAccumulator()
338  if len(InputCombinedITkTracks) == 0:
339  return result
340 
341  if hasattr(flags.TrackOverlay, "ActiveConfig"):
342  doTrackOverlay = getattr(flags.TrackOverlay.ActiveConfig, "doTrackOverlay", None)
343  else:
344  doTrackOverlay = flags.Overlay.doTrackOverlay
345 
346  TrackContainer = "CombinedITkTracks"
347  if doTrackOverlay:
348  #schedule merge to combine signal and background tracks
349  InputCombinedITkTracks += [flags.Overlay.BkgPrefix + TrackContainer]
350 
351  from TrkConfig.TrkConfigFlags import TrackingComponent
352  doGNNWithoutAmbiReso = (TrackingComponent.GNNChain in flags.Tracking.recoChain and (not flags.Tracking.GNN.doAmbiResolution))
353  skipClusterMerge = doGNNWithoutAmbiReso or flags.Tracking.doITkFastTracking
354  # This merges track collections
355  from TrkConfig.TrkTrackCollectionMergerConfig import (
356  ITkTrackCollectionMergerAlgCfg)
357  result.merge(ITkTrackCollectionMergerAlgCfg(
358  flags,
359  InputCombinedTracks=InputCombinedITkTracks,
360  OutputCombinedTracks=TrackContainer,
361  AssociationMapName=(
362  "" if skipClusterMerge else
363  f"PRDtoTrackMapMerge_{TrackContainer}")))
364 
365  if flags.Tracking.doTruth:
366  from InDetConfig.ITkTrackTruthConfig import ITkTrackTruthCfg
367  result.merge(ITkTrackTruthCfg(
368  flags,
369  Tracks=TrackContainer,
370  DetailedTruth=f"{TrackContainer}DetailedTruth",
371  TracksTruth=f"{TrackContainer}TruthCollection"))
372 
373  StatTrackCollections += [TrackContainer]
374  StatTrackTruthCollections += [f"{TrackContainer}TruthCollection"]
375 
376  if flags.Tracking.doSlimming:
377  from TrkConfig.TrkTrackSlimmerConfig import TrackSlimmerCfg
378  result.merge(TrackSlimmerCfg(
379  flags,
380  TrackLocation=[TrackContainer]))
381 
382  splitProbName = ITkClusterSplitProbabilityContainerName(flags)
383 
384  # This creates track particles
385  from xAODTrackingCnv.xAODTrackingCnvConfig import ITkTrackParticleCnvAlgCfg
386  result.merge(ITkTrackParticleCnvAlgCfg(
387  flags,
388  ClusterSplitProbabilityName=(
389  "" if skipClusterMerge else
390  splitProbName),
391  AssociationMapName=(
392  "" if skipClusterMerge else
393  f"PRDtoTrackMapMerge_{TrackContainer}"),
394  isActsAmbi = 'ActsValidateResolvedTracks' in splitProbName or \
395  'ActsValidateAmbiguityResolution' in splitProbName or \
396  'ActsValidateScoreBasedAmbiguityResolution' in splitProbName or \
397  'ActsConversion' in splitProbName or \
398  'ActsLargeRadius' in splitProbName or \
399  'ActsLowPt' in splitProbName or \
400  ('Acts' in splitProbName and 'Validate' not in splitProbName) ))
401 
402  return result
403 
404 

◆ ITkTrackRecoCfg()

ComponentAccumulator python.ITkTrackRecoConfig.ITkTrackRecoCfg (   flags)

Main ITk tracking config #####################.

Configures complete ITk tracking 

Definition at line 488 of file ITkTrackRecoConfig.py.

488 def ITkTrackRecoCfg(flags) -> ComponentAccumulator:
489  """Configures complete ITk tracking """
490  result = ComponentAccumulator()
491 
492  if flags.Input.Format is Format.BS:
493  # TODO: ITk BS providers
494  raise RuntimeError("ByteStream inputs not supported")
495 
496  # Get all the requested tracking passes
497  flags_set = CombinedTrackingPassFlagSets(flags)
498 
499  # Store the names of several collections from all the different passes
500  # These collections will then be used for different purposes
501 
502  # Tracks to be ultimately merged in InDetTrackParticle collection
503  InputCombinedITkTracks = []
504  # Same but for ACTS collection
505  InputCombinedActsTracks = []
506  # Includes also tracks which end in standalone TrackParticle collections
507  InputExtendedITkTracks = []
508  # Cluster split prob container for measurement removal
509  ClusterSplitProbContainer = ""
510  # To be passed to the InDetRecStatistics alg
511  StatTrackCollections = []
512  StatTrackTruthCollections = []
513  # Record previous ACTS extension
514  previousActsExtension = None
515 
516  from InDetConfig.SiliconPreProcessing import ITkRecPreProcessingSiliconCfg
517 
518  for current_flags in flags_set:
519  printActiveConfig(current_flags)
520 
521 
522  extension = current_flags.Tracking.ActiveConfig.extension
523  if extension not in _actsExtensions:
524  _extensions_list.append(extension)
525 
526  # Add the extension to the output job option
527  _outputExtensions.append(extension)
528 
529  # Data Preparation
530  # According to the tracking pass we have different data preparation
531  # sequences. We may have:
532  # (1) Full Athena data preparation
533  # (2) Full Acts data preparation
534  # (3) Hybrid configurations with EDM converters
535  result.merge(ITkRecPreProcessingSiliconCfg(current_flags,
536  previousActsExtension=previousActsExtension))
537 
538  # Track Reconstruction
539  # This includes track finding and ambiguity resolution
540  # The output is the component accumulator to be added to the sequence
541  # and the name of the cluster split prob container that is used for
542  # removing measurements used by previous passes
543  # This last object will also assure the proper sequence of the tracking passes
544  # since it will create a data dependency from the prevous pass
545  acc, ClusterSplitProbContainer = ITkTrackRecoPassCfg(
546  current_flags,
547  previousActsExtension,
548  InputCombinedITkTracks=InputCombinedITkTracks,
549  InputCombinedActsTracks=InputCombinedActsTracks,
550  InputExtendedITkTracks=InputExtendedITkTracks,
551  StatTrackCollections=StatTrackCollections,
552  StatTrackTruthCollections=StatTrackTruthCollections,
553  ClusterSplitProbContainer=ClusterSplitProbContainer)
554  result.merge(acc)
555 
556  # Store ACTS extension
557  if 'Acts' in extension:
558  previousActsExtension = extension
559 
560  # This merges the track collection in InputCombinedITkTracks
561  # and creates a track particle collection from that
562  if InputCombinedITkTracks:
563 
564  result.merge(
565  ITkTrackFinalCfg(flags,
566  InputCombinedITkTracks=InputCombinedITkTracks,
567  StatTrackCollections=StatTrackCollections,
568  StatTrackTruthCollections=StatTrackTruthCollections))
569 
570 
571 
572 
573  # Now handle ACTS tracks instead if present in the event
574  if InputCombinedActsTracks:
575 
576  # The name of the Acts xAOD container name depends on what
577  # workflow has been executed, which we get by checking
578  # the size of the track containers.
579 
580  ActsTrackContainerName = "InDetTrackParticles" if not InputCombinedITkTracks else "ActsInDetTrackParticles"
581  ActsPrimaryVertices = "PrimaryVertices" if not InputCombinedITkTracks else "ActsPrimaryVertices"
582 
583  result.merge(ITkActsTrackFinalCfg(flags,
584  InputCombinedITkTracks=InputCombinedActsTracks,
585  ActsTrackContainerName=ActsTrackContainerName))
586 
587  # Perform vertex finding
588  if flags.Tracking.doVertexFinding:
589 
590  from InDetConfig.InDetPriVxFinderConfig import primaryVertexFindingCfg
591 
592  # Schedule the usual vertex finding for Athena workflow(s)
593  # ONLY schedule this if there are Athena Legacy Track collections
594  if InputCombinedITkTracks:
595  result.merge(primaryVertexFindingCfg(flags))
596 
597  # Schedule the same vertex finding for Acts workflow(s)
598  # For now this is separate from the Athena counterpart, but in the
599  # end the difference will not be needed anymore
600  # ONLY schedule this if there are ACTS Track collections
601  if InputCombinedActsTracks:
602  result.merge(primaryVertexFindingCfg(flags,
603  name="ActsPriVxFinderAlg",
604  TracksName=ActsTrackContainerName,
605  vxCandidatesOutputName=ActsPrimaryVertices))
606 
607  # Post Processing
608  # This is mainly for validation support
609  print("-------- POST PROCESSING --------")
610  for current_flags in flags_set:
611  extension = current_flags.Tracking.ActiveConfig.extension
612  print(f"- Running post-processing for extension: {extension}")
613 
614  # Persistify the Seeds
615  # This is done for the InDet EDM, while for ACTS seeds the persistification
616  # support is done while scheduling the seeding algorithms
617  # This means that here we only care about the legacy seeds, that are
618  # produced whem the legacy Track Finding is scheduled
619  # - flags.Tracking.ActiveConfig.doAthenaTrack
620  # This also covers the case of the Acts->InDet Seed conversion, since that
621  # runs the legacy track finding as well
622  #
623  # At the end of this we have a track collection (segments from the seeds)
624  # and the corresponding track particle collection
625  if current_flags.Tracking.ActiveConfig.doAthenaTrack:
626  if current_flags.Tracking.doStoreTrackSeeds:
627  from InDetConfig.ITkPersistificationConfig import ITkTrackSeedsFinalCfg
628  result.merge(ITkTrackSeedsFinalCfg(current_flags))
629 
630  # Persistify Track from Track Finding
631  # Currently this is only possible for Trk Tracks
632  # For legacy tracking passes the CKF Trk Tracks are always produced
633  # - flags.Tracking.ActiveConfig.doAthenaTrack
634  # For hybrid ACTS-Athena tracking passes they are produced only after Track EDM conversion
635  # - flags.Tracking.ActiveConfig.doActsToAthenaTrack
636  if current_flags.Tracking.ActiveConfig.doAthenaTrack or current_flags.Tracking.ActiveConfig.doActsToAthenaTrack:
637  if current_flags.Tracking.doStoreSiSPSeededTracks:
638  from InDetConfig.ITkPersistificationConfig import ITkSiSPSeededTracksFinalCfg
639  result.merge(ITkSiSPSeededTracksFinalCfg(current_flags))
640 
641  if flags.Tracking.doStats:
642  if _extensions_list:
643  result.merge(ITkStatsCfg(
644  flags_set[0], # Use cuts from primary pass
645  StatTrackCollections=StatTrackCollections,
646  StatTrackTruthCollections=StatTrackTruthCollections))
647 
648 
649 
650  if flags.Tracking.writeExtendedSi_PRDInfo:
651  if _extensions_list:
652  result.merge(ITkExtendedPRDInfoCfg(flags))
653 
654  #Acts algorithm
655  else:
656  result.merge(ITkActsExtendedPRDInfoCfg(flags))
657 
658  # output
659  from InDetConfig.ITkTrackOutputConfig import ITkTrackRecoOutputCfg
660  result.merge(ITkTrackRecoOutputCfg(flags, _outputExtensions))
661  result.printConfig(withDetails = False, summariseProps = False)
662  return result
663 
664 

◆ ITkTrackRecoPassCfg()

def python.ITkTrackRecoConfig.ITkTrackRecoPassCfg (   flags,
str   previousActsExtension = None,
list[str]   InputCombinedITkTracks = None,
list[str]   InputCombinedActsTracks = None,
list[str]   InputExtendedITkTracks = None,
list[str]   StatTrackCollections = None,
list[str]   StatTrackTruthCollections = None,
str   ClusterSplitProbContainer = "" 
)

Definition at line 200 of file ITkTrackRecoConfig.py.

200 def ITkTrackRecoPassCfg(flags,
201  previousActsExtension: str = None,
202  InputCombinedITkTracks: list[str] = None,
203  InputCombinedActsTracks: list[str] = None,
204  InputExtendedITkTracks: list[str] = None,
205  StatTrackCollections: list[str] = None,
206  StatTrackTruthCollections: list[str] = None,
207  ClusterSplitProbContainer: str = ""):
208  # We use these lists to store the collections from all the tracking passes, thus keeping the history
209  # of previous passes. None of these lists is allowed to be a None
210  assert InputCombinedITkTracks is not None and isinstance(InputCombinedITkTracks, list)
211  assert InputCombinedActsTracks is not None and isinstance(InputCombinedActsTracks, list)
212  assert InputExtendedITkTracks is not None and isinstance(InputExtendedITkTracks, list)
213  assert StatTrackCollections is not None and isinstance(StatTrackCollections, list)
214  assert StatTrackTruthCollections is not None and isinstance(StatTrackTruthCollections ,list)
215 
216  # Get the tracking pass extension name
217  extension = flags.Tracking.ActiveConfig.extension
218 
219  result = ComponentAccumulator()
220  if hasattr(flags.TrackOverlay, "ActiveConfig"):
221  doTrackOverlay = getattr(flags.TrackOverlay.ActiveConfig, "doTrackOverlay", None)
222  else:
223  doTrackOverlay = flags.Overlay.doTrackOverlay
224 
225  # Define collection name(s)
226  # This is the track collection AFTER the ambiguity resolution
227  TrackContainer = "Resolved" + extension + "Tracks"
228  # For Acts we have another convention, with the extention as the first element in the name
229  if extension in _actsExtensions:
230  TrackContainer = extension + "ResolvedTracks"
231  if doTrackOverlay and extension == "Conversion":
232  TrackContainer = flags.Overlay.SigPrefix + TrackContainer
233 
234  # This is the track collection BEFORE the ambiguity resolution
235  SiSPSeededTracks = "SiSPSeeded" + extension + "Tracks"
236  # For ACTS the name is totally different
237  if extension in _actsExtensions:
238  SiSPSeededTracks = extension + "Tracks"
239 
240  # This performs track finding
241  from InDetConfig.ITkTrackingSiPatternConfig import ITkTrackingSiPatternCfg
242  result.merge(ITkTrackingSiPatternCfg(
243  flags,
244  previousActsExtension=previousActsExtension,
245  InputCollections=InputExtendedITkTracks,
246  ResolvedTrackCollectionKey=TrackContainer,
247  SiSPSeededTrackCollectionKey=SiSPSeededTracks,
248  ClusterSplitProbContainer=ClusterSplitProbContainer))
249  StatTrackCollections += [SiSPSeededTracks, TrackContainer]
250  StatTrackTruthCollections += [SiSPSeededTracks+"TruthCollection",
251  TrackContainer+"TruthCollection"]
252 
253  if doTrackOverlay and extension == "Conversion":
254  TrackContainer = "Resolved" + extension + "Tracks"
256  flags,
257  TrackContainer=TrackContainer,
258  ClusterSplitProbContainer=ClusterSplitProbContainer))
259 
260  if flags.Tracking.ActiveConfig.storeSeparateContainer:
261  # If we do not want the track collection to be merged with another collection
262  # then we immediately create the track particles from it
263  # This happens inside ITkStoreTrackSeparateContainerCfg
264 
265  # Track container, for ACTS workflow, depends on whether we activated the ambiguity resolution or not
266  inputTrack = TrackContainer
267  if extension in _actsExtensions and not flags.Tracking.ActiveConfig.doActsAmbiguityResolution:
268  inputTrack = SiSPSeededTracks
269 
271  flags,
272  TrackContainer=inputTrack,
273  ClusterSplitProbContainer=ClusterSplitProbContainer))
274  else:
275  # ClusterSplitProbContainer is used for removing measurements used in previous passes
276  # For ACTS this is still not possible, TO BE IMPLEMENTED
277  ClusterSplitProbContainer = (
278  "ITkAmbiguityProcessorSplitProb" + extension)
279  # Collect all the Trk Track collections to be then merged in a single big collection
280  # Merging will be done later, and after that we create track particles from the merged collection
281  if extension not in _actsExtensions:
282  InputCombinedITkTracks += [TrackContainer]
283  else:
284  InputCombinedActsTracks += [TrackContainer]
285 
286  # This is only used in this same function for the Track-PRD association
287  # Not yet supported for ACTS tracks
288  if extension not in _actsExtensions:
289  InputExtendedITkTracks += [TrackContainer]
290 
291  return result, ClusterSplitProbContainer
292 
293 

Variable Documentation

◆ _actsExtensions

list python.ITkTrackRecoConfig._actsExtensions = ['Acts', 'ActsFast', 'ActsConversion', 'ActsLargeRadius', 'ActsLowPt']
private

Definition at line 10 of file ITkTrackRecoConfig.py.

◆ _extensions_list

list python.ITkTrackRecoConfig._extensions_list = []
private

Definition at line 9 of file ITkTrackRecoConfig.py.

◆ _flags_set

list python.ITkTrackRecoConfig._flags_set = []
private

Definition at line 8 of file ITkTrackRecoConfig.py.

◆ _outputExtensions

list python.ITkTrackRecoConfig._outputExtensions = []
private

Definition at line 11 of file ITkTrackRecoConfig.py.

◆ doITkFastTracking

python.ITkTrackRecoConfig.doITkFastTracking

Definition at line 678 of file ITkTrackRecoConfig.py.

◆ EnableCalo

python.ITkTrackRecoConfig.EnableCalo

Definition at line 670 of file ITkTrackRecoConfig.py.

◆ Files

python.ITkTrackRecoConfig.Files

Definition at line 673 of file ITkTrackRecoConfig.py.

◆ flags

python.ITkTrackRecoConfig.flags = initConfigFlags()

Definition at line 667 of file ITkTrackRecoConfig.py.

◆ OutputLevel

python.ITkTrackRecoConfig.OutputLevel

Definition at line 695 of file ITkTrackRecoConfig.py.

◆ sc

python.ITkTrackRecoConfig.sc = top_acc.run(5)

Definition at line 700 of file ITkTrackRecoConfig.py.

◆ summariseProps

python.ITkTrackRecoConfig.summariseProps

Definition at line 696 of file ITkTrackRecoConfig.py.

◆ top_acc

python.ITkTrackRecoConfig.top_acc = MainServicesCfg(flags)

Definition at line 683 of file ITkTrackRecoConfig.py.

◆ True

python.ITkTrackRecoConfig.True

Definition at line 696 of file ITkTrackRecoConfig.py.

◆ useITkFTF

python.ITkTrackRecoConfig.useITkFTF

Definition at line 677 of file ITkTrackRecoConfig.py.

◆ withDetails

python.ITkTrackRecoConfig.withDetails

Definition at line 696 of file ITkTrackRecoConfig.py.

python.InDetPrepRawDataToxAODConfig.ITkActsPixelPrepDataToxAODCfg
def ITkActsPixelPrepDataToxAODCfg(flags, name="ITkActsPixelPrepDataToxAOD", **kwargs)
Definition: InDetPrepRawDataToxAODConfig.py:46
python.ITkTrackRecoConfig.ITkExtendedPRDInfoCfg
def ITkExtendedPRDInfoCfg(flags)
Definition: ITkTrackRecoConfig.py:436
python.ITkTrackRecoConfig.ITkTrackRecoCfg
ComponentAccumulator ITkTrackRecoCfg(flags)
Main ITk tracking config #####################.
Definition: ITkTrackRecoConfig.py:488
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.ITkTrackTruthConfig.ITkTrackTruthCfg
def ITkTrackTruthCfg(flags, Tracks="CombinedITkTracks", DetailedTruth="CombinedITkTracksDetailedTrackTruth", TracksTruth="CombinedITkTracksTrackTruthCollection")
Definition: ITkTrackTruthConfig.py:10
python.InDetToolsConfig.ITkTSOS_CommonKernelCfg
def ITkTSOS_CommonKernelCfg(flags, name="ITkTSOS_CommonKernel")
Definition: InDetToolsConfig.py:314
python.InDetRecStatisticsConfig.ITkRecStatisticsAlgCfg
def ITkRecStatisticsAlgCfg(flags, name='ITkRecStatistics', **kwargs)
Definition: InDetRecStatisticsConfig.py:62
python.InDetPriVxFinderConfig.primaryVertexFindingCfg
ComponentAccumulator primaryVertexFindingCfg(flags, str name="InDetPriVxFinder", vxCandidatesOutputName=None, **kwargs)
Definition: InDetPriVxFinderConfig.py:78
python.SiliconPreProcessing.ITkRecPreProcessingSiliconCfg
def ITkRecPreProcessingSiliconCfg(flags, *str previousActsExtension=None)
Definition: SiliconPreProcessing.py:91
python.ITkTrackRecoConfig.ITkActsTrackFinalCfg
ComponentAccumulator ITkActsTrackFinalCfg(flags, list[str] InputCombinedITkTracks=None, ActsTrackContainerName="ActsInDetTrackParticles")
Definition: ITkTrackRecoConfig.py:294
xAODTrackingCnvConfig.ITkTrackParticleCnvAlgCfg
def ITkTrackParticleCnvAlgCfg(flags, name="ITkTrackParticleCnvAlg", ClusterSplitProbabilityName="", AssociationMapName="", bool isActsAmbi=False, **kwargs)
Definition: xAODTrackingCnvConfig.py:287
python.TrackingPassFlags.printActiveConfig
def printActiveConfig(flags)
Definition: TrackingPassFlags.py:1005
python.TrkTrackCollectionMergerConfig.ITkTrackCollectionMergerAlgCfg
def ITkTrackCollectionMergerAlgCfg(flags, name="ITkTrackCollectionMerger", InputCombinedTracks=None, OutputCombinedTracks="CombinedITkTracks", **kwargs)
Definition: TrkTrackCollectionMergerConfig.py:31
python.ITkPersistificationConfig.ITkSiSPSeededTracksFinalCfg
ComponentAccumulator ITkSiSPSeededTracksFinalCfg(flags)
Definition: ITkPersistificationConfig.py:38
python.InDetToolsConfig.ITkSiSPTSOS_CommonKernelCfg
def ITkSiSPTSOS_CommonKernelCfg(flags, name="ITkSiSPTSOS_CommonKernel", listOfExtensions=[])
Definition: InDetToolsConfig.py:360
python.ITkTrackOutputConfig.ITkTrackRecoOutputCfg
def ITkTrackRecoOutputCfg(flags, extensions_list=None)
Definition: ITkTrackOutputConfig.py:6
python.TrkTrackSlimmerConfig.TrackSlimmerCfg
def TrackSlimmerCfg(flags, name="TrackSlimmer", **kwargs)
Definition: TrkTrackSlimmerConfig.py:6
python.ITkTrackRecoConfig.ITkStatsCfg
def ITkStatsCfg(flags, StatTrackCollections=None, StatTrackTruthCollections=None)
Definition: ITkTrackRecoConfig.py:405
python.ITkTrackRecoConfig.ITkStoreTrackSeparateContainerCfg
ComponentAccumulator ITkStoreTrackSeparateContainerCfg(flags, str TrackContainer="", str ClusterSplitProbContainer="")
Definition: ITkTrackRecoConfig.py:130
python.ITkTrackRecoConfig.ITkTrackFinalCfg
def ITkTrackFinalCfg(flags, list[str] InputCombinedITkTracks=None, list[str] StatTrackCollections=None, list[str] StatTrackTruthCollections=None)
Definition: ITkTrackRecoConfig.py:327
python.ITkTrackRecoConfig.ITkClusterSplitProbabilityContainerName
def ITkClusterSplitProbabilityContainerName(flags)
Definition: ITkTrackRecoConfig.py:123
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.ITkTrackRecoConfig.ITkActsExtendedPRDInfoCfg
def ITkActsExtendedPRDInfoCfg(flags)
Definition: ITkTrackRecoConfig.py:427
InDetPhysValDecorationConfig.ITkPhysHitDecoratorAlgCfg
def ITkPhysHitDecoratorAlgCfg(flags, name="ITkPhysHitDecoratorAlg", **kwargs)
Definition: InDetPhysValDecorationConfig.py:65
python.InDetTrackClusterAssValidationConfig.ITkTrackClusterAssValidationCfg
def ITkTrackClusterAssValidationCfg(flags, name='ITkTrackClusterAssValidation', **kwargs)
Definition: InDetTrackClusterAssValidationConfig.py:41
python.ITkTrackingSiPatternConfig.ITkTrackingSiPatternCfg
def ITkTrackingSiPatternCfg(flags, InputCollections=None, ResolvedTrackCollectionKey=None, SiSPSeededTrackCollectionKey=None, ClusterSplitProbContainer='', previousActsExtension=None)
Definition: ITkTrackingSiPatternConfig.py:11
python.ITkPersistificationConfig.ITkTrackSeedsFinalCfg
ComponentAccumulator ITkTrackSeedsFinalCfg(flags)
Definition: ITkPersistificationConfig.py:8
python.TrkTrackCollectionMergerConfig.TrackCollectionMergerAlgCfg
def TrackCollectionMergerAlgCfg(flags, name="InDetTrackCollectionMerger", InputCombinedTracks=None, OutputCombinedTracks="", **kwargs)
Definition: TrkTrackCollectionMergerConfig.py:7
python.ITkTrackRecoConfig.ITkTrackRecoPassCfg
def ITkTrackRecoPassCfg(flags, str previousActsExtension=None, list[str] InputCombinedITkTracks=None, list[str] InputCombinedActsTracks=None, list[str] InputExtendedITkTracks=None, list[str] StatTrackCollections=None, list[str] StatTrackTruthCollections=None, str ClusterSplitProbContainer="")
Definition: ITkTrackRecoConfig.py:200
ActsTruthConfig.ActsTrackParticleTruthDecorationAlgCfg
ComponentAccumulator ActsTrackParticleTruthDecorationAlgCfg(flags, str name='ActsTrackParticleTruthDecorationAlg', **dict kwargs)
Definition: ActsTruthConfig.py:116
python.ITkTrackRecoConfig.CombinedTrackingPassFlagSets
def CombinedTrackingPassFlagSets(flags)
Definition: ITkTrackRecoConfig.py:13
ActsTrackFindingConfig.ActsTrackToTrackParticleCnvAlgCfg
ComponentAccumulator ActsTrackToTrackParticleCnvAlgCfg(flags, str name="ActsTrackToTrackParticleCnvAlg", **kwargs)
Definition: ActsTrackFindingConfig.py:340