8 """Set up a TracccTritonTool tool and return"""
10 from AthTritonComps.TritonToolConfig
import TritonToolCfg
12 acc = ComponentAccumulator()
14 kwargs.setdefault(
"TritonTool", acc.popToolsAndMerge(
15 TritonToolCfg(flags, flags.Tracking.Traccc.Triton.model,
16 url=flags.Tracking.Traccc.Triton.url,
17 port=flags.Tracking.Traccc.Triton.port,
18 ssl=(flags.Tracking.Traccc.Triton.port == 443))))
20 acc.setPrivateTools(CompFactory.TracccTritonTool(name, **kwargs))
25 """Set up traccc-as-a-service tracking: the cells of each event are sent
26 to the server, and the traccc collections it returns are converted with
27 the same algorithms as the local device chain.
29 Scheduled by ITkActsDeviceTrackRecoCfg for the primary pass with
30 flags.Acts.Device.tritonMode = DeviceTritonMode.Client, which also adds
31 the PRD association and truth"""
32 acc = ComponentAccumulator()
35 cells_key =
"TracccCells"
36 measurements_key =
"TracccTritonMeasurements"
37 clusters_key =
"TracccTritonClusters"
38 traccc_tracks_key =
"TracccTritonTracks"
41 from ActsConfig.ActsRegionsOfInterestConfig
import ActsRegionsOfInterestCreatorAlgCfg
42 acc.merge(ActsRegionsOfInterestCreatorAlgCfg(flags,
43 name=f
"{flags.Tracking.ActiveConfig.extension}RegionsOfInterestCreatorAlg"))
46 from AthDeviceComps.AthDeviceCompsConfig
import HostCopyToolCfg, HostMemoryResourceToolCfg
49 from ActsGPUEventCnv.ActsGPUEventCnvConfig
import RDOtoTracccCellConverterAlgCfg
50 copies_tool = CompFactory.AthDevice.CopiesAdaptorTool(
51 "TracccCellsHostCopiesTool",
52 HostCopyTool=acc.popToolsAndMerge(HostCopyToolCfg(flags)),
53 DeviceCopyTool=acc.popToolsAndMerge(HostCopyToolCfg(flags)))
54 acc.merge(RDOtoTracccCellConverterAlgCfg(flags,
55 HostMR=acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)),
56 DeviceMR=acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)),
57 CopiesTool=copies_tool,
58 TracccCells=cells_key))
62 kwargs.setdefault(
"HostMR", acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)))
63 kwargs.setdefault(
"TracccCells", cells_key)
64 kwargs.setdefault(
"OutputTracccMeasurements", measurements_key)
65 kwargs.setdefault(
"OutputTracccClusters", clusters_key)
66 kwargs.setdefault(
"OutputTracccTracks", traccc_tracks_key)
67 acc.addEventAlgo(CompFactory.TritonTracccTrackMaker(name, **kwargs))
70 from ActsGPUEventCnv.ActsGPUEventCnvConfig
import (
71 TracccMeasurementConverterAlgCfg,
72 TracccTrackConverterAlgCfg,
74 acc.merge(TracccMeasurementConverterAlgCfg(flags,
75 HostMR=acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)),
76 CopyProviderTool=acc.popToolsAndMerge(HostCopyToolCfg(flags)),
77 InputMeasurements=measurements_key,
78 InputClusters=clusters_key,
80 ConvertClustersWithCells=flags.Tracking.doTruth,
81 OutputPixelClusters=
"ITkPixelClusters",
82 OutputPixelSpacePoints=
"ITkPixelSpacePoints",
83 OutputMeasToPixelSP=
"ITkTracccMeasToPixelSP",
84 OutputMeasToStripCl=
"ITkTracccMeasToStripCl",
85 OutputStripClusters=
"ITkStripClusters",
88 if flags.Tracking.ActiveConfig.useITkStripSeeding
or (flags.Acts.SpacePoints.doStrip
and not flags.Tracking.ActiveConfig.isSecondaryPass):
89 from ActsConfig.ActsSpacePointFormationConfig
import ActsStripSpacePointFormationAlgCfg
90 acc.merge(ActsStripSpacePointFormationAlgCfg(flags,
91 name=f
"{flags.Tracking.ActiveConfig.extension}StripSpacePointFormationAlg",
92 StripClusters=
"ITkStripClusters",
93 StripSpacePoints=
"ITkStripSpacePoints",
94 StripOverlapSpacePoints=
"ITkStripOverlapSpacePoints"))
96 acc.merge(TracccTrackConverterAlgCfg(flags,
97 HostMR=acc.popToolsAndMerge(HostMemoryResourceToolCfg(flags)),
98 CopyProviderTool=acc.popToolsAndMerge(HostCopyToolCfg(flags)),
99 InputPixelClusters=
"ITkPixelClusters",
100 InputStripClusters=
"ITkStripClusters",
101 InputMeasToPixelSP=
"ITkTracccMeasToPixelSP",
102 InputMeasToStripCl=
"ITkTracccMeasToStripCl",
103 InputTracks=traccc_tracks_key,
104 OutputTracks=f
"{flags.Tracking.ActiveConfig.extension}Tracks",