20 fAmpThresholdVec = p.
get< std::vector<float> >(
"AmplitudeThreshold",std::vector<float>(1,0.0));
25 const unsigned int n_planes = geo.
Nplanes();
33 throw std::runtime_error(
"Error in RFFHitFinderAlg: Configured with zero planes.");
38 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)
67 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);
84 float const& summedADCTotal,
89 float totalArea = 0.0;
96 areaErrorVector[ihit] =
99 totalArea += areaVector[ihit];
104 areaFracVector[ihit] = areaVector[ihit]/totalArea;
106 hitVector.emplace_back(wire.
Channel(),
114 summedADCTotal*areaFracVector[ihit],
116 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 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()
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
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.
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
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 &)
std::vector< unsigned int > fMergeMultiplicityVec
void SetFitterParams(unsigned int)
Class holding the deconvoluted signals from a channel.
Namespace collecting geometry-related classes utilities.
const std::vector< float > & AmplitudeErrorVector()
const std::vector< float > & SigmaErrorVector()