ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkExamples
python
TEST4.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2026 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
5
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
6
from
AthenaConfiguration.ComponentFactory
import
CompFactory
7
from
AthenaConfiguration.Enums
import
MetadataCategory
8
9
def
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
17
def
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
TEST4ItemList = TEST4SlimmingHelper.GetItemList()
41
42
acc.merge(OutputStreamCfg(flags,
"DAOD_TEST4"
, ItemList=TEST4ItemList, AcceptAlgs=[
"TEST4Kernel"
]))
43
acc.merge(SetupMetaDataForStreamCfg(flags,
"DAOD_TEST4"
, AcceptAlgs=[
"TEST4Kernel"
], createMetadata=[MetadataCategory.CutFlowMetaData]))
44
45
return
acc
python.TEST4.TEST4Cfg
TEST4Cfg(flags)
Definition
TEST4.py:17
python.TEST4.TEST4KernelCfg
TEST4KernelCfg(flags, name='TEST4Kernel', **kwargs)
Definition
TEST4.py:9
SlimmingHelper
Definition
getLabel.h:34
Generated on
for ATLAS Offline Software by
1.17.0