ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PDEFoamKernelTrivial.cxx
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Dominik Dannheim, Alexander Voigt
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Classes: PDEFoamKernelTrivial *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Implementation of trivial PDEFoam kernel *
12  * *
13  * Authors (alphabetical): *
14  * S. Jadach - Institute of Nuclear Physics, Cracow, Poland *
15  * Tancredi Carli - CERN, Switzerland *
16  * Dominik Dannheim - CERN, Switzerland *
17  * Alexander Voigt - TU Dresden, Germany *
18  * *
19  * Copyright (c) 2010: *
20  * CERN, Switzerland *
21  * MPI-K Heidelberg, Germany *
22  * *
23  * Redistribution and use in source and binary forms, with or without *
24  * modification, are permitted according to the terms listed in LICENSE *
25  * (http://tmva.sourceforge.net/LICENSE) *
26  **********************************************************************************/
27 
28 //_____________________________________________________________________
29 //
30 // PDEFoamKernelTrivial
31 //
32 // This class is a trivial PDEFoam kernel estimator. The Estimate()
33 // function returns the cell value, given an event 'txvec'.
34 // _____________________________________________________________________
35 
37 
38 #include "TMVA/PDEFoam.h"
39 #include "TMVA/MsgLogger.h"
40 #include "TMVA/Types.h"
41 
42 #include "Rtypes.h"
43 
44 #include <vector>
45 
47 
48 ////////////////////////////////////////////////////////////////////////////////
49 /// Default constructor for streamer
50 
51 TMVA::PDEFoamKernelTrivial::PDEFoamKernelTrivial()
52  : PDEFoamKernelBase()
53 {
54 }
55 
56 ////////////////////////////////////////////////////////////////////////////////
57 /// Copy constructor
58 
60  : PDEFoamKernelBase(other)
61 {
62 }
63 
64 ////////////////////////////////////////////////////////////////////////////////
65 /// Simple kernel estimator. It returns the cell value 'cv',
66 /// corresponding to the event vector 'txvec' (in foam coordinates).
67 ///
68 /// Parameters:
69 ///
70 /// - foam - the pdefoam to search in
71 ///
72 /// - txvec - event vector in foam coordinates [0,1]
73 ///
74 /// - cv - cell value to estimate
75 
76 Float_t TMVA::PDEFoamKernelTrivial::Estimate(PDEFoam *foam, std::vector<Float_t> &txvec, ECellValue cv)
77 {
78  if (foam == NULL)
79  Log() << kFATAL << "<PDEFoamKernelTrivial::Estimate>: PDEFoam not set!" << Endl;
80 
81  return foam->GetCellValue(foam->FindCell(txvec), cv);
82 }
MsgLogger & Endl(MsgLogger &ml)
Definition: MsgLogger.h:162
float Float_t
Definition: RtypesCore.h:53
ClassImp(TMVA::PDEFoamKernelTrivial) TMVA
Default constructor for streamer.
virtual Float_t Estimate(PDEFoam *, std::vector< Float_t > &, ECellValue)
Simple kernel estimator.
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:1027
#define NULL
Definition: Rtypes.h:82
PDEFoamCell * FindCell(const std::vector< Float_t > &) const
Find cell that contains 'xvec' (in foam coordinates [0,1]).
Definition: PDEFoam.cxx:1091
Definition: math.cpp:60