ATLAS Offline Software
Loading...
Searching...
No Matches
GPUToAthenaImporterWithMoments.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_GPUTOATHENAIMPORTERWITHMOMENTS_H
10#define CALORECGPU_GPUTOATHENAIMPORTERWITHMOMENTS_H
11
13
19
23
25
26class CaloCell_ID;
27
35
37 public extends<AthAlgTool, ICaloClusterGPUOutputTransformer>, public CaloGPUTimed
38{
39 public:
40
41 GPUToAthenaImporterWithMoments(const std::string & type, const std::string & name, const IInterface * parent);
42
43 virtual StatusCode initialize() override;
44
45 virtual StatusCode convert (const EventContext & ctx, const CaloRecGPU::ConstantDataHolder & constant_data,
46 CaloRecGPU::EventDataHolder & event_data, xAOD::CaloClusterContainer * cluster_collection) const override;
47
48 virtual StatusCode finalize() override;
49
51
52 private:
53
58 Gaudi::Property<bool> m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"};
59
63 SG::ReadHandleKey<CaloCellContainer> m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"};
64
66 Gaudi::Property<std::string> m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"};
67
69
73 const CaloCell_ID * m_calo_id {nullptr};
74
78 SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this, "CaloDetDescrManager", "CaloDetDescrManager",
79 "SG Key for CaloDetDescrManager in the Condition Store"};
80
81 //Handles for things we can't (yet) do on the GPU.
82
86 Gaudi::Property<bool> m_fillHVMoments {this, "FillHVMoments", false, "Fill the HV-related moments using the respective tools."};
87
89 SG::ReadCondHandleKey<LArOnOffIdMapping> m_HVCablingKey{this, "LArCablingKey","LArOnOffIdMap","SG Key of LAr Cabling object"};
90
92 SG::ReadCondHandleKey<ILArHVScaleCorr> m_HVScaleKey{this,"HVScaleCorrKey","LArHVScaleCorr","SG key of HVScaleCorr conditions object"};
93
95 Gaudi::Property<float> m_HVthreshold{this,"HVThreshold",0.2,"Threshold to consider a cell 'affected' by HV issues"};
96
99 Gaudi::Property<std::vector<int>> m_missingCellsToFill {this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."};
100
104 Gaudi::Property<bool> m_saveUncalibrated {this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"};
105
107 ToolHandle<AthCUDA::IStreamTool> m_streamTool {this, "StreamTool", "", "CUDA stream tool."};
108
109
116 Gaudi::Property<std::vector<std::string>> m_momentsNames{this, "MomentsNames", {}, "List of names of moments to calculate"};
117
122
123
126
127};
128
129#endif //CALORECGPU_GPUTOATHENAIMPORTERWITHMOMENTS_H
Definition of CaloDetDescrManager.
Property holding a SG store/key/clid from which a ReadHandle is made.
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
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
Gaudi::Property< std::string > m_clusterSizeString
Cluster size. Should be set accordingly to the threshold.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Key for the CaloDetDescrManager in the Condition Store.
const CaloCell_ID * m_calo_id
Pointer to Calo ID Helper.
GPUToAthenaImporterWithMoments(const std::string &type, const std::string &name, const IInterface *parent)
xAOD::CaloCluster::ClusterSize m_clusterSize
virtual StatusCode convert(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, xAOD::CaloClusterContainer *cluster_collection) const override
Gaudi::Property< bool > m_keepGPUData
If true, do not delete the GPU data representation.
Gaudi::Property< float > m_HVthreshold
Threshold above which a cell contributes to the HV moments.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_HVCablingKey
Cabling for the CPU-based HV moments calculation.
SG::ReadCondHandleKey< ILArHVScaleCorr > m_HVScaleKey
HV corrections for the CPU-based HV moments.
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Tool providing the CUDA stream to use.
Gaudi::Property< bool > m_saveUncalibrated
if set to true, the uncalibrated state is saved when importing the clusters.
bool m_doHVMoments
To abbreviate checks of m_momentsToDo...
Gaudi::Property< bool > m_fillHVMoments
if set to true, fill the HV-related moments using the respective tools.
Gaudi::Property< std::vector< std::string > > m_momentsNames
vector holding the input list of names of moments to calculate.
CaloRecGPU::MomentsOptionsArray m_momentsToDo
Holds (in a linearized way) the moments and whether to add them to the clusters.
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 ~GPUToAthenaImporterWithMoments()=default
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.
Holds an array of bools to represent the different moments that may be calculated and transferred to/...
Definition DataHolders.h:50