Skip to content

Commit

Permalink
added Gen ZZ or WW indformation to from gen_selection_dict to skimmer…
Browse files Browse the repository at this point in the history
… for extrapolation purposes
  • Loading branch information
andresnava1000 committed Dec 15, 2023
1 parent 2fc4110 commit 974634e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/HHbbVV/processors/bbVVSkimmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ class bbVVSkimmer(processor.ProcessorABC):
"MET_phi",
"nGoodElectrons",
"nGoodMuons",
"genWW",
"genZZ",
]

for shift in jec_shifts:
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 974634e

Please sign in to comment.