25 fAmpThresholdVec = p.
get< std::vector<float> >(
"AmplitudeThreshold",std::vector<float>(1,0.0));
30 const unsigned int n_planes = geo.
Nplanes();
38 throw std::runtime_error(
"Error in RFFHitFinderAlg: Configured with zero planes.");
43 throw std::runtime_error(
"Error in RFFHitFinderAlg: Configured with incorrect n_planes.");
61 std::vector<recob::Hit>& hitVector,
64 hitVector.reserve(wireVector.size());
65 for(
auto const& wire : wireVector)
72 for(
auto const& roi : wire.SignalROI().get_ranges())
76 const float summedADCTotal = std::accumulate(roi.data().begin(),roi.data().end(),0.0);
80 EmplaceHit(hitVector,wire,summedADCTotal,startTick,endTick,sigtype,wireID);
89 float const& summedADCTotal,
94 float totalArea = 0.0;
101 areaErrorVector[ihit] =
104 totalArea += areaVector[ihit];
109 areaFracVector[ihit] = areaVector[ihit]/totalArea;
111 hitVector.emplace_back(wire.
Channel(),
119 summedADCTotal*areaFracVector[ihit],
121 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.
art framework interface to geometry description
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
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 regions of interest of signal from a channel.
LArSoft geometry interface.
const std::vector< float > & AmplitudeErrorVector()
const std::vector< float > & SigmaErrorVector()