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

#include <OnlMon/blob/main/subsystems/bbc/OnlBbcSig.h>

+ Collaboration diagram for OnlBbcSig:

Public Member Functions

 OnlBbcSig (const int chnum=0, const int nsamp=0)
 
virtual ~OnlBbcSig ()
 
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 CalcEventPed0 (const Int_t minsamp, const Int_t maxsamp)
 
void CalcEventPed0 (const Double_t minx, const Double_t maxx)
 
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 FillSplineTemplate ()
 
void FillFcnTemplate ()
 
void MakeAndWriteTemplate (std::ostream &out, std::ostream &oerr)
 
Int_t ReadTemplate (std::ifstream &shapefile, std::ifstream &sherrfile)
 
void SetTemplateMinMaxGoodADC (const Double_t min, const Double_t max)
 
void SetTemplateMinMaxFitRange (const Double_t min, const Double_t max)
 
void SetTimeOffset (const Double_t o)
 
Double_t TemplateFcn (const Double_t *x, const Double_t *par)
 
TF1 * GetTemplateFcn ()
 
void PadUpdate ()
 
void Print ()
 
void Verbose (const int v)
 

Private Member Functions

void Init ()
 

Private Attributes

int ch
 
int nsamples
 
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 time_calib
 max x for event-by-event ped, inclusive
 
TH2 * h2Template
 
TH2 * h2Residuals
 
TH1 * hAmpl
 
TH1 * hTime
 
Int_t template_npointsx
 
Int_t template_npointsy
 
Double_t template_begintime
 
Double_t template_endtime
 
Double_t template_min_good_amplitude
 
Double_t template_max_good_amplitude
 for template, in original units of waveform data
 
Double_t template_min_xrange
 for template, in original units of waveform data
 
Double_t template_max_xrange
 for template, in original units of waveform data
 
std::vector< Double_t > template_y
 for template, in original units of waveform data
 
std::vector< Double_t > template_yrms
 
TF1 * template_fcn
 
int verbose
 

Detailed Description

OnlBbcSig: Single Channel digital signal class, includes processing

Definition at line 22 of file OnlBbcSig.h.

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

Constructor & Destructor Documentation

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

Definition at line 22 of file OnlBbcSig.cc.

View newest version in sPHENIX GitHub at line 22 of file OnlBbcSig.cc

virtual OnlBbcSig::~OnlBbcSig ( )
virtual

Member Function Documentation

void OnlBbcSig::CalcEventPed0 ( const Int_t  minsamp,
const Int_t  maxsamp 
)
void OnlBbcSig::CalcEventPed0 ( const Double_t  minx,
const Double_t  maxx 
)
Double_t OnlBbcSig::dCFD ( const Double_t  fraction_threshold)

digital CFD, threshold is in fraction of amplitude

void OnlBbcSig::FillFcnTemplate ( )
void OnlBbcSig::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 OnlBbcSig::FillPed0 ( const Double_t  minsamp,
const Double_t  maxsamp 
)
int OnlBbcSig::FillSplineTemplate ( )
Int_t OnlBbcSig::FitTemplate ( )

Use template fit to get ampl and time

Double_t OnlBbcSig::GetAmpl ( )
inline

Definition at line 36 of file OnlBbcSig.h.

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

References f_ampl.

TGraphErrors* OnlBbcSig::GetGraph ( )
inline

Definition at line 35 of file OnlBbcSig.h.

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

References gpulse.

Referenced by BbcMon::process_event().

+ Here is the caller graph for this function:

TH1* OnlBbcSig::GetHist ( )
inline

Definition at line 34 of file OnlBbcSig.h.

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

References hpulse.

Double_t OnlBbcSig::GetIntegral ( )
inline

Definition at line 38 of file OnlBbcSig.h.

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

References f_integral.

Double_t OnlBbcSig::GetPed0 ( )
inline

Definition at line 48 of file OnlBbcSig.h.

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

References ped0.

Double_t OnlBbcSig::GetPed0RMS ( )
inline

Definition at line 49 of file OnlBbcSig.h.

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

References ped0rms.

Double_t OnlBbcSig::GetSplineAmpl ( )

Get pulse amplitude with spline fit

TF1* OnlBbcSig::GetTemplateFcn ( )
inline

Definition at line 104 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 104 of file OnlBbcSig.h

References template_fcn.

Double_t OnlBbcSig::GetTime ( )
inline

Definition at line 37 of file OnlBbcSig.h.

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

References f_time.

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

Simple integral to get total charge, etc

Double_t OnlBbcSig::LeadingEdge ( const Double_t  threshold)

Leading Edge Discriminator signal

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

The maximum value from all samples

void OnlBbcSig::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)

void OnlBbcSig::MakeAndWriteTemplate ( std::ostream &  out,
std::ostream &  oerr 
)
Double_t OnlBbcSig::MBD ( const Int_t  max_samp)

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

void OnlBbcSig::PadUpdate ( )
void OnlBbcSig::Print ( )
Int_t OnlBbcSig::ReadTemplate ( std::ifstream &  shapefile,
std::ifstream &  sherrfile 
)
void OnlBbcSig::SetEventPed0Range ( const Int_t  minsamp,
const Int_t  maxsamp 
)
inline

Use the event by event pedestal,

Definition at line 55 of file OnlBbcSig.h.

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

References maxped0samp, and minped0samp.

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

Definition at line 59 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 59 of file OnlBbcSig.h

References maxped0x, and minped0x.

void OnlBbcSig::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.

void OnlBbcSig::SetTemplateMinMaxFitRange ( const Double_t  min,
const Double_t  max 
)
void OnlBbcSig::SetTemplateMinMaxGoodADC ( const Double_t  min,
const Double_t  max 
)
void OnlBbcSig::SetTemplateSize ( const Int_t  nptsx,
const Int_t  nptsy,
const Double_t  begt,
const Double_t  endt 
)

