ATLAS Offline Software
TopoAutomatonSplitting.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2002-2023 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 
17 #include "GaudiKernel/ServiceHandle.h"
18 
19 #include "CLHEP/Units/SystemOfUnits.h"
20 
22 
32  public AthAlgTool, virtual public CaloClusterGPUProcessor, public CaloGPUTimed, public CaloGPUCUDAInitialization
33 {
34  public:
35 
36  TopoAutomatonSplitting(const std::string & type, const std::string & name, const IInterface * parent);
37 
38  virtual StatusCode initialize() override
39  {
41  }
42 
43  virtual StatusCode initialize_non_CUDA() override;
44 
45  virtual StatusCode initialize_CUDA() override;
46 
47  virtual StatusCode execute (const EventContext & ctx,
48  const CaloRecGPU::ConstantDataHolder & constant_data,
49  CaloRecGPU::EventDataHolder & event_data,
50  void * temporary_buffer) const override;
51 
52  virtual StatusCode finalize() override;
53 
54  virtual ~TopoAutomatonSplitting() = default;
55 
56  private:
57 
68  Gaudi::Property<std::vector<std::string>> m_samplingNames {this, "SamplingNames", {}, "Name(s) of Calorimeter Samplings to consider for local maxima"};
69 
77  Gaudi::Property<std::vector<std::string>> m_secondarySamplingNames {this, "SecondarySamplingNames", {}, "Name(s) of secondary Calorimeter Samplings to consider for local maxima"};
78 
86  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)."};
87 
93  Gaudi::Property<float> m_minEnergy {this, "EnergyCut", 500 * CLHEP::MeV, "Minimal energy for a local max"};
94 
95 
114  Gaudi::Property<bool> m_shareBorderCells {this, "ShareBorderCells", false, "Whether or not to share cells at the boundary between two clusters"};
115 
116 
129  Gaudi::Property<float> m_emShowerScale {this, "EMShowerScale", 5 * CLHEP::cm, "Typical EM shower distance for which the energy density should drop to 1/e"};
130 
134  Gaudi::Property<bool> m_absOpt {this, "WeightingOfNegClusters", false, "Should absolute value be used to identify potential seed cells"};
135 
139  Gaudi::Property<bool> m_treatL1PredictedCellsAsGood {this, "TreatL1PredictedCellsAsGood", true, "Treat bad cells with dead OTX if predicted from L1 as good"};
140 
165  Gaudi::Property<std::string> m_neighborOptionString {this, "NeighborOption", "super3D",
166  "Neighbor option to be used for cell neighborhood relations"};
167 
177  Gaudi::Property<bool> m_restrictHECIWandFCalNeighbors {this, "RestrictHECIWandFCalNeighbors",
178  false, "Limit the neighbors in HEC IW and FCal2&3"};
179 
187  Gaudi::Property<bool> m_restrictPSNeighbors {this, "RestrictPSNeighbors",
188  false, "Limit the neighbors in presampler Barrel and Endcap"};
189 
190  //WARNING: the CPU version of the algorithm does not seem to have this option. Given the description,
191  // maybe it makes some sense to still allow this here? In our configuration we'll keep it disabled, but...
192 
196 
198  ServiceHandle<IGPUKernelSizeOptimizerSvc> m_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." };
199 };
200 
201 #endif //CALORECGPU_TOPOAUTOMATONSPLITTING_H
TopoAutomatonSplitting::initialize
virtual StatusCode initialize() override
Definition: TopoAutomatonSplitting.h:38
TopoAutomatonSplitting::finalize
virtual StatusCode finalize() override
Definition: TopoAutomatonSplitting.cxx:263
TopoAutomatonSplitting::m_neighborOptionString
Gaudi::Property< std::string > m_neighborOptionString
type of neighbor relations to use.
Definition: TopoAutomatonSplitting.h:165
TopoAutomatonSplitting::initialize_non_CUDA
virtual StatusCode initialize_non_CUDA() override
Initialization that does not invoke CUDA functions.
Definition: TopoAutomatonSplitting.cxx:32
TopoAutomatonSplitting::m_secondarySamplingNames
Gaudi::Property< std::vector< std::string > > m_secondarySamplingNames
vector of names of the secondary calorimeter samplings to consider.
Definition: TopoAutomatonSplitting.h:77
python.SystemOfUnits.MeV
int MeV
Definition: SystemOfUnits.py:154
CaloClusterGPUProcessor
Base class for GPU-accelerated cluster processing tools to be called from CaloGPUHybridClusterProcess...
Definition: CaloClusterGPUProcessor.h:27
TopoAutomatonSplitting
Cluster splitter algorithm to be run on GPUs, using the same cellular automaton-based approach as Top...
Definition: TopoAutomatonSplitting.h:33
TopoAutomatonSplitting::m_samplingNames
Gaudi::Property< std::vector< std::string > > m_samplingNames
vector of names of the calorimeter samplings to consider for seeds.
Definition: TopoAutomatonSplitting.h:68
TASplitting::TASOptionsHolder
Definition: TopoAutomatonSplittingImpl.h:477
CaloGPUTimed
Base class to provide some basic common infrastructure for timing measurements...
Definition: CaloGPUTimed.h:25
TopoAutomatonSplitting::initialize_CUDA
virtual StatusCode initialize_CUDA() override
Initialization that invokes CUDA functions.
Definition: TopoAutomatonSplitting.cxx:202
CaloGPUCUDAInitialization::initialize
virtual StatusCode initialize()
Definition: CaloGPUCUDAInitialization.h:44
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
IGPUKernelSizeOptimizerSvc.h
CaloRecGPU::EventDataHolder
Definition: DataHolders.h:35
TopoAutomatonSplitting::m_restrictHECIWandFCalNeighbors
Gaudi::Property< bool > m_restrictHECIWandFCalNeighbors
if set to true limit the neighbors in HEC IW and FCal2&3.
Definition: TopoAutomatonSplitting.h:177
TopoAutomatonSplitting::m_options
TASplitting::TASOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
Definition: TopoAutomatonSplitting.h:195
CaloClusterGPUProcessor.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TopoAutomatonSplitting::m_kernelSizeOptimizer
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Definition: TopoAutomatonSplitting.h:198
CaloGPUCUDAInitialization
Base class to provide some basic common infrastructure for initializing CUDA only at the right place ...
Definition: CaloGPUCUDAInitialization.h:28
TopoAutomatonSplitting::m_shareBorderCells
Gaudi::Property< bool > m_shareBorderCells
share cells at the border between two local maxima
Definition: TopoAutomatonSplitting.h:114
TopoAutomatonSplitting::m_emShowerScale
Gaudi::Property< float > m_emShowerScale
typical EM shower scale to use for distance criteria in shared cells
Definition: TopoAutomatonSplitting.h:129
TopoAutomatonSplitting::m_restrictPSNeighbors
Gaudi::Property< bool > m_restrictPSNeighbors
if set to true limit the neighbors in presampler Barrel and Endcap.
Definition: TopoAutomatonSplitting.h:187
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TopoAutomatonSplitting::execute
virtual StatusCode execute(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, void *temporary_buffer) const override
Process the clusters on GPU.
Definition: TopoAutomatonSplitting.cxx:210
TopoAutomatonSplittingImpl.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TopoAutomatonSplitting::m_absOpt
Gaudi::Property< bool > m_absOpt
if set to true, splitter only looks at absolute value of Energy in order to identify potential seed c...
Definition: TopoAutomatonSplitting.h:134
CaloRecGPU::ConstantDataHolder
Definition: DataHolders.h:19
TopoAutomatonSplitting::m_minEnergy
Gaudi::Property< float > m_minEnergy
local maxima need at least this energy content
Definition: TopoAutomatonSplitting.h:93
CaloGPUTimed.h
TopoAutomatonSplitting::m_nCells
Gaudi::Property< int > m_nCells
local maxima need at least this number of neighbors to become seeds
Definition: TopoAutomatonSplitting.h:86
AthAlgTool
Definition: AthAlgTool.h:26
TopoAutomatonSplitting::m_treatL1PredictedCellsAsGood
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 ...
Definition: TopoAutomatonSplitting.h:139
TopoAutomatonSplitting::TopoAutomatonSplitting
TopoAutomatonSplitting(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TopoAutomatonSplitting.cxx:24
TopoAutomatonSplitting::~TopoAutomatonSplitting
virtual ~TopoAutomatonSplitting()=default
CaloGPUCUDAInitialization.h
ServiceHandle< IGPUKernelSizeOptimizerSvc >