{
"cells": [
{
"cell_type": "markdown",
"id": "8848be9b",
"metadata": {},
"source": [
"# rf601_intminuit\n",
"Likelihood and minimization: interactive minimization with MINUIT\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:32 PM."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "6d3a600e",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:55.678966Z",
"iopub.status.busy": "2026-05-19T20:32:55.678852Z",
"iopub.status.idle": "2026-05-19T20:32:55.693929Z",
"shell.execute_reply": "2026-05-19T20:32:55.693134Z"
}
},
"outputs": [],
"source": [
"%%cpp -d\n",
"#include \"RooRealVar.h\"\n",
"#include \"RooDataSet.h\"\n",
"#include \"RooGaussian.h\"\n",
"#include \"RooProdPdf.h\"\n",
"#include \"RooAddPdf.h\"\n",
"#include \"RooMinimizer.h\"\n",
"#include \"RooFitResult.h\"\n",
"#include \"RooPlot.h\"\n",
"#include \"TCanvas.h\"\n",
"#include \"TAxis.h\"\n",
"#include \"TH1.h\"\n",
"using namespace RooFit;"
]
},
{
"cell_type": "markdown",
"id": "856c9eea",
"metadata": {},
"source": [
"Setup pdf and likelihood\n",
"-----------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "3cf16c6f",
"metadata": {},
"source": [
"Observable"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "e1c983e7",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:55.695352Z",
"iopub.status.busy": "2026-05-19T20:32:55.695237Z",
"iopub.status.idle": "2026-05-19T20:32:56.015058Z",
"shell.execute_reply": "2026-05-19T20:32:56.013973Z"
}
},
"outputs": [],
"source": [
"RooRealVar x(\"x\", \"x\", -20, 20);"
]
},
{
"cell_type": "markdown",
"id": "4d0337cc",
"metadata": {},
"source": [
"Model (intentional strong correlations)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "0870d6b3",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:56.016738Z",
"iopub.status.busy": "2026-05-19T20:32:56.016601Z",
"iopub.status.idle": "2026-05-19T20:32:56.226740Z",
"shell.execute_reply": "2026-05-19T20:32:56.225902Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[#0] WARNING:InputArguments -- The parameter 'sigma_g1' with range [-inf, inf] of the RooGaussian 'g1' exceeds the safe range of (0, inf). Advise to limit its range.\n"
]
}
],
"source": [
"RooRealVar mean(\"mean\", \"mean of g1 and g2\", 0);\n",
"RooRealVar sigma_g1(\"sigma_g1\", \"width of g1\", 3);\n",
"RooGaussian g1(\"g1\", \"g1\", x, mean, sigma_g1);\n",
"\n",
"RooRealVar sigma_g2(\"sigma_g2\", \"width of g2\", 4, 3.0, 6.0);\n",
"RooGaussian g2(\"g2\", \"g2\", x, mean, sigma_g2);\n",
"\n",
"RooRealVar frac(\"frac\", \"frac\", 0.5, 0.0, 1.0);\n",
"RooAddPdf model(\"model\", \"model\", RooArgList(g1, g2), frac);"
]
},
{
"cell_type": "markdown",
"id": "bc9bb373",
"metadata": {},
"source": [
"Generate 1000 events"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "cf87dc38",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:56.228286Z",
"iopub.status.busy": "2026-05-19T20:32:56.228170Z",
"iopub.status.idle": "2026-05-19T20:32:56.438161Z",
"shell.execute_reply": "2026-05-19T20:32:56.437284Z"
}
},
"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{model.generate(x, 1000)};\n",
" ^\n"
]
}
],
"source": [
"std::unique_ptr data{model.generate(x, 1000)};"
]
},
{
"cell_type": "markdown",
"id": "72391fb8",
"metadata": {},
"source": [
"Construct unbinned likelihood of model w.r.t. data"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "442ab7ec",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:56.439768Z",
"iopub.status.busy": "2026-05-19T20:32:56.439641Z",
"iopub.status.idle": "2026-05-19T20:32:56.648677Z",
"shell.execute_reply": "2026-05-19T20:32:56.648365Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"input_line_52:2:51: error: reference to 'data' is ambiguous\n",
" std::unique_ptr nll{model.createNLL(*data)};\n",
" ^\n",
"input_line_51:2:30: note: candidate found by name lookup is 'data'\n",
" std::unique_ptr data{model.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": [
"std::unique_ptr nll{model.createNLL(*data)};"
]
},