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

[DT CSC RPC] Backport of bug fix to tag-and-probe in DQM (https://github.com/cms-sw/cmssw/pull/38028) #38474

Merged
merged 2 commits into from
Jun 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion DQMOffline/MuonDPG/src/BaseTnPEfficiencyTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "TRegexp.h"

#include <tuple>
#include <algorithm>

BaseTnPEfficiencyTask::BaseTnPEfficiencyTask(const edm::ParameterSet& config)
: m_nEvents(0),
Expand Down Expand Up @@ -187,7 +188,9 @@ bool BaseTnPEfficiencyTask::hasTrigger(std::vector<int>& trigIndices,
float dR2match = 999.;
for (int trigIdx : trigIndices) {
const std::vector<std::string> trigModuleLabels = m_hltConfig.moduleLabels(trigIdx);
const unsigned trigModuleIndex = trigModuleLabels.size() - 2;

const unsigned trigModuleIndex =
std::find(trigModuleLabels.begin(), trigModuleLabels.end(), "hltBoolEnd") - trigModuleLabels.begin() - 1;
const unsigned hltFilterIndex = trigEvent->filterIndex(edm::InputTag(trigModuleLabels[trigModuleIndex], "", "HLT"));
if (hltFilterIndex < trigEvent->sizeFilters()) {
const trigger::Keys keys = trigEvent->filterKeys(hltFilterIndex);
Expand All @@ -202,5 +205,6 @@ bool BaseTnPEfficiencyTask::hasTrigger(std::vector<int>& trigIndices,
}
}
}

return dR2match < 0.01;
}