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: Update full_chain_odd_LRT.py to follow full_chain_odd.py #3977

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

delitez
Copy link
Contributor

@delitez delitez commented Dec 11, 2024

In this PR full_chain_odd_LRT.py is updated according to full_chain_odd.py.

Summary by CodeRabbit

  • New Features

    • Introduced a command-line argument --output-obj to toggle object output.
  • Enhancements

    • Updated ambiguity resolution configuration to use mathematical constants for phiMax and phiMin.
    • Added new parameters for seeding and track selection to improve configurability and precision.
    • Changed the vertex fitting method to a more advanced algorithm.

These updates enhance the script's functionality and improve the particle tracking and reconstruction processes.

Copy link

coderabbitai bot commented Dec 11, 2024

Walkthrough

Enhancements to full_chain_odd_LRT.py, significant they are. New import of math module, hardcoded values replaced with math.pi. A command-line argument --output-obj introduced, toggling object output, it does. Updates to addSeeding and addCKFTracks functions, new parameters added for improved configurations. The vertex fitting method changed from VertexFinder.Iterative to VertexFinder.AMVF, a shift in algorithm, yes.

Changes

File Path Change Summary
Examples/Scripts/Python/full_chain_odd_LRT.py - Added --output-obj command-line argument for output control.
- Updated addSeeding with new parameters: initialSigmas, initialSigmaPtRel, initialVarInflation.
- Modified addCKFTracks to include chi2CutOffMeasurement, chi2CutOffOutlier, numMeasurementsCutOff.
- Changed pixelVolumes and stripVolumes from sets to lists.
- Updated vertex fitting method from VertexFinder.Iterative to VertexFinder.AMVF.
- Replaced hardcoded phiMax and phiMin with math.pi and -math.pi.

Possibly related PRs

Suggested labels

automerge

Suggested reviewers

  • andiwand

In the code, changes are made,
New paths and options, a bright cascade.
With math.pi, values refined,
Output toggles, new parameters aligned.
Vertex finding, a new way to see,
Enhancements abound, as it should be! 🌌


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

paulgessinger
paulgessinger previously approved these changes Dec 11, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 93e3b27 and 989c2a6.

📒 Files selected for processing (1)
  • Examples/Scripts/Python/full_chain_odd_LRT.py (10 hunks)
🔇 Additional comments (6)
Examples/Scripts/Python/full_chain_odd_LRT.py (6)

289-289: Consistency with output directories, check you should.

Parameter outputDirObj added to addGeant4, it is. Ensure supported and correctly handled by the function, you must.


318-318: Parameter outputDirObj in addFatras, verify its usage you should.

Confirm that addFatras accepts outputDirObj and outputs as expected, you must.


377-379: New CKF parameters impact, consider carefully you should.

Parameters chi2CutOffMeasurement, chi2CutOffOutlier, and numMeasurementsCutOff adjusted they are. Effect on track reconstruction, test you must.


382-383: Data structure for volume lists, consistent it should be.

Changed pixelVolumes and stripVolumes to lists from sets, you have. Ensure functions expect lists, not sets, you must.


431-432: Using math.pi for phiMax and phiMin, appropriate it is.

Dynamic and clear, your code becomes. Good practice, this is.


456-456: Switch to VertexFinder.AMVF, significant this change is.

Impact on vertex reconstruction, verify you should. Consistency with other configurations, ensure you must.

Examples/Scripts/Python/full_chain_odd_LRT.py Show resolved Hide resolved
@acts-policybot acts-policybot bot dismissed paulgessinger’s stale review December 11, 2024 14:31

Invalidated by push of d2637f5

@github-actions github-actions bot added the Component - Examples Affects the Examples module label Dec 11, 2024
@github-actions github-actions bot added this to the next milestone Dec 11, 2024
Copy link

github-actions bot commented Dec 11, 2024

📊: Physics performance monitoring for a15dda6

Full contents

physmon summary

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
Examples/Scripts/Python/full_chain_odd_LRT.py (1)

376-401: Chi-square cutoffs and volume constraints, document you should!

Hmmmm. New parameters for track finding, added they were. But documentation, missing it is.

Add comments explaining:

  • Choice of chi-square cutoff values
  • Purpose of each volume in constraints list
  • Impact on track reconstruction performance
+    # Chi-square cutoffs for track fitting quality control
     chi2CutOffMeasurement=15.0,  # Cut-off for measurement chi2
     chi2CutOffOutlier=25.0,      # Cut-off for outlier chi2
     numMeasurementsCutOff=10,    # Minimum number of measurements
+    # Detector volume definitions
     pixelVolumes=[16, 17, 18],   # Pixel detector volumes
     stripVolumes=[23, 24, 25],   # Strip detector volumes
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 989c2a6 and a15dda6.

📒 Files selected for processing (1)
  • Examples/Scripts/Python/full_chain_odd_LRT.py (9 hunks)
🔇 Additional comments (4)
Examples/Scripts/Python/full_chain_odd_LRT.py (4)

139-144: Python 3.9 compatibility issue, address you must!

Hmmmm. BooleanOptionalAction in Python 3.9 introduced it was. Support for older versions, maintain we should.


288-288: Consistent implementation of object output, I see!

Properly aligned with command-line argument, these changes are. Wisdom in consistency, there is.

Also applies to: 317-317


336-345: Initial track parameters, verify you must!

Values for track parameter initialization, reasonable they appear. Yet, verify against physics expectations, we should.

✅ Verification successful

Verified, the track parameter initialization values are, hmmmm

Through the Force, searched the codebase I have. The same configuration values, found in multiple places they are:

  • Core tracking components use identical initialSigmaPtRel=0.1
  • Similar spatial resolutions of 1mm and 1 degree in EstimateTrackParamsFromSeed.hpp
  • Consistent initialVarInflation values across tracking scripts

Matches the established wisdom of the Jedi Council these values do. In harmony with other tracking configurations they are.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for similar parameter configurations in other tracking scripts
rg -A 2 "initialSigmas.*mm" 
rg -A 2 "initialSigmaPtRel.*0\.1"

Length of output: 2587


430-431: Improved precision and algorithm choice, I sense!

Using math.pi instead of hardcoded values, wise decision it is. AMVF vertex finder, modern approach it represents.

Also applies to: 455-455

✅ Verification successful

Verified the changes are, hmmmm! The Force is strong with this code.

Consistent usage of math.pi throughout the codebase I see. AMVF vertex finder, widely adopted in many scripts it is - in full chain tests, examples, and CI workflows. A standard practice this has become, yes.

The mathematical precision with math.pi and modern AMVF algorithm, aligned with the codebase's ways they are. Trust in these changes, we must.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for AMVF usage patterns and configurations
rg -A 5 "vertexFinder.*AMVF"

Length of output: 4748


Script:

#!/bin/bash
# Search for vertex finder enum and its values
ast-grep --pattern 'class VertexFinder'

# Search for math.pi usage in angle-related configurations
rg -B 2 -A 2 'math\.pi.*phi'

Length of output: 888

@kodiakhq kodiakhq bot merged commit 2d5ed72 into acts-project:main Dec 12, 2024
45 checks passed
@delitez delitez deleted the aichaLRT branch December 12, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Examples Affects the Examples module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants