jhplot
Class HFit

java.lang.Object
  extended by jhplot.HFit

public class HFit
extends Object

Main class for fit data or histograms.


Constructor Summary
HFit()
          Show an empty fit frame.
HFit(HPlot c1, H1D h1)
          Show a fit frame for a selected histogram.
HFit(HPlot c1, P1D p1)
          Show a fit frame for a selected histogram.
HFit(HPlot hplot, String hplot_name)
          Show an empty fit frame and pass HPlot object.
HFit(HPlot hplot, String shplot, Object ph, String sph)
          Show a fit frame for a selected histogram.
 
Method Summary
 void addFunc(String name, String tooltip, String definition, String param)
          Add a user 1D function in form of a string.
 void doc()
          Show online documentation.
 void load(H1D h1, String h1_name)
          Load a histogram for a fit
 void load(P1D p1, String p1_name)
          Load data for a fit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HFit

public HFit()
Show an empty fit frame.


HFit

public HFit(HPlot hplot,
            String hplot_name)
Show an empty fit frame and pass HPlot object.

Parameters:
hplot - HPlot canvas where fit results are plotted
hplot_name - name of this canvas

HFit

public HFit(HPlot c1,
            H1D h1)
Show a fit frame for a selected histogram. For code generation, it assumes c1 and p1 names.

Parameters:
c1 - HPlot canvas where fit results are plotted
h1 - input H1D histogram

HFit

public HFit(HPlot c1,
            P1D p1)
Show a fit frame for a selected histogram. For code generation, it assumes c1 and p1 names.

Parameters:
c1 - HPlot canvas where fit results are plotted
p1 - input P1D data

HFit

public HFit(HPlot hplot,
            String shplot,
            Object ph,
            String sph)
Show a fit frame for a selected histogram. This is the most convinient method, as the user pass only strings, and a reflection mechanism will try to detect the object. This is important if the user want to generate source code automatically.

Parameters:
hplot - HPlot canvas where fit results are plotted
shplot - String representation of hplot HPlot canvas where fit results are plotted
ph - input P1D or H1D object
sph - String representation of P1D or H1D object
Method Detail

addFunc

public void addFunc(String name,
                    String tooltip,
                    String definition,
                    String param)
Add a user 1D function in form of a string. Use the standard JAIDA string to define the function. Since the function is 1D, use x[0] instead of x, and define the parameters as "a,b,c".

Parameters:
name - Short name
tooltip - Tool tip to be shown
definition - representing the user function using JAIDA
param - representing parameter names (use comma to separate)

load

public void load(H1D h1,
                 String h1_name)
Load a histogram for a fit

Parameters:
h1 - input H1D histogram
h1_name - name of this object in the code

load

public void load(P1D p1,
                 String p1_name)
Load data for a fit

Parameters:
p1 - input p1D data
p1_name - name of this object in the code

doc

public void doc()
Show online documentation.



jHepWork 3.1 ©