- class graphicle.data.MomentumArray(graphicle.base.ArrayBase)[source]
Data structure containing four-momentum of particle list.
New in version 0.1.0.
Changed in version 0.2.0: Added internal numpy interfaces for greater interoperability.
Changed in version 0.2.3: Added
x,y,z, andenergyattributes.Changed in version 0.2.11: Added
mass_tattribute.- Parameters:¶
- data : ndarray[float64] or sequence of length-4 tuples of floats
Data representing the four-momentum of each particle in the point cloud. Given as either a (n, 4)-dimensional numpy array, or structured array, with field names
('x', 'y', 'z', 'e').
Public members¶
- classmethod from_spherical_uniform(size: int, ...) MomentumArray[source]
Returns a
MomentumArraywhose elements are sampled from uniform distributions of energy and 3-momentum.
- property data : ndarray[Any, dtype[void]][source]
Structured array containing
('x', 'y', 'z', 'e')components of four momenta, \(p_\mu\).
- __iter__() Iterator[MomentumElement][source]
Iterator exposing contained data as Python native.
- copy() MomentumArray[source]
Copies the underlying data into a new MomentumArray instance.
- property pt : ndarray[Any, dtype[float64]][source]
Transverse component of particle momenta, \(p_T\).
- property eta : ndarray[Any, dtype[float64]][source]
Pseudorapidity component of particle momenta, \(\eta\).
- property rapidity : ndarray[Any, dtype[float64]][source]
Rapidity component of the particle momenta, \(y\).
- property phi : ndarray[Any, dtype[float64]][source]
Azimuth component of particle momenta, \(\phi\).
- property theta : ndarray[Any, dtype[float64]][source]
Spherical angle from the beam axis, \(\theta\).
- property mass_t : ndarray[Any, dtype[float64]][source]
Transverse component of particle mass, \(m_T\).
- shift_rapidity(shift) MomentumArray[source]
Performs a Lorentz boost to a new frame, with a rapidity increased by
shift.
- shift_eta(shift, ...) MomentumArray[source]
Performs a Lorentz boost to a new frame, with a pseudorapidity increased by
shift.
- shift_phi(shift) MomentumArray[source]
Performs an azimuthal rotation about the longitudinal axis, by adding an angle of
shiftto all elements.
- delta_R(other: MomentumArray, ...) ndarray[Any, dtype[float64]][source]
Calculates the Euclidean inter-particle distances, \(\Delta R_{ij}\), in the \(\eta-\phi\) plane between this set of particles and a provided
otherset. Produces amxnmatrix, wheremis number of particles in this MomentumArray, andnis the number of particles in other.
- serialize() tuple[MomentumElement, ...][source]
Provides a serialized version of the underlying data.
- __setattr__(name, val)[source]
Method generated by attrs for class MomentumArray.
- MomentumArray(...)[source]
Method generated by attrs for class MomentumArray.
- index(value, ...) integer -- return first index of value.[source]
Raises ValueError if the value is not present.
- classmethod __subclasshook__(C)[source]
Abstract classes can override this to customize issubclass().
-
MomentumArray =
<bound method GenericAlias of <class 'collections.abc.Iterable'>>[source]
Last update:
Jun 27, 2025