ATLAS Offline Software
Loading...
Searching...
No Matches
GPUClusterInfoAndMomentsCalculator.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#ifndef CALORECGPU_GPUCLUSTERINFOANDMOMENTSCALCULATOR_H
8#define CALORECGPU_GPUCLUSTERINFOANDMOMENTSCALCULATOR_H
9
11
16
18
20
21#include "GaudiKernel/ServiceHandle.h"
22
24
25#include "CLHEP/Units/SystemOfUnits.h"
26
33
34
36 public extends<AthAlgTool, CaloClusterGPUProcessor>, public CaloGPUTimed, public CaloGPUCUDAInitialization
37{
38 public:
39
40 GPUClusterInfoAndMomentsCalculator(const std::string & type, const std::string & name, const IInterface * parent);
41
42 virtual StatusCode initialize() override
43 {
45 }
46
47 virtual StatusCode initialize_non_CUDA() override;
48
49 virtual StatusCode initialize_CUDA() override;
50
51 virtual StatusCode execute (const EventContext & ctx,
52 const CaloRecGPU::ConstantDataHolder & constant_data,
53 CaloRecGPU::EventDataHolder & event_data,
54 void * temporary_buffer) const override;
55
56 virtual StatusCode finalize() override;
57
59
60 private:
61
62
65 Gaudi::Property<double> m_maxAxisAngle {this, "MaxAxisAngle", 20 * CLHEP::deg, "The maximal allowed deviation from the IP-to-ClusterCenter-axis"};
66
73 Gaudi::Property<double> m_minRLateral {this, "MinRLateral", 4 * CLHEP::cm, "The minimal r in the definition of the Lateral moment"};
74
83 Gaudi::Property<double> m_minLLongitudinal {this, "MinLLongitudinal", 10 * CLHEP::cm, "The minimal lambda in the definition of the Longitudinal moment"};
84
91 Gaudi::Property<double> m_minBadLArQuality {this, "MinBadLArQuality", 4000, "The minimal cell quality in the LAr for declaring a cell bad"};
92
96 Gaudi::Property<bool> m_absOpt {this, "WeightingOfNegClusters", false, "If set to true use abs E value of cells to calculate cluster moments"};
97
100 Gaudi::Property<double> m_etaInnerWheel {this, "EMECAbsEtaWheelTransition", 2.52, "Transition from outer to inner wheel in EME2"};
101
105 Gaudi::Property<bool> m_twoGaussianNoise {this, "TwoGaussianNoise", false, "If set to true use 2-gaussian noise description for TileCal"};
106
110 Gaudi::Property<bool> m_skipInvalidClusters {this, "SkipInvalidClusters", true, "Check for and skip invalid clusters during moments calculation."};
111
115
117 ServiceHandle<IGPUKernelSizeOptimizerSvc> m_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." };
118
120 ToolHandle<AthCUDA::IStreamTool> m_streamTool {this, "StreamTool", "", "CUDA stream tool."};
121};
122
123#endif //CALORECGPU_TOPOAUTOMATONCLUSTERING_H
Define macros for attributes used to control the static checker.
Base class to provide some basic common infrastructure for initializing CUDA only at the right place ...
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
Gaudi::Property< double > m_etaInnerWheel
Transition from outer to inner wheel in EME2.
Gaudi::Property< double > m_minBadLArQuality
the minimal cell quality in the LAr for declaring a cell bad
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Tool providing the CUDA stream to use.
Gaudi::Property< double > m_maxAxisAngle
the maximal allowed deviation from the IP-to-ClusterCenter-axis.
ClusterMomentsCalculator::CMCOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
Gaudi::Property< double > m_minRLateral
the minimal in the definition of the Lateral moment
GPUClusterInfoAndMomentsCalculator(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< double > m_minLLongitudinal
the minimal in the definition of the Longitudinal moment
Gaudi::Property< bool > m_absOpt
if set to true use abs E value of cells to calculate cluster moments
Gaudi::Property< bool > m_twoGaussianNoise
if set to true use 2-gaussian noise description for TileCal
virtual StatusCode initialize_CUDA() override
Initialization that invokes CUDA functions.
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Gaudi::Property< bool > m_skipInvalidClusters
If false, do the moment calculation even for invalid clusters (which may waste computation).
virtual StatusCode execute(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, void *temporary_buffer) const override
virtual StatusCode initialize_non_CUDA() override
Initialization that does not invoke CUDA functions.
virtual ~GPUClusterInfoAndMomentsCalculator()=default