Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MbdSig Class Reference

#include <coresoftware/blob/master/offline/packages/mbd/MbdSig.h>

+ Collaboration diagram for MbdSig:

Public Member Functions

 MbdSig (const int chnum=0, const int nsamp=0)
 
virtual ~MbdSig ()
 
void SetY (const Float_t *y, const int invert=1)
 
void SetXY (const Float_t *x, const Float_t *y, const int invert=1)
 
TH1 * GetHist ()
 
TGraphErrors * GetGraph ()
 
Double_t GetAmpl ()
 
Double_t GetTime ()
 
Double_t GetIntegral ()
 
void FillPed0 (const Int_t minsamp, const Int_t maxsamp)
 
void FillPed0 (const Double_t minsamp, const Double_t maxsamp)
 
Double_t GetPed0 ()
 
Double_t GetPed0RMS ()
 
void SetPed0 (const Double_t mean, const Double_t rms=0.)
 
void SetEventPed0Range (const Int_t minsamp, const Int_t maxsamp)
 
void SetEventPed0Range (const Double_t minx, const Double_t maxx)
 
void SetEventPed0PreSamp (const Int_t presample, const Int_t nsamps=1)
 
void CalcEventPed0 (const Int_t minsamp, const Int_t maxsamp)
 
void CalcEventPed0 (const Double_t minx, const Double_t maxx)
 
void CalcEventPed0_PreSamp (const Int_t pre_samp, const Int_t nsamps=1)
 
Double_t LeadingEdge (const Double_t threshold)
 
Double_t dCFD (const Double_t fraction_threshold)
 
Double_t MBD (const Int_t max_samp)
 
Double_t GetSplineAmpl ()
 
Double_t Integral (const Double_t xmin, const Double_t xmax)
 
void LocMax (Double_t &x_at_max, Double_t &ymax, Double_t minxrange=0., Double_t maxxrange=0.)
 
void LocMin (Double_t &x_at_min, Double_t &ymin, Double_t minxrange=0., Double_t maxxrange=0.)
 
Int_t FitTemplate ()
 
void SetTemplateSize (const Int_t nptsx, const Int_t nptsy, const Double_t begt, const Double_t endt)
 
Int_t SetTemplate (const std::vector< float > &shape, const std::vector< float > &sherr)
 
void SetTimeOffset (const Double_t o)
 
Double_t TemplateFcn (const Double_t *x, const Double_t *par)
 
TF1 * GetTemplateFcn ()
 
void SetMinMaxFitTime (const Double_t mintime, const Double_t maxtime)
 
void PadUpdate ()
 
void Print ()
 
void Verbose (const int v)
 

Private Member Functions

void Init ()
 

Private Attributes

int ch
 
int nsamples
 
int _status {0}
 
Double_t f_ampl
 
Double_t f_time
 
Double_t f_time_offset
 
Double_t f_integral
 
TH1 * hRawPulse
 
TH1 * hSubPulse
 
TH1 * hpulse
 
TGraphErrors * gRawPulse
 
TGraphErrors * gSubPulse
 
TGraphErrors * gpulse
 
TH1 * hPed0
 
Double_t ped0
 
Double_t ped0rms
 
Int_t use_ped0
 
Int_t minped0samp
 whether to apply ped0
 
Int_t maxped0samp
 min sample for event-by-event ped, inclusive
 
Double_t minped0x
 max sample for event-by-event ped, inclusive
 
Double_t maxped0x
 min x for event-by-event ped, inclusive
 
Double_t ped_presamp {}
 max x for event-by-event ped, inclusive
 
Double_t ped_presamp_nsamps {}
 presamples for ped calculation
 
TH2 * h2Template
 num of presamples for ped calculation
 
TH2 * h2Residuals
 
TH1 * hAmpl
 
TH1 * hTime
 
Int_t template_npointsx
 
Int_t template_npointsy
 
Double_t template_begintime
 
Double_t template_endtime
 
std::vector< float > template_y
 
std::vector< float > template_yrms
 
TF1 * template_fcn
 
Double_t fit_min_time {}
 
Double_t fit_max_time {}
 min time for fit, in original units of waveform data
 
int verbose
 max time for fit, in original units of waveform data
 

Detailed Description

MbdSig: Single Channel digital signal class, includes processing

Definition at line 22 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 22 of file MbdSig.h

Constructor & Destructor Documentation

MbdSig::MbdSig ( const int  chnum = 0,
const int  nsamp = 0 
)
explicit

Definition at line 19 of file MbdSig.cc.

View newest version in sPHENIX GitHub at line 19 of file MbdSig.cc

virtual MbdSig::~MbdSig ( )
virtual

Member Function Documentation

