Skip to content

Commit

Permalink
add HT computation
Browse files Browse the repository at this point in the history
  • Loading branch information
philippgadow committed Jan 27, 2025
1 parent bdb54f4 commit 85a6d23
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hbt/config/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ def add_variables(config: od.Config) -> None:
x_title="Number of HH b-tags",
discrete_x=True,
)
def build_ht(events):
objects = ak.concatenate([events.Electron * 1, events.Muon * 1, events.Tau * 1, events.Jet * 1], axis=1)[:, :]
objects_sum = objects.sum(axis=1)
return objects_sum.pt
build_ht.inputs = ["{Electron,Muon,Tau,Jet}.{pt,eta,phi,mass}"]
add_variable(
config,
name="ht",
expression=partial(build_ht),
aux={"inputs": build_ht.inputs},
binning=[0, 80, 120, 160, 200, 240, 280, 320, 400, 500, 600, 800],
unit="GeV",
x_title="HT",
Expand Down

0 comments on commit 85a6d23

Please sign in to comment.