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 25 of file PronyFitter.h.
|
inline |
Default constructor
Definition at line 29 of file PronyFitter.h.
PronyFitter::PronyFitter | ( | int | model_order, |
int | exponent_number, | ||
int | gate_beg, | ||
int | gate_end ) |
Definition at line 14 of file PronyFitter.cxx.
References Initialize().
|
inline |
|
private |
Definition at line 28 of file PronyFitter.cxx.
References fExpNumber, fh, and fz.
Referenced by Initialize().
int PronyFitter::CalcSignalBegin | ( | float | front_time_beg_03, |
float | front_time_end ) |
Definition at line 46 of file PronyFitter.cxx.
void PronyFitter::CalculateFitAmplitudes | ( | ) |
Definition at line 444 of file PronyFitter.cxx.
References fExpNumber, fGateEnd, fh, fIsDebug, fSampleTotal, fSignalBegin, fuFitWfm, fuFitZeroLevel, fuWfm, fuZeroLevel, fz, and SolveSLEGauss().
Referenced by ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
void PronyFitter::CalculateFitHarmonics | ( | ) |
Definition at line 57 of file PronyFitter.cxx.
References CovarianceDirect(), fExpNumber, fIsDebug, fModelOrder, fTotalPolRoots, log(), polynomComplexRoots(), and SetHarmonics().
Referenced by ChooseBestSignalBeginHarmonics(), and CbmMcbm2018MonitorAlgoPsd::ProcessMs().
int PronyFitter::ChooseBestSignalBegin | ( | int | first_sample, |
int | last_sample ) |
Definition at line 767 of file PronyFitter.cxx.
References CalculateFitAmplitudes(), fGateBeg, fGateEnd, GetRSquare(), and SetSignalBegin().
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
int PronyFitter::ChooseBestSignalBeginHarmonics | ( | int | first_sample, |
int | last_sample ) |
Definition at line 732 of file PronyFitter.cxx.
References CalculateFitAmplitudes(), CalculateFitHarmonics(), fExpNumber, fGateBeg, fGateEnd, fIsDebug, fTotalPolRoots, fz, GetRSquare(), and SetSignalBegin().
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().
|
private |
Definition at line 968 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 125 of file PronyFitter.cxx.
References fGateEnd, fIsDebug, fModelOrder, fSignalBegin, fuWfm, fuZeroLevel, 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 fGateEnd, fIsDebug, fModelOrder, fSignalBegin, fuWfm, and fuZeroLevel.
|
private |
std::complex< float > * PronyFitter::GetAmplitudes | ( | ) |
Definition at line 540 of file PronyFitter.cxx.
References fh.
float PronyFitter::GetChiSquare | ( | int | gate_beg, |
int | gate_end, | ||
int | time_max ) |
Definition at line 663 of file PronyFitter.cxx.
References fuFitWfm, fuFitZeroLevel, fuWfm, and fuZeroLevel.
float PronyFitter::GetDeltaInSample | ( | int | sample | ) |
Definition at line 707 of file PronyFitter.cxx.
float PronyFitter::GetFitValue | ( | float | x | ) |
Definition at line 558 of file PronyFitter.cxx.
References fExpNumber, fh, fSignalBegin, fz, GetSignalBeginFromPhase(), and x.
uint16_t PronyFitter::GetFitValue | ( | int | sample_number | ) |
Definition at line 552 of file PronyFitter.cxx.
References fuFitWfm.
Referenced by GetMaxAmplitude(), GetX(), and GetX().
|
inline |
Definition at line 74 of file PronyFitter.h.
References fuFitWfm.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
std::complex< float > * PronyFitter::GetHarmonics | ( | ) |
Definition at line 438 of file PronyFitter.cxx.
References fz.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().
float PronyFitter::GetIntegral | ( | int | gate_beg, |
int | gate_end ) |
Definition at line 542 of file PronyFitter.cxx.
References fuFitWfm, and fuFitZeroLevel.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
float PronyFitter::GetMaxAmplitude | ( | ) |
Definition at line 586 of file PronyFitter.cxx.
References GetFitValue(), and GetSignalMaxTime().
Referenced by CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
int PronyFitter::GetNumberPolRoots | ( | ) |
Definition at line 440 of file PronyFitter.cxx.
References fTotalPolRoots.
float PronyFitter::GetRSquare | ( | int | gate_beg, |
int | gate_end ) |
Definition at line 637 of file PronyFitter.cxx.
References fModelOrder, fuFitWfm, and fuWfm.
Referenced by ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), GetRSquareSignal(), CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
float PronyFitter::GetRSquareSignal | ( | ) |
Definition at line 661 of file PronyFitter.cxx.
References fGateEnd, fSignalBegin, and GetRSquare().
float PronyFitter::GetSignalBeginFromPhase | ( | ) |
Definition at line 579 of file PronyFitter.cxx.
References fh, fSignalBegin, and fz.
Referenced by GetFitValue().
float PronyFitter::GetSignalMaxTime | ( | ) |
Definition at line 572 of file PronyFitter.cxx.
References fh, fSignalBegin, fz, and log().
Referenced by GetMaxAmplitude(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
float PronyFitter::GetX | ( | float | level, |
int | first_sample, | ||
int | last_sample ) |
Definition at line 588 of file PronyFitter.cxx.
References GetFitValue(), and LevelBy2Points().
float PronyFitter::GetX | ( | float | level, |
int | first_sample, | ||
int | last_sample, | ||
float | step ) |
Definition at line 611 of file PronyFitter.cxx.
References GetFitValue(), and LevelBy2Points().
float PronyFitter::GetZeroLevel | ( | ) |
Definition at line 570 of file PronyFitter.cxx.
References fuFitZeroLevel.
Referenced by CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
|
private |
Definition at line 19 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 632 of file PronyFitter.cxx.
void PronyFitter::MakePileUpRejection | ( | int | time_max | ) |
Definition at line 442 of file PronyFitter.cxx.
|
inline |
Definition at line 50 of file PronyFitter.h.
References fIsDebug.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
void PronyFitter::SetExternalHarmonics | ( | std::complex< float > | z1, |
std::complex< float > | z2 ) |
Definition at line 426 of file PronyFitter.cxx.
References fExpNumber, and SetHarmonics().
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
void PronyFitter::SetHarmonics | ( | std::complex< float > * | z | ) |
Definition at line 421 of file PronyFitter.cxx.
References fExpNumber, and fz.
Referenced by CalculateFitHarmonics(), and SetExternalHarmonics().
void PronyFitter::SetSignalBegin | ( | int | SignalBeg | ) |
Definition at line 51 of file PronyFitter.cxx.
References fIsDebug, fSignalBegin, and fuZeroLevel.
Referenced by ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
void PronyFitter::SetWaveform | ( | std::vector< uint16_t > & | uWfm, |
uint16_t | uZeroLevel ) |
Definition at line 38 of file PronyFitter.cxx.
References fSampleTotal, fuFitWfm, fuWfm, and fuZeroLevel.
Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs(), CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().
void PronyFitter::SolveSLECholesky | ( | float * | x, |
float ** | a, | ||
float * | b, | ||
int | n ) |
Definition at line 915 of file PronyFitter.cxx.
void PronyFitter::SolveSLEGauss | ( | float * | x, |
float ** | r, | ||
float * | b, | ||
int | n ) |
Definition at line 786 of file PronyFitter.cxx.
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 850 of file PronyFitter.cxx.
|
private |
Definition at line 84 of file PronyFitter.h.
Referenced by AllocData(), CalculateFitAmplitudes(), CalculateFitHarmonics(), ChooseBestSignalBeginHarmonics(), Clear(), GetFitValue(), Initialize(), SetExternalHarmonics(), and SetHarmonics().
|
private |
Definition at line 85 of file PronyFitter.h.
Referenced by ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), Clear(), and Initialize().
|
private |
Definition at line 86 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), ChooseBestSignalBegin(), ChooseBestSignalBeginHarmonics(), Clear(), CovarianceDirect(), CovarianceQRmod(), GetRSquareSignal(), and Initialize().
|
private |
Definition at line 95 of file PronyFitter.h.
Referenced by AllocData(), CalculateFitAmplitudes(), DeleteData(), GetAmplitudes(), GetFitValue(), GetSignalBeginFromPhase(), and GetSignalMaxTime().
|
private |
Definition at line 82 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), CalculateFitHarmonics(), ChooseBestSignalBeginHarmonics(), CovarianceDirect(), CovarianceQRmod(), SetDebugMode(), SetSignalBegin(), SolveSLEGauss(), and SolveSLEGauss().
|
private |
Definition at line 83 of file PronyFitter.h.
Referenced by CalculateFitHarmonics(), Clear(), CovarianceDirect(), CovarianceQRmod(), GetRSquare(), and Initialize().
|
private |
Definition at line 87 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), Clear(), and SetWaveform().
|
private |
Definition at line 89 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), Clear(), CovarianceDirect(), CovarianceQRmod(), GetFitValue(), GetRSquareSignal(), GetSignalBeginFromPhase(), GetSignalMaxTime(), and SetSignalBegin().
|
private |
Definition at line 90 of file PronyFitter.h.
Referenced by CalculateFitHarmonics(), ChooseBestSignalBeginHarmonics(), Clear(), and GetNumberPolRoots().
|
private |
Definition at line 96 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), Clear(), GetChiSquare(), GetDeltaInSample(), GetFitValue(), GetFitWfm(), GetIntegral(), GetRSquare(), and SetWaveform().
|
private |
Definition at line 97 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), GetChiSquare(), GetIntegral(), and GetZeroLevel().
|
private |
Definition at line 92 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), CovarianceDirect(), CovarianceQRmod(), GetChiSquare(), GetDeltaInSample(), GetRSquare(), and SetWaveform().
|
private |
Definition at line 93 of file PronyFitter.h.
Referenced by CalculateFitAmplitudes(), Clear(), CovarianceDirect(), CovarianceQRmod(), GetChiSquare(), SetSignalBegin(), and SetWaveform().
|
private |
Definition at line 94 of file PronyFitter.h.
Referenced by AllocData(), CalculateFitAmplitudes(), ChooseBestSignalBeginHarmonics(), DeleteData(), GetFitValue(), GetHarmonics(), GetSignalBeginFromPhase(), GetSignalMaxTime(), and SetHarmonics().