{
"cells": [
{
"cell_type": "markdown",
"id": "35cdcc83",
"metadata": {},
"source": [
"# rf403_weightedevts\n",
"Data and categories: using weights in unbinned datasets\n",
"\n",
"\n",
"\n",
"\n",
"**Author:** Wouter Verkerke \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:31 PM."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "edef15fb",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:37.747874Z",
"iopub.status.busy": "2026-05-19T20:31:37.747770Z",
"iopub.status.idle": "2026-05-19T20:31:38.065292Z",
"shell.execute_reply": "2026-05-19T20:31:38.064670Z"
}
},
"outputs": [],
"source": [
"using namespace RooFit;"
]
},
{
"cell_type": "markdown",
"id": "33e73351",
"metadata": {},
"source": [
"Create observable and unweighted dataset\n",
"-------------------------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "1e119c37",
"metadata": {},
"source": [
"Declare observable"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "5686609b",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:38.066849Z",
"iopub.status.busy": "2026-05-19T20:31:38.066733Z",
"iopub.status.idle": "2026-05-19T20:31:38.274833Z",
"shell.execute_reply": "2026-05-19T20:31:38.274199Z"
}
},
"outputs": [],
"source": [
"RooRealVar x(\"x\", \"x\", -10, 10);\n",
"x.setBins(40);"
]
},
{
"cell_type": "markdown",
"id": "5a6f4568",
"metadata": {},
"source": [
"Construction a uniform pdf"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "2e028875",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:38.276355Z",
"iopub.status.busy": "2026-05-19T20:31:38.276241Z",
"iopub.status.idle": "2026-05-19T20:31:38.484359Z",
"shell.execute_reply": "2026-05-19T20:31:38.483679Z"
}
},
"outputs": [],
"source": [
"RooPolynomial p0(\"px\", \"px\", x);"
]
},
{
"cell_type": "markdown",
"id": "4b8756e3",
"metadata": {},
"source": [
"Sample 1000 events from pdf"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "0c4662e5",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:38.485897Z",
"iopub.status.busy": "2026-05-19T20:31:38.485780Z",
"iopub.status.idle": "2026-05-19T20:31:38.694125Z",
"shell.execute_reply": "2026-05-19T20:31:38.693597Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_51:2:2: warning: 'data' shadows a declaration with the same name in the 'std' namespace; use '::data' to reference this declaration\n",
" std::unique_ptr data{p0.generate(x, 1000)};\n",
" ^\n"
]
}
],
"source": [
"std::unique_ptr data{p0.generate(x, 1000)};"
]
},
{
"cell_type": "markdown",
"id": "975fec5a",
"metadata": {},
"source": [
"Calculate weight and make dataset weighted\n",
"-----------------------------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "c42019b7",
"metadata": {},
"source": [
"Construct formula to calculate (fake) weight for events"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "d59dc5d2",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:38.695667Z",
"iopub.status.busy": "2026-05-19T20:31:38.695524Z",
"iopub.status.idle": "2026-05-19T20:31:38.903646Z",
"shell.execute_reply": "2026-05-19T20:31:38.902996Z"
}
},
"outputs": [],
"source": [
"RooFormulaVar wFunc(\"w\", \"event weight\", \"(x*x+10)\", x);"
]
},
{
"cell_type": "markdown",
"id": "dcfb0bcf",
"metadata": {},
"source": [
"Add column with variable w to previously generated dataset"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "b0ac4ba1",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:38.909741Z",
"iopub.status.busy": "2026-05-19T20:31:38.909584Z",
"iopub.status.idle": "2026-05-19T20:31:39.118369Z",
"shell.execute_reply": "2026-05-19T20:31:39.117815Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_59:2:2: error: reference to 'data' is ambiguous\n",
" data->addColumn(wFunc);\n",
" ^\n",
"input_line_51:2:30: note: candidate found by name lookup is 'data'\n",
" std::unique_ptr data{p0.generate(x, 1000)};\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:344:5: note: candidate found by name lookup is 'std::data'\n",
" data(initializer_list<_Tp> __il) noexcept\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:312:5: note: candidate found by name lookup is 'std::data'\n",
" data(_Container& __cont) noexcept(noexcept(__cont.data()))\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:323:5: note: candidate found by name lookup is 'std::data'\n",
" data(const _Container& __cont) noexcept(noexcept(__cont.data()))\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:334:5: note: candidate found by name lookup is 'std::data'\n",
" data(_Tp (&__array)[_Nm]) noexcept\n",
" ^\n"
]
}
],
"source": [
"data->addColumn(wFunc);"
]
},
{
"cell_type": "markdown",
"id": "55173072",
"metadata": {},
"source": [
"Dataset d is now a dataset with two observable (x,w) with 1000 entries"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "22484899",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:39.127584Z",
"iopub.status.busy": "2026-05-19T20:31:39.127453Z",
"iopub.status.idle": "2026-05-19T20:31:39.358935Z",
"shell.execute_reply": "2026-05-19T20:31:39.358370Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_60:2:2: error: reference to 'data' is ambiguous\n",
" data->Print();\n",
" ^\n",
"input_line_51:2:30: note: candidate found by name lookup is 'data'\n",
" std::unique_ptr data{p0.generate(x, 1000)};\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:344:5: note: candidate found by name lookup is 'std::data'\n",
" data(initializer_list<_Tp> __il) noexcept\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:312:5: note: candidate found by name lookup is 'std::data'\n",
" data(_Container& __cont) noexcept(noexcept(__cont.data()))\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:323:5: note: candidate found by name lookup is 'std::data'\n",
" data(const _Container& __cont) noexcept(noexcept(__cont.data()))\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:334:5: note: candidate found by name lookup is 'std::data'\n",
" data(_Tp (&__array)[_Nm]) noexcept\n",
" ^\n"
]
}
],
"source": [
"data->Print();"
]
},
{
"cell_type": "markdown",
"id": "50b531f8",
"metadata": {},
"source": [
"Create a new dataset wdata where w is interpreted as event weight rather than as observable"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "6d72ed94",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:39.367641Z",
"iopub.status.busy": "2026-05-19T20:31:39.367486Z",
"iopub.status.idle": "2026-05-19T20:31:39.573836Z",
"shell.execute_reply": "2026-05-19T20:31:39.573520Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_61:2:19: error: reference to 'data' is ambiguous\n",
" RooDataSet wdata(data->GetName(), data->GetTitle(), *data->get(), Import(*data), WeightVar(\"w\"));\n",
" ^\n",
"input_line_51:2:30: note: candidate found by name lookup is 'data'\n",
" std::unique_ptr data{p0.generate(x, 1000)};\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:344:5: note: candidate found by name lookup is 'std::data'\n",
" data(initializer_list<_Tp> __il) noexcept\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:312:5: note: candidate found by name lookup is 'std::data'\n",
" data(_Container& __cont) noexcept(noexcept(__cont.data()))\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:323:5: note: candidate found by name lookup is 'std::data'\n",
" data(const _Container& __cont) noexcept(noexcept(__cont.data()))\n",
" ^\n",
"/usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/range_access.h:334:5: note: candidate found by name lookup is 'std::data'\n",
" data(_Tp (&__array)[_Nm]) noexcept\n",
" ^\n",
"input_line_61:2:19: error: unknown type name 'data'\n",
" RooDataSet wdata(data->GetName(), data->GetTitle(), *data->get(), Import(*data), WeightVar(\"w\"));\n",
" ^\n",
"input_line_61:2:23: error: expected ')'\n",
" RooDataSet wdata(data->GetName(), data->GetTitle(), *data->get(), Import(*data), WeightVar(\"w\"));\n",
" ^\n",
"input_line_61:2:18: note: to match this '('\n",
" RooDataSet wdata(data->GetName(), data->GetTitle(), *data->get(), Import(*data), WeightVar(\"w\"));\n",
" ^\n"
]
}
],
"source": [
"RooDataSet wdata(data->GetName(), data->GetTitle(), *data->get(), Import(*data), WeightVar(\"w\"));"
]
},
{
"cell_type": "markdown",
"id": "728521b0",
"metadata": {},
"source": [
"Dataset d is now a dataset with one observable (x) with 1000 entries and a sum of weights of ~430K"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "0fa5b04c",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:39.588154Z",
"iopub.status.busy": "2026-05-19T20:31:39.588025Z",
"iopub.status.idle": "2026-05-19T20:31:39.818273Z",
"shell.execute_reply": "2026-05-19T20:31:39.812507Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_63:2:3: error: use of undeclared identifier 'wdata'\n",
" (wdata.Print())\n",
" ^\n",
"Error in : Error evaluating expression (wdata.Print())\n",
"Execution of your code was aborted.\n"
]
}
],
"source": [
"wdata.Print();"
]
},
{
"cell_type": "markdown",
"id": "b6bde250",
"metadata": {},
"source": [
"Unbinned ML fit to weighted data\n",
"---------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "62d4ff11",
"metadata": {},
"source": [
"Construction quadratic polynomial pdf for fitting"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "f95ae9c8",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:39.820004Z",
"iopub.status.busy": "2026-05-19T20:31:39.819878Z",
"iopub.status.idle": "2026-05-19T20:31:40.028333Z",
"shell.execute_reply": "2026-05-19T20:31:40.027784Z"
}
},
"outputs": [],
"source": [
"RooRealVar a0(\"a0\", \"a0\", 1);\n",
"RooRealVar a1(\"a1\", \"a1\", 0, -1, 1);\n",
"RooRealVar a2(\"a2\", \"a2\", 1, 0, 10);\n",
"RooPolynomial p2(\"p2\", \"p2\", x, RooArgList(a0, a1, a2), 0);"
]
},
{
"cell_type": "markdown",
"id": "e7cd2d3f",
"metadata": {},
"source": [
"Fit quadratic polynomial to weighted data"
]
},
{
"cell_type": "markdown",
"id": "6ee7b9d9",
"metadata": {},
"source": [
"NOTE: A plain Maximum likelihood fit to weighted data does in general\n",
"NOT result in correct error estimates, unless individual\n",
"event weights represent Poisson statistics themselves.\n",
"\n",
"Fit with 'wrong' errors"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "1c93b890",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:40.037753Z",
"iopub.status.busy": "2026-05-19T20:31:40.037613Z",
"iopub.status.idle": "2026-05-19T20:31:40.254119Z",
"shell.execute_reply": "2026-05-19T20:31:40.253738Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_65:2:57: error: cannot initialize an array element of type 'void *' with an rvalue of type 'RooCmdArg (*)(bool)'\n",
" std::unique_ptr r_ml_wgt{p2.fitTo(wdata, Save(), PrintLevel(-1))};\n",
" ^~~~\n",
"input_line_65:2:65: error: cannot initialize an array element of type 'void *' with an rvalue of type 'RooCmdArg (*)(Int_t)' (aka 'RooCmdArg (*)(int)')\n",
" std::unique_ptr r_ml_wgt{p2.fitTo(wdata, Save(), PrintLevel(-1))};\n",
" ^~~~~~~~~~\n"
]
}
],
"source": [
"std::unique_ptr r_ml_wgt{p2.fitTo(wdata, Save(), PrintLevel(-1))};"
]
},
{
"cell_type": "markdown",
"id": "bef88c8c",
"metadata": {},
"source": [
"A first order correction to estimated parameter errors in an\n",
"(unbinned) ML fit can be obtained by calculating the\n",
"covariance matrix as\n",
"\n",
"V' = V C-1 V\n",
"\n",
"where V is the covariance matrix calculated from a fit\n",
"to -logL = - sum [ w_i log f(x_i) ] and C is the covariance\n",
"matrix calculated from -logL' = -sum [ w_i^2 log f(x_i) ]\n",
"(i.e. the weights are applied squared)\n",
"\n",
"A fit in this mode can be performed as follows:"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "f87a76aa",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:40.262241Z",
"iopub.status.busy": "2026-05-19T20:31:40.262115Z",
"iopub.status.idle": "2026-05-19T20:31:40.477928Z",
"shell.execute_reply": "2026-05-19T20:31:40.477138Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_66:2:62: error: cannot initialize an array element of type 'void *' with an rvalue of type 'RooCmdArg (*)(bool)'\n",
" std::unique_ptr r_ml_wgt_corr{p2.fitTo(wdata, Save(), SumW2Error(true), PrintLevel(-1))};\n",
" ^~~~\n",
"input_line_66:2:70: error: cannot initialize an array element of type 'void *' with an rvalue of type 'RooCmdArg (*)(bool)'\n",
" std::unique_ptr r_ml_wgt_corr{p2.fitTo(wdata, Save(), SumW2Error(true), PrintLevel(-1))};\n",
" ^~~~~~~~~~\n",
"input_line_66:2:88: error: cannot initialize an array element of type 'void *' with an rvalue of type 'RooCmdArg (*)(Int_t)' (aka 'RooCmdArg (*)(int)')\n",
" std::unique_ptr r_ml_wgt_corr{p2.fitTo(wdata, Save(), SumW2Error(true), PrintLevel(-1))};\n",
" ^~~~~~~~~~\n"
]
}
],
"source": [
"std::unique_ptr r_ml_wgt_corr{p2.fitTo(wdata, Save(), SumW2Error(true), PrintLevel(-1))};"
]
},
{
"cell_type": "markdown",
"id": "079f29b5",
"metadata": {},
"source": [
"Plot weighed data and fit result\n",
"---------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "e998339f",
"metadata": {},
"source": [
"Construct plot frame"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "1b02fed4",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:40.491213Z",
"iopub.status.busy": "2026-05-19T20:31:40.491083Z",
"iopub.status.idle": "2026-05-19T20:31:40.696600Z",
"shell.execute_reply": "2026-05-19T20:31:40.695921Z"
}
},
"outputs": [],
"source": [
"RooPlot *frame = x.frame(Title(\"Unbinned ML fit, binned chi^2 fit to weighted data\"));"
]
},
{
"cell_type": "markdown",
"id": "64558c43",
"metadata": {},
"source": [
"Plot data using sum-of-weights-squared error rather than Poisson errors"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "1ad8adb3",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:40.698349Z",
"iopub.status.busy": "2026-05-19T20:31:40.698233Z",
"iopub.status.idle": "2026-05-19T20:31:40.907654Z",
"shell.execute_reply": "2026-05-19T20:31:40.907051Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_68:2:32: error: cannot take the address of an rvalue of type 'RooAbsData::ErrorType'\n",
" wdata.plotOn(frame, DataError(RooAbsData::SumW2));\n",
" ^~~~~~~~~~~~~~~~~\n",
"Error while creating dynamic expression for:\n",
" wdata.plotOn(frame, DataError(RooAbsData::SumW2))\n"
]
}
],
"source": [
"wdata.plotOn(frame, DataError(RooAbsData::SumW2));"
]
},
{
"cell_type": "markdown",
"id": "ba5f0967",
"metadata": {},
"source": [
"Overlay result of 2nd order polynomial fit to weighted data"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "1033fcf4",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:40.909281Z",
"iopub.status.busy": "2026-05-19T20:31:40.909167Z",
"iopub.status.idle": "2026-05-19T20:31:41.118107Z",
"shell.execute_reply": "2026-05-19T20:31:41.117504Z"
}
},
"outputs": [],
"source": [
"p2.plotOn(frame);"
]
},
{
"cell_type": "markdown",
"id": "ae5e3a0e",
"metadata": {},
"source": [
"ML Fit of pdf to equivalent unweighted dataset\n",
"-----------------------------------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "003ebbe6",
"metadata": {},
"source": [
"Construct a pdf with the same shape as p0 after weighting"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "cb6da53f",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:41.123371Z",
"iopub.status.busy": "2026-05-19T20:31:41.123231Z",
"iopub.status.idle": "2026-05-19T20:31:41.331517Z",
"shell.execute_reply": "2026-05-19T20:31:41.330857Z"
}
},
"outputs": [],
"source": [
"RooGenericPdf genPdf(\"genPdf\", \"x*x+10\", x);"
]
},
{
"cell_type": "markdown",
"id": "14bb3796",
"metadata": {},
"source": [
"Sample a dataset with the same number of events as data"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "efbb6763",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:41.333222Z",
"iopub.status.busy": "2026-05-19T20:31:41.333104Z",
"iopub.status.idle": "2026-05-19T20:31:41.542348Z",
"shell.execute_reply": "2026-05-19T20:31:41.541777Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[#1] INFO:NumericIntegration -- RooRealIntegral::init(genPdf_Int[x]) using numeric integrator RooIntegrator1D to calculate Int(x)\n",
"[#1] INFO:NumericIntegration -- RooRealIntegral::init(genPdf_Int[x]) using numeric integrator RooIntegrator1D to calculate Int(x)\n"
]
}
],
"source": [
"std::unique_ptr data2{genPdf.generate(x, 1000)};"
]
},
{
"cell_type": "markdown",
"id": "b53bdbc7",
"metadata": {},
"source": [
"Sample a dataset with the same number of weights as data"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "d89dab9a",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:41.547875Z",
"iopub.status.busy": "2026-05-19T20:31:41.547739Z",
"iopub.status.idle": "2026-05-19T20:31:41.756660Z",
"shell.execute_reply": "2026-05-19T20:31:41.756061Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[#1] INFO:NumericIntegration -- RooRealIntegral::init(genPdf_Int[x]) using numeric integrator RooIntegrator1D to calculate Int(x)\n",
"[#1] INFO:NumericIntegration -- RooRealIntegral::init(genPdf_Int[x]) using numeric integrator RooIntegrator1D to calculate Int(x)\n"
]
}
],
"source": [
"std::unique_ptr data3{genPdf.generate(x, 43000)};"
]
},