ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitModels                                                     *
 *    File: $Id: RooNDKeysPdf.cxx 31258 2009-11-17 22:41:06Z wouter $
 * Authors:                                                                  *
 *   Max Baak, CERN, mbaak@cern.ch *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#include <iostream>
#include <algorithm>
#include <string>

#include "TMath.h"
#include "TMatrixDSymEigen.h"
#include "RooNDKeysPdf.h"
#include "RooAbsReal.h"
#include "RooRealVar.h"
#include "RooRandom.h"
#include "RooDataSet.h"
#include "RooHist.h"
#include "RooMsgService.h"

//////////////////////////////////////////////////////////////////////////////
//
// BEGIN_HTML
// Generic N-dimensional implementation of a kernel estimation p.d.f. This p.d.f. models the distribution
// of an arbitrary input dataset as a superposition of Gaussian kernels, one for each data point,
// each contributing 1/N to the total integral of the p.d.f.
// <p>
// If the 'adaptive mode' is enabled, the width of the Gaussian is adaptively calculated from the
// local density of events, i.e. narrow for regions with high event density to preserve details and
// wide for regions with log event density to promote smoothness. The details of the general algorithm
// are described in the following paper: 
// <p>
// Cranmer KS, Kernel Estimation in High-Energy Physics.  
//             Computer Physics Communications 136:198-207,2001 - e-Print Archive: hep ex/0011057
// <p>
// For multi-dimensional datasets, the kernels are modeled by multidimensional Gaussians. The kernels are 
// constructed such that they reflect the correlation coefficients between the observables
// in the input dataset.
// END_HTML
//

using namespace std;

ClassImp(RooNDKeysPdf)



//_____________________________________________________________________________
RooNDKeysPdf::RooNDKeysPdf(const char *name, const char *title,
			   const RooArgList& varList, RooDataSet& data,
			   TString options, Double_t rho, Double_t nSigma, Bool_t rotate) : 
  RooAbsPdf(name,title),
  _varList("varList","List of variables",this),
  _data(data),
  _options(options),
  _widthFactor(rho),
  _nSigma(nSigma),
  _weights(&_weights0),
  _rotate(rotate)
{
  // Construct N-dimensional kernel estimation p.d.f. in observables 'varList'
  // from dataset 'data'. Options can be 
  //
  //   'a' = Use adaptive kernels (width varies with local event density)
  //   'm' = Mirror data points over observable boundaries. Improves modeling
  //         behavior at edges for distributions that are not close to zero
  //         at edge
  //   'd' = Debug flag
  //   'v' = Verbose flag
  // 
  // The parameter rho (default = 1) provides an overall scale factor that can
  // be applied to the bandwith calculated for each kernel. The nSigma parameter
  // determines the size of the box that is used to search for contributing kernels
  // around a given point in observable space. The nSigma parameters is used
  // in case of non-adaptive bandwidths and for the 1st non-adaptive pass for
  // the calculation of adaptive keys p.d.f.s.
  //
  // The optional weight arguments allows to specify an observable or function
  // expression in observables that specifies the weight of each event.

  // Constructor
  _varItr    = _varList.createIterator() ;

  TIterator* varItr = varList.createIterator() ;
  RooAbsArg* var ;
  for (Int_t i=0; (var = (RooAbsArg*)varItr->Next()); ++i) {
    if (!dynamic_cast<RooAbsReal*>(var)) {
      coutE(InputArguments) << "RooNDKeysPdf::ctor(" << GetName() << ") ERROR: variable " << var->GetName() 
			    << " is not of type RooAbsReal" << endl ;
      assert(0) ;
    }
    _varList.add(*var) ;
    _varName.push_back(var->GetName());
  }
  delete varItr ;

  createPdf();
}



//_____________________________________________________________________________
RooNDKeysPdf::RooNDKeysPdf(const char *name, const char *title,
                           RooAbsReal& x, RooDataSet& data,
                           Mirror mirror, Double_t rho, Double_t nSigma, Bool_t rotate) : 
  RooAbsPdf(name,title),
  _varList("varList","List of variables",this),
  _data(data),
  _options("a"),
  _widthFactor(rho),
  _nSigma(nSigma), 
  _weights(&_weights0),
  _rotate(rotate)
{ 
  // Backward compatibility constructor for (1-dim) RooKeysPdf. If you are a new user,
  // please use the first constructor form.

  _varItr = _varList.createIterator() ;
  
  _varList.add(x) ;
  _varName.push_back(x.GetName());

  if (mirror!=NoMirror) {
    if (mirror!=MirrorBoth) 
      coutW(InputArguments) << "RooNDKeysPdf::RooNDKeysPdf() : Warning : asymmetric mirror(s) no longer supported." << endl;
    _options="m";
  }

  createPdf();
}



//_____________________________________________________________________________
RooNDKeysPdf::RooNDKeysPdf(const char *name, const char *title, RooAbsReal& x, RooAbsReal & y,
                           RooDataSet& data, TString options, Double_t rho, Double_t nSigma, Bool_t rotate) : 
  RooAbsPdf(name,title),
  _varList("varList","List of variables",this),
  _data(data),
  _options(options),
  _widthFactor(rho),
  _nSigma(nSigma),
  _weights(&_weights0),
  _rotate(rotate)
{ 
  // Backward compatibility constructor for Roo2DKeysPdf. If you are a new user,
  // please use the first constructor form.

  _varItr = _varList.createIterator() ;

  _varList.add(RooArgSet(x,y)) ;
  _varName.push_back(x.GetName());
  _varName.push_back(y.GetName());

  createPdf();
}



//_____________________________________________________________________________
RooNDKeysPdf::RooNDKeysPdf(const RooNDKeysPdf& other, const char* name) :
  RooAbsPdf(other,name), 
  _varList("varList",this,other._varList),
  _data(other._data),
  _options(other._options),
  _widthFactor(other._widthFactor),
  _nSigma(other._nSigma),
  _weights(&_weights0),
  _rotate(other._rotate)
{
  // Constructor
  _varItr      = _varList.createIterator() ;

  _fixedShape  = other._fixedShape;
  _mirror      = other._mirror;
  _debug       = other._debug;
  _verbose     = other._verbose;
  _sqrt2pi     = other._sqrt2pi;
  _nDim        = other._nDim;
  _nEvents     = other._nEvents;
  _nEventsM    = other._nEventsM;
  _nEventsW    = other._nEventsW;
  _d           = other._d;
  _n           = other._n;
  _dataPts     = other._dataPts;
  _dataPtsR    = other._dataPtsR;
  _weights0    = other._weights0;
  _weights1    = other._weights1;
  if (_options.Contains("a")) { _weights = &_weights1; }
  //_sortIdcs    = other._sortIdcs;
  _sortTVIdcs  = other._sortTVIdcs;
  _varName     = other._varName;
  _rho         = other._rho;
  _x           = other._x;
  _x0          = other._x0 ;
  _x1          = other._x1 ;
  _x2          = other._x2 ;
  _xDatLo      = other._xDatLo;
  _xDatHi      = other._xDatHi;
  _xDatLo3s    = other._xDatLo3s;
  _xDatHi3s    = other._xDatHi3s;
  _mean        = other._mean;
  _sigma       = other._sigma;

  // BoxInfo
  _netFluxZ    = other._netFluxZ;
  _nEventsBW   = other._nEventsBW;
  _nEventsBMSW = other._nEventsBMSW;
  _xVarLo      = other._xVarLo;
  _xVarHi      = other._xVarHi;
  _xVarLoM3s   = other._xVarLoM3s;
  _xVarLoP3s   = other._xVarLoP3s;
  _xVarHiM3s   = other._xVarHiM3s;
  _xVarHiP3s   = other._xVarHiP3s;
  _bpsIdcs     = other._bpsIdcs;
  _sIdcs       = other._sIdcs;
  _bIdcs       = other._bIdcs;
  _bmsIdcs     = other._bmsIdcs;

  _rangeBoxInfo= other._rangeBoxInfo ;
  _fullBoxInfo = other._fullBoxInfo ;

  _idx         = other._idx;
  _minWeight   = other._minWeight;
  _maxWeight   = other._maxWeight;
  _wMap        = other._wMap;

  _covMat      = new TMatrixDSym(*other._covMat);
  _corrMat     = new TMatrixDSym(*other._corrMat);
  _rotMat      = new TMatrixD(*other._rotMat);
  _sigmaR      = new TVectorD(*other._sigmaR);
  _dx          = new TVectorD(*other._dx);
  _sigmaAvgR   = other._sigmaAvgR;
}



//_____________________________________________________________________________
RooNDKeysPdf::~RooNDKeysPdf() 
{
  if (_varItr)    delete _varItr;
  if (_covMat)    delete _covMat;
  if (_corrMat)   delete _corrMat;
  if (_rotMat)    delete _rotMat;
  if (_sigmaR)    delete _sigmaR;
  if (_dx)        delete _dx;

  // delete all the boxinfos map
  while ( !_rangeBoxInfo.empty() ) {
    map<pair<string,int>,BoxInfo*>::iterator iter = _rangeBoxInfo.begin();
    BoxInfo* box= (*iter).second;
    _rangeBoxInfo.erase(iter);
    delete box;
  }

  _dataPts.clear();
  _dataPtsR.clear();
  _weights0.clear();
  _weights1.clear();
  //_sortIdcs.clear();
  _sortTVIdcs.clear();
}


void

//_____________________________________________________________________________
RooNDKeysPdf::createPdf(Bool_t firstCall) const
{
  // evaluation order of constructor.

  if (firstCall) {
    // set options
    setOptions();
    // initialization
    initialize();
  }

  // copy dataset, calculate sigma_i's, determine min and max event weight
  loadDataSet(firstCall);
  // mirror dataset around dataset boundaries -- does not depend on event weights
  if (_mirror) mirrorDataSet();
  // store indices and weights of events with high enough weights
  loadWeightSet();

  // store indices of events in variable boundaries and box shell.
//calculateShell(&_fullBoxInfo);
  // calculate normalization needed in analyticalIntegral()
//calculatePreNorm(&_fullBoxInfo);

  // lookup table for determining which events contribute to a certain coordinate
  sortDataIndices();

  // determine static and/or adaptive bandwidth
  calculateBandWidth();
}


void 

