103 Log() << kFATAL <<
"<PDEFoamEventDensity::Density()> Binary tree not found!" <<
Endl;
106 std::vector<Double_t> lb(GetBox().
size());
107 std::vector<Double_t> ub(GetBox().
size());
110 const Double_t probevolume_inv = 1.0 / GetBoxVolume();
113 for (
UInt_t idim = 0; idim < GetBox().size(); ++idim) {
114 lb[idim] = xev[idim] - GetBox().at(idim) / 2.0;
115 ub[idim] = xev[idim] + GetBox().at(idim) / 2.0;
119 std::vector<const TMVA::BinarySearchTreeNode*> nodes;
122 const Double_t sumOfWeights = fBst->SearchVolume(&volume, &nodes);
125 event_density = nodes.size() * probevolume_inv;
128 return (sumOfWeights + 0.1) * probevolume_inv;