// Author: Stefan Schmitt
// DESY, 10/08/11

//  Version 17.1, in parallel to changes in TUnfold
//
//  History:
//    Version 17.0, initial version, numbered in parallel to TUnfold

//////////////////////////////////////////////////////////////////////////
//
//  TUnfoldBinning
//
//  This class serves as a container of analysis bins
//  analysis bins are specified by defining the axes of a distribution.
//  It is also possible to have unconnected analysis bins without axis.
//  Multiple TUnfoldBinning objects may be arranged in a tree,
//  such that a full tree structure of histograms and bins is supported
//
//  If you use this software, please consider the following citation
//       S.Schmitt, JINST 7 (2012) T10003 [arXiv:1205.6201]
//
//  More documentation and updates are available on
//      http://www.desy.de/~sschmitt
//
//  Functionality
//
//  The class gives access to all analysis bins numbered in sequence.
//  Such a sequence of bins may be stored in a 1-dimension histogram.
//  Correlations between two TUnfoldBinning objects may be stored in
//  a 2-dimensional histogram. This type of ordering is required for
//  the TUnfold class.
//
//  In addition, it is possible to have root histograms, using the
//  axes as defined with the distributions. Underflow/overflow bins
//  can be included or excluded when mapping bins on root histograms.
//  In addition, it is possible to collapse one of more axes when going
//  from a N-dimensional distribution to a root histogram.
//
//////////////////////////////////////////////////////////////////////////

/*
  This file is part of TUnfold.

  TUnfold is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  TUnfold is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with TUnfold.  If not, see <http://www.gnu.org/licenses/>.
*/


#include "TUnfoldBinning.h"
#include <TVectorD.h>
#include <TAxis.h>
#include <TString.h>
#include <iostream>
#include <fstream>
#include <TMath.h>
#include <TF1.h>
#include <TH1D.h>
#include <TH2D.h>
#include <TH3D.h>
#include <TList.h>
#include <TIterator.h>

// #define DEBUG

using namespace std;

ClassImp(TUnfoldBinning)

/********************* setup **************************/

void TUnfoldBinning::Initialize(Int_t nBins)
{
  // initialize variables
   parentNode=0;
   childNode=0;
   nextNode=0;
   prevNode=0;
   fAxisList=new TObjArray();
   fAxisLabelList=new TObjArray();
   fAxisList->SetOwner();
   fAxisLabelList->SetOwner();
   fHasUnderflow=0;
   fHasOverflow=0;
   fDistributionSize=nBins;
   fBinFactorFunction=0;
   fBinFactorConstant=1.0;
}

Int_t TUnfoldBinning::UpdateFirstLastBin(Bool_t startWithRootNode)
{
   // update fFirstBin and fLastBin members of this node and its children
   //   startWithRootNode: if true, start the update with the root node
   if(startWithRootNode) {
      return GetRootNode()->UpdateFirstLastBin(kFALSE);
   }
   if(GetPrevNode()) {
      // if this is not the first node in a sequence,
      // start with the end bin of the previous node
      fFirstBin=GetPrevNode()->GetEndBin();
   } else if(GetParentNode()) {
      // if this is the first node in a sequence but has a parent,
      // start with the end bin of the parent's distribution
      fFirstBin=GetParentNode()->GetStartBin()+
         GetParentNode()->GetDistributionNumberOfBins();
   } else {
      // if this is the top level node, the first bin number is 1
     fFirstBin=1;
     //  ... unless the top level node is the only node
     //  ... with dimension=1
     //  ... and there are no child nodes
     //  ... and there is an underflow bin
     if((!GetChildNode())&&(GetDistributionDimension()==1)&&
        (fHasUnderflow==1)) {
        fFirstBin=0;
     }
   }
   fLastBin=fFirstBin+fDistributionSize;
   // now update count for all children
   for(TUnfoldBinning *node=childNode;node;node=node->nextNode) {
      fLastBin=node->UpdateFirstLastBin(kFALSE);
   }
   return fLastBin;
}

TUnfoldBinning::TUnfoldBinning
(const char *name,Int_t nBins,const char *binNames)
   : TNamed(name ? name : "",name ? name : "")
{
   // initialize a node with bins but without axis
   //   name: name of the node
   //   nBin: number of extra bins (could be zero)
   //   binNames: (optionally) names of the bins sepatared by ';'
   Initialize(nBins);
   if(binNames) {
      TString nameString(binNames);
      delete fAxisLabelList;
      fAxisLabelList=nameString.Tokenize(";");
   }
   UpdateFirstLastBin();
}

TUnfoldBinning::TUnfoldBinning
(const TAxis &axis,Int_t includeUnderflow,Int_t includeOverflow)
   : TNamed(axis.GetName(),axis.GetTitle())
{
   // create binning containing a distribution with one axis
   //     axis: the axis to represent
   //     includeUnderflow: include underflow bin
   //     includeOverflow: include overflow bin
   Initialize(0);
   AddAxis(axis,includeUnderflow,includeOverflow);
   UpdateFirstLastBin();
}

TUnfoldBinning::~TUnfoldBinning(void)
{
   // delete all children
   if(childNode) delete childNode;
   // remove this node from the tree
   if(GetParentNode() && (GetParentNode()->GetChildNode()==this)) {
      parentNode->childNode=nextNode;
   }
   if(GetPrevNode()) prevNode->nextNode=nextNode;
   if(GetNextNode()) nextNode->prevNode=prevNode;
   delete fAxisList; 
   delete fAxisLabelList; 
}

TUnfoldBinning *TUnfoldBinning::AddBinning
(const char *name,Int_t nBins,const char *binNames)
{
  // add a binning as last daughter to this tree
  //   name: name of the node
  //   nBin: number of bins not belonging to a distribution (usually zero)
  //   binNames: (optionally) names of these bins sepatared by ';'
  return AddBinning(new TUnfoldBinning(name,nBins,binNames));
}

TUnfoldBinning *TUnfoldBinning::AddBinning(TUnfoldBinning *binning)
{
  // add a binning as last daughter to this tree
  //   binning: pointer to the new binning
  // return value: if succeeded, return "binning"
  //               otherwise return 0
  TUnfoldBinning *r=0;
  if(binning->GetParentNode()) {
    Error("binning \"%s\" already has parent \"%s\", can not be added to %s",
	  (char *)binning->GetName(),
	  (char *)binning->GetParentNode()->GetName(),
	  (char *)GetName());
  } else if(binning->GetPrevNode()) {
    Error("binning \"%s\" has previous node \"%s\", can not be added to %s",
	  (char *)binning->GetName(),
	  (char *)binning->GetPrevNode()->GetName(),
	  (char *)GetName());
  } else if(binning->GetNextNode()) {
    Error("binning \"%s\" has next node \"%s\", can not be added to %s",
	  (char *)binning->GetName(),
	  (char *)binning->GetNextNode()->GetName(),
	  (char *)GetName());
  } else {
    r=binning;
    binning->parentNode=this;
    if(childNode) {
      TUnfoldBinning *child=childNode;
      // find last child
      while(child->nextNode) {
	child=child->nextNode;
      }
      // add as last child
      child->nextNode=r;
      r->prevNode=child;
    } else {
      childNode=r;
    }
    UpdateFirstLastBin();
    r=binning;
  }
  return r;
}

Bool_t TUnfoldBinning::AddAxis
(const char *name,Int_t nBin,Double_t xMin,Double_t xMax,
 Bool_t hasUnderflow,Bool_t hasOverflow)
{
  // add an axis with equidistant bins to the distribution
  //    name: name of the axis
  //    nBin: number of bins
  //    xMin: lower edge of the first bin
  //    xMax: upper edge of the last bin
  //    hasUnderflow: decide whether the axis has an underflow bin
  //    hasOverflow: decide whether the axis has an overflow bin
  // return: true if the axis has been added
  Bool_t r=kFALSE;
   if(nBin<=0) {
      Fatal("AddAxis","number of bins %d is not positive",
            nBin);
   } else if((!TMath::Finite(xMin))||(!TMath::Finite(xMax))||
      (xMin>=xMax)) {
      Fatal("AddAxis","xmin=%f required to be smaller than xmax=%f",
            xMin,xMax);
   } else {
     Double_t *binBorders=new Double_t[nBin+1];
     Double_t x=xMin;
     Double_t dx=(xMax-xMin)/nBin;
     for(Int_t i=0;i<=nBin;i++) {
       binBorders[i]=x+i*dx;
     }
     r=AddAxis(name,nBin,binBorders,hasUnderflow,hasOverflow);
     delete [] binBorders;
   }
   return r;
}

Bool_t TUnfoldBinning::AddAxis
(const TAxis &axis,Bool_t hasUnderflow,Bool_t hasOverflow)
{
  // add an axis to the distribution
  //    axis: the axis
  //    hasUnderflow: decide whether the underflow bin should be included
  //    hasOverflow: decide whether the overflow bin should be included
  // return: true if the axis has been added
  //
  // Note: axis labels are not imported
  Int_t nBin=axis.GetNbins();
  Double_t *binBorders=new Double_t[nBin+1];
  for(Int_t i=0;i<nBin;i++) {
    binBorders[i]=axis.GetBinLowEdge(i+1);
  }
  binBorders[nBin]=axis.GetBinUpEdge(nBin);
  Bool_t r=AddAxis(axis.GetTitle(),nBin,binBorders,hasUnderflow,hasOverflow);
  delete [] binBorders;
  return r;
}

Bool_t TUnfoldBinning::AddAxis
(const char *name,Int_t nBin,const Double_t *binBorders,
 Bool_t hasUnderflow,Bool_t hasOverflow)
{
  // add an axis with the specified bin borders to the distribution
  //    name: name of the axis
  //    nBin: number of bins
  //    binBorders: array of bin borders, with nBin+1 elements
  //    hasUnderflow: decide whether the axis has an underflow bin
  //    hasOverflow: decide whether the axis has an overflow bin
  Bool_t r=kFALSE;
  if(HasUnconnectedBins()) {
    Fatal("AddAxis","node already has %d bins without axis",
	  GetDistributionNumberOfBins());
  } else if(nBin<=0) {
    Fatal("AddAxis","number of bins %d is not positive",
	  nBin);
  } else {
    TVectorD *bins=new TVectorD(nBin+1);
    r=kTRUE;
    for(Int_t i=0;i<=nBin;i++) {
      (*bins)(i)=binBorders[i];
      if(!TMath::Finite((*bins)(i))) {
	Fatal("AddAxis","bin border %d is not finite",i);
	r=kFALSE;
      } else if((i>0)&&((*bins)(i)<=(*bins)(i-1))) {
	Fatal("AddAxis","bins not in order x[%d]=%f <= %f=x[%d]",
	      i,(*bins)(i),(*bins)(i-1),i-1);
	r=kFALSE;
      }
    }
    if(r) {
      Int_t axis=fAxisList->GetEntriesFast();
      Int_t bitMask=1<<axis;
      Int_t nBinUO=nBin;
      if(hasUnderflow) {
	fHasUnderflow |= bitMask;
	nBinUO++;
      } else {
	fHasUnderflow &= ~bitMask;
      }
      if(hasOverflow) {
	fHasOverflow |= bitMask;
	nBinUO++;
      } else {
	fHasOverflow &= ~bitMask;
      }
      fAxisList->AddLast(bins);
      fAxisLabelList->AddLast(new TObjString(name));
      if(!fDistributionSize) fDistributionSize=1;
      fDistributionSize *= nBinUO;
      UpdateFirstLastBin();
    }
  }
  return r;
}

void TUnfoldBinning::PrintStream(ostream &out,Int_t indent) const
{
  // print some information about this binning tree
  //    out: stream to write to
  //    indent: initial indentation (sub-trees have indent+1)
   for(Int_t i=0;i<indent;i++) out<<"  ";
   out<<"TUnfoldBinning \""<<GetName()<<"\" has ";
   Int_t nBin=GetEndBin()-GetStartBin();
   if(nBin==1) {
      out<<"1 bin";
   } else {
      out<<nBin<<" bins";
   }
   out<<" ["
      <<GetStartBin()<<","<<GetEndBin()<<"] nTH1x="
      <<GetTH1xNumberOfBins()
      <<"\n";
   if(GetDistributionNumberOfBins()) {
      for(Int_t i=0;i<indent;i++) out<<"  ";
      out<<" distribution: "<<GetDistributionNumberOfBins()<<" bins\n";
      if(fAxisList->GetEntriesFast()) {
         /* for(Int_t i=0;i<indent;i++) out<<"  ";
            out<<" axes:\n"; */
          for(Int_t axis=0;axis<GetDistributionDimension();axis++) {
             for(Int_t i=0;i<indent;i++) out<<"  ";
             out<<"  \""
                 <<GetDistributionAxisLabel(axis)
                 <<"\" nbin="<<GetDistributionBinning(axis)->GetNrows()-1;
             if(fHasUnderflow & (1<<axis)) out<<" plus underflow";
             if(fHasOverflow & (1<<axis)) out<<" plus overflow";
             out<<"\n";
          }
      } else {
         for(Int_t i=0;i<indent;i++) out<<"  ";
         out<<" no axis\n";
         for(Int_t i=0;i<indent;i++) out<<"  ";
         out<<" names: ";
         for(Int_t ibin=0;(ibin<GetDistributionNumberOfBins())&&
                (ibin<fAxisLabelList->GetEntriesFast());ibin++) {
            if(ibin) out<<";";
            if(GetDistributionAxisLabel(ibin)) {
               out<<GetDistributionAxisLabel(ibin);
            }
         }
         out<<"\n";
      }
   }
   TUnfoldBinning const *child=GetChildNode();
   if(child) {
      while(child) {
         child->PrintStream(out,indent+1);
         child=child->GetNextNode();
      }
   }
}

/********************* Navigation **********************/

TUnfoldBinning const *TUnfoldBinning::FindNode(char const *name) const
{
   // parse the tree and return a node with the given name
   //   name: the name of the node to find
   TUnfoldBinning const *r=0;
   if((!name)||(!TString(GetName()).CompareTo(name))) {
      r=this;
   }
   for(TUnfoldBinning const *child=GetChildNode();
       (!r) && child;child=child->GetNextNode()) {
      r=child->FindNode(name);
   }
   return r;
}

TUnfoldBinning *TUnfoldBinning::GetRootNode(void)
{
   // return root node
   TUnfoldBinning *node=this;
   while(node->GetParentNode()) node=node->parentNode;
   return node;
}

TUnfoldBinning const *TUnfoldBinning::GetRootNode(void) const
{
   // return root node
   TUnfoldBinning const *node=this;
   while(node->GetParentNode()) node=node->GetParentNode();
   return node;
}

/********************* Create THxx histograms **********/

TString TUnfoldBinning::BuildHistogramTitle
(const char *histogramName,const char *histogramTitle,Int_t const *axisList)
   const
{
   // build a title
   // input:
   //   histogramTitle : if this is non-zero, use that title
   //  otherwise:
   //   title=histogramName[;x[;y[;z]]]
   //   ?Axis : -2 stop adding text to the title
   //           -1 add name of this node
   //          >=0 use name of the corresponding axis
   TString r;
   if(histogramTitle) {
      r=histogramTitle;
   } else {
      r=histogramName;
      Int_t iEnd;
      for(iEnd=2;iEnd>0;iEnd--) {
         if(axisList[iEnd]>=0) break;
      }
      for(Int_t i=0;i<=iEnd;i++) {
         r += ";";
         if(axisList[i]<0) {
            r += GetName();
         } else {
            r += GetNonemptyNode()->GetDistributionAxisLabel(axisList[i]);
         }
      }
   }
   return r;
}

TString TUnfoldBinning::BuildHistogramTitle2D
(const char *histogramName,const char *histogramTitle,
 Int_t xAxis,const TUnfoldBinning *yAxisBinning,Int_t yAxis) const
{
   // build a title
   // input:
   //   histogramTitle : if this is non-zero, use that title
   //  otherwise:
   //   title=histogramName;x;y
   //   xAxis : -1 no title for this axis
   //          >=0 use name of the corresponding axis
   TString r;
   if(histogramTitle) {
      r=histogramTitle;
   } else {
      r=histogramName;
      r += ";";
      if(xAxis==-1) {
         r += GetName();
      } else if(xAxis>=0) {
         r += GetNonemptyNode()->GetDistributionAxisLabel(xAxis);
      }
      r+= ";";
      if(yAxis==-1) {
         r += yAxisBinning->GetName();
      } else if(yAxis>=0) {
         r += yAxisBinning->GetNonemptyNode()->GetDistributionAxisLabel(yAxis);
      }

   }
   return r;
}

Int_t TUnfoldBinning::GetTH1xNumberOfBins
(Bool_t originalAxisBinning,const char *axisSteering) const
{
  // return the number of histogram bins required when storing
  // this binning in a one-dimensional histogram
  //     originalAxisBinning : try to preserve the axis binning,
  //                           if this binning is 1-dimensional then the
  //                           underflow/overflow are stored in the
  //                           corresponding bins of the TH1 and 
  //   axisSteering:
  //       "pattern1;pattern2;...;patternN"
  //       patternI = axis[mode]
  //       axis = name or *
  //       mode = C|U|O 
  //        C: collapse axis into one bin
  //        U: discarde underflow bin
  //        O: discarde overflow bin
  //  return: number of bins of the TH1 (underflow/overflow are not counted)
   Int_t axisBins[3],axisList[3];
   GetTHxxBinning(originalAxisBinning ? 1 : 0,axisBins,axisList,
                  axisSteering);
   return axisBins[0];
}

TH1 *TUnfoldBinning::CreateHistogram
(const char *histogramName,Bool_t originalAxisBinning,Int_t **binMap,
 const char *histogramTitle,const char *axisSteering) const
{
  // create a THxx histogram capable to hold the bins of this binning
  // scheme and its children
  //  input:
  //     histogramName: name of the histogram which is created
  //     originalAxisBinning : try to preserve the axis binning
  //                           if this parameter is true, the resulting
  //                           histogram has bin widths and histogram
  //                           dimension (TH1D, TH2D, TH3D)
  //                           in parallel to the binning scheme
  //                           (if possible)
  //     binMap : mapping of global bins to histogram bins 
  //               see method CreateBinMap()
  //               if(binMap==0), no binMap is created
  //     histogramTitle: if this is non-zero, it is taken as histogram title
  //                     otherwise, the title is created automatically
  //     axisSteering:
  //       "pattern1;pattern2;...;patternN"
  //       patternI = axis[mode]
  //       axis = name or *
  //       mode = C|U|O 
  //        C: collapse axis into one bin
  //        U: discarde underflow bin
  //        O: discarde overflow bin
  // returns: a new histogram (TH1D, TH2D or TH3D)
   Int_t nBin[3],axisList[3];
   Int_t nDim=GetTHxxBinning(originalAxisBinning ? 3 : 0,nBin,axisList,
                             axisSteering);
   const TUnfoldBinning *neNode=GetNonemptyNode();
   TString title=BuildHistogramTitle(histogramName,histogramTitle,axisList);
   TH1 *r=0;
   if(nDim>0) {
      const TVectorD *axisBinsX=
         neNode->GetDistributionBinning(axisList[0]);
      if(nDim>1) {
         const TVectorD *axisBinsY=
            neNode->GetDistributionBinning(axisList[1]);
         if(nDim>2) {
            const TVectorD *axisBinsZ=
               neNode->GetDistributionBinning(axisList[2]);
            r=new TH3D(histogramName,title,
                       nBin[0],axisBinsX->GetMatrixArray(),
                       nBin[1],axisBinsY->GetMatrixArray(),
                       nBin[2],axisBinsZ->GetMatrixArray());
         } else {
            r=new TH2D(histogramName,title,
                       nBin[0],axisBinsX->GetMatrixArray(),
                       nBin[1],axisBinsY->GetMatrixArray());
         }
      } else {
         r=new TH1D(histogramName,title,nBin[0],axisBinsX->GetMatrixArray());
      }
   } else {
      if(originalAxisBinning) {
         Warning("CreateHistogram",
		 "Original binning can not be represented as THxx");
      }
      r=new TH1D(histogramName,title,nBin[0],0.5,nBin[0]+0.5);
      nDim=0;
   }
   if(binMap) {
      *binMap=CreateBinMap(r,nDim,axisList,axisSteering);
   }
   return r;
}

TH2D *TUnfoldBinning::CreateErrorMatrixHistogram
(const char *histogramName,Bool_t originalAxisBinning,Int_t **binMap,
 const char *histogramTitle,const char *axisSteering) const
{
  // create a TH2D histogram capable to hold an error matrix
  // coresponding to the bins of this binning scheme and its children
  //  input:
  //     histogramName: name of the histogram which is created
  //     originalAxisBinning : try to preserve the axis binning
  //                           if this parameter is true, the resulting
  //                           histogram has bin widths
  //                           in parallel to this binning scheme
  //                           (if possible)
  //     binMap : mapping of global bins to histogram bins 
  //               see method CreateBinMap()
  //               if(binMap==0), no binMap is created
  //     histogramTitle: if this is non-zero, it is taken as histogram title
  //                     otherwise, the title is created automatically
  //     axisSteering:
  //       "pattern1;pattern2;...;patternN"
  //       patternI = axis[mode]
  //       axis = name or *
  //       mode = C|U|O 
  //        C: collapse axis into one bin
  //        U: discarde underflow bin
  //        O: discarde overflow bin
  // returns: a new TH2D

   Int_t nBin[3],axisList[3];
   Int_t nDim=GetTHxxBinning(originalAxisBinning ? 1 : 0,nBin,axisList,
                             axisSteering);
   TString title=BuildHistogramTitle(histogramName,histogramTitle,axisList);
   TH2D *r=0;
   if(nDim==1) {
      const TVectorD *axisBinsX=(TVectorD const *)
         GetNonemptyNode()->fAxisList->At(axisList[0]);
      r=new TH2D(histogramName,title,nBin[0],axisBinsX->GetMatrixArray(),
                 nBin[0],axisBinsX->GetMatrixArray());
   } else {
      if(originalAxisBinning) {
         Info("CreateErrorMatrixHistogram",
              "Original binning can not be represented on one axis");
      }
      r=new TH2D(histogramName,title,nBin[0],0.5,nBin[0]+0.5,
                 nBin[0],0.5,nBin[0]+0.5);
      nDim=0;
   }
   if(binMap) {
      *binMap=CreateBinMap(r,nDim,axisList,axisSteering);
   }
   return r;
}

TH2D *TUnfoldBinning::CreateHistogramOfMigrations
(TUnfoldBinning const *xAxis,TUnfoldBinning const *yAxis,
 char const *histogramName,Bool_t originalXAxisBinning,
 Bool_t originalYAxisBinning,char const *histogramTitle)
{
  // create a TH2D histogram capable to hold the bins of the two
  // input binning schemes on the x and y axes, respectively
  //  input:
  //     histogramName: name of the histogram which is created
  //     xAxis: binning scheme for the x axis
  //     yAxis: binning scheme for the y axis
  //     originalXAxisBinning: preserve x-axis bin widths if possible
  //     originalXAxisBinning: preserve y-axis bin widths if possible
  //     histogramTitle: if this is non-zero, it is taken as histogram title
  //                     otherwise, the title is created automatically
  // returns: a new TH2D

   Int_t nBinX[3],axisListX[3];
   Int_t nDimX=
      xAxis->GetTHxxBinning(originalXAxisBinning ? 1 : 0,nBinX,axisListX,0);
   Int_t nBinY[3],axisListY[3];
   Int_t nDimY=
      yAxis->GetTHxxBinning(originalYAxisBinning ? 1 : 0,nBinY,axisListY,0);
   TString title=xAxis->BuildHistogramTitle2D
      (histogramName,histogramTitle,axisListX[0],yAxis,axisListY[0]);
   if(nDimX==1) {
      const TVectorD *axisBinsX=(TVectorD const *)
         xAxis->fAxisList->At(axisListX[0]);
      if(nDimY==1) {
         const TVectorD *axisBinsY=(TVectorD const *)
            yAxis->fAxisList->At(axisListY[0]);
         return new TH2D(histogramName,title,
                         nBinX[0],axisBinsX->GetMatrixArray(),
                         nBinY[0],axisBinsY->GetMatrixArray());
      } else {
         return new TH2D(histogramName,title,
                         nBinX[0],axisBinsX->GetMatrixArray(),
                         nBinY[0],0.5,0.5+nBinY[0]);
      }
   } else {
      if(nDimY==1) {
         const TVectorD *axisBinsY=(TVectorD const *)
            yAxis->fAxisList->At(axisListY[0]);
         return new TH2D(histogramName,title,
                         nBinX[0],0.5,0.5+nBinX[0],
                         nBinY[0],axisBinsY->GetMatrixArray());
      } else {
         return new TH2D(histogramName,title,
                         nBinX[0],0.5,0.5+nBinX[0],
                         nBinY[0],0.5,0.5+nBinY[0]);
      }
   }
}

Int_t TUnfoldBinning::GetTHxxBinning
(Int_t maxDim,Int_t *axisBins,Int_t *axisList,
 const char *axisSteering) const
{
   // calculate properties of a THxx histogram to store this binning
   // input:
   //   maxDim : maximum dimension of the THxx (0 or 1..3)
   //              maxDim==0 is used to indicate that the histogram should be
   //              1-dimensional with all bins mapped on one axis,
   //               bin centers equal to bin numbers
   //   axisSteering:
   //       "pattern1;pattern2;...;patternN"
   //       patternI = axis[mode]
   //       axis = name or *
   //       mode = C|U|O 
   //        C: collapse axis into one bin
   //        U: discarde underflow bin
   //        O: discarde overflow bin
   // output;
   //   axisBins[0..2] : number of bins on the THxx axes [0]:x [1]:y [2]:z
   //   axisList[0..2] : TUnfoldBinning axis number corresponding to TH1 axis
   //                        [0]:x [1]:y [2]:z
   // return value :  1-3: dimension of THxx
   //                 0 : use 1-dim THxx, binning structure is not preserved
   for(Int_t i=0;i<3;i++) {
      axisBins[i]=0;
      axisList[i]=-1;
   }
   const TUnfoldBinning *theNode=GetNonemptyNode();
   if(theNode) {
      return theNode->GetTHxxBinningSingleNode
         (maxDim,axisBins,axisList,axisSteering);
   } else {
      axisBins[0]=GetTHxxBinsRecursive(axisSteering);
      return 0;
   }
}

const TUnfoldBinning *TUnfoldBinning::GetNonemptyNode(void) const
{
   // get the node which has non-empty distributions
   // if there is none or if there are many, return zero
   const TUnfoldBinning *r=GetDistributionNumberOfBins()>0 ? this : 0;
   for(TUnfoldBinning const *child=GetChildNode();child;
       child=child->GetNextNode()) {
      const TUnfoldBinning *c=child->GetNonemptyNode();
      if(!r) {
         // new candidate found
         r=c;
      } else {
         if(c) {
            // multiple nodes found
            r=0;
            break;
         }
      }
   }
   return r;
}

Int_t TUnfoldBinning::GetTHxxBinningSingleNode
(Int_t maxDim,Int_t *axisBins,Int_t *axisList,const char *axisSteering) const
{
   // get the properties of a histogram capable to hold the distribution
   // of this node
   // input:
   //   maxDim : maximum dimension of the THxx (0 or 1..3)
   //              maxDim==0 is used to indicate that the histogram should be
   //              1-dimensional with all bins mapped on one axis
   //   axisSteering :
   //       "pattern1;pattern2;...;patternN"
   //       patternI = axis[mode]
   //       axis = name or *
   //       mode = C|U|O 
   //        C: collapse axis into one bin
   //        U: discarde underflow bin
   //        O: discarde overflow bin
   //   input/output:
   //    axisBins[0..2] : cumulated number of bins on the THxx axes
   //                         [0]:x [1]:y [2]:z
   //    axisList[0..2] : TUnfoldBinning axis number corresponding to TH1 axis
   //                         [0]:x [1]:y [2]:z
   // return value :  1-3: dimension of THxx
   //                 0 : use 1-dim THxx, binning structure is not preserved


   // decode axisSteering
   //   isOptionGiven[0] ('C'): bit vector which axes to collapse
   //   isOptionGiven[1] ('U'): bit vector to discarde underflow bins
   //   isOptionGiven[2] ('U'): bit vector to discarde overflow bins
   Int_t isOptionGiven[3] = { 0 };
   DecodeAxisSteering(axisSteering,"CUO",isOptionGiven);
   // count number of axes after projecting
   Int_t numDimension=GetDistributionDimension();
   Int_t r=0;
   for(Int_t i=0;i<numDimension;i++) {
      if(isOptionGiven[0] & (1<<i)) continue;
      r++;
   }
   if((r>0)&&(r<=maxDim)) {
      // 0<r<=maxDim
      //
      // -> preserve the original binning
      //    axisList[] and axisBins[] are overwritten
      r=0;
      for(Int_t i=0;i<numDimension;i++) {
         if(isOptionGiven[0] & (1<<i)) continue;
         axisList[r]=i;
         axisBins[r]=GetDistributionBinning(i)->GetNrows()-1;
         r++;
      }
   } else {
      // map everything on one axis
      //  axisBins[0] is the number of bins
      if(HasUnconnectedBins() || (GetDistributionNumberOfBins()<=0)) {
         axisBins[0] = GetDistributionNumberOfBins();
      } else {
         Int_t nBin=1;
         for(Int_t i=0;i<numDimension;i++) {
            Int_t mask=(1<<i);
            if(isOptionGiven[0] & mask) continue;
            Int_t nBinI=GetDistributionBinning(i)->GetNrows()-1;
            if((fHasUnderflow & mask)&& !(isOptionGiven[1] & mask)) nBinI++;
            if((fHasOverflow & mask)&& !(isOptionGiven[2] & mask)) nBinI++;
            nBin *= nBinI;
         }
         axisBins[0] = nBin;
      }
      r=0;
   }
   return r;
}

Int_t TUnfoldBinning::GetTHxxBinsRecursive(const char *axisSteering) const
{
   // input:
   //   axisSteering :
   //       "pattern1;pattern2;...;patternN"
   //       patternI = axis[mode]
   //       axis = name or *
   //       mode = C|U|O 
   //        C: collapse axis into one bin
   //        U: discarde underflow bin
   //        O: discarde overflow bin
   // output:
   //   binMap[] : map global bin numbers to histogram bins
   // return value :  number of bins

   Int_t r=0;
   for(TUnfoldBinning const *child=GetChildNode();child;
       child=child->GetNextNode()) {
      r +=child->GetTHxxBinsRecursive(axisSteering);
   }
   // here: process distribution of this node
   Int_t axisBins[3] = {0}, axisList[3] = {0};
   GetTHxxBinningSingleNode(0,axisBins,axisList,axisSteering);
   r += axisBins[0];
   return r;
}

Int_t *TUnfoldBinning::CreateBinMap
(const TH1 *hist,Int_t nDim,const Int_t *axisList,const char *axisSteering)
   const
{
   // create mapping from global bin number to a histogram for this node
   // global bins are the bins of the root node binning scheme
   // when projecting them on a TH1 histogram "hRootNode" without special
   // axis steering and without attempting to preserve the axis binnings
   // 
   // The bin map is an array of size hRootNode->GetNbinsX()+2
   // For each bin of the "hRootNode" histogram it holds the target bin in
   // "hist" or the number -1 if the corresponding "hRootNode" bin is not
   // represented in "hist"
   //
   // input
   //   hist : the histogram (to calculate root bin numbers)
   //   nDim : target dimension of the TUnfoldBinning
   //          if(nDim==0) all bins are mapped linearly
   //   axisSteering:
   //       "pattern1;pattern2;...;patternN"
   //       patternI = axis[mode]
   //       axis = name or *
   //       mode = C|U|O 
   //        C: collapse axis into one bin
   //        U: discarde underflow bin
   //        O: discarde overflow bin
   //
   // input used only if nDim>0:
   //    axisList : for each THxx axis give the TUnfoldBinning axis number
   //
   // return value:
   //   an new array which holds the bin mapping 
   //    r[0] : to which THxx bin to map global bin number 0
   //    r[1] : to which THxx bin to map global bin number 1
   //      ...
   //    r[nmax]
   //  where nmax=GetRootNode()->GetEndBin()+1
   Int_t nMax=GetRootNode()->GetEndBin()+1;
   Int_t *r=new Int_t[nMax];
   for(Int_t i=0;i<nMax;i++) {
         r[i]=-1;
   }
   Int_t startBin=GetRootNode()->GetStartBin();
   if(nDim>0) {
     const TUnfoldBinning *nonemptyNode=GetNonemptyNode();
     if(nonemptyNode) {
       FillBinMapSingleNode(hist,startBin,nDim,axisList,axisSteering,r);
     } else {
       Fatal("CreateBinMap","called with nDim=%d but GetNonemptyNode()=0",
	     nDim);
     }
   } else {
     FillBinMapRecursive(startBin,axisSteering,r);
   }
   return r;
}

Int_t TUnfoldBinning::FillBinMapRecursive
(Int_t startBin,const char *axisSteering,Int_t *binMap) const
{
   // fill bin map recursively
   // input
   //   startBin : first histogram bin
   //   axisSteering : specify how to project the axes
   //   binMap : the bin mapping which is to be filled
   //
   // the positions
   //       binMap[GetStartBin()]
   //         ..
   //       binMap[GetEndBin()-1]
   // are filled
   //
   Int_t nbin=0;
   nbin = FillBinMapSingleNode(0,startBin,0,0,axisSteering,binMap);
   for(TUnfoldBinning const *child=GetChildNode();child;
       child=child->GetNextNode()) {
      nbin += child->FillBinMapRecursive(startBin+nbin,axisSteering,binMap);
   }
   return nbin;
}