void MbdSig::CalcEventPed0 ( const Int_t  minsamp,
const Int_t  maxsamp 
)
void MbdSig::CalcEventPed0 ( const Double_t  minx,
const Double_t  maxx 
)
void MbdSig::CalcEventPed0_PreSamp ( const Int_t  pre_samp,
const Int_t  nsamps = 1 
)
Double_t MbdSig::dCFD ( const Double_t  fraction_threshold)

digital CFD, threshold is in fraction of amplitude

void MbdSig::FillPed0 ( const Int_t  minsamp,
const Int_t  maxsamp 
)

Fill hists from data between minsamp and maxsamp bins sample number starts from 0 Ped0 is the running pedestal and rms

void MbdSig::FillPed0 ( const Double_t  minsamp,
const Double_t  maxsamp 
)
Int_t MbdSig::FitTemplate ( )

Use template fit to get ampl and time

Double_t MbdSig::GetAmpl ( )
inline

Definition at line 36 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 36 of file MbdSig.h

References f_ampl.

TGraphErrors* MbdSig::GetGraph ( )
inline

Definition at line 35 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 35 of file MbdSig.h

References gpulse.

TH1* MbdSig::GetHist ( )
inline

Definition at line 34 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 34 of file MbdSig.h

References hpulse.

Double_t MbdSig::GetIntegral ( )
inline

Definition at line 38 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 38 of file MbdSig.h

References f_integral.

Double_t MbdSig::GetPed0 ( )
inline

Definition at line 48 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 48 of file MbdSig.h

References ped0.

Double_t MbdSig::GetPed0RMS ( )
inline

Definition at line 49 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 49 of file MbdSig.h

References ped0rms.

Double_t MbdSig::GetSplineAmpl ( )

Get pulse amplitude with spline fit

TF1* MbdSig::GetTemplateFcn ( )
inline

Definition at line 107 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 107 of file MbdSig.h

References template_fcn.

Double_t MbdSig::GetTime ( )
inline

Definition at line 37 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 37 of file MbdSig.h

References f_time.

void MbdSig::Init ( )
private
Double_t MbdSig::Integral ( const Double_t  xmin,
const Double_t  xmax 
)

Simple integral to get total charge, etc

Double_t MbdSig::LeadingEdge ( const Double_t  threshold)

Leading Edge Discriminator signal

void MbdSig::LocMax ( Double_t &  x_at_max,
Double_t &  ymax,
Double_t  minxrange = 0.,
Double_t  maxxrange = 0. 
)

The maximum value from all samples

void MbdSig::LocMin ( Double_t &  x_at_min,
Double_t &  ymin,
Double_t  minxrange = 0.,
Double_t  maxxrange = 0. 
)

The minimum value from all samples (including negatives)

Double_t MbdSig::MBD ( const Int_t  max_samp)

MBD method to get time, max_samp is the sample to use

void MbdSig::PadUpdate ( )
void MbdSig::Print ( )
void MbdSig::SetEventPed0PreSamp ( const Int_t  presample,
const Int_t  nsamps = 1 
)
inline

Definition at line 65 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 65 of file MbdSig.h

References ped_presamp, and ped_presamp_nsamps.

void MbdSig::SetEventPed0Range ( const Int_t  minsamp,
const Int_t  maxsamp 
)
inline

Use the event by event pedestal,

Definition at line 55 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 55 of file MbdSig.h

References maxped0samp, and minped0samp.

void MbdSig::SetEventPed0Range ( const Double_t  minx,
const Double_t  maxx 
)
inline

Definition at line 60 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 60 of file MbdSig.h

References maxped0x, and minped0x.

void MbdSig::SetMinMaxFitTime ( const Double_t  mintime,
const Double_t  maxtime 
)
void MbdSig::SetPed0 ( const Double_t  mean,
const Double_t  rms = 0. 
)

Set the global pedestal. Once set, it is applied to the data for all events.

Int_t MbdSig::SetTemplate ( const std::vector< float > &  shape,
const std::vector< float > &  sherr 
)
void MbdSig::SetTemplateSize ( const Int_t  nptsx,
const Int_t  nptsy,
const Double_t  begt,
const Double_t  endt 
)

Make template waveforms for later fits

void MbdSig::SetTimeOffset ( const Double_t  o)
inline

Definition at line 105 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 105 of file MbdSig.h

References f_time_offset.

void MbdSig::SetXY ( const Float_t *  x,
const Float_t *  y,
const int  invert = 1 
)
void MbdSig::SetY ( const Float_t *  y,
const int  invert = 1 
)
Double_t MbdSig::TemplateFcn ( const Double_t *  x,
const Double_t *  par 
)
void MbdSig::Verbose ( const int  v)
inline

Definition at line 112 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 112 of file MbdSig.h

References testSigmaEff::v, and verbose.

Member Data Documentation

int MbdSig::_status {0}
private

Definition at line 119 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 119 of file MbdSig.h

