25 fAmpThresholdVec = p.
get<std::vector<float>>(
"AmplitudeThreshold", std::vector<float>(1, 0.0));
35 throw std::runtime_error(
"Error in RFFHitFinderAlg: Configured with zero planes.");
40 throw std::runtime_error(
"Error in RFFHitFinderAlg: Configured with incorrect n_planes.");
56 std::vector<recob::Hit>& hitVector,
59 hitVector.reserve(wireVector.size());
60 for (
auto const& wire : wireVector) {
66 for (
auto const& roi : wire.SignalROI().get_ranges()) {
69 const float summedADCTotal = std::accumulate(roi.data().begin(), roi.data().end(), 0.0);
73 EmplaceHit(hitVector, wire, summedADCTotal, startTick, endTick, sigtype, wireID);
81 float const& summedADCTotal,
88 float totalArea = 0.0;
95 areaErrorVector[ihit] =
100 totalArea += areaVector[ihit];
104 areaFracVector[ihit] = areaVector[ihit] / totalArea;
106 hitVector.emplace_back(wire.
Channel(),
114 summedADCTotal * areaFracVector[ihit],
115 summedADCTotal * areaFracVector[ihit],
117 areaErrorVector[ihit],
void EmplaceHit(std::vector< recob::Hit > &, recob::Wire const &, float const &, raw::TDCtick_t const &, raw::TDCtick_t const &, geo::SigType_t const &, geo::WireID const &)
const std::vector< float > & AmplitudeVector()
void RunFitter(const std::vector< float > &signal)
const std::vector< float > & MeanVector()
void SetFitterParams(float, unsigned int, float)
const std::vector< float > & SigmaVector()
SigType_t SignalType(PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
int TDCtick_t
Type representing a TDC tick.
geo::View_t View() const
Returns the view the channel belongs to.
raw::ChannelID_t Channel() const
Returns the ID of the channel (or InvalidChannelID)
void SetFitterParamsVectors(unsigned int num_planes)
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
Interface for a class providing readout channel mapping to geometry.
std::vector< float > fAmpThresholdVec
std::vector< float > fMatchThresholdVec
T get(std::string const &key) const
const std::vector< float > & MeanErrorVector()
RFFHitFinderAlg(fhicl::ParameterSet const &)
virtual std::vector< WireID > ChannelToWire(raw::ChannelID_t channel) const =0
std::vector< unsigned int > fMergeMultiplicityVec
void SetFitterParams(unsigned int)
Class holding the regions of interest of signal from a channel.
void Run(std::vector< recob::Wire > const &, std::vector< recob::Hit > &, geo::WireReadoutGeom const &)
const std::vector< float > & AmplitudeErrorVector()
Interface to geometry for wire readouts .
const std::vector< float > & SigmaErrorVector()