Belle II Software  release-05-01-25
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=27.7221)
 initialization of the parameters response function
 
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) __attribute__((noinline))
 calculate some values for Sv123 function
 
void init (const double *) __attribute__((noinline))
 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 __attribute__((noinline))
 Numerical calculation of the time convolution. More...
 
dd_t ddSv123_filtered (const sv123shift_t &) const __attribute__((noinline))
 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
 linear coefficient before sin of the first Bessel stage

 
double _cc0
 linear coefficient before cos of the first Bessel stage

 
double _cs1
 linear coefficient before sin of the second Bessel stage

 
double _cc1
 linear coefficient before cos of the second Bessel stage

 
double _ces
 linear coefficient before first part of tail section

 
double _ced
 linear coefficient before second part of tail section

 
double _dw0
 circular frequency of the first Bessel stage

 
double _dw1
 circular frequency of the second Bessel stage

 
double _dks0
 decrement of the first Bessel stage

 
double _dks1
 decrement of the second Bessel stage

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

 
double _dt1
 coefficient for second exponent factor

 
double _toff
 time offset

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

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

 
double _ccc
 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 36 of file shaperdsp.h.

Member Function Documentation

◆ 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 238 of file shaperdsp.cc.

239 {
240  if (t0.validshift(_tp)) {
241  double ft0p = Sv123(t0 + _tp), ft0 = 0, ft0m = 0;
242  if (t0.t > 0) {
243  ft0 = Sv123(t0);
244  if (t0.validshift(_tm))
245  ft0m = Sv123(t0 + _tm);
246  }
247  return _w0 * ft0 + _w1 * (ft0p + ft0m);
248  }
249  return 0;
250 }

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 85 of file shaperdsp.h.

◆ _tm

sv123shift_t _tm
private
  • _filterdt

Definition at line 130 of file shaperdsp.h.


The documentation for this class was generated from the following files:
Belle2::ECL::ShaperDSP_t::_tm
sv123shift_t _tm
Definition: shaperdsp.h:130
Belle2::ECL::ShaperDSP_t::_tp
sv123shift_t _tp
_filterdt
Definition: shaperdsp.h:127
Belle2::ECL::ShaperDSP_t::_w0
double _w0
weight coefficient at sv123(t) = (1-a)
Definition: shaperdsp.h:119
Belle2::ECL::ShaperDSP_t::_w1
double _w1
weight coefficient at sv123(t+_filterdt) +sv123(t-_filterdt) = a/2
Definition: shaperdsp.h:121
Belle2::ECL::ShaperDSP_t::Sv123
double Sv123(const sv123shift_t &) const
calculate Sv123 function
Definition: shaperdsp.cc:211