Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ASTARStopping.cc,v 1.8 2008/11/24 18:28:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ASTARStopping.cc,v 1.13 2010/04/26 17:22:08 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
//---------------------------------------------------------------------------
//
// GEANT4 Class file
@@ -39,6 +39,9 @@
// Contract: CSMAN-5288
//
// Modifications:
// 19.04.2010 A.Ivanchenko fixed data for G4_O,
// checked all data
// 25.04.2010 V.Ivanchenko introduce G4LPhysicsFreeVector
//
//----------------------------------------------------------------------------
//
@@ -52,26 +55,31 @@
G4ASTARStopping::G4ASTARStopping()
{
currentE = 0.0;
currentMaterial = 0;
index = 0;
matIndex = -1;
name.resize(74,"");
effZ.resize(74,0);
sdata.resize(74,0);
Initialise();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ASTARStopping::~G4ASTARStopping()
{}
{
for(size_t i=0; i<74; ++i) { delete sdata[i]; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int G4ASTARStopping:: GetIndex (const G4Material* mat)
{
if (mat == currentMaterial) return matIndex;
if (mat == currentMaterial) { return matIndex; }
G4String matName = mat->GetName();
for (G4int i=0; i<74; i++){
if (matName == name[i]){
for (G4int i=0; i<74; ++i){
if (matName == name[i]){
matIndex = i;
currentMaterial = mat;
return i;
@@ -84,43 +92,19 @@ G4int G4ASTARStopping:: GetIndex (const G4Material* mat)
G4double G4ASTARStopping::GetElectronicDEDX(G4int i, G4double energy)
{
if (matIndex == i && energy == currentE) return res;
G4double res = 0.0;
if (i<0 || i>73){
G4cout << "### G4ASTARStopping WARNING: index "
<< i << " is out of range!" << G4endl;
res = 0.0;
return res;
}
matIndex = i;
currentE = energy;
if (energy < kinE[index] || energy > kinE[index+1]){
if (energy <= kinE[0]) {
index = 0;
res = e[matIndex][0]*std::sqrt(energy/kinE[0]);
return res;
} else if (energy >= kinE[77]) {
index = 76;
res = e[matIndex][77];
return res;
}
for (index = 0; index<77; index++){if (energy <= kinE[index+1]) break;}
}
G4double t1 = kinE[index];
G4double t2 = kinE[index+1];
G4double e1 = e[matIndex][index];
G4double e2 = e[matIndex][index+1];
res = e1*std::exp(std::log(energy/t1)*std::log(e2/e1)/std::log(t2/t1));
if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); }
else { res = sdata[i]->Value(energy); }
return res;
}
}
void G4ASTARStopping::Initialise()
{
G4int i;
G4double Z[74] = {
6.0, 6.0, 6.0, 47.0, 7.0, 13.0, 13.0, 18.0, 79.0, 6.0,
4.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 20.0, 40.0, 6.0,
@@ -132,378 +116,312 @@ G4double Z[74] = {
74.0, 8.0, 8.0, 54.0
};
for(i=0; i<74; i++) {effZ[i]=Z[i];}
for(G4int i=0; i<74; ++i) {effZ[i]=Z[i];}
name [0] = "G4_A-150_TISSUE";
G4double T0[78] = { 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.0125, 0.015, 0.0175, 0.02, 0.0225, 0.025, 0.0275, 0.03, 0.035, 0.04, 0.045, 0.05, 0.055, 0.06, 0.065, 0.07, 0.075, 0.08, 0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10 };
G4double T0[78] = { 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.0125, 0.015, 0.0175, 0.02, 0.0225, 0.025, 0.0275, 0.03, 0.035, 0.04, 0.045, 0.05, 0.055, 0.06, 0.065, 0.07, 0.075, 0.08, 0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10. };
emin = T0[0]*MeV;
G4double e0[78] = { 168.8, 204.2, 233.8, 259.7, 283, 324.3, 360.4, 393, 422.8, 450.5, 476.5, 501, 557.1, 607.7, 654.1, 697.1, 737.4, 775.4, 811.5, 845.9, 910.3, 970, 1026, 1078, 1128, 1175, 1220, 1263, 1305, 1344, 1383, 1419, 1455, 1489, 1646, 1782, 1901, 2005, 2097, 2178, 2249, 2312, 2413, 2488, 2539, 2572, 2589, 2593, 2586, 2571, 2548, 2521, 2489, 2453, 2416, 2377, 2176, 1989, 1825, 1683, 1561, 1457, 1369, 1292, 1165, 1062, 978.5, 908.4, 848.8, 797.4, 752.4, 712.9, 677.7, 646.1, 617.7, 591.9, 568.4, 547 };
for(i=0; i<78; i++) {e[0][i]=e0[i]*MeV*cm2/g;}
for(i=0; i<78; i++) {kinE[i]=T0[i];}
AddData(T0,e0, 0);
name [1] = "G4_ACETYLENE";
G4double e1[78] = { 192.2, 229.4, 260.2, 287, 311, 353.1, 389.7, 422.5, 452.4, 480.1, 506, 530.3, 585.9, 635.7, 681.2, 723.2, 762.5, 799.4, 834.3, 867.5, 929.6, 986.9, 1040, 1090, 1137, 1182, 1224, 1265, 1304, 1341, 1376, 1411, 1444, 1475, 1619, 1741, 1847, 1938, 2017, 2085, 2144, 2195, 2275, 2331, 2367, 2388, 2397, 2395, 2386, 2370, 2350, 2326, 2299, 2271, 2241, 2210, 2056, 1913, 1783, 1666, 1562, 1468, 1384, 1308, 1177, 1072, 986.8, 915.5, 855, 802.8, 757.2, 717.1, 681.4, 649.5, 620.7, 594.7, 570.9, 549.2 };
for(i=0; i<78; i++) {e[1][i]=e1[i]*MeV*cm2/g;}
AddData(T0,e1, 1);
name [2] = "G4_ADIPOSE_TISSUE_ICRP";
G4double e2[78] = { 169.4, 204.2, 233.3, 258.8, 281.8, 322.4, 358.1, 390.2, 419.7, 447.2, 472.9, 497.2, 552.9, 603.2, 649.4, 692.4, 732.7, 770.7, 806.8, 841.3, 906, 966.1, 1022, 1075, 1125, 1173, 1219, 1262, 1304, 1344, 1383, 1420, 1456, 1491, 1650, 1787, 1907, 2012, 2104, 2185, 2256, 2317, 2417, 2489, 2539, 2571, 2588, 2592, 2587, 2573, 2554, 2529, 2500, 2468, 2434, 2398, 2213, 2035, 1874, 1731, 1605, 1499, 1408, 1328, 1197, 1091, 1004, 932.2, 870.7, 817.8, 771.5, 730.8, 694.5, 662.1, 632.9, 606.4, 582.3, 560.2 };
for(i=0; i<78; i++) {e[2][i]=e2[i]*MeV*cm2/g;}
AddData(T0,e2, 2);
name [3] = "G4_Ag";
G4double e3[78] = { 31.26, 38.13, 43.91, 48.98, 53.56, 61.66, 68.79, 75.21, 81.11, 86.6, 91.74, 96.6, 107.7, 117.8, 127, 135.6, 143.6, 151.2, 158.4, 165.3, 178.2, 190.2, 201.4, 212, 222, 231.6, 240.7, 249.5, 257.9, 266, 273.9, 281.4, 288.8, 295.9, 328.8, 357.8, 383.8, 407.4, 428.8, 448.4, 466.3, 482.8, 511.8, 536.2, 556.6, 573.5, 587.3, 598.4, 607.2, 613.8, 618.5, 621.6, 623.4, 623.8, 623.3, 621.8, 604.4, 578.7, 550.8, 523.3, 497.6, 474.4, 453.6, 435, 402.7, 375.9, 353.2, 333.6, 316.9, 302, 288.8, 276.9, 266.2, 256.5, 247.7, 239.5, 232, 225.1 };
for(i=0; i<78; i++) {e[3][i]=e3[i]*MeV*cm2/g;}
AddData(T0,e3, 3);
name [4] = "G4_AIR";
G4double e4[78] = { 87.5, 108.6, 126.7, 142.7, 157.3, 183.5, 206.7, 227.9, 247.5, 265.9, 283.2, 299.6, 337.7, 372.3, 404.3, 434.3, 462.6, 489.4, 515, 539.5, 585.8, 629, 669.6, 708.1, 744.8, 779.8, 813.4, 845.7, 876.8, 906.8, 935.9, 964, 991.3, 1018, 1140, 1247, 1343, 1429, 1506, 1575, 1637, 1693, 1787, 1861, 1918, 1961, 1990, 2008, 2017, 2019, 2013, 2002, 1987, 1968, 1946, 1922, 1774, 1625, 1494, 1382, 1287, 1205, 1133, 1072, 968.6, 885.9, 818, 760.7, 711.7, 669.6, 632.7, 600.2, 571.2, 545.3, 521.9, 500.6, 481.2, 463.4 };
for(i=0; i<78; i++) {e[4][i]=e4[i]*MeV*cm2/g;}
AddData(T0,e4, 4);
name [5] = "G4_Al";
G4double e5[78] = { 55.8, 71.89, 86.05, 98.92, 110.9, 132.7, 152.5, 170.9, 188.2, 204.5, 220.1, 235.1, 270.1, 302.5, 332.8, 361.5, 388.6, 414.6, 439.4, 463.3, 508.4, 550.4, 589.6, 626.5, 661.1, 693.7, 724.3, 753.2, 780.3, 805.9, 830.1, 852.8, 874.3, 894.5, 980, 1045, 1096, 1136, 1168, 1195, 1216, 1234, 1262, 1280, 1291, 1297, 1298, 1297, 1293, 1286, 1279, 1269, 1259, 1248, 1237, 1225, 1161, 1098, 1039, 984.9, 937.6, 895.4, 856.8, 821, 756.1, 698.6, 647.8, 604.8, 567.8, 535.7, 507.4, 482.4, 460, 439.8, 421.6, 405.1, 389.9, 376 };
for(i=0; i<78; i++) {e[5][i]=e5[i]*MeV*cm2/g;}
AddData(T0,e5, 5);
name [6] = "G4_ALUMINUM_OXIDE";
G4double e6[78] = { 71.39, 88.59, 103.3, 116.4, 128.4, 149.9, 169, 186.5, 202.8, 218, 232.3, 246, 277.7, 306.6, 333.4, 358.5, 382.1, 404.6, 426, 446.5, 485, 520.9, 554.3, 585.8, 615.5, 643.5, 670, 695.2, 719.1, 741.9, 763.6, 784.3, 804, 822.9, 905.9, 974, 1031, 1080, 1122, 1159, 1191, 1220, 1267, 1304, 1332, 1353, 1368, 1378, 1383, 1385, 1384, 1381, 1376, 1370, 1362, 1352, 1308, 1253, 1187, 1115, 1044, 982.5, 928.4, 880, 801.2, 737, 683.4, 638.1, 599.1, 565.2, 535.4, 508.9, 485.3, 464, 444.8, 427.3, 411.4, 396.7 };
for(i=0; i<78; i++) {e[6][i]=e6[i]*MeV*cm2/g;}
AddData(T0,e6, 6);
name [7] = "G4_Ar";
G4double e7[78] = { 34.54, 44.56, 53.39, 61.42, 68.88, 82.53, 94.95, 106.5, 117.3, 127.6, 137.4, 146.8, 168.8, 189.3, 208.5, 226.7, 244.1, 260.8, 276.8, 292.3, 321.9, 349.8, 376.5, 401.9, 426.4, 450, 472.8, 494.9, 516.3, 537.1, 557.3, 577, 596.1, 614.8, 702.1, 780.3, 850.8, 914.4, 971.9, 1024, 1070, 1111, 1181, 1233, 1272, 1298, 1314, 1321, 1321, 1315, 1305, 1291, 1276, 1258, 1240, 1222, 1130, 1047, 974, 911.2, 856.7, 809, 767, 729.8, 666.1, 613.2, 569.7, 532.7, 501, 473.4, 449.1, 427.4, 408.3, 391, 375.4, 361.1, 348.1, 336 };
for(i=0; i<78; i++) {e[7][i]=e7[i]*MeV*cm2/g;}
AddData(T0,e7, 7);
name [8] = "G4_Au";
G4double e8[78] = { 11.5, 14.55, 17.2, 19.57, 21.76, 25.72, 29.27, 32.54, 35.59, 38.46, 41.18, 43.78, 49.83, 55.39, 60.56, 65.44, 70.06, 74.46, 78.68, 82.74, 90.45, 97.69, 104.5, 111.1, 117.3, 123.3, 129.1, 134.6, 140, 145.2, 150.3, 155.2, 160, 164.7, 186.4, 205.8, 223.5, 239.5, 254.2, 267.7, 280.1, 291.5, 311.6, 328.5, 342.6, 354.3, 363.8, 371.5, 377.5, 382.1, 385.5, 387.8, 389.1, 389.6, 389.4, 388.7, 384.4, 375.7, 362.6, 346.8, 330.5, 316.4, 304, 293, 274.1, 258.4, 245, 233.4, 223.1, 214, 205.8, 198.4, 191.6, 185.5, 179.7, 174.5, 169.6, 165 };
for(i=0; i<78; i++) {e[8][i]=e8[i]*MeV*cm2/g;}
AddData(T0,e8, 8);
name [9] = "G4_B-100_BONE";
G4double e9[78] = { 138.6, 167.7, 192, 213.3, 232.4, 266.3, 296, 322.7, 347.2, 369.9, 391.2, 411.3, 457.3, 498.8, 536.8, 572, 605, 636.1, 665.7, 693.8, 746.5, 795.4, 841, 883.9, 924.5, 963.1, 999.9, 1035, 1069, 1101, 1133, 1163, 1192, 1220, 1348, 1460, 1557, 1643, 1719, 1786, 1845, 1897, 1983, 2047, 2093, 2124, 2142, 2149, 2148, 2139, 2125, 2106, 2084, 2059, 2031, 2003, 1861, 1726, 1600, 1484, 1379, 1290, 1214, 1147, 1035, 945.3, 871.8, 810, 757.7, 712.5, 672.9, 638.1, 607, 579.2, 554.1, 531.3, 510.5, 491.5 };
for(i=0; i<78; i++) {e[9][i]=e9[i]*MeV*cm2/g;}
AddData(T0,e9, 9);
name [10] = "G4_Be";
G4double e10[78] = { 146.3, 177.1, 202.9, 225.4, 245.6, 281.3, 312.5, 340.6, 366.2, 390, 412.2, 433.2, 481.1, 524.1, 563.3, 599.7, 633.6, 665.4, 695.6, 724.2, 777.7, 827, 872.7, 915.5, 955.7, 993.7, 1030, 1064, 1096, 1128, 1157, 1186, 1213, 1239, 1356, 1453, 1534, 1602, 1659, 1706, 1745, 1776, 1821, 1846, 1856, 1855, 1845, 1829, 1809, 1785, 1759, 1732, 1703, 1674, 1645, 1617, 1499, 1406, 1326, 1254, 1189, 1129, 1075, 1024, 935.3, 858.7, 792.9, 737.6, 690, 648.7, 612.5, 580.4, 552, 526.4, 503.3, 482.4, 463.3, 445.8 };
for(i=0; i<78; i++) {e[10][i]=e10[i]*MeV*cm2/g;}
AddData(T0,e10, 10);
name [11] = "G4_BONE_COMPACT_ICRU";
G4double e11[78] = { 125.9, 152.6, 175, 194.8, 212.5, 244.1, 271.8, 296.8, 319.8, 341.1, 361.2, 380.2, 423.8, 463.1, 499.3, 533, 564.6, 594.5, 622.8, 649.9, 700.8, 748.1, 792.4, 834.2, 873.7, 911.4, 947.4, 981.9, 1015, 1047, 1078, 1107, 1136, 1164, 1291, 1401, 1498, 1584, 1660, 1727, 1787, 1839, 1926, 1991, 2039, 2072, 2092, 2103, 2105, 2100, 2089, 2075, 2056, 2035, 2011, 1986, 1846, 1705, 1576, 1460, 1358, 1271, 1196, 1130, 1020, 931.6, 859.4, 798.8, 747.4, 702.9, 664, 629.7, 599.1, 571.7, 547.1, 524.7, 504.3, 485.6 };
for(i=0; i<78; i++) {e[11][i]=e11[i]*MeV*cm2/g;}
AddData(T0,e11, 11);
name [12] = "G4_C";
G4double e12[78] = { 190.6, 225.6, 254.3, 279, 300.9, 339.2, 372.1, 401.4, 427.9, 452.3, 475, 496.2, 544.3, 586.9, 625.5, 661, 693.8, 724.6, 753.5, 780.8, 831.5, 877.9, 920.8, 960.6, 998, 1033, 1066, 1098, 1128, 1156, 1184, 1210, 1235, 1259, 1366, 1455, 1531, 1595, 1650, 1698, 1738, 1772, 1825, 1862, 1886, 1900, 1906, 1906, 1901, 1892, 1880, 1866, 1850, 1833, 1814, 1795, 1684, 1571, 1466, 1372, 1288, 1213, 1145, 1085, 981.9, 898.2, 829.6, 772, 722.9, 680.4, 643.1, 610.2, 580.8, 554.4, 530.6, 509, 489.2, 471.2 };
AddData(T0,e12, 12);
for(i=0; i<78; i++) {e[12][i]=e12[i]*MeV*cm2/g;}
name [13] = "G4_C_Graphite";
name [13] = "G4_GRAPHITE_POROUS";
G4double e13[78] = { 192.3, 228.9, 259, 285.1, 308.3, 348.9, 384, 415.3, 443.7, 469.9, 494.2, 517, 568.9, 615.1, 657, 695.5, 731.3, 764.8, 796.3, 826.2, 881.8, 932.7, 979.8, 1024, 1065, 1104, 1141, 1175, 1209, 1240, 1271, 1300, 1327, 1354, 1473, 1574, 1658, 1731, 1793, 1845, 1890, 1929, 1987, 2027, 2051, 2063, 2065, 2060, 2049, 2034, 2015, 1993, 1969, 1944, 1917, 1891, 1751, 1620, 1502, 1400, 1310, 1231, 1161, 1099, 994.3, 909, 839.2, 780.7, 730.8, 687.6, 649.8, 616.4, 586.6, 559.8, 535.7, 513.8, 493.8, 475.5 };
for(i=0; i<78; i++) {e[13][i]=e13[i]*MeV*cm2/g;}
AddData(T0,e13, 13);
name [14] = "G4_ETHYLENE";
G4double e14[78] = { 159.8, 195.8, 226, 252.7, 276.8, 319.7, 357.4, 391.5, 422.9, 452.1, 479.5, 505.4, 565.1, 619, 668.6, 714.8, 758.1, 799.1, 838.1, 875.3, 945.4, 1011, 1072, 1130, 1185, 1237, 1288, 1336, 1383, 1428, 1471, 1514, 1555, 1594, 1779, 1945, 2094, 2230, 2354, 2468, 2571, 2666, 2830, 2961, 3060, 3130, 3172, 3189, 3185, 3164, 3129, 3086, 3038, 2986, 2931, 2876, 2578, 2306, 2084, 1907, 1763, 1642, 1539, 1450, 1303, 1185, 1089, 1010, 941.9, 883.6, 832.8, 788.1, 748.4, 712.9, 680.9, 652, 625.7, 601.7 };
for(i=0; i<78; i++) {e[14][i]=e14[i]*MeV*cm2/g;}
AddData(T0,e14, 14);
name [15] = "G4_C-552";
G4double e15[78] = { 124.1, 148.8, 169.3, 187.2, 203.3, 231.5, 256.1, 278.2, 298.4, 317.1, 334.5, 351, 388.6, 422.4, 453.2, 481.8, 508.4, 533.5, 557.3, 579.9, 622.2, 661.3, 697.8, 732, 764.3, 794.9, 824, 851.9, 878.5, 904.1, 928.7, 952.4, 975.2, 997.3, 1097, 1184, 1259, 1325, 1384, 1435, 1481, 1521, 1588, 1639, 1678, 1706, 1726, 1738, 1744, 1745, 1743, 1736, 1727, 1716, 1703, 1688, 1603, 1511, 1421, 1338, 1261, 1190, 1126, 1067, 965.5, 883.8, 816.4, 759.6, 711.1, 669.1, 632.3, 599.9, 571, 545, 521.6, 500.3, 480.9, 463.1 };
for(i=0; i<78; i++) {e[15][i]=e15[i]*MeV*cm2/g;}
AddData(T0,e15, 15);
name [16] = "G4_CARBON_DIOXIDE";
G4double e16[78] = { 93.28, 114.2, 131.9, 147.5, 161.6, 186.6, 208.6, 228.5, 246.8, 263.8, 279.8, 295, 329.8, 361.2, 390.2, 417.1, 442.4, 466.4, 489.1, 510.8, 551.8, 589.8, 625.6, 659.4, 691.5, 722.2, 751.6, 779.8, 807.1, 833.4, 858.9, 883.7, 907.7, 931.1, 1040, 1137, 1225, 1306, 1380, 1449, 1513, 1571, 1676, 1763, 1834, 1891, 1933, 1961, 1977, 1982, 1978, 1967, 1952, 1932, 1911, 1888, 1752, 1614, 1490, 1383, 1290, 1209, 1139, 1077, 973.3, 890, 821.5, 764, 714.9, 672.6, 635.5, 602.6, 573.5, 547.3, 523.7, 502.4, 482.9, 465 };
for(i=0; i<78; i++) {e[16][i]=e16[i]*MeV*cm2/g;}
AddData(T0,e16, 16);
name [17] = "G4_CALCIUM_FLUORIDE";
G4double e17[78] = { 72.78, 90.74, 106.1, 119.8, 132.3, 154.7, 174.6, 192.8, 209.7, 225.5, 240.4, 254.5, 287.2, 317, 344.6, 370.4, 394.6, 417.6, 439.5, 460.5, 499.9, 536.5, 570.8, 603.1, 633.6, 662.6, 690.1, 716.4, 741.5, 765.6, 788.6, 810.8, 832.1, 852.6, 944.4, 1022, 1088, 1145, 1194, 1237, 1275, 1308, 1361, 1401, 1431, 1453, 1467, 1476, 1481, 1481, 1479, 1474, 1466, 1458, 1447, 1436, 1352, 1256, 1166, 1086, 1016, 954.4, 900.2, 852.3, 772.1, 708.1, 655.5, 610.7, 573.3, 540.6, 511.9, 486.6, 464, 443.8, 425.4, 408.7, 393.4, 379.4 };
for(i=0; i<78; i++) {e[17][i]=e17[i]*MeV*cm2/g;}
AddData(T0,e17, 17);
name [18] = "G4_CERIC_SULFATE";
G4double e18[78] = { 99.73, 123.7, 144.1, 162.3, 178.8, 208.3, 234.6, 258.5, 280.5, 301.2, 320.6, 339.1, 381.8, 420.6, 456.5, 490, 521.6, 551.5, 580.1, 607.4, 658.9, 707, 752.2, 795, 835.7, 874.6, 911.8, 947.6, 982, 1015, 1047, 1078, 1109, 1138, 1273, 1391, 1497, 1591, 1676, 1753, 1822, 1884, 1990, 2074, 2140, 2190, 2227, 2251, 2266, 2273, 2272, 2266, 2254, 2238, 2220, 2198, 2049, 1886, 1737, 1607, 1495, 1399, 1315, 1242, 1120, 1023, 942.8, 875.6, 818.4, 769.2, 726.1, 688, 654.2, 624, 596.7, 572, 549.5, 528.9 };
for(i=0; i<78; i++) {e[18][i]=e18[i]*MeV*cm2/g;}
AddData(T0,e18, 18);
name [19] = "G4_CELLULOSE_NITRATE";
G4double e19[78] = { 157.6, 186.4, 209.9, 230.3, 248.3, 279.7, 306.8, 330.8, 352.6, 372.6, 391.2, 408.7, 448.1, 483.2, 514.9, 544.1, 571.1, 596.4, 620.3, 642.8, 684.8, 723.2, 758.8, 792, 823.2, 852.7, 880.6, 907.2, 932.6, 956.9, 980.2, 1003, 1024, 1045, 1139, 1220, 1290, 1353, 1408, 1457, 1502, 1541, 1608, 1662, 1704, 1736, 1761, 1778, 1789, 1796, 1798, 1796, 1790, 1782, 1772, 1760, 1674, 1574, 1476, 1385, 1302, 1227, 1160, 1099, 993.8, 909.3, 839.7, 781.1, 731.2, 688.1, 650.2, 616.7, 587, 560.3, 536.2, 514.4, 494.5, 476.2 };
for(i=0; i<78; i++) {e[19][i]=e19[i]*MeV*cm2/g;}
AddData(T0,e19, 19);
name [20] = "G4_BONE_CORTICAL_ICRP";
G4double e20[78] = { 109.1, 132.8, 152.8, 170.4, 186.2, 214.4, 239.3, 261.7, 282.4, 301.6, 319.7, 336.8, 376.1, 411.7, 444.5, 475, 503.6, 530.7, 556.5, 581.1, 627.4, 670.4, 710.8, 748.9, 785, 819.4, 852.4, 883.9, 914.3, 943.5, 971.7, 999, 1025, 1051, 1168, 1270, 1360, 1440, 1511, 1574, 1630, 1680, 1763, 1826, 1872, 1905, 1927, 1939, 1943, 1941, 1933, 1921, 1905, 1887, 1866, 1844, 1720, 1593, 1475, 1369, 1274, 1193, 1123, 1062, 959.2, 877.1, 809.7, 753, 704.9, 663.4, 627, 594.9, 566.3, 540.6, 517.5, 496.5, 477.4, 459.8 };
for(i=0; i<78; i++) {e[20][i]=e20[i]*MeV*cm2/g;}
AddData(T0,e20, 20);
name [21] = "G4_CESIUM_IODIDE";
G4double e21[78] = { 40.6, 48.54, 55.16, 60.95, 66.15, 75.33, 83.38, 90.64, 97.29, 103.5, 109.3, 114.8, 127.3, 138.7, 149.2, 158.9, 168, 176.7, 184.9, 192.8, 207.6, 221.3, 234.2, 246.4, 258, 269.1, 279.7, 289.9, 299.7, 309.2, 318.3, 327.1, 335.7, 344, 382.3, 415.8, 445.6, 472.1, 495.7, 516.7, 535.4, 551.8, 578.9, 599.2, 613.8, 623.8, 629.9, 633, 633.6, 632.3, 629.5, 625.5, 620.6, 615.1, 609.1, 602.8, 567.7, 533, 501.8, 474.4, 450.3, 429, 410.1, 393.3, 364.6, 340.9, 321, 304, 289.2, 275.9, 264.1, 253.6, 243.9, 235, 226.7, 218.9, 211.9, 205.4 };
for(i=0; i<78; i++) {e[21][i]=e21[i]*MeV*cm2/g;}
AddData(T0,e21, 21);
name [22] = "G4_Cu";
G4double e22[78] = { 29.51, 36.49, 42.42, 47.68, 52.45, 60.98, 68.54, 75.4, 81.74, 87.65, 93.23, 98.51, 110.7, 121.8, 132, 141.5, 150.5, 159, 167.2, 174.9, 189.5, 203.2, 216, 228.1, 239.7, 250.7, 261.3, 271.4, 281.2, 290.7, 299.8, 308.7, 317.3, 325.6, 364.2, 398.4, 429.1, 456.8, 482.1, 505.1, 526.2, 545.4, 579, 607, 630.1, 649.1, 664.4, 676.6, 686.2, 693.4, 698.8, 702.4, 704.6, 705.7, 705.7, 704.9, 692.5, 672.6, 650.3, 627.6, 606, 585.6, 566.3, 548, 514, 483.4, 455.8, 431, 408.4, 388, 369.6, 353.7, 339.1, 325.7, 313.4, 302, 291.7, 282.3 };
for(i=0; i<78; i++) {e[22][i]=e22[i]*MeV*cm2/g;}
AddData(T0,e22, 22);
name [23] = "G4_Fe";
G4double e23[78] = { 54.06, 65.42, 74.91, 83.2, 90.66, 103.8, 115.3, 125.6, 135.1, 143.8, 152, 159.8, 177.4, 193.3, 207.8, 221.3, 233.9, 245.7, 256.9, 267.6, 287.7, 306.2, 323.5, 339.8, 355.2, 369.8, 383.8, 397.1, 410, 422.3, 434.2, 445.7, 456.9, 467.6, 517.1, 560.6, 599.4, 634.3, 665.9, 694.6, 720.8, 744.8, 786.6, 821.5, 850.4, 874.1, 893.1, 908.1, 919.6, 928, 933.6, 936.8, 938, 937.3, 935.1, 931.5, 899.9, 856.7, 810.9, 766.9, 727.3, 691.9, 660.2, 631.5, 581.8, 540.1, 504.6, 473.9, 447.2, 423.6, 402.6, 383.5, 366.9, 352, 338.3, 325.7, 314.1, 303.6 };
for(i=0; i<78; i++) {e[23][i]=e23[i]*MeV*cm2/g;}
AddData(T0,e23, 23);
name [24] = "G4_FERROUS_SULFATE";
G4double e24[78] = { 99.58, 123.5, 144, 162.1, 178.6, 208.1, 234.3, 258.2, 280.2, 300.8, 320.3, 338.7, 381.4, 420.2, 456, 489.5, 521, 551, 579.5, 606.8, 658.3, 706.3, 751.5, 794.2, 834.9, 873.7, 910.9, 946.6, 981, 1014, 1046, 1077, 1108, 1137, 1271, 1390, 1495, 1590, 1675, 1751, 1820, 1882, 1988, 2072, 2138, 2188, 2225, 2250, 2265, 2271, 2271, 2264, 2253, 2237, 2218, 2197, 2048, 1886, 1738, 1609, 1497, 1401, 1317, 1244, 1122, 1025, 944.6, 877.4, 820, 770.7, 727.5, 689.3, 655.4, 625.2, 597.8, 573.1, 550.5, 529.9 };
for(i=0; i<78; i++) {e[24][i]=e24[i]*MeV*cm2/g;}
AddData(T0,e24, 24);
name [25] = "G4_Gd";
G4double e25[78] = { 38.11, 45.4, 51.41, 56.61, 61.25, 69.34, 76.36, 82.61, 88.29, 93.53, 98.41, 103, 113.4, 122.7, 131.1, 138.9, 146.1, 152.9, 159.3, 165.4, 176.7, 187.1, 196.8, 205.9, 214.4, 222.5, 230.3, 237.6, 244.7, 251.5, 258, 264.3, 270.3, 276.2, 303.1, 326.6, 347.4, 366.2, 383.1, 398.5, 412.5, 425.4, 447.8, 466.5, 482.1, 494.8, 505.1, 513.2, 519.4, 523.9, 526.9, 528.6, 529.1, 528.6, 527.3, 525.2, 505.6, 481, 456.8, 434.6, 414.6, 396.6, 380.5, 366, 340.9, 319.7, 301.6, 285.8, 272, 259.8, 248.8, 239, 230.1, 222, 214.6, 207.7, 201.4, 195.6 };
for(i=0; i<78; i++) {e[25][i]=e25[i]*MeV*cm2/g;}
AddData(T0,e25, 25);
name [26] = "G4_Ge";
G4double e26[78] = { 47.65, 57.57, 65.83, 73.05, 79.53, 90.94, 100.9, 109.9, 118, 125.6, 132.7, 139.4, 154.6, 168.3, 180.8, 192.3, 203.1, 213.3, 222.9, 232, 249.1, 264.8, 279.5, 293.2, 306.1, 318.4, 330, 341.1, 351.7, 361.8, 371.5, 380.8, 389.8, 398.4, 437.2, 469.9, 497.8, 521.7, 542.3, 560.1, 575.5, 588.9, 610.7, 627.4, 640.1, 649.9, 657.3, 662.8, 666.8, 669.6, 671.4, 672.3, 672.4, 671.9, 670.9, 669.4, 656.9, 639.5, 619.8, 599.4, 578.4, 557.6, 537.5, 518.5, 483.6, 452.9, 425.8, 401.8, 380.5, 361.5, 344.3, 328.6, 315.1, 303.1, 292.1, 282, 272.6, 263.8 };
for(i=0; i<78; i++) {e[26][i]=e26[i]*MeV*cm2/g;}
AddData(T0,e26, 26);
name [27] = "G4_Pyrex_Glass";
G4double e27[78] = { 83.85, 102.1, 117.5, 131, 143.3, 165, 184.1, 201.3, 217.2, 232, 245.9, 259, 289.2, 316.5, 341.5, 364.8, 386.7, 407.4, 427.1, 445.8, 481.1, 513.8, 544.4, 573.2, 600.6, 626.6, 651.5, 675.3, 698.1, 720.1, 741.3, 761.7, 781.5, 800.6, 888, 963.9, 1031, 1090, 1142, 1189, 1231, 1268, 1330, 1378, 1414, 1441, 1460, 1473, 1481, 1485, 1484, 1481, 1475, 1466, 1456, 1445, 1389, 1323, 1249, 1171, 1095, 1029, 971.4, 920.7, 835.9, 768, 711.5, 663.8, 622.8, 587.4, 556.1, 528.4, 503.7, 481.5, 461.4, 443.2, 426.5, 411.2 };
for(i=0; i<78; i++) {e[27][i]=e27[i]*MeV*cm2/g;}
AddData(T0,e27, 27);
name [28] = "G4_H";
G4double e28[78] = { 212, 275.4, 331.7, 383, 430.9, 518.8, 599.2, 674, 744.5, 811.5, 875.6, 937.1, 1082, 1217, 1344, 1465, 1580, 1691, 1798, 1901, 2098, 2285, 2463, 2634, 2798, 2956, 3108, 3256, 3399, 3538, 3674, 3805, 3933, 4058, 4637, 5152, 5610, 6019, 6383, 6705, 6988, 7235, 7632, 7915, 8100, 8203, 8240, 8222, 8161, 8067, 7947, 7808, 7655, 7494, 7327, 7157, 6345, 5647, 5068, 4588, 4188, 3860, 3585, 3351, 2971, 2675, 2438, 2242, 2078, 1939, 1818, 1713, 1620, 1538, 1464, 1398, 1337, 1283 };
AddData(T0,e28, 28);
for(i=0; i<78; i++) {e[28][i]=e28[i]*MeV*cm2/g;}
name [29] = "G4_HELIUM";
name [29] = "G4_He";
G4double e29[78] = { 87.26, 110.8, 131.3, 149.8, 166.8, 197.7, 225.5, 251.1, 275, 297.5, 318.9, 339.4, 387, 430.9, 471.8, 510.4, 547, 581.9, 615.3, 647.5, 708.7, 766.1, 820.5, 872.3, 921.8, 969.3, 1015, 1059, 1102, 1143, 1183, 1221, 1259, 1296, 1465, 1614, 1748, 1867, 1975, 2071, 2156, 2233, 2361, 2460, 2535, 2588, 2624, 2644, 2652, 2650, 2639, 2621, 2598, 2571, 2540, 2507, 2323, 2139, 1976, 1832, 1706, 1593, 1493, 1402, 1249, 1130, 1033, 953.8, 886.8, 829.5, 779.8, 736.4, 697.9, 663.7, 632.9, 605.2, 580, 557 };
for(i=0; i<78; i++) {e[29][i]=e29[i]*MeV*cm2/g;}
AddData(T0,e29, 29);
name [30] = "G4_KAPTON";
G4double e30[78] = { 165.5, 197.6, 224.2, 247.2, 267.8, 304, 335.4, 363.5, 389.1, 412.8, 434.8, 455.6, 502.9, 545.2, 583.8, 619.4, 652.6, 683.8, 713.3, 741.2, 793.5, 841.6, 886.3, 928.2, 967.7, 1005, 1041, 1074, 1107, 1138, 1167, 1196, 1223, 1250, 1369, 1471, 1560, 1636, 1703, 1762, 1812, 1857, 1928, 1981, 2018, 2042, 2056, 2062, 2061, 2054, 2043, 2028, 2010, 1990, 1969, 1946, 1819, 1688, 1565, 1451, 1350, 1264, 1190, 1125, 1017, 929.8, 858.3, 798.2, 747, 702.8, 664, 629.8, 599.3, 571.9, 547.2, 524.8, 504.4, 485.7 };
for(i=0; i<78; i++) {e[30][i]=e30[i]*MeV*cm2/g;}
AddData(T0,e30, 30);
name [31] = "G4_Kr";
G4double e31[78] = { 10.15, 13.69, 16.93, 19.96, 22.84, 28.23, 33.29, 38.08, 42.66, 47.08, 51.35, 55.5, 65.43, 74.84, 83.85, 92.52, 100.9, 109.1, 117, 124.7, 139.7, 154.1, 168, 181.5, 194.6, 207.4, 219.9, 232.1, 244, 255.7, 267.2, 278.4, 289.5, 300.3, 351.9, 399.6, 443.7, 484.4, 522.1, 556.7, 588.4, 617.2, 666.6, 705.7, 735.5, 757, 771.4, 779.9, 783.4, 783, 779.4, 773.6, 765.9, 757, 747.2, 736.9, 683.7, 635.6, 595.2, 561.5, 533, 508.6, 487.3, 468.5, 439.9, 417.9, 398.8, 381.4, 364.9, 349.2, 334.2, 319.8, 306.2, 293.7, 282.8, 272.8, 263.6, 255.2 };
for(i=0; i<78; i++) {e[31][i]=e31[i]*MeV*cm2/g;}
AddData(T0,e31, 31);
name [32] = "G4_LITHIUM_TETRABORATE";
G4double e32[78] = { 132.7, 159.4, 181.6, 200.9, 218.2, 248.6, 275, 298.7, 320.4, 340.4, 359.1, 376.6, 416.8, 452.7, 485.5, 515.8, 544, 570.6, 595.8, 619.7, 664.3, 705.6, 743.9, 779.9, 813.9, 846.1, 876.8, 906.1, 934.2, 961.1, 987, 1012, 1036, 1059, 1166, 1258, 1338, 1410, 1474, 1531, 1583, 1628, 1706, 1767, 1814, 1849, 1874, 1891, 1899, 1902, 1899, 1891, 1875, 1852, 1825, 1795, 1638, 1494, 1375, 1276, 1193, 1121, 1058, 1002, 908.8, 833.2, 770.5, 717.6, 672.4, 633.2, 598.8, 568.3, 541.2, 516.9, 494.8, 474.9, 456.6, 439.9 };
for(i=0; i<78; i++) {e[32][i]=e32[i]*MeV*cm2/g;}
AddData(T0,e32, 32);
name [33] = "G4_LITHIUM_FLUORIDE";
G4double e33[78] = { 118.7, 142.6, 162.5, 179.7, 195.2, 222.4, 246, 267.2, 286.5, 304.3, 321, 336.6, 372.4, 404.4, 433.5, 460.4, 485.5, 509.1, 531.4, 552.6, 592.1, 628.5, 662.4, 694.1, 724.1, 752.4, 779.4, 805.1, 829.6, 853.2, 875.9, 897.6, 918.7, 938.9, 1031, 1110, 1179, 1240, 1294, 1341, 1383, 1421, 1483, 1530, 1566, 1592, 1610, 1621, 1627, 1627, 1624, 1618, 1609, 1598, 1585, 1571, 1483, 1387, 1296, 1214, 1140, 1074, 1015, 962.2, 872, 799.7, 739.5, 688.5, 644.8, 606.9, 573.7, 544.4, 518.3, 494.9, 473.6, 454.3, 436.7, 420.6 };
for(i=0; i<78; i++) {e[33][i]=e33[i]*MeV*cm2/g;}
AddData(T0,e33, 33);
name [34] = "G4_M3_WAX";
G4double e34[78] = { 173.6, 209, 238.5, 264.3, 287.6, 328.7, 364.7, 397.1, 426.9, 454.5, 480.4, 504.9, 561, 611.6, 658, 701.1, 741.6, 779.8, 816, 850.6, 915.4, 975.6, 1032, 1085, 1135, 1182, 1228, 1271, 1313, 1353, 1392, 1429, 1465, 1499, 1657, 1792, 1910, 2012, 2101, 2179, 2247, 2305, 2398, 2463, 2507, 2533, 2544, 2544, 2534, 2517, 2494, 2468, 2437, 2405, 2371, 2335, 2154, 1981, 1825, 1686, 1564, 1460, 1372, 1295, 1167, 1064, 980.4, 910.2, 850.4, 798.9, 753.8, 714.2, 678.9, 647.3, 618.8, 593, 569.4, 547.9 };
for(i=0; i<78; i++) {e[34][i]=e34[i]*MeV*cm2/g;}
AddData(T0,e34, 34);
name [35] = "G4_MS20_TISSUE";
G4double e35[78] = { 163.5, 196.6, 224.1, 248.2, 269.8, 308, 341.4, 371.4, 398.9, 424.4, 448.3, 470.9, 522.5, 569, 611.6, 651.1, 688, 722.9, 756, 787.5, 846.6, 901.2, 952.3, 1000, 1046, 1089, 1130, 1169, 1207, 1243, 1278, 1311, 1344, 1375, 1516, 1638, 1744, 1836, 1916, 1986, 2048, 2101, 2185, 2247, 2288, 2314, 2327, 2330, 2325, 2312, 2295, 2273, 2249, 2222, 2193, 2163, 2002, 1845, 1703, 1575, 1463, 1368, 1286, 1215, 1097, 1001, 923.2, 857.7, 802, 753.9, 711.7, 674.6, 641.6, 611.9, 585.2, 561, 539, 518.8 };
for(i=0; i<78; i++) {e[35][i]=e35[i]*MeV*cm2/g;}
AddData(T0,e35, 35);
name [36] = "G4_METHANE";
G4double e36[78] = { 197.5, 241.8, 279.3, 312.2, 342, 394.9, 441.5, 483.7, 522.4, 558.5, 592.4, 624.4, 698.1, 764.8, 826, 883.1, 936.6, 987.3, 1035, 1081, 1168, 1249, 1324, 1396, 1464, 1529, 1591, 1650, 1708, 1764, 1818, 1870, 1920, 1970, 2198, 2402, 2586, 2754, 2907, 3047, 3175, 3291, 3492, 3652, 3773, 3856, 3905, 3921, 3899, 3849, 3783, 3708, 3627, 3544, 3460, 3378, 2998, 2685, 2432, 2226, 2055, 1911, 1789, 1683, 1508, 1370, 1257, 1163, 1084, 1015, 955.9, 903.7, 857.5, 816.2, 779.1, 745.5, 714.9, 687.1 };
for(i=0; i<78; i++) {e[36][i]=e36[i]*MeV*cm2/g;}
AddData(T0,e36, 36);
name [37] = "G4_Mo";
G4double e37[78] = { 58.22, 68.98, 77.79, 85.4, 92.16, 103.9, 114.1, 123.1, 131.3, 138.8, 145.8, 152.4, 167.3, 180.5, 192.5, 203.5, 213.8, 223.4, 232.4, 241, 256.9, 271.6, 285.1, 297.8, 309.8, 321.1, 331.8, 342.1, 351.9, 361.3, 370.3, 379, 387.4, 395.5, 432.4, 464.5, 492.9, 518.2, 541, 561.6, 580.4, 597.4, 626.9, 651.2, 671.2, 687.3, 700.1, 710, 717.3, 722.3, 725.4, 726.7, 726.5, 725, 722.3, 718.8, 690.9, 655, 617.8, 582.6, 552.1, 525.7, 502.3, 481.5, 445.5, 415.5, 389.9, 367.7, 348.1, 330.6, 314.8, 300.9, 288.6, 277.3, 266.9, 257.6, 249, 241.2 };
for(i=0; i<78; i++) {e[37][i]=e37[i]*MeV*cm2/g;}
AddData(T0,e37, 37);
name [38] = "G4_MUSCLE_WITH_SUCROSE";
G4double e38[78] = { 111.7, 137.5, 159.4, 178.8, 196.5, 227.9, 255.7, 281, 304.4, 326.2, 346.7, 366.2, 411.2, 452, 489.7, 525, 558.1, 589.5, 619.5, 648.1, 702.2, 752.5, 799.9, 844.6, 887.2, 927.9, 966.8, 1004, 1040, 1075, 1108, 1141, 1172, 1203, 1343, 1467, 1576, 1674, 1762, 1841, 1912, 1975, 2081, 2165, 2230, 2277, 2310, 2331, 2342, 2344, 2339, 2329, 2313, 2293, 2270, 2244, 2074, 1896, 1739, 1607, 1494, 1398, 1314, 1241, 1120, 1022, 942.4, 875.3, 818.1, 768.9, 725.8, 687.7, 653.9, 623.7, 596.4, 571.7, 549.2, 528.6 };
for(i=0; i<78; i++) {e[38][i]=e38[i]*MeV*cm2/g;}
AddData(T0,e38, 38);
name [39] = "G4_MUSCLE_WITHOUT_SUCROSE";
G4double e39[78] = { 108.2, 133.5, 155, 174.1, 191.4, 222.4, 249.8, 274.8, 297.8, 319.3, 339.6, 358.9, 403.3, 443.7, 481, 515.9, 548.7, 579.8, 609.5, 637.9, 691.4, 741.4, 788.3, 832.7, 875, 915.3, 953.9, 991.1, 1027, 1061, 1095, 1127, 1158, 1189, 1328, 1451, 1560, 1658, 1745, 1824, 1895, 1958, 2065, 2150, 2215, 2263, 2298, 2320, 2332, 2335, 2331, 2321, 2306, 2287, 2265, 2240, 2075, 1901, 1746, 1613, 1501, 1404, 1320, 1247, 1125, 1027, 946.2, 878.8, 821.4, 772, 728.6, 690.4, 656.4, 626.1, 598.7, 573.9, 551.3, 530.6 };
for(i=0; i<78; i++) {e[39][i]=e39[i]*MeV*cm2/g;}
AddData(T0,e39, 39);
name [40] = "G4_MUSCLE_SKELETAL_ICRP";
G4double e40[78] = { 104.5, 129.2, 150.2, 168.8, 185.8, 216.1, 242.9, 267.4, 290, 311.1, 331, 349.8, 393.5, 433.1, 469.7, 503.9, 536.2, 566.7, 595.9, 623.7, 676.3, 725.4, 771.5, 815.1, 856.6, 896.2, 934.1, 970.6, 1006, 1040, 1072, 1104, 1135, 1165, 1302, 1422, 1530, 1626, 1712, 1790, 1860, 1922, 2029, 2113, 2178, 2228, 2263, 2286, 2299, 2304, 2302, 2293, 2280, 2262, 2242, 2218, 2059, 1888, 1735, 1604, 1492, 1396, 1312, 1240, 1118, 1021, 941.1, 874.1, 817, 767.9, 724.9, 686.8, 653.1, 622.9, 595.7, 571, 548.6, 528 };
for(i=0; i<78; i++) {e[40][i]=e40[i]*MeV*cm2/g;}
AddData(T0,e40, 40);
name [41] = "G4_MUSCLE_STRIATED_ICRU";
G4double e41[78] = { 104.7, 129.4, 150.5, 169.2, 186.2, 216.5, 243.4, 267.9, 290.5, 311.7, 331.6, 350.5, 394.2, 433.9, 470.6, 504.9, 537.2, 567.8, 596.9, 624.9, 677.5, 726.7, 772.8, 816.5, 858.1, 897.8, 935.8, 972.3, 1007, 1041, 1074, 1106, 1137, 1167, 1304, 1425, 1532, 1629, 1715, 1793, 1863, 1925, 2032, 2116, 2181, 2230, 2265, 2289, 2302, 2306, 2304, 2295, 2282, 2264, 2244, 2220, 2063, 1894, 1742, 1611, 1498, 1401, 1318, 1244, 1123, 1025, 944.5, 877.2, 819.9, 770.6, 727.3, 689.2, 655.3, 625, 597.7, 572.9, 550.4, 529.7 };
for(i=0; i<78; i++) {e[41][i]=e41[i]*MeV*cm2/g;}
AddData(T0,e41, 41);
name [42] = "G4_N";
G4double e42[78] = { 82.8, 103.7, 121.6, 137.7, 152.3, 178.7, 202.3, 223.8, 243.8, 262.5, 280.2, 297.1, 336.2, 372, 405.1, 436.2, 465.5, 493.4, 520.1, 545.7, 594.1, 639.3, 682, 722.5, 761, 797.9, 833.4, 867.4, 900.3, 932, 962.8, 992.5, 1021, 1049, 1179, 1293, 1395, 1486, 1567, 1640, 1706, 1765, 1864, 1940, 1999, 2041, 2069, 2086, 2093, 2091, 2083, 2069, 2051, 2030, 2005, 1978, 1819, 1660, 1522, 1406, 1308, 1224, 1151, 1088, 982.9, 898.5, 829.5, 771.1, 721.3, 678.5, 641, 608, 578.6, 552.3, 528.5, 506.9, 487.2, 469.1 };
for(i=0; i<78; i++) {e[42][i]=e42[i]*MeV*cm2/g;}
AddData(T0,e42, 42);
name [43] = "G4_SODIUM_IODIDE";
G4double e43[78] = { 35.86, 44.19, 51.24, 57.48, 63.13, 73.21, 82.12, 90.2, 97.64, 104.6, 111.1, 117.3, 131.6, 144.5, 156.4, 167.6, 178, 187.9, 197.3, 206.3, 223.3, 239.1, 253.9, 268, 281.3, 294, 306.2, 317.9, 329.2, 340.1, 350.6, 360.8, 370.6, 380.2, 424.5, 463.5, 498.4, 529.9, 558.2, 583.8, 607, 627.8, 663.4, 691.6, 713.4, 729.6, 740.9, 748.1, 751.7, 752.4, 750.7, 747, 741.7, 735.1, 727.6, 719.5, 664.4, 611.2, 569.4, 538.3, 514, 491.6, 472.1, 454, 422.9, 393.7, 370.2, 349.6, 331.4, 315.3, 301.2, 288.5, 276.8, 266.1, 256.3, 247.1, 238.9, 231.5 };
for(i=0; i<78; i++) {e[43][i]=e43[i]*MeV*cm2/g;}
AddData(T0,e43, 43);
name [44] = "G4_Ne";
G4double e44[78] = { 68.73, 83.7, 96.26, 107.3, 117.2, 134.8, 150.3, 164.2, 177, 188.8, 199.9, 210.4, 234.5, 256.2, 276.1, 294.6, 311.9, 328.3, 343.8, 358.6, 386.3, 412, 436.1, 458.8, 480.3, 500.8, 520.3, 539.1, 557.1, 574.5, 591.2, 607.5, 623.2, 638.4, 708.4, 770.3, 825.6, 875.7, 921.2, 962.8, 1001, 1036, 1098, 1150, 1194, 1230, 1260, 1285, 1304, 1319, 1330, 1338, 1343, 1344, 1344, 1341, 1296, 1229, 1160, 1095, 1035, 981.4, 932.6, 888.5, 812.1, 748.3, 695.6, 650.4, 611.3, 577, 546.8, 520, 496, 474.4, 454.8, 437, 420.7, 405.7 };
AddData(T0,e44, 44);
for(i=0; i<78; i++) {e[44][i]=e44[i]*MeV*cm2/g;}
name [45] = "G4_NYLON-6/6";
name [45] = "G4_NYLON-6-6";
G4double e45[78] = { 167.4, 201.6, 230.3, 255.4, 278, 317.9, 352.9, 384.4, 413.4, 440.3, 465.5, 489.3, 544, 593.3, 638.6, 680.6, 720.1, 757.3, 792.7, 826.4, 889.7, 948.5, 1003, 1055, 1104, 1151, 1195, 1238, 1279, 1318, 1356, 1392, 1427, 1461, 1617, 1750, 1867, 1969, 2059, 2138, 2207, 2267, 2363, 2433, 2482, 2512, 2527, 2531, 2525, 2511, 2491, 2467, 2439, 2408, 2375, 2340, 2160, 1987, 1830, 1690, 1567, 1463, 1374, 1297, 1169, 1066, 981.3, 910.8, 850.9, 799.3, 754.1, 714.4, 679, 647.4, 618.9, 593, 569.5, 547.9 };
for(i=0; i<78; i++) {e[45][i]=e45[i]*MeV*cm2/g;}
AddData(T0,e45, 45);
name [46] = "G4_O";
G4double e46[78] = { 105.8, 117.3, 257.6, 1.139e-05, 5.976e-06, 0.005, 248.1, 71.83, 352, 3.186e-05, 2.012e-05, 0.015, 412.7, 40.96, 503.1, 6.782e-05, 5.098e-05, 0.035, 610.6, 24.07, 700.7, 0.0001156, 9.613e-05, 0.07, 820, 15.89, 884.2, 0.0001583, 0.0001354, 0.125, 1124, 8.719, 1280, 0.0002775, 0.0002641, 0.3, 1573, 4.478, 1697, 0.0004528, 0.000448, 0.65, 1818, 2.655, 1822, 0.0006468, 0.0006403, 1, 1667, 1.474, 1431, 0.00138, 0.001539, 2.75, 1038, 0.7076, 860.9, 0.003906, 0.004519, 6, 616.1, 0.3845, 556.8, 0.009419, 0.01034, 9.5, 452, 0.2295, 334.7, 0.03447, 0.04325, 27.5, 196.3, 0.09039, 156.5, 0.1784, 0.2149, 60 };
for(i=0; i<78; i++) {e[46][i]=e46[i]*MeV*cm2/g;}
G4double e46[78] = { 1.058E+02, 1.283E+02, 1.471E+02, 1.636E+02, 1.784E+02, 2.046E+02, 2.275E+02, 2.481E+02, 2.670E+02, 2.845E+02, 3.009E+02, 3.163E+02, 3.518E+02, 3.836E+02, 4.127E+02, 4.398E+02, 4.650E+02, 4.889E+02, 5.115E+02, 5.330E+02, 5.733E+02, 6.106E+02, 6.455E+02, 6.783E+02, 7.094E+02, 7.389E+02, 7.671E+02, 7.941E+02, 8.200E+02, 8.450E+02, 8.690E+02, 8.923E+02, 9.147E+02, 9.365E+02, 1.036E+03, 1.124E+03, 1.202E+03, 1.272E+03, 1.335E+03, 1.392E+03, 1.444E+03, 1.491E+03, 1.573E+03, 1.639E+03, 1.693E+03, 1.735E+03, 1.768E+03, 1.792E+03, 1.808E+03, 1.818E+03, 1.821E+03, 1.820E+03, 1.814E+03, 1.805E+03, 1.792E+03, 1.777E+03, 1.667E+03, 1.544E+03, 1.430E+03, 1.329E+03, 1.241E+03, 1.164E+03, 1.097E+03, 1.038E+03, 9.395E+02, 8.602E+02, 7.947E+02, 7.395E+02, 6.924E+02, 6.519E+02, 6.161E+02, 5.845E+02, 5.564E+02, 5.313E+02, 5.086E+02, 4.880E+02, 4.692E+02, 4.520E+02};
AddData(T0,e46, 46);
name [47] = "G4_PARAFFIN";
G4double e47[78] = { 193.8, 233, 265.8, 294.4, 320.3, 365.9, 405.9, 441.9, 475, 505.7, 534.5, 561.7, 624.2, 680.6, 732.3, 780.4, 825.5, 868.2, 908.6, 947.2, 1020, 1087, 1150, 1209, 1265, 1319, 1370, 1419, 1465, 1510, 1554, 1595, 1636, 1675, 1852, 2004, 2137, 2253, 2354, 2442, 2518, 2584, 2688, 2762, 2810, 2837, 2848, 2845, 2831, 2810, 2782, 2749, 2713, 2674, 2633, 2592, 2381, 2184, 2007, 1851, 1714, 1598, 1500, 1414, 1272, 1158, 1066, 988.4, 922.7, 866.1, 816.7, 773.2, 734.5, 699.9, 668.8, 640.6, 614.9, 591.4 };
for(i=0; i<78; i++) {e[47][i]=e47[i]*MeV*cm2/g;}
AddData(T0,e47, 47);
name [48] = "G4_Pb";
G4double e48[78] = { 17.96, 22.18, 25.76, 28.92, 31.8, 36.93, 41.47, 45.6, 49.4, 52.95, 56.3, 59.46, 66.77, 73.41, 79.52, 85.23, 90.6, 95.69, 100.5, 105.2, 113.9, 122, 129.7, 136.9, 143.8, 150.3, 156.6, 162.7, 168.5, 174.1, 179.5, 184.8, 189.9, 194.9, 217.7, 237.9, 256, 272.3, 287, 300.4, 312.6, 323.6, 342.6, 358.2, 370.7, 380.6, 388.3, 394.2, 398.4, 401.3, 403.1, 404, 404.1, 403.5, 402.4, 401, 392.5, 380.4, 365.3, 348.6, 332, 317.6, 304.9, 293.7, 274.4, 258.3, 244.7, 232.9, 222.5, 213.2, 205, 197.5, 190.7, 184.4, 178.7, 173.4, 168.4, 163.9 };
AddData(T0,e48, 48);
for(i=0; i<78; i++) {e[48][i]=e48[i]*MeV*cm2/g;}
name [49] = "G4_PHOTOGRAPHIC_EMULSION";
name [49] = "G4_PHOTO_EMULSION";
G4double e49[78] = { 46.69, 57.18, 66.06, 73.91, 81.04, 93.75, 105, 115.2, 124.7, 133.5, 141.8, 149.6, 167.8, 184.3, 199.6, 213.8, 227.3, 240, 252.1, 263.8, 285.7, 306.2, 325.4, 343.6, 361, 377.5, 393.4, 408.7, 423.3, 437.5, 451.2, 464.5, 477.3, 489.8, 547, 597.3, 641.7, 681.2, 716.3, 747.6, 775.5, 800.2, 841.5, 873.5, 897.8, 915.8, 928.6, 937.1, 940, 938.4, 933.8, 927, 918.6, 909.2, 899.1, 888.5, 833.7, 781.8, 735.1, 693.7, 657.1, 624.6, 595.5, 569.4, 524.5, 487.2, 455.6, 428.5, 404.9, 383.9, 365.2, 348.6, 333.8, 320.5, 308.3, 297.2, 287, 277.8 };
for(i=0; i<78; i++) {e[49][i]=e49[i]*MeV*cm2/g;}
AddData(T0,e49, 49);
name [50] = "G4_PLASTIC_SC_VINYLTOLUENE";
G4double e50[78] = { 192.4, 229.8, 260.8, 287.8, 312, 354.4, 391.4, 424.6, 454.8, 482.8, 509, 533.7, 590, 640.5, 686.6, 729.3, 769.2, 806.7, 842.2, 876, 939.2, 997.5, 1052, 1103, 1151, 1197, 1240, 1281, 1321, 1359, 1395, 1430, 1464, 1497, 1644, 1769, 1878, 1971, 2053, 2123, 2184, 2236, 2319, 2377, 2414, 2436, 2445, 2443, 2433, 2417, 2396, 2371, 2343, 2314, 2283, 2251, 2091, 1936, 1791, 1657, 1537, 1435, 1349, 1273, 1148, 1047, 964.8, 895.9, 837.3, 786.7, 742.4, 703.5, 668.8, 637.7, 609.7, 584.3, 561.2, 540 };
for(i=0; i<78; i++) {e[50][i]=e50[i]*MeV*cm2/g;}
AddData(T0,e50, 50);
name [51] = "G4_POLYCARBONATE";
G4double e51[78] = { 146.3, 178.1, 204.7, 228.1, 249.2, 286.4, 319.1, 348.5, 375.5, 400.6, 424.1, 446.2, 497, 542.8, 584.7, 623.5, 659.9, 694.2, 726.6, 757.6, 815.5, 869.1, 919, 965.9, 1010, 1052, 1092, 1130, 1167, 1202, 1235, 1268, 1299, 1329, 1465, 1581, 1681, 1768, 1843, 1908, 1965, 2013, 2090, 2144, 2180, 2201, 2210, 2209, 2202, 2188, 2170, 2149, 2125, 2099, 2072, 2044, 1912, 1785, 1661, 1543, 1433, 1340, 1261, 1191, 1076, 982.4, 906, 842, 787.5, 740.5, 699.2, 662.9, 630.5, 601.5, 575.3, 551.6, 529.9, 510.1 };
for(i=0; i<78; i++) {e[51][i]=e51[i]*MeV*cm2/g;}
AddData(T0,e51, 51);
name [52] = "G4_POLYETHYLENE";
G4double e52[78] = { 168.2, 205.8, 237.5, 265.4, 290.7, 335.4, 374.8, 410.5, 443.2, 473.7, 502.3, 529.3, 591.4, 647.6, 699.1, 747.1, 792.1, 834.6, 874.9, 913.5, 985.9, 1053, 1116, 1175, 1232, 1285, 1336, 1385, 1432, 1478, 1521, 1564, 1604, 1644, 1825, 1983, 2122, 2246, 2355, 2453, 2539, 2615, 2740, 2833, 2899, 2940, 2962, 2967, 2958, 2938, 2908, 2871, 2829, 2782, 2732, 2681, 2418, 2183, 1987, 1826, 1691, 1577, 1480, 1396, 1257, 1145, 1053, 977.1, 912.4, 856.5, 807.8, 764.9, 726.7, 692.6, 661.8, 633.9, 608.6, 585.4 };
for(i=0; i<78; i++) {e[52][i]=e52[i]*MeV*cm2/g;}
AddData(T0,e52, 52);
name [53] = "G4_MYLAR";
G4double e53[78] = { 163.2, 195.3, 221.8, 244.9, 265.6, 301.9, 333.5, 361.8, 387.6, 411.5, 433.8, 454.8, 502.7, 545.7, 584.8, 621, 654.8, 686.6, 716.7, 745.3, 798.7, 847.9, 893.8, 936.8, 977.4, 1016, 1052, 1087, 1121, 1153, 1183, 1213, 1241, 1269, 1393, 1500, 1593, 1673, 1744, 1806, 1860, 1908, 1985, 2042, 2083, 2110, 2126, 2133, 2133, 2126, 2115, 2100, 2082, 2061, 2038, 2014, 1874, 1731, 1599, 1482, 1379, 1290, 1215, 1148, 1038, 948.5, 875.3, 813.8, 761.5, 716.3, 676.6, 641.6, 610.5, 582.5, 557.3, 534.4, 513.6, 494.5 };
for(i=0; i<78; i++) {e[53][i]=e53[i]*MeV*cm2/g;}
AddData(T0,e53, 53);
name [54] = "G4_PLEXIGLASS";
G4double e54[78] = { 118.7, 146.6, 170.3, 191.4, 210.4, 244.5, 274.7, 302.1, 327.3, 350.9, 373.1, 394.2, 442.7, 486.8, 527.4, 565.2, 600.9, 634.6, 666.7, 697.4, 755.1, 808.9, 859.3, 906.9, 952, 995, 1036, 1075, 1113, 1150, 1185, 1219, 1252, 1283, 1428, 1554, 1665, 1762, 1848, 1923, 1990, 2049, 2144, 2216, 2266, 2300, 2320, 2328, 2327, 2318, 2302, 2282, 2259, 2232, 2203, 2173, 2008, 1847, 1702, 1574, 1464, 1369, 1288, 1217, 1099, 1004, 925.6, 860.1, 804.4, 756.3, 714.1, 676.9, 643.8, 614.2, 587.4, 563.2, 541.1, 520.8 };
for(i=0; i<78; i++) {e[54][i]=e54[i]*MeV*cm2/g;}
AddData(T0,e54, 54);
name [55] = "G4_POLYPROPYLENE";
G4double e55[78] = { 193.7, 232.8, 265.4, 293.9, 319.6, 365, 404.8, 440.6, 473.4, 503.9, 532.5, 559.6, 621.6, 677.5, 728.8, 776.5, 821.2, 863.4, 903.5, 941.8, 1014, 1080, 1142, 1201, 1257, 1309, 1360, 1408, 1454, 1499, 1541, 1583, 1622, 1661, 1836, 1986, 2117, 2231, 2331, 2417, 2492, 2557, 2660, 2732, 2779, 2806, 2817, 2814, 2801, 2780, 2752, 2720, 2684, 2646, 2606, 2565, 2359, 2165, 1991, 1836, 1700, 1585, 1488, 1403, 1263, 1150, 1058, 981.3, 916.1, 860, 810.9, 767.8, 729.5, 695.1, 664.3, 636.2, 610.8, 587.5 };
for(i=0; i<78; i++) {e[55][i]=e55[i]*MeV*cm2/g;}
AddData(T0,e55, 55);
name [56] = "G4_POLYSTYRENE";
G4double e56[78] = { 153, 187.5, 216.6, 242.2, 265.3, 306.5, 342.7, 375.5, 405.6, 433.6, 460, 484.9, 542.1, 593.8, 641.3, 685.4, 726.9, 766, 803.1, 838.5, 905, 966.6, 1024, 1078, 1130, 1178, 1225, 1269, 1312, 1352, 1392, 1429, 1466, 1501, 1661, 1797, 1915, 2017, 2106, 2183, 2249, 2305, 2394, 2454, 2492, 2511, 2516, 2509, 2494, 2471, 2443, 2410, 2376, 2339, 2301, 2262, 2070, 1895, 1742, 1609, 1493, 1395, 1312, 1239, 1119, 1021, 941.4, 874.6, 817.8, 768.7, 725.7, 687.9, 654.1, 623.9, 596.6, 571.9, 549.4, 528.7 };
for(i=0; i<78; i++) {e[56][i]=e56[i]*MeV*cm2/g;}
AddData(T0,e56, 56);
name [57] = "G4_TEFLON";
G4double e57[78] = { 82.7, 99.97, 114.4, 127.1, 138.4, 158.5, 176.2, 192, 206.5, 220, 232.6, 244.5, 271.9, 296.4, 319, 339.8, 359.4, 377.8, 395.3, 412, 443.3, 472.2, 499.3, 524.7, 548.8, 571.7, 593.6, 614.5, 634.6, 653.9, 672.5, 690.4, 707.8, 724.6, 801.6, 868.9, 928.6, 981.9, 1030, 1073, 1112, 1148, 1209, 1260, 1301, 1334, 1361, 1382, 1397, 1408, 1415, 1419, 1420, 1418, 1414, 1409, 1399, 1373, 1319, 1246, 1165, 1095, 1034, 979.4, 887.4, 813.7, 752.5, 700.8, 656.5, 618.1, 584.5, 554.8, 528.3, 504.6, 483, 463.5, 445.6, 429.3 };
for(i=0; i<78; i++) {e[57][i]=e57[i]*MeV*cm2/g;}
AddData(T0,e57, 57);
name [58] = "G4_POLYVINYL_CHLORIDE";
G4double e58[78] = { 94.27, 114.4, 131.3, 146.3, 159.9, 184, 205.5, 224.9, 242.9, 259.7, 275.5, 290.5, 325.3, 357, 386.3, 413.7, 439.5, 464.1, 487.6, 510.1, 552.6, 592.4, 629.9, 665.5, 699.4, 731.8, 762.9, 792.9, 821.8, 849.7, 876.7, 902.9, 928.2, 952.9, 1067, 1167, 1255, 1335, 1405, 1468, 1525, 1574, 1657, 1719, 1764, 1795, 1814, 1823, 1824, 1818, 1807, 1792, 1774, 1753, 1731, 1708, 1591, 1482, 1385, 1299, 1222, 1153, 1092, 1037, 941.7, 862.4, 795.8, 739.8, 692.3, 651.2, 615.4, 583.7, 555.6, 530.3, 507.5, 486.9, 468, 450.8 };
for(i=0; i<78; i++) {e[58][i]=e58[i]*MeV*cm2/g;}
AddData(T0,e58, 58);
name [59] = "G4_PROPANE";
G4double e59[78] = { 194.5, 234.7, 268.4, 298, 324.7, 372, 413.6, 451.2, 485.8, 518, 548.2, 576.8, 642.6, 702.2, 756.9, 808, 855.9, 901.2, 944.4, 985.6, 1063, 1135, 1203, 1267, 1327, 1385, 1440, 1492, 1543, 1592, 1639, 1684, 1728, 1770, 1964, 2131, 2277, 2404, 2516, 2613, 2698, 2771, 2887, 2969, 3022, 3053, 3065, 3061, 3046, 3021, 2990, 2953, 2912, 2868, 2822, 2775, 2564, 2372, 2191, 2022, 1868, 1739, 1629, 1534, 1377, 1252, 1150, 1065, 993, 931.1, 877.2, 829.9, 787.8, 750.2, 716.4, 685.8, 658, 632.5 };
for(i=0; i<78; i++) {e[59][i]=e59[i]*MeV*cm2/g;}
AddData(T0,e59, 59);
name [60] = "G4_Pt";
G4double e60[78] = { 14.45, 17.87, 20.78, 23.37, 25.71, 29.9, 33.61, 36.99, 40.1, 43.01, 45.75, 48.35, 54.36, 59.81, 64.84, 69.54, 73.97, 78.17, 82.17, 86, 93.22, 99.96, 106.3, 112.3, 118, 123.5, 128.7, 133.8, 138.7, 143.4, 147.9, 152.4, 156.7, 160.8, 180.3, 197.6, 213.3, 227.7, 240.9, 253, 264.3, 274.7, 293.2, 309, 322.4, 333.7, 343.1, 350.7, 356.8, 361.6, 365.1, 367.6, 369.1, 369.8, 369.9, 369.3, 364.7, 357, 347.3, 336.6, 325.5, 314.4, 303.6, 293.2, 274.3, 258.5, 245.1, 233.4, 223.1, 214, 205.8, 198.4, 191.6, 185.4, 179.7, 174.4, 169.5, 164.9 };
for(i=0; i<78; i++) {e[60][i]=e60[i]*MeV*cm2/g;}
AddData(T0,e60, 60);
name [61] = "G4_Si";
G4double e61[78] = { 47.32, 61.63, 74.34, 85.98, 96.82, 116.8, 135.1, 152.1, 168.2, 183.4, 198.1, 212.1, 245.3, 276.1, 305.2, 332.7, 359.1, 384.4, 408.7, 432.2, 477, 519.3, 559.4, 597.5, 633.9, 668.6, 701.9, 733.7, 764.3, 793.5, 821.6, 848.5, 874.4, 899.1, 1008, 1097, 1168, 1225, 1270, 1307, 1336, 1359, 1390, 1408, 1416, 1417, 1413, 1405, 1395, 1383, 1370, 1356, 1341, 1326, 1310, 1295, 1218, 1146, 1081, 1023, 970.6, 923.9, 881.4, 842.4, 773.1, 713.1, 661.2, 617.4, 579.7, 547, 518.2, 492.7, 470, 449.5, 430.9, 414, 398.6, 384.4 };
for(i=0; i<78; i++) {e[61][i]=e61[i]*MeV*cm2/g;}
AddData(T0,e61, 61);
name [62] = "G4_SILICON_DIOXIDE";
G4double e62[78] = { 68.9, 85.1, 98.85, 111, 122.1, 141.8, 159.3, 175.1, 189.8, 203.4, 216.3, 228.5, 256.6, 282.1, 305.7, 327.6, 348.3, 367.9, 386.5, 404.4, 437.9, 469.2, 498.5, 526.3, 552.6, 577.7, 601.7, 624.7, 646.9, 668.2, 688.8, 708.7, 728, 746.7, 832.2, 906.8, 972.6, 1031, 1083, 1129, 1170, 1207, 1268, 1315, 1351, 1377, 1396, 1409, 1417, 1421, 1421, 1419, 1414, 1406, 1397, 1387, 1349, 1301, 1237, 1163, 1087, 1021, 964, 913.7, 829.4, 762.2, 706.3, 659, 618.4, 583.3, 552.3, 524.9, 500.4, 478.4, 458.5, 440.4, 423.9, 408.7 };
for(i=0; i<78; i++) {e[62][i]=e62[i]*MeV*cm2/g;}
AddData(T0,e62, 62);
name [63] = "G4_STILBENE";
G4double e63[78] = { 192, 228.9, 259.4, 286, 309.7, 351.2, 387.4, 419.7, 449.2, 476.4, 501.9, 525.8, 580.4, 629.2, 673.8, 714.9, 753.3, 789.4, 823.5, 856, 916.5, 972.3, 1024, 1073, 1119, 1162, 1203, 1243, 1280, 1316, 1351, 1384, 1416, 1446, 1585, 1703, 1805, 1892, 1968, 2034, 2090, 2139, 2215, 2268, 2303, 2323, 2331, 2330, 2321, 2307, 2287, 2265, 2240, 2212, 2184, 2155, 1995, 1841, 1703, 1582, 1477, 1385, 1305, 1233, 1113, 1015, 936, 869.6, 813, 764.1, 721.3, 683.7, 650.1, 620, 592.9, 568.3, 545.9, 525.4 };
for(i=0; i<78; i++) {e[63][i]=e63[i]*MeV*cm2/g;}
AddData(T0,e63, 63);
name [64] = "G4_Ti";
G4double e64[78] = { 59.24, 72.81, 84.28, 94.41, 103.6, 119.9, 134.3, 147.4, 159.4, 170.6, 181.1, 191.1, 214, 234.7, 253.8, 271.6, 288.3, 304.1, 319.1, 333.5, 360.5, 385.5, 409, 431.2, 452.2, 472.2, 491.4, 509.7, 527.3, 544.3, 560.6, 576.4, 591.7, 606.5, 674.2, 733.1, 785, 831, 871.7, 907.9, 940, 968.3, 1015, 1051, 1077, 1095, 1106, 1112, 1114, 1112, 1107, 1100, 1092, 1082, 1071, 1059, 995.6, 933.7, 877.6, 827.9, 785.2, 747.8, 714.5, 684.4, 631.9, 587.1, 548.3, 514.3, 484.2, 457.3, 433.4, 412.5, 393.7, 376.7, 361.5, 347.6, 334.9, 323.2 };
for(i=0; i<78; i++) {e[64][i]=e64[i]*MeV*cm2/g;}
AddData(T0,e64, 64);
name [65] = "G4_Sn";
G4double e65[78] = { 27.39, 33.96, 39.55, 44.52, 49.04, 57.11, 64.28, 70.8, 76.82, 82.45, 87.76, 92.79, 104.4, 115, 124.8, 133.9, 142.5, 150.6, 158.4, 165.8, 179.8, 192.9, 205.2, 216.8, 227.8, 238.4, 248.4, 258.1, 267.4, 276.4, 285.1, 293.5, 301.6, 309.5, 345.7, 377.3, 405.3, 430.1, 452.1, 471.8, 489.3, 504.8, 530.7, 550.9, 566.3, 577.9, 586.3, 592.2, 596.1, 598.4, 599.3, 599.1, 598.1, 596.4, 594.2, 591.5, 573.8, 552.8, 531.2, 510.1, 488.3, 467, 447, 428.6, 396.3, 369.4, 346.8, 327.7, 311.4, 297.1, 283.9, 271.9, 260.8, 250.6, 241.7, 233.6, 226, 218.9 };
for(i=0; i<78; i++) {e[65][i]=e65[i]*MeV*cm2/g;}
AddData(T0,e65, 65);
name [66] = "G4_TISSUE_METHANE";
G4double e66[78] = { 135.1, 165.6, 191.3, 213.9, 234.4, 270.7, 302.8, 331.8, 358.4, 383.2, 406.5, 428.6, 479.3, 525.2, 567.4, 606.7, 643.6, 678.5, 711.7, 743.4, 803.1, 858.6, 910.7, 960.1, 1007, 1052, 1095, 1136, 1176, 1214, 1251, 1287, 1322, 1356, 1514, 1655, 1783, 1899, 2006, 2104, 2193, 2275, 2418, 2535, 2626, 2693, 2737, 2760, 2764, 2752, 2728, 2695, 2655, 2612, 2566, 2519, 2278, 2060, 1878, 1727, 1602, 1494, 1403, 1323, 1191, 1085, 998.2, 926, 864.6, 811.7, 765.6, 724.9, 688.8, 656.5, 627.4, 601.1, 577.1, 555.2 };
for(i=0; i<78; i++) {e[66][i]=e66[i]*MeV*cm2/g;}
AddData(T0,e66, 66);
name [67] = "G4_TISSUE_PROPANE";
G4double e67[78] = { 149.7, 181.5, 208.2, 231.7, 252.8, 290.4, 323.5, 353.4, 380.9, 406.5, 430.5, 453.3, 505.7, 553, 596.6, 637.2, 675.4, 711.5, 745.8, 778.6, 840.4, 897.8, 951.6, 1003, 1051, 1097, 1141, 1183, 1224, 1263, 1301, 1337, 1372, 1407, 1563, 1701, 1822, 1929, 2024, 2109, 2185, 2252, 2362, 2446, 2507, 2549, 2573, 2583, 2581, 2569, 2550, 2524, 2494, 2461, 2426, 2389, 2211, 2043, 1887, 1744, 1616, 1507, 1415, 1334, 1201, 1094, 1006, 933.3, 871.4, 818.1, 771.5, 730.5, 694.1, 661.5, 632.1, 605.6, 581.4, 559.3 };
for(i=0; i<78; i++) {e[67][i]=e67[i]*MeV*cm2/g;}
AddData(T0,e67, 67);
name [68] = "G4_TOLUENE";
G4double e68[78] = { 192.5, 230, 261, 288.1, 312.3, 354.9, 392, 425.3, 455.6, 483.7, 510, 534.8, 591.3, 642.1, 688.4, 731.3, 771.4, 809.1, 844.8, 878.8, 942.4, 1001, 1056, 1107, 1155, 1201, 1245, 1287, 1327, 1365, 1401, 1437, 1471, 1504, 1652, 1779, 1888, 1983, 2065, 2136, 2197, 2250, 2333, 2392, 2430, 2452, 2461, 2459, 2449, 2433, 2411, 2386, 2358, 2328, 2296, 2264, 2109, 1960, 1817, 1683, 1560, 1456, 1368, 1291, 1163, 1060, 976.6, 906.6, 847.1, 795.7, 750.8, 711.3, 676.1, 644.6, 616.2, 590.5, 567, 545.6 };
for(i=0; i<78; i++) {e[68][i]=e68[i]*MeV*cm2/g;}
AddData(T0,e68, 68);
name [69] = "G4_U";
G4double e69[78] = { 13.2, 16.72, 19.77, 22.52, 25.04, 29.61, 33.73, 37.51, 41.03, 44.35, 47.5, 50.51, 57.52, 63.96, 69.97, 75.62, 80.99, 86.11, 91.01, 95.73, 104.7, 113.1, 121.1, 128.7, 136, 143, 149.8, 156.3, 162.6, 168.8, 174.7, 180.5, 186.2, 191.7, 217.4, 240.5, 261.5, 280.8, 298.5, 314.8, 329.8, 343.7, 368, 388.4, 405.3, 419, 429.8, 438.1, 444.2, 448.4, 450.8, 451.8, 451.6, 450.3, 448.2, 445.4, 420, 390.1, 362.9, 339.6, 319.8, 303.1, 288.9, 276.7, 256.9, 241.7, 229.4, 218.6, 209.1, 200.6, 193, 186.1, 179.8, 174, 168.6, 163.7, 159.1, 154.8 };
for(i=0; i<78; i++) {e[69][i]=e69[i]*MeV*cm2/g;}
AddData(T0,e69, 69);
name [70] = "G4_W";
G4double e70[78] = { 20.75, 25.23, 28.99, 32.29, 35.26, 40.51, 45.11, 49.26, 53.06, 56.59, 59.9, 63.02, 70.18, 76.63, 82.54, 88.02, 93.16, 98.01, 102.6, 107, 115.2, 122.9, 130, 136.7, 143.1, 149.2, 155, 160.6, 165.9, 171.1, 176.1, 180.9, 185.6, 190.1, 211.1, 229.6, 246.2, 261.3, 275.1, 287.7, 299.3, 310, 328.8, 344.7, 358.1, 369.2, 378.3, 385.6, 391.3, 395.6, 398.7, 400.6, 401.7, 401.9, 401.4, 400.4, 389.5, 374.8, 359.5, 344.8, 331, 318.3, 306.5, 295.7, 276.7, 260.8, 247.3, 235.5, 225.2, 216.1, 207.8, 200.3, 193.5, 187.3, 181.5, 176.2, 171.3, 166.7 };
for(i=0; i<78; i++) {e[70][i]=e70[i]*MeV*cm2/g;}
AddData(T0,e70, 70);
name [71] = "G4_WATER";
G4double e71[78] = { 98.91, 122.7, 143.1, 161.1, 177.5, 206.9, 233, 256.8, 278.8, 299.3, 318.6, 337, 379.5, 418.1, 453.8, 487.1, 518.6, 548.3, 576.7, 603.9, 655.2, 703, 748, 790.5, 831, 869.6, 906.6, 942.2, 976.4, 1009, 1041, 1072, 1102, 1131, 1265, 1383, 1488, 1582, 1666, 1743, 1811, 1873, 1978, 2062, 2128, 2178, 2215, 2240, 2255, 2262, 2262, 2256, 2245, 2230, 2211, 2190, 2050, 1896, 1752, 1624, 1511, 1414, 1329, 1255, 1132, 1034, 952.7, 884.8, 826.9, 777.1, 733.4, 694.9, 660.7, 630.1, 602.5, 577.6, 554.8, 534 };
for(i=0; i<78; i++) {e[71][i]=e71[i]*MeV*cm2/g;}
AddData(T0,e71, 71);
name [72] = "G4_WATER_VAPOR";
G4double e72[78] = { 126.3, 154.7, 178.7, 199.8, 218.8, 252.7, 282.5, 309.5, 334.3, 357.3, 379, 399.5, 446.7, 489.3, 528.5, 565, 599.2, 631.6, 662.4, 691.9, 747.3, 798.8, 847.2, 892.9, 936.3, 977.8, 1018, 1056, 1093, 1128, 1163, 1196, 1228, 1260, 1405, 1535, 1652, 1758, 1855, 1942, 2022, 2094, 2216, 2309, 2377, 2422, 2446, 2455, 2453, 2446, 2436, 2423, 2409, 2392, 2371, 2346, 2169, 1971, 1797, 1653, 1537, 1437, 1351, 1275, 1149, 1049, 965.8, 896.6, 837.6, 786.9, 742.5, 703.3, 668.6, 637.5, 609.5, 584.2, 561.1, 539.9 };
for(i=0; i<78; i++) {e[72][i]=e72[i]*MeV*cm2/g;}
AddData(T0,e72, 72);
name [73] = "G4_Xe";
G4double e73[78] = { 18.11, 23.3, 27.86, 31.99, 35.83, 42.84, 49.2, 55.1, 60.63, 65.87, 70.87, 75.65, 86.89, 97.3, 107.1, 116.3, 125.1, 133.5, 141.7, 149.5, 164.4, 178.6, 192, 204.9, 217.3, 229.2, 240.7, 251.8, 262.6, 273.1, 283.4, 293.3, 303, 312.5, 356.7, 396.5, 432.5, 465.2, 494.9, 521.8, 546.1, 567.9, 604.7, 633.2, 654.5, 669.3, 678.8, 683.6, 684.6, 682.5, 678, 671.7, 663.9, 655.1, 645.6, 635.6, 584.6, 538.7, 500.4, 468.8, 446.7, 430.5, 417.1, 405.3, 383.9, 364, 344.9, 326.8, 309.7, 294.6, 281.3, 269.5, 258.7, 248.8, 239.6, 231.1, 223.2, 216.2 };
for(i=0; i<78; i++) {e[73][i]=e73[i]*MeV*cm2/g;}
AddData(T0,e73, 73);
}
void G4ASTARStopping::AddData(G4double* ekin, G4double* s, G4int idx)
{
sdata[idx] = new G4LPhysicsFreeVector(78, ekin[0]*MeV, ekin[77]*MeV);
const G4double fac = MeV*cm2/g;
for(size_t i=0; i<78; ++i) { sdata[idx]->PutValues(i, ekin[i]*MeV, s[i]*fac); }
sdata[idx]->SetSpline(true);
}
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BetheBlochIonGasModel.cc,v 1.1 2010/05/27 10:34:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4BetheBlochIonGasModel
//
// Author: Vladimir Ivanchenko
//
// Creation date: 21.05.2010
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4BetheBlochIonGasModel.hh"
#include "G4Track.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4BetheBlochIonGasModel::G4BetheBlochIonGasModel(const G4ParticleDefinition* p,
const G4String& nam) : G4BetheBlochModel(p,nam), currentCharge(0.0)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4BetheBlochIonGasModel::~G4BetheBlochIonGasModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BetheBlochIonGasModel::ChargeSquareRatio(const G4Track& track)
{
currentCharge = track.GetDynamicParticle()->GetCharge()/eplus;
G4double q2 = currentCharge*currentCharge;
SetChargeSquareRatio(q2);
return q2;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BetheBlochIonGasModel::GetParticleCharge(const G4ParticleDefinition*,
const G4Material*, G4double)
{
return currentCharge*eplus;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BetheBlochModel.cc,v 1.36 2009/12/03 17:26:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4BetheBlochModel.cc,v 1.41 2010/11/12 18:37:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -81,11 +81,13 @@ G4BetheBlochModel::G4BetheBlochModel(const G4ParticleDefinition* p,
isInitialised(false)
{
fParticleChange = 0;
theElectron = G4Electron::Electron();
if(p) {
SetGenericIon(p);
SetParticle(p);
} else {
SetParticle(theElectron);
}
theElectron = G4Electron::Electron();
corr = G4LossTableManager::Instance()->EmCorrections();
nist = G4NistManager::Instance();
SetLowEnergyLimit(2.0*MeV);
@@ -116,7 +118,6 @@ void G4BetheBlochModel::Initialise(const G4ParticleDefinition* p,
// << " isIon= " << isIon
// << G4endl;
corrFactor = chargeSquare;
// always false before the run
SetDeexcitationFlag(false);
@@ -144,10 +145,36 @@ G4double G4BetheBlochModel::GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy)
{
// this method is called only for ions
// this method is called only for ions, so no check if it is an ion
return corr->GetParticleCharge(p,mat,kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4BetheBlochModel::SetupParameters()
{
mass = particle->GetPDGMass();
spin = particle->GetPDGSpin();
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
corrFactor = chargeSquare;
ratio = electron_mass_c2/mass;
G4double magmom =
particle->GetPDGMagneticMoment()*mass/(0.5*eplus*hbar_Planck*c_squared);
magMoment2 = magmom*magmom - 1.0;
formfact = 0.0;
if(particle->GetLeptonNumber() == 0) {
G4double x = 0.8426*GeV;
if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;}
else if(mass > GeV) {
x /= nist->GetZ13(mass/proton_mass_c2);
// tlimit = 51.2*GeV*A13[iz]*A13[iz];
}
formfact = 2.0*electron_mass_c2/(x*x);
tlimit = 2.0/formfact;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double
@@ -169,7 +196,7 @@ G4BetheBlochModel::ComputeCrossSectionPerElectron(const G4ParticleDefinition* p,
- beta2*log(maxEnergy/cutEnergy)/tmax;
// +term for spin=1/2 particle
if( 0.5 == spin ) cross += 0.5*(maxEnergy - cutEnergy)/energy2;
if( 0.5 == spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; }
// High order correction different for hadrons and ions
// nevetheless they are applied to reduce high energy transfers
@@ -224,7 +251,7 @@ G4double G4BetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
G4double cut)
{
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double cutEnergy = min(cut,tmax);
G4double cutEnergy = std::min(cut,tmax);
G4double tau = kineticEnergy/mass;
G4double gam = tau + 1.0;
@@ -233,11 +260,6 @@ G4double G4BetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
G4double eexc2 = eexc*eexc;
//G4double cden = material->GetIonisation()->GetCdensity();
//G4double mden = material->GetIonisation()->GetMdensity();
//G4double aden = material->GetIonisation()->GetAdensity();
//G4double x0den = material->GetIonisation()->GetX0density();
//G4double x1den = material->GetIonisation()->GetX1density();
G4double eDensity = material->GetElectronDensity();
@@ -251,19 +273,12 @@ G4double G4BetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
// density correction
G4double x = log(bg2)/twoln10;
//if ( x >= x0den ) {
// dedx -= twoln10*x - cden ;
// if ( x < x1den ) dedx -= aden*pow((x1den-x),mden) ;
//}
dedx -= material->GetIonisation()->DensityCorrection(x);
// shell correction
dedx -= 2.0*corr->ShellCorrection(p,material,kineticEnergy);
// now compute the total ionization loss
if (dedx < 0.0) dedx = 0.0 ;
dedx *= twopi_mc2_rcl2*chargeSquare*eDensity/beta2;
//High order correction different for hadrons and ions
@@ -272,18 +287,12 @@ G4double G4BetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
} else {
dedx += corr->HighOrderCorrections(p,material,kineticEnergy,cutEnergy);
}
if (dedx < 0.0) { dedx = 0.0; }
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/*
void G4BetheBlochModel::CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double&,
G4double&,
G4double)
{}
*/
void G4BetheBlochModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BetheHeitlerModel.cc,v 1.13 2009/04/09 18:41:18 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4BetheHeitlerModel.cc,v 1.15 2010/10/25 19:02:32 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -42,8 +42,9 @@
// 24-06-05 Increase number of bins to 200 (V.Ivantchenko)
// 16-11-05 replace shootBit() by G4UniformRand() mma
// 04-12-05 SetProposedKineticEnergy(0.) for the killed photon (mma)
// 20-02-20 SelectRandomElement is called for any initial gamma energy
// 20-02-07 SelectRandomElement is called for any initial gamma energy
// in order to have selected element for polarized model (VI)
// 25-10-10 Removed unused table, added element selector (VI)
//
// Class Description:
//
@@ -57,10 +58,7 @@
#include "G4Positron.hh"
#include "G4Gamma.hh"
#include "Randomize.hh"
#include "G4DataVector.hh"
#include "G4PhysicsLogVector.hh"
#include "G4ParticleChangeForGamma.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -68,9 +66,7 @@ using namespace std;
G4BetheHeitlerModel::G4BetheHeitlerModel(const G4ParticleDefinition*,
const G4String& nam)
: G4VEmModel(nam),
theCrossSectionTable(0),
nbins(10)
: G4VEmModel(nam)
{
fParticleChange = 0;
theGamma = G4Gamma::Gamma();
@@ -81,59 +77,23 @@ G4BetheHeitlerModel::G4BetheHeitlerModel(const G4ParticleDefinition*,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4BetheHeitlerModel::~G4BetheHeitlerModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4BetheHeitlerModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& cuts)
{
if(theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
if(!fParticleChange) { fParticleChange = GetParticleChangeForGamma(); }
InitialiseElementSelectors(p, cuts);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4BetheHeitlerModel::Initialise(const G4ParticleDefinition*,
const G4DataVector&)
{
if(!fParticleChange) fParticleChange = GetParticleChangeForGamma();
if(theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
const G4ElementTable* theElementTable = G4Element::GetElementTable();
size_t nvect = G4Element::GetNumberOfElements();
theCrossSectionTable = new G4PhysicsTable(nvect);
G4PhysicsLogVector* ptrVector;
G4double emin = LowEnergyLimit();
G4double emax = HighEnergyLimit();
G4int n = nbins*G4int(log10(emax/emin));
G4bool spline = G4LossTableManager::Instance()->SplineFlag();
G4double e, value;
for(size_t j=0; j<nvect ; j++) {
ptrVector = new G4PhysicsLogVector(emin, emax, n);
ptrVector->SetSpline(spline);
G4double Z = (*theElementTable)[j]->GetZ();
G4int iz = G4int(Z);
indexZ[iz] = j;
for(G4int i=0; i<nbins; i++) {
e = ptrVector->GetLowEdgeEnergy( i ) ;
value = ComputeCrossSectionPerAtom(theGamma, e, Z);
ptrVector->PutValue( i, value );
}
theCrossSectionTable->insert(ptrVector);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4BetheHeitlerModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition*,
G4double GammaEnergy, G4double Z,
G4double, G4double, G4double)
G4double
G4BetheHeitlerModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double GammaEnergy, G4double Z,
G4double, G4double, G4double)
// Calculates the microscopic cross section in GEANT4 internal units.
// A parametrized formula from L. Urban is used to estimate
// the total cross section.
@@ -143,8 +103,7 @@ G4double G4BetheHeitlerModel::ComputeCrossSectionPerAtom(
{
static const G4double GammaEnergyLimit = 1.5*MeV;
G4double CrossSection = 0.0 ;
if ( Z < 1. ) return CrossSection;
if ( GammaEnergy <= 2.0*electron_mass_c2 ) return CrossSection;
if ( Z < 0.9 || GammaEnergy <= 2.0*electron_mass_c2 ) { return CrossSection; }
static const G4double
a0= 8.7842e+2*microbarn, a1=-1.9625e+3*microbarn, a2= 1.2949e+3*microbarn,
@@ -159,7 +118,7 @@ G4double G4BetheHeitlerModel::ComputeCrossSectionPerAtom(
c3= 2.1773e+2*microbarn, c4=-2.0467e+1*microbarn, c5= 6.5372e-1*microbarn;
G4double GammaEnergySave = GammaEnergy;
if (GammaEnergy < GammaEnergyLimit) GammaEnergy = GammaEnergyLimit ;
if (GammaEnergy < GammaEnergyLimit) { GammaEnergy = GammaEnergyLimit; }
G4double X=log(GammaEnergy/electron_mass_c2), X2=X*X, X3=X2*X, X4=X3*X, X5=X4*X;
@@ -176,7 +135,7 @@ G4double G4BetheHeitlerModel::ComputeCrossSectionPerAtom(
CrossSection *= X*X;
}
if (CrossSection < 0.) CrossSection = 0.;
if (CrossSection < 0.) { CrossSection = 0.; }
return CrossSection;
}
@@ -207,7 +166,7 @@ void G4BetheHeitlerModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fve
G4double epsil ;
G4double epsil0 = electron_mass_c2/GammaEnergy ;
if(epsil0 > 1.0) return;
if(epsil0 > 1.0) { return; }
// do it fast if GammaEnergy < 2. MeV
static const G4double Egsmall=2.*MeV;
@@ -224,7 +183,7 @@ void G4BetheHeitlerModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fve
// Extract Coulomb factor for this Element
G4double FZ = 8.*(anElement->GetIonisation()->GetlogZ3());
if (GammaEnergy > 50.*MeV) FZ += 8.*(anElement->GetfCoulomb());
if (GammaEnergy > 50.*MeV) { FZ += 8.*(anElement->GetfCoulomb()); }
// limits of the screening variable
G4double screenfac = 136.*epsil0/(anElement->GetIonisation()->GetZ3());
@@ -333,5 +292,3 @@ void G4BetheHeitlerModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fve
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BohrFluctuations.cc,v 1.8 2009/09/29 11:33:22 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4BohrFluctuations.cc,v 1.9 2010/10/25 18:23:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -66,7 +66,12 @@ G4BohrFluctuations::G4BohrFluctuations(const G4String& nam)
minFraction(0.2),
xmin(0.2),
minLoss(0.001*eV)
{}
{
particleMass = proton_mass_c2;
chargeSquare = 1.0;
kineticEnergy = 0.0;
beta2 = 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -91,7 +96,7 @@ G4double G4BohrFluctuations::SampleFluctuations(const G4Material* material,
G4double& length,
G4double& meanLoss)
{
if(meanLoss <= minLoss) return meanLoss;
if(meanLoss <= minLoss) { return meanLoss; }
G4double siga = Dispersion(material,dp,tmax,length);
G4double loss = meanLoss;
@@ -141,7 +146,7 @@ G4double G4BohrFluctuations::Dispersion(const G4Material* material,
G4double& tmax,
G4double& length)
{
if(!particle) InitialiseMe(dp->GetDefinition());
if(!particle) { InitialiseMe(dp->GetDefinition()); }
G4double electronDensity = material->GetElectronDensity();
kineticEnergy = dp->GetKineticEnergy();
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggIonGasModel.cc,v 1.1 2010/05/27 10:34:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4BraggIonGasModel
//
// Author: Vladimir Ivanchenko
//
// Creation date: 21.05.2010
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4BraggIonGasModel.hh"
#include "G4Track.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4BraggIonGasModel::G4BraggIonGasModel(const G4ParticleDefinition* p,
const G4String& nam) : G4BraggModel(p,nam), currentCharge(0.0)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4BraggIonGasModel::~G4BraggIonGasModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BraggIonGasModel::ChargeSquareRatio(const G4Track& track)
{
currentCharge = track.GetDynamicParticle()->GetCharge()/eplus;
G4double q2 = currentCharge*currentCharge;
SetChargeSquareRatio(q2);
return q2;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BraggIonGasModel::GetParticleCharge(const G4ParticleDefinition*,
const G4Material*, G4double)
{
return currentCharge*eplus;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggIonModel.cc,v 1.27 2009/11/22 18:00:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4BraggIonModel.cc,v 1.30 2010/11/04 17:30:31 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -80,7 +80,6 @@ G4BraggIonModel::G4BraggIonModel(const G4ParticleDefinition* p,
isIon(false),
isInitialised(false)
{
if(p) SetParticle(p);
SetHighEnergyLimit(2.0*MeV);
HeMass = 3.727417*GeV;
@@ -89,6 +88,9 @@ G4BraggIonModel::G4BraggIonModel(const G4ParticleDefinition* p,
massFactor = 1000.*amu_c2/HeMass;
theZieglerFactor = eV*cm2*1.0e-15;
theElectron = G4Electron::Electron();
corrFactor = 1.0;
if(p) { SetParticle(p); }
else { SetParticle(theElectron); }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -109,7 +111,7 @@ G4double G4BraggIonModel::MinEnergyCut(const G4ParticleDefinition*,
void G4BraggIonModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if(p != particle) SetParticle(p);
if(p != particle) { SetParticle(p); }
corrFactor = chargeSquare;
@@ -121,7 +123,7 @@ void G4BraggIonModel::Initialise(const G4ParticleDefinition* p,
G4String pname = particle->GetParticleName();
if(particle->GetParticleType() == "nucleus" &&
pname != "deuteron" && pname != "triton") isIon = true;
pname != "deuteron" && pname != "triton") { isIon = true; }
corr = G4LossTableManager::Instance()->EmCorrections();
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggModel.cc,v 1.23 2009/11/10 19:25:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4BraggModel.cc,v 1.29 2010/11/05 19:27:26 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -83,12 +83,16 @@ G4BraggModel::G4BraggModel(const G4ParticleDefinition* p, const G4String& nam)
isIon(false),
isInitialised(false)
{
if(p) SetParticle(p);
SetHighEnergyLimit(2.0*MeV);
lowestKinEnergy = 1.0*keV;
theZieglerFactor = eV*cm2*1.0e-15;
theElectron = G4Electron::Electron();
expStopPower125 = 0.0;
corr = G4LossTableManager::Instance()->EmCorrections();
if(p) { SetParticle(p); }
else { SetParticle(theElectron); }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -99,9 +103,10 @@ G4BraggModel::~G4BraggModel()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BraggModel::MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple* couple)
const G4MaterialCutsCouple*)
{
return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy();
return 0.1*keV;
// return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -109,7 +114,7 @@ G4double G4BraggModel::MinEnergyCut(const G4ParticleDefinition*,
void G4BraggModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if(p != particle) SetParticle(p);
if(p != particle) { SetParticle(p); }
// always false before the run
SetDeexcitationFlag(false);
@@ -119,9 +124,7 @@ void G4BraggModel::Initialise(const G4ParticleDefinition* p,
G4String pname = particle->GetParticleName();
if(particle->GetParticleType() == "nucleus" &&
pname != "deuteron" && pname != "triton") isIon = true;
corr = G4LossTableManager::Instance()->EmCorrections();
pname != "deuteron" && pname != "triton") { isIon = true; }
fParticleChange = GetParticleChangeForLoss();
}
@@ -145,7 +148,7 @@ G4double G4BraggModel::GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy)
{
// this method is called only for ions
// this method is called only for ions, so no check if it is an ion
return corr->GetParticleCharge(p,mat,kineticEnergy);
}
@@ -160,7 +163,7 @@ G4double G4BraggModel::ComputeCrossSectionPerElectron(
G4double cross = 0.0;
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double maxEnergy = std::min(tmax,maxKinEnergy);
if(cutEnergy < tmax) {
if(cutEnergy < maxEnergy) {
G4double energy = kineticEnergy + mass;
G4double energy2 = energy*energy;
@@ -214,8 +217,8 @@ G4double G4BraggModel::ComputeDEDXPerVolume(const G4Material* material,
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double tkin = kineticEnergy/massRate;
G4double dedx = 0.0;
if(tkin > lowestKinEnergy) dedx = DEDX(material, tkin);
else dedx = DEDX(material, lowestKinEnergy)*sqrt(tkin/lowestKinEnergy);
if(tkin > lowestKinEnergy) { dedx = DEDX(material, tkin); }
else { dedx = DEDX(material, lowestKinEnergy)*sqrt(tkin/lowestKinEnergy); }
if (cutEnergy < tmax) {
@@ -238,40 +241,6 @@ G4double G4BraggModel::ComputeDEDXPerVolume(const G4Material* material,
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/*
void G4BraggModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& eloss,
G4double&,
G4double length)
{
if(nuclearStopping) {
G4double preKinEnergy = dp->GetKineticEnergy();
G4double e = preKinEnergy - eloss*0.5;
if(e < 0.0) e = preKinEnergy*0.5;
G4double nloss = length*corr->NuclearDEDX(dp->GetDefinition(),
couple->GetMaterial(),
e,false);
// too big energy loss
if(eloss + nloss > preKinEnergy) {
nloss *= (preKinEnergy/(eloss + nloss));
eloss = preKinEnergy;
} else {
eloss += nloss;
}
G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy
<< " de= " << eloss << " NIEL= " << nloss
<< " dynQ= " << dp->GetCharge()/eplus << G4endl;
fParticleChange->ProposeNonIonizingEnergyDeposit(nloss);
}
}
*/
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4BraggModel::SampleSecondaries(vector<G4DynamicParticle*>* vdp,
@@ -282,7 +251,7 @@ void G4BraggModel::SampleSecondaries(vector<G4DynamicParticle*>* vdp,
{
G4double tmax = MaxSecondaryKinEnergy(dp);
G4double xmax = std::min(tmax, maxEnergy);
if(xmin >= xmax) return;
if(xmin >= xmax) { return; }
G4double kineticEnergy = dp->GetKineticEnergy();
G4double energy = kineticEnergy + mass;
@@ -342,7 +311,7 @@ void G4BraggModel::SampleSecondaries(vector<G4DynamicParticle*>* vdp,
G4double G4BraggModel::MaxSecondaryEnergy(const G4ParticleDefinition* pd,
G4double kinEnergy)
{
if(pd != particle) SetParticle(pd);
if(pd != particle) { SetParticle(pd); }
G4double tau = kinEnergy/mass;
G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
(1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
@@ -586,15 +555,14 @@ G4double G4BraggModel::ElectronicStoppingPower(G4double z,
G4double shigh = log( 1.0 + a[i][3]/T + a[i][4]*T ) * a[i][2]/T ;
ionloss = slow*shigh*fac / (slow + shigh) ;
if ( ionloss < 0.0) ionloss = 0.0 ;
if ( ionloss < 0.0) { ionloss = 0.0; }
return ionloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BraggModel::DEDX(const G4Material* material,
G4double kineticEnergy)
G4double G4BraggModel::DEDX(const G4Material* material, G4double kineticEnergy)
{
G4double eloss = 0.0;
const G4int numberOfElements = material->GetNumberOfElements();
@@ -604,7 +572,7 @@ G4double G4BraggModel::DEDX(const G4Material* material,
// compaund material with parametrisation
G4int iNist = pstar.GetIndex(material);
if( iNist >= 0 ) {
if( iNist >= 0 && kineticEnergy <= 2.01*MeV) {
return pstar.GetElectronicDEDX(iNist, kineticEnergy)*material->GetDensity();
} else if( HasMaterial(material) ) {
@@ -612,7 +580,7 @@ G4double G4BraggModel::DEDX(const G4Material* material,
eloss = StoppingPower(material, kineticEnergy)*
material->GetDensity()/amu;
// pure material
// Pure material ICRU49 paralmeterisation
} else if(1 == numberOfElements) {
G4double z = material->GetZ();
@@ -623,12 +591,12 @@ G4double G4BraggModel::DEDX(const G4Material* material,
// Experimental data exist only for kinetic energy 125 keV
} else if( MolecIsInZiegler1988(material) ) {
// Cycle over elements - calculation based on Bragg's rule
// Loop over elements - calculation based on Bragg's rule
G4double eloss125 = 0.0 ;
const G4ElementVector* theElementVector =
material->GetElementVector();
// loop for the elements in the material
// Loop for the elements in the material
for (G4int i=0; i<numberOfElements; i++) {
const G4Element* element = (*theElementVector)[i] ;
G4double z = element->GetZ() ;
@@ -667,7 +635,7 @@ G4bool G4BraggModel::MolecIsInZiegler1988(const G4Material* material)
G4String myFormula = G4String(" ") ;
const G4String chFormula = material->GetChemicalFormula() ;
if (myFormula == chFormula ) return false ;
if (myFormula == chFormula ) { return false; }
// There are no evidence for difference of stopping power depended on
// phase of the compound except for water. The stopping power of the
@@ -1,488 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ComptonScattering52.cc,v 1.7 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------ G4ComptonScattering52 physics process -----------------------------
// by Michel Maire, April 1996
//
// 28-05-96, DoIt() small change in ElecDirection, by M.Maire
// 10-06-96, simplification in ComputeMicroscopicCrossSection(), by M.Maire
// 21-06-96, SetCuts implementation, M.Maire
// 13-09-96, small changes in DoIt for better efficiency. Thanks to P.Urban
// 06-01-97, crossection table + meanfreepath table, M.Maire
// 05-03-97, new Physics scheme, M.Maire
// 28-03-97, protection in BuildPhysicsTable, M.Maire
// 07-04-98, remove 'tracking cut' of the scattered gamma, MMa
// 04-06-98, in DoIt, secondary production condition:
// range>std::min(threshold,safety)
// 13-08-98, new methods SetBining() PrintInfo()
// 15-12-98, cross section=0 below 10 keV
// 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
// 13-07-01, DoIt: suppression of production cut for the electron (mma)
// 03-08-01, new methods Store/Retrieve PhysicsTable (mma)
// 06-08-01, BuildThePhysicsTable() called from constructor (mma)
// 17-09-01, migration of Materials to pure STL (mma)
// 20-09-01, DoIt: fminimalEnergy = 1*eV (mma)
// 01-10-01, come back to BuildPhysicsTable(const G4ParticleDefinition&)
// 17-04-02, LowestEnergyLimit = 1*keV
// 26-05-04, cross section parametrization improved for low energy :
// Egamma <~ 15 keV (Laszlo)
// 08-11-04, Remove Store/Retrieve tables (V.Ivanchenko)
// 04-05-05, Add 52 to class name (V.Ivanchenko)
// -----------------------------------------------------------------------------
#include "G4ComptonScattering52.hh"
#include "G4UnitsTable.hh"
#include "G4PhysicsTableHelper.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4ComptonScattering52::G4ComptonScattering52(const G4String& processName,
G4ProcessType type):G4VDiscreteProcess (processName, type),
theCrossSectionTable(NULL),
theMeanFreePathTable(NULL),
LowestEnergyLimit ( 1*keV),
HighestEnergyLimit(100*GeV),
NumbBinTable(80),
fminimalEnergy(1*eV)
{
SetProcessSubType(13);
G4cout << "!!! G4ComptonScattering52 is the obsolete process class and will be removed soon !!!"
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// destructor
G4ComptonScattering52::~G4ComptonScattering52()
{
if (theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
if (theMeanFreePathTable) {
theMeanFreePathTable->clearAndDestroy();
delete theMeanFreePathTable;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool G4ComptonScattering52::IsApplicable( const G4ParticleDefinition& particle)
{
return ( &particle == G4Gamma::Gamma() );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4ComptonScattering52::SetPhysicsTableBining(
G4double lowE, G4double highE, G4int nBins)
{
LowestEnergyLimit = lowE; HighestEnergyLimit = highE; NumbBinTable = nBins;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4ComptonScattering52::BuildPhysicsTable(const G4ParticleDefinition&)
// Build cross section and mean free path tables
{
G4double LowEdgeEnergy, Value;
G4PhysicsLogVector* ptrVector;
// Build cross section per atom tables for the Compton Scattering process
if (theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy(); delete theCrossSectionTable;}
theCrossSectionTable = new G4PhysicsTable(G4Element::GetNumberOfElements());
const G4ElementTable* theElementTable = G4Element::GetElementTable();
G4double AtomicNumber;
size_t J;
for ( J=0 ; J < G4Element::GetNumberOfElements(); J++ )
{
//create physics vector then fill it ....
ptrVector = new G4PhysicsLogVector(LowestEnergyLimit,HighestEnergyLimit,
NumbBinTable );
AtomicNumber = (*theElementTable)[J]->GetZ();
for ( G4int i = 0 ; i < NumbBinTable ; i++ )
{
LowEdgeEnergy = ptrVector->GetLowEdgeEnergy(i);
Value = ComputeCrossSectionPerAtom(LowEdgeEnergy, AtomicNumber);
ptrVector->PutValue(i,Value);
}
theCrossSectionTable->insertAt( J , ptrVector ) ;
}
// Build mean free path table for the Compton Scattering process
if (theMeanFreePathTable) {
theMeanFreePathTable->clearAndDestroy(); delete theMeanFreePathTable;}
theMeanFreePathTable= new G4PhysicsTable(G4Material::GetNumberOfMaterials());
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4Material* material;
for ( J=0 ; J < G4Material::GetNumberOfMaterials(); J++ )
{
//create physics vector then fill it ....
ptrVector = new G4PhysicsLogVector(LowestEnergyLimit,HighestEnergyLimit,
NumbBinTable ) ;
material = (*theMaterialTable)[J];
for ( G4int i = 0 ; i < NumbBinTable ; i++ )
{
LowEdgeEnergy = ptrVector->GetLowEdgeEnergy( i ) ;
Value = ComputeMeanFreePath( LowEdgeEnergy, material);
ptrVector->PutValue( i , Value ) ;
}
theMeanFreePathTable->insertAt( J , ptrVector ) ;
}
PrintInfoDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ComptonScattering52::ComputeCrossSectionPerAtom
(G4double GammaEnergy, G4double Z)
// Calculates the cross section per atom in GEANT4 internal units.
// A parametrized formula from L. Urban is used to estimate
// the total cross section.
// It gives a good description of the data from 10 keV to 100/Z GeV.
// lower limit 1 keV now with a correction for low energy
{
G4double CrossSection = 0.0 ;
if ( Z < 1. ) return CrossSection;
if ( GammaEnergy < 1.*keV ) return CrossSection;
if ( GammaEnergy > (100.*GeV/Z) ) return CrossSection;
static const G4double a = 20.0 , b = 230.0 , c = 440.0;
static const G4double
d1= 2.7965e-1*barn, d2=-1.8300e-1*barn, d3= 6.7527 *barn, d4=-1.9798e+1*barn,
e1= 1.9756e-5*barn, e2=-1.0205e-2*barn, e3=-7.3913e-2*barn, e4= 2.7079e-2*barn,
f1=-3.9178e-7*barn, f2= 6.8241e-5*barn, f3= 6.0480e-5*barn, f4= 3.0274e-4*barn;
G4double p1Z = Z*(d1 + e1*Z + f1*Z*Z), p2Z = Z*(d2 + e2*Z + f2*Z*Z),
p3Z = Z*(d3 + e3*Z + f3*Z*Z), p4Z = Z*(d4 + e4*Z + f4*Z*Z);
G4double T0 = 15*keV; if (Z == 1.) T0 = 40*keV;
G4double X = max(GammaEnergy, T0) / electron_mass_c2;
CrossSection = p1Z*log(1.+2*X)/X
+ (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
// modification for low energy. (special case for Hydrogen)
if (GammaEnergy < T0) {
G4double dT0 = 1.*keV;
X = (T0+dT0) / electron_mass_c2 ;
G4double sigma = p1Z*log(1.+2*X)/X
+ (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
G4double c1 = -T0*(sigma-CrossSection)/(CrossSection*dT0);
G4double c2 = 0.150; if (Z > 1.) c2 = 0.375-0.0556*log(Z);
G4double y = log(GammaEnergy/T0);
CrossSection *= exp(-y*(c1+c2*y));
}
return CrossSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ComptonScattering52::ComputeMeanFreePath(G4double GammaEnergy,
G4Material* aMaterial)
// returns the gamma mean free path in GEANT4 internal units
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
G4double SIGMA = 0.;
for ( size_t elm=0 ; elm < aMaterial->GetNumberOfElements() ; elm++ )
{
SIGMA += NbOfAtomsPerVolume[elm] *
ComputeCrossSectionPerAtom(GammaEnergy,
(*theElementVector)[elm]->GetZ());
}
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ComptonScattering52::GetCrossSectionPerAtom(
G4DynamicParticle* aDynamicGamma,
G4Element* anElement)
// gives the microscopic total cross section in GEANT4 internal units
{
G4double crossSection;
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4bool isOutRange ;
if (GammaEnergy < LowestEnergyLimit || GammaEnergy > HighestEnergyLimit)
crossSection = 0.;
else
crossSection = (*theCrossSectionTable)(anElement->GetIndex())->
GetValue(GammaEnergy, isOutRange);
return crossSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ComptonScattering52::GetMeanFreePath(const G4Track& aTrack,
G4double,
G4ForceCondition*)
// returns the gamma mean free path in GEANT4 internal units
{
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
G4double MeanFreePath;
G4bool isOutRange;
if (GammaEnergy > HighestEnergyLimit || GammaEnergy < LowestEnergyLimit)
MeanFreePath = DBL_MAX;
else
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
GetValue(GammaEnergy, isOutRange);
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VParticleChange* G4ComptonScattering52::PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep)
//
// The scattered gamma energy is sampled according to Klein - Nishina formula.
// The random number techniques of Butcher & Messel are used
// (Nuc Phys 20(1960),15).
// GEANT4 internal units
//
// Note : Effects due to binding of atomic electrons are negliged.
{
aParticleChange.Initialize(aTrack);
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4double GammaEnergy0 = aDynamicGamma->GetKineticEnergy();
G4double E0_m = GammaEnergy0 / electron_mass_c2 ;
G4ParticleMomentum GammaDirection0 = aDynamicGamma->GetMomentumDirection();
//
// sample the energy rate of the scattered gamma
//
G4double epsilon, epsilonsq, onecost, sint2, greject ;
G4double epsilon0 = 1./(1. + 2*E0_m) , epsilon0sq = epsilon0*epsilon0;
G4double alpha1 = - log(epsilon0) , alpha2 = 0.5*(1.- epsilon0sq);
do {
if ( alpha1/(alpha1+alpha2) > G4UniformRand() )
{ epsilon = exp(-alpha1*G4UniformRand()); // epsilon0**r
epsilonsq = epsilon*epsilon; }
else {
epsilonsq = epsilon0sq + (1.- epsilon0sq)*G4UniformRand();
epsilon = sqrt(epsilonsq);
};
onecost = (1.- epsilon)/(epsilon*E0_m);
sint2 = onecost*(2.-onecost);
greject = 1. - epsilon*sint2/(1.+ epsilonsq);
} while (greject < G4UniformRand());
//
// scattered gamma angles. ( Z - axis along the parent gamma)
//
G4double cosTeta = 1. - onecost , sinTeta = sqrt (sint2);
G4double Phi = twopi * G4UniformRand();
G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
//
// update G4VParticleChange for the scattered gamma
//
G4ThreeVector GammaDirection1 ( dirx,diry,dirz );
GammaDirection1.rotateUz(GammaDirection0);
aParticleChange.ProposeMomentumDirection( GammaDirection1 );
G4double GammaEnergy1 = epsilon*GammaEnergy0;
G4double localEnergyDeposit = 0.;
if (GammaEnergy1 > fminimalEnergy)
{
aParticleChange.ProposeEnergy( GammaEnergy1 );
}
else
{
localEnergyDeposit += GammaEnergy1;
aParticleChange.ProposeEnergy(0.) ;
aParticleChange.ProposeTrackStatus(fStopAndKill);
}
//
// kinematic of the scattered electron
//
G4double ElecKineEnergy = GammaEnergy0 - GammaEnergy1;
if (ElecKineEnergy > fminimalEnergy)
{
G4double ElecMomentum = sqrt(ElecKineEnergy*
(ElecKineEnergy+2.*electron_mass_c2));
G4ThreeVector ElecDirection (
(GammaEnergy0*GammaDirection0 - GammaEnergy1*GammaDirection1)
*(1./ElecMomentum) );
// create G4DynamicParticle object for the electron.
G4DynamicParticle* aElectron= new G4DynamicParticle(
G4Electron::Electron(),ElecDirection,ElecKineEnergy);
aParticleChange.SetNumberOfSecondaries(1);
aParticleChange.AddSecondary( aElectron );
}
else
{
aParticleChange.SetNumberOfSecondaries(0);
localEnergyDeposit += ElecKineEnergy;
}
aParticleChange.ProposeLocalEnergyDeposit (localEnergyDeposit);
// Reset NbOfInteractionLengthLeft and return aParticleChange
return G4VDiscreteProcess::PostStepDoIt( aTrack, aStep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool G4ComptonScattering52::StorePhysicsTable(const G4ParticleDefinition* particle,
const G4String& directory,
G4bool ascii)
{
G4String filename;
// store cross section table
filename = GetPhysicsTableFileName(particle,directory,"CrossSection",ascii);
if ( !theCrossSectionTable->StorePhysicsTable(filename, ascii) ){
G4cout << " FAIL theCrossSectionTable->StorePhysicsTable in " << filename
<< G4endl;
return false;
}
// store mean free path table
filename = GetPhysicsTableFileName(particle,directory,"MeanFreePath",ascii);
if ( !theMeanFreePathTable->StorePhysicsTable(filename, ascii) ){
G4cout << " FAIL theMeanFreePathTable->StorePhysicsTable in " << filename
<< G4endl;
return false;
}
G4cout << GetProcessName() << " for " << particle->GetParticleName()
<< ": Success to store the PhysicsTables in "
<< directory << G4endl;
return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/*
G4bool G4ComptonScattering52::RetrievePhysicsTable(const G4ParticleDefinition* particle,
const G4String& directory,
G4bool ascii)
{
// delete theCrossSectionTable and theMeanFreePathTable
if (theCrossSectionTable != 0) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
if (theMeanFreePathTable != 0) {
theMeanFreePathTable->clearAndDestroy();
delete theMeanFreePathTable;
}
G4String filename;
// retreive cross section table
filename = GetPhysicsTableFileName(particle,directory,"CrossSection",ascii);
theCrossSectionTable = new G4PhysicsTable(G4Element::GetNumberOfElements());
if ( !G4PhysicsTableHelper::RetrievePhysicsTable(filename, ascii) ){
G4cout << " FAIL theCrossSectionTable->RetrievePhysicsTable in " << filename
<< G4endl;
return false;
}
// retreive mean free path table
filename = GetPhysicsTableFileName(particle,directory,"MeanFreePath",ascii);
theMeanFreePathTable = new G4PhysicsTable(G4Material::GetNumberOfMaterials());
if ( !G4PhysicsTableHelper::RetrievePhysicsTable(filename, ascii) ){
G4cout << " FAIL theMeanFreePathTable->RetrievePhysicsTable in " << filename
<< G4endl;
return false;
}
G4cout << GetProcessName() << " for " << particle->GetParticleName()
<< ": Success to retrieve the PhysicsTables from "
<< directory << G4endl;
return true;
}
*/
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4ComptonScattering52::PrintInfoDefinition()
{
G4String comments = "Total cross sections from a parametrisation. ";
comments += "Good description from 10 KeV to (100/Z) GeV. \n";
comments += " Scattered gamma energy according Klein-Nishina.";
G4cout << G4endl << GetProcessName() << ": " << comments
<< "\n PhysicsTables from "
<< G4BestUnit(LowestEnergyLimit,"Energy")
<< " to " << G4BestUnit(HighestEnergyLimit,"Energy")
<< " in " << NumbBinTable << " bins. \n";
G4cout << " WARNING: This process is obsolete and will be soon removed"
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CoulombScattering.cc,v 1.25 2009/10/28 10:14:13 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4CoulombScattering.cc,v 1.28 2010/05/25 18:41:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -------------------------------------------------------------------
//
@@ -54,6 +54,7 @@
//#include "G4hCoulombScatteringModel.hh"
#include "G4Electron.hh"
#include "G4Proton.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -63,6 +64,7 @@ G4CoulombScattering::G4CoulombScattering(const G4String& name)
: G4VEmProcess(name),thetaMin(0.0),thetaMax(pi),q2Max(TeV*TeV),
isInitialised(false)
{
// G4cout << "G4CoulombScattering constructor "<< G4endl;
SetBuildTableFlag(true);
SetStartFromNullFlag(false);
SetIntegral(true);
@@ -92,12 +94,18 @@ G4bool G4CoulombScattering::IsApplicable(const G4ParticleDefinition& p)
void G4CoulombScattering::InitialiseProcess(const G4ParticleDefinition* p)
{
//G4cout << "### G4CoulombScattering::InitialiseProcess : "
// << p->GetParticleName() << G4endl;
G4double a =
G4LossTableManager::Instance()->FactorForAngleLimit()*CLHEP::hbarc/CLHEP::fermi;
q2Max = 0.5*a*a;
// second initialisation
if(isInitialised) {
G4VEmModel* mod = GetModelByIndex(0);
mod->SetPolarAngleLimit(PolarAngleLimit());
mod = GetModelByIndex(1);
if(mod) mod->SetPolarAngleLimit(PolarAngleLimit());
if(mod) { mod->SetPolarAngleLimit(PolarAngleLimit()); }
// first initialisation
} else {
@@ -105,13 +113,15 @@ void G4CoulombScattering::InitialiseProcess(const G4ParticleDefinition* p)
aParticle = p;
G4double mass = p->GetPDGMass();
G4String name = p->GetParticleName();
//G4cout << name << " type: " << p->GetParticleType()
//<< " mass= " << mass << G4endl;
if (mass > GeV || p->GetParticleType() == "nucleus") {
SetBuildTableFlag(false);
verboseLevel = 0;
if(name != "GenericIon") { SetVerboseLevel(0); }
} else {
if(name != "e-" && name != "e+" &&
name != "mu+" && name != "mu-" && name != "pi+" &&
name != "kaon+" && name != "proton" ) verboseLevel = 0;
name != "kaon+" && name != "proton" ) { SetVerboseLevel(0); }
}
G4double emin = MinKinEnergy();
@@ -155,7 +165,7 @@ void G4CoulombScattering::PrintInfo()
if(aParticle->GetPDGMass() < MeV) G4cout << thEnergyElec;
else G4cout << thEnergy;
if(q2Max < DBL_MAX) G4cout << "; q2Max(GeV^2)= " << q2Max/(GeV*GeV);
if(q2Max < DBL_MAX) { G4cout << "; pLimit(GeV^1)= " << sqrt(q2Max)/GeV; }
G4cout << G4endl;
}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CoulombScatteringModel.cc,v 1.44 2009/12/03 09:59:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4CoulombScatteringModel.cc,v 1.49 2010/05/27 14:22:05 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -------------------------------------------------------------------
//
@@ -46,6 +46,8 @@
// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
// 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class
// 16.06.09 Consolandi rows 109, 111-112, 183, 185-186
// 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to
// compute cross sections and sample scattering angle
//
//
// Class Description:
@@ -61,6 +63,7 @@
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4Proton.hh"
#include "G4NucleiProperties.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -85,46 +88,47 @@ G4double G4CoulombScatteringModel::ComputeCrossSectionPerAtom(
G4double cutEnergy,
G4double)
{
SetupParticle(p);
if(kinEnergy < lowEnergyLimit) return 0.0;
SetupKinematic(kinEnergy, cutEnergy);
//G4cout << "### G4CoulombScatteringModel::ComputeCrossSectionPerAtom for "
// << p->GetParticleName()<<" Z= "<<Z<<" e(MeV)= "<< kinEnergy/MeV
// <<" cut(MeV)= " << cutEnergy<< G4endl;
G4double xsec = 0.0;
if(p != particle) { SetupParticle(p); }
if(kinEnergy < lowEnergyLimit) { return 0.0; }
DefineMaterial(CurrentCouple());
// save lab system kinematics
G4double xtkin = tkin;
G4double xmom2 = mom2;
G4double xinvb = invbeta2;
// CM system
iz = G4int(Z);
G4double m2 = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
G4double etot = tkin + mass;
G4double ptot = sqrt(mom2);
G4double m12 = mass*mass;
G4double momCM= ptot*m2/sqrt(m12 + m2*m2 + 2.0*etot*m2);
mom2 = momCM*momCM;
tkin = sqrt(mom2 + m12) - mass;
//invbeta2 = 1.0 + m12/mom2;
// G4double fm = m2/(mass + m2);
// 03.09.2009 C.Consaldi
G4double Ecm=sqrt(m12 + m2*m2 + 2.0*etot*m2);
G4double mu_rel=mass*m2/Ecm;
invbeta2 = 1.0 + mu_rel*mu_rel/mom2;
//
SetupTarget(Z, tkin);
G4double xsec = CrossSectionPerAtom();
// restore Lab system kinematics
tkin = xtkin;
mom2 = xmom2;
invbeta2 = xinvb;
// Lab system
G4int iz = G4int(Z);
G4double etot = kinEnergy + mass;
G4double m2 = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
// 03.09.2009 C.Consaldi suggested to use relativistic reduced mass
// from publucation
// A.P. Martynenko, R.N. Faustov, Teoret. mat. Fiz. 64 (1985) 179
G4double Ecm = sqrt(mass*mass + m2*m2 + 2.0*etot*m2);
G4double mu_rel = mass*m2/Ecm;
G4double tkin = Ecm - mu_rel;
wokvi->SetRelativisticMass(mu_rel);
cosTetMinNuc = wokvi->SetupKinematic(tkin, currentMaterial);
if(cosThetaMax < cosTetMinNuc) {
cosTetMinNuc = wokvi->SetupTarget(iz, cutEnergy);
cosTetMaxNuc = cosThetaMax;
if(iz == 1 && cosTetMaxNuc < 0.0 && particle == theProton) {
cosTetMaxNuc = 0.0;
}
xsec = wokvi->ComputeNuclearCrossSection(cosTetMinNuc, cosTetMaxNuc);
elecRatio = wokvi->ComputeElectronCrossSection(cosTetMinNuc, cosThetaMax);
xsec += elecRatio;
if(xsec > 0.0) { elecRatio /= xsec; }
}
/*
G4cout << "e(MeV)= " << kinEnergy/MeV << " xsec(b)= " << xsec/barn
<< "cosTetMinNuc= " << cosTetMinNuc
<< " cosTetMaxNuc= " << cosTetMaxNuc
<< " cosTetMaxElec= " << cosTetMaxElec
<< " screenZ= " << screenZ
<< " formfactA= " << formfactA << G4endl;
*/
return xsec;
}
@@ -138,85 +142,74 @@ void G4CoulombScatteringModel::SampleSecondaries(
G4double)
{
G4double kinEnergy = dp->GetKineticEnergy();
if(kinEnergy < lowEnergyLimit) return;
if(kinEnergy < lowEnergyLimit) { return; }
DefineMaterial(couple);
SetupParticle(dp->GetDefinition());
SetupKinematic(kinEnergy, cutEnergy);
// Choose nucleus
currentElement = SelectRandomAtom(couple,particle,
kinEnergy,ecut,kinEnergy);
kinEnergy,cutEnergy,kinEnergy);
G4double Z = currentElement->GetZ();
iz = G4int(Z);
G4int ia = SelectIsotopeNumber(currentElement);
G4double m2 = theParticleTable->GetIonTable()->GetNucleusMass(iz, ia);
G4double Z = currentElement->GetZ();
G4int iz = G4int(Z);
G4int ia = SelectIsotopeNumber(currentElement);
G4double targetMass = G4NucleiProperties::GetNuclearMass(ia, iz);
if(ComputeCrossSectionPerAtom(particle,kinEnergy, Z,
kinEnergy, cutEnergy, kinEnergy) == 0.0)
{ return; }
// CM system
G4double etot = tkin + mass;
G4double ptot = sqrt(mom2);
G4double momCM= ptot*m2/sqrt(mass*mass + m2*m2 + 2.0*etot*m2);
mom2 = momCM*momCM;
G4double m12 = mass*mass;
G4double eCM = sqrt(mom2 + m12);
// a correction for heavy projectile
// G4double fm = m2/(mass + m2);
// invbeta2 = 1.0 + m12*fm*fm/mom2;
// 03.09.2009 C.Consaldi
G4double Ecm=sqrt(m12 + m2*m2 + 2.0*etot*m2);
G4double mu_rel=mass*m2/Ecm;
invbeta2 = 1.0 + mu_rel*mu_rel/mom2;
//
// sample scattering angle in CM system
SetupTarget(Z, eCM - mass);
G4double cost = SampleCosineTheta();
G4double z1 = 1.0 - cost;
if(z1 < 0.0) return;
G4double sint = sqrt(z1*(1.0 + cost));
G4double phi = twopi * G4UniformRand();
G4ThreeVector newDirection =
wokvi->SampleSingleScattering(cosTetMinNuc, cosTetMaxNuc, elecRatio);
// kinematics in the Lab system
G4double bet = ptot/(etot + m2);
G4double etot = mass + kinEnergy;
G4double ptot = sqrt(kinEnergy*(etot + mass));
G4double bet = ptot/(etot + targetMass);
G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
G4double pzCM = momCM*cost;
G4double eCM = sqrt(mass*mass + targetMass*targetMass + 2*targetMass*etot);
G4double pCM = ptot*targetMass/eCM;
G4double e1 = sqrt(mass*mass + pCM*pCM);
newDirection *= pCM;
G4ThreeVector v1(newDirection.x(),newDirection.y(),gam*(newDirection.z() + bet*e1));
G4double finalT = gam*(e1 + bet*newDirection.z()) - mass;
newDirection = v1.unit();
G4ThreeVector v1(momCM*cos(phi)*sint,momCM*sin(phi)*sint,gam*(pzCM + bet*eCM));
G4ThreeVector dir = dp->GetMomentumDirection();
G4ThreeVector newDirection = v1.unit();
newDirection.rotateUz(dir);
fParticleChange->ProposeMomentumDirection(newDirection);
// G4double elab = gam*(eCM + bet*pzCM);
// G4double Ecm = sqrt(mass*mass + m2*m2 + 2.0*etot*m2);
G4double elab = etot - m2*(ptot/Ecm)*(ptot/Ecm)*(1.-cost) ;
G4double finalT = elab - mass;
if(finalT < 0.0) finalT = 0.0;
// recoil
G4double trec = kinEnergy - finalT;
if(finalT <= lowEnergyLimit) {
trec = kinEnergy;
finalT = 0.0;
}
fParticleChange->SetProposedKineticEnergy(finalT);
// recoil
G4double erec = kinEnergy - finalT;
// G4cout << "sint= " << sint << " Erec(eV)= " << erec/eV << G4endl;
G4double tcut = recoilThreshold;
if(pCuts) { tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]); }
if(erec > tcut) {
/*
G4cout << "sint= " << sint << " Erec(eV)= " << erec/eV
<< " tcut(eV)= " << tcut/eV << " th(eV)= " << recoilThreshold/eV
<< " cut(eV)= " << (*pCuts)[currentMaterialIndex]/eV
<< " " << fvect->size()
<< G4endl;
*/
if(trec > tcut) {
G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz);
G4double plab = sqrt(finalT*(finalT + 2.0*mass));
G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit();
G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, erec);
G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, trec);
fvect->push_back(newdp);
} else if(erec > 0.0) {
fParticleChange->ProposeLocalEnergyDeposit(erec);
fParticleChange->ProposeNonIonizingEnergyDeposit(erec);
} else if(trec > 0.0) {
fParticleChange->ProposeLocalEnergyDeposit(trec);
fParticleChange->ProposeNonIonizingEnergyDeposit(trec);
}
}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4GoudsmitSaundersonMscModel.cc,v 1.20 2009/12/16 17:50:11 gunter Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4GoudsmitSaundersonMscModel.cc,v 1.25 2010/06/25 09:41:40 gunter Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -------------------------------------------------------------------
//
@@ -50,6 +50,14 @@
// 05.10.2009 O.Kadri: tuning small angle theta distributions
// assuming the case of lambdan<1 as single scattering regime
// tuning theta sampling for theta below the screening angle
// 08.02.2010 O.Kadri: bugfix in compound xsection calculation and small angle computation
// adding a rejection condition to hard collision angular sampling
// ComputeTruePathLengthLimit was taken from G4WentzelVIModel
// 26.03.2010 O.Kadri: direct xsection calculation not inverse of the inverse
// angular sampling without large angle rejection method
// longitudinal displacement is computed exactly from <z>
// 12.05.2010 O.Kadri: exchange between target and projectile has as a condition the particle type (e-/e-)
// some cleanup to minimize time consuming (adding lamdan12 & Qn12, changing the error to 1.0e-12 for scrA)
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -59,10 +67,8 @@
//Ref.3:I. Kawrakow et al.,"On the representation ... calculations",NIMB 134 (1998) pp 325-336;
//Ref.4:Bielajew et al.,".....", NIMB 173 (2001) 332-343;
//Ref.5:F. Salvat et al.,"ELSEPA--Dirac partial ...molecules", Comp.Phys.Comm.165 (2005) pp 157-190;
//Ref.6:G4UrbanMscModel G4_v9.1Ref09;
//Ref.7:G4eCoulombScatteringModel G4_v9.1Ref09.
//Ref.6:G4UrbanMscModel G4 9.2;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4GoudsmitSaundersonMscModel.hh"
#include "G4GoudsmitSaundersonTable.hh"
@@ -76,7 +82,6 @@
#include "G4Track.hh"
#include "G4PhysicsTable.hh"
#include "Randomize.hh"
#include "G4Poisson.hh"
using namespace std;
@@ -127,17 +132,14 @@ G4double
G4GoudsmitSaundersonMscModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition* p,
G4double kineticEnergy,G4double Z, G4double, G4double, G4double)
{
//Build cross section table : Taken from Ref.7
G4double cs=0.0;
G4double kinEnergy = kineticEnergy;
if(kinEnergy<lowKEnergy) kinEnergy=lowKEnergy;
if(kinEnergy>highKEnergy)kinEnergy=highKEnergy;
G4double value0,value1;
CalculateIntegrals(p,Z,kinEnergy,value0,value1);
G4double cs0;
CalculateIntegrals(p,Z,kinEnergy,cs0,cs);
if(value1 > 0.0) cs = 1./value1;
return cs;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -147,16 +149,16 @@ G4GoudsmitSaundersonMscModel::SampleScattering(const G4DynamicParticle* dynParti
G4double safety)
{
G4double kineticEnergy = dynParticle->GetKineticEnergy();
if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix)) return ;
G4double cosTheta1,sinTheta1,cosTheta2,sinTheta2;
G4double phi1,phi2,cosPhi1=1.0,sinPhi1=0.0,cosPhi2=1.0,sinPhi2=0.0;
G4double q1,Gamma,Eta,delta,nu,nu0,nu1,nu2;
if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix)||
(tPathLength/tausmall < lambda1)) return ;
///////////////////////////////////////////
// Effective energy and path-length from Eq. 4.7.15+16 of Ref.4
// Effective energy
G4double eloss = theManager->GetEnergy(particle,tPathLength,currentCouple);
if(eloss>0.5*kineticEnergy)eloss=kineticEnergy-eloss;//exchange possibility between target atomic e- and incident particle
if(eloss>0.5*kineticEnergy)
{if((dynParticle->GetCharge())==-eplus)eloss=kineticEnergy-eloss;//exchange between target and projectile if they are electrons
else eloss=0.5*kineticEnergy;
}
G4double ee = kineticEnergy - 0.5*eloss;
G4double ttau = ee/electron_mass_c2;
G4double ttau2 = ttau*ttau;
@@ -165,86 +167,97 @@ G4GoudsmitSaundersonMscModel::SampleScattering(const G4DynamicParticle* dynParti
kineticEnergy *= (1 - cst1);
///////////////////////////////////////////
// additivity rule for mixture and compound xsection calculation
// additivity rule for mixture and compound xsection's
const G4Material* mat = currentCouple->GetMaterial();
G4int nelm = mat->GetNumberOfElements();
const G4ElementVector* theElementVector = mat->GetElementVector();
const G4double* theFraction = mat->GetFractionVector();
G4double atomPerVolume = mat->GetTotNbOfAtomsPerVolume();
G4double llambda0=0.,llambda1=0.;
const G4double* theAtomNumDensityVector = mat->GetVecNbOfAtomsPerVolume();
G4int nelm = mat->GetNumberOfElements();
G4double s0,s1;
lambda0=0.;
for(G4int i=0;i<nelm;i++)
{
G4double l0,l1;
CalculateIntegrals(particle,(*theElementVector)[i]->GetZ(),kineticEnergy,l0,l1);
llambda0 += (theFraction[i]/l0);
llambda1 += (theFraction[i]/l1);
{
CalculateIntegrals(particle,(*theElementVector)[i]->GetZ(),kineticEnergy,s0,s1);
lambda0 += (theAtomNumDensityVector[i]*s0);
}
if(llambda0>DBL_MIN) llambda0 =1./llambda0;
if(llambda1>DBL_MIN) llambda1 =1./llambda1;
G4double g1=0.0;
if(llambda1>DBL_MIN) g1 = llambda0/llambda1;
if(lambda0>DBL_MIN) lambda0 =1./lambda0;
G4double x1,x0;
x0=g1/2.;
// Newton-Raphson root's finding method of scrA from:
// Sig1(PWA)/Sig0(PWA)=g1=2*scrA*((1+scrA)*log(1+1/scrA)-1)
G4double g1=0.0;
if(lambda1>DBL_MIN) g1 = lambda0/lambda1;
G4double logx0,x1,delta;
G4double x0=g1/2.;
do
{
x1 = x0-(x0*((1.+x0)*log(1.+1./x0)-1.0)-g1/2.)/( (1.+2.*x0)*log(1.+1./x0)-2.0);// x1=x0-f(x0)/f'(x0)
logx0=std::log(1.+1./x0);
x1 = x0-(x0*((1.+x0)*logx0-1.0)-g1/2.)/( (1.+2.*x0)*logx0-2.0);
delta = std::abs( x1 - x0 );
x0 = x1; // new approximation becomes the old approximation for the next iteration
} while (delta > 1e-10);
x0 = x1;
} while (delta > 1.0e-12);
G4double scrA = x1;
G4double us=0.0,vs=0.0,ws=1.0,x_coord=0.0,y_coord=0.0,z_coord=1.0;
G4double lambdan=0.;
G4bool mscatt=false,noscatt=false;
if(llambda0>0.)lambdan=atomPerVolume*tPathLength/llambda0;
if((lambdan<=1.0e-12))return;
if(lambda0>0.)lambdan=tPathLength/lambda0;
if(lambdan<=1.0e-12)return;
G4double lambdan12=0.5*lambdan;
Qn1 = lambdan *g1;//2.* lambdan *scrA*((1.+scrA)*log(1.+1./scrA)-1.);
Qn12 = 0.5*Qn1;
G4double cosTheta1,sinTheta1,cosTheta2,sinTheta2;
G4double cosPhi1=1.0,sinPhi1=0.0,cosPhi2=1.0,sinPhi2=0.0;
G4double us=0.0,vs=0.0,ws=1.0,wss=0.,x_coord=0.0,y_coord=0.0,z_coord=1.0;
G4double epsilon1=G4UniformRand();
G4double expn = exp(-lambdan);
if((epsilon1<expn)||insideskin)// no scattering
{noscatt=true;}
else if((epsilon1<((1.+lambdan)*expn)||(lambdan<1.)))
G4double expn = std::exp(-lambdan);
if(epsilon1<expn)// no scattering
{return;}
else if((epsilon1<((1.+lambdan)*expn))||(lambdan<1.))//single scattering (Rutherford DCS's)
{
mscatt=false;
ws=G4UniformRand();
ws= 1.-2.*scrA*ws/(1.-ws + scrA);
if(acos(ws)<sqrt(scrA))//small angle approximation for theta less than screening angle
{G4int i=0;
do{i++;
ws=1.+0.5*atomPerVolume*tPathLength*log(G4UniformRand())/llambda1;
}while((fabs(ws)>1.)&&(i<20));//i<20 to avoid time consuming during the run
if(i==19)ws=cos(sqrt(scrA));
}
G4double phi0=twopi*G4UniformRand();
us=sqrt(1.-ws*ws)*cos(phi0);
vs=sqrt(1.-ws*ws)*sin(phi0);
G4double rr=G4UniformRand();
x_coord=(rr*us);
y_coord=(rr*vs);
z_coord=((1.-rr)+rr*ws);
G4double xi=G4UniformRand();
xi= 2.*scrA*xi/(1.-xi + scrA);
if(xi<0.)xi=0.;
else if(xi>2.)xi=2.;
ws=1.-xi;
wss=std::sqrt(xi*(2.-xi));
G4double phi0=CLHEP::twopi*G4UniformRand();
us=wss*cos(phi0);
vs=wss*sin(phi0);
}
else
else // multiple scattering
{
mscatt=true;
// Ref.2 subsection 4.4 "The best solution found"
// Sample first substep scattering angle
SampleCosineTheta(0.5*lambdan,scrA,cosTheta1,sinTheta1);
phi1 = twopi*G4UniformRand();
SampleCosineTheta(lambdan12,scrA,cosTheta1,sinTheta1);
G4double phi1 = CLHEP::twopi*G4UniformRand();
cosPhi1 = cos(phi1);
sinPhi1 = sin(phi1);
// Sample second substep scattering angle
SampleCosineTheta(0.5*lambdan,scrA,cosTheta2,sinTheta2);
phi2 = twopi*G4UniformRand();
SampleCosineTheta(lambdan12,scrA,cosTheta2,sinTheta2);
G4double phi2 = CLHEP::twopi*G4UniformRand();
cosPhi2 = cos(phi2);
sinPhi2 = sin(phi2);
// Scattering direction
// Overall scattering direction
us = sinTheta2*(cosTheta1*cosPhi1*cosPhi2 - sinPhi1*sinPhi2) + cosTheta2*sinTheta1*cosPhi1;
vs = sinTheta2*(cosTheta1*sinPhi1*cosPhi2 + cosPhi1*sinPhi2) + cosTheta2*sinTheta1*sinPhi1;
ws = cosTheta1*cosTheta2 - sinTheta1*sinTheta2*cosPhi2;
G4double sqrtA=sqrt(scrA);
if(acos(ws)<sqrtA)//small angle approximation for theta less than screening angle
{
G4int i=0;
do{i++;
ws=1.+Qn12*log(G4UniformRand());
}while((fabs(ws)>1.)&&(i<20));//i<20 to avoid time consuming during the run
if(i>=19)ws=cos(sqrtA);
wss=std::sqrt((1.-ws)*(1.0+ws));
us=wss*cos(phi1);
vs=wss*sin(phi1);
}
}
G4ThreeVector oldDirection = dynParticle->GetMomentumDirection();
@@ -252,32 +265,18 @@ G4GoudsmitSaundersonMscModel::SampleScattering(const G4DynamicParticle* dynParti
newDirection.rotateUz(oldDirection);
fParticleChange->ProposeMomentumDirection(newDirection);
if((safety > tlimitminfix)&&(latDisplasment))
{
if(mscatt)
{
if(scrA<DBL_MIN)scrA=DBL_MIN;
if(llambda1<DBL_MIN)llambda1=DBL_MIN;
q1 = 2.*scrA*((1. + scrA)*log(1. + 1./scrA) - 1.);
if(q1<DBL_MIN)q1=DBL_MIN;
Gamma = 6.*scrA*(1. + scrA)*((1. + 2.*scrA)*log(1. + 1./scrA) - 2.)/q1;
Eta = atomPerVolume*tPathLength/llambda1;
delta = 0.90824829 - Eta*(0.102062073-Gamma*0.026374715);
nu = G4UniformRand();
nu = std::sqrt(nu);
nu0 = (1.0 - nu)/2.;
nu1 = nu*delta;
nu2 = nu*(1.0-delta);
x_coord=(nu1*sinTheta1*cosPhi1+nu2*sinTheta2*(cosPhi1*cosPhi2-cosTheta1*sinPhi1*sinPhi2)+nu0*us);
y_coord=(nu1*sinTheta1*sinPhi1+nu2*sinTheta2*(sinPhi1*cosPhi2+cosTheta1*cosPhi1*sinPhi2)+nu0*vs);
z_coord=(nu0+nu1*cosTheta1+nu2*cosTheta2+ nu0*ws) ;
}
if((safety > tlimitminfix)&&latDisplasment)
{
if(Qn1<0.02)// corresponding to error less than 1% in the exact formula of <z>
z_coord = 1.0 - Qn1*(0.5 - Qn1/6.);
else z_coord = (1.-std::exp(-Qn1))/Qn1;
G4double rr=std::sqrt((1.- z_coord*z_coord)/(1.-ws*ws));
x_coord = rr*us;
y_coord = rr*vs;
// displacement is computed relatively to the end point
if(!noscatt)z_coord -= 1.0;//for noscatt zcoord z_coord !=0.
G4double rr = sqrt(x_coord*x_coord+y_coord*y_coord+z_coord*z_coord);
z_coord -= 1.0;
rr = std::sqrt(x_coord*x_coord+y_coord*y_coord+z_coord*z_coord);
G4double r = rr*zPathLength;
/*
G4cout << "G4GS::SampleSecondaries: e(MeV)= " << kineticEnergy
@@ -286,12 +285,13 @@ G4GoudsmitSaundersonMscModel::SampleScattering(const G4DynamicParticle* dynParti
<< " geomStep(mm)= " << zPathLength
<< G4endl;
*/
if(tPathLength<=zPathLength)return;
if(r > tlimitminfix) {
G4ThreeVector latDirection(x_coord/rr,y_coord/rr,z_coord/rr);
latDirection.rotateUz(oldDirection);
G4ThreeVector Direction(x_coord/rr,y_coord/rr,z_coord/rr);
Direction.rotateUz(oldDirection);
ComputeDisplacement(fParticleChange, latDirection, r, safety);
ComputeDisplacement(fParticleChange, Direction, r, safety);
}
}
}
@@ -302,25 +302,23 @@ void
G4GoudsmitSaundersonMscModel::SampleCosineTheta(G4double lambdan, G4double scrA,
G4double &cost, G4double &sint)
{
G4double u,Qn1,r1,tet;
G4double xi=0.;
Qn1=2.* lambdan *scrA*((1.+scrA)*log(1.+1./scrA)-1.);
if (Qn1<0.001)xi=-0.5*Qn1*log(G4UniformRand());
else if(Qn1>0.5)xi=2.*G4UniformRand();//isotropic distribution
else
{
// procedure described by Benedito in Ref.1
if (Qn12<0.001)
{G4double r1,tet;
do{
r1=G4UniformRand();
u=GSTable->SampleTheta(lambdan,scrA,G4UniformRand());
xi = 2.*u;
tet=acos(1.-xi);
r1=G4UniformRand();
xi=-Qn12*log(G4UniformRand());
tet=acos(1.-xi);
}while(tet*r1*r1>sin(tet));
}
}
else if(Qn12>0.5)xi=2.*G4UniformRand();
else xi=2.*(GSTable->SampleTheta(lambdan,scrA,G4UniformRand()));
if(xi<0.)xi=0.;
if(xi>2.)xi=2.;
else if(xi>2.)xi=2.;
cost=(1. - xi);
sint=sqrt(xi*(2.-xi));
@@ -332,23 +330,21 @@ else
void
G4GoudsmitSaundersonMscModel::CalculateIntegrals(const G4ParticleDefinition* p,G4double Z,
G4double kinEnergy,G4double &Lam0,
G4double &Lam1)
G4double kinEnergy,G4double &Sig0,
G4double &Sig1)
{
G4double summ00=0.0;
G4double summ10=0.0;
G4double x1,x2,y1,y2,acoeff,bcoeff;
G4double kineticE = kinEnergy;
if(kineticE<lowKEnergy)kineticE=lowKEnergy;
if(kineticE>highKEnergy)kineticE=highKEnergy;
kineticE /= eV;
G4double logE=log(kineticE);
G4double logE=std::log(kineticE);
G4int iZ = G4int(Z);
if(iZ > 103) iZ = 103;
G4int enerInd=0;
for(G4int i=1;i<106;i++)
for(G4int i=0;i<105;i++)
{
if((logE>=ener[i])&&(logE<ener[i+1])){enerInd=i;break;}
}
@@ -363,14 +359,14 @@ G4GoudsmitSaundersonMscModel::CalculateIntegrals(const G4ParticleDefinition* p,G
y2=TCSE[iZ-1][enerInd+1];
acoeff=(y2-y1)/(x2*x2-x1*x1);
bcoeff=y2-acoeff*x2*x2;
summ00=acoeff*logE*logE+bcoeff;
summ00 =exp(summ00);
Sig0=acoeff*logE*logE+bcoeff;
Sig0 =std::exp(Sig0);
y1=FTCSE[iZ-1][enerInd];
y2=FTCSE[iZ-1][enerInd+1];
acoeff=(y2-y1)/(x2*x2-x1*x1);
bcoeff=y2-acoeff*x2*x2;
summ10=acoeff*logE*logE+bcoeff;
summ10 =exp(summ10);
Sig1=acoeff*logE*logE+bcoeff;
Sig1=std::exp(Sig1);
}
else //Interpolation of the form y=ax+b
{
@@ -378,12 +374,12 @@ G4GoudsmitSaundersonMscModel::CalculateIntegrals(const G4ParticleDefinition* p,G
x2=ener[105];
y1=TCSE[iZ-1][104];
y2=TCSE[iZ-1][105];
summ00=(y2-y1)*(logE-x1)/(x2-x1)+y1;
summ00 =exp(summ00);
Sig0=(y2-y1)*(logE-x1)/(x2-x1)+y1;
Sig0=std::exp(Sig0);
y1=FTCSE[iZ-1][104];
y2=FTCSE[iZ-1][105];
summ10=(y2-y1)*(logE-x1)/(x2-x1)+y1;
summ10 =exp(summ10);
Sig1=(y2-y1)*(logE-x1)/(x2-x1)+y1;
Sig1=std::exp(Sig1);
}
}
if(p==G4Positron::Positron())
@@ -396,14 +392,14 @@ G4GoudsmitSaundersonMscModel::CalculateIntegrals(const G4ParticleDefinition* p,G
y2=TCSP[iZ-1][enerInd+1];
acoeff=(y2-y1)/(x2*x2-x1*x1);
bcoeff=y2-acoeff*x2*x2;
summ00=acoeff*logE*logE+bcoeff;
summ00 =exp(summ00);
Sig0=acoeff*logE*logE+bcoeff;
Sig0 =std::exp(Sig0);
y1=FTCSP[iZ-1][enerInd];
y2=FTCSP[iZ-1][enerInd+1];
acoeff=(y2-y1)/(x2*x2-x1*x1);
bcoeff=y2-acoeff*x2*x2;
summ10=acoeff*logE*logE+bcoeff;
summ10 =exp(summ10);
Sig1=acoeff*logE*logE+bcoeff;
Sig1=std::exp(Sig1);
}
else
{
@@ -411,25 +407,22 @@ G4GoudsmitSaundersonMscModel::CalculateIntegrals(const G4ParticleDefinition* p,G
x2=ener[105];
y1=TCSP[iZ-1][104];
y2=TCSP[iZ-1][105];
summ00=(y2-y1)*(logE-x1)/(x2-x1)+y1;
summ00 =exp(summ00);
Sig0=(y2-y1)*(logE-x1)/(x2-x1)+y1;
Sig0 =std::exp(Sig0);
y1=FTCSP[iZ-1][104];
y2=FTCSP[iZ-1][105];
summ10=(y2-y1)*(logE-x1)/(x2-x1)+y1;
summ10 =exp(summ10);
Sig1=(y2-y1)*(logE-x1)/(x2-x1)+y1;
Sig1=std::exp(Sig1);
}
}
summ00 *=barn;
summ10 *=barn;
Lam0=1./((1.+1./Z)*summ00);
Lam1=1./((1.+1./Z)*summ10);
Sig0 *= barn;
Sig1 *= barn;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//t->g->t step transformations taken from Ref.6
//t->g->t step transformations taken from Ref.6
G4double
G4GoudsmitSaundersonMscModel::ComputeTruePathLengthLimit(const G4Track& track,
@@ -634,7 +627,7 @@ G4GoudsmitSaundersonMscModel::ComputeTruePathLengthLimit(const G4Track& track,
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// taken from Ref.6
G4double G4GoudsmitSaundersonMscModel::ComputeGeomPathLength(G4double)
{
par1 = -1. ;
@@ -687,13 +680,13 @@ G4double G4GoudsmitSaundersonMscModel::ComputeGeomPathLength(G4double)
// sample z
if(samplez) {
const G4double ztmax = 0.99, onethird = 1./3. ;
const G4double ztmax = 0.99;
G4double zt = zmean/tPathLength ;
if (tPathLength > stepmin && zt < ztmax) {
G4double u,cz1;
if(zt >= onethird) {
if(zt >= 0.333333333) {
G4double cz = 0.5*(3.*zt-1.)/(1.-zt) ;
cz1 = 1.+cz ;
@@ -718,7 +711,7 @@ G4double G4GoudsmitSaundersonMscModel::ComputeGeomPathLength(G4double)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// taken from Ref.6
G4double
G4GoudsmitSaundersonMscModel::ComputeTrueStepLength(G4double geomStepLength)
{
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4GoudsmitSaundersonTable.cc,v 1.4 2009/08/28 16:36:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4GoudsmitSaundersonTable.cc,v 1.8 2010/06/25 09:41:42 gunter Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -------------------------------------------------------------------
//
@@ -38,9 +38,15 @@
//
// Modifications:
// 04.03.2009 V.Ivanchenko cleanup and format according to Geant4 EM style
// 26.08.2009 O.Kadri: avoiding unuseful calculations and optimizing the root finding parameter error's
// within SampleTheta method
// 26.08.2009 O.Kadri: avoiding unuseful calculations and optimizing the root
// finding parameter error's within SampleTheta method
// 08.02.2010 O.Kadri: reduce delared variables; reduce error of finding root
// in secant method
// 26.03.2010 O.Kadri: minimum of used arrays in computation within the dichotomie
// finding method the error was the lowest value of uvalues
// 12.05.2010 O.Kadri: changing of sqrt((b-a)*(b-a)) with fabs(b-a)
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4GoudsmitSaundersonTable.hh"
@@ -199,9 +205,9 @@ G4double G4GoudsmitSaundersonTable::SampleTheta(G4double lambda, G4double Chia2,
{
//Benedito's procedure
G4double A[11],ThisPDF[320],ThisCPDF[320];
G4double PDF1[320],PDF2[320],PDF3[320],PDF4[320],CPDF1[320],CPDF2[320],CPDF3[320],CPDF4[320];
G4double coeff,Ckj,CkjPlus1,CkPlus1j,CkPlus1jPlus1,aa,b,m,F;
G4int Ind0,Ind1,Ind2,Ind3,KIndex=0,JIndex=0,IIndex=0;
G4double coeff,Ckj,CkjPlus1,CkPlus1j,CkPlus1jPlus1,a,b,m,F;
G4int Ind0,KIndex=0,JIndex=0,IIndex=0;
///////////////////////////////////////////////////////////////////////////
// Find Lambda and Chia2 Index
@@ -211,41 +217,35 @@ G4double G4GoudsmitSaundersonTable::SampleTheta(G4double lambda, G4double Chia2,
///////////////////////////////////////////////////////////////////////////
// Calculate some necessary coefficients for PDF and CPDF interpolation
coeff=(log(LAMBDAN[KIndex+1]/LAMBDAN[KIndex]))*(log(A[JIndex+1]/A[JIndex]));
Ckj=(log(LAMBDAN[KIndex+1]/lambda))*(log(A[JIndex+1]/Chia2))/coeff;
CkjPlus1=(log(LAMBDAN[KIndex+1]/lambda))*(log(Chia2/A[JIndex]))/coeff;
CkPlus1j=(log(lambda/LAMBDAN[KIndex]))*(log(A[JIndex+1]/Chia2))/coeff;
CkPlus1jPlus1=(log(lambda/LAMBDAN[KIndex]))*(log(Chia2/A[JIndex]))/coeff;
coeff=(std::log(LAMBDAN[KIndex+1]/LAMBDAN[KIndex]))*(std::log(A[JIndex+1]/A[JIndex]));
Ckj=(std::log(LAMBDAN[KIndex+1]/lambda))*(std::log(A[JIndex+1]/Chia2))/coeff;
CkjPlus1=(std::log(LAMBDAN[KIndex+1]/lambda))*(std::log(Chia2/A[JIndex]))/coeff;
CkPlus1j=(std::log(lambda/LAMBDAN[KIndex]))*(std::log(A[JIndex+1]/Chia2))/coeff;
CkPlus1jPlus1=(std::log(lambda/LAMBDAN[KIndex]))*(std::log(Chia2/A[JIndex]))/coeff;
///////////////////////////////////////////////////////////////////////////
// Calculate Interpolated PDF and CPDF arrays
Ind0=320*(11*KIndex+JIndex);
Ind1=320*(11*KIndex+JIndex+1);
Ind2=320*(11*(KIndex+1)+JIndex);
Ind3=320*(11*(KIndex+1)+JIndex+1);
for(G4int i=0 ; i<320 ;i++){
PDF1[i]=PDF[Ind0+i];PDF2[i]=PDF[Ind1+i];
PDF3[i]=PDF[Ind2+i];PDF4[i]=PDF[Ind3+i];
CPDF1[i]=CPDF[Ind0+i];CPDF2[i]=CPDF[Ind1+i];
CPDF3[i]=CPDF[Ind2+i];CPDF4[i]=CPDF[Ind3+i];
ThisPDF[i]=Ckj*PDF1[i]+CkjPlus1*PDF2[i]+CkPlus1j*PDF3[i]+CkPlus1jPlus1*PDF4[i];
ThisCPDF[i]=Ckj*CPDF1[i]+CkjPlus1*CPDF2[i]+CkPlus1j*CPDF3[i]+CkPlus1jPlus1*CPDF4[i];
ThisPDF[i]=Ckj*PDF[Ind0]+CkjPlus1*PDF[Ind0+320]+CkPlus1j*PDF[Ind0+3520]+CkPlus1jPlus1*PDF[Ind0+3840];
ThisCPDF[i]=Ckj*CPDF[Ind0]+CkjPlus1*CPDF[Ind0+320]+CkPlus1j*CPDF[Ind0+3520]+CkPlus1jPlus1*CPDF[Ind0+3840];
// Find u Index using secant method
if((i!=0)&&((rndm>=ThisCPDF[i-1])&&(rndm<ThisCPDF[i]))) {IIndex=i-1;break;}
if((i!=0)&&((rndm>=ThisCPDF[i-1])&&(rndm<ThisCPDF[i]))) {IIndex=i-1;break;}
Ind0++;
}
///////////////////////////////////////////////////////////////////////////
//CPDF^-1(rndm)=x ==> CPDF(x)=rndm;
aa=uvalues[IIndex];
a=uvalues[IIndex];
b=uvalues[IIndex+1];
do{
m=0.5*(aa+b);
m=0.5*(a+b);
F=(ThisCPDF[IIndex]+(m-uvalues[IIndex])*ThisPDF[IIndex]
+((m-uvalues[IIndex])*(m-uvalues[IIndex])*(ThisPDF[IIndex+1]-ThisPDF[IIndex]))
/(2.*(uvalues[IIndex+1]-uvalues[IIndex])))-rndm;
if(F>0.)b=m;
else aa=m;
} while(sqrt((b-aa)*(b-aa))>1.0e-6);
else a=m;
} while(std::fabs(b-a)>1.0e-9);
return m;
}
@@ -0,0 +1,659 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ICRU73QOModel.cc,v 1.5 2010/11/17 10:47:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4ICRU73QOModel
//
// Author: Alexander Bagulya
//
// Creation date: 21.05.2010
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ICRU73QOModel.hh"
#include "Randomize.hh"
#include "G4Electron.hh"
#include "G4ParticleChangeForLoss.hh"
#include "G4LossTableManager.hh"
#include "G4AntiProton.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ICRU73QOModel::G4ICRU73QOModel(const G4ParticleDefinition* p, const G4String& nam)
: G4VEmModel(nam),
particle(0),
isInitialised(false)
{
if(p) SetParticle(p);
SetHighEnergyLimit(10.0*MeV);
lowestKinEnergy = 5.0*keV;
sizeL0 = 67;
sizeL1 = 22;
sizeL2 = 14;
theElectron = G4Electron::Electron();
for (G4int i = 0; i < 100; ++i)
{
indexZ[i] = -1;
}
for(G4int i = 0; i < NQOELEM; ++i)
{
if(ZElementAvailable[i] > 0) {
indexZ[ZElementAvailable[i]] = i;
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ICRU73QOModel::~G4ICRU73QOModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple* )
{
// return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy();
return 100*keV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4ICRU73QOModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if(p != particle) SetParticle(p);
// always false before the run
SetDeexcitationFlag(false);
if(!isInitialised) {
isInitialised = true;
G4String pname = particle->GetParticleName();
fParticleChange = GetParticleChangeForLoss();
const G4MaterialTable* mtab = G4Material::GetMaterialTable();
denEffData = (*mtab)[0]->GetIonisation()->GetDensityEffectData();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::ComputeCrossSectionPerElectron(
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxKinEnergy)
{
G4double cross = 0.0;
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double maxEnergy = std::min(tmax,maxKinEnergy);
if(cutEnergy < maxEnergy) {
G4double energy = kineticEnergy + mass;
G4double energy2 = energy*energy;
G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
cross = 1.0/cutEnergy - 1.0/maxEnergy - beta2*log(maxEnergy/cutEnergy)/tmax;
cross *= CLHEP::twopi_mc2_rcl2*chargeSquare/beta2;
}
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double Z, G4double,
G4double cutEnergy,
G4double maxEnergy)
{
G4double cross = Z*ComputeCrossSectionPerElectron
(p,kineticEnergy,cutEnergy,maxEnergy);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::CrossSectionPerVolume(
const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy)
{
G4double eDensity = material->GetElectronDensity();
G4double cross = eDensity*ComputeCrossSectionPerElectron
(p,kineticEnergy,cutEnergy,maxEnergy);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::ComputeDEDXPerVolume(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy)
{
SetParticle(p);
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double tkin = kineticEnergy/massRate;
G4double dedx = 0.0;
if(tkin > lowestKinEnergy) { dedx = DEDX(material, tkin); }
else { dedx = DEDX(material, lowestKinEnergy)*sqrt(tkin/lowestKinEnergy); }
if (cutEnergy < tmax) {
G4double tau = kineticEnergy/mass;
G4double gam = tau + 1.0;
G4double bg2 = tau * (tau+2.0);
G4double beta2 = bg2/(gam*gam);
G4double x = cutEnergy/tmax;
dedx += chargeSquare*( log(x) + (1.0 - x)*beta2 ) * twopi_mc2_rcl2
* material->GetElectronDensity()/beta2;
}
if(dedx < 0.0) { dedx = 0.0; }
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::DEDX(const G4Material* material,
G4double kineticEnergy)
{
G4double eloss = 0.0;
const G4int numberOfElements = material->GetNumberOfElements();
const G4double* theAtomicNumDensityVector =
material->GetAtomicNumDensityVector();
// Bragg's rule calculation
const G4ElementVector* theElementVector =
material->GetElementVector() ;
// loop for the elements in the material
for (G4int i=0; i<numberOfElements; ++i)
{
const G4Element* element = (*theElementVector)[i] ;
eloss += DEDXPerElement(G4int(element->GetZ()), kineticEnergy)
* theAtomicNumDensityVector[i] * G4int(element->GetZ());
}
return eloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::DEDXPerElement(G4int AtomicNumber,
G4double kineticEnergy)
{
G4int Z = AtomicNumber;
if(Z > 97) { Z = 97; }
G4int nbOfShells = GetNumberOfShells(Z);
if(nbOfShells < 1) nbOfShells = 1;
G4double v = CLHEP::c_light * std::sqrt( 2.0*kineticEnergy/proton_mass_c2 );
G4double fBetheVelocity = CLHEP::fine_structure_const*CLHEP::c_light/v;
G4double tau = kineticEnergy/proton_mass_c2;
G4double gam = tau + 1.0;
G4double bg2 = tau * (tau+2.0);
G4double beta2 = bg2/(gam*gam);
G4double l0Term = 0, l1Term = 0, l2Term = 0;
for (G4int nos = 0; nos < nbOfShells; ++nos){
G4double NormalizedEnergy = (2.0*CLHEP::electron_mass_c2*beta2) /
GetShellEnergy(Z,nos);
G4double shStrength = GetShellStrength(Z,nos);
G4double l0 = GetL0(NormalizedEnergy);
l0Term += shStrength * l0;
G4double l1 = GetL1(NormalizedEnergy);
l1Term += shStrength * l1;
G4double l2 = GetL2(NormalizedEnergy);
l2Term += shStrength * l2;
}
G4double dedx = 2*CLHEP::twopi_mc2_rcl2*chargeSquare*factorBethe[Z]*
(l0Term + q*fBetheVelocity*l1Term
+ chargeSquare*fBetheVelocity*fBetheVelocity*l2Term)/beta2;
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::GetOscillatorEnergy(G4int Z,
G4int nbOfTheShell) const
{
G4int idx = denEffData->GetElementIndex(Z, kStateUndefined);
if(idx == -1) { idx = denEffData->GetElementIndex(Z-1, kStateUndefined); }
G4double PlasmaEnergy = denEffData->GetPlasmaEnergy(idx);
G4double PlasmaEnergy2 = PlasmaEnergy * PlasmaEnergy;
G4double plasmonTerm = 0.66667 * G4AtomicShells::GetNumberOfElectrons(Z,nbOfTheShell)
* PlasmaEnergy2 / (Z*Z) ;
G4double ionTerm = std::exp(0.5) * (G4AtomicShells::GetBindingEnergy(Z,nbOfTheShell)) ;
G4double ionTerm2 = ionTerm*ionTerm ;
G4double oscShellEnergy = std::sqrt( ionTerm2 + plasmonTerm );
return oscShellEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::GetL0(G4double normEnergy) const
{
G4int n;
for(n = 0; n < sizeL0; n++) {
if( normEnergy < L0[n][0] ) break;
}
if(0 == n) n = 1 ;
if(n >= sizeL0) n = sizeL0 - 1 ;
G4double l0 = L0[n][1];
G4double l0p = L0[n-1][1];
G4double bethe = l0p + (l0 - l0p) * ( normEnergy - L0[n-1][0]) /
(L0[n][0] - L0[n-1][0]);
return bethe ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::GetL1(G4double normEnergy) const
{
G4int n;
for(n = 0; n < sizeL1; n++) {
if( normEnergy < L1[n][0] ) break;
}
if(0 == n) n = 1 ;
if(n >= sizeL1) n = sizeL1 - 1 ;
G4double l1 = L1[n][1];
G4double l1p = L1[n-1][1];
G4double barkas= l1p + (l1 - l1p) * ( normEnergy - L1[n-1][0]) /
(L1[n][0] - L1[n-1][0]);
return barkas;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::GetL2(G4double normEnergy) const
{
G4int n;
for(n = 0; n < sizeL2; n++) {
if( normEnergy < L2[n][0] ) break;
}
if(0 == n) n = 1 ;
if(n >= sizeL2) n = sizeL2 - 1 ;
G4double l2 = L2[n][1];
G4double l2p = L2[n-1][1];
G4double bloch = l2p + (l2 - l2p) * ( normEnergy - L2[n-1][0]) /
(L2[n][0] - L2[n-1][0]);
return bloch;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4ICRU73QOModel::CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double&,
G4double&,
G4double)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4ICRU73QOModel::SampleSecondaries(std::vector<G4DynamicParticle*>* vdp,
const G4MaterialCutsCouple*,
const G4DynamicParticle* dp,
G4double xmin,
G4double maxEnergy)
{
G4double tmax = MaxSecondaryKinEnergy(dp);
G4double xmax = std::min(tmax, maxEnergy);
if(xmin >= xmax) return;
G4double kineticEnergy = dp->GetKineticEnergy();
G4double energy = kineticEnergy + mass;
G4double energy2 = energy*energy;
G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
G4double grej = 1.0;
G4double deltaKinEnergy, f;
G4ThreeVector direction = dp->GetMomentumDirection();
// sampling follows ...
do {
G4double q = G4UniformRand();
deltaKinEnergy = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
f = 1.0 - beta2*deltaKinEnergy/tmax;
if(f > grej) {
G4cout << "G4ICRU73QOModel::SampleSecondary Warning! "
<< "Majorant " << grej << " < "
<< f << " for e= " << deltaKinEnergy
<< G4endl;
}
} while( grej*G4UniformRand() >= f );
G4double deltaMomentum =
sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
G4double totMomentum = energy*sqrt(beta2);
G4double cost = deltaKinEnergy * (energy + electron_mass_c2) /
(deltaMomentum * totMomentum);
if(cost > 1.0) cost = 1.0;
G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
G4double phi = twopi * G4UniformRand() ;
G4ThreeVector deltaDirection(sint*cos(phi),sint*sin(phi), cost) ;
deltaDirection.rotateUz(direction);
// Change kinematics of primary particle
kineticEnergy -= deltaKinEnergy;
G4ThreeVector finalP = direction*totMomentum - deltaDirection*deltaMomentum;
finalP = finalP.unit();
fParticleChange->SetProposedKineticEnergy(kineticEnergy);
fParticleChange->SetProposedMomentumDirection(finalP);
// create G4DynamicParticle object for delta ray
G4DynamicParticle* delta = new G4DynamicParticle(theElectron,deltaDirection,
deltaKinEnergy);
vdp->push_back(delta);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4ICRU73QOModel::MaxSecondaryEnergy(const G4ParticleDefinition* pd,
G4double kinEnergy)
{
if(pd != particle) SetParticle(pd);
G4double tau = kinEnergy/mass;
G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
(1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const G4int G4ICRU73QOModel::ZElementAvailable[NQOELEM] = {1,2,4,6,7,8,10,13,14,-18,
22,26,28,29,32,36,42,47,
50,54,73,74,78,79,82,92};
const G4int G4ICRU73QOModel::nbofShellsForElement[NQOELEM] = {1,1,2,3,3,3,3,4,5,4,
5,5,5,5,6,4,6,6,
7,6,6,8,7,7,9,9};
const G4int G4ICRU73QOModel::startElemIndex[NQOELEM] = {0,1,2,4,7,10,13,16,20,25,
29,34,39,44,49,55,59,65,
71,78,84,90,98,105,112,121};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// SubShellOccupation = Z * ShellStrength
const G4double G4ICRU73QOModel::SubShellOccupation[NQODATA] =
{
1.000, // H 0
2.000, // He 1
1.930, 2.070, // Be 2-3
1.992, 1.841, 2.167, // C 4-6
1.741, 1.680, 3.579, // N 7-9
1.802, 1.849, 4.349, // O 10-12
1.788, 2.028, 6.184, // Ne 13-15
1.623, 2.147, 6.259, 2.971, // Al 16-19
1.631, 2.094, 6.588, 2.041, 1.646, // Si 20-24
1.535, 8.655, 1.706, 6.104, // Ar 25-28
1.581, 8.358, 8.183, 2.000, 1.878, // Ti 29-33
1.516, 8.325, 8.461, 6.579, 1.119, // Fe 34-38
1.422, 7.81, 8.385, 8.216, 2.167, // Ni 39-43
1.458, 8.049, 8.79, 9.695, 1.008, // Cu 44-48
1.442, 7.791, 7.837, 10.122, 2.463, 2.345, // Ge 49-54
1.645, 7.765, 19.192, 7.398, // Kr 55-58
1.313, 6.409, 19.229, 8.633, 5.036, 1.380, // Mo 59-64
1.295, 6.219, 18.751, 8.748, 10.184, 1.803, // Ag 65-70
1.277, 6.099, 20.386, 8.011, 10.007, 2.272, 1.948, // Sn 71-77
1.563, 6.312, 21.868, 5.762, 11.245, 7.250, // Xe 78-83
0.9198, 6.5408, 18.9727, 24.9149, 15.0161, 6.6284, // Ta 84-89
1.202, 5.582, 19.527, 18.741, 8.411, 14.387, 4.042, 2.108, // W 90-97
1.159, 5.467, 18.802, 33.905, 8.300, 9.342, 1.025, // Pt 98-104
1.124, 5.331, 18.078, 34.604, 8.127, 10.414, 1.322, // Au 105-111
2.000, 8.000, 18.000, 18.000, 14.000, 8.000, 10.000, 2.000, 2.000, // Pb 112-120
2.000, 8.000, 18.000, 32.000, 18.000, 8.000, 2.000, 1.000, 3.000 // U 121-129
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// ShellEnergy in eV
const G4double G4ICRU73QOModel::ShellEnergy[NQODATA] =
{
19.2, // H
41.8, // He
209.11, 21.68, // Be
486.2, 60.95, 23.43, // C
732.61, 100.646, 23.550, // N
965.1, 129.85, 31.60, // O
1525.9, 234.9, 56.18, // Ne
2701, 476.5, 150.42, 16.89, // Al
3206.1, 586.4, 186.8, 23.52, 14.91, // Si
5551.6, 472.43, 124.85, 22.332, // Ar
8554.6, 850.58, 93.47, 39.19, 19.46, // Ti
12254.7, 1279.29, 200.35, 49.19, 17.66, // Fe
14346.9, 1532.28, 262.71, 74.37, 23.03, // Ni
15438.5, 1667.96, 294.1, 70.69, 16.447, // Cu
19022.1, 2150.79, 455.79, 179.87, 57.89, 20.95, // Ge
24643, 2906.4, 366.85, 22.24, // Kr
34394, 4365.3, 589.36, 129.42, 35.59, 18.42, // Mo
43664.3, 5824.91, 909.79, 175.47, 54.89, 19.63, // Ag
49948, 6818.2, 1036.1, 172.65, 70.89, 33.87, 14.54, // Sn
58987, 8159, 1296.6, 356.75, 101.03, 16.52, // Xe
88926, 18012, 3210, 575, 108.7, 30.8, // Ta
115025.9, 17827.44, 3214.36, 750.41, 305.21, 105.50, 38.09, 21.25, // W
128342, 20254, 3601.8, 608.1, 115.0, 42.75, 17.04, // Pt
131872, 20903, 3757.4, 682.1, 105.2, 44.89, 17.575, // Au
154449, 25067, 5105.0, 987.44, 247.59, 188.1, 40.61, 19.2, 15.17, // Pb
167282, 27868, 6022.7, 1020.4, 244.81, 51.33, 13, 11.06, 14.43 // U
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Data for L0 from: Sigmund P., Haagerup U. Phys. Rev. A34 (1986) 892-910
const G4double G4ICRU73QOModel::L0[67][2] =
{
{0.00, 0.000001},
{0.10, 0.000001},
{0.12, 0.00001},
{0.14, 0.00005},
{0.16, 0.00014},
{0.18, 0.00030},
{0.20, 0.00057},
{0.25, 0.00189},
{0.30, 0.00429},
{0.35, 0.00784},
{0.40, 0.01248},
{0.45, 0.01811},
{0.50, 0.02462},
{0.60, 0.03980},
{0.70, 0.05731},
{0.80, 0.07662},
{0.90, 0.09733},
{1.00, 0.11916},
{1.20, 0.16532},
{1.40, 0.21376},
{1.60, 0.26362},
{1.80, 0.31428},
{2.00, 0.36532},
{2.50, 0.49272},
{3.00, 0.61765},
{3.50, 0.73863},
{4.00, 0.85496},
{4.50, 0.96634},
{5.00, 1.07272},
{6.00, 1.27086},
{7.00, 1.45075},
{8.00, 1.61412},
{9.00, 1.76277},
{10.00, 1.89836},
{12.00, 2.13625},
{14.00, 2.33787},
{16.00, 2.51093},
{18.00, 2.66134},
{20.00, 2.79358},
{25.00, 3.06539},
{30.00, 3.27902},
{35.00, 3.45430},
{40.00, 3.60281},
{45.00, 3.73167},
{50.00, 3.84555},
{60.00, 4.04011},
{70.00, 4.20264},
{80.00, 4.34229},
{90.00, 4.46474},
{100.00, 4.57378},
{120.00, 4.76155},
{140.00, 4.91953},
{160.00, 5.05590},
{180.00, 5.17588},
{200.00, 5.28299},
{250.00, 5.50925},
{300.00, 5.69364},
{350.00, 5.84926},
{400.00, 5.98388},
{450.00, 6.10252},
{500.00, 6.20856},
{600.00, 6.39189},
{700.00, 6.54677},
{800.00, 6.68084},
{900.00, 6.79905},
{1000.00, 6.90474}
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Data for L1 from: Mikkelsen H.H., Sigmund P. Phys. Rev. A40 (1989) 101-116
const G4double G4ICRU73QOModel::L1[22][2] =
{
{0.00, -0.000001},
{0.10, -0.00001},
{0.20, -0.00049},
{0.30, -0.00084},
{0.40, 0.00085},
{0.50, 0.00519},
{0.60, 0.01198},
{0.70, 0.02074},
{0.80, 0.03133},
{0.90, 0.04369},
{1.00, 0.06035},
{2.00, 0.24023},
{3.00, 0.44284},
{4.00, 0.62012},
{5.00, 0.77031},
{6.00, 0.90390},
{7.00, 1.02705},
{8.00, 1.10867},
{9.00, 1.17546},
{10.00, 1.21599},
{15.00, 1.24349},
{20.00, 1.16752}
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Data for L2 from: Mikkelsen H.H. Nucl. Instr. Meth. B58 (1991) 136-148
const G4double G4ICRU73QOModel::L2[14][2] =
{
{0.00, 0.000001},
{0.10, 0.00001},
{0.20, 0.00000},
{0.40, -0.00120},
{0.60, -0.00036},
{0.80, 0.00372},
{1.00, 0.01298},
{2.00, 0.08296},
{4.00, 0.21953},
{6.00, 0.23903},
{8.00, 0.20893},
{10.00, 0.10879},
{20.00, -0.88409},
{40.00, -1.13902}
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Correction obtained by V.Ivanchenko using G4BetheBlochModel
const G4double G4ICRU73QOModel::factorBethe[99] = { 1.0,
0.9637, 0.9872, 0.9469, 0.9875, 0.91, 0.989, 0.9507, 0.9773, 0.8621, 0.979, // 1 - 10
0.8357, 0.868, 0.9417, 0.9466, 0.8911, 0.905, 0.944, 0.9607, 0.928, 0.96, // 11 - 20
0.9098, 0.976, 0.8425, 0.8099, 0.7858, 0.947, 0.7248, 0.9106, 0.9246, 0.6821, // 21 - 30
0.7223, 0.9784, 0.774, 0.7953, 0.829, 0.9405, 0.8318, 0.8583, 0.8563, 0.8481, // 31 - 40
0.8207, 0.9033, 0.8063, 0.7837, 0.7818, 0.744, 0.875, 0.7693, 0.7871, 0.8459, // 41 - 50
0.8231, 0.8462, 0.853, 0.8736, 0.856, 0.8762, 0.8629, 0.8323, 0.8064, 0.7828, // 51 - 60
0.7533, 0.7273, 0.7093, 0.7157, 0.6823, 0.6612, 0.6418, 0.6395, 0.6323, 0.6221, // 61 - 70
0.6497, 0.6746, 0.8568, 0.8541, 0.6958, 0.6962, 0.7051, 0.863, 0.8588, 0.7226, // 71 - 80
0.7454, 0.78, 0.7783, 0.7996, 0.8216, 0.8632, 0.8558, 0.8792, 0.8745, 0.8676, // 81 - 90
0.8321, 0.8272, 0.7999, 0.7934, 0.7787, 0.7851, 0.7692, 0.7598};
@@ -0,0 +1,257 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4IonCoulombCrossSection.cc
//-------------------------------------------------------------------
//
// GEANT4 Class header file
//
// File name: G4IonCoulombCrossSection
//
// Author: Cristina Consolandi
//
// Creation date: 05.10.2010 from G4eCoulombScatteringModel
//
// Class Description:
// Computation of Screen-Coulomb Cross Section
// for protons, alpha and heavy Ions
//
//
// Reference:
// M.J. Boschini et al. "Nuclear and Non-Ionizing Energy-Loss
// for Coulomb Scattered Particles from Low Energy up to Relativistic
// Regime in Space Radiation Environment"
// Accepted for publication in the Proceedings of the ICATPP Conference
// on Cosmic Rays for Particle and Astroparticle Physics, Villa Olmo, 7-8
// October, 2010, to be published by World Scientific (Singapore).
//
// Available for downloading at:
// http://arxiv.org/abs/1011.4822
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4IonCoulombCrossSection.hh"
#include "Randomize.hh"
#include "G4Proton.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4IonCoulombCrossSection::G4IonCoulombCrossSection():
cosThetaMin(1.0),
cosThetaMax(-1.0),
alpha2(fine_structure_const*fine_structure_const)
{
fNistManager = G4NistManager::Instance();
theProton = G4Proton::Proton();
particle=0;
G4double p0 = electron_mass_c2*classic_electr_radius;
coeff = twopi*p0*p0;
cosTetMinNuc=0;
cosTetMaxNuc=0;
nucXSection =0;
chargeSquare = spin = mass =0;
tkinLab = momLab2 = invbetaLab2=0;
tkin = mom2 = invbeta2=0;
targetZ = targetMass = screenZ =0;
ScreenRSquare=0.;
etag = ecut = 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4IonCoulombCrossSection::~G4IonCoulombCrossSection()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4IonCoulombCrossSection::Initialise(const G4ParticleDefinition* p,
G4double CosThetaLim)
{
SetupParticle(p);
nucXSection = 0.0;
tkin = targetZ = mom2 = DBL_MIN;
ecut = etag = DBL_MAX;
particle = p;
cosThetaMin = CosThetaLim;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4IonCoulombCrossSection::SetupKinematic(G4double ekin,
G4double cut,G4int iz )
{
if(ekin != tkinLab || ecut != cut) {
// lab
tkinLab = ekin;
momLab2 = tkinLab*(tkinLab + 2.0*mass);
invbetaLab2 = 1.0 + mass*mass/momLab2;
G4double etot = tkinLab + mass;
G4double ptot = sqrt(momLab2);
G4double m12 = mass*mass;
targetMass=fNistManager->GetAtomicMassAmu(iz)*amu_c2;
G4double m2 = targetMass;
// relativistic reduced mass from publucation
// A.P. Martynenko, R.N. Faustov, Teoret. mat. Fiz. 64 (1985) 179
//incident particle & target nucleus
G4double Ecm=sqrt(m12 + m2*m2 + 2.0*etot*m2);
G4double mu_rel=mass*m2/Ecm;
G4double momCM= ptot*m2/Ecm;
// relative system
mom2 = momCM*momCM;
invbeta2 = 1.0 + mu_rel*mu_rel/mom2;
tkin = momCM*sqrt(invbeta2) - mu_rel;//Ekin of mu_rel
//.........................................................
cosTetMinNuc = cosThetaMin;
cosTetMaxNuc = cosThetaMax;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4IonCoulombCrossSection::SetupTarget(G4double Z, G4double e, G4int heavycorr)
{
if(Z != targetZ || e != etag) {
etag = e;
targetZ = Z;
G4int iz= G4int(Z);
SetScreenRSquare(iz);
screenZ =0;
screenZ = ScreenRSquare/mom2;
// G4cout<< "heavycorr "<<heavycorr<<G4endl;
if(heavycorr!=0 && particle != theProton){
G4double corr=5.*twopi*Z*std::sqrt(chargeSquare*alpha2);
corr=std::pow(corr,0.12);
screenZ *=(1.13 + corr*3.76*Z*Z*chargeSquare*invbeta2*alpha2)/2.;
// G4cout<<" heavycorr Z e corr....2As "<< heavycorr << "\t"
// <<Z <<"\t"<<e/MeV <<"\t"<<screenZ<<G4endl;
}else{ screenZ *=(1.13 + 3.76*Z*Z*chargeSquare*invbeta2*alpha2)/2.;
// G4cout<<" heavycorr Z e....2As "<< heavycorr << "\t"
// <<Z <<"\t"<< e/MeV <<"\t" <<screenZ<<G4endl;
}
if(1 == iz && particle == theProton && cosTetMaxNuc < 0.0) {
cosTetMaxNuc = 0.0;
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4IonCoulombCrossSection::SetScreenRSquare(G4int iz){
G4double a0 = electron_mass_c2/0.88534;
//target nucleus
G4double Z1=std::sqrt(chargeSquare);
G4double Z2=targetZ;
G4double Z1023=std::pow(Z1,0.23);
G4double Z2023=std::pow(Z2,0.23);
// Universal screening length
G4double x=a0*(Z1023+Z2023);
//for proton Thomas-Fermi screening length
if(particle == theProton){
x = a0*fNistManager->GetZ13(iz);
}
ScreenRSquare = alpha2*x*x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonCoulombCrossSection::NuclearCrossSection()
{
// This method needs initialisation before be called
// scattering with target nucleus
G4double fac = coeff*targetZ*targetZ*chargeSquare*invbeta2/mom2;
nucXSection = 0.0;
G4double x = 1.0 - cosTetMinNuc;
G4double x1 = x + screenZ;
// scattering with nucleus
if(cosTetMaxNuc < cosTetMinNuc) {
nucXSection =fac*(cosTetMinNuc - cosTetMaxNuc)/
(x1*(1.0 - cosTetMaxNuc + screenZ));
}
return nucXSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonCoulombCrossSection::SampleCosineTheta()
{
if(cosTetMaxNuc >= cosTetMinNuc) return 0.0;
G4double x1 = 1. - cosTetMinNuc + screenZ;
G4double x2 = 1. - cosTetMaxNuc + screenZ;
G4double dx = cosTetMinNuc - cosTetMaxNuc;
G4double grej, z1;
z1 = x1*x2/(x1 + G4UniformRand()*dx) - screenZ;
grej = 1.0/(1.0 + z1);
return z1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,259 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4IonCoulombScatteringModel.cc
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
// File name: G4IonCoulombScatteringModel
//
// Author: Cristina Consolandi
//
// Creation date: 05.10.2010 from G4eCoulombScatteringModel
// & G4CoulombScatteringModel
//
// Class Description:
// Single Scattering Model for
// for protons, alpha and heavy Ions
//
// Reference:
// M.J. Boschini et al. "Nuclear and Non-Ionizing Energy-Loss
// for Coulomb ScatteredParticles from Low Energy up to Relativistic
// Regime in Space Radiation Environment"
// Accepted for publication in the Proceedings of the ICATPP Conference
// on Cosmic Rays for Particle and Astroparticle Physics, Villa Olmo, 7-8
// October, 2010, to be published by World Scientific (Singapore).
//
// Available for downloading at:
// http://arxiv.org/abs/1011.4822
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4IonCoulombScatteringModel.hh"
#include "Randomize.hh"
//#include "G4DataVector.hh"
#include "G4ParticleChangeForGamma.hh"
#include "G4Proton.hh"
#include "G4ProductionCutsTable.hh"
#include "G4NucleiProperties.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4IonCoulombScatteringModel::G4IonCoulombScatteringModel(const G4String& nam)
: G4VEmModel(nam),
cosThetaMin(1.0),
isInitialised(false)
{
fNistManager = G4NistManager::Instance();
theParticleTable = G4ParticleTable::GetParticleTable();
theProton = G4Proton::Proton();
pCuts=0;
currentMaterial = 0;
currentElement = 0;
currentCouple = 0;
lowEnergyLimit = 100*eV;
recoilThreshold = 0.*eV;
heavycorr =0;
particle = 0;
mass=0;
ioncross = new G4IonCoulombCrossSection();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4IonCoulombScatteringModel::~G4IonCoulombScatteringModel()
{ delete ioncross;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4IonCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& )
{
SetupParticle(p);
currentCouple = 0;
cosThetaMin = cos(PolarAngleLimit());
ioncross->Initialise(p,cosThetaMin);
pCuts = G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(3);
if(!isInitialised) {
isInitialised = true;
fParticleChange = GetParticleChangeForGamma();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4IonCoulombScatteringModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kinEnergy,
G4double Z,
G4double,
G4double cutEnergy,
G4double)
{
SetupParticle(p);
G4double xsec =0.0;
if(kinEnergy < lowEnergyLimit) return xsec;
DefineMaterial(CurrentCouple());
G4int iz = G4int(Z);
//from lab to pCM & mu_rel of effective particle
ioncross->SetupKinematic(kinEnergy, cutEnergy,iz);
ioncross->SetupTarget(Z, kinEnergy, heavycorr);
xsec = ioncross->NuclearCrossSection();
//cout<< "..........xsec "<<G4BestUnit(xsec,"Surface") <<endl;
return xsec;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4IonCoulombScatteringModel::SampleSecondaries(
std::vector<G4DynamicParticle*>* fvect,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double cutEnergy,
G4double)
{
G4double kinEnergy = dp->GetKineticEnergy();
if(kinEnergy < lowEnergyLimit) return;
DefineMaterial(couple);
SetupParticle(dp->GetDefinition());
// Choose nucleus
currentElement = SelectRandomAtom(couple,particle,
kinEnergy,cutEnergy,kinEnergy);
G4double Z = currentElement->GetZ();
G4int iz = G4int(Z);
G4int ia = SelectIsotopeNumber(currentElement);
G4double m2 = G4NucleiProperties::GetNuclearMass(ia, iz);
G4double xsec= ComputeCrossSectionPerAtom(particle,kinEnergy, Z,
kinEnergy, cutEnergy, kinEnergy) ;
if(xsec == 0.0)return;
//scattering angle, z1 == (1-cost)
G4double z1 = ioncross->SampleCosineTheta();
if(z1 <= 0.0) { return; }
G4double cost = 1.0 - z1;
G4double sint = sqrt(z1*(1.0 + cost));
G4double phi = twopi * G4UniformRand();
// kinematics in the Lab system
G4double etot = kinEnergy + mass;
G4double mom2= kinEnergy*(kinEnergy+2.0*mass);
G4double ptot = sqrt(mom2);
//CM particle 1
G4double bet = ptot/(etot + m2);
G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
//CM
G4double momCM2= ioncross->GetMomentum2();
G4double momCM =std::sqrt(momCM2);
//energy & momentum after scattering of incident particle
G4double pxCM = momCM*sint*cos(phi);
G4double pyCM = momCM*sint*sin(phi);
G4double pzCM = momCM*cost;
G4double eCM = sqrt(momCM2 + mass*mass);
//CM--->Lab
G4ThreeVector v1(pxCM , pyCM, gam*(pzCM + bet*eCM));
G4ThreeVector dir = dp->GetMomentumDirection();
G4ThreeVector newDirection = v1.unit();
newDirection.rotateUz(dir);
fParticleChange->ProposeMomentumDirection(newDirection);
// recoil.......................................
G4double trec =(1.0 - cost)* m2*(etot*etot - mass*mass )/
(mass*mass + m2*m2+ 2.*m2*etot);
G4double finalT = kinEnergy - trec;
if(finalT <= lowEnergyLimit) {
trec = kinEnergy;
finalT = 0.0;
}
fParticleChange->SetProposedKineticEnergy(finalT);
G4double tcut = recoilThreshold;
if(pCuts) { tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]);
//G4cout<<" tcut eV "<<tcut/eV<<endl;
}
if(trec > tcut) {
G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz);
G4double plab = sqrt(finalT*(finalT + 2.0*mass));
G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit();
G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, trec);
fvect->push_back(newdp);
} else if(trec > 0.0) {
fParticleChange->ProposeLocalEnergyDeposit(trec);
fParticleChange->ProposeNonIonizingEnergyDeposit(trec);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IonFluctuations.cc,v 1.26 2009/03/31 13:24:40 toshito Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4IonFluctuations.cc,v 1.27 2010/10/25 19:13:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -79,7 +79,10 @@ G4IonFluctuations::G4IonFluctuations(const G4String& nam)
minFraction(0.2),
xmin(0.2),
minLoss(0.001*eV)
{}
{
kineticEnergy = 0.0;
beta2 = 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,299 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4KleinNishinaModel.cc,v 1.4 2010/11/21 16:08:37 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4KleinNishinaModel
//
// Author: Vladimir Ivanchenko on base of G4KleinNishinaCompton
//
// Creation date: 13.06.2010
//
// Modifications:
//
// Class Description:
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4KleinNishinaModel.hh"
#include "G4Electron.hh"
#include "G4Gamma.hh"
#include "Randomize.hh"
#include "G4RandomDirection.hh"
#include "G4DataVector.hh"
#include "G4ParticleChangeForGamma.hh"
#include "G4VAtomDeexcitation.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4KleinNishinaModel::G4KleinNishinaModel(const G4String& nam)
: G4VEmModel(nam),isInitialized(false)
{
theGamma = G4Gamma::Gamma();
theElectron = G4Electron::Electron();
lowestGammaEnergy = 1.0*eV;
fProbabilities.resize(9,0.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4KleinNishinaModel::~G4KleinNishinaModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4KleinNishinaModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& cuts)
{
fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
InitialiseElementSelectors(p, cuts);
if (isInitialized) { return; }
fParticleChange = GetParticleChangeForGamma();
isInitialized = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double
G4KleinNishinaModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double GammaEnergy,
G4double Z, G4double,
G4double, G4double)
{
G4double CrossSection = 0.0 ;
if ( Z < 0.9999 || GammaEnergy < 0.1*keV) { return CrossSection; }
static const G4double a = 20.0 , b = 230.0 , c = 440.0;
static const G4double
d1= 2.7965e-1*barn, d2=-1.8300e-1*barn, d3= 6.7527 *barn, d4=-1.9798e+1*barn,
e1= 1.9756e-5*barn, e2=-1.0205e-2*barn, e3=-7.3913e-2*barn, e4= 2.7079e-2*barn,
f1=-3.9178e-7*barn, f2= 6.8241e-5*barn, f3= 6.0480e-5*barn, f4= 3.0274e-4*barn;
G4double p1Z = Z*(d1 + e1*Z + f1*Z*Z), p2Z = Z*(d2 + e2*Z + f2*Z*Z),
p3Z = Z*(d3 + e3*Z + f3*Z*Z), p4Z = Z*(d4 + e4*Z + f4*Z*Z);
G4double T0 = 15.0*keV;
if (Z < 1.5) { T0 = 40.0*keV; }
G4double X = max(GammaEnergy, T0) / electron_mass_c2;
CrossSection = p1Z*std::log(1.+2.*X)/X
+ (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
// modification for low energy. (special case for Hydrogen)
if (GammaEnergy < T0) {
G4double dT0 = keV;
X = (T0+dT0) / electron_mass_c2 ;
G4double sigma = p1Z*log(1.+2*X)/X
+ (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
G4double c1 = -T0*(sigma-CrossSection)/(CrossSection*dT0);
G4double c2 = 0.150;
if (Z > 1.5) { c2 = 0.375-0.0556*log(Z); }
G4double y = log(GammaEnergy/T0);
CrossSection *= exp(-y*(c1+c2*y));
}
// G4cout << "e= " << GammaEnergy << " Z= " << Z
// << " cross= " << CrossSection << G4endl;
return CrossSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4KleinNishinaModel::SampleSecondaries(
std::vector<G4DynamicParticle*>* fvect,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* aDynamicGamma,
G4double,
G4double)
{
G4double energy = aDynamicGamma->GetKineticEnergy();
G4ThreeVector direction = aDynamicGamma->GetMomentumDirection();
// select atom
const G4Element* elm = SelectRandomAtom(couple, theGamma, energy);
// select shell first
G4int Z = (G4int)elm->GetZ();
G4int nShells = elm->GetNbOfAtomicShells();
if(nShells > (G4int)fProbabilities.size()) { fProbabilities.resize(nShells); }
G4double totprob = 0.0;
G4int i = 0;
for(; i<nShells; ++i) {
G4double prob = 0.0;
if(energy > elm->GetAtomicShell(i)) {
prob = (G4double)elm->GetNbOfShellElectrons(i);
}
totprob += prob;
fProbabilities[i] = totprob;
}
if(totprob == 0.0) { return; }
G4LorentzVector lv1, lv2, lv3;
G4LorentzVector lv0(energy*direction.x(),energy*direction.y(),
energy*direction.z(),energy);
G4double eKinEnergy = 0.0;
G4double gamEnergy1 = 0.0;
// Loop on sampling
G4double bindingEnergy;
do {
G4double xprob = totprob*G4UniformRand();
for(i=0; i<nShells; ++i) { if(xprob <= fProbabilities[i]) {break;} }
if( i == nShells ) { return; }
bindingEnergy = elm->GetAtomicShell(i);
G4double tkin = bindingEnergy*0.5;
G4double eEnergy = tkin + electron_mass_c2;
G4double eTotMomentum = sqrt(tkin*(tkin + electron_mass_c2*2));
G4ThreeVector eDir = G4RandomDirection();
lv1 = lv0;
lv2.set(eTotMomentum*eDir.x(),eTotMomentum*eDir.y(),
eTotMomentum*eDir.z(),eEnergy);
G4ThreeVector bst = lv2.boostVector();
lv1.boost(-bst);
// In the rest frame of an electron
// The scattered gamma energy is sampled according to Klein - Nishina formula.
// The random number techniques of Butcher & Messel are used
// (Nuc Phys 20(1960),15).
G4double gamEnergy0 = lv1.e();
G4double E0_m = gamEnergy0 / electron_mass_c2 ;
G4ThreeVector gamDirection0 = (lv1.vect()).unit();
//
// sample the energy rate of the scattered gamma
//
G4double epsilon, epsilonsq, onecost, sint2, greject ;
G4double epsilon0 = 1./(1. + 2.*E0_m);
G4double epsilon0sq = epsilon0*epsilon0;
G4double alpha1 = - log(epsilon0);
G4double alpha2 = 0.5*(1.- epsilon0sq);
do {
if ( alpha1/(alpha1+alpha2) > G4UniformRand() ) {
epsilon = exp(-alpha1*G4UniformRand()); // epsilon0**r
epsilonsq = epsilon*epsilon;
} else {
epsilonsq = epsilon0sq + (1.- epsilon0sq)*G4UniformRand();
epsilon = sqrt(epsilonsq);
};
onecost = (1.- epsilon)/(epsilon*E0_m);
sint2 = onecost*(2.-onecost);
greject = 1. - epsilon*sint2/(1.+ epsilonsq);
} while (greject < G4UniformRand());
//
// scattered gamma angles. ( Z - axis along the parent gamma)
//
G4double cosTeta = 1. - onecost;
G4double sinTeta = sqrt (sint2);
G4double Phi = twopi * G4UniformRand();
G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
//
// update G4VParticleChange for the scattered gamma
//
G4ThreeVector gamDirection1 ( dirx,diry,dirz );
gamDirection1.rotateUz(gamDirection0);
gamEnergy1 = epsilon*gamEnergy0;
// before scattering
lv2.set(0.0,0.0,0.0,electron_mass_c2);
lv2 += lv1;
// after scattering
lv1.set(gamEnergy1*gamDirection1.x(),gamEnergy1*gamDirection1.y(),
gamEnergy1*gamDirection1.z(),gamEnergy1);
lv2 -= lv1;
lv2.boost(bst);
lv1.boost(bst);
eKinEnergy = lv2.e() - electron_mass_c2 - bindingEnergy;
} while ( eKinEnergy < 0.0 );
// gamma kinematics
gamEnergy1 = lv1.e();
G4double edep = bindingEnergy;
if(gamEnergy1 > lowestGammaEnergy) {
fParticleChange->SetProposedKineticEnergy(gamEnergy1);
fParticleChange->ProposeMomentumDirection((lv1.vect()).unit());
} else {
fParticleChange->ProposeTrackStatus(fStopAndKill);
fParticleChange->SetProposedKineticEnergy(0.0);
edep += gamEnergy1;
}
//
// kinematic of the scattered electron
//
if(eKinEnergy > DBL_MIN) {
G4ThreeVector eDirection = (lv2.vect()).unit();
G4DynamicParticle* dp = new G4DynamicParticle(theElectron,eDirection,eKinEnergy);
fvect->push_back(dp);
}
// sample deexcitation
//
if(fAtomDeexcitation) {
G4int index = couple->GetIndex();
if(fAtomDeexcitation->CheckDeexcitationActiveRegion(index)) {
G4AtomicShellEnumerator as = G4AtomicShellEnumerator(i);
const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);
size_t nbefore = fvect->size();
fAtomDeexcitation->GenerateParticles(fvect, shell, Z, index);
size_t nafter = fvect->size();
if(nafter > nbefore) {
for (size_t i=nbefore; i<nafter; ++i) {
edep -= ((*fvect)[i])->GetKineticEnergy();
}
}
}
}
// energy balance
fParticleChange->ProposeLocalEnergyDeposit(edep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,102 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ModifiedTsai.cc,v 1.1 2010/10/14 15:17:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4ModifiedTsai
//
// Author: Andreia Trindade (andreia@lip.pt)
// Pedro Rodrigues (psilva@lip.pt)
// Luis Peralta (luis@lip.pt)
//
// Creation date: 21 March 2003
//
// Modifications:
// 21 Mar 2003 A.Trindade First implementation acording with new design
// 24 Mar 2003 A.Trindade Fix in Tsai generator in order to prevent theta
// generation above pi
// 13 Oct 2010 V.Ivanchenko Moved to standard and improved comment
//
// Class Description:
//
// Bremsstrahlung Angular Distribution Generation
// suggested by L.Urban (Geant3 manual (1993) Phys211)
// Derived from Tsai distribution (Rev Mod Phys 49,421(1977))
//
// Class Description: End
//
// -------------------------------------------------------------------
//
#include "G4ModifiedTsai.hh"
#include "Randomize.hh"
G4ModifiedTsai::G4ModifiedTsai(const G4String&)
: G4VBremAngularDistribution("AngularGenUrban")
{}
G4ModifiedTsai::~G4ModifiedTsai()
{}
G4double G4ModifiedTsai::PolarAngle(const G4double initial_energy,
const G4double, // final_energy
const G4int ) // Z
{
// Sample gamma angle (Z - axis along the parent particle).
// Universal distribution suggested by L. Urban (Geant3 manual (1993)
// Phys211) derived from Tsai distribution (Rev Mod Phys 49,421(1977))
G4double totalEnergy = initial_energy + electron_mass_c2;
const G4double a1 = 0.625, a2 = 3.*a1, d = 27.;
G4double u, theta = 0;
do{
u = - std::log(G4UniformRand()*G4UniformRand());
if (9./(9.+d) > G4UniformRand()) { u /= a1; }
else { u /= a2; }
theta = u*electron_mass_c2/totalEnergy;
} while(u*electron_mass_c2 > totalEnergy*pi);
return theta;
}
void G4ModifiedTsai::PrintGeneratorInformation() const
{
G4cout << "\n" << G4endl;
G4cout << "Bremsstrahlung Angular Generator is Modified Tsai" << G4endl;
G4cout << "Distribution suggested by L.Urban (Geant3 manual (1993) Phys211)"
<< G4endl;
G4cout << "Derived from Tsai distribution (Rev Mod Phys 49,421(1977)) \n"
<< G4endl;
}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MollerBhabhaModel.cc,v 1.35 2009/11/09 19:16:13 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4MollerBhabhaModel.cc,v 1.38 2010/04/06 17:10:16 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -------------------------------------------------------------------
//
@@ -91,11 +91,13 @@ G4MollerBhabhaModel::~G4MollerBhabhaModel()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MollerBhabhaModel::MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple* couple)
const G4MaterialCutsCouple* /*couple*/)
{
G4double electronDensity = couple->GetMaterial()->GetElectronDensity();
G4double Zeff = electronDensity/couple->GetMaterial()->GetTotNbOfAtomsPerVolume();
return 0.25*sqrt(Zeff)*keV;
// G4double electronDensity = couple->GetMaterial()->GetElectronDensity();
//G4double Zeff = electronDensity/couple->GetMaterial()->GetTotNbOfAtomsPerVolume();
//return 0.25*sqrt(Zeff)*keV;
//return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy();
return 0.1*keV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,730 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MscModel71.cc,v 1.8 2009/11/01 13:05:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4MscModel71
//
// Author: Laszlo Urban
//
// Creation date: 03.03.2001
//
// Modifications:
//
// 27-03-03 Move model part from G4MultipleScattering (V.Ivanchenko)
// 23-05-03 important change in angle distribution for muons/hadrons
// the central part now is similar to the Highland parametrization +
// minor correction in angle sampling algorithm (for all particles)
// (L.Urban)
// 30-05-03 misprint in SampleCosineTheta corrected(L.Urban)
// 27-03-03 Rename (V.Ivanchenko)
// 05-08-03 angle distribution has been modified (L.Urban)
// 06-11-03 precision problems solved for high energy (PeV) particles
// change in the tail of the angular distribution
// highKinEnergy is set to 100 PeV (L.Urban)
//
// 10-11-03 highKinEnergy is set back to 100 TeV, some tail tuning +
// cleaning (L.Urban)
// 26-11-03 correction in TrueStepLength :
// trueLength <= currentRange (L.Urban)
// 01-03-04 signature changed in SampleCosineTheta,
// energy dependence calculations has been simplified,
// 11-03-04 corrections in GeomPathLength,TrueStepLength,
// SampleCosineTheta
// 23-04-04 true -> geom and geom -> true transformation has been
// rewritten, changes in the angular distribution (L.Urban)
// 19-07-04 correction in SampleCosineTheta in order to avoid
// num. precision problems at high energy/small step(L.Urban)
// 17-08-04 changes in the angle distribution (slightly modified
// Highland formula for the width of the central part,
// changes in the numerical values of some other parameters)
// ---> approximately step independent distribution (L.Urban)
// 21-09-04 change in the tail of the angular distribution (L.Urban)
//
// 03-11-04 precision problem for very high energy ions and small stepsize
// solved in SampleCosineTheta (L.Urban).
// 15-04-05 optimize internal interface - add SampleSecondaries method (V.Ivanchenko)
// 03-10-05 Model is freezed with the name McsModel71 (V.Ivanchenko)
// 17-02-06 Save table of transport cross sections not mfp (V.Ivanchenko)
//
// Class Description:
//
// Implementation of the model of multiple scattering based on
// H.W.Lewis Phys Rev 78 (1950) 526 and others
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4MscModel71.hh"
#include "Randomize.hh"
#include "G4Electron.hh"
#include "G4LossTableManager.hh"
#include "G4PhysicsTable.hh"
#include "G4ParticleChangeForMSC.hh"
#include "G4TransportationManager.hh"
#include "G4Navigator.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4MscModel71::G4MscModel71(G4double& m_dtrl, G4double& m_NuclCorrPar,
G4double& m_FactPar, G4double& m_factail,
G4bool& m_samplez, const G4String& nam)
: G4VEmModel(nam),
taubig(8.0),
tausmall(1.e-20),
taulim(1.e-6),
dtrl(m_dtrl),
NuclCorrPar (m_NuclCorrPar),
FactPar(m_FactPar),
factail(m_factail),
samplez(m_samplez),
isInitialized(false)
{
stepmin = 1.e-6*mm;
currentRange = 0.;
G4cout << G4endl;
G4cout << "!!! G4MscModel71 class is obsolete and will be removed for the next major Geant4 release !!!" << G4endl;
G4cout << "!!! Please use other models (G4UrbanMscModel90, 92, 93) !!!" << G4endl;
G4cout << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MscModel71::~G4MscModel71()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MscModel71::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if(isInitialized) return;
// set values of some data members
sigmafactor = twopi*classic_electr_radius*classic_electr_radius;
particle = p;
mass = particle->GetPDGMass();
charge = particle->GetPDGCharge()/eplus;
b = 1. ;
xsi = 3.00 ;
if(pParticleChange)
fParticleChange = static_cast<G4ParticleChangeForMSC*>(pParticleChange);
else
fParticleChange = new G4ParticleChangeForMSC();
navigator = G4TransportationManager::GetTransportationManager()
->GetNavigatorForTracking();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MscModel71::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* part,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicWeight,
G4double,
G4double)
{
const G4double epsfactor = 2.*electron_mass_c2*electron_mass_c2*
Bohr_radius*Bohr_radius/(hbarc*hbarc);
const G4double epsmin = 1.e-4 , epsmax = 1.e10;
const G4double Zdat[15] = { 4., 6.,13.,20.,26.,29.,32.,38.,47.,
50.,56.,64.,74.,79.,82. };
const G4double Tdat[23] = {0.0001*MeV,0.0002*MeV,0.0004*MeV,0.0007*MeV,
0.001*MeV,0.002*MeV,0.004*MeV,0.007*MeV,
0.01*MeV,0.02*MeV,0.04*MeV,0.07*MeV,
0.1*MeV,0.2*MeV,0.4*MeV,0.7*MeV,
1.*MeV,2.*MeV,4.*MeV,7.*MeV,10.*MeV,20.*MeV,
10000.0*MeV};
// corr. factors for e-/e+ lambda
G4double celectron[15][23] =
{{1.125,1.072,1.051,1.047,1.047,1.050,1.052,1.054,
1.054,1.057,1.062,1.069,1.075,1.090,1.105,1.111,
1.112,1.108,1.100,1.093,1.089,1.087,0.7235 },
{1.408,1.246,1.143,1.096,1.077,1.059,1.053,1.051,
1.052,1.053,1.058,1.065,1.072,1.087,1.101,1.108,
1.109,1.105,1.097,1.090,1.086,1.082,0.7925 },
{2.833,2.268,1.861,1.612,1.486,1.309,1.204,1.156,
1.136,1.114,1.106,1.106,1.109,1.119,1.129,1.132,
1.131,1.124,1.113,1.104,1.099,1.098,0.9147 },
{3.879,3.016,2.380,2.007,1.818,1.535,1.340,1.236,
1.190,1.133,1.107,1.099,1.098,1.103,1.110,1.113,
1.112,1.105,1.096,1.089,1.085,1.098,0.9700 },
{6.937,4.330,2.886,2.256,1.987,1.628,1.395,1.265,
1.203,1.122,1.080,1.065,1.061,1.063,1.070,1.073,
1.073,1.070,1.064,1.059,1.056,1.056,1.0022 },
{9.616,5.708,3.424,2.551,2.204,1.762,1.485,1.330,
1.256,1.155,1.099,1.077,1.070,1.068,1.072,1.074,
1.074,1.070,1.063,1.059,1.056,1.052,1.0158 },
{11.72,6.364,3.811,2.806,2.401,1.884,1.564,1.386,
1.300,1.180,1.112,1.082,1.073,1.066,1.068,1.069,
1.068,1.064,1.059,1.054,1.051,1.050,1.0284 },
{18.08,8.601,4.569,3.183,2.662,2.025,1.646,1.439,
1.339,1.195,1.108,1.068,1.053,1.040,1.039,1.039,
1.039,1.037,1.034,1.031,1.030,1.036,1.0515 },
{18.22,10.48,5.333,3.713,3.115,2.367,1.898,1.631,
1.498,1.301,1.171,1.105,1.077,1.048,1.036,1.033,
1.031,1.028,1.024,1.022,1.021,1.024,1.0834 },
{14.14,10.65,5.710,3.929,3.266,2.453,1.951,1.669,
1.528,1.319,1.178,1.106,1.075,1.040,1.027,1.022,
1.020,1.017,1.015,1.013,1.013,1.020,1.0937 },
{14.11,11.73,6.312,4.240,3.478,2.566,2.022,1.720,
1.569,1.342,1.186,1.102,1.065,1.022,1.003,0.997,
0.995,0.993,0.993,0.993,0.993,1.011,1.1140 },
{22.76,20.01,8.835,5.287,4.144,2.901,2.219,1.855,
1.677,1.410,1.224,1.121,1.073,1.014,0.986,0.976,
0.974,0.972,0.973,0.974,0.975,0.987,1.1410 },
{50.77,40.85,14.13,7.184,5.284,3.435,2.520,2.059,
1.837,1.512,1.283,1.153,1.091,1.010,0.969,0.954,
0.950,0.947,0.949,0.952,0.954,0.963,1.1750 },
{65.87,59.06,15.87,7.570,5.567,3.650,2.682,2.182,
1.939,1.579,1.325,1.178,1.108,1.014,0.965,0.947,
0.941,0.938,0.940,0.944,0.946,0.954,1.1922 },
{55.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239,
1.985,1.609,1.343,1.188,1.113,1.013,0.960,0.939,
0.933,0.930,0.933,0.936,0.939,0.949,1.2026 }};
G4double cpositron[15][23] = {
{2.589,2.044,1.658,1.446,1.347,1.217,1.144,1.110,
1.097,1.083,1.080,1.086,1.092,1.108,1.123,1.131,
1.131,1.126,1.117,1.108,1.103,1.100,0.7235 },
{3.904,2.794,2.079,1.710,1.543,1.325,1.202,1.145,
1.122,1.096,1.089,1.092,1.098,1.114,1.130,1.137,
1.138,1.132,1.122,1.113,1.108,1.102,0.7925 },
{7.970,6.080,4.442,3.398,2.872,2.127,1.672,1.451,
1.357,1.246,1.194,1.179,1.178,1.188,1.201,1.205,
1.203,1.190,1.173,1.159,1.151,1.145,0.9147 },
{9.714,7.607,5.747,4.493,3.815,2.777,2.079,1.715,
1.553,1.353,1.253,1.219,1.211,1.214,1.225,1.228,
1.225,1.210,1.191,1.175,1.166,1.174,0.9700 },
{17.97,12.95,8.628,6.065,4.849,3.222,2.275,1.820,
1.624,1.382,1.259,1.214,1.202,1.202,1.214,1.219,
1.217,1.203,1.184,1.169,1.160,1.151,1.0022 },
{24.83,17.06,10.84,7.355,5.767,3.707,2.546,1.996,
1.759,1.465,1.311,1.252,1.234,1.228,1.238,1.241,
1.237,1.222,1.201,1.184,1.174,1.159,1.0158 },
{23.26,17.15,11.52,8.049,6.375,4.114,2.792,2.155,
1.880,1.535,1.353,1.281,1.258,1.247,1.254,1.256,
1.252,1.234,1.212,1.194,1.183,1.170,1.0284 },
{22.33,18.01,12.86,9.212,7.336,4.702,3.117,2.348,
2.015,1.602,1.385,1.297,1.268,1.251,1.256,1.258,
1.254,1.237,1.214,1.195,1.185,1.179,1.0515 },
{33.91,24.13,15.71,10.80,8.507,5.467,3.692,2.808,
2.407,1.873,1.564,1.425,1.374,1.330,1.324,1.320,
1.312,1.288,1.258,1.235,1.221,1.205,1.0834 },
{32.14,24.11,16.30,11.40,9.015,5.782,3.868,2.917,
2.490,1.925,1.596,1.447,1.391,1.342,1.332,1.327,
1.320,1.294,1.264,1.240,1.226,1.214,1.0937 },
{29.51,24.07,17.19,12.28,9.766,6.238,4.112,3.066,
2.602,1.995,1.641,1.477,1.414,1.356,1.342,1.336,
1.328,1.302,1.270,1.245,1.231,1.233,1.1140 },
{38.19,30.85,21.76,15.35,12.07,7.521,4.812,3.498,
2.926,2.188,1.763,1.563,1.484,1.405,1.382,1.371,
1.361,1.330,1.294,1.267,1.251,1.239,1.1410 },
{49.71,39.80,27.96,19.63,15.36,9.407,5.863,4.155,
3.417,2.478,1.944,1.692,1.589,1.480,1.441,1.423,
1.409,1.372,1.330,1.298,1.280,1.258,1.1750 },
{59.25,45.08,30.36,20.83,16.15,9.834,6.166,4.407,
3.641,2.648,2.064,1.779,1.661,1.531,1.482,1.459,
1.442,1.400,1.354,1.319,1.299,1.272,1.1922 },
{56.38,44.29,30.50,21.18,16.51,10.11,6.354,4.542,
3.752,2.724,2.116,1.817,1.692,1.554,1.499,1.474,
1.456,1.412,1.364,1.328,1.307,1.282,1.2026 }};
G4double sigma;
if (part != particle ) {
particle = part;
mass = particle->GetPDGMass();
charge = particle->GetPDGCharge()/eplus;
}
G4double Z23 = 2.*log(AtomicNumber)/3.; Z23 = exp(Z23);
// correction if particle .ne. e-/e+
// compute equivalent kinetic energy
// lambda depends on p*beta ....
G4double eKineticEnergy = KineticEnergy;
if((particle->GetParticleName() != "e-") &&
(particle->GetParticleName() != "e+") )
{
G4double TAU = KineticEnergy/mass ;
G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ;
G4double w = c-2. ;
G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ;
eKineticEnergy = electron_mass_c2*tau ;
}
G4double ChargeSquare = charge*charge;
G4double eTotalEnergy = eKineticEnergy + electron_mass_c2 ;
G4double beta2 = eKineticEnergy*(eTotalEnergy+electron_mass_c2)
/(eTotalEnergy*eTotalEnergy);
G4double bg2 = eKineticEnergy*(eTotalEnergy+electron_mass_c2)
/(electron_mass_c2*electron_mass_c2);
G4double eps = epsfactor*bg2/Z23;
if (eps<epsmin) sigma = 2.*eps*eps;
else if(eps<epsmax) sigma = log(1.+2.*eps)-2.*eps/(1.+2.*eps);
else sigma = log(2.*eps)-1.+1./eps;
sigma *= ChargeSquare*AtomicNumber*AtomicNumber/(beta2*bg2);
// nuclear size effect correction for high energy
// ( a simple approximation at present)
G4double corrnuclsize,a,w1,w2,w;
G4double x0 = 1. - NuclCorrPar*mass/(KineticEnergy*
exp(log(AtomicWeight/(g/mole))/3.));
if ( x0 < -1. || eKineticEnergy <= 10.*MeV)
{
x0 = -1.;
corrnuclsize = 1.;
}
else
{
a = 1.+1./eps;
if (eps > epsmax) w1=log(2.*eps)+1./eps-3./(8.*eps*eps);
else w1=log((a+1.)/(a-1.))-2./(a+1.);
w = 1./((1.-x0)*eps);
if (w < epsmin) w2=-log(w)-1.+2.*w-1.5*w*w;
else w2 = log((a-x0)/(a-1.))-(1.-x0)/(a-x0);
corrnuclsize = w1/w2;
corrnuclsize = exp(-FactPar*mass/KineticEnergy)*
(corrnuclsize-1.)+1.;
}
// interpolate in AtomicNumber and beta2
// get bin number in Z
G4int iZ = 14;
while ((iZ>=0)&&(Zdat[iZ]>=AtomicNumber)) iZ -= 1;
if (iZ==14) iZ = 13;
if (iZ==-1) iZ = 0 ;
G4double Z1 = Zdat[iZ];
G4double Z2 = Zdat[iZ+1];
G4double ratZ = (AtomicNumber-Z1)/(Z2-Z1);
// get bin number in T (beta2)
G4int iT = 22;
while ((iT>=0)&&(Tdat[iT]>=eKineticEnergy)) iT -= 1;
if(iT==22) iT = 21;
if(iT==-1) iT = 0 ;
// calculate betasquare values
G4double T = Tdat[iT], E = T + electron_mass_c2;
G4double b2small = T*(E+electron_mass_c2)/(E*E);
T = Tdat[iT+1]; E = T + electron_mass_c2;
G4double b2big = T*(E+electron_mass_c2)/(E*E);
G4double ratb2 = (beta2-b2small)/(b2big-b2small);
G4double c1,c2,cc1,cc2,corr;
if (charge < 0.)
{
c1 = celectron[iZ][iT];
c2 = celectron[iZ+1][iT];
cc1 = c1+ratZ*(c2-c1);
c1 = celectron[iZ][iT+1];
c2 = celectron[iZ+1][iT+1];
cc2 = c1+ratZ*(c2-c1);
corr = cc1+ratb2*(cc2-cc1);
sigma /= corr;
}
if (charge > 0.)
{
c1 = cpositron[iZ][iT];
c2 = cpositron[iZ+1][iT];
cc1 = c1+ratZ*(c2-c1);
c1 = cpositron[iZ][iT+1];
c2 = cpositron[iZ+1][iT+1];
cc2 = c1+ratZ*(c2-c1);
corr = cc1+ratb2*(cc2-cc1);
sigma /= corr;
}
sigma *= sigmafactor;
// nucl. size correction for particles other than e+/e- only at present !!!!
if((particle->GetParticleName() != "e-") &&
(particle->GetParticleName() != "e+") )
sigma /= corrnuclsize;
// G4cout << "e= " << KineticEnergy << " sigma= " << sigma << G4endl;
return sigma;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MscModel71::GeomPathLength(
G4PhysicsTable* theLambdaTable,
const G4MaterialCutsCouple* couple,
const G4ParticleDefinition* theParticle,
G4double& T0,
G4double lambda,
G4double range,
G4double truePathLength)
{
// do the true -> geom transformation
const G4double ztmax = 101./103. ;
if (theParticle != particle ) {
particle = theParticle;
mass = particle->GetPDGMass();
charge = particle->GetPDGCharge()/eplus;
}
currentKinEnergy = T0;
currentRange = range ;
currentRadLength = couple->GetMaterial()->GetRadlen();
lambda0 = lambda;
par1 = -1. ;
par2 = par3 = 0. ;
tPathLength = truePathLength;
// this correction needed to run MSC with eIoni and eBrem inactivated
// and makes no harm for a normal run
if(tPathLength > range)
tPathLength = range ;
G4double tau = tPathLength/lambda0 ;
if (tau <= tausmall) return tPathLength;
G4double zmean = tPathLength;
if (tPathLength < range*dtrl) {
zmean = lambda0*(1.-exp(-tau));
if(tau < taulim) zmean = tPathLength*(1.-0.5*tPathLength/lambda0) ;
} else if(T0 < mass) {
par1 = 1./range ;
par2 = 1./(par1*lambda0) ;
par3 = 1.+par2 ;
zmean = (1.-exp(par3*log(1.-tPathLength/range)))/(par1*par3) ;
} else {
G4LossTableManager* theManager = G4LossTableManager::Instance();
G4double T1 = theManager->GetEnergy(particle,range-tPathLength,couple);
G4double lambda1 ;
if (theLambdaTable) {
G4bool bb;
lambda1 = ((*theLambdaTable)[couple->GetIndex()])->GetValue(T1,bb);
} else {
lambda1 = CrossSection(couple,particle,T1,0.0,1.0);
}
lambda1 = 1.0/lambda1;
par1 = (lambda0-lambda1)/(lambda0*tPathLength) ;
par2 = 1./(par1*lambda0) ;
par3 = 1.+par2 ;
zmean = (1.-exp(par3*log(lambda1/lambda0)))/(par1*par3) ;
}
// sample z
G4double zPathLength = zmean ;
G4double zt = zmean/tPathLength ;
if (tPathLength >= stepmin && samplez && zt > 0.5 && zt < ztmax)
{
G4double cz = 0.5*(3.*zt-1.)/(1.-zt) ;
G4double cz1 = 1.+cz ;
G4double u0 = cz/cz1 ;
G4double u,grej ;
do {
u = exp(log(G4UniformRand())/cz1) ;
grej = exp(cz*log(u/u0))*(1.-u)/(1.-u0) ;
} while (grej < G4UniformRand()) ;
zPathLength = tPathLength*u ;
}
return zPathLength ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MscModel71::TrueStepLength(G4double geomStepLength)
{
G4double trueLength = geomStepLength;
trueLength = geomStepLength;
if(geomStepLength > lambda0*tausmall)
{
if(par1 < 0.)
trueLength = -lambda0*log(1.-geomStepLength/lambda0) ;
else
{
if(par1*par3*geomStepLength < 1.)
trueLength = (1.-exp(log(1.-par1*par3*geomStepLength)/par3))/par1 ;
else
trueLength = currentRange ;
}
}
if(trueLength > tPathLength) trueLength = tPathLength;
if(trueLength > currentRange) trueLength = currentRange ;
if(trueLength < geomStepLength) trueLength = geomStepLength;
return trueLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MscModel71::SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle* dynParticle,
G4double truestep,
G4double safety)
{
G4double kineticEnergy = dynParticle->GetKineticEnergy();
if(kineticEnergy <= 0.0) return;
G4double cth = SampleCosineTheta(truestep,kineticEnergy);
G4double sth = sqrt((1.0 - cth)*(1.0 + cth));
G4double phi = twopi*G4UniformRand();
G4double dirx = sth*cos(phi);
G4double diry = sth*sin(phi);
G4ThreeVector oldDirection = dynParticle->GetMomentumDirection();
G4ThreeVector newDirection(dirx,diry,cth);
newDirection.rotateUz(oldDirection);
fParticleChange->ProposeMomentumDirection(newDirection);
/*
const G4ParticleDefinition* pd = dynParticle->GetDefinition();
G4cout << "G4MscModel71: Sample secondary; E(MeV)= " << kineticEnergy/MeV
<< " MeV; step(mm)= " << truestep/mm
<< ", safety(mm)= " << safety/mm << " " << pd->GetParticleName()
<< G4endl;
*/
if (latDisplasment && safety > 0.0) {
G4double r = SampleDisplacement();
if (r > safety) r = safety;
// sample direction of lateral displacement
G4double phi = twopi*G4UniformRand();
G4double dirx = std::cos(phi);
G4double diry = std::sin(phi);
G4ThreeVector newPosition(dirx,diry,0.0);
newPosition.rotateUz(oldDirection);
// compute new endpoint of the Step
newPosition *= r;
newPosition += *(fParticleChange->GetProposedPosition());
navigator->LocateGlobalPointWithinVolume(newPosition);
fParticleChange->ProposePosition(newPosition);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MscModel71::SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy)
{
G4double cth = 1. ;
G4double tau = trueStepLength/lambda0 ;
if(trueStepLength >= currentRange*dtrl) {
if(par1*trueStepLength < 1.)
tau = -par2*log(1.-par1*trueStepLength) ;
else
tau = taubig ;
}
currentTau = tau ;
if(trueStepLength < stepmin)
cth = exp(-tau) ;
else
{
if (tau >= taubig) cth = -1.+2.*G4UniformRand();
else if (tau >= tausmall)
{
G4double a ;
// for all particles take the width of the central part
// from a parametrization similar to the Highland formula
// ( Highland formula: Particle Physics Booklet, July 2002, eq. 26.10)
// here : theta0 = 13.6*MeV*Q*(t/X0)**0.555/(beta*cp)
const G4double c_highland = 13.6*MeV, corr_highland=0.555 ;
G4double Q = std::abs(charge) ;
G4double xx0 = trueStepLength/currentRadLength;
G4double betacp = sqrt(currentKinEnergy*(currentKinEnergy+2.*mass)*
KineticEnergy*(KineticEnergy+2.*mass)/
((currentKinEnergy+mass)*(KineticEnergy+mass))) ;
G4double theta0 = c_highland*Q*exp(corr_highland*log(xx0))/betacp ;
if(theta0 > taulim) a = 0.5/(1.-cos(theta0)) ;
else a = 1.0/(theta0*theta0) ;
G4double xmeanth = exp(-tau);
G4double xmeanth1 = 1.-xmeanth ;
if(currentTau < taulim) xmeanth1 = tau ;
const G4double x1fac1 = exp(-xsi) ;
const G4double x1fac2 = (1.-(1.+xsi)*x1fac1)/(1.-x1fac1) ;
const G4double x1fac3 = 1.3 ;
G4double ea,eaa,xmean1 ;
G4double c = 2.,b1 = 2., bx = 2.,
eb1 = b1, ebx = b1, xmean2 = 0. ;
G4double prob = 1., qprob ;
G4double x0 = 1.-xsi/a;
G4double oneminusx0=xsi/a ;
G4double oneplusx0=2.+xsi/a ;
G4double f1x0=1., f2x0=1. ;
const G4double tau0 = 0.10 ;
if(tau > tau0)
{
// 1 model function
a = 1./xmeanth1 ;
ea = exp(-2.*a) ;
eaa= 1.-ea ;
xmean1 = 1.-1./a+2.*ea/eaa ;
prob = 1. ;
qprob = 1. ;
}
else if (x0 <= -1.)
{
// 2 model fuctions only
// in order to have xmean1 > xmeanth -> qprob < 1
x0 = -1.;
if( a < 1./xmeanth1)
a = 1./xmeanth1 ;
oneminusx0 = 1.-x0 ;
oneplusx0 = 1.+x0 ;
ea = exp(-a*oneminusx0);
eaa = 1.-ea ;
xmean1 = 1.-1./a+oneminusx0*ea/eaa ;
qprob = xmeanth/xmean1 ;
}
else
{
// 3 model fuctions
// in order to have xmean1 > xmeanth
if((1.-x1fac2/a) < xmeanth)
{
a = x1fac3*x1fac2/xmeanth1 ;
x0 = 1.-xsi/a ;
oneminusx0=xsi/a ;
oneplusx0=2.-xsi/a ;
}
ea = x1fac1 ;
eaa = 1.-ea ;
xmean1 = 1.-x1fac2/a ;
const G4double fctail = factail*1.0 ;
c = 2.+fctail*tau ;
G4double c1 = c-1. ;
G4double c2 = c-2. ;
if(c2 == 0.) c2 = fctail*tausmall ;
b = 1.+(c-xsi)/a ;
b1 = b+1. ;
bx = c/a ;
eb1=exp((c1)*log(b1)) ;
ebx=exp((c1)*log(bx)) ;
xmean2 = (x0*eb1+ebx-(eb1*bx-b1*ebx)/c2)/(eb1-ebx) ;
f1x0 = a*ea/eaa ;
f2x0 = c1*eb1*ebx/(eb1-ebx)/
exp(c*log(bx)) ;
// from continuity at x=x0
prob = f2x0/(f1x0+f2x0) ;
// from xmean = xmeanth
qprob = (f1x0+f2x0)*xmeanth/(f2x0*xmean1+f1x0*xmean2) ;
}
// sampling of costheta
if (G4UniformRand() < qprob)
{
if (G4UniformRand() < prob)
cth = 1.+log(ea+G4UniformRand()*eaa)/a ;
else
cth = b-b1*bx/exp(log(ebx-G4UniformRand()*(ebx-eb1))/(c-1.)) ;
}
else
{
cth = -1.+2.*G4UniformRand();
}
}
}
return cth ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MscModel71::SampleDisplacement()
{
const G4double kappa = 2.5;
const G4double kappapl1 = kappa+1.;
const G4double kappami1 = kappa-1.;
G4double rmean = 0.0;
if (currentTau >= tausmall) {
if (currentTau < taulim) {
rmean = kappa*currentTau*currentTau*currentTau*(1.-kappapl1*currentTau*0.25)/6. ;
} else {
G4double etau = 0.0;
if (currentTau<taubig) etau = exp(-currentTau);
rmean = -kappa*currentTau;
rmean = -exp(rmean)/(kappa*kappami1);
rmean += currentTau-kappapl1/kappa+kappa*etau/kappami1;
}
if (rmean>0.) rmean = 2.*lambda0*sqrt(rmean/3.0);
else rmean = 0.;
}
return rmean;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,196 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MultipleScattering.cc,v 1.77 2009/11/01 13:05:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// -----------------------------------------------------------------------------
//
// GEANT4 Class file
//
// File name: G4MultipleScattering
//
// Author: Laszlo Urban
//
// Creation date: March 2001
//
// 16/05/01 value of cparm changed , L.Urban
// 18/05/01 V.Ivanchenko Clean up against Linux ANSI compilation
// 07/08/01 new methods Store/Retrieve PhysicsTable (mma)
// 23-08-01 new angle and z distribution,energy dependence reduced,
// Store,Retrieve methods commented out temporarily, L.Urban
// 27-08-01 in BuildPhysicsTable:aParticleType.GetParticleName()=="mu+" (mma)
// 28-08-01 GetContinuousStepLimit and AlongStepDoIt moved from .icc file (mma)
// 03-09-01 value of data member factlim changed, L.Urban
// 10-09-01 small change in GetContinuousStepLimit, L.Urban
// 11-09-01 G4MultipleScatteringx put as default G4MultipleScattering
// store/retrieve physics table reactivated (mma)
// 13-09-01 corr. in ComputeTransportCrossSection, L.Urban
// 14-09-01 protection in GetContinuousStepLimit, L.Urban
// 17-09-01 migration of Materials to pure STL (mma)
// 27-09-01 value of data member factlim changed, L.Urban
// 31-10-01 big fixed in PostStepDoIt,L.Urban
// 17-04-02 NEW angle distribution + boundary algorithm modified, L.Urban
// 22-04-02 boundary algorithm modified -> important improvement in timing
// 24-04-02 some minor changes in boundary algorithm, L.Urban
// 06-05-02 bug fixed in GetContinuousStepLimit, L.Urban
// 24-05-02 changes in angle distribution and boundary algorithm, L.Urban
// 11-06-02 bug fixed in ComputeTransportCrossSection, L.Urban
// 12-08-02 bug fixed in PostStepDoIt (lateral displacement), L.Urban
// 15-08-02 new angle distribution, L.Urban
// 26-09-02 angle distribution + boundary algorithm modified, L.Urban
// 15-10-02 temporary fix for proton scattering
// 30-10-02 modified angle distribution,mods in boundary algorithm,
// changes in data members, L.Urban
// 11-12-02 precision problem in ComputeTransportCrossSection
// for small Tkin/for heavy particles cured from L.Urban
// 20-01-03 Migrade to cut per region (V.Ivanchenko)
// 05-02-03 changes in data members, new sampling for geom.
// path length, step dependence reduced with new
// method
// 28-03-03 Move to model design (V.Ivanchenko)
// 08-08-03 STD substitute standard (V.Ivanchenko)
// 23-04-04 value of data member dtrl changed from 0.15 to 0.05 (L.Urban)
// 17-08-04 name of facxsi changed to factail (L.Urban)
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
// 07-02-05 correction in order to have a working Setsamplez function (L.Urban)
// 15-04-05 optimize internal interface (V.Ivanchenko)
// 12-09-05 new TruePathLengthLimit - facrange works for every track from
// start, geometry also influences the limit
// 02-10-05 conditions limiting the step are finalized + code cleaning (L.Urban)
// 03-10-05 weaker step limitation for Tkin > Tlimit (L.Urban)
// 05-10-05 value of data member tlimitmin has been changed (L.Urban)
// 06-10-05 correction in TruePathLengthLimit, timing improved.(L.Urban)
// 07-10-05 bug fixed in TruePathLengthLimit (L.Urban)
// 11-10-05 change in TruePathLengthLimit conditions,slightly better
// timing and much weaker cut dependence (L.Urban)
// 13-10-05 move SetFacrange(0.02) from InitialiseProcess to constructor
// 23-10-05 new Boolean data member prec (false ~ 7.1 like, true new step
// limit in TruePathLengthLimit, L.Urban)
// 25-10-05 prec renamed to steppingAlgorithm, set function triggers
// 'default' facrange too, true - 0.02, false - 0.2 (L.Urban)
// 26-10-05 the above is put in the function MscStepLimitation() (mma)
// 05-11-05 tlimitmin = facrange*rungecut (instead of a fixed value)L.Urban
// 13-11-05 some code cleaning, slightly better timing (L.Urban)
// 01-12-05 add control on verbosity in SetMscStepLimitation
// 06-12-05 tlimitmin = facrange*rangecut(e-) for every particle
// 07-12-05 volume name World removed, rangecut computed using index
// instead of particle name L.Urban
// 08-12-05 world is now: navigator->GetWorldVolume() L.Urban
// 11-12-05 data member rangecut removed, steplimit does not depend
// on cut any more (L.Urban)
// 17-01-06 value of data member factail changed (1. --> 0.75),
// value of facgeom is 3.5 instead of 4 (L.Urban)
// 19-01-07 tlimitmin = facrange*50*micrometer, i.e. it depends on the
// value of facrange (L.Urban)
// 16-02-06 value of factail changed, samplez = true (L.Urban)
// 07-03-06 Create G4UrbanMscModel and move there step limit calculation (VI)
// 10-05-06 SetMscStepLimitation at initialisation (V.Ivantchenko)
// 11-05-06 values of data members tkinlimit, factail have been
// changed (L.Urban)
// 13-10-06 data member factail removed, new data member skin
// together with set function, data member tkinlimit
// changed to lambdalimit (L.Urban)
// 20-10-06 default value of skin = 0 (no single scattering),
// single scattering for skin > 0,
// there is no z sampling by default (L.Urban)
// 23-10-06 skin = 1 by default (L.Urban)
// 23-11-06 skin = 1 by default for e+-, 0 for other particles (VI)
// 12-02-07 skin can be changed via UI command, default skin=1 (VI)
// 24-04-07 default skin=0 (temporal protection) (VI)
// 11-03-08 use G4VMscModel interface (VI)
//
// -----------------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MultipleScattering.hh"
#include "G4UrbanMscModel92.hh"
#include "G4MscStepLimitType.hh"
#include "G4UrbanMscModel.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4MultipleScattering::G4MultipleScattering(const G4String& processName)
: G4VMultipleScattering(processName)
{
isInitialized = false;
G4cout << G4endl;
G4cout << "!!! G4MultipleScattering class is obsolete and will be removed for the next major Geant4 release !!!" << G4endl;
G4cout << "!!! Please use G4eMultipleScattering for e+ and e- !!!" << G4endl;
G4cout << "!!! Please use G4MuMultipleScattering for mu+ and mu- !!!" << G4endl;
G4cout << "!!! Please use G4hMultipleScattering for hadrons and ions !!!" << G4endl;
G4cout << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MultipleScattering::~G4MultipleScattering()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool G4MultipleScattering::IsApplicable (const G4ParticleDefinition& p)
{
return (p.GetPDGCharge() != 0.0 && !p.IsShortLived());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MultipleScattering::InitialiseProcess(const G4ParticleDefinition*)
{
if(isInitialized) return;
// initialisation of parameters - defaults for particles other
// than ions can be overwritten by users
mscUrban = new G4UrbanMscModel92();
AddEmModel(1,mscUrban);
isInitialized = true;
/*
G4cout << "G4MultipleScattering::InitialiseProcess for "
<< p->GetParticleName()
<< " skin= " << Skin()
<< " SA= " << steppingAlgorithm
<< G4endl;
*/
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MultipleScattering::PrintInfo()
{
G4cout << " RangeFactor= " << RangeFactor()
<< ", step limit type: " << StepLimitType()
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
<< ", skin= " << Skin()
<< ", geomFactor= " << GeomFactor()
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,221 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MultipleScattering71.cc,v 1.5 2008/07/16 11:27:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
// 16/05/01 value of cparm changed , L.Urban
// 18/05/01 V.Ivanchenko Clean up against Linux ANSI compilation
// 07/08/01 new methods Store/Retrieve PhysicsTable (mma)
// 23-08-01 new angle and z distribution,energy dependence reduced,
// Store,Retrieve methods commented out temporarily, L.Urban
// 27-08-01 in BuildPhysicsTable:aParticleType.GetParticleName()=="mu+" (mma)
// 28-08-01 GetContinuousStepLimit and AlongStepDoIt moved from .icc file (mma)
// 03-09-01 value of data member factlim changed, L.Urban
// 10-09-01 small change in GetContinuousStepLimit, L.Urban
// 11-09-01 G4MultipleScatteringx put as default G4MultipleScattering
// store/retrieve physics table reactivated (mma)
// 13-09-01 corr. in ComputeTransportCrossSection, L.Urban
// 14-09-01 protection in GetContinuousStepLimit, L.Urban
// 17-09-01 migration of Materials to pure STL (mma)
// 27-09-01 value of data member factlim changed, L.Urban
// 31-10-01 big fixed in PostStepDoIt,L.Urban
// 17-04-02 NEW angle distribution + boundary algorithm modified, L.Urban
// 22-04-02 boundary algorithm modified -> important improvement in timing (L.Urban)
// 24-04-02 some minor changes in boundary algorithm, L.Urban
// 06-05-02 bug fixed in GetContinuousStepLimit, L.Urban
// 24-05-02 changes in angle distribution and boundary algorithm, L.Urban
// 11-06-02 bug fixed in ComputeTransportCrossSection, L.Urban
// 12-08-02 bug fixed in PostStepDoIt (lateral displacement), L.Urban
// 15-08-02 new angle distribution, L.Urban
// 26-09-02 angle distribution + boundary algorithm modified, L.Urban
// 15-10-02 temporary fix for proton scattering
// 30-10-02 modified angle distribution,mods in boundary algorithm,
// changes in data members, L.Urban
// 11-12-02 precision problem in ComputeTransportCrossSection
// for small Tkin/for heavy particles cured from L.Urban
// 20-01-03 Migrade to cut per region (V.Ivanchenko)
// 05-02-03 changes in data members, new sampling for geom.
// path length, step dependence reduced with new
// method
// 28-03-03 Move to model design (V.Ivanchenko)
// 08-08-03 STD substitute standard (V.Ivanchenko)
// 23-04-04 value of data member dtrl changed from 0.15 to 0.05 (L.Urban)
// 17-08-04 name of facxsi changed to factail (L.Urban)
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
// 07-02-05 correction in order to have a working Setsamplez function (L.Urban)
// 15-04-05 optimize internal interface (V.Ivanchenko)
// 03-10-05 Process is freezed with the name 71 (V.Ivanchenko)
// -----------------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MultipleScattering71.hh"
#include "G4LossTableManager.hh"
#include "G4MscModel71.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4MultipleScattering71::G4MultipleScattering71(const G4String& processName)
: G4VMultipleScattering(processName),
totBins(120),
facrange(0.199),
dtrl(0.05),
NuclCorrPar (0.0615),
FactPar(0.40),
factail(1.0),
cf(1.001),
stepnolastmsc(-1000000),
nsmallstep(5),
samplez(true),
boundary(true),
isInitialized(false)
{
lowKineticEnergy = 0.1*keV;
highKineticEnergy= 100.*TeV;
tlimit = 1.e10*mm;
tlimitmin = 1.e-7*mm;
SetBinning(totBins);
SetMinKinEnergy(lowKineticEnergy);
SetMaxKinEnergy(highKineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MultipleScattering71::~G4MultipleScattering71()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MultipleScattering71::InitialiseProcess(const G4ParticleDefinition* particle)
{
if(isInitialized) return;
if (particle->GetParticleType() == "nucleus") {
boundary = false;
SetLateralDisplasmentFlag(false);
SetBuildLambdaTable(false);
Setsamplez(false) ;
} else {
SetLateralDisplasmentFlag(true);
SetBuildLambdaTable(true);
}
G4MscModel71* em = new G4MscModel71(dtrl,NuclCorrPar,FactPar,factail,samplez);
em->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
em->SetLowEnergyLimit(lowKineticEnergy);
em->SetHighEnergyLimit(highKineticEnergy);
AddEmModel(1, em);
isInitialized = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MultipleScattering71::TruePathLengthLimit(const G4Track& track,
G4double& lambda,
G4double currentMinimalStep)
{
G4double tPathLength = currentMinimalStep;
// special treatment near boundaries ?
if (boundary) {
G4int stepno = track.GetCurrentStepNumber() ;
// first step
if (stepno == 1) {
stepnolastmsc = -1000000 ;
tlimit = 1.e10;
} else if (stepno > 1) {
if (track.GetStep()->GetPreStepPoint()->GetStepStatus() == fGeomBoundary) {
stepnolastmsc = stepno;
// if : diff.treatment for small/not small Z
if (range > lambda) tlimit = facrange*range;
else tlimit = facrange*lambda;
if(tlimit < tlimitmin) tlimit = tlimitmin;
if(tPathLength > tlimit) tPathLength = tlimit;
} else if (stepno > stepnolastmsc && stepno - stepnolastmsc < nsmallstep
&& tPathLength > tlimit) {
tlimit *= cf;
tPathLength = tlimit;
}
}
}
return tPathLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MultipleScattering71::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimalStep,
G4double&)
{
DefineMaterial(track.GetMaterialCutsCouple());
const G4MaterialCutsCouple* couple = CurrentMaterialCutsCouple();
G4double e = track.GetKineticEnergy();
model = dynamic_cast<G4MscModel71*>(SelectModel(e));
const G4ParticleDefinition* p = track.GetDefinition();
G4double lambda0 = GetLambda(p, e);
range = G4LossTableManager::Instance()->GetRangeFromRestricteDEDX(p,e,couple);
if(range < currentMinimalStep) currentMinimalStep = range;
truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep);
// G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= "
// << lambda0 << " range= " << currentRange
// << " currentMinStep= " << currentMinimalStep << G4endl;
if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection;
geomPathLength = model->GeomPathLength(LambdaTable(),couple,
p,e,lambda0,range,truePathLength);
if(geomPathLength > lambda0) geomPathLength = lambda0;
return geomPathLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MultipleScattering71::PrintInfo()
{
if(boundary) {
G4cout << " Boundary algorithm is active with facrange= "
<< facrange
<< G4endl;
}
G4cout << " WARNING: This process is obsolete and will be soon removed"
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,15 +23,15 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PAIModel.cc,v 1.51 2009/08/12 21:28:50 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4PAIModel.cc,v 1.55 2010/11/21 10:55:44 grichine Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class
// File name: G4PAIModel.cc
//
// Author: Vladimir.Grichine@cern.ch on base of Vladimir Ivanchenko code
// Author: Vladimir.Grichine@cern.ch on base of Vladimir Ivanchenko model interface
//
// Creation date: 05.10.2003
//
@@ -41,6 +41,7 @@
// 16.08.04 V.Grichine, bug fixed in massRatio for DEDX, CrossSection, SampleSecondary
// 08.04.05 Major optimisation of internal interfaces (V.Ivantchenko)
// 26.07.09 Fixed logic to work with several materials (V.Ivantchenko)
// 21.11.10 V. Grichine verbose flag for protons and G4PAYySection to check sandia table
//
#include "G4Region.hh"
@@ -80,9 +81,7 @@ G4PAIModel::G4PAIModel(const G4ParticleDefinition* p, const G4String& nam)
fTwoln10(2.0*log(10.0)),
fBg2lim(0.0169),
fTaulim(8.4146e-3)
{
if(p) SetParticle(p);
{
fElectron = G4Electron::Electron();
fPositron = G4Positron::Positron();
@@ -92,6 +91,13 @@ G4PAIModel::G4PAIModel(const G4ParticleDefinition* p, const G4String& nam)
fdEdxVector = 0;
fLambdaVector = 0;
fdNdxCutVector = 0;
fParticleEnergyVector = 0;
fSandiaIntervalNumber = 0;
fMatIndex = 0;
fDeltaCutInKinEnergy = 0.0;
if(p) { SetParticle(p); }
else { SetParticle(fElectron); }
isInitialised = false;
}
@@ -131,7 +137,7 @@ G4PAIModel::~G4PAIModel()
void G4PAIModel::SetParticle(const G4ParticleDefinition* p)
{
if(fParticle == p) return;
if(fParticle == p) { return; }
fParticle = p;
fMass = fParticle->GetPDGMass();
fSpin = fParticle->GetPDGSpin();
@@ -140,6 +146,8 @@ void G4PAIModel::SetParticle(const G4ParticleDefinition* p)
fLowKinEnergy = 0.2*MeV*fMass/proton_mass_c2;
fRatio = electron_mass_c2/fMass;
fQc = fMass/fRatio;
fLowestKineticEnergy = fMass*(fLowestGamma - 1.0);
fHighestKineticEnergy = fMass*(fHighestGamma - 1.0);
}
////////////////////////////////////////////////////////////////////////////
@@ -147,12 +155,17 @@ void G4PAIModel::SetParticle(const G4ParticleDefinition* p)
void G4PAIModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if(isInitialised) return;
if( fVerbose > 0 && p->GetParticleName()=="proton")
{
G4cout<<"G4PAIModel::Initialise for "<<p->GetParticleName()<<G4endl;
fPAIySection.SetVerbose(1);
}
else fPAIySection.SetVerbose(0);
if(isInitialised) { return; }
isInitialised = true;
SetParticle(p);
fLowestKineticEnergy = fMass*(fLowestGamma - 1.0);
fHighestKineticEnergy = fMass*(fHighestGamma - 1.0);
fParticleEnergyVector = new G4PhysicsLogVector(fLowestKineticEnergy,
fHighestKineticEnergy,
@@ -170,6 +183,7 @@ void G4PAIModel::Initialise(const G4ParticleDefinition* p,
for(size_t iReg = 0; iReg < numRegions; ++iReg) // region loop
{
const G4Region* curReg = fPAIRegionVector[iReg];
for(size_t jMat = 0; jMat < numOfMat; ++jMat) // region material loop
{
fMaterial = (*theMaterialTable)[jMat];
@@ -178,7 +192,8 @@ void G4PAIModel::Initialise(const G4ParticleDefinition* p,
//G4cout << "Reg <" <<curReg->GetName() << "> mat <"
// << fMaterial->GetName() << "> fCouple= "
// << fCutCouple<<" " << p->GetParticleName() <<G4endl;
if( fCutCouple ) {
if( fCutCouple )
{
fMaterialCutsCoupleVector.push_back(fCutCouple);
fPAItransferTable = new G4PhysicsTable(fTotBin+1);
@@ -211,12 +226,13 @@ void G4PAIModel::InitialiseMe(const G4ParticleDefinition*)
void G4PAIModel::ComputeSandiaPhotoAbsCof()
{
G4int i, j, numberOfElements ;
static const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4int i, j;
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4SandiaTable thisMaterialSandiaTable(fMatIndex) ;
numberOfElements = (*theMaterialTable)[fMatIndex]->
GetNumberOfElements();
G4int numberOfElements =
(*theMaterialTable)[fMatIndex]->GetNumberOfElements();
G4int* thisMaterialZ = new G4int[numberOfElements] ;
for(i=0;i<numberOfElements;i++)
@@ -234,20 +250,22 @@ void G4PAIModel::ComputeSandiaPhotoAbsCof()
fSandiaPhotoAbsCof = new G4double*[fSandiaIntervalNumber] ;
for(i=0;i<fSandiaIntervalNumber;i++) fSandiaPhotoAbsCof[i] = new G4double[5] ;
for(i=0; i<fSandiaIntervalNumber; i++)
{
fSandiaPhotoAbsCof[i] = new G4double[5];
}
for( i = 0 ; i < fSandiaIntervalNumber ; i++ )
{
fSandiaPhotoAbsCof[i][0] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i+1,0) ;
fSandiaPhotoAbsCof[i][0] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i+1,0);
for( j = 1; j < 5 ; j++ )
{
fSandiaPhotoAbsCof[i][j] = thisMaterialSandiaTable.
GetPhotoAbsorpCof(i+1,j)*
fSandiaPhotoAbsCof[i][j] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i+1,j)*
(*theMaterialTable)[fMatIndex]->GetDensity() ;
}
}
// delete[] thisMaterialZ ;
delete[] thisMaterialZ;
}
////////////////////////////////////////////////////////////////////////////
@@ -305,7 +323,7 @@ void G4PAIModel::BuildPAIonisationTable()
}
ionloss = fPAIySection.GetMeanEnergyLoss() ; // total <dE/dx>
if ( ionloss < DBL_MIN) ionloss = DBL_MIN;
if ( ionloss < DBL_MIN) { ionloss = 0.0; }
fdEdxVector->PutValue(i,ionloss) ;
fPAItransferTable->insertAt(i,transferVector) ;
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PAIPhotonModel.cc,v 1.23 2009/07/26 15:51:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4PAIPhotonModel.cc,v 1.25 2010/10/26 09:16:50 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -82,15 +82,13 @@ G4PAIPhotonModel::G4PAIPhotonModel(const G4ParticleDefinition* p, const G4String
fBg2lim(0.0169),
fTaulim(8.4146e-3)
{
if(p) SetParticle(p);
fVerbose = 0;
fElectron = G4Electron::Electron();
fPositron = G4Positron::Positron();
fProtonEnergyVector = new G4PhysicsLogVector(fLowestKineticEnergy,
fHighestKineticEnergy,
fTotBin);
fHighestKineticEnergy,
fTotBin);
fPAItransferTable = 0;
fPAIphotonTable = 0;
fPAIplasmonTable = 0;
@@ -104,6 +102,12 @@ G4PAIPhotonModel::G4PAIPhotonModel(const G4ParticleDefinition* p, const G4String
fdNdxCutPhotonVector = 0;
fdNdxCutPlasmonVector = 0;
fSandiaIntervalNumber = 0;
fMatIndex = 0;
if(p) { SetParticle(p); }
else { SetParticle(fElectron); }
isInitialised = false;
}
@@ -160,7 +164,8 @@ void G4PAIPhotonModel::SetParticle(const G4ParticleDefinition* p)
void G4PAIPhotonModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if(isInitialised) return;
// G4cout<<"G4PAIPhotonModel::Initialise for "<<p->GetParticleName()<<G4endl;
if(isInitialised) { return; }
isInitialised = true;
if(!fParticle) SetParticle(p);
@@ -227,7 +232,7 @@ void G4PAIPhotonModel::InitialiseMe(const G4ParticleDefinition*)
void G4PAIPhotonModel::ComputeSandiaPhotoAbsCof()
{
G4int i, j, numberOfElements ;
static const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4SandiaTable thisMaterialSandiaTable(fMatIndex) ;
numberOfElements = (*theMaterialTable)[fMatIndex]->
@@ -262,7 +267,7 @@ void G4PAIPhotonModel::ComputeSandiaPhotoAbsCof()
(*theMaterialTable)[fMatIndex]->GetDensity() ;
}
}
// delete[] thisMaterialZ ;
delete[] thisMaterialZ ;
}
////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,225 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PEEffectFluoModel.cc,v 1.4 2010/11/21 16:08:37 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4PEEffectFluoModel
//
// Author: Vladimir Ivanchenko on base of G4PEEffectModel
//
// Creation date: 13.06.2010
//
// Modifications:
//
// Class Description:
// Implementation of the photo-electric effect with deexcitation
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4PEEffectFluoModel.hh"
#include "G4Electron.hh"
#include "G4Gamma.hh"
#include "Randomize.hh"
#include "G4DataVector.hh"
#include "G4ParticleChangeForGamma.hh"
#include "G4VAtomDeexcitation.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4PEEffectFluoModel::G4PEEffectFluoModel(const G4String& nam)
: G4VEmModel(nam),isInitialized(false)
{
theGamma = G4Gamma::Gamma();
theElectron = G4Electron::Electron();
fminimalEnergy = 1.0*eV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4PEEffectFluoModel::~G4PEEffectFluoModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4PEEffectFluoModel::Initialise(const G4ParticleDefinition*,
const G4DataVector&)
{
fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
if (isInitialized) return;
fParticleChange = GetParticleChangeForGamma();
isInitialized = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
G4double
G4PEEffectFluoModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double energy,
G4double Z, G4double,
G4double, G4double)
{
G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy);
G4double energy2 = energy*energy;
G4double energy3 = energy*energy2;
G4double energy4 = energy2*energy2;
return SandiaCof[0]/energy + SandiaCof[1]/energy2 +
SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double
G4PEEffectFluoModel::CrossSectionPerVolume(const G4Material* material,
const G4ParticleDefinition*,
G4double energy,
G4double, G4double)
{
G4double* SandiaCof =
material->GetSandiaTable()->GetSandiaCofForMaterial(energy);
G4double energy2 = energy*energy;
G4double energy3 = energy*energy2;
G4double energy4 = energy2*energy2;
return SandiaCof[0]/energy + SandiaCof[1]/energy2 +
SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void
G4PEEffectFluoModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* aDynamicPhoton,
G4double,
G4double)
{
const G4Material* aMaterial = couple->GetMaterial();
G4double energy = aDynamicPhoton->GetKineticEnergy();
G4ParticleMomentum PhotonDirection = aDynamicPhoton->GetMomentumDirection();
// select randomly one element constituing the material.
const G4Element* anElement = SelectRandomAtom(aMaterial,theGamma,energy);
//
// Photo electron
//
// Select atomic shell
G4int nShells = anElement->GetNbOfAtomicShells();
G4int i = 0;
while ((i<nShells) && (energy<anElement->GetAtomicShell(i))) { ++i; }
// no shell available
if (i == nShells) { return; }
G4double bindingEnergy = anElement->GetAtomicShell(i);
G4double ElecKineEnergy = energy - bindingEnergy;
// create photo electron
//
if (ElecKineEnergy > fminimalEnergy) {
G4double cosTeta = ElecCosThetaDistribution(ElecKineEnergy);
G4double sinTeta = sqrt(1.-cosTeta*cosTeta);
G4double Phi = twopi * G4UniformRand();
G4double dirx = sinTeta*cos(Phi),diry = sinTeta*sin(Phi),dirz = cosTeta;
G4ThreeVector ElecDirection(dirx,diry,dirz);
ElecDirection.rotateUz(PhotonDirection);
//
G4DynamicParticle* aParticle = new G4DynamicParticle (
theElectron,ElecDirection, ElecKineEnergy);
fvect->push_back(aParticle);
}
// sample deexcitation
//
G4double edep = bindingEnergy;
if(fAtomDeexcitation) {
G4int index = couple->GetIndex();
if(fAtomDeexcitation->CheckDeexcitationActiveRegion(index)) {
G4int Z = (G4int)anElement->GetZ();
G4AtomicShellEnumerator as = G4AtomicShellEnumerator(i);
const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);
size_t nbefore = fvect->size();
fAtomDeexcitation->GenerateParticles(fvect, shell, Z, index);
size_t nafter = fvect->size();
if(nafter > nbefore) {
for (size_t i=nbefore; i<nafter; ++i) {
edep -= ((*fvect)[i])->GetKineticEnergy();
}
}
}
}
// kill primary photon
fParticleChange->SetProposedKineticEnergy(0.);
fParticleChange->ProposeTrackStatus(fStopAndKill);
fParticleChange->ProposeLocalEnergyDeposit(edep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4PEEffectFluoModel::ElecCosThetaDistribution(G4double kineEnergy)
{
// Compute Theta distribution of the emitted electron, with respect to the
// incident Gamma.
// The Sauter-Gavrila distribution for the K-shell is used.
//
G4double costeta = 1.;
G4double gamma = 1. + kineEnergy/electron_mass_c2;
if (gamma > 5.) return costeta;
G4double beta = sqrt(gamma*gamma-1.)/gamma;
G4double b = 0.5*gamma*(gamma-1.)*(gamma-2);
G4double rndm,term,greject,grejsup;
if (gamma < 2.) grejsup = gamma*gamma*(1.+b-beta*b);
else grejsup = gamma*gamma*(1.+b+beta*b);
do { rndm = 1.-2*G4UniformRand();
costeta = (rndm+beta)/(rndm*beta+1.);
term = 1.-beta*costeta;
greject = (1.-costeta*costeta)*(1.+b*term)/(term*term);
} while(greject < G4UniformRand()*grejsup);
return costeta;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PSTARStopping.cc,v 1.8 2008/11/24 18:28:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4PSTARStopping.cc,v 1.14 2010/04/26 17:40:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//---------------------------------------------------------------------------
//
@@ -38,7 +38,10 @@
// Customer: ESA/ESTEC, NOORDWIJK
// Contract: CSMAN-5288
//
// Modifications:
// Modifications:
// 25.04.2010 V.Ivanchenko introduce G4LPhysicsFreeVector
// 26.04.2010 A.Ivanchenko fixed data for G4_PROPANE and G4_Pt,
// checked all data
//
//----------------------------------------------------------------------------
//
@@ -52,17 +55,21 @@
G4PSTARStopping::G4PSTARStopping()
{
currentE = 0.0;
currentMaterial = 0;
index = 0;
matIndex = -1;
name.resize(74,"");
sdata.resize(74,0);
Initialise();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4PSTARStopping::~G4PSTARStopping()
{}
{
for(size_t i=0; i<74; ++i) { delete sdata[i]; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -70,7 +77,7 @@ G4int G4PSTARStopping:: GetIndex (const G4Material* mat)
{
if (mat == currentMaterial) return matIndex;
G4String matName = mat->GetName();
for (G4int i=0; i<74; i++){
for (G4int i=0; i<74; ++i){
if (matName == name[i]){
matIndex = i;
currentMaterial = mat;
@@ -84,43 +91,19 @@ G4int G4PSTARStopping:: GetIndex (const G4Material* mat)
G4double G4PSTARStopping::GetElectronicDEDX(G4int i, G4double energy)
{
if (matIndex == i && energy == currentE) return res;
G4double res = 0.0;
if (i<0 || i>73){
G4cout << "### G4PSTARStopping WARNING: index "
<< i << " is out of range!" << G4endl;
res = 0.0;
return res;
}
matIndex = i;
currentE = energy;
if (energy < kinE[index] || energy > kinE[index+1]){
if (energy <= kinE[0]) {
index = 0;
res = e[matIndex][0]*std::sqrt(energy/kinE[0]);
return res;
} else if (energy >= kinE[59]) {
index = 58;
res = e[matIndex][59];
return res;
}
for (index = 0; index<59; index++){if (energy <= kinE[index+1]) break;}
}
G4double t1 = kinE[index];
G4double t2 = kinE[index+1];
G4double e1 = e[matIndex][index];
G4double e2 = e[matIndex][index+1];
res = e1*std::exp(std::log(energy/t1)*std::log(e2/e1)/std::log(t2/t1));
if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); }
else { res = sdata[i]->Value(energy); }
return res;
}
void G4PSTARStopping::Initialise()
{
G4int i;
name [0] = "G4_A-150_TISSUE";
G4double T0[60] = {
0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008,
@@ -128,374 +111,383 @@ void G4PSTARStopping::Initialise()
0.035, 0.04, 0.045, 0.05, 0.055, 0.06, 0.065, 0.07, 0.075, 0.08,
0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25,
0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7,
0.75, 0.8, 0.85, 0.9, 0.95, 1., 1.25, 1.5, 1.75, 2. };
0.75, 0.8, 0.85, 0.9, 0.95, 1., 1.25, 1.5, 1.75, 2. };
emin = T0[0]*MeV;
G4double e0[60] = { 176.8, 216.6, 250.1, 279.6, 306.3, 351.1, 390.9, 426.8, 459.8, 489.9, 517.8, 544, 596.4, 641.3, 680.6, 715.7, 747, 775, 800, 822.6, 861.7, 894.2, 920.7, 941.5, 957.3, 968.6, 976.2, 980.5, 982, 981, 978, 973.2, 967, 959.5, 910.4, 853.6, 797.9, 746.9, 701.5, 661.5, 626.4, 595.6, 544.8, 504.4, 471.1, 442.8, 416.4, 392, 369.9, 350, 332.2, 316.4, 302.2, 289.5, 278.1, 267.9, 228.9, 200.8, 179.5, 162.6 };
for(i=0; i<60; i++) {e[0][i]=e0[i]*MeV*cm2/g;}
for(i=0; i<60; i++) {kinE[i]=T0[i]*MeV;}
AddData(T0, e0, 0);
name [1] = "G4_ACETYLENE";
G4double e1[60] = { 185.5, 227.2, 262.3, 293.2, 321.2, 364.8, 404, 439.3, 471.6, 500.3, 526.4, 550.6, 600.2, 641.6, 677.4, 709.2, 737.3, 762, 783.7, 803.1, 837.2, 866.8, 891.7, 911.6, 926.6, 937.4, 944.7, 949, 950.8, 950.3, 947.9, 943.9, 938.4, 931.8, 887.1, 833.7, 779.9, 729.5, 686.8, 650.4, 618.5, 590.2, 541.4, 500.4, 465.3, 434.8, 408, 384.6, 364.4, 346.5, 330.5, 316.1, 303.2, 291.3, 280.4, 270.4, 230.7, 202.2, 180.5, 163.5 };
for(i=0; i<60; i++) {e[1][i]=e1[i]*MeV*cm2/g;}
AddData(T0, e1, 1);
name [2] = "G4_ADIPOSE_TISSUE_ICRP";
G4double e2[60] = { 195.9, 239.9, 277, 309.7, 339.3, 387.5, 430.6, 469.4, 505, 537.2, 566.9, 594.6, 649.9, 696.7, 737.4, 773.3, 805.2, 833.4, 858.3, 880.5, 918.9, 951, 977.2, 997.6, 1013, 1023, 1030, 1034, 1034, 1033, 1029, 1023, 1016, 1008, 955.6, 895, 835.1, 779.6, 729.7, 685.6, 646.6, 612.3, 555, 509.1, 471.6, 440.3, 413.7, 390.4, 370.1, 352.1, 336, 321.4, 308.3, 296.3, 285.3, 275.2, 234.9, 206, 184, 166.7 };
for(i=0; i<60; i++) {e[2][i]=e2[i]*MeV*cm2/g;}
AddData(T0, e2, 2);
name [3] = "G4_Ag";
G4double e3[60] = { 29.73, 36.41, 42.05, 47.01, 51.5, 59.46, 66.48, 72.83, 78.66, 84.09, 89.2, 94.02, 103.7, 112.1, 119.7, 126.6, 132.8, 138.5, 143.7, 148.5, 157.1, 164.3, 170.5, 175.7, 180.1, 183.7, 186.7, 189.1, 191.1, 192.5, 193.6, 194.4, 194.8, 195, 193.4, 189.3, 184.4, 179.2, 174.1, 169.3, 164.8, 160.5, 152.7, 145.7, 139.5, 133.8, 128.6, 123.9, 119.5, 115.4, 111.7, 108.1, 104.8, 101.7, 98.74, 95.98, 84.49, 75.92, 69.3, 64.05 };
for(i=0; i<60; i++) {e[3][i]=e3[i]*MeV*cm2/g;}
AddData(T0, e3, 3);
name [4] = "G4_AIR";
G4double e4[60] = { 119.7, 146.7, 169.3, 189.3, 207.4, 239.5, 267.8, 293.3, 316.8, 338.7, 359.2, 378.7, 417, 450.4, 480.1, 506.7, 530.7, 552.6, 572.4, 590.5, 622.1, 648.3, 670, 687.7, 702, 713.2, 721.7, 727.8, 731.9, 734.1, 734.8, 734, 732, 729, 702.9, 667.2, 629.1, 592.2, 558.3, 527.8, 500.6, 476.3, 434.9, 401.2, 373.3, 349.8, 329.7, 312.1, 296.4, 282.4, 269.9, 258.7, 248.5, 239.1, 230.6, 222.7, 191.1, 168.2, 150.8, 137 };
for(i=0; i<60; i++) {e[4][i]=e4[i]*MeV*cm2/g;}
AddData(T0, e4, 4);
name [5] = "G4_Al";
G4double e5[60] = { 92.38, 113.1, 130.6, 146.1, 160, 184.8, 206.6, 226.3, 244.4, 261.3, 277.1, 292.1, 320.6, 344.8, 365.7, 383.8, 399.6, 413.2, 425, 435.1, 451, 462, 469.2, 473.4, 475.2, 475.1, 473.7, 471.2, 468, 464.2, 460.1, 455.8, 451.3, 446.8, 424.5, 404.5, 386.7, 371, 356.8, 344, 332.3, 321.5, 301.7, 284.2, 268.6, 254.8, 242.5, 231.4, 221.5, 212.4, 204.2, 196.6, 189.7, 183.3, 177.4, 171.9, 149.4, 132.7, 119.8, 109.4 };
for(i=0; i<60; i++) {e[5][i]=e5[i]*MeV*cm2/g;}
AddData(T0, e5, 5);
name [6] = "G4_ALUMINUM_OXIDE";
G4double e6[60] = { 73.51, 90.03, 104, 116.2, 127.3, 147, 164.4, 180.1, 194.5, 207.9, 220.5, 232.5, 256.1, 276.8, 295.3, 311.9, 327, 340.8, 353.4, 364.9, 385.3, 402.5, 417, 429.2, 439.3, 447.6, 454.3, 459.6, 463.7, 466.6, 468.6, 469.8, 470.2, 470, 461.9, 447.2, 430.1, 412.7, 396.5, 381.4, 367.5, 354.5, 331.1, 310.6, 292.6, 276.5, 262.2, 249.4, 238.1, 227.9, 218.7, 210.2, 202.6, 195.7, 189.2, 183.2, 158.9, 140.9, 127, 116 };
for(i=0; i<60; i++) {e[6][i]=e6[i]*MeV*cm2/g;}
AddData(T0, e6, 6);
name [7] = "G4_Ar";
G4double e7[60] = { 86.08, 105.4, 121.7, 136.1, 149.1, 172.2, 192.5, 210.9, 227.7, 243.5, 258.2, 272.2, 299.7, 323.5, 344.5, 363.3, 380.2, 395.3, 409, 421.4, 442.5, 459.4, 472.8, 483.1, 490.7, 496, 499.2, 500.7, 500.8, 499.5, 497.2, 494, 490, 485.5, 457.4, 426.7, 397.7, 371.9, 349.5, 330.1, 313.2, 298.5, 274.2, 254.9, 239, 225.6, 214.4, 204.7, 196.1, 188.4, 181.3, 174.9, 168.9, 163.4, 158.2, 153.3, 133, 118.2, 106.8, 97.72 };
for(i=0; i<60; i++) {e[7][i]=e7[i]*MeV*cm2/g;}
AddData(T0, e7, 7);
name [8] = "G4_Au";
G4double e8[60] = { 14.76, 18.07, 20.87, 23.33, 25.56, 29.51, 33, 36.15, 39.04, 41.74, 44.27, 46.66, 51.51, 55.8, 59.66, 63.18, 66.43, 69.43, 72.23, 74.84, 79.58, 83.77, 87.5, 90.81, 93.77, 96.4, 98.74, 100.8, 102.6, 104.3, 105.7, 106.9, 108, 108.9, 111.5, 112, 111.2, 109.6, 107.6, 105.4, 103.2, 101, 96.33, 91.8, 87.7, 84.05, 80.83, 78, 75.47, 73.18, 71.11, 69.21, 67.46, 65.83, 64.32, 62.91, 56.98, 52.39, 48.68, 45.58 };
for(i=0; i<60; i++) {e[8][i]=e8[i]*MeV*cm2/g;}
AddData(T0, e8, 8);
name [9] = "G4_B-100_BONE";
G4double e9[60] = { 142.5, 174.5, 201.5, 225.2, 246.7, 283.1, 315.3, 344.4, 371.1, 395.5, 418.2, 439.6, 482.3, 519, 551.3, 580.1, 606, 629.2, 650.1, 669, 701.9, 729.5, 752.2, 770.4, 784.5, 795.1, 802.6, 807.4, 810, 810.5, 809.3, 806.6, 802.7, 797.7, 762.5, 719.5, 676.2, 635.8, 599.3, 566.7, 537.9, 512.3, 468.1, 431.4, 400.8, 375, 353, 333.7, 316.9, 301.9, 288.5, 276.3, 265.3, 255.1, 245.9, 237.4, 203.4, 178.9, 160.2, 145.4 };
for(i=0; i<60; i++) {e[9][i]=e9[i]*MeV*cm2/g;}
AddData(T0, e9, 9);
name [10] = "G4_Be";
G4double e10[60] = { 149.7, 183.3, 211.7, 236.7, 259.2, 299.3, 334.7, 366.6, 396, 423.3, 449, 473.3, 517.2, 553.4, 583.6, 608.7, 629.6, 646.8, 660.7, 671.9, 687.3, 695.5, 698.4, 697.6, 694.2, 689.1, 682.8, 675.7, 668.2, 660.5, 652.7, 644.9, 637.2, 629.6, 594.2, 563, 535.4, 510.7, 488.4, 468.2, 449.8, 432.8, 404.4, 380.1, 358.1, 337.6, 318.8, 302.2, 287.4, 274.2, 262.3, 251.5, 241.7, 232.7, 224.4, 216.8, 186, 163.6, 146.3, 132.6 };
for(i=0; i<60; i++) {e[10][i]=e10[i]*MeV*cm2/g;}
AddData(T0, e10, 10);
name [11] = "G4_BONE_COMPACT_ICRU";
G4double e11[60] = { 141.6, 173.4, 200.2, 223.8, 245.2, 281.3, 313.3, 342.2, 368.8, 393.1, 415.6, 436.8, 479, 515.2, 547, 575.3, 600.7, 623.4, 643.8, 662.1, 694.2, 721, 743.2, 760.9, 774.8, 785.2, 792.6, 797.6, 800.3, 801.1, 800.3, 797.9, 794.4, 789.9, 756.4, 714.5, 671.4, 630.5, 593.2, 559.7, 530, 503.5, 459, 423, 393.3, 368.3, 346.9, 328.1, 311.6, 296.9, 283.7, 271.8, 261, 251.1, 242, 233.7, 200.3, 176.3, 158, 143.5 };
for(i=0; i<60; i++) {e[11][i]=e11[i]*MeV*cm2/g;}
AddData(T0, e11, 11);
name [12] = "G4_C";
G4double e12[60] = { 138.4, 169.5, 195.7, 218.8, 239.7, 270.2, 297.8, 322.7, 345.4, 365.1, 382.6, 398.7, 433.5, 462.4, 487.4, 509.9, 530, 547.7, 563.4, 577.6, 603.9, 628.3, 650.1, 668.6, 683.5, 695.3, 704.5, 711.4, 716.3, 719.4, 720.8, 720.9, 719.7, 717.4, 694.5, 661.1, 624.7, 589.1, 556, 526, 499.1, 475, 435.8, 404.4, 377.9, 354.6, 334, 315.9, 300.2, 286.2, 273.7, 262.4, 252.2, 242.7, 234.1, 226.1, 194.2, 171.1, 153.4, 139.4 };
for(i=0; i<60; i++) {e[12][i]=e12[i]*MeV*cm2/g;}
AddData(T0, e12, 12);
name [13] = "G4_GRAPHITE";
name [13] = "G4_GRAPHITE_POROUS";
G4double e13[60] = { 142.6, 175.3, 203.1, 228, 250.5, 283.4, 313.3, 340.4, 365.1, 386.7, 405.9, 423.5, 462, 494, 521.9, 546.9, 569.3, 589.2, 606.9, 622.9, 652.4, 679.9, 704.5, 725.3, 742.2, 755.6, 766.1, 774, 779.6, 783.1, 784.7, 784.8, 783.4, 780.7, 753.8, 714.5, 671.4, 629.1, 590.2, 555.6, 524.9, 497.7, 453.9, 419.3, 390.3, 365.1, 343, 323.7, 307.1, 292.3, 279.1, 267.3, 256.6, 246.8, 237.8, 229.5, 196.7, 173, 155, 140.8 };
for(i=0; i<60; i++) {e[13][i]=e13[i]*MeV*cm2/g;}
AddData(T0, e13, 13);
name [14] = "G4_ETHYLENE";
G4double e14[60] = { 225.8, 276.5, 319.3, 357, 391.1, 445.9, 494.9, 539.1, 579.6, 616, 649.5, 680.6, 742.9, 795.1, 840.1, 879.9, 914.8, 945.5, 972.4, 996.1, 1037, 1071, 1099, 1120, 1135, 1145, 1150, 1152, 1152, 1148, 1142, 1135, 1126, 1115, 1052, 981.5, 912.8, 849.7, 795.6, 749, 708.3, 672.4, 611.7, 562.1, 520.6, 485.3, 454.9, 428.4, 405.5, 385.2, 367.1, 350.8, 336.2, 322.8, 310.5, 299.3, 254.6, 222.7, 198.6, 179.6 };
for(i=0; i<60; i++) {e[14][i]=e14[i]*MeV*cm2/g;}
AddData(T0, e14, 14);
name [15] = "G4_C-552";
G4double e15[60] = { 119.2, 146, 168.6, 188.5, 206.5, 235.1, 260.7, 283.8, 305, 323.9, 341.3, 357.4, 390.7, 418.9, 443.7, 465.8, 485.7, 503.6, 519.5, 534.1, 560.1, 583.2, 603.2, 620, 633.7, 644.7, 653.4, 660.1, 665, 668.4, 670.3, 671.1, 670.7, 669.5, 652.9, 626.4, 596.2, 565.7, 537, 510.7, 486.8, 465.1, 427.5, 396.1, 369.6, 347, 327.4, 310.1, 294.9, 281.3, 269, 258, 247.9, 238.6, 230.2, 222.4, 191, 168.2, 150.8, 137 };
for(i=0; i<60; i++) {e[15][i]=e15[i]*MeV*cm2/g;}
AddData(T0, e15, 15);
name [16] = "G4_CARBON_DIOXIDE";
G4double e16[60] = { 106.4, 130.3, 150.4, 168.2, 184.2, 212.7, 237.9, 260.6, 281.4, 300.9, 319.1, 336.4, 370.9, 401.2, 428.3, 452.8, 475.1, 495.6, 514.4, 531.8, 562.6, 588.8, 611.2, 630.2, 646.1, 659.3, 670.1, 678.6, 685.2, 690, 693.2, 694.9, 695.4, 694.8, 679, 650.5, 617.3, 583.6, 552.1, 523.6, 497.8, 474.6, 434.7, 401.8, 374.3, 351, 330.9, 313.2, 297.6, 283.7, 271.2, 259.9, 249.6, 240.3, 231.7, 223.7, 191.9, 168.9, 151.4, 137.5 };
for(i=0; i<60; i++) {e[16][i]=e16[i]*MeV*cm2/g;}
AddData(T0, e16, 16);
name [17] = "G4_CALCIUM_FLUORIDE";
G4double e17[60] = { 74.48, 91.21, 105.3, 117.8, 129, 149, 166.5, 182.4, 197, 210.6, 223.4, 235.5, 259.6, 280.7, 299.6, 316.6, 332, 346.2, 359.1, 371.1, 392.2, 410.1, 425.2, 438, 448.7, 457.5, 464.6, 470.3, 474.7, 477.9, 480.1, 481.4, 481.9, 481.7, 473, 456.7, 437.6, 417.8, 398.6, 380.6, 364, 348.7, 322.9, 301.7, 283.5, 267.5, 253.4, 240.9, 229.8, 219.9, 210.8, 202.5, 194.8, 187.7, 181.3, 175.5, 151.6, 134.4, 121.1, 110.6 };
for(i=0; i<60; i++) {e[17][i]=e17[i]*MeV*cm2/g;}
AddData(T0, e17, 17);
name [18] = "G4_CERIC_SULFATE";
G4double e18[60] = { 135.4, 165.8, 191.5, 214.1, 234.5, 270.8, 302.8, 331.7, 358.2, 383, 406.2, 428.2, 471.7, 509.8, 543.6, 574, 601.5, 626.5, 649.3, 670.1, 706.4, 736.5, 761.2, 781.4, 797.4, 809.8, 819, 825.3, 829.2, 830.8, 830.6, 828.7, 825.4, 820.9, 785.9, 741.4, 696, 653.6, 618.4, 588.8, 562.8, 539.6, 499.3, 464.8, 434.6, 407.9, 384.2, 363.4, 344.9, 328.4, 313.6, 300.3, 288.2, 277.2, 267, 257.7, 220.4, 193.5, 173, 156.9 };
for(i=0; i<60; i++) {e[18][i]=e18[i]*MeV*cm2/g;}
AddData(T0, e18, 18);
name [19] = "G4_CELLULOSE_NITRATE";
G4double e19[60] = { 132.2, 161.9, 187, 209, 229, 262.6, 292.5, 319.4, 344.2, 366.8, 387.8, 407.5, 447, 481, 510.8, 537.6, 561.6, 583.2, 602.7, 620.4, 651.5, 677.9, 700, 718.2, 732.7, 744.1, 752.7, 759, 763.2, 765.5, 766.2, 765.5, 763.5, 760.6, 734.4, 698.2, 659.3, 621.4, 586, 553.8, 524.9, 498.9, 452.4, 413.9, 382.9, 358, 337.7, 319.7, 303.9, 289.7, 277.1, 265.6, 255.2, 245.6, 236.9, 228.8, 196.4, 173, 155, 140.8 };
for(i=0; i<60; i++) {e[19][i]=e19[i]*MeV*cm2/g;}
AddData(T0, e19, 19);
name [20] = "G4_BONE_CORTICAL_ICRP";
G4double e20[60] = { 123.5, 151.3, 174.7, 195.3, 214, 246.1, 274.5, 300.2, 323.8, 345.6, 365.9, 385, 423, 455.7, 484.7, 510.5, 533.8, 554.8, 573.7, 590.9, 620.8, 645.9, 666.5, 683.3, 696.6, 706.8, 714.4, 719.7, 723, 724.5, 724.5, 723.1, 720.6, 717.1, 689.6, 653.5, 615.8, 579.8, 546.6, 516.7, 490, 466.2, 426.1, 393.6, 366.6, 343.7, 324, 306.7, 291.5, 278, 265.8, 254.7, 244.7, 235.5, 227.1, 219.4, 188.4, 166.1, 149, 135.4 };
for(i=0; i<60; i++) {e[20][i]=e20[i]*MeV*cm2/g;}
AddData(T0, e20, 20);
name [21] = "G4_CESIUM_IODIDE";
G4double e21[60] = { 34.67, 42.46, 49.03, 54.82, 60.05, 69.34, 77.52, 84.92, 91.73, 98.06, 104, 109.6, 121, 130.9, 139.9, 148, 155.5, 162.3, 168.6, 174.5, 184.9, 194, 201.8, 208.5, 214.2, 219, 223, 226.3, 228.9, 231, 232.5, 233.4, 234, 234.1, 230.4, 221.9, 211.4, 200.6, 190.1, 180.6, 171.9, 164.1, 151.1, 140.6, 132.1, 125.1, 119.1, 114, 109.6, 105.6, 102.1, 98.92, 95.83, 92.83, 89.95, 87.22, 75.76, 67.41, 61.26, 56.63 };
for(i=0; i<60; i++) {e[21][i]=e21[i]*MeV*cm2/g;}
AddData(T0, e21, 21);
name [22] = "G4_Cu";
G4double e22[60] = { 34.9, 42.74, 49.35, 55.18, 60.45, 69.8, 78.04, 85.48, 92.33, 98.71, 104.7, 110.4, 121.4, 130.9, 139.2, 146.6, 153.2, 159, 164.3, 168.9, 176.9, 183.2, 188.4, 192.5, 195.9, 198.7, 201, 202.8, 204.4, 205.6, 206.7, 207.5, 208.2, 208.7, 209.9, 209.2, 207.5, 205.1, 202.3, 199.1, 195.8, 192.3, 185.4, 178.6, 172, 165.8, 159.6, 153.6, 148, 142.7, 137.8, 133.3, 129.1, 125.2, 121.7, 118.3, 104.7, 94.43, 86.45, 79.87 };
for(i=0; i<60; i++) {e[22][i]=e22[i]*MeV*cm2/g;}
AddData(T0, e22, 22);
name [23] = "G4_Fe";
G4double e23[60] = { 37.81, 46.31, 53.47, 59.78, 65.49, 75.62, 84.54, 92.61, 100, 106.9, 113.4, 119.6, 132, 143, 153, 162, 170.4, 178.2, 185.4, 192.2, 204.6, 215.6, 225.4, 234.2, 242.1, 249.2, 255.5, 261.2, 266.2, 270.7, 274.6, 278.1, 281, 283.6, 290.9, 291.5, 287.6, 281, 272.8, 263.9, 254.9, 246, 229.5, 214.8, 202.1, 191.1, 181.6, 173.4, 166.2, 159.7, 153.8, 148.5, 143.6, 139.1, 135, 131.1, 115.3, 103.5, 94.02, 86.52 };
for(i=0; i<60; i++) {e[23][i]=e23[i]*MeV*cm2/g;}
AddData(T0, e23, 23);
name [24] = "G4_FERROUS_SULFATE";
G4double e24[60] = { 135.1, 165.5, 191.1, 213.6, 234, 270.2, 302.1, 330.9, 357.4, 382.1, 405.3, 427.2, 470.7, 508.7, 542.4, 572.8, 600.3, 625.3, 648, 668.8, 705, 735.1, 759.9, 780.1, 796.1, 808.5, 817.7, 824.1, 827.9, 829.6, 829.4, 827.5, 824.2, 819.7, 784.9, 740.5, 695.1, 652.8, 617.8, 588.4, 562.8, 539.9, 499.9, 465.6, 435.5, 408.8, 385, 364.1, 345.6, 329.1, 314.3, 300.9, 288.8, 277.7, 267.6, 258.3, 220.8, 193.9, 173.4, 157.2 };
for(i=0; i<60; i++) {e[24][i]=e24[i]*MeV*cm2/g;}
AddData(T0, e24, 24);
name [25] = "G4_Gd";
G4double e25[60] = { 25.71, 31.49, 36.37, 40.66, 44.54, 51.43, 57.5, 62.99, 68.03, 72.73, 77.14, 81.32, 89.78, 97.24, 104, 110.1, 115.8, 121, 125.8, 130.4, 138.5, 145.7, 152.1, 157.7, 162.6, 166.9, 170.7, 173.9, 176.7, 179, 181, 182.5, 183.8, 184.7, 185.6, 182.1, 176.3, 169.4, 162.2, 155.2, 148.7, 142.6, 132, 123.3, 116.2, 110.2, 105, 100.6, 96.67, 93.2, 90.08, 87.27, 84.72, 82.38, 80.24, 78.26, 70.14, 63.87, 58.87, 54.76 };
for(i=0; i<60; i++) {e[25][i]=e25[i]*MeV*cm2/g;}
AddData(T0, e25, 25);
name [26] = "G4_Ge";
G4double e26[60] = { 45.91, 56.23, 64.93, 72.59, 79.52, 91.82, 102.7, 112.5, 121.5, 129.9, 137.7, 145.2, 159.7, 172.3, 183.3, 193.1, 201.7, 209.4, 216.3, 222.3, 232.3, 240, 245.6, 249.6, 252.3, 253.9, 254.5, 254.5, 253.9, 252.9, 251.5, 250, 248.2, 246.4, 236.5, 227.2, 218.9, 211.6, 205.1, 199.3, 193.9, 189, 180.1, 172.3, 165.2, 158.8, 152.6, 146.6, 140.9, 135.7, 130.8, 126.3, 122.1, 118.3, 114.7, 111.3, 97.72, 87.77, 80.18, 74.18 };
for(i=0; i<60; i++) {e[26][i]=e26[i]*MeV*cm2/g;}
AddData(T0, e26, 26);
name [27] = "G4_Pyrex_Glass";
G4double e27[60] = { 88.74, 108.7, 125.5, 140.3, 153.7, 177.5, 198.4, 217.4, 234.8, 251, 266.2, 280.6, 308.9, 333.6, 355.6, 375.3, 393.1, 409.2, 423.9, 437.3, 460.8, 480.4, 496.7, 510.2, 521.2, 530.1, 537.1, 542.5, 546.4, 549.1, 550.6, 551.2, 551, 550.1, 537.6, 518.1, 496.1, 473.9, 451.2, 429.2, 408.8, 390.1, 357.9, 331.5, 309.8, 291.7, 276.2, 262.4, 250.1, 239.1, 229.2, 220.2, 212, 204.6, 197.7, 191.4, 165.6, 146.7, 132.1, 120.4 };
for(i=0; i<60; i++) {e[27][i]=e27[i]*MeV*cm2/g;}
AddData(T0, e27, 27);
name [28] = "G4_H";
G4double e28[60] = { 746.5, 914.3, 1056, 1180, 1293, 1493, 1669, 1829, 1975, 2112, 2240, 2361, 2586, 2777, 2942, 3084, 3208, 3316, 3409, 3490, 3618, 3710, 3771, 3808, 3823, 3822, 3807, 3781, 3745, 3702, 3654, 3601, 3545, 3487, 3183, 2890, 2629, 2402, 2204, 2031, 1882, 1753, 1544, 1384, 1258, 1159, 1077, 1007, 947, 894.2, 847.5, 805.9, 768.6, 734.9, 704.3, 676.4, 566.7, 489.7, 432.5, 388.1 };
for(i=0; i<60; i++) {e[28][i]=e28[i]*MeV*cm2/g;}
AddData(T0, e28, 28);
name [29] = "G4_He";
G4double e29[60] = { 184.2, 225.6, 260.6, 291.3, 319.1, 368.5, 412, 451.3, 487.4, 521.1, 552.7, 582.6, 641.3, 691.9, 736.7, 776.6, 812.5, 844.9, 874.2, 900.8, 946.6, 984.1, 1014, 1039, 1058, 1072, 1083, 1089, 1093, 1094, 1093, 1090, 1085, 1079, 1032, 973, 911.2, 852.1, 797.5, 748.3, 704.5, 665.8, 600.4, 547.7, 504.5, 468.3, 437.7, 411.3, 388.2, 368, 349.9, 333.8, 319.3, 306.2, 294.2, 283.2, 239.6, 208.6, 185.2, 167 };
for(i=0; i<60; i++) {e[29][i]=e29[i]*MeV*cm2/g;}
AddData(T0, e29, 29);
name [30] = "G4_KAPTON";
G4double e30[60] = { 145.4, 178.1, 205.6, 229.9, 251.8, 286.2, 317.1, 344.9, 370.4, 393.1, 413.7, 432.9, 472.6, 506.1, 535.2, 561.3, 584.6, 605.3, 623.8, 640.4, 670.2, 696.5, 719.1, 737.7, 752.5, 763.9, 772.5, 778.6, 782.6, 784.6, 784.9, 783.8, 781.4, 778, 749.2, 710.6, 669.6, 630, 593.5, 560.4, 530.8, 504.4, 459.6, 423.3, 393.3, 368.2, 346.8, 328, 311.6, 296.9, 283.8, 272, 261.3, 251.5, 242.4, 234.1, 200.8, 176.8, 158.4, 143.8 };
for(i=0; i<60; i++) {e[30][i]=e30[i]*MeV*cm2/g;}
AddData(T0, e30, 30);
name [31] = "G4_Kr";
G4double e31[60] = { 45.92, 56.24, 64.94, 72.6, 79.53, 91.84, 102.7, 112.5, 121.5, 129.9, 137.8, 145.2, 160.1, 173.2, 184.9, 195.5, 205.1, 213.8, 221.8, 229.1, 242, 252.7, 261.6, 268.8, 274.6, 279, 282.3, 284.5, 285.8, 286.2, 286, 285.1, 283.8, 281.9, 268.6, 252.2, 236.2, 221.7, 209, 198.2, 188.9, 180.9, 168.1, 158.1, 150.2, 143.7, 138.1, 133.2, 128.8, 124.8, 121.2, 117.8, 114.6, 111.6, 108.8, 106.1, 94.63, 85.43, 77.91, 71.84 };
for(i=0; i<60; i++) {e[31][i]=e31[i]*MeV*cm2/g;}
AddData(T0, e31, 31);
name [32] = "G4_LITHIUM_TETRABORATE";
G4double e32[60] = { 111, 135.9, 157, 175.5, 192.2, 222, 248.2, 271.9, 293.6, 313.9, 333, 351, 386.5, 417.4, 444.8, 469.4, 491.6, 511.7, 530.1, 546.7, 575.8, 599.9, 619.8, 636, 649.1, 659.3, 667.2, 672.9, 676.7, 678.9, 679.6, 679.1, 677.6, 675.1, 653, 622.4, 589.5, 557.3, 525.5, 495.6, 468.4, 444.1, 403.1, 370.6, 344.6, 323.5, 305.9, 290.3, 276.4, 263.9, 252.7, 242.4, 233.2, 224.7, 216.9, 209.6, 180.4, 159.2, 142.8, 129.9 };
for(i=0; i<60; i++) {e[32][i]=e32[i]*MeV*cm2/g;}
AddData(T0, e32, 32);
name [33] = "G4_LITHIUM_FLUORIDE";
G4double e33[60] = { 80.87, 99.04, 114.4, 127.9, 140.1, 161.7, 180.8, 198.1, 214, 228.7, 242.6, 255.7, 281.9, 304.9, 325.4, 344, 360.9, 376.5, 390.8, 404, 427.6, 447.8, 465.3, 480.3, 493.1, 504.1, 513.3, 521.1, 527.4, 532.5, 536.5, 539.6, 541.7, 543, 540.3, 527.4, 509.2, 488.8, 467.4, 446.5, 426.9, 408.7, 376.9, 350.4, 328, 309.1, 292.7, 278.1, 265.1, 253.3, 242.5, 232.8, 223.9, 215.6, 208.2, 201.2, 173.1, 152.5, 136.8, 124.4 };
for(i=0; i<60; i++) {e[33][i]=e33[i]*MeV*cm2/g;}
AddData(T0, e33, 33);
name [34] = "G4_M3_WAX";
G4double e34[60] = { 198.1, 242.6, 280.2, 313.3, 343.1, 391.9, 435.4, 474.6, 510.6, 543.1, 573, 601, 656.7, 703.7, 744.4, 780.4, 812.2, 840.3, 865, 887, 925, 956.5, 982.1, 1002, 1016, 1026, 1032, 1035, 1036, 1033, 1029, 1023, 1016, 1007, 953.3, 891.9, 831.3, 775.4, 725.1, 680.6, 641.3, 606.6, 546.6, 497.8, 458.8, 427.4, 401.7, 379.2, 359.6, 342.2, 326.7, 312.7, 300.1, 288.5, 277.8, 268.1, 229.1, 201, 179.7, 162.8 };
for(i=0; i<60; i++) {e[34][i]=e34[i]*MeV*cm2/g;}
AddData(T0, e34, 34);
name [35] = "G4_MS20_TISSUE";
G4double e35[60] = { 174.4, 213.6, 246.7, 275.8, 302.1, 345, 383.2, 417.7, 449.4, 477.9, 504.3, 528.8, 578.1, 619.8, 656, 688.2, 716.7, 742, 764.4, 784.4, 819.3, 848.7, 872.8, 892, 906.4, 916.8, 923.7, 927.8, 929.4, 928.8, 926.4, 922.3, 916.9, 910.4, 866.6, 814.5, 762, 712.8, 668.3, 628.6, 593.3, 562.1, 507.7, 463.3, 427.6, 398.9, 375.3, 354.7, 336.7, 320.6, 306.2, 293.3, 281.6, 270.9, 261, 252, 215.7, 189.5, 169.6, 153.9 };
for(i=0; i<60; i++) {e[35][i]=e35[i]*MeV*cm2/g;}
AddData(T0, e35, 35);
name [36] = "G4_METHANE";
G4double e36[60] = { 272.8, 334.1, 385.8, 431.4, 472.5, 545.6, 610, 668.2, 721.8, 771.6, 818.4, 862.7, 949.2, 1024, 1090, 1148, 1200, 1246, 1288, 1325, 1387, 1436, 1473, 1500, 1518, 1528, 1532, 1530, 1524, 1514, 1501, 1485, 1467, 1447, 1338, 1227, 1127, 1041, 967.3, 904.6, 850.4, 803.2, 724.6, 661.8, 610.5, 567.7, 531.4, 499.8, 472.5, 448.3, 426.7, 407.4, 390, 374.1, 359.6, 346.4, 293.7, 256.2, 227.9, 205.7 };
for(i=0; i<60; i++) {e[36][i]=e36[i]*MeV*cm2/g;}
AddData(T0, e36, 36);
name [37] = "G4_Mo";
G4double e37[60] = { 40.18, 49.21, 56.82, 63.53, 69.59, 80.35, 89.84, 98.41, 106.3, 113.6, 120.5, 127, 140.2, 151.7, 162.1, 171.5, 180.1, 188, 195.4, 202.1, 214.3, 224.8, 233.8, 241.6, 248.3, 253.9, 258.7, 262.6, 265.7, 268.2, 270, 271.3, 272.1, 272.4, 268.7, 259.5, 248, 235.8, 224, 213.1, 203.1, 194.1, 178.9, 166.6, 156.5, 148.1, 141, 134.9, 129.5, 124.7, 120.4, 116.4, 112.6, 109.1, 105.8, 102.6, 89.8, 80.34, 73.15, 67.51 };
for(i=0; i<60; i++) {e[37][i]=e37[i]*MeV*cm2/g;}
AddData(T0, e37, 37);
name [38] = "G4_MUSCLE_WITH_SUCROSE";
G4double e38[60] = { 149.4, 183, 211.3, 236.2, 258.7, 298.3, 333.3, 364.8, 393.8, 420.8, 446, 469.8, 516.6, 557.2, 593.1, 625.2, 654, 680, 703.5, 724.8, 761.7, 792, 816.7, 836.5, 851.9, 863.6, 871.9, 877.4, 880.4, 881.2, 880.1, 877.3, 873.2, 867.9, 829.5, 781.9, 733.4, 688, 647.9, 612.8, 581.8, 554.2, 507.1, 468.4, 435.9, 408.3, 384.4, 363.5, 344.9, 328.4, 313.7, 300.3, 288.2, 277.2, 267, 257.7, 220.4, 193.5, 173, 156.9 };
for(i=0; i<60; i++) {e[38][i]=e38[i]*MeV*cm2/g;}
AddData(T0, e38, 38);
name [39] = "G4_MUSCLE_WITHOUT_SUCROSE";
G4double e39[60] = { 146.6, 179.5, 207.3, 231.8, 253.9, 292.9, 327.3, 358.4, 386.9, 413.5, 438.4, 461.9, 508.2, 548.4, 584, 615.8, 644.5, 670.4, 693.8, 715.1, 752, 782.3, 807.1, 827, 842.5, 854.3, 862.9, 868.5, 871.6, 872.6, 871.6, 869, 865, 859.8, 822, 774.9, 726.9, 682, 643, 609.2, 579.4, 552.9, 507.4, 469.6, 437.7, 410.1, 386.1, 365.1, 346.5, 329.9, 315, 301.6, 289.4, 278.3, 268.2, 258.8, 221.3, 194.3, 173.7, 157.5 };
for(i=0; i<60; i++) {e[39][i]=e39[i]*MeV*cm2/g;}
AddData(T0, e39, 39);
name [40] = "G4_MUSCLE_SKELETAL_ICRP";
G4double e40[60] = { 141.3, 173.1, 199.9, 223.5, 244.8, 282.5, 315.8, 345.8, 373.5, 399.2, 423.3, 446.1, 491.1, 530.2, 565, 596.1, 624.2, 649.7, 672.8, 693.8, 730.4, 760.6, 785.3, 805.3, 821.1, 833.1, 841.9, 847.9, 851.4, 852.6, 852, 849.7, 846.1, 841.2, 804.8, 758.9, 712.2, 668.5, 631.2, 599, 570.8, 545.6, 502.2, 465.8, 434.6, 407.5, 383.7, 362.8, 344.4, 327.9, 313.1, 299.8, 287.7, 276.7, 266.6, 257.3, 220, 193.2, 172.8, 156.7 };
for(i=0; i<60; i++) {e[40][i]=e40[i]*MeV*cm2/g;}
AddData(T0, e40, 40);
name [41] = "G4_MUSCLE_STRIATED_ICRU";
G4double e41[60] = { 141.7, 173.5, 200.4, 224, 245.4, 283.2, 316.5, 346.6, 374.3, 400, 424.2, 447, 492.1, 531.3, 566.1, 597.3, 625.4, 650.9, 674, 695.1, 731.6, 761.9, 786.7, 806.6, 822.4, 834.4, 843.3, 849.2, 852.6, 853.9, 853.2, 851, 847.3, 842.4, 805.8, 759.8, 713, 669.2, 632, 600.1, 572.1, 547.1, 504, 467.7, 436.5, 409.3, 385.3, 364.3, 345.7, 329.2, 314.4, 300.9, 288.8, 277.8, 267.6, 258.3, 220.8, 193.9, 173.4, 157.2 };
for(i=0; i<60; i++) {e[41][i]=e41[i]*MeV*cm2/g;}
AddData(T0, e41, 41);
name [42] = "G4_N";
G4double e42[60] = { 126.5, 155, 179, 200.1, 219.2, 253.1, 283, 310, 334.8, 357.9, 379.6, 400.2, 440.6, 475.8, 507, 535, 560.2, 583.1, 603.8, 622.7, 655.5, 682.7, 704.9, 722.9, 737.3, 748.4, 756.6, 762.3, 765.9, 767.5, 767.5, 766, 763.3, 759.4, 729.3, 689.8, 648.6, 609.1, 572.9, 540.4, 511.6, 486.2, 443.4, 408.8, 380.1, 356, 335.4, 317.2, 301.2, 286.8, 274.1, 262.6, 252.2, 242.7, 234, 225.9, 193.8, 170.5, 152.8, 138.8 };
for(i=0; i<60; i++) {e[42][i]=e42[i]*MeV*cm2/g;}
AddData(T0, e42, 42);
name [43] = "G4_SODIUM_IODIDE";
G4double e43[60] = { 41.1, 50.34, 58.12, 64.98, 71.19, 82.2, 91.9, 100.7, 108.7, 116.2, 123.3, 130, 143.4, 155.2, 165.8, 175.4, 184.2, 192.3, 199.7, 206.6, 219, 229.6, 238.9, 246.8, 253.5, 259.2, 264, 268, 271.1, 273.6, 275.4, 276.7, 277.4, 277.7, 273.7, 264.2, 252.3, 239.7, 227.6, 216.2, 205.9, 196.6, 180.7, 167.8, 157.3, 148.5, 141.1, 134.7, 129.1, 124.1, 119.7, 115.7, 111.9, 108.4, 105.1, 101.9, 88.79, 78.99, 71.48, 65.54 };
for(i=0; i<60; i++) {e[43][i]=e43[i]*MeV*cm2/g;}
AddData(T0, e43, 43);
name [44] = "G4_Ne";
G4double e44[60] = { 58.01, 71.05, 82.04, 91.73, 100.5, 116, 129.7, 142.1, 153.5, 164.1, 174, 183.5, 202.5, 219.3, 234.5, 248.3, 261, 272.8, 283.8, 294, 312.7, 329.2, 343.8, 356.9, 368.6, 379, 388.3, 396.5, 403.8, 410.2, 415.8, 420.7, 424.8, 428.4, 438.1, 437.9, 431.3, 420.8, 408.2, 394.6, 380.7, 367.1, 339, 313.8, 293.3, 277.2, 264.3, 252.6, 241.9, 232.2, 223.2, 215, 207.4, 200.4, 193.8, 187.7, 163, 144.6, 130.3, 118.9 };
for(i=0; i<60; i++) {e[44][i]=e44[i]*MeV*cm2/g;}
AddData(T0, e44, 44);
name [45] = "G4_NYLON_6/6";
name [45] = "G4_NYLON-6-6";
G4double e45[60] = { 191, 233.9, 270.1, 302, 330.8, 377.8, 419.7, 457.5, 492.1, 523.4, 552.3, 579.2, 633, 678.5, 717.9, 752.9, 783.8, 811.1, 835.3, 856.8, 894.2, 925.4, 951, 971, 985.8, 996.3, 1003, 1007, 1008, 1006, 1003, 997.7, 991.2, 983.5, 933.5, 875.4, 817.5, 763.6, 715, 671.7, 633.5, 599.6, 542.9, 497.4, 460.4, 429.7, 403.7, 381, 361.2, 343.6, 327.9, 313.8, 301, 289.3, 278.6, 268.8, 229.5, 201.3, 179.8, 162.9 };
for(i=0; i<60; i++) {e[45][i]=e45[i]*MeV*cm2/g;}
AddData(T0, e45, 45);
name [46] = "G4_O";
G4double e46[60] = { 99.46, 121.8, 140.7, 157.3, 172.3, 198.9, 222.4, 243.6, 263.1, 281.3, 298.4, 314.5, 346.6, 374.7, 399.8, 422.4, 443, 461.9, 479.1, 495, 523.1, 547, 567.2, 584.4, 598.7, 610.6, 620.2, 628, 633.9, 638.3, 641.3, 643, 643.6, 643.3, 630.5, 606.7, 578.3, 549.1, 520.9, 494.6, 470.9, 449.7, 413.2, 383.1, 357.8, 336.3, 317.6, 301.1, 286.3, 273.2, 261.3, 250.5, 240.8, 231.9, 223.7, 216.1, 185.7, 163.7, 146.7, 133.4 };
for(i=0; i<60; i++) {e[46][i]=e46[i]*MeV*cm2/g;}
AddData(T0, e46, 46);
name [47] = "G4_PARAFFIN";
G4double e47[60] = { 228.8, 280.2, 323.5, 361.7, 396.2, 451.9, 501.6, 546.5, 587.6, 624.6, 658.6, 690.2, 753.4, 806.4, 852.1, 892.4, 927.9, 959.1, 986.3, 1010, 1052, 1086, 1114, 1135, 1150, 1160, 1166, 1168, 1166, 1163, 1157, 1149, 1140, 1129, 1064, 992.4, 922.6, 858.6, 801.5, 751.1, 706.8, 667.8, 601.8, 548.9, 506.2, 471.3, 442.2, 416.9, 394.9, 375.4, 358, 342.3, 328.2, 315.3, 303.4, 292.6, 249.3, 218.3, 194.8, 176.3 };
for(i=0; i<60; i++) {e[47][i]=e47[i]*MeV*cm2/g;}
AddData(T0, e47, 47);
name [48] = "G4_Pb";
G4double e48[60] = { 15.4, 18.86, 21.78, 24.35, 26.68, 30.81, 34.44, 37.73, 40.75, 43.57, 46.21, 48.71, 53.82, 58.34, 62.45, 66.21, 69.7, 72.94, 75.98, 78.85, 84.11, 88.84, 93.13, 97.02, 100.6, 103.8, 106.8, 109.5, 111.9, 114.1, 116.2, 118, 119.6, 121.1, 126.1, 128.1, 127.9, 126.3, 123.6, 120.4, 116.9, 113.3, 106.4, 99.98, 94.37, 89.5, 85.18, 81.37, 78.01, 75.05, 72.42, 70.08, 67.99, 66.12, 64.44, 62.92, 56.88, 52.22, 48.46, 45.34 };
for(i=0; i<60; i++) {e[48][i]=e48[i]*MeV*cm2/g;}
AddData(T0, e48, 48);
name [49] = "G4_PHOTO_EMULSION";
G4double e49[60] = { 61.33, 75.12, 86.74, 96.97, 106.2, 122.2, 136.3, 149.1, 160.8, 171.6, 181.6, 191.1, 210, 226.3, 240.6, 253.5, 265, 275.4, 284.8, 293.3, 308, 320.3, 330.3, 338.4, 344.7, 349.4, 352.8, 355.1, 356.4, 356.9, 356.6, 355.7, 354.3, 352.4, 338.9, 322.3, 305.5, 289.9, 275.7, 263, 251.7, 241.5, 224.4, 210.3, 198.3, 188, 179, 171, 163.9, 157.5, 151.6, 146.3, 141.3, 136.6, 132.1, 128, 110.6, 97.75, 87.92, 80.2 };
for(i=0; i<60; i++) {e[49][i]=e49[i]*MeV*cm2/g;}
AddData(T0, e49, 49);
name [50] = "G4_PLASTIC_SC_VINYLTOLUENE";
G4double e50[60] = { 190.1, 232.8, 268.8, 300.5, 329.2, 374.1, 414.4, 450.7, 483.9, 513.5, 540.4, 565.4, 616.5, 659.2, 696, 728.7, 757.6, 783, 805.3, 825.2, 860.1, 890.2, 915.4, 935.4, 950.4, 961.1, 968.2, 972.3, 973.8, 973, 970.2, 965.7, 959.9, 952.8, 906, 850.6, 795.1, 743.3, 696.4, 654.7, 617.9, 585.3, 530.7, 487.1, 451.3, 421.4, 395.9, 373.7, 354.4, 337.2, 321.9, 308.1, 295.7, 284.2, 273.8, 264.1, 225.7, 198.1, 177.1, 160.5 };
for(i=0; i<60; i++) {e[50][i]=e50[i]*MeV*cm2/g;}
AddData(T0, e50, 50);
name [51] = "G4_POLYCARBONATE";
G4double e51[60] = { 164.8, 201.8, 233, 260.5, 285.4, 324.6, 359.7, 391.4, 420.3, 446.2, 469.7, 491.7, 536.5, 574.3, 607.1, 636.2, 662.2, 685.1, 705.4, 723.6, 755.9, 783.9, 807.7, 826.9, 841.7, 852.8, 860.8, 866, 868.8, 869.6, 868.6, 866, 862.1, 857.1, 820.5, 774.5, 727.2, 682.2, 641.1, 604.1, 571.2, 542, 492.3, 452.1, 419.1, 391.8, 368.6, 348.4, 330.7, 314.9, 300.8, 288.1, 276.7, 266.1, 256.5, 247.6, 212, 186.3, 166.8, 151.3 };
for(i=0; i<60; i++) {e[51][i]=e51[i]*MeV*cm2/g;}
AddData(T0, e51, 51);
name [52] = "G4_POLYETHYLENE";
G4double e52[60] = { 184.9, 226.5, 261.5, 292.4, 320.3, 369.9, 413.5, 453, 489.3, 523, 554.8, 584.8, 643.9, 695.3, 740.8, 781.4, 817.9, 850.9, 880.6, 907.5, 953.7, 990.9, 1021, 1044, 1061, 1073, 1081, 1084, 1085, 1083, 1078, 1072, 1064, 1054, 994.1, 927.8, 865, 808.9, 760.1, 717.9, 681.4, 649.7, 591.2, 541, 499.2, 464.9, 436.3, 411.4, 389.8, 370.6, 353.4, 338.1, 324.2, 311.4, 299.8, 289.1, 246.4, 215.9, 192.7, 174.4 };
for(i=0; i<60; i++) {e[52][i]=e52[i]*MeV*cm2/g;}
AddData(T0, e52, 52);
name [53] = "G4_POLYETHYLENE_TEREPHTHALATE_MYLAR";
name [53] = "G4_MYLAR";
G4double e53[60] = { 150.9, 184.9, 213.5, 238.7, 261.4, 297.8, 330.2, 359.6, 386.4, 410.5, 432.5, 453, 494.9, 530.3, 561.2, 588.8, 613.4, 635.3, 654.7, 672.3, 703.4, 730.5, 753.5, 772.3, 787, 798.3, 806.6, 812.4, 816, 817.6, 817.4, 815.8, 812.9, 808.9, 777.6, 736.5, 693.4, 651.9, 613.6, 579.1, 548.2, 520.6, 472.9, 434, 402.2, 376.1, 354.3, 335, 318.2, 303.2, 289.8, 277.7, 266.7, 256.6, 247.4, 238.9, 204.8, 180.2, 161.4, 146.5 };
for(i=0; i<60; i++) {e[53][i]=e53[i]*MeV*cm2/g;}
AddData(T0, e53, 53);
name [54] = "G4_PLEXIGLASS";
name [54] = "G4_PLEXIGLASS"; // POLYMETHYL METHACRALATE (LUCITE, PERSPEX, PLEXIGLASS
G4double e54[60] = { 174.9, 214.2, 247.4, 276.6, 303, 345.9, 384.1, 418.7, 450.4, 479, 505.2, 529.8, 579.1, 620.8, 657.1, 689.3, 717.9, 743.2, 765.7, 785.8, 820.8, 850.5, 875, 894.5, 909.3, 920.1, 927.4, 931.9, 933.9, 933.7, 931.6, 928, 922.9, 916.8, 874.4, 823.2, 771.3, 722.4, 676.2, 634, 596.2, 562.8, 507.2, 463.4, 428.5, 400.2, 376.7, 356.1, 338, 321.9, 307.5, 294.5, 282.8, 272, 262.1, 253, 216.6, 190.4, 170.3, 154.5 };
for(i=0; i<60; i++) {e[54][i]=e54[i]*MeV*cm2/g;}
AddData(T0, e54, 54);
name [55] = "G4_POLYPROPYLENE";
G4double e55[60] = { 197.6, 242, 279.4, 312.4, 342.2, 395.1, 441.8, 483.9, 522.7, 558.8, 592.7, 624.8, 687.3, 741.3, 789, 831.4, 869.4, 903.6, 934.3, 962, 1009, 1048, 1078, 1101, 1119, 1132, 1140, 1145, 1146, 1145, 1141, 1135, 1128, 1119, 1060, 991.7, 924.3, 862, 806.1, 756.5, 712.8, 674.2, 605.4, 548.6, 503.3, 467.5, 438.7, 413.6, 391.8, 372.4, 355.2, 339.7, 325.7, 312.9, 301.1, 290.4, 247.5, 216.8, 193.5, 175.1 };
for(i=0; i<60; i++) {e[55][i]=e55[i]*MeV*cm2/g;}
AddData(T0, e55, 55);
name [56] = "G4_POLYSTYRENE";
G4double e56[60] = { 186, 227.8, 263.1, 294.1, 322.2, 372.1, 416, 455.7, 492.2, 526.2, 558.1, 588.3, 645.3, 693.8, 735.8, 772.4, 804.5, 832.6, 857.2, 878.7, 913.5, 939.2, 957.2, 969, 975.6, 978, 976.8, 972.8, 966.5, 958.4, 948.9, 938.3, 926.9, 914.9, 851.3, 789.6, 734.2, 685.4, 642.9, 605.7, 573, 543.9, 499.5, 465.2, 435.8, 409.1, 384.6, 363.2, 344.6, 328.1, 313.3, 300, 288, 277, 266.8, 257.5, 220.4, 193.6, 173.2, 157 };
for(i=0; i<60; i++) {e[56][i]=e56[i]*MeV*cm2/g;}
AddData(T0, e56, 56);
name [57] = "G4_TEFLON";
G4double e57[60] = { 83.27, 102, 117.8, 131.7, 144.2, 165, 183.4, 200.1, 215.3, 229.2, 242, 254, 278.7, 300, 319, 336.2, 351.9, 366.1, 379.2, 391.2, 413.1, 432.7, 450, 465.1, 478, 489.1, 498.5, 506.4, 513, 518.4, 522.7, 526, 528.4, 530.1, 528.6, 516.7, 499.4, 479.6, 460.4, 442.3, 425.4, 409.6, 381.2, 356.4, 334.6, 315.4, 298.3, 283.1, 269.6, 257.4, 246.5, 236.5, 227.4, 219.1, 211.5, 204.4, 175.9, 155.2, 139.3, 126.7 };
for(i=0; i<60; i++) {e[57][i]=e57[i]*MeV*cm2/g;}
AddData(T0, e57, 57);
name [58] = "G4_POLYVINYL_CHLORIDE";
G4double e58[60] = { 140.2, 171.7, 198.3, 221.7, 242.8, 277.9, 309, 337.2, 363, 386.4, 408.1, 428.4, 468.9, 503.4, 533.6, 560.3, 584.1, 605.3, 624.1, 640.9, 670.1, 694.5, 714.3, 729.8, 741.4, 749.6, 755, 757.9, 758.6, 757.6, 755, 751, 746, 740, 701.3, 656.7, 612.9, 572.6, 538.7, 509.8, 484.7, 462.4, 424.2, 392.4, 365.3, 341.8, 321.1, 302.9, 287.3, 273.6, 261.3, 250.1, 240.1, 231.1, 222.7, 215, 184.5, 162.6, 145.9, 132.6 };
for(i=0; i<60; i++) {e[58][i]=e58[i]*MeV*cm2/g;}
AddData(T0, e58, 58);
name [59] = "G4_PROPANE";
G4double e59[60] = { 194.5, 234.7, 268.4, 298, 324.7, 372, 413.6, 451.2, 485.8, 518, 548.2, 576.8, 642.6, 702.2, 756.9, 808, 855.9, 901.2, 944.4, 985.6, 1063, 1135, 1203, 1267, 1327, 1385, 1440, 1492, 1543, 1592, 1639, 1684, 1728, 1770, 1964, 2131, 2277, 2404, 2516, 2613, 2698, 2771, 2887, 2969, 3022, 3053, 3065, 3061, 3046, 3021, 2990, 2953, 2912, 2868, 2822, 2775, 2564, 2372, 2191, 2022 };
G4double e59[60] = { 2.183E+02, 2.673E+02, 3.087E+02, 3.451E+02, 3.780E+02, 4.365E+02, 4.880E+02, 5.346E+02, 5.775E+02, 6.173E+02, 6.548E+02, 6.902E+02, 7.595E+02, 8.190E+02, 8.714E+02, 9.180E+02, 9.597E+02, 9.970E+02, 1.031E+03, 1.061E+03, 1.112E+03, 1.153E+03, 1.186E+03, 1.211E+03, 1.229E+03, 1.242E+03, 1.250E+03, 1.254E+03, 1.254E+03, 1.252E+03, 1.247E+03, 1.239E+03, 1.230E+03, 1.220E+03, 1.153E+03, 1.078E+03, 1.005E+03, 9.379E+02, 8.769E+02, 8.222E+02, 7.736E+02, 7.305E+02, 6.583E+02, 6.006E+02, 5.537E+02, 5.150E+02, 4.825E+02, 4.542E+02, 4.297E+02, 4.079E+02, 3.886E+02, 3.712E+02, 3.556E+02, 3.413E+02, 3.282E+02, 3.163E+02, 2.687E+02, 2.348E+02, 2.092E+02, 1.890E+02 };
for(i=0; i<60; i++) {e[59][i]=e59[i]*MeV*cm2/g;}
AddData(T0, e59, 59);
name [60] = "G4_Pt";
G4double e60[60] = { 30.79, 33.73, 36.43, 38.95, 41.31, 43.55, 48.11, 52.16, 55.83, 59.2, 62.32, 65.23, 67.95, 70.51, 75.22, 79.46, 83.3, 86.79, 89.97, 92.87, 95.51, 97.92, 100.1, 102.1, 103.9, 105.5, 107, 108.3, 112.7, 114.5, 114.4, 113, 110.8, 108.1, 105.3, 102.4, 96.92, 92.12, 87.91, 84.22, 80.97, 78.11, 75.56, 73.26, 71.17, 69.26, 67.5, 65.87, 64.36, 62.94, 57, 52.39, 48.67, 45.57, 42.94, 40.66, 38.67, 36.9, 33.91, 31.45 };
G4double e60[60] = { 1.377E+01, 1.687E+01, 1.947E+01, 2.177E+01, 2.385E+01, 2.754E+01, 3.079E+01, 3.373E+01, 3.643E+01, 3.895E+01, 4.131E+01, 4.355E+01, 4.811E+01, 5.216E+01, 5.583E+01, 5.920E+01, 6.232E+01, 6.523E+01, 6.795E+01, 7.051E+01, 7.522E+01, 7.946E+01, 8.330E+01, 8.679E+01, 8.997E+01, 9.287E+01, 9.551E+01, 9.792E+01, 1.001E+02, 1.021E+02, 1.039E+02, 1.055E+02, 1.070E+02, 1.083E+02, 1.127E+02, 1.145E+02, 1.144E+02, 1.130E+02, 1.108E+02, 1.081E+02, 1.053E+02, 1.024E+02, 9.692E+01, 9.212E+01, 8.791E+01, 8.422E+01, 8.097E+01, 7.811E+01, 7.556E+01, 7.326E+01, 7.117E+01, 6.926E+01, 6.750E+01, 6.587E+01, 6.436E+01, 6.294E+01, 5.700E+01, 5.239E+01, 4.867E+01, 4.557E+01 };
for(i=0; i<60; i++) {e[60][i]=e60[i]*MeV*cm2/g;}
AddData(T0, e60, 60);
name [61] = "G4_Si";
G4double e61[60] = { 105, 128.6, 148.5, 166, 181.8, 210, 234.8, 257.2, 277.8, 296.9, 315, 332, 364.6, 392.5, 416.7, 437.8, 456.3, 472.5, 486.6, 498.9, 518.4, 532.3, 541.6, 547, 549.2, 549, 546.8, 543, 538, 532.2, 525.7, 518.8, 511.7, 504.4, 468.7, 437.3, 410.7, 388.4, 369.4, 353, 338.7, 325.9, 304.1, 285.9, 270.3, 256.7, 245.2, 235.1, 225.9, 217.2, 209, 201.1, 193.6, 187, 180.9, 175.3, 152.3, 135.4, 122.2, 111.7 };
for(i=0; i<60; i++) {e[61][i]=e61[i]*MeV*cm2/g;}
AddData(T0, e61, 61);
name [62] = "G4_SILICON_DIOXIDE";
G4double e62[60] = { 85.64, 104.9, 121.1, 135.4, 148.3, 171.3, 191.5, 209.8, 226.6, 242.2, 256.9, 270.8, 298.1, 322, 343.1, 362.1, 379.3, 394.9, 409.1, 422.1, 444.8, 463.8, 479.7, 492.8, 503.6, 512.3, 519.2, 524.5, 528.5, 531.2, 532.9, 533.7, 533.6, 532.9, 521.9, 503.9, 483.5, 462.8, 442.9, 424.2, 406.7, 390.6, 358.9, 330.8, 307.6, 288.9, 273.6, 259.9, 247.8, 236.9, 227.1, 218.2, 210.1, 202.7, 195.9, 189.7, 164.2, 145.5, 131.1, 119.6 };
for(i=0; i<60; i++) {e[62][i]=e62[i]*MeV*cm2/g;}
AddData(T0, e62, 62);
name [63] = "G4_STILBENE";
G4double e63[60] = { 179.2, 219.5, 253.4, 283.3, 310.4, 352.2, 389.8, 423.8, 454.7, 482.3, 507.2, 530.3, 577.9, 617.7, 652.1, 682.6, 709.7, 733.5, 754.4, 773, 806.1, 835.1, 859.5, 879.2, 894.2, 905.1, 912.7, 917.4, 919.6, 919.6, 917.7, 914.2, 909.3, 903.3, 861.4, 810.7, 759.2, 710.8, 667.1, 628.3, 593.9, 563.4, 511.8, 470.2, 435.9, 407.2, 382.8, 361.4, 342.9, 326.4, 311.6, 298.4, 286.4, 275.4, 265.3, 256.1, 219, 192.4, 172.1, 156.1 };
for(i=0; i<60; i++) {e[63][i]=e63[i]*MeV*cm2/g;}
AddData(T0, e63, 63);
name [64] = "G4_Ti";
G4double e64[60] = { 60.88, 74.56, 86.1, 96.26, 105.4, 121.8, 136.1, 149.1, 161.1, 172.2, 182.6, 192.5, 212.3, 229.6, 245.1, 259.1, 271.8, 283.5, 294.2, 304.1, 321.6, 336.5, 349.1, 359.8, 368.7, 376, 382, 386.7, 390.2, 392.7, 394.4, 395.2, 395.3, 394.8, 385.4, 369.3, 351, 332.6, 315.4, 299.6, 285.5, 272.8, 251.3, 233.9, 219.6, 207.6, 197.4, 188.7, 181, 174.1, 167.9, 162.2, 157, 152.2, 147.7, 143.5, 126, 112.5, 101.7, 93.07 };
for(i=0; i<60; i++) {e[64][i]=e64[i]*MeV*cm2/g;}
AddData(T0, e64, 64);
name [65] = "G4_Sn";
G4double e65[60] = { 32.4, 39.68, 45.82, 51.23, 56.12, 64.8, 72.45, 79.36, 85.72, 91.64, 97.2, 102.5, 113.1, 122.4, 130.8, 138.5, 145.5, 151.9, 157.9, 163.4, 173.4, 182, 189.5, 196, 201.6, 206.4, 210.4, 213.8, 216.5, 218.7, 220.4, 221.6, 222.4, 222.9, 220.7, 213.8, 204.9, 195.4, 186, 177.3, 169.4, 162.3, 150.1, 140.3, 132.2, 125.5, 119.7, 114.7, 110.1, 106.1, 102.5, 99.14, 96.12, 93.34, 90.77, 88.4, 78.69, 71.47, 65.7, 60.79 };
for(i=0; i<60; i++) {e[65][i]=e65[i]*MeV*cm2/g;}
AddData(T0, e65, 65);
name [66] = "G4_TISSUE-METHANE";
G4double e66[60] = { 174.5, 213.8, 246.8, 276, 302.3, 349.1, 390.3, 427.6, 461.8, 493.7, 523.6, 552, 607.8, 656.2, 699.1, 737.4, 771.9, 803, 831.1, 856.5, 900.2, 935.6, 963.8, 985.9, 1003, 1015, 1022, 1027, 1028, 1027, 1023, 1018, 1011, 1002, 947.8, 885.5, 824.9, 769.7, 720.9, 678.2, 641, 608.6, 553.2, 507.9, 470.5, 439.1, 412.4, 389, 368.6, 350.5, 334.4, 319.8, 306.6, 294.6, 283.6, 273.5, 233.2, 204.4, 182.5, 165.2 };
for(i=0; i<60; i++) {e[66][i]=e66[i]*MeV*cm2/g;}
AddData(T0, e66, 66);
name [67] = "G4_TISSUE-PROPANE";
G4double e67[60] = { 169.9, 208.1, 240.3, 268.6, 294.3, 339.8, 379.9, 416.2, 449.5, 480.6, 509.7, 537.3, 591.5, 638.4, 679.9, 716.9, 750.2, 780.2, 807.4, 832, 874.4, 909.1, 937.1, 959.3, 976.6, 989.5, 998.7, 1005, 1008, 1008, 1006, 1003, 998, 991.7, 946.9, 891.9, 836, 783.4, 735.7, 693.2, 655.4, 622, 563.5, 515.3, 475.8, 443.4, 416.2, 392.6, 371.9, 353.6, 337.3, 322.5, 309.3, 297.1, 286, 275.8, 235.1, 206, 183.9, 166.5 };
for(i=0; i<60; i++) {e[67][i]=e67[i]*MeV*cm2/g;}
AddData(T0, e67, 67);
name [68] = "G4_TOLUENE";
G4double e68[60] = { 191.6, 234.7, 271, 302.9, 331.9, 377.2, 417.8, 454.5, 488, 517.9, 545.1, 570.4, 621.9, 665, 702.2, 735.2, 764.3, 790, 812.4, 832.5, 867.7, 897.9, 923.2, 943.3, 958.3, 969, 976, 980, 981.4, 980.4, 977.5, 972.9, 966.9, 959.8, 912.2, 856.2, 800.1, 747.8, 700.6, 658.5, 621.4, 588.5, 535.1, 492.8, 457.8, 427.9, 401.8, 379.1, 359.4, 341.9, 326.3, 312.3, 299.6, 287.9, 277.3, 267.5, 228.5, 200.4, 179.1, 162.3 };
for(i=0; i<60; i++) {e[68][i]=e68[i]*MeV*cm2/g;}
AddData(T0, e68, 68);
name [69] = "G4_U";
G4double e69[60] = { 18.38, 22.51, 25.99, 29.06, 31.83, 36.75, 41.09, 45.01, 48.62, 51.98, 55.13, 58.11, 64.19, 69.57, 74.44, 78.9, 83.02, 86.84, 90.42, 93.78, 99.92, 105.4, 110.3, 114.8, 118.8, 122.4, 125.7, 128.6, 131.2, 133.5, 135.6, 137.4, 139, 140.4, 144.4, 144.8, 142.7, 139.1, 134.5, 129.6, 124.2, 118.8, 108.7, 100, 92.78, 86.72, 81.64, 77.35, 73.71, 70.6, 67.92, 65.59, 63.56, 61.77, 60.19, 58.78, 53.33, 49.08, 45.62, 42.73 };
for(i=0; i<60; i++) {e[69][i]=e69[i]*MeV*cm2/g;}
AddData(T0, e69, 69);
name [70] = "G4_W";
G4double e70[60] = { 14.97, 18.34, 21.17, 23.67, 25.93, 29.94, 33.47, 36.67, 39.61, 42.34, 44.91, 47.34, 52.3, 56.7, 60.68, 64.33, 67.7, 70.84, 73.78, 76.55, 81.61, 86.15, 90.24, 93.95, 97.3, 100.3, 103.1, 105.6, 107.8, 109.9, 111.7, 113.3, 114.7, 116, 120, 121.2, 120.5, 118.5, 115.9, 112.9, 109.8, 106.7, 100.2, 94.14, 89.08, 85, 81.68, 78.78, 76.2, 73.88, 71.78, 69.86, 68.09, 66.45, 64.93, 63.5, 57.52, 52.9, 49.15, 46.04 };
for(i=0; i<60; i++) {e[70][i]=e70[i]*MeV*cm2/g;}
AddData(T0, e70, 70);
name [71] = "G4_WATER";
G4double e71[60] = { 133.7, 163.8, 189.1, 211.4, 231.6, 267.5, 299, 327.6, 353.8, 378.2, 401.2, 422.9, 466, 503.6, 537.2, 567.3, 594.6, 619.5, 642.1, 662.8, 698.9, 729, 753.8, 774, 790.1, 802.6, 811.9, 818.3, 822.3, 824.1, 823.9, 822.2, 819, 814.5, 780.1, 736, 695.9, 660.4, 628.6, 599.9, 573.7, 549.7, 507.5, 471.4, 440.1, 412.8, 388.8, 367.6, 348.9, 332.2, 317.2, 303.7, 291.4, 280.3, 270, 260.6, 222.8, 195.5, 174.8, 158.5 };
for(i=0; i<60; i++) {e[71][i]=e71[i]*MeV*cm2/g;}
AddData(T0, e71, 71);
name [72] = "G4_WATER_VAPOR";
G4double e72[60] = { 152.2, 186.5, 215.3, 240.7, 263.7, 304.5, 340.4, 372.9, 402.8, 430.6, 456.7, 481.4, 530.5, 573.2, 611.3, 645.4, 676.4, 704.4, 730, 753.3, 793.8, 827.4, 855, 877.2, 894.8, 908.2, 918.1, 924.7, 928.5, 929.9, 929.1, 926.5, 922.3, 916.9, 876.3, 825.9, 775.3, 728.5, 686.8, 650.1, 618, 589.9, 536.1, 489.2, 450.8, 420.2, 395.5, 373.8, 354.6, 337.5, 322.2, 308.3, 295.8, 284.4, 273.9, 264.3, 225.7, 198, 176.9, 160.4 };
for(i=0; i<60; i++) {e[72][i]=e72[i]*MeV*cm2/g;}
AddData(T0, e72, 72);
name [73] = "G4_Xe";
G4double e73[60] = { 38.1, 46.67, 53.88, 60.24, 65.99, 76.2, 85.2, 93.33, 100.8, 107.8, 114.3, 120.5, 132.8, 143.6, 153.2, 161.8, 169.6, 176.7, 183.2, 189.1, 199.4, 208, 215, 220.7, 225.2, 228.7, 231.2, 232.9, 233.9, 234.3, 234.1, 233.5, 232.5, 231.1, 221.3, 209.3, 197.4, 186.5, 177, 168.6, 161.3, 155, 144.4, 135.9, 128.8, 122.8, 117.5, 112.7, 108.4, 104.5, 101, 97.75, 94.8, 92.09, 89.6, 87.29, 77.8, 70.52, 64.84, 60.13 };
for(i=0; i<60; i++) {e[73][i]=e73[i]*MeV*cm2/g;}
AddData(T0, e73, 73);
}
void G4PSTARStopping::AddData(G4double* ekin, G4double* s, G4int idx)
{
sdata[idx] = new G4LPhysicsFreeVector(60, ekin[0]*MeV, ekin[59]*MeV);
const G4double fac = MeV*cm2/g;
for(size_t i=0; i<60; ++i) { sdata[idx]->PutValues(i, ekin[i]*MeV, s[i]*fac); }
sdata[idx]->SetSpline(true);
}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PairProductionRelModel.cc,v 1.3 2009/05/15 17:12:33 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4PairProductionRelModel.cc,v 1.4 2010/10/26 09:06:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -84,8 +84,6 @@ const G4double G4PairProductionRelModel::Finel_light[] = {0., 6.144 , 5.621 , 5.
G4PairProductionRelModel::G4PairProductionRelModel(const G4ParticleDefinition*,
const G4String& nam)
: G4VEmModel(nam),
theCrossSectionTable(0),
nbins(10),
fLPMconstant(fine_structure_const*electron_mass_c2*electron_mass_c2/(4.*pi*hbarc)*0.5),
fLPMflag(true),
lpmEnergy(0.),
@@ -98,72 +96,24 @@ G4PairProductionRelModel::G4PairProductionRelModel(const G4ParticleDefinition*,
nist = G4NistManager::Instance();
currentZ = z13 = z23 = lnZ = Fel = Finel = fCoulomb = phiLPM = gLPM = xiLPM = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4PairProductionRelModel::~G4PairProductionRelModel()
{
if(theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4PairProductionRelModel::Initialise(const G4ParticleDefinition*,
const G4DataVector&)
void G4PairProductionRelModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& cuts)
{
fParticleChange = GetParticleChangeForGamma();
if(theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
const G4ElementTable* theElementTable = G4Element::GetElementTable();
size_t nvect = G4Element::GetNumberOfElements();
theCrossSectionTable = new G4PhysicsTable(nvect);
G4PhysicsLogVector* ptrVector;
G4double emin = LowEnergyLimit();
G4double emax = HighEnergyLimit();
G4int n = nbins*G4int(log10(emax/emin));
G4bool spline = G4LossTableManager::Instance()->SplineFlag();
G4double e, value;
for(size_t j=0; j<nvect ; j++) {
ptrVector = new G4PhysicsLogVector(emin, emax, n);
ptrVector->SetSpline(spline);
G4double Z = (*theElementTable)[j]->GetZ();
G4VEmModel::SetCurrentElement((*theElementTable)[j]);
G4int iz = G4int(Z);
indexZ[iz] = j;
for(G4int i=0; i<nbins; i++) {
e = ptrVector->GetLowEdgeEnergy( i ) ;
value = ComputeCrossSectionPerAtom(theGamma, e, Z);
ptrVector->PutValue( i, value );
}
theCrossSectionTable->insert(ptrVector);
}
if(!fParticleChange) { fParticleChange = GetParticleChangeForGamma(); }
InitialiseElementSelectors(p, cuts);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
/*
G4double G4PairProductionRelModel::ComputeRelXSectionPerAtom(G4double k, G4double Z)
{
G4double cross = 0.0;
}
*/
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4PairProductionRelModel::ComputeXSectionPerAtom(G4double totalEnergy, G4double Z)
@@ -339,7 +289,7 @@ G4PairProductionRelModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*
{
// static const G4double gammaEnergyLimit = 1.5*MeV;
G4double crossSection = 0.0 ;
if ( Z < 1. ) return crossSection;
if ( Z < 0.9 ) return crossSection;
if ( gammaEnergy <= 2.0*electron_mass_c2 ) return crossSection;
SetCurrentElement(Z);
@@ -1,287 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4PolarizedComptonScattering.cc,v 1.18 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//---------- G4PolarizedComptonScattering physics process ----------------------
// by Vicente Lara, March 1998
//
// -----------------------------------------------------------------------------
// Corrections by Rui Curado da Silva (Nov. 2000)
// - Sampling of Phi
// - Depolarization probability
//
// 13-07-01, DoIt: suppression of production cut for the electron (mma)
// 20-09-01, DoIt: fminimalEnergy = 1*eV (mma)
// 04-05-05, Inheritance from ComptonScattering52 (V.Ivanchenko)
// 30-01-06, DoIt : return G4ComptonScattering52::PostStepDoIt(aTrack,aStep) mma
//
// -----------------------------------------------------------------------------
#include "G4PolarizedComptonScattering.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4PolarizedComptonScattering::G4PolarizedComptonScattering(const G4String& pname)
: G4ComptonScattering52 (pname)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VParticleChange* G4PolarizedComptonScattering::PostStepDoIt(
const G4Track& aTrack,
const G4Step& aStep)
//
// The scattered gamma energy is sampled according to Klein - Nishina formula.
// The random number techniques of Butcher & Messel are used
// (Nuc Phys 20(1960),15).
// GEANT4 internal units
//
// Note : Effects due to binding of atomic electrons are negliged.
{
aParticleChange.Initialize(aTrack);
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4ThreeVector GammaPolarization0 = aDynamicGamma->GetPolarization();
if (std::abs(GammaPolarization0.mag() - 1.e0) > 1.e-14)
return G4ComptonScattering52::PostStepDoIt(aTrack,aStep);
G4double GammaEnergy0 = aDynamicGamma->GetKineticEnergy();
G4double E0_m = GammaEnergy0 / electron_mass_c2;
G4ParticleMomentum GammaDirection0 = aDynamicGamma->GetMomentumDirection();
//
// sample the energy rate of the scattered gamma
//
G4double epsilon, epsilonsq, onecost, sint2, greject;
G4double epsilon0 = 1./(1. + 2*E0_m) , epsilon0sq = epsilon0*epsilon0;
G4double alpha1 = - log(epsilon0) , alpha2 = 0.5*(1.- epsilon0sq);
do {
if (alpha1/(alpha1+alpha2) > G4UniformRand())
{ epsilon = exp(-alpha1*G4UniformRand()); // epsilon0**r
epsilonsq = epsilon*epsilon; }
else {
epsilonsq = epsilon0sq + (1.- epsilon0sq)*G4UniformRand();
epsilon = sqrt(epsilonsq);
};
onecost = (1.- epsilon)/(epsilon*E0_m);
sint2 = onecost*(2.-onecost);
greject = 1. - epsilon*sint2/(1.+ epsilonsq);
} while (greject < G4UniformRand());
//
// Phi determination
//
G4double minimum=0., maximum=twopi, middle=0., resolution=0.001;
G4double Rand = G4UniformRand();
int j = 0;
while ((j < 100) && (std::abs(SetPhi(epsilon,sint2,middle,Rand)) > resolution))
{
middle = (maximum + minimum)/2;
if (SetPhi(epsilon,sint2,middle,Rand)*
SetPhi(epsilon,sint2,minimum,Rand)<0) maximum = middle;
else minimum = middle;
j++;
}
//
// scattered gamma angles. ( Z - axis along the parent gamma)
//
G4double cosTeta = 1. - onecost , sinTeta = sqrt (sint2);
G4double Phi = middle;
G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
//
// update G4VParticleChange for the scattered gamma
//
G4double GammaEnergy1 = epsilon*GammaEnergy0;
// New polarization
//
G4ThreeVector GammaPolarization1 = SetNewPolarization(epsilon,sint2,Phi,
cosTeta,
GammaPolarization0);
// Set new direction
G4ThreeVector GammaDirection1 ( dirx,diry,dirz );
// Change reference frame.
SystemOfRefChange(GammaDirection0,GammaDirection1,
GammaPolarization0,GammaPolarization1);
G4double localEnergyDeposit = 0.;
if (GammaEnergy1 > fminimalEnergy)
{
aParticleChange.ProposeEnergy(GammaEnergy1);
}
else
{
localEnergyDeposit += GammaEnergy1;
aParticleChange.ProposeEnergy(0.) ;
aParticleChange.ProposeTrackStatus(fStopAndKill);
}
//
// kinematic of the scattered electron
//
G4double ElecKineEnergy = GammaEnergy0 - GammaEnergy1;
if (ElecKineEnergy > fminimalEnergy)
{
G4double ElecMomentum = sqrt(ElecKineEnergy*
(ElecKineEnergy+2.*electron_mass_c2));
G4ThreeVector ElecDirection (
(GammaEnergy0*GammaDirection0 - GammaEnergy1*GammaDirection1)
*(1./ElecMomentum));
// create G4DynamicParticle object for the electron.
G4DynamicParticle* aElectron= new G4DynamicParticle (
G4Electron::Electron(),ElecDirection,ElecKineEnergy);
aParticleChange.SetNumberOfSecondaries(1);
aParticleChange.AddSecondary( aElectron );
}
else
{
aParticleChange.SetNumberOfSecondaries(0);
localEnergyDeposit += ElecKineEnergy;
}
aParticleChange.ProposeLocalEnergyDeposit(localEnergyDeposit);
// Reset NbOfInteractionLengthLeft and return aParticleChange
return G4VDiscreteProcess::PostStepDoIt( aTrack, aStep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4PolarizedComptonScattering::SetPhi(G4double EnergyRate,
G4double sinsqrth,
G4double phi,
G4double rand)
{
G4double cosphi = cos(phi), sinphi = sin(phi);
G4double PhiDetermination = ((twopi*rand - phi)
*(EnergyRate + 1./EnergyRate - sinsqrth))
+ (sinsqrth*sinphi*cosphi);
return PhiDetermination;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ThreeVector G4PolarizedComptonScattering::SetNewPolarization(
G4double EnergyRate,
G4double sinsqrth,
G4double phi,
G4double costheta,
G4ThreeVector&)
{
G4double cosphi = cos(phi), sinphi = sin(phi);
//// G4double ParallelIntensityPolar = EnergyRate + 1./EnergyRate
//// + 2. - 4.*sinsqrth*cosphi*cosphi;
G4double ParallelIntensityPolar = EnergyRate + 1./EnergyRate
- 2.*sinsqrth*cosphi*cosphi;
G4double PerpendiIntensityPolar = EnergyRate + 1./EnergyRate - 2.;
G4double PolarizationDegree = sqrt(sinsqrth*sinphi*sinphi+costheta*costheta);
G4double sintheta = sqrt(sinsqrth);
G4ThreeVector GammaPolarization1;
// depolarization probability (1-P)
if ( G4UniformRand() > (PerpendiIntensityPolar/ParallelIntensityPolar) )
{
// Parallel to initial polarization
GammaPolarization1.setX(PolarizationDegree);
GammaPolarization1.setY(-sinsqrth*sinphi*cosphi/PolarizationDegree);
GammaPolarization1.setZ(-sintheta*costheta*cosphi/PolarizationDegree);
}
else
{
// Perpendicular to initial polarization
GammaPolarization1.setX(0.);
GammaPolarization1.setY(costheta/PolarizationDegree);
GammaPolarization1.setZ(-sintheta*sinphi/PolarizationDegree);
};
return GammaPolarization1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4PolarizedComptonScattering::SystemOfRefChange(G4ThreeVector& Direction0,
G4ThreeVector& Direction1,
G4ThreeVector& Polarization0,
G4ThreeVector& Polarization1)
{
// Angles for go back to the original RS
G4double cosTeta0 = Direction0.cosTheta(), sinTeta0 = sin(Direction0.theta());
G4double cosPhi0 = cos(Direction0.phi()), sinPhi0 = sin(Direction0.phi());
G4double cosPsi, sinPsi;
if (sinTeta0 != 0. )
{
cosPsi = -Polarization0.z()/sinTeta0;
if (cosPhi0 != 0.)
sinPsi = (Polarization0.y() - cosTeta0*sinPhi0*cosPsi)/cosPhi0;
else sinPsi = -Polarization0.x()/sinPhi0;
}
else
{
cosPsi = Polarization0.x()/cosTeta0;
sinPsi = Polarization0.y();
}
G4double Psi = atan(sinPsi/cosPsi);
// Rotation along Z axe
Direction1.rotateZ(Psi);
//
Direction1.rotateUz(Direction0);
aParticleChange.ProposeMomentumDirection(Direction1);
// 3 Euler angles rotation for scattered photon polarization
Polarization1.rotateZ(Psi);
Polarization1.rotateUz(Direction0);
aParticleChange.ProposePolarization(Polarization1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UniversalFluctuation.cc,v 1.22 2009/03/20 18:11:23 urban Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4UniversalFluctuation.cc,v 1.28 2010/10/26 10:06:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -33,7 +33,7 @@
//
// File name: G4UniversalFluctuation
//
// Author: Vladimir Ivanchenko
// Author: Laszlo Urban
//
// Creation date: 03.01.2002
//
@@ -56,8 +56,11 @@
// regime any more (L.Urban)
// 03-04-07 correction to get better width of eloss distr.(L.Urban)
// 13-07-07 add protection for very small step or low-density material (VI)
// 19-03-09 new width correction (does not depend on previous steps) (L.Urban)
// 19-03-09 new width correction (does not depend on previous steps) (L.Urban)
// 20-03-09 modification in the width correction (L.Urban)
// 14-06-10 fixed tail distribution - do not use uniform function (L.Urban)
// 08-08-10 width correction algorithm has bee modified -->
// better results for thin targets (L.Urban)
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -81,10 +84,15 @@ G4UniversalFluctuation::G4UniversalFluctuation(const G4String& nam)
minNumberInteractionsBohr(10.0),
theBohrBeta2(50.0*keV/proton_mass_c2),
minLoss(10.*eV),
nmaxCont1(4.),
nmaxCont2(16.)
nmaxCont(16.),
rate(0.55),
fw(4.)
{
lastMaterial = 0;
particleMass = chargeSquare = ipotFluct = electronDensity = f1Fluct = f2Fluct
= e1Fluct = e2Fluct = e1LogFluct = e2LogFluct = ipotLogFluct = e0 = esmall
= e1 = e2 = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -117,10 +125,9 @@ G4double G4UniversalFluctuation::SampleFluctuations(const G4Material* material,
// shortcut for very very small loss (out of validity of the model)
//
if (meanLoss < minLoss)
return meanLoss;
if (meanLoss < minLoss) { return meanLoss; }
if(!particle) InitialiseMe(dp->GetDefinition());
if(!particle) { InitialiseMe(dp->GetDefinition()); }
G4double tau = dp->GetKineticEnergy()/particleMass;
G4double gam = tau + 1.0;
@@ -173,18 +180,9 @@ G4double G4UniversalFluctuation::SampleFluctuations(const G4Material* material,
ipotFluct = material->GetIonisation()->GetMeanExcitationEnergy();
ipotLogFluct = material->GetIonisation()->GetLogMeanExcEnergy();
e0 = material->GetIonisation()->GetEnergy0fluct();
esmall = 0.5*sqrt(e0*ipotFluct);
lastMaterial = material;
// modification of some model parameters
// (this part should go to materials later)
G4double p = 1.40;
f2Fluct *= p;
f1Fluct = 1.-f2Fluct;
G4double q = 1.00;
e2Fluct *= q;
e2LogFluct = log(e2Fluct);
e1LogFluct = (ipotLogFluct-f2Fluct*e2LogFluct)/f1Fluct;
e1Fluct = exp(e1LogFluct);
}
// very small step or low-density material
@@ -192,43 +190,55 @@ G4double G4UniversalFluctuation::SampleFluctuations(const G4Material* material,
G4double a1 = 0. , a2 = 0., a3 = 0. ;
// cut and material dependent rate
G4double rate = 1.0;
if(tmax > ipotFluct) {
G4double w2 = log(2.*electron_mass_c2*beta2*gam2)-beta2;
if(w2 > ipotLogFluct && w2 > e2LogFluct) {
rate = 0.03+0.23*log(log(tmax/ipotFluct));
if(w2 > ipotLogFluct && w2 > e2LogFluct && tmax> ipotFluct) {
G4double C = meanLoss*(1.-rate)/(w2-ipotLogFluct);
a1 = C*f1Fluct*(w2-e1LogFluct)/e1Fluct;
a2 = C*f2Fluct*(w2-e2LogFluct)/e2Fluct;
// correction in order to get better FWHM values
// ( scale parameters a1 and e1)
G4double width = 1.;
if(meanLoss > 10.*e1Fluct)
if(a1 < nmaxCont)
{
//small energy loss
G4double sa1 = sqrt(a1);
if(G4UniformRand() < exp(-sa1))
{
width = 3.1623/sqrt(meanLoss/e1Fluct);
if(width < a2/a1)
width = a2/a1;
e1 = esmall;
a1 = meanLoss*(1.-rate)/e1;
a2 = 0.;
e2 = e2Fluct;
}
a1 *= width;
e1 = e1Fluct/width;
else
{
a1 = sa1 ;
e1 = sa1*e1Fluct;
e2 = e2Fluct;
}
}
else
{
//not small energy loss
//correction to get better fwhm value
a1 /= fw;
e1 = fw*e1Fluct;
e2 = e2Fluct;
}
}
}
}
G4double w1 = tmax/e0;
if(tmax > e0)
a3 = rate*meanLoss*(tmax-e0)/(e0*tmax*log(w1));
//'nearly' Gaussian fluctuation if a1>nmaxCont2&&a2>nmaxCont2&&a3>nmaxCont2
//'nearly' Gaussian fluctuation if a1>nmaxCont&&a2>nmaxCont&&a3>nmaxCont
G4double emean = 0.;
G4double sig2e = 0., sige = 0.;
G4double p1 = 0., p2 = 0., p3 = 0.;
// excitation of type 1
if(a1 > nmaxCont2)
if(a1 > nmaxCont)
{
emean += a1*e1;
sig2e += a1*e1*e1;
@@ -242,7 +252,7 @@ G4double G4UniversalFluctuation::SampleFluctuations(const G4Material* material,
}
// excitation of type 2
if(a2 > nmaxCont2)
if(a2 > nmaxCont)
{
emean += a2*e2;
sig2e += a2*e2*e2;
@@ -261,9 +271,9 @@ G4double G4UniversalFluctuation::SampleFluctuations(const G4Material* material,
{
p3 = a3;
G4double alfa = 1.;
if(a3 > nmaxCont2)
if(a3 > nmaxCont)
{
alfa = w1*(nmaxCont2+a3)/(w1*nmaxCont2+a3);
alfa = w1*(nmaxCont+a3)/(w1*nmaxCont+a3);
G4double alfa1 = alfa*log(alfa)/(alfa-1.);
G4double namean = a3*w1*(alfa-1.)/((w1-1.)*alfa);
emean += namean*e0*alfa1;
@@ -0,0 +1,333 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UniversalFluctuation93.cc,v 1.2 2010/10/26 10:06:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4UniversalFluctuation93
//
// Author: V.Ivanchenko make a class with the Laszlo Urban model
//
// Creation date: 03.01.2002
//
// Modifications:
//
// 28-12-02 add method Dispersion (V.Ivanchenko)
// 07-02-03 change signature (V.Ivanchenko)
// 13-02-03 Add name (V.Ivanchenko)
// 16-10-03 Changed interface to Initialisation (V.Ivanchenko)
// 07-11-03 Fix problem of rounding of double
// 06-02-04 Add control on big sigma > 2*meanLoss (V.Ivanchenko)
// 26-04-04 Comment out the case of very small step (V.Ivanchenko)
// 07-02-05 define problim = 5.e-3 (mma)
// 03-05-05 conditions of Gaussian fluctuation changed (bugfix)
// + smearing for very small loss (L.Urban)
// 03-10-05 energy dependent rate -> cut dependence of the
// distribution is much weaker (L.Urban)
// 17-10-05 correction for very small loss (L.Urban)
// 20-03-07 'GLANDZ' part rewritten completely, no 'very small loss'
// regime any more (L.Urban)
// 03-04-07 correction to get better width of eloss distr.(L.Urban)
// 13-07-07 add protection for very small step or low-density material (VI)
// 19-03-09 new width correction (does not depend on previous steps) (L.Urban)
// 20-03-09 modification in the width correction (L.Urban)
// 14-06-10 saved version of 9.3 model with the name G4UniversalFluctuation93
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4UniversalFluctuation93.hh"
#include "Randomize.hh"
#include "G4Poisson.hh"
#include "G4Step.hh"
#include "G4Material.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4UniversalFluctuation93::G4UniversalFluctuation93(const G4String& nam)
:G4VEmFluctuationModel(nam),
particle(0),
minNumberInteractionsBohr(10.0),
theBohrBeta2(50.0*keV/proton_mass_c2),
minLoss(10.*eV),
nmaxCont1(4.),
nmaxCont2(16.)
{
lastMaterial = 0;
particleMass = chargeSquare = ipotFluct = electronDensity = f1Fluct = f2Fluct
= e1Fluct = e2Fluct = e1LogFluct = e2LogFluct = ipotLogFluct = e0
= e1 = e2 = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4UniversalFluctuation93::~G4UniversalFluctuation93()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4UniversalFluctuation93::InitialiseMe(const G4ParticleDefinition* part)
{
particle = part;
particleMass = part->GetPDGMass();
G4double q = part->GetPDGCharge()/eplus;
chargeSquare = q*q;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double
G4UniversalFluctuation93::SampleFluctuations(const G4Material* material,
const G4DynamicParticle* dp,
G4double& tmax,
G4double& length,
G4double& meanLoss)
{
// Calculate actual loss from the mean loss.
// The model used to get the fluctuations is essentially the same
// as in Glandz in Geant3 (Cern program library W5013, phys332).
// L. Urban et al. NIM A362, p.416 (1995) and Geant4 Physics Reference Manual
// shortcut for very very small loss (out of validity of the model)
//
if (meanLoss < minLoss)
return meanLoss;
if(!particle) InitialiseMe(dp->GetDefinition());
G4double tau = dp->GetKineticEnergy()/particleMass;
G4double gam = tau + 1.0;
G4double gam2 = gam*gam;
G4double beta2 = tau*(tau + 2.0)/gam2;
G4double loss(0.), siga(0.);
// Gaussian regime
// for heavy particles only and conditions
// for Gauusian fluct. has been changed
//
if ((particleMass > electron_mass_c2) &&
(meanLoss >= minNumberInteractionsBohr*tmax))
{
G4double massrate = electron_mass_c2/particleMass ;
G4double tmaxkine = 2.*electron_mass_c2*beta2*gam2/
(1.+massrate*(2.*gam+massrate)) ;
if (tmaxkine <= 2.*tmax)
{
electronDensity = material->GetElectronDensity();
siga = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
* electronDensity * chargeSquare;
siga = sqrt(siga);
G4double twomeanLoss = meanLoss + meanLoss;
if (twomeanLoss < siga) {
G4double x;
do {
loss = twomeanLoss*G4UniformRand();
x = (loss - meanLoss)/siga;
} while (1.0 - 0.5*x*x < G4UniformRand());
} else {
do {
loss = G4RandGauss::shoot(meanLoss,siga);
} while (loss < 0. || loss > twomeanLoss);
}
return loss;
}
}
// Glandz regime : initialisation
//
if (material != lastMaterial) {
f1Fluct = material->GetIonisation()->GetF1fluct();
f2Fluct = material->GetIonisation()->GetF2fluct();
e1Fluct = material->GetIonisation()->GetEnergy1fluct();
e2Fluct = material->GetIonisation()->GetEnergy2fluct();
e1LogFluct = material->GetIonisation()->GetLogEnergy1fluct();
e2LogFluct = material->GetIonisation()->GetLogEnergy2fluct();
ipotFluct = material->GetIonisation()->GetMeanExcitationEnergy();
ipotLogFluct = material->GetIonisation()->GetLogMeanExcEnergy();
e0 = material->GetIonisation()->GetEnergy0fluct();
lastMaterial = material;
// modification of some model parameters
// (this part should go to materials later)
G4double p = 1.40;
f2Fluct *= p;
f1Fluct = 1.-f2Fluct;
G4double q = 1.00;
e2Fluct *= q;
e2LogFluct = log(e2Fluct);
e1LogFluct = (ipotLogFluct-f2Fluct*e2LogFluct)/f1Fluct;
e1Fluct = exp(e1LogFluct);
}
// very small step or low-density material
if(tmax <= e0) return meanLoss;
G4double a1 = 0. , a2 = 0., a3 = 0. ;
// cut and material dependent rate
G4double rate = 1.0;
if(tmax > ipotFluct) {
G4double w2 = log(2.*electron_mass_c2*beta2*gam2)-beta2;
if(w2 > ipotLogFluct && w2 > e2LogFluct) {
rate = 0.03+0.23*log(log(tmax/ipotFluct));
G4double C = meanLoss*(1.-rate)/(w2-ipotLogFluct);
a1 = C*f1Fluct*(w2-e1LogFluct)/e1Fluct;
a2 = C*f2Fluct*(w2-e2LogFluct)/e2Fluct;
// correction in order to get better FWHM values
// ( scale parameters a1 and e1)
G4double width = 1.;
if(meanLoss > 10.*e1Fluct)
{
width = 3.1623/sqrt(meanLoss/e1Fluct);
if(width < a2/a1)
width = a2/a1;
}
a1 *= width;
e1 = e1Fluct/width;
e2 = e2Fluct;
}
}
G4double w1 = tmax/e0;
if(tmax > e0)
a3 = rate*meanLoss*(tmax-e0)/(e0*tmax*log(w1));
//'nearly' Gaussian fluctuation if a1>nmaxCont2&&a2>nmaxCont2&&a3>nmaxCont2
G4double emean = 0.;
G4double sig2e = 0., sige = 0.;
G4double p1 = 0., p2 = 0., p3 = 0.;
// excitation of type 1
if(a1 > nmaxCont2)
{
emean += a1*e1;
sig2e += a1*e1*e1;
}
else if(a1 > 0.)
{
p1 = G4double(G4Poisson(a1));
loss += p1*e1;
if(p1 > 0.)
loss += (1.-2.*G4UniformRand())*e1;
}
// excitation of type 2
if(a2 > nmaxCont2)
{
emean += a2*e2;
sig2e += a2*e2*e2;
}
else if(a2 > 0.)
{
p2 = G4double(G4Poisson(a2));
loss += p2*e2;
if(p2 > 0.)
loss += (1.-2.*G4UniformRand())*e2;
}
// ionisation
G4double lossc = 0.;
if(a3 > 0.)
{
p3 = a3;
G4double alfa = 1.;
if(a3 > nmaxCont2)
{
alfa = w1*(nmaxCont2+a3)/(w1*nmaxCont2+a3);
G4double alfa1 = alfa*log(alfa)/(alfa-1.);
G4double namean = a3*w1*(alfa-1.)/((w1-1.)*alfa);
emean += namean*e0*alfa1;
sig2e += e0*e0*namean*(alfa-alfa1*alfa1);
p3 = a3-namean;
}
G4double w2 = alfa*e0;
G4double w = (tmax-w2)/tmax;
G4int nb = G4Poisson(p3);
if(nb > 0)
for (G4int k=0; k<nb; k++) lossc += w2/(1.-w*G4UniformRand());
}
if(emean > 0.)
{
sige = sqrt(sig2e);
loss += max(0.,G4RandGauss::shoot(emean,sige));
}
loss += lossc;
return loss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4UniversalFluctuation93::Dispersion(
const G4Material* material,
const G4DynamicParticle* dp,
G4double& tmax,
G4double& length)
{
if(!particle) InitialiseMe(dp->GetDefinition());
electronDensity = material->GetElectronDensity();
G4double gam = (dp->GetKineticEnergy())/particleMass + 1.0;
G4double beta2 = 1.0 - 1.0/(gam*gam);
G4double siga = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
* electronDensity * chargeSquare;
return siga;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4UniversalFluctuation93::SetParticleAndCharge(
const G4ParticleDefinition* part, G4double q2)
{
if(part != particle) {
particle = part;
particleMass = part->GetPDGMass();
}
chargeSquare = q2;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel90.cc,v 1.13 2009/04/10 18:10:58 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4UrbanMscModel90.cc,v 1.16 2010/11/13 18:48:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -92,6 +92,15 @@ G4UrbanMscModel90::G4UrbanMscModel90(const G4String& nam)
theManager = G4LossTableManager::Instance();
inside = false;
insideskin = false;
skindepth = skin*stepmin;
mass = proton_mass_c2;
charge = 1.0;
currentKinEnergy = currentRange = currentRadLength = masslimite = masslimitmu
= lambda0 = lambdaeff = tPathLength = zPathLength = par1 = par2 = par3 = 0;
currentMaterialIndex = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -104,12 +113,19 @@ G4UrbanMscModel90::~G4UrbanMscModel90()
void G4UrbanMscModel90::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
skindepth = skin*stepmin;
skindepth = skin*stepmin;
if(isInitialized) return;
// set values of some data members
SetParticle(p);
if(p->GetPDGMass() < MeV) {
G4cout << "### WARNING: G4UrbanMscModel90 model is used for "
<< p->GetParticleName() << " !!! " << G4endl;
G4cout << "### This model should be used only for heavy particles"
<< G4endl;
}
fParticleChange = GetParticleChangeForMSC();
InitialiseSafetyHelper();
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4UrbanMscModel92.cc,v 1.1 2009/11/01 13:05:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4UrbanMscModel92.cc,v 1.4 2010/11/13 18:48:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -165,6 +165,14 @@ G4UrbanMscModel92::G4UrbanMscModel92(const G4String& nam)
inside = false;
insideskin = false;
skindepth = skin*stepmin;
mass = proton_mass_c2;
charge = ChargeSquare = 1.0;
currentKinEnergy = currentRadLength = lambda0 = lambdaeff = tPathLength
= zPathLength = par1 = par2 = par3 = 0;
currentMaterialIndex = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -182,6 +190,13 @@ void G4UrbanMscModel92::Initialise(const G4ParticleDefinition* p,
// set values of some data members
SetParticle(p);
if(p->GetPDGMass() > MeV) {
G4cout << "### WARNING: G4UrbanMscModel92 model is used for "
<< p->GetParticleName() << " !!! " << G4endl;
G4cout << "### This model should be used only for e+-"
<< G4endl;
}
fParticleChange = GetParticleChangeForMSC();
InitialiseSafetyHelper();
@@ -24,13 +24,13 @@
// ********************************************************************
//
//
// $Id: G4UrbanMscModel93.cc,v 1.1 2009/11/01 13:05:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4UrbanMscModel93.cc,v 1.9 2010/11/13 18:48:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
//
// GEANT4 Class file
//
//
//
// File name: G4UrbanMscModel93
//
@@ -165,6 +165,14 @@ G4UrbanMscModel93::G4UrbanMscModel93(const G4String& nam)
inside = false;
insideskin = false;
skindepth = skin*stepmin;
mass = proton_mass_c2;
charge = ChargeSquare = 1.0;
currentKinEnergy = currentRadLength = lambda0 = lambdaeff = tPathLength
= zPathLength = par1 = par2 = par3 = 0;
currentMaterialIndex = -1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -178,10 +186,18 @@ void G4UrbanMscModel93::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
skindepth = skin*stepmin;
if(isInitialized) return;
if(isInitialized) { return; }
// set values of some data members
SetParticle(p);
if(p->GetPDGMass() > MeV) {
G4cout << "### WARNING: G4UrbanMscModel93 model is used for "
<< p->GetParticleName() << " !!! " << G4endl;
G4cout << "### This model should be used only for e+-"
<< G4endl;
}
fParticleChange = GetParticleChangeForMSC();
InitialiseSafetyHelper();
@@ -459,16 +475,16 @@ G4double G4UrbanMscModel93::ComputeTruePathLengthLimit(
lambda0 = GetLambda(currentKinEnergy);
// stop here if small range particle
if(inside) return tPathLength;
if(inside) { return tPathLength; }
if(tPathLength > currentRange) tPathLength = currentRange;
if(tPathLength > currentRange) { tPathLength = currentRange; }
presafety = sp->GetSafety();
//G4cout << "G4Urban2::StepLimit tPathLength= "
// <<tPathLength<<" safety= " << presafety
// << " range= " <<currentRange<< " lambda= "<<lambda0
// << " Alg: " << steppingAlgorithm <<G4endl;
// G4cout << "G4Urban2::StepLimit tPathLength= "
// <<tPathLength<<" safety= " << presafety
// << " range= " <<currentRange<< " lambda= "<<lambda0
// << " Alg: " << steppingAlgorithm <<G4endl;
// far from geometry boundary
if(currentRange < presafety)
@@ -570,7 +586,26 @@ G4double G4UrbanMscModel93::ComputeTruePathLengthLimit(
if(tlimit < stepmin) tlimit = stepmin;
if(tPathLength > tlimit) tPathLength = tlimit ;
// randomize 1st step or 1st 'normal' step in volume
if((stepStatus == fUndefined) ||
((smallstep == skin) && !insideskin))
{
G4double temptlimit = tlimit;
if(temptlimit > tlimitmin)
{
do {
temptlimit = G4RandGauss::shoot(tlimit,0.3*tlimit);
} while ((temptlimit < tlimitmin) ||
(temptlimit > 2.*tlimit-tlimitmin));
}
else
temptlimit = tlimitmin;
if(tPathLength > temptlimit) tPathLength = temptlimit;
}
else
{
if(tPathLength > tlimit) tPathLength = tlimit ;
}
}
// for 'normal' simulation with or without magnetic field
@@ -616,8 +651,9 @@ G4double G4UrbanMscModel93::ComputeTruePathLengthLimit(
//lower limit for tlimit
if(tlimit < tlimitmin) tlimit = tlimitmin;
if(tPathLength > tlimit) tPathLength = tlimit;
}
// version similar to 7.1 (needed for some experiments)
@@ -1001,9 +1037,11 @@ G4double G4UrbanMscModel93::SimpleScattering(G4double xmeanth,G4double x2meanth)
G4double G4UrbanMscModel93::SampleDisplacement()
{
// compute rmean = sqrt(<r**2>) from theory
const G4double kappa = 2.5;
const G4double kappapl1 = kappa+1.;
const G4double kappami1 = kappa-1.;
// Compute rmean = sqrt(<r**2>) from theory
G4double rmean = 0.0;
if ((currentTau >= tausmall) && !insideskin) {
if (currentTau < taulim) {
@@ -1021,15 +1059,32 @@ G4double G4UrbanMscModel93::SampleDisplacement()
else rmean = 0.;
}
if(rmean == 0.) return rmean;
// protection against z > t ...........................
if(rmean > 0.) {
G4double zt = (tPathLength-zPathLength)*(tPathLength+zPathLength);
if(zt <= 0.)
rmean = 0.;
else if(rmean*rmean > zt)
rmean = sqrt(zt);
}
G4double rmax = (tPathLength-zPathLength)*(tPathLength+zPathLength);
if(rmax <= 0.)
rmax = 0.;
else
rmax = sqrt(rmax);
if(rmean >= rmax) return rmax;
return rmean;
// VI comment out for the time being
/*
//sample r (Gaussian distribution with a mean of rmean )
G4double r = 0.;
G4double sigma = min(rmean,rmax-rmean);
sigma /= 3.;
G4double rlow = rmean-3.*sigma;
G4double rhigh = rmean+3.*sigma;
do {
r = G4RandGauss::shoot(rmean,sigma);
} while ((r < rlow) || (r > rhigh));
return r;
*/
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WaterStopping.cc,v 1.18 2009/06/19 10:39:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4WaterStopping.cc,v 1.22 2010/10/26 10:06:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//---------------------------------------------------------------------------
//
@@ -53,6 +53,7 @@
G4WaterStopping::G4WaterStopping(G4EmCorrections* corr, G4bool splineFlag)
{
spline = splineFlag;
dedx.reserve(17);
Initialise(corr);
}
@@ -66,15 +67,16 @@ G4WaterStopping::~G4WaterStopping()
G4double G4WaterStopping::GetElectronicDEDX(G4int iz, G4double energy)
{
G4double res = 0.0;
if((iz > 26) || (iz < 3) || (iz > 18 && iz < 26)) return res;
G4bool b;
G4int idx = iz - 3;
if(iz == 26) { idx = 16; }
else if (iz < 3 || iz > 18) { return res; }
G4double scaledEnergy = energy/A[idx];
G4double emin = 0.025*MeV;
if(scaledEnergy < emin) {
res = (dedx[idx])->GetValue(emin, b)*std::sqrt(scaledEnergy/emin);
res = (*(dedx[idx]))[0]*std::sqrt(scaledEnergy/emin);
} else {
res = (dedx[idx])->GetValue(scaledEnergy, b);
res = (dedx[idx])->Value(scaledEnergy);
}
return res;
}
@@ -84,11 +86,11 @@ G4double G4WaterStopping::GetElectronicDEDX(G4int iz, G4double energy)
void G4WaterStopping::AddData(G4double* energy, G4double* stoppower,
G4double factor)
{
G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,energy[0],energy[52]);
G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,energy[0]*MeV,energy[52]*MeV);
pv->SetSpline(spline);
dedx.push_back(pv);
for(G4int i=0;i<53;i++) {
pv->PutValues(i,energy[i],stoppower[i]*factor);
for(G4int i=0; i<53; ++i) {
pv->PutValues(i,energy[i]*MeV,stoppower[i]*factor);
}
}
@@ -100,15 +102,13 @@ void G4WaterStopping::Initialise(G4EmCorrections* corr)
//..List of ions
G4int zz[17] = {3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,26};
G4int aa[17] = {7, 9, 11, 12, 14, 16, 19, 20, 23, 24, 27, 28,31,32, 35,40,56};
// G4double A_Ion[17] = {6.941,9.0122,10.811,12.011,14.007,15.999,18.998,20.180,22.990,24.305,26.982,28.086,30.974,32.065,35.453,39.948,55.845};
for(i=0; i<17; i++) {
for(i=0; i<17; ++i) {
Z[i] = zz[i];
A[i] = G4double(aa[i]);
}
//..Reduced energies
G4double E[53] = {0.025,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.15,0.2,0.25,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.5,2,2.5,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60,70,80,90,100,150,200,250,300,400,500,600,700,800,900,1000};
for(i=0; i<53; i++) {E[i] *= MeV;}
emin = E[0]*MeV;
G4double factor = 1000.*MeV/cm;
G4double G4_WATER_Li[53]={2.3193,2.5198,2.8539,3.1164,3.3203,3.4756,3.5914,3.6755,3.7347,3.8125,3.7349,3.6134,3.4818,3.2258,2.9949,2.7909,2.611,2.4517,2.3103,2.1841,1.7151,1.4139,1.2053,1.0525,0.84417,0.70862,0.61317,0.54214,0.48708,0.44305,0.40697,0.29312,0.23208,0.19364,0.16706,0.13252,0.11092,0.09608,0.08522,0.076915,0.07035,0.065026,0.048615,0.040137,0.034964,0.03149,0.027148,0.024579,0.022911,0.021761,0.020937,0.020327,0.019862};
@@ -148,6 +148,6 @@ void G4WaterStopping::Initialise(G4EmCorrections* corr)
AddData(E,G4_WATER_Fe,factor);
if(corr) {
for(i=0; i<17; i++) {corr->AddStoppingData(Z[i], aa[i], "G4_WATER", dedx[i]);}
for(i=0; i<17; ++i) {corr->AddStoppingData(Z[i], aa[i], "G4_WATER", dedx[i]);}
}
}
@@ -0,0 +1,352 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WentzelOKandVIxSection.cc,v 1.14 2010/11/13 19:08:27 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4WentzelOKandVIxSection
//
// Author: V.Ivanchenko
//
// Creation date: 09.04.2008 from G4MuMscModel
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4WentzelOKandVIxSection.hh"
#include "Randomize.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Proton.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4WentzelOKandVIxSection::ScreenRSquare[] = {0.0};
G4double G4WentzelOKandVIxSection::FormFactor[] = {0.0};
using namespace std;
G4WentzelOKandVIxSection::G4WentzelOKandVIxSection() :
numlimit(0.1),
nwarnings(0),
nwarnlimit(50),
alpha2(fine_structure_const*fine_structure_const)
{
fNistManager = G4NistManager::Instance();
fG4pow = G4Pow::GetInstance();
theElectron = G4Electron::Electron();
thePositron = G4Positron::Positron();
theProton = G4Proton::Proton();
lowEnergyLimit = 1.0*eV;
G4double p0 = electron_mass_c2*classic_electr_radius;
coeff = twopi*p0*p0;
particle = 0;
// Thomas-Fermi screening radii
// Formfactors from A.V. Butkevich et al., NIM A 488 (2002) 282
if(0.0 == ScreenRSquare[0]) {
G4double a0 = electron_mass_c2/0.88534;
G4double constn = 6.937e-6/(MeV*MeV);
ScreenRSquare[0] = alpha2*a0*a0;
for(G4int j=1; j<100; ++j) {
G4double x = a0*fG4pow->Z13(j);
ScreenRSquare[j] = alpha2*x*x;
x = fNistManager->GetA27(j);
FormFactor[j] = constn*x*x;
}
}
currentMaterial = 0;
elecXSRatio = factB = formfactA = screenZ = 0.0;
cosTetMaxElec = cosTetMaxNuc = invbeta2 = kinFactor = 1.0;
Initialise(theElectron, 1.0);
SetTargetMass(proton_mass_c2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4WentzelOKandVIxSection::~G4WentzelOKandVIxSection()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4WentzelOKandVIxSection::Initialise(const G4ParticleDefinition* p,
G4double CosThetaLim)
{
SetupParticle(p);
tkin = mom2 = 0.0;
ecut = etag = DBL_MAX;
targetZ = 0;
cosThetaMax = CosThetaLim;
G4double a =
G4LossTableManager::Instance()->FactorForAngleLimit()*CLHEP::hbarc/CLHEP::fermi;
factorA2 = 0.5*a*a;
currentMaterial = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4WentzelOKandVIxSection::SetupParticle(const G4ParticleDefinition* p)
{
particle = p;
mass = particle->GetPDGMass();
spin = particle->GetPDGSpin();
if(0.0 != spin) { spin = 0.5; }
G4double q = std::fabs(particle->GetPDGCharge()/eplus);
chargeSquare = q*q;
charge3 = chargeSquare*q;
tkin = 0.0;
currentMaterial = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double
G4WentzelOKandVIxSection::SetupTarget(G4int Z, G4double cut)
{
G4double cosTetMaxNuc2 = cosTetMaxNuc;
if(Z != targetZ || tkin != etag) {
etag = tkin;
targetZ = Z;
if(targetZ > 99) { targetZ = 99; }
SetTargetMass(fNistManager->GetAtomicMassAmu(targetZ)*amu_c2);
kinFactor = coeff*targetZ*chargeSquare*invbeta2/mom2;
screenZ = ScreenRSquare[targetZ]/mom2;
if(Z > 1) {
G4double tau = tkin/mass;
screenZ *=std::min(Z*invbeta2,
(1.13 +3.76*Z*Z*invbeta2*alpha2*std::sqrt(tau/(tau + fG4pow->Z23(Z)))));
}
if(targetZ == 1 && cosTetMaxNuc < 0.0 && particle == theProton) {
cosTetMaxNuc = 0.0;
}
formfactA = FormFactor[targetZ]*mom2;
// allowing do not compute scattering off e-
cosTetMaxElec = 1.0;
if(cut < DBL_MAX) {
if(mass < MeV) {
if(cosTetMaxNuc < 1.0 && cosTetMaxNuc > 0.0 && tkin < 10*cut) {
cosTetMaxNuc2 *= 0.1*tkin/cut;
}
}
ComputeMaxElectronScattering(cut);
}
}
return cosTetMaxNuc2;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double
G4WentzelOKandVIxSection::ComputeTransportCrossSectionPerAtom(G4double cosTMax)
{
G4double xsec = 0.0;
if(cosTMax >= 1.0) { return xsec; }
G4double xSection = 0.0;
G4double x = 0;
G4double y = 0;
G4double x1= 0;
G4double x2= 0;
G4double xlog = 0.0;
G4double costm = std::max(cosTMax,cosTetMaxElec);
G4double fb = screenZ*factB;
// scattering off electrons
if(costm < 1.0) {
x = (1.0 - costm)/screenZ;
x1= x/(1 + x);
if(x < numlimit) {
x2 = 0.5*x*x;
y = x2*(1.0 - 1.3333333*x + 3*x2);
} else {
xlog = log(1.0 + x);
y = xlog - x1;
}
if(0.0 < factB) {
if(x < numlimit) { y -= fb*x2*x*(0.6666667 - x); }
else { y -= fb*(x + x1 - 2*xlog); }
}
if(y < 0.0) {
++nwarnings;
if(nwarnings < nwarnlimit) {
G4cout << "G4WentzelOKandVIxSection::ComputeTransportCrossSectionPerAtom scattering on e- <0"
<< G4endl;
G4cout << "y= " << y
<< " e(MeV)= " << tkin << " p(MeV/c)= " << sqrt(mom2)
<< " Z= " << targetZ << " "
<< particle->GetParticleName() << G4endl;
G4cout << " 1-costm= " << 1.0-costm << " screenZ= " << screenZ
<< " x= " << x << G4endl;
}
y = 0.0;
}
xSection = y;
}
/*
G4cout << "G4WentzelVI:XS per A " << " Z= " << targetZ
<< " e(MeV)= " << tkin/MeV << " XSel= " << xSection
<< " cut(MeV)= " << ecut/MeV
<< " zmaxE= " << (1.0 - cosTetMaxElec)/screenZ
<< " zmaxN= " << (1.0 - cosThetaMax)/screenZ
<< " 1-costm= " << 1.0 - cosThetaMax << G4endl;
*/
// scattering off nucleus
if(cosTMax < 1.0) {
x = (1.0 - cosTMax)/screenZ;
x1= x/(1 + x);
if(x < numlimit) {
x2 = 0.5*x*x;
y = x2*(1.0 - 1.3333333*x + 3*x2);
} else {
xlog = log(1.0 + x);
y = xlog - x1;
}
if(0.0 < factB) {
if(x < numlimit) { y -= fb*x2*x*(0.6666667 - x); }
else { y -= fb*(x + x1 - 2*xlog); }
}
if(y < 0.0) {
++nwarnings;
if(nwarnings < nwarnlimit) {
G4cout << "G4WentzelOKandVIxSection::ComputeTransportCrossSectionPerAtom scattering on e- <0"
<< G4endl;
G4cout << "y= " << y
<< " e(MeV)= " << tkin << " Z= " << targetZ << " "
<< particle->GetParticleName() << G4endl;
G4cout << " formfactA= " << formfactA << " screenZ= " << screenZ
<< " x= " << " x1= " << x1 <<G4endl;
}
y = 0.0;
}
xSection += y*targetZ;
}
xSection *= kinFactor;
/*
G4cout << "Z= " << targetZ << " XStot= " << xSection/barn
<< " screenZ= " << screenZ << " formF= " << formfactA
<< " for " << particle->GetParticleName()
<< " m= " << mass << " 1/v= " << sqrt(invbeta2) << " p= " << sqrt(mom2)
<< " x= " << x
<< G4endl;
*/
return xSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector
G4WentzelOKandVIxSection::SampleSingleScattering(G4double cosTMin,
G4double cosTMax,
G4double elecRatio)
{
G4ThreeVector v(0.0,0.0,1.0);
G4double formf = formfactA;
G4double cost1 = cosTMin;
G4double cost2 = cosTMax;
if(elecRatio > 0.0) {
if(G4UniformRand() <= elecRatio) {
formf = 0.0;
cost1 = std::max(cost1,cosTetMaxElec);
cost2 = std::max(cost2,cosTetMaxElec);
}
}
if(cost1 < cost2) { return v; }
G4double w1 = 1. - cost1 + screenZ;
G4double w2 = 1. - cost2 + screenZ;
G4double z1 = w1*w2/(w1 + G4UniformRand()*(w2 - w1)) - screenZ;
if(factB > 0.0 || formf > 0.0 || factD > 0.01) {
G4double fm = 1.0 + formf*z1/(1.0 + (mass + tkin)*z1/targetMass);
G4double grej = (1. - z1*factB)/( (1.0 + z1*factD)*fm*fm );
if( G4UniformRand() > grej ) { return v; }
}
G4double cost = 1.0 - z1;
if(cost > 1.0) { cost = 1.0; }
else if(cost < -1.0) { cost =-1.0; }
G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
//G4cout << "sint= " << sint << G4endl;
G4double phi = twopi*G4UniformRand();
G4double vx1 = sint*cos(phi);
G4double vy1 = sint*sin(phi);
// only direction is changed
v.set(vx1,vy1,cost);
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void
G4WentzelOKandVIxSection::ComputeMaxElectronScattering(G4double cutEnergy)
{
G4double tmax = tkin;
if(mass > MeV) {
G4double ratio = electron_mass_c2/mass;
G4double tau = tkin/mass;
tmax = 2.0*electron_mass_c2*tau*(tau + 2.)/
(1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);
cosTetMaxElec = 1.0 - std::min(cutEnergy, tmax)*electron_mass_c2/mom2;
} else {
if(particle == theElectron) { tmax *= 0.5; }
G4double t = std::min(cutEnergy, tmax);
G4double mom21 = t*(t + 2.0*electron_mass_c2);
G4double t1 = tkin - t;
//G4cout <<"tkin=" <<tkin<<" tmax= "<<tmax<<" t= "
//<<t<< " t1= "<<t1<<" cut= "<<ecut<<G4endl;
if(t1 > 0.0) {
G4double mom22 = t1*(t1 + 2.0*mass);
G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);
if(ctm < 1.0) { cosTetMaxElec = ctm; }
//if(ctm < -1.0) { cosTetMaxElec = -1.0;}
if(particle == theElectron && cosTetMaxElec < 0.0) { cosTetMaxElec = 0.0; }
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
File diff suppressed because it is too large Load Diff
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4alphaIonisation.cc,v 1.1 2009/11/10 11:50:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4alphaIonisation.cc,v 1.3 2010/10/26 10:06:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -63,8 +63,7 @@ using namespace std;
G4alphaIonisation::G4alphaIonisation(const G4String& name)
: G4VEnergyLossProcess(name),
theParticle(0),
isInitialised(false),
nuclearStopping(true)
isInitialised(false)
{
// SetLinearLossLimit(0.15);
SetStepFunction(0.2, 0.1*mm);
@@ -73,6 +72,7 @@ G4alphaIonisation::G4alphaIonisation(const G4String& name)
// SetVerboseLevel(1);
mass = 0.0;
ratio = 0.0;
eth = 8*MeV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -84,7 +84,8 @@ G4alphaIonisation::~G4alphaIonisation()
G4bool G4alphaIonisation::IsApplicable(const G4ParticleDefinition& p)
{
return (p.GetPDGCharge() == 2*eplus);
return (!p.IsShortLived() &&
std::fabs(p.GetPDGCharge() - 2*CLHEP::eplus) < 0.01);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -121,38 +122,28 @@ void G4alphaIonisation::InitialiseEnergyLossProcess(
SetBaseParticle(theBaseParticle);
SetSecondaryParticle(G4Electron::Electron());
if (!EmModel(1)) SetEmModel(new G4BraggIonModel(), 1);
if (!EmModel(1)) { SetEmModel(new G4BraggIonModel(), 1); }
EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
// model limit defined for alpha
eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
EmModel(1)->SetHighEnergyLimit(eth);
if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); }
AddEmModel(1, EmModel(1), new G4IonFluctuations());
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
EmModel(2)->SetLowEnergyLimit(eth);
EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(2, EmModel(2), FluctModel());
isInitialised = true;
}
// reinitialisation of corrections for the new run
EmModel(1)->ActivateNuclearStopping(nuclearStopping);
EmModel(2)->ActivateNuclearStopping(nuclearStopping);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4alphaIonisation::PrintInfo()
{
if (G4Alpha::Alpha() == theParticle) {
if(EmModel(1) && EmModel(2)) {
G4cout << " NuclearStopping= " << nuclearStopping
<< G4endl;
}
}
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungModel.cc,v 1.44 2009/04/09 18:41:18 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4eBremsstrahlungModel.cc,v 1.48 2010/10/26 10:35:22 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -54,6 +54,7 @@
// 27-03-06 Fix calculation of fl parameter at low energy (energy loss) (VI)
// 15-02-07 correct LPMconstant by a factor 2, thanks to G. Depaola (mma)
// 09-09-08 MigdalConstant increased in (2pi)^2 times (A.Schaelicke)
// 13-10-10 Add angular distributon interface (VI)
//
// Class Description:
//
@@ -74,6 +75,7 @@
#include "G4ProductionCutsTable.hh"
#include "G4DataVector.hh"
#include "G4ParticleChangeForLoss.hh"
#include "G4ModifiedTsai.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -89,9 +91,12 @@ G4eBremsstrahlungModel::G4eBremsstrahlungModel(const G4ParticleDefinition* p,
LPMconstant(fine_structure_const*electron_mass_c2*electron_mass_c2/(4.*pi*hbarc)),
isInitialised(false)
{
if(p) SetParticle(p);
if(p) { SetParticle(p); }
theGamma = G4Gamma::Gamma();
minThreshold = 1.0*keV;
minThreshold = 0.1*keV;
SetAngularDistribution(new G4ModifiedTsai());
highKinEnergy = HighEnergyLimit();
lowKinEnergy = LowEnergyLimit();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -128,7 +133,7 @@ G4double G4eBremsstrahlungModel::MinEnergyCut(const G4ParticleDefinition*,
void G4eBremsstrahlungModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& cuts)
{
if(p) SetParticle(p);
if(p) { SetParticle(p); }
highKinEnergy = HighEnergyLimit();
lowKinEnergy = LowEnergyLimit();
const G4ProductionCutsTable* theCoupleTable=
@@ -171,8 +176,8 @@ G4double G4eBremsstrahlungModel::ComputeDEDXPerVolume(
G4double kineticEnergy,
G4double cutEnergy)
{
if(!particle) SetParticle(p);
if(kineticEnergy < lowKinEnergy) return 0.0;
if(!particle) { SetParticle(p); }
if(kineticEnergy < lowKinEnergy) { return 0.0; }
const G4double thigh = 100.*GeV;
@@ -271,7 +276,7 @@ G4double G4eBremsstrahlungModel::ComputeDEDXPerVolume(
}
dedx += loss;
}
if(dedx < 0.) dedx = 0.;
if(dedx < 0.) { dedx = 0.; }
return dedx;
}
@@ -412,11 +417,11 @@ G4double G4eBremsstrahlungModel::CrossSectionPerVolume(
G4double cutEnergy,
G4double maxEnergy)
{
if(!particle) SetParticle(p);
if(!particle) { SetParticle(p); }
G4double cross = 0.0;
G4double tmax = min(maxEnergy, kineticEnergy);
G4double cut = max(cutEnergy, minThreshold);
if(cut >= tmax) return cross;
if(cut >= tmax) { return cross; }
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomNumDensityVector = material->GetAtomicNumDensityVector();
@@ -494,7 +499,7 @@ G4double G4eBremsstrahlungModel::ComputeCrossSectionPerAtom(
{
G4double cross = 0.0 ;
if ( kineticEnergy < 1*keV || kineticEnergy < cut) return cross;
if ( kineticEnergy < 1*keV || kineticEnergy < cut) { return cross; }
static const G4double ksi=2.0, alfa=1.00;
static const G4double csigh = 0.127, csiglow = 0.25, asiglow = 0.020*MeV ;
@@ -663,7 +668,7 @@ void G4eBremsstrahlungModel::SampleSecondaries(std::vector<G4DynamicParticle*>*
{
G4double kineticEnergy = dp->GetKineticEnergy();
G4double tmax = min(maxEnergy, kineticEnergy);
if(tmin >= tmax) return;
if(tmin >= tmax) { return; }
//
// GEANT4 internal units.
@@ -708,8 +713,8 @@ void G4eBremsstrahlungModel::SampleSecondaries(std::vector<G4DynamicParticle*>*
G4double xmin = tmin/kineticEnergy;
G4double xmax = tmax/kineticEnergy;
G4double kappa = 0.0;
if(xmax >= 1.) xmax = 1.;
else kappa = log(xmax)/log(xmin);
if(xmax >= 1.) { xmax = 1.; }
else { kappa = log(xmax)/log(xmin); }
G4double epsilmin = tmin/totalEnergy;
G4double epsilmax = tmax/totalEnergy;
@@ -811,18 +816,6 @@ void G4eBremsstrahlungModel::SampleSecondaries(std::vector<G4DynamicParticle*>*
*/
} while( greject < G4UniformRand()*grejmax );
}
/*
if(x > 0.999) {
G4cout << "### G4eBremsstrahlungModel Warning: e= " << kineticEnergy
<< " tlow= " << tlow
<< " x= " << x
<< " greject= " << greject
<< " grejmax= " << grejmax
<< " migdal= " << migdal
<< G4endl;
// if(x >= 1.0) G4Exception("X=1");
}
*/
gammaEnergy = x*kineticEnergy;
if (LPMFlag()) {
@@ -836,19 +829,12 @@ void G4eBremsstrahlungModel::SampleSecondaries(std::vector<G4DynamicParticle*>*
} while (!LPMOK);
//
// angles of the emitted gamma. ( Z - axis along the parent particle)
// angles of the emitted gamma. ( Z - axis along the parent particle)
// use general interface
//
// universal distribution suggested by L. Urban
// (Geant3 manual (1993) Phys211),
// derived from Tsai distribution (Rev Mod Phys 49,421(1977))
G4double u;
const G4double a1 = 0.625 , a2 = 3.*a1 , d = 27. ;
if (9./(9.+d) > G4UniformRand()) u = - log(G4UniformRand()*G4UniformRand())/a1;
else u = - log(G4UniformRand()*G4UniformRand())/a2;
G4double theta = u*electron_mass_c2/totalEnergy;
G4double theta = GetAngularDistribution()->PolarAngle(totalEnergy,
totalEnergy-gammaEnergy,
(G4int)anElement->GetZ());
G4double sint = sin(theta);
@@ -900,20 +886,18 @@ const G4Element* G4eBremsstrahlungModel::SelectRandomAtom(
if(1 < nElements) {
--nElements;
G4DataVector* dv = partialSumSigma[couple->GetIndex()];
G4double rval = G4UniformRand()*((*dv)[nElements-1]);
G4double rval = G4UniformRand()*((*dv)[nElements]);
for (G4int i=0; i<nElements; i++) {
if (rval <= (*dv)[i]) elm = (*theElementVector)[i];
elm = (*theElementVector)[nElements];
for (G4int i=0; i<nElements; ++i) {
if (rval <= (*dv)[i]) {
elm = (*theElementVector)[i];
break;
}
}
if(!elm) {
G4cout << "G4eBremsstrahlungModel::SelectRandomAtom: Warning -"
<< " no elements found in "
<< material->GetName()
<< G4endl;
elm = (*theElementVector)[0];
}
} else elm = (*theElementVector)[0];
} else { elm = (*theElementVector)[0]; }
SetCurrentElement(elm);
return elm;
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungRelModel.cc,v 1.14 2009/04/09 18:41:18 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4eBremsstrahlungRelModel.cc,v 1.18 2010/11/04 17:30:32 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -41,6 +41,7 @@
//
// 13.11.08 add SetLPMflag and SetLPMconstant methods
// 13.11.08 change default LPMconstant value
// 13.10.10 add angular distributon interface (VI)
//
// Main References:
// Y.-S.Tsai, Rev. Mod. Phys. 46 (1974) 815; Rev. Mod. Phys. 49 (1977) 421.
@@ -64,7 +65,7 @@
#include "G4ProductionCutsTable.hh"
#include "G4ParticleChangeForLoss.hh"
#include "G4LossTableManager.hh"
#include "G4ModifiedTsai.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -89,16 +90,25 @@ G4eBremsstrahlungRelModel::G4eBremsstrahlungRelModel(const G4ParticleDefinition*
bremFactor(fine_structure_const*classic_electr_radius*classic_electr_radius*16./3.),
use_completescreening(true),isInitialised(false)
{
if(p) SetParticle(p);
theGamma = G4Gamma::Gamma();
minThreshold = 1.0*keV;
SetLowEnergyLimit(GeV);
minThreshold = 0.1*keV;
lowKinEnergy = GeV;
SetLowEnergyLimit(lowKinEnergy);
nist = G4NistManager::Instance();
InitialiseConstants();
SetLPMFlag(true);
SetAngularDistribution(new G4ModifiedTsai());
particleMass = kinEnergy = totalEnergy = currentZ = z13 = z23 = lnZ = Fel
= Finel = fCoulomb = fMax = densityFactor = densityCorr = lpmEnergy
= xiLPM = phiLPM = gLPM = klpm = kp = 0.0;
energyThresholdLPM = 1.e39;
InitialiseConstants();
if(p) { SetParticle(p); }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -124,8 +134,8 @@ void G4eBremsstrahlungRelModel::SetParticle(const G4ParticleDefinition* p)
{
particle = p;
particleMass = p->GetPDGMass();
if(p == G4Electron::Electron()) isElectron = true;
else isElectron = false;
if(p == G4Electron::Electron()) { isElectron = true; }
else { isElectron = false;}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -139,17 +149,18 @@ G4double G4eBremsstrahlungRelModel::MinEnergyCut(const G4ParticleDefinition*,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungRelModel::SetupForMaterial(const G4ParticleDefinition*,
const G4Material* mat, G4double kineticEnergy)
const G4Material* mat,
G4double kineticEnergy)
{
densityFactor = mat->GetElectronDensity()*fMigdalConstant;
lpmEnergy = mat->GetRadlen()*fLPMconstant;
// Threshold for LPM effect (i.e. below which LPM hidden by density effect)
if (LPMFlag())
if (LPMFlag()) {
energyThresholdLPM=sqrt(densityFactor)*lpmEnergy;
else
} else {
energyThresholdLPM=1.e39; // i.e. do not use LPM effect
}
// calculate threshold for density effect
kinEnergy = kineticEnergy;
totalEnergy = kineticEnergy + particleMass;
@@ -167,16 +178,15 @@ void G4eBremsstrahlungRelModel::SetupForMaterial(const G4ParticleDefinition*,
void G4eBremsstrahlungRelModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& cuts)
{
if(p) SetParticle(p);
if(p) { SetParticle(p); }
highKinEnergy = HighEnergyLimit();
lowKinEnergy = LowEnergyLimit();
currentZ = 0.;
InitialiseElementSelectors(p, cuts);
if(isInitialised) return;
if(isInitialised) { return; }
fParticleChange = GetParticleChangeForLoss();
isInitialised = true;
}
@@ -189,10 +199,10 @@ G4double G4eBremsstrahlungRelModel::ComputeDEDXPerVolume(
G4double kineticEnergy,
G4double cutEnergy)
{
if(!particle) SetParticle(p);
if(kineticEnergy < lowKinEnergy) return 0.0;
if(!particle) { SetParticle(p); }
if(kineticEnergy < lowKinEnergy) { return 0.0; }
G4double cut = std::min(cutEnergy, kineticEnergy);
if(cut == 0.0) return 0.0;
if(cut == 0.0) { return 0.0; }
SetupForMaterial(particle, material,kineticEnergy);
@@ -260,19 +270,19 @@ G4double G4eBremsstrahlungRelModel::ComputeCrossSectionPerAtom(
G4double cutEnergy,
G4double maxEnergy)
{
if(!particle) SetParticle(p);
if(kineticEnergy < lowKinEnergy) return 0.0;
if(!particle) { SetParticle(p); }
if(kineticEnergy < lowKinEnergy) { return 0.0; }
G4double cut = std::min(cutEnergy, kineticEnergy);
G4double tmax = std::min(maxEnergy, kineticEnergy);
if(cut >= tmax) return 0.0;
if(cut >= tmax) { return 0.0; }
SetCurrentElement(Z);
G4double cross = ComputeXSectionPerAtom(cut);
// allow partial integration
if(tmax < kinEnergy) cross -= ComputeXSectionPerAtom(tmax);
if(tmax < kinEnergy) { cross -= ComputeXSectionPerAtom(tmax); }
cross *= Z*Z*bremFactor;
@@ -389,7 +399,7 @@ void G4eBremsstrahlungRelModel::CalcLPMFunctions(G4double k)
// *** make sure suppression is smaller than 1 ***
// *** caused by Migdal approximation in xi ***
if (xiLPM*phiLPM>1. || s>0.57) xiLPM=1./phiLPM;
if (xiLPM*phiLPM>1. || s>0.57) { xiLPM=1./phiLPM; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -400,7 +410,7 @@ G4double G4eBremsstrahlungRelModel::ComputeRelDXSectionPerAtom(G4double gammaEne
// only valid for very high energies, but includes LPM suppression
// * complete screening
{
if(gammaEnergy < 0.0) return 0.0;
if(gammaEnergy < 0.0) { return 0.0; }
G4double y = gammaEnergy/totalEnergy;
G4double y2 = y*y*.25;
@@ -428,7 +438,7 @@ G4double G4eBremsstrahlungRelModel::ComputeDXSectionPerAtom(G4double gammaEnergy
// * no LPM effect
{
if(gammaEnergy < 0.0) return 0.0;
if(gammaEnergy < 0.0) { return 0.0; }
G4double y = gammaEnergy/totalEnergy;
@@ -464,10 +474,10 @@ void G4eBremsstrahlungRelModel::SampleSecondaries(
G4double maxEnergy)
{
G4double kineticEnergy = dp->GetKineticEnergy();
if(kineticEnergy < lowKinEnergy) return;
if(kineticEnergy < lowKinEnergy) { return; }
G4double cut = std::min(cutEnergy, kineticEnergy);
G4double emax = std::min(maxEnergy, kineticEnergy);
if(cut >= emax) return;
if(cut >= emax) { return; }
SetupForMaterial(particle, couple->GetMaterial(),kineticEnergy);
@@ -482,7 +492,7 @@ void G4eBremsstrahlungRelModel::SampleSecondaries(
// G4double fmax= fMax;
G4bool highe = true;
if(totalEnergy < energyThresholdLPM) highe = false;
if(totalEnergy < energyThresholdLPM) { highe = false; }
G4double xmin = log(cut*cut + densityCorr);
G4double xmax = log(emax*emax + densityCorr);
@@ -506,19 +516,13 @@ void G4eBremsstrahlungRelModel::SampleSecondaries(
} while (f < fMax*G4UniformRand());
//
// angles of the emitted gamma. ( Z - axis along the parent particle)
// angles of the emitted gamma. ( Z - axis along the parent particle)
// use general interface
//
// universal distribution suggested by L. Urban
// (Geant3 manual (1993) Phys211),
// derived from Tsai distribution (Rev Mod Phys 49,421(1977))
G4double theta = GetAngularDistribution()->PolarAngle(totalEnergy,
totalEnergy-gammaEnergy,
(G4int)currentZ);
G4double u;
const G4double a1 = 0.625 , a2 = 3.*a1 , d = 27. ;
if (9./(9.+d) > G4UniformRand()) u = - log(G4UniformRand()*G4UniformRand())/a1;
else u = - log(G4UniformRand()*G4UniformRand())/a2;
G4double theta = u*particleMass/totalEnergy;
G4double sint = sin(theta);
G4double phi = twopi * G4UniformRand();
G4ThreeVector gammaDirection(sint*cos(phi),sint*sin(phi), cos(theta));
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eCoulombScatteringModel.cc,v 1.78 2009/10/28 10:14:13 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4eCoulombScatteringModel.cc,v 1.91 2010/11/13 18:45:55 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -46,6 +46,8 @@
// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
// 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion
// 16.06.09 C.Consolandi fixed computation of effective mass
// 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to
// compute cross sections and sample scattering angle
//
//
// Class Description:
@@ -59,69 +61,50 @@
#include "Randomize.hh"
#include "G4DataVector.hh"
#include "G4ElementTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4ParticleChangeForGamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Proton.hh"
#include "G4ParticleTable.hh"
#include "G4ProductionCutsTable.hh"
#include "G4NucleiProperties.hh"
#include "G4Pow.hh"
#include "G4LossTableManager.hh"
#include "G4NistManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eCoulombScatteringModel::ScreenRSquare[] = {0.0};
G4double G4eCoulombScatteringModel::FormFactor[] = {0.0};
using namespace std;
G4eCoulombScatteringModel::G4eCoulombScatteringModel(const G4String& nam)
: G4VEmModel(nam),
cosThetaMin(1.0),
cosThetaMax(-1.0),
q2Limit(TeV*TeV),
alpha2(fine_structure_const*fine_structure_const),
faclim(100.0),
isInitialised(false)
{
fNistManager = G4NistManager::Instance();
theParticleTable = G4ParticleTable::GetParticleTable();
theElectron = G4Electron::Electron();
thePositron = G4Positron::Positron();
theProton = G4Proton::Proton();
currentMaterial = 0;
currentElement = 0;
lowEnergyLimit = 0.1*keV;
G4double p0 = electron_mass_c2*classic_electr_radius;
coeff = twopi*p0*p0;
tkin = targetZ = mom2 = DBL_MIN;
elecXSection = nucXSection = 0.0;
lowEnergyLimit = 1*eV;
recoilThreshold = 0.*keV;
ecut = DBL_MAX;
particle = 0;
currentCouple = 0;
wokvi = new G4WentzelOKandVIxSection();
// Thomas-Fermi screening radii
// Formfactors from A.V. Butkevich et al., NIM A 488 (2002) 282
currentMaterialIndex = 0;
if(0.0 == ScreenRSquare[0]) {
G4double a0 = electron_mass_c2/0.88534;
G4double constn = 6.937e-6/(MeV*MeV);
ScreenRSquare[0] = alpha2*a0*a0;
for(G4int j=1; j<100; j++) {
G4double x = a0*fNistManager->GetZ13(j);
ScreenRSquare[j] = alpha2*x*x;
x = fNistManager->GetA27(j);
FormFactor[j] = constn*x*x;
}
}
cosTetMinNuc = 1.0;
cosTetMaxNuc = -1.0;
elecRatio = 0.0;
mass = proton_mass_c2;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eCoulombScatteringModel::~G4eCoulombScatteringModel()
{}
{
delete wokvi;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -130,10 +113,14 @@ void G4eCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
{
SetupParticle(p);
currentCouple = 0;
elecXSection = nucXSection = 0.0;
tkin = targetZ = mom2 = DBL_MIN;
ecut = etag = DBL_MAX;
cosThetaMin = cos(PolarAngleLimit());
wokvi->Initialise(p, cosThetaMin);
/*
G4cout << "G4eCoulombScatteringModel: factorA2(GeV^2) = " << factorA2/(GeV*GeV)
<< " 1-cos(ThetaLimit)= " << 1 - cosThetaMin
<< " cos(thetaMax)= " << cosThetaMax
<< G4endl;
*/
pCuts = G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(3);
//G4cout << "!!! G4eCoulombScatteringModel::Initialise for "
// << p->GetParticleName() << " cos(TetMin)= " << cosThetaMin
@@ -150,36 +137,6 @@ void G4eCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4eCoulombScatteringModel::ComputeMaxElectronScattering(G4double cutEnergy)
{
ecut = cutEnergy;
G4double tmax = tkin;
cosTetMaxElec = 1.0;
if(mass > MeV) {
G4double ratio = electron_mass_c2/mass;
G4double tau = tkin/mass;
tmax = 2.0*electron_mass_c2*tau*(tau + 2.)/
(1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);
cosTetMaxElec = 1.0 - std::min(cutEnergy, tmax)*electron_mass_c2/mom2;
} else {
if(particle == theElectron) tmax *= 0.5;
G4double t = std::min(cutEnergy, tmax);
G4double mom21 = t*(t + 2.0*electron_mass_c2);
G4double t1 = tkin - t;
//G4cout << "tkin= " << tkin << " t= " << t << " t1= " << t1 << G4endl;
if(t1 > 0.0) {
G4double mom22 = t1*(t1 + 2.0*mass);
G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);
//G4cout << "ctm= " << ctm << G4endl;
if(ctm < 1.0) cosTetMaxElec = ctm;
if(ctm < -1.0) cosTetMaxElec = -1.0;
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4eCoulombScatteringModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kinEnergy,
@@ -189,72 +146,35 @@ G4double G4eCoulombScatteringModel::ComputeCrossSectionPerAtom(
//G4cout << "### G4eCoulombScatteringModel::ComputeCrossSectionPerAtom for "
// << p->GetParticleName()<<" Z= "<<Z<<" e(MeV)= "<< kinEnergy/MeV << G4endl;
G4double xsec = 0.0;
SetupParticle(p);
if(kinEnergy < lowEnergyLimit) return xsec;
SetupKinematic(kinEnergy, cutEnergy);
if(cosTetMaxNuc < cosTetMinNuc) {
SetupTarget(Z, kinEnergy);
xsec = CrossSectionPerAtom();
if(p != particle) { SetupParticle(p); }
// cross section is set to zero to avoid problems in sample secondary
if(kinEnergy < lowEnergyLimit) { return xsec; }
DefineMaterial(CurrentCouple());
cosTetMinNuc = wokvi->SetupKinematic(kinEnergy, currentMaterial);
if(cosThetaMax < cosTetMinNuc) {
G4int iz = G4int(Z);
cosTetMinNuc = wokvi->SetupTarget(iz, cutEnergy);
cosTetMaxNuc = cosThetaMax;
if(iz == 1 && cosTetMaxNuc < 0.0 && particle == theProton) {
cosTetMaxNuc = 0.0;
}
xsec = wokvi->ComputeNuclearCrossSection(cosTetMinNuc, cosTetMaxNuc);
elecRatio = wokvi->ComputeElectronCrossSection(cosTetMinNuc, cosThetaMax);
xsec += elecRatio;
if(xsec > 0.0) { elecRatio /= xsec; }
}
/*
G4cout << "e(MeV)= " << ekin/MeV << "cosTetMinNuc= " << cosTetMinNuc
<< " cosTetMaxNuc= " << cosTetMaxNuc
<< " cosTetMaxElec= " << cosTetMaxElec
G4cout << "e(MeV)= " << kinEnergy/MeV << " xsec(b)= " << xsec/barn
<< " 1-cosTetMinNuc= " << 1-cosTetMinNuc
<< " 1-cosTetMaxNuc2= " << 1-cosTetMaxNuc2
<< " 1-cosTetMaxElec= " << 1-cosTetMaxElec
<< " screenZ= " << screenZ
<< " formfactA= " << formfactA << G4endl;
*/
return xsec;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4eCoulombScatteringModel::CrossSectionPerAtom()
{
// This method needs initialisation before be called
//G4double fac = coeff*targetZ*chargeSquare*invbeta2/mom2;
G4double meff = targetMass/(mass+targetMass);
G4double fac = coeff*targetZ*chargeSquare*invbeta2/(mom2*meff*meff);
elecXSection = 0.0;
nucXSection = 0.0;
G4double x = 1.0 - cosTetMinNuc;
G4double x1 = x + screenZ;
if(cosTetMaxElec2 < cosTetMinNuc) {
elecXSection = fac*(cosTetMinNuc - cosTetMaxElec2)/
(x1*(1.0 - cosTetMaxElec2 + screenZ));
nucXSection = elecXSection;
}
//G4cout << "XS tkin(MeV)= " << tkin<<" xs= " <<nucXSection
// << " costmax= " << cosTetMaxNuc2
// << " costmin= " << cosTetMinNuc << " Z= " << targetZ <<G4endl;
if(cosTetMaxNuc2 < cosTetMinNuc) {
G4double s = screenZ*formfactA;
G4double z1 = 1.0 - cosTetMaxNuc2 + screenZ;
G4double s1 = 1.0 - s;
G4double d = s1/formfactA;
//G4cout <<"x1= "<<x1<<" z1= " <<z1<<" s= "<<s << " d= " <<d <<G4endl;
if(d < 0.2*x1) {
G4double x2 = x1*x1;
G4double z2 = z1*z1;
x = (1.0/(x1*x2) - 1.0/(z1*z2) - d*1.5*(1.0/(x2*x2) - 1.0/(z2*z2)))/
(3.0*formfactA*formfactA);
} else {
G4double x2 = x1 + d;
G4double z2 = z1 + d;
x = (1.0/x1 - 1.0/z1 + 1.0/x2 - 1.0/z2 - 2.0*log(z1*x2/(z2*x1))/d)/(s1*s1);
}
nucXSection += fac*targetZ*x;
}
//G4cout<<" cross(bn)= "<<nucXSection/barn<<" xsElec(bn)= "<<elecXSection/barn
// << " Asc= " << screenZ << G4endl;
return nucXSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eCoulombScatteringModel::SampleSecondaries(
@@ -265,11 +185,9 @@ void G4eCoulombScatteringModel::SampleSecondaries(
G4double)
{
G4double kinEnergy = dp->GetKineticEnergy();
if(kinEnergy < lowEnergyLimit) return;
DefineMaterial(couple);
if(kinEnergy < lowEnergyLimit) { return; }
SetupParticle(dp->GetDefinition());
SetupKinematic(kinEnergy, cutEnergy);
//G4cout << "G4eCoulombScatteringModel::SampleSecondaries e(MeV)= "
// << kinEnergy << " " << particle->GetParticleName()
// << " cut= " << cutEnergy<< G4endl;
@@ -278,32 +196,29 @@ void G4eCoulombScatteringModel::SampleSecondaries(
currentElement = SelectRandomAtom(couple,particle,
kinEnergy,cutEnergy,kinEnergy);
SetupTarget(currentElement->GetZ(),kinEnergy);
G4double Z = currentElement->GetZ();
if(ComputeCrossSectionPerAtom(particle,kinEnergy, Z,
kinEnergy, cutEnergy, kinEnergy) == 0.0)
{ return; }
G4int iz = G4int(Z);
G4int ia = SelectIsotopeNumber(currentElement);
targetMass = G4NucleiProperties::GetNuclearMass(ia, iz);
G4double cost = SampleCosineTheta();
G4double z1 = 1.0 - cost;
if(z1 < 0.0) return;
G4double targetMass = G4NucleiProperties::GetNuclearMass(ia, iz);
G4double sint = sqrt(z1*(1.0 + cost));
//G4cout<<"## Sampled sint= " << sint << " Z= " << targetZ << " A= " << ia
// << " screenZ= " << screenZ << " cn= " << formfactA << G4endl;
G4double phi = twopi * G4UniformRand();
G4ThreeVector newDirection =
wokvi->SampleSingleScattering(cosTetMinNuc, cosThetaMax, elecRatio);
G4double cost = newDirection.z();
G4ThreeVector direction = dp->GetMomentumDirection();
G4ThreeVector newDirection(cos(phi)*sint,sin(phi)*sint,cost);
newDirection.rotateUz(direction);
fParticleChange->ProposeMomentumDirection(newDirection);
// recoil sampling assuming a small recoil
// and first order correction to primary 4-momentum
G4double q2 = 2*z1*mom2;
G4double trec = q2/(sqrt(targetMass*targetMass + q2) + targetMass);
G4double mom2 = wokvi->GetMomentumSquare();
G4double trec = mom2*(1.0 - cost)/(targetMass + (mass + kinEnergy)*(1.0 - cost));
G4double finalT = kinEnergy - trec;
//G4cout<<"G4eCoulombScatteringModel: finalT= "<<finalT<<" Trec= "<<trec<<G4endl;
if(finalT <= lowEnergyLimit) {
@@ -331,50 +246,4 @@ void G4eCoulombScatteringModel::SampleSecondaries(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4eCoulombScatteringModel::SampleCosineTheta()
{
G4double costm = cosTetMaxNuc2;
G4double formf = formfactA;
G4double prob = 0.0;
G4double xs = CrossSectionPerAtom();
if(xs > 0.0) prob = elecXSection/xs;
// scattering off e or A?
if(G4UniformRand() < prob) {
costm = cosTetMaxElec2;
formf = 0.0;
}
/*
G4cout << "SampleCost: e(MeV)= " << tkin
<< " 1-ctmaxN= " << 1. - cosTetMinNuc
<< " 1-ctmax= " << 1. - costm
<< " Z= " << targetZ
<< G4endl;
*/
if(costm >= cosTetMinNuc) return 2.0;
G4double x1 = 1. - cosTetMinNuc + screenZ;
G4double x2 = 1. - costm + screenZ;
G4double x3 = cosTetMinNuc - costm;
G4double grej, z1;
do {
z1 = x1*x2/(x1 + G4UniformRand()*x3) - screenZ;
grej = 1.0/(1.0 + formf*z1);
} while ( G4UniformRand() > grej*grej );
if(mass > MeV) {
if(G4UniformRand() > (1. - z1*0.5)/(1.0 + z1*sqrt(mom2)/targetMass)) {
return 2.0;
}
}
//G4cout << "z1= " << z1 << " cross= " << nucXSection/barn
// << " crossE= " << elecXSection/barn << G4endl;
return 1.0 - z1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eMultipleScattering.cc,v 1.10 2009/11/01 13:05:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4eMultipleScattering.cc,v 1.12 2010/06/04 09:11:02 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -----------------------------------------------------------------------------
//
@@ -44,7 +44,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4eMultipleScattering.hh"
#include "G4UrbanMscModel92.hh"
#include "G4UrbanMscModel93.hh"
#include "G4MscStepLimitType.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -76,20 +76,13 @@ G4bool G4eMultipleScattering::IsApplicable (const G4ParticleDefinition& p)
void G4eMultipleScattering::InitialiseProcess(const G4ParticleDefinition*)
{
if(isInitialized) return;
if(isInitialized) { return; }
// initialisation of parameters - defaults for particles other
// than ions can be overwritten by users
G4VMscModel* mscUrban = new G4UrbanMscModel92();
G4VMscModel* mscUrban = new G4UrbanMscModel93();
AddEmModel(1,mscUrban);
isInitialized = true;
/*
G4cout << "G4eMultipleScattering::InitialiseProcess for "
<< p->GetParticleName()
<< " skin= " << Skin()
<< " SA= " << steppingAlgorithm
<< G4endl;
*/
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -97,11 +90,12 @@ void G4eMultipleScattering::InitialiseProcess(const G4ParticleDefinition*)
void G4eMultipleScattering::PrintInfo()
{
G4cout << " RangeFactor= " << RangeFactor()
<< ", step limit type: " << StepLimitType()
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
<< ", skin= " << Skin()
<< ", geomFactor= " << GeomFactor()
<< G4endl;
<< ", stepLimitType: " << StepLimitType()
<< ", latDisplacement: " << LateralDisplasmentFlag();
if(StepLimitType() == fUseDistanceToBoundary) {
G4cout << ", skin= " << Skin() << ", geomFactor= " << GeomFactor();
}
G4cout << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hIonisation.cc,v 1.82 2009/02/20 12:06:37 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4hIonisation.cc,v 1.86 2010/10/26 10:42:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -78,6 +78,7 @@
// positive from pi+ and p (VI)
// 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
// 12-09-08 Removed CorrectionsAlongStep (VI)
// 27-05-10 Added G4ICRU73QOModel for anti-protons (VI)
//
// -------------------------------------------------------------------
//
@@ -98,6 +99,7 @@
#include "G4PionMinus.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4ICRU73QOModel.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -105,15 +107,15 @@ using namespace std;
G4hIonisation::G4hIonisation(const G4String& name)
: G4VEnergyLossProcess(name),
isInitialised(false),
nuclearStopping(true)
isInitialised(false)
{
// SetStepFunction(0.2, 1.0*mm);
//SetStepFunction(0.2, 1.0*mm);
//SetIntegral(true);
//SetVerboseLevel(1);
SetProcessSubType(fIonisation);
mass = 0.0;
ratio = 0.0;
eth = 2*MeV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -150,6 +152,7 @@ void G4hIonisation::InitialiseEnergyLossProcess(
const G4ParticleDefinition* theBaseParticle = 0;
G4String pname = part->GetParticleName();
G4double q = part->GetPDGCharge();
// standard base particles
if(part == bpart || pname == "proton" ||
@@ -162,17 +165,14 @@ void G4hIonisation::InitialiseEnergyLossProcess(
// select base particle
else if(bpart == 0) {
if(part->GetPDGSpin() == 0.0)
if(part->GetPDGCharge() > 0.0 ) {
theBaseParticle = G4KaonPlus::KaonPlus();
} else {
theBaseParticle = G4KaonMinus::KaonMinus();
}
else if(part->GetPDGCharge() > 0.0) {
theBaseParticle = G4Proton::Proton();
if(part->GetPDGSpin() == 0.0) {
if(q > 0.0) { theBaseParticle = G4KaonPlus::KaonPlus(); }
else { theBaseParticle = G4KaonMinus::KaonMinus(); }
} else {
theBaseParticle = G4AntiProton::AntiProton();
if(q > 0.0) { theBaseParticle = G4Proton::Proton(); }
else { theBaseParticle = G4AntiProton::AntiProton(); }
}
// base particle defined by interface
} else {
theBaseParticle = bpart;
@@ -182,38 +182,38 @@ void G4hIonisation::InitialiseEnergyLossProcess(
mass = part->GetPDGMass();
ratio = electron_mass_c2/mass;
eth = 2.0*MeV*mass/proton_mass_c2;
if(mass < 900.*MeV) nuclearStopping = false;
if (!EmModel(1)) SetEmModel(new G4BraggModel(),1);
if (!EmModel(1)) {
if(q > 0.0) { SetEmModel(new G4BraggModel(),1); }
else { SetEmModel(new G4ICRU73QOModel(),1); }
}
EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
// model limit defined for protons
eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
//eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
EmModel(1)->SetHighEnergyLimit(eth);
AddEmModel(1, EmModel(1), new G4IonFluctuations());
if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); }
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
EmModel(2)->SetLowEnergyLimit(eth);
EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(2, EmModel(2), FluctModel());
isInitialised = true;
}
EmModel(1)->ActivateNuclearStopping(nuclearStopping);
EmModel(2)->ActivateNuclearStopping(nuclearStopping);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hIonisation::PrintInfo()
{
if(EmModel(1) && EmModel(2)) {
G4cout << " NuclearStopping= " << nuclearStopping
<< G4endl;
}
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hIonisation::ActivateNuclearStopping(G4bool)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hMultipleScattering.cc,v 1.16 2009/11/01 13:05:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4hMultipleScattering.cc,v 1.18 2010/04/16 09:01:24 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// -----------------------------------------------------------------------------
//
@@ -46,7 +46,6 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4hMultipleScattering.hh"
#include "G4UrbanMscModel.hh"
#include "G4UrbanMscModel90.hh"
#include "G4MscStepLimitType.hh"
@@ -89,10 +88,11 @@ void G4hMultipleScattering::PrintInfo()
{
G4cout << " RangeFactor= " << RangeFactor()
<< ", stepLimitType: " << StepLimitType()
<< ", latDisplacement: " << LateralDisplasmentFlag()
<< ", skin= " << Skin()
<< ", geomFactor= " << GeomFactor()
<< G4endl;
<< ", latDisplacement: " << LateralDisplasmentFlag();
if(StepLimitType() == fUseDistanceToBoundary) {
G4cout << ", skin= " << Skin() << ", geomFactor= " << GeomFactor();
}
G4cout << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ionIonisation.cc,v 1.70 2009/11/27 20:06:32 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4ionIonisation.cc,v 1.72 2010/10/26 10:42:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -65,7 +65,6 @@
#include "G4ionIonisation.hh"
#include "G4Electron.hh"
#include "G4Proton.hh"
//#include "G4Alpha.hh"
#include "G4GenericIon.hh"
#include "G4BraggModel.hh"
#include "G4BraggIonModel.hh"
@@ -82,11 +81,9 @@ using namespace std;
G4ionIonisation::G4ionIonisation(const G4String& name)
: G4VEnergyLossProcess(name),
corr(0),
theParticle(0),
isInitialised(false),
stopDataActive(true),
nuclearStopping(true)
stopDataActive(true)
{
SetLinearLossLimit(0.02);
SetStepFunction(0.1, 0.1*mm);
@@ -94,6 +91,7 @@ G4ionIonisation::G4ionIonisation(const G4String& name)
SetProcessSubType(fIonisation);
// SetVerboseLevel(1);
corr = G4LossTableManager::Instance()->EmCorrections();
eth = 2*MeV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -135,24 +133,24 @@ void G4ionIonisation::InitialiseEnergyLossProcess(
// define base particle
const G4ParticleDefinition* theBaseParticle = 0;
if(part == ion) theBaseParticle = 0;
else if(bpart == 0) theBaseParticle = ion;
else theBaseParticle = bpart;
if(part == ion) { theBaseParticle = 0; }
else if(bpart == 0) { theBaseParticle = ion; }
else { theBaseParticle = bpart; }
SetBaseParticle(theBaseParticle);
SetSecondaryParticle(G4Electron::Electron());
if (!EmModel(1)) SetEmModel(new G4BraggIonModel(), 1);
if (!EmModel(1)) { SetEmModel(new G4BraggIonModel(), 1); }
EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
// model limit defined for protons
eth = (EmModel(1)->HighEnergyLimit())*part->GetPDGMass()/proton_mass_c2;
EmModel(1)->SetHighEnergyLimit(eth);
if (!FluctModel()) SetFluctModel(new G4IonFluctuations());
if (!FluctModel()) { SetFluctModel(new G4IonFluctuations()); }
AddEmModel(1, EmModel(1), FluctModel());
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
EmModel(2)->SetLowEnergyLimit(eth);
EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(2, EmModel(2), FluctModel());
@@ -165,9 +163,7 @@ void G4ionIonisation::InitialiseEnergyLossProcess(
isInitialised = true;
}
// reinitialisation of corrections for the new run
EmModel(1)->ActivateNuclearStopping(nuclearStopping);
EmModel(2)->ActivateNuclearStopping(nuclearStopping);
if(part == ion) corr->InitialiseForNewRun();
if(part == ion) { corr->InitialiseForNewRun(); }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -177,7 +173,7 @@ void G4ionIonisation::PrintInfo()
if (stopDataActive && G4GenericIon::GenericIon() == theParticle) {
G4cout << " Stopping Power data for "
<< corr->GetNumberOfStoppingVectors()
<< " ion/material pairs, nuclearStopping: " << nuclearStopping
<< " ion/material pairs "
<< G4endl;
}
}