3 """ Instantiate the two supercluster builders with default configuration
6 from AthenaCommon.Logging
import logging
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
10 from egammaTools.EMClusterToolConfig
import EMClusterToolCfg
11 from egammaTools.EMShowerBuilderConfig
import EMShowerBuilderCfg
12 from egammaTools.egammaOQFlagsBuilderConfig
import egammaOQFlagsBuilderCfg
13 from egammaTools.EMPIDBuilderConfig
import (
14 EMPIDBuilderElectronCfg, EMPIDBuilderPhotonCfg)
21 seqkw = {
'sequence': sequenceName}
if sequenceName
else {}
22 acc = ComponentAccumulator (**seqkw)
24 if "EMClusterTool" not in kwargs:
26 kwargs[
"EMClusterTool"] = acc.popToolsAndMerge(emclustool)
28 if "EMShowerTool" not in kwargs:
30 kwargs[
"EMShowerTool"] = acc.popToolsAndMerge(emshowerbuilder)
32 if "ObjectQualityTool" not in kwargs
and not flags.Common.isOnline:
34 kwargs[
"ObjectQualityTool"] = acc.popToolsAndMerge(oqtool)
40 "InputElectronRecCollectionName",
41 flags.Egamma.Keys.Internal.ElectronSuperRecs)
43 "InputPhotonRecCollectionName",
44 flags.Egamma.Keys.Internal.PhotonSuperRecs)
47 flags.Egamma.Keys.Output.Electrons)
50 flags.Egamma.Keys.Output.Photons)
53 CompFactory.EGammaAmbiguityTool())
65 topoegAlg = CompFactory.xAODEgammaBuilder(name, **kwargs)
67 acc.addEventAlgo(topoegAlg)
71 if __name__ ==
"__main__":
72 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
73 from AthenaConfiguration.TestDefaults
import defaultTestFiles
74 from AthenaConfiguration.ComponentAccumulator
import printProperties
75 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
77 flags.Input.Files = defaultTestFiles.RDO_RUN2
82 mlog = logging.getLogger(
"xAODEgammaBuilderConfigTest")
83 mlog.info(
"Configuring xAODEgammaBuilder: ")
85 acc.getEventAlgo(
"xAODEgammaBuilder"),
88 with open(
"xaodegammabuilder.pkl",
"wb")
as f: