R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
SpecialParsing.h
Go to the documentation of this file.
1#pragma once
2
4#include "R3BMinMaxValue.h"
5#include "R3BValueError.h"
6#include <glaze/core/common.hpp>
7#include <glaze/core/meta.hpp>
8#include <glaze/core/wrappers.hpp>
9#include <magic_enum/magic_enum.hpp>
10#include <root/Math/Vector3Dfwd.h>
11
12template <>
13struct glz::meta<R3B::Digitizing::Neuland::Tamex::Params>
14{
16 static constexpr auto value = glz::object(&T::experimental_data_is_corrected_for_saturation,
28};
29
30template <>
31struct glz::meta<ROOT::Math::XYZVectorD>
32{
33 using T = ROOT::Math::XYZVectorD;
34 static constexpr auto read_x = [](T& vec, double input) -> void { vec.SetX(input); };
35 static constexpr auto read_y = [](T& vec, double input) -> void { vec.SetY(input); };
36 static constexpr auto read_z = [](T& vec, double input) -> void { vec.SetZ(input); };
37 static constexpr auto write_x = [](const T& vec) -> double { return vec.X(); };
38 static constexpr auto write_y = [](const T& vec) -> double { return vec.Y(); };
39 static constexpr auto write_z = [](const T& vec) -> double { return vec.Z(); };
40 static constexpr auto value = glz::object("x",
41 glz::custom<read_x, write_x>,
42 "y",
43 glz::custom<read_y, write_y>,
44 "z",
45 glz::custom<read_z, write_z>);
46};
47
48template <typename DataType>
49struct glz::meta<R3B::MinMaxValue<DataType>>
50{
52 static constexpr auto value = glz::object("min", &T::min, "max", &T::max);
53};
54
55template <typename DataType>
56struct glz::meta<R3B::ValueError<DataType>>
57{
59 static constexpr auto value = glz::object("value", &T::value, "error", &T::error);
60};
61
62template <typename EnumType>
63 requires std::is_enum_v<EnumType>
64struct glz::meta<EnumType>
65{
66 constexpr static auto value = magic_enum::enum_values<EnumType>();
67 constexpr static auto keys = magic_enum::enum_names<EnumType>();
68};
double energy_res_rel
Gaus(e, fEResRel * e) [].
double time_res
time + Gaus(0., fTimeRes) [ns]
double min_energy
minimal energy of a FQT peak [MeV]
double saturation_coefficient
Saturation coefficient of PMTs.
double pedestal
Energy offset parameter [ns].
bool experimental_data_is_corrected_for_saturation
Flag if saturation effect enabled.
static constexpr auto keys
static constexpr auto value
R3B::Digitizing::Neuland::Tamex::Params T