Index: trunk/SophyaLib/HiStats/histos2.cc
===================================================================
--- trunk/SophyaLib/HiStats/histos2.cc	(revision 1064)
+++ trunk/SophyaLib/HiStats/histos2.cc	(revision 1092)
@@ -43,54 +43,72 @@
   entre xMin,xMax et yMin,yMax.
 */
-Histo2D::Histo2D(float xMin, float xMax, int nxBin
-                ,float yMin, float yMax, int nyBin)
-      : data(new float[nxBin*nyBin]), err2(NULL)
+Histo2D::Histo2D(r_8 xMin,r_8 xMax,int_4 nxBin,r_8 yMin,r_8 yMax,int_4 nyBin)
+      : mData(new r_8[nxBin*nyBin]), mErr2(NULL)
       , nHist(0), nEntries(0)
-      , nx(nxBin), ny(nyBin), nxy(nxBin*nyBin)
-      , xmin(xMin), xmax(xMax), ymin(yMin), ymax(yMax)
-      , wbinx((xMax - xMin)/nxBin), wbiny((yMax - yMin)/nyBin)
-      , hprojx(NULL), hprojy(NULL)
+      , mNx(nxBin), mNy(nyBin), mNxy(nxBin*nyBin)
+      , mXmin(xMin), mXmax(xMax), mYmin(yMin), mYmax(yMax)
+      , mWBinx((xMax - xMin)/nxBin), mWBiny((yMax - yMin)/nyBin)
+      , mHprojx(NULL), mHprojy(NULL)
 {
 ASSERT(nxBin>0 && nyBin>0 && xMin<xMax && yMin<yMax);
-for(int i=0;i<3;i++) for(int j=0;j<3;j++) over[i][j]=0.;
+for(int_4 i=0;i<3;i++) for(int_4 j=0;j<3;j++) mOver[i][j]=0.;
 Zero();
-b_s.H = NULL;
+mB_s.H = NULL;
 END_CONSTRUCTOR
 }
 
 /*!
+  Createur d'un histogramme 2D ayant nxBin,nyBin bins
+  entre xMin,xMax et yMin,yMax.
+*/
+Histo2D::Histo2D(r_4 xMin,r_4 xMax,int_4 nxBin,r_4 yMin,r_4 yMax,int_4 nyBin)
+      : mData(new r_8[nxBin*nyBin]), mErr2(NULL)
+      , nHist(0), nEntries(0)
+      , mNx(nxBin), mNy(nyBin), mNxy(nxBin*nyBin)
+      , mXmin((r_8)xMin), mXmax((r_8)xMax), mYmin((r_8)yMin), mYmax((r_8)yMax)
+      , mWBinx((xMax - xMin)/nxBin), mWBiny((yMax - yMin)/nyBin)
+      , mHprojx(NULL), mHprojy(NULL)
+{
+ASSERT(nxBin>0 && nyBin>0 && xMin<xMax && yMin<yMax);
+for(int_4 i=0;i<3;i++) for(int_4 j=0;j<3;j++) mOver[i][j]=0.;
+Zero();
+mB_s.H = NULL;
+END_CONSTRUCTOR
+}
+
+/*!
   Constructeur par copie.
 */
 Histo2D::Histo2D(const Histo2D& h)
 {
-int i,j;
-data = new float[h.nxy];
-memcpy(data, h.data, h.nxy*sizeof(float));
-
-err2 = NULL;
-if(h.err2) {
-  err2 = new double[h.nxy];
-  memcpy(err2, h.err2, h.nxy*sizeof(double));
+int_4 i,j;
+mData = new r_8[h.mNxy];
+memcpy(mData, h.mData, h.mNxy*sizeof(r_8));
+
+mErr2 = NULL;
+if(h.mErr2) {
+  mErr2 = new r_8[h.mNxy];
+  memcpy(mErr2, h.mErr2, h.mNxy*sizeof(r_8));
 }
 
 nHist = h.nHist; nEntries = h.nEntries;
-for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j]=h.over[i][j];
-nx = h.nx;  ny = h.ny;  nxy = h.nxy;
-xmin = h.xmin; xmax = h.xmax; ymin = h.ymin; ymax = h.ymax;
-wbinx = h.wbinx; wbiny = h.wbiny;
-b_s.H = NULL;
-
-hprojx = hprojy = NULL;
-if(h.hprojx) {
+for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j]=h.mOver[i][j];
+mNx = h.mNx;  mNy = h.mNy;  mNxy = h.mNxy;
+mXmin = h.mXmin; mXmax = h.mXmax; mYmin = h.mYmin; mYmax = h.mYmax;
+mWBinx = h.mWBinx; mWBiny = h.mWBiny;
+mB_s.H = NULL;
+
+mHprojx = mHprojy = NULL;
+if(h.mHprojx) {
   SetProjX();
-  *hprojx = *(h.hprojx);
-}
-if(h.hprojy) {
+  *mHprojx = *(h.mHprojx);
+}
+if(h.mHprojy) {
   SetProjY();
-  *hprojy = *(h.hprojy); 
-}
-
-int nb;
-float min,max;
+  *mHprojy = *(h.mHprojy); 
+}
+
+int_4 nb;
+r_8 min,max;
 nb = h.NSliX();
 if(nb>0) {
@@ -130,13 +148,13 @@
 */
 Histo2D::Histo2D()
-      : data(NULL), err2(NULL)
+      : mData(NULL), mErr2(NULL)
       , nHist(0), nEntries(0)
-      , nx(0), ny(0), nxy(0)
-      , xmin(0), xmax(0), ymin(0), ymax(0)
-      , wbinx(0), wbiny(0)
-      , hprojx(NULL), hprojy(NULL)
-{
-for(int i=0;i<3;i++) for(int j=0;j<3;j++) over[i][j]=0.;
-b_s.H = NULL;
+      , mNx(0), mNy(0), mNxy(0)
+      , mXmin(0), mXmax(0), mYmin(0), mYmax(0)
+      , mWBinx(0), mWBiny(0)
+      , mHprojx(NULL), mHprojy(NULL)
+{
+for(int_4 i=0;i<3;i++) for(int_4 j=0;j<3;j++) mOver[i][j]=0.;
+mB_s.H = NULL;
 END_CONSTRUCTOR
 }
@@ -148,7 +166,7 @@
 void Histo2D::Delete()
 {
-  if( data != NULL ) { delete[] data; data = NULL;}
-
-  if( err2 != NULL ) { delete[] err2; err2 = NULL;}
+  if( mData != NULL ) { delete[] mData; mData = NULL;}
+
+  if( mErr2 != NULL ) { delete[] mErr2; mErr2 = NULL;}
 
   DelProj();
@@ -162,9 +180,9 @@
   nHist = 0;
   nEntries = 0;
-  nx = 0; ny = 0; nxy = 0;
-  xmin = 0; xmax = 0; ymin = 0; ymax = 0;
-  wbinx = 0; wbiny = 0;
-  for(int i=0;i<3;i++) for(int j=0;j<3;j++) over[i][j]=0.;
-  b_s.H = NULL;
+  mNx = 0; mNy = 0; mNxy = 0;
+  mXmin = 0; mXmax = 0; mYmin = 0; mYmax = 0;
+  mWBinx = 0; mWBiny = 0;
+  for(int_4 i=0;i<3;i++) for(int_4 j=0;j<3;j++) mOver[i][j]=0.;
+  mB_s.H = NULL;
 }
 
@@ -184,9 +202,9 @@
 {
   nHist = nEntries = 0;
-  for(int i=0;i<3;i++) for(int j=0;j<3;j++) over[i][j]=0.;
-  memset(data, 0, nxy*sizeof(float));
-  memset(over, 0, 9*sizeof(float));
-
-  if( err2 != NULL ) memset(err2, 0, nxy*sizeof(double));
+  for(int_4 i=0;i<3;i++) for(int_4 j=0;j<3;j++) mOver[i][j]=0.;
+  memset(mData, 0, mNxy*sizeof(r_8));
+  memset(mOver, 0, 9*sizeof(r_8));
+
+  if( mErr2 != NULL ) memset(mErr2, 0, mNxy*sizeof(r_8));
 
   ZeroProj();
@@ -205,7 +223,7 @@
 void Histo2D::Errors()
 {
- if( nxy > 0 ) {
-   if(err2==NULL) err2 = new double[nxy];
-   memset(err2, 0, nxy*sizeof(double));
+ if( mNxy > 0 ) {
+   if(mErr2==NULL) mErr2 = new r_8[mNxy];
+   memset(mErr2, 0, mNxy*sizeof(r_8));
  }
 }
@@ -217,32 +235,32 @@
 Histo2D& Histo2D::operator = (const Histo2D& h)
 {
-  int i,j,nb;
-  float min,max;
+  int_4 i,j,nb;
+  r_8 min,max;
 
   if(this == &h) return *this;
-  if( h.nxy > nxy ) Delete();
-  if(!data) data = new float[h.nxy];
-  if( !h.err2 && err2 ) { delete [] err2; err2=NULL;}
-  if( h.err2 && !err2 ) err2 = new double[h.nxy];
-
-  for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j] = h.over[i][j];
+  if( h.mNxy > mNxy ) Delete();
+  if(!mData) mData = new r_8[h.mNxy];
+  if( !h.mErr2 && mErr2 ) { delete [] mErr2; mErr2=NULL;}
+  if( h.mErr2 && !mErr2 ) mErr2 = new r_8[h.mNxy];
+
+  for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j] = h.mOver[i][j];
   nHist = h.nHist;
   nEntries = h.nEntries;
-  nx = h.nx;  ny = h.ny;  nxy = h.nxy;
-  xmin = h.xmin; xmax = h.xmax; wbinx = h.wbinx;
-  ymin = h.ymin; ymax = h.ymax; wbiny = h.wbiny;
+  mNx = h.mNx;  mNy = h.mNy;  mNxy = h.mNxy;
+  mXmin = h.mXmin; mXmax = h.mXmax; mWBinx = h.mWBinx;
+  mYmin = h.mYmin; mYmax = h.mYmax; mWBiny = h.mWBiny;
   
-  memcpy(data, h.data, nxy*sizeof(float));
-  if(err2) memcpy(err2, h.err2, nxy*sizeof(double));
+  memcpy(mData, h.mData, mNxy*sizeof(r_8));
+  if(mErr2) memcpy(mErr2, h.mErr2, mNxy*sizeof(r_8));
 
   DelProjX();
-  if(h.hprojx) {
+  if(h.mHprojx) {
     SetProjX();
-    *hprojx = *(h.hprojx);
+    *mHprojx = *(h.mHprojx);
   }
   DelProjY();
-  if(h.hprojy) {
+  if(h.mHprojy) {
     SetProjY();
-    *hprojy = *(h.hprojy);
+    *mHprojy = *(h.mHprojy);
   }
 
@@ -288,17 +306,17 @@
   Operateur H *= b
 */
-Histo2D& Histo2D::operator *= (double b)
-{
-int i,j;
-double b2 = b*b;
-for(i=0;i<nxy;i++) {
-  data[i] *= b;
-  if(err2) err2[i] *= b2;
-}
-for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j] *= b;
+Histo2D& Histo2D::operator *= (r_8 b)
+{
+int_4 i,j;
+r_8 b2 = b*b;
+for(i=0;i<mNxy;i++) {
+  mData[i] *= b;
+  if(mErr2) mErr2[i] *= b2;
+}
+for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j] *= b;
 nHist *= b;
 
-if(hprojx) *hprojx *= b;
-if(hprojy) *hprojy *= b;
+if(mHprojx) *mHprojx *= b;
+if(mHprojy) *mHprojy *= b;
 if(NSliX()>0) for(i=0; i<NSliX();i++) *HSliX(i) *= b;
 if(NSliY()>0) for(i=0; i<NSliY();i++) *HSliY(i) *= b;
@@ -312,18 +330,18 @@
   Operateur H /= b
 */
-Histo2D& Histo2D::operator /= (double b)
-{
-int i,j;
+Histo2D& Histo2D::operator /= (r_8 b)
+{
+int_4 i,j;
 if (b==0.) THROW(inconsistentErr);
-double b2 = b*b;
-for(i=0;i<nxy;i++) {
-  data[i] /= b;
-  if(err2) err2[i] /= b2;
-}
-for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j] /= b;
+r_8 b2 = b*b;
+for(i=0;i<mNxy;i++) {
+  mData[i] /= b;
+  if(mErr2) mErr2[i] /= b2;
+}
+for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j] /= b;
 nHist /= b;
 
-if(hprojx) *hprojx /= b;
-if(hprojy) *hprojy /= b;
+if(mHprojx) *mHprojx /= b;
+if(mHprojy) *mHprojy /= b;
 if(NSliX()>0) for(i=0; i<NSliX();i++) *HSliX(i) /= b;
 if(NSliY()>0) for(i=0; i<NSliY();i++) *HSliY(i) /= b;
@@ -337,23 +355,23 @@
   Operateur H += b
 */
-Histo2D& Histo2D::operator += (double b)
-{
-int i,j;
-float min,max;
-for(i=0;i<nxy;i++) data[i] += b;
-for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j] += b;
-nHist += nxy*b;
-
-if(hprojx) *hprojx += b*ny;
-if(hprojy) *hprojy += b*nx;
-if(NSliX()>0) for(i=0; i<NSliX();i++) *HSliX(i) += b*ny/NSliX();
-if(NSliY()>0) for(i=0; i<NSliY();i++) *HSliY(i) += b*nx/NSliY();
+Histo2D& Histo2D::operator += (r_8 b)
+{
+int_4 i,j;
+r_8 min,max;
+for(i=0;i<mNxy;i++) mData[i] += b;
+for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j] += b;
+nHist += mNxy*b;
+
+if(mHprojx) *mHprojx += b*mNy;
+if(mHprojy) *mHprojy += b*mNx;
+if(NSliX()>0) for(i=0; i<NSliX();i++) *HSliX(i) += b*mNy/NSliX();
+if(NSliY()>0) for(i=0; i<NSliY();i++) *HSliY(i) += b*mNx/NSliY();
 if(NBandX()>0) for(i=0; i<NBandX();i++) {
   GetBandX(i,min,max);
-  *HBandX(i) += b*(max-min)/(ymax-ymin)*ny;
+  *HBandX(i) += b*(max-min)/(mYmax-mYmin)*mNy;
 }
 if(NBandY()>0) for(i=0; i<NBandY();i++) {
   GetBandY(i,min,max);
-  *HBandY(i) += b*(max-min)/(xmax-xmin)*nx;
+  *HBandY(i) += b*(max-min)/(mXmax-mXmin)*mNx;
 }
 
@@ -364,23 +382,23 @@
   Operateur H -= b
 */
-Histo2D& Histo2D::operator -= (double b)
-{
-int i,j;
-float min,max;
-for(i=0;i<nxy;i++) data[i] -= b;
-for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j] -= b;
-nHist -= nxy*b;
-
-if(hprojx) *hprojx -= b*ny;
-if(hprojy) *hprojy -= b*nx;
-if(NSliX()>0) for(i=0; i<NSliX();i++) *HSliX(i) -= b*ny/NSliX();
-if(NSliY()>0) for(i=0; i<NSliY();i++) *HSliY(i) -= b*nx/NSliY();
+Histo2D& Histo2D::operator -= (r_8 b)
+{
+int_4 i,j;
+r_8 min,max;
+for(i=0;i<mNxy;i++) mData[i] -= b;
+for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j] -= b;
+nHist -= mNxy*b;
+
+if(mHprojx) *mHprojx -= b*mNy;
+if(mHprojy) *mHprojy -= b*mNx;
+if(NSliX()>0) for(i=0; i<NSliX();i++) *HSliX(i) -= b*mNy/NSliX();
+if(NSliY()>0) for(i=0; i<NSliY();i++) *HSliY(i) -= b*mNx/NSliY();
 if(NBandX()>0) for(i=0; i<NBandX();i++) {
   GetBandX(i,min,max);
-  *HBandX(i) -= b*(max-min)/(ymax-ymin)*ny;
+  *HBandX(i) -= b*(max-min)/(mYmax-mYmin)*mNy;
 }
 if(NBandY()>0) for(i=0; i<NBandY();i++) {
   GetBandY(i,min,max);
-  *HBandY(i) -= b*(max-min)/(xmax-xmin)*nx;
+  *HBandY(i) -= b*(max-min)/(mXmax-mXmin)*mNx;
 }
 
@@ -394,16 +412,16 @@
 Histo2D& Histo2D::operator += (const Histo2D& a)
 {
-int i,j;
-if(nx!=a.nx || ny!=a.ny) THROW(sizeMismatchErr);
-for(i=0;i<nxy;i++) {
-  data[i] += a.data[i];
-  if(err2 && a.err2) err2[i] += a.err2[i];
-}
-for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j] += a.over[i][j];
+int_4 i,j;
+if(mNx!=a.mNx || mNy!=a.mNy) THROW(sizeMismatchErr);
+for(i=0;i<mNxy;i++) {
+  mData[i] += a.mData[i];
+  if(mErr2 && a.mErr2) mErr2[i] += a.mErr2[i];
+}
+for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j] += a.mOver[i][j];
 nHist += a.nHist;
 nEntries += a.nEntries;
 
-if(hprojx && a.hprojx) *hprojx += *(a.hprojx);
-if(hprojy && a.hprojy) *hprojy += *(a.hprojy);
+if(mHprojx && a.mHprojx) *mHprojx += *(a.mHprojx);
+if(mHprojy && a.mHprojy) *mHprojy += *(a.mHprojy);
 ZeroSliX();  ZeroSliY();
 ZeroBandX(); ZeroBandY();
@@ -417,16 +435,16 @@
 Histo2D& Histo2D::operator -= (const Histo2D& a)
 {
-int i,j;
-if(nx!=a.nx || ny!=a.ny) THROW(sizeMismatchErr);
-for(i=0;i<nxy;i++) {
-  data[i] -= a.data[i];
-  if(err2 && a.err2) err2[i] += a.err2[i];
-}
-for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j] += a.over[i][j];
+int_4 i,j;
+if(mNx!=a.mNx || mNy!=a.mNy) THROW(sizeMismatchErr);
+for(i=0;i<mNxy;i++) {
+  mData[i] -= a.mData[i];
+  if(mErr2 && a.mErr2) mErr2[i] += a.mErr2[i];
+}
+for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j] += a.mOver[i][j];
 nHist -= a.nHist;
 nEntries += a.nEntries;
 
-if(hprojx && a.hprojx) *hprojx -= *(a.hprojx);
-if(hprojy && a.hprojy) *hprojy -= *(a.hprojy);
+if(mHprojx && a.mHprojx) *mHprojx -= *(a.mHprojx);
+if(mHprojy && a.mHprojy) *mHprojy -= *(a.mHprojy);
 ZeroSliX();  ZeroSliY();
 ZeroBandX(); ZeroBandY();
@@ -440,18 +458,18 @@
 Histo2D& Histo2D::operator *= (const Histo2D& a)
 {
-int i,j;
-if(nx!=a.nx || ny!=a.ny) THROW(sizeMismatchErr);
+int_4 i,j;
+if(mNx!=a.mNx || mNy!=a.mNy) THROW(sizeMismatchErr);
 nHist = 0.;
-for(i=0;i<nxy;i++) {
-  if(err2 && a.err2)
-      err2[i] = a.data[i]*a.data[i]*err2[i] + data[i]*data[i]*a.err2[i];
-  data[i] *= a.data[i];
-  nHist += data[i];
-}
-for(i=0;i<3;i++) for(j=0;j<3;j++) over[i][j] *= a.over[i][j];
+for(i=0;i<mNxy;i++) {
+  if(mErr2 && a.mErr2)
+      mErr2[i] = a.mData[i]*a.mData[i]*mErr2[i] + mData[i]*mData[i]*a.mErr2[i];
+  mData[i] *= a.mData[i];
+  nHist += mData[i];
+}
+for(i=0;i<3;i++) for(j=0;j<3;j++) mOver[i][j] *= a.mOver[i][j];
 nEntries += a.nEntries;
 
-if(hprojx && a.hprojx) *hprojx *= *(a.hprojx);
-if(hprojy && a.hprojy) *hprojy *= *(a.hprojy);
+if(mHprojx && a.mHprojx) *mHprojx *= *(a.mHprojx);
+if(mHprojy && a.mHprojy) *mHprojy *= *(a.mHprojy);
 ZeroSliX();  ZeroSliY();
 ZeroBandX(); ZeroBandY();
@@ -465,25 +483,25 @@
 Histo2D& Histo2D::operator /= (const Histo2D& a)
 {
-int i,j;
-if(nx!=a.nx || ny!=a.ny) THROW(sizeMismatchErr);
+int_4 i,j;
+if(mNx!=a.mNx || mNy!=a.mNy) THROW(sizeMismatchErr);
 nHist = 0.;
-for(i=0;i<nxy;i++) {
-  if(a.data[i]==0.) {
-    data[i]=0.;
-    if(err2) err2[i]=0.;
+for(i=0;i<mNxy;i++) {
+  if(a.mData[i]==0.) {
+    mData[i]=0.;
+    if(mErr2) mErr2[i]=0.;
     continue;
   }
-  if(err2 && a.err2)
-      err2[i] = (err2[i] + data[i]/a.data[i]*data[i]/a.data[i]*a.err2[i])
-                /(a.data[i]*a.data[i]);
-  data[i] /= a.data[i];
-  nHist += data[i];
+  if(mErr2 && a.mErr2)
+      mErr2[i] = (mErr2[i] + mData[i]/a.mData[i]*mData[i]/a.mData[i]*a.mErr2[i])
+                /(a.mData[i]*a.mData[i]);
+  mData[i] /= a.mData[i];
+  nHist += mData[i];
 }
 for(i=0;i<3;i++) for(j=0;j<3;j++) 
-  if(a.over[i][j]!=0.) over[i][j] *= a.over[i][j]; else over[i][j] = 0.;
+  if(a.mOver[i][j]!=0.) mOver[i][j] *= a.mOver[i][j]; else mOver[i][j] = 0.;
 nEntries += a.nEntries;
 
-if(hprojx && a.hprojx) *hprojx /= *(a.hprojx);
-if(hprojy && a.hprojy) *hprojy /= *(a.hprojy);
+if(mHprojx && a.mHprojx) *mHprojx /= *(a.mHprojx);
+if(mHprojy && a.mHprojy) *mHprojy /= *(a.mHprojy);
 ZeroSliX();  ZeroSliY();
 ZeroBandX(); ZeroBandY();
@@ -498,7 +516,7 @@
 void Histo2D::GetXCoor(TVector<r_8> &v)
 {
-float x,y;
-v.Realloc(nx);
-for(int i=0;i<nx;i++) {BinLowEdge(i,0,x,y); v(i) = x;}
+r_8 x,y;
+v.Realloc(mNx);
+for(int_4 i=0;i<mNx;i++) {BinLowEdge(i,0,x,y); v(i) = x;}
 return;
 }
@@ -509,7 +527,7 @@
 void Histo2D::GetYCoor(TVector<r_8> &v)
 {
-float x,y;
-v.Realloc(ny);
-for(int i=0;i<ny;i++) {BinLowEdge(0,i,x,y); v(i) = y;}
+r_8 x,y;
+v.Realloc(mNy);
+for(int_4 i=0;i<mNy;i++) {BinLowEdge(0,i,x,y); v(i) = y;}
 return;
 }
@@ -520,7 +538,7 @@
 void Histo2D::GetValue(TMatrix<r_8> &v)
 {
-v.Realloc(nx,ny);
-for(int i=0;i<nx;i++)
-  for(int j=0;j<ny;j++) v(i,j) = (*this)(i,j);
+v.Realloc(mNx,mNy);
+for(int_4 i=0;i<mNx;i++)
+  for(int_4 j=0;j<mNy;j++) v(i,j) = (*this)(i,j);
 return;
 }
@@ -531,9 +549,9 @@
 void Histo2D::GetError2(TMatrix<r_8> &v)
 {
-int i,j;
-v.Realloc(nx,ny);
-if(!err2)
-  {for(i=0;i<nx;i++) for(j=0;j<ny;j++) v(i,j) = 0.; return;}
-for(i=0;i<nx;i++) for(j=0;j<ny;j++) v(i,j) = Error2(i,j);
+int_4 i,j;
+v.Realloc(mNx,mNy);
+if(!mErr2)
+  {for(i=0;i<mNx;i++) for(j=0;j<mNy;j++) v(i,j) = 0.; return;}
+for(i=0;i<mNx;i++) for(j=0;j<mNy;j++) v(i,j) = Error2(i,j);
 return;
 }
@@ -544,9 +562,9 @@
 void Histo2D::GetError(TMatrix<r_8> &v)
 {
-int i,j;
-v.Realloc(nx,ny);
-if(!err2)
-  {for(i=0;i<nx;i++) for(j=0;j<ny;j++) v(i,j) = 0.; return;}
-for(i=0;i<nx;i++) for(j=0;j<ny;j++) v(i,j) = Error(i,j);
+int_4 i,j;
+v.Realloc(mNx,mNy);
+if(!mErr2)
+  {for(i=0;i<mNx;i++) for(j=0;j<mNy;j++) v(i,j) = 0.; return;}
+for(i=0;i<mNx;i++) for(j=0;j<mNy;j++) v(i,j) = Error(i,j);
 return;
 }
@@ -556,13 +574,12 @@
   Remplissage du contenu de l'histo avec les valeurs d'un tableau.
 */
-void Histo2D::PutValue(TMatrix<r_8> &v, int ierr)
-{
-int i,j;
-//if(v.NRows()!=(uint_4)nx || v.NCol()!=(uint_4)ny) THROW(sizeMismatchErr);
-uint_4 nnx = (v.NRows()<(uint_4)nx)? v.NRows(): (uint_4)nx;
-uint_4 nny = (v.NCol() <(uint_4)ny)? v.NCol() : (uint_4)ny;
-if(nnx>0 && nny>0) for(i=0;i<nnx;i++) for(j=0;j<nny;j++) {
+void Histo2D::PutValue(TMatrix<r_8> &v, int_4 ierr)
+{
+//if(v.NRows()!=(uint_4)mNx || v.NCol()!=(uint_4)mNy) THROW(sizeMismatchErr);
+uint_4 nnx = (v.NRows()<(uint_4)mNx)? v.NRows(): (uint_4)mNx;
+uint_4 nny = (v.NCol() <(uint_4)mNy)? v.NCol() : (uint_4)mNy;
+if(nnx>0 && nny>0) for(uint_4 i=0;i<nnx;i++) for(uint_4 j=0;j<nny;j++) {
   (*this)(i,j) = v(i,j);
-  if(err2 && ierr) Error2(i,j) = fabs(v(i,j));
+  if(mErr2 && ierr) Error2(i,j) = fabs(v(i,j));
 }
 return;
@@ -572,13 +589,12 @@
   Addition du contenu de l'histo avec les valeurs d'un tableau.
 */
-void Histo2D::PutValueAdd(TMatrix<r_8> &v, int ierr)
-{
-int i,j;
-//if(v.NRows()!=(uint_4)nx || v.NCol()!=(uint_4)ny) THROW(sizeMismatchErr);
-uint_4 nnx = (v.NRows()<(uint_4)nx)? v.NRows(): (uint_4)nx;
-uint_4 nny = (v.NCol() <(uint_4)ny)? v.NCol() : (uint_4)ny;
-if(nnx>0 && nny>0) for(i=0;i<nnx;i++) for(j=0;j<nny;j++) {
+void Histo2D::PutValueAdd(TMatrix<r_8> &v, int_4 ierr)
+{
+//if(v.NRows()!=(uint_4)mNx || v.NCol()!=(uint_4)mNy) THROW(sizeMismatchErr);
+uint_4 nnx = (v.NRows()<(uint_4)mNx)? v.NRows(): (uint_4)mNx;
+uint_4 nny = (v.NCol() <(uint_4)mNy)? v.NCol() : (uint_4)mNy;
+if(nnx>0 && nny>0) for(uint_4 i=0;i<nnx;i++) for(uint_4 j=0;j<nny;j++) {
   (*this)(i,j) += v(i,j);
-  if(err2 && ierr) Error2(i,j) += fabs(v(i,j));
+  if(mErr2 && ierr) Error2(i,j) += fabs(v(i,j));
 }
 return;
@@ -591,11 +607,10 @@
 void Histo2D::PutError2(TMatrix<r_8> &v)
 {
-int i,j;
-//if(v.NRows()!=(uint_4)nx || v.NCol()!=(uint_4)ny) THROW(sizeMismatchErr);
-uint_4 nnx = (v.NRows()<(uint_4)nx)? v.NRows(): (uint_4)nx;
-uint_4 nny = (v.NCol() <(uint_4)ny)? v.NCol() : (uint_4)ny;
+//if(v.NRows()!=(uint_4)mNx || v.NCol()!=(uint_4)mNy) THROW(sizeMismatchErr);
+uint_4 nnx = (v.NRows()<(uint_4)mNx)? v.NRows(): (uint_4)mNx;
+uint_4 nny = (v.NCol() <(uint_4)mNy)? v.NCol() : (uint_4)mNy;
 if(nnx>0 && nny>0) {
-  if(!err2) Errors();
-  for(i=0;i<nnx;i++) for(j=0;j<nny;j++) Error2(i,j) = v(i,j);
+  if(!mErr2) Errors();
+  for(uint_4 i=0;i<nnx;i++) for(uint_4 j=0;j<nny;j++) Error2(i,j) = v(i,j);
 }
 return;
@@ -608,11 +623,10 @@
 void Histo2D::PutError2Add(TMatrix<r_8> &v)
 {
-int i,j;
-//if(v.NRows()!=(uint_4)nx || v.NCol()!=(uint_4)ny) THROW(sizeMismatchErr);
-uint_4 nnx = (v.NRows()<(uint_4)nx)? v.NRows(): (uint_4)nx;
-uint_4 nny = (v.NCol() <(uint_4)ny)? v.NCol() : (uint_4)ny;
+//if(v.NRows()!=(uint_4)mNx || v.NCol()!=(uint_4)mNy) THROW(sizeMismatchErr);
+uint_4 nnx = (v.NRows()<(uint_4)mNx)? v.NRows(): (uint_4)mNx;
+uint_4 nny = (v.NCol() <(uint_4)mNy)? v.NCol() : (uint_4)mNy;
 if(nnx>0 && nny>0) {
-  if(!err2) Errors();
-  for(i=0;i<nnx;i++) for(j=0;j<nny;j++)
+  if(!mErr2) Errors();
+  for(uint_4 i=0;i<nnx;i++) for(uint_4 j=0;j<nny;j++)
           if(v(i,j)>0.) Error2(i,j) += v(i,j);
 }
@@ -625,11 +639,10 @@
 void Histo2D::PutError(TMatrix<r_8> &v)
 {
-int i,j;
-//if(v.NRows()!=(uint_4)nx || v.NCol()!=(uint_4)ny) THROW(sizeMismatchErr);
-uint_4 nnx = (v.NRows()<(uint_4)nx)? v.NRows(): (uint_4)nx;
-uint_4 nny = (v.NCol() <(uint_4)ny)? v.NCol() : (uint_4)ny;
+//if(v.NRows()!=(uint_4)mNx || v.NCol()!=(uint_4)mNy) THROW(sizeMismatchErr);
+uint_4 nnx = (v.NRows()<(uint_4)mNx)? v.NRows(): (uint_4)mNx;
+uint_4 nny = (v.NCol() <(uint_4)mNy)? v.NCol() : (uint_4)mNy;
 if(nnx>0 && nny>0) {
-  if(!err2) Errors();
-  for(i=0;i<nnx;i++) for(j=0;j<nny;j++)
+  if(!mErr2) Errors();
+  for(uint_4 i=0;i<nnx;i++) for(uint_4 j=0;j<nny;j++)
     if(v(i,j)>0.) Error2(i,j)=v(i,j)*v(i,j); else Error2(i,j)= -v(i,j)*v(i,j);
 }
@@ -642,39 +655,39 @@
   Addition du contenu de l'histo pour x,y poids w.
 */
-void Histo2D::Add(float x, float y, float w)
+void Histo2D::Add(r_8 x, r_8 y, r_8 w)
 {
 list<bande_slice>::iterator it;
-int i,j;
+int_4 i,j;
 FindBin(x,y,i,j);
 
-if( hprojx != NULL ) hprojx->Add(x,w);
-if( hprojy != NULL ) hprojy->Add(y,w);
-
-if(lbandx.size()>0)
-  for( it = lbandx.begin(); it != lbandx.end(); it++)
+if( mHprojx != NULL ) mHprojx->Add(x,w);
+if( mHprojy != NULL ) mHprojy->Add(y,w);
+
+if(mLBandx.size()>0)
+  for( it = mLBandx.begin(); it != mLBandx.end(); it++)
     if( (*it).min <= y && y < (*it).max ) (*it).H->Add(x,w);
 
-if(lbandy.size()>0)
-  for( it = lbandy.begin(); it != lbandy.end(); it++)
+if(mLBandy.size()>0)
+  for( it = mLBandy.begin(); it != mLBandy.end(); it++)
     if( (*it).min <= x && x < (*it).max ) (*it).H->Add(y,w);
 
-if(lslix.size()>0)
-  for( it = lslix.begin(); it != lslix.end(); it++)
+if(mLSlix.size()>0)
+  for( it = mLSlix.begin(); it != mLSlix.end(); it++)
     if( (*it).min <= y && y < (*it).max ) (*it).H->Add(x,w);
 
-if(lsliy.size()>0)
-  for( it = lsliy.begin(); it != lsliy.end(); it++)
+if(mLSliy.size()>0)
+  for( it = mLSliy.begin(); it != mLSliy.end(); it++)
     if( (*it).min <= x && x < (*it).max ) (*it).H->Add(y,w);
 
-if( i<0 || i>=nx || j<0 || j>=ny ) {
-  if(i<0) i=0; else if(i>=nx) i=2; else i=1;
-  if(j<0) j=0; else if(j>=ny) j=2; else j=1;
-  over[i][j] += w;
-  over[1][1] += w;
+if( i<0 || i>=mNx || j<0 || j>=mNy ) {
+  if(i<0) i=0; else if(i>=mNx) i=2; else i=1;
+  if(j<0) j=0; else if(j>=mNy) j=2; else j=1;
+  mOver[i][j] += w;
+  mOver[1][1] += w;
   return;
 }
 
-data[j*nx+i] += w;
-if(err2!=NULL) err2[j*nx+i] += w*w;
+mData[j*mNx+i] += w;
+if(mErr2!=NULL) mErr2[j*mNx+i] += w*w;
 nHist += w;
 nEntries++;
@@ -685,19 +698,19 @@
   Recherche du bin du maximum dans le pave [il,ih][jl,jh].
 */
-void Histo2D::IJMax(int& imax,int& jmax,int il,int ih,int jl,int jh)
-{
-if( il > ih ) { il = 0; ih = nx-1; }
-if( jl > jh ) { jl = 0; jh = ny-1; }
+void Histo2D::IJMax(int_4& imax,int_4& jmax,int_4 il,int_4 ih,int_4 jl,int_4 jh)
+{
+if( il > ih ) { il = 0; ih = mNx-1; }
+if( jl > jh ) { jl = 0; jh = mNy-1; }
 if( il < 0 ) il = 0;
 if( jl < 0 ) jl = 0;
-if( ih >= nx ) ih = nx-1;
-if( jh >= ny ) jh = ny-1;
+if( ih >= mNx ) ih = mNx-1;
+if( jh >= mNy ) jh = mNy-1;
 
 imax = jmax = 0;
-if(nxy==1) return;
-
-float mx=(*this)(il,jl);
-for (int i=il; i<=ih; i++)
-   for (int j=jl; j<=jh; j++)
+if(mNxy==1) return;
+
+r_8 mx=(*this)(il,jl);
+for (int_4 i=il; i<=ih; i++)
+   for (int_4 j=jl; j<=jh; j++)
       if ((*this)(i,j)>mx) {imax = i; jmax = j; mx=(*this)(i,j);}
 }
@@ -706,19 +719,19 @@
   Recherche du bin du minimum dans le pave [il,ih][jl,jh].
 */
-void Histo2D::IJMin(int& imax,int& jmax,int il,int ih,int jl,int jh)
-{
-if( il > ih ) { il = 0; ih = nx-1; }
-if( jl > jh ) { jl = 0; jh = ny-1; }
+void Histo2D::IJMin(int_4& imax,int_4& jmax,int_4 il,int_4 ih,int_4 jl,int_4 jh)
+{
+if( il > ih ) { il = 0; ih = mNx-1; }
+if( jl > jh ) { jl = 0; jh = mNy-1; }
 if( il < 0 ) il = 0;
 if( jl < 0 ) jl = 0;
-if( ih >= nx ) ih = nx-1;
-if( jh >= ny ) jh = ny-1;
+if( ih >= mNx ) ih = mNx-1;
+if( jh >= mNy ) jh = mNy-1;
 
 imax = jmax = 0;
-if(nxy==1) return;
-
-float mx=(*this)(il,jl);
-for (int i=il; i<=ih; i++)
-   for (int j=jl; j<=jh; j++)
+if(mNxy==1) return;
+
+r_8 mx=(*this)(il,jl);
+for (int_4 i=il; i<=ih; i++)
+   for (int_4 j=jl; j<=jh; j++)
       if ((*this)(i,j)<mx) {imax = i; jmax = j; mx=(*this)(i,j);}
 }
@@ -728,17 +741,17 @@
   Recherche du maximum dans le pave [il,ih][jl,jh].
 */
-float Histo2D::VMax(int il,int ih,int jl,int jh) const
-{
-if( il > ih ) { il = 0; ih = nx-1; }
-if( jl > jh ) { jl = 0; jh = ny-1; }
+r_8 Histo2D::VMax(int_4 il,int_4 ih,int_4 jl,int_4 jh) const
+{
+if( il > ih ) { il = 0; ih = mNx-1; }
+if( jl > jh ) { jl = 0; jh = mNy-1; }
 if( il < 0 ) il = 0;
 if( jl < 0 ) jl = 0;
-if( ih >= nx ) ih = nx-1;
-if( jh >= ny ) jh = ny-1;
-
-float mx=(*this)(il,jl);
-if(nxy==1) return mx;
-for (int i=il; i<=ih; i++)
-   for (int j=jl; j<=jh; j++)
+if( ih >= mNx ) ih = mNx-1;
+if( jh >= mNy ) jh = mNy-1;
+
+r_8 mx=(*this)(il,jl);
+if(mNxy==1) return mx;
+for (int_4 i=il; i<=ih; i++)
+   for (int_4 j=jl; j<=jh; j++)
       if ((*this)(i,j)>mx) mx=(*this)(i,j);
 return mx;
@@ -748,17 +761,17 @@
   Recherche du minimum dans le pave [il,ih][jl,jh].
 */
-float Histo2D::VMin(int il,int ih,int jl,int jh) const
-{
-if( il > ih ) { il = 0; ih = nx-1; }
-if( jl > jh ) { jl = 0; jh = ny-1; }
+r_8 Histo2D::VMin(int_4 il,int_4 ih,int_4 jl,int_4 jh) const
+{
+if( il > ih ) { il = 0; ih = mNx-1; }
+if( jl > jh ) { jl = 0; jh = mNy-1; }
 if( il < 0 ) il = 0;
 if( jl < 0 ) jl = 0;
-if( ih >= nx ) ih = nx-1;
-if( jh >= ny ) jh = ny-1;
-
-float mx=(*this)(il,jl);
-if(nxy==1) return mx;
-for (int i=il; i<=ih; i++)
-   for (int j=jl; j<=jh; j++)
+if( ih >= mNx ) ih = mNx-1;
+if( jh >= mNy ) jh = mNy-1;
+
+r_8 mx=(*this)(il,jl);
+if(mNxy==1) return mx;
+for (int_4 i=il; i<=ih; i++)
+   for (int_4 j=jl; j<=jh; j++)
       if ((*this)(i,j)<mx) mx=(*this)(i,j);
 return mx;
@@ -769,5 +782,5 @@
   Renvoie les under.overflow dans les 8 quadrants.
   \verbatim
-     over[3][3]:        20 | 21 | 22
+     mOver[3][3]:       20 | 21 | 22
                            |    |
                        --------------
@@ -780,8 +793,8 @@
   \endverbatim
 */
-float Histo2D::NOver(int i,int j) const
-{
-if( i < 0 || i>=3 || j < 0 || j>=3 ) return over[1][1];
-return over[i][j];
+r_8 Histo2D::NOver(int_4 i,int_4 j) const
+{
+if( i < 0 || i>=3 || j < 0 || j>=3 ) return mOver[1][1];
+return mOver[i][j];
 }
 
@@ -791,8 +804,8 @@
   Retourne le nombre de bins non-nuls.
 */
-int Histo2D::BinNonNul() const
-{
-int non=0;
-for (int i=0;i<nxy;i++) if( data[i] != 0. ) non++;
+int_4 Histo2D::BinNonNul() const
+{
+int_4 non=0;
+for (int_4 i=0;i<mNxy;i++) if( mData[i] != 0. ) non++;
 return non;
 }
@@ -801,9 +814,9 @@
   Retourne le nombre de bins avec erreurs non-nulles.
 */
-int Histo2D::ErrNonNul() const
-{
-if(err2==NULL) return -1;
-int non=0;
-for (int i=0;i<nxy;i++) if( err2[i] != 0. ) non++;
+int_4 Histo2D::ErrNonNul() const
+{
+if(mErr2==NULL) return -1;
+int_4 non=0;
+for (int_4 i=0;i<mNxy;i++) if( mErr2[i] != 0. ) non++;
 return non;
 }
@@ -813,8 +826,8 @@
   Idem EstimeMax(int...) mais retourne x,y.
 */
-int Histo2D::EstimeMax(float& xm,float& ym,int SzPav
-                      ,int il,int ih,int jl,int jh)
-{
-int im,jm;
+int_4 Histo2D::EstimeMax(r_8& xm,r_8& ym,int_4 SzPav
+                      ,int_4 il,int_4 ih,int_4 jl,int_4 jh)
+{
+int_4 im,jm;
 IJMax(im,jm,il,ih,jl,jh);
 return EstimeMax(im,jm,xm,ym,SzPav);
@@ -833,21 +846,21 @@
   \endverbatim
 */
-int Histo2D::EstimeMax(int im,int jm,float& xm,float& ym,int SzPav)
+int_4 Histo2D::EstimeMax(int_4 im,int_4 jm,r_8& xm,r_8& ym,int_4 SzPav)
 {
 xm = ym = 0;
 if( SzPav <= 0 ) return -1;
-if( im < 0 || im >= nx ) return -1;
-if( jm < 0 || jm >= ny ) return -1;
+if( im < 0 || im >= mNx ) return -1;
+if( jm < 0 || jm >= mNy ) return -1;
 
 if( SzPav%2 == 0 ) SzPav++;
 SzPav = (SzPav-1)/2;
 
-int rc = 0;
-double dxm = 0, dym = 0, wx = 0;
-for(int i=im-SzPav;i<=im+SzPav;i++) {
-  if( i<0 || i>= nx ) {rc=1; continue;}
-  for(int j=jm-SzPav;j<=jm+SzPav;j++) {
-    if( j<0 || j>= ny ) {rc=1; continue;}
-    float x,y;
+int_4 rc = 0;
+r_8 dxm = 0, dym = 0, wx = 0;
+for(int_4 i=im-SzPav;i<=im+SzPav;i++) {
+  if( i<0 || i>= mNx ) {rc=1; continue;}
+  for(int_4 j=jm-SzPav;j<=jm+SzPav;j++) {
+    if( j<0 || j>= mNy ) {rc=1; continue;}
+    r_8 x,y;
     BinCenter(i,j,x,y);
     dxm += x * (*this)(i,j);
@@ -888,31 +901,31 @@
   \endverbatim
 */
-int Histo2D::FindMax(int& im,int& jm,int SzPav,float Dz
-                    ,int il,int ih,int jl,int jh)
-{
-if( il > ih ) { il = 0; ih = nx-1; }
-if( jl > jh ) { jl = 0; jh = ny-1; }
+int_4 Histo2D::FindMax(int_4& im,int_4& jm,int_4 SzPav,r_8 Dz
+                    ,int_4 il,int_4 ih,int_4 jl,int_4 jh)
+{
+if( il > ih ) { il = 0; ih = mNx-1; }
+if( jl > jh ) { jl = 0; jh = mNy-1; }
 if( il < 0 ) il = 0;
 if( jl < 0 ) jl = 0;
-if( ih >= nx ) ih = nx-1;
-if( jh >= ny ) jh = ny-1;
+if( ih >= mNx ) ih = mNx-1;
+if( jh >= mNy ) jh = mNy-1;
 if( SzPav < 0 ) SzPav = 0;
   else { if( SzPav%2 == 0 ) SzPav++; SzPav = (SzPav-1)/2;}
 if( Dz < 0 ) Dz = 0.;
-float max = VMax(il,ih,jl,jh) - Dz;
-int nmax = 0;
-float sumx = -MAXFLOAT;
-for(int i=il;i<=ih;i++) for(int j=jl;j<=jh;j++) {
+r_8 max = VMax(il,ih,jl,jh) - Dz;
+int_4 nmax = 0;
+r_8 sumx = -1.e20;
+for(int_4 i=il;i<=ih;i++) for(int_4 j=jl;j<=jh;j++) {
   if( (*this)(i,j) < max) continue;
   nmax++;
-  float sum = 0.;
-  for(int ii=i-SzPav;ii<=i+SzPav;ii++) {
-    if( ii<0 || ii >= nx ) continue;
-    for(int jj=j-SzPav;jj<=j+SzPav;jj++) {
-      if( jj<0 || jj >= ny ) continue;
+  r_8 sum = 0.;
+  for(int_4 ii=i-SzPav;ii<=i+SzPav;ii++) {
+    if( ii<0 || ii >= mNx ) continue;
+    for(int_4 jj=j-SzPav;jj<=j+SzPav;jj++) {
+      if( jj<0 || jj >= mNy ) continue;
       sum += (*this)(ii,jj);
     }
   }
-  if( sum > sumx ) { im = i; jm = j; sumx = sum;}
+  if(nmax==1 || sum>sumx) {im=i; jm=j; sumx=sum;}
 }
 if( nmax <= 0 ) { IJMax(im,jm,il,ih,jl,jh); return 1;}
@@ -943,5 +956,5 @@
   \endverbatim
 */
-int  Histo2D::Fit(GeneralFit& gfit,unsigned short typ_err)
+int_4  Histo2D::Fit(GeneralFit& gfit,unsigned short typ_err)
 {
 if(NBinX()*NBinY()<=0) return -1000;
@@ -950,10 +963,10 @@
 GeneralFitData mydata(2,NBinX()*NBinY());
 
-for(int i=0;i<NBinX();i++) for(int j=0;j<NBinY();j++) {
-  float x,y;
+for(int_4 i=0;i<NBinX();i++) for(int_4 j=0;j<NBinY();j++) {
+  r_8 x,y;
   BinCenter(i,j,x,y);
-  double f = (double) (*this)(i,j);
-  double saf = sqrt(fabs(f)); if(saf<1.) saf=1.;
-  double e=0.;
+  r_8 f = (*this)(i,j);
+  r_8 saf = sqrt(fabs(f)); if(saf<1.) saf=1.;
+  r_8 e=0.;
   if(typ_err==0)      {if(HasErrors()) e=Error(i,j); else e=1.;}
   else if(typ_err==1) {if(HasErrors()) e=Error(i,j); else e=saf;}
@@ -962,5 +975,5 @@
   else if(typ_err==4) e=(f==0.)?0.:1.;
   else if(typ_err==5) e=(f==0.)?0.:saf;
-  mydata.AddData2((double) x,(double) y,f,e);
+  mydata.AddData2(x,y,f,e);
 }
 
@@ -982,9 +995,9 @@
 TVector<r_8> par = gfit.GetParm();
 Histo2D h2(*this);
-for(int i=0;i<NBinX();i++) for(int j=0;j<NBinY();j++) {
-  float xc,yc;
+for(int_4 i=0;i<NBinX();i++) for(int_4 j=0;j<NBinY();j++) {
+  r_8 xc,yc;
   BinCenter(i,j,xc,yc);
-  double x[2] = {(double)xc,(double)yc};
-  h2(i,j) -= (float) f->Value(x,par.Data());
+  r_8 x[2] = {xc,yc};
+  h2(i,j) -= f->Value(x,par.Data());
 }
 return h2;
@@ -1003,9 +1016,9 @@
 TVector<r_8> par = gfit.GetParm();
 Histo2D h2(*this);
-for(int i=0;i<NBinX();i++) for(int j=0;j<NBinY();j++) {
-  float xc,yc;
+for(int_4 i=0;i<NBinX();i++) for(int_4 j=0;j<NBinY();j++) {
+  r_8 xc,yc;
   BinCenter(i,j,xc,yc);
-  double x[2] = {(double)xc,(double)yc};
-  h2(i,j) = (float) f->Value(x,par.Data());
+  r_8 x[2] = {xc,yc};
+  h2(i,j) = f->Value(x,par.Data());
 }
 return h2;
@@ -1020,10 +1033,10 @@
 printf("~Histo::Print    nHist=%g nEntries=%d",nHist,nEntries);
 if(HasErrors()) printf("  Errors=1\n"); else printf("  Errors=0\n");
-printf("over: [ %g %g %g // %g %g %g  // %g %g %g ]\n"
-      ,over[2][0],over[2][1],over[2][2]
-      ,over[1][0],over[1][1],over[1][2]
-      ,over[0][0],over[0][1],over[0][2]);
-printf("  nx=%d xmin=%g xmax=%g binx=%g  ",nx,xmin,xmax,wbinx);
-printf("  ny=%d ymin=%g ymax=%g biny=%g\n",ny,ymin,ymax,wbiny);
+printf("mOver: [ %g %g %g // %g %g %g  // %g %g %g ]\n"
+      ,mOver[2][0],mOver[2][1],mOver[2][2]
+      ,mOver[1][0],mOver[1][1],mOver[1][2]
+      ,mOver[0][0],mOver[0][1],mOver[0][2]);
+printf("  nx=%d xmin=%g xmax=%g binx=%g  ",mNx,mXmin,mXmax,mWBinx);
+printf("  ny=%d ymin=%g ymax=%g biny=%g\n",mNy,mYmin,mYmax,mWBiny);
 }
 
@@ -1038,21 +1051,21 @@
   \endverbatim
 */
-void Histo2D::Print(float min,float max
-                   ,int il,int ih,int jl,int jh)
-{
-int ns = 35;
+void Histo2D::Print(r_8 min,r_8 max
+                   ,int_4 il,int_4 ih,int_4 jl,int_4 jh)
+{
+int_4 ns = 35;
 const char *s =    "+23456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 
-if( il > ih ) { il = 0; ih = nx-1; }
-if( jl > jh ) { jl = 0; jh = ny-1; }
+if( il > ih ) { il = 0; ih = mNx-1; }
+if( jl > jh ) { jl = 0; jh = mNy-1; }
 if( il < 0 ) il = 0;
 if( jl < 0 ) jl = 0;
-if( ih >= nx ) ih = nx-1;
-if( jh >= ny ) jh = ny-1;
+if( ih >= mNx ) ih = mNx-1;
+if( jh >= mNy ) jh = mNy-1;
 
 PrintStatus();
 
-if( il != 0 || ih != nx-1 || jl != 0 || jh != ny-1 ) {
-  float xl,xh,yl,yh;
+if( il != 0 || ih != mNx-1 || jl != 0 || jh != mNy-1 ) {
+  r_8 xl,xh,yl,yh;
   BinLowEdge(il,jl,xl,yl);
   BinHighEdge(ih,jh,xh,yh);
@@ -1072,26 +1085,26 @@
 // imprime numero de bin en colonne
 printf("\n");
-if( nx-1 >= 100 ) {
+if( mNx-1 >= 100 ) {
   printf("     ");
-  for(int i=il;i<=ih;i++) printf("%1d",(int) (i%1000)/100);
+  for(int_4 i=il;i<=ih;i++) printf("%1d",(int_4) (i%1000)/100);
   printf("\n");
 }
-if( nx-1 >= 10 ) {
+if( mNx-1 >= 10 ) {
   printf("     ");
-  for(int i=il;i<=ih;i++) printf("%1d",(int) (i%100)/10);
+  for(int_4 i=il;i<=ih;i++) printf("%1d",(int_4) (i%100)/10);
   printf("\n");
 }
 printf("     ");
-for(int i=il;i<=ih;i++) printf("%1d",i%10);
+for(int_4 i=il;i<=ih;i++) printf("%1d",i%10);
 printf("\n");
-printf("     "); {for(int i=il;i<=ih;i++) printf("-"); printf("\n");}
+printf("     "); {for(int_4 i=il;i<=ih;i++) printf("-"); printf("\n");}
 
 // imprime histogramme
-for(int j=jh;j>=jl;j--) {
+for(int_4 j=jh;j>=jl;j--) {
   printf("%3d: ",j);
-  for(int i=il;i<=ih;i++) {
-    int h;
-    if( 1<=max-min && max-min<=35 ) h = (int)( (*this)(i,j) - min ) - 1;
-      else h = (int)( ((*this)(i,j)-min)/(max-min) * ns ) - 1;
+  for(int_4 i=il;i<=ih;i++) {
+    int_4 h;
+    if( 1<=max-min && max-min<=35 ) h = (int_4)( (*this)(i,j) - min ) - 1;
+      else h = (int_4)( ((*this)(i,j)-min)/(max-min) * ns ) - 1;
     char c;
     if(h<0 && (*this)(i,j)>min) c = '.';
@@ -1105,17 +1118,17 @@
 
 // imprime numero de bin en colonne
-printf("     "); {for(int i=il;i<=ih;i++) printf("-"); printf("\n");}
-if( nx-1 >= 100 ) {
+printf("     "); {for(int_4 i=il;i<=ih;i++) printf("-"); printf("\n");}
+if( mNx-1 >= 100 ) {
   printf("     ");
-  for(int i=il;i<=ih;i++) printf("%1d",(int) (i%1000)/100);
+  for(int_4 i=il;i<=ih;i++) printf("%1d",(int_4) (i%1000)/100);
   printf("\n");
 }
-if( nx-1 >= 10 ) {
+if( mNx-1 >= 10 ) {
   printf("     ");
-  for(int i=il;i<=ih;i++) printf("%1d",(int) (i%100)/10);
+  for(int_4 i=il;i<=ih;i++) printf("%1d",(int_4) (i%100)/10);
   printf("\n");
 }
 printf("     ");
-{for(int i=il;i<=ih;i++) printf("%1d",i%10);}
+{for(int_4 i=il;i<=ih;i++) printf("%1d",i%10);}
 printf("\n");
 
@@ -1130,7 +1143,7 @@
 void Histo2D::SetProjX()
 {
-if( hprojx != NULL ) DelProjX();
-hprojx = new Histo(xmin,xmax,nx);
-if( err2 != NULL && hprojx != NULL ) hprojx->Errors();
+if( mHprojx != NULL ) DelProjX();
+mHprojx = new Histo(mXmin,mXmax,mNx);
+if( mErr2 != NULL && mHprojx != NULL ) mHprojx->Errors();
 }
 
@@ -1140,7 +1153,7 @@
 void Histo2D::SetProjY()
 {
-if( hprojy != NULL ) DelProjY();
-hprojy = new Histo(ymin,ymax,ny);
-if( err2 != NULL && hprojy != NULL  ) hprojy->Errors();
+if( mHprojy != NULL ) DelProjY();
+mHprojy = new Histo(mYmin,mYmax,mNy);
+if( mErr2 != NULL && mHprojy != NULL  ) mHprojy->Errors();
 }
 
@@ -1159,7 +1172,7 @@
 void Histo2D::ShowProj()
 {
-if( hprojx != NULL ) cout << ">>>> Projection X set : "<< hprojx <<endl;
+if( mHprojx != NULL ) cout << ">>>> Projection X set : "<< mHprojx <<endl;
   else cout << ">>>> NO Projection X set"<<endl;
-if( hprojy != NULL ) cout << ">>>> Projection Y set : "<< hprojy <<endl;
+if( mHprojy != NULL ) cout << ">>>> Projection Y set : "<< mHprojy <<endl;
   else cout << ">>>> NO Projection Y set"<<endl;
 }
@@ -1170,7 +1183,7 @@
 void Histo2D::DelProjX()
 {
-if( hprojx == NULL ) return;
-delete hprojx;
-hprojx = NULL;
+if( mHprojx == NULL ) return;
+delete mHprojx;
+mHprojx = NULL;
 }
 
@@ -1180,7 +1193,7 @@
 void Histo2D::DelProjY()
 {
-if( hprojy == NULL ) return;
-delete hprojy;
-hprojy = NULL;
+if( mHprojy == NULL ) return;
+delete mHprojy;
+mHprojy = NULL;
 }
 
@@ -1199,6 +1212,6 @@
 void Histo2D::ZeroProjX()
 {
-if( hprojx == NULL ) return;
-hprojx->Zero();
+if( mHprojx == NULL ) return;
+mHprojx->Zero();
 }
 
@@ -1208,6 +1221,6 @@
 void Histo2D::ZeroProjY()
 {
-if( hprojy == NULL ) return;
-hprojy->Zero();
+if( mHprojy == NULL ) return;
+mHprojy->Zero();
 }
 
@@ -1227,13 +1240,13 @@
   Pour creer une bande en X entre ybmin et ybmax.
 */
-int Histo2D::SetBandX(float ybmin,float ybmax)
-{
-b_s.num = lbandx.size();
-b_s.min = ybmin;
-b_s.max = ybmax;
-b_s.H = new Histo(xmin,xmax,nx);
-lbandx.push_back(b_s);
-b_s.H = NULL;
-return lbandx.size()-1;
+int_4 Histo2D::SetBandX(r_8 ybmin,r_8 ybmax)
+{
+mB_s.num = mLBandx.size();
+mB_s.min = ybmin;
+mB_s.max = ybmax;
+mB_s.H = new Histo(mXmin,mXmax,mNx);
+mLBandx.push_back(mB_s);
+mB_s.H = NULL;
+return mLBandx.size()-1;
 }
 
@@ -1241,13 +1254,13 @@
   Pour creer une bande en Y entre xbmin et xbmax.
 */
-int Histo2D::SetBandY(float xbmin,float xbmax)
-{
-b_s.num = lbandy.size();
-b_s.min = xbmin;
-b_s.max = xbmax;
-b_s.H = new Histo(ymin,ymax,ny);
-lbandy.push_back(b_s);
-b_s.H = NULL;
-return lbandy.size()-1;
+int_4 Histo2D::SetBandY(r_8 xbmin,r_8 xbmax)
+{
+mB_s.num = mLBandy.size();
+mB_s.min = xbmin;
+mB_s.max = xbmax;
+mB_s.H = new Histo(mYmin,mYmax,mNy);
+mLBandy.push_back(mB_s);
+mB_s.H = NULL;
+return mLBandy.size()-1;
 }
 
@@ -1257,8 +1270,8 @@
 void Histo2D::DelBandX()
 {
-if( lbandx.size() <= 0 ) return;
-for(list<bande_slice>::iterator i = lbandx.begin(); i != lbandx.end(); i++)
+if( mLBandx.size() <= 0 ) return;
+for(list<bande_slice>::iterator i = mLBandx.begin(); i != mLBandx.end(); i++)
        if( (*i).H != NULL ) {delete (*i).H; (*i).H=NULL;}
-lbandx.erase(lbandx.begin(),lbandx.end());
+mLBandx.erase(mLBandx.begin(),mLBandx.end());
 }
 
@@ -1268,8 +1281,8 @@
 void Histo2D::DelBandY()
 {
-if( lbandy.size() <= 0 ) return;
-for(list<bande_slice>::iterator i = lbandy.begin(); i != lbandy.end(); i++)
+if( mLBandy.size() <= 0 ) return;
+for(list<bande_slice>::iterator i = mLBandy.begin(); i != mLBandy.end(); i++)
        if( (*i).H != NULL ) {delete (*i).H; (*i).H=NULL;}
-lbandy.erase(lbandy.begin(),lbandy.end());
+mLBandy.erase(mLBandy.begin(),mLBandy.end());
 }
 
@@ -1279,7 +1292,7 @@
 void Histo2D::ZeroBandX()
 {
-if( lbandx.size() <= 0 ) return;
+if( mLBandx.size() <= 0 ) return;
 list<bande_slice>::iterator i;
-for(i = lbandx.begin(); i != lbandx.end(); i++)
+for(i = mLBandx.begin(); i != mLBandx.end(); i++)
               (*i).H->Zero();
 }
@@ -1290,7 +1303,7 @@
 void Histo2D::ZeroBandY()
 {
-if( lbandy.size() <= 0 ) return;
+if( mLBandy.size() <= 0 ) return;
 list<bande_slice>::iterator i;
-for(i = lbandy.begin(); i != lbandy.end(); i++)
+for(i = mLBandy.begin(); i != mLBandy.end(); i++)
               (*i).H->Zero();
 }
@@ -1299,8 +1312,8 @@
   Retourne un pointeur sur la bande numero `n' selon X.
 */
-Histo* Histo2D::HBandX(int n) const
-{
-if( lbandx.size() <= 0 || n < 0 || n >= (int) lbandx.size() ) return NULL;
-for(list<bande_slice>::const_iterator i = lbandx.begin(); i != lbandx.end(); i++)
+Histo* Histo2D::HBandX(int_4 n) const
+{
+if( mLBandx.size() <= 0 || n < 0 || n >= (int_4) mLBandx.size() ) return NULL;
+for(list<bande_slice>::const_iterator i = mLBandx.begin(); i != mLBandx.end(); i++)
               if( (*i).num == n ) return (*i).H;
 return NULL;
@@ -1310,8 +1323,8 @@
   Retourne un pointeur sur la bande numero `n' selon Y.
 */
-Histo* Histo2D::HBandY(int n) const
-{
-if( lbandy.size() <= 0 || n < 0 || n >= (int) lbandy.size() ) return NULL;
-for(list<bande_slice>::const_iterator i = lbandy.begin(); i != lbandy.end(); i++)
+Histo* Histo2D::HBandY(int_4 n) const
+{
+if( mLBandy.size() <= 0 || n < 0 || n >= (int_4) mLBandy.size() ) return NULL;
+for(list<bande_slice>::const_iterator i = mLBandy.begin(); i != mLBandy.end(); i++)
               if( (*i).num == n ) return (*i).H;
 return NULL;
@@ -1321,9 +1334,9 @@
   Retourne les limites de la bande numero `n' selon X.
 */
-void Histo2D::GetBandX(int n,float& ybmin,float& ybmax) const
+void Histo2D::GetBandX(int_4 n,r_8& ybmin,r_8& ybmax) const
 {
 ybmin = 0.; ybmax = 0.;
-if( lbandx.size() <= 0 || n < 0 || n >= (int) lbandx.size() ) return;
-for(list<bande_slice>::const_iterator i = lbandx.begin(); i != lbandx.end(); i++)
+if( mLBandx.size() <= 0 || n < 0 || n >= (int_4) mLBandx.size() ) return;
+for(list<bande_slice>::const_iterator i = mLBandx.begin(); i != mLBandx.end(); i++)
   if( (*i).num == n ) { ybmin = (*i).min; ybmax = (*i).max; return;}
 return;
@@ -1333,9 +1346,9 @@
   Retourne les limites de la bande numero `n' selon Y.
 */
-void Histo2D::GetBandY(int n,float& xbmin,float& xbmax) const
+void Histo2D::GetBandY(int_4 n,r_8& xbmin,r_8& xbmax) const
 {
 xbmin = 0.; xbmax = 0.;
-if( lbandy.size() <= 0 || n < 0 || n >= (int) lbandy.size() ) return;
-for(list<bande_slice>::const_iterator i = lbandy.begin(); i != lbandy.end(); i++)
+if( mLBandy.size() <= 0 || n < 0 || n >= (int_4) mLBandy.size() ) return;
+for(list<bande_slice>::const_iterator i = mLBandy.begin(); i != mLBandy.end(); i++)
   if( (*i).num == n ) { xbmin = (*i).min; xbmax = (*i).max; return;}
 return;
@@ -1345,10 +1358,10 @@
   Informations sur les bandes.
 */
-void Histo2D::ShowBand(int lp)
-{
-  cout << ">>>> Nombre de bande X : " << lbandx.size() << endl;
-if( lp>0 && lbandx.size()>0 ) {
+void Histo2D::ShowBand(int_4 lp)
+{
+  cout << ">>>> Nombre de bande X : " << mLBandx.size() << endl;
+if( lp>0 && mLBandx.size()>0 ) {
   list<bande_slice>::iterator i;
-  for(i = lbandx.begin(); i != lbandx.end(); i++) {
+  for(i = mLBandx.begin(); i != mLBandx.end(); i++) {
     cout<<"  "<<(*i).num<<" de ymin="<<(*i).min<<" a ymax="<<(*i).max;
     if(lp>1) cout << "   H=" << (*i).H;
@@ -1357,8 +1370,8 @@
 }
 
-cout << ">>>> Nombre de bande Y : " << lbandy.size() << endl;
-if( lp>0 && lbandy.size()>0 ) {
+cout << ">>>> Nombre de bande Y : " << mLBandy.size() << endl;
+if( lp>0 && mLBandy.size()>0 ) {
   list<bande_slice>::iterator i;
-  for(i = lbandy.begin(); i != lbandy.end(); i++) {
+  for(i = mLBandy.begin(); i != mLBandy.end(); i++) {
     cout<<"  "<<(*i).num<<" de xmin="<<(*i).min<<" a xmax="<<(*i).max;
     if(lp>1) cout << "   H=" << (*i).H;
@@ -1374,20 +1387,20 @@
   Pour creer `nsli' bandes equidistantes selon X.
 */
-int Histo2D::SetSliX(int nsli)
+int_4 Histo2D::SetSliX(int_4 nsli)
 {
 if( nsli <= 0 ) return -1;
-if( nsli >  ny ) nsli = ny;
-if( lslix.size() > 0 ) DelSliX();
-float w = (ymax-ymin)/nsli;
-
-for(int i=0; i<nsli; i++ ) {
-  b_s.num = i;
-  b_s.min = ymin + i*w;
-  b_s.max = b_s.min + w;
-  b_s.H = new Histo(xmin,xmax,nx);
-  lslix.push_back(b_s);
-  b_s.H = NULL;
-}
-return (int) lslix.size();
+if( nsli >  mNy ) nsli = mNy;
+if( mLSlix.size() > 0 ) DelSliX();
+r_8 w = (mYmax-mYmin)/nsli;
+
+for(int_4 i=0; i<nsli; i++ ) {
+  mB_s.num = i;
+  mB_s.min = mYmin + i*w;
+  mB_s.max = mB_s.min + w;
+  mB_s.H = new Histo(mXmin,mXmax,mNx);
+  mLSlix.push_back(mB_s);
+  mB_s.H = NULL;
+}
+return (int_4) mLSlix.size();
 }
 
@@ -1395,20 +1408,20 @@
   Pour creer `nsli' bandes equidistantes selon Y.
 */
-int Histo2D::SetSliY(int nsli)
+int_4 Histo2D::SetSliY(int_4 nsli)
 {
 if( nsli <= 0 ) return -1;
-if( nsli >  nx ) nsli = nx;
-if( lsliy.size() > 0 ) DelSliY();
-float w = (xmax-xmin)/nsli;
-
-for(int i=0; i<nsli; i++ ) {
-  b_s.num = i;
-  b_s.min = xmin + i*w;
-  b_s.max = b_s.min + w;
-  b_s.H = new Histo(ymin,ymax,ny);
-  lsliy.push_back(b_s);
-  b_s.H = NULL;
-}
-return (int) lsliy.size();
+if( nsli >  mNx ) nsli = mNx;
+if( mLSliy.size() > 0 ) DelSliY();
+r_8 w = (mXmax-mXmin)/nsli;
+
+for(int_4 i=0; i<nsli; i++ ) {
+  mB_s.num = i;
+  mB_s.min = mXmin + i*w;
+  mB_s.max = mB_s.min + w;
+  mB_s.H = new Histo(mYmin,mYmax,mNy);
+  mLSliy.push_back(mB_s);
+  mB_s.H = NULL;
+}
+return (int_4) mLSliy.size();
 }
 
@@ -1418,8 +1431,8 @@
 void Histo2D::DelSliX()
 {
-if( lslix.size() <= 0 ) return;
-for(list<bande_slice>::iterator i = lslix.begin(); i != lslix.end(); i++)
+if( mLSlix.size() <= 0 ) return;
+for(list<bande_slice>::iterator i = mLSlix.begin(); i != mLSlix.end(); i++)
        if( (*i).H != NULL ) {delete (*i).H; (*i).H=NULL;}
-lslix.erase(lslix.begin(),lslix.end());
+mLSlix.erase(mLSlix.begin(),mLSlix.end());
 }
 
@@ -1429,8 +1442,8 @@
 void Histo2D::DelSliY()
 {
-if( lsliy.size() <= 0 ) return;
-for(list<bande_slice>::iterator i = lsliy.begin(); i != lsliy.end(); i++)
+if( mLSliy.size() <= 0 ) return;
+for(list<bande_slice>::iterator i = mLSliy.begin(); i != mLSliy.end(); i++)
        if( (*i).H != NULL ) {delete (*i).H; (*i).H=NULL;}
-lsliy.erase(lsliy.begin(),lsliy.end());
+mLSliy.erase(mLSliy.begin(),mLSliy.end());
 }
 
@@ -1440,7 +1453,7 @@
 void Histo2D::ZeroSliX()
 {
-if( lslix.size() <= 0 ) return;
+if( mLSlix.size() <= 0 ) return;
 list<bande_slice>::iterator i;
-for(i = lslix.begin(); i != lslix.end(); i++)
+for(i = mLSlix.begin(); i != mLSlix.end(); i++)
               (*i).H->Zero();
 }
@@ -1451,7 +1464,7 @@
 void Histo2D::ZeroSliY()
 {
-if( lsliy.size() <= 0 ) return;
+if( mLSliy.size() <= 0 ) return;
 list<bande_slice>::iterator i;
-for(i = lsliy.begin(); i != lsliy.end(); i++)
+for(i = mLSliy.begin(); i != mLSliy.end(); i++)
               (*i).H->Zero();
 }
@@ -1461,8 +1474,8 @@
   selon X.
 */
-Histo* Histo2D::HSliX(int n) const
-{
-if( lslix.size() <= 0 || n < 0 || n >= (int) lslix.size() ) return NULL;
-for(list<bande_slice>::const_iterator i = lslix.begin(); i != lslix.end(); i++)
+Histo* Histo2D::HSliX(int_4 n) const
+{
+if( mLSlix.size() <= 0 || n < 0 || n >= (int_4) mLSlix.size() ) return NULL;
+for(list<bande_slice>::const_iterator i = mLSlix.begin(); i != mLSlix.end(); i++)
               if( (*i).num == n ) return (*i).H;
 return NULL;
@@ -1473,8 +1486,8 @@
   selon Y.
 */
-Histo* Histo2D::HSliY(int n) const
-{
-if( lsliy.size() <= 0 || n < 0 || n >= (int) lsliy.size() ) return NULL;
-for(list<bande_slice>::const_iterator i = lsliy.begin(); i != lsliy.end(); i++)
+Histo* Histo2D::HSliY(int_4 n) const
+{
+if( mLSliy.size() <= 0 || n < 0 || n >= (int_4) mLSliy.size() ) return NULL;
+for(list<bande_slice>::const_iterator i = mLSliy.begin(); i != mLSliy.end(); i++)
               if( (*i).num == n ) return (*i).H;
 return NULL;
@@ -1484,10 +1497,10 @@
   Informations sur les bandes equidistantes.
 */
-void Histo2D::ShowSli(int lp)
+void Histo2D::ShowSli(int_4 lp)
 {
 list<bande_slice>::iterator i;
-cout << ">>>> Nombre de slice X : " << lslix.size() << endl;
-if( lp>0 && lslix.size() > 0 )
-  for(i = lslix.begin(); i != lslix.end(); i++) {
+cout << ">>>> Nombre de slice X : " << mLSlix.size() << endl;
+if( lp>0 && mLSlix.size() > 0 )
+  for(i = mLSlix.begin(); i != mLSlix.end(); i++) {
     cout<<"  "<<(*i).num<<" de ymin="<<(*i).min<<" a ymax="<<(*i).max;
     if(lp>1) cout << "   H=" << (*i).H;
@@ -1495,7 +1508,7 @@
   }
 
-cout << ">>>> Nombre de slice Y : " << lsliy.size() << endl;
-if( lp>0 && lsliy.size()>0 )
-  for(i = lsliy.begin(); i != lsliy.end(); i++) {
+cout << ">>>> Nombre de slice Y : " << mLSliy.size() << endl;
+if( lp>0 && mLSliy.size()>0 )
+  for(i = mLSliy.begin(); i != mLSliy.end(); i++) {
     cout<<"  "<<(*i).num<<" de xmin="<<(*i).min<<" a xmax="<<(*i).max;
     if(lp>1) cout << "   H=" << (*i).H;
@@ -1518,5 +1531,5 @@
   else         dobj->Delete();
 
-float min,max;
+r_8 min,max;
 int_4 errok, projx, projy, nslix, nsliy, nbanx, nbany;
 
@@ -1530,19 +1543,19 @@
 
 // Lecture variables de definitions
-is.Get(dobj->nx);
-is.Get(dobj->ny);
-is.Get(dobj->nxy);
+is.Get(dobj->mNx);
+is.Get(dobj->mNy);
+is.Get(dobj->mNxy);
 is.Get(errok);
 is.Get(dobj->nEntries);
 is.Get(dobj->nHist);
 
-is.Get(dobj->xmin);
-is.Get(dobj->xmax);
-is.Get(dobj->ymin);
-is.Get(dobj->ymax);
-is.Get(dobj->wbinx);
-is.Get(dobj->wbiny);
-
-is.Get(&(dobj->over[0][0]),9);
+is.Get(dobj->mXmin);
+is.Get(dobj->mXmax);
+is.Get(dobj->mYmin);
+is.Get(dobj->mYmax);
+is.Get(dobj->mWBinx);
+is.Get(dobj->mWBiny);
+
+is.Get(&(dobj->mOver[0][0]),9);
 
 is.Get(projx);
@@ -1554,13 +1567,13 @@
 
 // Lecture histo2D
-dobj->data = new float[dobj->nxy];
+dobj->mData = new r_8[dobj->mNxy];
 is.GetLine(strg, 255);
-{for(int j=0;j<dobj->ny;j++) is.Get(dobj->data+j*dobj->nx,dobj->nx);}
+{for(int_4 j=0;j<dobj->mNy;j++) is.Get(dobj->mData+j*dobj->mNx,dobj->mNx);}
 
 // Lecture erreurs
 if(errok) {
   is.GetLine(strg, 255);
-  dobj->err2 = new double[dobj->nxy];
-  for(int j=0;j<dobj->ny;j++) is.Get(dobj->err2+j*dobj->nx,dobj->nx);
+  dobj->mErr2 = new r_8[dobj->mNxy];
+  for(int_4 j=0;j<dobj->mNy;j++) is.Get(dobj->mErr2+j*dobj->mNx,dobj->mNx);
 }
 
@@ -1569,5 +1582,5 @@
   is.GetLine(strg, 255);
   dobj->SetProjX();
-  ObjFileIO<Histo> fio_h(dobj->hprojx);
+  ObjFileIO<Histo> fio_h(dobj->mHprojx);
   fio_h.Read(is);
 }
@@ -1575,5 +1588,5 @@
   is.GetLine(strg, 255);
   dobj->SetProjY();
-  ObjFileIO<Histo> fio_h(dobj->hprojy);
+  ObjFileIO<Histo> fio_h(dobj->mHprojy);
   fio_h.Read(is);
 }
@@ -1584,5 +1597,5 @@
   dobj->SetSliX(nslix);
   ASSERT (nslix==dobj->NSliX());
-  for(int j=0;j<dobj->NSliX();j++)
+  for(int_4 j=0;j<dobj->NSliX();j++)
     {ObjFileIO<Histo> fio_h(dobj->HSliX(j)); fio_h.Read(is);}
 }
@@ -1591,5 +1604,5 @@
   dobj->SetSliY(nsliy);
   ASSERT (nsliy==dobj->NSliY());
-  for(int j=0;j<dobj->NSliY();j++)
+  for(int_4 j=0;j<dobj->NSliY();j++)
     {ObjFileIO<Histo> fio_h(dobj->HSliY(j)); fio_h.Read(is);}
 }
@@ -1598,10 +1611,10 @@
 if( nbanx>0 ) {
   is.GetLine(strg, 255);
-  {for(int j=0; j<nbanx; j++) {
+  {for(int_4 j=0; j<nbanx; j++) {
     is.Get(min); is.Get(max);
     dobj->SetBandX(min,max);
   }}
   ASSERT (nbanx==dobj->NBandX());
-  {for(int j=0; j<dobj->NBandX(); j++) {
+  {for(int_4 j=0; j<dobj->NBandX(); j++) {
     ObjFileIO<Histo> fio_h(dobj->HBandX(j));
     fio_h.Read(is);
@@ -1610,10 +1623,10 @@
 if( nbany>0 ) {
   is.GetLine(strg, 255);
-  {for(int j=0; j<nbany; j++) {
+  {for(int_4 j=0; j<nbany; j++) {
     is.Get(min); is.Get(max);
     dobj->SetBandY(min,max);
   }}
   ASSERT (nbany==dobj->NBandY());
-  {for(int j=0; j<dobj->NBandY(); j++) {
+  {for(int_4 j=0; j<dobj->NBandY(); j++) {
     ObjFileIO<Histo> fio_h(dobj->HBandY(j));
     fio_h.Read(is);
@@ -1630,7 +1643,7 @@
 
 // Que faut-il ecrire?
-int_4 errok = (dobj->err2) ? 1 : 0;
-int_4 projx = (dobj->hprojx) ? 1 : 0;
-int_4 projy = (dobj->hprojy) ? 1 : 0;
+int_4 errok = (dobj->mErr2) ? 1 : 0;
+int_4 projx = (dobj->mHprojx) ? 1 : 0;
+int_4 projy = (dobj->mHprojy) ? 1 : 0;
 int_4 nslix = dobj->NSliX();
 int_4 nsliy = dobj->NSliY();
@@ -1640,38 +1653,38 @@
 // Ecriture entete pour identifier facilement
 sprintf(strg,"nx=%d  ny=%d  nxy=%d errok=%1d"
-       ,dobj->nx,dobj->ny,dobj->nxy,errok);
+       ,dobj->mNx,dobj->mNy,dobj->mNxy,errok);
 os.PutLine(strg);
 sprintf(strg,"nHist=%g nEntries=%d",dobj->nHist,dobj->nEntries);
 os.PutLine(strg);
-sprintf(strg,"wbinx=%g wbiny=%g",dobj->wbinx,dobj->wbiny);
+sprintf(strg,"wbinx=%g wbiny=%g",dobj->mWBinx,dobj->mWBiny);
 os.PutLine(strg);
 sprintf(strg,"xmin=%g xmax=%g ymin=%g ymax=%g"
-       ,dobj->xmin,dobj->xmax,dobj->ymin,dobj->ymax);
+       ,dobj->mXmin,dobj->mXmax,dobj->mYmin,dobj->mYmax);
 os.PutLine(strg);
 sprintf(strg,"projx/y=%d %d nbandx/y=%d %d nbslix/y=%d %d"
        ,projx,projy,nbanx,nbany,nslix,nsliy);
 os.PutLine(strg);
-sprintf(strg,"over %g %g %g %g %g %g %g %g %g"
-       ,dobj->over[0][0],dobj->over[0][1],dobj->over[0][2]
-       ,dobj->over[1][0],dobj->over[1][1],dobj->over[1][2]
-       ,dobj->over[2][0],dobj->over[2][1],dobj->over[2][2]);
+sprintf(strg,"mOver %g %g %g %g %g %g %g %g %g"
+       ,dobj->mOver[0][0],dobj->mOver[0][1],dobj->mOver[0][2]
+       ,dobj->mOver[1][0],dobj->mOver[1][1],dobj->mOver[1][2]
+       ,dobj->mOver[2][0],dobj->mOver[2][1],dobj->mOver[2][2]);
 os.PutLine(strg);
 
 // Ecriture variables de definitions
-os.Put(dobj->nx);
-os.Put(dobj->ny);
-os.Put(dobj->nxy);
+os.Put(dobj->mNx);
+os.Put(dobj->mNy);
+os.Put(dobj->mNxy);
 os.Put(errok);
 os.Put(dobj->nEntries);
 os.Put(dobj->nHist);
 
-os.Put(dobj->xmin);
-os.Put(dobj->xmax);
-os.Put(dobj->ymin);
-os.Put(dobj->ymax);
-os.Put(dobj->wbinx);
-os.Put(dobj->wbiny);
-
-os.Put(&(dobj->over[0][0]),9);
+os.Put(dobj->mXmin);
+os.Put(dobj->mXmax);
+os.Put(dobj->mYmin);
+os.Put(dobj->mYmax);
+os.Put(dobj->mWBinx);
+os.Put(dobj->mWBiny);
+
+os.Put(&(dobj->mOver[0][0]),9);
 
 os.Put(projx);
@@ -1684,14 +1697,14 @@
 // Ecriture histo2D
 sprintf(strg,"Histo2D: Tableau des donnees %d = %d * %d"
-       ,dobj->nxy,dobj->nx,dobj->ny);
+       ,dobj->mNxy,dobj->mNx,dobj->mNy);
 os.PutLine(strg);
-{for(int j=0;j<dobj->ny;j++) os.Put(dobj->data+j*dobj->nx,dobj->nx);}
+{for(int_4 j=0;j<dobj->mNy;j++) os.Put(dobj->mData+j*dobj->mNx,dobj->mNx);}
 
 // Ecriture erreurs
 if(errok) {
   sprintf(strg,"Histo2D: Tableau des erreurs %d = %d * %d"
-         ,dobj->nxy,dobj->nx,dobj->ny);
+         ,dobj->mNxy,dobj->mNx,dobj->mNy);
   os.PutLine(strg);
-  for(int j=0;j<dobj->ny;j++) os.Put(dobj->err2+j*dobj->nx,dobj->nx);
+  for(int_4 j=0;j<dobj->mNy;j++) os.Put(dobj->mErr2+j*dobj->mNx,dobj->mNx);
 }
 
@@ -1700,10 +1713,10 @@
   sprintf(strg,"Histo2D: Projection X");
   os.PutLine(strg);
-  ObjFileIO<Histo> fio_h(dobj->hprojx); fio_h.Write(os);
+  ObjFileIO<Histo> fio_h(dobj->mHprojx); fio_h.Write(os);
 }
 if(projy) {
   sprintf(strg,"Histo2D: Projection Y");
   os.PutLine(strg);
-  ObjFileIO<Histo> fio_h(dobj->hprojy); fio_h.Write(os);
+  ObjFileIO<Histo> fio_h(dobj->mHprojy); fio_h.Write(os);
 }
 
@@ -1712,5 +1725,5 @@
   sprintf(strg,"Histo2D: Slices X %d",nslix);
   os.PutLine(strg);
-  for(int j=0;j<nslix;j++) {
+  for(int_4 j=0;j<nslix;j++) {
     Histo* h = dobj->HSliX(j);
     ObjFileIO<Histo> fio_h(h); fio_h.Write(os);
@@ -1720,5 +1733,5 @@
   sprintf(strg,"Histo2D: Slices Y %d",nsliy);
   os.PutLine(strg);
-  for(int j=0;j<nsliy;j++) {
+  for(int_4 j=0;j<nsliy;j++) {
     Histo* h = dobj->HSliY(j);
     ObjFileIO<Histo> fio_h(h); fio_h.Write(os);
@@ -1731,9 +1744,9 @@
   os.PutLine(strg);
   list<Histo2D::bande_slice>::const_iterator it;
-  for(it = dobj->lbandx.begin(); it != dobj->lbandx.end(); it++) {
-    float min = (*it).min; float max = (*it).max;
+  for(it = dobj->mLBandx.begin(); it != dobj->mLBandx.end(); it++) {
+    r_8 min = (*it).min; r_8 max = (*it).max;
     os.Put(min); os.Put(max);
   }
-  for(it = dobj->lbandx.begin(); it != dobj->lbandx.end(); it++) {
+  for(it = dobj->mLBandx.begin(); it != dobj->mLBandx.end(); it++) {
     Histo* h = (*it).H;
     ObjFileIO<Histo> fio_h(h); fio_h.Write(os);
@@ -1744,9 +1757,9 @@
   os.PutLine(strg);
   list<Histo2D::bande_slice>::const_iterator it;
-  for(it = dobj->lbandy.begin(); it != dobj->lbandy.end(); it++) {
-    float min = (*it).min; float max = (*it).max;
+  for(it = dobj->mLBandy.begin(); it != dobj->mLBandy.end(); it++) {
+    r_8 min = (*it).min; r_8 max = (*it).max;
     os.Put(min); os.Put(max);
   }
-  for(it = dobj->lbandy.begin(); it != dobj->lbandy.end(); it++) {
+  for(it = dobj->mLBandy.begin(); it != dobj->mLBandy.end(); it++) {
     Histo* h = (*it).H;
     ObjFileIO<Histo> fio_h(h); fio_h.Write(os);
