Skip to content

Commit

Permalink
fix : minor fix on path (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ming-Yan authored Sep 22, 2023
1 parent 773f323 commit 41af0e7
Show file tree
Hide file tree
Showing 10 changed files with 745 additions and 107 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ conda activate btv_coffea
Once the environment is set up, compile the python package:
```
pip install -e .
pip install -e .[dev] # for developer
```

### Other installation options for coffea
Expand Down
830 changes: 731 additions & 99 deletions notebooks/BTV_commissiong_tutorial-coffea.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ where = src
[options.extras_require]
dev =
pytest>=6
black>=23.1.0
# docs =
# Sphinx~=3.0
# myst_parser>=0.13
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
1 change: 1 addition & 0 deletions src/BTVNanoCommissioning/data/PU/Summer22Run3/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
2 changes: 1 addition & 1 deletion src/BTVNanoCommissioning/helpers/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def dump_lumi(events, output):
pairs = pairs[
np.lexsort(([pairs[:, i] for i in range(pairs.shape[1] - 1, -1, -1)]))
]
output["fname"] = processor.list_accumulator([events.metadata["filename"]])
output["fname"] = processor.set_accumulator([events.metadata["filename"]])
output["run"] = processor.column_accumulator(pairs[:, 0])
output["lumi"] = processor.column_accumulator(pairs[:, 1])
return output
Expand Down
2 changes: 2 additions & 0 deletions src/BTVNanoCommissioning/utils/AK4_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@
},
"Summer22Run3": {
"lumiMask": "Cert_Collisions2022_355100_362760_Golden.json",
"PU": "puweight_Winter22Run3.histo.root", # use same 69.2mb for Summer22
"JME": "winter_jec_compiled.pkl.gz", # not this is from Winter22Run3 since this is not yet finished
},
"Summer22EERun3": {
"lumiMask": "Cert_Collisions2022_355100_362760_Golden.json",
"PU": "puweight_Summer22EERun3.histo.root", # 80mb
"JME": "jec_compiled.pkl.gz",
},
}
14 changes: 7 additions & 7 deletions src/BTVNanoCommissioning/utils/correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,15 @@ def load_lumi(campaign):
},
}

import matplotlib.pyplot as plt

ext_jetvetomap = extractor()
ext_jetvetomap.add_weight_sets(
[
"RunCD jetvetomap src/BTVNanoCommissioning/data/JME/Winter22Run3/Winter22Run3_RunCD_v1.histo.root",
"RunE jetvetomap src/BTVNanoCommissioning/data/JME/Winter22Run3/Winter22Run3_RunE_v1.histo.root",
]
)
with contextlib.ExitStack() as stack:
ext_jetvetomap.add_weight_sets(
[
f"RunCD jetvetomap {stack.enter_context(importlib.resources.path('BTVNanoCommissioning.data.JME.Winter22Run3','Winter22Run3_RunCD_v1.histo.root'))}",
f"RunE jetvetomap {stack.enter_context(importlib.resources.path('BTVNanoCommissioning.data.JME.Winter22Run3','Winter22Run3_RunE_v1.histo.root'))}",
]
)

ext_jetvetomap.finalize()
jetvetomap = ext_jetvetomap.make_evaluator()
Expand Down

0 comments on commit 41af0e7

Please sign in to comment.