3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaCommon.Logging
import logging
9 name="EMBremCollectionBuilder",
11 """ Algorithm to create the GSF collection
12 We need to refit with GSF
13 Create a Track Summary
14 Create the relevant TrackParticles """
18 if "TrackRefitTool" not in kwargs:
19 from egammaTrackTools.egammaTrackToolsConfig
import (
20 egammaTrkRefitterToolCfg)
21 kwargs[
"TrackRefitTool"] = acc.popToolsAndMerge(
24 if "TrackParticleCreatorTool" not in kwargs:
25 from TrkConfig.TrkParticleCreatorConfig
import (
26 GSFBuildInDetParticleCreatorToolCfg)
27 kwargs[
"TrackParticleCreatorTool"] = acc.popToolsAndMerge(
30 if "TrackSlimmingTool" not in kwargs:
31 from TrkConfig.TrkTrackSlimmingToolConfig
import GSFTrackSlimmingToolCfg
36 flags.Detector.EnablePixel
or flags.Detector.EnableITkPixel)
39 flags.Detector.EnableSCT
or flags.Detector.EnableITkStrip)
40 kwargs.setdefault(
"useTRT", flags.Detector.EnableTRT)
41 kwargs.setdefault(
"DoTruth", flags.Input.isMC)
42 kwargs.setdefault(
"slimTrkTracks", flags.Egamma.slimGSFTrkTracks)
43 kwargs.setdefault(
"useHGTD", flags.Reco.EnableHGTDExtension)
46 if flags.Detector.GeometryITk:
47 kwargs.setdefault(
"ExtraInputs", [
48 (
"InDetDD::SiDetectorElementCollection",
49 "ConditionStore+ITkPixelDetectorElementCollection"),
50 (
"InDetDD::SiDetectorElementCollection",
51 "ConditionStore+ITkStripDetectorElementCollection"),
54 kwargs.setdefault(
"ExtraInputs", [
55 (
"InDetDD::SiDetectorElementCollection",
56 "ConditionStore+PixelDetectorElementCollection"),
57 (
"InDetDD::SiDetectorElementCollection",
58 "ConditionStore+SCT_DetectorElementCollection"),
61 alg = CompFactory.EMBremCollectionBuilder(name, **kwargs)
66 if __name__ ==
"__main__":
67 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
68 from AthenaConfiguration.TestDefaults
import defaultTestFiles
69 from AthenaConfiguration.ComponentAccumulator
import printProperties
70 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
72 flags.Input.Files = defaultTestFiles.RDO_RUN2
76 mlog = logging.getLogger(
"EMBremCollectionBuilderConfigTest")
77 mlog.info(
"Configuring EMBremCollectionBuilder: ")
79 acc.getEventAlgo(
"EMBremCollectionBuilder"),
82 with open(
"embremcollectionbuilder.pkl",
"wb")
as f: