00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef ROOT_TMVA_PDEFoamDistr
00031 #define ROOT_TMVA_PDEFoamDistr
00032
00033 #ifndef ROOT_TObject
00034 #include "TObject.h"
00035 #endif
00036 #ifndef ROOT_TH1D
00037 #include "TH1D.h"
00038 #endif
00039 #ifndef ROOT_TH2D
00040 #include "TH2D.h"
00041 #endif
00042
00043 #ifndef ROOT_TMVA_BinarySearchTree
00044 #include "TMVA/BinarySearchTree.h"
00045 #endif
00046 #ifndef ROOT_TMVA_Event
00047 #include "TMVA/Event.h"
00048 #endif
00049 #ifndef ROOT_TMVA_PDEFoam
00050 #include "TMVA/PDEFoam.h"
00051 #endif
00052 #ifndef ROOT_TMVA_PDEFoamCell
00053 #include "TMVA/PDEFoamCell.h"
00054 #endif
00055 #ifndef ROOT_TMVA_MsgLogger
00056 #include "TMVA/MsgLogger.h"
00057 #endif
00058
00059 namespace TMVA {
00060
00061
00062
00063
00064 enum TDensityCalc { kEVENT_DENSITY, kDISCRIMINATOR, kTARGET };
00065 }
00066
00067 namespace TMVA {
00068
00069
00070 class PDEFoamDistr : public ::TObject {
00071
00072 private:
00073 const PDEFoam *fPDEFoam;
00074 BinarySearchTree *fBst;
00075 TDensityCalc fDensityCalc;
00076
00077 protected:
00078 mutable MsgLogger* fLogger;
00079 MsgLogger& Log() const { return *fLogger; }
00080
00081 public:
00082 PDEFoamDistr();
00083 PDEFoamDistr(const PDEFoamDistr&);
00084 virtual ~PDEFoamDistr();
00085
00086
00087 void Initialize();
00088 void FillBinarySearchTree( const Event* ev, EFoamType ft, Bool_t NoNegWeights=kFALSE );
00089
00090
00091
00092 Double_t Density(Double_t *Xarg, Double_t &event_density);
00093
00094
00095 void FillHist(PDEFoamCell* cell, std::vector<TH1F*>&, std::vector<TH1F*>&,
00096 std::vector<TH1F*>&, std::vector<TH1F*>&);
00097
00098
00099 void SetPDEFoam(const PDEFoam *foam){ fPDEFoam = foam; }
00100 const PDEFoam* GetPDEFoam() const { return fPDEFoam; };
00101
00102
00103 void SetDensityCalc( TDensityCalc dc ){ fDensityCalc = dc; };
00104 Bool_t FillDiscriminator(){ return fDensityCalc == kDISCRIMINATOR; }
00105 Bool_t FillTarget0() { return fDensityCalc == kTARGET; }
00106 Bool_t FillEventDensity() { return fDensityCalc == kEVENT_DENSITY; }
00107
00108 ClassDef(PDEFoamDistr,3)
00109 };
00110
00111 }
00112
00113 #endif