Skip to content
Snippets Groups Projects
Commit 468d19d5 authored by Teng Jian Khoo's avatar Teng Jian Khoo Committed by Walter Lampl
Browse files

Add minimal b-jet trigger matching HLT content to DAOD_PHYS

Add minimal b-jet trigger matching HLT content to DAOD_PHYS
parent c47993fc
No related branches found
No related tags found
20 merge requests!7929324.0-coverity-TrigT1NSWSimTools,!79094Draft: Further menu changes for egamma trigger 2025 (ATR-31076),!79090Draft: Further menu changes for egamma trigger 2025 https://its.cern.ch/jira/browse/ATR-31076,!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!74305Add minimal b-jet trigger matching HLT content to DAOD_PHYS
......@@ -68,7 +68,8 @@ def FullListOfSmartContainers(flags=None):
"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf",
"HLT_IDVertex_FS",
"HLT_IDTrack_FS_FTF",
"HLT_TrigTauRecMerged_MVA"
"HLT_TrigTauRecMerged_MVA",
"HLT_BJetTriggerByYearContent",
]
if flags is not None and flags.Tracking.doPseudoTracking:
......
......@@ -96,6 +96,7 @@ class SlimmingHelper:
self.IncludeTauTriggerContent = False
self.IncludeEtMissTriggerContent = False
self.IncludeBJetTriggerContent = False
self.IncludeBJetTriggerByYearContent = False
self.IncludeBPhysTriggerContent = False
self.IncludeMinBiasTriggerContent = False
self.OverrideJetTriggerContentWithTLAContent = False
......@@ -208,6 +209,10 @@ class SlimmingHelper:
triggerContent = True
self.SmartCollections.append("HLT_xAOD__BTaggingContainer_HLTBjetFex")
if (self.IncludeBJetTriggerByYearContent is True):
triggerContent = True
self.SmartCollections.append("HLT_BJetTriggerByYearContent")
if (self.IncludeBPhysTriggerContent is True):
triggerContent = True
self.SmartCollections.append("HLT_xAOD__TrigBphysContainer_EFBMuMuFex")
......@@ -631,6 +636,9 @@ class SlimmingHelper:
items.extend(JetTriggerContentRun3)
else:
items.extend(JetTriggerContentRun3TLA)
elif collectionName=="HLT_BJetTriggerByYearContent":
from DerivationFrameworkTrigger.BJetTriggerByYearContent import getBJetTriggerContent
items.extend(getBJetTriggerContent(self.flags))
else:
raise RuntimeError("Smart slimming container "+collectionName+" does not exist or does not have a smart slimming list")
......
......@@ -173,6 +173,8 @@ def PHYSCoreCfg(flags, name_tag='PHYS', StreamName='StreamDAOD_PHYS', TriggerLis
PHYSSlimmingHelper.IncludeBJetTriggerContent = False
PHYSSlimmingHelper.IncludeBPhysTriggerContent = False
PHYSSlimmingHelper.IncludeMinBiasTriggerContent = False
# Compact b-jet trigger matching info
PHYSSlimmingHelper.IncludeBJetTriggerByYearContent = True
# Trigger matching
# Run 2
......
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
from Campaigns.Utils import getMCCampaign, Campaign
from PyUtils.Logging import logging
msg = logging.getLogger('BJetTriggerByYearContent')
msg.setLevel(logging.INFO)
def getDataYear(flags):
if flags.Input.isMC:
campaign = getMCCampaign(flags.Input.Files)
dataYear = {
Campaign.MC20a: 2016, # prefer over 2015
Campaign.MC20d: 2017,
Campaign.MC20e: 2018,
Campaign.MC21a: 2022, # prefer over 2015
Campaign.MC23a: 2022, # prefer over 2015
Campaign.MC23d: 2023,
Campaign.MC23e: 2024,
Campaign.PhaseII: 2030,
}[campaign]
else:
dataYear = flags.Input.DataYear
return dataYear
def getBJetTriggerContent(flags):
if flags.Trigger.EDMVersion == 2:
triggerContent = [
"HLT_xAOD__BTaggingContainer_HLTBjetFex",
"HLT_xAOD__BTaggingContainer_HLTBjetFexAux.MV2c00_discriminant.MV2c10_discriminant.MV2c20_discriminant",
]
jetCollections = {
2016: [
# Jet collections needed for HLT jet matching
"HLT_xAOD__JetContainer_a4tcemsubjesFS",
"HLT_xAOD__JetContainer_a4tcemsubjesFSAux.pt.eta.phi.m",
# B-jet collections needed for HLT jet matching
"HLT_xAOD__JetContainer_EFJet", # 2015
"HLT_xAOD__JetContainer_EFJetAux.pt.eta.phi.m",
"HLT_xAOD__JetContainer_SplitJet",
"HLT_xAOD__JetContainer_SplitJetAux.pt.eta.phi.m",
],
2017: [
# Jet collections needed for HLT jet matching
"HLT_xAOD__JetContainer_a4tcemsubjesISFS",
"HLT_xAOD__JetContainer_a4tcemsubjesISFSAux.pt.eta.phi.m",
# B-jet collections needed for HLT jet matching
"HLT_xAOD__JetContainer_SplitJet", # Mainly for low-pt 2b2j in 2018
"HLT_xAOD__JetContainer_SplitJetAux.pt.eta.phi.m",
"HLT_xAOD__JetContainer_GSCJet",
"HLT_xAOD__JetContainer_GSCJetAux.pt.eta.phi.m",
],
}
jetCollections[2015] = jetCollections[2016]
jetCollections[2018] = jetCollections[2017]
year = getDataYear(flags)
msg.debug(f'Configured b-jet trigger content for {year}')
triggerContent += jetCollections[year]
return triggerContent
elif flags.Trigger.EDMVersion == 3:
triggerContent = [
"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJets",
"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJetsAux.pt.eta.phi.m",
"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTagging",
]
year = getDataYear(flags)
msg.debug(f'Configured b-jet trigger content for {year}')
btagstrs = []
btaggers = {
2022: ['DL1d20211216'],
2023: ['GN120220813'],
2024: ['GN220240122'],
2030: [], # Some day we'll have something amazing here
}[year]
for btagger in btaggers:
btagstrs.append('.'.join([f'{btagger}_{p}' for p in ['pb','pc','pu']]))
btagvars = '.'.join(btagstrs)
triggerContent.append(f"HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_BTaggingAux.{btagvars}")
return triggerContent
elif flags.Trigger.EDMVersion == -1:
# Allow for undefined trigger content -- no RDOtoRDOTrigger run
msg.debug('Received EDMVersion=-1: no trigger info available. Returning empty b-jet trigger content')
return []
raise ValueError(f"Unsupported EDM version {flags.Trigger.EDMVersion} determined")
......@@ -29,14 +29,14 @@ references_map = {
"q452": "v21",
"q454": "v31",
# Derivations
"data_PHYS_Run2": "v30",
"data_PHYS_Run2": "v31",
"data_PHYSLITE_Run2": "v17",
"data_PHYS_Run3": "v29",
"data_PHYS_Run3": "v30",
"data_PHYSLITE_Run3": "v17",
"mc_PHYS_Run2": "v40",
"mc_PHYS_Run2": "v41",
"mc_PHYSLITE_Run2": "v19",
"mc_PHYS_Run3": "v40",
"mc_PHYS_Run3": "v41",
"mc_PHYSLITE_Run3": "v21",
"af3_PHYS_Run3": "v21",
"af3_PHYS_Run3": "v22",
"af3_PHYSLITE_Run3": "v22",
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment