|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "boost/chrono/chrono.hpp"
17 #include "boost/chrono/thread_clock.hpp"
28 declareInterface<CaloClusterGPUProcessor> (
this);
46 auto get_sampling_from_string = [](
const std::string &
str,
bool & failed)
92 const PackType sampling = (PackType) get_sampling_from_string(samp_name, failed);
97 <<
" is not a valid Calorimeter sampling name and will be ignored! "
98 <<
"Valid names are: "
99 <<
"PreSamplerB, EMB1, EMB2, EMB3, "
100 <<
"PreSamplerE, EME1, EME2, EME3, "
101 <<
"HEC0, HEC1, HEC2, HEC3, "
102 <<
"TileBar0, TileBar1, TileBar2, "
103 <<
"TileGap1, TileGap2, TileGap3, "
104 <<
"TileExt0, TileExt1, TileExt2, "
105 <<
"FCAL0, FCAL1, FCAL2." );
109 seed_samplings |= ((PackType) 1) << sampling;
113 auto get_calo_from_string = [](
const std::string &
str,
bool & failed)
165 const PackType sample_mask = calo_to_sampling_mask(get_calo_from_string(calo_name, failed));
170 <<
" is not a valid Calorimeter name and will be ignored! "
171 <<
"Valid names are: LAREM, LARHEC, LARFCAL, and TILE." );
175 calo_samplings |= sample_mask;
179 auto get_neighbour_option_from_string = [](
const std::string &
str,
bool & failed)
211 bool neigh_failed =
false;
242 return StatusCode::SUCCESS;
250 return StatusCode::SUCCESS;
259 using clock_type = boost::chrono::thread_clock;
260 auto time_cast = [](
const auto & before,
const auto & after)
262 return boost::chrono::duration_cast<boost::chrono::microseconds>(after - before).count();
287 time_cast(
start, before_snr),
288 time_cast(before_snr, before_pairs),
289 time_cast(before_pairs, before_growing),
290 time_cast(before_growing,
end)
294 return StatusCode::SUCCESS;
304 print_times(
"Preprocessing Signal-to-Noise_Ratio Cell_Pair_Creation Cluster_Growing", 4);
306 return StatusCode::SUCCESS;
Gaudi::Property< bool > m_cutCellsInTime
if set to true, time cut is applied to seed cells, no cut otherwise
Gaudi::Property< bool > m_restrictHECIWandFCalNeighbors
if set to true limit the neighbors in HEC IW and FCal2&3.
Gaudi::Property< std::vector< std::string > > m_caloNames
vector of names of the calorimeters to consider.
Gaudi::Property< bool > m_cellCutsInAbsE
if set to true cell cuts are on and .
virtual StatusCode initialize_non_CUDA() override
Initialization that does not invoke CUDA functions.
Gaudi::Property< float > m_xtalkDeltaT
Additional maximum delta t added to the upper limit time window in case crosstalk in EM2 should be ac...
void cellPairs(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TACOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
CaloRecGPU::Helpers::CPU_object< TopoAutomatonOptions > m_options
Base class to provide some basic common infrastructure for timing measurements...
void clusterGrowing(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TACOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
Gaudi::Property< bool > m_seedCutsInAbsE
if set to true seed cuts are on and .
#define CRGPU_CHEAP_STRING_TO_ENUM(VAR, PREFIX, ONE,...)
Checks a string variable, VAR, for matching enum identifiers (ONE and the remaining variadic argument...
Gaudi::Property< float > m_seedThresholdOnEorAbsEinSigma
cells with start a cluster
Gaudi::Property< bool > m_restrictPSNeighbors
if set to true limit the neighbors in presampler Barrel and Endcap.
void signalToNoise(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TACOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
virtual StatusCode finalize() override
Gaudi::Property< bool > m_excludeCutSeedsFromClustering
if set to true, seed cells failing the time cut are also excluded from cluster at all
#define CRGPU_RECURSIVE_MACRO(...)
Expands recursive macros.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::vector< std::string > > m_samplingNames
vector of names of the calorimeter samplings to consider for seeds.
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
SUBCALO
enumeration of sub calorimeters
void print_times(const std::string &header, const size_t time_size) const
Gaudi::Property< float > m_thresholdForKeeping
upper limit on the energy significance, for applying the cell time cut
Gaudi::Property< float > m_cellThresholdOnEorAbsEinSigma
all cells have to satisfy
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...
TAGrowing::TACOptionsHolder m_options
Options for the algorithm, held in a GPU-friendly way.
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.
void sendToGPU(const bool clear_CPU=false)
Gaudi::Property< float > m_timeThreshold
threshold used for timing cut on seed cells.
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
Gaudi::Property< std::string > m_neighborOptionString
type of neighbor relations to use.
void record_times(const size_t event_num, const std::vector< size_t > ×) const
Gaudi::Property< bool > m_measureTimes
If true, times are recorded to the file given by m_timeFileName.
void register_kernels(IGPUKernelSizeOptimizer &optimizer)
virtual StatusCode initialize_CUDA() override
Initialization that invokes CUDA functions.
Gaudi::Property< bool > m_neighborCutsInAbsE
if set to true neighbor cuts are on and .
Gaudi::Property< bool > m_keepSignificantCells
if set to true, the time cut is not applied on cell of large significance
TopoAutomatonClustering(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 ...
Gaudi::Property< bool > m_twoGaussianNoise
if set to true use 2-gaussian noise description for TileCal
Gaudi::Property< float > m_neighborThresholdOnEorAbsEinSigma
cells with extend the cluster