96 fInputLabels = pset.get<std::vector<std::string>>(
"InputLabels");
100 pset.get<std::vector<unsigned int>>(
"ChannelMasks", std::vector<unsigned int>()))
104 bool useCalibrator = pset.get<
bool>(
"UseCalibrator",
false);
106 auto const& geometry(*lar::providerFrom<geo::Geometry>());
111 fCalib = lar::providerFrom<calib::IPhotonCalibratorService>();
116 bool areaToPE = pset.get<
bool>(
"AreaToPE");
117 float SPEArea = pset.get<
float>(
"SPEArea");
118 float SPEShift = pset.get<
float>(
"SPEShift", 0.);
121 if (!areaToPE) SPEArea = 20;
132 if (threshAlgName ==
"Threshold")
134 else if (threshAlgName ==
"SiPM")
136 else if (threshAlgName ==
"SlidingWindow")
138 else if (threshAlgName ==
"FixedWindow")
140 else if (threshAlgName ==
"CFD")
144 <<
"Cannot find implementation for " << threshAlgName <<
" algorithm.\n";
148 if (pedAlgName ==
"Edges")
150 else if (pedAlgName ==
"RollingMean")
152 else if (pedAlgName ==
"UB")
156 <<
"Cannot find implementation for " << pedAlgName <<
" algorithm.\n";
158 produces<std::vector<recob::OpHit>>();
179 std::unique_ptr<std::vector<recob::OpHit>> HitPtr(
new std::vector<recob::OpHit>);
181 std::vector<const sim::BeamGateInfo*> beamGateArray;
189 auto const& geometry(*lar::providerFrom<geo::Geometry>());
190 auto const clock_data =
192 auto const& calibrator(*
fCalib);
222 if (!wfHandle.
isValid())
continue;
223 totalsize += wfHandle->size();
226 std::vector<raw::OpDetWaveform> WaveformVector;
227 WaveformVector.reserve(totalsize);
229 for (
auto label : fInputLabels) {
232 if (!wfHandle.
isValid())
continue;
236 for (
auto const& wf : *wfHandle) {
238 WaveformVector.push_back(wf);
unsigned int fMaxOpChannel
std::map< int, int > GetChannelMap()
EDProducer(fhicl::ParameterSet const &pset)
void AddRecoAlgo(pmtana::PMTPulseRecoBase *algo, PMTPedestalBase *ped_algo=nullptr)
A method to set pulse reconstruction algorithm.
OpHitFinder(const fhicl::ParameterSet &)
std::set< unsigned int > fChannelMasks
art framework interface to geometry description
bool isValid() const noexcept
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define DEFINE_ART_MODULE(klass)
Class definition file of PedAlgoRollingMean.
Class definition file of AlgoCFD.
std::vector< double > GetSPEShifts()
Class definition file of PedAlgoUB.
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
void err(const char *fmt,...)
pmtana::PMTPulseRecoBase * fThreshAlg
void produce(art::Event &)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Class definition file of AlgoFixedWindow.
calib::IPhotonCalibrator const * fCalib
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 definition file of AlgoSlidingWindow.
Class definition file of AlgoThreshold.
pmtana::PulseRecoManager fPulseRecoMgr
void SetDefaultPedAlgo(pmtana::PMTPedestalBase *algo)
A method to set a choice of pedestal estimation method.
std::vector< double > GetSPEScales()
Class definition file of PMTPulseRecoBase.
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
Class definition file of PedAlgoEdges.
std::vector< std::string > fInputLabels
pmtana::PMTPedestalBase * fPedAlg
Class definition file of PulseRecoManager.