//_____________________________________________________________________________
RooNDKeysPdf::setOptions() const
{
  // set the configuration

  _options.ToLower(); 

  if( _options.Contains("a") ) { _weights = &_weights1; }
  else                         { _weights = &_weights0; }
  if( _options.Contains("m") )   _mirror = true;
  else                           _mirror = false;
  if( _options.Contains("d") )   _debug  = true;
  else                           _debug  = false;
  if( _options.Contains("v") ) { _debug = true;  _verbose = true; } 
  else                         { _debug = false; _verbose = false; }

  cxcoutD(InputArguments) << "RooNDKeysPdf::setOptions()    options = " << _options 
			<< "\n\tbandWidthType    = " << _options.Contains("a")    
			<< "\n\tmirror           = " << _mirror
			<< "\n\tdebug            = " << _debug            
			<< "\n\tverbose          = " << _verbose  
			<< endl;

  if (_nSigma<2.0) {
    coutW(InputArguments) << "RooNDKeysPdf::setOptions() : Warning : nSigma = " << _nSigma << " < 2.0. "
			  << "Calculated normalization could be too large." 
			  << endl;
  }
}


void

//_____________________________________________________________________________
RooNDKeysPdf::initialize() const
{
  // initialization
  _sqrt2pi   = sqrt(2.0*TMath::Pi()) ;
  _nDim      = _varList.getSize();
  _nEvents   = (Int_t)_data.numEntries();
  _nEventsM  = _nEvents;
  _fixedShape= kFALSE;

  if(_nDim==0) {
    coutE(InputArguments) << "ERROR:  RooNDKeysPdf::initialize() : The observable list is empty. "
			  << "Unable to begin generating the PDF." << endl;
    assert (_nDim!=0);
  }

  if(_nEvents==0) {
    coutE(InputArguments) << "ERROR:  RooNDKeysPdf::initialize() : The input data set is empty. "
			  << "Unable to begin generating the PDF." << endl;
    assert (_nEvents!=0);
  }

  _d         = static_cast<Double_t>(_nDim);

  vector<Double_t> dummy(_nDim,0.);
  _dataPts.resize(_nEvents,dummy);
  _weights0.resize(_nEvents,dummy);
  //_sortIdcs.resize(_nDim);
  _sortTVIdcs.resize(_nDim);

  _rho.resize(_nDim,_widthFactor);

  _x.resize(_nDim,0.);
  _x0.resize(_nDim,0.);
  _x1.resize(_nDim,0.);
  _x2.resize(_nDim,0.);

  _mean.resize(_nDim,0.);
  _sigma.resize(_nDim,0.);

  _xDatLo.resize(_nDim,0.);
  _xDatHi.resize(_nDim,0.);
  _xDatLo3s.resize(_nDim,0.);
  _xDatHi3s.resize(_nDim,0.);

  boxInfoInit(&_fullBoxInfo,0,0xFFFF);

  _minWeight=0;
  _maxWeight=0;
  _wMap.clear();

  _covMat = 0;
  _corrMat= 0;
  _rotMat = 0;
  _sigmaR = 0;
  _dx = new TVectorD(_nDim); _dx->Zero();
  _dataPtsR.resize(_nEvents,*_dx);

  _varItr->Reset() ;
  RooRealVar* var ;
  for(Int_t j=0; (var=(RooRealVar*)_varItr->Next()); ++j) {
    _xDatLo[j] = var->getMin();
    _xDatHi[j] = var->getMax();
  }
}


void

//_____________________________________________________________________________
RooNDKeysPdf::loadDataSet(Bool_t firstCall) const
{
  // copy the dataset and calculate some useful variables

  // first some initialization
  _nEventsW=0.;
  TMatrixD mat(_nDim,_nDim); 
  if (!_covMat)  _covMat = new TMatrixDSym(_nDim);    
  if (!_corrMat) _corrMat= new TMatrixDSym(_nDim);    
  if (!_rotMat)  _rotMat = new TMatrixD(_nDim,_nDim); 
  if (!_sigmaR)  _sigmaR = new TVectorD(_nDim);       
  mat.Zero();
  _covMat->Zero();
  _corrMat->Zero();
  _rotMat->Zero();
  _sigmaR->Zero();

  const RooArgSet* values= _data.get();  
  vector<RooRealVar*> dVars(_nDim);
  for  (Int_t j=0; j<_nDim; j++) {
    dVars[j] = (RooRealVar*)values->find(_varName[j].c_str());
    _x0[j]=_x1[j]=_x2[j]=0.;
  }

  _idx.clear();
  for (Int_t i=0; i<_nEvents; i++) {
    _data.get(i); // fills dVars
    _idx.push_back(i);
    vector<Double_t>& point  = _dataPts[i];
    TVectorD& pointV = _dataPtsR[i];

    Double_t myweight = _data.weight(); // default is one?
    if ( TMath::Abs(myweight)>_maxWeight ) { _maxWeight = TMath::Abs(myweight); }
    _nEventsW += myweight;

    for (Int_t j=0; j<_nDim; j++) {
      for (Int_t k=0; k<_nDim; k++) 
	mat(j,k) += dVars[j]->getVal() * dVars[k]->getVal() * myweight;

      // only need to do once
      if (firstCall) 
	point[j] = pointV[j] = dVars[j]->getVal();

      _x0[j] += 1. * myweight; 
      _x1[j] += point[j] * myweight ; 
      _x2[j] += point[j] * point[j] * myweight ;

      // only need to do once
      if (firstCall) {
	if (point[j]<_xDatLo[j]) { _xDatLo[j]=point[j]; }
	if (point[j]>_xDatHi[j]) { _xDatHi[j]=point[j]; }
      }
    }
  }

  _n = TMath::Power(4./(_nEventsW*(_d+2.)), 1./(_d+4.)) ; 
  // = (4/[n(dim(R) + 2)])^1/(dim(R)+4); dim(R) = 2
  _minWeight = (0.5 - TMath::Erf(_nSigma/sqrt(2.))/2.) * _maxWeight;

  for (Int_t j=0; j<_nDim; j++) {
    _mean[j]  = _x1[j]/_x0[j];
    _sigma[j] = sqrt(_x2[j]/_x0[j]-_mean[j]*_mean[j]);
  }
 
  for (Int_t j=0; j<_nDim; j++) {
    for (Int_t k=0; k<_nDim; k++) 
      (*_covMat)(j,k) = mat(j,k)/_x0[j] - _mean[j]*_mean[k] ;
  }

  // find decorrelation matrix and eigenvalues (R)
  TMatrixDSymEigen evCalculator(*_covMat);
  *_rotMat = evCalculator.GetEigenVectors();
  *_rotMat = _rotMat->T(); // transpose
  *_sigmaR = evCalculator.GetEigenValues();
  for (Int_t j=0; j<_nDim; j++) { (*_sigmaR)[j] = sqrt((*_sigmaR)[j]); }

  for (Int_t j=0; j<_nDim; j++) {
    for (Int_t k=0; k<_nDim; k++) 
      (*_corrMat)(j,k) = (*_covMat)(j,k)/(_sigma[j]*_sigma[k]) ;
  }

  if (_verbose) {
    //_covMat->Print();
    _rotMat->Print();
    _corrMat->Print();
    _sigmaR->Print();
  }

  if (!_rotate) {
    _rotMat->Print();
    _sigmaR->Print();
    TMatrixD haar(_nDim,_nDim);
    TMatrixD unit(TMatrixD::kUnit,haar);
    *_rotMat = unit;
    for (Int_t j=0; j<_nDim; j++) { (*_sigmaR)[j] = _sigma[j]; }
    _rotMat->Print();
    _sigmaR->Print();
  }

  _sigmaAvgR=1.;
  for (Int_t j=0; j<_nDim; j++) { _sigmaAvgR *= (*_sigmaR)[j]; }
  _sigmaAvgR = TMath::Power(_sigmaAvgR, 1./_d) ;

  for (Int_t i=0; i<_nEvents; i++) {
    TVectorD& pointR = _dataPtsR[i];
    pointR *= *_rotMat;
  }
  
  coutI(Contents) << "RooNDKeysPdf::loadDataSet(" << this << ")" 
		  << "\n Number of events in dataset: " << _nEvents 
		  << "\n Weighted number of events in dataset: " << _nEventsW 
		  << endl; 
}


void

//_____________________________________________________________________________
RooNDKeysPdf::mirrorDataSet() const
{
  // determine mirror dataset.
  // mirror points are added around the physical boundaries of the dataset
  // Two steps:
  // 1. For each entry, determine if it should be mirrored (the mirror configuration).
  // 2. For each mirror configuration, make the mirror points.

  for (Int_t j=0; j<_nDim; j++) {
    _xDatLo3s[j] = _xDatLo[j] + _nSigma * (_rho[j] * _n * _sigma[j]);
    _xDatHi3s[j] = _xDatHi[j] - _nSigma * (_rho[j] * _n * _sigma[j]);
  }

  vector<Double_t> dummy(_nDim,0.);
  
  // 1.
  for (Int_t i=0; i<_nEvents; i++) {    
    vector<Double_t>& x = _dataPts[i];
    
    Int_t size = 1;
    vector<vector<Double_t> > mpoints(size,dummy);
    vector<vector<Int_t> > mjdcs(size);
    
    // create all mirror configurations for event i
    for (Int_t j=0; j<_nDim; j++) {
      
      vector<Int_t>& mjdxK = mjdcs[0];
      vector<Double_t>& mpointK = mpoints[0];
      
      // single mirror *at physical boundaries*
      if ((x[j]>_xDatLo[j] && x[j]<_xDatLo3s[j]) && x[j]<(_xDatLo[j]+_xDatHi[j])/2.) { 
	mpointK[j] = 2.*_xDatLo[j]-x[j]; 
	mjdxK.push_back(j);
      } else if ((x[j]<_xDatHi[j] && x[j]>_xDatHi3s[j]) && x[j]>(_xDatLo[j]+_xDatHi[j])/2.) { 
	mpointK[j] = 2.*_xDatHi[j]-x[j]; 
	mjdxK.push_back(j);
      }
    }
    
    vector<Int_t>& mjdx0 = mjdcs[0];
    // no mirror point(s) for this event
    if (size==1 && mjdx0.size()==0) continue;
    
    // 2.
    // generate all mirror points for event i
    vector<Int_t>& mjdx = mjdcs[0];
    vector<Double_t>& mpoint = mpoints[0];
    
    // number of mirror points for this mirror configuration
    Int_t eMir = 1 << mjdx.size(); 
    vector<vector<Double_t> > epoints(eMir,x);
    
    for (Int_t m=0; m<Int_t(mjdx.size()); m++) {
      Int_t size1 = 1 << m;
      Int_t size2 = 1 << (m+1);
      // copy all previous mirror points
      for (Int_t l=size1; l<size2; ++l) { 
	epoints[l] = epoints[l-size1];
	// fill high mirror points
	vector<Double_t>& epoint = epoints[l];
	epoint[mjdx[Int_t(mjdx.size()-1)-m]] = mpoint[mjdx[Int_t(mjdx.size()-1)-m]];
      }
    }
    
    // remove duplicate mirror points
    // note that: first epoint == x
    epoints.erase(epoints.begin());

    // add mirror points of event i to total dataset
    TVectorD pointR(_nDim); 

    for (Int_t m=0; m<Int_t(epoints.size()); m++) {
      _idx.push_back(i);
      _dataPts.push_back(epoints[m]);
      //_weights0.push_back(_weights0[i]);
      for (Int_t j=0; j<_nDim; j++) { pointR[j] = (epoints[m])[j]; }
      pointR *= *_rotMat;
      _dataPtsR.push_back(pointR);
    }
    
    epoints.clear();
    mpoints.clear();
    mjdcs.clear();
  } // end of event loop

  _nEventsM = Int_t(_dataPts.size());
}


