{
"cells": [
{
"cell_type": "markdown",
"id": "9136481c",
"metadata": {},
"source": [
"# testUnfold7c\n",
"Test program for the classes TUnfoldDensity and TUnfoldBinning.\n",
"\n",
"A toy test of the TUnfold package\n",
"\n",
"\n",
"This example is documented in conference proceedings:\n",
"\n",
" arXiv:1611.01927\n",
" 12th Conference on Quark Confinement and the Hadron Spectrum (Confinement XII)\n",
"\n",
"This is an example of unfolding a one-dimensional distribution. It compares\n",
"various unfolding methods:\n",
"\n",
" matrix inversion, template fit, L-curve scan,\n",
" iterative unfolding, etc\n",
"\n",
"Further details can be found in talk by S.Schmitt at:\n",
"\n",
" XII Quark Confinement and the Hadron Spectrum\n",
" 29.8. - 3.9.2016 Thessaloniki, Greece\n",
" statictics session (+proceedings)\n",
"\n",
"The example comprises several macros\n",
" - testUnfold7a.C create root files with TTree objects for\n",
" signal, background and data\n",
" - write files testUnfold7_signal.root\n",
" testUnfold7_background.root\n",
" testUnfold7_data.root\n",
"\n",
" - testUnfold7b.C loop over trees and fill histograms based on the\n",
" TUnfoldBinning objects\n",
" - read testUnfold7binning.xml\n",
" testUnfold7_signal.root\n",
" testUnfold7_background.root\n",
" testUnfold7_data.root\n",
"\n",
" - write testUnfold7_histograms.root\n",
"\n",
" - testUnfold7c.C run the unfolding\n",
" - read testUnfold7_histograms.root\n",
" - write testUnfold7_result.root\n",
" - write many histograms, to compare various unfolding methods\n",
"\n",
"\n",
" **Version 17.6, in parallel to changes in TUnfold**\n",
"\n",
" This file is part of TUnfold.\n",
"\n",
" TUnfold is free software: you can redistribute it and/or modify\n",
" it under the terms of the GNU General Public License as published by\n",
" the Free Software Foundation, either version 3 of the License, or\n",
" (at your option) any later version.\n",
"\n",
" TUnfold is distributed in the hope that it will be useful,\n",
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n",
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n",
" GNU General Public License for more details.\n",
"\n",
" You should have received a copy of the GNU General Public License\n",
" along with TUnfold. If not, see .\n",
"\n",
"\n",
"\n",
"**Author:** Stefan Schmitt DESY, 14.10.2008 \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:11 PM."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3b82e323",
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%cpp -d\n",
"#include \n",
"#include \n",
"#include