mt2 provides a fast, numerically stable computation of the stransverse mass (M_T2) as a NumPy universal function (ufunc). It is commonly used in high-energy physics for SUSY searches and dilepton event analysis. Current version: 1.3.1, with release cadence approximately every 3-4 months. Requires Python >=3.9.
pip install mt2Verified import paths — ran on the pinned version, not inferred.
Compute the stransverse mass for a single event.
Upgrade to mt2>=1.2.1 and ensure numpy is compatible (numpy>=1.23,<2.1 recommended).
Use standard `import mt2`. If you relied on internal paths, adjust imports accordingly.
Use keyword arguments or check the new signature: mt2(pa, pb, pt_miss, m_invis, ...).
Ensure pt_miss is a 1D array of length 2. Use e.g. np.array([px, py]).
Upgrade to >=1.3.0 or explicitly clip negative masses to zero before passing to mt2.
Run `pip install mt2` or `conda install -c conda-forge mt2`.
Upgrade mt2 to >=1.2.1 and ensure numpy is compatible: `pip install 'mt2>=1.2.1'`.
Reshape inputs to have consistent leading dimensions, ensuring pa, pb, pt_miss are all 1D arrays of same length or broadcastable.
Check shapes: pa.shape == (3,), pb.shape == (3,), pt_miss.shape == (2,). For arrays, ensure last dimension is correct.