Skip to content

Commit

Permalink
Merge pull request #123 from ikrommyd/fix-weights-adding
Browse files Browse the repository at this point in the history
fix: do not add psWeights
  • Loading branch information
ikrommyd authored Nov 11, 2024
2 parents dfd18de + 642a8ba commit 151fdf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/egamma_tnp/ntuple_efficiency.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def find_probes(self, events, cut_and_count, mass_range, vars):
vars_probes = [v for v in all_probe_events.fields if v.startswith("el_")]
vars = vars_tags + vars_probes

vars = vars + ["event", "run", "lumi"] + [x for x in all_probe_events.fields if "weight" in x or "Weight" in x]
vars = vars + ["event", "run", "lumi"] + [x for x in all_probe_events.fields if "weight" in x or "Weight" in x and x != "psWeight"]

if all_probe_events.metadata.get("isMC"):
vars = [*vars, "truePU"]
Expand Down Expand Up @@ -322,7 +322,7 @@ def find_probes(self, events, cut_and_count, mass_range, vars):
vars_probes = [v for v in all_probe_events.fields if v.startswith("el_")]
vars = vars_tags + vars_probes

vars = vars + ["event", "run", "lumi"] + [x for x in all_probe_events.fields if "weight" in x or "Weight" in x]
vars = vars + ["event", "run", "lumi"] + [x for x in all_probe_events.fields if "weight" in x or "Weight" in x and x != "psWeight"]

if all_probe_events.metadata.get("isMC"):
vars = [*vars, "truePU"]
Expand Down

0 comments on commit 151fdf6

Please sign in to comment.