Skip to content
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

Phase-2 TauMinator Tau (NNCaloTau) #42840

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

jonamotta
Copy link
Contributor

@jonamotta jonamotta commented Sep 21, 2023

PR description:

This PR uploads the Phase-2 NN Calo Tau producer and emulator - The TauMinator.

The producer/eulator reconstructs and identifies tau candidates at L1 Trigger with a CNN.
The output is a standard BXVector filled with tau objects.
For simplicity, the dataformat of taus is kept the same as the one of Phase-1

The producer/emulator depends on .pb files containing the graphs of the various NNs, which can be found in this PR#1.

Some details about the algorithm and its performance can be found in this DPS Note.
Some additional details in reports made at the L1 DPG meetings in this presentation and this presentation

INFO : IN THE EMULATOR THE NNs ARE STILL APPLIED USING THE TENSORFLOW SOFTWARE
It has already been shown in other contexts that tensorflow softwrae and full emulation are very close to each other

PR validation:

The code has been validated with the use of the following two standard commands:
scram build code-checks
scram build code-format
and in both cases no error or warning was prompted by the code in this PR.

WP definition and usage:

The WPs on the tau identification are defined based on the total efficiency of the algorithm, i.e. 90/95/99%.
The WPs cut is applied directly in the code and a "quality flag" is saved in the produced taus.
For simplicity, the dataformat of taus is kept the same as the one of Phase-1.
The "quality flag" in the output tau is stored in the hardware quality property of the tau, and can be accessed as:

const l1t::Tau& tau = ...;
tau.hwQual();

The WP-hwQual correspondance is:

  • 90% --> 3
  • 95% --> 2
  • 99% --> 1
  • anything else --> 0

The results in the presentations linked above are all obtained using the 90% WP, which corresponds to asking tau.hwQual()==3; to use the other two WP the requirement would be tau.hwQual()>=2 and tau.hwQual()>=1 for 95 and 99% WP, respectively.

Related PRs

PR to l1t-integration PR #1197
PR to L1Trigger-L1CaloTrigger PR#1

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42840/36970

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 21, 2023

A new Pull Request was created by @jonamotta (Jona Motta) for master.

It involves the following packages:

  • L1Trigger/Configuration (l1)
  • L1Trigger/L1CaloTrigger (upgrade, l1)

@epalencia, @AdrianoDee, @srimanob, @cmsbuild, @aloeliger can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @missirol this is something you requested to watch as well.
@rappoccio, @antoniovilela, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

L1Trigger/L1CaloTrigger/plugins/L1NNCaloTauEmulator.cc Outdated Show resolved Hide resolved
L1Trigger/L1CaloTrigger/plugins/L1NNCaloTauEmulator.cc Outdated Show resolved Hide resolved
L1Trigger/L1CaloTrigger/plugins/L1NNCaloTauEmulator.cc Outdated Show resolved Hide resolved
L1Trigger/L1CaloTrigger/plugins/L1NNCaloTauEmulator.cc Outdated Show resolved Hide resolved
L1Trigger/L1CaloTrigger/plugins/L1NNCaloTauEmulator.cc Outdated Show resolved Hide resolved
L1Trigger/L1CaloTrigger/plugins/L1NNCaloTauProducer.cc Outdated Show resolved Hide resolved
L1Trigger/L1CaloTrigger/python/l1tNNCaloTauProducer_cff.py Outdated Show resolved Hide resolved
L1Trigger/L1CaloTrigger/python/l1tNNCaloTauProducer_cfi.py Outdated Show resolved Hide resolved
@aloeliger
Copy link
Contributor

Has this been approved by the Calotrigger group?

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42840/36979

  • This PR adds an extra 28KB to repository

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

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42840/36980

  • This PR adds an extra 32KB to repository

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

@jonamotta
Copy link
Contributor Author

jonamotta commented Sep 23, 2023

Has this been approved by the Calotrigger group?

Yes, the algorithm has been approved at the time of the DPS Note approval.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42840/36984

  • This PR adds an extra 36KB to repository

@antoniovilela
Copy link
Contributor

@jonamotta
Before merging, it seems one could squash several or even all commits (e.g. using the "git cms-squash-topic" command)?
Thanks.

@jonamotta
Copy link
Contributor Author

@antoniovilela I have tried to do as suggested (following the only documentation I found on the command) and the only thing I get is Already up to date. (nothing to squash). So I might be doing it wrong, maybe you have some suggestions?

@antoniovilela
Copy link
Contributor

@antoniovilela I have tried to do as suggested (following the only documentation I found on the command) and the only thing I get is Already up to date. (nothing to squash). So I might be doing it wrong, maybe you have some suggestions?

What command did you run? Once squashing, check your commit history. If all ok, then force push to your branch.

commit 841edda
Author: Jona Motta <[email protected]>
Date:   Wed Jan 10 15:42:58 2024 +0100

    correct fillDescriptions VPSet default

commit 3115ddd
Author: Jona Motta <[email protected]>
Date:   Tue Jan 9 16:22:50 2024 +0100

    fix filDescriptions + correct class names

commit 9a74702
Author: Jona Motta <[email protected]>
Date:   Tue Jan 9 16:22:19 2024 +0100

    remove manual cfi to leave only automatic one

commit 767c50f
Author: Jona Motta <[email protected]>
Date:   Tue Dec 12 09:27:26 2023 +0100

    remove unused variable for good

commit e23d232
Author: Jona Motta <[email protected]>
Date:   Tue Dec 12 08:54:41 2023 +0100

    third try at removing unused variable warning

commit 6a864d4
Author: Jona Motta <[email protected]>
Date:   Mon Dec 11 22:23:25 2023 +0100

    second try at tricking the compiler for unused variable

commit 3671cb3
Author: Jona Motta <[email protected]>
Date:   Mon Dec 11 17:59:31 2023 +0100

    fix unused variable warning

commit 42496f5
Author: Jona Motta <[email protected]>
Date:   Mon Dec 11 16:17:01 2023 +0100

    modify to include global cache for tensorflow

commit 98752b3
Author: Jona Motta <[email protected]>
Date:   Sat Sep 23 15:40:30 2023 +0200

    code checks and format

commit fbac0ba
Author: Jona Motta <[email protected]>
Date:   Sat Sep 23 15:34:01 2023 +0200

    transform loop repetition in function

commit a65892e
Author: Jona Motta <[email protected]>
Date:   Sat Sep 23 14:59:17 2023 +0200

    add fillDescriptions

commit e4f631d
Author: Jona Motta <[email protected]>
Date:   Sat Sep 23 11:24:43 2023 +0200

    address some comments

commit 6ba8576
Author: Jona Motta <[email protected]>
Date:   Thu Sep 21 10:00:27 2023 +0200

    upload TauMinator (NN Calo Tau) code
@jonamotta
Copy link
Contributor Author

@antoniovilela I have tried to do as suggested (following the only documentation I found on the command) and the only thing I get is Already up to date. (nothing to squash). So I might be doing it wrong, maybe you have some suggestions?

What command did you run? Once squashing, check your commit history. If all ok, then force push to your branch.

@antoniovilela done as requested. Looks good to me now.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42840/38973

@cmsbuild
Copy link
Contributor

Pull request #42840 was updated. can you please check and sign again.

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-c1e968/37592/summary.html
COMMIT: 357d010
CMSSW: CMSSW_14_1_X_2024-02-20-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals

----- Begin Fatal Exception 21-Feb-2024 09:31:29 CET-----------------------
An exception of category 'FileInPathError' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing module: class=L1NNCaloTauEmulator label='l1tNNCaloTauEmulator'
Exception Message:
edm::FileInPath unable to find file L1Trigger/L1CaloTrigger/data/Phase2_NNCaloTaus/v22/CNNmodel_CB.pb anywhere in the search path.
The search path is defined by: CMSSW_SEARCH_PATH
${CMSSW_SEARCH_PATH} is: /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/poison:/cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/src:/cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/external/el8_amd64_gcc12/data:/cvmfs/cms-ib.cern.ch/sw/x86_64/week1/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_14_1_X_2024-02-20-2300/poison:/cvmfs/cms-ib.cern.ch/sw/x86_64/week1/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_14_1_X_2024-02-20-2300/src
Current directory is: /data/cmsbld/jenkins/workspace/ib-run-pr-relvals/matrix-results/24896.0_CloseByPGun_CE_E_Front_120um+2026D98
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 21-Feb-2024 09:31:51 CET-----------------------
An exception of category 'FileInPathError' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing module: class=L1NNCaloTauEmulator label='l1tNNCaloTauEmulator'
Exception Message:
edm::FileInPath unable to find file L1Trigger/L1CaloTrigger/data/Phase2_NNCaloTaus/v22/CNNmodel_CB.pb anywhere in the search path.
The search path is defined by: CMSSW_SEARCH_PATH
${CMSSW_SEARCH_PATH} is: /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/poison:/cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/src:/cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/external/el8_amd64_gcc12/data:/cvmfs/cms-ib.cern.ch/sw/x86_64/week1/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_14_1_X_2024-02-20-2300/poison:/cvmfs/cms-ib.cern.ch/sw/x86_64/week1/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_14_1_X_2024-02-20-2300/src
Current directory is: /data/cmsbld/jenkins/workspace/ib-run-pr-relvals/matrix-results/24900.0_CloseByPGun_CE_H_Coarse_Scint+2026D98
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 21-Feb-2024 09:34:53 CET-----------------------
An exception of category 'FileInPathError' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing module: class=L1NNCaloTauEmulator label='l1tNNCaloTauEmulator'
Exception Message:
edm::FileInPath unable to find file L1Trigger/L1CaloTrigger/data/Phase2_NNCaloTaus/v22/CNNmodel_CB.pb anywhere in the search path.
The search path is defined by: CMSSW_SEARCH_PATH
${CMSSW_SEARCH_PATH} is: /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/poison:/cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/src:/cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37592/CMSSW_14_1_X_2024-02-20-2300/external/el8_amd64_gcc12/data:/cvmfs/cms-ib.cern.ch/sw/x86_64/week1/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_14_1_X_2024-02-20-2300/poison:/cvmfs/cms-ib.cern.ch/sw/x86_64/week1/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_14_1_X_2024-02-20-2300/src
Current directory is: /data/cmsbld/jenkins/workspace/ib-run-pr-relvals/matrix-results/24834.0_TTbar_14TeV+2026D98
----- End Fatal Exception -------------------------------------------------
Expand to see more relval errors ...

RelVals-INPUT

  • 20834.020834.0_TTbar_14TeV+2026D88/step2_TTbar_14TeV+2026D88.log
  • 24034.024034.0_TTbar_14TeV+2026D96/step2_TTbar_14TeV+2026D96.log
  • 23634.023634.0_TTbar_14TeV+2026D95/step2_TTbar_14TeV+2026D95.log
Expand to see more relval errors ...

@aloeliger
Copy link
Contributor

Please test with cms-data/L1Trigger-L1CaloTrigger#1

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-c1e968/37594/summary.html
COMMIT: 357d010
CMSSW: CMSSW_14_1_X_2024-02-20-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42840/37594/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 176 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 58 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3248389
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3248358
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 200 log files, 161 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 51ca749 into cms-sw:master Feb 21, 2024
12 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.