ATLAS Offline Software
Loading...
Searching...
No Matches
F100Config.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.AthConfigFlags import AthConfigFlags
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5from AthenaConfiguration.ComponentFactory import CompFactory
6
7def dataPreparation(flags: AthConfigFlags, signature: str, inView: bool, rois: str) -> ComponentAccumulator:
8 acc = ComponentAccumulator()
9
10 if not inView:
11 from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
12 loadRDOs = [( 'PixelRDO_Container' , 'StoreGateSvc+ITkPixelRDOs' ),
13 ( 'SCT_RDO_Container' , 'StoreGateSvc+ITkStripRDOs' ),
14 ( 'InDetSimDataCollection' , 'ITkPixelSDO_Map') ]
15 acc.merge(SGInputLoaderCfg(flags, Load=loadRDOs))
16
17
18 from EFTrackingFPGAPipeline.F100IntegrationConfig import F1X0IntegrationCfg
19
20 acc.merge(fpga_data_encoding(flags, signature, rois))
21
22 kwarg = {}
23
24 kwarg.setdefault("FPGAEncodedPixelKey", "FPGAEncodedPixelRDOs_"+signature)
25 kwarg.setdefault("FPGAEncodedStripKey", "FPGAEncodedStripRDOs_"+signature)
26
27 kwarg.setdefault("FPGAOutputPixelKey", "FPGAFormatPixelClusters_"+signature)
28 kwarg.setdefault("FPGAOutputStripKey", "FPGAFormatStripClusters_"+signature)
29 kwarg.setdefault("FPGAThreads", 0)
30
31 acc.merge(F1X0IntegrationCfg(flags, name="F100IntegAlg_"+signature, **kwarg))
32
33 #convert back to
34 acc.merge(fpga_xaod_creation(flags, signature))
35 #sort
36 acc.merge(fpga_xaod_sort(flags, signature))
37
38 #add pixel spacepoint creation
39 from ActsConfig.ActsSpacePointFormationConfig import ActsPixelSpacePointFormationAlgCfg
40 acc.merge(ActsPixelSpacePointFormationAlgCfg(flags,name="PixelSPFormation_"+signature,useCache=False, PixelClusters = "ITkPixelClusters_"+signature, PixelSpacePoints = "ITkPixelSpacepoints_"+signature))
41
42 return acc
43
44
45def fpga_data_encoding(flags, signature, rois) -> ComponentAccumulator:
46 acc = ComponentAccumulator()
47
48 kwargs = {}
49
50 from EFTrackingFPGAPipeline.F100IntegrationConfig import F100DataEncodingCfg
51
52 from RegionSelector.RegSelToolConfig import regSelTool_ITkPixel_Cfg
53 kwargs.setdefault('RegPixelSelTool', acc.popToolsAndMerge(regSelTool_ITkPixel_Cfg(flags)))
54
55 from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg
56 kwargs.setdefault('RegStripSelTool', acc.popToolsAndMerge(regSelTool_ITkStrip_Cfg(flags)))
57
58 kwargs.setdefault("isRoI_Seeded", True)
59 kwargs.setdefault("RoIs", rois)
60 kwargs.setdefault("FPGAEncodedPixelKey", "FPGAEncodedPixelRDOs_"+signature)
61 kwargs.setdefault("FPGAEncodedStripKey", "FPGAEncodedStripRDOs_"+signature)
62
63 acc.merge(F100DataEncodingCfg(flags, "F100DataEncoding_"+signature, **kwargs))
64
65 return acc
66
67def fpga_xaod_creation(flags, signature) -> ComponentAccumulator:
68 acc = ComponentAccumulator()
69 kwarg = {}
70 from EFTrackingFPGAPipeline.DataPrepConfig import xAODClusterMakerCfg
71 clusterMakerTool = acc.popToolsAndMerge(xAODClusterMakerCfg(flags,
72 name = "xAODClusterMaker_" + signature,
73 PixelClusterContainerKey="FPGAPixelClusters_"+signature,
74 StripClusterContainerKey="FPGAStripClusters_"+signature))
75 kwarg.setdefault('xAODClusterMaker', clusterMakerTool)
76 kwarg.setdefault("FPGAOutputPixelKey", "FPGAFormatPixelClusters_"+signature)
77 kwarg.setdefault("FPGAOutputStripKey", "FPGAFormatStripClusters_"+signature)
78
79 acc.addEventAlgo(CompFactory.EFTrackingFPGAIntegration.F100EDMConversionAlg("F100EDMConversionAlg_"+signature, **kwarg))
80
81 return acc
82
83def fpga_xaod_sort(flags, signature) -> ComponentAccumulator:
84 acc = ComponentAccumulator()
85
86 kwargs = {}
87
88 kwargs.setdefault('xAODPixelClusterContainer', "FPGAPixelClusters_"+signature)
89 kwargs.setdefault('xAODStripClusterContainer', "FPGAStripClusters_"+signature)
90 kwargs.setdefault('sortedxAODPixelClusterContainer', "ITkPixelClusters_"+signature)
91 kwargs.setdefault('sortedxAODStripClusterContainer', "ITkStripClusters_"+signature)
92
93 ClustrerSorting = CompFactory.FPGAClusterSortingAlg("F100ClusterSorting_"+signature,**kwargs)
94
95 # Add the algorithm to the accumulator
96 acc.addEventAlgo(ClustrerSorting)
97
98 return acc
ComponentAccumulator dataPreparation(AthConfigFlags flags, str signature, bool inView, str rois)
Definition F100Config.py:7
ComponentAccumulator fpga_xaod_sort(flags, signature)
Definition F100Config.py:83
ComponentAccumulator fpga_xaod_creation(flags, signature)
Definition F100Config.py:67
ComponentAccumulator fpga_data_encoding(flags, signature, rois)
Definition F100Config.py:45