void
//_____________________________________________________________________________
RooNDKeysPdf::loadWeightSet() const
{
  _wMap.clear();

  for (Int_t i=0; i<_nEventsM; i++) {
    _data.get(_idx[i]);
    Double_t myweight = _data.weight();
    //if ( TMath::Abs(myweight)>_minWeight ) { 
      _wMap[i] = myweight; 
    //}
  }

  coutI(Contents) << "RooNDKeysPdf::loadWeightSet(" << this << ") : Number of weighted events : " << _wMap.size() << endl;
}


void
//_____________________________________________________________________________
RooNDKeysPdf::calculateShell(BoxInfo* bi) const 
{
  // determine points in +/- nSigma shell around the box determined by the variable
  // ranges. These points are needed in the normalization, to determine probability
  // leakage in and out of the box.

  for (Int_t j=0; j<_nDim; j++) {
    if (bi->xVarLo[j]==_xDatLo[j] && bi->xVarHi[j]==_xDatHi[j]) { 
      bi->netFluxZ = bi->netFluxZ && kTRUE; 
    } else { bi->netFluxZ = kFALSE; }

    bi->xVarLoM3s[j] = bi->xVarLo[j] - _nSigma * (_rho[j] * _n * _sigma[j]);
    bi->xVarLoP3s[j] = bi->xVarLo[j] + _nSigma * (_rho[j] * _n * _sigma[j]);
    bi->xVarHiM3s[j] = bi->xVarHi[j] - _nSigma * (_rho[j] * _n * _sigma[j]);
    bi->xVarHiP3s[j] = bi->xVarHi[j] + _nSigma * (_rho[j] * _n * _sigma[j]);
  }

  map<Int_t,Double_t>::iterator wMapItr = _wMap.begin();

  //for (Int_t i=0; i<_nEventsM; i++) {    
  for (; wMapItr!=_wMap.end(); ++wMapItr) {
    Int_t i = (*wMapItr).first;

    const vector<Double_t>& x = _dataPts[i];
    Bool_t inVarRange(kTRUE);
    Bool_t inVarRangePlusShell(kTRUE);

    for (Int_t j=0; j<_nDim; j++) {

      if (x[j]>bi->xVarLo[j] && x[j]<bi->xVarHi[j]) { 
	inVarRange = inVarRange && kTRUE; 
      } else { inVarRange = inVarRange && kFALSE; }    

      if (x[j]>bi->xVarLoM3s[j] && x[j]<bi->xVarHiP3s[j]) { 
	inVarRangePlusShell = inVarRangePlusShell && kTRUE;
      } else { inVarRangePlusShell = inVarRangePlusShell && kFALSE; }
    }

    // event in range?
    if (inVarRange) { 
      bi->bIdcs.push_back(i);
    }

    // event in shell?
    if (inVarRangePlusShell) { 
      bi->bpsIdcs[i] = kTRUE;
      Bool_t inShell(kFALSE);      
      for (Int_t j=0; j<_nDim; j++) {
	if ((x[j]>bi->xVarLoM3s[j] && x[j]<bi->xVarLoP3s[j]) && x[j]<(bi->xVarLo[j]+bi->xVarHi[j])/2.) { 
	  inShell = kTRUE;
	} else if ((x[j]>bi->xVarHiM3s[j] && x[j]<bi->xVarHiP3s[j]) && x[j]>(bi->xVarLo[j]+bi->xVarHi[j])/2.) { 
	  inShell = kTRUE;
	}
      }
      if (inShell) bi->sIdcs.push_back(i); // needed for normalization
      else { 
	bi->bmsIdcs.push_back(i);          // idem
      }
    }
  }

  coutI(Contents) << "RooNDKeysPdf::calculateShell() : " 
		  << "\n Events in shell " << bi->sIdcs.size() 
		  << "\n Events in box " << bi->bIdcs.size() 
		  << "\n Events in box and shell " << bi->bpsIdcs.size() 
		  << endl;
}


void
//_____________________________________________________________________________
RooNDKeysPdf::calculatePreNorm(BoxInfo* bi) const
{
  //bi->nEventsBMSW=0.;
  //bi->nEventsBW=0.;

  // box minus shell
  for (Int_t i=0; i<Int_t(bi->bmsIdcs.size()); i++) 
    bi->nEventsBMSW += _wMap[bi->bmsIdcs[i]];

  // box
  for (Int_t i=0; i<Int_t(bi->bIdcs.size()); i++) 
    bi->nEventsBW += _wMap[bi->bIdcs[i]];

  cxcoutD(Eval) << "RooNDKeysPdf::calculatePreNorm() : " 
	      << "\n nEventsBMSW " << bi->nEventsBMSW 
	      << "\n nEventsBW " << bi->nEventsBW 
	      << endl;
}


void
//_____________________________________________________________________________
RooNDKeysPdf::sortDataIndices(BoxInfo* bi) const
{
  // sort entries, as needed for loopRange()

  itVec itrVecR;
  vector<TVectorD>::iterator dpRItr = _dataPtsR.begin();
  for (Int_t i=0; dpRItr!=_dataPtsR.end(); ++dpRItr, ++i) {
    if (bi) {
      if (bi->bpsIdcs.find(i)!=bi->bpsIdcs.end()) 
      //if (_wMap.find(i)!=_wMap.end()) 
	itrVecR.push_back(itPair(i,dpRItr));
    } else itrVecR.push_back(itPair(i,dpRItr));
  }

  for (Int_t j=0; j<_nDim; j++) { 
    _sortTVIdcs[j].clear();
    sort(itrVecR.begin(),itrVecR.end(),SorterTV_L2H(j));
    _sortTVIdcs[j] = itrVecR;
  }

  for (Int_t j=0; j<_nDim; j++) { 
    cxcoutD(Eval) << "RooNDKeysPdf::sortDataIndices() : Number of sorted events : " << _sortTVIdcs[j].size() << endl; 
  }
}


void
//_____________________________________________________________________________
RooNDKeysPdf::calculateBandWidth() const
{
  cxcoutD(Eval) << "RooNDKeysPdf::calculateBandWidth()" << endl; 

  // non-adaptive bandwidth 
  // (default, and needed to calculate adaptive bandwidth)

  if(!_options.Contains("a")) {
      cxcoutD(Eval) << "RooNDKeysPdf::calculateBandWidth() Using static bandwidth." << endl;
  }    
  
  for (Int_t i=0; i<_nEvents; i++) {
    vector<Double_t>& weight = _weights0[i];
    for (Int_t j=0; j<_nDim; j++) { weight[j] = _rho[j] * _n * (*_sigmaR)[j] ; }
  }

  // adaptive width
  if(_options.Contains("a")) {
    cxcoutD(Eval) << "RooNDKeysPdf::calculateBandWidth() Using adaptive bandwidth." << endl;
      
    vector<Double_t> dummy(_nDim,0.);
    _weights1.resize(_nEvents,dummy);

    for(Int_t i=0; i<_nEvents; ++i) {

      vector<Double_t>& x = _dataPts[i];
      Double_t f =  TMath::Power( gauss(x,_weights0)/_nEventsW , -1./(2.*_d) ) ;

      vector<Double_t>& weight = _weights1[i];
      for (Int_t j=0; j<_nDim; j++) {
	Double_t norm = (_rho[j]*_n*(*_sigmaR)[j]) / sqrt(_sigmaAvgR) ; 
	weight[j] = norm * f / sqrt(12.) ;  //  note additional factor of sqrt(12) compared with HEP-EX/0011057
      }
    }
    _weights = &_weights1;
  } 
}


Double_t
//_____________________________________________________________________________
RooNDKeysPdf::gauss(vector<Double_t>& x, vector<vector<Double_t> >& weights) const 
{
  // loop over all closest point to x, as determined by loopRange()

  if(_nEvents==0) return 0.;

  Double_t z=0.;
  map<Int_t,Bool_t> ibMap;
  ibMap.clear();

  // determine loop range for event x
  loopRange(x,ibMap);

  map<Int_t,Bool_t>::iterator ibMapItr = ibMap.begin();

  for (; ibMapItr!=ibMap.end(); ++ibMapItr) {
    Int_t i = (*ibMapItr).first;

    Double_t g(1.);

    if(i>=(Int_t)_idx.size()) {continue;} //---> 1.myline 

    const vector<Double_t>& point  = _dataPts[i];
    const vector<Double_t>& weight = weights[_idx[i]];

    for (Int_t j=0; j<_nDim; j++) { 
      (*_dx)[j] = x[j]-point[j]; 
    }

    if (_nDim>1) {
      *_dx *= *_rotMat; // rotate to decorrelated frame!
    }

    for (Int_t j=0; j<_nDim; j++) {
      Double_t r = (*_dx)[j];  //x[j] - point[j];
      Double_t c = 1./(2.*weight[j]*weight[j]);

      g *= exp( -c*r*r );
      g *= 1./(_sqrt2pi*weight[j]);
    }
    z += (g*_wMap[_idx[i]]);
  }
  return z;
}


void
//_____________________________________________________________________________
RooNDKeysPdf::loopRange(vector<Double_t>& x, map<Int_t,Bool_t>& ibMap) const
{
  // determine closest points to x, to loop over in evaluate()

  TVectorD xRm(_nDim);
  TVectorD xRp(_nDim);

  for (Int_t j=0; j<_nDim; j++) { xRm[j] = xRp[j] = x[j]; }

  xRm *= *_rotMat;
  xRp *= *_rotMat;
  for (Int_t j=0; j<_nDim; j++) {
    xRm[j] -= _nSigma * (_rho[j] * _n * (*_sigmaR)[j]);
    xRp[j] += _nSigma * (_rho[j] * _n * (*_sigmaR)[j]);
  }

  vector<TVectorD> xvecRm(1,xRm);
  vector<TVectorD> xvecRp(1,xRp);

  map<Int_t,Bool_t> ibMapRT;

  for (Int_t j=0; j<_nDim; j++) {
    ibMap.clear();
    itVec::iterator lo = lower_bound(_sortTVIdcs[j].begin(), _sortTVIdcs[j].end(),
				     itPair(0,xvecRm.begin()), SorterTV_L2H(j));
    itVec::iterator hi = upper_bound(_sortTVIdcs[j].begin(), _sortTVIdcs[j].end(),
				     itPair(0,xvecRp.begin()), SorterTV_L2H(j));
    itVec::iterator it=lo;
    if (j==0) {
      if (_nDim==1) { for (it=lo; it!=hi; ++it) ibMap[(*it).first] = kTRUE; }
      else { for (it=lo; it!=hi; ++it) ibMapRT[(*it).first] = kTRUE; }
      continue;
    }

    for (it=lo; it!=hi; ++it) 
      if (ibMapRT.find((*it).first)!=ibMapRT.end()) { ibMap[(*it).first] = kTRUE; }

    ibMapRT.clear();
    if (j!=_nDim-1) { ibMapRT = ibMap; }
  }
}


void
//_____________________________________________________________________________
RooNDKeysPdf::boxInfoInit(BoxInfo* bi, const char* rangeName, Int_t /*code*/) const
{
  vector<Bool_t> doInt(_nDim,kTRUE);

  bi->filled = kFALSE;

  bi->xVarLo.resize(_nDim,0.);
  bi->xVarHi.resize(_nDim,0.);
  bi->xVarLoM3s.resize(_nDim,0.);
  bi->xVarLoP3s.resize(_nDim,0.);
  bi->xVarHiM3s.resize(_nDim,0.);
  bi->xVarHiP3s.resize(_nDim,0.);

  bi->netFluxZ = kTRUE;
  bi->bpsIdcs.clear();
  bi->bIdcs.clear();
  bi->sIdcs.clear();
  bi->bmsIdcs.clear();

  bi->nEventsBMSW=0.;
  bi->nEventsBW=0.;

  _varItr->Reset() ;
  RooRealVar* var ;
  for(Int_t j=0; (var=(RooRealVar*)_varItr->Next()); ++j) {
    if (doInt[j]) {
      bi->xVarLo[j] = var->getMin(rangeName);
      bi->xVarHi[j] = var->getMax(rangeName);
    } else {
      bi->xVarLo[j] = var->getVal() ;
      bi->xVarHi[j] = var->getVal() ;
    }
  }
}


Double_t 
//_____________________________________________________________________________
RooNDKeysPdf::evaluate() const 
{
  _varItr->Reset() ;
  RooAbsReal* var ;
  const RooArgSet* nset = _varList.nset() ;
  for(Int_t j=0; (var=(RooAbsReal*)_varItr->Next()); ++j) {    
    _x[j] = var->getVal(nset);
  }

  Double_t val = gauss(_x,*_weights);

  if (val>=1E-20)
    return val ;
  else 
    return (1E-20) ;
}


Int_t 
//_____________________________________________________________________________
RooNDKeysPdf::getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName) const
{

  if (rangeName) return 0 ;

  Int_t code=0;
  if (matchArgs(allVars,analVars,RooArgSet(_varList))) { code=1; }
  
  return code;

}


Double_t 
//_____________________________________________________________________________
RooNDKeysPdf::analyticalIntegral(Int_t code, const char* rangeName) const
{
  cxcoutD(Eval) << "Calling RooNDKeysPdf::analyticalIntegral(" << GetName() << ") with code " << code 
	      << " and rangeName " << (rangeName?rangeName:"<none>") << endl;

  // determine which observables need to be integrated over ...
  Int_t nComb = 1 << (_nDim); 
  assert(code>=1 && code<nComb) ;

  vector<Bool_t> doInt(_nDim,kTRUE);

  // get BoxInfo
  BoxInfo* bi(0);

  if (rangeName) {
    string rangeNameStr(rangeName) ;
    bi = _rangeBoxInfo[make_pair(rangeNameStr,code)] ;
    if (!bi) {
      bi = new BoxInfo ;
      _rangeBoxInfo[make_pair(rangeNameStr,code)] = bi ;      
      boxInfoInit(bi,rangeName,code);
    }
  } else bi= &_fullBoxInfo ;

  // have boundaries changed?
  Bool_t newBounds(kFALSE);
  _varItr->Reset() ;
  RooRealVar* var ;
  for(Int_t j=0; (var=(RooRealVar*)_varItr->Next()); ++j) {
    if ((var->getMin(rangeName)-bi->xVarLo[j]!=0) ||
	(var->getMax(rangeName)-bi->xVarHi[j]!=0)) {
      newBounds = kTRUE;
    }
  }

  // reset
  if (newBounds) {
    cxcoutD(Eval) << "RooNDKeysPdf::analyticalIntegral() : Found new boundaries ... " << (rangeName?rangeName:"<none>") << endl;
    boxInfoInit(bi,rangeName,code);    
  }

  // recalculates netFluxZero and nEventsIR
  if (!bi->filled || newBounds) {
    // Fill box info with contents
    calculateShell(bi);
    calculatePreNorm(bi);
    bi->filled = kTRUE;
    sortDataIndices(bi);    
  }

  // first guess
  Double_t norm=bi->nEventsBW;

  if (_mirror && bi->netFluxZ) {
    // KEYS expression is self-normalized
    cxcoutD(Eval) << "RooNDKeysPdf::analyticalIntegral() : Using mirrored normalization : " << bi->nEventsBW << endl;
    return bi->nEventsBW;
  } 
  // calculate leakage in and out of variable range box
  else 
  {
    norm = bi->nEventsBMSW; 
    if (norm<0.) norm=0.;
    
    for (Int_t i=0; i<Int_t(bi->sIdcs.size()); ++i) {      
      Double_t prob=1.;
      const vector<Double_t>& x = _dataPts[bi->sIdcs[i]];
      const vector<Double_t>& weight = (*_weights)[_idx[bi->sIdcs[i]]];
      
      vector<Double_t> chi(_nDim,100.);
      
      for (Int_t j=0; j<_nDim; j++) {
	if(!doInt[j]) continue;

	if ((x[j]>bi->xVarLoM3s[j] && x[j]<bi->xVarLoP3s[j]) && x[j]<(bi->xVarLo[j]+bi->xVarHi[j])/2.) 
	  chi[j] = (x[j]-bi->xVarLo[j])/weight[j];
	else if ((x[j]>bi->xVarHiM3s[j] && x[j]<bi->xVarHiP3s[j]) && x[j]>(bi->xVarLo[j]+bi->xVarHi[j])/2.) 
	  chi[j] = (bi->xVarHi[j]-x[j])/weight[j];

	if (chi[j]>0) // inVarRange
	  prob *= (0.5 + TMath::Erf(fabs(chi[j])/sqrt(2.))/2.);
	else // outside Var range
	  prob *= (0.5 - TMath::Erf(fabs(chi[j])/sqrt(2.))/2.);
      }

      norm += prob * _wMap[_idx[bi->sIdcs[i]]];    
    } 
    
    cxcoutD(Eval) << "RooNDKeysPdf::analyticalIntegral() : Final normalization : " << norm << " " << bi->nEventsBW << endl;
    return norm;
  }
}


 RooNDKeysPdf.cxx:1
 RooNDKeysPdf.cxx:2
 RooNDKeysPdf.cxx:3
 RooNDKeysPdf.cxx:4
 RooNDKeysPdf.cxx:5
 RooNDKeysPdf.cxx:6
 RooNDKeysPdf.cxx:7
 RooNDKeysPdf.cxx:8
 RooNDKeysPdf.cxx:9
 RooNDKeysPdf.cxx:10
 RooNDKeysPdf.cxx:11
 RooNDKeysPdf.cxx:12
 RooNDKeysPdf.cxx:13
 RooNDKeysPdf.cxx:14
 RooNDKeysPdf.cxx:15
 RooNDKeysPdf.cxx:16
 RooNDKeysPdf.cxx:17
 RooNDKeysPdf.cxx:18
 RooNDKeysPdf.cxx:19
 RooNDKeysPdf.cxx:20
 RooNDKeysPdf.cxx:21
 RooNDKeysPdf.cxx:22
 RooNDKeysPdf.cxx:23
 RooNDKeysPdf.cxx:24
 RooNDKeysPdf.cxx:25
 RooNDKeysPdf.cxx:26
 RooNDKeysPdf.cxx:27
 RooNDKeysPdf.cxx:28
 RooNDKeysPdf.cxx:29
 RooNDKeysPdf.cxx:30
 RooNDKeysPdf.cxx:31
 RooNDKeysPdf.cxx:32
 RooNDKeysPdf.cxx:33
 RooNDKeysPdf.cxx:34
 RooNDKeysPdf.cxx:35
 RooNDKeysPdf.cxx:36
 RooNDKeysPdf.cxx:37
 RooNDKeysPdf.cxx:38
 RooNDKeysPdf.cxx:39
 RooNDKeysPdf.cxx:40
 RooNDKeysPdf.cxx:41
 RooNDKeysPdf.cxx:42
 RooNDKeysPdf.cxx:43
 RooNDKeysPdf.cxx:44
 RooNDKeysPdf.cxx:45
 RooNDKeysPdf.cxx:46
 RooNDKeysPdf.cxx:47
 RooNDKeysPdf.cxx:48
 RooNDKeysPdf.cxx:49
 RooNDKeysPdf.cxx:50
 RooNDKeysPdf.cxx:51
 RooNDKeysPdf.cxx:52
 RooNDKeysPdf.cxx:53
 RooNDKeysPdf.cxx:54
 RooNDKeysPdf.cxx:55
 RooNDKeysPdf.cxx:56
 RooNDKeysPdf.cxx:57
 RooNDKeysPdf.cxx:58
 RooNDKeysPdf.cxx:59
 RooNDKeysPdf.cxx:60
 RooNDKeysPdf.cxx:61
 RooNDKeysPdf.cxx:62
 RooNDKeysPdf.cxx:63
 RooNDKeysPdf.cxx:64
 RooNDKeysPdf.cxx:65
 RooNDKeysPdf.cxx:66
 RooNDKeysPdf.cxx:67
 RooNDKeysPdf.cxx:68
 RooNDKeysPdf.cxx:69
 RooNDKeysPdf.cxx:70
 RooNDKeysPdf.cxx:71
 RooNDKeysPdf.cxx:72
 RooNDKeysPdf.cxx:73
 RooNDKeysPdf.cxx:74
 RooNDKeysPdf.cxx:75
 RooNDKeysPdf.cxx:76
 RooNDKeysPdf.cxx:77
 RooNDKeysPdf.cxx:78
 RooNDKeysPdf.cxx:79
 RooNDKeysPdf.cxx:80
 RooNDKeysPdf.cxx:81
 RooNDKeysPdf.cxx:82
 RooNDKeysPdf.cxx:83
 RooNDKeysPdf.cxx:84
 RooNDKeysPdf.cxx:85
 RooNDKeysPdf.cxx:86
 RooNDKeysPdf.cxx:87
 RooNDKeysPdf.cxx:88
 RooNDKeysPdf.cxx:89
 RooNDKeysPdf.cxx:90
 RooNDKeysPdf.cxx:91
 RooNDKeysPdf.cxx:92
 RooNDKeysPdf.cxx:93
 RooNDKeysPdf.cxx:94
 RooNDKeysPdf.cxx:95
 RooNDKeysPdf.cxx:96
 RooNDKeysPdf.cxx:97
 RooNDKeysPdf.cxx:98
 RooNDKeysPdf.cxx:99
 RooNDKeysPdf.cxx:100
 RooNDKeysPdf.cxx:101
 RooNDKeysPdf.cxx:102
 RooNDKeysPdf.cxx:103
 RooNDKeysPdf.cxx:104
 RooNDKeysPdf.cxx:105
 RooNDKeysPdf.cxx:106
 RooNDKeysPdf.cxx:107
 RooNDKeysPdf.cxx:108
 RooNDKeysPdf.cxx:109
 RooNDKeysPdf.cxx:110
 RooNDKeysPdf.cxx:111
 RooNDKeysPdf.cxx:112
 RooNDKeysPdf.cxx:113
 RooNDKeysPdf.cxx:114
 RooNDKeysPdf.cxx:115
 RooNDKeysPdf.cxx:116
 RooNDKeysPdf.cxx:117
 RooNDKeysPdf.cxx:118
 RooNDKeysPdf.cxx:119
 RooNDKeysPdf.cxx:120
 RooNDKeysPdf.cxx:121
 RooNDKeysPdf.cxx:122
 RooNDKeysPdf.cxx:123
 RooNDKeysPdf.cxx:124
 RooNDKeysPdf.cxx:125
 RooNDKeysPdf.cxx:126
 RooNDKeysPdf.cxx:127
 RooNDKeysPdf.cxx:128
 RooNDKeysPdf.cxx:129
 RooNDKeysPdf.cxx:130
 RooNDKeysPdf.cxx:131
 RooNDKeysPdf.cxx:132
 RooNDKeysPdf.cxx:133
 RooNDKeysPdf.cxx:134
 RooNDKeysPdf.cxx:135
 RooNDKeysPdf.cxx:136
 RooNDKeysPdf.cxx:137
 RooNDKeysPdf.cxx:138
 RooNDKeysPdf.cxx:139
 RooNDKeysPdf.cxx:140
 RooNDKeysPdf.cxx:141
 RooNDKeysPdf.cxx:142
 RooNDKeysPdf.cxx:143
 RooNDKeysPdf.cxx:144
 RooNDKeysPdf.cxx:145
 RooNDKeysPdf.cxx:146
 RooNDKeysPdf.cxx:147
 RooNDKeysPdf.cxx:148
 RooNDKeysPdf.cxx:149
 RooNDKeysPdf.cxx:150
 RooNDKeysPdf.cxx:151
 RooNDKeysPdf.cxx:152
 RooNDKeysPdf.cxx:153
 RooNDKeysPdf.cxx:154
 RooNDKeysPdf.cxx:155
 RooNDKeysPdf.cxx:156
 RooNDKeysPdf.cxx:157
 RooNDKeysPdf.cxx:158
 RooNDKeysPdf.cxx:159
 RooNDKeysPdf.cxx:160
 RooNDKeysPdf.cxx:161
 RooNDKeysPdf.cxx:162
 RooNDKeysPdf.cxx:163
 RooNDKeysPdf.cxx:164
 RooNDKeysPdf.cxx:165
 RooNDKeysPdf.cxx:166
 RooNDKeysPdf.cxx:167
 RooNDKeysPdf.cxx:168
 RooNDKeysPdf.cxx:169
 RooNDKeysPdf.cxx:170
 RooNDKeysPdf.cxx:171
 RooNDKeysPdf.cxx:172
 RooNDKeysPdf.cxx:173
 RooNDKeysPdf.cxx:174
 RooNDKeysPdf.cxx:175
 RooNDKeysPdf.cxx:176
 RooNDKeysPdf.cxx:177
 RooNDKeysPdf.cxx:178
 RooNDKeysPdf.cxx:179
 RooNDKeysPdf.cxx:180
 RooNDKeysPdf.cxx:181
 RooNDKeysPdf.cxx:182
 RooNDKeysPdf.cxx:183
 RooNDKeysPdf.cxx:184
 RooNDKeysPdf.cxx:185
 RooNDKeysPdf.cxx:186
 RooNDKeysPdf.cxx:187
 RooNDKeysPdf.cxx:188
 RooNDKeysPdf.cxx:189
 RooNDKeysPdf.cxx:190
 RooNDKeysPdf.cxx:191
 RooNDKeysPdf.cxx:192
 RooNDKeysPdf.cxx:193
 RooNDKeysPdf.cxx:194
 RooNDKeysPdf.cxx:195
 RooNDKeysPdf.cxx:196
 RooNDKeysPdf.cxx:197
 RooNDKeysPdf.cxx:198
 RooNDKeysPdf.cxx:199
 RooNDKeysPdf.cxx:200
 RooNDKeysPdf.cxx:201
 RooNDKeysPdf.cxx:202
 RooNDKeysPdf.cxx:203
 RooNDKeysPdf.cxx:204
 RooNDKeysPdf.cxx:205
 RooNDKeysPdf.cxx:206
 RooNDKeysPdf.cxx:207
 RooNDKeysPdf.cxx:208
 RooNDKeysPdf.cxx:209
 RooNDKeysPdf.cxx:210
 RooNDKeysPdf.cxx:211
 RooNDKeysPdf.cxx:212
 RooNDKeysPdf.cxx:213
 RooNDKeysPdf.cxx:214
 RooNDKeysPdf.cxx:215
 RooNDKeysPdf.cxx:216
 RooNDKeysPdf.cxx:217
 RooNDKeysPdf.cxx:218
 RooNDKeysPdf.cxx:219
 RooNDKeysPdf.cxx:220
 RooNDKeysPdf.cxx:221
 RooNDKeysPdf.cxx:222
 RooNDKeysPdf.cxx:223
 RooNDKeysPdf.cxx:224
 RooNDKeysPdf.cxx:225
 RooNDKeysPdf.cxx:226
 RooNDKeysPdf.cxx:227
 RooNDKeysPdf.cxx:228
 RooNDKeysPdf.cxx:229
 RooNDKeysPdf.cxx:230
 RooNDKeysPdf.cxx:231
 RooNDKeysPdf.cxx:232
 RooNDKeysPdf.cxx:233
 RooNDKeysPdf.cxx:234
 RooNDKeysPdf.cxx:235
 RooNDKeysPdf.cxx:236
 RooNDKeysPdf.cxx:237
 RooNDKeysPdf.cxx:238
 RooNDKeysPdf.cxx:239
 RooNDKeysPdf.cxx:240
 RooNDKeysPdf.cxx:241
 RooNDKeysPdf.cxx:242
 RooNDKeysPdf.cxx:243
 RooNDKeysPdf.cxx:244
 RooNDKeysPdf.cxx:245
 RooNDKeysPdf.cxx:246
 RooNDKeysPdf.cxx:247
 RooNDKeysPdf.cxx:248
 RooNDKeysPdf.cxx:249
 RooNDKeysPdf.cxx:250
 RooNDKeysPdf.cxx:251
 RooNDKeysPdf.cxx:252
 RooNDKeysPdf.cxx:253
 RooNDKeysPdf.cxx:254
 RooNDKeysPdf.cxx:255
 RooNDKeysPdf.cxx:256
 RooNDKeysPdf.cxx:257
 RooNDKeysPdf.cxx:258
 RooNDKeysPdf.cxx:259
 RooNDKeysPdf.cxx:260
 RooNDKeysPdf.cxx:261
 RooNDKeysPdf.cxx:262
 RooNDKeysPdf.cxx:263
 RooNDKeysPdf.cxx:264
 RooNDKeysPdf.cxx:265
 RooNDKeysPdf.cxx:266
 RooNDKeysPdf.cxx:267
 RooNDKeysPdf.cxx:268
 RooNDKeysPdf.cxx:269
 RooNDKeysPdf.cxx:270
 RooNDKeysPdf.cxx:271
 RooNDKeysPdf.cxx:272
 RooNDKeysPdf.cxx:273
 RooNDKeysPdf.cxx:274
 RooNDKeysPdf.cxx:275
 RooNDKeysPdf.cxx:276
 RooNDKeysPdf.cxx:277
 RooNDKeysPdf.cxx:278
 RooNDKeysPdf.cxx:279
 RooNDKeysPdf.cxx:280
 RooNDKeysPdf.cxx:281
 RooNDKeysPdf.cxx:282
 RooNDKeysPdf.cxx:283
 RooNDKeysPdf.cxx:284
 RooNDKeysPdf.cxx:285
 RooNDKeysPdf.cxx:286
 RooNDKeysPdf.cxx:287
 RooNDKeysPdf.cxx:288
 RooNDKeysPdf.cxx:289
 RooNDKeysPdf.cxx:290
 RooNDKeysPdf.cxx:291
 RooNDKeysPdf.cxx:292
 RooNDKeysPdf.cxx:293
 RooNDKeysPdf.cxx:294
 RooNDKeysPdf.cxx:295
 RooNDKeysPdf.cxx:296
 RooNDKeysPdf.cxx:297
 RooNDKeysPdf.cxx:298
 RooNDKeysPdf.cxx:299
 RooNDKeysPdf.cxx:300
 RooNDKeysPdf.cxx:301
 RooNDKeysPdf.cxx:302
 RooNDKeysPdf.cxx:303
 RooNDKeysPdf.cxx:304
 RooNDKeysPdf.cxx:305
 RooNDKeysPdf.cxx:306
 RooNDKeysPdf.cxx:307
 RooNDKeysPdf.cxx:308
 RooNDKeysPdf.cxx:309
 RooNDKeysPdf.cxx:310
 RooNDKeysPdf.cxx:311
 RooNDKeysPdf.cxx:312
 RooNDKeysPdf.cxx:313
 RooNDKeysPdf.cxx:314
 RooNDKeysPdf.cxx:315
 RooNDKeysPdf.cxx:316
 RooNDKeysPdf.cxx:317
 RooNDKeysPdf.cxx:318
 RooNDKeysPdf.cxx:319
 RooNDKeysPdf.cxx:320
 RooNDKeysPdf.cxx:321
 RooNDKeysPdf.cxx:322
 RooNDKeysPdf.cxx:323
 RooNDKeysPdf.cxx:324
 RooNDKeysPdf.cxx:325
 RooNDKeysPdf.cxx:326
 RooNDKeysPdf.cxx:327
 RooNDKeysPdf.cxx:328
 RooNDKeysPdf.cxx:329
 RooNDKeysPdf.cxx:330
 RooNDKeysPdf.cxx:331
 RooNDKeysPdf.cxx:332
 RooNDKeysPdf.cxx:333
 RooNDKeysPdf.cxx:334
 RooNDKeysPdf.cxx:335
 RooNDKeysPdf.cxx:336
 RooNDKeysPdf.cxx:337
 RooNDKeysPdf.cxx:338
 RooNDKeysPdf.cxx:339
 RooNDKeysPdf.cxx:340
 RooNDKeysPdf.cxx:341
 RooNDKeysPdf.cxx:342
 RooNDKeysPdf.cxx:343
 RooNDKeysPdf.cxx:344
 RooNDKeysPdf.cxx:345
 RooNDKeysPdf.cxx:346
 RooNDKeysPdf.cxx:347
 RooNDKeysPdf.cxx:348
 RooNDKeysPdf.cxx:349
 RooNDKeysPdf.cxx:350
 RooNDKeysPdf.cxx:351
 RooNDKeysPdf.cxx:352
 RooNDKeysPdf.cxx:353
 RooNDKeysPdf.cxx:354
 RooNDKeysPdf.cxx:355
 RooNDKeysPdf.cxx:356
 RooNDKeysPdf.cxx:357
 RooNDKeysPdf.cxx:358
 RooNDKeysPdf.cxx:359
 RooNDKeysPdf.cxx:360
 RooNDKeysPdf.cxx:361
 RooNDKeysPdf.cxx:362
 RooNDKeysPdf.cxx:363
 RooNDKeysPdf.cxx:364
 RooNDKeysPdf.cxx:365
 RooNDKeysPdf.cxx:366
 RooNDKeysPdf.cxx:367
 RooNDKeysPdf.cxx:368
 RooNDKeysPdf.cxx:369
 RooNDKeysPdf.cxx:370
 RooNDKeysPdf.cxx:371
 RooNDKeysPdf.cxx:372
 RooNDKeysPdf.cxx:373
 RooNDKeysPdf.cxx:374
 RooNDKeysPdf.cxx:375
 RooNDKeysPdf.cxx:376
 RooNDKeysPdf.cxx:377
 RooNDKeysPdf.cxx:378
 RooNDKeysPdf.cxx:379
 RooNDKeysPdf.cxx:380
 RooNDKeysPdf.cxx:381
 RooNDKeysPdf.cxx:382
 RooNDKeysPdf.cxx:383
 RooNDKeysPdf.cxx:384
 RooNDKeysPdf.cxx:385
 RooNDKeysPdf.cxx:386
 RooNDKeysPdf.cxx:387
 RooNDKeysPdf.cxx:388
 RooNDKeysPdf.cxx:389
 RooNDKeysPdf.cxx:390
 RooNDKeysPdf.cxx:391
 RooNDKeysPdf.cxx:392
 RooNDKeysPdf.cxx:393
 RooNDKeysPdf.cxx:394
 RooNDKeysPdf.cxx:395
 RooNDKeysPdf.cxx:396
 RooNDKeysPdf.cxx:397
 RooNDKeysPdf.cxx:398
 RooNDKeysPdf.cxx:399
 RooNDKeysPdf.cxx:400
 RooNDKeysPdf.cxx:401
 RooNDKeysPdf.cxx:402
 RooNDKeysPdf.cxx:403
 RooNDKeysPdf.cxx:404
 RooNDKeysPdf.cxx:405
 RooNDKeysPdf.cxx:406
 RooNDKeysPdf.cxx:407
 RooNDKeysPdf.cxx:408
 RooNDKeysPdf.cxx:409
 RooNDKeysPdf.cxx:410
 RooNDKeysPdf.cxx:411
 RooNDKeysPdf.cxx:412
 RooNDKeysPdf.cxx:413
 RooNDKeysPdf.cxx:414
 RooNDKeysPdf.cxx:415
 RooNDKeysPdf.cxx:416
 RooNDKeysPdf.cxx:417
 RooNDKeysPdf.cxx:418
 RooNDKeysPdf.cxx:419
 RooNDKeysPdf.cxx:420
 RooNDKeysPdf.cxx:421
 RooNDKeysPdf.cxx:422
 RooNDKeysPdf.cxx:423
 RooNDKeysPdf.cxx:424
 RooNDKeysPdf.cxx:425
 RooNDKeysPdf.cxx:426
 RooNDKeysPdf.cxx:427
 RooNDKeysPdf.cxx:428
 RooNDKeysPdf.cxx:429
 RooNDKeysPdf.cxx:430
 RooNDKeysPdf.cxx:431
 RooNDKeysPdf.cxx:432
 RooNDKeysPdf.cxx:433
 RooNDKeysPdf.cxx:434
 RooNDKeysPdf.cxx:435
 RooNDKeysPdf.cxx:436
 RooNDKeysPdf.cxx:437
 RooNDKeysPdf.cxx:438
 RooNDKeysPdf.cxx:439
 RooNDKeysPdf.cxx:440
 RooNDKeysPdf.cxx:441
 RooNDKeysPdf.cxx:442
 RooNDKeysPdf.cxx:443
 RooNDKeysPdf.cxx:444
 RooNDKeysPdf.cxx:445
 RooNDKeysPdf.cxx:446
 RooNDKeysPdf.cxx:447
 RooNDKeysPdf.cxx:448
 RooNDKeysPdf.cxx:449
 RooNDKeysPdf.cxx:450
 RooNDKeysPdf.cxx:451
 RooNDKeysPdf.cxx:452
 RooNDKeysPdf.cxx:453
 RooNDKeysPdf.cxx:454
 RooNDKeysPdf.cxx:455
 RooNDKeysPdf.cxx:456
 RooNDKeysPdf.cxx:457
 RooNDKeysPdf.cxx:458
 RooNDKeysPdf.cxx:459
 RooNDKeysPdf.cxx:460
 RooNDKeysPdf.cxx:461
 RooNDKeysPdf.cxx:462
 RooNDKeysPdf.cxx:463
 RooNDKeysPdf.cxx:464
 RooNDKeysPdf.cxx:465
 RooNDKeysPdf.cxx:466
 RooNDKeysPdf.cxx:467
 RooNDKeysPdf.cxx:468
 RooNDKeysPdf.cxx:469
 RooNDKeysPdf.cxx:470
 RooNDKeysPdf.cxx:471
 RooNDKeysPdf.cxx:472
 RooNDKeysPdf.cxx:473
 RooNDKeysPdf.cxx:474
 RooNDKeysPdf.cxx:475
 RooNDKeysPdf.cxx:476
 RooNDKeysPdf.cxx:477
 RooNDKeysPdf.cxx:478
 RooNDKeysPdf.cxx:479
 RooNDKeysPdf.cxx:480
 RooNDKeysPdf.cxx:481
 RooNDKeysPdf.cxx:482
 RooNDKeysPdf.cxx:483
 RooNDKeysPdf.cxx:484
 RooNDKeysPdf.cxx:485
 RooNDKeysPdf.cxx:486
 RooNDKeysPdf.cxx:487
 RooNDKeysPdf.cxx:488
 RooNDKeysPdf.cxx:489
 RooNDKeysPdf.cxx:490
 RooNDKeysPdf.cxx:491
 RooNDKeysPdf.cxx:492
 RooNDKeysPdf.cxx:493
 RooNDKeysPdf.cxx:494
 RooNDKeysPdf.cxx:495
 RooNDKeysPdf.cxx:496
 RooNDKeysPdf.cxx:497
 RooNDKeysPdf.cxx:498
 RooNDKeysPdf.cxx:499
 RooNDKeysPdf.cxx:500
 RooNDKeysPdf.cxx:501
 RooNDKeysPdf.cxx:502
 RooNDKeysPdf.cxx:503
 RooNDKeysPdf.cxx:504
 RooNDKeysPdf.cxx:505
 RooNDKeysPdf.cxx:506
 RooNDKeysPdf.cxx:507
 RooNDKeysPdf.cxx:508
 RooNDKeysPdf.cxx:509
 RooNDKeysPdf.cxx:510
 RooNDKeysPdf.cxx:511
 RooNDKeysPdf.cxx:512
 RooNDKeysPdf.cxx:513
 RooNDKeysPdf.cxx:514
 RooNDKeysPdf.cxx:515
 RooNDKeysPdf.cxx:516
 RooNDKeysPdf.cxx:517
 RooNDKeysPdf.cxx:518
 RooNDKeysPdf.cxx:519
 RooNDKeysPdf.cxx:520
 RooNDKeysPdf.cxx:521
 RooNDKeysPdf.cxx:522
 RooNDKeysPdf.cxx:523
 RooNDKeysPdf.cxx:524
 RooNDKeysPdf.cxx:525
 RooNDKeysPdf.cxx:526
 RooNDKeysPdf.cxx:527
 RooNDKeysPdf.cxx:528
 RooNDKeysPdf.cxx:529
 RooNDKeysPdf.cxx:530
 RooNDKeysPdf.cxx:531
 RooNDKeysPdf.cxx:532
 RooNDKeysPdf.cxx:533
 RooNDKeysPdf.cxx:534
 RooNDKeysPdf.cxx:535
 RooNDKeysPdf.cxx:536
 RooNDKeysPdf.cxx:537
 RooNDKeysPdf.cxx:538
 RooNDKeysPdf.cxx:539
 RooNDKeysPdf.cxx:540
 RooNDKeysPdf.cxx:541
 RooNDKeysPdf.cxx:542
 RooNDKeysPdf.cxx:543
 RooNDKeysPdf.cxx:544
 RooNDKeysPdf.cxx:545
 RooNDKeysPdf.cxx:546
 RooNDKeysPdf.cxx:547
 RooNDKeysPdf.cxx:548
 RooNDKeysPdf.cxx:549
 RooNDKeysPdf.cxx:550
 RooNDKeysPdf.cxx:551
 RooNDKeysPdf.cxx:552
 RooNDKeysPdf.cxx:553
 RooNDKeysPdf.cxx:554
 RooNDKeysPdf.cxx:555
 RooNDKeysPdf.cxx:556
 RooNDKeysPdf.cxx:557
 RooNDKeysPdf.cxx:558
 RooNDKeysPdf.cxx:559
 RooNDKeysPdf.cxx:560
 RooNDKeysPdf.cxx:561
 RooNDKeysPdf.cxx:562
 RooNDKeysPdf.cxx:563
 RooNDKeysPdf.cxx:564
 RooNDKeysPdf.cxx:565
 RooNDKeysPdf.cxx:566
 RooNDKeysPdf.cxx:567
 RooNDKeysPdf.cxx:568
 RooNDKeysPdf.cxx:569
 RooNDKeysPdf.cxx:570
 RooNDKeysPdf.cxx:571
 RooNDKeysPdf.cxx:572
 RooNDKeysPdf.cxx:573
 RooNDKeysPdf.cxx:574
 RooNDKeysPdf.cxx:575
 RooNDKeysPdf.cxx:576
 RooNDKeysPdf.cxx:577
 RooNDKeysPdf.cxx:578
 RooNDKeysPdf.cxx:579
 RooNDKeysPdf.cxx:580
 RooNDKeysPdf.cxx:581
 RooNDKeysPdf.cxx:582
 RooNDKeysPdf.cxx:583
 RooNDKeysPdf.cxx:584
 RooNDKeysPdf.cxx:585
 RooNDKeysPdf.cxx:586
 RooNDKeysPdf.cxx:587
 RooNDKeysPdf.cxx:588
 RooNDKeysPdf.cxx:589
 RooNDKeysPdf.cxx:590
 RooNDKeysPdf.cxx:591
 RooNDKeysPdf.cxx:592
 RooNDKeysPdf.cxx:593
 RooNDKeysPdf.cxx:594
 RooNDKeysPdf.cxx:595
 RooNDKeysPdf.cxx:596
 RooNDKeysPdf.cxx:597
 RooNDKeysPdf.cxx:598
 RooNDKeysPdf.cxx:599
 RooNDKeysPdf.cxx:600
 RooNDKeysPdf.cxx:601
 RooNDKeysPdf.cxx:602
 RooNDKeysPdf.cxx:603
 RooNDKeysPdf.cxx:604
 RooNDKeysPdf.cxx:605
 RooNDKeysPdf.cxx:606
 RooNDKeysPdf.cxx:607
 RooNDKeysPdf.cxx:608
 RooNDKeysPdf.cxx:609
 RooNDKeysPdf.cxx:610
 RooNDKeysPdf.cxx:611
 RooNDKeysPdf.cxx:612
 RooNDKeysPdf.cxx:613
 RooNDKeysPdf.cxx:614
 RooNDKeysPdf.cxx:615
 RooNDKeysPdf.cxx:616
 RooNDKeysPdf.cxx:617
 RooNDKeysPdf.cxx:618
 RooNDKeysPdf.cxx:619
 RooNDKeysPdf.cxx:620
 RooNDKeysPdf.cxx:621
 RooNDKeysPdf.cxx:622
 RooNDKeysPdf.cxx:623
 RooNDKeysPdf.cxx:624
 RooNDKeysPdf.cxx:625
 RooNDKeysPdf.cxx:626
 RooNDKeysPdf.cxx:627
 RooNDKeysPdf.cxx:628
 RooNDKeysPdf.cxx:629
 RooNDKeysPdf.cxx:630
 RooNDKeysPdf.cxx:631
 RooNDKeysPdf.cxx:632
 RooNDKeysPdf.cxx:633
 RooNDKeysPdf.cxx:634
 RooNDKeysPdf.cxx:635
 RooNDKeysPdf.cxx:636
 RooNDKeysPdf.cxx:637
 RooNDKeysPdf.cxx:638
 RooNDKeysPdf.cxx:639
 RooNDKeysPdf.cxx:640
 RooNDKeysPdf.cxx:641
 RooNDKeysPdf.cxx:642
 RooNDKeysPdf.cxx:643
 RooNDKeysPdf.cxx:644
 RooNDKeysPdf.cxx:645
 RooNDKeysPdf.cxx:646
 RooNDKeysPdf.cxx:647
 RooNDKeysPdf.cxx:648
 RooNDKeysPdf.cxx:649
 RooNDKeysPdf.cxx:650
 RooNDKeysPdf.cxx:651
 RooNDKeysPdf.cxx:652
 RooNDKeysPdf.cxx:653
 RooNDKeysPdf.cxx:654
 RooNDKeysPdf.cxx:655
 RooNDKeysPdf.cxx:656
 RooNDKeysPdf.cxx:657
 RooNDKeysPdf.cxx:658
 RooNDKeysPdf.cxx:659
 RooNDKeysPdf.cxx:660
 RooNDKeysPdf.cxx:661
 RooNDKeysPdf.cxx:662
 RooNDKeysPdf.cxx:663
 RooNDKeysPdf.cxx:664
 RooNDKeysPdf.cxx:665
 RooNDKeysPdf.cxx:666
 RooNDKeysPdf.cxx:667
 RooNDKeysPdf.cxx:668
 RooNDKeysPdf.cxx:669
 RooNDKeysPdf.cxx:670
 RooNDKeysPdf.cxx:671
 RooNDKeysPdf.cxx:672
 RooNDKeysPdf.cxx:673
 RooNDKeysPdf.cxx:674
 RooNDKeysPdf.cxx:675
 RooNDKeysPdf.cxx:676
 RooNDKeysPdf.cxx:677
 RooNDKeysPdf.cxx:678
 RooNDKeysPdf.cxx:679
 RooNDKeysPdf.cxx:680
 RooNDKeysPdf.cxx:681
 RooNDKeysPdf.cxx:682
 RooNDKeysPdf.cxx:683
 RooNDKeysPdf.cxx:684
 RooNDKeysPdf.cxx:685
 RooNDKeysPdf.cxx:686
 RooNDKeysPdf.cxx:687
 RooNDKeysPdf.cxx:688
 RooNDKeysPdf.cxx:689
 RooNDKeysPdf.cxx:690
 RooNDKeysPdf.cxx:691
 RooNDKeysPdf.cxx:692
 RooNDKeysPdf.cxx:693
 RooNDKeysPdf.cxx:694
 RooNDKeysPdf.cxx:695
 RooNDKeysPdf.cxx:696
 RooNDKeysPdf.cxx:697
 RooNDKeysPdf.cxx:698
 RooNDKeysPdf.cxx:699
 RooNDKeysPdf.cxx:700
 RooNDKeysPdf.cxx:701
 RooNDKeysPdf.cxx:702
 RooNDKeysPdf.cxx:703
 RooNDKeysPdf.cxx:704
 RooNDKeysPdf.cxx:705
 RooNDKeysPdf.cxx:706
 RooNDKeysPdf.cxx:707
 RooNDKeysPdf.cxx:708
 RooNDKeysPdf.cxx:709
 RooNDKeysPdf.cxx:710
 RooNDKeysPdf.cxx:711
 RooNDKeysPdf.cxx:712
 RooNDKeysPdf.cxx:713
 RooNDKeysPdf.cxx:714
 RooNDKeysPdf.cxx:715
 RooNDKeysPdf.cxx:716
 RooNDKeysPdf.cxx:717
 RooNDKeysPdf.cxx:718
 RooNDKeysPdf.cxx:719
 RooNDKeysPdf.cxx:720
 RooNDKeysPdf.cxx:721
 RooNDKeysPdf.cxx:722
 RooNDKeysPdf.cxx:723
 RooNDKeysPdf.cxx:724
 RooNDKeysPdf.cxx:725
 RooNDKeysPdf.cxx:726
 RooNDKeysPdf.cxx:727
 RooNDKeysPdf.cxx:728
 RooNDKeysPdf.cxx:729
 RooNDKeysPdf.cxx:730
 RooNDKeysPdf.cxx:731
 RooNDKeysPdf.cxx:732
 RooNDKeysPdf.cxx:733
 RooNDKeysPdf.cxx:734
 RooNDKeysPdf.cxx:735
 RooNDKeysPdf.cxx:736
 RooNDKeysPdf.cxx:737
 RooNDKeysPdf.cxx:738
 RooNDKeysPdf.cxx:739
 RooNDKeysPdf.cxx:740
 RooNDKeysPdf.cxx:741
 RooNDKeysPdf.cxx:742
 RooNDKeysPdf.cxx:743
 RooNDKeysPdf.cxx:744
 RooNDKeysPdf.cxx:745
 RooNDKeysPdf.cxx:746
 RooNDKeysPdf.cxx:747
 RooNDKeysPdf.cxx:748
 RooNDKeysPdf.cxx:749
 RooNDKeysPdf.cxx:750
 RooNDKeysPdf.cxx:751
 RooNDKeysPdf.cxx:752
 RooNDKeysPdf.cxx:753
 RooNDKeysPdf.cxx:754
 RooNDKeysPdf.cxx:755
 RooNDKeysPdf.cxx:756
 RooNDKeysPdf.cxx:757
 RooNDKeysPdf.cxx:758
 RooNDKeysPdf.cxx:759
 RooNDKeysPdf.cxx:760
 RooNDKeysPdf.cxx:761
 RooNDKeysPdf.cxx:762
 RooNDKeysPdf.cxx:763
 RooNDKeysPdf.cxx:764
 RooNDKeysPdf.cxx:765
 RooNDKeysPdf.cxx:766
 RooNDKeysPdf.cxx:767
 RooNDKeysPdf.cxx:768
 RooNDKeysPdf.cxx:769
 RooNDKeysPdf.cxx:770
 RooNDKeysPdf.cxx:771
 RooNDKeysPdf.cxx:772
 RooNDKeysPdf.cxx:773
 RooNDKeysPdf.cxx:774
 RooNDKeysPdf.cxx:775
 RooNDKeysPdf.cxx:776
 RooNDKeysPdf.cxx:777
 RooNDKeysPdf.cxx:778
 RooNDKeysPdf.cxx:779
 RooNDKeysPdf.cxx:780
 RooNDKeysPdf.cxx:781
 RooNDKeysPdf.cxx:782
 RooNDKeysPdf.cxx:783
 RooNDKeysPdf.cxx:784
 RooNDKeysPdf.cxx:785
 RooNDKeysPdf.cxx:786
 RooNDKeysPdf.cxx:787
 RooNDKeysPdf.cxx:788
 RooNDKeysPdf.cxx:789
 RooNDKeysPdf.cxx:790
 RooNDKeysPdf.cxx:791
 RooNDKeysPdf.cxx:792
 RooNDKeysPdf.cxx:793
 RooNDKeysPdf.cxx:794
 RooNDKeysPdf.cxx:795
 RooNDKeysPdf.cxx:796
 RooNDKeysPdf.cxx:797
 RooNDKeysPdf.cxx:798
 RooNDKeysPdf.cxx:799
 RooNDKeysPdf.cxx:800
 RooNDKeysPdf.cxx:801
 RooNDKeysPdf.cxx:802
 RooNDKeysPdf.cxx:803
 RooNDKeysPdf.cxx:804
 RooNDKeysPdf.cxx:805
 RooNDKeysPdf.cxx:806
 RooNDKeysPdf.cxx:807
 RooNDKeysPdf.cxx:808
 RooNDKeysPdf.cxx:809
 RooNDKeysPdf.cxx:810
 RooNDKeysPdf.cxx:811
 RooNDKeysPdf.cxx:812
 RooNDKeysPdf.cxx:813
 RooNDKeysPdf.cxx:814
 RooNDKeysPdf.cxx:815
 RooNDKeysPdf.cxx:816
 RooNDKeysPdf.cxx:817
 RooNDKeysPdf.cxx:818
 RooNDKeysPdf.cxx:819
 RooNDKeysPdf.cxx:820
 RooNDKeysPdf.cxx:821
 RooNDKeysPdf.cxx:822
 RooNDKeysPdf.cxx:823
 RooNDKeysPdf.cxx:824
 RooNDKeysPdf.cxx:825
 RooNDKeysPdf.cxx:826
 RooNDKeysPdf.cxx:827
 RooNDKeysPdf.cxx:828
 RooNDKeysPdf.cxx:829
 RooNDKeysPdf.cxx:830
 RooNDKeysPdf.cxx:831
 RooNDKeysPdf.cxx:832
 RooNDKeysPdf.cxx:833
 RooNDKeysPdf.cxx:834
 RooNDKeysPdf.cxx:835
 RooNDKeysPdf.cxx:836
 RooNDKeysPdf.cxx:837
 RooNDKeysPdf.cxx:838
 RooNDKeysPdf.cxx:839
 RooNDKeysPdf.cxx:840
 RooNDKeysPdf.cxx:841
 RooNDKeysPdf.cxx:842
 RooNDKeysPdf.cxx:843
 RooNDKeysPdf.cxx:844
 RooNDKeysPdf.cxx:845
 RooNDKeysPdf.cxx:846
 RooNDKeysPdf.cxx:847
 RooNDKeysPdf.cxx:848
 RooNDKeysPdf.cxx:849
 RooNDKeysPdf.cxx:850
 RooNDKeysPdf.cxx:851
 RooNDKeysPdf.cxx:852
 RooNDKeysPdf.cxx:853
 RooNDKeysPdf.cxx:854
 RooNDKeysPdf.cxx:855
 RooNDKeysPdf.cxx:856
 RooNDKeysPdf.cxx:857
 RooNDKeysPdf.cxx:858
 RooNDKeysPdf.cxx:859
 RooNDKeysPdf.cxx:860
 RooNDKeysPdf.cxx:861
 RooNDKeysPdf.cxx:862
 RooNDKeysPdf.cxx:863
 RooNDKeysPdf.cxx:864
 RooNDKeysPdf.cxx:865
 RooNDKeysPdf.cxx:866
 RooNDKeysPdf.cxx:867
 RooNDKeysPdf.cxx:868
 RooNDKeysPdf.cxx:869
 RooNDKeysPdf.cxx:870
 RooNDKeysPdf.cxx:871
 RooNDKeysPdf.cxx:872
 RooNDKeysPdf.cxx:873
 RooNDKeysPdf.cxx:874
 RooNDKeysPdf.cxx:875
 RooNDKeysPdf.cxx:876
 RooNDKeysPdf.cxx:877
 RooNDKeysPdf.cxx:878
 RooNDKeysPdf.cxx:879
 RooNDKeysPdf.cxx:880
 RooNDKeysPdf.cxx:881
 RooNDKeysPdf.cxx:882
 RooNDKeysPdf.cxx:883
 RooNDKeysPdf.cxx:884
 RooNDKeysPdf.cxx:885
 RooNDKeysPdf.cxx:886
 RooNDKeysPdf.cxx:887
 RooNDKeysPdf.cxx:888
 RooNDKeysPdf.cxx:889
 RooNDKeysPdf.cxx:890
 RooNDKeysPdf.cxx:891
 RooNDKeysPdf.cxx:892
 RooNDKeysPdf.cxx:893
 RooNDKeysPdf.cxx:894
 RooNDKeysPdf.cxx:895
 RooNDKeysPdf.cxx:896
 RooNDKeysPdf.cxx:897
 RooNDKeysPdf.cxx:898
 RooNDKeysPdf.cxx:899
 RooNDKeysPdf.cxx:900
 RooNDKeysPdf.cxx:901
 RooNDKeysPdf.cxx:902
 RooNDKeysPdf.cxx:903
 RooNDKeysPdf.cxx:904
 RooNDKeysPdf.cxx:905
 RooNDKeysPdf.cxx:906
 RooNDKeysPdf.cxx:907
 RooNDKeysPdf.cxx:908
 RooNDKeysPdf.cxx:909
 RooNDKeysPdf.cxx:910
 RooNDKeysPdf.cxx:911
 RooNDKeysPdf.cxx:912
 RooNDKeysPdf.cxx:913
 RooNDKeysPdf.cxx:914
 RooNDKeysPdf.cxx:915
 RooNDKeysPdf.cxx:916
 RooNDKeysPdf.cxx:917
 RooNDKeysPdf.cxx:918
 RooNDKeysPdf.cxx:919
 RooNDKeysPdf.cxx:920
 RooNDKeysPdf.cxx:921
 RooNDKeysPdf.cxx:922
 RooNDKeysPdf.cxx:923
 RooNDKeysPdf.cxx:924
 RooNDKeysPdf.cxx:925
 RooNDKeysPdf.cxx:926
 RooNDKeysPdf.cxx:927
 RooNDKeysPdf.cxx:928
 RooNDKeysPdf.cxx:929
 RooNDKeysPdf.cxx:930
 RooNDKeysPdf.cxx:931
 RooNDKeysPdf.cxx:932
 RooNDKeysPdf.cxx:933
 RooNDKeysPdf.cxx:934
 RooNDKeysPdf.cxx:935
 RooNDKeysPdf.cxx:936
 RooNDKeysPdf.cxx:937
 RooNDKeysPdf.cxx:938
 RooNDKeysPdf.cxx:939
 RooNDKeysPdf.cxx:940
 RooNDKeysPdf.cxx:941
 RooNDKeysPdf.cxx:942
 RooNDKeysPdf.cxx:943
 RooNDKeysPdf.cxx:944
 RooNDKeysPdf.cxx:945
 RooNDKeysPdf.cxx:946
 RooNDKeysPdf.cxx:947
 RooNDKeysPdf.cxx:948
 RooNDKeysPdf.cxx:949
 RooNDKeysPdf.cxx:950
 RooNDKeysPdf.cxx:951
 RooNDKeysPdf.cxx:952
 RooNDKeysPdf.cxx:953
 RooNDKeysPdf.cxx:954
 RooNDKeysPdf.cxx:955
 RooNDKeysPdf.cxx:956
 RooNDKeysPdf.cxx:957
 RooNDKeysPdf.cxx:958
 RooNDKeysPdf.cxx:959
 RooNDKeysPdf.cxx:960
 RooNDKeysPdf.cxx:961
 RooNDKeysPdf.cxx:962
 RooNDKeysPdf.cxx:963
 RooNDKeysPdf.cxx:964
 RooNDKeysPdf.cxx:965
 RooNDKeysPdf.cxx:966
 RooNDKeysPdf.cxx:967
 RooNDKeysPdf.cxx:968
 RooNDKeysPdf.cxx:969
 RooNDKeysPdf.cxx:970
 RooNDKeysPdf.cxx:971
 RooNDKeysPdf.cxx:972
 RooNDKeysPdf.cxx:973
 RooNDKeysPdf.cxx:974
 RooNDKeysPdf.cxx:975
 RooNDKeysPdf.cxx:976
 RooNDKeysPdf.cxx:977
 RooNDKeysPdf.cxx:978
 RooNDKeysPdf.cxx:979
 RooNDKeysPdf.cxx:980
 RooNDKeysPdf.cxx:981
 RooNDKeysPdf.cxx:982
 RooNDKeysPdf.cxx:983
 RooNDKeysPdf.cxx:984
 RooNDKeysPdf.cxx:985
 RooNDKeysPdf.cxx:986
 RooNDKeysPdf.cxx:987
 RooNDKeysPdf.cxx:988
 RooNDKeysPdf.cxx:989
 RooNDKeysPdf.cxx:990
 RooNDKeysPdf.cxx:991
 RooNDKeysPdf.cxx:992
 RooNDKeysPdf.cxx:993
 RooNDKeysPdf.cxx:994
 RooNDKeysPdf.cxx:995
 RooNDKeysPdf.cxx:996
 RooNDKeysPdf.cxx:997
 RooNDKeysPdf.cxx:998
 RooNDKeysPdf.cxx:999
 RooNDKeysPdf.cxx:1000
 RooNDKeysPdf.cxx:1001
 RooNDKeysPdf.cxx:1002
 RooNDKeysPdf.cxx:1003
 RooNDKeysPdf.cxx:1004
 RooNDKeysPdf.cxx:1005
 RooNDKeysPdf.cxx:1006
 RooNDKeysPdf.cxx:1007
 RooNDKeysPdf.cxx:1008
 RooNDKeysPdf.cxx:1009
 RooNDKeysPdf.cxx:1010
 RooNDKeysPdf.cxx:1011
 RooNDKeysPdf.cxx:1012
 RooNDKeysPdf.cxx:1013
 RooNDKeysPdf.cxx:1014
 RooNDKeysPdf.cxx:1015
 RooNDKeysPdf.cxx:1016
 RooNDKeysPdf.cxx:1017
 RooNDKeysPdf.cxx:1018
 RooNDKeysPdf.cxx:1019
 RooNDKeysPdf.cxx:1020
 RooNDKeysPdf.cxx:1021
 RooNDKeysPdf.cxx:1022
 RooNDKeysPdf.cxx:1023
 RooNDKeysPdf.cxx:1024
 RooNDKeysPdf.cxx:1025
 RooNDKeysPdf.cxx:1026
 RooNDKeysPdf.cxx:1027
 RooNDKeysPdf.cxx:1028
 RooNDKeysPdf.cxx:1029
 RooNDKeysPdf.cxx:1030
 RooNDKeysPdf.cxx:1031
 RooNDKeysPdf.cxx:1032
 RooNDKeysPdf.cxx:1033
 RooNDKeysPdf.cxx:1034
 RooNDKeysPdf.cxx:1035
 RooNDKeysPdf.cxx:1036
 RooNDKeysPdf.cxx:1037
 RooNDKeysPdf.cxx:1038
 RooNDKeysPdf.cxx:1039
 RooNDKeysPdf.cxx:1040
 RooNDKeysPdf.cxx:1041
 RooNDKeysPdf.cxx:1042
 RooNDKeysPdf.cxx:1043
 RooNDKeysPdf.cxx:1044
 RooNDKeysPdf.cxx:1045
 RooNDKeysPdf.cxx:1046
 RooNDKeysPdf.cxx:1047
 RooNDKeysPdf.cxx:1048
 RooNDKeysPdf.cxx:1049
 RooNDKeysPdf.cxx:1050
 RooNDKeysPdf.cxx:1051
 RooNDKeysPdf.cxx:1052
 RooNDKeysPdf.cxx:1053
 RooNDKeysPdf.cxx:1054
 RooNDKeysPdf.cxx:1055
 RooNDKeysPdf.cxx:1056
 RooNDKeysPdf.cxx:1057