Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
GPUClusterInfoAndMomentsCalculator Class Reference

Standard tool to calculate cluster info (energy, transverse energy, pseudo-rapidity and azimuthal angle). More...

#include <GPUClusterInfoAndMomentsCalculator.h>

Inheritance diagram for GPUClusterInfoAndMomentsCalculator:
Collaboration diagram for GPUClusterInfoAndMomentsCalculator:

Public Member Functions

 GPUClusterInfoAndMomentsCalculator (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override
 
virtual StatusCode initialize_non_CUDA () override
 Initialization that does not invoke CUDA functions. More...
 
virtual StatusCode initialize_CUDA () override
 Initialization that invokes CUDA functions. More...
 
virtual StatusCode execute (const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, void *temporary_buffer) const override
 
virtual StatusCode finalize () override
 
virtual ~GPUClusterInfoAndMomentsCalculator ()=default
 
void handle (const Incident &incident) override
 

Private Attributes

Gaudi::Property< double > m_maxAxisAngle {this, "MaxAxisAngle", 20 * CLHEP::deg, "The maximal allowed deviation from the IP-to-ClusterCenter-axis"}
 the maximal allowed deviation from the IP-to-ClusterCenter-axis. More...
 
Gaudi::Property< double > m_minRLateral {this, "MinRLateral", 4 * CLHEP::cm, "The minimal r in the definition of the Lateral moment"}
 the minimal \(r\) in the definition of the Lateral moment More...
 
Gaudi::Property< double > m_minLLongitudinal {this, "MinLLongitudinal", 10 * CLHEP::cm, "The minimal lambda in the definition of the Longitudinal moment"}
 the minimal \(\lambda\) in the definition of the Longitudinal moment More...
 
Gaudi::Property< double > m_minBadLArQuality {this, "MinBadLArQuality", 4000, "The minimal cell quality in the LAr for declaring a cell bad"}
 the minimal cell quality in the LAr for declaring a cell bad More...
 
Gaudi::Property< bool > m_absOpt {this, "WeightingOfNegClusters", false, "If set to true use abs E value of cells to calculate cluster moments"}
 if set to true use abs E value of cells to calculate cluster moments More...
 
Gaudi::Property< double > m_etaInnerWheel {this, "EMECAbsEtaWheelTransition", 2.52, "Transition from outer to inner wheel in EME2"}
 Transition from outer to inner wheel in EME2. More...
 
Gaudi::Property< bool > m_twoGaussianNoise {this, "TwoGaussianNoise", false, "If set to true use 2-gaussian noise description for TileCal"}
 if set to true use 2-gaussian noise description for TileCal
More...
 
Gaudi::Property< bool > m_skipInvalidClusters {this, "SkipInvalidClusters", true, "Check for and skip invalid clusters during moments calculation."}
 If false, do the moment calculation even for invalid clusters (which may waste computation). More...
 
ClusterMomentsCalculator::CMCOptionsHolder m_options
 Options for the algorithm, held in a GPU-friendly way. More...
 
Gaudi::Property< bool > m_measureTimes {this, "MeasureTimes", false, "Synchronize for time measurements"}
 If true, synchronize the kernel calls to ensure accurate per-step/per-tool time measurements. More...
 
ServiceHandle< IGPUKernelSizeOptimizerSvcm_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." }
 Handle to the CUDA kernel block and grid size optimization service. More...
 

Detailed Description

Standard tool to calculate cluster info (energy, transverse energy, pseudo-rapidity and azimuthal angle).

Author
Nuno Fernandes nuno..nosp@m.dos..nosp@m.santo.nosp@m.s.fe.nosp@m.rnand.nosp@m.es@c.nosp@m.ern.c.nosp@m.h
Date
01 March 2023

Definition at line 32 of file GPUClusterInfoAndMomentsCalculator.h.

Constructor & Destructor Documentation

◆ GPUClusterInfoAndMomentsCalculator()

GPUClusterInfoAndMomentsCalculator::GPUClusterInfoAndMomentsCalculator ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 14 of file GPUClusterInfoAndMomentsCalculator.cxx.

14  :
15  base_class(type, name, parent)
16 {
17 }

◆ ~GPUClusterInfoAndMomentsCalculator()

virtual GPUClusterInfoAndMomentsCalculator::~GPUClusterInfoAndMomentsCalculator ( )
virtualdefault

Member Function Documentation

◆ execute()

StatusCode GPUClusterInfoAndMomentsCalculator::execute ( const EventContext &  ctx,
const CaloRecGPU::ConstantDataHolder constant_data,
CaloRecGPU::EventDataHolder event_data,
void *  temporary_buffer 
) const
overridevirtual

Definition at line 46 of file GPUClusterInfoAndMomentsCalculator.cxx.

48 {
50  return StatusCode::SUCCESS;
51 
52 }

◆ finalize()

StatusCode GPUClusterInfoAndMomentsCalculator::finalize ( )
overridevirtual

Definition at line 54 of file GPUClusterInfoAndMomentsCalculator.cxx.

55 {
56  return StatusCode::SUCCESS;
57 }

◆ handle()

void CaloGPUCUDAInitialization::handle ( const Incident &  incident)
inlineoverrideinherited

Definition at line 66 of file CaloGPUCUDAInitialization.h.

67  {
68  const bool is_multiprocess = (Gaudi::Concurrency::ConcurrencyFlags::numProcs() > 0);
69  if (is_multiprocess && incident.type() == AthenaInterprocess::UpdateAfterFork::type())
70  {
71  if (!this->initialize_CUDA().isSuccess())
72  {
73  throw GaudiException("Failed to perform the CUDA initialization!",
74  "CaloGPUCUDAInitialization::handle",
75  StatusCode::FAILURE);
76  }
77  }
78  }

◆ initialize()

virtual StatusCode GPUClusterInfoAndMomentsCalculator::initialize ( )
inlineoverridevirtual

Reimplemented from CaloGPUCUDAInitialization.

Definition at line 39 of file GPUClusterInfoAndMomentsCalculator.h.

40  {
42  }

◆ initialize_CUDA()

StatusCode GPUClusterInfoAndMomentsCalculator::initialize_CUDA ( )
overridevirtual

Initialization that invokes CUDA functions.

Reimplemented from CaloGPUCUDAInitialization.

Definition at line 38 of file GPUClusterInfoAndMomentsCalculator.cxx.

39 {
42 
43  return StatusCode::SUCCESS;
44 }

◆ initialize_non_CUDA()

StatusCode GPUClusterInfoAndMomentsCalculator::initialize_non_CUDA ( )
overridevirtual

Initialization that does not invoke CUDA functions.

Reimplemented from CaloGPUCUDAInitialization.

Definition at line 19 of file GPUClusterInfoAndMomentsCalculator.cxx.

20 {
22 
23  m_options.m_options->use_abs_energy = m_absOpt;
24  m_options.m_options->use_two_gaussian_noise = m_twoGaussianNoise;
25  m_options.m_options->skip_invalid_clusters = m_skipInvalidClusters;
26  m_options.m_options->min_LAr_quality = m_minBadLArQuality;
27  m_options.m_options->max_axis_angle = m_maxAxisAngle;
28  m_options.m_options->eta_inner_wheel = m_etaInnerWheel;
29  m_options.m_options->min_l_longitudinal = m_minLLongitudinal;
30  m_options.m_options->min_r_lateral = m_minRLateral;
31 
32 
33  ATH_CHECK( m_kernelSizeOptimizer.retrieve() );
34 
35  return StatusCode::SUCCESS;
36 }

Member Data Documentation

◆ m_absOpt

Gaudi::Property<bool> GPUClusterInfoAndMomentsCalculator::m_absOpt {this, "WeightingOfNegClusters", false, "If set to true use abs E value of cells to calculate cluster moments"}
private

if set to true use abs E value of cells to calculate cluster moments

Definition at line 93 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_etaInnerWheel

Gaudi::Property<double> GPUClusterInfoAndMomentsCalculator::m_etaInnerWheel {this, "EMECAbsEtaWheelTransition", 2.52, "Transition from outer to inner wheel in EME2"}
private

Transition from outer to inner wheel in EME2.

Definition at line 97 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_kernelSizeOptimizer

ServiceHandle<IGPUKernelSizeOptimizerSvc> GPUClusterInfoAndMomentsCalculator::m_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." }
private

Handle to the CUDA kernel block and grid size optimization service.

Definition at line 120 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_maxAxisAngle

Gaudi::Property<double> GPUClusterInfoAndMomentsCalculator::m_maxAxisAngle {this, "MaxAxisAngle", 20 * CLHEP::deg, "The maximal allowed deviation from the IP-to-ClusterCenter-axis"}
private

the maximal allowed deviation from the IP-to-ClusterCenter-axis.

Definition at line 62 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_measureTimes

Gaudi::Property<bool> GPUClusterInfoAndMomentsCalculator::m_measureTimes {this, "MeasureTimes", false, "Synchronize for time measurements"}
private

If true, synchronize the kernel calls to ensure accurate per-step/per-tool time measurements.

Defaults to false.

Definition at line 117 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_minBadLArQuality

Gaudi::Property<double> GPUClusterInfoAndMomentsCalculator::m_minBadLArQuality {this, "MinBadLArQuality", 4000, "The minimal cell quality in the LAr for declaring a cell bad"}
private

the minimal cell quality in the LAr for declaring a cell bad

This defines the minimal quality (large values mean worse shape) a cell needs to exceed in order to be considered as not compatible with a normal ionization signal.

Definition at line 88 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_minLLongitudinal

Gaudi::Property<double> GPUClusterInfoAndMomentsCalculator::m_minLLongitudinal {this, "MinLLongitudinal", 10 * CLHEP::cm, "The minimal lambda in the definition of the Longitudinal moment"}
private

the minimal \(\lambda\) in the definition of the Longitudinal moment

This defines the minimal distance along the shower axis from the cluster center the two leading cells might have before this value is used instead of their real distance in the normalization of the LONGITUDINAL moment.

Definition at line 80 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_minRLateral

Gaudi::Property<double> GPUClusterInfoAndMomentsCalculator::m_minRLateral {this, "MinRLateral", 4 * CLHEP::cm, "The minimal r in the definition of the Lateral moment"}
private

the minimal \(r\) in the definition of the Lateral moment

This defines the minimal distance the two leading cells might have before this value is used instead of their real distance in the normalization of the LATERAL moment.

Definition at line 70 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_options

ClusterMomentsCalculator::CMCOptionsHolder GPUClusterInfoAndMomentsCalculator::m_options
private

Options for the algorithm, held in a GPU-friendly way.

Definition at line 111 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_skipInvalidClusters

Gaudi::Property<bool> GPUClusterInfoAndMomentsCalculator::m_skipInvalidClusters {this, "SkipInvalidClusters", true, "Check for and skip invalid clusters during moments calculation."}
private

If false, do the moment calculation even for invalid clusters (which may waste computation).

Defaults to true.

Definition at line 107 of file GPUClusterInfoAndMomentsCalculator.h.

◆ m_twoGaussianNoise

Gaudi::Property<bool> GPUClusterInfoAndMomentsCalculator::m_twoGaussianNoise {this, "TwoGaussianNoise", false, "If set to true use 2-gaussian noise description for TileCal"}
private

if set to true use 2-gaussian noise description for TileCal

Definition at line 102 of file GPUClusterInfoAndMomentsCalculator.h.


The documentation for this class was generated from the following files:
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::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::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)
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
CaloGPUCUDAInitialization::initialize
virtual StatusCode initialize()
Definition: CaloGPUCUDAInitialization.h:44
ClusterMomentsCalculator::CMCOptionsHolder::allocate
void allocate()
Definition: GPUClusterInfoAndMomentsCalculatorImpl.h:323
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
AthenaInterprocess::UpdateAfterFork::type
static const std::string & type()
Incident type.
Definition: Incidents.h:49
GPUClusterInfoAndMomentsCalculator::m_maxAxisAngle
Gaudi::Property< double > m_maxAxisAngle
the maximal allowed deviation from the IP-to-ClusterCenter-axis.
Definition: GPUClusterInfoAndMomentsCalculator.h:62
CaloGPUCUDAInitialization::initialize_CUDA
virtual StatusCode initialize_CUDA()
Initialization that invokes CUDA functions.
Definition: CaloGPUCUDAInitialization.h:39
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
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)
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
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)