|
CbmRoot
|
#include <HitfinderChain.h>
Classes | |
| struct | DigiMap |
| struct | Result |
Public Member Functions | |
| void | SetParameters (const HitfinderChainPars ¶meters) |
| const HitfinderChainPars & | GetParameters () const |
| void | Finalize () |
| Result | operator() (gsl::span< const CbmStsDigi >, bool storeClusters=false) |
| const ChainContext * | GetContext () |
| void | SetContext (const ChainContext *ctx) |
| const Options & | Opts () const |
| const RecoParams & | Params () const |
| bool | HasMonitor () const |
| Monitor & | GetMonitor () const |
Private Member Functions | |
| void | EnsureParameters () |
| void | AllocateStatic () |
| void | AllocateDynamic (size_t, size_t) |
| DigiMap | CountDigisPerModules (gsl::span< const CbmStsDigi > digis) |
| void | FlattenDigis (gsl::span< const CbmStsDigi > digis, DigiMap &digiMap) |
| PartitionedSpan< sts::Hit > | FlattenHits (xpu::queue) |
| PartitionedVector< sts::Cluster > | FlattenClusters (xpu::queue) |
| size_t | GetNHits (xpu::h_view< PaddedToCacheLine< int > > nHitsPerModule, int module) |
| Returns the number of hits of a module. | |
| PartitionedSpan< sts::Hit > | SplitHitsIntoStreams (PartitionedSpan< sts::Hit > hits, int nstreamsMax) |
| void | SortHitsWithinPartition (PartitionedSpan< sts::Hit > hits) |
| void | EnsureDigiOffsets (DigiMap &) |
| void | EnsureDigisSorted () |
| void | EnsureChannelOffsets (gsl::span< u32 >) |
| void | EnsureClustersSane (gsl::span< ClusterIdx >, gsl::span< PaddedToCacheLine< int > >) |
| void | EnsureClustersSorted () |
| void | EnsureHitsSorted (PartitionedSpan< sts::Hit >) |
Private Attributes | |
| std::optional< sts::HitfinderChainPars > | fPars |
| Hitfinder | fHitfinder |
| std::vector< u32 > | fAddresses |
| std::vector< size_t > | fHitOffsets |
| std::vector< u32 > | fStreamAddresses |
| std::vector< size_t > | fHitStreamOffsets |
| const ChainContext * | fContext = nullptr |
Static Private Attributes | |
| static constexpr u16 | InvalidModule = 0xFFFF |
Sts Hitfinder Chain. This class is responsible for all memory allocations on the GPU required by the hitfinder. It executes the hitfinder kernels and handles memory transfer for input / output data and conversion to the regular CBM STS types.
Definition at line 46 of file HitfinderChain.h.
|
private |
Allocate memory that depends on input Data stays on GPU until next timeslice is processed
Definition at line 346 of file HitfinderChain.cxx.
References EnsureParameters(), fHitfinder, fPars, and L_.
Referenced by operator()(), and SetParameters().
|
private |
Allocate memory that doesn't depend on input Data stays on GPU for the entire duration the hitfinder is alive
Definition at line 283 of file HitfinderChain.cxx.
References EnsureParameters(), fHitfinder, and fPars.
Referenced by SetParameters().
|
private |
Count Digis per module.
Definition at line 399 of file HitfinderChain.cxx.
References cbm::algo::sts::HitfinderChain::DigiMap::addrToIndex, CBM_OMP, CBM_PARALLEL, fPars, cbm::algo::openmp::GetMaxThreads(), cbm::algo::openmp::GetThreadNum(), InvalidModule, L_, cbm::algo::sts::HitfinderChain::DigiMap::maxNDigisPerModule, cbm::algo::sts::HitfinderChain::DigiMap::ModuleIndex(), cbm::algo::sts::HitfinderChain::DigiMap::nDigisPerModule, cbm::algo::sts::HitfinderChain::DigiMap::nDigisPerThread, CbmStsAddress::PackDigiAddress(), and v.
Referenced by operator()().
|
private |
Definition at line 780 of file HitfinderChain.cxx.
References fHitfinder, and fPars.
Referenced by operator()().
|
private |
Definition at line 823 of file HitfinderChain.cxx.
References fHitfinder, fPars, and L_.
Referenced by operator()().
|
private |
|
private |
Definition at line 725 of file HitfinderChain.cxx.
References fHitfinder, fPars, and cbm::algo::sts::HitfinderChain::DigiMap::nDigisPerModule.
Referenced by operator()().
|
private |
Definition at line 745 of file HitfinderChain.cxx.
References fHitfinder, fPars, and L_.
Referenced by operator()().
|
private |
Definition at line 859 of file HitfinderChain.cxx.
Referenced by operator()().
|
private |
Ensure parameters were set. Raises log(fatal) otherwise.
Definition at line 278 of file HitfinderChain.cxx.
References fPars.
Referenced by AllocateDynamic(), AllocateStatic(), and operator()().
| void sts::HitfinderChain::Finalize | ( | ) |
|
private |
Copy Clusters back to host into a flat array.
Definition at line 615 of file HitfinderChain.cxx.
References fHitfinder, fPars, and L_.
Referenced by operator()().
|
private |
Copy Digis into flat array that can be copied to the GPU.
Definition at line 477 of file HitfinderChain.cxx.
References CBM_OMP, CBM_PARALLEL, CBM_PARALLEL_FOR, fHitfinder, fPars, cbm::algo::openmp::GetMaxThreads(), cbm::algo::openmp::GetThreadNum(), InvalidModule, L_, cbm::algo::sts::HitfinderChain::DigiMap::ModuleIndex(), cbm::algo::sts::HitfinderChain::DigiMap::nDigisPerModule, cbm::algo::sts::HitfinderChain::DigiMap::nDigisPerThread, and v.
Referenced by operator()().
|
private |
Copy Hits back to host into a flat array.
Definition at line 541 of file HitfinderChain.cxx.
References CBM_PARALLEL_FOR, fAddresses, fHitfinder, fHitOffsets, fPars, GetNHits(), hits, and L_.
Referenced by operator()().
|
inlineinherited |
Definition at line 16 of file SubChain.h.
References fContext.
|
inlineinherited |
Definition at line 25 of file SubChain.h.
References fContext, and HasMonitor().
Referenced by cbm::algo::Reco::QueueEvbuildMetrics(), cbm::algo::Reco::QueueProcessingExtraMetrics(), cbm::algo::Reco::QueueProcessingMetrics(), cbm::algo::Reco::QueueStsRecoMetrics(), cbm::algo::Reco::QueueTofCalibMetrics(), cbm::algo::Reco::QueueTofRecoMetrics(), cbm::algo::Reco::QueueTrackingMetrics(), cbm::algo::Reco::QueueTrdRecoMetrics(), and cbm::algo::Reco::QueueUnpackerMetricsDet().
|
private |
Returns the number of hits of a module.
Definition at line 652 of file HitfinderChain.cxx.
References fHitfinder.
Referenced by FlattenHits().
|
inline |
Definition at line 56 of file HitfinderChain.h.
References fPars.
|
inlineinherited |
Definition at line 23 of file SubChain.h.
References fContext.
Referenced by GetMonitor(), cbm::algo::Reco::QueueEvbuildMetrics(), cbm::algo::Reco::QueueProcessingExtraMetrics(), cbm::algo::Reco::QueueProcessingMetrics(), cbm::algo::Reco::QueueStsRecoMetrics(), cbm::algo::Reco::QueueTofCalibMetrics(), cbm::algo::Reco::QueueTofRecoMetrics(), cbm::algo::Reco::QueueTrackingMetrics(), cbm::algo::Reco::QueueTrdRecoMetrics(), and cbm::algo::Reco::QueueUnpackerMetricsDet().
| sts::HitfinderChain::Result sts::HitfinderChain::operator() | ( | gsl::span< const CbmStsDigi > | digis, |
| bool | storeClusters = false ) |
Definition at line 51 of file HitfinderChain.cxx.
References AllocateDynamic(), cbm::algo::sts::HitfinderChain::Result::clusters, CountDigisPerModules(), EnsureChannelOffsets(), EnsureClustersSane(), EnsureDigiOffsets(), EnsureDigisSorted(), EnsureHitsSorted(), EnsureParameters(), fHitfinder, FlattenClusters(), FlattenDigis(), FlattenHits(), fPars, cbm::algo::sts::HitfinderChain::Result::hits, hits, cbm::algo::kFindHitsChunksPerModule, L_, cbm::algo::sts::HitfinderChain::DigiMap::maxNDigisPerModule, cbm::algo::sts::HitfinderChain::Result::monitor, cbm::algo::sts::HitfinderMon::nClusterTotal, cbm::algo::sts::HitfinderMon::nHitsTotal, cbm::algo::SubChain::Opts(), cbm::algo::SubChain::Params(), cbm::algo::sts::HitfinderMon::SetDeviceMon(), SortHitsWithinPartition(), and SplitHitsIntoStreams().
|
inlineinherited |
Definition at line 20 of file SubChain.h.
References fContext.
Referenced by cbm::algo::Reco::Finalize(), cbm::algo::Reco::Init(), cbm::algo::TrackingChain::Init(), cbm::algo::sts::HitfinderChain::operator()(), cbm::algo::Reco::PrintTimings(), cbm::algo::Reco::QueueEvbuildMetrics(), cbm::algo::Reco::QueueProcessingExtraMetrics(), cbm::algo::Reco::QueueProcessingMetrics(), cbm::algo::Reco::QueueStsRecoMetrics(), cbm::algo::Reco::QueueTofCalibMetrics(), cbm::algo::Reco::QueueTofRecoMetrics(), cbm::algo::Reco::QueueTrackingMetrics(), cbm::algo::Reco::QueueTrdRecoMetrics(), cbm::algo::Reco::QueueUnpackerMetricsDet(), cbm::algo::Reco::Run(), and cbm::algo::Reco::Validate().
|
inlineinherited |
Definition at line 21 of file SubChain.h.
References fContext.
Referenced by cbm::algo::Reco::Init(), cbm::algo::sts::HitfinderChain::operator()(), and cbm::algo::Reco::Run().
|
inlineinherited |
Definition at line 18 of file SubChain.h.
References fContext.
Referenced by cbm::algo::Reco::Init().
| void sts::HitfinderChain::SetParameters | ( | const HitfinderChainPars & | parameters | ) |
Definition at line 18 of file HitfinderChain.cxx.
References AllocateDynamic(), AllocateStatic(), cbm::algo::RecoParams::Dynamic, fPars, cbm::algo::RecoParams::Static, and cbm::util::ToString().
|
private |
Sort Hits by time in each partition.
Definition at line 716 of file HitfinderChain.cxx.
References CBM_PARALLEL_FOR, and hits.
Referenced by operator()().
|
private |
Divide Hits into streams.
| hits | Hits to sort. Expects one partition per sensor. |
| nstreamsMax | max number of streams to create. |
Definition at line 657 of file HitfinderChain.cxx.
References fHitStreamOffsets, fStreamAddresses, hits, and x.
Referenced by operator()().
|
private |
Definition at line 157 of file HitfinderChain.h.
Referenced by FlattenHits().
|
privateinherited |
Definition at line 34 of file SubChain.h.
Referenced by GetContext(), GetMonitor(), HasMonitor(), Opts(), Params(), and SetContext().
|
private |
Definition at line 154 of file HitfinderChain.h.
Referenced by AllocateDynamic(), AllocateStatic(), EnsureChannelOffsets(), EnsureClustersSane(), EnsureDigiOffsets(), EnsureDigisSorted(), Finalize(), FlattenClusters(), FlattenDigis(), FlattenHits(), GetNHits(), and operator()().
|
private |
Definition at line 158 of file HitfinderChain.h.
Referenced by FlattenHits().
|
private |
Definition at line 160 of file HitfinderChain.h.
Referenced by SplitHitsIntoStreams().
|
private |
Definition at line 152 of file HitfinderChain.h.
Referenced by AllocateDynamic(), AllocateStatic(), CountDigisPerModules(), EnsureChannelOffsets(), EnsureClustersSane(), EnsureDigiOffsets(), EnsureDigisSorted(), EnsureParameters(), FlattenClusters(), FlattenDigis(), FlattenHits(), GetParameters(), operator()(), and SetParameters().
|
private |
Definition at line 159 of file HitfinderChain.h.
Referenced by SplitHitsIntoStreams().
|
staticconstexprprivate |
Definition at line 66 of file HitfinderChain.h.
Referenced by CountDigisPerModules(), and FlattenDigis().