Skip to content

Commit

Permalink
Merge pull request #62 from uhh-cms/add_ht
Browse files Browse the repository at this point in the history
add HT variable
  • Loading branch information
riga authored Jan 29, 2025
2 parents f42453a + 6c5dd94 commit 7607666
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion modules/columnflow

0 comments on commit 7607666

Please sign in to comment.