|
FreeHEP API Version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Fitter performs fits, scans and computes contours. Fitter never stores association to the data and functions which are used for fitting. Results of the fit are availabe in the IFitResult object, which also remebers the initial fit configuration.
Method Summary | |
String[] |
constraints()
|
IDataPointSet |
createContour(IFitData d,
IFitResult r,
String par1,
String par2,
int npts,
double up)
|
IDataPointSet |
createScan1D(IFitData d,
IFunction f,
String par,
int npts,
double pmin,
double pmax)
|
String |
engineName()
Get the name of the engine currently in use. |
IFitResult |
fit(IBaseHistogram hist,
IFunction func)
Shortcut to fit an IBaseHistogram directly with an IFunction. |
IFitResult |
fit(IBaseHistogram hist,
String model)
Shortcut to fit an IBaseHistogram directly with an IFunction. |
IFitResult |
fit(IBaseHistogram hist,
String model,
double[] initialParameters)
Shortcut to fit an IBaseHistogram directly with an IFunction. |
IFitResult |
fit(IDataPointSet dataPointSet,
IFunction f)
Shortcut to fit an IDataPointSet directly with an IFunction. |
IFitResult |
fit(IDataPointSet dataPointSet,
String model)
Shortcut to fit an IDataPointSet directly with an IFunction. |
IFitResult |
fit(IDataPointSet dataPointSet,
String model,
double[] initialParameters)
Shortcut to fit an IDataPointSet directly with an IFunction. |
IFitResult |
fit(IFitData fitData,
IFunction func)
Fit an IFunction to an IFitData. |
IFitResult |
fit(IFitData d,
String model)
|
IFitResult |
fit(IFitData d,
String model,
double[] initialParameters)
|
String |
fitMethodName()
Get the name of the fit method currently in use. |
IFitParameterSettings |
fitParameterSettings(String name)
Access to fit parameter settings. |
String[] |
listParameterSettings()
Get a vector of names of all parameter settings defined in the fitter. |
void |
resetConstraints()
Reset all the constraints. |
void |
resetParameterSettings()
Reset all parameter settings which fitter remebers. |
void |
setConstraint(String expr)
Set a general constraint in the parameter space. |
void |
setEngine(String name)
Set the optimization engine which is used internally for fitting. |
void |
setFitMethod(String name)
Set the fit method type. |
void |
setUseFunctionGradient(boolean useGrad)
Choose between using or not using the analytical derivatives if provided by the function. |
boolean |
useFunctionGradient()
Check if the IFitter is set to use the analytical derivatives provided by the IFunction. |
Method Detail |
public IFitResult fit(IFitData fitData, IFunction func)
fitData
- The IFitData to be fitted.func
- The IFunction to fit on the data.
public IFitResult fit(IBaseHistogram hist, IFunction func)
hist
- The IBaseHistogram to be fitted.func
- The IFunction to fit on the data.
public IFitResult fit(IBaseHistogram hist, String model)
hist
- The IBaseHistogram to be fitted.model
- The string defining the function to be used.
public IFitResult fit(IBaseHistogram hist, String model, double[] initialParameters)
hist
- The IBaseHistogram to be fitted.model
- The string defining the function to be used.initialParameters
- The array of the initial parameter values; its size must match the number of
parameters in the function.
public IFitResult fit(IDataPointSet dataPointSet, IFunction f)
dataPointSet
- The IDataPointSet to be fitted.
public IFitResult fit(IDataPointSet dataPointSet, String model)
dataPointSet
- The IDataPointSet to be fitted.model
- The string defining the function to be used.
public IFitResult fit(IDataPointSet dataPointSet, String model, double[] initialParameters)
dataPointSet
- The IDataPointSet to be fitted.model
- The string defining the function to be used.initialParameters
- The array of the initial parameter values; its size must match the number of
parameters in the function.
public IFitResult fit(IFitData d, String model)
public IFitResult fit(IFitData d, String model, double[] initialParameters)
public void setEngine(String name) throws IllegalArgumentException
name
- The name of the optimizer engine.
Examples of predefined engines: "minuit". The engine name is case-insensitive.
Different engines are provided by different implementations.
IllegalArgumentException
- If the name does not correspond to a valid engine.public String engineName()
public IFitParameterSettings fitParameterSettings(String name)
public String[] listParameterSettings()
public void resetParameterSettings()
public void setConstraint(String expr) throws IllegalArgumentException
IllegalArgumentException
public String[] constraints()
public void resetConstraints()
public void setFitMethod(String name) throws IllegalArgumentException
name
- The name of the fit method.
IllegalArgumentException
- If the name does not correspond to a valid fit method.public String fitMethodName()
public IDataPointSet createScan1D(IFitData d, IFunction f, String par, int npts, double pmin, double pmax)
public IDataPointSet createContour(IFitData d, IFitResult r, String par1, String par2, int npts, double up)
public void setUseFunctionGradient(boolean useGrad)
useGrad
- If true
the IFitter will use the
analytical derivatives if provided by the IFunction.public boolean useFunctionGradient()
true
if the IFitter uses the analytical derivatives.
|
FreeHEP API Version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |