1 #ifndef LARDATAALG_DETECTORINFO_DETECTORCLOCKSDATA_H
2 #define LARDATAALG_DETECTORINFO_DETECTORCLOCKSDATA_H
327 double const trigger_offset_tpc,
328 double const trig_time,
329 double const beam_time,
576 template <
typename Stream>
650 #endif // LARDATAALG_DETECTORINFO_DETECTORCLOCKSDATA_H
double OpticalTick2TrigTime(double const tick, size_t const sample, size_t const frame) const
double TPCTick2BeamTime(double const tick) const
double fTriggerOffsetTPC
Time offset from trigger to TPC readout start.
double ExternalTick2BeamTime(double const tick, size_t const sample, size_t const frame) const
ElecClock const & TPCClock() const noexcept
Borrow a const TPC clock with time set to Trigger time [us].
double OpticalTick2BeamTime(double const tick, size_t const sample, size_t const frame) const
double TPCG4Time2Tick(double const g4time) const
Given G4 time returns electronics clock count [tdc].
double TPCTick2Time(double const tick) const
Given TPC time-tick (waveform index), returns electronics clock [us].
double TriggerOffsetTPC() const
constexpr int Ticks() const noexcept
Current clock tick (that is, the number of tick Time() falls in).
double TPCTDC2Tick(double const tdc) const
Given electronics clock count [tdc] returns TPC time-tick.
double fBeamGateTime
BeamGate time in [us].
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
double doTPCTime() const
Implementation of TPCTime().
double fG4RefTime
Electronics clock counting start time in G4 time frame [us].
double BeamGateTime() const
Beam gate electronics clock time in [us].
double fTriggerTime
Trigger time in [us].
double TPCG4Time2TDC(double const g4time) const
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
double OpticalTick2TDC(double const tick, size_t const sample, size_t const frame) const
ElecClock const & TriggerClock() const noexcept
Borrow a const Trigger clock with time set to Trigger time [us].
double TriggerTime() const
Trigger electronics clock time in [us].
ElecClock const & OpticalClock() const noexcept
Borrow a const Optical clock with time set to Trigger time [us].
DetectorClocksData(double const g4_ref_time, double const trigger_offset_tpc, double const trig_time, double const beam_time, ElecClock const &tpc_clock, ElecClock const &optical_clock, ElecClock const &trigger_clock, ElecClock const &external_clock)
Returns a complete detinfo::DetectorClocksData object.
double ExternalG4Time2TDC(double const g4time) const
double G4ToElecTime(double const g4_time) const
double OpticalG4Time2TDC(double const g4time) const
Contains all timing reference information for the detector.
double ExternalTick2TDC(double const tick, size_t const sample, size_t const frame) const
double OpticalTick2Time(double const tick, size_t const sample, size_t const frame) const
double ExternalTick2TrigTime(double const tick, size_t const sample, size_t const frame) const
int trigger_offset(DetectorClocksData const &data)
constexpr double Frequency() const
Frequency in MHz.
Class def header for a class ElecClock.
double TPCTick2TrigTime(double const tick) const
double doTime2Tick(double const time) const
Implementation of Time2Tick().
Class representing the time measured by an electronics clock.
ElecClock const & ExternalClock() const noexcept
Borrow a const Trigger clock with time set to External Time [us].
constexpr double Time() const noexcept
Current time (as stored) in microseconds.
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
void debugReport(Stream &out) const
double TPCTick2TDC(double const tick) const
double Time2Tick(double const time) const
Returns the specified electronics time in TDC electronics ticks.
double ExternalTick2Time(double const tick, size_t const sample, size_t const frame) const