Skip to content

Commit

Permalink
Merge pull request #37250 from andrea21z/MuonMvaID_update
Browse files Browse the repository at this point in the history
Updating the WP of the Muon MVA ID
  • Loading branch information
cmsbuild authored Mar 31, 2022
2 parents db61594 + 8db79f1 commit 10f79a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1051,16 +1051,18 @@ void PATMuonProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)
float mvaID = 0.0;
constexpr int MVAsentinelValue = -99;
constexpr float mvaIDmediumCut = 0.08;
constexpr float mvaIDtightCut = 0.49;
constexpr float mvaIDtightCut = 0.12;
if (computeMuonIDMVA_) {
const double dz = std::abs(muon.muonBestTrack()->dz(primaryVertex.position()));
const double dxy = std::abs(muon.muonBestTrack()->dxy(primaryVertex.position()));
if (muon.isLooseMuon()) {
mvaID = globalCache()->muonMvaIDEstimator().computeMVAID(muon)[1];
} else {
mvaID = MVAsentinelValue;
}
muon.setMvaIDValue(mvaID);
muon.setSelector(reco::Muon::MvaIDwpMedium, muon.mvaIDValue() > mvaIDmediumCut);
muon.setSelector(reco::Muon::MvaIDwpTight, muon.mvaIDValue() > mvaIDtightCut);
muon.setSelector(reco::Muon::MvaIDwpTight, muon.mvaIDValue() > mvaIDtightCut and dz < 0.5 and dxy < 0.2);
}

//SOFT MVA
Expand Down

0 comments on commit 10f79a9

Please sign in to comment.