Skip to content

Update TICL & HGCal simulation truth validation to use new simulation truth collections, and simplify validation to use only SimCluster dataformat#51047

Open
tcuisset wants to merge 3 commits into
cms-sw:masterfrom
tcuisset:caloTruth-pr2-rebase2
Open

Conversation

@tcuisset

Copy link
Copy Markdown
Contributor

PR description:

This is a follow-up on #50578, which had updated CaloTruthAccumulator to produce multiple SimCluster collections, with the intent to use only one dataformat for calorimeter truth information (instead of CaloParticle / SimCluster dataformat dichotomy).

This PR updates the TICL/HGCal validation to use the new SimCluster collections produced in CaloTruthAccumulator.
Use of CaloParticle dataformat is replaced nearly everywhere with the use of caloparticles in SimCluster dataformat (with just some remaining usage related to simTime).

Summary of the setup after this PR:
Screenshot from 2026-05-27 11-47-07

Documentation
Slides at TICL meeting
Slide 7 of HGCAL presentation at NGT MC truth workshop

Details:

  • Associators with CaloParticle are removed (SimCluster associators are used for the "CaloParticle" SimCluster collection). They were mostly duplicated code
  • SimTrackstersProducer is split into two producers for clarity : SimTrackstersProducers (only for simtracksters) and SimTICLCandidateProducer (produces SimTICLCandidates)
  • SimTrackstersProducer is now configurable to produce an arbitrary number of simTrackster collections (instead of CP/SC only). Each collection has also a RefVector to the SimCluster that was used to produce the simTrackster.
  • SimTICLCandidateProducer is also configurable wrt the SimTrackster collections used
  • all the code designed to deal with the rare special cases where a SimTrackster is made from SimClusters that do not have a SimTrack crossing boundary is removed, since this corner case cannot happen with "boundary" SimClusters
  • validation configs for HLT and TICLbarrel are updated accordingly

PR validation:

Tested with various Phase 2 workflows:

  • 29634.0 (TTbar), 29634.758 (+HLT timing ticl_barrel), 29634.773 (+NGT scouting Nano val), 29634.7591 (+HLTNanoValid),
  • 34553.209 (CloseByPGun_Barrel_Front+Run4D121_ticl_barrel)

There should not be any validation differences in reco objects. Very minor differences in validation could be caused by the switch from "legacy" to "boundary" SimCluster (which could change slightly validation results for status=1 photons that do not convert before reaching the calorimeter)

FYI @felicepantaleo @waredjeb

@cmsbuild

cmsbuild commented May 27, 2026

Copy link
Copy Markdown
Contributor

cms-bot internal usage

@cmsbuild

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51047/49491

@cmsbuild

Copy link
Copy Markdown
Contributor

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

It involves the following packages:

  • DataFormats/HGCalReco (reconstruction)
  • HLTrigger/NGTScouting (hlt)
  • RecoHGCal/TICL (reconstruction)
  • SimCalorimetry/HGCalAssociatorProducers (simulation)
  • SimCalorimetry/HGCalSimProducers (simulation)
  • SimDataFormats/Associations (simulation)
  • Validation/Configuration (dqm, simulation)
  • Validation/HGCalValidation (dqm)

@Martin-Grunewald, @Moanwar, @civanch, @cmsbuild, @ctarricone, @gabrielmscampos, @jfernan2, @kpedro88, @mandrenguyen, @mdhildreth, @mmusich, @rseidita, @srimanob can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @apsallid, @bsunanda, @cseez, @denizsun, @fabiocos, @felicepantaleo, @forthommel, @hatakeyamak, @lecriste, @lgray, @martinamalberti, @missirol, @mmusich, @pfs, @rovere, @salimcerci, @sameasy, @sethzenz, @sobhatta, @vandreev11 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

@felicepantaleo

Copy link
Copy Markdown
Contributor

@cmsbuild please test

@mmusich

mmusich commented May 27, 2026

Copy link
Copy Markdown
Contributor

@cmsbuild, please abort

@mmusich

mmusich commented May 27, 2026

Copy link
Copy Markdown
Contributor

test parameters:

  • workflows = ph2_hlt

@mmusich

mmusich commented May 27, 2026

Copy link
Copy Markdown
Contributor

@cmsbuild, please test

@cmsbuild

Copy link
Copy Markdown
Contributor

-1

Failed Tests: RelVals
Size: This PR adds an extra 136KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-becf79/53501/summary.html
COMMIT: a66a777
CMSSW: CMSSW_17_0_X_2026-05-26-2300/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/51047/53501/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed RelVals

----- Begin Fatal Exception 27-May-2026 13:43:14 CEST-----------------------
An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 1 lumi: 1 event: 1 stream: 0
   [1] Running path 'validation_step14'
   [2] Prefetching for module HGCalValidator/'hltHgcalValidator'
   [3] Calling method for module SimTrackstersProducer/'hltTiclSimTracksters'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for type: std::vector<SimCluster>
Looking for module label: mixData
Looking for productInstanceName: MergedCaloTruthBoundaryTrackSimCluster

   Additional Info:
      [a] If you wish to continue processing events after a ProductNotFound exception,
add "TryToContinue = cms.untracked.vstring('ProductNotFound')" to the "options" PSet in the configuration.

----- End Fatal Exception -------------------------------------------------

@cmsbuild

cmsbuild commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

-1

Failed Tests: RelVals
Size: This PR adds an extra 96KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-becf79/53674/summary.html
COMMIT: 2641014
CMSSW: CMSSW_17_0_X_2026-06-02-2300/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/51047/53674/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed RelVals

----- Begin Fatal Exception 03-Jun-2026 16:21:45 CEST-----------------------
An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 1 lumi: 1 event: 6 stream: 0
   [1] Running path 'nanoAOD_step0'
   [2] Calling method for module SimpleSecondaryVertexFlatTableProducer/'hltSecondaryVertexTable'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for a container with elements of type: reco::VertexCompositePtrCandidate
Looking for module label: hltDeepInclusiveMergedVerticesPF
Looking for productInstanceName: 

   Additional Info:
      [a] If you wish to continue processing events after a ProductNotFound exception,
add "TryToContinue = cms.untracked.vstring('ProductNotFound')" to the "options" PSet in the configuration.

----- End Fatal Exception -------------------------------------------------

@tcuisset

tcuisset commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Failed RelVals

Seems the failure is unrelated to this PR, see #51004 (comment)

@tcuisset

tcuisset commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Is it possible to rerun the tests on this to get the comparisons, now that the relvals in IB are fixed ?

@jfernan2

jfernan2 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

please test

@cmsbuild

cmsbuild commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

-1

Failed Tests: RelVals-INPUT
Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-becf79/53691/summary.html
COMMIT: 2641014
CMSSW: CMSSW_17_0_X_2026-06-04-2300/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/51047/53691/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed RelVals-INPUT

  • 2500.4301DAS Error
  • 2023.0020002DAS Error
  • 2023.0020001DAS Error
Expand to see more relval errors ...
  • 2500.4302
  • 2025.0000002
  • 2025.0000001
  • 2024.0070001
  • 2024.0070002
  • 2022.0000001
  • 2022.0000002
  • 2500.3313
  • 2024.0030001
  • 2024.0030002
  • 2024.0020001
  • 2024.0020002
  • 2023.0000001
  • 2023.0000002
  • 2025.0020001
  • 2025.0020002
  • 2024.0050002
  • 2024.0050001
  • 2023.0010001
  • 2023.0010002
  • 2025.0010002
  • 2025.0010001
  • 2024.0000002
  • 2024.0000001
  • 2024.0040002
  • 2024.0040001
  • 2022.0010001
  • 2022.0010002
  • 2024.0010002
  • 2024.0010001
  • 2022.0020002
  • 2500.3312
  • 2022.0020001
  • 2024.0060001
  • 2024.0060002

Comparison Summary

Summary:

  • You potentially removed 24 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 69 differences found in the comparisons
  • DQMHistoTests: Total files compared: 67
  • DQMHistoTests: Total histograms compared: 4559069
  • DQMHistoTests: Total failures: 34414
  • DQMHistoTests: Total nulls: 4
  • DQMHistoTests: Total successes: 4524631
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 2729.141999999999 KiB( 66 files compared)
  • DQMHistoSizes: changed ( 34434.0,... ): 779.092 KiB HGCAL/HGCalValidator
  • DQMHistoSizes: changed ( 34434.0,... ): -64.793 KiB HLT/HGCAL
  • DQMHistoSizes: changed ( 34434.0,... ): -0.004 KiB MessageLogger/Errors
  • DQMHistoSizes: changed ( 34434.0,... ): -0.004 KiB MessageLogger/Warnings
  • DQMHistoSizes: changed ( 34634.999 ): -0.008 KiB MessageLogger/Warnings
  • Checked 283 log files, 241 edm output root files, 67 DQM output files
  • TriggerResults: found differences in 18 / 65 workflows

Max Memory Comparisons exceeding threshold

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

Expand to see workflows ...
  • Error: Workflow 34634.999_TTbar_14TeV+Run4D121PU_PMXS1S2PR step4 max memory diff 69.4 exceeds +/- 30.0 MiB
  • Error: Workflow 34634.999_TTbar_14TeV+Run4D121PU_PMXS1S2PR step3 max memory diff 64.8 exceeds +/- 30.0 MiB

@cmsbuild

cmsbuild commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Milestone for this pull request has been moved to CMSSW_20_0_X. Please open a backport if it should also go in to CMSSW_17_0_X.

@cmsbuild cmsbuild removed this from the CMSSW_17_0_X milestone Jun 5, 2026
@makortel

makortel commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

(I assume this PR does not need a backport to 17_0_X (Run 3 legacy))

@Moanwar

Moanwar commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

(I assume this PR does not need a backport to 17_0_X (Run 3 legacy))

yes

CaloParticle dataformat is not used anymore, replaced with new collection of "CaloParticle" SimClusters
Associators with CaloParticle are removed (SimCluster associators are used for the "CaloParticle" SimCluster collection)
TICL validation code is updated in consequence
SimTrackstersProducer is split into two producers : SimTrackstersProducers (only for simtracksters) and SimTICLCandidateProducer (produces SimTICLCandidates)
@cmsbuild

cmsbuild commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51047/49663

@cmsbuild

cmsbuild commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Pull request #51047 was updated. @Martin-Grunewald, @Moanwar, @civanch, @cmsbuild, @ctarricone, @gabrielmscampos, @jfernan2, @kpedro88, @mandrenguyen, @mdhildreth, @mmusich, @rseidita, @srimanob can you please check and sign again.

@Moanwar

Moanwar commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@cmsbuild please test

@tcuisset

tcuisset commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

I have rebased the PR to fix the conflict with the merging of the dataformats evolution.
I believe this PR is ready for review and possible merge.

For the DQM differences:

  • no differences in RECO as expected
  • some very small differences in anything involving SimCluster, as expected
  • some differences in Layer Cluster association to CaloParticle. This was not expected, but investigating the associator results the old LCtoCP associator had some weird outputs (shared energy of 0 sometimes) which are not seen in the LCtoSC associator (which is the only one kept in this PR). So it is likely there was a bug in the now-deleted associator.

also since we see no differences in the "allTracksterToTracksterAssociatorsByHits/ByLCs" with CaloParticle this would point towards an issue with the old LCtoCP associator rather than something related to CaloParticles themselves.

@cmsbuild

cmsbuild commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

+1

Size: This PR adds an extra 32KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-becf79/53729/summary.html
COMMIT: 8dc6c2a
CMSSW: CMSSW_20_0_X_2026-06-08-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/51047/53729/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 4 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 52 differences found in the comparisons
  • DQMHistoTests: Total files compared: 57
  • DQMHistoTests: Total histograms compared: 3504444
  • DQMHistoTests: Total failures: 31994
  • DQMHistoTests: Total nulls: 2
  • DQMHistoTests: Total successes: 3472430
  • DQMHistoTests: Total skipped: 18
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 2014.854999999999 KiB( 56 files compared)
  • DQMHistoSizes: changed ( 34434.0,... ): 779.092 KiB HGCAL/HGCalValidator
  • DQMHistoSizes: changed ( 34434.0,... ): -64.793 KiB HLT/HGCAL
  • DQMHistoSizes: changed ( 34434.0,... ): -0.004 KiB MessageLogger/Errors
  • DQMHistoSizes: changed ( 34434.0,... ): -0.004 KiB MessageLogger/Warnings
  • Checked 242 log files, 197 edm output root files, 57 DQM output files
  • TriggerResults: found differences in 17 / 56 workflows

@cmsbuild

cmsbuild commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Milestone for this pull request has been moved to CMSSW_20_1_X. Please open a backport if it should also go in to CMSSW_20_0_X.

Comment thread Validation/Configuration/python/hltHGCalSimValid_cff.py Outdated
Comment thread Validation/Configuration/python/hltHGCalSimValid_cff.py Outdated
Comment thread Validation/Configuration/python/hltHGCalSimValid_cff.py Outdated
Comment thread Validation/Configuration/python/hltHGCalSimValid_cff.py Outdated
Comment thread Validation/HGCalValidation/interface/HGVHistoProducerAlgo.h Outdated
Comment thread Validation/HGCalValidation/interface/HGVHistoProducerAlgo.h Outdated
Comment thread Validation/HGCalValidation/plugins/BarrelValidator.cc Outdated
return int(scToCpMap.at(simTS.seedIndex()).index());
}
};
auto getCPId =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function appears to be exactly repeated from HGVHistoProducerAlgo.cc. Would it make sense to designate a separate shared utility file to host this (and any other shared) function?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would definitely be a good idea. Then more generally the entire BarrelVHistoProducerAlgo is nearly entirely copied code from HGVHistoProducerAlgo, and same for BarrelValidator wrt HGCalValidator. So I would rather let TICL-barrel people deal with it.

Comment thread Validation/HGCalValidation/src/TICLCandidateValidator.cc Outdated
@cmsbuild

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51047/49696

@cmsbuild

Copy link
Copy Markdown
Contributor

Pull request #51047 was updated. @Martin-Grunewald, @Moanwar, @civanch, @cmsbuild, @ctarricone, @gabrielmscampos, @jfernan2, @kpedro88, @mandrenguyen, @mdhildreth, @mmusich, @rseidita, @srimanob can you please check and sign again.

@cmsbuild

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51047/49697

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.

9 participants