ATLAS Offline Software
Functions | Variables
python.RAWtoDAOD_TLA_Skeleton Namespace Reference

Functions

def configureFlags (runArgs)
 
def fromRunArgs (runArgs)
 

Variables

 log = logging.getLogger('RAWtoDAOD_TLA')
 

Function Documentation

◆ configureFlags()

def python.RAWtoDAOD_TLA_Skeleton.configureFlags (   runArgs)

Definition at line 10 of file RAWtoDAOD_TLA_Skeleton.py.

10 def configureFlags(runArgs):
11  # some basic settings here...
12  from AthenaConfiguration.AllConfigFlags import initConfigFlags
13  flags = initConfigFlags()
14  from PyJobTransforms.CommonRunArgsToFlags import commonRunArgsToFlags
15  commonRunArgsToFlags(runArgs, flags)
16 
17  # Input
18  if hasattr(runArgs, 'inputBSFile'):
19  log.warning("Enters the inputBSFile if")
20  flags.Input.Files = runArgs.inputBSFile
21 
22  # Output
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 = [
34  'TRT',
35  'LAr', 'Tile', 'MBTS',
36  'CSC', 'MDT', 'RPC', 'TGC',
37  'sTGC', 'MM',
38  'Lucid', 'ZDC', 'ALFA', 'AFP',
39  ]
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 = [
45  'MBTS',
46  'CSC', 'MDT', 'RPC', 'TGC',
47  'sTGC', 'MM',
48  'Lucid', 'ZDC', 'ALFA', 'AFP',
49  ]
50 
51  from RecJobTransforms.RecoConfigFlags import recoRunArgsToFlags
52  recoRunArgsToFlags(runArgs, flags)
53 
54  # Set non-default flags
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
60 
61  from AthenaConfiguration.Enums import ProductionStep
62  flags.Common.ProductionStep=ProductionStep.Reconstruction
63 
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
68 
69  # Setup detector flags
70  from AthenaConfiguration.DetectorConfigFlags import disableDetectors
72  flags, toggle_geometry=True,
73  detectors=disabled_detectors,
74  )
75 
76  # Print reco domain status
77  from RecJobTransforms.RecoConfigFlags import printRecoFlags
78  printRecoFlags(flags)
79 
80  # Setup perfmon flags from runargs
81  from PerfMonComps.PerfMonConfigHelpers import setPerfmonFlagsFromRunArgs
82  setPerfmonFlagsFromRunArgs(flags, runArgs)
83 
84  # process pre-include/exec
85  processPreInclude(runArgs, flags)
86  processPreExec(runArgs, flags)
87 
88  # To respect --athenaopts
89  flags.fillFromArgs()
90 
91  # Lock flags
92  flags.lock()
93 
94  return flags
95 
96 
97 

◆ fromRunArgs()

def python.RAWtoDAOD_TLA_Skeleton.fromRunArgs (   runArgs)

Definition at line 98 of file RAWtoDAOD_TLA_Skeleton.py.

98 def fromRunArgs(runArgs):
99 
100  log.info('****************** STARTING TLA RAW Decoding (RAWtoDAOD_TLA) *****************')
101 
102  log.info('**** Transformation run arguments')
103  log.info(str(runArgs))
104 
105  import time
106  timeStart = time.time()
107 
108  flags = configureFlags(runArgs)
109  log.info("Configuring according to flag values listed below")
110  flags.dump()
111 
112  cfg = RecoSteering(flags)
113 
114  # import the TLA decoding
115  cfg.flagPerfmonDomain('Trigger')
116 
117  PhToKeep = ['topoetcone20', 'topoetcone40', 'etcone20']
118  PhVars = '.'.join(PhToKeep)
119 
120  additional_output_items = {
121  'PhysicsTLA': [],
122  'FTagPEBTLA':
123  [
124  'xAOD::BTaggingContainer#BTagging_HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_TLA',
125  'xAOD::BTaggingAuxContainer#BTagging_HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_TLAAux.',
126  ],
127  'EGamPEBTLA':
128  [
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.'
137 
138  ],
139  }[flags.Trigger.AODEDMSet]
140  from TLARecoConfig.DAOD_TLA_OutputConfig import DAOD_TLA_OutputCfg
141  cfg.merge( DAOD_TLA_OutputCfg(flags, additional_output_items) )
142 
143  if flags.Trigger.AODEDMSet == 'FTagPEBTLA':
144  from TLARecoConfig.FTagPEBRecoConfig import FTagPEBJetTagConfig
145  cfg.merge(FTagPEBJetTagConfig(flags))
146 
147  # setup Metadata writer
148  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
149  cfg.merge(SetupMetaDataForStreamCfg(flags,'AOD'))
150 
151  # Post-include
152  processPostInclude(runArgs, flags, cfg)
153 
154  # Post-exec
155  processPostExec(runArgs, flags, cfg)
156 
157  from AthenaCommon.Constants import INFO
158  if flags.Exec.OutputLevel <= INFO:
159  cfg.printConfig()
160 
161  # Run the final accumulator
162  sc = cfg.run()
163  timeFinal = time.time()
164  log.info("Run RAWtoDAOD_TLA_skeleton in %d seconds", timeFinal - timeStart)
165 
166  import sys
167  sys.exit(sc.isFailure())

Variable Documentation

◆ log

python.RAWtoDAOD_TLA_Skeleton.log = logging.getLogger('RAWtoDAOD_TLA')

Definition at line 7 of file RAWtoDAOD_TLA_Skeleton.py.

python.RecoSteering.RecoSteering
def RecoSteering(flags)
Definition: RecoSteering.py:6
python.RAWtoDAOD_TLA_Skeleton.configureFlags
def configureFlags(runArgs)
Definition: RAWtoDAOD_TLA_Skeleton.py:10
python.TransformUtils.processPreExec
def processPreExec(runArgs, flags)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:41
python.TransformUtils.processPostExec
def processPostExec(runArgs, flags, cfg)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:50
python.DAOD_TLA_OutputConfig.DAOD_TLA_OutputCfg
def DAOD_TLA_OutputCfg(flags, additional_items=[])
Definition: DAOD_TLA_OutputConfig.py:11
python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True)
Definition: AutoConfigFlags.py:51
python.RecoConfigFlags.printRecoFlags
def printRecoFlags(flags)
Definition: RecoConfigFlags.py:153
python.TransformUtils.processPostInclude
def processPostInclude(runArgs, flags, cfg)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:69
python.RecoConfigFlags.recoRunArgsToFlags
def recoRunArgsToFlags(runArgs, flags)
Definition: RecoConfigFlags.py:196
python.TransformUtils.processPreInclude
def processPreInclude(runArgs, flags)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:62
python.PerfMonConfigHelpers.setPerfmonFlagsFromRunArgs
def setPerfmonFlagsFromRunArgs(flags, runArgs)
Definition: PerfMonConfigHelpers.py:3
python.DetectorConfigFlags.disableDetectors
def disableDetectors(flags, detectors, toggle_geometry=False)
Definition: DetectorConfigFlags.py:426
Constants
some useful constants -------------------------------------------------—
python.CommonRunArgsToFlags.commonRunArgsToFlags
def commonRunArgsToFlags(runArgs, configFlags)
Definition: CommonRunArgsToFlags.py:12
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.FTagPEBRecoConfig.FTagPEBJetTagConfig
def FTagPEBJetTagConfig(flags, jet_collection='HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_TLA', track_collection='InDetTrackParticles', pv_collection='PrimaryVertices')
Definition: FTagPEBRecoConfig.py:10
python.RAWtoDAOD_TLA_Skeleton.fromRunArgs
def fromRunArgs(runArgs)
Definition: RAWtoDAOD_TLA_Skeleton.py:98
str
Definition: BTagTrackIpAccessor.cxx:11
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:219