Skip to content

[NGT] Backport - Implement new strategy for Tau Validation at HLT and RECO in Phase-2#51152

Open
elenavernazza wants to merge 14 commits into
cms-sw:CMSSW_17_0_Xfrom
cms-ngt-hlt:TauValidationHLT_17_0_X
Open

[NGT] Backport - Implement new strategy for Tau Validation at HLT and RECO in Phase-2#51152
elenavernazza wants to merge 14 commits into
cms-sw:CMSSW_17_0_Xfrom
cms-ngt-hlt:TauValidationHLT_17_0_X

Conversation

@elenavernazza

@elenavernazza elenavernazza commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

PR description:

This PR introduces a new high-level validation strategy for hadronic tau reconstruction at both HLT and RECO in Phase-2.
The validation framework evaluates the reconstruction performance by matching GEN taus to reconstructed (HLT/RECO) taus and computing the following metrics:

  • Efficiency = fraction of GEN taus matched to at least one HLT/RECO tau
  • Fake rate = fraction of HLT/RECO taus not matched to any GEN tau
  • Split rate = fraction of GEN taus matched to more than one HLT/RECO tau
  • Duplicate rate = fraction of HLT/RECO taus matched to more than one GEN tau
  • $p_T$ / mass scale = mean of the response distribution (HLT/RECO divided by GEN)
  • $p_T$ / mass resolution = sigma/mean of the response distribution (HLT/RECO divided by GEN)

All metrics can be studied as a function of the tau kinematics ($p_T$, $\eta$, $\phi$, mass).
As opposed to the low-level validation, which relies on detailed hit-by-hit associations, this high-level validation adopts a simplified matching strategy based on a configurable spatial requirement (default: $\Delta R=0.3$). This complementary two-level validation approach was discussed in the Tau Algo Meeting (link).

Technical changes

This PR includes:

  • Re-introduction of HLTTauVal and HLTTauPostVal into the Phase-2 HLT validation and post-validation sequences
  • Re-organization of tau pre-validation, validation, and post-validation in RECO workflows for both Run-3 and Phase-2: adoption of standardized naming conventions, removal of deprecated and unmaintained sequences.

The core of the implementation is the new TauValidator.cc EDAnalyzer, which produces centralised DQM histograms for all defined metrics that can be used for more automatised RelVal studies. It supports both HLT and RECO collections, handling both RECO and PAT formats (required for Tau ID algorithms such as DeepTau, available only from the PAT step for the offline reconstruction).
Additionally, plotting utilities are provided to compare:

  • Different ID raw score cuts
  • Different ID working points
  • HLT vs RECO performance
  • Different ΔR matching thresholds (optional, disabled by default for faster workflows)

Some exemplary plots in the following:
image
image
image

All plots for 90K events from a TenTau sample in 150 PU can be found at this link.

Instruction to reproduce validation plots

  1. Run reconstruction and harvesting from RelVal samples
  • HLT only (faster):
cmsDriver.py step2 -s L1P2GT,HLT:75e33,VALIDATION:@hltValidation -n -1 --nThreads 0 \
 --conditions auto:phase2_realistic_T35 --datatier GEN-SIM-DIGI-RAW,DQMIO \
 --customise SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000 --eventcontent FEVTDEBUGHLT,DQMIO \
 --geometry ExtendedRun4D110 --era Phase2C17I13M9 --hltProcess HLTX --processName HLTX \
 --filein file:/eos/cms/store/relval/CMSSW_16_1_0_pre2/RelValTenTau_15_500/GEN-SIM-DIGI-RAW/PU_150X_mcRun4_realistic_v1_STD_Run4D110_PU-v1/2590000/01cbb197-f9d0-48a5-a634-c985f3b66373.root --fileout file:step2.root \
 --inputCommands="keep *, drop *_hlt*_*_HLT, drop triggerTriggerFilterObjectWithRefs_l1t*_*_HLT"
cmsDriver.py step3 -s HARVESTING:@hltValidation -n -1 \
 --conditions auto:phase2_realistic_T35 --mc --geometry ExtendedRun4D110 --era Phase2C17I13M9 \
 --filetype DQM --scenario pp --hltProcess HLTX --filein file:step2_inDQM.root --fileout file:step3.root
  • HLT + RECO (slower):
cmsDriver.py step3 -s RAW2DIGI,RECO,RECOSIM,PAT,VALIDATION:@phase2Validation -n 10 \
 --conditions auto:phase2_realistic_T35 --geometry ExtendedRun4D110 --era Phase2C17I13M9 \
 --datatier DQMIO --eventcontent DQM \
 --customise SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000 \
 --customise_command "process.globalValidationHCAL = cms.Sequence(process.hcalSimHitsValidationSequence + process.hcalSimHitStudy)" \
 --filein file:01cbb197-f9d0-48a5-a634-c985f3b66373.root \
 --fileout file:step3.root 

cmsDriver.py step4 -s HARVESTING:@phase2Validation -n -1 \
 --conditions auto:phase2_realistic_T35 --mc --geometry ExtendedRun4D110 --era Phase2C17I13M9 \
 --filetype DQM --scenario pp --hltProcess HLTX --filein file:step3.root --fileout file:step4.root

Note: Before this PR, the HLT DeepTau ID was not persisted in the FEVTDEBUGHLT event content, so running only the RECO step on an old RelVal sample could result in empty distributions of the ID values at HLT.

  1. Produce plots from DQM output
  • General validation plots:
run_tau_validation_plots.sh STEP

Choose STEP=HLT/RECO (or omit for both). By default, it will consider the validation obtained by requiring WP vs Jet >0 (CutWP_VSjet0); change folder name (SUB_DIR, OUTDIR_SUFFIX, LABEL_TEXT) if needed.

  • Comparison plots (ID / WP / $\Delta R$ scans):
run_tau_comparison_plots.sh MODE STEP

Choose MODE=ID/WP/DeltaR and STEP=HLT/RECO.

PR validation:

This PR has been extensively tested with the commands listed above, based on a TenTau RelVal sample. The configurations based on NGT scouting and HLT timing menus have also been successfully validated.
It has also been successfully validated on a general Phase-2 workflow 34434.0:

runTheMatrix.py -l 34434.0 -w upgrade -j 10 --ibeos --nEvents 10 -i all

The DQM plots are correctly produced but there are only few GEN taus in the tt-bar sample so the performance is not fully representative.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

This PR is a backport of #51092, in order for the validation tool to be available for Run-3 workflows.

@elenavernazza elenavernazza changed the title [NGT] Implement new strategy for Tau Validation at HLT and RECO in Phase-2 [NGT] Backport - Implement new strategy for Tau Validation at HLT and RECO in Phase-2 Jun 9, 2026
@cmsbuild cmsbuild added this to the CMSSW_17_0_X milestone Jun 9, 2026
@cmsbuild

cmsbuild commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

cms-bot internal usage

@cmsbuild

cmsbuild commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@cmsbuild

cmsbuild commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

A new Pull Request was created by @elenavernazza for CMSSW_17_0_X.

It involves the following packages:

  • Configuration/EventContent (operations)
  • HLTriggerOffline/Common (dqm)
  • HLTriggerOffline/Tau (dqm)
  • Validation/Configuration (dqm, simulation)
  • Validation/RecoTau (dqm)

@civanch, @cmsbuild, @ctarricone, @davidlange6, @fabiocos, @ftenchini, @gabrielmscampos, @kpedro88, @mandrenguyen, @mdhildreth, @rseidita can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @apsallid, @denizsun, @fabiocos, @missirol, @mmusich, @mtosi, @rovere, @salimcerci 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

mmusich commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

backport of #51092

@mmusich

mmusich commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@cmsbuild, please test

@elenavernazza

Copy link
Copy Markdown
Contributor Author

This additional commit contains the bug fix introduced in #51198

@mmusich

mmusich commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

test parameters:

  • workflows = ph2_hlt, 11.0, 281.0, 1311.0

@mmusich

mmusich commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

backport of #51198

@mmusich

mmusich commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@cmsbuild, please test

@cmsbuild

Copy link
Copy Markdown
Contributor

@cmsbuild

Copy link
Copy Markdown
Contributor

Pull request #51152 was updated. @civanch, @ctarricone, @davidlange6, @fabiocos, @ftenchini, @gabrielmscampos, @kpedro88, @mandrenguyen, @mdhildreth, @rseidita can you please check and sign again.

@cmsbuild

Copy link
Copy Markdown
Contributor

+1

Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-da07f6/53858/summary.html
COMMIT: d7968a1
CMSSW: CMSSW_17_0_X_2026-06-10-2300/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/51152/53858/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 1 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 20 differences found in the comparisons
  • DQMHistoTests: Total files compared: 70
  • DQMHistoTests: Total histograms compared: 5054302
  • DQMHistoTests: Total failures: 53
  • DQMHistoTests: Total nulls: 3
  • DQMHistoTests: Total successes: 5054220
  • DQMHistoTests: Total skipped: 26
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 740142.462 KiB( 69 files compared)
  • DQMHistoSizes: changed ( 34434.7503,... ): 32181.719 KiB HLT/Tau
  • DQMHistoSizes: changed ( 34434.0,... ): 32174.297 KiB Tau/TauValidation
  • DQMHistoSizes: changed ( 34434.0,... ): 0.004 KiB MessageLogger/Errors
  • DQMHistoSizes: changed ( 34434.0,... ): 0.004 KiB MessageLogger/Warnings
  • Checked 297 log files, 252 edm output root files, 70 DQM output files
  • TriggerResults: found differences in 18 / 68 workflows

Max Memory Comparisons exceeding threshold

