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

Fix the way trigger results are checked in 73X #5696

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 5 additions & 16 deletions HLTriggerOffline/Top/src/TopDiLeptonHLTValidation.cc
Expand Up @@ -95,22 +95,21 @@ TopDiLeptonHLTValidation::analyze(const edm::Event& iEvent, const edm::EventSetu
if (!iEvent.getByToken(tokTrigger_,triggerTable))
edm::LogWarning("TopDiLeptonHLTValidation") << "Trigger collection not found \n";
const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerTable);
bool isInteresting = false;
unsigned int isInteresting = 0;
for (unsigned int i=0; i<triggerNames.triggerNames().size(); ++i) {

TString name = triggerNames.triggerNames()[i].c_str();
for (unsigned int j=0; j<vsPaths_.size(); j++) {
if (name.Contains(TString(vsPaths_[j]), TString::kIgnoreCase)) {
if (triggerTable->accept(j)){
isInteresting = true;
break;
if (triggerTable->accept(i)){
isInteresting++;
if (isAll_) hNumTriggerMon->Fill(j+0.5 );
}
}
}
if (isInteresting) break;
}

if (isAll_ && isInteresting) isSel_ = true;
if (isAll_ && isInteresting > 0) isSel_ = true;
else isSel_ = false;

//Histos
Expand Down Expand Up @@ -156,16 +155,6 @@ TopDiLeptonHLTValidation::analyze(const edm::Event& iEvent, const edm::EventSetu
}
hNumJetPt->Fill(jet_->pt());
hNumJetEta->Fill(jet_->eta());
for (unsigned int i=0; i<triggerNames.triggerNames().size(); ++i) {
TString name = triggerNames.triggerNames()[i].c_str();
for (unsigned int j=0; j<vsPaths_.size(); j++) {
if (name.Contains(TString(vsPaths_[j]), TString::kIgnoreCase)) {
if (triggerTable->accept(j)){
hNumTriggerMon->Fill(j+0.5 );
}
}
}
}
}
}

Expand Down
21 changes: 5 additions & 16 deletions HLTriggerOffline/Top/src/TopSingleLeptonHLTValidation.cc
Expand Up @@ -106,22 +106,21 @@ TopSingleLeptonHLTValidation::analyze(const edm::Event& iEvent, const edm::Event
if (!iEvent.getByToken(tokTrigger_,triggerTable))
edm::LogWarning("TopSingleLeptonHLTValidation") << "Trigger collection not found \n";
const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerTable);
bool isInteresting = false;
unsigned int isInteresting = 0;
for (unsigned int i=0; i<triggerNames.triggerNames().size(); ++i) {

TString name = triggerNames.triggerNames()[i].c_str();
for (unsigned int j=0; j<vsPaths_.size(); j++) {
if (name.Contains(TString(vsPaths_[j]), TString::kIgnoreCase)) {
if (triggerTable->accept(j)){
isInteresting = true;
break;
if (triggerTable->accept(i)){
isInteresting++;
if (isAll_) hNumTriggerMon->Fill(j+0.5 );
}
}
}
if (isInteresting) break;
}

if (isAll_ && isInteresting) isSel_ = true;
if (isAll_ && isInteresting > 0) isSel_ = true;
else isSel_ = false;

//Histos
Expand Down Expand Up @@ -152,16 +151,6 @@ TopSingleLeptonHLTValidation::analyze(const edm::Event& iEvent, const edm::Event
}
hNumJetPt->Fill(jet_->pt());
hNumJetEta->Fill(jet_->eta());
for (unsigned int i=0; i<triggerNames.triggerNames().size(); ++i) {
TString name = triggerNames.triggerNames()[i].c_str();
for (unsigned int j=0; j<vsPaths_.size(); j++) {
if (name.Contains(TString(vsPaths_[j]), TString::kIgnoreCase)) {
if (triggerTable->accept(j)){
hNumTriggerMon->Fill(j+0.5 );
}
}
}
}
}
}

Expand Down