{
"cells": [
{
"cell_type": "markdown",
"id": "ffc233e6",
"metadata": {},
"source": [
"# rs102_hypotestwithshapes\n",
"A typical search for a new particle by studying an invariant mass distribution\n",
"\n",
"The macro creates a simple signal model and two background models,\n",
"which are added to a RooWorkspace.\n",
"The macro creates a toy dataset, and then uses a RooStats\n",
"ProfileLikleihoodCalculator to do a hypothesis test of the\n",
"background-only and signal+background hypotheses.\n",
"In this example, shape uncertainties are not taken into account, but\n",
"normalization uncertainties are.\n",
"\n",
"\n",
"\n",
"\n",
"**Author:** Kyle Cranmer \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:35 PM."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "4fe6f870",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:52.466614Z",
"iopub.status.busy": "2026-05-19T20:35:52.466474Z",
"iopub.status.idle": "2026-05-19T20:35:52.476629Z",
"shell.execute_reply": "2026-05-19T20:35:52.476192Z"
}
},
"outputs": [],
"source": [
"%%cpp -d\n",
"#include \"RooDataSet.h\"\n",
"#include \"RooRealVar.h\"\n",
"#include \"RooGaussian.h\"\n",
"#include \"RooAddPdf.h\"\n",
"#include \"RooProdPdf.h\"\n",
"#include \"RooAddition.h\"\n",
"#include \"RooProduct.h\"\n",
"#include \"TCanvas.h\"\n",
"#include \"RooChebychev.h\"\n",
"#include \"RooAbsPdf.h\"\n",
"#include \"RooFitResult.h\"\n",
"#include \"RooPlot.h\"\n",
"#include \"RooAbsArg.h\"\n",
"#include \"RooWorkspace.h\"\n",
"#include \"RooStats/ProfileLikelihoodCalculator.h\"\n",
"#include \"RooStats/HypoTestResult.h\"\n",
"#include \n",
"\n",
"using namespace RooFit;\n",
"using namespace RooStats;\n",
"\n",
"void AddModel(RooWorkspace *);\n",
"void AddData(RooWorkspace *);\n",
"void DoHypothesisTest(RooWorkspace *);\n",
"void MakePlots(RooWorkspace *);"
]
},
{
"cell_type": "markdown",
"id": "73f12f03",
"metadata": {},
"source": [
" ____________________________________\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "a3124251",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:52.487075Z",
"iopub.status.busy": "2026-05-19T20:35:52.486950Z",
"iopub.status.idle": "2026-05-19T20:35:52.536126Z",
"shell.execute_reply": "2026-05-19T20:35:52.535718Z"
}
},
"outputs": [],
"source": [
"%%cpp -d\n",
"void AddModel(RooWorkspace *wks)\n",
"{\n",
"\n",
" // Make models for signal (Higgs) and background (Z+jets and QCD)\n",
" // In real life, this part requires an intelligent modeling\n",
" // of signal and background -- this is only an example.\n",
"\n",
" // set range of observable\n",
" Double_t lowRange = 60, highRange = 200;\n",
"\n",
" // make a RooRealVar for the observable\n",
" RooRealVar invMass(\"invMass\", \"M_{inv}\", lowRange, highRange, \"GeV\");\n",
"\n",
" // --------------------------------------\n",
" // make a simple signal model.\n",
" RooRealVar mH(\"mH\", \"Higgs Mass\", 130, 90, 160);\n",
" RooRealVar sigma1(\"sigma1\", \"Width of Gaussian\", 12., 2, 100);\n",
" RooGaussian sigModel(\"sigModel\", \"Signal Model\", invMass, mH, sigma1);\n",
" // we will test this specific mass point for the signal\n",
" mH.setConstant();\n",
" // and we assume we know the mass resolution\n",
" sigma1.setConstant();\n",
"\n",
" // --------------------------------------\n",
" // make zjj model. Just like signal model\n",
" RooRealVar mZ(\"mZ\", \"Z Mass\", 91.2, 0, 100);\n",
" RooRealVar sigma1_z(\"sigma1_z\", \"Width of Gaussian\", 10., 6, 100);\n",
" RooGaussian zjjModel(\"zjjModel\", \"Z+jets Model\", invMass, mZ, sigma1_z);\n",
" // we know Z mass\n",
" mZ.setConstant();\n",
" // assume we know resolution too\n",
" sigma1_z.setConstant();\n",
"\n",
" // --------------------------------------\n",
" // make QCD model\n",
" RooRealVar a0(\"a0\", \"a0\", 0.26, -1, 1);\n",
" RooRealVar a1(\"a1\", \"a1\", -0.17596, -1, 1);\n",
" RooRealVar a2(\"a2\", \"a2\", 0.018437, -1, 1);\n",
" RooRealVar a3(\"a3\", \"a3\", 0.02, -1, 1);\n",
" RooChebychev qcdModel(\"qcdModel\", \"A Polynomial for QCD\", invMass, RooArgList(a0, a1, a2));\n",
"\n",
" // let's assume this shape is known, but the normalization is not\n",
" a0.setConstant();\n",
" a1.setConstant();\n",
" a2.setConstant();\n",
"\n",
" // --------------------------------------\n",
" // combined model\n",
"\n",
" // Setting the fraction of Zjj to be 40% for initial guess.\n",
" RooRealVar fzjj(\"fzjj\", \"fraction of zjj background events\", .4, 0., 1);\n",
"\n",
" // Set the expected fraction of signal to 20%.\n",
" RooRealVar fsigExpected(\"fsigExpected\", \"expected fraction of signal events\", .2, 0., 1);\n",
" fsigExpected.setConstant(); // use mu as main parameter, so fix this.\n",
"\n",
" // Introduce mu: the signal strength in units of the expectation.\n",
" // eg. mu = 1 is the SM, mu = 0 is no signal, mu=2 is 2x the SM\n",
" RooRealVar mu(\"mu\", \"signal strength in units of SM expectation\", 1, 0., 2);\n",
"\n",
" // Introduce ratio of signal efficiency to nominal signal efficiency.\n",
" // This is useful if you want to do limits on cross section.\n",
" RooRealVar ratioSigEff(\"ratioSigEff\", \"ratio of signal efficiency to nominal signal efficiency\", 1., 0., 2);\n",
" ratioSigEff.setConstant(true);\n",
"\n",
" // finally the signal fraction is the product of the terms above.\n",
" RooProduct fsig(\"fsig\", \"fraction of signal events\", RooArgSet(mu, ratioSigEff, fsigExpected));\n",
"\n",
" // full model\n",
" RooAddPdf model(\"model\", \"sig+zjj+qcd background shapes\", RooArgList(sigModel, zjjModel, qcdModel),\n",
" RooArgList(fsig, fzjj));\n",
"\n",
" // interesting for debugging and visualizing the model\n",
" // model.printCompactTree(\"\",\"fullModel.txt\");\n",
" // model.graphVizTree(\"fullModel.dot\");\n",
"\n",
" wks->import(model);\n",
"}"
]
},
{
"cell_type": "markdown",
"id": "bcbfa57d",
"metadata": {},
"source": [
" ____________________________________\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "71355551",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:52.537659Z",
"iopub.status.busy": "2026-05-19T20:35:52.537523Z",
"iopub.status.idle": "2026-05-19T20:35:52.558423Z",
"shell.execute_reply": "2026-05-19T20:35:52.557853Z"
}
},
"outputs": [],
"source": [
"%%cpp -d\n",
"void AddData(RooWorkspace *wks)\n",
"{\n",
" // Add a toy dataset\n",
"\n",
" Int_t nEvents = 150;\n",
" RooAbsPdf *model = wks->pdf(\"model\");\n",
" RooRealVar *invMass = wks->var(\"invMass\");\n",
"\n",
" std::unique_ptr data{model->generate(*invMass, nEvents)};\n",
"\n",
" wks->import(*data, Rename(\"data\"));\n",
"}"
]
},
{
"cell_type": "markdown",
"id": "6e9259fa",
"metadata": {},
"source": [
" ____________________________________\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "33a9c396",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:52.559853Z",
"iopub.status.busy": "2026-05-19T20:35:52.559641Z",
"iopub.status.idle": "2026-05-19T20:35:52.590890Z",
"shell.execute_reply": "2026-05-19T20:35:52.590330Z"
}
},
"outputs": [],
"source": [
"%%cpp -d\n",
"void DoHypothesisTest(RooWorkspace *wks)\n",
"{\n",
"\n",
" // Use a RooStats ProfileLikleihoodCalculator to do the hypothesis test.\n",
" ModelConfig model;\n",
" model.SetWorkspace(*wks);\n",
" model.SetPdf(\"model\");\n",
"\n",
" // plc.SetData(\"data\");\n",
"\n",
" ProfileLikelihoodCalculator plc;\n",
" plc.SetData(*(wks->data(\"data\")));\n",
"\n",
" // here we explicitly set the value of the parameters for the null.\n",
" // We want no signal contribution, eg. mu = 0\n",
" RooRealVar *mu = wks->var(\"mu\");\n",
" // RooArgSet* nullParams = new RooArgSet(\"nullParams\");\n",
" // nullParams->addClone(*mu);\n",
" RooArgSet poi(*mu);\n",
" RooArgSet *nullParams = (RooArgSet *)poi.snapshot();\n",
" nullParams->setRealValue(\"mu\", 0);\n",
"\n",
" // plc.SetNullParameters(*nullParams);\n",
" plc.SetModel(model);\n",
" // NOTE: using snapshot will import nullparams\n",
" // in the WS and merge with existing \"mu\"\n",
" // model.SetSnapshot(*nullParams);\n",
"\n",
" // use instead setNuisanceParameters\n",
" plc.SetNullParameters(*nullParams);\n",
"\n",
" // We get a HypoTestResult out of the calculator, and we can query it.\n",
" HypoTestResult *htr = plc.GetHypoTest();\n",
" cout << \"-------------------------------------------------\" << endl;\n",
" cout << \"The p-value for the null is \" << htr->NullPValue() << endl;\n",
" cout << \"Corresponding to a significance of \" << htr->Significance() << endl;\n",
" cout << \"-------------------------------------------------\\n\\n\" << endl;\n",
"}"
]
},
{
"cell_type": "markdown",
"id": "89160af2",
"metadata": {},
"source": [
" ____________________________________\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "63d678df",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:52.592220Z",
"iopub.status.busy": "2026-05-19T20:35:52.592099Z",
"iopub.status.idle": "2026-05-19T20:35:52.622884Z",
"shell.execute_reply": "2026-05-19T20:35:52.622362Z"
}
},
"outputs": [],
"source": [
"%%cpp -d\n",
"void MakePlots(RooWorkspace *wks)\n",
"{\n",
"\n",
" // Make plots of the data and the best fit model in two cases:\n",
" // first the signal+background case\n",
" // second the background-only case.\n",
"\n",
" // get some things out of workspace\n",
" RooAbsPdf *model = wks->pdf(\"model\");\n",
" RooAbsPdf *sigModel = wks->pdf(\"sigModel\");\n",
" RooAbsPdf *zjjModel = wks->pdf(\"zjjModel\");\n",
" RooAbsPdf *qcdModel = wks->pdf(\"qcdModel\");\n",
"\n",
" RooRealVar *mu = wks->var(\"mu\");\n",
" RooRealVar *invMass = wks->var(\"invMass\");\n",
" RooAbsData *data = wks->data(\"data\");\n",
"\n",
" // --------------------------------------\n",
" // Make plots for the Alternate hypothesis, eg. let mu float\n",
"\n",
" mu->setConstant(false);\n",
"\n",
" model->fitTo(*data, Save(true), Minos(false), Hesse(false), PrintLevel(-1));\n",
"\n",
" // plot sig candidates, full model, and individual components\n",
" new TCanvas();\n",
" RooPlot *frame = invMass->frame();\n",
" data->plotOn(frame);\n",
" model->plotOn(frame);\n",
" model->plotOn(frame, Components(*sigModel), LineStyle(kDashed), LineColor(kRed));\n",
" model->plotOn(frame, Components(*zjjModel), LineStyle(kDashed), LineColor(kBlack));\n",
" model->plotOn(frame, Components(*qcdModel), LineStyle(kDashed), LineColor(kGreen));\n",
"\n",
" frame->SetTitle(\"An example fit to the signal + background model\");\n",
" frame->Draw();\n",
" // cdata->SaveAs(\"alternateFit.gif\");\n",
"\n",
" // --------------------------------------\n",
" // Do Fit to the Null hypothesis. Eg. fix mu=0\n",
"\n",
" mu->setVal(0); // set signal fraction to 0\n",
" mu->setConstant(true); // set constant\n",
"\n",
" model->fitTo(*data, Save(true), Minos(false), Hesse(false), PrintLevel(-1));\n",
"\n",
" // plot signal candidates with background model and components\n",
" new TCanvas();\n",
" RooPlot *xframe2 = invMass->frame();\n",
" data->plotOn(xframe2, DataError(RooAbsData::SumW2));\n",
" model->plotOn(xframe2);\n",
" model->plotOn(xframe2, Components(*zjjModel), LineStyle(kDashed), LineColor(kBlack));\n",
" model->plotOn(xframe2, Components(*qcdModel), LineStyle(kDashed), LineColor(kGreen));\n",
"\n",
" xframe2->SetTitle(\"An example fit to the background-only model\");\n",
" xframe2->Draw();\n",
" // cbkgonly->SaveAs(\"nullFit.gif\");\n",
"}"
]
},