YAM2 2.0: Yet another M2 with on-shell mass constraints and beyond
Description
We present a new version of YAM2 (“Yet Another M2 calculator”), a C++ library for computing the M2 class of kinematic variables widely used in collider phenomenology with invisible particles. The main upgrade is the incorporation of new kinematic constraints: on-shell mass conditions implemented as equality constraints and vertex-reconstruction information as inequality constraints. The former enables precise treatment of the antler decay topology and generalizations such as M2 Cons-like variables, while the latter extends applicability to cases where parent-particle flight directions can be inferred. Both extensions are implemented and validated within the sequential quadratic programming framework, ensuring robust performance in large-scale Monte Carlo studies. Additional improvements include CMake build support, extended example codes, and general code optimizations. With these updates, YAM2 2.0 provides a more versatile and user-friendly toolkit for collider analyses at both hadron and lepton colliders.