26 throw std::runtime_error(
"Mismatch of the selection bitmask in the BMON CalibrateSetup and HitfindSetup configs");
29 auto nDiamonds = calSetup.
diamonds.size();
30 if (nDiamonds != hitSetup.
diamonds.size()) {
31 throw std::runtime_error(
"Mismatch of number of diamonds in the BMON CalibrateSetup and HitfindSetup configs");
41 for (
const auto& calDiamond : calSetup.
diamonds) {
42 uint32_t address = calDiamond.refAddress &
~CbmTofAddress::GetChannelIdBitmask();
44 thisDiamond.address = address;
45 thisDiamond.nChannels = calDiamond.chanPar.size();
48 for (
const auto& hitDiamond : hitSetup.
diamonds) {
49 int32_t address = hitDiamond.refAddress &
~CbmTofAddress::GetChannelIdBitmask();
51 if (thisDiamond.address != address) {
52 throw std::runtime_error(
"Mismatch between diamond addresses in BMON CalibrateSetup and HitfindSetup configs");
54 thisDiamond.deadStrips = hitDiamond.deadStrips;
55 thisDiamond.timeRes = hitDiamond.timeRes;
56 thisDiamond.maxTimeDist = hitDiamond.maxTimeDist;
A BMON hitfinder QA parameter configuration.
CBM ToF interface class to the unique address.
BMON calibration per channel.
std::vector< Diamond > diamonds
A structure to handle BMON QA parameters.
HitfindQaParameters()=default
Default constructor.
size_t GetDiamondIndex(uint32_t address) const
Returns an index of the diamond by the address.
std::vector< Diamond > diamonds
uint32_t selectionMask
A bitmask to distinguish different diamonds.
uint32_t fSelectionBitsOffset
Number of bits to the right from the first bit in the selection mask.
Parameters for the BMON hitfinder.
std::vector< Diamond > diamonds