CbmRoot
Loading...
Searching...
No Matches
bmon/CalibrateSetup.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 "Definitions.h"
13#include "yaml/Property.h"
14
15#include <array>
16#include <map>
17#include <string>
18#include <vector>
19
20namespace cbm::algo::bmon
21{
25 // FIXME: remove 'v' from non-vector variable names
26 struct Channel {
27 double vCPTOff;
28 double vCPTotGain;
29 double vCPTotOff;
30 std::vector<double> vCPWalk;
31
33 yaml::Property(&Channel::vCPTotGain, "vCPTotGain", "CP time over threshold gain"),
34 yaml::Property(&Channel::vCPTotOff, "vCPTotOff", "CP time over threshold offset"),
35 yaml::Property(&Channel::vCPWalk, "vCPWalk", "CP walk correction", YAML::Block, YAML::Flow));
36 };
37
38 struct Diamond {
39 uint32_t refAddress;
41 double TOTMax;
42 double TOTMin;
44 std::vector<Channel> chanPar;
45
47 yaml::Property(&Diamond::refAddress, "refAddress", "reference HW address to distinguish this BMON"),
48 yaml::Property(&Diamond::numClWalkBinX, "numClWalkBinX", "number of walk correction bins"),
49 yaml::Property(&Diamond::TOTMax, "TOTMax", "maximum time over threshold"),
50 yaml::Property(&Diamond::TOTMin, "TOTMin", "minimum time over threshold"),
51 yaml::Property(&Diamond::channelDeadtime, "channelDeadtime", "channel dead time"),
52 yaml::Property(&Diamond::chanPar, "chanPar", "channel parameters"));
53 };
54
55 /* Members */
56 uint32_t selectionMask;
57 std::vector<Diamond> diamonds;
58
60 yaml::Property(&CalibrateSetup::selectionMask, "selectionMask", "A bit mask to distinguish between different diamonds"),
61 yaml::Property(&CalibrateSetup::diamonds, "diamonds", "Parameters of each diamond"));
62 };
63
64} // namespace cbm::algo::bmon
CBM_YAML_PROPERTIES(yaml::Property(&Channel::vCPTOff, "vCPTOff", "CPT offset"), yaml::Property(&Channel::vCPTotGain, "vCPTotGain", "CP time over threshold gain"), yaml::Property(&Channel::vCPTotOff, "vCPTotOff", "CP time over threshold offset"), yaml::Property(&Channel::vCPWalk, "vCPWalk", "CP walk correction", YAML::Block, YAML::Flow))
CBM_YAML_PROPERTIES(yaml::Property(&Diamond::refAddress, "refAddress", "reference HW address to distinguish this BMON"), yaml::Property(&Diamond::numClWalkBinX, "numClWalkBinX", "number of walk correction bins"), yaml::Property(&Diamond::TOTMax, "TOTMax", "maximum time over threshold"), yaml::Property(&Diamond::TOTMin, "TOTMin", "minimum time over threshold"), yaml::Property(&Diamond::channelDeadtime, "channelDeadtime", "channel dead time"), yaml::Property(&Diamond::chanPar, "chanPar", "channel parameters"))
BMON calibration per channel.
CBM_YAML_PROPERTIES(yaml::Property(&CalibrateSetup::selectionMask, "selectionMask", "A bit mask to distinguish between different diamonds"), yaml::Property(&CalibrateSetup::diamonds, "diamonds", "Parameters of each diamond"))