ATLAS Offline Software
Loading...
Searching...
No Matches
TEST4.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2# TEST4.py - derivation framework example demonstrating slimming
3# Note this is the same as TEST1,2,3 but without any tools
4
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory import CompFactory
7from AthenaConfiguration.Enums import MetadataCategory
8
9def TEST4KernelCfg(flags, name='TEST4Kernel', **kwargs):
10 """Configure the derivation framework driving algorithm (kernel)"""
11 acc = ComponentAccumulator()
12 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
13 acc.addEventAlgo(DerivationKernel(name))
14 return acc
15
16
17def TEST4Cfg(flags):
18
19 acc = ComponentAccumulator()
20 acc.merge(TEST4KernelCfg(flags, name="TEST4Kernel"))
21
22 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
23 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
24 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
25 TEST4SlimmingHelper = SlimmingHelper("TEST4SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
26 TEST4SlimmingHelper.SmartCollections = ["EventInfo",
27 "Electrons",
28 "Photons",
29 "Muons",
30 "PrimaryVertices",
31 "InDetTrackParticles",
32 "AntiKt4EMTopoJets",
33 "AntiKt4EMPFlowJets",
34
35 "MET_Baseline_AntiKt4EMTopo",
36 "MET_Baseline_AntiKt4EMPFlow",
37 "TauJets",
38 "DiTauJets",
39 "DiTauJetsLowPt",
40 "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets"]
41 TEST4ItemList = TEST4SlimmingHelper.GetItemList()
42
43 acc.merge(OutputStreamCfg(flags, "DAOD_TEST4", ItemList=TEST4ItemList, AcceptAlgs=["TEST4Kernel"]))
44 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_TEST4", AcceptAlgs=["TEST4Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
45
46 return acc
TEST4KernelCfg(flags, name='TEST4Kernel', **kwargs)
Definition TEST4.py:9
TEST4Cfg(flags)
Definition TEST4.py:17