7 #ifndef SRC_INCLUDE_SMASH_PARTICLETYPE_H_
8 #define SRC_INCLUDE_SMASH_PARTICLETYPE_H_
55 throw std::runtime_error(
"unreachable");
182 return (I == 0) ? 0 :
static_cast<double>(
isospin3()) / I;
339 const ParticleTypePtrList dlist)
const;
411 const double cms_energy,
int L = 0)
const;
424 const double cms_energy,
442 static const ParticleTypeList &
list_all();
502 using std::runtime_error::runtime_error;
614 using std::runtime_error::runtime_error;
685 return std::addressof(
lookup());
717 operator bool()
const {
return index_ != 0xffff; }
DecayBranch is a derivative of ProcessBranch, which is used to represent decay channels.
The DecayModes class is used to store and update information about decay branches (i....
DecayType is the abstract base class for all decay types.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
IsoParticleType is a class to represent isospin multiplets.
ParticleData contains the dynamic information of a certain particle.
A pointer-like interface to global references to ParticleType objects.
bool operator==(const ParticleTypePtr &rhs) const
const ParticleType & operator*() const
bool operator<(const ParticleTypePtr &rhs) const
"Less than" operator
ParticleTypePtr()=default
Default construction initializes with an invalid index.
bool operator!=(const ParticleTypePtr &rhs) const
const ParticleType & lookup() const
Helper function that does the ParticleType lookup from the stored index.
std::uint16_t index_
Stores the index of the references ParticleType object in the global vector.
const ParticleType * operator->() const
ParticleTypePtr(std::uint16_t i)
Constructs a pointer to the ParticleType object at offset i.
Particle type contains the static properties of a particle species.
double min_mass_spectral_
minimum mass, where the spectral function is non-zero Mutable, because it is initialized at first cal...
double min_mass_spectral() const
The minimum mass of the resonance, where the spectral function is non-zero.
IsoParticleType * iso_multiplet_
Container for the isospin multiplet information.
int I3_
Isospin projection of the particle; filled automatically from pdgcode_.
const DecayModes & decay_modes() const
double spectral_function(double m) const
Full spectral function of the resonance (relativistic Breit-Wigner distribution with mass-dependent ...
Parity parity_
Parity of the particle.
std::string name_
name of the particle
ParticleTypePtr get_antiparticle() const
double sample_resonance_mass(const double mass_stable, const double cms_energy, int L=0) const
Resonance mass sampling for 2-particle final state with one resonance (type given by 'this') and one ...
double get_partial_width(const double m, const ParticleTypePtrList dlist) const
Get the mass-dependent partial width of a resonance with mass m, decaying into two given daughter par...
static const ParticleTypePtr try_find(PdgCode pdgcode)
Returns the ParticleTypePtr for the given pdgcode.
void dump_width_and_spectral_function() const
Prints out width and spectral function versus mass to the standard output.
double total_width(const double m) const
Get the mass-dependent total width of a particle with mass m.
bool wanted_decaymode(const DecayType &t, WhichDecaymodes wh) const
Helper Function that containes the if-statement logic that decides if a decay mode is either a hadron...
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
double min_mass_kinematic() const
The minimum mass of the resonance that is kinematically allowed.
static bool exists(PdgCode pdgcode)
static void check_consistency()
double max_factor2_
Maximum factor for double-res mass sampling, cf. sample_resonance_masses.
const std::string & name() const
double min_mass_kinematic_
minimum kinematically allowed mass of the particle Mutable, because it is initialized at first call o...
ParticleType & operator=(const ParticleType &)=delete
assignment is not allowed, see copy constructor above
int32_t charge() const
The charge of the particle.
int antiparticle_sign() const
double spectral_function_no_norm(double m) const
Full spectral function without normalization factor.
static ParticleTypePtrList & list_nucleons()
ParticleType & operator=(ParticleType &&)=default
move ctors are needed for std::sort
unsigned int spin_degeneracy() const
static ParticleTypePtrList & list_anti_nucleons()
bool is_Nstar1535() const
static const ParticleTypeList & list_all()
int isospin_
Isospin of the particle; filled automatically from pdgcode_.
ParticleType(const ParticleType &)=delete
Copies are not allowed as they break intended use.
double isospin3_rel() const
double width_
width of the particle
bool operator<(const ParticleType &rhs) const
"Less than" operator for sorting the ParticleType list (by PDG code)
double spectral_function_simple(double m) const
This one is the most simple form of the spectral function, using a Cauchy distribution (non-relativis...
bool operator!=(const ParticleType &rhs) const
double width_at_pole() const
static ParticleTypePtrList & list_anti_Deltas()
PdgCode pdgcode_
PDG Code of the particle.
bool has_antiparticle() const
ParticleType(std::string n, double m, double w, Parity p, PdgCode id)
Creates a fully initialized ParticleType object.
static ParticleTypePtrList & list_baryon_resonances()
static constexpr double width_cutoff
Decay width cutoff for considering a particle as stable.
DecayBranchList get_partial_widths(const FourVector p, const ThreeVector x, WhichDecaymodes wh) const
Get all the mass-dependent partial decay widths of a particle with mass m.
static ParticleTypePtrList & list_Deltas()
int32_t charge_
Charge of the particle; filled automatically from pdgcode_.
double get_partial_in_width(const double m, const ParticleData &p_a, const ParticleData &p_b) const
Get the mass-dependent partial in-width of a resonance with mass m, decaying into two given daughter ...
static void create_type_list(const std::string &particles)
Initialize the global ParticleType list (list_all) from the given input data.
int isospin() const
Returns twice the isospin vector length .
unsigned int spin() const
double norm_factor_
This normalization factor ensures that the spectral function is normalized to unity,...
int baryon_number() const
ParticleTypePtr operator&() const
Returns an object that acts like a pointer, except that it requires only 2 bytes and inhibits pointer...
bool operator==(const ParticleType &rhs) const
double max_factor1_
Maximum factor for single-res mass sampling, cf. sample_resonance_mass.
double spectral_function_const_width(double m) const
ParticleType(ParticleType &&)=default
move ctors are needed for std::sort
bool is_Deltastar() const
std::pair< double, double > sample_resonance_masses(const ParticleType &t2, const double cms_energy, int L=0) const
Resonance mass sampling for 2-particle final state with two resonances.
IsoParticleType * iso_multiplet() const
static ParticleTypePtrList & list_light_nuclei()
double partial_width(const double m, const DecayBranch *mode) const
Get the mass-dependent partial decay width of a particle with mass m in a particular decay mode.
double mass_
pole mass of the particle
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
bool is_Nstar1535() const
int antiparticle_sign() const
int baryon_number() const
unsigned int spin() const
int32_t get_decimal() const
PdgCode get_antiparticle() const
Construct the antiparticle to a given PDG code.
bool has_antiparticle() const
unsigned int spin_degeneracy() const
The ThreeVector class represents a physical three-vector with the components .
friend std::ostream & operator<<(std::ostream &out, const ParticleType &type)
Writes all information about the particle type to the output stream.
ParticleTypePtrList list_possible_resonances(const ParticleTypePtr type_a, const ParticleTypePtr type_b)
Lists the possible resonances that decay into two particles.
void operator*=(Parity &x, Parity y)
EnergyMomentumTensor operator-(EnergyMomentumTensor a, const EnergyMomentumTensor &b)
Direct subtraction operator.
Parity
Represent the parity of a particle type.
EnergyMomentumTensor operator*(EnergyMomentumTensor a, const double b)
Direct multiplication operator.
WhichDecaymodes
Decide which decay mode widths are returned in get partical widths.
@ Hadronic
Ignore dilepton decay modes widths.
@ Dileptons
Only return dilepton decays widths.
@ All
All decay mode widths.