Projektpraktikum/notebooks/thesis_electrons.ipynb

498 lines
344 KiB
Plaintext
Raw Normal View History

2024-02-04 16:56:05 +01:00
{
"cells": [
{
"cell_type": "code",
2024-02-13 09:16:19 +01:00
"execution_count": 1,
2024-02-04 16:56:05 +01:00
"metadata": {},
"outputs": [],
"source": [
"import uproot\n",
"import numpy as np\n",
"import sys\n",
"import os\n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"import mplhep\n",
"from mpl_toolkits import mplot3d\n",
"import itertools\n",
"import awkward as ak\n",
"from scipy.optimize import curve_fit\n",
"from utils.components import unique_name_ext_re\n",
"mplhep.style.use([\"LHCbTex2\"])\n",
"plt.rcParams[\"savefig.dpi\"] = 600\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
2024-02-13 09:16:19 +01:00
"execution_count": 2,
2024-02-04 16:56:05 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"50501"
]
},
2024-02-13 09:16:19 +01:00
"execution_count": 2,
2024-02-04 16:56:05 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"file = uproot.open(\n",
2024-02-13 09:16:19 +01:00
" \"/work/cetin/LHCb/reco_tuner/data/tracking_losses_ntuple_B_thesis.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\"\n",
2024-02-04 16:56:05 +01:00
")\n",
"\n",
"# selektiere nur elektronen von B->K*ee\n",
"allcolumns = file.arrays()\n",
"electrons = allcolumns[(allcolumns.isElectron) & (allcolumns.fromB)]\n",
"\n",
"ak.num(electrons, axis=0)\n",
"# ak.count(found, axis=None)"
]
},
{
"cell_type": "code",
2024-02-13 09:16:19 +01:00
"execution_count": 3,
2024-02-04 16:56:05 +01:00
"metadata": {},
2024-02-08 17:43:22 +01:00
"outputs": [],
2024-02-04 16:56:05 +01:00
"source": [
2024-02-08 17:43:22 +01:00
"# electrons.type.show()"
2024-02-04 16:56:05 +01:00
]
},
{
"cell_type": "code",
2024-02-13 13:01:49 +01:00
"execution_count": 4,
2024-02-04 16:56:05 +01:00
"metadata": {},
"outputs": [],
"source": [
2024-02-08 17:43:22 +01:00
"cut_prop: bool = electrons.p_end_velo > 0 # 3e3\n",
2024-02-16 11:27:21 +01:00
"found = electrons[~electrons.lost]\n",
"lost = electrons[electrons.lost]\n",
2024-02-04 16:56:05 +01:00
"\n",
"eloss_found = (found[\"p\"] - found[\"p_end_scifi\"]) / found[\"p\"]\n",
"eloss_lost = (lost[\"p\"] - lost[\"p_end_scifi\"]) / lost[\"p\"]\n",
"\n",
2024-02-05 15:44:27 +01:00
"eloss = (electrons[\"p\"] - electrons[\"p_end_scifi\"]) / electrons[\"p\"]\n",
"eloss_magnet_found = ak.to_numpy(\n",
2024-02-13 09:16:19 +01:00
" (found[\"p_end_velo\"] - found[\"p_end_scifi\"]) / found[\"p_end_velo\"]\n",
")\n",
2024-02-05 15:44:27 +01:00
"eloss_magnet_lost = ak.to_numpy(\n",
2024-02-13 09:16:19 +01:00
" (lost[\"p_end_velo\"] - lost[\"p_end_scifi\"]) / lost[\"p_end_velo\"]\n",
")"
2024-02-04 16:56:05 +01:00
]
},
{
"cell_type": "code",
2024-02-13 13:01:49 +01:00
"execution_count": 5,
2024-02-04 16:56:05 +01:00
"metadata": {},
"outputs": [],
"source": [
2024-02-08 17:43:22 +01:00
"eloss_velo_found = (found[\"p\"] - found[\"p_end_velo\"]) / found[\"p\"]\n",
"eloss_velo_lost = (lost[\"p\"] - lost[\"p_end_velo\"]) / lost[\"p\"]"
2024-02-04 16:56:05 +01:00
]
},
{
"cell_type": "code",
2024-02-13 13:01:49 +01:00
"execution_count": 6,
2024-02-04 16:56:05 +01:00
"metadata": {},
"outputs": [
{
"data": {
2024-02-16 11:27:21 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIW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+a+RR8Xhc8Xhcb968UaVSUa1Wk23bajabkqTp6WlZlqVYLKZoNKrJyUmfKwYAAAAAAEAQjMzWSAQDWyPhN8dxZJqm32UAAAAACLCfNv/q2Vy/WP69Z3PhAFsjAaCHer2uTCajqakprays+F0OAAAAAGBEjdzWyH6sra3p7t27+uUvf+l3KcAHr16va3NzU/V6vbNNub1qy7IsTU9PKxwOd7YrH5VIJGTbtmq1WudzjuOoUqloc3NTlUpFjuMM8RUBAAAAAD5UI7ci7NmzZ7p3755u3bqlZ8+enTgmEolofn5en376qb7//vshV4hRUygUOoctnOcWiUQ8uf5Frj01NXXqfIlE4kJzViqVvmt2HEeZTKbzdcjlcqpUKrJtuxNaOY6jer2uSqWiXC6nWCzWGZ/JZFQoFJRIJFQqlY7Nv7KyoocPH6pUKhGCAQAAAAA8MzJB2J///GddvXpViURChUJB9Xq90yD/qHg8Ltu29Y9//EOWZembb74ZcrUYJclkUnt7e6rVaorH4z3HRqNRlcvlzngvuK6rRqOhfD7fs/eVZVnK5/NqNBra29s7dVyxWNTe3p7K5fKJK7AOS6fTqtVq2tvbO3NsW3uLYi6X6/p8PB5XsVjszNd+XeVyWclksvPa6vW6crmcUqlUJwQ7Gna
2024-02-08 17:43:22 +01:00
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"nbins = 50\n",
"plt.hist(\n",
" ak.to_numpy(eloss_lost),\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#F05342\",\n",
" label=\"lost\",\n",
" range=[0.001, 1],\n",
")\n",
"# #2A9D8F another teal color\n",
"plt.hist(\n",
" ak.to_numpy(eloss_found),\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#107E7D\",\n",
" label=\"found\",\n",
" range=[0.001, 1],\n",
")\n",
"\n",
"plt.xlabel(r\"$E_\\gamma/E_0$\")\n",
2024-02-16 11:27:21 +01:00
"plt.ylabel(\"Number of Tracks (normalised)\")\n",
"mplhep.lhcb.text(\"Simulation\")\n",
"plt.legend(loc=\"upper center\")\n",
2024-02-08 17:43:22 +01:00
"plt.show()\n",
"# plt.savefig(\n",
"# \"/work/cetin/Projektpraktikum/thesis/emitted_energy_beginVelo2endT.pdf\",\n",
"# format=\"PDF\",\n",
"# )"
]
},
{
"cell_type": "code",
2024-02-13 09:16:19 +01:00
"execution_count": 7,
2024-02-08 17:43:22 +01:00
"metadata": {},
"outputs": [
{
"data": {
2024-02-16 11:27:21 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACg2UlEQVR4nOz9T0wbeb7v/7+K6cWRrgQFOToSAuk05c5dfaUbbDL7DnbPbKdjQ+/OYho7OUtmYkP2N8HuaZa3Y5NenN0NJunt3Ngk+9PYSUvf3YwLWgpCulcxhVtXmsV3qN+Cnz2Y/+DCVcbPh2Q1xp96f97G0FJe+nw+Zbiu6woAAAAAAAC44Qb8bgAAAAAAAADoBoIwAAAAAAAA9AWCMAAAAAAAAPQFgjAAAAAAAAD0BYIwAAAAAAAA9AWCMAAAAAAAAPQFgjAAAAAAAAD0BYIwAAAAAAAA9AWCMAAAAAAAAPQFgjAAAAAAAAD0BYIwAAAAAAAA9AWCMAAAAAAAAPQFgjAAAAAAAAD0BYIwAAAAAAAA9AWCMAAAAAAAAPQFgjAAAAAAAAD0BYIwAAAAAAAA9AWCMAAAAAAAAPQFgjAAAAAAAAD0BYIwAAAAAAAA9AWCMAAAAAAAAPQFgjAAAAAAAAD0BYIwAAAAAAAA9AWCMAAAAAAAAPQFgjAAAAAAAAD0BYIwAAAAAAAA9AWCMAAAAAAAAPQFgjCgCxzH8bsFAAAA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StVrtWAi1trYW6PDjqqFZt9m2rUKhoHK5fOJB+N3s47KO/o7dhL8bAAAAADiKIAw3xuzs7InfD3LAc5qjwY9XQVizVqVSOTbHZe/UiX9o3vU
2024-02-04 16:56:05 +01:00
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"nbins = 50\n",
"plt.hist(\n",
2024-02-05 15:44:27 +01:00
" ak.to_numpy(eloss_magnet_lost),\n",
2024-02-04 16:56:05 +01:00
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#F05342\",\n",
" label=\"lost\",\n",
" range=[0.001, 1],\n",
")\n",
"# #2A9D8F another teal color\n",
"plt.hist(\n",
2024-02-05 15:44:27 +01:00
" ak.to_numpy(eloss_magnet_found),\n",
2024-02-04 16:56:05 +01:00
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#107E7D\",\n",
" label=\"found\",\n",
" range=[0.001, 1],\n",
")\n",
"\n",
2024-02-05 15:44:27 +01:00
"plt.xlabel(r\"$E_\\gamma/E_{VELO}$\")\n",
2024-02-16 11:27:21 +01:00
"plt.ylabel(\"Number of Tracks (normalised)\")\n",
2024-02-04 16:56:05 +01:00
"# plt.title(r'$B\\rightarrow K^\\ast ee$, $p>5$GeV, photons w/ brem_vtx_z$<9500$mm')\n",
2024-02-16 11:27:21 +01:00
"plt.legend(loc=\"best\")\n",
"mplhep.lhcb.text(\"Simulation\", loc=0)\n",
2024-02-05 15:44:27 +01:00
"plt.show()\n",
"# plt.savefig(\n",
2024-02-16 11:27:21 +01:00
"# \"/work/cetin/Projektpraktikum/thesis/emitted_energy_endVelo2endT.pdf\",\n",
"# format=\"PDF\")"
2024-02-08 17:43:22 +01:00
]
},
{
"cell_type": "code",
2024-02-13 09:16:19 +01:00
"execution_count": 8,
2024-02-08 17:43:22 +01:00
"metadata": {},
"outputs": [
{
"data": {
2024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3rudDp9qh4P+710o1qtts89Pz/fUd+2bZXLZUm7vc/OznYca5qmbNs+cEOH1mt73zvrZ9GSz+eVzWZlmqbq9bpyuZxs25ZlWUqlUqrVau2eV1ZWFI/HO74bjUZDyWTywHdybW1NsVisvaS3Xq+rWCy2PyvP89j8HwAAAEA0hZ3EITiK2IywQqFw7nr7Z+TohBlh+2fVtB6tGUm9tn9m02GzbY7SmmHU7XUc9Ts5T829tU6ahbR/ltBRs/L2z1zbOzNsr72/j6POXalUTjWDa2trK9AZYalU6sTv+0l1Ttt7y2k/i70zwU76rPfO+Dpq9uLeHk3TPPRz3f/d7dX/fwAAAADgtJgRhksh6jPCzmL/3R+l811HLpfT1tbWkbOgWneqPE3tw3o6yt4bFGQymSP3Rtt/p8SjZgHu7d/zvMh+pkd9B/e+HsSm+Kf9LPL5fPv8mUzmVGOl3Vluh92gYe91LC4uHvq57v+ura2tnapXAAAAAOgVgjBcCkeFA/V6vceddO+wQOXjx4/nrlUul1Wr1Q4swZN2Q4+pqalAw6XTLgPd+5mdZelolO6wuLi4qEKhoHK5fGLYJPUumC2VSu1znSY4y2QyHZ/BWW7QsN/e80XpswIAAAAAiSAMl8RRs44Om9kSdYcFF1evXu2qpm3bR+695jjOgf2reuG8d/RsNBrBNtIF0zSVy+WO3JPtLHu7BalSqbR/Pu0Msr1/Q/34dwMAAAAAp0EQhkvjsBlPrutGdindWZxlaeJxMpmM6vX6gRBqZWUl0uHHeUOzXnNdV6VSSdVq9dCN8HvZx1nt/45dhr8bAAAAANiPIAyXxszMzKGvRzngOcr+4CeoIKxVq1arHTjHWe/Uib9r3fW
2024-02-08 17:43:22 +01:00
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"nbins = 50\n",
"plt.hist(\n",
" ak.to_numpy(eloss_velo_lost),\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#F05342\",\n",
" label=\"lost\",\n",
" range=[0.001, 1],\n",
")\n",
"# #2A9D8F another teal color\n",
"plt.hist(\n",
" ak.to_numpy(eloss_velo_found),\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#107E7D\",\n",
" label=\"found\",\n",
" range=[0.001, 1],\n",
")\n",
"\n",
"plt.xlabel(r\"$E_\\gamma/E_0$\")\n",
2024-02-16 11:27:21 +01:00
"# plt.ylabel(\"a.u.\")\n",
"plt.ylabel(\"Number of Tracks (normalised)\")\n",
"\n",
2024-02-08 17:43:22 +01:00
"# plt.title(r'$B\\rightarrow K^\\ast ee$, $p>5$GeV, photons w/ brem_vtx_z$<9500$mm')\n",
2024-02-16 11:27:21 +01:00
"plt.legend(loc=\"best\")\n",
"mplhep.lhcb.text(\"Simulation\", loc=0)\n",
2024-02-08 17:43:22 +01:00
"plt.show()\n",
"# plt.savefig(\n",
"# \"/work/cetin/Projektpraktikum/thesis/emitted_energy_beginVelo2endVelo.pdf\",\n",
"# format=\"PDF\",\n",
"# )"
2024-02-04 16:56:05 +01:00
]
},
{
"cell_type": "code",
2024-02-13 13:01:49 +01:00
"execution_count": 9,
2024-02-08 17:43:22 +01:00
"metadata": {},
"outputs": [],
"source": [
"### --- ### above should be correct"
]
},
2024-02-16 11:27:21 +01:00
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACmlElEQVR4nOzdz28b+Z3n/1c5fQiwGKkkLwIIFpBWsb2nAcai5NxjkT1znW5S6lsOaZH2nhbqNmn1H2Cb7G4dE5NyH3JbibT7mjEp9z0Wy91AbglLCr42BGTRVJnBAjlkVN+DlhxRPymxxCq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j7DwO3/1RutjnyGQy2t3dPbELqnWnym7mPq6mkxy8QUEqlTrxbLTDd0o8qQvwYP2u64b2Oz3pb/Dgz/04FL/b7yKbzbbXT6VSXY2V9rvcjrtBw8HPsbq6euz3evhvbXNzs6taAQAAAAwXgjCgRyeFA/V6vc+V9O64QOXHH3+88FylUkm1Wu3IFjxpP/SYm5vzNVzqdhvowe/sPFtHw3SHxdXVVeVyOZVKpTPDJql/wWyxWGyv1U1wlkqlOr6D89yg4bCD64XpuwIAAAAQHgRhQI9O6jo6rrMl7I4LLq5fv97TnNFo9MSz12zbPnJ+VT9c9I6ejUbD30J6YJqmMpnMiWeynedsNz9VKpX28247yA7+GxrEfzcAAAAABgdBGOCD4zqeHMcJ7Va68zjP1sTTpFIp1ev1IyFUuVwOdfhx0dCs3xzHUbFYVLVaPfYg/H7WcV6H/8auwr8bAAAAAOFEEAb4YGFh4difhzngOcnh4MevIKw1V61WO7LGee/Uif/SuutloVA49Vy0fjkYYnU
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"nbins = 50\n",
"plt.hist(\n",
" ak.to_numpy(lost[\"eta\"]),\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#F05342\",\n",
" label=\"lost\",\n",
" range=[2, 5],\n",
")\n",
"# #2A9D8F another teal color\n",
"plt.hist(\n",
" ak.to_numpy(found[\"eta\"]),\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#107E7D\",\n",
" label=\"found\",\n",
" range=[2, 5],\n",
")\n",
"# plt.xlim(2, 5)\n",
"plt.xlabel(r\"$\\eta$\")\n",
"plt.ylabel(\"Number of Tracks (normalised)\")\n",
"plt.legend(loc=\"best\")\n",
"mplhep.lhcb.text(\"Simulation\", loc=0)\n",
"# plt.show()\n",
"plt.savefig(\n",
" \"/work/cetin/Projektpraktikum/thesis/eta_found_lost.pdf\",\n",
" format=\"PDF\",\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACkO0lEQVR4nOz9T2wb+Z3n/7/K6UOALyKV5EEAw1qkWWzvaYFYlDz3tshkrukmpb7NIS3SHmCBXSUmrcYcF5bJ7tYeFtg2KfdhbiNRdl97TMp9T4vlbmBOm7CkADYEZNFUicECOUxUv4N+ZET9pcQSq2g+HwARUfzUp94lynb46vfnU4bneZ4AAAAAAACAt9y1oAsAAAAAAAAA+oEgDAAAAAAAAEOBIAwAAAAAAABDgSAMAAAAAAAAQ4EgDAAAAAAAAEOBIAwAAAAAAABDgSAMAAAAAAAAQ4EgDAAAAAAAAEOBIAwAAAAAAABDgSAMAAAAAAAAQ4EgDAAAAAAAAEOBIAwAAAAAAABDgSAMAAAAAAAAQ4EgDAAAAAAAAEOBIAwAAAAAAABDgSAMAAAAAAAAQ4EgDAAAAAAAAEOBIAwAAAAAAABDgSAMAAAAAAAAQ4EgDAAAAAAAAEOBIAwAAAAAAABDgSAMAAAAAAAAQ4EgDAAAAAAAAEOBIAwAAAAAAABDgSAMAAAAAAAAQ4EgDAAAAAAAAEOBIAwAAAAAAABDgSAMwIW5rht0CQAAAAAAXBhBGICu2LatXC6nsbExzc/PB10OAAAAAAAX9k7QBQDonW3bWl1dlW3bchxHjUZDruvKNE1ZlqXx8XHFYjElEgnF4/Fjx6dSKTmOo1qt1v6e67qqVqtaXV1VtVqlCwwAAAAAMPAMz/O8oIsASqWSMpnMhY+LxWId4c1lGYZx4WNM09Tu7u6Jr6VSKa2vr194zkqlcmJQdRLXdbW0tKRCoXDh88RiMcXjcUWjUVUqF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69rd3e24QUCpVJJt20okEqpWq6pUKtrd3dXu7q4qlUr7Z+c4jpaWlk48dyqV6qrGk34uvahWq+1zLy4udswfi8VULpclHdQ+Pz/fcaxpmorFYsdu6ND63uHXLvpetORyOWUyGZmmqXq9rmw2q1gsJsuylEwmVavV2jWvr68rGo12/G40Gg0lEoljv5Obm5uKRCLtJb31el3FYrH9Xrmuy+b/AAAAwNsi6CQOOI1C1hGWz+cvPd/Rjhyd0xF2tKum9Wh1JPXb0c6mk7ptTtPqMOr1Ok77mVxmzsNzndeFdLRL6LSuvKOda4c7ww47/PM47dyVSqWrDq7d3V1fO8KSyeS5v+/nzdNt7S3dvheHO8HOe68Pd3yd1r14uEbTNE98X4/+7vbr7x8AAAAAV4eOMCCEwt4RdhFH7/4oXe46stmsdnd3T+2Cat2pspu5T6rpNIdvUJBOp0/dG+3onRJP6wI8XL/ruqF9T0/7HTz8fT82xe/2vcjlcu3zp9PprsZKB11uJ92g4fB1rKysnPi+Hv1d29zc7KpWAAAAAOFFEAaE0GnhQL1e73MlvTspUPnhhx8uPVe5XFatVju2BE86CD1mZmZ8DZe6XQZ6+D27yNLRMN1hcWVlRfl8XuVy+dywSepfMFsqldrn6iY4S6fTHe/BRW7QcNTh84XpvQIAAABwOQRhQAid1nV0UmdL2J0UXFy/fr2nOWOx2Kl7r9m2fWz/qn647B09G42Gv4X0wDRNZbPZU/dku8jebn6qVCrtr7vtIDv8Z2gQ/9wAAAAAuBoEYUBIndTx5DhOaJfSXcRFliaeJZ1Oq16vHwuh1tfXQx1+XDY06zfHcVQqlVStVk/cCL+fdVzU0d+xt+HPDQAAAIDeEYQBITU3N3fi98Mc8JzmaPDjVxDWmqtWqx07x0Xv1Im/ad31slgsnrkvWr8
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"nbins = 50\n",
"plt.hist(\n",
" ak.to_numpy(lost[\"phi\"]),\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#F05342\",\n",
" label=\"lost\",\n",
" range=[-3.142, 3.142],\n",
")\n",
"# #2A9D8F another teal color\n",
"plt.hist(\n",
" ak.to_numpy(found[\"phi\"]),\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"#107E7D\",\n",
" label=\"found\",\n",
" range=[-3.142, 3.142],\n",
")\n",
"# plt.xlim(2, 5)\n",
"plt.xlabel(r\"$\\phi$ [rad]\")\n",
"plt.ylabel(\"Number of Tracks (normalised)\")\n",
"plt.legend(loc=\"best\")\n",
"mplhep.lhcb.text(\"Simulation\", loc=0)\n",
"plt.show()\n",
"# plt.savefig(\n",
"# \"/work/cetin/Projektpraktikum/thesis/phi_found_lost.pdf\",\n",
"# format=\"PDF\",\n",
"# )"
]
},
2024-02-08 17:43:22 +01:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2024-02-16 11:27:21 +01:00
"execution_count": null,
2024-02-04 16:56:05 +01:00
"metadata": {},
"outputs": [],
2024-02-16 11:27:21 +01:00
"source": []
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.24996287312509283"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
2024-02-04 16:56:05 +01:00
"source": [
"# magnet kick position\n",
2024-02-16 11:27:21 +01:00
"input_tree = uproot.open(\n",
" {\n",
" \"/work/cetin/Projektpraktikum/tracking_losses_ntuple_B_zmag.root\": \"PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\"\n",
" }\n",
")\n",
2024-02-04 16:56:05 +01:00
"array = input_tree.arrays()\n",
2024-02-16 11:27:21 +01:00
"array = array[(array.isElectron) & (array.fromB)]\n",
"stretch_factor = ak.num(array[array.lost], axis=0) / ak.num(array[~array.lost], axis=0)\n",
"stretch_factor"
2024-02-04 16:56:05 +01:00
]
},
{
"cell_type": "code",
2024-02-16 11:27:21 +01:00
"execution_count": 15,
2024-02-04 16:56:05 +01:00
"metadata": {},
"outputs": [
{
"data": {
2024-02-16 11:27:21 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACyEElEQVR4nOzdTWwb6b3n+18pvTjATKSSPBhAkIC0iu1ZDXAsUs4+Fplke9qk1LtZpEXas7pQYtLq1Rngom3Sad3FBU5Myr24S4uye9vHpNz702K5A9zVSbOkABYEzMBUmT0DzOJGdRcCeUS9UBTfqmh9PwARUXzqef40pSD65f88ZXie5wkAAAAAAAD4wI35XQAAAAAAAAAwDARhAAAAAAAAuBYIwgAAAAAAAHAtEIQBAAAAAADgWiAIAwAAAAAAwLVAEAYAAAAAAIBrgSAMAAAAAAAA1wJBGAAAAAAAAK4FgjAAAAAAAABcCwRhAAAAAAAAuBYIwgAAAAAAAHAtEIQBAAAAAADgWiAIAwAAAAAAwLVAEAYAAAAAAIBrgSAMAAAAAAAA1wJBGAAAAAAAAK4FgjAAAAAAAABcCwRhAAAAAAAAuBYIwgAAAAAAAHAtEIQBAAAAAADgWiAIAwAAAAAAwLVAEAYAAAAAAIBrgSAMAAAAAAAA1wJBGAAAAAAAAK4FgjAAAAAAAABcCwRhAAAAAAAAuBYIwgAAAAAAAHAtEIQBuDLXdf0uAQAAAACAKyMIA9AR27aVyWQ0OTmplZUVv8sBAAAAAODKPvK7AAC9s21bz58/l23bchxHtVpNruvKNE1ZlqWpqSmFw2HFYjFFo9Ez1ycSCTmOo0ql0vye67oql8t6/vy5yuUyXWAAAAAAgJFneJ7n+V0EUCgUlEqlrnxdOBxuCW+6ZRjGla8xTVOHh4fnvpZIJLS1tXXlOUul0rlB1Xlc19WjR4+Uy+WuvE44H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g27YVi8VULpdVKpV0eHiow8NDlUql5r+d4zh69OjRuWsnEomOajzv36UX5XK5ufba2lrL/OFwWMViUdJx7SsrKy3XmqapcDh85oYOje+dfO2qn0VDJpNRKpWSaZqqVqtKp9MKh8OyLEvxeFyVSqVZ89bWlkKhUMvPRq1WUywWO/MzubOzo7m5ueaW3mq1qnw+3/ysXNfl8H8AAADgQ+F3EgdcRAHrCMtms13Pd7ojR5d0hJ3uqmk8Gh1Jw3a6s+m8bpuLNDqMen0fF/2bdDPnybku60I63SV0UVfe6c61k51hJ53897ho7VKp1FEH1+HhYV87wuLx+KU/75fN02ntDZ1+Fic7wS77rE92fF3UvXiyRtM0z/1cT//sDuu/fwAAAAAMDh1hQAAFvSPsKk7f/VHq7n2k02kdHh5e2AXVuFNlJ3OfV9NFTt6gIJlMXng22uk7JV7UBXiyftd1A/uZXvQzePL7/TgUv9PPIpPJNNdPJpMdjZWOu9zOu0HDyfexsbFx7ud6+mdtZ2eno1oBAAAABBdBGBBAF4UD1Wp1yJX07rxA5d27d13PVSwWValUzmzBk45Dj8XFxb6GS51uAz35mV1l62iQ7rC4sbGhbDarYrF4adgkDS+YLRQKzbU6Cc6SyWTLZ3CVGzScdnK9IH1WAAAAALpDEAYE0EVdR+d1tgTdecHFjRs3epozHA5fePaabdtnzq8ahm7v6Fmr1fpbSA9M01Q6nb7wTLarnO3WT6VSqfl1px1kJ3+HRvH3BgAAAMBgEIQBAXVex5PjOIHdSncVV9ma2E4ymVS1Wj0TQm1tbQU6/Og2NBs2x3FUKBRULpfPPQh/mHVc1emfsQ/h9wYAAABA7wjCgIBaXl4+9/tBDngucjr46VcQ1pirUqmcWeOqd+rEv2nc9TKfz7c9F21
2024-02-04 16:56:05 +01:00
"text/plain": [
"<Figure size 1200x900 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2024-02-13 13:01:49 +01:00
"xmin: float = 5200\n",
"xmax: float = 5600\n",
"\n",
2024-02-04 16:56:05 +01:00
"fig = plt.figure()\n",
2024-02-16 11:27:21 +01:00
"plt.hist(\n",
" array[array.lost][\"match_zmag\"],\n",
" bins=80,\n",
" range=[xmin, xmax],\n",
" color=\"#F05342\",\n",
" alpha=0.5,\n",
" label=\"lost\",\n",
" density=True,\n",
")\n",
"plt.hist(\n",
" array[~array.lost][\"match_zmag\"],\n",
" bins=80,\n",
" range=[xmin, xmax],\n",
" color=\"#107E7D\",\n",
" alpha=0.5,\n",
" label=\"found\",\n",
" density=True,\n",
")\n",
2024-02-04 16:56:05 +01:00
"plt.xlabel(r\"z$_{Mag}$ [mm]\")\n",
"plt.ylabel(\"Number of Tracks (normalised)\")\n",
2024-02-13 13:01:49 +01:00
"plt.legend(loc=\"best\")\n",
2024-02-16 11:27:21 +01:00
"mplhep.lhcb.text(\"Simulation\", loc=0)\n",
"# plt.show()\n",
"plt.savefig(\"/work/cetin/Projektpraktikum/thesis/match_zmag_lost_found.pdf\",\n",
" format=\"PDF\")"
2024-02-04 16:56:05 +01:00
]
},
{
2024-02-16 11:27:21 +01:00
"cell_type": "markdown",
2024-02-04 16:56:05 +01:00
"metadata": {},
"source": [
2024-02-16 11:27:21 +01:00
"brem vtx 2d hists in trackinglosses_energy notebook\n"
2024-02-04 16:56:05 +01:00
]
},
2024-02-16 11:27:21 +01:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
2024-02-04 16:56:05 +01:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "tuner",
"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"
}
},
"nbformat": 4,
"nbformat_minor": 2
}