32 double spin_factor = (c.
spin() + 1) * (d.
spin() + 1);
33 spin_factor /= (a.
spin() + 1) * (b.
spin() + 1);
34 double symmetry_factor = (1 + (a == b));
35 symmetry_factor /= (1 + (c == d));
38 return spin_factor * symmetry_factor * momentum_factor;
54 double spin_factor = (c.
spin() + 1) * (d.
spin() + 1);
55 spin_factor /= (a.
spin() + 1) * (b.
spin() + 1);
56 double symmetry_factor = (1 + (a == b));
57 symmetry_factor /= (1 + (c == d));
58 const double momentum_factor =
61 return spin_factor * symmetry_factor * momentum_factor;
77 double spin_factor = (c.
spin() + 1) * (d.
spin() + 1);
78 spin_factor /= (a.
spin() + 1) * (b.
spin() + 1);
79 double symmetry_factor = (1 + (a == b));
80 symmetry_factor /= (1 + (c == d));
81 const double momentum_factor =
84 return spin_factor * symmetry_factor * momentum_factor;
92 CollisionBranchList in_list,
double weight = 1.) {
93 main_list.reserve(main_list.size() + in_list.size());
94 for (
auto& proc : in_list) {
95 proc->set_weight(proc->weight() * weight);
96 main_list.emplace_back(std::move(proc));
102 const std::pair<FourVector, FourVector> potentials)
103 : incoming_particles_(incoming_particles),
105 potentials_(potentials),
106 is_BBbar_pair_(incoming_particles_[0].type().is_baryon() &&
107 incoming_particles_[1].type().is_baryon() &&
108 incoming_particles_[0].type().antiparticle_sign() ==
109 -incoming_particles_[1].type().antiparticle_sign()) {}
112 double elastic_parameter,
bool two_to_one_switch,
114 double low_snn_cut,
bool strings_switch,
bool use_AQM,
117 double additional_el_xs)
const {
118 CollisionBranchList process_list;
122 double p_pythia = 0.;
123 if (strings_with_probability) {
131 const bool reject_by_nucleon_elastic_cutoff =
135 if (incl_elastic && !reject_by_nucleon_elastic_cutoff) {
136 process_list.emplace_back(
137 elastic(elastic_parameter, use_AQM, additional_el_xs, scale_xs));
143 const double sig_current =
sum_xs_of(process_list);
144 const double sig_string =
145 std::max(0., scale_xs *
high_energy() - sig_current);
152 if (two_to_one_switch) {
154 const bool prevent_dprime_form =
157 (1. - p_pythia) * scale_xs);
159 if (included_2to2.any()) {
162 (1. - p_pythia) * scale_xs);
174 throw std::runtime_error(
175 "'NNbar' has to be in the list of allowed 2 to 2 processes "
176 "to enable annihilation to go through resonances");
181 process_list.emplace_back(
194 double scale_xs)
const {
195 double elastic_xs = 0.;
196 if (elast_par >= 0.) {
198 elastic_xs = elast_par;
206 return make_unique<CollisionBranch>(
212 CollisionBranchList process_list;
215 const auto& pdg_a = data_a.
pdgcode();
216 const auto& pdg_b = data_b.
pdgcode();
217 if ((pdg_a.is_nucleon() && pdg_b.is_pion()) ||
218 (pdg_b.is_nucleon() && pdg_a.is_pion())) {
227 double elastic_xs = 0.0;
235 elastic_xs =
nk_el();
239 elastic_xs =
nn_el();
247 const bool is_deuteron =
249 if (is_deuteron && pdg_other.
is_pion()) {
252 }
else if (is_deuteron && pdg_other.
is_nucleon()) {
256 }
else if (use_AQM) {
261 elastic_xs =
nn_el();
306 std::stringstream ss;
309 ss <<
"problem in CrossSections::elastic: a=" << name_a <<
" b=" << name_b
310 <<
" j_a=" << pdg_a.
spin() <<
" j_b=" << pdg_b.
spin()
311 <<
" sigma=" << sig_el <<
" s=" << s;
312 throw std::runtime_error(ss.str());
322 assert(pion != nucleon);
327 switch (nucleon.
code()) {
329 switch (pion.
code()) {
342 switch (pion.
code()) {
355 switch (pion.
code()) {
368 switch (pion.
code()) {
381 throw std::runtime_error(
382 "only the elastic cross section for proton-pion "
389 std::stringstream ss;
392 ss <<
"problem in CrossSections::elastic: a=" << name_a <<
" b=" << name_b
393 <<
" j_a=" << pdg_a.
spin() <<
" j_b=" << pdg_b.
spin()
394 <<
" sigma=" << sig_el <<
" s=" << s;
395 throw std::runtime_error(ss.str());
405 const auto pdg_nucleon = type_nucleon.
pdgcode().
code();
414 CollisionBranchList process_list;
415 switch (pdg_nucleon) {
423 type_K_p, type_Sigma_p);
434 type_K_p, type_Sigma_m);
436 sqrt_s_, type_K_z, type_Sigma_z);
438 sqrt_s_, type_K_z, type_Lambda);
453 sqrt_s_, type_K_p, type_Sigma_z);
455 sqrt_s_, type_K_z, type_Sigma_p);
458 type_K_p, type_Lambda);
474 type_K_z, type_Sigma_p);
476 sqrt_s_, type_K_p, type_Sigma_z);
478 sqrt_s_, type_K_p, type_Lambda);
486 type_K_z, type_Sigma_m);
501 sqrt_s_, type_K_z, type_Sigma_z);
503 sqrt_s_, type_K_p, type_Sigma_m);
506 type_K_z, type_Lambda);
522 type_K_m, type_Sigma_m_bar);
524 sqrt_s_, type_Kbar_z, type_Sigma_z_bar);
526 sqrt_s_, type_Kbar_z, type_Lambda_bar);
534 type_K_m, type_Sigma_p_bar);
549 sqrt_s_, type_K_m, type_Sigma_z_bar);
551 sqrt_s_, type_Kbar_z, type_Sigma_p_bar);
554 type_K_m, type_Lambda_bar);
567 type_Kbar_z, type_Sigma_m_bar);
578 type_Kbar_z, type_Sigma_p_bar);
580 sqrt_s_, type_K_m, type_Sigma_z_bar);
582 sqrt_s_, type_K_m, type_Lambda_bar);
597 sqrt_s_, type_Kbar_z, type_Sigma_z_bar);
599 sqrt_s_, type_K_m, type_Sigma_m_bar);
602 type_Kbar_z, type_Lambda_bar);
619 assert(kaon != nucleon);
624 switch (nucleon.
code()) {
626 switch (kaon.
code()) {
642 switch (kaon.
code()) {
658 switch (kaon.
code()) {
674 switch (kaon.
code()) {
690 throw std::runtime_error(
691 "elastic cross section for antinucleon-kaon "
698 std::stringstream ss;
701 ss <<
"problem in CrossSections::elastic: a=" << name_a <<
" b=" << name_b
702 <<
" j_a=" << pdg_a.
spin() <<
" j_b=" << pdg_b.
spin()
703 <<
" sigma=" << sig_el <<
" s=" << s;
704 throw std::runtime_error(ss.str());
709 const bool prevent_dprime_form)
const {
710 CollisionBranchList resonance_process_list;
721 if (type_resonance.is_stable()) {
726 if (prevent_dprime_form && type_resonance.is_dprime()) {
732 type_resonance.pdgcode() == type_particle_a.
pdgcode()) ||
734 type_resonance.pdgcode() == type_particle_b.
pdgcode())) {
738 double resonance_xsection =
formation(type_resonance, p_cm_sqr);
742 resonance_process_list.push_back(make_unique<CollisionBranch>(
746 "->", type_resonance.name(),
747 " at sqrt(s)[GeV] = ",
sqrt_s_,
748 " with xs[mb] = ", resonance_xsection);
751 return resonance_process_list;
755 double cm_momentum_sqr)
const {
759 if (type_resonance.
charge() !=
773 if (partial_width <= 0.) {
778 const double spinfactor =
779 static_cast<double>(type_resonance.
spin() + 1) /
780 ((type_particle_a.
spin() + 1) * (type_particle_b.
spin() + 1));
781 const int sym_factor =
786 return spinfactor * sym_factor * 2. * M_PI * M_PI / cm_momentum_sqr *
793 CollisionBranchList process_list;
798 const auto& pdg_a = data_a.
pdgcode();
799 const auto& pdg_b = data_b.
pdgcode();
801 if (pdg_a.is_nucleon() && pdg_b.is_nucleon() &&
802 pdg_a.antiparticle_sign() == pdg_b.antiparticle_sign()) {
804 process_list =
nn_xx(included_2to2);
812 if ((pdg_a.is_nucleon() && pdg_b.is_kaon()) ||
813 (pdg_b.is_nucleon() && pdg_a.is_kaon())) {
815 process_list =
nk_xx(included_2to2);
816 }
else if ((pdg_a.is_hyperon() && pdg_b.is_pion()) ||
817 (pdg_b.is_hyperon() && pdg_a.is_pion())) {
819 process_list =
ypi_xx(included_2to2);
820 }
else if ((pdg_a.is_Delta() && pdg_b.is_kaon()) ||
821 (pdg_b.is_Delta() && pdg_a.is_kaon())) {
829 process_list =
dn_xx(included_2to2);
835 process_list =
dpi_xx(included_2to2);
842 CollisionBranchList process_list;
856 process_list.push_back(make_unique<CollisionBranch>(
864 process_list.push_back(make_unique<CollisionBranch>(
865 type_pi, type_anti_p, type_anti_n,
880 process_list.push_back(make_unique<CollisionBranch>(
888 process_list.push_back(make_unique<CollisionBranch>(
889 type_N, type_anti_p, type_anti_n,
899 double xsection = 0.0;
905 if (is_dpi || is_dn) {
912 throw std::invalid_argument(
913 "d' (pdg: 1000010021) resonance not found in particles.txt.\nThe "
914 "resonance is required for the cross section calculation of 2->3 "
915 "scatterings involing deuterons.");
923 type_dprime, type_pi);
929 type_dprime, type_nucleus, type_N);
937 CollisionBranchList process_list;
943 if (!same_sign && !any_nucleus) {
963 CollisionBranchList process_list, channel_list;
969 bool both_antinucleons =
972 const ParticleTypePtrList& nuc_or_anti_nuc =
975 const ParticleTypePtrList& delta_or_anti_delta =
985 process_list.reserve(process_list.size() + channel_list.size());
986 std::move(channel_list.begin(), channel_list.end(),
987 std::inserter(process_list, process_list.end()));
988 channel_list.clear();
1000 process_list.reserve(process_list.size() + channel_list.size());
1001 std::move(channel_list.begin(), channel_list.end(),
1002 std::inserter(process_list, process_list.end()));
1003 channel_list.clear();
1015 if (deutron && antideutron && pim && pi0 && pip &&
1017 const ParticleTypePtrList deutron_list = {deutron};
1018 const ParticleTypePtrList antideutron_list = {antideutron};
1019 const ParticleTypePtrList pion_list = {pim, pi0, pip};
1021 (both_antinucleons ? antideutron_list : deutron_list), pion_list,
1024 return pCM(sqrts, type_res_1.
mass(), type_res_2.
mass());
1026 process_list.reserve(process_list.size() + channel_list.size());
1027 std::move(channel_list.begin(), channel_list.end(),
1028 std::inserter(process_list, process_list.end()));
1029 channel_list.clear();
1032 return process_list;
1041 const auto pdg_nucleon = type_nucleon.
pdgcode().
code();
1059 bool incl_KN_to_KDelta =
1061 sqrt_s_ < KN_to_KDelta_cutoff;
1062 bool incl_Strangeness_exchange =
1065 CollisionBranchList process_list;
1070 switch (pdg_nucleon) {
1072 if (incl_Strangeness_exchange) {
1082 sqrt_s_, type_pi_m, type_Sigma_p);
1085 sqrt_s_, type_pi_p, type_Sigma_m);
1088 type_pi_z, type_Sigma_z);
1091 type_pi_z, type_Lambda);
1093 if (incl_KN_to_KN) {
1097 sqrt_s_, type_Kbar_z, type_n);
1102 if (incl_Strangeness_exchange) {
1110 type_pi_m, type_Sigma_z);
1113 type_pi_z, type_Sigma_m);
1116 type_pi_m, type_Lambda);
1121 if (incl_KN_to_KDelta) {
1129 type_nucleon, type_kaon,
1133 sqrt_s_, type_Kbar_z, type_Delta_pp_bar);
1137 type_nucleon, type_kaon,
1138 type_K_m, type_Delta_p_bar);
1140 sqrt_s_, type_K_m, type_Delta_p_bar);
1145 if (incl_KN_to_KDelta) {
1153 type_nucleon, type_kaon,
1157 sqrt_s_, type_Kbar_z, type_Delta_p_bar);
1161 type_nucleon, type_kaon,
1162 type_K_m, type_Delta_z_bar);
1164 sqrt_s_, type_K_m, type_Delta_z_bar);
1166 if (incl_KN_to_KN) {
1170 type_Kbar_z, type_p_bar);
1180 switch (pdg_nucleon) {
1182 if (incl_KN_to_KDelta) {
1190 type_nucleon, type_kaon,
1191 type_K_z, type_Delta_pp);
1193 sqrt_s_, type_K_z, type_Delta_pp);
1197 type_nucleon, type_kaon,
1198 type_K_p, type_Delta_p);
1200 sqrt_s_, type_K_p, type_Delta_p);
1205 if (incl_KN_to_KDelta) {
1213 type_nucleon, type_kaon,
1214 type_K_z, type_Delta_p);
1216 sqrt_s_, type_K_z, type_Delta_p);
1220 type_nucleon, type_kaon,
1221 type_K_p, type_Delta_z);
1223 sqrt_s_, type_K_p, type_Delta_z);
1225 if (incl_KN_to_KN) {
1234 if (incl_Strangeness_exchange) {
1244 sqrt_s_, type_pi_p, type_Sigma_p_bar);
1247 sqrt_s_, type_pi_m, type_Sigma_m_bar);
1250 type_pi_z, type_Sigma_z_bar);
1253 type_pi_z, type_Lambda_bar);
1255 if (incl_KN_to_KN) {
1259 sqrt_s_, type_K_z, type_n_bar);
1264 if (incl_Strangeness_exchange) {
1272 type_pi_p, type_Sigma_z_bar);
1275 type_pi_z, type_Sigma_m_bar);
1278 type_pi_p, type_Lambda_bar);
1291 switch (pdg_nucleon) {
1293 if (incl_KN_to_KDelta) {
1301 type_nucleon, type_kaon,
1302 type_K_z, type_Delta_p);
1304 sqrt_s_, type_K_z, type_Delta_p);
1308 type_nucleon, type_kaon,
1309 type_K_p, type_Delta_z);
1311 sqrt_s_, type_K_p, type_Delta_z);
1313 if (incl_KN_to_KN) {
1327 if (incl_KN_to_KDelta) {
1335 type_nucleon, type_kaon,
1336 type_K_z, type_Delta_z);
1338 sqrt_s_, type_K_z, type_Delta_z);
1342 type_nucleon, type_kaon,
1343 type_K_p, type_Delta_m);
1345 sqrt_s_, type_K_p, type_Delta_m);
1350 if (incl_Strangeness_exchange) {
1358 type_pi_m, type_Sigma_z_bar);
1361 type_pi_z, type_Sigma_p_bar);
1364 type_pi_m, type_Lambda_bar);
1369 if (incl_Strangeness_exchange) {
1379 sqrt_s_, type_pi_m, type_Sigma_m_bar);
1382 sqrt_s_, type_pi_p, type_Sigma_p_bar);
1385 type_pi_z, type_Sigma_z_bar);
1388 type_pi_z, type_Lambda_bar);
1390 if (incl_KN_to_KN) {
1394 sqrt_s_, type_K_p, type_p_bar);
1402 switch (pdg_nucleon) {
1404 if (incl_Strangeness_exchange) {
1412 type_pi_z, type_Sigma_p);
1415 type_pi_p, type_Sigma_z);
1418 type_pi_p, type_Lambda);
1423 if (incl_Strangeness_exchange) {
1433 sqrt_s_, type_pi_p, type_Sigma_m);
1436 sqrt_s_, type_pi_m, type_Sigma_p);
1439 type_pi_z, type_Sigma_z);
1442 type_pi_z, type_Lambda);
1444 if (incl_KN_to_KN) {
1453 if (incl_KN_to_KDelta) {
1455 const auto& type_Kbar_z = type_kaon;
1461 type_nucleon, type_kaon,
1465 sqrt_s_, type_Kbar_z, type_Delta_bar_m);
1469 type_nucleon, type_kaon,
1470 type_K_m, type_Delta_bar_z);
1472 sqrt_s_, type_K_m, type_Delta_bar_z);
1474 if (incl_KN_to_KN) {
1483 sqrt_s_, type_K_m, type_n_bar);
1488 if (incl_KN_to_KDelta) {
1496 type_nucleon, type_kaon,
1500 sqrt_s_, type_Kbar_z, type_Delta_z_bar);
1504 type_nucleon, type_kaon,
1505 type_K_m, type_Delta_m_bar);
1507 sqrt_s_, type_K_m, type_Delta_m_bar);
1515 return process_list;
1520 CollisionBranchList process_list;
1522 return process_list;
1529 const auto pdg_delta = type_delta.
pdgcode().
code();
1537 switch (
pack(pdg_delta, pdg_kaon)) {
1548 type_p, type_K_p, type_kaon, type_delta) *
1561 type_kaon, type_p_bar,
1564 type_p_bar, type_K_m, type_kaon, type_delta) *
1567 sqrt_s_, type_p_bar, type_K_m);
1582 type_n, type_K_p, type_kaon, type_delta) *
1593 type_p, type_K_z, type_kaon, type_delta) *
1608 type_kaon, type_n_bar,
1611 type_n_bar, type_K_m, type_kaon, type_delta) *
1614 sqrt_s_, type_n_bar, type_K_m);
1619 type_kaon, type_p_bar,
1622 type_p_bar, type_Kbar_z, type_kaon, type_delta) *
1625 sqrt_s_, type_p_bar, type_Kbar_z);
1638 type_n, type_K_z, type_kaon, type_delta) *
1651 type_kaon, type_n_bar,
1654 type_n_bar, type_Kbar_z, type_kaon, type_delta) *
1657 sqrt_s_, type_n_bar, type_Kbar_z);
1664 return process_list;
1668 CollisionBranchList process_list;
1670 return process_list;
1677 const auto pdg_hyperon = type_hyperon.
pdgcode().
code();
1682 switch (
pack(pdg_hyperon, pdg_pion)) {
1689 s, type_hyperon, type_pion, type_n, type_K_m) *
1705 sqrt_s_, type_p, type_Kbar_z);
1714 type_pion, type_n_bar,
1718 sqrt_s_, type_n_bar, type_K_p);
1727 type_pion, type_p_bar,
1731 sqrt_s_, type_p_bar, type_K_z);
1740 s, type_hyperon, type_pion, type_n, type_K_m) *
1756 sqrt_s_, type_p, type_Kbar_z);
1765 type_pion, type_n_bar,
1769 sqrt_s_, type_n_bar, type_K_p);
1778 type_pion, type_p_bar,
1782 sqrt_s_, type_p_bar, type_K_z);
1791 s, type_hyperon, type_pion, type_n, type_K_m) *
1807 sqrt_s_, type_p, type_Kbar_z);
1816 type_pion, type_n_bar,
1820 sqrt_s_, type_n_bar, type_K_p);
1829 type_pion, type_p_bar,
1833 sqrt_s_, type_p_bar, type_K_z);
1844 s, type_hyperon, type_pion, type_p, type_K_m) *
1855 sqrt_s_, type_n, type_Kbar_z);
1866 type_pion, type_p_bar,
1870 sqrt_s_, type_p_bar, type_K_p);
1874 type_pion, type_n_bar,
1878 sqrt_s_, type_n_bar, type_K_z);
1889 s, type_hyperon, type_pion, type_p, type_K_m) *
1900 sqrt_s_, type_n, type_Kbar_z);
1911 type_pion, type_p_bar,
1915 sqrt_s_, type_p_bar, type_K_p);
1919 type_pion, type_n_bar,
1923 sqrt_s_, type_n_bar, type_K_z);
1934 s, type_hyperon, type_pion, type_p, type_K_m) *
1945 sqrt_s_, type_n, type_Kbar_z);
1956 type_pion, type_p_bar,
1960 sqrt_s_, type_p_bar, type_K_p);
1964 type_pion, type_n_bar,
1968 sqrt_s_, type_n_bar, type_K_z);
1979 s, type_hyperon, type_pion, type_p, type_K_m) *
1990 sqrt_s_, type_n, type_Kbar_z);
2001 type_pion, type_p_bar,
2005 sqrt_s_, type_p_bar, type_K_p);
2009 type_pion, type_n_bar,
2013 sqrt_s_, type_n_bar, type_K_z);
2020 return process_list;
2026 const double s = sqrts * sqrts;
2031 const double matrix_element =
2032 295.5 + 2.862 / (0.00283735 +
pow_int(sqrts - 2.181, 2)) +
2033 0.0672 /
pow_int(tmp, 2) - 6.61753 / tmp;
2035 const double spin_factor =
2036 (produced_nucleus->
spin() + 1) * (type_pi.
spin() + 1);
2041 double xsection = matrix_element * spin_factor / (s * cm_mom);
2045 const double resonance_integral =
2047 xsection *= resonance_integral;
2049 ", matrix element: ", matrix_element,
2050 ", cm_momentum: ", cm_mom);
2056 CollisionBranchList process_list;
2066 ParticleTypePtrList nuc = (baryon_number > 0)
2073 nuc_a->charge() + nuc_b->charge()) {
2077 for (
const int twoI :
I_tot_range(*nuc_a, *nuc_b)) {
2079 type_a, type_b, *nuc_a, *nuc_b, twoI);
2086 const double matrix_element =
2088 if (matrix_element <= 0.) {
2092 const double spin_factor = (nuc_a->spin() + 1) * (nuc_b->spin() + 1);
2093 const int sym_fac_in =
2095 const int sym_fac_out =
2096 (nuc_a->iso_multiplet() == nuc_b->iso_multiplet()) ? 2 : 1;
2097 double p_cm_final =
pCM_from_s(s, nuc_a->mass(), nuc_b->mass());
2098 const double xsection = isospin_factor * spin_factor * sym_fac_in /
2099 sym_fac_out * p_cm_final * matrix_element /
2103 process_list.push_back(make_unique<CollisionBranch>(
2106 nuc_a->name(), nuc_b->name(),
2107 " at sqrts [GeV] = ", sqrts,
2108 " with cs[mb] = ", xsection);
2120 if (is_pid_or_pidprime &&
2127 if (produced_nucleus == &type_nucleus ||
2129 produced_nucleus->baryon_number() != type_nucleus.
baryon_number()) {
2132 const double xsection =
2134 process_list.push_back(make_unique<CollisionBranch>(
2137 type_pi.
name(), produced_nucleus->name(),
2138 " at ", sqrts,
" GeV, xs[mb] = ", xsection);
2141 return process_list;
2148 const double s = sqrts * sqrts;
2149 double matrix_element = 0.0;
2157 matrix_element = 79.0474 / std::pow(tmp, 0.7897) + 654.596 * tmp;
2162 matrix_element = 342.572 / std::pow(tmp, 0.6);
2164 const double spin_factor =
2165 (produced_nucleus->
spin() + 1) * (type_N.
spin() + 1);
2169 double xsection = matrix_element * spin_factor / (s * cm_mom);
2175 const double resonance_integral =
2177 xsection *= resonance_integral;
2187 CollisionBranchList process_list;
2189 return process_list;
2195 if (produced_nucleus == &type_nucleus ||
2197 produced_nucleus->baryon_number() != type_nucleus.
baryon_number()) {
2202 process_list.push_back(make_unique<CollisionBranch>(
2205 type_N.
name(), produced_nucleus->name(),
" at ",
2206 sqrt_s_,
" GeV, xs[mb] = ", xsection);
2208 return process_list;
2212 double total_string_xs,
StringProcess* string_process,
bool use_AQM)
const {
2213 if (!string_process) {
2214 throw std::runtime_error(
"string_process should be initialized.");
2217 CollisionBranchList channel_list;
2218 if (total_string_xs <= 0.) {
2219 return channel_list;
2228 std::array<int, 2> pdgid;
2229 double AQM_factor = 1.;
2230 for (
int i = 0; i < 2; i++) {
2238 bool can_annihilate =
false;
2241 for (
int iq = 1; iq <= n_q_types; iq++) {
2242 std::array<int, 2> nquark;
2243 for (
int i = 0; i < 2; i++) {
2247 if (nquark[0] != 0 && nquark[1] != 0) {
2248 can_annihilate =
true;
2264 std::array<double, 3> xs =
2267 for (
int ip = 0; ip < 3; ip++) {
2268 xs[ip] *= AQM_factor;
2271 double single_diffr_AX = xs[0], single_diffr_XB = xs[1], double_diffr = xs[2];
2272 double single_diffr = single_diffr_AX + single_diffr_XB;
2273 double diffractive = single_diffr + double_diffr;
2279 double sig_annihilation = 0.0;
2280 if (can_annihilate) {
2286 xs_param *= AQM_factor;
2288 sig_annihilation = std::min(total_string_xs, xs_param);
2291 const double nondiffractive_all =
2292 std::max(0., total_string_xs - sig_annihilation - diffractive);
2293 diffractive = total_string_xs - sig_annihilation - nondiffractive_all;
2294 double_diffr = std::max(0., diffractive - single_diffr);
2295 const double a = (diffractive - double_diffr) / single_diffr;
2296 single_diffr_AX *= a;
2297 single_diffr_XB *= a;
2298 assert(std::abs(single_diffr_AX + single_diffr_XB + double_diffr +
2299 sig_annihilation + nondiffractive_all - total_string_xs) <
2302 double nondiffractive_soft = 0.;
2303 double nondiffractive_hard = 0.;
2304 if (nondiffractive_all > 0.) {
2309 nondiffractive_soft =
2310 nondiffractive_all * std::exp(-hard_xsec / nondiffractive_all);
2311 nondiffractive_hard = nondiffractive_all - nondiffractive_soft;
2322 const double sig_string_soft = total_string_xs - nondiffractive_hard;
2325 if (sig_string_soft > 0.) {
2326 channel_list.push_back(make_unique<CollisionBranch>(
2328 channel_list.push_back(make_unique<CollisionBranch>(
2330 channel_list.push_back(make_unique<CollisionBranch>(
2332 channel_list.push_back(make_unique<CollisionBranch>(
2334 if (can_annihilate) {
2335 channel_list.push_back(make_unique<CollisionBranch>(
2339 if (nondiffractive_hard > 0.) {
2340 channel_list.push_back(make_unique<CollisionBranch>(
2343 return channel_list;
2355 if (pdg_a == pdg_b) {
2375 xs = xs_l * (1. - prob_high) + xs_h * prob_high;
2390 }
else if ((pdg_a.is_meson() && pdg_b.
is_baryon()) ||
2391 (pdg_b.
is_meson() && pdg_a.is_baryon())) {
2397 if (pdg_a.is_meson() && pdg_b.
is_meson()) {
2404 xs *= (1. - 0.4 * pdg_a.frac_strange()) * (1. - 0.4 * pdg_b.
frac_strange());
2410 double cross_sec = 0.;
2434 const double current_xs,
const double scale_xs)
const {
2438 double nnbar_xsec = std::max(0.,
ppbar_total(s) * scale_xs - current_xs);
2447 CollisionBranchList channel_list;
2457 if (
sqrt_s_ - 2 * type_N.mass() < 0) {
2458 return channel_list;
2466 channel_list.push_back(make_unique<CollisionBranch>(
2468 channel_list.push_back(make_unique<CollisionBranch>(
2471 return channel_list;
2475 const bool is_anti_particles)
const {
2478 CollisionBranchList process_list;
2484 ParticleTypePtrList nuc_or_anti_nuc;
2485 if (is_anti_particles) {
2496 nuc_a->charge() + nuc_b->charge()) {
2500 for (
const int twoI :
I_tot_range(*nuc_a, *nuc_b)) {
2502 type_a, type_b, *nuc_a, *nuc_b, twoI);
2509 const double matrix_element =
2511 if (matrix_element <= 0.) {
2519 const double spin_factor = (nuc_a->spin() + 1) * (nuc_b->spin() + 1);
2520 const int sym_fac_in =
2522 const int sym_fac_out =
2523 (nuc_a->iso_multiplet() == nuc_b->iso_multiplet()) ? 2 : 1;
2524 const double xsection = isospin_factor * spin_factor * sym_fac_in /
2525 sym_fac_out * p_cm_final * matrix_element /
2529 process_list.push_back(make_unique<CollisionBranch>(
2532 "2->2 absorption with original particles: ", type_a, type_b);
2537 return process_list;
2544 const double m_a = type_a.
mass();
2545 const double m_b = type_b.
mass();
2546 const double msqr = 2. * (m_a * m_a + m_b * m_b);
2556 const double uplmt = m_a + m_b + 3.0 * (w_a + w_b) + 3.0;
2557 if (sqrts > uplmt) {
2564 return 68. / std::pow(sqrts - 1.104, 1.951);
2573 }
else if (twoI == 0) {
2574 const double parametrization = 14. / msqr;
2581 return 6.5 * parametrization;
2583 return parametrization;
2596 }
else if (twoI == 0) {
2610 }
else if (twoI == 0) {
2620 (1.0 - std::exp(-(sqrts - 2.0) * 20.0));
2627 template <
class IntegrationMethod>
2629 const ParticleTypePtrList& list_res_1,
2630 const ParticleTypePtrList& list_res_2,
2631 const IntegrationMethod integrator)
const {
2635 CollisionBranchList channel_list;
2643 if (type_res_1->charge() + type_res_2->charge() !=
2649 for (
const int twoI :
I_tot_range(type_particle_a, type_particle_b)) {
2651 type_particle_a, type_particle_b, *type_res_1, *type_res_2, twoI);
2658 const double lower_limit = type_res_1->min_mass_kinematic();
2659 const double upper_limit =
sqrt_s_ - type_res_2->mass();
2663 if (upper_limit - lower_limit < 1E-3) {
2669 sqrt_s_, *type_res_1, *type_res_2, twoI);
2670 if (matrix_element <= 0.) {
2677 const double resonance_integral = integrator(*type_res_1, *type_res_2);
2682 const double spin_factor =
2683 (type_res_1->spin() + 1) * (type_res_2->spin() + 1);
2684 const double xsection = isospin_factor * spin_factor * matrix_element *
2688 channel_list.push_back(make_unique<CollisionBranch>(
2691 "Found 2->2 creation process for resonance ", type_res_1,
", ",
2694 type_particle_a, type_particle_b);
2699 return channel_list;
2703 bool use_transition_probability,
2705 bool treat_BBbar_with_strings)
const {
2708 if (!strings_switch) {
2715 const bool is_NN_scattering =
2718 const bool is_BBbar_scattering =
2726 const bool is_AQM_scattering =
2732 const double mass_sum =
2735 if (!is_NN_scattering && !is_BBbar_scattering && !is_Npi_scattering &&
2736 !is_AQM_scattering) {
2738 }
else if (is_BBbar_scattering) {
2745 const bool is_KplusP =
2757 }
else if (pdg1.
is_pion() && pdg2.is_pion()) {
2762 if (!use_transition_probability) {
2763 return static_cast<double>(
sqrt_s_ > mass_sum + aqm_offset);
2767 double region_lower, region_upper;
2768 if (is_Npi_scattering) {
2771 }
else if (is_NN_scattering) {
2777 region_lower = mass_sum + aqm_offset;
2783 }
else if (
sqrt_s_ < region_lower) {
2793 const double region_lower,
const double region_upper)
const {
2802 double x = (
sqrt_s_ - 0.5 * (region_lower + region_upper)) /
2803 (region_upper - region_lower);
2804 assert(x >= -0.5 && x <= 0.5);
2805 double prob = 0.5 * (std::sin(M_PI * x) + 1.0);
2806 assert(prob >= 0. && prob <= 1.);