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 220 of file GPUToAthenaImporterWithMoments.cxx.

224{
225
226 using clock_type = boost::chrono::thread_clock;
227 auto time_cast = [](const auto & before, const auto & after)
228 {
229 return boost::chrono::duration_cast<boost::chrono::microseconds>(after - before).count();
230 };
231
232 cluster_container->clear();
233
234 const auto start = clock_type::now();
235
236 SG::ReadHandle<CaloCellContainer> cell_collection(m_cellsKey, ctx);
237
238 if ( !cell_collection.isValid() )
239 {
240 ATH_MSG_ERROR( " Cannot retrieve CaloCellContainer: " << cell_collection.name() );
241 return StatusCode::FAILURE;
242 }
243 const DataLink<CaloCellContainer> cell_collection_link (cell_collection.name(), ctx);
244
245 size_t extra_times[6];
246
247 const auto before_export = clock_type::now();
248
249 ed.returnAndExportClusters(cluster_container,
250 &cell_collection_link,
252 false,
254 false,
256 m_measureTimes ? extra_times : nullptr);
257
258 const auto after_export = clock_type::now();
259
260 for (size_t i = 0; i < cluster_container->size(); ++i)
261 {
262 (*cluster_container)[i]->setClusterSize(m_clusterSize);
263 }
264
265 const auto after_size = clock_type::now();
266
267 if (m_doHVMoments)
268 {
269 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl(m_HVCablingKey, ctx);
270 SG::ReadCondHandle<ILArHVScaleCorr> hvScaleHdl(m_HVScaleKey, ctx);
271 const LArOnOffIdMapping * cabling = *cablingHdl;
272 const ILArHVScaleCorr * hvcorr = *hvScaleHdl;
273
274 std::vector<double> HV_energies(ed.m_clusters->number, 0.);
275 std::vector<int> HV_numbers(ed.m_clusters->number, 0.);
276
277 for (int i = 0; i < ed.m_clusters->number_cells; ++i)
278 {
279 const int this_cluster = ed.m_clusters->clusterIndices[i];
280
281 const int this_cell_index = ed.m_clusters->cells.indices[i];
282 const int this_hash_ID = ed.m_cell_info->get_hash_ID(this_cell_index, ed.m_cell_info->complete);
283
284 if (GeometryArr::is_tile(this_hash_ID))
285 {
286 continue;
287 }
288
289 HWIdentifier hwid = cabling->createSignalChannelIDFromHash(this_hash_ID);
290 const float corr = hvcorr->HVScaleCorr(hwid);
291
292 if (corr > 0.f && corr < 100.f && fabsf(corr - 1.f) > m_HVthreshold)
293 {
294 HV_energies[this_cluster] += fabsf(ed.m_cell_info->energy[this_cell_index]);
295 ++HV_numbers[this_cluster];
296 }
297 }
298
299 for (int i = 0; i < ed.m_clusters->number; ++i)
300 {
301 xAOD::CaloCluster * cluster = (*cluster_container)[i];
303 {
304 cluster->insertMoment(xAOD::CaloCluster::ENG_BAD_HV_CELLS, HV_energies[i]);
305 }
307 {
308 cluster->insertMoment(xAOD::CaloCluster::N_BAD_HV_CELLS, HV_numbers[i]);
309 }
310 }
311 }
312
313 if (!m_keepGPUData)
314 {
315 ed.clear_GPU();
316 }
317
318 const auto after_HV = clock_type::now();
319
320 if (m_measureTimes)
321 {
322 record_times(ctx.evt(),
323 time_cast(start, before_export),
324 extra_times[0],
325 extra_times[1],
326 extra_times[2],
327 extra_times[3],
328 extra_times[4],
329 extra_times[5],
330 time_cast(after_export, after_size),
331 time_cast(after_size, after_HV)
332 );
333 }
334
335 return StatusCode::SUCCESS;
336
337}
#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 340 of file GPUToAthenaImporterWithMoments.cxx.

