29 void 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)
74 std::vector<recob::OpHit>& hitVector,
80 if (pulse.
peak < hitThreshold)
return;
85 double relTime = absTime - clocksData.
TriggerTime();
96 PE = calibrator.
PE(pulse.
area, channel);
98 PE = calibrator.
PE(pulse.
peak, channel);
102 hitVector.emplace_back(channel,
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.
pure virtual base interface for detector clocks
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
Access the description of detector geometry.
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)
Class def header for a class ElecClock.
bool IsValidOpChannel(int opChannel) const
Is this a valid OpChannel number?
Class definition file of PulseRecoManager.