Int_t TUnfoldBinning::FillBinMapSingleNode
(const TH1 *hist,Int_t startBin,Int_t nDim,const Int_t *axisList,
 const char *axisSteering,Int_t *binMap) const
{
  // fill bin map for a single node
  //  input:
  //     hist: the histogram represeinthing this node (used if nDim>0)
  //     startBin: start bin in the bin map
  //     nDim:
  //        0: bins are mapped in linear order, ignore hist and axisList
  //        nDim=hist->GetDimension():
  //           bins are mapped to "hist" bin numbers
  //           the corresponding TUnfoldBinning axes are taken from axisList[]
  //        nDim=1 and hist->GetDimension()>1:
  //           bins are mapped to th x-axis of "hist"
  //           the corresponding TUnfoldBinning axis is taken from axisList[0]
  //     axisList[]:
  //           TUnfoldBinning axis numbers corresponding to the
  //           x[0], y[1], z[2] axes of "hist"
  //     axisSteering:
  //       "pattern1;pattern2;...;patternN"
  //       patternI = axis[mode]
  //       axis = name or *
  //       mode = C|U|O 
  //        C: collapse axis into one bin
  //        U: discarde underflow bin
  //        O: discarde overflow bin
  //     binMap: the bin map to fill
  // return value: 
  //     the number of bins mapped
  //     (only relevant if nDim==0)
   // first, decode axisSteering
   //   isOptionGiven[0] ('C'): bit vector which axes to collapse
   //   isOptionGiven[1] ('U'): bit vector to discarde underflow bins
   //   isOptionGiven[2] ('U'): bit vector to discarde overflow bins
   Int_t isOptionGiven[3] = {0};
   DecodeAxisSteering(axisSteering,"CUO",isOptionGiven);
   Int_t axisBins[MAXDIM] = {0};
   Int_t dimension=GetDistributionDimension();
   Int_t axisNbin[MAXDIM] = {0};
   for(Int_t i=0;i<dimension;i++) {
      const TVectorD *binning=GetDistributionBinning(i);
      axisNbin[i]=binning->GetNrows()-1;
   };
   for(Int_t i=0;i<GetDistributionNumberOfBins();i++) {
      Int_t globalBin=GetStartBin()+i;
      const TUnfoldBinning *dest=ToAxisBins(globalBin,axisBins);
      if(dest!=this) {
         if(!dest) {
            Fatal("FillBinMapSingleNode",
                  "bin %d outside binning scheme",
                  globalBin);
         } else {
            Fatal("FillBinMapSingleNode",
                  "bin %d located in %s %d-%d rather than %s %d=%d",
                  i,(const char *)dest->GetName(),
                  dest->GetStartBin(),dest->GetEndBin(),
                  (const char *)GetName(),GetStartBin(),GetEndBin());
         }
      }
      // check whether this bin has to be skipped (underflow/overflow excluded)
      Bool_t skip=kFALSE;
      for(Int_t axis=0;axis<dimension;axis++) {
         Int_t mask=(1<<axis);
         if(((axisBins[axis]<0)&&(isOptionGiven[1] & mask))||
            ((axisBins[axis]>=axisNbin[axis])&&(isOptionGiven[2] & mask)))
            skip=kTRUE;
      }
      if(skip) continue;

      if(nDim>0) {
         // get bin number from THxx function(s)
         if(nDim==hist->GetDimension()) {
            Int_t ibin[3];
            ibin[0]=ibin[1]=ibin[2]=0;
            for(Int_t hdim=0;hdim<nDim;hdim++) {
               Int_t axis=axisList[hdim];
               ibin[hdim]=axisBins[axis]+1;
            }
            binMap[globalBin]=hist->GetBin(ibin[0],ibin[1],ibin[2]);
         } else if(nDim==1) {
	   // histogram has more dimensions than the binning scheme
	   // and the binning scheme has one axis only
	   // -> use the first valid axis only
	   for(Int_t ii=0;ii<hist->GetDimension();ii++) {
	     if(axisList[ii]>=0) {
	       binMap[globalBin]=axisBins[axisList[ii]]+1;
	       break;
	     }
	   }
         } else {
            Fatal("FillBinMapSingleNode","unexpected bin mapping %d %d",nDim,
                  hist->GetDimension());
         }
      } else {
         // order all bins in sequence
         // calculation in parallel to ToGlobalBin()
         // but take care of
         //   startBin,collapseAxis,discardeUnderflow,discardeOverflow
         if(dimension>0) {
            Int_t r=0;
            for(Int_t axis=dimension-1;axis>=0;axis--) {
               Int_t mask=(1<<axis);
               if(isOptionGiven[0] & mask) {
                  // bins on this axis are integrated over
                  continue;
               }
               Int_t iBin=axisBins[axis];
               Int_t nMax=axisNbin[axis];
               if((fHasUnderflow & ~isOptionGiven[1]) & mask) {
                  nMax +=1;
                  iBin +=1;
               }
               if((fHasOverflow & ~isOptionGiven[2]) & mask) {
                  nMax += 1;
               }
               r = r*nMax +iBin;
            }
            binMap[globalBin] = startBin + r;
         } else {
	   binMap[globalBin] = startBin + axisBins[0];
         }
      }
   }
   Int_t nbin;
   if(dimension>0) {
     nbin=1;
     for(Int_t axis=dimension-1;axis>=0;axis--) {
       Int_t mask=(1<<axis);
       if(isOptionGiven[0] & mask) {
	 // bins on this axis are integrated over
	 continue;
       }
       Int_t nMax=axisNbin[axis];
       if((fHasUnderflow & ~isOptionGiven[1]) & mask) {
	 nMax +=1;
       }
       if((fHasOverflow & ~isOptionGiven[2]) & mask) {
	 nMax += 1;
       }
       nbin = nbin*nMax;
     }
   } else {
     nbin=GetDistributionNumberOfBins();
   }
   return nbin;
}

TH1 *TUnfoldBinning::ExtractHistogram
(const char *histogramName,const TH1 *globalBins,
 const TH2 *globalBinsEmatrix,Bool_t originalAxisBinning,
 const char *axisSteering) const
{
   // extract a distribution from the given set of global bins
   // input:
   //    histogramName : name of the histogram which ic created
   //    globalBins : histogram with all bins
   //    globalBinsEmatrix : corresponding error matrix
   //                 if this pointer is zero, only diagonal errors
   //                 are considered
   //    originalAxisBinning :  extract  histogram with proper binning
   //                          (if possible)
   //    axisSteering
   //       "pattern1;pattern2;...;patternN"
   //       patternI = axis[mode]
   //       axis = name or *
   //       mode = C|U|O 
   //        C: collapse axis into one bin
   //        U: discarde underflow bin
   //        O: discarde overflow bin
   Int_t *binMap=0;
   TH1 *r=CreateHistogram(histogramName,originalAxisBinning,&binMap,0,
                          axisSteering);
   TUnfoldBinning const *root=GetRootNode();
   Int_t nMax=0;
   for(Int_t iSrc=root->GetStartBin();iSrc<root->GetEndBin();iSrc++) {
      if(binMap[iSrc]>nMax) nMax=binMap[iSrc];
   }
   TVectorD eSquared(nMax+1);
   for(Int_t iSrc=root->GetStartBin();iSrc<root->GetEndBin();iSrc++) {
      Int_t iDest=binMap[iSrc];
      if(iDest>=0) {
         Double_t c=r->GetBinContent(iDest);
         r->SetBinContent(iDest,c+globalBins->GetBinContent(iSrc));
         if(!globalBinsEmatrix) {
            eSquared(iDest) += TMath::Power(globalBins->GetBinError(iSrc),2.);
         } else {
            for(Int_t jSrc=root->GetStartBin();jSrc<root->GetEndBin();jSrc++) {
               if(binMap[jSrc]==iDest) {
                   eSquared(iDest) += 
                      TMath::Power(globalBins->GetBinError(jSrc),2.);
               }
            }
         }
      }
   }
   for(Int_t i=0;i<nMax;i++) {
      Double_t e2=eSquared(i);
      if(e2>0.0) {
         r->SetBinError(i,TMath::Sqrt(e2));
      }
   }
   delete [] binMap;

   return r;
}

/********************* Calculate global bin number ******/

Int_t TUnfoldBinning::GetGlobalBinNumber(Double_t x) const
{
  // locate bin on a one-dimensional distribution
  // input
  //    x: coordinate to locate
   if(GetDistributionDimension()!=1) {
      Fatal("GetBinNumber",
            "called with 1 argument for %d dimensional distribution",
            GetDistributionDimension());
   }
   return GetGlobalBinNumber(&x);
}

Int_t TUnfoldBinning::GetGlobalBinNumber(Double_t x,Double_t y) const
{
  // locate bin on a two-dimensional distribution
  // input
  //    x,y: coordinates to locate
   if(GetDistributionDimension()!=2) {
      Fatal("GetBinNumber",
            "called with 2 arguments for %d dimensional distribution",
            GetDistributionDimension());
   }
   Double_t xx[2];
   xx[0]=x;
   xx[1]=y;
   return GetGlobalBinNumber(xx);
}

Int_t TUnfoldBinning::GetGlobalBinNumber
(Double_t x,Double_t y,Double_t z) const
{
  // locate bin on a three-dimensional distribution
  // input
  //    x,y,z: coordinates to locate
   if(GetDistributionDimension()!=3) {
      Fatal("GetBinNumber",
            "called with 3 arguments for %d dimensional distribution",
            GetDistributionDimension());
   }
   Double_t xx[3];
   xx[0]=x;
   xx[1]=y;
   xx[2]=z;
   return GetGlobalBinNumber(xx);
}

Int_t TUnfoldBinning::GetGlobalBinNumber
(Double_t x0,Double_t x1,Double_t x2,Double_t x3) const
{
  // locate bin on a four-dimensional distribution
  // input
  //    x0,x1,x2,x3: coordinates to locate
   if(GetDistributionDimension()!=4) {
      Fatal("GetBinNumber",
            "called with 4 arguments for %d dimensional distribution",
            GetDistributionDimension());
   }
   Double_t xx[4];
   xx[0]=x0;
   xx[1]=x1;
   xx[2]=x2;
   xx[3]=x3;
   return GetGlobalBinNumber(xx);
}

Int_t TUnfoldBinning::GetGlobalBinNumber(const Double_t *x) const
{
  // locate bin on a n-dimensional distribution
  // input
  //    x[]: coordinates to locate
   if(!GetDistributionDimension()) {
      Fatal("GetBinNumber",
            "no axes are defined for node %s",
            (char const *)GetName());
   }
   Int_t iAxisBins[MAXDIM] = {0};
   for(Int_t dim=0;dim<GetDistributionDimension();dim++) {
      TVectorD const *bins=(TVectorD const *) fAxisList->At(dim);
      Int_t i0=0;
      Int_t i1=bins->GetNrows()-1;
      Int_t iBin= 0;
      if(x[dim]<(*bins)[i0]) {
         iBin += i0-1;
         // underflow
      } else if(x[dim]>=(*bins)[i1]) {
         // overflow
         iBin += i1;
      } else {
         while(i1-i0>1) {
            Int_t i2=(i0+i1)/2;
            if(x[dim]<(*bins)[i2]) {
               i1=i2;
            } else {
               i0=i2;
            }
         }
         iBin += i0;
      }
      iAxisBins[dim]=iBin;
   }
   Int_t r=ToGlobalBin(iAxisBins);
   if(r<0) r=0;
   return r;
}

/********************* access by global bin number ******/

TString TUnfoldBinning::GetBinName(Int_t iBin) const
{
  // get the name of a bin in the given tree
  //    iBin: bin number
   Int_t axisBins[MAXDIM] = {0};
   TString r=TString::Format("#%d",iBin);
   TUnfoldBinning const *distribution=ToAxisBins(iBin,axisBins);
   if(distribution) {
      r +=" (";
      r += distribution->GetName();
      Int_t dimension=distribution->GetDistributionDimension();
      if(dimension>0) {
         TString axisString;
         for(Int_t axis=0;axis<dimension;axis++) {
            TString thisAxisString=
               distribution->GetDistributionAxisLabel(axis);
            TVectorD const *bins=distribution->GetDistributionBinning(axis);
            Int_t i=axisBins[axis];
            if(i<0) thisAxisString += "[ufl]";
            else if(i>=bins->GetNrows()-1) thisAxisString += "[ofl]";
            else {
               thisAxisString +=
                  TString::Format("[%.3g,%.3g]",(*bins)[i],(*bins)[i+1]);
            }
            axisString = ":"+thisAxisString+axisString;
         }
         r += axisString;
      } else {
         // extra bins
         Int_t i=axisBins[0];
         if((i>=0)&&(i<distribution->fAxisLabelList->GetEntriesFast())) {
            r += distribution->GetDistributionAxisLabel(i);
         } else {
            r += TString::Format(" %d",i);
         }
      }
      r +=")";
   }
   return r;
}

Double_t TUnfoldBinning::GetBinSize(Int_t iBin) const
{
  // get N-dimensional bin size
  // input:
  //    iBin : global bin number
  //    includeUO : include underflow/overflow bins or not
   Int_t axisBins[MAXDIM] = {0};
   TUnfoldBinning const *distribution=ToAxisBins(iBin,axisBins);
   Double_t r=0.0;
   if(distribution) {
      if(distribution->GetDistributionDimension()>0) r=1.0;
      for(Int_t axis=0;axis<distribution->GetDistributionDimension();axis++) {
         TVectorD const *bins=distribution->GetDistributionBinning(axis);
         Int_t pos=axisBins[axis];
         if(pos<0) {
	    r *= distribution->GetDistributionUnderflowBinWidth(axis);
         } else if(pos>=bins->GetNrows()-1) {
	    r *= distribution->GetDistributionOverflowBinWidth(axis);
         } else {
            r *= (*bins)(pos+1)-(*bins)(pos);
         }
         if(r<=0.) break;
      }
   }
   return r;
}

Double_t TUnfoldBinning::GetBinFactor(Int_t iBin) const
{
  // return user factor for a bin
  //    iBin : global bin number
   Int_t axisBins[MAXDIM] = {0};
   TUnfoldBinning const *distribution=ToAxisBins(iBin,axisBins);   
   Double_t r=distribution->fBinFactorConstant;
   if((r!=0.0) && distribution->fBinFactorFunction) {
      Double_t x[MAXDIM];
      Int_t dimension=distribution->GetDistributionDimension();
      if(dimension>0) {
         for(Int_t  axis=0;axis<dimension;axis++) {
            x[axis]=distribution->GetDistributionBinCenter
               (axis,axisBins[axis]);
         }
         r *= distribution->fBinFactorFunction->EvalPar
            (x,distribution->fBinFactorFunction->GetParameters());
      } else {
         x[0]=axisBins[0];
         r *= distribution->fBinFactorFunction->Eval(x[0]);
      }
     
   }
   return r;
}

void TUnfoldBinning::GetBinNeighbours
(Int_t bin,Int_t axis,Int_t *prev,Double_t *distPrev,
 Int_t *next,Double_t *distNext) const
{
   // get neighbour bins along the specified axis
   // input:
   //    bin,axis : bin number and axis number
   // output:
   //    prev: bin number of previous bin (or -1 if not existing)
   //    distPrev: distance to previous bin
   //    next: bin number of next bin (or -1 if not existing)
   //    distNext: distance to next bin
   Int_t axisBins[MAXDIM] = {0};
   TUnfoldBinning const *distribution=ToAxisBins(bin,axisBins);
   Int_t dimension=distribution->GetDistributionDimension();
   *prev=-1;
   *next=-1;
   *distPrev=0.;
   *distNext=0.;
   if((axis>=0)&&(axis<dimension)) {
     //TVectorD const *bins=distribution->GetDistributionBinning(axis);
      //Int_t nBin=bins->GetNrows()-1;
      Int_t centerBin= axisBins[axis];
      axisBins[axis] =centerBin-1;
      *prev=ToGlobalBin(axisBins);
      if(*prev>=0) {
	*distPrev=distribution->GetDistributionBinCenter(axis,axisBins[axis])-
	  distribution->GetDistributionBinCenter(axis,centerBin);
      }
      axisBins[axis] =centerBin+1;
      *next=ToGlobalBin(axisBins);
      if(*next>=0) {
	*distNext=distribution->GetDistributionBinCenter(axis,axisBins[axis])-
	  distribution->GetDistributionBinCenter(axis,centerBin);
      }
   }
}

void TUnfoldBinning::GetBinUnderflowOverflowStatus
(Int_t iBin,Int_t *uStatus,Int_t *oStatus) const
{
  // return bit map indicating underflow and overflow status
  //  iBin: global bin number
  // output
  //  uStatus: bin map indicating whether the bin is in underflow
  //  oStatus: bin map indicating whether the bin is in overflow
  Int_t axisBins[MAXDIM] = {0};
  TUnfoldBinning const *distribution=ToAxisBins(iBin,axisBins);
  Int_t dimension=distribution->GetDistributionDimension();
  *uStatus=0;
  *oStatus=0;
  for(Int_t axis=0;axis<dimension;axis++) {
    TVectorD const *bins=distribution->GetDistributionBinning(axis);
    Int_t nBin=bins->GetNrows()-1;
    if(axisBins[axis]<0) *uStatus |= (1<<axis);
    if(axisBins[axis]>=nBin) *oStatus |= (1<<axis);
  }
}

