![]() |
ATLAS Offline Software
|
Cluster splitter algorithm to be run on GPUs, using the same cellular automaton-based approach as Topo-Automaton Clustering. More...
#include <TopoAutomatonSplitting.h>
Public Member Functions | |
TopoAutomatonSplitting (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 | ~TopoAutomatonSplitting ()=default |
void | handle (const Incident &incident) override |
Protected Member Functions | |
void | record_times (const size_t event_num, const std::vector< size_t > ×) const |
template<class ... Args> | |
void | record_times (const size_t event_num, const size_t &value) const |
template<class ... Args> | |
void | record_times (const size_t event_num, const size_t &value, Args &&... args) const |
void | print_times (const std::string &header, const size_t time_size) const |
Protected Attributes | |
std::shared_mutex | m_timeMutex |
Mutex that is locked when recording times. More... | |
std::vector< size_t > m_times | ATLAS_THREAD_SAFE |
Vector to hold execution times to be recorded if necessary. More... | |
std::vector< size_t > m_eventNumbers | ATLAS_THREAD_SAFE |
Vector to hold the event numbers to be recorded if necessary. More... | |
Gaudi::Property< bool > | m_measureTimes |
If true , times are recorded to the file given by m_timeFileName . More... | |
Gaudi::Property< std::string > | m_timeFileName |
File to which times should be saved. More... | |
Private Member Functions | |
void | record_times_helper (const size_t) const |
template<class Arg > | |
void | record_times_helper (const size_t index, Arg &&arg) const |
template<class ... Args> | |
void | record_times_helper (size_t index, Args &&... args) const |
Private Attributes | |
Gaudi::Property< std::vector< std::string > > | m_samplingNames {this, "SamplingNames", {}, "Name(s) of Calorimeter Samplings to consider for local maxima"} |
vector of names of the calorimeter samplings to consider for seeds. More... | |
Gaudi::Property< std::vector< std::string > > | m_secondarySamplingNames {this, "SecondarySamplingNames", {}, "Name(s) of secondary Calorimeter Samplings to consider for local maxima"} |
vector of names of the secondary calorimeter samplings to consider. More... | |
Gaudi::Property< int > | m_nCells {this, "NumberOfCellsCut", 4, "Local maxima need at least this number of neighbors to become seeds. Must be a non-negative number (obviously)."} |
local maxima need at least this number of neighbors to become seeds More... | |
Gaudi::Property< float > | m_minEnergy {this, "EnergyCut", 500 * CLHEP::MeV, "Minimal energy for a local max"} |
local maxima need at least this energy content More... | |
Gaudi::Property< bool > | m_shareBorderCells {this, "ShareBorderCells", false, "Whether or not to share cells at the boundary between two clusters"} |
share cells at the border between two local maxima More... | |
Gaudi::Property< float > | m_emShowerScale {this, "EMShowerScale", 5 * CLHEP::cm, "Typical EM shower distance for which the energy density should drop to 1/e"} |
typical EM shower scale to use for distance criteria in shared cells More... | |
Gaudi::Property< bool > | m_absOpt {this, "WeightingOfNegClusters", false, "Should absolute value be used to identify potential seed cells"} |
if set to true, splitter only looks at absolute value of Energy in order to identify potential seed cells More... | |
Gaudi::Property< bool > | m_treatL1PredictedCellsAsGood {this, "TreatL1PredictedCellsAsGood", true, "Treat bad cells with dead OTX if predicted from L1 as good"} |
if set to true treat cells with a dead OTX which can be predicted by L1 trigger info as good instead of bad cells More... | |
Gaudi::Property< std::string > | m_neighborOptionString |
type of neighbor relations to use. More... | |
Gaudi::Property< bool > | m_restrictHECIWandFCalNeighbors |
if set to true limit the neighbors in HEC IW and FCal2&3. More... | |
Gaudi::Property< bool > | m_restrictPSNeighbors |
if set to true limit the neighbors in presampler Barrel and Endcap. More... | |
TASplitting::TASOptionsHolder | 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... | |
Cluster splitter algorithm to be run on GPUs, using the same cellular automaton-based approach as Topo-Automaton Clustering.
Definition at line 31 of file TopoAutomatonSplitting.h.
TopoAutomatonSplitting::TopoAutomatonSplitting | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Definition at line 24 of file TopoAutomatonSplitting.cxx.
|
virtualdefault |
|
overridevirtual |
Definition at line 208 of file TopoAutomatonSplitting.cxx.
|
overridevirtual |
Definition at line 261 of file TopoAutomatonSplitting.cxx.
|
inlineoverrideinherited |
Definition at line 66 of file CaloGPUCUDAInitialization.h.
|
inlineoverridevirtual |
Reimplemented from CaloGPUCUDAInitialization.
Definition at line 38 of file TopoAutomatonSplitting.h.
|
overridevirtual |
Initialization that invokes CUDA functions.
Reimplemented from CaloGPUCUDAInitialization.
Definition at line 200 of file TopoAutomatonSplitting.cxx.
|
overridevirtual |
Initialization that does not invoke CUDA functions.
Reimplemented from CaloGPUCUDAInitialization.
Definition at line 30 of file TopoAutomatonSplitting.cxx.
|
inlineprotectedinherited |
Definition at line 143 of file CaloGPUTimed.h.
|
inlineprotectedinherited |
Definition at line 105 of file CaloGPUTimed.h.
|
inlineprotectedinherited |
Definition at line 124 of file CaloGPUTimed.h.
|
inlineprotectedinherited |
Definition at line 86 of file CaloGPUTimed.h.
|
inlineprivateinherited |
Definition at line 70 of file CaloGPUTimed.h.
|
inlineprivateinherited |
Definition at line 64 of file CaloGPUTimed.h.
|
inlineprivateinherited |
Definition at line 79 of file CaloGPUTimed.h.
|
mutableprotectedinherited |
Vector to hold execution times to be recorded if necessary.
Definition at line 35 of file CaloGPUTimed.h.
|
mutableprotectedinherited |
Vector to hold the event numbers to be recorded if necessary.
Definition at line 40 of file CaloGPUTimed.h.
|
private |
if set to true, splitter only looks at absolute value of Energy in order to identify potential seed cells
Definition at line 134 of file TopoAutomatonSplitting.h.
|
private |
typical EM shower scale to use for distance criteria in shared cells
a shared cell is included in both clusters neighboring the cell with weights depending on the cluster energies and the distance of the shared cell to the cluster centroids. The distance is measured in units of this property to roughly describe the exponential slope of the energy density distribution for em showers. The exact choice of this property is not critical but should roughly match the Moliere radius in the LArEM since here the sharing of cells has the biggest use case.
Definition at line 129 of file TopoAutomatonSplitting.h.
|
private |
Handle to the CUDA kernel block and grid size optimization service.
Definition at line 198 of file TopoAutomatonSplitting.h.
|
protectedinherited |
If true
, times are recorded to the file given by m_timeFileName
.
Defaults to false
.
Definition at line 46 of file CaloGPUTimed.h.
|
private |
local maxima need at least this energy content
potential seed cells have to pass this cut on the energy content.
Definition at line 93 of file TopoAutomatonSplitting.h.
|
private |
local maxima need at least this number of neighbors to become seeds
each cell above the energy cut having at least this many neighbors in the parent cluster and only neighbors with smaller energy seed a split cluster.
Definition at line 86 of file TopoAutomatonSplitting.h.
|
private |
type of neighbor relations to use.
The CaloIdentifier package defines different types of neighbors for the calorimeter cells. Currently supported neighbor relations for topological clustering are:
The default setting is "super3D".
Definition at line 165 of file TopoAutomatonSplitting.h.
|
private |
Options for the algorithm, held in a GPU-friendly way.
Definition at line 195 of file TopoAutomatonSplitting.h.
|
private |
if set to true limit the neighbors in HEC IW and FCal2&3.
The cells in HEC IW and FCal2&3 get very large in terms of eta and phi. Since this might pose problems on certain jet algorithms one might need to avoid expansion in eta and phi for those cells. If this property is set to true the 2d neighbors of these cells are not used - only the next sampling neighbors are probed.
Definition at line 177 of file TopoAutomatonSplitting.h.
|
private |
if set to true limit the neighbors in presampler Barrel and Endcap.
The presampler cells add a lot of PileUp in the Hilum samples. With this option set to true the presampler cells do not expand the cluster in the presampler layer. Only the next sampling is used as valid neighbor source.
Definition at line 187 of file TopoAutomatonSplitting.h.
|
private |
vector of names of the calorimeter samplings to consider for seeds.
The default is to use all calorimeter samplings. Excluding a sampling from this vector prevents the definition of a seed cell in this sampling. Cells in those samplings are still used and incorporated in the topo clusters (both on the neighbor and the cell level) they can therefore even expand a cluster but not seed one ...
Definition at line 68 of file TopoAutomatonSplitting.h.
|
private |
vector of names of the secondary calorimeter samplings to consider.
Samplings in this list will be considered for local maxima only if no local max in the primary list is overlapping. By default this list is empty
Definition at line 77 of file TopoAutomatonSplitting.h.
|
private |
share cells at the border between two local maxima
this property needs to be set to true in order to treat cells which would be included in 2 clusters (for more then 2 the 2 with the largest E for the current seed cells are used) as shared cells. Shared cells are first excluded from the clustering and then clustered after all normal cells are clustered. The shared clusters are added to the 2 clusters they neighbor with the weights \(w_1 = E_1/(E_1+r E_2)\) and \(w_2 = 1-w_1\), where \(E_{1,2}\) are the current energies of the 2 neighboring clusters without the shared cells and \(r=\exp(d_1-d_2)\) is the ratio of the expected dependencies on the distances \(d_i\) (in units of a typical em shower scale) of each shared cell to the cluster centers. If the property is set to false the border cells are included in the normal clustering and the cluster with the largest E for the current seed cells gets the current border cell.
Definition at line 114 of file TopoAutomatonSplitting.h.
|
protectedinherited |
File to which times should be saved.
Definition at line 50 of file CaloGPUTimed.h.
|
mutableprotectedinherited |
Mutex that is locked when recording times.
Definition at line 32 of file CaloGPUTimed.h.
|
private |
if set to true treat cells with a dead OTX which can be predicted by L1 trigger info as good instead of bad cells
Definition at line 139 of file TopoAutomatonSplitting.h.