pub struct Reaction { /* private fields */ }Expand description
A reaction with owned particle definitions and topology roles.
Implementations§
Source§impl Reaction
impl Reaction
Sourcepub fn new(
graph: ParticleGraph,
topology: ReactionTopology,
) -> Result<Reaction, LadduError>
pub fn new( graph: ParticleGraph, topology: ReactionTopology, ) -> Result<Reaction, LadduError>
Construct a reaction from a particle graph and topology.
Sourcepub fn two_to_two(
p1: &Particle,
p2: &Particle,
p3: &Particle,
p4: &Particle,
) -> Result<Reaction, LadduError>
pub fn two_to_two( p1: &Particle, p2: &Particle, p3: &Particle, p4: &Particle, ) -> Result<Reaction, LadduError>
Construct a two-to-two reaction.
Sourcepub const fn graph(&self) -> &ParticleGraph
pub const fn graph(&self) -> &ParticleGraph
Return the owned particle graph.
Sourcepub const fn topology(&self) -> &ReactionTopology
pub const fn topology(&self) -> &ReactionTopology
Return the reaction topology.
Sourcepub fn two_to_two_topology(&self) -> Result<&TwoToTwoReaction, LadduError>
pub fn two_to_two_topology(&self) -> Result<&TwoToTwoReaction, LadduError>
Return the two-to-two topology role assignments.
Sourcepub fn role(&self, role: &str) -> Result<&Particle, LadduError>
pub fn role(&self, role: &str) -> Result<&Particle, LadduError>
Return the particle assigned to a named topology role.
Sourcepub fn p4(
&self,
event: &dyn EventLike,
particle: &str,
) -> Result<Vec4, LadduError>
pub fn p4( &self, event: &dyn EventLike, particle: &str, ) -> Result<Vec4, LadduError>
Resolve a particle p4 from an event.
Sourcepub fn resolve_two_to_two(
&self,
event: &dyn EventLike,
) -> Result<ResolvedTwoToTwo, LadduError>
pub fn resolve_two_to_two( &self, event: &dyn EventLike, ) -> Result<ResolvedTwoToTwo, LadduError>
Resolve the two-to-two topology momenta from an event.
Sourcepub fn decay(&self, parent: &str) -> Result<Decay, LadduError>
pub fn decay(&self, parent: &str) -> Result<Decay, LadduError>
Construct an isobar decay view from a composite parent.
Sourcepub fn production(&self) -> Result<Production, LadduError>
pub fn production(&self) -> Result<Production, LadduError>
Construct a two-to-two production view.
Sourcepub fn mandelstam(&self, channel: Channel) -> Result<Mandelstam, LadduError>
pub fn mandelstam(&self, channel: Channel) -> Result<Mandelstam, LadduError>
Construct a Mandelstam variable for this reaction.
Sourcepub fn pol_angle<A>(&self, angle_aux: A) -> PolAngle
pub fn pol_angle<A>(&self, angle_aux: A) -> PolAngle
Construct a polarization-angle variable for this reaction.
Sourcepub fn polarization<M, A>(&self, magnitude_aux: M, angle_aux: A) -> Polarization
pub fn polarization<M, A>(&self, magnitude_aux: M, angle_aux: A) -> Polarization
Construct polarization variables for this reaction.
Sourcepub fn axes(
&self,
event: &dyn EventLike,
particle: &str,
frame: Frame,
) -> Result<FrameAxes, LadduError>
pub fn axes( &self, event: &dyn EventLike, particle: &str, frame: Frame, ) -> Result<FrameAxes, LadduError>
Compute axes for a particle in this reaction.
Sourcepub fn angles_value(
&self,
event: &dyn EventLike,
parent: &str,
daughter: &str,
frame: Frame,
) -> Result<DecayAngles, LadduError>
pub fn angles_value( &self, event: &dyn EventLike, parent: &str, daughter: &str, frame: Frame, ) -> Result<DecayAngles, LadduError>
Compute a daughter’s decay angles in its parent rest frame.
Sourcepub fn production_angles_value(
&self,
event: &dyn EventLike,
produced: &str,
frame: Frame,
) -> Result<DecayAngles, LadduError>
pub fn production_angles_value( &self, event: &dyn EventLike, produced: &str, frame: Frame, ) -> Result<DecayAngles, LadduError>
Compute the produced-system production angles in the overall center-of-momentum frame.
Sourcepub fn particle(&self, particle: &str) -> Result<&Particle, LadduError>
pub fn particle(&self, particle: &str) -> Result<&Particle, LadduError>
Return the particle with the given identifier.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Reaction
impl<'de> Deserialize<'de> for Reaction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Reaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Reaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Reaction
impl Serialize for Reaction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Reaction
Auto Trait Implementations§
impl Freeze for Reaction
impl RefUnwindSafe for Reaction
impl Send for Reaction
impl Sync for Reaction
impl Unpin for Reaction
impl UnsafeUnpin for Reaction
impl UnwindSafe for Reaction
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
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.