CbmRoot
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 19 of file PronyFitter.h.

Constructor & Destructor Documentation

◆ PronyFitter() [1/2]

PsdSignalFitting::PronyFitter::PronyFitter ( )
inline

Default constructor

Definition at line 23 of file PronyFitter.h.

◆ PronyFitter() [2/2]

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

Definition at line 8 of file PronyFitter.cxx.

References Initialize().

◆ ~PronyFitter()

PsdSignalFitting::PronyFitter::~PronyFitter ( )
inline

Default destructor

Definition at line 30 of file PronyFitter.h.

References Clear().

Member Function Documentation

◆ AllocData()

void PronyFitter::AllocData ( )
private

Definition at line 26 of file PronyFitter.cxx.

References fExpNumber, fh, fz, and i.

Referenced by Initialize().

◆ CalcSignalBegin()

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

Definition at line 43 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 122 of file PronyFitter.cxx.

References fGateEnd, fIsDebug, fModelOrder, fSignalBegin, fuWfm, fuZeroLevel, i, 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 d, fGateEnd, fIsDebug, fModelOrder, fSignalBegin, fuWfm, fuZeroLevel, and i.

◆ DeleteData()

void PronyFitter::DeleteData ( )
private

Definition at line 995 of file PronyFitter.cxx.

References fh, and fz.

Referenced by Clear().

◆ GetAmplitudes()

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

Definition at line 544 of file PronyFitter.cxx.

References fh.

◆ GetChiSquare()

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.

◆ GetDeltaInSample()

float PronyFitter::GetDeltaInSample ( int  sample)

Definition at line 733 of file PronyFitter.cxx.

References fuFitWfm, and fuWfm.

◆ GetFitValue() [1/2]

float PronyFitter::GetFitValue ( float  x)

Definition at line 561 of file PronyFitter.cxx.

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

◆ GetFitValue() [2/2]

uint16_t PronyFitter::GetFitValue ( int  sample_number)

Definition at line 555 of file PronyFitter.cxx.

References fuFitWfm.

Referenced by GetMaxAmplitude(), and GetX().

◆ GetFitWfm()

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

Definition at line 80 of file PronyFitter.h.

References fuFitWfm.

Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().

◆ GetHarmonics()

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

Definition at line 440 of file PronyFitter.cxx.

References fz.

Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().

◆ GetIntegral()

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

◆ GetMaxAmplitude()

float PronyFitter::GetMaxAmplitude ( )

Definition at line 588 of file PronyFitter.cxx.

References GetFitValue(), and GetSignalMaxTime().

◆ GetNumberPolRoots()

int PronyFitter::GetNumberPolRoots ( )

Definition at line 442 of file PronyFitter.cxx.

References fTotalPolRoots.

◆ GetRSquare()

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

◆ GetRSquareSignal()

float PronyFitter::GetRSquareSignal ( )

Definition at line 681 of file PronyFitter.cxx.

References fGateEnd, fSignalBegin, and GetRSquare().

◆ GetSignalBeginFromPhase()

float PronyFitter::GetSignalBeginFromPhase ( )

Definition at line 581 of file PronyFitter.cxx.

References fh, fSignalBegin, fz, and log().

Referenced by GetFitValue().

◆ GetSignalMaxTime()

float PronyFitter::GetSignalMaxTime ( )

Definition at line 574 of file PronyFitter.cxx.

References fh, fSignalBegin, fz, and log().

Referenced by GetMaxAmplitude().

◆ GetX() [1/2]

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

Definition at line 592 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 620 of file PronyFitter.cxx.

References GetFitValue(), and LevelBy2Points().

◆ GetZeroLevel()

float PronyFitter::GetZeroLevel ( )

Definition at line 572 of file PronyFitter.cxx.

References fuFitZeroLevel.

◆ Initialize()

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

Definition at line 15 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 648 of file PronyFitter.cxx.

Referenced by GetX().

◆ MakePileUpRejection()

void PronyFitter::MakePileUpRejection ( int  time_max)

Definition at line 444 of file PronyFitter.cxx.

◆ SetDebugMode()

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

Definition at line 56 of file PronyFitter.h.

References fIsDebug.

Referenced by CbmMcbm2018MonitorAlgoPsd::ProcessMs().

◆ SetExternalHarmonics()

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.

◆ SetHarmonics()

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

Definition at line 424 of file PronyFitter.cxx.

References fExpNumber, and fz.

Referenced by CalculateFitHarmonics(), and SetExternalHarmonics().

◆ SetSignalBegin()

void PronyFitter::SetSignalBegin ( int  SignalBeg)

◆ SetWaveform()

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

◆ SolveSLECholesky()

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

Definition at line 949 of file PronyFitter.cxx.

References i, sqrt(), x, and y.

◆ SolveSLEGauss() [1/2]

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

◆ SolveSLEGauss() [2/2]

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.

References fIsDebug, i, 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 96 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 106 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: