Projektpraktikum/B_rework.ipynb

1045 lines
382 KiB
Plaintext
Raw Normal View History

2023-09-28 15:50:32 +02:00
{
"cells": [
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 1,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-10-05 10:49:35 +02:00
"import uproot\t\n",
2023-09-28 15:50:32 +02:00
"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-10 11:00:25 +02:00
"execution_count": 2,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2023-10-05 10:49:35 +02:00
"10522"
2023-09-28 15:50:32 +02:00
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 2,
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",
2023-10-05 10:49:35 +02:00
"ak.num(found, axis=0) + ak.num(lost, axis=0)\n",
2023-09-28 15:50:32 +02:00
"#ak.count(found, axis=None)"
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 3,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
2023-10-05 10:49:35 +02:00
"name": "stdout",
"output_type": "stream",
"text": [
"eff all = 0.8606728758791105 +/- 0.003375885792719708\n"
]
2023-09-28 15:50:32 +02:00
}
],
"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",
2023-10-05 10:49:35 +02:00
"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))"
2023-09-28 15:50:32 +02:00
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 4,
2023-09-28 15:50:32 +02:00
"metadata": {},
"outputs": [
{
2023-10-05 15:58:17 +02:00
"data": {
2023-10-06 11:41:37 +02:00
"text/html": [
"<pre>{energy: 4.62e+04,\n",
" photon_length: 10,\n",
" brem_photons_pe: [3.26e+03, 4.45e+03, 178, ..., 825, 8.99e+03, 3.48e+03],\n",
" brem_vtx_z: [162, 187, 387, 487, ..., 9.49e+03, 1.21e+04, 1.21e+04, 1.21e+04]}\n",
"-------------------------------------------------------------------------------\n",
"type: {\n",
" energy: float64,\n",
" photon_length: int64,\n",
" brem_photons_pe: var * float64,\n",
" brem_vtx_z: var * float64\n",
"}</pre>"
],
2023-10-05 15:58:17 +02:00
"text/plain": [
2023-10-06 11:41:37 +02:00
"<Record {energy: 4.62e+04, ...} type='{energy: float64, photon_length: int6...'>"
2023-10-05 15:58:17 +02:00
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 4,
2023-10-05 15:58:17 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#try excluding all photons that originate from a vtx @ z>9500mm\n",
2023-10-06 11:41:37 +02:00
"#ignore all brem vertices @ z>9500mm \n",
"\n",
"#found\n",
2023-10-05 15:58:17 +02:00
"\n",
"brem_e_f = found[\"brem_photons_pe\"]\n",
"brem_z_f = found[\"brem_vtx_z\"]\n",
"e_f = found[\"energy\"]\n",
2023-10-06 11:41:37 +02:00
"length_f = found[\"brem_vtx_z_length\"]\n",
2023-10-05 15:58:17 +02:00
"\n",
"brem_f = ak.ArrayBuilder()\n",
"\n",
2023-10-06 11:41:37 +02:00
"for itr in range(ak.num(found,axis=0)):\n",
2023-10-05 15:58:17 +02:00
" brem_f.begin_record()\n",
2023-10-06 11:41:37 +02:00
" #[:,\"energy\"] energy\n",
2023-10-05 15:58:17 +02:00
" brem_f.field(\"energy\").append(e_f[itr])\n",
2023-10-06 11:41:37 +02:00
" #[:,\"photon_length\"] number of vertices\n",
" brem_f.field(\"photon_length\").integer(length_f[itr])\n",
" #[:,\"brem_photons_pe\",:] photon energy \n",
2023-10-05 15:58:17 +02:00
" brem_f.field(\"brem_photons_pe\").append(brem_e_f[itr])\n",
2023-10-06 11:41:37 +02:00
" #[:,\"brem_vtx_z\",:] brem vtx z\n",
2023-10-05 15:58:17 +02:00
" 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",
2023-10-06 11:41:37 +02:00
"\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)\n",
"\n",
"\n",
"\n",
"\n",
"brem_f[0]"
2023-10-05 15:58:17 +02:00
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 5,
2023-10-06 11:41:37 +02:00
"metadata": {},
"outputs": [],
"source": [
"acc_brem_found = ak.ArrayBuilder()\n",
"\n",
"for itr in range(ak.num(brem_f, axis=0)):\n",
" acc_brem_found.begin_record()\n",
" acc_brem_found.field(\"energy\").real(brem_f[itr,\"energy\"])\n",
" \n",
" acc_brem_found.field(\"brem_photons_pe\")\n",
" acc_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",
" acc_brem_found.real(brem_f[itr,\"brem_photons_pe\", jentry])\n",
" \n",
" #acc_brem_found.field(\"brem_vtx_z\").real(brem_f[itr, \"brem_vtx_z\",jentry])\n",
" acc_brem_found.end_list()\n",
" \n",
" acc_brem_found.field(\"brem_vtx_z\")\n",
" acc_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",
" acc_brem_found.real(brem_f[itr, \"brem_vtx_z\",jentry])\n",
" acc_brem_found.end_list()\n",
" \n",
2023-10-09 09:59:35 +02:00
"\n",
2023-10-06 11:41:37 +02:00
" \n",
" acc_brem_found.end_record()\n",
"\n",
"acc_brem_found = ak.Array(acc_brem_found)\n",
"\n",
"\n",
"\n",
"acc_brem_lost = ak.ArrayBuilder()\n",
"\n",
"for itr in range(ak.num(brem_l, axis=0)):\n",
" acc_brem_lost.begin_record()\n",
" acc_brem_lost.field(\"energy\").real(brem_l[itr,\"energy\"])\n",
" \n",
" acc_brem_lost.field(\"brem_photons_pe\")\n",
" acc_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",
" acc_brem_lost.real(brem_l[itr,\"brem_photons_pe\", jentry])\n",
" \n",
" #acc_brem_found.field(\"brem_vtx_z\").real(brem_f[itr, \"brem_vtx_z\",jentry])\n",
" acc_brem_lost.end_list()\n",
" \n",
" acc_brem_lost.field(\"brem_vtx_z\")\n",
" acc_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",
" acc_brem_lost.real(brem_l[itr, \"brem_vtx_z\",jentry])\n",
" acc_brem_lost.end_list()\n",
" \n",
" acc_brem_lost.end_record()\n",
"\n",
"acc_brem_lost = ak.Array(acc_brem_lost)\n"
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 6,
2023-10-05 15:58:17 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2023-10-06 11:41:37 +02:00
"9056"
2023-10-05 15:58:17 +02:00
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 6,
2023-10-05 15:58:17 +02:00
"metadata": {},
"output_type": "execute_result"
2023-09-28 15:50:32 +02:00
}
],
2023-10-05 15:58:17 +02:00
"source": [
2023-10-06 11:41:37 +02:00
"ak.num(acc_brem_found,axis=0)"
2023-10-05 15:58:17 +02:00
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 7,
2023-10-05 15:58:17 +02:00
"metadata": {},
2023-10-09 09:59:35 +02:00
"outputs": [
{
"data": {
"text/plain": [
"'\\nph_e = found[\"brem_photons_pe\"]\\nevent_cut = ak.all(ph_e<cutoff_energy,axis=1)\\nph_e = ph_e[event_cut]\\n'"
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 7,
2023-10-09 09:59:35 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
2023-10-05 15:58:17 +02:00
"source": [
"\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",
2023-10-06 11:41:37 +02:00
"\n"
2023-10-05 15:58:17 +02:00
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 8,
2023-10-05 15:58:17 +02:00
"metadata": {},
2023-10-06 11:41:37 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-10-09 16:32:56 +02:00
"cutoff = 100 MeV, sample size: 322\n",
"eff = 0.9379 +/- 0.0135\n",
"cutoff = 200 MeV, sample size: 481\n",
"eff = 0.948 +/- 0.0101\n",
"cutoff = 300 MeV, sample size: 627\n",
"eff = 0.949 +/- 0.0088\n",
"cutoff = 400 MeV, sample size: 739\n",
"eff = 0.9513 +/- 0.0079\n",
"cutoff = 500 MeV, sample size: 860\n",
"eff = 0.9477 +/- 0.0076\n",
"cutoff = 600 MeV, sample size: 973\n",
"eff = 0.9424 +/- 0.0075\n",
"cutoff = 700 MeV, sample size: 1106\n",
"eff = 0.9412 +/- 0.0071\n",
"cutoff = 800 MeV, sample size: 1188\n",
"eff = 0.9411 +/- 0.0068\n",
"cutoff = 900 MeV, sample size: 1288\n",
"eff = 0.9387 +/- 0.0067\n",
"cutoff = 1000 MeV, sample size: 1387\n",
"eff = 0.9416 +/- 0.0063\n",
2023-10-06 11:41:37 +02:00
"\n",
2023-10-09 16:32:56 +02:00
"cutoff energy = 350MeV, sample size: 693\n",
"eff = 0.9481 +/- 0.0084\n"
2023-10-06 11:41:37 +02:00
]
}
],
2023-09-28 15:50:32 +02:00
"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",
2023-10-06 11:41:37 +02:00
"ph_e = acc_brem_found[\"brem_photons_pe\"]\n",
2023-09-28 15:50:32 +02:00
"event_cut = ak.all(ph_e<cutoff_energy,axis=1)\n",
"ph_e = ph_e[event_cut]\n",
"\"\"\"\n",
"\n",
2023-10-05 15:58:17 +02:00
"efficiencies_found = ak.ArrayBuilder()\n",
2023-09-28 15:50:32 +02:00
"\n",
"\n",
2023-10-02 16:21:00 +02:00
"\n",
2023-10-09 16:32:56 +02:00
"for cutoff_energy in range(0,1050,100):\n",
"\tnobrem_f = acc_brem_found[ak.sum(acc_brem_found[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"\tnobrem_l = acc_brem_lost[ak.sum(acc_brem_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
2023-10-05 15:58:17 +02:00
"\n",
2023-10-09 16:32:56 +02:00
"\tif ak.num(nobrem_f,axis=0)+ak.num(nobrem_l,axis=0)==0:\n",
"\t\tcontinue\n",
2023-10-05 15:58:17 +02:00
"\n",
2023-10-09 16:32:56 +02:00
"\tprint(\"cutoff = \",str(cutoff_energy) ,\"MeV, sample size: \",ak.num(nobrem_f,axis=0)+ak.num(nobrem_l,axis=0))\n",
"\tprint(\"eff = \",np.round(t_eff(nobrem_f,nobrem_l),4), \"+/-\", np.round(eff_err(nobrem_f, nobrem_l),4))\n",
2023-09-28 15:50:32 +02:00
"\n",
"\"\"\"\n",
2023-10-06 11:41:37 +02:00
"we see that a cutoff energy of xxxMeV is ideal because the efficiency drops significantly for higher values\n",
2023-09-28 15:50:32 +02:00
"\"\"\"\n",
"cutoff_energy = 350.0 #MeV\n",
"\n",
"\"\"\"\n",
2023-10-06 11:41:37 +02:00
"better statistics: cutoff=xxxMeV - sample size: xxx events and efficiency=xxxx\n",
2023-09-28 15:50:32 +02:00
"\"\"\"\n",
2023-10-09 16:32:56 +02:00
"nobrem_found = acc_brem_found[ak.sum(acc_brem_found[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
"nobrem_lost = acc_brem_lost[ak.sum(acc_brem_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)<cutoff_energy]\n",
2023-09-28 15:50:32 +02:00
"\n",
2023-10-05 10:49:35 +02:00
"print(\"\\ncutoff energy = 350MeV, sample size:\",ak.num(nobrem_found,axis=0)+ak.num(nobrem_lost,axis=0))\n",
2023-10-05 13:19:49 +02:00
"print(\"eff = \",np.round(t_eff(nobrem_found, nobrem_lost),4), \"+/-\", np.round(eff_err(nobrem_found, nobrem_lost),4))"
2023-09-28 15:50:32 +02:00
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 9,
2023-09-28 15:50:32 +02:00
"metadata": {},
2023-10-06 11:41:37 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-10-09 16:32:56 +02:00
"eff = 0.8545 +/- 0.0036\n"
2023-10-06 11:41:37 +02:00
]
},
{
"data": {
"text/html": [
"<pre>[{energy: 2.58e+04, brem_photons_pe: [9.97e+03, ...], brem_vtx_z: [...]},\n",
" {energy: 8.03e+04, brem_photons_pe: [4.91e+03, ...], brem_vtx_z: [...]},\n",
" {energy: 5.6e+03, brem_photons_pe: [320, ..., 392], brem_vtx_z: [...]},\n",
" {energy: 6.36e+03, brem_photons_pe: [273, ...], brem_vtx_z: [...]},\n",
" {energy: 4.67e+04, brem_photons_pe: [8.96e+03, ...], brem_vtx_z: [...]},\n",
" {energy: 7.16e+04, brem_photons_pe: [544, ..., 142], brem_vtx_z: [...]},\n",
" {energy: 5.15e+04, brem_photons_pe: [384, ...], brem_vtx_z: [...]},\n",
" {energy: 4.07e+04, brem_photons_pe: [2.7e+04, ...], brem_vtx_z: [...]},\n",
" {energy: 2.77e+04, brem_photons_pe: [2.24e+03, ...], brem_vtx_z: [...]},\n",
" {energy: 6.4e+04, brem_photons_pe: [686, ..., 796], brem_vtx_z: [...]},\n",
" ...,\n",
" {energy: 5.59e+03, brem_photons_pe: [901, ...], brem_vtx_z: [...]},\n",
" {energy: 2.13e+04, brem_photons_pe: [787, ...], brem_vtx_z: [...]},\n",
" {energy: 9.34e+03, brem_photons_pe: [762, ...], brem_vtx_z: [...]},\n",
" {energy: 5.08e+04, brem_photons_pe: [711, ...], brem_vtx_z: [...]},\n",
" {energy: 6.41e+04, brem_photons_pe: [4.17e+03, ...], brem_vtx_z: [...]},\n",
" {energy: 1.01e+04, brem_photons_pe: [220, ..., 156], brem_vtx_z: [...]},\n",
" {energy: 1.96e+04, brem_photons_pe: [1.66e+03, ...], brem_vtx_z: [...]},\n",
" {energy: 2.98e+04, brem_photons_pe: [8.32e+03, ...], brem_vtx_z: [...]},\n",
" {energy: 3.97e+04, brem_photons_pe: [9.36e+03, ...], brem_vtx_z: [...]}]\n",
"-------------------------------------------------------------------------\n",
2023-10-09 16:32:56 +02:00
"type: 1430 * {\n",
2023-10-06 11:41:37 +02:00
" energy: float64,\n",
" brem_photons_pe: var * float64,\n",
" brem_vtx_z: var * float64\n",
"}</pre>"
],
"text/plain": [
2023-10-09 16:32:56 +02:00
"<Array [{energy: 2.58e+04, ...}, ..., {...}] type='1430 * {energy: float64,...'>"
2023-10-06 11:41:37 +02:00
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 9,
2023-10-06 11:41:37 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
2023-09-28 15:50:32 +02:00
"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",
2023-10-09 16:32:56 +02:00
"brem_found = acc_brem_found[ak.sum(acc_brem_found[\"brem_photons_pe\"],axis=-1,keepdims=False)>=cutoff_energy]\n",
2023-09-28 15:50:32 +02:00
"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",
2023-10-05 15:58:17 +02:00
"residual_found = energy_found - eph_found\n",
2023-09-28 15:50:32 +02:00
"energyloss_found = eph_found/energy_found\n",
"\n",
2023-10-09 16:32:56 +02:00
"brem_lost = acc_brem_lost[ak.sum(acc_brem_lost[\"brem_photons_pe\"],axis=-1,keepdims=False)>=cutoff_energy]\n",
2023-09-28 15:50:32 +02:00
"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",
2023-10-05 15:58:17 +02:00
"residual_lost = energy_lost - eph_lost\n",
2023-09-28 15:50:32 +02:00
"energyloss_lost = eph_lost/energy_lost\n",
"\n",
2023-10-05 15:58:17 +02:00
"print(\"eff = \", np.round(t_eff(brem_found,brem_lost),4), \"+/-\", np.round(eff_err(brem_found, brem_lost),4))\n",
"brem_lost"
2023-09-28 15:50:32 +02:00
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 10,
2023-09-28 15:50:32 +02:00
"metadata": {},
2023-10-06 11:41:37 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-10-09 16:32:56 +02:00
"mean energyloss relative to initial energy (found): 0.40459562244424735\n",
"mean energyloss relative to initial energy (lost): 0.7244570697471976\n"
2023-10-06 11:41:37 +02:00
]
}
],
2023-09-28 15:50:32 +02:00
"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-10 11:00:25 +02:00
"execution_count": 22,
2023-09-28 15:50:32 +02:00
"metadata": {},
2023-10-06 11:41:37 +02:00
"outputs": [
{
"data": {
2023-10-10 11:00:25 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAHMCAYAAAD7xYOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA3iElEQVR4nO3deXhU5d3G8XuSTDZCAgQCAVJk17CEymbABa2oYMW+tWqLpai4talIsaCI1lDlRWqtVYsbonSRSiuL1KKSWhI22QIuEBREWoIFQ1iyEEmGzHn/8M3UyYQkczIz50zm+7muXDpnzjznNz8Dc/uc55xxGIZhCAAAwIairC4AAADgbAgqAADAtggqAADAtggqAADAtggqAADAtggqAADAtggqAADAtggqAADAtggqAADAtggqAADAtggqAADAtggqAFps9erVcjgcZ/1ZtGhRQI5TW1urtLQ0PfnkkyE/NgBrxFhdAIDwt2PHDknSG2+8obS0NJ/nMzMzA3KcdevW6ejRo/rud78b8mMDsAZBBUCL7dixQ8nJybrmmmvkcDiCdpzXX39dw4YNU48ePUJ+bADW4NQPgBYrLCxUVlZWUIOCYRhasWKFrrvuupAfG4B1CCoAWuTYsWM6ePCgBg0apDNnzvj8GIYRkONs2rRJhw8f9goqoTo2AOsQVAC0SN0akWeffVZOp9Pnp6ioqMkxDMNQcnKySktLz7rP66+/rkGDBqlv375+H/vo0aO6+uqr1aZNG/Xr1095eXktecsAQog1KgBapLCwUJK0fPlyZWRk+DzfnMWs+/btU6dOndSxY8ez7rN8+XLdeuutpo6dk5OjLl266OjRo/rHP/6hG264QZ9++qlSU1ObrA2AtQgqAFpkx44dio+P14QJExQdHX3W/V544QX99a9/ldPp1JYtW9S1a1f95S9/UWZmpnbs2KEhQ4bozjvv1NKlS9W1a1etWrVKffr0kSRt3bpVBw8e9Fmf0pxjV1ZWauXKldq/f78SExM1YcIEZWVl6Y033vAJPgDsh1M/AFpkx44dGjhwYKMhRZJ27dqlbdu2adq0afriiy80cuRIPfjgg5KknTt3avv27brlllt0/PhxnX/++Vq4cKHntcuWLVO/fv00cOBAv4+9b98+JSUlec24DBo0SLt37zbzdgGEGEEFgGllZWX67LPPlJWV1eS+u3bt0oMPPqgrr7xSTqdTN910k/bu3Svpq6AyZ84cXXDBBYqKilLv3r29FsIuW7bMZzaluceurKxUcnKy17bk5GRVVlY2920CsBCnfgCYtmPHDhmGoTZt2mjz5s0+z3fr1s0zk7F7926vu8SWlJR41qTs3LlTf/rTnzzP7d69W+PHj5ckvf/++9q/f3+Dp32ac+ykpCSVl5d7PVdeXq6kpCST7xpAKDGjAsC0uqtunn76aWVnZ/v8rFmzRtJXoeTo0aNed45dsWKFxo0bp+LiYsXExHg99+GHH2rw4MGSvppN6dGjh4YOHWrq2H379lVlZaUOHTrkee2uXbs0YMCAIHQEQKA5DG40ACDI3n33XV155ZV6/vnnNXnyZP3hD3/QI488og8++EAFBQVasGCB3nnnHUlSVVWV2rVrp7KyMiUkJCgzM1Pjxo3TE088Yfr4119/vVJSUvTMM8/o3Xff1aRJk7Rv375GrzICYA+c+gEQdLt27dKtt96q1157TdOnT9fQoUOVl5enlJQU7dy50zN7In112qd3795KSEiQpGbdh6Upzz77rCZPnqzU1FR169ZNS5cuJaQAYYIZFQBBd/vtt2vYsGG68847rS4FQJhhjQqAoNu1a5fOPfdcq8sAEIaYUQEQdCkpKdq7d686d+5sdSkAwoylMyq5ublyOBxeP126dLGyJABBUFZWRkgBYIrli2kHDBigf/zjH57HTd3dEgAARA7Lg0pMTAyzKAAAoEGWB5V9+/apa9euiouL08iRI/W///u/6tWrV4P7VldXq7q62vPY7Xbr+PHjSk1NlcPhCFXJAACgBQzDUEVFhbp27aqoqMZXoVi6mPatt95SVVWV+vXrpy+++EKPPvqoPv74Y+3evbvBr1/Pzc3VnDlzLKgUAAAEWnFxsbp3797oPra66ufUqVPq3bu3Zs6cqenTp/s8X39GpaysTN/4xjd04MABtW3bNmB1uFwurV27Vpdeeq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0ZGRm66667tHz5ct17771auHChJCk2NlbSV997BABAOCKo2Fjfvn117bXX6vbbb9eGDRv0wQcf6Ic//KG6deuma6+9VpI0bdo0vfPOOzpw4IB27Nihf/7zn54Q06NHDzkcDr355ps6evSoKisrrXw7AAD4LTIX0zZxEzbD7dbp8nLFJifLYfG3J7/yyiu655579O1vf1s1NTW6+OKLtXr1ajmdTklfzZbk5OTo0KFDSk5O1lVXXaUnn3xSktStWzfNmTNH999/v2655Rb96Ec/0uLFiy18NwAA+Ccyg4rN5efne/69ffv2+sMf/nDWfZtaj/LQQw/poYceClRpAACEFKd+AACAbRFUAACAbRFUAACAbRFUAACAbRFUAACAbRFUAACAbRFUAACAbRFUAACAbRFUAACAbRFUbMgwDN1xxx3q0KGDHA6H3n//fctqGTNmjKZNm2bZ8QEAkS0ib6Gfm9v484bhUHV1vOLiHHI4gnushrz99ttavHix8vPz1atXL3Xs2LFlRQAAEKYiMqjY3f79+5Wenq5Ro0ZZXQoAAJYKy1M/CxYsUGZmpoYPH251KQF388036+6779bBgwflcDh0zjnnqLq6WlOnTlVaWpri4+N14YUXatu2bZ7XLF68WO3atfMaZ+XKlXJ8bTooNzdXQ4YM0R//+Eedc845SklJ0fe//31VVFR49jl16pR+9KMfKSkpSenp6XriiSeC/n4BAGhMWAaVnJwcFRUVeX1YtxZPPfWUfvnLX6p79+46fPi
2023-10-06 11:41:37 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-09-28 15:50:32 +02:00
"source": [
"#in abhängigkeit von der energie der elektronen\n",
2023-10-09 16:32:56 +02:00
"plt.hist(energyloss_lost, bins=100, density=True, alpha=0.5, histtype='bar', color=\"darkorange\", label=\"lost\")\n",
2023-09-28 15:50:32 +02:00
"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",
2023-10-10 11:00:25 +02:00
"plt.yticks(np.arange(0,5.5,0.5), minor=True)\n",
2023-09-28 15:50:32 +02:00
"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-10 11:00:25 +02:00
"execution_count": 12,
2023-09-28 15:50:32 +02:00
"metadata": {},
2023-10-06 11:41:37 +02:00
"outputs": [
{
"data": {
2023-10-09 16:32:56 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABj8AAAJOCAYAAADoCxXRAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADV1UlEQVR4nOzdeXxU1f3/8fclIQshGRKQQJBVEREIKCogtuxbWSwUUFAEtEpFRQSsuwGVRRGkBRFLFZRdq1AFi4CoiICyiLh9RSsKyqqEBJBAEs7vD36ZMmQ7k9xhJsnr+XjMQ7nzmbPdc++cOyfnXscYYwQAAAAAAAAAAFBKlAt2AQAAAAAAAAAAANzE5AcAAAAAAAAAAChVmPwAAAAAAAAAAAClCpMfAAAAAAAAAACgVGHyAwAAAAAAAAAAlCpMfgAAAAAAAAAAgFKFyQ8AAAAAAAAAAFCqMPkBAAAAAAAAAABKFSY/AAAAAAAAAABAqcLkBwAAAAAAAAAAKFWY/AAAAKXekCFDNHfu3GAXA5Z27Nih3bt3B7sYAAAAAIASjMkPAAAAhJR//OMfWrt2bbCLAQAAAAAowZj8AAAAKMSSJUvUqFEjRUdHy3Ecbd++PdhFKtDbb78tx3F8XnFxcWrevLleffXV85b/K6+84rM9NTVV3bp1U0REhGbMmOHz3rp163Tbbbfp4MGD3m1fffWV+vTpowMHDgS8zCXJ+++/n2v/5rw2bd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fvzxR9133326/vrrFRYWZh0HAABKHlZ+AACAEmP9+vXq3LmzPB6P4uPj1b17d3377bcBy2/IkCG69tprJUnXX3+9HMdR27Ztvbdc2bZtm/r27av4+HhddNFFPuXs0KGDYmNjVaFCBV1zzTVasWKFT9o5aezYsUP9+vWTx+NRQkKCRo0apaysLH3zzTfq2rWrYmNjVadOHT399NPW5d66dauaNWuWa/tPP/0kSWrYsGERWkN69tlntWzZMr/yHzNmjAYMGKAbb7xRH3zwQZ4TH5L0+eef64orrtC2bdv0hz/8QbfccovGjx+v7t27F3prG9t+4Xb/6dmzp6688krNnj1bTZs2VXR0tGrWrKmUlBSdPn06z8/s2LFD1atXV7du3fTKK6/o6NGjRc6/MBMmTFBYWJheeOEFn4mPs/Xr1y/XPvn22281cOBAVa1aVZGRkWrYsKGee+45n5iwsDANHjxYW7du1eeff54r3Tlz5njrWRT+HENffvmlBgwYII/Ho8TERN1yyy1KS0vLN+0PP/xQjuNo0aJFud575ZVX5DiONm/enO/nc/L99NNP1adPH8XFxcnj8eimm27SoUOH8vzMgQMHCi2jbZ3vu+8+SVLdunW9t/t5//33A9Juhw4d0u23366aNWsqMjJSF1xwgVq3bq01a9bk2z5ffvmlHMfRa6+95t22detWOY6jRo0a+cT26tXLZ4WYMUZLly7Vn/70p3zTP9uePXsK3QeFna9t+nsgz9eStGzZMjmOo3fffTfXe88//7wcx1GfPn3y3fcZGRm6/PLLdfHFF/vsw/3796tatWpq27atsrOzrcqS3y2linLruNTUVL344ovq2LGjLrzwQn3//fd5xn300Udq27atz4RUbGysfv/732vDhg3at2+fX/nmWLp0qSpWrKh+/fr5bB86dKj27t2rjz/+2K84qfh9IdB9CQAAnMMAAACUACkpKaZcuXLmlltuMStWrDD/+te/TJMmTUzNmjXN0aNHA5Lnd999Z5577jkjyUyYMMFs3LjRfPnllyYlJcVIMrVr1zb333+/Wb16tVm2bJkxxpj333/flC9f3jRv3twsWbLELFu2zHTu3Nk4jmMWL17sUx9JpkGDBuaJJ54wq1evNn/961+NJHPXXXeZSy+91Pz97383q1evNkOHDjWSzOuvv15omX/55RcjyYwYMcJkZmaazMxMc+DAAfPKK6+Y2NhY8+c//7nI7TFw4EBTvnx5s3Tp0kLzv/7660379u1NZGSkmT17dqFp79mzx7z11lvGGGPuvPNOM2fOHJOVlWXmzp1rTp06le/nbPtFIPpP9erVTUxMjGnYsKGZN2+eWbVqlbnhhhuMpHzrfOLECbNgwQLTs2dPExERYaKiokzfvn3N66+/bjIyMqzyfe+994wkU7VqVRMWFmZiY2NN586dzYcffuiNycrKMtHR0aZVq1Z+1enLL780Ho/HNGnSxLzyyitm1apVZvTo0aZcuXJm7NixPrHffvutcRzHjBw5MlcakswDDzzgV945inIMPfbYY2b16tVm6tSpJjIy0gwdOtQbN2fOHCPJ7Nq1y7vt8ssvN61bt86V91VXXWWuuuqqAst39vF/3333mXfeecdMnTrVxMTEmMsvv9ynv9qW0bbOe/bsMXfffbeRZN544w2zceNGs3HjRpOWluZ6uxljTJcuXcwFF1xg/vGPf5j333/fLFu2zDz22GM+6eWlevXq5vbbb/f+e9KkSSY6OtpIMj///LMxxpjMzEwTFxdn/vrXv3rj1q9fbySZnTt3ur4P8jpf2/b3QJ2vc2RmZpqqVauaG2+8Mdd7V199tbniiisK3PfGGLNz504TGxtr+vTpY4wxJjs727Rv395UrVrV7N2717osOenmvNauXWtq1KhhqlWr5s2rIMePHzeLFy82vXr1MhERESY6Otr86U9/Mq+99po5efJknp+JiIgwN998c67tAwYMMJLMO++8491mc/7L0bJlyzyP5y+++MJIMi+88IJfccYUvy8Eui8BAABfTH4AAICQ99ZbbxlJ5umnn/bZvnPnTiPJzJ8/P9dnunbtamJiYvJ8jR8/3jrvnB9aXnvtNe+2nB8vHnvssVzxLVu2NFWrVvX5QT0rK8s0btzYXHjhheb06dM+aUyZMsXn882aNfP+uJUjMzPTXHDBBd4ftQqyatUqIynXKzw83Dz55JPW9c5
2023-10-06 11:41:37 +02:00
"text/plain": [
"<Figure size 2000x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-09-28 15:50:32 +02:00
"source": [
"#energyloss in abh von der energie der elektronen\n",
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
2023-10-09 16:32:56 +02:00
"a0=ax0.hist2d(energyloss_found, energy_found, bins=(np.linspace(0,1,70), np.linspace(0,1.5e5,70)), cmap=plt.cm.jet, cmin=1, vmax=15)\n",
2023-10-06 11:41:37 +02:00
"ax0.set_ylim(0,1.5e5)\n",
2023-10-05 15:58:17 +02:00
"ax0.set_xlim(0,1)\n",
"ax0.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
2023-09-28 15:50:32 +02:00
"ax0.set_ylabel(r\"$E_0$\")\n",
"ax0.set_title(\"found energyloss wrt electron energy\")\n",
"\n",
2023-10-09 16:32:56 +02:00
"a1=ax1.hist2d(energyloss_lost, energy_lost, bins=(np.linspace(0,1,70), np.linspace(0,1.5e5,70)), cmap=plt.cm.jet, cmin=1, vmax=15) \n",
2023-10-06 11:41:37 +02:00
"ax1.set_ylim(0,1.5e5)\n",
2023-10-05 15:58:17 +02:00
"ax1.set_xlim(0,1)\n",
"ax1.set_xlabel(r\"energyloss $E_\\gamma/E_0$\")\n",
2023-09-28 15:50:32 +02:00
"ax1.set_ylabel(r\"$E_0$\")\n",
"ax1.set_title(\"lost energyloss wrt electron energy\")\n",
2023-10-05 15:58:17 +02:00
"\n",
"fig.colorbar(a1[3],ax=ax1)\n",
2023-10-06 11:41:37 +02:00
"fig.suptitle(r\"$e^\\pm$ from $B\\rightarrow K^\\ast ee$, $p>5$GeV, only photons w/ brem_vtx_z$<9500$mm\")\n",
2023-10-05 15:58:17 +02:00
"\n",
"\"\"\"\n",
"we can see that high energy electrons are often found even though they emit a lot of their energy through bremsstrahlung\n",
"\"\"\"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 13,
2023-10-05 15:58:17 +02:00
"metadata": {},
2023-10-06 11:41:37 +02:00
"outputs": [
{
"data": {
2023-10-09 16:32:56 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABk4AAAJOCAYAAADxgPt3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADWFElEQVR4nOzdd3hUxf7H8c+mh5CEUEOQLr03aSogXZooRdBIU1FEQMCCCgFFEFBBwXa9Cog0uUgvQgBRmnS5oldQQUAJoEIoUpIwvz8g+2NJ2ZPkJGyS9+t59tE9O2fmO3POHuZkds44jDFGAAAAAAAAAAAAkNetDgAAAAAAAAAAAMBTMHACAAAAAAAAAABwHQMnAAAAAAAAAAAA1zFwAgAAAAAAAAAAcB0DJwAAAAAAAAAAANcxcAIAAAAAAAAAAHAdAycAAAAAAAAAAADXMXACAAAAAAAAAABwHQMnAAAAAAAAAAAA1zFwAgAAAAAAAAAAcB0DJwAAINfo3bu3ZsyYcavDgEX79u3TkSNHbnUYAAAAAIBchoETAAAAeKR//etfWr9+/a0OAwAAAACQyzBwAgAAYNH8+fNVpUoVBQYGyuFwaO/evbc6pFStXLlSDofD5RUSEqI6dero888/z7LyP/30U5ftp0+fVtu2beXn56dp06a5fPb111/rscce08mTJ53bfvjhB91///06ceJEpsecnXz11VdJjm/ia9u2bUnS79u3T/369VPZsmUVGBiowMBAlStXTv3799fOnTvTFUPnzp0VGBioM2fOpJjmoYcekq+v7y0/fjNmzJDD4dDhw4ezvOzRo0fL4XDozz//tC3PLVu2aPTo0am2fXaWkJCgwoULa/LkySmmyYx2zQ5y8rHfvn27WrdureDgYOXNm1fNmjXT5s2bk6RL6/Xv/PnzGjJkiCIiIhQQEKCaNWtq3rx56U4HAAByPgZOAABAjta+fXvly5dP+fLl05w5czRgwADn+9dff91yPqdOnVJkZKTKli2r1atXa+vWrSpfvnwmRp5xu3fvliQtWbJEW7du1ZYtW/TRRx/pwoUL6tGjh/bt25cl5depU8e5bd++fapbt6727Nmj9evXa+DAgS771KlTR0WKFFH16tW1bt06TZs2TS1btlSbNm1UqFChTI03uxo3bpy2bt3q8qpatapLmg8//FB16tTRt99+q8GDB2v58uVasWKFhgwZov3796tevXr65Zdf0lx2v379dOnSJc2ZMyfZz2NjY7Vo0SK1b99eRYoUSVf9kLwtW7ZozJgxOfKP59K1QdRTp07p/vvvv9WheJyceux37Nihu+++WxcvXtSsWbM0a9YsXbp0Sc2bN9fWrVuT3cfK9U+S7r//fs2cOVNRUVFatWqV6tWrpx49eiS5dllNBwAAcj6fWx0AAABAZlq+fLnz/3v37q2mTZuqd+/eac7nwIEDiouL08MPP6wmTZqkmO6ff/5Rnjx50hOq7Xbv3q3Q0FB17NjRua1hw4aKj4/Xww8/rD179qh69eqZWn5gYKAqVqwoSZo3b5769eun6tWra+HChYqIiEiyT1BQkF555RVdvXpV48ePl5eXl2bPnq0HH3ww0+K8Ff7++29dvXpVBQsWzHBe5cqVU4MGDVL8fPPmzRowYIDatWun//znP/Lz83N+ds899+ipp57SggULFBgYmOay27Ztq4iICH3yyScaMGBAks/nzp2rixcvql+/fmnOG7nbf/7zH9WtW1clS5bMtDI86XqdWxw/flxBQUEKCQlJ8tnIkSOVL18+rV692nlcWrRooTJlymj48OHJzjxxd/2Trs1+XLt2rebMmaMePXpIkpo1a6bffvtNzz77rLp37y5vb2/L6QAAQO7AjBMAAJDtbNq0Sa1atVJoaKjCwsLUrl07HTx4MNPK6927t+68805JUvfu3eVwONS0aVPnY2J2796tLl26KCwsTGXLlnWJs3nz5goODlaePHnUqFEjrVixwiXvxDz27dunrl27KjQ0VPnz59fQoUMVHx+vn376SW3atFFwcLBKlSqliRMnWo57165dqlmzZpLtx44dkyRVqlQpHa0hTZ48WYsXL05T+cOHD1ePHj300EMPaePGjckOmkjSf//7X9WuXVu7d+/Wvffeq759++q1115Tu3bt3D6Ox+p5Yff506FDB9WtW1cfffSRatSoocDAQBUvXlxRUVG6evVqsvvs27dPRYsWVdu2bfXpp5/q3Llz6S7fnXHjxsnb21sffvihy6DJjbp27ZrkmBw8eFA9e/ZU4cKF5e/vr0qVKundd991SePt7a1evXpp165d+u9//5sk3+nTpzvrmR5p+Q7t379fPXr0UGhoqIoUKaK+ffsqNjY2xby/+eYbORwOzZ07N8lnn376qRwOh3bs2JHi/onl7tmzR/fff79CQkIUGhqqhx9+WKdOnUp2nxMnTriN0Wqdn332WUlS6dKlnY8o+uqrrzKl3U6dOqXHH39cxYsXl7+/vwoVKqTGjRsrOjo6xfbZv3+/HA6HFixY4Ny2a9cuORwOValSxSVtx44dXWamGWO0aNEiPfDAAynmf6OjR4+6PQburtdWzvfMvF5L0uLFi+VwOLRu3bokn73//vtyOBy6//77Uzz2ly5dUq1atXT77be7HMOYmBiFh4eradOmSkhIsBRLSo/BSs/j7k6fPq2PP/5YLVq00G233aZff/012XSbN29W06ZNXQazgoODdffdd2vLli06fvx4mspNtGjRIuXNm1ddu3Z12d6nTx/98ccf+vbbb9OUTsr4uZDZ5xIAALCBAQAAyEaioqKMl5eX6du3r1mxYoX5z3/+Y6pVq2aKFy9uzp07lyll/vzzz+bdd981ksy4cePM1q1bzf79+01UVJSRZEqWLGmef/55s3btWrN48WJjjDFfffWV8fX1NXXq1DHz5883ixcvNq1atTIOh8PMmzfPpT6STIUKFcyrr75q1q5da5577jkjyQwcONBUrFjRvPPOO2bt2rWmT58+RpJZuHCh25j//PNPI8kMGjTIxMXFmbi4OHPixAnz6aefmuDgYPPoo4+muz169uxpfH19zaJFi9yW3717d3PPPfcYf39/89FHH7nN++jRo2bZsmXGGGOeeuopM336dBMfH29mzJhhrly5kuJ+Vs+LzDh/ihYtaoKCgkylSpXMrFmzzJo1a8yDDz5oJKVY54sXL5rZs2ebDh06GD8/PxMQEGC6dOliFi5caC5dumSp3A0bNhhJpnDhwsbb29sEBwebVq1amW+++caZJj4+3gQGBpqGDRumqU779+83oaGhplq1aubTTz81a9asMcOGDTNeXl5m9OjRLmkPHjxoHA6HGTJkSJI8JJkXXnghTWUnSs93aNSoUWbt2rXmrbfeMv7+/qZPnz7OdNOnTzeSzKFDh5zbatWqZRo3bpyk7Hr16pl69eqlGt+N3/9nn33WfPnll+att94yQUFBplatWi7nq9UYrdb56NGj5umnnzaSzBdffGG2bt1qtm7damJjY21vN2OMad26tSlUqJD517/+Zb766iuzePFiM2rUKJf8klO0aFHz+OOPO9+//vrrJjAw0Egyv//+uzHGmLi4OBMSEmKee+45Z7pNmzYZSebAgQO2H4PkrtdWz/fMul4niouLM4ULFzYPPfRQks/uuOMOU7t27VSPvTHGHDhwwAQHB5v777/fGGNMQkKCueeee0zhwoXNH3/8YTmWxHwTX+vXrzfFihUz4eHhzrJSc+HCBTNv3jzTsWNH4+fnZwIDA80DDzxgFixYYC5fvpzsPn5+fuaRRx5Jsr1Hjx5Gkvnyyy+d26xc/xI1aNAg2e/z999/bySZDz/8ME3pjMn4uZDZ5xIAAMg4Bk4AAEC2sWzZMiPJTJw40WX7gQMHjCTz2WefJdmnTZs2JigoKNnXa6+9ZrnsxD/SLFiwwLkt8Q8fo0aNSpK+QYMGpnDhwi5/jI+PjzdVq1Y1t912m7l69apLHm+++abL/jVr1nT+YSxRXFycKVSokPMPYqlZs2aNkZTk5ePjY8aOHWu53smJj493O3hyY/kBAQFm27ZtaS4
2023-10-06 11:41:37 +02:00
"text/plain": [
"<Figure size 2000x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-10-05 15:58:17 +02:00
"source": [
"#plot residual energy against energyloss and try to find a good split (eg energyloss before and after the magnet)\n",
"fig, ((ax0, ax1)) = plt.subplots(nrows=1, ncols=2, figsize=(20,6))\n",
"\n",
2023-10-06 11:41:37 +02:00
"a0=ax0.hist2d(energyloss_found, residual_found, bins=(np.linspace(0,1,80), np.linspace(0,1e5,80)), cmap=plt.cm.jet, cmin=1, vmax=20)\n",
"ax0.set_ylim(0,1e5)\n",
2023-10-05 15:58:17 +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-06 11:41:37 +02:00
"a1=ax1.hist2d(energyloss_lost, residual_lost, bins=(np.linspace(0,1,80), np.linspace(0,1e5,80)), cmap=plt.cm.jet, cmin=1, vmax=20) \n",
"ax1.set_ylim(0,1e5)\n",
2023-10-05 15:58:17 +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",
2023-10-06 11:41:37 +02:00
"fig.suptitle(r\"$e^\\pm$ from $B\\rightarrow K^\\ast ee$, $p>5$GeV, only photons w/ brem_vtx_z$<9500$mm\")\n",
2023-09-28 15:50:32 +02:00
"\n",
"\"\"\"\n",
"\"\"\"\n",
"plt.show()"
]
},
2023-10-09 09:59:35 +02:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 14,
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-10 11:00:25 +02:00
"execution_count": 15,
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
"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
"\n",
"\n",
"\n",
"#ak.num(scifi_found[\"energy\"], axis=0)\n",
"#scifi_found.snapshot()"
]
},
{
"cell_type": "code",
2023-10-10 11:00:25 +02:00
"execution_count": 16,
2023-09-29 12:21:18 +02:00
"metadata": {},
2023-10-09 09:59:35 +02:00
"outputs": [
{
"data": {
"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>"
],
"text/plain": [
"<Array [101, 101, 101, 101, 101, ..., 101, 101, 101, 0] type='11 * float32'>"
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 16,
2023-10-09 09:59:35 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
2023-09-29 12:21:18 +02:00
"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-10 11:00:25 +02:00
"execution_count": 17,
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",
2023-10-05 10:49:35 +02:00
" #endvtx_type\n",
2023-10-02 15:10:45 +02:00
" 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-10 11:00:25 +02:00
"execution_count": 18,
2023-09-29 12:21:18 +02:00
"metadata": {},
2023-10-09 09:59:35 +02:00
"outputs": [
{
"data": {
"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>"
],
"text/plain": [
"<Array [101, 101, 101, 101, 101, ..., 101, 101, 101, 0] type='11 * float64'>"
]
},
2023-10-10 11:00:25 +02:00
"execution_count": 18,
2023-10-09 09:59:35 +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-10 11:00:25 +02:00
"execution_count": 19,
2023-09-29 12:21:18 +02:00
"metadata": {},
2023-10-09 09:59:35 +02:00
"outputs": [
{
"data": {
"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
"text/plain": [
"<Figure size 1800x600 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-09-29 12:21:18 +02:00
"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-10 11:00:25 +02:00
"execution_count": 20,
2023-10-02 13:56:58 +02:00
"metadata": {},
2023-10-09 09:59:35 +02:00
"outputs": [
{
"data": {
"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/HxjjDHvvfeeqVWrlnnggQeqPfZevXq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bGn+8Ic/mKVLl5q//e1vpkGDBqZPnz5ex0BMBaAmY9AStlYeqBw7+ON2u02TJk3M2Wefbdxut2f93r17TaNGjUy3bt086wIdtExPTzclJSWedUVFRaZWrVpm8uTJnnWdO3c2TZo0MQcOHPCsKykpMWlpadUOWu7fv9+kpaX5DPC43W7Tvn17c/755/u08bHHHvMqe+utt5rk5GRTVlZmjDHmnXfeMZLMk08+6VXukUce8Qlcx40bZ1JSUsyePXs86woKCowk8/TTT3vWZWdnV3osBw8
"text/plain": [
"<Figure size 1800x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-10-02 13:56:58 +02:00
"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-10 11:00:25 +02:00
"execution_count": 21,
2023-09-29 12:21:18 +02:00
"metadata": {},
2023-10-09 09:59:35 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABPEAAANVCAYAAAAZd2vuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAD1n0lEQVR4nOzdeVyU5f7/8ffILiqubK5ouacZlkIumIm5ZabHpQ5qqWVmplQmpom22GIeslyyKCtLPeeorWZiCWrSoqJpLpVHxQwy3HBlkfv3Rz/m2zADDjgwA7yej8c8ai4+93Vd9z3D8PEz93XfJsMwDAEAAAAAAABwWVWcPQEAAAAAAAAARaOIBwAAAAAAALg4ingAAAAAAACAi6OIBwAAAAAAALg4ingAAAAAAACAi6OIBwAAAAAAALg4ingAAAAAAACAi6OIBwAAAAAAALg4ingAAAAAAACAi6OIB5RTq1atUps2beTj4yOTyaRdu3YpNjZWJpPJIm7RokVatmyZcybp4j788EPFxcU5exrXLDExUSaTSYmJic6eit2WLVsmk8mkI0eOWLTPmDFDjRo1kru7u2rWrClJioiIUERExFX7dIX3uslk0sSJE506BwBA+Ueed+2ckedFRESobdu2Du+3SZMmGj16tMP7LU0mk0mxsbEWbV999ZU6duwoX19fmUwmffTRR4XmhAVt27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YWJiWLFmiKlWqyN/f35ysz5o1S4GBgTp//rzWrl2riIgIffXVV+Z/OOXm5qpPnz7asmWLJk+erNtuu025ubn69ttvlZqaqvDwcKs5ZWVlafTo0fr888/16aef6o477rB7fwAAlRN5XvnO86S/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
"text/plain": [
"<Figure size 1500x1000 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-09-29 12:21:18 +02:00
"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": []
},
2023-10-05 10:49:35 +02:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
2023-09-28 15:50:32 +02:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "env1",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}