ROOT logo
// @(#)root/tmva $Id: MethodPDEFoam.cxx 29246 2009-06-26 16:50:00Z brun $
// Author: Tancredi Carli, Dominik Dannheim, Alexander Voigt

/**********************************************************************************
 * Project: TMVA - a Root-integrated toolkit for multivariate Data analysis       *
 * Package: TMVA                                                                  *
 * Class  : MethodPDEFoam                                                         *
 * Web    : http://tmva.sourceforge.net                                           *
 *                                                                                *
 * Description:                                                                   *
 *      Implementation (see header for description)                               *
 *                                                                                *
 * Authors (alphabetical):                                                        *
 *      Tancredi Carli   - CERN, Switzerland                                      *
 *      Dominik Dannheim - CERN, Switzerland                                      *
 *      Alexander Voigt  - CERN, Switzerland                                      *
 *      Peter Speckmayer - CERN, Switzerland                                      *
 *                                                                                * 
 * Original author of the TFoam implementation:                                   *
 *      S. Jadach - Institute of Nuclear Physics, Cracow, Poland                  *
 *                                                                                *
 * Copyright (c) 2008:                                                            *
 *      CERN, Switzerland                                                         * 
 *      MPI-K Heidelberg, Germany                                                 * 
 *                                                                                *
 * Redistribution and use in source and binary forms, with or without             *
 * modification, are permitted according to the terms listed in LICENSE           *
 * (http://tmva.sourceforge.net/LICENSE)                                          *
 **********************************************************************************/

//_______________________________________________________________________

#include <iomanip>
#include <cassert>

#include "TMath.h"
#include "Riostream.h"
#include "TFile.h"
#include "TXMLFile.h"

#include "TMVA/MethodPDEFoam.h"
#include "TMVA/Tools.h"
#include "TMatrix.h"
#include "TMVA/Ranking.h"
#include "TMVA/Types.h"
#include "TMVA/ClassifierFactory.h"
#include "TMVA/Config.h"

REGISTER_METHOD(PDEFoam)

ClassImp(TMVA::MethodPDEFoam)

//_______________________________________________________________________
   TMVA::MethodPDEFoam::MethodPDEFoam( const TString& jobName,
				       const TString& methodTitle,
				       DataSetInfo& dsi, 
				       const TString& theOption,
				       TDirectory* theTargetDir ) :
      MethodBase( jobName, Types::kPDEFoam, methodTitle, dsi, theOption, theTargetDir )
{
   // init PDEFoam objects
}

//_______________________________________________________________________
TMVA::MethodPDEFoam::MethodPDEFoam( DataSetInfo& dsi, 
                                    const TString& theWeightFile,  
                                    TDirectory* theTargetDir ) :
   MethodBase( Types::kPDEFoam, dsi, theWeightFile, theTargetDir )
{
   // constructor from weight file
}

//_______________________________________________________________________
Bool_t TMVA::MethodPDEFoam::HasAnalysisType( Types::EAnalysisType type, UInt_t numberClasses, UInt_t /*numberTargets*/ )
{
   // PDEFoam can handle classification with 2 classes and regression with one or more regression-targets
   if (type == Types::kClassification && numberClasses == 2) return kTRUE;
   if (type == Types::kRegression) return kTRUE;
   return kFALSE;
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::Init( void )
{
   // default initialization called by all constructors

   // init PDEFoam options
   fSigBgSeparated = kFALSE;   // default values for options
   fFrac           = 0.001;
   fDiscrErrCut    = -1.;
   fVolFrac        = 30;
   fVolFracInv     = 1./30.;
   fnActiveCells   = 500;
   fnCells         = fnActiveCells*2-1;
   fnSampl         = 2000;
   fnBin           = 5;
   fOptRej         = 1;       // use unweighted MC events
   fOptDrive       = 1;       // use variance reduction
   fEvPerBin       = 10000;
   fChat           = 0;
   fCutNmin        = true; 
   fNmin           = 100;
   fCutRMSmin      = false;   // default TFoam method
   fRMSmin         = 0.01;
   
   fKernel         = kNone; // default: use no kernel
   fTargetSelection= kMean; // default: use mean for target selection (only multi target regression!)

   fCompress              = kTRUE;
   fMultiTargetRegression = kFALSE;

   for (int i=0; i<FOAM_NUMBER; i++) foam[i] = NULL;

   PseRan = new TRandom3();  // Create random number generator for PDEFoams
   PseRan->SetSeed(4356);

   SetSignalReferenceCut( 0.0 );
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::DeclareOptions() 
{
   //
   // Declare MethodPDEFoam options
   //
   DeclareOptionRef( fSigBgSeparated = kFALSE, "SigBgSeparate", "Separate foams for signal and background" );
   DeclareOptionRef( fFrac = 0.001,           "TailCut",  "Fraction of outlier events that are excluded from the foam in each dimension" );
   DeclareOptionRef( fVolFracInv = 1./30.,    "VolFrac",  "Size of sampling box, used for density calculation during foam build-up (maximum value: 1.0 is equivalent to volume of entire foam)");
   DeclareOptionRef( fnActiveCells = 500,     "nActiveCells",  "Maximum number of active cells to be created by the foam");
   DeclareOptionRef( fnSampl = 2000,          "nSampl",   "Number of generated MC events per cell");
   DeclareOptionRef( fnBin = 5,               "nBin",     "Number of bins in edge histograms");
   DeclareOptionRef( fCompress = kTRUE,       "Compress", "Compress XML file");
   DeclareOptionRef( fMultiTargetRegression = kFALSE,     "MultiTargetRegression", "Do regression with multiple targets");
   DeclareOptionRef( fCutNmin = true,         "CutNmin",  "Requirement for minimal number of events in cell");
   DeclareOptionRef( fNmin = 100,             "Nmin",     "Number of events in cell required to split cell");
   
   DeclareOptionRef( fKernelStr = "None",     "Kernel",   "Kernel type used");
   AddPreDefVal(TString("None"));
   AddPreDefVal(TString("Gauss"));
   AddPreDefVal(TString("LinNeighbors"));
   DeclareOptionRef( fTargetSelectionStr = "Mean", "TargetSelection", "Target selection method");
   AddPreDefVal(TString("Mean"));
   AddPreDefVal(TString("Mpv"));
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::ProcessOptions() 
{
   // process user options
   if (!(fFrac>0. && fFrac<=1.)) {
      Log() << kWARNING << "TailCut not in [0.,1] ==> using 0.001 instead" << Endl;
      fFrac = 0.001;
   }

   fnCells = fnActiveCells*2-1;

   fVolFrac = Int_t(1./fVolFracInv + 0.5); // round

   if (fCutRMSmin && fRMSmin>1.0) {
      Log() << kWARNING << "RMSmin > 1.0 ==> using 1.0 instead" << Endl;
      fRMSmin = 1.0;
   }
   
   if (fNmin==0)
      fCutNmin = false;

   if (fKernelStr == "None" ) fKernel = kNone;
   else if (fKernelStr == "Gauss" ) fKernel = kGaus;
   else if (fKernelStr == "LinNeighbors") fKernel = kLinN;

   if (fTargetSelectionStr == "Mean" ) fTargetSelection = kMean;
   else                                fTargetSelection = kMpv;
}

//_______________________________________________________________________
TMVA::MethodPDEFoam::~MethodPDEFoam( void )
{
   // destructor
   if(foam[0]) {
      delete foam[0];  
      foam[0]=0;
   }
   if (!DoRegression() && fSigBgSeparated && foam[1]){
      delete foam[1];
      foam[1]=0;
   }
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::CalcXminXmax() 
{
   // determine foam range for all dimensions
   // loop over all testing events -> Get Xmin and Xmax

   Xmin.clear();
   Xmax.clear();
   UInt_t kDim = GetNvar(); // == Data()->GetNVariables();
   UInt_t tDim = Data()->GetNTargets();
   UInt_t vDim = Data()->GetNVariables();
   if (fMultiTargetRegression)
      kDim += tDim;

   Double_t *xmin = new Double_t[kDim];
   Double_t *xmax = new Double_t[kDim];

   // set default values
   for (UInt_t dim=0; dim<kDim; dim++) {
      xmin[dim] =  1.e100;
      xmax[dim] = -1.e100;
   }

   Log() << kDEBUG << "Number of training events: " << Data()->GetNTrainingEvents() << Endl;
   Int_t nevoutside = (Int_t)((Data()->GetNTrainingEvents())*(fFrac)); // number of events that are outside the range
   Int_t rangehistbins = 10000;                               // number of bins in histos
  
   // loop over all testing singnal and BG events and clac minimal and maximal value of every variable
   for (Long64_t i=0; i<(GetNEvents()); i++) { // events loop
      const Event* ev = GetEvent(i);    
      for (UInt_t dim=0; dim<kDim; dim++) { // variables loop
         Double_t val;
         if (fMultiTargetRegression) {
            if (dim < vDim)
               val = ev->GetVal(dim);
            else 
               val = ev->GetTarget(dim-vDim);
         }
         else
            val = ev->GetVal(dim);

         if (val<xmin[dim])
            xmin[dim] = val;
         if (val>xmax[dim])
            xmax[dim] = val;
      }
   }

   // Create and fill histograms for each dimension (with same events as before), to determine range 
   // based on number of events outside the range
   TH1F **range_h = new TH1F*[kDim]; 
   char text[200];
   for (UInt_t dim=0; dim<kDim; dim++) {
      sprintf(text, "range%i", dim);
      range_h[dim]  = new TH1F(text, "range", rangehistbins, xmin[dim], xmax[dim]);
   }

   // fill all testing events into histos 
   for (Long64_t i=0; i<GetNEvents(); i++) {
      const Event* ev = GetEvent(i);
      for (UInt_t dim=0; dim<kDim; dim++) {
         if (fMultiTargetRegression) {
            if (dim < vDim)
               range_h[dim]->Fill(ev->GetVal(dim));
            else
               range_h[dim]->Fill(ev->GetTarget(dim-vDim));
         }
         else
            range_h[dim]->Fill(ev->GetVal(dim));
      }
   };

   // calc Xmin, Xmax from Histos
   for (UInt_t dim=0; dim<kDim; dim++) { 
      for (Int_t i=1; i<(rangehistbins+1); i++) { // loop over bins 
         if (range_h[dim]->Integral(0, i) > nevoutside) { // calc left limit (integral over bins 0..i = nevoutside)
            xmin[dim]=range_h[dim]->GetBinLowEdge(i);
            break;
         }
      }
      for (Int_t i=rangehistbins; i>0; i--) { // calc right limit (integral over bins i..max = nevoutside)
         if (range_h[dim]->Integral(i, (rangehistbins+1)) > nevoutside) {
            xmax[dim]=range_h[dim]->GetBinLowEdge(i+1);
            break;
         }
      }
   }  
   // now xmin[] and xmax[] contain upper/lower limits for every dimension

   // copy xmin[], xmax[] values to the class variable
   Xmin.clear();
   Xmax.clear();
   for (UInt_t dim=0; dim<kDim; dim++) { 
      Xmin.push_back(xmin[dim]);
      Xmax.push_back(xmax[dim]);
   }


   delete[] xmin;
   delete[] xmax;

   // delete histos
   for (UInt_t dim=0; dim<kDim; dim++)
      delete range_h[dim];
   delete[] range_h;

   return;
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::Train( void )
{
   Log() << kDEBUG << "Calculate Xmin and Xmax for every dimension" << Endl;
   CalcXminXmax();


   if (DoRegression()) {
      if (fMultiTargetRegression)
         TrainMultiTargetRegression();
      else
         TrainMonoTargetRegression();
   }
   else {
      if (DataInfo().GetNormalization() != "EQUALNUMEVENTS" ) { 
	 Log() << kINFO << "NormMode=" << DataInfo().GetNormalization() 
	       << " chosen. Note that only NormMode=EqualNumEvents" 
	       << " ensures that Discriminant values correspond to"
	       << " signal probabilities." << Endl;
      }

      Log() << kDEBUG << "N_sig for training events: " << Data()->GetNEvtSigTrain() << Endl;
      Log() << kDEBUG << "N_bg for training events:  " << Data()->GetNEvtBkgdTrain() << Endl;
      Log() << kDEBUG << "User normalization: " << DataInfo().GetNormalization().Data() << Endl;

      if (fSigBgSeparated)
         TrainSeparatedClassification();
      else
         TrainUnifiedClassification();
   }
}

/////////////////////////////////////////////////////////////////////////////
//  First method (signal and bg are in seperate foams).                    //
/////////////////////////////////////////////////////////////////////////////
//_______________________________________________________________________
void TMVA::MethodPDEFoam::TrainSeparatedClassification() 
{
   // Creation of 2 separated foams: one for signal events, one for 
   // backgound events.

   TString foamcaption[2];
   foamcaption[0] = "SignalFoam";
   foamcaption[1] = "BgFoam";

   for(int i=0; i<FOAM_NUMBER; i++) {
      // create 2 PDEFoams
      foam[i] = new PDEFoam(foamcaption[i]);
      InitFoam(foam[i], kSeparate);

      Log() << kINFO << "Filling binary search tree of " << foamcaption[i] 
            << " with events" << Endl;
      // insert event to BinarySearchTree
      for (Long64_t k=0; k<GetNEvents(); k++) {
         const Event* ev = GetEvent(k);
         if ((i==0 && ev->IsSignal()) || (i==1 && !ev->IsSignal()))
            foam[i]->FillBinarySearchTree(ev, kSeparate, IgnoreEventsWithNegWeightsInTraining());
      }

      Log() << kINFO << "Build " << foamcaption[i] << Endl;
      // build foam
      foam[i]->SetNElements(1);  // init space for 1 variable on every cell (number of events in cell)
      foam[i]->Create(fCutNmin);

      // Reset Cell Integrals
      foam[i]->SetNElements(2);  // init space for 2 variables on every cell (N_ev, RMS)
      foam[i]->ResetCellElements();

      Log() << "Filling foam cells with events" << Endl;
      // loop over all events -> fill foam cells
      for (Long64_t k=0; k<GetNEvents(); k++) {
         const Event* ev = GetEvent(k); 
         if ((i==0 && ev->IsSignal()) || (i==1 && !ev->IsSignal()))
            foam[i]->FillFoamCells(ev, kSeparate, IgnoreEventsWithNegWeightsInTraining());
      }

      Log() << kDEBUG << "Check all cells and remove cells with volume 0" << Endl;
      foam[i]->CheckCells(true);
   }
}

//////////////////////////////////////////////////////////////////////////
// second method (only one foam, which contains discriminator).         //
//////////////////////////////////////////////////////////////////////////
void TMVA::MethodPDEFoam::TrainUnifiedClassification() 
{
   // Create only one unified foam which contains discriminator
   // (N_sig)/(N_sig + N_bg)

   foam[0] = new PDEFoam("DiscrFoam");
   InitFoam(foam[0], kDiscr);

   Log() << kINFO << "Filling binary search tree of discriminator foam with events" << Endl;
   // insert event to BinarySearchTree
   for (Long64_t k=0; k<GetNEvents(); k++)
      foam[0]->FillBinarySearchTree(GetEvent(k), kDiscr, IgnoreEventsWithNegWeightsInTraining());

   Log() << kINFO << "Build up discriminator foam" << Endl;
   // build foam with 1 cell element
   foam[0]->SetNElements(1);     // init space for 1 variable on every cell (number of events in cell)
   foam[0]->Create(fCutNmin);    // build foam and create cell elements if Nmin-cut is activated

   Log() << kDEBUG << "Resetting cell integrals" << Endl;
   // Reset cell elements, used after foam build-up
   foam[0]->SetNElements(2);     // init space for 2 variables on every cell
   foam[0]->ResetCellElements();

   Log() << "Filling foam cells with events" << Endl;
   // loop over all training events -> fill foam cells with N_sig and N_Bg
   for (UInt_t k=0; k<GetNEvents(); k++)
      foam[0]->FillFoamCells(GetEvent(k), kDiscr, IgnoreEventsWithNegWeightsInTraining());

   Log() << "Calculate cell discriminator"<< Endl;
   // calc discriminator (and it's error) for each cell
   foam[0]->CalcCellDiscr();

   Log() << kDEBUG << "Check all cells and remove cells with volume 0" << Endl;
   foam[0]->CheckCells(true);
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::TrainMonoTargetRegression() 
{
   // Training for mono target regression
   // - foam density = average Target(0)
   // - dimension of foam = number of non-targets
   // - cell content = average target 0

   if (Data()->GetNTargets() < 1) {
      Log() << kFATAL << "Error: number of targets = " << Data()->GetNTargets() << Endl;
      return;
   }
   else if (Data()->GetNTargets() > 1) {
      Log() << kWARNING << "Warning: number of targets = " << Data()->GetNTargets()
            << "  --> using only first target" << Endl;
   }
   else 
      Log() << kDEBUG << "MethodPDEFoam: number of Targets: " << Data()->GetNTargets() << Endl;

   TString foamcaption = "MonoTargetRegressionFoam";
   foam[0] = new PDEFoam(foamcaption);
   InitFoam(foam[0], kMonoTarget);

   Log() << kINFO << "Filling binary search tree with events" << Endl;
   // insert event to BinarySearchTree
   for (Long64_t k=0; k<GetNEvents(); k++)
      foam[0]->FillBinarySearchTree(GetEvent(k), kMonoTarget, IgnoreEventsWithNegWeightsInTraining());

   Log() << kINFO << "Build mono target regression foam" << Endl;
   // build foam
   foam[0]->SetNElements(1);        // to save N_ev during foam build-up
   foam[0]->Create(fCutNmin);

   Log() << kDEBUG << "Resetting cell elements" << Endl;
   // Reset Cell Integrals
   foam[0]->SetNElements(2);        // to save N_ev and Target(0)
   foam[0]->ResetCellElements();

   Log() << "Filling foam cells with events" << Endl;
   // loop over all events -> fill foam cells with target
   for (UInt_t k=0; k<GetNEvents(); k++)
      foam[0]->FillFoamCells(GetEvent(k), kMonoTarget, IgnoreEventsWithNegWeightsInTraining());

   Log() << kDEBUG << "Calculate cell average targets"<< Endl;
   // calc weight (and it's error) for each cell
   foam[0]->CalcCellTarget();

   Log() << kDEBUG << "Check all cells and remove cells with volume 0" << Endl;
   foam[0]->CheckCells(true);
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::TrainMultiTargetRegression()
{
   // Training multi target regression
   // - foam density = Event density
   // - dimension of foam = number of non-targets + number of targets
   // - cell content = event density

   Log() << kDEBUG << "Number of variables: " << Data()->GetNVariables() << Endl;
   Log() << kDEBUG << "Number of Targets:   " << Data()->GetNTargets()   << Endl;
   Log() << kDEBUG << "Dimension of foam:   " << Data()->GetNVariables()+Data()->GetNTargets() << Endl;
   if (fKernel==kLinN)
      Log() << kFATAL << "LinNeighbors kernel currently not supported" 
	    << " for multi target regression" << Endl;

   TString foamcaption = "MultiTargetRegressionFoam";
   foam[0] = new PDEFoam(foamcaption);
   InitFoam(foam[0], kMultiTarget);

   Log() << kINFO << "Filling binary search tree of multi target regression foam with events" 
         << Endl;
   // insert event to BinarySearchTree
   for (Long64_t k=0; k<GetNEvents(); k++)
      foam[0]->FillBinarySearchTree(GetEvent(k), kMultiTarget, IgnoreEventsWithNegWeightsInTraining());

   Log() << kINFO << "Build multi target regression foam" << Endl;
   // build foam
   foam[0]->SetNElements(1);          // to save N_ev during build-up
   foam[0]->Create(fCutNmin);

   Log() << kDEBUG << "Resetting cell elements" << Endl;
   // Reset Cell values
   foam[0]->SetNElements(2);          // to save N_ev and RMS
   foam[0]->ResetCellElements();

   Log() << kINFO << "Filling foam cells with events" << Endl;
   // loop over all events -> fill foam cells with number of events
   for (UInt_t k=0; k<GetNEvents(); k++)
      foam[0]->FillFoamCells(GetEvent(k), kMultiTarget, IgnoreEventsWithNegWeightsInTraining());

   Log() << kDEBUG << "Check all cells and remove cells with volume 0" << Endl;
   foam[0]->CheckCells(true);
}

//_______________________________________________________________________
Double_t TMVA::MethodPDEFoam::GetMvaValue( Double_t* err )
{
   // Return Mva-Value for both separated and unified foams

   const Event* ev = GetEvent();
   Double_t discr = 0.;
   Double_t discr_error = 0.;

   if (fSigBgSeparated) {
      std::vector<Float_t> xvec = ev->GetValues();

      Double_t density_sig = 0.;
      Double_t density_bg  = 0.;

      density_sig = foam[0]->GetCellDensity(xvec, fKernel); // get signal event density
      density_bg  = foam[1]->GetCellDensity(xvec, fKernel); // get background event density

      // calc disciminator (normed!)
      if ( (density_sig+density_bg) > 0 )
         discr = density_sig/(density_sig+density_bg);
      else
         discr = 0.5; // assume 50% signal probability, if no events found (bad assumption, but can be overruled by cut on error)

      // do error estimation (not jet used in TMVA)
      Double_t neventsB = foam[1]->GetCellEntries(xvec);
      Double_t neventsS = foam[0]->GetCellEntries(xvec);
      Double_t scaleB = 1.;
      Double_t errorS = TMath::Sqrt(neventsS); // estimation of statistical error on counted signal events
      Double_t errorB = TMath::Sqrt(neventsB); // estimation of statistical error on counted background events

      if (neventsS == 0) // no signal events in cell
         errorS = 1.;
      if (neventsB == 0) // no bg events in cell
         errorB = 1.;

      if ( (neventsS>1e-10) || (neventsB>1e-10) ) // eq. (5) in paper T.Carli, B.Koblitz 2002
         discr_error = TMath::Sqrt( TMath::Power ( scaleB*neventsB
                                                   / TMath::Power((neventsS+scaleB*neventsB),2)
                                                   * errorS, 2) +
                                    TMath::Power ( (scaleB*neventsS)
                                                   / TMath::Power((neventsS+scaleB*neventsB),2)
                                                   * errorB, 2) );
      else discr_error = 1.;

      if (discr_error < 1e-10) discr_error = 1.;

      // do not classify, if error too big
      if (fDiscrErrCut>=0.0 && discr_error > fDiscrErrCut) discr = -1.;
   }

   /////////////////////////////////////////////////////////////////////////////
   //  End of first method (signal and bg are in seperate foams).             //
   //  Begin second method (only one foam, which contains discriminator).     //
   /////////////////////////////////////////////////////////////////////////////

   else { // Signal and Bg not separated
      std::vector<Float_t> xvec = ev->GetValues();
      
      // get discriminator direct from the foam
      discr       = foam[0]->GetCellDiscr(xvec, fKernel);
      discr_error = foam[0]->GetCellDiscrError(xvec);
	 
      // do not classify, if error too big
      if (fDiscrErrCut>=0.0 && discr_error > fDiscrErrCut) discr = -1.;
   }

   // attribute error
   if (err != 0) *err = discr_error;

   return discr;
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::SetXminXmax( TMVA::PDEFoam *pdefoam )
{
   // Set Xmin, Xmax in every dimension to pdefoam

   if (!pdefoam){
      Log() << kFATAL << "Null pointer given!" << Endl;
      return;
   }

   UInt_t num_vars = GetNvar();
   if (fMultiTargetRegression)
      num_vars += Data()->GetNTargets();

   for (UInt_t idim=0; idim<num_vars; idim++) { // set upper/ lower limit in foam
      Log()<< kDEBUG << "foam: SetXmin[dim="<<idim<<"]: " << Xmin.at(idim) << Endl;
      Log()<< kDEBUG << "foam: SetXmax[dim="<<idim<<"]: " << Xmax.at(idim) << Endl;
      pdefoam->SetXmin(idim, Xmin.at(idim));
      pdefoam->SetXmax(idim, Xmax.at(idim));
   }
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::InitFoam(TMVA::PDEFoam *pdefoam, EFoamType ft){
   // Set foam options and initialize foam

   if (!pdefoam){
      Log() << kFATAL << "Null pointer given!" << Endl;
      return;
   }

   // set signal and background classes
   if (ft==kSeparate || ft==kDiscr){
      pdefoam->SetSignalClass    (fSignalClass);
      pdefoam->SetBackgroundClass(fBackgroundClass);
   }

   // Set foam fill value
   pdefoam->SetFoamType(ft);
   
   // set Options VolFrac, kDim, ...
   if (ft==kMultiTarget)
      // dimension of foam = number of targets + non-targets
      pdefoam->SetkDim(     Data()->GetNTargets()+Data()->GetNVariables());
   else
      pdefoam->SetkDim(     GetNvar());  // Mandatory!
   pdefoam->SetVolumeFraction(fVolFrac); // Mandatory!
   pdefoam->SetnCells(      fnCells);    // optional
   pdefoam->SetnSampl(      fnSampl);    // optional
   pdefoam->SetnBin(        fnBin);      // optional
   pdefoam->SetOptRej(      fOptRej);    // optional
   pdefoam->SetOptDrive(    fOptDrive);  // optional
   pdefoam->SetEvPerBin(    fEvPerBin);  // optional
   pdefoam->SetChat(        fChat);      // optional

   // cuts
   pdefoam->CutNmin(fCutNmin);     // cut on minimal number of events per cell
   pdefoam->SetNmin(fNmin);
   pdefoam->CutRMSmin(fCutRMSmin); // cut on minimal RMS in cell
   pdefoam->SetRMSmin(fRMSmin);

   // SetPseRan
   pdefoam->SetPseRan(PseRan);

   // Init PDEFoam
   pdefoam->Init();
   
   // Set Xmin, Xmax
   SetXminXmax(pdefoam);
}

//_______________________________________________________________________
const std::vector<Float_t>& TMVA::MethodPDEFoam::GetRegressionValues()
{
   // Return regression values for both multi and mono target regression

   if (fRegressionReturnVal == 0) fRegressionReturnVal = new std::vector<Float_t>;
   fRegressionReturnVal->clear();

   const Event* ev = GetEvent();
   std::vector<Float_t> vals = ev->GetValues(); // get array of event variables (non-targets)   

   if (vals.size() == 0) {
      Log() << kWARNING << "<GetRegressionValues> value vector has size 0. " << Endl;
   }

   if (fMultiTargetRegression) {
      for(UInt_t i=0; i<(Data()->GetNTargets()); i++)
         fRegressionReturnVal->push_back(foam[0]->GetProjectedRegValue(i, vals, fKernel, fTargetSelection));
   }
   else {
      fRegressionReturnVal->push_back(foam[0]->GetCellRegValue0(vals, fKernel));   
   }

   Event * evT = new Event(*ev);
   for (UInt_t itgt = 0; itgt < evT->GetNTargets(); itgt++) {
      evT->SetTarget(itgt, fRegressionReturnVal->at(itgt) );
   }
   const Event* evT2 = GetTransformationHandler().InverseTransform( evT );
   fRegressionReturnVal->clear();
   for (UInt_t itgt = 0; itgt < evT->GetNTargets(); itgt++) {
      fRegressionReturnVal->push_back( evT2->GetTarget(itgt) );
   }

   delete evT;

   return (*fRegressionReturnVal);
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::PrintCoefficients( void ) 
{}
  
//_______________________________________________________________________
void  TMVA::MethodPDEFoam::WriteWeightsToStream( std::ostream& o ) const
{  
   // save options and internal parameters

   o << fSigBgSeparated << endl;                 // Seperate Sig and Bg, or not
   o << std::setprecision(12) << fFrac << endl;  // Fraction used for calc of Xmin, Xmax
   o << std::setprecision(12) << fDiscrErrCut << endl; // cut on discrimant error
   o << fVolFrac << endl;                        // volume fraction (used for density calculation during buildup)
   o << fnCells << endl;                         // Number of Cells  (500)
   o << fnSampl << endl;                         // Number of MC events per cell in build-up (1000)
   o << fnBin << endl;                           // Number of bins in build-up (100)
   o << fOptRej << endl;                         // Wted events for OptRej=0; wt=1 for OptRej=1 (default)
   o << fOptDrive << endl;                       // (D=2) Option, type of Drive =1,2 for Variance,WtMax driven reduction
   o << fEvPerBin << endl;                       // Maximum events (equiv.) per bin in buid-up (1000) 
   o << fChat << endl;                           // Chat level
   o << fCompress << endl;                       // Compress XML file
   o << DoRegression() << endl;                  // regression foam created
   o << fCutNmin << endl;                        // split only cells with number of events > fNmin
   o << fNmin << endl;                           // min number of events in cell
   o << fCutRMSmin << endl;                      // split only cells with RMS > fRMSmin
   o << fRMSmin << endl;                         // min RMS in cell
   o << KernelToUInt(fKernel) << endl;           // used kernel for GetMvaValue()
   o << TargetSelectionToUInt(fTargetSelection) << endl; // used method for target selection

   // save range
   for (UInt_t i=0; i<Xmin.size(); i++) 
      o << std::setprecision(12) << Xmin.at(i) << endl;
   for (UInt_t i=0; i<Xmax.size(); i++) 
      o << std::setprecision(12) << Xmax.at(i) << endl;

   // write internal foam variables to stream
   if (DoRegression())
      o << *(foam[0]);
   else {
      if (fSigBgSeparated) {
         for(int i=0; i<FOAM_NUMBER; i++)
            o << *(foam[i]);
      }
      else
         o << *(foam[0]);
   }

   // write foams to xml file
   WriteFoamsToXMLFile();
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::AddWeightsXMLTo( void* parent ) const 
{
   // create XML output of PDEFoam method variables

   void* wght = gTools().xmlengine().NewChild(parent, 0, "Weights");
   gTools().AddAttr( wght, "SigBgSeparated",  fSigBgSeparated );
   gTools().AddAttr( wght, "Frac",            fFrac );
   gTools().AddAttr( wght, "DiscrErrCut",     fDiscrErrCut );
   gTools().AddAttr( wght, "VolFrac",         fVolFrac );
   gTools().AddAttr( wght, "nCells",          fnCells );
   gTools().AddAttr( wght, "nSampl",          fnSampl );
   gTools().AddAttr( wght, "nBin",            fnBin );
   gTools().AddAttr( wght, "OptRej",          fOptRej );
   gTools().AddAttr( wght, "OptDrive",        fOptDrive );
   gTools().AddAttr( wght, "EvPerBin",        fEvPerBin );
   gTools().AddAttr( wght, "Chat",            fChat );
   gTools().AddAttr( wght, "Compress",        fCompress );
   gTools().AddAttr( wght, "DoRegression",    DoRegression() );
   gTools().AddAttr( wght, "CutNmin",         fCutNmin );
   gTools().AddAttr( wght, "Nmin",            fNmin );
   gTools().AddAttr( wght, "CutRMSmin",       fCutRMSmin );
   gTools().AddAttr( wght, "RMSmin",          fRMSmin );
   gTools().AddAttr( wght, "Kernel",          KernelToUInt(fKernel) );
   gTools().AddAttr( wght, "TargetSelection", TargetSelectionToUInt(fTargetSelection) );
   
   // save foam borders Xmin[i], Xmax[i]
   void *xmin_wrap;
   for (UInt_t i=0; i<Xmin.size(); i++){
      xmin_wrap = gTools().xmlengine().NewChild( wght, 0, "Xmin" );
      gTools().AddAttr( xmin_wrap, "Index", i );
      gTools().AddAttr( xmin_wrap, "Value", Xmin.at(i) );
   }
   void *xmax_wrap;
   for (UInt_t i=0; i<Xmin.size(); i++){
      xmax_wrap = gTools().xmlengine().NewChild( wght, 0, "Xmax" );
      gTools().AddAttr( xmax_wrap, "Index", i );
      gTools().AddAttr( xmax_wrap, "Value", Xmax.at(i) );
   }

   // write internal foam variables
   void *foam_wrap = gTools().xmlengine().NewChild( wght, 0, foam[0]->GetFoamName().Data());
   foam[0]->AddXMLTo(foam_wrap);
   if((!DoRegression()) && fSigBgSeparated){
      void *foam_wrap2 = gTools().xmlengine().NewChild( wght, 0, foam[1]->GetFoamName().Data());
      foam[1]->AddXMLTo(foam_wrap2);
   }

   // write foams to xml file
   WriteFoamsToXMLFile();
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::WriteFoamsToXMLFile() const 
{
   // Write pure foams to xml file

   // fill variable names into foam
   FillVariableNamesToFoam();   

   TString rfname( GetWeightFileName() ); 

   // replace in case of txt weight file
   rfname.ReplaceAll( TString(".") + gConfig().GetIONames().fWeightFileExtension + ".txt", ".xml" );   

   // add foam indicator to distinguish from main weight file
   rfname.ReplaceAll( ".xml", "_foams.xml" );

   TXMLFile *rootFile = 0;
   if (fCompress) rootFile = new TXMLFile(rfname, "RECREATE", "foamfile", 1);
   else           rootFile = new TXMLFile(rfname, "RECREATE");


   foam[0]->Write(foam[0]->GetFoamName().Data());
   if (!DoRegression() && fSigBgSeparated) 
      foam[1]->Write(foam[1]->GetFoamName().Data());
   rootFile->Close();
   Log() << kINFO << "Foams written to XML file: " 
         << gTools().Color("lightblue") << rfname << gTools().Color("reset") << Endl;
};

//_______________________________________________________________________
void  TMVA::MethodPDEFoam::ReadWeightsFromStream( istream& istr )
{
   // read options and internal parameters

   istr >> fSigBgSeparated;                 // Seperate Sig and Bg, or not
   istr >> fFrac;                           // Fraction used for calc of Xmin, Xmax
   istr >> fDiscrErrCut;                    // cut on discrimant error
   istr >> fVolFrac;                        // volume fraction (used for density calculation during buildup)
   istr >> fnCells;                         // Number of Cells  (500)
   istr >> fnSampl;                         // Number of MC events per cell in build-up (1000)
   istr >> fnBin;                           // Number of bins in build-up (100)
   istr >> fOptRej;                         // Wted events for OptRej=0; wt=1 for OptRej=1 (default)
   istr >> fOptDrive;                       // (D=2) Option, type of Drive =1,2 for Variance,WtMax driven reduction
   istr >> fEvPerBin;                       // Maximum events (equiv.) per bin in buid-up (1000) 
   istr >> fChat;   
   istr >> fCompress;                       // compress XML file

   Bool_t regr;
   istr >> regr;                            // regression foam
   SetAnalysisType( (regr ? Types::kRegression : Types::kClassification ) );
   
   istr >> fCutNmin;                        // cut on minimal number of events in cell
   istr >> fNmin;
   istr >> fCutRMSmin;                      // cut on minimal RMS in cell
   istr >> fRMSmin;

   UInt_t ker = 0;
   istr >> ker;                             // used kernel for GetMvaValue()
   fKernel = UIntToKernel(ker);

   UInt_t ts = 0;
   istr >> ts;                             // used method for target selection
   fTargetSelection = UIntToTargetSelection(ts);


   // clear old range and prepare new range
   Xmin.clear();
   Xmax.clear();
   UInt_t kDim = GetNvar();
   if (fMultiTargetRegression)
      kDim += Data()->GetNTargets();

   for (UInt_t i=0; i<kDim; i++) {
      Xmin.push_back(0.);
      Xmax.push_back(0.);
   }
   // read range
   for (UInt_t i=0; i<kDim; i++) 
      istr >> Xmin.at(i);
   for (UInt_t i=0; i<kDim; i++) 
      istr >> Xmax.at(i);

   // create foam(s)
   if (DoRegression()) {
      if (fMultiTargetRegression) foam[0] = new PDEFoam("MultiTargetRegressionFoam");
      else                        foam[0] = new PDEFoam("MonoTargetRegressionFoam");
      istr >> *(foam[0]);
   }
   else {  
      TString foamcaption[2];
      foamcaption[0] = "SignalFoam";
      foamcaption[1] = "BgFoam";
      if (fSigBgSeparated) {
         for(int i=0; i<FOAM_NUMBER; i++) {
            foam[i] = new PDEFoam(foamcaption[i]);
            foam[i]->SetSignalClass    (fSignalClass);
            foam[i]->SetBackgroundClass(fBackgroundClass);
            istr >> *(foam[i]);
         }
      }
      else {
         foam[0] = new PDEFoam("DiscrFoam");
         foam[0]->SetSignalClass    (fSignalClass);
         foam[0]->SetBackgroundClass(fBackgroundClass);
         istr >> *(foam[0]);
      }
   }

   // read pure foams from xml file
   ReadFoamsFromXMLFile();
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::ReadWeightsFromXML( void* wghtnode ) 
{
   // read PDEFoam variables from xml weight file

   gTools().ReadAttr( wghtnode, "SigBgSeparated",  fSigBgSeparated );
   gTools().ReadAttr( wghtnode, "Frac",            fFrac );
   gTools().ReadAttr( wghtnode, "DiscrErrCut",     fDiscrErrCut );
   gTools().ReadAttr( wghtnode, "VolFrac",         fVolFrac );
   gTools().ReadAttr( wghtnode, "nCells",          fnCells );
   gTools().ReadAttr( wghtnode, "nSampl",          fnSampl );
   gTools().ReadAttr( wghtnode, "nBin",            fnBin );
   gTools().ReadAttr( wghtnode, "OptRej",          fOptRej );
   gTools().ReadAttr( wghtnode, "OptDrive",        fOptDrive );
   gTools().ReadAttr( wghtnode, "EvPerBin",        fEvPerBin );
   gTools().ReadAttr( wghtnode, "Chat",            fChat );
   gTools().ReadAttr( wghtnode, "Compress",        fCompress );
   Bool_t regr;
   gTools().ReadAttr( wghtnode, "DoRegression",    regr );
   SetAnalysisType( (regr ? Types::kRegression : Types::kClassification ) );
   gTools().ReadAttr( wghtnode, "CutNmin",         fCutNmin );
   gTools().ReadAttr( wghtnode, "Nmin",            fNmin );
   gTools().ReadAttr( wghtnode, "CutRMSmin",       fCutRMSmin );
   gTools().ReadAttr( wghtnode, "RMSmin",          fRMSmin );
   UInt_t ker = 0;
   gTools().ReadAttr( wghtnode, "Kernel",          ker );
   fKernel = UIntToKernel(ker);
   UInt_t ts = 0;
   gTools().ReadAttr( wghtnode, "TargetSelection", ts );
   fTargetSelection = UIntToTargetSelection(ts);
   
   // clear old range [Xmin, Xmax] and prepare new range for reading
   Xmin.clear();
   Xmax.clear();
   UInt_t kDim = GetNvar();
   if (fMultiTargetRegression)
      kDim += Data()->GetNTargets();

   for (UInt_t i=0; i<kDim; i++) {
      Xmin.push_back(0.);
      Xmax.push_back(0.);
   }

   // read foam range
   void *xmin_wrap = gTools().xmlengine().GetChild( wghtnode );
   for (UInt_t counter=0; counter<kDim; counter++) {
      UInt_t i=0;
      gTools().ReadAttr( xmin_wrap , "Index", i );
      if (i>=kDim)
         Log() << kFATAL << "dimension index out of range:" << i << Endl;
      gTools().ReadAttr( xmin_wrap , "Value", Xmin.at(i) );
      xmin_wrap = gTools().xmlengine().GetNext( xmin_wrap );
   }

   void *xmax_wrap = xmin_wrap;
   for (UInt_t counter=0; counter<kDim; counter++) {
      UInt_t i=0;
      gTools().ReadAttr( xmax_wrap , "Index", i );
      if (i>=kDim)
         Log() << kFATAL << "dimension index out of range:" << i << Endl;
      gTools().ReadAttr( xmax_wrap , "Value", Xmax.at(i) );
      xmax_wrap = gTools().xmlengine().GetNext( xmax_wrap );
   }

   // create foam(s) and read internal variables from xml file
   if (foam[0]) delete foam[0];
   if (foam[1]) delete foam[1];
   if (DoRegression()) {
      if (fMultiTargetRegression) {
         foam[0] = new PDEFoam("MultiTargetRegressionFoam");
      }else {
         foam[0] = new PDEFoam("MonoTargetRegressionFoam");
      }
      void *foam_wrap = xmax_wrap;
      foam[0]->ReadXML( foam_wrap );
   }
   else {  
      TString foamcaption[2];
      foamcaption[0] = "SignalFoam";
      foamcaption[1] = "BgFoam";
      if (fSigBgSeparated) {
         void *foam_wrap = xmax_wrap;
         for(int i=0; i<FOAM_NUMBER; i++) {
            foam[i] = new PDEFoam(foamcaption[i]);
            foam[i]->SetSignalClass    (fSignalClass);
            foam[i]->SetBackgroundClass(fBackgroundClass);
            foam[i]->ReadXML( foam_wrap );
            foam_wrap = gTools().xmlengine().GetNext( foam_wrap );
         }
      }
      else {
         foam[0] = new PDEFoam("DiscrFoam");
         foam[0]->SetSignalClass    (fSignalClass);
         foam[0]->SetBackgroundClass(fBackgroundClass);
         void *foam_wrap = xmax_wrap;
         foam[0]->ReadXML( foam_wrap );
      }
   }
   
   // read pure foams from xml file
   ReadFoamsFromXMLFile();
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::ReadFoamsFromXMLFile()
{
   // read pure foams from xml file

   TString rfname( GetWeightFileName() ); 

   // replace in case of txt weight file
   rfname.ReplaceAll( TString(".") + gConfig().GetIONames().fWeightFileExtension + ".txt", ".xml" );

   // add foam indicator to distinguish from main weight file
   rfname.ReplaceAll( ".xml", "_foams.xml" );

   Log() << kINFO << "Read foams from XML file: " << rfname << Endl;
   TXMLFile *rootFile = new TXMLFile( rfname, "READ" );
   if (rootFile->IsZombie()) Log() << kFATAL << "Cannot open XML file \"" << rfname << "\"" << Endl;

   // read foams from xml file
   if (DoRegression()) {
      if (fMultiTargetRegression) 
	 foam[0] = dynamic_cast<PDEFoam*>(rootFile->Get("MultiTargetRegressionFoam"));
      else                        
	 foam[0] = dynamic_cast<PDEFoam*>(rootFile->Get("MonoTargetRegressionFoam"));
   }
   else {
      if (fSigBgSeparated) {
         foam[0] = dynamic_cast<PDEFoam*>(rootFile->Get("SignalFoam"));
         foam[1] = dynamic_cast<PDEFoam*>(rootFile->Get("BgFoam"));
      }
      else 
	 foam[0] = dynamic_cast<PDEFoam*>(rootFile->Get("DiscrFoam"));
   }
   if (!foam[0] || (!DoRegression() && fSigBgSeparated && !foam[1]))
      Log() << kFATAL << "Could not load foam!" << Endl;
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::FillVariableNamesToFoam() const {
   // fill variable names into foam
   UInt_t nfoams=1;
   if (fSigBgSeparated && !DoRegression()) nfoams=2;
   for (UInt_t ifoam=0; ifoam<nfoams; ifoam++) {
      for (Int_t idim=0; idim<foam[ifoam]->GetTotDim(); idim++) {
         if(fMultiTargetRegression && (UInt_t)idim>=DataInfo().GetNVariables())
            foam[ifoam]->AddVariableName(DataInfo().GetTargetInfo(idim-DataInfo().GetNVariables()).GetExpression().Data());
         else
            foam[ifoam]->AddVariableName(DataInfo().GetVariableInfo(idim).GetExpression().Data());
      }
   }   
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::MakeClassSpecific( std::ostream& /*fout*/, const TString& /*className*/ ) const
{
   // write PDEFoam-specific classifier response
}

//_______________________________________________________________________
void TMVA::MethodPDEFoam::GetHelpMessage() const
{
   // provide help message
   Log() << Endl;
   Log() << gTools().Color("bold") << "--- Short description:" << gTools().Color("reset") << Endl;
   Log() << Endl;
   Log() << "PDE-Foam is a variation of the PDE-RS method using a self-adapting" << Endl;
   Log() << "binning method to divide the multi-dimensional variable space into a" << Endl;
   Log() << "finite number of hyper-rectangles (cells). The binning algorithm " << Endl;
   Log() << "adjusts the size and position of a predefined number of cells such" << Endl;
   Log() << "that the variance of the signal and background densities inside the " << Endl;
   Log() << "cells reaches a minimum" << Endl;
   Log() << Endl;
   Log() << gTools().Color("bold") << "--- Booking options:" << gTools().Color("reset") << Endl;
   Log() << Endl;
   Log() << "The PDEFoam classifier supports two different algorithms: " << Endl;
   Log() << Endl;
   Log() << "  (1) Create one foam, which stores the signal over background" << Endl;
   Log() << "      probability density.  During foam buildup the variance of the" << Endl;
   Log() << "      discriminant inside the cells is minimised." << Endl;
   Log() << Endl;
   Log() << "      Booking option:   SigBgSeparated=F" << Endl;
   Log() << Endl;
   Log() << "  (2) Create two separate foams, one for the signal events and one for" << Endl;
   Log() << "      background events.  During foam buildup the variance of the" << Endl;
   Log() << "      event density inside the cells is minimised separately for" << Endl;
   Log() << "      signal and background." << Endl;
   Log() << Endl;
   Log() << "      Booking option:   SigBgSeparated=T" << Endl;
   Log() << Endl;
   Log() << "The following options can be set (the listed values are found to be a" << Endl;
   Log() << "good starting point for most applications):" << Endl;
   Log() << Endl;
   Log() << "        SigBgSeparate   False   Separate Signal and Background" << Endl;
   Log() << "              TailCut   0.001   Fraction of outlier events that excluded" << Endl;
   Log() << "                                from the foam in each dimension " << Endl;
   Log() << "              VolFrac  0.0333   Volume fraction (used for density calculation" << Endl;
   Log() << "                                during foam build-up) " << Endl;
   Log() << "         nActiveCells     500   Maximal number of active cells in final foam " << Endl;
   Log() << "               nSampl    2000   Number of MC events per cell in foam build-up " << Endl;
   Log() << "                 nBin       5   Number of bins used in foam build-up " << Endl;
   Log() << "              CutNmin    True   Requirement for minimal number of events in cell " << Endl;
   Log() << "                 Nmin     100   Number of events in cell required to split cell" << Endl;
   Log() << "               Kernel    None   Kernel type used (possible valuses are: None," << Endl;
   Log() << "                                Gauss)" << Endl;
   Log() << "             Compress    True   Compress XML file " << Endl;
   Log() << Endl;
   Log() << "   Additional regression options:" << Endl;
   Log() << Endl;
   Log() << "MultiTargetRegression   False   Do regression with multiple targets " << Endl;
   Log() << "      TargetSelection    Mean   Target selection method (possible valuses are: " << Endl;
   Log() << "                                Mean, Mpv)" << Endl;
   Log() << Endl;
   Log() << gTools().Color("bold") << "--- Performance optimisation:" << gTools().Color("reset") << Endl;
   Log() << Endl;
   Log() << "The performance of the two implementations was found to be similar for" << Endl;
   Log() << "most examples studied. For the same number of cells per foam, the two-" << Endl;
   Log() << "foam option approximately doubles the amount of computer memory needed" << Endl;
   Log() << "during classification. For special cases where the event-density" << Endl;
   Log() << "distribution of signal and background events is very different, the" << Endl;
   Log() << "two-foam option was found to perform significantly better than the" << Endl;
   Log() << "option with only one foam." << Endl;
   Log() << Endl;
   Log() << "In order to gain better classification performance we recommend to set" << Endl;
   Log() << "the parameter 'nActiveCells' to a high value." << Endl;
   Log() << Endl;
   Log() << "The parameter 'VolFrac' specifies the size of the sampling volume" << Endl;
   Log() << "during foam buildup and should be tuned in order to achieve optimal" << Endl;
   Log() << "performance.  A larger box leads to a reduced statistical uncertainty" << Endl;
   Log() << "for small training samples and to smoother sampling. A smaller box on" << Endl;
   Log() << "the other hand increases the sensitivity to statistical fluctuations" << Endl;
   Log() << "in the training samples, but for sufficiently large training samples" << Endl;
   Log() << "it will result in a more precise local estimate of the sampled" << Endl;
   Log() << "density. In general, higher dimensional problems require larger box" << Endl;
   Log() << "sizes, due to the reduced average number of events per box volume. The" << Endl;
   Log() << "default value of 0.0333 was optimised for an example with 5" << Endl;
   Log() << "observables and training samples of the order of 50000 signal and" << Endl;
   Log() << "background events each." << Endl;
   Log() << Endl;
   Log() << "Furthermore kernel weighting can be activated, which will lead to an" << Endl;
   Log() << "additional performance improvement. Note that Gauss weighting will" << Endl;
   Log() << "significantly increase the response time of the method. LinNeighbors" << Endl;
   Log() << "weighting performs a linear interpolation with direct neighbor cells" << Endl;
   Log() << "for each dimension and is much faster than Gauss weighting." << Endl;
   Log() << Endl;
   Log() << "The classification results were found to be rather insensitive to the" << Endl;
   Log() << "values of the parameters 'nSamples' and 'nBin'." << Endl;
}
 MethodPDEFoam.cxx:1
 MethodPDEFoam.cxx:2
 MethodPDEFoam.cxx:3
 MethodPDEFoam.cxx:4
 MethodPDEFoam.cxx:5
 MethodPDEFoam.cxx:6
 MethodPDEFoam.cxx:7
 MethodPDEFoam.cxx:8
 MethodPDEFoam.cxx:9
 MethodPDEFoam.cxx:10
 MethodPDEFoam.cxx:11
 MethodPDEFoam.cxx:12
 MethodPDEFoam.cxx:13
 MethodPDEFoam.cxx:14
 MethodPDEFoam.cxx:15
 MethodPDEFoam.cxx:16
 MethodPDEFoam.cxx:17
 MethodPDEFoam.cxx:18
 MethodPDEFoam.cxx:19
 MethodPDEFoam.cxx:20
 MethodPDEFoam.cxx:21
 MethodPDEFoam.cxx:22
 MethodPDEFoam.cxx:23
 MethodPDEFoam.cxx:24
 MethodPDEFoam.cxx:25
 MethodPDEFoam.cxx:26
 MethodPDEFoam.cxx:27
 MethodPDEFoam.cxx:28
 MethodPDEFoam.cxx:29
 MethodPDEFoam.cxx:30
 MethodPDEFoam.cxx:31
 MethodPDEFoam.cxx:32
 MethodPDEFoam.cxx:33
 MethodPDEFoam.cxx:34
 MethodPDEFoam.cxx:35
 MethodPDEFoam.cxx:36
 MethodPDEFoam.cxx:37
 MethodPDEFoam.cxx:38
 MethodPDEFoam.cxx:39
 MethodPDEFoam.cxx:40
 MethodPDEFoam.cxx:41
 MethodPDEFoam.cxx:42
 MethodPDEFoam.cxx:43
 MethodPDEFoam.cxx:44
 MethodPDEFoam.cxx:45
 MethodPDEFoam.cxx:46
 MethodPDEFoam.cxx:47
 MethodPDEFoam.cxx:48
 MethodPDEFoam.cxx:49
 MethodPDEFoam.cxx:50
 MethodPDEFoam.cxx:51
 MethodPDEFoam.cxx:52
 MethodPDEFoam.cxx:53
 MethodPDEFoam.cxx:54
 MethodPDEFoam.cxx:55
 MethodPDEFoam.cxx:56
 MethodPDEFoam.cxx:57
 MethodPDEFoam.cxx:58
 MethodPDEFoam.cxx:59
 MethodPDEFoam.cxx:60
 MethodPDEFoam.cxx:61
 MethodPDEFoam.cxx:62
 MethodPDEFoam.cxx:63
 MethodPDEFoam.cxx:64
 MethodPDEFoam.cxx:65
 MethodPDEFoam.cxx:66
 MethodPDEFoam.cxx:67
 MethodPDEFoam.cxx:68
 MethodPDEFoam.cxx:69
 MethodPDEFoam.cxx:70
 MethodPDEFoam.cxx:71
 MethodPDEFoam.cxx:72
 MethodPDEFoam.cxx:73
 MethodPDEFoam.cxx:74
 MethodPDEFoam.cxx:75
 MethodPDEFoam.cxx:76
 MethodPDEFoam.cxx:77
 MethodPDEFoam.cxx:78
 MethodPDEFoam.cxx:79
 MethodPDEFoam.cxx:80
 MethodPDEFoam.cxx:81
 MethodPDEFoam.cxx:82
 MethodPDEFoam.cxx:83
 MethodPDEFoam.cxx:84
 MethodPDEFoam.cxx:85
 MethodPDEFoam.cxx:86
 MethodPDEFoam.cxx:87
 MethodPDEFoam.cxx:88
 MethodPDEFoam.cxx:89
 MethodPDEFoam.cxx:90
 MethodPDEFoam.cxx:91
 MethodPDEFoam.cxx:92
 MethodPDEFoam.cxx:93
 MethodPDEFoam.cxx:94
 MethodPDEFoam.cxx:95
 MethodPDEFoam.cxx:96
 MethodPDEFoam.cxx:97
 MethodPDEFoam.cxx:98
 MethodPDEFoam.cxx:99
 MethodPDEFoam.cxx:100
 MethodPDEFoam.cxx:101
 MethodPDEFoam.cxx:102
 MethodPDEFoam.cxx:103
 MethodPDEFoam.cxx:104
 MethodPDEFoam.cxx:105
 MethodPDEFoam.cxx:106
 MethodPDEFoam.cxx:107
 MethodPDEFoam.cxx:108
 MethodPDEFoam.cxx:109
 MethodPDEFoam.cxx:110
 MethodPDEFoam.cxx:111
 MethodPDEFoam.cxx:112
 MethodPDEFoam.cxx:113
 MethodPDEFoam.cxx:114
 MethodPDEFoam.cxx:115
 MethodPDEFoam.cxx:116
 MethodPDEFoam.cxx:117
 MethodPDEFoam.cxx:118
 MethodPDEFoam.cxx:119
 MethodPDEFoam.cxx:120
 MethodPDEFoam.cxx:121
 MethodPDEFoam.cxx:122
 MethodPDEFoam.cxx:123
 MethodPDEFoam.cxx:124
 MethodPDEFoam.cxx:125
 MethodPDEFoam.cxx:126
 MethodPDEFoam.cxx:127
 MethodPDEFoam.cxx:128
 MethodPDEFoam.cxx:129
 MethodPDEFoam.cxx:130
 MethodPDEFoam.cxx:131
 MethodPDEFoam.cxx:132
 MethodPDEFoam.cxx:133
 MethodPDEFoam.cxx:134
 MethodPDEFoam.cxx:135
 MethodPDEFoam.cxx:136
 MethodPDEFoam.cxx:137
 MethodPDEFoam.cxx:138
 MethodPDEFoam.cxx:139
 MethodPDEFoam.cxx:140
 MethodPDEFoam.cxx:141
 MethodPDEFoam.cxx:142
 MethodPDEFoam.cxx:143
 MethodPDEFoam.cxx:144
 MethodPDEFoam.cxx:145
 MethodPDEFoam.cxx:146
 MethodPDEFoam.cxx:147
 MethodPDEFoam.cxx:148
 MethodPDEFoam.cxx:149
 MethodPDEFoam.cxx:150
 MethodPDEFoam.cxx:151
 MethodPDEFoam.cxx:152
 MethodPDEFoam.cxx:153
 MethodPDEFoam.cxx:154
 MethodPDEFoam.cxx:155
 MethodPDEFoam.cxx:156
 MethodPDEFoam.cxx:157
 MethodPDEFoam.cxx:158
 MethodPDEFoam.cxx:159
 MethodPDEFoam.cxx:160
 MethodPDEFoam.cxx:161
 MethodPDEFoam.cxx:162
 MethodPDEFoam.cxx:163
 MethodPDEFoam.cxx:164
 MethodPDEFoam.cxx:165
 MethodPDEFoam.cxx:166
 MethodPDEFoam.cxx:167
 MethodPDEFoam.cxx:168
 MethodPDEFoam.cxx:169
 MethodPDEFoam.cxx:170
 MethodPDEFoam.cxx:171
 MethodPDEFoam.cxx:172
 MethodPDEFoam.cxx:173
 MethodPDEFoam.cxx:174
 MethodPDEFoam.cxx:175
 MethodPDEFoam.cxx:176
 MethodPDEFoam.cxx:177
 MethodPDEFoam.cxx:178
 MethodPDEFoam.cxx:179
 MethodPDEFoam.cxx:180
 MethodPDEFoam.cxx:181
 MethodPDEFoam.cxx:182
 MethodPDEFoam.cxx:183
 MethodPDEFoam.cxx:184
 MethodPDEFoam.cxx:185
 MethodPDEFoam.cxx:186
 MethodPDEFoam.cxx:187
 MethodPDEFoam.cxx:188
 MethodPDEFoam.cxx:189
 MethodPDEFoam.cxx:190
 MethodPDEFoam.cxx:191
 MethodPDEFoam.cxx:192
 MethodPDEFoam.cxx:193
 MethodPDEFoam.cxx:194
 MethodPDEFoam.cxx:195
 MethodPDEFoam.cxx:196
 MethodPDEFoam.cxx:197
 MethodPDEFoam.cxx:198
 MethodPDEFoam.cxx:199
 MethodPDEFoam.cxx:200
 MethodPDEFoam.cxx:201
 MethodPDEFoam.cxx:202
 MethodPDEFoam.cxx:203
 MethodPDEFoam.cxx:204
 MethodPDEFoam.cxx:205
 MethodPDEFoam.cxx:206
 MethodPDEFoam.cxx:207
 MethodPDEFoam.cxx:208
 MethodPDEFoam.cxx:209
 MethodPDEFoam.cxx:210
 MethodPDEFoam.cxx:211
 MethodPDEFoam.cxx:212
 MethodPDEFoam.cxx:213
 MethodPDEFoam.cxx:214
 MethodPDEFoam.cxx:215
 MethodPDEFoam.cxx:216
 MethodPDEFoam.cxx:217
 MethodPDEFoam.cxx:218
 MethodPDEFoam.cxx:219
 MethodPDEFoam.cxx:220
 MethodPDEFoam.cxx:221
 MethodPDEFoam.cxx:222
 MethodPDEFoam.cxx:223
 MethodPDEFoam.cxx:224
 MethodPDEFoam.cxx:225
 MethodPDEFoam.cxx:226
 MethodPDEFoam.cxx:227
 MethodPDEFoam.cxx:228
 MethodPDEFoam.cxx:229
 MethodPDEFoam.cxx:230
 MethodPDEFoam.cxx:231
 MethodPDEFoam.cxx:232
 MethodPDEFoam.cxx:233
 MethodPDEFoam.cxx:234
 MethodPDEFoam.cxx:235
 MethodPDEFoam.cxx:236
 MethodPDEFoam.cxx:237
 MethodPDEFoam.cxx:238
 MethodPDEFoam.cxx:239
 MethodPDEFoam.cxx:240
 MethodPDEFoam.cxx:241
 MethodPDEFoam.cxx:242
 MethodPDEFoam.cxx:243
 MethodPDEFoam.cxx:244
 MethodPDEFoam.cxx:245
 MethodPDEFoam.cxx:246
 MethodPDEFoam.cxx:247
 MethodPDEFoam.cxx:248
 MethodPDEFoam.cxx:249
 MethodPDEFoam.cxx:250
 MethodPDEFoam.cxx:251
 MethodPDEFoam.cxx:252
 MethodPDEFoam.cxx:253
 MethodPDEFoam.cxx:254
 MethodPDEFoam.cxx:255
 MethodPDEFoam.cxx:256
 MethodPDEFoam.cxx:257
 MethodPDEFoam.cxx:258
 MethodPDEFoam.cxx:259
 MethodPDEFoam.cxx:260
 MethodPDEFoam.cxx:261
 MethodPDEFoam.cxx:262
 MethodPDEFoam.cxx:263
 MethodPDEFoam.cxx:264
 MethodPDEFoam.cxx:265
 MethodPDEFoam.cxx:266
 MethodPDEFoam.cxx:267
 MethodPDEFoam.cxx:268
 MethodPDEFoam.cxx:269
 MethodPDEFoam.cxx:270
 MethodPDEFoam.cxx:271
 MethodPDEFoam.cxx:272
 MethodPDEFoam.cxx:273
 MethodPDEFoam.cxx:274
 MethodPDEFoam.cxx:275
 MethodPDEFoam.cxx:276
 MethodPDEFoam.cxx:277
 MethodPDEFoam.cxx:278
 MethodPDEFoam.cxx:279
 MethodPDEFoam.cxx:280
 MethodPDEFoam.cxx:281
 MethodPDEFoam.cxx:282
 MethodPDEFoam.cxx:283
 MethodPDEFoam.cxx:284
 MethodPDEFoam.cxx:285
 MethodPDEFoam.cxx:286
 MethodPDEFoam.cxx:287
 MethodPDEFoam.cxx:288
 MethodPDEFoam.cxx:289
 MethodPDEFoam.cxx:290
 MethodPDEFoam.cxx:291
 MethodPDEFoam.cxx:292
 MethodPDEFoam.cxx:293
 MethodPDEFoam.cxx:294
 MethodPDEFoam.cxx:295
 MethodPDEFoam.cxx:296
 MethodPDEFoam.cxx:297
 MethodPDEFoam.cxx:298
 MethodPDEFoam.cxx:299
 MethodPDEFoam.cxx:300
 MethodPDEFoam.cxx:301
 MethodPDEFoam.cxx:302
 MethodPDEFoam.cxx:303
 MethodPDEFoam.cxx:304
 MethodPDEFoam.cxx:305
 MethodPDEFoam.cxx:306
 MethodPDEFoam.cxx:307
 MethodPDEFoam.cxx:308
 MethodPDEFoam.cxx:309
 MethodPDEFoam.cxx:310
 MethodPDEFoam.cxx:311
 MethodPDEFoam.cxx:312
 MethodPDEFoam.cxx:313
 MethodPDEFoam.cxx:314
 MethodPDEFoam.cxx:315
 MethodPDEFoam.cxx:316
 MethodPDEFoam.cxx:317
 MethodPDEFoam.cxx:318
 MethodPDEFoam.cxx:319
 MethodPDEFoam.cxx:320
 MethodPDEFoam.cxx:321
 MethodPDEFoam.cxx:322
 MethodPDEFoam.cxx:323
 MethodPDEFoam.cxx:324
 MethodPDEFoam.cxx:325
 MethodPDEFoam.cxx:326
 MethodPDEFoam.cxx:327
 MethodPDEFoam.cxx:328
 MethodPDEFoam.cxx:329
 MethodPDEFoam.cxx:330
 MethodPDEFoam.cxx:331
 MethodPDEFoam.cxx:332
 MethodPDEFoam.cxx:333
 MethodPDEFoam.cxx:334
 MethodPDEFoam.cxx:335
 MethodPDEFoam.cxx:336
 MethodPDEFoam.cxx:337
 MethodPDEFoam.cxx:338
 MethodPDEFoam.cxx:339
 MethodPDEFoam.cxx:340
 MethodPDEFoam.cxx:341
 MethodPDEFoam.cxx:342
 MethodPDEFoam.cxx:343
 MethodPDEFoam.cxx:344
 MethodPDEFoam.cxx:345
 MethodPDEFoam.cxx:346
 MethodPDEFoam.cxx:347
 MethodPDEFoam.cxx:348
 MethodPDEFoam.cxx:349
 MethodPDEFoam.cxx:350
 MethodPDEFoam.cxx:351
 MethodPDEFoam.cxx:352
 MethodPDEFoam.cxx:353
 MethodPDEFoam.cxx:354
 MethodPDEFoam.cxx:355
 MethodPDEFoam.cxx:356
 MethodPDEFoam.cxx:357
 MethodPDEFoam.cxx:358
 MethodPDEFoam.cxx:359
 MethodPDEFoam.cxx:360
 MethodPDEFoam.cxx:361
 MethodPDEFoam.cxx:362
 MethodPDEFoam.cxx:363
 MethodPDEFoam.cxx:364
 MethodPDEFoam.cxx:365
 MethodPDEFoam.cxx:366
 MethodPDEFoam.cxx:367
 MethodPDEFoam.cxx:368
 MethodPDEFoam.cxx:369
 MethodPDEFoam.cxx:370
 MethodPDEFoam.cxx:371
 MethodPDEFoam.cxx:372
 MethodPDEFoam.cxx:373
 MethodPDEFoam.cxx:374
 MethodPDEFoam.cxx:375
 MethodPDEFoam.cxx:376
 MethodPDEFoam.cxx:377
 MethodPDEFoam.cxx:378
 MethodPDEFoam.cxx:379
 MethodPDEFoam.cxx:380
 MethodPDEFoam.cxx:381
 MethodPDEFoam.cxx:382
 MethodPDEFoam.cxx:383
 MethodPDEFoam.cxx:384
 MethodPDEFoam.cxx:385
 MethodPDEFoam.cxx:386
 MethodPDEFoam.cxx:387
 MethodPDEFoam.cxx:388
 MethodPDEFoam.cxx:389
 MethodPDEFoam.cxx:390
 MethodPDEFoam.cxx:391
 MethodPDEFoam.cxx:392
 MethodPDEFoam.cxx:393
 MethodPDEFoam.cxx:394
 MethodPDEFoam.cxx:395
 MethodPDEFoam.cxx:396
 MethodPDEFoam.cxx:397
 MethodPDEFoam.cxx:398
 MethodPDEFoam.cxx:399
 MethodPDEFoam.cxx:400
 MethodPDEFoam.cxx:401
 MethodPDEFoam.cxx:402
 MethodPDEFoam.cxx:403
 MethodPDEFoam.cxx:404
 MethodPDEFoam.cxx:405
 MethodPDEFoam.cxx:406
 MethodPDEFoam.cxx:407
 MethodPDEFoam.cxx:408
 MethodPDEFoam.cxx:409
 MethodPDEFoam.cxx:410
 MethodPDEFoam.cxx:411
 MethodPDEFoam.cxx:412
 MethodPDEFoam.cxx:413
 MethodPDEFoam.cxx:414
 MethodPDEFoam.cxx:415
 MethodPDEFoam.cxx:416
 MethodPDEFoam.cxx:417
 MethodPDEFoam.cxx:418
 MethodPDEFoam.cxx:419
 MethodPDEFoam.cxx:420
 MethodPDEFoam.cxx:421
 MethodPDEFoam.cxx:422
 MethodPDEFoam.cxx:423
 MethodPDEFoam.cxx:424
 MethodPDEFoam.cxx:425
 MethodPDEFoam.cxx:426
 MethodPDEFoam.cxx:427
 MethodPDEFoam.cxx:428
 MethodPDEFoam.cxx:429
 MethodPDEFoam.cxx:430
 MethodPDEFoam.cxx:431
 MethodPDEFoam.cxx:432
 MethodPDEFoam.cxx:433
 MethodPDEFoam.cxx:434
 MethodPDEFoam.cxx:435
 MethodPDEFoam.cxx:436
 MethodPDEFoam.cxx:437
 MethodPDEFoam.cxx:438
 MethodPDEFoam.cxx:439
 MethodPDEFoam.cxx:440
 MethodPDEFoam.cxx:441
 MethodPDEFoam.cxx:442
 MethodPDEFoam.cxx:443
 MethodPDEFoam.cxx:444
 MethodPDEFoam.cxx:445
 MethodPDEFoam.cxx:446
 MethodPDEFoam.cxx:447
 MethodPDEFoam.cxx:448
 MethodPDEFoam.cxx:449
 MethodPDEFoam.cxx:450
 MethodPDEFoam.cxx:451
 MethodPDEFoam.cxx:452
 MethodPDEFoam.cxx:453
 MethodPDEFoam.cxx:454
 MethodPDEFoam.cxx:455
 MethodPDEFoam.cxx:456
 MethodPDEFoam.cxx:457
 MethodPDEFoam.cxx:458
 MethodPDEFoam.cxx:459
 MethodPDEFoam.cxx:460
 MethodPDEFoam.cxx:461
 MethodPDEFoam.cxx:462
 MethodPDEFoam.cxx:463
 MethodPDEFoam.cxx:464
 MethodPDEFoam.cxx:465
 MethodPDEFoam.cxx:466
 MethodPDEFoam.cxx:467
 MethodPDEFoam.cxx:468
 MethodPDEFoam.cxx:469
 MethodPDEFoam.cxx:470
 MethodPDEFoam.cxx:471
 MethodPDEFoam.cxx:472
 MethodPDEFoam.cxx:473
 MethodPDEFoam.cxx:474
 MethodPDEFoam.cxx:475
 MethodPDEFoam.cxx:476
 MethodPDEFoam.cxx:477
 MethodPDEFoam.cxx:478
 MethodPDEFoam.cxx:479
 MethodPDEFoam.cxx:480
 MethodPDEFoam.cxx:481
 MethodPDEFoam.cxx:482
 MethodPDEFoam.cxx:483
 MethodPDEFoam.cxx:484
 MethodPDEFoam.cxx:485
 MethodPDEFoam.cxx:486
 MethodPDEFoam.cxx:487
 MethodPDEFoam.cxx:488
 MethodPDEFoam.cxx:489
 MethodPDEFoam.cxx:490
 MethodPDEFoam.cxx:491
 MethodPDEFoam.cxx:492
 MethodPDEFoam.cxx:493
 MethodPDEFoam.cxx:494
 MethodPDEFoam.cxx:495
 MethodPDEFoam.cxx:496
 MethodPDEFoam.cxx:497
 MethodPDEFoam.cxx:498
 MethodPDEFoam.cxx:499
 MethodPDEFoam.cxx:500
 MethodPDEFoam.cxx:501
 MethodPDEFoam.cxx:502
 MethodPDEFoam.cxx:503
 MethodPDEFoam.cxx:504
 MethodPDEFoam.cxx:505
 MethodPDEFoam.cxx:506
 MethodPDEFoam.cxx:507
 MethodPDEFoam.cxx:508
 MethodPDEFoam.cxx:509
 MethodPDEFoam.cxx:510
 MethodPDEFoam.cxx:511
 MethodPDEFoam.cxx:512
 MethodPDEFoam.cxx:513
 MethodPDEFoam.cxx:514
 MethodPDEFoam.cxx:515
 MethodPDEFoam.cxx:516
 MethodPDEFoam.cxx:517
 MethodPDEFoam.cxx:518
 MethodPDEFoam.cxx:519
 MethodPDEFoam.cxx:520
 MethodPDEFoam.cxx:521
 MethodPDEFoam.cxx:522
 MethodPDEFoam.cxx:523
 MethodPDEFoam.cxx:524
 MethodPDEFoam.cxx:525
 MethodPDEFoam.cxx:526
 MethodPDEFoam.cxx:527
 MethodPDEFoam.cxx:528
 MethodPDEFoam.cxx:529
 MethodPDEFoam.cxx:530
 MethodPDEFoam.cxx:531
 MethodPDEFoam.cxx:532
 MethodPDEFoam.cxx:533
 MethodPDEFoam.cxx:534
 MethodPDEFoam.cxx:535
 MethodPDEFoam.cxx:536
 MethodPDEFoam.cxx:537
 MethodPDEFoam.cxx:538
 MethodPDEFoam.cxx:539
 MethodPDEFoam.cxx:540
 MethodPDEFoam.cxx:541
 MethodPDEFoam.cxx:542
 MethodPDEFoam.cxx:543
 MethodPDEFoam.cxx:544
 MethodPDEFoam.cxx:545
 MethodPDEFoam.cxx:546
 MethodPDEFoam.cxx:547
 MethodPDEFoam.cxx:548
 MethodPDEFoam.cxx:549
 MethodPDEFoam.cxx:550
 MethodPDEFoam.cxx:551
 MethodPDEFoam.cxx:552
 MethodPDEFoam.cxx:553
 MethodPDEFoam.cxx:554
 MethodPDEFoam.cxx:555
 MethodPDEFoam.cxx:556
 MethodPDEFoam.cxx:557
 MethodPDEFoam.cxx:558
 MethodPDEFoam.cxx:559
 MethodPDEFoam.cxx:560
 MethodPDEFoam.cxx:561
 MethodPDEFoam.cxx:562
 MethodPDEFoam.cxx:563
 MethodPDEFoam.cxx:564
 MethodPDEFoam.cxx:565
 MethodPDEFoam.cxx:566
 MethodPDEFoam.cxx:567
 MethodPDEFoam.cxx:568
 MethodPDEFoam.cxx:569
 MethodPDEFoam.cxx:570
 MethodPDEFoam.cxx:571
 MethodPDEFoam.cxx:572
 MethodPDEFoam.cxx:573
 MethodPDEFoam.cxx:574
 MethodPDEFoam.cxx:575
 MethodPDEFoam.cxx:576
 MethodPDEFoam.cxx:577
 MethodPDEFoam.cxx:578
 MethodPDEFoam.cxx:579
 MethodPDEFoam.cxx:580
 MethodPDEFoam.cxx:581
 MethodPDEFoam.cxx:582
 MethodPDEFoam.cxx:583
 MethodPDEFoam.cxx:584
 MethodPDEFoam.cxx:585
 MethodPDEFoam.cxx:586
 MethodPDEFoam.cxx:587
 MethodPDEFoam.cxx:588
 MethodPDEFoam.cxx:589
 MethodPDEFoam.cxx:590
 MethodPDEFoam.cxx:591
 MethodPDEFoam.cxx:592
 MethodPDEFoam.cxx:593
 MethodPDEFoam.cxx:594
 MethodPDEFoam.cxx:595
 MethodPDEFoam.cxx:596
 MethodPDEFoam.cxx:597
 MethodPDEFoam.cxx:598
 MethodPDEFoam.cxx:599
 MethodPDEFoam.cxx:600
 MethodPDEFoam.cxx:601
 MethodPDEFoam.cxx:602
 MethodPDEFoam.cxx:603
 MethodPDEFoam.cxx:604
 MethodPDEFoam.cxx:605
 MethodPDEFoam.cxx:606
 MethodPDEFoam.cxx:607
 MethodPDEFoam.cxx:608
 MethodPDEFoam.cxx:609
 MethodPDEFoam.cxx:610
 MethodPDEFoam.cxx:611
 MethodPDEFoam.cxx:612
 MethodPDEFoam.cxx:613
 MethodPDEFoam.cxx:614
 MethodPDEFoam.cxx:615
 MethodPDEFoam.cxx:616
 MethodPDEFoam.cxx:617
 MethodPDEFoam.cxx:618
 MethodPDEFoam.cxx:619
 MethodPDEFoam.cxx:620
 MethodPDEFoam.cxx:621
 MethodPDEFoam.cxx:622
 MethodPDEFoam.cxx:623
 MethodPDEFoam.cxx:624
 MethodPDEFoam.cxx:625
 MethodPDEFoam.cxx:626
 MethodPDEFoam.cxx:627
 MethodPDEFoam.cxx:628
 MethodPDEFoam.cxx:629
 MethodPDEFoam.cxx:630
 MethodPDEFoam.cxx:631
 MethodPDEFoam.cxx:632
 MethodPDEFoam.cxx:633
 MethodPDEFoam.cxx:634
 MethodPDEFoam.cxx:635
 MethodPDEFoam.cxx:636
 MethodPDEFoam.cxx:637
 MethodPDEFoam.cxx:638
 MethodPDEFoam.cxx:639
 MethodPDEFoam.cxx:640
 MethodPDEFoam.cxx:641
 MethodPDEFoam.cxx:642
 MethodPDEFoam.cxx:643
 MethodPDEFoam.cxx:644
 MethodPDEFoam.cxx:645
 MethodPDEFoam.cxx:646
 MethodPDEFoam.cxx:647
 MethodPDEFoam.cxx:648
 MethodPDEFoam.cxx:649
 MethodPDEFoam.cxx:650
 MethodPDEFoam.cxx:651
 MethodPDEFoam.cxx:652
 MethodPDEFoam.cxx:653
 MethodPDEFoam.cxx:654
 MethodPDEFoam.cxx:655
 MethodPDEFoam.cxx:656
 MethodPDEFoam.cxx:657
 MethodPDEFoam.cxx:658
 MethodPDEFoam.cxx:659
 MethodPDEFoam.cxx:660
 MethodPDEFoam.cxx:661
 MethodPDEFoam.cxx:662
 MethodPDEFoam.cxx:663
 MethodPDEFoam.cxx:664
 MethodPDEFoam.cxx:665
 MethodPDEFoam.cxx:666
 MethodPDEFoam.cxx:667
 MethodPDEFoam.cxx:668
 MethodPDEFoam.cxx:669
 MethodPDEFoam.cxx:670
 MethodPDEFoam.cxx:671
 MethodPDEFoam.cxx:672
 MethodPDEFoam.cxx:673
 MethodPDEFoam.cxx:674
 MethodPDEFoam.cxx:675
 MethodPDEFoam.cxx:676
 MethodPDEFoam.cxx:677
 MethodPDEFoam.cxx:678
 MethodPDEFoam.cxx:679
 MethodPDEFoam.cxx:680
 MethodPDEFoam.cxx:681
 MethodPDEFoam.cxx:682
 MethodPDEFoam.cxx:683
 MethodPDEFoam.cxx:684
 MethodPDEFoam.cxx:685
 MethodPDEFoam.cxx:686
 MethodPDEFoam.cxx:687
 MethodPDEFoam.cxx:688
 MethodPDEFoam.cxx:689
 MethodPDEFoam.cxx:690
 MethodPDEFoam.cxx:691
 MethodPDEFoam.cxx:692
 MethodPDEFoam.cxx:693
 MethodPDEFoam.cxx:694
 MethodPDEFoam.cxx:695
 MethodPDEFoam.cxx:696
 MethodPDEFoam.cxx:697
 MethodPDEFoam.cxx:698
 MethodPDEFoam.cxx:699
 MethodPDEFoam.cxx:700
 MethodPDEFoam.cxx:701
 MethodPDEFoam.cxx:702
 MethodPDEFoam.cxx:703
 MethodPDEFoam.cxx:704
 MethodPDEFoam.cxx:705
 MethodPDEFoam.cxx:706
 MethodPDEFoam.cxx:707
 MethodPDEFoam.cxx:708
 MethodPDEFoam.cxx:709
 MethodPDEFoam.cxx:710
 MethodPDEFoam.cxx:711
 MethodPDEFoam.cxx:712
 MethodPDEFoam.cxx:713
 MethodPDEFoam.cxx:714
 MethodPDEFoam.cxx:715
 MethodPDEFoam.cxx:716
 MethodPDEFoam.cxx:717
 MethodPDEFoam.cxx:718
 MethodPDEFoam.cxx:719
 MethodPDEFoam.cxx:720
 MethodPDEFoam.cxx:721
 MethodPDEFoam.cxx:722
 MethodPDEFoam.cxx:723
 MethodPDEFoam.cxx:724
 MethodPDEFoam.cxx:725
 MethodPDEFoam.cxx:726
 MethodPDEFoam.cxx:727
 MethodPDEFoam.cxx:728
 MethodPDEFoam.cxx:729
 MethodPDEFoam.cxx:730
 MethodPDEFoam.cxx:731
 MethodPDEFoam.cxx:732
 MethodPDEFoam.cxx:733
 MethodPDEFoam.cxx:734
 MethodPDEFoam.cxx:735
 MethodPDEFoam.cxx:736
 MethodPDEFoam.cxx:737
 MethodPDEFoam.cxx:738
 MethodPDEFoam.cxx:739
 MethodPDEFoam.cxx:740
 MethodPDEFoam.cxx:741
 MethodPDEFoam.cxx:742
 MethodPDEFoam.cxx:743
 MethodPDEFoam.cxx:744
 MethodPDEFoam.cxx:745
 MethodPDEFoam.cxx:746
 MethodPDEFoam.cxx:747
 MethodPDEFoam.cxx:748
 MethodPDEFoam.cxx:749
 MethodPDEFoam.cxx:750
 MethodPDEFoam.cxx:751
 MethodPDEFoam.cxx:752
 MethodPDEFoam.cxx:753
 MethodPDEFoam.cxx:754
 MethodPDEFoam.cxx:755
 MethodPDEFoam.cxx:756
 MethodPDEFoam.cxx:757
 MethodPDEFoam.cxx:758
 MethodPDEFoam.cxx:759
 MethodPDEFoam.cxx:760
 MethodPDEFoam.cxx:761
 MethodPDEFoam.cxx:762
 MethodPDEFoam.cxx:763
 MethodPDEFoam.cxx:764
 MethodPDEFoam.cxx:765
 MethodPDEFoam.cxx:766
 MethodPDEFoam.cxx:767
 MethodPDEFoam.cxx:768
 MethodPDEFoam.cxx:769
 MethodPDEFoam.cxx:770
 MethodPDEFoam.cxx:771
 MethodPDEFoam.cxx:772
 MethodPDEFoam.cxx:773
 MethodPDEFoam.cxx:774
 MethodPDEFoam.cxx:775
 MethodPDEFoam.cxx:776
 MethodPDEFoam.cxx:777
 MethodPDEFoam.cxx:778
 MethodPDEFoam.cxx:779
 MethodPDEFoam.cxx:780
 MethodPDEFoam.cxx:781
 MethodPDEFoam.cxx:782
 MethodPDEFoam.cxx:783
 MethodPDEFoam.cxx:784
 MethodPDEFoam.cxx:785
 MethodPDEFoam.cxx:786
 MethodPDEFoam.cxx:787
 MethodPDEFoam.cxx:788
 MethodPDEFoam.cxx:789
 MethodPDEFoam.cxx:790
 MethodPDEFoam.cxx:791
 MethodPDEFoam.cxx:792
 MethodPDEFoam.cxx:793
 MethodPDEFoam.cxx:794
 MethodPDEFoam.cxx:795
 MethodPDEFoam.cxx:796
 MethodPDEFoam.cxx:797
 MethodPDEFoam.cxx:798
 MethodPDEFoam.cxx:799
 MethodPDEFoam.cxx:800
 MethodPDEFoam.cxx:801
 MethodPDEFoam.cxx:802
 MethodPDEFoam.cxx:803
 MethodPDEFoam.cxx:804
 MethodPDEFoam.cxx:805
 MethodPDEFoam.cxx:806
 MethodPDEFoam.cxx:807
 MethodPDEFoam.cxx:808
 MethodPDEFoam.cxx:809
 MethodPDEFoam.cxx:810
 MethodPDEFoam.cxx:811
 MethodPDEFoam.cxx:812
 MethodPDEFoam.cxx:813
 MethodPDEFoam.cxx:814
 MethodPDEFoam.cxx:815
 MethodPDEFoam.cxx:816
 MethodPDEFoam.cxx:817
 MethodPDEFoam.cxx:818
 MethodPDEFoam.cxx:819
 MethodPDEFoam.cxx:820
 MethodPDEFoam.cxx:821
 MethodPDEFoam.cxx:822
 MethodPDEFoam.cxx:823
 MethodPDEFoam.cxx:824
 MethodPDEFoam.cxx:825
 MethodPDEFoam.cxx:826
 MethodPDEFoam.cxx:827
 MethodPDEFoam.cxx:828
 MethodPDEFoam.cxx:829
 MethodPDEFoam.cxx:830
 MethodPDEFoam.cxx:831
 MethodPDEFoam.cxx:832
 MethodPDEFoam.cxx:833
 MethodPDEFoam.cxx:834
 MethodPDEFoam.cxx:835
 MethodPDEFoam.cxx:836
 MethodPDEFoam.cxx:837
 MethodPDEFoam.cxx:838
 MethodPDEFoam.cxx:839
 MethodPDEFoam.cxx:840
 MethodPDEFoam.cxx:841
 MethodPDEFoam.cxx:842
 MethodPDEFoam.cxx:843
 MethodPDEFoam.cxx:844
 MethodPDEFoam.cxx:845
 MethodPDEFoam.cxx:846
 MethodPDEFoam.cxx:847
 MethodPDEFoam.cxx:848
 MethodPDEFoam.cxx:849
 MethodPDEFoam.cxx:850
 MethodPDEFoam.cxx:851
 MethodPDEFoam.cxx:852
 MethodPDEFoam.cxx:853
 MethodPDEFoam.cxx:854
 MethodPDEFoam.cxx:855
 MethodPDEFoam.cxx:856
 MethodPDEFoam.cxx:857
 MethodPDEFoam.cxx:858
 MethodPDEFoam.cxx:859
 MethodPDEFoam.cxx:860
 MethodPDEFoam.cxx:861
 MethodPDEFoam.cxx:862
 MethodPDEFoam.cxx:863
 MethodPDEFoam.cxx:864
 MethodPDEFoam.cxx:865
 MethodPDEFoam.cxx:866
 MethodPDEFoam.cxx:867
 MethodPDEFoam.cxx:868
 MethodPDEFoam.cxx:869
 MethodPDEFoam.cxx:870
 MethodPDEFoam.cxx:871
 MethodPDEFoam.cxx:872
 MethodPDEFoam.cxx:873
 MethodPDEFoam.cxx:874
 MethodPDEFoam.cxx:875
 MethodPDEFoam.cxx:876
 MethodPDEFoam.cxx:877
 MethodPDEFoam.cxx:878
 MethodPDEFoam.cxx:879
 MethodPDEFoam.cxx:880
 MethodPDEFoam.cxx:881
 MethodPDEFoam.cxx:882
 MethodPDEFoam.cxx:883
 MethodPDEFoam.cxx:884
 MethodPDEFoam.cxx:885
 MethodPDEFoam.cxx:886
 MethodPDEFoam.cxx:887
 MethodPDEFoam.cxx:888
 MethodPDEFoam.cxx:889
 MethodPDEFoam.cxx:890
 MethodPDEFoam.cxx:891
 MethodPDEFoam.cxx:892
 MethodPDEFoam.cxx:893
 MethodPDEFoam.cxx:894
 MethodPDEFoam.cxx:895
 MethodPDEFoam.cxx:896
 MethodPDEFoam.cxx:897
 MethodPDEFoam.cxx:898
 MethodPDEFoam.cxx:899
 MethodPDEFoam.cxx:900
 MethodPDEFoam.cxx:901
 MethodPDEFoam.cxx:902
 MethodPDEFoam.cxx:903
 MethodPDEFoam.cxx:904
 MethodPDEFoam.cxx:905
 MethodPDEFoam.cxx:906
 MethodPDEFoam.cxx:907
 MethodPDEFoam.cxx:908
 MethodPDEFoam.cxx:909
 MethodPDEFoam.cxx:910
 MethodPDEFoam.cxx:911
 MethodPDEFoam.cxx:912
 MethodPDEFoam.cxx:913
 MethodPDEFoam.cxx:914
 MethodPDEFoam.cxx:915
 MethodPDEFoam.cxx:916
 MethodPDEFoam.cxx:917
 MethodPDEFoam.cxx:918
 MethodPDEFoam.cxx:919
 MethodPDEFoam.cxx:920
 MethodPDEFoam.cxx:921
 MethodPDEFoam.cxx:922
 MethodPDEFoam.cxx:923
 MethodPDEFoam.cxx:924
 MethodPDEFoam.cxx:925
 MethodPDEFoam.cxx:926
 MethodPDEFoam.cxx:927
 MethodPDEFoam.cxx:928
 MethodPDEFoam.cxx:929
 MethodPDEFoam.cxx:930
 MethodPDEFoam.cxx:931
 MethodPDEFoam.cxx:932
 MethodPDEFoam.cxx:933
 MethodPDEFoam.cxx:934
 MethodPDEFoam.cxx:935
 MethodPDEFoam.cxx:936
 MethodPDEFoam.cxx:937
 MethodPDEFoam.cxx:938
 MethodPDEFoam.cxx:939
 MethodPDEFoam.cxx:940
 MethodPDEFoam.cxx:941
 MethodPDEFoam.cxx:942
 MethodPDEFoam.cxx:943
 MethodPDEFoam.cxx:944
 MethodPDEFoam.cxx:945
 MethodPDEFoam.cxx:946
 MethodPDEFoam.cxx:947
 MethodPDEFoam.cxx:948
 MethodPDEFoam.cxx:949
 MethodPDEFoam.cxx:950
 MethodPDEFoam.cxx:951
 MethodPDEFoam.cxx:952
 MethodPDEFoam.cxx:953
 MethodPDEFoam.cxx:954
 MethodPDEFoam.cxx:955
 MethodPDEFoam.cxx:956
 MethodPDEFoam.cxx:957
 MethodPDEFoam.cxx:958
 MethodPDEFoam.cxx:959
 MethodPDEFoam.cxx:960
 MethodPDEFoam.cxx:961
 MethodPDEFoam.cxx:962
 MethodPDEFoam.cxx:963
 MethodPDEFoam.cxx:964
 MethodPDEFoam.cxx:965
 MethodPDEFoam.cxx:966
 MethodPDEFoam.cxx:967
 MethodPDEFoam.cxx:968
 MethodPDEFoam.cxx:969
 MethodPDEFoam.cxx:970
 MethodPDEFoam.cxx:971
 MethodPDEFoam.cxx:972
 MethodPDEFoam.cxx:973
 MethodPDEFoam.cxx:974
 MethodPDEFoam.cxx:975
 MethodPDEFoam.cxx:976
 MethodPDEFoam.cxx:977
 MethodPDEFoam.cxx:978
 MethodPDEFoam.cxx:979
 MethodPDEFoam.cxx:980
 MethodPDEFoam.cxx:981
 MethodPDEFoam.cxx:982
 MethodPDEFoam.cxx:983
 MethodPDEFoam.cxx:984
 MethodPDEFoam.cxx:985
 MethodPDEFoam.cxx:986
 MethodPDEFoam.cxx:987
 MethodPDEFoam.cxx:988
 MethodPDEFoam.cxx:989
 MethodPDEFoam.cxx:990
 MethodPDEFoam.cxx:991
 MethodPDEFoam.cxx:992
 MethodPDEFoam.cxx:993
 MethodPDEFoam.cxx:994
 MethodPDEFoam.cxx:995
 MethodPDEFoam.cxx:996
 MethodPDEFoam.cxx:997
 MethodPDEFoam.cxx:998
 MethodPDEFoam.cxx:999
 MethodPDEFoam.cxx:1000
 MethodPDEFoam.cxx:1001
 MethodPDEFoam.cxx:1002
 MethodPDEFoam.cxx:1003
 MethodPDEFoam.cxx:1004
 MethodPDEFoam.cxx:1005
 MethodPDEFoam.cxx:1006
 MethodPDEFoam.cxx:1007
 MethodPDEFoam.cxx:1008
 MethodPDEFoam.cxx:1009
 MethodPDEFoam.cxx:1010
 MethodPDEFoam.cxx:1011
 MethodPDEFoam.cxx:1012
 MethodPDEFoam.cxx:1013
 MethodPDEFoam.cxx:1014
 MethodPDEFoam.cxx:1015
 MethodPDEFoam.cxx:1016
 MethodPDEFoam.cxx:1017
 MethodPDEFoam.cxx:1018
 MethodPDEFoam.cxx:1019
 MethodPDEFoam.cxx:1020
 MethodPDEFoam.cxx:1021
 MethodPDEFoam.cxx:1022
 MethodPDEFoam.cxx:1023
 MethodPDEFoam.cxx:1024
 MethodPDEFoam.cxx:1025
 MethodPDEFoam.cxx:1026
 MethodPDEFoam.cxx:1027
 MethodPDEFoam.cxx:1028
 MethodPDEFoam.cxx:1029
 MethodPDEFoam.cxx:1030
 MethodPDEFoam.cxx:1031
 MethodPDEFoam.cxx:1032
 MethodPDEFoam.cxx:1033
 MethodPDEFoam.cxx:1034
 MethodPDEFoam.cxx:1035
 MethodPDEFoam.cxx:1036
 MethodPDEFoam.cxx:1037
 MethodPDEFoam.cxx:1038
 MethodPDEFoam.cxx:1039
 MethodPDEFoam.cxx:1040
 MethodPDEFoam.cxx:1041
 MethodPDEFoam.cxx:1042
 MethodPDEFoam.cxx:1043
 MethodPDEFoam.cxx:1044
 MethodPDEFoam.cxx:1045
 MethodPDEFoam.cxx:1046
 MethodPDEFoam.cxx:1047
 MethodPDEFoam.cxx:1048
 MethodPDEFoam.cxx:1049
 MethodPDEFoam.cxx:1050
 MethodPDEFoam.cxx:1051
 MethodPDEFoam.cxx:1052
 MethodPDEFoam.cxx:1053
 MethodPDEFoam.cxx:1054
 MethodPDEFoam.cxx:1055
 MethodPDEFoam.cxx:1056
 MethodPDEFoam.cxx:1057
 MethodPDEFoam.cxx:1058
 MethodPDEFoam.cxx:1059
 MethodPDEFoam.cxx:1060
 MethodPDEFoam.cxx:1061
 MethodPDEFoam.cxx:1062
 MethodPDEFoam.cxx:1063
 MethodPDEFoam.cxx:1064
 MethodPDEFoam.cxx:1065
 MethodPDEFoam.cxx:1066
 MethodPDEFoam.cxx:1067
 MethodPDEFoam.cxx:1068
 MethodPDEFoam.cxx:1069
 MethodPDEFoam.cxx:1070
 MethodPDEFoam.cxx:1071
 MethodPDEFoam.cxx:1072
 MethodPDEFoam.cxx:1073
 MethodPDEFoam.cxx:1074
 MethodPDEFoam.cxx:1075
 MethodPDEFoam.cxx:1076
 MethodPDEFoam.cxx:1077
 MethodPDEFoam.cxx:1078
 MethodPDEFoam.cxx:1079
 MethodPDEFoam.cxx:1080
 MethodPDEFoam.cxx:1081
 MethodPDEFoam.cxx:1082
 MethodPDEFoam.cxx:1083
 MethodPDEFoam.cxx:1084
 MethodPDEFoam.cxx:1085
 MethodPDEFoam.cxx:1086
 MethodPDEFoam.cxx:1087
 MethodPDEFoam.cxx:1088
 MethodPDEFoam.cxx:1089
 MethodPDEFoam.cxx:1090
 MethodPDEFoam.cxx:1091
 MethodPDEFoam.cxx:1092
 MethodPDEFoam.cxx:1093
 MethodPDEFoam.cxx:1094
 MethodPDEFoam.cxx:1095
 MethodPDEFoam.cxx:1096
 MethodPDEFoam.cxx:1097
 MethodPDEFoam.cxx:1098
 MethodPDEFoam.cxx:1099
 MethodPDEFoam.cxx:1100
 MethodPDEFoam.cxx:1101
 MethodPDEFoam.cxx:1102
 MethodPDEFoam.cxx:1103
 MethodPDEFoam.cxx:1104
 MethodPDEFoam.cxx:1105
 MethodPDEFoam.cxx:1106
 MethodPDEFoam.cxx:1107
 MethodPDEFoam.cxx:1108
 MethodPDEFoam.cxx:1109
 MethodPDEFoam.cxx:1110
 MethodPDEFoam.cxx:1111
 MethodPDEFoam.cxx:1112
 MethodPDEFoam.cxx:1113
 MethodPDEFoam.cxx:1114
 MethodPDEFoam.cxx:1115
 MethodPDEFoam.cxx:1116
 MethodPDEFoam.cxx:1117
 MethodPDEFoam.cxx:1118
 MethodPDEFoam.cxx:1119
 MethodPDEFoam.cxx:1120
 MethodPDEFoam.cxx:1121
 MethodPDEFoam.cxx:1122
 MethodPDEFoam.cxx:1123
 MethodPDEFoam.cxx:1124
 MethodPDEFoam.cxx:1125
 MethodPDEFoam.cxx:1126
 MethodPDEFoam.cxx:1127
 MethodPDEFoam.cxx:1128
 MethodPDEFoam.cxx:1129
 MethodPDEFoam.cxx:1130
 MethodPDEFoam.cxx:1131
 MethodPDEFoam.cxx:1132
 MethodPDEFoam.cxx:1133
 MethodPDEFoam.cxx:1134
 MethodPDEFoam.cxx:1135
 MethodPDEFoam.cxx:1136
 MethodPDEFoam.cxx:1137
 MethodPDEFoam.cxx:1138
 MethodPDEFoam.cxx:1139
 MethodPDEFoam.cxx:1140
 MethodPDEFoam.cxx:1141
 MethodPDEFoam.cxx:1142
 MethodPDEFoam.cxx:1143
 MethodPDEFoam.cxx:1144
 MethodPDEFoam.cxx:1145
 MethodPDEFoam.cxx:1146
 MethodPDEFoam.cxx:1147
 MethodPDEFoam.cxx:1148
 MethodPDEFoam.cxx:1149
 MethodPDEFoam.cxx:1150
 MethodPDEFoam.cxx:1151
 MethodPDEFoam.cxx:1152
 MethodPDEFoam.cxx:1153
 MethodPDEFoam.cxx:1154
 MethodPDEFoam.cxx:1155
 MethodPDEFoam.cxx:1156
 MethodPDEFoam.cxx:1157
 MethodPDEFoam.cxx:1158