9 #ifndef CCHITFINDERALG_H 10 #define CCHITFINDERALG_H 90 void RunCCHitFinder(std::vector<recob::Wire>
const& Wires);
93 std::vector<recob::Hit>&&
YieldHits() {
return std::move(allhits); }
96 template <
typename Stream>
97 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,
float* signl);
148 void MakeCrudeHit(
unsigned short npt,
float*
ticks,
float* signl);
150 void StoreHits(
unsigned short TStart,
unsigned short npt,
HitChannelInfo_t info,
float adcsum);
157 void StudyHits(
unsigned short flag,
158 unsigned short npt = 0,
159 float* signl =
nullptr,
160 unsigned short tstart = 0);
182 void Reset(
unsigned int nGaus);
184 void AddMultiGaus(
unsigned int nGaus);
209 static bool FastGaussianFit(
unsigned short npt,
212 std::array<double, 3>& params,
213 std::array<double, 3>& paramerrors,
216 static constexpr
unsigned int MaxGaussians = 20;
225 template <
typename Stream>
229 out <<
"CCHitFinderAlg fit statistics:";
231 out <<
"\n fast 1-Gaussian fits: " << FinalFitStats.FastFits <<
" succeeded (" 232 << TriedFitStats.FastFits <<
" tried)";
235 out <<
"\n fast 1-Gaussian fits: disabled";
237 for (
unsigned int nGaus = 1; nGaus < MaxGaussians; ++nGaus) {
238 if (TriedFitStats.MultiGausFits[nGaus - 1] == 0)
continue;
239 out <<
"\n " << nGaus <<
"-Gaussian fits: " << FinalFitStats.MultiGausFits[nGaus - 1]
240 <<
" accepted (" << TriedFitStats.MultiGausFits[nGaus - 1] <<
" tried)";
242 if (TriedFitStats.MultiGausFits.back() > 0) {
243 out <<
"\n " << FinalFitStats.MultiGausFits.size()
244 <<
"-Gaussian fits or higher: " << FinalFitStats.MultiGausFits.back() <<
" accepted (" 245 << TriedFitStats.MultiGausFits.back() <<
" tried)";
253 #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
raw::ChannelID_t theChannel
std::vector< float > loWire
std::vector< double > parmax
Declaration of signal hit object.
std::vector< float > hiWire
std::vector< unsigned short > bumps
std::vector< float > fChiNorms
std::vector< float > bumpRMS
bool fUseFastFit
whether to attempt using a fast fit on single gauss.
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.
std::vector< float > fTimeOffsets
std::vector< recob::Hit > allhits
std::unique_ptr< GausFitCache > FitCache
a set of functions ready to be used
ntupleExperimental Reset()
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
std::vector< float > hiTime
std::vector< short > fUWireRange
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
std::vector< short > fWWireRange
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.
std::vector< short > fVWireRange
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
art framework interface to geometry description