ATLAS Offline Software
GPUClusterInfoAndMomentsCalculator.cxx
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 
9 
10 
11 using namespace CaloRecGPU;
12 using namespace ClusterMomentsCalculator;
13 
14 GPUClusterInfoAndMomentsCalculator::GPUClusterInfoAndMomentsCalculator(const std::string & type, const std::string & name, const IInterface * parent):
16 {
17  declareInterface<CaloClusterGPUProcessor> (this);
18 }
19 
21 {
23 
24  m_options.m_options->use_abs_energy = m_absOpt;
25  m_options.m_options->use_two_gaussian_noise = m_twoGaussianNoise;
26  m_options.m_options->skip_invalid_clusters = m_skipInvalidClusters;
27  m_options.m_options->min_LAr_quality = m_minBadLArQuality;
28  m_options.m_options->max_axis_angle = m_maxAxisAngle;
29  m_options.m_options->eta_inner_wheel = m_etaInnerWheel;
30  m_options.m_options->min_l_longitudinal = m_minLLongitudinal;
31  m_options.m_options->min_r_lateral = m_minRLateral;
32 
33 
34  ATH_CHECK( m_kernelSizeOptimizer.retrieve() );
35 
36  return StatusCode::SUCCESS;
37 }
38 
40 {
43 
44  return StatusCode::SUCCESS;
45 }
46 
47 StatusCode GPUClusterInfoAndMomentsCalculator::execute(const EventContext & /*ctx*/, const ConstantDataHolder & constant_data,
48  EventDataHolder & event_data, void * /*temporary_buffer*/) const
49 {
51  return StatusCode::SUCCESS;
52 
53 }
54 
56 {
57  return StatusCode::SUCCESS;
58 }
59 
GPUClusterInfoAndMomentsCalculator::m_skipInvalidClusters
Gaudi::Property< bool > m_skipInvalidClusters
If false, do the moment calculation even for invalid clusters (which may waste computation).
Definition: GPUClusterInfoAndMomentsCalculator.h:107
GPUClusterInfoAndMomentsCalculator.h
GPUClusterInfoAndMomentsCalculator::m_measureTimes
Gaudi::Property< bool > m_measureTimes
If true, synchronize the kernel calls to ensure accurate per-step/per-tool time measurements.
Definition: GPUClusterInfoAndMomentsCalculator.h:117
GPUClusterInfoAndMomentsCalculator::initialize_non_CUDA
virtual StatusCode initialize_non_CUDA() override
Initialization that does not invoke CUDA functions.
Definition: GPUClusterInfoAndMomentsCalculator.cxx:20
GPUClusterInfoAndMomentsCalculator::finalize
virtual StatusCode finalize() override
Definition: GPUClusterInfoAndMomentsCalculator.cxx:55
GPUClusterInfoAndMomentsCalculator::m_options
ClusterMomentsCalculator::CMCOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
Definition: GPUClusterInfoAndMomentsCalculator.h:111
ClusterMomentsCalculator::CMCOptionsHolder::sendToGPU
void sendToGPU(const bool clear_CPU=false)
ClusterMomentsCalculator
Definition: GPUClusterInfoAndMomentsCalculatorImpl.h:19
GPUClusterInfoAndMomentsCalculator::GPUClusterInfoAndMomentsCalculator
GPUClusterInfoAndMomentsCalculator(const std::string &type, const std::string &name, const IInterface *parent)
Definition: GPUClusterInfoAndMomentsCalculator.cxx:14
ClusterMomentsCalculator::CMCOptionsHolder::allocate
void allocate()
Definition: GPUClusterInfoAndMomentsCalculatorImpl.h:323
CaloRecGPU::EventDataHolder
Definition: DataHolders.h:35
GPUClusterInfoAndMomentsCalculator::initialize_CUDA
virtual StatusCode initialize_CUDA() override
Initialization that invokes CUDA functions.
Definition: GPUClusterInfoAndMomentsCalculator.cxx:39
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GPUClusterInfoAndMomentsCalculator::m_twoGaussianNoise
Gaudi::Property< bool > m_twoGaussianNoise
if set to true use 2-gaussian noise description for TileCal
Definition: GPUClusterInfoAndMomentsCalculator.h:102
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
GPUClusterInfoAndMomentsCalculatorImpl.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
GPUClusterInfoAndMomentsCalculator::m_maxAxisAngle
Gaudi::Property< double > m_maxAxisAngle
the maximal allowed deviation from the IP-to-ClusterCenter-axis.
Definition: GPUClusterInfoAndMomentsCalculator.h:62
GPUClusterInfoAndMomentsCalculator::m_minBadLArQuality
Gaudi::Property< double > m_minBadLArQuality
the minimal cell quality in the LAr for declaring a cell bad
Definition: GPUClusterInfoAndMomentsCalculator.h:88
GPUClusterInfoAndMomentsCalculator::m_kernelSizeOptimizer
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Definition: GPUClusterInfoAndMomentsCalculator.h:120
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GPUClusterInfoAndMomentsCalculator::m_absOpt
Gaudi::Property< bool > m_absOpt
if set to true use abs E value of cells to calculate cluster moments
Definition: GPUClusterInfoAndMomentsCalculator.h:93
BasicClusterInfoCalculator::register_kernels
void register_kernels(IGPUKernelSizeOptimizer &optimizer)
CaloRecGPU::ConstantDataHolder
Definition: DataHolders.h:19
GPUClusterInfoAndMomentsCalculator::m_minLLongitudinal
Gaudi::Property< double > m_minLLongitudinal
the minimal in the definition of the Longitudinal moment
Definition: GPUClusterInfoAndMomentsCalculator.h:80
GPUClusterInfoAndMomentsCalculator::m_minRLateral
Gaudi::Property< double > m_minRLateral
the minimal in the definition of the Lateral moment
Definition: GPUClusterInfoAndMomentsCalculator.h:70
AthAlgTool
Definition: AthAlgTool.h:26
CaloRecGPU
Definition: BaseDefinitions.h:11
GPUClusterInfoAndMomentsCalculator::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: GPUClusterInfoAndMomentsCalculator.cxx:47
ClusterMomentsCalculator::CMCOptionsHolder::m_options
CaloRecGPU::Helpers::CPU_object< ClusterMomentCalculationOptions > m_options
Definition: GPUClusterInfoAndMomentsCalculatorImpl.h:319
GPUClusterInfoAndMomentsCalculator::m_etaInnerWheel
Gaudi::Property< double > m_etaInnerWheel
Transition from outer to inner wheel in EME2.
Definition: GPUClusterInfoAndMomentsCalculator.h:97
ClusterMomentsCalculator::calculateClusterPropertiesAndMoments
void calculateClusterPropertiesAndMoments(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const CMCOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream={}, const bool defer_instead_of_oversize=false)