{ "cells": [ { "cell_type": "markdown", "id": "fcca5058", "metadata": {}, "source": [ "# Resummino" ] }, { "cell_type": "markdown", "id": "26453ee2", "metadata": {}, "source": [ "This a simple example on using resummino through hepi.\n", "\n", "\n", "For more advanced usages like\n", "\n", " * pdf and scale uncertainty compuations\n", " * exporting data as json\n", " * distributing scans to clusters\n", " \n", "check the (less polished codes) in the `debug` or `distribute` folder in the source code repository" ] }, { "cell_type": "code", "execution_count": 1, "id": "b583970e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.2.9.7\n", "~/git/resummino_releases/\n" ] } ], "source": [ "import hepi\n", "print(hepi.__version__)\n", "import smpl\n", "import numpy as np\n", "import hepi.util as util\n", "import matplotlib.pyplot as plt\n", "from hepi.run import resummino as rs\n", "# set the folder where the resummino binary can be found either in either ./{,bin,bin/build}/resummino\n", "rs.set_path(\"resummino\")\n", "# By default hepi will run with nice -n5 to prevent overloading the system if more scans than cores are running\n", "#rs.set_pre(\"\") disables any prefixing with nice\n", "print (rs.get_path())" ] }, { "cell_type": "markdown", "id": "c2dda3a7", "metadata": {}, "source": [ "## aNNLO+NNLL for weakino pair, slepton pair, Z'/W'->leptons," ] }, { "cell_type": "code", "execution_count": 2, "id": "ed7216a4", "metadata": { "scrolled": false }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/hepi/hepi/util.py:101: UserWarning: LHAPDF python binding not installed? Make sure you set PYTHONPATH correctly (i.e. correct python version) if you want to compute PDF uncertainties.\n", " warnings.warn(\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0cfad179ebf343e0a74c0653c3726c56", "version_major": 2, "version_minor": 0 }, "text/plain": [ "QUEUEING TASKS | Checking input: 0%| | 0/15 [00:00" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%time\n", "params = [\n", " \"mastercode_with_gm2.in\", # baseline slha file in the relative ./output folder by default unless set_output_dir was used \n", "]\n", "pss = [ \n", " (1000011,-1000011), # Final state particles for resummino to run\n", " ]\n", "\n", "for pa,pb in pss:\n", " for param in params:\n", " # All the inputs Order, CMS in GeV, particle 1, particle 2, slha, pdf_lo, pdf_nlo,mu_f, mu_r\n", " i = hepi.Input(hepi.Order.aNNLO_PLUS_NNLL,13000,pa,pb,param,\"cteq6l1\",\"cteq66\",1., 1.)\n", " li = [i] # li is our list of inputs that we want resummino to run\n", " li = hepi.mass_scan([i],pa, np.linspace(100,1000,7+8)) # we scan the slepton mass from 100 to 1000 at 15 equidistant points \n", " rs_dl = rs.run(li,skip=True) # run resummino, skipping if the result already exists.\n", " # rs_dl is a panda table(dataframe) with all inputs and result \n", " _,axs = hepi.init_double_plot()\n", " # hepi has some useful plotting routines, but the results from rs_dl can easily be accessed\n", " # Now plot the mass of PDG id pa from the results at LO ,NLO and aNNLO+NLL\n", " hepi.mass_plot(rs_dl,[\"LO\",\"NLO\",\"aNNLO_PLUS_NNLL\"],pa,axes=axs[0],tight=False)\n", " # Plot K factors vs LO and aNNLO+NLL/NLO\n", " hepi.mass_plot(rs_dl,[\"K_LO\",\"K_NLO\",\"K_aNNLO_PLUS_NNLL\",\"aNNLO_PLUS_NNLL_OVER_NLO\"],pa, yaxis=None, axes=axs[1],logy=False,tight=False)\n", " # construct a title from the inputs\n", " hepi.title(li[0],axs[0],scenario=\"mastercode\")" ] }, { "cell_type": "markdown", "id": "2dd526dd", "metadata": {}, "source": [ "## NLO+NLL for squark/gluino+weakino" ] }, { "cell_type": "code", "execution_count": 6, "id": "19e4273a", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "aa665a688cf749b4a680589cbf73dceb", "version_major": 2, "version_minor": 0 }, "text/plain": [ "QUEUEING TASKS | Checking input: 0%| | 0/15 [00:00" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%time\n", "params = [\n", " \"mastercode_with_gm2.in\",\n", "]\n", "pss = [ \n", " (1000022,1000021),\n", " ]\n", "for pa,pb in pss:\n", " for param in params:\n", " # For this demo we reduce the number of iterations to 5, but 50 is recommended, also precision of permille 0.001 is recommended\n", " i = hepi.Input(hepi.Order.NLO_PLUS_NLL,13000,pa,pb,param,\"cteq6l1\",\"cteq66\",1., 1.,precision=0.01,max_iters=5)\n", " li = [i]\n", " li = hepi.mass_scan([i],pa, np.linspace(100,1000,7+8))\n", " rs_dl = rs.run(li,skip=True)\n", " \n", " _,axs = hepi.init_double_plot()\n", " hepi.mass_plot(rs_dl,[\"LO\",\"NLO\",\"NLO_PLUS_NLL\"],pa, axes=axs[0],tight=False)\n", " hepi.mass_plot(rs_dl,[\"K_NLO\",\"K_NLO_PLUS_NLL\",\"NLO_PLUS_NLL_OVER_NLO\"],pa,yaxis=None, axes=axs[1],logy=False,tight=False)\n", " hepi.title(li[0],axs[0],scenario=\"mastercode\")" ] }, { "cell_type": "code", "execution_count": null, "id": "b27fc2d8", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.10" } }, "nbformat": 4, "nbformat_minor": 5 }