20 : name_(n), mass_(m), width_(w), spin_(s), parity_(p) {}
27 std::lower_bound(iso_type_list.begin(), iso_type_list.end(),
name,
31 if (found == iso_type_list.end() || found->name() !=
name) {
53 " not found (privately)!");
71 if (name.find(
"⁺⁺") != std::string::npos) {
72 return name.substr(0, name.length() -
sizeof(
"⁺⁺") + 1);
73 }
else if (name.find(
"⁺") != std::string::npos) {
74 return name.substr(0, name.length() -
sizeof(
"⁺") + 1);
75 }
else if (name.find(
"⁻⁻") != std::string::npos) {
76 return name.substr(0, name.length() -
sizeof(
"⁻⁻") + 1);
77 }
else if (name.find(
"⁻") != std::string::npos) {
78 return name.substr(0, name.length() -
sizeof(
"⁻") + 1);
79 }
else if (name.find(
"⁰") != std::string::npos) {
80 return name.substr(0, name.length() -
sizeof(
"⁰") + 1);
87 if (
states_[0]->has_antiparticle()) {
97 auto found = std::find_if(multiplet.
states_.begin(), multiplet.
states_.end(),
99 if (found == multiplet.
states_.end()) {
100 throw std::runtime_error(
"Isospin state " + n +
" not found!");
115 const auto &log = logger<LogArea::ParticleType>();
117 log.warn() <<
"Isospin symmetry is broken by mass of " << type.
name()
118 <<
": " << type.
mass() <<
" vs. " <<
mass();
121 log.warn() <<
"Isospin symmetry is broken by width of " << type.
name()
125 log.error() <<
"Isospin symmetry is broken by spin of " << type.
name()
126 <<
": " << type.
spin() <<
" vs. " <<
spin();
131 const auto &log = logger<LogArea::ParticleType>();
138 log.debug() <<
"Creating isospin multiplet " << multiname
144 std::sort(iso_type_list.begin(), iso_type_list.end(),
146 return l.
name() < r.name();
151 multiplet.add_state(type);
201 return search->second->get_value_linear(sqrts);
213 return make_unique<Tabulation>(m1_min + m2_min, 3., 125, [&](
double srts) {
214 const double m1_max = srts - m2_min;
215 const double m2_max = srts - m1_min;
217 integrate2d(m1_min, m1_max, m2_min, m2_max, [&](
double m1,
double m2) {
220 return result.value();
static const IsoParticleType & find(const std::string &name)
Returns the IsoParticleType object for the given name.
static Integrator2dCuhre integrate2d(1E7)
constexpr double really_small
Numerical error tolerance.
static IsoParticleType & find_private(const std::string &name)
Private version of the 'find' method that returns a non-const reference.
unsigned int spin() const
Returns twice the spin of the multiplet.
double get_integral_piR(double sqrts)
Look up the tabulated resonance integral for the XX -> piR cross section.
double spec_func_integrand_2res(double sqrts, double res_mass_1, double res_mass_2, const ParticleType &t1, const ParticleType &t2)
Spectral function integrand for GSL integration, with two resonances in the final state...
std::unordered_map< IsoParticleType *, TabulationPtr > XS_RR_tabulations
A tabulation list for the NN -> RR' cross sections, where R is this multiplet and R' is a baryon reso...
double get_integral_RR(const ParticleType &type_res_2, double sqrts)
Look up the tabulated resonance integral for the XX -> RR cross section.
Parity
Represent the parity of a particle type.
static std::string multiplet_name(std::string name)
Construct the name-string for an isospin multiplet from the given name-string for the particle...
double get_integral_NR(double sqrts)
Look up the tabulated resonance integral for the XX -> NR cross section.
static IsoParticleTypeList iso_type_list
double get_integral_RK(double sqrts)
Look up the tabulated resonance integral for the XX -> RK cross section.
double width() const
Returns the (average) multiplet width.
static IsoParticleType * try_find_private(const std::string &name)
Helper function for IsoParticleType::try_find and friends.
A C++ interface for numerical integration in two dimensions with the Cuba Cuhre integration function...
static bool exists(const std::string &name)
Returns whether the ParticleType with the given pdgcode exists.
std::unique_ptr< Tabulation > spectral_integral_semistable(Integrator &integrate, const ParticleType &resonance, const ParticleType &stable, double range)
Create a table for the spectral integral of a resonance and a stable particle.
double min_mass_kinematic() const
The minimum mass of the resonance that is kinematically allowed.
TabulationPtr XS_RK_tabulation_
A tabulation of the spectral integral for the NK -> RK cross sections.
Throw when requested particle could not be found.
const std::string & name() const
ParticleTypePtrList states_
list of states that are contained in the multiplet
Particle type contains the static properties of a particle species.
IsoParticleType is a class to represent isospin multiplets.
static void create_multiplet(const ParticleType &type)
Add a new multiplet to the global list of IsoParticleTypes, which contains type.
const std::string & name() const
Returns the name of the multiplet.
void add_state(const ParticleType &type)
Add a new state to an existing multiplet (and check if isospin symmetry is fulfilled).
static const IsoParticleType * try_find(const std::string &name)
Returns the IsoParticleType pointer for the given name.
static const ParticleTypePtr find_state(const std::string &name)
Returns the ParticleType object for the given name, by first finding the correct multiplet and then l...
bool has_anti_multiplet() const
Check if there is a multiplet of antiparticles, which is different from the original multiplet...
TabulationPtr XS_NR_tabulation_
A tabulation for the NN -> NR cross sections, where R is a resonance from this multiplet.
TabulationPtr XS_piR_tabulation_
A tabulation of the spectral integral for the dpi -> d'pi cross sections.
double width_at_pole() const
IsoParticleType(const std::string &n, double m, double w, unsigned int s, Parity p)
Creates a fully initialized IsoParticleType object.
A C++ interface for numerical integration in one dimension with the GSL CQUAD integration functions...
ParticleTypePtrList get_states() const
Returns list of states that form part of the multiplet.
A pointer-like interface to global references to ParticleType objects.
TabulationPtr integrate_RR(ParticleTypePtr &type_res_2)
Utility function to help compute various XX->RR spectral integrals.
unsigned int spin() const
static const IsoParticleTypeList & list_all()
Returns a list of all IsoParticleTypes.
static Integrator integrate
double mass() const
Returns the (average) multiplet mass.