ATLAS Offline Software
DataPreparationPipeline.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 #ifndef EFTRACKING_FPGA_INTEGRATION_DATAPREPARATIONPIPELINE_H
14 #define EFTRACKING_FPGA_INTEGRATION_DATAPREPARATIONPIPELINE_H
15 
16 // EFTracking include
17 #include "EFTrackingDataFormats.h"
18 #include "IntegrationBase.h"
19 #include "xAODContainerMaker.h"
20 
21 // Athena include
26 
35  public:
36  using IntegrationBase::IntegrationBase;
37  StatusCode initialize() override final;
38  StatusCode execute(const EventContext &ctx) const override final;
39 
48  std::vector<EFTrackingDataFormats::StripCluster> &ef_sc,
49  long unsigned int N) const;
50 
59  std::vector<EFTrackingDataFormats::PixelCluster> &ef_pc,
60  long unsigned int N) const;
61 
69  const xAOD::SpacePointContainer *sp,
70  std::vector<EFTrackingDataFormats::SpacePoint> &ef_sp,
71  std::vector<std::vector<const xAOD::UncalibratedMeasurement *>> &sp_meas,
72  long unsigned int N, bool isStrip) const;
73 
79  const std::vector<EFTrackingDataFormats::StripCluster> &ef_sc,
80  const std::vector<EFTrackingDataFormats::PixelCluster> &ef_pc,
81  const std::vector<EFTrackingDataFormats::SpacePoint> &ef_ssp,
82  const std::vector<std::vector<const xAOD::UncalibratedMeasurement *>>
83  &ssp_mes,
84  const std::vector<EFTrackingDataFormats::SpacePoint> &ef_psp,
85  const std::vector<std::vector<const xAOD::UncalibratedMeasurement *>>
86  &psp_mes,
87  const EventContext &ctx) const;
88 
95  const std::vector<EFTrackingDataFormats::StripCluster> &ef_sc,
96  const std::vector<EFTrackingDataFormats::PixelCluster> &ef_pc,
97  const std::vector<EFTrackingDataFormats::SpacePoint> &ef_ssp,
98  const std::vector<std::vector<const xAOD::UncalibratedMeasurement *>>
99  &ssp_mes,
100  const std::vector<EFTrackingDataFormats::SpacePoint> &ef_psp,
101  const std::vector<std::vector<const xAOD::UncalibratedMeasurement *>>
102  &psp_mes) const;
103 
113  const std::vector<EFTrackingDataFormats::StripCluster> &inputSC,
115  // PixelCluster
116  const std::vector<EFTrackingDataFormats::PixelCluster> &inputPC,
118  // Strip SpacePoint
119  const std::vector<EFTrackingDataFormats::SpacePoint> &inputSSP,
121  // Pixel SpacePoint
122  const std::vector<EFTrackingDataFormats::SpacePoint> &inputPSP,
124  // Metadata
126  const; // mimic the tranfser kernel
127 
128  private:
129  // At this stage of development we need
130  // xAOD::Strip/PixelCluster/SpacePointContainer as our input
132  this, "StripClusterContainerKey", "FPGAITkStripClusters",
133  "Key for Strip Cluster Containers"};
135  this, "PixelClusterContainerKey", "FPGAITkPixelClusters",
136  "Key for Pixel Cluster Containers"};
138  this, "StripSpacePointContainerKey", "FPGAITkStripSpacePoints",
139  "Key for Strip SpacePoint Containers"};
141  this, "PixelSpacePointContainerKey", "FPGAITkPixelSpacePoints",
142  "Key for Pixel SpacePoint Containers"};
143  Gaudi::Property<std::string> m_xclbin{
144  this, "xclbin", "",
145  "xclbin path and name"};
146  Gaudi::Property<std::string> m_kernelName{this, "KernelName", "",
147  "Kernel name"};
148  Gaudi::Property<bool> m_runSW{
149  this, "RunSW", true,
150  "Run software mode"};
151 
152  // Conver kernel outputs into xAOD containers
153  ToolHandle<xAODContainerMaker> m_xAODContainerMaker{
154  this, "xAODMaker", "xAODContainerMaker",
155  "tool to make cluster"};
156 };
157 
158 #endif // EFTRACKING_FPGA_INTEGRATION_DATAPREPARATIONPIPELINE_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
IntegrationBase
The base class for the EFTracking FPGA integration development.
Definition: IntegrationBase.h:38
DataPreparationPipeline::getInputSpacePointData
StatusCode getInputSpacePointData(const xAOD::SpacePointContainer *sp, std::vector< EFTrackingDataFormats::SpacePoint > &ef_sp, std::vector< std::vector< const xAOD::UncalibratedMeasurement * >> &sp_meas, long unsigned int N, bool isStrip) const
Convert the space point from xAOD container to simple std::vector of EFTrackingDataFormats::SpacePoin...
Definition: DataPreparationPipeline.cxx:281
DataPreparationPipeline::execute
StatusCode execute(const EventContext &ctx) const override final
Should be overriden by derived classes to perform meaningful work.
Definition: DataPreparationPipeline.cxx:50
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
IntegrationBase.h
The base class for EFTracking 2nd demonstrator integration.
SG::ReadHandleKey< xAOD::StripClusterContainer >
xAODContainerMaker.h
Tool for making xAOD container.
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
DataPreparationPipeline::m_stripClustersKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_stripClustersKey
Definition: DataPreparationPipeline.h:131
EFTrackingDataFormats::Metadata
The structure of the Metadata containing data after clusterization.
Definition: EFTrackingDataFormats.h:102
DataPreparationPipeline::m_pixelSpacePointsKey
SG::ReadHandleKey< xAOD::SpacePointContainer > m_pixelSpacePointsKey
Definition: DataPreparationPipeline.h:140
DataPreparationPipeline::m_pixelClustersKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_pixelClustersKey
Definition: DataPreparationPipeline.h:134
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EFTrackingDataFormats::PixelClusterOutput
The PixelClusters struct contains the output arrays from the FPGA.
Definition: EFTrackingDataFormats.h:136
PixelClusterContainer.h
EFTrackingDataFormats::StripClusterOutput
The StripClusters struct contains the output arrays from the FPGA.
Definition: EFTrackingDataFormats.h:121
DataPreparationPipeline::runHW
StatusCode runHW(const std::vector< EFTrackingDataFormats::StripCluster > &ef_sc, const std::vector< EFTrackingDataFormats::PixelCluster > &ef_pc, const std::vector< EFTrackingDataFormats::SpacePoint > &ef_ssp, const std::vector< std::vector< const xAOD::UncalibratedMeasurement * >> &ssp_mes, const std::vector< EFTrackingDataFormats::SpacePoint > &ef_psp, const std::vector< std::vector< const xAOD::UncalibratedMeasurement * >> &psp_mes) const
Run the hardware version of the transfer kernel.
Definition: DataPreparationPipeline.cxx:707
DataPreparationPipeline::m_xclbin
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.
Definition: DataPreparationPipeline.h:143
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DataPreparationPipeline::m_stripSpacePointsKey
SG::ReadHandleKey< xAOD::SpacePointContainer > m_stripSpacePointsKey
Definition: DataPreparationPipeline.h:137
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
DataPreparationPipeline::initialize
StatusCode initialize() override final
Detect the OpenCL devices and prepare OpenCL context.
Definition: DataPreparationPipeline.cxx:27
DataPreparationPipeline
This is the class for the data preparation pipeline.
Definition: DataPreparationPipeline.h:34
DataPreparationPipeline::m_kernelName
Gaudi::Property< std::string > m_kernelName
Kernel name.
Definition: DataPreparationPipeline.h:146
DataPreparationPipeline::transferSW
StatusCode transferSW(const std::vector< EFTrackingDataFormats::StripCluster > &inputSC, EFTrackingDataFormats::StripClusterOutput &outputSC, const std::vector< EFTrackingDataFormats::PixelCluster > &inputPC, EFTrackingDataFormats::PixelClusterOutput &outputPC, const std::vector< EFTrackingDataFormats::SpacePoint > &inputSSP, EFTrackingDataFormats::SpacePointOutput &outputSSP, const std::vector< EFTrackingDataFormats::SpacePoint > &inputPSP, EFTrackingDataFormats::SpacePointOutput &outputPSP, EFTrackingDataFormats::Metadata *metadata) const
Software version of the transfer kernel.
Definition: DataPreparationPipeline.cxx:1011
DataPreparationPipeline::m_runSW
Gaudi::Property< bool > m_runSW
Software mode, not running on the FPGA.
Definition: DataPreparationPipeline.h:148
DataPreparationPipeline::runSW
StatusCode runSW(const std::vector< EFTrackingDataFormats::StripCluster > &ef_sc, const std::vector< EFTrackingDataFormats::PixelCluster > &ef_pc, const std::vector< EFTrackingDataFormats::SpacePoint > &ef_ssp, const std::vector< std::vector< const xAOD::UncalibratedMeasurement * >> &ssp_mes, const std::vector< EFTrackingDataFormats::SpacePoint > &ef_psp, const std::vector< std::vector< const xAOD::UncalibratedMeasurement * >> &psp_mes, const EventContext &ctx) const
Run the software version of the transfer kernel.
Definition: DataPreparationPipeline.cxx:342
SpacePointContainer.h
StripClusterContainer.h
DataPreparationPipeline::getInputClusterData
StatusCode getInputClusterData(const xAOD::StripClusterContainer *sc, std::vector< EFTrackingDataFormats::StripCluster > &ef_sc, long unsigned int N) const
Convert the strip cluster from xAOD container to simple std::vector of EFTrackingDataFormats::StripCl...
Definition: DataPreparationPipeline.cxx:182
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:99
EFTrackingDataFormats::SpacePointOutput
The Pixel/Strip SpacePoints struct contains the output arrays from the FPGA.
Definition: EFTrackingDataFormats.h:166
DataPreparationPipeline::m_xAODContainerMaker
ToolHandle< xAODContainerMaker > m_xAODContainerMaker
Tool handle for xAODContainerMaker.
Definition: DataPreparationPipeline.h:153
EFTrackingDataFormats.h