CbmRoot
Loading...
Searching...
No Matches
PsdSignalFitting::PronyFitter Class Reference

#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
 

Detailed Description

Definition at line 25 of file PronyFitter.h.

Constructor & Destructor Documentation

◆ PronyFitter() [1/2]

PsdSignalFitting::PronyFitter::PronyFitter ( )
inline

Default constructor

Definition at line 29 of file PronyFitter.h.

◆ PronyFitter() [2/2]

PronyFitter::PronyFitter ( int model_order,
int exponent_number,
int gate_beg,
int gate_end )

Definition at line 14 of file PronyFitter.cxx.

References Initialize().

◆ ~PronyFitter()

PsdSignalFitting::PronyFitter::~PronyFitter ( )
inline

Default destructor

Definition at line 33 of file PronyFitter.h.

References Clear().

Member Function Documentation

◆ AllocData()

void PronyFitter::AllocData ( )
private

Definition at line 28 of file PronyFitter.cxx.

References fExpNumber, fh, and fz.

Referenced by Initialize().

◆ CalcSignalBegin()

int PronyFitter::CalcSignalBegin ( float front_time_beg_03,
float front_time_end )

Definition at line 46 of file PronyFitter.cxx.

◆ CalculateFitAmplitudes()

◆ CalculateFitHarmonics()

void PronyFitter::CalculateFitHarmonics ( )

◆ ChooseBestSignalBegin()

int PronyFitter::ChooseBestSignalBegin ( int first_sample,
int last_sample )

◆ ChooseBestSignalBeginHarmonics()

int PronyFitter::ChooseBestSignalBeginHarmonics ( int first_sample,
int last_sample )

◆ Clear()

void PronyFitter::Clear ( )
private

◆ CovarianceDirect()

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().

◆ CovarianceQRmod()

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.

◆ DeleteData()

void PronyFitter::DeleteData ( )
private

Definition at line 962 of file PronyFitter.cxx.

References fh, and fz.

Referenced by Clear().

◆ GetAmplitudes()

std::complex< float > * PronyFitter::GetAmplitudes ( )

Definition at line 540 of file PronyFitter.cxx.

References fh.

◆ GetChiSquare()

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.

◆ GetDeltaInSample()

float PronyFitter::GetDeltaInSample ( int sample)

Definition at line 707 of file PronyFitter.cxx.

References fuFitWfm, and fuWfm.

◆ GetFitValue() [1/2]

float PronyFitter::GetFitValue ( float x)

Definition at line 558 of file PronyFitter.cxx.

References fExpNumber, fh, fSignalBegin, fz, GetSignalBeginFromPhase(), and x.

◆ GetFitValue() [2/2]

uint16_t PronyFitter::GetFitValue ( int sample_number)

Definition at line 552 of file PronyFitter.cxx.

References fuFitWfm.

Referenced by GetMaxAmplitude(), GetX(), and GetX().

◆ GetFitWfm()

std::vector< uint16_t > PsdSignalFitting::PronyFitter::GetFitWfm ( )
inline

◆ GetHarmonics()

std::complex< float > * PronyFitter::GetHarmonics ( )

Definition at line 438 of file PronyFitter.cxx.

References fz.

Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().

◆ GetIntegral()

float PronyFitter::GetIntegral ( int gate_beg,
int gate_end )

◆ GetMaxAmplitude()

float PronyFitter::GetMaxAmplitude ( )

◆ GetNumberPolRoots()

int PronyFitter::GetNumberPolRoots ( )

Definition at line 440 of file PronyFitter.cxx.

References fTotalPolRoots.

◆ GetRSquare()

◆ GetRSquareSignal()

float PronyFitter::GetRSquareSignal ( )

Definition at line 661 of file PronyFitter.cxx.

References fGateEnd, fSignalBegin, and GetRSquare().

◆ GetSignalBeginFromPhase()

float PronyFitter::GetSignalBeginFromPhase ( )

Definition at line 579 of file PronyFitter.cxx.

References fh, fSignalBegin, and fz.

Referenced by GetFitValue().

◆ GetSignalMaxTime()

float PronyFitter::GetSignalMaxTime ( )

◆ GetX() [1/2]

float PronyFitter::GetX ( float level,
int first_sample,
int last_sample )

Definition at line 588 of file PronyFitter.cxx.

References GetFitValue(), and LevelBy2Points().

◆ GetX() [2/2]

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().

◆ GetZeroLevel()

float PronyFitter::GetZeroLevel ( )

Definition at line 570 of file PronyFitter.cxx.

References fuFitZeroLevel.

Referenced by CbmMcbm2018UnpackerAlgoPsd::ProcessMs(), and CbmPsdUnpackAlgo::unpack().

◆ Initialize()

void PronyFitter::Initialize ( int model_order,
int exponent_number,
int gate_beg,
int gate_end )
private

Definition at line 19 of file PronyFitter.cxx.

References AllocData(), fExpNumber, fGateBeg, fGateEnd, and fModelOrder.

Referenced by PronyFitter().

◆ LevelBy2Points()

float PronyFitter::LevelBy2Points ( float X1,
float Y1,
float X2,
float Y2,
float Y0 )

Definition at line 632 of file PronyFitter.cxx.

Referenced by GetX(), and GetX().

◆ MakePileUpRejection()

void PronyFitter::MakePileUpRejection ( int time_max)

Definition at line 442 of file PronyFitter.cxx.

◆ SetDebugMode()

void PsdSignalFitting::PronyFitter::SetDebugMode ( bool IsDebug)
inline

◆ SetExternalHarmonics()

void PronyFitter::SetExternalHarmonics ( std::complex< float > z1,
std::complex< float > z2 )

◆ SetHarmonics()

void PronyFitter::SetHarmonics ( std::complex< float > * z)

Definition at line 421 of file PronyFitter.cxx.

References fExpNumber, and fz.

Referenced by CalculateFitHarmonics(), and SetExternalHarmonics().

◆ SetSignalBegin()

◆ SetWaveform()

void PronyFitter::SetWaveform ( std::vector< uint16_t > & uWfm,
uint16_t uZeroLevel )

◆ SolveSLECholesky()

void PronyFitter::SolveSLECholesky ( float * x,
float ** a,
float * b,
int n )

Definition at line 915 of file PronyFitter.cxx.

References x, and y.

◆ SolveSLEGauss() [1/2]

void PronyFitter::SolveSLEGauss ( float * x,
float ** r,
float * b,
int n )

Definition at line 786 of file PronyFitter.cxx.

References fIsDebug, and x.

Referenced by CalculateFitAmplitudes(), and CovarianceDirect().

◆ SolveSLEGauss() [2/2]

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.

References fIsDebug, and x.

Member Data Documentation

◆ fExpNumber

int PsdSignalFitting::PronyFitter::fExpNumber
private

◆ fGateBeg

int PsdSignalFitting::PronyFitter::fGateBeg
private

◆ fGateEnd

int PsdSignalFitting::PronyFitter::fGateEnd
private

◆ fh

std::complex<float>* PsdSignalFitting::PronyFitter::fh
private

◆ fIsDebug

bool PsdSignalFitting::PronyFitter::fIsDebug = false
private

◆ fModelOrder

int PsdSignalFitting::PronyFitter::fModelOrder
private

◆ fSampleTotal

int PsdSignalFitting::PronyFitter::fSampleTotal
private

Definition at line 87 of file PronyFitter.h.

Referenced by CalculateFitAmplitudes(), Clear(), and SetWaveform().

◆ fSignalBegin

int PsdSignalFitting::PronyFitter::fSignalBegin
private

◆ fTotalPolRoots

int PsdSignalFitting::PronyFitter::fTotalPolRoots
private

◆ fuFitWfm

std::vector<uint16_t> PsdSignalFitting::PronyFitter::fuFitWfm
private

◆ fuFitZeroLevel

uint16_t PsdSignalFitting::PronyFitter::fuFitZeroLevel
private

Definition at line 97 of file PronyFitter.h.

Referenced by CalculateFitAmplitudes(), GetChiSquare(), GetIntegral(), and GetZeroLevel().

◆ fuWfm

std::vector<uint16_t> PsdSignalFitting::PronyFitter::fuWfm
private

◆ fuZeroLevel

uint16_t PsdSignalFitting::PronyFitter::fuZeroLevel
private

◆ fz

std::complex<float>* PsdSignalFitting::PronyFitter::fz
private

The documentation for this class was generated from the following files: