ATLAS Offline Software
BasicGPUToAthenaImporter.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2002-2023 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 
18 class CaloCell_ID;
19 
30  public AthAlgTool, virtual public ICaloClusterGPUOutputTransformer, public CaloGPUTimed
31 {
32  public:
33 
34  BasicGPUToAthenaImporter(const std::string & type, const std::string & name, const IInterface * parent);
35 
36  virtual StatusCode initialize() override;
37 
38  virtual StatusCode convert (const EventContext & ctx, const CaloRecGPU::ConstantDataHolder & constant_data,
39  CaloRecGPU::EventDataHolder & event_data, xAOD::CaloClusterContainer * cluster_collection) const override;
40 
41  virtual StatusCode finalize() override;
42 
43  virtual ~BasicGPUToAthenaImporter() = default;
44 
45  private:
46 
51  Gaudi::Property<bool> m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"};
52 
57  Gaudi::Property<bool> m_useCPUPropertiesCalculation {this, "UseCPUClusterPropertiesCalculation", false, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"};
58 
62  SG::ReadHandleKey<CaloCellContainer> m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"};
63 
65  Gaudi::Property<std::string> m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"};
66 
68 
71  Gaudi::Property<std::vector<int>> m_missingCellsToFill {this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."};
72 
76  const CaloCell_ID * m_calo_id {nullptr};
77 
81  Gaudi::Property<bool> m_saveUncalibrated {this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"};
82 
83 };
84 
85 #endif //CALORECGPU_BASICGPUTOATHENAIMPORTER_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
xAOD::CaloCluster_v1::ClusterSize
ClusterSize
Enumeration to identify different cluster sizes.
Definition: CaloCluster_v1.h:86
BasicGPUToAthenaImporter::m_clusterSizeString
Gaudi::Property< std::string > m_clusterSizeString
Cluster size. Should be set accordingly to the threshold.
Definition: BasicGPUToAthenaImporter.h:65
BasicGPUToAthenaImporter::convert
virtual StatusCode convert(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, xAOD::CaloClusterContainer *cluster_collection) const override
Fill the @xAODCaloClusterContainer with the relevant information.
Definition: BasicGPUToAthenaImporter.cxx:92
SG::ReadHandleKey< CaloCellContainer >
BasicGPUToAthenaImporter::m_keepGPUData
Gaudi::Property< bool > m_keepGPUData
If true, do not delete the GPU data representation.
Definition: BasicGPUToAthenaImporter.h:51
CaloGPUTimed
Base class to provide some basic common infrastructure for timing measurements...
Definition: CaloGPUTimed.h:25
BasicGPUToAthenaImporter::m_clusterSize
xAOD::CaloCluster::ClusterSize m_clusterSize
Definition: BasicGPUToAthenaImporter.h:67
BasicGPUToAthenaImporter::m_cellsKey
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
Definition: BasicGPUToAthenaImporter.h:62
CaloRecGPU::EventDataHolder
Definition: DataHolders.h:35
BasicGPUToAthenaImporter::m_missingCellsToFill
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).
Definition: BasicGPUToAthenaImporter.h:71
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
BasicGPUToAthenaImporter::BasicGPUToAthenaImporter
BasicGPUToAthenaImporter(const std::string &type, const std::string &name, const IInterface *parent)
Definition: BasicGPUToAthenaImporter.cxx:25
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
BasicGPUToAthenaImporter
Standard tool to convert the GPU data representation back to CPU.
Definition: BasicGPUToAthenaImporter.h:31
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
BasicGPUToAthenaImporter::m_useCPUPropertiesCalculation
Gaudi::Property< bool > m_useCPUPropertiesCalculation
if set to true, cluster properties are (re-)calculated using CaloClusterKineHelper::calculateKine.
Definition: BasicGPUToAthenaImporter.h:57
BasicGPUToAthenaImporter::finalize
virtual StatusCode finalize() override
Definition: BasicGPUToAthenaImporter.cxx:327
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CaloClusterGPUTransformers.h
BasicGPUToAthenaImporter::m_calo_id
const CaloCell_ID * m_calo_id
Pointer to Calo ID Helper.
Definition: BasicGPUToAthenaImporter.h:76
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ICaloClusterGPUOutputTransformer
Base class for tools that convert event information from the GPU-friendly format used in CaloGPUHybri...
Definition: CaloClusterGPUTransformers.h:94
BasicGPUToAthenaImporter::initialize
virtual StatusCode initialize() override
Definition: BasicGPUToAthenaImporter.cxx:35
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
BasicGPUToAthenaImporter::~BasicGPUToAthenaImporter
virtual ~BasicGPUToAthenaImporter()=default
CaloRecGPU::ConstantDataHolder
Definition: DataHolders.h:19
CaloGPUTimed.h
AthAlgTool
Definition: AthAlgTool.h:26
BasicGPUToAthenaImporter::m_saveUncalibrated
Gaudi::Property< bool > m_saveUncalibrated
if set to true, the uncalibrated state is saved when importing the clusters.
Definition: BasicGPUToAthenaImporter.h:81