3 """ Instantiate egammaTopoClusterCopier with default configuration
6 from AthenaCommon.Logging
import logging
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
14 kwargs.setdefault(
"InputTopoCollection",
15 flags.Egamma.Keys.Input.TopoClusters)
16 kwargs.setdefault(
"OutputTopoCollection",
17 flags.Egamma.Keys.Internal.EgammaTopoClusters)
19 if flags.Egamma.doForward:
20 kwargs.setdefault(
"OutputFwdTopoCollection",
21 flags.Egamma.Keys.Internal.ForwardTopoClusters)
23 kwargs.setdefault(
"ECut", 700
if not flags.Egamma.doLowMu
else 300)
25 kwargs.setdefault(
'hasITk', flags.Detector.GeometryITk)
28 name = kwargs[
"OutputTopoCollection"]+
'Copier'
30 egcopierAlg = CompFactory.egammaTopoClusterCopier(name, **kwargs)
32 acc.addEventAlgo(egcopierAlg)
38 """Create a copier to be used in tracking.
39 If 'OutputTopoCollection' is the same as used in
40 'egammaTopoClusterCopierCfg', these two functions will produce
41 the same tool that will be de-duplicated later, preventing
42 duplication of the output containers. This will happen in
43 a standard pp reconstruction.
44 If 'OutputTopoCollection' is not the same, two tools will be
45 created, each with a different output container. This will
46 happen in a HI reconstruction."""
49 "InputTopoCollection",
50 flags.Tracking.TopoClusters)
52 "OutputTopoCollection",
53 flags.Tracking.EgammaTopoClusters)
56 name = kwargs[
"OutputTopoCollection"]+
'Copier'
61 if __name__ ==
"__main__":
62 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
63 from AthenaConfiguration.TestDefaults
import defaultTestFiles
64 from AthenaConfiguration.ComponentAccumulator
import printProperties
65 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
67 flags.Input.Files = defaultTestFiles.RDO_RUN2
70 mlog = logging.getLogger(
"egammaTopoClusterCopierConfigTest")
71 mlog.info(
"Configuring egammaTopoClusterCopier: ")
74 acc.getEventAlgo(
"egammaTopoClustersCopier"),
77 with open(
"egammatopoclustercopier.pkl",
"wb")
as f: