ATLAS Offline Software
Loading...
Searching...
No Matches
ActsGPUEventCnvConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5from AthDeviceComps.AthDeviceCompsConfig import (
6 HostMemoryResourceToolCfg,
7 DeviceMemoryResourceToolCfg,
8 CopyToolCfg,
9 CopiesToolCfg,
10)
11from AthenaConfiguration.Enums import BeamType
12
13# ============================================================
14# Algorithm configurations
15# ============================================================
16
18 name="RDOtoTracccCellConverterAlg",
19 **kwargs) -> ComponentAccumulator:
20 #TODO: remove this once MC is fixed
21 if not flags.Tracking.doPixelDigitalClustering:
22 raise ValueError("clusterization on device is not compatible "
23 "with analog clustering at the moment due to incorrent "
24 "ToT values for Pixel hits in the simulation data.")
25
26 if flags.ITk.selectStripIntimeHits and 'timeBins' not in kwargs:
27 coll_25ns = flags.Beam.BunchSpacing<=25 and flags.Beam.Type is BeamType.Collisions
28 kwargs.setdefault("timeBins", "01X" if coll_25ns else "X1X")
29
30 acc = ComponentAccumulator()
31 kwargs.setdefault("HostMR", acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)))
32 kwargs.setdefault("DeviceMR", acc.popToolsAndMerge(DeviceMemoryResourceToolCfg(flags)))
33 kwargs.setdefault("CopiesTool", acc.popToolsAndMerge(CopiesToolCfg(flags)))
34 kwargs.setdefault("PixelRDO", "ITkPixelRDOs")
35 kwargs.setdefault("StripRDO", "ITkStripRDOs")
36 kwargs.setdefault("TracccCells", "TracccCells")
37 kwargs.setdefault("HostConditionsObjectName", "TracccHostCondConfig")
38 kwargs.setdefault("CPUCellSorting", not flags.Acts.Device.doCellSorting)
39 kwargs.setdefault("UsePixelToTForCellActivation", not flags.Tracking.doPixelDigitalClustering)
40 acc.addEventAlgo(
41 CompFactory.ActsTrk.RDOtoTracccCellConverterAlg(name, **kwargs))
42 return acc
43
45 name="PhaseIIRDOtoTracccCellConverterAlg",
46 **kwargs) -> ComponentAccumulator:
47 #TODO: remove this once MC is fixed
48 if not flags.Tracking.doPixelDigitalClustering:
49 raise ValueError("clusterization on device is not compatible "
50 "with analog clustering at the moment due to incorrent "
51 "ToT values for Pixel hits in the simulation data.")
52
53 if flags.ITk.selectStripIntimeHits and 'timeBins' not in kwargs:
54 coll_25ns = flags.Beam.BunchSpacing<=25 and flags.Beam.Type is BeamType.Collisions
55 kwargs.setdefault("timeBins", "01X" if coll_25ns else "X1X")
56
57 acc = ComponentAccumulator()
58 kwargs.setdefault("HostMR", acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)))
59 kwargs.setdefault("DeviceMR", acc.popToolsAndMerge(DeviceMemoryResourceToolCfg(flags)))
60 kwargs.setdefault("CopiesTool", acc.popToolsAndMerge(CopiesToolCfg(flags)))
61 kwargs.setdefault("PixelRDO", "ITkPixelRDOs")
62 kwargs.setdefault("StripRDO", "ITkStripRDOs")
63 kwargs.setdefault("TracccCells", "TracccCellsFromPh2RDO")
64 kwargs.setdefault("HostConditionsObjectName", "TracccHostCondConfig")
65 kwargs.setdefault("CPUCellSorting", not flags.Acts.Device.doCellSorting)
66 kwargs.setdefault("UsePixelToTForCellActivation", not flags.Tracking.doPixelDigitalClustering)
67 acc.addEventAlgo(
68 CompFactory.ActsTrk.PhaseIIRDOtoTracccCellConverterAlg(name, **kwargs))
69 return acc
70
72 name="TracccCellValidationAlg",
73 **kwargs) -> ComponentAccumulator:
74 acc = ComponentAccumulator()
75 kwargs.setdefault("HostMR", acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)))
76 kwargs.setdefault("DeviceCopyTool", acc.popToolsAndMerge(CopyToolCfg(flags)))
77 kwargs.setdefault("ReferenceCells", "TracccCellsLegacy")
78 kwargs.setdefault("Cells", "TracccCells")
79 acc.addEventAlgo(
80 CompFactory.ActsTrk.TracccCellValidationAlg(name, **kwargs))
81 return acc
82
84 name="TracccMeasurementConverterAlg",
85 **kwargs) -> ComponentAccumulator:
86 acc = ComponentAccumulator()
87 kwargs.setdefault("HostMR", acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)))
88 kwargs.setdefault("CopyProviderTool", acc.popToolsAndMerge(CopyToolCfg(flags)))
89 kwargs.setdefault("InputMeasurements", "TracccMeasurements")
90 kwargs.setdefault("InputClusters", "TracccClusterCollection")
91 kwargs.setdefault("InputCells", "TracccCells")
92 kwargs.setdefault("OutputPixelClusters", "ITkTracccPixelClusters")
93 kwargs.setdefault("OutputStripClusters", "ITkTracccStripClusters")
94 kwargs.setdefault("ConvertClustersWithCells", False)
95 acc.addEventAlgo(
96 CompFactory.ActsTrk.TracccMeasurementConverterAlg(name, **kwargs))
97 return acc
ComponentAccumulator TracccCellValidationAlgCfg(flags, name="TracccCellValidationAlg", **kwargs)
ComponentAccumulator TracccMeasurementConverterAlgCfg(flags, name="TracccMeasurementConverterAlg", **kwargs)
ComponentAccumulator RDOtoTracccCellConverterAlgCfg(flags, name="RDOtoTracccCellConverterAlg", **kwargs)
ComponentAccumulator PhaseIIRDOtoTracccCellConverterAlgCfg(flags, name="PhaseIIRDOtoTracccCellConverterAlg", **kwargs)