ATLAS Offline Software
TopoAutomatonClustering.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 
8 #ifndef CALORECGPU_TOPOAUTOMATONCLUSTERING_H
9 #define CALORECGPU_TOPOAUTOMATONCLUSTERING_H
10 
12 
14 
18 #include <string>
19 #include <mutex>
20 
21 #include "CLHEP/Units/SystemOfUnits.h"
22 
25 
26 #include "GaudiKernel/ServiceHandle.h"
27 
37  public AthAlgTool, virtual public CaloClusterGPUProcessor, public CaloGPUTimed, public CaloGPUCUDAInitialization
38 {
39  public:
40 
41  TopoAutomatonClustering(const std::string & type, const std::string & name, const IInterface * parent);
42 
43  virtual StatusCode initialize() override
44  {
46  }
47 
48  virtual StatusCode initialize_non_CUDA() override;
49 
50  virtual StatusCode initialize_CUDA() override;
51 
52  virtual StatusCode execute (const EventContext & ctx,
53  const CaloRecGPU::ConstantDataHolder & constant_data,
54  CaloRecGPU::EventDataHolder & event_data,
55  void * temporary_buffer) const override;
56 
57  virtual StatusCode finalize() override;
58 
59  virtual ~TopoAutomatonClustering() = default;
60 
61  private:
62 
72  Gaudi::Property<std::vector<std::string>> m_caloNames {this, "CalorimeterNames", {}, "Name(s) of Calorimeters to use for clustering"};
73 
84  Gaudi::Property<std::vector<std::string>> m_samplingNames {this, "SeedSamplingNames", {}, "Name(s) of Calorimeter Samplings to consider for seeds"};
85 
102  Gaudi::Property<float> m_cellThresholdOnEorAbsEinSigma {this, "CellThresholdOnEorAbsEinSigma", 0., "Cell (terminal) threshold (in units of noise Sigma)"};
103 
113  Gaudi::Property<float> m_neighborThresholdOnEorAbsEinSigma {this, "NeighborThresholdOnEorAbsEinSigma", 2., "Neighbor (grow) threshold (in units of noise Sigma)"};
114 
123  Gaudi::Property<float> m_seedThresholdOnEorAbsEinSigma {this, "SeedThresholdOnEorAbsEinSigma", 4., "Seed threshold (in units of noise Sigma)"};
124 
125 
134  Gaudi::Property<bool> m_seedCutsInAbsE {this, "SeedCutsInAbsE", true, "Seed cuts in Abs E instead of E"};
135 
142  Gaudi::Property<bool> m_neighborCutsInAbsE {this, "NeighborCutsInAbsE", true, "Neighbor (grow) cuts in Abs E instead of E"};
143 
150  Gaudi::Property<bool> m_cellCutsInAbsE {this, "CellCutsInAbsE", true, "Cell (terminal) cuts in Abs E instead of E"};
151 
155  Gaudi::Property<bool> m_cutCellsInTime {this, "SeedCutsInT", false, "Do seed cuts in time"};
156 
159  Gaudi::Property<float> m_timeThreshold {this, "SeedThresholdOnTAbs", 12.5 * CLHEP::ns, "Time thresholds (in abs. val.)"};
160 
163  Gaudi::Property<float> m_thresholdForKeeping {this, "TimeCutUpperLimit", 20., "Significance upper limit for applying time cut"};
164 
165 
169  Gaudi::Property<bool> m_treatL1PredictedCellsAsGood {this, "TreatL1PredictedCellsAsGood", true, "Treat bad cells with dead OTX if predicted from L1 as good"};
170 
174  Gaudi::Property<bool> m_excludeCutSeedsFromClustering {this, "CutOOTseed", true, "Exclude out-of-time seeds from neighbouring and cell stage"};
175 
179  Gaudi::Property<bool> m_keepSignificantCells {this, "UseTimeCutUpperLimit", false, "Do not apply time cut on cells of large significance"};
180 
187  Gaudi::Property<bool> m_twoGaussianNoise{this, "TwoGaussianNoise", false, "Use 2-gaussian noise description for TileCal"};
188 
189 
214  Gaudi::Property<std::string> m_neighborOptionString {this, "NeighborOption", "super3D",
215  "Neighbor option to be used for cell neighborhood relations"};
216 
226  Gaudi::Property<bool> m_restrictHECIWandFCalNeighbors {this, "RestrictHECIWandFCalNeighbors",
227  false, "Limit the neighbors in HEC IW and FCal2&3"};
228 
236  Gaudi::Property<bool> m_restrictPSNeighbors {this, "RestrictPSNeighbors",
237  false, "Limit the neighbors in presampler Barrel and Endcap"};
238 
239 
244  Gaudi::Property<bool> m_xtalkEM2 {this, "XTalkEM2",
245  false, "Relax time window (if timing is used) in EM2 when xTalk is present"};
246 
250  Gaudi::Property<float> m_xtalkDeltaT {this, "XTalkDeltaT",
251  15 * CLHEP::ns, "Delta T to add to upper time threshold for EM2 cells affected by xtalk."};
252 
253 
257 
259  ServiceHandle<IGPUKernelSizeOptimizerSvc> m_kernelSizeOptimizer { this, "KernelSizeOptimizer", "GPUKernelSizeOptimizerSvc", "CUDA kernel size optimization service." };
260 
261 };
262 
263 #endif //CALORECGPU_TOPOAUTOMATONCLUSTERING_H
TopoAutomatonClustering::m_cutCellsInTime
Gaudi::Property< bool > m_cutCellsInTime
if set to true, time cut is applied to seed cells, no cut otherwise
Definition: TopoAutomatonClustering.h:155
TopoAutomatonClustering::m_restrictHECIWandFCalNeighbors
Gaudi::Property< bool > m_restrictHECIWandFCalNeighbors
if set to true limit the neighbors in HEC IW and FCal2&3.
Definition: TopoAutomatonClustering.h:226
TopoAutomatonClustering::m_caloNames
Gaudi::Property< std::vector< std::string > > m_caloNames
vector of names of the calorimeters to consider.
Definition: TopoAutomatonClustering.h:72
TopoAutomatonClustering::m_cellCutsInAbsE
Gaudi::Property< bool > m_cellCutsInAbsE
if set to true cell cuts are on and .
Definition: TopoAutomatonClustering.h:150
TopoAutomatonClustering::initialize_non_CUDA
virtual StatusCode initialize_non_CUDA() override
Initialization that does not invoke CUDA functions.
Definition: TopoAutomatonClustering.cxx:31
TopoAutomatonClustering::m_xtalkDeltaT
Gaudi::Property< float > m_xtalkDeltaT
Additional maximum delta t added to the upper limit time window in case crosstalk in EM2 should be ac...
Definition: TopoAutomatonClustering.h:250
CaloClusterGPUProcessor
Base class for GPU-accelerated cluster processing tools to be called from CaloGPUHybridClusterProcess...
Definition: CaloClusterGPUProcessor.h:27
TopoAutomatonClustering::~TopoAutomatonClustering
virtual ~TopoAutomatonClustering()=default
TopoAutomatonClustering
Topological cluster maker algorithm to be run on GPUs.
Definition: TopoAutomatonClustering.h:38
TopoAutomatonClusteringImpl.h
CaloGPUTimed
Base class to provide some basic common infrastructure for timing measurements...
Definition: CaloGPUTimed.h:25
TopoAutomatonClustering::m_seedCutsInAbsE
Gaudi::Property< bool > m_seedCutsInAbsE
if set to true seed cuts are on and .
Definition: TopoAutomatonClustering.h:134
CaloGPUCUDAInitialization::initialize
virtual StatusCode initialize()
Definition: CaloGPUCUDAInitialization.h:44
TopoAutomatonClustering::m_seedThresholdOnEorAbsEinSigma
Gaudi::Property< float > m_seedThresholdOnEorAbsEinSigma
cells with start a cluster
Definition: TopoAutomatonClustering.h:123
IGPUKernelSizeOptimizerSvc.h
TopoAutomatonClustering::m_restrictPSNeighbors
Gaudi::Property< bool > m_restrictPSNeighbors
if set to true limit the neighbors in presampler Barrel and Endcap.
Definition: TopoAutomatonClustering.h:236
CaloRecGPU::EventDataHolder
Definition: DataHolders.h:35
TopoAutomatonClustering::finalize
virtual StatusCode finalize() override
Definition: TopoAutomatonClustering.cxx:300
CaloClusterGPUProcessor.h
TopoAutomatonClustering::m_excludeCutSeedsFromClustering
Gaudi::Property< bool > m_excludeCutSeedsFromClustering
if set to true, seed cells failing the time cut are also excluded from cluster at all
Definition: TopoAutomatonClustering.h:174
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TopoAutomatonClustering::m_samplingNames
Gaudi::Property< std::vector< std::string > > m_samplingNames
vector of names of the calorimeter samplings to consider for seeds.
Definition: TopoAutomatonClustering.h:84
TopoAutomatonClustering::m_kernelSizeOptimizer
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Definition: TopoAutomatonClustering.h:259
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TopoAutomatonClustering::m_thresholdForKeeping
Gaudi::Property< float > m_thresholdForKeeping
upper limit on the energy significance, for applying the cell time cut
Definition: TopoAutomatonClustering.h:163
TopoAutomatonClustering::m_cellThresholdOnEorAbsEinSigma
Gaudi::Property< float > m_cellThresholdOnEorAbsEinSigma
all cells have to satisfy
Definition: TopoAutomatonClustering.h:102
TopoAutomatonClustering::m_xtalkEM2
Gaudi::Property< bool > m_xtalkEM2
If set to true, the time window is softened in the EMB2 and EME2_OW due to crosstalk from direct neig...
Definition: TopoAutomatonClustering.h:244
CaloGPUCUDAInitialization
Base class to provide some basic common infrastructure for initializing CUDA only at the right place ...
Definition: CaloGPUCUDAInitialization.h:28
TopoAutomatonClustering::m_options
TAGrowing::TACOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
Definition: TopoAutomatonClustering.h:256
TAGrowing::TACOptionsHolder
Definition: TopoAutomatonClusteringImpl.h:277
TopoAutomatonClustering::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: TopoAutomatonClustering.cxx:255
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
TopoAutomatonClustering::m_timeThreshold
Gaudi::Property< float > m_timeThreshold
threshold used for timing cut on seed cells.
Definition: TopoAutomatonClustering.h:159
TopoAutomatonClustering::m_neighborOptionString
Gaudi::Property< std::string > m_neighborOptionString
type of neighbor relations to use.
Definition: TopoAutomatonClustering.h:214
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TopoAutomatonClustering::initialize
virtual StatusCode initialize() override
Definition: TopoAutomatonClustering.h:43
TopoAutomatonClustering::m_neighborCutsInAbsE
Gaudi::Property< bool > m_neighborCutsInAbsE
if set to true neighbor cuts are on and .
Definition: TopoAutomatonClustering.h:142
TopoAutomatonClustering::initialize_CUDA
virtual StatusCode initialize_CUDA() override
Initialization that invokes CUDA functions.
Definition: TopoAutomatonClustering.cxx:245
CaloRecGPU::ConstantDataHolder
Definition: DataHolders.h:19
TopoAutomatonClustering::m_keepSignificantCells
Gaudi::Property< bool > m_keepSignificantCells
if set to true, the time cut is not applied on cell of large significance
Definition: TopoAutomatonClustering.h:179
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
TopoAutomatonClustering::TopoAutomatonClustering
TopoAutomatonClustering(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TopoAutomatonClustering.cxx:24
CaloGPUTimed.h
TopoAutomatonClustering::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: TopoAutomatonClustering.h:169
AthAlgTool
Definition: AthAlgTool.h:26
checker_macros.h
Define macros for attributes used to control the static checker.
TopoAutomatonClustering::m_twoGaussianNoise
Gaudi::Property< bool > m_twoGaussianNoise
if set to true use 2-gaussian noise description for TileCal
Definition: TopoAutomatonClustering.h:187
CaloGPUCUDAInitialization.h
TopoAutomatonClustering::m_neighborThresholdOnEorAbsEinSigma
Gaudi::Property< float > m_neighborThresholdOnEorAbsEinSigma
cells with extend the cluster
Definition: TopoAutomatonClustering.h:113
ServiceHandle< IGPUKernelSizeOptimizerSvc >