|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.HFitter
public class HFitter
Fit data (H1D or P1D). Some details can be found in http://confluence.slac.stanford .edu/display/JAS3/Functions+and+Fitting+Users+Guide
Constructor Summary | |
---|---|
HFitter()
Create a fitter with Chi2 method by default |
|
HFitter(java.lang.String method)
Create a fitter using some method. |
Method Summary | |
---|---|
void |
addFunc(java.lang.String name,
hep.aida.IFunction f)
Add a new function to catalog |
void |
doc()
Show online documentation. |
void |
fit(H1D h1d)
Fit histogram |
void |
fit(H2D h2d)
Fit H2D histogram |
void |
fit(P1D p1d)
Fit P1D |
void |
fit(PND pnd)
Fit PND (all errors set to be zero). |
java.lang.String[] |
getFitEngines()
Return available fit engines. |
java.lang.String[] |
getFitMethod()
Return available fit methods. |
hep.aida.IFunction |
getFittedFunc()
Get results of the fit in form of function |
hep.aida.IFitter |
getFitter()
Return Jaida fitter |
hep.aida.IFunction |
getFunc()
Return function |
java.lang.String[] |
getFuncCatalog()
Return list of available functions |
double |
getPar(java.lang.String name)
Get parameter value |
hep.aida.IFitResult |
getResult()
Get result of the fit. |
void |
setFunc(hep.aida.IFunction func)
Set fit functions |
void |
setFunc(java.lang.String func)
Set fit functions from predefined string. |
void |
setFunc(java.lang.String name,
int dimension,
java.lang.String function,
java.lang.String parameters)
Set functions from a script. |
void |
setPar(java.lang.String name,
double value)
Set parameter to a value |
void |
setParConstraint(java.lang.String constraint)
Set parameter constraint Example: Set parameter "mean1" to be identical to "mean2" as: "mean1=mean2" |
void |
setParFixed(java.lang.String name)
Fix a given parameter to a constant value |
void |
setParFixed(java.lang.String name,
boolean fix)
Fix a given parameter to a constant value or not |
void |
setParRange(java.lang.String name,
double min,
double max)
Set range for parameter during the fit |
void |
setParStep(java.lang.String name,
double step)
Set step size for parameter (say 0.01) |
void |
setRange(double rmin,
double rmax)
Set range for fitting for 1D objects (H1D, P1D) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HFitter(java.lang.String method)
When a function is provided to the fitter the user has to be aware that the AIDA prescription is to leave the input function unchanged, create a clone, do the fit on the clone and return the clone in the fit result. There advantage to this approach is that the input function can be reused as is for multiple identical fits while the fitted-cloned function is left unchanged in the fit result. The default is noClone=false.
method
- the fit method (Could be: uml, leastsquares, cleverchi2, chi2,
bml)public HFitter()
Method Detail |
---|
public java.lang.String[] getFitMethod()
public void addFunc(java.lang.String name, hep.aida.IFunction f)
name
- function namef
- input functionpublic java.lang.String[] getFitEngines()
public void setFunc(hep.aida.IFunction func)
public java.lang.String[] getFuncCatalog()
public void setFunc(java.lang.String func)
func
- string: G (Gaussian),E (exponential),landau (landa),pow (power
law), and polynomial: P0,P1,P2,P3..public double getPar(java.lang.String name)
name
- parameter name
public void setPar(java.lang.String name, double value)
name
- parameter namevalue
- value to be set.public void setParStep(java.lang.String name, double step)
name
- parameter namestep
- step used in minimizationpublic void setParFixed(java.lang.String name)
name
- parameter name to be fixedpublic void setParFixed(java.lang.String name, boolean fix)
name
- parameter name to be fixed or notfix
- true if the parameter should be fixed.public void setParRange(java.lang.String name, double min, double max)
name
- parameter namemin
- min valuemax
- max valuepublic void setParConstraint(java.lang.String constraint)
constraint
- public hep.aida.IFunction getFunc()
public void setFunc(java.lang.String name, int dimension, java.lang.String function, java.lang.String parameters)
name
- function namedimension
- dimensionfunction
- string representing a functionparameters
- parameters (use comma)public void fit(H1D h1d)
h1d
- input H1Dpublic void fit(P1D p1d)
p1d
- input P1Dpublic void fit(PND pnd)
pnd
- input P1Dpublic void fit(H2D h2d)
h2d
- input H2D histogrampublic void setRange(double rmin, double rmax)
rmin
- Min X valuermax
- Max Y valuepublic hep.aida.IFitter getFitter()
public hep.aida.IFunction getFittedFunc()
public hep.aida.IFitResult getResult()
public void doc()
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |