Skip to content

Units tests for Jet and MET validation.#49817

Merged
cmsbuild merged 3 commits intocms-sw:masterfrom
bfonta:feature/unit_tests
Jan 15, 2026
Merged

Units tests for Jet and MET validation.#49817
cmsbuild merged 3 commits intocms-sw:masterfrom
bfonta:feature/unit_tests

Conversation

@bfonta
Copy link
Copy Markdown
Contributor

@bfonta bfonta commented Jan 14, 2026

PR description:

This PR adds unit tests for the Jet and MET validation scripts. It stems from the issue found in #49775.
The scripts run on a DQM QCD RelVal file which was added to the /store/group/phys_jetmet/cmssw_unittests folder, and was produced with:

#!/usr/bin/env bash

GEOMETRY="ExtendedRun4D110"
CONDITIONS="auto:phase2_realistic_T33"
VALIDSEQ="@hltValidation"
ERA="Phase2C17I13M9"
RELVAL="/eos/cms/store/relval/CMSSW_16_0_0_pre4/RelValQCD_FlatPt_15_3000HS_14/GEN-SIM-DIGI-RAW/PU_150X_mcRun4_realistic_v1_STD_Run4D110_PU-v2/2580000/ffd716a4-ebc9-4f88-8534-b62a75aeaa9f.root"
NEVENTS=100

function mystep2() {
    cmsDriver.py step2 --step L1P2GT,HLT:@relvalRun4,VALIDATION:"${VALIDSEQ}" \
		 --conditions ${CONDITIONS} \
		 --datatier GEN-SIM-DIGI-RAW,DQMIO \
		 -n ${NEVENTS} \
		 --procModifier ticl_v5 \
		 --eventcontent FEVTDEBUGHLT,DQMIO \
		 --geometry ${GEOMETRY} \
		 --customise SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000 \
		 --era ${ERA} \
		 --filein file:${RELVAL} \
		 --fileout file:step2.root \
		 --nThreads 0 \
		 --process HLTX \
		 --inputCommands='keep *, drop *_hlt*_*_HLT, drop triggerTriggerFilterObjectWithRefs_l1t*_*_HLT'
}

function mystep3() {
    cmsDriver.py step3 -s HARVESTING:"${VALIDSEQ}" \
		 --conditions "${CONDITIONS}" \
		 --mc \
		 --geometry "${GEOMETRY}" \
		 --scenario pp \
		 --filetype DQM \
		 --era "${ERA}" \
		 --procModifier ticl_v5 \
		 -n ${NEVENTS} \
		 --filein file:step2_inDQM.root \
		 --fileout file:step3.root
}

mystep2 && mystep3

The unit test scripts were inspired by this unit test.

PR validation:

The validation scripts were manually tested on the produced DQM file, and then scram b runtests was successfully tested as follows:

bfontana@nv:/cms-hlt-nfs/user/bfontana/UnitTests/src  (feature/unit_tests) $ ll
total 0MB
drwxr-xr-x. 4 bfontana zh 1MB Jan 14 11:40 Validation/
bfontana@nv:/cms-hlt-nfs/user/bfontana/UnitTests/src  (feature/unit_tests) $ ll Validation/
total 0MB
drwxr-xr-x. 6 bfontana zh 1MB Jan 13 15:27 RecoJets/
drwxr-xr-x. 6 bfontana zh 1MB Jan 14 11:40 RecoMET/
bfontana@nv:/cms-hlt-nfs/user/bfontana/UnitTests/src  (feature/unit_tests) $ scram b runtests
>> Local Products Rules ..... started
>> Local Products Rules ..... done
>> Creating project symlinks
Creating test log file logs/el9_amd64_gcc13/testing.log
Pass   25s ... Validation/RecoJets/testMakeJetValidationPlots
Pass   14s ... Validation/RecoMET/testMakeHLTMETValidationPlots
>> Test sequence completed for CMSSW CMSSW_16_0_0_pre4
bfontana@nv:/cms-hlt-nfs/user/bfontana/UnitTests/src  (feature/unit_tests) $ ll ../unit_tests/
total 1MB
drwxr-xr-x. 2 bfontana zh 1MB Jan 14 12:06 testMakeJetValidationPlots/
-rw-r--r--. 1 bfontana zh 1MB Jan 14 12:06 testMakeJetValidationPlots.log
drwxr-xr-x. 4 bfontana zh 1MB Jan 14 12:06 testMakeHLTMETValidationPlots/
-rw-r--r--. 1 bfontana zh 1MB Jan 14 12:06 testMakeHLTMETValidationPlots.log
bfontana@nv:/cms-hlt-nfs/user/bfontana/UnitTests/src  (feature/unit_tests) $ ll ../unit_tests/testMakeJetValidationPlots
total 8MB
-rw-r--r--. 1 bfontana zh 1MB Jan 14 12:05 JetPt.png
-rw-r--r--. 1 bfontana zh 1MB Jan 14 12:05 JetPt.pdf
-rw-r--r--. 1 bfontana zh 1MB Jan 14 12:05 CorrJetPt.png
-rw-r--r--. 1 bfontana zh 1MB Jan 14 12:05 CorrJetPt.pdf
-rw-r--r--. 1 bfontana zh 1MB Jan 14 12:05 GenPt.png
-rw-r--r--. 1 bfontana zh 1MB Jan 14 12:05 GenPt.pdf
...
bfontana@nv:/cms-hlt-nfs/user/bfontana/UnitTests/src  (feature/unit_tests) $ head -n5 ../unit_tests/testMakeJetValidationPlots.log 
 
===== Test "testMakeJetValidationPlots" ====
xrdfs command status = 0
Using file DQM_RelValQCD_FlatPt_15_3000HS_14_CMSSW_16_0_0_pre4.root.
Running in /cms-hlt-nfs/user/bfontana/UnitTests/unit_tests/testMakeJetValidationPlots.

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented Jan 14, 2026

cms-bot internal usage

@bfonta
Copy link
Copy Markdown
Contributor Author

bfonta commented Jan 14, 2026

type ngt

@cmsbuild cmsbuild added the ngt label Jan 14, 2026
@cmsbuild
Copy link
Copy Markdown
Contributor

@cmsbuild
Copy link
Copy Markdown
Contributor

A new Pull Request was created by @bfonta for master.

It involves the following packages:

  • Validation/RecoJets (dqm)
  • Validation/RecoMET (dqm)

@cmsbuild, @ctarricone, @gabrielmscampos, @nothingface0, @rseidita can you please review it and eventually sign? Thanks.
@ahinzmann, @gkasieczka, @jdamgov, @jdolen, @mariadalfonso, @missirol, @mmarionncern, @mmusich, @nhanvtran, @rappoccio, @schoef, @seemasharmafnal this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Jan 14, 2026

@cmsbuild, please test

@cmsbuild
Copy link
Copy Markdown
Contributor

-1

Failed Tests: RelVals
Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-36c95d/50611/summary.html
COMMIT: 2641cd8
CMSSW: CMSSW_16_1_X_2026-01-13-2300/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/49817/50611/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed RelVals

----- Begin Fatal Exception 14-Jan-2026 13:00:39 CET-----------------------
An exception of category 'OutOfBound' occurred while
   [0] Processing  Event run: 1 lumi: 1 event: 4 stream: 0
   [1] Running path 'HLTriggerFinalPath'
   [2] Prefetching for module TriggerSummaryProducerAOD/'hltTriggerSummaryAOD'
   [3] Prefetching for module L1HPSPFTauProducer/'l1tHPSPFTauProducer'
   [4] Prefetching for module L1TPFCandMultiMerger/'l1tLayer1'
   [5] Prefetching for module L1TCorrelatorLayer1Producer/'l1tLayer1HGCal'
   [6] Calling method for module HGCalBackendLayer2Producer/'l1tHGCalBackEndLayer2Producer'
Exception Message:
TC X1 = 0.0713466 out of the seeding histogram bounds 0.076 - 0.58
----- End Fatal Exception -------------------------------------------------

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Jan 14, 2026

ignore tests-rejected with ib-failure

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Jan 14, 2026

failures unrelated, see #49795

@nothingface0
Copy link
Copy Markdown
Contributor

+dqm

@cmsbuild
Copy link
Copy Markdown
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (test failures were overridden). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @mandrenguyen, @ftenchini (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen
Copy link
Copy Markdown
Contributor

+1

@cmsbuild cmsbuild merged commit 703040d into cms-sw:master Jan 15, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants