|
||||
File indexing completed on 2025-01-18 10:11:03
0001 // @(#)root/tmva $Id$ 0002 // Author: Tancredi Carli, Dominik Dannheim, Alexander Voigt 0003 0004 /********************************************************************************** 0005 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis * 0006 * Package: TMVA * 0007 * Classes: PDEFoamDensityBase * 0008 * * 0009 * * 0010 * Description: * 0011 * Class PDEFoamDensityBase is an Abstract class representing * 0012 * n-dimensional real positive integrand function * 0013 * The main function is Density() which provides the event density at a * 0014 * given point during the foam build-up (sampling). * 0015 * * 0016 * Authors (alphabetical): * 0017 * Tancredi Carli - CERN, Switzerland * 0018 * Dominik Dannheim - CERN, Switzerland * 0019 * S. Jadach - Institute of Nuclear Physics, Cracow, Poland * 0020 * Alexander Voigt - TU Dresden, Germany * 0021 * Peter Speckmayer - CERN, Switzerland * 0022 * * 0023 * Copyright (c) 2008, 2010: * 0024 * CERN, Switzerland * 0025 * MPI-K Heidelberg, Germany * 0026 * * 0027 * Redistribution and use in source and binary forms, with or without * 0028 * modification, are permitted according to the terms listed in LICENSE * 0029 * (see tmva/doc/LICENSE) * 0030 **********************************************************************************/ 0031 0032 #ifndef ROOT_TMVA_PDEFoamDensityBase 0033 #define ROOT_TMVA_PDEFoamDensityBase 0034 0035 #include "TObject.h" 0036 #include <vector> 0037 0038 #include "TMVA/BinarySearchTree.h" 0039 #include "TMVA/Event.h" 0040 #include "TMVA/MsgLogger.h" 0041 0042 namespace TMVA 0043 { 0044 0045 // class definition of underlying density 0046 class PDEFoamDensityBase : public ::TObject 0047 { 0048 private: 0049 std::vector<Double_t> fBox; ///< range-searching box 0050 Double_t fBoxVolume; ///< volume of range searching box 0051 Bool_t fBoxHasChanged; ///< range searching box has changed 0052 0053 protected: 0054 BinarySearchTree *fBst; ///< Binary tree to find events within a volume 0055 mutable MsgLogger *fLogger; ///<! message logger 0056 0057 MsgLogger& Log() const { return *fLogger; } 0058 0059 // calculate volume of fBox 0060 Double_t GetBoxVolume(); 0061 0062 public: 0063 PDEFoamDensityBase(); 0064 PDEFoamDensityBase(std::vector<Double_t> box); 0065 PDEFoamDensityBase(const PDEFoamDensityBase&); 0066 virtual ~PDEFoamDensityBase(); 0067 0068 // fill event into binary search tree 0069 void FillBinarySearchTree(const Event* ev); 0070 0071 // set the range-searching box 0072 void SetBox(std::vector<Double_t> box) { fBox = box; fBoxHasChanged = kTRUE; } 0073 0074 // get the range-searching box 0075 const std::vector<Double_t>& GetBox() const { return fBox; } 0076 0077 // main function used by PDEFoam 0078 // returns density at a given point by range searching in BST 0079 virtual Double_t Density(std::vector<Double_t> &Xarg, Double_t &event_density) = 0; 0080 0081 ClassDef(PDEFoamDensityBase, 1) // PDEFoam event density interface 0082 }; //end of PDEFoamDensityBase 0083 0084 } // namespace TMVA 0085 0086 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |