564{
565
566
567
568
570
576
578
581
582
583
584
585
587
588
589
596
597 for (
G4int iitry = 0 ; iitry < 4 ; iitry++ )
598 {
599
600 abs = false;
601
604
609 secs = theScatterer->
Scatter( kt1 , kt2 );
610
611
612
613
614
615
616 if ( secs )
617 {
619 if ( secs->size() == 2 )
620 {
621 for ( G4KineticTrackVector::iterator it
622 = secs->begin() ; it != secs->end() ; it++ )
623 {
624 if ( iti == 0 )
625 {
627 p4ix_new = (*it)->Get4Momentum()/GeV;
628
630 }
631 if ( iti == 1 )
632 {
633
634
635
636
637
638
639 if((*it)->GetDefinition()->IsShortLived())
640 {
642
644 for(G4KineticTrackVector::iterator jter=dec->begin(); jter != dec->end(); jter++)
645 {
646
647
648 if(ita == 0)
649 {
651
652
653
655
656
657 p4kx_new = (*jter)->Get4Momentum()/GeV;
659
660
661 }
662 else if(ita == 1)
663 {
665 p4jx_new = (*jter)->Get4Momentum()/GeV;
667 pion_prod = true;
668
669
670
671
672 }
673 else
674 {
675 std::cout << "************ Multi-particle decay ************" << std::endl;
676 }
677 ita ++;
678
679 }
680 delete dec;
681
682
683
684
685
686
687 }
688 else
689 {
691 p4jx_new = (*it)->Get4Momentum()/GeV;
692
694 }
695
696 }
697
698 iti++;
699 }
700 }
701 else if ( secs->size() == 1 )
702 {
703
704 abs = true;
705
706
707
708 if(secs->front()->GetDefinition()->IsShortLived())
709 {
712 for(G4KineticTrackVector::iterator jter=dec->begin(); jter != dec->end(); jter++)
713 {
714
715 if(ita == 0)
716 {
718 p4ix_new = (*jter)->Get4Momentum()/GeV;
720 }
721 else if(ita == 1)
722 {
724 p4jx_new = (*jter)->Get4Momentum()/GeV;
726 abs = false;
727
728 }
729 else
730 {
731 std::cout << "************ Multi-particle decay ************" << std::endl;
732 }
733 ita ++;
734 }
735 delete dec;
736 }
737 else
738 {
740 p4ix_new = secs->front()->Get4Momentum()/GeV;
742 }
743
744
745
746
747
748
749
750
751
752
753
754 }
755
756
757 if ( secs->size() > 2 )
758 {
759
760 G4cout <<
"G4LightIonQMDCollision secs size > 2; " << secs->size() <<
G4endl;
761
762 for ( G4KineticTrackVector::iterator it
763 = secs->begin() ; it != secs->end() ; it++ )
764 {
765 G4cout <<
"G4QMDSCATTERER AFTER " << (*it)->GetDefinition()->GetParticleName() <<
" " << (*it)->Get4Momentum()/GeV <<
G4endl;
766 }
767
768 }
769
770
771 for ( G4KineticTrackVector::iterator it
772 = secs->begin() ; it != secs->end() ; it++ )
773 {
774 delete *it;
775 }
776
777 delete secs;
778 }
779
780
781 if ( !abs )
782 {
783
784
786
787 }
788 else
789 {
792 }
793
794
795
797
798
799
800
801
802
803
804
805
806
807
808
809 if ( std::abs ( eini - efin ) < fepse )
810 {
811
812
813
814
815
816
817
818
819 energyOK = true;
820 break;
821 }
822 else
823 {
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861 if ( abs )
862 {
863
866 }
867 else if ( pion_prod )
868 {
869
877 pion_prod = false;
878 }
879 else
880 {
883
887 }
888
889 }
890
891 }
892
893
894
895 if ( energyOK )
896 {
897
898
899 if ( !abs )
900 {
902 {
903
904 pauliOK = true;
905 }
906 }
907 else
908 {
909
910
912 {
913
914 delete absorbed;
915 pauliOK = true;
916 }
917 }
918
919
920 if ( pauliOK )
921 {
922 result = true;
923 }
924 else
925 {
926
927 if ( abs )
928 {
929
932 }
933 else if ( pion_prod )
934 {
935
943 pion_prod = false;
944 }
945 else
946 {
949
953 }
954 }
955 }
956
957 return result;
958
959}
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
G4double GetTotalEnergy()
G4bool IsPauliBlocked(G4int)
const G4ParticleDefinition * GetDefinition()
G4LorentzVector Get4Momentum()
void SetDefinition(const G4ParticleDefinition *pd)
void SetMomentum(G4ThreeVector p)
void InsertParticipant(G4QMDParticipant *particle, G4int j)
G4QMDParticipant * GetParticipant(G4int i)
G4int GetTotalNumberOfParticipant()
void SetParticipant(G4QMDParticipant *particle)
G4QMDParticipant * EraseParticipant(G4int i)
virtual G4KineticTrackVector * Scatter(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const