Changeset 1109 in Sophya for trunk/SophyaLib/HiStats/histos2.h
- Timestamp:
- Jul 28, 2000, 6:29:55 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/HiStats/histos2.h
r1092 r1109 19 19 20 20 namespace SOPHYA { 21 22 class GeneralFit;23 21 24 22 //! 2 dimensions histograms … … 53 51 54 52 // 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; 60 58 void PutValue(TMatrix<r_8>& v, int_4 ierr=0); 61 59 void PutValueAdd(TMatrix<r_8>& v, int_4 ierr=0); … … 88 86 inline r_8& operator()(int_4 i,int_4 j) {return mData[j*mNx+i];} 89 87 //! 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;} 91 89 //! Retourne l'erreur du bin i,j. 92 90 inline r_8 Error(int_4 i,int_4 j) const … … 104 102 inline int_4 NEntries() const {return nEntries;} 105 103 //! 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 107 105 {x = mXmin + i*mWBinx; y = mYmin + j*mWBiny;} 108 106 //! 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 110 108 {r_8 x,y; BinLowEdge(i,j,x,y); xf=x; yf=y;} 111 109 //! 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 113 111 {x = mXmin + (i+0.5)*mWBinx; y = mYmin + (j+0.5)*mWBiny;} 114 112 //! 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 116 114 {r_8 x,y; BinCenter(i,j,x,y); xf=x; yf=y;} 117 115 //! 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 119 117 {x = mXmin + (i+1)*mWBinx; y = mYmin + (j+1)*mWBiny;} 120 118 //! 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 122 120 {r_8 x,y; BinHighEdge(i,j,x,y); xf=x; yf=y;} 123 121 //! 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 125 123 {i=(int_4) floor((x-mXmin)/mWBinx); j=(int_4) floor((y-mYmin)/mWBiny);} 126 124 … … 129 127 int_4 BinNonNul() const; 130 128 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; 133 131 r_8 VMax(int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const; 134 132 r_8 VMin(int_4 il=1,int_4 ih= -1,int_4 jl=1,int_4 jh= -1) const; 135 133 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; 138 136 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; 145 138 146 139 // Print et Display ASCII 147 void PrintStatus() ;140 void PrintStatus() const; 148 141 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; 150 143 151 144 // PROJECTIONS … … 163 156 //! Retourne le pointeur sur l'histo 1D de la projection selon Y. 164 157 inline Histo* HProjY() const {return mHprojy;} 165 void ShowProj() ;158 void ShowProj() const; 166 159 167 160 // BANDES … … 180 173 void GetBandX(int_4 n,r_8& ybmin,r_8& ybmax) const; 181 174 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; 183 176 184 177 // SLICES … … 195 188 Histo* HSliX(int_4 n) const; 196 189 Histo* HSliY(int_4 n) const; 197 void ShowSli(int_4 lp = 0) ;190 void ShowSli(int_4 lp = 0) const; 198 191 199 192 #ifndef __DECCXX
Note:
See TracChangeset
for help on using the changeset viewer.