3 __doc__ =
"""Tool configuration to instantiate all
4 egammaCaloTools with default configuration"""
6 from AthenaCommon.Logging
import logging
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9 from TrkConfig.AtlasExtrapolatorConfig
import AtlasExtrapolatorCfg
10 from TrackToCalo.TrackToCaloConfig
import EMParticleCaloExtensionToolCfg
15 mlog = logging.getLogger(
'EMExtrapolationTools')
16 mlog.debug(
'Start configuration')
20 if "Extrapolator" not in kwargs:
22 kwargs[
"Extrapolator"] = acc.popToolsAndMerge(extrapAcc)
24 if "CaloExtensionTool" not in kwargs:
25 kwargs[
"CaloExtensionTool"] = acc.popToolsAndMerge(
28 kwargs[
"EnableTRT"] = flags.Detector.GeometryTRT
30 emExtrapolationTools = CompFactory.EMExtrapolationTools(**kwargs)
31 acc.setPrivateTools(emExtrapolationTools)
36 name='GSFRefitterTool',
39 if "FitterTool" not in kwargs:
40 if flags.Acts.useActsGsfInEgamma:
41 from ActsConfig.ActsGaussianSumFitterConfig
import ActsGaussianSumFitterToolCfg
42 kwargs[
"FitterTool"] = acc.popToolsAndMerge(
45 from TrkConfig.TrkGaussianSumFilterConfig
import GaussianSumFitterCfg
46 kwargs[
"FitterTool"] = acc.popToolsAndMerge(
49 tool = CompFactory.egammaTrkRefitterTool(name, **kwargs)
50 acc.setPrivateTools(tool)
55 name='CaloCluster_OnTrackBuilder',
58 if "CaloSurfaceBuilder" not in kwargs:
59 from CaloTrackingGeometry.CaloTrackingGeometryConfig
import (
60 CaloSurfaceBuilderMiddleCfg)
61 kwargs[
"CaloSurfaceBuilder"] = acc.popToolsAndMerge(
63 tool = CompFactory.CaloCluster_OnTrackBuilder(name, **kwargs)
64 acc.setPrivateTools(tool)
68 if __name__ ==
"__main__":
70 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
71 from AthenaConfiguration.ComponentAccumulator
import printProperties
72 from AthenaConfiguration.TestDefaults
import defaultTestFiles
74 flags.Input.Files = defaultTestFiles.RDO_RUN2
80 mlog = logging.getLogger(
"egammaTrackToolsConfigTest")
81 mlog.info(
"Configuring EMExtrapolationTools : ")
86 mlog.info(
"Configuring egammaTrkRefitterTool :")
91 mlog.info(
"Configuring CaloCluster_OnTrackBuilder :")
97 f =
open(
"egtracktools.pkl",
"wb")