Skip to content

HLTTauDQM: support for PatTau ref objects #45648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

slehti
Copy link
Contributor

@slehti slehti commented Aug 6, 2024

PR description:

Added a creation of pat taus and using them as offline reference objects. That way we can have tau discriminators available, and better offline tau reference object selection.

The DQM plots contain now two sets, one with default medium working point tau against jet selection, and another with decayModeFinding only. The latter plots are named with string 'LowPurity'.

As the offline tau selection changes, expecting differences between new and old plots, however, old plots and new low purity plots should be identical.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 6, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 6, 2024

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 6, 2024

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

It involves the following packages:

  • DQMOffline/Trigger (dqm)

@antoniovagnerini, @cmsbuild, @nothingface0, @rvenditti, @syuvivida, @tjavaid can you please review it and eventually sign? Thanks.
@Fedespring, @HuguesBrun, @cericeci, @jhgoh, @missirol, @mmusich, @mtosi, @rociovilar, @trocino this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@mmusich
Copy link
Contributor

mmusich commented Aug 6, 2024

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 6, 2024

-1

Failed Tests: RelVals RelVals-INPUT
Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-228323/40804/summary.html
COMMIT: 9cd6573
CMSSW: CMSSW_14_1_X_2024-08-06-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45648/40804/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals

----- Begin Fatal Exception 06-Aug-2024 18:48:08 CEST-----------------------
An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 160960 lumi: 277 event: 10001082 stream: 0
   [1] Running path 'dqmoffline_step'
   [2] Prefetching for module HLTTauRefProducer/'TauRefProducerLowPurity'
   [3] Calling method for module PATTauProducer/'patTaus'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for a container with elements of type: reco::BaseTau
Looking for module label: hpsPFTauProducer
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 -------------------------------------------------
----- Begin Fatal Exception 06-Aug-2024 18:49:55 CEST-----------------------
An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 1 lumi: 1 event: 1 stream: 0
   [1] Running path 'dqmoffline_step'
   [2] Prefetching for module HLTTauRefProducer/'TauRefProducerLowPurity'
   [3] Calling method for module PATTauProducer/'patTaus'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for a container with elements of type: reco::BaseTau
Looking for module label: hpsPFTauProducer
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 -------------------------------------------------
----- Begin Fatal Exception 06-Aug-2024 18:51:19 CEST-----------------------
An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 1 lumi: 1 event: 509 stream: 0
   [1] Running path 'dqmoffline_step'
   [2] Prefetching for module HLTTauRefProducer/'TauRefProducerLowPurity'
   [3] Calling method for module PATTauProducer/'patTaus'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for a container with elements of type: reco::BaseTau
Looking for module label: hpsPFTauProducer
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 -------------------------------------------------

RelVals-INPUT

  • 4.224.22_RunCosmics2011A/step2_RunCosmics2011A.log
  • 134.813134.813_RunCosmics2015C/step2_RunCosmics2015C.log
  • 136.733136.733_RunCosmics2016B/step2_RunCosmics2016B.log
Expand to see more relval errors ...

@cmsbuild
Copy link
Contributor

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

@cmsbuild cmsbuild modified the milestones: CMSSW_14_1_X, CMSSW_14_2_X Aug 27, 2024
@slehti
Copy link
Contributor Author

slehti commented Aug 29, 2024

Tested this PR with 2024G, and it worked. Tried to test with 2011A Cosmics, but it seems the files are only on tape with no user access. How to proceed with this PR?

@cmsbuild cmsbuild modified the milestones: CMSSW_14_1_X, CMSSW_14_2_X Aug 29, 2024
@mmusich
Copy link
Contributor

mmusich commented Aug 29, 2024

How to proceed with this PR?

I would suggest trying one of the workflows that failed, e.g.: runTheMatrix.py - l 7.3 --ibeos

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2025

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45648/43983

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@mmusich
Copy link
Contributor

mmusich commented Mar 7, 2025

@slehti, please run scram b code-format and push again with the changes proposed by the compiler.

…HLT Tau DQM. Fixed to check the return value of getByToken()
@slehti
Copy link
Contributor Author

