CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/CalibCalorimetry/EcalLaserAnalyzer/interface/TFParams.h

Go to the documentation of this file.
00001 #ifndef TFParams_h
00002 #define TFParams_h
00003 #include "TROOT.h"
00004 #include "TObject.h"
00005 #include "TArrayI.h"
00006 #include "TArrayD.h"
00007 #include "TArrayC.h"
00008 #include "TCanvas.h"
00009 #include "TDirectory.h"
00010 #include "TPaveLabel.h"
00011 #include "TF1.h"
00012 #include "time.h"
00013 #include "TGraph.h"
00014 #include <stdio.h>
00015 #include <math.h>
00016 #include "TH2.h"
00017 #include "TH1.h"
00018 #include "TStyle.h"
00019 #include "TCanvas.h"
00020 #include "TPaveText.h"
00021 #include "TPaveLabel.h"
00022 #include "TProfile.h"
00023 #include "TVirtualX.h"
00024 #include "TObject.h"
00025 //#include "TMatrixD.h"
00026 #define  SDIM2     10 /* number of samples for cristal */
00027 #define  PLSHDIM 650  /* size of the pulse shape array */
00028 //double pulseShape( Double_t x[1], Double_t par[4] ) ;
00029 //
00030   struct matrice
00031 {
00032             int nb_lignes ;
00033             int nb_colonnes ;
00034             double **coeff ;
00035 };
00036  typedef struct matrice matrice ;
00037  matrice cree_mat(int,int) ;
00038  matrice cree_mat_prod(matrice,matrice) ;
00039  void fill_mat(matrice,matrice) ;
00040  matrice fill_mat_int(matrice,matrice,matrice) ;
00041  
00042 #define dimmat  30
00043 #define dimout 10
00044 #define nbmax_cell 1000
00045 
00046 
00047  class TFParams : public TObject {
00048 
00049  private:
00050 
00051  int ns ; // number of samples
00052  int nsmin ; // beginning of fit
00053  int nsmax ; // end of fit
00054  int nevtmax ; // number of events to fit
00055  double a1ini ; // value of alpha at starting point
00056  double a2ini ; // value of alpha_prim/beta at starting point
00057  double a3ini ; // value of beta/alpha_prim at starting point
00058  double step_shape ;
00059  double adclu[26] ;
00060  double weight_matrix[10][10];
00061  int METHODE ;
00062 
00063  public:
00064 
00065  TFParams( int size = SDIM2, int size_sh = PLSHDIM );
00066 ~TFParams(){};
00067 double fitpj(double **, double *,double ** , double noise_val, int debug) ;
00068  void set_const( int ,int ,int ,double ,double ,int);
00069  void produit_mat(matrice,matrice,matrice) ;
00070  void produit_mat_int(matrice,matrice,matrice) ;
00071  void diff_mat(matrice,matrice,matrice) ;
00072  void somme_mat_int(matrice,matrice) ;
00073  void somme_mat_int_scale(matrice,matrice,double) ;
00074  void print_mat_nk(matrice,int) ;
00075  void print_mat(matrice) ;
00076  void transpose_mat(matrice,matrice) ;
00077  void inverse_mat(matrice,matrice) ;
00078  void copie_colonne_mat(matrice,matrice,int) ;
00079  char name_mat[10] ;
00080  void zero_mat(matrice) ;
00081  void zero_mat_nk(matrice,int) ;
00082  double f3deg(int ,  double parom[dimout] , double mask[dimmat] ,
00083   double adcpj[dimmat] , double errpj[dimmat][dimmat]) ;
00084  double parab(double *,Int_t,Int_t,double *) ;
00085  Double_t polfit(Int_t ns ,Int_t imax , Double_t par3d[dimout] , 
00086  Double_t errpj[dimmat][dimmat] ,double * ) ; 
00087  double inverpj(int,double g[dimmat][dimmat],double ginv[dimmat][dimmat]);
00088  double inv3x3(double a[3][3] , double b[3][3] ) ;
00089  double pulseShapepj( Double_t *, Double_t * ) ;
00090  double pulseShapepj2( Double_t *, Double_t * ) ;
00091  double lastShape( Double_t *, Double_t * ) ;
00092  double lastShape2( Double_t *, Double_t * ) ;
00093  double mixShape( Double_t *, Double_t * ) ;
00094  double computePulseWidth( int, double, double) ;
00095 
00096  //  ClassDef( TFParams, 1 ) 
00097 };
00098 #endif