Changeset 1109 in Sophya for trunk/SophyaLib/HiStats/histos2.h


Ignore:
Timestamp:
Jul 28, 2000, 6:29:55 PM (25 years ago)
Author:
ansari
Message:

on vire FitResidus/Function -> cf objfitter cmv 28/7/00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/histos2.h

    r1092 r1109  
    1919
    2020namespace SOPHYA {
    21 
    22 class GeneralFit;
    2321
    2422//! 2 dimensions histograms
     
    5351
    5452  // get/put dans/depuis une matrice / vector
    55   void GetXCoor(TVector<r_8>& v);
    56   void GetValue(TMatrix<r_8> &v);
    57   void GetYCoor(TVector<r_8>& v);
    58   void GetError2(TMatrix<r_8>& v);
    59   void GetError(TMatrix<r_8>& v);
     53  void GetXCoor(TVector<r_8>& v) const;
     54  void GetValue(TMatrix<r_8> &v) const;
     55  void GetYCoor(TVector<r_8>& v) const;
     56  void GetError2(TMatrix<r_8>& v) const;
     57  void GetError(TMatrix<r_8>& v) const;
    6058  void PutValue(TMatrix<r_8>& v, int_4 ierr=0);
    6159  void PutValueAdd(TMatrix<r_8>& v, int_4 ierr=0);
     
    8886  inline r_8& operator()(int_4 i,int_4 j)      {return mData[j*mNx+i];}
    8987  //! retourne "true" si il y a des erreurs stoquees
    90   inline bool HasErrors() { if(mErr2) return true; else return false;}
     88  inline bool HasErrors() const { if(mErr2) return true; else return false;}
    9189  //! Retourne l'erreur du bin i,j.
    9290  inline r_8 Error(int_4 i,int_4 j)  const
     
    104102  inline int_4 NEntries() const {return nEntries;}
    105103  //! Retourne l'abscisse et l'ordonnee du coin inferieur du bin i,j.
    106   inline void BinLowEdge(int_4 i,int_4 j,r_8& x,r_8& y)
     104  inline void BinLowEdge(int_4 i,int_4 j,r_8& x,r_8& y) const
    107105              {x = mXmin + i*mWBinx; y = mYmin + j*mWBiny;}
    108106  //! Retourne l'abscisse et l'ordonnee du coin inferieur du bin i,j.
    109   inline void BinLowEdge(int_4 i,int_4 j,r_4& xf,r_4& yf)
     107  inline void BinLowEdge(int_4 i,int_4 j,r_4& xf,r_4& yf) const
    110108              {r_8 x,y; BinLowEdge(i,j,x,y); xf=x; yf=y;}
    111109  //! Retourne l'abscisse et l'ordonnee du centre du bin i,j.
    112   inline void BinCenter(int_4 i,int_4 j,r_8& x,r_8& y)
     110  inline void BinCenter(int_4 i,int_4 j,r_8& x,r_8& y) const
    113111              {x = mXmin + (i+0.5)*mWBinx; y = mYmin + (j+0.5)*mWBiny;}
    114112  //! Retourne l'abscisse et l'ordonnee du centre du bin i,j.
    115   inline void BinCenter(int_4 i,int_4 j,r_4& xf,r_4& yf)
     113  inline void BinCenter(int_4 i,int_4 j,r_4& xf,r_4& yf) const
    116114              {r_8 x,y; BinCenter(i,j,x,y); xf=x; yf=y;}
    117115  //! Retourne l'abscisse et l'ordonnee du coin superieur du bin i,j.
    118   inline void BinHighEdge(int_4 i,int_4 j,r_8& x,r_8& y)
     116  inline void BinHighEdge(int_4 i,int_4 j,r_8& x,r_8& y) const
    119117              {x = mXmin + (i+1)*mWBinx; y = mYmin + (j+1)*mWBiny;}
    120118  //! Retourne l'abscisse et l'ordonnee du coin superieur du bin i,j.
    121   inline void BinHighEdge(int_4 i,int_4 j,r_4& xf,r_4& yf)
     119  inline void BinHighEdge(int_4 i,int_4 j,r_4& xf,r_4& yf) const
    122120              {r_8 x,y; BinHighEdge(i,j,x,y); xf=x; yf=y;}
    123121  //! Retourne les numeros du bin contenant l'abscisse et l'ordonnee x,y.
    124   inline void FindBin(r_8 x,r_8 y,int_4& i,int_4& j)
     122  inline void FindBin(r_8 x,r_8 y,int_4& i,int_4& j) const
    125123    {i=(int_4) floor((x-mXmin)/mWBinx); j=(int_4) floor((y-mYmin)/mWBiny);}
    126124
     
    129127  int_4 BinNonNul() const;
    130128  int_4 ErrNonNul() const;
    131   void IJMax(int_4& imax,int_4& jmax,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1);
    132   void IJMin(int_4& imax,int_4& jmax,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1);
     129  void IJMax(int_4& imax,int_4& jmax,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const;
     130  void IJMin(int_4& imax,int_4& jmax,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const;
    133131  r_8 VMax(int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const;
    134132  r_8 VMin(int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const;
    135133  int_4 EstimeMax(r_8& xm,r_8& ym,int_4 SzPav = 3
    136                  ,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1);
    137   int_4 EstimeMax(int_4 im,int_4 jm,r_8& xm,r_8& ym,int_4 SzPav = 3);
     134                 ,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const;
     135  int_4 EstimeMax(int_4 im,int_4 jm,r_8& xm,r_8& ym,int_4 SzPav = 3) const;
    138136  int_4 FindMax(int_4& im,int_4& jm,int_4 SzPav = 3,r_8 Dz = 0.
    139                ,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1);
    140 
    141   // Fit
    142   int_4   Fit(GeneralFit& gfit,unsigned short typ_err=0);
    143   Histo2D FitResidus(GeneralFit& gfit);
    144   Histo2D FitFunction(GeneralFit& gfit);
     137               ,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const;
    145138
    146139  // Print et Display ASCII
    147   void PrintStatus();
     140  void PrintStatus() const;
    148141  void Print(r_8 min=1.,r_8 max=-1.
    149                ,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1);
     142            ,int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const;
    150143
    151144  // PROJECTIONS
     
    163156  //! Retourne le pointeur sur l'histo 1D de la projection selon Y.
    164157  inline Histo* HProjY() const {return mHprojy;}
    165   void ShowProj();
     158  void ShowProj() const;
    166159
    167160  // BANDES
     
    180173  void GetBandX(int_4 n,r_8& ybmin,r_8& ybmax) const;
    181174  void GetBandY(int_4 n,r_8& xbmin,r_8& xbmax) const;
    182   void ShowBand(int_4 lp = 0);
     175  void ShowBand(int_4 lp = 0) const;
    183176
    184177  // SLICES
     
    195188  Histo* HSliX(int_4 n) const;
    196189  Histo* HSliY(int_4 n) const;
    197   void ShowSli(int_4 lp = 0);
     190  void ShowSli(int_4 lp = 0) const;
    198191
    199192#ifndef __DECCXX
Note: See TracChangeset for help on using the changeset viewer.