ROOT  6.06/09
Reference Guide
PDEFoamMultiTarget.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: PDEFoamMultiTarget *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Concrete PDEFoamEvent sub-class. This foam stores the number *
12  * of events with every cell, as well as the statistical error on *
13  * the event number. It overrides GetCellValue() for projecting *
14  * the target values given an incomplete event map with *
15  * N_variables < dimension of foam. *
16  * *
17  * Authors (alphabetical): *
18  * S. Jadach - Institute of Nuclear Physics, Cracow, Poland *
19  * Tancredi Carli - CERN, Switzerland *
20  * Dominik Dannheim - CERN, Switzerland *
21  * Alexander Voigt - TU Dresden, Germany *
22  * *
23  * Copyright (c) 2008, 2010: *
24  * CERN, Switzerland *
25  * MPI-K Heidelberg, Germany *
26  * *
27  * Redistribution and use in source and binary forms, with or without *
28  * modification, are permitted according to the terms listed in LICENSE *
29  * (http://tmva.sourceforge.net/LICENSE) *
30  **********************************************************************************/
31 
32 #ifndef ROOT_TMVA_PDEFoamMultiTarget
33 #define ROOT_TMVA_PDEFoamMultiTarget
34 
35 #ifndef ROOT_TMVA_PDEFoamEvent
36 #include "TMVA/PDEFoamEvent.h"
37 #endif
38 
39 namespace TMVA
40 {
41 
42  // target selection method
43  enum ETargetSelection { kMean = 0, kMpv = 1 };
44 
46  {
47 
48  protected:
49  ETargetSelection fTargetSelection; // the target selection method
50 
51  PDEFoamMultiTarget(const PDEFoamMultiTarget&); // Copy Constructor NOT USED
52  virtual void CalculateMpv(std::map<Int_t, Float_t>&, const std::vector<PDEFoamCell*>&); // Calculate mpv target
53  virtual void CalculateMean(std::map<Int_t, Float_t>&, const std::vector<PDEFoamCell*>&); // Calculate mean target
54 
55  // ---------- Public functions ----------------------------------
56  public:
57  PDEFoamMultiTarget(); // Default constructor (used only by ROOT streamer)
58  PDEFoamMultiTarget(const TString&, ETargetSelection); // Principal user-defined constructor
59  virtual ~PDEFoamMultiTarget() {} // Default destructor
60 
61  // overridden from PDEFoam: extract the targets from the foam
62  virtual std::vector<Float_t> GetCellValue(const std::map<Int_t, Float_t>&, ECellValue);
64 
65  // ---------- ROOT class definition
66  ClassDef(PDEFoamMultiTarget, 1) // Tree of PDEFoamCells
67  }; // end of PDEFoamMultiTarget
68 
69 } // namespace TMVA
70 
71 // ---------- Inline functions
72 
73 #endif
ETargetSelection fTargetSelection
Basic string class.
Definition: TString.h:137
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void CalculateMean(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell * > &)
ECellValue
Definition: PDEFoam.h:85
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:1026
Abstract ClassifierFactory template that handles arbitrary types.
virtual void CalculateMpv(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell * > &)
virtual std::vector< Float_t > GetCellValue(const std::map< Int_t, Float_t > &, ECellValue)
This function is overridden from PDFEFoam.