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-19 15:41:09 +01:00
|
|
|
"execution_count": 2,
|
2024-02-12 15:57:23 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"train_tree = uproot.open({\n",
|
2024-02-19 15:41:09 +01:00
|
|
|
" \"/work/cetin/LHCb/reco_tuner/nn_electron_training/result_e_sig_filter_bkg/matching_ghost_mlp_training.root\":\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
" \"MatchNNDataSet/TrainTree\"\n",
|
|
|
|
"})\n",
|
|
|
|
"test_tree = uproot.open({\n",
|
2024-02-19 15:41:09 +01:00
|
|
|
" \"/work/cetin/LHCb/reco_tuner/nn_electron_training/result_e_sig_filter_bkg/matching_ghost_mlp_training.root\":\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
" \"MatchNNDataSet/TestTree\"\n",
|
|
|
|
"})\n",
|
|
|
|
"train_array = train_tree.arrays()\n",
|
|
|
|
"test_array = test_tree.arrays()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-02-19 15:41:09 +01:00
|
|
|
"execution_count": 3,
|
2024-02-12 15:57:23 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
2024-02-19 15:41:09 +01:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMIAAAOWCAYAAAANzz7PAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9XWwjaZof+P6pqu6pnvFIQaUxQK4ETClYaWN3vTupoLLvFnCXyG4bx8A5PRVUtoEBGrtdiqi8W2i6yFTZu4AXdimDVaWzV54Mqsrrho2dkYKZdbPnbE8ylLWwz8W6S4ysxu7iHJ8qRmYDKQswnGIk5/R0TXeX4lxoIzr4/RVkBJP/H0Bkigq+8cQHQ4yHz/u+Cdd1XRAREREREREREb3gFqIOgIiIiIiIiIiIaBqYCCMiIiIiIiIiornARBgREREREREREc0FJsKIiIiIiIiIiGguMBFGRERERERERERzgYkwIiIiIiIiIiKaC0yEERERERERERHRXGAijIiIiIiIiIiI5gITYURERERERERENBeYCCMiIiIiIiIiornARBgREREREREREc0FJsKIiIiIiIiIiGguMBFGRERERERERERzgYkwIiIiIiIiIiKaC0yEERERERERERHRXGAijIiIiIiIiIiI5gITYURERERERERENBeYCCMiIiIiIiIiornARBgREREREREREc0FJsKIiIiIiIiIiGguMBFGRERERERERERzgYkwIiIiIiIiIiKaC0yEERERERERERHRXGAijIiIiIiIiIiI5gITYURERERERERENBeYCCMiIiIiIiIiornARBgREREREREREc0FJsKIaGiO40QdAhEREREREdHQmAgjooFYloVCoYBkMont7e2owyEiIiIiIiIa2stRB0BE47MsC4eHh7AsC7Zt4/z8HI7jQBAEiKKI5eVlSJKEbDaLTCbT9vpcLgfbtlGtVv3nHMeBaZo4PDyEaZqsAiMiIiIiIqKZl3Bd1406CKJSqQRVVYd+nSRJTcmbUSUSiaFfIwgC6vV6x9/lcjmUy+Wh26xUKh0TVZ04joO9vT0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MM0TX/du7u7Te1LkgTDMABcxr69vd30WkEQIElS24QO3nPB3w17LDyFQgGqqkIQBNRqNeTzeUiSBFEUIcsyqtWqH3O5XEYqlWo6N87Pz5HNZtvOyZOTE6ytrfldemu1GnRd94+V4zgc/J+IiIiI6EURdSaOqBvErCJM07SR22utyEGfirDWqhrv4VUkTVtrZVOnaptuvAqjcbej2z4Zpc1gW/2qkFqrhLpV5bVWrgUrw4KC+6PbuiuVykAVXPV6PdSKMFmW+57v/doZNHbPoMciWAnW71gHK766VS8GYxQEoeNxbT13p3X9ISIiIiKiyWFFGFEMxb0ibBitsz8Co21HPp9HvV7vWgXlzVQ5SNudYuomOEGBoihdx0ZrnSmxWxVgMH7HcWJ7TLudg8HnwxgUf9BjUSgU/PUrijLQssBllVunCRqC23FwcNDxuLaeaycnJwPFSkRERERE8cVEGFEMdUsO1Gq1KUcyvk4JlWfPno3clmEYqFarbV3wgMukx+bmZqjJpUG7gQaP2TBdR+M0w+LBwQE0TYNhGH2TTcD0ErOlUslf1yCJM0VRmo7BMBM0tAquL07HioiIiIiIRsNEGFEMdas66lTZEnedEhdXrlwZq01JkrqOvWZZVtv4VdMw6oye5+fn4QYyBkEQkM/nu47JNszYbmGqVCr+/wetIAu+h2bxfUNERERERJPBRBhRTHWqeLJtO7Zd6YYxTNfEXhRFQa1Wa0tClcvlWCc/Rk2aTZtt2yiVSjBNs+NA+NOMY1it59i
|
2024-02-12 15:57:23 +01:00
|
|
|
"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",
|
2024-02-19 15:41:09 +01:00
|
|
|
"plt.hist(\n",
|
|
|
|
" train_sig.matching_mlp,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" color=\"#107E7D\",\n",
|
|
|
|
" label=\"training sample, true pairs\",\n",
|
|
|
|
")\n",
|
|
|
|
"plt.hist(\n",
|
|
|
|
" train_bkg.matching_mlp,\n",
|
|
|
|
" bins=50,\n",
|
|
|
|
" alpha=0.5,\n",
|
|
|
|
" density=True,\n",
|
|
|
|
" color=\"#F05342\",\n",
|
|
|
|
" label=\"training sample, wrong pairs\",\n",
|
|
|
|
")\n",
|
|
|
|
"mplhep.histplot(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
|
|
|
"mplhep.histplot(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"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",
|
2024-02-19 15:41:09 +01:00
|
|
|
"plt.savefig(\"/work/cetin/LHCb/reco_tuner/thesis/filtered_NN_elec_response.pdf\",\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
" format=\"PDF\")\n",
|
|
|
|
"# plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-02-19 15:41:09 +01:00
|
|
|
"execution_count": 4,
|
2024-02-12 15:57:23 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
2024-02-19 15:41:09 +01:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABYkAAAXuCAYAAAAuuqfOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9T2wjeX7nfX6oLtv12G5VUDnjXa0EbGew+uxuUmngAXYW6BJpLLCnGZOZffPBFtl9WqyMJjP7Ys+lVWS7BewebJPZc/BpoSS7fXoeeIuR1YsZYx/AKUZ5LnvpZmQZKz1cGFNSFNset+1pcQ+aiCYpigr+jSD5fgFCktKPv/hFMEL541ff+P5ivV6vJwAAAAAAAADARtoKewAAAAAAAAAAgPAQJAYAAAAAAACADUaQGAAAAAAAAAA2GEFiAAAAAAAAANhgBIkBAAAAAAAAYIMRJAYAAAAAAACADUaQGAAAAAAAAAA2GEFiAAAAAAAAANhgBIkBAAAAAAAAYIMRJAYAAAAAAACADUaQGAAAAAAAAAA2GEFiAAAAAAAAANhgBIkBAAAAAAAAYIMRJAYAAAAAAACADUaQGAAAAAAAAAA2GEFiAAAAAAAAANhgBIkBAAAAAAAAYIMRJAYAAAAAAACADUaQGAAAAAAAAAA2GEFiAAAAAAAAANhgBIkBAAAAAAAAYIMRJAYAAAAAAACADUaQGAAAAAAAAAA2GEFiAAAAAAAAANhgBIkBAAAAAAAAYIMRJAYAAAAAAACADUaQGAAAAAAAAAA2GEFiAAAAAAAAANhg74Q9AODXfu3X9LOf/Uxf+MIX9Bu/8RthDwcAAKyZv/u7v9PPf/5zvfvuu/qHf/iHsIeDCGEeC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|
"<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",
|
2024-02-19 15:41:09 +01:00
|
|
|
"axes[0, 0].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
|
|
|
"axes[0, 0].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"axes[0, 0].set_xlabel(r\"$\\chi^{2}_{\\mathrm{match}}$\")\n",
|
2024-02-19 15:41:09 +01:00
|
|
|
"axes[0, 0].legend(prop={\"size\": 20})\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"# 1,0\n",
|
2024-02-19 15:41:09 +01:00
|
|
|
"axes[1, 0].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
|
|
|
"axes[1, 0].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"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",
|
2024-02-19 15:41:09 +01:00
|
|
|
"axes[0, 1].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
|
|
|
"axes[0, 1].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"axes[0, 1].set_xlabel(r\"$t_{x}^{2}+t_{y}^{2}$\")\n",
|
|
|
|
"# 1,1\n",
|
2024-02-19 15:41:09 +01:00
|
|
|
"axes[1, 1].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
|
|
|
"axes[1, 1].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"axes[1, 1].set_xlabel(r\"$D_{y}$ [mm]\")\n",
|
|
|
|
"# 2,0\n",
|
2024-02-19 15:41:09 +01:00
|
|
|
"axes[2, 0].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
|
|
|
"axes[2, 0].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"axes[2, 0].set_xlabel(r\"$|\\Delta t_{x}^{\\mathrm{match}}|$\")\n",
|
|
|
|
"# 2,1\n",
|
2024-02-19 15:41:09 +01:00
|
|
|
"axes[2, 1].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
|
|
|
"axes[2, 1].hist(\n",
|
|
|
|
" 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",
|
|
|
|
")\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"axes[2, 1].set_xlabel(r\"$|\\Delta t_{y}^{\\mathrm{match}}|$\")\n",
|
2024-02-19 15:41:09 +01:00
|
|
|
"plt.savefig(\n",
|
|
|
|
" \"/work/cetin/LHCb/reco_tuner/thesis/filtered_NN_elec_variables.pdf\",\n",
|
|
|
|
" format=\"PDF\")\n",
|
2024-02-12 15:57:23 +01:00
|
|
|
"# 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
|
|
|
|
}
|