Skip to content

Commit

Permalink
Converted btag SFs from coffea.hist to hist
Browse files Browse the repository at this point in the history
  • Loading branch information
bryates committed Feb 19, 2024
1 parent 9cb140f commit 56eda59
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Binary file modified topeft/data/btagSF/UL/btagMCeff_2016.pkl.gz
Binary file not shown.
Binary file modified topeft/data/btagSF/UL/btagMCeff_2016APV.pkl.gz
Binary file not shown.
Binary file modified topeft/data/btagSF/UL/btagMCeff_2017.pkl.gz
Binary file not shown.
Binary file modified topeft/data/btagSF/UL/btagMCeff_2018.pkl.gz
Binary file not shown.
20 changes: 10 additions & 10 deletions topeft/modules/corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,23 +427,23 @@ def GetMCeffFunc(year, wp='medium', flav='b'):
hnum = h.integrate('WP', wp)
hden = h.integrate('WP', 'all')
getnum = lookup_tools.dense_lookup.dense_lookup(
hnum.values(overflow='over')[()],
hnum.values()[()],
[
hnum.axis('pt').edges(),
hnum.axis('abseta').edges(),
hnum.axis('flav').edges()
hnum.axes['pt'].edges,
hnum.axes['abseta'].edges,
hnum.axes['flav'].edges
]
)
getden = lookup_tools.dense_lookup.dense_lookup(
hden.values(overflow='over')[()],
hden.values()[()],
[
hden.axis('pt').edges(),
hnum.axis('abseta').edges(),
hden.axis('flav').edges()
hden.axes['pt'].edges,
hnum.axes['abseta'].edges,
hden.axes['flav'].edges
]
)
values = hnum.values(overflow='over')[()]
edges = [hnum.axis('pt').edges(), hnum.axis('abseta').edges(), hnum.axis('flav').edges()]
values = hnum.values()[()]
edges = [hnum.axes['pt'].edges, hnum.axes['abseta'].edges, hnum.axes['flav'].edges]
fun = lambda pt, abseta, flav: getnum(pt,abseta,flav)/getden(pt,abseta,flav)
return fun

Expand Down

0 comments on commit 56eda59

Please sign in to comment.