28 #ifndef ROOT_TMVA_PDEFoam
29 #define ROOT_TMVA_PDEFoam
37 #ifndef ROOT_TObjArray
40 #ifndef ROOT_TObjString
49 #ifndef ROOT_TMVA_VariableInfo
52 #ifndef ROOT_TMVA_Timer
65 class PDEFoamDensityBase;
66 class PDEFoamKernelBase;
89 #ifndef ROOT_TMVA_PDEFoamDensityBase
92 #ifndef ROOT_TMVA_PDEFoamVect
95 #ifndef ROOT_TMVA_PDEFoamCell
175 std::vector<TMVA::PDEFoamCell*>
FindCells(
const std::vector<Float_t>&)
const;
176 std::vector<TMVA::PDEFoamCell*>
FindCells(
const std::map<Int_t,Float_t>&)
const;
177 void FindCells(
const std::map<Int_t, Float_t>&,
PDEFoamCell*, std::vector<PDEFoamCell*> &)
const;
183 template<
typename T>
T Sqr(
T x)
const {
return x*
x; }
251 std::vector<Float_t>
VarTransform(
const std::vector<Float_t> &invec)
const;
313 std::vector<Float_t> outvec;
314 for(
UInt_t i=0; i<invec.size(); i++)
315 outvec.push_back(VarTransform(i, invec.at(i)));
323 return x*(fXmax[idim]-fXmin[idim]) + fXmin[idim];
330 std::vector<Float_t> outvec;
331 for(
UInt_t i=0; i<invec.size(); i++)
332 outvec.push_back(VarTransformInvers(i, invec.at(i)));
Bool_t fFillFoamWithOrigWeights
virtual void FillFoamCells(const Event *ev, Float_t wt)
This function fills a weight 'wt' into the PDEFoam cell, which corresponds to the given event 'ev'...
Random number generator class based on M.
Long_t PeekMax()
Internal subprogram used by Create.
TObjArray * fVariableNames
timer for graphical output
Int_t * fInhiDiv
[fDim] Dynamic Mask for cell division
Collectable string class.
UInt_t GetMaxDepth() const
void OutputGrow(Bool_t finished=false)
message logger
PDEFoamDensityBase * GetDistr() const
void Grow()
Internal subrogram used by Create.
static const char * filename()
void SetXmin(Int_t idim, Double_t wmin)
set lower foam bound in dimension idim
UInt_t GetNActiveCells() const
Double_t GetXmin(Int_t idim) const
void SetCellElement(PDEFoamCell *cell, UInt_t i, Double_t value)
Set cell element i of cell to value.
Int_t Divide(PDEFoamCell *)
Internal subrogram used by Create.
TH1D * Draw1Dim(ECellValue cell_value, Int_t nbin, PDEFoamKernelBase *kernel=NULL)
Draws 1-dimensional foam (= histogram)
void CheckAll(Int_t)
User utility, miscellaneous and debug.
std::vector< TMVA::PDEFoamCell * > FindCells(const std::vector< Float_t > &) const
Find all cells, that contain txvec.
Int_t CellFill(Int_t, PDEFoamCell *)
Internal subprogram used by Create.
void MakeAlpha()
Internal subrogram used by Create.
Timer * fTimer
distribution of training events
virtual Bool_t CellValueIsUndefined(PDEFoamCell *)
Returns true, if the value of the given cell is undefined.
#define ClassDef(name, id)
void RootPlot2dim(const TString &filename, TString opt, Bool_t createCanvas=kTRUE, Bool_t colors=kTRUE)
Debugging tool which plots the cells of a 2-dimensional PDEFoam as rectangles in C++ format readable ...
PDEFoamDensityBase * fDistr
void ResetCellElements()
Remove the cell elements from all cells.
virtual void Explore(PDEFoamCell *Cell)
Internal subprogram used by Create.
void SetMaxDepth(UInt_t maxdepth)
Double_t GetXmax(Int_t idim) const
void SetnSampl(Long_t nSampl)
void InitCells()
Internal subprogram used by Create.
void PrintCells()
Prints geometry of ALL cells of the FOAM.
void Varedu(Double_t[], Int_t &, Double_t &, Double_t &)
Internal subrogram used by Create.
void AddVariableName(const char *s)
void SetXmax(Int_t idim, Double_t wmax)
set upper foam bound in dimension idim
Double_t GetCellElement(const PDEFoamCell *cell, UInt_t i) const
Returns cell element i of cell 'cell'.
TObjString * GetVariableName(Int_t idx)
void SetDensity(PDEFoamDensityBase *dens)
void SetDim(Int_t kDim)
Sets dimension of cubical space.
Float_t VarTransform(Int_t idim, Float_t x) const
1-D histogram with a double per channel (see TH1 documentation)}
void PrintCell(Long_t iCell=0)
Prints geometry of and elements of 'iCell', as well as relations to parent and daughter cells...
UInt_t GetNInActiveCells() const
EDTSeparation fDTSeparation
Double_t Eval(Double_t *xRand, Double_t &event_density)
Internal subprogram.
Int_t fNoAct
[fDim] Flags for inhibiting cell division
void SetnCells(Long_t nCells)
void Create()
Basic initialization of FOAM invoked by the user.
virtual TH2D * Project2(Int_t idim1, Int_t idim2, ECellValue cell_value=kValue, PDEFoamKernelBase *kernel=NULL, UInt_t nbin=50)
Project foam variable idim1 and variable idim2 to histogram.
virtual Float_t GetCellValue(const std::vector< Float_t > &xvec, ECellValue cv, PDEFoamKernelBase *)
This function finds the cell, which corresponds to the given untransformed event vector 'xvec' and re...
void AddVariableName(TObjString *s)
PDEFoamCell * GetRootCell() const
Mother of all ROOT objects.
void DeleteBinarySearchTree()
Delete the foam's density estimator, which contains the binary search tree.
void FillBinarySearchTree(const Event *ev)
Insert event to internal foam's density estimator PDEFoamDensityBase.
virtual ~PDEFoam()
Default destructor.
void SetEvPerBin(Int_t EvPerBin)
PDEFoamCell * FindCell(const std::vector< Float_t > &) const
Find cell that contains 'xvec' (in foam coordinates [0,1]).
TObject * At(Int_t idx) const
Float_t VarTransformInvers(Int_t idim, Float_t x) const
TString GetFoamName() const
void SetInhiDiv(Int_t, Int_t)
This can be called before Create, after setting kDim It defines which variables are excluded in the p...
PDEFoam()
Default constructor for streamer, user should not use it.
2-D histogram with a double per channel (see TH1 documentation)}