#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.
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_rho () 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... | |
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... | |
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... | |
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 63 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 352 of file particledata.h.
|
privatedefault |
Default constructor.
|
inline |
Get the id of the particle.
Definition at line 70 of file particledata.h.
|
inline |
Set id of the particle.
[in] | i | id to be assigned to the particle |
Definition at line 75 of file particledata.h.
|
inline |
Get the pdgcode of the particle.
Definition at line 81 of file particledata.h.
|
inline |
Definition at line 85 of file particledata.h.
|
inline |
Definition at line 88 of file particledata.h.
|
inline |
Definition at line 91 of file particledata.h.
|
inline |
Get the particle's pole mass ("on-shell").
Definition at line 96 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 21 of file particledata.cc.
|
inline |
Get the type of the particle.
Definition at line 109 of file particledata.h.
|
inline |
Get the id of the last action.
Definition at line 115 of file particledata.h.
|
inline |
Get history information.
Definition at line 120 of file particledata.h.
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.
[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.
|
inline |
Get the particle's 4-momentum.
Definition at line 139 of file particledata.h.
|
inline |
Set the particle's 4-momentum directly.
[in] | momentum_vector | 4-vector \(p^\mu = (E,\vec{p})^T\) |
Definition at line 145 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 155 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 167 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 177 of file particledata.h.
|
inline |
Get the particle's position in Minkowski space.
Definition at line 185 of file particledata.h.
|
inline |
Set the particle's 4-position directly.
[in] | pos | position 4-vector |
Definition at line 190 of file particledata.h.
|
inline |
Set particle's 3-position.
The time component is not changed
[in] | pos | position 3-vector |
Definition at line 197 of file particledata.h.
|
inline |
Translate the particle position.
[in] | delta | 3-vector by which the particle is translated [fm] |
Definition at line 205 of file particledata.h.
|
inline |
Get the absolute formation time of the particle.
Definition at line 217 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 223 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 232 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 246 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 259 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 274 of file particledata.h.
|
inline |
Get the velocity 3-vector.
Definition at line 282 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 296 of file particledata.h.
|
inline |
Apply a full Lorentz boost of momentum and position.
[in] | v | boost 3-velocity |
Definition at line 304 of file particledata.h.
|
inline |
Apply a Lorentz-boost to only the momentum.
[in] | v | boost 3-veloctity |
Definition at line 313 of file particledata.h.
|
inline |
Check whether two particles have the same id.
[in] | a | particle to compare to |
Definition at line 322 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 328 of file particledata.h.
|
inline |
Check if the particle has a given id.
[in] | id_a | id to compare to |
Definition at line 335 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 340 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 71 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 378 of file particledata.h.
|
friend |
Definition at line 368 of file particledata.h.
|
static |
Power with which the cross section scaling factor grows in time.
Definition at line 365 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 395 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 405 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 411 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 425 of file particledata.h.
|
private |
momenta of the particle: x0, x1, x2, x3 as E, px, py, pz
Definition at line 428 of file particledata.h.
|
private |
position in space: x0, x1, x2, x3 as t, x, y, z
Definition at line 430 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 434 of file particledata.h.
|
private |
time when the cross section scaling factor starts to increase to 1
Definition at line 436 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 441 of file particledata.h.
|
private |
history information
Definition at line 443 of file particledata.h.