ATLAS Offline Software
Loading...
Searching...
No Matches
ITkActsPatternRecognitionConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3from InDetConfig.ITkActsHelpers import isPrimaryPass
4
6 *,
7 previousExtension: str = None) -> ComponentAccumulator:
8 acc = ComponentAccumulator()
9
10 # Vertex reconstruction using spacepoints
11 if flags.Tracking.ActiveConfig.useHoughVertexFilter:
12 from HIGlobal.HIHoughVtxFinderConfig import HIHoughVtxRecoCfg
13 acc.merge(HIHoughVtxRecoCfg(flags,
14 inputPixelSpacePoints = "ITkPixelSpacePoints_Cached" if flags.Acts.useCache else "ITkPixelSpacePoints"))
15
16 # GNN replaces the seeding+CKF+ambiguity chain only for the primary pass.
17 # Secondary passes (LargeD0, conversion, ...) fall back to the standard chain.
18 if flags.Acts.GNN.Enable and isPrimaryPass(flags):
19 from ActsConfig.ActsTrackFindingConfig import ActsTrackFindingGNNCfg
20 acc.merge(ActsTrackFindingGNNCfg(flags))
21 else:
22 # Seeding
23 from ActsConfig.ActsSeedingConfig import ActsSeedingCfg
24 acc.merge(ActsSeedingCfg(flags))
25
26 # CKF
27 from ActsConfig.ActsTrackFindingConfig import ActsTrackFindingCfg
28 acc.merge(ActsTrackFindingCfg(flags))
29
30 # Ambiguity Resolution
31 if flags.Acts.doAmbiguityResolution:
32 from ActsConfig.ActsTrackFindingConfig import ActsAmbiguityResolutionCfg
33 acc.merge(ActsAmbiguityResolutionCfg(flags))
34
35 # PRD association
36 from ActsConfig.ActsPrdAssociationConfig import ActsPrdAssociationAlgCfg
37 acc.merge(ActsPrdAssociationAlgCfg(flags,
38 name = f'{flags.Tracking.ActiveConfig.extension}PrdAssociationAlg',
39 previousActsExtension = previousExtension))
40
41 # Truth
42 if flags.Tracking.doTruth:
43 # Run truth on CKF tracks
44 # This is only necessary if we are asking for these tracks to be persistified with the
45 # - flag: Tracking.ActiveConfig.storeSiSPSeededTracks set to True OR
46 # - flag: flags.Acts.doAmbiguityResolution set to False
47 if flags.Tracking.ActiveConfig.storeSiSPSeededTracks or not flags.Acts.doAmbiguityResolution or (flags.Acts.GNN.Enable and isPrimaryPass(flags)):
48 from ActsConfig.ActsTruthConfig import ActsTrackToTruthAssociationAlgCfg, ActsTrackFindingValidationAlgCfg
49 acts_tracks = f"{flags.Tracking.ActiveConfig.extension}Tracks"
50 acc.merge(ActsTrackToTruthAssociationAlgCfg(flags,
51 name = f"{acts_tracks}TrackToTruthAssociationAlg",
52 ACTSTracksLocation = acts_tracks,
53 AssociationMapOut = f"{acts_tracks}ToTruthParticleAssociation"))
54
55 acc.merge(ActsTrackFindingValidationAlgCfg(flags,
56 name = f"{acts_tracks}TrackFindingValidationAlg",
57 TrackToTruthAssociationMap = f"{acts_tracks}ToTruthParticleAssociation"))
58
59 # Run truth on the tracks from ambiguity resolution. This is only necessary if
60 # - flag: flags.Acts.doAmbiguityResolution set to True
61 if flags.Acts.doAmbiguityResolution:
62 acts_tracks = f"{flags.Tracking.ActiveConfig.extension}ResolvedTracks"
63 from ActsConfig.ActsTruthConfig import ActsTrackToTruthAssociationAlgCfg, ActsTrackFindingValidationAlgCfg
64 acc.merge(ActsTrackToTruthAssociationAlgCfg(flags,
65 name = f"{acts_tracks}TrackToTruthAssociationAlg",
66 ACTSTracksLocation = acts_tracks,
67 AssociationMapOut = f"{acts_tracks}ToTruthParticleAssociation"))
68
69 acc.merge(ActsTrackFindingValidationAlgCfg(flags,
70 name = f"{acts_tracks}TrackFindingValidationAlg",
71 TrackToTruthAssociationMap = f"{acts_tracks}ToTruthParticleAssociation"))
72
73 return acc
74
ComponentAccumulator ITkActsTrackReconstructionCfg(flags, *, str previousExtension=None)