46 #ifndef ROOT_TMVA_PDEFoamEventDensity
54 TMVA::PDEFoamEventDensity::PDEFoamEventDensity()
55 : PDEFoamDensityBase()
98 Log() <<
kFATAL <<
"<PDEFoamEventDensity::Density()> Binary tree not found!" <<
Endl;
101 std::vector<Double_t> lb(GetBox().size());
102 std::vector<Double_t> ub(GetBox().size());
105 const Double_t probevolume_inv = 1.0 / GetBoxVolume();
108 for (
UInt_t idim = 0; idim < GetBox().size(); ++idim) {
109 lb[idim] = xev[idim] - GetBox().at(idim) / 2.0;
110 ub[idim] = xev[idim] + GetBox().at(idim) / 2.0;
114 std::vector<const TMVA::BinarySearchTreeNode*> nodes;
117 const Double_t sumOfWeights = fBst->SearchVolume(&volume, &nodes);
120 event_density = nodes.size() * probevolume_inv;
123 return (sumOfWeights + 0.1) * probevolume_inv;
MsgLogger & Endl(MsgLogger &ml)
virtual Double_t Density(std::vector< Double_t > &Xarg, Double_t &event_density)
This function is needed during the foam buildup.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
ClassImp(TMVA::PDEFoamEventDensity) TMVA
Abstract ClassifierFactory template that handles arbitrary types.