Skip to content
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

refactor!: seeding always sorts SPs #1910

Merged
merged 12 commits into from
Mar 9, 2023

Conversation

LuisFelipeCoelho
Copy link
Member

@LuisFelipeCoelho LuisFelipeCoelho commented Mar 2, 2023

Sorting has been shown to be less expensive then looping over all elements to select bottom and top sps for seeds. By sorting the SPs, we can avoid a considerable number of iterations, especially for high pile-up.
This PR removes the option to not sort the SPs during the seeding algorithm. @noemina

@LuisFelipeCoelho LuisFelipeCoelho added Component - Core Affects the Core module Component - Examples Affects the Examples module 🚧 WIP Work-in-progress labels Mar 2, 2023
@LuisFelipeCoelho LuisFelipeCoelho added this to the next milestone Mar 2, 2023
@github-actions
Copy link

github-actions bot commented Mar 2, 2023

📊 Physics performance monitoring for 5d0dfc5

Full report
Seeding: seeded, truth estimated, orthogonal
CKF: seeded, truth smeared, truth estimated, orthogonal
IVF: seeded, truth smeared, truth estimated, orthogonal
Ambiguity resolution: seeded, orthogonal
Truth tracking
Truth tracking (GSF)

Vertexing

Vertexing vs. mu
IVF seeded

IVF truth_smeared

IVF truth_estimated

IVF orthogonal

Seeding

Seeding seeded

Seeding truth_estimated

Seeding orthogonal

CKF

CKF seeded

CKF truth_smeared

CKF truth_estimated

CKF orthogonal

Ambiguity resolution

seeded

Truth tracking (Kalman Filter)

Truth tracking

Truth tracking (GSF)

Truth tracking

@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Merging #1910 (5d0dfc5) into main (5cf1328) will increase coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1910      +/-   ##
==========================================
+ Coverage   49.53%   49.55%   +0.02%     
==========================================
  Files         408      408              
  Lines       22705    22695      -10     
  Branches    10362    10356       -6     
==========================================
  Hits        11247    11247              
+ Misses       4249     4239      -10     
  Partials     7209     7209              
Impacted Files Coverage Δ
Core/include/Acts/Seeding/BinnedSPGroup.ipp 0.00% <0.00%> (ø)
Core/include/Acts/Seeding/SeedFilter.ipp 0.00% <0.00%> (ø)
Core/include/Acts/Seeding/SeedFinder.ipp 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@LuisFelipeCoelho
Copy link
Member Author

It doesn't seem to decrease the performance so I updated the root hashes

@LuisFelipeCoelho LuisFelipeCoelho removed the 🚧 WIP Work-in-progress label Mar 7, 2023
@LuisFelipeCoelho LuisFelipeCoelho marked this pull request as ready for review March 7, 2023 16:33
@kodiakhq kodiakhq bot merged commit c942f23 into acts-project:main Mar 9, 2023
1 check passed
@github-actions github-actions bot removed the automerge label Mar 9, 2023
@LuisFelipeCoelho LuisFelipeCoelho deleted the default_sorting branch March 9, 2023 13:02
@paulgessinger paulgessinger changed the title refactor: seeding always sorts SPs refactor!: seeding always sorts SPs Mar 10, 2023
paulgessinger added a commit to paulgessinger/acts that referenced this pull request Mar 10, 2023
kodiakhq bot pushed a commit that referenced this pull request Mar 14, 2023
…ms and tops (#1926)

This is build on top of #1919 and also assumes the space points in the grid bins are already sorted in radius. Thus #1910 is required as well

Idea here is that in a tt-bar sample the grid bins may be very populated. However, the grid collects space points according to their z-phi values, with no consideration for the r-coordinate.

While looking for compatible bottoms and tops candidates we iterate on all the space points in the selected grid bins and this is a huge waste of time since just a few percentage of the space points are to be considerate. Of course, we check the distance of the candidate w.r.t. the middle space point... yet it is a O(N) operation.

With this change I'm introducing here (excluding what's already in #1919) I first performs a binary search on the space points candidates to identify those in the proper radius range. This should be a O(logN) operation. And only then I run on them. 

Since `getCompatibleDoublets` is one of the main contributors in the seeding time, this may improve the CPU performance
@paulgessinger paulgessinger modified the milestones: next, v24.0.0 Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Core Affects the Core module Component - Examples Affects the Examples module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants