// Author: Stefan Schmitt
// DESY, 23/01/09

//  Version 17.1, bug fix with background uncertainty
//
//  History:
//    Version 17.0, possibility to specify an error matrix with SetInput
//    Version 16.1, parallel to changes in TUnfold
//    Version 16.0, parallel to changes in TUnfold
//    Version 15, fix bugs with uncorr. uncertainties, add backgnd subtraction
//    Version 14, remove some print-out, do not add unused sys.errors
//    Version 13, support for systematic errors

////////////////////////////////////////////////////////////////////////
//
//  TUnfoldSys : public TUnfold
//
//  TUnfold is used to decompose a measurement y into several sources x
//  given the measurement uncertainties and a matrix of migrations A
//
//  TUnfoldSys adds error propagation of systematic errors to TUnfold
//  Also, background sources (with errors) can be subtracted.
//
//  *************************************************************
//  * For most applications, it is better to use TUnfoldDensity *
//  * instead of using TUnfoldSys or TUnfold                    *
//  *************************************************************
//
//  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
//
//
//  The following sources of systematic error are considered in TUnfoldSys
//
//  (a) uncorrelated errors on the input matrix histA, taken as the 
//      errors provided with the histogram.
//      These are typically statistical errors from finite Monte Carlo samples
//
//  (b) correlated shifts of the input matrix histA. These shifts are taken
//      as one-sigma effects when switchig on a given error soure.
//      several such error sources may be defined
//
//  (c) a systematic error on the regularisation parameter tau
//
//  (d) uncorrelated errors on background sources, taken as the errors
//      provided with the background histograms
//
//  (e) scale errors on background sources
//
// In addition there is the (statistical) uncertainty of the input vector (i)
//
// Source (a) is providede with the original histogram histA
//     TUnfoldSys(histA,...)
//
// Sources (b) are added by calls to
//     AddSysError()
//
// The systematic uncertainty on tau (c) is set by
//     SetTauError()
//
// Backgound sources causing errors of type (d) and (e) are added by
//     SubtractBackground()
//
//
// NOTE:
// ======
//    Systematic errors (a), (b), (c) are propagated to the result
//       AFTER unfolding
//
//    Background errors (d) and (e) are added to the data errors
//       BEFORE unfolding
//
// For this reason:
//  errors of type (d) and (e) are INCLUDED in the standard error matrix
//  and other methods provided by the base class TUnfold:
//      GetOutput()
//      GetEmatrix()
//      ...
//  whereas errors of type (a), (b), (c) are NOT INCLUDED in the methods
//  provided by the base class TUnfold.
//
// Accessing error matrices:
// ===================================
//  The error sources (b),(c) and (e) propagate to shifts of the result.
//  These shifts may be accessed as histograms using the methods
//     GetDeltaSysSource()            corresponds to (b)
//     GetDeltaSysTau()               corresponds to (c)
//     GetDeltaSysBackgroundScale()   corresponds to (e)
//  The error sources (a) and (d) originate from many uncorrelated errors,
//  which in general are NOT uncorrelated on the result vector.
//  Thus, there is no corresponding shift of the output vector, only error
//  matrices are available
//
//  Method to get error matrix       corresponds to error sources
//  ===============================================================
//   GetEmatrixSysUncorr()             (a)
//   GetEmatrixSysSource()             (b)
//   GetEmatrixSysTau()                (c)
//   GetEmatrixSysBackgroundUncorr()   (d)
//   GetEmatrixSysBackgroundScale()    (e)
//   GetEmatrixInput()                 (i)
//   GetEmatrix()                      (i)+(d)+(e)
//   GetEmatrixTotal()                 (i)+(a)+(b)+(c)+(d)+(e)
//
//  Error matrices can be added to existing histograms.
//  This is useful to retreive the sum of several error matrices.
//  If the last argument of the GetEmatrixXXX() methods is set to kFALSE,
//  the histogram is not cleared, but the error matrix is simply added to the
//  existing 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 <iostream>
#include <TMap.h>
#include <TMath.h>
#include <TObjString.h>
#include <RVersion.h>
#include <cmath>

#include "TUnfoldSys.h"

ClassImp(TUnfoldSys)

TUnfoldSys::TUnfoldSys(void)
{
   // set all pointers to zero
   InitTUnfoldSys();
}

TUnfoldSys::TUnfoldSys
(const TH2 *hist_A, EHistMap histmap, ERegMode regmode,EConstraint constraint)
   : TUnfold(hist_A,histmap,regmode,constraint)
{
   // arguments:
   //    hist_A:  matrix that describes the migrations
   //    histmap: mapping of the histogram axes to the unfolding output 
   //    regmode: global regularisation mode
   // data members initialized to something different from zero:
   //    fDA2, fDAcol

   // initialize TUnfold
   InitTUnfoldSys();

   // svae underflow and overflow bins
   fAoutside = new TMatrixD(GetNx(),2);
   // save the romalized errors on hist_A
   // to the matrices fDAinRelSq and fDAinColRelSq
   fDAinColRelSq = new TMatrixD(GetNx(),1);

   Int_t nmax=GetNx()*GetNy();
   Int_t *rowDAinRelSq = new Int_t[nmax];
   Int_t *colDAinRelSq = new Int_t[nmax];
   Double_t *dataDAinRelSq = new Double_t[nmax];

   Int_t da_nonzero=0;
   for (Int_t ix = 0; ix < GetNx(); ix++) {
      Int_t ibinx = fXToHist[ix];
      Double_t sum_sq= fSumOverY[ix]*fSumOverY[ix];
      for (Int_t ibiny = 0; ibiny <= GetNy()+1; ibiny++) {
         Double_t dz;
         if (histmap == kHistMapOutputHoriz) {
            dz = hist_A->GetBinError(ibinx, ibiny);
         } else {
            dz = hist_A->GetBinError(ibiny, ibinx);
         }
         Double_t normerr_sq=dz*dz/sum_sq;
         // quadratic sum of all errors from all bins,
         //   including under/overflow bins
         (*fDAinColRelSq)(ix,0) += normerr_sq;

         if(ibiny==0) {
            // underflow bin
            if (histmap == kHistMapOutputHoriz) {
               (*fAoutside)(ix,0)=hist_A->GetBinContent(ibinx, ibiny);
            } else {
               (*fAoutside)(ix,0)=hist_A->GetBinContent(ibiny, ibinx);
            }
         } else if(ibiny==GetNy()+1) {
            // overflow bins
            if (histmap == kHistMapOutputHoriz) {
               (*fAoutside)(ix,1)=hist_A->GetBinContent(ibinx, ibiny);
            } else {
               (*fAoutside)(ix,1)=hist_A->GetBinContent(ibiny, ibinx);
            }
         } else {
            // error on this bin
            rowDAinRelSq[da_nonzero]=ibiny-1;
            colDAinRelSq[da_nonzero] = ix;
            dataDAinRelSq[da_nonzero] = normerr_sq;
            if(dataDAinRelSq[da_nonzero]>0.0) da_nonzero++;
         }
      }
   }
   if(da_nonzero) {
      fDAinRelSq = CreateSparseMatrix(GetNy(),GetNx(),da_nonzero,
                                      rowDAinRelSq,colDAinRelSq,dataDAinRelSq);
   } else {
      DeleteMatrix(&fDAinColRelSq);
   }
   delete[] rowDAinRelSq;
   delete[] colDAinRelSq;
   delete[] dataDAinRelSq;      
}

void TUnfoldSys::AddSysError
(const TH2 *sysError,const char *name,EHistMap histmap,ESysErrMode mode)
{
   // add a correlated error source
   //    sysError: alternative matrix or matrix of absolute/relative shifts
   //    name: name of the error source
   //    histmap: mapping of the histogram axes to the unfolding output
   //    mode: format of the error source

   if(fSysIn->FindObject(name)) {
      Error("AddSysError","Source %s given twice, ignoring 2nd call.\n",name);
   } else {
      // a copy of fA is made. It can be accessed inside the loop
      // without having to take care that the sparse structure of *fA
      // may be accidentally destroyed by asking for an element which is zero.
      TMatrixD aCopy(*fA);

      Int_t nmax= GetNx()*GetNy();
      Double_t *data=new Double_t[nmax];
      Int_t *cols=new Int_t[nmax];
      Int_t *rows=new Int_t[nmax];
      nmax=0;
      for (Int_t ix = 0; ix < GetNx(); ix++) {
         Int_t ibinx = fXToHist[ix];
         Double_t sum=0.0;
         for(Int_t loop=0;loop<2;loop++) {
            for (Int_t ibiny = 0; ibiny <= GetNy()+1; ibiny++) {
               Double_t z;
               // get bin content, depending on histmap
               if (histmap == kHistMapOutputHoriz) {
                  z = sysError->GetBinContent(ibinx, ibiny);
               } else {
                  z = sysError->GetBinContent(ibiny, ibinx);
               }
               // correct to absolute numbers
               if(mode!=kSysErrModeMatrix) {
                  Double_t z0;
                  if((ibiny>0)&&(ibiny<=GetNy())) {
                     z0=aCopy(ibiny-1,ix)*fSumOverY[ix];
                  } else if(ibiny==0) {
                     z0=(*fAoutside)(ix,0);
                  } else {
                     z0=(*fAoutside)(ix,1);
                  }
                  if(mode==kSysErrModeShift) {
                     z += z0;
                  } else if(mode==kSysErrModeRelative) {
                     z = z0*(1.+z);
                  }
               }
               if(loop==0) {
                  // sum up all entries, including overflow bins
                  sum += z;
               } else {
                  if((ibiny>0)&&(ibiny<=GetNy())) {
                     // save normalized matrix of shifts,
                     // excluding overflow bins
                     rows[nmax]=ibiny-1;
                     cols[nmax]=ix;
                     if(sum>0.0) {
                        data[nmax]=z/sum-aCopy(ibiny-1,ix);
                     } else {
                        data[nmax]=0.0;
                     }
                     if(data[nmax] != 0.0) nmax++;
                  }
               }
            }
         }
      }
      if(nmax==0) {
         Error("AddSysError",
               "source %s has no influence and has not been added.\n",name);
      } else {
         TMatrixDSparse *dsys=CreateSparseMatrix(GetNy(),GetNx(),
                                                 nmax,rows,cols,data);
         fSysIn->Add(new TObjString(name),dsys);
      }
      delete[] data;
      delete[] rows;
      delete[] cols;
   }
}

void TUnfoldSys::DoBackgroundSubtraction(void)
{
   // performs background subtraction
   // fY = fYData - fBgrIn
   // fVyy = fVyyData + fBgrErrUncorr^2 + fBgrErrCorr * fBgrErrCorr#
   // fVyyinv = fVyy^(-1)

   if(fYData) {
      DeleteMatrix(&fY);
      DeleteMatrix(&fVyy);
      if(fBgrIn->GetEntries()<=0) {
         // simple copy
         fY=new TMatrixD(*fYData);
         fVyy=new TMatrixDSparse(*fVyyData);
      } else {
         if(GetVyyInv()) {
            Warning("DoBackgroundSubtraction",
                    "inverse error matrix from user input,"
                    " not corrected for background");
         }
         // copy of the data
         fY=new TMatrixD(*fYData);
         // subtract background from fY
         const TObject *key;
         {
            TMapIter bgrPtr(fBgrIn);
            for(key=bgrPtr.Next();key;key=bgrPtr.Next()) {
               const TMatrixD *bgr=(const TMatrixD *)
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
                  ((const TPair *)*bgrPtr)->Value()
#else
                  fBgrIn->GetValue(((const TObjString *)key)->GetString())
#endif
                  ;
               for(Int_t i=0;i<GetNy();i++) {
                  (*fY)(i,0) -= (*bgr)(i,0);
               }
            }
         }
         // copy original error matrix
         TMatrixD vyy(*fVyyData);
         // determine used bins
         Int_t ny=fVyyData->GetNrows();
         const Int_t *vyydata_rows=fVyyData->GetRowIndexArray();
         const Int_t *vyydata_cols=fVyyData->GetColIndexArray();
         const Double_t *vyydata_data=fVyyData->GetMatrixArray();
         Int_t *usedBin=new Int_t[ny];
         for(Int_t i=0;i<ny;i++) {
            usedBin[i]=0;
         }
         for(Int_t i=0;i<ny;i++) {
            for(Int_t k=vyydata_rows[i];k<vyydata_rows[i+1];k++) {
               if(vyydata_data[k]>0.0) {
                  usedBin[i]++;
                  usedBin[vyydata_cols[k]]++;
               }
            }
         }
         // add uncorrelated background errors
         {
            TMapIter bgrErrUncorrSqPtr(fBgrErrUncorrInSq);
            for(key=bgrErrUncorrSqPtr.Next();key;
                key=bgrErrUncorrSqPtr.Next()) {
               const TMatrixD *bgrerruncorrSquared=(TMatrixD const *)
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
                  ((const TPair *)*bgrErrUncorrSqPtr)->Value()
#else
                  fBgrErrUncorrInSq->GetValue(((const TObjString *)key)
                                              ->GetString())
#endif
                  ;
               for(Int_t yi=0;yi<ny;yi++) {
                  if(!usedBin[yi]) continue;
                  vyy(yi,yi) +=(*bgrerruncorrSquared)(yi,0);
               }
            }
         }
         // add correlated background errors
         {
            TMapIter bgrErrScalePtr(fBgrErrScaleIn);
            for(key=bgrErrScalePtr.Next();key;key=bgrErrScalePtr.Next()) {
               const TMatrixD *bgrerrscale=(const TMatrixD *)
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
                  ((const TPair *)*bgrErrScalePtr)->Value()
#else
                  fBgrErrScaleIn->GetValue(((const TObjString *)key)
                                          ->GetString())
#endif
                  ;
               for(Int_t yi=0;yi<ny;yi++) {
                  if(!usedBin[yi]) continue;
                  for(Int_t yj=0;yj<ny;yj++) {
                     if(!usedBin[yj]) continue;
                     vyy(yi,yj) +=(*bgrerrscale)(yi,0)* (*bgrerrscale)(yj,0);
                  }
               }
            }
         }
         delete[] usedBin;
         usedBin=0;

         // convert to sparse matrix
         fVyy=new TMatrixDSparse(vyy);

      }
   } else {
      Fatal("DoBackgroundSubtraction","No input vector defined");
   }
}

Int_t TUnfoldSys::SetInput(const TH1 *hist_y,Double_t scaleBias,
                              Double_t oneOverZeroError,const TH2 *hist_vyy,
                              const TH2 *hist_vyy_inv)
{
   // Define the input data for subsequent calls to DoUnfold(Double_t)
   //  input:   input distribution with errors
   //  scaleBias:  scale factor applied to the bias
   //  oneOverZeroError: for bins with zero error, this number defines 1/error.
   // Return value: number of bins with bad error
   //                 +10000*number of unconstrained output bins
   //         Note: return values>=10000 are fatal errors, 
   //               for the given input, the unfolding can not be done!
   // Calls the SetInput method of the base class, then renames the input
   // vectors fY and fVyy, then performs the background subtraction
   // Data members modified:
   //   fYData,fY,fVyyData,fVyy,fVyyinvData,fVyyinv
   // and those modified by TUnfold::SetInput()
   // and those modified by DoBackgroundSubtraction()

   Int_t r=TUnfold::SetInput(hist_y,scaleBias,oneOverZeroError,hist_vyy,
                             hist_vyy_inv);
   fYData=fY;
   fY=0;
   fVyyData=fVyy;
   fVyy=0;
   DoBackgroundSubtraction();

   return r;
}

void TUnfoldSys::SubtractBackground
(const TH1 *bgr,const char *name,Double_t scale,Double_t scale_error)
{
   // Store background source
   //   bgr:    background distribution with uncorrelated errors
   //   name:   name of this background source
   //   scale:  scale factor applied to the background
   //   scaleError: error on scale factor (correlated error)
   //
   // Data members modified:
   //   fBgrIn,fBgrErrUncorrInSq,fBgrErrScaleIn
   // and those modified by DoBackgroundSubtraction()

   // save background source
   if(fBgrIn->FindObject(name)) {
      Error("SubtractBackground","Source %s given twice, ignoring 2nd call.\n",
            name);
   } else {
      TMatrixD *bgrScaled=new TMatrixD(GetNy(),1);
      TMatrixD *bgrErrUncSq=new TMatrixD(GetNy(),1);
      TMatrixD *bgrErrCorr=new TMatrixD(GetNy(),1);
      for(Int_t row=0;row<GetNy();row++) {
         (*bgrScaled)(row,0) = scale*bgr->GetBinContent(row+1);
         (*bgrErrUncSq)(row,0) =
            TMath::Power(scale*bgr->GetBinError(row+1),2.);
         (*bgrErrCorr)(row,0) = scale_error*bgr->GetBinContent(row+1);
      }
      fBgrIn->Add(new TObjString(name),bgrScaled);
      fBgrErrUncorrInSq->Add(new TObjString(name),bgrErrUncSq);
      fBgrErrScaleIn->Add(new TObjString(name),bgrErrCorr);
      if(fYData) {
         DoBackgroundSubtraction();
      } else {
         Info("SubtractBackground",
              "Background subtraction prior to setting input data");
      }
   }
}

void TUnfoldSys::GetBackground
(TH1 *bgrHist,const char *bgrSource,const Int_t *binMap,
 Int_t includeError,Bool_t clearHist) const
{
   if(clearHist) {
       ClearHistogram(bgrHist);
   }
   // add all background sources
   const TObject *key;
   {
      TMapIter bgrPtr(fBgrIn);
      for(key=bgrPtr.Next();key;key=bgrPtr.Next()) {
         TString bgrName=((const TObjString *)key)->GetString();
         if(bgrSource && bgrName.CompareTo(bgrSource)) continue;
         const TMatrixD *bgr=(const TMatrixD *)
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
            ((const TPair *)*bgrPtr)->Value()
#else
            fBgrIn->GetValue(bgrName)
#endif
            ;
         for(Int_t i=0;i<GetNy();i++) {
            Int_t destBin=binMap[i];
            bgrHist->SetBinContent(destBin,bgrHist->GetBinContent(destBin)+
                                   (*bgr)(i,0));
         }
      }
   }
   // add uncorrelated background errors
   if(includeError &1) {
      TMapIter bgrErrUncorrSqPtr(fBgrErrUncorrInSq);
      for(key=bgrErrUncorrSqPtr.Next();key;key=bgrErrUncorrSqPtr.Next()) {
         TString bgrName=((const TObjString *)key)->GetString();
         if(bgrSource && bgrName.CompareTo(bgrSource)) continue;
         const TMatrixD *bgrerruncorrSquared=(TMatrixD const *)
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
            ((const TPair *)*bgrErrUncorrSqPtr)->Value()
#else
            fBgrErrUncorrInSq->GetValue(((const TObjString *)key)
                                            ->GetString())
#endif
            ;
         for(Int_t i=0;i<GetNy();i++) {
            Int_t destBin=binMap[i];
            bgrHist->SetBinError
               (destBin,TMath::Sqrt
                ((*bgrerruncorrSquared)(i,0)+
                 TMath::Power(bgrHist->GetBinError(destBin),2.)));
         }
      }
   }
   if(includeError & 2) {
      TMapIter bgrErrScalePtr(fBgrErrScaleIn);
      for(key=bgrErrScalePtr.Next();key;key=bgrErrScalePtr.Next()) {
         TString bgrName=((const TObjString *)key)->GetString();
         if(bgrSource && bgrName.CompareTo(bgrSource)) continue;
         const TMatrixD *bgrerrscale=(TMatrixD const *)
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
            ((const TPair *)*bgrErrScalePtr)->Value()
#else
            fBgrErrScaleIn->GetValue(((const TObjString *)key)->GetString())
#endif
            ;
         for(Int_t i=0;i<GetNy();i++) {
            Int_t destBin=binMap[i];
            bgrHist->SetBinError(destBin,hypot((*bgrerrscale)(i,0),
                                               bgrHist->GetBinError(destBin)));
         }
      }
   }
}

void TUnfoldSys::InitTUnfoldSys(void)
{
   // initialize pointers and TMaps

   // input
   fDAinRelSq = 0;
   fDAinColRelSq = 0;
   fAoutside = 0;
   fBgrIn = new TMap();
   fBgrErrUncorrInSq = new TMap();
   fBgrErrScaleIn = new TMap();
   fSysIn = new TMap();
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
   fBgrIn->SetOwnerKeyValue();
   fBgrErrUncorrInSq->SetOwnerKeyValue();
   fBgrErrScaleIn->SetOwnerKeyValue();
   fSysIn->SetOwnerKeyValue();
#else
   fBgrIn->SetOwner();
   fBgrErrUncorrInSq->SetOwner();
   fBgrErrScaleIn->SetOwner();
   fSysIn->SetOwner();
#endif
   // results
   fEmatUncorrX = 0;
   fEmatUncorrAx = 0;
   fDeltaCorrX = new TMap();
   fDeltaCorrAx = new TMap();
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
   fDeltaCorrX->SetOwnerKeyValue();
   fDeltaCorrAx->SetOwnerKeyValue();
#else
   fDeltaCorrX->SetOwner();
   fDeltaCorrAx->SetOwner();
#endif
   fDeltaSysTau = 0;
   fDtau=0.0;
   fYData=0;
   fVyyData=0;
}

TUnfoldSys::~TUnfoldSys(void)
{
   // delete all data members
   DeleteMatrix(&fDAinRelSq);
   DeleteMatrix(&fDAinColRelSq);
   delete fBgrIn;
   delete fBgrErrUncorrInSq;
   delete fBgrErrScaleIn;
   delete fSysIn;
   ClearResults();
   delete fDeltaCorrX;
   delete fDeltaCorrAx;
   DeleteMatrix(&fYData);
   DeleteMatrix(&fVyyData);
}

void TUnfoldSys::ClearResults(void)
{
   // clear all data members which depend on the unfolding results
   TUnfold::ClearResults();
   DeleteMatrix(&fEmatUncorrX);
   DeleteMatrix(&fEmatUncorrAx);
   fDeltaCorrX->Clear();
   fDeltaCorrAx->Clear();
   DeleteMatrix(&fDeltaSysTau);
}

void TUnfoldSys::PrepareSysError(void)
{
   // calculations required for syst.error
   // data members modified
   //    fEmatUncorrX, fEmatUncorrAx, fDeltaCorrX, fDeltaCorrAx
   if(!fEmatUncorrX) {
      fEmatUncorrX=PrepareUncorrEmat(GetDXDAM(0),GetDXDAM(1));
   }
   TMatrixDSparse *AM0=0,*AM1=0;
   if(!fEmatUncorrAx) {
      if(!AM0) AM0=MultiplyMSparseMSparse(fA,GetDXDAM(0));
      if(!AM1) {
         AM1=MultiplyMSparseMSparse(fA,GetDXDAM(1));
         Int_t *rows_cols=new Int_t[GetNy()];
         Double_t *data=new Double_t[GetNy()];
         for(Int_t i=0;i<GetNy();i++) {
            rows_cols[i]=i;
            data[i]=1.0;
         }
         TMatrixDSparse *one=CreateSparseMatrix
            (GetNy(),GetNy(),GetNy(),rows_cols, rows_cols,data);
         delete[] data;
         delete[] rows_cols;
         AddMSparse(AM1,-1.,one);
         DeleteMatrix(&one);
         fEmatUncorrAx=PrepareUncorrEmat(AM0,AM1);
      }
   }
   if((!fDeltaSysTau )&&(fDtau>0.0)) {
      fDeltaSysTau=new TMatrixDSparse(*GetDXDtauSquared());
      Double_t scale=2.*TMath::Sqrt(fTauSquared)*fDtau;
      Int_t n=fDeltaSysTau->GetRowIndexArray() [fDeltaSysTau->GetNrows()];
      Double_t *data=fDeltaSysTau->GetMatrixArray();
      for(Int_t i=0;i<n;i++) {
         data[i] *= scale;
      }
   }

   TMapIter sysErrIn(fSysIn);
   const TObjString *key;

   // calculate individual systematic errors
   for(key=(const TObjString *)sysErrIn.Next();key;
       key=(const TObjString *)sysErrIn.Next()) {
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
      const TMatrixDSparse *dsys=
         (const TMatrixDSparse *)((const TPair *)*sysErrIn)->Value();
#else
      const TMatrixDSparse *dsys=
         (const TMatrixDSparse *)(fSysIn->GetValue(key->GetString()));
#endif
      const TPair *named_emat=(const TPair *)
         fDeltaCorrX->FindObject(key->GetString());
      if(!named_emat) {
         TMatrixDSparse *emat=PrepareCorrEmat(GetDXDAM(0),GetDXDAM(1),dsys);
         fDeltaCorrX->Add(new TObjString(*key),emat);
      }
      named_emat=(const TPair *)fDeltaCorrAx->FindObject(key->GetString());
      if(!named_emat) {
         if(!AM0) AM0=MultiplyMSparseMSparse(fA,GetDXDAM(0));
         if(!AM1) {
            AM1=MultiplyMSparseMSparse(fA,GetDXDAM(1));
            Int_t *rows_cols=new Int_t[GetNy()];
            Double_t *data=new Double_t[GetNy()];
            for(Int_t i=0;i<GetNy();i++) {
               rows_cols[i]=i;
               data[i]=1.0;
            }
            TMatrixDSparse *one=CreateSparseMatrix
               (GetNy(),GetNy(),GetNy(),rows_cols, rows_cols,data);
            delete[] data;
            delete[] rows_cols;
            AddMSparse(AM1,-1.,one);
            DeleteMatrix(&one);
            fEmatUncorrAx=PrepareUncorrEmat(AM0,AM1);
         }
         TMatrixDSparse *emat=PrepareCorrEmat(AM0,AM1,dsys);
         fDeltaCorrAx->Add(new TObjString(*key),emat);
      }
   }
   DeleteMatrix(&AM0);
   DeleteMatrix(&AM1);
}
  
void TUnfoldSys::GetEmatrixSysUncorr
(TH2 *ematrix,const Int_t *binMap,Bool_t clearEmat)
{
   // get output error contribution from statistical fluctuations in A
   //   ematrix: output error matrix histogram
   //   binMap: see method GetEmatrix()
   //   clearEmat: set kTRUE to clear the histogram prior to adding the errors
   // data members modified:
   //   fVYAx, fESparse, fEAtV, fErrorAStat
   PrepareSysError();
   ErrorMatrixToHist(ematrix,fEmatUncorrX,binMap,clearEmat);
}

TMatrixDSparse *TUnfoldSys::PrepareUncorrEmat
(const TMatrixDSparse *m_0,const TMatrixDSparse *m_1)
{
   // propagate uncorrelated systematic errors to a covariance matrix
   //   m0,m1 : coefficients (matrices) for propagating the errors
   //
   // the error matrix is calculated by standard error propagation, where the
   // derivative of the result vector X wrt the matrix A is given by
   //
   //  dX_k / dA_ij  =  M0_kj * Z0_i  - M1_ki * Z1_j
   //
   // where:
   //   the matrices M0 and M1 are arguments to this function
   //   the vectors Z0, Z1 : GetDXDAZ()
   //
   // The matrix A is calculated from a matrix B as
   //
   //    A_ij = B_ij / sum_k B_kj
   //
   // where k runs over additional indices of B, not present in A.
   // (underflow and overflow bins, used for efficiency corrections)
   //
   // define:   Norm_j = sum_k B_kj   (data member fSumOverY)
   //
   // the derivative of A wrt this input matrix B is given by:
   //
   //   dA_ij / dB_kj = (  delta_ik - A_ij ) * 1/Norm_j 
   //
   // The covariance matrix Vxx is:
   //
   //   Vxx_mn  = sum_ijlk [   (dX_m / dA_ij) * (dA_ij / dB_kj) * DB_kj
   //                        * (dX_n / dA_lj) * (dA_lj / dB_kj)  ]
   //
   // where DB_kj is the error on B_kj squared
   // Simplify the sum over k:
   //
   //   sum_k [ (dA_ij / dB_kj) * DB_kj * (dA_lj / dB_kj) ]
   //      =  sum_k [  ( delta_ik - A_ij ) * 1/Norm_j * DB_kj *
   //                * ( delta_lk - A_lj ) * 1/Norm_j ]
   //      =  sum_k [ ( delta_ik*delta_lk - delta_ik*A_lj - delta_lk*A_ij
   //                  + A_ij * A_lj ) * DB_kj / Norm_j^2 ]
   //
   // introduce normalized errors:  Rsq_kj = DB_kj / Norm_j^2
   // after summing over k:
   //   delta_ik*delta_lk*Rsq_kj  ->    delta_il*Rsq_ij
   //   delta_ik*A_lj*Rsq_kj      ->    A_lj*Rsq_ij
   //   delta_lk*A_ij*Rsq_kj      ->    A_ij*Rsq_lj
   //   A_ij*A_lj*Rsq_kj          ->    A_ij*A_lj*sum_k(Rsq_kj)
   //
   // introduce sum of normalized errors squared:   SRsq_j = sum_k(Rsq_kj)
   //
   // Note: Rsq_ij is stored as  fDAinRelSq     (excludes extra indices of B)
   //   and SRsq_j is stored as  fDAinColRelSq  (sum includes all indices of B)
   //
   //  Vxx_nm = sum_ijl [ (dX_m / dA_ij) * (dX_n / dA_lj)
   //     (delta_il*Rsq_ij - A_lj*Rsq_ij - A_ij*Rsq_lj + A_ij*A_lj *SRsq_j) ]
   //
   //  Vxx_nm =    sum_j [ F_mj * F_nj * SRsq_j
   //            - sum_j [ G_mj * F_nj ]
   //            - sum_j [ F_mj * G_nj ]
   //            + sum_ij [  (dX_m / dA_ij) * (dX_n / dA_lj) * Rsq_ij ]
   //
   // where:
   //    F_mj = sum_i [ (dX_m / dA_ij) * A_ij ]
   //    G_mj = sum_i [ (dX_m / dA_ij) * Rsq_ij ]
   //
   // In order to avoid explicitly calculating the 3-dimensional tensor
   // (dX_m/dA_ij) the sums are evaluated further, using
   //    dX_k / dA_ij  =  M0_kj * Z0_i  - M1_ki * Z1_j
   //
   //   F_mj = M0_mj * (A# Z0)_j - (M1 A)_mj Z1_j
   //   G_mj = M0_mj * (Rsq# Z0)_j - (M1 Rsq)_mj Z1_j
   //
   // and
   //
   //   sum_ij [ (dX_m/dA_ij) * (dX_n/dA_ij) * Rsq_ij ] =
   //      sum_j [ M0_mj * M0_nj *  [ sum_i (Z0_i)^2 * Rsq_ij ] ]
   //    + sum_i [ M1_mi * M1_ni *  [ sum_j (Z1_j)^2 * Rsq_ij ] ]
   //    - sum_i [ M1_mi * H_ni + M1_ni * H_mi]
   // where:
   //   H_mi = Z0_i * sum_j [ M0_mj * Z1_j * Rsq_ij ]
   //
   // collect all contributions:
   //   Vxx_nm = r0 -r1 -r2 +r3 +r4 -r5 -r6
   //      r0 = sum_j [ F_mj * F_nj * SRsq_j ]
   //      r1 = sum_j [ G_mj * F_nj ]
   //      r2 = sum_j [ F_mj * G_nj ]
   //      r3 = sum_j [ M0_mj * M0_nj *  [ sum_i (Z0_i)^2 * Rsq_ij ] ]
   //      r4 = sum_i [ M1_mi * M1_ni *  [ sum_j (Z1_j)^2 * Rsq_ij ] ]
   //      r5 = sum_i [ M1_mi * H_ni ]
   //      r6 = sum_i [ M1_ni * H_mi ]

   //======================================================
   // calculate contributions containing matrices F and G
   // r0,r1,r2
   TMatrixDSparse *r=0;
   if(fDAinColRelSq && fDAinRelSq) {
      // calculate matrices (M1*A)_mj * Z1_j  and  (M1*Rsq)_mj * Z1_j
      TMatrixDSparse *M1A_Z1=MultiplyMSparseMSparse(m_1,fA);
      ScaleColumnsByVector(M1A_Z1,GetDXDAZ(1));
      TMatrixDSparse *M1Rsq_Z1=MultiplyMSparseMSparse(m_1,fDAinRelSq);
      ScaleColumnsByVector(M1Rsq_Z1,GetDXDAZ(1));
      // calculate vectors A#*Z0  and  Rsq#*Z0
      TMatrixDSparse *AtZ0 = MultiplyMSparseTranspMSparse(fA,GetDXDAZ(0));
      TMatrixDSparse *RsqZ0=
         MultiplyMSparseTranspMSparse(fDAinRelSq,GetDXDAZ(0));
      //calculate matrix F
      //   F_mj = M0_mj * (A# Z0)_j - (M1 A)_mj Z1_j
      TMatrixDSparse *F=new TMatrixDSparse(*m_0);
      ScaleColumnsByVector(F,AtZ0);
      AddMSparse(F,-1.0,M1A_Z1);
      //calculate matrix G
      //   G_mj = M0_mj * (Rsq# Z0)_j - (M1 Rsq)_mj Z1_j
      TMatrixDSparse *G=new TMatrixDSparse(*m_0);
      ScaleColumnsByVector(G,RsqZ0);
      AddMSparse(G,-1.0,M1Rsq_Z1);
      DeleteMatrix(&M1A_Z1);
      DeleteMatrix(&M1Rsq_Z1);
      DeleteMatrix(&AtZ0);
      DeleteMatrix(&RsqZ0);
      //      r0 = sum_j [ F_mj * F_nj * SRsq_j ]
      r=MultiplyMSparseMSparseTranspVector(F,F,fDAinColRelSq);
      //      r1 = sum_j [ G_mj * F_nj ]
      TMatrixDSparse *r1=MultiplyMSparseMSparseTranspVector(F,G,0);
      //      r2 = sum_j [ F_mj * G_nj ]
      TMatrixDSparse *r2=MultiplyMSparseMSparseTranspVector(G,F,0);
      // r = r0-r1-r2
      AddMSparse(r,-1.0,r1);
      AddMSparse(r,-1.0,r2);
      DeleteMatrix(&r1);
      DeleteMatrix(&r2);
      DeleteMatrix(&F);
      DeleteMatrix(&G);
   }
   //======================================================
   // calculate contribution
   //   sum_ij [ (dX_m/dA_ij) * (dX_n/dA_ij) * Rsq_ij ]
   //  (r3,r4,r5,r6)
   if(fDAinRelSq) {
      // (Z0_i)^2
      TMatrixDSparse Z0sq(*GetDXDAZ(0));
      const Int_t *Z0sq_rows=Z0sq.GetRowIndexArray();
      Double_t *Z0sq_data=Z0sq.GetMatrixArray();
      for(int index=0;index<Z0sq_rows[Z0sq.GetNrows()];index++) {
         Z0sq_data[index] *= Z0sq_data[index];
      }
      // Z0sqRsq =  sum_i (Z_i)^2 * Rsq_ij 
      TMatrixDSparse *Z0sqRsq=MultiplyMSparseTranspMSparse(fDAinRelSq,&Z0sq);
      //      r3 = sum_j [ M0_mj * M0_nj *  [ sum_i (Z0_i)^2 * Rsq_ij ] ]      
      TMatrixDSparse *r3=MultiplyMSparseMSparseTranspVector(m_0,m_0,Z0sqRsq);
      DeleteMatrix(&Z0sqRsq);

      // (Z1_j)^2
      TMatrixDSparse Z1sq(*GetDXDAZ(1));
      const Int_t *Z1sq_rows=Z1sq.GetRowIndexArray();
      Double_t *Z1sq_data=Z1sq.GetMatrixArray();
      for(int index=0;index<Z1sq_rows[Z1sq.GetNrows()];index++) {
         Z1sq_data[index] *= Z1sq_data[index];
      }
      // Z1sqRsq = sum_j (Z1_j)^2 * Rsq_ij ]
      TMatrixDSparse *Z1sqRsq=MultiplyMSparseMSparse(fDAinRelSq,&Z1sq);
      //      r4 = sum_i [ M1_mi * M1_ni *  [ sum_j (Z1_j)^2 * Rsq_ij ] ]
      TMatrixDSparse *r4=MultiplyMSparseMSparseTranspVector(m_1,m_1,Z1sqRsq);
      DeleteMatrix(&Z1sqRsq);

      // sum_j [ M0_mj * Z1_j * Rsq_ij ]
      TMatrixDSparse *H=MultiplyMSparseMSparseTranspVector
         (m_0,fDAinRelSq,GetDXDAZ(1));
      // H_mi = Z0_i * sum_j [ M0_mj * Z1_j * Rsq_ij ]
      ScaleColumnsByVector(H,GetDXDAZ(0));
      //      r5 = sum_i [ M1_mi * H_ni ]
      TMatrixDSparse *r5=MultiplyMSparseMSparseTranspVector(m_1,H,0);
      //      r6 = sum_i [ H_mi * M1_ni ]
      TMatrixDSparse *r6=MultiplyMSparseMSparseTranspVector(H,m_1,0);
      DeleteMatrix(&H);
      // r =  r0 -r1 -r2 +r3 +r4 +r5 +r6
      if(r) {
         AddMSparse(r,1.0,r3);
         DeleteMatrix(&r3);
      } else {
         r=r3;
         r3=0;
      }
      AddMSparse(r,1.0,r4);
      AddMSparse(r,-1.0,r5);
      AddMSparse(r,-1.0,r6);
      DeleteMatrix(&r4);
      DeleteMatrix(&r5);
      DeleteMatrix(&r6);
   }
   return r;
}

TMatrixDSparse *TUnfoldSys::PrepareCorrEmat
(const TMatrixDSparse *m1,const TMatrixDSparse *m2,const TMatrixDSparse *dsys)
{
   // propagate correlated systematic shift to output vector
   //   m1,m2 : coefficients for propagating the errors
   //   dsys : matrix of correlated shifts from this source

   // delta_m = 
   //   sum{i,j}   {
   //      ((*m1)(m,j) * (*fVYAx)(i) - (*m2)(m,i) * (*fX)(j))*dsys(i,j) }
   //   =    sum_j (*m1)(m,j)  sum_i dsys(i,j) * (*fVYAx)(i)
   //     -  sum_i (*m2)(m,i)  sum_j dsys(i,j) * (*fX)(j)

   TMatrixDSparse *dsysT_VYAx = MultiplyMSparseTranspMSparse(dsys,GetDXDAZ(0));
   TMatrixDSparse *delta =  MultiplyMSparseMSparse(m1,dsysT_VYAx);
   DeleteMatrix(&dsysT_VYAx);
   TMatrixDSparse *dsys_X = MultiplyMSparseMSparse(dsys,GetDXDAZ(1));
   TMatrixDSparse *delta2 = MultiplyMSparseMSparse(m2,dsys_X);
   DeleteMatrix(&dsys_X);
   AddMSparse(delta,-1.0,delta2);
   DeleteMatrix(&delta2);
   return delta;
}

void TUnfoldSys::SetTauError(Double_t delta_tau)
{
   // set uncertainty on tau
   fDtau=delta_tau;
   DeleteMatrix(&fDeltaSysTau);
}

Bool_t TUnfoldSys::GetDeltaSysSource(TH1 *hist_delta,const char *name,
                                   const Int_t *binMap)
{
   // calculate systematic shift from a given source
   //    ematrix: output
   //    source: name of the error source
   //    binMap: see method GetEmatrix()
   PrepareSysError();
   const TPair *named_emat=(const TPair *)fDeltaCorrX->FindObject(name);
   const TMatrixDSparse *delta=0;
   if(named_emat) {
      delta=(TMatrixDSparse *)named_emat->Value();
   }
   VectorMapToHist(hist_delta,delta,binMap);
   return delta !=0;
}

Bool_t TUnfoldSys::GetDeltaSysBackgroundScale
(TH1 *hist_delta,const char *source,const Int_t *binMap)
{
   // get correlated shift induced by a background source
   //   delta: output shift vector histogram
   //   source: name of background source
   //   binMap: see method GetEmatrix()
   //   see PrepareSysError()
   PrepareSysError();
   const TPair *named_err=(const TPair *)fBgrErrScaleIn->FindObject(source);
   TMatrixDSparse *dx=0;
   if(named_err) {
      const TMatrixD *dy=(TMatrixD *)named_err->Value();
      dx=MultiplyMSparseM(GetDXDY(),dy);
   }
   VectorMapToHist(hist_delta,dx,binMap);
   if(dx!=0) {
      DeleteMatrix(&dx);
      return kTRUE;
   }
   return kFALSE;
}

Bool_t TUnfoldSys::GetDeltaSysTau(TH1 *hist_delta,const Int_t *binMap)
{
   // calculate systematic shift from tau variation
   //    ematrix: output
   //    binMap: see method GetEmatrix()
   PrepareSysError();
   VectorMapToHist(hist_delta,fDeltaSysTau,binMap);
   return fDeltaSysTau !=0;
}

void TUnfoldSys::GetEmatrixSysSource
(TH2 *ematrix,const char *name,const Int_t *binMap,Bool_t clearEmat)
{
   // calculate systematic shift from a given source
   //    ematrix: output
   //    source: name of the error source
   //    binMap: see method GetEmatrix()
   //    clearEmat: set kTRUE to clear the histogram prior to adding the errors
   PrepareSysError();
   const TPair *named_emat=(const TPair *)fDeltaCorrX->FindObject(name);
   TMatrixDSparse *emat=0;
   if(named_emat) {
      const TMatrixDSparse *delta=(TMatrixDSparse *)named_emat->Value();
      emat=MultiplyMSparseMSparseTranspVector(delta,delta,0);
   }
   ErrorMatrixToHist(ematrix,emat,binMap,clearEmat);
   DeleteMatrix(&emat);
}

void TUnfoldSys::GetEmatrixSysBackgroundScale
(TH2 *ematrix,const char *name,const Int_t *binMap,Bool_t clearEmat)
{
   // calculate systematic shift from a given background scale error
   //    ematrix: output
   //    source: name of the error source
   //    binMap: see method GetEmatrix()
   //    clearEmat: set kTRUE to clear the histogram prior to adding the errors
   PrepareSysError();
   const TPair *named_err=(const TPair *)fBgrErrScaleIn->FindObject(name);
   TMatrixDSparse *emat=0;
   if(named_err) {
      const TMatrixD *dy=(TMatrixD *)named_err->Value();
      TMatrixDSparse *dx=MultiplyMSparseM(GetDXDY(),dy);
      emat=MultiplyMSparseMSparseTranspVector(dx,dx,0);
      DeleteMatrix(&dx);
   }
   ErrorMatrixToHist(ematrix,emat,binMap,clearEmat);
   DeleteMatrix(&emat);
}

void TUnfoldSys::GetEmatrixSysTau
(TH2 *ematrix,const Int_t *binMap,Bool_t clearEmat)
{
   // calculate error matrix from error in regularisation parameter
   //    ematrix: output
   //    binMap: see method GetEmatrix()
   //    clearEmat: set kTRUE to clear the histogram prior to adding the errors
   PrepareSysError();
   TMatrixDSparse *emat=0;
   if(fDeltaSysTau) {
      emat=MultiplyMSparseMSparseTranspVector(fDeltaSysTau,fDeltaSysTau,0);
   }
   ErrorMatrixToHist(ematrix,emat,binMap,clearEmat);
   DeleteMatrix(&emat);
}

void TUnfoldSys::GetEmatrixInput
(TH2 *ematrix,const Int_t *binMap,Bool_t clearEmat)
{
   // calculate error matrix from error in input vector alone
   //    ematrix: output
   //    binMap: see method GetEmatrix()
   //    clearEmat: set kTRUE to clear the histogram prior to adding the errors
   GetEmatrixFromVyy(fVyyData,ematrix,binMap,clearEmat);
}

void TUnfoldSys::GetEmatrixSysBackgroundUncorr
(TH2 *ematrix,const char *source,const Int_t *binMap,Bool_t clearEmat)
{
   // calculate error matrix contribution originating from uncorrelated errors
   // of one background source
   //    ematrix: output
   //    source: name of the error source
   //    binMap: see method GetEmatrix()
   //    clearEmat: set kTRUE to clear the histogram prior to adding the errors
   const TPair *named_err=(const TPair *)fBgrErrUncorrInSq->FindObject(source);
   TMatrixDSparse *emat=0;
   if(named_err) {
      TMatrixD const *dySquared=(TMatrixD const *)named_err->Value();
      emat=MultiplyMSparseMSparseTranspVector(GetDXDY(),GetDXDY(),dySquared);
   }
   ErrorMatrixToHist(ematrix,emat,binMap,clearEmat);
   DeleteMatrix(&emat);
}

void TUnfoldSys::GetEmatrixFromVyy
(const TMatrixDSparse *vyy,TH2 *ematrix,const Int_t *binMap,Bool_t clearEmat)
{
   // propagate error matrix vyy to the result
   //    vyy: error matrix on input data fY
   //    ematrix: output
   //    binMap: see method GetEmatrix()
   //    clearEmat: set kTRUE to clear the histogram prior to adding the errors
   PrepareSysError();
   TMatrixDSparse *em=0;
   if(vyy) {
      TMatrixDSparse *dxdyVyy=MultiplyMSparseMSparse(GetDXDY(),vyy);
      em=MultiplyMSparseMSparseTranspVector(dxdyVyy,GetDXDY(),0);
      DeleteMatrix(&dxdyVyy);
   }
   ErrorMatrixToHist(ematrix,em,binMap,clearEmat);
   DeleteMatrix(&em);
}

void TUnfoldSys::GetEmatrixTotal(TH2 *ematrix,const Int_t *binMap)
{
   // get total error including statistical error
   //    ematrix: output
   //    binMap: see method GetEmatrix()
   GetEmatrix(ematrix,binMap);  // (stat)+(d)+(e)
   GetEmatrixSysUncorr(ematrix,binMap,kFALSE); // (a)
   TMapIter sysErrPtr(fDeltaCorrX);
   const TObject *key;
   
   for(key=sysErrPtr.Next();key;key=sysErrPtr.Next()) {
      GetEmatrixSysSource(ematrix,
                          ((const TObjString *)key)->GetString(),
                          binMap,kFALSE); // (b)
   }
   GetEmatrixSysTau(ematrix,binMap,kFALSE); // (c)
}

TMatrixDSparse *TUnfoldSys::GetSummedErrorMatrixYY(void)
{
   PrepareSysError();

   // errors from input vector and from background subtraction
   TMatrixDSparse *emat_sum=new TMatrixDSparse(*fVyy);

   // uncorrelated systematic error
   AddMSparse(emat_sum,1.0,fEmatUncorrAx);
   TMapIter sysErrPtr(fDeltaCorrAx);
   const TObject *key;

   // correlated systematic errors
   for(key=sysErrPtr.Next();key;key=sysErrPtr.Next()) {
      const TMatrixDSparse *delta=(TMatrixDSparse *)
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
                 ((const TPair *)*sysErrPtr)->Value()
#else
         fDeltaCorrAx->GetValue(((const TObjString *)key)
                                ->GetString())
#endif
         ;
      TMatrixDSparse *emat=MultiplyMSparseMSparseTranspVector(delta,delta,0);
      AddMSparse(emat_sum,1.0,emat);
      DeleteMatrix(&emat);
   }
   // error on tau
   if(fDeltaSysTau) {
      TMatrixDSparse *Adx_tau=MultiplyMSparseMSparse(fA,fDeltaSysTau);
      TMatrixDSparse *emat_tau=
         MultiplyMSparseMSparseTranspVector(Adx_tau,Adx_tau,0);
      DeleteMatrix(&Adx_tau);
      AddMSparse(emat_sum,1.0,emat_tau);
      DeleteMatrix(&emat_tau);
   }
   return emat_sum;
}
   
TMatrixDSparse *TUnfoldSys::GetSummedErrorMatrixXX(void)
{
   PrepareSysError();

   // errors from input vector and from background subtraction
   TMatrixDSparse *emat_sum=new TMatrixDSparse(*GetVxx());

   // uncorrelated systematic error
   AddMSparse(emat_sum,1.0,fEmatUncorrX);
   TMapIter sysErrPtr(fDeltaCorrX);
   const TObject *key;

   // correlated systematic errors
   for(key=sysErrPtr.Next();key;key=sysErrPtr.Next()) {
      const TMatrixDSparse *delta=(TMatrixDSparse *)
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,20,00)
                 ((const TPair *)*sysErrPtr)->Value()
#else
         fDeltaCorrX->GetValue(((const TObjString *)key)
                                ->GetString())
#endif
         ;
      TMatrixDSparse *emat=MultiplyMSparseMSparseTranspVector(delta,delta,0);
      AddMSparse(emat_sum,1.0,emat);
      DeleteMatrix(&emat);
   }
   // error on tau
   if(fDeltaSysTau) {
      TMatrixDSparse *emat_tau=
         MultiplyMSparseMSparseTranspVector(fDeltaSysTau,fDeltaSysTau,0);
      AddMSparse(emat_sum,1.0,emat_tau);
      DeleteMatrix(&emat_tau);
   }
   return emat_sum;
}
   

Double_t TUnfoldSys::GetChi2Sys(void)
{
   // calculate total chi**2 including systematic errors

   TMatrixDSparse *emat_sum=GetSummedErrorMatrixYY();

   Int_t rank=0;
   TMatrixDSparse *v=InvertMSparseSymmPos(emat_sum,&rank);
   TMatrixD dy(*fY, TMatrixD::kMinus, *GetAx());
   TMatrixDSparse *vdy=MultiplyMSparseM(v,&dy);
   DeleteMatrix(&v);
   Double_t r=0.0;
   const Int_t *vdy_rows=vdy->GetRowIndexArray();
   const Double_t *vdy_data=vdy->GetMatrixArray();
   for(Int_t i=0;i<vdy->GetNrows();i++) {
      if(vdy_rows[i+1]>vdy_rows[i]) {
         r += vdy_data[vdy_rows[i]] * dy(i,0);
      }
   }
   DeleteMatrix(&vdy);
   DeleteMatrix(&emat_sum);
   return r;
}

void TUnfoldSys::GetRhoItotal(TH1 *rhoi,const Int_t *binMap,TH2 *invEmat)
{
   // get global correlation coefficients including systematic,statistical,background,tau errors
   //    rhoi: output histogram
   //    binMap: for each global bin, indicate in which histogram bin
   //            to store its content
   //    invEmat: output histogram for inverse of error matrix
   //              (pointer may zero if inverse is not requested)
   ClearHistogram(rhoi,-1.);
   TMatrixDSparse *emat_sum=GetSummedErrorMatrixXX();
   GetRhoIFromMatrix(rhoi,emat_sum,binMap,invEmat);

   DeleteMatrix(&emat_sum);
}

void TUnfoldSys::ScaleColumnsByVector
(TMatrixDSparse *m,const TMatrixTBase<Double_t> *v) const
{
   // scale columns of m by the corresponding rows of v
   // input:
   //   m:  pointer to sparse matrix of dimension NxM
   //   v:  pointer to matrix of dimension Mx1
   if((m->GetNcols() != v->GetNrows())||(v->GetNcols()!=1)) {
      Fatal("ScaleColumnsByVector error",
            "matrix cols/vector rows %d!=%d OR vector cols %d !=1\n",
            m->GetNcols(),v->GetNrows(),v->GetNcols());
   }
   const Int_t *rows_m=m->GetRowIndexArray();
   const Int_t *cols_m=m->GetColIndexArray();
   Double_t *data_m=m->GetMatrixArray();
   const TMatrixDSparse *v_sparse=dynamic_cast<const TMatrixDSparse *>(v);
   if(v_sparse) {
      const Int_t *rows_v=v_sparse->GetRowIndexArray();
      const Double_t *data_v=v_sparse->GetMatrixArray();
      for(Int_t i=0;i<m->GetNrows();i++) {
         for(Int_t index_m=rows_m[i];index_m<rows_m[i+1];index_m++) {
            Int_t j=cols_m[index_m];
            Int_t index_v=rows_v[j];
            if(index_v<rows_v[j+1]) {
               data_m[index_m] *= data_v[index_v];
            } else {
               data_m[index_m] =0.0;
            }
         }
      }
   } else {
      for(Int_t i=0;i<m->GetNrows();i++) {
         for(Int_t index=rows_m[i];index<rows_m[i+1];index++) {
            data_m[index] *= (*v)(cols_m[index],0);
         }
      }
   }
}

void TUnfoldSys::VectorMapToHist
(TH1 *hist_delta,const TMatrixDSparse *delta,const Int_t *binMap)
{
   // sum over bins of *delta, as defined in binMap,fXToHist
   //   hist_delta: histogram to return summed vector
   //   delta: vector to sum and remap
   Int_t nbin=hist_delta->GetNbinsX();
   Double_t *c=new Double_t[nbin+2];
   for(Int_t i=0;i<nbin+2;i++) {
      c[i]=0.0;
   }
   if(delta) {
      Int_t binMapSize = fHistToX.GetSize();
      const Double_t *delta_data=delta->GetMatrixArray();
      const Int_t *delta_rows=delta->GetRowIndexArray();
      for(Int_t i=0;i<binMapSize;i++) {
         Int_t destBinI=binMap ? binMap[i] : i;
         Int_t srcBinI=fHistToX[i];
         if((destBinI>=0)&&(destBinI<nbin+2)&&(srcBinI>=0)) {
            Int_t index=delta_rows[srcBinI];
            if(index<delta_rows[srcBinI+1]) {
               c[destBinI]+=delta_data[index];
            }
         }
      }
   }
   for(Int_t i=0;i<nbin+2;i++) {
      hist_delta->SetBinContent(i,c[i]);
      hist_delta->SetBinError(i,0.0);
   }
   delete[] c;
}
 TUnfoldSys.cxx:1
 TUnfoldSys.cxx:2
 TUnfoldSys.cxx:3
 TUnfoldSys.cxx:4
 TUnfoldSys.cxx:5
 TUnfoldSys.cxx:6
 TUnfoldSys.cxx:7
 TUnfoldSys.cxx:8
 TUnfoldSys.cxx:9
 TUnfoldSys.cxx:10
 TUnfoldSys.cxx:11
 TUnfoldSys.cxx:12
 TUnfoldSys.cxx:13
 TUnfoldSys.cxx:14
 TUnfoldSys.cxx:15
 TUnfoldSys.cxx:16
 TUnfoldSys.cxx:17
 TUnfoldSys.cxx:18
 TUnfoldSys.cxx:19
 TUnfoldSys.cxx:20
 TUnfoldSys.cxx:21
 TUnfoldSys.cxx:22
 TUnfoldSys.cxx:23
 TUnfoldSys.cxx:24
 TUnfoldSys.cxx:25
 TUnfoldSys.cxx:26
 TUnfoldSys.cxx:27
 TUnfoldSys.cxx:28
 TUnfoldSys.cxx:29
 TUnfoldSys.cxx:30
 TUnfoldSys.cxx:31
 TUnfoldSys.cxx:32
 TUnfoldSys.cxx:33
 TUnfoldSys.cxx:34
 TUnfoldSys.cxx:35
 TUnfoldSys.cxx:36
 TUnfoldSys.cxx:37
 TUnfoldSys.cxx:38
 TUnfoldSys.cxx:39
 TUnfoldSys.cxx:40
 TUnfoldSys.cxx:41
 TUnfoldSys.cxx:42
 TUnfoldSys.cxx:43
 TUnfoldSys.cxx:44
 TUnfoldSys.cxx:45
 TUnfoldSys.cxx:46
 TUnfoldSys.cxx:47
 TUnfoldSys.cxx:48
 TUnfoldSys.cxx:49
 TUnfoldSys.cxx:50
 TUnfoldSys.cxx:51
 TUnfoldSys.cxx:52
 TUnfoldSys.cxx:53
 TUnfoldSys.cxx:54
 TUnfoldSys.cxx:55
 TUnfoldSys.cxx:56
 TUnfoldSys.cxx:57
 TUnfoldSys.cxx:58
 TUnfoldSys.cxx:59
 TUnfoldSys.cxx:60
 TUnfoldSys.cxx:61
 TUnfoldSys.cxx:62
 TUnfoldSys.cxx:63
 TUnfoldSys.cxx:64
 TUnfoldSys.cxx:65
 TUnfoldSys.cxx:66
 TUnfoldSys.cxx:67
 TUnfoldSys.cxx:68
 TUnfoldSys.cxx:69
 TUnfoldSys.cxx:70
 TUnfoldSys.cxx:71
 TUnfoldSys.cxx:72
 TUnfoldSys.cxx:73
 TUnfoldSys.cxx:74
 TUnfoldSys.cxx:75
 TUnfoldSys.cxx:76
 TUnfoldSys.cxx:77
 TUnfoldSys.cxx:78
 TUnfoldSys.cxx:79
 TUnfoldSys.cxx:80
 TUnfoldSys.cxx:81
 TUnfoldSys.cxx:82
 TUnfoldSys.cxx:83
 TUnfoldSys.cxx:84
 TUnfoldSys.cxx:85
 TUnfoldSys.cxx:86
 TUnfoldSys.cxx:87
 TUnfoldSys.cxx:88
 TUnfoldSys.cxx:89
 TUnfoldSys.cxx:90
 TUnfoldSys.cxx:91
 TUnfoldSys.cxx:92
 TUnfoldSys.cxx:93
 TUnfoldSys.cxx:94
 TUnfoldSys.cxx:95
 TUnfoldSys.cxx:96
 TUnfoldSys.cxx:97
 TUnfoldSys.cxx:98
 TUnfoldSys.cxx:99
 TUnfoldSys.cxx:100
 TUnfoldSys.cxx:101
 TUnfoldSys.cxx:102
 TUnfoldSys.cxx:103
 TUnfoldSys.cxx:104
 TUnfoldSys.cxx:105
 TUnfoldSys.cxx:106
 TUnfoldSys.cxx:107
 TUnfoldSys.cxx:108
 TUnfoldSys.cxx:109
 TUnfoldSys.cxx:110
 TUnfoldSys.cxx:111
 TUnfoldSys.cxx:112
 TUnfoldSys.cxx:113
 TUnfoldSys.cxx:114
 TUnfoldSys.cxx:115
 TUnfoldSys.cxx:116
 TUnfoldSys.cxx:117
 TUnfoldSys.cxx:118
 TUnfoldSys.cxx:119
 TUnfoldSys.cxx:120
 TUnfoldSys.cxx:121
 TUnfoldSys.cxx:122
 TUnfoldSys.cxx:123
 TUnfoldSys.cxx:124
 TUnfoldSys.cxx:125
 TUnfoldSys.cxx:126
 TUnfoldSys.cxx:127
 TUnfoldSys.cxx:128
 TUnfoldSys.cxx:129
 TUnfoldSys.cxx:130
 TUnfoldSys.cxx:131
 TUnfoldSys.cxx:132
 TUnfoldSys.cxx:133
 TUnfoldSys.cxx:134
 TUnfoldSys.cxx:135
 TUnfoldSys.cxx:136
 TUnfoldSys.cxx:137
 TUnfoldSys.cxx:138
 TUnfoldSys.cxx:139
 TUnfoldSys.cxx:140
 TUnfoldSys.cxx:141
 TUnfoldSys.cxx:142
 TUnfoldSys.cxx:143
 TUnfoldSys.cxx:144
 TUnfoldSys.cxx:145
 TUnfoldSys.cxx:146
 TUnfoldSys.cxx:147
 TUnfoldSys.cxx:148
 TUnfoldSys.cxx:149
 TUnfoldSys.cxx:150
 TUnfoldSys.cxx:151
 TUnfoldSys.cxx:152
 TUnfoldSys.cxx:153
 TUnfoldSys.cxx:154
 TUnfoldSys.cxx:155
 TUnfoldSys.cxx:156
 TUnfoldSys.cxx:157
 TUnfoldSys.cxx:158
 TUnfoldSys.cxx:159
 TUnfoldSys.cxx:160
 TUnfoldSys.cxx:161
 TUnfoldSys.cxx:162
 TUnfoldSys.cxx:163
 TUnfoldSys.cxx:164
 TUnfoldSys.cxx:165
 TUnfoldSys.cxx:166
 TUnfoldSys.cxx:167
 TUnfoldSys.cxx:168
 TUnfoldSys.cxx:169
 TUnfoldSys.cxx:170
 TUnfoldSys.cxx:171
 TUnfoldSys.cxx:172
 TUnfoldSys.cxx:173
 TUnfoldSys.cxx:174
 TUnfoldSys.cxx:175
 TUnfoldSys.cxx:176
 TUnfoldSys.cxx:177
 TUnfoldSys.cxx:178
 TUnfoldSys.cxx:179
 TUnfoldSys.cxx:180
 TUnfoldSys.cxx:181
 TUnfoldSys.cxx:182
 TUnfoldSys.cxx:183
 TUnfoldSys.cxx:184
 TUnfoldSys.cxx:185
 TUnfoldSys.cxx:186
 TUnfoldSys.cxx:187
 TUnfoldSys.cxx:188
 TUnfoldSys.cxx:189
 TUnfoldSys.cxx:190
 TUnfoldSys.cxx:191
 TUnfoldSys.cxx:192
 TUnfoldSys.cxx:193
 TUnfoldSys.cxx:194
 TUnfoldSys.cxx:195
 TUnfoldSys.cxx:196
 TUnfoldSys.cxx:197
 TUnfoldSys.cxx:198
 TUnfoldSys.cxx:199
 TUnfoldSys.cxx:200
 TUnfoldSys.cxx:201
 TUnfoldSys.cxx:202
 TUnfoldSys.cxx:203
 TUnfoldSys.cxx:204
 TUnfoldSys.cxx:205
 TUnfoldSys.cxx:206
 TUnfoldSys.cxx:207
 TUnfoldSys.cxx:208
 TUnfoldSys.cxx:209
 TUnfoldSys.cxx:210
 TUnfoldSys.cxx:211
 TUnfoldSys.cxx:212
 TUnfoldSys.cxx:213
 TUnfoldSys.cxx:214
 TUnfoldSys.cxx:215
 TUnfoldSys.cxx:216
 TUnfoldSys.cxx:217
 TUnfoldSys.cxx:218
 TUnfoldSys.cxx:219
 TUnfoldSys.cxx:220
 TUnfoldSys.cxx:221
 TUnfoldSys.cxx:222
 TUnfoldSys.cxx:223
 TUnfoldSys.cxx:224
 TUnfoldSys.cxx:225
 TUnfoldSys.cxx:226
 TUnfoldSys.cxx:227
 TUnfoldSys.cxx:228
 TUnfoldSys.cxx:229
 TUnfoldSys.cxx:230
 TUnfoldSys.cxx:231
 TUnfoldSys.cxx:232
 TUnfoldSys.cxx:233
 TUnfoldSys.cxx:234
 TUnfoldSys.cxx:235
 TUnfoldSys.cxx:236
 TUnfoldSys.cxx:237
 TUnfoldSys.cxx:238
 TUnfoldSys.cxx:239
 TUnfoldSys.cxx:240
 TUnfoldSys.cxx:241
 TUnfoldSys.cxx:242
 TUnfoldSys.cxx:243
 TUnfoldSys.cxx:244
 TUnfoldSys.cxx:245
 TUnfoldSys.cxx:246
 TUnfoldSys.cxx:247
 TUnfoldSys.cxx:248
 TUnfoldSys.cxx:249
 TUnfoldSys.cxx:250
 TUnfoldSys.cxx:251
 TUnfoldSys.cxx:252
 TUnfoldSys.cxx:253
 TUnfoldSys.cxx:254
 TUnfoldSys.cxx:255
 TUnfoldSys.cxx:256
 TUnfoldSys.cxx:257
 TUnfoldSys.cxx:258
 TUnfoldSys.cxx:259
 TUnfoldSys.cxx:260
 TUnfoldSys.cxx:261
 TUnfoldSys.cxx:262
 TUnfoldSys.cxx:263
 TUnfoldSys.cxx:264
 TUnfoldSys.cxx:265
 TUnfoldSys.cxx:266
 TUnfoldSys.cxx:267
 TUnfoldSys.cxx:268
 TUnfoldSys.cxx:269
 TUnfoldSys.cxx:270
 TUnfoldSys.cxx:271
 TUnfoldSys.cxx:272
 TUnfoldSys.cxx:273
 TUnfoldSys.cxx:274
 TUnfoldSys.cxx:275
 TUnfoldSys.cxx:276
 TUnfoldSys.cxx:277
 TUnfoldSys.cxx:278
 TUnfoldSys.cxx:279
 TUnfoldSys.cxx:280
 TUnfoldSys.cxx:281
 TUnfoldSys.cxx:282
 TUnfoldSys.cxx:283
 TUnfoldSys.cxx:284
 TUnfoldSys.cxx:285
 TUnfoldSys.cxx:286
 TUnfoldSys.cxx:287
 TUnfoldSys.cxx:288
 TUnfoldSys.cxx:289
 TUnfoldSys.cxx:290
 TUnfoldSys.cxx:291
 TUnfoldSys.cxx:292
 TUnfoldSys.cxx:293
 TUnfoldSys.cxx:294
 TUnfoldSys.cxx:295
 TUnfoldSys.cxx:296
 TUnfoldSys.cxx:297
 TUnfoldSys.cxx:298
 TUnfoldSys.cxx:299
 TUnfoldSys.cxx:300
 TUnfoldSys.cxx:301
 TUnfoldSys.cxx:302
 TUnfoldSys.cxx:303
 TUnfoldSys.cxx:304
 TUnfoldSys.cxx:305
 TUnfoldSys.cxx:306
 TUnfoldSys.cxx:307
 TUnfoldSys.cxx:308
 TUnfoldSys.cxx:309
 TUnfoldSys.cxx:310
 TUnfoldSys.cxx:311
 TUnfoldSys.cxx:312
 TUnfoldSys.cxx:313
 TUnfoldSys.cxx:314
 TUnfoldSys.cxx:315
 TUnfoldSys.cxx:316
 TUnfoldSys.cxx:317
 TUnfoldSys.cxx:318
 TUnfoldSys.cxx:319
 TUnfoldSys.cxx:320
 TUnfoldSys.cxx:321
 TUnfoldSys.cxx:322
 TUnfoldSys.cxx:323
 TUnfoldSys.cxx:324
 TUnfoldSys.cxx:325
 TUnfoldSys.cxx:326
 TUnfoldSys.cxx:327
 TUnfoldSys.cxx:328
 TUnfoldSys.cxx:329
 TUnfoldSys.cxx:330
 TUnfoldSys.cxx:331
 TUnfoldSys.cxx:332
 TUnfoldSys.cxx:333
 TUnfoldSys.cxx:334
 TUnfoldSys.cxx:335
 TUnfoldSys.cxx:336
 TUnfoldSys.cxx:337
 TUnfoldSys.cxx:338
 TUnfoldSys.cxx:339
 TUnfoldSys.cxx:340
 TUnfoldSys.cxx:341
 TUnfoldSys.cxx:342
 TUnfoldSys.cxx:343
 TUnfoldSys.cxx:344
 TUnfoldSys.cxx:345
 TUnfoldSys.cxx:346
 TUnfoldSys.cxx:347
 TUnfoldSys.cxx:348
 TUnfoldSys.cxx:349
 TUnfoldSys.cxx:350
 TUnfoldSys.cxx:351
 TUnfoldSys.cxx:352
 TUnfoldSys.cxx:353
 TUnfoldSys.cxx:354
 TUnfoldSys.cxx:355
 TUnfoldSys.cxx:356
 TUnfoldSys.cxx:357
 TUnfoldSys.cxx:358
 TUnfoldSys.cxx:359
 TUnfoldSys.cxx:360
 TUnfoldSys.cxx:361
 TUnfoldSys.cxx:362
 TUnfoldSys.cxx:363
 TUnfoldSys.cxx:364
 TUnfoldSys.cxx:365
 TUnfoldSys.cxx:366
 TUnfoldSys.cxx:367
 TUnfoldSys.cxx:368
 TUnfoldSys.cxx:369
 TUnfoldSys.cxx:370
 TUnfoldSys.cxx:371
 TUnfoldSys.cxx:372
 TUnfoldSys.cxx:373
 TUnfoldSys.cxx:374
 TUnfoldSys.cxx:375
 TUnfoldSys.cxx:376
 TUnfoldSys.cxx:377
 TUnfoldSys.cxx:378
 TUnfoldSys.cxx:379
 TUnfoldSys.cxx:380
 TUnfoldSys.cxx:381
 TUnfoldSys.cxx:382
 TUnfoldSys.cxx:383
 TUnfoldSys.cxx:384
 TUnfoldSys.cxx:385
 TUnfoldSys.cxx:386
 TUnfoldSys.cxx:387
 TUnfoldSys.cxx:388
 TUnfoldSys.cxx:389
 TUnfoldSys.cxx:390
 TUnfoldSys.cxx:391
 TUnfoldSys.cxx:392
 TUnfoldSys.cxx:393
 TUnfoldSys.cxx:394
 TUnfoldSys.cxx:395
 TUnfoldSys.cxx:396
 TUnfoldSys.cxx:397
 TUnfoldSys.cxx:398
 TUnfoldSys.cxx:399
 TUnfoldSys.cxx:400
 TUnfoldSys.cxx:401
 TUnfoldSys.cxx:402
 TUnfoldSys.cxx:403
 TUnfoldSys.cxx:404
 TUnfoldSys.cxx:405
 TUnfoldSys.cxx:406
 TUnfoldSys.cxx:407
 TUnfoldSys.cxx:408
 TUnfoldSys.cxx:409
 TUnfoldSys.cxx:410
 TUnfoldSys.cxx:411
 TUnfoldSys.cxx:412
 TUnfoldSys.cxx:413
 TUnfoldSys.cxx:414
 TUnfoldSys.cxx:415
 TUnfoldSys.cxx:416
 TUnfoldSys.cxx:417
 TUnfoldSys.cxx:418
 TUnfoldSys.cxx:419
 TUnfoldSys.cxx:420
 TUnfoldSys.cxx:421
 TUnfoldSys.cxx:422
 TUnfoldSys.cxx:423
 TUnfoldSys.cxx:424
 TUnfoldSys.cxx:425
 TUnfoldSys.cxx:426
 TUnfoldSys.cxx:427
 TUnfoldSys.cxx:428
 TUnfoldSys.cxx:429
 TUnfoldSys.cxx:430
 TUnfoldSys.cxx:431
 TUnfoldSys.cxx:432
 TUnfoldSys.cxx:433
 TUnfoldSys.cxx:434
 TUnfoldSys.cxx:435
 TUnfoldSys.cxx:436
 TUnfoldSys.cxx:437
 TUnfoldSys.cxx:438
 TUnfoldSys.cxx:439
 TUnfoldSys.cxx:440
 TUnfoldSys.cxx:441
 TUnfoldSys.cxx:442
 TUnfoldSys.cxx:443
 TUnfoldSys.cxx:444
 TUnfoldSys.cxx:445
 TUnfoldSys.cxx:446
 TUnfoldSys.cxx:447
 TUnfoldSys.cxx:448
 TUnfoldSys.cxx:449
 TUnfoldSys.cxx:450
 TUnfoldSys.cxx:451
 TUnfoldSys.cxx:452
 TUnfoldSys.cxx:453
 TUnfoldSys.cxx:454
 TUnfoldSys.cxx:455
 TUnfoldSys.cxx:456
 TUnfoldSys.cxx:457
 TUnfoldSys.cxx:458
 TUnfoldSys.cxx:459
 TUnfoldSys.cxx:460
 TUnfoldSys.cxx:461
 TUnfoldSys.cxx:462
 TUnfoldSys.cxx:463
 TUnfoldSys.cxx:464
 TUnfoldSys.cxx:465
 TUnfoldSys.cxx:466
 TUnfoldSys.cxx:467
 TUnfoldSys.cxx:468
 TUnfoldSys.cxx:469
 TUnfoldSys.cxx:470
 TUnfoldSys.cxx:471
 TUnfoldSys.cxx:472
 TUnfoldSys.cxx:473
 TUnfoldSys.cxx:474
 TUnfoldSys.cxx:475
 TUnfoldSys.cxx:476
 TUnfoldSys.cxx:477
 TUnfoldSys.cxx:478
 TUnfoldSys.cxx:479
 TUnfoldSys.cxx:480
 TUnfoldSys.cxx:481
 TUnfoldSys.cxx:482
 TUnfoldSys.cxx:483
 TUnfoldSys.cxx:484
 TUnfoldSys.cxx:485
 TUnfoldSys.cxx:486
 TUnfoldSys.cxx:487
 TUnfoldSys.cxx:488
 TUnfoldSys.cxx:489
 TUnfoldSys.cxx:490
 TUnfoldSys.cxx:491
 TUnfoldSys.cxx:492
 TUnfoldSys.cxx:493
 TUnfoldSys.cxx:494
 TUnfoldSys.cxx:495
 TUnfoldSys.cxx:496
 TUnfoldSys.cxx:497
 TUnfoldSys.cxx:498
 TUnfoldSys.cxx:499
 TUnfoldSys.cxx:500
 TUnfoldSys.cxx:501
 TUnfoldSys.cxx:502
 TUnfoldSys.cxx:503
 TUnfoldSys.cxx:504
 TUnfoldSys.cxx:505
 TUnfoldSys.cxx:506
 TUnfoldSys.cxx:507
 TUnfoldSys.cxx:508
 TUnfoldSys.cxx:509
 TUnfoldSys.cxx:510
 TUnfoldSys.cxx:511
 TUnfoldSys.cxx:512
 TUnfoldSys.cxx:513
 TUnfoldSys.cxx:514
 TUnfoldSys.cxx:515
 TUnfoldSys.cxx:516
 TUnfoldSys.cxx:517
 TUnfoldSys.cxx:518
 TUnfoldSys.cxx:519
 TUnfoldSys.cxx:520
 TUnfoldSys.cxx:521
 TUnfoldSys.cxx:522
 TUnfoldSys.cxx:523
 TUnfoldSys.cxx:524
 TUnfoldSys.cxx:525
 TUnfoldSys.cxx:526
 TUnfoldSys.cxx:527
 TUnfoldSys.cxx:528
 TUnfoldSys.cxx:529
 TUnfoldSys.cxx:530
 TUnfoldSys.cxx:531
 TUnfoldSys.cxx:532
 TUnfoldSys.cxx:533
 TUnfoldSys.cxx:534
 TUnfoldSys.cxx:535
 TUnfoldSys.cxx:536
 TUnfoldSys.cxx:537
 TUnfoldSys.cxx:538
 TUnfoldSys.cxx:539
 TUnfoldSys.cxx:540
 TUnfoldSys.cxx:541
 TUnfoldSys.cxx:542
 TUnfoldSys.cxx:543
 TUnfoldSys.cxx:544
 TUnfoldSys.cxx:545
 TUnfoldSys.cxx:546
 TUnfoldSys.cxx:547
 TUnfoldSys.cxx:548
 TUnfoldSys.cxx:549
 TUnfoldSys.cxx:550
 TUnfoldSys.cxx:551
 TUnfoldSys.cxx:552
 TUnfoldSys.cxx:553
 TUnfoldSys.cxx:554
 TUnfoldSys.cxx:555
 TUnfoldSys.cxx:556
 TUnfoldSys.cxx:557
 TUnfoldSys.cxx:558
 TUnfoldSys.cxx:559
 TUnfoldSys.cxx:560
 TUnfoldSys.cxx:561
 TUnfoldSys.cxx:562
 TUnfoldSys.cxx:563
 TUnfoldSys.cxx:564
 TUnfoldSys.cxx:565
 TUnfoldSys.cxx:566
 TUnfoldSys.cxx:567
 TUnfoldSys.cxx:568
 TUnfoldSys.cxx:569
 TUnfoldSys.cxx:570
 TUnfoldSys.cxx:571
 TUnfoldSys.cxx:572
 TUnfoldSys.cxx:573
 TUnfoldSys.cxx:574
 TUnfoldSys.cxx:575
 TUnfoldSys.cxx:576
 TUnfoldSys.cxx:577
 TUnfoldSys.cxx:578
 TUnfoldSys.cxx:579
 TUnfoldSys.cxx:580
 TUnfoldSys.cxx:581
 TUnfoldSys.cxx:582
 TUnfoldSys.cxx:583
 TUnfoldSys.cxx:584
 TUnfoldSys.cxx:585
 TUnfoldSys.cxx:586
 TUnfoldSys.cxx:587
 TUnfoldSys.cxx:588
 TUnfoldSys.cxx:589
 TUnfoldSys.cxx:590
 TUnfoldSys.cxx:591
 TUnfoldSys.cxx:592
 TUnfoldSys.cxx:593
 TUnfoldSys.cxx:594
 TUnfoldSys.cxx:595
 TUnfoldSys.cxx:596
 TUnfoldSys.cxx:597
 TUnfoldSys.cxx:598
 TUnfoldSys.cxx:599
 TUnfoldSys.cxx:600
 TUnfoldSys.cxx:601
 TUnfoldSys.cxx:602
 TUnfoldSys.cxx:603
 TUnfoldSys.cxx:604
 TUnfoldSys.cxx:605
 TUnfoldSys.cxx:606
 TUnfoldSys.cxx:607
 TUnfoldSys.cxx:608
 TUnfoldSys.cxx:609
 TUnfoldSys.cxx:610
 TUnfoldSys.cxx:611
 TUnfoldSys.cxx:612
 TUnfoldSys.cxx:613
 TUnfoldSys.cxx:614
 TUnfoldSys.cxx:615
 TUnfoldSys.cxx:616
 TUnfoldSys.cxx:617
 TUnfoldSys.cxx:618
 TUnfoldSys.cxx:619
 TUnfoldSys.cxx:620
 TUnfoldSys.cxx:621
 TUnfoldSys.cxx:622
 TUnfoldSys.cxx:623
 TUnfoldSys.cxx:624
 TUnfoldSys.cxx:625
 TUnfoldSys.cxx:626
 TUnfoldSys.cxx:627
 TUnfoldSys.cxx:628
 TUnfoldSys.cxx:629
 TUnfoldSys.cxx:630
 TUnfoldSys.cxx:631
 TUnfoldSys.cxx:632
 TUnfoldSys.cxx:633
 TUnfoldSys.cxx:634
 TUnfoldSys.cxx:635
 TUnfoldSys.cxx:636
 TUnfoldSys.cxx:637
 TUnfoldSys.cxx:638
 TUnfoldSys.cxx:639
 TUnfoldSys.cxx:640
 TUnfoldSys.cxx:641
 TUnfoldSys.cxx:642
 TUnfoldSys.cxx:643
 TUnfoldSys.cxx:644
 TUnfoldSys.cxx:645
 TUnfoldSys.cxx:646
 TUnfoldSys.cxx:647
 TUnfoldSys.cxx:648
 TUnfoldSys.cxx:649
 TUnfoldSys.cxx:650
 TUnfoldSys.cxx:651
 TUnfoldSys.cxx:652
 TUnfoldSys.cxx:653
 TUnfoldSys.cxx:654
 TUnfoldSys.cxx:655
 TUnfoldSys.cxx:656
 TUnfoldSys.cxx:657
 TUnfoldSys.cxx:658
 TUnfoldSys.cxx:659
 TUnfoldSys.cxx:660
 TUnfoldSys.cxx:661
 TUnfoldSys.cxx:662
 TUnfoldSys.cxx:663
 TUnfoldSys.cxx:664
 TUnfoldSys.cxx:665
 TUnfoldSys.cxx:666
 TUnfoldSys.cxx:667
 TUnfoldSys.cxx:668
 TUnfoldSys.cxx:669
 TUnfoldSys.cxx:670
 TUnfoldSys.cxx:671
 TUnfoldSys.cxx:672
 TUnfoldSys.cxx:673
 TUnfoldSys.cxx:674
 TUnfoldSys.cxx:675
 TUnfoldSys.cxx:676
 TUnfoldSys.cxx:677
 TUnfoldSys.cxx:678
 TUnfoldSys.cxx:679
 TUnfoldSys.cxx:680
 TUnfoldSys.cxx:681
 TUnfoldSys.cxx:682
 TUnfoldSys.cxx:683
 TUnfoldSys.cxx:684
 TUnfoldSys.cxx:685
 TUnfoldSys.cxx:686
 TUnfoldSys.cxx:687
 TUnfoldSys.cxx:688
 TUnfoldSys.cxx:689
 TUnfoldSys.cxx:690
 TUnfoldSys.cxx:691
 TUnfoldSys.cxx:692
 TUnfoldSys.cxx:693
 TUnfoldSys.cxx:694
 TUnfoldSys.cxx:695
 TUnfoldSys.cxx:696
 TUnfoldSys.cxx:697
 TUnfoldSys.cxx:698
 TUnfoldSys.cxx:699
 TUnfoldSys.cxx:700
 TUnfoldSys.cxx:701
 TUnfoldSys.cxx:702
 TUnfoldSys.cxx:703
 TUnfoldSys.cxx:704
 TUnfoldSys.cxx:705
 TUnfoldSys.cxx:706
 TUnfoldSys.cxx:707
 TUnfoldSys.cxx:708
 TUnfoldSys.cxx:709
 TUnfoldSys.cxx:710
 TUnfoldSys.cxx:711
 TUnfoldSys.cxx:712
 TUnfoldSys.cxx:713
 TUnfoldSys.cxx:714
 TUnfoldSys.cxx:715
 TUnfoldSys.cxx:716
 TUnfoldSys.cxx:717
 TUnfoldSys.cxx:718
 TUnfoldSys.cxx:719
 TUnfoldSys.cxx:720
 TUnfoldSys.cxx:721
 TUnfoldSys.cxx:722
 TUnfoldSys.cxx:723
 TUnfoldSys.cxx:724
 TUnfoldSys.cxx:725
 TUnfoldSys.cxx:726
 TUnfoldSys.cxx:727
 TUnfoldSys.cxx:728
 TUnfoldSys.cxx:729
 TUnfoldSys.cxx:730
 TUnfoldSys.cxx:731
 TUnfoldSys.cxx:732
 TUnfoldSys.cxx:733
 TUnfoldSys.cxx:734
 TUnfoldSys.cxx:735
 TUnfoldSys.cxx:736
 TUnfoldSys.cxx:737
 TUnfoldSys.cxx:738
 TUnfoldSys.cxx:739
 TUnfoldSys.cxx:740
 TUnfoldSys.cxx:741
 TUnfoldSys.cxx:742
 TUnfoldSys.cxx:743
 TUnfoldSys.cxx:744
 TUnfoldSys.cxx:745
 TUnfoldSys.cxx:746
 TUnfoldSys.cxx:747
 TUnfoldSys.cxx:748
 TUnfoldSys.cxx:749
 TUnfoldSys.cxx:750
 TUnfoldSys.cxx:751
 TUnfoldSys.cxx:752
 TUnfoldSys.cxx:753
 TUnfoldSys.cxx:754
 TUnfoldSys.cxx:755
 TUnfoldSys.cxx:756
 TUnfoldSys.cxx:757
 TUnfoldSys.cxx:758
 TUnfoldSys.cxx:759
 TUnfoldSys.cxx:760
 TUnfoldSys.cxx:761
 TUnfoldSys.cxx:762
 TUnfoldSys.cxx:763
 TUnfoldSys.cxx:764
 TUnfoldSys.cxx:765
 TUnfoldSys.cxx:766
 TUnfoldSys.cxx:767
 TUnfoldSys.cxx:768
 TUnfoldSys.cxx:769
 TUnfoldSys.cxx:770
 TUnfoldSys.cxx:771
 TUnfoldSys.cxx:772
 TUnfoldSys.cxx:773
 TUnfoldSys.cxx:774
 TUnfoldSys.cxx:775
 TUnfoldSys.cxx:776
 TUnfoldSys.cxx:777
 TUnfoldSys.cxx:778
 TUnfoldSys.cxx:779
 TUnfoldSys.cxx:780
 TUnfoldSys.cxx:781
 TUnfoldSys.cxx:782
 TUnfoldSys.cxx:783
 TUnfoldSys.cxx:784
 TUnfoldSys.cxx:785
 TUnfoldSys.cxx:786
 TUnfoldSys.cxx:787
 TUnfoldSys.cxx:788
 TUnfoldSys.cxx:789
 TUnfoldSys.cxx:790
 TUnfoldSys.cxx:791
 TUnfoldSys.cxx:792
 TUnfoldSys.cxx:793
 TUnfoldSys.cxx:794
 TUnfoldSys.cxx:795
 TUnfoldSys.cxx:796
 TUnfoldSys.cxx:797
 TUnfoldSys.cxx:798
 TUnfoldSys.cxx:799
 TUnfoldSys.cxx:800
 TUnfoldSys.cxx:801
 TUnfoldSys.cxx:802
 TUnfoldSys.cxx:803
 TUnfoldSys.cxx:804
 TUnfoldSys.cxx:805
 TUnfoldSys.cxx:806
 TUnfoldSys.cxx:807
 TUnfoldSys.cxx:808
 TUnfoldSys.cxx:809
 TUnfoldSys.cxx:810
 TUnfoldSys.cxx:811
 TUnfoldSys.cxx:812
 TUnfoldSys.cxx:813
 TUnfoldSys.cxx:814
 TUnfoldSys.cxx:815
 TUnfoldSys.cxx:816
 TUnfoldSys.cxx:817
 TUnfoldSys.cxx:818
 TUnfoldSys.cxx:819
 TUnfoldSys.cxx:820
 TUnfoldSys.cxx:821
 TUnfoldSys.cxx:822
 TUnfoldSys.cxx:823
 TUnfoldSys.cxx:824
 TUnfoldSys.cxx:825
 TUnfoldSys.cxx:826
 TUnfoldSys.cxx:827
 TUnfoldSys.cxx:828
 TUnfoldSys.cxx:829
 TUnfoldSys.cxx:830
 TUnfoldSys.cxx:831
 TUnfoldSys.cxx:832
 TUnfoldSys.cxx:833
 TUnfoldSys.cxx:834
 TUnfoldSys.cxx:835
 TUnfoldSys.cxx:836
 TUnfoldSys.cxx:837
 TUnfoldSys.cxx:838
 TUnfoldSys.cxx:839
 TUnfoldSys.cxx:840
 TUnfoldSys.cxx:841
 TUnfoldSys.cxx:842
 TUnfoldSys.cxx:843
 TUnfoldSys.cxx:844
 TUnfoldSys.cxx:845
 TUnfoldSys.cxx:846
 TUnfoldSys.cxx:847
 TUnfoldSys.cxx:848
 TUnfoldSys.cxx:849
 TUnfoldSys.cxx:850
 TUnfoldSys.cxx:851
 TUnfoldSys.cxx:852
 TUnfoldSys.cxx:853
 TUnfoldSys.cxx:854
 TUnfoldSys.cxx:855
 TUnfoldSys.cxx:856
 TUnfoldSys.cxx:857
 TUnfoldSys.cxx:858
 TUnfoldSys.cxx:859
 TUnfoldSys.cxx:860
 TUnfoldSys.cxx:861
 TUnfoldSys.cxx:862
 TUnfoldSys.cxx:863
 TUnfoldSys.cxx:864
 TUnfoldSys.cxx:865
 TUnfoldSys.cxx:866
 TUnfoldSys.cxx:867
 TUnfoldSys.cxx:868
 TUnfoldSys.cxx:869
 TUnfoldSys.cxx:870
 TUnfoldSys.cxx:871
 TUnfoldSys.cxx:872
 TUnfoldSys.cxx:873
 TUnfoldSys.cxx:874
 TUnfoldSys.cxx:875
 TUnfoldSys.cxx:876
 TUnfoldSys.cxx:877
 TUnfoldSys.cxx:878
 TUnfoldSys.cxx:879
 TUnfoldSys.cxx:880
 TUnfoldSys.cxx:881
 TUnfoldSys.cxx:882
 TUnfoldSys.cxx:883
 TUnfoldSys.cxx:884
 TUnfoldSys.cxx:885
 TUnfoldSys.cxx:886
 TUnfoldSys.cxx:887
 TUnfoldSys.cxx:888
 TUnfoldSys.cxx:889
 TUnfoldSys.cxx:890
 TUnfoldSys.cxx:891
 TUnfoldSys.cxx:892
 TUnfoldSys.cxx:893
 TUnfoldSys.cxx:894
 TUnfoldSys.cxx:895
 TUnfoldSys.cxx:896
 TUnfoldSys.cxx:897
 TUnfoldSys.cxx:898
 TUnfoldSys.cxx:899
 TUnfoldSys.cxx:900
 TUnfoldSys.cxx:901
 TUnfoldSys.cxx:902
 TUnfoldSys.cxx:903
 TUnfoldSys.cxx:904
 TUnfoldSys.cxx:905
 TUnfoldSys.cxx:906
 TUnfoldSys.cxx:907
 TUnfoldSys.cxx:908
 TUnfoldSys.cxx:909
 TUnfoldSys.cxx:910
 TUnfoldSys.cxx:911
 TUnfoldSys.cxx:912
 TUnfoldSys.cxx:913
 TUnfoldSys.cxx:914
 TUnfoldSys.cxx:915
 TUnfoldSys.cxx:916
 TUnfoldSys.cxx:917
 TUnfoldSys.cxx:918
 TUnfoldSys.cxx:919
 TUnfoldSys.cxx:920
 TUnfoldSys.cxx:921
 TUnfoldSys.cxx:922
 TUnfoldSys.cxx:923
 TUnfoldSys.cxx:924
 TUnfoldSys.cxx:925
 TUnfoldSys.cxx:926
 TUnfoldSys.cxx:927
 TUnfoldSys.cxx:928
 TUnfoldSys.cxx:929
 TUnfoldSys.cxx:930
 TUnfoldSys.cxx:931
 TUnfoldSys.cxx:932
 TUnfoldSys.cxx:933
 TUnfoldSys.cxx:934
 TUnfoldSys.cxx:935
 TUnfoldSys.cxx:936
 TUnfoldSys.cxx:937
 TUnfoldSys.cxx:938
 TUnfoldSys.cxx:939
 TUnfoldSys.cxx:940
 TUnfoldSys.cxx:941
 TUnfoldSys.cxx:942
 TUnfoldSys.cxx:943
 TUnfoldSys.cxx:944
 TUnfoldSys.cxx:945
 TUnfoldSys.cxx:946
 TUnfoldSys.cxx:947
 TUnfoldSys.cxx:948
 TUnfoldSys.cxx:949
 TUnfoldSys.cxx:950
 TUnfoldSys.cxx:951
 TUnfoldSys.cxx:952
 TUnfoldSys.cxx:953
 TUnfoldSys.cxx:954
 TUnfoldSys.cxx:955
 TUnfoldSys.cxx:956
 TUnfoldSys.cxx:957
 TUnfoldSys.cxx:958
 TUnfoldSys.cxx:959
 TUnfoldSys.cxx:960
 TUnfoldSys.cxx:961
 TUnfoldSys.cxx:962
 TUnfoldSys.cxx:963
 TUnfoldSys.cxx:964
 TUnfoldSys.cxx:965
 TUnfoldSys.cxx:966
 TUnfoldSys.cxx:967
 TUnfoldSys.cxx:968
 TUnfoldSys.cxx:969
 TUnfoldSys.cxx:970
 TUnfoldSys.cxx:971
 TUnfoldSys.cxx:972
 TUnfoldSys.cxx:973
 TUnfoldSys.cxx:974
 TUnfoldSys.cxx:975
 TUnfoldSys.cxx:976
 TUnfoldSys.cxx:977
 TUnfoldSys.cxx:978
 TUnfoldSys.cxx:979
 TUnfoldSys.cxx:980
 TUnfoldSys.cxx:981
 TUnfoldSys.cxx:982
 TUnfoldSys.cxx:983
 TUnfoldSys.cxx:984
 TUnfoldSys.cxx:985
 TUnfoldSys.cxx:986
 TUnfoldSys.cxx:987
 TUnfoldSys.cxx:988
 TUnfoldSys.cxx:989
 TUnfoldSys.cxx:990
 TUnfoldSys.cxx:991
 TUnfoldSys.cxx:992
 TUnfoldSys.cxx:993
 TUnfoldSys.cxx:994
 TUnfoldSys.cxx:995
 TUnfoldSys.cxx:996
 TUnfoldSys.cxx:997
 TUnfoldSys.cxx:998
 TUnfoldSys.cxx:999
 TUnfoldSys.cxx:1000
 TUnfoldSys.cxx:1001
 TUnfoldSys.cxx:1002
 TUnfoldSys.cxx:1003
 TUnfoldSys.cxx:1004
 TUnfoldSys.cxx:1005
 TUnfoldSys.cxx:1006
 TUnfoldSys.cxx:1007
 TUnfoldSys.cxx:1008
 TUnfoldSys.cxx:1009
 TUnfoldSys.cxx:1010
 TUnfoldSys.cxx:1011
 TUnfoldSys.cxx:1012
 TUnfoldSys.cxx:1013
 TUnfoldSys.cxx:1014
 TUnfoldSys.cxx:1015
 TUnfoldSys.cxx:1016
 TUnfoldSys.cxx:1017
 TUnfoldSys.cxx:1018
 TUnfoldSys.cxx:1019
 TUnfoldSys.cxx:1020
 TUnfoldSys.cxx:1021
 TUnfoldSys.cxx:1022
 TUnfoldSys.cxx:1023
 TUnfoldSys.cxx:1024
 TUnfoldSys.cxx:1025
 TUnfoldSys.cxx:1026
 TUnfoldSys.cxx:1027
 TUnfoldSys.cxx:1028
 TUnfoldSys.cxx:1029
 TUnfoldSys.cxx:1030
 TUnfoldSys.cxx:1031
 TUnfoldSys.cxx:1032
 TUnfoldSys.cxx:1033
 TUnfoldSys.cxx:1034
 TUnfoldSys.cxx:1035
 TUnfoldSys.cxx:1036
 TUnfoldSys.cxx:1037
 TUnfoldSys.cxx:1038
 TUnfoldSys.cxx:1039
 TUnfoldSys.cxx:1040
 TUnfoldSys.cxx:1041
 TUnfoldSys.cxx:1042
 TUnfoldSys.cxx:1043
 TUnfoldSys.cxx:1044
 TUnfoldSys.cxx:1045
 TUnfoldSys.cxx:1046
 TUnfoldSys.cxx:1047
 TUnfoldSys.cxx:1048
 TUnfoldSys.cxx:1049
 TUnfoldSys.cxx:1050
 TUnfoldSys.cxx:1051
 TUnfoldSys.cxx:1052
 TUnfoldSys.cxx:1053
 TUnfoldSys.cxx:1054
 TUnfoldSys.cxx:1055
 TUnfoldSys.cxx:1056
 TUnfoldSys.cxx:1057
 TUnfoldSys.cxx:1058
 TUnfoldSys.cxx:1059
 TUnfoldSys.cxx:1060
 TUnfoldSys.cxx:1061
 TUnfoldSys.cxx:1062
 TUnfoldSys.cxx:1063
 TUnfoldSys.cxx:1064
 TUnfoldSys.cxx:1065
 TUnfoldSys.cxx:1066
 TUnfoldSys.cxx:1067
 TUnfoldSys.cxx:1068
 TUnfoldSys.cxx:1069
 TUnfoldSys.cxx:1070
 TUnfoldSys.cxx:1071
 TUnfoldSys.cxx:1072
 TUnfoldSys.cxx:1073
 TUnfoldSys.cxx:1074
 TUnfoldSys.cxx:1075
 TUnfoldSys.cxx:1076
 TUnfoldSys.cxx:1077
 TUnfoldSys.cxx:1078
 TUnfoldSys.cxx:1079
 TUnfoldSys.cxx:1080
 TUnfoldSys.cxx:1081
 TUnfoldSys.cxx:1082
 TUnfoldSys.cxx:1083
 TUnfoldSys.cxx:1084
 TUnfoldSys.cxx:1085
 TUnfoldSys.cxx:1086
 TUnfoldSys.cxx:1087
 TUnfoldSys.cxx:1088
 TUnfoldSys.cxx:1089
 TUnfoldSys.cxx:1090
 TUnfoldSys.cxx:1091
 TUnfoldSys.cxx:1092
 TUnfoldSys.cxx:1093
 TUnfoldSys.cxx:1094
 TUnfoldSys.cxx:1095
 TUnfoldSys.cxx:1096
 TUnfoldSys.cxx:1097
 TUnfoldSys.cxx:1098
 TUnfoldSys.cxx:1099
 TUnfoldSys.cxx:1100
 TUnfoldSys.cxx:1101
 TUnfoldSys.cxx:1102
 TUnfoldSys.cxx:1103
 TUnfoldSys.cxx:1104
 TUnfoldSys.cxx:1105
 TUnfoldSys.cxx:1106
 TUnfoldSys.cxx:1107
 TUnfoldSys.cxx:1108
 TUnfoldSys.cxx:1109
 TUnfoldSys.cxx:1110
 TUnfoldSys.cxx:1111
 TUnfoldSys.cxx:1112
 TUnfoldSys.cxx:1113
 TUnfoldSys.cxx:1114
 TUnfoldSys.cxx:1115
 TUnfoldSys.cxx:1116
 TUnfoldSys.cxx:1117
 TUnfoldSys.cxx:1118
 TUnfoldSys.cxx:1119
 TUnfoldSys.cxx:1120
 TUnfoldSys.cxx:1121
 TUnfoldSys.cxx:1122
 TUnfoldSys.cxx:1123
 TUnfoldSys.cxx:1124
 TUnfoldSys.cxx:1125
 TUnfoldSys.cxx:1126
 TUnfoldSys.cxx:1127
 TUnfoldSys.cxx:1128
 TUnfoldSys.cxx:1129
 TUnfoldSys.cxx:1130
 TUnfoldSys.cxx:1131
 TUnfoldSys.cxx:1132
 TUnfoldSys.cxx:1133
 TUnfoldSys.cxx:1134
 TUnfoldSys.cxx:1135
 TUnfoldSys.cxx:1136
 TUnfoldSys.cxx:1137
 TUnfoldSys.cxx:1138
 TUnfoldSys.cxx:1139
 TUnfoldSys.cxx:1140
 TUnfoldSys.cxx:1141
 TUnfoldSys.cxx:1142
 TUnfoldSys.cxx:1143
 TUnfoldSys.cxx:1144
 TUnfoldSys.cxx:1145
 TUnfoldSys.cxx:1146
 TUnfoldSys.cxx:1147
 TUnfoldSys.cxx:1148
 TUnfoldSys.cxx:1149
 TUnfoldSys.cxx:1150
 TUnfoldSys.cxx:1151
 TUnfoldSys.cxx:1152
 TUnfoldSys.cxx:1153
 TUnfoldSys.cxx:1154
 TUnfoldSys.cxx:1155
 TUnfoldSys.cxx:1156
 TUnfoldSys.cxx:1157
 TUnfoldSys.cxx:1158
 TUnfoldSys.cxx:1159
 TUnfoldSys.cxx:1160
 TUnfoldSys.cxx:1161
 TUnfoldSys.cxx:1162
 TUnfoldSys.cxx:1163
 TUnfoldSys.cxx:1164
 TUnfoldSys.cxx:1165
 TUnfoldSys.cxx:1166
 TUnfoldSys.cxx:1167
 TUnfoldSys.cxx:1168
 TUnfoldSys.cxx:1169
 TUnfoldSys.cxx:1170
 TUnfoldSys.cxx:1171
 TUnfoldSys.cxx:1172
 TUnfoldSys.cxx:1173
 TUnfoldSys.cxx:1174
 TUnfoldSys.cxx:1175
 TUnfoldSys.cxx:1176
 TUnfoldSys.cxx:1177
 TUnfoldSys.cxx:1178
 TUnfoldSys.cxx:1179
 TUnfoldSys.cxx:1180
 TUnfoldSys.cxx:1181
 TUnfoldSys.cxx:1182
 TUnfoldSys.cxx:1183
 TUnfoldSys.cxx:1184
 TUnfoldSys.cxx:1185
 TUnfoldSys.cxx:1186
 TUnfoldSys.cxx:1187
 TUnfoldSys.cxx:1188
 TUnfoldSys.cxx:1189
 TUnfoldSys.cxx:1190
 TUnfoldSys.cxx:1191
 TUnfoldSys.cxx:1192
 TUnfoldSys.cxx:1193
 TUnfoldSys.cxx:1194
 TUnfoldSys.cxx:1195
 TUnfoldSys.cxx:1196
 TUnfoldSys.cxx:1197
 TUnfoldSys.cxx:1198
 TUnfoldSys.cxx:1199
 TUnfoldSys.cxx:1200
 TUnfoldSys.cxx:1201
 TUnfoldSys.cxx:1202
 TUnfoldSys.cxx:1203
 TUnfoldSys.cxx:1204
 TUnfoldSys.cxx:1205
 TUnfoldSys.cxx:1206
 TUnfoldSys.cxx:1207
 TUnfoldSys.cxx:1208
 TUnfoldSys.cxx:1209
 TUnfoldSys.cxx:1210
 TUnfoldSys.cxx:1211
 TUnfoldSys.cxx:1212
 TUnfoldSys.cxx:1213
 TUnfoldSys.cxx:1214
 TUnfoldSys.cxx:1215
 TUnfoldSys.cxx:1216
 TUnfoldSys.cxx:1217
 TUnfoldSys.cxx:1218
 TUnfoldSys.cxx:1219
 TUnfoldSys.cxx:1220
 TUnfoldSys.cxx:1221
 TUnfoldSys.cxx:1222
 TUnfoldSys.cxx:1223
 TUnfoldSys.cxx:1224
 TUnfoldSys.cxx:1225
 TUnfoldSys.cxx:1226
 TUnfoldSys.cxx:1227
 TUnfoldSys.cxx:1228
 TUnfoldSys.cxx:1229
 TUnfoldSys.cxx:1230
 TUnfoldSys.cxx:1231
 TUnfoldSys.cxx:1232
 TUnfoldSys.cxx:1233
 TUnfoldSys.cxx:1234
 TUnfoldSys.cxx:1235
 TUnfoldSys.cxx:1236
 TUnfoldSys.cxx:1237
 TUnfoldSys.cxx:1238
 TUnfoldSys.cxx:1239
 TUnfoldSys.cxx:1240
 TUnfoldSys.cxx:1241
 TUnfoldSys.cxx:1242
 TUnfoldSys.cxx:1243
 TUnfoldSys.cxx:1244
 TUnfoldSys.cxx:1245
 TUnfoldSys.cxx:1246
 TUnfoldSys.cxx:1247
 TUnfoldSys.cxx:1248
 TUnfoldSys.cxx:1249
 TUnfoldSys.cxx:1250
 TUnfoldSys.cxx:1251
 TUnfoldSys.cxx:1252
 TUnfoldSys.cxx:1253
 TUnfoldSys.cxx:1254
 TUnfoldSys.cxx:1255
 TUnfoldSys.cxx:1256
 TUnfoldSys.cxx:1257
 TUnfoldSys.cxx:1258
 TUnfoldSys.cxx:1259
 TUnfoldSys.cxx:1260
 TUnfoldSys.cxx:1261
 TUnfoldSys.cxx:1262
 TUnfoldSys.cxx:1263
 TUnfoldSys.cxx:1264
 TUnfoldSys.cxx:1265
 TUnfoldSys.cxx:1266
 TUnfoldSys.cxx:1267
 TUnfoldSys.cxx:1268
 TUnfoldSys.cxx:1269
 TUnfoldSys.cxx:1270
 TUnfoldSys.cxx:1271
 TUnfoldSys.cxx:1272
 TUnfoldSys.cxx:1273
 TUnfoldSys.cxx:1274
 TUnfoldSys.cxx:1275
 TUnfoldSys.cxx:1276
 TUnfoldSys.cxx:1277
 TUnfoldSys.cxx:1278
 TUnfoldSys.cxx:1279
 TUnfoldSys.cxx:1280
 TUnfoldSys.cxx:1281
 TUnfoldSys.cxx:1282
 TUnfoldSys.cxx:1283
 TUnfoldSys.cxx:1284
 TUnfoldSys.cxx:1285
 TUnfoldSys.cxx:1286
 TUnfoldSys.cxx:1287
 TUnfoldSys.cxx:1288
 TUnfoldSys.cxx:1289
 TUnfoldSys.cxx:1290
 TUnfoldSys.cxx:1291
 TUnfoldSys.cxx:1292
 TUnfoldSys.cxx:1293
 TUnfoldSys.cxx:1294
 TUnfoldSys.cxx:1295
 TUnfoldSys.cxx:1296
 TUnfoldSys.cxx:1297
 TUnfoldSys.cxx:1298
 TUnfoldSys.cxx:1299
 TUnfoldSys.cxx:1300
 TUnfoldSys.cxx:1301
 TUnfoldSys.cxx:1302
 TUnfoldSys.cxx:1303
 TUnfoldSys.cxx:1304
 TUnfoldSys.cxx:1305