ATLAS Offline Software
BJetTriggerByYearContent.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 
3 from Campaigns.Utils import getDataYear
4 from PyUtils.Logging import logging
5 msg = logging.getLogger('BJetTriggerByYearContent')
6 msg.setLevel(logging.INFO)
7 
9  if flags.Trigger.EDMVersion == 2:
10  triggerContent = [
11  "HLT_xAOD__BTaggingContainer_HLTBjetFex",
12  "HLT_xAOD__BTaggingContainer_HLTBjetFexAux.MV2c00_discriminant.MV2c10_discriminant.MV2c20_discriminant.BTagBtagToJetAssociator",
13  ]
14  jetCollections = {
15  2016: [
16  # Jet collections needed for HLT jet matching
17  "HLT_xAOD__JetContainer_a4tcemsubjesFS",
18  "HLT_xAOD__JetContainer_a4tcemsubjesFSAux.pt.eta.phi.m",
19  # B-jet collections needed for HLT jet matching
20  "HLT_xAOD__JetContainer_EFJet", # 2015
21  "HLT_xAOD__JetContainer_EFJetAux.pt.eta.phi.m",
22  "HLT_xAOD__JetContainer_SplitJet",
23  "HLT_xAOD__JetContainer_SplitJetAux.pt.eta.phi.m",
24  ],
25  2017: [
26  # Jet collections needed for HLT jet matching
27  "HLT_xAOD__JetContainer_a4tcemsubjesISFS",
28  "HLT_xAOD__JetContainer_a4tcemsubjesISFSAux.pt.eta.phi.m",
29  # B-jet collections needed for HLT jet matching
30  "HLT_xAOD__JetContainer_SplitJet", # For Btag->Split->GSC matching in 2017 and 2018, and low-pt 2b2j in 2018
31  "HLT_xAOD__JetContainer_SplitJetAux.pt.eta.phi.m",
32  "HLT_xAOD__JetContainer_GSCJet",
33  "HLT_xAOD__JetContainer_GSCJetAux.pt.eta.phi.m",
34  ],
35  }
36  jetCollections[2015] = jetCollections[2016]
37  jetCollections[2018] = jetCollections[2017]
38 
39  year = getDataYear(flags)
40  msg.debug(f'Configured b-jet trigger content for {year}')
41 
42  triggerContent += jetCollections[year]
43  return triggerContent
44  elif flags.Trigger.EDMVersion == 3:
45  triggerContent = [
46  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJets",
47  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTagging",
48  ]
49 
50  year = getDataYear(flags)
51  msg.debug(f'Configured Run 3 b-jet trigger content for {year}')
52 
53  btagstrs = []
54  btaggers = {
55  2022: ['DL1d20211216'],
56  2023: ['GN120220813'],
57  2024: ['GN220240122'],
58  2025: ['GN220240122'],
59  2026: ['GN220240122'],
60  }[year]
61  for btagger in btaggers:
62  btagstrs.append('.'.join([f'{btagger}_{p}' for p in ['pb','pc','pu']]))
63  jetstrs = btagstrs + ['pt', 'eta', 'phi', 'm']
64  btagvars = '.'.join(btagstrs)
65  jetvars = '.'.join(jetstrs)
66  triggerContent.append(f"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTaggingAux.{btagvars}")
67  triggerContent.append(f"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJetsAux.{jetvars}")
68  return triggerContent
69 
70  elif flags.Trigger.EDMVersion >= 4:
71  triggerContent = ["HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJets"]
72 
73  year = getDataYear(flags)
74  msg.debug(f'Configured Run 4 b-jet trigger content for {year}')
75 
76  jetstrs = ['pt', 'eta', 'phi', 'm']
77  btaggers = {
78  2030: ['GN220240122'], # Some day we'll have something amazing here
79  }[year]
80  for btagger in btaggers:
81  jetstrs.append('.'.join([f'{btagger}_{p}' for p in ['pb','pc','pu']]))
82  jetvars = '.'.join(jetstrs)
83  triggerContent.append(f"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJetsAux.{jetvars}")
84  return triggerContent
85 
86  elif flags.Trigger.EDMVersion == -1:
87  # Allow for undefined trigger content -- no RDOtoRDOTrigger run
88  msg.debug('Received EDMVersion=-1: no trigger info available. Returning empty b-jet trigger content')
89  return []
90 
91  raise ValueError(f"Unsupported EDM version {flags.Trigger.EDMVersion} determined")
python.Utils.getDataYear
def getDataYear(flags)
Definition: Tools/Campaigns/python/Utils.py:71
BJetTriggerByYearContent.getBJetTriggerContent
def getBJetTriggerContent(flags)
Definition: BJetTriggerByYearContent.py:8
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10