CMS 3D CMS Logo

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