From 6cdcc530411eecca6a4c5f89b0bf53bb02a2cbde Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:01:03 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/egamma_tnp/__init__.py | 4 ++-- src/egamma_tnp/ntuple_efficiency.py | 4 ++-- src/egamma_tnp/utils/__init__.py | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/egamma_tnp/__init__.py b/src/egamma_tnp/__init__.py index cdf2d270..97b37df6 100644 --- a/src/egamma_tnp/__init__.py +++ b/src/egamma_tnp/__init__.py @@ -18,13 +18,13 @@ warnings.filterwarnings("ignore", category=FutureWarning, module="coffea.*") __version__ = _version.__version__ __all__ = ( - "binning", "ElectronTagNProbeFromMiniNTuples", "ElectronTagNProbeFromNanoAOD", + "ElectronTagNProbeFromNanoNTuples", "PhotonTagNProbeFromMiniNTuples", "PhotonTagNProbeFromNanoAOD", - "ElectronTagNProbeFromNanoNTuples", "PhotonTagNProbeFromNanoNTuples", + "binning", ) diff --git a/src/egamma_tnp/ntuple_efficiency.py b/src/egamma_tnp/ntuple_efficiency.py index 3362ce12..42b892ba 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 and x != "psWeight"] + 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 and x != "psWeight"] + 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"] diff --git a/src/egamma_tnp/utils/__init__.py b/src/egamma_tnp/utils/__init__.py index 5fc8e43e..1224f138 100644 --- a/src/egamma_tnp/utils/__init__.py +++ b/src/egamma_tnp/utils/__init__.py @@ -20,20 +20,20 @@ ) __all__ = ( - "redirect_files", - "fill_pt_eta_phi_cutncount_histograms", - "fill_pt_eta_phi_mll_histograms", - "fill_nd_cutncount_histograms", - "fill_nd_mll_histograms", + "calculate_photon_SC_eta", + "calculate_photon_SC_eta_numpy", "convert_2d_mll_hists_to_1d_hists", "convert_nd_mll_hists_to_1d_hists", "create_hists_root_file_for_fitter", - "get_ratio_histogram", - "delta_r_SC", "custom_delta_r", - "calculate_photon_SC_eta", - "calculate_photon_SC_eta_numpy", "dask_calculate_photon_SC_eta", + "delta_r_SC", + "fill_nd_cutncount_histograms", + "fill_nd_mll_histograms", + "fill_pt_eta_phi_cutncount_histograms", + "fill_pt_eta_phi_mll_histograms", + "get_ratio_histogram", + "redirect_files", )