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