28 ANALYSISTREE_ATTR_NODISCARD Floating_t GetSignal()
const {
return signal_; }
29 ANALYSISTREE_ATTR_NODISCARD ShortInt_t GetNumber()
const {
return number_; }
31 void SetSignal(Floating_t signal) { signal_ = signal; }
32 void SetNumber(ShortInt_t number) { number_ = number; }
34 friend bool operator==(
const Module& that,
const Module& other);
37 T GetField(Integer_t iField)
const {
39 return Container::GetField<T>(iField);
42 case ModuleFields::kNumber:
return GetNumber();
43 case ModuleFields::kSignal:
return GetSignal();
44 case ModuleFields::kId:
return GetId();
45 default:
throw std::out_of_range(
"Module::GetField - Index " + std::to_string(iField) +
" is not found");
51 void SetField(T value, Int_t field_id) {
53 Container::SetField(value, field_id);
56 case ModuleFields::kSignal: signal_ = value;
break;
57 case ModuleFields::kNumber: number_ = value;
break;
58 case ModuleFields::kId:
break;
59 default:
throw std::runtime_error(
"Unknown field");
64 void Print()
const noexcept override;
67 Floating_t signal_{0.f};
68 ShortInt_t number_{UndefValueShort};
70 ClassDefOverride(
Module, 2)
85 ANALYSISTREE_ATTR_NODISCARD TVector3 GetPosition()
const noexcept {
86 return TVector3(x_, y_, z_);
89 void SetPosition(
const TVector3& position)
noexcept {
95 void SetPosition(Double_t x, Double_t y, Double_t z)
noexcept {
101 ANALYSISTREE_ATTR_NODISCARD
inline Floating_t GetX()
const noexcept {
return x_; }
102 ANALYSISTREE_ATTR_NODISCARD
inline Floating_t GetY()
const noexcept {
return y_; }
103 ANALYSISTREE_ATTR_NODISCARD
inline Floating_t GetZ()
const noexcept {
return z_; }
104 ANALYSISTREE_ATTR_NODISCARD
inline Floating_t GetPhi()
const noexcept {
return atan2(y_, x_); }
109 Floating_t x_{UndefValueFloat};
110 Floating_t y_{UndefValueFloat};
111 Floating_t z_{UndefValueFloat};