|
Reactions
0.1.2
Handling reaction trees and decays
|
A PDG particle, based on the fields of a particle in the PDG database. More...


Public Types | |
| using | base_type = pdg_element_base |
| Base class. More... | |
| using | fields_type = pdg_element_fields |
| Fields of the element. More... | |
Public Member Functions | |
| pdg_element ()=delete | |
| pdg_element (pdg_element const &)=default | |
| pdg_element (pdg_element &&)=default | |
| pdg_element & | operator= (pdg_element const &)=default |
| template<class... Args> | |
| pdg_element (Args &&...args) | |
| Construct the element from an initializer list. More... | |
| pdg_element (base_type &&other) | |
| Construct the element from the contents. More... | |
| bool | operator== (pdg_element const &other) const |
| Compare the ID of the two particles. More... | |
| bool | operator!= (pdg_element const &other) const |
| Compare the ID of the two particles. More... | |
| template<class Field , class... Subfield> | |
| units::return_type_t< Field, Subfield... > | get () const |
| Get an element using an accessor. More... | |
| template<class Field > | |
| constexpr bool | has () const |
| Check whether the given field information is missing or not. More... | |
| std::string | latex_name () const |
| Representation of the element name as a LaTeX string. More... | |
| std::string const & | name () const |
| Name of the particle. More... | |
| int | pdg_id () const |
| PDG ID. More... | |
| int | three_charge () const |
| Three times the charge, as an integer. More... | |
| double | charge () const |
| Charge as a doubleing point number. More... | |
| bool | is_self_cc () const |
| Whether the element is its own charge-conjugate. More... | |
| double | mass () const |
| bool | has_mass () const |
| Whether the mass and its errors are defined or not. More... | |
| double | mass_error_lower () const |
| Lower mass error. More... | |
| double | mass_error_upper () const |
| Upper mass error. More... | |
| double | mass_error () const |
| double | mass_error_squared () const |
| double | width () const |
| Get the width of the element. More... | |
| bool | has_width () const |
| Whether the width and its errors are defined or not. More... | |
| double | width_error_lower () const |
| Get the lower width error. More... | |
| double | width_error_upper () const |
| Get the upper width error. More... | |
| double | width_error () const |
| double | width_error_squared () const |
Static Public Attributes | |
| static const size_t | number_of_fields = std::tuple_size_v<base_type> |
| Number of data fields. More... | |
| static constexpr auto | line_size |
| Size of the line (in characters) associated to this class. More... | |
A PDG particle, based on the fields of a particle in the PDG database.
Base class.
Fields of the element.
|
delete |
|
explicitdefault |
|
explicitdefault |
|
inline |
Construct the element from an initializer list.
|
inlineexplicit |
Construct the element from the contents.
|
inline |
Charge as a doubleing point number.
|
inline |
Get an element using an accessor.
For fields of std::optional type, the validity of the content must be checked before calling this function using the pdg_element::has member function. Otherwise the reactions::missing_fields_error exception is thrown, if missing.
The return type is a constant reference for values without units and a value for those with units.
|
inline |
Check whether the given field information is missing or not.
|
inline |
Whether the mass and its errors are defined or not.
|
inline |
Whether the width and its errors are defined or not.
|
inline |
Whether the element is its own charge-conjugate.
|
inline |
Representation of the element name as a LaTeX string.
|
inline |
Get the mass of the element
You must check whether the mass is defined or not before calling this member function, otherwise a reactions::missing_fields_error is thrown.
|
inline |
|
inline |
Lower mass error.
You must check whether the mass is defined or not before calling this member function, otherwise a reactions::missing_fields_error is thrown.
|
inline |
|
inline |
Upper mass error.
You must check whether the mass is defined or not before calling this member function, otherwise a reactions::missing_fields_error is thrown.
|
inline |
Name of the particle.
|
inline |
Compare the ID of the two particles.
| other | element to compare with |
|
default |
|
inline |
Compare the ID of the two particles.
| other | element to compare with |
|
inline |
PDG ID.
|
inline |
Three times the charge, as an integer.
|
inline |
Get the width of the element.
You must check whether the width is defined or not before calling this member function, otherwise a reactions::missing_fields_error is thrown.
|
inline |
Calculate the width error
You must check whether the width is defined or not before calling this member function, otherwise a reactions::missing_fields_error is thrown.
|
inline |
Get the lower width error.
You must check whether the width is defined or not before calling this member function, otherwise a reactions::missing_fields_error is thrown.
|
inline |
Calculate the width error squared
You must check whether the width is defined or not before calling this member function, otherwise a reactions::missing_fields_error is thrown.
|
inline |
Get the upper width error.
You must check whether the width is defined or not before calling this member function, otherwise a reactions::missing_fields_error is thrown.
|
static |
Size of the line (in characters) associated to this class.
|
static |
Number of data fields.
1.8.13