GET library
GETSignalFunctions.hh File Reference
#include "GETChannel.hh"

Go to the source code of this file.

Macros

#define GET_FWHM_TO_SIGMA   0.424660900144009534340483469350147061050L
 Conversion factor from FWHM to standard deviation.
 
#define GET_SIGMA_TO_FWHM   2.354820045030949327014013761072419583797L
 Conversion factor from standard deviation to FWHM.
 
#define GET_SQRT_2PI   2.506628274631000241612
 Value of sqrt(2*pi) constant.
 

Functions

Base function
double GETGaus (const double x[], const double p[])
 
double GETGaus (double t, double srf, double ctr, double sig)
 
double GETSinC (const double x[], const double p[])
 
double GETSinC (double t, double srf, double ctr, double scw)
 
double GETSquare (const double x[], const double p[])
 
double GETSquare (double t, double srf, double ctr, double wid)
 
double GETGausSinC (const double x[], const double p[])
 
double GETGausSinC (double t, double srf, double ctr, double sig, double w)
 
Functions for fitting the signals
double GETSquareGaus (const double x[], const double p[])
 
double GETSquareGaus (double t, double srf, double ctr, double wid, double sig, double bg)
 
double GETSquareSinC (const double x[], const double p[])
 
double GETSquareSinC (double t, double srf, double ctr, double wid, double scw, double bg)
 
double GETSquareGSC (const double x[], const double p[])
 
double GETSquareGSC (double t, double srf, double ctr, double wid, double sig, double scw, double bg)
 
double GETConvolutionSinC (double t, double scw, double(*fct)(const double[], const double[]), const double pf[])
 
double GETConvolutionGSC (double t, double sig, double scw, double(*fct)(const double[], const double[]), const double pf[])
 
double GETSquareCurrent (const double x[], const double p[])
 
double GETSquareCurrentGaus (const double x[], const double p[])
 
double GETSquareCurrentGSC (const double x[], const double p[])
 
double GETSquareCurrent2 (const double x[], const double p[])
 
double GETSquareCurrent2Gaus (const double x[], const double p[])
 
double GETSquareCurrent2GSC (const double x[], const double p[])
 

Variables

u_int getGSCConvPoints
 
double getGSCConvWidth
 
u_int getIntegPoints
 
double getIntegStep
 

Detailed Description

Include file for signal analysis functions.

Function Documentation

double GETConvolutionGSC ( double  t,
double  sig,
double  scw,
double(*)(const double[], const double[])  fct,
const double  pf[] 
)

Function computing the convolution of a user function with the GETGausSinC function.

Parameters
tpoint to compute
sigsigma of the convolution gaus function
scwsine cardinal dilatation factor
fctuser function pointer
pfparameters of the user function

References GETGausSinC(), getGSCConvPoints, and getGSCConvWidth.

Referenced by GETSquareCurrent2GSC(), and GETSquareCurrentGSC().

double GETConvolutionSinC ( double  t,
double  scw,
double(*)(const double[], const double[])  fct,
const double  pf[] 
)

Function computing the convolution of a user function with the GETGausSinC function.

Parameters
tpoint to compute
scwsine cardinal dilatation factor
fctuser function pointer
pfparameters of the user function

References getGSCConvPoints, getGSCConvWidth, and GETSinC().

double GETGaus ( const double  x[],
const double  p[] 
)
inline

Gaus function with integral parameter.

  • p[0] integral
  • p[1] center
  • p[2] sigma
    Parameters
    xarray of coordinates (only x[0] is used)
    parray of parameters

References GETGaus().

double GETGaus ( double  t,
double  srf,
double  ctr,
double  sig 
)

Gaus function with integral parameter.

Parameters
tpoint to compute
srfintegral (1 for normalized function)
ctrcenter
sigsigma

References GET_SQRT_2PI.

Referenced by GETGaus().

double GETGausSinC ( const double  x[],
const double  p[] 
)
inline

