CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TSFit.h
Go to the documentation of this file.
1 #ifndef TSFit_H
2 #define TSFit_H
3 
4 #define SDIM 14 /* default number of samples for cristal */
5 #define PLSHDIM 650 /* default size of the pulse shape array */
6 //these 2 last parameters are overwritten in constructor
7 
8 
9 #define matdim 5 /* parameters fit max matrice size */
10 #define diminpar 10
11 #define dimoutpar 10
12 #define npar_moni 4
13 
14 #include "TObject.h"
15 
16 class TSFit : public TObject {
17 private :
18  /*
19  nbs = nb of samples in sample data array[sdim] nbs<=sdim
20  nmxu number of samples to be used to fit the apd pulse shape
21  nmxu<=nbs
22  */
23  int nbs;
25  int iinf, isup;//limits indices for max search using pshape
26  double avtm;// mean time in clock unit of the maximums
27  int n_samples_bef_max;//number of samples before and after sample max
28  int n_samples_aft_max;//to be used in pulse fit
29  //( theoritical and experimental )
30  //the total number of samples used is
31  //n_samples_bef_max+n_samples_aft_max+1
32  double xki2_max, norme;
33  // int *sample_flag;
34  int nmxu_sto ;
35  double alpha_th, beta_th;
38  double al[matdim][matdim], be[matdim][matdim];//intern to inverms
39  //double *t, *z, *f, *acc, *adfmx, *maskp3, *adcp, *corel, *nbcor; //[sdim]
40  //double **ff; //[sdim][4]
41  //double **der=new double[SDIM];//[sdim][5]
42  double parfp3[dimoutpar];
43 
44  //double *tb, *fb, *accb;//[plshdim]
45  //int *sample_flag_call;//[plshdim]
46  //double **derb; //[plshdim][5]
47  //double **coeff;//[plshdim][3]
48 
49 
50  double errmat[SDIM][SDIM];//inverse of error matrix
52  double t[SDIM];
53  double z[SDIM];
54  double f[SDIM];
55  double acc[SDIM];
56  double adfmx[SDIM];
57  double adcp[SDIM];
58  double maskp3[SDIM];
59  double corel[SDIM];
60  double nbcor[SDIM];
61 
62  double ff[SDIM][4];
63  double der[SDIM][5];
64 
65 
66 public :
67  int sdim;
68  int plshdim;
69 
70  TSFit( int size = SDIM, int size_sh = PLSHDIM );
71 
72  virtual ~TSFit() {}
73 
74  void set_params( int, int, int, int, int, double, double, int, int );
75 
76  void init_errmat(double);
77 
78  double fit_third_degree_polynomial( double *,
79  double * );
80 
81 
82  double fpol3dg ( int,
83  double *,
84  double *,
85  double *);
86 
87  double inverms ( int, double xx[matdim][matdim], double yy[matdim][matdim] );
88 
89  // ClassDef( TSFit, 1 )
90 };
91 
92 #endif
93 
94 
double avtm
Definition: TSFit.h:26
TSFit(int size=SDIM, int size_sh=PLSHDIM)
Definition: TSFit.cc:20
double invcov[matdim][matdim]
Definition: TSFit.h:37
double f[SDIM]
Definition: TSFit.h:54
int n_samples_bef_max
Definition: TSFit.h:27
double nbcor[SDIM]
Definition: TSFit.h:60
double parfp3[dimoutpar]
Definition: TSFit.h:42
double alpha_th
Definition: TSFit.h:35
int nbs
Definition: TSFit.h:23
double al[matdim][matdim]
Definition: TSFit.h:38
#define matdim
Definition: TSFit.h:9
double t[SDIM]
Definition: TSFit.h:52
double xki2_max
Definition: TSFit.h:32
double fit_third_degree_polynomial(double *, double *)
Definition: TSFit.cc:257
double be[matdim][matdim]
Definition: TSFit.h:38
double cov[matdim][matdim]
Definition: TSFit.h:37
double fpol3dg(int, double *, double *, double *)
Definition: TSFit.cc:104
int plshdim
Definition: TSFit.h:68
int n_presamples
Definition: TSFit.h:24
double z[SDIM]
Definition: TSFit.h:53
double inverms(int, double xx[matdim][matdim], double yy[matdim][matdim])
Definition: TSFit.cc:189
double norme
Definition: TSFit.h:32
double adcp[SDIM]
Definition: TSFit.h:57
double beta_th
Definition: TSFit.h:35
void init_errmat(double)
Definition: TSFit.cc:86
double corel[SDIM]
Definition: TSFit.h:59
int nbr_iter_fit
Definition: TSFit.h:36
int sdim
Definition: TSFit.h:67
double errmat[SDIM][SDIM]
Definition: TSFit.h:50
double maskp3[SDIM]
Definition: TSFit.h:58
double adfmx[SDIM]
Definition: TSFit.h:56
virtual ~TSFit()
Definition: TSFit.h:72
int sample_flag[SDIM]
Definition: TSFit.h:51
int n_samples_aft_max
Definition: TSFit.h:28
int isup
Definition: TSFit.h:25
int iinf
Definition: TSFit.h:25
#define SDIM
Definition: TSFit.h:4
#define dimoutpar
Definition: TSFit.h:11
void set_params(int, int, int, int, int, double, double, int, int)
Definition: TSFit.cc:42
double ff[SDIM][4]
Definition: TSFit.h:62
Definition: TSFit.h:16
int nmxu_sto
Definition: TSFit.h:34
#define PLSHDIM
Definition: TSFit.h:5
tuple size
Write out results.
double acc[SDIM]
Definition: TSFit.h:55
double der[SDIM][5]
Definition: TSFit.h:63