2023-09-14 12:07:57 +02:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-15 12:33:25 +02:00
|
|
|
"execution_count": 1,
|
2023-09-14 12:07:57 +02: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",
|
|
|
|
"from mpl_toolkits import mplot3d\n",
|
|
|
|
"import itertools\n",
|
|
|
|
"import awkward as ak\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"import seaborn as sns\n",
|
2023-09-14 12:07:57 +02:00
|
|
|
"%matplotlib inline"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-15 12:33:25 +02:00
|
|
|
"execution_count": 2,
|
2023-09-14 12:07:57 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
2023-09-14 16:33:27 +02:00
|
|
|
"file = uproot.open(\"tracking_losses_ntuple_Bd2KstEE.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\")\n",
|
|
|
|
"#file = uproot.open(\"tracking_losses_ntuple_Dst0ToD0EE.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\")\n",
|
2023-09-14 12:07:57 +02:00
|
|
|
"\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"#look at particles only from Signal\n",
|
2023-09-14 12:07:57 +02:00
|
|
|
"allcolumns = file.arrays()\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"tracked = allcolumns[(allcolumns.isElectron) & (~allcolumns.lost) & (allcolumns.fromSignal)]\n",
|
|
|
|
"lost = allcolumns[(allcolumns.isElectron) & (allcolumns.lost) & (allcolumns.fromSignal)] \n",
|
|
|
|
"\n",
|
|
|
|
"#ak.num(tracked, axis=0)\n",
|
|
|
|
"\n"
|
2023-09-14 12:07:57 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-15 12:33:25 +02:00
|
|
|
"execution_count": 21,
|
2023-09-14 12:07:57 +02:00
|
|
|
"metadata": {},
|
2023-09-15 12:33:25 +02:00
|
|
|
"outputs": [],
|
2023-09-14 16:33:27 +02:00
|
|
|
"source": [
|
|
|
|
"#lost\n",
|
|
|
|
"l_eph = lost[\"brem_photons_pe\"]\n",
|
|
|
|
"ak.nan_to_num(l_eph)\n",
|
|
|
|
"l_pT = lost[\"pt\"]\n",
|
|
|
|
"l_sci_x = lost[\"scifi_hit_pos_x\"]\n",
|
|
|
|
"ak.nan_to_num(l_sci_x)\n",
|
|
|
|
"\n",
|
|
|
|
"#found\n",
|
|
|
|
"f_eph = tracked[\"brem_photons_pe\"]\n",
|
|
|
|
"ak.nan_to_num(f_eph)\n",
|
|
|
|
"f_pT = tracked[\"pt\"]\n",
|
|
|
|
"f_sci_x = tracked[\"scifi_hit_pos_x\"]\n",
|
2023-09-15 12:33:25 +02:00
|
|
|
"ak.nan_to_num(f_sci_x)\n",
|
|
|
|
"\n",
|
|
|
|
"l_sci_x, l_pT = ak.broadcast_arrays(l_sci_x, l_pT)\n",
|
|
|
|
"f_sci_x, f_pT = ak.broadcast_arrays(f_sci_x, f_pT)\n",
|
|
|
|
"\n",
|
|
|
|
"l_sci_x = ak.to_numpy(ak.flatten(l_sci_x))\n",
|
|
|
|
"l_pT = ak.to_numpy(ak.flatten(l_pT))\n",
|
|
|
|
"f_sci_x = ak.to_numpy(ak.flatten(f_sci_x))\n",
|
|
|
|
"f_pT = ak.to_numpy(ak.flatten(f_pT))"
|
2023-09-14 16:33:27 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-15 12:33:25 +02:00
|
|
|
"execution_count": 22,
|
2023-09-14 16:33:27 +02:00
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zgwYNNWFiYueqqq8zEiRPN2bNna8yvpv288ruWLVtmfvvb35pWrVqZ8PBwM2DAAPOvf/2rWl7r1q0zt956qwkPDzehoaGmd+/eZv369TV+vzHGlJeXm9///vemQ4cOJiQkxNjtdtO5c2czZ84ch7jdu3ebe+65x0RHR5ugoCATHx9v0tPTrXWsWjd9+/attm4jR4606qy237OruMrf0Ouvv26uvfZaExoaarp06WJWr15da36VZXz99dfNxIkTTVxcnLHZbGb37t3GGPfrcOXKlaZz584mKCjItGvXzsyZM8c8++yzpurhf+7cuebHP/6xadmypWnSpIlJSkoyzz//vCktLXWI69u3r7nuuuvMpk2bTK9evUxoaKj5+c9/bowx5ttvvzV33323adq0qWnWrJkZMWKEyc3NdfjNOFPb78wY947VnuZbuS7bt283t9xyiwkNDTXt2rUz06dPN+Xl5Q55FRcXW7/Dyt/1r3/9a3Pq1CmHuISEBGvfMab27XihvXv3Oi1vZX6V223nzp3mZz/7mWnevLmJjY01xhizY8cO8/Of/9wkJCSYkJAQk5CQYO655x7zzTffOK0Td47LNR0vS0tLTcuWLc19991XbT2KiopMSEiIefTRRz2uv5r+77z88sumS5cuJiwszDRt2tQkJiaaJ5980uHzBw8eNKNHjzatW7c2gYGBpm3btiYzM9OUlZVVK2dVlcfk1atXm+uvv96EhISYa6+91vq9LliwwFx77bWmSZMm5qabbjI7duyolsc//vEP07NnTxMaGmqaNm1qBg4caLZs2eIQU7kdP/30U3PXXXeZZs2amYiICPPoo4+asrIy869//cukpKSYpk2bmoSEBPP8889X+x5P67OmY1BleaoulcfHC/8nVq2vC/f1yn1rw4YN5le/+pWJjIw04eHhJj093Zw6dcocPHjQ3H333cZut5vY2FgzadKkascXAL7l7Ny/b9++1vvuHMNcnRc5O7fw5DxozZo1pmvXriYoKMi0bdvWzJgxw2merrhzXuSqPejuOVVN55funnM4O3/at2+f+cUvfmFatmxpgoKCzLXXXmtmzpzpcC5SeY4wY8YMM2vWLNO2bVsTFhZmevbsaXJzc2utn8ry5eTkmFGjRpmIiAjTpEkTk5qa6rQN6Y02cuV6V+5jtZ3n1KW97kkbx53zCWeq/j+sS1vX3Xa4O7+dL7/80tx7770O+8/cuXNrXR9jjPnb3/5mbr75ZutaQbt27cwDDzzgEFNUVGQmTpxo2rVrZ4KCgkzLli3N4MGDHc5lL6wbZ+cVlccMV9u4Kmdxnpy3O1PTOaa7dZifn29uu+02ExoaaqKioszYsWPNmjVrqrW5c3JyzLBhw0zr1q1NcHCwueaaa8zo0aPNkSNHHPKr6dy+tLTU/OY3vzExMTEmNDTU9OnTx2zbtq3a+VdVtf3OjHHvWo6n+VauS35+vrnnnntMs2bNTHR0tHnggQfM8ePHHfKqy7WwmrZjVe5cv3DWRjt8+LB56KGHTMeOHU1YWJhp2bKl6d+/v/nwww+d1ok7x+Xajpe33367adOmjdN9+eabbzbdunXzuP5q+r/jznWxkpIS8/vf/94kJiaaoKAgExUVZUaNGmUOHz7stL4vVHlM3r17t0lOTjZNmjQxsbGxZvr06cYYY3Jzc02fPn1MkyZNTPv27c3ChQur5fH555+bYcOGmebNm5vg4GDTtWvXanGV23Hp0qXmscceM7GxsSYsLMykpqaawsJCc+LECZORkWFatGhhWrRoYUaNGmVOnjzpkIen9VnTMaiyPFWXyuPjhf8Tq9bXhft65b71wgsvmD/+8Y9WG79v375mz549prS01Dz++OOmVatWplmzZmb48OHm0KFDtW4X1M0V3YEybdo0I8nce++9Zu3ateb11183V199tbHb7ebLL7+04hITE82PfvQ
|
2023-09-14 16:33:27 +02:00
|
|
|
"text/plain": [
|
2023-09-15 12:33:25 +02:00
|
|
|
"<Figure size 2000x600 with 4 Axes>"
|
2023-09-14 16:33:27 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
|
|
|
|
"\n",
|
2023-09-15 12:33:25 +02:00
|
|
|
"ax0.hist2d(l_sci_x, l_pT, bins=100, cmap=plt.cm.jet)\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"ax0.set_xlabel(\"scifi x\")\n",
|
|
|
|
"ax0.set_ylabel(r\"$p_T$\")\n",
|
|
|
|
"ax0.set_title(\"lost electron positions in the scifi in regard to their transverse momentum\")\n",
|
2023-09-15 12:33:25 +02:00
|
|
|
"pcm0 = ax0.pcolormesh([l_sci_x,l_pT])\n",
|
|
|
|
"plt.colorbar(pcm0,ax=ax0)\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"\n",
|
2023-09-15 12:33:25 +02:00
|
|
|
"ax1.hist2d(f_sci_x, f_pT, bins=100, cmap=plt.cm.jet)\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"ax1.set_xlabel(\"scifi x\")\n",
|
|
|
|
"ax1.set_ylabel(r\"$p_T$\")\n",
|
|
|
|
"ax1.set_title(\"found electron positions in the scifi in regard to their transverse momentum\")\n",
|
2023-09-15 12:33:25 +02:00
|
|
|
"pcm1 = ax1.pcolormesh([f_sci_x,f_pT])\n",
|
|
|
|
"plt.colorbar(pcm1,ax=ax1)\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"\n",
|
2023-09-15 12:33:25 +02:00
|
|
|
"\"\"\"\n",
|
|
|
|
"we can see that the lost electrons cover a wider spread in the x direction of the scifi tracker,\n",
|
|
|
|
"while most of those have low pT \n",
|
|
|
|
"\"\"\"\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"plt.show()"
|
|
|
|
]
|
2023-09-14 12:07:57 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-15 12:33:25 +02:00
|
|
|
"execution_count": 60,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"[[4.09e+04], [8.66e+03], [8.07e+04], ..., [5.63e+03], [6.29e+03], [2.26e+03]]\n",
|
|
|
|
"[4.62e+04, 9.36e+03, 1.34e+05, 5.63e+04, ..., 2.01e+04, 6.94e+03, 7.83e+03]\n",
|
|
|
|
"8657.132\n",
|
|
|
|
"9355.866625028413\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"energy_found = tracked[\"energy\"]\n",
|
|
|
|
"energy_found = energy_found[tracked[\"brem_photons_pe_length\"]!=0]\n",
|
|
|
|
"#ak.nan_to_num(energy_found)\n",
|
|
|
|
"\n",
|
|
|
|
"e_ph_found = tracked[\"brem_photons_pe\"]\n",
|
|
|
|
"e_ph_found = e_ph_found[tracked[\"brem_photons_pe_length\"]!=0]\n",
|
|
|
|
"#ak.nan_to_num(e_ph_found, nan=[0])\n",
|
|
|
|
"e_ph_found = ak.sum(e_ph_found, axis=-1, keepdims=True)\n",
|
|
|
|
"print(e_ph_found)\n",
|
|
|
|
"print(energy_found)\n",
|
|
|
|
"\n",
|
|
|
|
"energy_lost = lost[\"energy\"]\n",
|
|
|
|
"energy_lost = energy_lost[lost[\"brem_photons_pe_length\"]!=0]\n",
|
|
|
|
"#ak.nan_to_num(energy_lost)\n",
|
|
|
|
"\n",
|
|
|
|
"e_ph_lost = lost[\"brem_photons_pe\"]\n",
|
|
|
|
"e_ph_lost = e_ph_lost[lost[\"brem_photons_pe_length\"]!=0]\n",
|
|
|
|
"#ak.nan_to_num(e_ph_lost)\n",
|
|
|
|
"e_ph_lost = ak.sum(e_ph_lost, axis=-1,keepdims=True)\n",
|
|
|
|
"\n",
|
|
|
|
"#e_ph_found, energy_found = ak.broadcast_arrays(e_ph_found, energy_found)\n",
|
|
|
|
"#e_ph_lost, energy_lost = ak.broadcast_arrays(e_ph_lost, energy_lost)\n",
|
|
|
|
"\n",
|
|
|
|
"e_ph_found = ak.to_numpy(ak.flatten(e_ph_found))\n",
|
|
|
|
"energy_found = ak.to_numpy(energy_found)\n",
|
|
|
|
"\n",
|
|
|
|
"e_ph_lost = ak.to_numpy(ak.flatten(e_ph_lost))\n",
|
|
|
|
"energy_lost = ak.to_numpy(energy_lost)\n",
|
|
|
|
"\n",
|
|
|
|
"print(e_ph_found[1])\n",
|
|
|
|
"print(energy_found[1])"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 63,
|
2023-09-14 12:07:57 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
2023-09-15 12:33:25 +02:00
|
|
|
"source": [
|
|
|
|
"q_e_found = e_ph_found/energy_found\n",
|
|
|
|
"q_e_lost = e_ph_lost/energy_lost"
|
|
|
|
]
|
2023-09-14 12:07:57 +02:00
|
|
|
},
|
2023-09-14 16:33:27 +02:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-15 12:33:25 +02:00
|
|
|
"execution_count": 69,
|
2023-09-14 16:33:27 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
2023-09-15 12:33:25 +02:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAHJCAYAAACrCBICAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAygklEQVR4nO3deXgUVb7G8bezkIRAAgkEAkQWQZawOUYYFhEYQEEB77igIoKiXoQREJXFjURlIqBe1KsgXAQcRVxBRGRRCbKI7G6gIKCGEYxsSQAJJKn7h5MmIQmkO91dp9Pfz/P0Y3f16VO/OiL9eup0lcOyLEsAAAAGCrK7AAAAgNIQVAAAgLEIKgAAwFgEFQAAYCyCCgAAMBZBBQAAGIugAgAAjEVQAQAAxiKoAAAAYxFUABjlyJEjuvnmmxUXFyeHw6HrrrvO7pJK5XA4lJycbHcZQIUWYncBAFDYk08+qYULF+rVV1/VxRdfrJiYG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WZZt2LqY9q233tLrr7+u+fPna+vWrZo3b56eeeaZUq/bMGHCBGVmZjof6enpPq4YAAD4kq0/T05ISND48eM1YsQI57annnpKr7/+ur7//vsLfj4rK0vR0dHKzMxkRgUAAD/hyve3rTMqJ0+eLLbaNzg4mJ8nAwAASTavUenbt68mTZqkiy66SImJidq2bZuee+453XnnnR7dT15ens6cOePRPiGFhoYqODjY7jIAABWYrad+srOz9dhjj2nhwoXKyMhQnTp1dMstt+jxxx9XpUqVLvj5C00dWZalgwcP6tixY16oHpJUrVo11a5dm+vYAADKzJVTP359Cf0LHeiBAwd07NgxxcXFqXLlynyZepBlWTp58qQyMjJUrVo1xcfH210SAMBPuBJUbD314015eXnOkBIbG2t3ORVSRESEJCkjI0NxcXGcBgIAeJyti2m9qWBNSuXKlW2upGIrGF/WAAEAvKHCBpUCnO7xLsYXAOBNFT6oAAAA/0VQMVDXrl01evRou8sAAMB2FXYx7XmtT/bdvjr6cF/nSEtLU7du3XT06FFVq1bNtjoAAHAXMyoAAMBYBBXDHT16VLfffruqV6+uypUrq3fv3tq9e7fz/Z9//ll9+/ZV9erVFRkZqcTERC1dulQ//fSTunXrJkmqXr26HA6HhgwZYtNRAADgnsA89eNHhgwZot27d2vx4sWKiorSuHHj1KdPH+3YsUOhoaEaMWKETp8+rc8//1yRkZHasWOHqlSpooSEBL333nu6/vrr9cMPPygqKsp53RMAACQVXQph41KF8yGoGKwgoKxbt04dO3aUJL3xxhtKSEjQokWLdOONN+qXX37R9ddfr1atWkmSGjVq5Px8TEyMJCkuLo41KgAAv8SpH4Pt3LlTISEhat++vXNbbGysmjZtqp07d0qSRo4cqaeeekqdOnXSxIkT9fXXX9tVLgAAHkdQMVhpt2GyLMt5obW77rpLe/fu1aBBg/TNN98oKSlJL774oi/LBADAawgqBmvRooVyc3P15ZdfOrcdPnxYu3btUvPmzZ3bEhISNGzYML3//vt64IEHNGvWLEly3oE6Ly/Pt4UDAOAhBBWDNWnSRP3799fdd9+ttWvX6quvvtJtt92munXrqn///pKk0aNHa/ny5dq3b5+2bt2qzz77zBli6tevL4fDoSVLluj333/X8ePH7TwcAABcFpiLaQ1d2VySOXPmaNSoUbr22mt1+vRpdenSRUuXLlVoaKikP2dLRowYof379ysqKkpXX321/ud//keSVLduXaWkpGj8+PG64447dPvtt2vu3Lk2Hg0AAK5xWKUthPADWVlZio6OVmZmpqK
|
2023-09-14 16:33:27 +02:00
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 640x480 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
2023-09-15 12:33:25 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"plt.hist(q_e_lost, bins=150, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=\"lost\")\n",
|
|
|
|
"plt.hist(q_e_found, bins=150, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=\"found\")\n",
|
|
|
|
"plt.xlabel(r\"$E_\\gamma/E_0$\")\n",
|
|
|
|
"plt.ylabel(\"counts\")\n",
|
|
|
|
"plt.title('q_e_found')\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"\n",
|
|
|
|
"\"\"\"\n",
|
|
|
|
" we can clearly see that lost electrons are responsible for higher energy \n",
|
|
|
|
"\"\"\"\n",
|
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 30,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
2023-09-14 16:33:27 +02:00
|
|
|
{
|
|
|
|
"data": {
|
2023-09-15 12:33:25 +02:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABloAAAIlCAYAAAC99iV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AMyzzz5bY9xbt25tbr75ZvPWW2+Zv/3tb6aiosLcddddBoC5+eabzbx588xf/vIX07ZtW9OqVSvTq1evUB2/+tWvTFpaWo1+/vrXvzbJycnmu+++q7X/BQUF5umnnzYLFiwwCxYsMH/4wx9MSkqKGTt2bFi5q6++2jRq1Mj89re/NfPnzzePPfaYadOmjcnIyDDXX399qNznn39ubrnlFjNz5kzz7rvvmjlz5pgbb7zRNGrUyPzzn/8MqxOAue+++2qMx9FHH21uv/128/bbb5u//vWvJjMz05xzzjlh1yI5Odn07dvXzJ4927z77rtmxowZZsiQIaakpMTs3bvXzJs3zwAwN954Y2jOrVu3ThyHf/7znwaAadOmjfm///s/88Ybb5jp06ebY4891qSnp4fdl9dff71JTEw0HTt2NJMmTTILFy409957r4mLiwsbt7KyMtOlSxeTlpZmJk2aZObPn29+//vfm/j4eHPhhReGyi1dutSkpKSYCy+8MCSrff58/vnnpmnTpuaYY44xL7zwgpk7d665+uqrDQAzYcKEGvLn5+eba665xsydO9e89NJLpm3btua4444zFRUVtc6D1atXm4yMDNO5c2fzwgsvmPnz55vRo0ebRo0amTFjxkTVju8zxD4j27VrZ+68806zYMECM3v2bGOM/7y79NJ
|
2023-09-14 16:33:27 +02:00
|
|
|
"text/plain": [
|
2023-09-15 12:33:25 +02:00
|
|
|
"<Figure size 2000x600 with 4 Axes>"
|
2023-09-14 16:33:27 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2023-09-15 12:33:25 +02:00
|
|
|
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
|
|
|
|
"\n",
|
|
|
|
"ax0.hist2d(e_ph_found, energy_found, bins=200, cmap=plt.cm.jet, range=[[0,50000],[0,50000]])\n",
|
|
|
|
"ax0.set_xlabel(r\"$E_\\gamma$\")\n",
|
|
|
|
"ax0.set_ylabel(r\"$E_e$\")\n",
|
|
|
|
"ax0.set_title(\"found electron energy against photon energy\")\n",
|
|
|
|
"pcm0 = ax0.pcolormesh([e_ph_found, energy_found])\n",
|
|
|
|
"plt.colorbar(pcm0,ax=ax0)\n",
|
|
|
|
"\n",
|
|
|
|
"ax1.hist2d(e_ph_lost, energy_lost, bins=200, cmap=plt.cm.jet, range=[[0,50000],[0,50000]])\n",
|
|
|
|
"ax1.set_xlabel(r\"$E_\\gamma$\")\n",
|
|
|
|
"ax1.set_ylabel(r\"$E_e$\")\n",
|
|
|
|
"ax1.set_title(\"lost electron energy against photon energy\")\n",
|
|
|
|
"pcm1 = ax1.pcolormesh([e_ph_lost, energy_lost])\n",
|
|
|
|
"plt.colorbar(pcm1,ax=ax1)\n",
|
|
|
|
"\n",
|
|
|
|
"\"\"\"\n",
|
|
|
|
"we can see that the lost electrons cover a wider spread in the x direction of the scifi tracker,\n",
|
|
|
|
"while most of those have low pT \n",
|
|
|
|
"\"\"\"\n",
|
2023-09-14 16:33:27 +02:00
|
|
|
"plt.show()"
|
|
|
|
]
|
|
|
|
},
|
2023-09-14 12:07:57 +02:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
|
|
|
"display_name": "env1",
|
|
|
|
"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.11.5"
|
|
|
|
},
|
|
|
|
"orig_nbformat": 4
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 2
|
|
|
|
}
|