29 RunHitFinder(std::vector<raw::OpDetWaveform>
const& opDetWaveformVector,
30 std::vector<recob::OpHit>& hitVector,
40 for (
auto const& waveform : opDetWaveformVector) {
42 const int channel =
static_cast<int>(waveform.ChannelNumber());
46 <<
"Error! unrecognized channel number " << channel <<
". Ignoring pulse";
53 auto const& pulses = threshAlg.
GetPulses();
55 const double timeStamp = waveform.TimeStamp();
57 for (
auto const& pulse : pulses)
58 ConstructHit(hitThreshold, channel, timeStamp, pulse, hitVector, clocksData, calibrator, use_start_time);
68 std::vector<recob::OpHit>& hitVector,
74 if (pulse.
peak < hitThreshold)
return;
78 double relTime = absTime - clocksData.
TriggerTime();
84 PE = calibrator.
PE(pulse.
area, channel);
86 PE = calibrator.
PE(pulse.
peak, channel);
90 hitVector.emplace_back(
91 channel, relTime, absTime, frame, width, pulse.
area, pulse.
peak, PE, 0.0);
virtual bool UseArea() const =0
virtual double PE(double adcs, int opchannel) const =0
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
constexpr int Frame() const noexcept
Returns the number of the frame containing the clock current time.
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
const pulse_param_array & GetPulses() const
A getter for the whole array of pulse_param struct object.
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].
Description of geometry of one entire detector.
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.
void RunHitFinder(std::vector< raw::OpDetWaveform > const &opDetWaveformVector, std::vector< recob::OpHit > &hitVector, pmtana::PulseRecoManager const &pulseRecoMgr, pmtana::PMTPulseRecoBase const &threshAlg, geo::GeometryCore const &geometry, float hitThreshold, detinfo::DetectorClocksData const &clocksData, calib::IPhotonCalibrator const &calibrator, bool use_start_time)
bool IsValidOpChannel(int opChannel) const
Is this a valid OpChannel number?
pure virtual base interface for detector clocks
Class definition file of PulseRecoManager.