CMS 3D CMS Logo

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 #define matdim 5 /* parameters fit max matrice size */
9 #define diminpar 10
10 #define dimoutpar 10
11 #define npar_moni 4
12 
13 #include "TObject.h"
14 
15 class TSFit : public TObject {
16 private:
17  /*
18  nbs = nb of samples in sample data array[sdim] nbs<=sdim
19  nmxu number of samples to be used to fit the apd pulse shape
20  nmxu<=nbs
21  */
22  int nbs;
24  int iinf, isup; //limits indices for max search using pshape
25  double avtm; // mean time in clock unit of the maximums
26  int n_samples_bef_max; //number of samples before and after sample max
27  int n_samples_aft_max; //to be used in pulse fit
28  //( theoritical and experimental )
29  //the total number of samples used is
30  //n_samples_bef_max+n_samples_aft_max+1
31  double xki2_max, norme;
32  // int *sample_flag;
33  int nmxu_sto;
34  double alpha_th, beta_th;
37  double al[matdim][matdim], be[matdim][matdim]; //intern to inverms
38  //double *t, *z, *f, *acc, *adfmx, *maskp3, *adcp, *corel, *nbcor; //[sdim]
39  //double **ff; //[sdim][4]
40  //double **der=new double[SDIM];//[sdim][5]
41  double parfp3[dimoutpar];
42 
43  //double *tb, *fb, *accb;//[plshdim]
44  //int *sample_flag_call;//[plshdim]
45  //double **derb; //[plshdim][5]
46  //double **coeff;//[plshdim][3]
47 
48  double errmat[SDIM][SDIM]; //inverse of error matrix
50  double t[SDIM];
51  double z[SDIM];
52  double f[SDIM];
53  double acc[SDIM];
54  double adfmx[SDIM];
55  double adcp[SDIM];
56  double maskp3[SDIM];
57  double corel[SDIM];
58  double nbcor[SDIM];
59 
60  double ff[SDIM][4];
61  double der[SDIM][5];
62 
63 public:
64  int sdim;
65  int plshdim;
66 
67  TSFit(int size = SDIM, int size_sh = PLSHDIM);
68 
69  ~TSFit() override {}
70 
71  void set_params(int, int, int, int, int, double, double, int, int);
72 
73  void init_errmat(double);
74 
75  double fit_third_degree_polynomial(double *, double *);
76 
77  double fpol3dg(int, double *, double *, double *);
78 
79  double inverms(int, double xx[matdim][matdim], double yy[matdim][matdim]);
80 
81  ClassDefOverride(TSFit, 0)
82 };
83 
84 #endif
size
Write out results.
double avtm
Definition: TSFit.h:25
TSFit(int size=14, int size_sh=650)
Definition: TSFit.cc:19
double z[14]
Definition: TSFit.h:51
int n_samples_bef_max
Definition: TSFit.h:26
double f[14]
Definition: TSFit.h:52
double der[14][5]
Definition: TSFit.h:61
int sample_flag[14]
Definition: TSFit.h:49
double alpha_th
Definition: TSFit.h:34
int nbs
Definition: TSFit.h:22
double adfmx[14]
Definition: TSFit.h:54
#define matdim
Definition: TSFit.h:8
double al[5][5]
Definition: TSFit.h:37
double xki2_max
Definition: TSFit.h:31
double fit_third_degree_polynomial(double *, double *)
Definition: TSFit.cc:255
double fpol3dg(int, double *, double *, double *)
Definition: TSFit.cc:105
int plshdim
Definition: TSFit.h:65
int n_presamples
Definition: TSFit.h:23
double ff[14][4]
Definition: TSFit.h:60
double acc[14]
Definition: TSFit.h:53
double be[5][5]
Definition: TSFit.h:37
double adcp[14]
Definition: TSFit.h:55
double norme
Definition: TSFit.h:31
double beta_th
Definition: TSFit.h:34
double nbcor[14]
Definition: TSFit.h:58
void init_errmat(double)
Definition: TSFit.cc:87
double maskp3[14]
Definition: TSFit.h:56
double corel[14]
Definition: TSFit.h:57
int nbr_iter_fit
Definition: TSFit.h:35
double inverms(int, double xx[5][5], double yy[5][5])
Definition: TSFit.cc:187
int sdim
Definition: TSFit.h:64
~TSFit() override
Definition: TSFit.h:69
double invcov[5][5]
Definition: TSFit.h:36
double t[14]
Definition: TSFit.h:50
double errmat[14][14]
Definition: TSFit.h:48
int n_samples_aft_max
Definition: TSFit.h:27
int isup
Definition: TSFit.h:24
int iinf
Definition: TSFit.h:24
#define SDIM
Definition: TSFit.h:4
#define dimoutpar
Definition: TSFit.h:10
void set_params(int, int, int, int, int, double, double, int, int)
Definition: TSFit.cc:39
Definition: TSFit.h:15
int nmxu_sto
Definition: TSFit.h:33
#define PLSHDIM
Definition: TSFit.h:5
double parfp3[10]
Definition: TSFit.h:41
double cov[5][5]
Definition: TSFit.h:36