Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
PDEFoamTarget.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Tancredi Carli, Dominik Dannheim, Alexander Voigt
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Classes: PDEFoamTarget *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Concrete PDEFoam sub-class. This foam stores the first target *
12  * (index 0) with every cell, as well as the statistical error on *
13  * the target. *
14  * *
15  * Authors (alphabetical): *
16  * S. Jadach - Institute of Nuclear Physics, Cracow, Poland *
17  * Tancredi Carli - CERN, Switzerland *
18  * Dominik Dannheim - CERN, Switzerland *
19  * Alexander Voigt - TU Dresden, Germany *
20  * *
21  * Copyright (c) 2008, 2010: *
22  * CERN, Switzerland *
23  * MPI-K Heidelberg, Germany *
24  * *
25  * Redistribution and use in source and binary forms, with or without *
26  * modification, are permitted according to the terms listed in LICENSE *
27  * (http://tmva.sourceforge.net/LICENSE) *
28  **********************************************************************************/
29 
30 #ifndef ROOT_TMVA_PDEFoamTarget
31 #define ROOT_TMVA_PDEFoamTarget
32 
33 #include "TMVA/PDEFoam.h"
34 
35 namespace TMVA
36 {
37 
38  class PDEFoamTarget : public PDEFoam
39  {
40 
41  protected:
42  UInt_t fTarget; // the target to fill the cells with
43 
44  // specific function used during evaluation; determines, whether
45  // a cell value is undefined
46  Bool_t CellValueIsUndefined(PDEFoamCell* cell);
47 
48  // calculate the average of the neighbor cell values
49  Float_t GetAverageNeighborsValue(std::vector<Float_t>&, ECellValue);
50 
51  PDEFoamTarget(const PDEFoamTarget&); // Copy Constructor NOT USED
52 
53  // ---------- Public functions ----------------------------------
54  public:
55  PDEFoamTarget(); // Default constructor (used only by ROOT streamer)
56  PDEFoamTarget(const TString&, UInt_t); // Principal user-defined constructor
57  virtual ~PDEFoamTarget() {} // Default destructor
58 
59  // function to fill created cell with given value
60  virtual void FillFoamCells(const Event* ev, Float_t wt);
61 
62  // function to call after foam is grown
63  virtual void Finalize();
64 
65  virtual Float_t GetCellValue(const std::vector<Float_t> &xvec, ECellValue cv, PDEFoamKernelBase*);
66  using PDEFoam::GetCellValue;
67 
68  // ---------- ROOT class definition
69  ClassDef(PDEFoamTarget, 1) // Tree of PDEFoamCells
70  }; // end of PDEFoamTarget
71 
72 } // namespace TMVA
73 
74 // ---------- Inline functions
75 
76 #endif