GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TPulseAnalyzer Class Reference

Detailed Description

Mostly a direct port of SFU code I have stripped out some surplus and encapsulated it, but I havent changed much I'm sure there is more that can be stripped and reformated but it is working currently.

Definition at line 33 of file TPulseAnalyzer.h.

Classes

struct  LinePar
 
struct  ParPar
 
struct  ShapePar
 
struct  SinPar
 
struct  WaveFormPar
 

Public Member Functions

 TPulseAnalyzer ()
 
 TPulseAnalyzer (const std::vector< Short_t > &wave, double=0, std::string name="")
 
 TPulseAnalyzer (const TFragment &fragment, double=0)
 
 TPulseAnalyzer (const TPulseAnalyzer &)=default
 
 TPulseAnalyzer (TPulseAnalyzer &&) noexcept=default
 
virtual ~TPulseAnalyzer ()
 
void Clear (Option_t *opt="")
 
double CsIPID ()
 
double CsIt0 ()
 
void DrawCsIExclusion ()
 
void DrawCsIFit ()
 
void DrawRFFit ()
 
void Drawsilifit ()
 
void DrawT0fit ()
 
void DrawWave ()
 
double fit_newT0 ()
 
double fit_rf (double=2 *8.48409)
 
bool Get_bflag ()
 
double get_sig2noise ()
 
double Get_wpar_amplitude ()
 
double Get_wpar_baselinefin ()
 
double Get_wpar_decay ()
 
double Get_wpar_rise ()
 
double Get_wpar_T0 ()
 
int GetCsIChiSq ()
 
int GetCsIFitType ()
 
TF1 Getsilifit ()
 
bool GetSiliShape (double tauDecay, double tauRise)
 
bool GetSiliShapeTF1 (double tauDecay, double tauRise, double baseline, double basefreq=0)
 
double GetsiliSmirnov ()
 
TGraph * GetWaveGraph ()
 
TH1I * GetWaveHist ()
 
int16_t good_baseline ()
 
bool IsSet () const
 
TPulseAnalyzeroperator= (const TPulseAnalyzer &)=default
 
TPulseAnalyzeroperator= (TPulseAnalyzer &&) noexcept=default
 
void print_WavePar ()
 
void SetData (const std::vector< Short_t > &wave, double=0)
 
void SetData (const TFragment &fragment, double=0)
 
bool SiliShapePrepare (double tauDecay, double tauRise)
 

Static Public Member Functions

static double SiLiFitFunction (double *i, double *p)
 

Static Public Attributes

static int fNameIter = 0
 

Private Member Functions

bool CsIIsSet () const
 
long double determinant (int)
 
int fit_line (int, int, LinePar *)
 
int fit_parabola (int, int, ParPar *)
 
int fit_smooth_parabola (int, int, double, ParPar *)
 
int FitCsIShape (int, ShapePar *, WaveFormPar *)
 
void get_baseline ()
 
void get_baseline_fin ()
 
double get_linear_T0 ()
 
double get_parabolic_T0 ()
 
double get_sin_par (double)
 
double get_smooth_T0 ()
 
void get_t10 ()
 
void get_t30 ()
 
void get_t50 ()
 
void get_t90 ()
 
double get_tfrac (double, double, double)
 
void get_tmax ()
 
void GetCsIExclusionZone ()
 
int GetCsIShape ()
 
double GetCsIt0 (ShapePar *, WaveFormPar *)
 
double GetCsITau (int, ShapePar *)
 
void GetQuickPara ()
 
void SetCsI (bool option=true)
 
int solve_lin_eq ()
 

Private Attributes

int cN {0}
 
long double copy_matrix [20][20]
 
bool CsISet
 
ShapeParcsiTestShpar [4] {nullptr}
 
WaveFormParcsiTestWpar [4] {nullptr}
 
std::vector< Short_t > cWavebuffer
 
WaveFormParcWpar {nullptr}
 
double EPS
 
int FILTER
 
std::string fName
 
double LARGECHISQ
 
int lineq_dim
 
long double lineq_matrix [20][20]
 
long double lineq_solution [20]
 
long double lineq_vector [20]
 
bool set {false}
 
ShapeParshpar {nullptr}
 
SinParspar {nullptr}
 
int T0RANGE
 

Static Private Attributes

static const int BAD_BASELINE_RANGE = -1024 - 12
 
static const int BAD_EXCLUSION_ZONE = -1024 - 10
 
static const int BAD_MAX = -1024 - 11
 
static const int BAD_PID = -1024
 
static const int BADCHISQ_AMPL = -1024 - 6
 
static const int BADCHISQ_FAIL_DIRECT = -1024 - 9
 
static const int BADCHISQ_LIN_T0 = -1024 - 4
 
static const int BADCHISQ_MAT = -1024 - 5
 
static const int BADCHISQ_NEG = -1024 - 1
 
static const int BADCHISQ_PAR_T0 = -1024 - 3
 
static const int BADCHISQ_SMOOTH_T0 = -1024 - 2
 
static const int BADCHISQ_T0 = -1024 - 7
 
static const int CSI_BASELINE_RANGE = 50
 
static const int MAX_SAMPLES = 4096
 
static const int NOISE_LEVEL_CSI = 100
 
static const int NSHAPE = 5
 
static const int PIN_BASELINE_RANGE = 16
 
+ Collaboration diagram for TPulseAnalyzer:

Constructor & Destructor Documentation

◆ TPulseAnalyzer() [1/5]

TPulseAnalyzer::TPulseAnalyzer ( )

Definition at line 5 of file TPulseAnalyzer.cxx.

References Clear().

◆ TPulseAnalyzer() [2/5]

TPulseAnalyzer::TPulseAnalyzer ( const TFragment & fragment,
double noise_fac = 0 )
explicit

Definition at line 10 of file TPulseAnalyzer.cxx.

References Clear(), and SetData().

◆ TPulseAnalyzer() [3/5]

TPulseAnalyzer::TPulseAnalyzer ( const std::vector< Short_t > & wave,
double noise_fac = 0,
std::string name = "" )
explicit

Definition at line 16 of file TPulseAnalyzer.cxx.

References Clear(), and SetData().

◆ TPulseAnalyzer() [4/5]

TPulseAnalyzer::TPulseAnalyzer ( const TPulseAnalyzer & )
default

◆ TPulseAnalyzer() [5/5]

TPulseAnalyzer::TPulseAnalyzer ( TPulseAnalyzer && )
defaultnoexcept

◆ ~TPulseAnalyzer()

TPulseAnalyzer::~TPulseAnalyzer ( )
virtual

Definition at line 23 of file TPulseAnalyzer.cxx.

References cWpar, shpar, and spar.

Member Function Documentation

◆ Clear()

void TPulseAnalyzer::Clear ( Option_t * opt = "")

◆ CsIIsSet()

bool TPulseAnalyzer::CsIIsSet ( ) const
inlineprivate

Definition at line 208 of file TPulseAnalyzer.h.

References CsISet.

Referenced by CsIPID(), CsIt0(), DrawCsIFit(), GetCsIChiSq(), and GetCsIFitType().

◆ CsIPID()

◆ CsIt0()

double TPulseAnalyzer::CsIt0 ( )

◆ determinant()

long double TPulseAnalyzer::determinant ( int m)
private

Definition at line 91 of file TPulseAnalyzer.cxx.

References copy_matrix, determinant(), and s.

Referenced by determinant(), and solve_lin_eq().

◆ DrawCsIExclusion()

◆ DrawCsIFit()

void TPulseAnalyzer::DrawCsIFit ( )

◆ DrawRFFit()

void TPulseAnalyzer::DrawRFFit ( )

◆ Drawsilifit()

void TPulseAnalyzer::Drawsilifit ( )

◆ DrawT0fit()

◆ DrawWave()

void TPulseAnalyzer::DrawWave ( )

Definition at line 1762 of file TPulseAnalyzer.cxx.

References GetWaveHist().

Referenced by DrawCsIExclusion(), DrawCsIFit(), DrawRFFit(), Drawsilifit(), and DrawT0fit().

◆ fit_line()

◆ fit_newT0()

◆ fit_parabola()

◆ fit_rf()

double TPulseAnalyzer::fit_rf ( double T = 2 * 8.48409)

Definition at line 173 of file TPulseAnalyzer.cxx.

References cN, get_sin_par(), set, spar, and TPulseAnalyzer::SinPar::t0.

Referenced by TRF::AddFragment().

◆ fit_smooth_parabola()

◆ FitCsIShape()

◆ get_baseline()

◆ get_baseline_fin()

void TPulseAnalyzer::get_baseline_fin ( )
private

◆ Get_bflag()

bool TPulseAnalyzer::Get_bflag ( )
inline

Definition at line 145 of file TPulseAnalyzer.h.

References TPulseAnalyzer::WaveFormPar::bflag, and cWpar.

◆ get_linear_T0()

◆ get_parabolic_T0()

◆ get_sig2noise()

◆ get_sin_par()

double TPulseAnalyzer::get_sin_par ( double T)
private

◆ get_smooth_T0()

◆ get_t10()

void TPulseAnalyzer::get_t10 ( )
private

◆ get_t30()

void TPulseAnalyzer::get_t30 ( )
private

◆ get_t50()

void TPulseAnalyzer::get_t50 ( )
private

◆ get_t90()

void TPulseAnalyzer::get_t90 ( )
private

◆ get_tfrac()

◆ get_tmax()

◆ Get_wpar_amplitude()

double TPulseAnalyzer::Get_wpar_amplitude ( )
inline

Definition at line 138 of file TPulseAnalyzer.h.

References TPulseAnalyzer::WaveFormPar::amplitude, and cWpar.

Referenced by TSiLiHit::SetWavefit().

◆ Get_wpar_baselinefin()

double TPulseAnalyzer::Get_wpar_baselinefin ( )
inline

Definition at line 137 of file TPulseAnalyzer.h.

References TPulseAnalyzer::WaveFormPar::baselinefin, and cWpar.

Referenced by TSiLiHit::SetWavefit().

◆ Get_wpar_decay()

double TPulseAnalyzer::Get_wpar_decay ( )
inline

Definition at line 139 of file TPulseAnalyzer.h.

References cWpar, and TPulseAnalyzer::WaveFormPar::tauDecay.

◆ Get_wpar_rise()

double TPulseAnalyzer::Get_wpar_rise ( )
inline

Definition at line 140 of file TPulseAnalyzer.h.

References cWpar, and TPulseAnalyzer::WaveFormPar::tauRise.

◆ Get_wpar_T0()

double TPulseAnalyzer::Get_wpar_T0 ( )
inline

Definition at line 136 of file TPulseAnalyzer.h.

References cWpar, and TPulseAnalyzer::WaveFormPar::t0.

Referenced by TSiLiHit::SetWavefit().

◆ GetCsIChiSq()

int TPulseAnalyzer::GetCsIChiSq ( )

Definition at line 850 of file TPulseAnalyzer.cxx.

References TPulseAnalyzer::ShapePar::chisq, CsIIsSet(), and shpar.

Referenced by TTipHit::SetPID().

◆ GetCsIExclusionZone()

◆ GetCsIFitType()

int TPulseAnalyzer::GetCsIFitType ( )

Definition at line 858 of file TPulseAnalyzer.cxx.

References CsIIsSet(), shpar, and TPulseAnalyzer::ShapePar::type.

Referenced by TTipHit::SetPID().

◆ GetCsIShape()

◆ GetCsIt0()

double TPulseAnalyzer::GetCsIt0 ( ShapePar * par,
WaveFormPar * wpar )
private

◆ GetCsITau()

double TPulseAnalyzer::GetCsITau ( int i,
ShapePar * par )
private

Definition at line 1319 of file TPulseAnalyzer.cxx.

References NSHAPE, and TPulseAnalyzer::ShapePar::t.

Referenced by FitCsIShape(), and GetCsIt0().

◆ GetQuickPara()

◆ Getsilifit()

◆ GetSiliShape()

◆ GetSiliShapeTF1()

◆ GetsiliSmirnov()

double TPulseAnalyzer::GetsiliSmirnov ( )

Definition at line 1736 of file TPulseAnalyzer.cxx.

References cN, cWavebuffer, cWpar, Getsilifit(), and set.

Referenced by TSiLiHit::SetWavefit().

◆ GetWaveGraph()

TGraph * TPulseAnalyzer::GetWaveGraph ( )

