GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
TPulseAnalyzer Class Reference

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 TFragment &fragment, double=0)
 
 TPulseAnalyzer (const std::vector< Short_t > &wave, double=0, std::string name="")
 
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 ()
 
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 ()
 
short good_baseline ()
 
bool IsSet ()
 
void print_WavePar ()
 
void SetData (const TFragment &fragment, double=0)
 
void SetData (const std::vector< Short_t > &wave, double=0)
 
bool SiliShapePrepare (double tauDecay, double tauRise)
 

Static Public Member Functions

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

Static Public Attributes

static int nameiter = 0
 

Private Member Functions

bool CsIIsSet ()
 
long double determinant (int)
 
int fit_line (int, int, LinePar *)
 
int fit_parabola (int, int, ParPar *)
 
int fit_smooth_parabola (int, int, double, ParPar *)
 
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 ()
 
double GetCsITau (int)
 
void GetQuickPara ()
 
void SetCsI (bool option="true")
 
int solve_lin_eq ()
 

Private Attributes

int cN
 
long double copy_matrix [20][20]
 
bool CsISet
 
std::vector< Short_t > cWavebuffer
 
WaveFormParcWpar
 
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
 
ShapeParshpar
 
SinParspar
 
int T0RANGE
 

Static Private Attributes

static const int BAD_BASELINE_RANGE = -1024 - 11
 
static const int BADCHISQ_AMPL = -1024 - 6
 
static const int BADCHISQ_EXC = -1024 - 8
 
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
 

#include <TPulseAnalyzer.h>

+ Collaboration diagram for TPulseAnalyzer:

Constructor & Destructor Documentation

◆ TPulseAnalyzer() [1/3]

TPulseAnalyzer::TPulseAnalyzer ( )

Definition at line 9 of file TPulseAnalyzer.cxx.

◆ TPulseAnalyzer() [2/3]

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

Definition at line 15 of file TPulseAnalyzer.cxx.

References Clear(), and SetData().

◆ TPulseAnalyzer() [3/3]

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

Definition at line 22 of file TPulseAnalyzer.cxx.

References Clear(), and SetData().

◆ ~TPulseAnalyzer()

TPulseAnalyzer::~TPulseAnalyzer ( )
virtual

Definition at line 29 of file TPulseAnalyzer.cxx.

References cWpar, shpar, and spar.

Member Function Documentation

◆ Clear()

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

◆ CsIIsSet()

bool TPulseAnalyzer::CsIIsSet ( )
inlineprivate

Definition at line 198 of file TPulseAnalyzer.h.

References CsISet.

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

◆ CsIPID()

double TPulseAnalyzer::CsIPID ( )

◆ CsIt0()

double TPulseAnalyzer::CsIt0 ( )

◆ determinant()

long double TPulseAnalyzer::determinant ( int  m)
private

Definition at line 102 of file TPulseAnalyzer.cxx.

References copy_matrix, and s.

Referenced by solve_lin_eq().

◆ DrawCsIExclusion()

◆ DrawCsIFit()

void TPulseAnalyzer::DrawCsIFit ( )

◆ DrawRFFit()

void TPulseAnalyzer::DrawRFFit ( )

◆ Drawsilifit()

void TPulseAnalyzer::Drawsilifit ( )

◆ DrawT0fit()

◆ DrawWave()

void TPulseAnalyzer::DrawWave ( )

Definition at line 1625 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 188 of file TPulseAnalyzer.cxx.

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

Referenced by TRF::AddFragment().

◆ fit_smooth_parabola()

◆ get_baseline()

◆ get_baseline_fin()

void TPulseAnalyzer::get_baseline_fin ( )
private

◆ Get_bflag()

bool TPulseAnalyzer::Get_bflag ( )
inline

Definition at line 139 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 132 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 131 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 133 of file TPulseAnalyzer.h.

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

◆ Get_wpar_rise()

double TPulseAnalyzer::Get_wpar_rise ( )
inline

Definition at line 134 of file TPulseAnalyzer.h.

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

◆ Get_wpar_T0()

double TPulseAnalyzer::Get_wpar_T0 ( )
inline

Definition at line 130 of file TPulseAnalyzer.h.

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

Referenced by TSiLiHit::SetWavefit().

◆ GetCsIChiSq()

int TPulseAnalyzer::GetCsIChiSq ( )

Definition at line 867 of file TPulseAnalyzer.cxx.

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

Referenced by TTipHit::SetPID().

◆ GetCsIExclusionZone()

◆ GetCsIShape()

◆ GetCsIt0()

◆ GetCsITau()

double TPulseAnalyzer::GetCsITau ( int  i)
private

Definition at line 1190 of file TPulseAnalyzer.cxx.

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

Referenced by GetCsIShape(), and GetCsIt0().

◆ GetQuickPara()

◆ Getsilifit()

◆ GetSiliShape()

◆ GetSiliShapeTF1()

◆ GetsiliSmirnov()

