Index: trunk/source/processes/hadronic/cross_sections/src/G4PiNuclearCrossSection.cc
===================================================================
--- trunk/source/processes/hadronic/cross_sections/src/G4PiNuclearCrossSection.cc	(revision 1228)
+++ trunk/source/processes/hadronic/cross_sections/src/G4PiNuclearCrossSection.cc	(revision 1340)
@@ -75,5 +75,5 @@
  const G4double G4PiNuclearCrossSection::e2[39] = {
   .02, .04, .06, .08, .10, .11, .12, .13, .14,  .15, .16, .17, .18, .20, .22,
-  .24, .26, .28, .30, .35, .40, .45, .50, .55, .575, .60, .70, .80, .90,   1,   
+  .24, .26, .28, .30, .35, .40, .45, .50, .55, .575, .60, .70, .80, .90,   1,
     2,   3,   5,  10,  20,  50, 100, 500, 100000};
 
@@ -138,7 +138,7 @@
 
  const G4double G4PiNuclearCrossSection::na_m_t[31] = {
-  450, 545, 705, 910, 1020, 1075, 1087, 1080, 1042, 987, 943, 885, 790, 700, 650, 
-  610, 585, 575, 585,  595,  600,  610,  556,  524, 494, 458, 445, 429, 427, 427,
-  427};
+  450, 545, 705, 910, 1020, 1075, 1087, 1080, 1042, 987, 943, 885, 790, 700,
+  650, 610, 585, 575, 585,  595,  600,  610,  556,  524, 494, 458, 445, 429,
+  427, 427, 427};
 
  const G4double G4PiNuclearCrossSection::na_m_in[31] = {
@@ -156,12 +156,12 @@
 
  const G4double G4PiNuclearCrossSection::e3_1[31] = { 
-  0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 0.22, 0.25, 0.30, 0.35, 0.40,
-  0.45, 0.50, 0.60, 0.70, 0.80, 0.90,    1,    2,    3,    5,   10,   20,   50,  100,  500,
-  100000};
+  0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20,
+  0.22, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.60, 0.70, 0.80,
+  0.90, 1.0,  2.0,  3.0,  5.0, 10.0, 20.0, 50.0, 100.0, 500.0, 100000.0};
 
  const G4double G4PiNuclearCrossSection::al_m_t[31] = { 
-  532, 637, 832, 1057, 1207, 1230, 1210, 1174, 1133, 1095, 1038, 970, 890, 807, 750, 
-  710, 675, 665,  670,  673,  678,  682,  618,  574,  546,  520, 507, 495, 488, 488,  
-  488};
+  532, 637, 832, 1057, 1207, 1230, 1210, 1174, 1133, 1095,
+ 1038, 970, 890,  807,  750,  710,  675,  665,  670,  673,
+  678, 682, 618,  574,  546,  520,  507,  495,  488,  488,  488};
 
  const G4double G4PiNuclearCrossSection::al_m_in[31] = {
@@ -171,6 +171,6 @@
 
  const G4double G4PiNuclearCrossSection::al_p_t[21] = { 
-  225, 350, 616, 945, 1122, 1175, 1157, 1128, 1088, 1045, 988, 935, 870, 787, 730, 
-  690, 660, 652, 660,  668,  678};
+  225, 350, 616, 945, 1122, 1175, 1157, 1128, 1088, 1045,
+  988, 935, 870, 787, 730,   690,  660,  652,  660,  668,  678};
 
  const G4double G4PiNuclearCrossSection::al_p_in[21] = {
@@ -179,7 +179,7 @@
 
  const G4double G4PiNuclearCrossSection::ca_m_t[31] = { 
-  800, 980, 1240, 1460, 1570, 1600, 1580, 1535, 1475, 1425, 1375, 1295, 1200, 1083, 1000, 
-  948, 915,  895,  900,  908,  915,  922,  856,  795,  740,  705,  682,  660,  660,  660,
-  660};
+  800,  980, 1240, 1460, 1570, 1600, 1580, 1535, 1475, 1425,
+ 1375, 1295, 1200, 1083, 1000,  948,  915,  895,  900,  908,
+  915,  922,  856,  795,  740,  705,  682,  660,  660,  660, 660};
 
  const G4double G4PiNuclearCrossSection::ca_m_in[31] = {
@@ -222,14 +222,33 @@
  const G4double G4PiNuclearCrossSection::cd_m_t[34] = {3060, 3125, 3170, 3220, 3255, 3280, 3290, 3260, 3270, 3200, 3120, 3080, 3090, 2920, 2810, 2640, 2362, 2230, 2115, 2050, 2020, 2025, 2040, 2070, 2100, 1900, 1795, 1740, 1675, 1645, 1625, 1620, 1620, 1620};
  const G4double G4PiNuclearCrossSection::cd_m_in[34]= {1025, 1275, 1440, 1625, 1740, 1800, 1880, 1920, 1980, 1920, 1850, 1810, 1720, 1650, 1560, 1450, 1330, 1290, 1245, 1210, 1200, 1200, 1205, 1205, 1230, 1130, 1085, 1060, 1000,  985,  975,  970,  970,  970};
- const G4double G4PiNuclearCrossSection::cd_p_t[28] =  {455,  780, 1170, 1700, 2120, 2400, 2600, 2720, 2820, 2840, 2800, 2760, 2720, 2640, 2560, 2450, 2252, 2130, 2035, 1985, 1970, 1975, 2005, 2035, 2070, 1880, 1795, 1740};
- const G4double G4PiNuclearCrossSection::cd_p_in[28] = {310,  580,  880, 1060, 1270, 1400, 1530, 1610, 1660, 1680, 1640, 1600, 1560, 1500, 1430, 1330, 1280, 1230, 1200, 1180, 1170, 1175, 1180, 1180, 1210, 1120, 1085, 1060};
+
+ const G4double G4PiNuclearCrossSection::cd_p_t[28] =  {
+   455,  780, 1170, 1700, 2120, 2400, 2600, 2720, 2820, 2840,
+  2800, 2760, 2720, 2640, 2560, 2450, 2252, 2130, 2035, 1985,
+  1970, 1975, 2005, 2035, 2070, 1880, 1795, 1740};
+
+ const G4double G4PiNuclearCrossSection::cd_p_in[28] = {
+   310,  580,  880, 1060, 1270, 1400, 1530, 1610, 1660, 1680,
+  1640, 1600, 1560, 1500, 1430, 1330, 1280, 1230, 1200, 1180,
+  1170, 1175, 1180, 1180, 1210, 1120, 1085, 1060};
 
  const G4double G4PiNuclearCrossSection::e6[35] = {
-  0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 0.22, 0.25,  
-  0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.70, 0.80, 0.90,    1,    2,    3,    5,   10,   
-    20,   50,  100,  500, 100000};
-
- const G4double G4PiNuclearCrossSection::sn_m_t[35] =  {3000, 3180, 3250, 3300, 3300, 3410, 3470, 3450, 3410, 3350, 3280, 3200, 3120, 3050, 2900, 2630, 2500, 2325, 2190, 2100, 2060, 2055, 2055, 2055, 2067, 2085, 2000, 1900, 1835, 1770, 1720, 1700, 1695, 1695, 1695};
- const G4double G4PiNuclearCrossSection::sn_m_in[35] = {1050, 1350, 1520, 1650, 1800, 1980, 2070, 2120, 2090, 2050, 1980, 1920, 1830, 1770, 1670, 1500, 1435, 1350, 1300, 1230, 1220, 1235, 1235, 1235, 1237, 1240, 1160, 1120, 1090, 1065, 1040, 1020, 1015, 1015, 1015};
+  0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.14,
+  0.16, 0.18, 0.20, 0.22, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50,
+  0.55, 0.60, 0.70, 0.80, 0.90, 1.0,  2.0,  3.0,  5.0, 10.0,   
+ 20.0, 50.0, 100.0, 500.0, 100000.0};
+
+ const G4double G4PiNuclearCrossSection::sn_m_t[35] = {
+  3000, 3180, 3250, 3300, 3300, 3410, 3470, 3450, 3410, 3350,
+  3280, 3200, 3120, 3050, 2900, 2630, 2500, 2325, 2190, 2100,
+  2060, 2055, 2055, 2055, 2067, 2085, 2000, 1900, 1835, 1770,
+  1720, 1700, 1695, 1695, 1695};
+
+ const G4double G4PiNuclearCrossSection::sn_m_in[35] = {
+  1050, 1350, 1520, 1650, 1800, 1980, 2070, 2120, 2090, 2050,
+  1980, 1920, 1830, 1770, 1670, 1500, 1435, 1350, 1300, 1230,
+  1220, 1235, 1235, 1235, 1237, 1240, 1160, 1120, 1090, 1065,
+  1040, 1020, 1015, 1015, 1015};
+
  const G4double G4PiNuclearCrossSection::sn_p_t[29] =  { 465,  800, 1200, 1760, 2170, 2480, 2730, 2885, 2970, 2980, 2970, 2890, 2840, 2790, 2620, 2450, 2335, 2205, 2080, 2020, 2010, 1990, 1990, 2015, 2030, 2045, 1980, 1890, 1835};
  const G4double G4PiNuclearCrossSection::sn_p_in[29] = { 315,  590,  880, 1220, 1460, 1580, 1700, 1770, 1810, 1810, 1800, 1730, 1680, 1630, 1530, 1400, 1335, 1270, 1210, 1180, 1190, 1190, 1190, 1205, 1210, 1210, 1150, 1115, 1090};
@@ -346,9 +365,8 @@
 
 G4double G4PiNuclearCrossSection::
-GetIsoZACrossSection(const G4DynamicParticle* particle, G4double ZZ, 
-                     G4double /*AA*/, G4double /*temperature*/)
+GetZandACrossSection(const G4DynamicParticle* particle, G4int ZZ, 
+                     G4int /*AA*/, G4double /*temperature*/)
 {
   // precondition
-  //  G4ping debug("debug_PiNuclearCrossSection");
   using namespace std;
   G4bool ok = false;
@@ -367,9 +385,9 @@
 
   G4double result = 0;
-  G4int Z=G4lrint(ZZ);
+  G4int Z = ZZ;
   //  debug.push_back(Z);
   size_t it = 0;
 
-  while(it<theZ.size() && Z>theZ[it]) it++;
+  while(it < theZ.size() && Z > theZ[it]) it++;
 
   //  debug.push_back(theZ[it]);
@@ -475,19 +493,21 @@
  }
 
- G4double G4PiNuclearCrossSection::
- Interpolate(G4int Z1, G4int Z2, G4int Z, G4double x1, G4double x2)
- { 
+
+G4double G4PiNuclearCrossSection::
+Interpolate(G4int Z1, G4int Z2, G4int Z, G4double x1, G4double x2)
+{ 
 //   Nucleon numbers obtained from G4NistManager G4 8.0
- static const G4double A[92]=
- 			{1.0001, 4.0000, 6.9241, 9.0000, 10.801, 12.011, 14.004, 16.004, 19.000, 20.188,
-			 23.000, 24.320, 27.000, 28.109, 31.000, 32.094, 35.484, 39.985, 39.135, 40.116,
-			 45.000, 47.918, 50.998, 52.055, 55.000, 55.910, 59.000, 58.760, 63.617, 65.468,
-			 69.798, 72.691, 75.000, 79.042, 79.986, 83.887, 85.557, 87.710, 89.000, 91.318,
-			 93.000, 96.025, 98.000, 101.16, 103.00, 106.51, 107.96, 112.51, 114.91, 118.81,
-			 121.86, 127.70, 127.00, 131.39, 133.00, 137.42, 139.00, 140.21, 141.00, 144.32,
-			 145.00, 150.45, 152.04, 157.33, 159.00, 162.57, 165.00, 167.32, 169.00, 173.10,
-			 175.03, 178.54, 181.00, 183.89, 186.25, 190.27, 192.25, 195.11, 197.00, 200.63,
-			 204.41, 207.24, 209.00, 209.00, 210.00, 222.00, 223.00, 226.00, 227.00, 232.00,
-			 231.00, 237.98};
+ static const G4double A[92] = {
+   1.0001, 4.0000, 6.9241, 9.000, 10.801, 12.011, 14.004, 16.004, 19.000,
+  20.188, 23.000, 24.320, 27.000, 28.109, 31.000, 32.094, 35.484, 39.985,
+  39.135, 40.116, 45.000, 47.918, 50.998, 52.055, 55.000, 55.910, 59.000,
+  58.760, 63.617, 65.468, 69.798, 72.691, 75.000, 79.042, 79.986, 83.887,
+  85.557, 87.710, 89.000, 91.318, 93.000, 96.025, 98.000, 101.16, 103.00,
+ 106.51, 107.96, 112.51, 114.91, 118.81, 121.86, 127.70,  127.00, 131.39,
+ 133.00, 137.42, 139.00, 140.21, 141.00, 144.32, 145.00,  150.45, 152.04,
+ 157.33, 159.00, 162.57, 165.00, 167.32, 169.00, 173.10,  175.03, 178.54,
+ 181.00, 183.89, 186.25, 190.27, 192.25, 195.11, 197.00, 200.63,  204.41,
+ 207.24, 209.00, 209.00, 210.00, 222.00, 223.00, 226.00, 227.00,  232.00,
+ 231.00, 237.98};
 			 
  static G4bool NeedInit=true;		     
@@ -502,10 +522,10 @@
  }
 
-//        for tabulated data, cross section scales with A^.75
+// for tabulated data, cross section scales with A^.75
    G4double r1 = x1 / A75[Z1-1] * A75[Z-1];
    G4double r2 = x2 / A75[Z2-1] * A75[Z-1];
    G4double result=0.5*(r1+r2);
-//       G4cout << "x1/2, z1/2 z" <<x1<<" "<<x2<<" "<<Z1<<" "<<Z2<<" "<<Z<<G4endl;
-//       G4cout << "res1/2 " << r1 <<" " << r2 <<" " << result<< G4endl;
+//  G4cout << "x1/2, z1/2 z" <<x1<<" "<<x2<<" "<<Z1<<" "<<Z2<<" "<<Z<<G4endl;
+//  G4cout << "res1/2 " << r1 <<" " << r2 <<" " << result<< G4endl;
    return result;
- }
+}
