# If a) Site is UCSD or Caltech and any MINI or MINISIM OR b) Site==Wisconsin and only MINI data OR c) Site==MIT and only a subset of MINI
match_expr:>-
match_expr:>-
(glidein["attrs"].get("GLIDEIN_Country") in job["DESIRED_Overflow_Region"].split(",")) and ( glidein["attrs"].get("GLIDEIN_CMSSite") not in ["T2_US_Wisconsin", "T2_US_MIT"] or "MINIAODSIM" not in job["DESIRED_CMSDataset"])
(glidein["attrs"].get("GLIDEIN_CMSSite") in ["T2_US_UCSD", "T2_US_Caltech"] ) or ( glidein["attrs"].get("GLIDEIN_CMSSite") in ["T2_US_Wisconsin"] and "MINIAODSIM" not in job["DESIRED_CMSDataset"] ) or ( glidein["attrs"].get("GLIDEIN_CMSSite") in ["T2_US_MIT"] and ( "UL2016" in job["DESIRED_CMSDataset"] or "UL2017" in job["DESIRED_CMSDataset"]))
# Same idea, UCSD and Caltech can get jobs looking for specific MINIAOD and MINIAODSIM whilst Wisconsin can only get jobs looking for MINIAOD.
# Same idea, UCSD and Caltech can get jobs looking for any MINIAOD and MINIAODSIM, Wisconsin can only get jobs looking for MINIAOD and MIT only gets jobs looking for a subset of MINIAOD