Hammer ver. 2.0.0

0 views
Skip to first unread message

Papucci, Michele

unread,
Jun 16, 2026, 2:11:22 PM (10 days ago) Jun 16
to Hammer Library Announcements
Dear all,

Version 2.0.0 of Hammer is now available on the Hammer website (https://hammer.physics.lbl.gov) and on the GitLab repo. It is a major revision as it introduces changes in the user-facing API.

The main upgrades are:
1) New Python API: we now use cppyy/ROOT to generate the Hammer Python bindings. This achieves full parity of the Python API with C++, with the same syntax of methods. This allows full access to the entire library functionality from Python, and enables more streamlined future maintenance of the API. It also allows better pyROOT integration, including the possibility to save/load Hammer binaries to TTrees using Python and evaluate tensor histograms to TH*D in Python (as was already possible in C++). The prior Cython-based API is still present, but considered deprecated and may be removed in future versions.

2) The Wilson Coefficient partial specialization framework: the user can now choose an affine subspace (origin + hyperplane) to scan the new physics Wilson Coefficients instead of the full (11D) space. This is intended for fitting e.g. simplified models, and produces O(10x) speed improvements in NP scans plus reduced memory overhead. See new demo13/demo14 examples. Older WC specialization-to-single-point methods are obsolete.

3) An in-depth optimization pass in the tensor linear algebra internal library, including a fully redesigned algorithm for tensorial outer products. Computational complexity now scales near linearly in rank x size of the amplitude tensor space when contracting with external data, even with MC errors included. Speed improvements on the demo* suite of examples vary between 1.3x to 5x compared to v.1.4.1.

Notes:
- These changes enable fast simultaneous scans in NP WC space + FF variation space + MC errors, as requested by many users, while large memory overhead for such a high-dimensional tensor space can be reduced with WC specialization methods.
- Backwards compatibility (read-in) is maintained for Hammer buffer files generated with v1.x
- A new complete version of the manual is also available on the webpage. This will be posted to arXiv in the next few days, and updated for future minor versions. Please cite it when using Hammer.

Here is a full summary of the code changes (please see the manual or readme for more details):

- Additions:

- New Python API based on ROOT/cppyy: full parity with C++ API, interoperability with pyROOT (addresses issue #77).
- "Old" Cython-based Python API is now considered deprecated and may be removed in future versions.
- Partial specialization of Wilson Coefficients: parametrization of affine subspaces (simplified models) of the general WC space. Prior WC specialization-to-single-point methods are obsolete.
- Convenience methods for retrieving current values of WC and FF errors (addresses issue #84), and displaying known FF parametrizations and syntax.
- Additional amplitudes (D1* decays) and new FF parametrizations (CLN and BCL B(s) -> D(s) and variational classes)

- Improvements:

- Significant speed optimizations in tensor linear algebra (addresses issue #81).
- Modernized build system.
- Bumped to C++17 syntax.
- Full code review (addresses issues #52 and #53).

- Fixes:

- Build issue #86.
- Minor bugs
- Extra guards on malformed I/O.
- Error when merging files produced by different versions of HAMMER


Please contact us for your comments/questions at hammer-...@lbl.gov.

As some users may not be on the mailing list, please circulate this to others who might be interested.

Happy reweighting!

The Hammer authors

Reply all
Reply to author
Forward
0 new messages