Projektpraktikum/wetest.ipynb

904 lines
746 KiB
Plaintext
Raw Normal View History

2023-09-12 17:16:29 +02:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
2023-09-12 17:16:29 +02:00
"metadata": {},
2023-09-13 12:00:45 +02:00
"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",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 15,
2023-09-13 12:00:45 +02:00
"metadata": {},
2023-09-13 16:54:49 +02:00
"outputs": [
{
"data": {
"text/plain": [
"'\\n#cut \\ntcut = ((tracked[\"eta\"]<5.0) & (tracked[\"eta\"]>1.9))\\nlcut = ((lost[\"eta\"]<5.0) & (lost[\"eta\"]>1.9))\\n\\ntracked = tracked[tcut]\\nlost = lost[lcut]\\n'"
]
},
"execution_count": 15,
2023-09-13 16:54:49 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
2023-09-12 17:16:29 +02:00
"source": [
"#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",
"\n",
2023-09-13 16:54:49 +02:00
"\n",
"\"\"\"\n",
2023-09-12 17:16:29 +02:00
"#file.keys()\n",
"#file.show()\n",
"vertices = file.arrays([\"all_endvtx_x\", \"all_endvtx_y\", \"all_endvtx_z\"])\n",
"vt_length = file.arrays([\"all_endvtx_x_length\", \"all_endvtx_y_length\", \"all_endvtx_z_length\"])\n",
"vert_len = vt_length[\"all_endvtx_x_length\"]\n",
"\n",
"vtx = vertices[\"all_endvtx_x\"]\n",
"vty = vertices[\"all_endvtx_y\"]\n",
"vtz = vertices[\"all_endvtx_z\"]\n",
"\n",
"isElectron = file[\"isElectron\"].array()\n",
"lost = file[\"lost_in_track_fit\"].array()\n",
"\n",
"fromPairProd = file[\"fromPairProd\"].array()\n",
"\n",
"#vt_length[\"all_endvtx_y_length\"]\n",
"#vertices\n",
"\n",
"#array[array.isElectron]\n",
2023-09-13 16:54:49 +02:00
"\"\"\"\n",
"\n",
2023-09-12 17:16:29 +02:00
"allcolumns = file.arrays()\n",
2023-09-13 16:54:49 +02:00
"tracked = allcolumns[(allcolumns.isElectron) & (~allcolumns.lost)] #D: 42422\n",
"lost = allcolumns[(allcolumns.isElectron) & (allcolumns.lost)] #D: 27072\n",
"\n",
"#n_cuts = []\n",
"#n_cuts.append(ak.num(allcolumns, axis=0))\n",
"\n",
"\"\"\"\n",
"#cut \n",
"tcut = ((tracked[\"eta\"]<5.0) & (tracked[\"eta\"]>1.9))\n",
"lcut = ((lost[\"eta\"]<5.0) & (lost[\"eta\"]>1.9))\n",
2023-09-12 17:16:29 +02:00
"\n",
2023-09-13 16:54:49 +02:00
"tracked = tracked[tcut]\n",
"lost = lost[lcut]\n",
"\"\"\"\n",
"\n",
"#n_cuts.append(ak.num(tracked, axis=0) + ak.num(lost, axis=0))\n",
2023-09-12 17:16:29 +02:00
"\n",
"#~ := logical not \n",
2023-09-13 16:54:49 +02:00
"#allc_isE= allcolumns[(~allcolumns.isElectron) & (bool 2)]\n",
2023-09-12 17:16:29 +02:00
"\n",
2023-09-13 16:54:49 +02:00
"#ak.num(lost, axis=0)"
2023-09-12 17:16:29 +02:00
]
},
{
"cell_type": "code",
"execution_count": 16,
2023-09-13 16:54:49 +02:00
"metadata": {},
"outputs": [],
"source": [
"#CutFlow\n",
"decay=\"D\""
2023-09-13 16:54:49 +02:00
]
},
{
"cell_type": "code",
"execution_count": 17,
2023-09-13 16:54:49 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAHHCAYAAABtF1i4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIH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+y7v+pfH1etQsmZ3tnXlfVNR3RW9d939LLlyfa92jstT8hy5c8yyuHJOrrZvV6/R1V7Trl27yl0nNDTUioyMrHA/rn5m3KnXlfdVSeV9/i+/zr179zqWff7555Yk6/XXX3d5/96KbppaoKioSF9++aVGjx6tHj16OP3s4sWLbveTXrhwQTt37tQ999yjJk2aOJb7+Pho3Lhx+uabb/T11187bXP33XdX/gWUUNa+CgsL9cwzz6hbt27y9fVVw4YN5evrq4MHD2r//v2Sfuij3759u+69916X+sWffvppTZw4UQsXLtSSJUvUoMGPb+dLly7p/fff11133aXGjRursLDQ8Rg+fLguXbqkzz77TBcuXNCuXbs0atQo+fn5ObZv2rSpRowY4dLrdeW1Xen//u//nJ737NlTly5dcnQveaKmK7n7frjhhhu0atUqLViwQJ999pm+//57t495mavXoSrbuvu+qUjJ925lPktXu76SZ8+xq8esjn1X5fq6w7KsCn/u6mfGnXpdfV+5+vm/7777FBIS4tQd9NJLL6lVq1alWtfqI8JILbB//35dvHhRP/nJT5yWnz9/XocPH1bv3r3d2t+ZM2dkWVaZI+7btm0rSaWagz01Or+8fSUmJurxxx/XnXfeqXfffVc7d+7Url271KtXL128eNFRd1FRkdq3b+/ScdasWaN27drppz/9aamf5eTkqLCwUC+99JIaNWrk9Bg+fLgkKTs7W2fOnFFxcbFat25dah9lLSuLK6/tSsHBwU7PL3c9XXkeqlrTldx9P6xfv14TJkzQq6++qri4OLVo0ULjx4/XiRMn3D62q9ehKtu6+76pSMlzVJnP0tWur+TZc+zqMSuron1X5fq66sKFC8rJyXGc77K4+plxp15X31eufv7tdrsefvhhrV27VmfPntWpU6f01ltvafLkyWV2P9c3jBmpBdLS0iRJ0dHRpZYXFxe73ZfYvHlzNWjQQJmZmaV+dnkwbMuWLZ2We/I+/LL2tWbNGo0fP17PPPOM0/Ls7Gw1a9ZMktSiRQv5+Pjom2++cek4W7Zs0ZgxYzRw4EC9//776tChg+NnzZs3d/zvderUqWVuHxERIT8/P9lstjL/CLj6h8GV1+aO5s2bV7mmkvtz5/3QsmVLLV68WIsXL1ZGRoY2bdqkWbNmKSsrS1u2bHH72K5ch6ps27hxY7feNxUp+d6tzGfJFZ48xyZV5fq66r333lNRUZHT4Pyy6nDlM+NOva7+PnLn8/+LX/xCCxcu1IoVK3Tp0iUVFhYqISGhwv3XF4SRWiAtLU1NmzZV586dnZbv2rVLDRo0UN++fd3aX0BAgGJjY7Vx40YtWrRI/v7+kqTi4mKtWbNG7du3r9JcJJX5X5fNZiuV/t977z0dP35c1157rSTJ399fgwYN0ttvv62nn376qr/kO3TooNTUVN16662OQHL5HDZu3FiDBw/W3r171bNnT/n6+pa7nxtuuEEbN27U888/72jiPXfunN59912PvTZ3BAQEVLmmkvur7PshPDxc06ZN0/vvv69PPvlEknvX353rUJVtXXnfVOZ9W92fJansc1xTqtqCUpXr64qMjAzNnDlTQUFBevjhh8tdz9XPjDv1uvr7yJ3Pf5s2bTR69GglJyeroKBAI0aMUHh4+FXPQ31AGKkF9uzZo759+5b6X9muXbvUtWtXp75qVyUlJWno0KEaPHiwZs6cKV9fXyUnJ+tf//qX1q1bV6WWkMv
2023-09-13 16:54:49 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"colors = ['blue', 'darkorange']\n",
"labels = [\"tracked\", \"lost\"]\n",
"#ak.num(ctracked, axis=0)\n",
"\n",
"plt.hist(ak.ravel(tracked[\"eta\"]), bins=100, density=True, alpha=0.4, label=\"tracked\")\n",
"plt.hist(ak.ravel(lost[\"eta\"]), bins =100, density=True, alpha=0.4, label=\"lost\")\n",
2023-09-13 16:54:49 +02:00
"plt.legend()\n",
"plt.xlabel(\"eta\")\n",
"plt.title(\"$\\eta$ for tracked and lost electrons in the \"+str(decay)+\" decay\")\n",
2023-09-13 16:54:49 +02:00
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 18,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-09-13 16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nEAjUbTMMg0KhUBXBbDZLLBajt7eXXC4HUCeCtWI4nWoxUzEfvoeJhEpRlAkDZUxLcH5iCt1VxnQStis35Gw/pU/kujQMozpxxmIxUqkUTqeTYDDIunXrqlbb+Y47F8zX7gWXGkEolz1zOBwEg8G6bbquUygUqlZgNpslEomQy+XI5/MIglAVvbHBMedLlL/UwT8zofaeqXC+XEGzp+DlwxS6Bc5kHbYNw5i0V9tc31iqqpJIJKripigKgUCApqYm1qxZg8PhmPExrxRRuth1yvnGdKrF1EaG1ibKV147UXrEbOUIzhXTEWFTBOcPptAtMKZK2K7cNOfrsD3bk7FhGORyOeLxOOl0mpdeeqlqHaxZswa/339R1qN5s18ccyW8tdVixqJpWp0IZrNZBgYGyGazFItFJEnCMAzOnDlTtfIrImixWC77d36x1qYpgpcWU+gWANNN2J7uhT8bQqdpWp3VViqVqjlcW7ZsuSCrbSrMNbqL41J/XkmSqtVixlKpFvPGG29U0x/i8TjZbJZSqYQsyxNagU6nE4vFcknGP5du1YsVQcMwiMfjBAIBZFk2RRBT6K5IZtKr7WLeY6b75/P5qrAlEgnsdjvBYJBVq1bh9/uJRqP09/fPusjNFQvJxXglUakWI8syLS0thEKh6jZVVetcobUdJBRFwWKxTCqCsxmZe7nWD6cjgoZhsH//fnbs2DHhfrWid7WIoCl0Vwhj3ZGV6vder3dGCdvTYboWnaZpJJPJqrgVi0X8fj/BYJCVK1eOW7eZq/WphXhjXkrmq6BPJCayLE+aKK8oSp0rNJPJVDtI1CbKTySCM02Un4+BMmPHI0lS9XNdbDu
2023-09-12 17:16:29 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#vtx[particle][index of vertex]\n",
"\n",
"vtx_x = ak.ravel(allcolumns.all_endvtx_x)\n",
"vtx_y = ak.ravel(allcolumns.all_endvtx_y)\n",
"vtx_z = ak.ravel(allcolumns.all_endvtx_z)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.add_subplot(projection='3d')\n",
"\n",
"ax.scatter(vtx_x, vtx_y, vtx_z, marker=\".\", s=1)\n",
"\n",
"ax.set_xlabel('X')\n",
"ax.set_ylabel('Y')\n",
"ax.set_zlabel('Z')\n",
"ax.view_init(15, 35)\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 19,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-09-13 16:54:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAakAAAGFCAYAAABHQgwWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9d3gd53nnjX9mzpzeCzpAAAR7pyiJoiirN1uyrMgljmLFzuuSfa24JPbuvu/6t1m/2XWqs8muneJ13BLbsZ3Esi25SbLVSRVSYu8kejs4vU///XF4DgEQYAVIQJrPdeEigTNn5jlzZp7v3PdzF8E0TRMLCwsLC4sFiHi1B2BhYWFhYTEblkhZWFhYWCxYLJGysLCwsFiwWCJlYWFhYbFgsUTKwsLCwmLBYomUhYWFhcWCxRIpCwsLC4sFiyVSFhYWFhYLFkukLCwsLCwWLJZIWVhYWFgsWCyRsrCwsLBYsFgiZWFhYWGxYLFEysLCwsJiwWKJlIWFhYXFgsUSKQsLCwuLBYslUhYWFhYWCxZLpCwsLCwsFiyWSFlYWFhYLFgskbKwsLCwWLBYImVhYWFhsWCxRMrCwsLCYsFiiZSFhYWFxYLFEikLCwsLiwWLJVIWFhYWFgsWS6QsLCwsLBYslkhZWFhYWCxYLJGysLCwsFiwWCJlYWFhYbFgsUTKwsLCwmLBYomUhYWFhcWCxRIpCwsLC4sFiyVSFhYWFhYLFkukLCwsLCwWLJZIWVhYWFgsWCyRsrCwsLBYsFgiZWFhYWGxYLFEysLCwsJiwWKJlIWFhYXFgsUSKQsLCwuLBY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023-09-12 17:16:29 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#create an array with all electron indices\n",
"electron = allcolumns[(allcolumns.isElectron)]\n",
"#electron.show()\n",
"#electron_ind = electron[electron.]\n",
"#electron_ind = electron_ind.to_numpy()\n",
"e_vtx_x = ak.ravel(electron.all_endvtx_x)\n",
"e_vtx_y = ak.ravel(electron.all_endvtx_y)\n",
"e_vtx_z = ak.ravel(electron.all_endvtx_z)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.add_subplot(projection='3d')\n",
"\n",
"ax.scatter(e_vtx_x, e_vtx_y, e_vtx_z, marker=\".\", s=1)\n",
"\n",
"ax.set_xlabel('X')\n",
"ax.set_ylabel('Y')\n",
"ax.set_zlabel('Z')\n",
"ax.view_init(15, 35)\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 20,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAADIkAAAZECAYAAADcmLFeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzde5jVZb03/vfAcBCNUUE5GCAeMhDTHNwK5CkVBE1TCdwWpgHFpvJAPioetgPVjzQz8oBoYmSaYilb68HDWEoaeAJ079LUCh2VQQQNPHKc3x/GPHsazsKsYfF6Xde6Ltf9/Xzv+7O+zB+u+5r33CU1NTU1AQAAAAAAAAAAAAAAYKvWpNANAAAAAAAAAAAAAAAA8PEJiQAAAAAAAAAAAAAAABQBIREAAAAAAAAAAAAAAIAiICQCAAAAAAAAAAAAAABQBIREAAAAAAAAAAAAAAAAioCQCAAAAAAAAAAAAAAAQBEQEgEAAAAAAAAAAAAAACgCQiIAAAAAAAAAAAAAAABFQEgEAAAAAAAAAAAAAACgCAiJAAAf28svv5ySkpLaV7NmzdKmTZscdNBBOffcc/PnP/95s8w/efLkzdMwAAAAwGYwb968VFRU5Jlnnil0KwAAAAAAAEmERACAzejb3/52Zs6cmenTp+cXv/hFvvjFL+bee+/N/vvvnx/+8IeFbg8AAABgs5o3b17GjBkjJAIAAAAAADQapYVuAADYMt5///20atWqQdfs3LlzDjnkkNr3AwYMyKhRo3LyySfn/PPPT48ePdK/f/8G7QkAAAAAAAAAAABgW+EkEQDYjF566aWcdtpp2XXXXdOiRYt069Yt1113XZ2aRx55JCUlJbn99ttz8cUXp2PHjmndunWOPvrovPDCC/XmfOihh3LUUUeldevWadWqVfr06ZPf/e53dWoqKipSUlKS2bNnZ+DAgdlpp52y5557JkmWLl2a73znO2nfvn1atWqVww47LLNmzcruu++eM844I0ny8ssvp7S0NOPGjau3/h/+8IeUlJTkV7/61SY9k+222y6TJk1Ks2bNNug0kXnz5mXQoEH5xCc+kbKysgwePDjz589fY+3TTz+dE044ITvvvHNatmyZz372s7nzzjvr1b3++uv5+te/nk6dOqV58+bp2LFjBg4cmDfeeCNJ8uGHH+Y73/lODjjggJSVlWXnnXdOr169cs8999SZ56ijjsqnP/3p1NTU1BmvqanJXnvtleOOO25DHwsAAACwFVjXXs8jjzySgw46KEly5plnpqSkJCUlJamoqEjy0b7Fqaeemt133z3bbbdddt999/z7v/97XnnllUJ9HAAAAIDNYvXvqcyZMycnn3xyWrdunbKysnzlK1/Jm2++Wej2AGCbJyQCAJvJc889l4MOOih/+tOf8qMf/Si//e1vc9xxx+Wss87KmDFj6tVfdNFFeeWVV3LTTTflxhtvzEsvvZQvfOELWblyZW3Nrbfemr59+6Z169b5+c9/njvvvDM777xz+vXrVy8okiQnn3xy9tprr/zqV7/KxIkTk3z0Swrjx4/PmWeemXvuuSennHJKTjrppPzjH/+ovW/33XfPCSeckIkTJ9ZZP0muvfbadOzYMSeddNImP5uOHTumvLw8M2bMyIoVK9Za98EHH+Too4/Ogw8+mHHjxuVXv/pV2rdvn8GDB9erffjhh9OnT5/84x//yMSJE3PPPffkgAMOyODBgzN58uTautdffz0HHXRQpk6dmlGjRuW+++7L+PHjU1ZWlrfffjvJR0Gat956K+edd17+67/+K7fffns+97nP5eSTT84tt9xSO9fZZ5+dF154od6zv++++/K3v/0t3/zmNzf5GQEAAACNy/r2eg488MD87Gc/S5JccsklmTlzZmbOnJlhw4Yl+eiPcuyzzz4ZP358HnjggVx++eWprq7OQQcdlIULFxbyowEAAABsFieddFL22muv/PrXv05FRUX+67/+K/369cvy5csL3RoAbNNKC90AABSLUaNG5ROf+EQee+yxtG7dOklyzDHHZOnSpfnBD36Qs846KzvttFNtfffu3XPrrbfWvm/atGkGDRqUp556Koccckjef//9nH322Tn++OMzderU2roBAwbkwAMPzEUXXZQnnniiTg9f/epX6wRSnnvuudx+++254IILak8JOeaYY9KuXbv8+7//e517zzrrrBx55JH5zW9+ky9+8YtJPjrVY+rUqbn00ktTWvrx/rehS5cuefzxx/PWW29l1113XWPNz3/+8zz//PO55557csIJJyRJ+vbtmw8++CA//elP69SOHDky++67b37/+9/X9tavX78sXLgwF110UU4//fQ0adIk//mf/5mFCxfm2WefTbdu3WrvHzRoUO1/l5WV1f5SR5KsXLkyRx11VN5+++2MHz8+p59+epLk+OOPzx577JFrr702Rx99dG39tddemz333DP9+/f/WM8IAAAAaDw2ZK+nR48eSZI999wzhxxySJ37Bw4cmIEDB9a+X7lyZY4//vi0a9cuv/zlL3PWWWc13IcBAAAA2AJOPvnkXHHFFUk++v2Odu3a5ctf/nLuvPPOfPnLXy5wdwCw7XKSCABsBh9++GF+97vf5aSTTkqrVq2yYsWK2teAAQPy4Ycf5vHHH69zz+oQxGqf+cxnkiSvvPJKkmTGjBl566238tWvfrXOfKtWrcqxxx6bp556Ku+9916dOU455ZQ676dPn56kbiAi+eiXFP419HHEEUdk//33z3XXXVc7NnHixJSUlOTrX//6xj6SempqatZb8/DDD+cTn/hEvWdz2mmn1Xn/17/+NX/5y19qNxT+9XlXV1fnhRdeSPLRKR9HHnlknYDImvzqV79Knz59ssMOO6S0tDTNmjXLpEmT8vzzz9fWNGnSJN/61rfy29/+NlVVVUmSv/3tb7n//vszcuTIlJSUrP9BAAAAAI3epuz1/Kt33303F1xwQfbaa6+UlpamtLQ0O+ywQ9577706+w0AAAAAW6t/DYIMGjQopaWlefjhhwvUEQCQCIkAwGaxaNGirFixItdcc02aNWtW5zVgwIAkycKFC+vc06ZNmzrvW7RokST54IMPkiRvvPFGko8CHf865+WXX56ampq89dZbdebo0KFDvb6SpF27dnXGS0tL662ffHSayO9+97u88MILWb58eX76059m4MCBad++/UY9jzV55ZVX0qJFi+y8885rrVm0aFG9XpPUW3/1sznvvPPqPZuRI0cm+X/P+80338wnP/nJdfZ29913Z9CgQdltt91y6623ZubMmXnqqafyta99LR9++GGd2q997WvZbrvtMnHixCTJddddl+222y5f+9rX1vMEAAAAgK3Fpuz1/KvTTjst1157bYYNG5YHHnggTz75ZJ566qnssssutfs/AAAAAFuzf/19jtW/j7L691UAgMIoXX8JALA+O+20U5o2bZohQ4bkm9/85hprunbtulFztm3bNklyzTXX5JBDDlljzb8GKv71JIvVQZA33ngju+22W+34ihUr1viF/LTTTssFF1yQ6667Loccckjmz5+/1s+zMV5//fXMmjUrhx9+eL0TTP613yeffLLe+Pz58+u8X/1sRo8enZNPPnmNc+2zzz5Jkl122SWvvfbaOvu79dZb07Vr10yZMqXOM1y6dGm92rKysnz1q1/NTTfdlPPOOy8/+9nPctppp2XHHXdc5xoAAADA1mND93rmzp27xmuLFy/Ob3/721x22WW58MILa8eXLl1a749+AAAAAGyt5s+fv8bfR1nTHy4FABqOkAgAbAatWrXKkUcemTlz5uQzn/lMmjdv/rHn7NOnT3bcccc899xz+da3vrVJcxx22GFJkilTpuTAAw+sHf/1r3+dFStW1Ktv2bJlvv71r+faa6/NjBkzcsABB6RPnz6b9gH+6YMPPsiwYcOyYsWKnH/++eusPfLII3PnnXfm3nvvzQknnFA7/stf/rJO3T777JO99947zz77bP6//+//W+ec/fv3zy9+8Yu88MILtcGRf1VSUpLmzZvXCYjMnz8/99xzzxrrzzrrrEyYMCE
2023-09-12 17:16:29 +02:00
"text/plain": [
"<Figure size 4000x2000 with 6 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ((ax0, ax1, ax2), (ax3, ax4, ax5)) = plt.subplots(nrows=2, ncols=3, figsize=(40,20))\n",
"\n",
"colors = ['blue', 'darkorange']\n",
"labels = [\"tracked\", \"lost\"]\n",
"\n",
"ax0.hist([ak.ravel(tracked[\"energy\"]),ak.ravel(lost[\"energy\"])], 1000, density=True,alpha=0.5, histtype=\"stepfilled\", color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax0.legend()\n",
"ax0.set_xlim(0,40000)\n",
"ax0.set_title('energy '+str(decay)+\" decay\")\n",
2023-09-12 17:16:29 +02:00
"\n",
"ax1.hist([ak.ravel(tracked[\"eta\"]), ak.ravel(lost[\"eta\"])], bins=100,alpha=0.5, histtype=\"stepfilled\", density=True, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax1.legend()\n",
"ax1.set_title('eta')\n",
"\n",
"ax2.hist([ak.ravel(tracked[\"p\"]),ak.ravel(lost[\"p\"])], 500, density=True, alpha=0.5, histtype=\"stepfilled\", color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax2.legend()\n",
"ax2.set_xlim(0,50000)\n",
"ax2.set_title('p')\n",
"\n",
"ax3.hist([ak.ravel(tracked[\"pt\"]),ak.ravel(lost[\"pt\"])], 500, density=True, alpha=0.5, histtype=\"stepfilled\", color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax3.legend()\n",
"ax3.set_xlim(0,3000)\n",
"ax3.set_title('pt')\n",
"\n",
"ax4.hist([ak.ravel(tracked[\"tx\"]),ak.ravel(lost[\"tx\"])], 100, density=True, alpha=0.5, histtype=\"stepfilled\", color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax4.legend()\n",
2023-09-13 12:00:45 +02:00
"ax4.set_title('tx')\n",
2023-09-12 17:16:29 +02:00
"\n",
"ax5.hist([ak.ravel(tracked[\"ty\"]),ak.ravel(lost[\"ty\"])], 100, density=True, alpha=0.5, histtype=\"stepfilled\", color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax5.legend()\n",
"ax5.set_title('ty')\n",
"\n",
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAADfYAAAlGCAYAAACh1GFpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzde5jWdZ0//ucww0HFA6KCGCioJZ6ymNKhZUVDWFDXNVhZc/EEbDS2iuS6ovZ1PCSrkt/REEhCiVSkX1jbgU3RhFUZNQSrVVJ3w0AdQtiUPHFyfn+Y822a4TAI9z06j8d13dfV/f683p/3631P87m83szrfpXU1dXVBQAAAAAAAAAAAAAAAAAoiDbFTgAAAAAAAAAAAAAAAAAAWhOFfQAAAAAAAAAAAAAAAABQQAr7AAAAAAAAAAAAAAAAAKCAFPYBAAAAAAAAAAAAAAAAQAEp7AMAAAAAAAAAAAAAAACAAlLYBwAAAAAAAAAAAAAAAAAFpLAPAAAAAAAAAAAAAAAAAApIYR8AAAAAAAAAAAAAAAAAFJDCPgAAAAAAAAAAAAAAAAAoIIV9AECLMH/+/JSUlGT+/PnFTiVJUlJSUv8qLS1Np06d8slPfjJf+tKX8vjjj++Q+1dVVX3wRAEAAACgCFraeR4AAAAAtBTOzgCAbaWwDwBgM4YNG5aampo8+uijuffee3P22Wfn8ccfT0VFRS666KJipwcAAAAAAAAAAAAAwIdUWbETAABoqbp06ZLjjjuu/v2gQYMyduzY/NM//VNuvfXWHHbYYfnyl79cxAwBAAAAAAAAAAAAAPgw0rEPAGi2H/7whykpKclDDz3U6NqUKVNSUlKSX/3qV/VjixYtyt/+7d9m7733TocOHfKpT30q3/ve97ZprR/96EepqKjIrrvumt133z0nnXRSampqtjpvzJgx6dChQ5566qn6sXfffTef//zn06VLl9TW1m7T+n+ptLQ0kyZNyj777JObbrppq/Fr167N6NGj07lz53Ts2DF/8zd/k+eff77J2BdeeCFf/OIXs99++6V9+/bp3bt3brvttkZxr732Wr761a+mV69ead++ffbbb78MGTIkv/nNb+pjrr766hx77LHZe++9s8cee+TTn/50pk+fnrq6uvqYkSNHZu+9985bb73VaI0TTzwxRxxxxLZ8JAAAAAC0cC39PO+NN97IXnvtlS996UuNrr344ospLS3dprM4AAAAAGiuln52liT9+/dPSUlJk68ZM2Zs814BgJZHYR8A0GynnHJK9ttvv9x5552Nrs2YMSOf/vSnc/TRRydJHn744Xzuc5/La6+9lqlTp+bf//3fc8wxx2T48OFbPVS45557ctppp2WPPfbIrFmzMn369PzhD39I//798+ijj25xbnV1dXr37p0zzjgjr732WpL3it3mz5+fu+66K/vvv/927T1JdtlllwwYMCDLli3LSy+9tNm4urq6/N3f/V2++93v5qtf/Wp+8IMf5LjjjsvgwYMbxT777LP5zGc+k//6r//KN77xjfzkJz/JySefnAsvvDBXX311fdwf//jH/NVf/VW+9a1v5bzzzsuPf/zjTJ06NR//+McbFCu++OKL+dKXvpTvfe97ue+++/KFL3wh//zP/5xrr722Puaiiy7KH/7wh9xzzz2Ncnn44YdzwQUXbPdnBAAAAEDL0dLP8zp27Jjzzz8/d999d15//fUG1yZPnpx27drl/PPPb/7GAQAAAGArWvrZWfLeGVlNTU2D14ABA1JaWppPfOIT2713AKD4Sur+vG0LAMA2+upXv5opU6aktrY2e+65Z5Jk6dKlOfzww/PNb34zX/nKV5IkvXv3zi677JInn3wyZWVl9fNPPfXUPPXUU3nppZfSpk2bzJ8/PyeccEIefvjh9O/fP++++266d++ezp075+mnn06bNu99H8Ebb7yRgw8+OIccckgee+yxLeb43//93+nTp09OPPHEfOUrX8nAgQNz+eWXNyhu25ySkpJccMEFmTRpUpPXL7vsstxwww154okn8tnPfrbJmJ/97GcZPHhwbrnlllx44YX149dff32uuOKKXHXVVamqqkqS/M3f/E2eeeaZPPPMM9ljjz3qY//5n/853/72t/PKK6+kU6dOufbaa/N//s//ybx58zJgwICt7iN5r1Phu+++mwkTJuSWW27Jq6++mpKSkiTvfZvT66+/niVLltTHV1ZW5u67787LL7+cjh07btMaAAAAALRsLf0877e//W0OPfTQfOMb38jYsWOTJO+8804+9rGP5W//9m9zxx137KRPBgAAAIDWrqWfnf2liRMn5l/+5V9y++23Z/To0TvwkwAACk3HPgBgu5x//vl5++23M3v27PqxO++8M+3bt88Xv/jFJO8V1v3mN7/JWWedlSTZuHFj/WvIkCGpra3Nc8891+T9n3vuubzyyisZMWJE/UFG8t63dw8dOjSPP/543nrrrS3meMghh2TatGn54Q9/mFNOOSX9+vWrL6T7oLbluxEefvjhJKnf//ve/3ze98477+Shhx7K6aefnl133bXR5/TOO+/k8ccfT5L8x3/8Rz7+8Y9vtajv5z//eQYMGJA999wzpaWladu2bf7P//k/WbNmTVatWlUfd9FFF+Xpp5+uPxhau3Ztvvvd7+acc85R1AcAAADwEdLSz/N69eqVU045JZMnT64/e7vnnnuyZs2a+j+cAgAAAICdoaWfnf25WbNm5dJLL82VV16pqA8APgIU9gEA2+WII47IZz7zmdx5551Jkk2bNuWuu+7Kaaedlr333jtJ8vvf/z5Jcskll6Rt27YNXpWVlUmS1atXN3n/NWvWJEn233//Rte6deuWd999N3/4wx+2mufJJ5+cLl265J133sm4ceNSWlra/M024Xe/+119LpuzZs2alJWVpXPnzg3Gu3bt2ihu48aN+eY3v9nocxoyZEiS//c5vfrqq/nYxz62xdyefPLJDBw4MEkybdq0PPbYY/nFL36RK664Ikny9ttv18eedtppOeigg3LbbbclSWbMmJE333wzF1xwwVY/AwAAAAA+PD4M53kXXXRRXnjhhcybNy9Jctttt6WioiKf/vSnt2PHAAAAALBtPgxnZ8l7XzR/7rnn5uyzz861117b/I0CAC1O2dZDAACadt5556WysjJLly7Nb3/729TW1ua8886rv77PPvskScaPH58vfOELTd7jE5/4RJPj7xfD1dbWNrr2yiuvpE2bNunUqdNWcxwzZkz++Mc/5ogjjsiFF16Yfv36bdO8LXn77bfz4IMP5uCDD95ikV3nzp2zcePGrFmzpkFx38qVKxvEderUKaWlpRkxYsRmC+p69uyZJNl3333z0ksvbTG/e++9N23bts1PfvKTdOjQoX78hz/8YaPYNm3a5IILLsjll1+eb3zjG5k8eXI+//nPb/bnAgAAAMCHV0s/zzvxxBNz5JFHZtKkSenYsWMWL16cu+66a5v2BgAAAAAfREs/O/vVr36Vv/u7v8vxxx+fadOmbdOeAICWT8c+AGC7nXnmmenQoUNmzJiRGTNm5IADDqjvFJe8d1Bx6KGH5pe//GXKy8ubfO2+++5N3vsTn/hEDjjggNxzzz2pq6urH3/zzTczZ86cVFRUZNddd91ift/+9rdz1113ZdKkSfnRj36U1157rcFhy/bYtGlTvvKVr2TNmjX513/91y3GnnDCCUmSu+++u8H4Pffc0+D9rrvumhNOOCFLlizJ0Ucf3eTn9P7hzuDBg/P888/n5z//+WbXLSkpSVlZWYPuhG+//Xa++93vNhk/atSotGvXLmeddVaee+65fOUrX9nivgAAAAD4cGrp53lJcuGFF+anP/1pxo8fny5duuTv//7vP/jGAQAAAGArWvLZ2fLlyzN48OD06tUrc+bMSdu2bXfcxgGAotKxDwDYbnvttVdOP/30zJgxI6+99louueSStGnT8HsDvvWtb2Xw4MEZNGhQzj333BxwwAH53//93yxdujSLFy/O//f//X9N3rtNmza58cYbc9ZZZ+WUU07Jl770paxbty433XRTXnv
2023-09-12 17:16:29 +02:00
"text/plain": [
"<Figure size 4500x3000 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ((ax0, ax1, ax2), (ax3, ax4, ax5), (ax6, ax7, ax8)) = plt.subplots(nrows=3, ncols=3, figsize=(45,30))\n",
"\n",
"colors = ['blue', 'darkorange']\n",
"labels = [\"tracked\", \"lost\"]\n",
"n_bins=75\n",
"\n",
"ax0.hist([ak.ravel(tracked[\"velo_hit_pos_x\"]),ak.ravel(lost[\"velo_hit_pos_x\"])], n_bins, density=True, alpha=0.5, histtype=\"stepfilled\", color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax0.legend()\n",
"ax0.set_title('velo x '+str(decay)+\" decay\")\n",
2023-09-12 17:16:29 +02:00
"\n",
"ax1.hist([ak.ravel(tracked[\"velo_hit_pos_y\"]),ak.ravel(lost[\"velo_hit_pos_y\"])], n_bins, density=True, histtype='stepfilled',alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax1.legend()\n",
"ax1.set_title('velo y')\n",
"\n",
"ax2.hist([ak.ravel(tracked[\"velo_hit_pos_z\"]),ak.ravel(lost[\"velo_hit_pos_z\"])], n_bins, density=True, histtype='stepfilled',alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax2.legend()\n",
"ax2.set_title('velo z')\n",
"\n",
"ax3.hist([ak.ravel(tracked[\"ut_hit_pos_x\"]),ak.ravel(lost[\"ut_hit_pos_x\"])], n_bins, density=True, histtype='stepfilled',alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax3.legend()\n",
"ax3.set_title('ut x')\n",
"\n",
"ax4.hist([ak.ravel(tracked[\"ut_hit_pos_y\"]),ak.ravel(lost[\"ut_hit_pos_y\"])], n_bins, density=True, histtype='stepfilled',alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax4.legend()\n",
"ax4.set_title('ut y')\n",
"\n",
"ax5.hist([ak.ravel(tracked[\"ut_hit_pos_z\"]),ak.ravel(lost[\"ut_hit_pos_z\"])], n_bins, density=True, histtype='stepfilled',alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax5.legend()\n",
"ax5.set_title('ut z')\n",
"\n",
"ax6.hist([ak.ravel(tracked[\"scifi_hit_pos_x\"]),ak.ravel(lost[\"scifi_hit_pos_x\"])], n_bins, density=True, histtype='stepfilled',alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax6.legend()\n",
"ax6.set_title('scifi x')\n",
"\n",
"ax7.hist([ak.ravel(tracked[\"scifi_hit_pos_y\"]),ak.ravel(lost[\"scifi_hit_pos_y\"])], n_bins, density=True, histtype='stepfilled',alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax7.legend()\n",
"ax7.set_title('scifi y')\n",
"\n",
"ax8.hist([ak.ravel(tracked[\"scifi_hit_pos_z\"]),ak.ravel(lost[\"scifi_hit_pos_z\"])], n_bins, density=True, histtype='stepfilled',alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax8.legend()\n",
"ax8.set_title('scifi z')\n",
"\n",
"\n",
"#fig.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 25,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAswAAAIlCAYAAADBmq5QAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABakUlEQVR4nO3deVyVZf7/8fdhO6wiirIoIpqmhEtCg1BuNZmaTppTTDWk0+Q3p0zRabKsfppjkdMy1det1abJUSvXEkucEjXJytxSx5zCrUDEBFxZr98ffrnxCNyKmaC8no/HedR1nc99neu+Dtn73N5cx2GMMQIAAABQLbe6ngAAAABQnxGYAQAAABsEZgAAAMAGgRkAAACwQWAGAAAAbBCYAQAAABsEZgAAAMAGgRkAAACwQWAGAAAAbBCYgQZm0qRJcjgcysvLq+upXBQOh0OjRo26YONt375dkyZN0u7duy/YmLiwevfuLYfDIYfDITc3NwUEBOiKK67Qbbfdpvfff1/l5eU/e/zevXtfmMkCuCQQmAGgFrZv364nn3ySwFzPtWnTRpmZmVq3bp0WL16sRx55RCdOnNBtt92m3r17q6CgoK6nCOAS4lHXEwBwaTlx4oR8fHzqehq4hJSVlam0tFROp/OivaaPj4+6d+/u0nfvvfdq9uzZuueee/Q///M/mj9//kWbD4BLG1eYgQZq3759uvXWW9WoUSMFBgbq97//vQ4ePOhS07p1aw0cOFALFy7U1VdfLW9vbz355JOSpJycHN13331q2bKlvLy8FBUVpSeffFKlpaXW8bt375bD4dCzzz6rqVOnqnXr1vLx8VHv3r317bffqqSkRI888ojCw8MVGBioIUOGKDc396xzHz58uPz9/bVt2zbdcMMN8vPzU7NmzTRq1CgdP3682mP++c9/qmPHjvL19VWXLl304YcfVqlZu3atbrjhBgUEBMjX11eJiYlatmyZ9fxbb72l2267TZLUp08f66/933rrLavmzTffVJcuXeTt7a0mTZpoyJAh2rFjR7Xz/+9//6sBAwbI399fERER+vOf/6yioiKX2pkzZ6pLly7y9/dXQECAOnTooAkTJpx1jYqLizVlyhR16NBBTqdTzZo10x/+8Ica3+OPPvpI3bp1k4+Pjzp06KA333yzypi1ec//9re/acqUKYqKipLT6dSnn34qSVqyZIk6d+4sp9OpNm3a6KWXXrJuE6pwww03qEOHDjLGuLy+MUZXXHGFbr755rOef03+8Ic/aMCAAXrvvfe0Z88e21pjjP72t78pMjJS3t7e6tatm5YvX15tbWFhoR566CFFRUXJy8tLLVq0UEpKio4dO+ZSV15erv/93/9V165d5ePjo8aNG6t79+5aunSpVTN//nz17dtXYWFh8vHxUceOHfXII4+4jPXPf/5TDodDmZmZVeYyefJkeXp66scff6zN0gCwYwA0KBMnTjSSTGRkpPnLX/5iPv74Y/PCCy8YPz8/c/XVV5vi4mKrNjIy0oSFhZk2bdqYN99803z66afmiy++MNnZ2SYiIsJERkaaV155xaxcudL89a9/NU6n0wwfPtw6Pisry3qtQYMGmQ8//NC88847JiQkxLRv394kJyebe+65xyxfvtzMmjXL+Pv7m0GDBp31HIYNG2a8vLxMq1atzFNPPWVWrFhhJk2aZDw8PMzAgQNdaiWZ1q1bm1/96lfm3XffNWlpaaZ3797Gw8PDfPfdd1bdqlWrjKenp4mNjTXz5883ixcvNn379jUOh8PMmzfPGGNMbm6uefrpp40kM336dJOZmWkyMzNNbm6uMcZYz91xxx1m2bJl5u233zZt2rQxgYGB5ttvv60y/44dO5rnnnvOrFy50vy///f/jMPhME8++aRVN3fuXCPJPPjgg2bFihVm5cqVZtasWWb06NG261NWVmb69etn/Pz8zJNPPmnS09PN66+/blq0aGGio6PN8ePHXd7jli1bmujoaPP222+bjz/+2Nx2221GksnIyLDqavuet2jRwvTp08e8//77ZsWKFSYrK8ssX77cuLm5md69e5tFixaZ9957z8THx5vWrVub0/93tGTJEiPJpKenu5zXsmXLjCSzbNky2/Pv1auXueqqq2p8ftasWUaS+ec//2k7TsV/K3/84x/N8uXLzauvvmpatGhhQkNDTa9evay6Y8eOma5du5rg4GDzwgsvmJUrV5qXXnrJBAYGmuuvv96Ul5dbtcnJycbhcJh7773XLFmyxCxfvtw89dRT5qWXXrJq/vrXv5q///3vZtmyZWbVqlVm1qxZJioqyvTp08eqKSoqMqGhoeauu+5ymXNJSYkJDw83t912m+25AagdAjPQwFSEgLFjx7r0z5kzx0gy77zzjtUXGRlp3N3dzc6dO11q77vvPuPv72/27Nnj0v/cc88ZSWbbtm3GmMrw1KVLF1NWVmbVvfjii0aS+c1vfuNyfEpKipFkCgoKbM9h2LBhRpJLyDDGmKeeespIMmvXrrX6JJmQkBBTWFho9eXk5Bg3NzeTmppq9XXv3t00b97cHDlyxOorLS01MTExpmXLllboee+994wk8+mnn7q89uHDh42Pj48ZMGCAS//evXuN0+k0d955Z5X5v/vuuy61AwYMMFdeeaXVHjVqlGncuLHtWlSnImgvWLDApf/LL780ksyMGTOsvsjISOPt7e3yXp44ccI0adLE3HfffVZfbd/ztm3bunz4MsaYa665xkRERJiioiKr78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VunLL7/UwoULJcnlPQkJCVFSUpJeeeUVlZWVacuWLVqzZs0F3UYRwCnskgE0UDk5OWrRooXVLi0t1aFDh6qEp+qu5gUHB6tz58566qmnqh3bLohcKNXNNycnR1L1AdBOUFCQ3NzclJ2dXeW5il+cCg4Oth2j4jVrGuNsx9fkD3/4g/7whz/o2LFjWr16tSZ
2023-09-12 17:16:29 +02:00
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(8,6))\n",
"plt.hist([ak.ravel(tracked[\"brem_photons_pe\"]), ak.ravel(lost[\"brem_photons_pe\"])], 5000, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"plt.xlim(0,8000)\n",
"plt.xlabel(\"$E_{ph}$\")\n",
"plt.title(\"brem photons energy \"+str(decay)+\" decay\")\n",
2023-09-12 17:16:29 +02:00
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 23,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAADHcAAAZECAYAAADSHQ10AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdfZyVdZ0//tdwO6CCigpSoIOagpQamEEhoomBEikkuxZqAiuRPwTabsabVcliTXJHQ2A1i8xC+oaaGa1iJWlO7iJopaa2YeMNhLAGasrt+f3RMus4A0LCXCPzfD4e5/HwfM77+lzv65zxoecNr7nKSqVSKQAAAAAAAAAAAAAAABSiRdENAAAAAAAAAAAAAAAANGfCHQAAAAAAAAAAAAAAAAUS7gAAAAAAAAAAAAAAACiQcAcAAAAAAAAAAAAAAECBhDsAAAAAAAAAAAAAAAAKJNwBAAAAAAAAAAAAAABQIOEOAAAAAAAAAAAAAACAAgl3AAAAAAAAAAAAAAAAFEi4AwAAAAAAAAAAAAAAoEDCHQA0mssvvzxlZWVZtWpV0a00irKyslxwwQU7bb/HH388l19+eZ555pmdtmdTVVZWVvto2bJl9tlnnxx11FE5//zz8+tf/3qn7H/55Ze//UYBAADgHcys5u1pTrMaAAAA2B2Zjbw9ZiMAsPMJdwDAO8Tjjz+eK664otl8KR45cmSqq6vzwAMP5NZbb83ZZ5+dX//61+nXr18uvPDCotsDAAAAmrnmNqsBAAAAeCOzEQDY+VoV3QAAbK/XXnst7dq1K7oNGknnzp3zwQ9+sPb5KaeckkmTJuWf/umfct111+WII47IZz7zmQI7BAAAgObNrAYAAABozsxGAICdzZ07AGh0zz77bM4444x06NAhHTt2zKc+9am8+OKLdWoOPvjgnHbaabnttttyzDHHpLy8PFdccUWSZMWKFTn//PPz7ne/O23atElFRUWuuOKKbNy4sfb4Z555JmVlZbn66qtz1VVX5eCDD067du1ywgkn5KmnnsqGDRvypS99KV27dk3Hjh1z+umnZ+XKlW/Z+7nnnps999wzjz32WE466aTsscce2X///XPBBRfkr3/9a4PHfPe7303Pnj3Tvn37HHXUUbnrrrvq1TzwwAM56aSTstdee6V9+/bp379/fvKTn9S+PmfOnHziE59IkgwaNChlZWUpKyvLnDlzamu+9a1v5aijjkp5eXn23XffnH766XniiSca7P8Pf/hDhg4dmj333DPdunXL5z73uaxbt+4tr3/L53L77bfnfe97X8rLy9OjR49cd911derGjx+f8vLyPPzww7VrmzdvzkknnZTOnTtn+fLlb3muhrRs2TIzZszIfvvtl6uvvvot69euXZtx48alU6dO2XPPPfPRj340Tz31VIO1Tz/9dM4666wccMABadu2bXr27Jnrr7++Xt1f/vKXfO5zn0uPHj3Stm3bHHDAARk6dGh+//vf19ZcccUVOe6447LvvvumQ4cOef/735+bbroppVKptmbMmDHZd999G/y5OfHEE3PkkUduz1sCAAAAb5tZze49q3nllVey99575/zzz693/DPPPJOWLVtu15wFAAAAdldmI7v3bCRJTjjhhNoe3/x4Y88AUDThDgAa3emnn55DDz00P/zhD3P55ZfnjjvuyCmnnJINGzbUqVuyZEk+//nPZ+LEifmP//iPjBgxIitWrMgHPvCB3H333fmXf/mX/PSnP82YMWMybdq0jBs3rt65rr/++vzqV7/K9ddfn29+85v5/e9/n2HDhmXMmDF58cUX861vfStf+9rXcu+992bs2LHb1f+GDRsydOjQnHTSSbnjjjtywQUX5N///d8zatSoerU/+clPMmPGjEydOjXz58+v/bL6xz/+sbZm0aJFOfHEE7NmzZrcdNNNmTt3bvbaa68MGzYs8+bNS5Kceuqp+epXv1p7TdXV1amurs6pp56aJJk2bVrGjBmTI488Mrfddluuvfba/OY3v0m/fv3y9NNP1+v/Yx/7WE466aT86Ec/ynnnnZd/+7d/y1VXXbVd1//II49k0qRJmTx5cm6//fb0798/F154YaZPn15bU1VVlZ49e+bMM8/MX/7ylyR/Czzcd999ueWWW3LggQdu17ka0q5du3zkIx/JsmXL8txzz221rlQq5eMf/3i++93v5nOf+1xuv/32fPCDH8yQIUPq1T7++OM59thj87vf/S5f//rXc9ddd+XUU0/NxIkTa4cxSfLyyy/nwx/+cP793/89n/70p/PjH/84s2fPznve8546gZVnnnkm559/fn7wgx/ktttuyxlnnJH/7//7//LlL3+5tubCCy/MSy+9lO9///v1evnFL36Rz372s3/3ewQAAAA7wqxm957V7LnnnjnvvPPyve99L2vWrKlz7MyZM9OmTZucd95523UuAAAA2B2Zjezes5HkbzOQLT1ueXzkIx9Jy5Ytc/jhh2/XeQCgUZQAoJFcdtllpSSlyZMn11n/3ve+V0pSuuWWW2rXDjrooFLLli1LTz75ZJ3a888/v7TnnnuW/vSnP9VZnz59eilJ6bHHHiuVSqXSsmXLSklKRx11VGnTpk21dVVVVaUkpY997GN1jp80aVIpSWnNmjXbvIZzzjmnlKR07bXX1ln/yle+UkpSeuCBB2rXkpQ6d+5cWrt2be3aihUrSi1atChNmzatdu2DH/xg6YADDii9/PLLtWsbN24s9e7du/Tud7+7tHnz5lKpVCr9v//3/0pJSr/4xS/qnPull14qtWvXrjR06NA66zU1NaW2bduWzjrrrHr9/+AHP6hTO3To0NLhhx++zWsvlf72uZSVlZUeeeSROusnn3xyqUOHDqVXX321du3pp58udejQofTxj3+8dO+995ZatGhRuuSSS97yHKXS3967z372s1t9/Ytf/GIpSemhhx7aas1Pf/rTbX5Wl112We3aKaecUnr3u99d7/O/4IILSuXl5aX/+Z//KZVKpdLUqVNLSUoLFy7crusolUqlTZs2lTZs2FCaOnVqqVOnTrWfZ6lUKg0cOLB09NFH16n/zGc+U+rQoUOdnwcAAADYFcxqms+s5r//+79LLVq0KP3bv/1bbc1rr71W6tSpU+nTn/70W54HAAAAdkdmI81nNvJmV199dSlJ6YYbbnjLcwBAY3LnDgAa3Sc/+ck6z88888y0atUqv/jFL+qsv+9978t73vOeOmt33XVXBg0alK5du2bjxo21jy13Y1i0aFGd+qFDh6ZFi//7z13Pnj2TpPY3Bbx5vaam5u+6hrPOOitJ6l3DoEGDstdee9U+79y5cw444ID86U9/SpK8+uqreeihhzJy5MjsueeetXUtW7bM6NGj89xzz+XJJ5/cZi/V1dV57bXXcu6559ZZ79atW0488cT87Gc/q7NeVlaWYcOG1Vl73/veV9vTWznyyCNz1FFH1Vk766yzsnbt2ixZsqR27dBDD82NN96YO+64I6eddloGDBiQyy+/fLvO8VZKpdJb1mz5LLb2WW3x+uuv52c/+1lOP/30tG/fvs7P1dChQ/P666/n17/+dZLkpz/9ad7znvfkIx/5yDbP/fOf/zwf+chH0rFjx7Rs2TKtW7fOv/zLv2T16tV1bpt64YUX5pFHHsmvfvWrJMnatWvz3e9+N+ecc06dnwcAAADYlcxqdv9ZTY8ePXLaaadl5syZtXOV73//+1m9enUuuOCC7ToPAAAA7K7MRnb/2cgbzZ07N1/4whdyySWXNHh3FQAoknAHAI2uS5cudZ63atUqnTp1yurVq+usH3jggfWO/fOf/5wf//jHad26dZ3HkUcemSRZtWpVnfp99923zvM2bdpsc/31119/y/639NvQNb35Gt5clyRt27bNa6+9liR56aWXUiqVGrzWrl27Nrjnm215fWt7vPn49u3bp7y8vF5P23PtSf3P741rbz7Xqaeems6dO+f111/PlClT0rJly+06x1vZ8gV+y3vUkNWrV2/zs3pj3caNG/ONb3yj3s/V0KFDk/zfz9WLL76Yd7/73dvs7T//8z8zePD
2023-09-12 17:16:29 +02:00
"text/plain": [
"<Figure size 4000x2000 with 6 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ((ax0, ax1, ax2), (ax3, ax4, ax5)) = plt.subplots(nrows=2, ncols=3, figsize=(40,20))\n",
"\n",
"colors = ['blue', 'darkorange']\n",
"labels = [\"tracked\", \"lost\"]\n",
"n_bins=200\n",
"\n",
"ax0.hist([ak.ravel(tracked[\"brem_photons_px\"]),ak.ravel(lost[\"brem_photons_px\"])], 500, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax0.legend()\n",
"ax0.set_xlim(-1500,1500)\n",
"ax0.set_title('brem photon px '+str(decay)+\" decay\")\n",
2023-09-12 17:16:29 +02:00
"\n",
"ax1.hist([ak.ravel(tracked[\"brem_photons_py\"]),ak.ravel(lost[\"brem_photons_py\"])], 1000, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax1.legend()\n",
"ax1.set_xlim(-500,500)\n",
"ax1.set_title('brem photon py')\n",
"\n",
"ax2.hist([ak.ravel(tracked[\"brem_photons_pz\"]),ak.ravel(lost[\"brem_photons_pz\"])], 1000, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax2.legend()\n",
"ax2.set_xlim(0,10000)\n",
"ax2.set_title('brem photon pz')\n",
"\n",
"ax3.hist([ak.ravel(tracked[\"brem_vtx_x\"]),ak.ravel(lost[\"brem_vtx_x\"])], n_bins, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax3.legend()\n",
"ax3.set_title('brem vtx x')\n",
"\n",
"ax4.hist([ak.ravel(tracked[\"brem_vtx_y\"]),ak.ravel(lost[\"brem_vtx_y\"])], n_bins, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax4.legend()\n",
"ax4.set_title('brem vtx y')\n",
"\n",
"ax5.hist([ak.ravel(tracked[\"brem_vtx_z\"]),ak.ravel(lost[\"brem_vtx_z\"])], n_bins, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"ax5.legend()\n",
"ax5.set_title('brem vtx z')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 24,
2023-09-12 17:16:29 +02:00
"metadata": {},
2023-09-13 12:00:45 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABlwAAAIOCAYAAADdg6DOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABxhklEQVR4nOzde1xVdb7/8feWy8YLkFcuBYhmI4ZTDfgjKIMsMZyaJqmY6md6FE8M3ZDjaSSnXzunkTLGw3G80IU0T6U0D7M6EyU40yZLbNSwcdQcp1AQYRgclSYNBNfvj8Y9bffmstnIBnk9H4/9qPVdn7W+n7UXyv762d/vMhmGYQgAAAAAAAAAAABdNsDTCQAAAAAAAAAAAPR1FFwAAAAAAAAAAADcRMEFAAAAAAAAAADATRRcAAAAAAAAAAAA3ETBBQAAAAAAAAAAwE0UXAAAAAAAAAAAANxEwQUAAAAAAAAAAMBNFFwAAAAAAAAAAADcRMEFAAAAAAAAAADATRRcAKCXsFqtMplMslqt3XK+o0ePymKxaPfu3d1yvq5Yu3atTCaTdu7c2aP9Hjp0SCaTyfby8fHR8OHDNWnSJM2fP1979+7tlvOvXbu2exIGAAAA0CcxjgMAfBcFFwC4SB09elRPPfWURz+oe9rDDz+s8vJylZWV6X/+53/04x//WO+8846uuuoqPffcc55ODwAAAADsMI4DgL7N29MJAAB6h1OnTmnQoEGeTqNbhYeH69prr7VtT58+XdnZ2ZoxY4Yee+wxRUdHKyUlxYMZAgAAAEDXXYzjOADoy5jhAgBd8NZbb8lkMul3v/udw77Vq1fLZDLpj3/8o61t586d+tGPfqRhw4bJz89P11xzjd54441O9fXOO+8oPj5egwYNkr+/v6ZOnary8vJ2j7FarZo0aZIk6d/+7d9sS2tZLBZJ0uzZszVkyBDt2bNHycnJ8vf310033SRJKi0t1e23367LLrtMfn5+uvzyy/XAAw+ooaHBoZ/PP/9c99xzj4KCgmQ2mxUeHq77779fTU1NbeZWW1urmJgYjRs3TgcPHnQaYxiGpk+fruHDh6uqqsrWfurUKV155ZWKiorS119/3e570JaBAweqsLBQPj4+nZrlcvToUd19993y9/dXYGCg0tLSVFdX5zS2s/e5pqZG//7v/66wsDD5+voqNDRUd955p/76179Kkr755hv9x3/8h66++moFBgZq2LBhio+P19tvv213nptuuknjx4+XYRh27YZh6PLLL9cPf/jDzr4tAAAAwEWPcdy3LtQ47tChQ/L29lZubq7Dvg8//FAmk0m/+c1v2n0PAKCvo+ACAF1w6623atSoUVqzZo3DvrVr1+oHP/iBvv/970uSPvjgA1133XU6ceKECgoK9Pbbb+vqq69WWlpah88Aef3113X77bcrICBA69evV2FhoY4fP66kpCR99NFHbR73gx/8wJbbz3/+c5WXl6u8vFzp6em2mObmZv3oRz/SlClT9Pbbb+upp56SJH3xxReKj4/X6tWrVVJSov/3//6fPvnkE11//fU6c+aM7fjPPvtMkyZN0vbt27V48WK99957ys3NVVNTk5qbm53m9ac//UlxcXEym80qLy/XuHHjnMaZTCb9z//8jwYNGqS7777b1m9mZqYqKyv1xhtvaPDgwe2+d+0JDQ1VTEyMtm3bppaWljbjTp8+rZtvvlklJSXKzc3Vb37zGwUHBystLc0htrP3uaamRpMmTdKmTZuUnZ2t9957T/n5+QoMDNTx48clSU1NTfr73/+uBQsW6K233tL69et1/fXXa8aMGVq3bp3tXI8++qgOHDjgMGB877339MUXX+jBBx/s8nsEAAAAXGwYx13Ycdzo0aP1ox/9SAUFBWptbbXbt2LFCoWGhuqOO+5o970DgD7PAAB0SXZ2tjFw4EDjxIkTtrZ9+/YZkoxf//rXtrbx48cb11xzjXHmzBm742+99VYjJCTEaG1tNQzDMD744ANDkvHBBx8YhmEYra2tRmhoqDFx4kRbjGEYxldffWWMGjXKSEhIaDe/HTt2GJKMNWvWOOybNWuWIcl4+eWX2z3H2bNnjTNnzhiHDx82JBlvv/22bd+UKVOMSy65xKivr2/z+DVr1hiSjB07dhilpaVGQECAceeddxqnT59ut99zPvroI8Pb29vIysoyXn75ZUOS8dJLL3V4XGVlpSHJeO6559qMSUtLMyQZf/3rX9uMWb16tcN1G4ZhzJs3z+G97ex9njNnjuHj42Ps27evw+s4p6WlxThz5owxd+5c45prrrG1t7a2GmPGjDFuv/12u/iUlBRj7NixxtmzZzvdBwAAANAfMI67sOO4c+/Hpk2bbG01NTWGt7e38dRTT3V4PAD0dcxwAYAumjNnjk6fPq2ioiJb25o1a2Q2m3XvvfdKkv7yl7/o888/13333SdJamlpsb2mT5+u2tpaHThwwOn5Dxw4oKNHj2rmzJkaMOBff10PGTJEqamp2r59u06dOuXWNaSmpjq01dfXKyMjQ2FhYfL29paPj48iIiIkSfv375f07dJeZWVluvvuuzVy5MgO+3nllVc0ffp0paen64033pCfn1+n8rvuuuv0y1/+Uvn5+frpT3+q//t//6/mzp3rwhW2zThvGS5nPvjgA/n7++tHP/qRXfu5+3uOK/f5vffe04033qioqKh2+/7Nb36j6667TkOGDLHdh8LCQts9kKQBAwbooYce0m9/+1vb0mtffPGF3n//fWVmZspkMnX8RgAAAAD9COO4CzuOS0pK0lVXXaWVK1fa2goKCmQymfTv//7vnb1EAOizKLgAQBddeeWVmjRpkm3Kd2trq1599VXdfvvtGjZsmCTZnsmxYMEC+fj42L0yMzMlyemaupJ07NgxSVJISIjDvtDQUJ09e9a2BFVXDBo0SAEBAXZtZ8+eVXJyst5880099thj+t3vfqc//OEP2r59u6Rvl9iSpOPHj6u1tVWXXXZZp/rasGGDBg4cqPT0dJeLAPfdd598fX3V1NSk//zP/3Tp2PYcPnxYZrPZdq+cOXbsmIKCghzag4OD7bZduc9/+9vfOnzf3nzzTd1999269NJL9eqrr6q8vFw7duzQnDlz9M0339jFzpkzRwMHDlRBQYEkaeXKlRo4cKDmzJnTwTsAAAAA9D+M4y78OO6RRx7R7373Ox04cEBnzpzRiy++qDvvvNNhHAUAFyNvTycAAH3Zv/3bvykzM1P79+/Xl19+qdraWv3bv/2bbf+IESMkSTk5OZoxY4bTc3zve99z2j58+HBJ3z6c8HxHjx7VgAEDNHTo0C7n7uwD85/+9Cd99tlnWrt2rWbNmmVr/8tf/mIXN2zYMHl5eenIkSOd6uu1117TE088ocTERJWUlOjqq6/u1HGtra267777NHToUJnNZs2dO1cff/yxfH19O3V8W2pqarRr1y4lJibK27vtX4XDhw/XH/7wB4f2uro6u21X7vPIkSM7fN9effVVRUZGqqioyO4+OXuIZWBgoGbNmqWXXnpJCxYs0Jo1a3TvvffqkksuabcPAAAAoL9iHHdhx3H33nuvfvazn2nlypW69tprVVdXx/MlAfQbzHABADfcc8898vPz09q1a7V27VpdeumlSk5Otu3/3ve+p3Hjxumzzz5TbGys05e/v7/Tc3/ve9/TpZdeqtdff91u+auvv/5aGzduVHx8vAYNGtRmbmazWdK/vs3UGec+vJ879pznn3/ebnvgwIFKTEzUb37zmza/2fVdw4YN05YtWxQVFaUbb7zR9k2rjjz55JPaunWrXnvtNRUVFemzzz5ze5bL6dOnlZ6erpaWFj322GPtxt5444366quv9M4779i1v/7663bbrtznlJQUffDBB20uQSB9ex98fX3tBlN1dXV6++23ncY/8sgjamho0J133qkTJ07ooYceave6AAAAgP6McdyFHcf5+fnp3//93/XKK69o2bJluvrqq3Xdddd18moAoG9jhgsAuOGSSy7RHXfcobVr1+rEiRNasGCB3Tq90rcfclNSUjRt2jTNnj1bl156qf7+979
2023-09-13 12:00:45 +02:00
"text/plain": [
2023-09-13 16:54:49 +02:00
"<Figure size 2000x600 with 2 Axes>"
2023-09-13 12:00:45 +02:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-09-13 16:54:49 +02:00
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
2023-09-13 12:00:45 +02:00
"\n",
"ax0.hist([ak.ravel(tracked[\"velo_track_x\"]), ak.ravel(lost[\"velo_track_x\"])], bins=150, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-13 12:00:45 +02:00
"ax0.legend()\n",
"ax0.set_title('velo track x '+str(decay)+\" decay\")\n",
2023-09-13 12:00:45 +02:00
"\n",
"ax1.hist([ak.ravel(tracked[\"velo_track_y\"]), ak.ravel(lost[\"velo_track_y\"])],bins=150, density=True, histtype=\"stepfilled\",alpha=0.5, color=colors, label=labels)\n",
2023-09-13 12:00:45 +02:00
"ax1.legend()\n",
"ax1.set_title('velo track y')\n",
"\n",
"plt.show()"
]
2023-09-12 17:16:29 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-09-13 16:54:49 +02:00
"execution_count": 37,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-09-13 16:54:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjUAAAGxCAYAAACa3EfLAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAwwUlEQVR4nO3df1RVZb7H8c+Rn2qKiiNIoYI5CWlp4BgYapl4NRtrNLmTkeaPFaMmyMxUqN0mJyMLHTIVBpejuTKlFpreucwoljKaZIlo3nC0e6UghSFMsUkTgX3/aDzXI4geRH48vF9r7eU6z/7uZz/7bMGP+6fNsixLAAAALVybph4AAABAQyDUAAAAIxBqAACAEQg1AADACIQaAABgBEINAAAwAqEGAAAYgVADAACMQKgBAABGINQAaLF27dolm82mXbt2NfVQADQDhBoAAGAEQg0AADACoQZAo3j//fdls9n0wQcf1JiXkpIim82mzz77zN62f/9+/fznP1eXLl3k6empgQMH6t13372udW3dulVhYWFq166dOnTooJEjRyonJ+eayw0fPlw2m63Wae3atde9rQCaBqEGQKMYO3asunXrpjVr1tSYt3btWt1zzz266667JEk7d+7UkCFDdObMGaWmpmrLli0aMGCAoqKirhku3nnnHY0bN04dO3bUhg0btHr1ap0+fVrDhw/Xnj176lx25cqVysnJcZgefPBBubi46I477qj3tgNoJBYANJL4+Hirbdu21pkzZ+xt+fn5liTrzTfftLf17dvXGjhwoHXx4kWH5ceOHWt1797dqqqqsizLsnbu3GlJsnbu3GlZlmVVVVVZfn5+Vv/+/e01lmVZ3333ndWtWzcrPDzcqfG+/vrrliQrLS3N2U0F0AQ4UgOg0UydOlXnz59Xenq6vW3NmjXy8PDQ448/Lkn6n//5H/3973/XpEmTJEmVlZX2acyYMSouLtbRo0dr7f/o0aM6efKkoqOj1abN//96u+WWWzR+/Hh9/PHHOnfu3HWNdcOGDXr22We1YMECzZgxo76bDKAREWoANJo777xTgwYNsp+Cqqqq0ttvv61x48apS5cukqR//OMfkqTf/OY3cnNzc5hmzpwpSSorK6u1/1OnTkmSunfvXmOen5+fqqurdfr06WuOc+fOnZoyZYqefPJJ/f73v3d+QwE0CdemHgCA1uWpp57SzJkzdeTIER0/flzFxcV66qmn7PO7du0qSUpISNAvfvGLWvu42vUt3t7ekqTi4uIa806ePKk2bdqoc+fOdY7vs88+0yOPPKJhw4Zp1apV17VNAJoHm2VZVlMPAkDrcebMGXXv3l1z5szR8ePHlZOTo8LCQofTRT/96U/Vp08f/dd//Vedfe3atUv333+/du7cqeHDh6u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ypUOy3zyyScaOHCgPD09FRoaqry8vJvzxVyB59QAJltik35tNfUoANygN954Q8eOHVO/fv20cOFCSdLnn38uSXr22WeVlJSkwMBAderUSV9//bXGjBmjl19+WZ6ennrrrbf08MMP6+jRo+rRo4ck6cknn1ROTo6WLVumu+++WwUFBSorK6ux3vLyco0dO1aenp764IMP1L59e61atUovvviili9froEDByovL08zZsxQ+/btNXnyZH3//fcaO3asHnjgAb399tsqKChQbGxso3xPhBoAAJo5Ly8vubu7q127dvL19ZUk/f3vf5ckLVy4UCNHjrTXent76+6777Z/fvnll7V582Zt3bpVs2fP1rFjx/Tuu+8qKytLDz74oCQpMDCwxjr/8Y9/KCoqSr1799aGDRvsry/4/e9/ryVLlugXv/iFJCkgIED5+fn64x//qMmTJ2v9+vWqqqrSn/70J7Vr10533nmnvv76a/3qV7+6OV/OZQg1gKFsNslKaupRALjZQkNDHT5///33eumll/TnP/9ZJ0+eVGVlpc6fP6/CwkJJ0sGDB+Xi4qJhw4bV2e+DDz6oQYMG6d1335WLi4sk6ZtvvlFRUZGmTZumGTNm2GsrKyvl5eUlSTpy5Ijuvvtuhyc2h4WFNci2XguhBgCAFqx9+/YOn3/7299q27ZtSkpK0u233662bdtqwoQJqqiokPTjKwmux0MPPaSMjAzl5+erf//+kn58d5YkrVq1SoMHD3aovxR8LKvpTnnX60LhlStXKiAgQJ6engoJCdHu3bvrrM/OzlZISIg8PT0VGBio1NRUh/mff/65xo8fr169eslmsyk5OblB1gsAgCnc3d1VVVV1zbrdu3drypQpevTRR9W/f3/5+vrqyy+/tM/v37+/qqurlZ2dXWc/r776qiZPnqwRI0YoPz9fkuTj46Nbb71Vx48f1+233+4wBQQESJKCg4N16NAhnT9/3t7Xxx9/XI8tdp7ToSY9PV1xcXGaP3++8vLyFBERodGjR9sPa12poKBAY8aMUUREhPLy8jRv3jzNmTNHGRkZ9ppz584pMDBQr776qv1c4Y2uFwAAk/Tq1Uv79u3Tl19+qbKyMvtRkyvdfvvt2rRpkw4ePKhDhw7p8ccfd6jt1auXJk+erKlTp+r9999XQUGBdu3apXfffbdGX0lJSZo0aZIeeOAB+zU8v/vd75SYmGi/ePnw4cNas2aNli5dKkl6/PHH1aZNG02bNk35+fnKzMxUUlIjnQu3nPSzn/3MiomJcWjr27ev9fzzz9da/+yzz1p9+/Z1aHv66aete++9t9b6nj17Wn/4wx9ueL21KS8vtyRZ5eXl170M0FJJlmUlOf0jDhjt/PnzVn5+vnX+/PmmHorTjh49at17771W27ZtLUnWmjVrLEnW6dOnHeoKCgqs+++/32rbtq3l7+9vLV++3Bo2bJgVGxtrrzl//rw1d+5cq3v37pa7u7t1++23W3/6058sy7KsnTt31uj3mWeesbp3724dPXrUsizLWr9+vTVgwADL3d3
2023-09-12 17:16:29 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-09-13 16:54:49 +02:00
"\"\"\"\n",
"#cut experimentation\n",
"\n",
"zcut = (ak.any(tracked[\"velo_hit_pos_z\"]<200, axis=-1) & ak.any(tracked[\"velo_hit_pos_z\"]>-200, axis=-1))\n",
"zlc = (ak.any(lost[\"velo_hit_pos_z\"]<200, axis=-1) & ak.any(lost[\"velo_hit_pos_z\"]>-200, axis=-1))\n",
"ztr = tracked[zcut]\n",
"zlo = lost[zlc]\n",
"\n",
2023-09-12 17:16:29 +02:00
"colors = ['blue', 'darkorange']\n",
"labels = [\"tracked\", \"lost\"]\n",
2023-09-13 16:54:49 +02:00
"n_bins=200\n",
2023-09-12 17:16:29 +02:00
"\n",
2023-09-13 16:54:49 +02:00
"plt.hist([ak.ravel(ztr[\"velo_hit_pos_z\"]),ak.ravel(zlo[\"velo_hit_pos_z\"])], bins=n_bins, density=True, histtype='bar', color=colors, label=labels)\n",
2023-09-12 17:16:29 +02:00
"plt.legend()\n",
2023-09-13 16:54:49 +02:00
"plt.title('velo z')\n",
"plt.show()\n",
"\"\"\""
2023-09-12 17:16:29 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-09-13 16:54:49 +02:00
"execution_count": 24,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2023-09-13 16:54:49 +02:00
"{'all_endvtx_types_length': 3,\n",
" 'all_endvtx_types': [101.0, 104.0, 0.0],\n",
" 'all_endvtx_x_length': 3,\n",
" 'all_endvtx_x': [14.989899635314941, 15.055899620056152, 1996.3660888671875],\n",
" 'all_endvtx_y_length': 3,\n",
" 'all_endvtx_y': [-30.541900634765625,\n",
" -30.669300079345703,\n",
" -396.27178955078125],\n",
" 'all_endvtx_z_length': 3,\n",
" 'all_endvtx_z': [935.5191040039062, 939.534423828125, 12658.6591796875],\n",
" 'brem_photons_pe_length': 1,\n",
" 'brem_photons_pe': [151.66514587402344],\n",
" 'brem_photons_px_length': 1,\n",
" 'brem_photons_px': [2.450000047683716],\n",
" 'brem_photons_py_length': 1,\n",
" 'brem_photons_py': [-4.78000020980835],\n",
" 'brem_photons_pz_length': 1,\n",
" 'brem_photons_pz': [151.57000732421875],\n",
" 'brem_vtx_x_length': 1,\n",
" 'brem_vtx_x': [14.989899635314941],\n",
" 'brem_vtx_y_length': 1,\n",
" 'brem_vtx_y': [-30.541900634765625],\n",
" 'brem_vtx_z_length': 1,\n",
" 'brem_vtx_z': [935.5191040039062],\n",
2023-09-12 17:16:29 +02:00
" 'endvtx_type': 0,\n",
" 'endvtx_x': nan,\n",
" 'endvtx_y': nan,\n",
" 'endvtx_z': nan,\n",
2023-09-13 16:54:49 +02:00
" 'energy': 5565.570363846007,\n",
" 'eta': 4.08326911379515,\n",
2023-09-12 17:16:29 +02:00
" 'event_count': 0,\n",
2023-09-13 16:54:49 +02:00
" 'fromB': False,\n",
2023-09-12 17:16:29 +02:00
" 'fromD': False,\n",
2023-09-13 16:54:49 +02:00
" 'fromDecay': False,\n",
2023-09-12 17:16:29 +02:00
" 'fromHadInt': False,\n",
" 'fromPV': False,\n",
2023-09-13 16:54:49 +02:00
" 'fromPairProd': True,\n",
" 'fromSignal': False,\n",
2023-09-12 17:16:29 +02:00
" 'fromStrange': False,\n",
" 'isElectron': True,\n",
" 'isKaon': False,\n",
" 'isMuon': False,\n",
" 'isPion': False,\n",
" 'isProton': False,\n",
" 'lost': False,\n",
" 'lost_in_track_fit': False,\n",
" 'match_fraction': 1.0,\n",
2023-09-13 16:54:49 +02:00
" 'mcp_idx': 2608,\n",
" 'mother_id': 22,\n",
" 'mother_key': 2607,\n",
" 'originvtx_type': 102,\n",
" 'originvtx_x': 6.2875000000000005,\n",
" 'originvtx_y': -13.276200000000001,\n",
" 'originvtx_z': 385.07070000000004,\n",
" 'p': 5565.570340387407,\n",
" 'phi': -1.129423972793533,\n",
2023-09-12 17:16:29 +02:00
" 'pid': -11,\n",
2023-09-13 16:54:49 +02:00
" 'pt': 187.531879156585,\n",
" 'px': 80.11,\n",
" 'py': -169.56,\n",
" 'pz': 5562.41,\n",
" 'scifi_hit_pos_x_length': 12,\n",
" 'scifi_hit_pos_x': [748.9720458984375,\n",
" 765.9661254882812,\n",
" 783.1256103515625,\n",
" 800.260009765625,\n",
" 918.012451171875,\n",
" 935.6343383789062,\n",
" 953.3908081054688,\n",
" 971.0899047851562,\n",
" 1092.497802734375,\n",
" 1110.47998046875,\n",
" 1128.590087890625,\n",
" 1146.6357421875],\n",
" 'scifi_hit_pos_y_length': 12,\n",
" 'scifi_hit_pos_y': [-243.1846160888672,\n",
" -245.28126525878906,\n",
" -247.38218688964844,\n",
" -249.4748992919922,\n",
" -263.50482177734375,\n",
" -265.5829772949219,\n",
" -267.6712341308594,\n",
" -269.77069091796875,\n",
" -284.1728210449219,\n",
" -286.2898864746094,\n",
" -288.4374694824219,\n",
" -290.5879821777344],\n",
" 'scifi_hit_pos_z_length': 12,\n",
" 'scifi_hit_pos_z': [7825.2236328125,\n",
" 7895.0166015625,\n",
" 7965.20947265625,\n",
" 8035.00244140625,\n",
" 8507.150390625,\n",
" 8576.943359375,\n",
" 8647.13671875,\n",
" 8716.9296875,\n",
" 9192.076171875,\n",
" 9261.869140625,\n",
" 9332.0615234375,\n",
" 9401.8544921875],\n",
" 'track_p': 5280.022074225443,\n",
" 'track_pt': 183.50043288509636,\n",
" 'tx': 0.014402030774430507,\n",
" 'ty': -0.030483189840374948,\n",
" 'ut_hit_pos_x_length': 5,\n",
" 'ut_hit_pos_x': [40.90873718261719,\n",
" 42.1309814453125,\n",
" 47.45195007324219,\n",
" 48.83097457885742,\n",
" 48.83406066894531],\n",
" 'ut_hit_pos_y_length': 5,\n",
" 'ut_hit_pos_y': [-73.33869934082031,\n",
" -75.0264892578125,\n",
" -81.90847778320312,\n",
" -83.59490203857422,\n",
" -83.59870147705078],\n",
" 'ut_hit_pos_z_length': 5,\n",
" 'ut_hit_pos_z': [2321.846435546875,\n",
" 2376.846435546875,\n",
" 2601.846435546875,\n",
" 2656.765380859375,\n",
" 2656.888916015625],\n",
" 'velo_hit_pos_x_length': 7,\n",
" 'velo_hit_pos_x': [6.313237190246582,\n",
" 6.5126190185546875,\n",
" 7.8375444412231445,\n",
" 9.391555786132812,\n",
" 10.16195011138916,\n",
" 10.950575828552246,\n",
" 11.7467041015625],\n",
" 'velo_hit_pos_y_length': 7,\n",
" 'velo_hit_pos_y': [-13.330745697021484,\n",
" -13.751118659973145,\n",
" -16.4586124420166,\n",
" -19.542583465576172,\n",
" -21.095014572143555,\n",
" -22.661531448364258,\n",
" -24.2331485748291],\n",
" 'velo_hit_pos_z_length': 7,\n",
" 'velo_hit_pos_z': [386.8590087890625,\n",
" 400.6409912109375,\n",
" 486.8590087890625,\n",
" 586.8590087890625,\n",
" 636.8590087890625,\n",
" 686.8590087890625,\n",
" 736.8590087890625],\n",
" 'velo_track_idx': 17,\n",
" 'velo_track_tx': 0.015615668147802353,\n",
" 'velo_track_ty': -0.03123132698237896,\n",
" 'velo_track_x': 12.28200912475586,\n",
" 'velo_track_y': -25.28349494934082,\n",
2023-09-12 17:16:29 +02:00
" 'velo_track_z': 770.0}"
]
},
2023-09-13 16:54:49 +02:00
"execution_count": 24,
2023-09-12 17:16:29 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tracked[1].tolist()"
]
},
{
"cell_type": "code",
2023-09-18 12:12:50 +02:00
"execution_count": 1,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
2023-09-18 12:12:50 +02:00
"ename": "NameError",
"evalue": "name 'lost' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m/work/cetin/Projektpraktikum/wetest.ipynb Cell 16\u001b[0m line \u001b[0;36m1\n\u001b[0;32m----> <a href='vscode-notebook-cell://ssh-remote%2Blhcba1.physi.uni-heidelberg.de/work/cetin/Projektpraktikum/wetest.ipynb#X21sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0'>1</a>\u001b[0m lost[\u001b[39m1\u001b[39m]\u001b[39m.\u001b[39mtolist()\n",
"\u001b[0;31mNameError\u001b[0m: name 'lost' is not defined"
]
2023-09-12 17:16:29 +02:00
}
],
"source": [
2023-09-18 12:12:50 +02:00
"lost[1].tolist()"
2023-09-12 17:16:29 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-09-13 16:54:49 +02:00
"execution_count": 26,
2023-09-12 17:16:29 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"name | typename | interpretation \n",
"---------------------+--------------------------+-------------------------------\n",
"all_endvtx_types_... | int32_t | AsDtype('>i4')\n",
"all_endvtx_types | float[] | AsJagged(AsDtype('>f4'))\n",
"all_endvtx_x_length | int32_t | AsDtype('>i4')\n",
"all_endvtx_x | float[] | AsJagged(AsDtype('>f4'))\n",
"all_endvtx_y_length | int32_t | AsDtype('>i4')\n",
"all_endvtx_y | float[] | AsJagged(AsDtype('>f4'))\n",
"all_endvtx_z_length | int32_t | AsDtype('>i4')\n",
"all_endvtx_z | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_photons_pe_l... | int32_t | AsDtype('>i4')\n",
"brem_photons_pe | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_photons_px_l... | int32_t | AsDtype('>i4')\n",
"brem_photons_px | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_photons_py_l... | int32_t | AsDtype('>i4')\n",
"brem_photons_py | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_photons_pz_l... | int32_t | AsDtype('>i4')\n",
"brem_photons_pz | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_vtx_x_length | int32_t | AsDtype('>i4')\n",
"brem_vtx_x | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_vtx_y_length | int32_t | AsDtype('>i4')\n",
"brem_vtx_y | float[] | AsJagged(AsDtype('>f4'))\n",
"brem_vtx_z_length | int32_t | AsDtype('>i4')\n",
"brem_vtx_z | float[] | AsJagged(AsDtype('>f4'))\n",
"endvtx_type | int32_t | AsDtype('>i4')\n",
"endvtx_x | double | AsDtype('>f8')\n",
"endvtx_y | double | AsDtype('>f8')\n",
"endvtx_z | double | AsDtype('>f8')\n",
"energy | double | AsDtype('>f8')\n",
"eta | double | AsDtype('>f8')\n",
"event_count | int32_t | AsDtype('>i4')\n",
"fromB | bool | AsDtype('bool')\n",
"fromD | bool | AsDtype('bool')\n",
"fromDecay | bool | AsDtype('bool')\n",
"fromHadInt | bool | AsDtype('bool')\n",
"fromPV | bool | AsDtype('bool')\n",
"fromPairProd | bool | AsDtype('bool')\n",
"fromSignal | bool | AsDtype('bool')\n",
"fromStrange | bool | AsDtype('bool')\n",
"isElectron | bool | AsDtype('bool')\n",
"isKaon | bool | AsDtype('bool')\n",
"isMuon | bool | AsDtype('bool')\n",
"isPion | bool | AsDtype('bool')\n",
"isProton | bool | AsDtype('bool')\n",
"lost | bool | AsDtype('bool')\n",
"lost_in_track_fit | bool | AsDtype('bool')\n",
"match_fraction | float | AsDtype('>f4')\n",
"mcp_idx | int32_t | AsDtype('>i4')\n",
"mother_id | int32_t | AsDtype('>i4')\n",
"mother_key | int32_t | AsDtype('>i4')\n",
"originvtx_type | int32_t | AsDtype('>i4')\n",
"originvtx_x | double | AsDtype('>f8')\n",
"originvtx_y | double | AsDtype('>f8')\n",
"originvtx_z | double | AsDtype('>f8')\n",
"p | double | AsDtype('>f8')\n",
"phi | double | AsDtype('>f8')\n",
"pid | int32_t | AsDtype('>i4')\n",
"pt | double | AsDtype('>f8')\n",
"px | double | AsDtype('>f8')\n",
"py | double | AsDtype('>f8')\n",
"pz | double | AsDtype('>f8')\n",
"scifi_hit_pos_x_l... | int32_t | AsDtype('>i4')\n",
"scifi_hit_pos_x | float[] | AsJagged(AsDtype('>f4'))\n",
"scifi_hit_pos_y_l... | int32_t | AsDtype('>i4')\n",
"scifi_hit_pos_y | float[] | AsJagged(AsDtype('>f4'))\n",
"scifi_hit_pos_z_l... | int32_t | AsDtype('>i4')\n",
"scifi_hit_pos_z | float[] | AsJagged(AsDtype('>f4'))\n",
"track_p | double | AsDtype('>f8')\n",
"track_pt | double | AsDtype('>f8')\n",
"tx | double | AsDtype('>f8')\n",
"ty | double | AsDtype('>f8')\n",
"ut_hit_pos_x_length | int32_t | AsDtype('>i4')\n",
"ut_hit_pos_x | float[] | AsJagged(AsDtype('>f4'))\n",
"ut_hit_pos_y_length | int32_t | AsDtype('>i4')\n",
"ut_hit_pos_y | float[] | AsJagged(AsDtype('>f4'))\n",
"ut_hit_pos_z_length | int32_t | AsDtype('>i4')\n",
"ut_hit_pos_z | float[] | AsJagged(AsDtype('>f4'))\n",
"velo_hit_pos_x_le... | int32_t | AsDtype('>i4')\n",
"velo_hit_pos_x | float[] | AsJagged(AsDtype('>f4'))\n",
"velo_hit_pos_y_le... | int32_t | AsDtype('>i4')\n",
"velo_hit_pos_y | float[] | AsJagged(AsDtype('>f4'))\n",
"velo_hit_pos_z_le... | int32_t | AsDtype('>i4')\n",
"velo_hit_pos_z | float[] | AsJagged(AsDtype('>f4'))\n",
"velo_track_idx | int32_t | AsDtype('>i4')\n",
"velo_track_tx | double | AsDtype('>f8')\n",
"velo_track_ty | double | AsDtype('>f8')\n",
"velo_track_x | double | AsDtype('>f8')\n",
"velo_track_y | double | AsDtype('>f8')\n",
"velo_track_z | double | AsDtype('>f8')\n"
]
}
],
"source": [
"file.show()"
]
},
{
"cell_type": "code",
2023-09-13 16:54:49 +02:00
"execution_count": 27,
2023-09-12 17:16:29 +02:00
"metadata": {},
2023-09-13 16:54:49 +02:00
"outputs": [
{
"data": {
"text/plain": [
"'\\nvar=\"energy\"\\n#plt.hist(tracked[var], bins=1000, label=\"tracked\",edgecolor=\"blue\", fill=False, density=True)\\n#plt.hist(lost[var], bins=1000, label=\"lost\",edgecolor=\"darkorange\", fill=False, density=True)\\nplt.hist([tracked[var], lost[var]],bins=1000,label=[\"tracked\", \"lost\"], density=True)\\nplt.title(var)\\nplt.xlim([0,40000])\\nplt.xlabel(var+\" [MeV]\")\\nplt.ylabel(\"scaled\")\\nplt.legend()\\nplt.show()\\n\\nvar=\"eta\"\\nplt.hist(tracked[var], bins=100, label=\"tracked\", edgecolor=\"blue\", fill=False, density=True)\\nplt.hist(lost[var], bins=100, label=\"lost\", edgecolor=\"orange\", fill=False, density=True)\\n#plt.hist([tracked[var], lost[var]],bins=150,label=[\"tracked\", \"lost\"], density=True)\\nplt.title(var)\\nplt.xlabel(var)\\nplt.ylabel(\"scaled\")\\nplt.legend()\\nplt.show()\\n\\nvar=\"p\"\\n#plt.hist(tracked[var], bins=100, label=\"tracked\")\\n#plt.hist(lost[var], bins=100, label=\"lost\")\\nplt.hist([tracked[var], lost[var]],bins=200,label=[\"tracked\", \"lost\"], density=True)\\nplt.title(var)\\nplt.xlabel(var+f\" [MeV/$c^2$]\")\\nplt.ylabel(\"scaled\")\\nplt.xlim([0,150000])\\nplt.legend()\\nplt.show()\\n\\nvar=\"pt\"\\n#plt.hist(tracked[var], bins=200, label=\"tracked\",density=True)\\n#plt.hist(lost[var], bins=200, label=\"lost\", density=True)\\nplt.hist([tracked[var], lost[var]],bins=200,label=[\"tracked\", \"lost\"], density=True)\\nplt.title(var)\\nplt.xlabel(f\"p transversal [MeV/$c^2$]\")\\nplt.ylabel(\"counts\")\\nplt.xlim([0,6000])\\nplt.legend()\\nplt.show()\\n\\nvar=\"tx\"\\n#plt.hist(tracked[var], bins=100, label=\"tracked\")\\n#plt.hist(lost[var], bins=100, label=\"lost\")\\nplt.hist([tracked[var], lost[var]],bins=100,label=[\"tracked\", \"lost\"], density=True)\\nplt.title(var)\\nplt.xlabel(f\"tx [MeV/$c^2$]\")\\nplt.ylabel(\"counts\")\\n#plt.xlim([0,6000])\\nplt.legend()\\nplt.show()\\n\\nvar=\"ty\"\\n#plt.hist(tracked[var], bins=100, label=\"tracked\")\\n#plt.hist(lost[var], bins=100, label=\"lost\")\\nplt.hist([tracked[var], lost[var]],bins=100,label=[\"tracked\", \"lost\"], density=True)\\nplt.title(var)\\nplt.xlabel(f\"ty [MeV/$c^2$]\")\\nplt.ylabel(\"counts\")\\n#plt.xlim([0,6000])\\nplt.legend()\\nplt.show()\\n'"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
2023-09-12 17:16:29 +02:00
"source": [
"\"\"\"\n",
"var=\"energy\"\n",
"#plt.hist(tracked[var], bins=1000, label=\"tracked\",edgecolor=\"blue\", fill=False, density=True)\n",
"#plt.hist(lost[var], bins=1000, label=\"lost\",edgecolor=\"darkorange\", fill=False, density=True)\n",
"plt.hist([tracked[var], lost[var]],bins=1000,label=[\"tracked\", \"lost\"], density=True)\n",
"plt.title(var)\n",
"plt.xlim([0,40000])\n",
"plt.xlabel(var+\" [MeV]\")\n",
"plt.ylabel(\"scaled\")\n",
"plt.legend()\n",
"plt.show()\n",
"\n",
"var=\"eta\"\n",
"plt.hist(tracked[var], bins=100, label=\"tracked\", edgecolor=\"blue\", fill=False, density=True)\n",
"plt.hist(lost[var], bins=100, label=\"lost\", edgecolor=\"orange\", fill=False, density=True)\n",
"#plt.hist([tracked[var], lost[var]],bins=150,label=[\"tracked\", \"lost\"], density=True)\n",
"plt.title(var)\n",
"plt.xlabel(var)\n",
"plt.ylabel(\"scaled\")\n",
"plt.legend()\n",
"plt.show()\n",
"\n",
"var=\"p\"\n",
"#plt.hist(tracked[var], bins=100, label=\"tracked\")\n",
"#plt.hist(lost[var], bins=100, label=\"lost\")\n",
"plt.hist([tracked[var], lost[var]],bins=200,label=[\"tracked\", \"lost\"], density=True)\n",
"plt.title(var)\n",
"plt.xlabel(var+f\" [MeV/$c^2$]\")\n",
"plt.ylabel(\"scaled\")\n",
"plt.xlim([0,150000])\n",
"plt.legend()\n",
"plt.show()\n",
"\n",
"var=\"pt\"\n",
"#plt.hist(tracked[var], bins=200, label=\"tracked\",density=True)\n",
"#plt.hist(lost[var], bins=200, label=\"lost\", density=True)\n",
"plt.hist([tracked[var], lost[var]],bins=200,label=[\"tracked\", \"lost\"], density=True)\n",
"plt.title(var)\n",
"plt.xlabel(f\"p transversal [MeV/$c^2$]\")\n",
"plt.ylabel(\"counts\")\n",
"plt.xlim([0,6000])\n",
"plt.legend()\n",
"plt.show()\n",
"\n",
"var=\"tx\"\n",
"#plt.hist(tracked[var], bins=100, label=\"tracked\")\n",
"#plt.hist(lost[var], bins=100, label=\"lost\")\n",
"plt.hist([tracked[var], lost[var]],bins=100,label=[\"tracked\", \"lost\"], density=True)\n",
"plt.title(var)\n",
"plt.xlabel(f\"tx [MeV/$c^2$]\")\n",
"plt.ylabel(\"counts\")\n",
"#plt.xlim([0,6000])\n",
"plt.legend()\n",
"plt.show()\n",
"\n",
"var=\"ty\"\n",
"#plt.hist(tracked[var], bins=100, label=\"tracked\")\n",
"#plt.hist(lost[var], bins=100, label=\"lost\")\n",
"plt.hist([tracked[var], lost[var]],bins=100,label=[\"tracked\", \"lost\"], density=True)\n",
"plt.title(var)\n",
"plt.xlabel(f\"ty [MeV/$c^2$]\")\n",
"plt.ylabel(\"counts\")\n",
"#plt.xlim([0,6000])\n",
"plt.legend()\n",
"plt.show()\n",
"\"\"\""
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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
}