ATLAS Offline Software
Loading...
Searching...
No Matches
TopoAutomatonSplitting.h
Go to the documentation of this file.
1//
2// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3//
4// Dear emacs, this is -*- c++ -*-
5//
6
7#ifndef CALORECGPU_TOPOAUTOMATONSPLITTING_H
8#define CALORECGPU_TOPOAUTOMATONSPLITTING_H
9
15#include <string>
16
18
19#include "GaudiKernel/ServiceHandle.h"
20
21#include "CLHEP/Units/SystemOfUnits.h"
22
24
31
32
34 public extends<AthAlgTool, CaloClusterGPUProcessor>, public CaloGPUTimed, public CaloGPUCUDAInitialization
35{
36 public:
37
38 TopoAutomatonSplitting(const std::string & type, const std::string & name, const IInterface * parent);
39
40 virtual StatusCode initialize() override
41 {
43 }
44
45 virtual StatusCode initialize_non_CUDA() override;
46
47 virtual StatusCode initialize_CUDA() override;
48
49 virtual StatusCode execute (const EventContext & ctx,
50 const CaloRecGPU::ConstantDataHolder & constant_data,
51 CaloRecGPU::EventDataHolder & event_data,
52 void * temporary_buffer) const override;
53
54 virtual StatusCode finalize() override;
55
56 virtual ~TopoAutomatonSplitting() = default;
57
58 private:
59
70 Gaudi::Property<std::vector<std::string>> m_samplingNames {this, "SamplingNames", {}, "Name(s) of Calorimeter Samplings to consider for local maxima"};
71
79 Gaudi::Property<std::vector<std::string>> m_secondarySamplingNames {this, "SecondarySamplingNames", {}, "Name(s) of secondary Calorimeter Samplings to consider for local maxima"};
80
88 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)."};
89
95 Gaudi::Property<float> m_minEnergy {this, "EnergyCut", 500 * CLHEP::MeV, "Minimal energy for a local max"};
96
97
116 Gaudi::Property<bool> m_shareBorderCells {this, "ShareBorderCells", false, "Whether or not to share cells at the boundary between two clusters"};
117
118
131 Gaudi::Property<float> m_emShowerScale {this, "EMShowerScale", 5 * CLHEP::cm, "Typical EM shower distance for which the energy density should drop to 1/e"};
132
136 Gaudi::Property<bool> m_absOpt {this, "WeightingOfNegClusters", false, "Should absolute value be used to identify potential seed cells"};
137
141 Gaudi::Property<bool> m_treatL1PredictedCellsAsGood {this, "TreatL1PredictedCellsAsGood", true, "Treat bad cells with dead OTX if predicted from L1 as good"};
142
167 Gaudi::Property<std::string> m_neighborOptionString {this, "NeighborOption", "super3D",
168 "Neighbor option to be used for cell neighborhood relations"};
169
179 Gaudi::Property<bool> m_restrictHECIWandFCalNeighbors {this, "RestrictHECIWandFCalNeighbors",
180 false, "Limit the neighbors in HEC IW and FCal2&3"};
181
189 Gaudi::Property<bool> m_restrictPSNeighbors {this, "RestrictPSNeighbors",
190 false, "Limit the neighbors in presampler Barrel and Endcap"};
191
192 //WARNING: the CPU version of the algorithm does not seem to have this option. Given the description,
193 // maybe it makes some sense to still allow this here? In our configuration we'll keep it disabled, but...
194
198
200 ServiceHandle<IGPUKernelSizeOptimizerSvc> m_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." };
201
203 ToolHandle<AthCUDA::IStreamTool> m_streamTool {this, "StreamTool", "", "CUDA stream tool."};
204};
205
206#endif //CALORECGPU_TOPOAUTOMATONSPLITTING_H
Base class to provide some basic common infrastructure for initializing CUDA only at the right place ...
CaloGPUTimed(T *ptr)
Holds CPU and GPU versions of the geometry and cell noise information, which are assumed to be consta...
Definition DataHolders.h:27
Holds the mutable per-event information (clusters and cells) and provides utilities to convert betwee...
Definition DataHolders.h:73
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.
TASplitting::TASOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
TopoAutomatonSplitting(const std::string &type, const std::string &name, const IInterface *parent)
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 ...
virtual ~TopoAutomatonSplitting()=default
Gaudi::Property< float > m_emShowerScale
typical EM shower scale to use for distance criteria in shared cells
virtual StatusCode initialize_non_CUDA() override
Initialization that does not invoke CUDA functions.
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
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Gaudi::Property< bool > m_shareBorderCells
share cells at the border between two local maxima
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 initialize() override
virtual StatusCode finalize() override
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Tool providing the CUDA stream to use.
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