Changeset 3044 in Sophya
- Timestamp:
- Aug 7, 2006, 7:38:47 PM (19 years ago)
- Location:
- trunk/SophyaLib/HiStats
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/HiStats/histerr.cc
r2868 r3044 115 115 if(n>0) for(int_4 i=0;i<n;i++) mNData[i] = v(i); 116 116 return; 117 }118 119 /********* Methode *********/120 /*!121 Recompute XMin and XMax so that122 the CENTER of the first bin is exactly XMin and123 the CENTER of the last bin is exactly XMax.124 Remember that otherwise125 XMin is the beginning of the first bin126 and XMax is the end of the last bin127 */128 void HistoErr::ReCenterBin(void)129 {130 if(mBins<=1) return;131 double dx = (mMax-mMin)/(mBins-1);132 mMin -= dx/2.;133 mMax += dx/2.;134 binWidth = (mMax-mMin)/mBins;135 117 } 136 118 -
trunk/SophyaLib/HiStats/histerr.h
r2819 r3044 63 63 void PutNBin(TVector<r_8>& v); 64 64 65 //! Re-center bin abscissa66 void ReCenterBin(void);67 65 //! Compute the correlation histogram 68 66 void ToCorrel(void); -
trunk/SophyaLib/HiStats/histos.cc
r2868 r3044 1 1 // 2 // $Id: histos.cc,v 1.2 1 2006-01-03 14:20:23 ansariExp $2 // $Id: histos.cc,v 1.22 2006-08-07 17:38:47 cmv Exp $ 3 3 // 4 4 … … 109 109 if(mErr2==NULL) mErr2 = new r_8[mBins]; 110 110 memset(mErr2,0,mBins*sizeof(r_8)); 111 } 112 113 /********* Methode *********/ 114 /*! 115 Recompute XMin and XMax so that 116 the CENTER of the first bin is exactly XMin and 117 the CENTER of the last bin is exactly XMax. 118 Remember that otherwise 119 XMin is the beginning of the first bin 120 and XMax is the end of the last bin 121 */ 122 void Histo::ReCenterBin(void) 123 { 124 if(mBins<=1) return; 125 double dx = (mMax-mMin)/(mBins-1); 126 mMin -= dx/2.; 127 mMax += dx/2.; 128 binWidth = (mMax-mMin)/mBins; 111 129 } 112 130 -
trunk/SophyaLib/HiStats/histos.h
r2630 r3044 1 1 // This may look like C code, but it is really -*- C++ -*- 2 2 // 3 // $Id: histos.h,v 1.2 0 2004-10-26 16:26:39cmv Exp $3 // $Id: histos.h,v 1.21 2006-08-07 17:38:47 cmv Exp $ 4 4 // 5 5 … … 30 30 31 31 // OPTIONS 32 void Errors(); 32 void Errors(void); 33 void ReCenterBin(void); 33 34 34 35 // UPDATING or SETTING 35 void Zero( );36 void Zero(void); 36 37 void Add(r_8 x, r_8 w); 37 38 inline void Add(r_8 x) {Add(x,1.);}
Note:
See TracChangeset
for help on using the changeset viewer.