Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19244849
FitUtils.hh
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
FitUtils.hh
View Options
#ifndef NPSTAT_FITUTILS_HH_
#define NPSTAT_FITUTILS_HH_
/*!
// \file FitUtils.hh
//
// \brief Utility functions which facilitate fitting of parametric distributions
//
// Author: I. Volobouev
//
// September 2010
*/
#include
"npstat/stat/HistoND.hh"
#include
"npstat/stat/AbsDistribution1D.hh"
namespace
npstat
{
/**
// This function calculates log-likelihood of a 1-d histogram
// fit by a 1-d density (the value can then be maximized -- see,
// for example, MinuitDensityFitFcn1D.hh header in the "interfaces"
// section).
//
// The length of the "binMask" array should be the same as the number
// of bins in the histogram. Only those bins will be used for which
// corresponding mask values are not 0.
//
// The "workBuffer" array should be at least as long as the number
// of bins in the histogram.
//
// "minlog" is the minimal value of log-likelihood which can be
// contributed by one data point (that is, by a part of the bin height
// which corresponds to 1 point). This should normally be a negative
// number with reasonably large magnitude.
//
// The code essentially assumes Poisson distribution of counts
// for each bin, constrained by the requirement that the sum of
// expected events should be equal to the sum of events observed
// (all of this is relevant for unmasked bins only). Note that,
// although histogram scaling will not affect the central value
// of the fit, it will affect the fit error determination.
// Therefore, it is important to use histograms with actual
// event counts rather than any kind of a scaled version.
*/
template
<
typename
Numeric
>
double
densityFitLogLikelihood1D
(
const
HistoND
<
Numeric
>&
histo
,
const
unsigned
char
*
binMask
,
unsigned
maskLength
,
const
AbsDistribution1D
&
density
,
double
minlog
,
double
*
workBuffer
,
unsigned
workBufferLength
);
}
#include
"npstat/stat/FitUtils.icc"
#endif
// NPSTAT_FITUTILS_HH_
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Sep 30, 4:45 AM (13 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6551998
Default Alt Text
FitUtils.hh (2 KB)
Attached To
Mode
rNPSTATSVN npstatsvn
Attached
Detach File
Event Timeline
Log In to Comment