Skip to content

Phase-2 Global Trigger Emulator (backport of PR41808)#1156

Closed
epalencia wants to merge 2 commits intocms-l1t-offline:phase2-l1t-integration-1252patch1from
epalencia:backport41808_v3
Closed

Phase-2 Global Trigger Emulator (backport of PR41808)#1156
epalencia wants to merge 2 commits intocms-l1t-offline:phase2-l1t-integration-1252patch1from
epalencia:backport41808_v3

Conversation

@epalencia
Copy link

This PR includes the first version of the Phase-2 Global Trigger emulator that implements a bit-wise compatible emulation of the GT firmware. The PR includes the HLT-TDR simplified L1 menu (16 seeds), documented in this twiki: https://twiki.cern.ch/twiki/bin/viewauth/CMS/PhaseIIL1TriggerMenuTools#How_to_use_the_GT_Emulator

Backport of cms-sw#41808.

PR validation: the expected rates have been presented at the Annual Review (https://indico.cern.ch/event/1257943/#7-algorithms-and-physics-perfo).

epalencia and others added 2 commits July 28, 2023 10:57
Co-authored-by: Elias <elias.leutgeb@cern.ch>
Co-authored-by: jheikkil <jaana.kristiina.heikkilae@cern.ch>
(cherry picked from commit 2c267b2)
@epalencia
Copy link
Author

Currently does not compile:
L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc:361:39: error: 'const value_type' {aka 'const class l1t::PFTau'} has no member named 'getHWTauGT'

The backport of cms-sw#41492 is probably needed.

@epalencia epalencia added Phase-2 Pertains to phase-2 development Backport For backported content labels Jul 28, 2023
@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

Attempts to compile this PR failed.

The following is the stderr of the compilation attempt:

/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc: In constructor 'L1TrackNtupleMaker::L1TrackNtupleMaker(const edm::ParameterSet&)':
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:258:90: warning: 'edm::EDAnalyzer::EDAnalyzer()' is deprecated [-Wdeprecated-declarations]
  258 | L1TrackNtupleMaker::L1TrackNtupleMaker(edm::ParameterSet const& iConfig) : config(iConfig) {
      |                                                                                          ^
In file included from /nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:11:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EDAnalyzer.h:43:20: note: declared here
   43 |     CMS_DEPRECATED EDAnalyzer();
      |                    ^~~~~~~~~~
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc: In member function 'virtual void L1TrackNtupleMaker::analyze(const edm::Event&, const edm::EventSetup&)':
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:671:61: warning: 'bool edm::eventsetup::EventSetupRecord::get(HolderT&) const [with HolderT = edm::ESHandle<TrackerGeometry>]' is deprecated [-Wdeprecated-declarations]
  671 |   iSetup.get<TrackerDigiGeometryRecord>().get(geometryHandle);
      |                                                             ^
In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetup.h:33,
                 from /nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:14:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetupRecord.h:110:27: note: declared here
  110 |       CMS_DEPRECATED bool get(HolderT& iHolder) const {
      |                           ^~~
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:674:51: warning: 'bool edm::eventsetup::EventSetupRecord::get(HolderT&) const [with HolderT = edm::ESHandle<TrackerTopology>]' is deprecated [-Wdeprecated-declarations]
  674 |   iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
      |                                                   ^
In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetup.h:33,
                 from /nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:14:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetupRecord.h:110:27: note: declared here
  110 |       CMS_DEPRECATED bool get(HolderT& iHolder) const {
      |                           ^~~
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:677:58: warning: 'bool edm::eventsetup::EventSetupRecord::get(HolderT&) const [with HolderT = edm::ESHandle<TrackerGeometry>]' is deprecated [-Wdeprecated-declarations]
  677 |   iSetup.get<TrackerDigiGeometryRecord>().get(tGeomHandle);
      |                                                          ^
In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetup.h:33,
                 from /nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:14:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetupRecord.h:110:27: note: declared here
  110 |       CMS_DEPRECATED bool get(HolderT& iHolder) const {
      |                           ^~~
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:680:65: warning: 'bool edm::eventsetup::EventSetupRecord::get(HolderT&) const [with HolderT = edm::ESHandle<MagneticField>]' is deprecated [-Wdeprecated-declarations]
  680 |   iSetup.get<IdealMagneticFieldRecord>().get(magneticFieldHandle);
      |                                                                 ^
In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetup.h:33,
                 from /nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:14:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetupRecord.h:110:27: note: declared here
  110 |       CMS_DEPRECATED bool get(HolderT& iHolder) const {
      |                           ^~~
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc: In constructor 'L1PhaseIITreeProducer::L1PhaseIITreeProducer(const edm::ParameterSet&)':
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc:189:78: warning: 'edm::EDAnalyzer::EDAnalyzer()' is deprecated [-Wdeprecated-declarations]
  189 | L1PhaseIITreeProducer::L1PhaseIITreeProducer(const edm::ParameterSet& iConfig) {
      |                                                                              ^
In file included from /nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc:25:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EDAnalyzer.h:43:20: note: declared here
   43 |     CMS_DEPRECATED EDAnalyzer();
      |                    ^~~~~~~~~~
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc: In member function 'virtual void L1PhaseIITreeProducer::analyze(const edm::Event&, const edm::EventSetup&)':
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc:370:9: warning: unused variable 'Z0' [-Wunused-variable]
  370 |   float Z0 = *z0Puppi;
      |         ^~
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc:5:10: fatal error: FWCore/Framework/interface/TypeMatch.h: No such file or directory
    5 | #include "FWCore/Framework/interface/TypeMatch.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc:5:10: fatal error: FWCore/Framework/interface/TypeMatch.h: No such file or directory
    5 | #include "FWCore/Framework/interface/TypeMatch.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake: *** [config/SCRAM/GMake/Makefile.rules:1712: tmp/slc7_amd64_gcc10/src/L1Trigger/Phase2L1GT/plugins/L1TriggerPhase2L1GTAuto/L1GTAlgoBlockProducer.cc.o] Error 1
gmake: *** Waiting for unfinished jobs....

Info Value
return code 2
command eval scramv1 runtime -sh && scram b -j 8

@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

This PR failed the code checks.

I found the following lines where an "error" was mentioned, they may help in debugging

/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc:5:10: error: 'FWCore/Framework/interface/TypeMatch.h' file not found [clang-diagnostic-error]
...
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc:290:25: error: no matching function for call to 'unpack' [clang-diagnostic-error]
...
/nfs_scratch/aloeliger/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc:361:39: error: no member named 'getHWTauGT' in 'l1t::PFTau' [clang-diagnostic-error]
...

Please check and see if these lines help debugging.

Info Value
return code 2
command eval scramv1 runtime -sh && scram b -k -j 8 code-checks && scram b -k -j 8 code-checks

I found no issues with the headers!

Info Value
return code 0
command eval scramv1 runtime -sh && scram b -k -j 8 check-headers

@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

I found 1 files that did not meet formatting requirements:

  • L1Trigger/L1CaloTrigger/plugins/L1EGammaCrystalsEmulatorProducer.cc

Please run scram b code-format to auto-apply code formatting

Info Value
return code 0
command eval scramv1 runtime -sh && scram b -k -j 8 code-format-all

@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

Attempts to compile this PR failed.

The following is the stderr of the compilation attempt:

/tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc: In constructor 'L1TrackNtupleMaker::L1TrackNtupleMaker(const edm::ParameterSet&)':
/tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:258:90: warning: 'edm::EDAnalyzer::EDAnalyzer()' is deprecated [-Wdeprecated-declarations]
  258 | L1TrackNtupleMaker::L1TrackNtupleMaker(edm::ParameterSet const& iConfig) : config(iConfig) {
      |                                                                                          ^
In file included from /tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:11:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EDAnalyzer.h:43:20: note: declared here
   43 |     CMS_DEPRECATED EDAnalyzer();
      |                    ^~~~~~~~~~
/tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc: In member function 'virtual void L1TrackNtupleMaker::analyze(const edm::Event&, const edm::EventSetup&)':
/tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:671:61: warning: 'bool edm::eventsetup::EventSetupRecord::get(HolderT&) const [with HolderT = edm::ESHandle<TrackerGeometry>]' is deprecated [-Wdeprecated-declarations]
  671 |   iSetup.get<TrackerDigiGeometryRecord>().get(geometryHandle);
      |                                                             ^
In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetup.h:33,
                 from /tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:14:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetupRecord.h:110:27: note: declared here
  110 |       CMS_DEPRECATED bool get(HolderT& iHolder) const {
      |                           ^~~
/tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:674:51: warning: 'bool edm::eventsetup::EventSetupRecord::get(HolderT&) const [with HolderT = edm::ESHandle<TrackerTopology>]' is deprecated [-Wdeprecated-declarations]
  674 |   iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
      |                                                   ^
In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetup.h:33,
                 from /tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:14:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetupRecord.h:110:27: note: declared here
  110 |       CMS_DEPRECATED bool get(HolderT& iHolder) const {
      |                           ^~~
/tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:677:58: warning: 'bool edm::eventsetup::EventSetupRecord::get(HolderT&) const [with HolderT = edm::ESHandle<TrackerGeometry>]' is deprecated [-Wdeprecated-declarations]
  677 |   iSetup.get<TrackerDigiGeometryRecord>().get(tGeomHandle);
      |                                                          ^
In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetup.h:33,
                 from /tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:14:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetupRecord.h:110:27: note: declared here
  110 |       CMS_DEPRECATED bool get(HolderT& iHolder) const {
      |                           ^~~
/tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:680:65: warning: 'bool edm::eventsetup::EventSetupRecord::get(HolderT&) const [with HolderT = edm::ESHandle<MagneticField>]' is deprecated [-Wdeprecated-declarations]
  680 |   iSetup.get<IdealMagneticFieldRecord>().get(magneticFieldHandle);
      |                                                                 ^
In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetup.h:33,
                 from /tmp/palencia/pr_1156/new/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc:14:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EventSetupRecord.h:110:27: note: declared here
  110 |       CMS_DEPRECATED bool get(HolderT& iHolder) const {
      |                           ^~~
/tmp/palencia/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc: In constructor 'L1PhaseIITreeProducer::L1PhaseIITreeProducer(const edm::ParameterSet&)':
/tmp/palencia/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc:189:78: warning: 'edm::EDAnalyzer::EDAnalyzer()' is deprecated [-Wdeprecated-declarations]
  189 | L1PhaseIITreeProducer::L1PhaseIITreeProducer(const edm::ParameterSet& iConfig) {
      |                                                                              ^
In file included from /tmp/palencia/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc:25:
/cvmfs/cms.cern.ch/slc7_amd64_gcc10/cms/cmssw-patch/CMSSW_12_5_2_patch1/src/FWCore/Framework/interface/EDAnalyzer.h:43:20: note: declared here
   43 |     CMS_DEPRECATED EDAnalyzer();
      |                    ^~~~~~~~~~
/tmp/palencia/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc: In member function 'virtual void L1PhaseIITreeProducer::analyze(const edm::Event&, const edm::EventSetup&)':
/tmp/palencia/pr_1156/new/src/L1Trigger/L1TNtuples/plugins/L1PhaseIITreeProducer.cc:370:9: warning: unused variable 'Z0' [-Wunused-variable]
  370 |   float Z0 = *z0Puppi;
      |         ^~
/tmp/palencia/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc:5:10: fatal error: FWCore/Framework/interface/TypeMatch.h: No such file or directory
    5 | #include "FWCore/Framework/interface/TypeMatch.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/tmp/palencia/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc:5:10: fatal error: FWCore/Framework/interface/TypeMatch.h: No such file or directory
    5 | #include "FWCore/Framework/interface/TypeMatch.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake: *** [config/SCRAM/GMake/Makefile.rules:1712: tmp/slc7_amd64_gcc10/src/L1Trigger/Phase2L1GT/plugins/L1TriggerPhase2L1GTAuto/L1GTAlgoBlockProducer.cc.o] Error 1
gmake: *** Waiting for unfinished jobs....

Info Value
return code 2
command eval scramv1 runtime -sh && scram b -j 8

@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

This PR failed the code checks.

I found the following lines where an "error" was mentioned, they may help in debugging

/tmp/palencia/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc:290:25: error: no matching function for call to 'unpack' [clang-diagnostic-error]
...
/tmp/palencia/pr_1156/new/src/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc:5:10: error: 'FWCore/Framework/interface/TypeMatch.h' file not found [clang-diagnostic-error]
...

Please check and see if these lines help debugging.

Info Value
return code 2
command eval scramv1 runtime -sh && scram b -k -j 8 code-checks && scram b -k -j 8 code-checks

I found no issues with the headers!

Info Value
return code 0
command eval scramv1 runtime -sh && scram b -k -j 8 check-headers

@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

I found 1 files that did not meet formatting requirements:

  • L1Trigger/L1CaloTrigger/plugins/L1EGammaCrystalsEmulatorProducer.cc

Please run scram b code-format to auto-apply code formatting

Info Value
return code 0
command eval scramv1 runtime -sh && scram b -k -j 8 code-format-all

@epalencia
Copy link
Author

Currently does not compile: L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc:361:39: error: 'const value_type' {aka 'const class l1t::PFTau'} has no member named 'getHWTauGT'

The backport of cms-sw#41492 is probably needed.

Still failing after adding #1087, the backport of cms-sw#41492

@aloeliger
Copy link

This was a difference introduced in Duc's PR going along with the whole global caching thing I think.

Currently does not compile: L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc:361:39: error: 'const value_type' {aka 'const class l1t::PFTau'} has no member named 'getHWTauGT'
The backport of cms-sw#41492 is probably needed.

Still failing after adding #1087, the backport of cms-sw#41492

The failure here according to @triggerDoctor is a missing file #include "FWCore/Framework/interface/TypeMatch.h"

Taking a look, this file was introduced at some point between CMSSW_13_0_0 and CMSSW_13_0_1 I think.

Fundamentally what this means is that the GT emulator is not going to be compatable with anything less than CMSSW_13_0_1. We may need to finally move the phase 2 branch forward to CMSSW_13_1_0 if we want to get up to date on this one. @epalencia, should we discuss the project of trying to rebase the phase 2 development branch?

@epalencia
Copy link
Author

Thanks @aloeliger for the investigations. I will then close this PR.

@epalencia epalencia closed this Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport For backported content Phase-2 Pertains to phase-2 development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments