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

Add HW variables for standalone EG objects #1

Open
artlbv opened this issue Oct 19, 2023 · 3 comments
Open

Add HW variables for standalone EG objects #1

artlbv opened this issue Oct 19, 2023 · 3 comments
Labels
bug Something isn't working cmssw

Comments

@artlbv
Copy link
Contributor

artlbv commented Oct 19, 2023

In the current way we use the CandViewMerger to merge the barrel and endcap EG collections:

staEGmerged = cms.EDProducer("CandViewMerger",
src = cms.VInputTag(
cms.InputTag('l1tPhase2L1CaloEGammaEmulator','GCTEGammas'),
cms.InputTag('l1tLayer2EG','L1CtEgEE'),

This works with the SimpleCandidateFlatTableProducer but it fails when trying to access the HW values e.g. hwQual.

One can use the SimpleTriggerL1EGFlatTableProducer created for the BX Vector EG collection for Phase-1 to access this hwQual for the individual barrel and endcap collections separately though.

But when trying to use the SimpleTriggerL1EGFlatTableProducer on the Merged collection it fails:

An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 1 lumi: 677 event: 198889 stream: 0
   [1] Running path 'end'
   [2] Prefetching for module NanoAODOutputModule/'outnano'
   [3] Calling method for module SimpleTriggerL1EGFlatTableProducer/'staEGTable'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for type: BXVector<l1t::EGamma>
Looking for module label: staEGmerged
Looking for productInstanceName: 

It seems that the merged collection does not preserve the BXVector<l1t::EGamma> type?
Thus we have to figure out a way to properly merge these two EG collections and make a table from them.

@artlbv artlbv added cmssw bug Something isn't working labels Oct 19, 2023
@artlbv
Copy link
Contributor Author

artlbv commented Nov 9, 2023

@cerminar
Copy link

The behavior seems consistent with expectations.
The CandViewMerger.cc produces a merged collection of type reco::CandidateCollection and not BXVector<l1t::EGamma>. I didn't manage to instantiate a generic Merge<> for BXVector.
Possible solutions would be:

  • custom merger module for BXVector<l1t::EGamma>
  • generic FlatTable merger.

Maybe the second already exists somewhere in the CMSSW repo?

@artlbv
Copy link
Contributor Author

artlbv commented Nov 12, 2024

Note: currently we overcome this in the MenuTools by merging the endcap and barrel standalone EG tables after caching:
https://github.com/cms-l1-dpg/Phase2-L1MenuTools/blob/main/menu_tools/caching/merge_arrays.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmssw
Projects
None yet
Development

No branches or pull requests

2 participants