CMS 3D CMS Logo

Defines | Functions

/data/refman/pasoursint/CMSSW_6_1_1/src/CalibCalorimetry/EcalLaserAnalyzer/src/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.

Defines

#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)

Define 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().

{
  int i,j;
  matrice M ; /* resultat de la creation */
 
  M.nb_lignes = n_lignes ;
  M.nb_colonnes = n_colonnes ;
  M.coeff = (double**)malloc(M.nb_lignes*sizeof(double*)) ;
  for(i=0 ; i< M.nb_lignes; i++) 
    M.coeff[i]=(double*)calloc(M.nb_colonnes,sizeof(double));
  for(i=0 ; i< M.nb_lignes; i++) {
    for(j=0 ; j< M.nb_colonnes ; j++) {
        M.coeff[i][j] = 0.  ;
    }
  }
  //printf(" creation de matrice --->  nlignes %d ncolonnes %d  \n",
        // M.nb_lignes,M.nb_colonnes) ;
  return (M) ;
}
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().

{
  int i,j;
  matrice M ; /* resultat de la creation */
 
  M.nb_lignes = A.nb_lignes ;
  M.nb_colonnes = B.nb_colonnes ;
  M.coeff = (double**)malloc(M.nb_lignes*sizeof(double*)) ;
  for(i=0 ; i< M.nb_lignes; i++) 
    M.coeff[i]=(double*)calloc(M.nb_colonnes,sizeof(double));
  for(i=0 ; i< M.nb_lignes; i++) {

    for(j=0 ; j< M.nb_colonnes ; j++) {
        M.coeff[i][j] = 0.  ;
    }
  }
  //printf(" creation de matrice ---->  nlignes %d ncolonnes %d  \n",
//       M.nb_lignes,M.nb_colonnes) ;
  return (M) ;
}
void fill_mat ( matrice  A,
matrice  M 
)

Definition at line 721 of file TFParams.cc.

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

{
  int i,j;
  /* on remplit la matrice M avec la matrice A */
 
  M.nb_lignes = A.nb_lignes ;
  M.nb_colonnes = A.nb_colonnes ;
  for(i=0 ; i< M.nb_lignes; i++) {
    for(j=0 ; j< M.nb_colonnes ; j++) {
        M.coeff[i][j] = A.coeff[i][j]  ;
        printf("matrice remplie %e \n",M.coeff[i][j]) ;
    }
  } 
  return ;
}