3""" Configuration for EMClusterTool """
5from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory
import CompFactory
8from AthenaCommon.Logging
import logging
10from egammaMVACalib.egammaMVACalibConfig
import egammaMVASvcCfg
15 mlog = logging.getLogger(name)
16 mlog.debug(
'Start configuration')
18 acc = ComponentAccumulator()
20 if "MVACalibSvc" not in kwargs:
21 mvacal = egammaMVASvcCfg(flags)
22 kwargs[
"MVACalibSvc"] = acc.getPrimaryAndMerge(mvacal)
23 kwargs.setdefault(
"OutputClusterContainerName",
24 flags.Egamma.Keys.Output.CaloClusters)
26 tool = CompFactory.EMClusterTool(name, **kwargs)
28 acc.setPrivateTools(tool)
32if __name__ ==
"__main__":
34 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
35 from AthenaConfiguration.ComponentAccumulator
import printProperties
36 from AthenaConfiguration.TestDefaults
import defaultTestFiles
37 flags = initConfigFlags()
38 flags.Input.Files = defaultTestFiles.RDO_RUN2
43 cfg = ComponentAccumulator()
44 mlog = logging.getLogger(
"EMClusterToolConfigTest")
45 mlog.info(
"Configuring EMClusterTool: ")
46 printProperties(mlog, cfg.popToolsAndMerge(
51 f = open(
"emclustertool.pkl",
"wb")