50 #ifndef ROOT_TMVA_PDEFoamDecisionTree 53 #ifndef ROOT_TMVA_PDEFoamDecisionTreeDensity 104 Log() <<
kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED" <<
Endl;
134 Log() <<
kFATAL <<
"<DTExplore> Null pointer given!" <<
Endl;
137 std::vector<TH1D*> hsig, hbkg, hsig_unw, hbkg_unw;
140 hsig_unw.reserve(
fDim);
141 hbkg_unw.reserve(
fDim);
142 for (
Int_t idim = 0; idim <
fDim; idim++) {
143 hsig.push_back(
new TH1D(
Form(
"hsig_%i", idim),
145 hbkg.push_back(
new TH1D(
Form(
"hbkg_%i", idim),
147 hsig_unw.push_back(
new TH1D(
Form(
"hsig_unw_%i", idim),
149 hbkg_unw.push_back(
new TH1D(
Form(
"hbkg_unw_%i", idim),
155 cell->
GetHcub(cellPosi, cellSize);
168 Log() <<
kFATAL <<
"<PDEFoamDecisionTree::Explore>: cast failed: " 169 <<
"PDEFoamDensityBase* --> PDEFoamDecisionTreeDensity*" <<
Endl;
181 Double_t nTotS = hsig.at(0)->Integral(0, hsig.at(0)->GetNbinsX() + 1);
182 Double_t nTotB = hbkg.at(0)->Integral(0, hbkg.at(0)->GetNbinsX() + 1);
183 Double_t nTotS_unw = hsig_unw.at(0)->Integral(0, hsig_unw.at(0)->GetNbinsX() + 1);
184 Double_t nTotB_unw = hbkg_unw.at(0)->Integral(0, hbkg_unw.at(0)->GetNbinsX() + 1);
186 for (
Int_t idim = 0; idim <
fDim; ++idim) {
187 Double_t nSelS = hsig.at(idim)->GetBinContent(0);
188 Double_t nSelB = hbkg.at(idim)->GetBinContent(0);
189 Double_t nSelS_unw = hsig_unw.at(idim)->GetBinContent(0);
190 Double_t nSelB_unw = hbkg_unw.at(idim)->GetBinContent(0);
192 nSelS += hsig.at(idim)->GetBinContent(jLo);
193 nSelB += hbkg.at(idim)->GetBinContent(jLo);
194 nSelS_unw += hsig_unw.at(idim)->GetBinContent(jLo);
195 nSelB_unw += hbkg_unw.at(idim)->GetBinContent(jLo);
199 if (!((nSelS_unw + nSelB_unw) >=
GetNmin() &&
200 (nTotS_unw - nSelS_unw + nTotB_unw - nSelB_unw) >=
GetNmin()))
208 if (gain >= maxGain) {
216 if (kBest >= fDim || kBest < 0) {
227 if (nTotB + nTotS > 0)
228 cell->
SetIntg(nTotS / (nTotB + nTotS));
240 for (
UInt_t ih = 0; ih < hsig.size(); ih++)
delete hsig.at(ih);
241 for (
UInt_t ih = 0; ih < hbkg.size(); ih++)
delete hbkg.at(ih);
242 for (
UInt_t ih = 0; ih < hsig_unw.size(); ih++)
delete hsig_unw.at(ih);
243 for (
UInt_t ih = 0; ih < hbkg_unw.size(); ih++)
delete hbkg_unw.at(ih);
MsgLogger & Endl(MsgLogger &ml)
SeparationBase * fSepType
void SetCellElement(PDEFoamCell *cell, UInt_t i, Double_t value)
Set cell element i of cell to value.
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)
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...
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)
Abstract ClassifierFactory template that handles arbitrary types.
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
virtual ~PDEFoamDecisionTree()
Destructor deletes fSepType.