refactor: Read Bethe-Heitler-Approx from json#5599
Draft
benjaminhuth wants to merge 6 commits into
Draft
Conversation
- Rename class to PolynomialBetheHeitlerApprox - Add deprecated typedef for backwards compatibility - Deprecate loadFromFiles member function with message to use loadBetheHeitlerApproxFromJson instead - Update all references in JSON converter, reader, Python bindings, and tests - Keep makeDefaultBetheHeitlerApprox free function working with new class name
- Add RangeData struct with lowX0, highX0, data, and transform - Add new constructor taking std::vector<RangeData> - Deprecate old two-range constructor - Update mixture() to iterate through ranges - Update loadFromFiles to create ranges vector internally - Update makeDefaultBetheHeitlerApprox to use new constructor - Update JSON converter to handle N ranges with components array - Update JSON reader to parse ranges array - Update Python bindings for new constructor
- Remove duplicate BetheHeitlerApproxJsonConverter::RangeData - Update JSON converter to use PolynomialBetheHeitlerApprox::RangeData - Update JSON reader to use core RangeData type - Simplify code by removing redundant type definitions
- Use Acts::Range1D<double> for storing x0 range bounds - Use structured bindings in for loop for cleaner code - Use range.contains() for range lookups - Fix JSON converter to make from_json/to_json available via ADL
Contributor
2866162 to
697bdb7
Compare
- Move constructor implementation to source file - Sort ranges by minimum value in constructor - Validate that ranges don't overlap using Range1D methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So far, ACTS had a reader for the custom ATLAS/Athena native parameterization format. However, this format is non-standard and untested. This replaces this by introducing a json-based reading, and also adds a file to the repository that encodes the default parameterization used in ATLAS.