This commit is contained in:
cetin 2024-04-15 10:12:54 +02:00
parent 4c513f4faa
commit 685fb6c8a5
12 changed files with 1233 additions and 225 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -515,14 +515,135 @@
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>phi</th>\n",
" <th>eta</th>\n",
" <th>rad_length_frac</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>-87.0</td>\n",
" <td>7.0</td>\n",
" <td>0.1286</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>72.0</td>\n",
" <td>5.6</td>\n",
" <td>0.1478</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>55.0</td>\n",
" <td>5.0</td>\n",
" <td>0.1660</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>55.0</td>\n",
" <td>5.0</td>\n",
" <td>0.1660</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>11.0</td>\n",
" <td>8.4</td>\n",
" <td>0.1065</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48285</th>\n",
" <td>-81.0</td>\n",
" <td>7.7</td>\n",
" <td>0.1921</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48286</th>\n",
" <td>35.0</td>\n",
" <td>7.6</td>\n",
" <td>0.2407</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48287</th>\n",
" <td>63.0</td>\n",
" <td>7.2</td>\n",
" <td>0.2418</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48288</th>\n",
" <td>13.0</td>\n",
" <td>6.2</td>\n",
" <td>0.1719</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48289</th>\n",
" <td>0.0</td>\n",
" <td>4.8</td>\n",
" <td>0.1334</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>48290 rows × 3 columns</p>\n",
"</div>"
],
"text/plain": [
" phi eta rad_length_frac\n",
"0 -87.0 7.0 0.1286\n",
"1 72.0 5.6 0.1478\n",
"2 55.0 5.0 0.1660\n",
"3 55.0 5.0 0.1660\n",
"4 11.0 8.4 0.1065\n",
"... ... ... ...\n",
"48285 -81.0 7.7 0.1921\n",
"48286 35.0 7.6 0.2407\n",
"48287 63.0 7.2 0.2418\n",
"48288 13.0 6.2 0.1719\n",
"48289 0.0 4.8 0.1334\n",
"\n",
"[48290 rows x 3 columns]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.DataFrame({\n",
" \"phi\": phi_a * 90.0 / np.pi,\n",
" \"eta\": eta_a * 2.0,\n",
" \"rad_length_frac\": rad_length_frac_a,\n",
"})\n",
"df = df.round({\"phi\": 0, \"eta\": 1, \"rad_length_frac\": 4})"
"df = df.round({\"phi\": 0, \"eta\": 1, \"rad_length_frac\": 4})\n",
"df"
]
},
{
@ -956,38 +1077,40 @@
],
"source": [
"fig = plt.figure(figsize=(15, 7))\n",
"ax = sns.heatmap(df_pivoted,\n",
" robust=True,\n",
" square=False,\n",
" cmap=colormaps[\"rainbow\"],\n",
" xticklabels=False,\n",
" yticklabels=False,\n",
" vmax=0.7,\n",
" cbar_kws={\n",
" 'label': r'$x/X_0$',\n",
" 'pad': 0.005,\n",
" 'shrink': 1,\n",
" 'ticks': [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7],\n",
" 'aspect': 15\n",
" })\n",
"ax = sns.heatmap(\n",
" df_pivoted,\n",
" robust=True,\n",
" square=False,\n",
" cmap=colormaps[\"rainbow\"],\n",
" xticklabels=False,\n",
" yticklabels=False,\n",
" vmax=0.7,\n",
" cbar_kws={\n",
" \"label\": r\"$x/X_0$\",\n",
" \"pad\": 0.005,\n",
" \"shrink\": 1,\n",
" \"ticks\": [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7],\n",
" \"aspect\": 15,\n",
" },\n",
")\n",
"# ax.set_yticks([5, 15, 25, 35], [2, 3, 4, 5])\n",
"ax.set_yticks([0, 20, 40, 60], [2, 3, 4, 5])\n",
"ax.set_xticks([39, 89, 139],\n",
" [-100, 0, 100]) # ([79, 179, 279], [-100, 0, 100])\n",
"ax.set_xticks([39, 89, 139], [-100, 0, 100]) # ([79, 179, 279], [-100, 0, 100])\n",
"ax.set_xlabel(f\"$\\phi$ [deg]\")\n",
"ax.set_ylabel(f\"$\\eta$\")\n",
"ax.patch.set_edgecolor('black')\n",
"ax.patch.set_edgecolor(\"black\")\n",
"\n",
"ax.patch.set_linewidth(2)\n",
"# ax.set_yticklabels([])\n",
"ax.invert_yaxis()\n",
"# ax.set_title(\"EndVELO to EndUT $x/X_0$\", size=35)\n",
"mplhep.lhcb.text(\n",
" \"Simulation \\qquad \\qquad \\qquad EndVELO to EndUT $x/X_0$\", loc=0)\n",
" \"Simulation \\qquad \\qquad \\qquad EndVELO to EndUT $x/X_0$\", loc=0\n",
")\n",
"# plt.show()\n",
"plt.savefig(\n",
" \"/work/cetin/Projektpraktikum/thesis/rad_length_frac_eta_phi_2.pdf\",\n",
" format=\"PDF\")"
" \"/work/cetin/Projektpraktikum/thesis/rad_length_frac_eta_phi_2.pdf\", format=\"PDF\"\n",
")"
]
},
{

Binary file not shown.

BIN
thesis/PdP_Velo_hist2d.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.