382{
383#ifdef debugPrecoInt
385 G4cout<<
"Projectile A and Z (and numberOfLambdas) "<<theProjectileNucleus->
GetMassNumber()<<
" "
386 <<theProjectileNucleus->
GetCharge()<<
" ("
391 G4cout<<
"Directly produced particles number "<<theSecondaries->size()<<
G4endl;
394#endif
395
396
399
400 G4int numberOfEx = 0;
401 G4int numberOfCh = 0;
402 G4int numberOfHoles = 0;
406
407
410 while(theCurrentNucleon)
411 {
413 ++numberOfHoles;
414 ++numberOfEx;
415 --anA;
417 eplus + 0.1);
420 }
422 }
423
424#ifdef debugPrecoInt
425 G4cout<<
"Residual Target A Z (numberOfLambdas) E* 4mom "<<anA<<
" "<<aZ<<
" (0"
426 <<
") "<<exEnergy<<
" "<<Target4Momentum<<
G4endl;
427#endif
428
429
430
431 G4bool ProjectileIsAntiNucleus=
433
435
439 G4int numberOfExB = 0;
440 G4int numberOfChB = 0;
441 G4int numberOfHolesB = 0;
445
446
447 theCurrentNucleon =
449 while(theCurrentNucleon)
450 {
452 ++numberOfHolesB;
453 ++numberOfExB;
454 --anAb;
455 if(!ProjectileIsAntiNucleus) {
457 eplus + 0.1);
459 } else {
461 eplus - 0.1);
463 }
465 Projectile4Momentum -=theCurrentNucleon->
Get4Momentum();
466 }
468 }
469
471 0.3*
G4double (numberOfHoles + anA);
473 0.3*
G4double (numberOfHolesB + anAb);
474
475#ifdef debugPrecoInt
476 G4cout<<
"Projectile residual A Z (numberOfLambdas) E* 4mom "<<anAb<<
" "<<aZb<<
" ("<<aLb
477 <<
") "<<exEnergyB<<
" "<<Projectile4Momentum<<
G4endl;
478 G4cout<<
" ExistTargetRemnant ExistProjectileRemnant "
479 <<ExistTargetRemnant<<
" "<< ExistProjectileRemnant<<
G4endl;
480#endif
481
482
485
487
488 #ifdef debugPrecoInt
489 G4cout<<
"Secondary stable particles number "<<theSecondaries->size()<<
G4endl;
490 #endif
491
492#ifdef debugPrecoInt
495#endif
496
497
498
499
500
501
502
503
504
505 G4KineticTrackVector::iterator iter;
506 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
507 {
510
511 if( part != proton && part != neutron &&
512 (part != ANTIproton && ProjectileIsAntiNucleus) &&
513 (part != ANTIneutron && ProjectileIsAntiNucleus) )
514 {
521 theTotalResult->push_back(theNew);
522#ifdef debugPrecoInt
523 SecondrNum++;
524 secondary4Momemtum += (*iter)->Get4Momentum();
525 G4cout<<
"Secondary "<<SecondrNum<<
" "
528
529#endif
530 delete (*iter);
531 continue;
532 }
533
534 G4bool CanBeCapturedByTarget =
false;
535 if( part == proton || part == neutron)
536 {
537 CanBeCapturedByTarget = ExistTargetRemnant &&
539 (aTrack4Momentum + Target4Momentum).mag() -
540 aTrack4Momentum.
mag() - Target4Momentum.mag()) &&
541 ((*iter)->GetPosition().mag() < R);
542 }
543
546
547 G4bool CanBeCapturedByProjectile =
false;
548
549 if( !ProjectileIsAntiNucleus &&
550 ( part == proton || part == neutron))
551 {
552 CanBeCapturedByProjectile = ExistProjectileRemnant &&
554 (aTrack4Momentum + Projectile4Momentum).mag() -
555 aTrack4Momentum.
mag() - Projectile4Momentum.mag()) &&
557 }
558
559 if( ProjectileIsAntiNucleus &&
560 ( part == ANTIproton || part == ANTIneutron))
561 {
562 CanBeCapturedByProjectile = ExistProjectileRemnant &&
564 (aTrack4Momentum + Projectile4Momentum).mag() -
565 aTrack4Momentum.
mag() - Projectile4Momentum.mag()) &&
567 }
568
569 if(CanBeCapturedByTarget && CanBeCapturedByProjectile)
570 {
572 { CanBeCapturedByTarget = true; CanBeCapturedByProjectile = false;}
573 else
574 { CanBeCapturedByTarget = false; CanBeCapturedByProjectile = true;}
575 }
576
577 if(CanBeCapturedByTarget)
578 {
579
580
581
582#ifdef debugPrecoInt
584 <<aTrack4Momentum<<
" "<<aTrack4Momentum.
mag()<<
G4endl;
585#endif
586 ++anA;
587 ++numberOfEx;
591 Target4Momentum +=aTrack4Momentum;
592 delete (*iter);
593 } else if(CanBeCapturedByProjectile)
594 {
595
596
597
598#ifdef debugPrecoInt
600 <<aTrack4Momentum<<
" "<<aTrack4Momentum.
mag()<<
G4endl;
601#endif
602 ++anAb;
603 ++numberOfExB;
605 if( ProjectileIsAntiNucleus )
Z=-
Z;
608 Projectile4Momentum +=aTrack4Momentum;
609 delete (*iter);
610 } else
611 {
618 theTotalResult->push_back(theNew);
619
620#ifdef debugPrecoInt
621 SecondrNum++;
622 secondary4Momemtum += (*iter)->Get4Momentum();
623
624
625
626
627
628#endif
629 delete (*iter);
630 continue;
631 }
632 }
633 delete theSecondaries;
634
635
636 #ifdef debugPrecoInt
637 G4cout<<
"Final target residual A Z (numberOfLambdas) E* 4mom "<<anA<<
" "<<aZ<<
" (0"
638 <<
") "<<exEnergy<<
" "<<Target4Momentum<<
G4endl;
639 #endif
640
641 if(0!=anA )
642 {
643
645
647 {Target4Momentum.setE(fMass);}
648
649 G4double RemnMass=Target4Momentum.mag();
650
651 if(RemnMass < fMass)
652 {
653 RemnMass=fMass + exEnergy;
654 Target4Momentum.setE(std::sqrt(Target4Momentum.vect().mag2() +
655 RemnMass*RemnMass));
656 } else
657 { exEnergy=RemnMass-fMass;}
658
659 if( exEnergy < 0.) exEnergy=0.;
660
661
662 G4Fragment anInitialState(anA, aZ, Target4Momentum);
663 anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
664 anInitialState.SetNumberOfCharged(numberOfCh);
665 anInitialState.SetNumberOfHoles(numberOfHoles);
666 anInitialState.SetCreatorModelID(secID);
667
670
671 #ifdef debugPrecoInt
672 G4cout<<
"Target fragment number "<<aPrecoResult->size()<<
G4endl;
673 #endif
674
675
676 for(unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
677 {
678 theTotalResult->push_back(aPrecoResult->operator[](ll));
679 #ifdef debugPrecoInt
680 G4cout<<
"Target fragment "<<ll<<
" "
681 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<" "
682 <<aPrecoResult->operator[](ll)->GetMomentum()<<" "
683 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<" "
684 <<aPrecoResult->operator[](ll)->GetMass()<<
G4endl;
685 #endif
686 }
687 delete aPrecoResult;
688 }
689
690
691 if((anAb == theProjectileNucleus->
GetMassNumber())&& (exEnergyB <= 0.))
693
694 #ifdef debugPrecoInt
695 G4cout<<
"Final projectile residual A Z (numberOfLambdas) E* Pmom Pmag2 "<<anAb<<
" "<<aZb<<
" ("
696 <<aLb<<") "<<exEnergyB<<" "<<Projectile4Momentum<<" "
697 <<Projectile4Momentum.mag2()<<
G4endl;
698 #endif
699
700 if(0!=anAb)
701 {
702
704 if ( aLb > 0 ) {
706 } else {
708 }
709 G4double RemnMass=Projectile4Momentum.mag();
710
711 if(RemnMass < fMass)
712 {
713 RemnMass=fMass + exEnergyB;
714 Projectile4Momentum.setE(std::sqrt(Projectile4Momentum.vect().mag2() +
715 RemnMass*RemnMass));
716 } else
717 { exEnergyB=RemnMass-fMass;}
718
719 if( exEnergyB < 0.) exEnergyB=0.;
720
722 Projectile4Momentum.boost(bstToCM);
723
724
725 G4Fragment anInitialState(anAb, aZb, aLb, Projectile4Momentum);
726 anInitialState.SetNumberOfParticles(numberOfExB-numberOfHolesB);
727 anInitialState.SetNumberOfCharged(numberOfChB);
728 anInitialState.SetNumberOfHoles(numberOfHolesB);
729 anInitialState.SetCreatorModelID(secID);
730
733
734 #ifdef debugPrecoInt
735 G4cout<<
"Projectile fragment number "<<aPrecoResult->size()<<
G4endl;
736 #endif
737
738
739 for(unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
740 {
742 aPrecoResult->operator[](ll)->GetTotalEnergy());
744 aPrecoResult->operator[](ll)->SetMomentum(tmp.
vect());
745 aPrecoResult->operator[](ll)->SetTotalEnergy(tmp.
e());
746
747 if(ProjectileIsAntiNucleus)
748 {
758 else {}
759
760 if (aLb > 0) {
773 }
774 }
775
776 aPrecoResult->operator[](ll)->SetDefinitionAndUpdateE(LastFragment);
777 }
778
779 #ifdef debugPrecoInt
780 G4cout<<
"Projectile fragment "<<ll<<
" "
781 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<" "
782 <<aPrecoResult->operator[](ll)->GetMomentum()<<" "
783 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<" "
784 <<aPrecoResult->operator[](ll)->GetMass()<<
G4endl;
785 #endif
786
787 theTotalResult->push_back(aPrecoResult->operator[](ll));
788 }
789
790 delete aPrecoResult;
791 }
792
793 return theTotalResult;
794}
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
static G4AntiAlpha * AntiAlphaDefinition()
static G4AntiDeuteron * AntiDeuteronDefinition()
static G4AntiDoubleHyperDoubleNeutron * Definition()
static G4AntiDoubleHyperH4 * Definition()
static G4AntiHe3 * AntiHe3Definition()
static G4AntiHyperAlpha * Definition()
static G4AntiHyperH4 * Definition()
static G4AntiHyperHe5 * Definition()
static G4AntiHyperTriton * Definition()
static G4AntiLambda * AntiLambdaDefinition()
static G4AntiLambda * Definition()
static G4AntiNeutron * AntiNeutronDefinition()
static G4AntiProton * AntiProtonDefinition()
static G4AntiTriton * AntiTritonDefinition()
static G4DoubleHyperDoubleNeutron * Definition()
static G4DoubleHyperH4 * Definition()
void MakeCoalescence(G4KineticTrackVector *theSecondaries)
const G4ParticleDefinition * GetDefinition() const
static G4HyperAlpha * Definition()
static G4HyperH4 * Definition()
static G4HyperHe5 * Definition()
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)
static G4HyperTriton * Definition()
static G4Lambda * Definition()
const G4ParticleDefinition * GetParticleType() const
G4double GetBindingEnergy() const
G4int GetBaryonNumber() const
const G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
virtual G4int GetNumberOfLambdas()=0