Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
rkansal47 committed Aug 24, 2023
1 parent 741b0f2 commit df42dbb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/HHbbVV/VBF_binder/VBFVectorTesting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@
"import vector\n",
"import numpy as np\n",
"\n",
"\n",
"# Define a function to convert pt, eta, phi, mass to a vector object\n",
"def to_vector(pt, eta, phi, mass):\n",
" return vector.obj(pt=pt, eta=eta, phi=phi, mass=mass)\n",
Expand Down
5 changes: 2 additions & 3 deletions src/HHbbVV/VBF_binder/VBFgenInfoTests.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@
" df[(\"vbfphiSorted\" + method, 1)],\n",
" )\n",
"\n",
"\n",
"# Define a function to create the required table\n",
"def display_table(df, method):\n",
" # Initialize a string to store the table\n",
Expand Down Expand Up @@ -3509,6 +3510,7 @@
"Hbb_Txbb_values = pd.concat([Hbb_Txbb_values_0, Hbb_Txbb_values_1])\n",
"HVV_Txbb_values = pd.concat([HVV_Txbb_values_0, HVV_Txbb_values_1])\n",
"\n",
"\n",
"# Compute delta R for each combination\n",
"def delta_r(eta1, phi1, eta2, phi2):\n",
" deta = eta1 - eta2\n",
Expand Down Expand Up @@ -4449,13 +4451,11 @@
" # Extract columns with R1...R2 format\n",
" # print(column, 'R1' in str(column) and 'R2' in str(column))\n",
" if \"vbfR\" in str(column):\n",
"\n",
" l = len(df[column])\n",
"\n",
" # Use regex to extract R1 and R2 values from column name\n",
" match = re.search(r\"R1([\\d\\.]+)R2([\\d\\.]+)\", str(column))\n",
" if match:\n",
"\n",
" R1 = float(match.group(1))\n",
" R2 = float(match.group(2))\n",
"\n",
Expand All @@ -4474,7 +4474,6 @@
"\n",
"\n",
"def plot_heatmap(data, title=\"Num preselected events with 1 or 2 gen quark matched vbf jets\"):\n",
"\n",
" # Define grid\n",
" R1_vals = sorted(list(set(data[:, 1])))\n",
" R2_vals = sorted(list(set(data[:, 2])))\n",
Expand Down
7 changes: 6 additions & 1 deletion src/HHbbVV/scale_factors/VV_reweighting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,12 @@
" return ratio_smeared_lookups, ratio_lnN_smeared_lookups, ratio_sys_up, ratio_sys_down\n",
"\n",
"\n",
"(ratio_smeared_lookups, ratio_lnN_smeared_lookups, ratio_sys_up, ratio_sys_down,) = (\n",
"(\n",
" ratio_smeared_lookups,\n",
" ratio_lnN_smeared_lookups,\n",
" ratio_sys_up,\n",
" ratio_sys_down,\n",
") = (\n",
" [],\n",
" [],\n",
" [],\n",
Expand Down

0 comments on commit df42dbb

Please sign in to comment.