3 from PyJobTransforms.TransformUtils
import processPreExec, processPreInclude, processPostExec, processPostInclude
4 from RecJobTransforms.RecoSteering
import RecoSteering
6 from AthenaCommon.Logging
import logging
7 log = logging.getLogger(
'RAWtoDAOD_TLA')
12 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
14 from PyJobTransforms.CommonRunArgsToFlags
import commonRunArgsToFlags
18 if hasattr(runArgs,
'inputBSFile'):
19 log.warning(
"Enters the inputBSFile if")
20 flags.Input.Files = runArgs.inputBSFile
23 if hasattr(runArgs,
'outputDAOD_TLAFile'):
24 flags.Output.AODFileName = runArgs.outputDAOD_TLAFile
25 log.info(
"---------- Configured DAOD_TLA output")
26 flags.Trigger.AODEDMSet=
'PhysicsTLA'
27 from AthenaConfiguration.DetectorConfigFlags
import allDetectors
28 disabled_detectors = allDetectors
29 elif hasattr(runArgs,
'outputDAOD_TLAFTAGPEBFile'):
30 flags.Output.AODFileName = runArgs.outputDAOD_TLAFTAGPEBFile
31 log.info(
"---------- Configured DAOD_TLAFTAGPEB output")
32 flags.Trigger.AODEDMSet=
'FTagPEBTLA'
33 disabled_detectors = [
35 'LAr',
'Tile',
'MBTS',
36 'CSC',
'MDT',
'RPC',
'TGC',
38 'Lucid',
'ZDC',
'ALFA',
'AFP',
40 elif hasattr(runArgs,
'outputDAOD_TLAEGAMPEBFile'):
41 flags.Output.AODFileName = runArgs.outputDAOD_TLAEGAMPEBFile
42 log.info(
"---------- Configured DAOD_TLAEGAMPEB output")
43 flags.Trigger.AODEDMSet=
'EGamPEBTLA'
44 disabled_detectors = [
46 'CSC',
'MDT',
'RPC',
'TGC',
48 'Lucid',
'ZDC',
'ALFA',
'AFP',
51 from RecJobTransforms.RecoConfigFlags
import recoRunArgsToFlags
55 flags.Trigger.doLVL1=
False
56 flags.Trigger.DecisionMakerValidation.Execute =
False
57 flags.Trigger.doNavigationSlimming =
False
58 flags.Trigger.L1.doCalo=
False
59 flags.Trigger.L1.doCTP=
False
61 from AthenaConfiguration.Enums
import ProductionStep
62 flags.Common.ProductionStep=ProductionStep.Reconstruction
64 from AthenaConfiguration.AutoConfigFlags
import GetFileMD
65 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
66 if GetFileMD(flags.Input.Files)[
"GeoAtlas"]
is None:
67 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
70 from AthenaConfiguration.DetectorConfigFlags
import disableDetectors
72 flags, toggle_geometry=
True,
73 detectors=disabled_detectors,
77 from RecJobTransforms.RecoConfigFlags
import printRecoFlags
81 from PerfMonComps.PerfMonConfigHelpers
import setPerfmonFlagsFromRunArgs
100 log.info(
'****************** STARTING TLA RAW Decoding (RAWtoDAOD_TLA) *****************')
102 log.info(
'**** Transformation run arguments')
103 log.info(
str(runArgs))
106 timeStart = time.time()
109 log.info(
"Configuring according to flag values listed below")
115 cfg.flagPerfmonDomain(
'Trigger')
117 PhToKeep = [
'topoetcone20',
'topoetcone40',
'etcone20']
118 PhVars =
'.'.
join(PhToKeep)
120 additional_output_items = {
124 'xAOD::BTaggingContainer#BTagging_HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_TLA',
125 'xAOD::BTaggingAuxContainer#BTagging_HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_TLAAux.',
129 'xAOD::TrigCompositeContainer#HLT_TCEventInfo_TLA',
130 'xAOD::TrigCompositeAuxContainer#HLT_TCEventInfo_TLAAux.JetDensityEMPFlow.JetDensityEMTopo.AvgMu.NumPV',
131 'xAOD::PhotonContainer#HLT_egamma_Photons_TLA',
132 'xAOD::PhotonAuxContainer#HLT_egamma_Photons_TLAAux.'+PhVars,
133 'xAOD::eFexEMRoIContainer#L1_eEMRoI',
134 'xAOD::eFexEMRoIAuxContainer#L1_eEMRoIAux.thresholdPatterns',
135 'xAOD::CaloClusterContainer#HLT_CaloEMClusters_Photon',
136 'xAOD::CaloClusterTrigAuxContainer#HLT_CaloEMClusters_PhotonAux.'
139 }[flags.Trigger.AODEDMSet]
140 from TLARecoConfig.DAOD_TLA_OutputConfig
import DAOD_TLA_OutputCfg
143 if flags.Trigger.AODEDMSet ==
'FTagPEBTLA':
144 from TLARecoConfig.FTagPEBRecoConfig
import FTagPEBJetTagConfig
148 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
158 if flags.Exec.OutputLevel <= INFO:
163 timeFinal = time.time()
164 log.info(
"Run RAWtoDAOD_TLA_skeleton in %d seconds", timeFinal - timeStart)
167 sys.exit(sc.isFailure())