
{
"cell_type": "markdown",
"id": "856fd911",
"metadata": {},
"source": [
"The main macro."
]
},
{
"cell_type": "markdown",
"id": "daeb235e",
"metadata": {},
"source": [
"Create a workspace to manage the project."
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "e07a4964",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:52.624347Z",
"iopub.status.busy": "2026-05-19T20:35:52.624220Z",
"iopub.status.idle": "2026-05-19T20:35:53.085553Z",
"shell.execute_reply": "2026-05-19T20:35:53.084954Z"
}
},
"outputs": [],
"source": [
"RooWorkspace *wspace = new RooWorkspace(\"myWS\");"
]
},
{
"cell_type": "markdown",
"id": "c6583b6c",
"metadata": {},
"source": [
"add the signal and background models to the workspace"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "37d70b8c",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:53.087275Z",
"iopub.status.busy": "2026-05-19T20:35:53.087153Z",
"iopub.status.idle": "2026-05-19T20:35:53.297185Z",
"shell.execute_reply": "2026-05-19T20:35:53.296804Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooAddPdf::model\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooGaussian::sigModel\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::invMass\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::mH\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::sigma1\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooProduct::fsig\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::mu\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::ratioSigEff\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::fsigExpected\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooGaussian::zjjModel\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::mZ\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::sigma1_z\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::fzjj\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooChebychev::qcdModel\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::a0\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::a1\n",
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing RooRealVar::a2\n"
]
}
],
"source": [
"AddModel(wspace);"
]
},
{
"cell_type": "markdown",
"id": "a78737ff",
"metadata": {},
"source": [
"add some toy data to the workspace"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "9729522e",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:53.308192Z",
"iopub.status.busy": "2026-05-19T20:35:53.308052Z",
"iopub.status.idle": "2026-05-19T20:35:53.527095Z",
"shell.execute_reply": "2026-05-19T20:35:53.526199Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[#1] INFO:ObjectHandling -- RooWorkspace::import(myWS) importing dataset modelData\n",
"[#1] INFO:ObjectHandling -- RooWorkSpace::import(myWS) changing name of dataset from modelData to data\n"
]
}
],
"source": [
"AddData(wspace);"
]
},
{
"cell_type": "markdown",
"id": "49e15487",
"metadata": {},
"source": [
"inspect the workspace if you wish\n",
"wspace->Print();"
]
},
{
"cell_type": "markdown",
"id": "dca26775",
"metadata": {},
"source": [
"do the hypothesis test"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "a03f9b68",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:53.528734Z",
"iopub.status.busy": "2026-05-19T20:35:53.528591Z",
"iopub.status.idle": "2026-05-19T20:35:53.745522Z",
"shell.execute_reply": "2026-05-19T20:35:53.745055Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[#1] INFO:InputArguments -- The deprecated RooFit::CloneData(1) option passed to createNLL() is ignored.\n",
"[#1] INFO:Fitting -- RooAbsPdf::fitTo(model) 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 689.534 μs\n",
"[#0] PROGRESS:Minimization -- ProfileLikelihoodCalcultor::DoGLobalFit - find MLE \n",
"[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_data) Summation contains a RooNLLVar, using its error level\n",
"[#0] PROGRESS:Minimization -- ProfileLikelihoodCalcultor::DoMinimizeNLL - using Minuit2 / with strategy 1\n",
"[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only\n",
"[#1] INFO:Minimization -- \n",
" RooFitResult: minimized FCN value: 717.039, estimated distance to minimum: 4.45135e-10\n",
" covariance matrix quality: Full, accurate covariance matrix\n",
" Status : MINIMIZE=0 \n",
"\n",
" Floating Parameter FinalValue +/- Error \n",
" -------------------- --------------------------\n",
" fzjj 3.1152e-01 +/- 5.03e-02\n",
" mu 1.0968e+00 +/- 3.03e-01\n",
"\n",
"[#0] PROGRESS:Minimization -- ProfileLikelihoodCalcultor::GetHypoTest - do conditional fit \n",
"[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_data) Summation contains a RooNLLVar, using its error level\n",
"[#0] PROGRESS:Minimization -- ProfileLikelihoodCalcultor::DoMinimizeNLL - using Minuit2 / with strategy 1\n",
"[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only\n",
"[#1] INFO:Minimization -- \n",
" RooFitResult: minimized FCN value: 723.97, estimated distance to minimum: 1.04934e-09\n",
" covariance matrix quality: Full, accurate covariance matrix\n",
" Status : MINIMIZE=0 \n",
"\n",
" Floating Parameter FinalValue +/- Error \n",
" -------------------- --------------------------\n",
" fzjj 2.6213e-01 +/- 5.18e-02\n",
"\n",
"-------------------------------------------------\n",
"The p-value for the null is 9.83108e-05\n",
"Corresponding to a significance of 3.72332\n",
"-------------------------------------------------\n",
"\n",
"\n"
]
}
],
"source": [
"DoHypothesisTest(wspace);"
]
},
{
"cell_type": "markdown",
"id": "64e3cf27",
"metadata": {},
"source": [
"make some plots"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "0e381e3b",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:53.747078Z",
"iopub.status.busy": "2026-05-19T20:35:53.746954Z",
"iopub.status.idle": "2026-05-19T20:35:53.957777Z",
"shell.execute_reply": "2026-05-19T20:35:53.956620Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[#1] INFO:Fitting -- RooAbsPdf::fitTo(model) fixing normalization set for coefficient determination to observables in data\n",
"[#1] INFO:Fitting -- Creation of NLL object took 220.941 μs\n",
"[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_data) Summation contains a RooNLLVar, using its error level\n",
"[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (sigModel)\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: ()\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (zjjModel)\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: ()\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (qcdModel)\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: ()\n",
"[#1] INFO:Fitting -- RooAbsPdf::fitTo(model) fixing normalization set for coefficient determination to observables in data\n",
"[#1] INFO:Fitting -- Creation of NLL object took 116.621 μs\n",
"[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_data) Summation contains a RooNLLVar, using its error level\n",
"[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (zjjModel)\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: ()\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (qcdModel)\n",
"[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: ()\n"
]
}
],
"source": [
"MakePlots(wspace);"
]
},
{
"cell_type": "markdown",
"id": "7b7e7102",
"metadata": {},
"source": [
"cleanup"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "4daaf767",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:53.971269Z",
"iopub.status.busy": "2026-05-19T20:35:53.971138Z",
"iopub.status.idle": "2026-05-19T20:35:54.180754Z",
"shell.execute_reply": "2026-05-19T20:35:54.179694Z"
}
},
"outputs": [],
"source": [
"delete wspace;"
]
},
{
"cell_type": "markdown",
"id": "8f4764c1",
"metadata": {},
"source": [
"Draw all canvases "
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "93499a02",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:35:54.182229Z",
"iopub.status.busy": "2026-05-19T20:35:54.182107Z",
"iopub.status.idle": "2026-05-19T20:35:54.417159Z",
"shell.execute_reply": "2026-05-19T20:35:54.416668Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"\n",
"
\n",
"\n",
"\n",
"\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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
}