Skip to content

Commit

Permalink
Cleaned up Notebooks
Browse files Browse the repository at this point in the history
Cleaned up the analysis notebooks, and added some annotations for clarity.
  • Loading branch information
shomiller committed Aug 29, 2019
1 parent c26fc4d commit 5a0d9b3
Show file tree
Hide file tree
Showing 37 changed files with 28,840 additions and 3,981 deletions.
305 changes: 305 additions & 0 deletions .ipynb_checkpoints/1-WH-Morphing-Setup-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. Morphing Setup for $W^{\\pm}(\\ell^{\\pm}\\nu_{\\ell})H(b\\bar{b})$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here we set up the morphing basis for $W^{\\pm}(\\ell^{\\pm}\\nu_{\\ell})H(b\\bar{b})$ with all the relevant operators both in the gauge boson couplings and the gauge-fermion couplings:\n",
"\n",
"$C_{H\\square}$, $C_{HD}$, $C_{HW}$, and $C^{(3)}_{Hq}$\n",
"\n",
"We omit the operator $C_{dH}$ which appears in the bottom-yukawa coupling, modifying the $H \\to b\\bar{b}$ decay, as it is poorly constrained by this process and well measured elsewhere.\n",
"\n",
"As can be seen analytically, the operators $C_{HD}$ and $C_{H\\square}$ only change $W^{\\pm}H$ production by an overall rescaling of the couplings, and always enter in the combination \n",
"\n",
"$$C_{H\\square} - \\frac{1}{4} C_{HD}.$$\n",
"\n",
"As an extra cross check of our procedure, we'll consider all four operators, then rotate the resulting $4 \\times 4$ Fisher Information to explicitly remove the inherent flat direction, and do most of our analysis on the resulting $3 \\times 3$ matrix.\n",
"\n",
"This setup is used for both $W^+H$ and $W^-H$ production, though they must be generated and analyzed seprately (the same is true for the $W$ decays)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Setup"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"MadMiner version: 0.3.0\n"
]
}
],
"source": [
"madminer_src_path = '/home/shomiller/madminer'\n",
"import sys\n",
"import os\n",
"sys.path.append(madminer_src_path)\n",
"\n",
"from __future__ import absolute_import, division, print_function, unicode_literals\n",
"import logging\n",
"import numpy as np\n",
"import matplotlib\n",
"from matplotlib import pyplot as plt\n",
"%matplotlib inline\n",
"\n",
"from madminer.core import MadMiner\n",
"\n",
"import madminer.__version__\n",
"print( 'MadMiner version: {}'.format(madminer.__version__) )"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# MadMiner output\n",
"logging.basicConfig(\n",
" format='%(asctime)-5.5s %(name)-20.20s %(levelname)-7.7s %(message)s',\n",
" datefmt='%H:%M',\n",
" level=logging.INFO\n",
")\n",
"\n",
"# Output of all other modules (e.g. matplotlib)\n",
"for key in logging.Logger.manager.loggerDict:\n",
" if \"madminer\" not in key:\n",
" logging.getLogger(key).setLevel(logging.WARNING)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1. Setup Morphing Basis"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here we add the parameters to the morphing setup. Note that we rescale the $C_{HW}$ and $C_{Hq}^{(3)}$ coefficients, so that all the Fisher Information entries will be roughly the same size. This helps with numerical aspects later in the analysis."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"14:30 madminer.core INFO Added parameter cHbox (LHA: frblock 24, maximal power in squared ME: (2,), range: (-10.0, 10.0))\n",
"14:30 madminer.core INFO Added parameter cHDD (LHA: frblock 25, maximal power in squared ME: (2,), range: (-10.0, 10.0))\n",
"14:30 madminer.core INFO Added parameter cHW (LHA: frblock 28, maximal power in squared ME: (2,), range: (-10.0, 10.0))\n",
"14:30 madminer.core INFO Added parameter cHq3 (LHA: frblock 49, maximal power in squared ME: (2,), range: (-10.0, 10.0))\n"
]
}
],
"source": [
"miner = MadMiner()\n",
"\n",
"miner.add_parameter(\n",
" lha_block='frblock',\n",
" lha_id=24,\n",
" parameter_name='cHbox',\n",
" morphing_max_power=2,\n",
" parameter_range=(-10.,10.)\n",
")\n",
"miner.add_parameter(\n",
" lha_block='frblock',\n",
" lha_id=25,\n",
" parameter_name='cHDD',\n",
" morphing_max_power=2,\n",
" parameter_range=(-10.,10.)\n",
")\n",
"miner.add_parameter(\n",
" lha_block='frblock',\n",
" lha_id=28,\n",
" parameter_name='cHW',\n",
" morphing_max_power=2,\n",
" param_card_transform='0.1*theta',\n",
" parameter_range=(-10.,10.)\n",
")\n",
"miner.add_parameter(\n",
" lha_block='frblock',\n",
" lha_id=49,\n",
" parameter_name='cHq3',\n",
" morphing_max_power=2,\n",
" param_card_transform='0.01*theta',\n",
" parameter_range=(-10.,10.)\n",
")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For now, we'll only add one benchmark manually at the SM, and let the morphing take care of the rest:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"14:30 madminer.core INFO Added benchmark sm: cHbox = 0.00e+00, cHq3 = 0.00e+00, cHDD = 0.00e+00, cHW = 0.00e+00)\n"
]
}
],
"source": [
"miner.add_benchmark(\n",
" {'cHbox':0., 'cHDD':0., 'cHW':0., 'cHq3':0.},\n",
" 'sm'\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we set the rest of the benchmarks automatically. To try and reduce any possibility of morphing error, we'll run a number of trials and tests to ensure a decent spread of the weights."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"14:30 madminer.core INFO Optimizing basis for morphing\n",
"14:30 madminer.core INFO Set up morphing with 4 parameters, 15 morphing components, 1 predefined basis points, and 14 new basis points\n"
]
}
],
"source": [
"miner.set_morphing(\n",
" include_existing_benchmarks=True,\n",
" max_overall_power=2,\n",
" n_trials=1000,\n",
" n_test_thetas=1000\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setup Systematics"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here we add scale and PDF systematics.\n",
"\n",
"For scale uncertainties, we vary both $\\mu_R$ and $\\mu_F$ independently by a factor of $1/2$ and $2$.\n",
"\n",
"For the PDF variations, we run over all the eigenvectors of the `PDF4LHC15_nlo_30` set."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"miner.set_systematics(\n",
" scale_variation=(0.5,1,2),\n",
" scales='independent',\n",
" pdf_variation='90900'\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Save Setup\n",
"\n",
"And finally, save the setup to a `.h5` file. Since the basis is well optimized, we should just use the same setup for all our later $WH$ runs."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"14:30 madminer.core INFO Saving setup (including morphing) to data/wh_smeft_setup.h5\n"
]
}
],
"source": [
"miner.save('data/wh_smeft_setup.h5')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 5a0d9b3

Please sign in to comment.