ATLAS Offline Software
Loading...
Searching...
No Matches
BasicGPUToAthenaImporter.h
Go to the documentation of this file.
1//
2// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3//
4// Dear emacs, this is -*- c++ -*-
5//
6
7//Dear emacs, this is -*-c++-*-
8
9#ifndef CALORECGPU_BASICGPUTOATHENAIMPORTER_H
10#define CALORECGPU_BASICGPUTOATHENAIMPORTER_H
11
13
17
19
20class CaloCell_ID;
21
30
32 public extends<AthAlgTool, ICaloClusterGPUOutputTransformer>, public CaloGPUTimed
33{
34 public:
35
36 BasicGPUToAthenaImporter(const std::string & type, const std::string & name, const IInterface * parent);
37
38 virtual StatusCode initialize() override;
39
40 virtual StatusCode convert (const EventContext & ctx, const CaloRecGPU::ConstantDataHolder & constant_data,
41 CaloRecGPU::EventDataHolder & event_data, xAOD::CaloClusterContainer * cluster_collection) const override;
42
43 virtual StatusCode finalize() override;
44
45 virtual ~BasicGPUToAthenaImporter() = default;
46
47 private:
48
53 Gaudi::Property<bool> m_useCPUPropertiesCalculation {this, "UseCPUClusterPropertiesCalculation", false, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"};
54
58 SG::ReadHandleKey<CaloCellContainer> m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"};
59
61 Gaudi::Property<std::string> m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"};
62
64
67 Gaudi::Property<std::vector<int>> m_missingCellsToFill {this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."};
68
72 const CaloCell_ID * m_calo_id {nullptr};
73
77 Gaudi::Property<bool> m_saveUncalibrated {this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"};
78
80 ToolHandle<AthCUDA::IStreamTool> m_streamTool {this, "StreamTool", "", "CUDA stream tool."};
81
82};
83
84#endif //CALORECGPU_BASICGPUTOATHENAIMPORTER_H
Property holding a SG store/key/clid from which a ReadHandle is made.
const CaloCell_ID * m_calo_id
Pointer to Calo ID Helper.
Gaudi::Property< bool > m_useCPUPropertiesCalculation
if set to true, cluster properties are (re-)calculated using CaloClusterKineHelper::calculateKine.
xAOD::CaloCluster::ClusterSize m_clusterSize
BasicGPUToAthenaImporter(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize() override
virtual StatusCode finalize() override
Gaudi::Property< std::string > m_clusterSizeString
Cluster size. Should be set accordingly to the threshold.
virtual StatusCode convert(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, xAOD::CaloClusterContainer *cluster_collection) const override
Gaudi::Property< std::vector< int > > m_missingCellsToFill
Cell indices to fill as disabled cells (useful if the cell vector is always missing the same cells).
virtual ~BasicGPUToAthenaImporter()=default
Gaudi::Property< bool > m_saveUncalibrated
if set to true, the uncalibrated state is saved when importing the clusters.
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Tool providing the CUDA stream to use.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
CaloGPUTimed(T *ptr)
Holds CPU and GPU versions of the geometry and cell noise information, which are assumed to be consta...
Definition DataHolders.h:27
Holds the mutable per-event information (clusters and cells) and provides utilities to convert betwee...
Definition DataHolders.h:73
Property holding a SG store/key/clid from which a ReadHandle is made.
ClusterSize
Enumeration to identify different cluster sizes.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.