OnShellEnergy

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

OnShellEnergy

class OnShellEnergy

A symbolic on-shell energy shared by CFF and LTD.

symbol is gammalooprs::OSE(e), with physical diagram edge ID e. to_expression() returns the positive-root definition

\[ E_e=\sqrt{\boldsymbol{q}_e^2+m_e^2}. \]

The spatial momentum is routed through the diagram’s loop-momentum basis. Its K(i, cind(a)) and P(i, cind(a)) coordinates use basis positions i and Cartesian components a equal to 1, 2 or 3. These positions are not physical edge IDs. Surface expansion leaves OSE symbolic; substitute this definition for spatial evaluation, or supply your own energy evaluator.

Examples

from symbolica.community import hepkit as hep
process = hep.Model.phi3().process(["phi"], ["phi", "phi"])
diagrams = process.generate_diagrams(
    loops=1, max_vertices=3, maximum_bridges=0, progress=None
)
diagram = diagrams.diagrams[0]
rep = diagram.integrate_energy(method="cff")
energy = next(iter(rep.on_shell_energies.values()))
replacement = (energy.symbol, energy.to_expression())

Attributes

Name Description
edge_id Physical diagram edge owning this energy.
symbol Canonical gammalooprs::OSE(edge_id), shared between CFF and LTD.

edge_id

OnShellEnergy.edge_id: builtins.int

Physical diagram edge owning this energy.

Examples

edge_id = energy.edge_id

symbol

OnShellEnergy.symbol: Expression

Canonical gammalooprs::OSE(edge_id), shared between CFF and LTD.

Examples

symbol = energy.symbol

Methods

Name Description
__repr__ Display the symbolic energy and its definition.
_repr_html_ Render the energy symbol with its expandable routed square root.
to_expression Return the routed definition :math:\sqrt{\boldsymbol{q}_e^2+m_e^2}.

__repr__

OnShellEnergy.__repr__() -> builtins.str

Display the symbolic energy and its definition.

Examples

print(energy)

_repr_html_

OnShellEnergy._repr_html_() -> builtins.str

Render the energy symbol with its expandable routed square root.

Examples

html = energy._repr_html_()

to_expression

OnShellEnergy.to_expression() -> TensorExpression

Return the routed definition :math:\sqrt{\boldsymbol{q}_e^2+m_e^2}.

Examples

definition = energy.to_expression()

Returns

  • TensorExpression Positive square root in the diagram’s spatial K/P basis coordinates.