GET library
GETSignalFunctions.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETSignalFunctions.hh
3  *
4  * Include file for signal analysis functions.
5  */
6 //======================================================================
7 
8 #include "GETChannel.hh"
9 
10 //----------------------------------------------------------
11 /** @name Functions for fitting the signals */
12 //@{
13 
14 // global variable for integration step.
15 extern u_int getIntegPoints;
16 
17 // convolution of a square distribution with a Gauss function
18 extern double GETSquareCurrent ( const double x[], const double p[] );
19 extern double GETSquareCurrentGaus ( const double x[], const double p[] );
20 extern double GETSquareCurrentGSC ( const double x[], const double p[] );
21 
22 // same as the previous one, but the time information is the dist. center
23 extern double GETSquareCurrent2 ( const double x[], const double p[] );
24 extern double GETSquareCurrent2Gaus ( const double x[], const double p[] );
25 extern double GETSquareCurrent2GSC ( const double x[], const double p[] );
26 
27 //@}
28 
29 
30 //----------------------------------------------------------
31 /** @name Gauss function multiplied by sin(x)/x */
32 //@{
33 
34 // -- normalisation
35 extern TGraph * getGSCNorm;
36 extern void GETSetNormalizationGSC ( );
37 
38 // -- function
39 extern double GETGausSinC ( const double x[], const double p[] ); // inline
40 extern double GETGausSinC ( double t, double amp, double ctr, double sig, double w );
41 
42 // -- convolution with the GSC function
43 extern u_int getGSCConvPoints;
44 extern double getGSCConvMax;
45 
46 extern double GETConvolutionGSC ( const double x[], const double pg[],
47  double(*fct)(const double[], const double[]),
48  const double pf[] );
49 //@}
50 
51 //======================================================================
52 // Inline functions
53 
54 /* Product of a Gaus function with sinc function: G(x) * sin(x/w) / (x/w).
55  * - p[0] amplitude
56  * - p[1] center
57  * - p[2] sigma
58  * - p[3] sin cardinal dilatation factor
59  */
60 inline double GETGausSinC ( const double x[], const double p[] )
61  { return ( GETGausSinC (x[0], p[0], p[1], p[2], p[3]) ); }
double GETSquareCurrent(const double x[], const double p[])
Definition: GETSignalFunctions.cpp:33
u_int getIntegPoints
Definition: GETSignalFunctions.cpp:11
double GETSquareCurrent2GSC(const double x[], const double p[])
Definition: GETSignalFunctions.cpp:151
TGraph * getGSCNorm
Definition: GETSignalFunctions.cpp:22
void GETSetNormalizationGSC()
Definition: GETSignalFunctions.cpp:168
double GETSquareCurrent2(const double x[], const double p[])
Definition: GETSignalFunctions.cpp:101
double getGSCConvMax
Definition: GETSignalFunctions.cpp:19
double GETSquareCurrent2Gaus(const double x[], const double p[])
Definition: GETSignalFunctions.cpp:124
double GETGausSinC(double t, double amp, double ctr, double sig, double w)
Definition: GETSignalFunctions.cpp:215
u_int getGSCConvPoints
Definition: GETSignalFunctions.cpp:14
double GETConvolutionGSC(const double x[], const double pg[], double(*fct)(const double[], const double[]), const double pf[])
Definition: GETSignalFunctions.cpp:241
double GETSquareCurrentGaus(const double x[], const double p[])
Definition: GETSignalFunctions.cpp:55
double GETSquareCurrentGSC(const double x[], const double p[])
Definition: GETSignalFunctions.cpp:81