25 fAmpThresholdVec = p.
get<std::vector<float>>(
"AmplitudeThreshold", std::vector<float>(1, 0.0));
30 const unsigned int n_planes = geo.
Nplanes();
37 throw std::runtime_error(
"Error in RFFHitFinderAlg: Configured with zero planes.");
42 throw std::runtime_error(
"Error in RFFHitFinderAlg: Configured with incorrect n_planes.");
58 std::vector<recob::Hit>& hitVector,
61 hitVector.reserve(wireVector.size());
62 for (
auto const& wire : wireVector) {
68 for (
auto const& roi : wire.SignalROI().get_ranges()) {
71 const float summedADCTotal = std::accumulate(roi.data().begin(), roi.data().end(), 0.0);
75 EmplaceHit(hitVector, wire, summedADCTotal, startTick, endTick, sigtype, wireID);
83 float const& summedADCTotal,
90 float totalArea = 0.0;
97 areaErrorVector[ihit] =
102 totalArea += areaVector[ihit];
106 areaFracVector[ihit] = areaVector[ihit] / totalArea;
108 hitVector.emplace_back(wire.
Channel(),
116 summedADCTotal * areaFracVector[ihit],
118 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 &)
std::vector< WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
const std::vector< float > & AmplitudeVector()
void Run(std::vector< recob::Wire > const &, std::vector< recob::Hit > &, geo::Geometry const &)
void RunFitter(const std::vector< float > &signal)
const std::vector< float > & MeanVector()
void SetFitterParams(float, unsigned int, float)
const std::vector< float > & SigmaVector()
void SetFitterParamsVectors(geo::Geometry const &)
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)
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
std::vector< float > fAmpThresholdVec
std::vector< float > fMatchThresholdVec
T get(std::string const &key) const
The geometry of one entire detector, as served by art.
const std::vector< float > & MeanErrorVector()
RFFHitFinderAlg(fhicl::ParameterSet const &)
SigType_t SignalType(PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
std::vector< unsigned int > fMergeMultiplicityVec
void SetFitterParams(unsigned int)
Class holding the regions of interest of signal from a channel.
unsigned int Nplanes(TPCID const &tpcid=tpc_zero) const
Returns the total number of planes in the specified TPC.
Namespace collecting geometry-related classes utilities.
const std::vector< float > & AmplitudeErrorVector()
art framework interface to geometry description
const std::vector< float > & SigmaErrorVector()