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

Tool to convert the GPU data representation back to CPU, with selected moments too. More...

#include <GPUToAthenaImporterWithMoments.h>

Inheritance diagram for GPUToAthenaImporterWithMoments:
Collaboration diagram for GPUToAthenaImporterWithMoments:

Public Member Functions

 GPUToAthenaImporterWithMoments (const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize () override
virtual StatusCode convert (const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, xAOD::CaloClusterContainer *cluster_collection) const override
virtual StatusCode finalize () override
virtual ~GPUToAthenaImporterWithMoments ()=default

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< bool > m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"}
 If true, do not delete the GPU data representation.
SG::ReadHandleKey< CaloCellContainerm_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"}
 vector of names of the cell containers to use as input.
Gaudi::Property< std::string > m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"}
 Cluster size. Should be set accordingly to the threshold.
xAOD::CaloCluster::ClusterSize m_clusterSize
const CaloCell_IDm_calo_id {nullptr}
 Pointer to Calo ID Helper.
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
 Key for the CaloDetDescrManager in the Condition Store.
Gaudi::Property< bool > m_fillHVMoments {this, "FillHVMoments", false, "Fill the HV-related moments using the respective tools."}
 if set to true, fill the HV-related moments using the respective tools.
SG::ReadCondHandleKey< LArOnOffIdMappingm_HVCablingKey {this, "LArCablingKey","LArOnOffIdMap","SG Key of LAr Cabling object"}
 Cabling for the CPU-based HV moments calculation.
SG::ReadCondHandleKey< ILArHVScaleCorrm_HVScaleKey {this,"HVScaleCorrKey","LArHVScaleCorr","SG key of HVScaleCorr conditions object"}
 HV corrections for the CPU-based HV moments.
Gaudi::Property< float > m_HVthreshold {this,"HVThreshold",0.2,"Threshold to consider a cell 'affected' by HV issues"}
 Threshold above which a cell contributes to the HV moments.
Gaudi::Property< std::vector< int > > m_missingCellsToFill {this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."}
 Cell indices to fill as disabled cells (useful if the cell vector is always missing the same cells).
Gaudi::Property< bool > m_saveUncalibrated {this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"}
 if set to true, the uncalibrated state is saved when importing the clusters.
Gaudi::Property< std::vector< std::string > > m_momentsNames {this, "MomentsNames", {}, "List of names of moments to calculate"}
 vector holding the input list of names of moments to calculate.
CaloRecGPU::MomentsOptionsArray m_momentsToDo
 Holds (in a linearized way) the moments and whether to add them to the clusters.
bool m_doHVMoments
 To abbreviate checks of m_momentsToDo...

Detailed Description

Tool to convert the GPU data representation back to CPU, with selected moments too.

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
30 May 2022

Definition at line 34 of file GPUToAthenaImporterWithMoments.h.

Constructor & Destructor Documentation

◆ GPUToAthenaImporterWithMoments()

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

Definition at line 25 of file GPUToAthenaImporterWithMoments.cxx.

25 :
26 base_class(type, name, parent),
27 CaloGPUTimed(this),
28 m_doHVMoments(false)
29{
30}
CaloGPUTimed(T *ptr)
bool m_doHVMoments
To abbreviate checks of m_momentsToDo...

◆ ~GPUToAthenaImporterWithMoments()

virtual GPUToAthenaImporterWithMoments::~GPUToAthenaImporterWithMoments ( )
virtualdefault

Member Function Documentation

◆ convert()

StatusCode GPUToAthenaImporterWithMoments::convert ( const EventContext & ctx,
const CaloRecGPU::ConstantDataHolder & constant_data,
CaloRecGPU::EventDataHolder & event_data,
xAOD::CaloClusterContainer * cluster_collection ) const
overridevirtual

Definition at line 221 of file GPUToAthenaImporterWithMoments.cxx.

225{
226
227 using clock_type = boost::chrono::thread_clock;
228 auto time_cast = [](const auto & before, const auto & after)
229 {
230 return boost::chrono::duration_cast<boost::chrono::microseconds>(after - before).count();
231 };
232
233 cluster_container->clear();
234
235 const auto start = clock_type::now();
236
237 SG::ReadHandle<CaloCellContainer> cell_collection(m_cellsKey, ctx);
238
239 if ( !cell_collection.isValid() )
240 {
241 ATH_MSG_ERROR( " Cannot retrieve CaloCellContainer: " << cell_collection.name() );
242 return StatusCode::FAILURE;
243 }
244 const DataLink<CaloCellContainer> cell_collection_link (cell_collection.name(), ctx);
245
246 size_t extra_times[6];
247
248 const auto before_export = clock_type::now();
249
250 ed.returnAndExportClusters(cluster_container,
251 &cell_collection_link,
253 false,
255 false,
257 m_measureTimes ? extra_times : nullptr);
258
259 const auto after_export = clock_type::now();
260
261 for (size_t i = 0; i < cluster_container->size(); ++i)
262 {
263 (*cluster_container)[i]->setClusterSize(m_clusterSize);
264 }
265
266 const auto after_size = clock_type::now();
267
268 if (m_doHVMoments)
269 {
270 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl(m_HVCablingKey, ctx);
271 SG::ReadCondHandle<ILArHVScaleCorr> hvScaleHdl(m_HVScaleKey, ctx);
272 const LArOnOffIdMapping * cabling = *cablingHdl;
273 const ILArHVScaleCorr * hvcorr = *hvScaleHdl;
274
275 std::vector<double> HV_energies(ed.m_clusters->number, 0.);
276 std::vector<int> HV_numbers(ed.m_clusters->number, 0.);
277
278 for (int i = 0; i < ed.m_clusters->number_cells; ++i)
279 {
280 const int this_cluster = ed.m_clusters->clusterIndices[i];
281
282 const int this_cell_index = ed.m_clusters->cells.indices[i];
283 const int this_hash_ID = ed.m_cell_info->get_hash_ID(this_cell_index, ed.m_cell_info->complete);
284
285 if (GeometryArr::is_tile(this_hash_ID))
286 {
287 continue;
288 }
289
290 HWIdentifier hwid = cabling->createSignalChannelIDFromHash(this_hash_ID);
291 const float corr = hvcorr->HVScaleCorr(hwid);
292
293 if (corr > 0.f && corr < 100.f && fabsf(corr - 1.f) > m_HVthreshold)
294 {
295 HV_energies[this_cluster] += fabsf(ed.m_cell_info->energy[this_cell_index]);
296 ++HV_numbers[this_cluster];
297 }
298 }
299
300 for (int i = 0; i < ed.m_clusters->number; ++i)
301 {
302 xAOD::CaloCluster * cluster = (*cluster_container)[i];
304 {
305 cluster->insertMoment(xAOD::CaloCluster::ENG_BAD_HV_CELLS, HV_energies[i]);
306 }
308 {
309 cluster->insertMoment(xAOD::CaloCluster::N_BAD_HV_CELLS, HV_numbers[i]);
310 }
311 }
312 }
313
314 if (!m_keepGPUData)
315 {
316 ed.clear_GPU();
317 }
318
319 const auto after_HV = clock_type::now();
320
321 if (m_measureTimes)
322 {
323 record_times(ctx.evt(),
324 time_cast(start, before_export),
325 extra_times[0],
326 extra_times[1],
327 extra_times[2],
328 extra_times[3],
329 extra_times[4],
330 extra_times[5],
331 time_cast(after_export, after_size),
332 time_cast(after_size, after_HV)
333 );
334 }
335
336 return StatusCode::SUCCESS;
337
338}
#define ATH_MSG_ERROR(x)
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
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
xAOD::CaloCluster::ClusterSize m_clusterSize
Gaudi::Property< bool > m_keepGPUData
If true, do not delete the GPU data representation.
Gaudi::Property< float > m_HVthreshold
Threshold above which a cell contributes to the HV moments.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_HVCablingKey
Cabling for the CPU-based HV moments calculation.
SG::ReadCondHandleKey< ILArHVScaleCorr > m_HVScaleKey
HV corrections for the CPU-based HV moments.
Gaudi::Property< bool > m_saveUncalibrated
if set to true, the uncalibrated state is saved when importing the clusters.
CaloRecGPU::MomentsOptionsArray m_momentsToDo
Holds (in a linearized way) the moments and whether to add them to the clusters.
Gaudi::Property< std::vector< int > > m_missingCellsToFill
Cell indices to fill as disabled cells (useful if the cell vector is always missing the same cells).
virtual const float & HVScaleCorr(const HWIdentifier &id) const =0
void insertMoment(MomentType type, double value)
@ ENG_BAD_HV_CELLS
Total em-scale energy of cells with bad HV in this cluster.
@ N_BAD_HV_CELLS
number of cells with bad HV
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
static constexpr bool is_tile(const int cell)

◆ finalize()

StatusCode GPUToAthenaImporterWithMoments::finalize ( )
overridevirtual

Definition at line 341 of file GPUToAthenaImporterWithMoments.cxx.

342{
343 if (m_measureTimes)
344 {
345 print_times("Preprocessing Number_and_State Link_Creation Cell_Processing Sorting Basic_Info Moments Cluster_Size HV_Moments", 9);
346 }
347 return StatusCode::SUCCESS;
348}
void print_times(const std::string &header, const size_t time_size) const

◆ initialize()

StatusCode GPUToAthenaImporterWithMoments::initialize ( )
overridevirtual

Definition at line 34 of file GPUToAthenaImporterWithMoments.cxx.

35{
36 ATH_CHECK( m_cellsKey.initialize() );
37
38 ATH_CHECK( detStore()->retrieve(m_calo_id, "CaloCell_ID") );
39
40 ATH_CHECK(m_caloMgrKey.initialize());
41
44
45 auto get_cluster_size_from_string = [](const std::string & str, bool & failed)
46 {
47 failed = false;
48 //cppcheck-suppress syntaxError
51 SW_55ele,
52 SW_35ele,
53 SW_37ele,
54 SW_55gam,
55 SW_35gam,
56 SW_37gam,
57 SW_55Econv,
58 SW_35Econv,
59 SW_37Econv,
60 SW_softe,
61 Topo_420,
62 Topo_633,
63 SW_7_11,
64 SuperCluster,
65 Tower_01_01,
66 Tower_005_005,
67 Tower_fixed_area
68 )
69 )
70 //I know Topological Clustering only supports a subset of those,
71 //but this is supposed to be a general data exporting tool...
72 else
73 {
74 //failed = true;
76 }
77 };
78
79 bool size_failed = false;
80 m_clusterSize = get_cluster_size_from_string(m_clusterSizeString, size_failed);
81
83 {
84 ATH_MSG_ERROR("Invalid Cluster Size: " << m_clusterSizeString);
85 }
86
87 if (size_failed)
88 {
89 return StatusCode::FAILURE;
90 }
91
92
93 auto get_moment_from_string = [](const std::string & str, bool & failed)
94 {
95 failed = false;
98 FIRST_PHI,
99 FIRST_ETA,
100 SECOND_R,
101 SECOND_LAMBDA,
102 DELTA_PHI,
103 DELTA_THETA,
104 DELTA_ALPHA,
105 CENTER_X,
106 CENTER_Y,
107 CENTER_Z,
108 CENTER_MAG,
109 CENTER_LAMBDA,
110 LATERAL,
111 LONGITUDINAL,
112 ENG_FRAC_EM,
113 ENG_FRAC_MAX,
114 ENG_FRAC_CORE,
115 FIRST_ENG_DENS,
116 SECOND_ENG_DENS,
117 ISOLATION,
118 ENG_BAD_CELLS,
119 N_BAD_CELLS,
120 N_BAD_CELLS_CORR,
121 BAD_CELLS_CORR_E,
122 BADLARQ_FRAC,
123 ENG_POS,
124 SIGNIFICANCE,
125 CELL_SIGNIFICANCE,
126 CELL_SIG_SAMPLING,
127 AVG_LAR_Q,
128 AVG_TILE_Q,
129 ENG_BAD_HV_CELLS,
130 N_BAD_HV_CELLS,
131 PTD,
132 MASS,
133 EM_PROBABILITY,
134 HAD_WEIGHT,
135 OOC_WEIGHT,
136 DM_WEIGHT,
137 TILE_CONFIDENCE_LEVEL,
138 SECOND_TIME,
139 NCELL_SAMPLING,
140 VERTEX_FRACTION,
141 NVERTEX_FRACTION,
142 ETACALOFRAME,
143 PHICALOFRAME,
144 ETA1CALOFRAME,
145 PHI1CALOFRAME,
146 ETA2CALOFRAME,
147 PHI2CALOFRAME,
148 ENG_CALIB_TOT,
149 ENG_CALIB_OUT_L,
150 ENG_CALIB_OUT_M,
151 ENG_CALIB_OUT_T,
152 ENG_CALIB_DEAD_L,
153 ENG_CALIB_DEAD_M,
154 ENG_CALIB_DEAD_T,
155 ENG_CALIB_EMB0,
156 ENG_CALIB_EME0,
157 ENG_CALIB_TILEG3,
158 ENG_CALIB_DEAD_TOT,
159 ENG_CALIB_DEAD_EMB0,
160 ENG_CALIB_DEAD_TILE0,
161 ENG_CALIB_DEAD_TILEG3,
162 ENG_CALIB_DEAD_EME0,
163 ENG_CALIB_DEAD_HEC0,
164 ENG_CALIB_DEAD_FCAL,
165 ENG_CALIB_DEAD_LEAKAGE,
166 ENG_CALIB_DEAD_UNCLASS,
167 ENG_CALIB_FRAC_EM,
168 ENG_CALIB_FRAC_HAD,
169 ENG_CALIB_FRAC_REST)
170 )
171 else
172 {
173 failed = true;
175 }
176 };
177
178
179 auto process_moments = [&](const std::vector<std::string> & moment_names, std::string & invalid_names)
180 {
181 for (const std::string & mom_name : moment_names)
182 {
183 bool failed = false;
184 const int linear_num = MomentsOptionsArray::moment_to_linear(get_moment_from_string(mom_name, failed));
185
186 failed = failed || linear_num >= MomentsOptionsArray::num_moments;
187
188 if (failed)
189 {
190 if (invalid_names.size() == 0)
191 {
192 invalid_names = "'" + mom_name + "'";
193 }
194 else
195 {
196 invalid_names += ", '" + mom_name + "'";
197 }
198 }
199 else
200 {
201 m_momentsToDo.array[linear_num] = true;
202 }
203 }
204 };
205
206 std::string invalid_names;
207
208 process_moments(m_momentsNames, invalid_names);
209
210 if (invalid_names.size() > 0)
211 {
212 ATH_MSG_ERROR( "Moments " << invalid_names
213 << " are not valid moments and will be ignored!" );
214 }
215
217 return StatusCode::SUCCESS;
218}
#define ATH_CHECK
Evaluate an expression and check for errors.
#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...
Gaudi::Property< std::string > m_clusterSizeString
Cluster size. Should be set accordingly to the threshold.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Key for the CaloDetDescrManager in the Condition Store.
const CaloCell_ID * m_calo_id
Pointer to Calo ID Helper.
Gaudi::Property< bool > m_fillHVMoments
if set to true, fill the HV-related moments using the respective tools.
Gaudi::Property< std::vector< std::string > > m_momentsNames
vector holding the input list of names of moments to calculate.
@ ENERGY_DigiHSTruth
First Moment in .
static int moment_to_linear(const int moment)
static constexpr int num_moments
Definition DataHolders.h:51

◆ 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 }
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
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_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.

◆ ATLAS_THREAD_SAFE [2/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.

◆ m_calo_id

const CaloCell_ID* GPUToAthenaImporterWithMoments::m_calo_id {nullptr}
private

Pointer to Calo ID Helper.

Definition at line 71 of file GPUToAthenaImporterWithMoments.h.

71{nullptr};

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> GPUToAthenaImporterWithMoments::m_caloMgrKey
private
Initial value:
{this, "CaloDetDescrManager", "CaloDetDescrManager",
"SG Key for CaloDetDescrManager in the Condition Store"}

Key for the CaloDetDescrManager in the Condition Store.

Definition at line 76 of file GPUToAthenaImporterWithMoments.h.

76 {this, "CaloDetDescrManager", "CaloDetDescrManager",
77 "SG Key for CaloDetDescrManager in the Condition Store"};

◆ m_cellsKey

SG::ReadHandleKey<CaloCellContainer> GPUToAthenaImporterWithMoments::m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"}
private

vector of names of the cell containers to use as input.

Definition at line 61 of file GPUToAthenaImporterWithMoments.h.

61{this, "CellsName", "", "Name(s) of Cell Containers"};

◆ m_clusterSize

xAOD::CaloCluster::ClusterSize GPUToAthenaImporterWithMoments::m_clusterSize
private

Definition at line 66 of file GPUToAthenaImporterWithMoments.h.

◆ m_clusterSizeString

Gaudi::Property<std::string> GPUToAthenaImporterWithMoments::m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"}
private

Cluster size. Should be set accordingly to the threshold.

Definition at line 64 of file GPUToAthenaImporterWithMoments.h.

64{this, "ClusterSize", "Topo_420", "The size/type of the clusters"};

◆ m_doHVMoments

bool GPUToAthenaImporterWithMoments::m_doHVMoments
private

To abbreviate checks of m_momentsToDo...

Definition at line 120 of file GPUToAthenaImporterWithMoments.h.

◆ m_fillHVMoments

Gaudi::Property<bool> GPUToAthenaImporterWithMoments::m_fillHVMoments {this, "FillHVMoments", false, "Fill the HV-related moments using the respective tools."}
private

if set to true, fill the HV-related moments using the respective tools.

Definition at line 84 of file GPUToAthenaImporterWithMoments.h.

84{this, "FillHVMoments", false, "Fill the HV-related moments using the respective tools."};

◆ m_HVCablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> GPUToAthenaImporterWithMoments::m_HVCablingKey {this, "LArCablingKey","LArOnOffIdMap","SG Key of LAr Cabling object"}
private

Cabling for the CPU-based HV moments calculation.

Definition at line 87 of file GPUToAthenaImporterWithMoments.h.

87{this, "LArCablingKey","LArOnOffIdMap","SG Key of LAr Cabling object"};

◆ m_HVScaleKey

SG::ReadCondHandleKey<ILArHVScaleCorr> GPUToAthenaImporterWithMoments::m_HVScaleKey {this,"HVScaleCorrKey","LArHVScaleCorr","SG key of HVScaleCorr conditions object"}
private

HV corrections for the CPU-based HV moments.

Definition at line 90 of file GPUToAthenaImporterWithMoments.h.

90{this,"HVScaleCorrKey","LArHVScaleCorr","SG key of HVScaleCorr conditions object"};

◆ m_HVthreshold

Gaudi::Property<float> GPUToAthenaImporterWithMoments::m_HVthreshold {this,"HVThreshold",0.2,"Threshold to consider a cell 'affected' by HV issues"}
private

Threshold above which a cell contributes to the HV moments.

Definition at line 93 of file GPUToAthenaImporterWithMoments.h.

93{this,"HVThreshold",0.2,"Threshold to consider a cell 'affected' by HV issues"};

◆ m_keepGPUData

Gaudi::Property<bool> GPUToAthenaImporterWithMoments::m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"}
private

If true, do not delete the GPU data representation.

Defaults to true.

Definition at line 56 of file GPUToAthenaImporterWithMoments.h.

56{this, "KeepGPUData", true, "Keep GPU allocated data"};

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

Gaudi::Property<std::vector<int> > GPUToAthenaImporterWithMoments::m_missingCellsToFill {this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."}
private

Cell indices to fill as disabled cells (useful if the cell vector is always missing the same cells).

Definition at line 97 of file GPUToAthenaImporterWithMoments.h.

97{this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."};

◆ m_momentsNames

Gaudi::Property<std::vector<std::string> > GPUToAthenaImporterWithMoments::m_momentsNames {this, "MomentsNames", {}, "List of names of moments to calculate"}
private

vector holding the input list of names of moments to calculate.

This is the list of desired names of moments given in the jobOptions.

Definition at line 111 of file GPUToAthenaImporterWithMoments.h.

111{this, "MomentsNames", {}, "List of names of moments to calculate"};

◆ m_momentsToDo

CaloRecGPU::MomentsOptionsArray GPUToAthenaImporterWithMoments::m_momentsToDo
private

Holds (in a linearized way) the moments and whether to add them to the clusters.

(on the GPU side, they are unconditionally calculated).

Definition at line 116 of file GPUToAthenaImporterWithMoments.h.

◆ m_saveUncalibrated

Gaudi::Property<bool> GPUToAthenaImporterWithMoments::m_saveUncalibrated {this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"}
private

if set to true, the uncalibrated state is saved when importing the clusters.

Default is true.

Definition at line 102 of file GPUToAthenaImporterWithMoments.h.

102{this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"};

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