4 Instantiate the two supercluster
5 builders with default configuration
8 from AthenaCommon.Logging
import logging
9 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
12 from egammaTools.EMClusterToolConfig
import EMClusterToolCfg
13 from egammaTools.EMShowerBuilderConfig
import EMShowerBuilderCfg
14 from egammaTools.egammaOQFlagsBuilderConfig
import egammaOQFlagsBuilderCfg
15 from egammaTools.EMPIDBuilderConfig
import (
16 EMPIDBuilderElectronCfg, EMPIDBuilderPhotonCfg)
23 seqkw = {
'sequence': sequenceName}
if sequenceName
else {}
24 acc = ComponentAccumulator (**seqkw)
26 if "EMClusterTool" not in kwargs:
28 kwargs[
"EMClusterTool"] = acc.popToolsAndMerge(emclustool)
30 if "EMShowerTool" not in kwargs:
32 kwargs[
"EMShowerTool"] = acc.popToolsAndMerge(emshowerbuilder)
34 if "ObjectQualityTool" not in kwargs
and not flags.Common.isOnline:
36 kwargs[
"ObjectQualityTool"] = acc.popToolsAndMerge(oqtool)
42 "InputElectronRecCollectionName",
43 flags.Egamma.Keys.Internal.ElectronSuperRecs)
45 "InputPhotonRecCollectionName",
46 flags.Egamma.Keys.Internal.PhotonSuperRecs)
49 flags.Egamma.Keys.Output.Electrons)
52 flags.Egamma.Keys.Output.Photons)
55 CompFactory.EGammaAmbiguityTool())
67 topoegAlg = CompFactory.xAODEgammaBuilder(name, **kwargs)
69 acc.addEventAlgo(topoegAlg)
73 if __name__ ==
"__main__":
74 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
75 from AthenaConfiguration.TestDefaults
import defaultTestFiles
76 from AthenaConfiguration.ComponentAccumulator
import printProperties
77 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
79 flags.Input.Files = defaultTestFiles.RDO_RUN2
84 mlog = logging.getLogger(
"xAODEgammaBuilderConfigTest")
85 mlog.info(
"Configuring xAODEgammaBuilder: ")
87 acc.getEventAlgo(
"xAODEgammaBuilder"),
90 with open(
"xaodegammabuilder.pkl",
"wb")
as f: