ATLAS Offline Software
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 
19 #include "GaudiKernel/ServiceHandle.h"
20 
22 
23 #include "CLHEP/Units/SystemOfUnits.h"
24 
34  public extends<AthAlgTool, CaloClusterGPUProcessor>, public CaloGPUTimed, public CaloGPUCUDAInitialization
35 {
36  public:
37 
38  GPUClusterInfoAndMomentsCalculator(const std::string & type, const std::string & name, const IInterface * parent);
39 
40  virtual StatusCode initialize() override
41  {
43  }
44 
45  virtual StatusCode initialize_non_CUDA() override;
46 
47  virtual StatusCode initialize_CUDA() override;
48 
49  virtual StatusCode execute (const EventContext & ctx,
50  const CaloRecGPU::ConstantDataHolder & constant_data,
51  CaloRecGPU::EventDataHolder & event_data,
52  void * temporary_buffer) const override;
53 
54  virtual StatusCode finalize() override;
55 
57 
58  private:
59 
60 
63  Gaudi::Property<double> m_maxAxisAngle {this, "MaxAxisAngle", 20 * CLHEP::deg, "The maximal allowed deviation from the IP-to-ClusterCenter-axis"};
64 
71  Gaudi::Property<double> m_minRLateral {this, "MinRLateral", 4 * CLHEP::cm, "The minimal r in the definition of the Lateral moment"};
72 
81  Gaudi::Property<double> m_minLLongitudinal {this, "MinLLongitudinal", 10 * CLHEP::cm, "The minimal lambda in the definition of the Longitudinal moment"};
82 
89  Gaudi::Property<double> m_minBadLArQuality {this, "MinBadLArQuality", 4000, "The minimal cell quality in the LAr for declaring a cell bad"};
90 
94  Gaudi::Property<bool> m_absOpt {this, "WeightingOfNegClusters", false, "If set to true use abs E value of cells to calculate cluster moments"};
95 
98  Gaudi::Property<double> m_etaInnerWheel {this, "EMECAbsEtaWheelTransition", 2.52, "Transition from outer to inner wheel in EME2"};
99 
103  Gaudi::Property<bool> m_twoGaussianNoise {this, "TwoGaussianNoise", false, "If set to true use 2-gaussian noise description for TileCal"};
104 
108  Gaudi::Property<bool> m_skipInvalidClusters {this, "SkipInvalidClusters", true, "Check for and skip invalid clusters during moments calculation."};
109 
113 
115  ServiceHandle<IGPUKernelSizeOptimizerSvc> m_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." };
116 };
117 
118 #endif //CALORECGPU_TOPOAUTOMATONCLUSTERING_H
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:108
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:74
deg
#define deg
Definition: SbPolyhedron.cxx:17
GPUClusterInfoAndMomentsCalculator::m_options
ClusterMomentsCalculator::CMCOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
Definition: GPUClusterInfoAndMomentsCalculator.h:112
GPUClusterInfoAndMomentsCalculator::~GPUClusterInfoAndMomentsCalculator
virtual ~GPUClusterInfoAndMomentsCalculator()=default
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
CaloGPUTimed
Base class to provide some basic common infrastructure for timing measurements...
Definition: CaloGPUTimed.h:25
GPUClusterInfoAndMomentsCalculator::GPUClusterInfoAndMomentsCalculator
GPUClusterInfoAndMomentsCalculator(const std::string &type, const std::string &name, const IInterface *parent)
Definition: GPUClusterInfoAndMomentsCalculator.cxx:14
CaloGPUCUDAInitialization::initialize
virtual StatusCode initialize()
Definition: CaloGPUCUDAInitialization.h:44
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
IGPUKernelSizeOptimizerSvc.h
CaloRecGPU::EventDataHolder
Definition: DataHolders.h:35
CaloClusterGPUProcessor.h
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:103
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
GPUClusterInfoAndMomentsCalculatorImpl.h
CaloGPUCUDAInitialization
Base class to provide some basic common infrastructure for initializing CUDA only at the right place ...
Definition: CaloGPUCUDAInitialization.h:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
GPUClusterInfoAndMomentsCalculator::m_maxAxisAngle
Gaudi::Property< double > m_maxAxisAngle
the maximal allowed deviation from the IP-to-ClusterCenter-axis.
Definition: GPUClusterInfoAndMomentsCalculator.h:63
GPUClusterInfoAndMomentsCalculator::m_minBadLArQuality
Gaudi::Property< double > m_minBadLArQuality
the minimal cell quality in the LAr for declaring a cell bad
Definition: GPUClusterInfoAndMomentsCalculator.h:89
GPUClusterInfoAndMomentsCalculator::m_kernelSizeOptimizer
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Definition: GPUClusterInfoAndMomentsCalculator.h:115
GPUClusterInfoAndMomentsCalculator::initialize
virtual StatusCode initialize() override
Definition: GPUClusterInfoAndMomentsCalculator.h:40
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:94
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:81
GPUClusterInfoAndMomentsCalculator::m_minRLateral
Gaudi::Property< double > m_minRLateral
the minimal in the definition of the Lateral moment
Definition: GPUClusterInfoAndMomentsCalculator.h:71
CaloGPUTimed.h
GPUClusterInfoAndMomentsCalculator
Standard tool to calculate cluster info (energy, transverse energy, pseudo-rapidity and azimuthal ang...
Definition: GPUClusterInfoAndMomentsCalculator.h:35
checker_macros.h
Define macros for attributes used to control the static checker.
GPUClusterInfoAndMomentsCalculator::execute
virtual StatusCode execute(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, void *temporary_buffer) const override
Definition: GPUClusterInfoAndMomentsCalculator.cxx:47
CaloGPUCUDAInitialization.h
GPUClusterInfoAndMomentsCalculator::m_etaInnerWheel
Gaudi::Property< double > m_etaInnerWheel
Transition from outer to inner wheel in EME2.
Definition: GPUClusterInfoAndMomentsCalculator.h:98
ClusterMomentsCalculator::CMCOptionsHolder
Definition: GPUClusterInfoAndMomentsCalculatorImpl.h:786
ServiceHandle< IGPUKernelSizeOptimizerSvc >