ATLAS Offline Software
Loading...
Searching...
No Matches
TopoAutomatonSplitting Class Reference

Cluster splitter algorithm to be run on GPUs, using the same cellular automaton-based approach as Topo-Automaton Clustering. More...

#include <TopoAutomatonSplitting.h>

Inheritance diagram for TopoAutomatonSplitting:
Collaboration diagram for TopoAutomatonSplitting:

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.
virtual StatusCode initialize_CUDA () override
 Initialization that invokes CUDA functions.
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 > &times) 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.
std::vector< size_t > m_times ATLAS_THREAD_SAFE
 Vector to hold execution times to be recorded if necessary.
std::vector< size_t > m_eventNumbers ATLAS_THREAD_SAFE
 Vector to hold the event numbers to be recorded if necessary.
Gaudi::Property< bool > m_measureTimes
 If true, times are recorded to the file given by m_timeFileName.
Gaudi::Property< std::string > m_timeFileName
 File to which times should be saved.

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.
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.
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
Gaudi::Property< float > m_minEnergy {this, "EnergyCut", 500 * CLHEP::MeV, "Minimal energy for a local max"}
 local maxima need at least this energy content
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
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
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
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
Gaudi::Property< std::string > m_neighborOptionString
 type of neighbor relations to use.
Gaudi::Property< bool > m_restrictHECIWandFCalNeighbors
 if set to true limit the neighbors in HEC IW and FCal2&3.
Gaudi::Property< bool > m_restrictPSNeighbors
 if set to true limit the neighbors in presampler Barrel and Endcap.
TASplitting::TASOptionsHolder m_options
 Options for the algorithm, held in a GPU-friendly way.
ServiceHandle< IGPUKernelSizeOptimizerSvcm_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." }
 Handle to the CUDA kernel block and grid size optimization service.

Detailed Description

Cluster splitter algorithm to be run on GPUs, using the same cellular automaton-based approach as Topo-Automaton Clustering.

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
25 August 2022

Definition at line 31 of file TopoAutomatonSplitting.h.

Constructor & Destructor Documentation

◆ TopoAutomatonSplitting()

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

Definition at line 24 of file TopoAutomatonSplitting.cxx.

24 :
25 base_class(type, name, parent),
26 CaloGPUTimed(this)
27{
28}
CaloGPUTimed(T *ptr)

◆ ~TopoAutomatonSplitting()

virtual TopoAutomatonSplitting::~TopoAutomatonSplitting ( )
virtualdefault

Member Function Documentation

◆ execute()

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

Definition at line 208 of file TopoAutomatonSplitting.cxx.

210{
211 using clock_type = boost::chrono::thread_clock;
212 auto time_cast = [](const auto & before, const auto & after)
213 {
214 return boost::chrono::duration_cast<boost::chrono::microseconds>(after - before).count();
215 };
216
217 const auto start = clock_type::now();
218 const auto preprocessing_end = clock_type::now();
219
220 fillNeighbours(event_data, constant_data, m_options, *(m_kernelSizeOptimizer.get()), m_measureTimes);
221
222 const auto after_neighs = clock_type::now();
223
224 findLocalMaxima(event_data, constant_data, m_options, *(m_kernelSizeOptimizer.get()), m_measureTimes);
225
226 const auto after_maxima = clock_type::now();
227
228 excludeSecondaryMaxima(event_data, constant_data, m_options, *(m_kernelSizeOptimizer.get()), m_measureTimes);
229
230 const auto after_secondary_maxima = clock_type::now();
231
232 splitClusterGrowing(event_data, constant_data, m_options, *(m_kernelSizeOptimizer.get()), m_measureTimes);
233
234 const auto after_growing = clock_type::now();
235
236 cellWeightingAndFinalization(event_data, constant_data, m_options, *(m_kernelSizeOptimizer.get()), m_measureTimes);
237
238 const auto end = clock_type::now();
239
240 if (m_measureTimes)
241 {
242 record_times(ctx.evt(),
243 time_cast(start, preprocessing_end),
244 time_cast(preprocessing_end, after_neighs),
245 time_cast(after_neighs, after_maxima),
246 time_cast(after_maxima, after_secondary_maxima),
247 time_cast(after_secondary_maxima, after_growing),
248 time_cast(after_growing, end)
249 );
250 }
251
252 return StatusCode::SUCCESS;
253
254
255}
Gaudi::Property< bool > m_measureTimes
If true, times are recorded to the file given by m_timeFileName.
void record_times(const size_t event_num, const std::vector< size_t > &times) const
TASplitting::TASOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
void cellWeightingAndFinalization(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
void fillNeighbours(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
void splitClusterGrowing(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
void findLocalMaxima(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
void excludeSecondaryMaxima(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})

◆ finalize()

StatusCode TopoAutomatonSplitting::finalize ( )
overridevirtual

Definition at line 258 of file TopoAutomatonSplitting.cxx.

259{
260 if (m_measureTimes)
261 {
262 print_times("Preprocessing Fill_List_of_Intra-Cluster_Neighbours Find_Local_Maxima Find_Secondary_Maxima Splitter_Tag_Propagation Cell_Weighting_And_Finalization", 6);
263 }
264 return StatusCode::SUCCESS;
265}
void print_times(const std::string &header, const size_t time_size) const

◆ 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 }
static const std::string & type()
Incident type.
Definition Incidents.h:49
virtual StatusCode initialize_CUDA()
Initialization that invokes CUDA functions.

◆ initialize()

virtual StatusCode TopoAutomatonSplitting::initialize ( )
inlineoverridevirtual

Reimplemented from CaloGPUCUDAInitialization.

Definition at line 38 of file TopoAutomatonSplitting.h.

◆ initialize_CUDA()

StatusCode TopoAutomatonSplitting::initialize_CUDA ( )
overridevirtual

Initialization that invokes CUDA functions.

Reimplemented from CaloGPUCUDAInitialization.

Definition at line 200 of file TopoAutomatonSplitting.cxx.

201{
202 m_options.sendToGPU();
204
205 return StatusCode::SUCCESS;
206}
void register_kernels(IGPUKernelSizeOptimizer &optimizer)

◆ initialize_non_CUDA()

StatusCode TopoAutomatonSplitting::initialize_non_CUDA ( )
overridevirtual

Initialization that does not invoke CUDA functions.

Reimplemented from CaloGPUCUDAInitialization.

Definition at line 30 of file TopoAutomatonSplitting.cxx.

31{
32 m_options.allocate();
33
34 using PackType = decltype(m_options.m_options->valid_sampling_primary);
35
36 static_assert(CaloCell_ID::getNumberOfSamplings() <= sizeof(PackType) * CHAR_BIT, "We are assuming that we have fewer samplings that bits per int!");
37
38 auto get_option_from_string = [](const std::string & str, bool & failed)
39 {
40 failed = false;
42 CRGPU_CHEAP_STRING_TO_ENUM( str, CaloCell_ID,
43 PreSamplerB,
44 EMB1,
45 EMB2,
46 EMB3,
47 PreSamplerE,
48 EME1,
49 EME2,
50 EME3,
51 HEC0,
52 HEC1,
53 HEC2,
54 HEC3,
55 TileBar0,
56 TileBar1,
57 TileBar2,
58 TileGap1,
59 TileGap2,
60 TileGap3,
61 TileExt0,
62 TileExt1,
63 TileExt2,
64 FCAL0,
65 FCAL1,
66 FCAL2
67 )
68 )
69 else
70 {
71 failed = true;
72 return CaloCell_ID::Unknown;
73 }
74 };
75
76
77 auto process_sampling = [&get_option_from_string](const std::vector<std::string> & sampling_names, std::string & invalid_names, PackType & sampling_option)
78 {
79 sampling_option = 0;
80 for (const std::string & samp_name : sampling_names)
81 {
82 bool failed = false;
83 const PackType sampling = (PackType) get_option_from_string(samp_name, failed);
84
85 if (failed)
86 {
87 if (invalid_names.size() == 0)
88 {
89 invalid_names = "'" + samp_name + "'";
90 }
91 else
92 {
93 invalid_names += ", '" + samp_name + "'";
94 }
95 }
96 else
97 {
98 sampling_option |= ((PackType) 1) << sampling;
99 }
100 }
101 };
102
103 std::string invalid_names;
104
105 process_sampling(m_samplingNames, invalid_names, m_options.m_options->valid_sampling_primary);
106
107 if (invalid_names.size() > 0)
108 {
109 ATH_MSG_ERROR( "Calorimeter samplings " << invalid_names
110 << " are not a valid Calorimeter sampling name and will be ignored! "
111 << "Valid names are: "
112 << "PreSamplerB, EMB1, EMB2, EMB3, "
113 << "PreSamplerE, EME1, EME2, EME3, "
114 << "HEC0, HEC1, HEC2, HEC3, "
115 << "TileBar0, TileBar1, TileBar2, "
116 << "TileGap1, TileGap2, TileGap3, "
117 << "TileExt0, TileExt1, TileExt2, "
118 << "FCAL0, FCAL1, FCAL2." );
119 }
120
121 invalid_names.clear();
122
123 process_sampling(m_secondarySamplingNames, invalid_names, m_options.m_options->valid_sampling_secondary);
124
125 if (invalid_names.size() > 0)
126 {
127 ATH_MSG_ERROR( "Calorimeter samplings " << invalid_names
128 << " are not a valid Calorimeter sampling name and will be ignored! "
129 << "Valid names are: "
130 << "PreSamplerB, EMB1, EMB2, EMB3, "
131 << "PreSamplerE, EME1, EME2, EME3, "
132 << "HEC0, HEC1, HEC2, HEC3, "
133 << "TileBar0, TileBar1, TileBar2, "
134 << "TileGap1, TileGap2, TileGap3, "
135 << "TileExt0, TileExt1, TileExt2, "
136 << "FCAL0, FCAL1, FCAL2." );
137 }
138
139 auto get_neighbour_option_from_string = [](const std::string & str, bool & failed)
140 {
141 failed = false;
143 CRGPU_CHEAP_STRING_TO_ENUM( str, LArNeighbours,
144 prevInPhi,
145 nextInPhi,
146 prevInEta,
147 nextInEta,
148 faces2D,
149 corners2D,
150 all2D,
151 prevInSamp,
152 nextInSamp,
153 upAndDown,
154 prevSubDet,
155 nextSubDet,
156 all3D,
157 corners3D,
158 all3DwithCorners,
159 prevSuperCalo,
160 nextSuperCalo,
161 super3D
162 )
163 )
164 //I know Topological Clustering only supports a subset of those,
165 //but this is supposed to be a general data exporting tool...
166 else
167 {
168 failed = true;
170 }
171 };
172
173 bool neigh_failed = false;
174 m_options.m_options->neighbour_options = (unsigned int) get_neighbour_option_from_string(m_neighborOptionString, neigh_failed);
175
176 if (neigh_failed)
177 {
178 ATH_MSG_ERROR("Invalid Neighbour Option: " << m_neighborOptionString);
179 }
180
181 //We must repeat this printing part because ATH_MSG_ERROR
182 //is a macro that apparently calls a this->msg(...) function.
183 //Of course it won't work within a lambda...
184
185 m_options.m_options->min_num_cells = m_nCells;
186 m_options.m_options->min_maximum_energy = m_minEnergy;
187 m_options.m_options->EM_shower_scale = m_emShowerScale;
188 m_options.m_options->share_border_cells = m_shareBorderCells;
189 m_options.m_options->use_absolute_energy = m_absOpt;
190 m_options.m_options->treat_L1_predicted_as_good = m_treatL1PredictedCellsAsGood;
191
192 m_options.m_options->limit_HECIW_and_FCal_neighs = m_restrictHECIWandFCalNeighbors;
193 m_options.m_options->limit_PS_neighs = m_restrictPSNeighbors;
194
195 ATH_CHECK( m_kernelSizeOptimizer.retrieve() );
196
197 return StatusCode::SUCCESS;
198}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define CRGPU_RECURSIVE_MACRO(...)
Expands recursive macros.
#define CRGPU_CHEAP_STRING_TO_ENUM(VAR, PREFIX, ONE,...)
Checks a string variable, VAR, for matching enum identifiers (ONE and the remaining variadic argument...
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
Gaudi::Property< std::vector< std::string > > m_secondarySamplingNames
vector of names of the secondary calorimeter samplings to consider.
Gaudi::Property< bool > m_restrictHECIWandFCalNeighbors
if set to true limit the neighbors in HEC IW and FCal2&3.
Gaudi::Property< bool > m_treatL1PredictedCellsAsGood
if set to true treat cells with a dead OTX which can be predicted by L1 trigger info as good instead ...
Gaudi::Property< float > m_emShowerScale
typical EM shower scale to use for distance criteria in shared cells
Gaudi::Property< bool > m_absOpt
if set to true, splitter only looks at absolute value of Energy in order to identify potential seed c...
Gaudi::Property< float > m_minEnergy
local maxima need at least this energy content
Gaudi::Property< bool > m_shareBorderCells
share cells at the border between two local maxima
Gaudi::Property< std::string > m_neighborOptionString
type of neighbor relations to use.
Gaudi::Property< bool > m_restrictPSNeighbors
if set to true limit the neighbors in presampler Barrel and Endcap.
Gaudi::Property< std::vector< std::string > > m_samplingNames
vector of names of the calorimeter samplings to consider for seeds.
Gaudi::Property< int > m_nCells
local maxima need at least this number of neighbors to become seeds

◆ 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.

144 {
145 std::shared_lock<std::shared_mutex> lock(m_timeMutex);
146
147 if (m_timeFileName.size() == 0)
148 {
149 return;
150 }
151
152 std::vector<size_t> indices(m_eventNumbers.size());
153
154 std::iota(indices.begin(), indices.end(), 0);
155 std::sort(indices.begin(), indices.end(), [&](size_t a, size_t b)
156 {
157 return m_eventNumbers[a] < m_eventNumbers[b];
158 }
159 );
160 std::ofstream out(m_timeFileName);
161
162 out << "Event_Number Total " << header << "\n";
163
164 for (const size_t idx : indices)
165 {
166 out << m_eventNumbers[idx] << " ";
167
168 size_t total = 0;
169
170 for (size_t i = 0; i < time_size; ++i)
171 {
172 total += m_times[idx * time_size + i];
173 }
174
175 out << total << " ";
176
177 for (size_t i = 0; i < time_size; ++i)
178 {
179 out << m_times[idx * time_size + i] << " ";
180 }
181 out << "\n";
182 }
183
184 out << std::endl;
185
186 out.close();
187 }
static Double_t a
Gaudi::Property< std::string > m_timeFileName
File to which times should be saved.
std::shared_mutex m_timeMutex
Mutex that is locked when recording times.
std::pair< long int, long int > indices
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ 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.

106 {
107 const size_t time_size = 1;
108
109 size_t old_size;
110
111 {
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);
116 }
117 {
118 std::shared_lock<std::shared_mutex> lock(m_timeMutex);
119 record_times_helper(old_size, value);
120 }
121 }
void record_times_helper(const size_t) const

