From 90a69f61a120f4b5559ee053ace42bcb9662f4dd Mon Sep 17 00:00:00 2001 From: Licheng Zhang Date: Thu, 24 Oct 2024 15:58:02 +0200 Subject: [PATCH 1/2] update data selection --- cfg_VHcc_WLNu.py | 4 +++- cfg_VHcc_ZLL.py | 4 +++- cfg_VHcc_ZNuNu.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cfg_VHcc_WLNu.py b/cfg_VHcc_WLNu.py index 4669381..0e2c6bf 100644 --- a/cfg_VHcc_WLNu.py +++ b/cfg_VHcc_WLNu.py @@ -1,6 +1,7 @@ from pocket_coffea.utils.configurator import Configurator from pocket_coffea.lib.cut_definition import Cut from pocket_coffea.lib.cut_functions import get_nObj_min, get_HLTsel +from pocket_coffea.lib.cut_functions import get_nPVgood, goldenJson, eventFlags from pocket_coffea.parameters.cuts import passthrough from pocket_coffea.parameters.histograms import * import workflow_VHcc @@ -119,7 +120,8 @@ workflow = VHccBaseProcessor, skim = [get_HLTsel(primaryDatasets=["SingleMuon","SingleEle"]), - get_nObj_min(3, 20., "Jet")], # in default jet collection there are leptons. So we ask for 1lep+2jets=3Jet objects + get_nObj_min(3, 20., "Jet"), + get_nPVgood(1), eventFlags, goldenJson], # in default jet collection there are leptons. So we ask for 1lep+2jets=3Jet objects #preselections = [onelep_plus_met], preselections = [lep_met_2jets], diff --git a/cfg_VHcc_ZLL.py b/cfg_VHcc_ZLL.py index ceb4f86..ce0798e 100644 --- a/cfg_VHcc_ZLL.py +++ b/cfg_VHcc_ZLL.py @@ -1,6 +1,7 @@ from pocket_coffea.utils.configurator import Configurator from pocket_coffea.lib.cut_definition import Cut from pocket_coffea.lib.cut_functions import get_nObj_min, get_HLTsel +from pocket_coffea.lib.cut_functions import get_nPVgood, goldenJson, eventFlags from pocket_coffea.parameters.cuts import passthrough from pocket_coffea.parameters.histograms import * from pocket_coffea.lib.weights.common.common import common_weights @@ -115,7 +116,8 @@ #skim = [get_HLTsel(primaryDatasets=["SingleMuon","SingleEle"]), skim = [get_HLTsel(primaryDatasets=["DoubleMuon","DoubleEle"]), - get_nObj_min(4, 18., "Jet")], + get_nObj_min(4, 18., "Jet"), + get_nPVgood(1), eventFlags, goldenJson], preselections = [ll_2j], categories = { diff --git a/cfg_VHcc_ZNuNu.py b/cfg_VHcc_ZNuNu.py index a08ace5..8618f72 100644 --- a/cfg_VHcc_ZNuNu.py +++ b/cfg_VHcc_ZNuNu.py @@ -1,6 +1,7 @@ from pocket_coffea.utils.configurator import Configurator from pocket_coffea.lib.cut_definition import Cut from pocket_coffea.lib.cut_functions import get_nObj_min, get_HLTsel +from pocket_coffea.lib.cut_functions import get_nPVgood, goldenJson, eventFlags from pocket_coffea.parameters.cuts import passthrough from pocket_coffea.parameters.histograms import * import workflow_VHcc @@ -116,7 +117,8 @@ workflow = VHccBaseProcessor, skim = [get_HLTsel(primaryDatasets=["MET"]), - get_nObj_min(2, 32., "Jet")], + get_nObj_min(2, 32., "Jet"), + get_nPVgood(1), eventFlags, goldenJson], preselections = [met_2jets_0lep], From 4d9cc12f77a94b49b2ccd8552c4b5e5ba099b731 Mon Sep 17 00:00:00 2001 From: Licheng Zhang Date: Thu, 24 Oct 2024 16:16:28 +0200 Subject: [PATCH 2/2] clean unused functions from CommonSelectors --- CommonSelectors.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CommonSelectors.py b/CommonSelectors.py index 4cda58e..a0ac4b1 100644 --- a/CommonSelectors.py +++ b/CommonSelectors.py @@ -1,11 +1,6 @@ import awkward as ak from pocket_coffea.lib.cut_definition import Cut -def CvsLsorted(jets, ctag): - # This returns Jets sorted by CvL score (or other tagger defined in params/ctagging.yaml ) - return jets[ak.argsort(jets[ctag["tagger"]], axis=1, ascending=False)] - - def diLepton(events, params, year, sample, **kwargs): # Masks for same-flavor (SF) and opposite-sign (OS)