Skip to content

Commit

Permalink
working out pt extrapolation
Browse files Browse the repository at this point in the history
  • Loading branch information
rkansal47 committed Jun 10, 2023
1 parent 53af5ea commit d453c33
Showing 1 changed file with 62 additions and 9 deletions.
71 changes: 62 additions & 9 deletions src/HHbbVV/scale_factors/top_reweighting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1033,26 +1033,78 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"high_pt_sel = flat_subjet_pt > max_pt_bin\n",
"hpt_logD = flat_logD[high_pt_sel]\n",
"hpt_logkt = flat_logkt[high_pt_sel]\n",
"hpt_sjpt = flat_subjet_pt[high_pt_sel] # change this to 1/sjpt for next iteration"
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [],
"source": [
"# store polynomial orders for pT extrapolation\n",
"sj_pt_orders = np.array([np.power(hpt_sjpt, i) for i in range(max_fparams)]).T"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {},
"outputs": [],
"source": [
"clip_max, clip_min = 10, 0.1\n",
"pt_lookup = pt_extrap_lookups[\"params\"]\n",
"params = pt_lookup(hpt_logD, hpt_logkt)\n",
"pt_extrap_vals = np.maximum(np.minimum(np.sum(params * sj_pt_orders, axis=1), clip_max), clip_min)"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAApCElEQVR4nO3df1BU973/8RciLCgsiAYQRatiNQaJia2ENFWrVCVer7kyc9V0Gsx19CaX2CppftCbH8U0g03zw7ZDTCZjNHcm1sSMP5reqK1OwZsWjCFSNT8csaYaI3hjhBXEBfHz/aNf92YDKgtnP7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ApAACwKmjho6SkRN/4xjcUFRWlzMxMvffee8G6KwAAEEKCEj7eeOMNFRQU6Mknn9QHH3ygm2++WTNnztTp06eDcXcAACCEBCV8PP/881qyZInuvfdejRs3Ti+99JL69eunV199NRh3BwAAQojjB5w2NzersrJShYWFvrY+ffooOztb5eXlbfp7vV55vV7fen19vSTJ4/E4XZoaznl0yXteDec88njCHB8fAHB9ufy+cuBvp9Rwzvn3rWC5IcalG9xRjo55+X3bGHPNvo6Hjy+++EKtra1KSkrya09KStInn3zSpn9xcbGKioratKempjpdmk/W6qANDQC4Dv1gdXdX0HOcO3dOcXFX//Xgbj/VtrCwUAUFBb71S5cu6csvv9TAgQMVFubspxMej0epqak6ceKE3G63o2P3BL19flLvnyPzC329fY7ML/QFa47GGJ07d04pKSnX7Ot4+Bg0aJDCw8NVW1vr115bW6vk5OQ2/V0ul1wul19bfHy802X5cbvdvfaPSur985N6/xyZX+jr7XNkfqEvGHO81icelzl+wGlkZKQmTpyo3bt3+9ouXbqk3bt3Kysry+m7AwAAISYoX7sUFBQoLy9P3/rWtzRp0iStXr1ajY2Nuvfee4NxdwAAIIQEJXzMnz9f//u//6snnnhCNTU1mjBhgnbs2NHmIFTbXC6XnnzyyTZf8/QWvX1+Uu+fI/MLfb19jswv9PWEOYaZjpwTAwAA4BB+2wUAAFhF+AAAAFYRPgAAgFWEDwAAYFWvCh9PP/20br/9dvXr16/DFyozxuiJJ57Q4MGDFR0drezsbB05csSvz5dffqkf/OAHcrvdio+P1+LFi9XQ0BCEGVxboLV8+umnCgsLa3fZtGmTr1972zdu3GhjSn4681hPnTq1Te333XefX5/jx49r9uzZ6tevnxITE/XQQw/p4sWLwZxKuwKd35dffqlly5ZpzJgxio6O1rBhw/SjH/3I9xtIl3Xn/ispKdE3vvENRUVFKTMzU++9995V+2/atEljx45VVFSUxo8fr3feecdve0eekzYFMr9XXnlF3/3udzVgwAANGDBA2dnZbfovWrSozb6aNWtWsKdxVYHMcf369W3qj4ry/42QUN6H7b2ehIWFafbs2b4+PWkf7tmzR3PmzFFKSorCwsK0devWa96mtLRUt956q1wul9LS0rR+/fo2fQJ9XgfM9CJPPPGEef75501BQYGJi4vr0G1WrVpl4uLizNatW81f//pX88///M9mxIgRpqmpyddn1qxZ5uabbzYVFRXmf/7nf0xaWppZuHBhkGZxdYHWcvHiRXPq1Cm/paioyMTExJhz5875+kky69at8+v31cfAls481lOmTDFLlizxq72+vt63/eLFiyY9Pd1kZ2eb/fv3m3feeccMGjTIFBYWBns6bQQ6v4MHD5p58+aZ3/3ud6a6utrs3r3bjB492uTm5vr16679t3HjRhMZGWleffVV8+GHH5olS5aY+Ph4U1tb227/P//5zyY8PNw888wz5qOPPjKPPfaYiYiIMAcPHvT16chz0pZA53f33XebkpISs3//fvPxxx+bRYsWmbi4OPPZZ5/5+uTl5ZlZs2b57asvv/zS1pTaCHSO69atM26326/+mpoavz6hvA/PnDnjN7dDhw6Z8PBws27dOl+fnrQP33nnHfOf//mfZvPmzUaS2bJly1X7/+1vfzP9+vUzBQUF5qOPPjK/+c1vTHh4uNmxY4evT6CPWWf0qvBx2bp16zoUPi5dumSSk5PNL3/5S19bXV2dcblc5re//a0xxpiPPvrISDL79u3z9dm+fbsJCwszJ0+edLz2q3GqlgkTJph/+7d/82vryB9tsHV2flOmTDE//vGPr7j9nXfeMX369PF7gVyzZo1xu93G6/U6UntHOLX/3nzzTRMZGWlaWlp8bd21/yZNmmTy8/N9662trSYlJcUUFxe32/9f//VfzezZs/3aMjMzzb//+78bYzr2nLQp0Pl93cWLF01sbKx57bXXfG15eXlm7ty5TpfaaYHO8Vqvr71tH77wwgsmNjbWNDQ0+Np62j68rCOvAw8//LC56aab/Nrmz59vZs6c6Vvv6mPWEb3qa5dAHTt2TDU1NcrOzva1xcXFKTMzU+Xl5ZKk8vJyxcfH61vf+pavT3Z2tvr06aO9e/dardeJWiorK1VVVaXFixe32Zafn69BgwZp0qRJevXVVzv0s8hO6sr8Xn/9dQ0aNEjp6ekqLCzU+fPn/c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mJsa43W5z7733+gUam65Vy7Fjx9rM2RhjCgsLTWpqqmltbW0z5vbt282ECRNMTEyM6d+/v7n55pvNSy+91G7fYAt0fsePHzeTJ082CQkJxuVymbS0NPPQQw/5XefDGGM+/fRTk5OTY6Kjo82gQYPMgw8+6Heqqi2Bzu9Pf/pTu3/TksyxY8eMMd2//37zm9+YYcOGmcjISDNp0iRTUVHh2zZlyhSTl5fn1//NN9803/zmN01kZKS56aabzH//93/7be/Ic9KmQOY3fPjwdvfVk08+aYwx5vz582bGjBnmhhtuMBEREWb48OFmyZIljr6od0Ygc1y+fLmvb1JSkrnzzjvNBx984DdeKO9DY4z55JNPjCTzhz/8oc1YPW0fXuk14vKc8vLyzJQpU9rcZsKECSYyMtKMHDnS7z3xsqs9Zk4IM8by+ZQAAOC6dl1f5wMAANhH+AAAAFYRPgAAgFWEDwAAYBXhAwAAWEX4AAAAVhE+AACAVYQPAABgFeEDAABYRfgAAABWET4AAIBVhA8AAGDV/wMCp7MX1W0yZQAAAABJRU5ErkJggg==",
"text/plain": [
"array([ 78.93258875, 78.93258875, 78.93258875, ..., 151.11306395,\n",
" 151.11306395, 151.11306395])"
"<Figure size 640x480 with 1 Axes>"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
"output_type": "display_data"
}
],
"source": [
"high_pt_sel = flat_subjet_pt > max_pt_bin\n",
"hpt_logD = flat_logD[high_pt_sel]\n",
"hpt_logkt = flat_logkt[high_pt_sel]\n",
"hpt_sjpt = flat_subjet_pt[high_pt_sel]"
"_ = plt.hist(\n",
" np.log10(np.maximum(np.sum(params * sj_pt_orders, axis=1), 0.1)),\n",
" np.linspace(-1, 1, 21),\n",
" histtype=\"step\",\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [],
"source": [
"ratio_nom_vals = ratio_smeared_lookups[0](flat_subjet_pt, flat_logD, flat_logkt)"
]
},
{
"cell_type": "code",
"execution_count": 80,
"metadata": {},
"outputs": [],
"source": [
"ratio_nom_vals[high_pt_sel] = pt_extrap_vals"
]
},
{
Expand All @@ -1062,6 +1114,7 @@
"outputs": [],
"source": [
"sf_vals = []\n",
"\n",
"# could be parallelised but not sure if memory / time trade-off is worth it\n",
"for i, ratio_nom_lookup in enumerate(ratio_smeared_lookups):\n",
" ratio_nom_vals = ratio_nom_lookup(flat_subjet_pt, flat_logD, flat_logkt)\n",
Expand Down

0 comments on commit d453c33

Please sign in to comment.