7 #ifndef SRC_INCLUDE_SMASH_PARTICLEDATA_H_
8 #define SRC_INCLUDE_SMASH_PARTICLEDATA_H_
70 :
id_(unique_id),
type_(&particle_type) {}
76 int32_t
id()
const {
return id_; }
152 const ParticleList &plist);
226 p.position_[1] += delta[0];
227 p.position_[2] += delta[1];
228 p.position_[3] += delta[2];
430 unsigned index_ = std::numeric_limits<unsigned>::max();
441 static_assert(
sizeof(
bool) <= 2,
"");
484 std::ostream &
operator<<(std::ostream &out,
const ParticleList &particle_list);
511 const PrintParticleListDetailed &particle_list);
543 PdgCode pdgcode,
double mass,
const FourVector &four_position,
544 const FourVector &four_momentum,
int log_area,
bool &mass_warning,
545 bool &on_shell_warning);
562 const ParticleData &p2,
double time);
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
FourVector lorentz_boost(const ThreeVector &v) const
Returns the FourVector boosted with velocity v.
double sqr3() const
calculate the square of the spatial three-vector
ThreeVector velocity() const
Get the velocity (3-vector divided by zero component).
ParticleData contains the dynamic information of a certain particle.
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.
unsigned index_
Internal index in the Particles list.
void set_4momentum(const FourVector &momentum_vector)
Set the particle's 4-momentum directly.
const ParticleType & type() const
Get the type of the particle.
BelongsTo belongs_to_
is it part of projectile or target nuclei?
void set_3position(const ThreeVector &pos)
Set particle's 3-position.
double inverse_gamma() const
Get the inverse of the gamma factor from the current velocity of the particle.
ParticleData translated(const ThreeVector &delta) const
Translate the particle position.
int32_t id_
Each particle has a unique identifier.
double begin_formation_time_
time when the cross section scaling factor starts to increase to 1
void set_4position(const FourVector &pos)
Set the particle's 4-position directly.
double xsec_scaling_factor(double delta_time=0.) const
Return the cross section scaling factor at a given time.
bool operator<(int id_a) const
Check whether the particle's id is smaller than the given id.
void set_history(int ncoll, uint32_t pid, ProcessType pt, double time_of_or, const ParticleList &plist)
Store history information.
static double formation_power_
Power with which the cross section scaling factor grows in time.
bool hole_
If true, the object is an entry in Particles::data_ and does not hold valid particle data.
uint32_t id_process() const
Get the id of the last action.
ParticleData(const ParticleType &particle_type, int unique_id=-1)
Create a new particle with the given particle_type and optionally a specific unique_id.
double begin_formation_time() const
Get the absolute time, where the cross section scaling factor slowly starts increasing from the given...
void set_id(int i)
Set id of the particle.
const FourVector & momentum() const
Get the particle's 4-momentum.
BelongsTo belongs_to() const
Getter for belongs_to label.
void copy_to(ParticleData &dst) const
Copies some information of the particle to the given particle dst.
bool operator==(int id_a) const
Check if the particle has a given id.
FourVector momentum_
momenta of the particle: x0, x1, x2, x3 as E, px, py, pz
double formation_time() const
Get the absolute formation time of the particle.
ThreeVector velocity() const
Get the velocity 3-vector.
double initial_xsec_scaling_factor_
Initial cross section scaling factor.
bool operator<(const ParticleData &a) const
Check if this particle has a smaller id than another particle.
double effective_mass() const
Get the particle's effective mass.
int32_t id() const
Get the id of the particle.
ParticleData()=default
Default constructor.
HistoryData get_history() const
Get history information.
const double & initial_xsec_scaling_factor() const
Get the initially assigned cross section scaling factor.
void set_4momentum(double mass, double px, double py, double pz)
Set the momentum of the particle.
void set_cross_section_scaling_factor(const double &xsec_scal)
Set the particle's initial cross_section_scaling_factor.
FourVector position_
position in space: x0, x1, x2, x3 as t, x, y, z
double pole_mass() const
Get the particle's pole mass ("on-shell").
bool operator==(const ParticleData &a) const
Check whether two particles have the same id.
ParticleTypePtr type_
A reference to the ParticleType object for this particle (this contains all the static information).
void set_3momentum(const ThreeVector &mom)
Set the momentum of the particle without modifying the energy.
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 c...
void set_formation_time(const double &form_time)
Set the absolute formation time.
void boost_momentum(const ThreeVector &v)
Apply a Lorentz-boost to only the momentum.
ParticleData(const ParticleType &ptype, int uid, int index)
Construct a particle with the given type, id and index in Particles.
void set_belongs_to(BelongsTo label)
Setter for belongs_to label.
HistoryData history_
history information
void boost(const ThreeVector &v)
Apply a full Lorentz boost of momentum and position.
const FourVector & position() const
Get the particle's position in Minkowski space.
void set_4momentum(double mass, const ThreeVector &mom)
Set the momentum of the particle given its mass and momentum three-vector.
A pointer-like interface to global references to ParticleType objects.
Particle type contains the static properties of a particle species.
The Particles class abstracts the storage and manipulation of particles.
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
The ThreeVector class represents a physical three-vector with the components .
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
Convenience: dereferences the ActionPtr to Action.
PrintParticleListDetailed detailed(const ParticleList &list)
Request the ParticleList to be printed in full detail (i.e.
ProcessType
ProcessTypes are used to identify the type of the process.
@ None
See here for a short description.
bool are_particles_identical_at_given_time(const ParticleData &p1, const ParticleData &p2, double time)
Utility function to compare two ParticleData instances with respect to their PDG code,...
ParticleData create_valid_smash_particle_matching_provided_quantities(PdgCode pdgcode, double mass, const FourVector &four_position, const FourVector &four_momentum, int log_area, bool &mass_warning, bool &on_shell_warning)
This function creates a SMASH particle validating the provided information.
A structure to hold information about the history of the particle, e.g.
double time_last_collision
Time of the last action (excluding walls), time of kinetic freeze_out for HBT analysis this time shou...
int32_t id_process
id of the last action
PdgCode p2
PdgCode of the second parent particles.
PdgCode p1
PdgCode of the first parent particles.
int32_t collisions_per_particle
Collision counter per particle, zero only for initially present particles.
ProcessType process_type
type of the last action
const ParticleList & list
Particle list.