7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.Enums
import MetadataCategory
12 """Configure the example muon CP tool"""
14 mst = CompFactory.CP.MuonSelectionTool(name =
'TEST5MuonSelectionTool',
15 TurnOffMomCorr =
True,
16 AllowSettingGeometryOnTheFly =
True)
17 acc.addPublicTool(mst, primary=
True)
18 acc.addPublicTool(CompFactory.DerivationFramework.AsgSelectionToolWrapper(name =
"TEST5MuonToolWrapper",
19 AsgSelectionTool = mst,
21 StoreGateEntryName =
"TEST5GoodMuons",
22 ContainerName =
"Muons"),
28 """Configure the example augmentation tool"""
30 acc.addPublicTool(CompFactory.DerivationFramework.AugmentationToolExample(name =
"TEST5AugmentationTool"),
36 """Configure the derivation framework driving algorithm (kernel)"""
40 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
41 acc.addEventAlgo(
DerivationKernel(name, AugmentationTools = [augmentationTool,cpTool]))
48 acc.merge(
TEST5KernelCfg(flags, name=
"TEST5Kernel",StreamName =
"OutputStreamDAOD_TEST5"))
50 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
51 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
52 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
53 TEST5SlimmingHelper =
SlimmingHelper(
"TEST5SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
54 TEST5SlimmingHelper.SmartCollections = [
"EventInfo",
"InDetTrackParticles",
"PrimaryVertices",
"Muons"]
55 TEST5SlimmingHelper.ExtraVariables += [
"InDetTrackParticles.DFDecoratorExample"]
56 TEST5SlimmingHelper.ExtraVariables += [
"Muons.TEST5GoodMuons"]
57 TEST5SlimmingHelper.StaticContent += [
"std::vector<float>#DFAugmentationExample"]
58 TEST5ItemList = TEST5SlimmingHelper.GetItemList()
59 acc.merge(
OutputStreamCfg(flags,
"DAOD_TEST5", ItemList=TEST5ItemList, AcceptAlgs=[
"TEST5Kernel"]))
60 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_TEST5", AcceptAlgs=[
"TEST5Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))