Changeset 3119 in Sophya for trunk/SophyaLib/HiStats
- Timestamp:
- Dec 21, 2006, 4:43:15 PM (19 years ago)
- Location:
- trunk/SophyaLib/HiStats
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/HiStats/histos2.cc
r3060 r3119 205 205 memset(mErr2,0,mNxy*sizeof(r_8)); 206 206 } 207 208 /////////////////////////////////////////////////////////////////// 209 /*! 210 Recompute XMin (YMin) and XMax (YMax) so that 211 the CENTER of the first bin is exactly XMin (YMin) and 212 the CENTER of the last bin is exactly XMax (YMax). 213 Remember that otherwise 214 XMin (YMin) is the beginning of the first bin 215 and XMax (YMax) is the end of the last bin 216 */ 217 void Histo2D::ReCenterBinX(void) 218 { 219 if(mNx<=1) return; 220 double dx = (mXmax-mXmin)/(mNx-1); 221 mXmin -= dx/2.; 222 mXmax += dx/2.; 223 mWBinx = (mXmax-mXmin)/mNx; 224 } 225 226 void Histo2D::ReCenterBinY(void) 227 { 228 if(mNy<=1) return; 229 double dy = (mYmax-mYmin)/(mNy-1); 230 mYmin -= dy/2.; 231 mYmax += dy/2.; 232 mWBiny = (mYmax-mYmin)/mNy; 233 } 234 235 void Histo2D::ReCenterBin(void) 236 { 237 ReCenterBinX(); 238 ReCenterBinY(); 239 } 240 207 241 208 242 /////////////////////////////////////////////////////////////////// -
trunk/SophyaLib/HiStats/histos2.h
r3060 r3119 37 37 38 38 // OPTIONS 39 void Errors(); 40 39 void Errors(); 40 void ReCenterBinX(void); 41 void ReCenterBinY(void); 42 void ReCenterBin(void); 43 41 44 // UPDATING 42 45 void Zero();
Note:
See TracChangeset
for help on using the changeset viewer.