 |
ATLAS Offline Software
|
Standard tool to calculate cluster info (energy, transverse energy, pseudo-rapidity and azimuthal angle).
More...
#include <GPUClusterInfoAndMomentsCalculator.h>
|
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...
|
|
ServiceHandle< IGPUKernelSizeOptimizerSvc > | m_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." } |
| Handle to the CUDA kernel block and grid size optimization service. More...
|
|
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 33 of file GPUClusterInfoAndMomentsCalculator.h.
◆ GPUClusterInfoAndMomentsCalculator()
GPUClusterInfoAndMomentsCalculator::GPUClusterInfoAndMomentsCalculator |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~GPUClusterInfoAndMomentsCalculator()
virtual GPUClusterInfoAndMomentsCalculator::~GPUClusterInfoAndMomentsCalculator |
( |
| ) |
|
|
virtualdefault |
◆ execute()
◆ finalize()
StatusCode GPUClusterInfoAndMomentsCalculator::finalize |
( |
| ) |
|
|
overridevirtual |
◆ handle()
void CaloGPUCUDAInitialization::handle |
( |
const Incident & |
incident | ) |
|
|
inlineoverrideinherited |
Definition at line 66 of file CaloGPUCUDAInitialization.h.
68 const bool is_multiprocess = (Gaudi::Concurrency::ConcurrencyFlags::numProcs() > 0);
73 throw GaudiException(
"Failed to perform the CUDA initialization!",
74 "CaloGPUCUDAInitialization::handle",
◆ initialize()
virtual StatusCode GPUClusterInfoAndMomentsCalculator::initialize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ initialize_CUDA()
StatusCode GPUClusterInfoAndMomentsCalculator::initialize_CUDA |
( |
| ) |
|
|
overridevirtual |
◆ initialize_non_CUDA()
StatusCode GPUClusterInfoAndMomentsCalculator::initialize_non_CUDA |
( |
| ) |
|
|
overridevirtual |
◆ print_times()
void CaloGPUTimed::print_times |
( |
const std::string & |
header, |
|
|
const size_t |
time_size |
|
) |
| const |
|
inlineprotectedinherited |
Definition at line 143 of file CaloGPUTimed.h.
152 std::vector<size_t>
indices(m_eventNumbers.size());
157 return m_eventNumbers[a] < m_eventNumbers[b];
162 out <<
"Event_Number Total " <<
header <<
"\n";
166 out << m_eventNumbers[
idx] <<
" ";
170 for (
size_t i = 0;
i < time_size; ++
i)
172 total += m_times[
idx * time_size +
i];
177 for (
size_t i = 0;
i < time_size; ++
i)
179 out << m_times[
idx * time_size +
i] <<
" ";
◆ record_times() [1/3]
template<class ... Args>
void CaloGPUTimed::record_times |
( |
const size_t |
event_num, |
|
|
const size_t & |
value |
|
) |
| const |
|
inlineprotectedinherited |
Definition at line 105 of file CaloGPUTimed.h.
107 const size_t time_size = 1;
113 old_size = m_times.size();
114 m_times.resize(old_size + time_size);
115 m_eventNumbers.push_back(event_num);
◆ record_times() [2/3]
template<class ... Args>
void CaloGPUTimed::record_times |
( |
const size_t |
event_num, |
|
|
const size_t & |
value, |
|
|
Args &&... |
args |
|
) |
| const |
|
inlineprotectedinherited |
Definition at line 124 of file CaloGPUTimed.h.
126 const size_t time_size =
sizeof...(args) + 1;
132 old_size = m_times.size();
133 m_times.resize(old_size + time_size);
134 m_eventNumbers.push_back(event_num);
◆ record_times() [3/3]
void CaloGPUTimed::record_times |
( |
const size_t |
event_num, |
|
|
const std::vector< size_t > & |
times |
|
) |
| const |
|
inlineprotectedinherited |
Definition at line 86 of file CaloGPUTimed.h.
91 old_size = m_times.size();
92 m_times.resize(old_size +
times.size());
93 m_eventNumbers.push_back(event_num);
97 for (
size_t i = 0;
i <
times.size(); ++
i)
99 m_times[old_size +
i] =
times[
i];
◆ record_times_helper() [1/3]
template<class Arg >
void CaloGPUTimed::record_times_helper |
( |
const size_t |
index, |
|
|
Arg && |
arg |
|
) |
| const |
|
inlineprivateinherited |
◆ record_times_helper() [2/3]
void CaloGPUTimed::record_times_helper |
( |
const |
size_t | ) |
const |
|
inlineprivateinherited |
◆ record_times_helper() [3/3]
template<class ... Args>
void CaloGPUTimed::record_times_helper |
( |
size_t |
index, |
|
|
Args &&... |
args |
|
) |
| const |
|
inlineprivateinherited |
◆ ATLAS_THREAD_SAFE [1/2]
std::vector<size_t> m_times CaloGPUTimed::ATLAS_THREAD_SAFE |
|
mutableprotectedinherited |
Vector to hold execution times to be recorded if necessary.
Definition at line 35 of file CaloGPUTimed.h.
◆ ATLAS_THREAD_SAFE [2/2]
std::vector<size_t> m_eventNumbers CaloGPUTimed::ATLAS_THREAD_SAFE |
|
mutableprotectedinherited |
Vector to hold the event numbers to be recorded if necessary.
Definition at line 40 of file CaloGPUTimed.h.
◆ 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 |
◆ m_etaInnerWheel
Gaudi::Property<double> GPUClusterInfoAndMomentsCalculator::m_etaInnerWheel {this, "EMECAbsEtaWheelTransition", 2.52, "Transition from outer to inner wheel in EME2"} |
|
private |
◆ m_kernelSizeOptimizer
◆ m_maxAxisAngle
Gaudi::Property<double> GPUClusterInfoAndMomentsCalculator::m_maxAxisAngle {this, "MaxAxisAngle", 20 * CLHEP::deg, "The maximal allowed deviation from the IP-to-ClusterCenter-axis"} |
|
private |
◆ m_measureTimes
Gaudi::Property<bool> CaloGPUTimed::m_measureTimes |
|
protectedinherited |
If true
, times are recorded to the file given by m_timeFileName
.
Defaults to false
.
Definition at line 46 of file CaloGPUTimed.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 89 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 81 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 71 of file GPUClusterInfoAndMomentsCalculator.h.
◆ m_options
◆ m_skipInvalidClusters
Gaudi::Property<bool> GPUClusterInfoAndMomentsCalculator::m_skipInvalidClusters {this, "SkipInvalidClusters", true, "Check for and skip invalid clusters during moments calculation."} |
|
private |
◆ m_timeFileName
Gaudi::Property<std::string> CaloGPUTimed::m_timeFileName |
|
protectedinherited |
File to which times should be saved.
Definition at line 50 of file CaloGPUTimed.h.
◆ m_timeMutex
std::shared_mutex CaloGPUTimed::m_timeMutex |
|
mutableprotectedinherited |
Mutex that is locked when recording times.
Definition at line 32 of file CaloGPUTimed.h.
◆ m_twoGaussianNoise
Gaudi::Property<bool> GPUClusterInfoAndMomentsCalculator::m_twoGaussianNoise {this, "TwoGaussianNoise", false, "If set to true use 2-gaussian noise description for TileCal"} |
|
private |
The documentation for this class was generated from the following files:
Gaudi::Property< bool > m_skipInvalidClusters
If false, do the moment calculation even for invalid clusters (which may waste computation).
std::shared_mutex m_timeMutex
Mutex that is locked when recording times.
std::pair< long int, long int > indices
Gaudi::Property< std::string > m_timeFileName
File to which times should be saved.
constexpr unsigned int num_time_measurements
ClusterMomentsCalculator::CMCOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
void sendToGPU(const bool clear_CPU=false)
void calculateClusterPropertiesAndMoments(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const CMCOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, size_t(×)[num_time_measurements], const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream={}, const bool defer_instead_of_oversize=false)
virtual StatusCode initialize()
Gaudi::Property< bool > m_twoGaussianNoise
if set to true use 2-gaussian noise description for TileCal
void print_times(const std::string &header, const size_t time_size) const
static const std::string & type()
Incident type.
void record_times_helper(const size_t) const
Gaudi::Property< double > m_maxAxisAngle
the maximal allowed deviation from the IP-to-ClusterCenter-axis.
virtual StatusCode initialize_CUDA()
Initialization that invokes CUDA functions.
void record_times(const size_t event_num, const std::vector< size_t > ×) const
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Gaudi::Property< bool > m_measureTimes
If true, times are recorded to the file given by m_timeFileName.
Gaudi::Property< double > m_minBadLArQuality
the minimal cell quality in the LAr for declaring a cell bad
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Gaudi::Property< bool > m_absOpt
if set to true use abs E value of cells to calculate cluster moments
void register_kernels(IGPUKernelSizeOptimizer &optimizer)
Gaudi::Property< double > m_minLLongitudinal
the minimal in the definition of the Longitudinal moment
Gaudi::Property< double > m_minRLateral
the minimal in the definition of the Lateral moment
CaloRecGPU::Helpers::CPU_object< ClusterMomentCalculationOptions > m_options
Gaudi::Property< double > m_etaInnerWheel
Transition from outer to inner wheel in EME2.