Fixed-length gate builder. More...
#include <FixedTriggerGateBuilder.h>
Classes | |
struct | Config |
class | FixedGateManager |
Public Member Functions | |
FixedTriggerGateBuilder (Config const &config) | |
Constructor: sets the configuration. More... | |
virtual void | setup (detinfo::DetectorTimings const &timings) override |
Algorithm setup. More... | |
virtual std::vector< TriggerGates > | build (std::vector< WaveformWithBaseline > const &waveforms) const override |
Returns a collection of TriggerGates objects sorted by threshold. More... | |
Public Member Functions inherited from icarus::trigger::TriggerGateBuilder | |
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 | 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... | |
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... | |
Private Types | |
using | Base_t = icarus::trigger::ManagedTriggerGateBuilder |
Private Attributes | |
microsecond | fGateDuration |
Duration of a channel gate [s]. More... | |
optical_time_ticks | fGateTicks |
Duration of a channel gate [ticks]. More... | |
bool const | fExtendGate |
Whether gate opening time can be extended. More... | |
Additional Inherited Members | |
Public Types inherited from icarus::trigger::TriggerGateBuilder | |
using | Channel_t = raw::Channel_t |
Static Public Member Functions inherited from icarus::trigger::TriggerGateBuilder | |
static constexpr bool | isValidChannel (Channel_t channel) |
Returns whether channel is valid. More... | |
Static Public Attributes inherited from icarus::trigger::TriggerGateBuilder | |
static constexpr Channel_t | InvalidChannel = std::numeric_limits<Channel_t>::max() |
Mnemonic for an invalid optical detector channel. More... | |
Protected Member Functions inherited from icarus::trigger::ManagedTriggerGateBuilder | |
template<typename GateMgr > | |
std::vector< TriggerGates > | unifiedBuild (GateMgr &&gateManager, std::vector< WaveformWithBaseline > const &waveforms) const |
Returns a collection of TriggerGates objects sorted by threshold. More... | |
template<typename GateInfo , typename Waveforms > | |
void | buildChannelGates (std::vector< GateInfo > &channelGates, Waveforms const &channelWaveforms) const |
Computes the gates for all the waveforms in one optical channel. More... | |
Protected Member Functions inherited from icarus::trigger::TriggerGateBuilder | |
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... | |
Fixed-length gate builder.
Gates are opened when the waveform transits above threshold, and closed a fixed time after that. Optionally, if a transition happens when the gate is already open, the opening can be extended by another fixed time; otherwise, the opening time is considered dead time and transitions occurring in that while will be ignored.
Note that gates at higher thresholds are usually not contained in the ones with lower thresholds: the former ones start later and end later. Also, transitions on higher thresholds do not affect the lower threshold gates. For example, if the thresholds are at 50 and 100 counts, and the waveforms raises to 110, then starts oscillating between 90 and 110 counts, the gate for threshold 100 will be reopened or kept open, but the one for threshold 50 will close after the fixed time has elapsed and stay closed as long as no transition from under 50 to 50 or more happens.
Definition at line 68 of file FixedTriggerGateBuilder.h.
|
private |
Definition at line 71 of file FixedTriggerGateBuilder.h.
icarus::trigger::FixedTriggerGateBuilder::FixedTriggerGateBuilder | ( | Config const & | config | ) |
Constructor: sets the configuration.
Definition at line 22 of file FixedTriggerGateBuilder.cxx.
|
inlineoverridevirtual |
Returns a collection of TriggerGates
objects sorted by threshold.
Implements icarus::trigger::TriggerGateBuilder.
Definition at line 171 of file FixedTriggerGateBuilder.h.
|
overridevirtual |
Algorithm setup.
Reimplemented from icarus::trigger::TriggerGateBuilder.
Definition at line 31 of file FixedTriggerGateBuilder.cxx.
|
private |
Whether gate opening time can be extended.
Definition at line 184 of file FixedTriggerGateBuilder.h.
|
private |
Duration of a channel gate [s].
Definition at line 180 of file FixedTriggerGateBuilder.h.
|
private |
Duration of a channel gate [ticks].
Definition at line 182 of file FixedTriggerGateBuilder.h.