acts icon indicating copy to clipboard operation
acts copied to clipboard

feat: Hashing seeding algorithm

Open CouthuresJeremy opened this issue 1 year ago • 3 comments

Adds the Hashing for the seeding algorithm.

Instead of doing the seeding on every space points at once, this approach create small groups of space points called buckets and do the standard seeding on each of those buckets independently.

As there is overlaps between the buckets, the same seed might be reconstructed several times (due to independent reconstruction in several buckets). A set container of seeds is used to naturally handle this duplication, hence the need of #3136 and sorting the seeds ad19e7a9472b980decc89a052f358a07fe617400.

This approach mitigate the filtering of good seeds due to an upper limit on the number of seeds sharing the same middle space point (the maxSeedsPerSpM parameter).

More details are in the poster presented on CTD 2023.

A third party software called Annoy is used to create the buckets. Some modifications of the software code has been done with respect to the official repository linked previously.

Blocked by:

  • #3136

CouthuresJeremy avatar Apr 25 '24 20:04 CouthuresJeremy

📊: Physics performance monitoring for 3eafd394d3fe7c34b78599f9add31881deec3ed9

Full contents

physmon summary

github-actions[bot] avatar Apr 25 '24 20:04 github-actions[bot]

Jeremy pinged me privately on it, but I thought it would make more sense to answer here, publicly.

What you forgot about updating / extending is this file: https://github.com/acts-project/acts/blob/main/cmake/ActsConfig.cmake.in

You are now introducing a new external, which ActsCore would now publicly depend on. (Which in itself is a bit worrisome to me, but that's a separate issue...) So you must make sure that when somebody calls find_package(Acts), ActsConfig.cmake would call find_dependency(Annoy) itself.

Since in this PR's setup Annoy would always be needed, you should add

find_dependency(Annoy)

without any if(...) statements around here: https://github.com/acts-project/acts/blob/main/cmake/ActsConfig.cmake.in#L55

Actually, the logic of only calling find_dependency(Boost) and find_dependency(Eigen3) is not great over there. Since even if Acts was the one building / installing those, the Acts installation should still include everything required to make those find_dependency(...) calls work. :thinking: (So they should always be called.)

But that's a separate issue. For this PR, just add find_dependency(Annoy ...) with all the right arguments.

krasznaa avatar May 27 '24 13:05 krasznaa

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 47.43%. Comparing base (75ef913) to head (857e6f1). Report is 3 commits behind head on main.

Files Patch % Lines
Core/include/Acts/Seeding/ContainerPolicy.hpp 0.00% 6 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3148      +/-   ##
==========================================
- Coverage   47.66%   47.43%   -0.23%     
==========================================
  Files         509      511       +2     
  Lines       29425    30053     +628     
  Branches    14131    14561     +430     
==========================================
+ Hits        14026    14257     +231     
- Misses       5285     5326      +41     
- Partials    10114    10470     +356     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 10 '24 10:06 codecov[bot]

Ready for review!

CouthuresJeremy avatar Jul 10 '24 18:07 CouthuresJeremy

Hi @CouthuresJeremy we have merged https://github.com/acts-project/acts/pull/336 . Can you adapt this PR to those changes?

CarloVarni avatar Jul 16 '24 10:07 CarloVarni

Hi, I am on vacation without any computer to update this PR until the 29th of July. I haven't been able to test #3367 yet but thanks for making it!

CouthuresJeremy avatar Jul 17 '24 03:07 CouthuresJeremy

Two considerations:

1. I'm not sure it's the greatest solution to ship Annoy in our `thirdparty`. We don't necessarily do this for all dependencies (like root and g4). Would it be an alternative (maybe in a follow up PR) to push this to our _externals_ build and use `find_package` for this?

I do not really see the cons of having Annoy in the externals build and use find_package to get it instead of having it in thirdparty. Would this have consequences on updating the patch?

2. It's usually a good idea to limit exposure to third party headers. I'm wondering if the annoy includes could potentially be pushed to private includes in cpp files.

Do you mean in the SeedingAlgorithmHashing example or in the plugin?

Overall, in this approach, only a clustering algorithm is needed, not Annoy specifically. So it could be replaced latter if needed.

CouthuresJeremy avatar Aug 06 '24 12:08 CouthuresJeremy

:red_circle: Athena integration test results [2e0a7d13bac292112a1e339178edf145500c1abc]

:red_circle: Some tests have failed!

Please investigate the pipeline!

status job report
:green_circle: report_pull_request
:green_circle: run_art_test: test_data18_13TeV_1000evt
:green_circle: run_art_test: test_ttbarPU40_reco
:green_circle: test_ActsDumpGeometryIdentifiers
:red_circle: test_ActsCheckObjectCountsCachedWorkflow
:red_circle: test_ActsCheckObjectCountsWorkflow
:green_circle: test_ActsEFTrackFit
:green_circle: test_ActsPersistifySeeds
:green_circle: test_ActsBenchmarkWithSpot
:green_circle: test_ActsAnalogueClustering
:green_circle: test_ActsWorkflowHeavyIons
:green_circle: test_ActsWorkflowFastTracking
:green_circle: test_ActsWorkflowCached
:green_circle: test_ActsWorkflow
:green_circle: test_ActsValidateAmbiguityResolution
:green_circle: test_ActsValidateResolvedTracks
:green_circle: test_ActsValidateTracks
:green_circle: test_ActsValidateActsCoreSpacePoints
:green_circle: test_ActsValidateActsSpacePoints
:green_circle: test_ActsValidateSeeds
:green_circle: test_ActsValidateOrthogonalSeeds
:green_circle: test_ActsValidateClusters
:green_circle: test_ActsPersistifyEDM
:green_circle: test_ActsGSFRefitting
:green_circle: test_ActsKfRefitting
:green_circle: test_ActsExtrapolationAlgTest
:green_circle: test_ActsITkTest
:green_circle: run_workflow_tests_run4_mc
:green_circle: run_workflow_tests_run2_mc
:green_circle: run_workflow_tests_run2_data
:green_circle: run_workflow_tests_run3_mc
:green_circle: run_workflow_tests_run3_data
:green_circle: run_unit_tests

acts-project-service avatar Aug 30 '24 20:08 acts-project-service