CbmRoot
Loading...
Searching...
No Matches
tof/HitfindSetup.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_HITFIND_SETUP_H
5#define CBM_ALGO_DETECTOR_TOF_HITFIND_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{
17
22 struct HitfindSetup {
23
24 struct Cell {
25 double sizeX;
26 double sizeY;
27 std::array<double, 3> translation;
28 std::array<double, 9> rotation;
29
30 CBM_YAML_PROPERTIES(yaml::Property(&Cell::sizeX, "sizeX", "size in X direction"),
31 yaml::Property(&Cell::sizeY, "sizeY", "size in Y direction"),
32 yaml::Property(&Cell::translation, "translation", "Translation vector", YAML::Flow),
33 yaml::Property(&Cell::rotation, "rotation", "Rotation matrix", YAML::Flow));
34 };
35
36 struct Channel {
38
39 CBM_YAML_PROPERTIES(yaml::Property(&Channel::address, "address", "unique address", YAML::Hex));
40 };
41
42 struct Rpc {
47 double sigVel;
48 double timeRes;
53 std::vector<double> CPTOffY;
54 std::vector<Channel> chanPar;
55
56 CBM_YAML_PROPERTIES(yaml::Property(&Rpc::deadStrips, "deadStrips", "bit mask for dead strips"),
57 yaml::Property(&Rpc::posYMaxScal, "posYMaxScal", "maximum value of y position"),
58 yaml::Property(&Rpc::maxTimeDist, "maxTimeDist", "maximum time distance"),
59 yaml::Property(&Rpc::maxSpaceDist, "maxSpaceDist", "maximum space distance"),
60 yaml::Property(&Rpc::sigVel, "sigVel", "signal velocity"),
61 yaml::Property(&Rpc::timeRes, "timeRes", "time resolution"),
62 yaml::Property(&Rpc::cell, "cell", "cell parameters"),
63 yaml::Property(&Rpc::trackingStationId, "trackingStationId", "tracking station index"),
64 yaml::Property(&Rpc::CPTOffYBinWidth, "CPTOffYBinWidth", "CPT Y offset bin width"),
65 yaml::Property(&Rpc::CPTOffYRange, "CPTOffYRange", "CPT Y offset range"),
66 yaml::Property(&Rpc::CPTOffY, "CPTOffY", "CPT Y offset array"),
67 yaml::Property(&Rpc::chanPar, "chanPar", "channel parameters"));
68 };
69
70 std::vector<int32_t> NbSm;
71 std::vector<int32_t> NbRpc;
72 std::vector<std::vector<Rpc>> rpcs;
73
74 CBM_YAML_PROPERTIES(yaml::Property(&HitfindSetup::NbSm, "NbSm", "Number of SMs per super module type", {}, YAML::Flow),
75 yaml::Property(&HitfindSetup::NbRpc, "NbRpc", "Number of RPCs per super module type", {}, YAML::Flow),
76 yaml::Property(&HitfindSetup::rpcs, "rpcs", "Parameters of RPCs"));
77 };
78
79
80} // namespace cbm::algo::tof
81
82#endif // CBM_ALGO_DETECTOR_TOF_HITFIND_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::uint32_t u32
Definition Definitions.h:21
CBM_YAML_PROPERTIES(yaml::Property(&Cell::sizeX, "sizeX", "size in X direction"), yaml::Property(&Cell::sizeY, "sizeY", "size in Y direction"), yaml::Property(&Cell::translation, "translation", "Translation vector", YAML::Flow), yaml::Property(&Cell::rotation, "rotation", "Rotation matrix", YAML::Flow))
std::array< double, 3 > translation
CBM_YAML_PROPERTIES(yaml::Property(&Channel::address, "address", "unique address", YAML::Hex))
CBM_YAML_PROPERTIES(yaml::Property(&Rpc::deadStrips, "deadStrips", "bit mask for dead strips"), yaml::Property(&Rpc::posYMaxScal, "posYMaxScal", "maximum value of y position"), yaml::Property(&Rpc::maxTimeDist, "maxTimeDist", "maximum time distance"), yaml::Property(&Rpc::maxSpaceDist, "maxSpaceDist", "maximum space distance"), yaml::Property(&Rpc::sigVel, "sigVel", "signal velocity"), yaml::Property(&Rpc::timeRes, "timeRes", "time resolution"), yaml::Property(&Rpc::cell, "cell", "cell parameters"), yaml::Property(&Rpc::trackingStationId, "trackingStationId", "tracking station index"), yaml::Property(&Rpc::CPTOffYBinWidth, "CPTOffYBinWidth", "CPT Y offset bin width"), yaml::Property(&Rpc::CPTOffYRange, "CPTOffYRange", "CPT Y offset range"), yaml::Property(&Rpc::CPTOffY, "CPTOffY", "CPT Y offset array"), yaml::Property(&Rpc::chanPar, "chanPar", "channel parameters"))
Hitfind setup / Hardware cabling for TOF Used to create the hardware mapping for the TOF hitfinder.
CBM_YAML_PROPERTIES(yaml::Property(&HitfindSetup::NbSm, "NbSm", "Number of SMs per super module type", {}, YAML::Flow), yaml::Property(&HitfindSetup::NbRpc, "NbRpc", "Number of RPCs per super module type", {}, YAML::Flow), yaml::Property(&HitfindSetup::rpcs, "rpcs", "Parameters of RPCs"))
std::vector< std::vector< Rpc > > rpcs
std::vector< int32_t > NbSm
std::vector< int32_t > NbRpc