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

fix: More precise track parameter estimation for high curvature tracks #2982

Merged
merged 9 commits into from
Mar 12, 2024

Conversation

beomki-yeo
Copy link
Contributor

@beomki-yeo beomki-yeo commented Feb 22, 2024

Calculation from #2211 without approximation arcsin.

I will put some plots later to estimate how correct the PR is compared to current calculation

Following is the plot for residual between track parameter estimation and truth value (for p and qop separately)

I tested with

  • three helix points generated at 200, 400, 600 mm of trajectory
  • the initial track direction in [1/sqrt(2),0,1/sqrt(2)],
  • B field: 2T in z-axis
  • Repeat the same test from 0.1 GeV/c , 0.2 GeV/c , ... , 9.9 GeV/c

My impression is that the original track parameter estimation is not as bad as I imagined before this study. So I am not sure if we will want to proceed with the change eventually.

image

@github-actions github-actions bot added Component - Core Affects the Core module Seeding labels Feb 22, 2024
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 48.86%. Comparing base (6507d84) to head (4df7b6c).

Files Patch % Lines
...clude/Acts/Seeding/EstimateTrackParamsFromSeed.hpp 25.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2982   +/-   ##
=======================================
  Coverage   48.86%   48.86%           
=======================================
  Files         493      493           
  Lines       29058    29058           
  Branches    13798    13798           
=======================================
  Hits        14200    14200           
  Misses       4962     4962           
  Partials     9896     9896           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@beomki-yeo beomki-yeo changed the title More precise track parameter estimation for low curvature tracks More precise track parameter estimation for high curvature tracks Feb 22, 2024
@AJPfleger AJPfleger changed the title More precise track parameter estimation for high curvature tracks fix: More precise track parameter estimation for high curvature tracks Feb 22, 2024
@AJPfleger AJPfleger added this to the next milestone Feb 22, 2024
@andiwand
Copy link
Contributor

do you know if this has any CPU performance implications?

@beomki-yeo
Copy link
Contributor Author

I don't know the number exactly. I believe the performance won't change a lot because it is just having one more line with arcsin per track.

@AJPfleger AJPfleger self-requested a review February 27, 2024 15:32
Copy link
Contributor

@AJPfleger AJPfleger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The math seems to be correct and I also don't see a need to look deeper in the performance change from the asin.

Could you update the hashes?

@andiwand
Copy link
Contributor

@CarloVarni did some optimizations on this #2699

@CarloVarni
Copy link
Collaborator

From my side there are no objection to this. If this provides a more precise computation w.r.t. the current implementation, then we should go for it. I'm a little surprised @beomki-yeo that there are no changes in physics performance, I would have expected (minor) changes in the CKF output.

On the CPU impact, the estimation of the parameter from seeds is already very cheap. Even if there is a small increase due to this change that would be hardly relevant in the entire track reconstruction process. So I'd say we can go on with this.

@andiwand
Copy link
Contributor

andiwand commented Mar 1, 2024

looking at the performance monitoring it seems that there are some changes but below the failure threshold

image

I guess this is expected since the KF will get the initial params with a big covariance and estimate almost from scratch

@CarloVarni
Copy link
Collaborator

ok thanks @andiwand then I'm approving this

CarloVarni
CarloVarni previously approved these changes Mar 1, 2024
@andiwand
Copy link
Contributor

andiwand commented Mar 1, 2024

@beomki-yeo can you update the hashes? and @AJPfleger needs to lower the red flag after this

@github-actions github-actions bot added Component - Examples Affects the Examples module Changes Performance labels Mar 12, 2024
@beomki-yeo
Copy link
Contributor Author

@CarloVarni @AJPfleger @andiwand Thanks for the comments and sorry that I didn't reply for long time.
Yeah I think I am also onboard with the changes based on the comments XD

@kodiakhq kodiakhq bot merged commit 28c3133 into acts-project:main Mar 12, 2024
56 checks passed
@acts-project-service acts-project-service added the Fails Athena tests This PR causes a failure in the Athena tests label Mar 12, 2024
@paulgessinger
Copy link
Member

The Athena output change seems to be related to this. We seem to be getting a single digit number of additional tracks. I think we can tolerate this.

(cc @CarloVarni)

dimitra97 pushed a commit to dimitra97/acts that referenced this pull request Mar 19, 2024
acts-project#2982)

Calculation from acts-project#2211 without approximation arcsin.

I will put some plots later to estimate how correct the PR is compared to current calculation

Following is the plot for residual between track parameter estimation and truth value (for p and qop separately)

I tested with 
- three helix points generated at 200, 400, 600 mm of trajectory 
- the initial track direction in [1/sqrt(2),0,1/sqrt(2)], 
- B field: 2T in z-axis
- Repeat the same test from 0.1 GeV/c , 0.2 GeV/c , ... , 9.9 GeV/c

My impression is that the original track parameter estimation is not as bad as I imagined before this study. So I am not sure if we will want to proceed with the change eventually.

![image](https://github.com/acts-project/acts/assets/63090140/220fbb2a-86bb-44fb-9b1e-b4db23a956fe)




Co-authored-by: Andreas Stefl <487211+andiwand@users.noreply.github.com>
@paulgessinger paulgessinger modified the milestones: next, v33.1.0 Mar 26, 2024
EleniXoch pushed a commit to EleniXoch/acts that referenced this pull request May 6, 2024
acts-project#2982)

Calculation from acts-project#2211 without approximation arcsin.

I will put some plots later to estimate how correct the PR is compared to current calculation

Following is the plot for residual between track parameter estimation and truth value (for p and qop separately)

I tested with 
- three helix points generated at 200, 400, 600 mm of trajectory 
- the initial track direction in [1/sqrt(2),0,1/sqrt(2)], 
- B field: 2T in z-axis
- Repeat the same test from 0.1 GeV/c , 0.2 GeV/c , ... , 9.9 GeV/c

My impression is that the original track parameter estimation is not as bad as I imagined before this study. So I am not sure if we will want to proceed with the change eventually.

![image](https://github.com/acts-project/acts/assets/63090140/220fbb2a-86bb-44fb-9b1e-b4db23a956fe)




Co-authored-by: Andreas Stefl <487211+andiwand@users.noreply.github.com>
asalzburger pushed a commit to asalzburger/acts that referenced this pull request May 21, 2024
acts-project#2982)

Calculation from acts-project#2211 without approximation arcsin.

I will put some plots later to estimate how correct the PR is compared to current calculation

Following is the plot for residual between track parameter estimation and truth value (for p and qop separately)

I tested with 
- three helix points generated at 200, 400, 600 mm of trajectory 
- the initial track direction in [1/sqrt(2),0,1/sqrt(2)], 
- B field: 2T in z-axis
- Repeat the same test from 0.1 GeV/c , 0.2 GeV/c , ... , 9.9 GeV/c

My impression is that the original track parameter estimation is not as bad as I imagined before this study. So I am not sure if we will want to proceed with the change eventually.

![image](https://github.com/acts-project/acts/assets/63090140/220fbb2a-86bb-44fb-9b1e-b4db23a956fe)




Co-authored-by: Andreas Stefl <487211+andiwand@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes Performance Component - Core Affects the Core module Component - Examples Affects the Examples module Fails Athena tests This PR causes a failure in the Athena tests Seeding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants