pub struct PyMandelstam(pub Mandelstam);
Expand description
Mandelstam variables s, t, and u
By convention, the metric is chosen to be :math:(+---)
and the variables are defined as follows
(ignoring factors of :math:c
):
.. math:: s = (p_1 + p_2)^2 = (p_3 + p_4)^2
.. math:: t = (p_1 - p_3)^2 = (p_4 - p_2)^2
.. math:: u = (p_1 - p_4)^2 = (p_3 - p_2)^2
§Parameters
p1: list of int
The indices of particles to combine to create :math:p_1
in the diagram
p2: list of int
The indices of particles to combine to create :math:p_2
in the diagram
p3: list of int
The indices of particles to combine to create :math:p_3
in the diagram
p4: list of int
The indices of particles to combine to create :math:p_4
in the diagram
channel: {‘s’, ‘t’, ‘u’, ‘S’, ‘T’, ‘U’}
The Mandelstam channel to calculate
§Raises
Exception
If more than one particle list is empty
ValueError
If channel
is not one of the valid options
§Notes
At most one of the input particles may be omitted by using an empty list. This will cause the calculation to use whichever equality listed above does not contain that particle.
By default, the first equality is used if no particle lists are empty.
Tuple Fields§
§0: Mandelstam
Trait Implementations§
Source§impl Clone for PyMandelstam
impl Clone for PyMandelstam
Source§fn clone(&self) -> PyMandelstam
fn clone(&self) -> PyMandelstam
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'de> Deserialize<'de> for PyMandelstam
impl<'de> Deserialize<'de> for PyMandelstam
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'py> IntoPyObject<'py> for PyMandelstam
impl<'py> IntoPyObject<'py> for PyMandelstam
Source§type Target = PyMandelstam
type Target = PyMandelstam
Source§type Output = Bound<'py, <PyMandelstam as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <PyMandelstam as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for PyMandelstam
impl PyClass for PyMandelstam
Source§impl PyClassImpl for PyMandelstam
impl PyClassImpl for PyMandelstam
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§type ThreadChecker = SendablePyClass<PyMandelstam>
type ThreadChecker = SendablePyClass<PyMandelstam>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature<PyMandelstam> for PyClassImplCollector<PyMandelstam>
impl PyClassNewTextSignature<PyMandelstam> for PyClassImplCollector<PyMandelstam>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a PyMandelstam
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a PyMandelstam
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut PyMandelstam
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut PyMandelstam
Source§impl PyMethods<PyMandelstam> for PyClassImplCollector<PyMandelstam>
impl PyMethods<PyMandelstam> for PyClassImplCollector<PyMandelstam>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for PyMandelstam
impl PyTypeInfo for PyMandelstam
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Source§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
PyTypeInfo::type_object
PyTypeInfo::type_object
.Source§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type or a subclass of this type.Source§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
PyTypeInfo::is_type_of
PyTypeInfo::is_type_of
.Source§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type.Source§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
PyTypeInfo::is_exact_type_of
PyTypeInfo::is_exact_type_of
.Source§impl Serialize for PyMandelstam
impl Serialize for PyMandelstam
impl DerefToPyAny for PyMandelstam
Auto Trait Implementations§
impl Freeze for PyMandelstam
impl RefUnwindSafe for PyMandelstam
impl Send for PyMandelstam
impl Sync for PyMandelstam
impl Unpin for PyMandelstam
impl UnwindSafe for PyMandelstam
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> FromPyObject<'_> for T
impl<T> FromPyObject<'_> for T
Source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
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<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self
into an owned Python object, dropping type information.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
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.