341{
342 if (m_measureTimes)
343 {
344 print_times("Preprocessing Number_and_State Link_Creation Cell_Processing Sorting Basic_Info Moments Cluster_Size HV_Moments", 9);
345 }
346 return StatusCode::SUCCESS;
347}
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;
50 SW_55ele,
51 SW_35ele,
52 SW_37ele,
53 SW_55gam,
54 SW_35gam,
55 SW_37gam,
56 SW_55Econv,
57 SW_35Econv,
58 SW_37Econv,
59 SW_softe,
60 Topo_420,
61 Topo_633,
62 SW_7_11,
63 SuperCluster,
64 Tower_01_01,
65 Tower_005_005,
66 Tower_fixed_area
67 )
68 )
69 //I know Topological Clustering only supports a subset of those,
70 //but this is supposed to be a general data exporting tool...
71 else
72 {
73 //failed = true;
75 }
76 };
77
78 bool size_failed = false;
79 m_clusterSize = get_cluster_size_from_string(m_clusterSizeString, size_failed);
80
82 {
83 ATH_MSG_ERROR("Invalid Cluster Size: " << m_clusterSizeString);
84 }
85
86 if (size_failed)
87 {
88 return StatusCode::FAILURE;
89 }
90
91
92 auto get_moment_from_string = [](const std::string & str, bool & failed)
93 {
94 failed = false;
97 FIRST_PHI,
98 FIRST_ETA,
99 SECOND_R,
100 SECOND_LAMBDA,
101 DELTA_PHI,
102 DELTA_THETA,
103 DELTA_ALPHA,
104 CENTER_X,
105 CENTER_Y,
106 CENTER_Z,
107 CENTER_MAG,
108 CENTER_LAMBDA,
109 LATERAL,
110 LONGITUDINAL,
111 ENG_FRAC_EM,
112 ENG_FRAC_MAX,
113 ENG_FRAC_CORE,
114 FIRST_ENG_DENS,
115 SECOND_ENG_DENS,
116 ISOLATION,
117 ENG_BAD_CELLS,
118 N_BAD_CELLS,
119 N_BAD_CELLS_CORR,
120 BAD_CELLS_CORR_E,
121 BADLARQ_FRAC,
122 ENG_POS,
123 SIGNIFICANCE,
124 CELL_SIGNIFICANCE,
125 CELL_SIG_SAMPLING,
126 AVG_LAR_Q,
127 AVG_TILE_Q,
128 ENG_BAD_HV_CELLS,
129 N_BAD_HV_CELLS,
130 PTD,
131 MASS,
132 EM_PROBABILITY,
133 HAD_WEIGHT,
134 OOC_WEIGHT,
135 DM_WEIGHT,
136 TILE_CONFIDENCE_LEVEL,
137 SECOND_TIME,
138 NCELL_SAMPLING,
139 VERTEX_FRACTION,
140 NVERTEX_FRACTION,
141 ETACALOFRAME,
142 PHICALOFRAME,
143 ETA1CALOFRAME,
144 PHI1CALOFRAME,
145 ETA2CALOFRAME,
146 PHI2CALOFRAME,
147 ENG_CALIB_TOT,
148 ENG_CALIB_OUT_L,
149 ENG_CALIB_OUT_M,
150 ENG_CALIB_OUT_T,
151 ENG_CALIB_DEAD_L,
152 ENG_CALIB_DEAD_M,
153 ENG_CALIB_DEAD_T,
154 ENG_CALIB_EMB0,
155 ENG_CALIB_EME0,
156 ENG_CALIB_TILEG3,
157 ENG_CALIB_DEAD_TOT,
158 ENG_CALIB_DEAD_EMB0,
159 ENG_CALIB_DEAD_TILE0,
160 ENG_CALIB_DEAD_TILEG3,
161 ENG_CALIB_DEAD_EME0,
162 ENG_CALIB_DEAD_HEC0,
163 ENG_CALIB_DEAD_FCAL,
164 ENG_CALIB_DEAD_LEAKAGE,
165 ENG_CALIB_DEAD_UNCLASS,
166 ENG_CALIB_FRAC_EM,
167 ENG_CALIB_FRAC_HAD,
168 ENG_CALIB_FRAC_REST)
169 )
170 else
171 {
172 failed = true;
174 }
175 };
176
177
178 auto process_moments = [&](const std::vector<std::string> & moment_names, std::string & invalid_names)
179 {
180 for (const std::string & mom_name : moment_names)
181 {
182 bool failed = false;
183 const int linear_num = MomentsOptionsArray::moment_to_linear(get_moment_from_string(mom_name, failed));
184
185 failed = failed || linear_num >= MomentsOptionsArray::num_moments;
186
187 if (failed)
188 {
189 if (invalid_names.size() == 0)
190 {
191 invalid_names = "'" + mom_name + "'";
192 }
193 else
194 {
195 invalid_names += ", '" + mom_name + "'";
196 }
197 }
198 else
199 {
200 m_momentsToDo.array[linear_num] = true;
201 }
202 }
203 };
204
205 std::string invalid_names;
206
207 process_moments(m_momentsNames, invalid_names);
208
209 if (invalid_names.size() > 0)
210 {
211 ATH_MSG_ERROR( "Moments " << invalid_names
212 << " are not valid moments and will be ignored!" );
213 }
214
216 return StatusCode::SUCCESS;
217}
#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 .
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
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 }
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_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: