#include <quantumnumbers.h>
A container for storing conserved values.
QuantumNumbers can be used to compare all values that should be conserved during the evolution, in particular for the whole system at fixed intervals, or for a subset of particles before- and after a DecayAction / ScatterAction / Action.
QuantumNumbers can also be used to store, and retrieve, the total value of the quantum numbers in e.g. a ScatterAction, before distributing it to the new particles.
Currently, momentum conservation (including energy conservation), charge-, isospin3-, (net-) strangeness-, (net-) bottomness-, (net-) charmness- and (net-) baryon number conservation are checked. (It should be noted, or repeated, that only the net quantities are conserved, hence this is what is stored and compared with this class.)
Definition at line 53 of file quantumnumbers.h.
Public Member Functions | |
| QuantumNumbers () | |
| Construct QuantumNumbers collection with all fields 0. More... | |
| QuantumNumbers (const FourVector &m, const int q, const int i3, const int s, const int c, const int b, const int B) | |
| QuantumNumbers (const Particles &particles) | |
| Construct QuantumNumbers collection from the conserved quantities found in a set of particles. More... | |
| QuantumNumbers (const std::vector< Particles > &ensembles) | |
| Construct QuantumNumbers from several sets of particles. More... | |
| QuantumNumbers (const ParticleList &part) | |
| Construct QuantumNumbers collection from a particle list. More... | |
| void | add_values (const ParticleData &p) |
| Add the quantum numbers of a single particle to the collection. More... | |
| FourVector | momentum () const |
| int | charge () const |
| int | isospin3 () const |
| int | strangeness () const |
| int | charmness () const |
| int | bottomness () const |
| int | baryon_number () const |
| bool | operator== (const QuantumNumbers &rhs) const |
| bool | operator!= (const QuantumNumbers &rhs) const |
| Logical complement of QuantumNumbers::operator==. More... | |
| QuantumNumbers | operator- (const QuantumNumbers &rhs) const |
| 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. More... | |
| std::string | report_deviations (const QuantumNumbers &rhs) const |
| Reports on deviations between two QuantumNumbers collections. More... | |
Private Attributes | |
| FourVector | momentum_ |
| Total momentum four-vector [GeV]. More... | |
| int | charge_ |
| Total charge. More... | |
| int | isospin3_ |
| Total isospin-3. More... | |
| int | strangeness_ |
| Total strangeness. More... | |
| int | charmness_ |
| Total charm. More... | |
| int | bottomness_ |
| Total bottom. More... | |
| int | baryon_number_ |
| Total baryon number. More... | |
|
inline |
Construct QuantumNumbers collection with all fields 0.
Definition at line 56 of file quantumnumbers.h.
|
inline |
| [in] | m | Momentum FourVector [GeV] |
| [in] | q | Charge |
| [in] | i3 | Isospin |
| [in] | s | Strangeness |
| [in] | c | Charmness |
| [in] | b | Bottomness |
| [in] | B | Baryon number |
Definition at line 75 of file quantumnumbers.h.
|
inlineexplicit |
Construct QuantumNumbers collection from the conserved quantities found in a set of particles.
| [in] | particles | set of particles for which quantum numbers are calculated and constructed |
Definition at line 92 of file quantumnumbers.h.
|
inlineexplicit |
Construct QuantumNumbers from several sets of particles.
| [in] | ensembles | Current list of particles in all ensembles |
Definition at line 103 of file quantumnumbers.h.
|
inlineexplicit |
Construct QuantumNumbers collection from a particle list.
| [in] | part | list of particles for which quantum numbers are calculated and constructed |
Definition at line 118 of file quantumnumbers.h.
|
inline |
Add the quantum numbers of a single particle to the collection.
| [in] | p | particle whose quantum number is added to the collection |
Definition at line 128 of file quantumnumbers.h.
|
inline |
Definition at line 145 of file quantumnumbers.h.
|
inline |
Definition at line 154 of file quantumnumbers.h.
|
inline |
Definition at line 162 of file quantumnumbers.h.
|
inline |
Definition at line 170 of file quantumnumbers.h.
|
inline |
Definition at line 178 of file quantumnumbers.h.
|
inline |
Definition at line 186 of file quantumnumbers.h.
|
inline |
Definition at line 194 of file quantumnumbers.h.
|
inline |
| rhs | Right-hand side. |
In the comparison of FourVectors, a little leeway is built-in, so this does not rely on an exact comparison of floating point values.
Definition at line 205 of file quantumnumbers.h.
|
inline |
Logical complement of QuantumNumbers::operator==.
Definition at line 212 of file quantumnumbers.h.
|
inline |
| rhs | Right-hand side. |
If everything is conserved, all entries of the result should be zero.
Definition at line 221 of file quantumnumbers.h.
|
inline |
Checks if the current particle list has still the same values and reports about differences.
| [in] | ensembles | Current list of particles in all ensembles, whose quantum number is compared |
Definition at line 237 of file quantumnumbers.h.
| std::string smash::QuantumNumbers::report_deviations | ( | const QuantumNumbers & | rhs | ) | const |
Reports on deviations between two QuantumNumbers collections.
| [in] | rhs | Other QuantumNumbers collection. |
If there are no differences, the returned string is empty; else, a descriptive warning message is returned, e.g.
Definition at line 18 of file quantumnumbers.cc.
|
private |
Total momentum four-vector [GeV].
Definition at line 268 of file quantumnumbers.h.
|
private |
|
private |
Total isospin-3.
Definition at line 281 of file quantumnumbers.h.
|
private |
Total strangeness.
Definition at line 287 of file quantumnumbers.h.
|
private |
|
private |
|
private |
Total baryon number.
Definition at line 305 of file quantumnumbers.h.