1 #ifndef _Q_BICOMPONENTOPTIMUMFILTER_HH_
2 #define _Q_BICOMPONENTOPTIMUMFILTER_HH_
49 void GetFiltered(Diana::QVector& f1, Diana::QVector& f2)
const;
61 void GetAmplitude(
double& a1,
double& a2,
double& integral)
const;
66 Diana::QVector
GetFitFunction(
const double jitter,
const double a1,
const double a2)
const;
99 void BuildFilter(
const Diana::QVector& ap1,
const Diana::QVector&
ap2);
101 std::vector<double>
ChiSquare(
const Diana::QVectorC& p,
const Diana::QVector& ap1Filtered,
const Diana::QVector& ap2Filtered)
const ;
Dual component optimum filter.
QError ComputeAmplitude(const Diana::QVectorC &transformed)
std::vector< double > ChiSquare(const Diana::QVectorC &p, const Diana::QVector &ap1Filtered, const Diana::QVector &ap2Filtered) const
Diana::QVector NormalizeVector(const Diana::QVector &vec) const
double fAvgPulseIntegral1
QError Filter(const Diana::QVector &p)
filter p. In case of failure an error is returned.
Diana::QVector fFiltered1
double fAvgPulseIntegral2
Diana::QVector GetFitFunction(const double jitter, const double a1, const double a2) const
Diana::QVector fAveragePulse2
std::vector< double > fChiSquareWithJitter
double GetChiSquareAtMinimium() const
get chi square value at its minimum, if Filter()!=QERR_SUCCESS throw the error
void BuildFilter(const Diana::QVector &ap1, const Diana::QVector &ap2)
double GetFilteredNoiseRMS2() const
expected noise rms on filtered comp. 1
virtual ~QBiComponentOptimumFilter()
Diana::QVector fFiltered2
QBiComponentOptimumFilter(const Diana::QVector &ap1, const Diana::QVector &ap2, const Diana::QVector &an, size_t maxJitter, bool diff=false)
constructor
const std::vector< int > & GetJitters() const
get array of jitters. They range between (-maxJitter,+maxJitter), 2 extra jitters on both sides are g...
double GetFilteredNoiseRMS1() const
expected noise rms on filtered comp. 1
Diana::QVector fAveragePulse1
int GetJitterAtMinimum() const
get jitter at the minimum of the chi square. if Filter()!=QERR_SUCCESS throw the error
const std::vector< double > & GetChiSquareWithJitter() const
get chi square as a function of jitter, same indexing of GetJitters(). if Filter()==QERR_SIZE_NOT_MAT...
std::vector< int > fJitters
QError GetInterpolated(double &jitter, double &a1, double &a2, double &integral) const
get values at interpolated chi^2 minimum. Three points around the minimum are used for a parabolic in...
void GetFiltered(Diana::QVector &f1, Diana::QVector &f2) const
get filtered waveforms. if Filter()==QERR_SIZE_NOT_MATCH throws the error
Diana::QRealComplexFFT * fTransformer
std::vector< Diana::QVectorC > fAveragePulse1Shifted
std::vector< Diana::QVectorC > fAveragePulse2Shifted
Diana::QVector fAverageNoise
void GetAmplitude(double &a1, double &a2, double &integral) const
get amplitudes at chi^2 minimum. if Filter()!=QERR_SUCCESS throws the error
error class with error type and description
Wrapper for a specific QRealComplexFFT algorithm class.
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...