CMS 3D CMS Logo

Macros | Functions
TFParams.cc File Reference
#include <CalibCalorimetry/EcalLaserAnalyzer/interface/TFParams.h>
#include "TMatrixD.h"
#include "TMath.h"
#include <iostream>
#include <time.h>

Go to the source code of this file.

Macros

#define dimin   10
 
#define dimn   10
 
#define nsamp   10
 
#define ntrack   500
 
#define plshdim   300
 

Functions

matrice cree_mat (int n_lignes, int n_colonnes)
 
matrice cree_mat_prod (matrice A, matrice B)
 
void fill_mat (matrice A, matrice M)
 

Macro Definition Documentation

#define dimin   10
#define dimn   10
#define nsamp   10

Referenced by TFParams::fitpj().

#define ntrack   500
#define plshdim   300

Function Documentation

matrice cree_mat ( int  n_lignes,
int  n_colonnes 
)

Definition at line 701 of file TFParams.cc.

References matrice::coeff, i, j, matrice::nb_colonnes, and matrice::nb_lignes.

Referenced by TFParams::fitpj().

702 {
703  int i,j;
704  matrice M ; /* resultat de la creation */
705 
706  M.nb_lignes = n_lignes ;
707  M.nb_colonnes = n_colonnes ;
708  M.coeff = (double**)malloc(M.nb_lignes*sizeof(double*)) ;
709  for(i=0 ; i< M.nb_lignes; i++)
710  M.coeff[i]=(double*)calloc(M.nb_colonnes,sizeof(double));
711  for(i=0 ; i< M.nb_lignes; i++) {
712  for(j=0 ; j< M.nb_colonnes ; j++) {
713  M.coeff[i][j] = 0. ;
714  }
715  }
716  //printf(" creation de matrice ---> nlignes %d ncolonnes %d \n",
717  // M.nb_lignes,M.nb_colonnes) ;
718  return (M) ;
719 }
int i
Definition: DBlmapReader.cc:9
double ** coeff
Definition: TFParams.h:34
int j
Definition: DBlmapReader.cc:9
int nb_lignes
Definition: TFParams.h:32
int nb_colonnes
Definition: TFParams.h:33
matrice cree_mat_prod ( matrice  A,
matrice  B 
)

Definition at line 681 of file TFParams.cc.

References matrice::coeff, i, j, matrice::nb_colonnes, and matrice::nb_lignes.

Referenced by TFParams::fitpj().

682 {
683  int i,j;
684  matrice M ; /* resultat de la creation */
685 
686  M.nb_lignes = A.nb_lignes ;
687  M.nb_colonnes = B.nb_colonnes ;
688  M.coeff = (double**)malloc(M.nb_lignes*sizeof(double*)) ;
689  for(i=0 ; i< M.nb_lignes; i++)
690  M.coeff[i]=(double*)calloc(M.nb_colonnes,sizeof(double));
691  for(i=0 ; i< M.nb_lignes; i++) {
692 
693  for(j=0 ; j< M.nb_colonnes ; j++) {
694  M.coeff[i][j] = 0. ;
695  }
696  }
697  //printf(" creation de matrice ----> nlignes %d ncolonnes %d \n",
698 // M.nb_lignes,M.nb_colonnes) ;
699  return (M) ;
700 }
int i
Definition: DBlmapReader.cc:9
double ** coeff
Definition: TFParams.h:34
int j
Definition: DBlmapReader.cc:9
int nb_lignes
Definition: TFParams.h:32
int nb_colonnes
Definition: TFParams.h:33
void fill_mat ( matrice  A,
matrice  M 
)

Definition at line 721 of file TFParams.cc.

References matrice::coeff, i, j, matrice::nb_colonnes, matrice::nb_lignes, and reco::return().

722 {
723  int i,j;
724  /* on remplit la matrice M avec la matrice A */
725 
726  M.nb_lignes = A.nb_lignes ;
727  M.nb_colonnes = A.nb_colonnes ;
728  for(i=0 ; i< M.nb_lignes; i++) {
729  for(j=0 ; j< M.nb_colonnes ; j++) {
730  M.coeff[i][j] = A.coeff[i][j] ;
731  printf("matrice remplie %e \n",M.coeff[i][j]) ;
732  }
733  }
734  return ;
735 }
int i
Definition: DBlmapReader.cc:9
double ** coeff
Definition: TFParams.h:34
int j
Definition: DBlmapReader.cc:9
int nb_lignes
Definition: TFParams.h:32
int nb_colonnes
Definition: TFParams.h:33
return(e1-e2)*(e1-e2)+dp *dp