Logo ROOT  
Reference Guide
PDEFoamKernelGauss.h
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: PDEFoamKernelGauss *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * PDEFoam kernel, which weights all cell values by a gauss function. *
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) 2008, 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 #ifndef ROOT_TMVA_PDEFoamKernelGauss
29 #define ROOT_TMVA_PDEFoamKernelGauss
30 
31 #include "TMVA/PDEFoam.h"
32 #include "TMVA/PDEFoamKernelBase.h"
33 #include <vector>
34 
35 namespace TMVA
36 {
37 
39  {
40 
41  protected:
42  Float_t fSigma; // width of gauss curve
43 
44  // Square function (fastest implementation)
45  template<typename T> T Sqr(T x) const { return x * x; }
46 
47  // calculate gaussian weight
48  Float_t WeightGaus(PDEFoam*, PDEFoamCell*, std::vector<Float_t>&);
49 
50  // estimate the cell value by its neighbors
51  Float_t GetAverageNeighborsValue(PDEFoam*, std::vector<Float_t>&, ECellValue);
52 
53  public:
54  PDEFoamKernelGauss(Float_t sigma); // Constructor
55  PDEFoamKernelGauss(const PDEFoamKernelGauss&); // Copy Constructor
56  virtual ~PDEFoamKernelGauss() {} // Destructor
57 
58  // kernel estimator
59  virtual Float_t Estimate(PDEFoam*, std::vector<Float_t>&, ECellValue);
60 
61  ClassDef(PDEFoamKernelGauss, 1) // Gaussian PDEFoam kernel estimator
62  }; // end of PDEFoamKernelGauss
63 } // namespace TMVA
64 
65 #endif
PDEFoamKernelBase.h
TMVA::PDEFoamKernelGauss::WeightGaus
Float_t WeightGaus(PDEFoam *, PDEFoamCell *, std::vector< Float_t > &)
Returns the gauss weight between the 'cell' and a given coordinate 'txvec'.
Definition: PDEFoamKernelGauss.cxx:182
TMVA::PDEFoamKernelGauss::GetAverageNeighborsValue
Float_t GetAverageNeighborsValue(PDEFoam *, std::vector< Float_t > &, ECellValue)
This function returns the average value 'cv' of only nearest neighbor cells.
Definition: PDEFoamKernelGauss.cxx:119
TMVA::PDEFoamKernelBase
This class is the abstract kernel interface for PDEFoam.
Definition: PDEFoamKernelBase.h:41
TMVA::PDEFoamKernelGauss::Sqr
T Sqr(T x) const
Definition: PDEFoamKernelGauss.h:45
Float_t
float Float_t
Definition: RtypesCore.h:57
TMVA::PDEFoamKernelGauss::PDEFoamKernelGauss
PDEFoamKernelGauss(Float_t sigma)
Default constructor for streamer.
Definition: PDEFoamKernelGauss.cxx:50
x
Double_t x[n]
Definition: legend1.C:17
TMVA::PDEFoam
Implementation of PDEFoam.
Definition: PDEFoam.h:79
TMVA::PDEFoamKernelGauss::fSigma
Float_t fSigma
Definition: PDEFoamKernelGauss.h:42
TMVA::PDEFoamKernelGauss::~PDEFoamKernelGauss
virtual ~PDEFoamKernelGauss()
Definition: PDEFoamKernelGauss.h:56
TMVA::PDEFoamKernelGauss
This PDEFoam kernel estimates a cell value for a given event by weighting all cell values with a gaus...
Definition: PDEFoamKernelGauss.h:39
PDEFoam.h
sigma
const Double_t sigma
Definition: h1analysisProxy.h:11
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMVA::PDEFoamKernelGauss::Estimate
virtual Float_t Estimate(PDEFoam *, std::vector< Float_t > &, ECellValue)
Gaussian kernel estimator.
Definition: PDEFoamKernelGauss.cxx:79
ROOT::Math::Chebyshev::T
double T(double x)
Definition: ChebyshevPol.h:34
TMVA::PDEFoamCell
Definition: PDEFoamCell.h:41
TMVA
create variable transformations
Definition: GeneticMinimizer.h:22