3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from ActsConfig.ActsUtilities
import extractChildKwargs
8 name: str =
"ActsSpacePointCacheCreatorAlg",
9 **kwargs: dict) -> ComponentAccumulator:
11 kwargs.setdefault(
"PixelSpacePointCacheKey",
"ActsPixelSpacePointCache_Back")
12 kwargs.setdefault(
"StripSpacePointCacheKey",
"ActsStripSpacePointCache_Back")
13 kwargs.setdefault(
"StripOverlapSpacePointCacheKey",
"ActsStripOverlapSpacePointCache_Back")
14 acc.addEventAlgo(CompFactory.ActsTrk.Cache.CreatorAlg(name, **kwargs))
18 name: str =
"ActsPixelSpacePointTool",
19 **kwargs: dict) -> ComponentAccumulator:
21 acc.setPrivateTools(CompFactory.ActsTrk.PixelSpacePointFormationTool(name, **kwargs))
25 name: str =
"ActsStripSpacePointTool",
26 **kwargs: dict) -> ComponentAccumulator:
29 kwargs.setdefault(
"useTopSp", flags.Acts.reverseTrackFindingForStrips)
31 if 'LorentzAngleTool' not in kwargs:
32 from SiLorentzAngleTool.ITkStripLorentzAngleConfig
import ITkStripLorentzAngleToolCfg
35 acc.setPrivateTools(CompFactory.ActsTrk.StripSpacePointFormationTool(name, **kwargs))
39 name: str =
"ActsCoreStripSpacePointTool",
40 **kwargs: dict) -> ComponentAccumulator:
43 from ActsConfig.ActsGeometryConfig
import ActsDetectorElementToActsGeometryIdMappingAlgCfg
45 kwargs.setdefault(
'DetectorElementToActsGeometryIdMapKey',
'DetectorElementToActsGeometryIdMap')
47 if 'LorentzAngleTool' not in kwargs:
48 from SiLorentzAngleTool.ITkStripLorentzAngleConfig
import ITkStripLorentzAngleToolCfg
51 if 'TrackingGeometryTool' not in kwargs:
52 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometryToolCfg
55 acc.setPrivateTools(CompFactory.ActsTrk.CoreStripSpacePointFormationTool(name, **kwargs))
59 name: str =
"ActsPixelSpacePointPreparationAlg",
61 useCache: bool =
False,
62 **kwargs: dict) -> ComponentAccumulator:
65 kwargs.setdefault(
'InputCollection',
'ITkPixelSpacePoints')
66 kwargs.setdefault(
'DetectorElements',
'ITkPixelDetectorElementCollection')
68 if 'RegSelTool' not in kwargs:
69 from RegionSelector.RegSelToolConfig
import regSelTool_ITkPixel_Cfg
72 if flags.Acts.doMonitoring
and 'MonTool' not in kwargs:
73 from ActsConfig.ActsMonitoringConfig
import ActsDataPreparationMonitoringToolCfg
75 name =
"ActsPixelSpacePointPreparationMonitoringTool")))
78 acc.addEventAlgo(CompFactory.ActsTrk.SpacePointDataPreparationAlg(name, **kwargs))
80 acc.addEventAlgo(CompFactory.ActsTrk.SpacePointCacheDataPreparationAlg(name, **kwargs))
84 name: str =
"ActsStripSpacePointPreparationAlg",
86 useCache: bool =
False,
87 **kwargs: dict) -> ComponentAccumulator:
90 kwargs.setdefault(
'InputCollection',
'ITkStripSpacePoints')
91 kwargs.setdefault(
'DetectorElements',
'ITkStripDetectorElementCollection')
93 if 'RegSelTool' not in kwargs:
94 from RegionSelector.RegSelToolConfig
import regSelTool_ITkStrip_Cfg
97 if flags.Acts.doMonitoring
and 'MonTool' not in kwargs:
98 from ActsConfig.ActsMonitoringConfig
import ActsDataPreparationMonitoringToolCfg
100 name =
"ActsStripSpacePointPreparationMonitoringTool")))
103 acc.addEventAlgo(CompFactory.ActsTrk.SpacePointDataPreparationAlg(name, **kwargs))
105 acc.addEventAlgo(CompFactory.ActsTrk.SpacePointCacheDataPreparationAlg(name, **kwargs))
109 name: str =
'ActsStripOverlapSpacePointPreparationAlg',
111 useCache: bool =
False,
112 **kwargs: dict) -> ComponentAccumulator:
113 kwargs.setdefault(
'InputCollection',
'ITkStripOverlapSpacePoints')
117 name: str =
"ActsPixelSpacePointFormationAlg",
119 useCache: bool =
False,
120 **kwargs: dict) -> ComponentAccumulator:
123 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
126 kwargs.setdefault(
'PixelClusters',
'ITkPixelClusters')
127 kwargs.setdefault(
'PixelSpacePoints',
'ITkPixelSpacePoints')
130 kwargs.setdefault(
'SPCacheBackend',
'ActsPixelSpacePointCache_Back')
131 kwargs.setdefault(
'SPCache',
'ActsPixelSpacePointCache')
133 if 'SpacePointFormationTool' not in kwargs:
136 if flags.Acts.doMonitoring
and 'MonTool' not in kwargs:
137 from ActsConfig.ActsMonitoringConfig
import ActsPixelSpacePointFormationMonitoringToolCfg
142 acc.addEventAlgo(CompFactory.ActsTrk.PixelCacheSpacePointFormationAlg(name, **kwargs))
144 acc.addEventAlgo(CompFactory.ActsTrk.PixelSpacePointFormationAlg(name, **kwargs))
149 name: str =
"ActsStripSpacePointFormationAlg",
151 useCache: bool =
False,
152 **kwargs: dict) -> ComponentAccumulator:
155 from StripGeoModelXml.ITkStripGeoModelConfig
import ITkStripReadoutGeometryCfg
158 from BeamSpotConditions.BeamSpotConditionsConfig
import BeamSpotCondAlgCfg
161 from InDetConfig.SiSpacePointFormationConfig
import ITkSiElementPropertiesTableCondAlgCfg
165 kwargs.setdefault(
'StripClusters',
'ITkStripClusters')
166 kwargs.setdefault(
'StripSpacePoints',
'ITkStripSpacePoints')
167 kwargs.setdefault(
'StripOverlapSpacePoints',
'ITkStripOverlapSpacePoints')
170 kwargs.setdefault(
'SPCacheBackend',
'ActsStripSpacePointCache_Back')
171 kwargs.setdefault(
'SPCache',
'ActsStripSpacePointCache')
172 kwargs.setdefault(
'OSPCacheBackend',
'ActsStripOverlapSpacePointCache_Back')
173 kwargs.setdefault(
'OSPCache',
'ActsStripOverlapSpacePointCache')
175 if 'SpacePointFormationTool' not in kwargs:
176 from ActsConfig.ActsConfigFlags
import SpacePointStrategy
177 if flags.Acts.SpacePointStrategy
is SpacePointStrategy.ActsCore:
182 if flags.Acts.doMonitoring
and 'MonTool' not in kwargs:
183 from ActsConfig.ActsMonitoringConfig
import ActsStripSpacePointFormationMonitoringToolCfg
187 acc.addEventAlgo(CompFactory.ActsTrk.StripCacheSpacePointFormationAlg(name, **kwargs))
189 acc.addEventAlgo(CompFactory.ActsTrk.StripSpacePointFormationAlg(name, **kwargs))
194 RoIs: str =
"ActsRegionOfInterest",
195 **kwargs: dict) -> ComponentAccumulator:
198 kwargs.setdefault(
'processPixels', flags.Detector.EnableITkPixel)
199 kwargs.setdefault(
'processStrips', flags.Detector.EnableITkStrip)
200 kwargs.setdefault(
'runCacheCreation', flags.Acts.useCache)
201 kwargs.setdefault(
'runReconstruction',
True)
202 kwargs.setdefault(
'runPreparation', flags.Acts.useCache)
203 kwargs.setdefault(
'processOverlapSpacePoints',
True)
205 if kwargs[
'runCacheCreation']:
208 if kwargs[
'runReconstruction']:
209 if kwargs[
'processPixels']:
212 if kwargs[
'processStrips']:
215 if kwargs[
'runPreparation']:
216 if kwargs[
'processPixels']:
220 if kwargs[
'processStrips']:
224 if kwargs[
'processOverlapSpacePoints']:
230 if flags.Acts.doAnalysis:
231 if kwargs[
'processPixels']:
232 from ActsConfig.ActsAnalysisConfig
import ActsPixelSpacePointAnalysisAlgCfg
234 if kwargs[
'processStrips']:
235 from ActsConfig.ActsAnalysisConfig
import ActsStripSpacePointAnalysisAlgCfg
237 if kwargs[
'processOverlapSpacePoints']:
238 from ActsConfig.ActsAnalysisConfig
import ActsStripOverlapSpacePointAnalysisAlgCfg
245 previousActsExtension = None) -> ComponentAccumulator:
248 processPixels = flags.Detector.EnableITkPixel
249 processStrips = flags.Detector.EnableITkStrip
253 if flags.Tracking.ActiveConfig.extension
in [
"ActsConversion",
"ActsLargeRadius"]:
254 processPixels =
False
255 elif flags.Tracking.doITkFastTracking:
257 processStrips =
False
260 kwargs.setdefault(
'processPixels', processPixels)
261 kwargs.setdefault(
'processStrips', processStrips)
279 if flags.Tracking.ActiveConfig.isSecondaryPass:
281 kwargs.setdefault(
'runCacheCreation',
False)
282 kwargs.setdefault(
'runReconstruction', flags.Acts.useCache)
283 kwargs.setdefault(
'runPreparation',
True)
286 kwargs.setdefault(
'runCacheCreation', flags.Acts.useCache)
287 kwargs.setdefault(
'runReconstruction',
True)
288 kwargs.setdefault(
'runPreparation', flags.Acts.useCache)
291 processOverlapSpacePoints = processStrips
292 if flags.Tracking.ActiveConfig.extension
in [
'ActsConversion']:
293 processOverlapSpacePoints =
False
294 kwargs.setdefault(
'processOverlapSpacePoints', processOverlapSpacePoints)
297 roisName = f
'{flags.Tracking.ActiveConfig.extension}RegionOfInterest'
299 if flags.Tracking.ActiveConfig.extension ==
'ActsLargeRadius':
300 roisName =
'ActsRegionOfInterest'
304 pixelClustersName =
'ITkPixelClusters'
305 stripClustersName =
'ITkStripClusters'
306 pixelSpacePointsName =
'ITkPixelSpacePoints'
307 stripSpacePointsName =
'ITkStripSpacePoints'
308 stripOverlapSpacePointsName =
'ITkStripOverlapSpacePoints'
310 if flags.Tracking.ActiveConfig.isSecondaryPass:
311 pixelClustersName = f
'ITk{flags.Tracking.ActiveConfig.extension.replace("Acts", "")}PixelClusters'
312 stripClustersName = f
'ITk{flags.Tracking.ActiveConfig.extension.replace("Acts", "")}StripClusters'
313 pixelSpacePointsName = f
'ITk{flags.Tracking.ActiveConfig.extension.replace("Acts", "")}PixelSpacePoints'
314 stripSpacePointsName = f
'ITk{flags.Tracking.ActiveConfig.extension.replace("Acts", "")}StripSpacePoints'
315 stripOverlapSpacePointsName = f
'ITk{flags.Tracking.ActiveConfig.extension.replace("Acts", "")}StripOverlapSpacePoints'
317 if flags.Acts.useCache:
318 pixelClustersName +=
"_Cached"
319 stripClustersName +=
"_Cached"
322 primaryPixelSpacePointsName =
'ITkPixelSpacePoints'
323 primaryStripSpacePointsName =
'ITkStripSpacePoints'
324 primaryStripOverlapSpacePointsName =
'ITkStripOverlapSpacePoints'
327 if kwargs[
'runCacheCreation']:
328 kwargs.setdefault(
'SpacePointCacheCreatorAlg.name', f
'{flags.Tracking.ActiveConfig.extension}SpacePointCacheCreatorAlg')
331 if kwargs[
'runReconstruction']:
332 if kwargs[
'processPixels']:
333 kwargs.setdefault(
'PixelSpacePointFormationAlg.name', f
'{flags.Tracking.ActiveConfig.extension}PixelSpacePointFormationAlg')
334 kwargs.setdefault(
'PixelSpacePointFormationAlg.useCache', flags.Acts.useCache)
335 kwargs.setdefault(
'PixelSpacePointFormationAlg.SPCache', f
'{flags.Tracking.ActiveConfig.extension}PixelSpacePointCache')
336 kwargs.setdefault(
'PixelSpacePointFormationAlg.PixelClusters', pixelClustersName)
337 kwargs.setdefault(
'PixelSpacePointFormationAlg.PixelSpacePoints', pixelSpacePointsName)
339 if kwargs[
'processStrips']:
340 kwargs.setdefault(
'StripSpacePointFormationAlg.name', f
'{flags.Tracking.ActiveConfig.extension}StripSpacePointFormationAlg')
341 kwargs.setdefault(
'StripSpacePointFormationAlg.useCache', flags.Acts.useCache)
342 kwargs.setdefault(
'StripSpacePointFormationAlg.SPCache', f
'{flags.Tracking.ActiveConfig.extension}StripSpacePointCache')
343 kwargs.setdefault(
'StripSpacePointFormationAlg.StripClusters', stripClustersName)
344 kwargs.setdefault(
'StripSpacePointFormationAlg.StripSpacePoints', stripSpacePointsName)
347 kwargs.setdefault(
'StripSpacePointFormationAlg.ProcessOverlapForStrip', kwargs[
'processOverlapSpacePoints'])
348 kwargs.setdefault(
'StripSpacePointFormationAlg.OSPCache', f
'{flags.Tracking.ActiveConfig.extension}StripOverlapSpacePointCache')
349 if kwargs[
'processOverlapSpacePoints']:
350 kwargs.setdefault(
'StripSpacePointFormationAlg.StripOverlapSpacePoints', stripOverlapSpacePointsName)
353 kwargs.setdefault(
'StripSpacePointFormationAlg.StripOverlapSpacePoints',
'')
356 if kwargs[
'runPreparation']:
357 if kwargs[
'processPixels']:
358 kwargs.setdefault(
'PixelSpacePointPreparationAlg.name', f
'{flags.Tracking.ActiveConfig.extension}PixelSpacePointPreparationAlg')
359 kwargs.setdefault(
'PixelSpacePointPreparationAlg.useCache', flags.Acts.useCache)
360 kwargs.setdefault(
'PixelSpacePointPreparationAlg.OutputCollection', f
'{pixelSpacePointsName}_Cached' if kwargs[
'runReconstruction']
else pixelSpacePointsName)
362 if not flags.Acts.useCache:
364 kwargs.setdefault(
'PixelSpacePointPreparationAlg.InputCollection', pixelSpacePointsName
if kwargs[
'runReconstruction']
else primaryPixelSpacePointsName)
365 kwargs.setdefault(
'PixelSpacePointPreparationAlg.InputIDC',
'')
367 kwargs.setdefault(
'PixelSpacePointPreparationAlg.InputCollection',
'')
368 kwargs.setdefault(
'PixelSpacePointPreparationAlg.InputIDC', f
'{flags.Tracking.ActiveConfig.extension}PixelSpacePointCache')
370 if flags.Tracking.ActiveConfig.isSecondaryPass
and previousActsExtension
is not None:
371 kwargs.setdefault(
'PixelSpacePointPreparationAlg.InputPrdMap', f
'{previousActsExtension}PrdMap')
374 if kwargs[
'processStrips']:
375 kwargs.setdefault(
'StripSpacePointPreparationAlg.name', f
'{flags.Tracking.ActiveConfig.extension}StripSpacePointPreparationAlg')
376 kwargs.setdefault(
'StripSpacePointPreparationAlg.useCache', flags.Acts.useCache)
377 kwargs.setdefault(
'StripSpacePointPreparationAlg.OutputCollection', f
'{stripSpacePointsName}_Cached' if kwargs[
'runReconstruction']
else stripSpacePointsName)
379 if not flags.Acts.useCache:
381 kwargs.setdefault(
'StripSpacePointPreparationAlg.InputCollection', stripSpacePointsName
if kwargs[
'runReconstruction']
else primaryStripSpacePointsName)
382 kwargs.setdefault(
'StripSpacePointPreparationAlg.InputIDC',
'')
384 kwargs.setdefault(
'StripSpacePointPreparationAlg.InputCollection',
'')
385 kwargs.setdefault(
'StripSpacePointPreparationAlg.InputIDC', f
'{flags.Tracking.ActiveConfig.extension}StripSpacePointCache')
387 if flags.Tracking.ActiveConfig.isSecondaryPass
and previousActsExtension
is not None:
388 kwargs.setdefault(
'StripSpacePointPreparationAlg.InputPrdMap', f
'{previousActsExtension}PrdMap')
390 if kwargs[
'processOverlapSpacePoints']:
391 kwargs.setdefault(
'StripOverlapSpacePointPreparationAlg.name', f
'{flags.Tracking.ActiveConfig.extension}StripOverlapSpacePointPreparationAlg')
392 kwargs.setdefault(
'StripOverlapSpacePointPreparationAlg.useCache', flags.Acts.useCache)
393 kwargs.setdefault(
'StripOverlapSpacePointPreparationAlg.OutputCollection', f
'{stripOverlapSpacePointsName}_Cached' if kwargs[
'runReconstruction']
else stripOverlapSpacePointsName)
395 if not flags.Acts.useCache:
397 kwargs.setdefault(
'StripOverlapSpacePointPreparationAlg.InputCollection', stripOverlapSpacePointsName
if kwargs[
'runReconstruction']
else primaryStripOverlapSpacePointsName)
398 kwargs.setdefault(
'StripOverlapSpacePointPreparationAlg.InputIDC',
'')
400 kwargs.setdefault(
'StripOverlapSpacePointPreparationAlg.InputCollection',
'')
401 kwargs.setdefault(
'StripOverlapSpacePointPreparationAlg.InputIDC', f
'{flags.Tracking.ActiveConfig.extension}StripOverlapSpacePointCache')
403 if flags.Tracking.ActiveConfig.isSecondaryPass
and previousActsExtension
is not None:
404 kwargs.setdefault(
'StripOverlapSpacePointPreparationAlg.InputPrdMap', f
'{previousActsExtension}PrdMap')
407 if flags.Acts.doAnalysis:
410 if kwargs[
'processPixels']:
411 kwargs.setdefault(
'PixelSpacePointAnalysisAlg.name', f
'{flags.Tracking.ActiveConfig.extension}PixelSpacePointAnalysisAlg')
412 kwargs.setdefault(
'PixelSpacePointAnalysisAlg.extension', flags.Tracking.ActiveConfig.extension)
413 kwargs.setdefault(
'PixelSpacePointAnalysisAlg.SpacePointContainerKey', kwargs[
'PixelSpacePointPreparationAlg.OutputCollection']
if kwargs[
'runPreparation']
else kwargs[
'PixelSpacePointFormationAlg.PixelSpacePoints'])
415 if kwargs[
'processStrips']:
416 kwargs.setdefault(
'StripSpacePointAnalysisAlg.name', f
'{flags.Tracking.ActiveConfig.extension}StripSpacePointAnalysisAlg')
417 kwargs.setdefault(
'StripSpacePointAnalysisAlg.extension', flags.Tracking.ActiveConfig.extension)
418 kwargs.setdefault(
'StripSpacePointAnalysisAlg.SpacePointContainerKey', kwargs[
'StripSpacePointPreparationAlg.OutputCollection']
if kwargs[
'runPreparation']
else kwargs[
'StripSpacePointFormationAlg.StripSpacePoints'])
420 if kwargs[
'processOverlapSpacePoints']:
421 kwargs.setdefault(
'StripOverlapSpacePointAnalysisAlg.name', f
'{flags.Tracking.ActiveConfig.extension}StripOverlapSpacePointAnalysisAlg')
422 kwargs.setdefault(
'StripOverlapSpacePointAnalysisAlg.extension', flags.Tracking.ActiveConfig.extension)
423 kwargs.setdefault(
'StripOverlapSpacePointAnalysisAlg.SpacePointContainerKey', kwargs[
'StripOverlapSpacePointPreparationAlg.OutputCollection']
if kwargs[
'runPreparation']
else kwargs[
'StripSpacePointFormationAlg.StripOverlapSpacePoints'])