@cms-sw/core-l2 , I found 39 workflow step(s) with memory usage exceeding the error threshold:

Expand to see workflows ...
  • Error: Workflow 34434.0_TTbar_14TeV+Run4D121 step3 max memory diff 71.4 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.0_TTbar_14TeV+Run4D121 step4 max memory diff 241.2 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.75_TTbar_14TeV+Run4D121_HLT75e33Timing step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.75_TTbar_14TeV+Run4D121_HLT75e33Timing step3 max memory diff 120.7 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.7503_TTbar_14TeV+Run4D121_HLTHeterogeneousValid step3 max memory diff 120.7 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.7503_TTbar_14TeV+Run4D121_HLTHeterogeneousValid step2 max memory diff 36.0 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.751_TTbar_14TeV+Run4D121_HLT75e33TimingAlpaka step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.751_TTbar_14TeV+Run4D121_HLT75e33TimingAlpaka step3 max memory diff 120.7 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.7521_TTbar_14TeV+Run4D121_HLT75e33TimingTiclV5TrackLinkGNN step3 max memory diff 120.7 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.7521_TTbar_14TeV+Run4D121_HLT75e33TimingTiclV5TrackLinkGNN step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.753_TTbar_14TeV+Run4D121_HLT75e33TimingLegacyTracking step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.753_TTbar_14TeV+Run4D121_HLT75e33TimingLegacyTracking step3 max memory diff 120.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.754_TTbar_14TeV+Run4D121_HLT75e33TimingLegacyTrackingPatatrackQuads step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.754_TTbar_14TeV+Run4D121_HLT75e33TimingLegacyTrackingPatatrackQuads step3 max memory diff 120.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.755_TTbar_14TeV+Run4D121_HLT75e33TimingLST step3 max memory diff 120.7 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.755_TTbar_14TeV+Run4D121_HLT75e33TimingLST step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.756_TTbar_14TeV+Run4D121_HLT75e33TimingTrimmedTracking step3 max memory diff 120.7 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.756_TTbar_14TeV+Run4D121_HLT75e33TimingTrimmedTracking step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.757_TTbar_14TeV+Run4D121_HLT75e33TimingMkFitFit step3 max memory diff 120.7 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.757_TTbar_14TeV+Run4D121_HLT75e33TimingMkFitFit step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.758_TTbar_14TeV+Run4D121_HLT75e33TimingTiclBarrel step3 max memory diff 120.7 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.758_TTbar_14TeV+Run4D121_HLT75e33TimingTiclBarrel step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.7591_TTbar_14TeV+Run4D121_HLTPhase2WithNanoValid step2 max memory diff 35.5 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.77_TTbar_14TeV+Run4D121_NGTScouting step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.77_TTbar_14TeV+Run4D121_NGTScouting step3 max memory diff 120.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.771_TTbar_14TeV+Run4D121_NGTScoutingAll step3 max memory diff 120.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.771_TTbar_14TeV+Run4D121_NGTScoutingAll step2 max memory diff 36.0 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.773_TTbar_14TeV+Run4D121_NGTScoutingWithNanoValid step2 max memory diff 35.5 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.774_TTbar_14TeV+Run4D121_L1NGTScoutingWithNanoValid step2 max memory diff 231.8 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.775_TTbar_14TeV+Run4D121_NGTScoutingCAExtensionMergeT5 step3 max memory diff 120.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.775_TTbar_14TeV+Run4D121_NGTScoutingCAExtensionMergeT5 step2 max memory diff 35.9 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.911_TTbar_14TeV+Run4D121_DD4hep step4 max memory diff 241.2 exceeds +/- 30.0 MiB
  • Error: Workflow 34434.911_TTbar_14TeV+Run4D121_DD4hep step3 max memory diff 71.4 exceeds +/- 30.0 MiB
  • Error: Workflow 34496.0_CloseByPGun_CE_E_Front_120um+Run4D121 step3 max memory diff 71.5 exceeds +/- 30.0 MiB
  • Error: Workflow 34496.0_CloseByPGun_CE_E_Front_120um+Run4D121 step4 max memory diff 241.2 exceeds +/- 30.0 MiB
  • Error: Workflow 34500.0_CloseByPGun_CE_H_Coarse_Scint+Run4D121 step3 max memory diff 71.5 exceeds +/- 30.0 MiB
  • Error: Workflow 34500.0_CloseByPGun_CE_H_Coarse_Scint+Run4D121 step4 max memory diff 241.2 exceeds +/- 30.0 MiB
  • Error: Workflow 34634.999_TTbar_14TeV+Run4D121PU_PMXS1S2PR step4 max memory diff 71.5 exceeds +/- 30.0 MiB
  • Error: Workflow 34634.999_TTbar_14TeV+Run4D121PU_PMXS1S2PR step5 max memory diff 241.2 exceeds +/- 30.0 MiB

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.

3 participants