RAIDA  1.9.0
IFitterROOT.h
1 // -*- C++ -*-
2 #ifndef AIDA_IFITTERROOT_H
3 #define AIDA_IFITTERROOT_H 1
4 
5 #include <AIDA/IFitter.h>
6 #include <string>
7 #include <vector>
8 
9 namespace AIDA {
10 
11 class IBaseHistogram;
12 class IDataPointSet;
13 class IFitData;
14 class IFitParameterSettings;
15 class IFitResult;
16 class IFunction;
17 
24 class IFitterROOT : public IFitter {
25 
26 public:
28  virtual ~IFitterROOT() { /* nop */; }
29 
30  IFitterROOT() { /* nop */; }
31 
39  virtual IFitResult * fit(IFitData & fitData, IFunction & func) ;
40 
49  virtual IFitResult * fit(IBaseHistogram & hist, IFunction & func) ;
50 
59  virtual IFitResult * fit(IBaseHistogram & hist,
60  const std::string & model) ;
61 
72  virtual IFitResult * fit(IBaseHistogram & hist,
73  const std::string & model,
74  const std::vector<double> & initialParameters) ;
75 
85  virtual IFitResult * fit(IDataPointSet & dataPointSet,
86  IFunction & f) ;
87 
97  virtual IFitResult * fit(IDataPointSet & dataPointSet,
98  const std::string & model) ;
99 
111  virtual IFitResult * fit(IDataPointSet & dataPointSet,
112  const std::string & model,
113  const std::vector<double> & initialParameters) ;
114 
116  virtual IFitResult * fit(IFitData & d, const std::string & model) ;
117 
118  virtual IFitResult * fit(IFitData & d,
119  const std::string & model,
120  const std::vector<double> & initialParameters) ;
121 
129  virtual bool setEngine(const std::string & name) ;
130 
135  virtual std::string engineName() ;
136 
148  virtual IFitParameterSettings & fitParameterSettings(const std::string & name) ;
149 
153  virtual std::vector<std::string> listParameterSettings() ;
154 
158  virtual void resetParameterSettings() ;
159 
164  virtual bool setConstraint(const std::string & expr) ;
165 
167  virtual std::vector<std::string> constraints() ;
168 
172  virtual void resetConstraints() ;
173 
180  virtual bool setFitMethod(const std::string & name) ;
181 
186  virtual std::string fitMethodName() ;
187 
194  virtual IDataPointSet * createScan1D(IFitData & d,
195  IFunction & f,
196  const std::string & par,
197  int npts, double pmin, double pmax) ;
198 
203  virtual IDataPointSet * createContour(IFitData & d,
204  IFitResult & r,
205  const std::string & par1,
206  const std::string & par2,
207  int npts, double up) ;
208 
215  virtual void setUseFunctionGradient(bool useGrad) ;
216 
222  virtual bool useFunctionGradient() ;
223 
224 }; // class
225 } // namespace AIDA
226 #endif /* ifndef AIDA_IFITTERROOT_H */
virtual bool setEngine(const std::string &name)
Set the optimization engine which is used internally for fitting.
Definition: IFitterROOT.cc:95
virtual void resetConstraints()
Reset all the constraints.
Definition: IFitterROOT.cc:139
virtual std::string fitMethodName()
Get the name of the fit method currently in use.
Definition: IFitterROOT.cc:150
virtual IFitResult * fit(IFitData &fitData, IFunction &func)
Fit an IFunction to an IFitData.
Definition: IFitterROOT.cc:23
virtual void setUseFunctionGradient(bool useGrad)
Choose between using or not using the analytical derivatives if provided by the function.
Definition: IFitterROOT.cc:177
virtual void resetParameterSettings()
Reset all parameter settings which fitter remebers.
Definition: IFitterROOT.cc:121
virtual IDataPointSet * createScan1D(IFitData &d, IFunction &f, const std::string &par, int npts, double pmin, double pmax)
Create a 1D scan of the fit quality for given parameter &#39;par&#39; of the function.
Definition: IFitterROOT.cc:156
virtual std::vector< std::string > constraints()
Get the list of all constraints.
Definition: IFitterROOT.cc:132
virtual bool setConstraint(const std::string &expr)
Set a general constraint in the parameter space.
Definition: IFitterROOT.cc:126
virtual std::vector< std::string > listParameterSettings()
Get a vector of names of all parameter settings defined in the fitter.
Definition: IFitterROOT.cc:114
virtual ~IFitterROOT()
Destructor.
Definition: IFitterROOT.h:28
virtual IDataPointSet * createContour(IFitData &d, IFitResult &r, const std::string &par1, const std::string &par2, int npts, double up)
Create a 2D contour spanned on &#39;par1&#39; and &#39;par2&#39;, with given number of npts points.
Definition: IFitterROOT.cc:166
virtual bool setFitMethod(const std::string &name)
Set the fit method type.
Definition: IFitterROOT.cc:144
virtual bool useFunctionGradient()
Check if the IFitter is set to use the analytical derivatives provided by the IFunction.
Definition: IFitterROOT.cc:182
virtual IFitParameterSettings & fitParameterSettings(const std::string &name)
Access to fit parameter settings.
Definition: IFitterROOT.cc:107
Dummy implementation of the class &quot;IFitter&quot;.
Definition: IFitterROOT.h:24
Fitter performs fits, scans and computes contours.
Definition: IFitter.h:39
virtual std::string engineName()
Get the name of the engine currently in use.
Definition: IFitterROOT.cc:101