ATLAS Offline Software
Functions | Variables
ActsEventCnvConfig Namespace Reference

Functions

ComponentAccumulator ActsToTrkConverterToolCfg (flags, str name="ActsToTrkConverterTool", **kwargs)
 
ComponentAccumulator TrkToActsConvertorAlgCfg (flags, str name="", **kwargs)
 
ComponentAccumulator ActsToTrkConvertorAlgCfg (flags, str name="ActsToTrkConvertorAlg", **kwargs)
 
def RunTrackConversion (flags, track_collections=[], outputfile='dump.json')
 

Variables

 flags
 
 args
 
 Files
 
 GlobalTag
 
 ShowDataDeps
 
 ShowDataFlow
 
 CheckDependencies
 
 None
 
 use_metadata
 
 toggle_geometry
 
 True
 
 keep_beampipe
 

Function Documentation

◆ ActsToTrkConverterToolCfg()

ComponentAccumulator ActsEventCnvConfig.ActsToTrkConverterToolCfg (   flags,
str   name = "ActsToTrkConverterTool",
**  kwargs 
)

Definition at line 6 of file ActsEventCnvConfig.py.

7  name: str = "ActsToTrkConverterTool",
8  **kwargs) -> ComponentAccumulator:
10 
11  # Currently this does not work if we are in a muon-only mode
12  if flags.Detector.GeometryITk and 'TrackingGeometryTool' not in kwargs:
13  from ActsConfig.ActsGeometryConfig import ActsTrackingGeometryToolCfg
14  kwargs.setdefault("TrackingGeometryTool", acc.popToolsAndMerge(ActsTrackingGeometryToolCfg(flags)))
15  else:
16  # Disable TrackingGeometryTool
17  kwargs.setdefault("TrackingGeometryTool", "")
18 
19  if flags.Muon.usePhaseIIGeoSetup:
20  kwargs.setdefault("ExtractMuonSurfaces", True)
21 
22  acc.setPrivateTools(CompFactory.ActsTrk.ActsToTrkConverterTool(name, **kwargs))
23  return acc
24 
25 

◆ ActsToTrkConvertorAlgCfg()

ComponentAccumulator ActsEventCnvConfig.ActsToTrkConvertorAlgCfg (   flags,
str   name = "ActsToTrkConvertorAlg",
**  kwargs 
)

Definition at line 37 of file ActsEventCnvConfig.py.

37 def ActsToTrkConvertorAlgCfg(flags,
38  name: str = "ActsToTrkConvertorAlg",
39  **kwargs) -> ComponentAccumulator:
40  acc = ComponentAccumulator()
41 
42  # convert proper ACTS track collection
43  # this depends on the ambi resol. activation
44  kwargs.setdefault('ACTSTracksLocation', 'ActsTracks' if not flags.Acts.doAmbiguityResolution else 'ActsResolvedTracks')
45 
46  if 'TrackingGeometryTool' not in kwargs:
47  from ActsConfig.ActsGeometryConfig import ActsTrackingGeometryToolCfg
48  kwargs.setdefault("TrackingGeometryTool", acc.popToolsAndMerge(ActsTrackingGeometryToolCfg(flags)))
49 
50  if 'ATLASConverterTool' not in kwargs:
51  from ActsConfig.ActsEventCnvConfig import ActsToTrkConverterToolCfg
52  kwargs.setdefault("ATLASConverterTool", acc.popToolsAndMerge(ActsToTrkConverterToolCfg(flags)))
53 
54  if 'BoundaryCheckTool' not in kwargs:
55  if flags.Detector.GeometryITk:
56  from InDetConfig.InDetBoundaryCheckToolConfig import ITkBoundaryCheckToolCfg
57  kwargs.setdefault("BoundaryCheckTool", acc.popToolsAndMerge(ITkBoundaryCheckToolCfg(flags)))
58  else:
59  from InDetConfig.InDetBoundaryCheckToolConfig import InDetBoundaryCheckToolCfg
60  kwargs.setdefault("BoundaryCheckTool", acc.popToolsAndMerge(InDetBoundaryCheckToolCfg(flags)))
61 
62  if 'SummaryTool' not in kwargs:
63  from TrkConfig.TrkTrackSummaryToolConfig import InDetTrackSummaryToolCfg
64  kwargs.setdefault("SummaryTool", acc.popToolsAndMerge(InDetTrackSummaryToolCfg(flags)))
65 
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")))
70  else:
71  from TrkConfig.TrkRIO_OnTrackCreatorConfig import InDetRotCreatorCfg
72  kwargs.setdefault("RotCreatorTool", acc.popToolsAndMerge(InDetRotCreatorCfg(flags, name="ActsRotCreatorTool")))
73 
74  acc.addEventAlgo(CompFactory.ActsTrk.ActsToTrkConvertorAlg(name, **kwargs))
75  return acc
76 

◆ RunTrackConversion()

def ActsEventCnvConfig.RunTrackConversion (   flags,
  track_collections = [],
  outputfile = 'dump.json' 
)

Definition at line 77 of file ActsEventCnvConfig.py.

77 def RunTrackConversion(flags, track_collections = [], outputfile='dump.json'):
78  from TrkConfig.TrackCollectionReadConfig import TrackCollectionReadCfg
79  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
80  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
81 
82  cfg = MainServicesCfg(flags)
83 
84  # Set up to read ESD and tracks
85  cfg.merge(PoolReadCfg(flags))
86  for collection in track_collections:
87  cfg.merge(TrackCollectionReadCfg(flags, collection))
88 
89  # Needed to read tracks
90  from TrkEventCnvTools.TrkEventCnvToolsConfig import TrkEventCnvSuperToolCfg
91  cfg.merge(TrkEventCnvSuperToolCfg(flags))
92 
93  # Muon geometry not yet in ActsTrackingGeometrySvcCfg
94  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
95  cfg.merge(MuonGeoModelCfg(flags))
96 
97  # Now setup the convertor
99  flags, OutputLevel=1, TrackCollectionKeys=track_collections)
100  cfg.merge(acc)
101 
102  # Let's dump the input tracks, and also the output ACTS tracks
103  from DumpEventDataToJSON.DumpEventDataToJSONConfig import DumpEventDataToJSONAlgCfg
105  flags, doExtrap=False, OutputLevel=1,
106  TrackCollectionKeys=track_collections,
107  CscPrepRawDataKey="",
108  MMPrepRawDataKey="",
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,
122  )
123  cfg.merge(acc)
124  cfg.printConfig(withDetails=True, summariseProps=True)
125 
126  sc = cfg.run()
127  if not sc.isSuccess():
128  import sys
129  sys.exit("Execution failed")
130 
131 

◆ TrkToActsConvertorAlgCfg()

ComponentAccumulator ActsEventCnvConfig.TrkToActsConvertorAlgCfg (   flags,
str   name = "",
**  kwargs 
)

Definition at line 26 of file ActsEventCnvConfig.py.

26 def TrkToActsConvertorAlgCfg(flags,
27  name: str = "",
28  **kwargs) -> ComponentAccumulator:
29  acc = ComponentAccumulator()
30 
31  if 'ConvertorTool' not in kwargs:
32  kwargs.setdefault("ConvertorTool", acc.popToolsAndMerge(ActsToTrkConverterToolCfg(flags)))
33 
34  acc.addEventAlgo(CompFactory.ActsTrk.TrkToActsConvertorAlg(name, **kwargs))
35  return acc
36 

Variable Documentation

◆ args

ActsEventCnvConfig.args

Definition at line 137 of file ActsEventCnvConfig.py.

◆ CheckDependencies

ActsEventCnvConfig.CheckDependencies

Definition at line 145 of file ActsEventCnvConfig.py.

◆ Files

ActsEventCnvConfig.Files

Definition at line 139 of file ActsEventCnvConfig.py.

◆ flags

ActsEventCnvConfig.flags

Definition at line 136 of file ActsEventCnvConfig.py.

◆ GlobalTag

ActsEventCnvConfig.GlobalTag

Definition at line 142 of file ActsEventCnvConfig.py.

◆ keep_beampipe

ActsEventCnvConfig.keep_beampipe

Definition at line 150 of file ActsEventCnvConfig.py.

◆ None

ActsEventCnvConfig.None

Definition at line 149 of file ActsEventCnvConfig.py.

◆ ShowDataDeps

ActsEventCnvConfig.ShowDataDeps

Definition at line 143 of file ActsEventCnvConfig.py.

◆ ShowDataFlow

ActsEventCnvConfig.ShowDataFlow

Definition at line 144 of file ActsEventCnvConfig.py.

◆ toggle_geometry

ActsEventCnvConfig.toggle_geometry

Definition at line 150 of file ActsEventCnvConfig.py.

◆ True

ActsEventCnvConfig.True

Definition at line 150 of file ActsEventCnvConfig.py.

◆ use_metadata

ActsEventCnvConfig.use_metadata

Definition at line 149 of file ActsEventCnvConfig.py.

python.TrkRIO_OnTrackCreatorConfig.ITkRotCreatorCfg
def ITkRotCreatorCfg(flags, name='ITkRotCreator', **kwargs)
Definition: TrkRIO_OnTrackCreatorConfig.py:134
ActsEventCnvConfig.RunTrackConversion
def RunTrackConversion(flags, track_collections=[], outputfile='dump.json')
Definition: ActsEventCnvConfig.py:77
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrkRIO_OnTrackCreatorConfig.InDetRotCreatorCfg
def InDetRotCreatorCfg(flags, name='InDetRotCreator', **kwargs)
Definition: TrkRIO_OnTrackCreatorConfig.py:13
ActsEventCnvConfig.ActsToTrkConverterToolCfg
ComponentAccumulator ActsToTrkConverterToolCfg(flags, str name="ActsToTrkConverterTool", **kwargs)
Definition: ActsEventCnvConfig.py:6
python.InDetBoundaryCheckToolConfig.ITkBoundaryCheckToolCfg
def ITkBoundaryCheckToolCfg(flags, name='ITkBoundaryCheckTool', **kwargs)
Definition: InDetBoundaryCheckToolConfig.py:102
ActsEventCnvConfig.TrkToActsConvertorAlgCfg
ComponentAccumulator TrkToActsConvertorAlgCfg(flags, str name="", **kwargs)
Definition: ActsEventCnvConfig.py:26
python.TrkEventCnvToolsConfig.TrkEventCnvSuperToolCfg
def TrkEventCnvSuperToolCfg(flags, name='EventCnvSuperTool', **kwargs)
Definition: TrkEventCnvToolsConfig.py:51
python.TrkTrackSummaryToolConfig.InDetTrackSummaryToolCfg
def InDetTrackSummaryToolCfg(flags, name='InDetTrackSummaryTool', **kwargs)
Definition: TrkTrackSummaryToolConfig.py:22
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
ActsEventCnvConfig.ActsToTrkConvertorAlgCfg
ComponentAccumulator ActsToTrkConvertorAlgCfg(flags, str name="ActsToTrkConvertorAlg", **kwargs)
Definition: ActsEventCnvConfig.py:37
DumpEventDataToJSONConfig.DumpEventDataToJSONAlgCfg
def DumpEventDataToJSONAlgCfg(flags, doExtrap=False, doACTSEDM=True, **kwargs)
Definition: DumpEventDataToJSONConfig.py:8
ActsGeometryConfig.ActsTrackingGeometryToolCfg
ComponentAccumulator ActsTrackingGeometryToolCfg(flags, str name="ActsTrackingGeometryTool")
Definition: ActsGeometryConfig.py:100
python.InDetBoundaryCheckToolConfig.InDetBoundaryCheckToolCfg
def InDetBoundaryCheckToolCfg(flags, name='InDetBoundarySearchTool', **kwargs)
Definition: InDetBoundaryCheckToolConfig.py:7
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69
python.TrackCollectionReadConfig.TrackCollectionReadCfg
def TrackCollectionReadCfg(flags, key)
Definition: TrackCollectionReadConfig.py:28