Skip to content

Commit feb9d0e

Browse files
authored
Merge pull request #45818 from nurfikri89/from1410pre7_packedCandMuonFlagFix
[MiniAOD] Set Muon ID flags for PackedCandidates regardless of trackRef
2 parents 89c7c30 + f848b7d commit feb9d0e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

PhysicsTools/PatAlgos/plugins/PATPackedCandidateProducer.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,6 @@ void pat::PATPackedCandidateProducer::produce(edm::StreamID, edm::Event &iEvent,
323323
// these things are always for the CKF track
324324
outPtrP->back().setTrackHighPurity(cand.trackRef().isNonnull() &&
325325
cand.trackRef()->quality(reco::Track::highPurity));
326-
if (cand.muonRef().isNonnull()) {
327-
outPtrP->back().setMuonID(cand.muonRef()->isStandAloneMuon(), cand.muonRef()->isGlobalMuon());
328-
}
329326
} else {
330327
if (!PVs->empty()) {
331328
PV = reco::VertexRef(PVs, 0);
@@ -338,6 +335,12 @@ void pat::PATPackedCandidateProducer::produce(edm::StreamID, edm::Event &iEvent,
338335
pat::PackedCandidate::PVAssociationQuality(pat::PackedCandidate::UsedInFitTight));
339336
}
340337

338+
// Set Muon ID flags
339+
340+
if (cand.muonRef().isNonnull()) {
341+
outPtrP->back().setMuonID(cand.muonRef()->isStandAloneMuon(), cand.muonRef()->isGlobalMuon());
342+
}
343+
341344
// neutrals and isolated charged hadrons
342345

343346
bool isIsolatedChargedHadron = false;

0 commit comments

Comments
 (0)