#include <particledata.h>
ParticleData contains the dynamic information of a certain particle.
Each particle has its momentum, position and other relevant physical data entry.
Definition at line 59 of file particledata.h.
Public Member Functions | |
| ParticleData (const ParticleType &particle_type, int unique_id=-1) | |
Create a new particle with the given particle_type and optionally a specific unique_id. More... | |
| int32_t | id () const |
| Get the id of the particle. More... | |
| void | set_id (int i) |
| Set id of the particle. More... | |
| PdgCode | pdgcode () const |
| Get the pdgcode of the particle. More... | |
| bool | is_hadron () const |
| bool | is_baryon () const |
| bool | is_nucleus () const |
| bool | is_rho () const |
| bool | is_proton () const |
| bool | is_neutron () const |
| bool | is_pion () const |
| bool | is_sigmastar () const |
| double | pole_mass () const |
| Get the particle's pole mass ("on-shell"). More... | |
| double | effective_mass () const |
| Get the particle's effective mass. More... | |
| const ParticleType & | type () const |
| Get the type of the particle. More... | |
| uint32_t | id_process () const |
| Get the id of the last action. More... | |
| HistoryData | get_history () const |
| Get history information. More... | |
| void | set_history (HistoryData &&history) |
| Set history_ from rvalue reference. More... | |
| void | set_history (int ncoll, uint32_t pid, ProcessType pt, double time_last_coll, const ParticleList &plist) |
| Store history information. More... | |
| const FourVector & | momentum () const |
| Get the particle's 4-momentum. More... | |
| void | set_4momentum (const FourVector &momentum_vector) |
| Set the particle's 4-momentum directly. More... | |
| void | set_4momentum (double mass, const ThreeVector &mom) |
| Set the momentum of the particle given its mass and momentum three-vector. More... | |
| void | set_4momentum (double mass, double px, double py, double pz) |
| Set the momentum of the particle. More... | |
| void | set_3momentum (const ThreeVector &mom) |
| Set the momentum of the particle without modifying the energy. More... | |
| const FourVector & | position () const |
| Get the particle's position in Minkowski space. More... | |
| void | set_4position (const FourVector &pos) |
| Set the particle's 4-position directly. More... | |
| void | set_3position (const ThreeVector &pos) |
| Set particle's 3-position. More... | |
| ParticleData | translated (const ThreeVector &delta) const |
| Translate the particle position. More... | |
| double | formation_time () const |
| Get the absolute formation time of the particle. More... | |
| double | begin_formation_time () const |
| Get the absolute time, where the cross section scaling factor slowly starts increasing from the given scaling factor to 1. More... | |
| void | set_formation_time (double form_time) |
| Set the absolute formation time. More... | |
| void | set_slow_formation_times (double begin_form_time, double form_time) |
| Set the time, when the cross section scaling factor begins, and finishes to increase from the given cross section scaling factor to 1. More... | |
| const double & | initial_xsec_scaling_factor () const |
| Get the initially assigned cross section scaling factor. More... | |
| void | set_cross_section_scaling_factor (const double &xsec_scal) |
| Set the particle's initial cross_section_scaling_factor. More... | |
| ThreeVector | velocity () const |
| Get the velocity 3-vector. More... | |
| double | inverse_gamma () const |
| Get the inverse of the gamma factor from the current velocity of the particle. More... | |
| void | boost (const ThreeVector &v) |
| Apply a full Lorentz boost of momentum and position. More... | |
| void | boost_momentum (const ThreeVector &v) |
| Apply a Lorentz-boost to only the momentum. More... | |
| int | spin () const |
| Get the (maximum positive) spin s of a particle in multiples of 1/2. More... | |
| const FourVector & | spin_vector () const |
| Get the mean spin 4-vector (Pauli–Lubanski vector) of the particle (const reference, no copy). More... | |
| FourVector & | spin_vector () |
| Get the mean spin 4-vector (Pauli–Lubanski vector) of the particle (non const reference). More... | |
| void | set_spin_vector (const FourVector &s) |
| Set the mean spin 4-vector (Pauli–Lubanski vector) of the particle. More... | |
| void | set_spin_vector_component (int index, double value) |
| Set a single component of the mean spin 4-vector (Pauli-Lubanski vector). More... | |
| void | set_unpolarized_spin_vector () |
| Set the 4 components of the spin vector such that the particle is unpolarized. More... | |
| void | set_belongs_to (BelongsTo label) |
| Setter for belongs_to label. More... | |
| BelongsTo | belongs_to () const |
| Getter for belongs_to label. More... | |
| void | fluidize () |
| Fluidize the particle. More... | |
| bool | is_core () const |
| Check whether the particle is core. More... | |
| double | hyperbolic_time () const |
| Particle \(tau\) (hyperbolic time) More... | |
| double | spatial_rapidity () const |
| Particle spacetime rapidity \(\eta_s\). More... | |
| double | transverse_mass () const |
| Particle \(m_T\). More... | |
| double | rapidity () const |
| Particle momentum rapidity \(y_\mathrm{rap}\). More... | |
| void | set_perturbative_weight (const double weight) |
| Set the perturbative weight. More... | |
| double | perturbative_weight () const |
| Get the perturbative weight. More... | |
| bool | operator== (const ParticleData &a) const |
| Check whether two particles have the same id. More... | |
| bool | operator< (const ParticleData &a) const |
| Check if this particle has a smaller id than another particle. More... | |
| bool | operator== (int id_a) const |
| Check if the particle has a given id. More... | |
| bool | operator< (int id_a) const |
| Check whether the particle's id is smaller than the given id. More... | |
| ParticleData (const ParticleType &ptype, int uid, int index) | |
| Construct a particle with the given type, id and index in Particles. More... | |
| double | xsec_scaling_factor (double delta_time=0.) const |
| Return the cross section scaling factor at a given time. More... | |
Static Public Attributes | |
| static double | formation_power_ = 0.0 |
| Power with which the cross section scaling factor grows in time. More... | |
Private Member Functions | |
| ParticleData ()=default | |
| Default constructor. More... | |
| void | copy_to (ParticleData &dst) const |
Copies some information of the particle to the given particle dst. More... | |
Private Attributes | |
| int32_t | id_ = -1 |
| Each particle has a unique identifier. More... | |
| unsigned | index_ = std::numeric_limits<unsigned>::max() |
| Internal index in the Particles list. More... | |
| ParticleTypePtr | type_ |
| A reference to the ParticleType object for this particle (this contains all the static information). More... | |
| bool | hole_ = false |
If true, the object is an entry in Particles::data_ and does not hold valid particle data. More... | |
| bool | core_ = false |
| If the particle is part of a pseudofluid. More... | |
| FourVector | momentum_ |
| momenta of the particle: x0, x1, x2, x3 as E, px, py, pz More... | |
| FourVector | position_ |
| position in space: x0, x1, x2, x3 as t, x, y, z More... | |
| FourVector | spin_vector_ |
| Pauli-Lubanski vector (mean spin 4-vector) of the particle. More... | |
| double | formation_time_ = smash_NaN<double> |
| Formation time at which the particle is fully formed given as an absolute value in the computational frame. More... | |
| double | begin_formation_time_ = smash_NaN<double> |
| time when the cross section scaling factor starts to increase to 1 More... | |
| double | initial_xsec_scaling_factor_ = 1.0 |
| Initial cross section scaling factor. More... | |
| double | perturbative_weight_ = 1.0 |
| Perturbative weight attributed to heavy flavor particles. More... | |
| HistoryData | history_ |
| history information More... | |
| BelongsTo | belongs_to_ = BelongsTo::Nothing |
| is it part of projectile or target nuclei? More... | |
Friends | |
| class | Particles |
|
inlineexplicit |
Create a new particle with the given particle_type and optionally a specific unique_id.
All other values are initialized to unphysical values.
| [in] | particle_type | Type of particle to be created |
| [in] | unique_id | id of particle to be created |
Definition at line 70 of file particledata.h.
|
inline |
Construct a particle with the given type, id and index in Particles.
This constructor may only be called (directly or indirectly) from Particles. This constructor should be private, but can't be in order to support vector::emplace_back.
| [in] | ptype | Type of the particle to be constructed |
| [in] | uid | id of the particle to be constructed |
| [in] | index | index of the particle to be constructed |
Definition at line 458 of file particledata.h.
|
privatedefault |
Default constructor.
|
inline |
|
inline |
Set id of the particle.
| [in] | i | id to be assigned to the particle |
Definition at line 82 of file particledata.h.
|
inline |
Get the pdgcode of the particle.
Definition at line 88 of file particledata.h.
|
inline |
|
inline |
Definition at line 95 of file particledata.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 113 of file particledata.h.
|
inline |
Get the particle's pole mass ("on-shell").
Definition at line 119 of file particledata.h.
| double smash::ParticleData::effective_mass | ( | ) | const |
Get the particle's effective mass.
Determined from the 4-momentum \(m=\sqrt{p_\mu p^\mu}\). Possibly "off-shell".
Definition at line 25 of file particledata.cc.
|
inline |
Get the type of the particle.
Definition at line 132 of file particledata.h.
|
inline |
Get the id of the last action.
Definition at line 138 of file particledata.h.
|
inline |
Get history information.
Definition at line 143 of file particledata.h.
|
inline |
Set history_ from rvalue reference.
Meant to be used only in special situations e.g. in the ListModus, where a temporary HistoryData is constructed from the user input.
| [in] | history | object to be moved from. |
Definition at line 151 of file particledata.h.
| void smash::ParticleData::set_history | ( | int | ncoll, |
| uint32_t | pid, | ||
| ProcessType | pt, | ||
| double | time_last_coll, | ||
| const ParticleList & | plist | ||
| ) |
Store history information.
The history contains the type of process and possibly the PdgCodes of the parent particles (plist). Note that history is not set for dileptons and photons.
| [in] | ncoll | particle's number of collisions |
| [in] | pid | id of the particle's latest process |
| [in] | pt | process type of the particle's latest process |
| [in] | time_last_coll | time of latest collision [fm] |
| [in] | plist | list of parent particles |
Definition at line 35 of file particledata.cc.
|
inline |
Get the particle's 4-momentum.
Definition at line 171 of file particledata.h.
|
inline |
Set the particle's 4-momentum directly.
| [in] | momentum_vector | 4-vector \(p^\mu = (E,\mathbf{p})^T\) |
Definition at line 177 of file particledata.h.
|
inline |
Set the momentum of the particle given its mass and momentum three-vector.
| [in] | mass | the mass of the particle (without E_kin contribution) [GeV] |
| [in] | mom | the three-momentum of the particle [GeV] |
Definition at line 187 of file particledata.h.
|
inline |
Set the momentum of the particle.
| [in] | mass | the mass of the particle (without E_kin contribution) [GeV] |
| [in] | px | x-component of the momentum [GeV] |
| [in] | py | y-component of the momentum [GeV] |
| [in] | pz | z-component of the momentum [GeV] |
Definition at line 199 of file particledata.h.
|
inline |
Set the momentum of the particle without modifying the energy.
WARNING: Mass gets modified.
| [in] | mom | momentum 3-vector [GeV] |
Definition at line 209 of file particledata.h.
|
inline |
Get the particle's position in Minkowski space.
Definition at line 217 of file particledata.h.
|
inline |
Set the particle's 4-position directly.
| [in] | pos | position 4-vector |
Definition at line 222 of file particledata.h.
|
inline |
Set particle's 3-position.
The time component is not changed
| [in] | pos | position 3-vector |
Definition at line 229 of file particledata.h.
|
inline |
Translate the particle position.
| [in] | delta | 3-vector by which the particle is translated [fm] |
Definition at line 237 of file particledata.h.
|
inline |
Get the absolute formation time of the particle.
Definition at line 249 of file particledata.h.
|
inline |
Get the absolute time, where the cross section scaling factor slowly starts increasing from the given scaling factor to 1.
Definition at line 255 of file particledata.h.
|
inline |
Set the absolute formation time.
The particle's cross section scaling factor will be a Heavyside fuction of time.
| [in] | form_time | absolute formation time |
Definition at line 264 of file particledata.h.
|
inline |
Set the time, when the cross section scaling factor begins, and finishes to increase from the given cross section scaling factor to 1.
The cross section will only grow slowly, if the option is used.
| [in] | begin_form_time | time when the cross section starts to increase |
| [in] | form_time | time when the cross section reaches 1 |
Definition at line 282 of file particledata.h.
|
inline |
Get the initially assigned cross section scaling factor.
Depending on the config, the cross section scaling factor might change with time, while this value will not be updated.
Definition at line 298 of file particledata.h.
|
inline |
Set the particle's initial cross_section_scaling_factor.
All cross sections of this particle are scaled down by this factor until the formation time is over.
If the particle formation power is set to be positive, this will only be the initial scaling factor, while the actual scaling factor grows with time.
| [in] | xsec_scal | cross section scaling factor |
Definition at line 313 of file particledata.h.
|
inline |
Get the velocity 3-vector.
Definition at line 321 of file particledata.h.
|
inline |
Get the inverse of the gamma factor from the current velocity of the particle.
\[\frac{1}{\gamma}=\sqrt{1-v^2}\]
This functions is more efficient than calculating the gamma factor from velocity, since the velocity function must execute three divisions (for every space component of the momentum vector).
Definition at line 335 of file particledata.h.
|
inline |
Apply a full Lorentz boost of momentum and position.
| [in] | v | boost 3-velocity |
Definition at line 343 of file particledata.h.
|
inline |
Apply a Lorentz-boost to only the momentum.
| [in] | v | boost 3-veloctity |
Definition at line 352 of file particledata.h.
|
inline |
Get the (maximum positive) spin s of a particle in multiples of 1/2.
E.g. for a spin-1 particle s=2.
Definition at line 360 of file particledata.h.
|
inline |
Get the mean spin 4-vector (Pauli–Lubanski vector) of the particle (const reference, no copy).
Definition at line 365 of file particledata.h.
|
inline |
Get the mean spin 4-vector (Pauli–Lubanski vector) of the particle (non const reference).
Definition at line 370 of file particledata.h.
|
inline |
Set the mean spin 4-vector (Pauli–Lubanski vector) of the particle.
| [in] | s | particle's mean spin 4-vector |
Definition at line 375 of file particledata.h.
|
inline |
Set a single component of the mean spin 4-vector (Pauli-Lubanski vector).
| [in] | index | component index (0-3) |
| [in] | value | component value |
Definition at line 381 of file particledata.h.
| void smash::ParticleData::set_unpolarized_spin_vector | ( | ) |
Set the 4 components of the spin vector such that the particle is unpolarized.
This function is used only to initialize the spin vector of particles at creation.
For finite-spin particles, we assign unpolarized spin vectors by sampling the spatial components from a normal distribution with mean 0 in the particle rest frame, ensuring ⟨S⟩ = 0 on average. The time component S⁰ is set to 0. The resulting spin vector is then Lorentz-boosted to the lab frame.
This initialization is not physical spin quantization, but a statistically unpolarized setup. The standard deviation is arbitrary and chosen small to avoid unphysical artifacts.
Definition at line 88 of file particledata.cc.
|
inline |
Setter for belongs_to label.
Definition at line 395 of file particledata.h.
|
inline |
|
inline |
Fluidize the particle.
Definition at line 400 of file particledata.h.
|
inline |
|
inline |
Particle \(tau\) (hyperbolic time)
Definition at line 404 of file particledata.h.
|
inline |
Particle spacetime rapidity \(\eta_s\).
Definition at line 406 of file particledata.h.
|
inline |
|
inline |
Particle momentum rapidity \(y_\mathrm{rap}\).
Definition at line 410 of file particledata.h.
|
inline |
Set the perturbative weight.
Definition at line 415 of file particledata.h.
|
inline |
|
inline |
Check whether two particles have the same id.
| [in] | a | particle to compare to |
Definition at line 428 of file particledata.h.
|
inline |
Check if this particle has a smaller id than another particle.
| [in] | a | particle to compare to |
Definition at line 434 of file particledata.h.
|
inline |
Check if the particle has a given id.
| [in] | id_a | id to compare to |
Definition at line 441 of file particledata.h.
|
inline |
Check whether the particle's id is smaller than the given id.
| [in] | id_a | number to compare particle's id to |
Definition at line 446 of file particledata.h.
| double smash::ParticleData::xsec_scaling_factor | ( | double | delta_time = 0. | ) | const |
Return the cross section scaling factor at a given time.
| [in] | delta_time | scaling factor at current time plus this time will be returned. |
Definition at line 125 of file particledata.cc.
|
inlineprivate |
Copies some information of the particle to the given particle dst.
Specifically it avoids to copy id_, index_, and type_.
| [in] | dst | particle values are copied to |
Definition at line 484 of file particledata.h.
|
friend |
Definition at line 474 of file particledata.h.
|
static |
Power with which the cross section scaling factor grows in time.
Definition at line 471 of file particledata.h.
|
private |
Each particle has a unique identifier.
This identifier is used for identifying the particle in the output files. It is specifically not used for searching for ParticleData objects in lists of particles, though it may be used to identify two ParticleData objects as referencing the same particle. This is why the comparison operators depend only on the id_ member.
Definition at line 505 of file particledata.h.
|
private |
Internal index in the Particles list.
This number is used to find the Experiment-wide original of this copy.
The value is read and written from the Particles class.
Definition at line 515 of file particledata.h.
|
private |
A reference to the ParticleType object for this particle (this contains all the static information).
Default-initialized with an invalid index.
Definition at line 521 of file particledata.h.
|
private |
If true, the object is an entry in Particles::data_ and does not hold valid particle data.
Specifically iterations over Particles must skip objects with hole_ == true. All other ParticleData instances should set this member to false.
Definition at line 535 of file particledata.h.
|
private |
If the particle is part of a pseudofluid.
Definition at line 540 of file particledata.h.
|
private |
momenta of the particle: x0, x1, x2, x3 as E, px, py, pz
Definition at line 543 of file particledata.h.
|
private |
position in space: x0, x1, x2, x3 as t, x, y, z
Definition at line 545 of file particledata.h.
|
private |
Pauli-Lubanski vector (mean spin 4-vector) of the particle.
Each component is initialized with NaN (double) to indicate that the spin vector has not been set.
Definition at line 551 of file particledata.h.
|
private |
Formation time at which the particle is fully formed given as an absolute value in the computational frame.
Definition at line 556 of file particledata.h.
|
private |
time when the cross section scaling factor starts to increase to 1
Definition at line 558 of file particledata.h.
|
private |
Initial cross section scaling factor.
1 by default, since a particle is fully formed in this case.
Definition at line 563 of file particledata.h.
|
private |
Perturbative weight attributed to heavy flavor particles.
Definition at line 565 of file particledata.h.
|
private |
history information
Definition at line 567 of file particledata.h.
|
private |
is it part of projectile or target nuclei?
Definition at line 569 of file particledata.h.