ATLAS Offline Software
Functions | Variables
BJetTriggerByYearContent Namespace Reference

Functions

def getDataYear (flags)
 
def getBJetTriggerContent (flags)
 

Variables

 msg = logging.getLogger('BJetTriggerByYearContent')
 

Function Documentation

◆ getBJetTriggerContent()

def BJetTriggerByYearContent.getBJetTriggerContent (   flags)

Definition at line 27 of file BJetTriggerByYearContent.py.

27 def getBJetTriggerContent(flags):
28  if flags.Trigger.EDMVersion == 2:
29  triggerContent = [
30  "HLT_xAOD__BTaggingContainer_HLTBjetFex",
31  "HLT_xAOD__BTaggingContainer_HLTBjetFexAux.MV2c00_discriminant.MV2c10_discriminant.MV2c20_discriminant",
32  ]
33  jetCollections = {
34  2016: [
35  # Jet collections needed for HLT jet matching
36  "HLT_xAOD__JetContainer_a4tcemsubjesFS",
37  "HLT_xAOD__JetContainer_a4tcemsubjesFSAux.pt.eta.phi.m",
38  # B-jet collections needed for HLT jet matching
39  "HLT_xAOD__JetContainer_EFJet", # 2015
40  "HLT_xAOD__JetContainer_EFJetAux.pt.eta.phi.m",
41  "HLT_xAOD__JetContainer_SplitJet",
42  "HLT_xAOD__JetContainer_SplitJetAux.pt.eta.phi.m",
43  ],
44  2017: [
45  # Jet collections needed for HLT jet matching
46  "HLT_xAOD__JetContainer_a4tcemsubjesISFS",
47  "HLT_xAOD__JetContainer_a4tcemsubjesISFSAux.pt.eta.phi.m",
48  # B-jet collections needed for HLT jet matching
49  "HLT_xAOD__JetContainer_SplitJet", # Mainly for low-pt 2b2j in 2018
50  "HLT_xAOD__JetContainer_SplitJetAux.pt.eta.phi.m",
51  "HLT_xAOD__JetContainer_GSCJet",
52  "HLT_xAOD__JetContainer_GSCJetAux.pt.eta.phi.m",
53  ],
54  }
55  jetCollections[2015] = jetCollections[2016]
56  jetCollections[2018] = jetCollections[2017]
57 
58  year = getDataYear(flags)
59  msg.debug(f'Configured b-jet trigger content for {year}')
60 
61  triggerContent += jetCollections[year]
62  return triggerContent
63  elif flags.Trigger.EDMVersion >= 3: # NOTE: Currently re-using the Run 3 EDM for Run 4.
64  triggerContent = [
65  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJets",
66  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJetsAux.pt.eta.phi.m",
67  "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTagging",
68  ]
69 
70  year = getDataYear(flags)
71  msg.debug(f'Configured b-jet trigger content for {year}')
72 
73  btagstrs = []
74  btaggers = {
75  2022: ['DL1d20211216'],
76  2023: ['GN120220813'],
77  2024: ['GN220240122'],
78  2030: [], # Some day we'll have something amazing here
79  }[year]
80  for btagger in btaggers:
81  btagstrs.append('.'.join([f'{btagger}_{p}' for p in ['pb','pc','pu']]))
82  btagvars = '.'.join(btagstrs)
83  triggerContent.append(f"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTaggingAux.{btagvars}")
84  return triggerContent
85  elif flags.Trigger.EDMVersion == -1:
86  # Allow for undefined trigger content -- no RDOtoRDOTrigger run
87  msg.debug('Received EDMVersion=-1: no trigger info available. Returning empty b-jet trigger content')
88  return []
89 
90  raise ValueError(f"Unsupported EDM version {flags.Trigger.EDMVersion} determined")

◆ getDataYear()

def BJetTriggerByYearContent.getDataYear (   flags)

Definition at line 8 of file BJetTriggerByYearContent.py.

8 def getDataYear(flags):
9  if flags.Input.isMC:
10  campaign = getMCCampaign(flags.Input.Files)
11  dataYear = {
12  Campaign.MC20a: 2016, # prefer over 2015
13  Campaign.MC20d: 2017,
14  Campaign.MC20e: 2018,
15  Campaign.MC21a: 2022,
16  Campaign.MC23a: 2022,
17  Campaign.MC23c: 2023,
18  Campaign.MC23d: 2023,
19  Campaign.MC23e: 2024,
20  Campaign.PhaseII: 2030,
21  }[campaign]
22  else:
23  dataYear = flags.Input.DataYear
24  return dataYear
25 
26 

Variable Documentation

◆ msg

BJetTriggerByYearContent.msg = logging.getLogger('BJetTriggerByYearContent')

Definition at line 5 of file BJetTriggerByYearContent.py.

BJetTriggerByYearContent.getBJetTriggerContent
def getBJetTriggerContent(flags)
Definition: BJetTriggerByYearContent.py:27
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
BJetTriggerByYearContent.getDataYear
def getDataYear(flags)
Definition: BJetTriggerByYearContent.py:8
python.Utils.getMCCampaign
def getMCCampaign(files)
Definition: Tools/Campaigns/python/Utils.py:27