ATLAS Offline Software
Loading...
Searching...
No Matches
ActsClusterizationInDetConfig Namespace Reference

Functions

ComponentAccumulator ActsIDPixelClusteringToolCfg (flags, str name="ActsIDPixelClusteringTool", **kwargs)
ComponentAccumulator ActsIDStripClusteringToolCfg (flags, str name="ActsIDStripClusteringTool", **kwargs)
ComponentAccumulator ActsIDPixelClusterizationAlgCfg (flags, str name='ActsIDPixelClusterizationAlg', *, bool useCache=False, **kwargs)
ComponentAccumulator ActsIDStripClusterizationAlgCfg (flags, str name='ActsIDStripClusterizationAlg', bool useCache=False, **kwargs)
ComponentAccumulator ActsIDPixelClusterPreparationAlgCfg (flags, str name="ActsIDPixelClusterPreparationAlg", bool useCache=False, **kwargs)
ComponentAccumulator ActsIDStripClusterPreparationAlgCfg (flags, str name="ActsIDStripClusterPreparationAlg", bool useCache=False, **kwargs)
ComponentAccumulator ActsIDMainClusterizationCfg (flags, *, str RoIs="ActsRegionOfInterest", **dict kwargs)
ComponentAccumulator ActsIDClusterizationCfg (flags, *, str previousActsExtension=None)

Function Documentation

◆ ActsIDClusterizationCfg()

ComponentAccumulator ActsClusterizationInDetConfig.ActsIDClusterizationCfg ( flags,
* ,
str previousActsExtension = None )

Definition at line 222 of file ActsClusterizationInDetConfig.py.

