ATLAS Offline Software
ActsClusterizationConfig.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.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.Enums import BeamType
6 from ActsConfig.ActsUtilities import extractChildKwargs
7 
9  name: str = "ActsHgtdClusteringTool",
10  **kwargs) -> ComponentAccumulator:
11  acc = ComponentAccumulator()
12  acc.setPrivateTools(CompFactory.ActsTrk.HgtdClusteringTool(name, **kwargs))
13  return acc
14 
16  name: str = "ActsHgtdTimedClusteringTool",
17  **kwargs) -> ComponentAccumulator:
18  acc = ComponentAccumulator()
19  acc.setPrivateTools(CompFactory.ActsTrk.HgtdTimedClusteringTool(name, **kwargs))
20  return acc
21 
23  name: str = "ActsHgtdClusterizationAlg",
24  **kwargs) -> ComponentAccumulator:
25  acc = ComponentAccumulator()
26 
27  if flags.HGTD.Geometry.useGeoModelXml:
28  from HGTD_GeoModelXml.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
29  else:
30  from HGTD_GeoModel.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
31  acc.merge(HGTD_ReadoutGeometryCfg(flags))
32 
33  kwargs.setdefault('RDOContainerName', 'HGTD_RDOs')
34  kwargs.setdefault('ClusterContainerName', 'HGTD_Clusters')
35 
36  if 'ClusteringTool' not in kwargs:
37  from HGTD_Config.HGTD_ConfigFlags import ClusteringStrategy
38  if flags.HGTD.Acts.ClusteringStrategy is ClusteringStrategy.SinglePad:
39  kwargs.setdefault('ClusteringTool', acc.popToolsAndMerge(ActsHgtdClusteringToolCfg(flags)))
40  else:
41  kwargs.setdefault('ClusteringTool', acc.popToolsAndMerge(ActsHgtdTimedClusteringToolCfg(flags)))
42 
43  if flags.Acts.doMonitoring and 'MonTool' not in kwargs:
44  from ActsConfig.ActsMonitoringConfig import ActsHgtdClusterizationMonitoringToolCfg
45  kwargs.setdefault('MonTool', acc.popToolsAndMerge(ActsHgtdClusterizationMonitoringToolCfg(flags)))
46 
47  acc.addEventAlgo(CompFactory.ActsTrk.HgtdClusterizationAlg(name, **kwargs))
48  return acc
49 
50 
51 
53  name: str = "ActsPixelClusteringTool",
54  **kwargs) -> ComponentAccumulator:
55  acc = ComponentAccumulator()
56 
57  from PixelConditionsAlgorithms.ITkPixelConditionsConfig import ITkPixelChargeCalibCondAlgCfg, ITkPixelOfflineCalibCondAlgCfg
58  acc.merge(ITkPixelChargeCalibCondAlgCfg(flags))
59  acc.merge(ITkPixelOfflineCalibCondAlgCfg(flags))
60 
61  from PixelReadoutGeometry.PixelReadoutGeometryConfig import ITkPixelReadoutManagerCfg
62  acc.merge(ITkPixelReadoutManagerCfg(flags))
63 
64  if 'PixelRDOTool' not in kwargs:
65  from InDetConfig.SiClusterizationToolConfig import ITkPixelRDOToolCfg
66  kwargs.setdefault("PixelRDOTool", acc.popToolsAndMerge(ITkPixelRDOToolCfg(flags)))
67 
68  if "PixelLorentzAngleTool" not in kwargs:
69  from SiLorentzAngleTool.ITkPixelLorentzAngleConfig import ITkPixelLorentzAngleToolCfg
70  kwargs.setdefault("PixelLorentzAngleTool", acc.popToolsAndMerge( ITkPixelLorentzAngleToolCfg(flags) ))
71 
72  kwargs.setdefault(
73  'UseWeightedPosition',
74  not (flags.Tracking.doPixelDigitalClustering or flags.Beam.Type is BeamType.Cosmics)
75  )
76 
77  kwargs.setdefault('UseBroadErrors', flags.Beam.Type is BeamType.Cosmics)
78 
79  acc.setPrivateTools(CompFactory.ActsTrk.PixelClusteringTool(name, **kwargs))
80  return acc
81 
82 
84  name: str = "ActsStripClusteringTool",
85  **kwargs) -> ComponentAccumulator:
86  acc = ComponentAccumulator()
87 
88  if 'LorentzAngleTool' not in kwargs:
89  from SiLorentzAngleTool.ITkStripLorentzAngleConfig import ITkStripLorentzAngleToolCfg
90  kwargs.setdefault("LorentzAngleTool", acc.popToolsAndMerge(ITkStripLorentzAngleToolCfg(flags)))
91 
92  if 'conditionsTool' not in kwargs:
93  from SCT_ConditionsTools.ITkStripConditionsToolsConfig import ITkStripConditionsSummaryToolCfg
94  kwargs.setdefault("conditionsTool", acc.popToolsAndMerge(ITkStripConditionsSummaryToolCfg(flags)))
95 
96  # Disable noisy modules suppression
97  kwargs.setdefault("maxFiredStrips", 0)
98 
99  if flags.ITk.selectStripIntimeHits and 'timeBins' not in kwargs:
100  coll_25ns = flags.Beam.BunchSpacing<=25 and flags.Beam.Type is BeamType.Collisions
101  kwargs.setdefault("timeBins", "01X" if coll_25ns else "X1X")
102 
103  acc.setPrivateTools(CompFactory.ActsTrk.StripClusteringTool(name, **kwargs))
104  return acc
105 
107  name: str = 'ActsPixelClusterizationAlg',
108  *,
109  useCache: bool = False,
110  **kwargs) -> ComponentAccumulator:
111  acc = ComponentAccumulator()
112 
113  kwargs.setdefault("expectedClustersPerRDO", 32)
114  kwargs.setdefault("IDHelper", "PixelID")
115  kwargs.setdefault("RDOContainerKey", "ITkPixelRDOs")
116  kwargs.setdefault("ClustersKey", "ITkPixelClusters")
117  # Regional selection
118  kwargs.setdefault('RoIs', 'ActsRegionOfInterest')
119 
120  kwargs.setdefault('ClusterCacheBackend', 'ActsPixelClusterCache_Back')
121  kwargs.setdefault('ClusterCache', 'ActsPixelClustersCache')
122 
123  if 'RegSelTool' not in kwargs:
124  from RegionSelector.RegSelToolConfig import regSelTool_ITkPixel_Cfg
125  kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkPixel_Cfg(flags)))
126 
127  if 'ClusteringTool' not in kwargs:
128  kwargs.setdefault("ClusteringTool", acc.popToolsAndMerge(ActsPixelClusteringToolCfg(flags)))
129 
130  if flags.Acts.doMonitoring and 'MonTool' not in kwargs:
131  from ActsConfig.ActsMonitoringConfig import ActsITkPixelClusterizationMonitoringToolCfg
132  kwargs.setdefault('MonTool', acc.popToolsAndMerge(ActsITkPixelClusterizationMonitoringToolCfg(flags)))
133 
134  if not useCache:
135  acc.addEventAlgo(CompFactory.ActsTrk.PixelClusterizationAlg(name, **kwargs))
136  else:
137  acc.addEventAlgo(CompFactory.ActsTrk.PixelCacheClusterizationAlg(name, **kwargs))
138  return acc
139 
141  name: str = 'ActsStripClusterizationAlg',
142  useCache: bool = False,
143  **kwargs) -> ComponentAccumulator:
144  acc = ComponentAccumulator()
145 
146  kwargs.setdefault("RDOContainerKey", "ITkStripRDOs")
147  kwargs.setdefault("ClustersKey", "ITkStripClusters")
148  kwargs.setdefault("expectedClustersPerRDO", 6)
149  kwargs.setdefault("IDHelper", "SCT_ID")
150  # Regional selection
151  kwargs.setdefault('RoIs', 'ActsRegionOfInterest')
152 
153  kwargs.setdefault('ClusterCacheBackend', 'ActsStripClusterCache_Back')
154  kwargs.setdefault('ClusterCache', 'ActsStripClustersCache')
155 
156  if 'RegSelTool' not in kwargs:
157  from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg
158  kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkStrip_Cfg(flags)))
159 
160  if 'ClusteringTool' not in kwargs:
161  kwargs.setdefault("ClusteringTool", acc.popToolsAndMerge(ActsStripClusteringToolCfg(flags)))
162 
163  if flags.Acts.doMonitoring and 'MonTool' not in kwargs:
164  from ActsConfig.ActsMonitoringConfig import ActsITkStripClusterizationMonitoringToolCfg
165  kwargs.setdefault('MonTool', acc.popToolsAndMerge(ActsITkStripClusterizationMonitoringToolCfg(flags)))
166 
167  if not useCache:
168  acc.addEventAlgo(CompFactory.ActsTrk.StripClusterizationAlg(name, **kwargs))
169  else:
170  acc.addEventAlgo(CompFactory.ActsTrk.StripCacheClusterizationAlg(name, **kwargs))
171  return acc
172 
174  name: str = "ActsClusterCacheCreatorAlg",
175  **kwargs) -> ComponentAccumulator:
176  acc = ComponentAccumulator()
177  kwargs.setdefault("PixelClustersCacheKey", "ActsPixelClusterCache_Back")
178  kwargs.setdefault("StripClustersCacheKey", "ActsStripClusterCache_Back")
179  acc.addEventAlgo(CompFactory.ActsTrk.Cache.CreatorAlg(name, **kwargs))
180  return acc
181 
183  name: str = "ActsPixelClusterPreparationAlg",
184  useCache: bool = False,
185  **kwargs) -> ComponentAccumulator:
186  acc = ComponentAccumulator()
187 
188  kwargs.setdefault('InputCollection', 'ITkPixelClusters')
189  kwargs.setdefault('DetectorElements', 'ITkPixelDetectorElementCollection')
190 
191  if 'RegSelTool' not in kwargs:
192  from RegionSelector.RegSelToolConfig import regSelTool_ITkPixel_Cfg
193  kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkPixel_Cfg(flags)))
194 
195  if flags.Acts.doMonitoring and 'MonTool' not in kwargs:
196  from ActsConfig.ActsMonitoringConfig import ActsDataPreparationMonitoringToolCfg
197  kwargs.setdefault('MonTool', acc.popToolsAndMerge(ActsDataPreparationMonitoringToolCfg(flags,
198  name = "ActsPixelClusterPreparationMonitoringTool")))
199 
200  if not useCache:
201  acc.addEventAlgo(CompFactory.ActsTrk.PixelClusterDataPreparationAlg(name, **kwargs))
202  else:
203  acc.addEventAlgo(CompFactory.ActsTrk.PixelClusterCacheDataPreparationAlg(name, **kwargs))
204  return acc
205 
207  name: str = "ActsStripClusterPreparationAlg",
208  useCache: bool = False,
209  **kwargs) -> ComponentAccumulator:
210  acc = ComponentAccumulator()
211 
212  kwargs.setdefault('InputCollection', 'ITkStripClusters')
213  kwargs.setdefault('DetectorElements', 'ITkStripDetectorElementCollection')
214 
215  if 'RegSelTool' not in kwargs:
216  from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg
217  kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkStrip_Cfg(flags)))
218 
219  if flags.Acts.doMonitoring and 'MonTool' not in kwargs:
220  from ActsConfig.ActsMonitoringConfig import ActsDataPreparationMonitoringToolCfg
221  kwargs.setdefault('MonTool', acc.popToolsAndMerge(ActsDataPreparationMonitoringToolCfg(flags,
222  name = "ActsStripClusterPreparationMonitoringTool")))
223 
224  if not useCache:
225  acc.addEventAlgo(CompFactory.ActsTrk.StripClusterDataPreparationAlg(name, **kwargs))
226  else:
227  acc.addEventAlgo(CompFactory.ActsTrk.StripClusterCacheDataPreparationAlg(name, **kwargs))
228  return acc
229 
230 
232  name: str = 'ActsHgtdClusterPreparationAlg',
233  *,
234  useCache: bool = False,
235  **kwargs) -> ComponentAccumulator:
236  acc = ComponentAccumulator()
237  kwargs.setdefault('InputCollection', 'HGTDClusters')
238  kwargs.setdefault('DetectorElements', 'HGTD_DetectorElementCollection')
239 
240  # For the time being the HGTD Regional Selector tool does not exist
241 
242  if flags.Acts.doMonitoring and 'MonTool' not in kwargs:
243  from ActsConfig.ActsMonitoringConfig import ActsDataPreparationMonitoringToolCfg
244  kwargs.setdefault('MonTool', acc.popToolsAndMerge(ActsDataPreparationMonitoringToolCfg(flags,
245  name = "ActsHgtdClusterPreparationMonitoringTool")))
246 
247  acc.addEventAlgo(CompFactory.ActsTrk.HgtdClusterDataPreparationAlg(name, **kwargs))
248  return acc
249 
250 
252  *,
253  RoIs: str = "ActsRegionOfInterest",
254  **kwargs: dict) -> ComponentAccumulator:
255  assert isinstance(RoIs, str)
256  assert isinstance(kwargs, dict)
257 
258  acc = ComponentAccumulator()
259 
260  # Clusterization is a three step process at maximum:
261  # (1) Cache Creation
262  # (2) Clusterization algorithm (reconstruction of clusters)
263  # (3) Preparation of collection for downstream algorithms
264  # What step is scheduled depends on the tracking pass and the activation
265  # or de-activation of caching mechanism
266 
267  kwargs.setdefault('processPixels', flags.Detector.EnableITkPixel)
268  kwargs.setdefault('processStrips', flags.Detector.EnableITkStrip)
269  kwargs.setdefault('processHGTD', flags.Acts.useHGTDClusterInTrackFinding and flags.Detector.EnableHGTD)
270  kwargs.setdefault('runCacheCreation', flags.Acts.useCache)
271  kwargs.setdefault('runReconstruction', True)
272  kwargs.setdefault('runPreparation', flags.Acts.useCache)
273 
274  # Step (1)
275  if kwargs['runCacheCreation']:
276  acc.merge(ActsClusterCacheCreatorAlgCfg(flags,
277  **extractChildKwargs(prefix='ClusterCacheCreatorAlg.', **kwargs)))
278 
279  # Step (2)
280  if kwargs['runReconstruction']:
281  if kwargs['processPixels']:
282  acc.merge(ActsPixelClusterizationAlgCfg(flags,
283  RoIs=RoIs,
284  **extractChildKwargs(prefix='PixelClusterizationAlg.', **kwargs)))
285  if kwargs['processStrips']:
286  acc.merge(ActsStripClusterizationAlgCfg(flags,
287  RoIs=RoIs,
288  **extractChildKwargs(prefix='StripClusterizationAlg.', **kwargs)))
289  if kwargs['processHGTD']:
290  acc.merge(ActsHgtdClusterizationAlgCfg(flags,
291  **extractChildKwargs(prefix='HgtdClusterizationAlg.', **kwargs)))
292  # Step (3)
293  if kwargs['runPreparation']:
294  if kwargs['processPixels']:
295  acc.merge(ActsPixelClusterPreparationAlgCfg(flags,
296  RoIs=RoIs,
297  **extractChildKwargs(prefix='PixelClusterPreparationAlg.', **kwargs)))
298 
299  if kwargs['processStrips']:
300  acc.merge(ActsStripClusterPreparationAlgCfg(flags,
301  RoIs=RoIs,
302  **extractChildKwargs(prefix='StripClusterPreparationAlg.', **kwargs)))
303 
304  if kwargs['processHGTD']:
305  acc.merge(ActsHgtdClusterPreparationAlgCfg(flags,
306  RoIs=RoIs,
307  **extractChildKwargs(prefix='HgtdClusterPreparationAlg.', **kwargs)))
308 
309  # Analysis extensions
310  if flags.Acts.doAnalysis:
311  if kwargs['processPixels']:
312  from ActsConfig.ActsAnalysisConfig import ActsPixelClusterAnalysisAlgCfg
313  acc.merge(ActsPixelClusterAnalysisAlgCfg(flags, **extractChildKwargs(prefix='PixelClusterAnalysisAlg.', **kwargs)))
314 
315  if kwargs['processStrips']:
316  from ActsConfig.ActsAnalysisConfig import ActsStripClusterAnalysisAlgCfg
317  acc.merge(ActsStripClusterAnalysisAlgCfg(flags, **extractChildKwargs(prefix='StripClusterAnalysisAlg.', **kwargs)))
318 
319  return acc
320 
322  *,
323  previousActsExtension: str = None) -> ComponentAccumulator:
324  assert previousActsExtension is None or isinstance(previousActsExtension, str)
325 
326  acc = ComponentAccumulator()
327 
328  processPixels = flags.Detector.EnableITkPixel
329  processStrips = flags.Detector.EnableITkStrip
330  processHGTD = flags.Acts.useHGTDClusterInTrackFinding and flags.Detector.EnableHGTD
331 
332  kwargs = dict()
333  kwargs.setdefault('processPixels', processPixels)
334  kwargs.setdefault('processStrips', processStrips)
335  kwargs.setdefault('processHGTD', processHGTD)
336 
337  # Clusterization is a three step process at maximum:
338  # (1) Cache Creation
339  # (2) Clusterization algorithm (reconstruction of clusters)
340  # (3) Preparation of collection for downstream algorithms
341  # What step is scheduled depends on the tracking pass and the activation
342  # or de-activation of caching mechanism.
343 
344  # Secondary passes do not need cache creation, that has to be performed
345  # on the primary pass, and only if the caching is enabled.
346  # Reconstruction can run on secondary passes only if the caching is enabled,
347  # this is because we may need to process detector elements not processed
348  # on the primary pass.
349  # Preparation has to be performed on secondary passes always, and on primary
350  # pass only if cache is enabled. In the latter case it is useed to collect all
351  # the clusters from all views before passing them to the downstream algorithms
352 
353  if flags.Tracking.ActiveConfig.isSecondaryPass:
354  # Secondary passes
355  kwargs.setdefault('runCacheCreation', False)
356  kwargs.setdefault('runReconstruction', flags.Acts.useCache)
357  kwargs.setdefault('runPreparation', True)
358  else:
359  # Primary pass
360  kwargs.setdefault('runCacheCreation', flags.Acts.useCache)
361  kwargs.setdefault('runReconstruction', True)
362  kwargs.setdefault('runPreparation', flags.Acts.useCache)
363 
364  # Name of the RoI to be used
365  roisName = f'{flags.Tracking.ActiveConfig.extension}RegionOfInterest'
366  # Large Radius Tracking uses full scan RoI created in the primary pass
367  if flags.Tracking.ActiveConfig.extension == 'ActsLargeRadius':
368  roisName = 'ActsRegionOfInterest'
369 
370  # Name of the Cluster container -> ITk + extension without "Acts" + Pixel or Strip + Clusters
371  # We also define the same collection from the main ACTS pass (primary)
372  primaryPixelClustersName = 'ITkPixelClusters'
373  primaryStripClustersName = 'ITkStripClusters'
374  primaryHgtdClustersName = 'HGTD_Clusters'
375  pixelClustersName = primaryPixelClustersName
376  stripClustersName = primaryStripClustersName
377  hgtdClustersName = primaryHgtdClustersName
378 
379  # If the workflow is not a primary pass, then change the name of the cluster collections adding that information
380  if flags.Tracking.ActiveConfig.isSecondaryPass:
381  keyPrefix = flags.Tracking.ActiveConfig.extension.replace("Acts", "")
382  pixelClustersName = f'ITk{keyPrefix}PixelClusters'
383  stripClustersName = f'ITk{keyPrefix}StripClusters'
384  hgtdClustersName = f'{keyPrefix}HGTD_Clusters'
385 
386  # Configuration for (1)
387  if kwargs['runCacheCreation']:
388  kwargs.setdefault('ClusterCacheCreatorAlg.name', f'{flags.Tracking.ActiveConfig.extension}ClusterCacheCreatorAlg')
389 
390  # Configuration for (2)
391  if kwargs['runReconstruction']:
392  if kwargs['processPixels']:
393  kwargs.setdefault('PixelClusterizationAlg.name', f'{flags.Tracking.ActiveConfig.extension}PixelClusterizationAlg')
394  kwargs.setdefault('PixelClusterizationAlg.useCache', flags.Acts.useCache)
395  kwargs.setdefault('PixelClusterizationAlg.ClustersKey', pixelClustersName)
396  kwargs.setdefault('PixelClusterizationAlg.ClusterCache', f'{flags.Tracking.ActiveConfig.extension}PixelClustersCache')
397  if flags.Tracking.ActiveConfig.isSecondaryPass and previousActsExtension is not None:
398  kwargs.setdefault('PixelClusterizationAlg.ExtraInputs', {('ActsTrk::PrepRawDataAssociation', f'StoreGateSvc+{previousActsExtension}PrdMap')})
399 
400  if kwargs['processStrips']:
401  kwargs.setdefault('StripClusterizationAlg.name', f'{flags.Tracking.ActiveConfig.extension}StripClusterizationAlg')
402  kwargs.setdefault('StripClusterizationAlg.useCache', flags.Acts.useCache)
403  kwargs.setdefault('StripClusterizationAlg.ClustersKey', stripClustersName)
404  kwargs.setdefault('StripClusterizationAlg.ClusterCache', f'{flags.Tracking.ActiveConfig.extension}StripClustersCache')
405  if flags.Tracking.ActiveConfig.isSecondaryPass and previousActsExtension is not None:
406  kwargs.setdefault('StripClusterizationAlg.ExtraInputs', {('ActsTrk::PrepRawDataAssociation', f'StoreGateSvc+{previousActsExtension}PrdMap')})
407 
408  if kwargs['processHGTD']:
409  kwargs.setdefault('HgtdClusterizationAlg.name', f'{flags.Tracking.ActiveConfig.extension}HgtdClusterizationAlg')
410  # HGTD algo has different convention ... need to use the same
411  kwargs.setdefault('HgtdClusterizationAlg.ClusterContainerName', hgtdClustersName)
412  if flags.Tracking.ActiveConfig.isSecondaryPass and previousActsExtension is not None:
413  kwargs.setdefault('HgtdClusterizationAlg.ExtraInputs', {('ActsTrk::PrepRawDataAssociation', f'StoreGateSvc+{previousActsExtension}PrdMap')})
414 
415 
416  # Configuration for (3)
417  if kwargs['runPreparation']:
418  if kwargs['processPixels']:
419  kwargs.setdefault('PixelClusterPreparationAlg.name', f'{flags.Tracking.ActiveConfig.extension}PixelClusterPreparationAlg')
420  kwargs.setdefault('PixelClusterPreparationAlg.useCache', flags.Acts.useCache)
421  kwargs.setdefault('PixelClusterPreparationAlg.OutputCollection', f'{pixelClustersName}_Cached' if kwargs['runReconstruction'] else pixelClustersName)
422  # The input is one between the collection (w/o cache) and the IDC (w/ cache)
423  if not flags.Acts.useCache:
424  # Take the collection from the reconstruction step. If not available take the collection from the primary pass
425  kwargs.setdefault('PixelClusterPreparationAlg.InputCollection', pixelClustersName if kwargs['runReconstruction'] else primaryPixelClustersName)
426  kwargs.setdefault('PixelClusterPreparationAlg.InputIDC', '')
427  else:
428  kwargs.setdefault('PixelClusterPreparationAlg.InputCollection', '')
429  kwargs.setdefault('PixelClusterPreparationAlg.InputIDC', f'{flags.Tracking.ActiveConfig.extension}PixelClustersCache')
430  # Prd Map for removing previously used measurements
431  if flags.Tracking.ActiveConfig.isSecondaryPass and previousActsExtension is not None:
432  kwargs.setdefault('PixelClusterPreparationAlg.InputPrdMap', f'{previousActsExtension}PrdMap')
433 
434  if kwargs['processStrips']:
435  kwargs.setdefault('StripClusterPreparationAlg.name', f'{flags.Tracking.ActiveConfig.extension}StripClusterPreparationAlg')
436  kwargs.setdefault('StripClusterPreparationAlg.useCache', flags.Acts.useCache)
437  kwargs.setdefault('StripClusterPreparationAlg.OutputCollection', f'{stripClustersName}_Cached' if kwargs['runReconstruction'] else stripClustersName)
438  if not flags.Acts.useCache:
439  kwargs.setdefault('StripClusterPreparationAlg.InputCollection', stripClustersName if kwargs['runReconstruction'] else primaryStripClustersName)
440  kwargs.setdefault('StripClusterPreparationAlg.InputIDC', '')
441  else:
442  kwargs.setdefault('StripClusterPreparationAlg.InputCollection', '')
443  kwargs.setdefault('StripClusterPreparationAlg.InputIDC', f'{flags.Tracking.ActiveConfig.extension}StripClustersCache')
444  # Prd Map for removing previously used measurements
445  if flags.Tracking.ActiveConfig.isSecondaryPass and previousActsExtension is not None:
446  kwargs.setdefault('StripClusterPreparationAlg.InputPrdMap', f'{previousActsExtension}PrdMap')
447 
448  if kwargs['processHGTD']:
449  kwargs.setdefault('HgtdClusterPreparationAlg.name', f'{flags.Tracking.ActiveConfig.extension}HgtdClusterPreparationAlg')
450  kwargs.setdefault('HgtdClusterPreparationAlg.OutputCollection', f'{hgtdClustersName}_Cached' if kwargs['runReconstruction'] else hgtdClustersName)
451  kwargs.setdefault('HgtdClusterPreparationAlg.InputCollection', hgtdClustersName if kwargs['runReconstruction'] else primaryHgtdClustersName)
452  kwargs.setdefault('HgtdClusterPreparationAlg.InputIDC', '')
453  if flags.Tracking.ActiveConfig.isSecondaryPass and previousActsExtension is not None:
454  kwargs.setdefault('HgtdClusterPreparationAlg.InputPrdMap', f'{previousActsExtension}PrdMap')
455 
456  # Analysis algo(s)
457  if flags.Acts.doAnalysis:
458  # Run analysis code on the resulting cluster collection produced by this tracking pass
459  # This collection is the result of (3) if it ran, else the result of (2). We are sure at least one of them run
460  if kwargs['processPixels']:
461  kwargs.setdefault('PixelClusterAnalysisAlg.name', f'{flags.Tracking.ActiveConfig.extension}PixelClusterAnalysisAlg')
462  kwargs.setdefault('PixelClusterAnalysisAlg.extension', flags.Tracking.ActiveConfig.extension)
463  kwargs.setdefault('PixelClusterAnalysisAlg.MonGroupName', f'{flags.Tracking.ActiveConfig.extension}ClusterAnalysisAlg')
464  kwargs.setdefault('PixelClusterAnalysisAlg.ClusterContainerKey', kwargs['PixelClusterPreparationAlg.OutputCollection'] if kwargs['runPreparation'] else kwargs['PixelClusterizationAlg.ClustersKey'])
465 
466  if kwargs['processStrips']:
467  kwargs.setdefault('StripClusterAnalysisAlg.name', f'{flags.Tracking.ActiveConfig.extension}StripClusterAnalysisAlg')
468  kwargs.setdefault('StripClusterAnalysisAlg.extension', flags.Tracking.ActiveConfig.extension)
469  kwargs.setdefault('StripClusterAnalysisAlg.MonGroupName', f'{flags.Tracking.ActiveConfig.extension}ClusterAnalysisAlg')
470  kwargs.setdefault('StripClusterAnalysisAlg.ClusterContainerKey', kwargs['StripClusterPreparationAlg.OutputCollection'] if kwargs['runPreparation'] else kwargs['StripClusterizationAlg.ClustersKey'])
471 
472  if kwargs['processHGTD']:
473  kwargs.setdefault('HgtdClusterAnalysisAlg.name', f'{flags.Tracking.ActiveConfig.extension}HgtdClusterAnalysisAlg')
474  kwargs.setdefault('HgtdClusterAnalysisAlg.extension', flags.Tracking.ActiveConfig.extension)
475  kwargs.setdefault('HgtdClusterAnalysisAlg.MonGroupName', f'{flags.Tracking.ActiveConfig.extension}ClusterAnalysisAlg')
476 
477  acc.merge(ActsMainClusterizationCfg(flags, RoIs=roisName, **kwargs))
478  return acc
479 
ActsClusterizationConfig.ActsPixelClusterizationAlgCfg
ComponentAccumulator ActsPixelClusterizationAlgCfg(flags, str name='ActsPixelClusterizationAlg', *bool useCache=False, **kwargs)
Definition: ActsClusterizationConfig.py:106
ActsClusterizationConfig.ActsHgtdClusteringToolCfg
ComponentAccumulator ActsHgtdClusteringToolCfg(flags, str name="ActsHgtdClusteringTool", **kwargs)
Definition: ActsClusterizationConfig.py:8
python.ITkStripLorentzAngleConfig.ITkStripLorentzAngleToolCfg
def ITkStripLorentzAngleToolCfg(flags, name="ITkStripLorentzAngleTool", **kwargs)
Definition: ITkStripLorentzAngleConfig.py:10
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
ActsUtilities.extractChildKwargs
dict extractChildKwargs(*str prefix, **dict kwargs)
Definition: ActsUtilities.py:3
ActsMonitoringConfig.ActsHgtdClusterizationMonitoringToolCfg
ComponentAccumulator ActsHgtdClusterizationMonitoringToolCfg(flags, str name="ActsHgtdClusterizationMonitoringTool", **kwargs)
Definition: ActsMonitoringConfig.py:64
ActsMonitoringConfig.ActsITkStripClusterizationMonitoringToolCfg
ComponentAccumulator ActsITkStripClusterizationMonitoringToolCfg(flags, str name="ActsITkStripClusterizationMonitoringTool", **kwargs)
Definition: ActsMonitoringConfig.py:31
ActsClusterizationConfig.ActsHgtdClusterizationAlgCfg
ComponentAccumulator ActsHgtdClusterizationAlgCfg(flags, str name="ActsHgtdClusterizationAlg", **kwargs)
Definition: ActsClusterizationConfig.py:22
ActsAnalysisConfig.ActsStripClusterAnalysisAlgCfg
ComponentAccumulator ActsStripClusterAnalysisAlgCfg(flags, str name="ActsStripClusterAnalysisAlg", str extension="Acts", **kwargs)
Definition: ActsAnalysisConfig.py:174
RegSelToolConfig.regSelTool_ITkPixel_Cfg
def regSelTool_ITkPixel_Cfg(flags)
Definition: RegSelToolConfig.py:120
python.SiClusterizationToolConfig.ITkPixelRDOToolCfg
def ITkPixelRDOToolCfg(flags, name="ITkPixelRDOTool", **kwargs)
Definition: SiClusterizationToolConfig.py:103
ActsClusterizationConfig.ActsStripClusterizationAlgCfg
ComponentAccumulator ActsStripClusterizationAlgCfg(flags, str name='ActsStripClusterizationAlg', bool useCache=False, **kwargs)
Definition: ActsClusterizationConfig.py:140
ActsClusterizationConfig.ActsHgtdClusterPreparationAlgCfg
ComponentAccumulator ActsHgtdClusterPreparationAlgCfg(flags, str name='ActsHgtdClusterPreparationAlg', *bool useCache=False, **kwargs)
Definition: ActsClusterizationConfig.py:231
python.ITkPixelLorentzAngleConfig.ITkPixelLorentzAngleToolCfg
def ITkPixelLorentzAngleToolCfg(flags, name="ITkPixelLorentzAngleTool", **kwargs)
Definition: ITkPixelLorentzAngleConfig.py:14
RegSelToolConfig.regSelTool_ITkStrip_Cfg
def regSelTool_ITkStrip_Cfg(flags)
Definition: RegSelToolConfig.py:126
ActsMonitoringConfig.ActsDataPreparationMonitoringToolCfg
ComponentAccumulator ActsDataPreparationMonitoringToolCfg(flags, str name="ActsDataPreparationMonitoringTool", **kwargs)
Definition: ActsMonitoringConfig.py:49
python.PixelReadoutGeometryConfig.ITkPixelReadoutManagerCfg
def ITkPixelReadoutManagerCfg(flags, name="ITkPixelReadoutManager", **kwargs)
Definition: PixelReadoutGeometryConfig.py:13
ActsClusterizationConfig.ActsHgtdTimedClusteringToolCfg
ComponentAccumulator ActsHgtdTimedClusteringToolCfg(flags, str name="ActsHgtdTimedClusteringTool", **kwargs)
Definition: ActsClusterizationConfig.py:15
HGTD_GeoModelConfig.HGTD_ReadoutGeometryCfg
def HGTD_ReadoutGeometryCfg(flags)
Definition: python/HGTD_GeoModelConfig.py:23
ActsClusterizationConfig.ActsClusterizationCfg
ComponentAccumulator ActsClusterizationCfg(flags, *str previousActsExtension=None)
Definition: ActsClusterizationConfig.py:321
ActsClusterizationConfig.ActsStripClusterPreparationAlgCfg
ComponentAccumulator ActsStripClusterPreparationAlgCfg(flags, str name="ActsStripClusterPreparationAlg", bool useCache=False, **kwargs)
Definition: ActsClusterizationConfig.py:206
python.ITkStripConditionsToolsConfig.ITkStripConditionsSummaryToolCfg
def ITkStripConditionsSummaryToolCfg(flags, name="ITkStripConditionsSummaryTool", **kwargs)
Definition: ITkStripConditionsToolsConfig.py:16
ActsMonitoringConfig.ActsITkPixelClusterizationMonitoringToolCfg
ComponentAccumulator ActsITkPixelClusterizationMonitoringToolCfg(flags, str name="ActsITkPixelClusterizationMonitoringTool", **kwargs)
Definition: ActsMonitoringConfig.py:13
ITkPixelConditionsConfig.ITkPixelChargeCalibCondAlgCfg
def ITkPixelChargeCalibCondAlgCfg(flags, name="ITkPixelChargeCalibCondAlg", **kwargs)
Definition: ITkPixelConditionsConfig.py:74
ActsClusterizationConfig.ActsPixelClusterPreparationAlgCfg
ComponentAccumulator ActsPixelClusterPreparationAlgCfg(flags, str name="ActsPixelClusterPreparationAlg", bool useCache=False, **kwargs)
Definition: ActsClusterizationConfig.py:182
ActsClusterizationConfig.ActsMainClusterizationCfg
ComponentAccumulator ActsMainClusterizationCfg(flags, *str RoIs="ActsRegionOfInterest", **dict kwargs)
Definition: ActsClusterizationConfig.py:251
ITkPixelConditionsConfig.ITkPixelOfflineCalibCondAlgCfg
def ITkPixelOfflineCalibCondAlgCfg(flags, name="ITkPixelOfflineCalibCondAlg", **kwargs)
Definition: ITkPixelConditionsConfig.py:164
ActsClusterizationConfig.ActsClusterCacheCreatorAlgCfg
ComponentAccumulator ActsClusterCacheCreatorAlgCfg(flags, str name="ActsClusterCacheCreatorAlg", **kwargs)
Definition: ActsClusterizationConfig.py:173
ActsClusterizationConfig.ActsStripClusteringToolCfg
ComponentAccumulator ActsStripClusteringToolCfg(flags, str name="ActsStripClusteringTool", **kwargs)
Definition: ActsClusterizationConfig.py:83
ActsClusterizationConfig.ActsPixelClusteringToolCfg
ComponentAccumulator ActsPixelClusteringToolCfg(flags, str name="ActsPixelClusteringTool", **kwargs)
Definition: ActsClusterizationConfig.py:52
ActsAnalysisConfig.ActsPixelClusterAnalysisAlgCfg
ComponentAccumulator ActsPixelClusterAnalysisAlgCfg(flags, str name="ActsPixelClusterAnalysisAlg", str extension="Acts", **kwargs)
Definition: ActsAnalysisConfig.py:140