◆ 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.

125 {
126 const size_t time_size = sizeof...(args) + 1;
127
128 size_t old_size;
129
130 {
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);
135 }
136 {
137 std::shared_lock<std::shared_mutex> lock(m_timeMutex);
138 record_times_helper(old_size, value, std::forward<Args>(args)...);
139 }
140
141 }

◆ 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.

87 {
88 size_t old_size;
89 {
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);
94 }
95 {
96 std::shared_lock<std::shared_mutex> lock(m_timeMutex);
97 for (size_t i = 0; i < times.size(); ++i)
98 {
99 m_times[old_size + i] = times[i];
100 }
101 }
102 }

◆ record_times_helper() [1/3]

template<class Arg>
void CaloGPUTimed::record_times_helper ( const size_t index,
Arg && arg ) const
inlineprivateinherited

Definition at line 70 of file CaloGPUTimed.h.

71 {
72 // coverity[missing_lock]
73 m_times[index] = std::forward<Arg>(arg);
74
75 //This is called within a function that holds the lock itself.
76 }
str index
Definition DeMoScan.py:362

◆ record_times_helper() [2/3]

void CaloGPUTimed::record_times_helper ( const size_t ) const
inlineprivateinherited

Definition at line 64 of file CaloGPUTimed.h.

65 {
66 //Do nothing
67 }

◆ record_times_helper() [3/3]

template<class ... Args>
void CaloGPUTimed::record_times_helper ( size_t index,
Args &&... args ) const
inlineprivateinherited

Definition at line 79 of file CaloGPUTimed.h.

80 {
81 (record_times_helper(index++, std::forward<Args>(args)), ...);
82 }

Member Data Documentation

◆ 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> TopoAutomatonSplitting::m_absOpt {this, "WeightingOfNegClusters", false, "Should absolute value be used to identify potential seed cells"}
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.

134{this, "WeightingOfNegClusters", false, "Should absolute value be used to identify potential seed cells"};

◆ m_emShowerScale

Gaudi::Property<float> TopoAutomatonSplitting::m_emShowerScale {this, "EMShowerScale", 5 * CLHEP::cm, "Typical EM shower distance for which the energy density should drop to 1/e"}
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.

129{this, "EMShowerScale", 5 * CLHEP::cm, "Typical EM shower distance for which the energy density should drop to 1/e"};

◆ m_kernelSizeOptimizer

ServiceHandle<IGPUKernelSizeOptimizerSvc> TopoAutomatonSplitting::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 198 of file TopoAutomatonSplitting.h.

198{ this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." };

◆ 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_minEnergy

Gaudi::Property<float> TopoAutomatonSplitting::m_minEnergy {this, "EnergyCut", 500 * CLHEP::MeV, "Minimal energy for a local max"}
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.

93{this, "EnergyCut", 500 * CLHEP::MeV, "Minimal energy for a local max"};

◆ m_nCells

Gaudi::Property<int> TopoAutomatonSplitting::m_nCells {this, "NumberOfCellsCut", 4, "Local maxima need at least this number of neighbors to become seeds. Must be a non-negative number (obviously)."}
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.

86{this, "NumberOfCellsCut", 4, "Local maxima need at least this number of neighbors to become seeds. Must be a non-negative number (obviously)."};

◆ m_neighborOptionString

Gaudi::Property<std::string> TopoAutomatonSplitting::m_neighborOptionString
private
Initial value:
{this, "NeighborOption", "super3D",
"Neighbor option to be used for cell neighborhood relations"}

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:

  • "all2D" for all cells in the same layer (sampling or module) of one calorimeter subsystem. Note that endcap and barrel will be unconnected in this case even for the LAREM.
  • "all3D" for all cells in the same calorimeter. This means all the "all2D" neighbors for each cell plus the cells in adjacent samplings overlapping at least partially in \(\eta\) and \(\phi\) with the cell. Note that endcap and barrel will be connected in this case for the LAREM.
  • "super3D" for all cells. This means all the "all3D" neighbors for each cell plus the cells in adjacent samplings from other subsystems overlapping at least partially in \(\eta\) and \(\phi\) with the cell. All calorimeters are connected in this case.

The default setting is "super3D".

Definition at line 165 of file TopoAutomatonSplitting.h.

165 {this, "NeighborOption", "super3D",
166 "Neighbor option to be used for cell neighborhood relations"};

◆ m_options

TASplitting::TASOptionsHolder TopoAutomatonSplitting::m_options
private

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

Definition at line 195 of file TopoAutomatonSplitting.h.

◆ m_restrictHECIWandFCalNeighbors

Gaudi::Property<bool> TopoAutomatonSplitting::m_restrictHECIWandFCalNeighbors
private
Initial value:
{this, "RestrictHECIWandFCalNeighbors",
false, "Limit the neighbors in HEC IW and FCal2&3"}

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.

177 {this, "RestrictHECIWandFCalNeighbors",
178 false, "Limit the neighbors in HEC IW and FCal2&3"};

◆ m_restrictPSNeighbors

Gaudi::Property<bool> TopoAutomatonSplitting::m_restrictPSNeighbors
private
Initial value:
{this, "RestrictPSNeighbors",
false, "Limit the neighbors in presampler Barrel and Endcap"}

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.

187 {this, "RestrictPSNeighbors",
188 false, "Limit the neighbors in presampler Barrel and Endcap"};

◆ m_samplingNames

Gaudi::Property<std::vector<std::string> > TopoAutomatonSplitting::m_samplingNames {this, "SamplingNames", {}, "Name(s) of Calorimeter Samplings to consider for local maxima"}
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.

68{this, "SamplingNames", {}, "Name(s) of Calorimeter Samplings to consider for local maxima"};

◆ m_secondarySamplingNames

Gaudi::Property<std::vector<std::string> > TopoAutomatonSplitting::m_secondarySamplingNames {this, "SecondarySamplingNames", {}, "Name(s) of secondary Calorimeter Samplings to consider for local maxima"}
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.

77{this, "SecondarySamplingNames", {}, "Name(s) of secondary Calorimeter Samplings to consider for local maxima"};

◆ m_shareBorderCells

Gaudi::Property<bool> TopoAutomatonSplitting::m_shareBorderCells {this, "ShareBorderCells", false, "Whether or not to share cells at the boundary between two clusters"}
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.

114{this, "ShareBorderCells", false, "Whether or not to share cells at the boundary between two clusters"};

◆ 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_treatL1PredictedCellsAsGood

Gaudi::Property<bool> TopoAutomatonSplitting::m_treatL1PredictedCellsAsGood {this, "TreatL1PredictedCellsAsGood", true, "Treat bad cells with dead OTX if predicted from L1 as good"}
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.

139{this, "TreatL1PredictedCellsAsGood", true, "Treat bad cells with dead OTX if predicted from L1 as good"};

The documentation for this class was generated from the following files: