diff --git a/src/HHbbVV/processors/bbVVSkimmer.py b/src/HHbbVV/processors/bbVVSkimmer.py index e0c4f6df..79f7c06f 100644 --- a/src/HHbbVV/processors/bbVVSkimmer.py +++ b/src/HHbbVV/processors/bbVVSkimmer.py @@ -131,6 +131,8 @@ class bbVVSkimmer(processor.ProcessorABC): "MET_phi", "nGoodElectrons", "nGoodMuons", + "genWW", + "genZZ", ] for shift in jec_shifts: @@ -272,8 +274,18 @@ def process(self, events: ak.Array): vars_dict, (genbb, genq) = gen_selection_dict[d]( events, fatjets, selection, cutflow, gen_weights, P4 ) + print( type(vars_dict),vars_dict.keys() ) + if "GenHiggsChildren" in vars_dict.keys(): # Only HY samples which are WW by default will not have this + data = vars_dict["GenHiggsChildren"] + print(np.any(data == 24, axis=1)) + print(np.any(data == 23, axis=1)) + skimmed_events["genWW"] = np.any(data == 24, axis=1) # true if WW false if ZZ (It must be one of the two.) + skimmed_events["genZZ"] = np.any(data == 23, axis=1) # maybe we can make this one mask since the two are disjoint skimmed_events = {**skimmed_events, **vars_dict} + print('dataset',dataset) + + # FatJet vars ak8FatJetVars = {