3""" Configuration for EMShowerBuilder """
5from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory
import CompFactory
8from AthenaCommon.Logging
import logging
9from CaloIdentifier
import SUBCALO
14 mlog = logging.getLogger(name)
15 mlog.debug(
'Start configuration')
17 acc = ComponentAccumulator()
18 egammaIso, egammaShowerShape = CompFactory.getComps(
19 "egammaIso",
"egammaShowerShape",)
20 kwargs.setdefault(
"CellsName", flags.Egamma.Keys.Input.CaloCells)
22 "CaloNums", [SUBCALO.LAREM, SUBCALO.LARHEC, SUBCALO.TILE])
24 kwargs.setdefault(
"HadronicLeakageTool",
egammaIso())
26 tool = CompFactory.EMShowerBuilder(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(
"EMShowerBuilderConfigTest")
45 mlog.info(
"Configuring EMShowerBuilder: ")
46 printProperties(mlog, cfg.popToolsAndMerge(
51 f = open(
"emshowerbuilder.pkl",
"wb")
{Tool to estimate the hadronic energy behind the electromagnetic cluster, the
EMShowerBuilderCfg(flags, name='EMShowerBuilder', **kwargs)