4 Instantiate the InDetForwardTrackParticles Thinning
7 from AthenaCommon.Logging
import logging
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
13 mlog = logging.getLogger(name)
14 mlog.info(
"Starting InDetForwardTrackParticles Thinning configuration")
17 if ((
"xAOD::TrackParticleContainer#InDetForwardTrackParticles"
18 not in flags.Input.TypedCollections)
and
19 not flags.Tracking.doForwardTracks):
20 mlog.info(
"Not attempting to thin InDetForwardTrackParticles, because the container InDetForwardTrackParticles does not seem to be available")
23 if not flags.Reco.EnableCombinedMuon:
24 mlog.info(
"Combined muon reconstruction is disabled so all InDetForwardTrackParticles will be thinned")
25 kwargs.setdefault(
"MuonsKey",
"")
27 kwargs.setdefault(
"StreamName",
"StreamAOD")
28 acc.addEventAlgo(CompFactory.ThinInDetForwardTrackParticlesAlg(name, **kwargs))
29 mlog.info(
"InDetForwardTrackParticles Thinning configured")
32 if __name__ ==
"__main__":
33 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
34 from AthenaConfiguration.TestDefaults
import defaultTestFiles
35 from AthenaConfiguration.ComponentAccumulator
import printProperties
36 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
38 flags.Input.Files = defaultTestFiles.RDO_RUN2
39 flags.Output.doWriteAOD =
True
43 mlog = logging.getLogger(
"ThinInDetForwardTrackParticlesConfigTest")
46 acc.getEventAlgo(
"ThinInDetForwardTrackParticlesAlg"),
51 with open(
"thinindetforwardtrackparticlescfg.pkl",
"wb")
as f: