107 if(particle1->isNucleon()){
109 antinucleon = particle2;
113 antinucleon = particle1;
118 const G4bool IsOnlyPion = (sqrtS < nucleon->getINCLMass() + antinucleon->getINCLMass());
121 const std::vector<G4double> BFMM6 = {66.098, 0.153, -4.576, -38.319, 6.625};
122 const std::vector<G4double> BFMM1 = {119.066, 6.251, -0.006, -60.046, 11.958};
123 const std::vector<G4double> BFMM471 = {108.104, 15.708, 0.832, -54.632, -6.958};
124 const std::vector<G4double> coef_nbarp_total = {1.69447, 5.26254E+08, -5.36346, -0.39766, 0.0243057};
127 const std::vector<G4double> PPbar_pip_pim = {0.637, -0.340, -0.003, -0.439, 0.144};
128 const std::vector<G4double> PPbar_pip_pim_pi0 = {-2.065, 4.893, -1.130, 1.231, -0.212};
129 const std::vector<G4double> PPbar_pip_pim_omega = {3.020, 0.425, -0.029, -3.420, 0.867};
130 const std::vector<G4double> PPbar_pip_pim_Kp_Km = {-1.295, 1.897, -0.001, -0.365, 0.044};
131 const std::vector<G4double> PPbar_pip_pim_pi0_Kp_Km = {-12.220, 12.509, -0.351, 4.682, -0.777};
132 const std::vector<G4double> PPbar_2pip_2pim = {3.547, 0.095, 0.957, -3.444, 0.685};
133 const std::vector<G4double> PPbar_2pip_2pim_pi0 = {13.044, 1.449, 0.695, -12.313, 1.627};
134 const std::vector<G4double> PPbar_2pip_2pim_3pi0 = {6.398, 0.199, -1.103, -1.271, -0.380};
135 const std::vector<G4double> PPbar_3pip_3pim = {1.490, 0.240, 0.002, -1.012, 0.134};
136 const std::vector<G4double> PPbar_3pip_3pim_pi0 = {0.286, 1.634, -1.369, 3.099, -1.294};
137 const std::vector<G4double> PPbar_3pip_3pim_2pi0 = {-11.370, 12.503, -0.680, 10.059, -2.501};
138 const std::vector<G4double> PPbar_3pip_3pim_3pi0 = {-14.732, 12.338, -0.724, 11.342, -2.224};
139 const std::vector<G4double> PPbar_4pip_4pim = {-1.574, 1.607, -0.864, 1.253, -0.276};
140 const std::vector<G4double> PPbar_4pip_4pim_pi0 = {-1.096, 0.977, -0.995, 1.007, -0.171};
143 const std::vector<G4double> NPbar_pip_2pim = {-12.116, 14.485, -0.094, -1.632, 0.882, 5.000};
144 const std::vector<G4double> NPbar_pip_2pim_2pi0 = {8.276, 5.057, 0.483, -15.864, 2.552, 7.000};
145 const std::vector<G4double> NPbar_pip_2pim_3pi0 = {-1.500, 9.574, 0.528, -11.633, -0.615, 7.000};
146 const std::vector<G4double> NPbar_pip_2pim_pi0 = {7.999, 4.135, 0.608, -14.136, 1.590, 7.000};
147 const std::vector<G4double> NPbar_pip_pim_pi0_Km_K0 = {0.083, 0.091, -1.709, 0.284, -0.107};
148 const std::vector<G4double> NPbar_pip_pim_Km_K0 = {0.003, 0.297, -0.001, -0.143, 0.052};
149 const std::vector<G4double> NPbar_2pip_3pim_pi0 = {-14.701, 22.258, -0.001, -3.094, -0.190};
150 const std::vector<G4double> NPbar_2pip_3pim = {-0.616, 4.575, -0.002, -1.921, -0.153};
154 #ifdef INCLXX_IN_GEANT4_MODE
157 ed <<
" Data missing: set environment variable G4INCLDATA\n"
158 <<
" to point to the directory containing data files needed\n"
159 <<
" by the INCL++ model" <<
G4endl;
160 G4Exception(
"G4INCLDataFile::readData()",
"inflightppbarFS.dat, ...",
164 G4String dataPathppbar(dataPath0 +
"/inflightppbarFS.dat");
165 G4String dataPathnpbar(dataPath0 +
"/inflightnpbarFS.dat");
166 G4String dataPathppbark(dataPath0 +
"/inflightppbarFSkaonic.dat");
167 G4String dataPathnpbark(dataPath0 +
"/inflightnpbarFSkaonic.dat");
168 G4String dataPathnbarp(dataPath0 +
"/inflightpnbarFS.dat");
169 G4String dataPathnbarpk(dataPath0 +
"/inflightpnbarFSkaonic.dat");
177 std::string dataPathppbar(path +
"/inflightppbarFS.dat");
178 INCL_DEBUG(
"Reading https://doi.org/10.1016/0375-9474(92)90362-N ppbar final states" << dataPathppbar <<
'\n');
179 std::string dataPathnpbar(path +
"/inflightnpbarFS.dat");
180 INCL_DEBUG(
"Reading https://doi.org/10.1016/0375-9474(92)90362-N npbar final states" << dataPathnpbar <<
'\n');
181 std::string dataPathppbark(path +
"/inflightppbarFSkaonic.dat");
182 INCL_DEBUG(
"Reading https://doi.org/10.1016/j.physrep.2005.03.002 ppbar kaonic final states" << dataPathppbark <<
'\n');
183 std::string dataPathnpbark(path +
"/inflightnpbarFSkaonic.dat");
184 INCL_DEBUG(
"Reading https://doi.org/10.1007/BF02818764 and https://link.springer.com/article/10.1007/BF02754930 npbar kaonic final states" << dataPathnpbark <<
'\n');
185 std::string dataPathnbarp(path +
"/inflightpnbarFS.dat");
186 INCL_DEBUG(
"Reading https://doi.org/10.1016/0375-9474(92)90362-N nnbar final states " << dataPathnbarp <<
'\n');
187 std::string dataPathnbarpk(path +
"/inflightpnbarFSkaonic.dat");
188 INCL_DEBUG(
"Reading https://doi.org/10.1007/BF02818764 and https://link.springer.com/article/10.1007/BF02754930 nbarp kaonic final states" << dataPathnbarpk <<
'\n');
202 std::vector<G4double> probabilities;
203 std::vector<std::vector<std::string>> particle_types;
218 const std::vector<double> channels_Ratio = {0.053, 0.258, 0.531, 0.067, 0.062, 0.007, 0.020, 0.002};
219 if(rdm < channels_Ratio.front()){
226 else if(rdm < channels_Ratio.front() + channels_Ratio[1]){
235 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2]){
246 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3]){
259 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4]){
274 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5]){
291 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5] + channels_Ratio[6]){
308 else if(rdm <= channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5] + channels_Ratio[6] + channels_Ratio[7]){
326 INCL_ERROR(
"random draw outside channels for OnlyPion annihilation (low energy)");
464 if(rdm < (1.-kaonicFSprob)){
465 INCL_DEBUG(
"pionic npbar final state chosen" <<
'\n');
466 sum =
read_file(dataPathnpbar, probabilities, particle_types);
467 rdm = (rdm/(1.-kaonicFSprob))*sum;
470 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
471 if(particle_types[n][j] ==
"pi0"){
475 else if(particle_types[n][j] ==
"pi-"){
479 else if(particle_types[n][j] ==
"pi+"){
483 else if(particle_types[n][j] ==
"omega"){
487 else if(particle_types[n][j] ==
"eta"){
492 INCL_ERROR(
"Some non-existing FS particle detected when reading pbar FS files");
493 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
494 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
500 INCL_DEBUG(
"kaonic npbar final state chosen" <<
'\n');
501 sum =
read_file(dataPathnpbark, probabilities, particle_types);
502 rdm = ((1-rdm)/kaonicFSprob)*sum;
505 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
506 if(particle_types[n][j] ==
"pi0"){
510 else if(particle_types[n][j] ==
"pi-"){
514 else if(particle_types[n][j] ==
"pi+"){
518 else if(particle_types[n][j] ==
"omega"){
522 else if(particle_types[n][j] ==
"eta"){
526 else if(particle_types[n][j] ==
"K-"){
530 else if(particle_types[n][j] ==
"K+"){
534 else if(particle_types[n][j] ==
"K0"){
538 else if(particle_types[n][j] ==
"K0b"){
543 INCL_ERROR(
"Some non-existing FS particle detected when reading pbar FS files");
544 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
545 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
555 const std::vector<G4double> channels_Ratio = {0.053, 0.258, 0.531, 0.067, 0.062, 0.007, 0.020, 0.002};
556 if(rdm < channels_Ratio.front()){
563 else if(rdm < channels_Ratio.front() + channels_Ratio[1]){
572 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2]){
583 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3]){
596 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4]){
611 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5]){
628 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5] + channels_Ratio[6]){
645 else if(rdm <= channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5] + channels_Ratio[6] + channels_Ratio[7]){
665 if(rdm < 1. - kaonicFSprob){
666 INCL_DEBUG(
"pionic pnbar final state" <<
'\n');
667 sum =
read_file(dataPathnbarp, probabilities, particle_types);
668 rdm = (rdm/(1.-kaonicFSprob))*sum;
671 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
672 if(particle_types[n][j] ==
"pi0"){
676 else if(particle_types[n][j] ==
"pi-"){
680 else if(particle_types[n][j] ==
"pi+"){
684 else if(particle_types[n][j] ==
"omega"){
688 else if(particle_types[n][j] ==
"eta"){
693 INCL_ERROR(
"Some non-existing FS particle detected when reading nbar FS files");
694 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
695 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
701 INCL_DEBUG(
"kaonic npbar final state chosen" <<
'\n');
702 sum =
read_file(dataPathnbarpk, probabilities, particle_types);
703 rdm = ((1-rdm)/kaonicFSprob)*sum;
706 for(
G4int j = 0; j < static_cast<int>(particle_types[n].size()); j++){
707 if(particle_types[n][j] ==
"pi0"){
711 else if(particle_types[n][j] ==
"pi-"){
715 else if(particle_types[n][j] ==
"pi+"){
719 else if(particle_types[n][j] ==
"omega"){
723 else if(particle_types[n][j] ==
"eta"){
727 else if(particle_types[n][j] ==
"K-"){
731 else if(particle_types[n][j] ==
"K+"){
735 else if(particle_types[n][j] ==
"K0"){
739 else if(particle_types[n][j] ==
"K0b"){
744 INCL_ERROR(
"Some non-existing FS particle detected when reading nbar FS files");
745 for(
G4int jj = 0; jj < static_cast<int>(particle_types[n].size()); jj++){
746 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
886 if(rdm < (1.-kaonicFSprob)){
887 INCL_DEBUG(
"pionic pnbar final state chosen" <<
'\n');
888 sum =
read_file(dataPathnbarp, probabilities, particle_types);
889 rdm = (rdm/(1.-kaonicFSprob))*sum;
892 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
893 if(particle_types[n][j] ==
"pi0"){
897 else if(particle_types[n][j] ==
"pi-"){
901 else if(particle_types[n][j] ==
"pi+"){
905 else if(particle_types[n][j] ==
"omega"){
909 else if(particle_types[n][j] ==
"eta"){
914 INCL_ERROR(
"Some non-existing FS particle detected when reading nbar FS files");
915 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
916 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
922 INCL_DEBUG(
"kaonic pnbar final state chosen" <<
'\n');
923 sum =
read_file(dataPathnbarpk, probabilities, particle_types);
924 rdm = ((1-rdm)/kaonicFSprob)*sum;
927 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
928 if(particle_types[n][j] ==
"pi0"){
932 else if(particle_types[n][j] ==
"pi-"){
936 else if(particle_types[n][j] ==
"pi+"){
940 else if(particle_types[n][j] ==
"omega"){
944 else if(particle_types[n][j] ==
"eta"){
948 else if(particle_types[n][j] ==
"K-"){
952 else if(particle_types[n][j] ==
"K+"){
956 else if(particle_types[n][j] ==
"K0"){
960 else if(particle_types[n][j] ==
"K0b"){
965 INCL_ERROR(
"Some non-existing FS particle detected when reading pnbar FS files");
966 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
967 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl; }
977 const std::vector<G4double> channels_Ratio = {0.0005, 0.0278, 0.0052, 0.3058, 0.0017, 0.3346, 0.0017, 0.0688, 0.2534, 0.0005};
978 if(rdm < channels_Ratio.front()){
985 else if(rdm < channels_Ratio.front() + channels_Ratio[1]){
994 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2]){
1005 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] ){
1016 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4]){
1029 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5]){
1042 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5] + channels_Ratio[6]){
1057 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5] + channels_Ratio[6] + channels_Ratio[7]){
1072 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5] + channels_Ratio[6] + channels_Ratio[7] + channels_Ratio[8]){
1087 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5] + channels_Ratio[6] + channels_Ratio[7] + channels_Ratio[8] + channels_Ratio[9]){
1105 INCL_ERROR(
"random draw outside channels for OnlyPion annihilation (low energy)");
1409 if(rdm < (1.-kaonicFSprob)){
1410 INCL_DEBUG(
"pionic pp final state chosen" <<
'\n');
1411 sum =
read_file(dataPathppbar, probabilities, particle_types);
1412 rdm = (rdm/(1.-kaonicFSprob))*sum;
1415 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
1416 if(particle_types[n][j] ==
"pi0"){
1420 else if(particle_types[n][j] ==
"pi-"){
1424 else if(particle_types[n][j] ==
"pi+"){
1428 else if(particle_types[n][j] ==
"omega"){
1432 else if(particle_types[n][j] ==
"eta"){
1437 INCL_ERROR(
"Some non-existing FS particle detected when reading pbar FS files");
1438 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
1439 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl; }
1444 INCL_DEBUG(
"kaonic pp final state chosen" <<
'\n');
1445 sum =
read_file(dataPathppbark, probabilities, particle_types);
1446 rdm = ((1-rdm)/kaonicFSprob)*sum;
1449 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
1450 if(particle_types[n][j] ==
"pi0"){
1454 else if(particle_types[n][j] ==
"pi-"){
1458 else if(particle_types[n][j] ==
"pi+"){
1462 else if(particle_types[n][j] ==
"omega"){
1466 else if(particle_types[n][j] ==
"eta"){
1470 else if(particle_types[n][j] ==
"K-"){
1474 else if(particle_types[n][j] ==
"K+"){
1478 else if(particle_types[n][j] ==
"K0"){
1482 else if(particle_types[n][j] ==
"K0b"){
1487 INCL_ERROR(
"Some non-existing FS particle detected when reading pbar FS files");
1488 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
1489 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
1500 nucleon->setType(list[0]->getType());
1501 antinucleon->setType(list[1]->getType());
1505 finallist.push_back(nucleon);
1506 finallist.push_back(antinucleon);
1508 if(list.size() > 2){
1509 for (
G4int i = 2; i < (
G4int)(list.size()); i++) {
1510 finallist.push_back(list[i]);
1514 if(finallist.size()==2){
1516 G4double my=antinucleon->getMass();
1518 G4double ey=(sqrtS*sqrtS+my*my-mn*mn)/(2*sqrtS);
1519 G4double en=std::sqrt(ey*ey-my*my+mn*mn);
1520 nucleon->setEnergy(en);
1521 antinucleon->setEnergy(ey);
1522 G4double py=std::sqrt(ey*ey-my*my);
1525 antinucleon->setMomentum(mom_antinucleon);
1526 nucleon->setMomentum(-mom_antinucleon);
1528 else if(finallist.size() > 2){
1532 INCL_ERROR(
"less than 2 mesons in NNbar annihilation!" <<
'\n');
1536 for (
G4int i = 0; i < 2; i++) {
1539 if(finallist.size()>2){
1540 for (
G4int i = 2; i < (
G4int)(list.size()); i++) {