Product of a Gaus function with sinc function: G(x) * sin(x/w) / (x/w).

  • p[0] amplitude
  • p[1] center
  • p[2] sigma
  • p[3] sin cardinal dilatation factor
    Parameters
    xarray of coordinates (only x[0] is used)
    parray of parameters

References GETGausSinC().

double GETGausSinC ( double  t,
double  srf,
double  ctr,
double  sig,
double  scw 
)

Product of a Gaus function with sinc function: G(x) * sin(x/w) / (x/w).

Parameters
tpoint to compute
srfintegral (1 for normalized function)
ctrcenter
sigsigma
scwsine cardinal dilatation factor

Referenced by GETConvolutionGSC(), GETGausSinC(), and GETSquareGSC().

double GETSinC ( const double  x[],
const double  p[] 
)
inline

SinC function with integral parameter.

  • p[0] integral
  • p[1] center
  • p[2] scale factor
    Parameters
    xarray of coordinates (only x[0] is used)
    parray of parameters

References GETSinC().

double GETSinC ( double  t,
double  srf,
double  ctr,
double  scw 
)

Sinc function with integral parameter:

\[ \frac{srf}{scw} \cdot \frac{\sin\left(\pi\cdot (t-ctr) / scw\right)}{\pi\cdot (t-ctr) / scw} \]

Parameters
tpoint to compute
srfintegral (1 for normalized function)
ctrcenter
scwscale factor

Referenced by GETConvolutionSinC(), GETSinC(), and GETSquareSinC().

double GETSquare ( const double  x[],
const double  p[] 
)
inline

Function for a square current distribution.

  • p[0] total charge: time width multiplied by the current value
  • p[1] distribution center time
  • p[2] width of the square current
    Parameters
    xcoordinates array (only 1 used)
    pparameters array

References GETSquare().

double GETSquare ( double  t,
double  srf,
double  ctr,
double  wid 
)

Function for a square current distribution.

Parameters
tpoint to compute
srfintegral (1 for normalized function)
ctrcenter
widwidth of the square current

Referenced by GETSquare().

double GETSquareCurrent ( const double  x[],
const double  p[] 
)

Function for a square current distribution.

  • p[0] total charge: time width multiplied by the current value
  • p[1] start time
  • p[2] width of the square current
    Parameters
    xcoordinates array (only 1 used)
    pparameters array

Referenced by GETSquareCurrent2GSC(), and GETSquareCurrentGSC().

double GETSquareCurrent2 ( const double  x[],
const double  p[] 
)

Function for a square current distribution.

  • p[0] total charge: time width multiplied by the current value
  • p[1] distribution center time
  • p[2] width of the square current
    Parameters
    xcoordinates array (only 1 used)
    pparameters array
double GETSquareCurrent2Gaus ( const double  x[],
const double  p[] 
)

Function for a square current distribution, convoluted with a gaus function (smoothing).

  • p[0] total charge: time width multiplied by the current value
  • p[1] distribution center time
  • p[2] width of the square current
  • p[3] sigma of the convolution gaus function
  • p[4] offset (background)
    Parameters
    xcoordinates array (only 1 used)
    pparameters array
double GETSquareCurrent2GSC ( const double  x[],
const double  p[] 
)

Function for a square current distribution, convoluted with a gaus function (smoothing).

  • p[0] total charge: time width multiplied by the current value
  • p[1] distribution center time
  • p[2] width of the square current
  • p[3] sigma of the convolution gaus function
  • p[4] sinc coordinate factor
  • p[5] offset (background)
    Parameters
    xcoordinates array (only 1 used)
    pparameters array

References GETConvolutionGSC(), and GETSquareCurrent().

double GETSquareCurrentGaus ( const double  x[],
const double  p[] 
)

Function for a square current distribution, convoluted with a gaus function (smoothing).

  • p[0] total charge: time width multiplied by the current value
  • p[1] start time
  • p[2] width of the square current
  • p[3] sigma of the convolution gaus function
  • p[4] offset (background)
    Parameters
    xcoordinates array (only 1 used)
    pparameters array
double GETSquareCurrentGSC ( const double  x[],
const double  p[] 
)

Function for a square current distribution, convoluted with a gaus function (smoothing).

  • p[0] total charge: time width multiplied by the current value
  • p[1] start time
  • p[2] width of the square current
  • p[3] sigma of the convolution gaus function
  • p[4] sinc coordinate factor
  • p[5] offset (background)
    Parameters
    xcoordinates array (only 1 used)
    pparameters array

References GETConvolutionGSC(), and GETSquareCurrent().

double GETSquareGaus ( const double  x[],
const double  p[] 
)
inline

Function for a square current distribution, convoluted with a gaus function (smoothing).

  • p[0] total charge: time width multiplied by the current value
  • p[1] distribution center time
  • p[2] width of the square current
  • p[3] sigma of the convolution gaus function
  • p[4] offset (background)
    Parameters
    xarray of coordinates (only x[0] is used)
    parray of parameters

References GETSquareGaus().

double GETSquareGaus ( double  t,
double  srf,
double  ctr,
double  wid,
double  sig,
double  bg 
)

Function for a square current distribution, convoluted with a gaus function (smoothing).

Parameters
tpoint to compute
srftotal charge: time width multiplied by the current value
ctrdistribution center time
widwidth of the square current
sigsigma of the convolution gaus function
bgoffset (background)

Referenced by GETSquareGaus(), and GETSystemAnalyser::GETSystemAnalyser().

double GETSquareGSC ( const double  x[],
const double  p[] 
)
inline

Function for a square current distribution, convoluted with a Gaus x SinC function.

  • p[0] total charge: time width multiplied by the current value
  • p[1] distribution center time
  • p[2] width of the square current
  • p[3] sigma of the convolution gaus function
  • p[4] sinc coordinate factor
  • p[5] offset (background)
    Parameters
    xcoordinates array (only 1 used)
    pparameters array

References GETSquareGSC().

double GETSquareGSC ( double  t,
double  srf,
double  ctr,
double  wid,
double  sig,
double  scw,
double  bg 
)

Function for a square current distribution, convoluted with a Gaus x SinC function.

Parameters
tpoint to compute
srftotal charge: time width multiplied by the current value
ctrdistribution center time
widwidth of the square current
sigsigma of the convolution gaus function
scwsinc coordinate factor
bgoffset (background)

References GETGausSinC(), getIntegPoints, and getIntegStep.

Referenced by GETSquareGSC(), and GETSystemAnalyser::GETSystemAnalyser().

double GETSquareSinC ( const double  x[],
const double  p[] 
)
inline

Function for a square current distribution, convoluted with a SinC function.

  • p[0] total charge: time width multiplied by the current value
  • p[1] distribution center time
  • p[2] width of the square current
  • p[3] sinc coordinate factor
  • p[4] offset (background)
    Parameters
    xcoordinates array (only 1 used)
    pparameters array

References GETSquareSinC().

double GETSquareSinC ( double  t,
double  srf,
double  ctr,
double  wid,
double  scw,
double  bg 
)

Function for a square current distribution, convoluted with a SinC function.

Parameters
tpoint to compute
srftotal charge: time width multiplied by the current value
ctrdistribution center time
widwidth of the square current
scwsinc coordinate factor
bgoffset (background)

References getIntegPoints, getIntegStep, and GETSinC().

Referenced by GETSquareSinC().

Variable Documentation

u_int getGSCConvPoints

number of points for convolution with GETGausSinC function.

Referenced by GETConvolutionGSC(), and GETConvolutionSinC().

double getGSCConvWidth

integration size for convolution with GETGausSinC function (in units of sigma).

Referenced by GETConvolutionGSC(), and GETConvolutionSinC().

u_int getIntegPoints

global variable for integration step number.

Referenced by GETSystemAnalyser::ComputeAmplitudeData(), GETSquareGSC(), and GETSquareSinC().

double getIntegStep

global variable for integration step size (if step number is 0).

Referenced by GETSystemAnalyser::ComputeAmplitudeData(), GETSquareGSC(), and GETSquareSinC().