#include <cmath>
#ifndef ROOT_TMVA_PDEFoamEventDensity
#include "TMVA/PDEFoamEventDensity.h"
#endif
ClassImp(TMVA::PDEFoamEventDensity)
TMVA::PDEFoamEventDensity::PDEFoamEventDensity()
: PDEFoamDensityBase()
{}
TMVA::PDEFoamEventDensity::PDEFoamEventDensity(std::vector<Double_t> box)
: PDEFoamDensityBase(box)
{
}
TMVA::PDEFoamEventDensity::PDEFoamEventDensity(const PDEFoamEventDensity &distr)
: PDEFoamDensityBase(distr)
{
}
Double_t TMVA::PDEFoamEventDensity::Density(std::vector<Double_t> &Xarg, Double_t &event_density)
{
if (!fBst)
Log() << kFATAL << "<PDEFoamEventDensity::Density()> Binary tree not found!" << Endl;
std::vector<Double_t> lb(GetBox().size());
std::vector<Double_t> ub(GetBox().size());
const Double_t probevolume_inv = 1.0 / GetBoxVolume();
for (UInt_t idim = 0; idim < GetBox().size(); ++idim) {
lb[idim] = Xarg[idim] - GetBox().at(idim) / 2.0;
ub[idim] = Xarg[idim] + GetBox().at(idim) / 2.0;
}
TMVA::Volume volume(&lb, &ub);
std::vector<const TMVA::BinarySearchTreeNode*> nodes;
Double_t SumOfWeights = fBst->SearchVolume(&volume, &nodes);
event_density = nodes.size() * probevolume_inv;
return (SumOfWeights + 0.1) * probevolume_inv;
}
PDEFoamEventDensity.cxx:1 PDEFoamEventDensity.cxx:2 PDEFoamEventDensity.cxx:3 PDEFoamEventDensity.cxx:4 PDEFoamEventDensity.cxx:5 PDEFoamEventDensity.cxx:6 PDEFoamEventDensity.cxx:7 PDEFoamEventDensity.cxx:8 PDEFoamEventDensity.cxx:9 PDEFoamEventDensity.cxx:10 PDEFoamEventDensity.cxx:11 PDEFoamEventDensity.cxx:12 PDEFoamEventDensity.cxx:13 PDEFoamEventDensity.cxx:14 PDEFoamEventDensity.cxx:15 PDEFoamEventDensity.cxx:16 PDEFoamEventDensity.cxx:17 PDEFoamEventDensity.cxx:18 PDEFoamEventDensity.cxx:19 PDEFoamEventDensity.cxx:20 PDEFoamEventDensity.cxx:21 PDEFoamEventDensity.cxx:22 PDEFoamEventDensity.cxx:23 PDEFoamEventDensity.cxx:24 PDEFoamEventDensity.cxx:25 PDEFoamEventDensity.cxx:26 PDEFoamEventDensity.cxx:27 PDEFoamEventDensity.cxx:28 PDEFoamEventDensity.cxx:29 PDEFoamEventDensity.cxx:30 PDEFoamEventDensity.cxx:31 PDEFoamEventDensity.cxx:32 PDEFoamEventDensity.cxx:33 PDEFoamEventDensity.cxx:34 PDEFoamEventDensity.cxx:35 PDEFoamEventDensity.cxx:36 PDEFoamEventDensity.cxx:37 PDEFoamEventDensity.cxx:38 PDEFoamEventDensity.cxx:39 PDEFoamEventDensity.cxx:40 PDEFoamEventDensity.cxx:41 PDEFoamEventDensity.cxx:42 PDEFoamEventDensity.cxx:43 PDEFoamEventDensity.cxx:44 PDEFoamEventDensity.cxx:45 PDEFoamEventDensity.cxx:46 PDEFoamEventDensity.cxx:47 PDEFoamEventDensity.cxx:48 PDEFoamEventDensity.cxx:49 PDEFoamEventDensity.cxx:50 PDEFoamEventDensity.cxx:51 PDEFoamEventDensity.cxx:52 PDEFoamEventDensity.cxx:53 PDEFoamEventDensity.cxx:54 PDEFoamEventDensity.cxx:55 PDEFoamEventDensity.cxx:56 PDEFoamEventDensity.cxx:57 PDEFoamEventDensity.cxx:58 PDEFoamEventDensity.cxx:59 PDEFoamEventDensity.cxx:60 PDEFoamEventDensity.cxx:61 PDEFoamEventDensity.cxx:62 PDEFoamEventDensity.cxx:63 PDEFoamEventDensity.cxx:64 PDEFoamEventDensity.cxx:65 PDEFoamEventDensity.cxx:66 PDEFoamEventDensity.cxx:67 PDEFoamEventDensity.cxx:68 PDEFoamEventDensity.cxx:69 PDEFoamEventDensity.cxx:70 PDEFoamEventDensity.cxx:71 PDEFoamEventDensity.cxx:72 PDEFoamEventDensity.cxx:73 PDEFoamEventDensity.cxx:74 PDEFoamEventDensity.cxx:75 PDEFoamEventDensity.cxx:76 PDEFoamEventDensity.cxx:77 PDEFoamEventDensity.cxx:78 PDEFoamEventDensity.cxx:79 PDEFoamEventDensity.cxx:80 PDEFoamEventDensity.cxx:81 PDEFoamEventDensity.cxx:82 PDEFoamEventDensity.cxx:83 PDEFoamEventDensity.cxx:84 PDEFoamEventDensity.cxx:85 PDEFoamEventDensity.cxx:86 PDEFoamEventDensity.cxx:87 PDEFoamEventDensity.cxx:88 PDEFoamEventDensity.cxx:89 PDEFoamEventDensity.cxx:90 PDEFoamEventDensity.cxx:91 PDEFoamEventDensity.cxx:92 PDEFoamEventDensity.cxx:93 PDEFoamEventDensity.cxx:94 PDEFoamEventDensity.cxx:95 PDEFoamEventDensity.cxx:96 PDEFoamEventDensity.cxx:97 PDEFoamEventDensity.cxx:98 PDEFoamEventDensity.cxx:99 PDEFoamEventDensity.cxx:100 PDEFoamEventDensity.cxx:101 PDEFoamEventDensity.cxx:102 PDEFoamEventDensity.cxx:103 PDEFoamEventDensity.cxx:104 PDEFoamEventDensity.cxx:105 PDEFoamEventDensity.cxx:106 PDEFoamEventDensity.cxx:107 PDEFoamEventDensity.cxx:108 PDEFoamEventDensity.cxx:109 PDEFoamEventDensity.cxx:110 PDEFoamEventDensity.cxx:111 PDEFoamEventDensity.cxx:112 PDEFoamEventDensity.cxx:113 PDEFoamEventDensity.cxx:114 PDEFoamEventDensity.cxx:115 PDEFoamEventDensity.cxx:116 PDEFoamEventDensity.cxx:117 PDEFoamEventDensity.cxx:118 PDEFoamEventDensity.cxx:119 PDEFoamEventDensity.cxx:120 PDEFoamEventDensity.cxx:121