Changeset 3044 in Sophya for trunk/SophyaLib/HiStats/histos.cc


Ignore:
Timestamp:
Aug 7, 2006, 7:38:47 PM (19 years ago)
Author:
cmv
Message:

ReCenterBin deplace methode Histo (was HistErr) cmv 7/8/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/histos.cc

    r2868 r3044  
    11//
    2 // $Id: histos.cc,v 1.21 2006-01-03 14:20:23 ansari Exp $
     2// $Id: histos.cc,v 1.22 2006-08-07 17:38:47 cmv Exp $
    33//
    44
     
    109109 if(mErr2==NULL) mErr2 = new r_8[mBins];
    110110 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*/
     122void 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;
    111129}
    112130
Note: See TracChangeset for help on using the changeset viewer.