Definition at line 1787 of file TPulseAnalyzer.cxx.

References cN, cWavebuffer, and set.

Referenced by GetSiliShapeTF1().

◆ GetWaveHist()

TH1I * TPulseAnalyzer::GetWaveHist ( )

Definition at line 1772 of file TPulseAnalyzer.cxx.

References cN, cWavebuffer, fNameIter, and set.

Referenced by DrawWave().

◆ good_baseline()

int16_t TPulseAnalyzer::good_baseline ( )

◆ IsSet()

◆ operator=() [1/2]

TPulseAnalyzer & TPulseAnalyzer::operator= ( const TPulseAnalyzer & )
default

◆ operator=() [2/2]

TPulseAnalyzer & TPulseAnalyzer::operator= ( TPulseAnalyzer && )
defaultnoexcept

◆ print_WavePar()

◆ SetCsI()

void TPulseAnalyzer::SetCsI ( bool option = true)
inlineprivate

Definition at line 207 of file TPulseAnalyzer.h.

References CsISet.

Referenced by Clear(), CsIPID(), CsIt0(), and SetData().

◆ SetData() [1/2]

void TPulseAnalyzer::SetData ( const std::vector< Short_t > & wave,
double noise_fac = 0 )

Definition at line 55 of file TPulseAnalyzer.cxx.

References cN, cWavebuffer, FILTER, set, SetCsI(), and T0RANGE.

◆ SetData() [2/2]

void TPulseAnalyzer::SetData ( const TFragment & fragment,
double noise_fac = 0 )

◆ SiLiFitFunction()

double TPulseAnalyzer::SiLiFitFunction ( double * i,
double * p )
static

Definition at line 1696 of file TPulseAnalyzer.cxx.

References s.

Referenced by Getsilifit().

◆ SiliShapePrepare()

◆ solve_lin_eq()

Member Data Documentation

◆ BAD_BASELINE_RANGE

const int TPulseAnalyzer::BAD_BASELINE_RANGE = -1024 - 12
staticprivate

Definition at line 243 of file TPulseAnalyzer.h.

Referenced by CsIPID().

◆ BAD_EXCLUSION_ZONE

const int TPulseAnalyzer::BAD_EXCLUSION_ZONE = -1024 - 10
staticprivate

Definition at line 241 of file TPulseAnalyzer.h.

Referenced by CsIPID().

◆ BAD_MAX

const int TPulseAnalyzer::BAD_MAX = -1024 - 11
staticprivate

Definition at line 242 of file TPulseAnalyzer.h.

Referenced by CsIPID().

◆ BAD_PID

const int TPulseAnalyzer::BAD_PID = -1024
staticprivate

Definition at line 244 of file TPulseAnalyzer.h.

Referenced by CsIPID().

◆ BADCHISQ_AMPL

const int TPulseAnalyzer::BADCHISQ_AMPL = -1024 - 6
staticprivate

Definition at line 256 of file TPulseAnalyzer.h.

Referenced by FitCsIShape().

◆ BADCHISQ_FAIL_DIRECT

const int TPulseAnalyzer::BADCHISQ_FAIL_DIRECT = -1024 - 9
staticprivate

Definition at line 240 of file TPulseAnalyzer.h.

Referenced by GetCsIShape().

◆ BADCHISQ_LIN_T0

const int TPulseAnalyzer::BADCHISQ_LIN_T0 = -1024 - 4
staticprivate

Definition at line 238 of file TPulseAnalyzer.h.

Referenced by get_linear_T0().

◆ BADCHISQ_MAT

const int TPulseAnalyzer::BADCHISQ_MAT = -1024 - 5
staticprivate

Definition at line 239 of file TPulseAnalyzer.h.

Referenced by fit_line(), fit_parabola(), fit_smooth_parabola(), and FitCsIShape().

◆ BADCHISQ_NEG

const int TPulseAnalyzer::BADCHISQ_NEG = -1024 - 1
staticprivate

Definition at line 255 of file TPulseAnalyzer.h.

Referenced by FitCsIShape().

◆ BADCHISQ_PAR_T0

const int TPulseAnalyzer::BADCHISQ_PAR_T0 = -1024 - 3
staticprivate

Definition at line 237 of file TPulseAnalyzer.h.

Referenced by get_parabolic_T0().

◆ BADCHISQ_SMOOTH_T0

const int TPulseAnalyzer::BADCHISQ_SMOOTH_T0 = -1024 - 2
staticprivate

Definition at line 236 of file TPulseAnalyzer.h.

Referenced by get_smooth_T0().

◆ BADCHISQ_T0

const int TPulseAnalyzer::BADCHISQ_T0 = -1024 - 7
staticprivate

Definition at line 254 of file TPulseAnalyzer.h.

Referenced by FitCsIShape().

◆ cN

◆ copy_matrix

long double TPulseAnalyzer::copy_matrix[20][20]
private

Definition at line 195 of file TPulseAnalyzer.h.

Referenced by Clear(), determinant(), and solve_lin_eq().

◆ CSI_BASELINE_RANGE

const int TPulseAnalyzer::CSI_BASELINE_RANGE = 50
staticprivate

Definition at line 250 of file TPulseAnalyzer.h.

Referenced by GetCsIExclusionZone().

◆ CsISet

bool TPulseAnalyzer::CsISet
private

Definition at line 204 of file TPulseAnalyzer.h.

Referenced by CsIIsSet(), and SetCsI().

◆ csiTestShpar

ShapePar* TPulseAnalyzer::csiTestShpar[4] {nullptr}
private

Definition at line 181 of file TPulseAnalyzer.h.

Referenced by GetCsIShape().

◆ csiTestWpar

WaveFormPar* TPulseAnalyzer::csiTestWpar[4] {nullptr}
private

Definition at line 180 of file TPulseAnalyzer.h.

Referenced by GetCsIShape().

◆ cWavebuffer

◆ cWpar

◆ EPS

double TPulseAnalyzer::EPS
private

Definition at line 205 of file TPulseAnalyzer.h.

Referenced by Clear(), and GetCsIt0().

◆ FILTER

int TPulseAnalyzer::FILTER
private

Definition at line 186 of file TPulseAnalyzer.h.

Referenced by Clear(), DrawCsIExclusion(), get_tmax(), GetCsIExclusionZone(), and SetData().

◆ fName

std::string TPulseAnalyzer::fName
private

Definition at line 183 of file TPulseAnalyzer.h.

◆ fNameIter

int TPulseAnalyzer::fNameIter = 0
static

Definition at line 159 of file TPulseAnalyzer.h.

Referenced by Getsilifit(), and GetWaveHist().

◆ LARGECHISQ

double TPulseAnalyzer::LARGECHISQ
private

◆ lineq_dim

◆ lineq_matrix

long double TPulseAnalyzer::lineq_matrix[20][20]
private

◆ lineq_solution

long double TPulseAnalyzer::lineq_solution[20]
private

◆ lineq_vector

long double TPulseAnalyzer::lineq_vector[20]
private

◆ MAX_SAMPLES

const int TPulseAnalyzer::MAX_SAMPLES = 4096
staticprivate

Definition at line 248 of file TPulseAnalyzer.h.

Referenced by get_t10(), get_t30(), get_t50(), and get_t90().

◆ NOISE_LEVEL_CSI

const int TPulseAnalyzer::NOISE_LEVEL_CSI = 100
staticprivate

Definition at line 251 of file TPulseAnalyzer.h.

Referenced by GetCsIExclusionZone().

◆ NSHAPE

const int TPulseAnalyzer::NSHAPE = 5
staticprivate

Definition at line 252 of file TPulseAnalyzer.h.

Referenced by GetCsITau().

◆ PIN_BASELINE_RANGE

const int TPulseAnalyzer::PIN_BASELINE_RANGE = 16
staticprivate

Definition at line 247 of file TPulseAnalyzer.h.

◆ set

◆ shpar

ShapePar* TPulseAnalyzer::shpar {nullptr}
private

◆ spar

SinPar* TPulseAnalyzer::spar {nullptr}
private

Definition at line 178 of file TPulseAnalyzer.h.

Referenced by ~TPulseAnalyzer(), DrawRFFit(), fit_rf(), and get_sin_par().

◆ T0RANGE

int TPulseAnalyzer::T0RANGE
private