test
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, 0 )
90 };
91 
92 #endif
93 
94 
double avtm
Definition: TSFit.h:26
double invcov[5][5]
Definition: TSFit.h:37
TSFit(int size=14, int size_sh=650)
Definition: TSFit.cc:19
double der[14][5]
Definition: TSFit.h:63
int sample_flag[14]
Definition: TSFit.h:51
double maskp3[14]
Definition: TSFit.h:58
double nbcor[14]
Definition: TSFit.h:60
int n_samples_bef_max
Definition: TSFit.h:27
double alpha_th
Definition: TSFit.h:35
int nbs
Definition: TSFit.h:23
#define matdim
Definition: TSFit.h:9
double xki2_max
Definition: TSFit.h:32
double fit_third_degree_polynomial(double *, double *)
Definition: TSFit.cc:256
double be[5][5]
Definition: TSFit.h:38
double fpol3dg(int, double *, double *, double *)
Definition: TSFit.cc:103
double z[14]
Definition: TSFit.h:53
int plshdim
Definition: TSFit.h:68
int n_presamples
Definition: TSFit.h:24
double norme
Definition: TSFit.h:32
double beta_th
Definition: TSFit.h:35
void init_errmat(double)
Definition: TSFit.cc:85
double acc[14]
Definition: TSFit.h:55
int nbr_iter_fit
Definition: TSFit.h:36
double inverms(int, double xx[5][5], double yy[5][5])
Definition: TSFit.cc:188
int sdim
Definition: TSFit.h:67
double f[14]
Definition: TSFit.h:54
double adfmx[14]
Definition: TSFit.h:56
double corel[14]
Definition: TSFit.h:59
double al[5][5]
Definition: TSFit.h:38
virtual ~TSFit()
Definition: TSFit.h:72
double errmat[14][14]
Definition: TSFit.h:50
int n_samples_aft_max
Definition: TSFit.h:28
double cov[5][5]
Definition: TSFit.h:37
double ff[14][4]
Definition: TSFit.h:62
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:41
Definition: TSFit.h:16
int nmxu_sto
Definition: TSFit.h:34
#define PLSHDIM
Definition: TSFit.h:5
double parfp3[10]
Definition: TSFit.h:42
double t[14]
Definition: TSFit.h:52
double adcp[14]
Definition: TSFit.h:57
tuple size
Write out results.