102 {
103
106
107 if(particle1->isNucleon()){
110 }
111 else{
114 }
115
120
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};
125
126
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};
141
142
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};
151
152
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, ...",
162 }
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");
170 #else
171
172
173 Config
const *theConfig=
theNucleus->getStore()->getConfig();
174 std::string path;
175 if(theConfig)
176 path = theConfig->getINCLXXDataFilePath();
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');
189 #endif
190
191
192
193
194
195
196
197
198
199
200
201
202 std::vector<G4double> probabilities;
203 std::vector<std::vector<std::string>> particle_types;
206
207
209
210
211
212 const ThreeVector &rcol =
nucleon->getPosition();
213 const ThreeVector zero;
214
215
217 if(IsOnlyPion){
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()){
220 Particle *p1 =
new Particle(
PiMinus, zero, rcol);
221 Particle *p2 =
new Particle(
PiZero, zero, rcol);
222
223 list.push_back(p1);
224 list.push_back(p2);
225 }
226 else if(rdm < channels_Ratio.front() + channels_Ratio[1]){
227 Particle *p1 =
new Particle(
PiMinus, zero, rcol);
228 Particle *p2 =
new Particle(
PiZero, zero, rcol);
229 Particle *p3 =
new Particle(
PiZero, zero, rcol);
230
231 list.push_back(p1);
232 list.push_back(p2);
233 list.push_back(p3);
234 }
235 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2]){
236 Particle *p1 =
new Particle(
PiMinus, zero, rcol);
237 Particle *p2 =
new Particle(
PiZero, zero, rcol);
238 Particle *p3 =
new Particle(
PiZero, zero, rcol);
239 Particle *p4 =
new Particle(
PiZero, zero, rcol);
240
241 list.push_back(p1);
242 list.push_back(p2);
243 list.push_back(p3);
244 list.push_back(p4);
245 }
246 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3]){
247 Particle *p1 =
new Particle(
PiMinus, zero, rcol);
248 Particle *p2 =
new Particle(
PiZero, zero, rcol);
249 Particle *p3 =
new Particle(
PiZero, zero, rcol);
250 Particle *p4 =
new Particle(
PiZero, zero, rcol);
251 Particle *p5 =
new Particle(
PiZero, zero, rcol);
252
253 list.push_back(p1);
254 list.push_back(p2);
255 list.push_back(p3);
256 list.push_back(p4);
257 list.push_back(p5);
258 }
259 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4]){
260 Particle *p1 =
new Particle(
PiMinus, zero, rcol);
261 Particle *p2 =
new Particle(
PiZero, zero, rcol);
262 Particle *p3 =
new Particle(
PiZero, zero, rcol);
263 Particle *p4 =
new Particle(
PiZero, zero, rcol);
264 Particle *p5 =
new Particle(
PiZero, zero, rcol);
265 Particle *p6 =
new Particle(
PiZero, zero, rcol);
266
267 list.push_back(p1);
268 list.push_back(p2);
269 list.push_back(p3);
270 list.push_back(p4);
271 list.push_back(p5);
272 list.push_back(p6);
273 }
274 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5]){
275 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
276 Particle *p2 =
new Particle(
PiMinus, zero, rcol);
277 Particle *p3 =
new Particle(
PiMinus, zero, rcol);
278 Particle *p4 =
new Particle(
PiZero, zero, rcol);
279 Particle *p5 =
new Particle(
PiZero, zero, rcol);
280 Particle *p6 =
new Particle(
PiZero, zero, rcol);
281 Particle *p7 =
new Particle(
PiZero, zero, rcol);
282
283 list.push_back(p1);
284 list.push_back(p2);
285 list.push_back(p3);
286 list.push_back(p4);
287 list.push_back(p5);
288 list.push_back(p6);
289 list.push_back(p7);
290 }
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]){
292 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
293 Particle *p2 =
new Particle(
PiPlus, zero, rcol);
294 Particle *p3 =
new Particle(
PiMinus, zero, rcol);
295 Particle *p4 =
new Particle(
PiMinus, zero, rcol);
296 Particle *p5 =
new Particle(
PiMinus, zero, rcol);
297 Particle *p6 =
new Particle(
PiZero, zero, rcol);
298 Particle *p7 =
new Particle(
PiZero, zero, rcol);
299
300 list.push_back(p1);
301 list.push_back(p2);
302 list.push_back(p3);
303 list.push_back(p4);
304 list.push_back(p5);
305 list.push_back(p6);
306 list.push_back(p7);
307 }
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]){
309 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
310 Particle *p2 =
new Particle(
PiPlus, zero, rcol);
311 Particle *p3 =
new Particle(
PiPlus, zero, rcol);
312 Particle *p4 =
new Particle(
PiMinus, zero, rcol);
313 Particle *p5 =
new Particle(
PiMinus, zero, rcol);
314 Particle *p6 =
new Particle(
PiMinus, zero, rcol);
315 Particle *p7 =
new Particle(
PiMinus, zero, rcol);
316
317 list.push_back(p1);
318 list.push_back(p2);
319 list.push_back(p3);
320 list.push_back(p4);
321 list.push_back(p5);
322 list.push_back(p6);
323 list.push_back(p7);
324 }
325 else{
326 INCL_ERROR(
"random draw outside channels for OnlyPion annihilation (low energy)");
327 }
328 }
329 else {
331
332
334
335 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
336 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
337 Particle* p3 =
new Particle(
PiMinus, zero, rcol);
338
339 list.push_back(p1);
340 list.push_back(p2);
341 list.push_back(p3);
344
345 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
346 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
347 Particle* p3 =
new Particle(
PiZero, zero, rcol);
348 Particle* p4 =
new Particle(
PiZero, zero, rcol);
349 Particle* p5 =
new Particle(
PiMinus, zero, rcol);
350
351 list.push_back(p1);
352 list.push_back(p2);
353 list.push_back(p3);
354 list.push_back(p4);
355 list.push_back(p5);
359
360 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
361 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
362 Particle* p3 =
new Particle(
PiZero, zero, rcol);
363 Particle* p4 =
new Particle(
PiZero, zero, rcol);
364 Particle* p5 =
new Particle(
PiZero, zero, rcol);
365 Particle* p6 =
new Particle(
PiMinus, zero, rcol);
366
367 list.push_back(p1);
368 list.push_back(p2);
369 list.push_back(p3);
370 list.push_back(p4);
371 list.push_back(p5);
372 list.push_back(p6);
377
378 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
379 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
380 Particle* p3 =
new Particle(
PiZero, zero, rcol);
381 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
382
383 list.push_back(p1);
384 list.push_back(p2);
385 list.push_back(p3);
386 list.push_back(p4);
392
393 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
394 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
395 Particle* p3 =
new Particle(
PiZero, zero, rcol);
396 Particle* p4 =
new Particle(
KMinus, zero, rcol);
397 Particle* p5 =
new Particle(
KZero, zero, rcol);
398
399 list.push_back(p1);
400 list.push_back(p2);
401 list.push_back(p3);
402 list.push_back(p4);
403 list.push_back(p5);
410
411 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
412 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
413 Particle* p3 =
new Particle(
KMinus, zero, rcol);
414 Particle* p4 =
new Particle(
KZero, zero, rcol);
415
416 list.push_back(p1);
417 list.push_back(p2);
418 list.push_back(p3);
419 list.push_back(p4);
427
428 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
429 Particle* p2 =
new Particle(
PiPlus, zero, rcol);
430 Particle* p3 =
new Particle(
PiMinus, zero, rcol);
431 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
432 Particle* p5 =
new Particle(
PiMinus, zero, rcol);
433 Particle* p6 =
new Particle(
PiZero, zero, rcol);
434
435 list.push_back(p1);
436 list.push_back(p2);
437 list.push_back(p3);
438 list.push_back(p4);
439 list.push_back(p5);
440 list.push_back(p6);
449
450 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
451 Particle* p2 =
new Particle(
PiPlus, zero, rcol);
452 Particle* p3 =
new Particle(
PiMinus, zero, rcol);
453 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
454 Particle* p5 =
new Particle(
PiMinus, zero, rcol);
455
456 list.push_back(p1);
457 list.push_back(p2);
458 list.push_back(p3);
459 list.push_back(p4);
460 list.push_back(p5);
461 } else {
462
463
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;
468
470 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
471 if(particle_types[n][j] == "pi0"){
472 Particle *p =
new Particle(
PiZero, zero, rcol);
473 list.push_back(p);
474 }
475 else if(particle_types[n][j] == "pi-"){
476 Particle *p =
new Particle(
PiMinus, zero, rcol);
477 list.push_back(p);
478 }
479 else if(particle_types[n][j] == "pi+"){
480 Particle *p =
new Particle(
PiPlus, zero, rcol);
481 list.push_back(p);
482 }
483 else if(particle_types[n][j] == "omega"){
484 Particle *p =
new Particle(
Omega, zero, rcol);
485 list.push_back(p);
486 }
487 else if(particle_types[n][j] == "eta"){
488 Particle *p =
new Particle(
Eta, zero, rcol);
489 list.push_back(p);
490 }
491 else{
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;
495 }
496 }
497 }
498 }
499 else{
500 INCL_DEBUG(
"kaonic npbar final state chosen" <<
'\n');
501 sum =
read_file(dataPathnpbark, probabilities, particle_types);
502 rdm = ((1-rdm)/kaonicFSprob)*sum;
503
505 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
506 if(particle_types[n][j] == "pi0"){
507 Particle *p =
new Particle(
PiZero, zero, rcol);
508 list.push_back(p);
509 }
510 else if(particle_types[n][j] == "pi-"){
511 Particle *p =
new Particle(
PiMinus, zero, rcol);
512 list.push_back(p);
513 }
514 else if(particle_types[n][j] == "pi+"){
515 Particle *p =
new Particle(
PiPlus, zero, rcol);
516 list.push_back(p);
517 }
518 else if(particle_types[n][j] == "omega"){
519 Particle *p =
new Particle(
Omega, zero, rcol);
520 list.push_back(p);
521 }
522 else if(particle_types[n][j] == "eta"){
523 Particle *p =
new Particle(
Eta, zero, rcol);
524 list.push_back(p);
525 }
526 else if(particle_types[n][j] == "K-"){
527 Particle *p =
new Particle(
KMinus, zero, rcol);
528 list.push_back(p);
529 }
530 else if(particle_types[n][j] == "K+"){
531 Particle *p =
new Particle(
KPlus, zero, rcol);
532 list.push_back(p);
533 }
534 else if(particle_types[n][j] == "K0"){
535 Particle *p =
new Particle(
KZero, zero, rcol);
536 list.push_back(p);
537 }
538 else if(particle_types[n][j] == "K0b"){
539 Particle *p =
new Particle(
KZeroBar, zero, rcol);
540 list.push_back(p);
541 }
542 else{
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;
546 }
547 }
548 }
549 }
550 }
551 }
552 }
554 if(IsOnlyPion){
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()){
557 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
558 Particle *p2 =
new Particle(
PiZero, zero, rcol);
559
560 list.push_back(p1);
561 list.push_back(p2);
562 }
563 else if(rdm < channels_Ratio.front() + channels_Ratio[1]){
564 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
565 Particle *p2 =
new Particle(
PiZero, zero, rcol);
566 Particle *p3 =
new Particle(
PiZero, zero, rcol);
567
568 list.push_back(p1);
569 list.push_back(p2);
570 list.push_back(p3);
571 }
572 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2]){
573 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
574 Particle *p2 =
new Particle(
PiZero, zero, rcol);
575 Particle *p3 =
new Particle(
PiZero, zero, rcol);
576 Particle *p4 =
new Particle(
PiZero, zero, rcol);
577
578 list.push_back(p1);
579 list.push_back(p2);
580 list.push_back(p3);
581 list.push_back(p4);
582 }
583 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3]){
584 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
585 Particle *p2 =
new Particle(
PiZero, zero, rcol);
586 Particle *p3 =
new Particle(
PiZero, zero, rcol);
587 Particle *p4 =
new Particle(
PiZero, zero, rcol);
588 Particle *p5 =
new Particle(
PiZero, zero, rcol);
589
590 list.push_back(p1);
591 list.push_back(p2);
592 list.push_back(p3);
593 list.push_back(p4);
594 list.push_back(p5);
595 }
596 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4]){
597 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
598 Particle *p2 =
new Particle(
PiZero, zero, rcol);
599 Particle *p3 =
new Particle(
PiZero, zero, rcol);
600 Particle *p4 =
new Particle(
PiZero, zero, rcol);
601 Particle *p5 =
new Particle(
PiZero, zero, rcol);
602 Particle *p6 =
new Particle(
PiZero, zero, rcol);
603
604 list.push_back(p1);
605 list.push_back(p2);
606 list.push_back(p3);
607 list.push_back(p4);
608 list.push_back(p5);
609 list.push_back(p6);
610 }
611 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5]){
612 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
613 Particle *p2 =
new Particle(
PiMinus, zero, rcol);
614 Particle *p3 =
new Particle(
PiPlus, zero, rcol);
615 Particle *p4 =
new Particle(
PiZero, zero, rcol);
616 Particle *p5 =
new Particle(
PiZero, zero, rcol);
617 Particle *p6 =
new Particle(
PiZero, zero, rcol);
618 Particle *p7 =
new Particle(
PiZero, zero, rcol);
619
620 list.push_back(p1);
621 list.push_back(p2);
622 list.push_back(p3);
623 list.push_back(p4);
624 list.push_back(p5);
625 list.push_back(p6);
626 list.push_back(p7);
627 }
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]){
629 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
630 Particle *p2 =
new Particle(
PiPlus, zero, rcol);
631 Particle *p3 =
new Particle(
PiMinus, zero, rcol);
632 Particle *p4 =
new Particle(
PiMinus, zero, rcol);
633 Particle *p5 =
new Particle(
PiPlus, zero, rcol);
634 Particle *p6 =
new Particle(
PiZero, zero, rcol);
635 Particle *p7 =
new Particle(
PiZero, zero, rcol);
636
637 list.push_back(p1);
638 list.push_back(p2);
639 list.push_back(p3);
640 list.push_back(p4);
641 list.push_back(p5);
642 list.push_back(p6);
643 list.push_back(p7);
644 }
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]){
646 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
647 Particle *p2 =
new Particle(
PiPlus, zero, rcol);
648 Particle *p3 =
new Particle(
PiPlus, zero, rcol);
649 Particle *p4 =
new Particle(
PiMinus, zero, rcol);
650 Particle *p5 =
new Particle(
PiMinus, zero, rcol);
651 Particle *p6 =
new Particle(
PiMinus, zero, rcol);
652 Particle *p7 =
new Particle(
PiPlus, zero, rcol);
653
654 list.push_back(p1);
655 list.push_back(p2);
656 list.push_back(p3);
657 list.push_back(p4);
658 list.push_back(p5);
659 list.push_back(p6);
660 list.push_back(p7);
661 }
662 }
663 else {
664 if (plab < 1.){
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;
669
671 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
672 if(particle_types[n][j] == "pi0"){
673 Particle *p =
new Particle(
PiZero, zero, rcol);
674 list.push_back(p);
675 }
676 else if(particle_types[n][j] == "pi-"){
677 Particle *p =
new Particle(
PiMinus, zero, rcol);
678 list.push_back(p);
679 }
680 else if(particle_types[n][j] == "pi+"){
681 Particle *p =
new Particle(
PiPlus, zero, rcol);
682 list.push_back(p);
683 }
684 else if(particle_types[n][j] == "omega"){
685 Particle *p =
new Particle(
Omega, zero, rcol);
686 list.push_back(p);
687 }
688 else if(particle_types[n][j] == "eta"){
689 Particle *p =
new Particle(
Eta, zero, rcol);
690 list.push_back(p);
691 }
692 else{
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;
696 }
697 }
698 }
699 }
700 else{
701 INCL_DEBUG(
"kaonic npbar final state chosen" <<
'\n');
702 sum =
read_file(dataPathnbarpk, probabilities, particle_types);
703 rdm = ((1-rdm)/kaonicFSprob)*sum;
704
706 for(
G4int j = 0; j < static_cast<int>(particle_types[n].size()); j++){
707 if(particle_types[n][j] == "pi0"){
708 Particle *p =
new Particle(
PiZero, zero, rcol);
709 list.push_back(p);
710 }
711 else if(particle_types[n][j] == "pi-"){
712 Particle *p =
new Particle(
PiMinus, zero, rcol);
713 list.push_back(p);
714 }
715 else if(particle_types[n][j] == "pi+"){
716 Particle *p =
new Particle(
PiPlus, zero, rcol);
717 list.push_back(p);
718 }
719 else if(particle_types[n][j] == "omega"){
720 Particle *p =
new Particle(
Omega, zero, rcol);
721 list.push_back(p);
722 }
723 else if(particle_types[n][j] == "eta"){
724 Particle *p =
new Particle(
Eta, zero, rcol);
725 list.push_back(p);
726 }
727 else if(particle_types[n][j] == "K-"){
728 Particle *p =
new Particle(
KMinus, zero, rcol);
729 list.push_back(p);
730 }
731 else if(particle_types[n][j] == "K+"){
732 Particle *p =
new Particle(
KPlus, zero, rcol);
733 list.push_back(p);
734 }
735 else if(particle_types[n][j] == "K0"){
736 Particle *p =
new Particle(
KZero, zero, rcol);
737 list.push_back(p);
738 }
739 else if(particle_types[n][j] == "K0b"){
740 Particle *p =
new Particle(
KZeroBar, zero, rcol);
741 list.push_back(p);
742 }
743 else{
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;
747 }
748 }
749 }
750 }
751 }
752 else{
754
755
757
758 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
759 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
760 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
761
762 list.push_back(p1);
763 list.push_back(p2);
764 list.push_back(p3);
767
768 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
769 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
770 Particle* p3 =
new Particle(
PiZero, zero, rcol);
771 Particle* p4 =
new Particle(
PiZero, zero, rcol);
772 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
773
774 list.push_back(p1);
775 list.push_back(p2);
776 list.push_back(p3);
777 list.push_back(p4);
778 list.push_back(p5);
782
783 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
784 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
785 Particle* p3 =
new Particle(
PiZero, zero, rcol);
786 Particle* p4 =
new Particle(
PiZero, zero, rcol);
787 Particle* p5 =
new Particle(
PiZero, zero, rcol);
788 Particle* p6 =
new Particle(
PiPlus, zero, rcol);
789
790 list.push_back(p1);
791 list.push_back(p2);
792 list.push_back(p3);
793 list.push_back(p4);
794 list.push_back(p5);
795 list.push_back(p6);
800
801 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
802 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
803 Particle* p3 =
new Particle(
PiZero, zero, rcol);
804 Particle* p4 =
new Particle(
PiPlus, zero, rcol);
805
806 list.push_back(p1);
807 list.push_back(p2);
808 list.push_back(p3);
809 list.push_back(p4);
815
816 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
817 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
818 Particle* p3 =
new Particle(
PiZero, zero, rcol);
819 Particle* p4 =
new Particle(
KPlus, zero, rcol);
820 Particle* p5 =
new Particle(
KZeroBar, zero, rcol);
821
822 list.push_back(p1);
823 list.push_back(p2);
824 list.push_back(p3);
825 list.push_back(p4);
826 list.push_back(p5);
833
834 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
835 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
836 Particle* p3 =
new Particle(
KPlus, zero, rcol);
837 Particle* p4 =
new Particle(
KZeroBar, zero, rcol);
838
839 list.push_back(p1);
840 list.push_back(p2);
841 list.push_back(p3);
842 list.push_back(p4);
850
851 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
852 Particle* p2 =
new Particle(
PiPlus, zero, rcol);
853 Particle* p3 =
new Particle(
PiMinus, zero, rcol);
854 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
855 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
856 Particle* p6 =
new Particle(
PiZero, zero, rcol);
857
858 list.push_back(p1);
859 list.push_back(p2);
860 list.push_back(p3);
861 list.push_back(p4);
862 list.push_back(p5);
863 list.push_back(p6);
872
873 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
874 Particle* p2 =
new Particle(
PiPlus, zero, rcol);
875 Particle* p3 =
new Particle(
PiMinus, zero, rcol);
876 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
877 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
878
879 list.push_back(p1);
880 list.push_back(p2);
881 list.push_back(p3);
882 list.push_back(p4);
883 list.push_back(p5);
884 } else {
885
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;
890
892 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
893 if(particle_types[n][j] == "pi0"){
894 Particle *p =
new Particle(
PiZero, zero, rcol);
895 list.push_back(p);
896 }
897 else if(particle_types[n][j] == "pi-"){
898 Particle *p =
new Particle(
PiMinus, zero, rcol);
899 list.push_back(p);
900 }
901 else if(particle_types[n][j] == "pi+"){
902 Particle *p =
new Particle(
PiPlus, zero, rcol);
903 list.push_back(p);
904 }
905 else if(particle_types[n][j] == "omega"){
906 Particle *p =
new Particle(
Omega, zero, rcol);
907 list.push_back(p);
908 }
909 else if(particle_types[n][j] == "eta"){
910 Particle *p =
new Particle(
Eta, zero, rcol);
911 list.push_back(p);
912 }
913 else{
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;
917 }
918 }
919 }
920 }
921 else{
922 INCL_DEBUG(
"kaonic pnbar final state chosen" <<
'\n');
923 sum =
read_file(dataPathnbarpk, probabilities, particle_types);
924 rdm = ((1-rdm)/kaonicFSprob)*sum;
925
927 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
928 if(particle_types[n][j] == "pi0"){
929 Particle *p =
new Particle(
PiZero, zero, rcol);
930 list.push_back(p);
931 }
932 else if(particle_types[n][j] == "pi-"){
933 Particle *p =
new Particle(
PiMinus, zero, rcol);
934 list.push_back(p);
935 }
936 else if(particle_types[n][j] == "pi+"){
937 Particle *p =
new Particle(
PiPlus, zero, rcol);
938 list.push_back(p);
939 }
940 else if(particle_types[n][j] == "omega"){
941 Particle *p =
new Particle(
Omega, zero, rcol);
942 list.push_back(p);
943 }
944 else if(particle_types[n][j] == "eta"){
945 Particle *p =
new Particle(
Eta, zero, rcol);
946 list.push_back(p);
947 }
948 else if(particle_types[n][j] == "K-"){
949 Particle *p =
new Particle(
KMinus, zero, rcol);
950 list.push_back(p);
951 }
952 else if(particle_types[n][j] == "K+"){
953 Particle *p =
new Particle(
KPlus, zero, rcol);
954 list.push_back(p);
955 }
956 else if(particle_types[n][j] == "K0"){
957 Particle *p =
new Particle(
KZero, zero, rcol);
958 list.push_back(p);
959 }
960 else if(particle_types[n][j] == "K0b"){
961 Particle *p =
new Particle(
KZeroBar, zero, rcol);
962 list.push_back(p);
963 }
964 else{
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; }
968 }
969 }
970 }
971 }
972 }
973 }
974 }
975 else{
976 if(IsOnlyPion){
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()){
979 Particle *p1 =
new Particle(
PiZero, zero, rcol);
980 Particle *p2 =
new Particle(
PiZero, zero, rcol);
981
982 list.push_back(p1);
983 list.push_back(p2);
984 }
985 else if(rdm < channels_Ratio.front() + channels_Ratio[1]){
986 Particle *p1 =
new Particle(
PiZero, zero, rcol);
987 Particle *p2 =
new Particle(
PiZero, zero, rcol);
988 Particle *p3 =
new Particle(
PiZero, zero, rcol);
989
990 list.push_back(p1);
991 list.push_back(p2);
992 list.push_back(p3);
993 }
994 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2]){
995 Particle *p1 =
new Particle(
PiZero, zero, rcol);
996 Particle *p2 =
new Particle(
PiZero, zero, rcol);
997 Particle *p3 =
new Particle(
PiZero, zero, rcol);
998 Particle *p4 =
new Particle(
PiZero, zero, rcol);
999
1000 list.push_back(p1);
1001 list.push_back(p2);
1002 list.push_back(p3);
1003 list.push_back(p4);
1004 }
1005 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] ){
1006 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
1007 Particle *p2 =
new Particle(
PiMinus, zero, rcol);
1008 Particle *p3 =
new Particle(
PiZero, zero, rcol);
1009 Particle *p4 =
new Particle(
PiZero, zero, rcol);
1010
1011 list.push_back(p1);
1012 list.push_back(p2);
1013 list.push_back(p3);
1014 list.push_back(p4);
1015 }
1016 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4]){
1017 Particle *p1 =
new Particle(
PiZero, zero, rcol);
1018 Particle *p2 =
new Particle(
PiZero, zero, rcol);
1019 Particle *p3 =
new Particle(
PiZero, zero, rcol);
1020 Particle *p4 =
new Particle(
PiZero, zero, rcol);
1021 Particle *p5 =
new Particle(
PiZero, zero, rcol);
1022
1023 list.push_back(p1);
1024 list.push_back(p2);
1025 list.push_back(p3);
1026 list.push_back(p4);
1027 list.push_back(p5);
1028 }
1029 else if(rdm < channels_Ratio.front() + channels_Ratio[1] + channels_Ratio[2] + channels_Ratio[3] + channels_Ratio[4] + channels_Ratio[5]){
1030 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
1031 Particle *p2 =
new Particle(
PiMinus, zero, rcol);
1032 Particle *p3 =
new Particle(
PiZero, zero, rcol);
1033 Particle *p4 =
new Particle(
PiZero, zero, rcol);
1034 Particle *p5 =
new Particle(
PiZero, zero, rcol);
1035
1036 list.push_back(p1);
1037 list.push_back(p2);
1038 list.push_back(p3);
1039 list.push_back(p4);
1040 list.push_back(p5);
1041 }
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]){
1043 Particle *p1 =
new Particle(
PiZero, zero, rcol);
1044 Particle *p2 =
new Particle(
PiZero, zero, rcol);
1045 Particle *p3 =
new Particle(
PiZero, zero, rcol);
1046 Particle *p4 =
new Particle(
PiZero, zero, rcol);
1047 Particle *p5 =
new Particle(
PiZero, zero, rcol);
1048 Particle *p6 =
new Particle(
PiZero, zero, rcol);
1049
1050 list.push_back(p1);
1051 list.push_back(p2);
1052 list.push_back(p3);
1053 list.push_back(p4);
1054 list.push_back(p5);
1055 list.push_back(p6);
1056 }
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]){
1058 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
1059 Particle *p2 =
new Particle(
PiMinus, zero, rcol);
1060 Particle *p3 =
new Particle(
PiZero, zero, rcol);
1061 Particle *p4 =
new Particle(
PiZero, zero, rcol);
1062 Particle *p5 =
new Particle(
PiZero, zero, rcol);
1063 Particle *p6 =
new Particle(
PiZero, zero, rcol);
1064
1065 list.push_back(p1);
1066 list.push_back(p2);
1067 list.push_back(p3);
1068 list.push_back(p4);
1069 list.push_back(p5);
1070 list.push_back(p6);
1071 }
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]){
1073 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
1074 Particle *p2 =
new Particle(
PiPlus, zero, rcol);
1075 Particle *p3 =
new Particle(
PiMinus, zero, rcol);
1076 Particle *p4 =
new Particle(
PiMinus, zero, rcol);
1077 Particle *p5 =
new Particle(
PiZero, zero, rcol);
1078 Particle *p6 =
new Particle(
PiZero, zero, rcol);
1079
1080 list.push_back(p1);
1081 list.push_back(p2);
1082 list.push_back(p3);
1083 list.push_back(p4);
1084 list.push_back(p5);
1085 list.push_back(p6);
1086 }
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]){
1088 Particle *p1 =
new Particle(
PiPlus, zero, rcol);
1089 Particle *p2 =
new Particle(
PiMinus, zero, rcol);
1090 Particle *p3 =
new Particle(
PiZero, zero, rcol);
1091 Particle *p4 =
new Particle(
PiZero, zero, rcol);
1092 Particle *p5 =
new Particle(
PiZero, zero, rcol);
1093 Particle *p6 =
new Particle(
PiZero, zero, rcol);
1094 Particle *p7 =
new Particle(
PiZero, zero, rcol);
1095
1096 list.push_back(p1);
1097 list.push_back(p2);
1098 list.push_back(p3);
1099 list.push_back(p4);
1100 list.push_back(p5);
1101 list.push_back(p6);
1102 list.push_back(p7);
1103 }
1104 else{
1105 INCL_ERROR(
"random draw outside channels for OnlyPion annihilation (low energy)");
1106 }
1107 }
1108 else{
1110
1111
1113
1114 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1115 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1116
1117 list.push_back(p1);
1118 list.push_back(p2);
1119
1120
1123
1124 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1125 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1126 Particle* p3 =
new Particle(
PiZero, zero, rcol);
1127
1128 list.push_back(p1);
1129 list.push_back(p2);
1130 list.push_back(p3);
1134
1135 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1136 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1137 Particle* p3 =
new Particle(
Omega, zero, rcol);
1138
1139 list.push_back(p1);
1140 list.push_back(p2);
1141 list.push_back(p3);
1146
1147 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1148 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1149 Particle* p3 =
new Particle(
KPlus, zero, rcol);
1150 Particle* p4 =
new Particle(
KMinus, zero, rcol);
1151
1152 list.push_back(p1);
1153 list.push_back(p2);
1154 list.push_back(p3);
1155 list.push_back(p4);
1161
1162 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1163 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1164 Particle* p3 =
new Particle(
PiZero, zero, rcol);
1165 Particle* p4 =
new Particle(
KPlus, zero, rcol);
1166 Particle* p5 =
new Particle(
KMinus, zero, rcol);
1167
1168 list.push_back(p1);
1169 list.push_back(p2);
1170 list.push_back(p3);
1171 list.push_back(p4);
1172 list.push_back(p5);
1179
1180 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1181 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1182 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1183 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1184
1185 list.push_back(p1);
1186 list.push_back(p2);
1187 list.push_back(p3);
1188 list.push_back(p4);
1196
1197 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1198 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1199 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1200 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1201 Particle* p5 =
new Particle(
PiZero, zero, rcol);
1202
1203 list.push_back(p1);
1204 list.push_back(p2);
1205 list.push_back(p3);
1206 list.push_back(p4);
1207 list.push_back(p5);
1216
1217 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1218 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1219 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1220 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1221 Particle* p5 =
new Particle(
PiZero, zero, rcol);
1222 Particle* p6 =
new Particle(
PiZero, zero, rcol);
1223 Particle* p7 =
new Particle(
PiZero, zero, rcol);
1224
1225 list.push_back(p1);
1226 list.push_back(p2);
1227 list.push_back(p3);
1228 list.push_back(p4);
1229 list.push_back(p5);
1230 list.push_back(p6);
1231 list.push_back(p7);
1241
1242 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1243 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1244 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1245 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1246 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
1247 Particle* p6 =
new Particle(
PiMinus, zero, rcol);
1248
1249 list.push_back(p1);
1250 list.push_back(p2);
1251 list.push_back(p3);
1252 list.push_back(p4);
1253 list.push_back(p5);
1254 list.push_back(p6);
1265
1266 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1267 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1268 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1269 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1270 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
1271 Particle* p6 =
new Particle(
PiMinus, zero, rcol);
1272 Particle* p7 =
new Particle(
PiZero, zero, rcol);
1273
1274 list.push_back(p1);
1275 list.push_back(p2);
1276 list.push_back(p3);
1277 list.push_back(p4);
1278 list.push_back(p5);
1279 list.push_back(p6);
1280 list.push_back(p7);
1292
1293 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1294 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1295 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1296 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1297 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
1298 Particle* p6 =
new Particle(
PiMinus, zero, rcol);
1299 Particle* p7 =
new Particle(
PiZero, zero, rcol);
1300 Particle* p8 =
new Particle(
PiZero, zero, rcol);
1301
1302 list.push_back(p1);
1303 list.push_back(p2);
1304 list.push_back(p3);
1305 list.push_back(p4);
1306 list.push_back(p5);
1307 list.push_back(p6);
1308 list.push_back(p7);
1309 list.push_back(p8);
1322
1323 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1324 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1325 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1326 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1327 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
1328 Particle* p6 =
new Particle(
PiMinus, zero, rcol);
1329 Particle* p7 =
new Particle(
PiZero, zero, rcol);
1330 Particle* p8 =
new Particle(
PiZero, zero, rcol);
1331 Particle* p9 =
new Particle(
PiZero, zero, rcol);
1332
1333 list.push_back(p1);
1334 list.push_back(p2);
1335 list.push_back(p3);
1336 list.push_back(p4);
1337 list.push_back(p5);
1338 list.push_back(p6);
1339 list.push_back(p7);
1340 list.push_back(p8);
1341 list.push_back(p9);
1355
1356 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1357 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1358 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1359 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1360 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
1361 Particle* p6 =
new Particle(
PiMinus, zero, rcol);
1362 Particle* p7 =
new Particle(
PiPlus, zero, rcol);
1363 Particle* p8 =
new Particle(
PiMinus, zero, rcol);
1364
1365 list.push_back(p1);
1366 list.push_back(p2);
1367 list.push_back(p3);
1368 list.push_back(p4);
1369 list.push_back(p5);
1370 list.push_back(p6);
1371 list.push_back(p7);
1372 list.push_back(p8);
1387
1388 Particle* p1 =
new Particle(
PiPlus, zero, rcol);
1389 Particle* p2 =
new Particle(
PiMinus, zero, rcol);
1390 Particle* p3 =
new Particle(
PiPlus, zero, rcol);
1391 Particle* p4 =
new Particle(
PiMinus, zero, rcol);
1392 Particle* p5 =
new Particle(
PiPlus, zero, rcol);
1393 Particle* p6 =
new Particle(
PiMinus, zero, rcol);
1394 Particle* p7 =
new Particle(
PiPlus, zero, rcol);
1395 Particle* p8 =
new Particle(
PiMinus, zero, rcol);
1396 Particle* p9 =
new Particle(
PiZero, zero, rcol);
1397
1398 list.push_back(p1);
1399 list.push_back(p2);
1400 list.push_back(p3);
1401 list.push_back(p4);
1402 list.push_back(p5);
1403 list.push_back(p6);
1404 list.push_back(p7);
1405 list.push_back(p8);
1406 list.push_back(p9);
1407 } else {
1408
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;
1413
1415 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
1416 if(particle_types[n][j] == "pi0"){
1417 Particle *p =
new Particle(
PiZero, zero, rcol);
1418 list.push_back(p);
1419 }
1420 else if(particle_types[n][j] == "pi-"){
1421 Particle *p =
new Particle(
PiMinus, zero, rcol);
1422 list.push_back(p);
1423 }
1424 else if(particle_types[n][j] == "pi+"){
1425 Particle *p =
new Particle(
PiPlus, zero, rcol);
1426 list.push_back(p);
1427 }
1428 else if(particle_types[n][j] == "omega"){
1429 Particle *p =
new Particle(
Omega, zero, rcol);
1430 list.push_back(p);
1431 }
1432 else if(particle_types[n][j] == "eta"){
1433 Particle *p =
new Particle(
Eta, zero, rcol);
1434 list.push_back(p);
1435 }
1436 else{
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; }
1440 }
1441 }
1442 }
1443 else{
1444 INCL_DEBUG(
"kaonic pp final state chosen" <<
'\n');
1445 sum =
read_file(dataPathppbark, probabilities, particle_types);
1446 rdm = ((1-rdm)/kaonicFSprob)*sum;
1447
1449 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
1450 if(particle_types[n][j] == "pi0"){
1451 Particle *p =
new Particle(
PiZero, zero, rcol);
1452 list.push_back(p);
1453 }
1454 else if(particle_types[n][j] == "pi-"){
1455 Particle *p =
new Particle(
PiMinus, zero, rcol);
1456 list.push_back(p);
1457 }
1458 else if(particle_types[n][j] == "pi+"){
1459 Particle *p =
new Particle(
PiPlus, zero, rcol);
1460 list.push_back(p);
1461 }
1462 else if(particle_types[n][j] == "omega"){
1463 Particle *p =
new Particle(
Omega, zero, rcol);
1464 list.push_back(p);
1465 }
1466 else if(particle_types[n][j] == "eta"){
1467 Particle *p =
new Particle(
Eta, zero, rcol);
1468 list.push_back(p);
1469 }
1470 else if(particle_types[n][j] == "K-"){
1471 Particle *p =
new Particle(
KMinus, zero, rcol);
1472 list.push_back(p);
1473 }
1474 else if(particle_types[n][j] == "K+"){
1475 Particle *p =
new Particle(
KPlus, zero, rcol);
1476 list.push_back(p);
1477 }
1478 else if(particle_types[n][j] == "K0"){
1479 Particle *p =
new Particle(
KZero, zero, rcol);
1480 list.push_back(p);
1481 }
1482 else if(particle_types[n][j] == "K0b"){
1483 Particle *p =
new Particle(
KZeroBar, zero, rcol);
1484 list.push_back(p);
1485 }
1486 else{
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;
1490 }
1491 }
1492 }
1493 }
1494 }
1495 }
1496 }
1497
1498
1499
1500 nucleon->setType(list[0]->getType());
1502
1504
1505 finallist.push_back(nucleon);
1506 finallist.push_back(antinucleon);
1507
1508 if(list.size() > 2){
1509 for (
G4int i = 2; i < (
G4int)(list.size()); i++) {
1510 finallist.push_back(list[i]);
1511 }
1512 }
1513
1514 if(finallist.size()==2){
1517
1518 G4double ey=(sqrtS*sqrtS+my*my-mn*mn)/(2*sqrtS);
1519 G4double en=std::sqrt(ey*ey-my*my+mn*mn);
1522 G4double py=std::sqrt(ey*ey-my*my);
1523
1526 nucleon->setMomentum(-mom_antinucleon);
1527 }
1528 else if(finallist.size() > 2){
1530 }
1531 else{
1532 INCL_ERROR(
"less than 2 mesons in NNbar annihilation!" <<
'\n');
1533 }
1534
1535
1536 for (
G4int i = 0; i < 2; i++) {
1537 fs->addModifiedParticle(finallist[i]);
1538 }
1539 if(finallist.size()>2){
1540 for (
G4int i = 2; i < (
G4int)(list.size()); i++) {
1541 fs->addCreatedParticle(finallist[i]);
1542 }
1543 }
1544
1545
1546
1547
1548
1549
1550 }
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4int findStringNumber(G4double rdm, std::vector< G4double > yields)
G4double read_file(std::string filename, std::vector< G4double > &probabilities, std::vector< std::vector< std::string > > &particle_types)
G4double compute_xs(const std::vector< G4double > coefficients, const G4double pLab)
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
G4double momentumInLab(Particle const *const p1, Particle const *const p2)
gives the momentum in the lab frame of two particles.
void generate(const G4double sqrtS, ParticleList &particles)
Generate an event in the CM system.
ThreeVector normVector(G4double norm=1.)
G4bool antinucleon(G4int ityp)
G4bool nucleon(G4int ityp)
std::vector< Base * > ParticleList