/********************* access by bin number, given a projection mode ******/
const TUnfoldBinning *TUnfoldBinning::GetBinLocation
(Int_t binTHxx,const char *axisSteering,Int_t axisBins[MAXDIM]) const
{
   // locate the node corresponding to
   //   a given THxx bin for a given projection mode
   // input:
   //    binTHxx : bin in histogram
   //    axisSteering :
   //       "pattern1;pattern2;...;patternN"
   //       patternI = axis[mode]
   //       axis = name or *
   //       mode = C|U|O 
   //        C: collapse axis into one bin
   //        U: discarde underflow bin
   //        O: discarde overflow bin
   // output:
   //    axisBins[]
   //      for each axis of the identified binning node give the bin number
   //            -1 underflow bin
   //            >=0 inside distribution or overflow bin
   //        special bin numbers
   //            -2 : axis collapsed
   //            -3 : axis collapsed and underflow bin excluded
   //            -4 : axis collapsed and overflow bin excluded
   //            -5 : axis collapsed and underflow+overflow bin excluded
   // return value:
   //    the binning node or 0 if not found
   Int_t offset=binTHxx-GetStartBin();
   return GetBinLocationRecursive(offset,axisSteering,axisBins);
}

const TUnfoldBinning *TUnfoldBinning::GetBinLocationRecursive
(Int_t &offset,const char *axisSteering,Int_t axisBins[MAXDIM]) const
{
   // recursively locate the node corresponding to
   //   a given THxx bin for a given projection mode
   // input:
   //    offset : start bin of this nodes in the histogram
   //    axisSteering :
   //       "pattern1;pattern2;...;patternN"
   //       patternI = axis[mode]
   //       axis = name or *
   //       mode = C|U|O 
   //        C: collapse axis into one bin
   //        U: discarde underflow bin
   //        O: discarde overflow bin
   // output:
   //    axisBins[]
   //      for each axis of the identified binning node give the bin number
   //            -1 underflow bin
   //            >=0 inside distribution or overflow bin
   //        special bin numbers
   //            -2 : axis collapsed
   //            -3 : axis collapsed and underflow bin excluded
   //            -4 : axis collapsed and overflow bin excluded
   //            -5 : axis collapsed and underflow+overflow bin excluded
   // return value:
   //    the binning node or 0 if not found
 
   // decode axisSteering
   //   isOptionGiven[0] ('C'): bit vector which axes to collapse
   //   isOptionGiven[1] ('U'): bit vector to discarde underflow bins
   //   isOptionGiven[2] ('U'): bit vector to discarde overflow bins
   Int_t isOptionGiven[3] = { 0 };
   DecodeAxisSteering(axisSteering,"CUO",isOptionGiven);
   const TUnfoldBinning *r=0;
   if(offset>=0) {
      if(GetDistributionDimension()>0) {
         Int_t nBinsTotal=1;
         Int_t i=offset;
         for(Int_t axis=0;axis<GetDistributionDimension();axis++) {
            Int_t mask=1<<axis;
            if(isOptionGiven[0] & mask) {
               axisBins[axis]=-2;
               if((isOptionGiven[1] & mask)&&
                  (fHasUnderflow & mask)) axisBins[axis] -= 1;
               if((isOptionGiven[2] & mask)&&
                  (fHasOverflow & mask)) axisBins[axis] -= 2;
            } else {
               Int_t nBin=GetDistributionBinning(axis)->GetNrows()-1;
               axisBins[axis]=0;
               if((fHasUnderflow & mask) && !(isOptionGiven[1] & mask)) {
                  nBin++;
                  axisBins[axis]=-1;
               }
               if((fHasOverflow & mask) && !(isOptionGiven[2] & mask)) {
                  nBin++;
               }
               axisBins[axis] += i % nBin;
               i /= nBin;
               nBinsTotal *= nBin;
            }
         }
         offset -= nBinsTotal;
         if(offset<0) {
            r=this;
         }
      } else {
         axisBins[0]=offset;
         offset -= GetDistributionNumberOfBins();
         if(offset<0) r=this;
      }
   }
   if(!r) {
      for(TUnfoldBinning const *child=GetChildNode();child;
          child=child->GetNextNode()) {
         r=child->GetBinLocationRecursive(offset,axisSteering,axisBins);
         if(r) break;
      }
   }
   return r;
}

Bool_t TUnfoldBinning::HasUnconnectedBins(void) const
{
   // check whether there are bins but no axis
   return (!GetDistributionDimension())&&(GetDistributionNumberOfBins()>0);
}

Double_t TUnfoldBinning::GetDistributionAverageBinSize
(Int_t axis,Bool_t includeUnderflow,Bool_t includeOverflow) const
{
  // get average bin size of the specified axis
  //   axis : axis number
  //   includeUnderflow : include underflow bin
  //   includeOverflow : include overflow bin
   Double_t r=0.0;
   if((axis>=0)&&(axis<GetDistributionDimension())) {
      TVectorD const *bins=GetDistributionBinning(axis);
      Double_t d=(*bins)[bins->GetNrows()-1]-(*bins)[0];
      Double_t nBins=bins->GetNrows()-1;
      if(includeUnderflow && (fHasUnderflow & (1<<axis))) {
         Double_t w=GetDistributionUnderflowBinWidth(axis);
         if(w>0) {
            nBins++;
            d += w;
         }
      }
      if(includeOverflow && (fHasOverflow & (1<<axis))) {
         Double_t w=GetDistributionOverflowBinWidth(axis);
         if(w>0.0) {
            nBins++;
            d += w;
         }
      }
      if(nBins>0) {
         r=d/nBins;
      }
   } else {
      Error("GetDistributionAverageBinSize","axis %d does not exist",axis);
   }
   return r;
}

Double_t TUnfoldBinning::GetDistributionUnderflowBinWidth(Int_t axis) const
{
   // return width of the underflow bin
   //   axis: axis number
   TVectorD const *bins=GetDistributionBinning(axis);
   return (*bins)[1]-(*bins)[0];
}

Double_t TUnfoldBinning::GetDistributionOverflowBinWidth(Int_t axis) const
{
   // return width of the underflow bin
   //   axis: axis number
   TVectorD const *bins=GetDistributionBinning(axis);
   return (*bins)[bins->GetNrows()-1]-(*bins)[bins->GetNrows()-2];
}

Double_t TUnfoldBinning::GetDistributionBinCenter
(Int_t axis,Int_t bin) const
{
   // position of the bin center
   // input
   //   axis : axis number
   //   bin : bin number on the axis
   TVectorD const *bins=GetDistributionBinning(axis);
   Double_t r=0.0;
   if(bin<0) {
      // underflow bin
      r=(*bins)[0]-0.5*GetDistributionUnderflowBinWidth(axis);
   } else if(bin>=bins->GetNrows()-1) {
      // overflow bin
      r=(*bins)[bins->GetNrows()-1]+0.5*GetDistributionOverflowBinWidth(axis);
   } else {
      r=0.5*((*bins)[bin+1]+(*bins)[bin]);
   }
   return r;
}

Int_t TUnfoldBinning::ToGlobalBin(Int_t const *axisBins) const
{
  // get global bin number, given axis bin numbers
  //   axisBins[]: bin numbers on each axis
  // return: global bin nmber or -1 if not inside distribution
  Int_t dimension=GetDistributionDimension();
  Int_t r=0;
  if(dimension>0) {
    for(Int_t axis=dimension-1;axis>=0;axis--) {
      Int_t nMax=GetDistributionBinning(axis)->GetNrows()-1;
      Int_t i=axisBins[axis];
      if(fHasUnderflow & (1<<axis)) {
	nMax +=1;
	i +=1;
      }
      if(fHasOverflow & (1<<axis)) nMax +=1;
      if((i>=0)&&(i<nMax)) {
	r = r*nMax +i;
      } else {
	r=-1;
	break;
      }
    }
    if(r>=0) {
      r += GetStartBin();
    }
  } else {
    if((axisBins[0]>=0)&&(axisBins[0]<GetDistributionNumberOfBins()))
      r=GetStartBin()+axisBins[0];
  }
  return r;
}

TUnfoldBinning const *TUnfoldBinning::ToAxisBins
(Int_t globalBin,Int_t *axisBins) const
{
   // return distribution in which the bin is located
   // and bin numbers on the corresponding axes
   // input
   //   globalBin : global bin number
   // output
   //   if(GetDistributionDimension()>0) 
   //     axisBin[] : bin number on the individual axes
   //                 bin numbers are starting with -1 (underflow)
   //   else
   //     axisBin[0] : bin number, counted from zero
   // return value
   //   the distribution in which the globalBin is located
   //   or 0 if the globalBin is outside the tree
   TUnfoldBinning const *r=0;
   if((globalBin>=GetStartBin())&&(globalBin<GetEndBin())) {
      TUnfoldBinning const *node;
      for(node=GetChildNode();node && !r; node=node->GetNextNode()) {
         r=node->ToAxisBins(globalBin,axisBins);
      }
      if(!r) {
         r=this;
         Int_t i=globalBin-GetStartBin();
         Int_t dimension=GetDistributionDimension();
         if(dimension>0) {
            for(int axis=0;axis<dimension;axis++) {
               Int_t nMax=GetDistributionBinning(axis)->GetNrows()-1;
               axisBins[axis]=0;
               if(fHasUnderflow & (1<<axis)) {
                  axisBins[axis] =-1;
                  nMax += 1;
               }
               if(fHasOverflow & (1<<axis)) nMax +=1;
               axisBins[axis] += i % nMax;
               i /= nMax;
            }
         } else {
            axisBins[0]=i;
         }
      }
   }
   return r;
}

