10 #include <gsl/gsl_sf_coupling.h> 18 const int m_a,
const int m_b,
const int m_c) {
19 const double wigner_3j = gsl_sf_coupling_3j(j_a, j_b, j_c, m_a, m_b, -m_c);
23 assert((j_a - j_b + m_c) % 2 == 0);
24 const int j = (j_a - j_b + m_c) / 2;
25 double result = std::sqrt(j_c + 1) * wigner_3j;
26 result *= (j % 2 == 0) * 2 - 1;
29 const auto &log = logger<LogArea::Resonances>();
30 log.debug(
"CG: ", result,
" I1: ", j_a,
" I2: ", j_b,
" IR: ", j_c,
31 " iz1: ", m_a,
" iz2: ", m_b,
" izR: ", m_c);
47 const int I_tot,
const int I_z) {
59 std::vector<int> possible_I_ab(max_I_ab - min_I_ab + 1);
60 std::iota(possible_I_ab.begin(), possible_I_ab.end(), min_I_ab);
61 std::vector<int> allowed_I_ab;
62 allowed_I_ab.reserve(possible_I_ab.size());
63 for (
const auto Iab : possible_I_ab) {
64 const auto min_I = std::abs(Iab - p_c.
isospin());
65 const auto max_I = Iab + p_c.
isospin();
67 allowed_I_ab.push_back(Iab);
70 if (allowed_I_ab.size() != 1) {
71 throw std::runtime_error(
72 "The coupled 3-body isospin state is not uniquely defined for " +
75 const auto I_ab = allowed_I_ab[0];
92 double isospin_factor = 0.;
93 for (
const int I_tot :
I_tot_range(p_a, p_b, p_c, p_d)) {
94 if (I < 0 || I_tot == I) {
97 isospin_factor = isospin_factor + cg_in * cg_in * cg_out * cg_out;
100 return isospin_factor;
constexpr double really_small
Numerical error tolerance.
int isospin() const
Returns twice the isospin vector length .
Collection of useful constants that are known at compile time.
double isospin_clebsch_gordan_sqr_3to1(const ParticleType &p_a, const ParticleType &p_b, const ParticleType &p_c, const ParticleType &Res)
Calculate the squared isospin Clebsch-Gordan coefficient for three particles p_a, p_b and p_c couplin...
Range of total isospin for reaction of particle a with particle b.
static double isospin_clebsch_gordan_2to1(const ParticleType &p_a, const ParticleType &p_b, const int I_tot, const int I_z)
Calculate isospin Clebsch-Gordan coefficient for two particles p_a and p_b coupling to a total isospi...
const std::string & name() const
Particle type contains the static properties of a particle species.
double isospin_clebsch_gordan_sqr_2to2(const ParticleType &p_a, const ParticleType &p_b, const ParticleType &p_c, const ParticleType &p_d, const int I=-1)
Calculate the squared isospin Clebsch-Gordan coefficient for a 2-to-2 reaction A + B -> C + D...
double clebsch_gordan(const int j_a, const int j_b, const int j_c, const int m_a, const int m_b, const int m_c)
Calculate Clebsch-Gordan coefficient .