feynlag.vertices.bilinear.fermion_mass_matrix

feynlag.vertices.bilinear.fermion_mass_matrix(L_fermionic, bar_base, field_base, vacuum, nflavors, indices, gamma=None)[source]

Fermion mass matrix from the vacuum-evaluated fermionic sector.

Collects the coefficient of Bilinear(bar_base[i], Γ, field_base[j]) at the vacuum; the Lagrangian mass term is −ψ̄ M χ, so M[i,j] = −coefficient.

Parameters:
  • L_fermionic – the fermionic Lagrangian sector (weak basis).

  • bar_base – the IndexedBase pair of the mass term.

  • field_base – the IndexedBase pair of the mass term.

  • vacuum – Vacuum.

  • nflavors – matrix dimension.

  • indices – kept for backward compatibility and ignored — each term is read at its own leg indices, so symbolic indices (Y[i,j] ψ̄_i χ_j), explicit integer indices (m_c ψ̄_1 χ_1) and a repeated index (m ψ̄_i χ_i, diagonal) all work, including mixed in one Lagrangian.

  • gamma – restrict to one Dirac structure (default: sum all — correct when P_L and P_R terms are conjugate halves of a Dirac mass).

Returns:

nflavors × nflavors Matrix.