2024-01-23 16:00:16 +01:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-01-31 11:58:35 +01:00
|
|
|
"execution_count": 1,
|
2024-01-23 16:00:16 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"import uproot\t\n",
|
|
|
|
"import numpy as np\n",
|
|
|
|
"import matplotlib.pyplot as plt\n",
|
|
|
|
"from mpl_toolkits import mplot3d\n",
|
|
|
|
"import awkward as ak\n",
|
|
|
|
"from scipy.optimize import curve_fit\n",
|
|
|
|
"from methods.fit_linear_regression_model import fit_linear_regression_model\n",
|
|
|
|
"import sklearn\n",
|
|
|
|
"%matplotlib inline"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-01-31 11:58:35 +01:00
|
|
|
"execution_count": 2,
|
2024-01-23 16:00:16 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2024-01-26 11:34:42 +01:00
|
|
|
"41978 8523\n",
|
|
|
|
"92337\n"
|
2024-01-23 16:00:16 +01:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"file = uproot.open(\n",
|
2024-01-26 11:34:42 +01:00
|
|
|
" \"tracking_losses_ntuple_B_EndVeloP.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\"\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
")\n",
|
|
|
|
"\n",
|
|
|
|
"# selektiere nur elektronen von B->K*ee\n",
|
|
|
|
"allcolumns = file.arrays()\n",
|
2024-01-31 11:58:35 +01:00
|
|
|
"found = allcolumns[(allcolumns.isElectron) & (~allcolumns.lost) &\n",
|
|
|
|
" (allcolumns.fromB)] # B: 9056\n",
|
|
|
|
"lost = allcolumns[(allcolumns.isElectron) & (allcolumns.lost) &\n",
|
|
|
|
" (allcolumns.fromB)] # B: 1466\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
"\n",
|
2024-01-28 16:15:00 +01:00
|
|
|
"electrons = allcolumns[(allcolumns.isElectron) & (allcolumns.fromB)]\n",
|
|
|
|
"\n",
|
2024-01-31 11:58:35 +01:00
|
|
|
"notelectrons = allcolumns[(~allcolumns.isElectron) & (allcolumns.fromB) &\n",
|
|
|
|
" (~allcolumns.lost)]\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
"\n",
|
|
|
|
"print(ak.num(found, axis=0), ak.num(lost, axis=0))\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
"print(ak.num(notelectrons, axis=0))\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
"# ak.count(found, axis=None)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-01-31 11:58:35 +01:00
|
|
|
"execution_count": 3,
|
2024-01-23 16:00:16 +01:00
|
|
|
"metadata": {},
|
2024-01-26 11:34:42 +01:00
|
|
|
"outputs": [],
|
2024-01-23 16:00:16 +01:00
|
|
|
"source": [
|
|
|
|
"rad_length_found = ak.to_numpy(found[\"rad_length_frac\"])\n",
|
|
|
|
"eta_found = ak.to_numpy(found[\"eta\"])\n",
|
|
|
|
"rad_length_lost = ak.to_numpy(lost[\"rad_length_frac\"])\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
"eta_lost = ak.to_numpy(lost[\"eta\"])"
|
2024-01-23 16:00:16 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-01-31 11:58:35 +01:00
|
|
|
"execution_count": 19,
|
2024-01-23 16:00:16 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
2024-01-31 11:58:35 +01:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABkMAAAL5CAYAAAADsVMKAAAAOXRF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XVVS0tLnrf+CWvrra0kaXl5OdL6t+rnPTDo67Azr2H4mWkb5LkPw8/j1t95/Yr6fLbmVq1WOxMPO2/DFfXvt2F9LwIAAAwaK0MAAAD2mWKx2LkX/fz8vE6fPi3HcfTiiy8a17H1w0W/fQraH4QP8lvhUu+3iYKUy+VUr9e1srIy0Ncnm812bslTq9Ui2SOim7Dvgbiuw7D9zEiDP/ett2xqNpuxnNNO6XQ6snYHcT5bfx+3b8GVTqe33YYr6t9vw/heBAAAiAMrQwAAAPaZ2dnZzodc1WpVp06d2vacqa0rTLy0P7xrb0Y8KDtv9+Ol1Wr1tMnwIAxqH41eFItF1et1zc7ODvyDzq0bvi8sLAzs/MO8B+K8DltzHIafmTjOfesH+sNwq6Wde3P0ahDns/V3b6VSUaVS2bV30yB+vw3TexEAACAuTIYAAADsQ1tvweI4TteN04NujdL+NrPjOJ7fWG5/YNjLxuxhbN0z4NSpU54fuM/MzES6MiHoGnXLYxhuOdP+QHViYqLnY3vNP5VKdb7xLm2+PqYWFhaMP3QO8x6I8zpIw/Uz08+596L9mszPzw+0HRPt/Tn6MYjz2Xlrsp23LBzE77dhei8CAADEhckQAACAEdX+wKzbB11zc3Od/ze5p363D9/m5uY6x239sLut/SHb1ri2fiYE2rl8//vf3/Z8O4dWq6VMJrPtQ3THcZTJZGT
|
2024-01-23 16:00:16 +01:00
|
|
|
"text/plain": [
|
2024-01-24 16:17:45 +01:00
|
|
|
"<Figure size 2000x800 with 3 Axes>"
|
2024-01-23 16:00:16 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2024-01-27 14:02:41 +01:00
|
|
|
"endVeloP_found = ak.to_numpy(found[\"p_end_velo\"])\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
"trueP_found = ak.to_numpy(found[\"p\"])\n",
|
|
|
|
"\n",
|
2024-01-27 14:02:41 +01:00
|
|
|
"endVeloP_lost = ak.to_numpy(lost[\"p_end_velo\"])\n",
|
2024-01-26 11:34:42 +01:00
|
|
|
"trueP_lost = ak.to_numpy(lost[\"p\"])\n",
|
|
|
|
"\n",
|
2024-01-31 11:58:35 +01:00
|
|
|
"endUTP_found = ak.to_numpy(found[\"p_end_ut\"])\n",
|
|
|
|
"endUTP_lost = ak.to_numpy(lost[\"p_end_ut\"])\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
"\n",
|
2024-01-28 16:15:00 +01:00
|
|
|
"stretch_factor = ak.num(trueP_lost, axis=0) / ak.num(trueP_found, axis=0)\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
"\n",
|
2024-01-31 11:58:35 +01:00
|
|
|
"nbins = 80\n",
|
|
|
|
"vmax = 150\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
"\n",
|
|
|
|
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20, 8))\n",
|
|
|
|
"\n",
|
|
|
|
"a0 = ax0.hist2d(\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
" trueP_found,\n",
|
|
|
|
" endVeloP_found,\n",
|
|
|
|
" density=False,\n",
|
|
|
|
" bins=nbins,\n",
|
|
|
|
" cmap=plt.cm.jet,\n",
|
|
|
|
" cmin=1,\n",
|
|
|
|
" vmax=vmax,\n",
|
2024-01-28 16:15:00 +01:00
|
|
|
" range=[[0, 20000], [0, 20000]],\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
")\n",
|
2024-01-31 11:58:35 +01:00
|
|
|
"ax0.set_xlabel(f\"True $P$ [MeV]\")\n",
|
|
|
|
"ax0.set_ylabel(f\"EndVelo $P$ [MeV]\")\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
"ax0.set_title(f\"found P\")\n",
|
|
|
|
"\n",
|
|
|
|
"a1 = ax1.hist2d(\n",
|
2024-01-28 16:15:00 +01:00
|
|
|
" # trueP_notelectrons,\n",
|
|
|
|
" # endVeloP_notelectrons,\n",
|
|
|
|
" trueP_lost,\n",
|
|
|
|
" endVeloP_lost,\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
" density=False,\n",
|
|
|
|
" bins=nbins,\n",
|
|
|
|
" cmap=plt.cm.jet,\n",
|
|
|
|
" cmin=1,\n",
|
|
|
|
" vmax=vmax * stretch_factor,\n",
|
2024-01-28 16:15:00 +01:00
|
|
|
" range=[[0, 20000], [0, 20000]],\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
")\n",
|
2024-01-31 11:58:35 +01:00
|
|
|
"ax1.set_xlabel(f\"True $P$ [MeV]\")\n",
|
|
|
|
"ax1.set_ylabel(f\"EndVelo $P$ [MeV]\")\n",
|
2024-01-26 11:34:42 +01:00
|
|
|
"ax1.set_title(f\"lost P\")\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
"\n",
|
2024-01-26 11:34:42 +01:00
|
|
|
"plt.suptitle(\"Momentum at Creation and EndVelo\")\n",
|
2024-01-24 16:17:45 +01:00
|
|
|
"plt.colorbar(a0[3], ax=ax1)\n",
|
2024-01-23 16:00:16 +01:00
|
|
|
"plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-01-31 11:58:35 +01:00
|
|
|
"execution_count": 21,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABkMAAAL5CAYAAAADsVMKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAADDYklEQVR4nOz9cZAb933nfX6alMyMIpHgKLGePNrbUBi6Evk5O1JjrPg2u9GtBNjJprRXj2aGrD3eJrmsCMTP7O3VaW1iuX52Kd7FGWEerVyVq7ENUK5NdktVSw5oV53OjxMDsqNNNhtbgzbXep4oT8yBJo6lRDppCFH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b1MVJbHy83iHNxEJ+1nZwD/RjEexDWMJxT09PTkjb+bTAZULlw4ULn/QcAAEAwBkMAAAD2oPaXsL2+PD116lTn/02eqd/rC91Tp051tms/Mmiz9he3m+PadvKFejuXt956q+v37RxarZYymUzXF42O4yiTyci2beO74L1y3DyDZnMbm49zu41yudy17eYvqrd+ETqIY+Kl3db58+e7fr/5C97N77nJPkep/aX15jvx/Xgdu83nxNYvwlutli5cuCCpv/3Y/NnxWmcn6nNxJ581L/2eA6b1bTWI9yCMYTmnSqVS5/P08MMP++73zMyMJicnjXMGAAAAgyEAAAB7UvtLua1fdra1v9T1WjC5Vqt1/v/FF1/0jEmn06pUKpqfn+/8vtlsamZmRvl8vueXt+0vWXt92br5y8GlpaVt5V4LVE9PT3fuum42m8pkMrIsS5ZlKZPJaHJyclsu7Tp6fSHZ/l2vL0X
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 2000x800 with 3 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"nbins = 80\n",
|
|
|
|
"vmax = 150\n",
|
|
|
|
"\n",
|
|
|
|
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20, 8))\n",
|
|
|
|
"\n",
|
|
|
|
"a0 = ax0.hist2d(\n",
|
|
|
|
" # endVeloP_found,\n",
|
|
|
|
" trueP_found,\n",
|
|
|
|
" endUTP_found,\n",
|
|
|
|
" density=False,\n",
|
|
|
|
" bins=nbins,\n",
|
|
|
|
" cmap=plt.cm.jet,\n",
|
|
|
|
" cmin=1,\n",
|
|
|
|
" vmax=vmax,\n",
|
|
|
|
" range=[[0, 20000], [0, 20000]],\n",
|
|
|
|
")\n",
|
|
|
|
"ax0.set_ylabel(f\"EndUT $P$ [MeV]\")\n",
|
|
|
|
"ax0.set_xlabel(f\"EndVelo $P$ [MeV]\")\n",
|
|
|
|
"ax0.set_title(f\"found P\")\n",
|
|
|
|
"\n",
|
|
|
|
"a1 = ax1.hist2d(\n",
|
|
|
|
" # endVeloP_lost,\n",
|
|
|
|
" trueP_lost,\n",
|
|
|
|
" endUTP_lost,\n",
|
|
|
|
" density=False,\n",
|
|
|
|
" bins=nbins,\n",
|
|
|
|
" cmap=plt.cm.jet,\n",
|
|
|
|
" cmin=1,\n",
|
|
|
|
" vmax=vmax * stretch_factor,\n",
|
|
|
|
" range=[[0, 20000], [0, 20000]],\n",
|
|
|
|
")\n",
|
|
|
|
"ax1.set_ylabel(f\"EndUT $P$ [MeV]\")\n",
|
|
|
|
"ax1.set_xlabel(f\"EndVelo $P$ [MeV]\")\n",
|
|
|
|
"ax1.set_title(f\"lost P\")\n",
|
|
|
|
"\n",
|
|
|
|
"plt.suptitle(\"Momentum at EndVelo and EndUT\")\n",
|
|
|
|
"plt.colorbar(a0[3], ax=ax1)\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 20,
|
2024-01-23 16:00:16 +01:00
|
|
|
"metadata": {},
|
2024-01-26 11:34:42 +01:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
2024-01-31 11:58:35 +01:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAHJCAYAAACIU0PXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABkjUlEQVR4nO3dcZAb130n+C9ESmNpuSI41Nnl+E4a9ii1pVQSi42RHV9uw42IluPzJhdrAPJSm4u9Jw1gZba2bn3ytCa+W1G3iUFMeN7azU0kYOiN4jpXjgTobK035cQN2aa3smubgzZt5yRnLTRHji0nXmoGnPBMUeaw749htwD0DzMP6AYGGHw/VSjOPLzufmhwBm+6f+/3i7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l5PG9GBx8LwbJ5sdwPz4vRm2ZuPJrzeVyWF1dRalUQqVS8csqJJNJmKaJo0eP9myQw8b7j/prv/ZruPPOO8U+TPTXH2NjYzhx4sROD4PA92KQ8L3ojFwR/G+Fng8IbZ9DcF1S4/5+DKA/ExxewWmjWq0im836E5tUKoV8Ps8SDFs4d+7cwGd6JCKiXjNuPTyNmYy93MDDr16vI5fLAQDy+fyWfSuVCtLptF9I22PbNnK5HDRNQ71eh2EYSKVSXY2no8mY67qYm5vD/Pw842uIiIiGSC9vUVUqFRQKBZTLZWQymW33IxXgdhwHiUSiqQzE5OQkVldXlfbZSvm1apoG27aZzI+IiGgI9fIWVTKZRDKZRCwW23YfpmlC0zSsrq42tWezWSSTyaY7H6Zp+mlnOqVcqqFQKHByQ0R
|
2024-01-26 11:34:42 +01:00
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 640x480 with 2 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"a0 = plt.hist2d(\n",
|
|
|
|
" trueP_found,\n",
|
|
|
|
" endVeloP_found,\n",
|
2024-01-31 11:58:35 +01:00
|
|
|
" # endUTP_found,\n",
|
2024-01-26 11:34:42 +01:00
|
|
|
" density=False,\n",
|
|
|
|
" bins=nbins,\n",
|
|
|
|
" cmap=plt.cm.jet,\n",
|
|
|
|
" cmin=1,\n",
|
2024-01-31 11:58:35 +01:00
|
|
|
" vmax=150,\n",
|
2024-01-28 16:15:00 +01:00
|
|
|
" range=[[0, 20000], [0, 20000]],\n",
|
2024-01-26 11:34:42 +01:00
|
|
|
")\n",
|
2024-01-27 14:02:41 +01:00
|
|
|
"plt.xlabel(f\"True $P$ [MeV]\")\n",
|
|
|
|
"plt.ylabel(f\"EndVelo $P$ [MeV]\")\n",
|
2024-01-26 11:34:42 +01:00
|
|
|
"plt.title(f\"found P\")\n",
|
|
|
|
"plt.colorbar(a0[3])\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
2024-01-23 16:00:16 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
|
|
|
"display_name": "tuner",
|
|
|
|
"language": "python",
|
|
|
|
"name": "python3"
|
|
|
|
},
|
|
|
|
"language_info": {
|
|
|
|
"codemirror_mode": {
|
|
|
|
"name": "ipython",
|
|
|
|
"version": 3
|
|
|
|
},
|
|
|
|
"file_extension": ".py",
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
"name": "python",
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
"pygments_lexer": "ipython3",
|
|
|
|
"version": "3.10.12"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 2
|
|
|
|
}
|