8 #ifndef ICARUSCODE_PMT_TRIGGER_ALGORITHMS_BEAMGATESTRUCT_H
9 #define ICARUSCODE_PMT_TRIGGER_ALGORITHMS_BEAMGATESTRUCT_H
28 namespace icarus::trigger {
29 struct BeamGateStruct;
67 template <
typename Time>
69 using std::pair<Time, Time>::pair;
109 template <
typename Time = microseconds>
144 : fGate(icarus::trigger::
BeamGateMaker{detTimings}(duration, delay))
152 detTimings.toSimulationTime(fRangeElec.start()),
164 namespace icarus::trigger {
166 template <
typename Time>
172 out << range.
start() <<
" -- " << range.
end()
173 <<
" (duration: " << range.
duration() <<
")";
188 return { duration, delay, detTimings };
195 #endif // ICARUSCODE_PMT_TRIGGER_ALGORITHMS_BEAMGATESTRUCT_H
BeamGateStruct(microseconds duration, microseconds delay, detinfo::DetectorTimings const &detTimings)
Constructor: gate of specified duration and start.
TimeRange< simulation_time > const fRangeSim
Utility class expressing a time range.
icarus::trigger::OpticalTriggerGate const & asGate() const
Returns the gate as an OpticalTriggerGate (electronics time).
microseconds_as<> microseconds
Type of time interval stored in microseconds, in double precision.
std::ostream & operator<<(std::ostream &out, icarus::trigger::ApplyBeamGateClass const &gate)
icarus::trigger::OpticalTriggerGate const fGate
bool operator!=(BeamGateStruct const &other) const
util::quantities::intervals::microseconds microseconds
detinfo::timescales::simulation_time simulation_time
pure virtual base interface for detector clocks
Interface to detinfo::DetectorClocks.
TimeRange< electronics_time > const fRangeElec
detinfo::timescales::optical_tick optical_tick
TimeRange< simulation_time > const & asSimulationRange() const
Returns the gate as start/stop pair in simulation time scale.
timescale_traits< SimulationTimeCategory >::time_point_t simulation_time
A point in time on the simulation time scale.
TimeRange< optical_tick > const & asOptTickRange() const
Returns the gate as start/stop pair in optical ticks.
A trigger gate data object for optical detector electronics.
bool operator==(BeamGateStruct const &other) const
Comparison operators.
An interval (duration, length, distance) between two quantity points.
Object representing a time gate, with a start and and end.
timescale_traits< OpticalTimeCategory >::tick_t optical_tick
BeamGateStruct makeBeamGateStruct(detinfo::DetectorTimings const &detTimings, util::quantities::intervals::microseconds duration, util::quantities::intervals::microseconds delay=util::quantities::intervals::microseconds{0.0})
Creates a BeamGateStruct object of specified duration and start.
Logical multi-level gate associated to one or more waveforms.
Dimensioned variables representing space or time quantities.
A class exposing an upgraded interface of detinfo::DetectorClocksData.
Data types for detinfo::DetectorTimings.
Class to create an object representing a beam gate.
detinfo::timescales::electronics_time electronics_time
Simple utility to generate gates around beam time.
Time duration() const
Returns the time duration of the gate in the specified time unit.
TimeRange< electronics_time > const & asElectronicsTimeRange() const
Returns the gate as start/stop pair in electronics time scale.
timescale_traits< ElectronicsTimeCategory >::time_point_t electronics_time
A point in time on the electronics time scale.
TimeRange< optical_tick > const fRangeOpt