4 Instantiate egammaRecBuilder with default configuration
7 from AthenaCommon.Logging
import logging
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
10 from egammaTools.EMTrackMatchBuilderConfig
import EMTrackMatchBuilderCfg
11 from egammaTools.EMConversionBuilderConfig
import EMConversionBuilderCfg
16 name='egammaRecBuilder',
20 seqkw = {
'sequence': sequenceName}
if sequenceName
else {}
21 acc = ComponentAccumulator (**seqkw)
23 kwargs.setdefault(
"doTrackMatching", flags.Egamma.doTracking)
24 kwargs.setdefault(
"doConversions", flags.Egamma.doConversionBuilding)
26 if "TrackMatchBuilderTool" not in kwargs:
28 kwargs[
"TrackMatchBuilderTool"] = acc.popToolsAndMerge(emtrkmatch)
30 if "ConversionBuilderTool" not in kwargs:
32 kwargs[
"ConversionBuilderTool"] = acc.popToolsAndMerge(emcnv)
36 flags.Egamma.Keys.Internal.EgammaRecs)
38 "InputClusterContainerName",
39 flags.Egamma.Keys.Internal.EgammaTopoClusters)
41 egrecAlg = CompFactory.egammaRecBuilder(name, **kwargs)
43 acc.addEventAlgo(egrecAlg)
47 if __name__ ==
"__main__":
48 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
49 from AthenaConfiguration.TestDefaults
import defaultTestFiles
50 from AthenaConfiguration.ComponentAccumulator
import printProperties
51 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
53 flags.Input.Files = defaultTestFiles.RDO_RUN2
58 mlog = logging.getLogger(
"egammaRecBuilderConfigTest")
59 mlog.info(
"Configuring egammaRecBuilder: ")
61 acc.getEventAlgo(
"egammaRecBuilder"),
64 with open(
"egammarecbuilder.pkl",
"wb")
as f: