34#define INCLXX_IN_GEANT4_MODE 1
127 isParticle1Spectator(false),
128 isParticle2Spectator(false),
130 isStrangeProduction(false)
147 if(energyCM2 < cutNNSquared) {
148 INCL_DEBUG(
"CM energy = sqrt(" << energyCM2 <<
") MeV < std::sqrt(" << cutNNSquared
149 <<
") MeV = cutNN" <<
"; returning a NULL channel" <<
'\n');
178 if(minDist > theCrossSection) {
179 INCL_DEBUG(
"CM distance of approach is too small: " << minDist <<
">" <<
180 theCrossSection <<
"; returning a NULL channel" <<
'\n');
210 const G4double StrangenessProdCX = (NLKProductionCX + NSKProductionCX + NLKpiProductionCX + NSKpiProductionCX + NLK2piProductionCX + NSK2piProductionCX + NNKKbProductionCX + NNMissingCX)/bias_apply;
212 G4double counterweight = (1. - bias_apply * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
214 if(counterweight < 0.5) {
216 bias_apply = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
254 if(elasticCX > rChannel) {
257 INCL_DEBUG(
"NN interaction: elastic channel chosen" <<
'\n');
260 }
else if((elasticCX + deltaProductionCX) > rChannel) {
263 INCL_DEBUG(
"NN interaction: Delta channel chosen" <<
'\n');
266 }
else if(elasticCX + deltaProductionCX + onePiProductionCX > rChannel) {
269 INCL_DEBUG(
"NN interaction: one Pion channel chosen" <<
'\n');
272 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX > rChannel) {
275 INCL_DEBUG(
"NN interaction: two Pions channel chosen" <<
'\n');
278 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX > rChannel) {
281 INCL_DEBUG(
"NN interaction: three Pions channel chosen" <<
'\n');
284 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX > rChannel) {
287 INCL_DEBUG(
"NN interaction: four Pions channel chosen" <<
'\n');
290 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
291 + etaProductionCX > rChannel) {
294 INCL_DEBUG(
"NN interaction: Eta channel chosen" <<
'\n');
297 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
298 + etaProductionCX + etadeltaProductionCX > rChannel) {
301 INCL_DEBUG(
"NN interaction: Delta Eta channel chosen" <<
'\n');
304 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
305 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX > rChannel) {
308 INCL_DEBUG(
"NN interaction: Eta + one Pion channel chosen" <<
'\n');
311 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
312 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX > rChannel) {
315 INCL_DEBUG(
"NN interaction: Eta + two Pions channel chosen" <<
'\n');
318 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
319 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX > rChannel) {
322 INCL_DEBUG(
"NN interaction: Eta + three Pions channel chosen" <<
'\n');
325 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
326 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX > rChannel) {
329 INCL_DEBUG(
"NN interaction: Eta + four Pions channel chosen" <<
'\n');
332 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
333 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
334 + omegaProductionCX > rChannel) {
337 INCL_DEBUG(
"NN interaction: Omega channel chosen" <<
'\n');
340 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
341 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
342 + omegaProductionCX + omegadeltaProductionCX > rChannel) {
345 INCL_DEBUG(
"NN interaction: Delta Omega channel chosen" <<
'\n');
348 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
349 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
350 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX > rChannel) {
353 INCL_DEBUG(
"NN interaction: Omega + one Pion channel chosen" <<
'\n');
356 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
357 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
358 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX > rChannel) {
361 INCL_DEBUG(
"NN interaction: Omega + two Pions channel chosen" <<
'\n');
364 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
365 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
366 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX > rChannel) {
369 INCL_DEBUG(
"NN interaction: Omega + three Pions channel chosen" <<
'\n');
372 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
373 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
374 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX > rChannel) {
377 INCL_DEBUG(
"NN interaction: Omega + four Pions channel chosen" <<
'\n');
380 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
381 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
382 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
383 + NLKProductionCX > rChannel) {
385 isStrangeProduction =
true;
387 INCL_DEBUG(
"NN interaction: NLK channel chosen" <<
'\n');
390 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
391 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
392 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
393 + NLKProductionCX + NLKpiProductionCX > rChannel) {
395 isStrangeProduction =
true;
397 INCL_DEBUG(
"NN interaction: NLKpi channel chosen" <<
'\n');
400 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
401 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
402 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
403 + NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX > rChannel) {
405 isStrangeProduction =
true;
407 INCL_DEBUG(
"NN interaction: NLK2pi channel chosen" <<
'\n');
410 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
411 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
412 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
413 + NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX > rChannel) {
415 isStrangeProduction =
true;
417 INCL_DEBUG(
"NN interaction: NSK channel chosen" <<
'\n');
420 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
421 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
422 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
423 + NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX + NSKpiProductionCX > rChannel) {
425 isStrangeProduction =
true;
427 INCL_DEBUG(
"NN interaction: NSKpi channel chosen" <<
'\n');
430 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
431 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
432 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
433 + NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX + NSKpiProductionCX + NSK2piProductionCX > rChannel) {
435 isStrangeProduction =
true;
437 INCL_DEBUG(
"NN interaction: NSK2pi channel chosen" <<
'\n');
440 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
441 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
442 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
443 + NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX + NSKpiProductionCX + NSK2piProductionCX + NNKKbProductionCX > rChannel) {
445 isStrangeProduction =
true;
447 INCL_DEBUG(
"NN interaction: NNKKb channel chosen" <<
'\n');
450 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
451 + etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
452 + omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
453 + NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX + NSKpiProductionCX + NSK2piProductionCX + NNKKbProductionCX + NNMissingCX> rChannel) {
455 isStrangeProduction =
true;
457 INCL_DEBUG(
"NN interaction: Missing Strangeness channel chosen" <<
'\n');
461 INCL_WARN(
"inconsistency within the NN Cross Sections (sum!=inelastic)" <<
'\n');
463 INCL_WARN(
"Returning an Missing Strangeness channel" <<
'\n');
466 isStrangeProduction =
true;
468 }
else if(NNKKbProductionCX>0.) {
469 INCL_WARN(
"Returning an NNKKb channel" <<
'\n');
472 isStrangeProduction =
true;
474 }
else if(NSK2piProductionCX>0.) {
475 INCL_WARN(
"Returning an NSK2pi channel" <<
'\n');
478 isStrangeProduction =
true;
480 }
else if(NSKpiProductionCX>0.) {
481 INCL_WARN(
"Returning an NSKpi channel" <<
'\n');
484 isStrangeProduction =
true;
486 }
else if(NSKProductionCX>0.) {
487 INCL_WARN(
"Returning an NSK channel" <<
'\n');
490 isStrangeProduction =
true;
492 }
else if(NLK2piProductionCX>0.) {
493 INCL_WARN(
"Returning an NLK2pi channel" <<
'\n');
496 isStrangeProduction =
true;
498 }
else if(NLKpiProductionCX>0.) {
499 INCL_WARN(
"Returning an NLKpi channel" <<
'\n');
502 isStrangeProduction =
true;
504 }
else if(NLKProductionCX>0.) {
505 INCL_WARN(
"Returning an NLK channel" <<
'\n');
508 isStrangeProduction =
true;
510 }
else if(omegafourPiProductionCX>0.) {
511 INCL_WARN(
"Returning an Omega + four Pions channel" <<
'\n');
515 }
else if(omegathreePiProductionCX>0.) {
516 INCL_WARN(
"Returning an Omega + three Pions channel" <<
'\n');
520 }
else if(omegatwoPiProductionCX>0.) {
521 INCL_WARN(
"Returning an Omega + two Pions channel" <<
'\n');
525 }
else if(omegaonePiProductionCX>0.) {
526 INCL_WARN(
"Returning an Omega + one Pion channel" <<
'\n');
530 }
else if(omegadeltaProductionCX>0.) {
531 INCL_WARN(
"Returning an Omega + Delta channel" <<
'\n');
535 }
else if(omegaProductionCX>0.) {
536 INCL_WARN(
"Returning an Omega channel" <<
'\n');
540 }
else if(etafourPiProductionCX>0.) {
541 INCL_WARN(
"Returning an Eta + four Pions channel" <<
'\n');
545 }
else if(etathreePiProductionCX>0.) {
546 INCL_WARN(
"Returning an Eta + threev channel" <<
'\n');
550 }
else if(etatwoPiProductionCX>0.) {
551 INCL_WARN(
"Returning an Eta + two Pions channel" <<
'\n');
555 }
else if(etaonePiProductionCX>0.) {
556 INCL_WARN(
"Returning an Eta + one Pion channel" <<
'\n');
560 }
else if(etadeltaProductionCX>0.) {
561 INCL_WARN(
"Returning an Eta + Delta channel" <<
'\n');
565 }
else if(etaProductionCX>0.) {
566 INCL_WARN(
"Returning an Eta channel" <<
'\n');
570 }
else if(fourPiProductionCX>0.) {
571 INCL_WARN(
"Returning a 4pi channel" <<
'\n');
575 }
else if(threePiProductionCX>0.) {
576 INCL_WARN(
"Returning a 3pi channel" <<
'\n');
580 }
else if(twoPiProductionCX>0.) {
581 INCL_WARN(
"Returning a 2pi channel" <<
'\n');
585 }
else if(onePiProductionCX>0.) {
586 INCL_WARN(
"Returning a 1pi channel" <<
'\n');
590 }
else if(deltaProductionCX>0.) {
591 INCL_WARN(
"Returning a delta-production channel" <<
'\n');
596 INCL_WARN(
"Returning an elastic channel" <<
'\n');
615 const G4double StrangenessProdCX = (NLKProductionCX + NSKProductionCX + DeltaLKProductionCX + DeltaSKProductionCX + NNKKbProductionCX)/bias_apply;
617 G4double counterweight = (1. - bias_apply * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
619 if(counterweight < 0.5){
621 bias_apply = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
635 if(elasticCX > rChannel) {
638 INCL_DEBUG(
"NDelta interaction: elastic channel chosen" <<
'\n');
641 }
else if (elasticCX + recombinationCX > rChannel){
645 INCL_DEBUG(
"NDelta interaction: recombination channel chosen" <<
'\n');
648 }
else if (elasticCX + recombinationCX + NLKProductionCX > rChannel){
650 isStrangeProduction =
true;
652 INCL_DEBUG(
"NDelta interaction: NLK channel chosen" <<
'\n');
655 }
else if (elasticCX + recombinationCX + NLKProductionCX + NSKProductionCX > rChannel){
657 isStrangeProduction =
true;
659 INCL_DEBUG(
"NDelta interaction: NSK channel chosen" <<
'\n');
662 }
else if (elasticCX + recombinationCX + NLKProductionCX + NSKProductionCX + DeltaLKProductionCX > rChannel){
664 isStrangeProduction =
true;
666 INCL_DEBUG(
"NDelta interaction: DeltaLK channel chosen" <<
'\n');
669 }
else if (elasticCX + recombinationCX + NLKProductionCX + NSKProductionCX + DeltaLKProductionCX + DeltaSKProductionCX > rChannel){
671 isStrangeProduction =
true;
673 INCL_DEBUG(
"NDelta interaction: DeltaSK channel chosen" <<
'\n');
676 }
else if (elasticCX + recombinationCX + NLKProductionCX + NSKProductionCX + DeltaLKProductionCX + DeltaSKProductionCX + NNKKbProductionCX > rChannel){
678 isStrangeProduction =
true;
680 INCL_DEBUG(
"NDelta interaction: NNKKb channel chosen" <<
'\n');
685 INCL_ERROR(
"rChannel > (StrangenessProdCX + UnStrangeProdCX) in NDelta interaction: return an elastic channel" <<
'\n');
694 INCL_DEBUG(
"DeltaDelta interaction: elastic channel chosen" <<
'\n');
712 const G4double StrangenessProdCX = (LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX + NKKbProdCX + MissingCX)/bias_apply;
714 G4double counterweight = (1. - bias_apply * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
716 if(counterweight < 0.5) {
718 bias_apply = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
744 if(elasticCX > rChannel) {
747 INCL_DEBUG(
"PiN interaction: elastic channel chosen" <<
'\n');
750 }
else if(elasticCX + deltaProductionCX > rChannel) {
753 INCL_DEBUG(
"PiN interaction: Delta channel chosen" <<
'\n');
756 }
else if(elasticCX + deltaProductionCX + onePiProductionCX > rChannel) {
759 INCL_DEBUG(
"PiN interaction: one Pion channel chosen" <<
'\n');
762 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX > rChannel) {
765 INCL_DEBUG(
"PiN interaction: two Pions channel chosen" <<
'\n');
768 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX > rChannel) {
771 INCL_DEBUG(
"PiN interaction: three Pions channel chosen" <<
'\n');
774 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX > rChannel) {
777 INCL_DEBUG(
"PiN interaction: Eta channel chosen" <<
'\n');
780 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX > rChannel) {
783 INCL_DEBUG(
"PiN interaction: Omega channel chosen" <<
'\n');
786 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
787 + LKProdCX > rChannel) {
789 isStrangeProduction =
true;
791 INCL_DEBUG(
"PiN interaction: LK channel chosen" <<
'\n');
794 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
795 + LKProdCX + SKProdCX > rChannel) {
797 isStrangeProduction =
true;
799 INCL_DEBUG(
"PiN interaction: SK channel chosen" <<
'\n');
802 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
803 + LKProdCX + SKProdCX + LKpiProdCX > rChannel) {
805 isStrangeProduction =
true;
807 INCL_DEBUG(
"PiN interaction: LKpi channel chosen" <<
'\n');
810 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
811 + LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX > rChannel) {
813 isStrangeProduction =
true;
815 INCL_DEBUG(
"PiN interaction: SKpi channel chosen" <<
'\n');
818 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
819 + LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX > rChannel) {
821 isStrangeProduction =
true;
823 INCL_DEBUG(
"PiN interaction: LK2pi channel chosen" <<
'\n');
826 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
827 + LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX > rChannel) {
829 isStrangeProduction =
true;
831 INCL_DEBUG(
"PiN interaction: SK2pi channel chosen" <<
'\n');
834 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
835 + LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX + NKKbProdCX > rChannel) {
837 isStrangeProduction =
true;
839 INCL_DEBUG(
"PiN interaction: NKKb channel chosen" <<
'\n');
842 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
843 + LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX + NKKbProdCX + MissingCX> rChannel) {
845 isStrangeProduction =
true;
847 INCL_DEBUG(
"PiN interaction: Missinge Strangeness channel chosen" <<
'\n');
852 INCL_WARN(
"inconsistency within the PiN Cross Sections (sum!=inelastic)" <<
'\n');
854 INCL_WARN(
"Returning a Missinge Strangeness channel" <<
'\n');
857 isStrangeProduction =
true;
859 }
else if(NKKbProdCX>0.) {
860 INCL_WARN(
"Returning a NKKb channel" <<
'\n');
863 isStrangeProduction =
true;
865 }
else if(SK2piProdCX>0.) {
866 INCL_WARN(
"Returning a SK2pi channel" <<
'\n');
869 isStrangeProduction =
true;
871 }
else if(LK2piProdCX>0.) {
872 INCL_WARN(
"Returning a LK2pi channel" <<
'\n');
875 isStrangeProduction =
true;
877 }
else if(SKpiProdCX>0.) {
878 INCL_WARN(
"Returning a SKpi channel" <<
'\n');
881 isStrangeProduction =
true;
883 }
else if(LKpiProdCX>0.) {
884 INCL_WARN(
"Returning a LKpi channel" <<
'\n');
887 isStrangeProduction =
true;
889 }
else if(SKProdCX>0.) {
890 INCL_WARN(
"Returning a SK channel" <<
'\n');
893 isStrangeProduction =
true;
895 }
else if(LKProdCX>0.) {
896 INCL_WARN(
"Returning a LK channel" <<
'\n');
899 isStrangeProduction =
true;
901 }
else if(omegaProductionCX>0.) {
902 INCL_WARN(
"Returning a Omega channel" <<
'\n');
906 }
else if(etaProductionCX>0.) {
907 INCL_WARN(
"Returning a Eta channel" <<
'\n');
911 }
else if(threePiProductionCX>0.) {
912 INCL_WARN(
"Returning a 3pi channel" <<
'\n');
916 }
else if(twoPiProductionCX>0.) {
917 INCL_WARN(
"Returning a 2pi channel" <<
'\n');
921 }
else if(onePiProductionCX>0.) {
922 INCL_WARN(
"Returning a 1pi channel" <<
'\n');
926 }
else if(deltaProductionCX>0.) {
927 INCL_WARN(
"Returning a delta-production channel" <<
'\n');
932 INCL_WARN(
"Returning an elastic channel" <<
'\n');
949 if(elasticCX > rChannel) {
952 INCL_DEBUG(
"EtaN interaction: elastic channel chosen" <<
'\n');
954 }
else if(elasticCX + onePiProductionCX > rChannel) {
957 INCL_DEBUG(
"EtaN interaction: PiN channel chosen" <<
'\n');
959 }
else if(elasticCX + onePiProductionCX + twoPiProductionCX > rChannel) {
962 INCL_DEBUG(
"EtaN interaction: PiPiN channel chosen" <<
'\n');
967 INCL_WARN(
"inconsistency within the EtaN Cross Sections (sum!=inelastic)" <<
'\n');
968 if(twoPiProductionCX>0.) {
969 INCL_WARN(
"Returning a PiPiN channel" <<
'\n');
972 }
else if(onePiProductionCX>0.) {
973 INCL_WARN(
"Returning a PiN channel" <<
'\n');
977 INCL_WARN(
"Returning an elastic channel" <<
'\n');
994 if(elasticCX > rChannel) {
997 INCL_DEBUG(
"OmegaN interaction: elastic channel chosen" <<
'\n');
999 }
else if(elasticCX + onePiProductionCX > rChannel) {
1002 INCL_DEBUG(
"OmegaN interaction: PiN channel chosen" <<
'\n');
1004 }
else if(elasticCX + onePiProductionCX + twoPiProductionCX > rChannel) {
1007 INCL_DEBUG(
"OmegaN interaction: PiPiN channel chosen" <<
'\n');
1011 INCL_WARN(
"inconsistency within the OmegaN Cross Sections (sum!=inelastic)" <<
'\n');
1012 if(twoPiProductionCX>0.) {
1013 INCL_WARN(
"Returning a PiPiN channel" <<
'\n');
1016 }
else if(onePiProductionCX>0.) {
1017 INCL_WARN(
"Returning a PiN channel" <<
'\n');
1021 INCL_WARN(
"Returning an elastic channel" <<
'\n');
1036 if(elasticCX > rChannel){
1039 INCL_DEBUG(
"KN interaction: elastic channel chosen" <<
'\n');
1041 }
else if(elasticCX + quasielasticCX > rChannel){
1044 INCL_DEBUG(
"KN interaction: quasi-elastic channel chosen" <<
'\n');
1046 }
else if(elasticCX + quasielasticCX + NKToNKpiCX > rChannel){
1049 INCL_DEBUG(
"KN interaction: NKpi channel chosen" <<
'\n');
1051 }
else if(elasticCX + quasielasticCX + NKToNKpiCX + NKToNK2piCX > rChannel){
1054 INCL_DEBUG(
"KN interaction: NK2pi channel chosen" <<
'\n');
1057 INCL_WARN(
"inconsistency within the KN Cross Sections (sum!=inelastic)" <<
'\n');
1058 if(NKToNK2piCX>0.) {
1059 INCL_WARN(
"Returning a NKToNK2pi channel" <<
'\n');
1062 }
else if(NKToNKpiCX>0.) {
1063 INCL_WARN(
"Returning a NKToNKpi channel" <<
'\n');
1066 }
else if(quasielasticCX>0.) {
1067 INCL_WARN(
"Returning a quasi-elastic channel" <<
'\n');
1071 INCL_WARN(
"Returning an elastic channel" <<
'\n');
1090 if(elasticCX > rChannel){
1093 INCL_DEBUG(
"KbN interaction: elastic channel chosen" <<
'\n');
1095 }
else if(elasticCX + quasielasticCX > rChannel){
1098 INCL_DEBUG(
"KbN interaction: quasi-elastic channel chosen" <<
'\n');
1100 }
else if(elasticCX + quasielasticCX + NKbToNKbpiCX > rChannel){
1103 INCL_DEBUG(
"KbN interaction: NKbpi channel chosen" <<
'\n');
1105 }
else if(elasticCX + quasielasticCX + NKbToNKbpiCX + NKbToNKb2piCX > rChannel){
1108 INCL_DEBUG(
"KbN interaction: NKb2pi channel chosen" <<
'\n');
1110 }
else if(elasticCX + quasielasticCX + NKbToNKbpiCX + NKbToNKb2piCX + NKbToLpiCX > rChannel){
1113 INCL_DEBUG(
"KbN interaction: Lpi channel chosen" <<
'\n');
1115 }
else if(elasticCX + quasielasticCX + NKbToNKbpiCX + NKbToNKb2piCX + NKbToLpiCX + NKbToL2piCX > rChannel){
1118 INCL_DEBUG(
"KbN interaction: L2pi channel chosen" <<
'\n');
1120 }
else if(elasticCX + quasielasticCX + NKbToNKbpiCX + NKbToNKb2piCX + NKbToLpiCX + NKbToL2piCX + NKbToSpiCX > rChannel){
1123 INCL_DEBUG(
"KbN interaction: Spi channel chosen" <<
'\n');
1125 }
else if(elasticCX + quasielasticCX + NKbToNKbpiCX + NKbToNKb2piCX + NKbToLpiCX + NKbToL2piCX + NKbToSpiCX + NKbToS2piCX > rChannel){
1128 INCL_DEBUG(
"KbN interaction: S2pi channel chosen" <<
'\n');
1131 INCL_WARN(
"inconsistency within the KbN Cross Sections (sum!=inelastic)" <<
'\n');
1132 if(NKbToS2piCX>0.) {
1133 INCL_WARN(
"Returning a NKbToS2pi channel" <<
'\n');
1136 }
else if(NKbToSpiCX>0.) {
1137 INCL_WARN(
"Returning a NKbToSpi channel" <<
'\n');
1140 }
else if(NKbToL2piCX>0.) {
1141 INCL_WARN(
"Returning a NKbToL2pi channel" <<
'\n');
1144 }
else if(NKbToLpiCX>0.) {
1145 INCL_WARN(
"Returning a NKbToLpi channel" <<
'\n');
1148 }
else if(NKbToNKb2piCX>0.) {
1149 INCL_WARN(
"Returning a NKbToNKb2pi channel" <<
'\n');
1152 }
else if(NKbToNKbpiCX>0.) {
1153 INCL_WARN(
"Returning a NKbToNKbpi channel" <<
'\n');
1156 }
else if(quasielasticCX>0.) {
1157 INCL_WARN(
"Returning a quasi-elastic channel" <<
'\n');
1161 INCL_WARN(
"Returning an elastic channel" <<
'\n');
1174 if(elasticCX > rChannel){
1177 INCL_DEBUG(
"NLambda interaction: elastic channel chosen" <<
'\n');
1179 }
else if(elasticCX + NLToNSCX > rChannel){
1182 INCL_DEBUG(
"NLambda interaction: quasi-elastic channel chosen" <<
'\n');
1185 INCL_WARN(
"inconsistency within the NLambda Cross Sections (sum!=inelastic)" <<
'\n');
1187 INCL_WARN(
"Returning a quasi-elastic channel" <<
'\n');
1191 INCL_WARN(
"Returning an elastic channel" <<
'\n');
1205 if(elasticCX > rChannel){
1208 INCL_DEBUG(
"NSigma interaction: elastic channel chosen" <<
'\n');
1210 }
else if(elasticCX + NSToNLCX > rChannel){
1213 INCL_DEBUG(
"NSigma interaction: NLambda channel chosen" <<
'\n');
1215 }
else if(elasticCX + NSToNLCX + NSToNSCX > rChannel){
1218 INCL_DEBUG(
"NSigma interaction: NSigma quasi-elastic channel chosen" <<
'\n');
1221 INCL_WARN(
"inconsistency within the NSigma Cross Sections (sum!=inelastic)" <<
'\n');
1223 INCL_WARN(
"Returning a quasi-elastic channel" <<
'\n');
1226 }
else if(NSToNLCX>0.) {
1227 INCL_WARN(
"Returning a NLambda channel" <<
'\n');
1231 INCL_WARN(
"Returning an elastic channel" <<
'\n');
1239 INCL_DEBUG(
"BinaryCollisionAvatar can only handle nucleons (for the moment)."
1282 if((isParticle1Spectator && isParticle2Spectator) || (!isParticle1Spectator && !isParticle2Spectator)) {
1283 INCL_ERROR(
"First collision must be within a target spectator and a non-target spectator");
1285 if(isParticle1Spectator) {
1301 std::stringstream ss;
1302 ss <<
"(avatar " <<
theTime <<
" 'nn-collision" <<
'\n'
Delta-nucleon recombination channel.
virtual ~BinaryCollisionAvatar()
G4INCL::IChannel * getChannel()
virtual void postInteraction(FinalState *)
BinaryCollisionAvatar(G4double, G4double, G4INCL::Nucleus *, G4INCL::Particle *, G4INCL::Particle *)
virtual void preInteraction()
void setFirstCollisionSpectatorMomentum(const G4double x)
void setFirstCollisionXSec(const G4double x)
void incrementAcceptedCollisions()
void setFirstCollisionTime(const G4double t)
G4double getCurrentTime() const
G4int getAcceptedCollisions() const
void setFirstCollisionSpectatorPosition(const G4double x)
void incrementBlockedCollisions()
void setFirstCollisionIsElastic(const G4bool e)
FinalStateValidity getValidity() const
void setType(AvatarType t)
void restoreParticles() const
Restore the state of both particles.
static G4ThreadLocal Particle * backupParticle2
void postInteraction(FinalState *)
static G4ThreadLocal Particle * backupParticle1
G4bool isLambda() const
Is this a Lambda?
void setNumberOfKaon(const G4int NK)
G4bool isOmega() const
Is this an omega?
G4bool isSigma() const
Is this a Sigma?
const G4INCL::ThreeVector & getPosition() const
G4bool isTargetSpectator() const
static std::vector< G4int > MergeVectorBias(Particle const *const p1, Particle const *const p2)
G4bool isEta() const
Is this an eta?
G4bool isAntiKaon() const
Is this an antiKaon?
const G4INCL::ThreeVector & getMomentum() const
G4bool isKaon() const
Is this a Kaon?
G4int getNumberOfKaon() const
Number of Kaon inside de nucleus.
std::string print() const
G4bool isDelta() const
Is it a Delta?
static G4double getBiasFromVector(std::vector< G4int > VectorBias)
G4double dot(const ThreeVector &v) const
G4double NSToNL(Particle const *const p1, Particle const *const p2)
G4double NNToNNKKb(Particle const *const p1, Particle const *const p2)
G4double elastic(Particle const *const p1, Particle const *const p2)
G4double NpiToSK(Particle const *const p1, Particle const *const p2)
G4double piNToOmegaN(Particle const *const p1, Particle const *const p2)
G4double NKbToNKb2pi(Particle const *const p1, Particle const *const p2)
G4double NNToNDeltaOmega(Particle const *const p1, Particle const *const p2)
G4double NDeltaToDeltaLK(Particle const *const p1, Particle const *const p2)
G4double NNToNSKpi(Particle const *const p1, Particle const *const p2)
G4double etaNToPiN(Particle const *const p1, Particle const *const p2)
G4double NDeltaToNNKKb(Particle const *const p1, Particle const *const p2)
G4double NKbToLpi(Particle const *const p1, Particle const *const p2)
G4double NNToNLK2pi(Particle const *const p1, Particle const *const p2)
G4double etaNToPiPiN(Particle const *const p1, Particle const *const p2)
G4double NKbToS2pi(Particle const *const p1, Particle const *const p2)
G4double piNToEtaN(Particle const *const p1, Particle const *const p2)
G4double omegaNToPiN(Particle const *const p1, Particle const *const p2)
G4double NDeltaToNSK(Particle const *const p1, Particle const *const p2)
G4double NKbToSpi(Particle const *const p1, Particle const *const p2)
G4double NNToNDelta(Particle const *const p1, Particle const *const p2)
G4double NNToNSK(Particle const *const p1, Particle const *const p2)
G4double NDeltaToNLK(Particle const *const p1, Particle const *const p2)
G4double NLToNS(Particle const *const p1, Particle const *const p2)
G4double piNToDelta(Particle const *const p1, Particle const *const p2)
G4double NKbToNKb(Particle const *const p1, Particle const *const p2)
G4double NNToNSK2pi(Particle const *const p1, Particle const *const p2)
G4double NNToNLK(Particle const *const p1, Particle const *const p2)
Strange cross sections.
G4double NNToNNEtaExclu(Particle const *const p1, Particle const *const p2)
G4double NNToNDeltaEta(Particle const *const p1, Particle const *const p2)
G4double NNToNNOmegaxPi(const G4int xpi, Particle const *const p1, Particle const *const p2)
G4double NNToNNEtaxPi(const G4int xpi, Particle const *const p1, Particle const *const p2)
G4double NSToNS(Particle const *const p1, Particle const *const p2)
G4double NpiToNKKb(Particle const *const p1, Particle const *const p2)
G4double NpiToLK2pi(Particle const *const p1, Particle const *const p2)
G4double omegaNToPiPiN(Particle const *const p1, Particle const *const p2)
G4double NDeltaToDeltaSK(Particle const *const p1, Particle const *const p2)
G4double NpiToMissingStrangeness(Particle const *const p1, Particle const *const p2)
G4double total(Particle const *const p1, Particle const *const p2)
G4double NDeltaToNN(Particle const *const p1, Particle const *const p2)
G4double NpiToLKpi(Particle const *const p1, Particle const *const p2)
G4double NKbToNKbpi(Particle const *const p1, Particle const *const p2)
G4double NNToNLKpi(Particle const *const p1, Particle const *const p2)
G4double NKbToL2pi(Particle const *const p1, Particle const *const p2)
G4double NNToxPiNN(const G4int xpi, Particle const *const p1, Particle const *const p2)
G4double NKToNK2pi(Particle const *const p1, Particle const *const p2)
G4double NKToNKpi(Particle const *const p1, Particle const *const p2)
G4double NNToNNOmegaExclu(Particle const *const p1, Particle const *const p2)
G4double NpiToSK2pi(Particle const *const p1, Particle const *const p2)
G4double NKToNK(Particle const *const p1, Particle const *const p2)
G4double NNToMissingStrangeness(Particle const *const p1, Particle const *const p2)
G4double piNToxPiN(const G4int xpi, Particle const *const p1, Particle const *const p2)
G4double NpiToLK(Particle const *const p1, Particle const *const p2)
G4double NpiToSKpi(Particle const *const p1, Particle const *const p2)
G4double squareTotalEnergyInCM(Particle const *const p1, Particle const *const p2)