int MbdSig::ch
private

Definition at line 117 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 117 of file MbdSig.h

Double_t MbdSig::f_ampl
private

fit values

Definition at line 123 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 123 of file MbdSig.h

Referenced by GetAmpl().

Double_t MbdSig::f_integral
private

time offset used in fit

Definition at line 128 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 128 of file MbdSig.h

Referenced by GetIntegral().

Double_t MbdSig::f_time
private

best guess (from fit of spline or template, or max adc)

Definition at line 124 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 124 of file MbdSig.h

Referenced by GetTime().

Double_t MbdSig::f_time_offset
private

best guess (from fit of spline or template, or max adc)

Definition at line 126 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 126 of file MbdSig.h

Referenced by SetTimeOffset().

Double_t MbdSig::fit_max_time {}
private

min time for fit, in original units of waveform data

Definition at line 171 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 171 of file MbdSig.h

Double_t MbdSig::fit_min_time {}
private

Definition at line 170 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 170 of file MbdSig.h

TGraphErrors* MbdSig::gpulse
private

Definition at line 135 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 135 of file MbdSig.h

Referenced by GetGraph().

TGraphErrors* MbdSig::gRawPulse
private

Definition at line 133 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 133 of file MbdSig.h

TGraphErrors* MbdSig::gSubPulse
private

Definition at line 134 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 134 of file MbdSig.h

TH2* MbdSig::h2Residuals
private

Definition at line 155 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 155 of file MbdSig.h

TH2* MbdSig::h2Template
private

num of presamples for ped calculation

for time calibration For pulse template extraction

Definition at line 154 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 154 of file MbdSig.h

TH1* MbdSig::hAmpl
private

Definition at line 157 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 157 of file MbdSig.h

TH1* MbdSig::hPed0
private

for CalcPed0

Definition at line 139 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 139 of file MbdSig.h

TH1* MbdSig::hpulse
private

Definition at line 132 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 132 of file MbdSig.h

Referenced by GetHist().

TH1* MbdSig::hRawPulse
private

integral

Definition at line 130 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 130 of file MbdSig.h

TH1* MbdSig::hSubPulse
private

Definition at line 131 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 131 of file MbdSig.h

TH1* MbdSig::hTime
private

Definition at line 158 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 158 of file MbdSig.h

Int_t MbdSig::maxped0samp
private

min sample for event-by-event ped, inclusive

Definition at line 144 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 144 of file MbdSig.h

Referenced by SetEventPed0Range().

Double_t MbdSig::maxped0x
private

min x for event-by-event ped, inclusive

Definition at line 146 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 146 of file MbdSig.h

Referenced by SetEventPed0Range().

Int_t MbdSig::minped0samp
private

whether to apply ped0

Definition at line 143 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 143 of file MbdSig.h

Referenced by SetEventPed0Range().

Double_t MbdSig::minped0x
private

max sample for event-by-event ped, inclusive

Definition at line 145 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 145 of file MbdSig.h

Referenced by SetEventPed0Range().

int MbdSig::nsamples
private

Definition at line 118 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 118 of file MbdSig.h

Double_t MbdSig::ped0
private

Definition at line 140 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 140 of file MbdSig.h

Referenced by GetPed0().

Double_t MbdSig::ped0rms
private

Definition at line 141 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 141 of file MbdSig.h

Referenced by GetPed0RMS().

Double_t MbdSig::ped_presamp {}
private

max x for event-by-event ped, inclusive

Definition at line 147 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 147 of file MbdSig.h

Referenced by SetEventPed0PreSamp().

Double_t MbdSig::ped_presamp_nsamps {}
private

presamples for ped calculation

Definition at line 148 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 148 of file MbdSig.h

Referenced by SetEventPed0PreSamp().

Double_t MbdSig::template_begintime
private

Definition at line 161 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 161 of file MbdSig.h

Double_t MbdSig::template_endtime
private

Definition at line 162 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 162 of file MbdSig.h

TF1* MbdSig::template_fcn
private

Definition at line 169 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 169 of file MbdSig.h

Referenced by GetTemplateFcn().

Int_t MbdSig::template_npointsx
private

Definition at line 159 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 159 of file MbdSig.h

Int_t MbdSig::template_npointsy
private

Definition at line 160 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 160 of file MbdSig.h

std::vector<float> MbdSig::template_y
private

Definition at line 167 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 167 of file MbdSig.h

std::vector<float> MbdSig::template_yrms
private

Definition at line 168 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 168 of file MbdSig.h

Int_t MbdSig::use_ped0
private

Definition at line 142 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 142 of file MbdSig.h

int MbdSig::verbose
private

max time for fit, in original units of waveform data

Definition at line 173 of file MbdSig.h.

View newest version in sPHENIX GitHub at line 173 of file MbdSig.h

Referenced by Verbose().


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