Skip to content
Snippets Groups Projects
Commit 3c15d439 authored by Bertrand Martin Dit Latour's avatar Bertrand Martin Dit Latour Committed by Walter Lampl
Browse files

TrigAnalysisTest: add MC grid test comparing CA vs legacy counts

TrigAnalysisTest: add MC grid test comparing CA vs legacy counts

Hello,

Similarly to !67637 which introduced a test comparing CA vs legacy trigger counts in data, this MR introduces a test comparing CA vs legacy counts for MC.
The input is a mix of ttbar, stau, and bphys samples, in order to maximise the coverage in terms of trigger menu. The test uses 8 threads, 2500 events, and runs in ~2h30.

Cheers,
Bertrand
parent df0c0023
No related branches found
No related tags found
1 merge request!67835TrigAnalysisTest: add MC grid test comparing CA vs legacy counts
#!/usr/bin/env python
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
#
# art-description: Comparison of CA vs legacy counts for the RDOtoRDOTrigger transform with Dev menu
# art-type: grid
# art-include: main/Athena
# art-athena-mt: 8
# art-output: *.txt
# art-output: *.log
# art-output: log.*
# art-output: *.out
# art-output: *.err
# art-output: *.log.tar.gz
# art-output: *.new
# art-output: *.json
# art-output: expert*.root
# art-output: *.pmon.gz
# art-output: *perfmon*
# art-output: prmon*
# art-output: *.check*
from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
from TrigValTools.TrigValSteering.Step import get_step_from_list
preExec = ';'.join([
'flags.Trigger.triggerMenuSetup=\'Dev_pp_run3_v1_TriggerValidation_prescale\'',
'flags.Trigger.AODEDMSet=\'AODFULL\'',
])
# Run Legacy menu
exLegacy = ExecStep.ExecStep('Legacy')
exLegacy.type = 'Reco_tf'
exLegacy.input = 'ttbar_stau_bphys'
exLegacy.max_events = 2500
exLegacy.threads = 8
exLegacy.concurrent_events = 8
exLegacy.args = '--outputRDO_TRIGFile=RDO_TRIG_Legacy.pool.root'
exLegacy.args += f' --preExec="all:{preExec};"'
# Rename Legacy histograms
hmLegacy = CheckSteps.RootMergeStep('HistMergeLegacy')
hmLegacy.merged_file = 'expert-monitoring_Legacy.root'
hmLegacy.input_file = 'expert-monitoring.root'
# ChainDump to create Legacy reference
cdLegacy = ExecStep.ExecStep('ChainDumpLegacy')
cdLegacy.type = 'other'
cdLegacy.executable = 'chainDump.py'
cdLegacy.input = ''
cdLegacy.args = '-f expert-monitoring_Legacy.root --yaml ChainDumpLegacy.yml'
cdLegacy.auto_report_result = False
cdLegacy.prmon = False
# Run CA menu
exCA = ExecStep.ExecStep('CA')
exCA.type = 'Reco_tf'
exCA.input = 'ttbar_stau_bphys'
exCA.max_events = 2500
exCA.threads = 8
exCA.concurrent_events = 8
exCA.args = '--outputRDO_TRIGFile=RDO_TRIG_CA.pool.root'
exCA.args += f' --preExec="all:{preExec};"'
exCA.args += ' --CA "all:True"'
test = Test.Test()
test.art_type = 'grid'
test.exec_steps = [exLegacy, hmLegacy, cdLegacy, exCA]
test.check_steps = CheckSteps.default_check_steps(test)
# Rename CA ChainDump
cdCA = get_step_from_list("ChainDump", test.check_steps)
cdCA.args = '--yaml ChainDumpCA.yml'
# Add a step comparing counts from CA vs Legacy
countComp = CheckSteps.ChainCompStep()
countComp.reference = 'ChainDumpLegacy.yml'
countComp.input_file = 'ChainDumpCA.yml'
countComp.explicit_reference = True # Test produces the reference
countComp.required = True # Final exit code doesn't depend on this step
CheckSteps.add_step_after_type(test.check_steps, CheckSteps.ChainDumpStep, countComp)
import sys
sys.exit(test.run())
......@@ -342,6 +342,17 @@
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigInDetValidation/samples/mc16_13TeV.448024.MGPy8EG_A14NNPDF23LO_TT_RPVdirectBL_1200_tau_1ns.recon.RDO.e6768_s3338_r11265_tid19016862_00/RDO.19016862._000007.pool.root.1"
]
},
"ttbar_stau_bphys": {
"source": "mc",
"format": "RDO",
"paths": [
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.RDO.e8514_e8528_s4159_s4114_r14799_tid34171421_00/RDO.34171421._000011.pool.root.1",
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.RDO.e8514_e8528_s4159_s4114_r14799_tid34171421_00/RDO.34171421._000016.pool.root.1",
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigInDetValidation/samples/valid1.516640.MGPy8EG_A14NNPDF23LO_StauStauLLP_100_0_1ns.recon.RDO.e8514_e8528_s4159_s4114_r14799_tid34171435_00/RDO.34171435._000004.pool.root.1",
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigInDetValidation/samples/valid1.801921.P8B_A14_CTEQ6L1_Bs_Jpsim3p5mu3p5_phi.recon.RDO.e8542_e8528_s4159_s4114_r14799_tid34182692_00/RDO.34182692._000001.pool.root.1",
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigInDetValidation/samples/valid1.801272.P8B_A14_CTEQ6L1_Jpsie3e3.recon.RDO.e8542_e8528_s4159_s4114_r14799_tid34184203_00/RDO.34184203._000009.pool.root.1"
]
},
"data_run2_reco_run3_AOD": {
"source": "data",
"format": "AOD",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment