diff --git a/src/egamma_tnp/ntuple_efficiency.py b/src/egamma_tnp/ntuple_efficiency.py index a9e1ccc..3362ce1 100644 --- a/src/egamma_tnp/ntuple_efficiency.py +++ b/src/egamma_tnp/ntuple_efficiency.py @@ -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"] @@ -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"]