2023-09-14 12:07:57 +02:00
{
"cells": [
{
"cell_type": "code",
2024-01-15 16:46:25 +01:00
"execution_count": 1,
2023-09-14 12:07:57 +02:00
"metadata": {},
"outputs": [],
"source": [
"import uproot\n",
"import numpy as np\n",
"import sys\n",
"import os\n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"from mpl_toolkits import mplot3d\n",
"import itertools\n",
"import awkward as ak\n",
2023-09-14 16:33:27 +02:00
"import seaborn as sns\n",
2023-09-18 13:55:34 +02:00
"from scipy.optimize import curve_fit\n",
2023-09-14 12:07:57 +02:00
"%matplotlib inline"
]
},
{
"cell_type": "code",
2024-01-15 16:46:25 +01:00
"execution_count": 2,
2023-09-14 12:07:57 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-09-28 12:12:21 +02:00
"file = uproot.open(\"tracking_losses_ntuple_Bd2KstEE.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\")\n",
"#file = uproot.open(\"tracking_losses_ntuple_Dst0ToD0EE.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\")\n",
2023-09-14 12:07:57 +02:00
"\n",
2023-09-14 16:33:27 +02:00
"#look at particles only from Signal\n",
2023-09-14 12:07:57 +02:00
"allcolumns = file.arrays()\n",
2023-09-20 16:34:15 +02:00
"tracked = allcolumns[(allcolumns.isElectron) & (~allcolumns.lost) & (allcolumns.fromSignal) & (allcolumns.p > 5e3)]\n",
"lost = allcolumns[(allcolumns.isElectron) & (allcolumns.lost) & (allcolumns.fromSignal) & (allcolumns.p > 5e3)] \n",
2023-09-14 16:33:27 +02:00
"\n",
"#ak.num(tracked, axis=0)\n",
"\n"
2023-09-14 12:07:57 +02:00
]
},
{
"cell_type": "code",
2024-01-15 16:46:25 +01:00
"execution_count": 3,
2023-09-14 12:07:57 +02:00
"metadata": {},
2023-09-15 12:33:25 +02:00
"outputs": [],
2023-09-14 16:33:27 +02:00
"source": [
"#lost\n",
"l_eph = lost[\"brem_photons_pe\"]\n",
"ak.nan_to_num(l_eph)\n",
"l_pT = lost[\"pt\"]\n",
"l_sci_x = lost[\"scifi_hit_pos_x\"]\n",
"ak.nan_to_num(l_sci_x)\n",
"\n",
"#found\n",
"f_eph = tracked[\"brem_photons_pe\"]\n",
"ak.nan_to_num(f_eph)\n",
"f_pT = tracked[\"pt\"]\n",
"f_sci_x = tracked[\"scifi_hit_pos_x\"]\n",
2023-09-15 12:33:25 +02:00
"ak.nan_to_num(f_sci_x)\n",
"\n",
"l_sci_x, l_pT = ak.broadcast_arrays(l_sci_x, l_pT)\n",
"f_sci_x, f_pT = ak.broadcast_arrays(f_sci_x, f_pT)\n",
"\n",
"l_sci_x = ak.to_numpy(ak.flatten(l_sci_x))\n",
"l_pT = ak.to_numpy(ak.flatten(l_pT))\n",
"f_sci_x = ak.to_numpy(ak.flatten(f_sci_x))\n",
"f_pT = ak.to_numpy(ak.flatten(f_pT))"
2023-09-14 16:33:27 +02:00
]
},
{
"cell_type": "code",
2024-01-15 16:46:25 +01:00
"execution_count": 4,
2023-09-14 16:33:27 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-27 19:35:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABikAAAImCAYAAAAmHGlJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9fXwd13nfi/42KdNJ5dggCUWkYkcUaN/e9qSJvDdkqZFUywnQSI7alCRARWacIpUFXFdseyn6EFV8VMvlcWCwofBJKx0fgOYJakflFQEKzT2KKQdwoxzJqWRhb6tO2pxemxD9EkG2IBJWrNqiJez7x94z8xvs9WBeMPsFwO/7+ezPXliz5lnPrFkzexbmecmVy+UyhBBCCCGEEEIIIYQQQgghGsymZisghBBCCCGEEEIIIYQQQoiNiV5SCCGEEEIIIYQQQgghhBCiKeglhRBCCCGEEEIIIYQQQggh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Ym5tzJkGKA79Vrse+q5EfhzhjVS/4XCTRJ6tzF4csx6eReteT1c7Jlcah3vO91Yh7vD09Pejq6sLQ0BBmZmawuLiI4eFhHDlyJHT9eOM5NzeHiYmJRBZlng71sDIAmnOvWQvzaTXnbDlx7jFtbW3o6enBzMwM5ubm8Oijj9YkrMti3Fr9Oq/3fGyFYxRCiEb/9q72WULrqvRoXbU211XA6uZlqz9vNZo4xxx3XeXJacW1VbPuNWthTrXa2krrKq2rRIUN+ZLCe5vImeQ9vAtn9+7dACoTvK2tDdPT0/4bueX/qImD90PG7l2
2023-09-14 16:33:27 +02:00
"text/plain": [
2023-09-15 12:33:25 +02:00
"<Figure size 2000x600 with 4 Axes>"
2023-09-14 16:33:27 +02:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
2023-09-21 15:22:04 +02:00
"a0=ax0.hist2d(l_sci_x, l_pT, bins=200, cmap=plt.cm.jet, cmin=0, range=[[-3000,3000],[0,2000]])\n",
2023-09-14 16:33:27 +02:00
"ax0.set_xlabel(\"scifi x\")\n",
"ax0.set_ylabel(r\"$p_T$\")\n",
"ax0.set_title(\"lost electron positions in the scifi in regard to their transverse momentum\")\n",
2023-09-19 10:52:00 +02:00
"plt.colorbar(a0[3],ax=ax0)\n",
2023-09-14 16:33:27 +02:00
"\n",
2023-09-21 15:22:04 +02:00
"a1=ax1.hist2d(f_sci_x, f_pT, bins=200, cmap=plt.cm.jet, cmin=0, range=[[-3000,3000],[0,2000]])\n",
2023-09-14 16:33:27 +02:00
"ax1.set_xlabel(\"scifi x\")\n",
"ax1.set_ylabel(r\"$p_T$\")\n",
"ax1.set_title(\"found electron positions in the scifi in regard to their transverse momentum\")\n",
2023-09-19 10:52:00 +02:00
"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-20 10:52:44 +02:00
"we can see that the lost electrons cover a wider spread in the x direction of the scifi tracker, most widely scattered electrons have low pt\n",
"\n",
"D:\n",
"heatmaps look fairly similar. lost e are more densely located between x \\in [1000,2000]. found e between x \\in [200,1500].\n",
"we can see a near empty space around the x origin in both. lost seem to have less 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()"
]
2023-09-14 12:07:57 +02:00
},
{
"cell_type": "code",
2023-09-18 12:12:50 +02:00
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 20,
2023-09-15 12:33:25 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-09-28 12:12:21 +02:00
"[[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"
2023-09-15 12:33:25 +02:00
]
}
],
"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",
2023-10-27 19:35:49 +02:00
"execution_count": 21,
2023-09-14 12:07:57 +02:00
"metadata": {},
"outputs": [],
2023-09-15 12:33:25 +02:00
"source": [
"q_e_found = e_ph_found/energy_found\n",
"q_e_lost = e_ph_lost/energy_lost"
]
2023-09-14 12:07:57 +02:00
},
2023-09-14 16:33:27 +02:00
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 22,
2023-09-14 16:33:27 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-27 19:35:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAHOCAYAAAC2DSK6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA050lEQVR4nO3dT2wbZ57/+Y9+m41HWMOm5MYCc/gBUbHn0IsFxi7KDUwwgLsjcnzuiLSAnQbm0JEYg7egTUZziXLY0FT7sgciIe0GZoFgAYlUGntMSM/I+A1yGIsV92VmMYlKDvQDZg5tqSJ4V+NMJ9yDwrIoURRZ/Fck3y+AsFVVfOqrsiB+/DxPPTVRrVarAgAA8KH/MugCAAAAzkJQAQAAvkVQAQAAvkVQAQAAvkVQAQA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+++cZTQRg/sVis5z02AIDh5Cmo3LlzR4VCQV9//bUODg5OvZ4+fap0Ot3tWuFDjuMoHo8rlUopEokoEom481kaHROPxxUMBpXP5yUdPTeqFlLi8TihBQBQx9PQz8HBgba3t1kmf8xZlqW5uTk9fPjQHR7K5/OKRCLKZDJKJpOSjp6obRiGOxyYz+fd+SjRaFSPHz/W6uqqcrkcP1MA0EvDsrzGMZ6CSjQaVblclmmaDT9Y9vf39fd///cdFwd/W1xc1OzsbN0clqWlJeVyOaVSKUWjURmGoXK5rKWlpbpjVldXB1EyAGDIeAoqW1tbKpfLeuONN8485v79+56Lgv/Zti3Lstxek+Pi8bji8bh
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-20 10:52:44 +02:00
"D:\n",
"still able to see a trend that most electrons that give up all of their energy to photons are lost e. but nowhere near as extreme as for the B decay\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",
2023-10-27 19:35:49 +02:00
"execution_count": 23,
2023-09-15 12:33:25 +02:00
"metadata": {},
"outputs": [
2023-09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r6OsmajdBQ2uLm5aT02qLzB2qG1Wm0kPDFoFkSYY832Hf/PtFarjcxACHv+Ua73OMa5PkmWtby8PJwRc+XKlRPDYyuVynD9zrAhlIPrau4/+GyO3/tBbYlS1jjMB66lpaXhup3H74+oP2PHNZtNz/31W7/1W5JOPpc496vZTu73ZO93AACQDVGeeVw9+9EfOlkWnw+nqS8UtbxxpNEfmuW+kJTP+x3AKAYbkBlbW1sqFAqe2QODMLcbN24Mf9kP/nOo1Wpqt9va3NwcPgi02+1hsucwDx6FQmE4O6JcLg9D5gYj2t1u15MgKuj45eVlXb9+XdVqVTs7OyOJzKIeWygUhg891WpVy8vLqtVqKpfLWlxcHF6TwUyERqMxTHo9uH7mv6aw13ucB7iw1yfOZ+VX1knnLB11VAbHb25uqtlsnriW5eB+ePbZZ0Od96DT02w2tbm5qc3NzWEZnU5HzWZTvV4vVFvCluX3wB3283vjjTc8D5+9Xk/FYnE4o8TvHgtiJhvr9XpqNBq6ceNG4HG9Xs/T9rD3q187ud+Tu98BAEB2hH3mcfXsR3/oZFl7Ppy2vlCU8rLYH8pTX0jK5/0OwKIPpGR7e7u/srLSl9SX1F9ZWem3Wi3PPnt7e/2lpaV+pVLpr6ys9FdWVvrb29sjZdXr9X6hUOgXCoX+lStX+v1+v18sFvtXrlzpb29v97e3t/ulUqkvqV8sFvutVqu/t7fnqb9erw/LazQa/WKx2JfUL5VK/Z2dnWF5Ozs7gedWr9eHxxeLxX6j0fA973q93t/b2wt17MDW1tbwfEql0sh16/f7/VKp1C8UCv2VlZXhMUHlBl3vqNcx7vWJUsdJZYU558FnOyjbfBWLRc9nY16nqL8
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",
2023-09-28 12:12:21 +02:00
"a0 = ax0.hist2d(e_ph_found/(1e3), energy_found/(1e3), density=False, bins=200, cmap=plt.cm.jet, cmin=1, range=[[0,50],[0,50]])\n",
2023-09-19 15:53:54 +02:00
"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",
2023-09-19 10:52:00 +02:00
"plt.colorbar(a0[3],ax=ax0)\n",
2023-09-15 12:33:25 +02:00
"\n",
2023-09-28 12:12:21 +02:00
"a1 = ax1.hist2d(e_ph_lost/(1e3), energy_lost/(1e3), density=False, bins=200, cmap=plt.cm.jet, cmin=1, range= [[0,50],[0,50]])\n",
2023-09-19 15:53:54 +02:00
"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",
2023-09-19 10:52:00 +02:00
"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-20 10:52:44 +02:00
"D:\n",
"both energies are much smaller than in the B decay. otherwise similar pattern.\n",
2023-09-15 12:33:25 +02:00
"\"\"\"\n",
2023-09-14 16:33:27 +02:00
"plt.show()"
]
},
2023-09-14 12:07:57 +02:00
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 24,
2023-09-14 12:07:57 +02:00
"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",
2023-09-18 16:44:11 +02:00
"#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",
2023-09-18 13:55:34 +02:00
"brem_vtx_z_lost = ak.to_numpy(ak.flatten(brem_vtx_z_lost))\n",
"\n",
2023-09-18 16:44:11 +02:00
"#vtx_x_fit= ak.to_numpy(vtx_x_found)\n",
2023-10-27 19:35:49 +02:00
"#vtx_z_fit = ak.to_numpy(vtx_z_found)\n",
"\n",
"#brem_x_lost=np.array([])\n",
"#brem_z_lost=np.array([])\n",
"\n",
"#for i in range(5):\n",
"# brem_x_lost = np.append(brem_x_lost, brem_vtx_x_lost)\n",
"\n"
2023-09-18 12:12:50 +02:00
]
},
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 25,
2023-09-18 12:12:50 +02:00
"metadata": {},
2023-10-27 19:35:49 +02:00
"outputs": [
{
"data": {
"text/plain": [
"62968"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
2023-09-18 16:44:11 +02:00
"source": [
2023-10-27 19:35:49 +02:00
"\n",
"ak.num(brem_vtx_z_found, axis=0)\n"
2023-09-18 16:44:11 +02:00
]
2023-09-18 12:12:50 +02:00
},
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 26,
2023-09-18 12:12:50 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-27 19:35:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABjcAAAImCAYAAAAfe9gSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAADbJUlEQVR4nOz9f5Qc6X3f934aWAocCsDMgpaP6RNJuz3Q9cEmsRfdEHVj3dyNudOyEmdzuTsDrORlYl9fc9o6TeVYm90Z4ioKgOvwDme4cRKTk6MZ6J4ojmF7FzMLxnCiH91LZmNb94bENDZysjiSMb00dUwmEokd/DBnQQLo+0dVdXdVV3VXVVdVV1W/X+fsNrrr6aqnq2u6n6ef5/t9Cu12uy0AAAAAAAAAAICMODDuCgAAAAAAAAAAAATB4AYAAAAAAAAAAMgUBjcAAAAAAAAAAECmMLgBAAAAAAAAAAAyhcENAAAAAAAAAACQKQxuABi7vb29cVcBAAAAADKPvhUAYJIwuAFg7BqNhhqNxrirAQAAAACZRt8KADBJGNwAAAAAAAAAAACZwuAGACSg2Wxqc3NzaLlWq6XNzU3CyQEAAABMJPpEAAC/GNwAkHnNZlPLy8s6ffq0Zmdntba2Nu4qdbRaLZ0+fVrlclkbGxsDy66trWl2dlbValW3bt1KqIb50mq19Pjjj/saSAIAAADQ7U+Vy2WVy+Wx1oU+0ejoEwGYJI+NuwIAJk+1WrXdb7VakqTLly/bHh82GCAZDfFnn31W77//viRpeXlZu7u7EdV0dMViUZcvX1ahUBhadmlpSV//+te1tbWVQM2yr9Vq6dixY5qZmek8tre3p729vVRdAwAAAEBcouhblUolScbAgvXvOLi1353oEwVDnwjApGNwA0DinA3rra0tzczMaG5uLvC+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Pp06e1tramSqViC2H3ej3W/nq3W/8Omm7LOvdnzpwJVUev1yh1O3kbGxudhdy96j8zM9NpgFcqFZ0+fVrLy8sql8uanZ3VzMyM7zq98cYbtvdmb29PxWIxsfVkAAAAMBnS0rfy268a1k72ar+7oU9EnwgAfGsDQITq9Xq7WCy2JbVLpVJ7Y2MjluPs7Oy0FxcX25LaktqLi4vter1uK/P++++3FxYW2nNzc+3FxcX24uJie2dnp29fq6ur7ZmZmfbMzEx7aWmp3W6328Visb20tNTe2dlp7+zstEulUltSu1gstuv1evv999+3HX91dbWzv42NDds52N3d7exvd3d34Ot6//3320tLS+25uTlbvd9///1OmcuXL3f2XywWXc/x6uqqZ5mdnZ323NxcW1J7Zmamffny5U69rdezsLDQ3tnZae/u7rYXFhY6ZYO8n9Y58jKojn5eY6lUas/MzHSOsbOz06mr9Z44z5v1PpZKpb7rZVid2u12e25urvNeLi0ttRcWFmzHAAAAAKIyrr6Vsx3tp1/lp53sbL97oU/k/zXSJwIw6Qrtdrsd9wAKAAAAAAAAAABAVEhLBQAAAAAAAAAAMoXBDQAAACCAra0tlctlFQoFzc7O9i3MKRl50a181tVqdWBucQAAAADIk6T6TI9FUVkAAABgEmxubmpnZ6ezKOfy8nJnoU1rIc1Wq6VyuaydnR2VSiVJxqKft27d0uLi4tjqDgAAAABxS7LPROQGAAAA4NPe3p42NjY0Nzenubk5Xbx4UZIx68hSrVY1NzfXaaRL6sxGAgAAAIA8S7LPxOAGAAAA4NPS0pLt/szMjCR1GuV7e3tqNBqqVCq2cqdOnZJkzGICAAAAgLxKss/E4AYAAAAQ0tbWllZXVzvh1deuXZOkzn2L1ZCv1+vJVhAAAAAAxijOPhNrbiTkO9/5jn7
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",
2023-10-27 19:35:49 +02:00
"a0 = ax0.hist2d(brem_vtx_z_found[:11000], brem_vtx_x_found[:11000], density=False, bins=300, cmap=plt.cm.jet, cmin=1, vmax=30)\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",
2023-10-27 19:35:49 +02:00
"a1 = ax1.hist2d(brem_vtx_z_lost, brem_vtx_x_lost, density=False, bins=300, cmap=plt.cm.jet, cmin=1, vmax=30)\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",
2023-09-18 16:44:11 +02:00
"#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",
2023-09-18 16:44:11 +02:00
"z: VeLo - RICH1 - TT - Magnet - T1,T2,T3 - RICH2 - M1\n",
2023-09-18 12:12:50 +02:00
"B:\n",
2023-09-18 16:50:48 +02:00
"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-20 10:52:44 +02:00
"D:\n",
"lost brem vertices: we can very clearly see the concentration of vertices @ the beampipe\n",
"both: less statistics in general, can still make out the tracking stations but not as well as in the B decay\n",
2023-09-18 12:12:50 +02:00
"\"\"\"\n",
"plt.show()"
]
2023-09-14 12:07:57 +02:00
},
2023-09-18 13:55:34 +02:00
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 27,
2023-09-18 16:44:11 +02:00
"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",
2023-09-19 11:06:50 +02:00
" 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"
2023-09-18 16:44:11 +02:00
]
},
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 28,
2023-09-18 13:55:34 +02:00
"metadata": {},
"outputs": [
2023-10-27 19:35:49 +02:00
{
"name": "stderr",
"output_type": "stream",
"text": [
"/work/cetin/LHCb/reco_tuner/env/tuner_env/envs/tuner/lib/python3.10/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"
]
},
2023-09-18 13:55:34 +02:00
{
"data": {
2023-10-27 19:35:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABooAAAImCAYAAABkc9ibAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeVxc1fk/8M8MDPsyDAQIhADDmoUskMUtiRpwr1qzqa2NS01q036/3Qza9tvl19qUaNXWpm1IrVpba0zUal2iIXFLzApmZWdYwr7MDMPA7HN+f6QgJKzDwDDD5/169VXD3HvOM/dchvvMc+85EiGEABEREREREREREREREU07UlcHQERERERERERERERERK7BQhEREREREREREREREdE0xUIRERERERERERERERHRNMVCERERERERERERERER0TTFQhEREREREREREREREdE0xUIRERERERERERERERHRNMVCERERERERERERERER0TTFQhEREREREREREREREdE0xUIREU05RUVFyM/Pd3UYwyooKMDmzZuxd+9eV4cyZiqVCvn5+dBqta4OhYiIiIiI3JC75kPMhYiIiAbHQhHRNFNUVITc3FysW7cOSUlJ2L59u6tD6qNSqbBu3TpkZWVh586drg5nSHv37kVubi7y8/OhVqtdHQ6A0Y/r9u3bkZSUhM2bN0+Z2N2JSqVCWFjYlC1kTuXf76G4S8xTZex7j1dWVhaysrJcGgsREdF0w7/DF7lrPsRcaPymyjXxYNwlr7iUu8Q9Vcaen8NEE8fb1QEQ0eQpKirC6tWrodFoAAC5ubmoqqpycVRfUiqV2LNnDyQSyaj3UalUUCgUkMvlExfYJdauXQsAWLdu3aT1OZyxjOvWrVtx4sQJt7vzzxUGO7e0Wi20Wu2U+r3pNdV/vwfjTjFPlbHPzMwEcPGLjt7/JiIioskxWX+Hx5LjMB8a/TUlc6Gxcad8yJ3yiv7cKe6pMvbMh4gmDgtFRNPItm3boFAo+v6dl5fnwmicY926ddizZ8+kJkYAJr2/4Yx1XPtvS0Mb7NzKzMyEEMJ1QQ3DHX+/3SnmqTT2TIiIiIhcZzL+Do8lx2E+NLZrSuZCo+dO+ZA75RX9uVPcU2nsmQ8RTQxOPUc0jRQVFbk6BKdat26dx70nR/AYOJ87nlvuFi/gnjETERERTaSxXIe64zXrROAxcD53O7fcKdb+3DVuIvJMLBQRTQP5+flYt24dVCpV3zpA69atQ0FBQd82Wq0WmzdvRm5uLnJycpCTkzPg9b179yIsLAwSiaTvYqagoADr1q2DRCLpm3ZAq9UiPz8fWVlZ2Lt3LwoKCpCVlTVgm/56++3932jn4927d29fHJs3bx5wIbt3796++PPz8xEWFobNmzf37bt9+/a+95qVl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n33bDcfTYr127FtnZ2di2bRsKCgqg1WqRl5eHrVu3OlQIH+kzaiLeAxERETnHaK6rXP33mvnQ4NwlFwKYDznTVMuFAOZDzIeIXIeFIqJprvcOj8Hu/ui9aEpKSnJ6v70XDP0fKZ4MOTk5UCgUQ15s9B6PPXv2DPr6YHeY9W472DR6KpUKcrkc+/fv79uu/0X8cDFM9pj0tj3S1AO9YzfYI+7A4HE72+OPPw7g4kXvpVMGTHZ8ozlnRhuTI+eLo1x1no1krOPXmyTv3bsXS5YsgVwux+bNm6HVarF9+/YBd1cOZzzHfs+ePcjOzkZRURHy8/ORl5eHvLy8Ue17qZE+o4YzmecPERERfWks11Wu/nvNfGhw7pQLAcyHxmuq5kIA8yHmQ0Suw0IR0TSiVqsve4Knd17b/nPY9jp58iTkcnnf3Sfh4eEABiYH/ee9HYvei5X8/PxB9x1Le6Pdtvc99n/svHff3uPSP65
2023-09-18 13:55:34 +02:00
"text/plain": [
2023-09-18 16:44:11 +02:00
"<Figure size 2000x600 with 2 Axes>"
2023-09-18 13:55:34 +02:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-09-18 16:44:11 +02:00
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
2023-09-19 12:06:04 +02:00
"n_end=100\n",
2023-09-18 13:55:34 +02:00
"\n",
2023-09-19 12:06:04 +02:00
"for i in range(0,n_end):\n",
2023-09-18 16:44:11 +02:00
" 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",
2023-09-19 12:06:04 +02:00
" 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",
2023-09-18 16:44:11 +02:00
"\n",
2023-09-19 12:06:04 +02:00
"#ax0.legend()\n",
2023-09-18 16:44:11 +02:00
"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",
2023-09-19 12:06:04 +02:00
"for i in range(0,n_end):\n",
2023-09-18 16:44:11 +02:00
" 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",
2023-09-19 12:06:04 +02:00
" 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",
2023-09-18 16:44:11 +02:00
"\n",
2023-09-19 12:06:04 +02:00
"#ax1.legend()\n",
2023-09-18 16:44:11 +02:00
"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",
2023-09-18 13:55:34 +02:00
"\n",
2023-09-19 12:06:04 +02:00
"\"\"\"\n",
2023-09-20 10:52:44 +02:00
"B:\n",
2023-09-19 12:06:04 +02:00
"we can see that of the lost brem vertices, many trajectory fits seem illogical and not plausible\n",
2023-09-20 10:52:44 +02:00
"found: most seem like reasonable tracks\n",
"D:\n",
"both: many tracks arent good fits and are unusable\n",
2023-09-19 12:06:04 +02:00
"\"\"\"\n",
"\n",
2023-09-18 13:55:34 +02:00
"plt.show()"
]
},
2023-09-18 16:44:11 +02:00
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 29,
2023-09-18 16:44:11 +02:00
"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",
2023-10-27 19:35:49 +02:00
"execution_count": 30,
2023-09-19 09:58:54 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-27 19:35:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABkEAAAImCAYAAADkLC3NAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAADALklEQVR4nOz9f5Rj6X3fd36qu0fNkofTYI3ErKxEIlH0cTgnjkdAiZZ/aWIRsLP2ZjdR/aB248TOHk4hWlBOMhELmp21Z7jWnCKKjn3WTllGNb1SnPU6M1Wt/NCR7WNgZI+dZOVhAxkpm2GsVYGkZMq2PKzGNMcq9kxXY/+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0yAAAAAJBVxEwAAABYJHPXCdJqtbSzszOx/e7du5KkYrE4tt1p+LfbbWtlAAAAACCriJkAAACwSOZqTZBGo6Fms2nc1+/3JUmFQmHqfltlTN5++239/M//vL7ru75LH/jAB6Y8gtm+7du+Td/2bd8W+v4AAGAxvffee3rvvfdC3/9b3/qW/sk/+Sf6Y3/sj+k7vuM7LNYsvF/7tV/T22+/Hcuxv+M7vkPf8z3fE8uxgTQRMwEAAEw3b3ETMdO5uekE6fV6evLJJydGGzmOj48lSSsrK8b9g8HAWhmTn//5n9ef/JN/clr1AQAAcuFnfuZn9Cf+xJ9Iuxr6tV/7NX3se79X78d0/G//9m/Xl7/85dw06gE/iJkAAACSkYW4iZjp0tx0guzu7urw8HDq/tXVVUnSycmJcX+xWLRWxuS7vuu7JEl/8S/+Rf3u3/27p9ZzlmmjmtbX13Xnzp3Qx50lzuPHeex
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",
2023-09-19 10:52:00 +02:00
"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",
2023-09-19 10:52:00 +02:00
"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",
2023-09-19 10:52:00 +02:00
"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",
2023-09-19 10:52:00 +02:00
"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",
2023-09-20 10:52:44 +02:00
"D:\n",
"lost: densely located @ the beampipe.\n",
"both: almost cant make out the velo or ut\n",
2023-09-19 09:58:54 +02:00
"\"\"\"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 31,
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",
2023-09-19 14:22:04 +02:00
"tracker_z_lost = ak.concatenate([velo_z_lost,ut_z_lost,scifi_z_lost], axis=1)\n",
"\n",
2023-09-19 15:53:54 +02:00
"\n",
2023-09-20 16:34:15 +02:00
"#tracker_x_found = tracker_x_found[tracked[\"energy\"]>1e4]\n",
"#tracker_z_found = tracker_z_found[tracked[\"energy\"]>1e4]\n",
2023-09-19 14:22:04 +02:00
"\n",
2023-09-20 16:34:15 +02:00
"#tracker_x_lost = tracker_x_lost[lost[\"energy\"]>1e4]\n",
"#tracker_z_lost = tracker_z_lost[lost[\"energy\"]>1e4]"
2023-09-19 09:58:54 +02:00
]
},
{
"cell_type": "code",
2023-09-20 10:52:44 +02:00
"execution_count": null,
2023-09-19 10:52:00 +02:00
"metadata": {},
"outputs": [],
2023-09-19 11:06:50 +02:00
"source": []
2023-09-19 10:52:00 +02:00
},
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 32,
2023-09-19 09:58:54 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-27 19:35:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABooAAAImCAYAAABkc9ibAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd1xcVfr48Q+9wwDphYQhhQCJCSSxxxKwrLo2EnvZdSXuV1d3LWDU1XUtEdSsXSG7P9e1JmDsFWJJoolJIDGFUIcaOswwdKbc3x8IBmkDDDCQ5/16+cIwt5w7557hPPPcc46doigKQgghhBBCCCGEEEIIIYQQ4oRjP9YFEEIIIYQQQgghhBBCCCGEEGNDEkVCCCGEEEIIIYQQQgghhBAnKEkUCSGEEEIIIYQQQgghhBBCnKAkUSSEEEIIIYQQQgghhBBCCHGCkkSREEIIIYQQQgghhBBCCCHECUoSRUIIIYQQQ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uenJzc9cRnUlIS8fHxxMfHW7Tvbw30udaf0fyMEkIIISaywfSTxvrvr8REI9NflXho7Jzo8RBITCQxkRAjSxJFQkwwdXV1PZ5u6pyf9vi5aDvt27cPlUrV9RSJv78/0L1jefz8tYPR2elISkrqdd/BHM/SbTuv8fjh4537dr4vx5frtx2puLi4Xp8OUqvVJCYmotFoenQmju/kREdHdz2xY8lTPr3VV38GU5cjwdI67RzyHhcX12NId29P7Rx/LEv2HWwdHn/8kX4Pa2trgeGPpPvt+zvU+2y83WPQe5k
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",
2023-09-19 10:52:00 +02:00
"nstart=0\n",
2023-09-19 14:22:04 +02:00
"nend=130\n",
2023-09-19 10:52:00 +02:00
"\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",
2023-09-19 11:06:50 +02:00
" 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",
2023-09-19 14:22:04 +02:00
" ax0.plot(z_coord, fit, \"-\", lw=0.5)\n",
2023-09-19 10:52:00 +02:00
" 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",
2023-09-20 16:34:15 +02:00
"ax0.legend([r\"$E>5$GeV\"])\n",
2023-09-19 10:52:00 +02:00
"ax0.vlines(3000, -4000,4000, lw=1, ls=\":\", color=\"red\")\n",
"ax0.vlines(7500, -4000,4000, lw=1, ls=\":\", color=\"red\")\n",
2023-09-19 11:06:50 +02:00
"ax0.set_xticks(np.arange(0,14000,1000) , minor=True)\n",
2023-09-19 10:52:00 +02:00
"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",
2023-09-19 11:06:50 +02:00
"ax0.set(xlim=(0,14000), ylim=(-4000,4000))\n",
2023-09-19 09:58:54 +02:00
"ax0.grid()\n",
"\n",
2023-09-19 10:52:00 +02:00
"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",
2023-09-19 11:06:50 +02:00
" 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",
2023-09-19 14:22:04 +02:00
" ax1.plot(z_coord, fit, \"-\", lw=0.5)\n",
2023-09-19 10:52:00 +02:00
" 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",
2023-09-19 10:52:00 +02:00
"ax1.vlines(3000, -4000,4000, lw=1, ls=\":\", color=\"red\")\n",
"ax1.vlines(7500, -4000,4000, lw=1, ls=\":\", color=\"red\")\n",
2023-09-19 11:06:50 +02:00
"ax1.set_xticks(np.arange(0,14000,1000) , minor=True)\n",
2023-09-19 10:52:00 +02:00
"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",
2023-09-19 11:06:50 +02:00
"ax1.set(xlim=(0,14000), ylim=(-4000,4000))\n",
2023-09-19 09:58:54 +02:00
"ax1.grid()\n",
"\n",
2023-09-19 10:52:00 +02:00
"\n",
"\"\"\"\n",
2023-09-19 14:22:04 +02:00
"electrons and photons will be stopped by the ECAL which serves to measure the particles energy\n",
"\n",
2023-09-20 10:52:44 +02:00
"B:\n",
2023-09-19 10:52:00 +02:00
"the trajectories between the velo and tt should be linear, which cannot be plotted accurately using a single fit.\n",
2023-09-19 11:06:50 +02:00
"lost tracks diverge more severely.\n",
"\n",
2023-09-19 14:22:04 +02:00
"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",
2023-09-20 10:52:44 +02:00
"\n",
"D:\n",
"E<10GeV: almost all diverge from the x origin (almost no hit for x<1500)\n",
"E>10GeV: much more densely clustered. however still a noticeable empty space around the x origin\n",
2023-09-19 10:52:00 +02:00
"\"\"\"\n",
"\n",
"\n",
"\n",
2023-09-19 09:58:54 +02:00
"plt.show()"
]
2023-09-18 16:44:11 +02:00
},
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 33,
2023-09-18 16:44:11 +02:00
"metadata": {},
"outputs": [],
2023-09-19 16:47:01 +02:00
"source": [
"c = 299792458 #m/s\n",
"energy_found = tracked[\"energy\"]\n",
"p_found = tracked[\"p\"]\n",
"pt_found = tracked[\"pt\"]\n",
"eta_found = tracked[\"eta\"]\n",
"\n",
"energy_lost = lost[\"energy\"]\n",
"p_lost = lost[\"p\"]\n",
"pt_lost = lost[\"pt\"]\n",
"eta_lost = lost[\"eta\"]\n",
"\n",
"p_found = ak.to_numpy(p_found)\n",
"pt_found = ak.to_numpy(pt_found)\n",
"eta_found = ak.to_numpy(eta_found)\n",
"\n",
"p_lost = ak.to_numpy(p_lost)\n",
"pt_lost = ak.to_numpy(pt_lost)\n",
"eta_lost = ak.to_numpy(eta_lost)\n",
"#print(np.sqrt(energy_found[0]**2 - p_found[0]**2))"
]
2023-09-18 16:44:11 +02:00
},
2023-09-19 10:52:00 +02:00
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 34,
2023-09-19 10:52:00 +02:00
"metadata": {},
2023-09-19 16:47:01 +02:00
"outputs": [
{
"data": {
2023-10-27 19:35:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABi4AAAImCAYAAADEwHIwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB0qElEQVR4nO39bYxja34Ydv67++rORCvZvDXjRDMGxhLLxiZYBLDInkm0tjEZDYk1oPViI1X19YddS9nVrbJydxeI4G16Agi4WgEuVX/YLLC5WLFaMAZGEOR2EcZuFG1ikbOOLMMfZprMGLYsJ1bxKkoyM0nG1dRoovsyXc390E3eqi6y+HZInpff7+LgVh0envOc5zlkPf9+3m4Nh8NhAAAAAAAApMDtbScAAAAAAABgRMMFAAAAAACQGhouAAAAAACA1NBwAQAAAAAApIaGCwAAAAAAIDU0XAAAAAAAAKmh4QIAAAAAAEgNDRcAAAAAAEBqaLgg83q9XpycnGw7GQAAAAAAJEDDBTfq9XrRaDRif38/dnd348GDB9tO0li/34/9/f2oVqvRbDZXPt/oXqvValSr1QRSCAAAFFnWYoyspRcAyC8NF0zV6/Xii1/8YhwfH8fp6Wns7e3F2dnZtpM1Vi6X4/T0NLHzVSqVeP3116PX6yV2zkn6/X4MBoO1XoPFKJPVyD/WwXMFQB5kLcbIWnpJhvJYjfxjHTxXoOGCGxwdHcXOzs749+Pj40RGNqRZpVJZ+zX29/fj/Px87ddhfspkNfKPdfBcAZAXWYsxspZeVqc8ViP/WAfPFWi44Abr7mVTRPv7+/I1ZZTJauQf6+C5AoD5Ze3vZtbSm3fKYzXyj3XwXMFzGi645uTkJPb396Pf74/Xkdjf349OpzM+ZjAYxOHhYTQajajX61Gv16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Z/VWmue9l9P38h+kRqNxrQV/3vtfJL+3aVPpXKUcZ3m5TJJ8fhe1TH5WKpXxnKKX59KMWG++jcybJ6N7ujy0ePTeZUZUHR8fj3/e29sbz0/6cr6tO39uSscm8n+arH820/S5BIAkLfI3et76jphou9S7kpW1mCjL8VBEfmMin0vINg0XLOz09DRKpdKVVvzBYBDHx8fx8OHD8R/gUct2o9GITqcTJycn4z9cnU5nvND2PH+cS6XSuDdCtVodD3FsNBoR8fyL+vICULPev7+/Hw8ePIh6vR5nZ2fXFpBb9L2lUmn8R7per8f+/n40Go2oVquxu7s7zpNRS36z2Yx+vz9ujR/9gZn0h2be/F51Iadp759UiRr9fHnfqumc5zrzluMieTGtTFZ9fufNt2nmzc/LRsfeu3fvyv558+2m53CaRZ/pUcDaarXi5OQkTk5Oxp/jXq8XrVYrBoPB3GX46NGjK5W2wWAQ5XJ54no468yfm9KxyvdPRDE/m2n9XAJAkub9Gz2rvjPt7+bLxESzqXelq96VhZgoD/FQRLpjIp/LxT+Xq94PpMYQXtLtdocHBwfDiBhGxPDg4GDYbrevHPPkyZPh3t7esFarDQ8ODoYHBwfDbrd77VzHx8fDUqk0LJVKw/v37w+Hw+GwXC4P79+/P+x2u8NutzusVCrDiBiWy+Vhu90ePnny5Mr1j4+Px+drNpvDcrk8jIhhpVIZnp2djc93dnY2896Oj4/H7y+Xy8Nmszn1vo+Pj4dPnjyZ670jp6en4/upVCrX8m04HA4rlcqwVCoNDw4Oxu+Zdd5Z+b1oPr6s2+0Oa7XaMCKGpVJpeHp6Os7v0fv39vaG3W53eHZ2Ntzb2xsfezm986QzievMKsdF8+LlMrl8nVnPbxL3M828n7PLx798Dy/fz7R8m+c5nGbRZ7rZbA5LpdI4L4fD4fDg4GCcz4uUYa1WG5/n/v37w72
2023-09-19 16:47:01 +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",
2023-09-21 15:22:04 +02:00
"a0=ax0.hist2d(p_found, pt_found, bins=200, cmap=plt.cm.jet, cmin=0,range=[[0,1e4],[0,1e3]])\n",
2023-09-19 16:47:01 +02:00
"ax0.set_xlabel(\"p\")\n",
"ax0.set_ylabel(r\"$p_T$\")\n",
"ax0.set_title(\"found electron momentum over transverse momentum\")\n",
"plt.colorbar(a0[3],ax=ax0)\n",
"\n",
2023-09-21 15:22:04 +02:00
"a1=ax1.hist2d(p_lost, pt_lost, bins=200, cmap=plt.cm.jet, cmin=0, range=[[0,1e4],[0,1e3]]) \n",
2023-09-19 16:47:01 +02:00
"ax1.set_xlabel(\"p\")\n",
"ax1.set_ylabel(r\"$p_T$\")\n",
"ax1.set_title(\"lost electron momentum over transverse momentum\")\n",
"plt.colorbar(a1[3],ax=ax1)\n",
"\n",
"\"\"\"\n",
2023-09-20 10:52:44 +02:00
"B:\n",
2023-09-19 16:47:01 +02:00
"\n",
2023-09-20 10:52:44 +02:00
"D:\n",
"both: clustered between 2000<p<6000 and 20<pt<400 (found a little more spread)\n",
2023-09-19 16:47:01 +02:00
"\"\"\"\n",
"plt.show()"
]
2023-09-19 10:52:00 +02:00
},
{
"cell_type": "code",
2023-10-27 19:35:49 +02:00
"execution_count": 35,
2023-09-19 10:52:00 +02:00
"metadata": {},
2023-09-19 16:47:01 +02:00
"outputs": [
{
"data": {
2023-10-27 19:35:49 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABhsAAAImCAYAAABKGjtMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAC2uklEQVR4nOz9f5Aj6X3feX7QPZyhvRSJrpFupXHY5KCkuN3Y3QgRaJLW2Qr2iIA0fT7frciqbt30hU2H1FWWu+8iVpYaGutGnNGstoha+3xxN70iqq1Yrtc9K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AAAAAAAAPJsJpZRSlpICAAAAADygnETAAAApimTDxsKhcLIa3l5eeTzTqczXP9vdXXVuSYjAAAA5kOtVjtxjzh4HS9ECeQF4yYAAACcZmtrS+fOnYu1b4h7x4e8j5iwjY0NraysDAvUSBopVNTtdlWpVLSzszMsVrO4uKi9vT2trKykHi8AAAAmq9vtqtvtqtFoDAsrStLu7q7W19dPLWoJzCvGTQAAAIhiFqw/Tah7x8zVbKjVamq326d+Lmlkn42NDa2uripjpwIAAIAANjY2dOnSpZEHDZK0vr6udrt96r0jMK8YNwEAAOA09XpdnU5Hd+/e1b17907dN9S9Y6aWUWq1Wrp7966Wl5e1sbFx4vNer6etra3hyQ+cP39ekqzHAAAAYLatrKyceNAgSZ/73OdOLBsD5AHjJgAAAJxma2tLjz766DBL4TQh7x0z9bCh3W6r1+up1WppdXVV586dG1mD9+7du5KkUqk0ctzgojGrDQAAIB96vZ46nY4uXbo07VC
2023-09-19 16:47:01 +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",
2023-09-21 15:22:04 +02:00
"a0=ax0.hist2d(eta_found, p_found/(1e3), bins=200, cmap=plt.cm.jet, cmin=0, range=[[0,7],[0,50]])\n",
2023-09-19 16:47:01 +02:00
"ax0.set_xlabel(r\"$\\eta$\")\n",
2023-09-20 10:52:44 +02:00
"ax0.set_ylabel(r\"$p$ [GeV]\")\n",
2023-09-21 15:22:04 +02:00
"ax0.set_title(\"found eta and electron momentum\")\n",
2023-09-19 16:47:01 +02:00
"plt.colorbar(a0[3],ax=ax0)\n",
"\n",
2023-09-21 15:22:04 +02:00
"a1=ax1.hist2d(eta_lost, p_lost/(1e3), bins=200, cmap=plt.cm.jet, cmin=0, range=[[0,7],[0,50]])\n",
2023-09-19 16:47:01 +02:00
"ax1.set_xlabel(r\"$\\eta$\")\n",
2023-09-20 10:52:44 +02:00
"ax1.set_ylabel(r\"$p$ [GeV]\")\n",
2023-09-21 15:22:04 +02:00
"ax1.set_title(\"lost eta and electron momentum\")\n",
2023-09-19 16:47:01 +02:00
"plt.colorbar(a1[3],ax=ax1)\n",
"\n",
"\"\"\"\n",
2023-09-20 10:52:44 +02:00
"B:\n",
"particles with lower momentum appear to have lower rapidity as well, ie a larger angle to the beam axis.\n",
"D:\n",
"both: clustered between 3<eta<5 and 0<p<10GeV. it seems that most particles had a higher rapidity \n",
2023-09-19 16:47:01 +02:00
"\"\"\"\n",
"plt.show()"
]
2023-09-19 10:52:00 +02:00
},
{
"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",
2023-10-27 19:35:49 +02:00
"execution_count": 36,
2023-09-19 09:58:54 +02:00
"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}"
]
},
2023-10-27 19:35:49 +02:00
"execution_count": 36,
2023-09-19 09:58:54 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tracked[1].tolist()"
]
},
2023-09-14 12:07:57 +02:00
{
"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",
2024-02-13 13:01:49 +01:00
"version": "3.1.0"
2023-09-14 12:07:57 +02:00
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}