Skip to content
Snippets Groups Projects
Commit 245988e6 authored by Dylan Rankin's avatar Dylan Rankin
Browse files

adding jetm42

parent 1e00b7d9
No related branches found
No related tags found
2 merge requests!71957Adjusting JETM42 derivation to save full track collection with timing,!71348Creating JETM42 derivation (DADs)
......@@ -116,6 +116,8 @@ from DerivationFrameworkJetEtMiss.JETM11 import JETM11Cfg
from DerivationFrameworkJetEtMiss.JETM12 import JETM12Cfg
# JETM14: MET trigger (single mu selection)
from DerivationFrameworkJetEtMiss.JETM14 import JETM14Cfg
# JETM42: MC only - Upgrade studies format
from DerivationFrameworkJetEtMiss.JETM42 import JETM42Cfg
# Trigger derivations
# TRIG8: ID trigger performance (extra trigger info eg online tracks and RoIs [idperf chain skimming])
......@@ -157,7 +159,7 @@ __all__ = ['TEST1Cfg','TEST2Cfg','TEST3Cfg','TEST4Cfg','TEST5Cfg','TEST6Cfg','TE
'EGAM1Cfg', 'EGAM2Cfg', 'EGAM3Cfg', 'EGAM4Cfg', 'EGAM5Cfg',
'EGAM7Cfg', 'EGAM8Cfg', 'EGAM9Cfg', 'EGAM10Cfg', 'EGAM11Cfg', 'EGAM12Cfg',
'JETM1Cfg','JETM2Cfg','JETM3Cfg','JETM4Cfg','JETM5Cfg','JETM6Cfg','JETM7Cfg',
'JETM10Cfg','JETM11Cfg','JETM12Cfg','JETM14Cfg',
'JETM10Cfg','JETM11Cfg','JETM12Cfg','JETM14Cfg','JETM42Cfg',
'TRIG8Cfg','L1CALO1Cfg',
'MUON1Cfg','MUON5Cfg',
'TLA0Cfg', 'TLA1Cfg',
......
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
#!/usr/bin/env python
#====================================================================
# DAOD_JETM42.py
#====================================================================
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaCommon.Logging import logging
logJETM42 = logging.getLogger('JETM42')
# Main algorithm config
def JETM42KernelCfg(flags, name='JETM42Kernel', **kwargs):
"""Configure the derivation framework driving algorithm (kernel) for JETM42"""
acc = ComponentAccumulator()
from DerivationFrameworkPhys.PHYS import PHYSKernelCfg
acc.merge(PHYSKernelCfg(flags, name, StreamName = kwargs['StreamName'], TriggerListsHelper = kwargs['TriggerListsHelper'], TauJets_EleRM_in_input=kwargs['TauJets_EleRM_in_input']))
from JetRecConfig.JetRecConfig import JetRecCfg, JetInputCfg, getInputAlgs, getConstitPJGAlg
from JetRecConfig.JetConfigFlags import jetInternalFlags
from JetRecConfig.JetInputConfig import buildEventShapeAlg
from JetRecConfig.StandardJetConstits import stdConstitDic as cst, standardReco, stdInputExtDic as inpext
from JetRecConfig.StandardSmallRJets import AntiKt4UFOCSSKNoPtCut
#=======================================
# CHS R = 0.4 422 jets
#=======================================
from JetRecConfig.JetDefinition import JetDefinition, JetInputConstit, JetInputConstitSeq, JetInputExternal
from JetRecConfig.StandardSmallRJets import standardghosts, flavourghosts, calibmods, truthmods, standardmods, clustermods
from ROOT import xAODType
xAODType.ObjectType
inpext["TC422"] = JetInputExternal("CaloTopoClusters422", xAODType.CaloCluster, algoBuilder= standardReco("CaloClusters"))
inpext["TopoTowers"] = JetInputExternal("CaloCalAllTopoTowers", xAODType.CaloCluster, algoBuilder= standardReco("CaloClusters"))
cst["EMTopo422"] = JetInputConstitSeq("EMTopo422", xAODType.CaloCluster, ["EM"],#,"Origin"],
"CaloTopoClusters422", "EMTopoClusters422", jetinputtype="EMTopo",
)
cst["EMTopo422SK"] = JetInputConstitSeq("EMTopo422SK", xAODType.CaloCluster, ["EM","SK"],#"Origin","SK"],
"CaloTopoClusters422", "EMTopoClusters422SK", jetinputtype="EMTopo",
)
cst["TopoTower"] = JetInputConstitSeq("TopoTower", xAODType.CaloCluster, ["EM"],#,"Origin"],
"CaloCalAllTopoTowers", "TopoTowers", jetinputtype="TopoTower",
)
cst["TopoTowerSK"] = JetInputConstitSeq("TopoTowerSK", xAODType.CaloCluster, ["EM","SK"],#"Origin","SK"],
"CaloCalAllTopoTowers", "TopoTowersSK", jetinputtype="TopoTower",
)
algs = getInputAlgs(cst["EMTopo422"], flags=flags)
algs += getInputAlgs(cst["EMTopo422SK"], flags=flags)
algs += getInputAlgs(cst["TopoTower"], flags=flags)
algs += getInputAlgs(cst["TopoTowerSK"], flags=flags)
AntiKt4EMTopo422 = JetDefinition("AntiKt",0.4,cst["EMTopo422"],
ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
#modifiers = calibmods+truthmods+standardmods+clustermods+("Filter_calibThreshold:15000","LArHVCorr",),
modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
lock = True,
)
AntiKt4EMTopo422SK = JetDefinition("AntiKt",0.4,cst["EMTopo422SK"],
ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
#modifiers = calibmods+truthmods+standardmods+clustermods+("Filter_calibThreshold:15000","LArHVCorr",),
modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
lock = True,
)
AntiKt4TopoTowers = JetDefinition("AntiKt",0.4,cst["TopoTower"],
ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
#modifiers = calibmods+truthmods+standardmods+clustermods+("Filter_calibThreshold:15000","LArHVCorr",),
modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
lock = True,
)
AntiKt4TopoTowersSK = JetDefinition("AntiKt",0.4,cst["TopoTowerSK"],
ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
#modifiers = calibmods+truthmods+standardmods+clustermods+("Filter_calibThreshold:15000","LArHVCorr",),
modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
lock = True,
)
jetList = [AntiKt4EMTopo422, AntiKt4EMTopo422SK, AntiKt4TopoTowers, AntiKt4TopoTowersSK]
for jd in jetList:
acc.merge(JetRecCfg(flags,jd))
# augmentation tools
augmentationTools = []
# skimming tools
skimmingTools = []
# thinning tools
thinningTools = []
# Finally the kernel itself
DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
acc.addEventAlgo(DerivationKernel(name, AugmentationTools = augmentationTools, ThinningTools = thinningTools, SkimmingTools = skimmingTools))
return acc
def JETM42CoreCfg(flags, name, StreamName, TriggerListsHelper, TauJets_EleRM_in_input):
acc = ComponentAccumulator()
from DerivationFrameworkPhys.PHYS import PHYSCoreCfg
acc.merge(PHYSCoreCfg(flags, name, StreamName = StreamName, TriggerListsHelper = TriggerListsHelper, TauJets_EleRM_in_input=TauJets_EleRM_in_input))
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
JETM42SlimmingHelper = SlimmingHelper(name+"SlimmingHelper", flags=flags, NamesAndTypes = flags.Input.TypedCollections)
JETM42SlimmingHelper.AllVariables = ["CaloCalTopoClusters", "CaloCalFwdTopoTowers", "CaloTopoClusters422", "CaloCalAllTopoTowers"
]
jetOutputList = ["AntiKt4EMTopo422Jets","AntiKt4EMTopo422SKJets","AntiKt4TopoTowerJets","AntiKt4TopoTowerSKJets"]
from DerivationFrameworkJetEtMiss.JetCommonConfig import addJetsToSlimmingTool
addJetsToSlimmingTool(JETM42SlimmingHelper, jetOutputList, JETM42SlimmingHelper.SmartCollections)
# Output stream
JETM42ItemList = JETM42SlimmingHelper.GetItemList()
acc.merge(OutputStreamCfg(flags, "DAOD_"+name, ItemList=JETM42ItemList, AcceptAlgs=[name+"Kernel"]))
return acc
def JETM42Cfg(flags):
acc = ComponentAccumulator()
# the name_tag has to consistent between KernelCfg and CoreCfg
JETM42_name_tag = 'JETM42'
# Get the lists of triggers needed for trigger matching.
# This is needed at this scope (for the slimming) and further down in the config chain
# for actually configuring the matching, so we create it here and pass it down
# TODO: this should ideally be called higher up to avoid it being run multiple times in a train
from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
JETM42TriggerListsHelper = TriggerListsHelper(flags)
# for AOD produced before 24.0.17, the electron removal tau is not available
TauJets_EleRM_in_input = (flags.Input.TypedCollections.count('xAOD::TauJetContainer#TauJets_EleRM') > 0)
#if TauJets_EleRM_in_input:
# logJETM42.info("TauJets_EleRM is in the input AOD. Relevant containers will be scheduled")
#else:
# logJETM42.info("TauJets_EleRM is Not in the input AOD. No relevant containers will be written")
# Common augmentations
acc.merge(JETM42KernelCfg(flags,
name= JETM42_name_tag + "Kernel",
StreamName = 'StreamDAOD_'+JETM42_name_tag,
TriggerListsHelper = JETM42TriggerListsHelper,
TauJets_EleRM_in_input=TauJets_EleRM_in_input
))
# PHYS content
from DerivationFrameworkPhys.PHYS import PHYSCoreCfg
acc.merge(JETM42CoreCfg(flags,
name=JETM42_name_tag,
StreamName = 'StreamDAOD_'+JETM42_name_tag,
TriggerListsHelper = JETM42TriggerListsHelper,
TauJets_EleRM_in_input=TauJets_EleRM_in_input
))
return acc
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