YAM2 2.0: Yet another M2 with on-shell mass constraints and beyond - Park, Chan Beom (Computer physics communications, 2025)
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 M2Cons-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. Program Title: YAM2 CPC Library link to program files:https://doi.org/10.17632/4g7wfd5fpb.2 Developer's repository link:https://github.com/cbpark/YAM2 Licensing provisions: BSD 3-clause Programming language: C++ Journal reference of previous version: Comput. Phys. Commun. 264 (2021) 107967 Does the new version supersede the previous version?: Yes Reasons for the new version: YAM2 2.0 incorporates recent theoretical advances in M2 variables, including on-shell mass and vertex-reconstruction constraints, to ensure consistency with the latest developments in the field. In parallel, user-driven improvements such as CMake support, example codes, ROOT integration, and performance optimizations enhance usability and portability. These updates make the package both more powerful and easier to use for collider analyses at hadron and lepton colliders. Summary of revisions: One of the main enhancements in the present version is the incorporation of additional kinematic constraints into the M2 variables: on-shell mass conditions implemented as equality constraints and vertex-reconstruction information realized as inequality constraints. The on-shell mass condition is particularly relevant for handling the so-called antler decay topology, where a parent particle Y decays via Y→A1+A2→a1B1+a2B2. In this decay topology, Y is an on-shell resonance, Ai are intermediate states, ai are visible particles, and Bi (i=1,2) are invisible particles [1]. This corresponds to the M2Cons variable introduced in Ref. [2], which was proposed as a tool for searching for heavy resonances decaying semi-invisibly at hadron colliders. Since the center-of-mass energy is fixed at lepton colliders such as the Belle experiment at SuperKEKB and at future lepton colliders, the same construction can naturally be applied to pair-production decay topologies in these environments, as discussed in Ref. [3, 4]. In this case, the longitudinal component of the missing momentum must also be taken into account, and this functionality has been fully implemented in the new version. Furthermore, recent studies have shown that the M2 variables can be extended by incorporating constraints on the parent particles' flight directions, inferred from vertex-reconstruction information [5]. These have been implemented in the new version as inequality constraints and successfully tested. Minor improvements to the code base include:•Additional example codes for exploring and testing the basic functionalities.•Support for CMake-based builds, improving portability and integration with external projects.•Instructions for integrating YAM2 into analysis codes based on the ROOT framework [6].•General code cleanup and performance optimizations. As this version introduces breaking changes, users are advised to update their analysis codes to ensure full compatibility. Nature of problem: The M2 variables form a family of kinematic observables that generalize the well-known stransverse mass MT2 [7] by incorporating additional kinematic constraints, such as on-shell mass conditions, in events with pair-produced particles decaying semi-invisibly [8]. In contrast to MT2, which relies solely on transverse kinematics, the M2 framework can exploit the full event topology by including longitudinal momentum components when suitable constraints are available. The computation of the M2 variables is formulated as a constrained numerical minimization, where the invisible momenta are varied subject to the measured missing transverse momentum and the imposed mass-shell conditions. Consequently, suitable numerical algorithms must be adopted, with attention to both efficiency and computational cost. Solution method: The calculation of the M2 variables is formulated as a constrained minimization problem, where the invisible momenta are treated as free parameters subject to the measured missing transverse momentum and additional kinematic conditions, such as on-shell mass constraints. This requires minimizing an objective function defined by the M2 variables while simultaneously satisfying nonlinear equality and inequality constraints. Among available constrained optimization methods, YAM2 employs sequential quadratic programming combined with a derivative-based quasi-Newton algorithm. This approach has proven to be both robust and efficient in locating local minima when derivative information is available, which is essential for large-scale Monte Carlo event analyses [9]. The implementation relies on the publicly available NLopt library [10], which offers a broad collection of optimization routines for nonlinear problems. In the current version of YAM2, the set of available algorithms has been extended to include alternative methods, such as the augmented Lagrangian approach, thereby giving users greater flexibility to balance numerical stability, accuracy, and computational cost according to the needs of their analysis. [1]T. Han, I.W. Kim, J. Song, Phys. Lett. B 693 (2010) 575–579, arXiv:0906.5009 [hep-ph].[2]P. Konar, A.K. Swain, Phys. Rev. D 93 (1) (2016) 015021, arXiv:1509.00298 [hep-ph].[3]D. Guadagnoli, C.B. Park, F. Tenchini, Phys. Lett. B 822 (2021) 136701, arXiv:2106.16236 [hep-ph].[4]C.B. Park, New Phys. Sae Mulli 73 (8) (2023) 664–674.[5]G. de Marino, D. Guadagnoli, C.B. Park, K. Trabelsi, Phys. Rev. D 107 (5) (2023) 055010, arXiv:2209.03387 [hep-ph].[6]R. Brun, F. Rademakers, Nucl. Instrum. Methods. A 389 (1–2) (1997) 81–86.[7]C.G. Lester, D.J. Summers, Phys. Lett. B 463 (1999) 99–103, arXiv:hep-ph/9906349 [hep-ph].[8]W.S. Cho, J.S. Gainer, D. Kim, K.T. Matchev, F. Moortgat, L. Pape, M. Park, J. High Energy Phys. 08 (2014) 070, arXiv:1401.1449 [hep-ph].[9]C.B. Park, Comput. Phys. Commun. 264 (2021) 107967, arXiv:2007.15537 [hep-ph].[10]S.G. Johnson, The NLopt nonlinear-optimization package, https://github.com/stevengj/nlopt.