Logo ROOT   master
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 #include "TMVA/PDEFoamEvent.h"
36 
37 namespace TMVA
38 {
39 
40  // target selection method
41  enum ETargetSelection { kMean = 0, kMpv = 1 };
42 
44  {
45 
46  protected:
47  ETargetSelection fTargetSelection; // the target selection method
48 
49  PDEFoamMultiTarget(const PDEFoamMultiTarget&); // Copy Constructor NOT USED
50  virtual void CalculateMpv(std::map<Int_t, Float_t>&, const std::vector<PDEFoamCell*>&); // Calculate mpv target
51  virtual void CalculateMean(std::map<Int_t, Float_t>&, const std::vector<PDEFoamCell*>&); // Calculate mean target
52 
53  // ---------- Public functions ----------------------------------
54  public:
55  PDEFoamMultiTarget(); // Default constructor (used only by ROOT streamer)
56  PDEFoamMultiTarget(const TString&, ETargetSelection); // Principal user-defined constructor
57  virtual ~PDEFoamMultiTarget() {} // Default destructor
58 
59  // overridden from PDEFoam: extract the targets from the foam
60  virtual std::vector<Float_t> GetCellValue(const std::map<Int_t, Float_t>&, ECellValue);
62 
63  // ---------- ROOT class definition
64  ClassDef(PDEFoamMultiTarget, 1) // Tree of PDEFoamCells
65  }; // end of PDEFoamMultiTarget
66 
67 } // namespace TMVA
68 
69 // ---------- Inline functions
70 
71 #endif
This PDEFoam variant is used to estimate multiple targets by creating an event density foam (PDEFoamE...
ETargetSelection fTargetSelection
Basic string class.
Definition: TString.h:131
virtual void CalculateMpv(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell *> &)
This function calculates the most probable target value from a given number of cells.
PDEFoamMultiTarget()
Default constructor for streamer, user should not use it.
#define ClassDef(name, id)
Definition: Rtypes.h:322
This PDEFoam variant stores in every cell the sum of event weights and the sum of the squared event w...
Definition: PDEFoamEvent.h:38
virtual void CalculateMean(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell *> &)
This function calculates the mean target value from a given number of cells.
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 &#39;xvec&#39; and re...
Definition: PDEFoam.cxx:1016
create variable transformations
virtual std::vector< Float_t > GetCellValue(const std::map< Int_t, Float_t > &, ECellValue)
This function is overridden from PDFEFoam.