ATLAS Offline Software
Loading...
Searching...
No Matches
python.BJetTriggerByYearContent Namespace Reference

Functions

 getDecoByTrigName (trigName)
 getBJetTriggerContent (flags)

Variables

 msg = logging.getLogger('BJetTriggerByYearContent')
dict run3_year_tagger_map
dict run3_tagger_deco_map

Function Documentation

◆ getBJetTriggerContent()

getBJetTriggerContent ( flags)

Definition at line 34 of file BJetTriggerByYearContent.py.

34def getBJetTriggerContent(flags):
35 if flags.Trigger.EDMVersion == 2:
36 triggerContent = [
37 "HLT_xAOD__BTaggingContainer_HLTBjetFex",
38 "HLT_xAOD__BTaggingContainer_HLTBjetFexAux.MV2c00_discriminant.MV2c10_discriminant.MV2c20_discriminant.BTagBtagToJetAssociator",
39 ]
40 jetCollections = {
41 2016: [
42 # Jet collections needed for HLT jet matching
43 "HLT_xAOD__JetContainer_a4tcemsubjesFS",
44 "HLT_xAOD__JetContainer_a4tcemsubjesFSAux.pt.eta.phi.m",
45 # B-jet collections needed for HLT jet matching
46 "HLT_xAOD__JetContainer_EFJet", # 2015
47 "HLT_xAOD__JetContainer_EFJetAux.pt.eta.phi.m",
48 "HLT_xAOD__JetContainer_SplitJet",
49 "HLT_xAOD__JetContainer_SplitJetAux.pt.eta.phi.m",
50 ],
51 2017: [
52 # Jet collections needed for HLT jet matching
53 "HLT_xAOD__JetContainer_a4tcemsubjesISFS",
54 "HLT_xAOD__JetContainer_a4tcemsubjesISFSAux.pt.eta.phi.m",
55 # B-jet collections needed for HLT jet matching
56 "HLT_xAOD__JetContainer_SplitJet", # For Btag->Split->GSC matching in 2017 and 2018, and low-pt 2b2j in 2018
57 "HLT_xAOD__JetContainer_SplitJetAux.pt.eta.phi.m",
58 "HLT_xAOD__JetContainer_GSCJet",
59 "HLT_xAOD__JetContainer_GSCJetAux.pt.eta.phi.m",
60 ],
61 }
62 jetCollections[2015] = jetCollections[2016]
63 jetCollections[2018] = jetCollections[2017]
64
65 year = getDataYear(flags)
66 msg.debug(f'Configured b-jet trigger content for {year}')
67
68 triggerContent += jetCollections[year]
69 return triggerContent
70 elif flags.Trigger.EDMVersion >= 3: # currently Run 3 and 4 shares the same code block
71 year = getDataYear(flags)
72 msg.debug(f'Configured Run 3 / Run 4 b-jet trigger content for {year}')
73
74 ftagstrs = []
75 ftaggers = run3_tagger_deco_map.get(run3_year_tagger_map[year])
76 for ftagger in ftaggers:
77 ftagstrs.append('.'.join([f'{ftagger}_{p}' for p in ['pb','pc','pu']]))
78 jetstrs = ftagstrs + ['pt', 'eta', 'phi', 'm']
79 jetvars = '.'.join(jetstrs)
80 triggerContent = [
81 "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJets",
82 f"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJetsAux.{jetvars}",
83 ]
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")

◆ getDecoByTrigName()

getDecoByTrigName ( trigName)

Definition at line 24 of file BJetTriggerByYearContent.py.

24def getDecoByTrigName(trigName):
25 decoration_list = []
26 for tagger, deco in run3_tagger_deco_map.items():
27 if tagger in trigName:
28 decoration_list += deco
29 if len(decoration_list) == 0:
30 raise ValueError(f"Could not find decorations for trigger name {trigName}, avaialable sub-strings: {list(run3_tagger_deco_map.keys())}")
31 # deduplicate
32 return list(set(decoration_list))
33
STL class.

Variable Documentation

◆ msg

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

Definition at line 5 of file BJetTriggerByYearContent.py.

◆ run3_tagger_deco_map

dict python.BJetTriggerByYearContent.run3_tagger_deco_map
Initial value:
= {
"bdl1r": ["DL1r"],
"bdl1d": ["DL1d20211216"],
"bgn1" : ["GN120220813"],
"bgn2" : ["GN220240122"],
}

Definition at line 17 of file BJetTriggerByYearContent.py.

◆ run3_year_tagger_map

dict python.BJetTriggerByYearContent.run3_year_tagger_map
Initial value:
= {
2022: 'bdl1d',
2023: 'bgn1',
2024: 'bgn2',
2025: 'bgn2',
2026: 'bgn2',
2030: 'bgn2', # Some day we'll have something amazing here
}

Definition at line 8 of file BJetTriggerByYearContent.py.