2024-02-12 15:57:23 +01:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-02-13 09:34:22 +01:00
|
|
|
"execution_count": 1,
|
2024-02-12 15:57:23 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"import uproot\n",
|
|
|
|
"import matplotlib.pyplot as plt\n",
|
|
|
|
"import numpy as np\n",
|
|
|
|
"import mplhep\n",
|
|
|
|
"\n",
|
|
|
|
"mplhep.style.use([\"LHCbTex2\"])\n",
|
|
|
|
"plt.rcParams[\"savefig.dpi\"] = 600\n",
|
|
|
|
"# %matplotlib inline"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-02-13 09:34:22 +01:00
|
|
|
"execution_count": 3,
|
2024-02-12 15:57:23 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"train_tree = uproot.open({\n",
|
|
|
|
" \"/work/cetin/LHCb/reco_tuner/nn_electron_training/result_e_sig_def_bak/matching_ghost_mlp_training.root\":\n",
|
|
|
|
" \"MatchNNDataSet/TrainTree\"\n",
|
|
|
|
"})\n",
|
|
|
|
"test_tree = uproot.open({\n",
|
|
|
|
" \"/work/cetin/LHCb/reco_tuner/nn_electron_training/result_e_sig_def_bak/matching_ghost_mlp_training.root\":\n",
|
|
|
|
" \"MatchNNDataSet/TestTree\"\n",
|
|
|
|
"})\n",
|
|
|
|
"train_array = train_tree.arrays()\n",
|
|
|
|
"test_array = test_tree.arrays()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-02-13 09:34:22 +01:00
|
|
|
"execution_count": 4,
|
2024-02-12 15:57:23 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAA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lUqrX637MlUpFsViso27s7+8rmUz21Mu9vT2trq763XqbzaaKxaJ/rBzHYfB/AAAAAJMLOhOH8FLIWoQVCoWxy+tujaNjWoR1t6jxHl5rpFnrbtXUr6XNIF7romlsx6D9Mk657WUd1wqpu5XQoJZ53S3X2luGtWvfJ4PWXa1WR2rB1Wq1ptoiLJVKHVvnjytn1Ng9ox6L9pZgxx3r9hZfg1owtsdoGEbf49pdf2d1DQIAAABwNtEiDOgj7C3CTqJ75kdp/O3I5XJqtVoDW0F5s1WOUn6/uAZpn6Qgk8kMHB+te6bEQS0B2+N3HCe0x3VQPWx/fhqD4o96LPL5vL/+TCYz0rLSUSu3fpM0tG/Hzs5O3+PaXdf29vZGihUAAAAA+iERBvQxKDHQbDZnHMnk+iVTvvzyy4nKK5fLqtfrPV3wpKOkx/r6+lSTS6N2BW0/bifpPhqmGRZ3dnZUKBRULpePTTZJs0vOlkolf12jJM4ymUzHMTjpJA3t2tcXpmMFAAAAYP6QCAP6GNTiqF+rlrDrl7S4cOHCxOValjVw/LVGo9EzftUsjDur5/7+/nQDmYBhGMrlcgPHZDvp+G7TUq1W/f+P2oKs/Tyax3MHAAAAwNlDIgwYoF9rJ9u2Q9uN7iRO0i3xOJlMRs1msycJValUQp38GDdpNmu2batUKqlWq/UdCH+WcZxUdz07C+cOAAAAgPlGIgwYYGNjo+/zYU7uDNKd9JlmIswrr16v96znpLN14te8WS+LxeLQcdFmpT2
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 1200x900 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"train_bkg = train_array[train_array.classID == 1]\n",
|
|
|
|
"train_sig = train_array[train_array.classID == 0]\n",
|
|
|
|
"test_bkg = test_array[test_array.classID == 1]\n",
|
|
|
|
"test_sig = test_array[test_array.classID == 0]\n",
|
|
|
|
"plt.hist(train_sig.matching_mlp,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" label=\"training sample, true pairs\")\n",
|
|
|
|
"plt.hist(train_bkg.matching_mlp,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"training sample, wrong pairs\")\n",
|
|
|
|
"mplhep.histplot(np.histogram(np.array(test_sig.matching_mlp), 50),\n",
|
|
|
|
" histtype=\"errorbar\",\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" yerr=True,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" marker=\"^\",\n",
|
|
|
|
" markersize=7,\n",
|
|
|
|
" label=\"test sample, true pairs\")\n",
|
|
|
|
"mplhep.histplot(np.histogram(np.array(test_bkg.matching_mlp), 50),\n",
|
|
|
|
" histtype=\"errorbar\",\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" yerr=True,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"test sample, wrong pairs\")\n",
|
|
|
|
"plt.xlabel(\"neural network response\")\n",
|
|
|
|
"plt.ylabel(\"Number of tracks (normalised)\")\n",
|
|
|
|
"mplhep.lhcb.text(\"Simulation\", loc=0)\n",
|
|
|
|
"plt.legend(loc=\"upper center\")\n",
|
|
|
|
"plt.savefig(\"/work/cetin/LHCb/reco_tuner/thesis/default_NN_elec_response.pdf\",\n",
|
|
|
|
" format=\"PDF\")\n",
|
|
|
|
"# plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 34,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABYkAAAXuCAYAAAAuuqfOAAA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L/hUq9VUq9X8z518Pj8QDPMClvF4XOVy+U6OWMuydHR0pHw+L8uy/EBTpVLxP8ds277z2bWoevslk0ldXFyo0Wio1Wrp2bNnqlarymazAz+SBZFMJvX48WP/eDWbTUnSzc3NnbJBj6332Z/NZv3P5GKxqJOTEyUSCeVyOf9v1WrVDxpKUi6Xk2ma/nHq5x3bbDbrH7t4PC7Lsvwf5LxtTxP49LaZzWbVarXUarW0u7s7NkgZ1Dz6eCKRUK1WG1l/oVBQs9mUYRgL3b9Z34N5nZ+TfCZM0scBAAAA4D6xXq/XC7sRq8h1XT169MhPLdFqtUaWcxxH8Xhc0tvcg7OmZph1FlmQt3tnZydQIHoe+yNJBwcHur6+1v7+vq6urmaub5QPf/xxoHJPv/bBQra/ToIey1W1qD7guq4/q7LZbCqRSNz7vGmaflC1XC6r1WqpUqn4wSnDMPzgm/Srz5nhv0tvZx5Wq9WRz0m/Ot8Nw1CtVvPT4/R/xpVKJRUKhaXUWywWVS6XVavVlMlk/L97AVnTNP0g2LiAofT2B698Pq9WqzVw1YNlWapUKgMByWmObf/n8XB7+49PKpUa2Fb//wvDbZPkB8ANw9DLly/9vuK6rpLJpB8cHLVfXjB6+LPe2+Zw3+vvd4VCYaYF1ObRx/v33wuw9ovH43Ic505b571/07wH8z4/gxyvSfr4plvGWAOraVl94+cXfxmo3LtPfn9hbQAAAOFYlbEoM4mnlM1m/UDquNm03qxi6e2Xtklm6Q5zHMefzVSpVNRqtfy
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 1400x1500 with 6 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, axes = plt.subplots(3, 2, figsize=(14, 15), sharey=False)\n",
|
|
|
|
"# 0,0\n",
|
|
|
|
"axes[0, 0].hist(train_sig.chi2,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" label=\"training sample, true pairs\")\n",
|
|
|
|
"axes[0, 0].hist(train_bkg.chi2,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"training sample, wrong pairs\")\n",
|
|
|
|
"axes[0, 0].set_xlabel(r\"$\\chi^{2}_{\\mathrm{match}}$\")\n",
|
|
|
|
"axes[0, 0].legend(prop={'size': 20})\n",
|
|
|
|
"# 1,0\n",
|
|
|
|
"axes[1, 0].hist(train_sig.distX,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" range=(0, 100),\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" label=\"training sample, true pairs\")\n",
|
|
|
|
"axes[1, 0].hist(train_bkg.distX,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" range=(0, 100),\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"training sample, wrong pairs\")\n",
|
|
|
|
"axes[1, 0].set_xlabel(r\"$D_{x}$ [mm]\")\n",
|
|
|
|
"axes[1, 0].set_ylabel(\"Number of tracks (normalised)\",\n",
|
|
|
|
" va=\"bottom\",\n",
|
|
|
|
" ha=\"center\")\n",
|
|
|
|
"# 0,1\n",
|
|
|
|
"axes[0, 1].hist(train_sig.teta2,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" range=(0.0, 0.02),\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" label=\"training sample, true pairs\")\n",
|
|
|
|
"axes[0, 1].hist(train_bkg.teta2,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" range=(0.0, 0.02),\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"training sample, wrong pairs\")\n",
|
|
|
|
"axes[0, 1].set_xlabel(r\"$t_{x}^{2}+t_{y}^{2}$\")\n",
|
|
|
|
"# 1,1\n",
|
|
|
|
"axes[1, 1].hist(train_sig.distY,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" range=(0, 100),\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" label=\"training sample, true pairs\")\n",
|
|
|
|
"axes[1, 1].hist(train_bkg.distY,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" range=(0, 100),\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"training sample, wrong pairs\")\n",
|
|
|
|
"axes[1, 1].set_xlabel(r\"$D_{y}$ [mm]\")\n",
|
|
|
|
"# 2,0\n",
|
|
|
|
"axes[2, 0].hist(train_sig.dSlope,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" label=\"training sample, true pairs\")\n",
|
|
|
|
"axes[2, 0].hist(train_bkg.dSlope,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"training sample, wrong pairs\")\n",
|
|
|
|
"axes[2, 0].set_xlabel(r\"$|\\Delta t_{x}^{\\mathrm{match}}|$\")\n",
|
|
|
|
"# 2,1\n",
|
|
|
|
"axes[2, 1].hist(train_sig.dSlopeY,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" range=(0, 0.02),\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" label=\"training sample, true pairs\")\n",
|
|
|
|
"axes[2, 1].hist(train_bkg.dSlopeY,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" range=(0, 0.02),\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" log=False,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"training sample, wrong pairs\")\n",
|
|
|
|
"axes[2, 1].set_xlabel(r\"$|\\Delta t_{y}^{\\mathrm{match}}|$\")\n",
|
|
|
|
"plt.savefig(\"/work/cetin/LHCb/reco_tuner/thesis/default_NN_elec_variables.pdf\",\n",
|
|
|
|
" format=\"PDF\")\n",
|
|
|
|
"# plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
|
|
|
"display_name": "tuner",
|
|
|
|
"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.10.12"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 2
|
|
|
|
}
|