{ "cells": [ { "cell_type": "markdown", "id": "43e78510", "metadata": {}, "source": [ "# gr107_exclusiongraph2\n", "The shaded areas are obtained with a fill for the graph and controlled with `SetLineWidth`.\n", "`SetLineWidth` for exclusion graphs is explained in the [TGraphPainter documentation](https://root.cern/doc/master/classTGraphPainter.html#GrP2)\n", "\n", "The graphs are drawn superposed, with help of an empty histogram that defines the axes, so we must make sure that the axis limits are adequate for all graphs. Notice that only the first drawn graph needs the \"A\" (draw axes) option. Alternatively, one could add the graphs to a TMultiGraph, which automatically defines the appropriate limits; see the gr106_exclusiongraph.C tutorial.\n", "\n", "We add some text to the plot with [TLatex](https://root.cern/doc/master/classTLatex.html). Notice that the TLatex text is drawn on the current pad/canvas and does not need, nor have, a \"same\" option.\n", "\n", "\n", "\n", "**Author:** Olivier Couet \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:38 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "f13e3d86", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:38:20.424982Z", "iopub.status.busy": "2026-05-19T20:38:20.424869Z", "iopub.status.idle": "2026-05-19T20:38:20.775670Z", "shell.execute_reply": "2026-05-19T20:38:20.774940Z" } }, "outputs": [], "source": [ "TCanvas *c = new TCanvas(\"c\",\"Charged Higgs L300 Contour\",0,0,700,700);\n", "c->SetTickx();\n", "c->SetTicky();\n", "c->SetGridx();\n", "c->SetGridy();" ] }, { "cell_type": "markdown", "id": "93ed1486", "metadata": {}, "source": [ "Frame to define the axis limits (50 to 500 and 1 to 50)" ] }, { "cell_type": "code", "execution_count": 2, "id": "15aaea35", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:38:20.777793Z", "iopub.status.busy": "2026-05-19T20:38:20.777658Z", "iopub.status.idle": "2026-05-19T20:38:20.985372Z", "shell.execute_reply": "2026-05-19T20:38:20.984640Z" } }, "outputs": [], "source": [ "TH1 *frame = new TH1F(\"frame\",\"\",1000,50,500);\n", "frame->SetMinimum(1);\n", "frame->SetMaximum(50);\n", "frame->SetDirectory(0);\n", "frame->SetStats(0);\n", "frame->GetXaxis()->SetTitle(\"m_{A} (GeV)\");\n", "frame->GetXaxis()->SetTickLength(0.02);\n", "frame->GetXaxis()->SetLabelSize(0.03);\n", "frame->GetYaxis()->SetTitle(\"tan#beta\");\n", "frame->GetYaxis()->SetMoreLogLabels();\n", "frame->GetYaxis()->SetLabelSize(0.03);\n", "frame->Draw(\" \");\n", "c->SetLogy();\n", "\n", "TGraph *gr1 = new TGraph(10);\n", "gr1->SetFillColor(6);\n", "gr1->SetFillStyle(3005);\n", "gr1->SetLineColor(6);\n", "gr1->SetLineWidth(603);\n", "gr1->SetPoint(0,140,0.5);\n", "gr1->SetPoint(1,130,2.9);\n", "gr1->SetPoint(2,124.677,3.83726);\n", "gr1->SetPoint(3,113.362,6.06903);\n", "gr1->SetPoint(4,108.513,8.00221);\n", "gr1->SetPoint(5,111.746,10.0272);\n", "gr1->SetPoint(6,119.828,12.8419);\n", "gr1->SetPoint(7,135.991,30.0872);\n", "gr1->SetPoint(8,140,40);\n", "gr1->SetPoint(9,135,60);\n", "gr1->Draw(\"C\");\n", "TLatex *tex = new TLatex(140.841,37.9762,\n", " \"#leftarrow t #rightarrow bH^{+}, H^{+} #rightarrow #tau#nu\");\n", "tex->SetTextColor(6);\n", "tex->Draw();\n", "\n", "TGraph *gr2 = new TGraph(15);\n", "gr2->SetName(\"Graph\");\n", "gr2->SetTitle(\"Graph\");\n", "gr2->SetFillColor(1);\n", "gr2->SetFillStyle(3005);\n", "gr2->SetLineWidth(3);\n", "gr2->SetPoint(0,499.192,3.02622);\n", "gr2->SetPoint(1,427.748,3.06233);\n", "gr2->SetPoint(2,358.244,3.10722);\n", "gr2->SetPoint(3,305.711,3.24589);\n", "gr2->SetPoint(4,244.289,3.36617);\n", "gr2->SetPoint(5,206.304,3.7544);\n", "gr2->SetPoint(6,178.017,4.50347);\n", "gr2->SetPoint(7,148.114,6.20297);\n", "gr2->SetPoint(8,131.142,8.00221);\n", "gr2->SetPoint(9,111.746,8.48188);\n", "gr2->SetPoint(10,102.047,9.52921);\n", "gr2->SetPoint(11,96.3901,13.2212);\n", "gr2->SetPoint(12,92.3491,19.0232);\n", "gr2->SetPoint(13,90.7328,26.3935);\n", "gr2->SetPoint(14,93.1573,50.4385);\n", "gr2->Draw(\"L\");\n", "tex = new TLatex(346.929,6.62281,\"ATLAS\");\n", "tex->SetLineWidth(2);\n", "tex->Draw();\n", "tex = new TLatex(328.341,5.24703,\"#intLdt = 300 fb^{-1}\");\n", "tex->SetTextSize(0.0297619);\n", "tex->SetLineWidth(2);\n", "tex->Draw();\n", "tex = new TLatex(340.463,4.1874,\"Maximal mixing\");\n", "tex->SetTextSize(0.0297619);\n", "tex->SetLineWidth(2);\n", "tex->Draw();\n", "tex = new TLatex(413.2,2.51608,\"LEP 2000\");\n", "tex->SetTextSize(0.0297619);\n", "tex->SetLineWidth(2);\n", "tex->Draw();\n", "\n", "TGraph *gr3 = new TGraph(10);\n", "gr3->SetName(\"Graph\");\n", "gr3->SetTitle(\"Graph\");\n", "gr3->SetFillColor(2);\n", "gr3->SetFillStyle(3004);\n", "gr3->SetLineColor(2);\n", "gr3->SetLineWidth(603);\n", "gr3->SetPoint(0,176.84,10.7499);\n", "gr3->SetPoint(1,190.575,11.9912);\n", "gr3->SetPoint(2,211.58,12.7108);\n", "gr3->SetPoint(3,243.088,12.3457);\n", "gr3->SetPoint(4,279.443,12.6185);\n", "gr3->SetPoint(5,302.065,12.9916);\n", "gr3->SetPoint(6,331.957,13.7713);\n", "gr3->SetPoint(7,369.928,14.2821);\n", "gr3->SetPoint(8,425.673,16.1651);\n", "gr3->SetPoint(9,499.192,18.1635);\n", "gr3->Draw(\"C\");\n", "tex = new TLatex(188.151,9.36035,\n", " \"gb #rightarrow tH^{+}, H^{+} #rightarrow #tau#nu\");\n", "tex->SetTextColor(2);\n", "tex->Draw();\n", "\n", "TGraph *gr4 = new TGraph(10);\n", "gr4->SetName(\"Graph\");\n", "gr4->SetTitle(\"Graph\");\n", "gr4->SetFillColor(4);\n", "gr4->SetFillStyle(3004);\n", "gr4->SetLineColor(4);\n", "gr4->SetLineWidth(-603);\n", "gr4->SetPoint(0,178.456,2.91797);\n", "gr4->SetPoint(1,200.269,3.40033);\n", "gr4->SetPoint(2,229.354,3.96243);\n", "gr4->SetPoint(3,249.551,4.07959);\n", "gr4->SetPoint(4,269.749,3.71097);\n", "gr4->SetPoint(5,298.025,3.09308);\n", "gr4->SetPoint(6,341.652,2.89679);\n", "gr4->SetPoint(7,378.007,2.57808);\n", "gr4->SetPoint(8,441.023,2.16454);\n", "gr4->SetPoint(9,499.677,1.76145);\n", "gr4->Draw(\"C\");\n", "tex = new TLatex(165.,1.15498,\n", " \"gb #rightarrow tH^{+}, H^{+} #rightarrow tb\");\n", "tex->SetTextColor(4);\n", "tex->Draw();\n", "\n", "TGraph *gr5 = new TGraph(10);\n", "gr5->SetName(\"Graph\");\n", "gr5->SetTitle(\"Graph\");\n", "gr5->SetFillColor(4);\n", "gr5->SetFillStyle(3004);\n", "gr5->SetLineColor(4);\n", "gr5->SetLineWidth(603);\n", "gr5->SetPoint(0,152.603,23.0996);\n", "gr5->SetPoint(1,188.151,18.8373);\n", "gr5->SetPoint(2,239.048,15.2499);\n", "gr5->SetPoint(3,264.901,15.8156);\n", "gr5->SetPoint(4,299.641,18.8373);\n", "gr5->SetPoint(5,334.381,20.7085);\n", "gr5->SetPoint(6,360.233,22.4362);\n", "gr5->SetPoint(7,396.589,24.4859);\n", "gr5->SetPoint(8,433.752,25.7669);\n", "gr5->SetPoint(9,499.192,27.3132);\n", "gr5->Draw(\"C\");" ] }, { "cell_type": "markdown", "id": "22ff61d1", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 3, "id": "41d0c4c3", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:38:20.987149Z", "iopub.status.busy": "2026-05-19T20:38:20.987026Z", "iopub.status.idle": "2026-05-19T20:38:21.198998Z", "shell.execute_reply": "2026-05-19T20:38:21.198276Z" } }, "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 }