15 from AthenaCommon.Logging
import logging
16 log = logging.getLogger(
'BStoRDO')
17 log.info(
'****************** STARTING BStoRDO *****************')
19 log.info(
'**** Transformation run arguments')
20 log.info(
str(runArgs))
22 log.info(
'**** Setting-up configuration flags')
23 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
28 flags.Common.ProductionStep = ProductionStep.MinbiasPreprocessing
30 flags.Reco.EnableHI =
True
31 flags.Reco.HIMode = HIMode.HI
32 flags.Tracking.doCaloSeededAmbi =
False
33 flags.Tracking.doCaloSeededBrem =
False
36 flags.Overlay.DataOverlay =
True
37 flags.Overlay.ByteStream =
True
40 if hasattr(runArgs,
'inputBSFile'):
41 flags.Input.Files = runArgs.inputBSFile
43 raise ValueError(
'No input BS file defined')
45 if hasattr(runArgs,
'outputRDO_BKGFile'):
46 flags.Output.RDOFileName = runArgs.outputRDO_BKGFile
48 raise RuntimeError(
'No output RDO file defined')
51 if hasattr(runArgs,
'detectors'):
52 detectors = runArgs.detectors
57 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
61 from PerfMonComps.PerfMonConfigHelpers
import setPerfmonFlagsFromRunArgs
79 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
82 from EventBookkeeperTools.EventBookkeeperToolsConfig
import CutFlowSvcCfg
85 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
88 from LumiBlockComps.LumiBlockMuWriterConfig
import LumiBlockMuWriterCfg
91 if flags.Detector.EnableBCM:
92 from InDetOverlay.BCMOverlayConfig
import BCMRawDataProviderAlgCfg
94 itemList.append(f
'BCM_RDO_Container#{flags.Overlay.BkgPrefix}BCM_RDOs')
96 if flags.Detector.EnablePixel:
97 from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConfig
import PixelRawDataProviderAlgCfg
99 itemList.append(f
'PixelRDO_Container#{flags.Overlay.BkgPrefix}PixelRDOs')
100 itemList.append(
'IDCInDetBSErrContainer#PixelByteStreamErrs')
102 if flags.Detector.EnableSCT:
103 from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConfig
import SCTRawDataProviderCfg, SCTEventFlagWriterCfg
106 itemList.append(f
'SCT_RDO_Container#{flags.Overlay.BkgPrefix}SCT_RDOs')
107 itemList.append(
'IDCInDetBSErrContainer#SCT_ByteStreamErrs')
109 if flags.Detector.EnableTRT:
110 from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConfig
import TRTRawDataProviderCfg
112 itemList.append(f
'TRT_RDO_Container#{flags.Overlay.BkgPrefix}TRT_RDOs')
113 itemList.append(
'TRT_BSErrContainer#TRT_ByteStreamErrs')
115 if flags.Detector.EnableLAr:
116 from LArByteStream.LArRawDataReadingConfig
import LArRawDataReadingCfg
118 itemList.append(f
'LArDigitContainer#{flags.Overlay.BkgPrefix}LArDigitContainer_data')
119 itemList.append(
'LArFebHeaderContainer#LArFebHeader')
121 if flags.Detector.EnableTile:
122 from TileByteStream.TileByteStreamConfig
import TileRawDataReadingCfg
124 itemList.append(f
'TileRawChannelContainer#{flags.Overlay.BkgPrefix}TileRawChannelCnt')
125 itemList.append(f
'TileDigitsContainer#{flags.Overlay.BkgPrefix}TileDigitsCnt')
127 if flags.Detector.EnableCSC:
128 from MuonConfig.MuonBytestreamDecodeConfig
import CscBytestreamDecodeCfg
130 itemList.append(f
'CscRawDataContainer#{flags.Overlay.BkgPrefix}CSCRDO')
132 if flags.Detector.EnableMDT:
133 from MuonConfig.MuonBytestreamDecodeConfig
import MdtBytestreamDecodeCfg
135 itemList.append(f
'MdtCsmContainer#{flags.Overlay.BkgPrefix}MDTCSM')
137 if flags.Detector.EnableRPC:
138 from MuonConfig.MuonBytestreamDecodeConfig
import RpcBytestreamDecodeCfg
140 itemList.append(f
'RpcPadContainer#{flags.Overlay.BkgPrefix}RPCPAD')
142 if flags.Detector.EnableTGC:
143 from MuonConfig.MuonBytestreamDecodeConfig
import TgcBytestreamDecodeCfg
145 itemList.append(f
'TgcRdoContainer#{flags.Overlay.BkgPrefix}TGCRDO')
147 if flags.Detector.EnablesTGC:
148 from MuonConfig.MuonBytestreamDecodeConfig
import sTgcBytestreamDecodeCfg
150 itemList.append(f
'Muon::STGC_RawDataContainer#{flags.Overlay.BkgPrefix}sTGCRDO')
152 if flags.Detector.EnableMM:
153 from MuonConfig.MuonBytestreamDecodeConfig
import MmBytestreamDecodeCfg
155 itemList.append(f
'Muon::MM_RawDataContainer#{flags.Overlay.BkgPrefix}MMRDO')
157 if flags.Reco.EnableTracking:
158 from InDetConfig.TrackRecoConfig
import InDetTrackRecoCfg
160 itemList.append(f
'xAOD::VertexContainer#{flags.Overlay.BkgPrefix}PrimaryVertices')
161 itemList.append(f
'xAOD::VertexAuxContainer#{flags.Overlay.BkgPrefix}PrimaryVerticesAux.x.y.z')
163 from OverlayUtilities.OverlayUtilitiesConfig
import OverlayVertexSkimmingAlgCfg
165 acceptAlgs.append(
'OverlayVertexSkimmingAlg')
167 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
168 cfg.merge(
OutputStreamCfg(flags,
'RDO', itemList, AcceptAlgs=acceptAlgs))
170 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
172 createMetadata=[MetadataCategory.IOVMetaData,
173 MetadataCategory.CutFlowMetaData]))
182 from PyUtils.AMITagHelperConfig
import AMITagCfg
187 sys.exit(
not sc.isSuccess())