Projektpraktikum/electron_lost_found.ipynb

956 lines
1.8 MiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"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",
"from scipy.optimize import curve_fit\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 2,
"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",
"\n",
2023-09-14 16:33:27 +02:00
"#look at particles only from Signal\n",
"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"
]
},
{
"cell_type": "code",
"execution_count": 3,
"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",
"execution_count": 4,
2023-09-14 16:33:27 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABj4AAAIhCAYAAAD+a8NgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzde3wU1cH/8e+SOyEJCZiEQAhouUkAEZWbFRDkIgERFZU2grXITxSKgPcqYAsUUMRCvdT6gHJvH4ECKgKiWAqoYFERRO2DApUYCiEIQkjC+f2Bu84kO8luskk2yef9eu0rs2fOnDkzOzuZs+fmMsYYAQAAAAAAAAAA1AB1qjoDAAAAAAAAAAAAgULFBwAAAAAAAAAAqDGo+AAAAAAAAAAAADUGFR8AAAAAAAAAAKDGoOIDAAAAAAAAAADUGFR8AAAAAAAAAACAGoOKDwAAAAAAAAAAUGNQ8QEAAAAAAAAAAGoMKj4AAAAAAAAAAECNUWsqPhYuXCiXy6Wvv/66QtJ/7rnntHDhwoCnO3LkSDVr1izg6bq98cYbmjJlSoWlXx25XC7bOdm7d6+mTJni9dqp6M+nPN599125XC69++67AUvT6Tp37+t///d/A7aviuR0bubNm6ef/exnCg8Pl8vl0okTJ3z+jIP5WqhKX3/9tVwuV6n3x5K+Z+VRUro9e/ZUenp6QPfXrFkzjRw5sszb//DDD5oyZUpAv7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WtXs27dOq/nfPPmzeb//b//Zxo0aGASEhLMjTfeaP7zn/+UeH7c+YuOjjZ79uwx1157ralbt65p2LChuffee83p06dtcc+cOWMefvhh06xZMxMWFmZSUlLMmDFjTE5Oji3e22+/bXr06GESEhJMZGSkSU1NNUOHDrWlJ8lMnjzZdgxFXwsWLHD8fHzNS1pamhk4cKB58803TceOHU1kZKRp1aqVefnll23xTp8+bSZOnGiaNWvmuU47depkli5dWuL5e+edd4wk88477xQ7p19++aUZMGCAiY6ONk2aNDETJkwwZ8+eLTG9kq5z976WLl1qHn30UdOoUSMTExNjevfubT7//PNiaW3cuNFce+21JiYmxkRFRZlu3bqZTZs2lbh/Y4wpLCw0v/vd70zLli1NZGSkiYuLM+3atTNz5861xdu3b5+57bbbTGJiogkPDzepqakmMzPTc4xFz02PHj2KHduIESM856y077NTPPd36NVXXzWtW7c2UVFRpn379mbt2rWlpufO46uvvmomTJhgUlJSjMvlMvv27TPG+H4OV69ebdq1a2fCw8NN8+bNzdy5c83kyZNN0dv//Pnzzc9//nNz0UUXmbp165r09HQzc+ZMc+7cOVu8Hj16mLZt25otW7aYrl27mqioKHPrrbcaY4z5z3/+Y2655RZTr149Exsba4YNG2a2b99u+854U9r3zBjf7tX+pus+lg8++MBcffXVJioqyjRv3tzMmDHDFBYW2tLKzc31fA/d3+vf/OY35tSpU7Z4aWlpnmvHmNI/R6sDBw54za87PffntmvXLnPTTTeZ+vXrm+TkZGOMMR9++KG59dZbTVpamomMjDRpaWnmtttuM19//bXXc+LLfbmk++W5c+fMRRddZH75y18WO46cnBwTGRlp7r//fr/PX0n/d5577jnTvn17Ex0dberVq2datWplHnnkEdv2R44cMXfffbdp3LixCQsLM82aNTNTpkwx+fn5xfJZlPuevHbtWnPZZZeZyMhI07p1a8/3dcGCBaZ169ambt265sorrzQffvhhsTT+/ve/my5dupioqChTr14906dPH7Nt2zZbHPfn+PHHH5ubb77ZxMbGmvj4eHP//feb/Px88/nnn5t+/fqZevXqmbS0NDNz5sxi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023-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",
"a0=ax0.hist2d(l_sci_x, l_pT, bins=200, cmap=plt.cm.jet, cmin=0)\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",
"plt.colorbar(a0[3],ax=ax0)\n",
2023-09-14 16:33:27 +02:00
"\n",
"a1=ax1.hist2d(f_sci_x, f_pT, bins=200, cmap=plt.cm.jet, cmin=0)\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",
"plt.colorbar(a1[3],ax=ax1)\n",
2023-09-14 16:33:27 +02:00
"\n",
2023-09-15 12:33:25 +02:00
"\"\"\"\n",
2023-09-18 12:12:50 +02:00
"B:\n",
2023-09-15 12:33:25 +02:00
"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",
2023-09-18 12:12:50 +02:00
"\n",
2023-09-15 12:33:25 +02:00
"\"\"\"\n",
2023-09-14 16:33:27 +02:00
"plt.show()"
]
},
{
"cell_type": "code",
2023-09-18 12:12:50 +02:00
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 5,
2023-09-15 12:33:25 +02:00
"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": 6,
"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 16:33:27 +02:00
{
"cell_type": "code",
"execution_count": 7,
2023-09-14 16:33:27 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-09-18 12:12:50 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAHMCAYAAAD7xYOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA13ElEQVR4nO3de3gU5d3/8c/mnBCygUhCgJRjAiRBVKI0QS1aEUFFW+sRMSqiVioglpNHsPoEaz2gj6BSBPpDhBYBqSIHlSAHEUiCiqAgoAQNBhCSQGqAZH5/WPZxSYDsZHdnNvt+Xdde7czO3POdudLuh/u+Z8ZhGIYhAAAAGwqxugAAAIBTIagAAADbIqgAAADbIqgAAADbIqgAAADbIqgAAADbIqgAAADbIqgAAADbIqgAAADbIqgAAADbIqgAAADbIqgAaLDFixfL4XCc8jNt2jSvHKe6ulqJiYl6/vnn/X5sANYIs7oAAIGvsLBQkvT2228rMTGx1vfp6eleOc5HH32kffv26fe//73fjw3AGgQVAA1WWFiouLg4XX311XI4HD47zrx585SVlaW2bdv6/dgArMHQD4AGKygoUPfu3X0aFAzD0IIFC3Tdddf5/dgArENQAdAgBw4c0O7du9WtWzcdP3681scwDK8cZ+3atSopKXELKv46NgDrEFQANMiJOSKTJ09WeHh4rc+WLVvO2IZhGIqLi9P+/ftPuc28efPUrVs3paamenzsffv26corr1STJk2Ulpam5cuXN+SUAfgRc1QANEhBQYEkaf78+UpJSan1fX0ms27fvl0tWrTQWWeddcpt5s+frzvvvNPUsYcOHaqWLVtq3759ev/993XDDTfo66+/VkJCwhlrA2AtggqABiksLFRUVJQGDBig0NDQU2736quv6l//+pfCw8P1ySefqFWrVvrnP/+p9PR0FRYW6pxzztE999yjuXPnqlWrVlq0aJE6deokSVq/fr12795da35KfY59+PBhLVy4UDt27FBMTIwGDBig7t276+23364VfADYD0M/ABqksLBQmZmZpw0pkrR582Zt2LBBI0aM0A8//KCePXvqkUcekSQVFRVp48aNuuOOO/Tjjz/qvPPO09SpU137vvXWW0pLS1NmZqbHx96+fbtiY2Pdely6deumL774wszpAvAzggoA08rKy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jPFQMAAH+y9DkqKSkpGjt2rIYOHepa9+STT2rWrFn68ssvz7h/eXm5nE6nysrK6FEBACBAePL7bWmPSmVlZa3ZvqGhodyeDAAAJFk8R+Xqq6/WU089pV/96lfKyMhQUVGRnnvuOd15551ePU51dbWOHTvm1TYhhYeHKzQ01OoyAACNmKVDPxUVFXr00Ue1YMEClZaWqlWrVrr55pv12GOPKSIi4oz7n6nryDAM7d27V4cOHfJB9ZCk+Ph4tWzZkufYAADqzZOhn4B+18+ZTrSkpESHDh1SYmKiYmJi+DH1IsMwVFlZqdLSUsXHxys5OdnqkgAAAcKToGLp0I8vVVdXu0JKQkKC1eU0StHR0ZKk0tJSJSYmMgwEAPC6RvtSwhNzUmJiYiyupHE7cX2ZAwQA8IVGG1ROYLjHt7i+AABfavRBBQAABC6Cig317t1bI0aMsLoMAAAs12gn057W2vH+O1aOH491kvz8fF1yySU6ePCg4uPjLasDAACz6FEBAAC2RVCxuYMHD+q2225Ts2bNFBMTo379+mn79u2u77/99ltdffXVatasmZo0aaKMjAwtXrxY33zzjS655BJJUrNmzeRwOHT77bdbdBYAAJgTnEM/AeT222/X9u3btWjRIsXFxWnMmDHq37+/tmzZovDwcA0dOlRHjx7VRx99pCZNmmjLli2KjY1VSkqK3nrrLV133XX66quvFBcX53ruCQAAkmpPhbBwusKpEFRs7ERAWbNmjXJyciRJb7zxhlJSUrRw4UJdf/312r17t6677jp169ZNktShQwfX/s2bN5ckJSYmMkcFABCQGPqxsa1btyosLEw9e/Z0rUtISFDnzp21detWSdKwYcP05JNPqlevXnr88cf12WefWVUuAABeR1CxsVO9hskwDNeD1u666y7t3LlTgwYN0ueff66srCy99NJL/iwTAACfIajYWHp6uo4fP65PPvnEte7AgQPatm2bunbt6lqXkpKie++9V/Pnz9eDDz6oqVOnSpLrDdTV1dX+LRwAAC8hqNhYamqqrrnmGg0ZMkSrV6/Wp59+qltvvVWtW7fWNddcI0kaMWKEli5dql27dqmwsFAffvihK8S0bdtWDodD77zzjvbt26fDhw9beToAAHgsOCfT2nBW86lMnz5dw4cP11VXXaWjR4/q4osv1uLFixUeHi7p596SoUOHas+ePYqLi9MVV1yh559/XpLUunVrTZgwQWPHjtUdd9yh2267TTNmzLDwbAAA8IzDONVEiABQXl4up9OpsrIyxcXFuX33008/adeuXWrfvr2ioqIsqrDx4zoDQACz6Pbk0/1+n4yhHwAAYFsEFQAAYFsEFQAAYFsEFQAAYFsEFQAAYFsEFQAAYFsEFQAAYFsEFQAAYFsEFQAAYFsEFRsyDEN33323mjdvLofDoU2bNllWS+/evTVixAjLjg8ACG5B+a6f8ePtfawlS5ZoxowZys/PV4cOHXTWWWd5vS4AAAJBUAYVu9uxY4eSk5OVk5NjdSkAgMbi5Pf6BAiGfmzm9ttv1/3336/du3fL4XCoXbt2qqqq0rBhw5SYmKioqChdeOGF2rBhg2ufGTNmKD4+3q2dhQsXyuFwuJbHjx+vc845R//v//0/tWvXTk6nUzfddJMqKipc2xw5ckS33XabYmNjlZycrGeffdbn5wsAwOkQVGxm0qRJeuKJJ9SmTRuVlJRow4YNGj16tN566y3NnDlThYWF6tSpk/r27asff/zRo7Z37NihhQsX6p133tE777y
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": [
2023-09-18 12:12:50 +02:00
"plt.hist(q_e_lost, bins=100, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=\"lost\")\n",
"plt.hist(q_e_found, bins=100, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=\"found\")\n",
2023-09-15 12:33:25 +02:00
"plt.xlabel(r\"$E_\\gamma/E_0$\")\n",
2023-09-18 12:12:50 +02:00
"plt.ylabel(\"counts (normed)\")\n",
"plt.title(r'$E_{ph}/E_0$')\n",
2023-09-15 12:33:25 +02:00
"plt.legend()\n",
"\n",
"\"\"\"\n",
2023-09-18 12:12:50 +02:00
"B:\n",
"we can clearly see that lost electrons are responsible for higher energy photons\n",
2023-09-15 12:33:25 +02:00
"\"\"\"\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 21,
2023-09-15 12:33:25 +02:00
"metadata": {},
"outputs": [
2023-09-14 16:33:27 +02:00
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABiUAAAImCAYAAAA8IInHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAC2mUlEQVR4nOzde3wU1f3/8feSQEhCEglCLspNDWABUdQiaE0QQfHSKl7BC6hVKkil6ldFWgkWg2KLWry19QIqCFoVr0VAJWrBX1HEC1aqFRErIVaQmxBIOL8/YDez7G52ZzO7O7v7ej4e+2B35uyZM7ObMJ+c8znHY4wxAgAAAAAAAAAAiLEWiW4AAAAAAAAAAABID3RKAAAAAAAAAACAuKBTAgAAAAAAAAAAxAWdEgAAAAAAAAAAIC7olAAAAAAAAAAAAHFBpwQAAAAAAAAAAIgLOiUAAAAAAAAAAEBc0CkBAAAAAAAAAADigk4JAAAAAAAAAAAQF3RKwFXmzZunnj17Kjs7Wx6PRytXrkx0k4KqrKyUx+NxrL6ZM2fK4/Hoq6++cqxOq08//VSVlZUxqx/JyePxqLKyMiZ1//jjj6qsrNSSJUscr3vUqFFq06aNo3VWVVVp/vz5jtYJAACQCLGOLR544AHNnDnT8XpHjRqlLl26OF6v16uvvhqze18kpyVLlsjj8cQkZpFiG4d36dJFZ5xxhmP1ffvtt6qsrHTt32AApB46JeAa3333nS655BIdeuihWrBggZYtW6Zu3bolulkp4dNPP9XkyZPplICfZcuW6Ze//GVM6v7xxx81efLkmN3gO41OCQAAgMjEqlMi1l599VVNnjw50c2Ai/Tt21fLli1T3759Y1J/MsXh3377rSZPnkynBIC4yUx0AwCvf//739q9e7cuvvhilZeXJ7o5ae3HH39UTk5OopuREDt27FDr1q0dzYRxq+OOOy7RTYBLpfPvAAAAAGOMdu7cqezs7EQ3JSHS5V4wPz+fmAghpcvPAZAoZErAFUaNGqUTTjhBknTBBRfI4/GooqLCt//FF19U//79lZOTo7y8PA0ePFjLli0LqCNYum+wqZY8Ho+uueYaPfHEEzr88MOVk5OjPn366OWXXw54/yuvvKIjjzxSWVlZ6tq1q/7whz/YOrfFixdr0KBBys/PV05Ojo4//ni9/vrrjr73s88+0/Dhw1VUVKSsrCx16tRJl156qerq6jRz5kydd955kqSBAwfK4/HI4/H4RjdVVFSoV69eeuuttzRgwADl5OTo8ssvlyR9/fXXuvjii9WhQwdlZWXp8MMP1x//+Eft2bPHd+yvvvpKHo9Hf/jDHzR9+nR17dpVbdq0Uf/+/fXuu+9GdJ41NTUaPXq0Dj74YLVq1Updu3bV5MmTVV9fH/Vx3nvvPf385z9XYWGhWrduraOOOkpPP/20XxlvavvChQt1+eWXq3379srJyVFdXZ2MMaqqqlLnzp3VunVrHXPMMVq0aJEqKip8381t27bpgAMO0OjRowOO/9VXXykjI0N33XVXk+c+efJk9evXT4WFhcrPz1ffvn31yCOPyBjjV66urk7XX3+9iouLlZOToxNPPFHvv/++unTpolGjRvnKfffddxozZox+8pOfqE2bNurQoYNOOukkvf322wHH3n/6Ju/1ePPNN3X11VfrwAMPVLt27TRs2DB9++23fu994403VFFRoXbt2ik7O1udOnXSOeecox9//FFfffWV2rdv7zs/73fO2s79eVOnn3zySV133XUqLi5Wdna2ysvL9cEHHwR9zxdffKHTTjtNbdq0UceOHXX99derrq7Or8zGjRs1ZswYHXTQQWrVqpUOOeQQTZw40a+cx+PR9u3bNWvWLF9brb9/PvnkE/3iF79Q27Zt1bp1ax155JGaNWtW0PY/9dRTmjhxokpLS5Wfn6+TTz5Zq1evDnneVp9//rlGjBjh9/N2//33N+s4kfwO8f6OXLFihc4991y1bdtWhx56qKTIvndfffWVMjMzNXXq1IDjv/XWW/J4PHrmmWciugYAACB2Hn30UfXp00etW7dWYWGhzj77bP3rX//yK/Pll1/qwgsvVGlpqbKyslRUVKRBgwb5Rk936dJFq1atUnV1te++KdyUS8YYPfDAAzryyCOVnZ2ttm3b6txzz9WXX34Zts123rtgwQINGjRIBQUFysnJ0eGHH+67Pxk1apTvvsrbbusUV9748KGHHtLhhx+urKws3/3eO++8o0GDBikvL085OTkaMGCAXnnlFb9j27mPDsVO/BLpcebNm6f+/fsrNzdXbdq00SmnnBJwb+2dGvXjjz/WkCFDlJeXp0GDBkmSfvjhB11xxRUqLCxUmzZtdPrpp+vLL7/0iyPefvtt3/3p/h5//HF5PB4tX7485HnbiV+++eYbnXvuucrLy9MBBxygiy66SMuXL/eLb73X8sILL1SXLl2UnZ2tLl26aPjw4Vq7dq1ffcGmb/Jej0hijQcffFB9+vRRmzZtlJeXpx49euiWW27xfVZNxeHBeO/LP/jgAw0bNkz5+fkqKCjQxRdfrO+++y7oexYsWKC+ffsqOztbPXr00KOPPhpQJlw8s2TJEh177LGSpMsuu8zXVmusGMnfZLztX7VqlYYPH66CggIVFRXp8ssv1+bNm0Oet5Wd+CWS40T6O6Spv4tE8r174okn5PF4Aq6JJN12221q2bJlxL8LgLRhABf44osvzP33328kmaqqKrNs2TKzatUqY4wxs2fPNpLMkCFDzPz58828efPM0UcfbVq1amXefvttXx0jR440nTt3Dqh70qRJZv+vuiTTpUsX89Of/tQ8/fTT5tVXXzUVFRUmMzPT/Oc///GVW7x4scnIyDAnnHCCee6558wzzzxjjj32WNOpU6eAOoN54oknjMfjMWeddZZ57rnnzEsvvWTOOOMMk5GRYRYvXuwr99hjjxlJZs2aNbbfu3LlStOmTRvTpUsX89BDD5nXX3/dPPnkk+b88883W7ZsMbW1taaqqspIMvfff79ZtmyZWbZsmamtrTXGGFNeXm4KCwtNx44dzYwZM8ybb75pqqurTW1trTnooINM+/btzUMPPWQWLFhgrrnmGiPJXH311b7jr1mzxnc9Tz31VDN//nwzf/5807t3b9O2bVvzww8/NHmN1q9fbzp27Gg6d+5s/vznP5vFixeb3//+9yYrK8uMGjUqquO88cYbplWrVuZnP/uZmTdvnlmwYIEZNWqUkWQee+yxgOt+0EEHmauuusr8/e9/N3/7299MfX29mTBhgpFkrrrqKrNgwQLz17/+1XTq1MmUlJSY8vJyXx2/+c1vTG5ubsB5/t///Z9p3bq1+d///tfk+Y8aNco88sgjZtGiRWbRokXm97//vcnOzjaTJ0/2Kzd8+HDTokULc/PNN5uFCxeae+65x3Ts2NEUFBSYkSNH+sp99tln5uqrrzZz5841S5YsMS+//LK54oorTIsWLcybb77pV6ckM2nSpIDrccghh5hx48aZ1157zTz88MOmbdu2ZuDAgX6fRevWrc3gwYPN/PnzzZIlS8zs2bPNJZdcYjZt2mR27txpFixYYCSZK664wved++KLL0JehzfffNNIMh07djS/+MUvzEsvvWSefPJJc9hhh5n8/Hy/n8uRI0eaVq1amcMPP9z84Q9/MIsXLza33nqr8Xg8ftdtx44d5ogjjjC5ubnmD3/4g1m4cKH53e9+ZzIzM81pp53mK7ds2TKTnZ1tTjvtNF9bvb9/PvvsM5OXl2cOPfRQ8/jjj5tXXnnFDB8+3Egyd955Z0D7u3TpYi666CLzyiuvmKeeesp06tTJlJWVmfr6+ia/B6tWrTIFBQWmd+/e5vHHHzcLFy40119/vWnRooWprKyM6jiR/g7x/o7s3Lmzuemmm8yiRYvM/PnzjTGRf+/OPvts06lTp4DzPO+880xpaanZvXt3k+cPAACcEyy28MYDw4cPN6+88op5/PHHzSGHHGIKCgrMv//9b1+57t27m8MOO8w88cQTprq62jz77LPm+uuv991HrlixwhxyyCHmqKOO8t03rVi
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",
"a0 = ax0.hist2d(e_ph_found/(1e3), energy_found/(1e3), density=False, bins=200, cmap=plt.cm.jet, range=[[0,200],[0,200]], cmin=1)\n",
"ax0.set_xlabel(r\"$E_\\gamma$ [GeV]\")\n",
"ax0.set_ylabel(r\"$E_e$ [GeV]\")\n",
2023-09-15 12:33:25 +02:00
"ax0.set_title(\"found electron energy against photon energy\")\n",
"plt.colorbar(a0[3],ax=ax0)\n",
2023-09-15 12:33:25 +02:00
"\n",
"a1 = ax1.hist2d(e_ph_lost/(1e3), energy_lost/(1e3), density=False, bins=200, cmap=plt.cm.jet, range=[[0,200],[0,200]], cmin=1)\n",
"ax1.set_xlabel(r\"$E_\\gamma$ [GeV]\")\n",
"ax1.set_ylabel(r\"$E_e$ [GeV]\")\n",
2023-09-15 12:33:25 +02:00
"ax1.set_title(\"lost electron energy against photon energy\")\n",
"plt.colorbar(a1[3],ax=ax1)\n",
2023-09-15 12:33:25 +02:00
"\n",
"\"\"\"\n",
2023-09-18 12:12:50 +02:00
"B:\n",
"concentrated at the E_ph/E_0~1 line especially at lower energies.\n",
"lost E_ph to E_0: fewer entries at lower q_e\n",
2023-09-15 12:33:25 +02:00
"\"\"\"\n",
2023-09-14 16:33:27 +02:00
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
2023-09-18 12:12:50 +02:00
"source": [
"brem_vtx_x_found = tracked[\"brem_vtx_x\"]\n",
"brem_vtx_x_found = brem_vtx_x_found[tracked[\"brem_vtx_x_length\"]!=0]\n",
"brem_vtx_x_found = ak.to_numpy(ak.flatten(brem_vtx_x_found))\n",
"\n",
"brem_vtx_z_found = tracked[\"brem_vtx_z\"]\n",
"brem_vtx_z_found = brem_vtx_z_found[tracked[\"brem_vtx_z_length\"]!=0]\n",
"#print(ak.to_numpy(brem_vtx_z_found))\n",
2023-09-18 12:12:50 +02:00
"brem_vtx_z_found = ak.to_numpy(ak.flatten(brem_vtx_z_found))\n",
"\n",
"brem_vtx_x_lost = lost[\"brem_vtx_x\"]\n",
"brem_vtx_x_lost = brem_vtx_x_lost[lost[\"brem_vtx_x_length\"]!=0]\n",
"brem_vtx_x_lost = ak.to_numpy(ak.flatten(brem_vtx_x_lost))\n",
"\n",
"brem_vtx_z_lost = lost[\"brem_vtx_z\"]\n",
"brem_vtx_z_lost = brem_vtx_z_lost[lost[\"brem_vtx_z_length\"]!=0]\n",
"brem_vtx_z_lost = ak.to_numpy(ak.flatten(brem_vtx_z_lost))\n",
"\n",
"#vtx_x_fit= ak.to_numpy(vtx_x_found)\n",
"#vtx_z_fit = ak.to_numpy(vtx_z_found)"
2023-09-18 12:12:50 +02:00
]
},
{
"cell_type": "code",
2023-09-19 09:58:54 +02:00
"execution_count": null,
2023-09-18 12:12:50 +02:00
"metadata": {},
"outputs": [],
"source": [
"\n"
]
2023-09-18 12:12:50 +02:00
},
{
"cell_type": "code",
"execution_count": 13,
2023-09-18 12:12:50 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABkAAAAIlCAYAAACNejRdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzde3xU5Z0/8M+QhBBoMpIgiZGotKJVAhaxRtBdsNykIrV0Gy2WglKli6JZoChlldDlInFFulBctZawIuKvr9VWeqGAVayLF4zSClqqlSIoIVbiBCTkxvn9MfPMzLlf5pyZcyaf9+uV12TOnDnnOWduz3Oe5/t9QpIkSSAiIiIiIiIiIiIiIsoiPTJdACIiIiIiIiIiIiIiIrexA4SIiIiIiIiIiIiIiLIOO0CIiIiIiIiIiIiIiCjrsAOEiIiIiIiIiIiIiIiyDjtAiIiIiIiIiIiIiIgo67ADhIiIiIiIiIiIiIiIsg47QIiIiIiIiIiIiIiIKOuwA4SIiIiIiIiIiIiIiLIOO0CIiIiI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VERdu7ciXHjxmHo0KF4/PHHkZ+fj3Xr1uG6667DU089hRtuuMHhUQLf+ta3cMMNN2DmzJl4++23sXDhQgDAz3/+8/g6zz//PL7xjW9gxIgR2Lx5M7q6ulBXV4ejR4/a2tc3v/lNVFdX4wc/+AH27duHe++9F++88w5ee+015OXlxdebMmUKbrzxRvzgBz/A559/DgB45513MHLkSJxzzjl48MEHUVZWht///ve488478Y9//AOLFy+W7au6uhrf/e53MWvWLGzfvh11dXXo6OjAjh07MHv2bMyfPx+bNm3C3XffjfPPPx9TpkzRLfekSZPQv39/rF+/HmPGjJE9Vl9fj0svvRRDhw51VE7lsQ4fPhzHjh3DmjVr8Mwzz8RDuy+++GLNPLd/+tOfcNVVV6Ffv3748Y9/jEGDBuHIkSN47rnn0N7ejvz8fMtlmjZtGt58800sW7YMF1xwAT777DO8+eab+PTTTy2+wkREREREcploV2mx2qYyqxN///vf162vm0lnewhwr03kl/aQFjfbQwDbREQUUBIRkU1btmyRAEh1dXWy5X/9618lANLGjRtVz7nmmmukPn36aP4tW7bM8r5feOEFCYD0i1/8Ir7siiuukPr37y8dP348vqyzs1OqrKyUBgwYIJ0+fTq+fPr06dK5556r2u7ixYul5K9EcV95jLNnz5Z69eol22ZVVZVUXl4utba2xpe1tLRIxcXFkpWvWbGvf/u3f5Mtf/LJJ2XnU6x33333qbYxYcIEacCAAVIkEpEtv+OOO6RevXpJx44dk23jwQcflK33la98RQIgPfPMM/FlHR0d0plnnilNmTLF9Bjmzp0rFRQUSJ999ll82TvvvCMBkNasWeO4nFrH+sADD0gApAMHDsiWr1+/XrX8a1/7mnTGGWdITU1NumW3WqYvfOELUk1NjfGJICIiIiKyKJPtKmXd2WqbykqdWK++ried7aHk7bjZJvJDe0iS1K+rm+0hSWKbiIiCiSmwiMi2++67D1/60pdw1113obOzM/43cOBAFBQU4IMPPlA953e/+x1OnDih+fejH/3IcVk+//xzvPbaa/iXf/kX2eionJwcTJs2DYcPH8b+/fsdb3/y5Mmy+0OHDsW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UPXv2tH0cbvjOd76DuXPnor6+Hh988AHOPvtsjB8/3vVyKqNw9BQUFGDUqFH4xS9+gWXLlsk6wlIt0znnnIM77rgDzz//PP7v//7P/kEQERERUbfmp3aV3TaVoFcntlpfV2J7yBo/tIcAtomIKDjYAUJEtnzpS1/C1VdfjX//93/HiRMnUFVVBUmScOTIEbzwwgu
2023-09-18 12:12:50 +02:00
"text/plain": [
"<Figure size 2000x600 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
"a0 = ax0.hist2d(brem_vtx_z_found, brem_vtx_x_found, density=False, bins=300, cmap=plt.cm.jet, cmin=1)\n",
2023-09-19 09:58:54 +02:00
"ax0.set_xlabel(\"z [mm]\")\n",
"ax0.set_ylabel(\"x [mm]\")\n",
2023-09-18 12:12:50 +02:00
"ax0.set_title(r\"$e^\\pm$ found brem vertices\")\n",
"\n",
"plt.colorbar(a0[3],ax=ax0)\n",
"\n",
"a1 = ax1.hist2d(brem_vtx_z_lost, brem_vtx_x_lost, density=False, bins=300, cmap=plt.cm.jet, cmin=1)\n",
2023-09-19 09:58:54 +02:00
"ax1.set_xlabel(\"z [mm]\")\n",
"ax1.set_ylabel(\"x [mm]\")\n",
2023-09-18 12:12:50 +02:00
"ax1.set_title(r\"$e^\\pm$ lost brem vertices\")\n",
"#ax1.set(xlim=(0,4000), ylim=(-1000,1000))\n",
2023-09-18 12:12:50 +02:00
"\n",
"plt.colorbar(a1[3], ax=ax1)\n",
"\n",
"\"\"\"\n",
"z: VeLo - RICH1 - TT - Magnet - T1,T2,T3 - RICH2 - M1\n",
2023-09-18 12:12:50 +02:00
"B:\n",
"vertices of lost e photons are more densely concentrated around the beampipe, especially in the z range of the magnet\n",
"found: vertices are densely located @ or around the detectors, while there are no clusters in the z range of the magnet\n",
2023-09-18 12:12:50 +02:00
"\"\"\"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"#plot singular tracks by fitting brem vertices\n",
"vtx_z_found = tracked[\"brem_vtx_z\"]\n",
"vtx_z_found = vtx_z_found[tracked[\"brem_vtx_z_length\"]>3]\n",
"\n",
"vtx_x_found = tracked[\"brem_vtx_x\"]\n",
"vtx_x_found = vtx_x_found[tracked[\"brem_vtx_x_length\"]>3]\n",
"\n",
"vtx_z_lost = lost[\"brem_vtx_z\"]\n",
"vtx_z_lost = vtx_z_lost[lost[\"brem_vtx_z_length\"]>3]\n",
"\n",
"vtx_x_lost = lost[\"brem_vtx_x\"]\n",
"vtx_x_lost = vtx_x_lost[lost[\"brem_vtx_x_length\"]>3]\n",
"\n",
"def cubic_fit(x, a, b, c, d):\n",
" return (a + b*x + c*x**2 + d*x**3)\n",
"\n",
"def quint_fit(x, a, b, c, d, e, f):\n",
" return (a + b*x + c*x**2 + d*x**3 + e*x**4 + f*x**5)\n"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/work/cetin/software/miniconda3/envs/env1/lib/python3.11/site-packages/scipy/optimize/_minpack_py.py:1010: OptimizeWarning: Covariance of the parameters could not be estimated\n",
" warnings.warn('Covariance of the parameters could not be estimated',\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABoQAAAIhCAYAAABnv9iQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3RURfsH8O/uZkt2k2x6773Te++9qKgUqb6ir11QpIiAdFBEUbC8ooAUAQHpNVTp0iGVFNJ7stlNts/vD35ZWVIIkGRTns85niP3zs597r2bZOY+d2Y4jDEGQgghhBBCCCGEEEIIIYQQ0mRxTR0AIYQQQgghhBBCCCGEEEIIqVuUECKEEEII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+Li4irr9fLyYm5ubszT05OtX7+eHTx4kI0bN44BYCtXrjSUO3nypOE6jho1iu3du5ft37+f5efns02bNjEOh8NGjhzJdu3axfbt28eGDh3KeDweO378uKGO8u9HUFAQW7hwITt27BibMWMGA8DeffddFhwczL799lt27NgxNnnyZAaA/fnnn9Vel2+++YYBYHFxcUbbDx48yACwvXv3MsYY0+l0bODAgUwikbAFCxawY8eOsf/973/Mzc2NhYaGstLSUqNr4uLiwnx9fdn69evZyZMn2eXLl9mFCxeYubk5Gzx4sOHalv/slF+fkydPGuo5fPgw4/P5LDIykv32228sKiqKrV+/no0ePdpQ5u7du0wqlbKIiAi2ceNGdvToUTZ9+nTG5XLZ/PnzDeWWLl3KeDwemzdvHjtx4gQ7fPgwW71
"text/plain": [
"<Figure size 2000x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"n_end=100\n",
"\n",
"for i in range(0,n_end):\n",
" popt, pcov = curve_fit(cubic_fit,ak.to_numpy(vtx_z_found[i,:]),ak.to_numpy(vtx_x_found[i,:]))\n",
" z_coord = np.linspace(vtx_z_found[i,0],12000,1000)\n",
" fit = cubic_fit(z_coord, popt[0], popt[1], popt[2], popt[3])\n",
" ax0.plot(z_coord, fit, \"-\", label=\"fit\"+str(i), lw=0.5)\n",
" ax0.errorbar(ak.to_numpy(vtx_z_found[i,:]),ak.to_numpy(vtx_x_found[i,:]),fmt=\".\",ms=2)\n",
"\n",
"#ax0.legend()\n",
"ax0.set_xlabel(\"z [mm]\")\n",
"ax0.set_ylabel(\"x [mm]\")\n",
"ax0.set_title(\"found tracks of brem vertices from few signals\")\n",
"ax0.set(xlim=(0,12000), ylim=(-4000,4000))\n",
"ax0.grid()\n",
"\n",
"for i in range(0,n_end):\n",
" popt, pcov = curve_fit(cubic_fit,ak.to_numpy(vtx_z_lost[i,:]),ak.to_numpy(vtx_x_lost[i,:]))\n",
" z_coord = np.linspace(vtx_z_lost[i,0],12000,1000)\n",
" fit = cubic_fit(z_coord, popt[0], popt[1], popt[2], popt[3])\n",
" ax1.plot(z_coord, fit, \"-\", label=\"fit\"+str(i), lw=0.5)\n",
" ax1.errorbar(ak.to_numpy(vtx_z_lost[i,:]),ak.to_numpy(vtx_x_lost[i,:]),fmt=\".\",ms=2)\n",
"\n",
"#ax1.legend()\n",
"ax1.set_xlabel(\"z [mm]\")\n",
"ax1.set_ylabel(\"x [mm]\")\n",
"ax1.set_title(\"lost tracks of brem vertices from few signals\")\n",
"ax1.set(xlim=(0,12000), ylim=(-4000,4000))\n",
"ax1.grid()\n",
"\n",
"\"\"\"\n",
"we can see that of the lost brem vertices, many trajectory fits seem illogical and not plausible\n",
"\"\"\"\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
2023-09-19 09:58:54 +02:00
"source": [
"endvtx_x_found = tracked[\"all_endvtx_x\"]\n",
"endvtx_x_found = endvtx_x_found[tracked[\"all_endvtx_x_length\"]!=0]\n",
"endvtx_x_found = ak.to_numpy(ak.flatten(endvtx_x_found))\n",
"\n",
"endvtx_z_found = tracked[\"all_endvtx_z\"]\n",
"endvtx_z_found = endvtx_z_found[tracked[\"all_endvtx_z_length\"]!=0]\n",
"#print(ak.to_numpy(brem_vtx_z_found))\n",
"endvtx_z_found = ak.to_numpy(ak.flatten(endvtx_z_found))\n",
"\n",
"endvtx_x_lost = lost[\"all_endvtx_x\"]\n",
"endvtx_x_lost = endvtx_x_lost[lost[\"all_endvtx_x_length\"]!=0]\n",
"endvtx_x_lost = ak.to_numpy(ak.flatten(endvtx_x_lost))\n",
"\n",
"endvtx_z_lost = lost[\"all_endvtx_z\"]\n",
"endvtx_z_lost = endvtx_z_lost[lost[\"all_endvtx_z_length\"]!=0]\n",
"endvtx_z_lost = ak.to_numpy(ak.flatten(endvtx_z_lost))"
]
},
{
"cell_type": "code",
"execution_count": 17,
2023-09-19 09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z5oWcfRRx+dsb1rKHTy9z//+c/66le/qng8rqqqKn3zm99Uc3Nzxv4PPvigPvWpT6msrEzDhg3TjTfe6Onc/va3v2nWrFmqrKxUWVmZjj32WP3sZz+zbKObNuXanl//+teKxWL63e9+l/HYLbfcolgspj/96U85tfv555/Xl770JQ0cOFAf//jHtXTpUl1xxRWSpGHDhikWiykWi+nxxx+XZB3y/de//lVf/epXVVVVpbKyMh155JH6+te/rra2Ns/X8+2339ZFF12k2tpalZWV6YgjjtBpp52mRx991NW1AgAAAPxQ6HGVXTucxlROfWinPn42fo+HpMKMidy029h2L2OibCmw3IyJGA8B6ImIAAHgq6VLl+pHP/qR5syZo/nz56u1tVXXXHONJk6cqL/85S/6yEc+knXfurq6nI75/e9/X5/5zGd06aWXavny5ZowYYIGDBigLVu2aPLkyTrxxBN1xx13qKysTDfffLPOOuss3XfffTrvvPNyPEvp3HPP1XnnnacLLrhAL774ohYvXixJ+q//+q9Umd/97nf6whe+oDFjxmj9+vXq6OjQypUr9dZbb7k6xl/+8heNHTtWRx55pH784x+rurpaDz/8sObNm6d//etfuvrqqz21KZ/2TJ8+XZWVlbrzzjs1ceJE02N1dXX6t3/7N5144ok5tfucc87RV77yFV1yySV6//33NWrUKL377rtas2aNfvWrX6VCu4877jjLtv3xj3/U6aefrsGDB+uHP/yhhg8frj179uiBBx7Q/v37VVZW5qlds2fP1vPPP69ly5bpmGOO0Xvvvafnn39e77zzjuN1AgAAAPxQjHGVFbdjKqc+9Le+9S1PfXzJ//GQVJgxkdd2S97GRFZrf7gZEzEeAtBjJQDAJxs3bkxISqxcudK0/eWXX05ISqxbty5jnzPOOCPRr18/y69ly5a5PvZjjz2WkJT45S9/mdp26qmnJiorKxN79+5NbWtvb0+MHDkyMXTo0MTBgwdT288///zEUUcdlVHv1VdfnTC+VSZ/73qOc+fOTfTt29dU5+jRoxM1NTWJ1tbW1LaWlpZERUVFws3b79SpUxNDhw5NNDc3m7Zfdtllib59+ybeffddT23Ktz0LFixIlJeXJ957773Utr/85S8JSYk1a9bk3O4f/OAHGce64YYbEpISu3btynjszjvvND32uc99LnH44YcnGhsbbdvvtl0f+chHEvPnz7etCwAAAAhKMcdVXfvabsdUbvrQdn18K36PhxKJwoyJ3Lbb2HYvY6Kuz1Ei4W5MxHgIQE9FCiwAvvnBD36gj3/84/r2t7+t9vb21NewYcNUXl6uf/zjHxn7/Pa3v9W+ffssv6666qqc2/L+++/r6aef1pe+9CXT7KiSkhLNnj1bb7zxhnbu3Jlz/TNmzDD9fuKJJ+rDDz9UY2Nj6vjPPvuszjnnHPXt2zdVrn///jrrrLMc6//www/1u9/9Tl/84hd12GGHma7n5z//eX344Yd66qmnXLcp3/ZI0je/+U21trbq/vvvT2278847VVZWplmzZuXc7nPPPdfV8a188MEH2rJli2bOnGmbB9dLuz7zmc+orq5O1157rZ566ikdOHAg5/YBAAAAXoVlXOVlTOV3H9rv8VDyfIIeE+XSbin4MRHjIQA9GTdAAPiioaFBL7zwgv7+97+rrKxMvXv3Nn21trbq8MMPL1h7mpqalEgkUqHCRjU1NZKUVwjvoEGDTL8n0yy1tramjn/w4EFVV1dn7Gu1rat33nlH7e3tWrNmTca1/PznPy9J+te//uW6Tfm2R5KOP/54ffrTn9add94pSero6NC6dev0hS98QRUVFTm32+o5cqupqUkdHR0aOnSobTkv7br//vt1/vnn6xe/+IXGjBmjiooKff3rX1dDQ0PO7QQAAADcCNO4ysuYyu8+tN/joeT5BD0myqXdUvBjIsZDAHoy1gAB4Ivdu3dLkm666abUguRdffzjHy9YewYOHKhevXppz549GY+9+eabkqTBgwentvXt2zdjwWzJunPq9vixWMyyk+im4zhw4MDUzKpLL73UssywYcMK1p6kb3zjG5o7d65eeukl/eMf/9CePXv0jW98I692GxeZ96qiokIlJSV64403bMt5adfgwYO1evVqrV69Wq+//roeeOABfe9731NjY6M2bdqUc1sBAAAAJ2EaV3kZU/ndh/Z7PJSsM+gxUa7tDnpMxHgIQE/GDRAAvkhGAMRiMZ1yyilFbo3Ur18/jR49Wr/61a904403qry8XJJ08OBBrVu3TkOHDtUxxxyTKn/00UersbFRb731lqqqqiRJ+/fv18MPP5zz8T/zmc/oV7/6lW644YZUiPXevXu1ceNGx/0PO+wwTZgwQS+88IJOPPFE9enTJ6d2+NWepK9+9atasGCB6urq9I9//EMf/ehHNWXKFN/b3XW2Vjbl5eUaN26cfvnLX2rZsmWmm1pGubbryCOP1GWXXabf/e53+sMf/uDtJAAAAACPwjSu8jqmSsrWh3bbx5f8Hw8lzyfoMZGf7fZzTMR4CEBPxg0QAL74+Mc/rgkTJug///M/tW/fPo0ePVqJREJ79uzRY489pvPPP1/jx48vaJtWrFihyZMna8KECVq0aJH69Omjm2++WTt27NB9991nmmVz3nnn6Qc/+IG+8pWv6IorrtCHH36on/70p+ro6Mj5+D/60Y90xhlnaPLkyVq4cKE6Ojp0/fXXq1+/fnr33Xcd9//JT36i008/Xf/v//0//cd//IeOPvpo7d27V6+88oo2btyo3//+9wVtjyQdfvjh+uIXv6i6ujq99957WrRokXr1MmdT9KPdJ5xwQqqu888/X71799aIESPUv3//jLKrVq3S6aefrtGjR+t73/uePvGJT+itt97SAw88oFtvvTW1j5t2NTc3a8KECZo1a5Y++clPqn///nr22We1adMmnXPOOa6uEQAAAJCrsI2r3Iyp3PahvfTxk+X8HA9JhRkT+dXubNfLips
2023-09-19 09:58:54 +02:00
"text/plain": [
"<Figure size 2000x600 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
"a0 = ax0.hist2d(endvtx_z_found, endvtx_x_found, density=False, bins=500, cmap=plt.cm.jet, cmin=1)\n",
2023-09-19 09:58:54 +02:00
"ax0.set_xlabel(\"z [mm]\")\n",
"ax0.set_ylabel(\"x [mm]\")\n",
"ax0.set_title(r\"$e^\\pm$ found end vertices\")\n",
"ax0.set(xlim=(0,12000), ylim=(-4000,4000))\n",
2023-09-19 09:58:54 +02:00
"\n",
"plt.colorbar(a0[3],ax=ax0)\n",
"\n",
"a1 = ax1.hist2d(endvtx_z_lost, endvtx_x_lost, density=False, bins=500, cmap=plt.cm.jet, cmin=1)\n",
2023-09-19 09:58:54 +02:00
"ax1.set_xlabel(\"z [mm]\")\n",
"ax1.set_ylabel(\"x [mm]\")\n",
"ax1.set_title(r\"$e^\\pm$ lost end vertices\")\n",
"ax1.set(xlim=(0,12000), ylim=(-4000,4000))\n",
2023-09-19 09:58:54 +02:00
"\n",
"plt.colorbar(a1[3], ax=ax1)\n",
"\n",
"\"\"\"\n",
"z: VeLo - RICH1 - TT - Magnet - T1,T2,T3 - RICH2 - M1\n",
"B:\n",
"vertices of lost e photons are more densely concentrated around the beampipe, especially in the z range of the magnet\n",
"found: vertices are densely located @ or around the detectors, while there are no clusters in the z range of the magnet\n",
"\"\"\"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 28,
2023-09-19 09:58:54 +02:00
"metadata": {},
"outputs": [],
"source": [
"# try to plot trajectories using all tracker hits (Velo, UT, SciFi)\n",
"\n",
"velo_x_found = tracked[\"velo_hit_pos_x\"]\n",
"velo_z_found = tracked[\"velo_hit_pos_z\"]\n",
"ut_x_found = tracked[\"ut_hit_pos_x\"]\n",
"ut_z_found = tracked[\"ut_hit_pos_z\"]\n",
"scifi_x_found = tracked[\"scifi_hit_pos_x\"]\n",
"scifi_z_found = tracked[\"scifi_hit_pos_z\"]\n",
"\n",
"tracker_x_found = ak.concatenate([velo_x_found,ut_x_found,scifi_x_found], axis=1)\n",
"tracker_z_found = ak.concatenate([velo_z_found,ut_z_found,scifi_z_found], axis=1)\n",
"\n",
"velo_x_lost = lost[\"velo_hit_pos_x\"]\n",
"velo_z_lost = lost[\"velo_hit_pos_z\"]\n",
"ut_x_lost = lost[\"ut_hit_pos_x\"]\n",
"ut_z_lost = lost[\"ut_hit_pos_z\"]\n",
"scifi_x_lost = lost[\"scifi_hit_pos_x\"]\n",
"scifi_z_lost = lost[\"scifi_hit_pos_z\"]\n",
"\n",
"tracker_x_lost = ak.concatenate([velo_x_lost,ut_x_lost,scifi_x_lost], axis=1)\n",
"tracker_z_lost = ak.concatenate([velo_z_lost,ut_z_lost,scifi_z_lost], axis=1)\n",
"\n",
"\n",
"tracker_x_found = tracker_x_found[tracked[\"energy\"]<10*1e3]\n",
"tracker_z_found = tracker_z_found[tracked[\"energy\"]<10*1e3]\n",
"\n",
"\n",
"tracker_x_lost = tracker_x_lost[lost[\"energy\"]<10*1e3]\n",
"tracker_z_lost = tracker_z_lost[lost[\"energy\"]<10*1e3]"
2023-09-19 09:58:54 +02:00
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 29,
2023-09-19 09:58:54 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABoQAAAIhCAYAAABnv9iQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzddXRURxvA4d/GXYkiSSAhQhLcCjS4V5EWilVov1KnRgul1JBSKC4VpEKhFAoUd3eHhLi7u2125/sjzcISIQmhFDrPOT09uTt779y79y4z+868oxBCCCRJkiRJkiRJkiRJkiRJkiRJkqSHls79roAkSZIkSZIkSZIkSZIkSZIkSZJ0b8mAkCRJkiRJkiRJkiRJkiRJkiRJ0kNOBoQkSZIkSZIkSZIkSZIkSZIkSZIecjIgJEmSJEmSJEmSJEmSJEmSJEmS9JCTASFJkiRJkiRJkiRJkiRJkiRJkqSHnAwISZIkSZIkSZIkSZIkSZIkSZIkPeRkQEiSJEmSJEmSJEmSJEmSJEmSJOkhJwNCkiRJkiRJkiRJkiRJkiRJkiRJDzkZEJIkSZIkSZIkSZIkSZIkSZIkSXrIyYCQJD3ANmzYQKtWrTA2NkahU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8r89ttvAhBvvPGG2Lt3r9i/f79YsWKFePPNN6s9v5ycHHHq1Cnh6OgounXrpjm/4uJicejQIc35DR8+XGzbtk1s375dZGRkiJkzZwpAjBo1SuzYsUP89NNPonnz5sLS0lKEhoZqfZ4GBgbC29tbLFy4UOzbt08
2023-09-19 09:58:54 +02:00
"text/plain": [
"<Figure size 2000x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
"nstart=0\n",
"nend=130\n",
"\n",
"for i in range(nstart,nend):\n",
2023-09-19 09:58:54 +02:00
" popt, pcov = curve_fit(cubic_fit,ak.to_numpy(tracker_z_found[i,:]),ak.to_numpy(tracker_x_found[i,:]))\n",
" z_coord = np.linspace(tracker_z_found[i,0],14000,1000)\n",
2023-09-19 09:58:54 +02:00
" fit = cubic_fit(z_coord, popt[0], popt[1], popt[2], popt[3])\n",
" ax0.plot(z_coord, fit, \"-\", lw=0.5)\n",
" ax0.errorbar(ak.to_numpy(tracker_z_found[i,:]),ak.to_numpy(tracker_x_found[i,:]),fmt=\".\",ms=3)\n",
2023-09-19 09:58:54 +02:00
"\n",
"ax0.legend([r\"$E<10$GeV\"])\n",
"ax0.vlines(3000, -4000,4000, lw=1, ls=\":\", color=\"red\")\n",
"ax0.vlines(7500, -4000,4000, lw=1, ls=\":\", color=\"red\")\n",
"ax0.set_xticks(np.arange(0,14000,1000) , minor=True)\n",
"ax0.set_yticks(np.arange(-4000,4000,500), minor=True)\n",
2023-09-19 09:58:54 +02:00
"ax0.set_xlabel(\"z [mm]\")\n",
"ax0.set_ylabel(\"x [mm]\")\n",
"ax0.set_title(\"found tracks from detector hits from few signals\")\n",
"ax0.set(xlim=(0,14000), ylim=(-4000,4000))\n",
2023-09-19 09:58:54 +02:00
"ax0.grid()\n",
"\n",
"for i in range(nstart,nend):\n",
2023-09-19 09:58:54 +02:00
" popt, pcov = curve_fit(cubic_fit,ak.to_numpy(tracker_z_lost[i,:]),ak.to_numpy(tracker_x_lost[i,:]))\n",
" z_coord = np.linspace(tracker_z_lost[i,0],14000,1000)\n",
2023-09-19 09:58:54 +02:00
" fit = cubic_fit(z_coord, popt[0], popt[1], popt[2], popt[3])\n",
" ax1.plot(z_coord, fit, \"-\", lw=0.5)\n",
" ax1.errorbar(ak.to_numpy(tracker_z_lost[i,:]),ak.to_numpy(tracker_x_lost[i,:]),fmt=\".\",ms=3)\n",
2023-09-19 09:58:54 +02:00
"\n",
"ax1.vlines(3000, -4000,4000, lw=1, ls=\":\", color=\"red\")\n",
"ax1.vlines(7500, -4000,4000, lw=1, ls=\":\", color=\"red\")\n",
"ax1.set_xticks(np.arange(0,14000,1000) , minor=True)\n",
"ax1.set_yticks(np.arange(-4000,4000,500), minor=True)\n",
2023-09-19 09:58:54 +02:00
"ax1.set_xlabel(\"z [mm]\")\n",
"ax1.set_ylabel(\"x [mm]\")\n",
"ax1.set_title(\"lost tracks from detector hits from few signals\")\n",
"ax1.set(xlim=(0,14000), ylim=(-4000,4000))\n",
2023-09-19 09:58:54 +02:00
"ax1.grid()\n",
"\n",
"\n",
"\"\"\"\n",
"electrons and photons will be stopped by the ECAL which serves to measure the particles energy\n",
"\n",
"the trajectories between the velo and tt should be linear, which cannot be plotted accurately using a single fit.\n",
"lost tracks diverge more severely.\n",
"\n",
"most higher energy particles maintain a trajectory closer to the beamdirection ie a larger pseudorapidity,\n",
"and show less bending in their trajectory, especially upstream.\n",
"found: higher energy: very compact trajectory, less bending wrt lower energy particles \n",
"\"\"\"\n",
"\n",
"\n",
"\n",
2023-09-19 09:58:54 +02:00
"plt.show()"
]
},
{
"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",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
2023-09-19 09:58:54 +02:00
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'all_endvtx_types_length': 11,\n",
" 'all_endvtx_types': [101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 101.0,\n",
" 0.0],\n",
" 'all_endvtx_x_length': 11,\n",
" 'all_endvtx_x': [19.496400833129883,\n",
" 24.957000732421875,\n",
" 32.490699768066406,\n",
" 34.14419937133789,\n",
" 34.6599006652832,\n",
" 36.427101135253906,\n",
" -1914.992431640625,\n",
" -2413.033203125,\n",
" -3782.947998046875,\n",
" -3786.80810546875,\n",
" -3819.826904296875],\n",
" 'all_endvtx_y_length': 11,\n",
" 'all_endvtx_y': [-20.370500564575195,\n",
" -26.043100357055664,\n",
" -33.85060119628906,\n",
" -35.53160095214844,\n",
" -36.069400787353516,\n",
" -37.92850112915039,\n",
" -504.0671081542969,\n",
" -533.6621704101562,\n",
" -598.8317260742188,\n",
" -599.1124877929688,\n",
" -593.3890991210938],\n",
" 'all_endvtx_z_length': 11,\n",
" 'all_endvtx_z': [399.7018127441406,\n",
" 500.7049865722656,\n",
" 637.5723266601562,\n",
" 667.4852905273438,\n",
" 677.0195922851562,\n",
" 709.4874877929688,\n",
" 8576.556640625,\n",
" 9281.2119140625,\n",
" 11183.1640625,\n",
" 11188.4541015625,\n",
" 11237.0966796875],\n",
" 'brem_photons_pe_length': 10,\n",
" 'brem_photons_pe': [2469.182861328125,\n",
" 169.8916473388672,\n",
" 223.71347045898438,\n",
" 388.2983703613281,\n",
" 3228.4228515625,\n",
" 809.4715576171875,\n",
" 171.57342529296875,\n",
" 223.80494689941406,\n",
" 178.85166931152344,\n",
" 793.921142578125],\n",
" 'brem_photons_px_length': 10,\n",
" 'brem_photons_px': [133.6999969482422,\n",
" 9.329999923706055,\n",
" 12.489999771118164,\n",
" 20.93000030517578,\n",
" 175.22000122070312,\n",
" 43.81999969482422,\n",
" -98.19999694824219,\n",
" -129.77000427246094,\n",
" -106.12000274658203,\n",
" -465.2200012207031],\n",
" 'brem_photons_py_length': 10,\n",
" 'brem_photons_py': [-137.9199981689453,\n",
" -9.65999984741211,\n",
" -12.579999923706055,\n",
" -21.809999465942383,\n",
" -183.27999877929688,\n",
" -47.79999923706055,\n",
" -6.090000152587891,\n",
" -7.429999828338623,\n",
" -5.800000190734863,\n",
" -36.66999816894531],\n",
" 'brem_photons_pz_length': 10,\n",
" 'brem_photons_pz': [2461.699951171875,\n",
" 169.36000061035156,\n",
" 223.00999450683594,\n",
" 387.1199951171875,\n",
" 3218.449951171875,\n",
" 806.8699951171875,\n",
" 140.55999755859375,\n",
" 182.19000244140625,\n",
" 143.85000610351562,\n",
" 642.2899780273438],\n",
" 'brem_vtx_x_length': 10,\n",
" 'brem_vtx_x': [19.496400833129883,\n",
" 24.957000732421875,\n",
" 32.490699768066406,\n",
" 34.14419937133789,\n",
" 34.6599006652832,\n",
" 36.427101135253906,\n",
" -1914.992431640625,\n",
" -2413.033203125,\n",
" -3782.947998046875,\n",
" -3786.80810546875],\n",
" 'brem_vtx_y_length': 10,\n",
" 'brem_vtx_y': [-20.370500564575195,\n",
" -26.043100357055664,\n",
" -33.85060119628906,\n",
" -35.53160095214844,\n",
" -36.069400787353516,\n",
" -37.92850112915039,\n",
" -504.0671081542969,\n",
" -533.6621704101562,\n",
" -598.8317260742188,\n",
" -599.1124877929688],\n",
" 'brem_vtx_z_length': 10,\n",
" 'brem_vtx_z': [399.7018127441406,\n",
" 500.7049865722656,\n",
" 637.5723266601562,\n",
" 667.4852905273438,\n",
" 677.0195922851562,\n",
" 709.4874877929688,\n",
" 8576.556640625,\n",
" 9281.2119140625,\n",
" 11183.1640625,\n",
" 11188.4541015625],\n",
" 'endvtx_type': 0,\n",
" 'endvtx_x': nan,\n",
" 'endvtx_y': nan,\n",
" 'endvtx_z': nan,\n",
" 'energy': 9355.866625028413,\n",
" 'eta': 3.237728027535365,\n",
" 'event_count': 2,\n",
" 'fromB': True,\n",
" 'fromD': False,\n",
" 'fromDecay': True,\n",
" 'fromHadInt': False,\n",
" 'fromPV': False,\n",
" 'fromPairProd': False,\n",
" 'fromSignal': True,\n",
" '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",
" 'mcp_idx': 5488,\n",
" 'mother_id': 511,\n",
" 'mother_key': 5479,\n",
" 'originvtx_type': 2,\n",
" 'originvtx_x': -0.0663,\n",
" 'originvtx_y': -0.0023,\n",
" 'originvtx_z': 40.3966,\n",
" 'p': 9355.866611073503,\n",
" 'phi': -0.8090232566094933,\n",
" 'pid': -11,\n",
" 'pt': 733.3612464536151,\n",
" 'px': 506.17,\n",
" 'py': -530.67,\n",
" 'pz': 9327.08,\n",
" 'scifi_hit_pos_x_length': 13,\n",
" 'scifi_hit_pos_x': [-1402.2215576171875,\n",
" -1448.5460205078125,\n",
" -1495.479736328125,\n",
" -1542.3804931640625,\n",
" -1865.9482421875,\n",
" -1914.599853515625,\n",
" -1915.0545654296875,\n",
" -1963.8216552734375,\n",
" -2012.78173828125,\n",
" -2349.04052734375,\n",
" -2398.658935546875,\n",
" -2448.573486328125,\n",
" -2498.376220703125],\n",
" 'scifi_hit_pos_y_length': 13,\n",
" 'scifi_hit_pos_y': [-470.2232666015625,\n",
" -473.55914306640625,\n",
" -476.8390197753906,\n",
" -480.12762451171875,\n",
" -501.0274963378906,\n",
" -504.04315185546875,\n",
" -504.0709228515625,\n",
" -507.0843200683594,\n",
" -510.0830383300781,\n",
" -530.0570068359375,\n",
" -532.8589477539062,\n",
" -535.61572265625,\n",
" -538.2548217773438],\n",
" 'scifi_hit_pos_z_length': 13,\n",
" 'scifi_hit_pos_z': [7824.40576171875,\n",
" 7894.1943359375,\n",
" 7964.38330078125,\n",
" 8034.171875,\n",
" 8506.294921875,\n",
" 8575.99609375,\n",
" 8576.6455078125,\n",
" 8646.2744140625,\n",
" 8716.0634765625,\n",
" 9191.1904296875,\n",
" 9260.98046875,\n",
" 9331.171875,\n",
" 9400.962890625],\n",
" 'track_p': 1931.9397828451663,\n",
" 'track_pt': 151.36962154532284,\n",
" 'tx': 0.05426886013629132,\n",
" 'ty': -0.056895620065443846,\n",
" 'ut_hit_pos_x_length': 4,\n",
" 'ut_hit_pos_x': [112.31356048583984,\n",
" 114.4996337890625,\n",
" 122.83889770507812,\n",
" 124.72588348388672],\n",
" 'ut_hit_pos_y_length': 4,\n",
" 'ut_hit_pos_y': [-135.26077270507812,\n",
" -138.64544677734375,\n",
" -152.51470947265625,\n",
" -155.91305541992188],\n",
" 'ut_hit_pos_z_length': 4,\n",
" 'ut_hit_pos_z': [2313.153564453125,\n",
" 2368.153564453125,\n",
" 2593.153564453125,\n",
" 2648.153564453125],\n",
" 'velo_hit_pos_x_length': 10,\n",
" 'velo_hit_pos_x': [3.2025206089019775,\n",
" 4.559732437133789,\n",
" 5.917426109313965,\n",
" 7.274953365325928,\n",
" 8.638668060302734,\n",
" 10.008487701416016,\n",
" 11.378168106079102,\n",
" 12.745656967163086,\n",
" 15.399646759033203,\n",
" 19.47773551940918],\n",
" 'velo_hit_pos_y_length': 10,\n",
" 'velo_hit_pos_y': [-3.429784059524536,\n",
" -4.8510894775390625,\n",
" -6.275496482849121,\n",
" -7.6981940269470215,\n",
" -9.124002456665039,\n",
" -10.54817008972168,\n",
" -11.963949203491211,\n",
" -13.374946594238281,\n",
" -16.1297550201416,\n",
" -20.351228713989258],\n",
" 'velo_hit_pos_z_length': 10,\n",
" 'velo_hit_pos_z': [100.64099884033203,\n",
" 125.64099884033203,\n",
" 150.64100646972656,\n",
" 175.64100646972656,\n",
" 200.64100646972656,\n",
" 225.64100646972656,\n",
" 250.64100646972656,\n",
" 275.6409912109375,\n",
" 324.3590087890625,\n",
" 399.3590087890625],\n",
" 'velo_track_idx': 143,\n",
" 'velo_track_tx': 0.054571494460105896,\n",
" 'velo_track_ty': -0.056447889655828476,\n",
" 'velo_track_x': 39.710758209228516,\n",
" 'velo_track_y': -41.2618293762207,\n",
" 'velo_track_z': 770.0}"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tracked[1].tolist()"
]
},
{
"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
}