10 #ifndef SRC_INCLUDE_SMASH_QUANTUMNUMBERS_H_
11 #define SRC_INCLUDE_SMASH_QUANTUMNUMBERS_H_
77 const int c,
const int b,
const int B)
106 for (
const Particles& particles : ensembles) {
120 for (
const auto&
p : part) {
209 const double m0_invariant = std::sqrt(std::fabs(
momentum_.
sqr()));
211 const double m1_invariant = std::sqrt(std::fabs(rhs.
momentum_.
sqr()));
213 const double avg_m_inv = 0.5 * (m0_invariant + m1_invariant);
219 bool momentum_conserved =
224 return (momentum_conserved &&
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
double sqr() const
calculate the square of the vector (which is a scalar)
ParticleData contains the dynamic information of a certain particle.
The Particles class abstracts the storage and manipulation of particles.
A container for storing conserved values.
void add_values(const ParticleData &p)
Add the quantum numbers of a single particle to the collection.
int baryon_number() const
QuantumNumbers(const Particles &particles)
Construct QuantumNumbers collection from the conserved quantities found in a set of particles.
int bottomness_
Total bottom.
int isospin3_
Total isospin-3.
QuantumNumbers operator-(const QuantumNumbers &rhs) const
bool operator==(const QuantumNumbers &rhs) const
FourVector momentum_
Total momentum four-vector [GeV].
FourVector momentum() const
int baryon_number_
Total baryon number.
QuantumNumbers()
Construct QuantumNumbers collection with all fields 0.
QuantumNumbers(const ParticleList &part)
Construct QuantumNumbers collection from a particle list.
int charmness_
Total charm.
int strangeness_
Total strangeness.
bool operator!=(const QuantumNumbers &rhs) const
Logical complement of QuantumNumbers::operator==.
QuantumNumbers(const FourVector &m, const int q, const int i3, const int s, const int c, const int b, const int B)
std::string report_deviations(const std::vector< Particles > &ensembles) const
Checks if the current particle list has still the same values and reports about differences.
QuantumNumbers(const std::vector< Particles > &ensembles)
Construct QuantumNumbers from several sets of particles.
constexpr double small_number
Physical error tolerance.