CbmRoot
Loading...
Searching...
No Matches
CalibrateSetup.h
Go to the documentation of this file.
1/* Copyright (C) 2023 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dominik Smith [committer] */
4#ifndef CBM_ALGO_DETECTOR_TOF_CALIBRATE_SETUP_H
5#define CBM_ALGO_DETECTOR_TOF_CALIBRATE_SETUP_H
6
7#include "Definitions.h"
8#include "yaml/Property.h"
9
10#include <array>
11#include <map>
12#include <string>
13#include <vector>
14
15namespace cbm::algo::tof
16{
21
22 struct Channel {
23 std::vector<double> vCPTOff;
24 std::vector<double> vCPTotGain;
25 std::vector<double> vCPTotOff;
26 std::vector<std::vector<double>> vCPWalk;
27
29 yaml::Property(&Channel::vCPTotGain, "vCPTotGain", "CP time over threshold gain"),
30 yaml::Property(&Channel::vCPTotOff, "vCPTotOff", "CP time over threshold offset"),
31 yaml::Property(&Channel::vCPWalk, "vCPWalk", "CP walk correction", YAML::Block, YAML::Flow));
32 };
33
34 struct Rpc {
36 double TOTMax;
37 double TOTMin;
40 std::vector<Channel> chanPar;
41
42 CBM_YAML_PROPERTIES(yaml::Property(&Rpc::numClWalkBinX, "numClWalkBinX", "number of walk correction bins"),
43 yaml::Property(&Rpc::TOTMax, "TOTMax", "maximum time over threshold"),
44 yaml::Property(&Rpc::TOTMin, "TOTMin", "minimum time over threshold"),
45 yaml::Property(&Rpc::swapChannelSides, "swapChannelSides", "flag for swapping channel sides"),
46 yaml::Property(&Rpc::channelDeadtime, "channelDeadtime", "channel dead time"),
47 yaml::Property(&Rpc::chanPar, "chanPar", "channel parameters"));
48 };
49
50 /* Members */
51 std::vector<int32_t> NbSm;
52 std::vector<int32_t> NbRpc;
53 std::vector<std::vector<Rpc>> rpcs;
54
56 yaml::Property(&CalibrateSetup::NbSm, "NbSm", "Number of SMs per super module type", {}, YAML::Flow),
57 yaml::Property(&CalibrateSetup::NbRpc, "NbRpc", "Number of RPCs per super module type", {}, YAML::Flow),
58 yaml::Property(&CalibrateSetup::rpcs, "rpcs", "Parameters of RPCs"));
59 };
60
61} // namespace cbm::algo::tof
62
63#endif // CBM_ALGO_DETECTOR_TOF_CALIBRATE_SETUP_H
Property(T Class::*member, std::string_view key, std::string_view description) -> Property< Class, T >
std::int32_t i32
Definition Definitions.h:20
std::vector< std::vector< double > > vCPWalk
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(&Rpc::numClWalkBinX, "numClWalkBinX", "number of walk correction bins"), yaml::Property(&Rpc::TOTMax, "TOTMax", "maximum time over threshold"), yaml::Property(&Rpc::TOTMin, "TOTMin", "minimum time over threshold"), yaml::Property(&Rpc::swapChannelSides, "swapChannelSides", "flag for swapping channel sides"), yaml::Property(&Rpc::channelDeadtime, "channelDeadtime", "channel dead time"), yaml::Property(&Rpc::chanPar, "chanPar", "channel parameters"))
TOF calibration setup.
std::vector< int32_t > NbSm
std::vector< int32_t > NbRpc
std::vector< std::vector< Rpc > > rpcs
CBM_YAML_PROPERTIES(yaml::Property(&CalibrateSetup::NbSm, "NbSm", "Number of SMs per super module type", {}, YAML::Flow), yaml::Property(&CalibrateSetup::NbRpc, "NbRpc", "Number of RPCs per super module type", {}, YAML::Flow), yaml::Property(&CalibrateSetup::rpcs, "rpcs", "Parameters of RPCs"))