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 );
FunctionBase * m_function
The flags to indicated which parameters are to be held fixed during minimization of this object...
A derived class of StatedFCN This class gets its data points from a DataSource.
virtual double objectiveValue() const
Calculates and returns the Likelihood function for the 1D binned data.
A Likelihood functor class.
virtual bool needsIntegrated() const
Returns true if data points were integrated.
std::vector< int > m_indices
The indexes into the DataSource.
hippodraw::DataSource class interface.
NTupleLikeliHoodFCN()
The default constructor.
error on X or half bin width
virtual StatedFCN * clone() const
Makes a copy of the object.
const DataSource * m_ntuple
The data source containing the data points for the fitter.
hippodraw::NTupleLikeliHoodFCN class interface
hippodraw::FunctionBase class interface
hippodraw::DataPointTuple namespace interface
A derived class for FCNBase class.
bool acceptRow(unsigned int row) const
Returns true if the DataSource row row is within the fit Range.