13 #include "msdevstudio/MSconfig.h"
30 using namespace hippodraw;
50 namespace dp = hippodraw::DataPoint2DTuple;
65 for(
int i = 0; i < num_bins; i++ )
68 const vector < double > & row =
m_ntuple -> getRow ( i );
71 double x = row [ ix ];
72 double hwidth = 0.5 * row [ ie ];
73 double edgeL = x - hwidth;
74 double edgeR = x + hwidth;
77 double theta =
m_function-> integrate( edgeL, edgeR );
80 double n = 2.0 * hwidth * row [ iy ];
104 sum1 += n * log ( theta );
109 result = sum1 - sum2;
113 return ( -2 * result );
bool acceptRow(unsigned int row) const
Returns true if the DataSource row row is within the fit Range.
A derived class for FCNBase class.
hippodraw::FunctionBase class interface
hippodraw::DataPointTuple namespace interface
virtual bool needsIntegrated() const
Returns true if data points were integrated.
virtual StatedFCN * clone() const
Makes a copy of the object.
A derived class of StatedFCN This class gets its data points from a DataSource.
NTupleLikeliHoodFCN()
The default constructor.
A Likelihood functor class.
const DataSource * m_ntuple
The data source containing the data points for the fitter.
FunctionBase * m_function
The flags to indicated which parameters are to be held fixed during minimization of this objective fu...
virtual double objectiveValue() const
Calculates and returns the Likelihood function for the 1D binned data.
std::vector< int > m_indices
The indexes into the DataSource.
hippodraw::DataSource class interface.
error on X or half bin width
hippodraw::NTupleLikeliHoodFCN class interface