Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
python.ITkActsTrackRecoConfig Namespace Reference

Functions

ComponentAccumulator ITkActsTrackRecoCfg (flags)
 

Function Documentation

◆ ITkActsTrackRecoCfg()

ComponentAccumulator python.ITkActsTrackRecoConfig.ITkActsTrackRecoCfg (   flags)

Definition at line 6 of file ITkActsTrackRecoConfig.py.

6 def ITkActsTrackRecoCfg(flags) -> ComponentAccumulator:
7  # Main Job Option for ACTS Track Reconstruction with ITk
8  print("Scheduling the ACTS Job Option for ITk Track Reconstruction")
9  if flags.Tracking.doITkFastTracking:
10  print("- Configuration requested: Fast Tracking")
11  acc = ComponentAccumulator()
12 
13  # Pre-Processing
14  # Retrieve all the tracking passes
15  from InDetConfig.ITkActsHelpers import extractTrackingPasses
16  scheduledTrackingPasses = extractTrackingPasses(flags)
17  # Keep track of previous pass (used for PRD mapping)
18  previousExtension = None
19 
20  # Track Collections to be merged for main track particle collection
21  # This is the groups of tracks generated in tracking passes that do not store
22  # tracks in separate containers
23  InputCombinedITkTracks = []
24 
25  # Container names
26  trackParticleContainerName = "InDetTrackParticles"
27  primaryVertices = "PrimaryVertices"
28 
29  # Reconstruction
30  from InDetConfig.ITkActsHelpers import isPrimaryPass
31  for currentFlags in scheduledTrackingPasses:
32  # Printing configuration
33  print(f"---- Preparing scheduling of algorithms for tracking pass: {currentFlags.Tracking.ActiveConfig.extension}")
34  print(f"---- - Is primary pass: {isPrimaryPass(currentFlags)}")
35  from TrkConfig.TrackingPassFlags import printActiveConfig
36  printActiveConfig(currentFlags)
37 
38  # Data Preparation
39  # This includes Region-of-Interest creation, Cluster and Space Point formation
40  from InDetConfig.ITkActsDataPreparationConfig import ITkActsDataPreparationCfg
41  acc.merge(ITkActsDataPreparationCfg(currentFlags,
42  previousExtension = previousExtension))
43 
44  # Track Reconstruction
45  # This includes Seeding, Track Finding (CKF) and Ambiguity Resolution
46  from InDetConfig.ITkActsPatternRecognitionConfig import ITkActsTrackReconstructionCfg
47  acc.merge(ITkActsTrackReconstructionCfg(currentFlags,
48  previousExtension = previousExtension))
49 
50  # Update variables
51  previousExtension = currentFlags.Tracking.ActiveConfig.extension
52  if not currentFlags.Tracking.ActiveConfig.storeSeparateContainer or isPrimaryPass(currentFlags):
53  acts_tracks = f"{currentFlags.Tracking.ActiveConfig.extension}Tracks" if not currentFlags.Acts.doAmbiguityResolution else f"{currentFlags.Tracking.ActiveConfig.extension}ResolvedTracks"
54  InputCombinedITkTracks.append(acts_tracks)
55 
56 
57  # Track particle creation
58  print(f"Creating track particle collection '{trackParticleContainerName}' from combination of following track collection:")
59  for trackCollection in InputCombinedITkTracks:
60  print(f'- {trackCollection}')
61 
62  # In case perigee expression is Vertex we have a situation where
63  # there is a first temporary track particle creation wrt BeamLine
64  # followed, after vertex reco, of a second particle creation wrt vertex
65  #
66  # The final track particle collection will still be the one defined in trackParticleContainerName
67  persistifyCollection = True
68  particleCollection = trackParticleContainerName
69  perigeeExpression = flags.Tracking.perigeeExpression
70  if flags.Tracking.perigeeExpression == "Vertex":
71  # We do not want to persistify this temporary collection
72  persistifyCollection = False
73  particleCollection = f"{trackParticleContainerName}Temporary"
74  perigeeExpression = "BeamLine"
75 
76  # Track particles wrt BeamLine
77  from InDetConfig.ITkActsParticleCreationConfig import ITkActsTrackParticleCreationCfg
78  acc.merge(ITkActsTrackParticleCreationCfg(flags,
79  TrackContainers = InputCombinedITkTracks,
80  TrackParticleContainer = particleCollection,
81  persistifyCollection = persistifyCollection,
82  PerigeeExpression = perigeeExpression))
83 
84  # Vertex reconstruction
85  if flags.Tracking.doVertexFinding:
86  from InDetConfig.ActsPriVxFinderConfig import primaryVertexFindingCfg
87  acc.merge(primaryVertexFindingCfg(flags,
88  name = "ActsPriVxFinderAlg",
89  TracksName = particleCollection,
90  vxCandidatesOutputName = primaryVertices))
91 
92  # Track particles wrt Vertex
93  #
94  # In case perigee expression is Vertex we need to schedule the final
95  # track particle creation using the vertex
96  # The track collection(s) unchanged, only the final track particle container
97  # has a different name
98  if flags.Tracking.perigeeExpression == "Vertex":
99  assert flags.Tracking.doVertexFinding, \
100  f"Requested the computation of track particles wrt but flags.Tracking.doVertexFinding is set to {flags.Tracking.doVertexFinding}"
101  print('Requesting to compute the track particle collection wrt the Vertex')
102  acc.merge(ITkActsTrackParticleCreationCfg(flags,
103  TrackContainers = InputCombinedITkTracks,
104  TrackParticleContainer = trackParticleContainerName))
105 
106  # Post-Processing
107  print('Starting Post-Processing')
108 
109 
110  if flags.Tracking.writeExtendedSi_PRDInfo:
111  # Add the truth origin to the truth particles
112  # This handles:
113  # - Pixel detector
114  # - Strip detector
115  from InDetConfig.InDetPrepRawDataToxAODConfig import ITkActsPrepDataToxAODCfg
116  acc.merge(ITkActsPrepDataToxAODCfg(flags))
117 
118  # Create MSOS on final InDetTrackParticles collection
119  from ActsConfig.ActsObjectDecorationConfig import ActsTrackStateOnSurfaceDecoratorAlgCfg
121  name=f"Acts{trackParticleContainerName}StateOnSurfaceDecoratorAlg",
122  TrackParticles=trackParticleContainerName))
123 
124  # Run on the specific tracking passes
125  for currentFlags in scheduledTrackingPasses:
126  # Particle persistification for tracking pass
127  from InDetConfig.ITkActsParticleCreationConfig import ITkActsTrackParticlePersistificationCfg
128  acc.merge(ITkActsTrackParticlePersistificationCfg(currentFlags))
129 
130  # Create MSOS for the intermediate track particle collections
131  # this may be the CKF and/or the ambi tracks and can only happen if
132  # - storeSiSPSeededTracks for this tracking pass is requested
133  # - storeSeparateContainer for this tracking pass is requested
134  if flags.Tracking.writeExtendedSi_PRDInfo:
135  from ActsConfig.ActsObjectDecorationConfig import ActsTrackStateOnSurfaceDecoratorAlgCfg
136  # CKF tracks are called: SiSPSeededTracks{currentFlags.Tracking.ActiveConfig.extension}TrackParticles
137  if currentFlags.Tracking.ActiveConfig.storeSiSPSeededTracks:
138  TrackParticleCollectionForMsos = f'SiSPSeededTracks{currentFlags.Tracking.ActiveConfig.extension}TrackParticles'
140  name=f"{TrackParticleCollectionForMsos}StateOnSurfaceDecoratorAlg",
141  TrackParticles=TrackParticleCollectionForMsos,
142  PixelMSOSs=f"SiSPSeededITk{currentFlags.Tracking.ActiveConfig.extension}PixelMSOSs",
143  StripMSOSs=f"SiSPSeededITk{currentFlags.Tracking.ActiveConfig.extension}StripMSOSs"))
144 
145  if currentFlags.Tracking.ActiveConfig.storeSeparateContainer:
146  # track collection can be the CKF or the ambi depending
147  # on the presence of the ambiguity resolution algorithm
148  # but the track particle collection remains the same
149  # name: InDet{currentFlags.Tracking.ActiveConfig.extension}TrackParticles
150  TrackParticleCollectionForMsos = f'InDet{currentFlags.Tracking.ActiveConfig.extension}TrackParticles'
152  name=f"{TrackParticleCollectionForMsos}StateOnSurfaceDecoratorAlg",
153  TrackParticles=TrackParticleCollectionForMsos,
154  PixelMSOSs=f"ITk{currentFlags.Tracking.ActiveConfig.extension}PixelMSOSs",
155  StripMSOSs=f"ITk{currentFlags.Tracking.ActiveConfig.extension}StripMSOSs"))
156 
157 
158 
159  acc.printConfig(withDetails = False, summariseProps = False)
160  return acc
161 
python.ActsPriVxFinderConfig.primaryVertexFindingCfg
ComponentAccumulator primaryVertexFindingCfg(flags, str name="InDetPriVxFinder", *str TracksName, str vxCandidatesOutputName=None, **kwargs)
Definition: InnerDetector/InDetConfig/python/ActsPriVxFinderConfig.py:29
python.ITkActsHelpers.isPrimaryPass
bool isPrimaryPass(flags)
Definition: ITkActsHelpers.py:3
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.ITkActsParticleCreationConfig.ITkActsTrackParticlePersistificationCfg
ComponentAccumulator ITkActsTrackParticlePersistificationCfg(flags)
Definition: ITkActsParticleCreationConfig.py:86
python.ITkActsPatternRecognitionConfig.ITkActsTrackReconstructionCfg
ComponentAccumulator ITkActsTrackReconstructionCfg(flags, *str previousExtension=None)
Definition: ITkActsPatternRecognitionConfig.py:4
python.ITkActsParticleCreationConfig.ITkActsTrackParticleCreationCfg
ComponentAccumulator ITkActsTrackParticleCreationCfg(flags, *list[str] TrackContainers, str TrackParticleContainer, bool persistifyCollection=True, str PerigeeExpression=None)
Definition: ITkActsParticleCreationConfig.py:4
python.ITkActsDataPreparationConfig.ITkActsDataPreparationCfg
ComponentAccumulator ITkActsDataPreparationCfg(flags, *str previousExtension=None)
Definition: ITkActsDataPreparationConfig.py:4
python.TrackingPassFlags.printActiveConfig
def printActiveConfig(flags)
Definition: TrackingPassFlags.py:1008
python.ITkActsHelpers.extractTrackingPasses
list extractTrackingPasses(flags)
Definition: ITkActsHelpers.py:13
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.ITkActsTrackRecoConfig.ITkActsTrackRecoCfg
ComponentAccumulator ITkActsTrackRecoCfg(flags)
Definition: ITkActsTrackRecoConfig.py:6
ActsObjectDecorationConfig.ActsTrackStateOnSurfaceDecoratorAlgCfg
ComponentAccumulator ActsTrackStateOnSurfaceDecoratorAlgCfg(flags, str name="ActsTrackStateOnSurfaceDecoratorAlg", **kwargs)
Definition: ActsObjectDecorationConfig.py:7
python.InDetPrepRawDataToxAODConfig.ITkActsPrepDataToxAODCfg
ComponentAccumulator ITkActsPrepDataToxAODCfg(flags, PixelMeasurementContainer="ITkPixelMeasurements", StripMeasurementContainer="ITkStripMeasurements")
Definition: InDetPrepRawDataToxAODConfig.py:46