33 from Campaigns.Utils
import Campaign
34 from AthenaConfiguration.Enums
import Format
35 yearStr =
str(flags.Input.DataYear)
if not flags.Input.isMC
else ""
37 if flags.Input.MCCampaign == Campaign.MC16a
or flags.Input.MCCampaign == Campaign.MC20a:
39 elif flags.Input.MCCampaign == Campaign.MC16d
or flags.Input.MCCampaign == Campaign.MC20d:
41 elif flags.Input.MCCampaign == Campaign.MC16e
or flags.Input.MCCampaign == Campaign.MC20e:
43 elif flags.Input.MCCampaign == Campaign.MC23a
or flags.Input.MCCampaign == Campaign.MC21a:
45 elif flags.Input.MCCampaign == Campaign.MC23c
or flags.Input.MCCampaign == Campaign.MC23d:
47 elif flags.Input.MCCampaign == Campaign.MC23e:
51 "2015":
"TriggerAPISessions/tapis_data15_13TeV_20190708_PHYS_StandardGRL_All_Good_25ns.json",
52 "2016":
"TriggerAPISessions/tapis_data16_13TeV_20190708_PHYS_StandardGRL_All_Good_25ns_WITH_IGNORES.json",
53 "2015_2016":
"TriggerAPISessions/tapis_data15_13TeV_20190708_PHYS_StandardGRL_All_Good_25ns_data16_13TeV_20190708_PHYS_StandardGRL_All_Good_25ns_WITH_IGNORES.json",
54 "2017":
"TriggerAPISessions/tapis_data17_13TeV_20190708_PHYS_StandardGRL_All_Good_25ns_Triggerno17e33prim.json",
55 "2018":
"TriggerAPISessions/tapis_data18_13TeV_20190708_PHYS_StandardGRL_All_Good_25ns_Triggerno17e33prim.json",
56 "2022":
"TriggerAPISessions/tapis_data22_13p6TeV_20230207_PHYS_StandardGRL_All_Good_25ns.json",
57 "2023":
"TriggerAPISessions/tapis_data23_13p6TeV_20230828_PHYS_StandardGRL_All_Good_25ns.json",
58 "2024":
"TriggerAPISessions/tapis_data24_13p6TeV_20241118_PHYS_StandardGRL_All_Good_25ns.json",
61 if yearStr
in session_files:
62 return TriggerAPISession(json=session_files[yearStr])
65 if flags.Input.Format == Format.POOL:
66 return TriggerAPISession(file=flags.Input.Files[0])
68 from AthenaCommon.Logging
import logging
69 logging.getLogger(
'TriggerListHelper::GetTriggerLists::getTapisSession').
error(
'Failed to obtain a session.')