Belle II Software  release-08-01-10
ShaperDSP_t Class Reference

Class include function that calculate electronic response from energy deposit
More...

#include <shaperdsp.h>

Collaboration diagram for ShaperDSP_t:

Classes

struct  shaperdspshift_t
 struct for a shift of the shaper dsp More...
 
struct  sv123shift_t
 struct to encapsulate the electronic response from energy deposit
More...
 

Public Member Functions

 ShaperDSP_t ()
 class constructor

 
 ShaperDSP_t (const std::vector< double > &s)
 calculate derivative of the response function
 
 ShaperDSP_t (const std::vector< double > &s, double u)
 class constructor
 
void init (const std::vector< double > &s, double u=-1)
 Initialization of the parameters response function. More...
 
double operator() (double) const
 wrapper of the function
 
double operator() (double *, double *)
 TF1 ROOT interface.
 
void settimestride (double)
 set grid step for function calculation
 
void setseedoffset (double)
 set timeoffset
 
void settimeseed (double)
 set initial time
 
void nextseed ()
 substruct toffset to tzero
 
void fillvector (std::vector< double > &) const
 fill vector with response function values and its derivative
 
void fillvector (std::vector< dd_t > &) const
 fill vector with response function values and its derivative
 
void fillvector (double, std::vector< double > &) const
 fill vector with response function values and its derivative
 
void fillvector (double, std::vector< dd_t > &) const
 fill vector with response function values and its derivative
 
void fillarray (int, double *) const
 fill array for amplitude and time calculation
 
void fillarray (int, dd_t *) const
 fill array for amplitude and time calculation
 
void fillarray (double, int, double *) const
 fill array for amplitude and time calculation
 
void fillarray (double, int, dd_t *) const
 fill array for amplitude and time calculation
 

Private Member Functions

void Sv123_init (double t01, double tb1, double t02, double tb2, double td1, double ts1)
 calculate some values for Sv123 function
 
void init (const double *, double)
 calculate some values for Sv123 function
 
void init (const double *)
 calculate some values for Sv123 function
 
double Sv123 (const sv123shift_t &) const
 calculate Sv123 function
 
dd_t ddSv123 (const sv123shift_t &) const
 calculate derivative of the Sv123 function
 
double Sv123_filtered (const sv123shift_t &) const
 Numerical calculation of the time convolution. More...
 
dd_t ddSv123_filtered (const sv123shift_t &) const
 This is derivative of the confolution

 
double ShaperDSP (const shaperdspshift_t &) const
 calculate response function
 
dd_t ddShaperDSP (const shaperdspshift_t &) const
 calculate derivative of the response function
 

Private Attributes

double _cs0 = realNaN
 linear coefficient before sin of the first Bessel stage

 
double _cc0 = realNaN
 linear coefficient before cos of the first Bessel stage

 
double _cs1 = realNaN
 linear coefficient before sin of the second Bessel stage

 
double _cc1 = realNaN
 linear coefficient before cos of the second Bessel stage

 
double _ces = realNaN
 linear coefficient before first part of tail section

 
double _ced = realNaN
 linear coefficient before second part of tail section

 
double _dw0 = realNaN
 circular frequency of the first Bessel stage

 
double _dw1 = realNaN
 circular frequency of the second Bessel stage

 
double _dks0 = realNaN
 decrement of the first Bessel stage

 
double _dks1 = realNaN
 decrement of the second Bessel stage

 
double _ds = realNaN
 inverse scintillation decay time
 
double _dd = realNaN
 inverse time of the differential stage
 
double _dt0 = realNaN
 coefficient for first exponent factor

 
double _dt1 = realNaN
 coefficient for second exponent factor

 
double _toff = realNaN
 time offset

 
double _w0 = realNaN
 weight coefficient at sv123(t) = (1-a)

 
double _w1 = realNaN
 weight coefficient at sv123(t+_filterdt) +sv123(t-_filterdt) = a/2

 
double _ccc = realNaN
 exponent factor for tail part of the signal

 
sv123shift_t _tp
 _filterdt

 
sv123shift_t _tm
 
shaperdspshift_t _tstride
 time step of the grid for response function calculation

 
shaperdspshift_t _toffset
 time offset
 
shaperdspshift_t _tzero
 initial time
 

Static Private Attributes

static const double _defs [] = {0.5, 0.6483, 0.4017, 0.3741, 0.8494, 0.00144547, 4.7071, 0.8156, 0.5556, 0.2752}
 parameters of the response function that use as default

 
static constexpr double _filterdt = 0.2
 time shift that include in response function for numerical calculation time convolutions. More...
 

Detailed Description

Class include function that calculate electronic response from energy deposit

Definition at line 26 of file shaperdsp.h.

Member Function Documentation

◆ init()

void init ( const std::vector< double > &  s,
double  u = -1 
)

Initialization of the parameters response function.

Parameters
svector of shape parameters
u'unitscale' of the waveform template This sets the normalization for the template amplitude to be unity. If the waveform templates are modified this needs to be adjusted as well. If unitscale is set to negative value, it is calculated dynamically based on shape parameters.

Definition at line 342 of file shaperdsp.cc.

343 {
344  if (s.size() == 10)
345  init(s.data(), unitscale);
346  else
347  init(_defs, unitscale);
348 }
void init(const double *, double)
calculate some values for Sv123 function
Definition: shaperdsp.cc:308
static const double _defs[]
parameters of the response function that use as default
Definition: shaperdsp.h:72

◆ Sv123_filtered()

double Sv123_filtered ( const sv123shift_t t0) const
private

Numerical calculation of the time convolution.

Integration with histogram is used. Int g(s-t)f(t)dt=g(s)+a*(g(s+_filterdt)-g(s-_filterdt))/2

Definition at line 245 of file shaperdsp.cc.

Member Data Documentation

◆ _filterdt

constexpr double _filterdt = 0.2
staticconstexprprivate

time shift that include in response function for numerical calculation time convolutions.

Integration with histogram is used. Int g(s-t)f(t)dt=g(s)+a*(g(s+_filterdt)-g(s-_filterdt))/2

Definition at line 75 of file shaperdsp.h.

◆ _tm

sv123shift_t _tm
private
  • _filterdt

Definition at line 120 of file shaperdsp.h.


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