2023-09-25 10:22:31 +02:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 58,
|
2023-09-25 10:22:31 +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",
|
|
|
|
"from scipy.optimize import curve_fit\n",
|
|
|
|
"%matplotlib inline"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 59,
|
2023-09-25 10:22:31 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2023-09-25 11:05:16 +02:00
|
|
|
"410"
|
2023-09-25 10:22:31 +02:00
|
|
|
]
|
|
|
|
},
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 59,
|
2023-09-25 10:22:31 +02:00
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"file = uproot.open(\"tracking_losses_ntuple_Bd2KstEE.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\")\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"#selektiere Kaonen und Pionen aus K*->Kpi - B->K*ee - und nur solche mit einem momentum von ueber 5 GeV \n",
|
|
|
|
"allcolumns = file.arrays()\n",
|
2023-09-25 11:05:16 +02:00
|
|
|
"found = allcolumns[((allcolumns.isPion) | (allcolumns.isKaon)) & (~allcolumns.lost) & (allcolumns.fromSignal) & (allcolumns.p>5e3)] #B: 8126\n",
|
|
|
|
"lost = allcolumns[((allcolumns.isPion) | (allcolumns.isKaon)) & (allcolumns.lost) & (allcolumns.fromSignal) & (allcolumns.p>5e3)] #B: 410\n",
|
2023-09-25 10:22:31 +02:00
|
|
|
"\n",
|
2023-09-25 11:05:16 +02:00
|
|
|
"ak.num(lost, axis=0)\n",
|
2023-09-25 10:22:31 +02:00
|
|
|
"#ak.count(found, axis=None)\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 60,
|
2023-09-25 10:22:31 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2023-09-25 11:05:16 +02:00
|
|
|
"0.9519681349578257"
|
2023-09-25 10:22:31 +02:00
|
|
|
]
|
|
|
|
},
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 60,
|
2023-09-25 10:22:31 +02:00
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"def t_eff(found, lost):\n",
|
|
|
|
" sel = found[\"energy\"]\n",
|
|
|
|
" des = lost[\"energy\"]\n",
|
|
|
|
" return ak.count(sel,axis=None)/(ak.count(sel,axis=None)+ak.count(des,axis=None))\n",
|
|
|
|
"\n",
|
|
|
|
"t_eff(found, lost)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 61,
|
2023-09-25 11:05:16 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"#ist die shape der teilspur im scifi anders? (koenntest du zum beispiel durch vergleich der verteilungen der fit parameter studieren,\n",
|
|
|
|
"#in meiner thesis findest du das fitmodell -- ist einfach ein polynom dritten grades)\n",
|
|
|
|
"z_ref=8520 #mm\n",
|
|
|
|
"\n",
|
|
|
|
"def scifi_track(z, a, b, c, d):\n",
|
|
|
|
" return a + b*(z-z_ref) + c*(z-z_ref)**2 + d*(z-z_ref)**3\n",
|
|
|
|
"\n",
|
|
|
|
"def z_mag(xv, zv, tx, a, b):\n",
|
|
|
|
" \"\"\" optical centre of the magnet is defined as the intersection between the trajectory tangents before and after the magnet\n",
|
|
|
|
"\n",
|
|
|
|
" Args:\n",
|
|
|
|
" xv (double): velo x track\n",
|
|
|
|
" zv (double): velo z track\n",
|
|
|
|
" tx (double): velo x slope\n",
|
|
|
|
" a (double): ax parameter of track fit\n",
|
|
|
|
" b (double): bx parameter of track fit\n",
|
|
|
|
"\n",
|
|
|
|
" Returns:\n",
|
|
|
|
" double: z_mag\n",
|
|
|
|
" \"\"\"\n",
|
|
|
|
" return (xv-tx*zv-a+b*z_ref)/(b-tx)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 62,
|
2023-09-25 11:05:16 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"scifi_found = found[found[\"scifi_hit_pos_x_length\"]>3]\n",
|
|
|
|
"scifi_lost = lost[lost[\"scifi_hit_pos_x_length\"]>3]\n",
|
|
|
|
"\n",
|
|
|
|
"scifi_x_found = scifi_found[\"scifi_hit_pos_x\"]\n",
|
|
|
|
"scifi_z_found = scifi_found[\"scifi_hit_pos_z\"]\n",
|
|
|
|
"\n",
|
|
|
|
"tx_found = scifi_found[\"velo_track_tx\"]\n",
|
|
|
|
"\n",
|
|
|
|
"scifi_x_lost = scifi_lost[\"scifi_hit_pos_x\"]\n",
|
|
|
|
"scifi_z_lost = scifi_lost[\"scifi_hit_pos_z\"]\n",
|
|
|
|
"\n",
|
|
|
|
"tx_lost = scifi_lost[\"velo_track_tx\"]\n",
|
|
|
|
"\n",
|
|
|
|
"xv_found = scifi_found[\"velo_track_x\"]\n",
|
|
|
|
"zv_found = scifi_found[\"velo_track_z\"]\n",
|
|
|
|
"\n",
|
|
|
|
"xv_lost = scifi_lost[\"velo_track_x\"]\n",
|
|
|
|
"zv_lost = scifi_lost[\"velo_track_z\"]\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"#ak.num(scifi_found[\"energy\"], axis=0)\n",
|
|
|
|
"#scifi_found.snapshot()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 63,
|
2023-09-25 11:05:16 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"scifi_fitpars_found = ak.ArrayBuilder()\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0,ak.num(scifi_found[\"energy\"], axis=0)):\n",
|
|
|
|
" popt, pcov = curve_fit(scifi_track,ak.to_numpy(scifi_z_found[i,:]),ak.to_numpy(scifi_x_found[i,:]))\n",
|
|
|
|
" scifi_fitpars_found.begin_list()\n",
|
|
|
|
" scifi_fitpars_found.real(popt[0])\n",
|
|
|
|
" scifi_fitpars_found.real(popt[1])\n",
|
|
|
|
" scifi_fitpars_found.real(popt[2])\n",
|
|
|
|
" scifi_fitpars_found.real(popt[3])\n",
|
|
|
|
" scifi_fitpars_found.end_list()\n",
|
|
|
|
"\n",
|
|
|
|
"scifi_fitpars_lost = ak.ArrayBuilder()\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0,ak.num(scifi_lost[\"energy\"], axis=0)):\n",
|
|
|
|
" popt, pcov = curve_fit(scifi_track,ak.to_numpy(scifi_z_lost[i,:]),ak.to_numpy(scifi_x_lost[i,:]))\n",
|
|
|
|
" scifi_fitpars_lost.begin_list()\n",
|
|
|
|
" scifi_fitpars_lost.real(popt[0])\n",
|
|
|
|
" scifi_fitpars_lost.real(popt[1])\n",
|
|
|
|
" scifi_fitpars_lost.real(popt[2])\n",
|
|
|
|
" scifi_fitpars_lost.real(popt[3])\n",
|
|
|
|
" scifi_fitpars_lost.end_list()\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"scifi_fitpars_lost = scifi_fitpars_lost.to_numpy()\n",
|
|
|
|
"scifi_fitpars_found = scifi_fitpars_found.to_numpy()\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 64,
|
2023-09-25 10:22:31 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
2023-09-25 11:05:16 +02:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABPwAAANVCAYAAADsieBeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADt1ElEQVR4nOzdeVyU5f7/8ffI7oY7iyuaG26VpEEqmKm5ZaVHrY5ZqWVmplQmpom22GL+yHLJssjK5ZxjVqfM1I6QJi0qmqZtHhQjyMwUNWWR6/eHX+Y4MCDgwAzD6/l4zKPui899Xdd93zPw8TP3YjHGGAEAAAAAAABwC9WcPQEAAAAAAAAAjkPBDwAAAAAAAHAjFPwAAAAAAAAAN0LBDwAAAAAAAHAjFPwAAAAAAAAAN0LBDwAAAAAAAHAjFPwAAAAAAAAAN0LBDwAAAAAAAHAjFPwAAAAAAAAAN0LBD6ik1qxZow4dOsjPz08Wi0W7d+9WbGysLBaLTdzixYsVHx/vnEm6uJUrVyouLs7Z07hsCQkJslgsSkhIcPZUSiw+Pl4Wi0WHDh2yaZ85c6aaNWsmT09P1alTR5IUFRWlqKioS/bpCu91i8WiSZMmOXUOAIDKjzzv8jkjz4uKilLHjh0d3m+LFi101113Obzf8mSxWBQbG2vT9tlnnyksLEw1atSQxWLR+++/X2ROWND27dsVGxurEydOlNucL+Wuu+5SzZo1nTY+UFoU/IBK6Pfff9fo0aPVqlUrbdiwQUlJSWrTpo3GjRunpKQkm1gSwaK5S8GvMho0aJCSkpIUFBRkbfvggw/09NNP684771RiYqI2b94s6cJ7ePHixZfsk/c6AMAdkOc5BnmecyUlJWncuHHWZWOMRowYIS8vL3344YdKSkpSZGSk3ZzQnu3bt2vOnDlOLfgBlY2nsycAoPR+/PFH5eTk6O9//7siIyOt7dWrV1eTJk2cOLPCzp49K19f30LfSLuzs2fPys/Pz9nTKLO//vpL1atXL9cxGjZsqIYNG9q07du3T5I0efJkNWrUyNoeGhrq8PFzcnJksVjk6cmfQQCAayHPc22VPc87f/68cnNz5ePjU67jXHvttTbLv/76q44fP65bbrlFffr0sflZwZzQESr7cQIcgTP8gErmrrvuUo8ePSRJI0eOlMVisV7uWPBSjxYtWui7775TYmKiLBaLLBaLWrRoIel/l4G+8847io6OVmBgoPz8/BQZGank5GSbMXfs2KFRo0apRYsW8vPzU4sWLXTbbbfp8OHDNnH5p+Rv3LhR99xzjxo2bKjq1asrKytLP//8s+6++261bt1a1atXV+PGjTVkyBDt3bvXpo/8ea1cuVKPPfaYgoKCVLNmTQ0ZMkS//fabTp06pXvvvVcNGjRQgwYNdPfdd+v06dM2fRhjtHjxYl155ZXy8/NT3bp1NXz4cP33v/+1xkRFRenjjz/W4cOHrfvm4n2XnZ2tp556Su3atZOPj48aNmyou+++W7///rvNWC1atNDgwYP13nvv6aqrrpKvr6/mzJlT5PHbtGmThg4dqiZNmsjX11dXXHGF7rvvPh07dqzIdS72/fff68Ybb1T16tXVoEEDTZgwQadOnbIbu3nzZvXp00e1a9dW9erVdd111+mzzz6zicl/z+zatUvDhw9X3bp11apVqyLH/+uvv/TII48oJCREvr6+qlevnsLCwrRq1SqbuK+++kpDhgxR/fr15evrq1atWmnKlCnWnxe8fKNFixaaOXOmJCkgIMDmMpCSXNJbkvf622+/rYcffliNGzeWj4+Pfv75Z/3++++aOHGiQkNDVbNmTTVq1EjXX3+9tm7dWmiMrKwszZ07V+3bt5evr6/q16+v3r17a/v27UXOyxijGTNmyMvLS6+99lqx2wAAAHle5c7z8m3dulXXXnut/Pz81LhxY82aNUvnz5+/5Ho5OTmaNm2aAgMDVb16dfXo0UNff/213diMjAzdd999atKkiby9vRUSEqI5c+YoNzfXGnPo0CFZLBY9//zzeuqppxQSEiIfHx9t2bKlyDn885//VPfu3eXv76/q1aurZcuWuueee2xiTpw4oYcfflgtW7aUj4+PGjVqpIEDB+r777+3xlycy8XGxlqL1Y899pjNe7Ukl/TGxsbq0UcflSSFhIRYj2f+7WyKO06LFi1Sr1691KhRI9WoUUOdOnXS888/r5ycnELjbNiwQX369LFue/v27TVv3rwi5yVJX3zxhRo0aKDBgwfrzJkzxcYCFY1TG4BKZtasWerWrZseeOABPfPMM+rdu7dq165tN3bdunUaPny4/P39rZdEFvw2b8aMGbr66qv1+uuv6+TJk4qNjVVUVJSSk5PVsmVLSReShbZt22rUqFGqV6+e0tPTtWTJEl1zzTXav3+/GjRoYNPnPffco0GDBuntt9/WmTNn5OXlpV9//VX169fXs88+q4YNG+r48eN666231L17dyUnJ6tt27aF5tW7d2/Fx8fr0KFDeuSRR3TbbbfJ09NTXbp00apVq5ScnKwZM2aoVq1aWrhwoXXd++67T/Hx8Zo8ebKee+45HT9+XHPnzlVERIT27NmjgIAALV68WPfee68OHjyodevW2Yydl5enoUOHauvWrZo2bZoiIiJ0+PBhzZ49W1FRUdqxY4fNN4a7du3SgQMHNHPmTIWEhKhGjRpFHr+DBw8qPDxc48aNk7+/vw4dOqQFCxaoR48e2rt3r7y8vIpc97ffflNkZKS8vLy0ePFiBQQE6N1337V7z7h33nlHd955p4YOHaq33npLXl5eevXVV9W/f399+umnhb5ZvfXWWzVq1ChNmDCh2GQlOjpab7/9tp566ildddVVOnPmjPbt26c//v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2PUlmQceeMD88ccfpkePHqZx48aFjhcAAMUhz/ufypbnRUZG2s3pxo8fb6pVq2YOHz5c5LoHDhwwkmz
|
2023-09-25 10:22:31 +02:00
|
|
|
"text/plain": [
|
2023-09-25 11:05:16 +02:00
|
|
|
"<Figure size 1500x1000 with 4 Axes>"
|
2023-09-25 10:22:31 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
2023-09-25 11:05:16 +02:00
|
|
|
"output_type": "display_data"
|
2023-09-25 10:22:31 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2023-09-25 11:05:16 +02:00
|
|
|
"fig, ((ax0, ax1), (ax2, ax3)) = plt.subplots(nrows=2, ncols=2, figsize=(15,10))\n",
|
|
|
|
"\n",
|
|
|
|
"ax0.hist(scifi_fitpars_found[:,0], bins=100, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=r\"$a_x$ found\")\n",
|
|
|
|
"ax0.hist(scifi_fitpars_lost[:,0], bins=100, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=r\"$a_x$ lost\")\n",
|
|
|
|
"ax0.set_xlabel(\"a\")\n",
|
|
|
|
"ax0.set_ylabel(\"normed\")\n",
|
|
|
|
"ax0.set_title(\"fitparameter a der scifi track\")\n",
|
|
|
|
"ax0.legend()\n",
|
|
|
|
"\n",
|
|
|
|
"ax1.hist(scifi_fitpars_found[:,1], bins=100, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=r\"$b_x$ found\")\n",
|
|
|
|
"ax1.hist(scifi_fitpars_lost[:,1], bins=100, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=r\"$b_x$ lost\")\n",
|
|
|
|
"ax1.set_xlabel(\"b\")\n",
|
|
|
|
"ax1.set_ylabel(\"normed\")\n",
|
|
|
|
"ax1.set_title(\"fitparameter b der scifi track\")\n",
|
|
|
|
"ax1.legend()\n",
|
|
|
|
"\n",
|
|
|
|
"ax2.hist(scifi_fitpars_found[:,2], bins=200, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=r\"$c_x$ found\")\n",
|
|
|
|
"ax2.hist(scifi_fitpars_lost[:,2], bins=200, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=r\"$c_x$ lost\")\n",
|
|
|
|
"ax2.set_xlim([-1e-5,1e-5])\n",
|
|
|
|
"ax2.set_xticks(np.arange(-1e-5,1.5e-5,5e-6),minor=False)\n",
|
|
|
|
"ax2.set_xlabel(\"c\")\n",
|
|
|
|
"ax2.set_ylabel(\"normed\")\n",
|
|
|
|
"ax2.set_title(\"fitparameter c der scifi track\")\n",
|
|
|
|
"ax2.legend()\n",
|
|
|
|
"\n",
|
|
|
|
"ax3.hist(scifi_fitpars_found[:,3], bins=200, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=r\"$d_x$ found\")\n",
|
|
|
|
"ax3.hist(scifi_fitpars_lost[:,3], bins=200, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=r\"$d_x$ lost\")\n",
|
|
|
|
"ax3.set(xlim=(-2e-8,2e-8))\n",
|
|
|
|
"ax3.set_xlabel(\"d\")\n",
|
|
|
|
"ax3.set_ylabel(\"normed\")\n",
|
|
|
|
"ax3.set_title(\"fitparameter d der scifi track\")\n",
|
|
|
|
"ax3.legend()\n",
|
|
|
|
"\n",
|
|
|
|
"\"\"\"\n",
|
|
|
|
"a_x: virtual hit on the reference plane\n",
|
|
|
|
"\"\"\"\n",
|
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
2023-09-25 10:22:31 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 65,
|
2023-09-25 11:05:16 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"found\n",
|
|
|
|
"a = 1.3758753561567658\n",
|
|
|
|
"b = 1.4867317350363123e-05\n",
|
|
|
|
"c = 1.0611928711675984e-09\n",
|
|
|
|
"d = 2.524323901023556e-12\n",
|
|
|
|
"lost\n",
|
|
|
|
"a = 19.655460959039587\n",
|
|
|
|
"b = -0.0007972008149349264\n",
|
|
|
|
"c = -1.6113881305735422e-07\n",
|
|
|
|
"d = 8.074893917737833e-11\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"\"\"\"\n",
|
|
|
|
"Electrons\n",
|
|
|
|
"found\n",
|
|
|
|
"a = -0.6718207391527037 b = 0.0013778237292529144 c = 3.3126998287416195e-08 d = -1.0330674442255529e-10\n",
|
|
|
|
"lost\n",
|
|
|
|
"a = -36.98764338200992 b = -0.015685137956233643 c = -8.265859479503501e-07 d = -1.541510766903436e-11\n",
|
|
|
|
"\n",
|
|
|
|
"Kaon and Pions\n",
|
|
|
|
"found\n",
|
|
|
|
"a = 1.3758753561567658 b = 1.4867317350363123e-05 c = 1.0611928711675984e-09 d = 2.524323901023556e-12\n",
|
|
|
|
"lost\n",
|
|
|
|
"a = 19.655460959039587 b = -0.0007972008149349264 c = -1.6113881305735422e-07 d = 8.074893917737833e-11\n",
|
|
|
|
"\n",
|
|
|
|
"Kaons\n",
|
|
|
|
"found\n",
|
|
|
|
"a = 1.553371699292705\t\tb = 8.625619976952656e-05\t\tc = 3.1024420569192613e-09\t\td = -2.028183118694356e-13\n",
|
|
|
|
"lost\n",
|
|
|
|
"a = 50.918713410777336\t\tb = 0.005102900113795297\t\tc = -7.416239379215659e-09\t\td = 5.64633728533602e-11\n",
|
|
|
|
"\n",
|
|
|
|
"Pions\n",
|
|
|
|
"found\n",
|
|
|
|
"a = 1.1512709788236055\t\tb = -7.54683774644083e-05\t\tc = -1.5218096529826036e-09\t\td = 5.975257412125118e-12\n",
|
|
|
|
"lost\n",
|
|
|
|
"a = -3.625684483743866\t\tb = -0.005190892995904242\t\tc = -2.7561307005171267e-07\t\td = 9.883393537611524e-11\n",
|
|
|
|
"\"\"\"\n",
|
|
|
|
"\n",
|
|
|
|
"print(\"found\")\n",
|
|
|
|
"print(\"a = \", str(np.mean(scifi_fitpars_found[:,0])))\n",
|
|
|
|
"print(\"b = \", str(np.mean(scifi_fitpars_found[:,1])))\n",
|
|
|
|
"print(\"c = \", str(np.mean(scifi_fitpars_found[:,2])))\n",
|
|
|
|
"print(\"d = \", str(np.mean(scifi_fitpars_found[:,3])))\n",
|
|
|
|
"\n",
|
|
|
|
"print(\"lost\")\n",
|
|
|
|
"print(\"a = \", str(np.mean(scifi_fitpars_lost[:,0])))\n",
|
|
|
|
"print(\"b = \", str(np.mean(scifi_fitpars_lost[:,1])))\n",
|
|
|
|
"print(\"c = \", str(np.mean(scifi_fitpars_lost[:,2])))\n",
|
|
|
|
"print(\"d = \", str(np.mean(scifi_fitpars_lost[:,3])))\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 66,
|
2023-09-25 11:05:16 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABQEAAAIhCAYAAAD+cXzUAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd5gcV5X4/W/nnKd7ctaMsjSyspMsy3KSwcY2wYADmTWwGLwsLPsDTFgbzO7Cy4JhEzmYZddEY4NzkmRla0YTNTl2T+fcVV1V7x9jDRaSbVkOsuT7eR4/fqa6uupWd4/6zKl7z9FpmqYhCIIgCIIgCIIgCIIgCMIZS3+qByAIgiAIgiAIgiAIgiAIwqtLJAEFQRAEQRAEQRAEQRAE4QwnkoCCIAiCIAiCIAiCIAiCcIYTSUBBEARBE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am5uxWCw88sgjFItFbr31Vjo6OvB4PPj9fjZu3Mhvf/vbY86hqir/9m//RkdHBzabDa/Xy4YNG/jd7373gmO76667MBqNfOELX5jf9t3vfpeVK1fidDpxuVwsWrSIz372sy96nfF4nJtvvpna2lrMZjMtLS384z/+I6VS6ahrffDBB+np6Zl/HV5oWezDDz/MBRdcQCAQwGaz0dDQwDXXXEM+n5/fp1Qq8aUvfYnFixdjtVoJBAJs3ryZ7du3z+/z3OXAR5YZlctlvvvd7x71fpzocuAjMpkMf/M3f0NFRQWBQICrr76aqampo/Z57nLgkZERgsEgAF/84hfnz31kbLOzs3zwgx+kvr4ei8VCMBjknHPO4cEHHzyh8QiCIAjCmer73/8+K1euxGq14vf7ectb3kJPT89R+wwNDfGOd7yDmpoaLBYLlZWVbNmyZb6sTFNTE4cOHeKxxx6b/w5+oRldOp2OXC7Hj370o/n9j3ynH4kn/vznP/Pe976XYDCI3W6nVCpx+PBh3vOe99DW1obdbqe2tpY3velNdHZ2HnOOZDLJrbfeSktLCxaLhVAoxOWXX05vb+/zjkuWZW688UacTud8zJrP5/m7v/s7mpub51+jNWvW8Itf/OJFX9uuri6uvPJKfD4fVquVjo4OfvSjH80//kKx0/M5kXhycnJyPu4xm83U1NRw7bXXEg6HgWOXA7/Q3wknuhz4iMOHD3P55ZfjdDqpr6/n1ltvnY9Zj3jucuAf/vCHvPWtbwVg8+bN86/BkbHt37+fK664glAohMVioaamhm3btjExMXHCYxIE4S/ETEBBeIP43Oc+x7p16/jIRz7C7bffzubNm+eXcf785z/nXe96FxdffDG/+MUvKJVK3HnnnVxwwQU89NBD80HBS3Xvvfeye/duvvSlL+F0Ornzzjt5y1veQl9fHy0tLQA89NBDXHnllWzcuJG7774bRVG4884754OUF3LXXXfxwQ9+kMHBQX79618fd59vfetbtLe388///M+43W7a2toolUrE43H+7u/+jtraWiRJ4sEHH+Tqq6/mBz/4ATfccMP882+66SZ++tOf8r73vY8vfelLmM1m9u3b97w1SzRN41Of+hTf+ta3+K//+q/5JNTdd9/NzTffzMc+9jH++Z//Gb1ez+HDh+nu7n7BaywWi2zevJnBwUG++MUvsmLFCp544gnuuOMODhw4wL333ju/pOPmm28mlUrxs5/9DHj+mXIjIyNs27aN8847j+9///t4vV4mJye5//77kSQJu91OuVzmsssu44knnuCWW27hwgsvpFwus3PnTsbGxjj77LOPOe62bdvYsWMHGzdu5Nprr+XWW299wWt7Ie9///vZtm0bP//5zxkfH+dTn/oU7373u3n44YePu391dTX3338/l156Ke973/t4//vfDzCfGLz++uvZt28f//RP/0R7ezvJZJJ9+/YRi8VOeoyCIAiCcLq74447+OxnP8t1113HHXfcQSwW47bbbmPjxo3s3r2btrY2AC6//PL5GK2hoYFoNMr27dtJJpPAXHmQa6+9Fo/HM1+u44VWXuzYsYMLL7yQzZs387nPfQ7guOVFtm3bxk9+8hNyuRwmk4mpqSkCgQBf/epXCQaDxONxfvSjH7F+/Xr279/PwoULgbmbieeeey4jIyN8+tOfZv369WSzWR5//HGmp6dZtGjRMWNKJpNcffXV9PT08Nhjj7F69WoAPvnJT/KTn/yEr3zlK6xatYpcLkdXV9eLxhB9fX2cffbZhEIhvvWtbxEIBPjpT3/KTTfdRDgc5u///u9fcux0IvHk5OQka9euRZZlPvvZz7JixQpisRh/+tOfSCQSVFZWHnPcF/o74aWQZZk3v/nNvO997+PWW2/l8ccf58tf/jIej4fPf/7zx33Otm3buP322/nsZz/Ld77zHc466ywAWltbyeVybN26lebmZr7zne9QWVnJzMwMjzzyCJlM5iWPTxAEQBME4Q3jkUce0QDtV7/61fw2RVG0mpoabfny5ZqiKPPbM5mMFgqFtLPPPnt+24033qg1NjYec9wvfOEL2l//cwJolZWVWjqdnt82MzOj6fV67Y477pjftn79eq2mpkYrFArz29LptOb3+4855vFs27btuGMaHh7WAK21tVWTJOkFj1EulzVZlrX3ve992qpVq+a3P/744xqg/eM//uMLPr+xsVHbtm2bls/ntWuuuUbzeDzagw8+eNQ+H/3oRzWv1/ui1/PXvve972mA9j//8z9Hbf/a176mAdqf//zn+W2bNm3Sli5d+qLH/N///V8N0A4cOPC8+/z4xz/WAO0///M/X/BYjY2N2o033njUNkD7yEc+ctS2I5+9Rx555AWP94Mf/EADtJtvvvmo7XfeeacGaNPT0/PbNm3apG3atGn+59nZWQ3QvvCFLxxzXKfTqd1yyy0veG5BEARBOJMd+Y4dHh7WNE3TEomEZrPZtMsvv/yo/cbGxjSLxaK9853v1DRN06LRqAZo3/zmN1/w+EuXLj3
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 1500x600 with 2 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(15,6))\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0,ak.num(scifi_found[\"energy\"], axis=0)):\n",
|
|
|
|
" z_coord = np.linspace(scifi_z_found[i,0],12000,300)\n",
|
|
|
|
" fit = scifi_track(z_coord, *scifi_fitpars_found[i])\n",
|
|
|
|
" ax0.plot(z_coord, fit, \"-\", lw=0.5)\n",
|
|
|
|
" ax0.errorbar(ak.to_numpy(scifi_z_found[i,:]),ak.to_numpy(scifi_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 scifi hits\")\n",
|
|
|
|
"ax0.set(xlim=(7e3,12000), ylim=(-4000,4000))\n",
|
|
|
|
"ax0.grid()\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0,ak.num(scifi_lost[\"energy\"], axis=0)):\n",
|
|
|
|
" z_coord = np.linspace(scifi_z_lost[i,0],12000,300)\n",
|
|
|
|
" fit = scifi_track(z_coord, *scifi_fitpars_lost[i])\n",
|
|
|
|
" ax1.plot(z_coord, fit, \"-\", lw=0.5)\n",
|
|
|
|
" ax1.errorbar(ak.to_numpy(scifi_z_lost[i,:]),ak.to_numpy(scifi_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 scifi hits\")\n",
|
|
|
|
"ax1.set(xlim=(7e3,12000), ylim=(-4000,4000))\n",
|
|
|
|
"ax1.grid()\n",
|
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 73,
|
2023-09-25 10:22:31 +02:00
|
|
|
"metadata": {},
|
2023-09-25 11:39:04 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"found \n",
|
|
|
|
"zmag = 5196.312017664934\n",
|
|
|
|
"lost \n",
|
|
|
|
"zmag = 5200.71031871899\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2023-09-25 11:05:16 +02:00
|
|
|
"source": [
|
|
|
|
"#vergleich der zmag werte\n",
|
|
|
|
"zmag_found = z_mag(xv_found, zv_found, tx_found, scifi_fitpars_found[:,0], scifi_fitpars_found[:,1])\n",
|
|
|
|
"zmag_lost = z_mag(xv_lost, zv_lost, tx_lost, scifi_fitpars_lost[:,0], scifi_fitpars_lost[:,1])\n",
|
|
|
|
"zmag_lost = zmag_lost[~np.isnan(zmag_lost)]\n",
|
2023-09-25 11:39:04 +02:00
|
|
|
"zmag_found = zmag_found[~np.isnan(zmag_found)]\n",
|
|
|
|
"\n",
|
|
|
|
"print(\"found \\nzmag = \", str(np.mean(zmag_found)))\n",
|
|
|
|
"print(\"lost \\nzmag = \", str(np.mean(zmag_lost)))"
|
2023-09-25 11:05:16 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-09-25 11:39:04 +02:00
|
|
|
"execution_count": 71,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"zmag= 5196.312017664934\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 74,
|
2023-09-25 11:05:16 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHNCAYAAABSNnx+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABaSElEQVR4nO3deVwV9f4/8NeJ5bAIqCAcSFaXBNEsMJREcAHF0lJTbEHJpcuVMiSt0LySlZqRoVeU2831tvHrq3ZNuSqmkAUaIioKFRWKKUSQgivr5/eHl7kcOMDhcHAQXs/HYx5yPvOez7xnPmd5OzNnjkIIIUBEREREsrhP7gSIiIiIujIWY0REREQyYjFGREREJCMWY0REREQyYjFGREREJCMWY0REREQyYjFGREREJCMWY0REREQyYjFGREREJCMWY0REREQyYjFGREREJCMWY3TPSUtLQ0xMDK5evapVfExMDBQKBUpKSpqN27ZtGxQKBc6fP9+qfLTtv6PQtJ1N7VNd9wm1Xnvv67b039rXXGvUvX7upsTERAwcOBCmpqZQKBQ4depUq14XxH2jbyzG6J6TlpaGN998U+9vAo899hjS09Nhb2+v1347Gk3b2dQ+7Sr7hJrXXq85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477yAmJgZbtmzBzJkzG80/c+YMvv/+e+zatQtbtmyBr68vxowZg3Xr1mHt2rWYPHkytm3bhuXLl+PatWuIjo7G8OHDcfnyZYwYMQJff/01AgMDsXj
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 640x480 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"plt.hist(zmag_found, bins=2000, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=\"found\")\n",
|
|
|
|
"plt.hist(zmag_lost, bins=500, density=True, alpha=0.5, histtype=\"bar\",color=\"darkorange\", label=\"lost\")\n",
|
|
|
|
"plt.xlabel(\"$z_{mag}$ [mm]\")\n",
|
|
|
|
"plt.ylabel(\"normed\")\n",
|
|
|
|
"plt.title(\"magnet kick position $z_{mag}$ calculated w fitparameters\")\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"plt.xticks(np.arange(4800,5800,5), minor=True)\n",
|
|
|
|
"plt.yticks(np.arange(0,0.015,0.001), minor=True)\n",
|
|
|
|
"plt.xlim(4800,5800)\n",
|
|
|
|
"\n",
|
|
|
|
"\"\"\"\n",
|
|
|
|
"wir können einen radikalen unterschied für den z_mag wert erkennen, zwischen den found and lost elektronen.\n",
|
|
|
|
"\"\"\"\n",
|
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
2023-09-25 10:22:31 +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",
|
|
|
|
"version": "3.11.5"
|
|
|
|
},
|
|
|
|
"orig_nbformat": 4
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 2
|
|
|
|
}
|