double TPulseAnalyzer::GetsiliSmirnov ( )

Definition at line 1598 of file TPulseAnalyzer.cxx.

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

Referenced by TSiLiHit::SetWavefit().

◆ GetWaveGraph()

TGraph * TPulseAnalyzer::GetWaveGraph ( )

Definition at line 1651 of file TPulseAnalyzer.cxx.

References cN, and cWavebuffer.

Referenced by GetSiliShapeTF1().

◆ GetWaveHist()

TH1I * TPulseAnalyzer::GetWaveHist ( )

Definition at line 1635 of file TPulseAnalyzer.cxx.

References cN, cWavebuffer, and nameiter.

Referenced by DrawWave().

◆ good_baseline()

short TPulseAnalyzer::good_baseline ( )

◆ IsSet()

◆ print_WavePar()

◆ SetCsI()

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

Definition at line 197 of file TPulseAnalyzer.h.

References CsISet.

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

◆ SetData() [1/2]

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

Definition at line 59 of file TPulseAnalyzer.cxx.

References TDetectorHit::GetWaveform(), and TDetectorHit::HasWave().

Referenced by TPulseAnalyzer().

◆ SetData() [2/2]

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

Definition at line 66 of file TPulseAnalyzer.cxx.

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

◆ SiLiFitFunction()

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

Definition at line 1562 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 - 11
staticprivate

Definition at line 233 of file TPulseAnalyzer.h.

◆ BADCHISQ_AMPL

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

Definition at line 242 of file TPulseAnalyzer.h.

◆ BADCHISQ_EXC

const int TPulseAnalyzer::BADCHISQ_EXC = -1024 - 8
staticprivate

Definition at line 230 of file TPulseAnalyzer.h.

◆ BADCHISQ_LIN_T0

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

Definition at line 228 of file TPulseAnalyzer.h.

Referenced by get_linear_T0().

◆ BADCHISQ_MAT

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

Definition at line 229 of file TPulseAnalyzer.h.

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

◆ BADCHISQ_NEG

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

Definition at line 241 of file TPulseAnalyzer.h.

Referenced by GetCsIShape().

◆ BADCHISQ_PAR_T0

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

Definition at line 227 of file TPulseAnalyzer.h.

Referenced by get_parabolic_T0().

◆ BADCHISQ_SMOOTH_T0

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

Definition at line 226 of file TPulseAnalyzer.h.

Referenced by get_smooth_T0().

◆ BADCHISQ_T0

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

Definition at line 240 of file TPulseAnalyzer.h.

Referenced by GetCsIShape().

◆ cN

◆ copy_matrix

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

Definition at line 186 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 236 of file TPulseAnalyzer.h.

Referenced by GetCsIExclusionZone().

◆ CsISet

bool TPulseAnalyzer::CsISet
private

Definition at line 194 of file TPulseAnalyzer.h.

Referenced by CsIIsSet(), and SetCsI().

◆ cWavebuffer

◆ cWpar

◆ EPS

double TPulseAnalyzer::EPS
private

Definition at line 195 of file TPulseAnalyzer.h.

Referenced by Clear(), and GetCsIt0().

◆ FILTER

int TPulseAnalyzer::FILTER
private

Definition at line 177 of file TPulseAnalyzer.h.

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

◆ fName

std::string TPulseAnalyzer::fName
private

Definition at line 174 of file TPulseAnalyzer.h.

◆ LARGECHISQ

double TPulseAnalyzer::LARGECHISQ
private

Definition at line 179 of file TPulseAnalyzer.h.

Referenced by Clear(), fit_newT0(), get_linear_T0(), get_parabolic_T0(), and get_smooth_T0().

◆ 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 234 of file TPulseAnalyzer.h.

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

◆ nameiter

int TPulseAnalyzer::nameiter = 0
static

Definition at line 153 of file TPulseAnalyzer.h.

Referenced by Getsilifit(), and GetWaveHist().

◆ NOISE_LEVEL_CSI

const int TPulseAnalyzer::NOISE_LEVEL_CSI = 100
staticprivate

Definition at line 237 of file TPulseAnalyzer.h.

Referenced by GetCsIExclusionZone().

◆ NSHAPE

const int TPulseAnalyzer::NSHAPE = 5
staticprivate

Definition at line 238 of file TPulseAnalyzer.h.

Referenced by GetCsITau().

◆ PIN_BASELINE_RANGE

const int TPulseAnalyzer::PIN_BASELINE_RANGE = 16
staticprivate

Definition at line 232 of file TPulseAnalyzer.h.

◆ set

bool TPulseAnalyzer::set
private

Definition at line 166 of file TPulseAnalyzer.h.

◆ shpar

ShapePar* TPulseAnalyzer::shpar
private

◆ spar

SinPar* TPulseAnalyzer::spar
private

Definition at line 171 of file TPulseAnalyzer.h.

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

◆ T0RANGE

int TPulseAnalyzer::T0RANGE
private