ATLAS Offline Software
F100Config.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 
7 def dataPreparation(flags: AthConfigFlags, signature: str, inView: bool, rois: str) -> 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 F100IntegrationCfg
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(F100IntegrationCfg(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 
45 def 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 
67 def 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 
83 def 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
python.F100Config.fpga_data_encoding
ComponentAccumulator fpga_data_encoding(flags, signature, rois)
Definition: F100Config.py:45
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
F100IntegrationConfig.F100DataEncodingCfg
def F100DataEncodingCfg(flags, name='F100DataEncodingAlg', **kwarg)
Definition: F100IntegrationConfig.py:68
RegSelToolConfig.regSelTool_ITkPixel_Cfg
def regSelTool_ITkPixel_Cfg(flags)
Definition: RegSelToolConfig.py:120
RegSelToolConfig.regSelTool_ITkStrip_Cfg
def regSelTool_ITkStrip_Cfg(flags)
Definition: RegSelToolConfig.py:126
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
python.F100Config.fpga_xaod_creation
ComponentAccumulator fpga_xaod_creation(flags, signature)
Definition: F100Config.py:67
F100IntegrationConfig.F100IntegrationCfg
def F100IntegrationCfg(flags, name='F100IntegrationAlg', **kwarg)
Definition: F100IntegrationConfig.py:7
DataPrepConfig.xAODClusterMakerCfg
def xAODClusterMakerCfg(flags, name='xAODClusterMaker', **kwarg)
Definition: DataPrepConfig.py:31
ActsSpacePointFormationConfig.ActsPixelSpacePointFormationAlgCfg
ComponentAccumulator ActsPixelSpacePointFormationAlgCfg(flags, str name="ActsPixelSpacePointFormationAlg", *bool useCache=False, **dict kwargs)
Definition: ActsSpacePointFormationConfig.py:144
python.F100Config.fpga_xaod_sort
ComponentAccumulator fpga_xaod_sort(flags, signature)
Definition: F100Config.py:83
python.F100Config.dataPreparation
ComponentAccumulator dataPreparation(AthConfigFlags flags, str signature, bool inView, str rois)
Definition: F100Config.py:7