pub struct VertexView<'a> { /* private fields */ }Expand description
Read-only access to channel expressions evaluated in a vertex rest frame.
Implementations§
Source§impl<'a> VertexView<'a>
impl<'a> VertexView<'a>
Sourcepub fn vertex(&self) -> &'a Vertex
pub fn vertex(&self) -> &'a Vertex
Return the underlying vertex definition.
§Panics
Panics if the vertex associated with this view is missing from the channel.
Sourcepub fn p4(&self, edge: &str) -> LadduPhysicsResult<Vec4>
pub fn p4(&self, edge: &str) -> LadduPhysicsResult<Vec4>
Construct an edge four-momentum boosted into this vertex’s rest frame.
§Errors
Returns LadduPhysicsError when the edge, frame path, or required
momenta cannot be resolved.
Sourcepub fn vec3(&self, edge: &str) -> LadduPhysicsResult<Vec3>
pub fn vec3(&self, edge: &str) -> LadduPhysicsResult<Vec3>
Construct an edge three-momentum in this vertex’s rest frame.
§Errors
Returns LadduPhysicsError when the edge’s rest-frame momentum cannot
be resolved.
Sourcepub fn costheta(
&self,
edge: &str,
z_axis: Vec3,
_y_hint: Vec3,
) -> LadduPhysicsResult<Expr>
pub fn costheta( &self, edge: &str, z_axis: Vec3, _y_hint: Vec3, ) -> LadduPhysicsResult<Expr>
Construct the cosine of an edge’s polar angle about the supplied axis.
§Errors
Returns LadduPhysicsError when the edge’s rest-frame momentum cannot
be resolved.
Sourcepub fn theta(
&self,
edge: &str,
z_axis: Vec3,
y_hint: Vec3,
) -> LadduPhysicsResult<Expr>
pub fn theta( &self, edge: &str, z_axis: Vec3, y_hint: Vec3, ) -> LadduPhysicsResult<Expr>
Construct an edge’s polar angle about the supplied axis.
§Errors
Returns LadduPhysicsError when the edge’s rest-frame momentum cannot
be resolved.
Sourcepub fn phi(
&self,
edge: &str,
z_axis: Vec3,
y_hint: Vec3,
) -> LadduPhysicsResult<Expr>
pub fn phi( &self, edge: &str, z_axis: Vec3, y_hint: Vec3, ) -> LadduPhysicsResult<Expr>
Construct an edge’s azimuthal angle in the supplied coordinate frame.
§Errors
Returns LadduPhysicsError when the edge’s rest-frame momentum cannot
be resolved.
Sourcepub fn mandelstam(&self, channel: MandelstamChannel) -> LadduPhysicsResult<Expr>
pub fn mandelstam(&self, channel: MandelstamChannel) -> LadduPhysicsResult<Expr>
Construct one of the Mandelstam invariants for a two-to-two vertex.
§Errors
Returns LadduPhysicsError when this is not a two-to-two vertex or
the required edge momenta cannot be resolved.
Sourcepub fn s(&self) -> LadduPhysicsResult<Expr>
pub fn s(&self) -> LadduPhysicsResult<Expr>
Construct the Mandelstam s invariant.
§Errors
Returns LadduPhysicsError when this is not a two-to-two vertex or
the required edge momenta cannot be resolved.
Sourcepub fn t(&self) -> LadduPhysicsResult<Expr>
pub fn t(&self) -> LadduPhysicsResult<Expr>
Construct the Mandelstam t invariant.
§Errors
Returns LadduPhysicsError when this is not a two-to-two vertex or
the required edge momenta cannot be resolved.
Sourcepub fn u(&self) -> LadduPhysicsResult<Expr>
pub fn u(&self) -> LadduPhysicsResult<Expr>
Construct the Mandelstam u invariant.
§Errors
Returns LadduPhysicsError when this is not a two-to-two vertex or
the required edge momenta cannot be resolved.
Trait Implementations§
Source§impl<'a> Clone for VertexView<'a>
impl<'a> Clone for VertexView<'a>
Source§fn clone(&self) -> VertexView<'a>
fn clone(&self) -> VertexView<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for VertexView<'a>
impl<'a> RefUnwindSafe for VertexView<'a>
impl<'a> Send for VertexView<'a>
impl<'a> Sync for VertexView<'a>
impl<'a> Unpin for VertexView<'a>
impl<'a> UnsafeUnpin for VertexView<'a>
impl<'a> UnwindSafe for VertexView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.