20 std::vector< recob::OpHit >& hitVector,
28 for (
auto const& waveform : opDetWaveformVector) {
30 const int channel =
static_cast< int >(waveform.ChannelNumber());
33 mf::LogError(
"OpHitFinder") <<
"Error! unrecognized channel number " 34 << channel <<
". Ignoring pulse";
41 auto const& pulses = threshAlg.
GetPulses();
43 const double timeStamp = waveform.TimeStamp();
46 for (
auto const& pulse : pulses)
64 std::vector< recob::OpHit >& hitVector,
68 if (pulse.
peak < hitThreshold)
return;
72 double relTime = absTime - detectorClocks.
TriggerTime();
77 if (calibrator.
UseArea()) PE = calibrator.
PE(pulse.
area, channel);
78 else PE = calibrator.
PE(pulse.
peak, channel);
82 hitVector.emplace_back(channel,
virtual bool UseArea() const =0
virtual double PE(double adcs, int opchannel) const =0
virtual double TriggerTime() const =0
Harware trigger time (in electronics time frame) [µs].
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
int Frame() const
Returns the number of the frame containing the clock current time.
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.
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::DetectorClocks const &detectorClocks, calib::IPhotonCalibrator const &calibrator)
Description of geometry of one entire detector.
Conversion of times between different formats and references.
double TickPeriod() const
A single tick period in microseconds.
void ConstructHit(float hitThreshold, int channel, double timeStamp, pmtana::pulse_param const &pulse, std::vector< recob::OpHit > &hitVector, detinfo::DetectorClocks const &detectorClocks, calib::IPhotonCalibrator const &calibrator)
virtual const detinfo::ElecClock & OpticalClock() const =0
Lends a constant optical clock with time set to trigger time.
bool IsValidOpChannel(int opChannel) const
Is this a valid OpChannel number?