pub struct OwnedEvent { /* private fields */ }Expand description
Owned metadata-aware event data.
This is useful for detached events, MPI fetches, and Python-owned event objects. Use
OwnedEvent::as_event to evaluate variables and amplitudes through the standard borrowed
Event interface.
Implementations§
Source§impl OwnedEvent
impl OwnedEvent
Sourcepub fn new(event: Arc<EventData>, metadata: Arc<DatasetMetadata>) -> Self
pub fn new(event: Arc<EventData>, metadata: Arc<DatasetMetadata>) -> Self
Create a new metadata-aware event from raw data and dataset metadata.
Sourcepub fn as_event(&self) -> Event<'_>
pub fn as_event(&self) -> Event<'_>
Borrow this owned row as an Event suitable for variable and amplitude evaluation.
Sourcepub fn p4s(&self) -> IndexMap<&str, Vec4>
pub fn p4s(&self) -> IndexMap<&str, Vec4>
Return the four-momenta stored in this event keyed by their registered names.
Sourcepub fn aux(&self) -> IndexMap<&str, f64>
pub fn aux(&self) -> IndexMap<&str, f64>
Return the auxiliary scalars stored in this event keyed by their registered names.
Sourcepub fn metadata(&self) -> &DatasetMetadata
pub fn metadata(&self) -> &DatasetMetadata
Retrieve the dataset metadata attached to this event.
Sourcepub fn metadata_arc(&self) -> Arc<DatasetMetadata>
pub fn metadata_arc(&self) -> Arc<DatasetMetadata>
Clone the metadata handle associated with this event.
Sourcepub fn p4(&self, name: &str) -> Option<Vec4>
pub fn p4(&self, name: &str) -> Option<Vec4>
Retrieve a four-momentum (or aliased sum) by name.
Sourcepub fn get_p4_sum<N>(&self, names: N) -> Vec4
pub fn get_p4_sum<N>(&self, names: N) -> Vec4
Return a four-momentum formed by summing four-momenta with the specified names.
Sourcepub fn boost_to_rest_frame_of<N>(&self, names: N) -> EventData
pub fn boost_to_rest_frame_of<N>(&self, names: N) -> EventData
Boost all four-momenta into the rest frame defined by the specified particle names.
Methods from Deref<Target = EventData>§
Sourcepub fn get_p4_sum<T: AsRef<[usize]>>(&self, indices: T) -> Vec4
pub fn get_p4_sum<T: AsRef<[usize]>>(&self, indices: T) -> Vec4
Return a four-momentum from the sum of four-momenta at the given indices in the EventData.
Sourcepub fn boost_to_rest_frame_of<T: AsRef<[usize]>>(&self, indices: T) -> Self
pub fn boost_to_rest_frame_of<T: AsRef<[usize]>>(&self, indices: T) -> Self
Boost all the four-momenta in the EventData to the rest frame of the given set of
four-momenta by indices.
Trait Implementations§
Source§impl AsRef<EventData> for OwnedEvent
impl AsRef<EventData> for OwnedEvent
Source§impl Clone for OwnedEvent
impl Clone for OwnedEvent
Source§fn clone(&self) -> OwnedEvent
fn clone(&self) -> OwnedEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OwnedEvent
impl Debug for OwnedEvent
Source§impl Deref for OwnedEvent
impl Deref for OwnedEvent
Source§impl Display for OwnedEvent
impl Display for OwnedEvent
Source§impl EventLike for OwnedEvent
impl EventLike for OwnedEvent
Source§fn metadata(&self) -> &DatasetMetadata
fn metadata(&self) -> &DatasetMetadata
Source§fn get_p4_sum<N>(&self, names: N) -> Option<Vec4>
fn get_p4_sum<N>(&self, names: N) -> Option<Vec4>
Auto Trait Implementations§
impl Freeze for OwnedEvent
impl RefUnwindSafe for OwnedEvent
impl Send for OwnedEvent
impl Sync for OwnedEvent
impl Unpin for OwnedEvent
impl UnsafeUnpin for OwnedEvent
impl UnwindSafe for OwnedEvent
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<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.