34 double spin_factor = (c.
spin() + 1) * (d.
spin() + 1);
35 spin_factor /= (a.
spin() + 1) * (b.
spin() + 1);
36 double symmetry_factor = (1 + (a == b));
37 symmetry_factor /= (1 + (c == d));
40 return spin_factor * symmetry_factor * momentum_factor;
56 double spin_factor = (c.
spin() + 1) * (d.
spin() + 1);
57 spin_factor /= (a.
spin() + 1) * (b.
spin() + 1);
58 double symmetry_factor = (1 + (a == b));
59 symmetry_factor /= (1 + (c == d));
60 const double momentum_factor =
63 return spin_factor * symmetry_factor * momentum_factor;
79 double spin_factor = (c.
spin() + 1) * (d.
spin() + 1);
80 spin_factor /= (a.
spin() + 1) * (b.
spin() + 1);
81 double symmetry_factor = (1 + (a == b));
82 symmetry_factor /= (1 + (c == d));
83 const double momentum_factor =
86 return spin_factor * symmetry_factor * momentum_factor;
94 CollisionBranchList in_list,
double weight = 1.) {
95 main_list.reserve(main_list.size() + in_list.size());
96 for (
auto& proc : in_list) {
97 proc->set_weight(proc->weight() * weight);
98 main_list.emplace_back(std::move(proc));
108 for (
auto& proc : list) {
109 xs_sum += proc->weight();
116 const std::pair<FourVector, FourVector> potentials)
117 : incoming_particles_(incoming_particles),
119 potentials_(potentials),
120 is_BBbar_pair_(incoming_particles_[0].type().is_baryon() &&
121 incoming_particles_[1].type().is_baryon() &&
122 incoming_particles_[0].type().antiparticle_sign() ==
123 -incoming_particles_[1].type().antiparticle_sign()) {}
126 double elastic_parameter,
bool two_to_one_switch,
127 ReactionsBitSet included_2to2,
double low_snn_cut,
bool strings_switch,
128 bool use_AQM,
bool strings_with_probability,
NNbarTreatment nnbar_treatment,
130 CollisionBranchList process_list;
134 double p_pythia = 0.;
135 if (strings_with_probability) {
143 const bool reject_by_nucleon_elastic_cutoff =
147 if (incl_elastic && !reject_by_nucleon_elastic_cutoff) {
148 process_list.emplace_back(
elastic(elastic_parameter, use_AQM));
154 const double sig_current =
sum_xs_of(process_list);
155 const double sig_string = std::max(0.,
high_energy() - sig_current);
162 if (two_to_one_switch) {
166 if (included_2to2.any()) {
176 throw std::runtime_error(
177 "'NNbar' has to be in the list of allowed 2 to 2 processes "
178 "to enable annihilation to go through resonances");
194 bool use_AQM)
const {
195 double elastic_xs = 0.;
196 if (elast_par >= 0.) {
198 elastic_xs = elast_par;
209 CollisionBranchList process_list;
212 const auto& pdg_a = data_a.
pdgcode();
213 const auto& pdg_b = data_b.
pdgcode();
214 if ((pdg_a.is_nucleon() && pdg_b.is_pion()) ||
215 (pdg_b.is_nucleon() && pdg_a.is_pion())) {
224 double elastic_xs = 0.0;
232 elastic_xs =
nk_el();
236 elastic_xs =
nn_el();
244 const bool is_deuteron =
246 if (is_deuteron && pdg_other.
is_pion()) {
249 }
else if (is_deuteron && pdg_other.
is_nucleon()) {
253 }
else if (use_AQM) {
258 elastic_xs =
nn_el();
303 std::stringstream ss;
306 ss <<
"problem in CrossSections::elastic: a=" << name_a <<
" b=" << name_b
307 <<
" j_a=" << pdg_a.
spin() <<
" j_b=" << pdg_b.
spin()
308 <<
" sigma=" << sig_el <<
" s=" << s;
309 throw std::runtime_error(ss.str());
319 assert(pion != nucleon);
324 switch (nucleon.
code()) {
326 switch (pion.
code()) {
339 switch (pion.
code()) {
352 switch (pion.
code()) {
365 switch (pion.
code()) {
378 throw std::runtime_error(
379 "only the elastic cross section for proton-pion "
386 std::stringstream ss;
389 ss <<
"problem in CrossSections::elastic: a=" << name_a <<
" b=" << name_b
390 <<
" j_a=" << pdg_a.
spin() <<
" j_b=" << pdg_b.
spin()
391 <<
" sigma=" << sig_el <<
" s=" << s;
392 throw std::runtime_error(ss.str());
402 const auto pdg_nucleon = type_nucleon.
pdgcode().
code();
411 CollisionBranchList process_list;
412 switch (pdg_nucleon) {
420 type_K_p, type_Sigma_p);
431 type_K_p, type_Sigma_m);
433 sqrt_s_, type_K_z, type_Sigma_z);
435 sqrt_s_, type_K_z, type_Lambda);
450 sqrt_s_, type_K_p, type_Sigma_z);
452 sqrt_s_, type_K_z, type_Sigma_p);
455 type_K_p, type_Lambda);
471 type_K_z, type_Sigma_p);
473 sqrt_s_, type_K_p, type_Sigma_z);
475 sqrt_s_, type_K_p, type_Lambda);
483 type_K_z, type_Sigma_m);
498 sqrt_s_, type_K_z, type_Sigma_z);
500 sqrt_s_, type_K_p, type_Sigma_m);
503 type_K_z, type_Lambda);
519 type_K_m, type_Sigma_m_bar);
521 sqrt_s_, type_Kbar_z, type_Sigma_z_bar);
523 sqrt_s_, type_Kbar_z, type_Lambda_bar);
531 type_K_m, type_Sigma_p_bar);
546 sqrt_s_, type_K_m, type_Sigma_z_bar);
548 sqrt_s_, type_Kbar_z, type_Sigma_p_bar);
551 type_K_m, type_Lambda_bar);
564 type_Kbar_z, type_Sigma_m_bar);
575 type_Kbar_z, type_Sigma_p_bar);
577 sqrt_s_, type_K_m, type_Sigma_z_bar);
579 sqrt_s_, type_K_m, type_Lambda_bar);
594 sqrt_s_, type_Kbar_z, type_Sigma_z_bar);
596 sqrt_s_, type_K_m, type_Sigma_m_bar);
599 type_Kbar_z, type_Lambda_bar);
616 assert(kaon != nucleon);
621 switch (nucleon.
code()) {
623 switch (kaon.
code()) {
639 switch (kaon.
code()) {
655 switch (kaon.
code()) {
671 switch (kaon.
code()) {
687 throw std::runtime_error(
688 "elastic cross section for antinucleon-kaon "
695 std::stringstream ss;
698 ss <<
"problem in CrossSections::elastic: a=" << name_a <<
" b=" << name_b
699 <<
" j_a=" << pdg_a.
spin() <<
" j_b=" << pdg_b.
spin()
700 <<
" sigma=" << sig_el <<
" s=" << s;
701 throw std::runtime_error(ss.str());
706 CollisionBranchList resonance_process_list;
717 if (type_resonance.is_stable()) {
723 type_resonance.pdgcode() == type_particle_a.
pdgcode()) ||
725 type_resonance.pdgcode() == type_particle_b.
pdgcode())) {
729 double resonance_xsection =
formation(type_resonance, p_cm_sqr);
733 resonance_process_list.push_back(make_unique<CollisionBranch>(
737 "->", type_resonance.name(),
738 " at sqrt(s)[GeV] = ",
sqrt_s_,
739 " with xs[mb] = ", resonance_xsection);
742 return resonance_process_list;
746 double cm_momentum_sqr)
const {
750 if (type_resonance.
charge() !=
764 if (partial_width <= 0.) {
769 const double spinfactor =
770 static_cast<double>(type_resonance.
spin() + 1) /
771 ((type_particle_a.
spin() + 1) * (type_particle_b.
spin() + 1));
772 const int sym_factor =
777 return spinfactor * sym_factor * 2. * M_PI * M_PI / cm_momentum_sqr *
784 CollisionBranchList process_list;
789 const auto& pdg_a = data_a.
pdgcode();
790 const auto& pdg_b = data_b.
pdgcode();
792 if (pdg_a.is_nucleon() && pdg_b.is_nucleon() &&
793 pdg_a.antiparticle_sign() == pdg_b.antiparticle_sign()) {
795 process_list =
nn_xx(included_2to2);
803 if ((pdg_a.is_nucleon() && pdg_b.is_kaon()) ||
804 (pdg_b.is_nucleon() && pdg_a.is_kaon())) {
806 process_list =
nk_xx(included_2to2);
807 }
else if ((pdg_a.is_hyperon() && pdg_b.is_pion()) ||
808 (pdg_b.is_hyperon() && pdg_a.is_pion())) {
810 process_list =
ypi_xx(included_2to2);
811 }
else if ((pdg_a.is_Delta() && pdg_b.is_kaon()) ||
812 (pdg_b.is_Delta() && pdg_a.is_kaon())) {
820 process_list =
dn_xx(included_2to2);
826 process_list =
dpi_xx(included_2to2);
834 CollisionBranchList process_list;
840 if (!same_sign && !any_nucleus) {
860 CollisionBranchList process_list, channel_list;
866 bool both_antinucleons =
869 const ParticleTypePtrList& nuc_or_anti_nuc =
872 const ParticleTypePtrList& delta_or_anti_delta =
882 process_list.reserve(process_list.size() + channel_list.size());
883 std::move(channel_list.begin(), channel_list.end(),
884 std::inserter(process_list, process_list.end()));
885 channel_list.clear();
897 process_list.reserve(process_list.size() + channel_list.size());
898 std::move(channel_list.begin(), channel_list.end(),
899 std::inserter(process_list, process_list.end()));
900 channel_list.clear();
912 if (deutron && antideutron && pim && pi0 && pip &&
914 const ParticleTypePtrList deutron_list = {deutron};
915 const ParticleTypePtrList antideutron_list = {antideutron};
916 const ParticleTypePtrList pion_list = {pim, pi0, pip};
918 (both_antinucleons ? antideutron_list : deutron_list), pion_list,
921 return pCM(sqrts, type_res_1.
mass(), type_res_2.
mass());
923 process_list.reserve(process_list.size() + channel_list.size());
924 std::move(channel_list.begin(), channel_list.end(),
925 std::inserter(process_list, process_list.end()));
926 channel_list.clear();
938 const auto pdg_nucleon = type_nucleon.
pdgcode().
code();
956 bool incl_KN_to_KDelta =
959 bool incl_Strangeness_exchange =
962 CollisionBranchList process_list;
967 switch (pdg_nucleon) {
969 if (incl_Strangeness_exchange) {
979 sqrt_s_, type_pi_m, type_Sigma_p);
982 sqrt_s_, type_pi_p, type_Sigma_m);
985 type_pi_z, type_Sigma_z);
988 type_pi_z, type_Lambda);
999 if (incl_Strangeness_exchange) {
1007 type_pi_m, type_Sigma_z);
1010 type_pi_z, type_Sigma_m);
1013 type_pi_m, type_Lambda);
1018 if (incl_KN_to_KDelta) {
1026 type_nucleon, type_kaon,
1030 sqrt_s_, type_Kbar_z, type_Delta_pp_bar);
1034 type_nucleon, type_kaon,
1035 type_K_m, type_Delta_p_bar);
1037 sqrt_s_, type_K_m, type_Delta_p_bar);
1042 if (incl_KN_to_KDelta) {
1050 type_nucleon, type_kaon,
1054 sqrt_s_, type_Kbar_z, type_Delta_p_bar);
1058 type_nucleon, type_kaon,
1059 type_K_m, type_Delta_z_bar);
1061 sqrt_s_, type_K_m, type_Delta_z_bar);
1063 if (incl_KN_to_KN) {
1067 type_Kbar_z, type_p_bar);
1077 switch (pdg_nucleon) {
1079 if (incl_KN_to_KDelta) {
1087 type_nucleon, type_kaon,
1088 type_K_z, type_Delta_pp);
1090 sqrt_s_, type_K_z, type_Delta_pp);
1094 type_nucleon, type_kaon,
1095 type_K_p, type_Delta_p);
1097 sqrt_s_, type_K_p, type_Delta_p);
1102 if (incl_KN_to_KDelta) {
1110 type_nucleon, type_kaon,
1111 type_K_z, type_Delta_p);
1113 sqrt_s_, type_K_z, type_Delta_p);
1117 type_nucleon, type_kaon,
1118 type_K_p, type_Delta_z);
1120 sqrt_s_, type_K_p, type_Delta_z);
1122 if (incl_KN_to_KN) {
1131 if (incl_Strangeness_exchange) {
1141 sqrt_s_, type_pi_p, type_Sigma_p_bar);
1144 sqrt_s_, type_pi_m, type_Sigma_m_bar);
1147 type_pi_z, type_Sigma_z_bar);
1150 type_pi_z, type_Lambda_bar);
1152 if (incl_KN_to_KN) {
1156 sqrt_s_, type_K_z, type_n_bar);
1161 if (incl_Strangeness_exchange) {
1169 type_pi_p, type_Sigma_z_bar);
1172 type_pi_z, type_Sigma_m_bar);
1175 type_pi_p, type_Lambda_bar);
1188 switch (pdg_nucleon) {
1190 if (incl_KN_to_KDelta) {
1198 type_nucleon, type_kaon,
1199 type_K_z, type_Delta_p);
1201 sqrt_s_, type_K_z, type_Delta_p);
1205 type_nucleon, type_kaon,
1206 type_K_p, type_Delta_z);
1208 sqrt_s_, type_K_p, type_Delta_z);
1210 if (incl_KN_to_KN) {
1224 if (incl_KN_to_KDelta) {
1232 type_nucleon, type_kaon,
1233 type_K_z, type_Delta_z);
1235 sqrt_s_, type_K_z, type_Delta_z);
1239 type_nucleon, type_kaon,
1240 type_K_p, type_Delta_m);
1242 sqrt_s_, type_K_p, type_Delta_m);
1247 if (incl_Strangeness_exchange) {
1255 type_pi_m, type_Sigma_z_bar);
1258 type_pi_z, type_Sigma_p_bar);
1261 type_pi_m, type_Lambda_bar);
1266 if (incl_Strangeness_exchange) {
1276 sqrt_s_, type_pi_m, type_Sigma_m_bar);
1279 sqrt_s_, type_pi_p, type_Sigma_p_bar);
1282 type_pi_z, type_Sigma_z_bar);
1285 type_pi_z, type_Lambda_bar);
1287 if (incl_KN_to_KN) {
1291 sqrt_s_, type_K_p, type_p_bar);
1299 switch (pdg_nucleon) {
1301 if (incl_Strangeness_exchange) {
1309 type_pi_z, type_Sigma_p);
1312 type_pi_p, type_Sigma_z);
1315 type_pi_p, type_Lambda);
1320 if (incl_Strangeness_exchange) {
1330 sqrt_s_, type_pi_p, type_Sigma_m);
1333 sqrt_s_, type_pi_m, type_Sigma_p);
1336 type_pi_z, type_Sigma_z);
1339 type_pi_z, type_Lambda);
1341 if (incl_KN_to_KN) {
1350 if (incl_KN_to_KDelta) {
1352 const auto& type_Kbar_z = type_kaon;
1358 type_nucleon, type_kaon,
1362 sqrt_s_, type_Kbar_z, type_Delta_bar_m);
1366 type_nucleon, type_kaon,
1367 type_K_m, type_Delta_bar_z);
1369 sqrt_s_, type_K_m, type_Delta_bar_z);
1371 if (incl_KN_to_KN) {
1380 sqrt_s_, type_K_m, type_n_bar);
1385 if (incl_KN_to_KDelta) {
1393 type_nucleon, type_kaon,
1397 sqrt_s_, type_Kbar_z, type_Delta_z_bar);
1401 type_nucleon, type_kaon,
1402 type_K_m, type_Delta_m_bar);
1404 sqrt_s_, type_K_m, type_Delta_m_bar);
1412 return process_list;
1417 CollisionBranchList process_list;
1419 return process_list;
1426 const auto pdg_delta = type_delta.
pdgcode().
code();
1434 switch (
pack(pdg_delta, pdg_kaon)) {
1445 type_p, type_K_p, type_kaon, type_delta) *
1458 type_kaon, type_p_bar,
1461 type_p_bar, type_K_m, type_kaon, type_delta) *
1464 sqrt_s_, type_p_bar, type_K_m);
1479 type_n, type_K_p, type_kaon, type_delta) *
1490 type_p, type_K_z, type_kaon, type_delta) *
1505 type_kaon, type_n_bar,
1508 type_n_bar, type_K_m, type_kaon, type_delta) *
1511 sqrt_s_, type_n_bar, type_K_m);
1516 type_kaon, type_p_bar,
1519 type_p_bar, type_Kbar_z, type_kaon, type_delta) *
1522 sqrt_s_, type_p_bar, type_Kbar_z);
1535 type_n, type_K_z, type_kaon, type_delta) *
1548 type_kaon, type_n_bar,
1551 type_n_bar, type_Kbar_z, type_kaon, type_delta) *
1554 sqrt_s_, type_n_bar, type_Kbar_z);
1561 return process_list;
1565 CollisionBranchList process_list;
1567 return process_list;
1574 const auto pdg_hyperon = type_hyperon.
pdgcode().
code();
1579 switch (
pack(pdg_hyperon, pdg_pion)) {
1586 s, type_hyperon, type_pion, type_n, type_K_m) *
1602 sqrt_s_, type_p, type_Kbar_z);
1611 type_pion, type_n_bar,
1615 sqrt_s_, type_n_bar, type_K_p);
1624 type_pion, type_p_bar,
1628 sqrt_s_, type_p_bar, type_K_z);
1637 s, type_hyperon, type_pion, type_n, type_K_m) *
1653 sqrt_s_, type_p, type_Kbar_z);
1662 type_pion, type_n_bar,
1666 sqrt_s_, type_n_bar, type_K_p);
1675 type_pion, type_p_bar,
1679 sqrt_s_, type_p_bar, type_K_z);
1688 s, type_hyperon, type_pion, type_n, type_K_m) *
1704 sqrt_s_, type_p, type_Kbar_z);
1713 type_pion, type_n_bar,
1717 sqrt_s_, type_n_bar, type_K_p);
1726 type_pion, type_p_bar,
1730 sqrt_s_, type_p_bar, type_K_z);
1741 s, type_hyperon, type_pion, type_p, type_K_m) *
1752 sqrt_s_, type_n, type_Kbar_z);
1763 type_pion, type_p_bar,
1767 sqrt_s_, type_p_bar, type_K_p);
1771 type_pion, type_n_bar,
1775 sqrt_s_, type_n_bar, type_K_z);
1786 s, type_hyperon, type_pion, type_p, type_K_m) *
1797 sqrt_s_, type_n, type_Kbar_z);
1808 type_pion, type_p_bar,
1812 sqrt_s_, type_p_bar, type_K_p);
1816 type_pion, type_n_bar,
1820 sqrt_s_, type_n_bar, type_K_z);
1831 s, type_hyperon, type_pion, type_p, type_K_m) *
1842 sqrt_s_, type_n, type_Kbar_z);
1853 type_pion, type_p_bar,
1857 sqrt_s_, type_p_bar, type_K_p);
1861 type_pion, type_n_bar,
1865 sqrt_s_, type_n_bar, type_K_z);
1876 s, type_hyperon, type_pion, type_p, type_K_m) *
1887 sqrt_s_, type_n, type_Kbar_z);
1898 type_pion, type_p_bar,
1902 sqrt_s_, type_p_bar, type_K_p);
1906 type_pion, type_n_bar,
1910 sqrt_s_, type_n_bar, type_K_z);
1917 return process_list;
1921 CollisionBranchList process_list;
1931 ParticleTypePtrList nuc = (baryon_number > 0)
1938 nuc_a->charge() + nuc_b->charge()) {
1942 for (
const int twoI :
I_tot_range(*nuc_a, *nuc_b)) {
1944 type_a, type_b, *nuc_a, *nuc_b, twoI);
1951 const double matrix_element =
1953 if (matrix_element <= 0.) {
1957 const double spin_factor = (nuc_a->spin() + 1) * (nuc_b->spin() + 1);
1958 const int sym_fac_in =
1960 const int sym_fac_out =
1961 (nuc_a->iso_multiplet() == nuc_b->iso_multiplet()) ? 2 : 1;
1962 double p_cm_final =
pCM_from_s(s, nuc_a->mass(), nuc_b->mass());
1963 const double xsection = isospin_factor * spin_factor * sym_fac_in /
1964 sym_fac_out * p_cm_final * matrix_element /
1968 process_list.push_back(make_unique<CollisionBranch>(
1971 nuc_a->name(), nuc_b->name(),
1972 " at sqrts [GeV] = ", sqrts,
1973 " with cs[mb] = ", xsection);
1985 if (is_pid_or_pidprime &&
1993 if (produced_nucleus == &type_nucleus ||
1995 produced_nucleus->baryon_number() != type_nucleus.
baryon_number()) {
2002 const double matrix_element =
2003 295.5 + 2.862 / (0.00283735 +
pow_int(sqrts - 2.181, 2)) +
2004 0.0672 /
pow_int(tmp, 2) - 6.61753 / tmp;
2005 const double spin_factor =
2006 (produced_nucleus->spin() + 1) * (type_pi.
spin() + 1);
2011 double xsection = matrix_element * spin_factor / (s *
cm_momentum());
2012 if (produced_nucleus->is_stable()) {
2014 xsection *=
pCM_from_s(s, type_pi.
mass(), produced_nucleus->mass());
2017 const double resonance_integral =
2018 produced_nucleus->iso_multiplet()->get_integral_piR(sqrts);
2019 xsection *= resonance_integral;
2021 ", matrix element: ", matrix_element,
2024 process_list.push_back(make_unique<CollisionBranch>(
2027 type_pi.
name(), produced_nucleus->name(),
2028 " at ", sqrts,
" GeV, xs[mb] = ", xsection);
2031 return process_list;
2039 CollisionBranchList process_list;
2041 return process_list;
2049 if (produced_nucleus == &type_nucleus ||
2051 produced_nucleus->baryon_number() != type_nucleus.
baryon_number()) {
2054 double matrix_element = 0.0;
2062 matrix_element = 79.0474 / std::pow(tmp, 0.7897) + 654.596 * tmp;
2067 matrix_element = 342.572 / std::pow(tmp, 0.6);
2069 const double spin_factor =
2070 (produced_nucleus->spin() + 1) * (type_N.
spin() + 1);
2074 double xsection = matrix_element * spin_factor / (s *
cm_momentum());
2075 if (produced_nucleus->is_stable()) {
2077 xsection *=
pCM_from_s(s, type_N.
mass(), produced_nucleus->mass());
2080 const double resonance_integral =
2081 produced_nucleus->iso_multiplet()->get_integral_NR(sqrts);
2082 xsection *= resonance_integral;
2084 process_list.push_back(make_unique<CollisionBranch>(
2087 type_N.
name(), produced_nucleus->name(),
" at ",
2088 sqrts,
" GeV, xs[mb] = ", xsection);
2090 return process_list;
2094 double total_string_xs,
StringProcess* string_process,
bool use_AQM)
const {
2095 if (!string_process) {
2096 throw std::runtime_error(
"string_process should be initialized.");
2099 CollisionBranchList channel_list;
2100 if (total_string_xs <= 0.) {
2101 return channel_list;
2110 std::array<int, 2> pdgid;
2111 double AQM_factor = 1.;
2112 for (
int i = 0; i < 2; i++) {
2120 bool can_annihilate =
false;
2123 for (
int iq = 1; iq <= n_q_types; iq++) {
2124 std::array<int, 2> nquark;
2125 for (
int i = 0; i < 2; i++) {
2129 if (nquark[0] != 0 && nquark[1] != 0) {
2130 can_annihilate =
true;
2146 std::array<double, 3> xs =
2149 for (
int ip = 0; ip < 3; ip++) {
2150 xs[ip] *= AQM_factor;
2153 double single_diffr_AX = xs[0], single_diffr_XB = xs[1], double_diffr = xs[2];
2154 double single_diffr = single_diffr_AX + single_diffr_XB;
2155 double diffractive = single_diffr + double_diffr;
2161 double sig_annihilation = 0.0;
2162 if (can_annihilate) {
2168 xs_param *= AQM_factor;
2170 sig_annihilation = std::min(total_string_xs, xs_param);
2173 const double nondiffractive_all =
2174 std::max(0., total_string_xs - sig_annihilation - diffractive);
2175 diffractive = total_string_xs - sig_annihilation - nondiffractive_all;
2176 double_diffr = std::max(0., diffractive - single_diffr);
2177 const double a = (diffractive - double_diffr) / single_diffr;
2178 single_diffr_AX *= a;
2179 single_diffr_XB *= a;
2180 assert(std::abs(single_diffr_AX + single_diffr_XB + double_diffr +
2181 sig_annihilation + nondiffractive_all - total_string_xs) <
2184 double nondiffractive_soft = 0.;
2185 double nondiffractive_hard = 0.;
2186 if (nondiffractive_all > 0.) {
2191 nondiffractive_soft =
2192 nondiffractive_all * std::exp(-hard_xsec / nondiffractive_all);
2193 nondiffractive_hard = nondiffractive_all - nondiffractive_soft;
2204 const double sig_string_soft = total_string_xs - nondiffractive_hard;
2207 if (sig_string_soft > 0.) {
2208 channel_list.push_back(make_unique<CollisionBranch>(
2210 channel_list.push_back(make_unique<CollisionBranch>(
2212 channel_list.push_back(make_unique<CollisionBranch>(
2214 channel_list.push_back(make_unique<CollisionBranch>(
2216 if (can_annihilate) {
2217 channel_list.push_back(make_unique<CollisionBranch>(
2221 if (nondiffractive_hard > 0.) {
2222 channel_list.push_back(make_unique<CollisionBranch>(
2225 return channel_list;
2237 if (pdg_a == pdg_b) {
2257 xs = xs_l * (1. - prob_high) + xs_h * prob_high;
2272 }
else if ((pdg_a.is_meson() && pdg_b.
is_baryon()) ||
2273 (pdg_b.
is_meson() && pdg_a.is_baryon())) {
2279 if (pdg_a.is_meson() && pdg_b.
is_meson()) {
2286 xs *= (1. - 0.4 * pdg_a.frac_strange()) * (1. - 0.4 * pdg_b.
frac_strange());
2292 double cross_sec = 0.;
2316 const double current_xs)
const {
2320 double nnbar_xsec = std::max(0.,
ppbar_total(s) - current_xs);
2329 CollisionBranchList channel_list;
2339 if (
sqrt_s_ - 2 * type_N.mass() < 0) {
2340 return channel_list;
2348 channel_list.push_back(make_unique<CollisionBranch>(
2350 channel_list.push_back(make_unique<CollisionBranch>(
2353 return channel_list;
2357 const bool is_anti_particles)
const {
2360 CollisionBranchList process_list;
2366 ParticleTypePtrList nuc_or_anti_nuc;
2367 if (is_anti_particles) {
2378 nuc_a->charge() + nuc_b->charge()) {
2382 for (
const int twoI :
I_tot_range(*nuc_a, *nuc_b)) {
2384 type_a, type_b, *nuc_a, *nuc_b, twoI);
2391 const double matrix_element =
2393 if (matrix_element <= 0.) {
2401 const double spin_factor = (nuc_a->spin() + 1) * (nuc_b->spin() + 1);
2402 const int sym_fac_in =
2404 const int sym_fac_out =
2405 (nuc_a->iso_multiplet() == nuc_b->iso_multiplet()) ? 2 : 1;
2406 const double xsection = isospin_factor * spin_factor * sym_fac_in /
2407 sym_fac_out * p_cm_final * matrix_element /
2411 process_list.push_back(make_unique<CollisionBranch>(
2414 "2->2 absorption with original particles: ", type_a, type_b);
2419 return process_list;
2426 const double m_a = type_a.
mass();
2427 const double m_b = type_b.
mass();
2428 const double msqr = 2. * (m_a * m_a + m_b * m_b);
2438 const double uplmt = m_a + m_b + 3.0 * (w_a + w_b) + 3.0;
2439 if (sqrts > uplmt) {
2446 return 68. / std::pow(sqrts - 1.104, 1.951);
2455 }
else if (twoI == 0) {
2456 const double parametrization = 14. / msqr;
2463 return 6.5 * parametrization;
2465 return parametrization;
2478 }
else if (twoI == 0) {
2492 }
else if (twoI == 0) {
2502 (1.0 - std::exp(-(sqrts - 2.0) * 20.0));
2509 template <
class IntegrationMethod>
2511 const ParticleTypePtrList& list_res_1,
2512 const ParticleTypePtrList& list_res_2,
2513 const IntegrationMethod integrator)
const {
2517 CollisionBranchList channel_list;
2525 if (type_res_1->charge() + type_res_2->charge() !=
2531 for (
const int twoI :
I_tot_range(type_particle_a, type_particle_b)) {
2533 type_particle_a, type_particle_b, *type_res_1, *type_res_2, twoI);
2540 const double lower_limit = type_res_1->min_mass_kinematic();
2541 const double upper_limit =
sqrt_s_ - type_res_2->mass();
2545 if (upper_limit - lower_limit < 1E-3) {
2551 sqrt_s_, *type_res_1, *type_res_2, twoI);
2552 if (matrix_element <= 0.) {
2559 const double resonance_integral = integrator(*type_res_1, *type_res_2);
2564 const double spin_factor =
2565 (type_res_1->spin() + 1) * (type_res_2->spin() + 1);
2566 const double xsection = isospin_factor * spin_factor * matrix_element *
2570 channel_list.push_back(make_unique<CollisionBranch>(
2573 "Found 2->2 creation process for resonance ", type_res_1,
", ",
2576 type_particle_a, type_particle_b);
2581 return channel_list;
2585 bool use_transition_probability,
2587 bool treat_BBbar_with_strings)
const {
2590 if (!strings_switch) {
2597 const bool is_NN_scattering =
2600 const bool is_BBbar_scattering =
2608 const bool is_AQM_scattering =
2614 const double mass_sum =
2617 if (!is_NN_scattering && !is_BBbar_scattering && !is_Npi_scattering &&
2618 !is_AQM_scattering) {
2620 }
else if (is_BBbar_scattering) {
2627 const bool is_KplusP =
2639 }
else if (pdg1.
is_pion() && pdg2.is_pion()) {
2644 if (!use_transition_probability) {
2645 return static_cast<double>(
sqrt_s_ > mass_sum + aqm_offset);
2649 double region_lower, region_upper;
2650 if (is_Npi_scattering) {
2653 }
else if (is_NN_scattering) {
2659 region_lower = mass_sum + aqm_offset;
2665 }
else if (
sqrt_s_ < region_lower) {
2675 const double region_lower,
const double region_upper)
const {
2684 double x = (
sqrt_s_ - 0.5 * (region_lower + region_upper)) /
2685 (region_upper - region_lower);
2686 assert(x >= -0.5 && x <= 0.5);
2687 double prob = 0.5 * (std::sin(M_PI * x) + 1.0);
2688 assert(prob >= 0. && prob <= 1.);