13 #include "msdevstudio/MSconfig.h" 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 );
hippodraw::FunctionBase class interface
A namespace to set the standard for indexing into 2 dimension data point tuple.
hippodraw::NTupleChiSqFCN class interface
virtual bool needsIntegrated() const
Returns true if data points were integrated.
virtual double up() const
bool acceptRow(unsigned int row) const
Returns true if the DataSource row row is within the fit Range.
virtual double operator()(const std::vector< double > &parms) const
Sets the model function parameters to parms and returns the objective value.
const DataSource * m_ntuple
The data source containing the data points for the fitter.
A derived class for FCNBase class.
A derived class of StatedFCN This class gets its data points from a DataSource.
virtual double objectiveValue() const
Calculates and returns the Chi-Squared.
hippodraw::DataSource class interface.
FunctionBase * m_function
The flags to indicated which parameters are to be held fixed during minimization of this objective fu...
virtual StatedFCN * clone() const
Makes a copy of the object.
hippodraw::DataPointTuple namespace interface
A Chi-squared functor class.
A namespace to set the standard for indexing into 3 dimension data point tuple.
NTupleChiSqFCN()
The default constructor.
bool m_has_errors
Error use flag.
int getErrorColumn() const
Returns the index to the column containing error on the value coordinate.
std::vector< int > m_indices
The indexes into the DataSource.