{
"cells": [
{
"cell_type": "markdown",
"id": "d9699c6f",
"metadata": {},
"source": [
"# fitCircle\n",
"Generate points distributed with some errors around a circle\n",
"Fit a circle through the points and draw\n",
"To run the script, do, eg\n",
"\n",
"```cpp\n",
" root > .x fitCircle.C (10000 points by default)\n",
" root > .x fitCircle.C(100); (with only 100 points\n",
" root > .x fitCircle.C++(100000); with ACLIC\n",
"```\n",
"\n",
"\n",
"\n",
"\n",
"**Author:** Rene Brun \n",
"This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:24 PM."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "16304ffa",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:24:45.049874Z",
"iopub.status.busy": "2026-05-19T20:24:45.049728Z",
"iopub.status.idle": "2026-05-19T20:24:45.052985Z",
"shell.execute_reply": "2026-05-19T20:24:45.052308Z"
}
},
"outputs": [],
"source": [
"%%cpp -d\n",
"#include \"TCanvas.h\"\n",
"#include \"TRandom3.h\"\n",
"#include \"TGraph.h\"\n",
"#include \"TMath.h\"\n",
"#include \"TArc.h\"\n",
"#include \"Fit/Fitter.h\"\n",
"#include