
{
"cell_type": "markdown",
"id": "bc8d9995",
"metadata": {},
"source": [
"Interactive minimization, error analysis\n",
"-------------------------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "b1ca9505",
"metadata": {},
"source": [
"Create MINUIT interface object"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "a711cf15",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:56.657505Z",
"iopub.status.busy": "2026-05-19T20:32:56.657383Z",
"iopub.status.idle": "2026-05-19T20:32:57.031471Z",
"shell.execute_reply": "2026-05-19T20:32:57.030976Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { __orc_init_func.cling-module-274, cling_module_274_.6, _ZN12__cling_N52316__cling_Un1Qu322EPv, _GLOBAL__sub_I_cling_module_274, _ZN5cling7runtime8internal15DynamicExprInfoC2EPKcPPvb, cling_module_274_, _ZN12__cling_N5231mE, _ZN5cling7runtime8internal15DynamicExprInfoC1EPKcPPvb, _ZN12__cling_N52324__dynamic__cling_Un1Qu30E, $.cling-module-274.__inits.0, _ZNK5cling7runtime8internal15LifetimeHandler9getMemoryEv }) }\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": [
"RooMinimizer m(*nll);"
]
},
{
"cell_type": "markdown",
"id": "f8dcf3c0",
"metadata": {},
"source": [
"Activate verbose logging of MINUIT parameter space stepping"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b666a115",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:57.032924Z",
"iopub.status.busy": "2026-05-19T20:32:57.032806Z",
"iopub.status.idle": "2026-05-19T20:32:57.241527Z",
"shell.execute_reply": "2026-05-19T20:32:57.241031Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { __orc_init_func.cling-module-274 }) }\n",
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5231mE }) }\n"
]
}
],
"source": [
"m.setVerbose(true);"
]
},
{
"cell_type": "markdown",
"id": "de521524",
"metadata": {},
"source": [
"Call MIGRAD to minimize the likelihood"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "902a10a2",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:57.253078Z",
"iopub.status.busy": "2026-05-19T20:32:57.252946Z",
"iopub.status.idle": "2026-05-19T20:32:57.461846Z",
"shell.execute_reply": "2026-05-19T20:32:57.461321Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5231mE }) }\n"
]
}
],
"source": [
"m.migrad();"
]
},
{
"cell_type": "markdown",
"id": "a8099af7",
"metadata": {},
"source": [
"Print values of all parameters, that reflect values (and error estimates)\n",
"that are back propagated from MINUIT"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "f8898ae5",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:57.463217Z",
"iopub.status.busy": "2026-05-19T20:32:57.463084Z",
"iopub.status.idle": "2026-05-19T20:32:57.669119Z",
"shell.execute_reply": "2026-05-19T20:32:57.668547Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 1) RooRealVar:: frac = 0.5\n",
" 2) RooRealVar:: mean = 0\n",
" 3) RooRealVar:: sigma_g1 = 3\n",
" 4) RooRealVar:: sigma_g2 = 4\n"
]
}
],
"source": [
"std::unique_ptr{model.getParameters(x)}->Print(\"s\");"
]
},
{
"cell_type": "markdown",
"id": "8203945f",
"metadata": {},
"source": [
"Disable verbose logging"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "4da6a5fd",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:57.670530Z",
"iopub.status.busy": "2026-05-19T20:32:57.670402Z",
"iopub.status.idle": "2026-05-19T20:32:57.879286Z",
"shell.execute_reply": "2026-05-19T20:32:57.878812Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5231mE }) }\n"
]
}
],
"source": [
"m.setVerbose(false);"
]
},
{
"cell_type": "markdown",
"id": "3e06398c",
"metadata": {},
"source": [
"Run HESSE to calculate errors from d2L/dp2"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "e97ee51b",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:57.880641Z",
"iopub.status.busy": "2026-05-19T20:32:57.880512Z",
"iopub.status.idle": "2026-05-19T20:32:58.090399Z",
"shell.execute_reply": "2026-05-19T20:32:58.089848Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5231mE }) }\n"
]
}
],
"source": [
"m.hesse();"
]
},
{
"cell_type": "markdown",
"id": "0501655e",
"metadata": {},
"source": [
"Print value (and error) of sigma_g2 parameter, that reflects\n",
"value and error back propagated from MINUIT"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "1074869a",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:58.091784Z",
"iopub.status.busy": "2026-05-19T20:32:58.091665Z",
"iopub.status.idle": "2026-05-19T20:32:58.300302Z",
"shell.execute_reply": "2026-05-19T20:32:58.299802Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RooRealVar::sigma_g2 = 4 L(3 - 6) \n"
]
}
],
"source": [
"sigma_g2.Print();"
]
},
{
"cell_type": "markdown",
"id": "153e728e",
"metadata": {},
"source": [
"Run MINOS on sigma_g2 parameter only"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "86d53edc",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:58.301687Z",
"iopub.status.busy": "2026-05-19T20:32:58.301546Z",
"iopub.status.idle": "2026-05-19T20:32:58.510206Z",
"shell.execute_reply": "2026-05-19T20:32:58.509716Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5231mE }) }\n"
]
}
],
"source": [
"m.minos(sigma_g2);"
]
},
{
"cell_type": "markdown",
"id": "a3df6b45",
"metadata": {},
"source": [
"Print value (and error) of sigma_g2 parameter, that reflects\n",
"value and error back propagated from MINUIT"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "8e05fb2c",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:58.515567Z",
"iopub.status.busy": "2026-05-19T20:32:58.515441Z",
"iopub.status.idle": "2026-05-19T20:32:58.724146Z",
"shell.execute_reply": "2026-05-19T20:32:58.723683Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RooRealVar::sigma_g2 = 4 L(3 - 6) \n"
]
}
],
"source": [
"sigma_g2.Print();"
]
},
{
"cell_type": "markdown",
"id": "796a06ba",
"metadata": {},
"source": [
"Saving results, contour plots\n",
"---------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "ff52659e",
"metadata": {},
"source": [
"Save a snapshot of the fit result. This object contains the initial\n",
"fit parameters, the final fit parameters, the complete correlation\n",
"matrix, the EDM, the minimized FCN , the last MINUIT status code and\n",
"the number of times the RooFit function object has indicated evaluation\n",
"problems (e.g. zero probabilities during likelihood evaluation)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "4eb3852d",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:58.725496Z",
"iopub.status.busy": "2026-05-19T20:32:58.725378Z",
"iopub.status.idle": "2026-05-19T20:32:58.936040Z",
"shell.execute_reply": "2026-05-19T20:32:58.935495Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5231mE }) }\n",
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { _ZNSt11_Tuple_implILm0EJP12RooFitResultSt14default_deleteIS0_EEEC2Ev, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EED2Ev, _ZNSt11_Tuple_implILm1EJSt14default_deleteI12RooFitResultEEEC2Ev, _ZNSt5tupleIJP12RooFitResultSt14default_deleteIS0_EEEC2ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES1_S3_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv, _ZNSt10_Head_baseILm1ESt14default_deleteI12RooFitResultELb1EEC2Ev, _ZNSt10_Head_baseILm0EP12RooFitResultLb0EEC2Ev, cling_module_283_, _ZNSt15__uniq_ptr_dataI12RooFitResultSt14default_deleteIS0_ELb1ELb1EECI2St15__uniq_ptr_implIS0_S2_EEPS0_, _ZNSt11_Tuple_implILm0EJP12RooFitResultSt14default_deleteIS0_EEE7_M_headERS4_, _ZSt3getILm0EJP12RooFitResultSt14default_deleteIS0_EEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS8_, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EEC1IS2_vEEPS0_, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EED1Ev, _ZSt3getILm1EJP12RooFitResultSt14default_deleteIS0_EEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS8_, _ZN12__cling_N53216__cling_Un1Qu331EPv, _ZNSt10_Head_baseILm1ESt14default_deleteI12RooFitResultELb1EE7_M_headERS3_, __orc_init_func.cling-module-283, _GLOBAL__sub_I_cling_module_283, _ZSt12__get_helperILm0EP12RooFitResultJSt14default_deleteIS0_EEERT0_RSt11_Tuple_implIXT_EJS4_DpT1_EE, $.cling-module-283.__inits.0, _ZNSt15__uniq_ptr_dataI12RooFitResultSt14default_deleteIS0_ELb1ELb1EECI1St15__uniq_ptr_implIS0_S2_EEPS0_, _ZNSt5tupleIJP12RooFitResultSt14default_deleteIS0_EEEC1ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES1_S3_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv, _ZNSt11_Tuple_implILm1EJSt14default_deleteI12RooFitResultEEE7_M_headERS3_, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EEC2IS2_vEEPS0_, _ZN12__cling_N5329fitResultE, _ZNSt15__uniq_ptr_implI12RooFitResultSt14default_deleteIS0_EEC2EPS0_, _ZNSt10unique_ptrI12RooFitResultSt14default_deleteIS0_EE11get_deleterEv, _ZNKSt14default_deleteI12RooFitResultEclEPS0_, _ZNSt10_Head_baseILm0EP12RooFitResultLb0EE7_M_headERS2_, _ZNSt15__uniq_ptr_implI12RooFitResultSt14default_deleteIS0_EE10_M_deleterEv, _ZNSt15__uniq_ptr_implI12RooFitResultSt14default_deleteIS0_EE6_M_ptrEv, _ZSt12__get_helperILm1ESt14default_deleteI12RooFitResultEJEERT0_RSt11_Tuple_implIXT_EJS3_DpT1_EE }) }\n"
]
}
],
"source": [
"std::unique_ptr fitResult{m.save()};"
]
},
{
"cell_type": "markdown",
"id": "98d3bab4",
"metadata": {},
"source": [
"Make contour plot of mx vs sx at 1,2,3,4 sigma"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "7f15145d",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:58.937394Z",
"iopub.status.busy": "2026-05-19T20:32:58.937280Z",
"iopub.status.idle": "2026-05-19T20:32:59.143304Z",
"shell.execute_reply": "2026-05-19T20:32:59.142821Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5231mE }) }\n",
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { _GLOBAL__sub_I_cling_module_284, cling_module_284_, $.cling-module-284.__inits.0, _ZN12__cling_N53316__cling_Un1Qu332EPv, _ZN12__cling_N5335frameE, __orc_init_func.cling-module-284 }) }\n"
]
}
],
"source": [
"RooPlot *frame = m.contour(frac, sigma_g2, 1, 2, 3, 4);\n",
"frame->SetTitle(\"Minuit contour plot\");"
]
},
{
"cell_type": "markdown",
"id": "cbc7818f",
"metadata": {},
"source": [
"Print the fit result snapshot"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "543447f2",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:59.144619Z",
"iopub.status.busy": "2026-05-19T20:32:59.144498Z",
"iopub.status.idle": "2026-05-19T20:32:59.350357Z",
"shell.execute_reply": "2026-05-19T20:32:59.349889Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { __orc_init_func.cling-module-283 }) }\n",
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5329fitResultE }) }\n"
]
}
],
"source": [
"fitResult->Print(\"v\");"
]
},
{
"cell_type": "markdown",
"id": "416934d4",
"metadata": {},
"source": [
"Change parameter values, floating\n",
"-----------------------------------------------------------------"
]
},
{
"cell_type": "markdown",
"id": "47564b21",
"metadata": {},
"source": [
"At any moment you can manually change the value of a (constant)\n",
"parameter"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "2022ff28",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:59.351726Z",
"iopub.status.busy": "2026-05-19T20:32:59.351588Z",
"iopub.status.idle": "2026-05-19T20:32:59.560185Z",
"shell.execute_reply": "2026-05-19T20:32:59.559576Z"
}
},
"outputs": [],
"source": [
"mean = 0.3;"
]
},
{
"cell_type": "markdown",
"id": "f632d137",
"metadata": {},
"source": [
"Rerun MIGRAD,HESSE"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "0aeb971a",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:59.561624Z",
"iopub.status.busy": "2026-05-19T20:32:59.561493Z",
"iopub.status.idle": "2026-05-19T20:32:59.770293Z",
"shell.execute_reply": "2026-05-19T20:32:59.769873Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5231mE }) }\n"
]
}
],
"source": [
"m.migrad();\n",
"m.hesse();\n",
"frac.Print();"
]
},
{
"cell_type": "markdown",
"id": "0f580afb",
"metadata": {},
"source": [
"Now fix sigma_g2"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "3f19bd0a",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:59.771861Z",
"iopub.status.busy": "2026-05-19T20:32:59.771745Z",
"iopub.status.idle": "2026-05-19T20:32:59.980171Z",
"shell.execute_reply": "2026-05-19T20:32:59.979650Z"
}
},
"outputs": [],
"source": [
"sigma_g2.setConstant(true);"
]
},
{
"cell_type": "markdown",
"id": "e59b867c",
"metadata": {},
"source": [
"Rerun MIGRAD,HESSE"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "8654ec26",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:32:59.982038Z",
"iopub.status.busy": "2026-05-19T20:32:59.981919Z",
"iopub.status.idle": "2026-05-19T20:33:00.190568Z",
"shell.execute_reply": "2026-05-19T20:33:00.190062Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"cling JIT session error: Failed to materialize symbols: { (main, { _ZN12__cling_N5335frameE }) }\n"
]
}
],
"source": [
"m.migrad();\n",
"m.hesse();\n",
"frac.Print();\n",
"\n",
"new TCanvas(\"rf601_intminuit\", \"rf601_intminuit\", 600, 600);\n",
"gPad->SetLeftMargin(0.15);\n",
"frame->GetYaxis()->SetTitleOffset(1.4);\n",
"frame->Draw();"
]
},
{
"cell_type": "markdown",
"id": "418cfca8",
"metadata": {},
"source": [
"Draw all canvases "
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "7368e70b",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:33:00.191917Z",
"iopub.status.busy": "2026-05-19T20:33:00.191803Z",
"iopub.status.idle": "2026-05-19T20:33:00.421874Z",
"shell.execute_reply": "2026-05-19T20:33:00.421245Z"
}
},
"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
}