Projektpraktikum/B_rework.ipynb

369 lines
103 KiB
Plaintext
Raw Normal View History

2023-09-28 15:50:32 +02:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import uproot\n",
"import numpy as np\n",
"import sys\n",
"import os\n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"from mpl_toolkits import mplot3d\n",
"import itertools\n",
"import awkward as ak\n",
"from scipy.optimize import curve_fit\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"9056"
]
},
"execution_count": 2,
"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",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.8606728758791105"
]
},
"execution_count": 3,
"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",
"execution_count": 4,
"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"
]
},
"execution_count": 4,
"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",
"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",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"def weird_div(n,d):\n",
" return n/d if d else 0"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.8593328191284226"
]
},
"execution_count": 13,
"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",
"execution_count": 7,
"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",
"execution_count": 14,
"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+++/XyUcAQg+nGYC4HNbt25Vz549aw0ykrR9+3Zt3rxZaWlp+s9//qMBAwboqaeekiTl5eVpy5YtGjNmjI4dO6bLLrtM8+fPd2373nvvqXv37urZs6fHx969e7diYmIqjdz06tVLX331lZmPC8DPCDMAfKqoqEh79+5V796961x3+/bteuqpp3T99dfLbrfr7rvv1q5duySdCzMZGRn66U9/qpCQEHXt2rXS5N333nuvyqiMu8c+efKkYmNjKy2LjY3VyZMn3f2YAAKI00wAfGrr1q0yDENNmjTRhg0bqrzfvn1714jIV199VeluvIWFha45Mnl5efrLX/7ieu+rr77S8OHDJUnbtm3Tnj17qj3F5M6xY2JiVFxcXOm94uJixcTEmPzUAPyJkRkAPlVxNdFrr72mgQMHVvlZtWqVpHPB5fDhw5Xu0Lt06VLdeOONKigoUFhYWKX3/vWvf+mSSy6RdG5UpmPHjurbt6+pYyclJenkyZM6cOCAa9vt27crJSXFBx0B4G02g5ssAAgCn3zyia6//nrNnTtXo0eP1p/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4WOGxsbIF4VOz33rrLY0fP14333yzzpw5o6uuukorVqyQ3W6XdG7UJTU1VQcOHFBsbKxuuOEGvfLKK5Kk9u3bKyMjQ1OmTNGYMWN07733auHChQH8NAAAeIYwY1HZ2dmufzdv3lx/+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",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABjYAAAIhCAYAAADtvIOUAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADbq0lEQVR4nOzde1xVVf7/8fcR5IgIJ7wAHsNLjZEKVqOFaDNoCuiIzkxTViRJF3PCyQydym5eJsFMyflqWTlOmpds+jb6rSwCrTRHUfLSiDlak9cUsUJQU1BYvz/6sesIKthBDsfX8/HYjzx7f87aa+9zoPVh7bWWzRhjBAAAAAAAAAAA0AA0q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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+HDTuHFjM2bMGJOVlWUWL15srr76ahMaGmoKCgqsu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kyBCXz6K6HKEuP//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()"
]
},
{
"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
}