10 #ifndef SBNOBJ_ICARUS_PMT_TRIGGER_DATA_OPTICALTRIGGERGATE_H
11 #define SBNOBJ_ICARUS_PMT_TRIGGER_DATA_OPTICALTRIGGERGATE_H
33 namespace icarus::trigger {
34 class OpticalTriggerGate;
35 std::ostream&
operator<< (std::ostream&, OpticalTriggerGate
const&);
116 std::vector<raw::OpDetWaveform const*>
waveforms()
const
220 template <
typename Op>
276 #endif // SBNOBJ_ICARUS_PMT_TRIGGER_DATA_OPTICALTRIGGERGATE_H
static GateData_t::ChannelList_t waveformChannels(Waveforms_t const &waveforms)
Returns the list of all unique channels (sorted) from the waveforms.
std::vector< raw::OpDetWaveform const * > waveforms() const
ChannelID_t channel() const
Returns the channel associated to the gate data.
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
OpticalTriggerGate & Max(OpticalTriggerGate const &other)
Combines with a gate, keeping the maximum opening among the two.
static OpticalTriggerGate SymmetricCombination(Op &&op, OpticalTriggerGate const &a, OpticalTriggerGate const &b, TriggerGateTicks_t aDelay=TriggerGateTicks_t{0}, TriggerGateTicks_t bDelay=TriggerGateTicks_t{0})
Returns a gate combination of the openings of two other gates.
std::ostream & operator<<(std::ostream &out, icarus::trigger::ApplyBeamGateClass const &gate)
bool operator!=(OpticalTriggerGate const &) const
std::vector< ChannelID_t > ChannelList_t
Type of list of associated channels.
OpticalTriggerGate(raw::OpDetWaveform const &waveform)
Constructor: a closed gate for the channel in waveform.
ChannelIDType ChannelID_t
Type of stored channel ID.
bool add(raw::OpDetWaveform const &waveform)
Adds another waveform to the gate (unless it has already been added).
OpticalTriggerGate & Sum(OpticalTriggerGate const &other)
Combines with a gate, keeping the sum of openings of the two.
GateData_t & gateLevels()
Access to the underlying gate level data (mutable).
OpticalTriggerGate(GateEvolution_t &&gateLevel, Waveforms_t &&waveforms)
Protected constructor: set the data directly.
void registerWaveforms(Waveforms_t const &moreWaveforms)
Registers the waveforms from the specified list.
Logical multi-level gate associated to one or more readout channels.
static Waveforms_t mergeWaveforms(Waveforms_t const &a, Waveforms_t const &b)
Registers the waveforms from the other gate into this one.
icarus::trigger::ReadoutTriggerGate< TriggerGateTick_t, TriggerGateTicks_t, raw::Channel_t > OpticalTriggerGateData_t
Type of trigger gate data serialized into art data products.
OpticalTriggerGate & operator=(OpticalTriggerGate const &)=default
OpticalTriggerGate & Min(OpticalTriggerGate const &other)
Combines with a gate, keeping the minimum opening among the two.
util::quantities::tick::value_t TriggerGateTicks_t
Tick interval.
bool operator==(OpticalTriggerGate const &) const
static GateData_t::ChannelList_t extractChannels(Waveforms_t const &waveforms)
Returns the list of all channels from the waveforms (duplicate allowed).
T value_t
Type of the stored value.
util::quantities::tick::value_t TriggerGateTick_t
Tick point.
Dimensioned variables related to electronics.
ReadoutTriggerGate & operator=(ReadoutTriggerGate const &)=default
OpticalTriggerGate & Mul(OpticalTriggerGate const &other)
Combines with a gate, keeping the product of openings of the two.
std::vector< raw::OpDetWaveform const * > Waveforms_t
Internal list of registered waveforms.
Logical multi-level gate associated to one or more waveforms.
GateData_t::ChannelID_t ChannelID_t
Type of channel identifier.
A trigger gate data object associated to one or more channels.
Data types for detinfo::DetectorTimings.
std::vector< raw::OpDetWaveform const * > fWaveforms
List of waveforms involved in this channel.
typename Base_t::GateEvolution_t GateEvolution_t
GateData_t const & gateLevels() const
Access to the underlying gate level data (immutable).
void mergeWaveformsFromGate(OpticalTriggerGate const &other)
Registers the waveforms from the other gate into this one.
OpticalTriggerGate(ChannelID_t channel)
Constructor: a closed gate for the specified channel.
OpticalTriggerGate()=default
Constructor: a closed gate with no associated waveform (add() them).