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