-
Notifications
You must be signed in to change notification settings - Fork 172
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
Conversation
WalkthroughEnhancements to Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
📒 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.
Invalidated by push of d2637f5
There was a problem hiding this 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
📒 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
Quality Gate passedIssues Measures |
In this PR full_chain_odd_LRT.py is updated according to full_chain_odd.py.
Summary by CodeRabbit
New Features
--output-obj
to toggle object output.Enhancements
phiMax
andphiMin
.These updates enhance the script's functionality and improve the particle tracking and reconstruction processes.