|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef CALORECGPU_CaloGPUClusterAndCellDataMonitor_H
8 #define CALORECGPU_CaloGPUClusterAndCellDataMonitor_H
95 const std::string & tool_name)
const;
102 const std::string &
prefix,
103 const bool match_in_energy,
104 const bool match_without_shared,
105 const bool match_perfectly)
const;
166 const bool match_in_energy,
167 const bool match_without_shared)
const;
178 const bool match_without_shared)
const;
189 Gaudi::Property<float>
m_termThreshold {
this,
"CellThreshold", 0.,
"Cell (terminal) threshold (in units of noise Sigma)"};
194 Gaudi::Property<float>
m_growThreshold {
this,
"NeighborThreshold", 2.,
"Neighbor (grow) threshold (in units of noise Sigma)"};
199 Gaudi::Property<float>
m_seedThreshold {
this,
"SeedThreshold", 4.,
"Seed threshold (in units of noise Sigma)"};
208 ToolHandle< GenericMonitoringTool >
m_moniTool {
this,
"MonitoringTool",
"",
"Monitoring tool" };
221 {
this,
"ToolsToPlot", {},
"Tools to be plotted individually"};
226 {
this,
"PairsToPlot", {},
"Pairs of tools to be compared and plotted"};
231 {
this,
"ClusterMatchingParameters", {},
"Parameters for the cluster matching algorithm"};
317 #endif //CALORECGPU_CaloGPUClusterAndCellDataMonitor_H
std::vector< bool > m_cellPropertiesToDo
Property holding a SG store/key/clid from which a ReadHandle is made.
CaloGPUClusterAndCellDataMonitor(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode update_plots_end(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, const xAOD::CaloClusterContainer *cluster_collection_ptr) const override
std::vector< bool > m_extraThingsToDo
double m_min_similarity
Parameters for the cluster matching algorithm, for easier access.
virtual StatusCode update_plots(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, const xAOD::CaloClusterContainer *cluster_collection_ptr, const CaloClusterCollectionProcessor *tool) const override
Holds one objects of type \T in memory context Context.
int test_unmatched() const
Returns the number of unmatched clusters in the test (second) tool.
std::vector< bool > m_comparedClusterPropertiesToDo
Base class for GPU-accelerated cluster processing tools to be called from CaloGPUHybridClusterProcess...
std::atomic< bool > m_plottedVariablesInitialized
A flag to signal that the variables to be monitored have been detected based on the booked histograms...
std::vector< bool > m_cellTypesToDo
StatusCode match_clusters(sample_comparisons_holder &sch, const CaloRecGPU::ConstantDataHolder &constant_data, const CaloRecGPU::CellInfoArr &cell_info, const CaloRecGPU::CellStateArr &cell_state_1, const CaloRecGPU::CellStateArr &cell_state_2, const CaloRecGPU::ClusterInfoArr &cluster_info_1, const CaloRecGPU::ClusterInfoArr &cluster_info_2, const CaloRecGPU::ClusterMomentsArr &, const CaloRecGPU::ClusterMomentsArr &, const bool match_in_energy, const bool match_without_shared) const
CaloRecGPU::Helpers::separate_thread_holder< std::vector< per_tool_storage > > m_storageHolder ATLAS_THREAD_SAFE
Stores the intermediate results needed for tool-level matching.
StatusCode add_data(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, const CaloRecGPU::Helpers::CPU_object< CaloRecGPU::CellInfoArr > &cell_info, const CaloRecGPU::Helpers::CPU_object< CaloRecGPU::CellStateArr > &cell_state, const CaloRecGPU::Helpers::CPU_object< CaloRecGPU::ClusterInfoArr > &clusters, const CaloRecGPU::Helpers::CPU_object< CaloRecGPU::ClusterMomentsArr > &moments, const std::string &tool_name) const
size_t m_numEvents
Counts the number of events.
Gaudi::Property< float > m_seedThreshold
Seed threshold to use for cluster matching.
int ref_unmatched() const
Returns the number of unmatched clusters in the reference (first) tool.
std::map< std::string, int > m_toolsToCheckFor
Map of the strings corresponding to all the tools that will be relevant for plotting (individually or...
virtual StatusCode finalize_plots() const override
std::vector< int > r2t_table
int r2t(const int i) const
Converts a cluster index from the reference tool (first) to the test tool (second).
Gaudi::Property< float > m_growThreshold
Neighbor (growing) threshold to use for cluster matching.
std::map< std::string, std::string > m_toolToIdMap
Maps tools to their respective identifying prefix for variables.
std::vector< int > unmatched_test_list
ToolHandle< GenericMonitoringTool > m_moniTool
Monitoring tool.
const CaloCell_ID * m_calo_id
Pointer to Calo ID Helper.
int t2r(const int i) const
Converts a cluster index from the test tool (second) to the reference tool (first).
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
std::vector< int > t2r_table
std::vector< bool > m_clusterPropertiesToDo
Control which properties will actually be calculated and stored.
std::mutex m_mutex
This mutex is locked to ensure only one thread detects the monotired variables.
Gaudi::Property< MatchingOptions > m_matchingOptions
Option for adjusting the parameters for the cluster matching algorithm.
Helper class for offline cell identifiers.
std::vector< bool > m_extraComparedClusterPropertiesToDo
std::vector< bool > m_comparedCellTypesToDo
bool filter_tool_by_name(const std::string &tool_name) const
Returns true if this tool should be plotted for.
StatusCode compactify_clusters(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, const CaloRecGPU::Helpers::CPU_object< CaloRecGPU::CellInfoArr > &cell_info, CaloRecGPU::Helpers::CPU_object< CaloRecGPU::CellStateArr > &cell_state, CaloRecGPU::Helpers::CPU_object< CaloRecGPU::ClusterInfoArr > &clusters, CaloRecGPU::Helpers::CPU_object< CaloRecGPU::ClusterMomentsArr > &moments) const
Remove invalid clusters, reorder by ET and update the tags accordingly.
Manages objects of type T in a thread-safe way, ensuring that there's an object available for each se...
bool m_doCells
If no properties are asked for, skip the relevant loops entirely...
StatusCode initialize_plotted_variables()
Gaudi::Property< float > m_termThreshold
Cell (terminal) threshold to use for cluster matching.
StatusCode match_clusters_perfectly(sample_comparisons_holder &sch, const CaloRecGPU::ConstantDataHolder &constant_data, const CaloRecGPU::CellInfoArr &cell_info, const CaloRecGPU::CellStateArr &cell_state_1, const CaloRecGPU::CellStateArr &cell_state_2, const CaloRecGPU::ClusterInfoArr &cluster_info_1, const CaloRecGPU::ClusterInfoArr &cluster_info_2, const CaloRecGPU::ClusterMomentsArr &, const CaloRecGPU::ClusterMomentsArr &, const bool match_without_shared) const
Base class for tools that can be used to plot events within CaloGPUHybridClusterProcessor.
int m_numToolsToKeep
The number of tools that will actually need to be kept in memory for combined plotting.
virtual StatusCode update_plots_start(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, const xAOD::CaloClusterContainer *cluster_collection_ptr) const override
StatusCode add_combination(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, const int index_1, const int index_2, const std::string &prefix, const bool match_in_energy, const bool match_without_shared, const bool match_perfectly) const
Places (matched) cluster and cell properties in monitored variables to enable plotting with the Athen...
std::vector< int > unmatched_ref_list
std::vector< pair_to_plot > m_toolCombinations
bool match_without_shared
std::map< std::string, std::atomic< size_t > > m_numClustersPerTool ATLAS_THREAD_SAFE
Counts the total number of clusters per tool.
StatusCode convert_to_GPU_data_structures(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, const xAOD::CaloClusterContainer *cluster_collection_ptr, CaloRecGPU::Helpers::CPU_object< CaloRecGPU::CellInfoArr > &cell_info, CaloRecGPU::Helpers::CPU_object< CaloRecGPU::CellStateArr > &cell_state, CaloRecGPU::Helpers::CPU_object< CaloRecGPU::ClusterInfoArr > &clusters, CaloRecGPU::Helpers::CPU_object< CaloRecGPU::ClusterMomentsArr > &moments) const
Gaudi::Property< std::vector< SimpleSingleTool > > m_toolsToPlot
Tools to plot individually.
bool m_doCombinedClusters
virtual ~CaloGPUClusterAndCellDataMonitor()=default
std::vector< bool > m_comparedCellPropertiesToDo
Gaudi::Property< std::vector< SimpleToolPair > > m_pairsToPlot
Pairs of tools to compare.