All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Types | Private Attributes | List of all members
icarus::trigger::FixedTriggerGateBuilder Class Reference

Fixed-length gate builder. More...

#include <FixedTriggerGateBuilder.h>

Inheritance diagram for icarus::trigger::FixedTriggerGateBuilder:
icarus::trigger::ManagedTriggerGateBuilder icarus::trigger::TriggerGateBuilder icarus::trigger::FixedTriggerGateBuilderTool

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< TriggerGatesbuild (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< TriggerGatesunifiedBuild (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< TriggerGatesprepareAllGates () const
 
virtual void doSetThresholds (std::vector< ADCCounts_t > const &thresholds)
 Sets all thresholds anew. More...
 

Detailed Description

Fixed-length gate builder.

See Also
icarus::trigger::DynamicTriggerGateBuilder

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.

Member Typedef Documentation

Definition at line 71 of file FixedTriggerGateBuilder.h.

Constructor & Destructor Documentation

icarus::trigger::FixedTriggerGateBuilder::FixedTriggerGateBuilder ( Config const &  config)

Constructor: sets the configuration.

Definition at line 22 of file FixedTriggerGateBuilder.cxx.

23  : Base_t(config)
24  , fGateDuration(config.GateDuration())
25  , fExtendGate(config.ExtendGate())
26 {}
microsecond fGateDuration
Duration of a channel gate [s].
icarus::trigger::ManagedTriggerGateBuilder Base_t
bool const fExtendGate
Whether gate opening time can be extended.

Member Function Documentation

virtual std::vector<TriggerGates> icarus::trigger::FixedTriggerGateBuilder::build ( std::vector< WaveformWithBaseline > const &  waveforms) const
inlineoverridevirtual

Returns a collection of TriggerGates objects sorted by threshold.

Implements icarus::trigger::TriggerGateBuilder.

Definition at line 171 of file FixedTriggerGateBuilder.h.

172  {
173  return unifiedBuild(FixedGateManager(fGateTicks, fExtendGate), waveforms);
174  }
optical_time_ticks fGateTicks
Duration of a channel gate [ticks].
bool const fExtendGate
Whether gate opening time can be extended.
std::vector< TriggerGates > unifiedBuild(GateMgr &&gateManager, std::vector< WaveformWithBaseline > const &waveforms) const
Returns a collection of TriggerGates objects sorted by threshold.
void icarus::trigger::FixedTriggerGateBuilder::setup ( detinfo::DetectorTimings const &  timings)
overridevirtual

Algorithm setup.

Reimplemented from icarus::trigger::TriggerGateBuilder.

Definition at line 31 of file FixedTriggerGateBuilder.cxx.

32 {
33  Base_t::setup(timings);
34 
35  fGateTicks = timings.toTicks<optical_time_ticks>(fGateDuration);
36 
37 } // icarus::trigger::FixedTriggerGateBuilder::setup()
virtual void setup(detinfo::DetectorTimings const &timings)
Algorithm setup.
microsecond fGateDuration
Duration of a channel gate [s].
optical_time_ticks fGateTicks
Duration of a channel gate [ticks].
timescale_traits< OpticalTimeCategory >::tick_interval_t optical_time_ticks

Member Data Documentation

bool const icarus::trigger::FixedTriggerGateBuilder::fExtendGate
private

Whether gate opening time can be extended.

Definition at line 184 of file FixedTriggerGateBuilder.h.

microsecond icarus::trigger::FixedTriggerGateBuilder::fGateDuration
private

Duration of a channel gate [s].

Definition at line 180 of file FixedTriggerGateBuilder.h.

optical_time_ticks icarus::trigger::FixedTriggerGateBuilder::fGateTicks
private

Duration of a channel gate [ticks].

Definition at line 182 of file FixedTriggerGateBuilder.h.


The documentation for this class was generated from the following files: