Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PhysicsTools/NanoAOD/python/muons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
inputTensorName= cms.string("float_input"),
outputNames = cms.vstring(["probGOOD", "wpMedium", "wpTight"]),
batch_eval =cms.bool(True),
outputFormulas = cms.vstring(["at(1)", "? at(1) > 0.14 ? 1 : 0", "? at(1) > 0.35 ? 1 : 0"]),
outputFormulas = cms.vstring(["at(1)", "? at(1) > 0.08 ? 1 : 0", "? at(1) > 0.20 ? 1 : 0"]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we preserve the old formula for Run2 reprocessing by adding it back through the run2_nanoAOD_ANY modifier?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the new formula should be used also for Run 2 reprocessing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok cool

variablesOrder = cms.vstring(["LepGood_global_muon","LepGood_validFraction","Muon_norm_chi2_extended","LepGood_local_chi2","LepGood_kink","LepGood_segmentComp","Muon_n_Valid_hits_extended","LepGood_n_MatchedStations","LepGood_Valid_pixel","LepGood_tracker_layers","LepGood_pt","LepGood_eta"]),
variables = cms.PSet(
LepGood_global_muon = cms.string("isGlobalMuon"),
Expand Down
6 changes: 2 additions & 4 deletions PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -991,18 +991,16 @@ 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.12;
constexpr float mvaIDtightCut = 0.20;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we open a PR with pushing these cuts to configuration level ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vlimant! Yes, I can do it, but wouldn't it be better to do it in this PR directly? or is there some reason I don't know to do it separately?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you may indeed.

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 and dz < 0.5 and dxy < 0.2);
muon.setSelector(reco::Muon::MvaIDwpTight, muon.mvaIDValue() > mvaIDtightCut);
}

//SOFT MVA
Expand Down