fix Zlm static user vars flag - #413
Conversation
…the polarization is stored in the data file or not - this generates the correct behavior for the current implementation of the class
There was a problem hiding this comment.
🟢 Approval recommended
The functional change aligns areUserVarsStatic() with how Zlm actually computes user variables, and the remaining feedback is a minor comment typo.
Pull request overview
Adjusts AmpTools’ optimization behavior for the Zlm amplitude by correctly reporting when its computed user variables can be shared across amplitude instances, preventing incorrect fits when polarization is provided via amplitude arguments rather than embedded in event data. Also removes an unused include to improve portability.
Changes:
- Make
Zlm::areUserVarsStatic()depend on whether polarization is stored in the input tree (m_polInTree) instead of always returningtrue. - Remove unused
UTILITIES/BeamProperties.hinclude fromVec_ps_refl.cc.
File summaries
| File | Description |
|---|---|
| src/libraries/AMPTOOLS_AMPS/Zlm.h | Correctly reports whether user variables are static across amplitude instances based on polarization source. |
| src/libraries/AMPTOOLS_AMPS/Vec_ps_refl.cc | Drops an unused header include to reduce unnecessary dependencies. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Test status for this pull request: SUCCESS Summary: summary.txt Build log: make_shepherd_amp_fix.log |
|
Test status for this pull request: SUCCESS Summary: summary.txt Build log: make_shepherd_amp_fix.log |
This corrects the logic in the Zlm class for "areUserVarsStatic"? This has implications on how AmpTools optimizes the storage of user variables. The current implementation would lead to incorrect fit results when the same accepted MC is used to fit all polarization orientations, and the polarization angle and magnitude is passed as an argument to the class.
I also deleted an unused header from Vec_ps_refl to enhance portability.