Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HF jets: Hard Probes 2024 Preliminaries #957

Merged
merged 79 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
7b1df18
Print database path when starting the analysis
vkucera Sep 12, 2024
9084352
Improve parallelisation control of running variations
vkucera Sep 12, 2024
9369111
D0 jets: Update variations
vkucera Sep 12, 2024
a23233b
Plotting: Add support for calculating y range within the plotting x r…
vkucera Sep 12, 2024
69e6bb9
Systematics: Do not crop histograms and graphs along x
vkucera Sep 12, 2024
1e01c7f
Plotting: Plot all jet pt bins together. Crop along x.
vkucera Sep 13, 2024
a3280ac
Plotting: Fix logger
vkucera Sep 13, 2024
77999a6
Fix plotting axes
vkucera Sep 13, 2024
5bc6317
Show systematics box and the marker in the same entry of the legend.
vkucera Sep 15, 2024
307ff25
Do not plot horizontal error bars. Shrink syst. boxes horizontaly for…
vkucera Sep 15, 2024
32b01d0
Plotting: Sync style with Run 2 papers. Improve scaling, fix margins.…
vkucera Sep 15, 2024
e59d3ab
More scaling fixes for multiple panels
vkucera Sep 16, 2024
5e9fa6f
Add ratio high/low pt jet
vkucera Sep 16, 2024
a6d7101
Adjust zpar range
vkucera Sep 16, 2024
136ed7b
Adjust legend position
vkucera Sep 16, 2024
d8df374
Plot Lc FF PYTHIA
vkucera Sep 16, 2024
fa48c81
Add species. Process only real data.
vkucera Sep 16, 2024
53cd63e
Add protection against division by zero
vkucera Sep 16, 2024
7c78d70
Change plotted D0 pt jet bins
vkucera Sep 16, 2024
8e890ae
Load all external objects
vkucera Sep 16, 2024
368f9ca
Improve plotting options and counters
vkucera Sep 16, 2024
869a8c6
Plot Run 2 D0 PYTHIA
vkucera Sep 16, 2024
7d44977
Take some functions out from make_plot
vkucera Sep 17, 2024
32d5f5f
Plot Run 3 D0 PYTHIA. Increase flexibility in selection of plotted ob…
vkucera Sep 17, 2024
1e1fcf1
Plot Run 2 Lc data FF
vkucera Sep 17, 2024
9eb97bd
Disable pathological variations
vkucera Sep 17, 2024
a82a4c7
Enable simulation plotting
vkucera Sep 17, 2024
2bffeda
Implement horizontal legend
vkucera Sep 17, 2024
03b082f
Implement arbitrary plotting order
vkucera Sep 17, 2024
02897e7
Adjust legend width
vkucera Sep 17, 2024
a487a5e
Fix missing eta jet text
vkucera Sep 17, 2024
32a740e
Fix bin width for nsd
vkucera Sep 17, 2024
72a8962
Plot Run 2 D0 FF (Jakub)
vkucera Sep 17, 2024
1917295
Adjust for new Nima's simulations. Fix marker for simulations.
vkucera Sep 17, 2024
341d215
Add switches for figure blocks
vkucera Sep 17, 2024
49fbf76
Plot Lc vs D0
vkucera Sep 18, 2024
cb4c386
Add Lc/D0 panel
vkucera Sep 18, 2024
ddc78aa
Plot Lc/D0 FF sim
vkucera Sep 18, 2024
2b0ca9a
Fix coordinate calculations
vkucera Sep 18, 2024
3a0379b
Small adjustments
vkucera Sep 18, 2024
d6a3464
Db changes for train 266172
vkucera Sep 18, 2024
400d35a
Revert "Db changes for train 266172"
vkucera Sep 18, 2024
f1759c8
Fix re-drawing of axes
vkucera Sep 18, 2024
8361d2e
Plot Run 2 data together with Run 3 all jet pt. Decrease height of bo…
vkucera Sep 19, 2024
cdaf430
Start plot file name with the species.
vkucera Sep 19, 2024
3037393
Add more switches and exceptions
vkucera Sep 20, 2024
38e1db6
Add option to rebin Run 3 MC for Run 2 binning
vkucera Sep 20, 2024
fdede90
Adjust plotting order for Lc FF vs Run 2
vkucera Sep 20, 2024
b10444e
Use fixed Run 3 MC. Rebin it only for inclusive. Fix nSD bin width.
vkucera Sep 20, 2024
e41c3ea
Plot Run 3 D0 MC for all pt jet bins
vkucera Sep 20, 2024
7644a37
Local paths
vkucera Sep 21, 2024
08351fd
Update Run 3 MC
vkucera Sep 21, 2024
56b13b9
Use dictionaries for names, colours, line styles of Run 3 MC.
vkucera Sep 21, 2024
af87c2b
Rearrange lists of colours and markers. Move black/grey circles to th…
vkucera Sep 21, 2024
d0925ce
Introduce a scheme of colours and markers.
vkucera Sep 21, 2024
efa99cf
Fix plotting of Lc FF MC
vkucera Sep 21, 2024
85108c4
Adjust legend positions
vkucera Sep 21, 2024
ab75930
Adjust Mode 2 line style.
vkucera Sep 21, 2024
f204a3c
Adjust legends
vkucera Sep 22, 2024
8df5577
Add leading-track pT cut for inclusive jets
vkucera Sep 22, 2024
621e335
Define variable for Run 2/3
vkucera Sep 22, 2024
249fb2a
Add + in Lc symbol
vkucera Sep 22, 2024
9f49c8c
Do not plot run2_d0_sd_incl_data
vkucera Sep 22, 2024
4c9a4fd
Lc preliminary
vkucera Sep 22, 2024
8b9ef33
Adjust margins
vkucera Sep 22, 2024
e8f8075
D0 per pt jet preliminary
vkucera Sep 22, 2024
b377e12
D0 prelim
vkucera Sep 22, 2024
a7f4b8f
Add marker in the ratio title
vkucera Sep 22, 2024
54f4fd3
Lc with Run 2 without MC
vkucera Sep 22, 2024
73b0dbe
Plot zg only with Run 2
vkucera Sep 22, 2024
359919b
Plot Rg, nSD only with Run 2
vkucera Sep 23, 2024
71083d0
Adjust
vkucera Oct 7, 2024
c257544
Merge branch 'run3' into dev-local
vkucera Oct 7, 2024
04d2788
Fix comment
vkucera Oct 7, 2024
2a3c536
Fixes
vkucera Oct 7, 2024
f094c69
Fixes
vkucera Oct 7, 2024
e2b5fe9
Format
vkucera Oct 7, 2024
8cb39c5
Fix
vkucera Oct 7, 2024
8ef1563
Fixes
vkucera Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions machine_learning_hep/analysis/do_systematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def do_jet_systematics(self, var: str):
input_histograms_default.append(input_file_default.Get(name_his))
if not input_histograms_default[iptjet]:
self.logger.critical(make_message_notfound(name_his, path_def))
self.crop_histogram(input_histograms_default[iptjet], var)
# self.crop_histogram(input_histograms_default[iptjet], var)
print(f"Default histogram ({range_ptjet[0]} to {range_ptjet[1]})")
print_histogram(input_histograms_default[iptjet], self.verbose)
# name_eff = f"h_ptjet-pthf_effnew_pr_{string_range_ptjet(range_ptjet)}"
Expand Down Expand Up @@ -411,7 +411,7 @@ def do_jet_systematics(self, var: str):
path_eff_file = path_eff.replace(self.string_default, string_catvar)
if not sys_var_histo_eff:
self.logger.critical(make_message_notfound(name_eff, path_eff_file))
self.crop_histogram(sys_var_histo, var)
# self.crop_histogram(sys_var_histo, var)
input_histograms_syscatvar.append(sys_var_histo)
input_histograms_eff.append(sys_var_histo_eff)
print_histogram(sys_var_histo_eff, self.verbose)
Expand Down Expand Up @@ -1017,8 +1017,8 @@ def do_jet_systematics(self, var: str):
leg_finalwsys = TLegend(0.7, 0.78, 0.85, 0.88)
setup_legend(leg_finalwsys)
leg_finalwsys.AddEntry(input_histograms_default[iptjet], "data", "P")
self.crop_histogram(input_histograms_default[iptjet], var)
self.crop_graph(tgsys[iptjet], var)
# self.crop_histogram(input_histograms_default[iptjet], var)
# self.crop_graph(tgsys[iptjet], var)
setup_histogram(input_histograms_default[iptjet], get_colour(0, 0))
y_min_g, y_max_g = get_y_window_gr([tgsys[iptjet]])
y_min_h, y_max_h = get_y_window_his([input_histograms_default[iptjet]])
Expand All @@ -1032,9 +1032,9 @@ def do_jet_systematics(self, var: str):
# input_histograms_default[iptjet].GetXaxis().SetRangeUser(
# round(obs_gen_min, 2), round(obs_gen_max, 2)
# )
input_histograms_default[iptjet].GetXaxis().SetRangeUser(
round(x_range[var][0], 2), round(x_range[var][1], 2)
)
# input_histograms_default[iptjet].GetXaxis().SetRangeUser(
# round(x_range[var][0], 2), round(x_range[var][1], 2)
# )
input_histograms_default[iptjet].SetTitle("")
input_histograms_default[iptjet].SetXTitle(latex_obs)
input_histograms_default[iptjet].SetYTitle(latex_y)
Expand Down Expand Up @@ -1091,9 +1091,9 @@ def do_jet_systematics(self, var: str):
crelativesys.SetRightMargin(0.25)
leg_relativesys = TLegend(0.77, 0.2, 0.95, 0.85)
setup_legend(leg_relativesys, textsize=self.fontsize)
for g in tgsys_cat[iptjet]:
self.crop_graph(g, var)
self.crop_histogram(h_default_stat_err[iptjet], var)
# for g in tgsys_cat[iptjet]:
# self.crop_graph(g, var)
# self.crop_histogram(h_default_stat_err[iptjet], var)
y_min_g, y_max_g = get_y_window_gr(tgsys_cat[iptjet])
y_min_h, y_max_h = get_y_window_his([h_default_stat_err[iptjet]])
y_min = min(y_min_g, y_min_h)
Expand Down Expand Up @@ -1198,9 +1198,9 @@ def do_jet_systematics(self, var: str):
# leg_relativesys_gr = TLegend(.77, .2, 0.95, .85)
leg_relativesys_gr = TLegend(0.77 * 9 / 10, 0.5, 0.95, 0.85) # scale for width 900 -> 1000
setup_legend(leg_relativesys_gr, textsize=self.fontsize)
for g in tgsys_gr[iptjet]:
self.crop_graph(g, var)
self.crop_histogram(h_default_stat_err[iptjet], var)
# for g in tgsys_gr[iptjet]:
# self.crop_graph(g, var)
# self.crop_histogram(h_default_stat_err[iptjet], var)
y_min_g, y_max_g = get_y_window_gr(tgsys_gr[iptjet])
y_min_h, y_max_h = get_y_window_his([h_default_stat_err[iptjet]])
y_min = min(y_min_g, y_min_h)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ LcJet_pp:
usejetptbinned_deff: false
doeff_resp: true #efficiency correction for the response matrix
unmatched_gen: true
latexnamehadron: "#Lambda_{c}"
latexnamehadron: "#Lambda_{c}^{#plus}"
latexnamedecay: "pK#pi"
var_binning2: pt_jet
var_binning2_gen: pt_gen_jet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ categories:
rms_both_sides: true
variations:
bkgfunc:
activate: [yes]
activate: [no]
label: ["bkg. func."]
diffs:
analysis:
Expand Down Expand Up @@ -119,7 +119,7 @@ categories:
model:
fn: 'SUM::refl(frac_l[0.,1.]*refl_l, refl_r)'
- level: mcrefl
ptrange: [12., 36.]
ptrange: [12., 48.]
datasel: mcrefl
range: [1.40, 2.4]
components:
Expand Down Expand Up @@ -172,7 +172,7 @@ categories:
model:
fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)'
- level: mc
ptrange: [12., 36.]
ptrange: [12., 48.]
range: [1.40, 2.40]
fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide']
components:
Expand Down Expand Up @@ -262,7 +262,7 @@ categories:
jet_obs:
todo: [0]
massmin:
activate: [yes]
activate: [no]
label:
- "#it{m} min. 1.75"
diffs:
Expand Down Expand Up @@ -346,7 +346,7 @@ categories:
model:
fn: 'SUM::refl(frac_l[0.,1.]*refl_l, refl_r)'
- level: mcrefl
ptrange: [12., 36.]
ptrange: [12., 48.]
datasel: mcrefl
range: [1.40, 2.4]
components:
Expand Down Expand Up @@ -399,7 +399,7 @@ categories:
model:
fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)'
- level: mc
ptrange: [12., 36.]
ptrange: [12., 48.]
range: [1.40, 2.40]
fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide']
components:
Expand Down Expand Up @@ -678,7 +678,7 @@ categories:
signal: [-2.5, 2.5] # variation
right: [3., 5.5]
ranges:
activate: [yes, yes, yes, yes, yes, yes, yes, yes]
activate: [yes, yes, yes, yes, no, no, no, no]
label:
- "SB 3#minus6#it{#sigma}"
- "SB 3#minus5#it{#sigma}"
Expand Down Expand Up @@ -866,7 +866,7 @@ categories:
rms_both_sides: true
variations:
flatness:
activate: [yes, yes, yes, yes, yes, yes, yes, yes, yes, yes]
activate: [yes, yes, yes, yes, yes, yes, yes, yes, yes, no]
label: ["flat 0.1", "flat 0.2", "flat 0.3", "flat 0.4", "flat 0.5", "flat 0.6", "flat 0.7", "flat 0.8", "flat 0.9", "flat 1.0"]
diffs:
analysis:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ categories:
rms_both_sides: true
variations:
flatness:
activate: [yes, yes, yes, yes, yes, yes, yes, yes, yes, yes]
activate: [yes, yes, yes, yes, yes, yes, yes, yes, yes, no]
label: ["flat 0.1", "flat 0.2", "flat 0.3", "flat 0.4", "flat 0.5", "flat 0.6", "flat 0.7", "flat 0.8", "flat 0.9", "flat 1.0"]
diffs:
analysis:
Expand Down Expand Up @@ -559,7 +559,7 @@ categories:
rms_both_sides: true
variations:
ml:
activate: [no, no, no, yes, yes, yes, yes, yes, yes, yes, yes, yes, yes]
activate: [no, no, no, yes, yes, yes, yes, no, yes, yes, yes, yes, yes]
label:
# default: working point (for tests, should be same as the default result)
# null: no cuts (for tests, whatever was applied on Hyperloop)
Expand Down
Loading