-
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
Update & fix to SeedingHitSet #36819
Conversation
fbe7af2
to
7299be6
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36819/27978
|
A new Pull Request was created by @AdrianoDee for master. It involves the following packages:
@jpata, @cmsbuild, @clacaputo, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
test parameters:
|
please test |
type bug-fix |
@@ -0,0 +1,80 @@ | |||
#include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h" |
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.
Great to see a unit test! Please consider using catch2 system as it provides a richer set of testing abilities: https://github.com/catchorg/Catch2
We make use of Catch2 throughout the framework for our unit tests.
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.
Ah! I see, thanks. Sure, let me have a look at it to restructure the test.
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've mimicked some other tests around the framework. Should be fine.
std::copy_n( | ||
hits.begin(), std::find(hits.begin(), hits.end(), nullPtr()) - hits.begin(), std::back_inserter(theRecHits)); |
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.
Could this be implemented also
std::copy_n( | |
hits.begin(), std::find(hits.begin(), hits.end(), nullPtr()) - hits.begin(), std::back_inserter(theRecHits)); | |
std::copy( | |
hits.begin(), std::find(hits.begin(), hits.end(), nullPtr()), std::back_inserter(theRecHits)); |
? (genuinely asking, I'd think so)
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.
Yes, actually it could: moving to it together with the suggestion below.
theRecHits.reserve(hits.size()); | ||
std::copy_n( | ||
hits.begin(), std::find(hits.begin(), hits.end(), nullPtr()) - hits.begin(), std::back_inserter(theRecHits)); | ||
theSize = theRecHits.size() > 1 ? theRecHits.size() : 0; |
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 about
theSize = theRecHits.size() > 1 ? theRecHits.size() : 0; | |
if (theRecHits.size() == 1) theRecHits.clear() |
and in size()
return theRecHits.size()
?
Or something along
auto end = std::find(hits.begin(), hits.end(), nullPtr());
auto size = std::distance(hits.begin(), end);
if (size >= 2) {
theRecHits.reserve(size);
std::copy(hits.begin, end, std::back_inserter(theRecHits));
}
?
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-afa21f/22048/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
@smuzaffar in the test there are 73 RECO comparisons jobs failing with this error
Is it something that we should expect from ASAN builds? |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-afa21f/22056/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36819/28036 |
Pull request #36819 was updated. @jpata, @cmsbuild, @clacaputo, @slava77 can you please check and sign again. |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-afa21f/22102/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
+reconstruction
|
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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
ping @cms-sw/orp-l2 it would be great to have this in, in order to test #36852 cleanly. |
+1 |
PR description:
Updating
SeedingHitSet
:nullptr
directly in the constructors droppingsetSize()
;std::initializer_list
to allow braced constructors, to have a cleaner doublet, triplet and quadruplet hit constructors;std::size
for the size (with the correction of single-hit set);SeedingHitSet_t.cpp
;PR validation:
1030.0
and1040.0
withCMSSW_12_3_ASAN_X_2022-01-26-2300
(that was highlighting the failures) + this PR and it's running.FYI: @makortel, @dan131riley, @Dr15Jones