CbmRoot
|
#include <PronyFitter.h>
Public Member Functions | |
PronyFitter () | |
PronyFitter (int model_order, int exponent_number, int gate_beg, int gate_end) | |
~PronyFitter () | |
int | CalcSignalBegin (float front_time_beg_03, float front_time_end) |
int | ChooseBestSignalBeginHarmonics (int first_sample, int last_sample) |
int | ChooseBestSignalBegin (int first_sample, int last_sample) |
void | MakePileUpRejection (int time_max) |
void | CalculateFitHarmonics () |
void | CalculateFitAmplitudes () |
void | SolveSLEGauss (float *x, float **r, float *b, int n) |
void | SolveSLEGauss (std::complex< float > *x, std::complex< float > **r, std::complex< float > *b, int n) |
void | SolveSLECholesky (float *x, float **a, float *b, int n) |
void | CovarianceQRmod (float &rho_f, std::vector< float > &a_f, float &rho_b, std::vector< float > &a_b) |
void | CovarianceDirect (float &rho_f, std::vector< float > &a_f, float &rho_b, std::vector< float > &a_b) |
float | LevelBy2Points (float X1, float Y1, float X2, float Y2, float Y0) |
void | SetDebugMode (bool IsDebug) |
void | SetWaveform (std::vector< uint16_t > &uWfm, uint16_t uZeroLevel) |
void | SetSignalBegin (int SignalBeg) |
void | SetHarmonics (std::complex< float > *z) |
void | SetExternalHarmonics (std::complex< float > z1, std::complex< float > z2) |
std::complex< float > * | GetHarmonics () |
std::complex< float > * | GetAmplitudes () |
float | GetIntegral (int gate_beg, int gate_end) |
uint16_t | GetFitValue (int sample_number) |
float | GetFitValue (float x) |
float | GetZeroLevel () |
float | GetX (float level, int first_sample, int last_sample) |
float | GetX (float level, int first_sample, int last_sample, float step) |
float | GetRSquare (int gate_beg, int gate_end) |
float | GetRSquareSignal () |
float | GetChiSquare (int gate_beg, int gate_end, int time_max) |
float | GetDeltaInSample (int sample) |
float | GetSignalBeginFromPhase () |
float | GetSignalMaxTime () |
float | GetMaxAmplitude () |
int | GetNumberPolRoots () |
std::vector< uint16_t > | GetFitWfm () |
Private Member Functions | |
void | Initialize (int model_order, int exponent_number, int gate_beg, int gate_end) |
void | AllocData () |
void | DeleteData () |
void | Clear () |
Private Attributes | |
bool | fIsDebug = false |
int | fModelOrder |
int | fExpNumber |
int | fGateBeg |
int | fGateEnd |
int | fSampleTotal |
int | fSignalBegin |
int | fTotalPolRoots |
std::vector< uint16_t > | fuWfm |
uint16_t | fuZeroLevel |
std::complex< float > * | fz |
std::complex< float > * | fh |
std::vector< uint16_t > | fuFitWfm |
uint16_t | fuFitZeroLevel |
Definition at line 19 of file PronyFitter.h.
|
inline |
Default constructor
Definition at line 23 of file PronyFitter.h.
PronyFitter::PronyFitter | ( | int | model_order, |
int | exponent_number, | ||
int | gate_beg, | ||
int | gate_end | ||
) |
Definition at line 8 of file PronyFitter.cxx.
References Initialize().
|
inline |
|
private |
Definition at line 26 of file PronyFitter.cxx.
References fExpNumber, fh, fz, and i.
Referenced by Initialize().
int PronyFitter::CalcSignalBegin | ( | float | front_time_beg_03, |
float | front_time_end | ||
) |
Definition at line 43 of file PronyFitter.cxx.
void PronyFitter::CalculateFitAmplitudes | ( | ) |
Definition at line 446 of file PronyFitter.cxx.
References fExpNumber, fGateEnd, fh, fIsDebug, fSampleTotal, fSignalBegin, fuFitWfm, fuFitZeroLevel, fuWfm, fuZeroLevel, fz, i, and SolveSLEGauss().
Referenced by ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), and CbmMcbm2018MonitorAlgoPsd::ProcessMs().
void PronyFitter::CalculateFitHarmonics | ( | ) |
Definition at line 54 of file PronyFitter.cxx.
References CovarianceDirect(), fExpNumber, fIsDebug, fModelOrder, fTotalPolRoots, i, log(), polynomComplexRoots(), and SetHarmonics().
Referenced by ChooseBestSignalBeginHarmonics(), and CbmMcbm2018MonitorAlgoPsd::ProcessMs().
int PronyFitter::ChooseBestSignalBegin | ( | int | first_sample, |
int | last_sample | ||
) |
Definition at line 798 of file PronyFitter.cxx.
References CalculateFitAmplitudes(), fGateBeg, fGateEnd, GetRSquare(), and SetSignalBegin().
int PronyFitter::ChooseBestSignalBeginHarmonics | ( | int | first_sample, |
int | last_sample | ||
) |
Definition at line 760 of file PronyFitter.cxx.
References CalculateFitAmplitudes(), CalculateFitHarmonics(), fExpNumber, fGateBeg, fGateEnd, fIsDebug, fTotalPolRoots, fz, GetRSquare(), and SetSignalBegin().
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().
|
private |
Definition at line 1000 of file PronyFitter.cxx.
References DeleteData(), fExpNumber, fGateBeg, fGateEnd, fModelOrder, fSampleTotal, fSignalBegin, fTotalPolRoots, fuFitWfm, and fuZeroLevel.
Referenced by ~PronyFitter().
void PronyFitter::CovarianceDirect | ( | float & | rho_f, |
std::vector< float > & | a_f, | ||
float & | rho_b, | ||
std::vector< float > & | a_b | ||
) |
Definition at line 122 of file PronyFitter.cxx.
References fGateEnd, fIsDebug, fModelOrder, fSignalBegin, fuWfm, fuZeroLevel, i, and SolveSLEGauss().
Referenced by CalculateFitHarmonics().
void PronyFitter::CovarianceQRmod | ( | float & | rho_f, |
std::vector< float > & | a_f, | ||
float & | rho_b, | ||
std::vector< float > & | a_b | ||
) |
Definition at line 188 of file PronyFitter.cxx.
References d, fGateEnd, fIsDebug, fModelOrder, fSignalBegin, fuWfm, fuZeroLevel, and i.
|
private |
std::complex< float > * PronyFitter::GetAmplitudes | ( | ) |
Definition at line 544 of file PronyFitter.cxx.
References fh.
float PronyFitter::GetChiSquare | ( | int | gate_beg, |
int | gate_end, | ||
int | time_max | ||
) |
Definition at line 685 of file PronyFitter.cxx.
References fuFitWfm, fuFitZeroLevel, fuWfm, fuZeroLevel, and i.
float PronyFitter::GetDeltaInSample | ( | int | sample | ) |
Definition at line 733 of file PronyFitter.cxx.
float PronyFitter::GetFitValue | ( | float | x | ) |
Definition at line 561 of file PronyFitter.cxx.
References fExpNumber, fh, fSignalBegin, fz, GetSignalBeginFromPhase(), i, and x.
uint16_t PronyFitter::GetFitValue | ( | int | sample_number | ) |
Definition at line 555 of file PronyFitter.cxx.
References fuFitWfm.
Referenced by GetMaxAmplitude(), and GetX().
|
inline |
Definition at line 80 of file PronyFitter.h.
References fuFitWfm.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().
std::complex< float > * PronyFitter::GetHarmonics | ( | ) |
Definition at line 440 of file PronyFitter.cxx.
References fz.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().
float PronyFitter::GetIntegral | ( | int | gate_beg, |
int | gate_end | ||
) |
Definition at line 546 of file PronyFitter.cxx.
References fuFitWfm, and fuFitZeroLevel.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().
float PronyFitter::GetMaxAmplitude | ( | ) |
Definition at line 588 of file PronyFitter.cxx.
References GetFitValue(), and GetSignalMaxTime().
int PronyFitter::GetNumberPolRoots | ( | ) |
Definition at line 442 of file PronyFitter.cxx.
References fTotalPolRoots.
float PronyFitter::GetRSquare | ( | int | gate_beg, |
int | gate_end | ||
) |
Definition at line 656 of file PronyFitter.cxx.
References fModelOrder, fuFitWfm, fuWfm, and m.
Referenced by ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), GetRSquareSignal(), and CbmMcbm2018MonitorAlgoPsd::ProcessMs().
float PronyFitter::GetRSquareSignal | ( | ) |
Definition at line 681 of file PronyFitter.cxx.
References fGateEnd, fSignalBegin, and GetRSquare().
float PronyFitter::GetSignalBeginFromPhase | ( | ) |
Definition at line 581 of file PronyFitter.cxx.
References fh, fSignalBegin, fz, and log().
Referenced by GetFitValue().
float PronyFitter::GetSignalMaxTime | ( | ) |
Definition at line 574 of file PronyFitter.cxx.
References fh, fSignalBegin, fz, and log().
Referenced by GetMaxAmplitude().
float PronyFitter::GetX | ( | float | level, |
int | first_sample, | ||
int | last_sample | ||
) |
Definition at line 592 of file PronyFitter.cxx.
References GetFitValue(), and LevelBy2Points().
float PronyFitter::GetX | ( | float | level, |
int | first_sample, | ||
int | last_sample, | ||
float | step | ||
) |
Definition at line 620 of file PronyFitter.cxx.
References GetFitValue(), and LevelBy2Points().
float PronyFitter::GetZeroLevel | ( | ) |
Definition at line 572 of file PronyFitter.cxx.
References fuFitZeroLevel.
|
private |
Definition at line 15 of file PronyFitter.cxx.
References AllocData(), fExpNumber, fGateBeg, fGateEnd, and fModelOrder.
Referenced by PronyFitter().
float PronyFitter::LevelBy2Points | ( | float | X1, |
float | Y1, | ||
float | X2, | ||
float | Y2, | ||
float | Y0 | ||
) |
Definition at line 648 of file PronyFitter.cxx.
Referenced by GetX().
void PronyFitter::MakePileUpRejection | ( | int | time_max | ) |
Definition at line 444 of file PronyFitter.cxx.
|
inline |
Definition at line 56 of file PronyFitter.h.
References fIsDebug.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().
void PronyFitter::SetExternalHarmonics | ( | std::complex< float > | z1, |
std::complex< float > | z2 | ||
) |
Definition at line 428 of file PronyFitter.cxx.
References fExpNumber, i, SetHarmonics(), z1, and z2.
void PronyFitter::SetHarmonics | ( | std::complex< float > * | z | ) |
Definition at line 424 of file PronyFitter.cxx.
References fExpNumber, and fz.
Referenced by CalculateFitHarmonics(), and SetExternalHarmonics().
void PronyFitter::SetSignalBegin | ( | int | SignalBeg | ) |
Definition at line 48 of file PronyFitter.cxx.
References fIsDebug, fSignalBegin, and fuZeroLevel.
Referenced by ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), and CbmMcbm2018MonitorAlgoPsd::ProcessMs().
void PronyFitter::SetWaveform | ( | std::vector< uint16_t > & | uWfm, |
uint16_t | uZeroLevel | ||
) |
Definition at line 35 of file PronyFitter.cxx.
References fSampleTotal, fuFitWfm, fuWfm, and fuZeroLevel.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().
void PronyFitter::SolveSLECholesky | ( | float * | x, |
float ** | a, | ||
float * | b, | ||
int | n | ||
) |
void PronyFitter::SolveSLEGauss | ( | float * | x, |
float ** | r, | ||
float * | b, | ||
int | n | ||
) |
Definition at line 817 of file PronyFitter.cxx.
References fIsDebug, i, and x.
Referenced by CalculateFitAmplitudes(), and CovarianceDirect().
void PronyFitter::SolveSLEGauss | ( | std::complex< float > * | x, |
std::complex< float > ** | r, | ||
std::complex< float > * | b, | ||
int | n | ||
) |
Definition at line 881 of file PronyFitter.cxx.
|
private |
Definition at line 93 of file PronyFitter.h.
Referenced by AllocData(), CalculateFitAmplitudes(), CalculateFitHarmonics(), ChooseBestSignalBeginHarmonics(), Clear(), GetFitValue(), Initialize(), SetExternalHarmonics(), and SetHarmonics().
|
private |
Definition at line 94 of file PronyFitter.h.
Referenced by ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), Clear(), and Initialize().
|
private |
Definition at line 95 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), Clear(), CovarianceDirect(), CovarianceQRmod(), GetRSquareSignal(), and Initialize().
|
private |
Definition at line 104 of file PronyFitter.h.
Referenced by AllocData(), CalculateFitAmplitudes(), DeleteData(), GetAmplitudes(), GetFitValue(), GetSignalBeginFromPhase(), and GetSignalMaxTime().
|
private |
Definition at line 91 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), CalculateFitHarmonics(), ChooseBestSignalBeginHarmonics(), CovarianceDirect(), CovarianceQRmod(), SetDebugMode(), SetSignalBegin(), and SolveSLEGauss().
|
private |
Definition at line 92 of file PronyFitter.h.
Referenced by CalculateFitHarmonics(), Clear(), CovarianceDirect(), CovarianceQRmod(), GetRSquare(), and Initialize().
|
private |
Definition at line 96 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), Clear(), and SetWaveform().
|
private |
Definition at line 98 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), Clear(), CovarianceDirect(), CovarianceQRmod(), GetFitValue(), GetRSquareSignal(), GetSignalBeginFromPhase(), GetSignalMaxTime(), and SetSignalBegin().
|
private |
Definition at line 99 of file PronyFitter.h.
Referenced by CalculateFitHarmonics(), ChooseBestSignalBeginHarmonics(), Clear(), and GetNumberPolRoots().
|
private |
Definition at line 105 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), Clear(), GetChiSquare(), GetDeltaInSample(), GetFitValue(), GetFitWfm(), GetIntegral(), GetRSquare(), and SetWaveform().
|
private |
Definition at line 106 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), GetChiSquare(), GetIntegral(), and GetZeroLevel().
|
private |
Definition at line 101 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), CovarianceDirect(), CovarianceQRmod(), GetChiSquare(), GetDeltaInSample(), GetRSquare(), and SetWaveform().
|
private |
Definition at line 102 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), Clear(), CovarianceDirect(), CovarianceQRmod(), GetChiSquare(), SetSignalBegin(), and SetWaveform().
|
private |
Definition at line 103 of file PronyFitter.h.
Referenced by AllocData(), CalculateFitAmplitudes(), ChooseBestSignalBeginHarmonics(), DeleteData(), GetFitValue(), GetHarmonics(), GetSignalBeginFromPhase(), GetSignalMaxTime(), and SetHarmonics().