Skip to content

Commit

Permalink
Fix small bug in --isArray mode (#110)
Browse files Browse the repository at this point in the history
* Fix small bug in --isArray mode

* Linting

* Add latest 2022 veto maps (summer22 instead of winter22)

* Fix 2022 veto maps
  • Loading branch information
mondalspandan authored Jan 23, 2025
1 parent 08d8565 commit 1725016
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion src/BTVNanoCommissioning/helpers/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,6 @@ def uproot_writeable(events, include=["events", "run", "luminosityBlock"]):
b_nest[n] = ak.fill_none(
ak.packed(ak.without_parameters(events[bname][n])), -99
)
ev[bname] = ak.zip(b_nest)
if bool(b_nest):
ev[bname] = ak.zip(b_nest)
return ev
4 changes: 2 additions & 2 deletions src/BTVNanoCommissioning/utils/AK4_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Run2022D": "calibeHistoWrite_Data2022D_NANO130X_v1.root",
"MC": "calibeHistoWrite_MC2022_NANO130X_v2.root",
},
"jetveto": {"Run2022CD jetvetomap": "Winter22Run3_RunCD_v1.histo.root"},
"jetveto": {"Run2022CD jetvetomap": "Summer22_23Sep2023_RunCD_v1.root"},
},
"Summer22EE": {
"lumiMask": "Cert_Collisions2022_355100_362760_Golden.json",
Expand All @@ -80,7 +80,7 @@
"ele_Reco_med 2022Re-recoE+PromptFG Electron-ID-SF": "Reco20to75",
"ele_Reco_high 2022Re-recoE+PromptFG Electron-ID-SF": "RecoAbove75",
},
"jetveto": {"Run2022E jetvetomap_eep": "Winter22Run3_RunE_v1.histo.root"},
"jetveto": {"Run2022E jetvetomap_eep": "Summer22EE_23Sep2023_RunEFG_v1.root"},
# use for BTA production, jet probablity
"JPCalib": {
"Run2022E": "calibeHistoWrite_Data2022F_NANO130X_v1.root",
Expand Down
6 changes: 4 additions & 2 deletions src/BTVNanoCommissioning/utils/correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,11 @@ def JME_shifts(
if k in events.metadata["dataset"]
]
if len(jecname) > 1:
raise ("Multiple uncertainties match to this era")
raise ValueError("Multiple uncertainties match to this era")
elif len(jecname) == 0:
raise ("no uncertainty match to this era")
raise ValueError(
"Available JEC variations in this era are not compatible with this file. Did you choose the correct dataset-era combination?"
)
else:
jecname = jecname[0] + "_DATA"
else:
Expand Down

0 comments on commit 1725016

Please sign in to comment.