tracking-parametrisation-tuner/parameterisations/notebooks/bend_y_params.ipynb

635 lines
415 KiB
Plaintext
Raw Normal View History

2023-12-19 13:00:59 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 83,
2023-12-19 13:00:59 +01:00
"metadata": {},
"outputs": [],
"source": [
"import uproot\n",
"import awkward as ak\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
2023-12-19 13:00:59 +01:00
"import numpy as np\n",
"import mplhep\n",
"\n",
"from sklearn.preprocessing import PolynomialFeatures\n",
"from sklearn.linear_model import LinearRegression, Lasso, Ridge, ElasticNet\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.pipeline import Pipeline\n",
"from sklearn.metrics import mean_squared_error\n",
"\n",
"mplhep.style.use([\"LHCbTex2\"])\n",
"input_tree = uproot.open(\n",
" {\n",
" \"/work/cetin/LHCb/reco_tuner/data/tracking_losses_ntuple_B_BJpsi_def_selected.root\": \"Selected\"\n",
" }\n",
")\n",
2023-12-19 13:00:59 +01:00
"array = input_tree.arrays()\n",
"\n",
"array[\"yStraightOut\"] = array[\"ideal_state_770_y\"] + array[\"ideal_state_770_ty\"] * (\n",
" array[\"ideal_state_10000_z\"] - array[\"ideal_state_770_z\"]\n",
")\n",
"array[\"yDiffOut\"] = array[\"ideal_state_10000_y\"] - array[\"yStraightOut\"]\n",
"array[\"yStraightEndT\"] = array[\"ideal_state_770_y\"] + array[\"ideal_state_770_ty\"] * (\n",
" 9410.0 - array[\"ideal_state_770_z\"]\n",
")\n",
"array[\"yDiffEndT\"] = array[\"ideal_state_9410_y\"] - array[\"yStraightEndT\"]\n",
"\n",
"array[\"dSlope_xEndT\"] = array[\"ideal_state_9410_tx\"] - array[\"ideal_state_770_tx\"]\n",
"array[\"dSlope_yEndT\"] = array[\"ideal_state_9410_ty\"] - array[\"ideal_state_770_ty\"]\n",
2023-12-19 13:00:59 +01:00
"array[\"dSlope_xEndT_abs\"] = abs(array[\"dSlope_xEndT\"])\n",
"array[\"dSlope_yEndT_abs\"] = abs(array[\"dSlope_yEndT\"])\n",
"\n",
2023-12-19 13:00:59 +01:00
"\n",
"def format_array(name, coef):\n",
" coef = [str(c) + \"f\" for c in coef if c != 0.0]\n",
2023-12-19 13:00:59 +01:00
" code = f\"constexpr std::array {name}\"\n",
" code += \"{\" + \", \".join(list(coef)) + \"};\"\n",
2023-12-19 13:00:59 +01:00
" return code"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACUY0lEQVR4nOz9X2zj6Xkn+D5UV4z2iZdFqQcLCBJwUlS88OBc7BRVlYs5VztFbhY49omzFquMeGxfTErqBHNmAQUW3fHFzl64y1R2dTPnJC21c4BjxxfVUnts2AvsWrT3boFFSWzvnbETsTqABAKL6RKLseGG002eixpxJJVEURLFP+LnAwhDSs/v5aM/1RN+/bzvL9FsNpsBAAAAANfcWL8bAAAAAIBeEIQBAAAAMBIEYQAAAACMBEEYAAAAACNBEAYAAADASBCEAQAAADASBGEAAAAAjARBGAAAAAAjQRAGAAAAwEgQhAEAAAAwEgRhAAAAAIwEQRgAAAAAI0EQBgAAAMBIEIQBAAAAMBIEYQAAAACMBEEYAAAAACNBEAYAAADASBCEAQAAADASBGEAAAAAjARBGAAAAAAjQRAGAAAAwEgQhAEAAAAwEgRhAAAAAIwEQRgAAAAAI0EQBgAAAMBIEIQBAAAAMBIEYQAAAACMBEEYAAAAACPhRr8bYLT89m//dnz44YfxyiuvxH/6n/6n/W4HAAAA6LH/8//8P+Pjjz+OV199NX71q1/19LUTzWaz2dNXZKS98sor0Wg0+t0GAAAA0GdjY2Px8ccf9/Q1TYTRUwdB2NjYWExOTnZlzWq12vU19XK9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es>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOVCAYAAACLW0xhAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACgmElEQVR4nOz9T2xbZ57n/35IO4Fzk6YpuTGAIAJdJisDF3rTOpRnkbuaFjW1uHEn3SHtQjK2gdtlKhXkzgDqKTGurBMXNWht+t6USVf9gLEnC4esmgTJANURk9n9gIGl4+qdMVU8TgMSCAwQi2YliJHYPHehIVvUH/KQPOQ5JN8vQGhK+vLhV39c1frU83yfgG3btgAAAAAAAIAxF/S6AQAAAAAAAGAYCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCAAAAAAAAMBEIwgAAAAAAADARCMIAAAAAAAAwEQjCRkC1WlUmk9Hi4qJisZgCgYBisZhSqZTy+XzP666urmpxcVFTU1Mta5ZKJRe7BwAAAAAA8AeCMJ9bXV3V1NSU8vm8FhcXlcvltLm5qUwmI8uytLS0pFgs1lV4VSqVNDU1pUwmI0kqFAoql8vKZrMyTVOLi4taXFxUtVod0FcFAAAAAAAwfAHbtm2vm8DhUqmUisWiDMPQ5ubmoTVLS0vNXWGbm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WzWZVKpZ6CIUmybVuBQMDlzgbjwoULWl1dlbS7i61arXa85XHv9+Ww0MowDCUSiWbAVSwWlUwmj1yvUCg0H7MbDAAAAAAAjAPfH428evWqYrGY8vm8yuWybNvu6W2UNEIraXde2LVr19rWl0ql5m63drdf7h2q327NarXa3D2WSCQOzCADAAAAAAAYRb7eEfbrX/+6GewEAgEFAoGRC7V6VSgUdPr0aVWrVa2urioWix0aSFmWpVQqJWk3tFpZWTlyzWg0qkKhoFQqJdM0tbq6emj9wsKCpN2bIvfuDJt0y8vLqtVqCoVCXrcC4Aj8OwX8j3+nwGjg3yrgf/w77U3A9nGyND8/L9M0mwFYNBqVYRjNGVinTp3quMaXX36parWqDz74QA8fPtSTJ08G3bZrqtWqMplMy+6sVCql+fl5PXjwQOvr680jlNlstm0ItlepVFIqlVK1WlUymdTVq1cVjUa1sbGhTCYj0zRlGIY+++yzjkcyuxWJRLS9va3Z2VltbW25ujYAAAAAAPA/L7MBXwdhwWCwOdfr008/be5U6oVlWXr++edHKghrME1TuVyuZUba3lDw6tWrPQVWq6urun37tizLas4hm5+f19LSUtv5Yf0gCAMAAAAAYLIRhB1henpaDx8+1MrKSsc5WU58//vf1x/+8AcXOkOvCMIAAAAAAJhsXmYDvh6W3zgCefbsWVfW2zssHgAAAAAAAJPF10FY4yjkgwcPXF0PAAAAAAAAk8fXQdjPfvYz2bYt0zRdWe+Xv/ylK+sAAAAAAABg9Pg6CDt58qR+/vOf6/bt2/rjH//Y93ocjQQAAAAAAJhcvg7CJGllZUWGYSiVSvW1zv37913bWQYAAAAAAIDRc9zrBpxYX1/X/Py8nn/+eWUyGU1PTzt63oMHD1StVlU
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bins = np.linspace(-200, 200, 50)\n",
"sns.regplot(\n",
" x=ak.to_numpy(array[\"ideal_state_770_y\"]),\n",
" y=ak.to_numpy(array[\"yDiffOut\"]),\n",
" x_bins=bins,\n",
" fit_reg=None,\n",
" x_estimator=np.mean,\n",
")\n",
"plt.xlabel(\"y (VELO)\")\n",
"plt.ylabel(\"$y_{corr}$ [mm]\")\n",
"mplhep.lhcb.text(\"Simulation\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB5hklEQVR4nOz9T2xj6X0nev+o7hht2FGxqgcDCBJwU1T6wlndFFU9wOvdnaIyd5FGkmmpehDD9mJSkievMQsNLLns3QvYZdUg2ly8GUt2Ng4MTLXUmQTJwtNie9aDKrE9mxfGNcTuACUQGIxLbMZBGombfBcVKZJKokjpkOdQ5/MBCOvPo+f8ROmUml//nucpdDqdTgAAAADAFTeWdgEAAAAAMAyCMAAAAAByQRAGAAAAQC4IwgAAAADIBUEYAAAAALkgCAMAAAAgFwRhAAAAAOSCIAwAAACAXBCEAQAAAJALgjAAAAAAckEQBgAAAEAuCMIAAAAAyAVBGAAAAAC5IAgDAAAAIBcEYQAAAADkgiAMAAAAgFwQhAEAAACQC4IwAAAAAHJBEAYAAABALgjCAAAAAMgFQRgAAAAAuSAIAwAAACAXBGEAAAAA5IIgDAAAAIBcEIQBAAAAkAuCMAAAAAByQRAGAAAAQC4IwgAAAADIhZfTLoB8+cxnPhMff/xxvPTSS/HP//k/T7scAAAAYMj+5//8n/HJJ5/EK6+8En/7t3871GsXOp1OZ6hXJNfGxsbCrxwAAABQKBSi3W4P9Zo6whiqoyHY5ORkipX0r9FoRLvdjrGxsZiYmEi7nL6Mau2jWneE2tOi9nSoPR2jWvuo1h2h9rSoPR1qT8eo1j6qdUeoPS17e3sREak0ygjCGKqxsbHDG/Xp06dpl9OXqamp2N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2N7ezu2traiXC4f+9p79+5FvV53vwMAAKSg1Wqd+3o/TZkOwg6WMv6zf/bP4vr16/Haa6/F3Nxc3/M0m814++23ky6PSxgbG4uJiYmuY8bHx4dUzYv+8qc9DvzNhYjP3Y3/13g9Jv9/D7qGSJVKJVZWVuL27duHJ6Je1sEeetVqNVZWVs7sfiqVSrGyshKVSqXr4RObm5vRbDbjyZMnsbq6GtVq9cyxy8vL8dZbb0WpVOr5+1lZWTk1AJubmzuc62C+er0e9Xo9Njc34+233z4Mx04GXCe/583NzcO3p6enE9tjEAAAgPONj4/H5ORk1zGNRiPa7faQKjqu0Ol0OqlcuQe3b9+O99//pw2YOp3OhTpgjn7tJ598klR5XMDU1FTs7e3F5ORkPH36NO1yzvQv/r8Rj/so719MRfz3//fzAx42NjZe+Pzc3NyxgGYQ6vV6TE9Pn/q5/f39C4VvMzMzp3ZWra+vx8LCQl+1zc7OvhBKLSwsxPr6ek9zPHz4MFZWVl74eKlUit3d3VO/5uTPYxg/BwAAALpLMxvI9Gb5d+/ejU6nEwdZ3UVDMOjX9U9fbPzi4uKpnz/r40kqlUovLBOMeB7+XLQD7ay6+wnBqtXqC51ZxWIxdnZ2eg7BIp53oO3u7r7wvTx79uzMr0mq8w4AAICrIdNB2MGL8EKhcBiIXfQB/Xjjc/2N/+1/HH/WssNuyxGTdNp1LnPt0762n3CpVqvF7OzsC1//3nvvnRra9VLPBx98cKwGm+EDAADQq0zvEXbt2rUol8vx/vvvx+rqapTL5bhx40bf89Tr9fj2t78dP/nJT5Ivkivpi+WIr/+otw3zP/upiC/9Y6ZzVkh0kd/bUVev1+POnTsvfHxzc/NCIdiBg26ys5aBjrKDzf+HFZyOmmq12vOhDAAAAKfJdBAWEfHWW2/F9PR0fO1rX7vwHLdu3Yo333wzl2EEF3PtlYg//p2IL/dwgOJ3fzdi/JWBl9ST037HX3311UTn6/U
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bins = np.linspace(-200, 200, 50)\n",
"sns.regplot(\n",
" x=ak.to_numpy(array[\"ideal_state_9410_y\"]),\n",
" y=ak.to_numpy(array[\"yDiffOut\"]),\n",
" x_bins=bins,\n",
" fit_reg=None,\n",
" x_estimator=np.mean,\n",
")\n",
"plt.xlabel(\"y (T)\")\n",
"plt.ylabel(\"$y_{corr}$ [mm]\")\n",
"mplhep.lhcb.text(\"Simulation\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB3D0lEQVR4nOz9T2xj6ZkfbN9UlY027Kio6kEAQVpMUdMvPPgWmaKqs8guKSrJwv7GSVNVg3FsL2ZKso0gLyDE1JS9SLLoblOJtQkw01LPLN52vKim7LFhv4ux2J11UBLb2RmJxe4BqiAgQJfYGhtu2N3it6hPHEmlP5RE8pA81wUQEEs3z7kpPsUSf/U8z8k0m81mAAAAAMCQG0m6AQAAAADoBUEYAAAAAKkgCAMAAAAgFQRhAAAAAKSCIAwAAACAVBCEAQAAAJAKgjAAAAAAUkEQBgAAAEAqCMIAAAAASAVBGAAAAACpIAgDAAAAIBUEYQAAAACkgiAMAAAAgFQQhAEAAACQCoIwAAAAAFJBEAYAAABAKgjCAAAAAEgFQRgAAAAAqSAIAwAAACAVBGEAAAAApIIgDAAAAIBUEIQBAAAAkAqCMAAAAABSQRAGAAAAQCoIwgAAAABIBUEYAAAAAKkgCAMAAAAgFQRhAAAAAKTC1aQbIF0+/elPx4cffhhXrlyJf/gP/2HS7QAAAAA99n/+z/+Jjz/+OJ577rn41a9+1dNzZ5rNZrOnZyTVrly5Ent7e0m3AQAAACRsZGQkPv74456e04wwemo/CB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[
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bins = np.linspace(-1, 1, 50)\n",
"sns.regplot(\n",
" x=ak.to_numpy(array[\"ideal_state_9410_ty\"]),\n",
" y=ak.to_numpy(array[\"yDiffOut\"]),\n",
" x_bins=bins,\n",
" fit_reg=None,\n",
" x_estimator=np.mean,\n",
")\n",
"plt.xlabel(\"ty (T)\")\n",
"plt.ylabel(\"$y_{corr}$ [mm]\")\n",
"mplhep.lhcb.text(\"Simulation\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACT+0lEQVR4nOz9T2yj+ZkneD5Uhgtp2K2gIgsDCCLQHZQNeNGHqaAi6tC36SC75mB3udpiRKG8tg9VQWUZvb2AZiw57XNmmBqULr3rtpSuBTa9PkRS6a6CvUCPxfTc9hIS03MzpkuMLEACgQGcYrLLcKKcSe4hWmxJIVGURPGP+PkAQpHS8/7eRyLDLn79vL830Wq1WgEAAAAA19zEoBsAAAAAgH4QhAEAAAAwFgRhAAAAAIwFQRgAAAAAY0EQBgAAAMBYEIQBAAAAMBYEYQAAAACMBUEYAAAAAGNBEAYAAADAWBCEAQAAADAWBGEAAAAAjAVBGAAAAABjQRAGAAAAwFgQhAEAAAAwFgRhAAAAAIwFQRgAAAAAY0EQBgAAAMBYEIQBAAAAMBYEYQAAAACMBUEYAAAAAGNBEAYAAADAWBCEAQAAADAWBGEAAAAAjAVBGAAAAABjQRAGAAAAwFgQhAEAAAAwFgRhAAAAAIwFQRgAAAAAY+HGoBtgvHzmM5+Jjz76KF566aX47/67/27Q7QAAAAB99n/+n/9n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O/r2Wy+V2bSaTiWw2G7Ozs7G5uRkbGxsvTEM+evQoqtXqSP57BwAAGGaTk5MxMzN
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bins = np.linspace(-1, 1, 50)\n",
"sns.regplot(\n",
" x=ak.to_numpy(array[\"ideal_state_770_ty\"]),\n",
" y=ak.to_numpy(array[\"yDiffOut\"]),\n",
" x_bins=bins,\n",
" fit_reg=None,\n",
" x_estimator=np.mean,\n",
")\n",
"plt.xlabel(\"ty (VELO)\")\n",
"plt.ylabel(\"$y_{corr}$ [mm]\")\n",
"mplhep.lhcb.text(\"Simulation\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMEAAAOWCAYAAADm+IXMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB7DklEQVR4nOz9X2xj+XkneD9UV4z2Gy+Lqg4CCORFikovPFc7RVXvxbxXO0VNFlgbcaal6mA8doB3UpITDGYBLSKlnYudvXC3pUV0s0DSUjsvsHZyUS11JkE8wMaiPdeLktjeO2MnZHcACQQG6xJbceCG4ybfi3rF6C9FSfx7+PkAAkTq4e88R9Qp9vn27/xOqtlsNgMAAAAAEmxi0A0AAAAAQK8JwQAAAABIPCEYAAAAAIknBAMAAAAg8YRgAAAAACSeEAwAAACAxBOCAQAAAJB4QjAAAAAAEk8IBgAAAEDiCcEAAAAASDwhGAAAAACJJwQDAAAAIPGEYAAAAAAknhAMAAAAgMQTggEAAACQeEIwAAAAABJPCAYAAABA4gnBAAAAAEg8IRgAAAAAiScEAwAAACDxhGAAAAAAJJ4QDAAAAIDEE4IBAAAAkHhCMAAAAAASTwgGAAAAQOIJwQAAAABIPCEYAA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4v89yswHTWlUqnjmy8AAMBZH38S8bt/2Vnt1/4i4ov/JCL9ck9bokNDHYJFRLzxxhsxPT0dv/d7v3fjMR48eBC
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bins = np.linspace(-0.5, 0.5, 50)\n",
"sns.regplot(\n",
" x=ak.to_numpy(array[\"dSlope_yEndT\"]),\n",
" y=ak.to_numpy(array[\"yDiffOut\"]),\n",
" x_bins=bins,\n",
" fit_reg=None,\n",
" x_estimator=np.mean,\n",
")\n",
"plt.xlabel(\"dSlope y\")\n",
"plt.ylabel(\"$y_{corr}$ [mm]\")\n",
"mplhep.lhcb.text(\"Simulation\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACDP0lEQVR4nOz9XWxjaXoneD5Upo0slItBRRoNaCRgHJRzUMZejIOK7AvfTQe1PRfOtd0pZRquqTKw7ZDKXmN2oUFJFVWXi8woRaME7PbCXVKWL7aMAiZSKrcNewB3iZlzNReNlJg1d4WxxUwDoSbQmAoxaXtdsDPJvYiRrE+Kko54DnV+P4BIMfTyPQ8/Dpn86/0odLvdbgAAAADADTeSdgEAAAAAMAiCMAAAAAByQRAGAAAAQC4IwgAAAADIBUEYAAAAALkgCAMAAAAgFwRhAAAAAOSCIAwAAACAXBCEAQAAAJALgjAAAAAAckEQBgAAAEAuCMIAAAAAyAVBGAAAAAC5IAgDAAAAIBcEYQAAAADkgiAMAAAAgFwQhAEAAACQC4IwAAAAAHJBEAYAAABALgjCAAAAAMgFQRgAAAAAuSAIAwAAACAXBGEAAAAA5IIgDAAAAIBc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JpMB2EREW+++WZMTk7G1772tUv3cffu3Xj99ddzGUaQL6e9xl9++eVE++v3PJqdnT0xWmtubi6RIKNcLsfi4mLPnSezpF6vx+rqatRqtWg0GlEqleL27dtRKpWiXC7Hm2++GRHPd7xcXl7uOfW0VqvF7Oxs3L59O1ZXV290MLS/EcT6+vrBxg1
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bins = np.linspace(-1, 1, 50)\n",
"sns.regplot(\n",
" x=ak.to_numpy(array[\"dSlope_xEndT\"]),\n",
" y=ak.to_numpy(array[\"yDiffOut\"]),\n",
" x_bins=bins,\n",
" fit_reg=None,\n",
" x_estimator=np.mean,\n",
")\n",
"plt.xlabel(\"dSlope x \")\n",
"plt.ylabel(\"$y_{corr}$ [mm]\")\n",
"mplhep.lhcb.text(\"Simulation\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 151,
2023-12-19 13:00:59 +01:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"intercept= 0.16257747434812642\n",
"coef= {'dSlope_yEndT': 4379.8079670973475, 'dSlope_xEndT dSlope_yEndT': 37.76975769672208, 'ideal_state_770_ty dSlope_xEndT^2': 1224.0422108322969, 'ideal_state_770_ty dSlope_yEndT^2': -18042.13200642719}\n",
"r2 score= 0.8441034202616307\n",
"RMSE = 10.185808113150346\n"
2023-12-19 13:00:59 +01:00
]
}
],
"source": [
"features = [\n",
" \"ideal_state_770_ty\",\n",
" # \"ideal_state_9410_ty\",\n",
" # \"ideal_state_770_y\",\n",
" # \"ideal_state_9410_y\",\n",
" \"dSlope_xEndT\",\n",
" \"dSlope_yEndT\",\n",
"]\n",
"target_feat = \"yDiffOut\"\n",
"order = 3\n",
"\n",
"data = np.column_stack([ak.to_numpy(array[feat]) for feat in features])\n",
"target = ak.to_numpy(array[target_feat])\n",
"X_train, X_test, y_train, y_test = train_test_split(data,\n",
" target,\n",
" test_size=0.2,\n",
" random_state=42)\n",
"\n",
"poly = PolynomialFeatures(degree=order, include_bias=False)\n",
"X_train_model = poly.fit_transform(X_train)\n",
"X_test_model = poly.fit_transform(X_test)\n",
"\n",
"poly_features = poly.get_feature_names_out(input_features=features)\n",
"\n",
"# keep = [\n",
"# # \"ideal_state_770_ty\", #\n",
"# # \"dSlope_xEndT\", #\n",
"# \"dSlope_yEndT\", # keep\n",
"# # \"ideal_state_770_ty^2\", #\n",
"# # \"ideal_state_770_ty dSlope_xEndT\", #\n",
"# # \"ideal_state_770_ty dSlope_yEndT\", #\n",
"# # \"dSlope_xEndT^2\", # do not keep\n",
"# \"dSlope_xEndT dSlope_yEndT\", # keep\n",
"# # \"dSlope_yEndT^2\", #\n",
"# # \"ideal_state_770_ty^3\",\n",
"# # \"ideal_state_770_ty^2 dSlope_xEndT\", #\n",
"# # \"ideal_state_770_ty^2 dSlope_yEndT\",\n",
"# \"ideal_state_770_ty dSlope_xEndT^2\", # keep\n",
"# # \"ideal_state_770_ty dSlope_xEndT dSlope_yEndT\", #\n",
"# \"ideal_state_770_ty dSlope_yEndT^2\", # keep\n",
"# # \"dSlope_xEndT^3\", # do not keep\n",
"# # \"dSlope_xEndT^2 dSlope_yEndT\", #\n",
"# # \"dSlope_xEndT dSlope_yEndT^2\", #\n",
"# # \"dSlope_yEndT^3\",\n",
"# # \"ideal_state_770_ty^4\",\n",
"# # \"ideal_state_770_ty^3 dSlope_xEndT\",\n",
"# # \"ideal_state_770_ty^3 dSlope_yEndT\",\n",
"# # \"ideal_state_770_ty^2 dSlope_xEndT^2\", #\n",
"# # \"ideal_state_770_ty^2 dSlope_xEndT dSlope_yEndT\",\n",
"# # \"ideal_state_770_ty^2 dSlope_yEndT^2\",\n",
"# # \"ideal_state_770_ty dSlope_xEndT^3\", # do not keep\n",
"# # \"ideal_state_770_ty dSlope_xEndT^2 dSlope_yEndT\", #\n",
"# # \"ideal_state_770_ty dSlope_xEndT dSlope_yEndT^2\",\n",
"# # \"ideal_state_770_ty dSlope_yEndT^3\",\n",
"# # \"dSlope_xEndT^4\", #\n",
"# \"dSlope_xEndT^3 dSlope_yEndT\", # keep\n",
"# # \"dSlope_xEndT^2 dSlope_yEndT^2\", #\n",
"# # \"dSlope_xEndT dSlope_yEndT^3\",\n",
"# # \"dSlope_yEndT^4\",\n",
"# # \"ideal_state_770_ty^5\",\n",
"# # \"ideal_state_770_ty^4 dSlope_xEndT\",\n",
"# # \"ideal_state_770_ty^4 dSlope_yEndT\",\n",
"# # \"ideal_state_770_ty^3 dSlope_xEndT^2\",\n",
"# # \"ideal_state_770_ty^3 dSlope_xEndT dSlope_yEndT\",\n",
"# # \"ideal_state_770_ty^3 dSlope_yEndT^2\",\n",
"# # \"ideal_state_770_ty^2 dSlope_xEndT^3\", #\n",
"# # \"ideal_state_770_ty^2 dSlope_xEndT^2 dSlope_yEndT\",\n",
"# # \"ideal_state_770_ty^2 dSlope_xEndT dSlope_yEndT^2\",\n",
"# # \"ideal_state_770_ty^2 dSlope_yEndT^3\",\n",
"# \"ideal_state_770_ty dSlope_xEndT^4\", # keep\n",
"# # \"ideal_state_770_ty dSlope_xEndT^3 dSlope_yEndT\", #\n",
"# # \"ideal_state_770_ty dSlope_xEndT^2 dSlope_yEndT^2\",\n",
"# # \"ideal_state_770_ty dSlope_xEndT dSlope_yEndT^3\",\n",
"# # \"ideal_state_770_ty dSlope_yEndT^4\",\n",
"# # \"dSlope_xEndT^5\", #\n",
"# \"dSlope_xEndT^4 dSlope_yEndT\", # keep\n",
"# # \"dSlope_xEndT^3 dSlope_yEndT^2\", #\n",
"# # \"dSlope_xEndT^2 dSlope_yEndT^3\",\n",
"# # \"dSlope_xEndT dSlope_yEndT^4\",\n",
"# # \"dSlope_yEndT^5\",\n",
"# ]\n",
"\n",
"keep = [\n",
" \"dSlope_yEndT\", # keep\n",
" \"dSlope_xEndT dSlope_yEndT\", # keep\n",
" \"ideal_state_770_ty dSlope_xEndT^2\", # keep\n",
" \"ideal_state_770_ty dSlope_yEndT^2\", # keep\n",
" # \"dSlope_xEndT^3 dSlope_yEndT\", # do not keep\n",
" # \"ideal_state_770_ty dSlope_xEndT^4\", # keep\n",
" # \"dSlope_xEndT^4 dSlope_yEndT\", # keep\n",
"]\n",
"\n",
"# keep = [\n",
"# \"ideal_state_770_ty dSlope_yEndT^2\",\n",
"# \"ideal_state_770_ty dSlope_xEndT^2\",\n",
"# ]\n",
"remove = [i for i, f in enumerate(poly_features) if f not in keep]\n",
"\n",
"X_train_model = np.delete(X_train_model, remove, axis=1)\n",
"X_test_model = np.delete(X_test_model, remove, axis=1)\n",
"poly_features = np.delete(poly_features, remove)\n",
"# print(poly_features)\n",
"lin_reg = LinearRegression()\n",
"# lin_reg = Lasso(fit_intercept=False, alpha=0.000001)\n",
"# lin_reg = Lasso(alpha=0.1)\n",
"# lin_reg = LassoCV(max_iter=2000)\n",
"# lin_reg = ElasticNet(alpha=0.1)\n",
"# lin_reg = Ridge(alpha=0)\n",
"lin_reg.fit(X_train_model, y_train)\n",
"y_pred_test = lin_reg.predict(X_test_model)\n",
"print(\"intercept=\", lin_reg.intercept_)\n",
"print(\"coef=\", dict(zip(poly_features, lin_reg.coef_)))\n",
"print(\"r2 score=\", lin_reg.score(X_test_model, y_test))\n",
"print(\"RMSE =\", mean_squared_error(y_test, y_pred_test, squared=False))"
]
},
{
"cell_type": "code",
"execution_count": 148,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 148,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"koeffs = dict(zip(poly_features, lin_reg.coef_))\n",
2023-12-19 13:00:59 +01:00
"\n",
"remove = []\n",
"for itr in koeffs.items():\n",
" if abs(itr[1]) < 1.0:\n",
" remove.append(itr[0])\n",
"remove"
]
},
{
"cell_type": "code",
"execution_count": 147,
"metadata": {},
"outputs": [],
"source": [
"ls_koeffs = []\n",
"for itr in koeffs.items():\n",
" ls_koeffs.append(itr[0])\n",
"# ls_koeffs"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['1', 'dSlope_xEndT^2', 'dSlope_xEndT^3', 'dSlope_xEndT^6']"
]
},
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": 149,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAADkKElEQVR4nOzdT2xb6X3v/w/l3CLFbaUjTXc2kNHhGOhdZUTKBdpdRuSkiwZtxqQ8aNF0kRFpp10pMSlNFrd3EcuUZ7z5oYlJeTYpAlyLtNOiXSQm5SwLdMQjZxc0w2MFsHE3d8QjpRcNejM6v4UuGZKSKP45JA+l9wsgIokPn/OVSDnDj77P8wRc13UFAAAAAAAAnHMToy4AAAAAAAAAGAaCMAAAAAAAAFwIBGEAAAAAAAC4EAjCAAAAAAAAcCEQhAEAAAAAAOBCIAgDAAAAAADAhUAQBgAAAAAAgAuBIAwAAAAAAAAXAkEYAAAAAAAALgSCMAAAAAAAAFwIBGEAAAAAAAC4EAjCAAAAAAAAcCEQhAEAAAAAAOBCIAgDAAAAAADAhUAQBgAAAAAAgAuBIAwAAAAAAAAXAkEYAAAAAAAALgSCMAAAAAAAAFwIBGEAAAAAAAC4EAjCAAAAAAAAcCEQhAEAAAAAAOBCIAgDAAAAAADAhUAQBgAAAAAAgAuBIAwAAAAAAAAXAkEYAAAAAAAALgSCMAAAAAAAAFwIBGEAAAAAAAC4EAjCAHTNcZxRlwAAAAAAQNcIwgB0xLIspdNpTU9Pa2lpadTlAAAAAADQtc+NugAA/bMsS48ePZJlWbJtW3t7e3IcR4ZhyDRNzczMKBQKKRqNKhKJHHt8PB6Xbdsql8v1rz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]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bins = np.linspace(-40, 40, 50)\n",
"ax = sns.regplot(\n",
" x=y_test,\n",
" y=abs(y_test - y_pred_test),\n",
" x_bins=bins,\n",
" fit_reg=None,\n",
" x_estimator=np.mean,\n",
" label=\"bla\",\n",
")\n",
"ax2 = ax.twinx()\n",
"ax2.hist(y_test,\n",
" bins=20,\n",
" range=[-40, 40],\n",
" color=\"#2A9D8F\",\n",
" alpha=0.5,\n",
" align=\"left\")\n",
"ax.set_xlabel(r\"y$_{corr}$ [mm]\")\n",
"ax.set_ylabel(\"Mean Deviation [mm]\")\n",
"ax2.set_ylabel(\"Number of Tracks\")\n",
"mplhep.lhcb.text(\"Simulation\", loc=0)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
2023-12-19 13:00:59 +01:00
"features = [\n",
" \"ideal_state_770_ty\",\n",
" \"ideal_state_770_tx\",\n",
2023-12-19 13:00:59 +01:00
" \"dSlope_xEndT\",\n",
" \"dSlope_yEndT\",\n",
" \"dSlope_xEndT_abs\",\n",
" \"dSlope_yEndT_abs\",\n",
"]\n",
"target_feat = \"yDiffEndT\"\n",
"\n",
"data = np.column_stack([ak.to_numpy(array[feat]) for feat in features])\n",
"target = ak.to_numpy(array[target_feat])\n",
"X_train, X_test, y_train, y_test = train_test_split(\n",
" data, target, test_size=0.2, random_state=42\n",
")\n",
2023-12-19 13:00:59 +01:00
"\n",
"poly = PolynomialFeatures(degree=6, include_bias=False)\n",
"X_train_model = poly.fit_transform(X_train)\n",
"X_test_model = poly.fit_transform(X_test)\n",
2023-12-19 13:00:59 +01:00
"poly_features = poly.get_feature_names_out(input_features=features)\n",
"keep = [\n",
" #'dSlope_xEndT',\n",
" \"dSlope_yEndT\", # keep\n",
2023-12-19 13:00:59 +01:00
" #'dSlope_yEndT_abs',\n",
" #'ty dSlope_xEndT',\n",
" #'ty dSlope_yEndT',\n",
" \"ideal_state_770_ty dSlope_xEndT_abs\", # keep\n",
" \"ideal_state_770_ty dSlope_yEndT_abs\", # keep\n",
" \"ideal_state_770_ty dSlope_yEndT^2\", # keep\n",
" \"ideal_state_770_ty dSlope_xEndT^2\", # keep\n",
2023-12-19 13:00:59 +01:00
" #'tx dSlope_xEndT',\n",
" #'tx dSlope_xEndT_abs',\n",
" #'tx dSlope_yEndT',\n",
" \"ideal_state_770_ty ideal_state_770_tx dSlope_xEndT\", # keep\n",
" \"ideal_state_770_tx^2 dSlope_yEndT\", # keep\n",
2023-12-19 13:00:59 +01:00
" #'ty^2 dSlope_xEndT',\n",
" #'ty^2 dSlope_yEndT',\n",
2023-12-19 13:00:59 +01:00
" #'ty^2 dSlope_xEndT_abs',\n",
" #'ty^2 tx dSlope_xEndT',\n",
" #'ty tx^2 dSlope_yEndT',\n",
" \"ideal_state_770_ty ideal_state_770_tx^2 dSlope_xEndT_abs\", # keep\n",
" \"ideal_state_770_ty^3 ideal_state_770_tx dSlope_xEndT\", # keep\n",
2023-12-19 13:00:59 +01:00
" #'ty tx^3 dSlope_xEndT',\n",
" #'ty^3 dSlope_yEndT_abs',\n",
"]\n",
"do_not_keep = [\n",
" \"dSlope_xEndT\",\n",
" \"dSlope_yEndT_abs\",\n",
" \"ideal_state_770_ty dSlope_xEndT\",\n",
" \"ideal_state_770_tx dSlope_xEndT\",\n",
" \"ideal_state_770_tx dSlope_xEndT_abs\",\n",
" \"ideal_state_770_tx dSlope_yEndT\",\n",
" \"ideal_state_770_ty^2 dSlope_xEndT\",\n",
" \"ideal_state_770_ty^3 dSlope_yEndT_abs\",\n",
" \"ideal_state_770_ty ideal_state_770_tx dSlope_yEndT\",\n",
" \"ideal_state_770_ty ideal_state_770_tx^3 dSlope_xEndT\",\n",
" \"ideal_state_770_ty ideal_state_770_tx^2 dSlope_yEndT\",\n",
2023-12-19 13:00:59 +01:00
"]\n",
"reduce = True\n",
"if reduce:\n",
" remove = [i for i, f in enumerate(poly_features) if (keep and f not in keep)]\n",
" X_train_model = np.delete(X_train_model, remove, axis=1)\n",
" X_test_model = np.delete(X_test_model, remove, axis=1)\n",
" poly_features = np.delete(poly_features, remove)\n",
2023-12-19 13:00:59 +01:00
" print(poly_features)\n",
"if not reduce:\n",
" remove = [\n",
" i\n",
" for i, f in enumerate(poly_features)\n",
" if (\"dSlope_\" not in f)\n",
" or (\"EndT^\" in f)\n",
" or (\"abs^\" in f)\n",
" or (\"EndT dSlope\" in f)\n",
" or (\"abs dSlope\" in f)\n",
" ]\n",
" X_train_model = np.delete(X_train_model, remove, axis=1)\n",
" X_test_model = np.delete(X_test_model, remove, axis=1)\n",
" poly_features = np.delete(poly_features, remove)\n",
" # print(poly_features)\n",
2023-12-19 13:00:59 +01:00
" lin_reg = Lasso(fit_intercept=False, alpha=0.000001)\n",
"else:\n",
" lin_reg = LinearRegression(fit_intercept=False)\n",
"lin_reg.fit(X_train_model, y_train)\n",
"y_pred_test = lin_reg.predict(X_test_model)\n",
2023-12-19 13:00:59 +01:00
"print(\"intercept=\", lin_reg.intercept_)\n",
"print(\n",
" \"coef=\",\n",
" {\n",
" k: v\n",
" for k, v in zip(poly_features, lin_reg.coef_)\n",
" if abs(v) > 1.0 and k not in keep and k not in do_not_keep\n",
" },\n",
")\n",
2023-12-19 13:00:59 +01:00
"print(\"r2 score=\", lin_reg.score(X_test_model, y_test))\n",
"print(\"RMSE =\", mean_squared_error(y_test, y_pred_test, squared=False))\n",
"print(\n",
" \"straight RMSE =\",\n",
" mean_squared_error(\n",
" array[\"ideal_state_9410_y\"],\n",
" array[\"ideal_state_770_y\"]\n",
" + array[\"ideal_state_770_ty\"]\n",
" * (array[\"ideal_state_9410_z\"] - array[\"ideal_state_770_z\"]),\n",
" squared=False,\n",
" ),\n",
")\n",
2023-12-19 13:00:59 +01:00
"print(format_array(\"y_xEndT_diff\", lin_reg.coef_))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.6 (conda)",
"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.12"
2023-12-19 13:00:59 +01:00
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "a2eff8b4da8b8eebf5ee2e5f811f31a557e0a202b4d2f04f849b065340a6eda6"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}