Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
34 namespace TMVA
35 {
36 
37  class PDEFoamKernelGauss : public PDEFoamKernelBase
38  {
39 
40  protected:
41  Float_t fSigma; // width of gauss curve
42 
43  // Square function (fastest implementation)
44  template<typename T> T Sqr(T x) const { return x * x; }
45 
46  // calculate gaussian weight
47  Float_t WeightGaus(PDEFoam*, PDEFoamCell*, std::vector<Float_t>&);
48 
49  // estimate the cell value by its neighbors
50  Float_t GetAverageNeighborsValue(PDEFoam*, std::vector<Float_t>&, ECellValue);
51 
52  public:
53  PDEFoamKernelGauss(Float_t sigma); // Constructor
54  PDEFoamKernelGauss(const PDEFoamKernelGauss&); // Copy Constructor
55  virtual ~PDEFoamKernelGauss() {} // Destructor
56 
57  // kernel estimator
58  virtual Float_t Estimate(PDEFoam*, std::vector<Float_t>&, ECellValue);
59 
60  ClassDef(PDEFoamKernelGauss, 1) // Gaussian PDEFoam kernel estimator
61  }; // end of PDEFoamKernelGauss
62 } // namespace TMVA
63 
64 #endif