9 #ifndef CCHITFINDERALG_H 10 #define CCHITFINDERALG_H 19 namespace fhicl {
class ParameterSet; }
89 void RunCCHitFinder(std::vector<recob::Wire>
const& Wires);
95 template <
typename Stream>
96 void PrintStats(Stream& out)
const;
117 static constexpr
float Sqrt2Pi = 2.5066;
118 static constexpr
float SqrtPi = 1.7725;
127 void FitNG(
unsigned short nGaus,
unsigned short npt,
float *
ticks,
150 void MakeCrudeHit(
unsigned short npt,
float *
ticks,
float *signl);
152 void StoreHits(
unsigned short TStart,
unsigned short npt,
161 void StudyHits(
unsigned short flag,
unsigned short npt = 0,
162 float *
ticks = 0,
float *signl = 0,
unsigned short tstart = 0);
185 void Reset(
unsigned int nGaus);
187 void AddMultiGaus(
unsigned int nGaus);
213 static bool FastGaussianFit(
214 unsigned short npt,
float const*
ticks,
float const*signl,
215 std::array<double, 3>&
params,
216 std::array<double, 3>& paramerrors,
220 static constexpr
unsigned int MaxGaussians = 20;
230 template <
typename Stream>
233 out <<
"CCHitFinderAlg fit statistics:";
235 out <<
"\n fast 1-Gaussian fits: " << FinalFitStats.FastFits
236 <<
" succeeded (" << TriedFitStats.FastFits <<
" tried)";
239 out <<
"\n fast 1-Gaussian fits: disabled";
241 for (
unsigned int nGaus = 1; nGaus < MaxGaussians; ++nGaus) {
242 if (TriedFitStats.MultiGausFits[nGaus-1] == 0)
continue;
243 out <<
"\n " << nGaus <<
"-Gaussian fits: " 244 << FinalFitStats.MultiGausFits[nGaus-1]
245 <<
" accepted (" << TriedFitStats.MultiGausFits[nGaus-1] <<
" tried)";
247 if (TriedFitStats.MultiGausFits.back() > 0) {
248 out <<
"\n " << FinalFitStats.MultiGausFits.size()
249 <<
"-Gaussian fits or higher: " << FinalFitStats.MultiGausFits.back()
250 <<
" accepted (" << TriedFitStats.MultiGausFits.back() <<
" tried)";
260 #endif // ifndef CCHITFINDERALG_H
float fChiSplit
Estimated noise error on the Signal.
art::ServiceHandle< geo::Geometry const > geom
void PrintStats(Stream &out) const
Print the fit statistics.
exchange data about the originating wire
std::vector< short > fWWireRange
raw::ChannelID_t theChannel
std::vector< float > loWire
std::vector< double > parmax
std::vector< float > hiWire
std::vector< unsigned short > bumps
std::vector< float > fChiNorms
std::vector< float > bumpRMS
std::vector< short > fUWireRange
bool fUseFastFit
whether to attempt using a fast fit on single gauss.
std::vector< short > fVWireRange
std::vector< float > fChgNorms
FitStats_t TriedFitStats
counts of the tried fits
unsigned int FastFits
count of single-Gaussian fast fits
tick ticks
Alias for common language habits.
Hit finder algorithm designed to work with Cluster Crawler.
art framework interface to geometry description
std::vector< float > fTimeOffsets
std::vector< recob::Hit > allhits
virtual void reconfigure(fhicl::ParameterSet const &pset)
std::unique_ptr< GausFitCache > FitCache
a set of functions ready to be used
enum geo::_plane_sigtype SigType_t
std::vector< float > hiTime
The geometry of one entire detector, as served by art.
Definition of data types for geometry description.
std::vector< int > bumpCnt
Detector simulation of raw signals on wires.
std::vector< float > loTime
Declaration of signal hit object.
unsigned short theWireNum
std::vector< unsigned int > MultiGausFits
multi-Gaussian stats
std::vector< float > fMinPeak
Class holding the regions of interest of signal from a channel.
std::vector< int > hitCnt
Provide caches for TF1 functions to be used with ROOT fitters.
Declaration of basic channel signal object.
unsigned short fMaxXtraHits
std::vector< recob::Hit > && YieldHits()
Returns (and loses) the collection of reconstructed hits.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
std::vector< float > hitRMS
std::vector< double > parmin
std::vector< int > RATCnt
FitStats_t FinalFitStats
counts of the good fits
std::vector< double > parerr
std::vector< float > fMinRMS
std::vector< float > bumpChi
std::vector< double > par
QTextStream & endl(QTextStream &s)