98 Log() << kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED" <<
Endl;
128 Log() << kFATAL <<
"<DTExplore> Null pointer given!" <<
Endl;
131 std::vector<TH1D*> hsig, hbkg, hsig_unw, hbkg_unw;
134 hsig_unw.reserve(
fDim);
135 hbkg_unw.reserve(
fDim);
136 for (
Int_t idim = 0; idim <
fDim; idim++) {
137 hsig.push_back(
new TH1D(
Form(
"hsig_%i", idim),
139 hbkg.push_back(
new TH1D(
Form(
"hbkg_%i", idim),
141 hsig_unw.push_back(
new TH1D(
Form(
"hsig_unw_%i", idim),
143 hbkg_unw.push_back(
new TH1D(
Form(
"hbkg_unw_%i", idim),
149 cell->
GetHcub(cellPosi, cellSize);
162 Log() << kFATAL <<
"<PDEFoamDecisionTree::Explore>: cast failed: " 163 <<
"PDEFoamDensityBase* --> PDEFoamDecisionTreeDensity*" <<
Endl;
175 Double_t nTotS = hsig.at(0)->Integral(0, hsig.at(0)->GetNbinsX() + 1);
176 Double_t nTotB = hbkg.at(0)->Integral(0, hbkg.at(0)->GetNbinsX() + 1);
177 Double_t nTotS_unw = hsig_unw.at(0)->Integral(0, hsig_unw.at(0)->GetNbinsX() + 1);
178 Double_t nTotB_unw = hbkg_unw.at(0)->Integral(0, hbkg_unw.at(0)->GetNbinsX() + 1);
180 for (
Int_t idim = 0; idim <
fDim; ++idim) {
181 Double_t nSelS = hsig.at(idim)->GetBinContent(0);
182 Double_t nSelB = hbkg.at(idim)->GetBinContent(0);
183 Double_t nSelS_unw = hsig_unw.at(idim)->GetBinContent(0);
184 Double_t nSelB_unw = hbkg_unw.at(idim)->GetBinContent(0);
186 nSelS += hsig.at(idim)->GetBinContent(jLo);
187 nSelB += hbkg.at(idim)->GetBinContent(jLo);
188 nSelS_unw += hsig_unw.at(idim)->GetBinContent(jLo);
189 nSelB_unw += hbkg_unw.at(idim)->GetBinContent(jLo);
193 if (!((nSelS_unw + nSelB_unw) >=
GetNmin() &&
194 (nTotS_unw - nSelS_unw + nTotB_unw - nSelB_unw) >=
GetNmin()))
202 if (gain >= maxGain) {
210 if (kBest >= fDim || kBest < 0) {
221 if (nTotB + nTotS > 0)
222 cell->
SetIntg(nTotS / (nTotB + nTotS));
234 for (
UInt_t ih = 0; ih < hsig.size(); ih++)
delete hsig.at(ih);
235 for (
UInt_t ih = 0; ih < hbkg.size(); ih++)
delete hbkg.at(ih);
236 for (
UInt_t ih = 0; ih < hsig_unw.size(); ih++)
delete hsig_unw.at(ih);
237 for (
UInt_t ih = 0; ih < hbkg_unw.size(); ih++)
delete hbkg_unw.at(ih);
This is a concrete implementation of PDEFoam.
virtual Double_t GetSeparationGain(const Double_t nSelS, const Double_t nSelB, const Double_t nTotS, const Double_t nTotB)
Separation Gain: the measure of how the quality of separation of the sample increases by splitting th...
MsgLogger & Endl(MsgLogger &ml)
SeparationBase * fSepType
void SetCellElement(PDEFoamCell *cell, UInt_t i, Double_t value)
Set cell element i of cell to value.
Volume for BinarySearchTree.
PDEFoamDensityBase * fDistr
virtual void FillHistograms(TMVA::Volume &, std::vector< TH1D *> &, std::vector< TH1D *> &, std::vector< TH1D *> &, std::vector< TH1D *> &)
Fill the given histograms with signal and background events, which are found in the volume...
Float_t VarTransformInvers(Int_t idim, Float_t x) const
void SetXdiv(Double_t Xdiv)
virtual void Explore(PDEFoamCell *Cell)
Internal subprogram used by Create.
PDEFoamDecisionTree()
Default constructor for streamer, user should not use it.
void CalcVolume()
Calculates volume of the cell using size params which are calculated.
char * Form(const char *fmt,...)
void SetDriv(Double_t Driv)
An interface to calculate the "SeparationGain" for different separation criteria used in various trai...
This PDEFoam variant acts like a decision tree and stores in every cell the discriminant.
void GetHcub(PDEFoamVect &, PDEFoamVect &) const
Provides size and position of the cell These parameter are calculated by analyzing information in all...
void SetIntg(Double_t Intg)
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
This PDEFoam variant stores in every cell the discriminant.
virtual ~PDEFoamDecisionTree()
Destructor deletes fSepType.