CbmRoot
Loading...
Searching...
No Matches
bmon/Hitfind.h
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
12#include "CbmBmonDigi.h"
13#include "PODVector.h"
14#include "PartitionedVector.h"
15#include "bmon/Clusterizer.h"
16#include "bmon/HitfindSetup.h"
17#include "tof/Hitfind.h" // for tof::HitfindMonitorData
18
19#include <gsl/span>
20#include <optional>
21#include <sstream>
22#include <vector>
23
24#include <xpu/host.h>
25
26namespace cbm::algo::bmon
27{
30
33 class Hitfind {
34 public:
36 using Output_t = std::tuple<PartitionedVector<Hit>, HitfindMonitorData, PODVector<int32_t>>;
37
41 explicit Hitfind(HitfindSetup setup, uint32_t nThreads = 1);
42
46 Output_t operator()(gsl::span<CbmBmonDigi> digisIn, uint32_t iThread = 0);
47
50 size_t GetDiamondIndex(uint32_t address) const { return ((fSelectionBitmask & address) >> fSelectionBitsOffset); }
51
54
55 private: // members
56 uint32_t fNofThreads;
59
60 std::vector<std::vector<Clusterizer>> fAlgo;
62 };
63} // namespace cbm::algo::bmon
A clusterizer algorithm for BMON.
Parameters of the BMON hitfinder.
Hit-finder steering class for BMON.
Hitfind(HitfindSetup setup, uint32_t nThreads=1)
Constructor.
uint32_t fSelectionBitmask
Selection bitmask.
Output_t operator()(gsl::span< CbmBmonDigi > digisIn, uint32_t iThread=0)
Algorithm execution operator.
std::vector< std::vector< Clusterizer > > fAlgo
Clusterizer algorithms [thread][diamond].
std::tuple< PartitionedVector< Hit >, HitfindMonitorData, PODVector< int32_t > > Output_t
Output format.
uint32_t fSelectionBitsOffset
Number of bits to ther right from the first bit in the selection mask.
PODVector< uint32_t > fDiamondAddress
Diamond address.
size_t GetDiamondIndex(uint32_t address) const
Returns an index of the diamond by the address.
uint32_t fNofThreads
Number of threads.
const PODVector< uint32_t > & GetDiamondAddresses() const
Gets diamond addresses vector.
tof::HitfindMonitorData HitfindMonitorData
TOF hit-finder monitor, re-used for BMON.
std::vector< T, PODAllocator< T > > PODVector
PODVector is a std::vector that doesn't initialize its elements.
Definition PODVector.h:17
Parameters for the BMON hitfinder.
Monitoring data for hitfinding.
Definition tof/Hitfind.h:30