
{
"cell_type": "markdown",
"id": "ff4bc47b",
"metadata": {},
"source": [
"Fit the 2nd order polynomial to both unweighted datasets and save the results for comparison"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "2a06fc7f",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:41.765232Z",
"iopub.status.busy": "2026-05-19T20:31:41.765106Z",
"iopub.status.idle": "2026-05-19T20:31:42.180521Z",
"shell.execute_reply": "2026-05-19T20:31:42.179762Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { _ZNSt10unique_ptrI13RooLinkedListSt14default_deleteIS0_EEC2IS2_vEEPS0_, _ZNSt10_Head_baseILm1ESt14default_deleteI13RooLinkedListELb1EEC2Ev, _ZSt3getILm1EJP13RooLinkedListSt14default_deleteIS0_EEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS8_, cling_module_309_, _ZSt11make_uniqueI13RooLinkedListJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_, _ZN12__cling_N53616__cling_Un1Qu336EPv, _ZN6RooFit13makeOwningPtrI12RooFitResultEEPT_OSt10unique_ptrIS2_St14default_deleteIS2_EE, _ZNSt15__uniq_ptr_dataI12RooFitResultSt14default_deleteIS0_ELb1ELb1EECI1St15__uniq_ptr_implIS0_S2_EEPS0_, _ZNSt10_Head_baseILm0EP12RooFitResultLb0EEC2Ev, _ZNSt15__uniq_ptr_dataI12RooFitResultSt14default_deleteIS0_ELb1ELb1EECI2St15__uniq_ptr_implIS0_S2_EEPS0_, _ZNSt15__uniq_ptr_implI13RooLinkedListSt14default_deleteIS0_EE6_M_ptrEv, _ZNKSt16initializer_listIPK9RooCmdArgE3endEv, _ZNSt15__uniq_ptr_implI12RooFitResultSt14default_deleteIS0_EEC2EPS0_, _ZNSt15__uniq_ptr_implI13RooLinkedListSt14default_deleteIS0_EEC2EPS0_, _ZNKSt14default_deleteI12RooFitResultEclEPS0_, _GLOBAL__sub_I_cling_module_309, _ZNKSt10unique_ptrI10RooDataSetSt14default_deleteIS0_EEdeEv, _ZN12__cling_N53610r_ml_unw10E, _ZNSt15__uniq_ptr_implI12RooFitResultSt14default_deleteIS0_EE7releaseEv, _ZN12__cling_N53610r_ml_unw43E, _ZNSt11_Tuple_implILm0EJP12RooFitResultSt14default_deleteIS0_EEEC2Ev, _ZNSt10unique_ptrI13RooLinkedListSt14default_deleteIS0_EEC1IS2_vEEPS0_, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EEC1IS2_vEEPS0_, _ZNKSt10unique_ptrI13RooLinkedListSt14default_deleteIS0_EEptEv, _ZNSt5tupleIJP13RooLinkedListSt14default_deleteIS0_EEEC1ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES1_S3_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EE11get_deleterEv, _ZNSt11_Tuple_implILm1EJSt14default_deleteI13RooLinkedListEEEC2Ev, cling_module_309_.2, _ZN7TObjectnwEm, _ZNSt10_Head_baseILm0EP13RooLinkedListLb0EE7_M_headERKS2_, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EED2Ev, _ZNSt11_Tuple_implILm0EJP13RooLinkedListSt14default_deleteIS0_EEEC2Ev, _ZNSt10_Head_baseILm0EP13RooLinkedListLb0EEC2Ev, _ZNKSt10unique_ptrI10RooDataSetSt14default_deleteIS0_EE3getEv, _ZNKSt16initializer_listIPK9RooCmdArgE5beginEv, _ZNKSt16initializer_listIPK9RooCmdArgE4sizeEv, _ZNKSt14default_deleteI13RooLinkedListEclEPS0_, _ZNSt10_Head_baseILm0EP10RooDataSetLb0EE7_M_headERKS2_, _ZSt12__get_helperILm1ESt14default_deleteI13RooLinkedListEJEERT0_RSt11_Tuple_implIXT_EJS3_DpT1_EE, _ZNSt10_Head_baseILm0EP13RooLinkedListLb0EE7_M_headERS2_, _ZNSt11_Tuple_implILm0EJP13RooLinkedListSt14default_deleteIS0_EEE7_M_headERKS4_, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EE7releaseEv, _ZNSt10_Head_baseILm1ESt14default_deleteI12RooFitResultELb1EEC2Ev, _ZSt12__get_helperILm0EP13RooLinkedListJSt14default_deleteIS0_EEERT0_RSt11_Tuple_implIXT_EJS4_DpT1_EE, _ZSt12__get_helperILm0EP13RooLinkedListJSt14default_deleteIS0_EEERKT0_RKSt11_Tuple_implIXT_EJS4_DpT1_EE, _ZSt3getILm0EJP10RooDataSetSt14default_deleteIS0_EEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS8_, _ZNSt5tupleIJP12RooFitResultSt14default_deleteIS0_EEEC2ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES1_S3_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv, _ZSt12__get_helperILm0EP10RooDataSetJSt14default_deleteIS0_EEERKT0_RKSt11_Tuple_implIXT_EJS4_DpT1_EE, _ZNSt15__uniq_ptr_implI13RooLinkedListSt14default_deleteIS0_EE10_M_deleterEv, _ZNSt10_Head_baseILm1ESt14default_deleteI13RooLinkedListELb1EE7_M_headERS3_, _ZNKSt10unique_ptrI13RooLinkedListSt14default_deleteIS0_EE3getEv, _ZNSt10unique_ptrI13RooLinkedListSt14default_deleteIS0_EED2Ev, $.cling-module-309.__inits.0, _ZNSt11_Tuple_implILm0EJP10RooDataSetSt14default_deleteIS0_EEE7_M_headERKS4_, _ZNKSt15__uniq_ptr_implI13RooLinkedListSt14default_deleteIS0_EE6_M_ptrEv, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EEC2IS2_vEEPS0_, _ZNSt15__uniq_ptr_implI12RooFitResultSt14default_deleteIS0_EE10_M_deleterEv, _ZNSt11_Tuple_implILm0EJP13RooLinkedListSt14default_deleteIS0_EEE7_M_headERS4_, _ZN9RooAbsPdf5fitToIJ9RooCmdArgS1_EEEP12RooFitResultR10RooAbsDataDpRKT_, _ZNKSt10unique_ptrI13RooLinkedListSt14default_deleteIS0_EEdeEv, _ZNKSt15__uniq_ptr_implI10RooDataSetSt14default_deleteIS0_EE6_M_ptrEv, _ZNSt15__uniq_ptr_dataI13RooLinkedListSt14default_deleteIS0_ELb1ELb1EECI1St15__uniq_ptr_implIS0_S2_EEPS0_, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EED1Ev, _ZSt3getILm0EJP13RooLinkedListSt14default_deleteIS0_EEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS8_, _ZSt3getILm0EJP13RooLinkedListSt14default_deleteIS0_EEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS8_, _ZNSt11_Tuple_implILm1EJSt14default_deleteI12RooFitResultEEEC2Ev, _ZNSt15__uniq_ptr_implI12RooFitResultSt14default_deleteIS0_EE6_M_ptrEv, _ZN6RooFit6Detail13createCmdListIJPK9RooCmdArgEEESt10unique_ptrI13RooLinkedListSt14default_deleteIS6_EES4_DpOT_, __orc_init_func.cling-module-309, _ZNSt10unique_ptrI13RooLinkedListSt14default_deleteIS0_EE11get_deleterEv, _ZNSt10unique_ptrI13RooLinkedListSt14default_deleteIS0_EED1Ev, _ZNSt11_Tuple_implILm1EJSt14default_deleteI13RooLinkedListEEE7_M_headERS3_, _ZNSt15__uniq_ptr_dataI13RooLinkedListSt14default_deleteIS0_ELb1ELb1EECI2St15__uniq_ptr_implIS0_S2_EEPS0_, _ZNSt5tupleIJP13RooLinkedListSt14default_deleteIS0_EEEC2ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES1_S3_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv, _ZNSt5tupleIJP12RooFitResultSt14default_deleteIS0_EEEC1ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES1_S3_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv }) }\n",
"IncrementalExecutor::executeFunction: symbol '_ZSt3getILm0EJP12RooFitResultSt14default_deleteIS0_EEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS8_' unresolved while linking [cling interface function]!\n",
"You are probably missing the definition of std::tuple_element<0ul, std::tuple > >::type& std::get<0ul, RooFitResult*, std::default_delete >(std::tuple >&)\n",
"Maybe you need to load the corresponding shared library?\n",
"IncrementalExecutor::executeFunction: symbol '_ZSt3getILm1EJP12RooFitResultSt14default_deleteIS0_EEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS8_' unresolved while linking [cling interface function]!\n",
"You are probably missing the definition of std::tuple_element<1ul, std::tuple > >::type& std::get<1ul, RooFitResult*, std::default_delete >(std::tuple >&)\n",
"Maybe you need to load the corresponding shared library?\n"
]
}
],
"source": [
"std::unique_ptr r_ml_unw10{p2.fitTo(*data2, Save(), PrintLevel(-1))};\n",
"std::unique_ptr r_ml_unw43{p2.fitTo(*data3, Save(), PrintLevel(-1))};"
]
},
{
"cell_type": "markdown",
"id": "8d659cc3",
"metadata": {},
"source": [
"Chi2 fit of pdf to binned weighted dataset\n",
"------------------------------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "9f089504",
"metadata": {},
"source": [
"Construct binned clone of unbinned weighted dataset"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "52b734ba",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:42.181962Z",
"iopub.status.busy": "2026-05-19T20:31:42.181837Z",
"iopub.status.idle": "2026-05-19T20:31:42.501510Z",
"shell.execute_reply": "2026-05-19T20:31:42.500615Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { _ZNKSt10unique_ptrI10RooAbsDataSt14default_deleteIS0_EE3getEv, _ZSt12__get_helperILm0EP10RooAbsDataJSt14default_deleteIS0_EEERKT0_RKSt11_Tuple_implIXT_EJS4_DpT1_EE, cling_module_310_, _ZNSt10_Head_baseILm0EP10RooAbsDataLb0EE7_M_headERKS2_, _ZN12__cling_N53716__cling_Un1Qu337EPv, _ZNSt11_Tuple_implILm0EJP10RooAbsDataSt14default_deleteIS0_EEE7_M_headERKS4_, _GLOBAL__sub_I_cling_module_310, _ZNK5cling7runtime8internal15LifetimeHandler9getMemoryEv, _ZN12__cling_N53710binnedDataE, __orc_init_func.cling-module-310, _ZN12__cling_N53724__dynamic__cling_Un1Qu32E, _ZNKSt10unique_ptrI10RooAbsDataSt14default_deleteIS0_EEptEv, $.cling-module-310.__inits.0, cling_module_310_.7, _ZNKSt15__uniq_ptr_implI10RooAbsDataSt14default_deleteIS0_EE6_M_ptrEv, _ZSt3getILm0EJP10RooAbsDataSt14default_deleteIS0_EEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS8_ }) }\n",
"IncrementalExecutor::executeFunction: symbol '_ZN5cling7runtime8internal15LifetimeHandlerC1EPNS1_15DynamicExprInfoEPN5clang11DeclContextEPKcPNS_11InterpreterE' unresolved while linking [cling interface function]!\n",
"You are probably missing the definition of cling::runtime::internal::LifetimeHandler::LifetimeHandler(cling::runtime::internal::DynamicExprInfo*, clang::DeclContext*, char const*, cling::Interpreter*)\n",
"Maybe you need to load the corresponding shared library?\n",
"IncrementalExecutor::executeFunction: symbol '_ZN5cling7runtime8internal15LifetimeHandlerD1Ev' unresolved while linking [cling interface function]!\n",
"You are probably missing the definition of cling::runtime::internal::LifetimeHandler::~LifetimeHandler()\n",
"Maybe you need to load the corresponding shared library?\n"
]
}
],
"source": [
"std::unique_ptr binnedData{wdata.binnedClone()};\n",
"binnedData->Print(\"v\");"
]
},
{
"cell_type": "markdown",
"id": "aaca714c",
"metadata": {},
"source": [
"Perform chi2 fit to binned weighted dataset using sum-of-weights errors\n",
"\n",
"NB: Within the usual approximations of a chi2 fit, a chi2 fit to weighted\n",
"data using sum-of-weights-squared errors does give correct error\n",
"estimates"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "15ee1a64",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:42.502975Z",
"iopub.status.busy": "2026-05-19T20:31:42.502847Z",
"iopub.status.idle": "2026-05-19T20:31:42.714364Z",
"shell.execute_reply": "2026-05-19T20:31:42.713528Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZNKSt10unique_ptrI10RooAbsDataSt14default_deleteIS0_EE3getEv }) }\n",
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { _ZNSt5tupleIJP10RooAbsRealSt14default_deleteIS0_EEEC1ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES1_S3_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv, _ZNSt15__uniq_ptr_implI10RooAbsRealSt14default_deleteIS0_EE6_M_ptrEv, _ZNSt10_Head_baseILm0EP10RooAbsRealLb0EE7_M_headERS2_, _ZN12RooMinimizer6ConfigC1Ev, _ZNSt11_Tuple_implILm0EJP10RooAbsRealSt14default_deleteIS0_EEEC2Ev, _ZNSt10unique_ptrI10RooAbsRealSt14default_deleteIS0_EE11get_deleterEv, _ZNKSt10unique_ptrI10RooAbsRealSt14default_deleteIS0_EE3getEv, _ZN12__cling_N5381mE, _ZNSt10unique_ptrI10RooAbsRealSt14default_deleteIS0_EEC2IS2_vEEPS0_, _ZNSt11_Tuple_implILm1EJSt14default_deleteI10RooAbsRealEEE7_M_headERS3_, _ZNSt10_Head_baseILm0EP10RooAbsRealLb0EE7_M_headERKS2_, _ZN6RooFit13makeOwningPtrI10RooAbsRealEEPT_OSt10unique_ptrIS2_St14default_deleteIS2_EE, $.cling-module-311.__inits.0, _ZNSt10_Head_baseILm1ESt14default_deleteI10RooAbsRealELb1EEC2Ev, _ZNSt15__uniq_ptr_dataI10RooAbsRealSt14default_deleteIS0_ELb1ELb1EECI2St15__uniq_ptr_implIS0_S2_EEPS0_, _ZN10RooAbsReal10createChi2IJ9RooCmdArgEEEPS_R11RooDataHistDpRKT_, _ZNSt10_Head_baseILm0EP10RooAbsRealLb0EEC2Ev, _ZNSt15__uniq_ptr_implI10RooAbsRealSt14default_deleteIS0_EE10_M_deleterEv, cling_module_311_, _ZNKSt14default_deleteI10RooAbsRealEclEPS0_, _GLOBAL__sub_I_cling_module_311, _ZSt3getILm1EJP10RooAbsRealSt14default_deleteIS0_EEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS8_, _ZNKSt10unique_ptrI10RooAbsRealSt14default_deleteIS0_EEdeEv, _ZNSt11_Tuple_implILm0EJP10RooAbsRealSt14default_deleteIS0_EEE7_M_headERKS4_, _ZN12RooMinimizer6ConfigC2Ev, _ZSt12__get_helperILm0EP10RooAbsRealJSt14default_deleteIS0_EEERT0_RSt11_Tuple_implIXT_EJS4_DpT1_EE, _ZNSt11_Tuple_implILm1EJSt14default_deleteI10RooAbsRealEEEC2Ev, _ZNSt15__uniq_ptr_implI10RooAbsRealSt14default_deleteIS0_EEC2EPS0_, _ZNKSt15__uniq_ptr_implI10RooAbsRealSt14default_deleteIS0_EE6_M_ptrEv, _ZN6RooFit6Detail13createCmdListIJEEESt10unique_ptrI13RooLinkedListSt14default_deleteIS3_EEPK9RooCmdArgDpOT_, cling_module_311_.2, _ZN12RooMinimizer6ConfigD2Ev, _ZN12__cling_N5384chi2E, _ZNSt10unique_ptrI10RooAbsRealSt14default_deleteIS0_EED1Ev, _ZNSt10unique_ptrI10RooAbsRealSt14default_deleteIS0_EEC1IS2_vEEPS0_, _ZNSt5tupleIJP10RooAbsRealSt14default_deleteIS0_EEEC2ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES1_S3_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv, _ZN12RooMinimizer6ConfigD1Ev, _ZNSt15__uniq_ptr_implI10RooAbsRealSt14default_deleteIS0_EE7releaseEv, _ZSt12__get_helperILm1ESt14default_deleteI10RooAbsRealEJEERT0_RSt11_Tuple_implIXT_EJS3_DpT1_EE, _ZSt3getILm0EJP10RooAbsRealSt14default_deleteIS0_EEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS8_, _ZN12__cling_N53816__cling_Un1Qu338EPv, __orc_init_func.cling-module-311, _ZNKSt10unique_ptrI10RooAbsDataSt14default_deleteIS0_EEdeEv, _ZNSt15__uniq_ptr_dataI10RooAbsRealSt14default_deleteIS0_ELb1ELb1EECI1St15__uniq_ptr_implIS0_S2_EEPS0_, _ZNSt10unique_ptrI10RooAbsRealSt14default_deleteIS0_EE7releaseEv, _ZNSt10_Head_baseILm1ESt14default_deleteI10RooAbsRealELb1EE7_M_headERS3_, _ZNSt10unique_ptrI10RooAbsRealSt14default_deleteIS0_EED2Ev, _ZSt3getILm0EJP10RooAbsRealSt14default_deleteIS0_EEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS8_, _ZSt12__get_helperILm0EP10RooAbsRealJSt14default_deleteIS0_EEERKT0_RKSt11_Tuple_implIXT_EJS4_DpT1_EE, _ZNSt11_Tuple_implILm0EJP10RooAbsRealSt14default_deleteIS0_EEE7_M_headERS4_ }) }\n"
]
}
],
"source": [
"std::unique_ptr chi2{\n",
" p2.createChi2(static_cast(*binnedData), DataError(RooAbsData::SumW2))};\n",
"RooMinimizer m(*chi2);\n",
"m.migrad();\n",
"m.hesse();"
]
},