7 #ifndef SRC_INCLUDE_PARTICLEDATA_H_ 8 #define SRC_INCLUDE_PARTICLEDATA_H_ 64 : id_(unique_id), type_(&particle_type) {}
70 int32_t
id()
const {
return id_; }
85 bool is_hadron()
const {
return type_->is_hadron(); }
88 bool is_baryon()
const {
return pdgcode().is_baryon(); }
91 bool is_rho()
const {
return type_->is_rho(); }
104 double effective_mass()
const;
132 void set_history(
int ncoll, uint32_t pid,
ProcessType pt,
double time_of_or,
133 const ParticleList &plist);
146 momentum_ = momentum_vector;
156 momentum_ =
FourVector(std::sqrt(mass * mass + mom * mom), mom);
168 momentum_ =
FourVector(std::sqrt(mass * mass + px * px + py * py + pz * pz),
233 formation_time_ = form_time;
235 begin_formation_time_ = form_time;
247 begin_formation_time_ = begin_form_time;
248 formation_time_ = form_time;
260 return initial_xsec_scaling_factor_;
275 initial_xsec_scaling_factor_ = xsec_scal;
297 return std::sqrt(1. - momentum_.sqr3() / (momentum_.x0() * momentum_.x0()));
305 set_4momentum(momentum_.LorentzBoost(v));
306 set_4position(position_.LorentzBoost(v));
314 set_4momentum(momentum_.LorentzBoost(v));
335 bool operator==(
int id_a)
const {
return this->id_ == id_a; }
340 bool operator<(
int id_a)
const {
return this->id_ < id_a; }
353 : id_(uid), index_(index), type_(&ptype) {}
362 double xsec_scaling_factor(
double delta_time = 0.)
const;
405 unsigned index_ = std::numeric_limits<unsigned>::max();
416 static_assert(
sizeof(
bool) <= 2,
"");
434 double formation_time_ = 0.0;
436 double begin_formation_time_ = 0.0;
441 double initial_xsec_scaling_factor_ = 1.0;
457 std::ostream &
operator<<(std::ostream &out,
const ParticleList &particle_list);
488 #endif // SRC_INCLUDE_PARTICLEDATA_H_
double formation_time() const
Get the absolute formation time of the particle.
uint32_t id_process() const
Get the id of the last action.
PdgCode pdgcode() const
Get the pdgcode of the particle.
ParticleData translated(const ThreeVector &delta) const
Translate the particle position.
double begin_formation_time_
time when the cross section scaling factor starts to increase to 1
double inverse_gamma() const
Get the inverse of the gamma factor from the current velocity of the particle.
The ThreeVector class represents a physical three-vector with the components .
const ParticleList & list
Particle list.
ParticleData(const ParticleType &ptype, int uid, int index)
Construct a particle with the given type, id and index in Particles.
const FourVector & position() const
Get the particle's position in Minkowski space.
ProcessType
Process Types are used to identify the type of the process.
void set_4momentum(double mass, const ThreeVector &mom)
Set the momentum of the particle given its mass and momentum three-vector.
void set_id(int i)
Set id of the particle.
void copy_to(ParticleData &dst) const
Copies some information of the particle to the given particle dst.
void set_3momentum(const ThreeVector &mom)
Set the momentum of the particle without modifying the energy.
PdgCode p2
PdgCode of the second parent particles.
bool operator==(int id_a) const
Check if the particle has a given id.
PrintParticleListDetailed detailed(const ParticleList &list)
Request the ParticleList to be printed in full detail (i.e.
FourVector momentum_
momenta of the particle: x0, x1, x2, x3 as E, px, py, pz
ThreeVector velocity() const
Get the velocity 3-vector.
void boost(const ThreeVector &v)
Apply a full Lorentz boost of momentum and position.
HistoryData history_
history information
void set_formation_time(const double &form_time)
Set the absolute formation time.
PdgCode p1
PdgCode of the first parent particles.
A structure to hold information about the history of the particle, e.g.
ParticleTypePtr type_
A reference to the ParticleType object for this particle (this contains all the static information)...
FourVector position_
position in space: x0, x1, x2, x3 as t, x, y, z
int32_t id_process
id of the last action
double formation_time_
Formation time at which the particle is fully formed given as an absolute value in the computational ...
HistoryData get_history() const
Get history information.
double time_last_collision
Time of the last action (excluding walls), time of kinetic freeze_out for HBT analysis this time shou...
double initial_xsec_scaling_factor_
Initial cross section scaling factor.
Particle type contains the static properties of a particle species.
void set_4momentum(const FourVector &momentum_vector)
Set the particle's 4-momentum directly.
bool operator<(int id_a) const
Check whether the particle's id is smaller than the given id.
void set_4momentum(double mass, double px, double py, double pz)
Set the momentum of the particle.
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
static double formation_power_
Power with which the cross section scaling factor grows in time.
int32_t id_
Each particle has a unique identifier.
ProcessType process_type
type of the last action
const ParticleType & type() const
Get the type of the particle.
ParticleData(const ParticleType &particle_type, int unique_id=-1)
Create a new particle with the given particle_type and optionally a specific unique_id.
void set_3position(const ThreeVector &pos)
Set particle's 3-position.
double pole_mass() const
Get the particle's pole mass ("on-shell").
double begin_formation_time() const
Get the absolute time, where the cross section scaling factor slowly starts increasing from the given...
const double & initial_xsec_scaling_factor() const
Get the initially assigned cross section scaling factor.
void set_4position(const FourVector &pos)
Set the particle's 4-position directly.
A pointer-like interface to global references to ParticleType objects.
bool operator==(const ParticleData &a) const
Check whether two particles have the same id.
The Particles class abstracts the storage and manipulation of particles.
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
Convenience: dereferences the ActionPtr to Action.
int32_t id() const
Get the id of the particle.
void set_cross_section_scaling_factor(const double &xsec_scal)
Set the particle's initial cross_section_scaling_factor.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
ParticleData contains the dynamic information of a certain particle.
void boost_momentum(const ThreeVector &v)
Apply a Lorentz-boost to only the momentum.
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...
int32_t collisions_per_particle
Collision counter per particle, zero only for initially present particles.
const FourVector & momentum() const
Get the particle's 4-momentum.
bool operator<(const ParticleData &a) const
Check if this particle has a smaller id than another particle.