187 lines
45 KiB
Plaintext
187 lines
45 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 25,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import uproot\n",
|
||
|
"import ROOT\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"import awkward as ak\n",
|
||
|
"import numpy as np\n",
|
||
|
"from numpy import abs\n",
|
||
|
"import math\n",
|
||
|
"from array import array\n",
|
||
|
"import mplhep\n",
|
||
|
"mplhep.style.use([\"LHCbTex2\"])\n",
|
||
|
"#%matplotlib inline"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 15,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"File = uproot.open(\"/work/cetin/LHCb/reco_tuner/data/ghost_data_B_new_vars_default_weights.root:PrMatchNN_3e224c41.PrMCDebugMatchToolNN/MVAInputAndOutput\")\n",
|
||
|
"allcolumns = File.arrays()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 16,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"tracked = allcolumns[allcolumns[\"mc_quality\"]==-1]\n",
|
||
|
"ghost = allcolumns[allcolumns[\"mc_quality\"]==0]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 17,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"tracked_zmag = ak.to_numpy(tracked[\"mc_zMag\"])\n",
|
||
|
"\n",
|
||
|
"ghost_zmag = ak.to_numpy(ghost[\"mc_zMag\"])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 26,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"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dTY8qi3b9/e+MF4sH9SNpudW923GV0WuQ7evHkzDB17vV68fPlyxRXN7jG+httmOI0eF9MGQZlMZuzx58+fxx43Go1rywS73W6USqUoFAqPdunfIt4LAJJLEAYA3NtNM7Levn07XCY5r9lg5XI5crlcpNPpe+/3c3BwMHzuYIncYMlUr9eLw8PDOD4+jmKxGO/fv59L3dPodrtrEYalUqloNBrDvZfa7fbETf4fo3V4DYPa7roAxE2eP38+9vimkO3g4CDOz8+vBb3NZjMymcy9lhov2qLeCwCSSRAGADzI1WCqXq8PvzaPq/GVy+XhUsaHbHod8SUE6HQ6EfFlhkipVIqNjY3I5XLx4cOHaLVaY0HJsnz//fdLHe++0un02N5m9Xp9qmWmj8ljew2jwc5oqDwa3PR6vanC0tFZT5OCn0Eg2Gq1rs2sfAyz5K5a5HsBQPIIwgCAB8nn89c+qDabzWtXbruPdrs9DCnS6fRcAqpyuRy1Wi3Oz8/j/Pw8+v1+dDqdaDQaS70K4mgAMUvAl8vlVrqELZ/Pj10xtFwur91m5I/pNYz+W3777bc33o+Ybl+7QcgbEddmfJVKpWvts9lsnJycjO071+v1Ht2eYfN+LwBINkEYADDRNDMwRjfJn/S1q/3eZTScmBT+TNPXYDlkoVCYy0y1hxoNJrrd7lRL9Eql0rXgcRWq1epYaFgqlR7t/lK3eSyvYbAvXcT4DMpisTgW/E5zkYTR8+Wm/ftus7e3NxYMPrb9tOb9XgCQbIIwAGCiaT4UX539dZ+wZpo
|
||
|
"text/plain": [
|
||
|
"<Figure size 1200x900 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.hist(tracked_zmag, bins=100, label=\"tracked\", alpha=0.6, density=True)\n",
|
||
|
"plt.hist(ghost_zmag, bins=100, label=\"ghosts\", alpha=0.6, density=True)\n",
|
||
|
"plt.xlabel(r\"$z_{mag}$\")\n",
|
||
|
"plt.ylabel(\"a.u.\")\n",
|
||
|
"plt.title(\"Magnet kink position\")\n",
|
||
|
"plt.legend()\n",
|
||
|
"#plt.colorbar(h2[3])\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": []
|
||
|
},
|
||
|
{
|
||
|
"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": []
|
||
|
},
|
||
|
{
|
||
|
"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
|
||
|
}
|