{ "cells": [ { "cell_type": "markdown", "id": "95fcc11a", "metadata": {}, "source": [ "# rf709_BarlowBeeston\n", "Implementing the Barlow-Beeston method for taking into account the statistical\n", "uncertainty of a Monte-Carlo fit template.\n", "\n", "\n", "Based on a demo by Wouter Verkerke\n", "\n", "\n", "**Author:** \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:34 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "9e917558", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:56.142791Z", "iopub.status.busy": "2026-05-19T20:34:56.142673Z", "iopub.status.idle": "2026-05-19T20:34:56.158464Z", "shell.execute_reply": "2026-05-19T20:34:56.157877Z" } }, "outputs": [], "source": [ "%%cpp -d\n", "#include \"RooRealVar.h\"\n", "#include \"RooGaussian.h\"\n", "#include \"RooUniform.h\"\n", "#include \"RooDataSet.h\"\n", "#include \"RooDataHist.h\"\n", "#include \"RooHistFunc.h\"\n", "#include \"RooRealSumPdf.h\"\n", "#include \"RooParamHistFunc.h\"\n", "#include \"RooHistConstraint.h\"\n", "#include \"RooProdPdf.h\"\n", "#include \"RooPlot.h\"\n", "\n", "#include \"TCanvas.h\"\n", "#include \"TPaveText.h\"\n", "\n", "#include \n", "#include \n", "\n", "using namespace RooFit;" ] }, { "cell_type": "markdown", "id": "e5abd5d3", "metadata": {}, "source": [ "First, construct a likelihood model with a Gaussian signal on top of a uniform background" ] }, { "cell_type": "code", "execution_count": 2, "id": "790264c3", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:56.159840Z", "iopub.status.busy": "2026-05-19T20:34:56.159726Z", "iopub.status.idle": "2026-05-19T20:34:56.599346Z", "shell.execute_reply": "2026-05-19T20:34:56.599000Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[#0] WARNING:InputArguments -- The parameter 'sigG' with range [-10, 10] of the RooGaussian 'g' exceeds the safe range of (0, inf). Advise to limit its range.\n" ] } ], "source": [ "RooRealVar x(\"x\", \"x\", -20, 20);\n", "x.setBins(25);\n", "\n", "RooRealVar meanG(\"meanG\", \"meanG\", 1, -10, 10);\n", "RooRealVar sigG(\"sigG\", \"sigG\", 1.5, -10, 10);\n", "RooGaussian g(\"g\", \"Gauss\", x, meanG, sigG);\n", "RooUniform u(\"u\", \"Uniform\", x);" ] }, { "cell_type": "markdown", "id": "a555972d", "metadata": {}, "source": [ "Generate the data to be fitted" ] }, { "cell_type": "code", "execution_count": 3, "id": "bc2ffadd", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:56.601214Z", "iopub.status.busy": "2026-05-19T20:34:56.601078Z", "iopub.status.idle": "2026-05-19T20:34:56.811368Z", "shell.execute_reply": "2026-05-19T20:34:56.810665Z" } }, "outputs": [], "source": [ "std::unique_ptr sigData(g.generate(x, 50));\n", "std::unique_ptr bkgData(u.generate(x, 1000));\n", "\n", "RooDataSet sumData(\"sumData\", \"Gauss + Uniform\", x);\n", "sumData.append(*sigData);\n", "sumData.append(*bkgData);" ] }, { "cell_type": "markdown", "id": "928f778d", "metadata": {}, "source": [ "Make histogram templates for signal and background.\n", "Let's take a signal distribution with low statistics and a more accurate\n", "background distribution.\n", "Normally, these come from Monte Carlo simulations, but we will just generate them." ] }, { "cell_type": "code", "execution_count": 4, "id": "a6529e29", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:56.813055Z", "iopub.status.busy": "2026-05-19T20:34:56.812925Z", "iopub.status.idle": "2026-05-19T20:34:57.018733Z", "shell.execute_reply": "2026-05-19T20:34:57.018261Z" } }, "outputs": [], "source": [ "std::unique_ptr dh_sig( g.generateBinned(x, 50) );\n", "std::unique_ptr dh_bkg( u.generateBinned(x, 10000) );" ] }, { "cell_type": "markdown", "id": "2cefe237", "metadata": {}, "source": [ "***** Case 0 - 'Rigid templates' *****" ] }, { "cell_type": "markdown", "id": "d8d79eb2", "metadata": {}, "source": [ "Construct histogram shapes for signal and background" ] }, { "cell_type": "code", "execution_count": 5, "id": "e3ebade1", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:57.029321Z", "iopub.status.busy": "2026-05-19T20:34:57.029189Z", "iopub.status.idle": "2026-05-19T20:34:57.235076Z", "shell.execute_reply": "2026-05-19T20:34:57.234470Z" } }, "outputs": [], "source": [ "RooHistFunc p_h_sig(\"p_h_sig\",\"p_h_sig\",x,*dh_sig);\n", "RooHistFunc p_h_bkg(\"p_h_bkg\",\"p_h_bkg\",x,*dh_bkg);" ] }, { "cell_type": "markdown", "id": "2b7279c6", "metadata": {}, "source": [ "Construct scale factors for adding the two distributions" ] }, { "cell_type": "code", "execution_count": 6, "id": "5110c2e0", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:57.237263Z", "iopub.status.busy": "2026-05-19T20:34:57.237126Z", "iopub.status.idle": "2026-05-19T20:34:57.443489Z", "shell.execute_reply": "2026-05-19T20:34:57.442435Z" } }, "outputs": [], "source": [ "RooRealVar Asig0(\"Asig\",\"Asig\",1,0.01,5000);\n", "RooRealVar Abkg0(\"Abkg\",\"Abkg\",1,0.01,5000);" ] }, { "cell_type": "markdown", "id": "b621c759", "metadata": {}, "source": [ "Construct the sum model" ] }, { "cell_type": "code", "execution_count": 7, "id": "4365972f", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:57.445121Z", "iopub.status.busy": "2026-05-19T20:34:57.444997Z", "iopub.status.idle": "2026-05-19T20:34:57.689932Z", "shell.execute_reply": "2026-05-19T20:34:57.688823Z" } }, "outputs": [], "source": [ "RooRealSumPdf model0(\"model0\",\"model0\",\n", " RooArgList(p_h_sig,p_h_bkg),\n", " RooArgList(Asig0,Abkg0),\n", " true);" ] }, { "cell_type": "markdown", "id": "b79df1da", "metadata": {}, "source": [ "***** Case 1 - 'Barlow Beeston' *****" ] }, { "cell_type": "markdown", "id": "01fdf083", "metadata": {}, "source": [ "Construct parameterized histogram shapes for signal and background" ] }, { "cell_type": "code", "execution_count": 8, "id": "73e3dd01", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:57.691503Z", "iopub.status.busy": "2026-05-19T20:34:57.691387Z", "iopub.status.idle": "2026-05-19T20:34:57.896960Z", "shell.execute_reply": "2026-05-19T20:34:57.896566Z" } }, "outputs": [], "source": [ "RooParamHistFunc p_ph_sig1(\"p_ph_sig\",\"p_ph_sig\",*dh_sig, x);\n", "RooParamHistFunc p_ph_bkg1(\"p_ph_bkg\",\"p_ph_bkg\",*dh_bkg, x);\n", "\n", "RooRealVar Asig1(\"Asig\",\"Asig\",1,0.01,5000);\n", "RooRealVar Abkg1(\"Abkg\",\"Abkg\",1,0.01,5000);" ] }, { "cell_type": "markdown", "id": "7b03cd56", "metadata": {}, "source": [ "Construct the sum of these" ] }, { "cell_type": "code", "execution_count": 9, "id": "40208b49", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:57.898936Z", "iopub.status.busy": "2026-05-19T20:34:57.898817Z", "iopub.status.idle": "2026-05-19T20:34:58.108088Z", "shell.execute_reply": "2026-05-19T20:34:58.107160Z" } }, "outputs": [], "source": [ "RooRealSumPdf model_tmp(\"sp_ph\", \"sp_ph\",\n", " RooArgList(p_ph_sig1,p_ph_bkg1),\n", " RooArgList(Asig1,Abkg1),\n", " true);" ] }, { "cell_type": "markdown", "id": "e64061c5", "metadata": {}, "source": [ "Construct the subsidiary poisson measurements constraining the histogram parameters\n", "These ensure that the bin contents of the histograms are only allowed to vary within\n", "the statistical uncertainty of the Monte Carlo." ] }, { "cell_type": "code", "execution_count": 10, "id": "13b14011", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:58.109631Z", "iopub.status.busy": "2026-05-19T20:34:58.109501Z", "iopub.status.idle": "2026-05-19T20:34:58.315550Z", "shell.execute_reply": "2026-05-19T20:34:58.314616Z" } }, "outputs": [], "source": [ "RooHistConstraint hc_sig(\"hc_sig\",\"hc_sig\",p_ph_sig1);\n", "RooHistConstraint hc_bkg(\"hc_bkg\",\"hc_bkg\",p_ph_bkg1);" ] }, { "cell_type": "markdown", "id": "12d669b4", "metadata": {}, "source": [ "Construct the joint model with template PDFs and constraints" ] }, { "cell_type": "code", "execution_count": 11, "id": "15ca4bbc", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:58.317008Z", "iopub.status.busy": "2026-05-19T20:34:58.316893Z", "iopub.status.idle": "2026-05-19T20:34:58.522834Z", "shell.execute_reply": "2026-05-19T20:34:58.521894Z" } }, "outputs": [], "source": [ "RooProdPdf model1(\"model1\",\"model1\",RooArgSet(hc_sig,hc_bkg),Conditional(model_tmp,x));" ] }, { "cell_type": "markdown", "id": "193a34b3", "metadata": {}, "source": [ "***** Case 2 - 'Barlow Beeston' light (one parameter per bin for all samples) *****" ] }, { "cell_type": "markdown", "id": "77aa5f8b", "metadata": {}, "source": [ "Construct the histogram shapes, using the same parameters for signal and background\n", "This requires passing the first histogram to the second, so that their common parameters\n", "can be re-used.\n", "The first ParamHistFunc will create one parameter per bin, such as `p_ph_sig2_gamma_bin_0`.\n", "This allows bin 0 to fluctuate up and down.\n", "Then, the SAME parameters are connected to the background histogram, so the bins fluctuate\n", "synchronously. This reduces the number of parameters." ] }, { "cell_type": "code", "execution_count": 12, "id": "f1955c9a", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:58.524312Z", "iopub.status.busy": "2026-05-19T20:34:58.524202Z", "iopub.status.idle": "2026-05-19T20:34:58.761627Z", "shell.execute_reply": "2026-05-19T20:34:58.761015Z" } }, "outputs": [], "source": [ "RooParamHistFunc p_ph_sig2(\"p_ph_sig2\", \"p_ph_sig2\", *dh_sig, x);\n", "RooParamHistFunc p_ph_bkg2(\"p_ph_bkg2\", \"p_ph_bkg2\", *dh_bkg, x, &p_ph_sig2, true);\n", "\n", "RooRealVar Asig2(\"Asig\",\"Asig\",1,0.01,5000);\n", "RooRealVar Abkg2(\"Abkg\",\"Abkg\",1,0.01,5000);" ] }, { "cell_type": "markdown", "id": "cc6e38af", "metadata": {}, "source": [ "As before, construct the sum of signal2 and background2" ] }, { "cell_type": "code", "execution_count": 13, "id": "ff0b4473", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:58.763396Z", "iopub.status.busy": "2026-05-19T20:34:58.763269Z", "iopub.status.idle": "2026-05-19T20:34:58.972741Z", "shell.execute_reply": "2026-05-19T20:34:58.971681Z" } }, "outputs": [], "source": [ "RooRealSumPdf model2_tmp(\"sp_ph\",\"sp_ph\",\n", " RooArgList(p_ph_sig2,p_ph_bkg2),\n", " RooArgList(Asig2,Abkg2),\n", " true);" ] }, { "cell_type": "markdown", "id": "b3feb7c3", "metadata": {}, "source": [ "Construct the subsidiary poisson measurements constraining the statistical fluctuations" ] }, { "cell_type": "code", "execution_count": 14, "id": "0ab7f64d", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:58.974377Z", "iopub.status.busy": "2026-05-19T20:34:58.974235Z", "iopub.status.idle": "2026-05-19T20:34:59.180756Z", "shell.execute_reply": "2026-05-19T20:34:59.179745Z" } }, "outputs": [], "source": [ "RooHistConstraint hc_sigbkg(\"hc_sigbkg\",\"hc_sigbkg\",RooArgSet(p_ph_sig2,p_ph_bkg2));" ] }, { "cell_type": "markdown", "id": "15d459e4", "metadata": {}, "source": [ "Construct the joint model" ] }, { "cell_type": "code", "execution_count": 15, "id": "58ae71fc", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:59.182268Z", "iopub.status.busy": "2026-05-19T20:34:59.182143Z", "iopub.status.idle": "2026-05-19T20:34:59.391159Z", "shell.execute_reply": "2026-05-19T20:34:59.390634Z" } }, "outputs": [], "source": [ "RooProdPdf model2(\"model2\",\"model2\",hc_sigbkg, RooFit::Conditional(model2_tmp,x));" ] }, { "cell_type": "markdown", "id": "3f412308", "metadata": {}, "source": [ "************ Fit all models to data and plot *********************" ] }, { "cell_type": "code", "execution_count": 16, "id": "7a29b052", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:59.393136Z", "iopub.status.busy": "2026-05-19T20:34:59.393012Z", "iopub.status.idle": "2026-05-19T20:34:59.933562Z", "shell.execute_reply": "2026-05-19T20:34:59.933139Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.\n", "[#1] INFO:Fitting -- RooAbsPdf::fitTo(model0_over_model0_Int[x]) fixing normalization set for coefficient determination to observables in data\n", "[#1] INFO:Fitting -- using generic CPU library compiled with no vectorizations\n", "[#1] INFO:Fitting -- Creation of NLL object took 726.203 μs\n", "[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model0_over_model0_Int[x]_sumData) Summation contains a RooNLLVar, using its error level\n", "[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only\n", "Minuit2Minimizer: Minimize with max-calls 1000 convergence for edm < 1 strategy 1\n", "Minuit2Minimizer : Valid minimum - status = 0\n", "FVAL = -2388.31039421315609\n", "Edm = 3.25299602361765145e-06\n", "Nfcn = 60\n", "Abkg\t = 0.0614547\t +/- 0.00211669\t(limited)\n", "Asig\t = 0.833778\t +/- 0.1898\t(limited)\n", "[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.\n", "[#1] INFO:Minimization -- Including the following constraint terms in minimization: (hc_sig,hc_bkg)\n", "[#1] INFO:Minimization -- The global observables are not defined , normalize constraints with respect to the parameters (Abkg,Asig,p_ph_bkg_gamma_bin_0,p_ph_bkg_gamma_bin_1,p_ph_bkg_gamma_bin_10,p_ph_bkg_gamma_bin_11,p_ph_bkg_gamma_bin_12,p_ph_bkg_gamma_bin_13,p_ph_bkg_gamma_bin_14,p_ph_bkg_gamma_bin_15,p_ph_bkg_gamma_bin_16,p_ph_bkg_gamma_bin_17,p_ph_bkg_gamma_bin_18,p_ph_bkg_gamma_bin_19,p_ph_bkg_gamma_bin_2,p_ph_bkg_gamma_bin_20,p_ph_bkg_gamma_bin_21,p_ph_bkg_gamma_bin_22,p_ph_bkg_gamma_bin_23,p_ph_bkg_gamma_bin_24,p_ph_bkg_gamma_bin_3,p_ph_bkg_gamma_bin_4,p_ph_bkg_gamma_bin_5,p_ph_bkg_gamma_bin_6,p_ph_bkg_gamma_bin_7,p_ph_bkg_gamma_bin_8,p_ph_bkg_gamma_bin_9,p_ph_sig_gamma_bin_0,p_ph_sig_gamma_bin_1,p_ph_sig_gamma_bin_10,p_ph_sig_gamma_bin_11,p_ph_sig_gamma_bin_12,p_ph_sig_gamma_bin_13,p_ph_sig_gamma_bin_14,p_ph_sig_gamma_bin_15,p_ph_sig_gamma_bin_16,p_ph_sig_gamma_bin_17,p_ph_sig_gamma_bin_18,p_ph_sig_gamma_bin_19,p_ph_sig_gamma_bin_2,p_ph_sig_gamma_bin_20,p_ph_sig_gamma_bin_21,p_ph_sig_gamma_bin_22,p_ph_sig_gamma_bin_23,p_ph_sig_gamma_bin_24,p_ph_sig_gamma_bin_3,p_ph_sig_gamma_bin_4,p_ph_sig_gamma_bin_5,p_ph_sig_gamma_bin_6,p_ph_sig_gamma_bin_7,p_ph_sig_gamma_bin_8,p_ph_sig_gamma_bin_9)\n", "[#1] INFO:Fitting -- RooAbsPdf::fitTo(model1) fixing normalization set for coefficient determination to observables in data\n", "[#1] INFO:Fitting -- Creation of NLL object took 2.37236 ms\n", "[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model1_sumData) Summation contains a RooNLLVar, using its error level\n", "[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only\n", "Minuit2Minimizer: Minimize with max-calls 16000 convergence for edm < 1 strategy 1\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10425.6) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=0.024352\tAsig=0.0100451\tp_ph_bkg_gamma_bin_0=0.351482\tp_ph_bkg_gamma_bin_1=0.352595\tp_ph_bkg_gamma_bin_10=0.342683\tp_ph_bkg_gamma_bin_11=0.368891\tp_ph_bkg_gamma_bin_12=0.38197\tp_ph_bkg_gamma_bin_13=0.365529\tp_ph_bkg_gamma_bin_14=0.358098\tp_ph_bkg_gamma_bin_15=0.358584\tp_ph_bkg_gamma_bin_16=0.367344\tp_ph_bkg_gamma_bin_17=0.356263\tp_ph_bkg_gamma_bin_18=0.362211\tp_ph_bkg_gamma_bin_19=0.340063\tp_ph_bkg_gamma_bin_2=0.35054\tp_ph_bkg_gamma_bin_20=0.352376\tp_ph_bkg_gamma_bin_21=0.351589\tp_ph_bkg_gamma_bin_22=0.351615\tp_ph_bkg_gamma_bin_23=0.344488\tp_ph_bkg_gamma_bin_24=0.365687\tp_ph_bkg_gamma_bin_3=0.355197\tp_ph_bkg_gamma_bin_4=0.347776\tp_ph_bkg_gamma_bin_5=0.348629\tp_ph_bkg_gamma_bin_6=0.357616\tp_ph_bkg_gamma_bin_7=0.351061\tp_ph_bkg_gamma_bin_8=0.342678\tp_ph_bkg_gamma_bin_9=0.357292\tp_ph_sig_gamma_bin_11=0.3339\tp_ph_sig_gamma_bin_12=0.341347\tp_ph_sig_gamma_bin_13=0.333434\tp_ph_sig_gamma_bin_14=0.328932\tp_ph_sig_gamma_bin_15=0.328666\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10425.6) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=0.327409\tAsig=0.26768\tp_ph_bkg_gamma_bin_0=0.63877\tp_ph_bkg_gamma_bin_1=0.639509\tp_ph_bkg_gamma_bin_10=0.632897\tp_ph_bkg_gamma_bin_11=0.650254\tp_ph_bkg_gamma_bin_12=0.658769\tp_ph_bkg_gamma_bin_13=0.648049\tp_ph_bkg_gamma_bin_14=0.643155\tp_ph_bkg_gamma_bin_15=0.643476\tp_ph_bkg_gamma_bin_16=0.64924\tp_ph_bkg_gamma_bin_17=0.641941\tp_ph_bkg_gamma_bin_18=0.645868\tp_ph_bkg_gamma_bin_19=0.63114\tp_ph_bkg_gamma_bin_2=0.638144\tp_ph_bkg_gamma_bin_20=0.639364\tp_ph_bkg_gamma_bin_21=0.638841\tp_ph_bkg_gamma_bin_22=0.638858\tp_ph_bkg_gamma_bin_23=0.634106\tp_ph_bkg_gamma_bin_24=0.648153\tp_ph_bkg_gamma_bin_3=0.641235\tp_ph_bkg_gamma_bin_4=0.636302\tp_ph_bkg_gamma_bin_5=0.636871\tp_ph_bkg_gamma_bin_6=0.642836\tp_ph_bkg_gamma_bin_7=0.63849\tp_ph_bkg_gamma_bin_8=0.632894\tp_ph_bkg_gamma_bin_9=0.642622\tp_ph_sig_gamma_bin_11=0.626988\tp_ph_sig_gamma_bin_12=0.632002\tp_ph_sig_gamma_bin_13=0.626672\tp_ph_sig_gamma_bin_14=0.623623\tp_ph_sig_gamma_bin_15=0.623442\n", "\n", "Minuit2Minimizer : Valid minimum - status = 0\n", "FVAL = -2282.22793579973768\n", "Edm = 6.50103677974530594e-05\n", "Nfcn = 730\n", "Abkg\t = 0.0613644\t +/- 0.00219573\t(limited)\n", "Asig\t = 0.850329\t +/- 0.233134\t(limited)\n", "p_ph_bkg_gamma_bin_0\t = 0.998158\t +/- 0.0370021\t(limited)\n", "p_ph_bkg_gamma_bin_1\t = 1.0004\t +/- 0.0370335\t(limited)\n", "p_ph_bkg_gamma_bin_10\t = 0.980402\t +/- 0.0356998\t(limited)\n", "p_ph_bkg_gamma_bin_11\t = 1.00613\t +/- 0.0401139\t(limited)\n", "p_ph_bkg_gamma_bin_12\t = 1.00446\t +/- 0.0453421\t(limited)\n", "p_ph_bkg_gamma_bin_13\t = 0.991203\t +/- 0.0395193\t(limited)\n", "p_ph_bkg_gamma_bin_14\t = 0.996054\t +/- 0.0385246\t(limited)\n", "p_ph_bkg_gamma_bin_15\t = 1.00908\t +/- 0.0369959\t(limited)\n", "p_ph_bkg_gamma_bin_16\t = 1.03008\t +/- 0.0382325\t(limited)\n", "p_ph_bkg_gamma_bin_17\t = 1.00779\t +/- 0.0364465\t(limited)\n", "p_ph_bkg_gamma_bin_18\t = 1.01976\t +/- 0.0396035\t(limited)\n", "p_ph_bkg_gamma_bin_19\t = 0.975108\t +/- 0.0359113\t(limited)\n", "p_ph_bkg_gamma_bin_2\t = 0.996261\t +/- 0.0365836\t(limited)\n", "p_ph_bkg_gamma_bin_20\t = 0.999962\t +/- 0.0369391\t(limited)\n", "p_ph_bkg_gamma_bin_21\t = 0.998374\t +/- 0.0370495\t(limited)\n", "p_ph_bkg_gamma_bin_22\t = 0.998427\t +/- 0.0380223\t(limited)\n", "p_ph_bkg_gamma_bin_23\t = 0.984048\t +/- 0.0361184\t(limited)\n", "p_ph_bkg_gamma_bin_24\t = 1.02675\t +/- 0.0373117\t(limited)\n", "p_ph_bkg_gamma_bin_3\t = 1.00565\t +/- 0.0386186\t(limited)\n", "p_ph_bkg_gamma_bin_4\t = 0.990685\t +/- 0.0377676\t(limited)\n", "p_ph_bkg_gamma_bin_5\t = 0.992405\t +/- 0.0376505\t(limited)\n", "p_ph_bkg_gamma_bin_6\t = 1.01052\t +/- 0.038689\t(limited)\n", "p_ph_bkg_gamma_bin_7\t = 0.99731\t +/- 0.0359322\t(limited)\n", "p_ph_bkg_gamma_bin_8\t = 0.980392\t +/- 0.0362349\t(limited)\n", "p_ph_bkg_gamma_bin_9\t = 1.00987\t +/- 0.0372551\t(limited)\n", "p_ph_sig_gamma_bin_11\t = 1.09457\t +/- 0.29733\t(limited)\n", "p_ph_sig_gamma_bin_12\t = 1.07037\t +/- 0.213545\t(limited)\n", "p_ph_sig_gamma_bin_13\t = 0.890724\t +/- 0.195929\t(limited)\n", "p_ph_sig_gamma_bin_14\t = 0.947374\t +/- 0.309135\t(limited)\n", "p_ph_sig_gamma_bin_15\t = 1.14132\t +/- 0.81204\t(limited)\n", "[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.\n", "[#1] INFO:Minimization -- Including the following constraint terms in minimization: (hc_sigbkg)\n", "[#1] INFO:Minimization -- The global observables are not defined , normalize constraints with respect to the parameters (Abkg,Asig,p_ph_sig2_gamma_bin_0,p_ph_sig2_gamma_bin_1,p_ph_sig2_gamma_bin_10,p_ph_sig2_gamma_bin_11,p_ph_sig2_gamma_bin_12,p_ph_sig2_gamma_bin_13,p_ph_sig2_gamma_bin_14,p_ph_sig2_gamma_bin_15,p_ph_sig2_gamma_bin_16,p_ph_sig2_gamma_bin_17,p_ph_sig2_gamma_bin_18,p_ph_sig2_gamma_bin_19,p_ph_sig2_gamma_bin_2,p_ph_sig2_gamma_bin_20,p_ph_sig2_gamma_bin_21,p_ph_sig2_gamma_bin_22,p_ph_sig2_gamma_bin_23,p_ph_sig2_gamma_bin_24,p_ph_sig2_gamma_bin_3,p_ph_sig2_gamma_bin_4,p_ph_sig2_gamma_bin_5,p_ph_sig2_gamma_bin_6,p_ph_sig2_gamma_bin_7,p_ph_sig2_gamma_bin_8,p_ph_sig2_gamma_bin_9)\n", "[#1] INFO:Fitting -- RooAbsPdf::fitTo(model2) fixing normalization set for coefficient determination to observables in data\n", "[#1] INFO:Fitting -- Creation of NLL object took 758.283 μs\n", "[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model2_sumData) Summation contains a RooNLLVar, using its error level\n", "[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only\n", "Minuit2Minimizer: Minimize with max-calls 13500 convergence for edm < 1 strategy 1\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=7.28945\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=7.28945\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=7.28945\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=7.28945\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=7.28945\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=7.28945\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=7.28945\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=7.28945\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=7.28945\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=7.28945\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=7.28945\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=7.28945\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=7.28945\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=7.28945\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=7.28945\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=7.28945\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=7.28945\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=7.28945\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=7.28945\tp_ph_sig2_gamma_bin_9=1\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=1\tAsig=1\tp_ph_sig2_gamma_bin_0=1\tp_ph_sig2_gamma_bin_1=1\tp_ph_sig2_gamma_bin_10=1\tp_ph_sig2_gamma_bin_11=1\tp_ph_sig2_gamma_bin_12=1\tp_ph_sig2_gamma_bin_13=1\tp_ph_sig2_gamma_bin_14=1\tp_ph_sig2_gamma_bin_15=1\tp_ph_sig2_gamma_bin_16=1\tp_ph_sig2_gamma_bin_17=1\tp_ph_sig2_gamma_bin_18=1\tp_ph_sig2_gamma_bin_19=1\tp_ph_sig2_gamma_bin_2=1\tp_ph_sig2_gamma_bin_20=1\tp_ph_sig2_gamma_bin_21=1\tp_ph_sig2_gamma_bin_22=1\tp_ph_sig2_gamma_bin_23=1\tp_ph_sig2_gamma_bin_24=1\tp_ph_sig2_gamma_bin_3=1\tp_ph_sig2_gamma_bin_4=1\tp_ph_sig2_gamma_bin_5=1\tp_ph_sig2_gamma_bin_6=1\tp_ph_sig2_gamma_bin_7=1\tp_ph_sig2_gamma_bin_8=1\tp_ph_sig2_gamma_bin_9=7.28945\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=0.024352\tAsig=0.0100451\tp_ph_sig2_gamma_bin_0=0.351536\tp_ph_sig2_gamma_bin_1=0.352649\tp_ph_sig2_gamma_bin_10=0.342736\tp_ph_sig2_gamma_bin_11=0.36962\tp_ph_sig2_gamma_bin_12=0.383863\tp_ph_sig2_gamma_bin_13=0.366897\tp_ph_sig2_gamma_bin_14=0.358549\tp_ph_sig2_gamma_bin_15=0.358659\tp_ph_sig2_gamma_bin_16=0.3674\tp_ph_sig2_gamma_bin_17=0.356318\tp_ph_sig2_gamma_bin_18=0.362267\tp_ph_sig2_gamma_bin_19=0.340116\tp_ph_sig2_gamma_bin_2=0.350595\tp_ph_sig2_gamma_bin_20=0.352431\tp_ph_sig2_gamma_bin_21=0.351643\tp_ph_sig2_gamma_bin_22=0.35167\tp_ph_sig2_gamma_bin_23=0.344542\tp_ph_sig2_gamma_bin_24=0.365744\tp_ph_sig2_gamma_bin_3=0.355252\tp_ph_sig2_gamma_bin_4=0.34783\tp_ph_sig2_gamma_bin_5=0.348683\tp_ph_sig2_gamma_bin_6=0.357671\tp_ph_sig2_gamma_bin_7=0.351115\tp_ph_sig2_gamma_bin_8=0.342731\tp_ph_sig2_gamma_bin_9=0.357348\n", "\n", "RooAbsMinimizerFcn: Minimized function has error status.\n", "Returning maximum FCN so far (10415.9) to force MIGRAD to back out of this region. Error log follows.\n", "Parameter values: \tAbkg=0.327407\tAsig=0.267678\tp_ph_sig2_gamma_bin_0=0.638805\tp_ph_sig2_gamma_bin_1=0.639545\tp_ph_sig2_gamma_bin_10=0.632932\tp_ph_sig2_gamma_bin_11=0.650729\tp_ph_sig2_gamma_bin_12=0.659993\tp_ph_sig2_gamma_bin_13=0.648946\tp_ph_sig2_gamma_bin_14=0.643452\tp_ph_sig2_gamma_bin_15=0.643524\tp_ph_sig2_gamma_bin_16=0.649276\tp_ph_sig2_gamma_bin_17=0.641977\tp_ph_sig2_gamma_bin_18=0.645904\tp_ph_sig2_gamma_bin_19=0.631174\tp_ph_sig2_gamma_bin_2=0.638179\tp_ph_sig2_gamma_bin_20=0.6394\tp_ph_sig2_gamma_bin_21=0.638876\tp_ph_sig2_gamma_bin_22=0.638894\tp_ph_sig2_gamma_bin_23=0.634141\tp_ph_sig2_gamma_bin_24=0.648189\tp_ph_sig2_gamma_bin_3=0.641271\tp_ph_sig2_gamma_bin_4=0.636338\tp_ph_sig2_gamma_bin_5=0.636906\tp_ph_sig2_gamma_bin_6=0.642872\tp_ph_sig2_gamma_bin_7=0.638525\tp_ph_sig2_gamma_bin_8=0.632929\tp_ph_sig2_gamma_bin_9=0.642658\n", "\n", "Minuit2Minimizer : Valid minimum - status = 0\n", "FVAL = -2291.45108203063864\n", "Edm = 0.00021711856797120699\n", "Nfcn = 1108\n", "Abkg\t = 0.0614871\t +/- 0.00221998\t(limited)\n", "Asig\t = 0.834474\t +/- 0.202991\t(limited)\n", "p_ph_sig2_gamma_bin_0\t = 0.997805\t +/- 0.0474115\t(limited)\n", "p_ph_sig2_gamma_bin_1\t = 1.00004\t +/- 0.0474649\t(limited)\n", "p_ph_sig2_gamma_bin_10\t = 0.980078\t +/- 0.0456101\t(limited)\n", "p_ph_sig2_gamma_bin_11\t = 1.01069\t +/- 0.0488754\t(limited)\n", "p_ph_sig2_gamma_bin_12\t = 1.01199\t +/- 0.0483997\t(limited)\n", "p_ph_sig2_gamma_bin_13\t = 0.983813\t +/- 0.0467055\t(limited)\n", "p_ph_sig2_gamma_bin_14\t = 0.994769\t +/- 0.0483032\t(limited)\n", "p_ph_sig2_gamma_bin_15\t = 1.0095\t +/- 0.0473249\t(limited)\n", "p_ph_sig2_gamma_bin_16\t = 1.02967\t +/- 0.049202\t(limited)\n", "p_ph_sig2_gamma_bin_17\t = 1.00742\t +/- 0.0467328\t(limited)\n", "p_ph_sig2_gamma_bin_18\t = 1.01937\t +/- 0.0509499\t(limited)\n", "p_ph_sig2_gamma_bin_19\t = 0.974793\t +/- 0.0458586\t(limited)\n", "p_ph_sig2_gamma_bin_2\t = 0.99591\t +/- 0.0468523\t(limited)\n", "p_ph_sig2_gamma_bin_20\t = 0.999605\t +/- 0.0473385\t(limited)\n", "p_ph_sig2_gamma_bin_21\t = 0.99802\t +/- 0.0474749\t(limited)\n", "p_ph_sig2_gamma_bin_22\t = 0.998073\t +/- 0.0487512\t(limited)\n", "p_ph_sig2_gamma_bin_23\t = 0.983718\t +/- 0.0461774\t(limited)\n", "p_ph_sig2_gamma_bin_24\t = 1.02635\t +/- 0.0479702\t(limited)\n", "p_ph_sig2_gamma_bin_3\t = 1.00528\t +/- 0.0495745\t(limited)\n", "p_ph_sig2_gamma_bin_4\t = 0.990344\t +/- 0.0483736\t(limited)\n", "p_ph_sig2_gamma_bin_5\t = 0.992062\t +/- 0.0482299\t(limited)\n", "p_ph_sig2_gamma_bin_6\t = 1.01014\t +/- 0.0496947\t(limited)\n", "p_ph_sig2_gamma_bin_7\t = 0.996957\t +/- 0.0460029\t(limited)\n", "p_ph_sig2_gamma_bin_8\t = 0.980068\t +/- 0.0463103\t(limited)\n", "p_ph_sig2_gamma_bin_9\t = 1.00949\t +/- 0.0478068\t(limited)\n" ] } ], "source": [ "auto result0 = model0.fitTo(sumData, PrintLevel(0), Save());\n", "auto result1 = model1.fitTo(sumData, PrintLevel(0), Save());\n", "auto result2 = model2.fitTo(sumData, PrintLevel(0), Save());\n", "\n", "\n", "TCanvas* can = new TCanvas(\"can\", \"\", 1500, 600);\n", "can->Divide(3,1);\n", "\n", "TPaveText pt(-19.5, 1, -2, 25);\n", "pt.SetFillStyle(0);\n", "pt.SetBorderSize(0);\n", "\n", "\n", "can->cd(1);\n", "auto frame = x.frame(Title(\"No template uncertainties\"));" ] }, { "cell_type": "markdown", "id": "be950803", "metadata": {}, "source": [ "Plot data to enable automatic determination of model0 normalisation:" ] }, { "cell_type": "code", "execution_count": 17, "id": "0581b396", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:34:59.935090Z", "iopub.status.busy": "2026-05-19T20:34:59.934981Z", "iopub.status.idle": "2026-05-19T20:35:00.144173Z", "shell.execute_reply": "2026-05-19T20:35:00.143734Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model0) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model0) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model0) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model0) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model0) WARNING: argument CurveNameSuffix is duplicated\n" ] } ], "source": [ "sumData.plotOn(frame);\n", "model0.plotOn(frame, LineColor(kBlue), VisualizeError(*result0));" ] }, { "cell_type": "markdown", "id": "e833aa95", "metadata": {}, "source": [ "Plot data again to show it on top of model0 error bands:" ] }, { "cell_type": "code", "execution_count": 18, "id": "e27aad2f", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:35:00.145716Z", "iopub.status.busy": "2026-05-19T20:35:00.145578Z", "iopub.status.idle": "2026-05-19T20:35:00.354159Z", "shell.execute_reply": "2026-05-19T20:35:00.353678Z" } }, "outputs": [], "source": [ "sumData.plotOn(frame);" ] }, { "cell_type": "markdown", "id": "8c0fa47c", "metadata": {}, "source": [ "Plot model components" ] }, { "cell_type": "code", "execution_count": 19, "id": "8eb295cf", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:35:00.355908Z", "iopub.status.busy": "2026-05-19T20:35:00.355798Z", "iopub.status.idle": "2026-05-19T20:35:00.569521Z", "shell.execute_reply": "2026-05-19T20:35:00.569078Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model0) directly selected PDF components: (p_h_sig)\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model0) indirectly selected PDF components: ()\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model0) directly selected PDF components: (p_h_bkg)\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model0) indirectly selected PDF components: ()\n", "[#1] INFO:Plotting -- RooPlot::updateFitRangeNorm: New event count of 50 will supersede previous event count of 1050 for normalization of PDF projections\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model1) WARNING: argument CurveNameSuffix is duplicated\n" ] } ], "source": [ "model0.plotOn(frame, LineColor(kBlue));\n", "model0.plotOn(frame, Components(p_h_sig), LineColor(kAzure));\n", "model0.plotOn(frame, Components(p_h_bkg), LineColor(kRed));\n", "model0.paramOn(frame);\n", "\n", "sigData->plotOn(frame, MarkerColor(kBlue));\n", "frame->Draw();\n", "\n", "for (auto text : {\n", " \"No template uncertainties\",\n", " \"are taken into account.\",\n", " \"This leads to low errors\",\n", " \"for the parameters A, since\",\n", " \"the only source of errors\",\n", " \"are the data statistics.\"}) {\n", " pt.AddText(text);\n", "}\n", "pt.DrawClone();\n", "\n", "\n", "can->cd(2);\n", "frame = x.frame(Title(\"Barlow Beeston for Sig & Bkg separately\"));\n", "sumData.plotOn(frame);\n", "model1.plotOn(frame, LineColor(kBlue), VisualizeError(*result1));" ] }, { "cell_type": "markdown", "id": "576ad960", "metadata": {}, "source": [ "Plot data again to show it on top of error bands:" ] }, { "cell_type": "code", "execution_count": 20, "id": "7f5a486c", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:35:00.571017Z", "iopub.status.busy": "2026-05-19T20:35:00.570907Z", "iopub.status.idle": "2026-05-19T20:35:00.784089Z", "shell.execute_reply": "2026-05-19T20:35:00.783735Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model1) directly selected PDF components: (p_ph_sig)\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model1) indirectly selected PDF components: (sp_ph)\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model1) directly selected PDF components: (p_ph_bkg)\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model1) indirectly selected PDF components: (sp_ph)\n", "[#1] INFO:Plotting -- RooPlot::updateFitRangeNorm: New event count of 50 will supersede previous event count of 1050 for normalization of PDF projections\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n", "[#0] WARNING:InputArguments -- RooAbsReal::plotOn(model2) WARNING: argument CurveNameSuffix is duplicated\n" ] } ], "source": [ "sumData.plotOn(frame);\n", "model1.plotOn(frame, LineColor(kBlue));\n", "model1.plotOn(frame, Components(p_ph_sig1), LineColor(kAzure));\n", "model1.plotOn(frame, Components(p_ph_bkg1), LineColor(kRed));\n", "model1.paramOn(frame, Parameters(RooArgSet(Asig1, Abkg1)));\n", "\n", "sigData->plotOn(frame, MarkerColor(kBlue));\n", "frame->Draw();\n", "\n", "pt.Clear();\n", "for (auto text : {\n", " \"With gamma parameters, the\",\n", " \"signal & background templates\",\n", " \"can adapt to the data.\",\n", " \"Note how the blue signal\",\n", " \"template changes its shape.\",\n", " \"This leads to higher errors\",\n", " \"of the scale parameters A.\"}) {\n", " pt.AddText(text);\n", "}\n", "pt.DrawClone();\n", "\n", "can->cd(3);\n", "frame = x.frame(Title(\"Barlow Beeston light for (Sig+Bkg)\"));\n", "sumData.plotOn(frame);\n", "model2.plotOn(frame, LineColor(kBlue), VisualizeError(*result2));" ] }, { "cell_type": "markdown", "id": "70e5e425", "metadata": {}, "source": [ "Plot data again to show it on top of model0 error bands:" ] }, { "cell_type": "code", "execution_count": 21, "id": "47750dc1", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:35:00.791366Z", "iopub.status.busy": "2026-05-19T20:35:00.791245Z", "iopub.status.idle": "2026-05-19T20:35:01.018235Z", "shell.execute_reply": "2026-05-19T20:35:01.011396Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model2) directly selected PDF components: (p_ph_sig2)\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model2) indirectly selected PDF components: (sp_ph)\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model2) directly selected PDF components: (p_ph_bkg2)\n", "[#1] INFO:Plotting -- RooAbsPdf::plotOn(model2) indirectly selected PDF components: (sp_ph)\n", "[#1] INFO:Plotting -- RooPlot::updateFitRangeNorm: New event count of 50 will supersede previous event count of 1050 for normalization of PDF projections\n", "Asig [normal ] = 0.833778 +/- 0.189814\n", "Asig [BB ] = 0.850329 +/- 0.235783\n", "Asig [BBlight] = 0.834474 +/- 0.202955\n" ] } ], "source": [ "sumData.plotOn(frame);\n", "model2.plotOn(frame, LineColor(kBlue));\n", "model2.plotOn(frame, Components(p_ph_sig2), LineColor(kAzure));\n", "model2.plotOn(frame, Components(p_ph_bkg2), LineColor(kRed));\n", "model2.paramOn(frame, Parameters(RooArgSet(Asig2, Abkg2)));\n", "\n", "sigData->plotOn(frame, MarkerColor(kBlue));\n", "frame->Draw();\n", "\n", "pt.Clear();\n", "for (auto text : {\n", " \"When signal and background\",\n", " \"template share one gamma para-\",\n", " \"meter per bin, they adapt less.\",\n", " \"The errors of the A parameters\",\n", " \"also shrink slightly.\"}) {\n", " pt.AddText(text);\n", "}\n", "pt.DrawClone();\n", "\n", "\n", "std::cout << \"Asig [normal ] = \" << Asig0.getVal() << \" +/- \" << Asig0.getError() << std::endl;\n", "std::cout << \"Asig [BB ] = \" << Asig1.getVal() << \" +/- \" << Asig1.getError() << std::endl;\n", "std::cout << \"Asig [BBlight] = \" << Asig2.getVal() << \" +/- \" << Asig2.getError() << std::endl;" ] }, { "cell_type": "markdown", "id": "a639130c", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 22, "id": "4400f1da", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:35:01.019926Z", "iopub.status.busy": "2026-05-19T20:35:01.019787Z", "iopub.status.idle": "2026-05-19T20:35:01.249844Z", "shell.execute_reply": "2026-05-19T20:35:01.249335Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "
\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "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 }