224 previousActsExtension: str = None) -> ComponentAccumulator:
225 assert previousActsExtension is None or isinstance(previousActsExtension, str)
226
227 acc = ComponentAccumulator()
228
229 processPixels = flags.Detector.EnablePixel
230 processStrips = flags.Detector.EnableSCT
231
232 kwargs = dict()
233 kwargs.setdefault('processPixels', processPixels)
234 kwargs.setdefault('processStrips', processStrips)
235
236 # Clusterization is a three step process at maximum:
237 # (1) Cache Creation
238 # (2) Clusterization algorithm (reconstruction of clusters)
239 # (3) Preparation of collection for downstream algorithms
240 # What step is scheduled depends on the tracking pass and the activation
241 # or de-activation of caching mechanism.
242
243 # Secondary passes do not need cache creation, that has to be performed
244 # on the primary pass, and only if the caching is enabled.
245 # Reconstruction can run on secondary passes only if the caching is enabled,
246 # this is because we may need to process detector elements not processed
247 # on the primary pass.
248 # Preparation has to be performed on secondary passes always, and on primary
249 # pass only if cache is enabled. In the latter case it is useed to collect all
250 # the clusters from all views before passing them to the downstream algorithms
251
252
253 # Only Primary pass for the Inner Detector now
254 kwargs.setdefault('runCacheCreation', flags.Acts.useCache)
255 kwargs.setdefault('runReconstruction', True)
256 kwargs.setdefault('runPreparation', flags.Acts.useCache)
257
258 # Name of the RoI to be used
259 roisName = f'{flags.Tracking.ActiveConfig.extension}RegionOfInterest'
260 # Large Radius Tracking uses full scan RoI created in the primary pass
261 if flags.Tracking.ActiveConfig.extension == 'ActsLargeRadius':
262 roisName = 'ActsRegionOfInterest'
263
264 # Name of the Cluster container -> ITk + extension without "Acts" + Pixel or Strip + Clusters
265 # We also define the same collection from the main ACTS pass (primary)
266 primaryPixelClustersName = 'PixelClusters'
267 primaryStripClustersName = 'SCT_Clusters'
268 pixelClustersName = primaryPixelClustersName
269 stripClustersName = primaryStripClustersName
270
271 # Configuration for (1)
272 if kwargs['runCacheCreation']:
273 kwargs.setdefault('ClusterCacheCreatorAlg.name', f'{flags.Tracking.ActiveConfig.extension}ClusterCacheCreatorAlg')
274
275 # Configuration for (2)
276 if kwargs['runReconstruction']:
277 if kwargs['processPixels']:
278 kwargs.setdefault('PixelClusterizationAlg.name', f'{flags.Tracking.ActiveConfig.extension}PixelClusterizationAlg')
279 kwargs.setdefault('PixelClusterizationAlg.useCache', flags.Acts.useCache)
280 kwargs.setdefault('PixelClusterizationAlg.ClustersKey', pixelClustersName)
281 kwargs.setdefault('PixelClusterizationAlg.ClusterCache', f'{flags.Tracking.ActiveConfig.extension}PixelClustersCache')
282
283 if kwargs['processStrips']:
284 kwargs.setdefault('StripClusterizationAlg.name', f'{flags.Tracking.ActiveConfig.extension}StripClusterizationAlg')
285 kwargs.setdefault('StripClusterizationAlg.useCache', flags.Acts.useCache)
286 kwargs.setdefault('StripClusterizationAlg.ClustersKey', stripClustersName)
287 kwargs.setdefault('StripClusterizationAlg.ClusterCache', f'{flags.Tracking.ActiveConfig.extension}StripClustersCache')
288
289 # Configuration for (3)
290 if kwargs['runPreparation']:
291 if kwargs['processPixels']:
292 kwargs.setdefault('PixelClusterPreparationAlg.name', f'{flags.Tracking.ActiveConfig.extension}PixelClusterPreparationAlg')
293 kwargs.setdefault('PixelClusterPreparationAlg.useCache', flags.Acts.useCache)
294 kwargs.setdefault('PixelClusterPreparationAlg.OutputCollection', f'{pixelClustersName}_Cached' if kwargs['runReconstruction'] else pixelClustersName)
295 # The input is one between the collection (w/o cache) and the IDC (w/ cache)
296 if not flags.Acts.useCache:
297 # Take the collection from the reconstruction step. If not available take the collection from the primary pass
298 kwargs.setdefault('PixelClusterPreparationAlg.InputCollection', pixelClustersName if kwargs['runReconstruction'] else primaryPixelClustersName)
299 kwargs.setdefault('PixelClusterPreparationAlg.InputIDC', '')
300 else:
301 kwargs.setdefault('PixelClusterPreparationAlg.InputCollection', '')
302 kwargs.setdefault('PixelClusterPreparationAlg.InputIDC', f'{flags.Tracking.ActiveConfig.extension}PixelClustersCache')
303
304 if kwargs['processStrips']:
305 kwargs.setdefault('StripClusterPreparationAlg.name', f'{flags.Tracking.ActiveConfig.extension}StripClusterPreparationAlg')
306 kwargs.setdefault('StripClusterPreparationAlg.useCache', flags.Acts.useCache)
307 kwargs.setdefault('StripClusterPreparationAlg.OutputCollection', f'{stripClustersName}_Cached' if kwargs['runReconstruction'] else stripClustersName)
308 if not flags.Acts.useCache:
309 kwargs.setdefault('StripClusterPreparationAlg.InputCollection', stripClustersName if kwargs['runReconstruction'] else primaryStripClustersName)
310 kwargs.setdefault('StripClusterPreparationAlg.InputIDC', '')
311 else:
312 kwargs.setdefault('StripClusterPreparationAlg.InputCollection', '')
313 kwargs.setdefault('StripClusterPreparationAlg.InputIDC', f'{flags.Tracking.ActiveConfig.extension}StripClustersCache')
314 # Persistification
315 if flags.Acts.EDM.PersistifyClusters and kwargs['runReconstruction']:
316 toAOD = []
317 if kwargs['processPixels']:
318 pixel_cluster_shortlist = ['-validationMeasurementLink']
319 pixel_cluster_variables = '.'.join(pixel_cluster_shortlist)
320
321 pixelClusterCollection = kwargs['PixelClusterizationAlg.ClustersKey']
322 toAOD += [f'xAOD::PixelClusterContainer#{pixelClusterCollection}',
323 f'xAOD::PixelClusterAuxContainer#{pixelClusterCollection}Aux.{pixel_cluster_variables}']
324
325 if kwargs['processStrips']:
326 strip_cluster_shortlist = ['-validationMeasurementLink']
327 strip_cluster_variables = '.'.join(strip_cluster_shortlist)
328
329 stripClusterCollection = kwargs['StripClusterizationAlg.ClustersKey']
330 toAOD += [f"xAOD::StripClusterContainer#{stripClusterCollection}",
331 f"xAOD::StripClusterAuxContainer#{stripClusterCollection}Aux.{strip_cluster_variables}"]
332
333 from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
334 acc.merge(addToAOD(flags, toAOD))
335 acc.merge(ActsIDMainClusterizationCfg(flags, RoIs=roisName, **kwargs))
336 return acc

◆ ActsIDMainClusterizationCfg()

ComponentAccumulator ActsClusterizationInDetConfig.ActsIDMainClusterizationCfg ( flags,
* ,
str RoIs = "ActsRegionOfInterest",
**dict kwargs )

Definition at line 170 of file ActsClusterizationInDetConfig.py.

173 **kwargs: dict) -> ComponentAccumulator:
174 assert isinstance(RoIs, str)
175 assert isinstance(kwargs, dict)
176
177 acc = ComponentAccumulator()
178
179 # Clusterization is a three step process at maximum:
180 # (1) Cache Creation
181 # (2) Clusterization algorithm (reconstruction of clusters)
182 # (3) Preparation of collection for downstream algorithms
183 # What step is scheduled depends on the tracking pass and the activation
184 # or de-activation of caching mechanism
185
186 kwargs.setdefault('processPixels', flags.Detector.EnablePixel)
187 kwargs.setdefault('processStrips', flags.Detector.EnableSCT)
188 kwargs.setdefault('runCacheCreation', flags.Acts.useCache)
189 kwargs.setdefault('runReconstruction', True)
190 kwargs.setdefault('runPreparation', flags.Acts.useCache)
191
192 # Step (1)
193 if kwargs['runCacheCreation']:
194 acc.merge(ActsClusterCacheCreatorAlgCfg(flags,
195 **extractChildKwargs(prefix='ClusterCacheCreatorAlg.', **kwargs)))
196
197 # Step (2)
198 if kwargs['runReconstruction']:
199 if kwargs['processPixels']:
200 acc.merge(ActsIDPixelClusterizationAlgCfg(flags,
201 RoIs=RoIs,
202 **extractChildKwargs(prefix='PixelClusterizationAlg.', **kwargs)))
203 if kwargs['processStrips']:
204 acc.merge(ActsIDStripClusterizationAlgCfg(flags,
205 RoIs=RoIs,
206 **extractChildKwargs(prefix='StripClusterizationAlg.', **kwargs)))
207
208 # Step (3)
209 if kwargs['runPreparation']:
210 if kwargs['processPixels']:
211 acc.merge(ActsIDPixelClusterPreparationAlgCfg(flags,
212 RoIs=RoIs,
213 **extractChildKwargs(prefix='PixelClusterPreparationAlg.', **kwargs)))
214
215 if kwargs['processStrips']:
216 acc.merge(ActsIDStripClusterPreparationAlgCfg(flags,
217 RoIs=RoIs,
218 **extractChildKwargs(prefix='StripClusterPreparationAlg.', **kwargs)))
219
220 return acc
221

◆ ActsIDPixelClusteringToolCfg()

ComponentAccumulator ActsClusterizationInDetConfig.ActsIDPixelClusteringToolCfg ( flags,
str name = "ActsIDPixelClusteringTool",
** kwargs )

Definition at line 9 of file ActsClusterizationInDetConfig.py.

11 **kwargs) -> ComponentAccumulator:
12 acc = ComponentAccumulator()
13
14 kwargs.setdefault("isITk", False)
15
16 from PixelConditionsAlgorithms.PixelConditionsConfig import PixelChargeCalibCondCfg, PixelOfflineCalibCondAlgCfg
17 acc.merge(PixelChargeCalibCondCfg(flags))
18 acc.merge(PixelOfflineCalibCondAlgCfg(flags))
19 kwargs.setdefault("PixelChargeCalibCondData", "PixelChargeCalibCondData")
20
21 if "PixelLorentzAngleTool" not in kwargs:
22 from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleToolCfg
23 kwargs.setdefault("PixelLorentzAngleTool", acc.popToolsAndMerge( PixelLorentzAngleToolCfg(flags) ))
24
25 kwargs.setdefault("CheckGanged", True)
26 kwargs.setdefault('UseWeightedPosition',False) # not (flags.Tracking.doPixelDigitalClustering or flags.Beam.Type is BeamType.Cosmics)
27 kwargs.setdefault('UseBroadErrors', True) #flags.Beam.Type is BeamType.Cosmics
28
29 acc.setPrivateTools(CompFactory.ActsTrk.PixelClusteringTool(name, **kwargs))
30 return acc
31

