3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
10 extrapolationEngine =
""
12 from AtlasGeoModel.GeoModelConfig
import GeoModelCfg
16 from TrkConfig.AtlasExtrapolationEngineConfig
import AtlasExtrapolationEngineCfg
18 extrapolationEngine = extrapAcc.getPrimary()
19 result.merge(extrapAcc)
21 kwargs.setdefault(
'Extrapolator', extrapolationEngine)
23 kwargs.setdefault(
'Extrapolator',
'')
28 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
31 kwargs.setdefault(
'ActsAlignmentKey',
'')
32 kwargs.setdefault(
'TrackContainerKeys', [])
36 if 'StreamDAOD_PHYSLITE' in flags.Input.Collections:
38 kwargs.setdefault(
'JetContainerKeys', [
'AnalysisJets',
'AnalysisLargeRJets'])
40 kwargs.setdefault(
'MuonContainerKeys', [
'AnalysisMuons'])
42 kwargs.setdefault(
'TauJetContainerKeys', [
'AnalysisTauJets'])
44 kwargs.setdefault(
'ElectronContainerKeys', [
'AnalysisElectrons'])
46 kwargs.setdefault(
'PhotonContainerKeys', [
'AnalysisPhotons'])
49 if 'StreamDAOD_PHYS' in flags.Input.Collections
or 'StreamDAOD_PHYSLITE' in flags.Input.Collections:
51 kwargs.setdefault(
'PHYSLITE',
True)
53 kwargs.setdefault(
'CaloClusterContainerKeys', [
'egammaClusters'])
54 kwargs.setdefault(
'CaloCellContainerKey', [])
56 kwargs.setdefault(
'MdtPrepRawDataKey',
'')
57 kwargs.setdefault(
'RpcPrepRawDataKey',
'')
58 kwargs.setdefault(
'TgcPrepRawDataKey',
'')
59 kwargs.setdefault(
'PixelPrepRawDataKey',
'')
60 kwargs.setdefault(
'SctPrepRawDataKey',
'')
61 kwargs.setdefault(
'TrtPrepRawDataKey',
'')
63 kwargs.update( {
'MMPrepRawDataKey':
'',
'CscPrepRawDataKey':
'',
'sTgcPrepRawDataKey':
''} )
65 kwargs.setdefault(
'TrackCollectionKeys', [])
66 kwargs.setdefault(
'TrackContainerKeys', [])
67 kwargs.setdefault(
'TrackParticleContainerKeys', [
'InDetTrackParticles',
'CombinedMuonTrackParticles'])
70 dumpAlg = CompFactory.DumpEventDataToJsonAlg( **kwargs)
71 result.addEventAlgo(dumpAlg)
75 if __name__ ==
"__main__":
78 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
80 parser = flags.getArgumentParser()
81 parser.add_argument(
"-o",
"--output", dest=
"output", default=
'Event.json',
82 help=
"write JSON to FILE", metavar=
"FILE")
83 parser.add_argument(
"--prependCalib", help=
"Prepend a calibration event with some labelled objects at specific eta/phi.",
85 args = parser.parse_args()
87 print(
'Running DumpEventDataToJSON on {} and outputting to {}. Prepend calib event is {}'.
format(
88 args.filesInput, args.output, args.prependCalib))
90 from AthenaCommon.Logging
import log
91 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
92 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
98 args = flags.fillFromArgs(parser = parser)
101 flags.Concurrency.NumThreads = 1
102 flags.Concurrency.NumConcurrentEvents = 1
105 log.debug(
'Lock config flags now.')
111 if flags.Detector.GeometryBpipe:
112 from BeamPipeGeoModel.BeamPipeGMConfig
import BeamPipeGeometryCfg
115 if flags.Detector.GeometryPixel:
116 from PixelGeoModel.PixelGeoModelConfig
import PixelReadoutGeometryCfg
119 if flags.Detector.GeometrySCT:
120 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_ReadoutGeometryCfg
123 if flags.Detector.GeometryTRT:
124 from TRT_GeoModel.TRT_GeoModelConfig
import TRT_ReadoutGeometryCfg
127 if flags.Detector.GeometryITkPixel:
128 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
131 if flags.Detector.GeometryITkStrip:
132 from StripGeoModelXml.ITkStripGeoModelConfig
import ITkStripReadoutGeometryCfg
135 if flags.Detector.GeometryLAr:
136 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
139 if flags.Detector.GeometryTile:
140 from TileGeoModel.TileGMConfig
import TileGMCfg
143 if flags.Detector.GeometryMuon:
144 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
147 from TrkConfig.TrackCollectionReadConfig
import TrackCollectionReadCfg
150 muon_edm_helper_svc = CompFactory.Muon.MuonEDMHelperSvc(
"MuonEDMHelperSvc")
151 cfg.addService(muon_edm_helper_svc)
155 flags, doExtrap=
True, doACTSEDM=
False, OutputLevel=VERBOSE, DumpTestEvent=args.prependCalib, OutputLocation=args.output,
156 CscPrepRawDataKey =
"CSC_Clusters" if flags.Detector.EnableCSC
else "",
157 MMPrepRawDataKey =
"MM_Measurements" if flags.Detector.EnableMM
else "",
158 sTgcPrepRawDataKey =
"STGC_Measurements" if flags.Detector.EnablesTGC
else "",