-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Muon VID update for 76X #11323
Muon VID update for 76X #11323
Conversation
A new Pull Request was created by @jhgoh (Junghwan John Goh) for CMSSW_7_6_X. Muon VID update for 76X It involves the following packages: PhysicsTools/PatExamples @cmsbuild, @cvuosalo, @vadler, @monttj, @slava77 can you please review it and eventually sign? Thanks. |
const auto muonTypes = c.getParameter<std::vector<std::string> >("types"); | ||
for ( const auto& x : muonTypes ) | ||
{ | ||
if ( boost::iequals(x, "GlobalMuon") ) type_ |= reco::Muon::GlobalMuon; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible not to use boost for string comparison to a literal?
@slava77, boost::iequals is removed. |
@cmsbuild please test |
The tests are being triggered in jenkins. |
const auto trackRef = muon->muonBestTrack(); | ||
if ( trackRef.isNull() ) return -1; | ||
|
||
return trackRef->ptError()/trackRef->pt(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a danger of dividing by zero here? It seems unlikely that a muon's best track would have pT == 0, but maybe it could happen with corrupted data or some other unusual case. If there's any chance of zero pT, you should protect against division by zero.
@cmsbuild please test |
The tests are being triggered in jenkins. |
+1 Updating muon VID to enable modification of configuration cut flow. The code changes are satisfactory, and Jenkins tests against baseline CMSSW_7_6_X_2015-09-19-1100 show no significant differences. Matrix tests against baseline CMSSW_7_6_0_pre5 also show no significant differences. |
CandidateType candidateType() const override final { return MUON; } | ||
double value(const reco::CandidatePtr&) const override final; | ||
|
||
void setConsumes(edm::ConsumesCollector&) override final; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this setConsumes get called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the VID ID producer.
Muon VID is updated to be able to modify cut flow in the configuration. The previous implementation was just a wrapper to the C++ selector functions.
There was also a small change in example analyzer to use patMuons as the input muons in VID calculation and CITK isolation.