29 void RunHitFinder(std::vector<raw::OpDetWaveform>
const& opDetWaveformVector,
30 std::vector<recob::OpHit>& hitVector,
39 for (
auto const& waveform : opDetWaveformVector) {
40 const int channel =
static_cast<int>(waveform.ChannelNumber());
44 <<
"Error! unrecognized channel number " << channel <<
". Ignoring pulse";
51 auto const& pulses = threshAlg.
GetPulses();
53 const double timeStamp = waveform.TimeStamp();
55 for (
auto const& pulse : pulses)
72 std::vector<recob::OpHit>& hitVector,
77 if (pulse.
peak < hitThreshold)
return;
82 double relTime = absTime - clocksData.
TriggerTime();
93 PE = calibrator.
PE(pulse.
area, channel);
95 PE = calibrator.
PE(pulse.
peak, channel);
99 hitVector.emplace_back(channel,
virtual bool UseArea() const =0
virtual double PE(double adcs, int opchannel) const =0
bool IsValidOpChannel(int opChannel) const
Is this a valid OpChannel number?
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
constexpr int Frame() const noexcept
Returns the number of the frame containing the clock current time.
pure virtual base interface for detector clocks
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
void RunHitFinder(std::vector< raw::OpDetWaveform > const &opDetWaveformVector, std::vector< recob::OpHit > &hitVector, pmtana::PulseRecoManager const &pulseRecoMgr, pmtana::PMTPulseRecoBase const &threshAlg, geo::WireReadoutGeom const &wireReadoutGeom, float hitThreshold, detinfo::DetectorClocksData const &clocksData, calib::IPhotonCalibrator const &calibrator, bool use_start_time)
const pulse_param_array & GetPulses() const
A getter for the whole array of pulse_param struct object.
Interface for a class providing readout channel mapping to geometry.
bool Reconstruct(const pmtana::Waveform_t &) const
Implementation of ana_base::analyze method.
ElecClock const & OpticalClock() const noexcept
Borrow a const Optical clock with time set to Trigger time [us].
double TriggerTime() const
Trigger electronics clock time in [us].
void ConstructHit(float hitThreshold, int channel, double timeStamp, pmtana::pulse_param const &pulse, std::vector< recob::OpHit > &hitVector, detinfo::DetectorClocksData const &clocksData, calib::IPhotonCalibrator const &calibrator, bool use_start_time)
Contains all timing reference information for the detector.
Class def header for a class ElecClock.
Interface to geometry for wire readouts .
Class definition file of PulseRecoManager.