-
Notifications
You must be signed in to change notification settings - Fork 68
Fitting
gavalian edited this page Aug 1, 2018
·
4 revisions
Take the first histogram demo. Now you can take that histogram and fit it with a function.
F1D f1 = new F1D("f1","[amp]*gaus(x,[mean],[sigma])", -5.0, 5.0);
f1.setParameter(0, 100.0);
f1.setParameter(1, 0.0);
f1.setParameter(2, 1.0);
DataFitter.fit(f1, histogram, "Q"); //No options uses error for sigma
canvas.draw(f1,"same");
System.out.println(" par = " + f1.parameter(0).value()
+ " error = " + f1.parameter(0).error());