ParticleTemplate (Python)
The ParticleTemplate Cython class is the Python-side wrapper around the C++
particle_template. User particle classes must subclass it and override
Type to set the ROOT branch prefix.
Constructor
ParticleTemplate(inpt=None) — default-constructs the underlying C++ object.
Pass a serialised dict (from __reduce__) to restore a saved state.
Operators / Special Methods
Signature |
Description |
|---|---|
|
Return a new particle whose four-momentum is the sum of |
|
Add |
|
Equality based on the C++ |
|
Integer hash derived from the first 8 hex digits of |
|
Return |
|
Return a new default-constructed instance of the same concrete subclass
with the same |
|
Compute angular separation \(\Delta R = \sqrt{(\Delta\eta)^2 + (\Delta\phi)^2}\). |
|
Pickle serialise / restore the particle to/from |
Kinematic Properties (read/write)
Property |
Type |
Description |
|---|---|---|
|
|
Cartesian x-momentum in MeV. |
|
|
Cartesian y-momentum in MeV. |
|
|
Cartesian z-momentum in MeV. |
|
|
Energy in MeV. |
|
|
Transverse momentum. |
|
|
Pseudorapidity. |
|
|
Azimuthal angle in radians. |
|
|
Invariant mass in MeV (computed on demand, |
|
|
Electric charge. |
|
|
PDG particle ID code. |
|
|
Particle symbol string (e.g. |
|
|
ROOT branch type prefix. Must be set by each concrete subclass.
Used by |
|
|
Sequential particle index within the event (read from |
Flag Properties (read/write)
Property |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PDG IDs that define “lepton” for the |
|
|
PDG IDs that define “neutrino” for the |
Topology Properties
Property |
Type |
Description |
|---|---|---|
|
|
List of child particles registered via |
|
|
List of parent particles registered via |
|
|
18-character unique hex identifier ( |
Leaf Registration Methods (inherited usage)
These C++ methods are called from the subclass build override via self.ptr:
Method |
Description |
|---|---|
|
Map a property name key to a ROOT branch suffix leaf. Call
|
|
Prepend |