 |
Version: SMASH-2.0.2
|
|
#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 52 of file particledata.h.
|
| 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 |
|
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 (int ncoll, uint32_t pid, ProcessType pt, double time_of_or, 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 (const 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...
|
|
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...
|
|
|
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...
|
|
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...
|
|
double | formation_time_ = 0.0 |
| Formation time at which the particle is fully formed given as an absolute value in the computational frame. More...
|
|
double | begin_formation_time_ = 0.0 |
| 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...
|
|
HistoryData | history_ |
| history information More...
|
|
◆ ParticleData() [1/3]
smash::ParticleData::ParticleData |
( |
const ParticleType & |
particle_type, |
|
|
int |
unique_id = -1 |
|
) |
| |
|
inlineexplicit |
Create a new particle with the given particle_type
and optionally a specific unique_id
.
All other values are initialized to unphysical values.
- Parameters
-
[in] | particle_type | Type of particle to be created |
[in] | unique_id | id of particle to be created |
Definition at line 63 of file particledata.h.
64 :
id_(unique_id),
type_(&particle_type) {}
◆ ParticleData() [2/3]
smash::ParticleData::ParticleData |
( |
const ParticleType & |
ptype, |
|
|
int |
uid, |
|
|
int |
index |
|
) |
| |
|
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.
- Parameters
-
[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 365 of file particledata.h.
◆ ParticleData() [3/3]
smash::ParticleData::ParticleData |
( |
| ) |
|
|
privatedefault |
◆ id()
int32_t smash::ParticleData::id |
( |
| ) |
const |
|
inline |
Get the id of the particle.
- Returns
- particle id
Definition at line 70 of file particledata.h.
◆ set_id()
void smash::ParticleData::set_id |
( |
int |
i | ) |
|
|
inline |
Set id of the particle.
- Parameters
-
[in] | i | id to be assigned to the particle |
Definition at line 75 of file particledata.h.
◆ pdgcode()
PdgCode smash::ParticleData::pdgcode |
( |
| ) |
const |
|
inline |
Get the pdgcode of the particle.
- Returns
- pdgcode of the particle
Definition at line 81 of file particledata.h.
◆ is_hadron()
bool smash::ParticleData::is_hadron |
( |
| ) |
const |
|
inline |
- Returns
- true if this is a baryon, antibaryon or meson.
Definition at line 85 of file particledata.h.
◆ is_baryon()
bool smash::ParticleData::is_baryon |
( |
| ) |
const |
|
inline |
- Returns
- whether this PDG code identifies a baryon.
Definition at line 88 of file particledata.h.
◆ is_nucleus()
bool smash::ParticleData::is_nucleus |
( |
| ) |
const |
|
inline |
- Returns
- true if this is a nucleus, false otherwise
Definition at line 91 of file particledata.h.
◆ is_rho()
bool smash::ParticleData::is_rho |
( |
| ) |
const |
|
inline |
- Returns
- whether this is a rho meson (rho+/rho0/rho-)
Definition at line 94 of file particledata.h.
◆ is_proton()
bool smash::ParticleData::is_proton |
( |
| ) |
const |
|
inline |
- Returns
- whether this is a proton/anti-proton
Definition at line 97 of file particledata.h.
◆ is_neutron()
bool smash::ParticleData::is_neutron |
( |
| ) |
const |
|
inline |
- Returns
- whether this is a neutron/anti-neutron
Definition at line 100 of file particledata.h.
◆ is_pion()
bool smash::ParticleData::is_pion |
( |
| ) |
const |
|
inline |
- Returns
- whether this is a pion (pi+/pi0/pi-)
Definition at line 103 of file particledata.h.
◆ pole_mass()
double smash::ParticleData::pole_mass |
( |
| ) |
const |
|
inline |
Get the particle's pole mass ("on-shell").
- Returns
- pole mass of the particle [GeV]
Definition at line 109 of file particledata.h.
◆ effective_mass()
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".
- Returns
- Effective mass [GeV]
Definition at line 21 of file particledata.cc.
◆ type()
◆ id_process()
uint32_t smash::ParticleData::id_process |
( |
| ) |
const |
|
inline |
Get the id of the last action.
- Returns
- id of particle's latest collision
Definition at line 128 of file particledata.h.
◆ get_history()
Get history information.
- Returns
- particle history struct
Definition at line 133 of file particledata.h.
◆ set_history()
void smash::ParticleData::set_history |
( |
int |
ncoll, |
|
|
uint32_t |
pid, |
|
|
ProcessType |
pt, |
|
|
double |
time_of_or, |
|
|
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.
- Parameters
-
[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_of_or | time of latest collision [fm] |
[in] | plist | list of parent particles |
Definition at line 31 of file particledata.cc.
◆ momentum()
const FourVector& smash::ParticleData::momentum |
( |
| ) |
const |
|
inline |
Get the particle's 4-momentum.
- Returns
- particle's 4-momentum [GeV]
Definition at line 152 of file particledata.h.
◆ set_4momentum() [1/3]
void smash::ParticleData::set_4momentum |
( |
const FourVector & |
momentum_vector | ) |
|
|
inline |
Set the particle's 4-momentum directly.
- Parameters
-
[in] | momentum_vector | 4-vector \(p^\mu = (E,\vec{p})^T\) |
Definition at line 158 of file particledata.h.
◆ set_4momentum() [2/3]
void smash::ParticleData::set_4momentum |
( |
double |
mass, |
|
|
const ThreeVector & |
mom |
|
) |
| |
|
inline |
Set the momentum of the particle given its mass and momentum three-vector.
- Parameters
-
[in] | mass | the mass of the particle (without E_kin contribution) [GeV] |
[in] | mom | the three-momentum of the particle [GeV] |
Definition at line 168 of file particledata.h.
169 momentum_ = FourVector(std::sqrt(mass * mass + mom * mom), mom);
◆ set_4momentum() [3/3]
void smash::ParticleData::set_4momentum |
( |
double |
mass, |
|
|
double |
px, |
|
|
double |
py, |
|
|
double |
pz |
|
) |
| |
|
inline |
Set the momentum of the particle.
- Parameters
-
[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 180 of file particledata.h.
181 momentum_ = FourVector(std::sqrt(mass * mass + px * px + py * py + pz * pz),
◆ set_3momentum()
void smash::ParticleData::set_3momentum |
( |
const ThreeVector & |
mom | ) |
|
|
inline |
Set the momentum of the particle without modifying the energy.
WARNING: Mass gets modified.
- Parameters
-
[in] | mom | momentum 3-vector [GeV] |
Definition at line 190 of file particledata.h.
◆ position()
const FourVector& smash::ParticleData::position |
( |
| ) |
const |
|
inline |
Get the particle's position in Minkowski space.
- Returns
- particle's position 4-vector
Definition at line 198 of file particledata.h.
◆ set_4position()
void smash::ParticleData::set_4position |
( |
const FourVector & |
pos | ) |
|
|
inline |
Set the particle's 4-position directly.
- Parameters
-
Definition at line 203 of file particledata.h.
◆ set_3position()
void smash::ParticleData::set_3position |
( |
const ThreeVector & |
pos | ) |
|
|
inline |
Set particle's 3-position.
The time component is not changed
- Parameters
-
Definition at line 210 of file particledata.h.
◆ translated()
Translate the particle position.
- Parameters
-
[in] | delta | 3-vector by which the particle is translated [fm] |
Definition at line 218 of file particledata.h.
220 p.position_[1] += delta[0];
221 p.position_[2] += delta[1];
222 p.position_[3] += delta[2];
◆ formation_time()
double smash::ParticleData::formation_time |
( |
| ) |
const |
|
inline |
Get the absolute formation time of the particle.
- Returns
- particle's formation time
Definition at line 230 of file particledata.h.
◆ begin_formation_time()
double smash::ParticleData::begin_formation_time |
( |
| ) |
const |
|
inline |
Get the absolute time, where the cross section scaling factor slowly starts increasing from the given scaling factor to 1.
- Returns
- time, when scaling factor starts increasing
Definition at line 236 of file particledata.h.
◆ set_formation_time()
void smash::ParticleData::set_formation_time |
( |
const double & |
form_time | ) |
|
|
inline |
Set the absolute formation time.
The particle's cross section scaling factor will be a Heavyside fuction of time.
- Parameters
-
[in] | form_time | absolute formation time |
Definition at line 245 of file particledata.h.
◆ set_slow_formation_times()
void smash::ParticleData::set_slow_formation_times |
( |
double |
begin_form_time, |
|
|
double |
form_time |
|
) |
| |
|
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.
- Parameters
-
[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 259 of file particledata.h.
◆ initial_xsec_scaling_factor()
const double& smash::ParticleData::initial_xsec_scaling_factor |
( |
| ) |
const |
|
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.
- Returns
- particle's initially assigned cross section scaling factor
Definition at line 272 of file particledata.h.
◆ set_cross_section_scaling_factor()
void smash::ParticleData::set_cross_section_scaling_factor |
( |
const double & |
xsec_scal | ) |
|
|
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.
- Parameters
-
[in] | xsec_scal | cross section scaling factor |
Definition at line 287 of file particledata.h.
◆ velocity()
Get the velocity 3-vector.
- Returns
- 3-velocity of the particle
Definition at line 295 of file particledata.h.
◆ inverse_gamma()
double smash::ParticleData::inverse_gamma |
( |
| ) |
const |
|
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).
- Returns
- inverse gamma factor
Definition at line 309 of file particledata.h.
◆ boost()
void smash::ParticleData::boost |
( |
const ThreeVector & |
v | ) |
|
|
inline |
Apply a full Lorentz boost of momentum and position.
- Parameters
-
Definition at line 317 of file particledata.h.
◆ boost_momentum()
void smash::ParticleData::boost_momentum |
( |
const ThreeVector & |
v | ) |
|
|
inline |
Apply a Lorentz-boost to only the momentum.
- Parameters
-
Definition at line 326 of file particledata.h.
◆ operator==() [1/2]
bool smash::ParticleData::operator== |
( |
const ParticleData & |
a | ) |
const |
|
inline |
Check whether two particles have the same id.
- Parameters
-
[in] | a | particle to compare to |
- Returns
- whether the particles have the same id
Definition at line 335 of file particledata.h.
335 {
return this->
id_ == a.id_; }
◆ operator<() [1/2]
bool smash::ParticleData::operator< |
( |
const ParticleData & |
a | ) |
const |
|
inline |
Check if this particle has a smaller id than another particle.
- Parameters
-
[in] | a | particle to compare to |
- Returns
- whether this particle has a smaller id than other particle
Definition at line 341 of file particledata.h.
341 {
return this->
id_ < a.id_; }
◆ operator==() [2/2]
bool smash::ParticleData::operator== |
( |
int |
id_a | ) |
const |
|
inline |
Check if the particle has a given id.
- Parameters
-
- Returns
- whether the particle has the given id
Definition at line 348 of file particledata.h.
348 {
return this->
id_ == id_a; }
◆ operator<() [2/2]
bool smash::ParticleData::operator< |
( |
int |
id_a | ) |
const |
|
inline |
Check whether the particle's id is smaller than the given id.
- Parameters
-
[in] | id_a | number to compare particle's id to |
Definition at line 353 of file particledata.h.
353 {
return this->
id_ < id_a; }
◆ xsec_scaling_factor()
double smash::ParticleData::xsec_scaling_factor |
( |
double |
delta_time = 0. | ) |
const |
Return the cross section scaling factor at a given time.
- Parameters
-
[in] | delta_time | scaling factor at current time plus this time will be returned. |
- Returns
- the cross section scaling factor at a specified time.
Definition at line 78 of file particledata.cc.
79 double time_of_interest =
position_.
x0() + delta_time;
81 double scaling_factor;
111 return scaling_factor;
◆ copy_to()
void smash::ParticleData::copy_to |
( |
ParticleData & |
dst | ) |
const |
|
inlineprivate |
Copies some information of the particle to the given particle dst
.
Specifically it avoids to copy id_, index_, and type_.
- Parameters
-
[in] | dst | particle values are copied to |
Definition at line 391 of file particledata.h.
◆ Particles
◆ formation_power_
double smash::ParticleData::formation_power_ = 0.0 |
|
static |
Power with which the cross section scaling factor grows in time.
Definition at line 378 of file particledata.h.
◆ id_
int32_t smash::ParticleData::id_ = -1 |
|
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 408 of file particledata.h.
◆ index_
unsigned smash::ParticleData::index_ = std::numeric_limits<unsigned>::max() |
|
private |
◆ type_
A reference to the ParticleType object for this particle (this contains all the static information).
Default-initialized with an invalid index.
Definition at line 424 of file particledata.h.
◆ hole_
bool smash::ParticleData::hole_ = false |
|
private |
◆ momentum_
momenta of the particle: x0, x1, x2, x3 as E, px, py, pz
Definition at line 441 of file particledata.h.
◆ position_
position in space: x0, x1, x2, x3 as t, x, y, z
Definition at line 443 of file particledata.h.
◆ formation_time_
double smash::ParticleData::formation_time_ = 0.0 |
|
private |
Formation time at which the particle is fully formed given as an absolute value in the computational frame.
Definition at line 447 of file particledata.h.
◆ begin_formation_time_
double smash::ParticleData::begin_formation_time_ = 0.0 |
|
private |
time when the cross section scaling factor starts to increase to 1
Definition at line 449 of file particledata.h.
◆ initial_xsec_scaling_factor_
double smash::ParticleData::initial_xsec_scaling_factor_ = 1.0 |
|
private |
Initial cross section scaling factor.
1 by default, since a particle is fully formed in this case.
Definition at line 454 of file particledata.h.
◆ history_
The documentation for this class was generated from the following files:
int32_t id_
Each particle has a unique identifier.
@ StringHard
hard string process involving 2->2 QCD process by PYTHIA.
const FourVector & momentum() const
Get the particle's 4-momentum.
PdgCode p1
PdgCode of the first parent particles.
HistoryData history_
history information
int32_t collisions_per_particle
Collision counter per particle, zero only for initially present particles.
double pole_mass() const
Get the particle's pole mass ("on-shell").
ParticleTypePtr type_
A reference to the ParticleType object for this particle (this contains all the static information).
@ MultiParticleThreeToTwo
@ StringSoftDoubleDiffractive
double diffractive. Two strings are formed, one from A and one from B.
ParticleData()=default
Default constructor.
@ StringSoftNonDiffractive
non-diffractive. Two strings are formed both have ends in A and B.
double formation_time_
Formation time at which the particle is fully formed given as an absolute value in the computational ...
PdgCode pdgcode() const
Get the pdgcode of the particle.
@ TwoToTwo
2->2 inelastic scattering
ProcessType process_type
type of the last action
@ StringSoftSingleDiffractiveXB
single diffractive AB->XB.
void set_4momentum(const FourVector &momentum_vector)
Set the particle's 4-momentum directly.
double time_last_collision
Time of the last action (excluding walls), time of kinetic freeze_out for HBT analysis this time shou...
constexpr double really_small
Numerical error tolerance.
@ Thermalization
forced thermalization, many particles are replaced by a thermalized ensemble
@ MultiParticleThreeMesonsToOne
multi particle scattering
double initial_xsec_scaling_factor_
Initial cross section scaling factor.
@ FailedString
Soft String NNbar annihilation process can fail by lack of energy.
FourVector position_
position in space: x0, x1, x2, x3 as t, x, y, z
double begin_formation_time_
time when the cross section scaling factor starts to increase to 1
FourVector momentum_
momenta of the particle: x0, x1, x2, x3 as E, px, py, pz
static double formation_power_
Power with which the cross section scaling factor grows in time.
int32_t id_process
id of the last action
@ Bremsstrahlung
bremsstrahlung process: a + b -> a + b + photon
PdgCode p2
PdgCode of the second parent particles.
ThreeVector velocity() const
Get the velocity (3-vector divided by zero component).
double abs() const
calculate the lorentz invariant absolute value
@ StringSoftSingleDiffractiveAX
(41-45) soft string excitations.
@ StringSoftAnnihilation
a special case of baryon-antibaryon annihilation.
@ Elastic
elastic scattering: particles remain the same, only momenta change
void set_4position(const FourVector &pos)
Set the particle's 4-position directly.
@ HyperSurfaceCrossing
Hypersurface crossing Particles are removed from the evolution and printed to a separate output to se...
FourVector lorentz_boost(const ThreeVector &v) const
Returns the FourVector boosted with velocity v.
@ TwoToOne
resonance formation (2->1)
double sqr3() const
calculate the square of the spatial three-vector
unsigned index_
Internal index in the Particles list.
@ TwoToThree
2->3 scattering