Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Standard tool to calculate cluster info (energy, transverse energy, pseudo-rapidity and azimuthal angle) and apply E/ET cuts on clusters if desired.
More...
#include <BasicGPUClusterInfoCalculator.h>
|
Gaudi::Property< bool > | m_preserveClusterMoments {this, "PreserveClusterMoments", false, "Do not use cluster moments array as temporary storage"} |
| If set to true , allocates a temporary array to store some temporary intermediate results instead of using cluster moments. More...
|
|
Gaudi::Property< bool > | m_cutClustersInAbsE {this, "ClusterCutsInAbsEt", true, "Do cluster cuts in Abs Et instead of Et"} |
| if set to true cluster cuts are on \(|E|_\perp\), if false on \(E_\perp\). More...
|
|
Gaudi::Property< float > | m_clusterETThreshold {this, "ClusterEtorAbsEtCut", 0.*CLHEP::MeV, "Cluster E_t or Abs E_t cut"} |
| \(E_\perp\) cut on the clusters. 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) and apply E/ET cuts on clusters if desired.
- 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
- 11 August 2022
Definition at line 34 of file BasicGPUClusterInfoCalculator.h.
◆ BasicGPUClusterInfoCalculator()
BasicGPUClusterInfoCalculator::BasicGPUClusterInfoCalculator |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~BasicGPUClusterInfoCalculator()
virtual BasicGPUClusterInfoCalculator::~BasicGPUClusterInfoCalculator |
( |
| ) |
|
|
virtualdefault |
◆ execute()
Definition at line 34 of file BasicGPUClusterInfoCalculator.cxx.
37 using clock_type = boost::chrono::thread_clock;
38 auto time_cast = [](
const auto & before,
const auto & after)
40 return boost::chrono::duration_cast<boost::chrono::microseconds>(after - before).count();
63 time_cast(
start, before_seed_properties),
64 time_cast(before_seed_properties, before_calculating),
65 time_cast(before_calculating,
end)
70 return StatusCode::SUCCESS;
◆ finalize()
StatusCode BasicGPUClusterInfoCalculator::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 BasicGPUClusterInfoCalculator::initialize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ initialize_CUDA()
StatusCode BasicGPUClusterInfoCalculator::initialize_CUDA |
( |
| ) |
|
|
overridevirtual |
◆ initialize_non_CUDA()
StatusCode BasicGPUClusterInfoCalculator::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.
145 std::shared_lock<std::shared_mutex> lock(
m_timeMutex);
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;
112 std::unique_lock<std::shared_mutex> lock(
m_timeMutex);
113 old_size = m_times.size();
114 m_times.resize(old_size + time_size);
115 m_eventNumbers.push_back(event_num);
118 std::shared_lock<std::shared_mutex> lock(
m_timeMutex);
◆ 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;
131 std::unique_lock<std::shared_mutex> lock(
m_timeMutex);
132 old_size = m_times.size();
133 m_times.resize(old_size + time_size);
134 m_eventNumbers.push_back(event_num);
137 std::shared_lock<std::shared_mutex> lock(
m_timeMutex);
◆ 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.
90 std::unique_lock<std::shared_mutex> lock(
m_timeMutex);
91 old_size = m_times.size();
92 m_times.resize(old_size +
times.size());
93 m_eventNumbers.push_back(event_num);
96 std::shared_lock<std::shared_mutex> lock(
m_timeMutex);
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 |
◆ size_of_temporaries()
virtual size_t BasicGPUClusterInfoCalculator::size_of_temporaries |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ 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_clusterETThreshold
Gaudi::Property<float> BasicGPUClusterInfoCalculator::m_clusterETThreshold {this, "ClusterEtorAbsEtCut", 0.*CLHEP::MeV, "Cluster E_t or Abs E_t cut"} |
|
private |
\(E_\perp\) cut on the clusters.
The clusters have to pass this cut (which is on \(E_\perp\) or \(|E|_\perp\) of the cluster depending on the above switch) in order to be inserted into the CaloClusterContainer.
Definition at line 93 of file BasicGPUClusterInfoCalculator.h.
◆ m_cutClustersInAbsE
Gaudi::Property<bool> BasicGPUClusterInfoCalculator::m_cutClustersInAbsE {this, "ClusterCutsInAbsEt", true, "Do cluster cuts in Abs Et instead of Et"} |
|
private |
◆ m_kernelSizeOptimizer
◆ 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_preserveClusterMoments
Gaudi::Property<bool> BasicGPUClusterInfoCalculator::m_preserveClusterMoments {this, "PreserveClusterMoments", false, "Do not use cluster moments array as temporary storage"} |
|
private |
If set to true
, allocates a temporary array to store some temporary intermediate results instead of using cluster moments.
Default is false
.
Definition at line 78 of file BasicGPUClusterInfoCalculator.h.
◆ 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.
The documentation for this class was generated from the following files:
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
void calculateClusterProperties(CaloRecGPU::EventDataHolder &holder, CaloRecGPU::Helpers::CUDA_kernel_object< ClusterInfoCalculatorTemporaries > temps, const CaloRecGPU::ConstantDataHolder &instance_data, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, const bool cut_in_absolute_ET=true, const float absolute_ET_threshold=-1, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
Gaudi::Property< float > m_clusterETThreshold
cut on the clusters.
std::shared_mutex m_timeMutex
Mutex that is locked when recording times.
CaloRecGPU::Helpers::CUDA_object< CaloRecGPU::ClusterMomentsArr > m_moments_dev
std::pair< long int, long int > indices
void updateSeedCellProperties(CaloRecGPU::EventDataHolder &holder, CaloRecGPU::Helpers::CUDA_kernel_object< ClusterInfoCalculatorTemporaries > temps, const CaloRecGPU::ConstantDataHolder &instance_data, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
Holds one objects of type \T in memory context Context.
Gaudi::Property< std::string > m_timeFileName
File to which times should be saved.
virtual StatusCode initialize()
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
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.
void register_kernels(IGPUKernelSizeOptimizer &optimizer)
Gaudi::Property< bool > m_cutClustersInAbsE
if set to true cluster cuts are on , if false on .
Gaudi::Property< bool > m_preserveClusterMoments
If set to true, allocates a temporary array to store some temporary intermediate results instead of u...