13 #include "msdevstudio/MSconfig.h"
25 using namespace hippodraw;
56 namespace dp2 = hippodraw::DataPoint2DTuple;
57 namespace dp3 = hippodraw::DataPoint3DTuple;
65 unsigned int dim = (
m_indices.size() - 2 ) / 2;
72 unsigned int rows =
m_ntuple -> rows ();
74 for (
unsigned int i = 0;
i < rows;
i++ ) {
76 const vector < double > & row =
m_ntuple -> getRow (
i );
77 double err = ie < 0 ? 0. : row [ ie ];
82 result += diff * diff / ( err * err );
87 vector < double > coord ( dim );
91 unsigned int rows =
m_ntuple -> rows ();
93 for (
unsigned int i = 0;
i < rows;
i++ ) {
95 const vector < double > & row =
m_ntuple -> getRow (
i );
97 double err = ie < 0 ? 0. : row [ ie ];
101 for (
unsigned int j = 0; j < dim; j++ ) {
106 result += diff * diff / ( err * err );
FunctionBase * m_function
The flags to indicated which parameters are to be held fixed during minimization of this object...
virtual double operator()(const std::vector< double > &parms) const
Sets the model function parameters to parms and returns the objective value.
A derived class of StatedFCN This class gets its data points from a DataSource.
NTupleChiSqFCN()
The default constructor.
virtual bool needsIntegrated() const
Returns true if data points were integrated.
bool m_has_errors
Error use flag.
std::vector< int > m_indices
The indexes into the DataSource.
hippodraw::DataSource class interface.
A Chi-squared functor class.
virtual double up() const
const DataSource * m_ntuple
The data source containing the data points for the fitter.
int getErrorColumn() const
Returns the index to the column containing error on the value coordinate.
virtual StatedFCN * clone() const
Makes a copy of the object.
virtual double objectiveValue() const
Calculates and returns the Chi-Squared.
hippodraw::FunctionBase class interface
hippodraw::DataPointTuple namespace interface
hippodraw::NTupleChiSqFCN class 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.