Projektpraktikum/notebooks/B_updown.ipynb

1156 lines
444 KiB
Plaintext
Raw Normal View History

2023-10-09 12:10:28 +02:00
{
"cells": [
{
"cell_type": "code",
2023-10-29 11:51:36 +01:00
"execution_count": 8,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [],
"source": [
"import uproot\t\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",
"from mpl_toolkits.axes_grid1 import ImageGrid\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
2023-10-29 11:51:36 +01:00
"execution_count": 9,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"10522"
]
},
2023-10-29 11:51:36 +01:00
"execution_count": 9,
2023-10-09 12:10:28 +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) + ak.num(lost, axis=0)\n",
"#ak.count(found, axis=None)"
]
},
{
"cell_type": "code",
2023-10-29 11:51:36 +01:00
"execution_count": 10,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"eff all = 0.8606728758791105 +/- 0.003375885792719708\n"
]
}
],
"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",
"def eff_err(found, lost):\n",
" n_f = ak.num(found, axis=0)\n",
" n_all = ak.num(found, axis=0) + ak.num(lost,axis=0)\n",
" return 1/n_all * np.sqrt(np.abs(n_f*(1-n_f/n_all)))\n",
"\n",
"\n",
"print(\"eff all = \", t_eff(found, lost), \"+/-\", eff_err(found, lost))"
]
},
{
"cell_type": "code",
2023-10-29 11:51:36 +01:00
"execution_count": 11,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [],
"source": [
"#try excluding all photons that originate from a vtx @ z>9500mm\n",
"#ignore all brem vertices @ z>9500mm \n",
"\n",
"#found\n",
"\n",
"brem_e_f = found[\"brem_photons_pe\"]\n",
"brem_z_f = found[\"brem_vtx_z\"]\n",
"e_f = found[\"energy\"]\n",
"length_f = found[\"brem_vtx_z_length\"]\n",
"\n",
"brem_f = ak.ArrayBuilder()\n",
"\n",
"for itr in range(ak.num(found,axis=0)):\n",
" brem_f.begin_record()\n",
" #[:,\"energy\"] energy\n",
" brem_f.field(\"energy\").append(e_f[itr])\n",
" #[:,\"photon_length\"] number of vertices\n",
" brem_f.field(\"photon_length\").integer(length_f[itr])\n",
" #[:,\"brem_photons_pe\",:] photon energy \n",
" brem_f.field(\"brem_photons_pe\").append(brem_e_f[itr])\n",
" #[:,\"brem_vtx_z\",:] brem vtx z\n",
" brem_f.field(\"brem_vtx_z\").append(brem_z_f[itr])\n",
" brem_f.end_record()\n",
"\n",
"brem_f = ak.Array(brem_f)\n",
"\n",
"#lost\n",
"\n",
"brem_e_l = lost[\"brem_photons_pe\"]\n",
"brem_z_l = lost[\"brem_vtx_z\"]\n",
"e_l = lost[\"energy\"]\n",
"length_l = lost[\"brem_vtx_z_length\"]\n",
"\n",
"brem_l = ak.ArrayBuilder()\n",
"\n",
"for itr in range(ak.num(lost,axis=0)):\n",
" brem_l.begin_record()\n",
" #[:,\"energy\"] energy\n",
" brem_l.field(\"energy\").append(e_l[itr])\n",
" #[:,\"photon_length\"] number of vertices\n",
" brem_l.field(\"photon_length\").integer(length_l[itr])\n",
" #[:,\"brem_photons_pe\",:] photon energy \n",
" brem_l.field(\"brem_photons_pe\").append(brem_e_l[itr])\n",
" #[:,\"brem_vtx_z\",:] brem vtx z\n",
" brem_l.field(\"brem_vtx_z\").append(brem_z_l[itr])\n",
" brem_l.end_record()\n",
"\n",
"brem_l = ak.Array(brem_l)"
]
},
2023-10-09 15:25:15 +02:00
{
"cell_type": "code",
2023-10-29 11:51:36 +01:00
"execution_count": 12,
2023-10-09 15:25:15 +02:00
"metadata": {},
"outputs": [],
"source": [
"cut_brem_found = ak.ArrayBuilder()\n",
"\n",
"for itr in range(ak.num(brem_f, axis=0)):\n",
" cut_brem_found.begin_record()\n",
" cut_brem_found.field(\"energy\").real(brem_f[itr,\"energy\"])\n",
" \n",
" cut_brem_found.field(\"brem_photons_pe\")\n",
" cut_brem_found.begin_list()\n",
" for jentry in range(brem_f[itr, \"photon_length\"]):\n",
" if brem_f[itr, \"brem_vtx_z\", jentry]>9500:\n",
" continue\n",
" else:\n",
" cut_brem_found.real(brem_f[itr,\"brem_photons_pe\", jentry])\n",
" \n",
" #cut_brem_found.field(\"brem_vtx_z\").real(brem_f[itr, \"brem_vtx_z\",jentry])\n",
" cut_brem_found.end_list()\n",
" \n",
" cut_brem_found.field(\"brem_vtx_z\")\n",
" cut_brem_found.begin_list()\n",
" for jentry in range(brem_f[itr, \"photon_length\"]):\n",
" if brem_f[itr, \"brem_vtx_z\", jentry]>9500:\n",
" continue\n",
" else:\n",
" cut_brem_found.real(brem_f[itr, \"brem_vtx_z\",jentry])\n",
" cut_brem_found.end_list()\n",
" \n",
"\n",
" \n",
" cut_brem_found.end_record()\n",
"\n",
"cut_brem_found = ak.Array(cut_brem_found)\n",
"\n",
"\n",
"\n",
"cut_brem_lost = ak.ArrayBuilder()\n",
"\n",
"for itr in range(ak.num(brem_l, axis=0)):\n",
" cut_brem_lost.begin_record()\n",
" cut_brem_lost.field(\"energy\").real(brem_l[itr,\"energy\"])\n",
" \n",
" \n",
" cut_brem_lost.field(\"brem_photons_pe\")\n",
" cut_brem_lost.begin_list()\n",
" for jentry in range(brem_l[itr, \"photon_length\"]):\n",
" if brem_l[itr, \"brem_vtx_z\", jentry]>9500:\n",
" continue\n",
" else:\n",
" cut_brem_lost.real(brem_l[itr,\"brem_photons_pe\", jentry])\n",
" \n",
" #cut_brem_found.field(\"brem_vtx_z\").real(brem_f[itr, \"brem_vtx_z\",jentry])\n",
" cut_brem_lost.end_list()\n",
" \n",
" cut_brem_lost.field(\"brem_vtx_z\")\n",
" cut_brem_lost.begin_list()\n",
" for jentry in range(brem_l[itr, \"photon_length\"]):\n",
" if brem_l[itr, \"brem_vtx_z\", jentry]>9500:\n",
" continue\n",
" else:\n",
" cut_brem_lost.real(brem_l[itr, \"brem_vtx_z\",jentry])\n",
" cut_brem_lost.end_list()\n",
" \n",
" cut_brem_lost.end_record()\n",
"\n",
"cut_brem_lost = ak.Array(cut_brem_lost)\n"
]
},
{
"cell_type": "code",
2023-10-29 11:51:36 +01:00
"execution_count": 13,
2023-10-09 15:25:15 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre>{energy: 9.36e+03,\n",
" brem_photons_pe: [2.47e+03, 170, 224, 388, 3.23e+03, 809, 172, 224],\n",
" brem_vtx_z: [400, 501, 638, 667, 677, 709, 8.58e+03, 9.28e+03]}\n",
"---------------------------------------------------------------------\n",
"type: {\n",
" energy: float64,\n",
" brem_photons_pe: var * float64,\n",
" brem_vtx_z: var * float64\n",
"}</pre>"
],
"text/plain": [
"<Record {energy: 9.36e+03, ...} type='{energy: float64, brem_photons_pe: va...'>"
]
},
2023-10-29 11:51:36 +01:00
"execution_count": 13,
2023-10-09 15:25:15 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#data in cut_brem_found and cut_brem_lost\n",
"\n",
"cut_length_found = ak.num(cut_brem_found[\"brem_photons_pe\"],axis=-1)\n",
"cut_length_lost = ak.num(cut_brem_lost[\"brem_photons_pe\"], axis=-1)\n",
"\n",
"cut_brem_found[1]\n"
]
},
2023-10-29 11:51:36 +01:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### in magnet"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"inmagnet_found = ak.ArrayBuilder()\n",
"\n",
"for itr in range(ak.num(cut_brem_found, axis=0)):\n",
" \n",
" inmagnet_found.begin_record()\n",
" inmagnet_found.field(\"energy\").real(cut_brem_found[itr,\"energy\"])\n",
" \n",
" inmagnet_found.field(\"brem_photons_pe\")\n",
" inmagnet_found.begin_list()\n",
" for jentry in range(cut_length_found[itr]):\n",
" if (cut_brem_found[itr, \"brem_vtx_z\", jentry]>1500):\n",
" if cut_brem_found[itr, \"brem_vtx_z\", jentry]<=9500:\n",
" inmagnet_found.real(cut_brem_found[itr,\"brem_photons_pe\",jentry])\n",
" else:\n",
" continue\n",
" inmagnet_found.end_list()\n",
" \n",
" inmagnet_found.field(\"brem_vtx_z\")\n",
" inmagnet_found.begin_list()\n",
" for jentry in range(cut_length_found[itr]):\n",
" if cut_brem_found[itr, \"brem_vtx_z\", jentry]>1500:\n",
" if cut_brem_found[itr,\"brem_vtx_z\",jentry]<=9500:\n",
" inmagnet_found.real(cut_brem_found[itr,\"brem_vtx_z\",jentry])\n",
" else:\n",
" continue\n",
" inmagnet_found.end_list()\n",
" inmagnet_found.end_record()\n",
" \n",
"\n",
"inmagnet_found = ak.Array(inmagnet_found)\n",
"\n",
"\n",
"inmagnet_lost = ak.ArrayBuilder()\n",
"\n",
"for itr in range(ak.num(cut_brem_lost, axis=0)):\n",
" \n",
" inmagnet_lost.begin_record()\n",
" inmagnet_lost.field(\"energy\").real(cut_brem_lost[itr,\"energy\"])\n",
" \n",
" inmagnet_lost.field(\"brem_photons_pe\")\n",
" inmagnet_lost.begin_list()\n",
" for jentry in range(cut_length_lost[itr]):\n",
" if (cut_brem_lost[itr, \"brem_vtx_z\", jentry]>1500):\n",
" if cut_brem_lost[itr, \"brem_vtx_z\", jentry]<=9500:\n",
" inmagnet_lost.real(cut_brem_lost[itr,\"brem_photons_pe\",jentry])\n",
" else:\n",
" continue\n",
" inmagnet_lost.end_list()\n",
" \n",
" inmagnet_lost.field(\"brem_vtx_z\")\n",
" inmagnet_lost.begin_list()\n",
" for jentry in range(cut_length_lost[itr]):\n",
" if cut_brem_lost[itr, \"brem_vtx_z\", jentry]>1500:\n",
" if cut_brem_lost[itr,\"brem_vtx_z\",jentry]<=9500:\n",
" inmagnet_lost.real(cut_brem_lost[itr,\"brem_vtx_z\",jentry])\n",
" else:\n",
" continue\n",
" inmagnet_lost.end_list()\n",
" inmagnet_lost.end_record()\n",
" \n",
"\n",
"inmagnet_lost = ak.Array(inmagnet_lost)\n"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"cutoff_energy=350\n",
"#possibly: instead of checking if any photons exceed the cutoff, use the sum of all photon energies to separate nobrem and brem\n",
"\n",
"inmagnet_brem_found = inmagnet_found[ak.sum(inmagnet_found[\"brem_photons_pe\"],axis=-1,keepdims=False)>=cutoff_energy]\n",
"magnet_energy_found = ak.to_numpy(inmagnet_brem_found[\"energy\"])\n",
"magnet_eph_found = ak.to_numpy(ak.sum(inmagnet_brem_found[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"magnet_residual_found = magnet_energy_found - magnet_eph_found\n",
"magnet_energyloss_found = magnet_eph_found/magnet_energy_found\n",
"\n",
"\n",
"inmagnet_brem_lost = inmagnet_lost[ak.sum(inmagnet_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)>=cutoff_energy]\n",
"magnet_energy_lost = ak.to_numpy(inmagnet_brem_lost[\"energy\"])\n",
"magnet_eph_lost = ak.to_numpy(ak.sum(inmagnet_brem_lost[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"magnet_residual_lost = magnet_energy_lost - magnet_eph_lost\n",
"magnet_energyloss_lost = magnet_eph_lost/magnet_energy_lost"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"24784.620206013704"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ak.mean(magnet_eph_lost)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjQAAAHRCAYAAAB96iOvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABNJ0lEQVR4nO3dT4zb2J0v+m8FF/E1nmGzytnMarqobLIamypv7saTFJlep0tyDTABZjFdYjdq10iLXdnY3qSaGm+Nbqp6HuYB2bgo98VbJqRf2rjAYHBdZDubGbxJi+UsHuYt0iW24fs81ZNpvkXlsCmJ+kdRKlH1/QCCXRJFHh5R5E+Hv3POShRFEYiIiIgK7DvnXQAiIiKiaTGgISIiosJjQENERESFx4CGiIiICo8BDRERERUeAxoiIiIqPAY0REREVHj/5bwLMEu6rqNUKuHLL7/ErVu3UKlUzrtIM3cR95mIiGhpA5pqtQpZllGv1wEA5XIZkiRBVdVzLtnsXMR9JiIiAoCVZRwpOAgClEoltNttyLIMAGg0GnAcB47jnHPpZmNW++y6LtbW1qAoSl5FJSIiyt1S5tD4vg8A8YUdABRFgeu6CMPwnEo1W7Pa5zAMcXJyMm3xiIiIZmopA5pnz55BkqSu59bW1gBgKS7OhmEgCIKu55Z9n5eJCD4vijAM0Ww2+45Zml4QBGg2m0v7Q43Gd9HOK2kKE9CEYYhGo4GVlRWsrKxgdXUV1WoVmqahVCqh0Wh0LSsu5r0W5aTabDZRKpXi/dE0Da7rAjg7MDVNi18T+9ZsNgEA169fj5cT7ynCPl9E1Wo1/hzFwzCM1GV930e1WkWpVMLq6irK5TI0TYNhG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": {},
"output_type": "display_data"
}
],
"source": [
"\n",
"plt.hist(magnet_energyloss_found, alpha=0.5, bins=80, density=True, histtype='bar', color=\"blue\", label=\"found\")\n",
"plt.hist(magnet_energyloss_lost, alpha=0.5, bins=80, density=True, histtype='bar', color=\"darkorange\", label=\"lost\")\n",
"\n",
"#plt.vlines(ak.mean(both_eloss),0,3,colors=\"red\", label=\"mean\")\n",
"plt.xlabel(r\"Energyloss Ratio $E_\\gamma/E_0$\")\n",
"plt.ylabel(\"counts (normed)\")\n",
"plt.title(r'$B^0\\rightarrow K^{\\ast 0} e^+e^-$, $p>5$GeV, photons w/ brem_vtx_z$<9500$mm')\n",
"plt.legend(title=\"LHCb Simulation\", title_fontsize=15)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjQAAAHhCAYAAAB5kCQCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABN2UlEQVR4nO3dT4wb+Z3f/U8ngRUBwqi6tZecMl30HjaXzBRbF1/Ga5GZc9ykdMgCuUyTHvTN2CGncxnNxT3F1bVhF3sC7AP4IpEa4zk6pJ54AjxG8KhZoz0FWD8syYdgn8NOkyNoocixXc+h51cm2SSbLP6t7vcLIKRmFX/1q18Vq7781e/PRhiGoQAAABLsn606AwAAALMioAEAAIlHQAMAABKPgAYAACQeAQ0AAEg8AhoAAJB4BDQAACDx/sWqM7BIxWJRqVRKX3/9tW7fvq1cLrfqLC3cVdxnAAAubUCTz+dl27ZKpZIkKZ1Oy7IsZTKZFedsca7iPgMAIEkbl3Gk4CAIlEql1G63Zdu2JKlSqajRaKjRaKw4d4uxqH1uNpva2tqS4zjzyioAAHN3KdvQ+L4vSdGNXZIcx1Gz2VS3211RrhZrUfvc7XZ1eno6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FoTHQBMPti1jW/ABY9mqq5wAZBEAVP7XZ75ovWotKdhrkJDHZtfvr0qaTZA95es5xntm1HF6nem8uwGpVhzGd7azamYY6P67qq1+va2dmZe/dXk8c4F8NxvwgnDUrnkYZh27aeP38e1Yql0+m+Gq5xBm/Q5qaVyWSiNDzPO3c
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"nstart = 0\n",
"nend = 5e4\n",
"plt.hist(magnet_residual_found, alpha=0.5, bins=70, density=True, histtype='bar', color=\"blue\", label=\"found\", range=[nstart, nend])\n",
"plt.hist(magnet_residual_lost, alpha=0.5, bins=70, density=True, histtype='bar', color=\"darkorange\", label=\"lost\", range=[nstart, nend])\n",
"\n",
"#plt.vlines(ak.mean(both_eloss),0,3,colors=\"red\", label=\"mean\")\n",
"#plt.xlim(0,50000)\n",
"plt.xlabel(r\"Residual Energy in magnet $E_\\gamma$\")\n",
"plt.ylabel(\"counts (normed)\")\n",
"plt.title(r'$B^0\\rightarrow K^{\\ast 0} e^+e^-$, $p>5$GeV, photons w/ brem_vtx_z$<9500$mm')\n",
"plt.legend(title=\"LHCb Simulation\", title_fontsize=15)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
2023-10-09 15:25:15 +02:00
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 7,
2023-10-09 15:25:15 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"8"
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 7,
2023-10-09 15:25:15 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cut_length_found[1]"
]
},
2023-10-09 12:10:28 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Split in Upstream and Downstream Events and analyse separately"
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 8,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [],
"source": [
"#try to find a split between energy lost before and after the magnet (z~5000mm)\n",
"\n",
"upstream_found = ak.ArrayBuilder()\n",
"downstream_found = ak.ArrayBuilder()\n",
"\n",
2023-10-09 15:25:15 +02:00
"for itr in range(ak.num(cut_brem_found, axis=0)):\n",
2023-10-09 12:10:28 +02:00
" upstream_found.begin_record()\n",
2023-10-09 15:25:15 +02:00
" upstream_found.field(\"energy\").real(cut_brem_found[itr,\"energy\"])\n",
2023-10-09 12:10:28 +02:00
" \n",
" downstream_found.begin_record()\n",
2023-10-09 15:25:15 +02:00
" downstream_found.field(\"energy\").real(cut_brem_found[itr,\"energy\"])\n",
2023-10-09 12:10:28 +02:00
" \n",
" upstream_found.field(\"brem_photons_pe\")\n",
" downstream_found.field(\"brem_photons_pe\")\n",
" upstream_found.begin_list()\n",
" downstream_found.begin_list()\n",
2023-10-09 15:25:15 +02:00
" for jentry in range(cut_length_found[itr]):\n",
" if (cut_brem_found[itr, \"brem_vtx_z\", jentry]>5000):\n",
" if cut_brem_found[itr, \"brem_vtx_z\", jentry]<=9500:\n",
" downstream_found.real(cut_brem_found[itr,\"brem_photons_pe\",jentry])\n",
2023-10-09 12:10:28 +02:00
" else:\n",
" continue\n",
" else:\n",
2023-10-09 15:25:15 +02:00
" upstream_found.real(cut_brem_found[itr,\"brem_photons_pe\", jentry]) \n",
2023-10-09 12:10:28 +02:00
" upstream_found.end_list()\n",
" downstream_found.end_list()\n",
" \n",
" upstream_found.field(\"brem_vtx_z\")\n",
" downstream_found.field(\"brem_vtx_z\")\n",
" upstream_found.begin_list()\n",
" downstream_found.begin_list()\n",
2023-10-09 15:25:15 +02:00
" for jentry in range(cut_length_found[itr]):\n",
" if cut_brem_found[itr, \"brem_vtx_z\", jentry]>5000:\n",
" if cut_brem_found[itr,\"brem_vtx_z\",jentry]<=9500:\n",
" downstream_found.real(cut_brem_found[itr,\"brem_vtx_z\",jentry])\n",
2023-10-09 12:10:28 +02:00
" else:\n",
" continue\n",
" else:\n",
2023-10-09 15:25:15 +02:00
" upstream_found.real(cut_brem_found[itr, \"brem_vtx_z\",jentry])\n",
2023-10-09 12:10:28 +02:00
" upstream_found.end_list()\n",
" downstream_found.end_list()\n",
" upstream_found.end_record()\n",
" downstream_found.end_record()\n",
" \n",
"\n",
"upstream_found = ak.Array(upstream_found)\n",
"downstream_found = ak.Array(downstream_found)\n",
"\n",
"\n",
"upstream_lost = ak.ArrayBuilder()\n",
"downstream_lost = ak.ArrayBuilder()\n",
"\n",
2023-10-09 15:25:15 +02:00
"for itr in range(ak.num(cut_brem_lost, axis=0)):\n",
2023-10-09 12:10:28 +02:00
" upstream_lost.begin_record()\n",
2023-10-09 15:25:15 +02:00
" upstream_lost.field(\"energy\").real(cut_brem_lost[itr,\"energy\"])\n",
2023-10-09 12:10:28 +02:00
" \n",
" downstream_lost.begin_record()\n",
2023-10-09 15:25:15 +02:00
" downstream_lost.field(\"energy\").real(cut_brem_lost[itr,\"energy\"])\n",
2023-10-09 12:10:28 +02:00
" \n",
" upstream_lost.field(\"brem_photons_pe\")\n",
" downstream_lost.field(\"brem_photons_pe\")\n",
" upstream_lost.begin_list()\n",
" downstream_lost.begin_list()\n",
2023-10-09 15:25:15 +02:00
" for jentry in range(cut_length_lost[itr]):\n",
" if (cut_brem_lost[itr, \"brem_vtx_z\", jentry]>5000):\n",
" if cut_brem_lost[itr, \"brem_vtx_z\", jentry]<=9500:\n",
" downstream_lost.real(cut_brem_lost[itr,\"brem_photons_pe\",jentry])\n",
2023-10-09 12:10:28 +02:00
" else:\n",
" continue\n",
" else:\n",
2023-10-09 15:25:15 +02:00
" upstream_lost.real(cut_brem_lost[itr,\"brem_photons_pe\", jentry]) \n",
2023-10-09 12:10:28 +02:00
" upstream_lost.end_list()\n",
" downstream_lost.end_list()\n",
" \n",
" upstream_lost.field(\"brem_vtx_z\")\n",
" downstream_lost.field(\"brem_vtx_z\")\n",
" upstream_lost.begin_list()\n",
" downstream_lost.begin_list()\n",
2023-10-09 15:25:15 +02:00
" for jentry in range(cut_length_lost[itr]):\n",
" if cut_brem_lost[itr, \"brem_vtx_z\", jentry]>5000:\n",
" if cut_brem_lost[itr,\"brem_vtx_z\",jentry]<=9500:\n",
" downstream_lost.real(cut_brem_lost[itr,\"brem_vtx_z\",jentry])\n",
2023-10-09 12:10:28 +02:00
" else:\n",
" continue\n",
" else:\n",
2023-10-09 15:25:15 +02:00
" upstream_lost.real(cut_brem_lost[itr, \"brem_vtx_z\",jentry])\n",
2023-10-09 12:10:28 +02:00
" upstream_lost.end_list()\n",
" downstream_lost.end_list()\n",
" upstream_lost.end_record()\n",
" downstream_lost.end_record()\n",
" \n",
"\n",
"upstream_lost = ak.Array(upstream_lost)\n",
"downstream_lost = ak.Array(downstream_lost)\n"
]
},
2023-10-09 12:22:51 +02:00
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 9,
2023-10-09 12:22:51 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre>{energy: 4.62e+04,\n",
" brem_photons_pe: [3.26e+03, 4.45e+03, 178, 1.45e+04, 1.1e+03, 3.79e+03],\n",
" brem_vtx_z: [162, 187, 387, 487, 1.34e+03, 2.32e+03]}\n",
"-------------------------------------------------------------------------\n",
"type: {\n",
" energy: float64,\n",
" brem_photons_pe: var * float64,\n",
" brem_vtx_z: var * float64\n",
"}</pre>"
],
"text/plain": [
"<Record {energy: 4.62e+04, ...} type='{energy: float64, brem_photons_pe: va...'>"
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 9,
2023-10-09 12:22:51 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"upstream_found[0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
2023-10-09 12:10:28 +02:00
{
"cell_type": "code",
2023-10-26 16:21:44 +02:00
"execution_count": 10,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
2023-10-09 16:32:56 +02:00
"upstream: cutoff energy = 350MeV, sample size: 1562\n",
"eff = 0.9181 +/- 0.007\n"
2023-10-09 12:10:28 +02:00
]
}
],
"source": [
2023-10-09 15:25:15 +02:00
"#plot efficiency against cutoff energy \n",
"up_efficiencies = []\n",
2023-10-10 16:17:10 +02:00
"up_deff = []\n",
2023-10-09 12:10:28 +02:00
"\n",
"\n",
2023-10-10 16:17:10 +02:00
"for cutoff_energy in range(0,10050,200):\n",
2023-10-09 16:32:56 +02:00
"\tup_nobrem_f = upstream_found[ak.sum(upstream_found[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"\tup_nobrem_l = upstream_lost[ak.sum(upstream_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"\t\n",
"\tif ak.num(up_nobrem_f,axis=0)+ak.num(up_nobrem_l,axis=0)==0:\n",
2023-10-10 16:17:10 +02:00
"\t\tup_efficiencies.append(0)\n",
"\t\tup_deff.append(0)\n",
2023-10-09 16:32:56 +02:00
"\t\tcontinue\n",
"\n",
2023-10-09 15:25:15 +02:00
"\teff = t_eff(up_nobrem_f,up_nobrem_l)\n",
2023-10-10 16:17:10 +02:00
"\tdeff = eff_err(up_nobrem_f,up_nobrem_l)\n",
2023-10-09 15:25:15 +02:00
"\tup_efficiencies.append(eff)\n",
2023-10-10 16:17:10 +02:00
"\tup_deff.append(deff)\n",
2023-10-09 12:10:28 +02:00
"\n",
2023-10-09 15:25:15 +02:00
"\t#print(\"\\ncutoff = \",str(cutoff_energy),\"MeV, sample size: \",ak.num(up_nobrem_f,axis=0)+ak.num(up_nobrem_l,axis=0))\n",
"\t#print(\"eff = \",np.round(eff,4), \"+/-\", np.round(eff_err(up_nobrem_f, up_nobrem_l),4))\n",
2023-10-09 12:10:28 +02:00
"\n",
"\"\"\"\n",
"we see that a cutoff energy of xxxMeV is ideal because the efficiency drops significantly for higher values\n",
"\"\"\"\n",
2023-10-09 16:32:56 +02:00
"cutoff_energy = 350.0 #MeV\n",
2023-10-09 12:10:28 +02:00
"\n",
"\"\"\"\n",
"better statistics: cutoff=xxxMeV - sample size: xxx events and efficiency=xxxx\n",
"\"\"\"\n",
2023-10-09 16:32:56 +02:00
"up_nobrem_found = upstream_found[ak.sum(upstream_found[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"up_nobrem_lost = upstream_lost[ak.sum(upstream_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
2023-10-09 12:10:28 +02:00
"\n",
2023-10-09 16:32:56 +02:00
"print(\"\\nupstream: cutoff energy = 350MeV, sample size:\",ak.num(up_nobrem_found,axis=0)+ak.num(up_nobrem_lost,axis=0))\n",
2023-10-09 12:10:28 +02:00
"print(\"eff = \",np.round(t_eff(up_nobrem_found, up_nobrem_lost),4), \"+/-\", np.round(eff_err(up_nobrem_found, up_nobrem_lost),3))\n"
]
},
{
"cell_type": "code",
2023-10-26 16:21:44 +02:00
"execution_count": 11,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-10-09 16:32:56 +02:00
"nobrem_vertices\n",
"upstream: cutoff energy = 350MeV, sample size: 1562\n",
"eff = 0.9181 +/- 0.007\n",
2023-10-09 12:10:28 +02:00
"\n",
2023-10-09 16:32:56 +02:00
"downstream: cutoff energy = 350MeV, sample size: 5131\n",
"eff = 0.8864 +/- 0.004\n"
2023-10-09 12:10:28 +02:00
]
}
],
"source": [
2023-10-09 15:25:15 +02:00
"down_efficiencies = []\n",
2023-10-10 16:17:10 +02:00
"down_deff = []\n",
"\n",
"for cutoff_energy in range(0,10050,200):\n",
2023-10-09 16:32:56 +02:00
"\tdown_nobrem_f = downstream_found[ak.sum(downstream_found[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"\tdown_nobrem_l = downstream_lost[ak.sum(downstream_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"\n",
"\tif ak.num(down_nobrem_f,axis=0)+ak.num(down_nobrem_l,axis=0)==0:\n",
2023-10-10 16:17:10 +02:00
"\t\tdown_efficiencies.append(0)\n",
"\t\tdown_deff.append(0)\n",
2023-10-09 16:32:56 +02:00
"\t\tcontinue\n",
2023-10-09 15:25:15 +02:00
"\teff = t_eff(down_nobrem_f,down_nobrem_l)\n",
2023-10-10 16:17:10 +02:00
"\tdeff = eff_err(down_nobrem_f,down_nobrem_l)\n",
2023-10-09 15:25:15 +02:00
"\tdown_efficiencies.append(eff)\n",
2023-10-10 16:17:10 +02:00
"\tdown_deff.append(deff)\n",
2023-10-09 12:10:28 +02:00
"\n",
"\n",
2023-10-09 15:25:15 +02:00
"\t#print(\"\\ncutoff = \",str(cutoff_energy),\"MeV, sample size: \",ak.num(down_nobrem_f,axis=0)+ak.num(down_nobrem_l,axis=0))\n",
"\t#print(\"eff = \",np.round(eff,4), \"+/-\", np.round(eff_err(down_nobrem_f, down_nobrem_l),4))\n",
2023-10-09 12:10:28 +02:00
"\n",
"\"\"\"\n",
"we see that a cutoff energy of xxxMeV is ideal because the efficiency drops significantly for higher values\n",
"\"\"\"\n",
2023-10-09 16:32:56 +02:00
"cutoff_energy = 350.0 #MeV\n",
2023-10-09 12:10:28 +02:00
"\n",
"\"\"\"\n",
"better statistics: cutoff=xxxMeV - sample size: xxx events and efficiency=xxxx\n",
"\"\"\"\n",
2023-10-09 16:32:56 +02:00
"down_nobrem_found = downstream_found[ak.sum(downstream_found[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"down_nobrem_lost = downstream_lost[ak.sum(downstream_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"\n",
"\n",
"print(\"nobrem_vertices\\nupstream: cutoff energy = 350MeV, sample size:\",ak.num(up_nobrem_found,axis=0)+ak.num(up_nobrem_lost,axis=0))\n",
"print(\"eff = \",np.round(t_eff(up_nobrem_found, up_nobrem_lost),4), \"+/-\", np.round(eff_err(up_nobrem_found, up_nobrem_lost),3))\n",
2023-10-09 12:10:28 +02:00
"\n",
2023-10-09 16:32:56 +02:00
"print(\"\\ndownstream: cutoff energy = 350MeV, sample size:\",ak.num(down_nobrem_found,axis=0)+ak.num(down_nobrem_lost,axis=0))\n",
2023-10-09 12:10:28 +02:00
"print(\"eff = \",np.round(t_eff(down_nobrem_found, down_nobrem_lost),4), \"+/-\", np.round(eff_err(down_nobrem_found, down_nobrem_lost),3))\n"
]
},
{
"cell_type": "code",
2023-10-26 16:21:44 +02:00
"execution_count": 12,
2023-10-09 15:25:15 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-29 11:51:36 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABc4AAAJLCAYAAADeqgXEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB9vElEQVR4nO3dQYhjaX4g+H+YorMTV1cro8Y1DA1mSgENY3xoS2lmG0wVTEnMwT4YUqo67GH34JJYgrn0IUSCh+7GsIHiaoJFkY3Zgy+VUt2mD4vULN202V0qpekFY4MhlHsxg2u2I9TlWrKqD/32kPNUUoYiQi9CipAUvx8EmaH3ve99ep9C+c9/fPp/W0mSJAEAAAAAAERExG/d9gAAAAAAAGCVSJwDAAAAAMAEiXMAAAAAAJggcQ4AAAAAABMkzgEAAAAAYILEOQAAAAAATJA4B4ANNRwOYzQa3fYwAAAAYO1InAPAhup0OtHr9W57GAAAALB2JM4BAAAAAGCCxDkAAAAAAEyQOAcAYGFGo1EMh8PbHgYAAMC1SJwDALAwT58+jWazedvD4BKdTue2h3AnjUaj6HQ6Ua1W48GDBzEYDG57SCtvOBzG0dFRlMvl2x4KAHDHSJwDAJkcHByMkz4PHjyIer0eo9Hotoe1cIPBIOr1ejx48CC2tramvtLnXi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rValGr1WJnZ+dKCfzhcDielzRRmT6vTqez0HmYlPX1fRs/D+mc5nK5mQna9L4tY/PTQqEQ7XY7jo+P4+TkJHZ2dsb34Dr
2023-10-09 15:25:15 +02:00
"text/plain": [
"<Figure size 1800x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#plot efficiencies wrt cutoff energy\n",
"fig, ax = plt.subplots(nrows=1,ncols=2,figsize=(18,6))\n",
2023-10-10 16:17:10 +02:00
"x_ = np.arange(0,10050,step=200)\n",
"\n",
"ax[0].errorbar(x_,up_efficiencies,yerr=up_deff, ls=\"\", capsize=1,fmt=\".\")\n",
"ax[0].set(xlabel=\"cutoff energy [MeV]\",ylabel=r\"$\\epsilon$\",title=\"upstream\", ylim=[0.8,1.0])\n",
2023-10-26 16:21:44 +02:00
"#ax[0].set_yticks(np.arange(0.8,1.01,step=0.02),minor=False)\n",
"#ax[0].set_xticks(np.arange(0,10100,step=200),minor=True)\n",
"#ax[0].grid()\n",
2023-10-09 15:25:15 +02:00
"\n",
2023-10-10 16:17:10 +02:00
"ax[1].errorbar(x_,down_efficiencies,yerr=down_deff, ls=\"\", capsize=1,fmt=\".\")\n",
"ax[1].set(xlabel=\"cutoff energy [MeV]\",ylabel=r\"$\\epsilon$\",title=\"downstream\", ylim=[0.8,1.0])\n",
2023-10-26 16:21:44 +02:00
"#ax[1].set_yticks(np.arange(0.8,1.01,step=0.02),minor=False)\n",
"#ax[1].set_xticks(np.arange(0,10100,step=200),minor=True)\n",
"#ax[1].grid(True)\n",
2023-10-09 16:32:56 +02:00
"\n",
"fig.suptitle(r\"$e^\\pm$ from $B\\rightarrow K^\\ast ee$, $p>5$GeV, nobrem electrons\")\n",
"\n",
2023-10-09 15:25:15 +02:00
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 13,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-10-09 16:32:56 +02:00
"brem vertices\n",
"upstream eff = 0.851 +/- 0.004\n",
"downstream eff = 0.836 +/- 0.005\n"
2023-10-09 12:10:28 +02:00
]
}
],
"source": [
2023-10-09 16:32:56 +02:00
"cutoff_energy=350\n",
2023-10-09 12:22:51 +02:00
"#possibly: instead of checking if any photons exceed the cutoff, use the sum of all photon energies to separate nobrem and brem\n",
2023-10-09 12:10:28 +02:00
"\n",
2023-10-09 16:32:56 +02:00
"upstream_brem_found = upstream_found[ak.sum(upstream_found[\"brem_photons_pe\"],axis=-1,keepdims=False)>=cutoff_energy]\n",
2023-10-09 12:10:28 +02:00
"up_energy_found = ak.to_numpy(upstream_brem_found[\"energy\"])\n",
"up_eph_found = ak.to_numpy(ak.sum(upstream_brem_found[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"up_residual_found = up_energy_found - up_eph_found\n",
"up_energyloss_found = up_eph_found/up_energy_found\n",
"\n",
"\n",
2023-10-09 16:32:56 +02:00
"upstream_brem_lost = upstream_lost[ak.sum(upstream_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)>=cutoff_energy]\n",
2023-10-09 12:10:28 +02:00
"up_energy_lost = ak.to_numpy(upstream_brem_lost[\"energy\"])\n",
"up_eph_lost = ak.to_numpy(ak.sum(upstream_brem_lost[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"up_residual_lost = up_energy_lost - up_eph_lost\n",
"up_energyloss_lost = up_eph_lost/up_energy_lost\n",
"\n",
"\n",
2023-10-09 16:32:56 +02:00
"print(\"brem vertices\\nupstream eff = \", np.round(t_eff(upstream_brem_found,upstream_brem_lost),3), \"+/-\", np.round(eff_err(upstream_brem_found, upstream_brem_lost),3))\n",
2023-10-09 12:10:28 +02:00
"\n",
"\n",
2023-10-09 16:32:56 +02:00
"downstream_brem_found = downstream_found[ak.sum(downstream_found[\"brem_photons_pe\"],axis=-1,keepdims=False)>=cutoff_energy]\n",
2023-10-09 12:10:28 +02:00
"down_energy_found = ak.to_numpy(downstream_brem_found[\"energy\"])\n",
"down_eph_found = ak.to_numpy(ak.sum(downstream_brem_found[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"down_residual_found = down_energy_found - down_eph_found\n",
"down_energyloss_found = down_eph_found/down_energy_found\n",
"\n",
"\n",
2023-10-09 16:32:56 +02:00
"downstream_brem_lost = downstream_lost[ak.sum(downstream_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)>=cutoff_energy]\n",
2023-10-09 12:10:28 +02:00
"down_energy_lost = ak.to_numpy(downstream_brem_lost[\"energy\"])\n",
"down_eph_lost = ak.to_numpy(ak.sum(downstream_brem_lost[\"brem_photons_pe\"], axis=-1, keepdims=False))\n",
"down_residual_lost = down_energy_lost - down_eph_lost\n",
"down_energyloss_lost = down_eph_lost/down_energy_lost\n",
"\n",
"\n",
"print(\"downstream eff = \", np.round(t_eff(downstream_brem_found,downstream_brem_lost),3), \"+/-\", np.round(eff_err(downstream_brem_found, downstream_brem_lost),3))"
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 14,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"upstream:\n",
2023-10-09 16:32:56 +02:00
"mean energyloss relative to initial energy (found): 0.33078325542598164\n",
"mean energyloss relative to initial energy (lost): 0.5708618852236069\n",
2023-10-09 12:10:28 +02:00
"downstream:\n",
2023-10-09 16:32:56 +02:00
"mean energyloss relative to initial energy (found): 0.19104090843883118\n",
"mean energyloss relative to initial energy (lost): 0.3051594568487781\n"
2023-10-09 12:10:28 +02:00
]
}
],
"source": [
"print(\"upstream:\\nmean energyloss relative to initial energy (found): \",ak.mean(up_energyloss_found))\n",
"print(\"mean energyloss relative to initial energy (lost): \", ak.mean(up_energyloss_lost))\n",
"\n",
"print(\"downstream:\\nmean energyloss relative to initial energy (found): \",ak.mean(down_energyloss_found))\n",
"print(\"mean energyloss relative to initial energy (lost): \", ak.mean(down_energyloss_lost))"
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 15,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-29 11:51:36 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABbsAAAJPCAYAAABVWwkOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB/t0lEQVR4nOz9T2wjaX7nf35U0+sc4ZfIilT5MocGOoOewxgLTFZQtcAUFsiyk5w+u0VmDjAG5tAt0g3eCt1kazBAqS6tCrmuhB3M6oV34UuKVC8W2IubLIwKC9Thl2J0+rKzO92MLCMX8AI/lxSdyIVGPXZzD+mIIqUgRQb/Bcn3CyCqFH+e+JJBRj7x5ZfPs9HtdrsCAAAAAAAAAGCJvbXoAAAAAAAAAAAAmBTJbgAAAAAAAADA0iPZDQAAAAAAAABYeiS7AQAAAAAAAABLj2Q3AAAAAAAAAGDpkewGAAAAAAAAACw9kt0AAAAAAAAAgKVHshsAAAAAAAAAsPRIdgMAAAAAAAAAlh7JbgAAVpDv+/I8b9FhAAAAAAAwNyS7AQBYQUdHR7Jte9Fh4AaNRmPRISy1VqulYrGou3fv8louMd/31Wg0lM/ndffuXbmuu+iQgLFw/QEAIDlIdgMAEs113TCZtbGx0fe4e/eu7t69q3Q6rUqlIt/3Fx1ubJVKRel0+tpzzOfzarVakt4khCqVyrXXolgsSnrzWgXV3FtbWzIMI9wvaAPzd3h4eO28Bo+nT5/euH+Q0E2lUuG5733ft1oteZ6ndDo9UZKw0WhEvgez2awODw8j93FdV/l8/tp7dh6/Kmg0GnIcR7Vabak/+6vO9/3wfTRIrVaT4zhqNBqcS8xcpVJRNptVOp3W3bt3VSwWR3rfxb2WNxoNZbPZ8JjZbHakf5Pj7gcAwNrr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LnfL5XLXtu1uu93uS9hMI0kdJNGDpPc0J/U8Pz/vS9IPS5L0rp/G+zlI8lx9L/QmVQYl3rvd/uR71LkNEhrTEBzn6hc8QfJ20OvSm5C/+jyDhGHUcxw0WV23+83zvppoHCWZGKfd3lgNw+h7rXsTn1ff68Hn4Opr0mw2R04yd7v9n7NB66I+Z0ECOcq414Te1zaYCLD3OL3vj2H7BcezbTv8Ai7O52DYF09Bks8wjGuvc29idZLPcO+XvFFyudy1CQxHneQzuBYF5y54j00yqWW5XI68bgbv3XESnr1fAA1qd1y9Cdubthn02Rn1Wt77JVHUJJOB3mTxJPsFZvWeXfRnAQCAcZHsBgAkXu9N5dUqv6gE1zwFSZhJY+i9eb2pknOagvivJt+Cm9urz2vc7ScVvBa5XO5a21er26aht5JtWkmWq+33voevPqfe9/ZNxw6q3wuFwrVHkPALvjiJEiRsBq0P4g3iGZSgnVZF/LAvL3qTJleTVYOSMN3uN++Rq0mYIBE7KNHfm3TqbfemZGLcdrvdbl9y76re6tao40W9ZsO+xLgqSKxGvRd6q6yvikq4BoYl/aP0vrZR53LYF1zBZ2pQIjPO56C3Ev+q3s/FsATvJF+E9r4eUUntqOczarK79/MUVMOP836JEnW83n/XRvm34eqXjtMU/Fsy7D05SkI8MOxaPuzXEr2Cz2/wPoq7X2BW79lFfxYAABgXY3YDABKtd5xex3F0fn6ubrer8/NzFQqFcPLGRU3KlclkZNu2Hj58ONFklb0TcPZOStg7Buu0BeNuGobRd8xWq6VWq6VMJtM3bui420/K9/3wNc1ms9faDsYtneaEpJlMRs1mU+12W57n6e7du1OdiDSTyajdbod/976/xx3X1LIs2bYdjqVcq9V0dHSkSqUSTm7WaDTk+/61MXRTqVQ43qzv+wOP3XtOW61W3xi1QduFQmGsuAcJxtKNGlPXNM0wjmB8/lEE75G
2023-10-09 12:10:28 +02:00
"text/plain": [
"<Figure size 1800x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#in abhängigkeit von der energie der elektronen\n",
"fig, ax = plt.subplots(nrows=1, ncols=2, figsize=(18,6))\n",
"\n",
"\n",
"ax[0].hist(up_energyloss_lost, bins=100, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=\"lost\")\n",
"ax[0].hist(up_energyloss_found, bins=100, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=\"found\")\n",
2023-10-26 16:21:44 +02:00
"#ax[0].set_xticks(np.arange(0,1.1,0.1), minor=True,)\n",
"#ax[0].set_yticks(np.arange(0,11,1), minor=True)\n",
2023-10-09 12:10:28 +02:00
"ax[0].set_xlabel(r\"$E_\\gamma/E_0$\")\n",
"ax[0].set_ylabel(\"counts (normed)\")\n",
"ax[0].set_title(\"Upstream\")\n",
"ax[0].legend()\n",
2023-10-26 16:21:44 +02:00
"#ax[0].grid()\n",
2023-10-09 12:10:28 +02:00
"\n",
"ax[1].hist(down_energyloss_lost, bins=100, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=\"lost\")\n",
"ax[1].hist(down_energyloss_found, bins=100, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=\"found\")\n",
2023-10-26 16:21:44 +02:00
"#ax[1].set_xticks(np.arange(0,1.1,0.1), minor=True,)\n",
"#ax[1].set_yticks(np.arange(0,11,1), minor=True)\n",
2023-10-09 12:10:28 +02:00
"ax[1].set_xlabel(r\"$E_\\gamma/E_0$\")\n",
"ax[1].set_ylabel(\"counts (normed)\")\n",
"ax[1].set_title(\"Downstream\")\n",
"ax[1].legend()\n",
2023-10-26 16:21:44 +02:00
"#ax[1].grid()\n",
2023-10-09 12:10:28 +02:00
"\n",
"\"\"\"\n",
2023-10-09 15:25:15 +02:00
"most electrons lose little energy relative to their initial energy downstream\n",
2023-10-09 12:10:28 +02:00
"\"\"\"\n",
2023-10-09 16:32:56 +02:00
"fig.suptitle(r\"$B\\rightarrow K^\\ast ee$, $p>5$GeV, photons w/ brem_vtx_z$<9500$mm\")\n",
2023-10-09 12:10:28 +02:00
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-26 16:21:44 +02:00
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-10-29 11:51:36 +01:00
"execution_count": 17,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-26 16:21:44 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAHOCAYAAACVVnNvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABP5UlEQVR4nO3dTYzbWHo3+n9N7h3HgGGzyrPJ4gJd1Mwis4lNlTez6UybRK+nS3ItMkAW6RK74V1jWpwKArR70zIVbwszVDlALjBAUCW6g7uciEbcm1lcF9meTXLvOyOWB14ki7TENgw4NZlpvovqw9YHJVHUN/X/AYJdEj+OKIp8dM5zztkIwzAEERERUYZ8a9EFICIiIpo2BjhERESUOQxwiIiIKHMY4BAREVHmMMAhIiKizGGAQ0RERJnDAIeIiIgyhwEOERERZQ4DHKIZ8Txv0UWYqyAIUKvV4Pv+oouSOb7vo1arIQiCRReFFmzdriuTYICTQhAEqFar2NjYwMbGBjY3N1EsFqFpGnK5HKrV6qKLGKnVasjlclFZNU2D4zgALr4omqZFr/WW2zAM3qwSKhaL0XEUD8MwYpf1PA/FYhG5XA6bm5vI5/PQNA2GYaBWqyGfz4+1b8dxuj7jfD4P27b7lrNtG/l8PlpmmhfKWq2G7e1t6LrOm3AKuq4P/Nyr1SpyuRx0XUer1ZpzyWjafN+HruvQdR3FYnHodybpdcUwDBSLxeg+NOi6nXS5zAgpNUVRQgChZVnRc/V6PQQQFgqFBZasm2maIYBQluW+11RVDRVFCdvtdvSceD+maYbNZjN0XTdsNBrzKu7KabfboSzLYaFQ6Hq4rtu3bLlcjs6PZrPZtY1SqRQCCNN8LdvtdrRu5/nYy7KsUJKksbefhHhvce87rWaz2XVuZp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S3cRHXbBEG3+ah2VZcBwHm5ubIwMp0fYqLsLiSzmNNs9arQbHcXB0dARJklCr1WAYBhqNRnTSJlkmDc/zUCgUui724kbS+eUZV6FQgOu6XTeANGO6qKoKRVGiMnXe8IcFTpIkRe9J/Cva5Ov1etej3W4jDMPYQFFVVciyHLWHA8DJycnAnKu0RBnHCQaH5TeI4zRse5OuP0i9XockSTAMA7lcbqw8jN4bdq1Ww507dwB8czM6OTnpuy6I5cWyaYjPv/c9995c0pxHsyLOQ3FsPM/rC4pHSRPUxHEcB7ZtR0FTr84xY5rN5sTfIcuyYJomPM/rykUS161hx6H3uiKuoXHXKPGcLMuJl8siBjgpiMBC07Su58VFQvxaG8SyLDSbzVQPy7KgKAoajcbIi1JvIrT4hTKN0WbFRd33/ShgajabXWVKssy4xE2hN7ny6dOnAEYHl+OYZMA6WZaji1bnzSauxiWOWLez5mMc4nibpgnbtrGzszPVpPfOMqa5OA77xZgkSJ10/V6yLOPs7CyqNcvn84kT63tv2OImpqpqtA3LsvpujsfHx2MnffcS6476DNKeR7MgkuEdx4Hv+zg+Pk6cZC2IjhO+70/UWUDsNy6xf1bK5TKazSbCMITrutjZ2YHv+ygUCiPPhc7rivjM4wZ/FM8pipJ4uSxigDOmIAiiX0O9N+rOi8e0bybAxS8dwzDw+PHjREGCqGnqDMTEL59xLyidROBUKpVQLpdhmmbfxTvJMmnE1Z4BF7+aVVWdOHjK5/OwLAv1eh2NRiP159jba0Ec93F/eYqLU1wTCICBtXilUim6Aezv70/0eQ8iLo7jjLwsjklcuUXQksvlZrb+IOKG2Wg0opvdOMdM3LA7g0kxQm21Wo39ZT5u81Qc8Z57m6R6pT2PZkU0l1qWNbDJcZj9/X24rgtZllOPuC7WK5fLAwNEUdPVaDQS9axLo/PHyCid1xV
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.hist(up_energyloss_lost, bins=100, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=\"lost\")\n",
"plt.hist(up_energyloss_found, bins=100, density=True, alpha=0.5, histtype='bar', color=\"blue\", label=\"found\")\n",
"plt.xlabel(r\"$E_\\gamma/E_0$\")\n",
"plt.ylabel(\"counts (normed)\")\n",
"plt.title(r\"$B\\rightarrow K^\\ast ee$, $p>5$GeV, photons w/ brem_vtx_z$<9500$mm\")\n",
"plt.legend(title=\"LHCb Simulation\", title_fontsize=15)\n",
"plt.text(0.35,2.0, \"Upstream\", size=15)\n",
"plt.show()"
]
},
2023-10-29 11:51:36 +01:00
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkIAAAHRCAYAAACGvdZwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABSTElEQVR4nO3dTYzc5p0/+G9nZqMxVpDY7bnksrBYySGnyKzWWUhEwrcBki6qDxNgLu6iHd2McdE9wMI2FnCbNbpqYrI1wBxyUZPynHaBDKkZeE8LqEkrwOL/ByYoShksNv9DVEULWniUyQz30HloVhXrjfXSVc3vByhIXcWXp55i8fnV87qVpmkKIiIiogr61nkngIiIiOi8MBAiIiKiymIgRERERJXFQIiIiIgqi4EQERERVRYDISIiIqosBkJERERUWX963glYR4ZhoFar4fnz57hx4wYajcZ5J2npqvieiYiIGAgN0HUdsiyj1WoBAOr1OiRJgqqq55yy5anieyYiIgKALc4s/Y04jlGr1dDpdCDLMgCg3W7D9334vn/OqVuOZb3nIAiws7MDRVEWlVQiIqKFYx+hnCiKACALCABAURQEQYAkSc4pVcu1rPecJAm63e68ySMiIloqBkI5jx8/hiRJfc/t7OwAwIUo1E3TRBzHfc9d9Pd8kYigtSqSJIHjOEPXLM0vjmM4jnNhf+DR9Kp2Xyly4QOhJEnQbrextbWFra0tbG9vQ9d1aJqGWq2G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XGKXsdLYMkSWg0GgiCAHEc48GDBzNPGRHHcVbTmK/Fm5U47+C
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"both_eloss = np.append(up_energyloss_found,up_energyloss_lost)\n",
"plt.hist(both_eloss, bins=100, density=True, histtype='bar', color=\"cornflowerblue\", label=\"Upstream\")\n",
"plt.vlines(ak.mean(both_eloss),0,3,colors=\"red\", label=\"mean\")\n",
"plt.xlabel(r\"Energyloss Ratio $E_\\gamma/E_0$\")\n",
"plt.ylabel(\"counts (normed)\")\n",
"plt.title(r'$B^0\\rightarrow K^{\\ast 0} e^+e^-$, $p>5$GeV, photons w/ brem_vtx_z$<9500$mm')\n",
"plt.legend(title=\"LHCb Simulation\", title_fontsize=15)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
2023-10-26 16:21:44 +02:00
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABjIAAAJPCAYAAADWqU3EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACkIElEQVR4nOz9cYxbWX7Ye/6u1JZGdqebVZrkxQO8yTTLs4FfFnLjUuO38CLp8WsS6cUM9kVPVZIlLdbewCL9UL3OevJcjBJkNYLhLbOQbLDBFGyWsrvzx7aUFikIuxnv04bsSc++xIDRItMWvLH9Zord4933vDCmi5x+vVZLo9LdP6ovu1hF8vwuee7luazvByC6Vffw3N8959zLe3l4zvGCIAgEAAAAAAAAAADAQcdmHQAAAAAAAAAAAMAodGQAAAAAAAAAAABn0ZEBAAAAAAAAAACcRUcGAAAAAAAAAABwFh0ZAAAAAAAAAADAWXRkAAAAAAAAAAAAZ9GRAQAAAAAAAAAAnEV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pdb5L6j7MNAQAAMzoyAABAqoRffOz/0sb3/f6X9aYv0MK54id5VatVaTabsrCwYOww2b8g+f5Fpm3Mnb21tSXNZlNu3rwpmUxGtra2pFwuS6PR6H+JokkziXa7LcvLywNfPoZfbB5cpyGK5eVlabVaA19ITrJgez6fF9/3+zHt/wJ6XAdJJpPpH1P433Bu91qtNvDqdrsSBMHQDqF8Pi/ZbLY/r7pIMot8H/wSe5zw+MLyqNVqkslkpFwuy9LSUuRFcg9+uactt/1rx7iyEPLBstEYF3fY/sb
2023-10-09 12:10:28 +02:00
"text/plain": [
"<Figure size 2000x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#energyloss in abh von der energie der elektronen\n",
"#upstream\n",
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
2023-10-10 16:17:10 +02:00
"a0=ax0.hist2d(up_energyloss_found, up_energy_found, bins=(np.linspace(0,1,80), np.linspace(0,5e4,80)), cmap=plt.cm.jet, cmin=1, vmax=15)\n",
"ax0.set_ylim(0,5e4)\n",
2023-10-09 12:10:28 +02:00
"ax0.set_xlim(0,1)\n",
"ax0.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
"ax0.set_ylabel(r\"$E_0$\")\n",
"ax0.set_title(\"found energyloss wrt electron energy\")\n",
"\n",
2023-10-10 16:17:10 +02:00
"a1=ax1.hist2d(up_energyloss_lost, up_energy_lost, bins=(np.linspace(0,1,50), np.linspace(0,5e4,50)), cmap=plt.cm.jet, cmin=1, vmax=15)\n",
"ax1.set_ylim(0,5e4)\n",
2023-10-09 12:10:28 +02:00
"ax1.set_xlim(0,1)\n",
"ax1.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
"ax1.set_ylabel(r\"$E_0$\")\n",
"ax1.set_title(\"lost energyloss wrt electron energy\")\n",
"\n",
"fig.colorbar(a1[3],ax=ax1)\n",
"fig.suptitle(r\"$B\\rightarrow K^\\ast ee$, $p>5$GeV, Upstream photons w/ brem_vtx_z$<9500$mm\")\n",
"\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-26 16:21:44 +02:00
"execution_count": 18,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-26 16:21:44 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABjIAAAJPCAYAAADWqU3EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACX70lEQVR4nOz9YZAjZ37fef6yu6d7WqJJVPWc15qInR2iPKtQ2MeYSPTIt76zObMErFFIu3a7q5oieXvy+URAF8WVT+NVQW3vRk+vQltChbWKi1CFhGrfxry4IY8NdHR4LZ1pARzN2D5H7LEBjzp8K3tHAEe6W+vCHlZheLR7uqer814UEyxUAcgngQeJJ4HvJwJBduWDJ//55JOJJ/HgeR4vCIJAAAAAAAAAAAAADjoz7wAAAAAAAAAAAABGoSMDAAAAAAAAAAA4i44MAAAAAAAAAADgLDoyAAAAAAAAAACAs+jIAAAAAAAAAAAAzqIjAwAAAAAAAAAAOIuODAAAAAAAAAAA4Cw6MgAAAAAAAAAAgLPoyAAAAIDT2u32vEMAjPR6Pe3t7anb7c47lIXT7Xa1t7enXq8371AwZ3wmAACwnOjIAAAAc9Pr9bSzsyPP8+R5nlZWVrSxsaFCoaC1tTXt7OzMO8S+vb09ra2t9WMtFApqNpuSjr5UKRQK/W0n4y6Xy3yxaWhjY6NfjuGrXC4PTdtut7WxsaG1tTWtrKwol8upUCioXC5rb29PuVwu1r6bzebAOc7lcqrX66fS1et15XK5fhqTL9WazeapY1tbW+vHXigUtLOzw5e0Kba3t6dnn31WpVKJ8ziBUqk08prd2dnR2tqaSqWS9vf3E44MtnW7XZVKJZVKJW1sbIy9Zkw/E8rlsjY2NvptiFGfuabpAACAgwIAAIA5830/kBRU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Rb5DJh0ZxxccD+PyfX9onQ2vmbCOhR0wJ78ozGQypzrwTi6UHpb5ybp9/IviMK+T9cPky/fwi9Jhdcvk3IQdb6GwnI7nF34pefILy5PldDytybUcxn7yejvZETsq3ckyND2fo8rS9P2m5zQIos/rKNPUufBvJvfj8H51vNM7CE5fU9PWs1nVoWExH1epVAaObVxHxskv6Se5Xx+/B4XXUiaTGXvvPjg46HcsxD3m4/sZ9nvK8HhHfaYN+0wYd67Deun7vnG6IJj+/CdRfwAAWFZMLQUAAOYmnAbF9321Wq3+S9KpaVJsWl9f70/FYrr+RhjL22+/LeloGhDT90Yt1FooFHT79m3dunVLkvrThRyfbsskTVz37t2TdDRHeDi9xosvvihJE60jUiwW1el0VCgU9MILL6hUKk28Hsn6+np/oe04i177vq9isahyudyfsiOfz/fnWd/e3tbGxkb/FQrL4rjw/cen16lUKv01NJKwv7/fj33YtCjhlDlhGWWzWfm+P3Rarm632z8fvV6vvzbNScOmfdnf3+//fzab1c7OzsA0NiaLnof5fu5znzsVl8m5qdVqAwvyhn8fdh2ePIbwOFdXV0/9rdPpRMZ+8j2hsPxPLgp/cg2ATCbTL/s453OYSd4fdU6lyc/rtHWuXq8PnepqlJPHffIcTFvPQrOqQ8djPl5mb7755thFrY8L73P1el2VSmWi6RKPf3aE09hVKpWhdaXb7apUKimXy2ltbU2dTseobpx0fOq842UfTgMmjf68HPaZYDK9X6/XM053Mtbj4p7/WdYfAACWFR0ZAABgbsIvJY5/oeL7fv/L+qgvt8J53Cd5VatVNZtNraysRHaYHF+Q/Pgi0zbmtt7b21Oz2dStW7f6izyXy2U1Go3+lxwmaSbRbre1vr4+8MVg+KXj8S9b4lpfX1er1Rr4snCSBdvz+bx83+/HdPzL4XEdJJlMpn9M4X/DeddrtdrA6+DgQEEQDO0
2023-10-09 12:10:28 +02:00
"text/plain": [
"<Figure size 2000x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#downstream\n",
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
2023-10-10 16:17:10 +02:00
"a0=ax0.hist2d(down_energyloss_found, down_energy_found, bins=(np.linspace(0,1,80), np.linspace(0,5e4,80)), cmap=plt.cm.jet, cmin=1, vmax=15)\n",
"ax0.set_ylim(0,5e4)\n",
2023-10-09 12:10:28 +02:00
"ax0.set_xlim(0,1)\n",
"ax0.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
"ax0.set_ylabel(r\"$E_0$\")\n",
"ax0.set_title(\"found energyloss wrt electron energy\")\n",
"\n",
2023-10-10 16:17:10 +02:00
"a1=ax1.hist2d(down_energyloss_lost, down_energy_lost, bins=(np.linspace(0,1,50), np.linspace(0,5e4,50)), cmap=plt.cm.jet, cmin=1, vmax=15)\n",
"ax1.set_ylim(0,5e4)\n",
2023-10-09 12:10:28 +02:00
"ax1.set_xlim(0,1)\n",
"ax1.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
"ax1.set_ylabel(r\"$E_0$\")\n",
"ax1.set_title(\"lost energyloss wrt electron energy\")\n",
"\n",
"fig.colorbar(a1[3],ax=ax1)\n",
"fig.suptitle(r\"$B\\rightarrow K^\\ast ee$, $p>5$GeV, Downstream photons w/ brem_vtx_z$<9500$mm\")\n",
"\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-26 16:21:44 +02:00
"execution_count": 19,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-26 16:21:44 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABkMAAAJPCAYAAADPIqNiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACp7ElEQVR4nOz9f5Aj6X3feX6ye8hW743Z6KLsG/IubBVqGSHLskUmmjJHveYcOYB1Dt/KKzWq21qfbe4eByVvUR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XJo/0YNhhy90T9JW3qwfQjPpUwmM7Jd3d3d7Q9OTLLf4ecM+t1nuL/DvnMGtdmjjndYN33fd44LgpPXgWnVIQAA0ojHZAEAgJEKhYLu3LmjW7duSVL/kRnhI6Gq1eqhV7PZVLPZPPb3kwgfd/HhD3/40N/D53wPeixF+NiSo5999NEZ4WMzDj7SJ/yby0Lu4SNjfN9Xu93uvyQde6RM1IrFYv/RNa5rkoT5ee211yTtPzbFddtRjyYZV09cYyZx//59SfvPZQ/rwrVr1yRponVVSqWStra2VCgU9OKLL2plZWWidIrFYn/xcss54Pu+SqWSyuVy//Em+Xy+X9/X19f7j5I7+CiisBwOCrc/+DiiSqXSX1NkVo7WpfB8Dcsrm81qY2Pj0CN5XBZ6H9dWjCu7er1+aJHj8O+DzpGo25Kj24SOlk3o6JoImUymX08naRsPiqJtlfYf5RWa9Jhms1n5vj/wkXPhoxWl/WMUrt10UKPRGPgIsWGO7vPR8j9pHQvFVX+O5vtgud2+fXvkQuEHhe1Qo9FQpVKZ6LGMB9v2l156SdJ++zOornS
2023-10-09 12:10:28 +02:00
"text/plain": [
"<Figure size 2000x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#plot residual energy against energyloss and try to find a good split (eg energyloss before and after the magnet)\n",
"#upstream\n",
2023-10-09 15:25:15 +02:00
"nbins=60\n",
"\n",
2023-10-09 12:10:28 +02:00
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
2023-10-10 16:17:10 +02:00
"a0=ax0.hist2d(up_energyloss_found, up_residual_found, bins=(np.linspace(0,1,nbins), np.linspace(0,5e4,nbins)), cmap=plt.cm.jet, cmin=1, vmax=20)\n",
"ax0.set_ylim(0,5e4)\n",
2023-10-09 12:10:28 +02:00
"ax0.set_xlim(0,1)\n",
"ax0.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
"ax0.set_ylabel(r\"$E_0-E_\\gamma$\")\n",
"ax0.set_title(\"found energyloss wrt residual electron energy\")\n",
"\n",
2023-10-10 16:17:10 +02:00
"a1=ax1.hist2d(up_energyloss_lost, up_residual_lost, bins=(np.linspace(0,1,nbins), np.linspace(0,5e4,nbins)), cmap=plt.cm.jet, cmin=1, vmax=20) \n",
"ax1.set_ylim(0,5e4)\n",
2023-10-09 12:10:28 +02:00
"ax1.set_xlim(0,1)\n",
"ax1.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
"ax1.set_ylabel(r\"$E_0-E_\\gamma$\")\n",
"ax1.set_title(\"lost energyloss wrt residual electron energy\")\n",
"\n",
"fig.colorbar(a1[3],ax=ax1)\n",
"fig.suptitle(r\"$e^\\pm$ from $B\\rightarrow K^\\ast ee$, $p>5$GeV, Upstream photons w/ brem_vtx_z$<9500$mm\")\n",
"\n",
"\"\"\"\n",
"\"\"\"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-26 16:21:44 +02:00
"execution_count": 20,
2023-10-09 12:10:28 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-10-26 16:21:44 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABjQAAAJPCAYAAADbtz2DAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACVoUlEQVR4nOz9f4wjZ37neX6iSq3qsmWJVWp4t3v3NCXmNMZqW3A7WGrPooHWrkWO1/BhF1PFLLUX8GhutsWcubwbYPquky7jztXl2XGaeV4sMIfEmFmH29YM1tsqsmpvDvDu2mS1Tw0Ig3MXafkKbnlnTKq679be6WlnsTWyq0uqrOf+yA4qf/BHfMmIYJB8vwBCquSXT3zjiYcRT8TDJ8JzzjkBAAAAAAAAAACk2IlZJwAAAAAAAAAAADAOAxoAAAAAAAAAACD1GNAAAAAAAAAAAACpx4AGAAAAAAAAAABIPQY0AAAAAAAAAABA6jGgAQAAAAA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oqFAp66aWXtLa2NlE5xWJRjUZD0vF2OIrv+yqVSiqXy/3beOTz+X5739zc7N+W7eAtd4J6OCj4/MHb7lQqlf4zNpKyu7tr+r5ms1n5vj/wll3Bremk/VujBM+vOWrQLWF2d3f7/5/NZrW1tXXoFjejnmlytNxh+6Nx26dWq/X3EQf/Puh7GPX+6mB8IKj7oK0Gjj4jIJPJ9Ot9kn3vUVHsv6Votum07a1erw+8JdcwR9f56DaYto0F4mg/R3M+WGevv/56/1Z34wT7uXq9rkqlMtEtFA8eO4Jb21UqlYHtpNvtam1tTbl
2023-10-09 12:10:28 +02:00
"text/plain": [
"<Figure size 2000x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#downstream\n",
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
2023-10-10 16:17:10 +02:00
"a0=ax0.hist2d(down_energyloss_found, down_residual_found, bins=(np.linspace(0,1,60), np.linspace(0,5e4,60)), cmap=plt.cm.jet, cmin=1, vmax=25)\n",
"ax0.set_ylim(0,5e4)\n",
2023-10-09 12:10:28 +02:00
"ax0.set_xlim(0,1)\n",
"ax0.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
"ax0.set_ylabel(r\"$E_0-E_\\gamma$\")\n",
"ax0.set_title(\"found energyloss wrt residual electron energy\")\n",
"\n",
2023-10-10 16:17:10 +02:00
"a1=ax1.hist2d(down_energyloss_lost, down_residual_lost, bins=(np.linspace(0,1,60), np.linspace(0,5e4,60)), cmap=plt.cm.jet, cmin=1, vmax=20) \n",
"ax1.set_ylim(0,5e4)\n",
2023-10-09 12:10:28 +02:00
"ax1.set_xlim(0,1)\n",
"ax1.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
"ax1.set_ylabel(r\"$E_0-E_\\gamma$\")\n",
"ax1.set_title(\"lost energyloss wrt residual electron energy\")\n",
"\n",
2023-10-09 15:25:15 +02:00
"fig.colorbar(a0[3],ax=ax1)\n",
2023-10-09 12:10:28 +02:00
"fig.suptitle(r\"$e^\\pm$ from $B\\rightarrow K^\\ast ee$, $p>5$GeV, Downstream photons w/ brem_vtx_z$<9500$mm\")\n",
"\n",
"\"\"\"\n",
"\"\"\"\n",
"plt.show()"
]
},
{
"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",
2023-10-26 16:21:44 +02:00
"version": "3.10.12"
2023-10-09 12:10:28 +02:00
}
},
"nbformat": 4,
"nbformat_minor": 2
}