pub struct Event { /* private fields */ }Expand description
Metadata-aware view of an EventData with name-based helpers.
Implementations§
Source§impl Event
impl Event
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 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§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)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.