Skip to content
Snippets Groups Projects
Commit bc28a288 authored by Joshua Newell's avatar Joshua Newell
Browse files

Added failsafe that adds dummy entry of 1 to arr_mu, arr_rec_eff and...

Added failsafe that adds dummy entry of 1 to arr_mu, arr_rec_eff and arr_rec_err arrays in case of lack of pileup data
parent c6d518fc
No related branches found
No related tags found
2 merge requests!687242024-02-09: Sweep 23.0 into main,!65939Updated post-processing and plotting scripts for 2023 data in ZLumiScripts directory
Pipeline #6802667 failed
......@@ -214,6 +214,13 @@ for pileup in o_recoeff_fit:
arr_rec_eff.append(o_recoeff_fit[pileup]/o_recoerr_fit[pileup])
arr_rec_err.append(1/pow(o_recoerr_fit[pileup], 0.5))
# If no pileup data is available, add dummy entry with all parameters set to 1
if len(arr_mu) == 0:
arr_mu.append(1)
arr_rec_eff.append(1)
arr_rec_err.append(1)
tg_fit = ROOT.TGraphErrors(len(arr_mu), arr_mu, arr_rec_eff, ROOT.nullptr, arr_rec_err)
if len(o_recoeff_fit) == 1:
fit_type = "pol0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment