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
Trigger selector #21837
Trigger selector #21837
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-21837/2859 |
A new Pull Request was created by @drkovalskyi for master. It involves the following packages: DataFormats/MuonReco @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready @slava77 comparisons for the following workflows were not done due to missing matrix map:
Comparison Summary:
|
DataFormats/MuonReco/src/Muon.cc
Outdated
float edgeX = chamberMatch->edgeX; | ||
float edgeY = chamberMatch->edgeY; | ||
// check we if the trajectory is well within the acceptance | ||
if(edgeX<0 && fabs(edgeX)>fabs(minDistanceFromEdge) && |
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.
Since edgeX/edgeY have to be negative (i.e. inside) this could be achieved more efficiently if you define
minDistanceFromEdge = -fabs(minDistanceFromEdge);
out of the loop, and then
if( edgeX<minDistanceFromEdge && edgeY<minDistanceFromEdge)
here
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.
This is how it's implemented in other places. I don't see any efficiency problem here. This code is touched once in 5-10 years and having the same implementation will save time for whoever will want to change anything. So I don't think it's necessary to change it. Am I missing something?
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.
I agree that you don't have performance issues for this code, and because of that I won't insist.
On the other hand, when something can straightforwardly get improved, I don't see why not to do it: I'll keep signalling it in my comments when I notice.
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.
Thanks for the clarification and for the suggestions - they are always appreciated, just in this case I think it's justified to keep it as-is.
DataFormats/MuonReco/src/Muon.cc
Outdated
unsigned int Muon::expectedNnumberOfMatchedStations( float minDistanceFromEdge ) const | ||
{ | ||
unsigned int stationMask = 0; | ||
for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin(); |
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.
range based for loop
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.
fixed
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-21837/2868 |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready @slava77 comparisons for the following workflows were not done due to missing matrix map:
Comparison Summary:
|
+1
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
New muon id selector to be used in HLT.