void TUnfoldBinning::DecodeAxisSteering
(const char *axisSteering,const char *options,Int_t *isOptionGiven) const
{
  // decode axis steering
  // input
  //   axisSteering: the steering to decode
  //   options: the allowed options to extract
  // output
  //   isOptionGiven[] : array of decoded steering options
  //            the dimension of isOptionGiven[] has to match the number of
  //            characters in "option"
  //
  // the axis steering is given in the form
  //   steering1;steering2;...;steeringN
  // all parts of the steering, sepatared by ';' are parsed
  // each part must have the form
  //   axisName[optionlist]
  // where:
  //   axisName : the name of the axis for which the optionlist is relevant
  //               if the name is the character '*', all axes are matched
  //   optionlist : for each option the corresonding character
  //
  // example:
  //   imagine this node has two axes, named "xgen" and "ygen"
  //  then
  //   DecodeAxisSteering("*[u];xgen[c]","cuo",options);
  //  will set the "U" option for all axes and the "C" option for the "xgen"
  //  axis, so:
  //    options[0]=0x1; // option 'c' is true for axis 0 (bit #0 is set)
  //    options[1]=0x3; // option 'u' is true for both axes (bit #0,#1 are set)
  //    options[2]=0x0; // option 'o' is not given (no bits are set)
  Int_t nOpt=TString(options).Length();
  for(Int_t i=0;i<nOpt;i++) isOptionGiven[i]=0;
  if(axisSteering) {
     TObjArray *patterns=TString(axisSteering).Tokenize(";");
     Int_t nPattern=patterns->GetEntries();
     Int_t nAxis=fAxisLabelList->GetEntries();
     for(Int_t i=0;i<nPattern;i++) {
        TString const &pattern=((TObjString * const)patterns->At(i))
           ->GetString();
        Int_t bracketBegin=pattern.Last('[');
        Int_t len=pattern.Length();
        if((bracketBegin>0)&&(pattern[len-1]==']')) {
	  TString axisId=pattern(0,bracketBegin);
	  Int_t mask=0;
	  if((axisId[0]=='*')&&(axisId.Length()==1)) {
	    // turn all bins on 
	    mask=(1<<nAxis)-1;
	  } else {
	    // if axis is there, turn its bit on
	    for(Int_t j=0;j<nAxis;j++) {
	      if(!axisId.CompareTo(GetDistributionAxisLabel(j))) {
		mask|= (1<<j);
	      }
	    }
	  }
	  for(Int_t o=0;o<nOpt;o++) {
	    if(pattern.Last(options[o])>bracketBegin) {
	      isOptionGiven[o] |= mask;
	    }
	  }
        } else {
           Error("DecodeAxisSteering",
                 "steering \"%s\" does not end with [options]",
		 (const char *)pattern);
        }
     }
  }
}

 TUnfoldBinning.cxx:1
 TUnfoldBinning.cxx:2
 TUnfoldBinning.cxx:3
 TUnfoldBinning.cxx:4
 TUnfoldBinning.cxx:5
 TUnfoldBinning.cxx:6
 TUnfoldBinning.cxx:7
 TUnfoldBinning.cxx:8
 TUnfoldBinning.cxx:9
 TUnfoldBinning.cxx:10
 TUnfoldBinning.cxx:11
 TUnfoldBinning.cxx:12
 TUnfoldBinning.cxx:13
 TUnfoldBinning.cxx:14
 TUnfoldBinning.cxx:15
 TUnfoldBinning.cxx:16
 TUnfoldBinning.cxx:17
 TUnfoldBinning.cxx:18
 TUnfoldBinning.cxx:19
 TUnfoldBinning.cxx:20
 TUnfoldBinning.cxx:21
 TUnfoldBinning.cxx:22
 TUnfoldBinning.cxx:23
 TUnfoldBinning.cxx:24
 TUnfoldBinning.cxx:25
 TUnfoldBinning.cxx:26
 TUnfoldBinning.cxx:27
 TUnfoldBinning.cxx:28
 TUnfoldBinning.cxx:29
 TUnfoldBinning.cxx:30
 TUnfoldBinning.cxx:31
 TUnfoldBinning.cxx:32
 TUnfoldBinning.cxx:33
 TUnfoldBinning.cxx:34
 TUnfoldBinning.cxx:35
 TUnfoldBinning.cxx:36
 TUnfoldBinning.cxx:37
 TUnfoldBinning.cxx:38
 TUnfoldBinning.cxx:39
 TUnfoldBinning.cxx:40
 TUnfoldBinning.cxx:41
 TUnfoldBinning.cxx:42
 TUnfoldBinning.cxx:43
 TUnfoldBinning.cxx:44
 TUnfoldBinning.cxx:45
 TUnfoldBinning.cxx:46
 TUnfoldBinning.cxx:47
 TUnfoldBinning.cxx:48
 TUnfoldBinning.cxx:49
 TUnfoldBinning.cxx:50
 TUnfoldBinning.cxx:51
 TUnfoldBinning.cxx:52
 TUnfoldBinning.cxx:53
 TUnfoldBinning.cxx:54
 TUnfoldBinning.cxx:55
 TUnfoldBinning.cxx:56
 TUnfoldBinning.cxx:57
 TUnfoldBinning.cxx:58
 TUnfoldBinning.cxx:59
 TUnfoldBinning.cxx:60
 TUnfoldBinning.cxx:61
 TUnfoldBinning.cxx:62
 TUnfoldBinning.cxx:63
 TUnfoldBinning.cxx:64
 TUnfoldBinning.cxx:65
 TUnfoldBinning.cxx:66
 TUnfoldBinning.cxx:67
 TUnfoldBinning.cxx:68
 TUnfoldBinning.cxx:69
 TUnfoldBinning.cxx:70
 TUnfoldBinning.cxx:71
 TUnfoldBinning.cxx:72
 TUnfoldBinning.cxx:73
 TUnfoldBinning.cxx:74
 TUnfoldBinning.cxx:75
 TUnfoldBinning.cxx:76
 TUnfoldBinning.cxx:77
 TUnfoldBinning.cxx:78
 TUnfoldBinning.cxx:79
 TUnfoldBinning.cxx:80
 TUnfoldBinning.cxx:81
 TUnfoldBinning.cxx:82
 TUnfoldBinning.cxx:83
 TUnfoldBinning.cxx:84
 TUnfoldBinning.cxx:85
 TUnfoldBinning.cxx:86
 TUnfoldBinning.cxx:87
 TUnfoldBinning.cxx:88
 TUnfoldBinning.cxx:89
 TUnfoldBinning.cxx:90
 TUnfoldBinning.cxx:91
 TUnfoldBinning.cxx:92
 TUnfoldBinning.cxx:93
 TUnfoldBinning.cxx:94
 TUnfoldBinning.cxx:95
 TUnfoldBinning.cxx:96
 TUnfoldBinning.cxx:97
 TUnfoldBinning.cxx:98
 TUnfoldBinning.cxx:99
 TUnfoldBinning.cxx:100
 TUnfoldBinning.cxx:101
 TUnfoldBinning.cxx:102
 TUnfoldBinning.cxx:103
 TUnfoldBinning.cxx:104
 TUnfoldBinning.cxx:105
 TUnfoldBinning.cxx:106
 TUnfoldBinning.cxx:107
 TUnfoldBinning.cxx:108
 TUnfoldBinning.cxx:109
 TUnfoldBinning.cxx:110
 TUnfoldBinning.cxx:111
 TUnfoldBinning.cxx:112
 TUnfoldBinning.cxx:113
 TUnfoldBinning.cxx:114
 TUnfoldBinning.cxx:115
 TUnfoldBinning.cxx:116
 TUnfoldBinning.cxx:117
 TUnfoldBinning.cxx:118
 TUnfoldBinning.cxx:119
 TUnfoldBinning.cxx:120
 TUnfoldBinning.cxx:121
 TUnfoldBinning.cxx:122
 TUnfoldBinning.cxx:123
 TUnfoldBinning.cxx:124
 TUnfoldBinning.cxx:125
 TUnfoldBinning.cxx:126
 TUnfoldBinning.cxx:127
 TUnfoldBinning.cxx:128
 TUnfoldBinning.cxx:129
 TUnfoldBinning.cxx:130
 TUnfoldBinning.cxx:131
 TUnfoldBinning.cxx:132
 TUnfoldBinning.cxx:133
 TUnfoldBinning.cxx:134
 TUnfoldBinning.cxx:135
 TUnfoldBinning.cxx:136
 TUnfoldBinning.cxx:137
 TUnfoldBinning.cxx:138
 TUnfoldBinning.cxx:139
 TUnfoldBinning.cxx:140
 TUnfoldBinning.cxx:141
 TUnfoldBinning.cxx:142
 TUnfoldBinning.cxx:143
 TUnfoldBinning.cxx:144
 TUnfoldBinning.cxx:145
 TUnfoldBinning.cxx:146
 TUnfoldBinning.cxx:147
 TUnfoldBinning.cxx:148
 TUnfoldBinning.cxx:149
 TUnfoldBinning.cxx:150
 TUnfoldBinning.cxx:151
 TUnfoldBinning.cxx:152
 TUnfoldBinning.cxx:153
 TUnfoldBinning.cxx:154
 TUnfoldBinning.cxx:155
 TUnfoldBinning.cxx:156
 TUnfoldBinning.cxx:157
 TUnfoldBinning.cxx:158
 TUnfoldBinning.cxx:159
 TUnfoldBinning.cxx:160
 TUnfoldBinning.cxx:161
 TUnfoldBinning.cxx:162
 TUnfoldBinning.cxx:163
 TUnfoldBinning.cxx:164
 TUnfoldBinning.cxx:165
 TUnfoldBinning.cxx:166
 TUnfoldBinning.cxx:167
 TUnfoldBinning.cxx:168
 TUnfoldBinning.cxx:169
 TUnfoldBinning.cxx:170
 TUnfoldBinning.cxx:171
 TUnfoldBinning.cxx:172
 TUnfoldBinning.cxx:173
 TUnfoldBinning.cxx:174
 TUnfoldBinning.cxx:175
 TUnfoldBinning.cxx:176
 TUnfoldBinning.cxx:177
 TUnfoldBinning.cxx:178
 TUnfoldBinning.cxx:179
 TUnfoldBinning.cxx:180
 TUnfoldBinning.cxx:181
 TUnfoldBinning.cxx:182
 TUnfoldBinning.cxx:183
 TUnfoldBinning.cxx:184
 TUnfoldBinning.cxx:185
 TUnfoldBinning.cxx:186
 TUnfoldBinning.cxx:187
 TUnfoldBinning.cxx:188
 TUnfoldBinning.cxx:189
 TUnfoldBinning.cxx:190
 TUnfoldBinning.cxx:191
 TUnfoldBinning.cxx:192
 TUnfoldBinning.cxx:193
 TUnfoldBinning.cxx:194
 TUnfoldBinning.cxx:195
 TUnfoldBinning.cxx:196
 TUnfoldBinning.cxx:197
 TUnfoldBinning.cxx:198
 TUnfoldBinning.cxx:199
 TUnfoldBinning.cxx:200
 TUnfoldBinning.cxx:201
 TUnfoldBinning.cxx:202
 TUnfoldBinning.cxx:203
 TUnfoldBinning.cxx:204
 TUnfoldBinning.cxx:205
 TUnfoldBinning.cxx:206
 TUnfoldBinning.cxx:207
 TUnfoldBinning.cxx:208
 TUnfoldBinning.cxx:209
 TUnfoldBinning.cxx:210
 TUnfoldBinning.cxx:211
 TUnfoldBinning.cxx:212
 TUnfoldBinning.cxx:213
 TUnfoldBinning.cxx:214
 TUnfoldBinning.cxx:215
 TUnfoldBinning.cxx:216
 TUnfoldBinning.cxx:217
 TUnfoldBinning.cxx:218
 TUnfoldBinning.cxx:219
 TUnfoldBinning.cxx:220
 TUnfoldBinning.cxx:221
 TUnfoldBinning.cxx:222
 TUnfoldBinning.cxx:223
 TUnfoldBinning.cxx:224
 TUnfoldBinning.cxx:225
 TUnfoldBinning.cxx:226
 TUnfoldBinning.cxx:227
 TUnfoldBinning.cxx:228
 TUnfoldBinning.cxx:229
 TUnfoldBinning.cxx:230
 TUnfoldBinning.cxx:231
 TUnfoldBinning.cxx:232
 TUnfoldBinning.cxx:233
 TUnfoldBinning.cxx:234
 TUnfoldBinning.cxx:235
 TUnfoldBinning.cxx:236
 TUnfoldBinning.cxx:237
 TUnfoldBinning.cxx:238
 TUnfoldBinning.cxx:239
 TUnfoldBinning.cxx:240
 TUnfoldBinning.cxx:241
 TUnfoldBinning.cxx:242
 TUnfoldBinning.cxx:243
 TUnfoldBinning.cxx:244
 TUnfoldBinning.cxx:245
 TUnfoldBinning.cxx:246
 TUnfoldBinning.cxx:247
 TUnfoldBinning.cxx:248
 TUnfoldBinning.cxx:249
 TUnfoldBinning.cxx:250
 TUnfoldBinning.cxx:251
 TUnfoldBinning.cxx:252
 TUnfoldBinning.cxx:253
 TUnfoldBinning.cxx:254
 TUnfoldBinning.cxx:255
 TUnfoldBinning.cxx:256
 TUnfoldBinning.cxx:257
 TUnfoldBinning.cxx:258
 TUnfoldBinning.cxx:259
 TUnfoldBinning.cxx:260
 TUnfoldBinning.cxx:261
 TUnfoldBinning.cxx:262
 TUnfoldBinning.cxx:263
 TUnfoldBinning.cxx:264
 TUnfoldBinning.cxx:265
 TUnfoldBinning.cxx:266
 TUnfoldBinning.cxx:267
 TUnfoldBinning.cxx:268
 TUnfoldBinning.cxx:269
 TUnfoldBinning.cxx:270
 TUnfoldBinning.cxx:271
 TUnfoldBinning.cxx:272
 TUnfoldBinning.cxx:273
 TUnfoldBinning.cxx:274
 TUnfoldBinning.cxx:275
 TUnfoldBinning.cxx:276
 TUnfoldBinning.cxx:277
 TUnfoldBinning.cxx:278
 TUnfoldBinning.cxx:279
 TUnfoldBinning.cxx:280
 TUnfoldBinning.cxx:281
 TUnfoldBinning.cxx:282
 TUnfoldBinning.cxx:283
 TUnfoldBinning.cxx:284
 TUnfoldBinning.cxx:285
 TUnfoldBinning.cxx:286
 TUnfoldBinning.cxx:287
 TUnfoldBinning.cxx:288
 TUnfoldBinning.cxx:289
 TUnfoldBinning.cxx:290
 TUnfoldBinning.cxx:291
 TUnfoldBinning.cxx:292
 TUnfoldBinning.cxx:293
 TUnfoldBinning.cxx:294
 TUnfoldBinning.cxx:295
 TUnfoldBinning.cxx:296
 TUnfoldBinning.cxx:297
 TUnfoldBinning.cxx:298
 TUnfoldBinning.cxx:299
 TUnfoldBinning.cxx:300
 TUnfoldBinning.cxx:301
 TUnfoldBinning.cxx:302
 TUnfoldBinning.cxx:303
 TUnfoldBinning.cxx:304
 TUnfoldBinning.cxx:305
 TUnfoldBinning.cxx:306
 TUnfoldBinning.cxx:307
 TUnfoldBinning.cxx:308
 TUnfoldBinning.cxx:309
 TUnfoldBinning.cxx:310
 TUnfoldBinning.cxx:311
 TUnfoldBinning.cxx:312
 TUnfoldBinning.cxx:313
 TUnfoldBinning.cxx:314
 TUnfoldBinning.cxx:315
 TUnfoldBinning.cxx:316
 TUnfoldBinning.cxx:317
 TUnfoldBinning.cxx:318
 TUnfoldBinning.cxx:319
 TUnfoldBinning.cxx:320
 TUnfoldBinning.cxx:321
 TUnfoldBinning.cxx:322
 TUnfoldBinning.cxx:323
 TUnfoldBinning.cxx:324
 TUnfoldBinning.cxx:325
 TUnfoldBinning.cxx:326
 TUnfoldBinning.cxx:327
 TUnfoldBinning.cxx:328
 TUnfoldBinning.cxx:329
 TUnfoldBinning.cxx:330
 TUnfoldBinning.cxx:331
 TUnfoldBinning.cxx:332
 TUnfoldBinning.cxx:333
 TUnfoldBinning.cxx:334
 TUnfoldBinning.cxx:335
 TUnfoldBinning.cxx:336
 TUnfoldBinning.cxx:337
 TUnfoldBinning.cxx:338
 TUnfoldBinning.cxx:339
 TUnfoldBinning.cxx:340
 TUnfoldBinning.cxx:341
 TUnfoldBinning.cxx:342
 TUnfoldBinning.cxx:343
 TUnfoldBinning.cxx:344
 TUnfoldBinning.cxx:345
 TUnfoldBinning.cxx:346
 TUnfoldBinning.cxx:347
 TUnfoldBinning.cxx:348
 TUnfoldBinning.cxx:349
 TUnfoldBinning.cxx:350
 TUnfoldBinning.cxx:351
 TUnfoldBinning.cxx:352
 TUnfoldBinning.cxx:353
 TUnfoldBinning.cxx:354
 TUnfoldBinning.cxx:355
 TUnfoldBinning.cxx:356
 TUnfoldBinning.cxx:357
 TUnfoldBinning.cxx:358
 TUnfoldBinning.cxx:359
 TUnfoldBinning.cxx:360
 TUnfoldBinning.cxx:361
 TUnfoldBinning.cxx:362
 TUnfoldBinning.cxx:363
 TUnfoldBinning.cxx:364
 TUnfoldBinning.cxx:365
 TUnfoldBinning.cxx:366
 TUnfoldBinning.cxx:367
 TUnfoldBinning.cxx:368
 TUnfoldBinning.cxx:369
 TUnfoldBinning.cxx:370
 TUnfoldBinning.cxx:371
 TUnfoldBinning.cxx:372
 TUnfoldBinning.cxx:373
 TUnfoldBinning.cxx:374
 TUnfoldBinning.cxx:375
 TUnfoldBinning.cxx:376
 TUnfoldBinning.cxx:377
 TUnfoldBinning.cxx:378
 TUnfoldBinning.cxx:379
 TUnfoldBinning.cxx:380
 TUnfoldBinning.cxx:381
 TUnfoldBinning.cxx:382
 TUnfoldBinning.cxx:383
 TUnfoldBinning.cxx:384
 TUnfoldBinning.cxx:385
 TUnfoldBinning.cxx:386
 TUnfoldBinning.cxx:387
 TUnfoldBinning.cxx:388
 TUnfoldBinning.cxx:389
 TUnfoldBinning.cxx:390
 TUnfoldBinning.cxx:391
 TUnfoldBinning.cxx:392
 TUnfoldBinning.cxx:393
 TUnfoldBinning.cxx:394
 TUnfoldBinning.cxx:395
 TUnfoldBinning.cxx:396
 TUnfoldBinning.cxx:397
 TUnfoldBinning.cxx:398
 TUnfoldBinning.cxx:399
 TUnfoldBinning.cxx:400
 TUnfoldBinning.cxx:401
 TUnfoldBinning.cxx:402
 TUnfoldBinning.cxx:403
 TUnfoldBinning.cxx:404
 TUnfoldBinning.cxx:405
 TUnfoldBinning.cxx:406
 TUnfoldBinning.cxx:407
 TUnfoldBinning.cxx:408
 TUnfoldBinning.cxx:409
 TUnfoldBinning.cxx:410
 TUnfoldBinning.cxx:411
 TUnfoldBinning.cxx:412
 TUnfoldBinning.cxx:413
 TUnfoldBinning.cxx:414
 TUnfoldBinning.cxx:415
 TUnfoldBinning.cxx:416
 TUnfoldBinning.cxx:417
 TUnfoldBinning.cxx:418
 TUnfoldBinning.cxx:419
 TUnfoldBinning.cxx:420
 TUnfoldBinning.cxx:421
 TUnfoldBinning.cxx:422
 TUnfoldBinning.cxx:423
 TUnfoldBinning.cxx:424
 TUnfoldBinning.cxx:425
 TUnfoldBinning.cxx:426
 TUnfoldBinning.cxx:427
 TUnfoldBinning.cxx:428
 TUnfoldBinning.cxx:429
 TUnfoldBinning.cxx:430
 TUnfoldBinning.cxx:431
 TUnfoldBinning.cxx:432
 TUnfoldBinning.cxx:433
 TUnfoldBinning.cxx:434
 TUnfoldBinning.cxx:435
 TUnfoldBinning.cxx:436
 TUnfoldBinning.cxx:437
 TUnfoldBinning.cxx:438
 TUnfoldBinning.cxx:439
 TUnfoldBinning.cxx:440
 TUnfoldBinning.cxx:441
 TUnfoldBinning.cxx:442
 TUnfoldBinning.cxx:443
 TUnfoldBinning.cxx:444
 TUnfoldBinning.cxx:445
 TUnfoldBinning.cxx:446
 TUnfoldBinning.cxx:447
 TUnfoldBinning.cxx:448
 TUnfoldBinning.cxx:449
 TUnfoldBinning.cxx:450
 TUnfoldBinning.cxx:451
 TUnfoldBinning.cxx:452
 TUnfoldBinning.cxx:453
 TUnfoldBinning.cxx:454
 TUnfoldBinning.cxx:455
 TUnfoldBinning.cxx:456
 TUnfoldBinning.cxx:457
 TUnfoldBinning.cxx:458
 TUnfoldBinning.cxx:459
 TUnfoldBinning.cxx:460
 TUnfoldBinning.cxx:461
 TUnfoldBinning.cxx:462
 TUnfoldBinning.cxx:463
 TUnfoldBinning.cxx:464
 TUnfoldBinning.cxx:465
 TUnfoldBinning.cxx:466
 TUnfoldBinning.cxx:467
 TUnfoldBinning.cxx:468
 TUnfoldBinning.cxx:469
 TUnfoldBinning.cxx:470
 TUnfoldBinning.cxx:471
 TUnfoldBinning.cxx:472
 TUnfoldBinning.cxx:473
 TUnfoldBinning.cxx:474
 TUnfoldBinning.cxx:475
 TUnfoldBinning.cxx:476
 TUnfoldBinning.cxx:477
 TUnfoldBinning.cxx:478
 TUnfoldBinning.cxx:479
 TUnfoldBinning.cxx:480
 TUnfoldBinning.cxx:481
 TUnfoldBinning.cxx:482
 TUnfoldBinning.cxx:483
 TUnfoldBinning.cxx:484
 TUnfoldBinning.cxx:485
 TUnfoldBinning.cxx:486
 TUnfoldBinning.cxx:487
 TUnfoldBinning.cxx:488
 TUnfoldBinning.cxx:489
 TUnfoldBinning.cxx:490
 TUnfoldBinning.cxx:491
 TUnfoldBinning.cxx:492
 TUnfoldBinning.cxx:493
 TUnfoldBinning.cxx:494
 TUnfoldBinning.cxx:495
 TUnfoldBinning.cxx:496
 TUnfoldBinning.cxx:497
 TUnfoldBinning.cxx:498
 TUnfoldBinning.cxx:499
 TUnfoldBinning.cxx:500
 TUnfoldBinning.cxx:501
 TUnfoldBinning.cxx:502
 TUnfoldBinning.cxx:503
 TUnfoldBinning.cxx:504
 TUnfoldBinning.cxx:505
 TUnfoldBinning.cxx:506
 TUnfoldBinning.cxx:507
 TUnfoldBinning.cxx:508
 TUnfoldBinning.cxx:509
 TUnfoldBinning.cxx:510
 TUnfoldBinning.cxx:511
 TUnfoldBinning.cxx:512
 TUnfoldBinning.cxx:513
 TUnfoldBinning.cxx:514
 TUnfoldBinning.cxx:515
 TUnfoldBinning.cxx:516
 TUnfoldBinning.cxx:517
 TUnfoldBinning.cxx:518
 TUnfoldBinning.cxx:519
 TUnfoldBinning.cxx:520
 TUnfoldBinning.cxx:521
 TUnfoldBinning.cxx:522
 TUnfoldBinning.cxx:523
 TUnfoldBinning.cxx:524
 TUnfoldBinning.cxx:525
 TUnfoldBinning.cxx:526
 TUnfoldBinning.cxx:527
 TUnfoldBinning.cxx:528
 TUnfoldBinning.cxx:529
 TUnfoldBinning.cxx:530
 TUnfoldBinning.cxx:531
 TUnfoldBinning.cxx:532
 TUnfoldBinning.cxx:533
 TUnfoldBinning.cxx:534
 TUnfoldBinning.cxx:535
 TUnfoldBinning.cxx:536
 TUnfoldBinning.cxx:537
 TUnfoldBinning.cxx:538
 TUnfoldBinning.cxx:539
 TUnfoldBinning.cxx:540
 TUnfoldBinning.cxx:541
 TUnfoldBinning.cxx:542
 TUnfoldBinning.cxx:543
 TUnfoldBinning.cxx:544
 TUnfoldBinning.cxx:545
 TUnfoldBinning.cxx:546
 TUnfoldBinning.cxx:547
 TUnfoldBinning.cxx:548
 TUnfoldBinning.cxx:549
 TUnfoldBinning.cxx:550
 TUnfoldBinning.cxx:551
 TUnfoldBinning.cxx:552
 TUnfoldBinning.cxx:553
 TUnfoldBinning.cxx:554
 TUnfoldBinning.cxx:555
 TUnfoldBinning.cxx:556
 TUnfoldBinning.cxx:557
 TUnfoldBinning.cxx:558
 TUnfoldBinning.cxx:559
 TUnfoldBinning.cxx:560
 TUnfoldBinning.cxx:561
 TUnfoldBinning.cxx:562
 TUnfoldBinning.cxx:563
 TUnfoldBinning.cxx:564
 TUnfoldBinning.cxx:565
 TUnfoldBinning.cxx:566
 TUnfoldBinning.cxx:567
 TUnfoldBinning.cxx:568
 TUnfoldBinning.cxx:569
 TUnfoldBinning.cxx:570
 TUnfoldBinning.cxx:571
 TUnfoldBinning.cxx:572
 TUnfoldBinning.cxx:573
 TUnfoldBinning.cxx:574
 TUnfoldBinning.cxx:575
 TUnfoldBinning.cxx:576
 TUnfoldBinning.cxx:577
 TUnfoldBinning.cxx:578
 TUnfoldBinning.cxx:579
 TUnfoldBinning.cxx:580
 TUnfoldBinning.cxx:581
 TUnfoldBinning.cxx:582
 TUnfoldBinning.cxx:583
 TUnfoldBinning.cxx:584
 TUnfoldBinning.cxx:585
 TUnfoldBinning.cxx:586
 TUnfoldBinning.cxx:587
 TUnfoldBinning.cxx:588
 TUnfoldBinning.cxx:589
 TUnfoldBinning.cxx:590
 TUnfoldBinning.cxx:591
 TUnfoldBinning.cxx:592
 TUnfoldBinning.cxx:593
 TUnfoldBinning.cxx:594
 TUnfoldBinning.cxx:595
 TUnfoldBinning.cxx:596
 TUnfoldBinning.cxx:597
 TUnfoldBinning.cxx:598
 TUnfoldBinning.cxx:599
 TUnfoldBinning.cxx:600
 TUnfoldBinning.cxx:601
 TUnfoldBinning.cxx:602
 TUnfoldBinning.cxx:603
 TUnfoldBinning.cxx:604
 TUnfoldBinning.cxx:605
 TUnfoldBinning.cxx:606
 TUnfoldBinning.cxx:607
 TUnfoldBinning.cxx:608
 TUnfoldBinning.cxx:609
 TUnfoldBinning.cxx:610
 TUnfoldBinning.cxx:611
 TUnfoldBinning.cxx:612
 TUnfoldBinning.cxx:613
 TUnfoldBinning.cxx:614
 TUnfoldBinning.cxx:615
 TUnfoldBinning.cxx:616
 TUnfoldBinning.cxx:617
 TUnfoldBinning.cxx:618
 TUnfoldBinning.cxx:619
 TUnfoldBinning.cxx:620
 TUnfoldBinning.cxx:621
 TUnfoldBinning.cxx:622
 TUnfoldBinning.cxx:623
 TUnfoldBinning.cxx:624
 TUnfoldBinning.cxx:625
 TUnfoldBinning.cxx:626
 TUnfoldBinning.cxx:627
 TUnfoldBinning.cxx:628
 TUnfoldBinning.cxx:629
 TUnfoldBinning.cxx:630
 TUnfoldBinning.cxx:631
 TUnfoldBinning.cxx:632
 TUnfoldBinning.cxx:633
 TUnfoldBinning.cxx:634
 TUnfoldBinning.cxx:635
 TUnfoldBinning.cxx:636
 TUnfoldBinning.cxx:637
 TUnfoldBinning.cxx:638
 TUnfoldBinning.cxx:639
 TUnfoldBinning.cxx:640
 TUnfoldBinning.cxx:641
 TUnfoldBinning.cxx:642
 TUnfoldBinning.cxx:643
 TUnfoldBinning.cxx:644
 TUnfoldBinning.cxx:645
 TUnfoldBinning.cxx:646
 TUnfoldBinning.cxx:647
 TUnfoldBinning.cxx:648
 TUnfoldBinning.cxx:649
 TUnfoldBinning.cxx:650
 TUnfoldBinning.cxx:651
 TUnfoldBinning.cxx:652
 TUnfoldBinning.cxx:653
 TUnfoldBinning.cxx:654
 TUnfoldBinning.cxx:655
 TUnfoldBinning.cxx:656
 TUnfoldBinning.cxx:657
 TUnfoldBinning.cxx:658
 TUnfoldBinning.cxx:659
 TUnfoldBinning.cxx:660
 TUnfoldBinning.cxx:661
 TUnfoldBinning.cxx:662
 TUnfoldBinning.cxx:663
 TUnfoldBinning.cxx:664
 TUnfoldBinning.cxx:665
 TUnfoldBinning.cxx:666
 TUnfoldBinning.cxx:667
 TUnfoldBinning.cxx:668
 TUnfoldBinning.cxx:669
 TUnfoldBinning.cxx:670
 TUnfoldBinning.cxx:671
 TUnfoldBinning.cxx:672
 TUnfoldBinning.cxx:673
 TUnfoldBinning.cxx:674
 TUnfoldBinning.cxx:675
 TUnfoldBinning.cxx:676
 TUnfoldBinning.cxx:677
 TUnfoldBinning.cxx:678
 TUnfoldBinning.cxx:679
 TUnfoldBinning.cxx:680
 TUnfoldBinning.cxx:681
 TUnfoldBinning.cxx:682
 TUnfoldBinning.cxx:683
 TUnfoldBinning.cxx:684
 TUnfoldBinning.cxx:685
 TUnfoldBinning.cxx:686
 TUnfoldBinning.cxx:687
 TUnfoldBinning.cxx:688
 TUnfoldBinning.cxx:689
 TUnfoldBinning.cxx:690
 TUnfoldBinning.cxx:691
 TUnfoldBinning.cxx:692
 TUnfoldBinning.cxx:693
 TUnfoldBinning.cxx:694
 TUnfoldBinning.cxx:695
 TUnfoldBinning.cxx:696
 TUnfoldBinning.cxx:697
 TUnfoldBinning.cxx:698
 TUnfoldBinning.cxx:699
 TUnfoldBinning.cxx:700
 TUnfoldBinning.cxx:701
 TUnfoldBinning.cxx:702
 TUnfoldBinning.cxx:703
 TUnfoldBinning.cxx:704
 TUnfoldBinning.cxx:705
 TUnfoldBinning.cxx:706
 TUnfoldBinning.cxx:707
 TUnfoldBinning.cxx:708
 TUnfoldBinning.cxx:709
 TUnfoldBinning.cxx:710
 TUnfoldBinning.cxx:711
 TUnfoldBinning.cxx:712
 TUnfoldBinning.cxx:713
 TUnfoldBinning.cxx:714
 TUnfoldBinning.cxx:715
 TUnfoldBinning.cxx:716
 TUnfoldBinning.cxx:717
 TUnfoldBinning.cxx:718
 TUnfoldBinning.cxx:719
 TUnfoldBinning.cxx:720
 TUnfoldBinning.cxx:721
 TUnfoldBinning.cxx:722
 TUnfoldBinning.cxx:723
 TUnfoldBinning.cxx:724
 TUnfoldBinning.cxx:725
 TUnfoldBinning.cxx:726
 TUnfoldBinning.cxx:727
 TUnfoldBinning.cxx:728
 TUnfoldBinning.cxx:729
 TUnfoldBinning.cxx:730
 TUnfoldBinning.cxx:731
 TUnfoldBinning.cxx:732
 TUnfoldBinning.cxx:733
 TUnfoldBinning.cxx:734
 TUnfoldBinning.cxx:735
 TUnfoldBinning.cxx:736
 TUnfoldBinning.cxx:737
 TUnfoldBinning.cxx:738
 TUnfoldBinning.cxx:739
 TUnfoldBinning.cxx:740
 TUnfoldBinning.cxx:741
 TUnfoldBinning.cxx:742
 TUnfoldBinning.cxx:743
 TUnfoldBinning.cxx:744
 TUnfoldBinning.cxx:745
 TUnfoldBinning.cxx:746
 TUnfoldBinning.cxx:747
 TUnfoldBinning.cxx:748
 TUnfoldBinning.cxx:749
 TUnfoldBinning.cxx:750
 TUnfoldBinning.cxx:751
 TUnfoldBinning.cxx:752
 TUnfoldBinning.cxx:753
 TUnfoldBinning.cxx:754
 TUnfoldBinning.cxx:755
 TUnfoldBinning.cxx:756
 TUnfoldBinning.cxx:757
 TUnfoldBinning.cxx:758
 TUnfoldBinning.cxx:759
 TUnfoldBinning.cxx:760
 TUnfoldBinning.cxx:761
 TUnfoldBinning.cxx:762
 TUnfoldBinning.cxx:763
 TUnfoldBinning.cxx:764
 TUnfoldBinning.cxx:765
 TUnfoldBinning.cxx:766
 TUnfoldBinning.cxx:767
 TUnfoldBinning.cxx:768
 TUnfoldBinning.cxx:769
 TUnfoldBinning.cxx:770
 TUnfoldBinning.cxx:771
 TUnfoldBinning.cxx:772
 TUnfoldBinning.cxx:773
 TUnfoldBinning.cxx:774
 TUnfoldBinning.cxx:775
 TUnfoldBinning.cxx:776
 TUnfoldBinning.cxx:777
 TUnfoldBinning.cxx:778
 TUnfoldBinning.cxx:779
 TUnfoldBinning.cxx:780
 TUnfoldBinning.cxx:781
 TUnfoldBinning.cxx:782
 TUnfoldBinning.cxx:783
 TUnfoldBinning.cxx:784
 TUnfoldBinning.cxx:785
 TUnfoldBinning.cxx:786
 TUnfoldBinning.cxx:787
 TUnfoldBinning.cxx:788
 TUnfoldBinning.cxx:789
 TUnfoldBinning.cxx:790
 TUnfoldBinning.cxx:791
 TUnfoldBinning.cxx:792
 TUnfoldBinning.cxx:793
 TUnfoldBinning.cxx:794
 TUnfoldBinning.cxx:795
 TUnfoldBinning.cxx:796
 TUnfoldBinning.cxx:797
 TUnfoldBinning.cxx:798
 TUnfoldBinning.cxx:799
 TUnfoldBinning.cxx:800
 TUnfoldBinning.cxx:801
 TUnfoldBinning.cxx:802
 TUnfoldBinning.cxx:803
 TUnfoldBinning.cxx:804
 TUnfoldBinning.cxx:805
 TUnfoldBinning.cxx:806
 TUnfoldBinning.cxx:807
 TUnfoldBinning.cxx:808
 TUnfoldBinning.cxx:809
 TUnfoldBinning.cxx:810
 TUnfoldBinning.cxx:811
 TUnfoldBinning.cxx:812
 TUnfoldBinning.cxx:813
 TUnfoldBinning.cxx:814
 TUnfoldBinning.cxx:815
 TUnfoldBinning.cxx:816
 TUnfoldBinning.cxx:817
 TUnfoldBinning.cxx:818
 TUnfoldBinning.cxx:819
 TUnfoldBinning.cxx:820
 TUnfoldBinning.cxx:821
 TUnfoldBinning.cxx:822
 TUnfoldBinning.cxx:823
 TUnfoldBinning.cxx:824
 TUnfoldBinning.cxx:825
 TUnfoldBinning.cxx:826
 TUnfoldBinning.cxx:827
 TUnfoldBinning.cxx:828
 TUnfoldBinning.cxx:829
 TUnfoldBinning.cxx:830
 TUnfoldBinning.cxx:831
 TUnfoldBinning.cxx:832
 TUnfoldBinning.cxx:833
 TUnfoldBinning.cxx:834
 TUnfoldBinning.cxx:835
 TUnfoldBinning.cxx:836
 TUnfoldBinning.cxx:837
 TUnfoldBinning.cxx:838
 TUnfoldBinning.cxx:839
 TUnfoldBinning.cxx:840
 TUnfoldBinning.cxx:841
 TUnfoldBinning.cxx:842
 TUnfoldBinning.cxx:843
 TUnfoldBinning.cxx:844
 TUnfoldBinning.cxx:845
 TUnfoldBinning.cxx:846
 TUnfoldBinning.cxx:847
 TUnfoldBinning.cxx:848
 TUnfoldBinning.cxx:849
 TUnfoldBinning.cxx:850
 TUnfoldBinning.cxx:851
 TUnfoldBinning.cxx:852
 TUnfoldBinning.cxx:853
 TUnfoldBinning.cxx:854
 TUnfoldBinning.cxx:855
 TUnfoldBinning.cxx:856
 TUnfoldBinning.cxx:857
 TUnfoldBinning.cxx:858
 TUnfoldBinning.cxx:859
 TUnfoldBinning.cxx:860
 TUnfoldBinning.cxx:861
 TUnfoldBinning.cxx:862
 TUnfoldBinning.cxx:863
 TUnfoldBinning.cxx:864
 TUnfoldBinning.cxx:865
 TUnfoldBinning.cxx:866
 TUnfoldBinning.cxx:867
 TUnfoldBinning.cxx:868
 TUnfoldBinning.cxx:869
 TUnfoldBinning.cxx:870
 TUnfoldBinning.cxx:871
 TUnfoldBinning.cxx:872
 TUnfoldBinning.cxx:873
 TUnfoldBinning.cxx:874
 TUnfoldBinning.cxx:875
 TUnfoldBinning.cxx:876
 TUnfoldBinning.cxx:877
 TUnfoldBinning.cxx:878
 TUnfoldBinning.cxx:879
 TUnfoldBinning.cxx:880
 TUnfoldBinning.cxx:881
 TUnfoldBinning.cxx:882
 TUnfoldBinning.cxx:883
 TUnfoldBinning.cxx:884
 TUnfoldBinning.cxx:885
 TUnfoldBinning.cxx:886
 TUnfoldBinning.cxx:887
 TUnfoldBinning.cxx:888
 TUnfoldBinning.cxx:889
 TUnfoldBinning.cxx:890
 TUnfoldBinning.cxx:891
 TUnfoldBinning.cxx:892
 TUnfoldBinning.cxx:893
 TUnfoldBinning.cxx:894
 TUnfoldBinning.cxx:895
 TUnfoldBinning.cxx:896
 TUnfoldBinning.cxx:897
 TUnfoldBinning.cxx:898
 TUnfoldBinning.cxx:899
 TUnfoldBinning.cxx:900
 TUnfoldBinning.cxx:901
 TUnfoldBinning.cxx:902
 TUnfoldBinning.cxx:903
 TUnfoldBinning.cxx:904
 TUnfoldBinning.cxx:905
 TUnfoldBinning.cxx:906
 TUnfoldBinning.cxx:907
 TUnfoldBinning.cxx:908
 TUnfoldBinning.cxx:909
 TUnfoldBinning.cxx:910
 TUnfoldBinning.cxx:911
 TUnfoldBinning.cxx:912
 TUnfoldBinning.cxx:913
 TUnfoldBinning.cxx:914
 TUnfoldBinning.cxx:915
 TUnfoldBinning.cxx:916
 TUnfoldBinning.cxx:917
 TUnfoldBinning.cxx:918
 TUnfoldBinning.cxx:919
 TUnfoldBinning.cxx:920
 TUnfoldBinning.cxx:921
 TUnfoldBinning.cxx:922
 TUnfoldBinning.cxx:923
 TUnfoldBinning.cxx:924
 TUnfoldBinning.cxx:925
 TUnfoldBinning.cxx:926
 TUnfoldBinning.cxx:927
 TUnfoldBinning.cxx:928
 TUnfoldBinning.cxx:929
 TUnfoldBinning.cxx:930
 TUnfoldBinning.cxx:931
 TUnfoldBinning.cxx:932
 TUnfoldBinning.cxx:933
 TUnfoldBinning.cxx:934
 TUnfoldBinning.cxx:935
 TUnfoldBinning.cxx:936
 TUnfoldBinning.cxx:937
 TUnfoldBinning.cxx:938
 TUnfoldBinning.cxx:939
 TUnfoldBinning.cxx:940
 TUnfoldBinning.cxx:941
 TUnfoldBinning.cxx:942
 TUnfoldBinning.cxx:943
 TUnfoldBinning.cxx:944
 TUnfoldBinning.cxx:945
 TUnfoldBinning.cxx:946
 TUnfoldBinning.cxx:947
 TUnfoldBinning.cxx:948
 TUnfoldBinning.cxx:949
 TUnfoldBinning.cxx:950
 TUnfoldBinning.cxx:951
 TUnfoldBinning.cxx:952
 TUnfoldBinning.cxx:953
 TUnfoldBinning.cxx:954
 TUnfoldBinning.cxx:955
 TUnfoldBinning.cxx:956
 TUnfoldBinning.cxx:957
 TUnfoldBinning.cxx:958
 TUnfoldBinning.cxx:959
 TUnfoldBinning.cxx:960
 TUnfoldBinning.cxx:961
 TUnfoldBinning.cxx:962
 TUnfoldBinning.cxx:963
 TUnfoldBinning.cxx:964
 TUnfoldBinning.cxx:965
 TUnfoldBinning.cxx:966
 TUnfoldBinning.cxx:967
 TUnfoldBinning.cxx:968
 TUnfoldBinning.cxx:969
 TUnfoldBinning.cxx:970
 TUnfoldBinning.cxx:971
 TUnfoldBinning.cxx:972
 TUnfoldBinning.cxx:973
 TUnfoldBinning.cxx:974
 TUnfoldBinning.cxx:975
 TUnfoldBinning.cxx:976
 TUnfoldBinning.cxx:977
 TUnfoldBinning.cxx:978
 TUnfoldBinning.cxx:979
 TUnfoldBinning.cxx:980
 TUnfoldBinning.cxx:981
 TUnfoldBinning.cxx:982
 TUnfoldBinning.cxx:983
 TUnfoldBinning.cxx:984
 TUnfoldBinning.cxx:985
 TUnfoldBinning.cxx:986
 TUnfoldBinning.cxx:987
 TUnfoldBinning.cxx:988
 TUnfoldBinning.cxx:989
 TUnfoldBinning.cxx:990
 TUnfoldBinning.cxx:991
 TUnfoldBinning.cxx:992
 TUnfoldBinning.cxx:993
 TUnfoldBinning.cxx:994
 TUnfoldBinning.cxx:995
 TUnfoldBinning.cxx:996
 TUnfoldBinning.cxx:997
 TUnfoldBinning.cxx:998
 TUnfoldBinning.cxx:999
 TUnfoldBinning.cxx:1000
 TUnfoldBinning.cxx:1001
 TUnfoldBinning.cxx:1002
 TUnfoldBinning.cxx:1003
 TUnfoldBinning.cxx:1004
 TUnfoldBinning.cxx:1005
 TUnfoldBinning.cxx:1006
 TUnfoldBinning.cxx:1007
 TUnfoldBinning.cxx:1008
 TUnfoldBinning.cxx:1009
 TUnfoldBinning.cxx:1010
 TUnfoldBinning.cxx:1011
 TUnfoldBinning.cxx:1012
 TUnfoldBinning.cxx:1013
 TUnfoldBinning.cxx:1014
 TUnfoldBinning.cxx:1015
 TUnfoldBinning.cxx:1016
 TUnfoldBinning.cxx:1017
 TUnfoldBinning.cxx:1018
 TUnfoldBinning.cxx:1019
 TUnfoldBinning.cxx:1020
 TUnfoldBinning.cxx:1021
 TUnfoldBinning.cxx:1022
 TUnfoldBinning.cxx:1023
 TUnfoldBinning.cxx:1024
 TUnfoldBinning.cxx:1025
 TUnfoldBinning.cxx:1026
 TUnfoldBinning.cxx:1027
 TUnfoldBinning.cxx:1028
 TUnfoldBinning.cxx:1029
 TUnfoldBinning.cxx:1030
 TUnfoldBinning.cxx:1031
 TUnfoldBinning.cxx:1032
 TUnfoldBinning.cxx:1033
 TUnfoldBinning.cxx:1034
 TUnfoldBinning.cxx:1035
 TUnfoldBinning.cxx:1036
 TUnfoldBinning.cxx:1037
 TUnfoldBinning.cxx:1038
 TUnfoldBinning.cxx:1039
 TUnfoldBinning.cxx:1040
 TUnfoldBinning.cxx:1041
 TUnfoldBinning.cxx:1042
 TUnfoldBinning.cxx:1043
 TUnfoldBinning.cxx:1044
 TUnfoldBinning.cxx:1045
 TUnfoldBinning.cxx:1046
 TUnfoldBinning.cxx:1047
 TUnfoldBinning.cxx:1048
 TUnfoldBinning.cxx:1049
 TUnfoldBinning.cxx:1050
 TUnfoldBinning.cxx:1051
 TUnfoldBinning.cxx:1052
 TUnfoldBinning.cxx:1053
 TUnfoldBinning.cxx:1054
 TUnfoldBinning.cxx:1055
 TUnfoldBinning.cxx:1056
 TUnfoldBinning.cxx:1057
 TUnfoldBinning.cxx:1058
 TUnfoldBinning.cxx:1059
 TUnfoldBinning.cxx:1060
 TUnfoldBinning.cxx:1061
 TUnfoldBinning.cxx:1062
 TUnfoldBinning.cxx:1063
 TUnfoldBinning.cxx:1064
 TUnfoldBinning.cxx:1065
 TUnfoldBinning.cxx:1066
 TUnfoldBinning.cxx:1067
 TUnfoldBinning.cxx:1068
 TUnfoldBinning.cxx:1069
 TUnfoldBinning.cxx:1070
 TUnfoldBinning.cxx:1071
 TUnfoldBinning.cxx:1072
 TUnfoldBinning.cxx:1073
 TUnfoldBinning.cxx:1074
 TUnfoldBinning.cxx:1075
 TUnfoldBinning.cxx:1076
 TUnfoldBinning.cxx:1077
 TUnfoldBinning.cxx:1078
 TUnfoldBinning.cxx:1079
 TUnfoldBinning.cxx:1080
 TUnfoldBinning.cxx:1081
 TUnfoldBinning.cxx:1082
 TUnfoldBinning.cxx:1083
 TUnfoldBinning.cxx:1084
 TUnfoldBinning.cxx:1085
 TUnfoldBinning.cxx:1086
 TUnfoldBinning.cxx:1087
 TUnfoldBinning.cxx:1088
 TUnfoldBinning.cxx:1089
 TUnfoldBinning.cxx:1090
 TUnfoldBinning.cxx:1091
 TUnfoldBinning.cxx:1092
 TUnfoldBinning.cxx:1093
 TUnfoldBinning.cxx:1094
 TUnfoldBinning.cxx:1095
 TUnfoldBinning.cxx:1096
 TUnfoldBinning.cxx:1097
 TUnfoldBinning.cxx:1098
 TUnfoldBinning.cxx:1099
 TUnfoldBinning.cxx:1100
 TUnfoldBinning.cxx:1101
 TUnfoldBinning.cxx:1102
 TUnfoldBinning.cxx:1103
 TUnfoldBinning.cxx:1104
 TUnfoldBinning.cxx:1105
 TUnfoldBinning.cxx:1106
 TUnfoldBinning.cxx:1107
 TUnfoldBinning.cxx:1108
 TUnfoldBinning.cxx:1109
 TUnfoldBinning.cxx:1110
 TUnfoldBinning.cxx:1111
 TUnfoldBinning.cxx:1112
 TUnfoldBinning.cxx:1113
 TUnfoldBinning.cxx:1114
 TUnfoldBinning.cxx:1115
 TUnfoldBinning.cxx:1116
 TUnfoldBinning.cxx:1117
 TUnfoldBinning.cxx:1118
 TUnfoldBinning.cxx:1119
 TUnfoldBinning.cxx:1120
 TUnfoldBinning.cxx:1121
 TUnfoldBinning.cxx:1122
 TUnfoldBinning.cxx:1123
 TUnfoldBinning.cxx:1124
 TUnfoldBinning.cxx:1125
 TUnfoldBinning.cxx:1126
 TUnfoldBinning.cxx:1127
 TUnfoldBinning.cxx:1128
 TUnfoldBinning.cxx:1129
 TUnfoldBinning.cxx:1130
 TUnfoldBinning.cxx:1131
 TUnfoldBinning.cxx:1132
 TUnfoldBinning.cxx:1133
 TUnfoldBinning.cxx:1134
 TUnfoldBinning.cxx:1135
 TUnfoldBinning.cxx:1136
 TUnfoldBinning.cxx:1137
 TUnfoldBinning.cxx:1138
 TUnfoldBinning.cxx:1139
 TUnfoldBinning.cxx:1140
 TUnfoldBinning.cxx:1141
 TUnfoldBinning.cxx:1142
 TUnfoldBinning.cxx:1143
 TUnfoldBinning.cxx:1144
 TUnfoldBinning.cxx:1145
 TUnfoldBinning.cxx:1146
 TUnfoldBinning.cxx:1147
 TUnfoldBinning.cxx:1148
 TUnfoldBinning.cxx:1149
 TUnfoldBinning.cxx:1150
 TUnfoldBinning.cxx:1151
 TUnfoldBinning.cxx:1152
 TUnfoldBinning.cxx:1153
 TUnfoldBinning.cxx:1154
 TUnfoldBinning.cxx:1155
 TUnfoldBinning.cxx:1156
 TUnfoldBinning.cxx:1157
 TUnfoldBinning.cxx:1158
 TUnfoldBinning.cxx:1159
 TUnfoldBinning.cxx:1160
 TUnfoldBinning.cxx:1161
 TUnfoldBinning.cxx:1162
 TUnfoldBinning.cxx:1163
 TUnfoldBinning.cxx:1164
 TUnfoldBinning.cxx:1165
 TUnfoldBinning.cxx:1166
 TUnfoldBinning.cxx:1167
 TUnfoldBinning.cxx:1168
 TUnfoldBinning.cxx:1169
 TUnfoldBinning.cxx:1170
 TUnfoldBinning.cxx:1171
 TUnfoldBinning.cxx:1172
 TUnfoldBinning.cxx:1173
 TUnfoldBinning.cxx:1174
 TUnfoldBinning.cxx:1175
 TUnfoldBinning.cxx:1176
 TUnfoldBinning.cxx:1177
 TUnfoldBinning.cxx:1178
 TUnfoldBinning.cxx:1179
 TUnfoldBinning.cxx:1180
 TUnfoldBinning.cxx:1181
 TUnfoldBinning.cxx:1182
 TUnfoldBinning.cxx:1183
 TUnfoldBinning.cxx:1184
 TUnfoldBinning.cxx:1185
 TUnfoldBinning.cxx:1186
 TUnfoldBinning.cxx:1187
 TUnfoldBinning.cxx:1188
 TUnfoldBinning.cxx:1189
 TUnfoldBinning.cxx:1190
 TUnfoldBinning.cxx:1191
 TUnfoldBinning.cxx:1192
 TUnfoldBinning.cxx:1193
 TUnfoldBinning.cxx:1194
 TUnfoldBinning.cxx:1195
 TUnfoldBinning.cxx:1196
 TUnfoldBinning.cxx:1197
 TUnfoldBinning.cxx:1198
 TUnfoldBinning.cxx:1199
 TUnfoldBinning.cxx:1200
 TUnfoldBinning.cxx:1201
 TUnfoldBinning.cxx:1202
 TUnfoldBinning.cxx:1203
 TUnfoldBinning.cxx:1204
 TUnfoldBinning.cxx:1205
 TUnfoldBinning.cxx:1206
 TUnfoldBinning.cxx:1207
 TUnfoldBinning.cxx:1208
 TUnfoldBinning.cxx:1209
 TUnfoldBinning.cxx:1210
 TUnfoldBinning.cxx:1211
 TUnfoldBinning.cxx:1212
 TUnfoldBinning.cxx:1213
 TUnfoldBinning.cxx:1214
 TUnfoldBinning.cxx:1215
 TUnfoldBinning.cxx:1216
 TUnfoldBinning.cxx:1217
 TUnfoldBinning.cxx:1218
 TUnfoldBinning.cxx:1219
 TUnfoldBinning.cxx:1220
 TUnfoldBinning.cxx:1221
 TUnfoldBinning.cxx:1222
 TUnfoldBinning.cxx:1223
 TUnfoldBinning.cxx:1224
 TUnfoldBinning.cxx:1225
 TUnfoldBinning.cxx:1226
 TUnfoldBinning.cxx:1227
 TUnfoldBinning.cxx:1228
 TUnfoldBinning.cxx:1229
 TUnfoldBinning.cxx:1230
 TUnfoldBinning.cxx:1231
 TUnfoldBinning.cxx:1232
 TUnfoldBinning.cxx:1233
 TUnfoldBinning.cxx:1234
 TUnfoldBinning.cxx:1235
 TUnfoldBinning.cxx:1236
 TUnfoldBinning.cxx:1237
 TUnfoldBinning.cxx:1238
 TUnfoldBinning.cxx:1239
 TUnfoldBinning.cxx:1240
 TUnfoldBinning.cxx:1241
 TUnfoldBinning.cxx:1242
 TUnfoldBinning.cxx:1243
 TUnfoldBinning.cxx:1244
 TUnfoldBinning.cxx:1245
 TUnfoldBinning.cxx:1246
 TUnfoldBinning.cxx:1247
 TUnfoldBinning.cxx:1248
 TUnfoldBinning.cxx:1249
 TUnfoldBinning.cxx:1250
 TUnfoldBinning.cxx:1251
 TUnfoldBinning.cxx:1252
 TUnfoldBinning.cxx:1253
 TUnfoldBinning.cxx:1254
 TUnfoldBinning.cxx:1255
 TUnfoldBinning.cxx:1256
 TUnfoldBinning.cxx:1257
 TUnfoldBinning.cxx:1258
 TUnfoldBinning.cxx:1259
 TUnfoldBinning.cxx:1260
 TUnfoldBinning.cxx:1261
 TUnfoldBinning.cxx:1262
 TUnfoldBinning.cxx:1263
 TUnfoldBinning.cxx:1264
 TUnfoldBinning.cxx:1265
 TUnfoldBinning.cxx:1266
 TUnfoldBinning.cxx:1267
 TUnfoldBinning.cxx:1268
 TUnfoldBinning.cxx:1269
 TUnfoldBinning.cxx:1270
 TUnfoldBinning.cxx:1271
 TUnfoldBinning.cxx:1272
 TUnfoldBinning.cxx:1273
 TUnfoldBinning.cxx:1274
 TUnfoldBinning.cxx:1275
 TUnfoldBinning.cxx:1276
 TUnfoldBinning.cxx:1277
 TUnfoldBinning.cxx:1278
 TUnfoldBinning.cxx:1279
 TUnfoldBinning.cxx:1280
 TUnfoldBinning.cxx:1281
 TUnfoldBinning.cxx:1282
 TUnfoldBinning.cxx:1283
 TUnfoldBinning.cxx:1284
 TUnfoldBinning.cxx:1285
 TUnfoldBinning.cxx:1286
 TUnfoldBinning.cxx:1287
 TUnfoldBinning.cxx:1288
 TUnfoldBinning.cxx:1289
 TUnfoldBinning.cxx:1290
 TUnfoldBinning.cxx:1291
 TUnfoldBinning.cxx:1292
 TUnfoldBinning.cxx:1293
 TUnfoldBinning.cxx:1294
 TUnfoldBinning.cxx:1295
 TUnfoldBinning.cxx:1296
 TUnfoldBinning.cxx:1297
 TUnfoldBinning.cxx:1298
 TUnfoldBinning.cxx:1299
 TUnfoldBinning.cxx:1300
 TUnfoldBinning.cxx:1301
 TUnfoldBinning.cxx:1302
 TUnfoldBinning.cxx:1303
 TUnfoldBinning.cxx:1304
 TUnfoldBinning.cxx:1305
 TUnfoldBinning.cxx:1306
 TUnfoldBinning.cxx:1307
 TUnfoldBinning.cxx:1308
 TUnfoldBinning.cxx:1309
 TUnfoldBinning.cxx:1310
 TUnfoldBinning.cxx:1311
 TUnfoldBinning.cxx:1312
 TUnfoldBinning.cxx:1313
 TUnfoldBinning.cxx:1314
 TUnfoldBinning.cxx:1315
 TUnfoldBinning.cxx:1316
 TUnfoldBinning.cxx:1317
 TUnfoldBinning.cxx:1318
 TUnfoldBinning.cxx:1319
 TUnfoldBinning.cxx:1320
 TUnfoldBinning.cxx:1321
 TUnfoldBinning.cxx:1322
 TUnfoldBinning.cxx:1323
 TUnfoldBinning.cxx:1324
 TUnfoldBinning.cxx:1325
 TUnfoldBinning.cxx:1326
 TUnfoldBinning.cxx:1327
 TUnfoldBinning.cxx:1328
 TUnfoldBinning.cxx:1329
 TUnfoldBinning.cxx:1330
 TUnfoldBinning.cxx:1331
 TUnfoldBinning.cxx:1332
 TUnfoldBinning.cxx:1333
 TUnfoldBinning.cxx:1334
 TUnfoldBinning.cxx:1335
 TUnfoldBinning.cxx:1336
 TUnfoldBinning.cxx:1337
 TUnfoldBinning.cxx:1338
 TUnfoldBinning.cxx:1339
 TUnfoldBinning.cxx:1340
 TUnfoldBinning.cxx:1341
 TUnfoldBinning.cxx:1342
 TUnfoldBinning.cxx:1343
 TUnfoldBinning.cxx:1344
 TUnfoldBinning.cxx:1345
 TUnfoldBinning.cxx:1346
 TUnfoldBinning.cxx:1347
 TUnfoldBinning.cxx:1348
 TUnfoldBinning.cxx:1349
 TUnfoldBinning.cxx:1350
 TUnfoldBinning.cxx:1351
 TUnfoldBinning.cxx:1352
 TUnfoldBinning.cxx:1353
 TUnfoldBinning.cxx:1354
 TUnfoldBinning.cxx:1355
 TUnfoldBinning.cxx:1356
 TUnfoldBinning.cxx:1357
 TUnfoldBinning.cxx:1358
 TUnfoldBinning.cxx:1359
 TUnfoldBinning.cxx:1360
 TUnfoldBinning.cxx:1361
 TUnfoldBinning.cxx:1362
 TUnfoldBinning.cxx:1363
 TUnfoldBinning.cxx:1364
 TUnfoldBinning.cxx:1365
 TUnfoldBinning.cxx:1366
 TUnfoldBinning.cxx:1367
 TUnfoldBinning.cxx:1368
 TUnfoldBinning.cxx:1369
 TUnfoldBinning.cxx:1370
 TUnfoldBinning.cxx:1371
 TUnfoldBinning.cxx:1372
 TUnfoldBinning.cxx:1373
 TUnfoldBinning.cxx:1374
 TUnfoldBinning.cxx:1375
 TUnfoldBinning.cxx:1376
 TUnfoldBinning.cxx:1377
 TUnfoldBinning.cxx:1378
 TUnfoldBinning.cxx:1379
 TUnfoldBinning.cxx:1380
 TUnfoldBinning.cxx:1381
 TUnfoldBinning.cxx:1382
 TUnfoldBinning.cxx:1383
 TUnfoldBinning.cxx:1384
 TUnfoldBinning.cxx:1385
 TUnfoldBinning.cxx:1386
 TUnfoldBinning.cxx:1387
 TUnfoldBinning.cxx:1388
 TUnfoldBinning.cxx:1389
 TUnfoldBinning.cxx:1390
 TUnfoldBinning.cxx:1391
 TUnfoldBinning.cxx:1392
 TUnfoldBinning.cxx:1393
 TUnfoldBinning.cxx:1394
 TUnfoldBinning.cxx:1395
 TUnfoldBinning.cxx:1396
 TUnfoldBinning.cxx:1397
 TUnfoldBinning.cxx:1398
 TUnfoldBinning.cxx:1399
 TUnfoldBinning.cxx:1400
 TUnfoldBinning.cxx:1401
 TUnfoldBinning.cxx:1402
 TUnfoldBinning.cxx:1403
 TUnfoldBinning.cxx:1404
 TUnfoldBinning.cxx:1405
 TUnfoldBinning.cxx:1406
 TUnfoldBinning.cxx:1407
 TUnfoldBinning.cxx:1408
 TUnfoldBinning.cxx:1409
 TUnfoldBinning.cxx:1410
 TUnfoldBinning.cxx:1411
 TUnfoldBinning.cxx:1412
 TUnfoldBinning.cxx:1413
 TUnfoldBinning.cxx:1414
 TUnfoldBinning.cxx:1415
 TUnfoldBinning.cxx:1416
 TUnfoldBinning.cxx:1417
 TUnfoldBinning.cxx:1418
 TUnfoldBinning.cxx:1419
 TUnfoldBinning.cxx:1420
 TUnfoldBinning.cxx:1421
 TUnfoldBinning.cxx:1422
 TUnfoldBinning.cxx:1423
 TUnfoldBinning.cxx:1424
 TUnfoldBinning.cxx:1425
 TUnfoldBinning.cxx:1426
 TUnfoldBinning.cxx:1427
 TUnfoldBinning.cxx:1428
 TUnfoldBinning.cxx:1429
 TUnfoldBinning.cxx:1430
 TUnfoldBinning.cxx:1431
 TUnfoldBinning.cxx:1432
 TUnfoldBinning.cxx:1433
 TUnfoldBinning.cxx:1434
 TUnfoldBinning.cxx:1435
 TUnfoldBinning.cxx:1436
 TUnfoldBinning.cxx:1437
 TUnfoldBinning.cxx:1438
 TUnfoldBinning.cxx:1439
 TUnfoldBinning.cxx:1440
 TUnfoldBinning.cxx:1441
 TUnfoldBinning.cxx:1442
 TUnfoldBinning.cxx:1443
 TUnfoldBinning.cxx:1444
 TUnfoldBinning.cxx:1445
 TUnfoldBinning.cxx:1446
 TUnfoldBinning.cxx:1447
 TUnfoldBinning.cxx:1448
 TUnfoldBinning.cxx:1449
 TUnfoldBinning.cxx:1450
 TUnfoldBinning.cxx:1451
 TUnfoldBinning.cxx:1452
 TUnfoldBinning.cxx:1453
 TUnfoldBinning.cxx:1454
 TUnfoldBinning.cxx:1455
 TUnfoldBinning.cxx:1456
 TUnfoldBinning.cxx:1457
 TUnfoldBinning.cxx:1458
 TUnfoldBinning.cxx:1459
 TUnfoldBinning.cxx:1460
 TUnfoldBinning.cxx:1461
 TUnfoldBinning.cxx:1462
 TUnfoldBinning.cxx:1463
 TUnfoldBinning.cxx:1464
 TUnfoldBinning.cxx:1465
 TUnfoldBinning.cxx:1466
 TUnfoldBinning.cxx:1467
 TUnfoldBinning.cxx:1468
 TUnfoldBinning.cxx:1469
 TUnfoldBinning.cxx:1470
 TUnfoldBinning.cxx:1471
 TUnfoldBinning.cxx:1472
 TUnfoldBinning.cxx:1473
 TUnfoldBinning.cxx:1474
 TUnfoldBinning.cxx:1475
 TUnfoldBinning.cxx:1476
 TUnfoldBinning.cxx:1477
 TUnfoldBinning.cxx:1478
 TUnfoldBinning.cxx:1479
 TUnfoldBinning.cxx:1480
 TUnfoldBinning.cxx:1481
 TUnfoldBinning.cxx:1482
 TUnfoldBinning.cxx:1483
 TUnfoldBinning.cxx:1484
 TUnfoldBinning.cxx:1485
 TUnfoldBinning.cxx:1486
 TUnfoldBinning.cxx:1487
 TUnfoldBinning.cxx:1488
 TUnfoldBinning.cxx:1489
 TUnfoldBinning.cxx:1490
 TUnfoldBinning.cxx:1491
 TUnfoldBinning.cxx:1492
 TUnfoldBinning.cxx:1493
 TUnfoldBinning.cxx:1494
 TUnfoldBinning.cxx:1495
 TUnfoldBinning.cxx:1496
 TUnfoldBinning.cxx:1497
 TUnfoldBinning.cxx:1498
 TUnfoldBinning.cxx:1499
 TUnfoldBinning.cxx:1500
 TUnfoldBinning.cxx:1501
 TUnfoldBinning.cxx:1502
 TUnfoldBinning.cxx:1503
 TUnfoldBinning.cxx:1504
 TUnfoldBinning.cxx:1505
 TUnfoldBinning.cxx:1506
 TUnfoldBinning.cxx:1507
 TUnfoldBinning.cxx:1508
 TUnfoldBinning.cxx:1509
 TUnfoldBinning.cxx:1510
 TUnfoldBinning.cxx:1511
 TUnfoldBinning.cxx:1512
 TUnfoldBinning.cxx:1513
 TUnfoldBinning.cxx:1514
 TUnfoldBinning.cxx:1515
 TUnfoldBinning.cxx:1516
 TUnfoldBinning.cxx:1517
 TUnfoldBinning.cxx:1518
 TUnfoldBinning.cxx:1519
 TUnfoldBinning.cxx:1520
 TUnfoldBinning.cxx:1521
 TUnfoldBinning.cxx:1522
 TUnfoldBinning.cxx:1523
 TUnfoldBinning.cxx:1524
 TUnfoldBinning.cxx:1525
 TUnfoldBinning.cxx:1526
 TUnfoldBinning.cxx:1527
 TUnfoldBinning.cxx:1528
 TUnfoldBinning.cxx:1529
 TUnfoldBinning.cxx:1530
 TUnfoldBinning.cxx:1531
 TUnfoldBinning.cxx:1532
 TUnfoldBinning.cxx:1533
 TUnfoldBinning.cxx:1534
 TUnfoldBinning.cxx:1535
 TUnfoldBinning.cxx:1536
 TUnfoldBinning.cxx:1537
 TUnfoldBinning.cxx:1538
 TUnfoldBinning.cxx:1539
 TUnfoldBinning.cxx:1540
 TUnfoldBinning.cxx:1541
 TUnfoldBinning.cxx:1542
 TUnfoldBinning.cxx:1543
 TUnfoldBinning.cxx:1544
 TUnfoldBinning.cxx:1545
 TUnfoldBinning.cxx:1546
 TUnfoldBinning.cxx:1547
 TUnfoldBinning.cxx:1548
 TUnfoldBinning.cxx:1549
 TUnfoldBinning.cxx:1550
 TUnfoldBinning.cxx:1551
 TUnfoldBinning.cxx:1552
 TUnfoldBinning.cxx:1553
 TUnfoldBinning.cxx:1554
 TUnfoldBinning.cxx:1555
 TUnfoldBinning.cxx:1556
 TUnfoldBinning.cxx:1557
 TUnfoldBinning.cxx:1558
 TUnfoldBinning.cxx:1559
 TUnfoldBinning.cxx:1560
 TUnfoldBinning.cxx:1561
 TUnfoldBinning.cxx:1562
 TUnfoldBinning.cxx:1563
 TUnfoldBinning.cxx:1564
 TUnfoldBinning.cxx:1565
 TUnfoldBinning.cxx:1566
 TUnfoldBinning.cxx:1567
 TUnfoldBinning.cxx:1568
 TUnfoldBinning.cxx:1569
 TUnfoldBinning.cxx:1570
 TUnfoldBinning.cxx:1571
 TUnfoldBinning.cxx:1572
 TUnfoldBinning.cxx:1573
 TUnfoldBinning.cxx:1574
 TUnfoldBinning.cxx:1575
 TUnfoldBinning.cxx:1576
 TUnfoldBinning.cxx:1577
 TUnfoldBinning.cxx:1578
 TUnfoldBinning.cxx:1579
 TUnfoldBinning.cxx:1580
 TUnfoldBinning.cxx:1581
 TUnfoldBinning.cxx:1582
 TUnfoldBinning.cxx:1583
 TUnfoldBinning.cxx:1584
 TUnfoldBinning.cxx:1585
 TUnfoldBinning.cxx:1586
 TUnfoldBinning.cxx:1587
 TUnfoldBinning.cxx:1588
 TUnfoldBinning.cxx:1589
 TUnfoldBinning.cxx:1590
 TUnfoldBinning.cxx:1591
 TUnfoldBinning.cxx:1592
 TUnfoldBinning.cxx:1593
 TUnfoldBinning.cxx:1594
 TUnfoldBinning.cxx:1595
 TUnfoldBinning.cxx:1596
 TUnfoldBinning.cxx:1597
 TUnfoldBinning.cxx:1598
 TUnfoldBinning.cxx:1599
 TUnfoldBinning.cxx:1600
 TUnfoldBinning.cxx:1601
 TUnfoldBinning.cxx:1602
 TUnfoldBinning.cxx:1603
 TUnfoldBinning.cxx:1604
 TUnfoldBinning.cxx:1605
 TUnfoldBinning.cxx:1606
 TUnfoldBinning.cxx:1607
 TUnfoldBinning.cxx:1608
 TUnfoldBinning.cxx:1609
 TUnfoldBinning.cxx:1610
 TUnfoldBinning.cxx:1611
 TUnfoldBinning.cxx:1612
 TUnfoldBinning.cxx:1613
 TUnfoldBinning.cxx:1614
 TUnfoldBinning.cxx:1615
 TUnfoldBinning.cxx:1616
 TUnfoldBinning.cxx:1617
 TUnfoldBinning.cxx:1618
 TUnfoldBinning.cxx:1619
 TUnfoldBinning.cxx:1620
 TUnfoldBinning.cxx:1621
 TUnfoldBinning.cxx:1622
 TUnfoldBinning.cxx:1623
 TUnfoldBinning.cxx:1624
 TUnfoldBinning.cxx:1625
 TUnfoldBinning.cxx:1626
 TUnfoldBinning.cxx:1627
 TUnfoldBinning.cxx:1628
 TUnfoldBinning.cxx:1629
 TUnfoldBinning.cxx:1630
 TUnfoldBinning.cxx:1631
 TUnfoldBinning.cxx:1632
 TUnfoldBinning.cxx:1633
 TUnfoldBinning.cxx:1634
 TUnfoldBinning.cxx:1635
 TUnfoldBinning.cxx:1636
 TUnfoldBinning.cxx:1637
 TUnfoldBinning.cxx:1638
 TUnfoldBinning.cxx:1639
 TUnfoldBinning.cxx:1640
 TUnfoldBinning.cxx:1641
 TUnfoldBinning.cxx:1642
 TUnfoldBinning.cxx:1643
 TUnfoldBinning.cxx:1644
 TUnfoldBinning.cxx:1645
 TUnfoldBinning.cxx:1646
 TUnfoldBinning.cxx:1647
 TUnfoldBinning.cxx:1648
 TUnfoldBinning.cxx:1649
 TUnfoldBinning.cxx:1650
 TUnfoldBinning.cxx:1651
 TUnfoldBinning.cxx:1652
 TUnfoldBinning.cxx:1653
 TUnfoldBinning.cxx:1654
 TUnfoldBinning.cxx:1655
 TUnfoldBinning.cxx:1656
 TUnfoldBinning.cxx:1657
 TUnfoldBinning.cxx:1658
 TUnfoldBinning.cxx:1659
 TUnfoldBinning.cxx:1660
 TUnfoldBinning.cxx:1661
 TUnfoldBinning.cxx:1662
 TUnfoldBinning.cxx:1663
 TUnfoldBinning.cxx:1664
 TUnfoldBinning.cxx:1665
 TUnfoldBinning.cxx:1666
 TUnfoldBinning.cxx:1667
 TUnfoldBinning.cxx:1668
 TUnfoldBinning.cxx:1669
 TUnfoldBinning.cxx:1670
 TUnfoldBinning.cxx:1671
 TUnfoldBinning.cxx:1672
 TUnfoldBinning.cxx:1673
 TUnfoldBinning.cxx:1674
 TUnfoldBinning.cxx:1675
 TUnfoldBinning.cxx:1676
 TUnfoldBinning.cxx:1677
 TUnfoldBinning.cxx:1678
 TUnfoldBinning.cxx:1679
 TUnfoldBinning.cxx:1680
 TUnfoldBinning.cxx:1681
 TUnfoldBinning.cxx:1682
 TUnfoldBinning.cxx:1683
 TUnfoldBinning.cxx:1684
 TUnfoldBinning.cxx:1685
 TUnfoldBinning.cxx:1686
 TUnfoldBinning.cxx:1687
 TUnfoldBinning.cxx:1688
 TUnfoldBinning.cxx:1689
 TUnfoldBinning.cxx:1690
 TUnfoldBinning.cxx:1691
 TUnfoldBinning.cxx:1692
 TUnfoldBinning.cxx:1693
 TUnfoldBinning.cxx:1694
 TUnfoldBinning.cxx:1695
 TUnfoldBinning.cxx:1696
 TUnfoldBinning.cxx:1697
 TUnfoldBinning.cxx:1698
 TUnfoldBinning.cxx:1699
 TUnfoldBinning.cxx:1700
 TUnfoldBinning.cxx:1701
 TUnfoldBinning.cxx:1702
 TUnfoldBinning.cxx:1703
 TUnfoldBinning.cxx:1704
 TUnfoldBinning.cxx:1705
 TUnfoldBinning.cxx:1706
 TUnfoldBinning.cxx:1707
 TUnfoldBinning.cxx:1708
 TUnfoldBinning.cxx:1709
 TUnfoldBinning.cxx:1710
 TUnfoldBinning.cxx:1711
 TUnfoldBinning.cxx:1712
 TUnfoldBinning.cxx:1713
 TUnfoldBinning.cxx:1714
 TUnfoldBinning.cxx:1715
 TUnfoldBinning.cxx:1716
 TUnfoldBinning.cxx:1717
 TUnfoldBinning.cxx:1718
 TUnfoldBinning.cxx:1719
 TUnfoldBinning.cxx:1720
 TUnfoldBinning.cxx:1721
 TUnfoldBinning.cxx:1722
 TUnfoldBinning.cxx:1723
 TUnfoldBinning.cxx:1724
 TUnfoldBinning.cxx:1725
 TUnfoldBinning.cxx:1726
 TUnfoldBinning.cxx:1727
 TUnfoldBinning.cxx:1728
 TUnfoldBinning.cxx:1729
 TUnfoldBinning.cxx:1730
 TUnfoldBinning.cxx:1731
 TUnfoldBinning.cxx:1732
 TUnfoldBinning.cxx:1733
 TUnfoldBinning.cxx:1734
 TUnfoldBinning.cxx:1735
 TUnfoldBinning.cxx:1736
 TUnfoldBinning.cxx:1737
 TUnfoldBinning.cxx:1738
 TUnfoldBinning.cxx:1739
 TUnfoldBinning.cxx:1740
 TUnfoldBinning.cxx:1741
 TUnfoldBinning.cxx:1742
 TUnfoldBinning.cxx:1743
 TUnfoldBinning.cxx:1744
 TUnfoldBinning.cxx:1745
 TUnfoldBinning.cxx:1746
 TUnfoldBinning.cxx:1747
 TUnfoldBinning.cxx:1748
 TUnfoldBinning.cxx:1749
 TUnfoldBinning.cxx:1750
 TUnfoldBinning.cxx:1751