1030 G4cout <<
"AdjustNucleons ---------------------------------------" <<
G4endl 1034 <<
"Pr ResidualMassNumber Pr ResidualCharge Pr ResidualExcitationEnergy " 1037 <<
"Tr ResidualMassNumber Tr ResidualCharge Tr ResidualExcitationEnergy " 1052 G4double DcorP( 0.0 ), DcorT( 0.0 );
1058 G4double ExcitationEnergyPerWoundedNucleon =
1072 G4cout <<
"case 1, hA prcol=0 trcol=0, AA prcol#0 trcol=0" <<
G4endl;
1119 if ( TResidualMassNumber <= 1 ) {
1120 TResidualExcitationEnergy = 0.0;
1124 if ( TResidualMassNumber != 0 ) {
1126 ->
GetIonMass( TResidualCharge, TResidualMassNumber );
1138 if ( ! Annihilation ) {
1139 if ( SqrtS < SumMasses ) {
1142 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1145 G4cout <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1148 TResidualExcitationEnergy = SqrtS - SumMasses;
1151 G4cout <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1159 if ( Annihilation ) {
1162 G4cout <<
"SqrtS < SumMasses - TNucleonMass " << SqrtS <<
" " 1163 << SumMasses - TNucleonMass <<
G4endl;
1166 if ( SqrtS < SumMasses - TNucleonMass ) {
1171 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1174 if ( SqrtS < SumMasses ) {
1175 TNucleonMass = SqrtS - (SumMasses - TNucleonMass) - TResidualExcitationEnergy;
1181 SumMasses = SqrtS - TResidualExcitationEnergy;
1187 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1190 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1191 TResidualExcitationEnergy = SqrtS - SumMasses;
1210 Pprojectile = Ptmp; Pprojectile.
transform( toLab );
1214 Ptmp.
setE( TNucleonMass );
1220 Ptarget = Ptmp; Ptarget.
transform( toLab );
1244 G4double Mprojectile = Pprojectile.mag();
1245 G4double M2projectile = Pprojectile.mag2();
1251 TResidualMass += TResidualExcitationEnergy;
1260 G4int NumberOfTries( 0 );
1262 G4bool OuterSuccess(
true );
1264 const G4int maxNumberOfLoops = 1000;
1265 G4int loopCounter = 0;
1267 OuterSuccess =
true;
1269 const G4int maxNumberOfTries = 10000;
1274 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1277 DcorT *= ScaleFactor;
1278 AveragePt2 *= ScaleFactor;
1288 G4bool InerSuccess =
true;
1290 const G4int maxNumberOfInnerLoops = 1000;
1291 G4int innerLoopCounter = 0;
1295 PtNucleon =
GaussianPt( AveragePt2, maxPtSquare );
1296 PtResidual = -PtNucleon;
1298 G4double Mtarget = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) +
1299 std::sqrt(
sqr( TResidualMass ) + PtResidual.mag2() );
1300 if ( SqrtS < Mprojectile + Mtarget ) {
1301 InerSuccess =
false;
1306 G4double Xcenter = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) / Mtarget;
1307 XminusNucleon = Xcenter + tmpX.
x();
1308 if ( XminusNucleon <= 0.0 || XminusNucleon >= 1.0 ) {
1309 InerSuccess =
false;
1313 XminusResidual = 1.0 - XminusNucleon;
1314 }
while ( ( ! InerSuccess ) &&
1315 ++innerLoopCounter < maxNumberOfInnerLoops );
1316 if ( innerLoopCounter >= maxNumberOfInnerLoops ) {
1318 G4cout <<
"BAD situation: forced exit of the inner while loop!" <<
G4endl;
1324 XminusNucleon = 1.0;
1325 XminusResidual = 1.0;
1329 M2target = (
sqr( TNucleonMass ) + PtNucleon.mag2() ) / XminusNucleon +
1330 (
sqr( TResidualMass ) + PtResidual.mag2() ) / XminusResidual;
1332 }
while ( ( SqrtS < Mprojectile + std::sqrt( M2target) ) &&
1333 ++NumberOfTries < maxNumberOfTries );
1334 if ( NumberOfTries >= maxNumberOfTries ) {
1336 G4cout <<
"BAD situation: forced exit of the intermediate while loop!" <<
G4endl;
1342 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
1344 WminusTarget = ( S - M2projectile + M2target + std::sqrt( DecayMomentum2 ) ) / 2.0 / SqrtS;
1345 WplusProjectile = SqrtS - M2target / WminusTarget;
1347 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
1348 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
1349 G4double Yprojectile = 0.5 *
G4Log( (Eprojectile + Pzprojectile) /
1350 (Eprojectile - Pzprojectile) );
1353 G4cout <<
"DecayMomentum2 " << DecayMomentum2 << G4endl
1354 <<
"WminusTarget WplusProjectile " << WminusTarget <<
" " << WplusProjectile
1355 << G4endl <<
"Yprojectile " << Yprojectile <<
G4endl;
1358 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1359 G4double Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1360 G4double E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1364 G4cout <<
"YtN Ytr YtN-Ytr " <<
" " << YtargetNucleon <<
" " << YtargetNucleus <<
" " 1365 << YtargetNucleon - YtargetNucleus << G4endl
1366 <<
"YtN Ypr YtN-Ypr " <<
" " << YtargetNucleon <<
" " << Yprojectile
1367 <<
" " << YtargetNucleon - Yprojectile <<
G4endl;
1370 if ( std::abs( YtargetNucleon - YtargetNucleus ) > 2 || Yprojectile < YtargetNucleon ) {
1371 OuterSuccess =
false;
1375 }
while ( ( ! OuterSuccess ) &&
1376 ++loopCounter < maxNumberOfLoops );
1377 if ( loopCounter >= maxNumberOfLoops ) {
1379 G4cout <<
"BAD situation: forced exit of the while loop!" <<
G4endl;
1384 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
1385 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
1386 Pprojectile.setPz( Pzprojectile ); Pprojectile.setE( Eprojectile );
1389 G4cout <<
"Proj after in CMS " << Pprojectile <<
G4endl;
1392 Pprojectile.transform( toLab );
1400 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1401 G4double Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1402 G4double E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
1404 Ptarget.setPx( PtNucleon.x() ); Ptarget.setPy( PtNucleon.y() );
1405 Ptarget.setPz( Pz ); Ptarget.setE( E );
1406 Ptarget.transform( toLab );
1419 G4cout <<
"TargetResidualMassNumber TargetResidualCharge TargetResidualExcitationEnergy " 1425 Mt2 =
sqr( TResidualMass ) + PtResidual.mag2();
1426 Pz = -WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
1427 E = WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
1429 TargetResidual4Momentum.setPx( PtResidual.x() );
1430 TargetResidual4Momentum.setPy( PtResidual.y() );
1431 TargetResidual4Momentum.setPz( Pz );
1432 TargetResidual4Momentum.setE( E );
1435 G4cout <<
"New Residu " << TargetResidual4Momentum <<
" CMS" <<
G4endl;
1438 TargetResidual4Momentum.transform( toLab );
1441 G4cout <<
"New Residu " << TargetResidual4Momentum <<
" Lab" <<
G4endl;
1495 if ( TResidualMassNumber <= 1 ) {
1496 TResidualExcitationEnergy = 0.0;
1500 if ( TResidualMassNumber != 0 ) {
1502 ->
GetIonMass( TResidualCharge , TResidualMassNumber );
1508 TNucleonMass + TResidualMass;
1511 G4cout <<
"SelectedTN.mag() PNMass + PResidualMass " 1513 << TNucleonMass <<
" " << TResidualMass <<
G4endl;
1518 if ( ! Annihilation ) {
1519 if ( SqrtS < SumMasses ) {
1522 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1523 TResidualExcitationEnergy = SqrtS - SumMasses;
1529 if ( Annihilation ) {
1530 if ( SqrtS < SumMasses - TNucleonMass ) {
1533 if ( SqrtS < SumMasses ) {
1534 TNucleonMass = SqrtS - (SumMasses - TNucleonMass);
1536 TResidualExcitationEnergy = 0.0;
1540 if ( SqrtS < SumMasses + TResidualExcitationEnergy ) {
1541 TResidualExcitationEnergy = SqrtS - SumMasses;
1555 Ptarget = Ptmp; Ptarget.
transform( toLab );
1559 Ptmp.
setE( TNucleonMass );
1560 Pprojectile = Ptmp; Pprojectile.
transform( toLab );
1576 G4double M2target = Ptarget.mag2();
1581 TResidualMass += TResidualExcitationEnergy;
1590 G4int NumberOfTries( 0 );
1592 G4bool OuterSuccess(
true );
1594 const G4int maxNumberOfLoops = 1000;
1595 G4int loopCounter = 0;
1598 OuterSuccess =
true;
1599 const G4int maxNumberOfTries = 10000;
1604 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1607 DcorP *= ScaleFactor;
1608 AveragePt2 *= ScaleFactor;
1616 PtNucleon =
GaussianPt( AveragePt2, maxPtSquare );
1620 PtResidual = -PtNucleon;
1622 G4double Mprojectile = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) +
1623 std::sqrt(
sqr( TResidualMass ) + PtResidual.mag2() );
1626 G4cout <<
"SqrtS < Mtarget + Mprojectile " << SqrtS <<
" " << Mtarget
1627 <<
" " << Mprojectile <<
" " << Mtarget + Mprojectile <<
G4endl;
1630 M2projectile =
sqr( Mprojectile );
1631 if ( SqrtS < Mtarget + Mprojectile ) {
1632 OuterSuccess =
false;
1636 G4double Xcenter = std::sqrt(
sqr( TNucleonMass ) + PtNucleon.mag2() ) / Mprojectile;
1638 G4bool InerSuccess =
true;
1640 const G4int maxNumberOfInnerLoops = 1000;
1641 G4int innerLoopCounter = 0;
1645 XplusNucleon = Xcenter + tmpX.
x();
1646 if ( XplusNucleon <= 0.0 || XplusNucleon >= 1.0 ) {
1647 InerSuccess =
false;
1650 XplusResidual = 1.0 - XplusNucleon;
1651 }
while ( ( ! InerSuccess ) &&
1652 ++innerLoopCounter < maxNumberOfInnerLoops );
1653 if ( innerLoopCounter >= maxNumberOfInnerLoops ) {
1655 G4cout <<
"BAD situation: forced exit of the inner while loop!" <<
G4endl;
1662 XplusResidual = 1.0;
1667 G4cout <<
"TNucleonMass PtNucleon XplusNucleon " << TNucleonMass <<
" " << PtNucleon
1668 <<
" " << XplusNucleon << G4endl
1669 <<
"TResidualMass PtResidual XplusResidual " << TResidualMass <<
" " << PtResidual
1670 <<
" " << XplusResidual <<
G4endl;
1673 M2projectile = (
sqr( TNucleonMass ) + PtNucleon.mag2() ) / XplusNucleon +
1674 (
sqr( TResidualMass ) + PtResidual.mag2() ) / XplusResidual;
1677 G4cout <<
"SqrtS < Mtarget + std::sqrt(M2projectile) " << SqrtS <<
" " << Mtarget
1678 <<
" " << std::sqrt( M2projectile ) <<
" " << Mtarget + std::sqrt( M2projectile )
1682 }
while ( ( SqrtS < Mtarget + std::sqrt( M2projectile ) ) &&
1683 ++NumberOfTries < maxNumberOfTries );
1684 if ( NumberOfTries >= maxNumberOfTries ) {
1686 G4cout <<
"BAD situation: forced exit of the intermediate while loop!" <<
G4endl;
1692 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
1694 WplusProjectile = ( S + M2projectile - M2target + std::sqrt( DecayMomentum2 ) )/2.0/SqrtS;
1695 WminusTarget = SqrtS - M2projectile/WplusProjectile;
1697 G4double Pztarget = -WminusTarget/2.0 + M2target/2.0/WminusTarget;
1698 G4double Etarget = WminusTarget/2.0 + M2target/2.0/WminusTarget;
1699 G4double Ytarget = 0.5 *
G4Log( (Etarget + Pztarget)/(Etarget - Pztarget) );
1702 G4cout <<
"DecayMomentum2 " << DecayMomentum2 << G4endl
1703 <<
"WminusTarget WplusProjectile " << WminusTarget <<
" " << WplusProjectile
1704 << G4endl <<
"YtargetNucleon " << Ytarget <<
G4endl;
1707 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1708 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
1709 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
1710 G4double YprojectileNucleon = 0.5 *
G4Log( (E + Pz)/(E - Pz) );
1713 G4cout <<
"YpN Ypr YpN-Ypr " <<
" " << YprojectileNucleon <<
" " << YprojectileNucleus
1714 <<
" " << YprojectileNucleon - YprojectileNucleus << G4endl
1715 <<
"YpN Ytr YpN-Ytr " <<
" " << YprojectileNucleon <<
" " << Ytarget
1716 <<
" " << YprojectileNucleon - Ytarget <<
G4endl;
1719 if ( std::abs( YprojectileNucleon - YprojectileNucleus ) > 2 ||
1720 Ytarget > YprojectileNucleon ) {
1721 OuterSuccess =
false;
1725 }
while ( ( ! OuterSuccess ) &&
1726 ++loopCounter < maxNumberOfLoops );
1727 if ( loopCounter >= maxNumberOfLoops ) {
1729 G4cout <<
"BAD situation: forced exit of the while loop!" <<
G4endl;
1735 G4double Pztarget = -WminusTarget/2.0 + M2target/2.0/WminusTarget;
1736 G4double Etarget = WminusTarget/2.0 + M2target/2.0/WminusTarget;
1737 Ptarget.setPz( Pztarget ); Ptarget.setE( Etarget );
1738 Ptarget.transform( toLab );
1746 G4double Mt2 =
sqr( TNucleonMass ) + PtNucleon.mag2();
1747 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
1748 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
1749 Pprojectile.setPx( PtNucleon.x() ); Pprojectile.setPy( PtNucleon.y() );
1750 Pprojectile.setPz( Pz ); Pprojectile.setE( E );
1751 Pprojectile.transform( toLab );
1755 G4cout <<
"Proj after in Lab " << Pprojectile <<
G4endl;
1764 Mt2 =
sqr( TResidualMass ) + PtResidual.mag2();
1765 Pz = WplusProjectile*XplusResidual/2.0 - Mt2/(2.0*WplusProjectile*XplusResidual);
1766 E = WplusProjectile*XplusResidual/2.0 + Mt2/(2.0*WplusProjectile*XplusResidual);
1767 ProjectileResidual4Momentum.setPx( PtResidual.x() );
1768 ProjectileResidual4Momentum.setPy( PtResidual.y() );
1769 ProjectileResidual4Momentum.setPz( Pz );
1770 ProjectileResidual4Momentum.setE( E );
1771 ProjectileResidual4Momentum.transform( toLab );
1789 G4cout <<
"Proj res Init " << ProjectileResidual4Momentum << G4endl
1790 <<
"Targ res Init " << TargetResidual4Momentum << G4endl
1791 <<
"ProjectileResidualMassNumber ProjectileResidualCharge " 1819 if ( PResidualMassNumber <= 1 ) {
1820 PResidualExcitationEnergy = 0.0;
1824 if ( PResidualMassNumber != 0 ) {
1826 ->
GetIonMass( PResidualCharge, PResidualMassNumber );
1838 if ( TResidualMassNumber <= 1 ) {
1839 TResidualExcitationEnergy = 0.0;
1842 if ( TResidualMassNumber != 0 ) {
1844 ->
GetIonMass( TResidualCharge, TResidualMassNumber );
1849 G4double SumMasses = PNucleonMass + PResidualMass + TNucleonMass + TResidualMass;
1852 G4cout <<
"PNucleonMass PResidualMass TNucleonMass TResidualMass " << PNucleonMass
1853 <<
" " << PResidualMass <<
" " << TNucleonMass <<
" " << TResidualMass << G4endl
1854 <<
"PResidualExcitationEnergy " << PResidualExcitationEnergy << G4endl
1855 <<
"TResidualExcitationEnergy " << TResidualExcitationEnergy <<
G4endl;
1860 if ( ! Annihilation ) {
1863 G4cout <<
"SqrtS < SumMasses " << SqrtS <<
" " << SumMasses <<
G4endl;
1866 if ( SqrtS < SumMasses ) {
1871 G4cout <<
"SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy " 1872 << SqrtS <<
" " << SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy
1876 if ( SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy ) {
1879 if ( PResidualExcitationEnergy <= 0.0 ) {
1880 TResidualExcitationEnergy = SqrtS - SumMasses;
1881 }
else if ( TResidualExcitationEnergy <= 0.0 ) {
1882 PResidualExcitationEnergy = SqrtS - SumMasses;
1884 G4double Fraction = (SqrtS - SumMasses) /
1885 (PResidualExcitationEnergy + TResidualExcitationEnergy);
1886 PResidualExcitationEnergy *= Fraction;
1887 TResidualExcitationEnergy *= Fraction;
1896 if ( Annihilation ) {
1897 if ( SqrtS < SumMasses - TNucleonMass ) {
1900 if ( SqrtS < SumMasses ) {
1902 TNucleonMass = SqrtS - (SumMasses - TNucleonMass);
1904 TResidualExcitationEnergy = 0.0;
1906 if ( SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy ) {
1908 if ( PResidualExcitationEnergy <= 0.0 ) {
1909 TResidualExcitationEnergy = SqrtS - SumMasses;
1910 }
else if ( TResidualExcitationEnergy <= 0.0 ) {
1911 PResidualExcitationEnergy = SqrtS - SumMasses;
1913 G4double Fraction = (SqrtS - SumMasses) /
1914 (PResidualExcitationEnergy + TResidualExcitationEnergy);
1915 PResidualExcitationEnergy *= Fraction;
1916 TResidualExcitationEnergy *= Fraction;
1925 Ptmp.
setE( PNucleonMass );
1926 Pprojectile = Ptmp; Pprojectile.
transform( toLab );
1936 ProjectileResidual4Momentum = Ptmp;
1940 Ptmp.
setE( TNucleonMass );
1941 Ptarget = Ptmp; Ptarget.
transform( toLab );
1951 TargetResidual4Momentum = Ptmp;
1960 G4cout <<
"YprojectileNucleus XcenterP " << YprojectileNucleus <<
G4endl;
1966 PResidualMass += PResidualExcitationEnergy;
1967 TResidualMass += TResidualExcitationEnergy;
1984 G4int NumberOfTries( 0 );
1986 G4bool OuterSuccess(
true );
1988 const G4int maxNumberOfLoops = 1000;
1989 G4int loopCounter = 0;
1992 OuterSuccess =
true;
1993 const G4int maxNumberOfTries = 10000;
1998 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
2001 DcorP *= ScaleFactor;
2002 DcorT *= ScaleFactor;
2003 AveragePt2 *= ScaleFactor;
2011 PtNucleonP =
GaussianPt( AveragePt2, maxPtSquare );
2015 PtResidualP = -PtNucleonP;
2018 PtNucleonT =
GaussianPt( AveragePt2, maxPtSquare );
2022 PtResidualT = -PtNucleonT;
2024 G4double Mprojectile = std::sqrt(
sqr( PNucleonMass ) + PtNucleonP.mag2() ) +
2025 std::sqrt(
sqr( PResidualMass ) + PtResidualP.mag2() );
2026 M2projectile =
sqr( Mprojectile );
2028 G4double Mtarget = std::sqrt(
sqr( TNucleonMass ) + PtNucleonT.mag2() ) +
2029 std::sqrt(
sqr( TResidualMass ) + PtResidualT.mag2() );
2030 M2target =
sqr( Mtarget );
2032 if ( SqrtS < Mprojectile + Mtarget ) {
2033 OuterSuccess =
false;
2037 G4bool InerSuccess =
true;
2040 const G4int maxNumberOfInnerLoops = 1000;
2041 G4int innerLoopCounter = 0;
2045 G4double XcenterP = std::sqrt(
sqr( PNucleonMass ) + PtNucleonP.mag2() ) / Mprojectile;
2046 XplusNucleon = XcenterP + tmpX.
x();
2053 if ( XplusNucleon <= 0.0 || XplusNucleon >= 1.0 ) {
2054 InerSuccess =
false;
2057 XplusResidual = 1.0 - XplusNucleon;
2058 }
while ( ( ! InerSuccess ) &&
2059 ++innerLoopCounter < maxNumberOfInnerLoops );
2060 if ( innerLoopCounter >= maxNumberOfInnerLoops ) {
2062 G4cout <<
"BAD situation: forced exit of the first inner while loop!" <<
G4endl;
2075 XplusResidual = 1.0;
2080 const G4int maxNumberOfInnerLoops = 1000;
2081 G4int innerLoopCounter = 0;
2086 G4double XcenterT = std::sqrt(
sqr( TNucleonMass ) + PtNucleonT.mag2() ) / Mtarget;
2087 XminusNucleon = XcenterT + tmpX.
x();
2088 if ( XminusNucleon <= 0.0 || XminusNucleon >= 1.0 ) {
2089 InerSuccess =
false;
2092 XminusResidual = 1.0 - XminusNucleon;
2093 }
while ( ( ! InerSuccess ) &&
2094 ++innerLoopCounter < maxNumberOfInnerLoops );
2095 if ( innerLoopCounter >= maxNumberOfInnerLoops ) {
2097 G4cout <<
"BAD situation: forced exit of the second inner while loop!" <<
G4endl;
2102 XminusNucleon = 1.0;
2103 XminusResidual = 1.0;
2107 G4cout <<
"PtNucleonP " << PtNucleonP <<
" " << PtResidualP << G4endl
2108 <<
"XplusNucleon XplusResidual " << XplusNucleon <<
" " << XplusResidual << G4endl
2109 <<
"PtNucleonT " << PtNucleonT <<
" " << PtResidualT << G4endl
2110 <<
"XminusNucleon XminusResidual " << XminusNucleon <<
" " << XminusResidual
2114 M2projectile = (
sqr( PNucleonMass ) + PtNucleonP.mag2() ) / XplusNucleon +
2115 (
sqr( PResidualMass) + PtResidualP.mag2() ) / XplusResidual;
2116 M2target = (
sqr( TNucleonMass ) + PtNucleonT.mag2() ) / XminusNucleon +
2117 (
sqr( TResidualMass ) + PtResidualT.mag2() ) / XminusResidual;
2119 }
while ( ( SqrtS < std::sqrt( M2projectile ) + std::sqrt( M2target ) ) &&
2120 ++NumberOfTries < maxNumberOfTries );
2121 if ( NumberOfTries >= maxNumberOfTries ) {
2123 G4cout <<
"BAD situation: forced exit of the intermediate while loop!" <<
G4endl;
2129 - 2.0*S*M2projectile - 2.0*S*M2target - 2.0*M2projectile*M2target;
2131 WplusProjectile = ( S + M2projectile - M2target + std::sqrt( DecayMomentum2 ) )/2.0/SqrtS;
2132 WminusTarget = SqrtS - M2projectile/WplusProjectile;
2134 G4double Mt2 =
sqr( PNucleonMass ) + PtNucleonP.mag2();
2135 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
2136 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
2137 G4double YprojectileNucleon = 0.5 *
G4Log( (E + Pz)/(E - Pz) );
2139 Mt2 =
sqr( TNucleonMass ) + PtNucleonT.mag2();
2140 Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2141 E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2144 if ( std::abs( YtargetNucleon - YtargetNucleus ) > 2 ||
2145 std::abs( YprojectileNucleon - YprojectileNucleus ) > 2 ||
2146 YprojectileNucleon < YtargetNucleon ) {
2147 OuterSuccess =
false;
2151 }
while ( ( ! OuterSuccess ) &&
2152 ++loopCounter < maxNumberOfLoops );
2153 if ( loopCounter >= maxNumberOfLoops ) {
2155 G4cout <<
"BAD situation: forced exit of the while loop!" <<
G4endl;
2164 G4double Mt2 =
sqr( PNucleonMass ) + PtNucleonP.mag2();
2165 G4double Pz = WplusProjectile*XplusNucleon/2.0 - Mt2/(2.0*WplusProjectile*XplusNucleon);
2166 G4double E = WplusProjectile*XplusNucleon/2.0 + Mt2/(2.0*WplusProjectile*XplusNucleon);
2168 Pprojectile.setPx( PtNucleonP.x() ); Pprojectile.setPy( PtNucleonP.y() );
2169 Pprojectile.setPz( Pz ); Pprojectile.setE( E );
2170 Pprojectile.transform( toLab );
2179 G4cout <<
"PResidualMass PtResidualP " << PResidualMass <<
" " << PtResidualP <<
G4endl;
2183 Mt2 =
sqr( PResidualMass ) + PtResidualP.mag2();
2184 Pz = WplusProjectile*XplusResidual/2.0 - Mt2/(2.0*WplusProjectile*XplusResidual);
2185 E = WplusProjectile*XplusResidual/2.0 + Mt2/(2.0*WplusProjectile*XplusResidual);
2186 ProjectileResidual4Momentum.setPx( PtResidualP.x() );
2187 ProjectileResidual4Momentum.setPy( PtResidualP.y() );
2188 ProjectileResidual4Momentum.setPz( Pz );
2189 ProjectileResidual4Momentum.setE( E );
2190 ProjectileResidual4Momentum.transform( toLab );
2196 G4cout <<
"Pr N R " << Pprojectile << G4endl <<
" " 2197 << ProjectileResidual4Momentum <<
G4endl;
2200 Mt2 =
sqr( TNucleonMass ) + PtNucleonT.mag2();
2201 Pz = -WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2202 E = WminusTarget*XminusNucleon/2.0 + Mt2/(2.0*WminusTarget*XminusNucleon);
2204 Ptarget.
setPx( PtNucleonT.x() ); Ptarget.
setPy( PtNucleonT.y() );
2215 Mt2 =
sqr( TResidualMass ) + PtResidualT.mag2();
2216 Pz = -WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
2217 E = WminusTarget*XminusResidual/2.0 + Mt2/(2.0*WminusTarget*XminusResidual);
2219 TargetResidual4Momentum.setPx( PtResidualT.x() );
2220 TargetResidual4Momentum.setPy( PtResidualT.y() );
2221 TargetResidual4Momentum.setPz( Pz );
2222 TargetResidual4Momentum.setE( E) ;
2223 TargetResidual4Momentum.transform( toLab );
2229 G4cout <<
"Tr N R " << Ptarget << G4endl <<
" " << TargetResidual4Momentum <<
G4endl;
CLHEP::Hep3Vector G4ThreeVector
G4int GetSoftCollisionCount()
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
G4int TargetResidualMassNumber
HepLorentzVector & rotateZ(double)
G4FTFParameters * theParameters
G4double GetIonMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
G4GLOB_DLL std::ostream G4cout
virtual const G4ParticleDefinition * GetDefinition() const
G4IonTable * GetIonTable() const
const G4LorentzVector & Get4Momentum() const
G4int ProjectileResidualMassNumber
HepLorentzRotation & transform(const HepBoost &b)
G4double GetMaxPt2ofNuclearDestruction()
G4V3DNucleus * GetProjectileNucleus() const
G4double G4Log(G4double x)
G4int ProjectileResidualCharge
static G4ParticleTable * GetParticleTable()
G4double GetPt2ofNuclearDestruction()
G4double GetPDGMass() const
Hep3Vector boostVector() const
G4double GetExcitationEnergyPerWoundedNucleon()
HepLorentzVector & rotateY(double)
G4int TargetResidualCharge
HepLorentzVector & transform(const HepRotation &)
G4LorentzVector TargetResidual4Momentum
void Set4Momentum(const G4LorentzVector &a4Momentum)
G4LorentzVector ProjectileResidual4Momentum
G4double GetPDGCharge() const
G4double ProjectileResidualExcitationEnergy
G4double TargetResidualExcitationEnergy
CLHEP::HepLorentzVector G4LorentzVector
G4double GetDofNuclearDestruction()