◆ ActsIDPixelClusterizationAlgCfg()

ComponentAccumulator ActsClusterizationInDetConfig.ActsIDPixelClusterizationAlgCfg ( flags,
str name = 'ActsIDPixelClusterizationAlg',
* ,
bool useCache = False,
** kwargs )

Definition at line 63 of file ActsClusterizationInDetConfig.py.

67 **kwargs) -> ComponentAccumulator:
68 acc = ComponentAccumulator()
69
70 kwargs.setdefault("IDHelper", "PixelID")
71 kwargs.setdefault("RDOContainerKey", "PixelRDOs")
72 kwargs.setdefault("ClustersKey", "PixelClusters")
73 kwargs.setdefault("DetEleCollKey", "PixelDetectorElementCollection")
74 # Regional selection
75 kwargs.setdefault('RoIs', 'ActsRegionOfInterest')
76
77 kwargs.setdefault('ClusterCacheBackend', 'ActsPixelClusterCache_Back')
78 kwargs.setdefault('ClusterCache', 'ActsPixelClustersCache')
79
80 if 'RegSelTool' not in kwargs:
81 from RegionSelector.RegSelToolConfig import regSelTool_Pixel_Cfg
82 kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_Pixel_Cfg(flags)))
83
84 if 'ClusteringTool' not in kwargs:
85 kwargs.setdefault("ClusteringTool", acc.popToolsAndMerge(ActsIDPixelClusteringToolCfg(flags)))
86
87 if 'DetElStatus' not in kwargs:
88 from PixelConditionsAlgorithms.PixelConditionsConfig import PixelDetectorElementStatusAlgCfg
89 acc.merge(PixelDetectorElementStatusAlgCfg(flags))
90 kwargs.setdefault('DetElStatus', 'PixelDetectorElementStatus')
91
92 if not useCache:
93 acc.addEventAlgo(CompFactory.ActsTrk.PixelClusterizationAlg(name, **kwargs))
94 else:
95 acc.addEventAlgo(CompFactory.ActsTrk.PixelCacheClusterizationAlg(name, **kwargs))
96 return acc
97

◆ ActsIDPixelClusterPreparationAlgCfg()

ComponentAccumulator ActsClusterizationInDetConfig.ActsIDPixelClusterPreparationAlgCfg ( flags,
str name = "ActsIDPixelClusterPreparationAlg",
bool useCache = False,
** kwargs )

Definition at line 132 of file ActsClusterizationInDetConfig.py.

135 **kwargs) -> ComponentAccumulator:
136 acc = ComponentAccumulator()
137
138 kwargs.setdefault('InputCollection', 'PixelClusters')
139 kwargs.setdefault('DetectorElements', 'PixelDetectorElementCollection')
140
141 if 'RegSelTool' not in kwargs:
142 from RegionSelector.RegSelToolConfig import regSelTool_Pixel_Cfg
143 kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_Pixel_Cfg(flags)))
144
145 if not useCache:
146 acc.addEventAlgo(CompFactory.ActsTrk.PixelClusterDataPreparationAlg(name, **kwargs))
147 else:
148 acc.addEventAlgo(CompFactory.ActsTrk.PixelClusterCacheDataPreparationAlg(name, **kwargs))
149 return acc
150

◆ ActsIDStripClusteringToolCfg()

ComponentAccumulator ActsClusterizationInDetConfig.ActsIDStripClusteringToolCfg ( flags,
str name = "ActsIDStripClusteringTool",
** kwargs )

Definition at line 32 of file ActsClusterizationInDetConfig.py.

34 **kwargs) -> ComponentAccumulator:
35 acc = ComponentAccumulator()
36
37 kwargs.setdefault("isITk", False)
38
39 if 'LorentzAngleTool' not in kwargs:
40 from SiLorentzAngleTool.SCT_LorentzAngleConfig import SCT_LorentzAngleToolCfg
41 kwargs.setdefault("LorentzAngleTool", acc.popToolsAndMerge(SCT_LorentzAngleToolCfg(flags)))
42
43 if "StripDetElStatus" not in kwargs :
44 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import (
45 SCT_DetectorElementStatusAlgWithoutFlaggedCfg)
46 acc.merge(SCT_DetectorElementStatusAlgWithoutFlaggedCfg(flags))
47 kwargs.setdefault("StripDetElStatus", "SCTDetectorElementStatusWithoutFlagged")
48
49 # Disable noisy modules suppression
50 kwargs.setdefault("maxFiredStrips", 384)
51 kwargs.setdefault("errorStrategy", 2) # use pitch
52
53 if flags.InDet.selectSCTIntimeHits:
54 coll_25ns = (flags.Beam.BunchSpacing <= 25 and
55 flags.Beam.Type is BeamType.Collisions)
56 kwargs.setdefault("timeBins", "01X" if coll_25ns else "X1X")
57
58 kwargs.setdefault("StripDetEleCollKey", "SCT_DetectorElementCollection")
59
60 acc.setPrivateTools(CompFactory.ActsTrk.StripClusteringTool(name, **kwargs))
61 return acc
62

◆ ActsIDStripClusterizationAlgCfg()

ComponentAccumulator ActsClusterizationInDetConfig.ActsIDStripClusterizationAlgCfg ( flags,
str name = 'ActsIDStripClusterizationAlg',
bool useCache = False,
** kwargs )

Definition at line 98 of file ActsClusterizationInDetConfig.py.

101 **kwargs) -> ComponentAccumulator:
102 acc = ComponentAccumulator()
103
104 kwargs.setdefault("RDOContainerKey", "SCT_RDOs")
105 kwargs.setdefault("ClustersKey", "SCT_Clusters")
106 kwargs.setdefault("IDHelper", "SCT_ID")
107 kwargs.setdefault("DetEleCollKey", "SCT_DetectorElementCollection")
108 # Regional selection
109 kwargs.setdefault('RoIs', 'ActsRegionOfInterest')
110
111 kwargs.setdefault('ClusterCacheBackend', 'ActsStripClusterCache_Back')
112 kwargs.setdefault('ClusterCache', 'ActsStripClustersCache')
113
114 if 'RegSelTool' not in kwargs:
115 from RegionSelector.RegSelToolConfig import regSelTool_SCT_Cfg
116 kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_SCT_Cfg(flags)))
117
118 if 'DetElStatus' not in kwargs :
119 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_DetectorElementStatusAlgWithoutFlaggedCfg
120 acc.merge(SCT_DetectorElementStatusAlgWithoutFlaggedCfg(flags))
121 kwargs.setdefault("DetElStatus", "SCTDetectorElementStatusWithoutFlagged")
122
123 if 'ClusteringTool' not in kwargs:
124 kwargs.setdefault("ClusteringTool", acc.popToolsAndMerge(ActsIDStripClusteringToolCfg(flags)))
125
126 if not useCache:
127 acc.addEventAlgo(CompFactory.ActsTrk.StripClusterizationAlg(name, **kwargs))
128 else:
129 acc.addEventAlgo(CompFactory.ActsTrk.StripCacheClusterizationAlg(name, **kwargs))
130 return acc
131

◆ ActsIDStripClusterPreparationAlgCfg()

ComponentAccumulator ActsClusterizationInDetConfig.ActsIDStripClusterPreparationAlgCfg ( flags,
str name = "ActsIDStripClusterPreparationAlg",
bool useCache = False,
** kwargs )

Definition at line 151 of file ActsClusterizationInDetConfig.py.

154 **kwargs) -> ComponentAccumulator:
155 acc = ComponentAccumulator()
156
157 kwargs.setdefault('InputCollection', 'SCT_Clusters')
158 kwargs.setdefault('DetectorElements', 'SCT_DetectorElementCollection')
159
160 if 'RegSelTool' not in kwargs:
161 from RegionSelector.RegSelToolConfig import regSelTool_SCT_Cfg
162 kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_SCT_Cfg(flags)))
163
164 if not useCache:
165 acc.addEventAlgo(CompFactory.ActsTrk.StripClusterDataPreparationAlg(name, **kwargs))
166 else:
167 acc.addEventAlgo(CompFactory.ActsTrk.StripClusterCacheDataPreparationAlg(name, **kwargs))
168 return acc
169