14 #include "msdevstudio/MSconfig.h" 43 m_target ( targetProjector ),
172 return Range ( 0, 0 );
236 const vector < int > & fixed =
m_fitter -> getFixedFlags ();
238 for(
int i = 0; i < num_parms; i++ ) {
239 if ( fixed [ i ] == 0 ) {
251 const vector < double > &
261 std::vector < double > :: const_iterator end )
263 unsigned int size = std::distance ( begin, end );
303 if ( myParams.size() == params.size() ) {
309 const vector < vector < double > > &
double objectiveValue() const
Returns the objective value (chi2 or likelihood) between the function and the data.
AxisModelBase * m_x_axis
The AxisModel along the X axis.
hippodraw::FunctionBase class interface
virtual void fillProjectedValues(DataSource *ntuple, bool in_range=false) const
Does nothing.
virtual const Range & getRange(Axes::Type) const
Returns the Range along the specified axis.
int degreesOfFreedom() const
Returns the number of degrees of freedom in the fit.
A concreate implementation of the FunctionHelper class.
std::vector< double > m_principleErrors
The principle errors of the errors associated with the parameters of the function.
virtual void setFitCut(TupleCut *cut)
Sets the cut to limit range of fitting.
virtual const std::vector< double > & getParameters() const
Returns the values of the parameters as a vector.
void initializeFunction(ProjectorBase *projector)
Gives the function object initial values based on a given data projector.
FunctionBase * m_function
The list of function objects to be projected.
void setFitter(Fitter *fitter)
Sets the Fitter to be used.
hippodraw::AxisModelBase class interface
virtual const std::string & getXLabel() const
Finds the X axis label of the plot.
virtual bool isEmpty() const
Implements ProjectorBase.
virtual int calcDegreesOfFreedom() const
Returns the number of degrees of freedom in the fit.
FunctionProjector(FunctionBase *function, ProjectorBase *targetProjector)
This constructor takes a FunctionBase object and its target data projector.
int getUnderflow() const
Returns the number of underflow.
const std::vector< std::vector< double > > & covariance() const
Returns the covariance matrix.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
virtual bool calcBestFit()=0
Calculates the best fit.
Fitter * m_fitter
A fitter object for the function.
const std::vector< double > & principleErrors() const
Returns the principle diagonal of the covariance matrix.
virtual void addPointReps()
Function to add the acceptable point reps.
int getOverflow() const
Returns the number of overflow.
AxisModelBase * m_y_axis
The AxisModel along the Y axis.
virtual double getPosOn(hippodraw::Axes::Type) const
Returns the minimum positive value.
hippodraw::NTuple class interface.
Base class for DataSource.
FunctionBase * function() const
Returns a pointer to the contained function.
virtual const std::string & getYLabel(bool density=false) const
Finds the Y axis label of the plot.
virtual void initialParameters(const FunctionHelper *helper)
Sets the FunctionHelper so that the function can calculate a reasonable set of initial parameter valu...
std::vector< std::vector< double > > m_covariance
The error covariance matrix of the errors associated with the parameters of the function.
intp size(numeric::array arr)
virtual double objectiveValue() const
Calculates the value of the objective function at the current set of parameters.
const DataSource * getProjectedValues() const
Returns DataSource representation of projected values.
std::string m_z_label
Dummy member so getZLabel member can return reference.
const std::string & getZLabel() const
Is meaningless for this projector.
bool hasSavedParameters() const
Returns true if the function's parameters have been saved.
ProjectorBase * m_target
The ProjectorBase object containing the data points for the function and fitter.
std::vector< double > m_save_parms
A vector used to save parameters so that they can be restored.
virtual ProjectorBase * clone()
virtual DataSource * createNTuple() const
Returns a null pointer.
void setParameters(const std::vector< double > ¶ms)
Set the parameter values by hand.
Expresses a range of values.
The base class for the Projector hierarchy.
A function that can be added to a DataRep and used in a fitter.
The base class for fitters.
AxisModelBase * m_z_axis
The AxisModel along the Z axis.
virtual void setFitRange(bool yes=true)
Sets use of a fitting range on or off.
static std::string s_x_label
An X label that might be used.
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of the raw data.
virtual const std::string & getTitle() const
Finds the title of the plot.
void setPrincipleErrors(std::vector< double > ::const_iterator first, std::vector< double > ::const_iterator last)
Sets the principle errors.
void saveParameters()
Makes a copy of the function's parameter values.
Fitter * getFitter() const
Returns the Fitter that is in use.
void restoreParameters()
Restores the function's parameter values from the previously saved values.
hippodraw::FunctionProjector class interface
bool fitFunction()
Fits the function.
virtual void setParameters(const std::vector< double > &incr)
Sets the parameter values.
const std::string & name() const
Returns the name of the function.
virtual void setRange(hippodraw::Axes::Type, bool)
Sets the range of the selected axis.
A projector that plots one function.
virtual ~FunctionProjector()
The virtual destructor.
ProjectorHelper class interface.
void calcPrincipleErrors() const
Calculates the principle errors from the fit.
virtual Range valueRange() const
The AxisModelBase class maintains the Range and scaling of an axis.
int getNumberOfEntries() const
A call to this member function is meaningless.
The class expresses a cut on a DataSource, i.e.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
hippodraw::Fitter class interface