Algorithm to produce trigger gates out of optical readout waveforms. More...
#include <TriggerGateBuilder.h>
Classes | |
struct | Config |
class | TriggerGates |
Container of logical gates for all triggering channels for a threshold. More... | |
Public Types | |
using | Channel_t = raw::Channel_t |
Public Member Functions | |
TriggerGateBuilder (Config const &config) | |
Constructor: sets the configuration. More... | |
virtual | ~TriggerGateBuilder ()=default |
Virtual destructor. Nothing special about it, except that it's virtual. More... | |
virtual void | setup (detinfo::DetectorTimings const &timings) |
Algorithm setup. More... | |
virtual void | reset () |
Algorithm reset. It will require a new setup before using it again. More... | |
virtual void | resetup (detinfo::DetectorTimings const &timings) |
Resets and sets up. More... | |
virtual void | resetup (detinfo::DetectorTimings const &timings, std::vector< ADCCounts_t > const &thresholds) |
Resets and sets up (including a new set of thresholds). More... | |
virtual std::vector< TriggerGates > | build (std::vector< WaveformWithBaseline > const &waveforms) const =0 |
Returns a collection of TriggerGates objects sorted by threshold. More... | |
std::vector< ADCCounts_t > const & | channelThresholds () const |
Returns all the configured thresholds. More... | |
std::size_t | nChannelThresholds () const |
Returns the number of configured thresholds. More... | |
optical_tick | timeToOpticalTick (microsecond time) const |
Converts a time [s] into optical ticks. More... | |
optical_tick | timeStampToOpticalTick (raw::TimeStamp_t time) const |
Converts a timestamp from raw::OpDetWaveform into optical ticks. More... | |
Static Public Member Functions | |
static constexpr bool | isValidChannel (Channel_t channel) |
Returns whether channel is valid. More... | |
Static Public Attributes | |
static constexpr Channel_t | InvalidChannel = std::numeric_limits<Channel_t>::max() |
Mnemonic for an invalid optical detector channel. More... | |
Protected Member Functions | |
detinfo::DetectorTimings const & | detTimings () const |
Returns a detector timings object. More... | |
std::vector< TriggerGates > | prepareAllGates () const |
virtual void | doSetThresholds (std::vector< ADCCounts_t > const &thresholds) |
Sets all thresholds anew. More... | |
Private Attributes | |
std::vector< ADCCounts_t > | fChannelThresholds |
All single channel thresholds, sorted in increasing order. More... | |
std::optional < detinfo::DetectorTimings > | fDetTimings |
LArSoft detector timing utility. More... | |
Algorithm to produce trigger gates out of optical readout waveforms.
This is an abstract class. Derived algorithms need to provide a way to actually build()
the gates.
Definition at line 102 of file TriggerGateBuilder.h.
Definition at line 108 of file TriggerGateBuilder.h.
icarus::trigger::TriggerGateBuilder::TriggerGateBuilder | ( | Config const & | config | ) |
Constructor: sets the configuration.
Definition at line 129 of file TriggerGateBuilder.cxx.
|
virtualdefault |
Virtual destructor. Nothing special about it, except that it's virtual.
|
pure virtual |
Returns a collection of TriggerGates
objects sorted by threshold.
Implemented in icarus::trigger::FixedTriggerGateBuilder, and icarus::trigger::DynamicTriggerGateBuilder.
|
inline |
Returns all the configured thresholds.
Definition at line 220 of file TriggerGateBuilder.h.
|
inlineprotected |
Returns a detector timings object.
Definition at line 241 of file TriggerGateBuilder.h.
|
inlineprotectedvirtual |
Sets all thresholds anew.
Definition at line 248 of file TriggerGateBuilder.h.
|
inlinestatic |
Returns whether channel
is valid.
Definition at line 235 of file TriggerGateBuilder.h.
|
inline |
Returns the number of configured thresholds.
Definition at line 224 of file TriggerGateBuilder.h.
|
protected |
Creates an empty TriggerGates object for each threshold; thresholds are kept relative.
Definition at line 172 of file TriggerGateBuilder.cxx.
|
inlinevirtual |
Algorithm reset. It will require a new setup before using it again.
Definition at line 202 of file TriggerGateBuilder.h.
|
inlinevirtual |
Resets and sets up.
Definition at line 205 of file TriggerGateBuilder.h.
|
inlinevirtual |
Resets and sets up (including a new set of thresholds).
Definition at line 209 of file TriggerGateBuilder.h.
|
virtual |
Algorithm setup.
Reimplemented in icarus::trigger::FixedTriggerGateBuilder.
Definition at line 148 of file TriggerGateBuilder.cxx.
auto icarus::trigger::TriggerGateBuilder::timeStampToOpticalTick | ( | raw::TimeStamp_t | time | ) | const |
Converts a timestamp from raw::OpDetWaveform
into optical ticks.
Definition at line 165 of file TriggerGateBuilder.cxx.
auto icarus::trigger::TriggerGateBuilder::timeToOpticalTick | ( | microsecond | time | ) | const |
Converts a time [s] into optical ticks.
Definition at line 156 of file TriggerGateBuilder.cxx.
|
private |
All single channel thresholds, sorted in increasing order.
Definition at line 256 of file TriggerGateBuilder.h.
|
private |
LArSoft detector timing utility.
Definition at line 264 of file TriggerGateBuilder.h.
|
static |
Mnemonic for an invalid optical detector channel.
Definition at line 112 of file TriggerGateBuilder.h.