Make template waveforms for later fits

void OnlBbcSig::SetTimeOffset ( const Double_t  o)
inline

Definition at line 102 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 102 of file OnlBbcSig.h

References f_time_offset.

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

Definition at line 108 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 108 of file OnlBbcSig.h

References testSigmaEff::v, and verbose.

Member Data Documentation

int OnlBbcSig::ch
private

Definition at line 113 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 113 of file OnlBbcSig.h

Double_t OnlBbcSig::f_ampl
private

fit values

Definition at line 118 of file OnlBbcSig.h.

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

Referenced by GetAmpl().

Double_t OnlBbcSig::f_integral
private

time offset used in fit

Definition at line 123 of file OnlBbcSig.h.

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

Referenced by GetIntegral().

Double_t OnlBbcSig::f_time
private

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

Definition at line 119 of file OnlBbcSig.h.

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

Referenced by GetTime().

Double_t OnlBbcSig::f_time_offset
private

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

Definition at line 121 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 121 of file OnlBbcSig.h

Referenced by SetTimeOffset().

TGraphErrors* OnlBbcSig::gpulse
private

Definition at line 130 of file OnlBbcSig.h.

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

Referenced by GetGraph().

TGraphErrors* OnlBbcSig::gRawPulse
private

Definition at line 128 of file OnlBbcSig.h.

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

TGraphErrors* OnlBbcSig::gSubPulse
private

Definition at line 129 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 129 of file OnlBbcSig.h

TH2* OnlBbcSig::h2Residuals
private

Definition at line 148 of file OnlBbcSig.h.

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

TH2* OnlBbcSig::h2Template
private

For pulse template extraction

Definition at line 147 of file OnlBbcSig.h.

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

TH1* OnlBbcSig::hAmpl
private

Definition at line 150 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 150 of file OnlBbcSig.h

TH1* OnlBbcSig::hPed0
private

for CalcPed0

Definition at line 134 of file OnlBbcSig.h.

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

TH1* OnlBbcSig::hpulse
private

Definition at line 127 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 127 of file OnlBbcSig.h

Referenced by GetHist().

TH1* OnlBbcSig::hRawPulse
private

integral

Definition at line 125 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 125 of file OnlBbcSig.h

TH1* OnlBbcSig::hSubPulse
private

Definition at line 126 of file OnlBbcSig.h.

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

TH1* OnlBbcSig::hTime
private

Definition at line 151 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 151 of file OnlBbcSig.h

Int_t OnlBbcSig::maxped0samp
private

min sample for event-by-event ped, inclusive

Definition at line 139 of file OnlBbcSig.h.

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

Referenced by SetEventPed0Range().

Double_t OnlBbcSig::maxped0x
private

min x for event-by-event ped, inclusive

Definition at line 141 of file OnlBbcSig.h.

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

Referenced by SetEventPed0Range().

Int_t OnlBbcSig::minped0samp
private

whether to apply ped0

Definition at line 138 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 138 of file OnlBbcSig.h

Referenced by SetEventPed0Range().

Double_t OnlBbcSig::minped0x
private

max sample for event-by-event ped, inclusive

Definition at line 140 of file OnlBbcSig.h.

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

Referenced by SetEventPed0Range().

int OnlBbcSig::nsamples
private

Definition at line 114 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 114 of file OnlBbcSig.h

Double_t OnlBbcSig::ped0
private

Definition at line 135 of file OnlBbcSig.h.

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

Referenced by GetPed0().

Double_t OnlBbcSig::ped0rms
private

Definition at line 136 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 136 of file OnlBbcSig.h

Referenced by GetPed0RMS().

Double_t OnlBbcSig::template_begintime
private

Definition at line 154 of file OnlBbcSig.h.

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

Double_t OnlBbcSig::template_endtime
private

Definition at line 155 of file OnlBbcSig.h.

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

TF1* OnlBbcSig::template_fcn
private

Definition at line 162 of file OnlBbcSig.h.

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

Referenced by GetTemplateFcn().

Double_t OnlBbcSig::template_max_good_amplitude
private

for template, in original units of waveform data

Definition at line 157 of file OnlBbcSig.h.

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

Double_t OnlBbcSig::template_max_xrange
private

for template, in original units of waveform data

Definition at line 159 of file OnlBbcSig.h.

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

Double_t OnlBbcSig::template_min_good_amplitude
private

Definition at line 156 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 156 of file OnlBbcSig.h

Double_t OnlBbcSig::template_min_xrange
private

for template, in original units of waveform data

Definition at line 158 of file OnlBbcSig.h.

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

Int_t OnlBbcSig::template_npointsx
private

Definition at line 152 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 152 of file OnlBbcSig.h

Int_t OnlBbcSig::template_npointsy
private

Definition at line 153 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 153 of file OnlBbcSig.h

std::vector<Double_t> OnlBbcSig::template_y
private

for template, in original units of waveform data

Definition at line 160 of file OnlBbcSig.h.

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

std::vector<Double_t> OnlBbcSig::template_yrms
private

Definition at line 161 of file OnlBbcSig.h.

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

Double_t OnlBbcSig::time_calib
private

max x for event-by-event ped, inclusive

for time calibration

Definition at line 144 of file OnlBbcSig.h.

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

Int_t OnlBbcSig::use_ped0
private

Definition at line 137 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 137 of file OnlBbcSig.h

int OnlBbcSig::verbose
private

Definition at line 164 of file OnlBbcSig.h.

View newest version in sPHENIX GitHub at line 164 of file OnlBbcSig.h

Referenced by Verbose().


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