Hit finder algorithm designed to work with Cluster Crawler. More...
#include <CCHitFinderAlg.h>
Classes | |
struct | FitStats_t |
class | HitChannelInfo_t |
exchange data about the originating wire More... | |
Public Member Functions | |
CCHitFinderAlg (fhicl::ParameterSet const &pset) | |
virtual | ~CCHitFinderAlg ()=default |
virtual void | reconfigure (fhicl::ParameterSet const &pset) |
void | RunCCHitFinder (std::vector< recob::Wire > const &Wires) |
std::vector< recob::Hit > && | YieldHits () |
Returns (and loses) the collection of reconstructed hits. More... | |
template<typename Stream > | |
void | PrintStats (Stream &out) const |
Print the fit statistics. More... | |
Public Attributes | |
std::vector< recob::Hit > | allhits |
Private Member Functions | |
void | FitNG (unsigned short nGaus, unsigned short npt, float *ticks, float *signl) |
void | MakeCrudeHit (unsigned short npt, float *ticks, float *signl) |
void | StoreHits (unsigned short TStart, unsigned short npt, HitChannelInfo_t info, float adcsum) |
void | StudyHits (unsigned short flag, unsigned short npt=0, float *ticks=0, float *signl=0, unsigned short tstart=0) |
Static Private Member Functions | |
static bool | FastGaussianFit (unsigned short npt, float const *ticks, float const *signl, std::array< double, 3 > ¶ms, std::array< double, 3 > ¶merrors, float &chidof) |
Performs a "fast" fit. More... | |
Private Attributes | |
std::vector< float > | fMinPeak |
std::vector< float > | fMinRMS |
unsigned short | fMaxBumps |
unsigned short | fMaxXtraHits |
float | fChiSplit |
Estimated noise error on the Signal. More... | |
std::vector< float > | fChiNorms |
std::vector< float > | fTimeOffsets |
std::vector< float > | fChgNorms |
raw::ChannelID_t | theChannel |
unsigned short | theWireNum |
unsigned short | thePlane |
float | chinorm |
bool | fUseChannelFilter |
art::ServiceHandle < geo::Geometry const > | geom |
std::vector< double > | par |
std::vector< double > | parerr |
std::vector< double > | parmin |
std::vector< double > | parmax |
float | chidof |
int | dof |
std::vector< unsigned short > | bumps |
bool | fStudyHits |
std::vector< short > | fUWireRange |
std::vector< short > | fUTickRange |
std::vector< short > | fVWireRange |
std::vector< short > | fVTickRange |
std::vector< short > | fWWireRange |
std::vector< short > | fWTickRange |
std::vector< int > | bumpCnt |
std::vector< int > | RATCnt |
std::vector< float > | bumpChi |
std::vector< float > | bumpRMS |
std::vector< int > | hitCnt |
std::vector< float > | hitRMS |
std::vector< float > | loWire |
std::vector< float > | loTime |
std::vector< float > | hiWire |
std::vector< float > | hiTime |
bool | SelRAT |
bool | fUseFastFit |
whether to attempt using a fast fit on single gauss. More... | |
std::unique_ptr< GausFitCache > | FitCache |
a set of functions ready to be used More... | |
FitStats_t | FinalFitStats |
counts of the good fits More... | |
FitStats_t | TriedFitStats |
counts of the tried fits More... | |
Static Private Attributes | |
static constexpr float | Sqrt2Pi = 2.5066 |
static constexpr float | SqrtPi = 1.7725 |
static constexpr unsigned int | MaxGaussians = 20 |
Hit finder algorithm designed to work with Cluster Crawler.
This algorithm used to store hits in a proprietary CCHit
data structure. It has now been changed to use recob::Hit
class directly. It is possible to translate the former into the latter, with one exception, as follows:
// this is the original CCHit definition struct CCHit { float Charge; // recob::Hit::Integral() float ChargeErr; // recob::Hit::SigmaIntegral() float Amplitude; // recob::Hit::PeakAmplitude() float AmplitudeErr; // recob::Hit::SigmaPeakAmplitude() float Time; // recob::Hit::PeakTime() float TimeErr; // recob::Hit::SigmaPeakTime() float RMS; // recob::Hit::RMS() float RMSErr; // dropped float ChiDOF; // recob::Hit::GoodnessOfFit() int DOF; // recob::Hit::DegreesOfFreedom() float ADCSum; // recob::Hit::SummedADC() unsigned short WireNum; // recob::Hit::WireID().Wire unsigned short numHits; // recob::Hit::Multiplicity() unsigned int LoHitID; // see below float LoTime; // recob::Hit::StartTick() float HiTime; // recob::Hit::EndTick() short InClus; // dropped; see below geo::WireID WirID; // recob::Hit::WireID() recob::Wire const* Wire; // dropped; see below };
The uncertainty on RMS has been dropped for good.
The LoHitID
member used to mean the index of the first hit in the "hit
train" (that is the set of hits extracted from the same region of interest). That is a concept that is not portable. If your hit list is still the original one as produced by this algorithm, or if at least the hits from the same train are stored sorted and contiguously, for a hit with index iHit
, the equivalent value of LoHitID
is iHit - hit.LocalIndex()
.
There is no pointer to the wire any more in recob::Hit
. The wire can be obtained through associations, that are typically produced by the art module that runs CCHitFinderAlg (e.g. CCHitFinder
). The channel ID is also directly available as recob::Hit::Channel()
.
Definition at line 79 of file CCHitFinderAlg.h.
hit::CCHitFinderAlg::CCHitFinderAlg | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 45 of file CCHitFinderAlg.cxx.
|
virtualdefault |
|
staticprivate |
Performs a "fast" fit.
npt | number of points to be fitted |
ticks | tick coordinates |
signl | signal amplitude |
params | an array where the fit parameters will be stored |
paramerrors | an array where the fit parameter errors will be stored |
chidof | a variable where to store chi^2 over degrees of freedom |
Note that the fit will bail out and rteurn false if any of the input signal amplitudes is zero or negative.
Also note that currently the chi^2 is not the one from comparing the Gaussian to the signal, but from comparing a fitted parabola to the logarithm of the signal.
Definition at line 276 of file CCHitFinderAlg.cxx.
|
private |
Definition at line 325 of file CCHitFinderAlg.cxx.
|
private |
Definition at line 545 of file CCHitFinderAlg.cxx.
void hit::CCHitFinderAlg::PrintStats | ( | Stream & | out | ) | const |
Print the fit statistics.
Definition at line 232 of file CCHitFinderAlg.h.
|
virtual |
Definition at line 57 of file CCHitFinderAlg.cxx.
void hit::CCHitFinderAlg::RunCCHitFinder | ( | std::vector< recob::Wire > const & | Wires | ) |
Definition at line 122 of file CCHitFinderAlg.cxx.
|
private |
Definition at line 589 of file CCHitFinderAlg.cxx.
|
private |
Definition at line 660 of file CCHitFinderAlg.cxx.
|
inline |
Returns (and loses) the collection of reconstructed hits.
Definition at line 93 of file CCHitFinderAlg.h.
std::vector<recob::Hit> hit::CCHitFinderAlg::allhits |
Definition at line 83 of file CCHitFinderAlg.h.
|
private |
Definition at line 166 of file CCHitFinderAlg.h.
|
private |
Definition at line 164 of file CCHitFinderAlg.h.
|
private |
Definition at line 167 of file CCHitFinderAlg.h.
|
private |
Definition at line 137 of file CCHitFinderAlg.h.
|
private |
Definition at line 135 of file CCHitFinderAlg.h.
|
private |
Definition at line 116 of file CCHitFinderAlg.h.
|
private |
Definition at line 136 of file CCHitFinderAlg.h.
|
private |
Definition at line 110 of file CCHitFinderAlg.h.
|
private |
Definition at line 108 of file CCHitFinderAlg.h.
|
private |
Estimated noise error on the Signal.
Definition at line 105 of file CCHitFinderAlg.h.
|
private |
counts of the good fits
Definition at line 194 of file CCHitFinderAlg.h.
|
private |
a set of functions ready to be used
Definition at line 179 of file CCHitFinderAlg.h.
|
private |
Definition at line 103 of file CCHitFinderAlg.h.
|
private |
Definition at line 104 of file CCHitFinderAlg.h.
|
private |
Definition at line 101 of file CCHitFinderAlg.h.
|
private |
Definition at line 102 of file CCHitFinderAlg.h.
|
private |
Definition at line 158 of file CCHitFinderAlg.h.
|
private |
Definition at line 109 of file CCHitFinderAlg.h.
|
private |
Definition at line 121 of file CCHitFinderAlg.h.
|
private |
whether to attempt using a fast fit on single gauss.
Definition at line 177 of file CCHitFinderAlg.h.
|
private |
Definition at line 159 of file CCHitFinderAlg.h.
|
private |
Definition at line 159 of file CCHitFinderAlg.h.
|
private |
Definition at line 160 of file CCHitFinderAlg.h.
|
private |
Definition at line 160 of file CCHitFinderAlg.h.
|
private |
Definition at line 161 of file CCHitFinderAlg.h.
|
private |
Definition at line 161 of file CCHitFinderAlg.h.
|
private |
Definition at line 125 of file CCHitFinderAlg.h.
|
private |
Definition at line 168 of file CCHitFinderAlg.h.
|
private |
Definition at line 174 of file CCHitFinderAlg.h.
|
private |
Definition at line 169 of file CCHitFinderAlg.h.
|
private |
Definition at line 173 of file CCHitFinderAlg.h.
|
private |
Definition at line 172 of file CCHitFinderAlg.h.
|
private |
Definition at line 171 of file CCHitFinderAlg.h.
|
staticprivate |
Definition at line 221 of file CCHitFinderAlg.h.
|
private |
Definition at line 131 of file CCHitFinderAlg.h.
|
private |
Definition at line 132 of file CCHitFinderAlg.h.
|
private |
Definition at line 134 of file CCHitFinderAlg.h.
|
private |
Definition at line 133 of file CCHitFinderAlg.h.
|
private |
Definition at line 165 of file CCHitFinderAlg.h.
|
private |
Definition at line 175 of file CCHitFinderAlg.h.
|
staticprivate |
Definition at line 118 of file CCHitFinderAlg.h.
|
staticprivate |
Definition at line 119 of file CCHitFinderAlg.h.
|
private |
Definition at line 112 of file CCHitFinderAlg.h.
|
private |
Definition at line 114 of file CCHitFinderAlg.h.
|
private |
Definition at line 113 of file CCHitFinderAlg.h.
|
private |
counts of the tried fits
Definition at line 195 of file CCHitFinderAlg.h.