2 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory
import CompFactory
7 name: str =
"ActsToTrkConverterTool",
8 **kwargs) -> ComponentAccumulator:
12 if flags.Detector.GeometryITk
and 'TrackingGeometryTool' not in kwargs:
13 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometryToolCfg
17 kwargs.setdefault(
"TrackingGeometryTool",
"")
19 if flags.Muon.usePhaseIIGeoSetup:
20 kwargs.setdefault(
"ExtractMuonSurfaces",
True)
22 acc.setPrivateTools(CompFactory.ActsTrk.ActsToTrkConverterTool(name, **kwargs))
28 **kwargs) -> ComponentAccumulator:
31 if 'ConvertorTool' not in kwargs:
34 acc.addEventAlgo(CompFactory.ActsTrk.TrkToActsConvertorAlg(name, **kwargs))
38 name: str =
"ActsToTrkConvertorAlg",
39 **kwargs) -> ComponentAccumulator:
44 kwargs.setdefault(
'ACTSTracksLocation',
'ActsTracks' if not flags.Acts.doAmbiguityResolution
else 'ActsResolvedTracks')
46 if 'TrackingGeometryTool' not in kwargs:
47 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometryToolCfg
50 if 'ATLASConverterTool' not in kwargs:
51 from ActsConfig.ActsEventCnvConfig
import ActsToTrkConverterToolCfg
54 if 'BoundaryCheckTool' not in kwargs:
55 if flags.Detector.GeometryITk:
56 from InDetConfig.InDetBoundaryCheckToolConfig
import ITkBoundaryCheckToolCfg
59 from InDetConfig.InDetBoundaryCheckToolConfig
import InDetBoundaryCheckToolCfg
62 if 'SummaryTool' not in kwargs:
63 from TrkConfig.TrkTrackSummaryToolConfig
import InDetTrackSummaryToolCfg
66 if flags.Acts.doRotCorrection
and 'RotCreatorTool' not in kwargs:
67 if flags.Detector.GeometryITk:
68 from TrkConfig.TrkRIO_OnTrackCreatorConfig
import ITkRotCreatorCfg
69 kwargs.setdefault(
"RotCreatorTool", acc.popToolsAndMerge(
ITkRotCreatorCfg(flags, name=
"ActsRotCreatorTool")))
71 from TrkConfig.TrkRIO_OnTrackCreatorConfig
import InDetRotCreatorCfg
72 kwargs.setdefault(
"RotCreatorTool", acc.popToolsAndMerge(
InDetRotCreatorCfg(flags, name=
"ActsRotCreatorTool")))
74 acc.addEventAlgo(CompFactory.ActsTrk.ActsToTrkConvertorAlg(name, **kwargs))
78 from TrkConfig.TrackCollectionReadConfig
import TrackCollectionReadCfg
79 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
80 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
86 for collection
in track_collections:
90 from TrkEventCnvTools.TrkEventCnvToolsConfig
import TrkEventCnvSuperToolCfg
94 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
99 flags, OutputLevel=1, TrackCollectionKeys=track_collections)
103 from DumpEventDataToJSON.DumpEventDataToJSONConfig
import DumpEventDataToJSONAlgCfg
105 flags, doExtrap=
False, OutputLevel=1,
106 TrackCollectionKeys=track_collections,
107 CscPrepRawDataKey=
"",
109 sTgcPrepRawDataKey=
"",
110 MdtPrepRawDataKey=
"",
111 RpcPrepRawDataKey=
"",
112 TgcPrepRawDataKey=
"",
113 PixelPrepRawDataKey=
"",
114 SctPrepRawDataKey=
"",
115 TrtPrepRawDataKey=
"",
116 CaloCellContainerKey=[
""],
117 CaloClusterContainerKeys=[
""],
118 MuonContainerKeys=[
""],
119 JetContainerKeys=[
""],
120 TrackParticleContainerKeys=[
""],
121 OutputLocation=outputfile,
124 cfg.printConfig(withDetails=
True, summariseProps=
True)
127 if not sc.isSuccess():
129 sys.exit(
"Execution failed")
132 if __name__ ==
"__main__":
135 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
137 args = flags.fillFromArgs()
139 flags.Input.Files = [
140 '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PhaseIIUpgrade/ESD/ATLAS-P2-RUN4-03-00-00/ESD.ttbar_mu0.pool.root']
141 from AthenaConfiguration.TestDefaults
import defaultConditionsTags
142 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN4_MC
143 flags.Scheduler.ShowDataDeps =
True
144 flags.Scheduler.ShowDataFlow =
True
145 flags.Scheduler.CheckDependencies =
True
148 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
150 toggle_geometry=
True, keep_beampipe=
True)