|
ATLAS Offline Software
|
Tool to convert the GPU data representation back to CPU, with selected moments too.
More...
#include <GPUToAthenaImporterWithMoments.h>
|
| 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 |
| Fill the @xAODCaloClusterContainer with the relevant information. More...
|
|
virtual StatusCode | finalize () override |
|
virtual | ~GPUToAthenaImporterWithMoments ()=default |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
| DeclareInterfaceID (ICaloClusterGPUOutputTransformer, 1, 0) |
|
|
Gaudi::Property< bool > | m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"} |
| If true , do not delete the GPU data representation. More...
|
|
SG::ReadHandleKey< CaloCellContainer > | m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"} |
| vector of names of the cell containers to use as input. More...
|
|
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. More...
|
|
xAOD::CaloCluster::ClusterSize | m_clusterSize |
|
const CaloCell_ID * | m_calo_id {nullptr} |
| Pointer to Calo ID Helper. More...
|
|
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey |
| Key for the CaloDetDescrManager in the Condition Store. More...
|
|
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. More...
|
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_HVCablingKey {this, "LArCablingKey","LArOnOffIdMap","SG Key of LAr Cabling object"} |
| Cabling for the CPU-based HV moments calculation. More...
|
|
SG::ReadCondHandleKey< ILArHVScaleCorr > | m_HVScaleKey {this,"HVScaleCorrKey","LArHVScaleCorr","SG key of HVScaleCorr conditions object"} |
| HV corrections for the CPU-based HV moments. More...
|
|
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. More...
|
|
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). More...
|
|
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. More...
|
|
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. More...
|
|
MomentsOptionsArray | m_momentsToDo |
| Holds (in a linearized way) the moments and whether to add them to the clusters. More...
|
|
bool | m_doHVMoments |
| To abbreviate checks of m_momentsToDo ... More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
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 33 of file GPUToAthenaImporterWithMoments.h.
◆ StoreGateSvc_t
◆ GPUToAthenaImporterWithMoments()
GPUToAthenaImporterWithMoments::GPUToAthenaImporterWithMoments |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~GPUToAthenaImporterWithMoments()
virtual GPUToAthenaImporterWithMoments::~GPUToAthenaImporterWithMoments |
( |
| ) |
|
|
virtualdefault |
◆ convert()
Fill the @xAODCaloClusterContainer with the relevant information.
- Parameters
-
ctx | The event context. |
constant_data | Data held in GPU memory that is common to all events (cell noise and geometry). |
event_data | Data held in GPU memory that is specific to this event (including the description of the clusters themselves). |
cluster_collection | The cluster collection, in the standard Athena structures. |
Implements ICaloClusterGPUOutputTransformer.
Definition at line 222 of file GPUToAthenaImporterWithMoments.cxx.
227 using clock_type = boost::chrono::thread_clock;
228 auto time_cast = [](
const auto & before,
const auto & after)
230 return boost::chrono::duration_cast<boost::chrono::microseconds>(after - before).count();
237 if ( !cell_collection.isValid() )
239 ATH_MSG_ERROR(
" Cannot retrieve CaloCellContainer: " << cell_collection.name() );
240 return StatusCode::FAILURE;
248 ed.returnClusterNumberToCPU();
254 ed.returnSomeClustersToCPU(ed.m_clusters->number);
256 std::vector<std::unique_ptr<CaloClusterCellLink>> cell_links;
258 cell_links.reserve(ed.m_clusters->number);
264 ed.returnCellsToCPU();
266 for (
int i = 0;
i < ed.m_clusters->number; ++
i)
268 if (ed.m_clusters->seedCellID[
i] >= 0)
270 cell_links.emplace_back(std::make_unique<CaloClusterCellLink>(cell_collection_link));
271 cell_links.back()->reserve(256);
276 cell_links.emplace_back(
nullptr);
281 std::vector<float> HV_energy(ed.m_clusters->number *
m_doHVMoments, 0.f);
282 std::vector<int> HV_number(ed.m_clusters->number *
m_doHVMoments, 0 );
284 const LArOnOffIdMapping *
cabling =
nullptr;
292 hvcorr = *hvScaleHdl;
299 ed.returnSomeMomentsToCPU(ed.m_clusters->number);
303 const auto process_cell = [&](
const int cell_index,
const int cell_count)
305 const ClusterTag this_tag = ed.m_cell_state->clusterTag[cell_index];
313 std::memcpy(&tempf, &weight_pattern,
sizeof(
float));
318 const float reverse_weight = tempf;
320 const float this_weight = 1.0f - reverse_weight;
322 if (cell_links[this_index])
324 cell_links[this_index]->addCell(cell_count, this_weight);
326 if (cell_index == ed.m_clusters->seedCellID[this_index] && cell_links[this_index]->size() > 1)
333 const unsigned int first_idx = begin_it.
index();
334 const double first_wgt = begin_it.
weight();
351 if (cell_links[other_index])
353 cell_links[other_index]->addCell(cell_count, reverse_weight);
359 HWIdentifier hwid =
cabling->createSignalChannelIDFromHash((IdentifierHash) cell_index);
363 const float abs_energy = fabsf(ed.m_cell_info->energy[cell_index]);
364 HV_energy[this_index] += abs_energy;
365 ++HV_number[this_index];
369 HV_energy[other_index] += abs_energy;
370 ++HV_number[other_index];
377 if (cell_collection->isOrderedAndComplete())
380 for (
int cell_index = 0; cell_index <
NCaloCells; ++cell_index)
382 process_cell(cell_index, cell_index);
387 size_t missing_cell_count = 0;
388 for (
int cell_index = 0; cell_index <
NCaloCells; ++cell_index)
392 ++missing_cell_count;
395 process_cell(cell_index, cell_index - missing_cell_count);
403 for (
int cell_count = 0; iCells != cell_collection->end(); ++iCells, ++cell_count)
408 const int cell_index =
cell->caloDDE()->calo_hash();
410 process_cell(cell_index, cell_count);
416 std::vector<int> cluster_order(ed.m_clusters->number);
418 std::iota(cluster_order.begin(), cluster_order.end(), 0);
420 std::sort(cluster_order.begin(), cluster_order.end(), [&](
const int a,
const int b) ->
bool
422 const bool a_valid = ed.m_clusters->seedCellID[a] >= 0;
423 const bool b_valid = ed.m_clusters->seedCellID[b] >= 0;
424 if (a_valid && b_valid)
426 return ed.m_clusters->clusterEt[a]
427 > ed.m_clusters->clusterEt[b];
452 cluster_container->clear();
453 cluster_container->reserve(cell_links.size());
455 std::vector<int> real_cluster_order;
456 real_cluster_order.reserve(cluster_order.size());
458 for (
size_t i = 0;
i < cluster_order.size(); ++
i)
460 const int cluster_index = cluster_order[
i];
462 if (cell_links[cluster_index] !=
nullptr && cell_links[cluster_index]->
size() > 0)
465 cluster_container->push_back(cluster);
470 cluster->
setEta(ed.m_clusters->clusterEta[cluster_index]);
471 cluster->
setPhi(ed.m_clusters->clusterPhi[cluster_index]);
473 cluster->
setE(ed.m_clusters->clusterEnergy[cluster_index]);
485 real_cluster_order.push_back(cluster_index);
497 for (
size_t i = 0;
i < cluster_container->size(); ++
i)
500 const int cluster_index = real_cluster_order[
i];
502 cluster->
setTime(ed.m_moments->time[cluster_index]);
503 cluster->
setSecondTime(ed.m_moments->secondTime[cluster_index]);
509 const int cells_per_sampling = ed.m_moments->nCellSampling[sampl][cluster_index];
511 if (cells_per_sampling > 0)
513 sampling_pattern |= (0x1U << sampl);
520 const int cells_per_sampling = ed.m_moments->nCellSampling[sampl][cluster_index];
522 if (cells_per_sampling > 0)
538 #define CALORECGPU_MOMENTS_CONVERSION_HELPER(MOMENT_ENUM, MOMENT_ARRAY) \
539 if (m_momentsToDo[xAOD::CaloCluster:: MOMENT_ENUM ] ) \
541 cluster->insertMoment(xAOD::CaloCluster:: MOMENT_ENUM , ed.m_moments-> MOMENT_ARRAY [cluster_index]); \
545 #define CALORECGPU_MOMENTS_CONVERSION_INVALID(MOMENT_ENUM) \
546 if (m_momentsToDo[xAOD::CaloCluster:: MOMENT_ENUM ] ) \
548 ATH_MSG_WARNING("Moment '" << # MOMENT_ENUM << \
549 "' given as a calculated moment, but not yet supported on the GPU side..."); \
607 const int extra_sampling_count = ed.m_moments->nExtraCellSampling[cluster_index];
608 if (extra_sampling_count > 0)
659 time_cast(
start, pre_processing),
660 time_cast(pre_processing, cluster_number),
661 time_cast(cluster_number,
clusters),
663 time_cast(
cells, end_cell_cycle),
664 time_cast(end_cell_cycle, ordered),
665 time_cast(ordered, pre_moments),
666 time_cast(pre_moments, post_moments),
667 time_cast(post_moments,
end)
672 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ DeclareInterfaceID()
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode GPUToAthenaImporterWithMoments::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode GPUToAthenaImporterWithMoments::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 36 of file GPUToAthenaImporterWithMoments.cxx.
47 auto get_cluster_size_from_string = [](
const std::string &
str,
bool & failed)
80 bool size_failed =
false;
90 return StatusCode::FAILURE;
94 auto get_moment_from_string = [](
const std::string &
str,
bool & failed)
138 TILE_CONFIDENCE_LEVEL,
161 ENG_CALIB_DEAD_TILE0,
162 ENG_CALIB_DEAD_TILEG3,
166 ENG_CALIB_DEAD_LEAKAGE,
167 ENG_CALIB_DEAD_UNCLASS,
180 auto process_moments = [&](
const std::vector<std::string> & moment_names, std::string & invalid_names)
182 for (
const std::string & mom_name : moment_names)
191 if (invalid_names.size() == 0)
193 invalid_names =
"'" + mom_name +
"'";
197 invalid_names +=
", '" + mom_name +
"'";
207 std::string invalid_names;
211 if (invalid_names.size() > 0)
214 <<
" are not valid moments and will be ignored!" );
218 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ print_times()
void CaloGPUTimed::print_times |
( |
const std::string & |
header, |
|
|
const size_t |
time_size |
|
) |
| const |
|
inlineprotectedinherited |
Definition at line 143 of file CaloGPUTimed.h.
145 std::shared_lock<std::shared_mutex> lock(
m_timeMutex);
152 std::vector<size_t>
indices(m_eventNumbers.size());
157 return m_eventNumbers[a] < m_eventNumbers[b];
162 out <<
"Event_Number Total " <<
header <<
"\n";
166 out << m_eventNumbers[
idx] <<
" ";
170 for (
size_t i = 0;
i < time_size; ++
i)
172 total += m_times[
idx * time_size +
i];
177 for (
size_t i = 0;
i < time_size; ++
i)
179 out << m_times[
idx * time_size +
i] <<
" ";
◆ record_times() [1/3]
template<class ... Args>
void CaloGPUTimed::record_times |
( |
const size_t |
event_num, |
|
|
const size_t & |
value |
|
) |
| const |
|
inlineprotectedinherited |
Definition at line 105 of file CaloGPUTimed.h.
107 const size_t time_size = 1;
112 std::unique_lock<std::shared_mutex> lock(
m_timeMutex);
113 old_size = m_times.size();
114 m_times.resize(old_size + time_size);
115 m_eventNumbers.push_back(event_num);
118 std::shared_lock<std::shared_mutex> lock(
m_timeMutex);
◆ record_times() [2/3]
template<class ... Args>
void CaloGPUTimed::record_times |
( |
const size_t |
event_num, |
|
|
const size_t & |
value, |
|
|
Args &&... |
args |
|
) |
| const |
|
inlineprotectedinherited |
Definition at line 124 of file CaloGPUTimed.h.
126 const size_t time_size =
sizeof...(args) + 1;
131 std::unique_lock<std::shared_mutex> lock(
m_timeMutex);
132 old_size = m_times.size();
133 m_times.resize(old_size + time_size);
134 m_eventNumbers.push_back(event_num);
137 std::shared_lock<std::shared_mutex> lock(
m_timeMutex);
◆ record_times() [3/3]
void CaloGPUTimed::record_times |
( |
const size_t |
event_num, |
|
|
const std::vector< size_t > & |
times |
|
) |
| const |
|
inlineprotectedinherited |
Definition at line 86 of file CaloGPUTimed.h.
90 std::unique_lock<std::shared_mutex> lock(
m_timeMutex);
91 old_size = m_times.size();
92 m_times.resize(old_size +
times.size());
93 m_eventNumbers.push_back(event_num);
96 std::shared_lock<std::shared_mutex> lock(
m_timeMutex);
97 for (
size_t i = 0;
i <
times.size(); ++
i)
99 m_times[old_size +
i] =
times[
i];
◆ record_times_helper() [1/3]
template<class Arg >
void CaloGPUTimed::record_times_helper |
( |
const size_t |
index, |
|
|
Arg && |
arg |
|
) |
| const |
|
inlineprivateinherited |
◆ record_times_helper() [2/3]
void CaloGPUTimed::record_times_helper |
( |
const |
size_t | ) |
const |
|
inlineprivateinherited |
◆ record_times_helper() [3/3]
template<class ... Args>
void CaloGPUTimed::record_times_helper |
( |
size_t |
index, |
|
|
Args &&... |
args |
|
) |
| const |
|
inlineprivateinherited |
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ 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
◆ m_caloMgrKey
◆ m_cellsKey
◆ m_clusterSize
◆ m_clusterSizeString
Gaudi::Property<std::string> GPUToAthenaImporterWithMoments::m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"} |
|
private |
◆ m_detStore
◆ m_doHVMoments
bool GPUToAthenaImporterWithMoments::m_doHVMoments |
|
private |
◆ m_evtStore
◆ m_fillHVMoments
Gaudi::Property<bool> GPUToAthenaImporterWithMoments::m_fillHVMoments {this, "FillHVMoments", false, "Fill the HV-related moments using the respective tools."} |
|
private |
◆ m_HVCablingKey
◆ m_HVScaleKey
◆ m_HVthreshold
Gaudi::Property<float> GPUToAthenaImporterWithMoments::m_HVthreshold {this,"HVThreshold",0.2,"Threshold to consider a cell 'affected' by HV issues"} |
|
private |
◆ m_keepGPUData
Gaudi::Property<bool> GPUToAthenaImporterWithMoments::m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"} |
|
private |
◆ 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 |
◆ m_momentsNames
Gaudi::Property<std::vector<std::string> > GPUToAthenaImporterWithMoments::m_momentsNames {this, "MomentsNames", {}, "List of names of moments to calculate"} |
|
private |
◆ m_momentsToDo
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 298 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 |
◆ 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_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
bool m_doHVMoments
To abbreviate checks of m_momentsToDo...
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Const iterator class for DataVector/DataList.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_HVCablingKey
Cabling for the CPU-based HV moments calculation.
void setRawM(flt_t)
Set mass for singal state UNCALIBRATED.
constexpr int32_t secondary_cluster_index() const
bool EM_PROBABILITY(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
constexpr bool is_shared_between_clusters() const
@ ENG_BAD_HV_CELLS
Total em-scale energy of cells with bad HV in this cluster.
std::shared_mutex m_timeMutex
Mutex that is locked when recording times.
Gaudi::Property< bool > m_saveUncalibrated
if set to true, the uncalibrated state is saved when importing the clusters.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
flt_t calE() const
Geet Energy in signal state CALIBRATED.
Gaudi::Property< std::vector< std::string > > m_momentsNames
vector holding the input list of names of moments to calculate.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Key for the CaloDetDescrManager in the Condition Store.
std::pair< long int, long int > indices
void clearSamplingData()
Clear the sampling data.
flt_t calEta() const
Get in signal state CALIBRATED.
weight_t weight() const
Accessor for weight associated to this cell.
void GPU_synchronize(CUDAStreamPtrHolder stream={})
Synchronizes the stream.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Gaudi::Property< std::string > m_timeFileName
File to which times should be saved.
std::vector< SG::VarHandleKeyArray * > m_vhka
void insertMoment(MomentType type, double value)
unsigned index() const
Accessor for the index of the cell in the CaloCellContainer.
xAOD::CaloCluster::ClusterSize m_clusterSize
void setSamplingPattern(const unsigned sp, const bool clearSamplingVars=false)
Set sampling pattern (one bit per sampling.
bool setEnergy(const CaloSample sampling, const float e)
Set energy for a given sampling. Returns false if the sample isn't part of the cluster.
constexpr int NumSamplings
flt_t calM() const
Get mass in signal state CALIBRATED.
void setTime(flt_t)
Set cluster time.
bool setEmax(const CaloSample sampling, const float eMax)
Set the Energy of the cell with the highest energy in a particular sampling.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
@ NCELL_SAMPLING
Number of cells in sampling layer.
void setSecondTime(flt_t stime)
Set second moment of cell timing distribution.
#define CRGPU_CHEAP_STRING_TO_ENUM(VAR, PREFIX, ONE,...)
Checks a string variable, VAR, for matching enum identifiers (ONE and the remaining variadic argument...
MomentsOptionsArray m_momentsToDo
Holds (in a linearized way) the moments and whether to add them to the clusters.
constexpr int32_t cluster_index() const
Gaudi::Property< bool > m_keepGPUData
If true, do not delete the GPU data representation.
bool setPhimax(const CaloSample sampling, const float phiMax)
Set the phi of the cell with the highest energy in a particular sampling.
Description of a calorimeter cluster.
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
#define CRGPU_RECURSIVE_MACRO(...)
Expands recursive macros.
void print_times(const std::string &header, const size_t time_size) const
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
flt_t calPhi() const
Get in signal state CALIBRATED.
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool SECOND_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
static constexpr int num_moments
Gaudi::Property< std::string > m_clusterSizeString
Cluster size. Should be set accordingly to the threshold.
const CaloCell_ID * m_calo_id
Pointer to Calo ID Helper.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void reindex(const unsigned newIndex)
Update the index.
SG::ReadCondHandleKey< ILArHVScaleCorr > m_HVScaleKey
HV corrections for the CPU-based HV moments.
void setNumberCellsInSampling(CaloSampling::CaloSample samp, int ncells, bool isInnerWheel=false)
Set the number of cells in a sampling layer.
Gaudi::Property< bool > m_fillHVMoments
if set to true, fill the HV-related moments using the respective tools.
bool SECOND_R(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
StatusCode initialize(bool used=true)
@ ENERGY_DigiHSTruth
First Moment in .
constexpr bool is_part_of_cluster() const
#define CALORECGPU_MOMENTS_CONVERSION_INVALID(MOMENT_ENUM)
void record_times_helper(const size_t) const
bool CENTER_MAG(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
void addCellLink(CaloClusterCellLink *CCCL)
Data object for each calorimeter readout cell.
void setClusterSize(const ClusterSize)
Get cluster size.
void record_times(const size_t event_num, const std::vector< size_t > ×) const
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Gaudi::Property< bool > m_measureTimes
If true, times are recorded to the file given by m_timeFileName.
@ N_BAD_HV_CELLS
number of cells with bad HV
bool FIRST_ENG_DENS(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool setPhi(const CaloSample sampling, const float phi)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
bool setEtamax(const CaloSample sampling, const float etaMax)
Set the eta of the cell with the highest energy in a particular sampling.
virtual const float & HVScaleCorr(const HWIdentifier &id) const =0
bool setEta(const CaloSample sampling, const float eta)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
#define CALORECGPU_MOMENTS_CONVERSION_HELPER(MOMENT_ENUM, MOMENT_ARRAY)
void reweight(const weight_t newWeight)
Update the weight.
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).
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
constexpr int32_t secondary_cluster_weight() const
void setM(flt_t)
Set Mass for the current signal state.
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
Gaudi::Property< float > m_HVthreshold
Threshold above which a cell contributes to the HV moments.
static constexpr int moment_to_linear(const xAOD::CaloCluster::MomentType moment)