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
24class CaloCell_ID;
25
33
35 public extends<AthAlgTool, ICaloClusterGPUOutputTransformer>, public CaloGPUTimed
36{
37 public:
38
39 GPUToAthenaImporterWithMoments(const std::string & type, const std::string & name, const IInterface * parent);
40
41 virtual StatusCode initialize() override;
42
43 virtual StatusCode convert (const EventContext & ctx, const CaloRecGPU::ConstantDataHolder & constant_data,
44 CaloRecGPU::EventDataHolder & event_data, xAOD::CaloClusterContainer * cluster_collection) const override;
45
46 virtual StatusCode finalize() override;
47
49
50 private:
51
56 Gaudi::Property<bool> m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"};
57
61 SG::ReadHandleKey<CaloCellContainer> m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"};
62
64 Gaudi::Property<std::string> m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"};
65
67
71 const CaloCell_ID * m_calo_id {nullptr};
72
76 SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this, "CaloDetDescrManager", "CaloDetDescrManager",
77 "SG Key for CaloDetDescrManager in the Condition Store"};
78
79 //Handles for things we can't (yet) do on the GPU.
80
84 Gaudi::Property<bool> m_fillHVMoments {this, "FillHVMoments", false, "Fill the HV-related moments using the respective tools."};
85
87 SG::ReadCondHandleKey<LArOnOffIdMapping> m_HVCablingKey{this, "LArCablingKey","LArOnOffIdMap","SG Key of LAr Cabling object"};
88
90 SG::ReadCondHandleKey<ILArHVScaleCorr> m_HVScaleKey{this,"HVScaleCorrKey","LArHVScaleCorr","SG key of HVScaleCorr conditions object"};
91
93 Gaudi::Property<float> m_HVthreshold{this,"HVThreshold",0.2,"Threshold to consider a cell 'affected' by HV issues"};
94
97 Gaudi::Property<std::vector<int>> m_missingCellsToFill {this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."};
98
102 Gaudi::Property<bool> m_saveUncalibrated {this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"};
103
104
111 Gaudi::Property<std::vector<std::string>> m_momentsNames{this, "MomentsNames", {}, "List of names of moments to calculate"};
112
117
118
121
122};
123
124#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.
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