Skip to content

Commit

Permalink
change order of cut and make member variables const
Browse files Browse the repository at this point in the history
  • Loading branch information
JanFSchulte committed Mar 2, 2022
1 parent 2f7309a commit e335344
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions HLTrigger/Muon/plugins/HLTMuonL1TFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,6 @@ bool HLTMuonL1TFilter::hltFilter(edm::Event& iEvent,
for (auto it = allMuons->begin(ibx); it != allMuons->end(ibx); it++) {
MuonRef muon(allMuons, distance(allMuons->begin(allMuons->getFirstBX()), it));

// Only select muons that were selected in the previous level
bool matchPrevL1 = false;
int prevSize = prevMuons.size();
for (int it2 = 0; it2 < prevSize; it2++) {
if (deltaR2(muon->eta(), muon->phi(), prevMuons[it2]->eta(), prevMuons[it2]->phi()) < maxDR2_) {
matchPrevL1 = true;
break;
}
}
if (!matchPrevL1)
continue;

//check maxEta cut
if (fabs(muon->eta()) > maxEta_)
continue;
Expand All @@ -144,6 +132,18 @@ bool HLTMuonL1TFilter::hltFilter(edm::Event& iEvent,
continue;
}

// Only select muons that were selected in the previous level
bool matchPrevL1 = false;
int prevSize = prevMuons.size();
for (int it2 = 0; it2 < prevSize; it2++) {
if (deltaR2(muon->eta(), muon->phi(), prevMuons[it2]->eta(), prevMuons[it2]->phi()) < maxDR2_) {
matchPrevL1 = true;
break;
}
}
if (!matchPrevL1)
continue;

//we have a good candidate
n++;
filterproduct.addObject(TriggerL1Mu, muon);
Expand Down
12 changes: 6 additions & 6 deletions HLTrigger/Muon/plugins/HLTMuonL1TFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ class HLTMuonL1TFilter : public HLTFilter {
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> previousCandToken_;

/// max Eta cut
double maxEta_;
const double maxEta_;

/// pT threshold
double minPt_;
const double minPt_;

/// max dRs for L1 candidate matching
double maxDR_;
double maxDR2_;
const double maxDR_;
const double maxDR2_;

/// Quality codes:
/// to be updated with new L1 quality definitions
int qualityBitMask_;

/// min N objects
double minN_;
const double minN_;

/// use central bx only muons
bool centralBxOnly_;
const bool centralBxOnly_;
};

#endif //HLTMuonL1TFilter_h

0 comments on commit e335344

Please sign in to comment.