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

docs: Add comment on computation of impact parameter from the doublet #3728

Merged
merged 7 commits into from
Oct 16, 2024

Conversation

CarloVarni
Copy link
Collaborator

@CarloVarni CarloVarni commented Oct 12, 2024

One of the criterion used in doublet finding relies on computing the minimal distance between the origin and the straight line connecting the two points of the doublet. This distance is compared against a maximum impact parameter (impactMax) provided by the user.

Let's consider for instance the middle-top doublet search.
Geometry

In the attached image:

  • A is the origin
  • B is the middle space point, thus AB = rM (radius of middle space point)
  • C is the top space point

What the code does is to compute BD (xNewFrame in the code) and CD (yNewFrame in the code) and then a simple geometric similarity to compute the impact parameter.

The code currently does: Im / CD = AB / BD, where Im is the impact parameter we are trying to compute. Thus Im = (AB * CD) / BD <= impactMax. Unfortunately Im is equal to AF, while we really want to compute AE. The proper computation would be Im / CD = AB / BC, which leads to Im = (AB * CD) / BC <= impactMax. In this case Im = AE.

However, BC has to be computed from CD and BD. In order to avoid square roots I'm using square quantities.

It is also possible that the code assumes that the alpha angle is too small to make a difference and thus uses an approximation... But there are no comments in the code about this

@CarloVarni CarloVarni added this to the next milestone Oct 12, 2024
@github-actions github-actions bot added Component - Core Affects the Core module Seeding labels Oct 12, 2024
Copy link

github-actions bot commented Oct 12, 2024

📊: Physics performance monitoring for dedabb1

Full contents

physmon summary

@CarloVarni CarloVarni added the Bug Something isn't working label Oct 12, 2024
@CarloVarni CarloVarni marked this pull request as ready for review October 12, 2024 14:20
@CarloVarni CarloVarni removed the Bug Something isn't working label Oct 12, 2024
@CarloVarni CarloVarni closed this Oct 12, 2024
@CarloVarni CarloVarni changed the title fix: Computation of impact parameter from the doublet doc: Add comment on computation of impact parameter from the doublet Oct 15, 2024
@CarloVarni CarloVarni reopened this Oct 15, 2024
@CarloVarni
Copy link
Collaborator Author

/cc @noemina

@CarloVarni CarloVarni changed the title doc: Add comment on computation of impact parameter from the doublet docs: Add comment on computation of impact parameter from the doublet Oct 15, 2024
Copy link
Contributor

@andiwand andiwand left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link

@kodiakhq kodiakhq bot merged commit 02b779b into acts-project:main Oct 16, 2024
42 checks passed
@acts-project-service
Copy link
Collaborator

🔴 Athena integration test results [02b779b]

Build job with this PR failed!

Please investigate the build job for the pipeline!

@acts-project-service acts-project-service added the Breaks Athena build This PR breaks the Athena build label Oct 16, 2024
@CarloVarni CarloVarni deleted the CorrectImpactComputation branch October 16, 2024 11:27
@paulgessinger paulgessinger modified the milestones: next, v37.1.0 Oct 17, 2024
Rosie-Hasan pushed a commit to Rosie-Hasan/acts that referenced this pull request Nov 13, 2024
…acts-project#3728)

One of the criterion used in doublet finding relies on computing the minimal distance between the origin and the straight line connecting the two points of the doublet. This distance is compared against a maximum impact parameter (`impactMax`) provided by the user. 

Let's consider for instance the middle-top doublet search. 
<img width="479" alt="Geometry" src="https://github.com/user-attachments/assets/bb1c3f87-d687-4f49-9582-02e91773f8ad">

In the attached image:
- `A` is the origin
- `B` is the middle space point, thus `AB = rM` (radius of middle space point) 
- `C` is the top space point

What the code does is to compute `BD` (`xNewFrame` in the code) and `CD` (`yNewFrame` in the code)  and then a simple geometric similarity to compute the impact parameter. 

The code currently does: `Im / CD = AB / BD`, where `Im` is the impact parameter we are trying to compute.  Thus `Im = (AB * CD) / BD <= impactMax`. Unfortunately `Im` is equal to `AF`, while we really want to compute `AE`. The proper computation would be `Im / CD = AB / BC`, which leads to `Im = (AB * CD) / BC <= impactMax`. In this case `Im = AE`.

However, `BC` has to be computed from `CD` and `BD`. In order to avoid square roots I'm using square quantities. 

It is also possible that the code assumes that the `alpha` angle is too small to make a difference and thus uses an approximation... But there are no comments in the code about this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaks Athena build This PR breaks the Athena build Component - Core Affects the Core module Seeding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants