npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
gaussianResponseMatrix.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_GAUSSIANRESPONSEMATRIX_HH_
2 #define NPSTAT_GAUSSIANRESPONSEMATRIX_HH_
3 
4 /*!
5 // \file gaussianResponseMatrix.hh
6 //
7 // \brief Functions for building Gaussian response matrices for
8 // 1-d unfolding problems
9 //
10 // Author: I. Volobouev
11 //
12 // June 2014
13 */
14 
15 #include "npstat/nm/Matrix.hh"
17 
19 
20 namespace npstat {
21  /**
22  // Function arguments are as follows:
23  //
24  // unfoldedMin, unfoldedMax -- boundaries for the "unfolded" (that is,
25  // physical) space.
26  //
27  // nUnfolded -- number of subdivisions for the unfolded
28  // space. Uniform binning is used.
29  //
30  // observedMin, observedMax -- boundaries for the "observed" space.
31  //
32  // nObserved -- number of subdivisions for the observed
33  // space. Uniform binning is used.
34  //
35  // gaussMeanFunction -- this functor calculates the mean of the
36  // observed gaussian for the given value
37  // in the physical space. Use
38  // "npstat::Same<double>()" as an argument
39  // if you not not want to add an extra shift
40  // to the point location.
41  //
42  // gaussWidthFunction -- this functor calculates the width of the
43  // observed gaussian for the given value
44  // in the physical space. Use
45  // "npstat::ConstValue1<double,double>(width)"
46  // as an argument if you want a constant width.
47  //
48  // nQuadraturePoints -- the number of points to use for integration
49  // in each dimension. This should be one of
50  // the numbers of points supported by the
51  // GaussLegendreQuadrature class.
52  //
53  // This function will integrate the Gaussian density in the observed
54  // space and average it in the unfolded space using Gauss-Legendre
55  // quadratures with the given number of points in each space.
56  */
58  double unfoldedMin, double unfoldedMax, unsigned nUnfolded,
59  double observedMin, double observedMax, unsigned nObserved,
60  const Functor1<double, double>& gaussMeanFunction,
61  const Functor1<double, double>& gaussWidthFunction,
62  unsigned nQuadraturePoints = 8U);
63 
64  /**
65  // Function arguments are as follows:
66  //
67  // unfoldedAxis -- Discretization of the "unfolded" (that is,
68  // physical) space. Binning is expected to be
69  // non-uniform.
70  //
71  // observedAxis -- Discretization of the "observed" space.
72  // Binning is expected to be non-uniform.
73  //
74  // gaussMeanFunction -- this functor calculates the mean of the
75  // observed gaussian for the given value
76  // in the physical space. Use
77  // "npstat::Same<double>()" as an argument
78  // if you not not want to add an extra shift
79  // to the point location.
80  //
81  // gaussWidthFunction -- this functor calculates the width of the
82  // observed gaussian for the given value
83  // in the physical space. Use
84  // "npstat::ConstValue1<double,double>(width)"
85  // as an argument if you want a constant width.
86  //
87  // nQuadraturePoints -- the number of points to use for integration
88  // in each dimension. This should be one of
89  // the numbers of points supported by the
90  // GaussLegendreQuadrature class.
91  //
92  // This function will integrate the Gaussian density in the observed
93  // space and average it in the unfolded space using Gauss-Legendre
94  // quadratures with the given number of points in each space.
95  */
97  const NUHistoAxis& unfoldedAxis, const NUHistoAxis& observedAxis,
98  const Functor1<double, double>& gaussMeanFunction,
99  const Functor1<double, double>& gaussWidthFunction,
100  unsigned nQuadraturePoints = 8U);
101 }
102 
103 #endif // NPSTAT_GAUSSIANRESPONSEMATRIX_HH_
Template matrix class.
Histogram axis with non-uniform bin spacing.
Interface definitions and concrete simple functors for a variety of functor-based calculations.
Definition: NUHistoAxis.hh:28
Definition: AbsArrayProjector.hh:14
Matrix< double > gaussianResponseMatrix(double unfoldedMin, double unfoldedMax, unsigned nUnfolded, double observedMin, double observedMax, unsigned nObserved, const Functor1< double, double > &gaussMeanFunction, const Functor1< double, double > &gaussWidthFunction, unsigned nQuadraturePoints=8U)