83 using Hits = std::vector<Hit>;
148class fmt::formatter<
R3B::Digitizing::ChannelHit>
151 static constexpr auto parse(format_parse_context& ctx) {
return ctx.end(); }
152 template <
typename FmtContent>
155 return format_to(ctn.out(),
156 "{{qdc: {}, tdc: {}, adcUnSat: {}, side: {}}}",
165class fmt::formatter<
R3B::Digitizing::ChannelCalSignal>
168 static constexpr auto parse(format_parse_context& ctx) {
return ctx.end(); }
169 template <
typename FmtContent>
172 return format_to(ctn.out(),
"{{ToT: {}, Leading edge: {}, side: {}}}", signal.
tot, signal.
tle, signal.
side);
177class fmt::formatter<
R3B::Digitizing::ChannelSignal>
180 static constexpr auto parse(format_parse_context& ctx) {
return ctx.end(); }
181 template <
typename FmtContent>
184 return format_to(ctn.out(),
"{{time: {} ns, light dep: {} MeV}}", hit.
time, hit.
intensity);
void AddSignal(const Signal &signal)
int signal_size_
Size of the signal inputs.
void Reset()
Reset the data in the Channel for the new event.
ChannelCalSignal CalSignal
AbstractPaddle * paddle_
pointer to the paddle who owns this channel
virtual void construct_hits(Hits &signals)=0
std::vector< CalSignal > CalSignals
static auto GetDefaultRandomGen() -> TRandom3 &
auto GetSignalSize() const -> int
virtual void extra_reset()
AbstractChannel(R3B::Side side, bool has_cal_output=false)
bool has_cal_output_
Flag of whether cal output is enabled.
auto GetTrigTime() const -> double
virtual ~AbstractChannel()=default
auto GetHits() const -> const Hits &
void AttachToPaddle(AbstractPaddle *paddle)
virtual auto HasFired() -> bool
AbstractChannel(const AbstractChannel &other)=delete
auto GetCalSignals() const -> const CalSignals &
virtual void add_signal(Signal signal)=0
virtual void pre_construct()
R3B::Side side_
side of the channel
auto GetSide() const -> R3B::Side
CalSignals cal_signals_
output cal signals from the channel
void EnableCal(bool is_enabled=true)
void calculate_trig_time()
Hits hits_
output hits from the channel
auto GetPaddle() const -> AbstractPaddle *
auto operator=(const AbstractChannel &other) -> AbstractChannel &=delete
double trig_time_
trigger time of the channel
virtual void construct_cal_signals(CalSignals &cal_signals) const
AbstractChannel(AbstractChannel &&other)=default
void SetPaddle(AbstractPaddle *v_paddle)
auto operator=(AbstractChannel &&other) -> AbstractChannel &=delete
ChannelCalSignal()=default
ChannelSignal(double time_val, double intensity_val)
Constructor with two input values.
ChannelSignal()=default
Default constructor.
double time
Time value of the channel signal.
double intensity
Intensity of the channel signal.
auto operator<(const ChannelSignal &rhs) const -> bool
Less operator between two channel signals.