Skip to content

Commit

Permalink
Fix in mu ID check
Browse files Browse the repository at this point in the history
  • Loading branch information
caruta authored Jul 25, 2023
1 parent b1fb879 commit 2482bd9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions DQMOffline/Trigger/src/HLTMuonMatchAndPlot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ HLTMuonMatchAndPlot::HLTMuonMatchAndPlot(const ParameterSet& pset, string hltPat
probeD0Cut_(probeParams_.getUntrackedParameter<double>("d0Cut", 0.)),
//triggerSelector_(targetParams_.getUntrackedParameter<string>("hltCuts", "")),
triggerEtaCut_(targetParams_.getUntrackedParameter<double>("hltEtaCut", 0.))
//hasTriggerCuts_(targetParams_.exists("hltCuts"))
{
//hasTriggerCuts_(targetParams_.exists("hltCuts"))
{
// Create std::map<string, T> from ParameterSets.
fillMapFromPSet(binParams_, pset, "binParams");
fillMapFromPSet(plotCuts_, pset, "plotCuts");
Expand Down Expand Up @@ -401,8 +401,12 @@ MuonCollection HLTMuonMatchAndPlot::selectedMuons(const MuonCollection& allMuons
else if (mu.isStandAloneMuon())
track = &*mu.outerTrack();
//if (track && selector(mu) && fabs(track->dxy(beamSpot.position())) < d0Cut &&
IsMuonGlb = (&mu)->isGlobalMuon();
if (track && IsMuonGlb && abs((&mu)->eta()) < RecoMuonEta && fabs(track->dxy(beamSpot.position())) < d0Cut &&
bool muID = false;
if (IsMuonGlb)
muID = (&mu)->isGlobalMuon();
else
muID = true;
if (track && muID && abs((&mu)->eta()) < RecoMuonEta && fabs(track->dxy(beamSpot.position())) < d0Cut &&
fabs(track->dz(beamSpot.position())) < z0Cut)
reducedMuons.push_back(mu);
}
Expand All @@ -417,7 +421,7 @@ TriggerObjectCollection HLTMuonMatchAndPlot::selectedTriggerObjects(
//const StringCutObjectSelector<TriggerObject>& triggerSelector) {
double triggerEtaCut_) {
//if (!hasTriggerCuts)
//return TriggerObjectCollection();
//return TriggerObjectCollection();

InputTag filterTag(moduleLabel_, "", hltProcessName_);
size_t filterIndex = triggerSummary.filterIndex(filterTag);
Expand All @@ -429,7 +433,7 @@ TriggerObjectCollection HLTMuonMatchAndPlot::selectedTriggerObjects(
for (unsigned short key : keys) {
TriggerObject foundObject = triggerObjects[key];
//if (triggerSelector(foundObject))
if(abs((&foundObject)->eta()) < triggerEtaCut_)
if (abs((&foundObject)->eta()) < triggerEtaCut_)
selectedObjects.push_back(foundObject);
}
}
Expand Down

0 comments on commit 2482bd9

Please sign in to comment.