3 __doc__ =
"Instantiate EMTrackMatchBuilder with default configuration"
5 from AthenaCommon.Logging
import logging
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.Enums
import BeamType
9 from egammaTrackTools.egammaTrackToolsConfig
import (
10 EMExtrapolationToolsCfg)
15 mlog = logging.getLogger(name)
16 mlog.debug(
'Start configuration')
20 if "ExtrapolationTool" not in kwargs:
22 kwargs[
"ExtrapolationTool"] = acc.popToolsAndMerge(extrap)
24 if "TrackParticlesName" not in kwargs:
25 kwargs.setdefault(
"TrackParticlesName",
26 flags.Egamma.Keys.Output.GSFTrackParticles)
29 kwargs.setdefault(
"broadDeltaEta", 0.1)
31 kwargs.setdefault(
"broadDeltaPhi", 0.15)
32 kwargs.setdefault(
"useCandidateMatch",
True)
33 kwargs.setdefault(
"useScoring",
True)
34 kwargs.setdefault(
"SecondPassRescale",
True)
35 kwargs.setdefault(
"UseRescaleMetric",
True)
36 kwargs.setdefault(
"isCosmics", flags.Beam.Type
is BeamType.Cosmics)
38 tool = CompFactory.EMTrackMatchBuilder(name, **kwargs)
40 acc.setPrivateTools(tool)
44 if __name__ ==
"__main__":
46 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
47 from AthenaConfiguration.ComponentAccumulator
import printProperties
48 from AthenaConfiguration.TestDefaults
import defaultTestFiles
50 flags.Input.Files = defaultTestFiles.RDO_RUN2
56 mlog = logging.getLogger(
"EMTrackMatchBuilderConfigTest")
57 mlog.info(
"Configuring EMTrackMatchBuilder: ")
63 f =
open(
"emtrackmatchbuilder.pkl",
"wb")