CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TFParams.h
Go to the documentation of this file.
1 #ifndef TFParams_h
2 #define TFParams_h
3 #include "TROOT.h"
4 #include "TObject.h"
5 #include "TArrayI.h"
6 #include "TArrayD.h"
7 #include "TArrayC.h"
8 #include "TCanvas.h"
9 #include "TDirectory.h"
10 #include "TPaveLabel.h"
11 #include "TF1.h"
12 #include <ctime>
13 #include "TGraph.h"
14 #include <cstdio>
15 #include <cmath>
16 #include "TH2.h"
17 #include "TH1.h"
18 #include "TStyle.h"
19 #include "TCanvas.h"
20 #include "TPaveText.h"
21 #include "TPaveLabel.h"
22 #include "TProfile.h"
23 #include "TVirtualX.h"
24 #include "TObject.h"
25 //#include "TMatrixD.h"
26 
27 struct matrice {
28  int nb_lignes;
30  double **coeff;
31 };
32 typedef struct matrice matrice;
33 matrice cree_mat(int, int);
35 void fill_mat(matrice, matrice);
37 
38 class TFParams : public TObject {
39 public:
40  static constexpr unsigned int dimmat = 30;
41  static constexpr unsigned int dimout = 10;
42  static constexpr unsigned int nbmax_cell = 1000;
43  static constexpr int SDIM2 = 10;
44  static constexpr int PLSHDIM = 650;
45 
46 private:
47  int ns; // number of samples
48  int nsmin; // beginning of fit
49  int nsmax; // end of fit
50  int nevtmax; // number of events to fit
51  double a1ini; // value of alpha at starting point
52  double a2ini; // value of alpha_prim/beta at starting point
53  double a3ini; // value of beta/alpha_prim at starting point
54  double step_shape;
55  double adclu[26];
56  double weight_matrix[10][10];
57  int METHODE;
58 
59 public:
60  /* number of samples for cristal */
61  /* size of the pulse shape array */
62  TFParams(int size = SDIM2, int size_sh = PLSHDIM);
63  ~TFParams() override{};
64  double fitpj(double **, double *, double **, double noise_val, int debug);
65  void set_const(int, int, int, double, double, int);
70  void somme_mat_int_scale(matrice, matrice, double);
71  void print_mat_nk(matrice, int);
72  void print_mat(matrice);
75  void copie_colonne_mat(matrice, matrice, int);
76  char name_mat[10];
77  void zero_mat(matrice);
78  void zero_mat_nk(matrice, int);
79  double f3deg(int, double parom[dimout], double mask[dimmat], double adcpj[dimmat], double errpj[dimmat][dimmat]);
80  double parab(double *, Int_t, Int_t, double *);
81  Double_t polfit(Int_t ns, Int_t imax, Double_t par3d[dimout], Double_t errpj[dimmat][dimmat], double *);
82  double inverpj(int, double g[dimmat][dimmat], double ginv[dimmat][dimmat]);
83  double inv3x3(double a[3][3], double b[3][3]);
84  double pulseShapepj(Double_t *, Double_t *);
85  double pulseShapepj2(Double_t *, Double_t *);
86  double lastShape(Double_t *, Double_t *);
87  double lastShape2(Double_t *, Double_t *);
88  double mixShape(Double_t *, Double_t *);
89  double computePulseWidth(int, double, double);
90 
91  ClassDefOverride(TFParams, 0)
92 };
93 #endif
int nsmax
Definition: TFParams.h:49
double pulseShapepj(Double_t *, Double_t *)
Definition: TFParams.cc:991
double a1ini
Definition: TFParams.h:51
int nsmin
Definition: TFParams.h:48
Double_t polfit(Int_t ns, Int_t imax, Double_t par3d[dimout], Double_t errpj[dimmat][dimmat], double *)
Definition: TFParams.cc:759
void print_mat_nk(matrice, int)
Definition: TFParams.cc:709
double computePulseWidth(int, double, double)
Definition: TFParams.cc:1158
void somme_mat_int_scale(matrice, matrice, double)
Definition: TFParams.cc:610
void zero_mat(matrice)
Definition: TFParams.cc:695
void produit_mat(matrice, matrice, matrice)
Definition: TFParams.cc:523
double a2ini
Definition: TFParams.h:52
double inverpj(int, double g[dimmat][dimmat], double ginv[dimmat][dimmat])
Definition: TFParams.cc:894
double ** coeff
Definition: TFParams.h:30
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
void somme_mat_int(matrice, matrice)
Definition: TFParams.cc:594
int nevtmax
Definition: TFParams.h:50
static constexpr int PLSHDIM
Definition: TFParams.h:44
void print_mat(matrice)
Definition: TFParams.cc:681
void transpose_mat(matrice, matrice)
Definition: TFParams.cc:620
matrice fill_mat_int(matrice, matrice, matrice)
char name_mat[10]
Definition: TFParams.h:76
void set_const(int, int, int, double, double, int)
Definition: TFParams.cc:509
double parab(double *, Int_t, Int_t, double *)
Definition: TFParams.cc:1091
static constexpr unsigned int dimout
Definition: TFParams.h:41
static constexpr unsigned int nbmax_cell
Definition: TFParams.h:42
matrice cree_mat_prod(matrice, matrice)
Definition: TFParams.cc:630
int METHODE
Definition: TFParams.h:57
int nb_lignes
Definition: TFParams.h:28
void copie_colonne_mat(matrice, matrice, int)
Definition: TFParams.cc:579
matrice cree_mat(int, int)
Definition: TFParams.cc:648
double pulseShapepj2(Double_t *, Double_t *)
Definition: TFParams.cc:1058
double a3ini
Definition: TFParams.h:53
void inverse_mat(matrice, matrice)
Definition: TFParams.cc:719
int ns
Definition: TFParams.h:47
double f3deg(int, double parom[dimout], double mask[dimmat], double adcpj[dimmat], double errpj[dimmat][dimmat])
Definition: TFParams.cc:805
#define debug
Definition: HDRShower.cc:19
void zero_mat_nk(matrice, int)
Definition: TFParams.cc:703
void fill_mat(matrice, matrice)
Definition: TFParams.cc:667
double b
Definition: hdecay.h:118
int nb_colonnes
Definition: TFParams.h:29
double step_shape
Definition: TFParams.h:54
double lastShape(Double_t *, Double_t *)
Definition: TFParams.cc:1026
double adclu[26]
Definition: TFParams.h:55
~TFParams() override
Definition: TFParams.h:63
double a
Definition: hdecay.h:119
void produit_mat_int(matrice, matrice, matrice)
Definition: TFParams.cc:544
TFParams(int size=SDIM2, int size_sh=PLSHDIM)
Definition: TFParams.cc:23
static constexpr unsigned int dimmat
Definition: TFParams.h:40
double mixShape(Double_t *, Double_t *)
Definition: TFParams.cc:1128
void diff_mat(matrice, matrice, matrice)
Definition: TFParams.cc:562
double lastShape2(Double_t *, Double_t *)
Definition: TFParams.cc:1041
double inv3x3(double a[3][3], double b[3][3])
Definition: TFParams.cc:957
double fitpj(double **, double *, double **, double noise_val, int debug)
Definition: TFParams.cc:34
tuple size
Write out results.
static constexpr int SDIM2
Definition: TFParams.h:43
double weight_matrix[10][10]
Definition: TFParams.h:56