218 std::unique_ptr< std::vector< recob::OpHit > >
219 HitPtrFinal(
new std::vector< recob::OpHit >);
222 std::unique_ptr< std::vector< recob::OpHit > >
223 HitPtr(
new std::vector< recob::OpHit >);
225 std::vector< const sim::BeamGateInfo* > beamGateArray;
230 catch (art::Exception
const&
err)
232 if ( err.categoryCode() != art::errors::ProductNotFound )
throw;
235 auto const&
geometry(*lar::providerFrom< geo::Geometry >());
236 auto const clockData_CAEN = art::ServiceHandle<detinfo::DetectorClocksService>()->DataFor(
evt);
237 auto const& calibrator(*
fCalib);
239 clockData_CAEN.OpticalClock().FramePeriod(),
242 clockData_CAEN.TriggerOffsetTPC(),
243 clockData_CAEN.TriggerTime(),
244 clockData_CAEN.BeamGateTime(),
245 clockData_CAEN.TPCClock(),
246 optical_clock_daphne,
247 clockData_CAEN.TriggerClock(),
248 clockData_CAEN.ExternalClock());
257 art::Handle< std::vector< raw::OpDetWaveform > > wfHandle;
262 assert(wfHandle.isValid());
277 art::Handle< std::vector< raw::OpDetWaveform > > wfHandle;
279 if (!wfHandle.isValid())
continue;
280 totalsize += wfHandle->size();
283 std::vector< raw::OpDetWaveform > WaveformVector;
284 WaveformVector.reserve(totalsize);
286 for (
auto label : fInputLabels)
288 art::Handle< std::vector< raw::OpDetWaveform > > wfHandle;
290 if (!wfHandle.isValid())
continue;
292 for(
auto const& wf : *wfHandle)
299 WaveformVector.push_back(wf);
320 for (
auto h : *HitPtr) {
321 (*HitPtrFinal).emplace_back(
h.OpChannel(),
322 h.PeakTime() + clockData.TriggerTime(),
324 h.StartTime() + clockData.TriggerTime(),
334 evt.put(std::move(HitPtrFinal));
std::vector< std::string > fInputLabels
const geo::GeometryCore * geometry
std::set< unsigned int > fChannelMasks
EResult err(const char *call)
std::vector< int > _opch_to_use
List of of opch (will be infered from _pd_to_use)
calib::IPhotonCalibrator const * fCalib
pmtana::PMTPulseRecoBase * fThreshAlg
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)
pmtana::PulseRecoManager fPulseRecoMgr
Class representing the time measured by an electronics clock.
std::string fElectronics
PDS readouts to use (ex: "CAEN", "Daphne")