7from AthenaConfiguration.ComponentFactory
import CompFactory
8from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9from AthenaCommon.SystemOfUnits
import GeV
12 '''Method to configure the ReadTriggerDecision algorithm'''
13 acc = ComponentAccumulator()
17 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig
import (
18 InDetTrackSelectionToolCfg)
19 trackSelectionTool = acc.popToolsAndMerge(InDetTrackSelectionToolCfg(
21 name=
"TestTrackSelectorTool",
27 acc.addEventAlgo(CompFactory.WritexAOD(name=
"WritexAOD",
28 TrackSelectionTool=trackSelectionTool,
29 TrackParticlesKey=
"InDetTrackParticles",
30 NewTrackParticlesKey=
"SelectedTrackParticles"))
34if __name__ ==
"__main__":
36 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
37 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
40 flags = initConfigFlags()
43 from AthenaConfiguration.TestDefaults
import defaultTestFiles
46 flags.Input.Files = defaultTestFiles.AOD_RUN3_MC
49 flags.Exec.MaxEvents = 1000
54 cfg = MainServicesCfg(flags)
55 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
56 cfg.merge(PoolReadCfg(flags))
59 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
60 cfg.merge(OutputStreamCfg(
62 streamName=
"TestStream",
63 ItemList=[
"EventInfo#*",
64 "xAOD::TrackParticleContainer#SelectedTrackParticles"])
69 sys.exit(cfg.run().isFailure())