slehti commented Mar 7, 2025

Did that, tried to amend to previous commit, but now push is rejected..

@mmusich
Copy link
Contributor

mmusich commented Mar 7, 2025

Did that, tried to amend to previous commit, but now push is rejected..

git push my-cmssw +HEAD:HLTTauValidationUpdate_PatTauRef

@slehti slehti force-pushed the HLTTauValidationUpdate_PatTauRef branch from 953299d to 9765bdb Compare March 7, 2025 08:15
@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2025

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2025

Pull request #45648 was updated. @antoniovagnerini, @cmsbuild, @ftorrresd, @hqucms, @jfernan2, @mandrenguyen, @rseidita can you please check and sign again.

@mmusich
Copy link
Contributor

mmusich commented Mar 7, 2025

@cmsbuild, please test

@mmusich
Copy link
Contributor

mmusich commented Mar 7, 2025

type tau

@cmsbuild cmsbuild added the tau label Mar 7, 2025
@mmusich
Copy link
Contributor

mmusich commented Mar 7, 2025

type bug-fix

  • change in PATTauProducer is effectively a fix

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2025

-1

Failed Tests: RelVals-INPUT
Size: This PR adds an extra 36KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-228323/44844/summary.html
COMMIT: 9765bdb
CMSSW: CMSSW_15_1_X_2025-03-06-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45648/44844/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

  • 136.7801136.7801_RunHLTPhy2017B_AOD/step2_RunHLTPhy2017B_AOD.log
  • 136.7803136.7803_RunHLTPhy2017B_RAWAOD/step2_RunHLTPhy2017B_RAWAOD.log

Comparison Summary

Summary:

  • You potentially added 736 lines to the logs
  • Reco comparison results: 22 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3920300
  • DQMHistoTests: Total failures: 1643
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3918637
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 2519.541000000001 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 1000.0 ): 24.534 KiB HLT/TAU
  • DQMHistoSizes: changed ( 139.001 ): 7.742 KiB HLT/TAU
  • DQMHistoSizes: changed ( 145.014,... ): 247.036 KiB HLT/TAU
  • DQMHistoSizes: changed ( 4.22,... ): 5.635 KiB HLT/TAU
  • Checked 214 log files, 184 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@mmusich
Copy link
Contributor

mmusich commented Mar 7, 2025

the errors are reduced by these persist:

----- Begin Fatal Exception 07-Mar-2025 09:38:49 CET-----------------------
An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 297227 lumi: 1 event: 53500 stream: 0
   [1] Running path 'dqmoffline_step'
   [2] Prefetching for module HLTTauRefProducer/'TauRefProducerLowPurity'
   [3] Calling method for module PATTauProducer/'patTaus'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for type: edm::ValueMap<reco::SingleTauDiscriminatorContainer>
Looking for module label: hpsPFTauBasicDiscriminators
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 -------------------------------------------------

@slehti
Copy link
Contributor Author

slehti commented Mar 7, 2025

The problem seems to be the following:
-in winter24 MC i used for testing, there are 4 tau discriminators and 3 discr containers. - it's working.
-in Run2017B AOD (136.7801) used by the check there are 84 tau discriminators and 0 discr containers. -failing.
Do we need to rerun Tau reco to get this working?

@mmusich
Copy link
Contributor

mmusich commented Mar 7, 2025

Do we need to rerun Tau reco to get this working?

as far as I can tell, the issue is that this check on the handle validity here:

auto pfTauIdDiscr = iEvent.getHandle(pfTauIDTokens_[i]);
if (skipMissingTauID_ && !pfTauIdDiscr.isValid()) {

is made vain by the configuration of this parameter:

skipMissingTauID = cms.bool(False), #Allow to skip a tau ID variable when not present in the event"

I am not a tau reconstruction expert, but I am wondering if one could think about using the existing tau_readOldDiscriminatorFormat process modifier (used in the two failing workflows 136.7801 and 136.7803) to flip that bit and skip the missing tau IDs. @cms-sw/tau-pog-l2 or @cms-sw/xpog-l2 might have better suggestions.

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