125 if ( aNucleon )
delete aNucleon;
133 if ( aNucleon )
delete aNucleon;
153 <<
"FTF init Target A Z " << aNucleus.
GetA_asInt()
279 G4cout <<
"FTF PutOnMassShell Success? " << Success <<
G4endl;
291 G4cout <<
"FTF ExciteParticipants Success? " << Success <<
G4endl;
297 G4cout <<
"FTF BuildStrings ";
303 G4cout <<
"FTF BuildStrings " << theStrings <<
" OK" << G4endl
304 <<
"FTF GetResiduals of Nuclei " <<
G4endl;
315 std::vector< G4VSplitableHadron* > primaries;
320 if ( primaries.end() ==
321 std::find( primaries.begin(), primaries.end(), interaction.
GetProjectile() ) ) {
335 if ( aNucleon )
delete aNucleon;
337 NumberOfInvolvedNucleonsOfProjectile = 0;
342 if ( aNucleon )
delete aNucleon;
344 NumberOfInvolvedNucleonsOfTarget = 0;
347 G4cout <<
"End of FTF. Go to fragmentation" << G4endl
348 <<
"To continue - enter 1, to stop - ^C" <<
G4endl;
375 G4cout <<
"G4FTFModel::StoreInvolvedNucleon -------------" <<
G4endl;
390 while ( ( aProjectileNucleon = theProjectileNucleus->
GetNextNucleon() ) ) {
414 #ifdef debugReggeonCascade
415 G4cout <<
"G4FTFModel::ReggeonCascade -----------" <<
G4endl
418 <<
"ExcitationE/WN " << ExcitationE <<
G4endl;
424 for (
G4int InvTN = 0; InvTN < InitNINt; InvTN++ ) {
452 Neighbour->
Hit( targetSplitable );
460 #ifdef debugReggeonCascade
461 G4cout <<
"Final NumberOfInvolvedNucleonsOfTarget "
481 while ( ( Neighbour = theProjectileNucleus->
GetNextNucleon() ) ) {
491 NumberOfInvolvedNucleonsOfProjectile++;
496 Neighbour->
Hit( projectileSplitable );
504 #ifdef debugReggeonCascade
505 G4cout <<
"NumberOfInvolvedNucleonsOfProjectile "
506 << NumberOfInvolvedNucleonsOfProjectile << G4endl <<
G4endl;
515 G4bool isProjectileNucleus =
false;
517 isProjectileNucleus =
true;
520 #ifdef debugPutOnMassShell
522 if ( isProjectileNucleus ) {
523 G4cout <<
"PutOnMassShell for Nucleus_Nucleus " <<
G4endl;
528 if ( Pprojectile.z() < 0.0 ) {
540 #ifdef debugPutOnMassShell
546 if ( ! isOk )
return false;
555 if ( ! isProjectileNucleus ) {
556 Mprojectile = Pprojectile.mag();
557 M2projectile = Pprojectile.mag2();
558 SumMasses += Mprojectile + 20.0*
MeV;
560 #ifdef debugPutOnMassShell
561 G4cout <<
"Projectile : ";
566 if ( ! isOk )
return false;
573 #ifdef debugPutOnMassShell
574 G4cout <<
"Psum " << Psum/
GeV <<
" GeV" << G4endl <<
"SqrtS " << SqrtS/
GeV <<
" GeV" << G4endl
575 <<
"SumMasses, PrResidualMass and TargetResidualMass " << SumMasses/
GeV <<
" "
576 << PrResidualMass/
GeV <<
" " << TargetResidualMass/
GeV <<
" GeV" <<
G4endl;
579 if ( SqrtS < SumMasses ) {
585 G4double savedSumMasses = SumMasses;
586 if ( isProjectileNucleus ) {
587 SumMasses -= std::sqrt(
sqr( PrResidualMass ) + PprojResidual.perp2() );
589 + PprojResidual.perp2() );
591 SumMasses -= std::sqrt(
sqr( TargetResidualMass ) + PtargetResidual.perp2() );
593 + PtargetResidual.perp2() );
595 if ( SqrtS < SumMasses ) {
596 SumMasses = savedSumMasses;
597 if ( isProjectileNucleus ) {
604 if ( isProjectileNucleus ) {
608 #ifdef debugPutOnMassShell
609 if ( isProjectileNucleus ) {
610 G4cout <<
"PrResidualMass ProjResidualExcitationEnergy " << PrResidualMass/
GeV <<
" "
613 G4cout <<
"TargetResidualMass TargetResidualExcitationEnergy " << TargetResidualMass/
GeV <<
" "
615 <<
"Sum masses " << SumMasses/
GeV <<
G4endl;
619 if ( isProjectileNucleus && thePrNucleus->
GetMassNumber() != 1 ) {
628 if ( ! isOk )
return false;
639 if ( Ptmp.pz() <= 0.0 ) {
646 if ( isProjectileNucleus ) {
648 YprojectileNucleus = Ptmp.rapidity();
650 Ptmp = toCms*Ptarget;
651 G4double YtargetNucleus = Ptmp.rapidity();
655 if ( isProjectileNucleus ) {
662 #ifdef debugPutOnMassShell
663 if ( isProjectileNucleus ) {
664 G4cout <<
"Y projectileNucleus " << YprojectileNucleus <<
G4endl;
666 G4cout <<
"Y targetNucleus " << YtargetNucleus << G4endl
668 <<
" DcorP DcorT " << DcorP <<
" " << DcorT <<
" AveragePt2 " << AveragePt2 <<
G4endl;
675 G4int NumberOfTries = 0;
677 G4bool OuterSuccess =
true;
683 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
689 DcorP *= ScaleFactor;
690 DcorT *= ScaleFactor;
691 AveragePt2 *= ScaleFactor;
693 if ( isProjectileNucleus ) {
696 thePrNucleus, PprojResidual,
704 theTargetNucleus, PtargetResidual,
709 #ifdef debugPutOnMassShell
710 G4cout <<
"SqrtS, Mp+Mt, Mp, Mt " << SqrtS/
GeV <<
" "
711 << ( std::sqrt( M2proj ) + std::sqrt( M2target) )/
GeV <<
" "
712 << std::sqrt( M2proj )/
GeV <<
" " << std::sqrt( M2target )/
GeV <<
G4endl;
715 if ( ! isOk )
return false;
716 }
while ( SqrtS < std::sqrt( M2proj ) + std::sqrt( M2target ) );
717 if ( isProjectileNucleus ) {
718 isOk =
CheckKinematics( S, SqrtS, M2proj, M2target, YprojectileNucleus,
true,
721 WminusTarget, WplusProjectile, OuterSuccess );
726 WminusTarget, WplusProjectile, OuterSuccess );
727 if ( ! isOk )
return false;
728 }
while ( ! OuterSuccess );
736 if ( ! isProjectileNucleus ) {
738 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
739 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
740 Pprojectile.setPz( Pzprojectile );
741 Pprojectile.setE( Eprojectile );
743 #ifdef debugPutOnMassShell
744 G4cout <<
"Proj after in CMS " << Pprojectile <<
G4endl;
747 Pprojectile.transform( toLab );
756 #ifdef debugPutOnMassShell
766 #ifdef debugPutOnMassShell
770 if ( ! isOk )
return false;
774 #ifdef debugPutOnMassShell
784 #ifdef debugPutOnMassShell
788 if ( ! isOk )
return false;
792 #ifdef debugPutOnMassShell
805 #ifdef debugBuildString
806 G4cout <<
"G4FTFModel::ExciteParticipants() " <<
G4endl;
809 G4bool Successfull(
true );
811 if ( MaxNumOfInelCollisions > 0 ) {
813 if (
G4UniformRand() < ProbMaxNumber ) MaxNumOfInelCollisions++;
816 MaxNumOfInelCollisions = 1;
819 #ifdef debugBuildString
820 G4cout <<
"MaxNumOfInelCollisions MaxNumOfInelCollisions " << MaxNumOfInelCollisions <<
G4endl;
823 G4int CurrentInteraction( 0 );
828 CurrentInteraction++;
835 #ifdef debugBuildString
836 G4cout << G4endl <<
"Interaction # Status " << CurrentInteraction <<
" "
837 << collision.
GetStatus() << G4endl <<
"Pr* Tr* " << projectile <<
" "
838 << target << G4endl <<
"projectile->GetStatus target->GetStatus "
848 #ifdef debugBuildString
853 G4bool Annihilation =
false;
855 TargetNucleon, Annihilation );
856 if ( ! Result )
continue;
863 #ifdef debugBuildString
864 G4cout <<
"Inelastic interaction" << G4endl
865 <<
"MaxNumOfInelCollisions " << MaxNumOfInelCollisions <<
G4endl;
869 G4bool Annihilation =
false;
871 TargetNucleon, Annihilation );
872 if ( ! Result )
continue;
884 #ifdef debugBuildString
897 #ifdef debugBuildString
898 G4cout <<
"FTF excitation Non Successfull -> Elastic scattering "
904 #ifdef debugBuildString
905 G4cout <<
"Elastic scat. at rejection inelastic scattering" <<
G4endl;
919 #ifdef debugBuildString
928 if ( projectile == NextProjectileNucleon || target == NextTargetNucleon ) {
939 G4bool Annihilation =
true;
941 TargetNucleon, Annihilation );
942 if ( ! Result )
continue;
946 Successfull = Successfull ||
true;
948 #ifdef debugBuildString
949 G4cout <<
"Annihilation successfull. " <<
"*AdditionalString "
950 << AdditionalString <<
G4endl;
960 #ifdef debugBuildString
961 G4cout <<
"----------------------------- Final properties " << G4endl
962 <<
"projectile->GetStatus target->GetStatus " << projectile->
GetStatus()
963 <<
" " << target->
GetStatus() << G4endl <<
"projectile->GetSoftC target->GetSoftC "
965 << G4endl <<
"ExciteParticipants() Successfull? " << Successfull <<
G4endl;
983 G4cout <<
"AdjustNucleons ---------------------------------------" <<
G4endl
987 <<
"Pr ResidualMassNumber Pr ResidualCharge Pr ResidualExcitationEnergy "
990 <<
"Tr ResidualMassNumber Tr ResidualCharge Tr ResidualExcitationEnergy "
1005 G4double DcorP( 0.0 ), DcorT( 0.0 );
1011 G4double ExcitationEnergyPerWoundedNucleon =
1025 G4cout <<
"case 1, hA prcol=0 trcol=0, AA prcol#0 trcol=0" <<
G4endl;
1055 toCms.rotateZ( -1*Ptmp.phi() );
1056 toCms.rotateY( -1*Ptmp.theta() );
1057 Pprojectile.transform( toCms );
1069 ExcitationEnergyPerWoundedNucleon;
1070 if ( TResidualMassNumber <= 1 ) {
1071 TResidualExcitationEnergy = 0.0;
1075 if ( TResidualMassNumber != 0 ) {
1077 ->
GetIonMass( TResidualCharge, TResidualMassNumber );
1089 if ( ! Annihilation ) {
1090 if ( SqrtS < SumMasses ) {
1093 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1096 G4cout <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1099 TResidualExcitationEnergy = SqrtS - SumMasses;
1102 G4cout <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1110 if ( Annihilation ) {
1113 G4cout <<
"SqrtS < SumMasses - TNucleonMass " << SqrtS <<
" "
1114 << SumMasses - TNucleonMass <<
G4endl;
1117 if ( SqrtS < SumMasses - TNucleonMass ) {
1122 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1125 if ( SqrtS < SumMasses ) {
1126 TNucleonMass = SqrtS - (SumMasses - TNucleonMass) - TResidualExcitationEnergy;
1132 SumMasses = SqrtS - TResidualExcitationEnergy;
1138 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1141 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1142 TResidualExcitationEnergy = SqrtS - SumMasses;
1154 Ptmp.setPx( 0.0 ); Ptmp.setPy( 0.0 ); Ptmp.setPz( 0.0 );
1161 Pprojectile = Ptmp; Pprojectile.transform( toLab );
1165 Ptmp.setE( TNucleonMass );
1171 Ptarget = Ptmp; Ptarget.transform( toLab );
1185 Ptmp.transform( toLab );
1195 G4double Mprojectile = Pprojectile.mag();
1196 G4double M2projectile = Pprojectile.mag2();
1200 G4double YtargetNucleus = TResidual4Momentum.rapidity();
1202 TResidualMass += TResidualExcitationEnergy;
1211 G4int NumberOfTries( 0 );
1213 G4bool OuterSuccess(
true );
1216 OuterSuccess =
true;
1222 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1225 DcorT *= ScaleFactor;
1226 AveragePt2 *= ScaleFactor;
1236 G4bool InerSuccess =
true;
1241 PtNucleon =
GaussianPt( AveragePt2, maxPtSquare );
1242 PtResidual = -PtNucleon;
1244 G4double Mtarget = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) +
1245 std::sqrt(
sqr( TResidualMass ) + PtResidual.mag2() );
1246 if ( SqrtS < Mprojectile + Mtarget ) {
1247 InerSuccess =
false;
1252 G4double Xcenter = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) / Mtarget;
1253 XminusNucleon = Xcenter + tmpX.x();
1254 if ( XminusNucleon <= 0.0 || XminusNucleon >= 1.0 ) {
1255 InerSuccess =
false;
1259 XminusResidual = 1.0 - XminusNucleon;
1260 }
while ( ! InerSuccess );
1262 XminusNucleon = 1.0;
1263 XminusResidual = 1.0;
1267 M2target = (
sqr( TNucleonMass ) + PtNucleon.mag2() ) / XminusNucleon +
1268 (
sqr( TResidualMass ) + PtResidual.mag2() ) / XminusResidual;
1270 }
while ( SqrtS < Mprojectile + std::sqrt( M2target) );
1273 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
1275 WminusTarget = ( S - M2projectile + M2target + std::sqrt( DecayMomentum2 ) ) / 2.0 / SqrtS;
1276 WplusProjectile = SqrtS - M2target / WminusTarget;
1278 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
1279 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
1280 G4double Yprojectile = 0.5 * std::log( (Eprojectile + Pzprojectile) /
1281 (Eprojectile - Pzprojectile) );
1284 G4cout <<
"DecayMomentum2 " << DecayMomentum2 << G4endl
1285 <<
"WminusTarget WplusProjectile " << WminusTarget <<
" " << WplusProjectile
1286 << G4endl <<
"Yprojectile " << Yprojectile <<
G4endl;
1289 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1290 G4double Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1291 G4double E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1292 G4double YtargetNucleon = 0.5 * std::log( (E + Pz)/(E - Pz) );
1295 G4cout <<
"YtN Ytr YtN-Ytr " <<
" " << YtargetNucleon <<
" " << YtargetNucleus <<
" "
1296 << YtargetNucleon - YtargetNucleus << G4endl
1297 <<
"YtN Ypr YtN-Ypr " <<
" " << YtargetNucleon <<
" " << Yprojectile
1298 <<
" " << YtargetNucleon - Yprojectile <<
G4endl;
1301 if ( std::abs( YtargetNucleon - YtargetNucleus ) > 2 || Yprojectile < YtargetNucleon ) {
1302 OuterSuccess =
false;
1306 }
while ( ! OuterSuccess );
1308 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
1309 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
1310 Pprojectile.setPz( Pzprojectile ); Pprojectile.setE( Eprojectile );
1313 G4cout <<
"Proj after in CMS " << Pprojectile <<
G4endl;
1316 Pprojectile.transform( toLab );
1324 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1325 G4double Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1326 G4double E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1328 Ptarget.setPx( PtNucleon.x() ); Ptarget.setPy( PtNucleon.y() );
1329 Ptarget.setPz( Pz ); Ptarget.setE( E );
1330 Ptarget.transform( toLab );
1343 G4cout <<
"TargetResidualMassNumber TargetResidualCharge TargetResidualExcitationEnergy "
1349 Mt2 =
sqr( TResidualMass ) + PtResidual.mag2();
1350 Pz = -WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
1351 E = WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
1353 TargetResidual4Momentum.setPx( PtResidual.x() );
1354 TargetResidual4Momentum.setPy( PtResidual.y() );
1355 TargetResidual4Momentum.setPz( Pz );
1356 TargetResidual4Momentum.setE( E );
1359 G4cout <<
"New Residu " << TargetResidual4Momentum <<
" CMS" <<
G4endl;
1362 TargetResidual4Momentum.transform( toLab );
1365 G4cout <<
"New Residu " << TargetResidual4Momentum <<
" Lab" <<
G4endl;
1403 toCms.rotateZ( -1*Ptmp.phi() );
1404 toCms.rotateY( -1*Ptmp.theta() );
1407 Pprojectile.transform( toCms );
1416 ExcitationEnergyPerWoundedNucleon;
1417 if ( TResidualMassNumber <= 1 ) {
1418 TResidualExcitationEnergy = 0.0;
1422 if ( TResidualMassNumber != 0 ) {
1424 ->
GetIonMass( TResidualCharge , TResidualMassNumber );
1430 TNucleonMass + TResidualMass;
1433 G4cout <<
"SelectedTN.mag() PNMass + PResidualMass "
1435 << TNucleonMass <<
" " << TResidualMass <<
G4endl;
1440 if ( ! Annihilation ) {
1441 if ( SqrtS < SumMasses ) {
1444 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1445 TResidualExcitationEnergy = SqrtS - SumMasses;
1451 if ( Annihilation ) {
1452 if ( SqrtS < SumMasses - TNucleonMass ) {
1455 if ( SqrtS < SumMasses ) {
1456 TNucleonMass = SqrtS - (SumMasses - TNucleonMass);
1458 TResidualExcitationEnergy = 0.0;
1462 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1463 TResidualExcitationEnergy = SqrtS - SumMasses;
1475 Ptmp.setPx( 0.0 ); Ptmp.setPy( 0.0 ); Ptmp.setPz( 0.0 );
1476 Ptmp.setE( SelectedTargetNucleon->
Get4Momentum().mag() );
1477 Ptarget = Ptmp; Ptarget.transform( toLab );
1481 Ptmp.setE( TNucleonMass );
1482 Pprojectile = Ptmp; Pprojectile.transform( toLab );
1491 Ptmp.transform( toLab );
1498 G4double M2target = Ptarget.mag2();
1501 G4double YprojectileNucleus = TResidual4Momentum.rapidity();
1503 TResidualMass += TResidualExcitationEnergy;
1512 G4int NumberOfTries( 0 );
1514 G4bool OuterSuccess(
true );
1518 OuterSuccess =
true;
1524 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1527 DcorP *= ScaleFactor;
1528 AveragePt2 *= ScaleFactor;
1536 PtNucleon =
GaussianPt( AveragePt2, maxPtSquare );
1540 PtResidual = -PtNucleon;
1542 G4double Mprojectile = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) +
1543 std::sqrt(
sqr( TResidualMass ) + PtResidual.mag2() );
1546 G4cout <<
"SqrtS < Mtarget + Mprojectile " << SqrtS <<
" " << Mtarget
1547 <<
" " << Mprojectile <<
" " << Mtarget + Mprojectile <<
G4endl;
1550 M2projectile =
sqr( Mprojectile );
1551 if ( SqrtS < Mtarget + Mprojectile ) {
1552 OuterSuccess =
false;
1556 G4double Xcenter = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) / Mprojectile;
1558 G4bool InerSuccess =
true;
1563 XplusNucleon = Xcenter + tmpX.x();
1564 if ( XplusNucleon <= 0.0 || XplusNucleon >= 1.0 ) {
1565 InerSuccess =
false;
1568 XplusResidual = 1.0 - XplusNucleon;
1569 }
while ( ! InerSuccess );
1572 XplusResidual = 1.0;
1577 G4cout <<
"TNucleonMass PtNucleon XplusNucleon " << TNucleonMass <<
" " << PtNucleon
1578 <<
" " << XplusNucleon << G4endl
1579 <<
"TResidualMass PtResidual XplusResidual " << TResidualMass <<
" " << PtResidual
1580 <<
" " << XplusResidual <<
G4endl;
1583 M2projectile = (
sqr( TNucleonMass ) + PtNucleon.mag2() ) / XplusNucleon +
1584 (
sqr( TResidualMass ) + PtResidual.mag2() ) / XplusResidual;
1587 G4cout <<
"SqrtS < Mtarget + std::sqrt(M2projectile) " << SqrtS <<
" " << Mtarget
1588 <<
" " << std::sqrt( M2projectile ) <<
" " << Mtarget + std::sqrt( M2projectile )
1592 }
while ( SqrtS < Mtarget + std::sqrt( M2projectile ) );
1595 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
1597 WplusProjectile = ( S + M2projectile - M2target + std::sqrt( DecayMomentum2 ) )/2.0/SqrtS;
1598 WminusTarget = SqrtS - M2projectile/WplusProjectile;
1600 G4double Pztarget = -WminusTarget/2.0 + M2target/2.0/WminusTarget;
1601 G4double Etarget = WminusTarget/2.0 + M2target/2.0/WminusTarget;
1602 G4double Ytarget = 0.5 * std::log( (Etarget + Pztarget)/(Etarget - Pztarget) );
1605 G4cout <<
"DecayMomentum2 " << DecayMomentum2 << G4endl
1606 <<
"WminusTarget WplusProjectile " << WminusTarget <<
" " << WplusProjectile
1607 << G4endl <<
"YtargetNucleon " << Ytarget <<
G4endl;
1610 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1611 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
1612 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
1613 G4double YprojectileNucleon = 0.5 * std::log( (E + Pz)/(E - Pz) );
1616 G4cout <<
"YpN Ypr YpN-Ypr " <<
" " << YprojectileNucleon <<
" " << YprojectileNucleus
1617 <<
" " << YprojectileNucleon - YprojectileNucleus << G4endl
1618 <<
"YpN Ytr YpN-Ytr " <<
" " << YprojectileNucleon <<
" " << Ytarget
1619 <<
" " << YprojectileNucleon - Ytarget <<
G4endl;
1622 if ( std::abs( YprojectileNucleon - YprojectileNucleus ) > 2 ||
1623 Ytarget > YprojectileNucleon ) {
1624 OuterSuccess =
false;
1628 }
while ( ! OuterSuccess );
1631 G4double Pztarget = -WminusTarget/2.0 + M2target/2.0/WminusTarget;
1632 G4double Etarget = WminusTarget/2.0 + M2target/2.0/WminusTarget;
1633 Ptarget.setPz( Pztarget ); Ptarget.setE( Etarget );
1634 Ptarget.transform( toLab );
1642 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1643 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
1644 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
1645 Pprojectile.setPx( PtNucleon.x() ); Pprojectile.setPy( PtNucleon.y() );
1646 Pprojectile.setPz( Pz ); Pprojectile.setE( E );
1647 Pprojectile.transform( toLab );
1651 G4cout <<
"Proj after in Lab " << Pprojectile <<
G4endl;
1660 Mt2 =
sqr( TResidualMass ) + PtResidual.mag2();
1661 Pz = WplusProjectile*XplusResidual/2.0 - Mt2/(2.0*WplusProjectile*XplusResidual);
1662 E = WplusProjectile*XplusResidual/2.0 + Mt2/(2.0*WplusProjectile*XplusResidual);
1663 ProjectileResidual4Momentum.setPx( PtResidual.x() );
1664 ProjectileResidual4Momentum.setPy( PtResidual.y() );
1665 ProjectileResidual4Momentum.setPz( Pz );
1666 ProjectileResidual4Momentum.setE( E );
1667 ProjectileResidual4Momentum.transform( toLab );
1687 <<
"ProjectileResidualMassNumber ProjectileResidualCharge "
1699 toCms.rotateZ( -1*Ptmp.phi() );
1700 toCms.rotateY( -1*Ptmp.theta() );
1702 Pprojectile.transform( toCms );
1712 ExcitationEnergyPerWoundedNucleon;
1713 if ( PResidualMassNumber <= 1 ) {
1714 PResidualExcitationEnergy = 0.0;
1718 if ( PResidualMassNumber != 0 ) {
1720 ->
GetIonMass( PResidualCharge, PResidualMassNumber );
1729 ExcitationEnergyPerWoundedNucleon;
1730 if ( TResidualMassNumber <= 1 ) {
1731 TResidualExcitationEnergy = 0.0;
1734 if ( TResidualMassNumber != 0 ) {
1736 ->
GetIonMass( TResidualCharge, TResidualMassNumber );
1741 G4double SumMasses = PNucleonMass + PResidualMass + TNucleonMass + TResidualMass;
1744 G4cout <<
"PNucleonMass PResidualMass TNucleonMass TResidualMass " << PNucleonMass
1745 <<
" " << PResidualMass <<
" " << TNucleonMass <<
" " << TResidualMass << G4endl
1746 <<
"PResidualExcitationEnergy " << PResidualExcitationEnergy << G4endl
1747 <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1752 if ( ! Annihilation ) {
1755 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1758 if ( SqrtS < SumMasses ) {
1763 G4cout <<
"SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy "
1764 << SqrtS <<
" " << SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy
1768 if ( SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy ) {
1771 if ( PResidualExcitationEnergy <= 0.0 ) {
1772 TResidualExcitationEnergy = SqrtS - SumMasses;
1773 }
else if ( TResidualExcitationEnergy <= 0.0 ) {
1774 PResidualExcitationEnergy = SqrtS - SumMasses;
1776 G4double Fraction = (SqrtS - SumMasses) /
1777 (PResidualExcitationEnergy + TResidualExcitationEnergy);
1778 PResidualExcitationEnergy *= Fraction;
1779 TResidualExcitationEnergy *= Fraction;
1788 if ( Annihilation ) {
1789 if ( SqrtS < SumMasses - TNucleonMass ) {
1792 if ( SqrtS < SumMasses ) {
1794 TNucleonMass = SqrtS - (SumMasses - TNucleonMass);
1796 TResidualExcitationEnergy = 0.0;
1798 if ( SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy ) {
1800 if ( PResidualExcitationEnergy <= 0.0 ) {
1801 TResidualExcitationEnergy = SqrtS - SumMasses;
1802 }
else if ( TResidualExcitationEnergy <= 0.0 ) {
1803 PResidualExcitationEnergy = SqrtS - SumMasses;
1805 G4double Fraction = (SqrtS - SumMasses) /
1806 (PResidualExcitationEnergy + TResidualExcitationEnergy);
1807 PResidualExcitationEnergy *= Fraction;
1808 TResidualExcitationEnergy *= Fraction;
1816 Ptmp.setPx( 0.0 ); Ptmp.setPy( 0.0 ); Ptmp.setPz( 0.0 );
1817 Ptmp.setE( PNucleonMass );
1818 Pprojectile = Ptmp; Pprojectile.transform( toLab );
1827 Ptmp.transform( toLab );
1831 Ptmp.setPx( 0.0 ); Ptmp.setPy( 0.0 ); Ptmp.setPz( 0.0 );
1832 Ptmp.setE( TNucleonMass );
1833 Ptarget = Ptmp; Ptarget.transform( toLab );
1842 Ptmp.transform( toLab );
1843 TargetResidual4Momentum = Ptmp;
1849 G4double YprojectileNucleus = PResidual4Momentum.rapidity();
1852 G4cout <<
"YprojectileNucleus XcenterP " << YprojectileNucleus <<
G4endl;
1856 G4double YtargetNucleus = TResidual4Momentum.rapidity();
1858 PResidualMass += PResidualExcitationEnergy;
1859 TResidualMass += TResidualExcitationEnergy;
1876 G4int NumberOfTries( 0 );
1878 G4bool OuterSuccess(
true );
1882 OuterSuccess =
true;
1888 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1891 DcorP *= ScaleFactor;
1892 DcorT *= ScaleFactor;
1893 AveragePt2 *= ScaleFactor;
1901 PtNucleonP =
GaussianPt( AveragePt2, maxPtSquare );
1905 PtResidualP = -PtNucleonP;
1908 PtNucleonT =
GaussianPt( AveragePt2, maxPtSquare );
1912 PtResidualT = -PtNucleonT;
1914 G4double Mprojectile = std::sqrt(
sqr( PNucleonMass ) + PtNucleonP.mag2() ) +
1915 std::sqrt(
sqr( PResidualMass ) + PtResidualP.mag2() );
1916 M2projectile =
sqr( Mprojectile );
1918 G4double Mtarget = std::sqrt(
sqr( TNucleonMass ) + PtNucleonT.mag2() ) +
1919 std::sqrt(
sqr( TResidualMass ) + PtResidualT.mag2() );
1920 M2target =
sqr( Mtarget );
1922 if ( SqrtS < Mprojectile + Mtarget ) {
1923 OuterSuccess =
false;
1927 G4bool InerSuccess =
true;
1933 G4double XcenterP = std::sqrt(
sqr( PNucleonMass ) + PtNucleonP.mag2() ) / Mprojectile;
1934 XplusNucleon = XcenterP + tmpX.x();
1941 if ( XplusNucleon <= 0.0 || XplusNucleon >= 1.0 ) {
1942 InerSuccess =
false;
1945 XplusResidual = 1.0 - XplusNucleon;
1946 }
while ( ! InerSuccess );
1956 XplusResidual = 1.0;
1964 G4double XcenterT = std::sqrt(
sqr( TNucleonMass ) + PtNucleonT.mag2() ) / Mtarget;
1965 XminusNucleon = XcenterT + tmpX.x();
1966 if ( XminusNucleon <= 0.0 || XminusNucleon >= 1.0 ) {
1967 InerSuccess =
false;
1970 XminusResidual = 1.0 - XminusNucleon;
1971 }
while ( ! InerSuccess );
1973 XminusNucleon = 1.0;
1974 XminusResidual = 1.0;
1978 G4cout <<
"PtNucleonP " << PtNucleonP <<
" " << PtResidualP << G4endl
1979 <<
"XplusNucleon XplusResidual " << XplusNucleon <<
" " << XplusResidual << G4endl
1980 <<
"PtNucleonT " << PtNucleonT <<
" " << PtResidualT << G4endl
1981 <<
"XminusNucleon XminusResidual " << XminusNucleon <<
" " << XminusResidual
1985 M2projectile = (
sqr( PNucleonMass ) + PtNucleonP.mag2() ) / XplusNucleon +
1986 (
sqr( PResidualMass) + PtResidualP.mag2() ) / XplusResidual;
1987 M2target = (
sqr( TNucleonMass ) + PtNucleonT.mag2() ) / XminusNucleon +
1988 (
sqr( TResidualMass ) + PtResidualT.mag2() ) / XminusResidual;
1990 }
while ( SqrtS < std::sqrt( M2projectile ) + std::sqrt( M2target ) );
1993 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
1995 WplusProjectile = ( S + M2projectile - M2target + std::sqrt( DecayMomentum2 ) )/2.0/SqrtS;
1996 WminusTarget = SqrtS - M2projectile/WplusProjectile;
1998 G4double Mt2 =
sqr( PNucleonMass ) + PtNucleonP.mag2();
1999 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
2000 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
2001 G4double YprojectileNucleon = 0.5 * std::log( (E + Pz)/(E - Pz) );
2003 Mt2 =
sqr( TNucleonMass ) + PtNucleonT.mag2();
2004 Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2005 E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2006 G4double YtargetNucleon = 0.5 * std::log( (E + Pz)/(E - Pz) );
2008 if ( std::abs( YtargetNucleon - YtargetNucleus ) > 2 ||
2009 std::abs( YprojectileNucleon - YprojectileNucleus ) > 2 ||
2010 YprojectileNucleon < YtargetNucleon ) {
2011 OuterSuccess =
false;
2015 }
while ( ! OuterSuccess );
2021 G4double Mt2 =
sqr( PNucleonMass ) + PtNucleonP.mag2();
2022 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
2023 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
2025 Pprojectile.setPx( PtNucleonP.x() ); Pprojectile.setPy( PtNucleonP.y() );
2026 Pprojectile.setPz( Pz ); Pprojectile.setE( E );
2027 Pprojectile.transform( toLab );
2036 G4cout <<
"PResidualMass PtResidualP " << PResidualMass <<
" " << PtResidualP <<
G4endl;
2040 Mt2 =
sqr( PResidualMass ) + PtResidualP.mag2();
2041 Pz = WplusProjectile*XplusResidual/2.0 - Mt2/(2.0*WplusProjectile*XplusResidual);
2042 E = WplusProjectile*XplusResidual/2.0 + Mt2/(2.0*WplusProjectile*XplusResidual);
2043 ProjectileResidual4Momentum.setPx( PtResidualP.x() );
2044 ProjectileResidual4Momentum.setPy( PtResidualP.y() );
2045 ProjectileResidual4Momentum.setPz( Pz );
2046 ProjectileResidual4Momentum.setE( E );
2047 ProjectileResidual4Momentum.transform( toLab );
2053 G4cout <<
"Pr N R " << Pprojectile << G4endl <<
" "
2054 << ProjectileResidual4Momentum <<
G4endl;
2057 Mt2 =
sqr( TNucleonMass ) + PtNucleonT.mag2();
2058 Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2059 E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2061 Ptarget.setPx( PtNucleonT.x() ); Ptarget.setPy( PtNucleonT.y() );
2062 Ptarget.setPz( Pz ); Ptarget.setE( E );
2063 Ptarget.transform( toLab );
2072 Mt2 =
sqr( TResidualMass ) + PtResidualT.mag2();
2073 Pz = -WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
2074 E = WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
2076 TargetResidual4Momentum.setPx( PtResidualT.x() );
2077 TargetResidual4Momentum.setPy( PtResidualT.y() );
2078 TargetResidual4Momentum.setPz( Pz );
2079 TargetResidual4Momentum.setE( E) ;
2080 TargetResidual4Momentum.transform( toLab );
2086 G4cout <<
"Tr N R " << Ptarget << G4endl <<
" " << TargetResidual4Momentum <<
G4endl;
2108 std::vector< G4VSplitableHadron* > primaries;
2114 if ( primaries.end() == std::find( primaries.begin(), primaries.end(),
2121 #ifdef debugBuildString
2123 <<
"Number of projectile strings " << primaries.size() <<
G4endl;
2126 for (
unsigned int ahadron = 0; ahadron < primaries.size(); ahadron++ ) {
2127 G4bool isProjectile(
true );
2130 FirstString = 0; SecondString = 0;
2133 if ( primaries[ahadron]->GetStatus() <= 1 )
2138 else if(primaries[ahadron]->GetStatus() == 2)
2142 primaries[ahadron]->GetDefinition(),
2143 primaries[ahadron]->GetTimeOfCreation(),
2144 primaries[ahadron]->GetPosition(),
2146 if (FirstString)
delete FirstString;
2149 else {
G4cout<<
"Something wrong in FTF Model Build String" <<
G4endl;}
2151 if ( FirstString != 0 ) strings->push_back( FirstString );
2152 if ( SecondString != 0 ) strings->push_back( SecondString );
2154 #ifdef debugBuildString
2155 G4cout <<
"FirstString & SecondString? " << FirstString <<
" " << SecondString <<
G4endl;
2165 #ifdef debugBuildString
2168 G4cout <<
"Check 1 string " << strings->operator[](0)->GetRightParton()->GetPDGcode()
2169 <<
" " << strings->operator[](0)->GetLeftParton()->GetPDGcode() <<
G4endl <<
G4endl;
2178 #ifdef debugBuildString
2179 G4cout <<
"Building of projectile-like strings" <<
G4endl;
2182 G4bool isProjectile =
true;
2185 #ifdef debugBuildString
2186 G4cout <<
"Nucleon #, status, intCount " << ahadron <<
" "
2195 #ifdef debugBuildString
2196 G4cout << G4endl <<
"ahadron aProjectile Status " << ahadron <<
" " << aProjectile
2202 #ifdef debugBuildString
2203 G4cout <<
"Case1 aProjectile->GetStatus() == 0 " <<
G4endl;
2206 FirstString = 0; SecondString = 0;
2210 if ( FirstString != 0 ) strings->push_back( FirstString );
2211 if ( SecondString != 0 ) strings->push_back( SecondString );
2215 #ifdef debugBuildString
2216 G4cout <<
"Case2 aProjectile->GetStatus() !=0 St==1 SoftCol!=0" <<
G4endl;
2219 FirstString = 0; SecondString = 0;
2223 if ( FirstString != 0 ) strings->push_back( FirstString );
2224 if ( SecondString != 0 ) strings->push_back( SecondString );
2231 #ifdef debugBuildString
2232 G4cout <<
"Case3 aProjectile->GetStatus() !=0 St==1 SoftCol==0" <<
G4endl;
2235 FirstString = 0; SecondString = 0;
2239 if ( FirstString != 0 ) strings->push_back( FirstString );
2240 if ( SecondString != 0 ) strings->push_back( SecondString );
2242 #ifdef debugBuildString
2243 G4cout <<
" Strings are built for nucleon marked for an interaction, but"
2244 <<
" the interaction was skipped." <<
G4endl;
2250 #ifdef debugBuildString
2251 G4cout <<
"Case4 aProjectile->GetStatus() !=0 St==2 " <<
G4endl;
2254 FirstString = 0; SecondString = 0;
2258 if ( FirstString != 0 ) strings->push_back( FirstString );
2259 if ( SecondString != 0 ) strings->push_back( SecondString );
2261 #ifdef debugBuildString
2262 G4cout <<
" Strings are build for involved nucleon." <<
G4endl;
2267 #ifdef debugBuildString
2274 #ifdef debugBuildString
2282 #ifdef debugBuildString
2286 G4bool isProjectile =
false;
2290 #ifdef debugBuildString
2291 G4cout <<
"Nucleon #, status, intCount " << aNucleon <<
" " << ahadron <<
" "
2296 FirstString = 0 ; SecondString = 0;
2299 if ( FirstString != 0 ) strings->push_back( FirstString );
2300 if ( SecondString != 0 ) strings->push_back( SecondString );
2302 #ifdef debugBuildString
2308 FirstString = 0; SecondString = 0;
2311 if ( FirstString != 0 ) strings->push_back( FirstString );
2312 if ( SecondString != 0 ) strings->push_back( SecondString );
2314 #ifdef debugBuildString
2315 G4cout <<
" 2 case A string is build, nucleon was excited." <<
G4endl;
2323 FirstString = 0; SecondString = 0;
2327 if(SecondString == 0)
2339 if ( FirstString != 0 ) strings->push_back( FirstString );
2340 if ( SecondString != 0 ) strings->push_back( SecondString );
2342 #ifdef debugBuildString
2354 #ifdef debugBuildString
2358 }
else if(( aNucleon->
GetStatus() == 2 )||
2360 FirstString = 0; SecondString = 0;
2364 if(SecondString == 0)
2376 if ( FirstString != 0 ) strings->push_back( FirstString );
2377 if ( SecondString != 0 ) strings->push_back( SecondString );
2379 #ifdef debugBuildString
2385 #ifdef debugBuildString
2392 #ifdef debugBuildString
2397 isProjectile =
true;
2401 FirstString = 0; SecondString = 0;
2404 if ( FirstString != 0 ) strings->push_back( FirstString );
2405 if ( SecondString != 0 ) strings->push_back( SecondString );
2424 #ifdef debugFTFmodel
2425 G4cout <<
"GetResiduals(): HighEnergyInter? GetProjectileNucleus()?"
2431 #ifdef debugFTFmodel
2443 #ifdef debugFTFmodel
2456 #ifdef debugFTFmodel
2458 << G4endl <<
"ProjectileResidualExcitationEnergy ProjectileResidual4Momentum "
2470 #ifdef debugFTFmodel
2481 #ifdef debugFTFmodel
2487 #ifdef debugFTFmodel
2488 G4cout <<
"Low energy interaction: Target nucleus --------------" << G4endl
2489 <<
"Tr ResidualMassNumber Tr ResidualCharge Tr ResidualExcitationEnergy "
2494 G4int NumberOfTargetParticipant( 0 );
2504 if ( NumberOfTargetParticipant != 0 ) {
2517 delete targetSplitable;
2518 targetSplitable = 0;
2519 aNucleon->
Hit( targetSplitable );
2524 #ifdef debugFTFmodel
2525 G4cout <<
"NumberOfTargetParticipant " << NumberOfTargetParticipant << G4endl
2531 #ifdef debugFTFmodel
2532 G4cout <<
"Low energy interaction: Projectile nucleus --------------" << G4endl
2533 <<
"Pr ResidualMassNumber Pr ResidualCharge Pr ResidualExcitationEnergy "
2538 G4int NumberOfProjectileParticipant( 0 );
2543 NumberOfProjectileParticipant++;
2546 #ifdef debugFTFmodel
2550 DeltaExcitationE = 0.0;
2553 if ( NumberOfProjectileParticipant != 0 ) {
2555 G4double( NumberOfProjectileParticipant );
2557 G4double( NumberOfProjectileParticipant );
2569 delete projectileSplitable;
2570 projectileSplitable = 0;
2571 aNucleon->
Hit( projectileSplitable );
2576 #ifdef debugFTFmodel
2577 G4cout <<
"NumberOfProjectileParticipant " << NumberOfProjectileParticipant << G4endl
2583 #ifdef debugFTFmodel
2584 G4cout <<
"End GetResiduals -----------------" <<
G4endl;
2596 if ( AveragePt2 <= 0.0 ) {
2600 ( std::exp( -maxPtSquare/AveragePt2 ) -1.0 ) );
2605 return G4ThreeVector( Pt*std::cos(phi), Pt*std::sin(phi), 0.0 );
2616 G4double& residualExcitationEnergy,
2618 G4int& residualMassNumber,
2619 G4int& residualCharge ) {
2631 if ( ! nucleus )
return false;
2633 G4double ExcitationEnergyPerWoundedNucleon =
2656 sumMasses += 20.0*
MeV;
2657 residualExcitationEnergy += ExcitationEnergyPerWoundedNucleon;
2658 residualMassNumber--;
2665 #ifdef debugPutOnMassShell
2666 G4cout <<
"ExcitationEnergyPerWoundedNucleon " << ExcitationEnergyPerWoundedNucleon <<
G4endl
2667 <<
"\t Residual Charge, MassNumber " << residualCharge <<
" " << residualMassNumber
2668 <<
G4endl <<
"\t Initial Momentum " << nucleusMomentum
2669 <<
G4endl <<
"\t Residual Momentum " << residualMomentum <<
G4endl;
2671 residualMomentum.setPz( 0.0 );
2672 residualMomentum.setE( 0.0 );
2673 if ( residualMassNumber == 0 ) {
2675 residualExcitationEnergy = 0.0;
2678 GetIonMass( residualCharge, residualMassNumber );
2679 if ( residualMassNumber == 1 ) {
2680 residualExcitationEnergy = 0.0;
2683 sumMasses += std::sqrt(
sqr( residualMass ) + residualMomentum.perp2() );
2692 const G4int numberOfInvolvedNucleons,
2710 if ( sqrtS < 0.0 || numberOfInvolvedNucleons <= 0 || sumMasses < 0.0 )
return false;
2714 const G4double probDeltaIsobar = 0.10;
2716 G4int maxNumberOfDeltas =
G4int( (sqrtS - sumMasses)/(400.0*
MeV) );
2717 G4int numberOfDeltas = 0;
2719 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2722 if (
G4UniformRand() < probDeltaIsobar && numberOfDeltas < maxNumberOfDeltas ) {
2724 if ( ! involvedNucleons[i] )
continue;
2731 G4int newPdgCode = pdgCode/10; newPdgCode = newPdgCode*10 + 4;
2740 if ( sqrtS < sumMasses + massDelta - massNuc ) {
2744 sumMasses += ( massDelta - massNuc );
2763 const G4int residualMassNumber,
2764 const G4int numberOfInvolvedNucleons,
2778 if ( ! nucleus )
return false;
2788 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2789 G4Nucleon* aNucleon = involvedNucleons[i];
2790 if ( ! aNucleon )
continue;
2801 G4double deltaPx = ( ptSum.x() - pResidual.x() ) / numberOfInvolvedNucleons;
2802 G4double deltaPy = ( ptSum.y() - pResidual.y() ) / numberOfInvolvedNucleons;
2804 if ( residualMassNumber == 0 ) {
2805 delta = ( xSum - 1.0 ) / numberOfInvolvedNucleons;
2813 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2814 G4Nucleon* aNucleon = involvedNucleons[i];
2815 if ( ! aNucleon )
continue;
2818 if ( residualMassNumber == 0 ) {
2819 if ( x <= 0.0 || x > 1.0 ) {
2824 if ( x <= 0.0 || x > 1.0 || xSum <= 0.0 || xSum > 1.0 ) {
2832 +
sqr( px ) +
sqr( py ) ) / x;
2837 if ( success && residualMassNumber != 0 ) {
2838 mass2 += (
sqr( residualMass ) + pResidual.perp2() ) / xSum;
2841 #ifdef debugPutOnMassShell
2845 }
while ( ! success );
2859 const G4bool isProjectileNucleus,
2860 const G4int numberOfInvolvedNucleons,
2875 G4double decayMomentum2 =
sqr( sValue ) +
sqr( projectileMass2 ) +
sqr( targetMass2 )
2876 - 2.0*sValue*projectileMass2 - 2.0*sValue*targetMass2
2877 - 2.0*projectileMass2*targetMass2;
2878 targetWminus = ( sValue - projectileMass2 + targetMass2 + std::sqrt( decayMomentum2 ) )
2880 projectileWplus = sqrtS - targetMass2/targetWminus;
2881 G4double projectilePz = projectileWplus/2.0 - projectileMass2/2.0/projectileWplus;
2882 G4double projectileE = projectileWplus/2.0 + projectileMass2/2.0/projectileWplus;
2883 G4double projectileY = 0.5 * std::log( (projectileE + projectilePz)/
2884 (projectileE - projectilePz) );
2885 G4double targetPz = -targetWminus/2.0 + targetMass2/2.0/targetWminus;
2886 G4double targetE = targetWminus/2.0 + targetMass2/2.0/targetWminus;
2887 G4double targetY = 0.5 * std::log( (targetE + targetPz)/(targetE - targetPz) );
2889 #ifdef debugPutOnMassShell
2890 G4cout <<
"decayMomentum2 " << decayMomentum2 <<
G4endl
2891 <<
"\t targetWminus projectileWplus " << targetWminus <<
" " << projectileWplus <<
G4endl
2892 <<
"\t projectileY targetY " << projectileY <<
" " << targetY <<
G4endl;
2895 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2896 G4Nucleon* aNucleon = involvedNucleons[i];
2897 if ( ! aNucleon )
continue;
2902 G4double pz = -targetWminus*x/2.0 + mt2/(2.0*targetWminus*x);
2903 G4double e = targetWminus*x/2.0 + mt2/(2.0*targetWminus*x);
2904 if ( isProjectileNucleus ) {
2905 pz = projectileWplus*x/2.0 - mt2/(2.0*projectileWplus*x);
2906 e = projectileWplus*x/2.0 + mt2/(2.0*projectileWplus*x);
2908 G4double nucleonY = 0.5 * std::log( (e + pz)/(e - pz) );
2910 #ifdef debugPutOnMassShell
2911 G4cout <<
"i nY pY nY-AY AY " << i <<
" " << nucleonY <<
" " << projectileY <<
G4endl;
2914 if ( std::abs( nucleonY - nucleusY ) > 2 ||
2915 ( isProjectileNucleus && targetY > nucleonY ) ||
2916 ( ! isProjectileNucleus && projectileY < nucleonY ) ) {
2929 const G4bool isProjectileNucleus,
2932 const G4int residualMassNumber,
2933 const G4int numberOfInvolvedNucleons,
2951 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2952 G4Nucleon* aNucleon = involvedNucleons[i];
2953 if ( ! aNucleon )
continue;
2955 residual3Momentum -= tmp.vect();
2959 G4double pz = -w * x / 2.0 + mt2 / ( 2.0 * w * x );
2960 G4double e = w * x / 2.0 + mt2 / ( 2.0 * w * x );
2962 if ( isProjectileNucleus ) pz *= -1.0;
2965 tmp.transform( boostFromCmsToLab );
2971 G4double residualMt2 =
sqr( residualMass ) +
sqr( residual3Momentum.x() )
2972 +
sqr( residual3Momentum.y() );
2974 #ifdef debugPutOnMassShell
2975 G4cout <<
"w residual3Momentum.z() " << w <<
" " << residual3Momentum.z() <<
G4endl;
2980 if ( residualMassNumber != 0 ) {
2981 residualPz = -w * residual3Momentum.z() / 2.0 +
2982 residualMt2 / ( 2.0 * w * residual3Momentum.z() );
2983 residualE = w * residual3Momentum.z() / 2.0 +
2984 residualMt2 / ( 2.0 * w * residual3Momentum.z() );
2986 if ( isProjectileNucleus ) residualPz *= -1.0;
2989 residual4Momentum.setPx( residual3Momentum.x() );
2990 residual4Momentum.setPy( residual3Momentum.y() );
2991 residual4Momentum.setPz( residualPz );
2992 residual4Momentum.setE( residualE );
3001 desc <<
"please add description here" <<
G4endl;
G4ElasticHNScattering * theElastic
virtual G4bool ElasticScattering(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4FTFParameters *theParameters) const
void GetList(const G4ReactionProduct &thePrimary, G4FTFParameters *theParameters)
std::vector< G4ExcitedString * > G4ExcitedStringVector
G4Nucleon * GetTargetNucleon() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4Nucleon * GetProjectileNucleon() const
void SetParticleType(G4Proton *aProton)
G4double GetProbabilityOfElasticScatt()
G4double GetTotalMomentum() const
G4FTFModel(const G4String &modelName="FTF")
void SetMomentum(G4LorentzVector &aMomentum)
CLHEP::Hep3Vector G4ThreeVector
void operator()(G4VSplitableHadron *aH)
CLHEP::HepLorentzRotation G4LorentzRotation
virtual G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4FTFParameters *theParameters, G4ElasticHNScattering *theElastic) const
virtual G4bool StartLoop()=0
G4int GetSoftCollisionCount()
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4bool AdjustNucleons(G4VSplitableHadron *SelectedAntiBaryon, G4Nucleon *ProjectileNucleon, G4VSplitableHadron *SelectedTargetNucleon, G4Nucleon *TargetNucleon, G4bool Annihilation)
virtual void DoLorentzContraction(const G4LorentzVector &theBoost)=0
virtual G4int GetMassNumber()=0
G4Parton * GetLeftParton(void) const
void SetTimeOfCreation(G4double aTime)
G4int GetPDGEncoding() const
virtual const G4LorentzVector & Get4Momentum() const
G4ReactionProduct theProjectile
G4V3DNucleus * GetTargetNucleus() const
virtual const G4ThreeVector & GetPosition() const
G4int TargetResidualMassNumber
void SetDefinition(const G4ParticleDefinition *aDefinition)
virtual void SetProjectileNucleus(G4V3DNucleus *aNucleus)
void SetStatus(const G4int aStatus)
G4FTFParameters * theParameters
G4FTFAnnihilation * theAnnihilation
G4bool ExciteParticipants()
const G4String & GetParticleName() const
virtual const G4ParticleDefinition * GetDefinition() const
void SetThisPointer(G4VPartonStringModel *aPointer)
G4VSplitableHadron * GetSplitableHadron() const
const G4ParticleDefinition * GetDefinition() const
G4Nucleon * TheInvolvedNucleonsOfTarget[250]
const G4ThreeVector & GetPosition() const
std::vector< G4VSplitableHadron * > theAdditionalString
G4bool SamplingNucleonKinematics(const G4double averagePt2, const G4double maxPt2, const G4double dCor, G4V3DNucleus *nucleus, const G4LorentzVector &pResidual, const G4double residualMass, const G4int residualMassNumber, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4double &mass2)
G4InteractionContent & GetInteraction()
const G4ParticleDefinition * GetDefinition() const
G4IonTable * GetIonTable() const
G4GLOB_DLL std::ostream G4cout
G4double GetMaxNumberOfCollisions()
virtual void Init(G4int theZ, G4int theA)
static G4AntiProton * AntiProton()
G4FTFParticipants theParticipants
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double AbsoluteLevel)
G4V3DNucleus * GetProjectileNucleus() const
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
G4int ProjectileResidualMassNumber
G4double GetIonMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
G4DiffractiveExcitation * theExcitation
void SetTotalEnergy(const G4double en)
G4double GetTimeOfCreation()
G4ExcitedStringVector * BuildStrings()
G4V3DNucleus * theProjectileNucleus
static G4Proton * Proton()
G4double GetMaxPt2ofNuclearDestruction()
static const double perCent
G4bool ComputeNucleusProperties(G4V3DNucleus *nucleus, G4LorentzVector &nucleusMomentum, G4LorentzVector &residualMomentum, G4double &sumMasses, G4double &residualExcitationEnergy, G4double &residualMass, G4int &residualMassNumber, G4int &residualCharge)
G4Nucleon * TheInvolvedNucleonsOfProjectile[250]
static G4Neutron * Neutron()
void SetBindingEnergy(G4double anEnergy)
void Init(const G4Nucleus &aNucleus, const G4DynamicParticle &aProjectile)
const G4LorentzVector & Get4Momentum() const
virtual void ModelDescription(std::ostream &) const
virtual void CreateStrings(G4VSplitableHadron *aHadron, G4bool isProjectile, G4ExcitedString *&FirstString, G4ExcitedString *&SecondString, G4FTFParameters *theParameters) const
G4int ProjectileResidualCharge
G4double GetTotalEnergy() const
G4Parton * GetRightParton(void) const
virtual void InitProjectileNucleus(G4int theZ, G4int theA)
G4double GetPDGMass() const
virtual void DoLorentzBoost(const G4LorentzVector &theBoost)=0
void SetStatus(G4int aValue)
static G4ParticleTable * GetParticleTable()
G4double GetPt2ofNuclearDestruction()
G4bool CheckKinematics(const G4double sValue, const G4double sqrtS, const G4double projectileMass2, const G4double targetMass2, const G4double nucleusY, const G4bool isProjectileNucleus, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4double &targetWminus, G4double &projectileWplus, G4bool &success)
G4double GetR2ofNuclearDestruction()
G4int NumberOfInvolvedNucleonsOfProjectile
void StoreInvolvedNucleon()
G4double GetExcitationEnergyPerWoundedNucleon()
G4bool GenerateDeltaIsobar(const G4double sqrtS, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4double &sumMasses)
G4VSplitableHadron * GetTarget() const
G4VSplitableHadron * GetProjectile() const
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetPosition() const
virtual G4bool Annihilate(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4VSplitableHadron *&AdditionalString, G4FTFParameters *theParameters) const
G4bool FinalizeKinematics(const G4double w, const G4bool isProjectileNucleus, const G4LorentzRotation &boostFromCmsToLab, const G4double residualMass, const G4int residualMassNumber, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4LorentzVector &residual4Momentum)
G4int TargetResidualCharge
G4double GetCofNuclearDestruction()
G4double GetProbabilityOfAnnihilation()
G4LorentzVector TargetResidual4Momentum
virtual G4Nucleon * GetNextNucleon()=0
void Set4Momentum(const G4LorentzVector &a4Momentum)
void Hit(G4VSplitableHadron *aHit)
G4double GetPDGCharge() const
G4LorentzVector ProjectileResidual4Momentum
G4double ProjectileResidualExcitationEnergy
G4ExcitedStringVector * GetStrings()
static G4AntiNeutron * AntiNeutron()
G4int GetBaryonNumber() const
G4int NumberOfInvolvedNucleonsOfTarget
G4double TargetResidualExcitationEnergy
CLHEP::HepLorentzVector G4LorentzVector
G4double GetDofNuclearDestruction()