
{
"cell_type": "markdown",
"id": "f7fe13d4",
"metadata": {},
"source": [
"Plot chi^2 fit result on frame as well"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "f2995655",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:42.715769Z",
"iopub.status.busy": "2026-05-19T20:31:42.715643Z",
"iopub.status.idle": "2026-05-19T20:31:42.925310Z",
"shell.execute_reply": "2026-05-19T20:31:42.924463Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5381mE }) }\n",
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { __orc_init_func.cling-module-312, cling_module_312_, _ZN12TColorNumberC2Ei, _ZN12__cling_N53916__cling_Un1Qu339EPv, _ZN12TColorNumberC1Ei, _ZN12__cling_N53910r_chi2_wgtE, $.cling-module-312.__inits.0, _GLOBAL__sub_I_cling_module_312 }) }\n"
]
}
],
"source": [
"std::unique_ptr r_chi2_wgt{m.save()};\n",
"p2.plotOn(frame, LineStyle(kDashed), LineColor(kRed));"
]
},
{
"cell_type": "markdown",
"id": "e8d2f7d3",
"metadata": {},
"source": [
"Compare fit results of chi2,ML fits to (un)weighted data\n",
"---------------------------------------------------------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "a673a5a1",
"metadata": {},
"source": [
"Note that ML fit on 1Kevt of weighted data is closer to result of ML fit on 43Kevt of unweighted data\n",
"than to 1Kevt of unweighted data, whereas the reference chi^2 fit with SumW2 error gives a result closer to\n",
"that of an unbinned ML fit to 1Kevt of unweighted data."
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "b576d31b",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:42.926754Z",
"iopub.status.busy": "2026-05-19T20:31:42.926623Z",
"iopub.status.idle": "2026-05-19T20:31:43.135819Z",
"shell.execute_reply": "2026-05-19T20:31:43.134993Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { __orc_init_func.cling-module-309 }) }\n",
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N53610r_ml_unw43E }) }\n"
]
}
],
"source": [
"cout << \"==> ML Fit results on 1K unweighted events\" << endl;\n",
"r_ml_unw10->Print();\n",
"cout << \"==> ML Fit results on 43K unweighted events\" << endl;\n",
"r_ml_unw43->Print();\n",
"cout << \"==> ML Fit results on 1K weighted events with a summed weight of 43K\" << endl;\n",
"r_ml_wgt->Print();\n",
"cout << \"==> Corrected ML Fit results on 1K weighted events with a summed weight of 43K\" << endl;\n",
"r_ml_wgt_corr->Print();\n",
"cout << \"==> Chi2 Fit results on 1K weighted events with a summed weight of 43K\" << endl;\n",
"r_chi2_wgt->Print();\n",
"\n",
"new TCanvas(\"rf403_weightedevts\", \"rf403_weightedevts\", 600, 600);\n",
"gPad->SetLeftMargin(0.15);\n",
"frame->GetYaxis()->SetTitleOffset(1.8);\n",
"frame->Draw();"
]
},
{
"cell_type": "markdown",
"id": "f82247b4",
"metadata": {},
"source": [
"Draw all canvases "
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "6117d4b6",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:31:43.137225Z",
"iopub.status.busy": "2026-05-19T20:31:43.137102Z",
"iopub.status.idle": "2026-05-19T20:31:43.366331Z",
"shell.execute_reply": "2026-05-19T20:31:43.365322Z"
}
},
"outputs": [],
"source": [
"%jsroot on\n",
"gROOT->GetListOfCanvases()->Draw()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ROOT C++",
"language": "c++",
"name": "root"
},
"language_info": {
"codemirror_mode": "text/x-c++src",
"file_extension": ".C",
"mimetype": " text/x-c++src",
"name": "c++"
}
},
"nbformat": 4,
"nbformat_minor": 5
}