template<class Numeric, class DensityConstructor, class Axis = npstat::HistoAxis>
class npsi::MinuitDensityFitFcn1D< Numeric, DensityConstructor, Axis >
Target minimization function adapter class for running maximum likelihood density fits to histogrammed data by Minuit2.
DensityConstructor is a functor which creates the necessary density function on the stack out of a vector of parameters. Must have "operator()(const std::vector<double>&) const" which returns an object (or a reference) of some class which was derived from AbsDistribution1D.
template<class Numeric , class DensityConstructor , class Axis = npstat::HistoAxis>
npsi::MinuitDensityFitFcn1D< Numeric, DensityConstructor, Axis >::MinuitDensityFitFcn1D |
( |
const npstat::HistoND< Numeric, Axis > & |
histo, |
|
|
const unsigned char * |
binMask, |
|
|
const unsigned |
maskLength, |
|
|
const DensityConstructor & |
densityMaker, |
|
|
const double |
minlog = log(DBL_MIN) , |
|
|
const double |
up = 0.05 , |
|
|
const unsigned |
nQuad = 6U |
|
) |
| |
|
inline |
This class will not assume ownership of any pointers or references.
Elements of "binMask" should be set to 1 for bins used in the fit and to 0 for bins that are to be ignored.
"nQuad" is the number of quadrature points to use for calculating the density integral inside each bin (should be supported by GaussLegendreQuadrature class). If this parameter is set to 0, cumulative density function will be used.