20 #include <type_traits>
29 static inline std::optional<std::size_t> findIndexByPdg(std::int32_t
pdg) {
33 auto pos = std::find(beg,
end, pdg);
41 template <
typename ColumnContainer>
42 static inline auto findByPdg(std::int32_t pdg,
const ColumnContainer& column)
43 -> std::optional<std::decay_t<decltype(column[0])>> {
47 auto index = findIndexByPdg(pdg);
51 return column[*
index];
54 static constexpr
inline float extractCharge(
float value) {
59 static constexpr
inline float extractMass(
float value) {
71 return extractCharge(*
charge);
80 return extractMass(*
mass);
88 auto index = findIndexByPdg(pdg);
104 os << static_cast<std::int32_t>(
pdg);