Commit c06d40a9 authored by Dennis Noll's avatar Dennis Noll
Browse files

[recipes] tth: new sync - now export all events with selection/categoriesation bits

parent 9f050b22
......@@ -952,10 +952,6 @@ class Processor(common.DNNBase, Base, Histogramer):
# debug_dataset = "DYJetsToLL_M-10to50"
# debug_uuids = ["567332A7-A3B6-F64D-B089-32E53B924B97"]
# Sync with Gourab Saha 07.10.21
# debug_dataset = "TTToSemiLeptonic"
# debug_uuids = ["1A511872-6E69-6945-8499-B2696EC437AD"]
@classmethod
def group_processes(cls, hists, task):
def fakes(cat):
......@@ -1143,14 +1139,19 @@ class SyncSelectionExporter(Base, MCOnly, TreeExporter):
tree_id = "syncTree_hhbb1l"
# debug_dataset = "GluGluToHHTo2B2WToLNu2J_node_SM" # "GluGluToHHTo2B2VLNu2J_node_cHHH1"
# debug_uuids = {"4D72A2BC-B237-FE42-813A-1F4E27F3B76B"}
debug_dataset = "data_F_e"
# Sync with Gourab Saha 22.02.22
debug_dataset = "TTToSemiLeptonic"
debug_uuids = [
"10120317-9F80-2943-933F-4B9C762F28A3.root",
"3AC5E417-8AF7-7440-90C2-EFDE6DE36E0A.root",
"BE40ED42-D84D-D741-9681-6E5263EA0486.root",
]
"1A511872-6E69-6945-8499-B2696EC437AD",
"9EBB05A3-E0F1-944C-929E-FED7F5A88926",
] # year 2016
# debug_dataset = "data_F_e"
# debug_uuids = [
# "10120317-9F80-2943-933F-4B9C762F28A3.root",
# "3AC5E417-8AF7-7440-90C2-EFDE6DE36E0A.root",
# "BE40ED42-D84D-D741-9681-6E5263EA0486.root",
# ]
groups = {
"resolved": "resolved_[12]b",
"incl": "boosted|resolved_[12]b",
......@@ -1194,15 +1195,18 @@ class SyncSelectionExporter(Base, MCOnly, TreeExporter):
)
weights = [
"PDFSet",
"PDFSet_off",
"PDFSet_rel",
"PSWeight_ISR",
"PSWeight_FSR",
"ScaleWeight_Fact",
"ScaleWeight_Renorm",
"ScaleWeight_Mixed",
"ScaleWeight_Envelope",
"gen_weight",
"pileup",
"l1_ecal_prefiring",
"top_pT_reweighting",
"electron_id_loose",
"electron_tth_loose",
"muon_idiso_loose",
......@@ -1254,12 +1258,22 @@ class SyncSelectionExporter(Base, MCOnly, TreeExporter):
tensors["electron"] = ("sync_electrons", 1, common + ("cone_pt", "pdgId", "charge", "mvaTTH"), np.float32, {"groups": ["part"]}) # "gen_matched"
tensors["muon"] = ("sync_muons", 1, common + ("cone_pt", "pdgId", "charge", "mvaTTH"), np.float32, {"groups": ["part"]}) # "gen_matched"
tensors["presel_vbf_jets"] = ("presel_vbf_jets", 2, common, np.float32, {"groups": ["multiclass", "input", "part"]})
if not (self.debug and "data" in self.debug_dataset):
if not ("data" in self.debug_dataset):
tensors["weights"] = ("weights", 0, self.weights, np.float32, {})
tensors["eventnr"] = (None, 0, ["eventnr", "dataset_id"], np.int64, {"groups": ["multiclass", "split"]})
# fmt: on
return tensors
def arrays(self, X):
out = super().arrays(X)
for sel in X["selection"]._names:
selection = X["selection"].require(**{sel: True})
out[f"selection_{sel}"] = selection
return out
def categories(self, select_output):
return {"all": slice(None)}
class FindBadGenJetMatch(BaseProcessor):
debug_dataset = "TTTo2L2Nu"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment