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

ClusterTask (in DQM/EcalMonitorTasks) depends on legacy L1T Global Trigger information #46715

Open
mmusich opened this issue Nov 16, 2024 · 5 comments

Comments

@mmusich
Copy link
Contributor

mmusich commented Nov 16, 2024

While reviewing the Ecal online DQM code in order to work around the issues reported at CMSALCAFAST-94, I noticed that ClusterTask (in the DQM/EcalMonitorTasks package) doesn't support natively the current (Run3) stage2 L1T, but requires information from the (Run1) legacy global trigger, see for example the ClusterTask::beginEvent function:

void ClusterTask::beginEvent(edm::Event const& _evt, edm::EventSetup const& _es, bool const&, bool&) {
if (!doExtra_)
return;
triggered_.reset();
// TODO IS THIS THE MOST UP-TO-DATE ACCESSOR TO L1 INFO?
edm::Handle<L1GlobalTriggerReadoutRecord> l1GTHndl;
_evt.getByToken(L1GlobalTriggerReadoutRecordToken_, l1GTHndl);
DecisionWord const& dWord(l1GTHndl->decisionWord());
//Ecal
L1GtTriggerMenu const* menu(&_es.getData(menuRcd));
if (!dWord.empty()) { //protect against no L1GT in run
for (unsigned iT(0); iT != egTriggerAlgos_.size(); ++iT) {
if (menu->gtAlgorithmResult(egTriggerAlgos_[iT], dWord)) {
triggered_.set(kEcalTrigger);
break;
}
}
}
//Hcal
bool hcal_top = false;
bool hcal_bot = false;
const L1GtPsbWord psb = l1GTHndl->gtPsbWord(0xbb0d, 0);
std::vector<int> valid_phi;
if ((psb.aData(4) & 0x3f) >= 1) {
valid_phi.push_back((psb.aData(4) >> 10) & 0x1f);
}
if ((psb.bData(4) & 0x3f) >= 1) {
valid_phi.push_back((psb.bData(4) >> 10) & 0x1f);
}
if ((psb.aData(5) & 0x3f) >= 1) {
valid_phi.push_back((psb.aData(5) >> 10) & 0x1f);
}
if ((psb.bData(5) & 0x3f) >= 1) {
valid_phi.push_back((psb.bData(5) >> 10) & 0x1f);
}
std::vector<int>::const_iterator iphi;
for (iphi = valid_phi.begin(); iphi != valid_phi.end(); iphi++) {
if (*iphi < 9)
hcal_top = true;
if (*iphi > 8)
hcal_bot = true;
}
if (hcal_top && hcal_bot)
triggered_.set(kHcalTrigger);
//Muons
edm::Handle<L1MuGMTReadoutCollection> l1MuHndl;
if (!_evt.getByToken(L1MuGMTReadoutCollectionToken_, l1MuHndl))
return;
std::vector<L1MuGMTReadoutRecord> const& records(l1MuHndl->getRecords());
for (unsigned iR(0); iR != records.size(); ++iR) {
if (records[iR].getBxInEvent() != 0)
continue;
unsigned iC(0);
//DT triggers
std::vector<L1MuRegionalCand> dtBXCands(records[iR].getDTBXCands());
for (iC = 0; iC != dtBXCands.size(); ++iC)
if (!dtBXCands[iC].empty())
break;
if (iC != dtBXCands.size())
triggered_.set(kDTTrigger);
//RPC triggers
std::vector<L1MuRegionalCand> brlRPCCands(records[iR].getBrlRPCCands());
for (iC = 0; iC != brlRPCCands.size(); ++iC)
if (!brlRPCCands[iC].empty())
break;
if (iC != brlRPCCands.size())
triggered_.set(kRPCTrigger);
//CSC Triggers
std::vector<L1MuRegionalCand> cscCands(records[iR].getCSCCands());
for (iC = 0; iC != cscCands.size(); ++iC)
if (!cscCands[iC].empty())
break;
if (iC != cscCands.size())
triggered_.set(kCSCTrigger);
}
if (triggered_.none())
return;
MESet& meTriggers(MEs_.at("Triggers"));
MESet& meExclusiveTriggers(MEs_.at("ExclusiveTriggers"));
for (unsigned iT(0); iT != nTriggerTypes; ++iT) {
if (!triggered_[iT])
continue;
meTriggers.fill(getEcalDQMSetupObjects(), iT + 0.5);
if (triggered_.count() == 1)
meExclusiveTriggers.fill(getEcalDQMSetupObjects(), iT + 0.5);
}
}

configured with

L1GlobalTriggerReadoutRecordTag = cms.untracked.InputTag("gtDigis"),
L1MuGMTReadoutCollectionTag = cms.untracked.InputTag("gtDigis"),

This cannot be the desired fashion of pulling out L1T information with current software.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 16, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @mmusich.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

assign DQM/EcalMonitorTasks

@cmsbuild
Copy link
Contributor

New categories assigned: dqm

@antoniovagnerini,@rseidita you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor

@cms-sw/ecal-dpg-l2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants