import hep.aida.*;
public class jaida_FitDataPointSet {
public static void main(String[] argv) {
IAnalysisFactory af = IAnalysisFactory.create();
ITree tree = af.createTreeFactory().create();
IDataPointSetFactory dpsf = af.createDataPointSetFactory(tree);
IFunctionFactory funcF = af.createFunctionFactory(tree);
IFitFactory fitF = af.createFitFactory();
IFitter fitter = fitF.createFitter("Chi2","uncmin");
// Create a two dimensional IDataPointSet.
IDataPointSet dataPointSet = dpsf.create("dataPointSet","two dimensional IDataPointSet",2);
// Fill the two dimensional IDataPointSet
double[] yVals2D = { 0.12, 0.22, 0.35, 0.42, 0.54 , 0.61 };
double[] yErrP2D = { 0.01, 0.02, 0.03, 0.03, 0.04 , 0.04 };
double[] yErrM2D = { 0.02, 0.02, 0.02, 0.04, 0.06 , 0.05 };
double[] xVals2D = { 1.5, 2.6, 3.4, 4.6, 5.5 , 6.4 };
double[] xErrP2D = { 0.5, 0.5, 0.4, 0.4, 0.5 , 0.5 };
for ( int i = 0; i
Ads help maintain this website.