20 #include "StFastCircleFitter.hh"
26 cout <<
"This program tests the StFastCircleFitter class" << endl;
27 cout <<
"-----------------------------------------------" << endl;
31 const unsigned int nPoints = 42;
32 const double x0 = 10.23;
33 const double y0 = 0.018;
34 const double r = 19.91;
38 cout <<
"Input: x0 = " << x0 << endl;
39 cout <<
" y0 = " << y0 << endl;
40 cout <<
" r = " << r << endl;
41 cout <<
" n = " << nPoints << endl;
43 for (i=0; i<nPoints; i++) {
45 fitter.addPoint(r*cos(phi)+x0, r*sin(phi)+y0);
49 cout <<
"Fit 1: x0 = " << fitter.xcenter() << endl;
50 cout <<
" y0 = " << fitter.ycenter() << endl;
51 cout <<
" r = " << fitter.radius() << endl;
52 cout <<
" n = " << fitter.numberOfPoints() << endl;
56 for (i=0; i<nPoints; i++) {
58 fitter.addPoint(r*cos(phi)+x0, r*sin(phi)+y0);
62 cout <<
"Fit 2: x0 = " << fitter.xcenter() << endl;
63 cout <<
" y0 = " << fitter.ycenter() << endl;
64 cout <<
" r = " << fitter.radius() << endl;
65 cout <<
" n = " << fitter.numberOfPoints() << endl;
67 cout <<
"done\n" << endl;