{ "cells": [ { "cell_type": "markdown", "id": "538861da", "metadata": {}, "source": [ "# tree140_spider\n", "TSpider example.\n", "\n", "\n", "\n", "\n", "**Author:** Bastien Dallapiazza \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:19 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "47646729", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:19:11.426573Z", "iopub.status.busy": "2026-05-19T20:19:11.426427Z", "iopub.status.idle": "2026-05-19T20:19:11.934035Z", "shell.execute_reply": "2026-05-19T20:19:11.933416Z" } }, "outputs": [], "source": [ "auto c1 = new TCanvas(\"c1\", \"TSpider example\", 200, 10, 700, 700);\n", "auto f = TFile::Open(\"hsimple.root\");\n", "if (!f || f->IsZombie()) {\n", " printf(\"Please run /tutorials/hsimple.C before.\");\n", " return;\n", "}\n", "auto ntuple = f->Get(\"ntuple\");\n", "TString varexp = \"px:py:pz:random:sin(px):log(px/py):log(pz)\";\n", "TString selection = \"px>0 && py>0 && pz>0\";\n", "TString options = \"average\";\n", "auto spider = new TSpider(ntuple, varexp.Data(), selection.Data(), options.Data());\n", "spider->Draw();\n", "c1->ToggleEditor();\n", "c1->Selected(c1, spider, 1);" ] }, { "cell_type": "markdown", "id": "2220494c", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 2, "id": "75619cc0", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:19:11.935785Z", "iopub.status.busy": "2026-05-19T20:19:11.935658Z", "iopub.status.idle": "2026-05-19T20:19:12.141085Z", "shell.execute_reply": "2026-05-19T20:19:12.140499Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "
\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "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 }