2023-09-28 15:50:32 +02:00
{
"cells": [
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 21,
2023-09-28 15:50:32 +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",
2023-09-29 12:21:18 +02:00
"from mpl_toolkits.axes_grid1 import ImageGrid\n",
2023-09-28 15:50:32 +02:00
"%matplotlib inline"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 22,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"9056"
]
},
2023-10-02 16:21:00 +02:00
"execution_count": 22,
2023-09-28 15:50:32 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"file = uproot.open(\"tracking_losses_ntuple_Bd2KstEE.root:PrDebugTrackingLosses.PrDebugTrackingTool/Tuple;1\")\n",
"\n",
"#selektiere nur elektronen von B->K*ee und nur solche mit einem momentum von ueber 5 GeV \n",
"allcolumns = file.arrays()\n",
"found = allcolumns[(allcolumns.isElectron) & (~allcolumns.lost) & (allcolumns.fromSignal) & (allcolumns.p > 5e3)] #B: 9056\n",
"lost = allcolumns[(allcolumns.isElectron) & (allcolumns.lost) & (allcolumns.fromSignal) & (allcolumns.p > 5e3)] #B: 1466\n",
"\n",
"ak.num(found, axis=0)\n",
"#ak.count(found, axis=None)"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 23,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.8606728758791105"
]
},
2023-10-02 16:21:00 +02:00
"execution_count": 23,
2023-09-28 15:50:32 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def t_eff(found, lost, axis = 0):\n",
" sel = ak.num(found, axis=axis)\n",
" des = ak.num(lost, axis=axis)\n",
" return sel/(sel + des)\n",
"\n",
"t_eff(found, lost)"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 24,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"sample size: 32\n",
"eff (cutoff = 0 ) = 0.96875\n",
"sample size: 32\n",
"eff (cutoff = 50 ) = 0.96875\n",
"sample size: 32\n",
"eff (cutoff = 100 ) = 0.96875\n",
"sample size: 43\n",
"eff (cutoff = 150 ) = 0.9767441860465116\n",
"sample size: 65\n",
"eff (cutoff = 200 ) = 0.9692307692307692\n",
"sample size: 97\n",
"eff (cutoff = 250 ) = 0.9587628865979382\n",
"sample size: 129\n",
"eff (cutoff = 300 ) = 0.9457364341085271\n",
"sample size: 150\n",
"eff (cutoff = 350 ) = 0.9533333333333334\n",
"sample size: 169\n",
"eff (cutoff = 400 ) = 0.9408284023668639\n",
"sample size: 197\n",
"eff (cutoff = 450 ) = 0.9390862944162437\n",
"sample size: 227\n",
"eff (cutoff = 500 ) = 0.920704845814978\n",
"sample size: 257\n",
"eff (cutoff = 550 ) = 0.9260700389105059\n",
"sample size: 297\n",
"eff (cutoff = 600 ) = 0.9326599326599326\n",
"sample size: 334\n",
"eff (cutoff = 650 ) = 0.9281437125748503\n",
"sample size: 366\n",
"eff (cutoff = 700 ) = 0.9289617486338798\n",
"sample size: 400\n",
"eff (cutoff = 750 ) = 0.925\n",
"sample size: 436\n",
"eff (cutoff = 800 ) = 0.9151376146788991\n",
"sample size: 468\n",
"eff (cutoff = 850 ) = 0.9102564102564102\n",
"sample size: 500\n",
"eff (cutoff = 900 ) = 0.912\n",
"sample size: 533\n",
"eff (cutoff = 950 ) = 0.9136960600375235\n",
"sample size: 562\n",
"eff (cutoff = 1000 ) = 0.9163701067615658\n",
"\n",
"sample size: 150\n"
]
},
{
"data": {
"text/plain": [
"0.9533333333333334"
]
},
2023-10-02 16:21:00 +02:00
"execution_count": 24,
2023-09-28 15:50:32 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#finden wir die elektronen die keine bremsstrahlung gemacht haben mit hoher effizienz?\n",
"#von energie der photonen abmachen\n",
"#scan ab welcher energie der photonen die effizienz abfällt\n",
"\n",
"#abhängigkeit vom ort der emission untersuchen <- noch nicht gemacht\n",
"\n",
"\n",
"\n",
"#idea: we make an event cut st all events that contain a photon of energy > cutoff_energy are not included\n",
"\"\"\"\n",
"ph_e = found[\"brem_photons_pe\"]\n",
"event_cut = ak.all(ph_e<cutoff_energy,axis=1)\n",
"ph_e = ph_e[event_cut]\n",
"\"\"\"\n",
"\n",
"\n",
"\n",
2023-10-02 16:21:00 +02:00
"\n",
2023-09-28 15:50:32 +02:00
"for cutoff_energy in range(0,1050,50):\n",
"\tnobrem_f = found[ak.all(found[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n",
"\tnobrem_l = lost[ak.all(lost[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n",
"\tprint(\"sample size: \",ak.num(nobrem_f,axis=0)+ak.num(nobrem_l,axis=0))\n",
"\tprint(\"eff (cutoff = \",str(cutoff_energy),\") = \",str(t_eff(nobrem_f,nobrem_l)))\n",
"\n",
"\"\"\"\n",
"we see that a cutoff energy of 350MeV is ideal because the efficiency drops significantly for higher values\n",
"\"\"\"\n",
"cutoff_energy = 350.0 #MeV\n",
"\n",
"\"\"\"\n",
"better statistics: cutoff=350MeV - sample size: 150 events and efficiency=0.9533\n",
"\"\"\"\n",
"nobrem_found = found[ak.all(found[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n",
"nobrem_lost = lost[ak.all(lost[\"brem_photons_pe\"]<cutoff_energy,axis=1)]\n",
"\n",
"print(\"\\nsample size: \",ak.num(nobrem_found,axis=0)+ak.num(nobrem_lost,axis=0))\n",
"t_eff(nobrem_found, nobrem_lost)"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": null,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [],
2023-10-02 16:21:00 +02:00
"source": []
2023-09-28 15:50:32 +02:00
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 25,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.8593328191284226"
]
},
2023-10-02 16:21:00 +02:00
"execution_count": 25,
2023-09-28 15:50:32 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#wie viel energie relativ zur anfangsenergie verlieren die elektronen durch bremstrahlung und hat das einen einfluss darauf ob wir sie finden oder nicht?\n",
"#if any photon of an electron has an energy higher the cutoff then it is included\n",
"cutoff_energy=350\n",
"\n",
"brem_found = found[ak.any(found[\"brem_photons_pe\"]>=cutoff_energy,axis=1)]\n",
"energy_found = ak.to_numpy(brem_found[\"energy\"])\n",
"eph_found = ak.to_numpy(ak.sum(brem_found[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"energyloss_found = eph_found/energy_found\n",
"\n",
"brem_lost = lost[ak.any(lost[\"brem_photons_pe\"]>=cutoff_energy,axis=1)]\n",
"energy_lost = ak.to_numpy(brem_lost[\"energy\"])\n",
"eph_lost = ak.to_numpy(ak.sum(brem_lost[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"energyloss_lost = eph_lost/energy_lost\n",
"\n",
"t_eff(brem_found,brem_lost)"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 26,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"mean energyloss relative to initial energy (found): 0.6551043170507098\n",
"mean energyloss relative to initial energy (lost): 0.8273131179948844\n"
]
}
],
"source": [
"mean_energyloss_found = ak.mean(energyloss_found)\n",
"mean_energyloss_lost = ak.mean(energyloss_lost)\n",
"print(\"mean energyloss relative to initial energy (found): \", mean_energyloss_found)\n",
"print(\"mean energyloss relative to initial energy (lost): \", mean_energyloss_lost)"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 27,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjMAAAHMCAYAAAAgfimTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA51klEQVR4nO3deXhU9d3+8XuSTDZCAgTCmrIGNAFBASngglZQUbFPfVyKIiJuNT8hxbK5JlYakaooD0JBlC5SaRWQKgqpkgAiWwhWDAIClaDQsCaBSBgy5/cHZkrINnMy20ner+vKFebMWT7zadq5+z3fc47NMAxDAAAAFhUS6AIAAADqgzADAAAsjTADAAAsjTADAAAsjTADAAAsjTADAAAsjTADAAAsjTADAAAsjTADAAAsjTADAAAsjTADAAAsjTADwC9WrFghm81W48+CBQu8cpzy8nIlJCTolVde8fuxAQRGWKALANA4bN26VZL0/vvvKyEhocr7ycnJXjnOmjVrdPjwYf3iF7/w+7EBBAZhBoBfbN26VbGxsbrllltks9l8dpx3331X/fr1U8eOHf1+bACBwWkmAH6Rm5ur3r17+zRMGIahpUuX6rbbbvP7sQEEDmEGgM8dPXpU+/fvV69evXT27NkqP4ZheOU469ev18GDByuFGX8dG0DgEGYA+FzFnJXXX39ddru9yk9+fn6d+zAMQ7GxsTpy5EiN67z77rvq1auXkpKSPD724cOHddNNN6lJkybq3r27srKy6vORAfgRc2YA+Fxubq4kacmSJUpMTKzyvjsTcHfv3q1WrVqpZcuWNa6zZMkS3X///aaOnZqaqjZt2ujw4cP65z//qTvuuEPffPON4uPj66wNQGARZgD43NatWxUZGakRI0YoNDS0xvX+8Ic/6O9//7vsdrs2btyodu3a6W9/+5uSk5O1detW9enTRw8//LAWL16sdu3aafny5erWrZskadOmTdq/f3+V+TLuHPvkyZNatmyZ9uzZo+joaI0YMUK9e/fW+++/XyU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by2az6b777gvQpwAAwBxOMzUA9913n3bv3q3ly5crNjZWkydP1vDhw5Wfny+73a7U1FSdOXNGa9asUZMmTZSfn6+YmBglJibqvffe02233aadO3cqNjbWdV8YAEAjVDHFIoDTH8wgzFhcRYj57LPPNGjQIEnS22+/rcTERC1btky333679u/fr9tuu029evWSJHXp0sW1fYsWLSRJCQkJzJkBAFgSp5ksbseOHQoLC9OAAQNcy+Lj49WjRw/t2LFDkjRu3Dg9//zzGjx4sJ599ln961//ClS5AAB4HWHG4mp6HIRhGK6b1T3wwAPau3evRo0apS+//FL9+vXTrFmz/FkmAAA+Q5ixuOTkZJ09e1YbN250LTt69Kh27dqliy++2LUsMTFRjzzyiJYsWaLHH39c8+fPlySFh4dLOvecKgAArIgwY3FJSUm69dZb9eCDD2rdunX64osvdM8996h9+/a69dZbJUlpaWlauXKl9u3bp61bt+rTTz91BZ2OHTvKZrPpgw8+0OHDh3Xy5MlAfhwAADzGBOCanDeT23A6dbq4WOGxsbIF4VOz33rrLY0fP14333yzzpw5o6uuukorVqyQ3W6XdG7UJTU1VQcOHFBsbKxuuOEGvfLKK5Kk9u3bKyMjQ1OmTNGYMWN07733auHChQH8NAAAeIYwY1HZ2dmufzdv3lx/+tOfaly3rvkxTz/9tJ5++mlvlQYAgF8F3zADAACABwgzAADA0ggzAADA0pgzAwAAalbxiIMKQfioA0ZmAACApRFmAACApRFmAACApRFmAACApRFmAAC
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#in abhängigkeit von der energie der elektronen\n",
"plt.hist(energyloss_lost, bins=200, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=\"lost\")\n",
"plt.hist(energyloss_found, bins=100, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=\"found\")\n",
"plt.xticks(np.arange(0,1.1,0.1), minor=True,)\n",
"plt.yticks(np.arange(0,10,1), minor=True)\n",
"plt.xlabel(r\"$E_\\gamma/E_0$\")\n",
"plt.ylabel(\"counts (normed)\")\n",
"plt.title(r'$E_{ph}/E_0$')\n",
"plt.legend()\n",
"plt.grid()\n",
"\n",
"\"\"\"\n",
"\n",
"\"\"\"\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 28,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABjYAAAIhCAYAAADtvIOUAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADbq0lEQVR4nOzde1xVVf7/8fcR5IgIJ7wAHsNLjZEKVqOFaDNoCuiIzkxTViRJF3PCyQydym5eJsFMyflqWTlOmpds+jb6rSwCrTRHUfLSiDlak9cUsUJQU1BYvz/6sesIKthBDsfX8/HYjzx7f87aa+9zoPVh7bWWzRhjBAAAAAAAAAAA0AA0qu8KAAAAAAAAAAAA1BQdGwAAAAAAAAAAoMGgYwMAAAAAAAAAADQYdGwAAAAAAAAAAIAGg44NAAAAAAAAAADQYNCxAQAAAAAAAAAAGgw6NgAAAAAAAAAAQINBxwYAAAAAAAAAAGgw6NgAAAAAAAAAAAANBh0bQD1544031KVLF/n7+8tms2nLli31XaVqTZgwQTabrb6r4TFSUlLUvn37+q5GnXvvvfc0YcIEt5c7b9482Ww27d692+1lS9Lnn3+uCRMm1Fn5AAAA8Bx13bZ88cUXNW/evDopuyFr3769UlJS6rsada6uPv+6zinrKpcDAE9DxwZQDw4fPqzk5GRdeeWVysrK0rp163TVVVfVd7UAy3vvvaeJEyfWdzVq7fPPP9fEiRPp2AAAAMDPRsfGpa2hfv4NNZcDgNqiYwOoBzt37tSpU6c0dOhQxcbGqkePHmratGl9V8urfP/99/VdhQbpUrtvl9r1/tSJEydkjKnvagAAAKAOGGN04sSJ+q5Gg3Qp5QiX+vfkUvqsAW9ExwZwkaWkpOjGG2+UJN12222y2Wzq3bu3dfztt99WTEyMmjZtqsDAQMXFxWndunVVyqhu6Gp100bZbDb96U9/0oIFC9SpUyc1bdpU11xzjd59990q71++fLmuvfZa2e12dejQQdOmTavVta1YsUJ9+/ZVUFCQmjZtql69emnlypXV1nHbtm2644475HA4FBoaqnvuuUfFxcUuscYYvfjii7r22mvl7++v4OBg3XLLLfrqq69c4nr37q3IyEitXr1aPXv2VNOmTXXPPfdIkvbv369bbrlFgYGBuuyyy3TnnXcqLy9PNpvNevpmwYIFstlsVe6zJE2aNEmNGzfWgQMHznrdJ0+e1Lhx49ShQwf5+fmpTZs2GjlypI4cOeIS9+GHH6p3795q0aKF/P391bZtW/3hD39waUzNnj1b11xzjZo1a6bAwEBdffXVevzxx89536+//noNHDjQZV9UVJRsNpvy8vKsff/85z9ls9m0detWST9+Fps2bdItt9yi4OBgXXnllUpJSdELL7wg6YfvT+V2vlEQNfn8f+57//Of/+iOO+5QaGio7Ha72rZtq7vuukulpaWaN2+ebr31VklSnz59rHpXfs7n+p7s3btXQ4cOVUhIiOx2uzp16qTp06eroqLCOvfu3btls9k0bdo0ZWZmqkOHDmrWrJliYmKUm5tbo+ssKCjQiBEjdPnll8vPz08dOnTQxIkTdfr06Qs+z6effqrBgwerefPmatKkia677jr94x//cImpnKYhOztb99xzj1q1aqWmTZuqtLRUxhilp6erXbt2atKkibp3766cnBz17t3b+t107NgxXXbZZRoxYkSV8+/evVs+Pj567rnnanQPAAAA6trf//53XXPNNWrSpImaN2+u3//+99q+fbtLzFdffaXbb79dTqdTdrtdoaGh6tu3rzVFcPv27bVt2zatWrXKaleeb/qg2uYveXl5+tWvfqWmTZvqiiuu0JQpU1zan5JUUlKisWPHuuQao0eP1vHjx13iKvO+l156SZ06dZLdbtf8+fMlSWvWrFFMTIyaNGmiNm3a6KmnntLf/vY3lzb+vffeq+bNm1f7h96bbrpJXbp0Oee116Q9LZ0/3/n++++t6638/Lp3767XX3/9rOcuKSmRr6+vS3v0m2++UaNGjeRwOFza2qNGjVKrVq2sB3zOliPU5ef/c9+blZWlvn37yuFwqGnTpurUqZMyMjIk6by53Pm+J3379lVgYKCaNm2qnj17avny5S7nrswrPvroIz3wwANq2bKlWrRooZtvvvmcOfNP1SZ/qel53njjDcXExCggIEDNmjVTQkKCNm/e7BKTkpKiZs2aaevWrYqPj1dgYKD69u0rSTpy5Ij1M9CsWTMNHDhQX331lWw2mzWt1yeffCKbzVbtd/G1116rkn8DuAgMgIvqyy+/NC+88IKRZNLT0826devMtm3bjDHGLFq0yEgy8fHxZtmyZeaNN94w3bp1M35+fuaTTz6xyhg2bJhp165dlbLHjx9vzvyxlmTat29vbrjhBvOPf/zDvPfee6Z3797G19fX/Pe//7XiVqxYYXx8fMyNN95o/vnPf5o333zTXH/99aZt27ZVyqzOggULjM1mM7/73e/MP//5T/POO++YxMRE4+PjY1asWFGljhEREebpp582OTk5JjMz09jtdnP33Xe7lDl8+HDTuHFjM2bMGJOVlWUWL15srr76ahMaGmoKCgqsuNjYWNO8eXMTHh5uZs6caT766COzatUqc+zYMfOLX/zCNG/e3Lzwwgvmgw8+MA8//LDp0KGDkWReffVVY4wxpaWlJiwszNx5550u5z916pRxOp3m1ltvPeu9r6ioMAkJCcbX19c89dRTJjs720ybNs0EBASY6667zpw8edIYY8yuXbtMkyZNTFxcnFm2bJn5+OOPzaJFi0xycrIpKioyxhjz+uuvG0nmwQcfNNnZ2WbFihXmpZdeMqNGjTrnvX/sscdMs2bNTFlZmTHGmIKCAiPJ+Pv7m8mTJ1txDzzwgAkNDa3yWbRr1848+uijJicnxyxbtsx8+eWX5pZbbjGSzLp166yt8lqqU9PP/9VXXzWSzK5du2r93i1btphmzZqZ9u3bm5deesmsXLnSLFy40AwZMsSUlJSYwsJCk56ebiSZF154wap3YWGhMebs35PCwkLTpk0b06pVK/PSSy+ZrKws86c//clIMg888IB1/l27dlk/T/379zfLli0zy5YtM1FRUSY4ONgcOXLknJ/TwYMHTXh4uGnXrp15+eWXzYoVK8xf/vIXY7fbTUpKygWd58MPPzR+fn7mV7/6lXnjjTdMVlaWSUlJcfl+//S+t2nTxtx///3m/fffN//7v/9rTp8+bcaNG2ckmfvvv99kZWWZOXPmmLZt25rWrVub2NhYq4yHH37YBAQEVLnOP//5z6ZJkybmm2++Oef1AwAAuFt1bcvK9uAdd9xhli9fbl577TVzxRVXGIfDYXbu3GnFRUREmF/84hdmwYIFZtWqVeatt94yY8aMMR999JExxphNmzaZK664wlx33XVWu3LTpk3nrE9t8pcWLVqYjh07mpdeesnk5OSY1NRUI8nMnz/fijt+/Li59tprTcuWLU1mZqZZsWKF+etf/2ocDoe56aabTEVFhRVb2dbr2rWrWbx4sfnwww9Nfn6++eyzz0yTJk1M165dzZIlS8zbb79tfvOb35j27du73LvPPvvMSDJz5sxxuaZt27ZZ7etK7dq1M8OGDbNe17Q9XZN8Z8SIEaZp06YmMzPTfPTRR+bdd981U6ZMMTNnzjznve/Ro4eJj4+3Xi9ZssQ0adLE2Gw2869//cva36lTJzNkyBCXz6K6HKEuP//q8vmavvdvf/ubsdlspnfv3mbx4sVmxYoV5sUXXzSpqanGGHPeXO5s35OPP/7YNG7c2HTr1s288cYbZtmyZSY+Pt7YbDazZMkS6/yVP3NXXHGFefDBB80HH3xg/va3v5ng4GDTp0+fc94fY2qfv9TkPJMnTzY2m83cc8895t133zX//Oc/TUxMjAkICLD+1lJ53xs3bmzat29vMjIyzMqVK80HH3xgysvLzY033miaNGlipkyZYrKzs83EiRNNx44djSQzfvx4q4zrrrvO9OrVq8p1XX/99eb6668/7/UDcC86NoB68NFHHxlJ5s0337T2lZe
"text/plain": [
"<Figure size 2000x600 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#energyloss in abh von der energie der elektronen\n",
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
"a0=ax0.hist2d(energyloss_found, energy_found, bins=200, cmap=plt.cm.jet, cmin=1)\n",
"ax0.set_xlabel(\"energyloss\")\n",
"ax0.set_ylabel(r\"$E_0$\")\n",
"ax0.set_title(\"found energyloss wrt electron energy\")\n",
"plt.colorbar(a0[3],ax=ax0)\n",
"\n",
"a1=ax1.hist2d(energyloss_lost, energy_lost, bins=200, cmap=plt.cm.jet, cmin=1) \n",
"ax1.set_xlabel(\"energyloss\")\n",
"ax1.set_ylabel(r\"$E_0$\")\n",
"ax1.set_title(\"lost energyloss wrt electron energy\")\n",
"plt.colorbar(a1[3],ax=ax1)\n",
"\n",
"\"\"\"\n",
"\"\"\"\n",
"plt.show()"
]
},
2023-09-29 12:21:18 +02:00
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 29,
2023-09-29 12:21:18 +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-10-02 16:21:00 +02:00
"execution_count": 30,
2023-09-29 12:21:18 +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",
"#should be fulfilled by all candidates\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",
"sf_energy_found = ak.to_numpy(scifi_found[\"energy\"])\n",
"sf_eph_found = ak.to_numpy(ak.sum(scifi_found[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
2023-10-02 15:10:45 +02:00
"sf_vtx_type_found = scifi_found[\"all_endvtx_types\"]\n",
"\n",
"\n",
2023-09-29 12:21:18 +02:00
"brem_vtx_type_found = scifi_found[scifi_found[\"endvtx_type\"]==101]\n",
"\n",
"sf_energy_lost = ak.to_numpy(scifi_lost[\"energy\"])\n",
"sf_eph_lost = ak.to_numpy(ak.sum(scifi_lost[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
2023-10-02 15:10:45 +02:00
"sf_vtx_type_lost = scifi_lost[\"all_endvtx_types\"]\n",
2023-09-29 12:21:18 +02:00
"brem_vtx_type_lost = scifi_lost[scifi_lost[\"endvtx_type\"]==101]\n",
"\n",
"\n",
"\n",
"#ak.num(scifi_found[\"energy\"], axis=0)\n",
"#scifi_found.snapshot()"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 31,
2023-09-29 12:21:18 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-02 15:10:45 +02:00
"text/html": [
"<pre>[101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 0]\n",
"------------------\n",
"type: 11 * float32</pre>"
],
2023-09-29 12:21:18 +02:00
"text/plain": [
2023-10-02 15:10:45 +02:00
"<Array [101, 101, 101, 101, 101, ..., 101, 101, 101, 0] type='11 * float32'>"
2023-09-29 12:21:18 +02:00
]
},
2023-10-02 16:21:00 +02:00
"execution_count": 31,
2023-09-29 12:21:18 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2023-10-02 13:56:58 +02:00
"ak.num(scifi_found[\"energy\"], axis=0)\n",
2023-10-02 15:10:45 +02:00
"scifi_found[\"all_endvtx_types\"][1,:]"
2023-09-29 12:21:18 +02:00
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 32,
2023-09-29 12:21:18 +02:00
"metadata": {},
"outputs": [],
"source": [
"scifi_fitpars_found = ak.ArrayBuilder()\n",
2023-10-02 15:10:45 +02:00
"vtx_types_found = ak.ArrayBuilder()\n",
2023-09-29 12:21:18 +02:00
"\n",
"for i in range(0,ak.num(scifi_found, 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",
" #[:,4] -> energy \n",
" scifi_fitpars_found.real(sf_energy_found[i])\n",
" #[:,5] -> photon energy\n",
" scifi_fitpars_found.real(sf_eph_found[i])\n",
" scifi_fitpars_found.end_list()\n",
2023-10-02 15:10:45 +02:00
" \n",
" vtx_types_found.begin_list()\n",
" #[:,0] -> endvtx_type\n",
" vtx_types_found.extend(sf_vtx_type_found[i,:])\n",
" vtx_types_found.end_list()\n",
" \n",
2023-09-29 12:21:18 +02:00
"\n",
"scifi_fitpars_lost = ak.ArrayBuilder()\n",
2023-10-02 15:10:45 +02:00
"vtx_types_lost = ak.ArrayBuilder()\n",
2023-09-29 12:21:18 +02:00
"\n",
"for i in range(0,ak.num(scifi_lost, 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",
" #[:,4] -> energy \n",
" scifi_fitpars_lost.real(sf_energy_lost[i])\n",
" #[:,5] -> photon energy\n",
" scifi_fitpars_lost.real(sf_eph_lost[i])\n",
" scifi_fitpars_lost.end_list()\n",
2023-10-02 15:10:45 +02:00
" \n",
" vtx_types_lost.begin_list()\n",
" #[:,6] -> endvtx_type\n",
" vtx_types_lost.extend(sf_vtx_type_lost[i,:])\n",
" vtx_types_lost.end_list()\n",
" \n",
"\n",
2023-09-29 12:21:18 +02:00
"\n",
2023-10-02 15:10:45 +02:00
"scifi_fitpars_lost = ak.to_numpy(scifi_fitpars_lost)\n",
"scifi_fitpars_found = ak.to_numpy(scifi_fitpars_found)\n",
2023-09-29 12:21:18 +02:00
"\n",
2023-10-02 15:10:45 +02:00
"vtx_types_lost = ak.Array(vtx_types_lost)\n",
"vtx_types_found = ak.Array(vtx_types_found)\n",
2023-09-29 12:21:18 +02:00
"\n"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 33,
2023-09-29 12:21:18 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-02 15:10:45 +02:00
"text/html": [
"<pre>[101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 101,\n",
" 0]\n",
"------------------\n",
"type: 11 * float64</pre>"
],
2023-09-29 12:21:18 +02:00
"text/plain": [
2023-10-02 15:10:45 +02:00
"<Array [101, 101, 101, 101, 101, ..., 101, 101, 101, 0] type='11 * float64'>"
2023-09-29 12:21:18 +02:00
]
},
2023-10-02 16:21:00 +02:00
"execution_count": 33,
2023-09-29 12:21:18 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
2023-10-02 15:10:45 +02:00
"source": [
"vtx_types_found[0]"
]
2023-09-29 12:21:18 +02:00
},
{
"cell_type": "code",
2023-10-02 15:58:50 +02:00
"execution_count": null,
2023-10-02 15:10:45 +02:00
"metadata": {},
"outputs": [],
"source": [
"\n",
"\n"
]
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 34,
2023-09-29 12:21:18 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-02 15:58:50 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABfkAAAIhCAYAAAD96rC5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAACyQUlEQVR4nOzde3wU1fnH8e+SyxJisoZLEoIIUTGCBEWwXLQGBIIoYMVbG41ELVJBKAZKC1YJVoIiohYUrT8rXqDYVrFeMQEEpBAMCAqoiC0IFAIUQwI05Mb5/YEZdpNNsgmb7G74vF+vfbE7++ycM7MDnDn7zDM2Y4wRAAAAAAAAAAAIOM183QEAAAAAAAAAAFA/TPIDAAAAAAAAABCgmOQHAAAAAAAAACBAMckPAAAAAAAAAECAYpIfAAAAAAAAAIAAxSQ/AAAAAAAAAAABikl+AAAAAAAAAAACFJP8AAAAAAAAAAAEKCb5AQAAAAAAAAAIUEzyA2ehN998U5deeqnCwsJks9m0efNmX3fJrYyMDNlsNq+tb9euXbLZbJo9e7bX1rl27VplZGToyJEjXlsnfGffvn3KyMjw+O/EggULZLPZtGHDhobtWBOWmZmpd955x9fdAACgwVSMF3bt2tUg63/++ee1YMECr6+3IcY5ixYt0jPPPOO19cG36noulJaWpnPOOadhO9WE1fVcBcDZhUl+4Cxz6NAhpaam6sILL9TSpUu1bt06XXzxxb7uVsBau3atpk+fziR/E7Fv3z5Nnz6dgXMjYpIfAIAz01CT/A2BSf6mhXOhxsW5CoCaBPu6AwAa17fffqvS0lLdeeedSkpK8nV30MQYY3TixAmFhYX5uit1Ul5errKyMl93o8H873//U4sWLXzdjUZT8X3a7XZfdwUAAKBapaWlstlsCg4OrKmZoqIiNW/e3NfdaDBFRUUBdz5zJiq+T29eRQ+g8ZHJD5xF0tLSdPXVV0uSbr/9dtlsNvXr1896/91331WfPn3UokULRUREaNCgQVq3bl2VdXTs2LHKut2V1rHZbHrggQf0+uuvq3PnzmrRooUuu+wyvf/++1U+/8EHH+jyyy+X3W5XfHx8nUrq9OvXT127dtWnn36q3r17KywsTO3atdPDDz+s8vJyt5+ZM2eO4uPjdc4556hPnz7KycmpElPb/sjIyNBvfvMbSVJ8fLxsNptsNptWrlwpSTp58qRmzZqlSy65RHa7XdHR0brrrru0d+9et/3Pzc3VT3/6U7Vo0UIXXHCBHn/8cZ08ebLW7TfG6Pnnn9fll1+usLAwRUVF6ZZbbtG///3verdTWFioSZMmKT4+XqGhoWrXrp0mTJig48ePu8RVfMcvvPCCOnfuLLvdrldffVWStGbNGvXp00fNmze3vo//+7//c7lc/d5771XLli31v//9r8p2XXvttbr00kur3e7nnntOzZo108GDB61lTz31lGw2m8aOHWstO3nypKKiojRx4kRJp8s2zZo1S4899pji4+Nlt9v1ySef6Morr5Qk3X333db3mZGRUcs3IOXn5+vuu+9Wy5YtFR4ermHDhlXZ/+5U/L3ZtGmTRowYocjISDkcDt155506dOiQS+ybb76p5ORktW3bVmFhYercubN+97vfVflOKi6D3rJli5KTkxUREaEBAwZIkrKzs3XjjTfqvPPOU/PmzXXRRRdp9OjR+u9//+u2X19++aVuvfVWORwOtWzZUunp6SorK9P27dt13XXXKSIiQh07dtSsWbOqbJsnx5DNZtPx48f16quvWvvb+d+kvLw8jR49Wuedd55CQ0MVHx+v6dOnu/wgU9P3CQCAP/vzn/+syy67TM2bN1fLli1100036euvv3aJ+fe//62f//zniouLk91uV0xMjAYMGGBl8nbs2FHbtm3TqlWrrP9L3Y3VnVWM31588UVdfPHFstvt6tKlixYvXuw2/ujRo7r//vvVunVrtWrVSiNGjNC+fftcYjwZ9/br108ffPCBvv/+e6uvzucPP/zwg8aMGaN27dopNDRUF1xwgR566CEVFxe77b8n5xju1HWc60k7O3bsUEpKiqKjo2W329W5c2c999xzLjErV66UzWbT66+/rokTJ6pdu3ay2+367rvvJEkvvfSSy/exaNEil3MvY4w6deqkwYMHV2n/2LFjcjgcLmPgym699dYqY+thw4bJZrPpb3/7m7Xs888/l81m03vvvSfpdNmmrKws3XPPPWrTpo1atGihKVOm1HguVJNt27ZpwIABCg8PV5s2bfTAAw+4PR+orC7nfdOnT1evXr3UsmVLRUZG6oorrtDLL78sY4xLXMeOHTV06FC9/fbb6t69u5o3b67p06dLOnW+cc011yg6Olrh4eFKTEzUrFmzVFpa6rZf69atU9++fRUWFqaOHTvqlVdekXTqXPeKK65QixYtlJiYqKVLl1bZttqOoZUrV9Z6rrJhwwYNHz5cLVu2VPPmzdW9e3f99a9/dWmnuu+z8t8zAAHIADhrfPfdd+a5554zkkxmZqZZt26d2bZtmzHGmIULFxpJJjk52bzzzjvmzTffND169DChoaHm008/tdYxcuRI06FDhyrrnjZtmqn8T4ok07FjR/OTn/zE/PWvfzUffvih6devnwkODjb/+te/rLhly5aZoKAgc/XVV5u3337b/O1vfzNXXnmlOf/886us052kpCTTqlUrExcXZ/74xz+ajz/+2IwfP95IMmPHjrXidu7cafXpuuuuM++884555513TGJioomKijJHjhyxYj3ZH3v27DHjxo0zkszbb79t1q1bZ9atW2cKCgqMMcbcd999RpJ54IEHzNKlS80LL7xg2rRpY9q3b28OHTpUpf+dOnUyL7zwgsnOzjZjxowxksyrr75a6/aPGjXKhISEmIkTJ5qlS5eaRYsWmUsuucTExMSYvLy8Ordz/Phxc/nll5vWrVubOXPmmGXLlplnn33WOBwOc+2115qTJ0+6fMft2rUz3bp1M4sWLTIrVqwwW7duNV988YVp3ry56datm1m8eLF59913zfXXX286duxoJJmdO3caY4z54osvjCTz0ksvuWzTtm3bjCTz3HPPVbvd33zzjZFkFi1aZC277rrrTFhYmOnUqZO1bP369UaS+fDDD12Og3bt2pn+/fubv//97yYrK8t88cUX5pVXXjGSzO9//3vr+9yzZ0+1faiIb9++vbnnnnvMRx99ZP70pz+Z6Oho0759e5Ofn1/jd1fx96ZDhw7mN7/5jfn444/NnDlzTHh4uOnevbspKSmxYv/whz+Yp59+2nzwwQdm5cqV5oUXXjDx8fGmf//+LuscOXKkCQkJMR07djQzZ840y5cvNx9//LExxpj58+ebmTNnmnfffdesWrXKvPrqq+ayyy4zCQkJLm1V9CshIcH84Q9/MNnZ2Wby5MnW8XzJJZeYP/7xjyY7O9vcfffdRpJ56623rM97egytW7fOhIWFmeuvv97a3xX/Ju3fv9+0b9/edOjQwbz44otm2bJl5g9/+IOx2+0mLS3Naqu677PiGAMAwNcqxgvO/zdlZmYaSeYXv/iF+eCDD8xrr71mLrjgAuNwOMy3335rxSUkJJiLLrrIvP7662bVqlXmrbfeMhMnTjSffPKJMcaYzz//3FxwwQWme/fu1v+ln3/+eY39qRi7dOnSxfzlL38x7777rrnuuuuMJPO3v/2tSr8vuOACM27cOPPxxx+b//u//zNRUVFVxh+ejHu3bdtmrrrqKhMbG2v1dd26dcYYY4qKiky3bt1MeHi4mT17tsnKyjIPP/ywCQ4ONtdff32V/ntyjuFOXce5nrSzbds243A4TGJionnttddMVlaWmThxomnWrJnJyMiw4j755BNrzHLLLbeYd99917z//vvm8OHD5sUXXzSSzM0332zef/99s3DhQnPxxRebDh06uJx7Pfvss8Zms7kcI8YY6xyvYhzlzgsvvGAkmX379hljjCktLTUREREmLCzMjBo1yop74oknTHBwsCksLDTGnD4O2rVrZ+677z7z0Ucfmb///e9m165dNZ4LuTNy5EgTGhp
2023-09-29 12:21:18 +02:00
"text/plain": [
2023-10-02 15:58:50 +02:00
"<Figure size 1800x600 with 4 Axes>"
2023-09-29 12:21:18 +02:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#b parameter des fits [:,1] hat für lost eine breitere Verteilung. Warum?\n",
"#evtl multiple scattering candidates (lost); findet man einen gewissen endvtx_type (mult scattering)\n",
"#steiler velo winkel (eta)? vertex type? evtl bremsstrahlung?\n",
"\n",
"#isolate b parameters for analysis\n",
"b_found = scifi_fitpars_found[:,1]\n",
"b_lost = scifi_fitpars_lost[:,1]\n",
"\n",
"brem_energy_found = scifi_fitpars_found[:,5]\n",
"brem_energy_lost = scifi_fitpars_lost[:,5]\n",
"\n",
"\n",
2023-10-02 15:10:45 +02:00
"bs_found, vtx_types_found = ak.broadcast_arrays(b_found, vtx_types_found)\n",
"bs_found = ak.to_numpy(ak.ravel(bs_found))\n",
"vtx_types_found = ak.to_numpy(ak.ravel(vtx_types_found))\n",
"\n",
"bs_lost, vtx_types_lost = ak.broadcast_arrays(b_lost, vtx_types_lost)\n",
"bs_lost = ak.to_numpy(ak.ravel(bs_lost))\n",
"vtx_types_lost = ak.to_numpy(ak.ravel(vtx_types_lost))\n",
"\n",
"\n",
2023-09-29 12:21:18 +02:00
"\n",
"\n",
"#Erste Annahme ist Bremsstrahlung\n",
"\n",
2023-10-02 15:58:50 +02:00
"fig = plt.figure(figsize=(18,6))\n",
2023-09-29 12:21:18 +02:00
"axes = ImageGrid(fig, 111, # similar to subplot(111)\n",
" nrows_ncols=(1, 2), # creates 2x2 grid of axes\n",
" axes_pad=1, # pad between axes in inch.\n",
" cbar_mode=\"single\",\n",
" cbar_location=\"right\",\n",
" cbar_pad=0.1,\n",
" aspect=False\n",
" )\n",
"\n",
"\n",
"h0 = axes[0].hist2d(b_found, brem_energy_found, bins=200, cmap=plt.cm.jet, cmin=1,vmax=30)\n",
"axes[0].set_xlim(-1,1)\n",
"axes[0].set_xlabel(\"b parameter [mm]\")\n",
"axes[0].set_ylabel(r\"$E_{ph}$\")\n",
"axes[0].set_title(\"found photon energy wrt b parameter\")\n",
"\n",
"h1 = axes[1].hist2d(b_lost, brem_energy_lost, bins=200, cmap=plt.cm.jet, cmin=1,vmax=30)\n",
"axes[1].set_xlim(-1,1)\n",
"axes[1].set_xlabel(\"b parameter [mm]\")\n",
"axes[1].set_ylabel(r\"$E_{ph}$\")\n",
"axes[1].set_title(\"lost photon energy wrt b parameter\")\n",
"\n",
"fig.colorbar(h0[3], cax=axes.cbar_axes[0], orientation='vertical')\n",
"\n",
"\"\"\"\n",
"\"\"\"\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-02 15:58:50 +02:00
"execution_count": null,
2023-09-29 12:21:18 +02:00
"metadata": {},
2023-10-02 15:58:50 +02:00
"outputs": [],
2023-10-02 15:10:45 +02:00
"source": []
2023-10-02 13:56:58 +02:00
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 35,
2023-10-02 13:56:58 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-02 15:58:50 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABS0AAAIhCAYAAACrEJ+KAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAACFBUlEQVR4nOzdeXQUVdrH8V+TnSUNQUlAEEERDCgCRjbZZB9xXAfcEBAXxjiK6KiMC8R3BNEZRKVRcdS4DMsoq4qDoCwqUSObDnFjRGEwEWEgAWRL575/MGnpdCXpht5S/f2cU+fQlVu3blV19324fesphzHGCAAAAAAAAACiRK1INwAAAAAAAAAAjsWgJQAAAAAAAICowqAlAAAAAAAAgKjCoCUAAAAAAACAqMKgJQAAAAAAAICowqAlAAAAAAAAgKjCoCUAAAAAAACAqMKgJQAAAAAAAICowqAlAAAAAAAAgKjCoCVsb+7cuWrbtq1SUlLkcDi0YcOGSDfJ0sSJE+VwOCLdDC8Oh0MTJ04MeLslS5Yc13bV6d27t3r37l1tue+//14Oh0O5ublBb0N1ZsyYEdB+HQ6HbrvtttA1yOZC9V4DAIRPbm6uHA6Hvv/++5DUH2jfHC4rV66Uw+HQypUrA942VMfkb+wX6mtWmV9++UUTJ070+5yVn+M33ngjtA2zAWIqANGIQUvY2s8//6zhw4fr9NNP1z//+U/l5eXpzDPPjHSzbG/JkiXKyckJer0zZszQjBkzgl5vMEXrf4zsKlTvNQCAfdixbw7VMeXl5enGG28Mer3B8ssvvygnJ+e4BnpRNWIqANEoPtINAELpm2++0ZEjR3TdddepV69ekW4OTlBmZmakm1CpX375RbVr1450M0LiyJEjcjgcio+PnS7DztcTAIDKdOnSJdJNsGSM0cGDByPdjJCxc9xh52MDEHrMtIRtjRw5UhdccIEkadiwYXI4HF63Fi9evFhdu3ZV7dq1Va9ePfXv3195eXk+dZx22mk+dVvdyl1+m++rr76qs846S7Vr11b79u311ltv+Wz/9ttv69xzz1VSUpJatGihv/zlLwEd2/Lly9W3b1+lpqaqdu3a6t69u9577z3LNm7atElXX321nE6n0tPTdcMNN6i4uNirbElJiW666SY1bNhQdevW1aBBg/TNN994lVm4cKEcDofPfiTpmWeekcPh0Oeff66RI0fK5XJ5zkn58v3332vOnDlyOByaPn261/YTJkxQXFycli1bVuVxW90e/uOPP2ro0KGqV6+enE6nhg0bpqKioirrKT/m+Ph4Pf744551O3fuVK1ateR0OlVaWupZf/vtt+vkk0+WMcbTjnbt2mn16tXq1q2bateurRtuuEGnnXaaNm3apFWrVnmO2+r9Y+W5557TmWeeqaSkJGVmZmrOnDnVblN+G/xjjz2mRx55RKeeeqqSk5N13nnn+VynzZs3a9SoUWrVqpVq166tU045RRdffLG++OILr3Llt1G9+uqruuuuu3TKKacoKSlJmzdv1s8//6xbb71VmZmZqlu3rho1aqQLL7xQH3zwgWW7Hn/8cU2ZMkWnnXaaUlJS1Lt3b88PCffdd5+aNGkip9Opyy67TDt27PA5vrlz56pr166qU6eO6tatq4EDB2r9+vWev1f1XpOO/gdnxowZOvfcc5WSkqIGDRroyiuv1Hfffee1n8quJwAgsl588UW1b99eycnJSktL02WXXaYvv/zSq8x3332nq666Sk2aNFFSUpLS09PVt29fTzqg4+mbA+0/8vPz1aNHD9WuXVstW7bUo48+qrKyMq+yX331lQYNGqTatWvrpJNO0pgxY7R3716vMmPHjlWdOnVUUlLi06Zhw4YpPT1dR44cqfKYxowZo+TkZK1du9azbVlZmfr27av09HQVFhZWeexWt4d//PHH6t69u5KTk9WkSRONHz9eR44cqbIe6Wi863A4lJ+f71k3b948ORwOXXTRRV5lzznnHF1xxRVe7bjtttv07LPP6qyzzlJSUpJefvllnXzyyZKknJwcz7GPHDmy2rYcPHhQ48aNU0ZGhlJSUtSrVy+vmKIy5bfBL1u2TKNGjVJaWprq1Kmjiy++2Of9sGzZMl1yySVq2rSpkpOTdcYZZ+iWW27Rzp07vcqVx+jr1q3TlVdeqQYNGuj000+XJH322We66qqrPLHTaaedpquvvlo//PCDZbtWrFih3//+9zrppJPUsGFDXX755frxxx99joOYCkCNZQCb2rx5s3G5XEaSmTRpksnLyzObNm0yxhjz97//3UgyAwYMMAsXLjRz5841nTp1MomJieaDDz7w1DFixAjTvHlzn7onTJhgKn58JJnTTjvNnH/++eYf//iHWbJkiendu7eJj483//73vz3lli9fbuLi4swFF1xg5s+fb15//XWTlZVlTj31VJ86rbz66qvG4XCYSy+91MyfP9+8+eabZsiQISYuLs4sX77cp42tW7c2Dz30kFm2bJmZOnWqSUpKMqNGjfKUKysrM3369DFJSUnmkUceMe+++66ZMGGCadmypZFkJkyYYIwx5siRI6ZRo0bm2muv9WnT+eefbzp27Og571deeaWRZPLy8jzLwYMHjTHGjBkzxiQmJpr8/HxjjDHvvfeeqVWrlnnggQeqPfZevXqZXr16eV7/8ssv5qyzzjJOp9M8/fTTZunSpeb222/3nMuXXnqpyvq6dOliBgwY4Hk9Z84ck5ycbBwOh/noo48868866ywzdOhQr3akpaWZZs2amaefftqsWLHCrFq1yqxbt860bNnSdOj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o0MQcOHPCsKykpMWlpadUOWu7fv9+kpaX5DPC43W7Tvn17c/755/u08bHHHvMqe+utt5rk5GRTVlZmjDHmnXfeMZLMk08+6VXukUce8Qlcx40bZ1JSUsyePXs86woKCowk8/TTT3vWZWdnV3osBw8
2023-10-02 13:56:58 +02:00
"text/plain": [
"<Figure size 1800x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots(nrows=1, ncols=2, figsize=(18,6))\n",
"\n",
2023-10-02 15:58:50 +02:00
"a0=ax[0].hist2d(bs_found, vtx_types_found, bins=110, density=True, cmap=plt.cm.jet, cmin=1e-20,vmax=2)\n",
"ax[0].set_ylim(0,110)\n",
"ax[0].set_xlim(-1,1)\n",
2023-10-02 13:56:58 +02:00
"ax[0].set_xlabel(\"b\")\n",
"ax[0].set_ylabel(\"endvtx id\")\n",
"ax[0].set_title(\"found endvtx id wrt b parameter\")\n",
2023-10-02 15:58:50 +02:00
"ax[0].set_yticks(np.arange(0,110,1),minor=True)\n",
2023-10-02 13:56:58 +02:00
"\n",
2023-10-02 15:58:50 +02:00
"a1=ax[1].hist2d(bs_lost, vtx_types_lost, bins=110, density=True, cmap=plt.cm.jet, cmin=1e-20,vmax=2)\n",
"ax[1].set_ylim(0,110)\n",
"ax[1].set_xlim(-1,1)\n",
2023-10-02 13:56:58 +02:00
"ax[1].set_xlabel(\"b\")\n",
"ax[1].set_ylabel(\"endvtx id\")\n",
"ax[1].set_title(\"lost endvtx id wrt b paraneter\")\n",
2023-10-02 15:58:50 +02:00
"ax[1].set_yticks(np.arange(0,110,1), minor=True)\n",
2023-10-02 13:56:58 +02:00
"\n",
"\"\"\"\n",
2023-10-02 15:58:50 +02:00
"vtx_id: 101 - Bremsstrahlung\n",
2023-10-02 13:56:58 +02:00
"B:\n",
2023-10-02 16:21:00 +02:00
"wir können nicht wirklich sagen dass bei den lost teilchen jegliche endvertex types überwiegen, im gegensatz zu den found \n",
2023-10-02 13:56:58 +02:00
"\"\"\"\n",
2023-10-02 15:10:45 +02:00
"fig.colorbar(a0[3], ax=ax, orientation='vertical')\n",
2023-10-02 13:56:58 +02:00
"plt.show()"
2023-09-29 12:21:18 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-10-02 16:21:00 +02:00
"execution_count": 36,
2023-09-29 12:21:18 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-02 16:21:00 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABPEAAANVCAYAAAAZd2vuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAD1n0lEQVR4nOzdeVyU5f7/8ffILiqubK5ouacZlkIumIm5ZabHpQ5qqWVmplQmpom22GIeslyyKCtLPeeorWZiCWrSoqJpLpVHxQwy3HBlkfv3Rz/m2zADDjgwA7yej8c8ai4+93Vd9z3D8PEz93XfJsMwDAEAAAAAAABwWVWcPQEAAAAAAAAARaOIBwAAAAAAALg4ingAAAAAAACAi6OIBwAAAAAAALg4ingAAAAAAACAi6OIBwAAAAAAALg4ingAAAAAAACAi6OIBwAAAAAAALg4ingAAAAAAACAi6OIB5RTq1atUps2beTj4yOTyaRdu3YpNjZWJpPJIm7RokVatmyZcybp4j788EPFxcU5exrXLDExUSaTSYmJic6eit2WLVsmk8mkI0eOWLTPmDFDjRo1kru7u2rWrClJioiIUERExFX7dIX3uslk0sSJE506BwBA+Ueed+2ckedFRESobdu2Du+3SZMmGj16tMP7LU0mk0mxsbEWbV999ZU6duwoX19fmUwmffTRR4XmhAVt27ZNsbGxOnPmTKnN+WpGjx6tatWqOW18QKKIB5RLf/75p6KiotSsWTOtX79eycnJat68ucaOHavk5GSLWJK7wlWUIl551K9fPyUnJysoKMjc9vHHH+u5557TyJEjlZSUpI0bN0r66z28a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vnO86S/imvDhw/XtGnTNGfOHH3++ed69tlndfr0ab3++utFbjtu3Di99957evzxx9WrVy/t3btXd999t9UXtunp6brllltUpUoVPf3002rWrJmSk5P17LPP6siRI3rnnXcs4hcsWKDmzZtr3rx5qlGjhq6//nqb4ycnJ2vYsGEaNmyYYmNj5e3traNHj+rrr782x5w7d05dunTRkSNH9OSTT6pTp046f/68Nm/erLS0NLVs2dKq37Fjx6p9+/a6++679cgjj+iee+4p1pmAY8eO1alTp/Taa69pzZo15qW3f1+tUdjrdOjQId1zzz0KCQmRp6endu/ereeee04HDhzQ22+/bd4+Pj5e48aNU/fu3bVkyRL5+/vr559/Nq8UseXf//63Ro4cqfvvv1+vvfaa3Nzc7N4noMQMAOXOpk2bDEnGf/7zH4v2WbNmGQV/rdu0aWN079690D5uuukmIy8vz9x+5MgRw8PDwxg7dmyh4+fm5hrnz583fH19jVdffdXc/s477xiSjJEjR151H3Jzc43s7Gzj+uuvN6ZMmWI1rwEDBljET5482ZBkTJo0yaL9rrvuMmrXrm1+npycbEgyXnnlFYu4Y8eOGT4+PsbUqVPNbf369TMaN25sNbcVK1YYkozVq1dbtP/www+GJGPRokXmtsaNGxtubm7GwYMHr7rPBeXl5Rk5OTnG0aNHDUnGxx9/XGT8k08+aZhMJmPXrl0W7b169TIkGZs2bTIMwzAuXLhg1K5d2+oYXrlyxWjfvr1xyy23mNvy3zNPP/20XXNu27atcddddxUZ06xZM6NZs2bGpUuXCo3Jf68cPnzYai5//vmnRWz37t1tvocLutp7vVu3blftIzc318jJyTF69uxpDBo0yNz+3nvvGZKMN998s8jtJRkPP/ywcfLkSaNLly5G/fr1rV4vAACKQp73f8pbnte9e3ebOd24ceOMKlWqGEePHi102/379xuSLI6
2023-09-29 12:21:18 +02:00
"text/plain": [
"<Figure size 1500x1000 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"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",
2023-10-02 16:21:00 +02:00
"ax1.set_xticks(np.arange(-1,1,0.1),minor=True)\n",
2023-09-29 12:21:18 +02:00
"ax1.set_xlabel(\"b\")\n",
"ax1.set_ylabel(\"normed\")\n",
"ax1.set_title(\"fitparameter b der scifi track\")\n",
"ax1.legend()\n",
"#evtl multiple scattering candidates (lost); findet man einen gewissen endvtx_type (mult scattering)\n",
"#steiler velo winkel (eta)? vertex type? evtl bremsstrahlung?\n",
"\n",
"\n",
"ax2.hist(scifi_fitpars_found[:,2], bins=500, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=r\"$c_x$ found\")\n",
"ax2.hist(scifi_fitpars_lost[:,2], bins=500, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=r\"$c_x$ lost\")\n",
"ax2.set_xlim([-3e-5,3e-5])\n",
"ax2.set_xticks(np.arange(-3e-5,3.5e-5,1e-5),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=500, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=r\"$d_x$ found\")\n",
"ax3.hist(scifi_fitpars_lost[:,3], bins=500, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=r\"$d_x$ lost\")\n",
"ax3.set(xlim=(-5e-8,5e-8))\n",
"ax3.text(-4e-8,3e8,\"d negligible <1e-7\")\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-28 15:50:32 +02:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"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
}