Projektpraktikum/trackinglosses_p_endVelo_endUT.ipynb

225 lines
112 KiB
Plaintext
Raw Normal View History

2024-01-28 16:15:00 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import uproot\t\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from mpl_toolkits import mplot3d\n",
"import awkward as ak\n",
"from scipy.optimize import curve_fit\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# file = uproot.open(\"tracking_losses_ntuple_Bd2KstEE.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\")\n",
"file = uproot.open(\n",
" \"tracking_losses_ntuple_B_rad_length_beginVelo2endVelo.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\"\n",
")\n",
"\n",
"# selektiere nur elektronen von B->K*ee\n",
"allcolumns = file.arrays()\n",
"\n",
"electrons = allcolumns[(allcolumns.isElectron) & (allcolumns.fromB)]"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"p = ak.to_numpy(electrons[\"p\"])\n",
"p_velo = ak.to_numpy(electrons[\"p_end_velo\"])\n",
"p_ut = ak.to_numpy(electrons[\"p_end_ut\"])"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAG5CAYAAACDcU4WAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABnGklEQVR4nO3dfZQb530f+i+WL0vSvCS4st0qjShyVrIl3zYmBysnfmnYSBgprdu69mLJ1D5+aaUF7LC5t03shTb33iO57TGIjWz3uKVDYOVWUW8ckwDlJr1uYwKSSyd2bHMByU5iORYBUqJs+YXcBZcrviy5mPvH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zvDT/PF6af37JAW/+6CT6awcvLjF10yWqhic4fr/f/bk62OrZZ59FOp3G4OBgwwNbC5joj4iIdm68Gzs33u0+t+evuz/Pli/gW/P/czWGteY1PMEZHx/HAw88gHg87q7gnD17Ful0GtFoFD6fD5FIxLOBEhERUeMWE/2tHJmS+oNLSD95Sdx2rReqie/duxexWAwPPfQQ8vl8ReFNAIhGo/j4xz/uzSiJiIioKWUsxtGsZPhD2zD8ITnv3Q/+6ho+8o9f8XpoLdHwBAcATNPE1NQUzpw5g1wuhzNnzsAwDASDQZZyICIi6iAs1VDD448/joceekjctnv3brHo5nL7EBERtcvQg59R2t7wrXNqxyXxMa516mUd3wb163OhVFLa+vo3KW3la1dv/mzPq+cjT2hPcBKJBCzLwo4dO7T6X7hwAYlEghMcIiKiDrBg92H
"text/plain": [
"<Figure size 640x480 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"xlim = 20000\n",
"ax = plt.hist2d(p, p_velo, bins=80, range=[[0, xlim], [0, xlim]], cmin=1, vmax=250)\n",
"plt.colorbar(ax[3])\n",
"plt.xlabel(f\"True$P$ [MeV]\")\n",
"plt.ylabel(f\"EndVELO$P$ [MeV]\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAG5CAYAAACDcU4WAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABolklEQVR4nO3df5Rb53kf+O/FkBySYkhwpLhRWlLSHdGO3damLmgnsX3CrIgr2fFuf5gAGSfHdnZtAnHYnu0m9sBsuysmpw0ERm57snUrzMhnFXedhARod9vNNhJgu3RiJzYHiJzEP2IRECUqliNTM+Bw+GOGBO7+MbqXA7zPzLwYXGBwge/nHBxxLl5cvAA4wst7v/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eleuOf/dmfIZ/PY3x8fN0TGwQs9EdERHtH3oi9I2/0fnbqdxY1c84Mvl4vbMS0Bt66FzgnTpzAo48+ikwm4x3BuXjxIvL5PFKpFAzDQDKZ9G2iREREtH5Lhf7WTqbkfucq8p9VrxwDgIVh6Cb+0EMPIZ1O46Mf/SjK5XJT400ASKVS+PjHP+7PLImIiKgjDSzlaNZy+EM7cfhDct277/7lAn7pf3zF76l1xboXOABgWRamp6fxwgsvoFQq4YUXXoBpmohGo2zlQERE1EfYqmEFTz31FD760Y+K9z3wwANi083VHkNERNQr7zXVMwqNV3+obDO2jirbQkKguDE3rz7JiHD6Z5P6NevculP8T2hATj7RXuBks1nYto3du3drjX/ttdeQzWa5wCEiIuo
"text/plain": [
"<Figure size 640x480 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"xlim = 20000\n",
"ax = plt.hist2d(p,\n",
" p_ut,\n",
" bins=80,\n",
" range=[[0, xlim], [0, xlim]],\n",
" cmin=1,\n",
" vmax=250)\n",
"plt.colorbar(ax[3])\n",
"plt.xlabel(f\"True$P$ [MeV]\")\n",
"plt.ylabel(f\"EndUT$P$ [MeV]\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk4AAAHLCAYAAAA+zBcDAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABAEklEQVR4nO3dT4zj6J3/94/W7S7PutHDqpkgnlyyQxmGYQSIQfXMYRG7Fx4yhuMghjNS9yHBegJnJBh1WUxgaWsv3X1ZmYU9+FKAqcIi/VtsDlXi5nfJYrGRZrB2gB+QdEnuvfgQRBzvyQusR0U32m5X2/gxhx5qSipKRf2rolTvFyB0i+RDPiQl8VvP8/DLXBRFkQAAAHCu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ulbXfmwOnu3btj54VhqHa7rcPDw7UInP7mb/5GX/3qVy+7GgAA4GOTGi5+8pOf6Pbt20vZ7syBU7PZTLXMX/7lX866iSvjIlqs1mUby7Yux4lzcbW2cRGWvR+ci/TW4Vit8rmY+Vl1d+7ckeu62traOjOv1+up0WjoRz/60dwVvExxxPrjH/+YFqdL9uTJE7388sv61a9+tdTbfJEO5yM7OBfZwbnIjmVev2dOR1CpVPT666/r5ZdfPvOyLEuFQkF/8Rd/sci6AgAAXKqZA6e33npr4nzTNOV53qyrBwAAyJyZxzg9fvx47LwgCFSr1WZdNQAAQCbNHDhZlqVcLjd2fhRF2t3dnXX1AAAAmTNz4GQYhu7cuSPDMM7Me+WVV2RZ1rndeauCPE4AAGTLyuVx2t/f19tvv73IumQWeZwAAMiWy8r
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"dvelo = p - p_velo\n",
"dut = p - p_ut - dvelo\n",
"xlim = 1\n",
"nbins = 80\n",
"\n",
"plt.hist(\n",
" dvelo / p,\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"darkorange\",\n",
" label=\"VELO\",\n",
" range=[-xlim, xlim],\n",
")\n",
"plt.hist(\n",
" dut / p,\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"blue\",\n",
" label=\"UT\",\n",
" range=[-xlim, xlim],\n",
")\n",
"plt.xlim(0, xlim)\n",
"# plt.yscale(\"log\")\n",
"plt.title(\"emitted energy difference ratio\")\n",
"plt.xlabel(r\"$(E_0 - (E_{VELO} , E_{RICH1+UT}))/E_0$\")\n",
"plt.ylabel(\"a.u.\")\n",
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAHLCAYAAADmwLMJAAAAOX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MdnWVmg8qtf/UoPHjzQ3//9369qE4Phnl/84hdLv4vgw4cPkqT79+/r7t27Sy37zp07K7vrYRPLXlW5tOF6yl1V2atsP4njvI6yacP1lb2Jv6OSEk3bWEmg8v79e/m+r1evXq00UIkdHh5O3dmjoyMdHR2tvA4AAOAnJycnOjk5mbjs48ePictZSaDyxRdfyPf9tSV0ev36NXkZAAAwyKyOgn6/r3w+n6iclQ39PHnyZFVFAwCAHbGyPCpff/213r17t6riAQDADpi7R+Xx48dTl4VhqG63q1evXun+/fvzbgIAAOy4uQOVVquVaJ1/+qd/mncTW2uVk3s3sexNnOzMcV5f2avCcV5f2atCG66+XBPM/ayfR48eyfM8HRwcXFt2dnamZrOpX//61wtXcJZ4Mk6v11vJbXWff/65/vCHP6zkliysHm242Wi/zUcbbr5VteFtrt9zz1GpVqv64osv9Pnnn197OY6jfD6vf/zHf5y3eAAAgPkDla+++mrmctu25fv+vMUDAADMP0dl1h09QRDIdd15iwYAAJC0QKDiOI4ymczU5VEUqdFozFv8rZCZFgAAs6SemdayLD169EiWZV1bdu/ePTmOc+Pw0LKQmRYAALOknpn25cuXOjw8nPfjAAAAN5p7Mi1BCgAAWLWVPevnV7/6lR48eLCWpyevwt7enp49e6a9vb20q4I50YabbW9vTw8fPlOjsae/HPulev48lSrhljgHN58JbTh3wrdZ3r9
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.hist(\n",
" (dut - dvelo) / p,\n",
" bins=nbins,\n",
" density=True,\n",
" alpha=0.5,\n",
" histtype=\"bar\",\n",
" color=\"blue\",\n",
" label=\"UT\",\n",
" range=[-xlim, xlim],\n",
")\n",
"# plt.xlim(0, xlim)\n",
"# plt.yscale(\"log\")\n",
"plt.title(\"emitted energy difference ratio\")\n",
"plt.xlabel(r\"$(E_{VELO} - E_{RICH1+UT})$ [MeV]\")\n",
"plt.ylabel(\"a.u.\")\n",
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"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
}