ATLAS Offline Software
BasicGPUClusterInfoCalculator.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 
8 #ifndef CALORECGPU_BASICGPUCLUSTERINFOCALCULATOR_H
9 #define CALORECGPU_BASICGPUCLUSTERINFOCALCULATOR_H
10 
12 
18 
19 #include "GaudiKernel/ServiceHandle.h"
20 
22 
23 #include "CLHEP/Units/SystemOfUnits.h"
24 
35  public AthAlgTool, virtual public CaloClusterGPUProcessor, public CaloGPUTimed, public CaloGPUCUDAInitialization
36 {
37  public:
38 
39  BasicGPUClusterInfoCalculator(const std::string & type, const std::string & name, const IInterface * parent);
40 
41  virtual StatusCode initialize() override
42  {
44  }
45 
46  virtual StatusCode initialize_non_CUDA() override;
47 
48  virtual StatusCode initialize_CUDA() override;
49 
50  virtual StatusCode execute (const EventContext & ctx,
51  const CaloRecGPU::ConstantDataHolder & constant_data,
52  CaloRecGPU::EventDataHolder & event_data,
53  void * temporary_buffer) const override;
54 
55  virtual StatusCode finalize() override;
56 
57  virtual ~BasicGPUClusterInfoCalculator() = default;
58 
59  virtual size_t size_of_temporaries() const override
60  {
62  {
64  }
65  else
66  {
67  return 0;
68  }
69  };
70 
71  private:
72 
78  Gaudi::Property<bool> m_preserveClusterMoments {this, "PreserveClusterMoments", false, "Do not use cluster moments array as temporary storage"};
79 
84  Gaudi::Property<bool> m_cutClustersInAbsE {this, "ClusterCutsInAbsEt", true, "Do cluster cuts in Abs Et instead of Et"};
85 
93  Gaudi::Property<float> m_clusterETThreshold {this, "ClusterEtorAbsEtCut", 0.*CLHEP::MeV, "Cluster E_t or Abs E_t cut"};
94 
96  ServiceHandle<IGPUKernelSizeOptimizerSvc> m_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." };
97 
98 };
99 
100 #endif //CALORECGPU_TOPOAUTOMATONCLUSTERING_H
BasicGPUClusterInfoCalculator::m_kernelSizeOptimizer
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Definition: BasicGPUClusterInfoCalculator.h:96
BasicGPUClusterInfoCalculator::m_clusterETThreshold
Gaudi::Property< float > m_clusterETThreshold
cut on the clusters.
Definition: BasicGPUClusterInfoCalculator.h:93
python.SystemOfUnits.MeV
int MeV
Definition: SystemOfUnits.py:154
BasicClusterInfoCalculator::ClusterInfoCalculatorTemporaries
Definition: BasicGPUClusterInfoCalculatorImpl.h:19
CaloClusterGPUProcessor
Base class for GPU-accelerated cluster processing tools to be called from CaloGPUHybridClusterProcess...
Definition: CaloClusterGPUProcessor.h:27
BasicGPUClusterInfoCalculator::BasicGPUClusterInfoCalculator
BasicGPUClusterInfoCalculator(const std::string &type, const std::string &name, const IInterface *parent)
Definition: BasicGPUClusterInfoCalculator.cxx:16
BasicGPUClusterInfoCalculator::~BasicGPUClusterInfoCalculator
virtual ~BasicGPUClusterInfoCalculator()=default
BasicGPUClusterInfoCalculator::initialize_non_CUDA
virtual StatusCode initialize_non_CUDA() override
Initialization that does not invoke CUDA functions.
Definition: BasicGPUClusterInfoCalculator.cxx:23
CaloGPUTimed
Base class to provide some basic common infrastructure for timing measurements...
Definition: CaloGPUTimed.h:25
CaloGPUCUDAInitialization::initialize
virtual StatusCode initialize()
Definition: CaloGPUCUDAInitialization.h:44
IGPUKernelSizeOptimizerSvc.h
CaloRecGPU::EventDataHolder
Definition: DataHolders.h:35
CaloClusterGPUProcessor.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
BasicGPUClusterInfoCalculator::execute
virtual StatusCode execute(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, void *temporary_buffer) const override
Process the clusters on GPU.
Definition: BasicGPUClusterInfoCalculator.cxx:35
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloGPUCUDAInitialization
Base class to provide some basic common infrastructure for initializing CUDA only at the right place ...
Definition: CaloGPUCUDAInitialization.h:28
BasicGPUClusterInfoCalculator::initialize_CUDA
virtual StatusCode initialize_CUDA() override
Initialization that invokes CUDA functions.
Definition: BasicGPUClusterInfoCalculator.cxx:29
BasicGPUClusterInfoCalculator
Standard tool to calculate cluster info (energy, transverse energy, pseudo-rapidity and azimuthal ang...
Definition: BasicGPUClusterInfoCalculator.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
BasicGPUClusterInfoCalculator::size_of_temporaries
virtual size_t size_of_temporaries() const override
The size (in bytes) of the temporary object(s) that the algorithm will use.
Definition: BasicGPUClusterInfoCalculator.h:59
BasicGPUClusterInfoCalculator::finalize
virtual StatusCode finalize() override
Definition: BasicGPUClusterInfoCalculator.cxx:76
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloRecGPU::ConstantDataHolder
Definition: DataHolders.h:19
BasicGPUClusterInfoCalculatorImpl.h
CaloGPUTimed.h
AthAlgTool
Definition: AthAlgTool.h:26
BasicGPUClusterInfoCalculator::initialize
virtual StatusCode initialize() override
Definition: BasicGPUClusterInfoCalculator.h:41
checker_macros.h
Define macros for attributes used to control the static checker.
CaloGPUCUDAInitialization.h
BasicGPUClusterInfoCalculator::m_cutClustersInAbsE
Gaudi::Property< bool > m_cutClustersInAbsE
if set to true cluster cuts are on , if false on .
Definition: BasicGPUClusterInfoCalculator.h:84
BasicGPUClusterInfoCalculator::m_preserveClusterMoments
Gaudi::Property< bool > m_preserveClusterMoments
If set to true, allocates a temporary array to store some temporary intermediate results instead of u...
Definition: BasicGPUClusterInfoCalculator.h:78
ServiceHandle< IGPUKernelSizeOptimizerSvc >