6 Definitions of additional validation steps in Trigger ART tests relevant only for TrigInDetValidation
7 The main common check steps are defined in the TrigValSteering.CheckSteps module.
14 from TrigValTools.TrigValSteering.ExecStep
import ExecStep
15 from TrigValTools.TrigValSteering.Step
import Step
16 from TrigValTools.TrigValSteering.CheckSteps
import RefComparisonStep
17 from TrigValTools.TrigValSteering.Common
import find_file
18 from AthenaCommon.Utils.unixtools
import FindFile
19 from AthenaConfiguration.TestDefaults
import defaultConditionsTags
27 def __init__(self, name='TrigInDetReco', postinclude_file='', preinclude_file=''):
28 ExecStep.__init__(self, name)
34 self.concurrent_events = 1
36 self.timeout = 18*3600
38 self.preexec_trig =
''
39 self.postinclude_trig = postinclude_file
40 self.preinclude_trig = preinclude_file
41 self.release =
'current'
42 self.preexec_reco =
';'.
join([
43 'flags.Reco.EnableEgamma=True',
44 'flags.Reco.EnableCombinedMuon=True',
45 'flags.Reco.EnableJet=False',
46 'flags.Reco.EnableMet=False',
47 'flags.Reco.EnableBTagging=False',
48 'flags.Reco.EnablePFlow=False',
49 'flags.Reco.EnableTau=False',
50 'flags.Reco.EnablePostProcessing=False',
52 self.preexec_all =
';'.
join([
53 'flags.Trigger.AODEDMSet=\'ESD\'',
55 self.postexec_trig =
''
56 self.postexec_reco =
''
57 self.args =
'--outputAODFile=AOD.pool.root --steering "doRDO_TRIG"'
60 if ( self.postinclude_trig !=
'' ) :
61 print(
"postinclude_trig: ", self.postinclude_trig )
63 if ( self.preinclude_trig !=
'' ) :
64 print(
"preinclude_trig: ", self.preinclude_trig )
68 from TrigInDetValidation.Chains
import Chains
70 self.preexec_trig += tc.get_compiled_flag_str(self.slices)
75 if (self.release !=
'current'):
78 DVERSION=os.getenv(
'Athena_VERSION')
79 if (self.release ==
'latest'):
80 if ( DVERSION
is None ) :
83 AVERSION=
str(subprocess.Popen([
"getrelease.sh",DVERSION],stdout=subprocess.PIPE).communicate()[0],
'utf-8')
85 print(
"cannot get last stable release - will use current release" )
87 AVERSION = self.release
92 self.args +=
' --asetup "RAWtoALL:Athena,'+AVERSION+
'" '
93 print(
"remapping athena base release version for offline Reco steps: ", DVERSION,
" -> ", AVERSION )
95 print(
"Using current release for offline Reco steps " )
97 if self.preexec_trig !=
'' or self.preexec_reco !=
'' or self.preexec_all !=
'':
98 self.args +=
' --preExec'
99 if self.preexec_trig !=
'':
100 self.args +=
' "RDOtoRDOTrigger:{:s};"'.
format(self.preexec_trig)
101 if self.preexec_reco !=
'':
102 self.args +=
' "RAWtoALL:{:s};"'.
format(self.preexec_reco)
103 if self.preexec_all !=
'':
104 self.args +=
' "all:{:s};"'.
format(self.preexec_all)
105 if self.postexec_trig !=
'' or self.postexec_reco !=
'':
106 self.args +=
' --postExec'
107 if self.postexec_trig !=
'':
108 self.args +=
' "RDOtoRDOTrigger:{:s};"'.
format(self.postexec_trig)
109 if self.postexec_reco !=
'':
110 self.args +=
' "RAWtoALL:{:s};"'.
format(self.postexec_reco)
111 if (self.postinclude_trig !=
''):
112 self.args +=
' --postInclude "{:s}"'.
format(self.postinclude_trig)
113 if (self.preinclude_trig !=
''):
114 self.args +=
' --preInclude "{:s}"'.
format(self.preinclude_trig)
115 super(TrigInDetReco, self).
configure(test)
123 def __init__(self, name='TrigInDetAna', extraArgs=None):
124 ExecStep.__init__(self, name )
127 self.
args =
' -m TrigInDetValidation.TrigInDetValidation_AODtoTrkNtuple_CA '
133 if extraArgs
is not None:
134 self.
args += extraArgs
143 super(TrigCostStep, self).
__init__(name)
147 self.
args =
' --monitorChainAlgorithm --MCCrossSection=0.5 Input.Files=\'["tmp.RDO_TRIG"]\' '
157 ExecStep.__init__(self, name)
169 self.
args =
'-c "setMenu=\'Cosmic_run3_v1\';doCosmics=True;doL1Sim=False;forceEnableAllChains=True;"'
170 self.
args =
'-c "flags.Trigger.forceEnableAllChains=True;flags.Trigger.triggerMenuSetup=\'Cosmic_run3_v1\';from AthenaConfiguration.Enums import BeamType;flags.Beam.Type=BeamType.Cosmics;"'
171 self.
args +=
' -o output'
180 super(TrigBSExtr, self).
__init__(name)
186 self.
args =
'-s Main ' +
'`find . -name "*_HLTMPPy_output.*.data"`'
195 super(TrigTZReco, self).
__init__(name)
197 tzrecoPreExec =
' '.
join([
198 "flags.Trigger.triggerMenuSetup=\'Cosmic_run3_v1\';",
199 "flags.Trigger.AODEDMSet=\'AODFULL\';",
206 self.
args =
'--inputBSFile=' +
find_file(
'*.physics_Main*._athenaHLT*.data')
207 self.
args +=
' --outputAODFile=AOD.pool.root'
208 self.
args += f
' --conditionsTag="{defaultConditionsTags.RUN3_DATA23}" --geometryVersion=\'ATLAS-R3S-2021-03-02-00\''
209 self.
args +=
' --preExec="{:s}"'.
format(tzrecoPreExec)
219 Execute TIDArdict for TrkNtuple files.
221 def __init__(self, name='TrigInDetdict', args=None, testbin='Test_bin.dat', config=False ):
222 super(TrigInDetRdictStep, self).
__init__(name)
223 self.
args=args +
" -b " + testbin +
" "
232 os.system(
'get_files -data TIDAbeam.dat &> /dev/null' )
233 os.system(
'get_files -data Test_bin.dat &> /dev/null' )
234 os.system(
'get_files -data Test_bin_larged0.dat &> /dev/null' )
235 os.system(
'get_files -data Test_bin_lrt.dat &> /dev/null' )
236 os.system(
'get_files -data TIDAdata-run3.dat &> /dev/null' )
237 os.system(
'get_files -data TIDAdata-run3-larged0.dat &> /dev/null' )
238 os.system(
'get_files -data TIDAdata-run3-larged0-el.dat &> /dev/null' )
239 os.system(
'get_files -data TIDAdata-run3-lrt.dat &> /dev/null' )
240 os.system(
'get_files -data TIDAdata-run3-fslrt.dat &> /dev/null' )
241 os.system(
'get_files -data TIDAdata-run3-minbias.dat &> /dev/null' )
242 os.system(
'get_files -data TIDAdata_cuts.dat &> /dev/null' )
243 os.system(
'get_files -data TIDAdata-run3-offline.dat &> /dev/null' )
244 os.system(
'get_files -data TIDAdata-run3-offline-rzMatcher.dat &> /dev/null' )
245 os.system(
'get_files -data TIDAdata-run3-offline-vtxtrack.dat &> /dev/null' )
246 os.system(
'get_files -data TIDAdata-run3-offline-larged0.dat &> /dev/null' )
247 os.system(
'get_files -data TIDAdata-run3-offline-larged0-el.dat &> /dev/null' )
248 os.system(
'get_files -data TIDAdata-run3-offline-lrt.dat &> /dev/null' )
249 os.system(
'get_files -data TIDAdata-run3-offline-fslrt.dat &> /dev/null' )
250 os.system(
'get_files -data TIDAdata-run3-offline-vtx.dat &> /dev/null' )
251 os.system(
'get_files -data TIDAdata-run3-minbias-offline.dat &> /dev/null' )
252 os.system(
'get_files -data TIDAdata-run3-offline-cosmic.dat &> /dev/null' )
253 os.system(
'get_files -data TIDAdata_cuts-offline.dat &> /dev/null' )
254 os.system(
'get_files -data TIDAdata-chains-run3.dat &> /dev/null' )
255 os.system(
'get_files -data TIDAdata-chains-run3-lrt.dat &> /dev/null' )
256 os.system(
'get_files -data TIDAdata-run4.dat &> /dev/null' )
257 os.system(
'get_files -data TIDAdata-run4-offline.dat &> /dev/null' )
258 os.system(
'get_files -data TIDAdata-run4-offline-vtx.dat &> /dev/null' )
259 super(TrigInDetRdictStep, self).
configure(test)
263 json_file =
'TrigInDetValidation/comparitor.json'
264 json_fullpath =
FindFile(json_file, os.environ[
'DATAPATH'].
split(os.pathsep), os.R_OK)
266 if not json_fullpath:
267 print(
'Failed to determine full path for input JSON %s', json_file)
270 with open(json_fullpath)
as f:
273 except json.decoder.JSONDecodeError
as e:
274 print(f
"Failed to load json file {json_fullpath}")
277 chainmap = data[slice]
279 return chainmap[
'chains']
285 Execute TIDAcomparitor for data.root files.
287 def __init__( self, name='TrigInDetComp', slice=None, args=None, file=None ):
288 super(TrigInDetCompStep, self).
__init__(name)
296 os.system(
'get_files -data TIDAhisto-panel.dat &> /dev/null' )
297 os.system(
'get_files -data TIDAhisto-panel-vtx.dat &> /dev/null' )
298 os.system(
'get_files -data TIDAhistos-vtx.dat &> /dev/null' )
299 os.system(
'get_files -data TIDAhisto-panel-TnP.dat &> /dev/null' )
300 os.system(
'get_files -data TIDAhisto-tier0.dat &> /dev/null' )
301 os.system(
'get_files -data TIDAhisto-tier0-vtx.dat &> /dev/null' )
302 os.system(
'get_files -data TIDAhisto-tier0-TnP.dat &> /dev/null' )
305 RefComparisonStep.configure(self, test)
306 if self.reference
is None :
312 print(
"\033[0;32mTIDAcomparitor "+self.
args+
" \033[0m" )
313 Step.configure(self, test)
320 Execute TIDAcpucost for data.root files.
322 def __init__( self, name='TrigInDetCpuCost', outdir=None, infile=None, extra=None ):
323 super(TrigInDetCpuCostStep, self).
__init__(name)
334 RefComparisonStep.configure(self, test)
335 if self.reference
is None :
339 Step.configure(self, test)