CffOrientation
CffOrientation
class CffOrientationOne acyclic energy-flow orientation in a CFF representation.
families contains its cross-free denominator products. to_expression() sums their contributions, including the common energy prefactors and any supplied numerator. Edge directions are relative to the originating diagram’s stored orientation.
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]
result = diagram.integrate_energy(method="cff")
orientation = result.orientations[0]
expression = orientation.to_expression()Attributes
| Name | Description |
|---|---|
edge_orientations |
Return each edge ID and its selected orientation. |
edge_signs |
Edge signs relative to the diagram’s stored arrows |
families |
Cross-free families contributing to this orientation. |
id |
Return this orientation’s stable index within the CFF result. |
edge_orientations
CffOrientation.edge_orientations: builtins.list[tuple[builtins.int, builtins.str]]Return each edge ID and its selected orientation.
Examples
Using the setup in the CffOrientation class example:
directions = dict(orientation.edge_orientations)edge_signs
CffOrientation.edge_signs: builtins.dict[builtins.int, typing.Optional[builtins.int]]Edge signs relative to the diagram’s stored arrows.
+1 agrees with the stored direction, -1 reverses it, and None denotes an undirected edge. These are orientation signs, not surface coefficients.
Examples
signs = orientation.edge_signs
assert all(sign in (-1, 1, None) for sign in signs.values())families
CffOrientation.families: builtins.list[CrossFreeFamily]Cross-free families contributing to this orientation.
Examples
families = orientation.familiesid
CffOrientation.id: builtins.intReturn this orientation’s stable index within the CFF result.
Examples
Using the setup in the CffOrientation class example:
orientation_ids = [item.id for item in result.orientations]Methods
| Name | Description |
|---|---|
__repr__ |
Summarize this orientation without displaying its parent representation. |
_display_ |
Display this orientation in Marimo. |
_repr_html_ |
Inspect this orientation’s family sum and fixed energy-flow graph. |
to_expression |
Sum this orientation’s families, including the common energy prefactor. |
__repr__
CffOrientation.__repr__() -> builtins.strSummarize this orientation without displaying its parent representation.
Examples
text = repr(orientation)_display_
CffOrientation._display_() -> typing.AnyDisplay this orientation in Marimo.
Examples
view = orientation._display_()_repr_html_
CffOrientation._repr_html_() -> builtins.strInspect this orientation’s family sum and fixed energy-flow graph.
Examples
html = orientation._repr_html_()to_expression
CffOrientation.to_expression(*, expand_surfaces: builtins.bool = True) -> TensorExpressionSum this orientation’s families, including the common energy prefactor.
Examples
Using the setup in the class example:
expression = orientation.to_expression()Parameters
expand_surfaces(bool, optional) Replace stored surface placeholders by affine energy definitions. Defaults to True. On-shell energies remain symbolic in either case.
Returns
TensorExpressionThis orientation’s contribution to the CFF energy integral.