125 if ( aNucleon )
delete aNucleon;
133 if ( aNucleon )
delete aNucleon;
153 <<
"FTF init Target A Z " << aNucleus.
GetA_asInt()
281 G4cout <<
"FTF PutOnMassShell Success? " << Success <<
G4endl;
293 G4cout <<
"FTF ExciteParticipants Success? " << Success <<
G4endl;
299 G4cout <<
"FTF BuildStrings ";
305 G4cout <<
"FTF BuildStrings " << theStrings <<
" OK" << G4endl
306 <<
"FTF GetResiduals of Nuclei " <<
G4endl;
317 std::vector< G4VSplitableHadron* > primaries;
322 if ( primaries.end() ==
323 std::find( primaries.begin(), primaries.end(), interaction.
GetProjectile() ) ) {
337 if ( aNucleon )
delete aNucleon;
339 NumberOfInvolvedNucleonsOfProjectile = 0;
344 if ( aNucleon )
delete aNucleon;
346 NumberOfInvolvedNucleonsOfTarget = 0;
349 G4cout <<
"End of FTF. Go to fragmentation" << G4endl
350 <<
"To continue - enter 1, to stop - ^C" <<
G4endl;
379 G4cout <<
"G4FTFModel::StoreInvolvedNucleon -------------" <<
G4endl;
394 while ( ( aProjectileNucleon = theProjectileNucleus->
GetNextNucleon() ) ) {
418 #ifdef debugReggeonCascade
419 G4cout <<
"G4FTFModel::ReggeonCascade -----------" <<
G4endl
422 <<
"ExcitationE/WN " << ExcitationE <<
G4endl;
428 for (
G4int InvTN = 0; InvTN < InitNINt; InvTN++ ) {
456 Neighbour->
Hit( targetSplitable );
464 #ifdef debugReggeonCascade
465 G4cout <<
"Final NumberOfInvolvedNucleonsOfTarget "
473 for (
G4int InvPN = 0; InvPN < InitNINp; InvPN++ ) {
486 while ( ( Neighbour = theProjectileNucleus->
GetNextNucleon() ) ) {
501 Neighbour->
Hit( projectileSplitable );
509 #ifdef debugReggeonCascade
510 G4cout <<
"NumberOfInvolvedNucleonsOfProjectile "
520 G4bool isProjectileNucleus =
false;
522 isProjectileNucleus =
true;
525 #ifdef debugPutOnMassShell
527 if ( isProjectileNucleus ) {
528 G4cout <<
"PutOnMassShell for Nucleus_Nucleus " <<
G4endl;
533 if ( Pprojectile.z() < 0.0 ) {
545 #ifdef debugPutOnMassShell
551 if ( ! isOk )
return false;
560 if ( ! isProjectileNucleus ) {
561 Mprojectile = Pprojectile.mag();
562 M2projectile = Pprojectile.mag2();
563 SumMasses += Mprojectile + 20.0*
MeV;
565 #ifdef debugPutOnMassShell
566 G4cout <<
"Projectile : ";
571 if ( ! isOk )
return false;
578 #ifdef debugPutOnMassShell
579 G4cout <<
"Psum " << Psum/
GeV <<
" GeV" << G4endl <<
"SqrtS " << SqrtS/
GeV <<
" GeV" << G4endl
580 <<
"SumMasses, PrResidualMass and TargetResidualMass " << SumMasses/
GeV <<
" "
581 << PrResidualMass/
GeV <<
" " << TargetResidualMass/
GeV <<
" GeV" <<
G4endl;
584 if ( SqrtS < SumMasses ) {
590 G4double savedSumMasses = SumMasses;
591 if ( isProjectileNucleus ) {
592 SumMasses -= std::sqrt(
sqr( PrResidualMass ) + PprojResidual.perp2() );
594 + PprojResidual.perp2() );
596 SumMasses -= std::sqrt(
sqr( TargetResidualMass ) + PtargetResidual.perp2() );
598 + PtargetResidual.perp2() );
600 if ( SqrtS < SumMasses ) {
601 SumMasses = savedSumMasses;
602 if ( isProjectileNucleus ) {
609 if ( isProjectileNucleus ) {
613 #ifdef debugPutOnMassShell
614 if ( isProjectileNucleus ) {
615 G4cout <<
"PrResidualMass ProjResidualExcitationEnergy " << PrResidualMass/
GeV <<
" "
618 G4cout <<
"TargetResidualMass TargetResidualExcitationEnergy " << TargetResidualMass/
GeV <<
" "
620 <<
"Sum masses " << SumMasses/
GeV <<
G4endl;
624 if ( isProjectileNucleus && thePrNucleus->
GetMassNumber() != 1 ) {
633 if ( ! isOk )
return false;
644 if ( Ptmp.pz() <= 0.0 ) {
651 if ( isProjectileNucleus ) {
653 YprojectileNucleus = Ptmp.rapidity();
655 Ptmp = toCms*Ptarget;
656 G4double YtargetNucleus = Ptmp.rapidity();
660 if ( isProjectileNucleus ) {
667 #ifdef debugPutOnMassShell
668 if ( isProjectileNucleus ) {
669 G4cout <<
"Y projectileNucleus " << YprojectileNucleus <<
G4endl;
671 G4cout <<
"Y targetNucleus " << YtargetNucleus << G4endl
673 <<
" DcorP DcorT " << DcorP <<
" " << DcorT <<
" AveragePt2 " << AveragePt2 <<
G4endl;
680 G4int NumberOfTries = 0;
682 G4bool OuterSuccess =
true;
688 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
694 DcorP *= ScaleFactor;
695 DcorT *= ScaleFactor;
696 AveragePt2 *= ScaleFactor;
698 if ( isProjectileNucleus ) {
701 thePrNucleus, PprojResidual,
709 theTargetNucleus, PtargetResidual,
714 #ifdef debugPutOnMassShell
715 G4cout <<
"SqrtS, Mp+Mt, Mp, Mt " << SqrtS/
GeV <<
" "
716 << ( std::sqrt( M2proj ) + std::sqrt( M2target) )/
GeV <<
" "
717 << std::sqrt( M2proj )/
GeV <<
" " << std::sqrt( M2target )/
GeV <<
G4endl;
720 if ( ! isOk )
return false;
721 }
while ( SqrtS < std::sqrt( M2proj ) + std::sqrt( M2target ) );
722 if ( isProjectileNucleus ) {
723 isOk =
CheckKinematics( S, SqrtS, M2proj, M2target, YprojectileNucleus,
true,
726 WminusTarget, WplusProjectile, OuterSuccess );
731 WminusTarget, WplusProjectile, OuterSuccess );
732 if ( ! isOk )
return false;
733 }
while ( ! OuterSuccess );
741 if ( ! isProjectileNucleus ) {
743 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
744 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
745 Pprojectile.setPz( Pzprojectile );
746 Pprojectile.setE( Eprojectile );
748 #ifdef debugPutOnMassShell
749 G4cout <<
"Proj after in CMS " << Pprojectile <<
G4endl;
752 Pprojectile.transform( toLab );
761 #ifdef debugPutOnMassShell
771 #ifdef debugPutOnMassShell
775 if ( ! isOk )
return false;
779 #ifdef debugPutOnMassShell
789 #ifdef debugPutOnMassShell
793 if ( ! isOk )
return false;
797 #ifdef debugPutOnMassShell
810 #ifdef debugBuildString
811 G4cout <<
"G4FTFModel::ExciteParticipants() " <<
G4endl;
814 G4bool Successfull(
true );
816 if ( MaxNumOfInelCollisions > 0 ) {
818 if (
G4UniformRand() < ProbMaxNumber ) MaxNumOfInelCollisions++;
821 MaxNumOfInelCollisions = 1;
824 #ifdef debugBuildString
825 G4cout <<
"MaxNumOfInelCollisions MaxNumOfInelCollisions " << MaxNumOfInelCollisions <<
G4endl;
828 G4int CurrentInteraction( 0 );
833 CurrentInteraction++;
840 #ifdef debugBuildString
841 G4cout << G4endl <<
"Interaction # Status " << CurrentInteraction <<
" "
842 << collision.
GetStatus() << G4endl <<
"Pr* Tr* " << projectile <<
" "
843 << target << G4endl <<
"projectile->GetStatus target->GetStatus "
853 #ifdef debugBuildString
858 G4bool Annihilation =
false;
860 TargetNucleon, Annihilation );
861 if ( ! Result )
continue;
868 #ifdef debugBuildString
869 G4cout <<
"Inelastic interaction" << G4endl
870 <<
"MaxNumOfInelCollisions " << MaxNumOfInelCollisions <<
G4endl;
874 G4bool Annihilation =
false;
876 TargetNucleon, Annihilation );
877 if ( ! Result )
continue;
889 #ifdef debugBuildString
902 #ifdef debugBuildString
903 G4cout <<
"FTF excitation Non Successfull -> Elastic scattering "
909 #ifdef debugBuildString
910 G4cout <<
"Elastic scat. at rejection inelastic scattering" <<
G4endl;
924 #ifdef debugBuildString
933 if ( projectile == NextProjectileNucleon || target == NextTargetNucleon ) {
944 G4bool Annihilation =
true;
946 TargetNucleon, Annihilation );
947 if ( ! Result )
continue;
951 Successfull = Successfull ||
true;
953 #ifdef debugBuildString
954 G4cout <<
"Annihilation successfull. " <<
"*AdditionalString "
955 << AdditionalString <<
G4endl;
965 #ifdef debugBuildString
966 G4cout <<
"----------------------------- Final properties " << G4endl
967 <<
"projectile->GetStatus target->GetStatus " << projectile->
GetStatus()
968 <<
" " << target->
GetStatus() << G4endl <<
"projectile->GetSoftC target->GetSoftC "
970 << G4endl <<
"ExciteParticipants() Successfull? " << Successfull <<
G4endl;
988 G4cout <<
"AdjustNucleons ---------------------------------------" <<
G4endl
992 <<
"Pr ResidualMassNumber Pr ResidualCharge Pr ResidualExcitationEnergy "
995 <<
"Tr ResidualMassNumber Tr ResidualCharge Tr ResidualExcitationEnergy "
1010 G4double DcorP( 0.0 ), DcorT( 0.0 );
1016 G4double ExcitationEnergyPerWoundedNucleon =
1030 G4cout <<
"case 1, hA prcol=0 trcol=0, AA prcol#0 trcol=0" <<
G4endl;
1060 toCms.rotateZ( -1*Ptmp.phi() );
1061 toCms.rotateY( -1*Ptmp.theta() );
1062 Pprojectile.transform( toCms );
1074 ExcitationEnergyPerWoundedNucleon;
1075 if ( TResidualMassNumber <= 1 ) {
1076 TResidualExcitationEnergy = 0.0;
1080 if ( TResidualMassNumber != 0 ) {
1082 ->
GetIonMass( TResidualCharge, TResidualMassNumber );
1094 if ( ! Annihilation ) {
1095 if ( SqrtS < SumMasses ) {
1098 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1101 G4cout <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1104 TResidualExcitationEnergy = SqrtS - SumMasses;
1107 G4cout <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1115 if ( Annihilation ) {
1118 G4cout <<
"SqrtS < SumMasses - TNucleonMass " << SqrtS <<
" "
1119 << SumMasses - TNucleonMass <<
G4endl;
1122 if ( SqrtS < SumMasses - TNucleonMass ) {
1127 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1130 if ( SqrtS < SumMasses ) {
1131 TNucleonMass = SqrtS - (SumMasses - TNucleonMass) - TResidualExcitationEnergy;
1137 SumMasses = SqrtS - TResidualExcitationEnergy;
1143 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1146 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1147 TResidualExcitationEnergy = SqrtS - SumMasses;
1159 Ptmp.setPx( 0.0 ); Ptmp.setPy( 0.0 ); Ptmp.setPz( 0.0 );
1166 Pprojectile = Ptmp; Pprojectile.transform( toLab );
1170 Ptmp.setE( TNucleonMass );
1176 Ptarget = Ptmp; Ptarget.transform( toLab );
1190 Ptmp.transform( toLab );
1200 G4double Mprojectile = Pprojectile.mag();
1201 G4double M2projectile = Pprojectile.mag2();
1205 G4double YtargetNucleus = TResidual4Momentum.rapidity();
1207 TResidualMass += TResidualExcitationEnergy;
1216 G4int NumberOfTries( 0 );
1218 G4bool OuterSuccess(
true );
1221 OuterSuccess =
true;
1227 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1230 DcorT *= ScaleFactor;
1231 AveragePt2 *= ScaleFactor;
1241 G4bool InerSuccess =
true;
1246 PtNucleon =
GaussianPt( AveragePt2, maxPtSquare );
1247 PtResidual = -PtNucleon;
1249 G4double Mtarget = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) +
1250 std::sqrt(
sqr( TResidualMass ) + PtResidual.mag2() );
1251 if ( SqrtS < Mprojectile + Mtarget ) {
1252 InerSuccess =
false;
1257 G4double Xcenter = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) / Mtarget;
1258 XminusNucleon = Xcenter + tmpX.x();
1259 if ( XminusNucleon <= 0.0 || XminusNucleon >= 1.0 ) {
1260 InerSuccess =
false;
1264 XminusResidual = 1.0 - XminusNucleon;
1265 }
while ( ! InerSuccess );
1267 XminusNucleon = 1.0;
1268 XminusResidual = 1.0;
1272 M2target = (
sqr( TNucleonMass ) + PtNucleon.mag2() ) / XminusNucleon +
1273 (
sqr( TResidualMass ) + PtResidual.mag2() ) / XminusResidual;
1275 }
while ( SqrtS < Mprojectile + std::sqrt( M2target) );
1278 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
1280 WminusTarget = ( S - M2projectile + M2target + std::sqrt( DecayMomentum2 ) ) / 2.0 / SqrtS;
1281 WplusProjectile = SqrtS - M2target / WminusTarget;
1283 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
1284 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
1285 G4double Yprojectile = 0.5 * std::log( (Eprojectile + Pzprojectile) /
1286 (Eprojectile - Pzprojectile) );
1289 G4cout <<
"DecayMomentum2 " << DecayMomentum2 << G4endl
1290 <<
"WminusTarget WplusProjectile " << WminusTarget <<
" " << WplusProjectile
1291 << G4endl <<
"Yprojectile " << Yprojectile <<
G4endl;
1294 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1295 G4double Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1296 G4double E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1297 G4double YtargetNucleon = 0.5 * std::log( (E + Pz)/(E - Pz) );
1300 G4cout <<
"YtN Ytr YtN-Ytr " <<
" " << YtargetNucleon <<
" " << YtargetNucleus <<
" "
1301 << YtargetNucleon - YtargetNucleus << G4endl
1302 <<
"YtN Ypr YtN-Ypr " <<
" " << YtargetNucleon <<
" " << Yprojectile
1303 <<
" " << YtargetNucleon - Yprojectile <<
G4endl;
1306 if ( std::abs( YtargetNucleon - YtargetNucleus ) > 2 || Yprojectile < YtargetNucleon ) {
1307 OuterSuccess =
false;
1311 }
while ( ! OuterSuccess );
1313 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
1314 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
1315 Pprojectile.setPz( Pzprojectile ); Pprojectile.setE( Eprojectile );
1318 G4cout <<
"Proj after in CMS " << Pprojectile <<
G4endl;
1321 Pprojectile.transform( toLab );
1329 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1330 G4double Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1331 G4double E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1333 Ptarget.setPx( PtNucleon.x() ); Ptarget.setPy( PtNucleon.y() );
1334 Ptarget.setPz( Pz ); Ptarget.setE( E );
1335 Ptarget.transform( toLab );
1348 G4cout <<
"TargetResidualMassNumber TargetResidualCharge TargetResidualExcitationEnergy "
1354 Mt2 =
sqr( TResidualMass ) + PtResidual.mag2();
1355 Pz = -WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
1356 E = WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
1358 TargetResidual4Momentum.setPx( PtResidual.x() );
1359 TargetResidual4Momentum.setPy( PtResidual.y() );
1360 TargetResidual4Momentum.setPz( Pz );
1361 TargetResidual4Momentum.setE( E );
1364 G4cout <<
"New Residu " << TargetResidual4Momentum <<
" CMS" <<
G4endl;
1367 TargetResidual4Momentum.transform( toLab );
1370 G4cout <<
"New Residu " << TargetResidual4Momentum <<
" Lab" <<
G4endl;
1408 toCms.rotateZ( -1*Ptmp.phi() );
1409 toCms.rotateY( -1*Ptmp.theta() );
1412 Pprojectile.transform( toCms );
1421 ExcitationEnergyPerWoundedNucleon;
1422 if ( TResidualMassNumber <= 1 ) {
1423 TResidualExcitationEnergy = 0.0;
1427 if ( TResidualMassNumber != 0 ) {
1429 ->
GetIonMass( TResidualCharge , TResidualMassNumber );
1435 TNucleonMass + TResidualMass;
1438 G4cout <<
"SelectedTN.mag() PNMass + PResidualMass "
1440 << TNucleonMass <<
" " << TResidualMass <<
G4endl;
1445 if ( ! Annihilation ) {
1446 if ( SqrtS < SumMasses ) {
1449 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1450 TResidualExcitationEnergy = SqrtS - SumMasses;
1456 if ( Annihilation ) {
1457 if ( SqrtS < SumMasses - TNucleonMass ) {
1460 if ( SqrtS < SumMasses ) {
1461 TNucleonMass = SqrtS - (SumMasses - TNucleonMass);
1463 TResidualExcitationEnergy = 0.0;
1467 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1468 TResidualExcitationEnergy = SqrtS - SumMasses;
1480 Ptmp.setPx( 0.0 ); Ptmp.setPy( 0.0 ); Ptmp.setPz( 0.0 );
1481 Ptmp.setE( SelectedTargetNucleon->
Get4Momentum().mag() );
1482 Ptarget = Ptmp; Ptarget.transform( toLab );
1486 Ptmp.setE( TNucleonMass );
1487 Pprojectile = Ptmp; Pprojectile.transform( toLab );
1496 Ptmp.transform( toLab );
1503 G4double M2target = Ptarget.mag2();
1506 G4double YprojectileNucleus = TResidual4Momentum.rapidity();
1508 TResidualMass += TResidualExcitationEnergy;
1517 G4int NumberOfTries( 0 );
1519 G4bool OuterSuccess(
true );
1523 OuterSuccess =
true;
1529 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1532 DcorP *= ScaleFactor;
1533 AveragePt2 *= ScaleFactor;
1541 PtNucleon =
GaussianPt( AveragePt2, maxPtSquare );
1545 PtResidual = -PtNucleon;
1547 G4double Mprojectile = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) +
1548 std::sqrt(
sqr( TResidualMass ) + PtResidual.mag2() );
1551 G4cout <<
"SqrtS < Mtarget + Mprojectile " << SqrtS <<
" " << Mtarget
1552 <<
" " << Mprojectile <<
" " << Mtarget + Mprojectile <<
G4endl;
1555 M2projectile =
sqr( Mprojectile );
1556 if ( SqrtS < Mtarget + Mprojectile ) {
1557 OuterSuccess =
false;
1561 G4double Xcenter = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) / Mprojectile;
1563 G4bool InerSuccess =
true;
1568 XplusNucleon = Xcenter + tmpX.x();
1569 if ( XplusNucleon <= 0.0 || XplusNucleon >= 1.0 ) {
1570 InerSuccess =
false;
1573 XplusResidual = 1.0 - XplusNucleon;
1574 }
while ( ! InerSuccess );
1577 XplusResidual = 1.0;
1582 G4cout <<
"TNucleonMass PtNucleon XplusNucleon " << TNucleonMass <<
" " << PtNucleon
1583 <<
" " << XplusNucleon << G4endl
1584 <<
"TResidualMass PtResidual XplusResidual " << TResidualMass <<
" " << PtResidual
1585 <<
" " << XplusResidual <<
G4endl;
1588 M2projectile = (
sqr( TNucleonMass ) + PtNucleon.mag2() ) / XplusNucleon +
1589 (
sqr( TResidualMass ) + PtResidual.mag2() ) / XplusResidual;
1592 G4cout <<
"SqrtS < Mtarget + std::sqrt(M2projectile) " << SqrtS <<
" " << Mtarget
1593 <<
" " << std::sqrt( M2projectile ) <<
" " << Mtarget + std::sqrt( M2projectile )
1597 }
while ( SqrtS < Mtarget + std::sqrt( M2projectile ) );
1600 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
1602 WplusProjectile = ( S + M2projectile - M2target + std::sqrt( DecayMomentum2 ) )/2.0/SqrtS;
1603 WminusTarget = SqrtS - M2projectile/WplusProjectile;
1605 G4double Pztarget = -WminusTarget/2.0 + M2target/2.0/WminusTarget;
1606 G4double Etarget = WminusTarget/2.0 + M2target/2.0/WminusTarget;
1607 G4double Ytarget = 0.5 * std::log( (Etarget + Pztarget)/(Etarget - Pztarget) );
1610 G4cout <<
"DecayMomentum2 " << DecayMomentum2 << G4endl
1611 <<
"WminusTarget WplusProjectile " << WminusTarget <<
" " << WplusProjectile
1612 << G4endl <<
"YtargetNucleon " << Ytarget <<
G4endl;
1615 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1616 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
1617 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
1618 G4double YprojectileNucleon = 0.5 * std::log( (E + Pz)/(E - Pz) );
1621 G4cout <<
"YpN Ypr YpN-Ypr " <<
" " << YprojectileNucleon <<
" " << YprojectileNucleus
1622 <<
" " << YprojectileNucleon - YprojectileNucleus << G4endl
1623 <<
"YpN Ytr YpN-Ytr " <<
" " << YprojectileNucleon <<
" " << Ytarget
1624 <<
" " << YprojectileNucleon - Ytarget <<
G4endl;
1627 if ( std::abs( YprojectileNucleon - YprojectileNucleus ) > 2 ||
1628 Ytarget > YprojectileNucleon ) {
1629 OuterSuccess =
false;
1633 }
while ( ! OuterSuccess );
1636 G4double Pztarget = -WminusTarget/2.0 + M2target/2.0/WminusTarget;
1637 G4double Etarget = WminusTarget/2.0 + M2target/2.0/WminusTarget;
1638 Ptarget.setPz( Pztarget ); Ptarget.setE( Etarget );
1639 Ptarget.transform( toLab );
1647 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1648 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
1649 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
1650 Pprojectile.setPx( PtNucleon.x() ); Pprojectile.setPy( PtNucleon.y() );
1651 Pprojectile.setPz( Pz ); Pprojectile.setE( E );
1652 Pprojectile.transform( toLab );
1656 G4cout <<
"Proj after in Lab " << Pprojectile <<
G4endl;
1665 Mt2 =
sqr( TResidualMass ) + PtResidual.mag2();
1666 Pz = WplusProjectile*XplusResidual/2.0 - Mt2/(2.0*WplusProjectile*XplusResidual);
1667 E = WplusProjectile*XplusResidual/2.0 + Mt2/(2.0*WplusProjectile*XplusResidual);
1668 ProjectileResidual4Momentum.setPx( PtResidual.x() );
1669 ProjectileResidual4Momentum.setPy( PtResidual.y() );
1670 ProjectileResidual4Momentum.setPz( Pz );
1671 ProjectileResidual4Momentum.setE( E );
1672 ProjectileResidual4Momentum.transform( toLab );
1692 <<
"ProjectileResidualMassNumber ProjectileResidualCharge "
1704 toCms.rotateZ( -1*Ptmp.phi() );
1705 toCms.rotateY( -1*Ptmp.theta() );
1707 Pprojectile.transform( toCms );
1717 ExcitationEnergyPerWoundedNucleon;
1718 if ( PResidualMassNumber <= 1 ) {
1719 PResidualExcitationEnergy = 0.0;
1723 if ( PResidualMassNumber != 0 ) {
1725 ->
GetIonMass( PResidualCharge, PResidualMassNumber );
1734 ExcitationEnergyPerWoundedNucleon;
1735 if ( TResidualMassNumber <= 1 ) {
1736 TResidualExcitationEnergy = 0.0;
1739 if ( TResidualMassNumber != 0 ) {
1741 ->
GetIonMass( TResidualCharge, TResidualMassNumber );
1746 G4double SumMasses = PNucleonMass + PResidualMass + TNucleonMass + TResidualMass;
1749 G4cout <<
"PNucleonMass PResidualMass TNucleonMass TResidualMass " << PNucleonMass
1750 <<
" " << PResidualMass <<
" " << TNucleonMass <<
" " << TResidualMass << G4endl
1751 <<
"PResidualExcitationEnergy " << PResidualExcitationEnergy << G4endl
1752 <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1757 if ( ! Annihilation ) {
1760 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1763 if ( SqrtS < SumMasses ) {
1768 G4cout <<
"SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy "
1769 << SqrtS <<
" " << SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy
1773 if ( SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy ) {
1776 if ( PResidualExcitationEnergy <= 0.0 ) {
1777 TResidualExcitationEnergy = SqrtS - SumMasses;
1778 }
else if ( TResidualExcitationEnergy <= 0.0 ) {
1779 PResidualExcitationEnergy = SqrtS - SumMasses;
1781 G4double Fraction = (SqrtS - SumMasses) /
1782 (PResidualExcitationEnergy + TResidualExcitationEnergy);
1783 PResidualExcitationEnergy *= Fraction;
1784 TResidualExcitationEnergy *= Fraction;
1793 if ( Annihilation ) {
1794 if ( SqrtS < SumMasses - TNucleonMass ) {
1797 if ( SqrtS < SumMasses ) {
1799 TNucleonMass = SqrtS - (SumMasses - TNucleonMass);
1801 TResidualExcitationEnergy = 0.0;
1803 if ( SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy ) {
1805 if ( PResidualExcitationEnergy <= 0.0 ) {
1806 TResidualExcitationEnergy = SqrtS - SumMasses;
1807 }
else if ( TResidualExcitationEnergy <= 0.0 ) {
1808 PResidualExcitationEnergy = SqrtS - SumMasses;
1810 G4double Fraction = (SqrtS - SumMasses) /
1811 (PResidualExcitationEnergy + TResidualExcitationEnergy);
1812 PResidualExcitationEnergy *= Fraction;
1813 TResidualExcitationEnergy *= Fraction;
1821 Ptmp.setPx( 0.0 ); Ptmp.setPy( 0.0 ); Ptmp.setPz( 0.0 );
1822 Ptmp.setE( PNucleonMass );
1823 Pprojectile = Ptmp; Pprojectile.transform( toLab );
1832 Ptmp.transform( toLab );
1836 Ptmp.setPx( 0.0 ); Ptmp.setPy( 0.0 ); Ptmp.setPz( 0.0 );
1837 Ptmp.setE( TNucleonMass );
1838 Ptarget = Ptmp; Ptarget.transform( toLab );
1847 Ptmp.transform( toLab );
1848 TargetResidual4Momentum = Ptmp;
1854 G4double YprojectileNucleus = PResidual4Momentum.rapidity();
1857 G4cout <<
"YprojectileNucleus XcenterP " << YprojectileNucleus <<
G4endl;
1861 G4double YtargetNucleus = TResidual4Momentum.rapidity();
1863 PResidualMass += PResidualExcitationEnergy;
1864 TResidualMass += TResidualExcitationEnergy;
1881 G4int NumberOfTries( 0 );
1883 G4bool OuterSuccess(
true );
1887 OuterSuccess =
true;
1893 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1896 DcorP *= ScaleFactor;
1897 DcorT *= ScaleFactor;
1898 AveragePt2 *= ScaleFactor;
1906 PtNucleonP =
GaussianPt( AveragePt2, maxPtSquare );
1910 PtResidualP = -PtNucleonP;
1913 PtNucleonT =
GaussianPt( AveragePt2, maxPtSquare );
1917 PtResidualT = -PtNucleonT;
1919 G4double Mprojectile = std::sqrt(
sqr( PNucleonMass ) + PtNucleonP.mag2() ) +
1920 std::sqrt(
sqr( PResidualMass ) + PtResidualP.mag2() );
1921 M2projectile =
sqr( Mprojectile );
1923 G4double Mtarget = std::sqrt(
sqr( TNucleonMass ) + PtNucleonT.mag2() ) +
1924 std::sqrt(
sqr( TResidualMass ) + PtResidualT.mag2() );
1925 M2target =
sqr( Mtarget );
1927 if ( SqrtS < Mprojectile + Mtarget ) {
1928 OuterSuccess =
false;
1932 G4bool InerSuccess =
true;
1938 G4double XcenterP = std::sqrt(
sqr( PNucleonMass ) + PtNucleonP.mag2() ) / Mprojectile;
1939 XplusNucleon = XcenterP + tmpX.x();
1946 if ( XplusNucleon <= 0.0 || XplusNucleon >= 1.0 ) {
1947 InerSuccess =
false;
1950 XplusResidual = 1.0 - XplusNucleon;
1951 }
while ( ! InerSuccess );
1961 XplusResidual = 1.0;
1969 G4double XcenterT = std::sqrt(
sqr( TNucleonMass ) + PtNucleonT.mag2() ) / Mtarget;
1970 XminusNucleon = XcenterT + tmpX.x();
1971 if ( XminusNucleon <= 0.0 || XminusNucleon >= 1.0 ) {
1972 InerSuccess =
false;
1975 XminusResidual = 1.0 - XminusNucleon;
1976 }
while ( ! InerSuccess );
1978 XminusNucleon = 1.0;
1979 XminusResidual = 1.0;
1983 G4cout <<
"PtNucleonP " << PtNucleonP <<
" " << PtResidualP << G4endl
1984 <<
"XplusNucleon XplusResidual " << XplusNucleon <<
" " << XplusResidual << G4endl
1985 <<
"PtNucleonT " << PtNucleonT <<
" " << PtResidualT << G4endl
1986 <<
"XminusNucleon XminusResidual " << XminusNucleon <<
" " << XminusResidual
1990 M2projectile = (
sqr( PNucleonMass ) + PtNucleonP.mag2() ) / XplusNucleon +
1991 (
sqr( PResidualMass) + PtResidualP.mag2() ) / XplusResidual;
1992 M2target = (
sqr( TNucleonMass ) + PtNucleonT.mag2() ) / XminusNucleon +
1993 (
sqr( TResidualMass ) + PtResidualT.mag2() ) / XminusResidual;
1995 }
while ( SqrtS < std::sqrt( M2projectile ) + std::sqrt( M2target ) );
1998 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
2000 WplusProjectile = ( S + M2projectile - M2target + std::sqrt( DecayMomentum2 ) )/2.0/SqrtS;
2001 WminusTarget = SqrtS - M2projectile/WplusProjectile;
2003 G4double Mt2 =
sqr( PNucleonMass ) + PtNucleonP.mag2();
2004 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
2005 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
2006 G4double YprojectileNucleon = 0.5 * std::log( (E + Pz)/(E - Pz) );
2008 Mt2 =
sqr( TNucleonMass ) + PtNucleonT.mag2();
2009 Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2010 E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2011 G4double YtargetNucleon = 0.5 * std::log( (E + Pz)/(E - Pz) );
2013 if ( std::abs( YtargetNucleon - YtargetNucleus ) > 2 ||
2014 std::abs( YprojectileNucleon - YprojectileNucleus ) > 2 ||
2015 YprojectileNucleon < YtargetNucleon ) {
2016 OuterSuccess =
false;
2020 }
while ( ! OuterSuccess );
2026 G4double Mt2 =
sqr( PNucleonMass ) + PtNucleonP.mag2();
2027 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
2028 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
2030 Pprojectile.setPx( PtNucleonP.x() ); Pprojectile.setPy( PtNucleonP.y() );
2031 Pprojectile.setPz( Pz ); Pprojectile.setE( E );
2032 Pprojectile.transform( toLab );
2041 G4cout <<
"PResidualMass PtResidualP " << PResidualMass <<
" " << PtResidualP <<
G4endl;
2045 Mt2 =
sqr( PResidualMass ) + PtResidualP.mag2();
2046 Pz = WplusProjectile*XplusResidual/2.0 - Mt2/(2.0*WplusProjectile*XplusResidual);
2047 E = WplusProjectile*XplusResidual/2.0 + Mt2/(2.0*WplusProjectile*XplusResidual);
2048 ProjectileResidual4Momentum.setPx( PtResidualP.x() );
2049 ProjectileResidual4Momentum.setPy( PtResidualP.y() );
2050 ProjectileResidual4Momentum.setPz( Pz );
2051 ProjectileResidual4Momentum.setE( E );
2052 ProjectileResidual4Momentum.transform( toLab );
2058 G4cout <<
"Pr N R " << Pprojectile << G4endl <<
" "
2059 << ProjectileResidual4Momentum <<
G4endl;
2062 Mt2 =
sqr( TNucleonMass ) + PtNucleonT.mag2();
2063 Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2064 E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2066 Ptarget.setPx( PtNucleonT.x() ); Ptarget.setPy( PtNucleonT.y() );
2067 Ptarget.setPz( Pz ); Ptarget.setE( E );
2068 Ptarget.transform( toLab );
2077 Mt2 =
sqr( TResidualMass ) + PtResidualT.mag2();
2078 Pz = -WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
2079 E = WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
2081 TargetResidual4Momentum.setPx( PtResidualT.x() );
2082 TargetResidual4Momentum.setPy( PtResidualT.y() );
2083 TargetResidual4Momentum.setPz( Pz );
2084 TargetResidual4Momentum.setE( E) ;
2085 TargetResidual4Momentum.transform( toLab );
2091 G4cout <<
"Tr N R " << Ptarget << G4endl <<
" " << TargetResidual4Momentum <<
G4endl;
2113 std::vector< G4VSplitableHadron* > primaries;
2119 if ( primaries.end() == std::find( primaries.begin(), primaries.end(),
2126 #ifdef debugBuildString
2128 <<
"Number of projectile strings " << primaries.size() <<
G4endl;
2131 for (
unsigned int ahadron = 0; ahadron < primaries.size(); ahadron++ ) {
2132 G4bool isProjectile(
true );
2135 FirstString = 0; SecondString = 0;
2138 if ( primaries[ahadron]->GetStatus() <= 1 )
2143 else if(primaries[ahadron]->GetStatus() == 2)
2147 primaries[ahadron]->GetDefinition(),
2148 primaries[ahadron]->GetTimeOfCreation(),
2149 primaries[ahadron]->GetPosition(),
2151 if (FirstString)
delete FirstString;
2154 else {
G4cout<<
"Something wrong in FTF Model Build String" <<
G4endl;}
2156 if ( FirstString != 0 ) strings->push_back( FirstString );
2157 if ( SecondString != 0 ) strings->push_back( SecondString );
2159 #ifdef debugBuildString
2160 G4cout <<
"FirstString & SecondString? " << FirstString <<
" " << SecondString <<
G4endl;
2170 #ifdef debugBuildString
2173 G4cout <<
"Check 1 string " << strings->operator[](0)->GetRightParton()->GetPDGcode()
2174 <<
" " << strings->operator[](0)->GetLeftParton()->GetPDGcode() <<
G4endl <<
G4endl;
2183 #ifdef debugBuildString
2184 G4cout <<
"Building of projectile-like strings" <<
G4endl;
2187 G4bool isProjectile =
true;
2190 #ifdef debugBuildString
2191 G4cout <<
"Nucleon #, status, intCount " << ahadron <<
" "
2200 #ifdef debugBuildString
2201 G4cout << G4endl <<
"ahadron aProjectile Status " << ahadron <<
" " << aProjectile
2207 #ifdef debugBuildString
2208 G4cout <<
"Case1 aProjectile->GetStatus() == 0 " <<
G4endl;
2211 FirstString = 0; SecondString = 0;
2215 if ( FirstString != 0 ) strings->push_back( FirstString );
2216 if ( SecondString != 0 ) strings->push_back( SecondString );
2220 #ifdef debugBuildString
2221 G4cout <<
"Case2 aProjectile->GetStatus() !=0 St==1 SoftCol!=0" <<
G4endl;
2224 FirstString = 0; SecondString = 0;
2228 if ( FirstString != 0 ) strings->push_back( FirstString );
2229 if ( SecondString != 0 ) strings->push_back( SecondString );
2236 #ifdef debugBuildString
2237 G4cout <<
"Case3 aProjectile->GetStatus() !=0 St==1 SoftCol==0" <<
G4endl;
2240 FirstString = 0; SecondString = 0;
2244 if ( FirstString != 0 ) strings->push_back( FirstString );
2245 if ( SecondString != 0 ) strings->push_back( SecondString );
2247 #ifdef debugBuildString
2248 G4cout <<
" Strings are built for nucleon marked for an interaction, but"
2249 <<
" the interaction was skipped." <<
G4endl;
2255 #ifdef debugBuildString
2256 G4cout <<
"Case4 aProjectile->GetStatus() !=0 St==2 " <<
G4endl;
2259 FirstString = 0; SecondString = 0;
2263 if ( FirstString != 0 ) strings->push_back( FirstString );
2264 if ( SecondString != 0 ) strings->push_back( SecondString );
2266 #ifdef debugBuildString
2267 G4cout <<
" Strings are build for involved nucleon." <<
G4endl;
2272 #ifdef debugBuildString
2279 #ifdef debugBuildString
2287 #ifdef debugBuildString
2291 G4bool isProjectile =
false;
2295 #ifdef debugBuildString
2296 G4cout <<
"Nucleon #, status, intCount " << aNucleon <<
" " << ahadron <<
" "
2301 FirstString = 0 ; SecondString = 0;
2304 if ( FirstString != 0 ) strings->push_back( FirstString );
2305 if ( SecondString != 0 ) strings->push_back( SecondString );
2307 #ifdef debugBuildString
2313 FirstString = 0; SecondString = 0;
2316 if ( FirstString != 0 ) strings->push_back( FirstString );
2317 if ( SecondString != 0 ) strings->push_back( SecondString );
2319 #ifdef debugBuildString
2320 G4cout <<
" 2 case A string is build, nucleon was excited." <<
G4endl;
2328 FirstString = 0; SecondString = 0;
2332 if(SecondString == 0)
2344 if ( FirstString != 0 ) strings->push_back( FirstString );
2345 if ( SecondString != 0 ) strings->push_back( SecondString );
2347 #ifdef debugBuildString
2359 #ifdef debugBuildString
2363 }
else if(( aNucleon->
GetStatus() == 2 )||
2365 FirstString = 0; SecondString = 0;
2369 if(SecondString == 0)
2381 if ( FirstString != 0 ) strings->push_back( FirstString );
2382 if ( SecondString != 0 ) strings->push_back( SecondString );
2384 #ifdef debugBuildString
2390 #ifdef debugBuildString
2397 #ifdef debugBuildString
2402 isProjectile =
true;
2406 FirstString = 0; SecondString = 0;
2409 if ( FirstString != 0 ) strings->push_back( FirstString );
2410 if ( SecondString != 0 ) strings->push_back( SecondString );
2429 #ifdef debugFTFmodel
2430 G4cout <<
"GetResiduals(): HighEnergyInter? GetProjectileNucleus()?"
2436 #ifdef debugFTFmodel
2448 #ifdef debugFTFmodel
2461 #ifdef debugFTFmodel
2463 << G4endl <<
"ProjectileResidualExcitationEnergy ProjectileResidual4Momentum "
2475 #ifdef debugFTFmodel
2486 #ifdef debugFTFmodel
2492 #ifdef debugFTFmodel
2493 G4cout <<
"Low energy interaction: Target nucleus --------------" << G4endl
2494 <<
"Tr ResidualMassNumber Tr ResidualCharge Tr ResidualExcitationEnergy "
2499 G4int NumberOfTargetParticipant( 0 );
2509 if ( NumberOfTargetParticipant != 0 ) {
2522 delete targetSplitable;
2523 targetSplitable = 0;
2524 aNucleon->
Hit( targetSplitable );
2529 #ifdef debugFTFmodel
2530 G4cout <<
"NumberOfTargetParticipant " << NumberOfTargetParticipant << G4endl
2536 #ifdef debugFTFmodel
2537 G4cout <<
"Low energy interaction: Projectile nucleus --------------" << G4endl
2538 <<
"Pr ResidualMassNumber Pr ResidualCharge Pr ResidualExcitationEnergy "
2543 G4int NumberOfProjectileParticipant( 0 );
2548 NumberOfProjectileParticipant++;
2551 #ifdef debugFTFmodel
2555 DeltaExcitationE = 0.0;
2558 if ( NumberOfProjectileParticipant != 0 ) {
2560 G4double( NumberOfProjectileParticipant );
2562 G4double( NumberOfProjectileParticipant );
2574 delete projectileSplitable;
2575 projectileSplitable = 0;
2576 aNucleon->
Hit( projectileSplitable );
2581 #ifdef debugFTFmodel
2582 G4cout <<
"NumberOfProjectileParticipant " << NumberOfProjectileParticipant << G4endl
2588 #ifdef debugFTFmodel
2589 G4cout <<
"End GetResiduals -----------------" <<
G4endl;
2601 if ( AveragePt2 <= 0.0 ) {
2605 ( std::exp( -maxPtSquare/AveragePt2 ) -1.0 ) );
2610 return G4ThreeVector( Pt*std::cos(phi), Pt*std::sin(phi), 0.0 );
2621 G4double& residualExcitationEnergy,
2623 G4int& residualMassNumber,
2624 G4int& residualCharge ) {
2636 if ( ! nucleus )
return false;
2638 G4double ExcitationEnergyPerWoundedNucleon =
2661 sumMasses += 20.0*
MeV;
2662 residualExcitationEnergy += ExcitationEnergyPerWoundedNucleon;
2663 residualMassNumber--;
2670 #ifdef debugPutOnMassShell
2671 G4cout <<
"ExcitationEnergyPerWoundedNucleon " << ExcitationEnergyPerWoundedNucleon <<
G4endl
2672 <<
"\t Residual Charge, MassNumber " << residualCharge <<
" " << residualMassNumber
2673 <<
G4endl <<
"\t Initial Momentum " << nucleusMomentum
2674 <<
G4endl <<
"\t Residual Momentum " << residualMomentum <<
G4endl;
2676 residualMomentum.setPz( 0.0 );
2677 residualMomentum.setE( 0.0 );
2678 if ( residualMassNumber == 0 ) {
2680 residualExcitationEnergy = 0.0;
2683 GetIonMass( residualCharge, residualMassNumber );
2684 if ( residualMassNumber == 1 ) {
2685 residualExcitationEnergy = 0.0;
2688 sumMasses += std::sqrt(
sqr( residualMass ) + residualMomentum.perp2() );
2697 const G4int numberOfInvolvedNucleons,
2715 if ( sqrtS < 0.0 || numberOfInvolvedNucleons <= 0 || sumMasses < 0.0 )
return false;
2719 const G4double probDeltaIsobar = 0.10;
2721 G4int maxNumberOfDeltas =
G4int( (sqrtS - sumMasses)/(400.0*
MeV) );
2722 G4int numberOfDeltas = 0;
2724 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2727 if (
G4UniformRand() < probDeltaIsobar && numberOfDeltas < maxNumberOfDeltas ) {
2729 if ( ! involvedNucleons[i] )
continue;
2736 G4int newPdgCode = pdgCode/10; newPdgCode = newPdgCode*10 + 4;
2745 if ( sqrtS < sumMasses + massDelta - massNuc ) {
2749 sumMasses += ( massDelta - massNuc );
2768 const G4int residualMassNumber,
2769 const G4int numberOfInvolvedNucleons,
2783 if ( ! nucleus )
return false;
2785 if ( residualMassNumber == 0 && numberOfInvolvedNucleons == 1 ) {
2793 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2794 G4Nucleon* aNucleon = involvedNucleons[i];
2795 if ( ! aNucleon )
continue;
2805 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2806 G4Nucleon* aNucleon = involvedNucleons[i];
2807 if ( ! aNucleon )
continue;
2813 if ( x < 0.0 || x > 1.0 ) {
2823 if ( xSum < 0.0 || xSum > 1.0 ) success =
false;
2825 if ( ! success )
continue;
2827 G4double deltaPx = ( ptSum.x() - pResidual.x() ) / numberOfInvolvedNucleons;
2828 G4double deltaPy = ( ptSum.y() - pResidual.y() ) / numberOfInvolvedNucleons;
2830 if ( residualMassNumber == 0 ) {
2831 delta = ( xSum - 1.0 ) / numberOfInvolvedNucleons;
2838 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2839 G4Nucleon* aNucleon = involvedNucleons[i];
2840 if ( ! aNucleon )
continue;
2843 if ( residualMassNumber == 0 ) {
2844 if ( x <= 0.0 || x > 1.0 ) {
2849 if ( x <= 0.0 || x > 1.0 || xSum <= 0.0 || xSum > 1.0 ) {
2857 +
sqr( px ) +
sqr( py ) ) / x;
2862 if ( success && residualMassNumber != 0 ) {
2863 mass2 += (
sqr( residualMass ) + pResidual.perp2() ) / xSum;
2866 #ifdef debugPutOnMassShell
2870 }
while ( ! success );
2884 const G4bool isProjectileNucleus,
2885 const G4int numberOfInvolvedNucleons,
2900 G4double decayMomentum2 =
sqr( sValue ) +
sqr( projectileMass2 ) +
sqr( targetMass2 )
2901 - 2.0*sValue*projectileMass2 - 2.0*sValue*targetMass2
2902 - 2.0*projectileMass2*targetMass2;
2903 targetWminus = ( sValue - projectileMass2 + targetMass2 + std::sqrt( decayMomentum2 ) )
2905 projectileWplus = sqrtS - targetMass2/targetWminus;
2906 G4double projectilePz = projectileWplus/2.0 - projectileMass2/2.0/projectileWplus;
2907 G4double projectileE = projectileWplus/2.0 + projectileMass2/2.0/projectileWplus;
2908 G4double projectileY = 0.5 * std::log( (projectileE + projectilePz)/
2909 (projectileE - projectilePz) );
2910 G4double targetPz = -targetWminus/2.0 + targetMass2/2.0/targetWminus;
2911 G4double targetE = targetWminus/2.0 + targetMass2/2.0/targetWminus;
2912 G4double targetY = 0.5 * std::log( (targetE + targetPz)/(targetE - targetPz) );
2914 #ifdef debugPutOnMassShell
2915 G4cout <<
"decayMomentum2 " << decayMomentum2 <<
G4endl
2916 <<
"\t targetWminus projectileWplus " << targetWminus <<
" " << projectileWplus <<
G4endl
2917 <<
"\t projectileY targetY " << projectileY <<
" " << targetY <<
G4endl;
2920 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2921 G4Nucleon* aNucleon = involvedNucleons[i];
2922 if ( ! aNucleon )
continue;
2927 G4double pz = -targetWminus*x/2.0 + mt2/(2.0*targetWminus*x);
2928 G4double e = targetWminus*x/2.0 + mt2/(2.0*targetWminus*x);
2929 if ( isProjectileNucleus ) {
2930 pz = projectileWplus*x/2.0 - mt2/(2.0*projectileWplus*x);
2931 e = projectileWplus*x/2.0 + mt2/(2.0*projectileWplus*x);
2933 G4double nucleonY = 0.5 * std::log( (e + pz)/(e - pz) );
2935 #ifdef debugPutOnMassShell
2936 G4cout <<
"i nY pY nY-AY AY " << i <<
" " << nucleonY <<
" " << projectileY <<
G4endl;
2939 if ( std::abs( nucleonY - nucleusY ) > 2 ||
2940 ( isProjectileNucleus && targetY > nucleonY ) ||
2941 ( ! isProjectileNucleus && projectileY < nucleonY ) ) {
2954 const G4bool isProjectileNucleus,
2957 const G4int residualMassNumber,
2958 const G4int numberOfInvolvedNucleons,
2976 for (
G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
2977 G4Nucleon* aNucleon = involvedNucleons[i];
2978 if ( ! aNucleon )
continue;
2980 residual3Momentum -= tmp.vect();
2984 G4double pz = -w * x / 2.0 + mt2 / ( 2.0 * w * x );
2985 G4double e = w * x / 2.0 + mt2 / ( 2.0 * w * x );
2987 if ( isProjectileNucleus ) pz *= -1.0;
2990 tmp.transform( boostFromCmsToLab );
2996 G4double residualMt2 =
sqr( residualMass ) +
sqr( residual3Momentum.x() )
2997 +
sqr( residual3Momentum.y() );
2999 #ifdef debugPutOnMassShell
3000 G4cout <<
"w residual3Momentum.z() " << w <<
" " << residual3Momentum.z() <<
G4endl;
3005 if ( residualMassNumber != 0 ) {
3006 residualPz = -w * residual3Momentum.z() / 2.0 +
3007 residualMt2 / ( 2.0 * w * residual3Momentum.z() );
3008 residualE = w * residual3Momentum.z() / 2.0 +
3009 residualMt2 / ( 2.0 * w * residual3Momentum.z() );
3011 if ( isProjectileNucleus ) residualPz *= -1.0;
3014 residual4Momentum.setPx( residual3Momentum.x() );
3015 residual4Momentum.setPy( residual3Momentum.y() );
3016 residual4Momentum.setPz( residualPz );
3017 residual4Momentum.setE( residualE );
3026 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
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 SamplingNucleonKinematics(G4double averagePt2, const G4double maxPt2, G4double dCor, G4V3DNucleus *nucleus, const G4LorentzVector &pResidual, const G4double residualMass, const G4int residualMassNumber, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4double &mass2)
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()