CbmRoot
Loading...
Searching...
No Matches
Definitions.h
Go to the documentation of this file.
1/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Felix Weiglhofer [committer] */
4#ifndef CBM_BASE_TYPES_H
5#define CBM_BASE_TYPES_H
6
7#include "MicrosliceDescriptor.hpp" // For fles::Subsystem
8#include "util/EnumDict.h"
9
10#include <cstdint>
11
12namespace cbm::algo
13{
14
15 // typealias for Rust-like fixed size integer types
16 using i8 = std::int8_t;
17 using u8 = std::uint8_t;
18 using i16 = std::int16_t;
19 using u16 = std::uint16_t;
20 using i32 = std::int32_t;
21 using u32 = std::uint32_t;
22 using i64 = std::int64_t;
23 using u64 = std::uint64_t;
24 using f32 = float;
25 using f64 = double;
26
27#ifdef CBM_ALGO_REAL64
28 using real = f64;
29#else
30 using real = f32;
31#endif
32
33 enum class Step
34 {
35 Unpack,
39 };
40
41 enum class RecoData
42 {
43 DigiTimeslice, //< Raw output from unpackers
44 DigiEvent, //< Digis after event building
45 Cluster,
46 Hit,
47 Track,
48 };
49
50 enum class Setup
51 {
55 };
56
81
82} // namespace cbm::algo
83
84CBM_ENUM_DICT(fles::Subsystem,
85 // CBM detectors
86 {"STS", fles::Subsystem::STS},
87 {"MVD", fles::Subsystem::MVD},
88 {"RICH", fles::Subsystem::RICH},
89 {"TRD", fles::Subsystem::TRD},
90 {"TRD2D", fles::Subsystem::TRD2D},
91 {"MUCH", fles::Subsystem::MUCH},
92 {"TOF", fles::Subsystem::TOF},
93
94 // Other detectors (experimental)
95 {"ECAL", fles::Subsystem::ECAL},
96 {"PSD", fles::Subsystem::PSD},
97 {"BMON", fles::Subsystem::BMON},
98 {"TRB3", fles::Subsystem::TRB3},
99 {"Hodoscope", fles::Subsystem::Hodoscope},
100 {"Cherenkov", fles::Subsystem::Cherenkov},
101 {"LeadGlass", fles::Subsystem::LeadGlass},
102
103 // FLES (pattern generators)
104 {"FLES", fles::Subsystem::FLES},
105);
106
108 {"Unpack", Step::Unpack},
109 {"DigiTrigger", Step::DigiTrigger},
110 {"LocalReco", Step::LocalReco},
111 {"Tracking", Step::Tracking}
112);
113
115 {"DigiTimeslice", RecoData::DigiTimeslice},
116 {"DigiEvent", RecoData::DigiEvent},
117 {"Cluster", RecoData::Cluster},
118 {"Hit", RecoData::Hit},
119 {"Track", RecoData::Track}
120);
121
123 {"mCBM2022", cbm::algo::Setup::mCBM2022},
124 {"mCBM2024_03", cbm::algo::Setup::mCBM2024_03},
125 {"mCBM2024_05", cbm::algo::Setup::mCBM2024_05}
126);
127
129 {"BeamBmon", cbm::algo::QaStep::BeamBmon},
130 {"UnpackBmon", cbm::algo::QaStep::UnpackBmon},
131 {"UnpackSts", cbm::algo::QaStep::UnpackSts},
132 {"UnpackMvd", cbm::algo::QaStep::UnpackMvd},
133 {"UnpackRich", cbm::algo::QaStep::UnpackRich},
134 {"UnpackTrd1d", cbm::algo::QaStep::UnpackTrd1d},
135 {"UnpackTrd2d", cbm::algo::QaStep::UnpackTrd2d},
136 {"UnpackMuch", cbm::algo::QaStep::UnpackMuch},
137 {"UnpackTof", cbm::algo::QaStep::UnpackTof},
138 {"UnpackFsd", cbm::algo::QaStep::UnpackFsd},
139 {"EventBuilding", cbm::algo::QaStep::EventBuilding},
140 {"RecoBmon", cbm::algo::QaStep::RecoBmon},
141 {"RecoSts", cbm::algo::QaStep::RecoSts},
142 {"RecoMvd", cbm::algo::QaStep::RecoMvd},
143 {"RecoRich", cbm::algo::QaStep::RecoRich},
144 {"RecoTrd1d", cbm::algo::QaStep::RecoTrd1d},
145 {"RecoTrd2d", cbm::algo::QaStep::RecoTrd2d},
146 {"RecoMuch", cbm::algo::QaStep::RecoMuch},
147 {"RecoTof", cbm::algo::QaStep::RecoTof},
148 {"RecoFsd", cbm::algo::QaStep::RecoFsd},
149 {"Tracking", cbm::algo::QaStep::Tracking}
150);
151
152#endif
#define CBM_ENUM_DICT(type,...)
Definition EnumDict.h:106
std::int64_t i64
Definition Definitions.h:22
std::int32_t i32
Definition Definitions.h:20
float f32
Definition Definitions.h:24
std::uint32_t u32
Definition Definitions.h:21
std::uint64_t u64
Definition Definitions.h:23
std::uint8_t u8
Definition Definitions.h:17
std::int16_t i16
Definition Definitions.h:18
std::int8_t i8
Definition Definitions.h:16
double f64
Definition Definitions.h:25
std::uint16_t u16
Definition Definitions.h:19