3 __doc__ =
"""Instantiate the two supercluster
4 builders with default configuration"""
6 from AthenaCommon.Logging
import logging
7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.Enums
import LHCPeriod
11 from egammaTools.EMTrackMatchBuilderConfig
import EMTrackMatchBuilderCfg
12 from egammaTools.EMConversionBuilderConfig
import EMConversionBuilderCfg
13 from egammaTools.egammaSwToolConfig
import egammaSwToolCfg
14 from egammaMVACalib.egammaMVACalibConfig
import egammaMVASvcCfg
17 name='electronSuperClusterBuilder',
21 mlog = logging.getLogger(name)
22 mlog.debug(
'Start configuration')
24 seqkw = {
'sequence': sequenceName}
if sequenceName
else {}
27 kwargs.setdefault(
"doTrackMatching", flags.Egamma.doTracking)
28 kwargs.setdefault(
"UseExtendedTG3", flags.GeoModel.Run
is LHCPeriod.Run3)
29 kwargs.setdefault(
"EtThresholdCut",
30 1000
if not flags.Egamma.doLowMu
else 300)
32 "ClusterCorrectionTool",
38 "egammaCheckEnergyDepositTool",
39 CompFactory.egammaCheckEnergyDepositTool())
41 "TrackMatchBuilderTool",
44 "InputEgammaRecContainerName",
45 flags.Egamma.Keys.Internal.EgammaRecs)
47 "OutputEgammaRecContainerKey",
48 flags.Egamma.Keys.Internal.ElectronSuperRecs)
50 "SuperClusterCollectionName",
51 flags.Egamma.Keys.Internal.ElectronSuperClusters)
53 acc.addEventAlgo(CompFactory.electronSuperClusterBuilder(name, **kwargs))
59 name='photonSuperClusterBuilder',
63 seqkw = {
'sequence': sequenceName}
if sequenceName
else {}
66 kwargs.setdefault(
"doConversions", flags.Egamma.doConversionBuilding)
67 kwargs.setdefault(
"UseExtendedTG3", flags.GeoModel.Run
is LHCPeriod.Run3)
70 1500
if not flags.Egamma.doLowMu
else 300)
72 "ClusterCorrectionTool",
78 "egammaCheckEnergyDepositTool",
79 CompFactory.egammaCheckEnergyDepositTool())
81 "ConversionBuilderTool",
84 "InputEgammaRecContainerName",
85 flags.Egamma.Keys.Internal.EgammaRecs)
87 "OutputEgammaRecContainerKey",
88 flags.Egamma.Keys.Internal.PhotonSuperRecs)
90 "SuperClusterCollectionName",
91 flags.Egamma.Keys.Internal.PhotonSuperClusters)
93 acc.addEventAlgo(CompFactory.photonSuperClusterBuilder(name, **kwargs))
98 if __name__ ==
"__main__":
99 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
100 from AthenaConfiguration.TestDefaults
import defaultTestFiles
101 from AthenaConfiguration.ComponentAccumulator
import printProperties
102 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
104 flags.Input.Files = defaultTestFiles.RDO_RUN2
108 mlog = logging.getLogger(
"egammaSuperClusterBuilderConfigTest")
109 mlog.info(
"Configuring electronSuperClusterBuilder: ")
111 acc.getEventAlgo(
"electronSuperClusterBuilder"),
115 mlog.info(
"Configuring photonSuperClusterBuilder: ")
117 acc.getEventAlgo(
"photonSuperClusterBuilder"),
121 with open(
"egammasuperclusterbuilder.pkl",
"wb")
as f: