50 : theDiffExcitaton(), ModelMode(SOFT), nCutMax(7),
51 ThresholdParameter(0.0*GeV), QGSMThreshold(3.0*GeV),
52 theNucleonRadius(1.5*fermi), theCurrentVelocity(
G4ThreeVector()),
53 theProjectileSplitable(nullptr), Regge(nullptr),
54 InteractionMode(ALL), alpha(-0.5), beta(2.5), sigmaPt(0.0),
55 NumberOfInvolvedNucleonsOfTarget(0), NumberOfInvolvedNucleonsOfProjectile(0),
56 ProjectileResidual4Momentum(
G4LorentzVector()), ProjectileResidualMassNumber(0),
57 ProjectileResidualCharge(0), ProjectileResidualExcitationEnergy(0.0),
58 TargetResidual4Momentum(
G4LorentzVector()), TargetResidualMassNumber(0),
59 TargetResidualCharge(0), TargetResidualExcitationEnergy(0.0),
60 CofNuclearDestruction(0.0), R2ofNuclearDestruction(0.0),
61 ExcitationEnergyPerWoundedNucleon(0.0), DofNuclearDestruction(0.0),
62 Pt2ofNuclearDestruction(0.0), MaxPt2ofNuclearDestruction(0.0)
64 for (
size_t i=0; i < 250; ++i) {
65 TheInvolvedNucleonsOfTarget[i] =
nullptr;
66 TheInvolvedNucleonsOfProjectile[i] =
nullptr;
69 SetCofNuclearDestruction( 1.0 );
70 SetR2ofNuclearDestruction( 1.5*fermi*fermi );
71 SetDofNuclearDestruction( 0.3 );
72 SetPt2ofNuclearDestruction( 0.075*GeV*GeV );
73 SetMaxPt2ofNuclearDestruction( 1.0*GeV*GeV );
74 SetExcitationEnergyPerWoundedNucleon( 40.0*MeV );
76 sigmaPt=0.25*
sqr(GeV);
80 :
G4VParticipants(), ModelMode(right.ModelMode), nCutMax(right.nCutMax),
81 ThresholdParameter(right.ThresholdParameter),
82 QGSMThreshold(right.QGSMThreshold),
83 theNucleonRadius(right.theNucleonRadius),
84 theCurrentVelocity(right.theCurrentVelocity),
85 theProjectileSplitable(right.theProjectileSplitable),
86 Regge(right.Regge), InteractionMode(right.InteractionMode),
87 alpha(right.alpha), beta(right.beta), sigmaPt(right.sigmaPt),
88 NumberOfInvolvedNucleonsOfTarget(right.NumberOfInvolvedNucleonsOfTarget),
89 NumberOfInvolvedNucleonsOfProjectile(right.NumberOfInvolvedNucleonsOfProjectile),
90 ProjectileResidual4Momentum(right.ProjectileResidual4Momentum),
91 ProjectileResidualMassNumber(right.ProjectileResidualMassNumber),
92 ProjectileResidualCharge(right.ProjectileResidualCharge),
93 ProjectileResidualExcitationEnergy(right.ProjectileResidualExcitationEnergy),
94 TargetResidual4Momentum(right.TargetResidual4Momentum),
95 TargetResidualMassNumber(right.TargetResidualMassNumber),
96 TargetResidualCharge(right.TargetResidualCharge),
97 TargetResidualExcitationEnergy(right.TargetResidualExcitationEnergy),
98 CofNuclearDestruction(right.CofNuclearDestruction),
99 R2ofNuclearDestruction(right.R2ofNuclearDestruction),
100 ExcitationEnergyPerWoundedNucleon(right.ExcitationEnergyPerWoundedNucleon),
101 DofNuclearDestruction(right.DofNuclearDestruction),
102 Pt2ofNuclearDestruction(right.Pt2ofNuclearDestruction),
103 MaxPt2ofNuclearDestruction(right.MaxPt2ofNuclearDestruction)
105 for (
size_t i=0; i < 250; ++i) {
106 TheInvolvedNucleonsOfTarget[i] = right.TheInvolvedNucleonsOfTarget[i];
107 TheInvolvedNucleonsOfProjectile[i] = right.TheInvolvedNucleonsOfProjectile[i];
115 theProjectile = thePrimary;
121 NumberOfInvolvedNucleonsOfProjectile= 0;
123 ProjectileResidualMassNumber = 0;
124 ProjectileResidualCharge = 0;
125 ProjectileResidualExcitationEnergy = 0.0;
126 ProjectileResidual4Momentum = tmp;
128 NumberOfInvolvedNucleonsOfTarget= 0;
131 TargetResidualExcitationEnergy = 0.0;
138 TargetResidual4Momentum = tmp;
144 ProjectileResidualExcitationEnergy = 0.0;
149 #ifdef debugQGSParticipants
152 <<ProjectileResidual4Momentum<<
G4endl;
154 << TargetResidual4Momentum<<
G4endl;
159 const G4int maxNumberOfLoops = 1000;
160 G4int loopCounter = 0;
163 const G4int maxNumberOfInternalLoops = 1000;
164 G4int internalLoopCounter = 0;
173 GetList( theProjectile );
178 StoreInvolvedNucleon();
182 Success = PutOnMassShell();
184 if(!Success) PrepareInitialState( thePrimary );
186 }
while( (!Success) && ++internalLoopCounter < maxNumberOfInternalLoops );
188 if ( internalLoopCounter >= maxNumberOfInternalLoops ) {
193 #ifdef debugQGSParticipants
199 #ifdef debugQGSParticipants
206 #ifdef debugQGSParticipants
207 G4cout<<
"Perform non-Diffractive Collisions if they happend. Determine Parton Momenta and so on." <<
G4endl;
212 if(!Success) PrepareInitialState( thePrimary );
214 }
while( (!Success) && ++loopCounter < maxNumberOfLoops );
216 if ( loopCounter >= maxNumberOfLoops ) {
218 #ifdef debugQGSParticipants
228 #ifdef debugQGSParticipants
234 #ifdef debugQGSParticipants
239 if( Regge )
delete Regge;
245 #ifdef debugQGSParticipants
246 G4cout<<
"Erasing of involved target nucleons "<<NumberOfInvolvedNucleonsOfTarget<<
G4endl;
249 if ( NumberOfInvolvedNucleonsOfTarget != 0 ) {
250 for (
G4int i = 0; i < NumberOfInvolvedNucleonsOfTarget; i++ ) {
252 if ( (aNucleon != 0 ) && (aNucleon->
GetStatus() >= 1) )
delete aNucleon;
257 if ( NumberOfInvolvedNucleonsOfProjectile != 0 ) {
258 for (
G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; i++ ) {
260 if ( aNucleon )
delete aNucleon;
264 #ifdef debugQGSParticipants
265 G4cout<<
"Delition of target nucleons from soft interactions "<<
theTargets.size()
278void G4QGSParticipants::PrepareInitialState(
const G4ReactionProduct& thePrimary )
284 if( pProjectile )
delete pProjectile;
296 if ( (splaNucleon != 0) && (splaNucleon->
GetStatus() >=1) )
delete splaNucleon;
297 aNucleon->
Hit(
nullptr);
298 NumberOfInvolvedNucleonsOfTarget--;
307 theProjectile = thePrimary;
322 NumberOfInvolvedNucleonsOfTarget= 0;
325 TargetResidualExcitationEnergy = 0.0;
331 TargetResidual4Momentum = Tmp;
336 #ifdef debugQGSParticipants
347 G4double SS=(aPrimaryMomentum + aNucleonMomentum).mag2();
356 #ifdef debugQGSParticipants
357 G4cout <<
"QGSM - BAD situation: pNucleon is NULL ! Leaving immediately!" <<
G4endl;
368 theNucleusOuterR = 0.;
378 const G4int maxNumberOfLoops = 1000;
380 G4int NumberOfTries = 0;
383 G4int loopCounter = -1;
384 while( (
theInteractions.size() == 0) && ++loopCounter < maxNumberOfLoops )
386 InteractionMode =
ALL;
389 std::pair<G4double, G4double> theImpactParameter;
392 if( NumberOfTries == 100*(NumberOfTries/100) ) Scale /=2.0;
395 G4double impactX = theImpactParameter.first;
396 G4double impactY = theImpactParameter.second;
398 #ifdef debugQGSParticipants
400 G4cout<<
"Impact parameter (fm ) "<<std::sqrt(
sqr(impactX)+
sqr(impactY))/fermi<<
" "<<
G4endl;
401 G4int nucleonCount = -1;
412 if(Power <= 0.)
break;
420 G4double Pprd(0.), Ptrd(0.), Pdd(0.);
422 G4int NcutPomerons(0);
425 Pint, Pprd, Ptrd, Pdd, Pnd, Pnvr);
426 #ifdef debugQGSParticipants
428 G4cout<<
"Nucleon & its impact parameter: "<<nucleonCount<<
" "<<std::sqrt(Distance2)/fermi<<
" (fm)"<<
G4endl;
430 G4cout<<
"Probability of PrD, TrD, DD: "<<Pprd<<
" "<<Ptrd<<
" "<<Pdd<<
G4endl;
431 G4cout<<
"Probability of NonDiff, QuarkExc.: "<<Pnd<<
" "<<Pnvr<<
" in inel. inter."<<
G4endl;
438 G4int InteractionType(0);
440 if((InteractionMode==
ALL)||(InteractionMode==
WITHOUT_R))
442 if( rndNumber < Pprd ) {InteractionType =
PrD; InteractionMode =
WITHOUT_R;}
443 else if( rndNumber < Pprd+Ptrd) {InteractionType =
TrD; InteractionMode =
WITHOUT_R;}
444 else if( rndNumber < Pprd+Ptrd+Pdd) {InteractionType =
DD; InteractionMode =
WITHOUT_R;}
445 else if( rndNumber < Pprd+Ptrd+Pdd+Pnd ) {InteractionType =
NonD; InteractionMode =
NON_DIFF;
447 else {InteractionType =
Qexc; InteractionMode =
ALL; }
452 if( rndNumber < Ptrd ) {InteractionType =
TrD; }
453 else if( rndNumber < Ptrd + Pnd) {InteractionType =
NonD; NcutPomerons = Regge->
ncPomerons();}
456 if( (InteractionType ==
NonD) && (NcutPomerons == 0))
continue;
460 tNucleon->
Hit(aTargetSPB);
462 #ifdef debugQGSParticipants
464 G4cout<<
"Target nucleon - "<<nucleonCount<<
" "
466 G4cout<<
"Interaction type:"<<InteractionType
467 <<
" (0 -PrD, 1 - TrD, 2 - DD, 3 - NonD, 4 - Qexc)"<<
G4endl;
468 G4cout<<
"New Inter. mode:"<<InteractionMode
469 <<
" (0 -ALL, 1 - WITHOUT_R, 2 - NON_DIFF)"<<
G4endl;
470 if( InteractionType ==
NonD )
471 G4cout<<
"Number of cutted pomerons: "<<NcutPomerons<<
G4endl;
474 if((InteractionType ==
PrD) || (InteractionType ==
TrD) || (InteractionType ==
DD) ||
475 (InteractionType ==
Qexc))
477 #ifdef debugQGSParticipants
491 aInteraction->
SetStatus(InteractionType);
496 #ifdef debugQGSParticipants
497 G4cout<<
"Non-diffractive interaction occurs, max NcutPomerons "<<NcutPomerons<<
G4endl;
503 for(nCuts = 0; nCuts < NcutPomerons; nCuts++)
505 if(
G4UniformRand() < Power/MaxPower ){Vncut++; Power--;
if(Power <= 0.)
break;}
509 if( nCuts == 0 ) {
delete aTargetSPB; tNucleon->
Hit(
nullptr);
continue;}
511 #ifdef debugQGSParticipants
512 G4cout<<
"Number of cuts in the interaction "<<nCuts<<
G4endl;
526 aInteraction->
SetStatus(InteractionType);
532 #ifdef debugQGSParticipants
538 if ( loopCounter >= maxNumberOfLoops ) {
539 #ifdef debugQGSParticipants
548 std::vector<G4InteractionContent*>::iterator i;
552 if( InteractionMode ==
ALL )
576 aTargetNucleon->
Hit(
nullptr);
592void G4QGSParticipants::StoreInvolvedNucleon()
595 NumberOfInvolvedNucleonsOfTarget = 0;
602 TheInvolvedNucleonsOfTarget[NumberOfInvolvedNucleonsOfTarget] = aNucleon;
603 NumberOfInvolvedNucleonsOfTarget++;
607 #ifdef debugQGSParticipants
609 <<
"Stored # of wounded nucleons of target "
610 << NumberOfInvolvedNucleonsOfTarget <<
G4endl;
617void G4QGSParticipants::ReggeonCascade()
619 #ifdef debugQGSParticipants
621 G4cout<<
"C of nucl. desctruction "<<GetCofNuclearDestruction()
622 <<
" R2 "<<GetR2ofNuclearDestruction()/fermi/fermi<<
" fermi^2"<<
G4endl;
625 G4int InitNINt = NumberOfInvolvedNucleonsOfTarget;
628 for (
G4int InvTN = 0; InvTN < InitNINt; InvTN++ ) {
629 G4Nucleon* aTargetNucleon = TheInvolvedNucleonsOfTarget[ InvTN ];
639 #ifdef debugQGSParticipants
644 #ifdef debugQGSParticipants
647 if ( ! Neighbour->AreYouHit() ) {
648 G4double impact2 =
sqr( XofWoundedNucleon - Neighbour->GetPosition().x() ) +
649 sqr( YofWoundedNucleon - Neighbour->GetPosition().y() );
652 G4Exp( -impact2 / GetR2ofNuclearDestruction() )
655 #ifdef debugQGSParticipants
656 G4cout<<
"Target nucleon involved in reggeon cascading No "<<TrgNuc<<
" "
657 <<Neighbour->GetDefinition()->GetParticleName()<<
G4endl;
659 TheInvolvedNucleonsOfTarget[ NumberOfInvolvedNucleonsOfTarget ] = Neighbour;
660 NumberOfInvolvedNucleonsOfTarget++;
664 Neighbour->Hit( targetSplitable );
670 anInteraction->
SetTarget(targetSplitable);
682 #ifdef debugQGSParticipants
683 G4cout <<
"Number of new involved nucleons "<<NumberOfInvolvedNucleonsOfTarget - InitNINt<<
G4endl;
690G4bool G4QGSParticipants::PutOnMassShell() {
692 G4bool isProjectileNucleus =
false;
693 if ( GetProjectileNucleus() ) {
694 isProjectileNucleus =
true;
697 #ifdef debugPutOnMassShell
699 if ( isProjectileNucleus ) {
G4cout <<
"PutOnMassShell for Nucleus_Nucleus " <<
G4endl;}
703 if ( Pprojectile.z() < 0.0 ) {
715 #ifdef debugPutOnMassShell
719 isOk = ComputeNucleusProperties( theTargetNucleus, Ptarget, PtargetResidual, SumMasses,
720 TargetResidualExcitationEnergy, TargetResidualMass,
721 TargetResidualMassNumber, TargetResidualCharge );
723 if ( ! isOk )
return false;
732 if ( ! isProjectileNucleus ) {
733 Mprojectile = Pprojectile.mag();
734 M2projectile = Pprojectile.mag2();
735 SumMasses += Mprojectile + 20.0*MeV;
738 #ifdef debugPutOnMassShell
739 G4cout <<
"Projectile : ";
742 isOk = ComputeNucleusProperties( thePrNucleus, Pproj, PprojResidual, SumMasses,
743 ProjectileResidualExcitationEnergy, PrResidualMass,
744 ProjectileResidualMassNumber, ProjectileResidualCharge );
745 if ( ! isOk )
return false;
752 #ifdef debugPutOnMassShell
755 G4cout <<
"Psum " << Psum/GeV <<
" GeV" <<
G4endl <<
"SqrtS " << SqrtS/GeV <<
" GeV" <<
G4endl
756 <<
"SumMasses, PrResidualMass and TargetResidualMass " << SumMasses/GeV <<
" "
757 << PrResidualMass/GeV <<
" " << TargetResidualMass/GeV <<
" GeV" <<
G4endl;
761 if ( SqrtS < SumMasses ) {
768 G4double savedSumMasses = SumMasses;
769 if ( isProjectileNucleus ) {
770 SumMasses -= std::sqrt(
sqr( PrResidualMass ) + PprojResidual.perp2() );
771 SumMasses += std::sqrt(
sqr( PrResidualMass + ProjectileResidualExcitationEnergy )
772 + PprojResidual.perp2() );
774 SumMasses -= std::sqrt(
sqr( TargetResidualMass ) + PtargetResidual.perp2() );
775 SumMasses += std::sqrt(
sqr( TargetResidualMass + TargetResidualExcitationEnergy )
776 + PtargetResidual.perp2() );
778 if ( SqrtS < SumMasses ) {
779 SumMasses = savedSumMasses;
780 if ( isProjectileNucleus ) {
781 ProjectileResidualExcitationEnergy = 0.0;
783 TargetResidualExcitationEnergy = 0.0;
786 TargetResidualMass += TargetResidualExcitationEnergy;
787 if ( isProjectileNucleus ) {
788 PrResidualMass += ProjectileResidualExcitationEnergy;
791 #ifdef debugPutOnMassShell
792 if ( isProjectileNucleus ) {
793 G4cout <<
"PrResidualMass ProjResidualExcitationEnergy " << PrResidualMass/GeV <<
" "
794 << ProjectileResidualExcitationEnergy <<
" MeV" <<
G4endl;
796 G4cout <<
"TargetResidualMass TargetResidualExcitationEnergy " << TargetResidualMass/GeV <<
" GeV "
797 << TargetResidualExcitationEnergy <<
" MeV" <<
G4endl
798 <<
"Sum masses " << SumMasses/GeV <<
G4endl;
802 if ( isProjectileNucleus && thePrNucleus->
GetMassNumber() != 1 ) {
803 isOk = GenerateDeltaIsobar( SqrtS, NumberOfInvolvedNucleonsOfProjectile,
804 TheInvolvedNucleonsOfProjectile, SumMasses );
808 GenerateDeltaIsobar( SqrtS, NumberOfInvolvedNucleonsOfTarget,
809 TheInvolvedNucleonsOfTarget, SumMasses );
811 if ( ! isOk )
return false;
824 if ( Ptmp.
pz() <= 0.0 ) {
831 if ( isProjectileNucleus ) {
833 YprojectileNucleus = Ptmp.
rapidity();
835 Ptmp = toCms*Ptarget;
840 if ( isProjectileNucleus ) {
841 DcorP = GetDofNuclearDestruction() / thePrNucleus->
GetMassNumber();
844 G4double AveragePt2 = GetPt2ofNuclearDestruction();
845 G4double maxPtSquare = GetMaxPt2ofNuclearDestruction();
847 #ifdef debugPutOnMassShell
848 if ( isProjectileNucleus ) {
849 G4cout <<
"Y projectileNucleus " << YprojectileNucleus <<
G4endl;
851 G4cout <<
"Y targetNucleus " << YtargetNucleus <<
G4endl
852 <<
"Dcor " << GetDofNuclearDestruction()
853 <<
" DcorP DcorT " << DcorP <<
" " << DcorT <<
" AveragePt2 " << AveragePt2 <<
G4endl;
860 G4int NumberOfTries = 0;
862 G4bool OuterSuccess =
true;
864 const G4int maxNumberOfLoops = 1000;
865 G4int loopCounter = 0;
867 G4double sqrtM2proj = 0.0, sqrtM2target = 0.0;
869 const G4int maxNumberOfTries = 1000;
872 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
878 DcorP *= ScaleFactor;
879 DcorT *= ScaleFactor;
880 AveragePt2 *= ScaleFactor;
882 if ( isProjectileNucleus ) {
884 isOk = SamplingNucleonKinematics( AveragePt2, maxPtSquare, DcorP,
885 thePrNucleus, PprojResidual,
886 PrResidualMass, ProjectileResidualMassNumber,
887 NumberOfInvolvedNucleonsOfProjectile,
888 TheInvolvedNucleonsOfProjectile, M2proj );
892 SamplingNucleonKinematics( AveragePt2, maxPtSquare, DcorT,
893 theTargetNucleus, PtargetResidual,
894 TargetResidualMass, TargetResidualMassNumber,
895 NumberOfInvolvedNucleonsOfTarget,
896 TheInvolvedNucleonsOfTarget, M2target );
898 if ( M2proj < 0.0 ) {
899 if( M2proj < -0.000001 ) {
903 <<
") M2proj=" << M2proj <<
" -> sets it to 0.0 !" <<
G4endl;
904 G4Exception(
"G4QGSParticipants::PutOnMassShell(): negative projectile squared mass!",
909 sqrtM2proj = std::sqrt( M2proj );
910 if ( M2target < 0.0 ) {
914 <<
") M2target=" << M2target <<
" -> sets it to 0.0 !" <<
G4endl;
915 G4Exception(
"G4QGSParticipants::PutOnMassShell(): negative target squared mass!",
919 sqrtM2target = std::sqrt( M2target );
921 #ifdef debugPutOnMassShell
922 G4cout <<
"SqrtS, Mp+Mt, Mp, Mt " << SqrtS/GeV <<
" "
923 << ( sqrtM2proj + sqrtM2target )/GeV <<
" "
924 << sqrtM2proj/GeV <<
" " << sqrtM2target/GeV <<
G4endl;
927 if ( ! isOk )
return false;
928 }
while ( ( SqrtS < ( sqrtM2proj + sqrtM2target ) ) &&
929 ++NumberOfTries < maxNumberOfTries );
930 if ( NumberOfTries >= maxNumberOfTries ) {
933 if ( isProjectileNucleus ) {
934 isOk = CheckKinematics(
S, SqrtS, M2proj, M2target, YprojectileNucleus,
true,
935 NumberOfInvolvedNucleonsOfProjectile,
936 TheInvolvedNucleonsOfProjectile,
937 WminusTarget, WplusProjectile, OuterSuccess );
940 CheckKinematics(
S, SqrtS, M2proj, M2target, YtargetNucleus,
false,
941 NumberOfInvolvedNucleonsOfTarget, TheInvolvedNucleonsOfTarget,
942 WminusTarget, WplusProjectile, OuterSuccess );
943 if ( ! isOk )
return false;
944 }
while ( ( ! OuterSuccess ) &&
945 ++loopCounter < maxNumberOfLoops );
946 if ( loopCounter >= maxNumberOfLoops ) {
956 if ( ! isProjectileNucleus ) {
958 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
959 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
960 Pprojectile.setPz( Pzprojectile );
961 Pprojectile.setE( Eprojectile );
963 #ifdef debugPutOnMassShell
964 G4cout <<
"Proj after in CMS " << Pprojectile/GeV <<
" GeV"<<
G4endl;
967 Pprojectile.transform( toLab );
973 #ifdef debugPutOnMassShell
980 isOk = FinalizeKinematics( WplusProjectile,
true, toLab, PrResidualMass,
981 ProjectileResidualMassNumber, NumberOfInvolvedNucleonsOfProjectile,
982 TheInvolvedNucleonsOfProjectile, ProjectileResidual4Momentum );
984 #ifdef debugPutOnMassShell
985 G4cout <<
"Projectile Residual4Momentum in CMS " << ProjectileResidual4Momentum/GeV <<
" GeV"<<
G4endl;
988 if ( ! isOk )
return false;
990 ProjectileResidual4Momentum.
transform( toLab );
992 #ifdef debugPutOnMassShell
993 G4cout <<
"Projectile Residual4Momentum in Lab " << ProjectileResidual4Momentum/GeV <<
" GeV"<<
G4endl;
998 isOk = FinalizeKinematics( WminusTarget,
false, toLab, TargetResidualMass,
999 TargetResidualMassNumber, NumberOfInvolvedNucleonsOfTarget,
1000 TheInvolvedNucleonsOfTarget, TargetResidual4Momentum );
1002 #ifdef debugPutOnMassShell
1003 G4cout <<
"Target Residual4Momentum in CMS " << TargetResidual4Momentum/GeV <<
" GeV "<<
G4endl;
1006 if ( ! isOk )
return false;
1008 TargetResidual4Momentum.
transform( toLab );
1010 #ifdef debugPutOnMassShell
1011 G4cout <<
"Target Residual4Momentum in Lab " << TargetResidual4Momentum/GeV <<
" GeV "<<
G4endl;
1024 if ( AveragePt2 > 0.0 ) {
1025 G4double x = maxPtSquare/AveragePt2;
1029 Pt = std::sqrt( Pt2 );
1033 return G4ThreeVector( Pt*std::cos(phi), Pt*std::sin(phi), 0.0 );
1037G4bool G4QGSParticipants::
1042 G4double& residualExcitationEnergy,
1044 G4int& residualMassNumber,
1045 G4int& residualCharge ) {
1057 if ( ! nucleus )
return false;
1059 G4double ExcitationEPerWoundedNucleon = GetExcitationEnergyPerWoundedNucleon();
1082 sumMasses += 20.0*MeV;
1086 residualMassNumber--;
1093 #ifdef debugPutOnMassShell
1094 G4cout <<
"ExcitationEnergyPerWoundedNucleon " << ExcitationEPerWoundedNucleon <<
" MeV"<<
G4endl
1095 <<
"\t Residual Charge, MassNumber " << residualCharge <<
" " << residualMassNumber
1096 <<
G4endl <<
"\t Initial Momentum " << nucleusMomentum/GeV<<
" GeV"
1097 <<
G4endl <<
"\t Residual Momentum " << residualMomentum/GeV<<
" GeV"<<
G4endl;
1100 residualMomentum.
setPz( 0.0 );
1101 residualMomentum.
setE( 0.0 );
1102 if ( residualMassNumber == 0 ) {
1104 residualExcitationEnergy = 0.0;
1107 GetIonMass( residualCharge, residualMassNumber );
1108 if ( residualMassNumber == 1 ) {
1109 residualExcitationEnergy = 0.0;
1112 sumMasses += std::sqrt(
sqr( residualMass ) + residualMomentum.
perp2() );
1119G4bool G4QGSParticipants::
1120GenerateDeltaIsobar(
const G4double sqrtS,
1121 const G4int numberOfInvolvedNucleons,
1139 if ( sqrtS < 0.0 || numberOfInvolvedNucleons <= 0 || sumMasses < 0.0 )
return false;
1143 const G4double probDeltaIsobar = 0.10;
1145 G4int maxNumberOfDeltas =
G4int( (sqrtS - sumMasses)/(400.0*MeV) );
1146 G4int numberOfDeltas = 0;
1148 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
1151 if (
G4UniformRand() < probDeltaIsobar && numberOfDeltas < maxNumberOfDeltas ) {
1153 if ( ! involvedNucleons[i] )
continue;
1160 G4int newPdgCode = pdgCode/10; newPdgCode = newPdgCode*10 + 4;
1169 if ( sqrtS < sumMasses + massDelta - massNuc ) {
1173 sumMasses += ( massDelta - massNuc );
1185G4bool G4QGSParticipants::
1186SamplingNucleonKinematics(
G4double averagePt2,
1192 const G4int residualMassNumber,
1193 const G4int numberOfInvolvedNucleons,
1207 if ( ! nucleus )
return false;
1209 if ( residualMassNumber == 0 && numberOfInvolvedNucleons == 1 ) {
1217 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
1218 G4Nucleon* aNucleon = involvedNucleons[i];
1219 if ( ! aNucleon )
continue;
1223 const G4int maxNumberOfLoops = 1000;
1224 G4int loopCounter = 0;
1231 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
1232 G4Nucleon* aNucleon = involvedNucleons[i];
1233 if ( ! aNucleon )
continue;
1239 if ( x < 0.0 || x > 1.0 ) {
1249 if ( xSum < 0.0 || xSum > 1.0 ) success =
false;
1251 if ( ! success )
continue;
1253 G4double deltaPx = ( ptSum.x() - pResidual.
x() ) / numberOfInvolvedNucleons;
1254 G4double deltaPy = ( ptSum.y() - pResidual.
y() ) / numberOfInvolvedNucleons;
1256 if ( residualMassNumber == 0 ) {
1257 delta = ( xSum - 1.0 ) / numberOfInvolvedNucleons;
1264 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
1265 G4Nucleon* aNucleon = involvedNucleons[i];
1266 if ( ! aNucleon )
continue;
1269 if ( residualMassNumber == 0 ) {
1270 if ( x <= 0.0 || x > 1.0 ) {
1275 if ( x <= 0.0 || x > 1.0 || xSum <= 0.0 || xSum > 1.0 ) {
1283 +
sqr( px ) +
sqr( py ) ) / x;
1288 if ( success && residualMassNumber != 0 ) {
1289 mass2 += (
sqr( residualMass ) + pResidual.
perp2() ) / xSum;
1292 #ifdef debugPutOnMassShell
1293 G4cout <<
"success " << success <<
G4endl <<
" Mt " << std::sqrt( mass2 )/GeV <<
G4endl;
1296 }
while ( ( ! success ) &&
1297 ++loopCounter < maxNumberOfLoops );
1298 if ( loopCounter >= maxNumberOfLoops ) {
1308G4bool G4QGSParticipants::
1309CheckKinematics(
const G4double sValue,
1314 const G4bool isProjectileNucleus,
1315 const G4int numberOfInvolvedNucleons,
1330 G4double decayMomentum2 =
sqr( sValue ) +
sqr( projectileMass2 ) +
sqr( targetMass2 )
1331 - 2.0*sValue*projectileMass2 - 2.0*sValue*targetMass2
1332 - 2.0*projectileMass2*targetMass2;
1333 targetWminus = ( sValue - projectileMass2 + targetMass2 + std::sqrt( decayMomentum2 ) )
1335 projectileWplus = sqrtS - targetMass2/targetWminus;
1336 G4double projectilePz = projectileWplus/2.0 - projectileMass2/2.0/projectileWplus;
1337 G4double projectileE = projectileWplus/2.0 + projectileMass2/2.0/projectileWplus;
1339 if (projectileE - projectilePz > 0.) {
1340 projectileY = 0.5 *
G4Log( (projectileE + projectilePz)/
1341 (projectileE - projectilePz) );
1343 G4double targetPz = -targetWminus/2.0 + targetMass2/2.0/targetWminus;
1344 G4double targetE = targetWminus/2.0 + targetMass2/2.0/targetWminus;
1345 G4double targetY = 0.5 *
G4Log( (targetE + targetPz)/(targetE - targetPz) );
1347 #ifdef debugPutOnMassShell
1348 G4cout <<
"decayMomentum2 " << decayMomentum2 <<
G4endl
1349 <<
"\t targetWminus projectileWplus " << targetWminus <<
" " << projectileWplus <<
G4endl
1350 <<
"\t projectileY targetY " << projectileY <<
" " << targetY <<
G4endl;
1353 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
1354 G4Nucleon* aNucleon = involvedNucleons[i];
1355 if ( ! aNucleon )
continue;
1360 G4double pz = -targetWminus*x/2.0 + mt2/(2.0*targetWminus*x);
1361 G4double e = targetWminus*x/2.0 + mt2/(2.0*targetWminus*x);
1362 if ( isProjectileNucleus ) {
1363 pz = projectileWplus*x/2.0 - mt2/(2.0*projectileWplus*x);
1364 e = projectileWplus*x/2.0 + mt2/(2.0*projectileWplus*x);
1368 #ifdef debugPutOnMassShell
1369 G4cout <<
"i nY pY nY-AY AY " << i <<
" " << nucleonY <<
" " << projectileY <<
G4endl;
1372 if ( std::abs( nucleonY - nucleusY ) > 2 ||
1373 ( isProjectileNucleus && targetY > nucleonY ) ||
1374 ( ! isProjectileNucleus && projectileY < nucleonY ) ) {
1385G4bool G4QGSParticipants::
1386FinalizeKinematics(
const G4double w,
1387 const G4bool isProjectileNucleus,
1390 const G4int residualMassNumber,
1391 const G4int numberOfInvolvedNucleons,
1409 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
1410 G4Nucleon* aNucleon = involvedNucleons[i];
1411 if ( ! aNucleon )
continue;
1413 residual3Momentum -= tmp.
vect();
1417 G4double pz = -w * x / 2.0 + mt2 / ( 2.0 * w * x );
1418 G4double e = w * x / 2.0 + mt2 / ( 2.0 * w * x );
1420 if ( isProjectileNucleus ) pz *= -1.0;
1427 #ifdef debugPutOnMassShell
1428 G4cout <<
"Target involved nucleon No, name, 4Mom "
1433 G4double residualMt2 =
sqr( residualMass ) +
sqr( residual3Momentum.x() )
1434 +
sqr( residual3Momentum.y() );
1436 #ifdef debugPutOnMassShell
1437 G4cout <<
G4endl<<
"w residual3Momentum.z() " << w <<
" " << residual3Momentum.z() <<
G4endl;
1442 if ( residualMassNumber != 0 ) {
1443 residualPz = -w * residual3Momentum.z() / 2.0 +
1444 residualMt2 / ( 2.0 * w * residual3Momentum.z() );
1445 residualE = w * residual3Momentum.z() / 2.0 +
1446 residualMt2 / ( 2.0 * w * residual3Momentum.z() );
1448 if ( isProjectileNucleus ) residualPz *= -1.0;
1451 residual4Momentum.
setPx( residual3Momentum.x() );
1452 residual4Momentum.
setPy( residual3Momentum.y() );
1453 residual4Momentum.
setPz( residualPz );
1454 residual4Momentum.
setE( residualE );
1462 #ifdef debugQGSParticipants
1471 #ifdef debugQGSParticipants
1472 G4cout<<
"Interaction # and its status "
1477 if ( (InterStatus ==
PrD) || (InterStatus ==
TrD) || (InterStatus ==
DD))
1479 #ifdef debugQGSParticipants
1480 G4cout<<
"Simulation of diffractive interaction. "<<InterStatus <<
" PrD/TrD/DD/ND/Qech - 0,1,2,3,4"<<
G4endl;
1485 #ifdef debugQGSParticipants
1486 G4cout<<
"The proj. before inter "
1493 if ( InterStatus ==
PrD )
1496 if ( InterStatus ==
TrD )
1499 if ( InterStatus ==
DD )
1502 #ifdef debugQGSParticipants
1510 if ( InterStatus ==
Qexc )
1512 #ifdef debugQGSParticipants
1513 G4cout<<
"Simulation of interaction with quark exchange."<<
G4endl;
1517 #ifdef debugQGSParticipants
1526 #ifdef debugQGSParticipants
1541 const G4double aHugeValue = 1.0e+10;
1543 #ifdef debugQGSParticipants
1553 G4double VqM_pr(0.), VaqM_pr(0.), VqM_tr(350.), VqqM_tr(700);
1556 #ifdef debugQGSParticipants
1558 <<
"Target nucleon momenta at start"<<
G4endl;
1562 std::vector<G4VSplitableHadron*>::iterator i;
1566 Psum += (*i)->Get4Momentum();
1567 #ifdef debugQGSParticipants
1568 G4cout<<
"Nusleus nucleon # and its 4Mom. "<<NuclNo<<
" "<<(*i)->Get4Momentum()<<
G4endl;
1583 #ifdef debugQGSParticipants
1585 G4cout<<
"Projectile 4 Mom "<<Projectile4Momentum<<
G4endl;
1593 (*i)->Set4Momentum( tmp );
1594 #ifdef debugQGSParticipants
1595 G4cout<<
"Target nucleon # and 4Mom "<<
" "<<NuclNo<<
" "<<(*i)->Get4Momentum()<<
G4endl;
1598 Target4Momentum += tmp;
1604 #ifdef debugQGSParticipants
1606 G4cout<<
"Target nucleons mom: px, py, z_1, m_i"<<
G4endl;
1626 if ( Mass2 < 0.0 ) {
1629 <<
"Â 4-momentum " << Psum <<
G4endl;
1630 ed <<
"LorentzVector tmp " << tmp <<
" with Mass2 " << Mass2 <<
G4endl;
1631 G4Exception(
"G4QGSParticipants::DeterminePartonMomenta(): 4-momentum with negative mass!",
1634 Mass = std::sqrt( Mass2 );
1638 (*i)->Set4Momentum(tmp);
1639 #ifdef debugQGSParticipants
1640 G4cout<<
"Target nucleons # and mom: "<<NuclNo<<
" "<<(*i)->Get4Momentum()<<
G4endl;
1653 G4double ProjSumMt(0.), ProjSumMt2perX(0.);
1654 G4double TargSumMt(0.), TargSumMt2perX(0.);
1670 const G4int maxNumberOfAttempts = 1000;
1673 attempt++;
if( attempt == 100*(attempt/100) ) {SigPt/=2.;}
1675 ProjSumMt=0.; ProjSumMt2perX=0.;
1676 TargSumMt=0.; TargSumMt2perX=0.;
1680 #ifdef debugQGSParticipants
1681 G4cout<<
"attempt ------------------------ "<<attempt<<
G4endl;
1688 G4int NumberOfUnsampledSeaQuarks = 2*nSeaPair;
1691 for (
G4int aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
1694 #ifdef debugQGSParticipants
1697 aPtVector = GaussianPt(SigPt, aHugeValue);
1699 SumPx += aPtVector.
x(); SumPy += aPtVector.
y();
1700 Mt = std::sqrt(aPtVector.
mag2()+
sqr(Qmass));
1704 tmp.
setPz(
SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta)*(1.0-SumZ));
1707 NumberOfUnsampledSeaQuarks--;
1708 ProjSumMt2perX +=
sqr(Mt)/tmp.
pz();
1713 #ifdef debugQGSParticipants
1717 aPtVector = GaussianPt(SigPt, aHugeValue);
1719 SumPx += aPtVector.
x(); SumPy += aPtVector.
y();
1720 Mt = std::sqrt(aPtVector.
mag2()+
sqr(Qmass));
1724 tmp.
setPz(
SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta)*(1.0-SumZ));
1727 NumberOfUnsampledSeaQuarks--;
1728 ProjSumMt2perX +=
sqr(Mt)/tmp.
pz();
1731 #ifdef debugQGSParticipants
1738 #ifdef debugQGSParticipants
1741 aPtVector = GaussianPt(SigPt, aHugeValue);
1743 SumPx += aPtVector.
x(); SumPy += aPtVector.
y();
1744 Mt = std::sqrt(aPtVector.
mag2()+
sqr(VqM_pr));
1748 tmp.
setPz(
SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta)*(1.0-SumZ));
1751 ProjSumMt2perX +=
sqr(Mt)/tmp.
pz();
1757 #ifdef debugQGSParticipants
1763 Mt = std::sqrt(
sqr(SumPx) +
sqr(SumPy) +
sqr(VaqM_pr) );
1767 ProjSumMt2perX +=
sqr(Mt)/tmp.
pz();
1770 #ifdef debugQGSParticipants
1771 G4cout<<
" "<<tmp<<
" "<<SumZ+(1.-SumZ)<<
" (z-fraction)"<<
G4endl;
1781 nSeaPair = (*i)->GetSoftCollisionCount()-1;
1782 #ifdef debugQGSParticipants
1784 <<
"Target nucleon 4Mom "<<(*i)->Get4Momentum()<<
G4endl;
1787 SumPx = (*i)->Get4Momentum().px() * (-1.);
1788 SumPy = (*i)->Get4Momentum().py() * (-1.);
1791 NumberOfUnsampledSeaQuarks = 2*nSeaPair;
1794 for (
G4int aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
1796 aParton = (*i)->GetNextParton();
1797 #ifdef debugQGSParticipants
1800 aPtVector = GaussianPt(SigPt, aHugeValue);
1802 SumPx += aPtVector.
x(); SumPy += aPtVector.
y();
1803 Mt=std::sqrt(aPtVector.
mag2()+
sqr(Qmass));
1807 tmp.
setPz(
SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta)*(1.0-SumZ));
1809 tmp.
setPz((*i)->Get4Momentum().pz()*tmp.
pz());
1810 NumberOfUnsampledSeaQuarks--;
1811 TargSumMt2perX +=
sqr(Mt)/tmp.
pz();
1815 aParton = (*i)->GetNextAntiParton();
1816 #ifdef debugQGSParticipants
1820 aPtVector = GaussianPt(SigPt, aHugeValue);
1822 SumPx += aPtVector.
x(); SumPy += aPtVector.
y();
1823 Mt=std::sqrt(aPtVector.
mag2()+
sqr(Qmass));
1827 tmp.
setPz(
SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta)*(1.0-SumZ));
1829 tmp.
setPz((*i)->Get4Momentum().pz()*tmp.
pz());
1830 NumberOfUnsampledSeaQuarks--;
1831 TargSumMt2perX +=
sqr(Mt)/tmp.
pz();
1834 #ifdef debugQGSParticipants
1840 aParton = (*i)->GetNextParton();
1841 #ifdef debugQGSParticipants
1844 aPtVector = GaussianPt(SigPt, aHugeValue);
1846 SumPx += aPtVector.
x(); SumPy += aPtVector.
y();
1847 Mt=std::sqrt(aPtVector.
mag2()+
sqr(VqM_tr));
1851 tmp.
setPz(
SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta)*(1.0-SumZ));
1853 tmp.
setPz((*i)->Get4Momentum().pz()*tmp.
pz());
1854 TargSumMt2perX +=
sqr(Mt)/tmp.
pz();
1859 aParton = (*i)->GetNextAntiParton();
1860 #ifdef debugQGSParticipants
1862 G4cout<<
" "<<tmp<<
" "<<SumZ<<
" (total z-sum) "<<
G4endl;
1866 Mt=std::sqrt(
sqr(SumPx) +
sqr(SumPy) +
sqr(VqqM_tr) );
1869 tmp.
setPz((*i)->Get4Momentum().pz()*(1.0 - SumZ));
1870 TargSumMt2perX +=
sqr(Mt)/tmp.
pz();
1873 #ifdef debugQGSParticipants
1874 G4cout<<
" "<<tmp<<
" "<<1.0<<
" "<<(*i)->Get4Momentum().
pz()<<
G4endl;
1879 if( ProjSumMt + TargSumMt > SqrtS ) {
1880 Success =
false;
continue;}
1881 if( std::sqrt(ProjSumMt2perX) + std::sqrt(TargSumMt2perX) > SqrtS ) {
1882 Success =
false;
continue;}
1884 }
while( (!Success) &&
1885 attempt < maxNumberOfAttempts );
1887 if ( attempt >= maxNumberOfAttempts ) {
1894 - 2.0*
S*ProjSumMt2perX - 2.0*
S*TargSumMt2perX - 2.0*ProjSumMt2perX*TargSumMt2perX;
1896 G4double targetWminus=(
S - ProjSumMt2perX + TargSumMt2perX + std::sqrt( DecayMomentum2 ))/2.0/SqrtS;
1897 G4double projectileWplus = SqrtS - TargSumMt2perX/targetWminus;
1903 #ifdef debugQGSParticipants
1904 G4cout<<
"Backward transformation ===================="<<
G4endl;
1908 for (
G4int aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
1911 #ifdef debugQGSParticipants
1916 Tmp.
setPz(projectileWplus*z/2.0 - Tmp.
e()/(2.0*z*projectileWplus));
1917 Tmp.
setE( projectileWplus*z/2.0 + Tmp.
e()/(2.0*z*projectileWplus));
1923 #ifdef debugQGSParticipants
1928 Tmp.
setPz(projectileWplus*z/2.0 - Tmp.
e()/(2.0*z*projectileWplus));
1929 Tmp.
setE( projectileWplus*z/2.0 + Tmp.
e()/(2.0*z*projectileWplus));
1933 #ifdef debugQGSParticipants
1940 #ifdef debugQGSParticipants
1944 Tmp.
setPz(projectileWplus*z/2.0 - Tmp.
e()/(2.0*z*projectileWplus));
1945 Tmp.
setE( projectileWplus*z/2.0 + Tmp.
e()/(2.0*z*projectileWplus));
1952 #ifdef debugQGSParticipants
1957 Tmp.
setPz(projectileWplus*z/2.0 - Tmp.
e()/(2.0*z*projectileWplus));
1958 Tmp.
setE( projectileWplus*z/2.0 + Tmp.
e()/(2.0*z*projectileWplus));
1963 #ifdef debugQGSParticipants
1973 nSeaPair = (*i)->GetSoftCollisionCount()-1;
1974 #ifdef debugQGSParticipants
1975 G4cout<<
"nSeaPair of target and N# "<<nSeaPair<<
" "<<NuclNo<<
G4endl;
1978 for (
G4int aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
1980 aParton = (*i)->GetNextParton();
1981 #ifdef debugQGSParticipants
1985 Tmp.
setPz(-targetWminus*z/2.0 + Tmp.
e()/(2.0*z*targetWminus));
1986 Tmp.
setE( targetWminus*z/2.0 + Tmp.
e()/(2.0*z*targetWminus));
1991 aParton = (*i)->GetNextAntiParton();
1992 #ifdef debugQGSParticipants
1997 Tmp.
setPz(-targetWminus*z/2.0 + Tmp.
e()/(2.0*z*targetWminus));
1998 Tmp.
setE( targetWminus*z/2.0 + Tmp.
e()/(2.0*z*targetWminus));
2002 #ifdef debugQGSParticipants
2009 aParton = (*i)->GetNextParton();
2010 #ifdef debugQGSParticipants
2014 Tmp.
setPz(-targetWminus*z/2.0 + Tmp.
e()/(2.0*z*targetWminus));
2015 Tmp.
setE( targetWminus*z/2.0 + Tmp.
e()/(2.0*z*targetWminus));
2021 aParton = (*i)->GetNextAntiParton();
2022 #ifdef debugQGSParticipants
2027 Tmp.
setPz(-targetWminus*z/2.0 + Tmp.
e()/(2.0*z*targetWminus));
2028 Tmp.
setE( targetWminus*z/2.0 + Tmp.
e()/(2.0*z*targetWminus));
2032 #ifdef debugQGSParticipants
2046 G4double Obeta = 1./(aBeta + (alpha + 1.)*nSea + 1.);
2049 const G4int maxNumberOfLoops = 1000;
2050 G4int loopCounter = 0;
2056 }
while( ( r12 > 1.) &&
2057 ++loopCounter < maxNumberOfLoops );
2058 if ( loopCounter >= maxNumberOfLoops ) {
2067void G4QGSParticipants::CreateStrings()
2070 #ifdef debugQGSParticipants
2075 #ifdef debugQGSParticipants
2076 G4cout<<
"BAD situation: theProjectileSplitable is NULL ! Returning immediately"<<
G4endl;
2081 #ifdef debugQGSParticipants
2093 #ifdef debugQGSParticipants
2108 G4int N_EnvTarg = NumberOfInvolvedNucleonsOfTarget;
2110 for (
G4int i = 0; i < N_EnvTarg; i++ ) {
2111 G4Nucleon* aTargetNucleon = TheInvolvedNucleonsOfTarget[ i ];
2115 #ifdef debugQGSParticipants
2125 #ifdef debugQGSParticipants
2143 #ifdef debugQGSParticipants
2145 G4cout<<
"Strings created in soft interactions"<<
G4endl;
2147 std::vector<G4InteractionContent*>::iterator i;
2154 #ifdef debugQGSParticipants
2155 G4cout<<
"An interaction # and soft coll. # "<<IntNo<<
" "
2168 #ifdef debugQGSParticipants
2183 #ifdef debugQGSParticipants
2191 #ifdef debugQGSParticipants
2207 #ifdef debugQGSParticipants
2214void G4QGSParticipants::GetResiduals() {
2217 #ifdef debugQGSParticipants
2218 G4cout <<
"GetResiduals(): GetProjectileNucleus()? " << GetProjectileNucleus() <<
G4endl;
2221 #ifdef debugQGSParticipants
2222 G4cout <<
"NumberOfInvolvedNucleonsOfTarget "<< NumberOfInvolvedNucleonsOfTarget <<
G4endl;
2225 G4double DeltaExcitationE = TargetResidualExcitationEnergy /
G4double( NumberOfInvolvedNucleonsOfTarget );
2227 G4double( NumberOfInvolvedNucleonsOfTarget );
2229 for (
G4int i = 0; i < NumberOfInvolvedNucleonsOfTarget; i++ ) {
2230 G4Nucleon* aNucleon = TheInvolvedNucleonsOfTarget[i];
2232 #ifdef debugQGSParticipants
2244 if( TargetResidualMassNumber != 0 )
2256 residualMomentum +=tmp;
2260 residualMomentum/=TargetResidualMassNumber;
2278 const G4int maxNumberOfLoops = 1000;
2279 G4int loopCounter = 0;
2296 if(SumMasses > Mass) {Chigh=
C;}
2299 }
while( (Chigh-Clow > 0.01) &&
2300 ++loopCounter < maxNumberOfLoops );
2301 if ( loopCounter >= maxNumberOfLoops ) {
2302 #ifdef debugQGSParticipants
2323 #ifdef debugQGSParticipants
2324 G4cout <<
"End GetResiduals -----------------" <<
G4endl;
2333 std::vector<G4InteractionContent*>::iterator i;
2348 #ifdef debugQGSParticipants
2356 #ifdef debugQGSParticipants
2363 #ifdef debugQGSParticipants
2371 #ifdef debugQGSParticipants
2383 #ifdef debugQGSParticipants
2400 if ((!(aPrimaryMomentum.
e()>-1)) && (!(aPrimaryMomentum.
e()<1)) )
2403 "G4GammaParticipants::SelectInteractions: primary nan energy.");
2405 G4double S = (aPrimaryMomentum + aTargetNMomentum).mag2();
2409 #ifdef debugQGSParticipants
2410 G4cout <<
"Gamma projectile - SelectInteractions " <<
G4endl;
2435 {
if(NucleonNo == theCurrent)
break; NucleonNo++; }
2440 pNucleon->
Hit(aTarget);
G4double S(G4double temp)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4ThreadLocal G4int G4QGSParticipants_NPart
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
void setVect(const Hep3Vector &)
Hep3Vector findBoostToCM() const
HepLorentzVector & transform(const HepRotation &)
static G4Gamma * GammaDefinition()
void SetNumberOfDiffractiveCollisions(int)
void SetTargetNucleon(G4Nucleon *aNucleon)
G4Nucleon * GetTargetNucleon() const
void SetNumberOfSoftCollisions(int)
G4VSplitableHadron * GetProjectile() const
G4int GetNumberOfSoftCollisions()
void SetTarget(G4VSplitableHadron *aTarget)
void SetStatus(G4int aValue)
G4VSplitableHadron * GetTarget() const
static G4KaonMinus * KaonMinusDefinition()
static G4KaonPlus * KaonPlusDefinition()
const G4ThreeVector & GetPosition() const
void SetPosition(const G4ThreeVector aPosition)
void SetMomentum(G4LorentzVector &aMomentum)
G4VSplitableHadron * GetSplitableHadron() const
virtual const G4LorentzVector & Get4Momentum() const
void Hit(G4VSplitableHadron *aHit)
G4double GetBindingEnergy() const
void SetBindingEnergy(G4double anEnergy)
virtual const G4ParticleDefinition * GetDefinition() const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const
const G4String & GetParticleName() const
G4IonTable * GetIonTable() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4Parton * GetParton2(void)
G4Parton * GetParton1(void)
G4ParticleDefinition * GetDefinition()
void Set4Momentum(const G4LorentzVector &aMomentum)
const G4LorentzVector & Get4Momentum() const
static G4PionMinus * PionMinusDefinition()
static G4PionPlus * PionPlusDefinition()
static G4PionZero * PionZeroDefinition()
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
virtual G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4bool ProjectileDiffraction=TRUE) const
virtual G4Parton * GetNextParton()
virtual G4Parton * GetNextAntiParton()
const G4double ThresholdParameter
G4double SampleX(G4double anXmin, G4int nSea, G4int theTotalSea, G4double aBeta)
G4ThreeVector theCurrentVelocity
G4QuarkExchange theQuarkExchange
G4SingleDiffractiveExcitation theSingleDiffExcitation
virtual void DoLorentzBoost(G4ThreeVector aBoost)
std::vector< G4InteractionContent * > theInteractions
G4bool DeterminePartonMomenta()
virtual G4VSplitableHadron * SelectInteractions(const G4ReactionProduct &thePrimary)
void PerformDiffractiveCollisions()
G4QGSDiffractiveExcitation theDiffExcitaton
G4QGSMSplitableHadron * theProjectileSplitable
virtual ~G4QGSParticipants()
const G4double QGSMThreshold
const G4double theNucleonRadius
void BuildInteractions(const G4ReactionProduct &thePrimary)
std::vector< G4PartonPair * > thePartonPairs
std::vector< G4VSplitableHadron * > theTargets
void PerformSoftCollisions()
G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
const G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void GetProbabilities(G4double B, G4int Mode, G4double &Pint, G4double &Pprd, G4double &Ptrd, G4double &Pdd, G4double &Pnd, G4double &Pnvr)
G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4bool ProjectileDiffraction) const
virtual void SortNucleonsIncZ()=0
virtual G4double GetOuterRadius()=0
virtual G4Nucleon * GetNextNucleon()=0
virtual G4int GetCharge()=0
virtual G4bool StartLoop()=0
virtual void Init(G4int theA, G4int theZ, G4int numberOfLambdas=0)=0
std::pair< G4double, G4double > ChooseImpactXandY(G4double maxImpact)
virtual G4int GetMassNumber()=0
virtual void SetProjectileNucleus(G4V3DNucleus *aNucleus)
G4V3DNucleus * theNucleus
void SetTimeOfCreation(G4double aTime)
void SetStatus(const G4int aStatus)
void SetCollisionCount(G4int aCount)
const G4ParticleDefinition * GetDefinition() const
G4double GetTimeOfCreation()
void Set4Momentum(const G4LorentzVector &a4Momentum)
virtual G4Parton * GetNextParton()=0
virtual G4Parton * GetNextAntiParton()=0
void SetDefinition(const G4ParticleDefinition *aDefinition)
const G4LorentzVector & Get4Momentum() const
const G4ThreeVector & GetPosition() const
void IncrementCollisionCount(G4int aCount)
G4int GetSoftCollisionCount()