Logo ROOT  
Reference Guide
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 #include <vector>
36 
37 namespace TMVA
38 {
39 
40  class PDEFoamTarget : public PDEFoam
41  {
42 
43  protected:
44  UInt_t fTarget; // the target to fill the cells with
45 
46  // specific function used during evaluation; determines, whether
47  // a cell value is undefined
49 
50  // calculate the average of the neighbor cell values
51  Float_t GetAverageNeighborsValue(std::vector<Float_t>&, ECellValue);
52 
53  PDEFoamTarget(const PDEFoamTarget&); // Copy Constructor NOT USED
54 
55  // ---------- Public functions ----------------------------------
56  public:
57  PDEFoamTarget(); // Default constructor (used only by ROOT streamer)
58  PDEFoamTarget(const TString&, UInt_t); // Principal user-defined constructor
59  virtual ~PDEFoamTarget() {} // Default destructor
60 
61  // function to fill created cell with given value
62  virtual void FillFoamCells(const Event* ev, Float_t wt);
63 
64  // function to call after foam is grown
65  virtual void Finalize();
66 
67  virtual Float_t GetCellValue(const std::vector<Float_t> &xvec, ECellValue cv, PDEFoamKernelBase*);
69 
70  // ---------- ROOT class definition
71  ClassDef(PDEFoamTarget, 1) // Tree of PDEFoamCells
72  }; // end of PDEFoamTarget
73 
74 } // namespace TMVA
75 
76 // ---------- Inline functions
77 
78 #endif
TMVA::PDEFoamKernelBase
This class is the abstract kernel interface for PDEFoam.
Definition: PDEFoamKernelBase.h:41
Float_t
float Float_t
Definition: RtypesCore.h:57
TMVA::PDEFoamTarget::FillFoamCells
virtual void FillFoamCells(const Event *ev, Float_t wt)
This function fills an event into the discriminant PDEFoam.
Definition: PDEFoamTarget.cxx:93
TMVA::PDEFoam::GetCellValue
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...
Definition: PDEFoam.cxx:1016
TString
Basic string class.
Definition: TString.h:136
TMVA::PDEFoamTarget::~PDEFoamTarget
virtual ~PDEFoamTarget()
Definition: PDEFoamTarget.h:59
bool
TMVA::PDEFoamTarget::Finalize
virtual void Finalize()
Calculate average cell target in every cell and save them to the cell.
Definition: PDEFoamTarget.cxx:112
TMVA::PDEFoam
Implementation of PDEFoam.
Definition: PDEFoam.h:79
TMVA::PDEFoamTarget::fTarget
UInt_t fTarget
Definition: PDEFoamTarget.h:44
TMVA::PDEFoamTarget
This PDEFoam variant stores in every cell the average target fTarget (see the Constructor) as well as...
Definition: PDEFoamTarget.h:41
TMVA::PDEFoamTarget::GetCellValue
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...
Definition: PDEFoam.cxx:1016
PDEFoam.h
unsigned int
TMVA::Event
Definition: Event.h:51
TMVA::PDEFoamTarget::PDEFoamTarget
PDEFoamTarget()
Default constructor for streamer, user should not use it.
Definition: PDEFoamTarget.cxx:57
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMVA::PDEFoamTarget::CellValueIsUndefined
Bool_t CellValueIsUndefined(PDEFoamCell *cell)
Returns true, if the target error equals -1, as set in Finalize() in case of no events in the cell.
Definition: PDEFoamTarget.cxx:136
TMVA::PDEFoamCell
Definition: PDEFoamCell.h:41
TMVA
create variable transformations
Definition: GeneticMinimizer.h:22
TMVA::PDEFoamTarget::GetAverageNeighborsValue
Float_t GetAverageNeighborsValue(std::vector< Float_t > &, ECellValue)
This function returns the average value 'cv' of only nearest neighbor cells.
Definition: PDEFoamTarget.cxx:175