diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 50a951202666c2b29a2a9c863f96a2841b9f6356..c83d5488bb8ccdb2ad14b619b74bf39328d88ab9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,10 +18,13 @@ build:
     - cmake ..
     - cmake --build .
     - ctest -j4 -V >& test.log
-    - gzip -9 -S .gz test.log
+  after_script:
+    - cd build
     - ls
+    - gzip -v -9 -S .gz test.log
     - pwd
   artifacts:
+    expire_in: 1 week
     paths:
       - build/test.log.gz
     when: on_failure
diff --git a/CMakeModules/CorsikaUtilities.cmake b/CMakeModules/CorsikaUtilities.cmake
index c2a7df5c94be91d95fadd19703260736ac4eeaa6..85105468ad429e013f499fd221b2d657e60fd612 100644
--- a/CMakeModules/CorsikaUtilities.cmake
+++ b/CMakeModules/CorsikaUtilities.cmake
@@ -86,6 +86,7 @@ endmacro(CORSIKA_ADD_FILES_ABSOLUTE)
 #
 
 function (CORSIKA_ADD_TEST name)
+  target_include_directories (${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
   file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test_outputs/)
   add_test (NAME ${name} COMMAND ${name} -o ${PROJECT_BINARY_DIR}/test_outputs/junit-${name}.xml -r junit)
 endfunction (CORSIKA_ADD_TEST)
diff --git a/COAST/CMakeLists.txt b/COAST/CMakeLists.txt
index 2aae4eb262f78513a0bb5312a6c3e5b972c56bb1..7a8c67e39c09317ad1d6245e0f536d6503c0f924 100644
--- a/COAST/CMakeLists.txt
+++ b/COAST/CMakeLists.txt
@@ -45,7 +45,12 @@ target_include_directories (
   PUBLIC
   $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
   $<INSTALL_INTERFACE:include/include>
-  SYSTEM 
+  )
+
+target_include_directories (
+  COAST
+  SYSTEM
+  PUBLIC
   $ENV{COAST_DIR}/include
   )
 
diff --git a/COAST/COASTProcess.cc b/COAST/COASTProcess.cc
index 3f4281b4d519eced3b2381a1be7bfaf396789441..bfbf8839dcf40551bddb1ddd3dff77c1e49ea38f 100644
--- a/COAST/COASTProcess.cc
+++ b/COAST/COASTProcess.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/COAST/COASTProcess.h b/COAST/COASTProcess.h
index 686975e7f9e4adaeb192cd5f07ce92e79e8e1790..a5d7606c5f912b862cdee99dfe264cd89073f76b 100644
--- a/COAST/COASTProcess.h
+++ b/COAST/COASTProcess.h
@@ -1,3 +1,14 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
 #ifndef _include_corsika_coast_coastprocess_h_
 #define _include_corsika_coast_coastprocess_h_
 
diff --git a/COAST/COASTStack.h b/COAST/COASTStack.h
index 936c6fa28cdd9255f53911b1153c0657fd003b38..9db80c271a728d8bd0e1f4dc199a1686235e17ef 100644
--- a/COAST/COASTStack.h
+++ b/COAST/COASTStack.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -92,11 +92,12 @@ namespace corsika::coast {
     const crs::CParticle* fParticle2 = 0;
 
   public:
-    void Init() {}
-    void SetParticle(const crs::CParticle* v1, const crs::CParticle* v2) {
+    COASTStackImpl(const crs::CParticle* v1, const crs::CParticle* v2) {
       fParticle1 = v1;
       fParticle2 = v2;
     }
+
+    void Init() {}
     void Clear() {}
 
     // there is one particle only
@@ -177,11 +178,10 @@ namespace corsika::coast {
      */
     void Swap(const int, const int) {}
 
-  protected:
-    // size cannot be increased
+    // size cannot be increased, do nothing
     void IncrementSize() {}
 
-    // size cannot be decremented
+    // size cannot be decremented, do nothing
     void DecrementSize() {}
 
   }; // end class COASTStackImpl
diff --git a/COAST/COASTUserLib.cc b/COAST/COASTUserLib.cc
index 57a9ab56838441d5114bde103da516cf3d54b10c..230d10a5c899ee15e8382f608d3f5d098dd5cccb 100644
--- a/COAST/COASTUserLib.cc
+++ b/COAST/COASTUserLib.cc
@@ -1,3 +1,14 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
 #include <interface/CorsikaInterface.h>
 
 #include <corsika/coast/COASTProcess.h>
@@ -21,7 +32,6 @@ using namespace std;
 using namespace corsika;
 using namespace corsika::units::si;
 
-coast::COASTStack gCOASTStack;
 corsika::coast::COASTProcess gCorsikaProcess;
 
 /*
@@ -83,14 +93,14 @@ extern "C" void track_([[maybe_unused]] const crs::CParticle& pre,
     int    particleId;
     int    hadronicGeneration;
   */
-  gCOASTStack.SetParticle(&pre, &post);
-  const auto particle = gCOASTStack.GetNextParticle();
+  coast::COASTStack stack(&pre, &post);
+  const auto particle = stack.GetNextParticle();
   const geometry::CoordinateSystem& rootCS =
       geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
   geometry::Line const line(particle.GetPosition(rootCS), particle.GetVelocity(rootCS));
   const TimeType time = particle.GetTimeInterval();
   const geometry::Trajectory<geometry::Line> track(line, time);
-  gCorsikaProcess.DoContinuous(particle, track, gCOASTStack);
+  gCorsikaProcess.DoContinuous(particle, track, stack);
 }
 
 extern "C" void tabularizedatmosphere_([[maybe_unused]] const int& nPoints,
diff --git a/COAST/ParticleConversion.cc b/COAST/ParticleConversion.cc
index ddff698ae96ae6b86ec0745e260486a8620f0099..c0bc3dab50b8d805cd9cee8212c9a1bd06c67460 100644
--- a/COAST/ParticleConversion.cc
+++ b/COAST/ParticleConversion.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/COAST/ParticleConversion.h b/COAST/ParticleConversion.h
index b8f99519539c751db17cf1d24ca3568ed8748a65..82a9a9d7dbba18ec612d695b5d869dd6f1b086ac 100644
--- a/COAST/ParticleConversion.h
+++ b/COAST/ParticleConversion.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -191,19 +191,19 @@ namespace corsika::coast {
       {CoastCode::Tritium, corsika::particles::Code::Tritium},
       {CoastCode::He3, corsika::particles::Code::Helium3},
       {CoastCode::Helium, corsika::particles::Code::Helium}, // 402
-      {CoastCode::Lithium, corsika::particles::Code::Lithium},
-      {CoastCode::Beryllium, corsika::particles::Code::Beryllium},
-      {CoastCode::Boron, corsika::particles::Code::Boron},
-      {CoastCode::Carbon, corsika::particles::Code::Carbon},
-      {CoastCode::Carbon13, corsika::particles::Code::Carbon13},
-      {CoastCode::Nitrogen, corsika::particles::Code::Nitrogen},
-      {CoastCode::Fluor, corsika::particles::Code::Fluor},
-      {CoastCode::Oxygen, corsika::particles::Code::Oxygen},
-      {CoastCode::Neon21, corsika::particles::Code::Neon21},
-      {CoastCode::Neon, corsika::particles::Code::Neon},
-      {CoastCode::Argon, corsika::particles::Code::Argon},
-      {CoastCode::Xenon, corsika::particles::Code::Xenon},
-      {CoastCode::Radon, corsika::particles::Code::Radon},
+      //{CoastCode::Lithium, corsika::particles::Code::Lithium},
+      //{CoastCode::Beryllium, corsika::particles::Code::Beryllium},
+      //{CoastCode::Boron, corsika::particles::Code::Boron},
+      //{CoastCode::Carbon, corsika::particles::Code::Carbon},
+      //{CoastCode::Carbon13, corsika::particles::Code::Carbon13},
+      //{CoastCode::Nitrogen, corsika::particles::Code::Nitrogen},
+      //{CoastCode::Fluor, corsika::particles::Code::Fluor},
+      //{CoastCode::Oxygen, corsika::particles::Code::Oxygen},
+      //{CoastCode::Neon21, corsika::particles::Code::Neon21},
+      //{CoastCode::Neon, corsika::particles::Code::Neon},
+      //{CoastCode::Argon, corsika::particles::Code::Argon},
+      //{CoastCode::Xenon, corsika::particles::Code::Xenon},
+      //{CoastCode::Radon, corsika::particles::Code::Radon},
       {CoastCode::Iron, corsika::particles::Code::Iron}, // 5628
 
       //{CoastCode::, corsika::particles::Code::},
diff --git a/COAST/README.md b/COAST/README.md
index 215d5f10c3e772fedab9d81ff03e8bb325722f30..96e62845bd4843c21e97d15e8c4a249c69cec0d6 100644
--- a/COAST/README.md
+++ b/COAST/README.md
@@ -1,7 +1,14 @@
+# COAST interface {#COAST}
+
+With the COAST interface of CORSIKA 8 you can write a CORSIKA 8
+"process" class and link it to CORSIKA 7. This can be very powerful to
+benchmark new CORSIKA 8 physics code in the context of "old" CORSIKA 7
+simulations. 
+
 This is based on corsika7/trunk/coast/CoastOptions/example with an
-additional interface to CORSIKA8. 
+additional interface to CORSIKA 8. See code in namespace corsika::coast for all details.
 
-This is an example for a "COAST user library" using CORSIKA8
+We provide a step-by-step example for a "COAST user library" using CORSIKA 8
 technology. It explains the steps, how to use the COAST_USER_LIB
 option of CORSIKA together with CORSIKA8/COAST
 
diff --git a/Documentation/Doxygen/Doxyfile.in b/Documentation/Doxygen/Doxyfile.in
index 47bcf61eb06572fab45ea308f3bf9091bbae512f..77031e96dc0e9d9f1b17cb4fed4f0e2201deb284 100644
--- a/Documentation/Doxygen/Doxyfile.in
+++ b/Documentation/Doxygen/Doxyfile.in
@@ -1,19 +1,23 @@
-PROJECT_NAME           = CORSIKA
-PROJECT_NUMBER         = 8.0.0
+PROJECT_NAME           = CORSIKA 8
+PROJECT_NUMBER         = 0.0.0
+
+GENERATE_HTML          = YES
+GENERATE_LATEX         = YES
+GENERATE_XML           = YES
 
 OUTPUT_DIRECTORY       = @CMAKE_CURRENT_BINARY_DIR@/
 INPUT                  = @PROJECT_SOURCE_DIR@ @PROJECT_BINARY_DIR@/Framework
 EXCLUDE_PATTERNS       = */ThirdParty/*/*
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = @PROJECT_SOURCE_DIR@
 
-GENERATE_HTML          = YES
-GENERATE_LATEX         = YES
-
-FILE_PATTERNS          = *.cc *.cpp *.cxx *.h *.dox *.inc
+FILE_PATTERNS          = *.cc *.cpp *.cxx *.h *.dox *.inc *.md
 EXTENSION_MAPPING      = inc=C++
 RECURSIVE              = YES
 
 SOURCE_BROWSER         = YES
 # INLINE_SOURCES
+GENERATE_TREEVIEW      = YES
 
 CLASS_DIAGRAMS         = NO
 HAVE_DOT               = YES
diff --git a/Documentation/Examples/cascade_example.cc b/Documentation/Examples/cascade_example.cc
index f18ff72efcf8db5c95cc370b8624229d65fccdc0..67b6f4d9160b18cfea3ed42b5564d9f24b688098 100644
--- a/Documentation/Examples/cascade_example.cc
+++ b/Documentation/Examples/cascade_example.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -25,6 +26,7 @@
 
 #include <corsika/process/sibyll/Decay.h>
 #include <corsika/process/sibyll/Interaction.h>
+#include <corsika/process/sibyll/NuclearInteraction.h>
 
 #include <corsika/process/track_writer/TrackWriter.h>
 
@@ -69,12 +71,22 @@ public:
 
   template <typename Particle>
   bool isBelowEnergyCut(Particle& p) const {
-    // FOR NOW: center-of-mass energy hard coded
-    const HEPEnergyType Ecm = sqrt(2. * p.GetEnergy() * 0.93827_GeV);
-    if (p.GetEnergy() < fECut || Ecm < 10_GeV)
-      return true;
-    else
-      return false;
+    // nuclei
+    if (p.GetPID() == corsika::particles::Code::Nucleus) {
+      auto const ElabNuc = p.GetEnergy() / p.GetNuclearA();
+      auto const EcmNN = sqrt(2. * ElabNuc * 0.93827_GeV);
+      if (ElabNuc < fECut || EcmNN < 10_GeV)
+        return true;
+      else
+        return false;
+    } else {
+      // TODO: center-of-mass energy hard coded
+      const HEPEnergyType Ecm = sqrt(2. * p.GetEnergy() * 0.93827_GeV);
+      if (p.GetEnergy() < fECut || Ecm < 10_GeV)
+        return true;
+      else
+        return false;
+    }
   }
 
   bool isEmParticle(Code pCode) const {
@@ -123,6 +135,14 @@ public:
         is_inv = true;
         break;
 
+      case Code::Neutron:
+        is_inv = true;
+        break;
+
+      case Code::AntiNeutron:
+        is_inv = true;
+        break;
+
       default:
         break;
     }
@@ -234,16 +254,19 @@ int main() {
 
   corsika::random::RNGManager::GetInstance().RegisterRandomStream("s_rndm");
   corsika::process::sibyll::Interaction sibyll(env);
+  corsika::process::sibyll::NuclearInteraction sibyllNuc(env, sibyll);
   corsika::process::sibyll::Decay decay;
-  ProcessCut cut(8_GeV);
+  ProcessCut cut(20_GeV);
 
-  corsika::random::RNGManager::GetInstance().RegisterRandomStream("HadronicElasticModel");
-  corsika::process::HadronicElasticModel::HadronicElasticInteraction hadronicElastic(env);
+  // corsika::random::RNGManager::GetInstance().RegisterRandomStream("HadronicElasticModel");
+  // corsika::process::HadronicElasticModel::HadronicElasticInteraction
+  // hadronicElastic(env);
 
   corsika::process::TrackWriter::TrackWriter trackWriter("tracks.dat");
 
   // assemble all processes into an ordered process list
-  auto sequence = p0 << sibyll << decay << hadronicElastic << cut << trackWriter;
+  // auto sequence = p0 << sibyll << decay << hadronicElastic << cut << trackWriter;
+  auto sequence = p0 << sibyll << sibyllNuc << decay << cut << trackWriter;
 
   // cout << "decltype(sequence)=" << type_id_with_cvr<decltype(sequence)>().pretty_name()
   // << "\n";
@@ -251,14 +274,22 @@ int main() {
   // setup particle stack, and add primary particle
   setup::Stack stack;
   stack.Clear();
+  const Code beamCode = Code::Nucleus;
+  const int nuclA = 56;
+  const int nuclZ = int(nuclA / 2.15 + 0.7);
+  const HEPMassType mass = corsika::particles::Proton::GetMass() * nuclZ +
+                           (nuclA - nuclZ) * corsika::particles::Neutron::GetMass();
   const HEPEnergyType E0 =
-      100_TeV; // 1_PeV crashes with bad COMboost in second interaction (crash later)
+      nuclA *
+      100_GeV; // 1_PeV crashes with bad COMboost in second interaction (crash later)
   double theta = 0.;
   double phi = 0.;
+
   {
-    auto particle = stack.NewParticle();
-    particle.SetPID(Code::Proton);
-    HEPMomentumType P0 = sqrt(E0 * E0 - Proton::GetMass() * Proton::GetMass());
+    auto elab2plab = [](HEPEnergyType Elab, HEPMassType m) {
+      return sqrt(Elab * Elab - m * m);
+    };
+    HEPMomentumType P0 = elab2plab(E0, mass);
     auto momentumComponents = [](double theta, double phi, HEPMomentumType ptot) {
       return std::make_tuple(ptot * sin(theta) * cos(phi), ptot * sin(theta) * sin(phi),
                              -ptot * cos(theta));
@@ -266,13 +297,11 @@ int main() {
     auto const [px, py, pz] =
         momentumComponents(theta / 180. * M_PI, phi / 180. * M_PI, P0);
     auto plab = stack::super_stupid::MomentumVector(rootCS, {px, py, pz});
+    cout << "input particle: " << beamCode << endl;
     cout << "input angles: theta=" << theta << " phi=" << phi << endl;
     cout << "input momentum: " << plab.GetComponents() / 1_GeV << endl;
-    particle.SetEnergy(E0);
-    particle.SetMomentum(plab);
-    particle.SetTime(0_ns);
-    Point p(rootCS, 0_m, 0_m, 0_m);
-    particle.SetPosition(p);
+    Point pos(rootCS, 0_m, 0_m, 0_m);
+    stack.AddParticle(beamCode, E0, plab, pos, 0_ns, nuclA, nuclZ);
   }
 
   // define air shower object, run simulation
diff --git a/Documentation/Examples/geometry_example.cc b/Documentation/Examples/geometry_example.cc
index cfd9fd8b0af8e36de289ba7dd8b4bd600677d3bf..9c589ee714f1b4e0b36d2987c7558899389027fc 100644
--- a/Documentation/Examples/geometry_example.cc
+++ b/Documentation/Examples/geometry_example.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Documentation/Examples/helix_example.cc b/Documentation/Examples/helix_example.cc
index 068d25f1fc0fe6ea320eaa6d525a9679c006d2f5..ec73fc36c536fde7209d77842db8ff5278cf0b11 100644
--- a/Documentation/Examples/helix_example.cc
+++ b/Documentation/Examples/helix_example.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Documentation/Examples/logger_example.cc b/Documentation/Examples/logger_example.cc
index 9d9b743c13caff6010b13a37e5a20aed02c58ed2..956f49127f44843042bc96fadbb7c2e1fbd8c1b9 100644
--- a/Documentation/Examples/logger_example.cc
+++ b/Documentation/Examples/logger_example.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Documentation/Examples/stack_example.cc b/Documentation/Examples/stack_example.cc
index 33ebc230af244932375c904747b127b0b5c240ab..3431db4594474e0e25c0ddbe41a1ccdbef108ee9 100644
--- a/Documentation/Examples/stack_example.cc
+++ b/Documentation/Examples/stack_example.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -11,19 +11,27 @@
 
 #include <corsika/particles/ParticleProperties.h>
 #include <corsika/stack/super_stupid/SuperStupidStack.h>
+
+#include <corsika/geometry/Point.h>
+#include <corsika/geometry/RootCoordinateSystem.h>
+
 #include <cassert>
 #include <iomanip>
 #include <iostream>
 
+using namespace corsika;
 using namespace corsika::units::si;
 using namespace corsika::stack;
+using namespace corsika::geometry;
 using namespace std;
 
 void fill(corsika::stack::super_stupid::SuperStupidStack& s) {
+  const geometry::CoordinateSystem& rootCS =
+      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
   for (int i = 0; i < 11; ++i) {
-    auto p = s.NewParticle();
-    p.SetPID(corsika::particles::Code::Electron);
-    p.SetEnergy(1.5_GeV * i);
+    s.AddParticle(corsika::particles::Code::Electron, 1.5_GeV * i,
+                  stack::super_stupid::MomentumVector(rootCS, {0_GeV, 0_GeV, 1_GeV}),
+                  geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns);
   }
 }
 
@@ -38,7 +46,6 @@ void read(corsika::stack::super_stupid::SuperStupidStack& s) {
     assert(p.GetPID() == corsika::particles::Code::Electron);
     assert(p.GetEnergy() == 1.5_GeV * (i++));
   }
-  // assert(total_energy == 82.5_GeV);
 }
 
 int main() {
diff --git a/Documentation/Examples/staticsequence_example.cc b/Documentation/Examples/staticsequence_example.cc
index 0dfed040c85468501f02ce0cd07ac5a44dddcedb..5e881ebbe3e38ae028d2c263ff27bcc41b0490b5 100644
--- a/Documentation/Examples/staticsequence_example.cc
+++ b/Documentation/Examples/staticsequence_example.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Environment/Environment.h b/Environment/Environment.h
index 1fc1e443b26c617acb56b5d4b9406dacaed87514..97931aeffe2fe557b0328f97bbea8712a5dffc7e 100644
--- a/Environment/Environment.h
+++ b/Environment/Environment.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Environment/FlatAtmosphere/FlatAtmosphere.h b/Environment/FlatAtmosphere/FlatAtmosphere.h
index 90582b3dfb00d2d85850b81455a2a4c0c061413b..4227e0de4f5490ee2ac5a90857d68c5653e865ec 100644
--- a/Environment/FlatAtmosphere/FlatAtmosphere.h
+++ b/Environment/FlatAtmosphere/FlatAtmosphere.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -8,3 +8,5 @@
  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
  * the license.
  */
+
+
diff --git a/Environment/HomogeneousMedium.h b/Environment/HomogeneousMedium.h
index 02f7aabc003a81cea02177dd6803c9ea447c4fc3..1f54dbe7962ce8910fc8f882f36fbf02759a5a61 100644
--- a/Environment/HomogeneousMedium.h
+++ b/Environment/HomogeneousMedium.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Environment/IMediumModel.h b/Environment/IMediumModel.h
index ddae0564200a1a97428a0791f8333feea8c8932b..03136a03633546eca0294fac5a1bffdadf40f2b9 100644
--- a/Environment/IMediumModel.h
+++ b/Environment/IMediumModel.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Environment/LinearIntegrator.h b/Environment/LinearIntegrator.h
index 5dddc1eb55e39a928a0f9bd29be77762763e7bf6..00f5904655cd1cd4cfe6fe66add749178716ea66 100644
--- a/Environment/LinearIntegrator.h
+++ b/Environment/LinearIntegrator.h
@@ -11,6 +11,8 @@
 #ifndef _include_environment_LinearIntegrator_h_
 #define _include_environment_LinearIntegrator_h_
 
+#include <limits>
+
 #include <corsika/geometry/Line.h>
 #include <corsika/geometry/Point.h>
 #include <corsika/geometry/Trajectory.h>
@@ -39,13 +41,15 @@ namespace corsika::environment {
 
       return (1 - 0.5 * grammage * c1 / (c0 * c0)) * grammage / c0;
     }
-    
-    auto MaximumLength(double relError) const {
-        auto const c1 = GetImplementation().fRho.SecondDerivative(
+
+    auto MaximumLength(corsika::geometry::Trajectory<corsika::geometry::Line> const& line,
+                       double relError) const {
+      using namespace corsika::units::si;
+      auto const c1 = GetImplementation().fRho.SecondDerivative(
           line.GetPosition(0), line.NormalizedDirection());
-          
-        // todo: finish
-        return 100_m;
+
+      // todo: provide a real, working implementation
+      return 1_m * std::numeric_limits<double>::infinity();
     }
   };
 } // namespace corsika::environment
diff --git a/Environment/NuclearComposition.h b/Environment/NuclearComposition.h
index 4f1988aa03bd98d619079b754aadebefcbaf2bb0..5f89bd2cadb50e48f01931abafbc4ee94305cf8b 100644
--- a/Environment/NuclearComposition.h
+++ b/Environment/NuclearComposition.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Environment/VolumeTreeNode.h b/Environment/VolumeTreeNode.h
index d92d77b398bd180d9d64dc5039f32e50ca9be487..3331c41bf5e060bb904f5a78f78485af0440d04b 100644
--- a/Environment/VolumeTreeNode.h
+++ b/Environment/VolumeTreeNode.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Environment/testEnvironment.cc b/Environment/testEnvironment.cc
index 3358cfa198a696a6e9313528de2cf04ffffacd50..7f39ca1043bcb6df61800d7b0b041df95844335f 100644
--- a/Environment/testEnvironment.cc
+++ b/Environment/testEnvironment.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Cascade/CMakeLists.txt b/Framework/Cascade/CMakeLists.txt
index 3e51de61808e63bce24247d1c43f2a05137dbc18..fe009b213773f8d7ad8efed087e073791515a7a2 100644
--- a/Framework/Cascade/CMakeLists.txt
+++ b/Framework/Cascade/CMakeLists.txt
@@ -59,4 +59,4 @@ target_link_libraries (
   CORSIKAunits
   CORSIKAthirdparty # for catch2
   )
-CORSIKA_ADD_TEST(testStackInterface)
+CORSIKA_ADD_TEST(testCascade)
diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h
index 024044aea5d6699dd311352f24ec91459a180845..d989fba6e1f5a448a296203617ccea7ae5753a94 100644
--- a/Framework/Cascade/Cascade.h
+++ b/Framework/Cascade/Cascade.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -22,15 +22,47 @@
 #include <cmath>
 #include <iostream>
 
+/**
+ * The cascade namespace assembles all objects needed to simulate full particles cascades.
+ */
+
 namespace corsika::cascade {
 
+  /**
+   * \class Cascade
+   *
+   * The Cascade class is constructed from template arguments making
+   * it very versatile. Via the template arguments physics models are
+   * plugged into the cascade simulation.
+   *
+   * <b>Tracking</b> must be a class according to the
+   * TrackingInterface providing the functions: <code>void
+   * Init();</code> and <code>auto GetTrack(Particle const& p)</auto>,
+   * where the latter has a return type of <code>
+   * geometry::Trajectory<corsika::geometry::Line or Helix> </code>
+   *
+   * <b>ProcessList</b> must be a ProcessSequence.
+   *            TimeOfIntersection(corsika::geometry::Line const& line,
+   *
+   * <b>Stack</b> is the storage object for particle data, i.e. with
+   * Particle class type <code>Stack::ParticleType</code>
+   *
+   *
+
+   */
+
   template <typename Tracking, typename ProcessList, typename Stack>
   class Cascade {
     using Particle = typename Stack::ParticleType;
 
+    // we only want fully configured objects
     Cascade() = delete;
 
   public:
+    /**
+     * Cascade class cannot be default constructed, but needs a valid
+     * list of physics processes for configuration at construct time.
+     */
     Cascade(corsika::environment::Environment const& env, Tracking& tr, ProcessList& pl,
             Stack& stack)
         : fEnvironment(env)
@@ -38,12 +70,20 @@ namespace corsika::cascade {
         , fProcessSequence(pl)
         , fStack(stack) {}
 
+    /**
+     * The Init function is called before the actual cascade simulations.
+     * All components of the Cascade simulation must be configured here.
+     */
     void Init() {
       fTracking.Init();
       fProcessSequence.Init();
       fStack.Init();
     }
 
+    /**
+     * The Run function is the main simulation loop, which processes
+     * particles from the Stack until the Stack is empty.
+     */
     void Run() {
       while (!fStack.IsEmpty()) {
         while (!fStack.IsEmpty()) {
@@ -57,6 +97,16 @@ namespace corsika::cascade {
     }
 
   private:
+    /**
+     * The Step function is executed for each particle from the
+     * stack. It will calcualte geometric transport of the particles,
+     * and apply continuous and stochastic processes to it, which may
+     * lead to energy losses, scattering, absorption, decays and the
+     * production of secondary particles.
+     *
+     * New particles produced in one step are subject to further
+     * processing, e.g. thinning, etc.
+     */
     void Step(Particle& particle) {
       using namespace corsika::units::si;
 
diff --git a/Framework/Cascade/Step.cc b/Framework/Cascade/Step.cc
index 503bc80b1644ce66d60e9e80e9627c8d9c3daefa..ba29d2341a3863ec019e6001ad727c8901bee77d 100644
--- a/Framework/Cascade/Step.cc
+++ b/Framework/Cascade/Step.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Cascade/testCascade.cc b/Framework/Cascade/testCascade.cc
index cd22f884089092dfdbc373d538168c346b6e35fd..7abf985ad612ba9f6fb23bae31615d2d392b5f93 100644
--- a/Framework/Cascade/testCascade.cc
+++ b/Framework/Cascade/testCascade.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -84,7 +85,7 @@ public:
   }
 
   template <typename Particle, typename T, typename Stack>
-  EProcessReturn DoContinuous(Particle& p, T&, Stack& s) {
+  EProcessReturn DoContinuous(Particle& p, T&, Stack&) {
     fCalls++;
     HEPEnergyType E = p.GetEnergy();
     if (E < fEcrit) {
@@ -92,13 +93,7 @@ public:
       fCount++;
     } else {
       p.SetEnergy(E / 2);
-      auto pnew = s.NewParticle();
-      // s.Copy(p, pnew); fix that .... todo
-      pnew.SetPID(p.GetPID());
-      pnew.SetTime(p.GetTime());
-      pnew.SetEnergy(E / 2);
-      pnew.SetPosition(p.GetPosition());
-      pnew.SetMomentum(p.GetMomentum());
+      p.AddSecondary(p.GetPID(), E / 2, p.GetMomentum(), p.GetPosition(), p.GetTime());
     }
     return EProcessReturn::eOk;
   }
@@ -133,14 +128,11 @@ TEST_CASE("Cascade", "[Cascade]") {
       RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
 
   stack.Clear();
-  auto particle = stack.NewParticle();
   HEPEnergyType E0 = 100_GeV;
-  particle.SetPID(particles::Code::Electron);
-  particle.SetEnergy(E0);
-  particle.SetPosition(Point(rootCS, {0_m, 0_m, 10_km}));
-  particle.SetMomentum(
-      corsika::stack::super_stupid::MomentumVector(rootCS, {0_GeV, 0_GeV, -1_GeV}));
-  particle.SetTime(0_ns);
+  stack.AddParticle(
+      particles::Code::Electron, E0,
+      corsika::stack::super_stupid::MomentumVector(rootCS, {0_GeV, 0_GeV, -1_GeV}),
+      Point(rootCS, {0_m, 0_m, 10_km}), 0_ns);
   EAS.Init();
   EAS.Run();
 
diff --git a/Framework/Geometry/BaseTrajectory.h b/Framework/Geometry/BaseTrajectory.h
index 5540fc89d62e240217b79346d86aa32b04004baf..d8cf7ff5633de7847db2ede94634346048af08bb 100644
--- a/Framework/Geometry/BaseTrajectory.h
+++ b/Framework/Geometry/BaseTrajectory.h
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/BaseVector.h b/Framework/Geometry/BaseVector.h
index 7e3d8ef6112546940311b808fe3ca798b0988a79..106fb632446f476913bb93b01e085912182ebb1e 100644
--- a/Framework/Geometry/BaseVector.h
+++ b/Framework/Geometry/BaseVector.h
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/CoordinateSystem.cc b/Framework/Geometry/CoordinateSystem.cc
index cdc465c60842fb99d2f73539dd657d63131ef251..6f818462b0399f7026864d7de3fc8da6aba877c9 100644
--- a/Framework/Geometry/CoordinateSystem.cc
+++ b/Framework/Geometry/CoordinateSystem.cc
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/CoordinateSystem.h b/Framework/Geometry/CoordinateSystem.h
index 49deebc648bbca7a3fef5d7f8137c499c225f6fa..aaf226f3833b732488bcb457f76c0dbbd80049dc 100644
--- a/Framework/Geometry/CoordinateSystem.h
+++ b/Framework/Geometry/CoordinateSystem.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/FourVector.h b/Framework/Geometry/FourVector.h
index d3fe31f1838e64e052587f474baa2fdc259870bf..1cd15c6afc2f0fa4e21bb1168f2fdb8211078b25 100644
--- a/Framework/Geometry/FourVector.h
+++ b/Framework/Geometry/FourVector.h
@@ -1,3 +1,24 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
 #ifndef _include_corsika_framework_geometry_fourvector_h_
 #define _include_corsika_framework_geometry_fourvector_h_
 
diff --git a/Framework/Geometry/Helix.h b/Framework/Geometry/Helix.h
index 27e3575d37026e16ed401974788b80cb35b08bde..4d9badf8c757721507613a5abb1c4257dbe3ae0b 100644
--- a/Framework/Geometry/Helix.h
+++ b/Framework/Geometry/Helix.h
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/Line.h b/Framework/Geometry/Line.h
index 1b45f535a9c01acaa0084a42ca3b532360fa9b59..8672aa178ecbc2bcc9dffd199d2348db0f9e86d4 100644
--- a/Framework/Geometry/Line.h
+++ b/Framework/Geometry/Line.h
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/Point.h b/Framework/Geometry/Point.h
index 74c4b6f8da208064103c1a23018cc208b58b1659..f05bd31d1ca628f1f32834a9e6d6300e6ef2578c 100644
--- a/Framework/Geometry/Point.h
+++ b/Framework/Geometry/Point.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/QuantityVector.h b/Framework/Geometry/QuantityVector.h
index 370880323672f78f9ab254f86628b784a63ba410..ab57a994db6cba3cce60ab3acdb028b69de4c3b1 100644
--- a/Framework/Geometry/QuantityVector.h
+++ b/Framework/Geometry/QuantityVector.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/RootCoordinateSystem.h b/Framework/Geometry/RootCoordinateSystem.h
index 422cbbd57a6dfec9cfd7ea2c8db79350c6847246..b5f496aa48e2e5ee0c89aba0c84e39b4df1fbd67 100644
--- a/Framework/Geometry/RootCoordinateSystem.h
+++ b/Framework/Geometry/RootCoordinateSystem.h
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/Sphere.h b/Framework/Geometry/Sphere.h
index 3e5458b7e2328d062e61307f4c01589c8ee02f05..01d74543ec4407dc5a3acc12edee73c92c8d1504 100644
--- a/Framework/Geometry/Sphere.h
+++ b/Framework/Geometry/Sphere.h
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/Trajectory.h b/Framework/Geometry/Trajectory.h
index 09a344940b7b542ff983f78951de75ba39d5c6d6..74e33c47e3513df95ddbcbac1156630cb0bdaa6b 100644
--- a/Framework/Geometry/Trajectory.h
+++ b/Framework/Geometry/Trajectory.h
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/Vector.h b/Framework/Geometry/Vector.h
index 712eece61380c75bd36dea77b17a5650690b79b5..5ac1f118b789b500ad26a23f840bda954b2c9800 100644
--- a/Framework/Geometry/Vector.h
+++ b/Framework/Geometry/Vector.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/Volume.h b/Framework/Geometry/Volume.h
index 988337856e801dd7e55639c5aebefd20e6734c31..95306edca53ff546b54fe362babbdcf17a73334c 100644
--- a/Framework/Geometry/Volume.h
+++ b/Framework/Geometry/Volume.h
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/testFourVector.cc b/Framework/Geometry/testFourVector.cc
index 6d3d758cbf9a76be337ce8a6927d11f704604eb3..824426aad0bdaa4173fff93b26486d1eb423fea6 100644
--- a/Framework/Geometry/testFourVector.cc
+++ b/Framework/Geometry/testFourVector.cc
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Geometry/testGeometry.cc b/Framework/Geometry/testGeometry.cc
index 439bbb97d6c835bb750f6a16416e05249b804b80..7cb8df0c8ba451445458c48a42583a1e57a32f15 100644
--- a/Framework/Geometry/testGeometry.cc
+++ b/Framework/Geometry/testGeometry.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Logging/BufferedSink.h b/Framework/Logging/BufferedSink.h
index 2c0f7be9b721c7910724a25aca4d8488d54e2422..16844e013b0d2fb56247ce67292ca56a5ed13fa2 100644
--- a/Framework/Logging/BufferedSink.h
+++ b/Framework/Logging/BufferedSink.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Logging/Logger.h b/Framework/Logging/Logger.h
index 2639df8af6a573170c096d4f44b72e93bc593697..be6b3800a6b1c6dd2862bba48d31673b5d4f0250 100644
--- a/Framework/Logging/Logger.h
+++ b/Framework/Logging/Logger.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -31,9 +31,6 @@
 #include <corsika/logging/NoSink.h>
 #include <corsika/logging/Sink.h>
 
-using namespace std;
-using namespace boost;
-
 namespace corsika::logging {
 
   /**
diff --git a/Framework/Logging/MessageOff.h b/Framework/Logging/MessageOff.h
index 4bdf10d5af622b5fdc1b35316fa258be1322573e..91bd965cd5e9780ccea07d53a5e1c6ccee144283 100644
--- a/Framework/Logging/MessageOff.h
+++ b/Framework/Logging/MessageOff.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Logging/MessageOn.h b/Framework/Logging/MessageOn.h
index c7756150f03f521ee7b54f0385270face22edb6e..159eae68b8e5d3c088f341bf77decacb640ce555 100644
--- a/Framework/Logging/MessageOn.h
+++ b/Framework/Logging/MessageOn.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Logging/NoSink.h b/Framework/Logging/NoSink.h
index 6e2fe48ebf66b072031eab47c6a2370b38cd2a52..93a16d1a1e70a3e30c24ee1f22fcbe212983b8c8 100644
--- a/Framework/Logging/NoSink.h
+++ b/Framework/Logging/NoSink.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Logging/Sink.h b/Framework/Logging/Sink.h
index 74a42185e6be225da119f0812d653756ef30da4f..f88e3812f2437c2c47d1dde1204fcca0a32a079b 100644
--- a/Framework/Logging/Sink.h
+++ b/Framework/Logging/Sink.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Logging/testLogging.cc b/Framework/Logging/testLogging.cc
index 12a77b3cab504672438e0e6f7d4fe2383d35b8d6..56b44779c2cd7473f9740f30b0871572f40378e9 100644
--- a/Framework/Logging/testLogging.cc
+++ b/Framework/Logging/testLogging.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Particles/CMakeLists.txt b/Framework/Particles/CMakeLists.txt
index 7798d2226c7fd70a48fa452975cceb27eb71da35..cde894b095905f226a8e3a781bcc9f3b0daeb896 100644
--- a/Framework/Particles/CMakeLists.txt
+++ b/Framework/Particles/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(Python_ADDITIONAL_VERSIONS 3)
+find_package(PythonInterp 3 REQUIRED)
 
 add_custom_command (
   OUTPUT  ${PROJECT_BINARY_DIR}/Framework/Particles/GeneratedParticleProperties.inc
diff --git a/Framework/Particles/NuclearData.xml b/Framework/Particles/NuclearData.xml
index 930a3565a1156689df02552b9e82e0cc7c9dfec2..73eda0ef2350aa6849df60c61a34231dd9fff869 100644
--- a/Framework/Particles/NuclearData.xml
+++ b/Framework/Particles/NuclearData.xml
@@ -1,5 +1,8 @@
 <chapter name="Nuclear Data">
 
+<particle id="1000000000" name="nucleus" A="0" Z="0" >
+</particle> 
+
 <particle id="1000010010" name="hydrogen" A="1" Z="1" >
 </particle> 
 
@@ -15,19 +18,19 @@
 <particle id="1000020030" name="helium3" A="3" Z="2" >
 </particle> 
 
-<particle id="1000020030" name="lithium" A="6" Z="3" >
+<particle id="1000030070" name="lithium7" A="7" Z="3" >
 </particle> 
 
-<particle id="1000020030" name="beryllium" A="9" Z="4" >
+<particle id="1000040090" name="beryllium9" A="9" Z="4" >
 </particle> 
 
-<particle id="1000020030" name="boron" A="10" Z="5" >
+<particle id="1000110050" name="boron11" A="11" Z="5" >
 </particle> 
 
 <particle id="1000060120" name="carbon" A="12" Z="6" >
 </particle> 
 
-<particle id="1000060120" name="carbon13" A="13" Z="6" >
+<particle id="1000060130" name="carbon13" A="13" Z="6" >
 </particle> 
 
 <particle id="1000070140" name="nitrogen" A="14" Z="7" >
@@ -36,15 +39,18 @@
 <particle id="1000080160" name="oxygen" A="16" Z="8" >
 </particle> 
 
-<particle id="1000080160" name="fluor" A="18" Z="9" >
+<particle id="1000080180" name="fluor" A="18" Z="9" >
 </particle> 
 
-<particle id="1000100220" name="neon21" A="21" Z="10" >
+<particle id="1000100210" name="neon21" A="21" Z="10" >
 </particle> 
 
 <particle id="1000100220" name="neon" A="22" Z="10" >
 </particle> 
 
+<particle id="1000160330" name="sulphur" A="33" Z="16" >
+</particle> 
+
 <particle id="1000180400" name="argon" A="40" Z="18" >
 </particle> 
 
diff --git a/Framework/Particles/ParticleData.xml b/Framework/Particles/ParticleData.xml
index 16e7878abe42147c0d2ec3a285465c975ecec93c..6c8c3d0a06fec27481d508c030ddad6a7df8f925 100644
--- a/Framework/Particles/ParticleData.xml
+++ b/Framework/Particles/ParticleData.xml
@@ -4,7 +4,7 @@
 <particle id="0" name="void" spinType="0" chargeType="0" colType="0" 
           m0="0.00000"> 
 </particle> 
- 
+
 <!--
 <particle id="1" name="d" antiName="dbar" spinType="2" chargeType="-1" colType="1" 
           m0="0.33000"> 
diff --git a/Framework/Particles/ParticleProperties.cc b/Framework/Particles/ParticleProperties.cc
index 2fff766f5b2f05d7a3a5fe8cf16c923dbe68bc45..d59846fcf207e9c8a04c0f763bcbad4d5bfbe732 100644
--- a/Framework/Particles/ParticleProperties.cc
+++ b/Framework/Particles/ParticleProperties.cc
@@ -1,5 +1,15 @@
 
-/**
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -17,5 +27,17 @@ namespace corsika::particles {
   std::ostream& operator<<(std::ostream& stream, corsika::particles::Code const p) {
     return stream << corsika::particles::GetName(p);
   }
+  
+  Code ConvertFromPDG(PDGCode p) {
+      static_assert(detail::conversionArray.size() % 2 == 1);
+      // this will fail, for the strange case where the maxPDG is negative...
+      unsigned int constexpr maxPDG{(detail::conversionArray.size() - 1) >> 1};
+      auto k = static_cast<PDGCodeType>(p);
+      if ((unsigned int)abs(k) <= maxPDG) {
+          return detail::conversionArray[k + maxPDG];
+      } else {
+          return detail::conversionMap.at(p);
+      }
+  }
 
 } // namespace corsika::particles
diff --git a/Framework/Particles/ParticleProperties.h b/Framework/Particles/ParticleProperties.h
index 959c27a6be0028c607d9114d4577adcd6e791c3c..7b2b6f7e5594efa6aa4c5014f002bcc78d328701 100644
--- a/Framework/Particles/ParticleProperties.h
+++ b/Framework/Particles/ParticleProperties.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -23,29 +23,31 @@
 #include <iosfwd>
 #include <type_traits>
 
-#include <corsika/units/PhysicalConstants.h>
 #include <corsika/units/PhysicalUnits.h>
 
 /**
- * @namespace particle
  *
  * The properties of all elementary particles is stored here. The data
- * is taken from the Pythia ParticleData.xml file.
+ * are taken from the Pythia ParticleData.xml file.
  *
  */
 
 namespace corsika::particles {
 
+  /**
+   * @enum Code
+   * The Code enum is the actual place to define CORSIKA 8 particle codes.
+   */
   enum class Code : int16_t;
-
-  using PDGCodeType = int32_t;
+  enum class PDGCode : int32_t;
   using CodeIntType = std::underlying_type<Code>::type;
+  using PDGCodeType = std::underlying_type<PDGCode>::type;
 
   // forward declarations to be used in GeneratedParticleProperties
   int16_t constexpr GetElectricChargeNumber(Code const);
   corsika::units::si::ElectricChargeType constexpr GetElectricCharge(Code const);
   corsika::units::si::HEPMassType constexpr GetMass(Code const);
-  PDGCodeType constexpr GetPDG(Code const);
+  PDGCode constexpr GetPDG(Code const);
   constexpr std::string const& GetName(Code const);
   corsika::units::si::TimeType constexpr GetLifetime(Code const);
 
@@ -56,46 +58,52 @@ namespace corsika::particles {
 #include <corsika/particles/GeneratedParticleProperties.inc>
 
   /*!
-   * returns mass of particle
+   * returns mass of particle in natural units
    */
   corsika::units::si::HEPMassType constexpr GetMass(Code const p) {
-    return detail::masses[static_cast<CodeIntType const>(p)];
+    return detail::masses[static_cast<CodeIntType>(p)];
   }
 
-  PDGCodeType constexpr GetPDG(Code const p) {
-    return detail::pdg_codes[static_cast<CodeIntType const>(p)];
+  /*!
+   * returns PDG id
+   */
+  PDGCode constexpr GetPDG(Code const p) {
+    return detail::pdg_codes[static_cast<CodeIntType>(p)];
   }
 
   /*!
-   * returns electric charge of particle / (e/3).
+   * returns electric charge of particle / (e/3), e.g. return 3 for a proton.
    */
   int16_t constexpr GetElectricChargeNumber(Code const p) {
-    return detail::electric_charges[static_cast<CodeIntType const>(p)];
+    return detail::electric_charges[static_cast<CodeIntType>(p)];
   }
 
+  /*!
+   * returns electric charge of particle, e.g. return 1.602e-19_C for a proton.
+   */
   corsika::units::si::ElectricChargeType constexpr GetElectricCharge(Code const p) {
-    return GetElectricChargeNumber(p) * (corsika::units::constants::e / 3.);
+    return GetElectricChargeNumber(p) * (corsika::units::constants::e * (1. / 3.));
   }
 
   constexpr std::string const& GetName(Code const p) {
-    return detail::names[static_cast<CodeIntType const>(p)];
+    return detail::names[static_cast<CodeIntType>(p)];
   }
 
   corsika::units::si::TimeType constexpr GetLifetime(Code const p) {
-    return detail::lifetime[static_cast<CodeIntType const>(p)] *
+    return detail::lifetime[static_cast<CodeIntType>(p)] *
            corsika::units::si::second;
   }
 
   bool constexpr IsNucleus(Code const p) {
-    return detail::isNucleus[static_cast<CodeIntType const>(p)];
+    return detail::isNucleus[static_cast<CodeIntType>(p)];
   }
 
   int constexpr GetNucleusA(Code const p) {
-    return detail::nucleusA[static_cast<CodeIntType const>(p)];
+    return detail::nucleusA[static_cast<CodeIntType>(p)];
   }
 
   int constexpr GetNucleusZ(Code const p) {
-    return detail::nucleusZ[static_cast<CodeIntType const>(p)];
+    return detail::nucleusZ[static_cast<CodeIntType>(p)];
   }
 
   /**
@@ -103,7 +111,8 @@ namespace corsika::particles {
    **/
 
   std::ostream& operator<<(std::ostream& stream, corsika::particles::Code const p);
-
+  
+  Code ConvertFromPDG(PDGCode);
 } // namespace corsika::particles
 
 #endif
diff --git a/Framework/Particles/particles.dox b/Framework/Particles/particles.dox
new file mode 100644
index 0000000000000000000000000000000000000000..22a36c59f0a752074c076d1fb0f6450f0dff51dd
--- /dev/null
+++ b/Framework/Particles/particles.dox
@@ -0,0 +1,15 @@
+/**
+@page Particles Particle properties
+
+The properties of all particles are saved in static and flat
+arrays. There is a enum corsika::particles::Code to identify each
+particles, and each individual particles has its own static class,
+which can be used to retrieve its physical properties. 
+
+
+
+See namespace corsika::particles for all classes.
+
+
+
+*/
\ No newline at end of file
diff --git a/Framework/Particles/pdxml_reader.py b/Framework/Particles/pdxml_reader.py
index 2e463a0e1d7c9a227d9f49160d4916ecf3390761..946940f7dcf54551e2888e438c6eeeae0e1659e1 100755
--- a/Framework/Particles/pdxml_reader.py
+++ b/Framework/Particles/pdxml_reader.py
@@ -4,6 +4,7 @@ import sys, math, itertools, re, csv, pprint
 import xml.etree.ElementTree as ET
 from collections import OrderedDict
 import pickle
+import io
 
 GeVfm = 0.19732696312541853
 c_speed_of_light = 29.9792458e10  # mm / s
@@ -39,7 +40,7 @@ def parsePythia(filename):
             ctau = 0.
         else:
             print ("missing lifetime: " + str(pdg_id) + " " + str(name))
-            sys.exit(0)
+            sys.exit(1)
         
         yield (pdg_id, name, mass, electric_charge, antiName, ctau/c_speed_of_light)
                 
@@ -93,42 +94,7 @@ def class_names(filename):
         pdg_id = int(particle.attrib["pdgID"])
         map[pdg_id] = name
         
-    return map 
-
-
-
-##############################################################
-# 
-# Automatically produce a string qualifying as C++ class name
-# 
-# This function produces names of type "DELTA_PLUS_PLUS"
-# 
-def c_identifier(name):
-    orig = name
-    name = name.upper()
-    for c in "() /":
-        name = name.replace(c, "_")
-    
-    name = name.replace("BAR", "_BAR")
-    name = name.replace("0", "_0")
-    name = name.replace("*", "_STAR")
-    name = name.replace("'", "_PRIME")
-    name = name.replace("+", "_PLUS")
-    name = name.replace("-", "_MINUS")
-    
-    while True:
-        tmp = name.replace("__", "_")
-        if tmp == name:
-            break
-        else:
-            name = tmp    
-
-    pattern = re.compile(r'^[A-Z_][A-Z_0-9]*$')
-    if pattern.match(name):
-        return name.strip("_")
-    else:
-        raise Exception("could not generate C identifier for '{:s}'".format(orig))
-
+    return map
 
 ##############################################################
 # 
@@ -163,7 +129,7 @@ def c_identifier_camel(name):
             name = tmp
     name.strip("_")
 
-    # remove all "_", if this does not by accident concatenate two number
+    # remove all "_", if this does not by accident concatenate two numbers
     istart = 0
     while True:
         i = name.find('_', istart)
@@ -251,16 +217,57 @@ def read_nuclei_db(filename, particle_db, classnames):
         }
     
     return particle_db
-    
 
 
+###############################################################
+# 
+# build conversion table PDG -> ngc
+# 
+def gen_conversion_PDG_ngc(particle_db):
+    # todo: find a optimum value, think about cache miss with array vs lookup time with map
+    P_MAX = 500 # the maximum PDG code that is still filled into the table
+        
+    conversionDict = dict()
+    conversionTable = [None] * (2*P_MAX + 1)
+    for cId, p in particle_db.items():
+        pdg = p['pdg']
+        
+        if abs(pdg) < P_MAX:
+            if conversionTable[pdg + P_MAX]:
+                raise Exception("table entry already occupied")
+            else:
+                conversionTable[pdg + P_MAX] = cId
+        else:
+            if pdg in conversionDict.keys():
+                raise Exception(f"map entry {pdg} already occupied")
+            else:
+                conversionDict[pdg] = cId
+    
+    output = io.StringIO()
+    def oprint(*args, **kwargs):
+        print(*args, **kwargs, file=output)
+        
+    oprint(f"static std::array<Code, {len(conversionTable)}> constexpr conversionArray {{")
+    for ngc in conversionTable:
+        oprint("    Code::{0},".format(ngc if ngc else "Unknown"))
+    oprint("};")
+    oprint()
+    
+    oprint("static std::map<PDGCode, Code> const conversionMap {")
+    for ngc in conversionDict.values():
+        oprint(f"    {{PDGCode::{ngc}, Code::{ngc}}},")
+    oprint("};")
+    oprint()
+    
+    return output.getvalue()
+
 
 ###############################################################
 # 
 # return string with enum of all internal particle codes
 # 
 def gen_internal_enum(particle_db):
-    string = ("enum class Code : int16_t {\n"
+    string = ("enum class Code : CodeIntType {\n"
               "  FirstParticle = 1, // if you want to loop over particles, you want to start with \"1\"  \n") # identifier for eventual loops...
     
     
@@ -277,6 +284,20 @@ def gen_internal_enum(particle_db):
     return string
 
 
+###############################################################
+# 
+# return string with enum of all PDG particle codes
+# 
+def gen_pdg_enum(particle_db):
+    string = "enum class PDGCode : PDGCodeType {\n"
+    
+    for cId in particle_db:
+        pdgCode = particle_db[cId]['pdg']
+        string += "  {key:s} = {code:d},\n".format(key = cId, code = pdgCode)
+
+    string += " };\n"
+    
+    return string
 
 
 ###############################################################
@@ -296,9 +317,9 @@ def gen_properties(particle_db):
     string += "};\n\n"
                    
     # PDG code table
-    string += "static constexpr std::array<PDGCodeType const, size> pdg_codes = {\n"
-    for p in particle_db.values():
-        string += "  {pdg:d}, // {name:s}\n".format(pdg = p['pdg'], name = p['name'])    
+    string += "static constexpr std::array<PDGCode, size> pdg_codes = {\n"
+    for p in particle_db.keys():
+        string += f"  PDGCode::{p},\n"
     string += "};\n"
     
     # name string table
@@ -473,8 +494,10 @@ if __name__ == "__main__":
     with open("GeneratedParticleProperties.inc", "w") as f:
         print(inc_start(), file=f)
         print(gen_internal_enum(particle_db), file=f)
+        print(gen_pdg_enum(particle_db), file=f)
         print(detail_start(), file=f)
         print(gen_properties(particle_db), file=f)
+        print(gen_conversion_PDG_ngc(particle_db), file=f)
         print(detail_end(), file=f) 
         print(gen_classes(particle_db), file=f)
         print(inc_end(), file=f) 
diff --git a/Framework/Particles/testParticles.cc b/Framework/Particles/testParticles.cc
index bdd07d8370592da981e59672c8b7a50ef92df9e4..cba91b476f42e6ee540ebfbf64b5990c4e03ea81 100644
--- a/Framework/Particles/testParticles.cc
+++ b/Framework/Particles/testParticles.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -34,6 +34,8 @@ TEST_CASE("ParticleProperties", "[Particles]") {
   SECTION("Masses") {
     REQUIRE(Electron::GetMass() / (511_keV) == Approx(1));
     REQUIRE(Electron::GetMass() / GetMass(Code::Electron) == Approx(1));
+    
+    REQUIRE((Proton::GetMass() + Neutron::GetMass()) / corsika::units::constants::nucleonMass == Approx(2));
   }
 
   SECTION("Charges") {
@@ -45,14 +47,28 @@ TEST_CASE("ParticleProperties", "[Particles]") {
   SECTION("Names") {
     REQUIRE(Electron::GetName() == "e-");
     REQUIRE(PiMinus::GetName() == "pi-");
+    REQUIRE(Nucleus::GetName() == "nucleus");
+    REQUIRE(Iron::GetName() == "iron");
   }
 
   SECTION("PDG") {
-    REQUIRE(GetPDG(Code::PiPlus) == 211);
-    REQUIRE(GetPDG(Code::DPlus) == 411);
-    REQUIRE(GetPDG(Code::NuMu) == 14);
-    REQUIRE(GetPDG(Code::NuE) == 12);
-    REQUIRE(GetPDG(Code::MuMinus) == 13);
+    REQUIRE(GetPDG(Code::PiPlus) == PDGCode::PiPlus);
+    REQUIRE(GetPDG(Code::DPlus) == PDGCode::DPlus);
+    REQUIRE(GetPDG(Code::NuMu) == PDGCode::NuMu);
+    REQUIRE(GetPDG(Code::NuE) == PDGCode::NuE);
+    REQUIRE(GetPDG(Code::MuMinus) == PDGCode::MuMinus);
+      
+    REQUIRE(static_cast<int>(GetPDG(Code::PiPlus)) == 211);
+    REQUIRE(static_cast<int>(GetPDG(Code::DPlus)) == 411);
+    REQUIRE(static_cast<int>(GetPDG(Code::NuMu)) == 14);
+    REQUIRE(static_cast<int>(GetPDG(Code::NuEBar)) == -12);
+    REQUIRE(static_cast<int>(GetPDG(Code::MuMinus)) == 13);
+  }
+  
+  SECTION("Conversion PDG -> internal") {
+    REQUIRE(ConvertFromPDG(PDGCode::KStarMinus) == Code::KStarMinus);
+    REQUIRE(ConvertFromPDG(PDGCode::MuPlus) == Code::MuPlus);
+    REQUIRE(ConvertFromPDG(PDGCode::SigmaStarCMinusBar) == Code::SigmaStarCMinusBar);
   }
 
   SECTION("Lifetimes") {
@@ -68,12 +84,12 @@ TEST_CASE("ParticleProperties", "[Particles]") {
   }
 
   SECTION("Nuclei") {
-    REQUIRE(IsNucleus(Code::Gamma) == false);
-    REQUIRE(IsNucleus(Code::Argon) == true);
-    REQUIRE(IsNucleus(Code::Proton) == false);
-    REQUIRE(IsNucleus(Code::Hydrogen) == true);
-    REQUIRE(Argon::IsNucleus() == true);
-    REQUIRE(EtaC::IsNucleus() == false);
+    REQUIRE_FALSE(IsNucleus(Code::Gamma));
+    REQUIRE(IsNucleus(Code::Argon));
+    REQUIRE_FALSE(IsNucleus(Code::Proton));
+    REQUIRE(IsNucleus(Code::Hydrogen));
+    REQUIRE(Argon::IsNucleus());
+    REQUIRE_FALSE(EtaC::IsNucleus());
 
     REQUIRE(GetNucleusA(Code::Hydrogen) == 1);
     REQUIRE(GetNucleusA(Code::Tritium) == 3);
diff --git a/Framework/ProcessSequence/BaseProcess.h b/Framework/ProcessSequence/BaseProcess.h
index 03e04c9bdc22f4bf9deba36c6a1d2964e5e60798..8b4014478f5ebef33e4acd76f6b7315f2c1e5041 100644
--- a/Framework/ProcessSequence/BaseProcess.h
+++ b/Framework/ProcessSequence/BaseProcess.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/ProcessSequence/ContinuousProcess.h b/Framework/ProcessSequence/ContinuousProcess.h
index 19090b04e6867a62c47c6644cac2368e168484ef..9a3424a35d4637a9e21212a0909f2456f71b3597 100644
--- a/Framework/ProcessSequence/ContinuousProcess.h
+++ b/Framework/ProcessSequence/ContinuousProcess.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/ProcessSequence/DecayProcess.h b/Framework/ProcessSequence/DecayProcess.h
index 4cd83595e4a74e0a3f584e76434cae246767009b..82be572d6fc8e19260fa50a5267f1171c20e042b 100644
--- a/Framework/ProcessSequence/DecayProcess.h
+++ b/Framework/ProcessSequence/DecayProcess.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/ProcessSequence/DiscreteProcess.h b/Framework/ProcessSequence/DiscreteProcess.h
index 7ce50810f7fccbbbcb0c707d4124ec1ad03f0244..40b54453007855540a72910ab9da708201b17b88 100644
--- a/Framework/ProcessSequence/DiscreteProcess.h
+++ b/Framework/ProcessSequence/DiscreteProcess.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/ProcessSequence/InteractionProcess.h b/Framework/ProcessSequence/InteractionProcess.h
index ff0cabd08a311dc5574c44cedddf8205d8545b19..96472755376c4cf630f8ac92e92c5c08eb1c2f48 100644
--- a/Framework/ProcessSequence/InteractionProcess.h
+++ b/Framework/ProcessSequence/InteractionProcess.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/ProcessSequence/ProcessReturn.h b/Framework/ProcessSequence/ProcessReturn.h
index 215994b42fb74daaba3b382513d94e50a45d430b..94a69406ac42c9ec7caccb53e0e42493ec15fe32 100644
--- a/Framework/ProcessSequence/ProcessReturn.h
+++ b/Framework/ProcessSequence/ProcessReturn.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/ProcessSequence/ProcessSequence.h b/Framework/ProcessSequence/ProcessSequence.h
index 48eafee2839b1035bcff8019e9b94b366c4f3f21..4d4d3fbfdaff3d075f6cc613da78ece584ed7142 100644
--- a/Framework/ProcessSequence/ProcessSequence.h
+++ b/Framework/ProcessSequence/ProcessSequence.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -63,10 +63,6 @@ namespace corsika::process {
     T1 A; // this is a reference, if possible
     T2 B; // this is a reference, if possible
 
-    // ProcessSequence(ProcessSequence<T1,T2>&& v) : A(v.A), B(v.B) {}
-    // ProcessSequence<T1,T2>& operator=(ProcessSequence<T1,T2>&& v) { A=v.A; B=v.B;
-    // return *this; }
-
     ProcessSequence(T1 in_A, T2 in_B)
         : A(in_A)
         , B(in_B) {}
diff --git a/Framework/ProcessSequence/ProcessSignature.h b/Framework/ProcessSequence/ProcessSignature.h
index cb0081df416b19057f995065545f92d4f083f8a0..38503b87b49fcd900cc8d2b28f4872e9aeabc419 100644
--- a/Framework/ProcessSequence/ProcessSignature.h
+++ b/Framework/ProcessSequence/ProcessSignature.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/ProcessSequence/testProcessSequence.cc b/Framework/ProcessSequence/testProcessSequence.cc
index f46b917b537f452efa7897403beb85aa635bfb03..8fd46418ac838ca1af0f2beb3691bf599a40eb05 100644
--- a/Framework/ProcessSequence/testProcessSequence.cc
+++ b/Framework/ProcessSequence/testProcessSequence.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Random/ExponentialDistribution.h b/Framework/Random/ExponentialDistribution.h
index 248d785a748651bdd3cd462e2541bbd07403d8d0..dc17b20997e9932aaedfc8f26eeec3c2d63a1392 100644
--- a/Framework/Random/ExponentialDistribution.h
+++ b/Framework/Random/ExponentialDistribution.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Random/RNGManager.cc b/Framework/Random/RNGManager.cc
index 3245e8bfd4b5557fcf0cda06f9a09cf15a4ca90e..c02f7a4329b52cd397ba78c404381430c6d030b1 100644
--- a/Framework/Random/RNGManager.cc
+++ b/Framework/Random/RNGManager.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Random/RNGManager.h b/Framework/Random/RNGManager.h
index c440e7aaae0beb3ae745562fa4949eff5ff504ee..9637b4b8279a48169a523df687eab0146afada38 100644
--- a/Framework/Random/RNGManager.h
+++ b/Framework/Random/RNGManager.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Random/UniformRealDistribution.h b/Framework/Random/UniformRealDistribution.h
index fd501ab36b2d0e411a1a2fc256734f5ec0221932..1328377dc2d88114c447cd5a4558dfec21cdf112 100644
--- a/Framework/Random/UniformRealDistribution.h
+++ b/Framework/Random/UniformRealDistribution.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Random/testRandom.cc b/Framework/Random/testRandom.cc
index a8f8595512815574fd3abb0b9c29274a37ac22d4..c362d393fea3bc8bf4c4ad72949dd0c6a8d0bf86 100644
--- a/Framework/Random/testRandom.cc
+++ b/Framework/Random/testRandom.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/StackInterface/CMakeLists.txt b/Framework/StackInterface/CMakeLists.txt
index c6106121bfbdb3e1f277c387f767938cd2e0f1af..fa0edbef35fe95ba01cd10381247380423d28a67 100644
--- a/Framework/StackInterface/CMakeLists.txt
+++ b/Framework/StackInterface/CMakeLists.txt
@@ -1,8 +1,10 @@
 set (
   CORSIKAstackinterface_HEADERS
-  Stack.h
-  StackIterator.h
   ParticleBase.h
+  StackIteratorInterface.h
+  Stack.h
+  SecondaryView.h
+  CombinedStack.h
   )
 
 set (
@@ -35,3 +37,11 @@ install (
 add_executable (testStackInterface testStackInterface.cc)
 target_link_libraries (testStackInterface CORSIKAstackinterface CORSIKAthirdparty) # for catch2
 CORSIKA_ADD_TEST(testStackInterface)
+
+add_executable (testSecondaryView testSecondaryView.cc)
+target_link_libraries (testSecondaryView CORSIKAstackinterface CORSIKAthirdparty) # for catch2
+CORSIKA_ADD_TEST(testSecondaryView)
+
+add_executable (testCombinedStack testCombinedStack.cc)
+target_link_libraries (testCombinedStack CORSIKAstackinterface CORSIKAthirdparty) # for catch2
+CORSIKA_ADD_TEST(testCombinedStack)
diff --git a/Framework/StackInterface/CombinedStack.h b/Framework/StackInterface/CombinedStack.h
new file mode 100644
index 0000000000000000000000000000000000000000..95085c66aa2843bdd0b567c0e1effb8dbeefbbbc
--- /dev/null
+++ b/Framework/StackInterface/CombinedStack.h
@@ -0,0 +1,131 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#ifndef _include_stack_combinedstack_h_
+#define _include_stack_combinedstack_h_
+
+#include <corsika/particles/ParticleProperties.h>
+#include <corsika/stack/Stack.h>
+#include <corsika/units/PhysicalUnits.h>
+
+namespace corsika::stack {
+
+  /**
+   *
+   *
+   */
+  template <template <typename> typename ParticleInterface,
+            template <typename> typename ParticleInterfaceAdd, typename StackIterator>
+  class CombinedParticleInterface
+      : public ParticleInterfaceAdd<ParticleInterface<StackIterator>> {
+
+    using C =
+        CombinedParticleInterface<ParticleInterface, ParticleInterfaceAdd, StackIterator>;
+    using T = ParticleInterfaceAdd<ParticleInterface<StackIterator>>;
+    using I = ParticleInterface<StackIterator>;
+
+  protected:
+    using T::GetIndex;
+    using T::GetStackData;
+
+  public:
+    template <typename... Args1>
+    void SetParticleData(const std::tuple<Args1...> vA) {
+      I::SetParticleData(vA);
+      T::SetParticleData();
+    }
+    template <typename... Args1, typename... Args2>
+    void SetParticleData(const std::tuple<Args1...> vA, const std::tuple<Args2...> vB) {
+      I::SetParticleData(vA);
+      T::SetParticleData(vB);
+    }
+
+    template <typename... Args1>
+    void SetParticleData(C& p, const std::tuple<Args1...> vA) {
+      // static_assert(MT<I>::has_not, "error");
+      I::SetParticleData(static_cast<I&>(p), vA);
+      T::SetParticleData(static_cast<T&>(p));
+    }
+    template <typename... Args1, typename... Args2>
+    void SetParticleData(C& p, const std::tuple<Args1...> vA,
+                         const std::tuple<Args2...> vB) {
+      I::SetParticleData(static_cast<I&>(p), vA);
+      T::SetParticleData(static_cast<T&>(p), vB);
+    }
+  };
+
+  /**
+   * Memory implementation of the most simple (stupid) particle stack object.
+   */
+  template <typename Stack1Impl, typename Stack2Impl>
+  class CombinedStackImpl : public Stack1Impl, public Stack2Impl {
+
+  public:
+    void Init() {
+      Stack1Impl::Init();
+      Stack2Impl::Init();
+    }
+
+    void Clear() {
+      Stack1Impl::Clear();
+      Stack2Impl::Clear();
+    }
+
+    unsigned int GetSize() const { return Stack1Impl::GetSize(); }
+    unsigned int GetCapacity() const { return Stack1Impl::GetCapacity(); }
+
+    /**
+     *   Function to copy particle at location i1 in stack to i2
+     */
+    void Copy(const unsigned int i1, const unsigned int i2) {
+      if (i1 >= GetSize() || i2 >= GetSize()) {
+        std::ostringstream err;
+        err << "CombinedStack: trying to access data beyond size of stack!";
+        throw std::runtime_error(err.str());
+      }
+      Stack1Impl::Copy(i1, i2);
+      Stack2Impl::Copy(i1, i2);
+    }
+
+    /**
+     *   Function to copy particle at location i2 in stack to i1
+     */
+    void Swap(const unsigned int i1, const unsigned int i2) {
+      if (i1 >= GetSize() || i2 >= GetSize()) {
+        std::ostringstream err;
+        err << "CombinedStack: trying to access data beyond size of stack!";
+        throw std::runtime_error(err.str());
+      }
+      Stack1Impl::Swap(i1, i2);
+      Stack2Impl::Swap(i1, i2);
+    }
+
+    void IncrementSize() {
+      Stack1Impl::IncrementSize();
+      Stack2Impl::IncrementSize();
+    }
+
+    void DecrementSize() {
+      Stack1Impl::DecrementSize();
+      Stack2Impl::DecrementSize();
+    }
+
+  private:
+    /// the actual memory to store particle data
+
+  }; // end class CombinedStackImpl
+
+  template <typename Stack1Impl, typename Stack2Impl, template <typename> typename _PI>
+  using CombinedStack = Stack<CombinedStackImpl<Stack1Impl, Stack2Impl>, _PI>;
+
+} // namespace corsika::stack
+
+#endif
diff --git a/Framework/StackInterface/ParticleBase.h b/Framework/StackInterface/ParticleBase.h
index 5ef6ca662de7a8b9e02dc5d2d17fd4daf0f89169..e2f277e379c7ac0b393fb898ec7e6fd896dfaaf0 100644
--- a/Framework/StackInterface/ParticleBase.h
+++ b/Framework/StackInterface/ParticleBase.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -12,49 +12,117 @@
 #ifndef _include_particleBase_h_
 #define _include_particleBase_h_
 
-class StackData; // forward decl
+#include <type_traits>
 
 namespace corsika::stack {
 
-  //  template <typename> class PI;// : public ParticleBase<StackIteratorInterface> {
-  // template <typename, template <typename> typename> class Stack; // forward decl
-
   /**
-   \class ParticleBase
+   @class ParticleBase
 
    The base class to define the readout of particle properties from a
    particle stack. Every stack must implement this readout via the
    ParticleBase class.
+
+   The StackIterator template argument is derived from StackIteratorInterface, which is of
+   type <code> template <typename StackData, template <typename> typename
+   ParticleInterface> class StackIteratorInterface : public
+   ParticleInterface<StackIteratorInterface<StackData, ParticleInterface>>
+   </code>
+
+   where StackData must refer to a Stack type, and
+   ParticleInterface<StackIteratorInterface> is the corresponding particle readout class.
+
+   Thus, StackIteratorInterface is a CRTP class, injecting the full StackIteratorInterface
+   machinery into the ParticleInterface (aka ParticleBase) type!
+
+   The declartion of a StackIteratorInterface type simultaneously declares the
+   corresponding ParticleInterface type.
+
+   Furthermore, the operator* of the StackIteratorInterface returns a
+   static_cast to the ParticleInterface type, allowing a direct
+   readout of the particle data from the iterator.
+
   */
 
   template <typename StackIterator>
   class ParticleBase {
 
   public:
-    ParticleBase() {}
+    ParticleBase() = default;
 
   private:
-    ParticleBase(ParticleBase&);
-
+    /*
+    // those copy constructors and assigments should never be implemented
+    ParticleBase(ParticleBase&) = delete;
+    ParticleBase operator=(ParticleBase&) = delete;
+    ParticleBase(ParticleBase&&) = delete;
+    ParticleBase operator=(ParticleBase&&) = delete;
+    ParticleBase(const ParticleBase&) = delete;
+    ParticleBase operator=(const ParticleBase&) = delete;
+    */
   public:
-    /// delete this particle on the stack. The corresponding iterator
-    /// will be invalidated by this operation
+    /**
+     * Delete this particle on the stack. The corresponding iterator
+     * will be invalidated by this operation
+     */
     void Delete() { GetIterator().GetStack().Delete(GetIterator()); }
 
-    //  protected: // todo should be proteced, but don't now how to 'friend Stack'
-    /// Function to provide CRTP access to inheriting class (type)
+    /**
+     * Add a secondary particle based on *this on the stack @param
+     * args is a variadic list of input data that has to match the
+     * function description in the user defined ParticleInterface::AddSecondary(...)
+     */
+    template <typename... Args>
+    StackIterator AddSecondary(const Args... args) {
+      return GetStack().AddSecondary(GetIterator(), args...);
+    }
+
+    // protected: // todo should [MAY]be proteced, but don't now how to 'friend Stack'
+    // Function to provide CRTP access to inheriting class (type)
+    /**
+     * return the corresponding StackIterator for this particle
+     */
     StackIterator& GetIterator() { return static_cast<StackIterator&>(*this); }
     const StackIterator& GetIterator() const {
       return static_cast<const StackIterator&>(*this);
     }
 
-  protected:
-    /// access to underling stack data
+    //  protected:
+    /**
+        @name Access to underlying stack dfata, these are service
+        function for user classes. User code can only rely on GetIndex
+        and GetStackData to retrieve data
+        @{
+    */
     auto& GetStackData() { return GetIterator().GetStackData(); }
     const auto& GetStackData() const { return GetIterator().GetStackData(); }
+    auto& GetStack() { return GetIterator().GetStack(); }
+    const auto& GetStack() const { return GetIterator().GetStack(); }
+
+    /**
+     * return the index number of the underlying iterator object
+     */
+    unsigned int GetIndex() const { return GetIterator().GetIndexFromIterator(); }
+    ///@}
+  };
+
+  template <typename T>
+  class ParticleBaseAdd {
+
+  public:
+    ParticleBaseAdd() = default;
+
+    using T::GetIndex;
+    using T::GetStackData;
+
+  public:
+    template <typename... Args1, typename... Args2>
+    void SetParticleData(Args1... args1, Args2... args2) {
+      T::SetParticleData(args1...);
+    }
 
-    /// return the index number of the underlying iterator object
-    int GetIndex() const { return GetIterator().GetIndex(); }
+    template <typename... Args1, typename... Args2>
+    void SetParticleData(T& p, Args1... args1, Args2... args2) {}
   };
 
 } // namespace corsika::stack
diff --git a/Framework/StackInterface/SecondaryView.h b/Framework/StackInterface/SecondaryView.h
new file mode 100644
index 0000000000000000000000000000000000000000..0993edd98e211457976905bae849e901c045c6f7
--- /dev/null
+++ b/Framework/StackInterface/SecondaryView.h
@@ -0,0 +1,195 @@
+#ifndef _include_corsika_stack_secondaryview_h_
+#define _include_corsika_stack_secondaryview_h_
+
+#include <corsika/stack/Stack.h>
+
+#include <vector>
+
+namespace corsika::stack {
+
+  /**
+   * @class SecondaryView
+   *
+   * SecondaryView can only be constructed by giving a valid
+   * Projectile particle, following calls to AddSecondary will
+   * populate the original Stack, but will be directly accessible via
+   * the SecondaryView, e.g.
+
+     This allows to write code like
+     \verbatim
+     auto projectileInput = mainStack.GetNextParticle();
+     const unsigned int nMain = mainStack.GetSize();
+     SecondaryView<StackData, ParticleInterface> mainStackView(projectileInput);
+     mainStackView.AddSecondary(...data...);
+     mainStackView.AddSecondary(...data...);
+     mainStackView.AddSecondary(...data...);
+     mainStackView.AddSecondary(...data...);
+     assert(mainStackView.GetSize() == 4);
+     assert(mainStack.GetSize() = nMain+4);
+     \endverbatim
+
+     All operations possible on a Stack object are also possible on a
+     SecondaryView object. This means you can add, delete, copy, swap,
+     iterate, etc.
+   */
+
+  /* INTERNAL NOTE FOR DEVELOPERS The secondary particle indices are
+     stored in a std::vector fIndices, the index of the primary projectle
+     particle is explicitly stored in fProjectileIndex. StackIterator
+     indices are refering to those numbers, where
+     StackIterator::GetIndex()==0 refers to the fProjectileIndex and
+     StackIterator::GetIndex()>0 to fIndices[i+1], see function GetIndexFromIterator.
+   */
+
+  template <typename StackDataType, template <typename> typename ParticleInterface>
+  class SecondaryView : public Stack<StackDataType&, ParticleInterface> {
+
+    using ViewType = SecondaryView<StackDataType, ParticleInterface>;
+
+  private:
+    /**
+     * Helper type for inside this class
+     */
+    using InnerStackType = Stack<StackDataType&, ParticleInterface>;
+
+    /**
+     * @name We need this "special" types with non-reference StackData for
+     * the constructor of the SecondaryView class
+     * @{
+     */
+    using InnerStackTypeV = Stack<StackDataType, ParticleInterface>;
+    typedef StackIteratorInterface<typename std::remove_reference<StackDataType>::type,
+                                   ParticleInterface, InnerStackTypeV>
+        StackIteratorV;
+    /// @}
+
+  public:
+    using StackIterator =
+        StackIteratorInterface<typename std::remove_reference<StackDataType>::type,
+                               ParticleInterface, ViewType>;
+    using ConstStackIterator =
+        ConstStackIteratorInterface<typename std::remove_reference<StackDataType>::type,
+                                    ParticleInterface, ViewType>;
+
+    /**
+     * this is the full type of the declared ParticleInterface: typedef typename
+     */
+    using ParticleType = typename StackIterator::ParticleInterfaceType;
+
+    friend class StackIteratorInterface<
+        typename std::remove_reference<StackDataType>::type, ParticleInterface, ViewType>;
+
+    friend class ConstStackIteratorInterface<
+        typename std::remove_reference<StackDataType>::type, ParticleInterface, ViewType>;
+
+  private:
+    /**
+     * This is not accessible, since we don't want to allow creating a
+     * new stack.
+     */
+    template <typename... Args>
+    SecondaryView(Args... args);
+
+  public:
+    SecondaryView(StackIteratorV& vP)
+        : Stack<StackDataType&, ParticleInterface>(vP.GetStackData())
+        , fProjectileIndex(vP.GetIndex()) {}
+
+    auto GetProjectile() {
+      // NOTE: 0 is special marker here for PROJECTILE, see GetIndexFromIterator
+      return StackIterator(*this, 0);
+    }
+
+    template <typename... Args>
+    auto AddSecondary(const Args... v) {
+      InnerStackType::GetStackData().IncrementSize();
+      const unsigned int idSec = GetSize();
+      const unsigned int index = InnerStackType::GetStackData().GetSize() - 1;
+      fIndices.push_back(index);
+      StackIterator proj = GetProjectile();
+      // NOTE: "+1" is since "0" is special marker here for PROJECTILE, see
+      // GetIndexFromIterator
+      return StackIterator(*this, idSec + 1, proj, v...);
+    }
+
+    /**
+     * overwrite Stack::GetSize to return actual number of secondaries
+     */
+    unsigned int GetSize() const { return fIndices.size(); }
+
+    /**
+     * @name These are functions required by std containers and std loops
+     * The Stack-versions must be overwritten, since here we need the correct
+     * SecondaryView::GetSize
+     * @{
+     */
+    // NOTE: the "+1" is since "0" is special marker here for PROJECTILE, see
+    // GetIndexFromIterator
+    auto begin() { return StackIterator(*this, 0 + 1); }
+    auto end() { return StackIterator(*this, GetSize() + 1); }
+    auto last() { return StackIterator(*this, GetSize() - 1 + 1); }
+
+    auto begin() const { return ConstStackIterator(*this, 0 + 1); }
+    auto end() const { return ConstStackIterator(*this, GetSize() + 1); }
+    auto last() const { return ConstStackIterator(*this, GetSize() - 1 + 1); }
+
+    auto cbegin() const { return ConstStackIterator(*this, 0 + 1); }
+    auto cend() const { return ConstStackIterator(*this, GetSize() + 1); }
+    auto clast() const { return ConstStackIterator(*this, GetSize() - 1 + 1); }
+    /// @}
+
+    /**
+     * need overwrite Stack::Delete, since we want to call SecondaryView::DeleteLast
+     */
+    void Delete(StackIterator p) {
+      if (IsEmpty()) { /* error */
+        throw std::runtime_error("Stack, cannot delete entry since size is zero");
+      }
+      if (p.GetIndex() < GetSize() - 1)
+        InnerStackType::GetStackData().Copy(GetSize() - 1, p.GetIndex());
+      DeleteLast();
+    }
+
+    /**
+     * need overwrite Stack::Delete, since we want to call SecondaryView::DeleteLast
+     */
+    void Delete(ParticleType p) { Delete(p.GetIterator()); }
+
+    /**
+     * delete last particle on stack by decrementing stack size
+     */
+    void DeleteLast() {
+      fIndices.pop_back();
+      InnerStackType::GetStackData().DecrementSize();
+    }
+
+    /**
+     * return next particle from stack, need to overwrtie Stack::GetNextParticle to get
+     * right reference
+     */
+    StackIterator GetNextParticle() { return last(); }
+
+    /**
+     * check if there are no further particles on stack
+     */
+    bool IsEmpty() { return GetSize() == 0; }
+
+  protected:
+    /**
+     * We only want to 'see' secondaries indexed in fIndices. In this
+     * function the conversion form iterator-index to stack-index is
+     * performed.
+     */
+    unsigned int GetIndexFromIterator(const unsigned int vI) const {
+      if (vI == 0) return fProjectileIndex;
+      return fIndices[vI - 1];
+    }
+
+  private:
+    unsigned int fProjectileIndex;
+    std::vector<unsigned int> fIndices;
+  };
+
+} // namespace corsika::stack
+
+#endif
diff --git a/Framework/StackInterface/Stack.dox b/Framework/StackInterface/Stack.dox
new file mode 100644
index 0000000000000000000000000000000000000000..8ac29c628c08a5c2a65ad8831d762b9b67c830e7
--- /dev/null
+++ b/Framework/StackInterface/Stack.dox
@@ -0,0 +1,20 @@
+/**
+  @page Stack Description of particle stacks
+
+  In the CORSIKA 8 framework particle data is always stored in
+  particle stacks. A particle is, thus, always a reference (iterator)
+  to an entry on a stack, e.g.
+
+  \verbatim
+  ModelStack stack;
+  stack.begin(); // returns an iterator: StackIterator, ConstStackIterator
+
+  *stack.begin(); // return a reference to ParticleInterfaceType, which is the class provided by the user to read/write particle properties
+  
+  \endverbatim
+
+  All functionality and algorithms for stack data access is located in the namespace corsika::stack
+
+  The minimal example of how to use this is shown in stack_example.cc  
+
+*/
\ No newline at end of file
diff --git a/Framework/StackInterface/Stack.h b/Framework/StackInterface/Stack.h
index f47c15d3daf3071a8c71da1b81b71e575a620784..bfb5acfbd10f5910ede79649df123bdc8aa296c5 100644
--- a/Framework/StackInterface/Stack.h
+++ b/Framework/StackInterface/Stack.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -12,7 +12,28 @@
 #ifndef _include_Stack_h__
 #define _include_Stack_h__
 
-#include <corsika/stack/StackIterator.h> // include here, to help application programmres
+#include <corsika/stack/StackIteratorInterface.h>
+
+#include <stdexcept>
+#include <type_traits>
+
+#include <corsika/stack/SecondaryView.h>
+
+// SFINAE test
+template <typename T>
+class HasGetIndexFromIterator {
+private:
+  typedef char YesType[1];
+  typedef char NoType[2];
+
+  template <typename C>
+  static YesType& test(decltype(&C::GetIndexFromIterator));
+  template <typename C>
+  static NoType& test(...);
+
+public:
+  enum { value = sizeof(test<T>(0)) == sizeof(YesType) };
+};
 
 /**
    All classes around management of particles on a stack.
@@ -20,72 +41,219 @@
 
 namespace corsika::stack {
 
-  template <typename>
-  class PI; // forward decl
+  /**
+     This is just a forward declatation for the user-defined
+     ParticleInterface, which is one of the essential template
+     parameters for the Stack.
+
+     <b>Important:</b> ParticleInterface must inherit from ParticleBase !
+   */
+
+  template <typename>      //, bool>
+  class ParticleInterface; // forward decl
 
   /**
-     Interface definition of a Stack object. The Stack implements the
+     The Stack class provides (and connects) the main particle data storage machinery.
+
+     The StackDataType type is the user-provided bare data storage
+     object. This can be of any complexity, from a simple struct
+     (fortran common block), to a combination of different and
+     distributed data sources.
+
+     The user-provided ParticleInterface template type is the base
+     class type of the StackIteratorInterface class (CRTP) and must
+     provide all functions to read single particle data from the
+     StackDataType, given an 'unsigned int' index.
+
+     The Stack implements the
      std-type begin/end function to allow integration in normal for
-     loops etc.
+     loops, ranges, etc.
    */
 
-  template <typename StackData, template <typename> typename PI>
-  class Stack : public StackData {
+  template <typename StackDataType, template <typename> typename ParticleInterface>
+  class Stack {
+
+    using StackType = Stack<StackDataType, ParticleInterface>;
+
+    StackDataType fData; ///< this in general holds all the data and can be quite big
+
+  private:
+    Stack(Stack&) = delete; ///< since Stack can be very big, we don't want to copy it
+    Stack& operator=(Stack&) =
+        delete; ///< since Stack can be very big, we don't want to copy it
 
   public:
-    typedef Stack<StackData, PI> StackType;
-    typedef StackIteratorInterface<StackData, PI> StackIterator;
-    typedef const StackIterator ConstStackIterator;
-    typedef typename StackIterator::ParticleInterfaceType ParticleType;
-    friend class StackIteratorInterface<StackData, PI>;
+    /**
+     * if StackDataType is a reference member we *have* to initialize
+     * it in the constructor, this is typically needed for SecondaryView
+     */
+    template <typename = std::enable_if_t<std::is_reference<StackDataType>{}>>
+    Stack(StackDataType vD)
+        : fData(vD) {}
+
+    /**
+     * This constructor takes any argument and passes it on to the
+     * StackDataType user class. If the user did not provide a suited
+     * constructor this will fail with an error message.
+     */
+    template <typename... Args,
+              typename = std::enable_if_t<!std::is_reference<StackDataType>{}>>
+    Stack(Args... args)
+        : fData(args...) {}
 
   public:
-    using StackData::GetCapacity;
-    using StackData::GetSize;
+    typedef StackDataType
+        StackImpl; ///< this is the type of the user-provided data structure
+
+    template <typename SI>                //, bool IsBase>
+    using PIType = ParticleInterface<SI>; //, IsBase>;
 
-    using StackData::Clear;
-    using StackData::Copy;
+    /**
+     * Via the StackIteratorInterface and ConstStackIteratorInterface
+     * specialization, the type of the StackIterator
+     * template class is declared for a particular stack data
+     * object. Using CRTP, this also determines the type of
+     * ParticleInterface template class simultaneously.
+     */
+    using StackIterator =
+        StackIteratorInterface<typename std::remove_reference<StackDataType>::type,
+                               ParticleInterface, StackType>;
+    using ConstStackIterator =
+        ConstStackIteratorInterface<typename std::remove_reference<StackDataType>::type,
+                                    ParticleInterface, StackType>;
 
-    using StackData::DecrementSize;
-    using StackData::IncrementSize;
+    /**
+     * this is the full type of the declared ParticleInterface: typedef typename
+     */
+    typedef typename StackIterator::ParticleInterfaceType ParticleType;
+
+    // friends are needed since they need access to protected members
+    friend class StackIteratorInterface<
+        typename std::remove_reference<StackDataType>::type, ParticleInterface,
+        StackType>;
+    friend class ConstStackIteratorInterface<
+        typename std::remove_reference<StackDataType>::type, ParticleInterface,
+        StackType>;
 
-    using StackData::Init;
+  public:
+    /**
+     * @name Most generic proxy methods for StackDataType fData
+     * @{
+     */
+    unsigned int GetCapacity() const { return fData.GetCapacity(); }
+    unsigned int GetSize() const { return fData.GetSize(); }
+    template <typename... Args>
+    auto Init(Args... args) {
+      return fData.Init(args...);
+    }
+    template <typename... Args>
+    auto Clear(Args... args) {
+      return fData.Clear(args...);
+    }
+    ///@}
 
   public:
-    /// these are functions required by std containers and std loops
+    /**
+     * @name These are functions required by std containers and std loops
+     * @{
+     */
     StackIterator begin() { return StackIterator(*this, 0); }
     StackIterator end() { return StackIterator(*this, GetSize()); }
     StackIterator last() { return StackIterator(*this, GetSize() - 1); }
 
-    /// these are functions required by std containers and std loops
+    ConstStackIterator begin() const { return ConstStackIterator(*this, 0); }
+    ConstStackIterator end() const { return ConstStackIterator(*this, GetSize()); }
+    ConstStackIterator last() const { return ConstStackIterator(*this, GetSize() - 1); }
+
     ConstStackIterator cbegin() const { return ConstStackIterator(*this, 0); }
     ConstStackIterator cend() const { return ConstStackIterator(*this, GetSize()); }
     ConstStackIterator clast() const { return ConstStackIterator(*this, GetSize() - 1); }
+    /// @}
+
+    /**
+     * increase stack size, create new particle at end of stack
+     */
+    template <typename... Args>
+    StackIterator AddParticle(const Args... v) {
+      fData.IncrementSize();
+      return StackIterator(*this, GetSize() - 1, v...);
+    }
+
+    /**
+     * increase stack size, create new particle at end of stack, related to parent
+     * particle/projectile
+     */
+    template <typename... Args>
+    StackIterator AddSecondary(StackIterator& parent, const Args... v) {
+      fData.IncrementSize();
+      return StackIterator(*this, GetSize() - 1, parent, v...);
+    }
 
-    /// increase stack size, create new particle at end of stack
-    StackIterator NewParticle() {
-      IncrementSize();
-      return StackIterator(*this, GetSize() - 1);
+    void Swap(StackIterator a, StackIterator b) {
+      fData.Swap(a.GetIndex(), b.GetIndex());
     }
-    void Copy(StackIterator& a, StackIterator& b) { Copy(a.GetIndex(), b.GetIndex()); }
-    /// delete this particle
-    void Delete(StackIterator& p) {
+    void Swap(ConstStackIterator a, ConstStackIterator b) {
+      fData.Swap(a.GetIndex(), b.GetIndex());
+    }
+    void Copy(StackIterator a, StackIterator b) {
+      fData.Copy(a.GetIndex(), b.GetIndex());
+    }
+    void Copy(ConstStackIterator a, StackIterator b) {
+      fData.Copy(a.GetIndex(), b.GetIndex());
+    }
+
+    /**
+     * delete this particle
+     */
+    void Delete(StackIterator p) {
       if (GetSize() == 0) { /*error*/
+        throw std::runtime_error("Stack, cannot delete entry since size is zero");
       }
-      if (p.GetIndex() < GetSize() - 1) Copy(GetSize() - 1, p.GetIndex());
+      if (p.GetIndex() < GetSize() - 1) fData.Copy(GetSize() - 1, p.GetIndex());
       DeleteLast();
       // p.SetInvalid();
     }
-    void Delete(ParticleType& p) { Delete(p.GetIterator()); }
-    /// delete last particle on stack by decrementing stack size
-    void DeleteLast() { DecrementSize(); }
-    /// check if there are no further particles on stack
+    /**
+     * delete this particle
+     */
+    void Delete(ParticleType p) { Delete(p.GetIterator()); }
+
+    /**
+     * delete last particle on stack by decrementing stack size
+     */
+    void DeleteLast() { fData.DecrementSize(); }
+
+    /**
+     * check if there are no further particles on stack
+     */
     bool IsEmpty() { return GetSize() == 0; }
+
+    /**
+     * return next particle from stack
+     */
     StackIterator GetNextParticle() { return last(); }
 
   protected:
-    StackData& GetStackData() { return static_cast<StackData&>(*this); }
-    const StackData& GetStackData() const { return static_cast<const StackData&>(*this); }
+    // typename std::enable_if<HasGetIndexFromIterator<T>::value, unsigned int>::type
+    // typename std::enable_if<std::is_base_of<decltype(*this)>,
+    // SecondaryView<StackDataType, ParticleInterface>>::value, unsigned int>::type
+    /**
+     * Function to perform eventual transformation from
+     * StackIterator::GetIndex() to index in data stored in
+     * StackDataType fData. By default (and in almost all cases) this
+     * should just be identiy. See class SecondaryView for an alternative implementation.
+     */
+    unsigned int GetIndexFromIterator(const unsigned int vI) const { return vI; }
+
+    /**
+     * @name Return reference to StackDataType object fData for data access
+     * @{
+     */
+    typename std::remove_reference<StackDataType>::type& GetStackData() { return fData; }
+    const typename std::remove_reference<StackDataType>::type& GetStackData() const {
+      return fData;
+    }
+    ///@}
   };
 
 } // namespace corsika::stack
diff --git a/Framework/StackInterface/StackIterator.h b/Framework/StackInterface/StackIterator.h
deleted file mode 100644
index 47424f60d09faab92b19cb51bfba0479c4fbe5d2..0000000000000000000000000000000000000000
--- a/Framework/StackInterface/StackIterator.h
+++ /dev/null
@@ -1,113 +0,0 @@
-
-/**
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * See file AUTHORS for a list of contributors.
- *
- * This software is distributed under the terms of the GNU General Public
- * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
- * the license.
- */
-
-#ifndef _include_StackIterator_h__
-#define _include_StackIterator_h__
-
-#include <corsika/stack/ParticleBase.h>
-
-class StackData; // forward decl
-
-namespace corsika::stack {
-
-  template <typename StackData, template <typename> typename ParticleInterface>
-  class Stack; // forward decl
-
-  /**
-     @class StackIterator
-
-     The StackIterator is the main interface to iterator over
-     particles on a stack. At the same time StackIterator is a
-     Particle object by itself, thus there is no difference between
-     type and ref_type for convenience of the physicist.
-
-     This allows to write code like
-     \verbatim
-     for (auto& p : theStack) { p.SetEnergy(newEnergy); }
-     \endverbatim
-
-     The template argument Stack determines the type of Stack object
-     the data is stored in. A pointer to the Stack object is part of
-     the StackIterator. In addition to Stack the iterator only knows
-     the index fIndex in the Stack data.
-
-     The template argument Particles acts as a policy to provide
-     readout function of Particle data from the stack. The Particle
-     class must know how to retrieve information from the Stack data
-     for a particle entry at any index fIndex.
-  */
-
-  template <typename StackData, template <typename> typename ParticleInterface>
-  class StackIteratorInterface
-      : public ParticleInterface<StackIteratorInterface<StackData, ParticleInterface> > {
-
-    typedef Stack<StackData, ParticleInterface> StackType;
-    typedef ParticleInterface<StackIteratorInterface<StackData, ParticleInterface> >
-        ParticleInterfaceType;
-
-    // friend class ParticleInterface<StackIterator<StackData>>; // to access GetStackData
-    friend class Stack<StackData, ParticleInterface>;  // for access to GetIndex
-    friend class ParticleBase<StackIteratorInterface>; // for access to GetStackData
-
-  private:
-    int fIndex = 0;
-    StackType* fData = 0; // todo is this problematic, when stacks are copied?
-
-  public:
-    // StackIterator() : fData(0), fIndex(0) { }
-    StackIteratorInterface(StackType& data, const int index)
-        : fIndex(index)
-        , fData(&data) {}
-
-  private:
-    StackIteratorInterface(const StackIteratorInterface& mit)
-        : fIndex(mit.fIndex)
-        , fData(mit.fData) {}
-
-  public:
-    StackIteratorInterface& operator=(const StackIteratorInterface& mit) {
-      fIndex = mit.fIndex;
-      fData = mit.fData;
-      return *this;
-    }
-
-  public:
-    StackIteratorInterface& operator++() {
-      ++fIndex;
-      return *this;
-    }
-    StackIteratorInterface operator++(int) {
-      StackIteratorInterface tmp(*this);
-      ++fIndex;
-      return tmp;
-    }
-    bool operator==(const StackIteratorInterface& rhs) { return fIndex == rhs.fIndex; }
-    bool operator!=(const StackIteratorInterface& rhs) { return fIndex != rhs.fIndex; }
-
-    ParticleInterfaceType& operator*() {
-      return static_cast<ParticleInterfaceType&>(*this);
-    }
-    const ParticleInterfaceType& operator*() const {
-      return static_cast<const ParticleInterfaceType&>(*this);
-    }
-
-  protected:
-    int GetIndex() const { return fIndex; }
-    StackType& GetStack() { return *fData; }
-    const StackType& GetStack() const { return *fData; }
-    StackData& GetStackData() { return fData->GetStackData(); }
-    const StackData& GetStackData() const { return fData->GetStackData(); }
-
-  }; // end class StackIterator
-
-} // namespace corsika::stack
-
-#endif
diff --git a/Framework/StackInterface/StackIteratorInterface.h b/Framework/StackInterface/StackIteratorInterface.h
new file mode 100644
index 0000000000000000000000000000000000000000..cf1b6d7b53efb14f3fbdd4283831e1f34fe751de
--- /dev/null
+++ b/Framework/StackInterface/StackIteratorInterface.h
@@ -0,0 +1,286 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#ifndef _include_StackIteratorinterface_h__
+#define _include_StackIteratorinterface_h__
+
+#include <corsika/stack/ParticleBase.h>
+
+#include <type_traits>
+
+namespace corsika::stack {
+
+  template <typename StackDataType, template <typename> typename ParticleInterface>
+  class Stack; // forward decl
+
+  template <typename StackDataType, template <typename> typename ParticleInterface>
+  class SecondaryView; // forward decl
+
+  /**
+     @class StackIteratorInterface
+
+     The StackIteratorInterface is the main interface to iterator over
+     particles on a stack. At the same time StackIteratorInterface is a
+     Particle object by itself, thus there is no difference between
+     type and ref_type for convenience of the physicist.
+
+     This allows to write code like
+     \verbatim
+     for (auto& p : theStack) { p.SetEnergy(newEnergy); }
+     \endverbatim
+
+     The template argument Stack determines the type of Stack object
+     the data is stored in. A pointer to the Stack object is part of
+     the StackIteratorInterface. In addition to Stack the iterator only knows
+     the index fIndex in the Stack data.
+
+     The template argument `ParticleInterface` acts as a policy to provide
+     readout function of Particle data from the stack. The ParticleInterface
+     class must know how to retrieve information from the Stack data
+     for a particle entry at any index fIndex.
+
+     The ParticleInterface class must be written and provided by the
+     user, it contains methods like <code> auto GetData() const {
+     return GetStackData().GetData(GetIndex()); }</code>, where
+     StackIteratorInterface::GetStackData() return a reference to the
+     object storing the particle data of type StackDataType. And
+     StackIteratorInterface::GetIndex() provides the iterator index to
+     be readout. The StackDataType is another user-provided class to
+     store data and must implement functions compatible with
+     ParticleInterface, in this example StackDataType::GetData(const unsigned int
+     vIndex).
+
+     For an example see stack_example.cc, or the
+     corsika::processes::sibyll::SibStack class
+  */
+
+  template <typename StackDataType, template <typename> typename ParticleInterface,
+            typename StackType =
+                Stack<StackDataType, ParticleInterface>> //, bool IsBase=true >
+  class StackIteratorInterface
+      : public ParticleInterface<StackIteratorInterface<StackDataType, ParticleInterface,
+                                                        StackType>> { //,IsBase> {
+
+  public:
+    using ParticleInterfaceType = ParticleInterface<
+        StackIteratorInterface<StackDataType, ParticleInterface, StackType>>; //,IsBase>;
+
+    // friends are needed for access to protected methods
+    friend class Stack<StackDataType,
+                       ParticleInterface>; // for access to GetIndex for Stack
+    friend class Stack<StackDataType&, ParticleInterface>; // for access to GetIndex
+                                                           // SecondaryView : public Stack
+    friend class ParticleBase<StackIteratorInterface>; // for access to GetStackDataType
+    friend class SecondaryView<StackDataType,
+                               ParticleInterface>; // access for SecondaryView
+
+  private:
+    unsigned int fIndex = 0;
+    StackType* fData = 0; // info: Particles and StackIterators become invalid when parent
+                          // Stack is copied or deleted!
+
+    // it is not allowed to create a "dangling" stack iterator
+    StackIteratorInterface() = delete;
+
+  public:
+    /** iterator must always point to data, with an index:
+        @param data reference to the stack [rw]
+        @param index index on stack
+     */
+    StackIteratorInterface(StackType& data, const unsigned int index)
+        : fIndex(index)
+        , fData(&data) {}
+
+    /** constructor that also sets new values on particle data object
+        @param data reference to the stack [rw]
+        @param index index on stack
+        @param args variadic list of data to initialize stack entry, this must be
+       consistent with the definition of the user-provided
+       ParticleInterfaceType::SetParticleData(...) function
+     */
+    template <typename... Args>
+    StackIteratorInterface(StackType& data, const unsigned int index, const Args... args)
+        : fIndex(index)
+        , fData(&data) {
+      ParticleInterfaceType& p = **this;
+      p.SetParticleData(args...);
+    }
+
+    /** constructor that also sets new values on particle data object, including reference
+        to parent particle
+        @param data reference to the stack [rw]
+        @param index index on stack
+        @param reference to parent particle [rw]. This can be used for thinning, particle
+       counting, history, etc.
+        @param args variadic list of data to initialize stack entry, this must be
+       consistent with the definition of the user-provided
+       ParticleInterfaceType::SetParticleData(...) function
+    */
+    template <typename... Args>
+    StackIteratorInterface(StackType& data, const unsigned int index,
+                           StackIteratorInterface& parent, const Args... args)
+        : fIndex(index)
+        , fData(&data) {
+      ParticleInterfaceType& p = **this;
+      ParticleInterfaceType& pa = *parent;
+      p.SetParticleData(pa, args...);
+    }
+
+  public:
+    /** @name Iterator interface
+        @{
+    */
+    StackIteratorInterface& operator++() {
+      ++fIndex;
+      return *this;
+    }
+    StackIteratorInterface operator++(int) {
+      StackIteratorInterface tmp(*this);
+      ++fIndex;
+      return tmp;
+    }
+    StackIteratorInterface operator+(int delta) {
+      return StackIteratorInterface(*fData, fIndex + delta);
+    }
+    bool operator==(const StackIteratorInterface& rhs) { return fIndex == rhs.fIndex; }
+    bool operator!=(const StackIteratorInterface& rhs) { return fIndex != rhs.fIndex; }
+
+    /**
+     * Convert iterator to value type, where value type is the user-provided particle
+     * readout class
+     */
+    ParticleInterfaceType& operator*() {
+      return static_cast<ParticleInterfaceType&>(*this);
+    }
+    /**
+     * Convert iterator to const value type, where value type is the user-provided
+     * particle readout class
+     */
+    const ParticleInterfaceType& operator*() const {
+      return static_cast<const ParticleInterfaceType&>(*this);
+    }
+    ///@}
+
+  protected:
+    /**
+     * @name Stack data access
+     * @{
+     */
+    /// Get current particle index
+    inline unsigned int GetIndex() const { return fIndex; }
+    /// Get current particle Stack object
+    inline StackType& GetStack() { return *fData; }
+    /// Get current particle const Stack object
+    inline const StackType& GetStack() const { return *fData; }
+    /// Get current user particle StackDataType object
+    inline StackDataType& GetStackData() { return fData->GetStackData(); }
+    /// Get current const user particle StackDataType object
+    inline const StackDataType& GetStackData() const { return fData->GetStackData(); }
+    /// Get data index as mapped in Stack class
+    inline unsigned int GetIndexFromIterator() const {
+      return fData->GetIndexFromIterator(fIndex);
+    }
+    ///@}
+  }; // end class StackIterator
+
+  /**
+     @class ConstStackIteratorInterface
+
+     This is the iterator class for const-access to stack data
+   */
+
+  template <typename StackDataType, template <typename> typename ParticleInterface,
+            typename StackType = Stack<StackDataType, ParticleInterface>>
+  class ConstStackIteratorInterface
+      : public ParticleInterface<ConstStackIteratorInterface<
+            StackDataType, ParticleInterface, StackType>> { //,IsBase> {
+
+  public:
+    typedef ParticleInterface<ConstStackIteratorInterface<
+        StackDataType, ParticleInterface, StackType>> //,IsBase>
+        ParticleInterfaceType;
+
+    friend class Stack<StackDataType, ParticleInterface>;   // for access to GetIndex
+    friend class ParticleBase<ConstStackIteratorInterface>; // for access to
+                                                            // GetStackDataType
+
+  private:
+    unsigned int fIndex = 0;
+    const StackType* fData = 0; // info: Particles and StackIterators become invalid when
+                                // parent Stack is copied or deleted!
+
+    // we don't want to allow dangling iterators to exist
+    ConstStackIteratorInterface() = delete;
+
+  public:
+    ConstStackIteratorInterface(const StackType& data, const unsigned int index)
+        : fIndex(index)
+        , fData(&data) {}
+
+    /**
+       @class ConstStackIteratorInterface
+
+       The const counterpart of StackIteratorInterface, which is used
+       for read-only iterator access on particle stack:
+
+       \verbatim
+       for (const auto& p : theStack) { E += p.GetEnergy(); }
+       \endverbatim
+
+       See documentation of StackIteratorInterface for more details.
+    */
+
+  public:
+    /** @name Iterator interface
+     */
+    ///@{
+    ConstStackIteratorInterface& operator++() {
+      ++fIndex;
+      return *this;
+    }
+    ConstStackIteratorInterface operator++(int) {
+      ConstStackIteratorInterface tmp(*this);
+      ++fIndex;
+      return tmp;
+    }
+    ConstStackIteratorInterface operator+(int delta) {
+      return ConstStackIteratorInterface(*fData, fIndex + delta);
+    }
+    bool operator==(const ConstStackIteratorInterface& rhs) {
+      return fIndex == rhs.fIndex;
+    }
+    bool operator!=(const ConstStackIteratorInterface& rhs) {
+      return fIndex != rhs.fIndex;
+    }
+
+    const ParticleInterfaceType& operator*() const {
+      return static_cast<const ParticleInterfaceType&>(*this);
+    }
+    ///@}
+
+  protected:
+    /** @name Stack data access
+        Only the const versions for read-only access
+     */
+    ///@{
+    inline unsigned int GetIndex() const { return fIndex; }
+    inline const StackType& GetStack() const { return *fData; }
+    inline const StackDataType& GetStackData() const { return fData->GetStackData(); }
+    /// Get data index as mapped in Stack class
+    inline unsigned int GetIndexFromIterator() const {
+      return fData->GetIndexFromIterator(fIndex);
+    }
+    ///@}
+  }; // end class ConstStackIterator
+
+} // namespace corsika::stack
+
+#endif
diff --git a/Framework/StackInterface/comp b/Framework/StackInterface/comp
new file mode 100644
index 0000000000000000000000000000000000000000..3b233562b0339c43985523bfc4c3b1406c9be28f
--- /dev/null
+++ b/Framework/StackInterface/comp
@@ -0,0 +1,2 @@
+TestParticleInterface2<TestParticleInterface<corsika::stack::StackIteratorInterface<corsika::stack::CombinedStackImpl<corsika::stack::CombinedStackImpl<TestStackData, TestStackData2>, TestStackData3>, CombinedTestInterfaceType2, corsika::stack::Stack<corsika::stack::CombinedStackImpl<corsika::stack::CombinedStackImpl<TestStackData, TestStackData2>, TestStackData3>, CombinedTestInterfaceType2> > > >::content
+
diff --git a/Framework/StackInterface/testCombinedStack.cc b/Framework/StackInterface/testCombinedStack.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5cd65446ee3f339b48d5872f2d45192e5888e105
--- /dev/null
+++ b/Framework/StackInterface/testCombinedStack.cc
@@ -0,0 +1,306 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#include <corsika/stack/CombinedStack.h>
+#include <corsika/stack/Stack.h>
+
+#include <testTestStack.h> // for testing: simple stack. This is a
+// test-build, and inluce file is obtained from CMAKE_CURRENT_SOURCE_DIR
+
+#include <boost/type_index.hpp>
+#include <type_traits>
+using boost::typeindex::type_id_with_cvr;
+
+#include <iomanip>
+#include <iostream>
+#include <vector>
+
+#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
+                          // cpp file
+#include <catch2/catch.hpp>
+
+using namespace corsika::stack;
+using namespace std;
+
+// definition of stack-data object
+class TestStackData2 {
+
+public:
+  // these functions are needed for the Stack interface
+  void Init() {}
+  void Clear() { fData2.clear(); }
+  unsigned int GetSize() const { return fData2.size(); }
+  unsigned int GetCapacity() const { return fData2.size(); }
+  void Copy(const int i1, const int i2) { fData2[i2] = fData2[i1]; }
+  void Swap(const int i1, const int i2) {
+    double tmp0 = fData2[i1];
+    fData2[i1] = fData2[i2];
+    fData2[i2] = tmp0;
+  }
+
+  // custom data access function
+  void SetData2(const int i, const double v) { fData2[i] = v; }
+  double GetData2(const int i) const { return fData2[i]; }
+
+  // these functions are also needed by the Stack interface
+  void IncrementSize() { fData2.push_back(0.); }
+  void DecrementSize() {
+    if (fData2.size() > 0) { fData2.pop_back(); }
+  }
+
+  // custom private data section
+private:
+  std::vector<double> fData2;
+};
+
+// defintion of a stack-readout object, the iteractor dereference
+// operator will deliver access to these function
+template <typename T>
+class TestParticleInterface2
+    : public T { // corsika::stack::ParticleBaseAdd<T> {//public T {
+
+public:
+  using T::GetIndex;
+  using T::GetStackData;
+  using T::SetParticleData;
+
+  // default version for particle-creation from input data
+  void SetParticleData(const std::tuple<double> v = {0.}) { SetData2(std::get<0>(v)); }
+  void SetParticleData(TestParticleInterface2<T>& parent,
+                       const std::tuple<double> v = {0.}) {
+    SetData2(parent.GetData2() + std::get<0>(v));
+  }
+  void SetData2(const double v) { GetStackData().SetData2(GetIndex(), v); }
+  double GetData2() const { return GetStackData().GetData2(GetIndex()); }
+};
+
+// combined stack
+template <typename StackIter>
+using CombinedTestInterfaceType =
+    corsika::stack::CombinedParticleInterface<TestParticleInterface,
+                                              TestParticleInterface2, StackIter>;
+
+using StackTest = CombinedStack<TestStackData, TestStackData2, CombinedTestInterfaceType>;
+typedef StackTest::ParticleType Particle;
+
+TEST_CASE("Combined Stack", "[stack]") {
+
+  // helper function for sum over stack data
+  auto sum = [](const StackTest& stack) {
+    double v = 0;
+    for (const auto& p : stack) v += p.GetData();
+    return v;
+  };
+  auto sum2 = [](const StackTest& stack) {
+    double v = 0;
+    for (const auto& p : stack) v += p.GetData2();
+    return v;
+  };
+
+  SECTION("StackInterface") {
+
+    // construct a valid Stack object
+    StackTest s;
+    s.Init();
+    s.Clear();
+    s.AddParticle(std::tuple{0.});
+    s.Copy(s.cbegin(), s.begin());
+    s.Swap(s.begin(), s.begin());
+    REQUIRE(s.GetSize() == 1);
+  }
+
+  SECTION("construct") {
+
+    // construct a valid, empty Stack object
+    StackTest s;
+  }
+
+  SECTION("write and read") {
+
+    StackTest s;
+    s.AddParticle(std::tuple{9.9});
+    REQUIRE(sum2(s) == 0.);
+    REQUIRE(sum(s) == 9.9);
+  }
+
+  SECTION("delete from stack") {
+
+    StackTest s;
+    REQUIRE(s.GetSize() == 0);
+    StackTest::StackIterator p =
+        s.AddParticle(std::tuple{0.}); // valid way to access particle data
+    p.SetData(8.9);
+    p.SetData2(3.);
+    REQUIRE(sum2(s) == 3.);
+    REQUIRE(sum(s) == 8.9);
+    REQUIRE(s.GetSize() == 1);
+    s.Delete(p);
+    REQUIRE(s.GetSize() == 0);
+  }
+
+  SECTION("delete particle") {
+
+    StackTest s;
+    REQUIRE(s.GetSize() == 0);
+    auto p = s.AddParticle(
+        std::tuple{9.9}); // also valid way to access particle data, identical to above
+    REQUIRE(s.GetSize() == 1);
+    p.Delete();
+    REQUIRE(s.GetSize() == 0);
+  }
+
+  SECTION("create secondaries") {
+    StackTest s;
+    REQUIRE(s.GetSize() == 0);
+    auto iter = s.AddParticle(std::tuple{9.9});
+    Particle& p = *iter; // also this is valid to access particle data
+    p.SetData2(2);
+    REQUIRE(s.GetSize() == 1);
+    p.AddSecondary(std::tuple{4.4});
+    REQUIRE(s.GetSize() == 2);
+    // p.AddSecondary(3.3, 2.2, 1.);
+    // REQUIRE(s.GetSize() == 3);
+    double v = 0;
+    for (const auto& i : s) {
+      v += i.GetData();
+      REQUIRE(i.GetData2() == 2);
+    }
+    REQUIRE(v == 9.9 + 4.4);
+  }
+
+  SECTION("get next particle") {
+    StackTest s;
+    REQUIRE(s.GetSize() == 0);
+    auto p1 = s.AddParticle(std::tuple{9.9});
+    auto p2 = s.AddParticle(std::tuple{8.8});
+    p1.SetData2(20.2);
+    p2.SetData2(20.3);
+    auto particle = s.GetNextParticle(); // first particle
+    REQUIRE(particle.GetData() == 8.8);
+    REQUIRE(particle.GetData2() == 20.3);
+
+    particle.Delete();
+    auto particle2 = s.GetNextParticle(); // first particle
+    REQUIRE(particle2.GetData() == 9.9);
+    REQUIRE(particle2.GetData2() == 20.2);
+    particle2.Delete();
+
+    REQUIRE(s.GetSize() == 0);
+  }
+}
+
+////////////////////////////////////////////////////////////
+
+// definition of stack-data object
+class TestStackData3 {
+
+public:
+  // these functions are needed for the Stack interface
+  void Init() {}
+  void Clear() { fData3.clear(); }
+  unsigned int GetSize() const { return fData3.size(); }
+  unsigned int GetCapacity() const { return fData3.size(); }
+  void Copy(const int i1, const int i2) { fData3[i2] = fData3[i1]; }
+  void Swap(const int i1, const int i2) {
+    double tmp0 = fData3[i1];
+    fData3[i1] = fData3[i2];
+    fData3[i2] = tmp0;
+  }
+
+  // custom data access function
+  void SetData3(const int i, const double v) { fData3[i] = v; }
+  double GetData3(const int i) const { return fData3[i]; }
+
+  // these functions are also needed by the Stack interface
+  void IncrementSize() { fData3.push_back(0.); }
+  void DecrementSize() {
+    if (fData3.size() > 0) { fData3.pop_back(); }
+  }
+
+  // custom private data section
+private:
+  std::vector<double> fData3;
+};
+
+// defintion of a stack-readout object, the iteractor dereference
+// operator will deliver access to these function
+template <typename T>
+class TestParticleInterface3 : public T {
+
+public:
+  using T::GetIndex;
+  using T::GetStackData;
+  using T::SetParticleData;
+
+  // default version for particle-creation from input data
+  void SetParticleData(const std::tuple<double> v = {0.}) { SetData3(std::get<0>(v)); }
+  void SetParticleData(TestParticleInterface3<T>& parent,
+                       const std::tuple<double> v = {0.}) {
+    SetData3(parent.GetData3() + std::get<0>(v));
+  }
+  void SetData3(const double v) { GetStackData().SetData3(GetIndex(), v); }
+  double GetData3() const { return GetStackData().GetData3(GetIndex()); }
+};
+
+// double combined stack
+// combined stack
+template <typename StackIter>
+using CombinedTestInterfaceType2 =
+    corsika::stack::CombinedParticleInterface<CombinedTestInterfaceType,
+                                              TestParticleInterface3, StackIter>;
+
+using StackTest2 = CombinedStack<typename StackTest::StackImpl, TestStackData3,
+                                 CombinedTestInterfaceType2>;
+typedef StackTest2::ParticleType Particle2;
+
+TEST_CASE("Combined Stack - multi", "[stack]") {
+
+  SECTION("create secondaries") {
+
+    StackTest2 s;
+    REQUIRE(s.GetSize() == 0);
+    auto p1 = s.AddParticle(std::tuple{9.9});
+    auto p2 = s.AddParticle(std::tuple{8.8}, std::tuple{0.1});
+    p2.SetData2(0.1); // not clear why this is needed, need to check
+		      // SetParticleData workflow for more complicated
+		      // settings
+    // auto p3 = s.AddParticle( std::tuple {8.8}, std::tuple{1.}, std::tuple{0.1} );
+    p1.SetData3(20.2);
+    p2.SetData3(10.3);
+
+    REQUIRE(p1.GetData() == 9.9);
+    REQUIRE(p1.GetData2() == 0.);
+    p1.SetData2(10.2);
+    REQUIRE(p1.GetData2() == 10.2);
+    REQUIRE(p1.GetData3() == 20.2);
+
+    REQUIRE(p2.GetData() == 8.8);
+    REQUIRE(p2.GetData2() == 0.1);
+    REQUIRE(p2.GetData3() == 10.3);
+
+    auto particle = s.GetNextParticle(); // first particle
+    REQUIRE(particle.GetData() == 8.8);
+    REQUIRE(particle.GetData2() == 0.1);
+    REQUIRE(particle.GetData3() == 10.3);
+
+    REQUIRE(s.GetSize() == 2);
+    auto sec = particle.AddSecondary(std::tuple{4.4});
+    REQUIRE(s.GetSize() == 3);
+    REQUIRE(sec.GetData() == 4.4);
+    REQUIRE(sec.GetData2() == 0.1);
+    REQUIRE(sec.GetData3() == 10.3);
+
+    sec.Delete();
+    s.DeleteLast();
+    s.GetNextParticle().Delete();
+    REQUIRE(s.GetSize() == 0);
+  }
+}
diff --git a/Framework/StackInterface/testSecondaryView.cc b/Framework/StackInterface/testSecondaryView.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ebd2182a7dbd65f42087e66f1b5d3e78a64917b0
--- /dev/null
+++ b/Framework/StackInterface/testSecondaryView.cc
@@ -0,0 +1,105 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#include <corsika/stack/SecondaryView.h>
+#include <corsika/stack/Stack.h>
+
+#include <testTestStack.h> // for testing: simple stack. This is a
+// test-build, and inluce file is obtained from CMAKE_CURRENT_SOURCE_DIR
+
+#include <boost/type_index.hpp>
+#include <type_traits>
+using boost::typeindex::type_id_with_cvr;
+
+#include <iomanip>
+#include <iostream>
+#include <vector>
+
+#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
+                          // cpp file
+#include <catch2/catch.hpp>
+
+using namespace corsika::stack;
+using namespace std;
+
+typedef Stack<TestStackData, TestParticleInterface> StackTest;
+typedef StackTest::ParticleType Particle;
+
+TEST_CASE("SecondaryStack", "[stack]") {
+
+  // helper function for sum over stack data
+  auto sum = [](const StackTest& stack) {
+    double v = 0;
+    for (const auto& p : stack) v += p.GetData();
+    return v;
+  };
+
+  SECTION("secondary view") {
+    StackTest s;
+    REQUIRE(s.GetSize() == 0);
+    s.AddParticle(std::tuple{9.9});
+    s.AddParticle(std::tuple{8.8});
+    const double sumS = 9.9 + 8.8;
+
+    auto particle = s.GetNextParticle();
+
+    typedef SecondaryView<TestStackData, TestParticleInterface> StackTestView;
+    StackTestView v(particle);
+    REQUIRE(v.GetSize() == 0);
+
+    {
+      auto proj = v.GetProjectile();
+      REQUIRE(proj.GetData() == particle.GetData());
+    }
+
+    v.AddSecondary(std::tuple{4.4});
+    v.AddSecondary(std::tuple{4.5});
+    v.AddSecondary(std::tuple{4.6});
+
+    REQUIRE(v.GetSize() == 3);
+    REQUIRE(s.GetSize() == 5);
+    REQUIRE(!v.IsEmpty());
+
+    auto sumView = [](const StackTestView& stack) {
+      double v = 0;
+      for (const auto& p : stack) { v += p.GetData(); }
+      return v;
+    };
+
+    REQUIRE(sum(s) == sumS + 4.4 + 4.5 + 4.6);
+    REQUIRE(sumView(v) == 4.4 + 4.5 + 4.6);
+
+    v.DeleteLast();
+    REQUIRE(v.GetSize() == 2);
+    REQUIRE(s.GetSize() == 4);
+
+    REQUIRE(sum(s) == sumS + 4.4 + 4.5);
+    REQUIRE(sumView(v) == 4.4 + 4.5);
+
+    auto pDel = v.GetNextParticle();
+    v.Delete(pDel);
+    REQUIRE(v.GetSize() == 1);
+    REQUIRE(s.GetSize() == 3);
+
+    REQUIRE(sum(s) == sumS + 4.4 + 4.5 - pDel.GetData());
+    REQUIRE(sumView(v) == 4.4 + 4.5 - pDel.GetData());
+
+    v.Delete(v.GetNextParticle());
+    REQUIRE(sum(s) == sumS);
+    REQUIRE(sumView(v) == 0);
+    REQUIRE(v.IsEmpty());
+
+    {
+      auto proj = v.GetProjectile();
+      REQUIRE(proj.GetData() == particle.GetData());
+    }
+  }
+}
diff --git a/Framework/StackInterface/testStackInterface.cc b/Framework/StackInterface/testStackInterface.cc
index 078a09407c713287c36c9a48d20e5e842a32bc09..7b80b30192ad28bcf9592f9e16afabbb2cd79b10 100644
--- a/Framework/StackInterface/testStackInterface.cc
+++ b/Framework/StackInterface/testStackInterface.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -11,8 +11,17 @@
 
 #include <corsika/stack/Stack.h>
 
+#include <testTestStack.h> // simple test-stack for testing. This is
+                           // for testing only: include from
+                           // CMAKE_CURRENT_SOURCE_DIR
+
+#include <boost/type_index.hpp>
+#include <type_traits>
+using boost::typeindex::type_id_with_cvr;
+
 #include <iomanip>
 #include <iostream>
+#include <tuple>
 #include <vector>
 
 #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
@@ -22,107 +31,96 @@
 using namespace corsika::stack;
 using namespace std;
 
-// definition of stack-data object
-class StackOneData {
-
-public:
-  // these functions are needed for the Stack interface
-  void Init() {}
-  void Clear() { fData.clear(); }
-  int GetSize() const { return fData.size(); }
-  int GetCapacity() const { return fData.size(); }
-  void Copy(const int i1, const int i2) { fData[i2] = fData[i1]; }
-  void Swap(const int i1, const int i2) {
-    double tmp0 = fData[i1];
-    fData[i1] = fData[i2];
-    fData[i2] = tmp0;
-  }
-
-  // custom data access function
-  void SetData(const int i, const double v) { fData[i] = v; }
-  double GetData(const int i) const { return fData[i]; }
-
-protected:
-  // these functions are also needed by the Stack interface
-  void IncrementSize() { fData.push_back(0.); }
-  void DecrementSize() {
-    if (fData.size() > 0) { fData.pop_back(); }
-  }
-
-  // custom private data section
-private:
-  std::vector<double> fData;
-};
-
-// defintion of a stack-readout object, the iteractor dereference
-// operator will deliver access to these function
-template <typename StackIteratorInterface>
-class ParticleInterface : public ParticleBase<StackIteratorInterface> {
-  //  using ParticleBase<StackIteratorInterface>::Delete;
-  using ParticleBase<StackIteratorInterface>::GetStackData;
-  using ParticleBase<StackIteratorInterface>::GetIndex;
-
-public:
-  void SetData(const double v) { GetStackData().SetData(GetIndex(), v); }
-  double GetData() const { return GetStackData().GetData(GetIndex()); }
-};
+typedef Stack<TestStackData, TestParticleInterface> StackTest;
+typedef StackTest::ParticleType Particle;
 
 TEST_CASE("Stack", "[Stack]") {
 
+  // helper function for sum over stack data
+  auto sum = [](const StackTest& stack) {
+    double v = 0;
+    for (const auto& p : stack) v += p.GetData();
+    return v;
+  };
+
   SECTION("StackInterface") {
 
     // construct a valid Stack object
-    typedef Stack<StackOneData, ParticleInterface> StackTest;
     StackTest s;
     s.Init();
     s.Clear();
-    s.IncrementSize();
-    s.Copy(0, 0);
-    s.Swap(0, 0);
-    s.GetCapacity();
+    s.AddParticle(std::tuple{0.});
+    s.Copy(s.cbegin(), s.begin());
+    s.Swap(s.begin(), s.begin());
     REQUIRE(s.GetSize() == 1);
-    s.DecrementSize();
-    REQUIRE(s.GetSize() == 0);
   }
 
-  SECTION("write") {
+  SECTION("construct") {
 
-    // construct a valid Stack object
-    typedef Stack<StackOneData, ParticleInterface> StackTest;
+    // construct a valid, empty Stack object
     StackTest s;
   }
 
-  SECTION("read") {
+  SECTION("write and read") {
 
-    typedef Stack<StackOneData, ParticleInterface> StackTest;
     StackTest s;
-    s.NewParticle().SetData(9.9);
-    cout << "kk" << endl;
-    double v = 0;
-    for (auto& p : s) {
-      cout << typeid(p).name() << endl;
-      v += p.GetData();
-    }
-    cout << "k222k" << endl;
-
+    s.AddParticle(std::tuple{9.9});
+    const double v = sum(s);
     REQUIRE(v == 9.9);
   }
 
-  SECTION("delete_stack") {
+  SECTION("delete from stack") {
 
-    typedef Stack<StackOneData, ParticleInterface> StackTest;
     StackTest s;
-    auto p = s.NewParticle();
+    REQUIRE(s.GetSize() == 0);
+    StackTest::StackIterator p =
+        s.AddParticle(std::tuple{0.}); // valid way to access particle data
     p.SetData(9.9);
+    REQUIRE(s.GetSize() == 1);
     s.Delete(p);
+    REQUIRE(s.GetSize() == 0);
   }
 
-  SECTION("delete_particle") {
+  SECTION("delete particle") {
 
-    typedef Stack<StackOneData, ParticleInterface> StackTest;
     StackTest s;
-    auto p = s.NewParticle();
-    p.SetData(9.9);
+    REQUIRE(s.GetSize() == 0);
+    auto p = s.AddParticle(
+        std::tuple{9.9}); // also valid way to access particle data, identical to above
+    REQUIRE(s.GetSize() == 1);
     p.Delete();
+    REQUIRE(s.GetSize() == 0);
+  }
+
+  SECTION("create secondaries") {
+
+    StackTest s;
+    REQUIRE(s.GetSize() == 0);
+    auto iter = s.AddParticle(std::tuple{9.9});
+    Particle& p = *iter; // also this is valid to access particle data
+    REQUIRE(s.GetSize() == 1);
+    p.AddSecondary(std::tuple{4.4});
+    REQUIRE(s.GetSize() == 2);
+    /*p.AddSecondary(3.3, 2.2);
+    REQUIRE(s.GetSize() == 3);
+    double v = 0;
+    for (auto& p : s) { v += p.GetData(); }
+    REQUIRE(v == 9.9 + 4.4 + 3.3 + 2.2);*/
+  }
+
+  SECTION("get next particle") {
+    StackTest s;
+    REQUIRE(s.GetSize() == 0);
+    s.AddParticle(std::tuple{9.9});
+    s.AddParticle(std::tuple{8.8});
+    auto particle = s.GetNextParticle(); // first particle
+    REQUIRE(particle.GetData() == 8.8);
+
+    particle.Delete();
+    auto particle2 = s.GetNextParticle(); // first particle
+    REQUIRE(particle2.GetData() == 9.9);
+    particle2.Delete();
+
+    REQUIRE(s.GetSize() == 0);
   }
 }
diff --git a/Framework/StackInterface/testTestStack.h b/Framework/StackInterface/testTestStack.h
new file mode 100644
index 0000000000000000000000000000000000000000..a3bf63466ac11b507b3cdf71dde77322d74b17ed
--- /dev/null
+++ b/Framework/StackInterface/testTestStack.h
@@ -0,0 +1,88 @@
+#ifndef _include_corsika_stack_testTestStack_h_
+#define _include_corsika_stack_testTestStack_h_
+
+#include <corsika/stack/Stack.h>
+#include <tuple>
+#include <vector>
+
+/**
+ * definition of stack-data object for unit tests
+ *
+ * TestStackData contain only a single variable "Data" stored in fData
+ * with Get/SetData functions.
+ */
+class TestStackData {
+
+public:
+  // these functions are needed for the Stack interface
+  void Init() {}
+  void Clear() { fData.clear(); }
+  unsigned int GetSize() const { return fData.size(); }
+  unsigned int GetCapacity() const { return fData.size(); }
+  void Copy(const unsigned int i1, const unsigned int i2) { fData[i2] = fData[i1]; }
+  void Swap(const unsigned int i1, const unsigned int i2) {
+    double tmp0 = fData[i1];
+    fData[i1] = fData[i2];
+    fData[i2] = tmp0;
+  }
+
+  // custom data access function
+  void SetData(const unsigned int i, const double v) { fData[i] = v; }
+  double GetData(const unsigned int i) const { return fData[i]; }
+
+  // these functions are also needed by the Stack interface
+  void IncrementSize() { fData.push_back(0.); }
+  void DecrementSize() {
+    if (fData.size() > 0) { fData.pop_back(); }
+  }
+
+  // custom private data section
+private:
+  std::vector<double> fData;
+};
+
+/**
+ * From static_cast of a StackIterator over entries in the
+ * TestStackData class you get and object of type
+ * TestParticleInterface defined here
+ *
+ * It provides Get/Set methods to read and write data to the "Data"
+ * storage of TestStackData obtained via
+ * "StackIteratorInterface::GetStackData()", given the index of the
+ * iterator "StackIteratorInterface::GetIndex()"
+ *
+ */
+template <typename StackIteratorInterface>
+class TestParticleInterface
+    : public corsika::stack::ParticleBase<StackIteratorInterface> {
+
+public:
+  using corsika::stack::ParticleBase<StackIteratorInterface>::GetStackData;
+  using corsika::stack::ParticleBase<StackIteratorInterface>::GetIndex;
+
+  /*
+     The SetParticleData methods are called for creating new entries
+     on the stack. You can specifiy various parametric versions to
+     perform this task:
+  */
+
+  // default version for particle-creation from input data
+  void SetParticleData(const std::tuple<double> v) { SetData(std::get<0>(v)); }
+  void SetParticleData(TestParticleInterface<StackIteratorInterface>& /*parent*/,
+                       std::tuple<double> v) {
+    SetData(std::get<0>(v));
+  }
+  /// alternative set-particle data for non-standard construction from different inputs
+  /*
+  void SetParticleData(const double v, const double p) { SetData(v + p); }
+  void SetParticleData(TestParticleInterface<StackIteratorInterface>&,
+                       const double v, const double p) {
+    SetData(v + p);
+    }*/
+
+  // here are the fundamental methods for access to TestStackData data
+  void SetData(const double v) { GetStackData().SetData(GetIndex(), v); }
+  double GetData() const { return GetStackData().GetData(GetIndex()); }
+};
+
+#endif
diff --git a/Framework/Units/PhysicalConstants.h b/Framework/Units/PhysicalConstants.h
index 38c59992fe928228754e3a16658043308e71ab68..1bf9872a03ed3abee9bcb03ef93fd24250f14a50 100644
--- a/Framework/Units/PhysicalConstants.h
+++ b/Framework/Units/PhysicalConstants.h
@@ -61,7 +61,9 @@ namespace corsika::units::constants {
 
   // unified atomic mass unit
   constexpr quantity<mass_d> u{Rep(1.6605402e-27L) * kilogram};
-
+  
+  auto constexpr nucleonMass = 0.5 * (0.93827 + 0.93957) * 1e9 * electronvolt;
+  
   // etc.
 
 } // namespace corsika::units::constants
diff --git a/Framework/Units/PhysicalUnits.h b/Framework/Units/PhysicalUnits.h
index 90b98e170f2a912018e1486cac26b7da1c85f3ff..af4dbb966aaaf5dfe5bfe7ace9619c9d299e94c7 100644
--- a/Framework/Units/PhysicalUnits.h
+++ b/Framework/Units/PhysicalUnits.h
@@ -18,28 +18,11 @@ namespace phys::units {
 /**
  * @file PhysicalUnits
  *
- * Add new units and types we need. Units are compile-time. We support
- * different system of units in parallel. Literals are used for
- * optimal coding style.
+ * Add new units and types we need. Units are compile-time. Literals are
+ * used for optimal coding style.
  *
  */
-/*
-namespace corsika::units::hep {
-  using namespace phys::units;
-  using namespace phys::units::literals;
-  using namespace phys::units::io;
-
-  /// defining HEP energy, mass, momentum
-  using energy_hep_d = phys::units::energy_d;
-  constexpr phys::units::quantity<energy_hep_d> GeV{corsika::units::constants::eV};
-  // corsika::units::constants::e / phys::units::coulomb * phys::units::joule };
-
-  using MassType = phys::units::quantity<energy_hep_d, double>;
-  using MomentumType = phys::units::quantity<energy_hep_d, double>;
-  using EnergyType = phys::units::quantity<energy_hep_d, double>;
 
-} // namespace corsika::units::hep
-*/
 namespace corsika::units::si {
   using namespace phys::units;
   using namespace phys::units::literals;
diff --git a/Framework/Units/testUnits.cc b/Framework/Units/testUnits.cc
index 43d8e94e10c5fe6351d1cb5071372eeda24e3ec0..e8f389a05818615475dd988cce1181f6bf66ba42 100644
--- a/Framework/Units/testUnits.cc
+++ b/Framework/Units/testUnits.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Utilities/Bit.h b/Framework/Utilities/Bit.h
index e1387c5c7554b8e9cc9cace8356bb59790cf25f7..7306e76d8d7f979fe18974452cd67a25b75b99c7 100644
--- a/Framework/Utilities/Bit.h
+++ b/Framework/Utilities/Bit.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Utilities/COMBoost.cc b/Framework/Utilities/COMBoost.cc
index a9bd4115362de0685dd8bbcfd58cda9ff3064a2b..5d8b00857b66afb73c7cbbe922b65e87c57e767a 100644
--- a/Framework/Utilities/COMBoost.cc
+++ b/Framework/Utilities/COMBoost.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Utilities/COMBoost.h b/Framework/Utilities/COMBoost.h
index e48de10ba1ea87f76a3a5d715495061c35c2efeb..eebc8358ad5f5891587c3ee9bda036e7c6b98784 100644
--- a/Framework/Utilities/COMBoost.h
+++ b/Framework/Utilities/COMBoost.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Utilities/CorsikaFenv.h b/Framework/Utilities/CorsikaFenv.h
index d8aa00b3f0987973c71af606d2d5dbd93304dfe4..e7df5953461aa4d98dab8fa917b8b20847a22ddd 100644
--- a/Framework/Utilities/CorsikaFenv.h
+++ b/Framework/Utilities/CorsikaFenv.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -6,14 +7,6 @@
  * This software is distributed under the terms of the GNU General Public
  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
  * the license.
- *
- * Provide portable or fallback versions of feenableexcept() and fedisableexcept()
- * Exist by default in glibc since version 2.2, but not in the standard
- * fenv.h / cfenv headers for C 99 or C++ 11
- *
- * \author Lukas Nellen
- * \date 14 Jan 2019
- *
  */
 
 #ifndef CORSIKA_CORSIKAFENV_H
diff --git a/Framework/Utilities/CorsikaFenvDefault.cc b/Framework/Utilities/CorsikaFenvDefault.cc
index f51fe55dca288307ecd0a8d7a86419d7c03e1dc0..f1bb7732bfe111ca3c71018282ac346bacadeee2 100644
--- a/Framework/Utilities/CorsikaFenvDefault.cc
+++ b/Framework/Utilities/CorsikaFenvDefault.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -6,15 +7,6 @@
  * This software is distributed under the terms of the GNU General Public
  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
  * the license.
- *
- * Versions of feenableexcept() and fedisableexcept()
- * exist in fenv.h / cfenv headers for C 99 or C++ 11
- * Nothing needed.
- *
- *
- * \author Lukas Nellen
- * \date 14 Jan 2019
- *
  */
 
 // do nothing, functions exist in system libraries
diff --git a/Framework/Utilities/CorsikaFenvFallback.cc b/Framework/Utilities/CorsikaFenvFallback.cc
index f3e2f00f26840838365b45fa7426930a8b818e6e..ed71c5b6c07096fe3d846fd82d5afa5c284e6599 100644
--- a/Framework/Utilities/CorsikaFenvFallback.cc
+++ b/Framework/Utilities/CorsikaFenvFallback.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -6,16 +7,6 @@
  * This software is distributed under the terms of the GNU General Public
  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
  * the license.
- *
- * Provide fallback versions of feenableexcept() and fedisableexcept()
- * Don't exist in the standard
- * fenv.h / cfenv headers for C 99 or C++ 11
- *
- * For platforms without implementation; do-nothing dummy.
- *
- * \author Lukas Nellen
- * \date 14 Jan 2019
- *
  */
 
 #include <corsika/utl/CorsikaFenv.h>
diff --git a/Framework/Utilities/Singleton.h b/Framework/Utilities/Singleton.h
index 00faa2fd18ba76c3d3555507e141a8e79f802a87..3780cc99a1398833a77729e26eb11f9b089ba753 100644
--- a/Framework/Utilities/Singleton.h
+++ b/Framework/Utilities/Singleton.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Utilities/testCOMBoost.cc b/Framework/Utilities/testCOMBoost.cc
index 996da626138ebdd0ec7b989672f6161638729173..501db86435b535f14b47e6f072cbf885878e8293 100644
--- a/Framework/Utilities/testCOMBoost.cc
+++ b/Framework/Utilities/testCOMBoost.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Utilities/testCorsikaFenv.cc b/Framework/Utilities/testCorsikaFenv.cc
index 6f76930c86c7d3ee22f5a155700af35de7959098..eb4885b9a233135356e8a047b1dc4c86861e25b4 100644
--- a/Framework/Utilities/testCorsikaFenv.cc
+++ b/Framework/Utilities/testCorsikaFenv.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Framework/Utilities/try_feenableexcept.cc b/Framework/Utilities/try_feenableexcept.cc
index 1ee8ecc1eeb67c267578b74388d3054d12c16872..9ca52262c2903878a70e4090f031f8915b619265 100644
--- a/Framework/Utilities/try_feenableexcept.cc
+++ b/Framework/Utilities/try_feenableexcept.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -6,12 +7,6 @@
  * This software is distributed under the terms of the GNU General Public
  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
  * the license.
- *
- * Test code for cmake to check if feenableexcept exists in cfenv
- *
- * \author Lukas Nellen
- * \date 15 Jan 2019
- *
  */
 
 #include <cfenv>
diff --git a/Main/Environment.h b/Main/Environment.h
index 90582b3dfb00d2d85850b81455a2a4c0c061413b..4227e0de4f5490ee2ac5a90857d68c5653e865ec 100644
--- a/Main/Environment.h
+++ b/Main/Environment.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -8,3 +8,5 @@
  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
  * the license.
  */
+
+
diff --git a/Main/Stack.h b/Main/Stack.h
index 90582b3dfb00d2d85850b81455a2a4c0c061413b..4227e0de4f5490ee2ac5a90857d68c5653e865ec 100644
--- a/Main/Stack.h
+++ b/Main/Stack.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -8,3 +8,5 @@
  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
  * the license.
  */
+
+
diff --git a/Main/shower.cc b/Main/shower.cc
index 10facda7435af5d9f6f1ab83223a25ad61c068b1..5ca8d4ab2532081c4654cd51e98b9bcdda9cc2f6 100644
--- a/Main/shower.cc
+++ b/Main/shower.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/HadronicElasticModel/HadronicElasticModel.cc b/Processes/HadronicElasticModel/HadronicElasticModel.cc
index b53a4e1aee0c85d64c0fcba4ce439219381cfcef..943195b681a117ac9b36a1968d78ab8a8ab87629 100644
--- a/Processes/HadronicElasticModel/HadronicElasticModel.cc
+++ b/Processes/HadronicElasticModel/HadronicElasticModel.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/HadronicElasticModel/HadronicElasticModel.h b/Processes/HadronicElasticModel/HadronicElasticModel.h
index 31b6fd056e4bcff73d9b9796097dceaea3b48f25..0f6eda0cf345d170d6f1d1887f0a13001f698081 100644
--- a/Processes/HadronicElasticModel/HadronicElasticModel.h
+++ b/Processes/HadronicElasticModel/HadronicElasticModel.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/NullModel/NullModel.cc b/Processes/NullModel/NullModel.cc
index 4130bf0c4d5519408b272322dd45d60ee3b27b0e..09956e7c703468d635cf5e7770fc067c036b52b7 100644
--- a/Processes/NullModel/NullModel.cc
+++ b/Processes/NullModel/NullModel.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/NullModel/NullModel.h b/Processes/NullModel/NullModel.h
index 428069f12c5d8884470d9077a20d7703fd8faa8b..6222e290f53e3d2e5d193ad7597f2a086b9eb2ff 100644
--- a/Processes/NullModel/NullModel.h
+++ b/Processes/NullModel/NullModel.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/NullModel/testNullModel.cc b/Processes/NullModel/testNullModel.cc
index 56d635d1fafbf1806ed0a940985040934aa6a31d..6bf7d99da7af02d8b0b4cd60b6f69628e28532e9 100644
--- a/Processes/NullModel/testNullModel.cc
+++ b/Processes/NullModel/testNullModel.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -21,6 +21,8 @@
 
 #include <corsika/units/PhysicalUnits.h>
 
+#include <corsika/stack/super_stupid/SuperStupidStack.h>
+
 #include <corsika/setup/SetupStack.h>
 #include <corsika/setup/SetupTrajectory.h>
 
@@ -30,16 +32,19 @@ using namespace corsika;
 
 TEST_CASE("NullModel", "[processes]") {
 
-  auto const& cs =
+  auto const& dummyCS =
       geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
-  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  geometry::Point const origin(dummyCS, {0_m, 0_m, 0_m});
   geometry::Vector<corsika::units::si::SpeedType::dimension_type> v(
-      cs, 0_m / second, 0_m / second, 1_m / second);
+      dummyCS, 0_m / second, 0_m / second, 1_m / second);
   geometry::Line line(origin, v);
   geometry::Trajectory<geometry::Line> track(line, 10_s);
 
   setup::Stack stack;
-  auto particle = stack.NewParticle();
+  auto particle = stack.AddParticle(
+      particles::Code::Electron, 1.5_GeV,
+      stack::super_stupid::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+      geometry::Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s);
 
   SECTION("interface") {
 
diff --git a/Processes/Sibyll/CMakeLists.txt b/Processes/Sibyll/CMakeLists.txt
index bf89db756b5aaca2be901596c1015b5d724245e7..880496a219b8674a2cca984c6ab3e8615ecd1470 100644
--- a/Processes/Sibyll/CMakeLists.txt
+++ b/Processes/Sibyll/CMakeLists.txt
@@ -1,3 +1,6 @@
+set(Python_ADDITIONAL_VERSIONS 3)
+find_package(PythonInterp 3 REQUIRED)
+
 add_custom_command (
   OUTPUT  ${PROJECT_BINARY_DIR}/Processes/Sibyll/Generated.inc
   COMMAND ${PROJECT_SOURCE_DIR}/Processes/Sibyll/code_generator.py 
@@ -16,6 +19,8 @@ set (
   MODEL_SOURCES
   ParticleConversion.cc
   sibyll2.3c.f
+  nuclib.f
+  signuc.f
   sibyll2.3c.cc
   gasdev.f
   )
@@ -24,9 +29,11 @@ set (
   MODEL_HEADERS
   ParticleConversion.h
   sibyll2.3c.h
+  nuclib.h
   SibStack.h
   Decay.h
   Interaction.h
+  NuclearInteraction.h
   ${PROJECT_BINARY_DIR}/Processes/Sibyll/Generated.inc
   )
 
diff --git a/Processes/Sibyll/Decay.h b/Processes/Sibyll/Decay.h
index 217ed87fac7a4512a901fabaa995d81ff81ea5cd..eddae6138fea423d37ba3a58876894694cd75fcd 100644
--- a/Processes/Sibyll/Decay.h
+++ b/Processes/Sibyll/Decay.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -90,7 +90,6 @@ namespace corsika::process {
 
         using std::cout;
         using std::endl;
-        // using namespace corsika::io;
         using namespace corsika::units::si;
 
         // name? also makes EM particles stable
@@ -163,24 +162,22 @@ namespace corsika::process {
       }
 
       template <typename Particle, typename Stack>
-      void DoDecay(Particle& p, Stack& s) {
+      void DoDecay(Particle& p, Stack&) {
         using corsika::geometry::Point;
         using namespace corsika::units::si;
 
         fCount++;
         SibStack ss;
         ss.Clear();
-        // copy particle to sibyll stack
-        auto pin = ss.NewParticle();
         const corsika::particles::Code pCode = p.GetPID();
-        pin.SetPID(process::sibyll::ConvertToSibyllRaw(pCode));
-        pin.SetEnergy(p.GetEnergy());
-        pin.SetMomentum(p.GetMomentum());
-        // setting particle mass with Corsika values, may be inconsistent with sibyll
-        // internal values
-        // TODO: #warning setting particle mass with Corsika values, may be inconsistent
-        // with sibyll internal values
-        pin.SetMass(corsika::particles::GetMass(pCode));
+        // copy particle to sibyll stack
+        ss.AddParticle(process::sibyll::ConvertToSibyllRaw(pCode), p.GetEnergy(),
+                       p.GetMomentum(),
+                       // setting particle mass with Corsika values, may be inconsistent
+                       // with sibyll internal values
+                       // TODO: #warning setting particle mass with Corsika values, may be
+                       // inconsistent with sibyll internal values
+                       corsika::particles::GetMass(pCode));
         // remember position
         Point const decayPoint = p.GetPosition();
         TimeType const t0 = p.GetTime();
@@ -203,12 +200,8 @@ namespace corsika::process {
           // FOR NOW: skip particles that have decayed in Sibyll, move to iterator?
           if (psib.HasDecayed()) continue;
           // add to corsika stack
-          auto pnew = s.NewParticle();
-          pnew.SetEnergy(psib.GetEnergy());
-          pnew.SetPID(process::sibyll::ConvertFromSibyll(psib.GetPID()));
-          pnew.SetMomentum(psib.GetMomentum());
-          pnew.SetPosition(decayPoint);
-          pnew.SetTime(t0);
+          p.AddSecondary(process::sibyll::ConvertFromSibyll(psib.GetPID()),
+                         psib.GetEnergy(), psib.GetMomentum(), decayPoint, t0);
         }
         // empty sibyll stack
         ss.Clear();
diff --git a/Processes/Sibyll/Interaction.h b/Processes/Sibyll/Interaction.h
index 91806cf4d375582471ae2b14cfa083a90066e8b0..a743957f62789f9848c1a12649ea8eb406cf1c0d 100644
--- a/Processes/Sibyll/Interaction.h
+++ b/Processes/Sibyll/Interaction.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -31,6 +31,7 @@ namespace corsika::process::sibyll {
 
     int fCount = 0;
     int fNucCount = 0;
+    bool fInitialized = false;
 
   public:
     Interaction(corsika::environment::Environment const& env)
@@ -47,32 +48,45 @@ namespace corsika::process::sibyll {
       using std::endl;
 
       // initialize Sibyll
-      sibyll_ini_();
+      if (!fInitialized) {
+        sibyll_ini_();
+        fInitialized = true;
+      }
+    }
+
+    bool WasInitialized() { return fInitialized; }
+
+    bool ValidCoMEnergy(corsika::units::si::HEPEnergyType ecm) {
+      using namespace corsika::units::si;
+      return (10_GeV < ecm) && (ecm < 1_PeV);
     }
 
-    std::tuple<corsika::units::si::CrossSectionType, int> GetCrossSection(
-        const corsika::particles::Code BeamId, const corsika::particles::Code TargetId,
-        const corsika::units::si::HEPEnergyType CoMenergy) {
+    std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType,
+               int>
+    GetCrossSection(const corsika::particles::Code BeamId,
+                    const corsika::particles::Code TargetId,
+                    const corsika::units::si::HEPEnergyType CoMenergy) {
       using namespace corsika::units::si;
-      double sigProd, dummy, dum1, dum2, dum3, dum4;
+      double sigProd, sigEla, dummy, dum1, dum3, dum4;
       double dumdif[3];
       const int iBeam = process::sibyll::GetSibyllXSCode(BeamId);
       const double dEcm = CoMenergy / 1_GeV;
+      int iTarget = -1;
       if (corsika::particles::IsNucleus(TargetId)) {
-        const int iTarget = corsika::particles::GetNucleusA(TargetId);
+        iTarget = corsika::particles::GetNucleusA(TargetId);
         if (iTarget > 18 || iTarget == 0)
           throw std::runtime_error(
               "Sibyll target outside range. Only nuclei with A<18 are allowed.");
-        sib_sigma_hnuc_(iBeam, iTarget, dEcm, sigProd, dummy);
-        return std::make_tuple(sigProd * 1_mbarn, iTarget);
+        sib_sigma_hnuc_(iBeam, iTarget, dEcm, sigProd, dummy, sigEla);
       } else if (TargetId == corsika::particles::Proton::GetCode()) {
-        sib_sigma_hp_(iBeam, dEcm, dum1, dum2, sigProd, dumdif, dum3, dum4);
-        return std::make_tuple(sigProd * 1_mbarn, 1);
+        sib_sigma_hp_(iBeam, dEcm, dum1, sigEla, sigProd, dumdif, dum3, dum4);
+        iTarget = 1;
       } else {
         // no interaction in sibyll possible, return infinite cross section? or throw?
         sigProd = std::numeric_limits<double>::infinity();
-        return std::make_tuple(sigProd * 1_mbarn, 0);
+        sigEla = std::numeric_limits<double>::infinity();
       }
+      return std::make_tuple(sigProd * 1_mbarn, sigEla * 1_mbarn, iTarget);
     }
 
     template <typename Particle, typename Track>
@@ -115,6 +129,7 @@ namespace corsika::process::sibyll {
                 << " beam can interact:" << kInteraction << endl
                 << " beam pid:" << p.GetPID() << endl;
 
+      // TODO: move limits into variables
       if (kInteraction && Elab >= 8.5_GeV && ECoM >= 10_GeV) {
 
         // get target from environment
@@ -139,8 +154,10 @@ namespace corsika::process::sibyll {
           i++;
           cout << "Interaction: get interaction length for target: " << targetId << endl;
 
-          auto const [productionCrossSection, numberOfNucleons] =
+          auto const [productionCrossSection, elaCrossSection, numberOfNucleons] =
               GetCrossSection(corsikaBeamId, targetId, ECoM);
+          [[maybe_unused]] auto elaCrossSectionCopy =
+              elaCrossSection; // ONLY TO AVOID COMPILER WARNING
 
           std::cout << "Interaction: "
                     << " IntLength: sibyll return (mb): "
@@ -153,7 +170,7 @@ namespace corsika::process::sibyll {
              << weightedProdCrossSection / 1_mbarn << endl;
 
         // calculate interaction length in medium
-#warning check interaction length units
+        //#warning check interaction length units
         GrammageType const int_length =
             avgTargetMassNumber * corsika::units::constants::u / weightedProdCrossSection;
         std::cout << "Interaction: "
@@ -172,7 +189,7 @@ namespace corsika::process::sibyll {
      */
 
     template <typename Particle, typename Stack>
-    corsika::process::EProcessReturn DoInteraction(Particle& p, Stack& s) {
+    corsika::process::EProcessReturn DoInteraction(Particle& p, Stack&) {
 
       using namespace corsika::units;
       using namespace corsika::utl;
@@ -185,6 +202,12 @@ namespace corsika::process::sibyll {
       cout << "ProcessSibyll: "
            << "DoInteraction: " << corsikaBeamId << " interaction? "
            << process::sibyll::CanInteract(corsikaBeamId) << endl;
+
+      if (corsika::particles::IsNucleus(corsikaBeamId)) {
+        // nuclei handled by different process, this should not happen
+        throw std::runtime_error("Nuclear projectile are not handled by SIBYLL!");
+      }
+
       if (process::sibyll::CanInteract(corsikaBeamId)) {
         const CoordinateSystem& rootCS =
             RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
@@ -254,14 +277,19 @@ namespace corsika::process::sibyll {
           Here we read the cross section from the interaction model again,
           should be passed from GetInteractionLength if possible
          */
-#warning reading interaction cross section again, should not be necessary
+        //#warning reading interaction cross section again, should not be necessary
         auto const& compVec = mediumComposition.GetComponents();
         std::vector<si::CrossSectionType> cross_section_of_components(compVec.size());
 
         for (size_t i = 0; i < compVec.size(); ++i) {
           auto const targetId = compVec[i];
-          const auto [sigProd, nNuc] = GetCrossSection(corsikaBeamId, targetId, Ecm);
+          const auto [sigProd, sigEla, nNuc] =
+              GetCrossSection(corsikaBeamId, targetId, Ecm);
           cross_section_of_components[i] = sigProd;
+          [[maybe_unused]] int ideleteme =
+              nNuc; // to avoid not used warning in array binding
+          [[maybe_unused]] auto sigElaCopy =
+              sigEla; // to avoid not used warning in array binding
         }
 
         const auto targetCode =
@@ -291,6 +319,7 @@ namespace corsika::process::sibyll {
           std::cout << "Interaction: "
                     << " DoInteraction: should have dropped particle.. "
                     << "THIS IS AN ERROR" << std::endl;
+          throw std::runtime_error("energy too low for SIBYLL");
           // p.Delete(); delete later... different process
         } else {
           fCount++;
@@ -326,12 +355,9 @@ namespace corsika::process::sibyll {
             auto const Plab = boost.fromCoM(FourVector(eCoM, pCoM));
 
             // add to corsika stack
-            auto pnew = s.NewParticle();
-            pnew.SetPID(process::sibyll::ConvertFromSibyll(psib.GetPID()));
-            pnew.SetEnergy(Plab.GetTimeLikeComponent());
-            pnew.SetMomentum(Plab.GetSpaceLikeComponents());
-            pnew.SetPosition(pOrig);
-            pnew.SetTime(tOrig);
+            auto pnew = p.AddSecondary(process::sibyll::ConvertFromSibyll(psib.GetPID()),
+                                       Plab.GetTimeLikeComponent(),
+                                       Plab.GetSpaceLikeComponents(), pOrig, tOrig);
 
             Plab_final += pnew.GetMomentum();
             Elab_final += pnew.GetEnergy();
diff --git a/Processes/Sibyll/NuclearInteraction.h b/Processes/Sibyll/NuclearInteraction.h
new file mode 100644
index 0000000000000000000000000000000000000000..77b3a290a551bfa4ad44d95464878bc6163def18
--- /dev/null
+++ b/Processes/Sibyll/NuclearInteraction.h
@@ -0,0 +1,531 @@
+
+/**
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#ifndef _corsika_process_sibyll_nuclearinteraction_h_
+#define _corsika_process_sibyll_nuclearinteraction_h_
+
+#include <corsika/process/InteractionProcess.h>
+
+#include <corsika/environment/Environment.h>
+#include <corsika/environment/NuclearComposition.h>
+#include <corsika/particles/ParticleProperties.h>
+#include <corsika/process/sibyll/nuclib.h>
+#include <corsika/random/RNGManager.h>
+#include <corsika/units/PhysicalUnits.h>
+#include <corsika/utl/COMBoost.h>
+
+namespace corsika::process::sibyll {
+
+  class NuclearInteraction
+      : public corsika::process::InteractionProcess<NuclearInteraction> {
+
+    int fCount = 0;
+    int fNucCount = 0;
+
+  public:
+    NuclearInteraction(corsika::environment::Environment const& env,
+                       corsika::process::sibyll::Interaction& hadint)
+        : fEnvironment(env)
+        , fHadronicInteraction(hadint) {}
+    ~NuclearInteraction() {
+      std::cout << "Nuclib::NuclearInteraction n=" << fCount << " Nnuc=" << fNucCount
+                << std::endl;
+    }
+
+    void Init() {
+
+      using corsika::random::RNGManager;
+      using std::cout;
+      using std::endl;
+
+      // initialize hadronic interaction module
+      // TODO: safe to run multiple initializations?
+      if (!fHadronicInteraction.WasInitialized()) fHadronicInteraction.Init();
+
+      // initialize nuclib
+      // TODO: make sure this does not overlap with sibyll
+      nuc_nuc_ini_();
+    }
+
+    // TODO: remove number of nucleons, avg target mass is available in environment
+    template <typename Particle>
+    std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
+    GetCrossSection(Particle const& p, const corsika::particles::Code TargetId) {
+      using namespace corsika::units::si;
+      double sigProd;
+      auto const pCode = p.GetPID();
+      if (pCode != corsika::particles::Code::Nucleus)
+        throw std::runtime_error(
+            "NuclearInteraction: GetCrossSection: particle not a nucleus!");
+
+      auto const iBeam = p.GetNuclearA();
+      HEPEnergyType LabEnergyPerNuc = p.GetEnergy() / iBeam;
+      std::cout << "NuclearInteraction: GetCrossSection: called with: beamNuclA= "
+                << iBeam << " TargetId= " << TargetId
+                << " LabEnergyPerNuc= " << LabEnergyPerNuc / 1_GeV << std::endl;
+
+      // use nuclib to calc. nuclear cross sections
+      // TODO: for now assumes air with hard coded composition
+      // extend to arbitrary mixtures, requires smarter initialization
+      // get nuclib projectile code: nucleon number
+      if (iBeam > 56 || iBeam < 2) {
+        std::cout << "NuclearInteraction: beam nucleus outside allowed range for NUCLIB!"
+                  << std::endl
+                  << "A=" << iBeam << std::endl;
+        throw std::runtime_error(
+            "NuclearInteraction: GetCrossSection: beam nucleus outside allowed range for "
+            "NUCLIB!");
+      }
+
+      const double dElabNuc = LabEnergyPerNuc / 1_GeV;
+      // TODO: these limitations are still sibyll specific.
+      // available target nuclei depends on the hadronic interaction model and the
+      // initialization
+      if (dElabNuc < 10.)
+        throw std::runtime_error("NuclearInteraction: GetCrossSection: energy too low!");
+
+      // TODO: these limitations are still sibyll specific.
+      // available target nuclei depends on the hadronic interaction model and the
+      // initialization
+      if (corsika::particles::IsNucleus(TargetId)) {
+        const int iTarget = corsika::particles::GetNucleusA(TargetId);
+        if (iTarget > 18 || iTarget == 0)
+          throw std::runtime_error(
+              "Sibyll target outside range. Only nuclei with A<18 are allowed.");
+        std::cout << "NuclearInteraction: calling signuc.." << std::endl;
+        std::cout << "WARNING: using hard coded cross section for Nucleus-Air with "
+                     "SIBYLL! (fix me!)"
+                  << std::endl;
+        // TODO: target id is not used because cross section is still hard coded and fixed
+        // to air.
+        signuc_(iBeam, dElabNuc, sigProd);
+        std::cout << "cross section: " << sigProd << std::endl;
+        return std::make_tuple(sigProd * 1_mbarn, 0_mbarn);
+      }
+      return std::make_tuple(std::numeric_limits<double>::infinity() * 1_mbarn,
+                             std::numeric_limits<double>::infinity() * 1_mbarn);
+    }
+
+    template <typename Particle, typename Track>
+    corsika::units::si::GrammageType GetInteractionLength(Particle const& p, Track&) {
+
+      using namespace corsika::units;
+      using namespace corsika::units::si;
+      using namespace corsika::geometry;
+      using std::cout;
+      using std::endl;
+
+      // coordinate system, get global frame of reference
+      CoordinateSystem& rootCS =
+          RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+      const particles::Code corsikaBeamId = p.GetPID();
+      if (!corsika::particles::IsNucleus(corsikaBeamId)) {
+        // no nuclear interaction
+        return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+      }
+      // check if target-style nucleus (enum)
+      if (corsikaBeamId != corsika::particles::Code::Nucleus)
+        throw std::runtime_error(
+            "NuclearInteraction: GetInteractionLength: Wrong nucleus type. Nuclear "
+            "projectiles should use NuclearStackExtension!");
+
+      // read from cross section code table
+      const HEPMassType nucleon_mass = 0.5 * (corsika::particles::Proton::GetMass() +
+                                              corsika::particles::Neutron::GetMass());
+
+      // FOR NOW: assume target is at rest
+      MomentumVector pTarget(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+
+      // total momentum and energy
+      HEPEnergyType Elab = p.GetEnergy() + nucleon_mass;
+      int const nuclA = p.GetNuclearA();
+      auto const ElabNuc = p.GetEnergy() / nuclA;
+
+      MomentumVector pTotLab(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+      pTotLab += p.GetMomentum();
+      pTotLab += pTarget;
+      auto const pTotLabNorm = pTotLab.norm();
+      // calculate cm. energy
+      const HEPEnergyType ECoM = sqrt(
+          (Elab + pTotLabNorm) * (Elab - pTotLabNorm)); // binomial for numerical accuracy
+      auto const ECoMNN = sqrt(2. * ElabNuc * nucleon_mass);
+      std::cout << "NuclearInteraction: LambdaInt: \n"
+                << " input energy: " << Elab / 1_GeV << endl
+                << " input energy CoM: " << ECoM / 1_GeV << endl
+                << " beam pid:" << corsikaBeamId << endl
+                << " beam A: " << nuclA << endl
+                << " input energy per nucleon: " << ElabNuc / 1_GeV << endl
+                << " input energy CoM per nucleon: " << ECoMNN / 1_GeV << endl;
+      //      throw std::runtime_error("stop here");
+
+      // energy limits
+      // TODO: values depend on hadronic interaction model !! this is sibyll specific
+      if (ElabNuc >= 8.5_GeV && ECoMNN >= 10_GeV) {
+
+        // get target from environment
+        /*
+          the target should be defined by the Environment,
+          ideally as full particle object so that the four momenta
+          and the boosts can be defined..
+        */
+        const auto currentNode =
+            fEnvironment.GetUniverse()->GetContainingNode(p.GetPosition());
+        const auto mediumComposition =
+            currentNode->GetModelProperties().GetNuclearComposition();
+        // determine average interaction length
+        // weighted sum
+        int i = -1;
+        si::CrossSectionType weightedProdCrossSection = 0_mbarn;
+        // get weights of components from environment/medium
+        const auto w = mediumComposition.GetFractions();
+        // loop over components in medium
+        for (auto const targetId : mediumComposition.GetComponents()) {
+          i++;
+          cout << "NuclearInteraction: get interaction length for target: " << targetId
+               << endl;
+          auto const [productionCrossSection, elaCrossSection] =
+              GetCrossSection(p, targetId);
+          [[maybe_unused]] auto elaCrossSectionCopy = elaCrossSection;
+
+          std::cout << "NuclearInteraction: "
+                    << "IntLength: nuclib return (mb): "
+                    << productionCrossSection / 1_mbarn << std::endl;
+          weightedProdCrossSection += w[i] * productionCrossSection;
+        }
+        cout << "NuclearInteraction: "
+             << "IntLength: weighted CrossSection (mb): "
+             << weightedProdCrossSection / 1_mbarn << endl;
+
+        // calculate interaction length in medium
+        GrammageType const int_length = mediumComposition.GetAverageMassNumber() *
+                                        corsika::units::constants::u /
+                                        weightedProdCrossSection;
+        std::cout << "NuclearInteraction: "
+                  << "interaction length (g/cm2): "
+                  << int_length / (0.001_kg) * 1_cm * 1_cm << std::endl;
+
+        return int_length;
+      } else {
+        return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+      }
+    }
+
+    template <typename Particle, typename Stack>
+    corsika::process::EProcessReturn DoInteraction(Particle& p, Stack& s) {
+
+      // this routine superimposes different nucleon-nucleon interactions
+      // in a nucleus-nucleus interaction, based the SIBYLL routine SIBNUC
+
+      using namespace corsika::units;
+      using namespace corsika::utl;
+      using namespace corsika::units::si;
+      using namespace corsika::geometry;
+      using std::cout;
+      using std::endl;
+
+      const auto ProjId = p.GetPID();
+      // TODO: calculate projectile mass in nuclearStackExtension
+      //      const auto ProjMass = p.GetMass();
+      cout << "NuclearInteraction: DoInteraction: called with:" << ProjId << endl;
+
+      if (!IsNucleus(ProjId)) {
+        cout << "WARNING: non nuclear projectile in NUCLIB!" << endl;
+        // this should not happen
+        // throw std::runtime_error("Non nuclear projectile in NUCLIB!");
+        return process::EProcessReturn::eOk;
+      }
+
+      // check if target-style nucleus (enum)
+      if (ProjId != corsika::particles::Code::Nucleus)
+        throw std::runtime_error(
+            "NuclearInteraction: DoInteraction: Wrong nucleus type. Nuclear projectiles "
+            "should use NuclearStackExtension!");
+
+      auto const ProjMass =
+          p.GetNuclearZ() * corsika::particles::Proton::GetMass() +
+          (p.GetNuclearA() - p.GetNuclearZ()) * corsika::particles::Neutron::GetMass();
+      cout << "NuclearInteraction: projectile mass: " << ProjMass / 1_GeV << endl;
+
+      fCount++;
+
+      const CoordinateSystem& rootCS =
+          RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+      // position and time of interaction, not used in NUCLIB
+      Point pOrig = p.GetPosition();
+      TimeType tOrig = p.GetTime();
+
+      cout << "Interaction: position of interaction: " << pOrig.GetCoordinates() << endl;
+      cout << "Interaction: time: " << tOrig << endl;
+
+      // projectile nucleon number
+      const int kAProj = p.GetNuclearA(); // GetNucleusA(ProjId);
+      if (kAProj > 56)
+        throw std::runtime_error("Projectile nucleus too large for NUCLIB!");
+
+      // kinematics
+      // define projectile nucleus
+      HEPEnergyType const eProjectileLab = p.GetEnergy();
+      auto const pProjectileLab = p.GetMomentum();
+      const FourVector PprojLab(eProjectileLab, pProjectileLab);
+
+      cout << "NuclearInteraction: eProj lab: " << eProjectileLab / 1_GeV << endl
+           << "NuclearInteraction: pProj lab: " << pProjectileLab.GetComponents() / 1_GeV
+           << endl;
+
+      // define projectile nucleon
+      HEPEnergyType const eProjectileNucLab = p.GetEnergy() / kAProj;
+      auto const pProjectileNucLab = p.GetMomentum() / kAProj;
+      const FourVector PprojNucLab(eProjectileNucLab, pProjectileNucLab);
+
+      cout << "NuclearInteraction: eProjNucleon lab: " << eProjectileNucLab / 1_GeV
+           << endl
+           << "NuclearInteraction: pProjNucleon lab: "
+           << pProjectileNucLab.GetComponents() / 1_GeV << endl;
+
+      // define target
+      // always a nucleon
+      auto constexpr nucleon_mass = 0.5 * (corsika::particles::Proton::GetMass() +
+                                           corsika::particles::Neutron::GetMass());
+      // target is always at rest
+      const auto eTargetNucLab = 0_GeV + nucleon_mass;
+      const auto pTargetNucLab = MomentumVector(rootCS, 0_GeV, 0_GeV, 0_GeV);
+      const FourVector PtargNucLab(eTargetNucLab, pTargetNucLab);
+
+      cout << "NuclearInteraction: etarget lab: " << eTargetNucLab / 1_GeV << endl
+           << "NuclearInteraction: ptarget lab: " << pTargetNucLab.GetComponents() / 1_GeV
+           << endl;
+
+      // center-of-mass energy in nucleon-nucleon frame
+      auto const PtotNN4 = PtargNucLab + PprojNucLab;
+      HEPEnergyType EcmNN = PtotNN4.GetNorm();
+      cout << "NuclearInteraction: nuc-nuc cm energy: " << EcmNN / 1_GeV << endl;
+
+      if (!fHadronicInteraction.ValidCoMEnergy(EcmNN)) {
+        cout << "NuclearInteraction: nuc-nuc. CoM energy too low for hadronic "
+                "interaction model!"
+             << endl;
+        throw std::runtime_error("NuclearInteraction: DoInteraction: energy too low!");
+      }
+
+      // define boost to NUCLEON-NUCLEON frame
+      COMBoost const boost(PprojNucLab, nucleon_mass);
+      // boost projecticle
+      auto const PprojNucCoM = boost.toCoM(PprojNucLab);
+
+      // boost target
+      auto const PtargNucCoM = boost.toCoM(PtargNucLab);
+
+      cout << "Interaction: ebeam CoM: " << PprojNucCoM.GetTimeLikeComponent() / 1_GeV
+           << endl
+           << "Interaction: pbeam CoM: "
+           << PprojNucCoM.GetSpaceLikeComponents().GetComponents() / 1_GeV << endl;
+      cout << "Interaction: etarget CoM: " << PtargNucCoM.GetTimeLikeComponent() / 1_GeV
+           << endl
+           << "Interaction: ptarget CoM: "
+           << PtargNucCoM.GetSpaceLikeComponents().GetComponents() / 1_GeV << endl;
+
+      // sample target nucleon number
+      //
+      // proton stand-in for nucleon
+      const auto beamId = corsika::particles::Proton::GetCode();
+      const auto currentNode = fEnvironment.GetUniverse()->GetContainingNode(pOrig);
+      const auto& mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+      cout << "get nucleon-nucleus cross sections for target materials.." << endl;
+      // get cross sections for target materials
+      // using nucleon-target-nucleus cross section!!!
+      /*
+        Here we read the cross section from the interaction model again,
+        should be passed from GetInteractionLength if possible
+      */
+      auto const& compVec = mediumComposition.GetComponents();
+      std::vector<si::CrossSectionType> cross_section_of_components(compVec.size());
+
+      for (size_t i = 0; i < compVec.size(); ++i) {
+        auto const targetId = compVec[i];
+        cout << "target component: " << targetId << endl;
+        cout << "beam id: " << beamId << endl;
+        const auto [sigProd, sigEla, nNuc] =
+            fHadronicInteraction.GetCrossSection(beamId, targetId, EcmNN);
+        cross_section_of_components[i] = sigProd;
+        [[maybe_unused]] auto sigElaCopy = sigEla; // ONLY TO AVOID COMPILER WARNINGS
+        [[maybe_unused]] auto sigNucCopy = nNuc;   // ONLY TO AVOID COMPILER WARNINGS
+      }
+
+      const auto targetCode =
+          currentNode->GetModelProperties().GetNuclearComposition().SampleTarget(
+              cross_section_of_components, fRNG);
+      cout << "Interaction: target selected: " << targetCode << endl;
+      /*
+        FOR NOW: allow nuclei with A<18 or protons only.
+        when medium composition becomes more complex, approximations will have to be
+        allowed air in atmosphere also contains some Argon.
+      */
+      int kATarget = -1;
+      if (IsNucleus(targetCode)) kATarget = GetNucleusA(targetCode);
+      if (targetCode == corsika::particles::Proton::GetCode()) kATarget = 1;
+      cout << "NuclearInteraction: nuclib target code: " << kATarget << endl;
+      if (kATarget > 18 || kATarget < 1)
+        throw std::runtime_error(
+            "Sibyll target outside range. Only nuclei with A<18 or protons are "
+            "allowed.");
+      // end of target sampling
+
+      // superposition
+      cout << "NuclearInteraction: sampling nuc. multiple interaction structure.. "
+           << endl;
+      // get nucleon-nucleon cross section
+      // (needed to determine number of nucleon-nucleon scatterings)
+      const auto protonId = corsika::particles::Proton::GetCode();
+      const auto [prodCrossSection, elaCrossSection, dum] =
+          fHadronicInteraction.GetCrossSection(protonId, protonId, EcmNN);
+      [[maybe_unused]] auto dumCopy = dum; // ONLY TO AVOID COMPILER WARNING
+      const double sigProd = prodCrossSection / 1_mbarn;
+      const double sigEla = elaCrossSection / 1_mbarn;
+      // sample number of interactions (only input variables, output in common cnucms)
+      // nuclear multiple scattering according to glauber (r.i.p.)
+      int_nuc_(kATarget, kAProj, sigProd, sigEla);
+
+      cout << "number of nucleons in target           : " << kATarget << endl
+           << "number of wounded nucleons in target   : " << cnucms_.na << endl
+           << "number of nucleons in projectile       : " << kAProj << endl
+           << "number of wounded nucleons in project. : " << cnucms_.nb << endl
+           << "number of inel. nuc.-nuc. interactions : " << cnucms_.ni << endl
+           << "number of elastic nucleons in target   : " << cnucms_.nael << endl
+           << "number of elastic nucleons in project. : " << cnucms_.nbel << endl
+           << "impact parameter: " << cnucms_.b << endl;
+
+      // calculate fragmentation
+      cout << "calculating nuclear fragments.." << endl;
+      // number of interactions
+      // include elastic
+      const int nElasticNucleons = cnucms_.nbel;
+      const int nInelNucleons = cnucms_.nb;
+      const int nIntProj = nInelNucleons + nElasticNucleons;
+      const double impactPar = cnucms_.b; // only needed to avoid passing common var.
+      int nFragments;
+      // number of fragments is limited to 60
+      int AFragments[60];
+      // call fragmentation routine
+      // input: target A, projectile A, number of int. nucleons in projectile, impact
+      // parameter (fm) output: nFragments, AFragments in addition the momenta ar stored
+      // in pf in common fragments, neglected
+      fragm_(kATarget, kAProj, nIntProj, impactPar, nFragments, AFragments);
+
+      // this should not occur but well :)
+      if (nFragments > 60)
+        throw std::runtime_error("Number of nuclear fragments in NUCLIB exceeded!");
+
+      cout << "number of fragments: " << nFragments << endl;
+      for (int j = 0; j < nFragments; ++j)
+        cout << "fragment: " << j << " A=" << AFragments[j]
+             << " px=" << fragments_.ppp[j][0] << " py=" << fragments_.ppp[j][1]
+             << " pz=" << fragments_.ppp[j][2] << endl;
+
+      cout << "adding nuclear fragments to particle stack.." << endl;
+      // put nuclear fragments on corsika stack
+      for (int j = 0; j < nFragments; ++j) {
+        corsika::particles::Code specCode;
+        const auto nuclA = AFragments[j];
+        // get Z from stability line
+        const auto nuclZ = int(nuclA / 2.15 + 0.7);
+
+        // TODO: do we need to catch single nucleons??
+        if (nuclA == 1)
+          // TODO: sample neutron or proton
+          specCode = corsika::particles::Code::Proton;
+        else
+          specCode = corsika::particles::Code::Nucleus;
+
+        // TODO: mass of nuclei?
+        const HEPMassType mass =
+            corsika::particles::Proton::GetMass() * nuclZ +
+            (nuclA - nuclZ) *
+                corsika::particles::Neutron::GetMass(); // this neglects binding energy
+
+        cout << "NuclearInteraction: adding fragment: " << specCode << endl;
+        cout << "NuclearInteraction: A,Z: " << nuclA << "," << nuclZ << endl;
+        cout << "NuclearInteraction: mass: " << mass / 1_GeV << endl;
+
+        // CORSIKA 7 way
+        // spectators inherit momentum from original projectile
+        const double mass_ratio = mass / ProjMass;
+
+        cout << "NuclearInteraction: mass ratio " << mass_ratio << endl;
+
+        auto const Plab = PprojLab * mass_ratio;
+
+        cout << "NuclearInteraction: fragment momentum: "
+             << Plab.GetSpaceLikeComponents().GetComponents() / 1_GeV << endl;
+
+        if (nuclA == 1)
+          // add nucleon
+          p.AddSecondary(specCode, Plab.GetTimeLikeComponent(),
+                         Plab.GetSpaceLikeComponents(), pOrig, tOrig);
+        else
+          // add nucleus
+          p.AddSecondary(specCode, Plab.GetTimeLikeComponent(),
+                         Plab.GetSpaceLikeComponents(), pOrig, tOrig, nuclA, nuclZ);
+      }
+
+      // add elastic nucleons to corsika stack
+      // TODO: the elastic interaction could be external like the inelastic interaction,
+      // e.g. use existing ElasticModel
+      cout << "adding elastically scattered nucleons to particle stack.." << endl;
+      for (int j = 0; j < nElasticNucleons; ++j) {
+        // TODO: sample proton or neutron
+        auto const elaNucCode = corsika::particles::Code::Proton;
+
+        // CORSIKA 7 way
+        // elastic nucleons inherit momentum from original projectile
+        // neglecting momentum transfer in interaction
+        const double mass_ratio = corsika::particles::GetMass(elaNucCode) / ProjMass;
+        auto const Plab = PprojLab * mass_ratio;
+
+        p.AddSecondary(elaNucCode, Plab.GetTimeLikeComponent(),
+                       Plab.GetSpaceLikeComponents(), pOrig, tOrig);
+      }
+
+      // add inelastic interactions
+      cout << "calculate inelastic nucleon-nucleon interactions.." << endl;
+      for (int j = 0; j < nInelNucleons; ++j) {
+        // TODO: sample neutron or proton
+        auto pCode = corsika::particles::Proton::GetCode();
+        // temporarily add to stack, will be removed after interaction in DoInteraction
+        cout << "inelastic interaction no. " << j << endl;
+        auto inelasticNucleon =
+            p.AddSecondary(pCode, PprojNucLab.GetTimeLikeComponent(),
+                           PprojNucLab.GetSpaceLikeComponents(), pOrig, tOrig);
+        // create inelastic interaction
+        cout << "calling HadronicInteraction..." << endl;
+        fHadronicInteraction.DoInteraction(inelasticNucleon, s);
+      }
+
+      // delete parent particle
+      p.Delete();
+
+      cout << "NuclearInteraction: DoInteraction: done" << endl;
+
+      return process::EProcessReturn::eOk;
+    }
+
+  private:
+    corsika::environment::Environment const& fEnvironment;
+    corsika::process::sibyll::Interaction& fHadronicInteraction;
+    corsika::random::RNG& fRNG =
+        corsika::random::RNGManager::GetInstance().GetRandomStream("s_rndm");
+  };
+
+} // namespace corsika::process::sibyll
+
+#endif
diff --git a/Processes/Sibyll/ParticleConversion.cc b/Processes/Sibyll/ParticleConversion.cc
index 9925b97b9e90dba68dc38f46fd5ddb32e71c68c7..1410775bf384239ccfa5133bba674d2751e6596e 100644
--- a/Processes/Sibyll/ParticleConversion.cc
+++ b/Processes/Sibyll/ParticleConversion.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/Sibyll/ParticleConversion.h b/Processes/Sibyll/ParticleConversion.h
index 9bd417da2398d6eaec29b24d85242c1ad0d867ab..90e0b612c49fa312dfa1aabe95eb580ebb0df67e 100644
--- a/Processes/Sibyll/ParticleConversion.h
+++ b/Processes/Sibyll/ParticleConversion.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/Sibyll/SibStack.h b/Processes/Sibyll/SibStack.h
index 83d902f5c2b030ed455afbbe38867fa8b50dbf3c..fd847124abbcd34b42f2acd5ddb1bc3e5cef2e79 100644
--- a/Processes/Sibyll/SibStack.h
+++ b/Processes/Sibyll/SibStack.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -27,41 +27,37 @@ namespace corsika::process::sibyll {
 
   public:
     void Init();
+    void Dump() const {}
 
     void Clear() { s_plist_.np = 0; }
+    unsigned int GetSize() const { return s_plist_.np; }
+    unsigned int GetCapacity() const { return 8000; }
 
-    int GetSize() const { return s_plist_.np; }
-
-    int GetCapacity() const { return 8000; }
-
-    void SetId(const int i, const int v) { s_plist_.llist[i] = v; }
-    void SetEnergy(const int i, const corsika::units::si::HEPEnergyType v) {
+    void SetId(const unsigned int i, const int v) { s_plist_.llist[i] = v; }
+    void SetEnergy(const unsigned int i, const corsika::units::si::HEPEnergyType v) {
       using namespace corsika::units::si;
       s_plist_.p[3][i] = v / 1_GeV;
     }
-    void SetMass(const int i, const corsika::units::si::HEPMassType v) {
+    void SetMass(const unsigned int i, const corsika::units::si::HEPMassType v) {
       using namespace corsika::units::si;
       s_plist_.p[4][i] = v / 1_GeV;
     }
-
-    void SetMomentum(const int i, const MomentumVector& v) {
+    void SetMomentum(const unsigned int i, const MomentumVector& v) {
       using namespace corsika::units::si;
       auto tmp = v.GetComponents();
       for (int idx = 0; idx < 3; ++idx) s_plist_.p[idx][i] = tmp[idx] / 1_GeV;
     }
 
-    int GetId(const int i) const { return s_plist_.llist[i]; }
-
+    int GetId(const unsigned int i) const { return s_plist_.llist[i]; }
     corsika::units::si::HEPEnergyType GetEnergy(const int i) const {
       using namespace corsika::units::si;
       return s_plist_.p[3][i] * 1_GeV;
     }
-    corsika::units::si::HEPEnergyType GetMass(const int i) const {
+    corsika::units::si::HEPEnergyType GetMass(const unsigned int i) const {
       using namespace corsika::units::si;
       return s_plist_.p[4][i] * 1_GeV;
     }
-
-    MomentumVector GetMomentum(const int i) const {
+    MomentumVector GetMomentum(const unsigned int i) const {
       using corsika::geometry::CoordinateSystem;
       using corsika::geometry::QuantityVector;
       using corsika::geometry::RootCoordinateSystem;
@@ -70,16 +66,20 @@ namespace corsika::process::sibyll {
           RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
       QuantityVector<hepmomentum_d> components = {
           s_plist_.p[0][i] * 1_GeV, s_plist_.p[1][i] * 1_GeV, s_plist_.p[2][i] * 1_GeV};
-      MomentumVector v1(rootCS, components);
-      return v1;
+      return MomentumVector(rootCS, components);
     }
 
-    void Copy(const int i1, const int i2) {
-      s_plist_.llist[i1] = s_plist_.llist[i2];
-      s_plist_.p[3][i1] = s_plist_.p[3][i2];
+    void Copy(const unsigned int i1, const unsigned int i2) {
+      s_plist_.llist[i2] = s_plist_.llist[i1];
+      for (unsigned int i = 0; i < 5; ++i) s_plist_.p[i][i2] = s_plist_.p[i][i1];
+    }
+
+    void Swap(const unsigned int i1, const unsigned int i2) {
+      std::swap(s_plist_.llist[i1], s_plist_.llist[i2]);
+      for (unsigned int i = 0; i < 5; ++i)
+        std::swap(s_plist_.p[i][i1], s_plist_.p[i][i2]);
     }
 
-  protected:
     void IncrementSize() { s_plist_.np++; }
     void DecrementSize() {
       if (s_plist_.np > 0) { s_plist_.np--; }
@@ -93,6 +93,27 @@ namespace corsika::process::sibyll {
     using corsika::stack::ParticleBase<StackIteratorInterface>::GetIndex;
 
   public:
+    void SetParticleData(const int vID, // corsika::process::sibyll::SibyllCode vID,
+                         const corsika::units::si::HEPEnergyType vE,
+                         const MomentumVector& vP,
+                         const corsika::units::si::HEPMassType vM) {
+      SetPID(vID);
+      SetEnergy(vE);
+      SetMomentum(vP);
+      SetMass(vM);
+    }
+
+    void SetParticleData(ParticleInterface<StackIteratorInterface>& /*parent*/,
+                         const int vID, //  corsika::process::sibyll::SibyllCode vID,
+                         const corsika::units::si::HEPEnergyType vE,
+                         const MomentumVector& vP,
+                         const corsika::units::si::HEPMassType vM) {
+      SetPID(vID);
+      SetEnergy(vE);
+      SetMomentum(vP);
+      SetMass(vM);
+    }
+
     void SetEnergy(const corsika::units::si::HEPEnergyType v) {
       GetStackData().SetEnergy(GetIndex(), v);
     }
diff --git a/Processes/Sibyll/nuclib.f b/Processes/Sibyll/nuclib.f
new file mode 100644
index 0000000000000000000000000000000000000000..876c2dd438ecfeada7cbd7ca89bfd2f9da4f86b4
--- /dev/null
+++ b/Processes/Sibyll/nuclib.f
@@ -0,0 +1,3554 @@
+C.=========================================================================
+C.  Library of programs for the generation of nucleus-nucleus interactions
+C.  and the study of nucleus-induced cosmic ray showers
+C.
+C.  September 2001  changes in FPNI, and SIGMA_INI,
+C.                  new SIGMA_PP, SIGMA_PPI, SIGMA_KP  (R. Engel)
+C.
+C.  may  1996       small bug  corrected by Dieter Heck in NUC_CONF 
+C.
+C.  march 1996      small modification to the superposition code
+C.
+C.  February 1996   change to FPNI to give an interaction length
+C.                   also  at very low energy  
+C.
+C.  Version 1.01  september 1995 
+C.       (small corrections P.L.)
+C.       the random number generator is called as S_RNDM(0)
+C.  ------------------------------------------------------
+C.  Version 1.00  April 1992
+C.
+C.  Authors:
+C.
+C.     J. Engel
+C.     T.K Gaisser
+C.     P.Lipari
+C.     T. Stanev
+C. 
+C.  This set of routines  when used in  the simulation of cosmic ray
+C.  showers have only three  "contact points" with the "external world"
+C.
+C.    (i) SUBROUTINE NUC_NUC_INI
+C.        (no  calling arguments)         
+C.         to be called once during general initialization
+C.    (ii) SUBROUTINE HEAVY (IA, E0)
+C.         where IA (integer) is the mass number of the projectile
+C.         nucleus  and E0 (TeV) is the energy per nucleon
+C.         The output (positions of first interaction for the IA
+C.         nucleons of the projectile) is  contained in  the common block:
+C.           COMMON /C1STNC/ XX0(60),XX(60),YY(60),AX(60),AY(60)
+C.         In detail:
+C.             XX0(j)   (g cm-2) =  position of interaction
+C.             XX(j) (mm)    x-distance from shower axis
+C.             YY(j) (mm)    y-distance from shower axis
+C.             AX(j) (radiants)  Theta_x with respect to original direction
+C.             AY(j) (radiants)  Theta_y with respect to original direction
+C.      
+C.    (iii)  FUNCTION FPNI (E,L)
+C.           Interaction length in air.
+C.           E (TeV) is the energy of the particle, L is the particle
+C.           code (NOTE: "Sibyll" codes are used : L =1-18) 
+C.           WANRNING : The nucleus-nucleus cross section
+C.           tabulated in the program are "matched" to the p-Air
+C.           cross section calculated  with this FUNCTION, in other words 
+C.           they are both calculated with the same input pp cross section
+C==========================================================================
+
+      SUBROUTINE NUC_NUC_INI
+
+C-----------------------------------------------------------------------
+C...Initialization for the generation of nucleus-nucleus interactions
+C.  INPUT : E0 (TeV) Energy per nucleon of the beam nucleus
+C........................................................................
+      SAVE
+
+      CALL NUC_GEOM_INI                       ! nucleus profiles
+      CALL SIGMA_INI                          ! initialize pp cross sections
+
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE FRAGM1 (IA,NW, NF, IAF)
+
+C-----------------------------------------------------------------------
+C...Nuclear Fragmentation 
+C.  total dissolution of nucleus
+C.......................................................................
+      SAVE
+
+      DIMENSION IAF(60)
+      NF = IA-NW
+      DO J=1,NF
+         IAF(J) = 1
+      ENDDO
+      RETURN
+      END
+C->
+C=======================================================================
+
+      SUBROUTINE FRAGM2 (IA,NW, NF, IAF)
+
+C-----------------------------------------------------------------------
+C...Nuclear Fragmentation 
+C.  Spectator in one single fragment 
+C.......................................................................
+      SAVE
+
+      DIMENSION IAF(60)
+      IF (IA-NW .GT. 0)  THEN
+         NF = 1
+         IAF(1) = IA-NW
+      ELSE
+         NF = 0
+      ENDIF
+      RETURN
+      END
+
+C-----------------------------------------------------------------------
+C...Code of fragmentation  of spectator nucleons
+C.  based on Jon Engel  abrasion-ablation algorithms
+C=======================================================================
+
+      BLOCK DATA FRAG_DATA
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+C...Data for the fragmentation of  nucleus  projectiles
+      COMMON /FRAGMOD/A(10,10,20),AE(10,10,20),ERES(10,10),NFLAGG(10,10)
+      SAVE
+      DATA (NFLAGG(I, 1),I=1,10)  / 
+     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
+      DATA (NFLAGG(I, 2),I=1,10)  / 
+     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
+      DATA (NFLAGG(I, 3),I=1,10)  / 
+     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
+      DATA (NFLAGG(I, 4),I=1,10)  / 
+     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
+      DATA (NFLAGG(I, 5),I=1,10)  / 
+     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
+      DATA (NFLAGG(I, 6),I=1,10)  / 
+     +    0,  0,  0,  0,  0,  0,  0,  1,  1,  1 /
+      DATA (NFLAGG(I, 7),I=1,10)  / 
+     +    1,  1,  1,  1,  1,  1,  1,  1,  1,  1 /
+      DATA (NFLAGG(I, 8),I=1,10)  / 
+     +    1,  1,  1,  1,  1,  1,  1,  1,  1,  1 /
+      DATA (NFLAGG(I, 9),I=1,10)  / 
+     +    1,  1,  1,  1,  1,  1,  1,  1,  1,  1 /
+      DATA (NFLAGG(I,10),I=1,10)  / 
+     +    1,  1,  1,  1,  1,  1,  1,  1,  1,  1 /
+      DATA (A(I, 1, 1),I=1,10)  / 
+     +  .438D-01,.172D0  ,.283D0  ,.511D0  ,.715D0  ,.920D0  ,1.19D0  ,
+     +  1.37D0  ,1.65D0  ,2.14D0   /
+      DATA (A(I, 1, 2),I=1,10)  / 
+     +  .147D-01,.249D-01,.439D-01,.592D-01,.776D-01,.886D-01,.108D0  ,
+     +  .117D0  ,.126D0  ,.128D0   /
+      DATA (A(I, 1, 3),I=1,10)  / 
+     +  .216D-02,.627D-02,.834D-02,.108D-01,.144D-01,.152D-01,.196D-01,
+     +  .200D-01,.210D-01,.224D-01 /
+      DATA (A(I, 1, 4),I=1,10)  / 
+     +  .593D-01,.653D-01,.116D0  ,.145D0  ,.184D0  ,.204D0  ,.234D0  ,
+     +  .257D0  ,.271D0  ,.248D0   /
+      DATA (A(I, 1, 5),I=1,10)  / 
+     +  .000D+00,.918D-02,.362D-02,.805D-02,.436D-02,.728D-02,.466D-02,
+     +  .707D-02,.932D-02,.130D-01 /
+      DATA (A(I, 1, 6),I=1,10)  / 
+     +  .000D+00,.180D-02,.247D-02,.208D-02,.224D-02,.214D-02,.226D-02,
+     +  .233D-02,.230D-02,.194D-02 /
+      DATA (A(I, 1, 7),I=1,10)  / 
+     +  .000D+00,.106D-02,.703D-03,.687D-03,.739D-03,.674D-03,.819D-03,
+     +  .768D-03,.756D-03,.720D-03 /
+      DATA (A(I, 1, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.188D-02,.130D-02,.138D-02,.117D-02,.124D-02,
+     +  .119D-02,.111D-02,.829D-03 /
+      DATA (A(I, 1, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.302D-03,.258D-03,.249D-03,.208D-03,.248D-03,
+     +  .222D-03,.210D-03,.187D-03 /
+      DATA (A(I, 1,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.235D-03,.222D-03,.172D-03,.181D-03,
+     +  .166D-03,.152D-03,.124D-03 /
+      DATA (A(I, 1,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.238D-03,.179D-03,.145D-03,.156D-03,
+     +  .138D-03,.129D-03,.111D-03 /
+      DATA (A(I, 1,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.368D-03,.400D-03,.255D-03,.262D-03,
+     +  .221D-03,.182D-03,.112D-03 /
+      DATA (A(I, 1,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.753D-04,.712D-04,.527D-04,
+     +  .537D-04,.538D-04,.487D-04 /
+      DATA (A(I, 1,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.103D-03,.589D-04,.578D-04,
+     +  .468D-04,.385D-04,.269D-04 /
+      DATA (A(I, 1,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.444D-04,.372D-04,
+     +  .318D-04,.284D-04,.218D-04 /
+      DATA (A(I, 1,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.487D-04,.473D-04,
+     +  .338D-04,.243D-04,.122D-04 /
+      DATA (A(I, 1,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.121D-04,.117D-04,
+     +  .932D-05,.792D-05,.583D-05 /
+      DATA (A(I, 1,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.147D-04,
+     +  .101D-04,.756D-05,.496D-05 /
+      DATA (A(I, 1,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.755D-05,
+     +  .612D-05,.505D-05,.341D-05 /
+      DATA (A(I, 1,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .630D-05,.444D-05,.282D-05 /
+      DATA (A(I, 2, 1),I=1,10)  / 
+     +  .269D0  ,.510D0  ,.738D0  ,1.12D0  ,1.46D0  ,1.83D0  ,2.22D0  ,
+     +  2.57D0  ,3.00D0  ,3.67D0   /
+      DATA (A(I, 2, 2),I=1,10)  / 
+     +  .121D0  ,.133D0  ,.190D0  ,.234D0  ,.293D0  ,.332D0  ,.395D0  ,
+     +  .431D0  ,.468D0  ,.502D0   /
+      DATA (A(I, 2, 3),I=1,10)  / 
+     +  .227D-01,.374D-01,.474D-01,.578D-01,.722D-01,.794D-01,.960D-01,
+     +  .102D0  ,.110D0  ,.120D0   /
+      DATA (A(I, 2, 4),I=1,10)  / 
+     +  .287D0  ,.196D0  ,.270D0  ,.314D0  ,.373D0  ,.408D0  ,.462D0  ,
+     +  .498D0  ,.529D0  ,.523D0   /
+      DATA (A(I, 2, 5),I=1,10)  / 
+     +  .000D+00,.433D-01,.218D-01,.384D-01,.263D-01,.385D-01,.298D-01,
+     +  .405D-01,.504D-01,.671D-01 /
+      DATA (A(I, 2, 6),I=1,10)  / 
+     +  .000D+00,.151D-01,.177D-01,.159D-01,.173D-01,.173D-01,.187D-01,
+     +  .196D-01,.201D-01,.191D-01 /
+      DATA (A(I, 2, 7),I=1,10)  / 
+     +  .000D+00,.457D-02,.607D-02,.610D-02,.677D-02,.670D-02,.784D-02,
+     +  .787D-02,.806D-02,.803D-02 /
+      DATA (A(I, 2, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.702D-02,.536D-02,.558D-02,.510D-02,.554D-02,
+     +  .546D-02,.538D-02,.489D-02 /
+      DATA (A(I, 2, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.190D-02,.199D-02,.205D-02,.191D-02,.221D-02,
+     +  .214D-02,.213D-02,.204D-02 /
+      DATA (A(I, 2,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.226D-02,.219D-02,.195D-02,.208D-02,
+     +  .204D-02,.203D-02,.194D-02 /
+      DATA (A(I, 2,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.213D-02,.195D-02,.175D-02,.191D-02,
+     +  .183D-02,.179D-02,.166D-02 /
+      DATA (A(I, 2,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.588D-03,.186D-02,.137D-02,.141D-02,
+     +  .128D-02,.117D-02,.947D-03 /
+      DATA (A(I, 2,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.554D-03,.562D-03,.454D-03,
+     +  .485D-03,.505D-03,.509D-03 /
+      DATA (A(I, 2,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.490D-03,.533D-03,.531D-03,
+     +  .476D-03,.437D-03,.369D-03 /
+      DATA (A(I, 2,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.427D-03,.382D-03,
+     +  .358D-03,.340D-03,.294D-03 /
+      DATA (A(I, 2,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.239D-03,.298D-03,
+     +  .238D-03,.196D-03,.134D-03 /
+      DATA (A(I, 2,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.299D-04,.893D-04,
+     +  .796D-04,.744D-04,.683D-04 /
+      DATA (A(I, 2,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.127D-03,
+     +  .107D-03,.916D-04,.720D-04 /
+      DATA (A(I, 2,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.397D-04,
+     +  .630D-04,.565D-04,.461D-04 /
+      DATA (A(I, 2,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .511D-04,.459D-04,.402D-04 /
+      DATA (A(I, 3, 1),I=1,10)  / 
+     +  .708D0  ,1.02D0  ,1.41D0  ,1.91D0  ,2.42D0  ,3.00D0  ,3.53D0  ,
+     +  4.09D0  ,4.71D0  ,5.57D0   /
+      DATA (A(I, 3, 2),I=1,10)  / 
+     +  .397D0  ,.410D0  ,.539D0  ,.648D0  ,.795D0  ,.910D0  ,1.06D0  ,
+     +  1.17D0  ,1.29D0  ,1.42D0   /
+      DATA (A(I, 3, 3),I=1,10)  / 
+     +  .845D-01,.122D0  ,.157D0  ,.190D0  ,.232D0  ,.262D0  ,.307D0  ,
+     +  .335D0  ,.366D0  ,.402D0   /
+      DATA (A(I, 3, 4),I=1,10)  / 
+     +  .210D0  ,.379D0  ,.450D0  ,.490D0  ,.574D0  ,.636D0  ,.709D0  ,
+     +  .769D0  ,.820D0  ,.849D0   /
+      DATA (A(I, 3, 5),I=1,10)  / 
+     +  .000D+00,.102D0  ,.675D-01,.104D0  ,.858D-01,.115D0  ,.102D0  ,
+     +  .129D0  ,.154D0  ,.194D0   /
+      DATA (A(I, 3, 6),I=1,10)  / 
+     +  .000D+00,.392D-01,.615D-01,.593D-01,.649D-01,.674D-01,.735D-01,
+     +  .779D-01,.817D-01,.828D-01 /
+      DATA (A(I, 3, 7),I=1,10)  / 
+     +  .000D+00,.539D-02,.222D-01,.238D-01,.269D-01,.280D-01,.320D-01,
+     +  .334D-01,.350D-01,.361D-01 /
+      DATA (A(I, 3, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.838D-02,.130D-01,.133D-01,.131D-01,.141D-01,
+     +  .144D-01,.149D-01,.152D-01 /
+      DATA (A(I, 3, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.228D-02,.647D-02,.688D-02,.687D-02,.772D-02,
+     +  .786D-02,.811D-02,.824D-02 /
+      DATA (A(I, 3,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.664D-02,.828D-02,.802D-02,.845D-02,
+     +  .869D-02,.902D-02,.930D-02 /
+      DATA (A(I, 3,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.338D-02,.735D-02,.710D-02,.767D-02,
+     +  .767D-02,.776D-02,.756D-02 /
+      DATA (A(I, 3,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.280D-03,.262D-02,.349D-02,.342D-02,
+     +  .322D-02,.312D-02,.291D-02 /
+      DATA (A(I, 3,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.618D-03,.161D-02,.138D-02,
+     +  .148D-02,.155D-02,.166D-02 /
+      DATA (A(I, 3,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.313D-03,.128D-02,.161D-02,
+     +  .150D-02,.144D-02,.134D-02 /
+      DATA (A(I, 3,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.645D-03,.118D-02,
+     +  .115D-02,.111D-02,.103D-02 /
+      DATA (A(I, 3,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.117D-03,.497D-03,
+     +  .581D-03,.501D-03,.401D-03 /
+      DATA (A(I, 3,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.115D-04,.997D-04,
+     +  .202D-03,.203D-03,.206D-03 /
+      DATA (A(I, 3,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.877D-04,
+     +  .242D-03,.263D-03,.226D-03 /
+      DATA (A(I, 3,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.158D-04,
+     +  .881D-04,.152D-03,.136D-03 /
+      DATA (A(I, 3,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .358D-04,.997D-04,.117D-03 /
+      DATA (A(I, 4, 1),I=1,10)  / 
+     +  .945D0  ,1.29D0  ,1.40D0  ,1.98D0  ,2.73D0  ,3.17D0  ,3.77D0  ,
+     +  4.29D0  ,4.78D0  ,5.54D0   /
+      DATA (A(I, 4, 2),I=1,10)  / 
+     +  .581D0  ,.599D0  ,.645D0  ,.839D0  ,1.10D0  ,1.25D0  ,1.47D0  ,
+     +  1.64D0  ,1.78D0  ,1.99D0   /
+      DATA (A(I, 4, 3),I=1,10)  / 
+     +  .127D0  ,.182D0  ,.202D0  ,.264D0  ,.344D0  ,.387D0  ,.455D0  ,
+     +  .504D0  ,.549D0  ,.611D0   /
+      DATA (A(I, 4, 4),I=1,10)  / 
+     +  .183D0  ,.464D0  ,.351D0  ,.444D0  ,.642D0  ,.659D0  ,.772D0  ,
+     +  .830D0  ,.882D0  ,.930D0   /
+      DATA (A(I, 4, 5),I=1,10)  / 
+     +  .000D+00,.122D0  ,.803D-01,.136D0  ,.134D0  ,.173D0  ,.164D0  ,
+     +  .203D0  ,.239D0  ,.300D0   /
+      DATA (A(I, 4, 6),I=1,10)  / 
+     +  .000D+00,.393D-01,.766D-01,.872D-01,.108D0  ,.111D0  ,.123D0  ,
+     +  .132D0  ,.139D0  ,.145D0   /
+      DATA (A(I, 4, 7),I=1,10)  / 
+     +  .000D+00,.416D-02,.289D-01,.360D-01,.454D-01,.477D-01,.549D-01,
+     +  .583D-01,.618D-01,.654D-01 /
+      DATA (A(I, 4, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.761D-02,.157D-01,.214D-01,.205D-01,.233D-01,
+     +  .241D-01,.255D-01,.271D-01 /
+      DATA (A(I, 4, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.238D-02,.803D-02,.123D-01,.123D-01,.140D-01,
+     +  .145D-01,.153D-01,.160D-01 /
+      DATA (A(I, 4,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.695D-02,.150D-01,.154D-01,.166D-01,
+     +  .172D-01,.181D-01,.192D-01 /
+      DATA (A(I, 4,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.355D-02,.104D-01,.143D-01,.156D-01,
+     +  .158D-01,.164D-01,.165D-01 /
+      DATA (A(I, 4,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.112D-03,.276D-02,.568D-02,.736D-02,
+     +  .684D-02,.691D-02,.661D-02 /
+      DATA (A(I, 4,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.740D-03,.222D-02,.339D-02,
+     +  .352D-02,.382D-02,.409D-02 /
+      DATA (A(I, 4,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.369D-03,.160D-02,.322D-02,
+     +  .375D-02,.375D-02,.355D-02 /
+      DATA (A(I, 4,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.750D-03,.190D-02,
+     +  .298D-02,.319D-02,.299D-02 /
+      DATA (A(I, 4,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.260D-03,.673D-03,
+     +  .117D-02,.156D-02,.126D-02 /
+      DATA (A(I, 4,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.283D-05,.131D-03,
+     +  .363D-03,.618D-03,.690D-03 /
+      DATA (A(I, 4,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.205D-03,
+     +  .378D-03,.709D-03,.844D-03 /
+      DATA (A(I, 4,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.654D-05,
+     +  .150D-03,.341D-03,.527D-03 /
+      DATA (A(I, 4,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .957D-04,.197D-03,.406D-03 /
+      DATA (A(I, 5, 1),I=1,10)  / 
+     +  1.16D0  ,1.70D0  ,2.19D0  ,2.79D0  ,3.33D0  ,3.90D0  ,4.49D0  ,
+     +  5.07D0  ,5.66D0  ,6.38D0   /
+      DATA (A(I, 5, 2),I=1,10)  / 
+     +  .779D0  ,.899D0  ,1.09D0  ,1.28D0  ,1.51D0  ,1.71D0  ,1.96D0  ,
+     +  2.18D0  ,2.39D0  ,2.62D0   /
+      DATA (A(I, 5, 3),I=1,10)  / 
+     +  .167D0  ,.263D0  ,.334D0  ,.408D0  ,.482D0  ,.548D0  ,.632D0  ,
+     +  .700D0  ,.767D0  ,.840D0   /
+      DATA (A(I, 5, 4),I=1,10)  / 
+     +  .203D0  ,.565D0  ,.845D0  ,.867D0  ,.906D0  ,.961D0  ,1.08D0  ,
+     +  1.13D0  ,1.21D0  ,1.25D0   /
+      DATA (A(I, 5, 5),I=1,10)  / 
+     +  .000D+00,.129D0  ,.152D0  ,.237D0  ,.208D0  ,.268D0  ,.258D0  ,
+     +  .312D0  ,.368D0  ,.450D0   /
+      DATA (A(I, 5, 6),I=1,10)  / 
+     +  .000D+00,.460D-01,.126D0  ,.174D0  ,.182D0  ,.188D0  ,.208D0  ,
+     +  .219D0  ,.233D0  ,.239D0   /
+      DATA (A(I, 5, 7),I=1,10)  / 
+     +  .000D+00,.289D-02,.380D-01,.611D-01,.788D-01,.845D-01,.974D-01,
+     +  .103D0  ,.111D0  ,.117D0   /
+      DATA (A(I, 5, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.137D-01,.223D-01,.374D-01,.436D-01,.488D-01,
+     +  .488D-01,.524D-01,.547D-01 /
+      DATA (A(I, 5, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.162D-02,.114D-01,.198D-01,.263D-01,.315D-01,
+     +  .323D-01,.348D-01,.364D-01 /
+      DATA (A(I, 5,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.149D-01,.240D-01,.320D-01,.428D-01,
+     +  .436D-01,.469D-01,.493D-01 /
+      DATA (A(I, 5,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.562D-02,.194D-01,.290D-01,.408D-01,
+     +  .460D-01,.492D-01,.500D-01 /
+      DATA (A(I, 5,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.476D-04,.106D-01,.134D-01,.191D-01,
+     +  .227D-01,.264D-01,.253D-01 /
+      DATA (A(I, 5,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.281D-02,.679D-02,.879D-02,
+     +  .123D-01,.165D-01,.190D-01 /
+      DATA (A(I, 5,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.542D-04,.847D-02,.125D-01,
+     +  .144D-01,.173D-01,.192D-01 /
+      DATA (A(I, 5,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.652D-02,.982D-02,
+     +  .129D-01,.159D-01,.192D-01 /
+      DATA (A(I, 5,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.109D-03,.688D-02,
+     +  .751D-02,.845D-02,.905D-02 /
+      DATA (A(I, 5,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.823D-06,.237D-02,
+     +  .318D-02,.446D-02,.569D-02 /
+      DATA (A(I, 5,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.604D-03,
+     +  .610D-02,.673D-02,.827D-02 /
+      DATA (A(I, 5,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.716D-06,
+     +  .412D-02,.519D-02,.617D-02 /
+      DATA (A(I, 5,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .710D-03,.543D-02,.674D-02 /
+      DATA (A(I, 6, 1),I=1,10)  / 
+     +  1.36D0  ,2.08D0  ,2.67D0  ,3.30D0  ,3.94D0  ,4.62D0  ,5.18D0  ,
+     +  3.60D0  ,3.64D0  ,3.95D0   /
+      DATA (A(I, 6, 2),I=1,10)  / 
+     +  1.07D0  ,1.33D0  ,1.58D0  ,1.82D0  ,2.10D0  ,2.44D0  ,2.74D0  ,
+     +  1.78D0  ,1.73D0  ,1.80D0   /
+      DATA (A(I, 6, 3),I=1,10)  / 
+     +  .158D0  ,.276D0  ,.402D0  ,.506D0  ,.609D0  ,.700D0  ,.802D0  ,
+     +  .638D0  ,.629D0  ,.658D0   /
+      DATA (A(I, 6, 4),I=1,10)  / 
+     +  .308D0  ,.739D0  ,1.02D0  ,1.12D0  ,1.26D0  ,1.35D0  ,1.57D0  ,
+     +  1.94D0  ,1.71D0  ,1.55D0   /
+      DATA (A(I, 6, 5),I=1,10)  / 
+     +  .000D+00,.217D0  ,.183D0  ,.324D0  ,.276D0  ,.395D0  ,.393D0  ,
+     +  .558D0  ,.602D0  ,.681D0   /
+      DATA (A(I, 6, 6),I=1,10)  / 
+     +  .000D+00,.658D-01,.251D0  ,.267D0  ,.299D0  ,.326D0  ,.386D0  ,
+     +  .452D0  ,.475D0  ,.409D0   /
+      DATA (A(I, 6, 7),I=1,10)  / 
+     +  .000D+00,.198D-02,.774D-01,.136D0  ,.149D0  ,.164D0  ,.187D0  ,
+     +  .210D0  ,.238D0  ,.256D0   /
+      DATA (A(I, 6, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.290D-01,.122D0  ,.139D0  ,.128D0  ,.129D0  ,
+     +  .137D0  ,.147D0  ,.167D0   /
+      DATA (A(I, 6, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.699D-03,.617D-01,.750D-01,.801D-01,.905D-01,
+     +  .974D-01,.105D0  ,.122D0   /
+      DATA (A(I, 6,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.310D-01,.112D0  ,.127D0  ,.140D0  ,
+     +  .143D0  ,.155D0  ,.176D0   /
+      DATA (A(I, 6,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.277D-02,.889D-01,.143D0  ,.150D0  ,
+     +  .175D0  ,.184D0  ,.208D0   /
+      DATA (A(I, 6,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.202D-04,.343D-01,.959D-01,.109D0  ,
+     +  .115D0  ,.112D0  ,.116D0   /
+      DATA (A(I, 6,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.186D-02,.435D-01,.512D-01,
+     +  .744D-01,.856D-01,.103D0   /
+      DATA (A(I, 6,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.144D-04,.427D-01,.786D-01,
+     +  .911D-01,.993D-01,.108D0   /
+      DATA (A(I, 6,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.466D-02,.518D-01,
+     +  .848D-01,.109D0  ,.119D0   /
+      DATA (A(I, 6,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.655D-05,.330D-01,
+     +  .586D-01,.617D-01,.594D-01 /
+      DATA (A(I, 6,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.228D-06,.328D-02,
+     +  .190D-01,.301D-01,.454D-01 /
+      DATA (A(I, 6,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.218D-04,
+     +  .272D-01,.501D-01,.707D-01 /
+      DATA (A(I, 6,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.146D-06,
+     +  .441D-02,.378D-01,.556D-01 /
+      DATA (A(I, 6,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .160D-03,.204D-01,.679D-01 /
+      DATA (A(I, 7, 1),I=1,10)  / 
+     +  .522D0  ,.862D0  ,1.14D0  ,1.40D0  ,1.70D0  ,1.94D0  ,2.26D0  ,
+     +  2.48D0  ,2.72D0  ,3.95D0   /
+      DATA (A(I, 7, 2),I=1,10)  / 
+     +  .314D0  ,.450D0  ,.588D0  ,.692D0  ,.834D0  ,.936D0  ,1.09D0  ,
+     +  1.18D0  ,1.28D0  ,1.80D0   /
+      DATA (A(I, 7, 3),I=1,10)  / 
+     +  .814D-01,.147D0  ,.189D0  ,.226D0  ,.272D0  ,.302D0  ,.351D0  ,
+     +  .378D0  ,.406D0  ,.658D0   /
+      DATA (A(I, 7, 4),I=1,10)  / 
+     +  .252D0  ,.864D0  ,1.01D0  ,.851D0  ,.837D0  ,.774D0  ,.763D0  ,
+     +  .757D0  ,.748D0  ,1.55D0   /
+      DATA (A(I, 7, 5),I=1,10)  / 
+     +  .000D+00,.225D0  ,.180D0  ,.276D0  ,.193D0  ,.240D0  ,.190D0  ,
+     +  .228D0  ,.259D0  ,.681D0   /
+      DATA (A(I, 7, 6),I=1,10)  / 
+     +  .000D+00,.485D-01,.272D0  ,.273D0  ,.253D0  ,.216D0  ,.206D0  ,
+     +  .197D0  ,.191D0  ,.409D0   /
+      DATA (A(I, 7, 7),I=1,10)  / 
+     +  .000D+00,.137D-02,.752D-01,.137D0  ,.152D0  ,.134D0  ,.125D0  ,
+     +  .119D0  ,.116D0  ,.256D0   /
+      DATA (A(I, 7, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.220D-01,.155D0  ,.175D0  ,.155D0  ,.116D0  ,
+     +  .977D-01,.858D-01,.167D0   /
+      DATA (A(I, 7, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.326D-03,.695D-01,.881D-01,.106D0  ,.897D-01,
+     +  .782D-01,.706D-01,.122D0   /
+      DATA (A(I, 7,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.261D-01,.124D0  ,.131D0  ,.156D0  ,
+     +  .141D0  ,.121D0  ,.176D0   /
+      DATA (A(I, 7,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.785D-03,.864D-01,.130D0  ,.170D0  ,
+     +  .182D0  ,.172D0  ,.208     /
+      DATA (A(I, 7,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.896D-05,.225D-01,.105D0  ,.126D0  ,
+     +  .126D0  ,.135D0  ,.116D0   /
+      DATA (A(I, 7,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.542D-03,.427D-01,.553D-01,
+     +  .744D-01,.980D-01,.103D0   /
+      DATA (A(I, 7,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.515D-05,.377D-01,.831D-01,
+     +  .985D-01,.104D0  ,.108D0   /
+      DATA (A(I, 7,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.285D-02,.495D-01,
+     +  .871D-01,.106D0  ,.119D0   /
+      DATA (A(I, 7,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.110D-05,.284D-01,
+     +  .588D-01,.657D-01,.594D-01 /
+      DATA (A(I, 7,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.722D-07,.176D-02,
+     +  .170D-01,.305D-01,.454D-01 /
+      DATA (A(I, 7,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.148D-05,
+     +  .213D-01,.492D-01,.707D-01 /
+      DATA (A(I, 7,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.323D-07,
+     +  .722D-02,.359D-01,.556D-01 /
+      DATA (A(I, 7,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .461D-05,.155D-01,.679D-01 /
+      DATA (A(I, 8, 1),I=1,10)  / 
+     +  .630D0  ,.974D0  ,1.29D0  ,1.58D0  ,1.89D0  ,2.16D0  ,2.49D0  ,
+     +  2.75D0  ,3.02D0  ,3.95D0   /
+      DATA (A(I, 8, 2),I=1,10)  / 
+     +  .328D0  ,.459D0  ,.613D0  ,.735D0  ,.879D0  ,.994D0  ,1.15D0  ,
+     +  1.27D0  ,1.38D0  ,1.80D0   /
+      DATA (A(I, 8, 3),I=1,10)  / 
+     +  .748D-01,.121D0  ,.164D0  ,.197D0  ,.235D0  ,.265D0  ,.310D0  ,
+     +  .339D0  ,.370D0  ,.658D0   /
+      DATA (A(I, 8, 4),I=1,10)  / 
+     +  .194D0  ,.211D0  ,.337D0  ,.344D0  ,.339D0  ,.351D0  ,.390    ,
+     +  .419D0  ,.442D0  ,1.55D0   /
+      DATA (A(I, 8, 5),I=1,10)  / 
+     +  .000D+00,.869D-01,.725D-01,.113D0  ,.810D-01,.106D0  ,.951D-01,
+     +  .120D0  ,.143D0  ,.681D0   /
+      DATA (A(I, 8, 6),I=1,10)  / 
+     +  .000D+00,.288D-01,.102D0  ,.922D-01,.857D-01,.845D-01,.932D-01,
+     +  .983D-01,.102D0  ,.409D0   /
+      DATA (A(I, 8, 7),I=1,10)  / 
+     +  .000D+00,.668D-03,.533D-01,.575D-01,.493D-01,.482D-01,.539D-01,
+     +  .558D-01,.582D-01,.256D0   /
+      DATA (A(I, 8, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.205D-01,.808D-01,.510D-01,.409D-01,.406D-01,
+     +  .394D-01,.389D-01,.167D0   /
+      DATA (A(I, 8, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.999D-04,.647D-01,.385D-01,.325D-01,.325D-01,
+     +  .316D-01,.314D-01,.122D0   /
+      DATA (A(I, 8,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.169D-01,.834D-01,.611D-01,.565D-01,
+     +  .533D-01,.519D-01,.176D0   /
+      DATA (A(I, 8,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.107D-03,.769D-01,.922D-01,.805D-01,
+     +  .745D-01,.711D-01,.208D0   /
+      DATA (A(I, 8,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.180D-05,.143D-01,.983D-01,.775D-01,
+     +  .627D-01,.541D-01,.116D0   /
+      DATA (A(I, 8,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.157D-04,.346D-01,.507D-01,
+     +  .479D-01,.455D-01,.103D0   /
+      DATA (A(I, 8,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.752D-06,.248D-01,.721D-01,
+     +  .728D-01,.611D-01,.108D0   /
+      DATA (A(I, 8,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.686D-04,.356D-01,
+     +  .731D-01,.791D-01,.119D0   /
+      DATA (A(I, 8,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.838D-07,.151D-01,
+     +  .470D-01,.567D-01,.594D-01 /
+      DATA (A(I, 8,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.759D-08,.400D-04,
+     +  .193D-01,.313D-01,.454D-01 /
+      DATA (A(I, 8,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.385D-07,
+     +  .921D-02,.353D-01,.707D-01 /
+      DATA (A(I, 8,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.219D-08,
+     +  .348D-03,.226D-01,.556D-01 /
+      DATA (A(I, 8,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .212D-07,.149D-01,.679D-01 /
+      DATA (A(I, 9, 1),I=1,10)  / 
+     +  .736D0  ,1.13D0  ,1.49D0  ,1.82D0  ,2.20D0  ,2.49D0  ,2.86D0  ,
+     +  3.17D0  ,3.49D0  ,3.95D0   /
+      DATA (A(I, 9, 2),I=1,10)  / 
+     +  .339D0  ,.492D0  ,.658D0  ,.789D0  ,.958D0  ,1.08D0  ,1.25D0  ,
+     +  1.37D0  ,1.50D0  ,1.80D0   /
+      DATA (A(I, 9, 3),I=1,10)  / 
+     +  .680D-01,.110D0  ,.150D0  ,.180D0  ,.222D0  ,.247D0  ,.289    ,
+     +  .318D0  ,.349D0  ,.658D0   /
+      DATA (A(I, 9, 4),I=1,10)  / 
+     +  .110D0  ,.104D0  ,.157D0  ,.156D0  ,.210D0  ,.205D0  ,.246D0  ,
+     +  .274D0  ,.300D0  ,1.55D0   /
+      DATA (A(I, 9, 5),I=1,10)  / 
+     +  .000D+00,.379D-01,.347D-01,.477D-01,.486D-01,.576D-01,.569D-01,
+     +  .732D-01,.893D-01,.681D0   /
+      DATA (A(I, 9, 6),I=1,10)  / 
+     +  .000D+00,.223D-01,.354D-01,.312D-01,.436D-01,.400D-01,.489D-01,
+     +  .548D-01,.600D-01,.409D0   /
+      DATA (A(I, 9, 7),I=1,10)  / 
+     +  .000D+00,.338D-03,.149D-01,.142D-01,.215D-01,.188D-01,.248D-01,
+     +  .278D-01,.307D-01,.256D0   /
+      DATA (A(I, 9, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.553D-02,.862D-02,.150D-01,.106D-01,.145D-01,
+     +  .165D-01,.181D-01,.167D0   /
+      DATA (A(I, 9, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.375D-04,.641D-02,.111D-01,.792D-02,.112D-01,
+     +  .127D-01,.140D-01,.122D0   /
+      DATA (A(I, 9,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.112D-01,.200D-01,.127D-01,.176D-01,
+     +  .200D-01,.220D-01,.176D0   /
+      DATA (A(I, 9,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.244D-04,.261D-01,.162D-01,.232D-01,
+     +  .263D-01,.287D-01,.208D0   /
+      DATA (A(I, 9,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.455D-06,.635D-02,.121D-01,.186D-01,
+     +  .201D-01,.207D-01,.116D0   /
+      DATA (A(I, 9,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.146D-05,.922D-02,.116D-01,
+     +  .145D-01,.165D-01,.103D0   /
+      DATA (A(I, 9,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.135D-06,.128D-01,.202D-01,
+     +  .215D-01,.220D-01,.108D0   /
+      DATA (A(I, 9,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.237D-05,.229D-01,
+     +  .259D-01,.271D-01,.119D0   /
+      DATA (A(I, 9,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.100D-07,.534D-02,
+     +  .210D-01,.193D-01,.594D-01 /
+      DATA (A(I, 9,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.915D-09,.847D-06,
+     +  .119D-01,.125D-01,.454D-01 /
+      DATA (A(I, 9,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.298D-08,
+     +  .101D-01,.242D-01,.707D-01 /
+      DATA (A(I, 9,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.196D-09,
+     +  .243D-05,.234D-01,.556D-01 /
+      DATA (A(I, 9,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .575D-09,.364D-02,.679D-01 /
+      DATA (A(I,10, 1),I=1,10)  / 
+     +  .959D0  ,1.46D0  ,1.92D0  ,2.34D0  ,2.80D0  ,3.24D0  ,3.64D0  ,
+     +  4.05D0  ,4.48D0  ,3.95D0   /
+      DATA (A(I,10, 2),I=1,10)  / 
+     +  .343D0  ,.516D0  ,.692D0  ,.836D0  ,1.01D0  ,1.16D0  ,1.31D0  ,
+     +  1.46D0  ,1.61D0  ,1.80D0   /
+      DATA (A(I,10, 3),I=1,10)  / 
+     +  .512D-01,.837D-01,.115D0  ,.138D0  ,.169D0  ,.195D0  ,.220D0  ,
+     +  .245D0  ,.270D0  ,.658D0   /
+      DATA (A(I,10, 4),I=1,10)  / 
+     +  .274D-01,.361D-01,.510D-01,.562D-01,.703D-01,.828D-01,.877D-01,
+     +  .996D-01,.111D0  ,1.55D0   /
+      DATA (A(I,10, 5),I=1,10)  / 
+     +  .000D+00,.850D-02,.875D-02,.118D-01,.124D-01,.170D-01,.154D-01,
+     +  .194D-01,.237D-01,.681D0   /
+      DATA (A(I,10, 6),I=1,10)  / 
+     +  .000D+00,.345D-02,.519D-02,.533D-02,.691D-02,.842D-02,.844D-02,
+     +  .987D-02,.113D-01,.409D0   /
+      DATA (A(I,10, 7),I=1,10)  / 
+     +  .000D+00,.722D-04,.130D-02,.135D-02,.189D-02,.240D-02,.235D-02,
+     +  .281D-02,.331D-02,.256D0   /
+      DATA (A(I,10, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,.283D-03,.272D-03,.394D-03,.557D-03,.480D-03,
+     +  .616D-03,.775D-03,.167D0   /
+      DATA (A(I,10, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,.457D-05,.122D-03,.192D-03,.275D-03,.225D-03,
+     +  .292D-03,.373D-03,.122D0   /
+      DATA (A(I,10,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.119D-03,.185D-03,.278D-03,.201D-03,
+     +  .274D-03,.364D-03,.176D0   /
+      DATA (A(I,10,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.140D-05,.129D-03,.200D-03,.137D-03,
+     +  .188D-03,.252D-03,.208D0   /
+      DATA (A(I,10,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.207D-07,.307D-04,.518D-04,.278D-04,
+     +  .421D-04,.608D-04,.116D0   /
+      DATA (A(I,10,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.306D-07,.252D-04,.111D-04,
+     +  .188D-04,.295D-04,.103D0   /
+      DATA (A(I,10,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.321D-08,.220D-04,.104D-04,
+     +  .162D-04,.243D-04,.108D0   /
+      DATA (A(I,10,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.770D-08,.632D-05,
+     +  .105D-04,.162D-04,.119D0   /
+      DATA (A(I,10,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.117D-09,.199D-05,
+     +  .321D-05,.492D-05,.594D-01 /
+      DATA (A(I,10,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.888E-11,.323D-09,
+     +  .106D-05,.192D-05,.454D-01 /
+      DATA (A(I,10,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.174E-10,
+     +  .131D-05,.218D-05,.707D-01 /
+      DATA (A(I,10,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.994E-12,
+     +  .233D-09,.104D-05,.556D-01 /
+      DATA (A(I,10,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  .144E-11,.724D-06,.679D-01 /
+      DATA (AE(I, 1, 1),I=1,10)  / 
+     +  7.27D0  ,6.29D0  ,7.76D0  ,6.70D0  ,8.17D0  ,7.34D0  ,8.70D0  ,
+     +  8.02D0  ,7.37D0  ,6.18D0   /
+      DATA (AE(I, 1, 2),I=1,10)  / 
+     +  7.41D0  ,7.52D0  ,8.14D0  ,8.20D0  ,8.96D0  ,9.05D0  ,9.96D0  ,
+     +  10.0D0  ,10.1D0  ,9.86D0   /
+      DATA (AE(I, 1, 3),I=1,10)  / 
+     +  7.72D0  ,7.69D0  ,9.17D0  ,8.99D0  ,10.6D0  ,10.5D0  ,12.1D0  ,
+     +  12.1D0  ,12.0D0  ,11.5D0   /
+      DATA (AE(I, 1, 4),I=1,10)  / 
+     +  7.90D0  ,8.48D0  ,9.50D0  ,9.94D0  ,10.8D0  ,11.4D0  ,12.2D0  ,
+     +  12.8D0  ,13.3D0  ,13.8D0   /
+      DATA (AE(I, 1, 5),I=1,10)  / 
+     +  .000D+00,8.52D0  ,9.59D0  ,10.1D0  ,11.1D0  ,11.8D0  ,12.7D0  ,
+     +  13.3D0  ,13.8D0  ,14.4D0   /
+      DATA (AE(I, 1, 6),I=1,10)  / 
+     +  .000D+00,9.00D0  ,10.7D0  ,11.7D0  ,13.2D0  ,14.2D0  ,15.6D0  ,
+     +  16.5D0  ,17.3D0  ,18.0D0   /
+      DATA (AE(I, 1, 7),I=1,10)  / 
+     +  .000D+00,9.01D0  ,11.1D0  ,11.9D0  ,14.3D0  ,15.0D0  ,17.4D0  ,
+     +  18.0D0  ,18.6D0  ,18.8D0   /
+      DATA (AE(I, 1, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,11.2D0  ,12.4D0  ,14.5D0  ,15.7D0  ,17.6D0  ,
+     +  18.8D0  ,19.9D0  ,20.9D0   /
+      DATA (AE(I, 1, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,11.4D0  ,12.7D0  ,15.5D0  ,16.6D0  ,19.3D0  ,
+     +  20.2D0  ,21.1D0  ,21.7D0   /
+      DATA (AE(I, 1,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,13.2D0  ,15.8D0  ,17.3D0  ,19.9D0  ,
+     +  21.2D0  ,22.4D0  ,23.2D0   /
+      DATA (AE(I, 1,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,13.2D0  ,16.3D0  ,17.8D0  ,20.8D0  ,
+     +  22.1D0  ,23.3D0  ,24.2D0   /
+      DATA (AE(I, 1,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,13.4D0  ,16.2D0  ,18.2D0  ,21.0D0  ,
+     +  22.8D0  ,24.4D0  ,25.9D0   /
+      DATA (AE(I, 1,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,16.5D0  ,18.4D0  ,21.6D0  ,
+     +  23.2D0  ,24.8D0  ,26.2D0   /
+      DATA (AE(I, 1,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,16.7D0  ,19.0D0  ,22.3D0  ,
+     +  24.3D0  ,26.1D0  ,27.4D0   /
+      DATA (AE(I, 1,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,19.1D0  ,22.8D0  ,
+     +  24.7D0  ,26.6D0  ,28.2D0   /
+      DATA (AE(I, 1,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,19.2D0  ,23.0D0  ,
+     +  25.3D0  ,27.5D0  ,29.5D0   /
+      DATA (AE(I, 1,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,19.6D0  ,23.3D0  ,
+     +  25.6D0  ,27.8D0  ,29.6D0   /
+      DATA (AE(I, 1,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,23.6D0  ,
+     +  26.2D0  ,28.5D0  ,30.4D0   /
+      DATA (AE(I, 1,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,23.7D0  ,
+     +  26.3D0  ,28.8D0  ,31.0D0   /
+      DATA (AE(I, 1,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  26.5D0  ,29.2D0  ,31.5D0   /
+      DATA (AE(I, 2, 1),I=1,10)  / 
+     +  8.74D0  ,8.16D0  ,9.25D0  ,8.45D0  ,9.46D0  ,8.90D0  ,9.83D0  ,
+     +  9.38D0  ,8.96D0  ,8.15D0   /
+      DATA (AE(I, 2, 2),I=1,10)  / 
+     +  8.96D0  ,9.30D0  ,9.95D0  ,10.0D0  ,10.8D0  ,10.9D0  ,11.7D0  ,
+     +  11.8D0  ,11.9D0  ,11.8D0   /
+      DATA (AE(I, 2, 3),I=1,10)  / 
+     +  9.44D0  ,9.66D0  ,11.0D0  ,11.0D0  ,12.3D0  ,12.5D0  ,13.7D0  ,
+     +  13.9D0  ,14.0D0  ,13.8D0   /
+      DATA (AE(I, 2, 4),I=1,10)  / 
+     +  8.86D0  ,9.81D0  ,10.8D0  ,11.2D0  ,12.0D0  ,12.6D0  ,13.4D0  ,
+     +  14.0D0  ,14.5D0  ,15.1D0   /
+      DATA (AE(I, 2, 5),I=1,10)  / 
+     +  .000D+00,10.2D0  ,11.4D0  ,12.0D0  ,12.9D0  ,13.6D0  ,14.5D0  ,
+     +  15.1D0  ,15.7D0  ,16.3D0   /
+      DATA (AE(I, 2, 6),I=1,10)  / 
+     +  .000D+00,10.7D0  ,12.5D0  ,13.5D0  ,15.1D0  ,16.0D0  ,17.5D0  ,
+     +  18.3D0  ,19.2D0  ,19.9D0   /
+      DATA (AE(I, 2, 7),I=1,10)  / 
+     +  .000D+00,11.5D0  ,12.9D0  ,13.9D0  ,16.1D0  ,17.0D0  ,19.1D0  ,
+     +  19.8D0  ,20.6D0  ,21.0D0   /
+      DATA (AE(I, 2, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,12.4D0  ,13.8D0  ,15.9D0  ,17.2D0  ,19.1D0  ,
+     +  20.3D0  ,21.4D0  ,22.3D0   /
+      DATA (AE(I, 2, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,13.4D0  ,14.5D0  ,17.1D0  ,18.3D0  ,20.9D0  ,
+     +  21.9D0  ,23.0D0  ,23.7D0   /
+      DATA (AE(I, 2,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,14.9D0  ,17.5D0  ,19.1D0  ,21.6D0  ,
+     +  22.9D0  ,24.1D0  ,25.0D0   /
+      DATA (AE(I, 2,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,15.0D0  ,18.0D0  ,19.6D0  ,22.4D0  ,
+     +  23.8D0  ,25.2D0  ,26.2D0   /
+      DATA (AE(I, 2,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,16.2D0  ,17.3D0  ,19.4D0  ,22.2D0  ,
+     +  24.0D0  ,25.7D0  ,27.2D0   /
+      DATA (AE(I, 2,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,17.8D0  ,19.8D0  ,22.9D0  ,
+     +  24.6D0  ,26.2D0  ,27.7D0   /
+      DATA (AE(I, 2,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,19.1D0  ,20.4D0  ,23.7D0  ,
+     +  25.7D0  ,27.6D0  ,29.1D0   /
+      DATA (AE(I, 2,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,20.5D0  ,24.1D0  ,
+     +  26.1D0  ,28.1D0  ,29.9D0   /
+      DATA (AE(I, 2,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,20.9D0  ,23.9D0  ,
+     +  26.4D0  ,28.7D0  ,30.7D0   /
+      DATA (AE(I, 2,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,22.4D0  ,24.2D0  ,
+     +  26.7D0  ,29.0D0  ,30.9D0   /
+      DATA (AE(I, 2,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,24.8D0  ,
+     +  27.3D0  ,29.7D0  ,31.8D0   /
+      DATA (AE(I, 2,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,26.1D0  ,
+     +  27.3D0  ,29.9D0  ,32.3D0   /
+      DATA (AE(I, 2,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  27.4D0  ,30.1D0  ,32.6D0   /
+      DATA (AE(I, 3, 1),I=1,10)  / 
+     +  11.0D0  ,11.0D0  ,11.7D0  ,11.3D0  ,11.9D0  ,11.4D0  ,12.1D0  ,
+     +  11.7D0  ,11.5D0  ,11.0D0   /
+      DATA (AE(I, 3, 2),I=1,10)  / 
+     +  11.2D0  ,12.0D0  ,12.7D0  ,12.9D0  ,13.6D0  ,13.7D0  ,14.4D0  ,
+     +  14.6D0  ,14.7D0  ,14.6D0   /
+      DATA (AE(I, 3, 3),I=1,10)  / 
+     +  12.1D0  ,12.6D0  ,13.7D0  ,13.9D0  ,15.0D0  ,15.2D0  ,16.3D0  ,
+     +  16.5D0  ,16.7D0  ,16.7D0   /
+      DATA (AE(I, 3, 4),I=1,10)  / 
+     +  12.6D0  ,11.3D0  ,12.4D0  ,13.0D0  ,13.8D0  ,14.2D0  ,15.0D0  ,
+     +  15.6D0  ,16.1D0  ,16.6D0   /
+      DATA (AE(I, 3, 5),I=1,10)  / 
+     +  .000D+00,12.6D0  ,13.7D0  ,14.4D0  ,15.3D0  ,16.0D0  ,16.8D0  ,
+     +  17.5D0  ,18.1D0  ,18.6D0   /
+      DATA (AE(I, 3, 6),I=1,10)  / 
+     +  .000D+00,14.0D0  ,14.6D0  ,15.8D0  ,17.4D0  ,18.4D0  ,19.8D0  ,
+     +  20.6D0  ,21.5D0  ,22.2D0   /
+      DATA (AE(I, 3, 7),I=1,10)  / 
+     +  .000D+00,16.0D0  ,15.2D0  ,16.3D0  ,18.3D0  ,19.3D0  ,21.1D0  ,
+     +  22.0D0  ,22.8D0  ,23.5D0   /
+      DATA (AE(I, 3, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,15.6D0  ,15.1D0  ,17.2D0  ,18.6D0  ,20.6D0  ,
+     +  21.8D0  ,22.9D0  ,23.8D0   /
+      DATA (AE(I, 3, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,17.8D0  ,16.3D0  ,18.8D0  ,20.1D0  ,22.5D0  ,
+     +  23.6D0  ,24.7D0  ,25.6D0   /
+      DATA (AE(I, 3,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,17.5D0  ,19.0D0  ,20.7D0  ,23.1D0  ,
+     +  24.5D0  ,25.8D0  ,26.8D0   /
+      DATA (AE(I, 3,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,19.2D0  ,19.4D0  ,21.1D0  ,23.8D0  ,
+     +  25.4D0  ,26.8D0  ,28.0D0   /
+      DATA (AE(I, 3,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,20.7D0  ,19.6D0  ,19.7D0  ,22.4D0  ,
+     +  24.4D0  ,26.2D0  ,27.9D0   /
+      DATA (AE(I, 3,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,21.6D0  ,20.4D0  ,23.2D0  ,
+     +  25.1D0  ,26.9D0  ,28.5D0   /
+      DATA (AE(I, 3,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,23.5D0  ,22.0D0  ,23.8D0  ,
+     +  26.1D0  ,28.1D0  ,29.9D0   /
+      DATA (AE(I, 3,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,23.7D0  ,24.2D0  ,
+     +  26.3D0  ,28.5D0  ,30.4D0   /
+      DATA (AE(I, 3,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,25.4D0  ,24.8D0  ,
+     +  25.6D0  ,28.1D0  ,30.5D0   /
+      DATA (AE(I, 3,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,26.9D0  ,26.8D0  ,
+     +  26.1D0  ,28.4D0  ,30.8D0   /
+      DATA (AE(I, 3,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,28.8D0  ,
+     +  27.6D0  ,29.0D0  ,31.5D0   /
+      DATA (AE(I, 3,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,30.5D0  ,
+     +  29.2D0  ,28.9D0  ,31.5D0   /
+      DATA (AE(I, 3,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  31.0D0  ,30.0D0  ,31.7D0   /
+      DATA (AE(I, 4, 1),I=1,10)  / 
+     +  13.0D0  ,13.2D0  ,14.8D0  ,14.2D0  ,14.2D0  ,14.1D0  ,14.5D0  ,
+     +  14.4D0  ,14.3D0  ,14.0D0   /
+      DATA (AE(I, 4, 2),I=1,10)  / 
+     +  13.5D0  ,14.5D0  ,16.1D0  ,15.9D0  ,16.0D0  ,16.3D0  ,16.8D0  ,
+     +  17.0D0  ,17.1D0  ,17.2D0   /
+      DATA (AE(I, 4, 3),I=1,10)  / 
+     +  14.9D0  ,15.3D0  ,17.2D0  ,17.1D0  ,17.5D0  ,17.8D0  ,18.6D0  ,
+     +  18.9D0  ,19.1D0  ,19.3D0   /
+      DATA (AE(I, 4, 4),I=1,10)  / 
+     +  15.1D0  ,13.5D0  ,16.4D0  ,16.7D0  ,16.4D0  ,17.3D0  ,17.8D0  ,
+     +  18.5D0  ,19.0D0  ,19.6D0   /
+      DATA (AE(I, 4, 5),I=1,10)  / 
+     +  .000D+00,15.6D0  ,17.5D0  ,17.7D0  ,17.8D0  ,18.6D0  ,19.2D0  ,
+     +  19.9D0  ,20.3D0  ,21.1D0   /
+      DATA (AE(I, 4, 6),I=1,10)  / 
+     +  .000D+00,18.0D0  ,18.4D0  ,19.2D0  ,19.8D0  ,20.9D0  ,22.0D0  ,
+     +  23.1D0  ,23.6D0  ,24.7D0   /
+      DATA (AE(I, 4, 7),I=1,10)  / 
+     +  .000D+00,27.4D0  ,19.1D0  ,19.8D0  ,20.7D0  ,21.8D0  ,23.2D0  ,
+     +  24.4D0  ,24.9D0  ,25.9D0   /
+      DATA (AE(I, 4, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,18.9D0  ,18.9D0  ,19.3D0  ,21.1D0  ,22.5D0  ,
+     +  24.0D0  ,24.7D0  ,26.0D0   /
+      DATA (AE(I, 4, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,21.1D0  ,19.7D0  ,20.7D0  ,22.3D0  ,24.0D0  ,
+     +  25.6D0  ,26.3D0  ,27.7D0   /
+      DATA (AE(I, 4,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,21.0D0  ,21.1D0  ,22.9D0  ,24.6D0  ,
+     +  26.5D0  ,27.3D0  ,29.0D0   /
+      DATA (AE(I, 4,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,21.3D0  ,22.4D0  ,23.1D0  ,25.0D0  ,
+     +  27.1D0  ,27.9D0  ,29.8D0   /
+      DATA (AE(I, 4,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,36.6D0  ,21.5D0  ,22.2D0  ,23.1D0  ,
+     +  25.6D0  ,26.8D0  ,29.1D0   /
+      DATA (AE(I, 4,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,22.9D0  ,23.1D0  ,23.7D0  ,
+     +  26.2D0  ,27.3D0  ,29.6D0   /
+      DATA (AE(I, 4,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,30.5D0  ,23.6D0  ,25.0D0  ,
+     +  26.9D0  ,28.2D0  ,30.7D0   /
+      DATA (AE(I, 4,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,25.4D0  ,26.2D0  ,
+     +  27.2D0  ,28.3D0  ,31.0D0   /
+      DATA (AE(I, 4,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,24.5D0  ,25.9D0  ,
+     +  27.4D0  ,27.6D0  ,30.7D0   /
+      DATA (AE(I, 4,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,43.3D0  ,28.4D0  ,
+     +  27.5D0  ,27.9D0  ,30.9D0   /
+      DATA (AE(I, 4,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,27.2D0  ,
+     +  29.1D0  ,29.0D0  ,31.4D0   /
+      DATA (AE(I, 4,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,51.3D0  ,
+     +  30.6D0  ,29.5D0  ,31.4D0   /
+      DATA (AE(I, 4,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  28.8D0  ,30.6D0  ,32.4D0   /
+      DATA (AE(I, 5, 1),I=1,10)  / 
+     +  15.0D0  ,14.9D0  ,15.5D0  ,15.4D0  ,15.9D0  ,15.8D0  ,16.2D0  ,
+     +  16.2D0  ,16.1D0  ,15.9D0   /
+      DATA (AE(I, 5, 2),I=1,10)  / 
+     +  15.4D0  ,16.1D0  ,17.0D0  ,17.4D0  ,18.0D0  ,18.2D0  ,18.7D0  ,
+     +  18.9D0  ,19.0D0  ,19.1D0   /
+      DATA (AE(I, 5, 3),I=1,10)  / 
+     +  17.1D0  ,17.2D0  ,18.3D0  ,18.7D0  ,19.3D0  ,19.6D0  ,20.3D0  ,
+     +  20.6D0  ,20.8D0  ,20.9D0   /
+      DATA (AE(I, 5, 4),I=1,10)  / 
+     +  14.7D0  ,14.8D0  ,15.0D0  ,16.0D0  ,17.0D0  ,17.7D0  ,18.1D0  ,
+     +  19.0D0  ,19.4D0  ,20.0D0   /
+      DATA (AE(I, 5, 5),I=1,10)  / 
+     +  .000D+00,16.7D0  ,17.6D0  ,18.1D0  ,18.6D0  ,19.2D0  ,19.7D0  ,
+     +  20.4D0  ,20.8D0  ,21.2D0   /
+      DATA (AE(I, 5, 6),I=1,10)  / 
+     +  .000D+00,17.8D0  ,18.2D0  ,19.2D0  ,20.0D0  ,21.0D0  ,21.9D0  ,
+     +  23.0D0  ,23.6D0  ,24.3D0   /
+      DATA (AE(I, 5, 7),I=1,10)  / 
+     +  .000D+00,35.2D0  ,18.9D0  ,20.3D0  ,20.6D0  ,21.5D0  ,22.6D0  ,
+     +  23.7D0  ,24.2D0  ,24.7D0   /
+      DATA (AE(I, 5, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,16.4D0  ,18.9D0  ,18.8D0  ,19.6D0  ,20.7D0  ,
+     +  22.3D0  ,23.1D0  ,23.9D0   /
+      DATA (AE(I, 5, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,33.9D0  ,19.8D0  ,20.3D0  ,20.7D0  ,21.9D0  ,
+     +  23.4D0  ,24.1D0  ,24.8D0   /
+      DATA (AE(I, 5,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,18.0D0  ,20.0D0  ,21.4D0  ,22.0D0  ,
+     +  23.8D0  ,24.6D0  ,25.4D0   /
+      DATA (AE(I, 5,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,26.4D0  ,20.4D0  ,21.2D0  ,22.3D0  ,
+     +  23.8D0  ,24.7D0  ,25.5D0   /
+      DATA (AE(I, 5,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,41.7D0  ,18.2D0  ,19.8D0  ,21.1D0  ,
+     +  22.6D0  ,23.4D0  ,24.6D0   /
+      DATA (AE(I, 5,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,22.5D0  ,20.0D0  ,21.7D0  ,
+     +  22.8D0  ,23.7D0  ,24.7D0   /
+      DATA (AE(I, 5,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,54.1D0  ,19.9D0  ,21.9D0  ,
+     +  23.2D0  ,24.3D0  ,25.3D0   /
+      DATA (AE(I, 5,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,21.2D0  ,22.2D0  ,
+     +  23.6D0  ,24.9D0  ,25.5D0   /
+      DATA (AE(I, 5,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,44.9D0  ,21.9D0  ,
+     +  23.8D0  ,25.2D0  ,25.6D0   /
+      DATA (AE(I, 5,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,47.8D0  ,22.7D0  ,
+     +  23.8D0  ,24.9D0  ,26.3D0   /
+      DATA (AE(I, 5,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,35.5D0  ,
+     +  23.9D0  ,25.9D0  ,26.6D0   /
+      DATA (AE(I, 5,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,64.3D0  ,
+     +  24.1D0  ,25.7D0  ,27.1D0   /
+      DATA (AE(I, 5,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  34.0D0  ,25.7D0  ,27.7D0   /
+      DATA (AE(I, 6, 1),I=1,10)  / 
+     +  16.6D0  ,16.5D0  ,16.8D0  ,16.7D0  ,17.0D0  ,16.5D0  ,16.7D0  ,
+     +  18.3D0  ,18.9D0  ,19.0D0   /
+      DATA (AE(I, 6, 2),I=1,10)  / 
+     +  16.2D0  ,16.6D0  ,17.2D0  ,17.4D0  ,17.9D0  ,17.4D0  ,17.7D0  ,
+     +  20.7D0  ,22.0D0  ,22.6D0   /
+      DATA (AE(I, 6, 3),I=1,10)  / 
+     +  18.9D0  ,18.7D0  ,18.8D0  ,18.6D0  ,18.9D0  ,18.6D0  ,18.9D0  ,
+     +  21.0D0  ,22.3D0  ,22.9D0   /
+      DATA (AE(I, 6, 4),I=1,10)  / 
+     +  18.3D0  ,12.7D0  ,14.2D0  ,15.0D0  ,15.7D0  ,16.1D0  ,16.3D0  ,
+     +  16.5D0  ,17.9D0  ,19.0D0   /
+      DATA (AE(I, 6, 5),I=1,10)  / 
+     +  .000D+00,15.7D0  ,15.1D0  ,15.3D0  ,16.5D0  ,16.4D0  ,16.4D0  ,
+     +  17.0D0  ,18.3D0  ,19.4D0   /
+      DATA (AE(I, 6, 6),I=1,10)  / 
+     +  .000D+00,22.9D0  ,14.9D0  ,15.2D0  ,16.2D0  ,16.9D0  ,17.4D0  ,
+     +  18.2D0  ,19.5D0  ,21.1D0   /
+      DATA (AE(I, 6, 7),I=1,10)  / 
+     +  .000D+00,40.7D0  ,18.4D0  ,15.9D0  ,17.1D0  ,17.7D0  ,18.9D0  ,
+     +  19.5D0  ,20.3D0  ,21.1D0   /
+      DATA (AE(I, 6, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,23.3D0  ,16.2D0  ,16.3D0  ,17.3D0  ,18.7D0  ,
+     +  19.5D0  ,20.3D0  ,21.1D0   /
+      DATA (AE(I, 6, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,49.2D0  ,19.0D0  ,19.1D0  ,19.4D0  ,20.2D0  ,
+     +  20.8D0  ,21.6D0  ,22.0D0   /
+      DATA (AE(I, 6,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,27.2D0  ,21.2D0  ,20.8D0  ,21.4D0  ,
+     +  22.3D0  ,22.8D0  ,23.3D0   /
+      DATA (AE(I, 6,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,45.6D0  ,25.0D0  ,22.8D0  ,23.9D0  ,
+     +  23.6D0  ,24.3D0  ,24.4D0   /
+      DATA (AE(I, 6,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,45.8D0  ,29.7D0  ,25.1D0  ,25.3D0  ,
+     +  25.3D0  ,26.0D0  ,26.3D0   /
+      DATA (AE(I, 6,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,42.7D0  ,29.0D0  ,28.0D0  ,
+     +  27.0D0  ,27.2D0  ,27.6D0   /
+      DATA (AE(I, 6,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,62.0D0  ,32.0D0  ,30.0D0  ,
+     +  29.8D0  ,29.5D0  ,29.6D0   /
+      DATA (AE(I, 6,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,44.5D0  ,34.4D0  ,
+     +  32.7D0  ,31.5D0  ,31.8D0   /
+      DATA (AE(I, 6,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,75.6D0  ,37.1D0  ,
+     +  34.6D0  ,34.4D0  ,34.4D0   /
+      DATA (AE(I, 6,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,51.2D0  ,45.2D0  ,
+     +  39.0D0  ,37.5D0  ,36.4D0   /
+      DATA (AE(I, 6,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,74.9D0  ,
+     +  42.3D0  ,39.9D0  ,38.3D0   /
+      DATA (AE(I, 6,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,69.5D0  ,
+     +  50.7D0  ,42.3D0  ,41.4D0   /
+      DATA (AE(I, 6,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  66.3D0  ,48.0D0  ,43.4D0   /
+      DATA (AE(I, 7, 1),I=1,10)  / 
+     +  27.0D0  ,25.8D0  ,26.3D0  ,26.2D0  ,26.7D0  ,26.7D0  ,27.1D0  ,
+     +  27.1D0  ,27.2D0  ,19.0D0   /
+      DATA (AE(I, 7, 2),I=1,10)  / 
+     +  29.1D0  ,28.9D0  ,29.7D0  ,30.3D0  ,31.0D0  ,31.4D0  ,32.0D0  ,
+     +  32.3D0  ,32.7D0  ,22.6D0   /
+      DATA (AE(I, 7, 3),I=1,10)  / 
+     +  31.6D0  ,29.7D0  ,30.9D0  ,31.4D0  ,32.5D0  ,33.1D0  ,34.0D0  ,
+     +  34.6D0  ,35.1D0  ,22.9D0   /
+      DATA (AE(I, 7, 4),I=1,10)  / 
+     +  27.4D0  ,19.9D0  ,20.8D0  ,22.8D0  ,24.6D0  ,26.4D0  ,28.2D0  ,
+     +  29.6D0  ,30.8D0  ,19.0D0   /
+      DATA (AE(I, 7, 5),I=1,10)  / 
+     +  .000D+00,24.6D0  ,24.1D0  ,25.0D0  ,27.2D0  ,28.7D0  ,30.7D0  ,
+     +  31.8D0  ,32.9D0  ,19.4D0   /
+      DATA (AE(I, 7, 6),I=1,10)  / 
+     +  .000D+00,35.6D0  ,25.2D0  ,25.6D0  ,27.9D0  ,30.4D0  ,32.7D0  ,
+     +  34.6D0  ,36.3D0  ,21.1D0   /
+      DATA (AE(I, 7, 7),I=1,10)  / 
+     +  .000D+00,45.4D0  ,30.9D0  ,28.2D0  ,29.0D0  ,31.2D0  ,34.0D0  ,
+     +  35.8D0  ,37.4D0  ,21.1D0   /
+      DATA (AE(I, 7, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,38.2D0  ,29.6D0  ,29.4D0  ,30.3D0  ,33.2D0  ,
+     +  35.5D0  ,37.6D0  ,21.1D0   /
+      DATA (AE(I, 7, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,59.3D0  ,34.5D0  ,33.7D0  ,32.9D0  ,35.4D0  ,
+     +  37.6D0  ,39.6D0  ,22.0D0   /
+      DATA (AE(I, 7,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,44.5D0  ,37.8D0  ,37.5D0  ,37.2D0  ,
+     +  39.0D0  ,41.4D0  ,23.3D0   /
+      DATA (AE(I, 7,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,67.0D0  ,43.6D0  ,42.0D0  ,40.8D0  ,
+     +  41.4D0  ,43.0D0  ,24.4D0   /
+      DATA (AE(I, 7,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,49.9D0  ,50.9D0  ,44.6D0  ,43.9D0  ,
+     +  44.2D0  ,44.2D0  ,26.3D0   /
+      DATA (AE(I, 7,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,67.2D0  ,50.5D0  ,48.7D0  ,
+     +  48.1D0  ,47.2D0  ,27.6D0   /
+      DATA (AE(I, 7,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,68.1D0  ,55.2D0  ,52.3D0  ,
+     +  51.5D0  ,51.6D0  ,29.6D0   /
+      DATA (AE(I, 7,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,68.7D0  ,58.6D0  ,
+     +  56.5D0  ,55.7D0  ,31.8D0   /
+      DATA (AE(I, 7,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,89.3D0  ,62.9D0  ,
+     +  60.0D0  ,59.1D0  ,34.4D0   /
+      DATA (AE(I, 7,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,56.0D0  ,72.9D0  ,
+     +  66.3D0  ,64.2D0  ,36.4D0   /
+      DATA (AE(I, 7,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,105.D0  ,
+     +  71.3D0  ,68.3D0  ,38.3D0   /
+      DATA (AE(I, 7,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,73.4D0  ,
+     +  76.8D0  ,72.4D0  ,41.4D0   /
+      DATA (AE(I, 7,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  107.D0  ,79.9D0  ,43.4D0   /
+      DATA (AE(I, 8, 1),I=1,10)  / 
+     +  35.5D0  ,35.3D0  ,35.7D0  ,35.7D0  ,36.3D0  ,36.3D0  ,36.7D0  ,
+     +  36.7D0  ,36.7D0  ,19.0D0   /
+      DATA (AE(I, 8, 2),I=1,10)  / 
+     +  40.6D0  ,41.4D0  ,41.9D0  ,42.3D0  ,43.2D0  ,43.5D0  ,44.0D0  ,
+     +  44.3D0  ,44.5D0  ,22.6D0   /
+      DATA (AE(I, 8, 3),I=1,10)  / 
+     +  45.4D0  ,45.7D0  ,46.4D0  ,47.0D0  ,48.1D0  ,48.7D0  ,49.4D0  ,
+     +  49.8D0  ,50.2D0  ,22.9D0   /
+      DATA (AE(I, 8, 4),I=1,10)  / 
+     +  43.9D0  ,44.3D0  ,43.4D0  ,45.1D0  ,47.3D0  ,48.7D0  ,49.6D0  ,
+     +  50.5D0  ,51.3D0  ,19.0D0   /
+      DATA (AE(I, 8, 5),I=1,10)  / 
+     +  .000D+00,49.3D0  ,49.6D0  ,50.5D0  ,53.2D0  ,54.2D0  ,55.4D0  ,
+     +  56.1D0  ,56.8D0  ,19.4D0   /
+      DATA (AE(I, 8, 6),I=1,10)  / 
+     +  .000D+00,59.1D0  ,53.0D0  ,55.4D0  ,58.0D0  ,60.0D0  ,61.2D0  ,
+     +  62.5D0  ,63.6D0  ,21.1D0   /
+      DATA (AE(I, 8, 7),I=1,10)  / 
+     +  .000D+00,54.5D0  ,57.1D0  ,59.2D0  ,62.3D0  ,64.4D0  ,66.0D0  ,
+     +  67.3D0  ,68.5D0  ,21.1D0   /
+      DATA (AE(I, 8, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,65.9D0  ,62.1D0  ,65.1D0  ,67.6D0  ,69.4D0  ,
+     +  71.1D0  ,72.6D0  ,21.1D0   /
+      DATA (AE(I, 8, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,72.2D0  ,67.1D0  ,70.5D0  ,73.1D0  ,75.1D0  ,
+     +  76.8D0  ,78.4D0  ,22.0D0   /
+      DATA (AE(I, 8,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,80.1D0  ,75.0D0  ,78.0D0  ,80.0D0  ,
+     +  82.1D0  ,83.9D0  ,23.3D0   /
+      DATA (AE(I, 8,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,94.5D0  ,82.2D0  ,82.8D0  ,85.1D0  ,
+     +  87.3D0  ,89.2D0  ,24.4D0   /
+      DATA (AE(I, 8,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,56.8D0  ,92.5D0  ,87.2D0  ,89.4D0  ,
+     +  91.9D0  ,94.1D0  ,26.3D0   /
+      DATA (AE(I, 8,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,116.D0  ,96.2D0  ,94.4D0  ,
+     +  97.0D0  ,99.2D0  ,27.6D0   /
+      DATA (AE(I, 8,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,78.1D0  ,104.D0  ,102.D0  ,
+     +  102.D0  ,105.D0  ,29.6D0   /
+      DATA (AE(I, 8,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,128.D0  ,111.D0  ,
+     +  109.D0  ,110.D0  ,31.8D0   /
+      DATA (AE(I, 8,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,104.D0  ,118.D0  ,
+     +  117.D0  ,115.D0  ,34.4D0   /
+      DATA (AE(I, 8,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,64.4D0  ,138.D0  ,
+     +  124.D0  ,122.D0  ,36.4D0   /
+      DATA (AE(I, 8,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,133.D0  ,
+     +  133.D0  ,132.D0  ,38.3D0   /
+      DATA (AE(I, 8,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,83.6D0  ,
+     +  146.D0  ,139.D0  ,41.4D0   /
+      DATA (AE(I, 8,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  166.D0  ,147.D0  ,43.4D0   /
+      DATA (AE(I, 9, 1),I=1,10)  / 
+     +  43.3D0  ,43.2D0  ,43.6D0  ,43.8D0  ,44.1D0  ,44.3D0  ,44.7D0  ,
+     +  44.8D0  ,44.8D0  ,19.0D0   /
+      DATA (AE(I, 9, 2),I=1,10)  / 
+     +  50.9D0  ,51.4D0  ,52.0D0  ,52.6D0  ,53.1D0  ,53.6D0  ,54.2D0  ,
+     +  54.5D0  ,54.7D0  ,22.6D0   /
+      DATA (AE(I, 9, 3),I=1,10)  / 
+     +  58.0D0  ,58.4D0  ,59.3D0  ,60.1D0  ,60.7D0  ,61.5D0  ,62.3D0  ,
+     +  62.7D0  ,63.1D0  ,22.9D0   /
+      DATA (AE(I, 9, 4),I=1,10)  / 
+     +  62.0D0  ,63.9D0  ,63.7D0  ,65.7D0  ,65.5D0  ,67.5D0  ,68.2D0  ,
+     +  68.9D0  ,69.7D0  ,19.0D0   /
+      DATA (AE(I, 9, 5),I=1,10)  / 
+     +  .000D+00,72.2D0  ,72.5D0  ,74.2D0  ,74.2D0  ,76.1D0  ,77.0D0  ,
+     +  77.8D0  ,78.6D0  ,19.4D0   /
+      DATA (AE(I, 9, 6),I=1,10)  / 
+     +  .000D+00,80.4D0  ,80.5D0  ,83.1D0  ,83.0D0  ,85.5D0  ,86.8D0  ,
+     +  88.1D0  ,89.2D0  ,21.1D0   /
+      DATA (AE(I, 9, 7),I=1,10)  / 
+     +  .000D+00,63.4D0  ,88.5D0  ,91.3D0  ,91.1D0  ,94.0D0  ,95.8D0  ,
+     +  97.3D0  ,98.6D0  ,21.1D0   /
+      DATA (AE(I, 9, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,98.8D0  ,98.6D0  ,97.8D0  ,102.D0  ,104.D0  ,
+     +  106.D0  ,108.D0  ,21.1D0   /
+      DATA (AE(I, 9, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,84.1D0  ,107.D0  ,107.D0  ,111.D0  ,113.D0  ,
+     +  116.D0  ,117.D0  ,22.0D0   /
+      DATA (AE(I, 9,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,116.D0  ,115.D0  ,119.D0  ,122.D0  ,
+     +  125.D0  ,127.D0  ,23.3D0   /
+      DATA (AE(I, 9,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,111.D0  ,123.D0  ,127.D0  ,131.D0  ,
+     +  134.D0  ,137.D0  ,24.4D0   /
+      DATA (AE(I, 9,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,65.6D0  ,136.D0  ,135.D0  ,140.D0  ,
+     +  143.D0  ,146.D0  ,26.3D0   /
+      DATA (AE(I, 9,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,146.D0  ,144.D0  ,149.D0  ,
+     +  152.D0  ,155.D0  ,27.6D0   /
+      DATA (AE(I, 9,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,88.7D0  ,152.D0  ,158.D0  ,
+     +  162.D0  ,165.D0  ,29.6D0   /
+      DATA (AE(I, 9,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,181.D0  ,167.D0  ,
+     +  171.D0  ,174.D0  ,31.8D0   /
+      DATA (AE(I, 9,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,117.D0  ,174.D0  ,
+     +  180.D0  ,183.D0  ,34.4D0   /
+      DATA (AE(I, 9,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,72.0D0  ,201.D0  ,
+     +  189.D0  ,192.D0  ,36.4D0   /
+      DATA (AE(I, 9,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,151.D0  ,
+     +  198.D0  ,201.D0  ,38.3D0   /
+      DATA (AE(I, 9,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,95.2D0  ,
+     +  220.D0  ,210.D0  ,41.4D0   /
+      DATA (AE(I, 9,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  192.D0  ,217.D0  ,43.4D0   /
+      DATA (AE(I,10, 1),I=1,10)  / 
+     +  62.1D0  ,62.1D0  ,62.6D0  ,62.9D0  ,63.3D0  ,63.3D0  ,64.0D0  ,
+     +  64.0D0  ,64.0D0  ,19.0D0   /
+      DATA (AE(I,10, 2),I=1,10)  / 
+     +  75.1D0  ,75.4D0  ,76.3D0  ,76.8D0  ,77.6D0  ,77.9D0  ,78.8D0  ,
+     +  79.0D0  ,79.3D0  ,22.6D0   /
+      DATA (AE(I,10, 3),I=1,10)  / 
+     +  87.5D0  ,88.3D0  ,89.4D0  ,90.2D0  ,91.3D0  ,91.9D0  ,93.0D0  ,
+     +  93.5D0  ,93.9D0  ,22.9D0   /
+      DATA (AE(I,10, 4),I=1,10)  / 
+     +  104.D0  ,104.D0  ,105.D0  ,106.D0  ,107.D0  ,108.D0  ,109.D0  ,
+     +  110.D0  ,110.D0  ,19.0D0   /
+      DATA (AE(I,10, 5),I=1,10)  / 
+     +  .000D+00,122.D0  ,122.D0  ,123.D0  ,124.D0  ,125.D0  ,126.D0  ,
+     +  127.D0  ,128.D0  ,19.4D0   /
+      DATA (AE(I,10, 6),I=1,10)  / 
+     +  .000D+00,138.D0  ,139.D0  ,140.D0  ,142.D0  ,143.D0  ,144.D0  ,
+     +  146.D0  ,147.D0  ,21.1D0   /
+      DATA (AE(I,10, 7),I=1,10)  / 
+     +  .000D+00,85.3D0  ,158.D0  ,159.D0  ,161.D0  ,162.D0  ,164.D0  ,
+     +  166.D0  ,167.D0  ,21.1D0   /
+      DATA (AE(I,10, 8),I=1,10)  / 
+     +  .000D+00,.000D+00,176.D0  ,177.D0  ,179.D0  ,181.D0  ,183.D0  ,
+     +  184.D0  ,186.D0  ,21.1D0   /
+      DATA (AE(I,10, 9),I=1,10)  / 
+     +  .000D+00,.000D+00,114.D0  ,199.D0  ,201.D0  ,202.D0  ,205.D0  ,
+     +  206.D0  ,207.D0  ,22.0D0   /
+      DATA (AE(I,10,10),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,218.D0  ,219.D0  ,220.D0  ,224.D0  ,
+     +  225.D0  ,226.D0  ,23.3D0   /
+      DATA (AE(I,10,11),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,150.D0  ,238.D0  ,238.D0  ,243.D0  ,
+     +  244.D0  ,245.D0  ,24.4D0   /
+      DATA (AE(I,10,12),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,85.8D0  ,255.D0  ,255.D0  ,261.D0  ,
+     +  262.D0  ,263.D0  ,26.3D0   /
+      DATA (AE(I,10,13),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,195.D0  ,272.D0  ,279.D0  ,
+     +  279.D0  ,280.D0  ,27.6D0   /
+      DATA (AE(I,10,14),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,115.D0  ,290.D0  ,296.D0  ,
+     +  297.D0  ,298.D0  ,29.6D0   /
+      DATA (AE(I,10,15),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,263.D0  ,313.D0  ,
+     +  314.D0  ,315.D0  ,31.8D0   /
+      DATA (AE(I,10,16),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,150.D0  ,330.D0  ,
+     +  331.D0  ,332.D0  ,34.4D0   /
+      DATA (AE(I,10,17),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,90.0D0  ,319.D0  ,
+     +  349.D0  ,349.D0  ,36.4D0   /
+      DATA (AE(I,10,18),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,196.D0  ,
+     +  366.D0  ,367.D0  ,38.3D0   /
+      DATA (AE(I,10,19),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,122.D0  ,
+     +  387.D0  ,384.D0  ,41.4D0   /
+      DATA (AE(I,10,20),I=1,10)  / 
+     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
+     +  247.D0  ,401.D0  ,43.4D0     /
+      DATA (ERES(I, 1),I=1,10)  / 10*0.D0/
+      DATA (ERES(I, 2),I=1,10)  / 10*0.D0/
+      DATA (ERES(I, 3),I=1,10)  / 10*0.D0/
+      DATA (ERES(I, 4),I=1,10)  / 10*0.D0/
+      DATA (ERES(I, 5),I=1,10)  / 10*0.D0/
+      DATA (ERES(I, 6),I=1,10)  / 
+     +    0.000D0, 0.000D0, 0.000D0, 0.000D0, 0.000D0, 0.000D0, 0.000D0,
+     +    2.780D0, 2.880D0, 2.890D0 /
+      DATA (ERES(I, 7),I=1,10)  / 
+     +    1.500D0, 2.460D0, 2.510D0, 2.610D0, 2.700D0, 2.920D0, 3.070D0,
+     +    3.200D0, 3.330D0, 2.890D0 /
+      DATA (ERES(I, 8),I=1,10)  / 
+     +    4.470D0, 4.350D0, 4.390D0, 4.550D0, 4.660D0, 4.890D0, 4.980D0,
+     +    5.100D0, 5.220D0, 2.890D0 /
+      DATA (ERES(I, 9),I=1,10)  / 
+     +    7.480D0, 7.380D0, 7.370D0, 7.480D0, 7.510D0, 7.630D0, 7.660D0,
+     +    7.750D0, 7.820D0, 2.890D0 /
+      DATA (ERES(I,10),I=1,10)  / 
+     +   15.270D0,15.190D0,15.200D0,15.370D0,15.380D0,15.430D0,15.540D0,
+     +   15.590D0,15.630D0, 2.890D0 /
+      END
+C->
+C=======================================================================
+
+      SUBROUTINE FRAGM (IAT,IAP, NW,B, NF, IAF)
+
+C-----------------------------------------------------------------------
+C...Nuclear Fragmentation, Abrasion-ablation model, 
+C...Based on Jon Engel's routines ABRABL 
+C...This most recent version adds for all prefragment
+C...masses > 10 the model calculation for the fragment
+C...mass distribution and the energy carried by the fragment
+C...of W. Friedmann
+C...The average values are used to implement the model
+C...in the montecarlo fashion / TSS, Dec '91
+C.
+C.  INPUT: IAP = mass of incident nucleus
+C.         IAT = mass of target   nucleus
+C.         NW = number of wounded nucleons in the beam nucleus
+C.         B  = impact parameter in the interaction
+C.     
+C.  OUTPUT : NF = number of fragments  of the spectator nucleus
+C.           IAF(1:NF) = mass number of each fragment
+C.           PF(3,60) in common block /FRAGMENTS/ contains
+C.           the three momentum components (MeV/c) of each
+C.           fragment in the projectile frame
+C..............................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON /FRAGMENTS/ PPP(3,60)
+      COMMON /FRAGMOD/A(10,10,20),AE(10,10,20),ERES(10,10),NFLAGG(10,10)
+      DIMENSION IAF(60)
+      DIMENSION AA(10), EAA(10) 
+      SAVE
+      EXTERNAL GASDEV
+      DATA AA/10.D0,15.D0,20.D0,25.D0,30.D0,35.D0,40.D0,45.D0,50.D0,
+     $        56.D0/
+      DATA EAA/1.D0,2.D0,4.D0,6.D0,8.D0,10.D0,12.D0,16.D0,20.D0,30.D0/
+
+      AP=IAP
+      AT=IAT
+      NPF = IAP - NW
+      IF (NPF .EQ. 0) THEN
+         NF = 0
+         RETURN
+      ENDIF
+
+      EB = ESTAR(AP,AT, B)
+      EBP = ESTARP (NPF, NW)
+C CONTRIBUTION TO E* FROM ENERGY DEPOSITED BY SECONDARIES
+      EB = EB + EBP
+C TOTAL E* IS THE SUM OF THE TWO COMPONENTS
+
+C.....Prefragment transverse momentum (MeV/nucleon)...
+            FK = FERMK(AP)
+C FERMI MOMENTUM OF THE PROJECTILE NUCLEUS
+            IF (NW .LT. IAP) THEN
+            SIG = FK*DSQRT(NW*NPF/(AP-1.D0))/3.162D0
+C GAUSSIAN SIGMA IN ALL THREE DIRECTION
+            ELSE
+            SIG = FK/3.162D0
+C THIS IS NOT CORRECT, TOO LARGE !!!!!!!!!!!!!!
+            ENDIF
+             PPFX = SIG*GASDEV(0)/NPF
+             PPFY = SIG*GASDEV(1)/NPF
+C THREE MOMENTUM COMPONENTS PER NUCLEON FOR THE PREFRAGMENT
+
+C.............Crude model for small prefragment mass .......
+            IF (NPF .LT. 10) THEN
+                 CALL EVAP(NPF, EB, EPS, NNUC, NALP)
+C   EPS IS THE KINETIC ENERGY CARRIED BY THE EVAPORATED NUCLEONS
+               ETOT = 938.D0 + EPS
+                 PP = SQRT((ETOT*ETOT - 8.79844D5)/3.D0)
+C   AVERAGE MOMENTUM OF EVAPORATED NUCLEONS IN EACH DIRECTION
+                 NUC = NPF - NNUC - 4*NALP
+                 NF = 0
+                 IF (NUC .GT. 0) THEN
+                    NF = NF + 1
+                    IAF(NF) = NUC
+                    PPP(1,NF) = NUC*PPFX
+                    PPP(2,NF) = NUC*PPFY
+                 ENDIF
+                 IF (NALP .NE. 0) THEN
+                 DO I=1,NALP
+                   NF = NF + 1
+                    IAF(NF) = 4
+                   CALL SINCO(S1,C1)
+                   CALL SINCO(S2,C2)
+                   PXE = 4.D0*PP*S1*S2
+                   PYE = 4.D0*PP*S1*C2
+                   PPP(1,NF) = 4.D0*PPFX + PXE
+                   PPP(2,NF) = 4.D0*PPFY + PYE
+                   PPP(1,1) = PPP(1,1) - PXE
+                   PPP(2,1) = PPP(2,1) - PYE
+                 ENDDO
+                 ENDIF
+                 IF (NNUC .NE. 0) THEN
+                 DO I=1,NNUC
+                    NF = NF + 1
+                    IAF(NF) = 1
+                    CALL SINCO(S1,C1)
+                    CALL SINCO(S2,C2)
+                    PXE = PP*S1*S2
+                    PYE = PP*S1*C2
+                    PPP(1,NF) = 4.D0*PPFX + PXE
+                    PPP(2,NF) = 4.D0*PPFY + PYE
+                    PPP(1,1) = PPP(1,1) - PXE
+                    PPP(2,1) = PPP(2,1) - PYE
+                 ENDDO
+                 ENDIF
+                 RETURN
+            ENDIF
+
+C.........More refined model calculation .............
+      JA = NPF/5 -1
+      IF (JA .LT. 10) THEN
+      IF ((NPF - AA(JA)) .GT. (AA(JA+1)-NPF)) JA = JA + 1
+      ENDIF
+      ARAT = DBLE(NPF)/AA(JA)
+      DO J=1,10
+      IF (EB .LT. EAA(J)) GO TO 29
+      ENDDO
+      JE = 10
+      GO TO 39
+   29      JE = J
+   39      IF (JE .GT. 1 .AND. JE .NE. 10) THEN
+      IF ((EB - EAA(J-1)) .LT. (EAA(J)-EB)) JE = J - 1
+      ENDIF
+      ERAT = EB/EAA(JE)
+        IF (EB .LT. 1.D0) THEN
+        ERAT = EB
+        ENDIF
+C INTERPOLATE BETWEEN EB=0. (NOTHING HAPPENS) AND EB = 1. MeV
+         IF (JA .EQ. 10 .AND. JE .GT. 6) THEN
+            WRITE(*,*)' JA=',JA,',   JE=',JE
+         ENDIF
+   43    ESUM = 0.D0
+      NSUM = 0
+      JF = 0
+      DO J=20,1,-1
+        FR =  A(JA, JE, J)*ARAT*ERAT
+        N1 = INT(1.D0 + FR)
+        FR1 = FR/DBLE(N1)
+        DO K=1, N1
+          IF (S_RNDM(0) .LT. FR1) THEN
+            JF = JF + 1
+            IAF(JF) = J
+            NSUM = NSUM + J
+            EKIN = ERAT*AE(JA,JE, J)
+            IF (EKIN .GT. 0.D0) THEN
+              ESUM = ESUM + EKIN
+              ETOT = 938.D0*IAF(JF) + EKIN
+              PP = DSQRT(2.D0*(ETOT*ETOT - IAF(JF)**2*8.79844D5)/3.D0)
+              CALL SINCO(S1,C1)
+              CALL SINCO(S2,C2)
+              PPP(1,JF) = PP*S1*S2 + IAF(JF)*PPFX
+              PPP(2,JF) = PP*S1*C2 + IAF(JF)*PPFY
+            ENDIF
+            IF (NSUM .GT. NPF) THEN
+C           WRITE(*,*)' WARNING, NSUM=', NSUM,',  NPF=',NPF
+C           WRITE(*,*)'  ARAT =', ARAT
+              GO TO 43
+            ELSE
+              IF (NSUM .EQ. NPF) THEN
+                GO TO 44
+              ENDIF
+            ENDIF
+          ENDIF
+        ENDDO
+      ENDDO
+      IF (NFLAGG(JA,JE) .EQ. 0) THEN
+C 'THE RESIDUE' IS A NUCLEAR FRAGMENT
+        JF = JF + 1
+        IAF(JF) = NPF - NSUM
+        F1 = NPF*EB - ESUM
+        IF (F1 .LT. 0.D0) F1 = 0.D0
+C GIVE THE REST OF EB TO THE FRAGMENT
+        EKIN = F1
+        IF (EKIN .GT. 0.D0) THEN
+          ETOT = 938.D0*IAF(JF) + EKIN
+          PP = DSQRT(2.D0*(ETOT*ETOT - IAF(JF)**2*8.79844D5)/3.D0)
+          CALL SINCO(S1,C1)
+          CALL SINCO(S2,C2)
+          PPP(1,JF) = PP*S1*S2 + IAF(JF)*PPFX
+          PPP(2,JF) = PP*S1*C2 + IAF(JF)*PPFY
+        ENDIF
+      ELSE
+C 'THE RESIDUE' CONSISTS OF SPECTATOR NUCLEONS
+        N1 = NPF - NSUM
+        DO K=1,N1
+          JF = JF + 1
+          IAF(JF) = 1
+          EKIN = ERAT*ERES(JA,JE)
+          IF (EKIN .GT. 0.D0) THEN
+            ETOT = 938.D0*IAF(JF) + EKIN
+            PP = DSQRT(2.D0*(ETOT*ETOT - IAF(JF)**2*8.79844D5)/3.D0)
+            CALL SINCO(S1,C1)
+            CALL SINCO(S2,C2)
+            PPP(1,JF) = PP*S1*S2 + PPFX
+            PPP(2,JF) = PP*S1*C2 + PPFY
+          ENDIF
+        ENDDO
+      ENDIF
+  44  NF = JF
+      RETURN
+      END
+C->
+C=======================================================================
+
+      FUNCTION ESTARP (NPF, NW)
+
+C-----------------------------------------------------------------------
+C CONTRIBUTION TO E* FROM ENERGY DEPOSITED BY SECONDARIES
+C VERY NAIVE VERSION INCORPORATING HUEFFNER'S IDEAS
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+      APF = NPF
+      F1 = 15.3D0/APF**0.666666666D0
+C AVERAGE KINETIC ENERGY/NUCLEON IN PREFRAGMENT (MeV)
+C PER PATHLENGTH EQUAL TO THE PREFRAGMENT RADIUS
+      ESTARP = 0.D0
+      DO I=1,NW
+        IF (S_RNDM(0) .GT. 0.5D0) THEN
+          F2 = F1*RDIS(0)
+          ESTARP = ESTARP + F2
+        ENDIF
+      ENDDO
+C SAMPLE RANDOMLY PER WOUNDED NUCLEON, x NW
+      RETURN
+      END
+C=======================================================================
+      
+      FUNCTION RDIS(Idum)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      dimension probr(20)
+      SAVE
+      data probr/
+     *      0.10000D0, 0.15748D0, 0.21778D0, 0.28605D0, 0.36060D0,
+     *      0.43815D0, 0.51892D0, 0.60631D0, 0.70002D0, 0.79325D0,
+     *      0.88863D0, 0.98686D0, 1.10129D0, 1.21202D0, 1.32932D0,
+     *      1.44890D0, 1.57048D0, 1.70139D0, 1.83417D0, 2.00000D0/
+
+      rdis = idum
+      nr = INT(20.D0*S_RNDM(0) + 1.D0)
+      if (nr .eq. 1) then
+        f1 = 0.D0
+      else
+        f1 = probr(nr-1)
+      endif
+      dr = probr(nr) - f1
+      rdis = f1 + dr*S_RNDM(1)
+      return
+      end
+
+C=======================================================================
+
+      FUNCTION ESTAR(ap,at,b)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+
+      SAVE
+
+c      real*4 ap,at,b,estar
+      sigma=4.5D0  !total n-n cross section in fm**2
+      rt=.82d0*at**.33333333D0 !target radius
+      rp=.82d0*ap**.33333333D0 !projectile radius
+      alpha=rt**2/rp**2
+      beta=b**2/rt**2
+      f=at*sigma/(PI*rt**2)
+      alf = log(f)
+      alalf = log(alpha)
+      gfac=0.d0
+      gfac1=0.d0
+      s1=0.D0
+      s2=0.D0
+      s3=0.D0
+      ii=1
+      do n=0,10 ! This limit may not need to be so high.
+         if(n.ge.2) then
+            gfac1=gfac
+            gfac=gfac+log(float(n)) 
+         endif
+         g0=n*alf -n*beta*alpha/(n+alpha)+alalf
+         g1=g0-log(alpha+n)-gfac
+         g2=(n+2)*log(f)-(n+2)*beta*alpha/(n+2+alpha) 
+     >      +log(n+2+alpha+beta*alpha**2)-3.d0*log(n+2.d0+alpha)-gfac
+         g3=g0-2.d0*log(n+alpha)-gfac1
+         ii=-ii
+         s1=s1+ii*exp(g1)
+         s2=s2+ii*exp(g2)
+         if(n.ge.1) s3=s3+ii*exp(g3)
+      enddo
+
+      pb=s1
+      e1b=197.D0**2/(2.D0*938.d0*rp**2*pb) *s2
+c      a=b*(s3/pb-1)
+c      a=-b*s3/pb
+c      e2b=-.5* 938. * (41./(ap**.333))**2 * a**2 /(197.**2)
+c      estar=e1b+e2b
+      estar = e1b
+      return
+      end
+C=======================================================================
+
+      SUBROUTINE EVAP(npf,eb,eps,nnuc,nalp)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+      eps=7.5D0+sqrt(8.D0*eb)
+      n=min(npf*int(eb/eps),npf)
+      nalp=n/5
+      nnuc=n-4*nalp
+      return
+      end
+C->
+C=======================================================================
+
+      FUNCTION FERMK(A)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION AA(6), FK(6)
+      SAVE
+      DATA AA/4.D0, 6.D0, 12.D0, 24.D0, 40.D0, 57.D0/
+      DATA FK/130.D0,169.D0,221.D0,235.D0,251.D0,260.D0/
+
+      DO I=2,4
+      IF (A .LT. AA(I)) GO TO 25
+      ENDDO
+      I = 5
+   25      F11 = AA(I-1)
+      F12 = AA(I)
+      F13 = AA(I+1)
+      F21 = FK(I-1)
+      F22 = FK(I)
+      F23 = FK(I+1)
+      FERMK = QUAD_INT(A,F11,F12,F13, F21,F22,F23)
+      RETURN
+      END
+
+C*=======================================================================
+C. Multiple interaction structure
+C========================================================================
+
+      SUBROUTINE INT_NUC (IA, IB, SIG0, SIGEL) 
+
+C-----------------------------------------------------------------------
+C...Compute with a montecarlo code  the  "multiple interaction structure"
+C.  of a nucleus-nucleus interaction
+C.
+C.  INPUT : IA            = mass of target nucleus
+C.          IB            = mass of projectile nucleus
+C.          SIG0 (mbarn)  = inelastic pp cross section
+C.          SIGEL(mbarn)  = elastic pp cross section
+C.
+C.  OUTPUT : in common block /CNUCMS/
+C.           B = impact parameter (fm)
+C.           BMAX = maximum impact parameter for generation
+C.           NTRY = number of "trials" before one interaction
+C.           NA = number of wounded nucleons in A
+C.           NB =    "        "        "     in B
+C.           NI = number of nucleon-nucleon inelastic interactions 
+C.           NAEL = number of elastically scattered nucleons in  A 
+C.           NBEL =    "         "           "          "    in  B
+C.           JJA(J)  [J=1:IA]   = number of inelastic interactions 
+C.                                of J-th nucleon of nucleus A
+C.           JJB(J)  [J=1:IB]   = number of inelastic interactions 
+C.                                of J-th nucleon of nucleus B
+C.           JJAEL(J)  [J=1:IA]   = number of elastic interactions 
+C.                                of J-th nucleon of nucleus A
+C.           JJBEL(J)  [J=1:IB]   = number of elastic interactions 
+C.                                of J-th nucleon of nucleus B
+C.           JJINT(J,K)  [J=1:NB, K=1:NA]  (0 = no interaction) 
+C.                                         (1 = interaction )
+C.                                         between nucleon J of A and K of B
+C-----------------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      PARAMETER (IAMAX=56)
+      COMMON /CNUCMS/ B, BMAX, NTRY, NA, NB, NI, NAEL, NBEL
+     +         ,JJA(IAMAX), JJB(IAMAX), JJINT(IAMAX,IAMAX)
+     +         ,JJAEL(IAMAX), JJBEL(IAMAX)
+      DIMENSION XA(IAMAX), YA(IAMAX), XB(IAMAX), YB(IAMAX)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      SIGT = SIG0 + SIGEL
+      R2  = 0.1D0 * SIG0/PI
+      R2T = 0.1D0 * SIGT/PI
+      BMAX = 15.D0                             ! fm
+      NTRY = 0
+      CALL NUC_CONF (IA, XA, YA)
+      CALL NUC_CONF (IB, XB, YB)
+      NI = 0
+      NIEL = 0
+      DO JA=1,IA
+         JJA(JA) = 0
+         JJAEL(JA) = 0
+      ENDDO
+      DO JB=1,IB
+         JJB(JB) = 0
+         JJBEL(JB) = 0
+         DO JA=1,IA
+            JJINT(JB,JA) = 0
+         ENDDO
+      ENDDO
+1000  B = BMAX*SQRT(S_RNDM(0))
+      PHI = TWOPI*S_RNDM(1)
+      BX = B*COS(PHI)
+      BY = B*SIN(PHI)
+      NTRY = NTRY+1
+      DO JA=1,IA
+         DO JB=1,IB
+            S = (XA(JA)-XB(JB)-BX)**2 + (YA(JA)-YB(JB)-BY)**2
+            IF (S .LT. R2)  THEN
+               NI = NI + 1
+               JJA(JA) = JJA(JA)+1
+               JJB(JB) = JJB(JB)+1
+               JJINT(JB,JA) = 1
+            ELSE IF (S .LT. R2T)  THEN
+               NIEL = NIEL + 1
+               JJAEL(JA) = JJAEL(JA)+1
+               JJBEL(JB) = JJBEL(JB)+1
+            ENDIF
+         ENDDO
+      ENDDO
+      IF (NI + NIEL .EQ. 0)  GOTO 1000
+      NA = 0
+      NB = 0
+      NAEL = 0
+      NBEL = 0
+      DO JA=1,IA
+         IF (JJA(JA) .GT. 0)  THEN
+            NA = NA + 1
+         ELSE
+            IF (JJAEL(JA) .GT. 0)  NAEL = NAEL+1
+         ENDIF
+      ENDDO
+      DO JB=1,IB
+         IF (JJB(JB) .GT. 0)  THEN
+            NB = NB + 1
+         ELSE
+            IF (JJBEL(JB) .GT. 0)  NBEL = NBEL+1
+         ENDIF
+      ENDDO
+      RETURN
+      END
+C=======================================================================
+
+       SUBROUTINE NUC_CONF (IA, XX, YY)
+
+C-----------------------------------------------------------------------
+C...This routine generates the configuration  of a nucleus 
+C.  need an initialization call to NUC_GEOM_INI
+C.
+C.  INPUT  : IA = mass number of the nucleus
+C.  OUTPUT : XX(1:IA), YY(1:IA) (fm) = position in impact parameter
+C.                                     space of the IA nucleons
+C...................................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      PARAMETER (IAMAX=56)
+      DIMENSION XX(IAMAX), YY(IAMAX)
+      PARAMETER (NB=401)
+      COMMON /CPROFA/ ZMIN, DZ, BBZ(NB,IAMAX)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      DO J=1,IA
+         Z = S_RNDM(J)
+         JZ = INT((Z-ZMIN)/DZ)+1
+         JZ = MIN(JZ,400)
+         T = (Z-ZMIN)/DZ - DBLE(JZ-1)
+         B = BBZ(JZ,IA)*(1.D0-T) + BBZ(JZ+1,IA)*T
+         PHI = TWOPI*S_RNDM(J+1)
+         XX(J) = B*COS(PHI)
+         YY(J) = B*SIN(PHI)
+      ENDDO
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE NUC_GEOM_INI
+
+C-----------------------------------------------------------------------
+C...Initialize all nucleus profiles
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      PARAMETER (NB=401)
+      PARAMETER (IAMAX=56)
+      COMMON /CPROF/ DB, BMAX, BB(NB), TB(NB), A
+      COMMON /CPROFA/ ZMIN, DZ, BBZ(NB,IAMAX)
+      DIMENSION FFB(NB), GGB(NB)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      CALL SHELL_INI
+      CALL WOOD_SAXON_INI
+      DO IA= 2,IAMAX
+           JA = IA
+         CALL NUC_PROFIL(JA)
+         DO K=1,NB
+           FFB(K) = BB(K)*TB(K) * TWOPI
+         ENDDO            
+         GGB(1) = 0.D0
+         GGB(NB) = 1.D0
+         DO K=2,NB-1
+           GGB(K) = GGB(K-1) + FFB(K-1)*DB
+         ENDDO            
+         CALL INVERT_ARRAY(GGB,0.D0,DB,NB, BBZ(1,IA), ZMIN, DZ)
+      ENDDO
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE NUC_PROFIL (JA)
+
+C-----------------------------------------------------------------------
+C...Compute the profile function T(b)
+C.  normalised as INT[d2b T(b) = 1]
+C.  INPUT : JA = integer mass number of nucleus
+C...............................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      PARAMETER (NB=401)
+      EXTERNAL DENSA
+      DOUBLE PRECISION DENSA
+      COMMON /CC01/  B
+      COMMON /CCDA/ JJA
+      COMMON /CPROF/ DB, BMAX, BB(NB), TB(NB), A
+      SAVE
+
+      BMAX = 7.5D0
+      DB = BMAX/DBLE(NB-1)
+      JJA = JA
+      A = JA
+      DO JB=1,NB
+        B = DB*DBLE(JB-1)
+        BB(JB) = B
+        IF (JA .LE. 18)  THEN
+            TB(JB) = PROFNUC (B, JA)
+         ELSE
+            TB(JB) = 2.D0*GAUSS (DENSA,0.D0,BMAX)
+         ENDIF
+      ENDDO
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE NUC1_PROFIL (AA)
+
+C-----------------------------------------------------------------------
+C...Compute the profile function T(b)
+C.  normalised as INT[d2b T(b) = 1]
+C.  INPUT : AA = mass number of nucleus
+C...............................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      PARAMETER (NB=401)
+      EXTERNAL DENSA
+      DOUBLE PRECISION DENSA
+      COMMON /CC01/  B
+      COMMON /CPROF/ DB, BMAX, BB(NB), TB(NB), A
+      SAVE
+
+      A = AA
+      IA1 = INT(AA)
+      IA2 = IA1 + 1
+      U = AA - DBLE(IA1)
+      BMAX = 7.5D0
+      DB = BMAX/DBLE(NB-1)
+      DO JB=1,NB
+         B = DB*DBLE(JB-1)
+         BB(JB) = B
+         IF (A .LE. 18.D0)  THEN
+             T1 = PROFNUC (B, IA1)
+             T2 = PROFNUC (B, IA2)
+          ELSE
+             JJA = IA1
+             T1 = 2.D0*GAUSS (DENSA,0.D0,BMAX)
+             JJA = IA2
+             T2 = 2.D0*GAUSS (DENSA,0.D0,BMAX)
+          ENDIF
+          TB(JB) = (1.D0-U)*T1  + U*T2
+      ENDDO
+      RETURN
+      END
+
+C*======================================================================
+C.   Code about nuclear densities
+C=======================================================================
+
+      FUNCTION DENS_NUC (R, JA)
+
+C-----------------------------------------------------------------------
+C....Nuclear density (normalised to 1)
+C.   for a nucleus of mass number JA
+C.   INPUT R = radial coordinate  (fm)
+C.         JA = integer mass number
+C.  OUTPUT (fm**-3)
+C--------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CWOOD/ RR0(19:56), AA0(19:56), CC0(19:56)
+      SAVE
+
+      IF (JA .GT. 18)  THEN
+         DENS_NUC = WOOD_SAXON(R,JA)
+      ELSE IF (JA .NE. 4)  THEN
+         DENS_NUC = HELIUM(R)
+      ELSE
+         DENS_NUC = SHELL(R,JA)
+      ENDIF
+      RETURN
+      END
+C=======================================================================
+
+      FUNCTION WOOD_SAXON (R, JA) 
+
+C-----------------------------------------------------------------------
+C....Wood-Saxon nuclear density (normalised to 1)
+C.   for a nucleus of mass number A.
+C.   INPUT R =  (fm)
+C.         JA = mass number
+C.   OUTPUT (fm**-3)
+C------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CWOOD/ RR0(19:56), AA0(19:56), CC0(19:56)
+      SAVE
+
+      WOOD_SAXON = CC0(JA)/(1.D0+EXP((R-RR0(JA))/AA0(JA)))
+      RETURN
+      END      
+C=======================================================================
+
+      FUNCTION HELIUM (R)
+
+C-----------------------------------------------------------------------
+C... Helium density from Barrett and Jackson
+C.   INPUT R = r coordinate (fm)
+C.   OUTPUT (fm**-3)
+C........................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+      DATA R0 /0.964D0/, CA /0.322D0/   ! fm
+      DATA W /0.517D0/, CC /5.993224D-02/
+
+      HELIUM = CC*(1.D0+W*(R/R0)**2)/(1.D0 + EXP((R-R0)/CA))
+      RETURN
+      END
+C=======================================================================
+
+      FUNCTION SHELL (R,JA)
+
+C-----------------------------------------------------------------------
+C...Density in the shell model
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CSHELL/ RR0(18), RR02(18)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      R0 = RR0(JA)
+      C1 = MIN(1.D0,4.D0/DBLE(JA))
+      CS = 1.D0/(R0**3 * PI**1.5D0)
+      CP = 2.D0*CS/3.D0
+      FS = EXP(-(R/R0)**2)
+      FP = (R/R0)**2 * FS
+      SHELL = C1*CS*FS + (1.D0-C1)*CP*FP
+      RETURN
+      END
+C=======================================================================
+
+      FUNCTION PROFNUC (B, JA)
+
+C-----------------------------------------------------------------------
+C...This function return
+C.  the profile T(b) for a nucleus of mass number A
+C.  INPUT B = impact parameter (GeV**-1)
+C.        JA = integer mass number
+C.  OUTPUT  (fm**-2)
+C.
+C.  The  density of the nucleus is the `shell model density'
+C.  the parameter r0 must beinitialized in the common block
+C.............................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CSHELL/ RR0(18), RR02(18)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      B2 = B*B
+      ARG = B2/RR02(JA)
+      TS = EXP(-ARG)
+      TP = TS*(2.D0*B2+RR02(JA))/(3.D0*RR02(JA))
+      CS = MIN(1.D0,4.D0/DBLE(JA))
+      PROFNUC = (CS*TS + (1.D0-CS)*TP)/(PI*RR02(JA))
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SHELL_INI
+
+C-----------------------------------------------------------------------
+C...Initialize the parameter  of the shell model
+C.  for the nuclei with    6 < A < 18
+C..............................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON /CSHELL/ RR0(18), RR02(18)
+      DIMENSION RR(18)
+      SAVE
+C...Data on Sqrt[<r**2>]  in fermi
+      DATA RR /0.81D0, 2.095D0,  1.88D0, 1.674D0,  -1.D0,
+     +         2.56D0, 2.41D0,    -1.D0, 2.519D0, 2.45D0,
+     +         2.37D0, 2.460D0, 2.440D0,  2.54D0, 2.58D0, 
+     +         2.718D0,2.662D0, 2.789D0/
+
+      DO JA=1,18
+         A = DBLE(JA)
+         RMED = RR(JA)
+         IF (RMED .LE. 0.D0)   RMED = 0.5D0*(RR(JA-1) + RR(JA+1))
+         C = MAX(1.5D0,(5.D0/2.D0 - 4.D0/A) )
+         R0 = RMED/SQRT(C)
+         RR0 (JA) = R0
+         RR02(JA) = R0*R0
+      ENDDO
+      RETURN
+      END
+C->
+C=======================================================================
+
+      SUBROUTINE WOOD_SAXON_INI
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CWOOD/ RR0(19:56), AA0(19:56), CC0(19:56)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+C...Wood-Saxon parameters from  table 6.2   of Barrett and Jackson
+      RR0 (19) = 2.59D0
+      AA0 (19) = 0.564D0
+      RR0 (20) = 2.74D0
+      AA0 (20) = 0.569D0
+      RR0 (22) = 2.782D0
+      AA0 (22) = 0.549D0
+      RR0 (24) = 2.99D0
+      AA0 (24) = 0.548D0
+      RR0 (27) = 2.84D0
+      AA0 (27) = 0.569D0
+      RR0 (28) = 3.14D0
+      AA0 (28) = 0.537D0
+      RR0 (29) = 3.77D0
+      AA0 (29) = 0.52D0
+      RR0 (48) = 3.912D0
+      AA0 (48) = 0.5234D0
+      RR0 (56) = 3.98D0
+      AA0 (56) = 0.569D0
+      DO J=19, 56
+         IF (RR0(J) .LE. 0.D0)  THEN
+            RR0(J) = 1.05D0*DBLE(J)**0.333333333333D0
+            AA0(J) = 0.545D0
+         ENDIF
+         CC0(J)=3.D0/(4.D0*PI*RR0(J)**3)/(1.D0+((AA0(J)*PI)/RR0(J))**2)
+      ENDDO
+      RETURN
+      END
+C=======================================================================
+
+      FUNCTION DENSA (Z)
+
+C-----------------------------------------------------------------------
+C....Woods Saxon nuclear density (normalised to 1)
+C.   for a nucleus of mass number A.
+C.   INPUT z = z coordinate (fm)
+C.         JA = integer mass number
+C.         B (in common /CC01/)  impact parameter  (fm)
+C.  OUTPUT (fm**-3)
+C--------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CC01/  B
+      COMMON /CCDA/ JA
+      COMMON /CWOOD/ RR0(19:56), AA0(19:56), CC0(19:56)
+      SAVE
+
+      R = SQRT (Z*Z + B*B)
+      DENSA = CC0(JA)/(1.D0+EXP((R-RR0(JA))/AA0(JA)))
+      RETURN
+      END
+
+C*=====================================================================
+C. Cross sections
+C======================================================================
+
+      SUBROUTINE SIGMA_AIR (IB,SIG0,SIGEL,KINT,
+     +                            SIGMA,DSIGMA,SIGQE,DSIGQE)
+
+C-----------------------------------------------------------------------
+C...Compute with a montecarlo method the "production"
+C.  and "quasi-elastic" cross section for  
+C.  a nucleus-air  interaction 
+C.
+C.  INPUT : IB            = mass of projectile nucleus
+C.          SIG0 (mbarn)  = inelastic pp cross section
+C.          KINT            = number  of interactions to generate
+C.  OUTPUT : SIGMA (mbarn) = "production" cross section
+C.           DSIGMA   "    = error
+C.           SIGQE    "    = "quasi-elastic" cross section
+C.           DSIGQE   "    = error
+C.           additional output is in the common block  /CPROBAB/
+C..........................................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      PARAMETER (IAMAX=56)
+      PARAMETER (IAMAX2=3136)          ! IAMAX*IAMAX
+      COMMON  /CPROBAB/ PROBA(IAMAX), DPROBA(IAMAX), 
+     +   PROBB(IAMAX), DPROBB(IAMAX), PROBI(IAMAX2), DPROBI(IAMAX2),
+     +   P1AEL(0:IAMAX),DP1AEL(0:IAMAX),P1BEL(0:IAMAX), DP1BEL(0:IAMAX),
+     +   P2AEL(0:IAMAX),DP2AEL(0:IAMAX),P2BEL(0:IAMAX), DP2BEL(0:IAMAX)
+      COMMON /CNUCMS/ B, BMAX, NTRY, NA, NB, NI, NAEL, NBEL
+     +         ,JJA(IAMAX), JJB(IAMAX), JJINT(IAMAX,IAMAX)
+     +         ,JJAEL(IAMAX), JJBEL(IAMAX)
+      DIMENSION  MMA(0:IAMAX), MMB(0:IAMAX), MMI(0:IAMAX2)
+      DIMENSION  M1AEL(0:IAMAX), M1BEL(0:IAMAX)
+      DIMENSION  M2AEL(0:IAMAX), M2BEL(0:IAMAX)
+      DOUBLE PRECISION FOX
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+      DATA FOX /0.21522D0/  !atomic percentage of 'non-nitrogen' in air
+
+      R2 = 0.1D0 * SIG0/PI
+      BMAX = 15.D0                           ! fm
+      SIGMA0 = PI*BMAX*BMAX*10.              ! mbarn
+      IA = 16
+      DO J=1,IA
+         MMA(J) = 0
+         M1AEL(J) = 0
+         M2AEL(J) = 0
+      ENDDO
+      DO J=1,IB
+         MMB(J) = 0
+         M1BEL(J) = 0
+         M2BEL(J) = 0
+      ENDDO
+      DO J=1,IA*IB
+         MMI(J) = 0
+      ENDDO
+      NN = 0
+      M = 0
+      DO KK=1,KINT
+c  select target IA from air composition
+         R = S_RNDM(KK)
+         IA = 14
+         IF (R .LT. FOX)  IA = 16
+
+         CALL INT_NUC (IA, IB, SIG0, SIGEL) 
+         NN = NN + NTRY
+         MMI(NI) = MMI(NI) + 1
+         MMA(NA) = MMA(NA)+1
+         MMB(NB) = MMB(NB)+1
+         IF (NI .GT. 0)  THEN
+            M = M+1
+            M1AEL(NAEL) = M1AEL(NAEL)+1
+            M1BEL(NBEL) = M1BEL(NBEL)+1
+         ELSE
+            M2AEL(NAEL) = M2AEL(NAEL)+1
+            M2BEL(NBEL) = M2BEL(NBEL)+1
+         ENDIF
+      ENDDO
+      MQE = KINT - M
+      SIGMA  = SIGMA0 * DBLE(M)/DBLE(NN)
+      DSIGMA = SIGMA0 * SQRT(DBLE(M))/DBLE(NN)
+      SIGQE  = SIGMA0 * DBLE(MQE)/DBLE(NN)
+      DSIGQE = SIGMA0 * SQRT(DBLE(MQE))/DBLE(NN)
+      DO J=1,IA
+         PROBA(J) = DBLE(MMA(J))/DBLE(M)
+         DPROBA(J) = SQRT(DBLE(MMA(J)))/DBLE(M)
+      ENDDO
+      DO J=1,IB
+         PROBB(J) = DBLE(MMB(J))/DBLE(M)
+         DPROBB(J) = SQRT(DBLE(MMB(J)))/DBLE(M)
+      ENDDO
+      DO J=1,IA*IB
+         PROBI(J) = DBLE(MMI(J))/DBLE(M)
+         DPROBI(J) = SQRT(DBLE(MMI(J)))/DBLE(M)
+      ENDDO
+      DO J=0,IA
+         P1AEL(J) = DBLE(M1AEL(J))/DBLE(M)
+         DP1AEL(J) = SQRT(DBLE(M1AEL(J)))/DBLE(M)
+         P2AEL(J) = DBLE(M2AEL(J))/DBLE(MQE)
+         DP2AEL(J) = SQRT(DBLE(M2AEL(J)))/DBLE(MQE)
+      ENDDO
+      DO J=0,IB
+         P1BEL(J) = DBLE(M1BEL(J))/DBLE(M)
+         DP1BEL(J) = SQRT(DBLE(M1BEL(J)))/DBLE(M)
+         P2BEL(J) = DBLE(M2BEL(J))/DBLE(MQE)
+         DP2BEL(J) = SQRT(DBLE(M2BEL(J)))/DBLE(MQE)
+      ENDDO
+      RETURN
+      END
+C->
+C=======================================================================
+
+      SUBROUTINE SIGMA_MC (IA,IB,SIG0,SIGEL,KINT,
+     +                            SIGMA,DSIGMA,SIGQE,DSIGQE)
+
+C-----------------------------------------------------------------------
+C...Compute with a montecarlo method the "production"
+C.  and "quasi-elastic" cross section for  
+C.  a nucleus-nucleus interaction
+C.
+C.  INPUT : IA            = mass of target nucleus
+C.          IB            = mass of projectile nucleus
+C.          SIG0 (mbarn)  = inelastic pp cross section
+C.          KINT            = number  of interactions to generate
+C.  OUTPUT : SIGMA (mbarn) = "production" cross section
+C.           DSIGMA   "    = error
+C.           SIGQE    "    = "quasi-elastic" cross section
+C.           DSIGQE   "    = error
+C.           additional output is in the common block  /CPROBAB/
+C.           Prob(n_A), Prob(n_B), Prob(n_int)
+C..........................................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      PARAMETER (IAMAX=56)
+      PARAMETER (IAMAX2=3136)          ! IAMAX*IAMAX
+      COMMON  /CPROBAB/ PROBA(IAMAX), DPROBA(IAMAX), 
+     +   PROBB(IAMAX), DPROBB(IAMAX), PROBI(IAMAX2), DPROBI(IAMAX2),
+     +   P1AEL(0:IAMAX),DP1AEL(0:IAMAX),P1BEL(0:IAMAX), DP1BEL(0:IAMAX),
+     +   P2AEL(0:IAMAX),DP2AEL(0:IAMAX),P2BEL(0:IAMAX), DP2BEL(0:IAMAX)
+      COMMON /CNUCMS/ B, BMAX, NTRY, NA, NB, NI, NAEL, NBEL
+     +         ,JJA(IAMAX), JJB(IAMAX), JJINT(IAMAX,IAMAX)
+     +         ,JJAEL(IAMAX), JJBEL(IAMAX)
+      DIMENSION  MMA(0:IAMAX), MMB(0:IAMAX), MMI(0:IAMAX2)
+      DIMENSION  M1AEL(0:IAMAX), M1BEL(0:IAMAX)
+      DIMENSION  M2AEL(0:IAMAX), M2BEL(0:IAMAX)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      R2 = 0.1D0 * SIG0/PI
+      BMAX = 15.D0                           ! fm
+      SIGMA0 = PI*BMAX*BMAX*10.D0              ! mbarn
+      DO J=1,IA
+         MMA(J) = 0
+         M1AEL(J) = 0
+         M2AEL(J) = 0
+      ENDDO
+      DO J=1,IB
+         MMB(J) = 0
+         M1BEL(J) = 0
+         M2BEL(J) = 0
+      ENDDO
+      DO J=1,IA*IB
+         MMI(J) = 0
+      ENDDO
+      NN = 0
+      M = 0
+      DO KK=1,KINT
+         CALL INT_NUC (IA, IB, SIG0, SIGEL) 
+         NN = NN + NTRY
+         MMI(NI) = MMI(NI) + 1
+         MMA(NA) = MMA(NA)+1
+         MMB(NB) = MMB(NB)+1
+         IF (NI .GT. 0)  THEN
+            M = M+1
+            M1AEL(NAEL) = M1AEL(NAEL)+1
+            M1BEL(NBEL) = M1BEL(NBEL)+1
+         ELSE
+            M2AEL(NAEL) = M2AEL(NAEL)+1
+            M2BEL(NBEL) = M2BEL(NBEL)+1
+         ENDIF
+      ENDDO
+      MQE = KINT - M
+      SIGMA  = SIGMA0 * DBLE(M)/DBLE(NN)
+      DSIGMA = SIGMA0 * SQRT(DBLE(M))/DBLE(NN)
+      SIGQE  = SIGMA0 * DBLE(MQE)/DBLE(NN)
+      DSIGQE = SIGMA0 * SQRT(DBLE(MQE))/DBLE(NN)
+      DO J=1,IA
+         PROBA(J) = DBLE(MMA(J))/DBLE(M)
+         DPROBA(J) = SQRT(DBLE(MMA(J)))/DBLE(M)
+      ENDDO
+      DO J=1,IB
+         PROBB(J) = DBLE(MMB(J))/DBLE(M)
+         DPROBB(J) = SQRT(DBLE(MMB(J)))/DBLE(M)
+      ENDDO
+      DO J=1,IA*IB
+         PROBI(J) = DBLE(MMI(J))/DBLE(M)
+         DPROBI(J) = SQRT(DBLE(MMI(J)))/DBLE(M)
+      ENDDO
+      DO J=0,IA
+         P1AEL(J) = DBLE(M1AEL(J))/DBLE(M)
+         DP1AEL(J) = SQRT(DBLE(M1AEL(J)))/DBLE(M)
+         P2AEL(J) = DBLE(M2AEL(J))/DBLE(MQE)
+         DP2AEL(J) = SQRT(DBLE(M2AEL(J)))/DBLE(MQE)
+      ENDDO
+      DO J=0,IB
+         P1BEL(J) = DBLE(M1BEL(J))/DBLE(M)
+         DP1BEL(J) = SQRT(DBLE(M1BEL(J)))/DBLE(M)
+         P2BEL(J) = DBLE(M2BEL(J))/DBLE(MQE)
+         DP2BEL(J) = SQRT(DBLE(M2BEL(J)))/DBLE(MQE)
+      ENDDO
+      RETURN
+      END
+
+C*=============================================================
+C.  Cross sections
+C*=============================================================
+
+C Glauber h-air cross section calculation moved to inelScreen src file..
+
+C-----------------------------------------------------------------------
+C.  Fit of Block and Cahn to pp and pbar-p cross sections
+C-----------------------------------------------------------------------
+C=======================================================================
+
+      SUBROUTINE BLOCK(SQS,SIG1,SIG2,SLOP1,SLOP2,
+     +                 RHO1,RHO2,SIGEL1,SIGEL2)
+
+C-----------------------------------------------------------------------
+C...p-p and pbar-p cross sections
+C.  Parametrization of  Block and Cahn
+C
+C.  INPUT  : SQS   (GeV)  = c.m. energy
+C.  
+C.  OUPUT : SIG1 (mbarn)    = pp  total  cross section 
+C.          SLOP1 (GeV**2)  = slope of elastic scattering
+C.          RHO1            = Real/Imaginary part of the amplitude
+C.                            for forward elastic  scattering (pp)
+C.          SIGEL1 (mbarn)  = pp  elastic scattering  cross section
+C.          [1 -> 2   : pp -> pbar p]
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      S = SQS*SQS
+      CALL FPLUS  (S, FR, FI)
+      CALL FMINUS (S, GR, GI)
+      SIG1 = FI-GI
+      SIG2 = FI+GI
+      RHO1 = (FR-GR)/(FI-GI)
+      RHO2 = (FR+GR)/(FI+GI)
+      CALL SSLOPE (S, BP, BM)
+      SLOP1 = BP - GI/FI*(BM-BP)
+      SLOP2 = BP + GI/FI*(BM-BP)
+      SIGEL1 = SIG1**2*(1.D0+RHO1**2)/(16.D0*PI*SLOP1)/CMBARN
+      SIGEL2 = SIG2**2*(1.D0+RHO2**2)/(16.D0*PI*SLOP2)/CMBARN
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE FPLUS (S, FR, FI)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /BLOCKC/ AA, BETA, S0, CC, AMU, DD, ALPHA, A0
+      COMPLEX*16 Z1, Z2, Z3
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      F1 = LOG(S/S0)
+      Z1 = DCMPLX(F1,-PI/2.D0)
+      Z1 = Z1*Z1
+      Z2 = 1.D0 + A0*Z1
+      Z3 = Z1/Z2
+      F2 = CC*S**(AMU-1.D0)
+      F3 = 0.5D0*PI*(1.-AMU)
+      FI = AA + F2*COS(F3) + BETA*DREAL(Z3)
+      FR = -BETA*DIMAG(Z3)+F2*SIN(F3)
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE FMINUS (S, FR, FI)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /BLOCKC/ AA, BETA, S0, CC, AMU, DD, ALPHA, A0
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      F1 = S**(ALPHA-1.D0)
+      F2 = 0.5D0*PI*(1.D0-ALPHA)
+      FR = -DD*F1*COS(F2)
+      FI = -DD*F1*SIN(F2)
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SSLOPE (S, BP, BM)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /BLOCKD/ CP, DP, EP, CM, DM
+      SAVE
+
+      AL = LOG(S)
+      BP = CP + DP*AL + EP*AL*AL
+      BM = CM + DM*AL
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE BLOCK_INI
+
+C-----------------------------------------------------------------------
+C...Parameters of fit IFIT=1 of Block and Cahn
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /BLOCKC/ AA, BETA, S0, CC, AMU, DD, ALPHA, A0
+      COMMON /BLOCKD/ CP, DP, EP, CM, DM
+      SAVE
+
+      AA = 41.74D0
+      BETA = 0.66D0
+      S0 = 338.5D0
+      CC = 0.D0
+      AMU = 0.D0
+      DD = -39.37D0
+      ALPHA = 0.48D0
+      A0 = 0.D0
+      CP = 10.90D0
+      DP = -0.08D0
+      EP = 0.043D0
+      CM = 23.27D0
+      DM = 0.93D0
+      RETURN
+      END
+
+C*=============================================================
+C.  Nucleus-nucleus cross sections
+C=======================================================================
+
+      SUBROUTINE SIGNUC_INI (IA,E0)
+
+C-----------------------------------------------------------------------
+C...This subroutine receives in INPUT E0 (TeV)
+C.  energy per nucleon and computes the cross sections
+C.  and interactions lengths for  all nuclei
+C.  with A  between 2 and IA
+C.  The output is contained in common block /CLENNN/
+C.
+C.  Attention: the tabulated cross sections are obtained with
+C.  new p-p cross sections as used in SIBYLL 2x,
+C.  in addition field dimensions changed (RE 04/2000)
+C.
+C........................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CLENNN/ SSIGNUC(60), ALNUC(60)
+      DIMENSION SIGMA(6,56), SIGQE(6,56)
+      DIMENSION AA(6)
+      SAVE
+      DATA NE /6/, AMIN /1.D0/, DA /1.D0/
+      DATA AA /1.D0,2.D0,3.D0,4.D0,5.D0,6.D0/
+      DATA AVOG /6.0221367D-04/
+      DATA ATARGET /14.514D0/            ! effective masss of air
+C...Data on `inelastic-production' nucleus-air cross section
+      DATA (SIGMA(J, 2),J=1,6) /
+     &3.842D+02,4.287D+02,4.940D+02,5.887D+02,6.922D+02,7.767D+02/
+      DATA (SIGMA(J, 3),J=1,6) /
+     &4.601D+02,5.149D+02,5.595D+02,6.663D+02,7.641D+02,8.446D+02/
+      DATA (SIGMA(J, 4),J=1,6) /
+     &4.881D+02,5.373D+02,6.005D+02,6.895D+02,7.716D+02,8.967D+02/
+      DATA (SIGMA(J, 5),J=1,6) /
+     &5.874D+02,6.176D+02,7.181D+02,7.993D+02,9.089D+02,1.031D+03/
+      DATA (SIGMA(J, 6),J=1,6) /
+     &7.054D+02,7.399D+02,8.388D+02,9.463D+02,1.080D+03,1.197D+03/
+      DATA (SIGMA(J, 7),J=1,6) /
+     &7.192D+02,7.611D+02,8.449D+02,9.539D+02,1.061D+03,1.176D+03/
+      DATA (SIGMA(J, 8),J=1,6) /
+     &7.550D+02,7.975D+02,9.153D+02,9.944D+02,1.126D+03,1.236D+03/
+      DATA (SIGMA(J, 9),J=1,6) /
+     &7.929D+02,8.392D+02,9.265D+02,1.059D+03,1.167D+03,1.262D+03/
+      DATA (SIGMA(J, 10),J=1,6) /
+     &8.157D+02,8.644D+02,9.512D+02,1.058D+03,1.182D+03,1.298D+03/
+      DATA (SIGMA(J, 11),J=1,6) /
+     &8.039D+02,8.587D+02,9.534D+02,1.055D+03,1.182D+03,1.298D+03/
+      DATA (SIGMA(J, 12),J=1,6) /
+     &8.515D+02,8.957D+02,9.869D+02,1.122D+03,1.253D+03,1.366D+03/
+      DATA (SIGMA(J, 13),J=1,6) /
+     &8.769D+02,9.100D+02,1.018D+03,1.119D+03,1.252D+03,1.341D+03/
+      DATA (SIGMA(J, 14),J=1,6) /
+     &9.058D+02,9.532D+02,1.057D+03,1.171D+03,1.302D+03,1.391D+03/
+      DATA (SIGMA(J, 15),J=1,6) /
+     &9.555D+02,9.799D+02,1.098D+03,1.201D+03,1.342D+03,1.444D+03/
+      DATA (SIGMA(J, 16),J=1,6) /
+     &1.009D+03,1.058D+03,1.149D+03,1.290D+03,1.414D+03,1.520D+03/
+      DATA (SIGMA(J, 17),J=1,6) /
+     &9.907D+02,1.045D+03,1.166D+03,1.290D+03,1.384D+03,1.516D+03/
+      DATA (SIGMA(J, 18),J=1,6) /
+     &1.036D+03,1.121D+03,1.198D+03,1.328D+03,1.470D+03,1.592D+03/
+      DATA (SIGMA(J, 19),J=1,6) /
+     &1.083D+03,1.162D+03,1.250D+03,1.371D+03,1.516D+03,1.661D+03/
+      DATA (SIGMA(J, 20),J=1,6) /
+     &1.146D+03,1.215D+03,1.295D+03,1.443D+03,1.544D+03,1.744D+03/
+      DATA (SIGMA(J, 21),J=1,6) /
+     &1.158D+03,1.234D+03,1.292D+03,1.467D+03,1.618D+03,1.750D+03/
+      DATA (SIGMA(J, 22),J=1,6) /
+     &1.153D+03,1.205D+03,1.329D+03,1.451D+03,1.596D+03,1.734D+03/
+      DATA (SIGMA(J, 23),J=1,6) /
+     &1.210D+03,1.274D+03,1.356D+03,1.493D+03,1.655D+03,1.803D+03/
+      DATA (SIGMA(J, 24),J=1,6) /
+     &1.212D+03,1.273D+03,1.398D+03,1.489D+03,1.641D+03,1.800D+03/
+      DATA (SIGMA(J, 25),J=1,6) /
+     &1.236D+03,1.315D+03,1.423D+03,1.561D+03,1.669D+03,1.855D+03/
+      DATA (SIGMA(J, 26),J=1,6) /
+     &1.279D+03,1.345D+03,1.431D+03,1.595D+03,1.734D+03,1.889D+03/
+      DATA (SIGMA(J, 27),J=1,6) /
+     &1.228D+03,1.304D+03,1.438D+03,1.546D+03,1.714D+03,1.836D+03/
+      DATA (SIGMA(J, 28),J=1,6) /
+     &1.289D+03,1.370D+03,1.451D+03,1.597D+03,1.754D+03,1.913D+03/
+      DATA (SIGMA(J, 29),J=1,6) /
+     &1.411D+03,1.469D+03,1.613D+03,1.777D+03,1.910D+03,2.075D+03/
+      DATA (SIGMA(J, 30),J=1,6) /
+     &1.347D+03,1.401D+03,1.498D+03,1.642D+03,1.816D+03,1.975D+03/
+      DATA (SIGMA(J, 31),J=1,6) /
+     &1.359D+03,1.448D+03,1.551D+03,1.694D+03,1.858D+03,2.007D+03/
+      DATA (SIGMA(J, 32),J=1,6) /
+     &1.358D+03,1.460D+03,1.559D+03,1.698D+03,1.842D+03,1.974D+03/
+      DATA (SIGMA(J, 33),J=1,6) /
+     &1.418D+03,1.448D+03,1.578D+03,1.727D+03,1.872D+03,2.047D+03/
+      DATA (SIGMA(J, 34),J=1,6) /
+     &1.433D+03,1.466D+03,1.605D+03,1.738D+03,1.892D+03,2.019D+03/
+      DATA (SIGMA(J, 35),J=1,6) /
+     &1.430D+03,1.511D+03,1.602D+03,1.752D+03,1.935D+03,2.060D+03/
+      DATA (SIGMA(J, 36),J=1,6) /
+     &1.462D+03,1.499D+03,1.653D+03,1.805D+03,1.920D+03,2.057D+03/
+      DATA (SIGMA(J, 37),J=1,6) /
+     &1.470D+03,1.520D+03,1.656D+03,1.818D+03,1.946D+03,2.131D+03/
+      DATA (SIGMA(J, 38),J=1,6) /
+     &1.470D+03,1.542D+03,1.691D+03,1.800D+03,1.968D+03,2.133D+03/
+      DATA (SIGMA(J, 39),J=1,6) /
+     &1.495D+03,1.588D+03,1.676D+03,1.834D+03,1.969D+03,2.163D+03/
+      DATA (SIGMA(J, 40),J=1,6) /
+     &1.525D+03,1.551D+03,1.722D+03,1.833D+03,2.020D+03,2.192D+03/
+      DATA (SIGMA(J, 41),J=1,6) /
+     &1.526D+03,1.615D+03,1.709D+03,1.899D+03,2.040D+03,2.181D+03/
+      DATA (SIGMA(J, 42),J=1,6) /
+     &1.510D+03,1.567D+03,1.716D+03,1.892D+03,2.056D+03,2.197D+03/
+      DATA (SIGMA(J, 43),J=1,6) /
+     &1.557D+03,1.658D+03,1.776D+03,1.898D+03,2.092D+03,2.200D+03/
+      DATA (SIGMA(J, 44),J=1,6) /
+     &1.556D+03,1.645D+03,1.752D+03,1.920D+03,2.091D+03,2.243D+03/
+      DATA (SIGMA(J, 45),J=1,6) /
+     &1.583D+03,1.663D+03,1.798D+03,1.940D+03,2.051D+03,2.263D+03/
+      DATA (SIGMA(J, 46),J=1,6) /
+     &1.599D+03,1.642D+03,1.799D+03,1.941D+03,2.107D+03,2.268D+03/
+      DATA (SIGMA(J, 47),J=1,6) /
+     &1.611D+03,1.692D+03,1.811D+03,1.956D+03,2.107D+03,2.264D+03/
+      DATA (SIGMA(J, 48),J=1,6) /
+     &1.625D+03,1.706D+03,1.819D+03,1.986D+03,2.139D+03,2.354D+03/
+      DATA (SIGMA(J, 49),J=1,6) /
+     &1.666D+03,1.737D+03,1.854D+03,1.971D+03,2.160D+03,2.318D+03/
+      DATA (SIGMA(J, 50),J=1,6) /
+     &1.648D+03,1.747D+03,1.856D+03,2.023D+03,2.181D+03,2.352D+03/
+      DATA (SIGMA(J, 51),J=1,6) /
+     &1.653D+03,1.763D+03,1.868D+03,2.015D+03,2.203D+03,2.386D+03/
+      DATA (SIGMA(J, 52),J=1,6) /
+     &1.690D+03,1.720D+03,1.902D+03,2.027D+03,2.189D+03,2.357D+03/
+      DATA (SIGMA(J, 53),J=1,6) /
+     &1.690D+03,1.750D+03,1.921D+03,2.059D+03,2.208D+03,2.417D+03/
+      DATA (SIGMA(J, 54),J=1,6) /
+     &1.705D+03,1.781D+03,1.911D+03,2.073D+03,2.242D+03,2.411D+03/
+      DATA (SIGMA(J, 55),J=1,6) /
+     &1.714D+03,1.806D+03,1.896D+03,2.100D+03,2.253D+03,2.411D+03/
+      DATA (SIGMA(J, 56),J=1,6) /
+     &1.774D+03,1.813D+03,1.954D+03,2.098D+03,2.280D+03,2.482D+03/
+ 
+      DATA (SIGQE(J, 2),J=1,6) /
+     &4.141D+01,3.708D+01,5.428D+01,8.696D+01,1.403D+02,1.885D+02/
+      DATA (SIGQE(J, 3),J=1,6) /
+     &4.357D+01,3.894D+01,5.177D+01,9.675D+01,1.447D+02,2.029D+02/
+      DATA (SIGQE(J, 4),J=1,6) /
+     &4.123D+01,3.933D+01,6.070D+01,9.482D+01,1.474D+02,2.023D+02/
+      DATA (SIGQE(J, 5),J=1,6) /
+     &4.681D+01,4.287D+01,6.381D+01,1.050D+02,1.519D+02,2.198D+02/
+      DATA (SIGQE(J, 6),J=1,6) /
+     &5.407D+01,5.195D+01,6.723D+01,1.108D+02,1.750D+02,2.368D+02/
+      DATA (SIGQE(J, 7),J=1,6) /
+     &4.975D+01,4.936D+01,6.880D+01,1.162D+02,1.689D+02,2.329D+02/
+      DATA (SIGQE(J, 8),J=1,6) /
+     &5.361D+01,5.027D+01,6.858D+01,1.177D+02,1.759D+02,2.412D+02/
+      DATA (SIGQE(J, 9),J=1,6) /
+     &4.980D+01,5.063D+01,7.210D+01,1.196D+02,1.806D+02,2.299D+02/
+      DATA (SIGQE(J, 10),J=1,6) /
+     &5.170D+01,5.070D+01,7.105D+01,1.182D+02,1.679D+02,2.411D+02/
+      DATA (SIGQE(J, 11),J=1,6) /
+     &4.950D+01,4.950D+01,7.286D+01,1.137D+02,1.769D+02,2.477D+02/
+      DATA (SIGQE(J, 12),J=1,6) /
+     &5.262D+01,5.133D+01,7.110D+01,1.204D+02,1.789D+02,2.501D+02/
+      DATA (SIGQE(J, 13),J=1,6) /
+     &5.320D+01,5.378D+01,6.847D+01,1.200D+02,1.805D+02,2.442D+02/
+      DATA (SIGQE(J, 14),J=1,6) /
+     &5.638D+01,5.271D+01,6.985D+01,1.209D+02,1.867D+02,2.610D+02/
+      DATA (SIGQE(J, 15),J=1,6) /
+     &5.294D+01,5.353D+01,7.435D+01,1.211D+02,1.899D+02,2.612D+02/
+      DATA (SIGQE(J, 16),J=1,6) /
+     &5.668D+01,5.254D+01,7.557D+01,1.269D+02,1.917D+02,2.707D+02/
+      DATA (SIGQE(J, 17),J=1,6) /
+     &5.456D+01,5.721D+01,7.481D+01,1.208D+02,1.859D+02,2.658D+02/
+      DATA (SIGQE(J, 18),J=1,6) /
+     &5.901D+01,5.382D+01,7.591D+01,1.246D+02,1.872D+02,2.874D+02/
+      DATA (SIGQE(J, 19),J=1,6) /
+     &6.328D+01,6.116D+01,8.451D+01,1.318D+02,2.088D+02,2.749D+02/
+      DATA (SIGQE(J, 20),J=1,6) /
+     &5.779D+01,5.924D+01,8.382D+01,1.370D+02,2.062D+02,2.837D+02/
+      DATA (SIGQE(J, 21),J=1,6) /
+     &7.155D+01,5.732D+01,8.231D+01,1.363D+02,2.047D+02,2.820D+02/
+      DATA (SIGQE(J, 22),J=1,6) /
+     &6.699D+01,5.651D+01,8.511D+01,1.477D+02,2.031D+02,2.921D+02/
+      DATA (SIGQE(J, 23),J=1,6) /
+     &6.179D+01,6.269D+01,9.395D+01,1.437D+02,2.195D+02,2.964D+02/
+      DATA (SIGQE(J, 24),J=1,6) /
+     &6.784D+01,6.028D+01,8.622D+01,1.279D+02,2.214D+02,2.867D+02/
+      DATA (SIGQE(J, 25),J=1,6) /
+     &6.589D+01,5.795D+01,8.890D+01,1.385D+02,2.055D+02,2.988D+02/
+      DATA (SIGQE(J, 26),J=1,6) /
+     &6.364D+01,6.325D+01,8.942D+01,1.421D+02,2.128D+02,3.083D+02/
+      DATA (SIGQE(J, 27),J=1,6) /
+     &6.449D+01,6.664D+01,8.986D+01,1.453D+02,2.140D+02,2.932D+02/
+      DATA (SIGQE(J, 28),J=1,6) /
+     &7.284D+01,6.139D+01,8.867D+01,1.425D+02,2.179D+02,2.978D+02/
+      DATA (SIGQE(J, 29),J=1,6) /
+     &7.221D+01,7.085D+01,9.079D+01,1.482D+02,2.277D+02,2.913D+02/
+      DATA (SIGQE(J, 30),J=1,6) /
+     &6.928D+01,6.294D+01,8.935D+01,1.463D+02,2.265D+02,2.834D+02/
+      DATA (SIGQE(J, 31),J=1,6) /
+     &6.611D+01,6.586D+01,9.133D+01,1.461D+02,2.201D+02,2.959D+02/
+      DATA (SIGQE(J, 32),J=1,6) /
+     &6.401D+01,6.177D+01,8.971D+01,1.480D+02,2.155D+02,3.152D+02/
+      DATA (SIGQE(J, 33),J=1,6) /
+     &7.057D+01,6.918D+01,8.410D+01,1.465D+02,2.288D+02,3.088D+02/
+      DATA (SIGQE(J, 34),J=1,6) /
+     &6.453D+01,7.020D+01,9.272D+01,1.517D+02,2.189D+02,2.999D+02/
+      DATA (SIGQE(J, 35),J=1,6) /
+     &6.741D+01,6.295D+01,9.323D+01,1.536D+02,2.190D+02,2.930D+02/
+      DATA (SIGQE(J, 36),J=1,6) /
+     &6.807D+01,7.046D+01,1.025D+02,1.565D+02,2.315D+02,3.090D+02/
+      DATA (SIGQE(J, 37),J=1,6) /
+     &8.082D+01,6.565D+01,9.160D+01,1.572D+02,2.229D+02,3.125D+02/
+      DATA (SIGQE(J, 38),J=1,6) /
+     &6.494D+01,6.964D+01,9.089D+01,1.653D+02,2.336D+02,3.120D+02/
+      DATA (SIGQE(J, 39),J=1,6) /
+     &6.833D+01,6.860D+01,8.933D+01,1.601D+02,2.261D+02,3.167D+02/
+      DATA (SIGQE(J, 40),J=1,6) /
+     &7.021D+01,6.866D+01,8.437D+01,1.588D+02,2.249D+02,2.941D+02/
+      DATA (SIGQE(J, 41),J=1,6) /
+     &7.122D+01,6.205D+01,9.545D+01,1.582D+02,2.335D+02,3.395D+02/
+      DATA (SIGQE(J, 42),J=1,6) /
+     &7.265D+01,6.936D+01,9.486D+01,1.505D+02,2.379D+02,3.248D+02/
+      DATA (SIGQE(J, 43),J=1,6) /
+     &7.048D+01,7.539D+01,9.192D+01,1.566D+02,2.532D+02,3.182D+02/
+      DATA (SIGQE(J, 44),J=1,6) /
+     &6.650D+01,7.139D+01,9.862D+01,1.602D+02,2.289D+02,3.077D+02/
+      DATA (SIGQE(J, 45),J=1,6) /
+     &7.511D+01,6.893D+01,9.245D+01,1.641D+02,2.519D+02,3.381D+02/
+      DATA (SIGQE(J, 46),J=1,6) /
+     &6.437D+01,6.894D+01,8.697D+01,1.544D+02,2.391D+02,3.213D+02/
+      DATA (SIGQE(J, 47),J=1,6) /
+     &7.980D+01,6.958D+01,1.022D+02,1.609D+02,2.408D+02,3.246D+02/
+      DATA (SIGQE(J, 48),J=1,6) /
+     &7.265D+01,7.313D+01,8.989D+01,1.578D+02,2.387D+02,3.235D+02/
+      DATA (SIGQE(J, 49),J=1,6) /
+     &6.959D+01,6.337D+01,9.084D+01,1.656D+02,2.331D+02,3.226D+02/
+      DATA (SIGQE(J, 50),J=1,6) /
+     &7.371D+01,6.807D+01,9.726D+01,1.535D+02,2.445D+02,3.189D+02/
+      DATA (SIGQE(J, 51),J=1,6) /
+     &7.882D+01,6.680D+01,9.377D+01,1.629D+02,2.448D+02,3.297D+02/
+      DATA (SIGQE(J, 52),J=1,6) /
+     &7.223D+01,6.794D+01,9.925D+01,1.738D+02,2.446D+02,3.162D+02/
+      DATA (SIGQE(J, 53),J=1,6) /
+     &7.703D+01,6.971D+01,9.601D+01,1.595D+02,2.484D+02,3.265D+02/
+      DATA (SIGQE(J, 54),J=1,6) /
+     &7.549D+01,7.459D+01,8.984D+01,1.645D+02,2.348D+02,3.201D+02/
+      DATA (SIGQE(J, 55),J=1,6) /
+     &7.891D+01,6.840D+01,1.017D+02,1.698D+02,2.501D+02,3.429D+02/
+      DATA (SIGQE(J, 56),J=1,6) /
+     &7.545D+01,6.673D+01,1.057D+02,1.684D+02,2.424D+02,3.181D+02/
+
+      ASQS = 0.5D0*LOG10(1.876D+03*E0)
+      JE = MIN(INT((ASQS-AMIN)/DA)+1,NE-2)
+      DO JA=2,IA
+         ABEAM = DBLE(JA)
+         S1 = QUAD_INT(ASQS, AA(JE),AA(JE+1),AA(JE+2),
+     +                   SIGMA(JE,JA),SIGMA(JE+1,JA),SIGMA(JE+2,JA))
+         S2 = QUAD_INT(ASQS, AA(JE),AA(JE+1),AA(JE+2),
+     +                   SIGQE(JE,JA),SIGQE(JE+1,JA),SIGQE(JE+2,JA))
+         SSIGNUC(JA) = S1 + S2
+         ALNUC(JA) = ATARGET/(AVOG*SSIGNUC(JA))
+      ENDDO
+      ALNUC(1) = FPNI(E0, 13)
+      SSIGNUC(1) = ATARGET/(AVOG*ALNUC(1))
+
+      RETURN
+      END
+
+
+C*=======================================================================
+C.  General utilities
+C=======================================================================
+
+      FUNCTION QUAD_INT (R,X0,X1,X2,V0,V1,V2)
+
+C-----------------------------------------------------------------------
+C...Quadratic interpolation
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+      R0=R-X0
+      R1=R-X1
+      R2=R-X2
+      S0=X0-X1
+      S1=X0-X2
+      S2=X1-X2
+      QUAD_INT = V0*R1*R2/(S0*S1)-V1*R0*R2/(S0*S2)+V2*R0*R1/(S1*S2)
+      RETURN
+      END
+C=======================================================================
+
+      FUNCTION GAUSS (FUN, A,B)
+
+C-----------------------------------------------------------------------
+C...Returns the  8 points Gauss-Legendre integral
+C.  of function FUN from A to B
+C...........................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION X(8), W(8)
+      SAVE
+      DATA X/.0950125098D0, .2816035507D0, .4580167776D0, .6178762444D0,
+     1       .7554044083D0, .8656312023D0, .9445750230D0, .9894009349D0/
+      DATA W/.1894506104D0, .1826034150D0, .1691565193D0, .1495959888D0,
+     1       .1246289712D0, .0951585116D0, .0622535239D0, .0271524594D0/
+
+      XM = 0.5D0*(B+A)
+      XR = 0.5D0*(B-A)
+      SS = 0.D0
+      DO J=1,8
+        DX = XR*X(J)
+        SS = SS + W(J) * (FUN(XM+DX) + FUN(XM-DX))
+      ENDDO
+      GAUSS = XR*SS
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE INVERT_ARRAY (yy, xmin, dx, n, xnew, ymin, dy)
+
+C-----------------------------------------------------------------------
+C..    This subroutine receives one   array
+C      of n y values in input yy(1:n)
+C      that correspond to  equispaced values of x_j = xmin + dx*(j-1)
+C
+C      and "reverse" the array returning an array of  x values
+C      xnew (1:n) that  corresponds to equispaced values of y
+C      The relation is assumed monotonous but can be 
+C      increasing or decreasing
+C..............................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      dimension  yy(n), xnew (n)
+      SAVE
+
+      ymin = yy(1)
+      ymax = yy(n)
+      dy = (ymax - ymin)/float(n-1)
+      xnew (1) = xmin
+      xnew (n) = xmin + dx*float(n-1)
+      k0 = 1
+      do j=2,n-1
+         y = ymin + float(j-1)*dy 
+         do k=k0,n
+            if((yy(k) .gt. y) .eqv. (yy(n) .gt. yy(1))) goto 100
+         enddo
+100      y2 = yy(k)
+         y1 = yy(k-1)
+         k0 = k-1
+         x1 = xmin + dx*float(k-2)
+         x2 = x1+dx
+         xnew (j)  = x1 + dx* (y-y1)/(y2-y1)
+      enddo
+      return
+      end
+C->
+C=======================================================================
+
+      SUBROUTINE SINCO(S,C)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      F = TWOPI*S_RNDM(0)
+      C = COS (F)
+      S = SIN (F)
+      RETURN
+      END
+
+C***********************************************************************
+C.  Cross sections for cascade calculations (FPNI)
+C=======================================================================
+      
+      SUBROUTINE SIGMA_PP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
+
+C-----------------------------------------------------------------------
+C...p-p cross sections
+C.
+C.  this routine serves the purpose to calculate cascades with different 
+C.  cross sections
+C.
+C. INPUT: E0 = Laboratory Energy  (TeV)
+C. 
+C. OUTPUT: SIGT = total cross section
+C.         SIGEL = elastic cross section
+C.         SIGINEL = inelastic cross section
+C.         SLOPE = slope of elastic scattering (GeV**-2)
+C.         RHO = Imaginary/Real part of forward elastic amplitude
+C.   
+C.  (old cross section tables end at 10^6 GeV)
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION SSIG0(51)
+      DIMENSION SIGDIF(3)
+      COMMON /CSPA/ ICSPA2(3)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+C...p-p inelastic cross sections (mbarn)
+      DATA (SSIG0(J),J=1,51) /
+     +      32.05D0,  32.06D0,  32.08D0,  32.13D0,  32.22D0,  32.36D0,
+     +      32.56D0,  32.85D0,  33.24D0,  33.75D0,  34.37D0,  35.14D0,
+     +      36.05D0,  37.12D0,  38.37D0,  39.78D0,  41.36D0,  43.13D0,
+     +      45.07D0,  47.18D0,  49.47D0,  51.91D0,  54.54D0,  57.28D0,
+     +      60.15D0,  63.15D0,  66.28D0,  69.48D0,  72.80D0,  76.22D0,
+     +      79.71D0,  83.27D0,  86.87D0,  90.55D0,  94.26D0,  98.05D0,
+     +     101.89D0, 105.75D0, 109.71D0, 113.65D0, 117.60D0, 121.55D0,
+     +     125.53D0, 129.56D0, 133.60D0, 137.70D0, 141.77D0, 145.84D0,
+     +     149.92D0, 154.02D0, 158.15D0/
+
+      ICSPA = ICSPA2(1)
+
+      SQS = SQRT(2000.D0*0.938D0*E0)
+
+*  pre-LHC SIBYLL2.1 model
+      
+      IF(ICSPA.EQ.-2) THEN
+
+         CALL SIB_SIGMA_EXT(3,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO)      
+
+*  old standard NUCLIB/SIBYLL model
+
+      ELSE IF(ICSPA.EQ.-1) THEN
+
+        AL = LOG10(SQS)
+        if(AL.le.1.D0) then
+          SIGINEL = SSIG0(1)
+        else
+          J1 = INT((AL - 1.D0)*10.D0) + 1
+          J1 = min(J1,50)
+          T = (AL-1.D0)*10.D0 - DBLE(J1-1)
+          SIGINEL = SSIG0(J1)*(1.D0-T) + SSIG0(J1+1)*T
+        endif
+        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,SIGEL1,SIGEL2)
+        R = SIGEL1/SIGT1
+        RHO = RHO1
+        SIGT  = SIGINEL/(1.D0-R)
+        SIGEL = SIGINEL*R/(1.D0-R)
+        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO1**2) /CMBARN
+
+*  cross section as calculated in SIBYLL
+
+      ELSE IF(ICSPA.EQ.0) THEN
+
+        CALL SIB_SIGMA_HP(1,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+
+*  Donnachie-Landshoff  (sig-tot)
+
+      ELSE IF(ICSPA.EQ.1) THEN
+
+        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,
+     +             SIGEL1,SIGEL2)
+        R = SIGEL1/SIGT1
+        RHO = RHO1
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 21.7D0*S**DELDL+56.08D0*S**EPSDL
+        SIGEL = R*SIGT
+        SIGINEL = SIGT-SIGEL
+        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO**2) /CMBARN
+
+*  Donnachie-Landshoff (sig-tot and sig-el)
+
+      ELSE IF(ICSPA.EQ.2) THEN
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 21.7D0*S**DELDL+56.08D0*S**EPSDL
+        IMODEL = 1
+        IF(IMODEL.EQ.1) THEN
+          ALPHAP = 0.25D0
+          SLOPE = 8.5D0+2.D0*ALPHAP*LOG(S)
+        ELSE IF(IMODEL.EQ.2) THEN
+          ALPHAP = 0.3D0
+          SLOPE = 8.D0+2.D0*ALPHAP*LOG(S)
+        ENDIF
+        SIGEL = SIGT**2/(16.D0*PI*SLOPE*CMBARN)
+        SIGINEL = SIGT-SIGEL
+        RHO = 0.D0
+
+*  geometrical scaling with Donnachie-Landshoff sig-tot
+
+      ELSE IF(ICSPA.EQ.3) THEN
+
+        R = 0.17D0
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 21.7D0*S**DELDL+56.08D0*S**EPSDL
+
+        SIGEL = R*SIGT
+        SIGINEL = SIGT-SIGEL
+        SLOPE = SIGT**2/(16.D0*PI*SIGEL)/CMBARN
+        RHO = 0.D0
+
+c ICSPA=4 reserved for CONEX_EXTENSION
+c      ELSE IF(ICSPA.EQ.4) THEN
+
+*  cross section from 2014 Review of Particle Physics
+        
+      ELSE IF(ICSPA.EQ.5) THEN
+         
+c     elastic slope not included in fit
+c     taking slope parameterization from sigma_pp Donnie.-Landshoff
+         ALPHAP = 0.25D0
+         SLOPE = 8.5D0+4.D0*ALPHAP*LOG(SQS)
+         
+         CALL SIG_RPP2014(1,1,SQS,SLOPE,SIGT,SIGEL,SIGINEL,RHO)
+
+      ENDIF
+
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIGMA_PIP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
+
+C-----------------------------------------------------------------------
+C...pi-p cross sections
+C.
+C.  this routine serves the purpose to calculate cascades with different 
+C.  cross sections
+C.
+C. INPUT: E0 = Laboratory Energy  (TeV)
+C. 
+C. OUTPUT: SIGT = total cross section
+C.         SIGEL = elastic cross section
+C.         SIGINEL = inelastic cross section
+C.         SLOPE = slope of elastic scattering (GeV**-2)
+C.         RHO = Imaginary/Real part of forward elastic amplitude
+C.
+C.  (old cross section tables end at 10^6 GeV)
+C-----------------------------------------------------------------------
+Cf2py double precision,intent(in) :: e0
+Cf2py double precision,intent(out) :: sigt, sigel, siginel, slope, rho
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION SSIG0(51)
+      DIMENSION SIGDIF(3)
+      COMMON /CSPA/ ICSPA2(3)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+C...pi-p inelastic cross sections (mbarn)
+      DATA (SSIG0(J),J=1,51) /
+     +      20.76D0,  20.78D0,  20.81D0,  20.88D0,  20.98D0,  21.13D0,
+     +      21.33D0,  21.61D0,  21.96D0,  22.39D0,  22.92D0,  23.56D0,
+     +      24.31D0,  25.18D0,  26.18D0,  27.32D0,  28.60D0,  30.04D0,
+     +      31.64D0,  33.40D0,  35.34D0,  37.43D0,  39.72D0,  42.16D0,
+     +      44.77D0,  47.56D0,  50.53D0,  53.66D0,  56.99D0,  60.50D0,
+     +      64.17D0,  68.03D0,  72.05D0,  76.27D0,  80.67D0,  85.27D0,
+     +      90.08D0,  95.04D0, 100.27D0, 105.65D0, 111.21D0, 116.94D0,
+     +     122.87D0, 129.03D0, 135.37D0, 141.93D0, 148.62D0, 155.49D0,
+     +     162.48D0, 169.60D0, 176.94D0/
+
+      ICSPA = ICSPA2(2)
+
+      SQS = SQRT(2000.D0*0.938D0*E0)
+      
+*  pre-LHC SIBYLL2.1 model
+      
+      IF(ICSPA.EQ.-2) THEN
+
+         CALL SIB_SIGMA_EXT(2,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO)
+      
+*  old standard NUCLIB/SIBYLL model
+
+      ELSE IF(ICSPA.EQ.-1) THEN
+
+        AL = LOG10(SQS)
+        if(AL.le.1.D0) then
+          SIGINEL = SSIG0(1)
+        else
+          J1 = INT((AL - 1.D0)*10.D0) + 1
+          J1 = min(J1,50)
+          T = (AL-1.D0)*10.D0 - DBLE(J1-1)
+          SIGINEL = SSIG0(J1)*(1.D0-T) + SSIG0(J1+1)*T
+        endif
+        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,SIGEL1,SIGEL2)
+        R = SIGEL1/SIGT1
+        RHO = RHO1
+        SIGT  = SIGINEL/(1.D0-R)
+        SIGEL = SIGINEL*R/(1.D0-R)
+        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO1**2) /CMBARN
+
+*  cross section as calculated in SIBYLL
+
+      ELSE IF(ICSPA.EQ.0) THEN
+
+        CALL SIB_SIGMA_HP(2,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+
+*  Donnachie-Landshoff  (sig-tot)
+
+      ELSE IF(ICSPA.EQ.1) THEN
+
+        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,
+     +             SIGEL1,SIGEL2)
+        R = SIGEL1/SIGT1
+        RHO = RHO1
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 13.63D0*S**DELDL+(36.02D0+27.56D0)/2.D0*S**EPSDL
+        SIGEL = R*SIGT
+        SIGINEL = SIGT-SIGEL
+        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO**2) /CMBARN
+
+*  Donnachie-Landshoff (sig-tot and sig-el)
+
+      ELSE IF(ICSPA.EQ.2) THEN
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 13.63D0*S**DELDL+(36.02D0+27.56D0)/2.D0*S**EPSDL
+        IMODEL = 1
+        IF(IMODEL.EQ.1) THEN
+          ALPHAP = 0.25D0
+          SLOPE = 8.5D0+2.D0*ALPHAP*LOG(S)
+        ELSE IF(IMODEL.EQ.2) THEN
+          ALPHAP = 0.3D0
+          SLOPE = 8.D0+2.D0*ALPHAP*LOG(S)
+        ENDIF
+        SIGEL = SIGT**2/(16.D0*PI*SLOPE*CMBARN)
+        SIGINEL = SIGT-SIGEL
+        RHO = 0.
+
+*  geometrical scaling with Donnachie-Landshoff sig-tot
+
+      ELSE IF(ICSPA.EQ.3) THEN
+
+        R = 0.17D0
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 13.63D0*S**DELDL+(36.02D0+27.56D0)/2.D0*S**EPSDL
+
+        SIGEL = R*SIGT
+        SIGINEL = SIGT-SIGEL
+        SLOPE = SIGT**2/(16.D0*PI*SIGEL)/CMBARN
+        RHO = 0.D0
+
+c ICSPA=4 reserved for CONEX_EXTENSION
+c      ELSE IF(ICSPA.EQ.4) THEN
+
+*  cross section from 2014 Review of Particle Physics
+        
+      ELSE IF(ICSPA.EQ.5) THEN
+         
+c     elastic slope not included in fit
+c     taking slope parameterization from sigma_pp Donnie.-Landshoff
+         ALPHAP = 0.25D0
+         SLOPE = 8.5D0+4.D0*ALPHAP*LOG(SQS)
+         
+         CALL SIG_RPP2014(2,1,SQS,SLOPE,SIGT,SIGEL,SIGINEL,RHO)
+         
+      ENDIF
+
+
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIGMA_KP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
+
+C-----------------------------------------------------------------------
+C...K-p cross sections
+C.
+C.  this routine serves the purpose to calculate cascades with different 
+C.  cross sections
+C.
+C.  if old cross sections are selected then sigma_pi = sigma_K
+C.
+C. INPUT: E0 = Laboratory Energy  (TeV)
+C. 
+C. OUTPUT: SIGT = total cross section
+C.         SIGEL = elastic cross section
+C.         SIGINEL = inelastic cross section
+C.         SLOPE = slope of elastic scattering (GeV**-2)
+C.         RHO = Imaginary/Real part of forward elastic amplitude
+C.
+C.  (old cross section tables end at 10^6 GeV)
+C-----------------------------------------------------------------------
+Cf2py double precision,intent(in) :: e0
+Cf2py double precision,intent(out) :: sigt, sigel, siginel, slope, rho
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION SSIG0(51)
+      DIMENSION SIGDIF(3)
+      COMMON /CSPA/ ICSPA2(3)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+C...pi-p inelastic cross sections (mbarn)
+      DATA (SSIG0(J),J=1,51) /
+     +      20.76D0,  20.78D0,  20.81D0,  20.88D0,  20.98D0,  21.13D0,
+     +      21.33D0,  21.61D0,  21.96D0,  22.39D0,  22.92D0,  23.56D0,
+     +      24.31D0,  25.18D0,  26.18D0,  27.32D0,  28.60D0,  30.04D0,
+     +      31.64D0,  33.40D0,  35.34D0,  37.43D0,  39.72D0,  42.16D0,
+     +      44.77D0,  47.56D0,  50.53D0,  53.66D0,  56.99D0,  60.50D0,
+     +      64.17D0,  68.03D0,  72.05D0,  76.27D0,  80.67D0,  85.27D0,
+     +      90.08D0,  95.04D0, 100.27D0, 105.65D0, 111.21D0, 116.94D0,
+     +     122.87D0, 129.03D0, 135.37D0, 141.93D0, 148.62D0, 155.49D0,
+     +     162.48D0, 169.60D0, 176.94D0/
+
+      ICSPA = ICSPA2(3)
+      
+      SQS = SQRT(2000.D0*0.938D0*E0)      
+
+*  pre-LHC SIBYLL2.1 model
+      
+      IF(ICSPA.EQ.-2) THEN
+
+         CALL SIB_SIGMA_EXT(3,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO)
+      
+*  old standard NUCLIB/SIBYLL model
+
+      ELSE IF(ICSPA.EQ.-1) THEN
+
+        AL = LOG10(SQS)
+        if(AL.le.1.D0) then
+          SIGINEL = SSIG0(1)
+        else
+          J1 = INT((AL - 1.D0)*10.D0) + 1
+          J1 = min(J1,50)
+          T = (AL-1.D0)*10.D0 - DBLE(J1-1)
+          SIGINEL = SSIG0(J1)*(1.D0-T) + SSIG0(J1+1)*T
+        endif
+        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,SIGEL1,SIGEL2)
+        R = SIGEL1/SIGT1
+        RHO = RHO1
+        SIGT  = SIGINEL/(1.D0-R)
+        SIGEL = SIGINEL*R/(1.D0-R)
+        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO1**2) /CMBARN
+
+*  cross section as calculated in SIBYLL
+
+      ELSE IF(ICSPA.EQ.0) THEN
+
+        CALL SIB_SIGMA_HP(3,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+
+*  Donnachie-Landshoff  (sig-tot)
+
+      ELSE IF(ICSPA.EQ.1) THEN
+
+        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,
+     +             SIGEL1,SIGEL2)
+        R = SIGEL1/SIGT1
+        RHO = RHO1
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 11.82D0*S**DELDL+(26.36D0+ 8.15D0)/2.D0*S**EPSDL
+        SIGEL = R*SIGT
+        SIGINEL = SIGT-SIGEL
+        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO**2) /CMBARN
+
+*  Donnachie-Landshoff (sig-tot and sig-el)
+
+      ELSE IF(ICSPA.EQ.2) THEN
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 11.82D0*S**DELDL+(26.36D0+ 8.15D0)/2.D0*S**EPSDL
+        IMODEL = 1
+        IF(IMODEL.EQ.1) THEN
+          ALPHAP = 0.25D0
+          SLOPE = 8.5D0+2.D0*ALPHAP*LOG(S)
+        ELSE IF(IMODEL.EQ.2) THEN
+          ALPHAP = 0.3D0
+          SLOPE = 8.D0+2.D0*ALPHAP*LOG(S)
+        ENDIF
+        SIGEL = SIGT**2/(16.D0*PI*SLOPE*CMBARN)
+        SIGINEL = SIGT-SIGEL
+        RHO = 0.D0
+
+*  geometrical scaling with Donnachie-Landshoff sig-tot
+
+      ELSE IF(ICSPA.EQ.3) THEN
+
+        R = 0.17D0
+
+        DELDL = 0.0808D0
+        EPSDL = -0.4525D0
+        S = SQS*SQS
+        SIGT = 11.82D0*S**DELDL+(26.36D0+ 8.15D0)/2.D0*S**EPSDL
+
+        SIGEL = R*SIGT
+        SIGINEL = SIGT-SIGEL
+        SLOPE = SIGT**2/(16.D0*PI*SIGEL)/CMBARN
+        RHO = 0.D0
+        
+c ICSPA=4 reserved for CONEX_EXTENSION
+c      ELSE IF(ICSPA.EQ.4) THEN
+
+
+*  cross section from 2014 Review of Particle Physics
+        
+      ELSE IF(ICSPA.EQ.5) THEN
+         
+c     elastic slope not included in fit
+c     taking slope parameterization from sigma_pp Donnie.-Landshoff
+         ALPHAP = 0.25D0
+         SLOPE = 8.5D0+4.D0*ALPHAP*LOG(SQS)
+         
+         CALL SIG_RPP2014(3,1,SQS,SLOPE,SIGT,SIGEL,SIGINEL,RHO)
+
+      ENDIF
+
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIGMA_INI 
+
+C-----------------------------------------------------------------------
+C.  Initialize the cross section and interaction lengths in air
+C.  cross section model can be chosen, per particle, by setting ICSPA2()
+C.  default is Sibyll cross section (0,0,0)      
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CSAIR/ ASQSMIN, ASQSMAX, DASQS,
+     &     SSIG0(61,3),SSIGA(61,3),ALINT(61,3),NSQS
+      
+      COMMON /CSPA/ ICSPA2(3)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+
+C--------------------------------------------------------------------
+C     SIBYLL utility common blocks containing constants       \FR'14
+C--------------------------------------------------------------------
+      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+
+      DOUBLE PRECISION FACN
+      DIMENSION FACN(3:10)
+      COMMON /SIB_FAC/ FACN
+      SAVE
+      DATA ICSPA2 /0,0,0/
+      DATA AVOG /6.0221367D-04/
+      DATA ATARGET /14.514D0/            ! effective masss of air
+
+      IF(NDEBUG.gt.0)
+     &     write(lun,*) ' SIGMA_INI: using cross section model no.',
+     &     (ICSPA2(i),i=1,3)
+
+      CALL BLOCK_INI
+
+C...Loop on c.m. energy 
+      NSQS = 61
+      SQSMIN = 10.D0
+      SQSMAX = 1.d+07
+      ASQSMIN = LOG10(SQSMIN)
+      ASQSMAX = LOG10(SQSMAX)
+      DASQS = (ASQSMAX-ASQSMIN)/DBLE(NSQS-1)
+      DO J=1,NSQS
+         ASQS = ASQSMIN + DASQS*DBLE(J-1)
+         SQS = 10.D0**ASQS
+         E0 = SQS*SQS/(2.D0*0.938D0) * 1.D-03       ! TeV
+C...p-air
+         CALL SIGMA_PP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO)
+C     using parametrization by Goulianos for diff. cross section
+c     (depends on elastic cross section)
+c     used to determine coupling to intermediate resonances in Glauber calc (ALAM)
+c     assumed to be universal, i.e. same coupling used for proton, pion and kaons
+         CALL SIB_HADCS1(1,SQS,SIGT1,SIGEL1,SIGINEL1,SLOPE1,RHO1)
+         SIGEFF = 0.68D0*(1.D0+36.D0/SQS**2)
+     &        *LOG(0.6D0+0.02D0/1.5D0*SQS**2)
+         SIGEFF = MAX(0.D0,SIGEFF)
+         ALAM = sqrt(SIGEFF/SIGEL1)
+         SSIGSD = 2.D0 * SIGEFF        
+         CALL SIG_H_AIR (SIGT, SLOPE, RHO, ALAM,
+     &        SSIGT, SSIGEL, SSIGQE, SIGSD, SIGQSD )
+         SSIGA(J,1) = SSIGT-SSIGQE ! had-air production cross section
+         SSIG0(J,1) = SIGINEL   ! had-nucleon inel. cross section
+         ALINT(J,1) = 1.D0/(AVOG*SSIGA(J,1)/ATARGET) ! interaction length in air
+C...pi-air
+         CALL SIGMA_PIP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
+         CALL  SIG_H_AIR (SIGT, SLOPE, RHO, ALAM,
+     &        SSIGT, SSIGEL, SSIGQE, SIGSD, SIGQSD )
+         SSIGA(J,2) = SSIGT-SSIGQE
+         SSIG0(J,2) = SIGINEL
+         ALINT(J,2) = 1.D0/(AVOG*SSIGA(J,2)/ATARGET)
+C...K-air
+         CALL SIGMA_KP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
+         CALL  SIG_H_AIR (SIGT, SLOPE, RHO, ALAM,
+     &        SSIGT, SSIGEL, SSIGQE, SIGSD, SIGQSD )
+         SSIGA(J,3) = SSIGT-SSIGQE
+         SSIG0(J,3) = SIGINEL
+         ALINT(J,3) = 1.D0/(AVOG*SSIGA(J,3)/ATARGET)
+      ENDDO
+
+      if (ndebug .gt. 0 ) THEN
+        WRITE(LUN,'(1X,A)') 
+     &  ' SIGMA_INI: NUCLIB interaction lengths [g/cm**2]'
+        WRITE(LUN,'(1X,A)') 
+     &  '     sqs,       p-air,      pi-air,     K-air'
+      DO J=1,NSQS
+         SQS = 10.D0**(ASQSMIN + DASQS*DBLE(J-1))
+         WRITE(LUN,'(1X,1P,4E12.3)') 
+     &        SQS,ALINT(J,1),ALINT(J,2),ALINT(J,3)
+        ENDDO
+      endif
+
+      RETURN
+      END
+
+C=======================================================================
+
+      FUNCTION FPNI (E,Linp)
+
+C-----------------------------------------------------------------------
+C...This function  returns the interaction length 
+C.  of an hadronic particle travelling in air
+C.
+C.  INPUT:   E (TeV)   particle energy
+C.           Linp      particle code
+C.  OUTPUT:  FPNI      (g cm-2)
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+            
+      COMMON /CSAIR/ ASQSMIN, ASQSMAX, DASQS,
+     &     SSIG0(61,3),SSIGA(61,3),ALINT(61,3),NSQS
+
+      DIMENSION KK(6:14)
+      SAVE
+      DATA KK /3*2, 4*3, 2*1/
+
+      SQS = SQRT(2000.D0*E*0.937D0)                        ! GeV
+      AL = LOG10 (SQS)
+      L = abs(Linp)
+      IF (AL .LE. ASQSMIN)  THEN
+         FPNI = ALINT(1,KK(L))
+      ELSE
+         T = (AL-ASQSMIN)/DASQS
+         J = INT(T)
+         J = MIN(J,NSQS-2)
+         T = T-DBLE(J)
+         FPNI = ((1.D0-T)*ALINT(J+1,KK(L)) + T*ALINT(J+2,KK(L)))
+      ENDIF
+      RETURN
+      END
+
+C=======================================================================
+      
+      FUNCTION FSIGHAIR (E,Linp)
+
+C-----------------------------------------------------------------------
+C...This function returns the production cross section
+C.  of an hadronic particle with air calculated in NUCLIB (SIGMA_INI)     
+C.
+C.  INPUT:   E (TeV)   particle energy
+C.           Linp      particle code
+C.  OUTPUT:  SIG_PROD  (mb)
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+            
+      COMMON /CSAIR/ ASQSMIN, ASQSMAX, DASQS,
+     &     SSIG0(61,3),SSIGA(61,3),ALINT(61,3),NSQS
+
+      DIMENSION KK(6:14)
+      SAVE
+      DATA KK /3*2, 4*3, 2*1/
+
+      SQS = SQRT(2000.D0*E*0.937D0)                        ! GeV
+      AL = LOG10 (SQS)
+      L = abs(Linp)
+      IF (AL .LE. ASQSMIN)  THEN
+         FSIGHAIR = SSIGA(1,KK(L))
+      ELSE
+         T = (AL-ASQSMIN)/DASQS
+         J = INT(T)
+         J = MIN(J,NSQS-2)
+         T = T-DBLE(J)
+         FSIGHAIR = ((1.D0-T)*SSIGA(J+1,KK(L)) + T*SSIGA(J+2,KK(L)))
+      ENDIF     
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE INT_LEN_INI
+
+C-----------------------------------------------------------------------
+C...Initialize the interaction lengths from NUCLIB
+C-----------------------------------------------------------------------
+      SAVE
+      
+      CALL NUC_GEOM_INI                 ! nucleus profiles
+      CALL SIGMA_INI                    ! initialize cross sections
+
+      RETURN
+      END
+C=======================================================================
diff --git a/Processes/Sibyll/nuclib.h b/Processes/Sibyll/nuclib.h
new file mode 100644
index 0000000000000000000000000000000000000000..8653b2cc2aae811f330cd54f1d058456da4742f3
--- /dev/null
+++ b/Processes/Sibyll/nuclib.h
@@ -0,0 +1,50 @@
+
+/**
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#ifndef _include_nuclib_interface_h_
+#define _include_nuclib_interface_h_
+
+extern "C" {
+
+// nuclib common, NUClear Multiple Scattering
+/*
+    COMMON /CNUCMS/ B, BMAX, NTRY, NA, NB, NI, NAEL, NBEL
+   +         ,JJA(IAMAX), JJB(IAMAX), JJINT(IAMAX,IAMAX)
+   +         ,JJAEL(IAMAX), JJBEL(IAMAX)
+ */
+
+extern struct {
+  double b, bmax;
+  int ntry, na, nb, ni, nael, nbel;
+  int jja[56], jjb[56], jjint[56][56], jjael[56], jjbel[56];
+} cnucms_;
+
+/*
+  nuclib common, nuclear FRAGMENTS
+
+  COMMON /FRAGMENTS/ PPP(3,60)
+*/
+extern struct { double ppp[60][3]; } fragments_;
+
+// NUCLIB
+
+// subroutine to initiate nuclib
+void nuc_nuc_ini_();
+
+// subroutine to sample nuclear interaction structure
+void int_nuc_(const int&, const int&, const double&, const double&);
+
+// subroutine to sample nuclear fragments
+void fragm_(const int&, const int&, const int&, const double&, int&, int*);
+
+void signuc_(const int&, const double&, double&);
+}
+#endif
diff --git a/Processes/Sibyll/sibyll2.3c.cc b/Processes/Sibyll/sibyll2.3c.cc
index f614b596bdcb376fc138af70a1af6539852b54f0..61766ff1128564977ddf296387389fc7e24a20f0 100644
--- a/Processes/Sibyll/sibyll2.3c.cc
+++ b/Processes/Sibyll/sibyll2.3c.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/Sibyll/sibyll2.3c.f b/Processes/Sibyll/sibyll2.3c.f
index 7f7d524d3c84fc2d5645a7d05d6b3ff134184c3e..e1f07491be0e017d84ac1f809ea00301615f4356 100644
--- a/Processes/Sibyll/sibyll2.3c.f
+++ b/Processes/Sibyll/sibyll2.3c.f
@@ -5516,7 +5516,7 @@ c     external type declarations
 
 c     local type declarations
       DOUBLE PRECISION SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO,
-     &     SIGPROD,SIGBDIF,S_RNDM,S,PF,PB,PD,P0,P1,P2,R
+     &     SIGPROD,SIGBDIF,SIGELA,S_RNDM,S,PF,PB,PD,P0,P1,P2,R
       DIMENSION SIGDIF(3)
       INTEGER K
       SAVE
@@ -5534,7 +5534,7 @@ c     read hadron-nucleon cross section from table
 c     distinguish between nuclear cross sections..
                IF(IAFLG.eq.0)THEN
 c     if target is nucleus calc. hadron-nucleus cross section (slow)
-                  CALL SIB_SIGMA_HNUC(L,IA,SQS,SIGprod,SIGbdif)
+                  CALL SIB_SIGMA_HNUC(L,IA,SQS,SIGprod,SIGbdif,SIGela)
                ELSE
 c     if target is air read hadron-air cross section from table
                   CALL SIB_SIGMA_HAIR(L,SQS,SIGprod,SIGbdif)
@@ -14010,7 +14010,7 @@ c     internal
       END
 C=======================================================================
 
-      SUBROUTINE SIB_SIGMA_HNUC (L,IAT,SQS,SIGprod,SIGbdif) 
+      SUBROUTINE SIB_SIGMA_HNUC (L,IAT,SQS,SIGprod,SIGbdif,SIGela) 
 
 C-----------------------------------------------------------------------
 C     calculate Hadron-nucleus cross sections
@@ -14061,7 +14061,7 @@ C--------------------------------------------------------------------
      +     SIGQSD,SIGPPT,SIGPPEL,SIGPPSD,ITG
 
 c     external
-      DOUBLE PRECISION SQS,SIGPROD,SIGBDIF
+      DOUBLE PRECISION SQS,SIGPROD,SIGBDIF,SIGELA
       INTEGER L,IAT
 
 c     internal
@@ -14092,6 +14092,8 @@ C     particle production cross section
          SIGprod = SIGT-SIGQE
 C     quasi elastic + elastic singl. diff cross section
          SIGbdif = SIGQSD
+c     elastic cross section
+         SIGela = SIGel
          if(ndebug.gt.0)THEN
             WRITE(LUN,'(1X,A,3F8.2)')
      &           'SIB_SIGMA_HNUC: SIGprod, SIGbdif, ALAM:',
@@ -17734,3561 +17736,8 @@ c     Knuth shuffle..
       KF2=KPL(2)*10+KPL(3)     
       END
             
-C.=========================================================================
-C.  Library of programs for the generation of nucleus-nucleus interactions
-C.  and the study of nucleus-induced cosmic ray showers
-C.
-C.  September 2001  changes in FPNI, and SIGMA_INI,
-C.                  new SIGMA_PP, SIGMA_PPI, SIGMA_KP  (R. Engel)
-C.
-C.  may  1996       small bug  corrected by Dieter Heck in NUC_CONF 
-C.
-C.  march 1996      small modification to the superposition code
-C.
-C.  February 1996   change to FPNI to give an interaction length
-C.                   also  at very low energy  
-C.
-C.  Version 1.01  september 1995 
-C.       (small corrections P.L.)
-C.       the random number generator is called as S_RNDM(0)
-C.  ------------------------------------------------------
-C.  Version 1.00  April 1992
-C.
-C.  Authors:
-C.
-C.     J. Engel
-C.     T.K Gaisser
-C.     P.Lipari
-C.     T. Stanev
-C. 
-C.  This set of routines  when used in  the simulation of cosmic ray
-C.  showers have only three  "contact points" with the "external world"
-C.
-C.    (i) SUBROUTINE NUC_NUC_INI
-C.        (no  calling arguments)         
-C.         to be called once during general initialization
-C.    (ii) SUBROUTINE HEAVY (IA, E0)
-C.         where IA (integer) is the mass number of the projectile
-C.         nucleus  and E0 (TeV) is the energy per nucleon
-C.         The output (positions of first interaction for the IA
-C.         nucleons of the projectile) is  contained in  the common block:
-C.           COMMON /C1STNC/ XX0(60),XX(60),YY(60),AX(60),AY(60)
-C.         In detail:
-C.             XX0(j)   (g cm-2) =  position of interaction
-C.             XX(j) (mm)    x-distance from shower axis
-C.             YY(j) (mm)    y-distance from shower axis
-C.             AX(j) (radiants)  Theta_x with respect to original direction
-C.             AY(j) (radiants)  Theta_y with respect to original direction
-C.      
-C.    (iii)  FUNCTION FPNI (E,L)
-C.           Interaction length in air.
-C.           E (TeV) is the energy of the particle, L is the particle
-C.           code (NOTE: "Sibyll" codes are used : L =1-18) 
-C.           WANRNING : The nucleus-nucleus cross section
-C.           tabulated in the program are "matched" to the p-Air
-C.           cross section calculated  with this FUNCTION, in other words 
-C.           they are both calculated with the same input pp cross section
-C==========================================================================
-
-      SUBROUTINE NUC_NUC_INI
-
-C-----------------------------------------------------------------------
-C...Initialization for the generation of nucleus-nucleus interactions
-C.  INPUT : E0 (TeV) Energy per nucleon of the beam nucleus
-C........................................................................
-      SAVE
-
-      CALL NUC_GEOM_INI                       ! nucleus profiles
-      CALL SIGMA_INI                          ! initialize pp cross sections
-
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE FRAGM1 (IA,NW, NF, IAF)
-
-C-----------------------------------------------------------------------
-C...Nuclear Fragmentation 
-C.  total dissolution of nucleus
-C.......................................................................
-      SAVE
-
-      DIMENSION IAF(60)
-      NF = IA-NW
-      DO J=1,NF
-         IAF(J) = 1
-      ENDDO
-      RETURN
-      END
-C->
-C=======================================================================
-
-      SUBROUTINE FRAGM2 (IA,NW, NF, IAF)
-
-C-----------------------------------------------------------------------
-C...Nuclear Fragmentation 
-C.  Spectator in one single fragment 
-C.......................................................................
-      SAVE
-
-      DIMENSION IAF(60)
-      IF (IA-NW .GT. 0)  THEN
-         NF = 1
-         IAF(1) = IA-NW
-      ELSE
-         NF = 0
-      ENDIF
-      RETURN
-      END
-
-C-----------------------------------------------------------------------
-C...Code of fragmentation  of spectator nucleons
-C.  based on Jon Engel  abrasion-ablation algorithms
-C=======================================================================
-
-      BLOCK DATA FRAG_DATA
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-C...Data for the fragmentation of  nucleus  projectiles
-      COMMON /FRAGMOD/A(10,10,20),AE(10,10,20),ERES(10,10),NFLAGG(10,10)
-      SAVE
-      DATA (NFLAGG(I, 1),I=1,10)  / 
-     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
-      DATA (NFLAGG(I, 2),I=1,10)  / 
-     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
-      DATA (NFLAGG(I, 3),I=1,10)  / 
-     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
-      DATA (NFLAGG(I, 4),I=1,10)  / 
-     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
-      DATA (NFLAGG(I, 5),I=1,10)  / 
-     +    0,  0,  0,  0,  0,  0,  0,  0,  0,  0 /
-      DATA (NFLAGG(I, 6),I=1,10)  / 
-     +    0,  0,  0,  0,  0,  0,  0,  1,  1,  1 /
-      DATA (NFLAGG(I, 7),I=1,10)  / 
-     +    1,  1,  1,  1,  1,  1,  1,  1,  1,  1 /
-      DATA (NFLAGG(I, 8),I=1,10)  / 
-     +    1,  1,  1,  1,  1,  1,  1,  1,  1,  1 /
-      DATA (NFLAGG(I, 9),I=1,10)  / 
-     +    1,  1,  1,  1,  1,  1,  1,  1,  1,  1 /
-      DATA (NFLAGG(I,10),I=1,10)  / 
-     +    1,  1,  1,  1,  1,  1,  1,  1,  1,  1 /
-      DATA (A(I, 1, 1),I=1,10)  / 
-     +  .438D-01,.172D0  ,.283D0  ,.511D0  ,.715D0  ,.920D0  ,1.19D0  ,
-     +  1.37D0  ,1.65D0  ,2.14D0   /
-      DATA (A(I, 1, 2),I=1,10)  / 
-     +  .147D-01,.249D-01,.439D-01,.592D-01,.776D-01,.886D-01,.108D0  ,
-     +  .117D0  ,.126D0  ,.128D0   /
-      DATA (A(I, 1, 3),I=1,10)  / 
-     +  .216D-02,.627D-02,.834D-02,.108D-01,.144D-01,.152D-01,.196D-01,
-     +  .200D-01,.210D-01,.224D-01 /
-      DATA (A(I, 1, 4),I=1,10)  / 
-     +  .593D-01,.653D-01,.116D0  ,.145D0  ,.184D0  ,.204D0  ,.234D0  ,
-     +  .257D0  ,.271D0  ,.248D0   /
-      DATA (A(I, 1, 5),I=1,10)  / 
-     +  .000D+00,.918D-02,.362D-02,.805D-02,.436D-02,.728D-02,.466D-02,
-     +  .707D-02,.932D-02,.130D-01 /
-      DATA (A(I, 1, 6),I=1,10)  / 
-     +  .000D+00,.180D-02,.247D-02,.208D-02,.224D-02,.214D-02,.226D-02,
-     +  .233D-02,.230D-02,.194D-02 /
-      DATA (A(I, 1, 7),I=1,10)  / 
-     +  .000D+00,.106D-02,.703D-03,.687D-03,.739D-03,.674D-03,.819D-03,
-     +  .768D-03,.756D-03,.720D-03 /
-      DATA (A(I, 1, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.188D-02,.130D-02,.138D-02,.117D-02,.124D-02,
-     +  .119D-02,.111D-02,.829D-03 /
-      DATA (A(I, 1, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.302D-03,.258D-03,.249D-03,.208D-03,.248D-03,
-     +  .222D-03,.210D-03,.187D-03 /
-      DATA (A(I, 1,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.235D-03,.222D-03,.172D-03,.181D-03,
-     +  .166D-03,.152D-03,.124D-03 /
-      DATA (A(I, 1,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.238D-03,.179D-03,.145D-03,.156D-03,
-     +  .138D-03,.129D-03,.111D-03 /
-      DATA (A(I, 1,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.368D-03,.400D-03,.255D-03,.262D-03,
-     +  .221D-03,.182D-03,.112D-03 /
-      DATA (A(I, 1,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.753D-04,.712D-04,.527D-04,
-     +  .537D-04,.538D-04,.487D-04 /
-      DATA (A(I, 1,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.103D-03,.589D-04,.578D-04,
-     +  .468D-04,.385D-04,.269D-04 /
-      DATA (A(I, 1,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.444D-04,.372D-04,
-     +  .318D-04,.284D-04,.218D-04 /
-      DATA (A(I, 1,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.487D-04,.473D-04,
-     +  .338D-04,.243D-04,.122D-04 /
-      DATA (A(I, 1,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.121D-04,.117D-04,
-     +  .932D-05,.792D-05,.583D-05 /
-      DATA (A(I, 1,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.147D-04,
-     +  .101D-04,.756D-05,.496D-05 /
-      DATA (A(I, 1,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.755D-05,
-     +  .612D-05,.505D-05,.341D-05 /
-      DATA (A(I, 1,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .630D-05,.444D-05,.282D-05 /
-      DATA (A(I, 2, 1),I=1,10)  / 
-     +  .269D0  ,.510D0  ,.738D0  ,1.12D0  ,1.46D0  ,1.83D0  ,2.22D0  ,
-     +  2.57D0  ,3.00D0  ,3.67D0   /
-      DATA (A(I, 2, 2),I=1,10)  / 
-     +  .121D0  ,.133D0  ,.190D0  ,.234D0  ,.293D0  ,.332D0  ,.395D0  ,
-     +  .431D0  ,.468D0  ,.502D0   /
-      DATA (A(I, 2, 3),I=1,10)  / 
-     +  .227D-01,.374D-01,.474D-01,.578D-01,.722D-01,.794D-01,.960D-01,
-     +  .102D0  ,.110D0  ,.120D0   /
-      DATA (A(I, 2, 4),I=1,10)  / 
-     +  .287D0  ,.196D0  ,.270D0  ,.314D0  ,.373D0  ,.408D0  ,.462D0  ,
-     +  .498D0  ,.529D0  ,.523D0   /
-      DATA (A(I, 2, 5),I=1,10)  / 
-     +  .000D+00,.433D-01,.218D-01,.384D-01,.263D-01,.385D-01,.298D-01,
-     +  .405D-01,.504D-01,.671D-01 /
-      DATA (A(I, 2, 6),I=1,10)  / 
-     +  .000D+00,.151D-01,.177D-01,.159D-01,.173D-01,.173D-01,.187D-01,
-     +  .196D-01,.201D-01,.191D-01 /
-      DATA (A(I, 2, 7),I=1,10)  / 
-     +  .000D+00,.457D-02,.607D-02,.610D-02,.677D-02,.670D-02,.784D-02,
-     +  .787D-02,.806D-02,.803D-02 /
-      DATA (A(I, 2, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.702D-02,.536D-02,.558D-02,.510D-02,.554D-02,
-     +  .546D-02,.538D-02,.489D-02 /
-      DATA (A(I, 2, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.190D-02,.199D-02,.205D-02,.191D-02,.221D-02,
-     +  .214D-02,.213D-02,.204D-02 /
-      DATA (A(I, 2,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.226D-02,.219D-02,.195D-02,.208D-02,
-     +  .204D-02,.203D-02,.194D-02 /
-      DATA (A(I, 2,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.213D-02,.195D-02,.175D-02,.191D-02,
-     +  .183D-02,.179D-02,.166D-02 /
-      DATA (A(I, 2,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.588D-03,.186D-02,.137D-02,.141D-02,
-     +  .128D-02,.117D-02,.947D-03 /
-      DATA (A(I, 2,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.554D-03,.562D-03,.454D-03,
-     +  .485D-03,.505D-03,.509D-03 /
-      DATA (A(I, 2,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.490D-03,.533D-03,.531D-03,
-     +  .476D-03,.437D-03,.369D-03 /
-      DATA (A(I, 2,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.427D-03,.382D-03,
-     +  .358D-03,.340D-03,.294D-03 /
-      DATA (A(I, 2,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.239D-03,.298D-03,
-     +  .238D-03,.196D-03,.134D-03 /
-      DATA (A(I, 2,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.299D-04,.893D-04,
-     +  .796D-04,.744D-04,.683D-04 /
-      DATA (A(I, 2,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.127D-03,
-     +  .107D-03,.916D-04,.720D-04 /
-      DATA (A(I, 2,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.397D-04,
-     +  .630D-04,.565D-04,.461D-04 /
-      DATA (A(I, 2,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .511D-04,.459D-04,.402D-04 /
-      DATA (A(I, 3, 1),I=1,10)  / 
-     +  .708D0  ,1.02D0  ,1.41D0  ,1.91D0  ,2.42D0  ,3.00D0  ,3.53D0  ,
-     +  4.09D0  ,4.71D0  ,5.57D0   /
-      DATA (A(I, 3, 2),I=1,10)  / 
-     +  .397D0  ,.410D0  ,.539D0  ,.648D0  ,.795D0  ,.910D0  ,1.06D0  ,
-     +  1.17D0  ,1.29D0  ,1.42D0   /
-      DATA (A(I, 3, 3),I=1,10)  / 
-     +  .845D-01,.122D0  ,.157D0  ,.190D0  ,.232D0  ,.262D0  ,.307D0  ,
-     +  .335D0  ,.366D0  ,.402D0   /
-      DATA (A(I, 3, 4),I=1,10)  / 
-     +  .210D0  ,.379D0  ,.450D0  ,.490D0  ,.574D0  ,.636D0  ,.709D0  ,
-     +  .769D0  ,.820D0  ,.849D0   /
-      DATA (A(I, 3, 5),I=1,10)  / 
-     +  .000D+00,.102D0  ,.675D-01,.104D0  ,.858D-01,.115D0  ,.102D0  ,
-     +  .129D0  ,.154D0  ,.194D0   /
-      DATA (A(I, 3, 6),I=1,10)  / 
-     +  .000D+00,.392D-01,.615D-01,.593D-01,.649D-01,.674D-01,.735D-01,
-     +  .779D-01,.817D-01,.828D-01 /
-      DATA (A(I, 3, 7),I=1,10)  / 
-     +  .000D+00,.539D-02,.222D-01,.238D-01,.269D-01,.280D-01,.320D-01,
-     +  .334D-01,.350D-01,.361D-01 /
-      DATA (A(I, 3, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.838D-02,.130D-01,.133D-01,.131D-01,.141D-01,
-     +  .144D-01,.149D-01,.152D-01 /
-      DATA (A(I, 3, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.228D-02,.647D-02,.688D-02,.687D-02,.772D-02,
-     +  .786D-02,.811D-02,.824D-02 /
-      DATA (A(I, 3,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.664D-02,.828D-02,.802D-02,.845D-02,
-     +  .869D-02,.902D-02,.930D-02 /
-      DATA (A(I, 3,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.338D-02,.735D-02,.710D-02,.767D-02,
-     +  .767D-02,.776D-02,.756D-02 /
-      DATA (A(I, 3,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.280D-03,.262D-02,.349D-02,.342D-02,
-     +  .322D-02,.312D-02,.291D-02 /
-      DATA (A(I, 3,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.618D-03,.161D-02,.138D-02,
-     +  .148D-02,.155D-02,.166D-02 /
-      DATA (A(I, 3,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.313D-03,.128D-02,.161D-02,
-     +  .150D-02,.144D-02,.134D-02 /
-      DATA (A(I, 3,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.645D-03,.118D-02,
-     +  .115D-02,.111D-02,.103D-02 /
-      DATA (A(I, 3,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.117D-03,.497D-03,
-     +  .581D-03,.501D-03,.401D-03 /
-      DATA (A(I, 3,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.115D-04,.997D-04,
-     +  .202D-03,.203D-03,.206D-03 /
-      DATA (A(I, 3,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.877D-04,
-     +  .242D-03,.263D-03,.226D-03 /
-      DATA (A(I, 3,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.158D-04,
-     +  .881D-04,.152D-03,.136D-03 /
-      DATA (A(I, 3,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .358D-04,.997D-04,.117D-03 /
-      DATA (A(I, 4, 1),I=1,10)  / 
-     +  .945D0  ,1.29D0  ,1.40D0  ,1.98D0  ,2.73D0  ,3.17D0  ,3.77D0  ,
-     +  4.29D0  ,4.78D0  ,5.54D0   /
-      DATA (A(I, 4, 2),I=1,10)  / 
-     +  .581D0  ,.599D0  ,.645D0  ,.839D0  ,1.10D0  ,1.25D0  ,1.47D0  ,
-     +  1.64D0  ,1.78D0  ,1.99D0   /
-      DATA (A(I, 4, 3),I=1,10)  / 
-     +  .127D0  ,.182D0  ,.202D0  ,.264D0  ,.344D0  ,.387D0  ,.455D0  ,
-     +  .504D0  ,.549D0  ,.611D0   /
-      DATA (A(I, 4, 4),I=1,10)  / 
-     +  .183D0  ,.464D0  ,.351D0  ,.444D0  ,.642D0  ,.659D0  ,.772D0  ,
-     +  .830D0  ,.882D0  ,.930D0   /
-      DATA (A(I, 4, 5),I=1,10)  / 
-     +  .000D+00,.122D0  ,.803D-01,.136D0  ,.134D0  ,.173D0  ,.164D0  ,
-     +  .203D0  ,.239D0  ,.300D0   /
-      DATA (A(I, 4, 6),I=1,10)  / 
-     +  .000D+00,.393D-01,.766D-01,.872D-01,.108D0  ,.111D0  ,.123D0  ,
-     +  .132D0  ,.139D0  ,.145D0   /
-      DATA (A(I, 4, 7),I=1,10)  / 
-     +  .000D+00,.416D-02,.289D-01,.360D-01,.454D-01,.477D-01,.549D-01,
-     +  .583D-01,.618D-01,.654D-01 /
-      DATA (A(I, 4, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.761D-02,.157D-01,.214D-01,.205D-01,.233D-01,
-     +  .241D-01,.255D-01,.271D-01 /
-      DATA (A(I, 4, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.238D-02,.803D-02,.123D-01,.123D-01,.140D-01,
-     +  .145D-01,.153D-01,.160D-01 /
-      DATA (A(I, 4,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.695D-02,.150D-01,.154D-01,.166D-01,
-     +  .172D-01,.181D-01,.192D-01 /
-      DATA (A(I, 4,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.355D-02,.104D-01,.143D-01,.156D-01,
-     +  .158D-01,.164D-01,.165D-01 /
-      DATA (A(I, 4,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.112D-03,.276D-02,.568D-02,.736D-02,
-     +  .684D-02,.691D-02,.661D-02 /
-      DATA (A(I, 4,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.740D-03,.222D-02,.339D-02,
-     +  .352D-02,.382D-02,.409D-02 /
-      DATA (A(I, 4,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.369D-03,.160D-02,.322D-02,
-     +  .375D-02,.375D-02,.355D-02 /
-      DATA (A(I, 4,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.750D-03,.190D-02,
-     +  .298D-02,.319D-02,.299D-02 /
-      DATA (A(I, 4,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.260D-03,.673D-03,
-     +  .117D-02,.156D-02,.126D-02 /
-      DATA (A(I, 4,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.283D-05,.131D-03,
-     +  .363D-03,.618D-03,.690D-03 /
-      DATA (A(I, 4,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.205D-03,
-     +  .378D-03,.709D-03,.844D-03 /
-      DATA (A(I, 4,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.654D-05,
-     +  .150D-03,.341D-03,.527D-03 /
-      DATA (A(I, 4,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .957D-04,.197D-03,.406D-03 /
-      DATA (A(I, 5, 1),I=1,10)  / 
-     +  1.16D0  ,1.70D0  ,2.19D0  ,2.79D0  ,3.33D0  ,3.90D0  ,4.49D0  ,
-     +  5.07D0  ,5.66D0  ,6.38D0   /
-      DATA (A(I, 5, 2),I=1,10)  / 
-     +  .779D0  ,.899D0  ,1.09D0  ,1.28D0  ,1.51D0  ,1.71D0  ,1.96D0  ,
-     +  2.18D0  ,2.39D0  ,2.62D0   /
-      DATA (A(I, 5, 3),I=1,10)  / 
-     +  .167D0  ,.263D0  ,.334D0  ,.408D0  ,.482D0  ,.548D0  ,.632D0  ,
-     +  .700D0  ,.767D0  ,.840D0   /
-      DATA (A(I, 5, 4),I=1,10)  / 
-     +  .203D0  ,.565D0  ,.845D0  ,.867D0  ,.906D0  ,.961D0  ,1.08D0  ,
-     +  1.13D0  ,1.21D0  ,1.25D0   /
-      DATA (A(I, 5, 5),I=1,10)  / 
-     +  .000D+00,.129D0  ,.152D0  ,.237D0  ,.208D0  ,.268D0  ,.258D0  ,
-     +  .312D0  ,.368D0  ,.450D0   /
-      DATA (A(I, 5, 6),I=1,10)  / 
-     +  .000D+00,.460D-01,.126D0  ,.174D0  ,.182D0  ,.188D0  ,.208D0  ,
-     +  .219D0  ,.233D0  ,.239D0   /
-      DATA (A(I, 5, 7),I=1,10)  / 
-     +  .000D+00,.289D-02,.380D-01,.611D-01,.788D-01,.845D-01,.974D-01,
-     +  .103D0  ,.111D0  ,.117D0   /
-      DATA (A(I, 5, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.137D-01,.223D-01,.374D-01,.436D-01,.488D-01,
-     +  .488D-01,.524D-01,.547D-01 /
-      DATA (A(I, 5, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.162D-02,.114D-01,.198D-01,.263D-01,.315D-01,
-     +  .323D-01,.348D-01,.364D-01 /
-      DATA (A(I, 5,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.149D-01,.240D-01,.320D-01,.428D-01,
-     +  .436D-01,.469D-01,.493D-01 /
-      DATA (A(I, 5,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.562D-02,.194D-01,.290D-01,.408D-01,
-     +  .460D-01,.492D-01,.500D-01 /
-      DATA (A(I, 5,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.476D-04,.106D-01,.134D-01,.191D-01,
-     +  .227D-01,.264D-01,.253D-01 /
-      DATA (A(I, 5,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.281D-02,.679D-02,.879D-02,
-     +  .123D-01,.165D-01,.190D-01 /
-      DATA (A(I, 5,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.542D-04,.847D-02,.125D-01,
-     +  .144D-01,.173D-01,.192D-01 /
-      DATA (A(I, 5,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.652D-02,.982D-02,
-     +  .129D-01,.159D-01,.192D-01 /
-      DATA (A(I, 5,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.109D-03,.688D-02,
-     +  .751D-02,.845D-02,.905D-02 /
-      DATA (A(I, 5,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.823D-06,.237D-02,
-     +  .318D-02,.446D-02,.569D-02 /
-      DATA (A(I, 5,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.604D-03,
-     +  .610D-02,.673D-02,.827D-02 /
-      DATA (A(I, 5,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.716D-06,
-     +  .412D-02,.519D-02,.617D-02 /
-      DATA (A(I, 5,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .710D-03,.543D-02,.674D-02 /
-      DATA (A(I, 6, 1),I=1,10)  / 
-     +  1.36D0  ,2.08D0  ,2.67D0  ,3.30D0  ,3.94D0  ,4.62D0  ,5.18D0  ,
-     +  3.60D0  ,3.64D0  ,3.95D0   /
-      DATA (A(I, 6, 2),I=1,10)  / 
-     +  1.07D0  ,1.33D0  ,1.58D0  ,1.82D0  ,2.10D0  ,2.44D0  ,2.74D0  ,
-     +  1.78D0  ,1.73D0  ,1.80D0   /
-      DATA (A(I, 6, 3),I=1,10)  / 
-     +  .158D0  ,.276D0  ,.402D0  ,.506D0  ,.609D0  ,.700D0  ,.802D0  ,
-     +  .638D0  ,.629D0  ,.658D0   /
-      DATA (A(I, 6, 4),I=1,10)  / 
-     +  .308D0  ,.739D0  ,1.02D0  ,1.12D0  ,1.26D0  ,1.35D0  ,1.57D0  ,
-     +  1.94D0  ,1.71D0  ,1.55D0   /
-      DATA (A(I, 6, 5),I=1,10)  / 
-     +  .000D+00,.217D0  ,.183D0  ,.324D0  ,.276D0  ,.395D0  ,.393D0  ,
-     +  .558D0  ,.602D0  ,.681D0   /
-      DATA (A(I, 6, 6),I=1,10)  / 
-     +  .000D+00,.658D-01,.251D0  ,.267D0  ,.299D0  ,.326D0  ,.386D0  ,
-     +  .452D0  ,.475D0  ,.409D0   /
-      DATA (A(I, 6, 7),I=1,10)  / 
-     +  .000D+00,.198D-02,.774D-01,.136D0  ,.149D0  ,.164D0  ,.187D0  ,
-     +  .210D0  ,.238D0  ,.256D0   /
-      DATA (A(I, 6, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.290D-01,.122D0  ,.139D0  ,.128D0  ,.129D0  ,
-     +  .137D0  ,.147D0  ,.167D0   /
-      DATA (A(I, 6, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.699D-03,.617D-01,.750D-01,.801D-01,.905D-01,
-     +  .974D-01,.105D0  ,.122D0   /
-      DATA (A(I, 6,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.310D-01,.112D0  ,.127D0  ,.140D0  ,
-     +  .143D0  ,.155D0  ,.176D0   /
-      DATA (A(I, 6,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.277D-02,.889D-01,.143D0  ,.150D0  ,
-     +  .175D0  ,.184D0  ,.208D0   /
-      DATA (A(I, 6,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.202D-04,.343D-01,.959D-01,.109D0  ,
-     +  .115D0  ,.112D0  ,.116D0   /
-      DATA (A(I, 6,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.186D-02,.435D-01,.512D-01,
-     +  .744D-01,.856D-01,.103D0   /
-      DATA (A(I, 6,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.144D-04,.427D-01,.786D-01,
-     +  .911D-01,.993D-01,.108D0   /
-      DATA (A(I, 6,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.466D-02,.518D-01,
-     +  .848D-01,.109D0  ,.119D0   /
-      DATA (A(I, 6,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.655D-05,.330D-01,
-     +  .586D-01,.617D-01,.594D-01 /
-      DATA (A(I, 6,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.228D-06,.328D-02,
-     +  .190D-01,.301D-01,.454D-01 /
-      DATA (A(I, 6,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.218D-04,
-     +  .272D-01,.501D-01,.707D-01 /
-      DATA (A(I, 6,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.146D-06,
-     +  .441D-02,.378D-01,.556D-01 /
-      DATA (A(I, 6,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .160D-03,.204D-01,.679D-01 /
-      DATA (A(I, 7, 1),I=1,10)  / 
-     +  .522D0  ,.862D0  ,1.14D0  ,1.40D0  ,1.70D0  ,1.94D0  ,2.26D0  ,
-     +  2.48D0  ,2.72D0  ,3.95D0   /
-      DATA (A(I, 7, 2),I=1,10)  / 
-     +  .314D0  ,.450D0  ,.588D0  ,.692D0  ,.834D0  ,.936D0  ,1.09D0  ,
-     +  1.18D0  ,1.28D0  ,1.80D0   /
-      DATA (A(I, 7, 3),I=1,10)  / 
-     +  .814D-01,.147D0  ,.189D0  ,.226D0  ,.272D0  ,.302D0  ,.351D0  ,
-     +  .378D0  ,.406D0  ,.658D0   /
-      DATA (A(I, 7, 4),I=1,10)  / 
-     +  .252D0  ,.864D0  ,1.01D0  ,.851D0  ,.837D0  ,.774D0  ,.763D0  ,
-     +  .757D0  ,.748D0  ,1.55D0   /
-      DATA (A(I, 7, 5),I=1,10)  / 
-     +  .000D+00,.225D0  ,.180D0  ,.276D0  ,.193D0  ,.240D0  ,.190D0  ,
-     +  .228D0  ,.259D0  ,.681D0   /
-      DATA (A(I, 7, 6),I=1,10)  / 
-     +  .000D+00,.485D-01,.272D0  ,.273D0  ,.253D0  ,.216D0  ,.206D0  ,
-     +  .197D0  ,.191D0  ,.409D0   /
-      DATA (A(I, 7, 7),I=1,10)  / 
-     +  .000D+00,.137D-02,.752D-01,.137D0  ,.152D0  ,.134D0  ,.125D0  ,
-     +  .119D0  ,.116D0  ,.256D0   /
-      DATA (A(I, 7, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.220D-01,.155D0  ,.175D0  ,.155D0  ,.116D0  ,
-     +  .977D-01,.858D-01,.167D0   /
-      DATA (A(I, 7, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.326D-03,.695D-01,.881D-01,.106D0  ,.897D-01,
-     +  .782D-01,.706D-01,.122D0   /
-      DATA (A(I, 7,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.261D-01,.124D0  ,.131D0  ,.156D0  ,
-     +  .141D0  ,.121D0  ,.176D0   /
-      DATA (A(I, 7,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.785D-03,.864D-01,.130D0  ,.170D0  ,
-     +  .182D0  ,.172D0  ,.208     /
-      DATA (A(I, 7,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.896D-05,.225D-01,.105D0  ,.126D0  ,
-     +  .126D0  ,.135D0  ,.116D0   /
-      DATA (A(I, 7,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.542D-03,.427D-01,.553D-01,
-     +  .744D-01,.980D-01,.103D0   /
-      DATA (A(I, 7,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.515D-05,.377D-01,.831D-01,
-     +  .985D-01,.104D0  ,.108D0   /
-      DATA (A(I, 7,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.285D-02,.495D-01,
-     +  .871D-01,.106D0  ,.119D0   /
-      DATA (A(I, 7,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.110D-05,.284D-01,
-     +  .588D-01,.657D-01,.594D-01 /
-      DATA (A(I, 7,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.722D-07,.176D-02,
-     +  .170D-01,.305D-01,.454D-01 /
-      DATA (A(I, 7,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.148D-05,
-     +  .213D-01,.492D-01,.707D-01 /
-      DATA (A(I, 7,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.323D-07,
-     +  .722D-02,.359D-01,.556D-01 /
-      DATA (A(I, 7,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .461D-05,.155D-01,.679D-01 /
-      DATA (A(I, 8, 1),I=1,10)  / 
-     +  .630D0  ,.974D0  ,1.29D0  ,1.58D0  ,1.89D0  ,2.16D0  ,2.49D0  ,
-     +  2.75D0  ,3.02D0  ,3.95D0   /
-      DATA (A(I, 8, 2),I=1,10)  / 
-     +  .328D0  ,.459D0  ,.613D0  ,.735D0  ,.879D0  ,.994D0  ,1.15D0  ,
-     +  1.27D0  ,1.38D0  ,1.80D0   /
-      DATA (A(I, 8, 3),I=1,10)  / 
-     +  .748D-01,.121D0  ,.164D0  ,.197D0  ,.235D0  ,.265D0  ,.310D0  ,
-     +  .339D0  ,.370D0  ,.658D0   /
-      DATA (A(I, 8, 4),I=1,10)  / 
-     +  .194D0  ,.211D0  ,.337D0  ,.344D0  ,.339D0  ,.351D0  ,.390    ,
-     +  .419D0  ,.442D0  ,1.55D0   /
-      DATA (A(I, 8, 5),I=1,10)  / 
-     +  .000D+00,.869D-01,.725D-01,.113D0  ,.810D-01,.106D0  ,.951D-01,
-     +  .120D0  ,.143D0  ,.681D0   /
-      DATA (A(I, 8, 6),I=1,10)  / 
-     +  .000D+00,.288D-01,.102D0  ,.922D-01,.857D-01,.845D-01,.932D-01,
-     +  .983D-01,.102D0  ,.409D0   /
-      DATA (A(I, 8, 7),I=1,10)  / 
-     +  .000D+00,.668D-03,.533D-01,.575D-01,.493D-01,.482D-01,.539D-01,
-     +  .558D-01,.582D-01,.256D0   /
-      DATA (A(I, 8, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.205D-01,.808D-01,.510D-01,.409D-01,.406D-01,
-     +  .394D-01,.389D-01,.167D0   /
-      DATA (A(I, 8, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.999D-04,.647D-01,.385D-01,.325D-01,.325D-01,
-     +  .316D-01,.314D-01,.122D0   /
-      DATA (A(I, 8,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.169D-01,.834D-01,.611D-01,.565D-01,
-     +  .533D-01,.519D-01,.176D0   /
-      DATA (A(I, 8,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.107D-03,.769D-01,.922D-01,.805D-01,
-     +  .745D-01,.711D-01,.208D0   /
-      DATA (A(I, 8,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.180D-05,.143D-01,.983D-01,.775D-01,
-     +  .627D-01,.541D-01,.116D0   /
-      DATA (A(I, 8,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.157D-04,.346D-01,.507D-01,
-     +  .479D-01,.455D-01,.103D0   /
-      DATA (A(I, 8,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.752D-06,.248D-01,.721D-01,
-     +  .728D-01,.611D-01,.108D0   /
-      DATA (A(I, 8,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.686D-04,.356D-01,
-     +  .731D-01,.791D-01,.119D0   /
-      DATA (A(I, 8,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.838D-07,.151D-01,
-     +  .470D-01,.567D-01,.594D-01 /
-      DATA (A(I, 8,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.759D-08,.400D-04,
-     +  .193D-01,.313D-01,.454D-01 /
-      DATA (A(I, 8,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.385D-07,
-     +  .921D-02,.353D-01,.707D-01 /
-      DATA (A(I, 8,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.219D-08,
-     +  .348D-03,.226D-01,.556D-01 /
-      DATA (A(I, 8,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .212D-07,.149D-01,.679D-01 /
-      DATA (A(I, 9, 1),I=1,10)  / 
-     +  .736D0  ,1.13D0  ,1.49D0  ,1.82D0  ,2.20D0  ,2.49D0  ,2.86D0  ,
-     +  3.17D0  ,3.49D0  ,3.95D0   /
-      DATA (A(I, 9, 2),I=1,10)  / 
-     +  .339D0  ,.492D0  ,.658D0  ,.789D0  ,.958D0  ,1.08D0  ,1.25D0  ,
-     +  1.37D0  ,1.50D0  ,1.80D0   /
-      DATA (A(I, 9, 3),I=1,10)  / 
-     +  .680D-01,.110D0  ,.150D0  ,.180D0  ,.222D0  ,.247D0  ,.289    ,
-     +  .318D0  ,.349D0  ,.658D0   /
-      DATA (A(I, 9, 4),I=1,10)  / 
-     +  .110D0  ,.104D0  ,.157D0  ,.156D0  ,.210D0  ,.205D0  ,.246D0  ,
-     +  .274D0  ,.300D0  ,1.55D0   /
-      DATA (A(I, 9, 5),I=1,10)  / 
-     +  .000D+00,.379D-01,.347D-01,.477D-01,.486D-01,.576D-01,.569D-01,
-     +  .732D-01,.893D-01,.681D0   /
-      DATA (A(I, 9, 6),I=1,10)  / 
-     +  .000D+00,.223D-01,.354D-01,.312D-01,.436D-01,.400D-01,.489D-01,
-     +  .548D-01,.600D-01,.409D0   /
-      DATA (A(I, 9, 7),I=1,10)  / 
-     +  .000D+00,.338D-03,.149D-01,.142D-01,.215D-01,.188D-01,.248D-01,
-     +  .278D-01,.307D-01,.256D0   /
-      DATA (A(I, 9, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.553D-02,.862D-02,.150D-01,.106D-01,.145D-01,
-     +  .165D-01,.181D-01,.167D0   /
-      DATA (A(I, 9, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.375D-04,.641D-02,.111D-01,.792D-02,.112D-01,
-     +  .127D-01,.140D-01,.122D0   /
-      DATA (A(I, 9,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.112D-01,.200D-01,.127D-01,.176D-01,
-     +  .200D-01,.220D-01,.176D0   /
-      DATA (A(I, 9,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.244D-04,.261D-01,.162D-01,.232D-01,
-     +  .263D-01,.287D-01,.208D0   /
-      DATA (A(I, 9,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.455D-06,.635D-02,.121D-01,.186D-01,
-     +  .201D-01,.207D-01,.116D0   /
-      DATA (A(I, 9,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.146D-05,.922D-02,.116D-01,
-     +  .145D-01,.165D-01,.103D0   /
-      DATA (A(I, 9,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.135D-06,.128D-01,.202D-01,
-     +  .215D-01,.220D-01,.108D0   /
-      DATA (A(I, 9,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.237D-05,.229D-01,
-     +  .259D-01,.271D-01,.119D0   /
-      DATA (A(I, 9,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.100D-07,.534D-02,
-     +  .210D-01,.193D-01,.594D-01 /
-      DATA (A(I, 9,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.915D-09,.847D-06,
-     +  .119D-01,.125D-01,.454D-01 /
-      DATA (A(I, 9,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.298D-08,
-     +  .101D-01,.242D-01,.707D-01 /
-      DATA (A(I, 9,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.196D-09,
-     +  .243D-05,.234D-01,.556D-01 /
-      DATA (A(I, 9,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .575D-09,.364D-02,.679D-01 /
-      DATA (A(I,10, 1),I=1,10)  / 
-     +  .959D0  ,1.46D0  ,1.92D0  ,2.34D0  ,2.80D0  ,3.24D0  ,3.64D0  ,
-     +  4.05D0  ,4.48D0  ,3.95D0   /
-      DATA (A(I,10, 2),I=1,10)  / 
-     +  .343D0  ,.516D0  ,.692D0  ,.836D0  ,1.01D0  ,1.16D0  ,1.31D0  ,
-     +  1.46D0  ,1.61D0  ,1.80D0   /
-      DATA (A(I,10, 3),I=1,10)  / 
-     +  .512D-01,.837D-01,.115D0  ,.138D0  ,.169D0  ,.195D0  ,.220D0  ,
-     +  .245D0  ,.270D0  ,.658D0   /
-      DATA (A(I,10, 4),I=1,10)  / 
-     +  .274D-01,.361D-01,.510D-01,.562D-01,.703D-01,.828D-01,.877D-01,
-     +  .996D-01,.111D0  ,1.55D0   /
-      DATA (A(I,10, 5),I=1,10)  / 
-     +  .000D+00,.850D-02,.875D-02,.118D-01,.124D-01,.170D-01,.154D-01,
-     +  .194D-01,.237D-01,.681D0   /
-      DATA (A(I,10, 6),I=1,10)  / 
-     +  .000D+00,.345D-02,.519D-02,.533D-02,.691D-02,.842D-02,.844D-02,
-     +  .987D-02,.113D-01,.409D0   /
-      DATA (A(I,10, 7),I=1,10)  / 
-     +  .000D+00,.722D-04,.130D-02,.135D-02,.189D-02,.240D-02,.235D-02,
-     +  .281D-02,.331D-02,.256D0   /
-      DATA (A(I,10, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,.283D-03,.272D-03,.394D-03,.557D-03,.480D-03,
-     +  .616D-03,.775D-03,.167D0   /
-      DATA (A(I,10, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,.457D-05,.122D-03,.192D-03,.275D-03,.225D-03,
-     +  .292D-03,.373D-03,.122D0   /
-      DATA (A(I,10,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.119D-03,.185D-03,.278D-03,.201D-03,
-     +  .274D-03,.364D-03,.176D0   /
-      DATA (A(I,10,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.140D-05,.129D-03,.200D-03,.137D-03,
-     +  .188D-03,.252D-03,.208D0   /
-      DATA (A(I,10,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.207D-07,.307D-04,.518D-04,.278D-04,
-     +  .421D-04,.608D-04,.116D0   /
-      DATA (A(I,10,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.306D-07,.252D-04,.111D-04,
-     +  .188D-04,.295D-04,.103D0   /
-      DATA (A(I,10,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.321D-08,.220D-04,.104D-04,
-     +  .162D-04,.243D-04,.108D0   /
-      DATA (A(I,10,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.770D-08,.632D-05,
-     +  .105D-04,.162D-04,.119D0   /
-      DATA (A(I,10,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.117D-09,.199D-05,
-     +  .321D-05,.492D-05,.594D-01 /
-      DATA (A(I,10,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.888E-11,.323D-09,
-     +  .106D-05,.192D-05,.454D-01 /
-      DATA (A(I,10,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.174E-10,
-     +  .131D-05,.218D-05,.707D-01 /
-      DATA (A(I,10,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.994E-12,
-     +  .233D-09,.104D-05,.556D-01 /
-      DATA (A(I,10,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  .144E-11,.724D-06,.679D-01 /
-      DATA (AE(I, 1, 1),I=1,10)  / 
-     +  7.27D0  ,6.29D0  ,7.76D0  ,6.70D0  ,8.17D0  ,7.34D0  ,8.70D0  ,
-     +  8.02D0  ,7.37D0  ,6.18D0   /
-      DATA (AE(I, 1, 2),I=1,10)  / 
-     +  7.41D0  ,7.52D0  ,8.14D0  ,8.20D0  ,8.96D0  ,9.05D0  ,9.96D0  ,
-     +  10.0D0  ,10.1D0  ,9.86D0   /
-      DATA (AE(I, 1, 3),I=1,10)  / 
-     +  7.72D0  ,7.69D0  ,9.17D0  ,8.99D0  ,10.6D0  ,10.5D0  ,12.1D0  ,
-     +  12.1D0  ,12.0D0  ,11.5D0   /
-      DATA (AE(I, 1, 4),I=1,10)  / 
-     +  7.90D0  ,8.48D0  ,9.50D0  ,9.94D0  ,10.8D0  ,11.4D0  ,12.2D0  ,
-     +  12.8D0  ,13.3D0  ,13.8D0   /
-      DATA (AE(I, 1, 5),I=1,10)  / 
-     +  .000D+00,8.52D0  ,9.59D0  ,10.1D0  ,11.1D0  ,11.8D0  ,12.7D0  ,
-     +  13.3D0  ,13.8D0  ,14.4D0   /
-      DATA (AE(I, 1, 6),I=1,10)  / 
-     +  .000D+00,9.00D0  ,10.7D0  ,11.7D0  ,13.2D0  ,14.2D0  ,15.6D0  ,
-     +  16.5D0  ,17.3D0  ,18.0D0   /
-      DATA (AE(I, 1, 7),I=1,10)  / 
-     +  .000D+00,9.01D0  ,11.1D0  ,11.9D0  ,14.3D0  ,15.0D0  ,17.4D0  ,
-     +  18.0D0  ,18.6D0  ,18.8D0   /
-      DATA (AE(I, 1, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,11.2D0  ,12.4D0  ,14.5D0  ,15.7D0  ,17.6D0  ,
-     +  18.8D0  ,19.9D0  ,20.9D0   /
-      DATA (AE(I, 1, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,11.4D0  ,12.7D0  ,15.5D0  ,16.6D0  ,19.3D0  ,
-     +  20.2D0  ,21.1D0  ,21.7D0   /
-      DATA (AE(I, 1,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,13.2D0  ,15.8D0  ,17.3D0  ,19.9D0  ,
-     +  21.2D0  ,22.4D0  ,23.2D0   /
-      DATA (AE(I, 1,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,13.2D0  ,16.3D0  ,17.8D0  ,20.8D0  ,
-     +  22.1D0  ,23.3D0  ,24.2D0   /
-      DATA (AE(I, 1,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,13.4D0  ,16.2D0  ,18.2D0  ,21.0D0  ,
-     +  22.8D0  ,24.4D0  ,25.9D0   /
-      DATA (AE(I, 1,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,16.5D0  ,18.4D0  ,21.6D0  ,
-     +  23.2D0  ,24.8D0  ,26.2D0   /
-      DATA (AE(I, 1,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,16.7D0  ,19.0D0  ,22.3D0  ,
-     +  24.3D0  ,26.1D0  ,27.4D0   /
-      DATA (AE(I, 1,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,19.1D0  ,22.8D0  ,
-     +  24.7D0  ,26.6D0  ,28.2D0   /
-      DATA (AE(I, 1,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,19.2D0  ,23.0D0  ,
-     +  25.3D0  ,27.5D0  ,29.5D0   /
-      DATA (AE(I, 1,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,19.6D0  ,23.3D0  ,
-     +  25.6D0  ,27.8D0  ,29.6D0   /
-      DATA (AE(I, 1,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,23.6D0  ,
-     +  26.2D0  ,28.5D0  ,30.4D0   /
-      DATA (AE(I, 1,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,23.7D0  ,
-     +  26.3D0  ,28.8D0  ,31.0D0   /
-      DATA (AE(I, 1,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  26.5D0  ,29.2D0  ,31.5D0   /
-      DATA (AE(I, 2, 1),I=1,10)  / 
-     +  8.74D0  ,8.16D0  ,9.25D0  ,8.45D0  ,9.46D0  ,8.90D0  ,9.83D0  ,
-     +  9.38D0  ,8.96D0  ,8.15D0   /
-      DATA (AE(I, 2, 2),I=1,10)  / 
-     +  8.96D0  ,9.30D0  ,9.95D0  ,10.0D0  ,10.8D0  ,10.9D0  ,11.7D0  ,
-     +  11.8D0  ,11.9D0  ,11.8D0   /
-      DATA (AE(I, 2, 3),I=1,10)  / 
-     +  9.44D0  ,9.66D0  ,11.0D0  ,11.0D0  ,12.3D0  ,12.5D0  ,13.7D0  ,
-     +  13.9D0  ,14.0D0  ,13.8D0   /
-      DATA (AE(I, 2, 4),I=1,10)  / 
-     +  8.86D0  ,9.81D0  ,10.8D0  ,11.2D0  ,12.0D0  ,12.6D0  ,13.4D0  ,
-     +  14.0D0  ,14.5D0  ,15.1D0   /
-      DATA (AE(I, 2, 5),I=1,10)  / 
-     +  .000D+00,10.2D0  ,11.4D0  ,12.0D0  ,12.9D0  ,13.6D0  ,14.5D0  ,
-     +  15.1D0  ,15.7D0  ,16.3D0   /
-      DATA (AE(I, 2, 6),I=1,10)  / 
-     +  .000D+00,10.7D0  ,12.5D0  ,13.5D0  ,15.1D0  ,16.0D0  ,17.5D0  ,
-     +  18.3D0  ,19.2D0  ,19.9D0   /
-      DATA (AE(I, 2, 7),I=1,10)  / 
-     +  .000D+00,11.5D0  ,12.9D0  ,13.9D0  ,16.1D0  ,17.0D0  ,19.1D0  ,
-     +  19.8D0  ,20.6D0  ,21.0D0   /
-      DATA (AE(I, 2, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,12.4D0  ,13.8D0  ,15.9D0  ,17.2D0  ,19.1D0  ,
-     +  20.3D0  ,21.4D0  ,22.3D0   /
-      DATA (AE(I, 2, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,13.4D0  ,14.5D0  ,17.1D0  ,18.3D0  ,20.9D0  ,
-     +  21.9D0  ,23.0D0  ,23.7D0   /
-      DATA (AE(I, 2,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,14.9D0  ,17.5D0  ,19.1D0  ,21.6D0  ,
-     +  22.9D0  ,24.1D0  ,25.0D0   /
-      DATA (AE(I, 2,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,15.0D0  ,18.0D0  ,19.6D0  ,22.4D0  ,
-     +  23.8D0  ,25.2D0  ,26.2D0   /
-      DATA (AE(I, 2,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,16.2D0  ,17.3D0  ,19.4D0  ,22.2D0  ,
-     +  24.0D0  ,25.7D0  ,27.2D0   /
-      DATA (AE(I, 2,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,17.8D0  ,19.8D0  ,22.9D0  ,
-     +  24.6D0  ,26.2D0  ,27.7D0   /
-      DATA (AE(I, 2,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,19.1D0  ,20.4D0  ,23.7D0  ,
-     +  25.7D0  ,27.6D0  ,29.1D0   /
-      DATA (AE(I, 2,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,20.5D0  ,24.1D0  ,
-     +  26.1D0  ,28.1D0  ,29.9D0   /
-      DATA (AE(I, 2,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,20.9D0  ,23.9D0  ,
-     +  26.4D0  ,28.7D0  ,30.7D0   /
-      DATA (AE(I, 2,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,22.4D0  ,24.2D0  ,
-     +  26.7D0  ,29.0D0  ,30.9D0   /
-      DATA (AE(I, 2,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,24.8D0  ,
-     +  27.3D0  ,29.7D0  ,31.8D0   /
-      DATA (AE(I, 2,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,26.1D0  ,
-     +  27.3D0  ,29.9D0  ,32.3D0   /
-      DATA (AE(I, 2,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  27.4D0  ,30.1D0  ,32.6D0   /
-      DATA (AE(I, 3, 1),I=1,10)  / 
-     +  11.0D0  ,11.0D0  ,11.7D0  ,11.3D0  ,11.9D0  ,11.4D0  ,12.1D0  ,
-     +  11.7D0  ,11.5D0  ,11.0D0   /
-      DATA (AE(I, 3, 2),I=1,10)  / 
-     +  11.2D0  ,12.0D0  ,12.7D0  ,12.9D0  ,13.6D0  ,13.7D0  ,14.4D0  ,
-     +  14.6D0  ,14.7D0  ,14.6D0   /
-      DATA (AE(I, 3, 3),I=1,10)  / 
-     +  12.1D0  ,12.6D0  ,13.7D0  ,13.9D0  ,15.0D0  ,15.2D0  ,16.3D0  ,
-     +  16.5D0  ,16.7D0  ,16.7D0   /
-      DATA (AE(I, 3, 4),I=1,10)  / 
-     +  12.6D0  ,11.3D0  ,12.4D0  ,13.0D0  ,13.8D0  ,14.2D0  ,15.0D0  ,
-     +  15.6D0  ,16.1D0  ,16.6D0   /
-      DATA (AE(I, 3, 5),I=1,10)  / 
-     +  .000D+00,12.6D0  ,13.7D0  ,14.4D0  ,15.3D0  ,16.0D0  ,16.8D0  ,
-     +  17.5D0  ,18.1D0  ,18.6D0   /
-      DATA (AE(I, 3, 6),I=1,10)  / 
-     +  .000D+00,14.0D0  ,14.6D0  ,15.8D0  ,17.4D0  ,18.4D0  ,19.8D0  ,
-     +  20.6D0  ,21.5D0  ,22.2D0   /
-      DATA (AE(I, 3, 7),I=1,10)  / 
-     +  .000D+00,16.0D0  ,15.2D0  ,16.3D0  ,18.3D0  ,19.3D0  ,21.1D0  ,
-     +  22.0D0  ,22.8D0  ,23.5D0   /
-      DATA (AE(I, 3, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,15.6D0  ,15.1D0  ,17.2D0  ,18.6D0  ,20.6D0  ,
-     +  21.8D0  ,22.9D0  ,23.8D0   /
-      DATA (AE(I, 3, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,17.8D0  ,16.3D0  ,18.8D0  ,20.1D0  ,22.5D0  ,
-     +  23.6D0  ,24.7D0  ,25.6D0   /
-      DATA (AE(I, 3,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,17.5D0  ,19.0D0  ,20.7D0  ,23.1D0  ,
-     +  24.5D0  ,25.8D0  ,26.8D0   /
-      DATA (AE(I, 3,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,19.2D0  ,19.4D0  ,21.1D0  ,23.8D0  ,
-     +  25.4D0  ,26.8D0  ,28.0D0   /
-      DATA (AE(I, 3,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,20.7D0  ,19.6D0  ,19.7D0  ,22.4D0  ,
-     +  24.4D0  ,26.2D0  ,27.9D0   /
-      DATA (AE(I, 3,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,21.6D0  ,20.4D0  ,23.2D0  ,
-     +  25.1D0  ,26.9D0  ,28.5D0   /
-      DATA (AE(I, 3,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,23.5D0  ,22.0D0  ,23.8D0  ,
-     +  26.1D0  ,28.1D0  ,29.9D0   /
-      DATA (AE(I, 3,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,23.7D0  ,24.2D0  ,
-     +  26.3D0  ,28.5D0  ,30.4D0   /
-      DATA (AE(I, 3,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,25.4D0  ,24.8D0  ,
-     +  25.6D0  ,28.1D0  ,30.5D0   /
-      DATA (AE(I, 3,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,26.9D0  ,26.8D0  ,
-     +  26.1D0  ,28.4D0  ,30.8D0   /
-      DATA (AE(I, 3,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,28.8D0  ,
-     +  27.6D0  ,29.0D0  ,31.5D0   /
-      DATA (AE(I, 3,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,30.5D0  ,
-     +  29.2D0  ,28.9D0  ,31.5D0   /
-      DATA (AE(I, 3,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  31.0D0  ,30.0D0  ,31.7D0   /
-      DATA (AE(I, 4, 1),I=1,10)  / 
-     +  13.0D0  ,13.2D0  ,14.8D0  ,14.2D0  ,14.2D0  ,14.1D0  ,14.5D0  ,
-     +  14.4D0  ,14.3D0  ,14.0D0   /
-      DATA (AE(I, 4, 2),I=1,10)  / 
-     +  13.5D0  ,14.5D0  ,16.1D0  ,15.9D0  ,16.0D0  ,16.3D0  ,16.8D0  ,
-     +  17.0D0  ,17.1D0  ,17.2D0   /
-      DATA (AE(I, 4, 3),I=1,10)  / 
-     +  14.9D0  ,15.3D0  ,17.2D0  ,17.1D0  ,17.5D0  ,17.8D0  ,18.6D0  ,
-     +  18.9D0  ,19.1D0  ,19.3D0   /
-      DATA (AE(I, 4, 4),I=1,10)  / 
-     +  15.1D0  ,13.5D0  ,16.4D0  ,16.7D0  ,16.4D0  ,17.3D0  ,17.8D0  ,
-     +  18.5D0  ,19.0D0  ,19.6D0   /
-      DATA (AE(I, 4, 5),I=1,10)  / 
-     +  .000D+00,15.6D0  ,17.5D0  ,17.7D0  ,17.8D0  ,18.6D0  ,19.2D0  ,
-     +  19.9D0  ,20.3D0  ,21.1D0   /
-      DATA (AE(I, 4, 6),I=1,10)  / 
-     +  .000D+00,18.0D0  ,18.4D0  ,19.2D0  ,19.8D0  ,20.9D0  ,22.0D0  ,
-     +  23.1D0  ,23.6D0  ,24.7D0   /
-      DATA (AE(I, 4, 7),I=1,10)  / 
-     +  .000D+00,27.4D0  ,19.1D0  ,19.8D0  ,20.7D0  ,21.8D0  ,23.2D0  ,
-     +  24.4D0  ,24.9D0  ,25.9D0   /
-      DATA (AE(I, 4, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,18.9D0  ,18.9D0  ,19.3D0  ,21.1D0  ,22.5D0  ,
-     +  24.0D0  ,24.7D0  ,26.0D0   /
-      DATA (AE(I, 4, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,21.1D0  ,19.7D0  ,20.7D0  ,22.3D0  ,24.0D0  ,
-     +  25.6D0  ,26.3D0  ,27.7D0   /
-      DATA (AE(I, 4,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,21.0D0  ,21.1D0  ,22.9D0  ,24.6D0  ,
-     +  26.5D0  ,27.3D0  ,29.0D0   /
-      DATA (AE(I, 4,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,21.3D0  ,22.4D0  ,23.1D0  ,25.0D0  ,
-     +  27.1D0  ,27.9D0  ,29.8D0   /
-      DATA (AE(I, 4,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,36.6D0  ,21.5D0  ,22.2D0  ,23.1D0  ,
-     +  25.6D0  ,26.8D0  ,29.1D0   /
-      DATA (AE(I, 4,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,22.9D0  ,23.1D0  ,23.7D0  ,
-     +  26.2D0  ,27.3D0  ,29.6D0   /
-      DATA (AE(I, 4,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,30.5D0  ,23.6D0  ,25.0D0  ,
-     +  26.9D0  ,28.2D0  ,30.7D0   /
-      DATA (AE(I, 4,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,25.4D0  ,26.2D0  ,
-     +  27.2D0  ,28.3D0  ,31.0D0   /
-      DATA (AE(I, 4,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,24.5D0  ,25.9D0  ,
-     +  27.4D0  ,27.6D0  ,30.7D0   /
-      DATA (AE(I, 4,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,43.3D0  ,28.4D0  ,
-     +  27.5D0  ,27.9D0  ,30.9D0   /
-      DATA (AE(I, 4,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,27.2D0  ,
-     +  29.1D0  ,29.0D0  ,31.4D0   /
-      DATA (AE(I, 4,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,51.3D0  ,
-     +  30.6D0  ,29.5D0  ,31.4D0   /
-      DATA (AE(I, 4,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  28.8D0  ,30.6D0  ,32.4D0   /
-      DATA (AE(I, 5, 1),I=1,10)  / 
-     +  15.0D0  ,14.9D0  ,15.5D0  ,15.4D0  ,15.9D0  ,15.8D0  ,16.2D0  ,
-     +  16.2D0  ,16.1D0  ,15.9D0   /
-      DATA (AE(I, 5, 2),I=1,10)  / 
-     +  15.4D0  ,16.1D0  ,17.0D0  ,17.4D0  ,18.0D0  ,18.2D0  ,18.7D0  ,
-     +  18.9D0  ,19.0D0  ,19.1D0   /
-      DATA (AE(I, 5, 3),I=1,10)  / 
-     +  17.1D0  ,17.2D0  ,18.3D0  ,18.7D0  ,19.3D0  ,19.6D0  ,20.3D0  ,
-     +  20.6D0  ,20.8D0  ,20.9D0   /
-      DATA (AE(I, 5, 4),I=1,10)  / 
-     +  14.7D0  ,14.8D0  ,15.0D0  ,16.0D0  ,17.0D0  ,17.7D0  ,18.1D0  ,
-     +  19.0D0  ,19.4D0  ,20.0D0   /
-      DATA (AE(I, 5, 5),I=1,10)  / 
-     +  .000D+00,16.7D0  ,17.6D0  ,18.1D0  ,18.6D0  ,19.2D0  ,19.7D0  ,
-     +  20.4D0  ,20.8D0  ,21.2D0   /
-      DATA (AE(I, 5, 6),I=1,10)  / 
-     +  .000D+00,17.8D0  ,18.2D0  ,19.2D0  ,20.0D0  ,21.0D0  ,21.9D0  ,
-     +  23.0D0  ,23.6D0  ,24.3D0   /
-      DATA (AE(I, 5, 7),I=1,10)  / 
-     +  .000D+00,35.2D0  ,18.9D0  ,20.3D0  ,20.6D0  ,21.5D0  ,22.6D0  ,
-     +  23.7D0  ,24.2D0  ,24.7D0   /
-      DATA (AE(I, 5, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,16.4D0  ,18.9D0  ,18.8D0  ,19.6D0  ,20.7D0  ,
-     +  22.3D0  ,23.1D0  ,23.9D0   /
-      DATA (AE(I, 5, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,33.9D0  ,19.8D0  ,20.3D0  ,20.7D0  ,21.9D0  ,
-     +  23.4D0  ,24.1D0  ,24.8D0   /
-      DATA (AE(I, 5,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,18.0D0  ,20.0D0  ,21.4D0  ,22.0D0  ,
-     +  23.8D0  ,24.6D0  ,25.4D0   /
-      DATA (AE(I, 5,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,26.4D0  ,20.4D0  ,21.2D0  ,22.3D0  ,
-     +  23.8D0  ,24.7D0  ,25.5D0   /
-      DATA (AE(I, 5,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,41.7D0  ,18.2D0  ,19.8D0  ,21.1D0  ,
-     +  22.6D0  ,23.4D0  ,24.6D0   /
-      DATA (AE(I, 5,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,22.5D0  ,20.0D0  ,21.7D0  ,
-     +  22.8D0  ,23.7D0  ,24.7D0   /
-      DATA (AE(I, 5,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,54.1D0  ,19.9D0  ,21.9D0  ,
-     +  23.2D0  ,24.3D0  ,25.3D0   /
-      DATA (AE(I, 5,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,21.2D0  ,22.2D0  ,
-     +  23.6D0  ,24.9D0  ,25.5D0   /
-      DATA (AE(I, 5,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,44.9D0  ,21.9D0  ,
-     +  23.8D0  ,25.2D0  ,25.6D0   /
-      DATA (AE(I, 5,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,47.8D0  ,22.7D0  ,
-     +  23.8D0  ,24.9D0  ,26.3D0   /
-      DATA (AE(I, 5,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,35.5D0  ,
-     +  23.9D0  ,25.9D0  ,26.6D0   /
-      DATA (AE(I, 5,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,64.3D0  ,
-     +  24.1D0  ,25.7D0  ,27.1D0   /
-      DATA (AE(I, 5,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  34.0D0  ,25.7D0  ,27.7D0   /
-      DATA (AE(I, 6, 1),I=1,10)  / 
-     +  16.6D0  ,16.5D0  ,16.8D0  ,16.7D0  ,17.0D0  ,16.5D0  ,16.7D0  ,
-     +  18.3D0  ,18.9D0  ,19.0D0   /
-      DATA (AE(I, 6, 2),I=1,10)  / 
-     +  16.2D0  ,16.6D0  ,17.2D0  ,17.4D0  ,17.9D0  ,17.4D0  ,17.7D0  ,
-     +  20.7D0  ,22.0D0  ,22.6D0   /
-      DATA (AE(I, 6, 3),I=1,10)  / 
-     +  18.9D0  ,18.7D0  ,18.8D0  ,18.6D0  ,18.9D0  ,18.6D0  ,18.9D0  ,
-     +  21.0D0  ,22.3D0  ,22.9D0   /
-      DATA (AE(I, 6, 4),I=1,10)  / 
-     +  18.3D0  ,12.7D0  ,14.2D0  ,15.0D0  ,15.7D0  ,16.1D0  ,16.3D0  ,
-     +  16.5D0  ,17.9D0  ,19.0D0   /
-      DATA (AE(I, 6, 5),I=1,10)  / 
-     +  .000D+00,15.7D0  ,15.1D0  ,15.3D0  ,16.5D0  ,16.4D0  ,16.4D0  ,
-     +  17.0D0  ,18.3D0  ,19.4D0   /
-      DATA (AE(I, 6, 6),I=1,10)  / 
-     +  .000D+00,22.9D0  ,14.9D0  ,15.2D0  ,16.2D0  ,16.9D0  ,17.4D0  ,
-     +  18.2D0  ,19.5D0  ,21.1D0   /
-      DATA (AE(I, 6, 7),I=1,10)  / 
-     +  .000D+00,40.7D0  ,18.4D0  ,15.9D0  ,17.1D0  ,17.7D0  ,18.9D0  ,
-     +  19.5D0  ,20.3D0  ,21.1D0   /
-      DATA (AE(I, 6, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,23.3D0  ,16.2D0  ,16.3D0  ,17.3D0  ,18.7D0  ,
-     +  19.5D0  ,20.3D0  ,21.1D0   /
-      DATA (AE(I, 6, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,49.2D0  ,19.0D0  ,19.1D0  ,19.4D0  ,20.2D0  ,
-     +  20.8D0  ,21.6D0  ,22.0D0   /
-      DATA (AE(I, 6,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,27.2D0  ,21.2D0  ,20.8D0  ,21.4D0  ,
-     +  22.3D0  ,22.8D0  ,23.3D0   /
-      DATA (AE(I, 6,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,45.6D0  ,25.0D0  ,22.8D0  ,23.9D0  ,
-     +  23.6D0  ,24.3D0  ,24.4D0   /
-      DATA (AE(I, 6,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,45.8D0  ,29.7D0  ,25.1D0  ,25.3D0  ,
-     +  25.3D0  ,26.0D0  ,26.3D0   /
-      DATA (AE(I, 6,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,42.7D0  ,29.0D0  ,28.0D0  ,
-     +  27.0D0  ,27.2D0  ,27.6D0   /
-      DATA (AE(I, 6,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,62.0D0  ,32.0D0  ,30.0D0  ,
-     +  29.8D0  ,29.5D0  ,29.6D0   /
-      DATA (AE(I, 6,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,44.5D0  ,34.4D0  ,
-     +  32.7D0  ,31.5D0  ,31.8D0   /
-      DATA (AE(I, 6,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,75.6D0  ,37.1D0  ,
-     +  34.6D0  ,34.4D0  ,34.4D0   /
-      DATA (AE(I, 6,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,51.2D0  ,45.2D0  ,
-     +  39.0D0  ,37.5D0  ,36.4D0   /
-      DATA (AE(I, 6,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,74.9D0  ,
-     +  42.3D0  ,39.9D0  ,38.3D0   /
-      DATA (AE(I, 6,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,69.5D0  ,
-     +  50.7D0  ,42.3D0  ,41.4D0   /
-      DATA (AE(I, 6,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  66.3D0  ,48.0D0  ,43.4D0   /
-      DATA (AE(I, 7, 1),I=1,10)  / 
-     +  27.0D0  ,25.8D0  ,26.3D0  ,26.2D0  ,26.7D0  ,26.7D0  ,27.1D0  ,
-     +  27.1D0  ,27.2D0  ,19.0D0   /
-      DATA (AE(I, 7, 2),I=1,10)  / 
-     +  29.1D0  ,28.9D0  ,29.7D0  ,30.3D0  ,31.0D0  ,31.4D0  ,32.0D0  ,
-     +  32.3D0  ,32.7D0  ,22.6D0   /
-      DATA (AE(I, 7, 3),I=1,10)  / 
-     +  31.6D0  ,29.7D0  ,30.9D0  ,31.4D0  ,32.5D0  ,33.1D0  ,34.0D0  ,
-     +  34.6D0  ,35.1D0  ,22.9D0   /
-      DATA (AE(I, 7, 4),I=1,10)  / 
-     +  27.4D0  ,19.9D0  ,20.8D0  ,22.8D0  ,24.6D0  ,26.4D0  ,28.2D0  ,
-     +  29.6D0  ,30.8D0  ,19.0D0   /
-      DATA (AE(I, 7, 5),I=1,10)  / 
-     +  .000D+00,24.6D0  ,24.1D0  ,25.0D0  ,27.2D0  ,28.7D0  ,30.7D0  ,
-     +  31.8D0  ,32.9D0  ,19.4D0   /
-      DATA (AE(I, 7, 6),I=1,10)  / 
-     +  .000D+00,35.6D0  ,25.2D0  ,25.6D0  ,27.9D0  ,30.4D0  ,32.7D0  ,
-     +  34.6D0  ,36.3D0  ,21.1D0   /
-      DATA (AE(I, 7, 7),I=1,10)  / 
-     +  .000D+00,45.4D0  ,30.9D0  ,28.2D0  ,29.0D0  ,31.2D0  ,34.0D0  ,
-     +  35.8D0  ,37.4D0  ,21.1D0   /
-      DATA (AE(I, 7, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,38.2D0  ,29.6D0  ,29.4D0  ,30.3D0  ,33.2D0  ,
-     +  35.5D0  ,37.6D0  ,21.1D0   /
-      DATA (AE(I, 7, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,59.3D0  ,34.5D0  ,33.7D0  ,32.9D0  ,35.4D0  ,
-     +  37.6D0  ,39.6D0  ,22.0D0   /
-      DATA (AE(I, 7,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,44.5D0  ,37.8D0  ,37.5D0  ,37.2D0  ,
-     +  39.0D0  ,41.4D0  ,23.3D0   /
-      DATA (AE(I, 7,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,67.0D0  ,43.6D0  ,42.0D0  ,40.8D0  ,
-     +  41.4D0  ,43.0D0  ,24.4D0   /
-      DATA (AE(I, 7,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,49.9D0  ,50.9D0  ,44.6D0  ,43.9D0  ,
-     +  44.2D0  ,44.2D0  ,26.3D0   /
-      DATA (AE(I, 7,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,67.2D0  ,50.5D0  ,48.7D0  ,
-     +  48.1D0  ,47.2D0  ,27.6D0   /
-      DATA (AE(I, 7,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,68.1D0  ,55.2D0  ,52.3D0  ,
-     +  51.5D0  ,51.6D0  ,29.6D0   /
-      DATA (AE(I, 7,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,68.7D0  ,58.6D0  ,
-     +  56.5D0  ,55.7D0  ,31.8D0   /
-      DATA (AE(I, 7,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,89.3D0  ,62.9D0  ,
-     +  60.0D0  ,59.1D0  ,34.4D0   /
-      DATA (AE(I, 7,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,56.0D0  ,72.9D0  ,
-     +  66.3D0  ,64.2D0  ,36.4D0   /
-      DATA (AE(I, 7,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,105.D0  ,
-     +  71.3D0  ,68.3D0  ,38.3D0   /
-      DATA (AE(I, 7,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,73.4D0  ,
-     +  76.8D0  ,72.4D0  ,41.4D0   /
-      DATA (AE(I, 7,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  107.D0  ,79.9D0  ,43.4D0   /
-      DATA (AE(I, 8, 1),I=1,10)  / 
-     +  35.5D0  ,35.3D0  ,35.7D0  ,35.7D0  ,36.3D0  ,36.3D0  ,36.7D0  ,
-     +  36.7D0  ,36.7D0  ,19.0D0   /
-      DATA (AE(I, 8, 2),I=1,10)  / 
-     +  40.6D0  ,41.4D0  ,41.9D0  ,42.3D0  ,43.2D0  ,43.5D0  ,44.0D0  ,
-     +  44.3D0  ,44.5D0  ,22.6D0   /
-      DATA (AE(I, 8, 3),I=1,10)  / 
-     +  45.4D0  ,45.7D0  ,46.4D0  ,47.0D0  ,48.1D0  ,48.7D0  ,49.4D0  ,
-     +  49.8D0  ,50.2D0  ,22.9D0   /
-      DATA (AE(I, 8, 4),I=1,10)  / 
-     +  43.9D0  ,44.3D0  ,43.4D0  ,45.1D0  ,47.3D0  ,48.7D0  ,49.6D0  ,
-     +  50.5D0  ,51.3D0  ,19.0D0   /
-      DATA (AE(I, 8, 5),I=1,10)  / 
-     +  .000D+00,49.3D0  ,49.6D0  ,50.5D0  ,53.2D0  ,54.2D0  ,55.4D0  ,
-     +  56.1D0  ,56.8D0  ,19.4D0   /
-      DATA (AE(I, 8, 6),I=1,10)  / 
-     +  .000D+00,59.1D0  ,53.0D0  ,55.4D0  ,58.0D0  ,60.0D0  ,61.2D0  ,
-     +  62.5D0  ,63.6D0  ,21.1D0   /
-      DATA (AE(I, 8, 7),I=1,10)  / 
-     +  .000D+00,54.5D0  ,57.1D0  ,59.2D0  ,62.3D0  ,64.4D0  ,66.0D0  ,
-     +  67.3D0  ,68.5D0  ,21.1D0   /
-      DATA (AE(I, 8, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,65.9D0  ,62.1D0  ,65.1D0  ,67.6D0  ,69.4D0  ,
-     +  71.1D0  ,72.6D0  ,21.1D0   /
-      DATA (AE(I, 8, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,72.2D0  ,67.1D0  ,70.5D0  ,73.1D0  ,75.1D0  ,
-     +  76.8D0  ,78.4D0  ,22.0D0   /
-      DATA (AE(I, 8,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,80.1D0  ,75.0D0  ,78.0D0  ,80.0D0  ,
-     +  82.1D0  ,83.9D0  ,23.3D0   /
-      DATA (AE(I, 8,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,94.5D0  ,82.2D0  ,82.8D0  ,85.1D0  ,
-     +  87.3D0  ,89.2D0  ,24.4D0   /
-      DATA (AE(I, 8,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,56.8D0  ,92.5D0  ,87.2D0  ,89.4D0  ,
-     +  91.9D0  ,94.1D0  ,26.3D0   /
-      DATA (AE(I, 8,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,116.D0  ,96.2D0  ,94.4D0  ,
-     +  97.0D0  ,99.2D0  ,27.6D0   /
-      DATA (AE(I, 8,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,78.1D0  ,104.D0  ,102.D0  ,
-     +  102.D0  ,105.D0  ,29.6D0   /
-      DATA (AE(I, 8,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,128.D0  ,111.D0  ,
-     +  109.D0  ,110.D0  ,31.8D0   /
-      DATA (AE(I, 8,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,104.D0  ,118.D0  ,
-     +  117.D0  ,115.D0  ,34.4D0   /
-      DATA (AE(I, 8,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,64.4D0  ,138.D0  ,
-     +  124.D0  ,122.D0  ,36.4D0   /
-      DATA (AE(I, 8,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,133.D0  ,
-     +  133.D0  ,132.D0  ,38.3D0   /
-      DATA (AE(I, 8,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,83.6D0  ,
-     +  146.D0  ,139.D0  ,41.4D0   /
-      DATA (AE(I, 8,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  166.D0  ,147.D0  ,43.4D0   /
-      DATA (AE(I, 9, 1),I=1,10)  / 
-     +  43.3D0  ,43.2D0  ,43.6D0  ,43.8D0  ,44.1D0  ,44.3D0  ,44.7D0  ,
-     +  44.8D0  ,44.8D0  ,19.0D0   /
-      DATA (AE(I, 9, 2),I=1,10)  / 
-     +  50.9D0  ,51.4D0  ,52.0D0  ,52.6D0  ,53.1D0  ,53.6D0  ,54.2D0  ,
-     +  54.5D0  ,54.7D0  ,22.6D0   /
-      DATA (AE(I, 9, 3),I=1,10)  / 
-     +  58.0D0  ,58.4D0  ,59.3D0  ,60.1D0  ,60.7D0  ,61.5D0  ,62.3D0  ,
-     +  62.7D0  ,63.1D0  ,22.9D0   /
-      DATA (AE(I, 9, 4),I=1,10)  / 
-     +  62.0D0  ,63.9D0  ,63.7D0  ,65.7D0  ,65.5D0  ,67.5D0  ,68.2D0  ,
-     +  68.9D0  ,69.7D0  ,19.0D0   /
-      DATA (AE(I, 9, 5),I=1,10)  / 
-     +  .000D+00,72.2D0  ,72.5D0  ,74.2D0  ,74.2D0  ,76.1D0  ,77.0D0  ,
-     +  77.8D0  ,78.6D0  ,19.4D0   /
-      DATA (AE(I, 9, 6),I=1,10)  / 
-     +  .000D+00,80.4D0  ,80.5D0  ,83.1D0  ,83.0D0  ,85.5D0  ,86.8D0  ,
-     +  88.1D0  ,89.2D0  ,21.1D0   /
-      DATA (AE(I, 9, 7),I=1,10)  / 
-     +  .000D+00,63.4D0  ,88.5D0  ,91.3D0  ,91.1D0  ,94.0D0  ,95.8D0  ,
-     +  97.3D0  ,98.6D0  ,21.1D0   /
-      DATA (AE(I, 9, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,98.8D0  ,98.6D0  ,97.8D0  ,102.D0  ,104.D0  ,
-     +  106.D0  ,108.D0  ,21.1D0   /
-      DATA (AE(I, 9, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,84.1D0  ,107.D0  ,107.D0  ,111.D0  ,113.D0  ,
-     +  116.D0  ,117.D0  ,22.0D0   /
-      DATA (AE(I, 9,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,116.D0  ,115.D0  ,119.D0  ,122.D0  ,
-     +  125.D0  ,127.D0  ,23.3D0   /
-      DATA (AE(I, 9,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,111.D0  ,123.D0  ,127.D0  ,131.D0  ,
-     +  134.D0  ,137.D0  ,24.4D0   /
-      DATA (AE(I, 9,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,65.6D0  ,136.D0  ,135.D0  ,140.D0  ,
-     +  143.D0  ,146.D0  ,26.3D0   /
-      DATA (AE(I, 9,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,146.D0  ,144.D0  ,149.D0  ,
-     +  152.D0  ,155.D0  ,27.6D0   /
-      DATA (AE(I, 9,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,88.7D0  ,152.D0  ,158.D0  ,
-     +  162.D0  ,165.D0  ,29.6D0   /
-      DATA (AE(I, 9,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,181.D0  ,167.D0  ,
-     +  171.D0  ,174.D0  ,31.8D0   /
-      DATA (AE(I, 9,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,117.D0  ,174.D0  ,
-     +  180.D0  ,183.D0  ,34.4D0   /
-      DATA (AE(I, 9,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,72.0D0  ,201.D0  ,
-     +  189.D0  ,192.D0  ,36.4D0   /
-      DATA (AE(I, 9,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,151.D0  ,
-     +  198.D0  ,201.D0  ,38.3D0   /
-      DATA (AE(I, 9,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,95.2D0  ,
-     +  220.D0  ,210.D0  ,41.4D0   /
-      DATA (AE(I, 9,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  192.D0  ,217.D0  ,43.4D0   /
-      DATA (AE(I,10, 1),I=1,10)  / 
-     +  62.1D0  ,62.1D0  ,62.6D0  ,62.9D0  ,63.3D0  ,63.3D0  ,64.0D0  ,
-     +  64.0D0  ,64.0D0  ,19.0D0   /
-      DATA (AE(I,10, 2),I=1,10)  / 
-     +  75.1D0  ,75.4D0  ,76.3D0  ,76.8D0  ,77.6D0  ,77.9D0  ,78.8D0  ,
-     +  79.0D0  ,79.3D0  ,22.6D0   /
-      DATA (AE(I,10, 3),I=1,10)  / 
-     +  87.5D0  ,88.3D0  ,89.4D0  ,90.2D0  ,91.3D0  ,91.9D0  ,93.0D0  ,
-     +  93.5D0  ,93.9D0  ,22.9D0   /
-      DATA (AE(I,10, 4),I=1,10)  / 
-     +  104.D0  ,104.D0  ,105.D0  ,106.D0  ,107.D0  ,108.D0  ,109.D0  ,
-     +  110.D0  ,110.D0  ,19.0D0   /
-      DATA (AE(I,10, 5),I=1,10)  / 
-     +  .000D+00,122.D0  ,122.D0  ,123.D0  ,124.D0  ,125.D0  ,126.D0  ,
-     +  127.D0  ,128.D0  ,19.4D0   /
-      DATA (AE(I,10, 6),I=1,10)  / 
-     +  .000D+00,138.D0  ,139.D0  ,140.D0  ,142.D0  ,143.D0  ,144.D0  ,
-     +  146.D0  ,147.D0  ,21.1D0   /
-      DATA (AE(I,10, 7),I=1,10)  / 
-     +  .000D+00,85.3D0  ,158.D0  ,159.D0  ,161.D0  ,162.D0  ,164.D0  ,
-     +  166.D0  ,167.D0  ,21.1D0   /
-      DATA (AE(I,10, 8),I=1,10)  / 
-     +  .000D+00,.000D+00,176.D0  ,177.D0  ,179.D0  ,181.D0  ,183.D0  ,
-     +  184.D0  ,186.D0  ,21.1D0   /
-      DATA (AE(I,10, 9),I=1,10)  / 
-     +  .000D+00,.000D+00,114.D0  ,199.D0  ,201.D0  ,202.D0  ,205.D0  ,
-     +  206.D0  ,207.D0  ,22.0D0   /
-      DATA (AE(I,10,10),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,218.D0  ,219.D0  ,220.D0  ,224.D0  ,
-     +  225.D0  ,226.D0  ,23.3D0   /
-      DATA (AE(I,10,11),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,150.D0  ,238.D0  ,238.D0  ,243.D0  ,
-     +  244.D0  ,245.D0  ,24.4D0   /
-      DATA (AE(I,10,12),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,85.8D0  ,255.D0  ,255.D0  ,261.D0  ,
-     +  262.D0  ,263.D0  ,26.3D0   /
-      DATA (AE(I,10,13),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,195.D0  ,272.D0  ,279.D0  ,
-     +  279.D0  ,280.D0  ,27.6D0   /
-      DATA (AE(I,10,14),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,115.D0  ,290.D0  ,296.D0  ,
-     +  297.D0  ,298.D0  ,29.6D0   /
-      DATA (AE(I,10,15),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,263.D0  ,313.D0  ,
-     +  314.D0  ,315.D0  ,31.8D0   /
-      DATA (AE(I,10,16),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,150.D0  ,330.D0  ,
-     +  331.D0  ,332.D0  ,34.4D0   /
-      DATA (AE(I,10,17),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,90.0D0  ,319.D0  ,
-     +  349.D0  ,349.D0  ,36.4D0   /
-      DATA (AE(I,10,18),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,196.D0  ,
-     +  366.D0  ,367.D0  ,38.3D0   /
-      DATA (AE(I,10,19),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,122.D0  ,
-     +  387.D0  ,384.D0  ,41.4D0   /
-      DATA (AE(I,10,20),I=1,10)  / 
-     +  .000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,.000D+00,
-     +  247.D0  ,401.D0  ,43.4D0     /
-      DATA (ERES(I, 1),I=1,10)  / 10*0.D0/
-      DATA (ERES(I, 2),I=1,10)  / 10*0.D0/
-      DATA (ERES(I, 3),I=1,10)  / 10*0.D0/
-      DATA (ERES(I, 4),I=1,10)  / 10*0.D0/
-      DATA (ERES(I, 5),I=1,10)  / 10*0.D0/
-      DATA (ERES(I, 6),I=1,10)  / 
-     +    0.000D0, 0.000D0, 0.000D0, 0.000D0, 0.000D0, 0.000D0, 0.000D0,
-     +    2.780D0, 2.880D0, 2.890D0 /
-      DATA (ERES(I, 7),I=1,10)  / 
-     +    1.500D0, 2.460D0, 2.510D0, 2.610D0, 2.700D0, 2.920D0, 3.070D0,
-     +    3.200D0, 3.330D0, 2.890D0 /
-      DATA (ERES(I, 8),I=1,10)  / 
-     +    4.470D0, 4.350D0, 4.390D0, 4.550D0, 4.660D0, 4.890D0, 4.980D0,
-     +    5.100D0, 5.220D0, 2.890D0 /
-      DATA (ERES(I, 9),I=1,10)  / 
-     +    7.480D0, 7.380D0, 7.370D0, 7.480D0, 7.510D0, 7.630D0, 7.660D0,
-     +    7.750D0, 7.820D0, 2.890D0 /
-      DATA (ERES(I,10),I=1,10)  / 
-     +   15.270D0,15.190D0,15.200D0,15.370D0,15.380D0,15.430D0,15.540D0,
-     +   15.590D0,15.630D0, 2.890D0 /
-      END
-C->
-C=======================================================================
-
-      SUBROUTINE FRAGM (IAT,IAP, NW,B, NF, IAF)
-
-C-----------------------------------------------------------------------
-C...Nuclear Fragmentation, Abrasion-ablation model, 
-C...Based on Jon Engel's routines ABRABL 
-C...This most recent version adds for all prefragment
-C...masses > 10 the model calculation for the fragment
-C...mass distribution and the energy carried by the fragment
-C...of W. Friedmann
-C...The average values are used to implement the model
-C...in the montecarlo fashion / TSS, Dec '91
-C.
-C.  INPUT: IAP = mass of incident nucleus
-C.         IAT = mass of target   nucleus
-C.         NW = number of wounded nucleons in the beam nucleus
-C.         B  = impact parameter in the interaction
-C.     
-C.  OUTPUT : NF = number of fragments  of the spectator nucleus
-C.           IAF(1:NF) = mass number of each fragment
-C.           PF(3,60) in common block /FRAGMENTS/ contains
-C.           the three momentum components (MeV/c) of each
-C.           fragment in the projectile frame
-C..............................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      COMMON /FRAGMENTS/ PPP(3,60)
-      COMMON /FRAGMOD/A(10,10,20),AE(10,10,20),ERES(10,10),NFLAGG(10,10)
-      DIMENSION IAF(60)
-      DIMENSION AA(10), EAA(10) 
-      SAVE
-      EXTERNAL GASDEV
-      DATA AA/10.D0,15.D0,20.D0,25.D0,30.D0,35.D0,40.D0,45.D0,50.D0,
-     $        56.D0/
-      DATA EAA/1.D0,2.D0,4.D0,6.D0,8.D0,10.D0,12.D0,16.D0,20.D0,30.D0/
-
-      AP=IAP
-      AT=IAT
-      NPF = IAP - NW
-      IF (NPF .EQ. 0) THEN
-         NF = 0
-         RETURN
-      ENDIF
-
-      EB = ESTAR(AP,AT, B)
-      EBP = ESTARP (NPF, NW)
-C CONTRIBUTION TO E* FROM ENERGY DEPOSITED BY SECONDARIES
-      EB = EB + EBP
-C TOTAL E* IS THE SUM OF THE TWO COMPONENTS
-
-C.....Prefragment transverse momentum (MeV/nucleon)...
-            FK = FERMK(AP)
-C FERMI MOMENTUM OF THE PROJECTILE NUCLEUS
-            IF (NW .LT. IAP) THEN
-            SIG = FK*DSQRT(NW*NPF/(AP-1.D0))/3.162D0
-C GAUSSIAN SIGMA IN ALL THREE DIRECTION
-            ELSE
-            SIG = FK/3.162D0
-C THIS IS NOT CORRECT, TOO LARGE !!!!!!!!!!!!!!
-            ENDIF
-             PPFX = SIG*GASDEV(0)/NPF
-             PPFY = SIG*GASDEV(1)/NPF
-C THREE MOMENTUM COMPONENTS PER NUCLEON FOR THE PREFRAGMENT
-
-C.............Crude model for small prefragment mass .......
-            IF (NPF .LT. 10) THEN
-                 CALL EVAP(NPF, EB, EPS, NNUC, NALP)
-C   EPS IS THE KINETIC ENERGY CARRIED BY THE EVAPORATED NUCLEONS
-               ETOT = 938.D0 + EPS
-                 PP = SQRT((ETOT*ETOT - 8.79844D5)/3.D0)
-C   AVERAGE MOMENTUM OF EVAPORATED NUCLEONS IN EACH DIRECTION
-                 NUC = NPF - NNUC - 4*NALP
-                 NF = 0
-                 IF (NUC .GT. 0) THEN
-                    NF = NF + 1
-                    IAF(NF) = NUC
-                    PPP(1,NF) = NUC*PPFX
-                    PPP(2,NF) = NUC*PPFY
-                 ENDIF
-                 IF (NALP .NE. 0) THEN
-                 DO I=1,NALP
-                   NF = NF + 1
-                    IAF(NF) = 4
-                   CALL SINCO(S1,C1)
-                   CALL SINCO(S2,C2)
-                   PXE = 4.D0*PP*S1*S2
-                   PYE = 4.D0*PP*S1*C2
-                   PPP(1,NF) = 4.D0*PPFX + PXE
-                   PPP(2,NF) = 4.D0*PPFY + PYE
-                   PPP(1,1) = PPP(1,1) - PXE
-                   PPP(2,1) = PPP(2,1) - PYE
-                 ENDDO
-                 ENDIF
-                 IF (NNUC .NE. 0) THEN
-                 DO I=1,NNUC
-                    NF = NF + 1
-                    IAF(NF) = 1
-                    CALL SINCO(S1,C1)
-                    CALL SINCO(S2,C2)
-                    PXE = PP*S1*S2
-                    PYE = PP*S1*C2
-                    PPP(1,NF) = 4.D0*PPFX + PXE
-                    PPP(2,NF) = 4.D0*PPFY + PYE
-                    PPP(1,1) = PPP(1,1) - PXE
-                    PPP(2,1) = PPP(2,1) - PYE
-                 ENDDO
-                 ENDIF
-                 RETURN
-            ENDIF
-
-C.........More refined model calculation .............
-      JA = NPF/5 -1
-      IF (JA .LT. 10) THEN
-      IF ((NPF - AA(JA)) .GT. (AA(JA+1)-NPF)) JA = JA + 1
-      ENDIF
-      ARAT = DBLE(NPF)/AA(JA)
-      DO J=1,10
-      IF (EB .LT. EAA(J)) GO TO 29
-      ENDDO
-      JE = 10
-      GO TO 39
-   29      JE = J
-   39      IF (JE .GT. 1 .AND. JE .NE. 10) THEN
-      IF ((EB - EAA(J-1)) .LT. (EAA(J)-EB)) JE = J - 1
-      ENDIF
-      ERAT = EB/EAA(JE)
-        IF (EB .LT. 1.D0) THEN
-        ERAT = EB
-        ENDIF
-C INTERPOLATE BETWEEN EB=0. (NOTHING HAPPENS) AND EB = 1. MeV
-         IF (JA .EQ. 10 .AND. JE .GT. 6) THEN
-            WRITE(*,*)' JA=',JA,',   JE=',JE
-         ENDIF
-   43    ESUM = 0.D0
-      NSUM = 0
-      JF = 0
-      DO J=20,1,-1
-        FR =  A(JA, JE, J)*ARAT*ERAT
-        N1 = INT(1.D0 + FR)
-        FR1 = FR/DBLE(N1)
-        DO K=1, N1
-          IF (S_RNDM(0) .LT. FR1) THEN
-            JF = JF + 1
-            IAF(JF) = J
-            NSUM = NSUM + J
-            EKIN = ERAT*AE(JA,JE, J)
-            IF (EKIN .GT. 0.D0) THEN
-              ESUM = ESUM + EKIN
-              ETOT = 938.D0*IAF(JF) + EKIN
-              PP = DSQRT(2.D0*(ETOT*ETOT - IAF(JF)**2*8.79844D5)/3.D0)
-              CALL SINCO(S1,C1)
-              CALL SINCO(S2,C2)
-              PPP(1,JF) = PP*S1*S2 + IAF(JF)*PPFX
-              PPP(2,JF) = PP*S1*C2 + IAF(JF)*PPFY
-            ENDIF
-            IF (NSUM .GT. NPF) THEN
-C           WRITE(*,*)' WARNING, NSUM=', NSUM,',  NPF=',NPF
-C           WRITE(*,*)'  ARAT =', ARAT
-              GO TO 43
-            ELSE
-              IF (NSUM .EQ. NPF) THEN
-                GO TO 44
-              ENDIF
-            ENDIF
-          ENDIF
-        ENDDO
-      ENDDO
-      IF (NFLAGG(JA,JE) .EQ. 0) THEN
-C 'THE RESIDUE' IS A NUCLEAR FRAGMENT
-        JF = JF + 1
-        IAF(JF) = NPF - NSUM
-        F1 = NPF*EB - ESUM
-        IF (F1 .LT. 0.D0) F1 = 0.D0
-C GIVE THE REST OF EB TO THE FRAGMENT
-        EKIN = F1
-        IF (EKIN .GT. 0.D0) THEN
-          ETOT = 938.D0*IAF(JF) + EKIN
-          PP = DSQRT(2.D0*(ETOT*ETOT - IAF(JF)**2*8.79844D5)/3.D0)
-          CALL SINCO(S1,C1)
-          CALL SINCO(S2,C2)
-          PPP(1,JF) = PP*S1*S2 + IAF(JF)*PPFX
-          PPP(2,JF) = PP*S1*C2 + IAF(JF)*PPFY
-        ENDIF
-      ELSE
-C 'THE RESIDUE' CONSISTS OF SPECTATOR NUCLEONS
-        N1 = NPF - NSUM
-        DO K=1,N1
-          JF = JF + 1
-          IAF(JF) = 1
-          EKIN = ERAT*ERES(JA,JE)
-          IF (EKIN .GT. 0.D0) THEN
-            ETOT = 938.D0*IAF(JF) + EKIN
-            PP = DSQRT(2.D0*(ETOT*ETOT - IAF(JF)**2*8.79844D5)/3.D0)
-            CALL SINCO(S1,C1)
-            CALL SINCO(S2,C2)
-            PPP(1,JF) = PP*S1*S2 + PPFX
-            PPP(2,JF) = PP*S1*C2 + PPFY
-          ENDIF
-        ENDDO
-      ENDIF
-  44  NF = JF
-      RETURN
-      END
-C->
-C=======================================================================
-
-      FUNCTION ESTARP (NPF, NW)
-
-C-----------------------------------------------------------------------
-C CONTRIBUTION TO E* FROM ENERGY DEPOSITED BY SECONDARIES
-C VERY NAIVE VERSION INCORPORATING HUEFFNER'S IDEAS
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      SAVE
-
-      APF = NPF
-      F1 = 15.3D0/APF**0.666666666D0
-C AVERAGE KINETIC ENERGY/NUCLEON IN PREFRAGMENT (MeV)
-C PER PATHLENGTH EQUAL TO THE PREFRAGMENT RADIUS
-      ESTARP = 0.D0
-      DO I=1,NW
-        IF (S_RNDM(0) .GT. 0.5D0) THEN
-          F2 = F1*RDIS(0)
-          ESTARP = ESTARP + F2
-        ENDIF
-      ENDDO
-C SAMPLE RANDOMLY PER WOUNDED NUCLEON, x NW
-      RETURN
-      END
 C=======================================================================
       
-      FUNCTION RDIS(Idum)
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      dimension probr(20)
-      SAVE
-      data probr/
-     *      0.10000D0, 0.15748D0, 0.21778D0, 0.28605D0, 0.36060D0,
-     *      0.43815D0, 0.51892D0, 0.60631D0, 0.70002D0, 0.79325D0,
-     *      0.88863D0, 0.98686D0, 1.10129D0, 1.21202D0, 1.32932D0,
-     *      1.44890D0, 1.57048D0, 1.70139D0, 1.83417D0, 2.00000D0/
-
-      rdis = idum
-      nr = INT(20.D0*S_RNDM(0) + 1.D0)
-      if (nr .eq. 1) then
-        f1 = 0.D0
-      else
-        f1 = probr(nr-1)
-      endif
-      dr = probr(nr) - f1
-      rdis = f1 + dr*S_RNDM(1)
-      return
-      end
-
-C=======================================================================
-
-      FUNCTION ESTAR(ap,at,b)
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-
-      SAVE
-
-c      real*4 ap,at,b,estar
-      sigma=4.5D0  !total n-n cross section in fm**2
-      rt=.82d0*at**.33333333D0 !target radius
-      rp=.82d0*ap**.33333333D0 !projectile radius
-      alpha=rt**2/rp**2
-      beta=b**2/rt**2
-      f=at*sigma/(PI*rt**2)
-      alf = log(f)
-      alalf = log(alpha)
-      gfac=0.d0
-      gfac1=0.d0
-      s1=0.D0
-      s2=0.D0
-      s3=0.D0
-      ii=1
-      do n=0,10 ! This limit may not need to be so high.
-         if(n.ge.2) then
-            gfac1=gfac
-            gfac=gfac+log(float(n)) 
-         endif
-         g0=n*alf -n*beta*alpha/(n+alpha)+alalf
-         g1=g0-log(alpha+n)-gfac
-         g2=(n+2)*log(f)-(n+2)*beta*alpha/(n+2+alpha) 
-     >      +log(n+2+alpha+beta*alpha**2)-3.d0*log(n+2.d0+alpha)-gfac
-         g3=g0-2.d0*log(n+alpha)-gfac1
-         ii=-ii
-         s1=s1+ii*exp(g1)
-         s2=s2+ii*exp(g2)
-         if(n.ge.1) s3=s3+ii*exp(g3)
-      enddo
-
-      pb=s1
-      e1b=197.D0**2/(2.D0*938.d0*rp**2*pb) *s2
-c      a=b*(s3/pb-1)
-c      a=-b*s3/pb
-c      e2b=-.5* 938. * (41./(ap**.333))**2 * a**2 /(197.**2)
-c      estar=e1b+e2b
-      estar = e1b
-      return
-      end
-C=======================================================================
-
-      SUBROUTINE EVAP(npf,eb,eps,nnuc,nalp)
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      SAVE
-
-      eps=7.5D0+sqrt(8.D0*eb)
-      n=min(npf*int(eb/eps),npf)
-      nalp=n/5
-      nnuc=n-4*nalp
-      return
-      end
-C->
-C=======================================================================
-
-      FUNCTION FERMK(A)
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      DIMENSION AA(6), FK(6)
-      SAVE
-      DATA AA/4.D0, 6.D0, 12.D0, 24.D0, 40.D0, 57.D0/
-      DATA FK/130.D0,169.D0,221.D0,235.D0,251.D0,260.D0/
-
-      DO I=2,4
-      IF (A .LT. AA(I)) GO TO 25
-      ENDDO
-      I = 5
-   25      F11 = AA(I-1)
-      F12 = AA(I)
-      F13 = AA(I+1)
-      F21 = FK(I-1)
-      F22 = FK(I)
-      F23 = FK(I+1)
-      FERMK = QUAD_INT(A,F11,F12,F13, F21,F22,F23)
-      RETURN
-      END
-
-C*=======================================================================
-C. Multiple interaction structure
-C========================================================================
-
-      SUBROUTINE INT_NUC (IA, IB, SIG0, SIGEL) 
-
-C-----------------------------------------------------------------------
-C...Compute with a montecarlo code  the  "multiple interaction structure"
-C.  of a nucleus-nucleus interaction
-C.
-C.  INPUT : IA            = mass of target nucleus
-C.          IB            = mass of projectile nucleus
-C.          SIG0 (mbarn)  = inelastic pp cross section
-C.          SIGEL(mbarn)  = elastic pp cross section
-C.
-C.  OUTPUT : in common block /CNUCMS/
-C.           B = impact parameter (fm)
-C.           BMAX = maximum impact parameter for generation
-C.           NTRY = number of "trials" before one interaction
-C.           NA = number of wounded nucleons in A
-C.           NB =    "        "        "     in B
-C.           NI = number of nucleon-nucleon inelastic interactions 
-C.           NAEL = number of elastically scattered nucleons in  A 
-C.           NBEL =    "         "           "          "    in  B
-C.           JJA(J)  [J=1:IA]   = number of inelastic interactions 
-C.                                of J-th nucleon of nucleus A
-C.           JJB(J)  [J=1:IB]   = number of inelastic interactions 
-C.                                of J-th nucleon of nucleus B
-C.           JJAEL(J)  [J=1:IA]   = number of elastic interactions 
-C.                                of J-th nucleon of nucleus A
-C.           JJBEL(J)  [J=1:IB]   = number of elastic interactions 
-C.                                of J-th nucleon of nucleus B
-C.           JJINT(J,K)  [J=1:NB, K=1:NA]  (0 = no interaction) 
-C.                                         (1 = interaction )
-C.                                         between nucleon J of A and K of B
-C-----------------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      PARAMETER (IAMAX=56)
-      COMMON /CNUCMS/ B, BMAX, NTRY, NA, NB, NI, NAEL, NBEL
-     +         ,JJA(IAMAX), JJB(IAMAX), JJINT(IAMAX,IAMAX)
-     +         ,JJAEL(IAMAX), JJBEL(IAMAX)
-      DIMENSION XA(IAMAX), YA(IAMAX), XB(IAMAX), YB(IAMAX)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      SIGT = SIG0 + SIGEL
-      R2  = 0.1D0 * SIG0/PI
-      R2T = 0.1D0 * SIGT/PI
-      BMAX = 15.D0                             ! fm
-      NTRY = 0
-      CALL NUC_CONF (IA, XA, YA)
-      CALL NUC_CONF (IB, XB, YB)
-      NI = 0
-      NIEL = 0
-      DO JA=1,IA
-         JJA(JA) = 0
-         JJAEL(JA) = 0
-      ENDDO
-      DO JB=1,IB
-         JJB(JB) = 0
-         JJBEL(JB) = 0
-         DO JA=1,IA
-            JJINT(JB,JA) = 0
-         ENDDO
-      ENDDO
-1000  B = BMAX*SQRT(S_RNDM(0))
-      PHI = TWOPI*S_RNDM(1)
-      BX = B*COS(PHI)
-      BY = B*SIN(PHI)
-      NTRY = NTRY+1
-      DO JA=1,IA
-         DO JB=1,IB
-            S = (XA(JA)-XB(JB)-BX)**2 + (YA(JA)-YB(JB)-BY)**2
-            IF (S .LT. R2)  THEN
-               NI = NI + 1
-               JJA(JA) = JJA(JA)+1
-               JJB(JB) = JJB(JB)+1
-               JJINT(JB,JA) = 1
-            ELSE IF (S .LT. R2T)  THEN
-               NIEL = NIEL + 1
-               JJAEL(JA) = JJAEL(JA)+1
-               JJBEL(JB) = JJBEL(JB)+1
-            ENDIF
-         ENDDO
-      ENDDO
-      IF (NI + NIEL .EQ. 0)  GOTO 1000
-      NA = 0
-      NB = 0
-      NAEL = 0
-      NBEL = 0
-      DO JA=1,IA
-         IF (JJA(JA) .GT. 0)  THEN
-            NA = NA + 1
-         ELSE
-            IF (JJAEL(JA) .GT. 0)  NAEL = NAEL+1
-         ENDIF
-      ENDDO
-      DO JB=1,IB
-         IF (JJB(JB) .GT. 0)  THEN
-            NB = NB + 1
-         ELSE
-            IF (JJBEL(JB) .GT. 0)  NBEL = NBEL+1
-         ENDIF
-      ENDDO
-      RETURN
-      END
-C=======================================================================
-
-       SUBROUTINE NUC_CONF (IA, XX, YY)
-
-C-----------------------------------------------------------------------
-C...This routine generates the configuration  of a nucleus 
-C.  need an initialization call to NUC_GEOM_INI
-C.
-C.  INPUT  : IA = mass number of the nucleus
-C.  OUTPUT : XX(1:IA), YY(1:IA) (fm) = position in impact parameter
-C.                                     space of the IA nucleons
-C...................................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      PARAMETER (IAMAX=56)
-      DIMENSION XX(IAMAX), YY(IAMAX)
-      PARAMETER (NB=401)
-      COMMON /CPROFA/ ZMIN, DZ, BBZ(NB,IAMAX)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      DO J=1,IA
-         Z = S_RNDM(J)
-         JZ = INT((Z-ZMIN)/DZ)+1
-         JZ = MIN(JZ,400)
-         T = (Z-ZMIN)/DZ - DBLE(JZ-1)
-         B = BBZ(JZ,IA)*(1.D0-T) + BBZ(JZ+1,IA)*T
-         PHI = TWOPI*S_RNDM(J+1)
-         XX(J) = B*COS(PHI)
-         YY(J) = B*SIN(PHI)
-      ENDDO
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE NUC_GEOM_INI
-
-C-----------------------------------------------------------------------
-C...Initialize all nucleus profiles
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      PARAMETER (NB=401)
-      PARAMETER (IAMAX=56)
-      COMMON /CPROF/ DB, BMAX, BB(NB), TB(NB), A
-      COMMON /CPROFA/ ZMIN, DZ, BBZ(NB,IAMAX)
-      DIMENSION FFB(NB), GGB(NB)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      CALL SHELL_INI
-      CALL WOOD_SAXON_INI
-      DO IA= 2,IAMAX
-           JA = IA
-         CALL NUC_PROFIL(JA)
-         DO K=1,NB
-           FFB(K) = BB(K)*TB(K) * TWOPI
-         ENDDO            
-         GGB(1) = 0.D0
-         GGB(NB) = 1.D0
-         DO K=2,NB-1
-           GGB(K) = GGB(K-1) + FFB(K-1)*DB
-         ENDDO            
-         CALL INVERT_ARRAY(GGB,0.D0,DB,NB, BBZ(1,IA), ZMIN, DZ)
-      ENDDO
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE NUC_PROFIL (JA)
-
-C-----------------------------------------------------------------------
-C...Compute the profile function T(b)
-C.  normalised as INT[d2b T(b) = 1]
-C.  INPUT : JA = integer mass number of nucleus
-C...............................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      PARAMETER (NB=401)
-      EXTERNAL DENSA
-      DOUBLE PRECISION DENSA
-      COMMON /CC01/  B
-      COMMON /CCDA/ JJA
-      COMMON /CPROF/ DB, BMAX, BB(NB), TB(NB), A
-      SAVE
-
-      BMAX = 7.5D0
-      DB = BMAX/DBLE(NB-1)
-      JJA = JA
-      A = JA
-      DO JB=1,NB
-        B = DB*DBLE(JB-1)
-        BB(JB) = B
-        IF (JA .LE. 18)  THEN
-            TB(JB) = PROFNUC (B, JA)
-         ELSE
-            TB(JB) = 2.D0*GAUSS (DENSA,0.D0,BMAX)
-         ENDIF
-      ENDDO
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE NUC1_PROFIL (AA)
-
-C-----------------------------------------------------------------------
-C...Compute the profile function T(b)
-C.  normalised as INT[d2b T(b) = 1]
-C.  INPUT : AA = mass number of nucleus
-C...............................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      PARAMETER (NB=401)
-      EXTERNAL DENSA
-      DOUBLE PRECISION DENSA
-      COMMON /CC01/  B
-      COMMON /CPROF/ DB, BMAX, BB(NB), TB(NB), A
-      SAVE
-
-      A = AA
-      IA1 = INT(AA)
-      IA2 = IA1 + 1
-      U = AA - DBLE(IA1)
-      BMAX = 7.5D0
-      DB = BMAX/DBLE(NB-1)
-      DO JB=1,NB
-         B = DB*DBLE(JB-1)
-         BB(JB) = B
-         IF (A .LE. 18.D0)  THEN
-             T1 = PROFNUC (B, IA1)
-             T2 = PROFNUC (B, IA2)
-          ELSE
-             JJA = IA1
-             T1 = 2.D0*GAUSS (DENSA,0.D0,BMAX)
-             JJA = IA2
-             T2 = 2.D0*GAUSS (DENSA,0.D0,BMAX)
-          ENDIF
-          TB(JB) = (1.D0-U)*T1  + U*T2
-      ENDDO
-      RETURN
-      END
-
-C*======================================================================
-C.   Code about nuclear densities
-C=======================================================================
-
-      FUNCTION DENS_NUC (R, JA)
-
-C-----------------------------------------------------------------------
-C....Nuclear density (normalised to 1)
-C.   for a nucleus of mass number JA
-C.   INPUT R = radial coordinate  (fm)
-C.         JA = integer mass number
-C.  OUTPUT (fm**-3)
-C--------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /CWOOD/ RR0(19:56), AA0(19:56), CC0(19:56)
-      SAVE
-
-      IF (JA .GT. 18)  THEN
-         DENS_NUC = WOOD_SAXON(R,JA)
-      ELSE IF (JA .NE. 4)  THEN
-         DENS_NUC = HELIUM(R)
-      ELSE
-         DENS_NUC = SHELL(R,JA)
-      ENDIF
-      RETURN
-      END
-C=======================================================================
-
-      FUNCTION WOOD_SAXON (R, JA) 
-
-C-----------------------------------------------------------------------
-C....Wood-Saxon nuclear density (normalised to 1)
-C.   for a nucleus of mass number A.
-C.   INPUT R =  (fm)
-C.         JA = mass number
-C.   OUTPUT (fm**-3)
-C------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /CWOOD/ RR0(19:56), AA0(19:56), CC0(19:56)
-      SAVE
-
-      WOOD_SAXON = CC0(JA)/(1.D0+EXP((R-RR0(JA))/AA0(JA)))
-      RETURN
-      END      
-C=======================================================================
-
-      FUNCTION HELIUM (R)
-
-C-----------------------------------------------------------------------
-C... Helium density from Barrett and Jackson
-C.   INPUT R = r coordinate (fm)
-C.   OUTPUT (fm**-3)
-C........................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      SAVE
-      DATA R0 /0.964D0/, CA /0.322D0/   ! fm
-      DATA W /0.517D0/, CC /5.993224D-02/
-
-      HELIUM = CC*(1.D0+W*(R/R0)**2)/(1.D0 + EXP((R-R0)/CA))
-      RETURN
-      END
-C=======================================================================
-
-      FUNCTION SHELL (R,JA)
-
-C-----------------------------------------------------------------------
-C...Density in the shell model
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /CSHELL/ RR0(18), RR02(18)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      R0 = RR0(JA)
-      C1 = MIN(1.D0,4.D0/DBLE(JA))
-      CS = 1.D0/(R0**3 * PI**1.5D0)
-      CP = 2.D0*CS/3.D0
-      FS = EXP(-(R/R0)**2)
-      FP = (R/R0)**2 * FS
-      SHELL = C1*CS*FS + (1.D0-C1)*CP*FP
-      RETURN
-      END
-C=======================================================================
-
-      FUNCTION PROFNUC (B, JA)
-
-C-----------------------------------------------------------------------
-C...This function return
-C.  the profile T(b) for a nucleus of mass number A
-C.  INPUT B = impact parameter (GeV**-1)
-C.        JA = integer mass number
-C.  OUTPUT  (fm**-2)
-C.
-C.  The  density of the nucleus is the `shell model density'
-C.  the parameter r0 must beinitialized in the common block
-C.............................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /CSHELL/ RR0(18), RR02(18)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      B2 = B*B
-      ARG = B2/RR02(JA)
-      TS = EXP(-ARG)
-      TP = TS*(2.D0*B2+RR02(JA))/(3.D0*RR02(JA))
-      CS = MIN(1.D0,4.D0/DBLE(JA))
-      PROFNUC = (CS*TS + (1.D0-CS)*TP)/(PI*RR02(JA))
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE SHELL_INI
-
-C-----------------------------------------------------------------------
-C...Initialize the parameter  of the shell model
-C.  for the nuclei with    6 < A < 18
-C..............................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      COMMON /CSHELL/ RR0(18), RR02(18)
-      DIMENSION RR(18)
-      SAVE
-C...Data on Sqrt[<r**2>]  in fermi
-      DATA RR /0.81D0, 2.095D0,  1.88D0, 1.674D0,  -1.D0,
-     +         2.56D0, 2.41D0,    -1.D0, 2.519D0, 2.45D0,
-     +         2.37D0, 2.460D0, 2.440D0,  2.54D0, 2.58D0, 
-     +         2.718D0,2.662D0, 2.789D0/
-
-      DO JA=1,18
-         A = DBLE(JA)
-         RMED = RR(JA)
-         IF (RMED .LE. 0.D0)   RMED = 0.5D0*(RR(JA-1) + RR(JA+1))
-         C = MAX(1.5D0,(5.D0/2.D0 - 4.D0/A) )
-         R0 = RMED/SQRT(C)
-         RR0 (JA) = R0
-         RR02(JA) = R0*R0
-      ENDDO
-      RETURN
-      END
-C->
-C=======================================================================
-
-      SUBROUTINE WOOD_SAXON_INI
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /CWOOD/ RR0(19:56), AA0(19:56), CC0(19:56)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-C...Wood-Saxon parameters from  table 6.2   of Barrett and Jackson
-      RR0 (19) = 2.59D0
-      AA0 (19) = 0.564D0
-      RR0 (20) = 2.74D0
-      AA0 (20) = 0.569D0
-      RR0 (22) = 2.782D0
-      AA0 (22) = 0.549D0
-      RR0 (24) = 2.99D0
-      AA0 (24) = 0.548D0
-      RR0 (27) = 2.84D0
-      AA0 (27) = 0.569D0
-      RR0 (28) = 3.14D0
-      AA0 (28) = 0.537D0
-      RR0 (29) = 3.77D0
-      AA0 (29) = 0.52D0
-      RR0 (48) = 3.912D0
-      AA0 (48) = 0.5234D0
-      RR0 (56) = 3.98D0
-      AA0 (56) = 0.569D0
-      DO J=19, 56
-         IF (RR0(J) .LE. 0.D0)  THEN
-            RR0(J) = 1.05D0*DBLE(J)**0.333333333333D0
-            AA0(J) = 0.545D0
-         ENDIF
-         CC0(J)=3.D0/(4.D0*PI*RR0(J)**3)/(1.D0+((AA0(J)*PI)/RR0(J))**2)
-      ENDDO
-      RETURN
-      END
-C=======================================================================
-
-      FUNCTION DENSA (Z)
-
-C-----------------------------------------------------------------------
-C....Woods Saxon nuclear density (normalised to 1)
-C.   for a nucleus of mass number A.
-C.   INPUT z = z coordinate (fm)
-C.         JA = integer mass number
-C.         B (in common /CC01/)  impact parameter  (fm)
-C.  OUTPUT (fm**-3)
-C--------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /CC01/  B
-      COMMON /CCDA/ JA
-      COMMON /CWOOD/ RR0(19:56), AA0(19:56), CC0(19:56)
-      SAVE
-
-      R = SQRT (Z*Z + B*B)
-      DENSA = CC0(JA)/(1.D0+EXP((R-RR0(JA))/AA0(JA)))
-      RETURN
-      END
-
-C*=====================================================================
-C. Cross sections
-C======================================================================
-
-      SUBROUTINE SIGMA_AIR (IB,SIG0,SIGEL,KINT,
-     +                            SIGMA,DSIGMA,SIGQE,DSIGQE)
-
-C-----------------------------------------------------------------------
-C...Compute with a montecarlo method the "production"
-C.  and "quasi-elastic" cross section for  
-C.  a nucleus-air  interaction 
-C.
-C.  INPUT : IB            = mass of projectile nucleus
-C.          SIG0 (mbarn)  = inelastic pp cross section
-C.          KINT            = number  of interactions to generate
-C.  OUTPUT : SIGMA (mbarn) = "production" cross section
-C.           DSIGMA   "    = error
-C.           SIGQE    "    = "quasi-elastic" cross section
-C.           DSIGQE   "    = error
-C.           additional output is in the common block  /CPROBAB/
-C..........................................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      PARAMETER (IAMAX=56)
-      PARAMETER (IAMAX2=3136)          ! IAMAX*IAMAX
-      COMMON  /CPROBAB/ PROBA(IAMAX), DPROBA(IAMAX), 
-     +   PROBB(IAMAX), DPROBB(IAMAX), PROBI(IAMAX2), DPROBI(IAMAX2),
-     +   P1AEL(0:IAMAX),DP1AEL(0:IAMAX),P1BEL(0:IAMAX), DP1BEL(0:IAMAX),
-     +   P2AEL(0:IAMAX),DP2AEL(0:IAMAX),P2BEL(0:IAMAX), DP2BEL(0:IAMAX)
-      COMMON /CNUCMS/ B, BMAX, NTRY, NA, NB, NI, NAEL, NBEL
-     +         ,JJA(IAMAX), JJB(IAMAX), JJINT(IAMAX,IAMAX)
-     +         ,JJAEL(IAMAX), JJBEL(IAMAX)
-      DIMENSION  MMA(0:IAMAX), MMB(0:IAMAX), MMI(0:IAMAX2)
-      DIMENSION  M1AEL(0:IAMAX), M1BEL(0:IAMAX)
-      DIMENSION  M2AEL(0:IAMAX), M2BEL(0:IAMAX)
-      DOUBLE PRECISION FOX
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-      DATA FOX /0.21522D0/  !atomic percentage of 'non-nitrogen' in air
-
-      R2 = 0.1D0 * SIG0/PI
-      BMAX = 15.D0                           ! fm
-      SIGMA0 = PI*BMAX*BMAX*10.              ! mbarn
-      IA = 16
-      DO J=1,IA
-         MMA(J) = 0
-         M1AEL(J) = 0
-         M2AEL(J) = 0
-      ENDDO
-      DO J=1,IB
-         MMB(J) = 0
-         M1BEL(J) = 0
-         M2BEL(J) = 0
-      ENDDO
-      DO J=1,IA*IB
-         MMI(J) = 0
-      ENDDO
-      NN = 0
-      M = 0
-      DO KK=1,KINT
-c  select target IA from air composition
-         R = S_RNDM(KK)
-         IA = 14
-         IF (R .LT. FOX)  IA = 16
-
-         CALL INT_NUC (IA, IB, SIG0, SIGEL) 
-         NN = NN + NTRY
-         MMI(NI) = MMI(NI) + 1
-         MMA(NA) = MMA(NA)+1
-         MMB(NB) = MMB(NB)+1
-         IF (NI .GT. 0)  THEN
-            M = M+1
-            M1AEL(NAEL) = M1AEL(NAEL)+1
-            M1BEL(NBEL) = M1BEL(NBEL)+1
-         ELSE
-            M2AEL(NAEL) = M2AEL(NAEL)+1
-            M2BEL(NBEL) = M2BEL(NBEL)+1
-         ENDIF
-      ENDDO
-      MQE = KINT - M
-      SIGMA  = SIGMA0 * DBLE(M)/DBLE(NN)
-      DSIGMA = SIGMA0 * SQRT(DBLE(M))/DBLE(NN)
-      SIGQE  = SIGMA0 * DBLE(MQE)/DBLE(NN)
-      DSIGQE = SIGMA0 * SQRT(DBLE(MQE))/DBLE(NN)
-      DO J=1,IA
-         PROBA(J) = DBLE(MMA(J))/DBLE(M)
-         DPROBA(J) = SQRT(DBLE(MMA(J)))/DBLE(M)
-      ENDDO
-      DO J=1,IB
-         PROBB(J) = DBLE(MMB(J))/DBLE(M)
-         DPROBB(J) = SQRT(DBLE(MMB(J)))/DBLE(M)
-      ENDDO
-      DO J=1,IA*IB
-         PROBI(J) = DBLE(MMI(J))/DBLE(M)
-         DPROBI(J) = SQRT(DBLE(MMI(J)))/DBLE(M)
-      ENDDO
-      DO J=0,IA
-         P1AEL(J) = DBLE(M1AEL(J))/DBLE(M)
-         DP1AEL(J) = SQRT(DBLE(M1AEL(J)))/DBLE(M)
-         P2AEL(J) = DBLE(M2AEL(J))/DBLE(MQE)
-         DP2AEL(J) = SQRT(DBLE(M2AEL(J)))/DBLE(MQE)
-      ENDDO
-      DO J=0,IB
-         P1BEL(J) = DBLE(M1BEL(J))/DBLE(M)
-         DP1BEL(J) = SQRT(DBLE(M1BEL(J)))/DBLE(M)
-         P2BEL(J) = DBLE(M2BEL(J))/DBLE(MQE)
-         DP2BEL(J) = SQRT(DBLE(M2BEL(J)))/DBLE(MQE)
-      ENDDO
-      RETURN
-      END
-C->
-C=======================================================================
-
-      SUBROUTINE SIGMA_MC (IA,IB,SIG0,SIGEL,KINT,
-     +                            SIGMA,DSIGMA,SIGQE,DSIGQE)
-
-C-----------------------------------------------------------------------
-C...Compute with a montecarlo method the "production"
-C.  and "quasi-elastic" cross section for  
-C.  a nucleus-nucleus interaction
-C.
-C.  INPUT : IA            = mass of target nucleus
-C.          IB            = mass of projectile nucleus
-C.          SIG0 (mbarn)  = inelastic pp cross section
-C.          KINT            = number  of interactions to generate
-C.  OUTPUT : SIGMA (mbarn) = "production" cross section
-C.           DSIGMA   "    = error
-C.           SIGQE    "    = "quasi-elastic" cross section
-C.           DSIGQE   "    = error
-C.           additional output is in the common block  /CPROBAB/
-C.           Prob(n_A), Prob(n_B), Prob(n_int)
-C..........................................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-
-      PARAMETER (IAMAX=56)
-      PARAMETER (IAMAX2=3136)          ! IAMAX*IAMAX
-      COMMON  /CPROBAB/ PROBA(IAMAX), DPROBA(IAMAX), 
-     +   PROBB(IAMAX), DPROBB(IAMAX), PROBI(IAMAX2), DPROBI(IAMAX2),
-     +   P1AEL(0:IAMAX),DP1AEL(0:IAMAX),P1BEL(0:IAMAX), DP1BEL(0:IAMAX),
-     +   P2AEL(0:IAMAX),DP2AEL(0:IAMAX),P2BEL(0:IAMAX), DP2BEL(0:IAMAX)
-      COMMON /CNUCMS/ B, BMAX, NTRY, NA, NB, NI, NAEL, NBEL
-     +         ,JJA(IAMAX), JJB(IAMAX), JJINT(IAMAX,IAMAX)
-     +         ,JJAEL(IAMAX), JJBEL(IAMAX)
-      DIMENSION  MMA(0:IAMAX), MMB(0:IAMAX), MMI(0:IAMAX2)
-      DIMENSION  M1AEL(0:IAMAX), M1BEL(0:IAMAX)
-      DIMENSION  M2AEL(0:IAMAX), M2BEL(0:IAMAX)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      R2 = 0.1D0 * SIG0/PI
-      BMAX = 15.D0                           ! fm
-      SIGMA0 = PI*BMAX*BMAX*10.D0              ! mbarn
-      DO J=1,IA
-         MMA(J) = 0
-         M1AEL(J) = 0
-         M2AEL(J) = 0
-      ENDDO
-      DO J=1,IB
-         MMB(J) = 0
-         M1BEL(J) = 0
-         M2BEL(J) = 0
-      ENDDO
-      DO J=1,IA*IB
-         MMI(J) = 0
-      ENDDO
-      NN = 0
-      M = 0
-      DO KK=1,KINT
-         CALL INT_NUC (IA, IB, SIG0, SIGEL) 
-         NN = NN + NTRY
-         MMI(NI) = MMI(NI) + 1
-         MMA(NA) = MMA(NA)+1
-         MMB(NB) = MMB(NB)+1
-         IF (NI .GT. 0)  THEN
-            M = M+1
-            M1AEL(NAEL) = M1AEL(NAEL)+1
-            M1BEL(NBEL) = M1BEL(NBEL)+1
-         ELSE
-            M2AEL(NAEL) = M2AEL(NAEL)+1
-            M2BEL(NBEL) = M2BEL(NBEL)+1
-         ENDIF
-      ENDDO
-      MQE = KINT - M
-      SIGMA  = SIGMA0 * DBLE(M)/DBLE(NN)
-      DSIGMA = SIGMA0 * SQRT(DBLE(M))/DBLE(NN)
-      SIGQE  = SIGMA0 * DBLE(MQE)/DBLE(NN)
-      DSIGQE = SIGMA0 * SQRT(DBLE(MQE))/DBLE(NN)
-      DO J=1,IA
-         PROBA(J) = DBLE(MMA(J))/DBLE(M)
-         DPROBA(J) = SQRT(DBLE(MMA(J)))/DBLE(M)
-      ENDDO
-      DO J=1,IB
-         PROBB(J) = DBLE(MMB(J))/DBLE(M)
-         DPROBB(J) = SQRT(DBLE(MMB(J)))/DBLE(M)
-      ENDDO
-      DO J=1,IA*IB
-         PROBI(J) = DBLE(MMI(J))/DBLE(M)
-         DPROBI(J) = SQRT(DBLE(MMI(J)))/DBLE(M)
-      ENDDO
-      DO J=0,IA
-         P1AEL(J) = DBLE(M1AEL(J))/DBLE(M)
-         DP1AEL(J) = SQRT(DBLE(M1AEL(J)))/DBLE(M)
-         P2AEL(J) = DBLE(M2AEL(J))/DBLE(MQE)
-         DP2AEL(J) = SQRT(DBLE(M2AEL(J)))/DBLE(MQE)
-      ENDDO
-      DO J=0,IB
-         P1BEL(J) = DBLE(M1BEL(J))/DBLE(M)
-         DP1BEL(J) = SQRT(DBLE(M1BEL(J)))/DBLE(M)
-         P2BEL(J) = DBLE(M2BEL(J))/DBLE(MQE)
-         DP2BEL(J) = SQRT(DBLE(M2BEL(J)))/DBLE(MQE)
-      ENDDO
-      RETURN
-      END
-
-C*=============================================================
-C.  Cross sections
-C*=============================================================
-
-C Glauber h-air cross section calculation moved to inelScreen src file..
-
-C-----------------------------------------------------------------------
-C.  Fit of Block and Cahn to pp and pbar-p cross sections
-C-----------------------------------------------------------------------
-C=======================================================================
-
-      SUBROUTINE BLOCK(SQS,SIG1,SIG2,SLOP1,SLOP2,
-     +                 RHO1,RHO2,SIGEL1,SIGEL2)
-
-C-----------------------------------------------------------------------
-C...p-p and pbar-p cross sections
-C.  Parametrization of  Block and Cahn
-C
-C.  INPUT  : SQS   (GeV)  = c.m. energy
-C.  
-C.  OUPUT : SIG1 (mbarn)    = pp  total  cross section 
-C.          SLOP1 (GeV**2)  = slope of elastic scattering
-C.          RHO1            = Real/Imaginary part of the amplitude
-C.                            for forward elastic  scattering (pp)
-C.          SIGEL1 (mbarn)  = pp  elastic scattering  cross section
-C.          [1 -> 2   : pp -> pbar p]
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      S = SQS*SQS
-      CALL FPLUS  (S, FR, FI)
-      CALL FMINUS (S, GR, GI)
-      SIG1 = FI-GI
-      SIG2 = FI+GI
-      RHO1 = (FR-GR)/(FI-GI)
-      RHO2 = (FR+GR)/(FI+GI)
-      CALL SSLOPE (S, BP, BM)
-      SLOP1 = BP - GI/FI*(BM-BP)
-      SLOP2 = BP + GI/FI*(BM-BP)
-      SIGEL1 = SIG1**2*(1.D0+RHO1**2)/(16.D0*PI*SLOP1)/CMBARN
-      SIGEL2 = SIG2**2*(1.D0+RHO2**2)/(16.D0*PI*SLOP2)/CMBARN
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE FPLUS (S, FR, FI)
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /BLOCKC/ AA, BETA, S0, CC, AMU, DD, ALPHA, A0
-      COMPLEX*16 Z1, Z2, Z3
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      F1 = LOG(S/S0)
-      Z1 = DCMPLX(F1,-PI/2.D0)
-      Z1 = Z1*Z1
-      Z2 = 1.D0 + A0*Z1
-      Z3 = Z1/Z2
-      F2 = CC*S**(AMU-1.D0)
-      F3 = 0.5D0*PI*(1.-AMU)
-      FI = AA + F2*COS(F3) + BETA*DREAL(Z3)
-      FR = -BETA*DIMAG(Z3)+F2*SIN(F3)
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE FMINUS (S, FR, FI)
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /BLOCKC/ AA, BETA, S0, CC, AMU, DD, ALPHA, A0
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      F1 = S**(ALPHA-1.D0)
-      F2 = 0.5D0*PI*(1.D0-ALPHA)
-      FR = -DD*F1*COS(F2)
-      FI = -DD*F1*SIN(F2)
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE SSLOPE (S, BP, BM)
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /BLOCKD/ CP, DP, EP, CM, DM
-      SAVE
-
-      AL = LOG(S)
-      BP = CP + DP*AL + EP*AL*AL
-      BM = CM + DM*AL
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE BLOCK_INI
-
-C-----------------------------------------------------------------------
-C...Parameters of fit IFIT=1 of Block and Cahn
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /BLOCKC/ AA, BETA, S0, CC, AMU, DD, ALPHA, A0
-      COMMON /BLOCKD/ CP, DP, EP, CM, DM
-      SAVE
-
-      AA = 41.74D0
-      BETA = 0.66D0
-      S0 = 338.5D0
-      CC = 0.D0
-      AMU = 0.D0
-      DD = -39.37D0
-      ALPHA = 0.48D0
-      A0 = 0.D0
-      CP = 10.90D0
-      DP = -0.08D0
-      EP = 0.043D0
-      CM = 23.27D0
-      DM = 0.93D0
-      RETURN
-      END
-
-C*=============================================================
-C.  Nucleus-nucleus cross sections
-C=======================================================================
-
-      SUBROUTINE SIGNUC_INI (IA,E0)
-
-C-----------------------------------------------------------------------
-C...This subroutine receives in INPUT E0 (TeV)
-C.  energy per nucleon and computes the cross sections
-C.  and interactions lengths for  all nuclei
-C.  with A  between 2 and IA
-C.  The output is contained in common block /CLENNN/
-C.
-C.  Attention: the tabulated cross sections are obtained with
-C.  new p-p cross sections as used in SIBYLL 2x,
-C.  in addition field dimensions changed (RE 04/2000)
-C.
-C........................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /CLENNN/ SSIGNUC(60), ALNUC(60)
-      DIMENSION SIGMA(6,56), SIGQE(6,56)
-      DIMENSION AA(6)
-      SAVE
-      DATA NE /6/, AMIN /1.D0/, DA /1.D0/
-      DATA AA /1.D0,2.D0,3.D0,4.D0,5.D0,6.D0/
-      DATA AVOG /6.0221367D-04/
-      DATA ATARGET /14.514D0/            ! effective masss of air
-C...Data on `inelastic-production' nucleus-air cross section
-      DATA (SIGMA(J, 2),J=1,6) /
-     &3.842D+02,4.287D+02,4.940D+02,5.887D+02,6.922D+02,7.767D+02/
-      DATA (SIGMA(J, 3),J=1,6) /
-     &4.601D+02,5.149D+02,5.595D+02,6.663D+02,7.641D+02,8.446D+02/
-      DATA (SIGMA(J, 4),J=1,6) /
-     &4.881D+02,5.373D+02,6.005D+02,6.895D+02,7.716D+02,8.967D+02/
-      DATA (SIGMA(J, 5),J=1,6) /
-     &5.874D+02,6.176D+02,7.181D+02,7.993D+02,9.089D+02,1.031D+03/
-      DATA (SIGMA(J, 6),J=1,6) /
-     &7.054D+02,7.399D+02,8.388D+02,9.463D+02,1.080D+03,1.197D+03/
-      DATA (SIGMA(J, 7),J=1,6) /
-     &7.192D+02,7.611D+02,8.449D+02,9.539D+02,1.061D+03,1.176D+03/
-      DATA (SIGMA(J, 8),J=1,6) /
-     &7.550D+02,7.975D+02,9.153D+02,9.944D+02,1.126D+03,1.236D+03/
-      DATA (SIGMA(J, 9),J=1,6) /
-     &7.929D+02,8.392D+02,9.265D+02,1.059D+03,1.167D+03,1.262D+03/
-      DATA (SIGMA(J, 10),J=1,6) /
-     &8.157D+02,8.644D+02,9.512D+02,1.058D+03,1.182D+03,1.298D+03/
-      DATA (SIGMA(J, 11),J=1,6) /
-     &8.039D+02,8.587D+02,9.534D+02,1.055D+03,1.182D+03,1.298D+03/
-      DATA (SIGMA(J, 12),J=1,6) /
-     &8.515D+02,8.957D+02,9.869D+02,1.122D+03,1.253D+03,1.366D+03/
-      DATA (SIGMA(J, 13),J=1,6) /
-     &8.769D+02,9.100D+02,1.018D+03,1.119D+03,1.252D+03,1.341D+03/
-      DATA (SIGMA(J, 14),J=1,6) /
-     &9.058D+02,9.532D+02,1.057D+03,1.171D+03,1.302D+03,1.391D+03/
-      DATA (SIGMA(J, 15),J=1,6) /
-     &9.555D+02,9.799D+02,1.098D+03,1.201D+03,1.342D+03,1.444D+03/
-      DATA (SIGMA(J, 16),J=1,6) /
-     &1.009D+03,1.058D+03,1.149D+03,1.290D+03,1.414D+03,1.520D+03/
-      DATA (SIGMA(J, 17),J=1,6) /
-     &9.907D+02,1.045D+03,1.166D+03,1.290D+03,1.384D+03,1.516D+03/
-      DATA (SIGMA(J, 18),J=1,6) /
-     &1.036D+03,1.121D+03,1.198D+03,1.328D+03,1.470D+03,1.592D+03/
-      DATA (SIGMA(J, 19),J=1,6) /
-     &1.083D+03,1.162D+03,1.250D+03,1.371D+03,1.516D+03,1.661D+03/
-      DATA (SIGMA(J, 20),J=1,6) /
-     &1.146D+03,1.215D+03,1.295D+03,1.443D+03,1.544D+03,1.744D+03/
-      DATA (SIGMA(J, 21),J=1,6) /
-     &1.158D+03,1.234D+03,1.292D+03,1.467D+03,1.618D+03,1.750D+03/
-      DATA (SIGMA(J, 22),J=1,6) /
-     &1.153D+03,1.205D+03,1.329D+03,1.451D+03,1.596D+03,1.734D+03/
-      DATA (SIGMA(J, 23),J=1,6) /
-     &1.210D+03,1.274D+03,1.356D+03,1.493D+03,1.655D+03,1.803D+03/
-      DATA (SIGMA(J, 24),J=1,6) /
-     &1.212D+03,1.273D+03,1.398D+03,1.489D+03,1.641D+03,1.800D+03/
-      DATA (SIGMA(J, 25),J=1,6) /
-     &1.236D+03,1.315D+03,1.423D+03,1.561D+03,1.669D+03,1.855D+03/
-      DATA (SIGMA(J, 26),J=1,6) /
-     &1.279D+03,1.345D+03,1.431D+03,1.595D+03,1.734D+03,1.889D+03/
-      DATA (SIGMA(J, 27),J=1,6) /
-     &1.228D+03,1.304D+03,1.438D+03,1.546D+03,1.714D+03,1.836D+03/
-      DATA (SIGMA(J, 28),J=1,6) /
-     &1.289D+03,1.370D+03,1.451D+03,1.597D+03,1.754D+03,1.913D+03/
-      DATA (SIGMA(J, 29),J=1,6) /
-     &1.411D+03,1.469D+03,1.613D+03,1.777D+03,1.910D+03,2.075D+03/
-      DATA (SIGMA(J, 30),J=1,6) /
-     &1.347D+03,1.401D+03,1.498D+03,1.642D+03,1.816D+03,1.975D+03/
-      DATA (SIGMA(J, 31),J=1,6) /
-     &1.359D+03,1.448D+03,1.551D+03,1.694D+03,1.858D+03,2.007D+03/
-      DATA (SIGMA(J, 32),J=1,6) /
-     &1.358D+03,1.460D+03,1.559D+03,1.698D+03,1.842D+03,1.974D+03/
-      DATA (SIGMA(J, 33),J=1,6) /
-     &1.418D+03,1.448D+03,1.578D+03,1.727D+03,1.872D+03,2.047D+03/
-      DATA (SIGMA(J, 34),J=1,6) /
-     &1.433D+03,1.466D+03,1.605D+03,1.738D+03,1.892D+03,2.019D+03/
-      DATA (SIGMA(J, 35),J=1,6) /
-     &1.430D+03,1.511D+03,1.602D+03,1.752D+03,1.935D+03,2.060D+03/
-      DATA (SIGMA(J, 36),J=1,6) /
-     &1.462D+03,1.499D+03,1.653D+03,1.805D+03,1.920D+03,2.057D+03/
-      DATA (SIGMA(J, 37),J=1,6) /
-     &1.470D+03,1.520D+03,1.656D+03,1.818D+03,1.946D+03,2.131D+03/
-      DATA (SIGMA(J, 38),J=1,6) /
-     &1.470D+03,1.542D+03,1.691D+03,1.800D+03,1.968D+03,2.133D+03/
-      DATA (SIGMA(J, 39),J=1,6) /
-     &1.495D+03,1.588D+03,1.676D+03,1.834D+03,1.969D+03,2.163D+03/
-      DATA (SIGMA(J, 40),J=1,6) /
-     &1.525D+03,1.551D+03,1.722D+03,1.833D+03,2.020D+03,2.192D+03/
-      DATA (SIGMA(J, 41),J=1,6) /
-     &1.526D+03,1.615D+03,1.709D+03,1.899D+03,2.040D+03,2.181D+03/
-      DATA (SIGMA(J, 42),J=1,6) /
-     &1.510D+03,1.567D+03,1.716D+03,1.892D+03,2.056D+03,2.197D+03/
-      DATA (SIGMA(J, 43),J=1,6) /
-     &1.557D+03,1.658D+03,1.776D+03,1.898D+03,2.092D+03,2.200D+03/
-      DATA (SIGMA(J, 44),J=1,6) /
-     &1.556D+03,1.645D+03,1.752D+03,1.920D+03,2.091D+03,2.243D+03/
-      DATA (SIGMA(J, 45),J=1,6) /
-     &1.583D+03,1.663D+03,1.798D+03,1.940D+03,2.051D+03,2.263D+03/
-      DATA (SIGMA(J, 46),J=1,6) /
-     &1.599D+03,1.642D+03,1.799D+03,1.941D+03,2.107D+03,2.268D+03/
-      DATA (SIGMA(J, 47),J=1,6) /
-     &1.611D+03,1.692D+03,1.811D+03,1.956D+03,2.107D+03,2.264D+03/
-      DATA (SIGMA(J, 48),J=1,6) /
-     &1.625D+03,1.706D+03,1.819D+03,1.986D+03,2.139D+03,2.354D+03/
-      DATA (SIGMA(J, 49),J=1,6) /
-     &1.666D+03,1.737D+03,1.854D+03,1.971D+03,2.160D+03,2.318D+03/
-      DATA (SIGMA(J, 50),J=1,6) /
-     &1.648D+03,1.747D+03,1.856D+03,2.023D+03,2.181D+03,2.352D+03/
-      DATA (SIGMA(J, 51),J=1,6) /
-     &1.653D+03,1.763D+03,1.868D+03,2.015D+03,2.203D+03,2.386D+03/
-      DATA (SIGMA(J, 52),J=1,6) /
-     &1.690D+03,1.720D+03,1.902D+03,2.027D+03,2.189D+03,2.357D+03/
-      DATA (SIGMA(J, 53),J=1,6) /
-     &1.690D+03,1.750D+03,1.921D+03,2.059D+03,2.208D+03,2.417D+03/
-      DATA (SIGMA(J, 54),J=1,6) /
-     &1.705D+03,1.781D+03,1.911D+03,2.073D+03,2.242D+03,2.411D+03/
-      DATA (SIGMA(J, 55),J=1,6) /
-     &1.714D+03,1.806D+03,1.896D+03,2.100D+03,2.253D+03,2.411D+03/
-      DATA (SIGMA(J, 56),J=1,6) /
-     &1.774D+03,1.813D+03,1.954D+03,2.098D+03,2.280D+03,2.482D+03/
- 
-      DATA (SIGQE(J, 2),J=1,6) /
-     &4.141D+01,3.708D+01,5.428D+01,8.696D+01,1.403D+02,1.885D+02/
-      DATA (SIGQE(J, 3),J=1,6) /
-     &4.357D+01,3.894D+01,5.177D+01,9.675D+01,1.447D+02,2.029D+02/
-      DATA (SIGQE(J, 4),J=1,6) /
-     &4.123D+01,3.933D+01,6.070D+01,9.482D+01,1.474D+02,2.023D+02/
-      DATA (SIGQE(J, 5),J=1,6) /
-     &4.681D+01,4.287D+01,6.381D+01,1.050D+02,1.519D+02,2.198D+02/
-      DATA (SIGQE(J, 6),J=1,6) /
-     &5.407D+01,5.195D+01,6.723D+01,1.108D+02,1.750D+02,2.368D+02/
-      DATA (SIGQE(J, 7),J=1,6) /
-     &4.975D+01,4.936D+01,6.880D+01,1.162D+02,1.689D+02,2.329D+02/
-      DATA (SIGQE(J, 8),J=1,6) /
-     &5.361D+01,5.027D+01,6.858D+01,1.177D+02,1.759D+02,2.412D+02/
-      DATA (SIGQE(J, 9),J=1,6) /
-     &4.980D+01,5.063D+01,7.210D+01,1.196D+02,1.806D+02,2.299D+02/
-      DATA (SIGQE(J, 10),J=1,6) /
-     &5.170D+01,5.070D+01,7.105D+01,1.182D+02,1.679D+02,2.411D+02/
-      DATA (SIGQE(J, 11),J=1,6) /
-     &4.950D+01,4.950D+01,7.286D+01,1.137D+02,1.769D+02,2.477D+02/
-      DATA (SIGQE(J, 12),J=1,6) /
-     &5.262D+01,5.133D+01,7.110D+01,1.204D+02,1.789D+02,2.501D+02/
-      DATA (SIGQE(J, 13),J=1,6) /
-     &5.320D+01,5.378D+01,6.847D+01,1.200D+02,1.805D+02,2.442D+02/
-      DATA (SIGQE(J, 14),J=1,6) /
-     &5.638D+01,5.271D+01,6.985D+01,1.209D+02,1.867D+02,2.610D+02/
-      DATA (SIGQE(J, 15),J=1,6) /
-     &5.294D+01,5.353D+01,7.435D+01,1.211D+02,1.899D+02,2.612D+02/
-      DATA (SIGQE(J, 16),J=1,6) /
-     &5.668D+01,5.254D+01,7.557D+01,1.269D+02,1.917D+02,2.707D+02/
-      DATA (SIGQE(J, 17),J=1,6) /
-     &5.456D+01,5.721D+01,7.481D+01,1.208D+02,1.859D+02,2.658D+02/
-      DATA (SIGQE(J, 18),J=1,6) /
-     &5.901D+01,5.382D+01,7.591D+01,1.246D+02,1.872D+02,2.874D+02/
-      DATA (SIGQE(J, 19),J=1,6) /
-     &6.328D+01,6.116D+01,8.451D+01,1.318D+02,2.088D+02,2.749D+02/
-      DATA (SIGQE(J, 20),J=1,6) /
-     &5.779D+01,5.924D+01,8.382D+01,1.370D+02,2.062D+02,2.837D+02/
-      DATA (SIGQE(J, 21),J=1,6) /
-     &7.155D+01,5.732D+01,8.231D+01,1.363D+02,2.047D+02,2.820D+02/
-      DATA (SIGQE(J, 22),J=1,6) /
-     &6.699D+01,5.651D+01,8.511D+01,1.477D+02,2.031D+02,2.921D+02/
-      DATA (SIGQE(J, 23),J=1,6) /
-     &6.179D+01,6.269D+01,9.395D+01,1.437D+02,2.195D+02,2.964D+02/
-      DATA (SIGQE(J, 24),J=1,6) /
-     &6.784D+01,6.028D+01,8.622D+01,1.279D+02,2.214D+02,2.867D+02/
-      DATA (SIGQE(J, 25),J=1,6) /
-     &6.589D+01,5.795D+01,8.890D+01,1.385D+02,2.055D+02,2.988D+02/
-      DATA (SIGQE(J, 26),J=1,6) /
-     &6.364D+01,6.325D+01,8.942D+01,1.421D+02,2.128D+02,3.083D+02/
-      DATA (SIGQE(J, 27),J=1,6) /
-     &6.449D+01,6.664D+01,8.986D+01,1.453D+02,2.140D+02,2.932D+02/
-      DATA (SIGQE(J, 28),J=1,6) /
-     &7.284D+01,6.139D+01,8.867D+01,1.425D+02,2.179D+02,2.978D+02/
-      DATA (SIGQE(J, 29),J=1,6) /
-     &7.221D+01,7.085D+01,9.079D+01,1.482D+02,2.277D+02,2.913D+02/
-      DATA (SIGQE(J, 30),J=1,6) /
-     &6.928D+01,6.294D+01,8.935D+01,1.463D+02,2.265D+02,2.834D+02/
-      DATA (SIGQE(J, 31),J=1,6) /
-     &6.611D+01,6.586D+01,9.133D+01,1.461D+02,2.201D+02,2.959D+02/
-      DATA (SIGQE(J, 32),J=1,6) /
-     &6.401D+01,6.177D+01,8.971D+01,1.480D+02,2.155D+02,3.152D+02/
-      DATA (SIGQE(J, 33),J=1,6) /
-     &7.057D+01,6.918D+01,8.410D+01,1.465D+02,2.288D+02,3.088D+02/
-      DATA (SIGQE(J, 34),J=1,6) /
-     &6.453D+01,7.020D+01,9.272D+01,1.517D+02,2.189D+02,2.999D+02/
-      DATA (SIGQE(J, 35),J=1,6) /
-     &6.741D+01,6.295D+01,9.323D+01,1.536D+02,2.190D+02,2.930D+02/
-      DATA (SIGQE(J, 36),J=1,6) /
-     &6.807D+01,7.046D+01,1.025D+02,1.565D+02,2.315D+02,3.090D+02/
-      DATA (SIGQE(J, 37),J=1,6) /
-     &8.082D+01,6.565D+01,9.160D+01,1.572D+02,2.229D+02,3.125D+02/
-      DATA (SIGQE(J, 38),J=1,6) /
-     &6.494D+01,6.964D+01,9.089D+01,1.653D+02,2.336D+02,3.120D+02/
-      DATA (SIGQE(J, 39),J=1,6) /
-     &6.833D+01,6.860D+01,8.933D+01,1.601D+02,2.261D+02,3.167D+02/
-      DATA (SIGQE(J, 40),J=1,6) /
-     &7.021D+01,6.866D+01,8.437D+01,1.588D+02,2.249D+02,2.941D+02/
-      DATA (SIGQE(J, 41),J=1,6) /
-     &7.122D+01,6.205D+01,9.545D+01,1.582D+02,2.335D+02,3.395D+02/
-      DATA (SIGQE(J, 42),J=1,6) /
-     &7.265D+01,6.936D+01,9.486D+01,1.505D+02,2.379D+02,3.248D+02/
-      DATA (SIGQE(J, 43),J=1,6) /
-     &7.048D+01,7.539D+01,9.192D+01,1.566D+02,2.532D+02,3.182D+02/
-      DATA (SIGQE(J, 44),J=1,6) /
-     &6.650D+01,7.139D+01,9.862D+01,1.602D+02,2.289D+02,3.077D+02/
-      DATA (SIGQE(J, 45),J=1,6) /
-     &7.511D+01,6.893D+01,9.245D+01,1.641D+02,2.519D+02,3.381D+02/
-      DATA (SIGQE(J, 46),J=1,6) /
-     &6.437D+01,6.894D+01,8.697D+01,1.544D+02,2.391D+02,3.213D+02/
-      DATA (SIGQE(J, 47),J=1,6) /
-     &7.980D+01,6.958D+01,1.022D+02,1.609D+02,2.408D+02,3.246D+02/
-      DATA (SIGQE(J, 48),J=1,6) /
-     &7.265D+01,7.313D+01,8.989D+01,1.578D+02,2.387D+02,3.235D+02/
-      DATA (SIGQE(J, 49),J=1,6) /
-     &6.959D+01,6.337D+01,9.084D+01,1.656D+02,2.331D+02,3.226D+02/
-      DATA (SIGQE(J, 50),J=1,6) /
-     &7.371D+01,6.807D+01,9.726D+01,1.535D+02,2.445D+02,3.189D+02/
-      DATA (SIGQE(J, 51),J=1,6) /
-     &7.882D+01,6.680D+01,9.377D+01,1.629D+02,2.448D+02,3.297D+02/
-      DATA (SIGQE(J, 52),J=1,6) /
-     &7.223D+01,6.794D+01,9.925D+01,1.738D+02,2.446D+02,3.162D+02/
-      DATA (SIGQE(J, 53),J=1,6) /
-     &7.703D+01,6.971D+01,9.601D+01,1.595D+02,2.484D+02,3.265D+02/
-      DATA (SIGQE(J, 54),J=1,6) /
-     &7.549D+01,7.459D+01,8.984D+01,1.645D+02,2.348D+02,3.201D+02/
-      DATA (SIGQE(J, 55),J=1,6) /
-     &7.891D+01,6.840D+01,1.017D+02,1.698D+02,2.501D+02,3.429D+02/
-      DATA (SIGQE(J, 56),J=1,6) /
-     &7.545D+01,6.673D+01,1.057D+02,1.684D+02,2.424D+02,3.181D+02/
-
-      ASQS = 0.5D0*LOG10(1.876D+03*E0)
-      JE = MIN(INT((ASQS-AMIN)/DA)+1,NE-2)
-      DO JA=2,IA
-         ABEAM = DBLE(JA)
-         S1 = QUAD_INT(ASQS, AA(JE),AA(JE+1),AA(JE+2),
-     +                   SIGMA(JE,JA),SIGMA(JE+1,JA),SIGMA(JE+2,JA))
-         S2 = QUAD_INT(ASQS, AA(JE),AA(JE+1),AA(JE+2),
-     +                   SIGQE(JE,JA),SIGQE(JE+1,JA),SIGQE(JE+2,JA))
-         SSIGNUC(JA) = S1 + S2
-         ALNUC(JA) = ATARGET/(AVOG*SSIGNUC(JA))
-      ENDDO
-      ALNUC(1) = FPNI(E0, 13)
-      SSIGNUC(1) = ATARGET/(AVOG*ALNUC(1))
-
-      RETURN
-      END
-
-
-C*=======================================================================
-C.  General utilities
-C=======================================================================
-
-      FUNCTION QUAD_INT (R,X0,X1,X2,V0,V1,V2)
-
-C-----------------------------------------------------------------------
-C...Quadratic interpolation
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      SAVE
-
-      R0=R-X0
-      R1=R-X1
-      R2=R-X2
-      S0=X0-X1
-      S1=X0-X2
-      S2=X1-X2
-      QUAD_INT = V0*R1*R2/(S0*S1)-V1*R0*R2/(S0*S2)+V2*R0*R1/(S1*S2)
-      RETURN
-      END
-C=======================================================================
-
-      FUNCTION GAUSS (FUN, A,B)
-
-C-----------------------------------------------------------------------
-C...Returns the  8 points Gauss-Legendre integral
-C.  of function FUN from A to B
-C...........................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      DIMENSION X(8), W(8)
-      SAVE
-      DATA X/.0950125098D0, .2816035507D0, .4580167776D0, .6178762444D0,
-     1       .7554044083D0, .8656312023D0, .9445750230D0, .9894009349D0/
-      DATA W/.1894506104D0, .1826034150D0, .1691565193D0, .1495959888D0,
-     1       .1246289712D0, .0951585116D0, .0622535239D0, .0271524594D0/
-
-      XM = 0.5D0*(B+A)
-      XR = 0.5D0*(B-A)
-      SS = 0.D0
-      DO J=1,8
-        DX = XR*X(J)
-        SS = SS + W(J) * (FUN(XM+DX) + FUN(XM-DX))
-      ENDDO
-      GAUSS = XR*SS
-      RETURN
-      END
-C=======================================================================
-
-      SUBROUTINE INVERT_ARRAY (yy, xmin, dx, n, xnew, ymin, dy)
-
-C-----------------------------------------------------------------------
-C..    This subroutine receives one   array
-C      of n y values in input yy(1:n)
-C      that correspond to  equispaced values of x_j = xmin + dx*(j-1)
-C
-C      and "reverse" the array returning an array of  x values
-C      xnew (1:n) that  corresponds to equispaced values of y
-C      The relation is assumed monotonous but can be 
-C      increasing or decreasing
-C..............................................................
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      dimension  yy(n), xnew (n)
-      SAVE
-
-      ymin = yy(1)
-      ymax = yy(n)
-      dy = (ymax - ymin)/float(n-1)
-      xnew (1) = xmin
-      xnew (n) = xmin + dx*float(n-1)
-      k0 = 1
-      do j=2,n-1
-         y = ymin + float(j-1)*dy 
-         do k=k0,n
-            if((yy(k) .gt. y) .eqv. (yy(n) .gt. yy(1))) goto 100
-         enddo
-100      y2 = yy(k)
-         y1 = yy(k-1)
-         k0 = k-1
-         x1 = xmin + dx*float(k-2)
-         x2 = x1+dx
-         xnew (j)  = x1 + dx* (y-y1)/(y2-y1)
-      enddo
-      return
-      end
-C->
-C=======================================================================
-
-      SUBROUTINE SINCO(S,C)
-
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-      F = TWOPI*S_RNDM(0)
-      C = COS (F)
-      S = SIN (F)
-      RETURN
-      END
-
-C***********************************************************************
-C.  Cross sections for cascade calculations (FPNI)
-C=======================================================================
-      
-      SUBROUTINE SIGMA_PP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
-
-C-----------------------------------------------------------------------
-C...p-p cross sections
-C.
-C.  this routine serves the purpose to calculate cascades with different 
-C.  cross sections
-C.
-C. INPUT: E0 = Laboratory Energy  (TeV)
-C. 
-C. OUTPUT: SIGT = total cross section
-C.         SIGEL = elastic cross section
-C.         SIGINEL = inelastic cross section
-C.         SLOPE = slope of elastic scattering (GeV**-2)
-C.         RHO = Imaginary/Real part of forward elastic amplitude
-C.   
-C.  (old cross section tables end at 10^6 GeV)
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      DIMENSION SSIG0(51)
-      DIMENSION SIGDIF(3)
-      COMMON /CSPA/ ICSPA2(3)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-C...p-p inelastic cross sections (mbarn)
-      DATA (SSIG0(J),J=1,51) /
-     +      32.05D0,  32.06D0,  32.08D0,  32.13D0,  32.22D0,  32.36D0,
-     +      32.56D0,  32.85D0,  33.24D0,  33.75D0,  34.37D0,  35.14D0,
-     +      36.05D0,  37.12D0,  38.37D0,  39.78D0,  41.36D0,  43.13D0,
-     +      45.07D0,  47.18D0,  49.47D0,  51.91D0,  54.54D0,  57.28D0,
-     +      60.15D0,  63.15D0,  66.28D0,  69.48D0,  72.80D0,  76.22D0,
-     +      79.71D0,  83.27D0,  86.87D0,  90.55D0,  94.26D0,  98.05D0,
-     +     101.89D0, 105.75D0, 109.71D0, 113.65D0, 117.60D0, 121.55D0,
-     +     125.53D0, 129.56D0, 133.60D0, 137.70D0, 141.77D0, 145.84D0,
-     +     149.92D0, 154.02D0, 158.15D0/
-
-      ICSPA = ICSPA2(1)
-
-      SQS = SQRT(2000.D0*0.938D0*E0)
-
-*  pre-LHC SIBYLL2.1 model
-      
-      IF(ICSPA.EQ.-2) THEN
-
-         CALL SIB_SIGMA_EXT(3,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO)      
-
-*  old standard NUCLIB/SIBYLL model
-
-      ELSE IF(ICSPA.EQ.-1) THEN
-
-        AL = LOG10(SQS)
-        if(AL.le.1.D0) then
-          SIGINEL = SSIG0(1)
-        else
-          J1 = INT((AL - 1.D0)*10.D0) + 1
-          J1 = min(J1,50)
-          T = (AL-1.D0)*10.D0 - DBLE(J1-1)
-          SIGINEL = SSIG0(J1)*(1.D0-T) + SSIG0(J1+1)*T
-        endif
-        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,SIGEL1,SIGEL2)
-        R = SIGEL1/SIGT1
-        RHO = RHO1
-        SIGT  = SIGINEL/(1.D0-R)
-        SIGEL = SIGINEL*R/(1.D0-R)
-        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO1**2) /CMBARN
-
-*  cross section as calculated in SIBYLL
-
-      ELSE IF(ICSPA.EQ.0) THEN
-
-        CALL SIB_SIGMA_HP(1,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
-
-*  Donnachie-Landshoff  (sig-tot)
-
-      ELSE IF(ICSPA.EQ.1) THEN
-
-        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,
-     +             SIGEL1,SIGEL2)
-        R = SIGEL1/SIGT1
-        RHO = RHO1
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 21.7D0*S**DELDL+56.08D0*S**EPSDL
-        SIGEL = R*SIGT
-        SIGINEL = SIGT-SIGEL
-        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO**2) /CMBARN
-
-*  Donnachie-Landshoff (sig-tot and sig-el)
-
-      ELSE IF(ICSPA.EQ.2) THEN
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 21.7D0*S**DELDL+56.08D0*S**EPSDL
-        IMODEL = 1
-        IF(IMODEL.EQ.1) THEN
-          ALPHAP = 0.25D0
-          SLOPE = 8.5D0+2.D0*ALPHAP*LOG(S)
-        ELSE IF(IMODEL.EQ.2) THEN
-          ALPHAP = 0.3D0
-          SLOPE = 8.D0+2.D0*ALPHAP*LOG(S)
-        ENDIF
-        SIGEL = SIGT**2/(16.D0*PI*SLOPE*CMBARN)
-        SIGINEL = SIGT-SIGEL
-        RHO = 0.D0
-
-*  geometrical scaling with Donnachie-Landshoff sig-tot
-
-      ELSE IF(ICSPA.EQ.3) THEN
-
-        R = 0.17D0
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 21.7D0*S**DELDL+56.08D0*S**EPSDL
-
-        SIGEL = R*SIGT
-        SIGINEL = SIGT-SIGEL
-        SLOPE = SIGT**2/(16.D0*PI*SIGEL)/CMBARN
-        RHO = 0.D0
-
-c ICSPA=4 reserved for CONEX_EXTENSION
-c      ELSE IF(ICSPA.EQ.4) THEN
-
-*  cross section from 2014 Review of Particle Physics
-        
-      ELSE IF(ICSPA.EQ.5) THEN
-         
-c     elastic slope not included in fit
-c     taking slope parameterization from sigma_pp Donnie.-Landshoff
-         ALPHAP = 0.25D0
-         SLOPE = 8.5D0+4.D0*ALPHAP*LOG(SQS)
-         
-         CALL SIG_RPP2014(1,1,SQS,SLOPE,SIGT,SIGEL,SIGINEL,RHO)
-
-      ENDIF
-
-      RETURN
-      END
-
-C=======================================================================
-
-      SUBROUTINE SIGMA_PIP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
-
-C-----------------------------------------------------------------------
-C...pi-p cross sections
-C.
-C.  this routine serves the purpose to calculate cascades with different 
-C.  cross sections
-C.
-C. INPUT: E0 = Laboratory Energy  (TeV)
-C. 
-C. OUTPUT: SIGT = total cross section
-C.         SIGEL = elastic cross section
-C.         SIGINEL = inelastic cross section
-C.         SLOPE = slope of elastic scattering (GeV**-2)
-C.         RHO = Imaginary/Real part of forward elastic amplitude
-C.
-C.  (old cross section tables end at 10^6 GeV)
-C-----------------------------------------------------------------------
-Cf2py double precision,intent(in) :: e0
-Cf2py double precision,intent(out) :: sigt, sigel, siginel, slope, rho
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      DIMENSION SSIG0(51)
-      DIMENSION SIGDIF(3)
-      COMMON /CSPA/ ICSPA2(3)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-C...pi-p inelastic cross sections (mbarn)
-      DATA (SSIG0(J),J=1,51) /
-     +      20.76D0,  20.78D0,  20.81D0,  20.88D0,  20.98D0,  21.13D0,
-     +      21.33D0,  21.61D0,  21.96D0,  22.39D0,  22.92D0,  23.56D0,
-     +      24.31D0,  25.18D0,  26.18D0,  27.32D0,  28.60D0,  30.04D0,
-     +      31.64D0,  33.40D0,  35.34D0,  37.43D0,  39.72D0,  42.16D0,
-     +      44.77D0,  47.56D0,  50.53D0,  53.66D0,  56.99D0,  60.50D0,
-     +      64.17D0,  68.03D0,  72.05D0,  76.27D0,  80.67D0,  85.27D0,
-     +      90.08D0,  95.04D0, 100.27D0, 105.65D0, 111.21D0, 116.94D0,
-     +     122.87D0, 129.03D0, 135.37D0, 141.93D0, 148.62D0, 155.49D0,
-     +     162.48D0, 169.60D0, 176.94D0/
-
-      ICSPA = ICSPA2(2)
-
-      SQS = SQRT(2000.D0*0.938D0*E0)
-      
-*  pre-LHC SIBYLL2.1 model
-      
-      IF(ICSPA.EQ.-2) THEN
-
-         CALL SIB_SIGMA_EXT(2,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO)
-      
-*  old standard NUCLIB/SIBYLL model
-
-      ELSE IF(ICSPA.EQ.-1) THEN
-
-        AL = LOG10(SQS)
-        if(AL.le.1.D0) then
-          SIGINEL = SSIG0(1)
-        else
-          J1 = INT((AL - 1.D0)*10.D0) + 1
-          J1 = min(J1,50)
-          T = (AL-1.D0)*10.D0 - DBLE(J1-1)
-          SIGINEL = SSIG0(J1)*(1.D0-T) + SSIG0(J1+1)*T
-        endif
-        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,SIGEL1,SIGEL2)
-        R = SIGEL1/SIGT1
-        RHO = RHO1
-        SIGT  = SIGINEL/(1.D0-R)
-        SIGEL = SIGINEL*R/(1.D0-R)
-        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO1**2) /CMBARN
-
-*  cross section as calculated in SIBYLL
-
-      ELSE IF(ICSPA.EQ.0) THEN
-
-        CALL SIB_SIGMA_HP(2,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
-
-*  Donnachie-Landshoff  (sig-tot)
-
-      ELSE IF(ICSPA.EQ.1) THEN
-
-        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,
-     +             SIGEL1,SIGEL2)
-        R = SIGEL1/SIGT1
-        RHO = RHO1
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 13.63D0*S**DELDL+(36.02D0+27.56D0)/2.D0*S**EPSDL
-        SIGEL = R*SIGT
-        SIGINEL = SIGT-SIGEL
-        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO**2) /CMBARN
-
-*  Donnachie-Landshoff (sig-tot and sig-el)
-
-      ELSE IF(ICSPA.EQ.2) THEN
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 13.63D0*S**DELDL+(36.02D0+27.56D0)/2.D0*S**EPSDL
-        IMODEL = 1
-        IF(IMODEL.EQ.1) THEN
-          ALPHAP = 0.25D0
-          SLOPE = 8.5D0+2.D0*ALPHAP*LOG(S)
-        ELSE IF(IMODEL.EQ.2) THEN
-          ALPHAP = 0.3D0
-          SLOPE = 8.D0+2.D0*ALPHAP*LOG(S)
-        ENDIF
-        SIGEL = SIGT**2/(16.D0*PI*SLOPE*CMBARN)
-        SIGINEL = SIGT-SIGEL
-        RHO = 0.
-
-*  geometrical scaling with Donnachie-Landshoff sig-tot
-
-      ELSE IF(ICSPA.EQ.3) THEN
-
-        R = 0.17D0
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 13.63D0*S**DELDL+(36.02D0+27.56D0)/2.D0*S**EPSDL
-
-        SIGEL = R*SIGT
-        SIGINEL = SIGT-SIGEL
-        SLOPE = SIGT**2/(16.D0*PI*SIGEL)/CMBARN
-        RHO = 0.D0
-
-c ICSPA=4 reserved for CONEX_EXTENSION
-c      ELSE IF(ICSPA.EQ.4) THEN
-
-*  cross section from 2014 Review of Particle Physics
-        
-      ELSE IF(ICSPA.EQ.5) THEN
-         
-c     elastic slope not included in fit
-c     taking slope parameterization from sigma_pp Donnie.-Landshoff
-         ALPHAP = 0.25D0
-         SLOPE = 8.5D0+4.D0*ALPHAP*LOG(SQS)
-         
-         CALL SIG_RPP2014(2,1,SQS,SLOPE,SIGT,SIGEL,SIGINEL,RHO)
-         
-      ENDIF
-
-
-      RETURN
-      END
-
-C=======================================================================
-
-      SUBROUTINE SIGMA_KP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
-
-C-----------------------------------------------------------------------
-C...K-p cross sections
-C.
-C.  this routine serves the purpose to calculate cascades with different 
-C.  cross sections
-C.
-C.  if old cross sections are selected then sigma_pi = sigma_K
-C.
-C. INPUT: E0 = Laboratory Energy  (TeV)
-C. 
-C. OUTPUT: SIGT = total cross section
-C.         SIGEL = elastic cross section
-C.         SIGINEL = inelastic cross section
-C.         SLOPE = slope of elastic scattering (GeV**-2)
-C.         RHO = Imaginary/Real part of forward elastic amplitude
-C.
-C.  (old cross section tables end at 10^6 GeV)
-C-----------------------------------------------------------------------
-Cf2py double precision,intent(in) :: e0
-Cf2py double precision,intent(out) :: sigt, sigel, siginel, slope, rho
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      DIMENSION SSIG0(51)
-      DIMENSION SIGDIF(3)
-      COMMON /CSPA/ ICSPA2(3)
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-      SAVE
-
-C...pi-p inelastic cross sections (mbarn)
-      DATA (SSIG0(J),J=1,51) /
-     +      20.76D0,  20.78D0,  20.81D0,  20.88D0,  20.98D0,  21.13D0,
-     +      21.33D0,  21.61D0,  21.96D0,  22.39D0,  22.92D0,  23.56D0,
-     +      24.31D0,  25.18D0,  26.18D0,  27.32D0,  28.60D0,  30.04D0,
-     +      31.64D0,  33.40D0,  35.34D0,  37.43D0,  39.72D0,  42.16D0,
-     +      44.77D0,  47.56D0,  50.53D0,  53.66D0,  56.99D0,  60.50D0,
-     +      64.17D0,  68.03D0,  72.05D0,  76.27D0,  80.67D0,  85.27D0,
-     +      90.08D0,  95.04D0, 100.27D0, 105.65D0, 111.21D0, 116.94D0,
-     +     122.87D0, 129.03D0, 135.37D0, 141.93D0, 148.62D0, 155.49D0,
-     +     162.48D0, 169.60D0, 176.94D0/
-
-      ICSPA = ICSPA2(3)
-      
-      SQS = SQRT(2000.D0*0.938D0*E0)      
-
-*  pre-LHC SIBYLL2.1 model
-      
-      IF(ICSPA.EQ.-2) THEN
-
-         CALL SIB_SIGMA_EXT(3,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO)
-      
-*  old standard NUCLIB/SIBYLL model
-
-      ELSE IF(ICSPA.EQ.-1) THEN
-
-        AL = LOG10(SQS)
-        if(AL.le.1.D0) then
-          SIGINEL = SSIG0(1)
-        else
-          J1 = INT((AL - 1.D0)*10.D0) + 1
-          J1 = min(J1,50)
-          T = (AL-1.D0)*10.D0 - DBLE(J1-1)
-          SIGINEL = SSIG0(J1)*(1.D0-T) + SSIG0(J1+1)*T
-        endif
-        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,SIGEL1,SIGEL2)
-        R = SIGEL1/SIGT1
-        RHO = RHO1
-        SIGT  = SIGINEL/(1.D0-R)
-        SIGEL = SIGINEL*R/(1.D0-R)
-        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO1**2) /CMBARN
-
-*  cross section as calculated in SIBYLL
-
-      ELSE IF(ICSPA.EQ.0) THEN
-
-        CALL SIB_SIGMA_HP(3,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
-
-*  Donnachie-Landshoff  (sig-tot)
-
-      ELSE IF(ICSPA.EQ.1) THEN
-
-        CALL BLOCK(SQS,SIGT1,SIGT2,SLOP1,SLOP2,RHO1,RHO2,
-     +             SIGEL1,SIGEL2)
-        R = SIGEL1/SIGT1
-        RHO = RHO1
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 11.82D0*S**DELDL+(26.36D0+ 8.15D0)/2.D0*S**EPSDL
-        SIGEL = R*SIGT
-        SIGINEL = SIGT-SIGEL
-        SLOPE = SIGT**2/(SIGEL * 16.D0*PI) * (1.D0+RHO**2) /CMBARN
-
-*  Donnachie-Landshoff (sig-tot and sig-el)
-
-      ELSE IF(ICSPA.EQ.2) THEN
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 11.82D0*S**DELDL+(26.36D0+ 8.15D0)/2.D0*S**EPSDL
-        IMODEL = 1
-        IF(IMODEL.EQ.1) THEN
-          ALPHAP = 0.25D0
-          SLOPE = 8.5D0+2.D0*ALPHAP*LOG(S)
-        ELSE IF(IMODEL.EQ.2) THEN
-          ALPHAP = 0.3D0
-          SLOPE = 8.D0+2.D0*ALPHAP*LOG(S)
-        ENDIF
-        SIGEL = SIGT**2/(16.D0*PI*SLOPE*CMBARN)
-        SIGINEL = SIGT-SIGEL
-        RHO = 0.D0
-
-*  geometrical scaling with Donnachie-Landshoff sig-tot
-
-      ELSE IF(ICSPA.EQ.3) THEN
-
-        R = 0.17D0
-
-        DELDL = 0.0808D0
-        EPSDL = -0.4525D0
-        S = SQS*SQS
-        SIGT = 11.82D0*S**DELDL+(26.36D0+ 8.15D0)/2.D0*S**EPSDL
-
-        SIGEL = R*SIGT
-        SIGINEL = SIGT-SIGEL
-        SLOPE = SIGT**2/(16.D0*PI*SIGEL)/CMBARN
-        RHO = 0.D0
-        
-c ICSPA=4 reserved for CONEX_EXTENSION
-c      ELSE IF(ICSPA.EQ.4) THEN
-
-
-*  cross section from 2014 Review of Particle Physics
-        
-      ELSE IF(ICSPA.EQ.5) THEN
-         
-c     elastic slope not included in fit
-c     taking slope parameterization from sigma_pp Donnie.-Landshoff
-         ALPHAP = 0.25D0
-         SLOPE = 8.5D0+4.D0*ALPHAP*LOG(SQS)
-         
-         CALL SIG_RPP2014(3,1,SQS,SLOPE,SIGT,SIGEL,SIGINEL,RHO)
-
-      ENDIF
-
-      RETURN
-      END
-
-C=======================================================================
-
-      SUBROUTINE SIGMA_INI 
-
-C-----------------------------------------------------------------------
-C.  Initialize the cross section and interaction lengths in air
-C.  cross section model can be chosen, per particle, by setting ICSPA2()
-C.  default is Sibyll cross section (0,0,0)      
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-      COMMON /CSAIR/ ASQSMIN, ASQSMAX, DASQS,
-     &     SSIG0(61,3),SSIGA(61,3),ALINT(61,3),NSQS
-      
-      COMMON /CSPA/ ICSPA2(3)
-
-      INTEGER NCALL, NDEBUG, LUN
-      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
-
-C--------------------------------------------------------------------
-C     SIBYLL utility common blocks containing constants       \FR'14
-C--------------------------------------------------------------------
-      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
-      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
-
-      DOUBLE PRECISION PI,TWOPI,CMBARN
-      COMMON /SIB_CST/ PI,TWOPI,CMBARN
-
-      DOUBLE PRECISION FACN
-      DIMENSION FACN(3:10)
-      COMMON /SIB_FAC/ FACN
-      SAVE
-      DATA ICSPA2 /0,0,0/
-      DATA AVOG /6.0221367D-04/
-      DATA ATARGET /14.514D0/            ! effective masss of air
-
-      IF(NDEBUG.gt.0)
-     &     write(lun,*) ' SIGMA_INI: using cross section model no.',
-     &     (ICSPA2(i),i=1,3)
-
-      CALL BLOCK_INI
-
-C...Loop on c.m. energy 
-      NSQS = 61
-      SQSMIN = 10.D0
-      SQSMAX = 1.d+07
-      ASQSMIN = LOG10(SQSMIN)
-      ASQSMAX = LOG10(SQSMAX)
-      DASQS = (ASQSMAX-ASQSMIN)/DBLE(NSQS-1)
-      DO J=1,NSQS
-         ASQS = ASQSMIN + DASQS*DBLE(J-1)
-         SQS = 10.D0**ASQS
-         E0 = SQS*SQS/(2.D0*0.938D0) * 1.D-03       ! TeV
-C...p-air
-         CALL SIGMA_PP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO)
-C     using parametrization by Goulianos for diff. cross section
-c     (depends on elastic cross section)
-c     used to determine coupling to intermediate resonances in Glauber calc (ALAM)
-c     assumed to be universal, i.e. same coupling used for proton, pion and kaons
-         CALL SIB_HADCS1(1,SQS,SIGT1,SIGEL1,SIGINEL1,SLOPE1,RHO1)
-         SIGEFF = 0.68D0*(1.D0+36.D0/SQS**2)
-     &        *LOG(0.6D0+0.02D0/1.5D0*SQS**2)
-         SIGEFF = MAX(0.D0,SIGEFF)
-         ALAM = sqrt(SIGEFF/SIGEL1)
-         SSIGSD = 2.D0 * SIGEFF        
-         CALL SIG_H_AIR (SIGT, SLOPE, RHO, ALAM,
-     &        SSIGT, SSIGEL, SSIGQE, SIGSD, SIGQSD )
-         SSIGA(J,1) = SSIGT-SSIGQE ! had-air production cross section
-         SSIG0(J,1) = SIGINEL   ! had-nucleon inel. cross section
-         ALINT(J,1) = 1.D0/(AVOG*SSIGA(J,1)/ATARGET) ! interaction length in air
-C...pi-air
-         CALL SIGMA_PIP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
-         CALL  SIG_H_AIR (SIGT, SLOPE, RHO, ALAM,
-     &        SSIGT, SSIGEL, SSIGQE, SIGSD, SIGQSD )
-         SSIGA(J,2) = SSIGT-SSIGQE
-         SSIG0(J,2) = SIGINEL
-         ALINT(J,2) = 1.D0/(AVOG*SSIGA(J,2)/ATARGET)
-C...K-air
-         CALL SIGMA_KP (E0, SIGT, SIGEL, SIGINEL, SLOPE, RHO) 
-         CALL  SIG_H_AIR (SIGT, SLOPE, RHO, ALAM,
-     &        SSIGT, SSIGEL, SSIGQE, SIGSD, SIGQSD )
-         SSIGA(J,3) = SSIGT-SSIGQE
-         SSIG0(J,3) = SIGINEL
-         ALINT(J,3) = 1.D0/(AVOG*SSIGA(J,3)/ATARGET)
-      ENDDO
-
-      if (ndebug .gt. 0 ) THEN
-        WRITE(LUN,'(1X,A)') 
-     &  ' SIGMA_INI: NUCLIB interaction lengths [g/cm**2]'
-        WRITE(LUN,'(1X,A)') 
-     &  '     sqs,       p-air,      pi-air,     K-air'
-      DO J=1,NSQS
-         SQS = 10.D0**(ASQSMIN + DASQS*DBLE(J-1))
-         WRITE(LUN,'(1X,1P,4E12.3)') 
-     &        SQS,ALINT(J,1),ALINT(J,2),ALINT(J,3)
-        ENDDO
-      endif
-
-      RETURN
-      END
-
-C=======================================================================
-
-      FUNCTION FPNI (E,Linp)
-
-C-----------------------------------------------------------------------
-C...This function  returns the interaction length 
-C.  of an hadronic particle travelling in air
-C.
-C.  INPUT:   E (TeV)   particle energy
-C.           Linp      particle code
-C.  OUTPUT:  FPNI      (g cm-2)
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-            
-      COMMON /CSAIR/ ASQSMIN, ASQSMAX, DASQS,
-     &     SSIG0(61,3),SSIGA(61,3),ALINT(61,3),NSQS
-
-      DIMENSION KK(6:14)
-      SAVE
-      DATA KK /3*2, 4*3, 2*1/
-
-      SQS = SQRT(2000.D0*E*0.937D0)                        ! GeV
-      AL = LOG10 (SQS)
-      L = abs(Linp)
-      IF (AL .LE. ASQSMIN)  THEN
-         FPNI = ALINT(1,KK(L))
-      ELSE
-         T = (AL-ASQSMIN)/DASQS
-         J = INT(T)
-         J = MIN(J,NSQS-2)
-         T = T-DBLE(J)
-         FPNI = ((1.D0-T)*ALINT(J+1,KK(L)) + T*ALINT(J+2,KK(L)))
-      ENDIF
-      RETURN
-      END
-
-C=======================================================================
-      
-      FUNCTION FSIGHAIR (E,Linp)
-
-C-----------------------------------------------------------------------
-C...This function returns the production cross section
-C.  of an hadronic particle with air calculated in NUCLIB (SIGMA_INI)     
-C.
-C.  INPUT:   E (TeV)   particle energy
-C.           Linp      particle code
-C.  OUTPUT:  SIG_PROD  (mb)
-C-----------------------------------------------------------------------
-      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
-      IMPLICIT INTEGER(I-N)
-            
-      COMMON /CSAIR/ ASQSMIN, ASQSMAX, DASQS,
-     &     SSIG0(61,3),SSIGA(61,3),ALINT(61,3),NSQS
-
-      DIMENSION KK(6:14)
-      SAVE
-      DATA KK /3*2, 4*3, 2*1/
-
-      SQS = SQRT(2000.D0*E*0.937D0)                        ! GeV
-      AL = LOG10 (SQS)
-      L = abs(Linp)
-      IF (AL .LE. ASQSMIN)  THEN
-         FSIGHAIR = SSIGA(1,KK(L))
-      ELSE
-         T = (AL-ASQSMIN)/DASQS
-         J = INT(T)
-         J = MIN(J,NSQS-2)
-         T = T-DBLE(J)
-         FSIGHAIR = ((1.D0-T)*SSIGA(J+1,KK(L)) + T*SSIGA(J+2,KK(L)))
-      ENDIF     
-      RETURN
-      END
-
-C=======================================================================
-
-      SUBROUTINE INT_LEN_INI
-
-C-----------------------------------------------------------------------
-C...Initialize the interaction lengths from NUCLIB
-C-----------------------------------------------------------------------
-      SAVE
-      
-      CALL NUC_GEOM_INI                 ! nucleus profiles
-      CALL SIGMA_INI                    ! initialize cross sections
-
-      RETURN
-      END
-C=======================================================================
-
       SUBROUTINE TRANSFONSHELL(ECM,XM1in,XM2in,XMAX,IMOD,P1,P2,LBAD)
 
 C-----------------------------------------------------------------------
diff --git a/Processes/Sibyll/sibyll2.3c.h b/Processes/Sibyll/sibyll2.3c.h
index 104b55eb0bf2e6fc12277f6d62bf1adcf567acb4..756a94bd2f05d6b14eaada201b4d75e4476c0f9b 100644
--- a/Processes/Sibyll/sibyll2.3c.h
+++ b/Processes/Sibyll/sibyll2.3c.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -94,7 +94,7 @@ void decsib_();
 // interaction length
 // double fpni_(double&, int&);
 
-void sib_sigma_hnuc_(const int&, const int&, const double&, double&, double&);
+void sib_sigma_hnuc_(const int&, const int&, const double&, double&, double&, double&);
 void sib_sigma_hp_(const int&, const double&, double&, double&, double&, double*, double&,
                    double&);
 
diff --git a/Processes/Sibyll/signuc.f b/Processes/Sibyll/signuc.f
new file mode 100644
index 0000000000000000000000000000000000000000..b21bce8cbb4893c90b1bfca4f5c1a0ca617fcb4f
--- /dev/null
+++ b/Processes/Sibyll/signuc.f
@@ -0,0 +1,276 @@
+*-- Author :    D. HECK IK FZK KARLSRUHE       06/12/1996
+C=======================================================================
+
+      SUBROUTINE SIGNUC( IA,E0,SSIGNUC )
+
+C-----------------------------------------------------------------------
+C  SIG(MA) NUC(LEUS) INI(TIALIZATION) 2
+C
+C  IN ANALOGY WITH SUBROUT. SIGNUC_INI OF SIBYLL PACKAGE
+C  THIS SUBROUT. RECEIVES IN INPUT E0 (GEV) ENERGY PER NUCLEON AND
+C  INTERPOLATES THE CROSS-SECTIONS FOR NUCLEI WITH A < 56.
+C  UPDATED FOR SIBYLL-2.3  Sept. 2015 by D. Heck
+C  THIS SUBROUTINE IS CALLED FROM SIBSIG.
+C  ARGUMENTS:
+C   IA     = MASS NUMBER OF PROJECTILE NUCLEUS
+C   E0     = LAB.ENERGY/NUCLEON OF PROJECTILE (GEV)
+C   SSIGNUC= CROSS-SECTION OF NUCLEUS IA WITH AIR
+C
+C.  ATTENTION: THE TABULATED CROSS-SECTIONS ARE OBTAINED WITH
+C.  NEW P-P CROSS-SECTIONS AS USED IN SIBYLL 2.1,
+C.  IN ADDITION FIELD DIMENSIONS CHANGED (RE 04/2000)
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+      DIMENSION        SIGMA(6,56), SIGQE(6,56)
+      DOUBLE PRECISION SIGMA,SIGQE
+      DIMENSION        AA(6)
+      DOUBLE PRECISION AA,DA,AMIN,ABEAM,S1,S2,ASQS
+      DOUBLE PRECISION E0,SSIGNUC
+      INTEGER          IA,J,JE,NE 
+      DOUBLE PRECISION QUAD_INT
+      EXTERNAL         QUAD_INT
+      SAVE
+      DATA             NE /6/, AMIN /1.D0/, DA /1.D0/
+      DATA             AA /1.D0,2.D0,3.D0,4.D0,5.D0,6.D0/
+*     DATA             AVOG /6.0221367D-04/
+*     DATA             ATARGET /14.514D0/   ! EFFECTIVE MASSS OF AIR
+C  DATA ON 'INELASTIC-PRODUCTION' NUCLEUS-AIR CROSS-SECTION
+      DATA (SIGMA(J, 2),J=1,6) /
+     &3.842D+02,4.287D+02,4.940D+02,5.887D+02,6.922D+02,7.767D+02/
+      DATA (SIGMA(J, 3),J=1,6) /
+     &4.601D+02,5.149D+02,5.595D+02,6.663D+02,7.641D+02,8.446D+02/
+      DATA (SIGMA(J, 4),J=1,6) /
+     &4.881D+02,5.373D+02,6.005D+02,6.895D+02,7.716D+02,8.967D+02/
+      DATA (SIGMA(J, 5),J=1,6) /
+     &5.874D+02,6.176D+02,7.181D+02,7.993D+02,9.089D+02,1.031D+03/
+      DATA (SIGMA(J, 6),J=1,6) /
+     &7.054D+02,7.399D+02,8.388D+02,9.463D+02,1.080D+03,1.197D+03/
+      DATA (SIGMA(J, 7),J=1,6) /
+     &7.192D+02,7.611D+02,8.449D+02,9.539D+02,1.061D+03,1.176D+03/
+      DATA (SIGMA(J, 8),J=1,6) /
+     &7.550D+02,7.975D+02,9.153D+02,9.944D+02,1.126D+03,1.236D+03/
+      DATA (SIGMA(J, 9),J=1,6) /
+     &7.929D+02,8.392D+02,9.265D+02,1.059D+03,1.167D+03,1.262D+03/
+      DATA (SIGMA(J, 10),J=1,6) /
+     &8.157D+02,8.644D+02,9.512D+02,1.058D+03,1.182D+03,1.298D+03/
+      DATA (SIGMA(J, 11),J=1,6) /
+     &8.039D+02,8.587D+02,9.534D+02,1.055D+03,1.182D+03,1.298D+03/
+      DATA (SIGMA(J, 12),J=1,6) /
+     &8.515D+02,8.957D+02,9.869D+02,1.122D+03,1.253D+03,1.366D+03/
+      DATA (SIGMA(J, 13),J=1,6) /
+     &8.769D+02,9.100D+02,1.018D+03,1.119D+03,1.252D+03,1.341D+03/
+      DATA (SIGMA(J, 14),J=1,6) /
+     &9.058D+02,9.532D+02,1.057D+03,1.171D+03,1.302D+03,1.391D+03/
+      DATA (SIGMA(J, 15),J=1,6) /
+     &9.555D+02,9.799D+02,1.098D+03,1.201D+03,1.342D+03,1.444D+03/
+      DATA (SIGMA(J, 16),J=1,6) /
+     &1.009D+03,1.058D+03,1.149D+03,1.290D+03,1.414D+03,1.520D+03/
+      DATA (SIGMA(J, 17),J=1,6) /
+     &9.907D+02,1.045D+03,1.166D+03,1.290D+03,1.384D+03,1.516D+03/
+      DATA (SIGMA(J, 18),J=1,6) /
+     &1.036D+03,1.121D+03,1.198D+03,1.328D+03,1.470D+03,1.592D+03/
+      DATA (SIGMA(J, 19),J=1,6) /
+     &1.083D+03,1.162D+03,1.250D+03,1.371D+03,1.516D+03,1.661D+03/
+      DATA (SIGMA(J, 20),J=1,6) /
+     &1.146D+03,1.215D+03,1.295D+03,1.443D+03,1.544D+03,1.744D+03/
+      DATA (SIGMA(J, 21),J=1,6) /
+     &1.158D+03,1.234D+03,1.292D+03,1.467D+03,1.618D+03,1.750D+03/
+      DATA (SIGMA(J, 22),J=1,6) /
+     &1.153D+03,1.205D+03,1.329D+03,1.451D+03,1.596D+03,1.734D+03/
+      DATA (SIGMA(J, 23),J=1,6) /
+     &1.210D+03,1.274D+03,1.356D+03,1.493D+03,1.655D+03,1.803D+03/
+      DATA (SIGMA(J, 24),J=1,6) /
+     &1.212D+03,1.273D+03,1.398D+03,1.489D+03,1.641D+03,1.800D+03/
+      DATA (SIGMA(J, 25),J=1,6) /
+     &1.236D+03,1.315D+03,1.423D+03,1.561D+03,1.669D+03,1.855D+03/
+      DATA (SIGMA(J, 26),J=1,6) /
+     &1.279D+03,1.345D+03,1.431D+03,1.595D+03,1.734D+03,1.889D+03/
+      DATA (SIGMA(J, 27),J=1,6) /
+     &1.228D+03,1.304D+03,1.438D+03,1.546D+03,1.714D+03,1.836D+03/
+      DATA (SIGMA(J, 28),J=1,6) /
+     &1.289D+03,1.370D+03,1.451D+03,1.597D+03,1.754D+03,1.913D+03/
+      DATA (SIGMA(J, 29),J=1,6) /
+     &1.411D+03,1.469D+03,1.613D+03,1.777D+03,1.910D+03,2.075D+03/
+      DATA (SIGMA(J, 30),J=1,6) /
+     &1.347D+03,1.401D+03,1.498D+03,1.642D+03,1.816D+03,1.975D+03/
+      DATA (SIGMA(J, 31),J=1,6) /
+     &1.359D+03,1.448D+03,1.551D+03,1.694D+03,1.858D+03,2.007D+03/
+      DATA (SIGMA(J, 32),J=1,6) /
+     &1.358D+03,1.460D+03,1.559D+03,1.698D+03,1.842D+03,1.974D+03/
+      DATA (SIGMA(J, 33),J=1,6) /
+     &1.418D+03,1.448D+03,1.578D+03,1.727D+03,1.872D+03,2.047D+03/
+      DATA (SIGMA(J, 34),J=1,6) /
+     &1.433D+03,1.466D+03,1.605D+03,1.738D+03,1.892D+03,2.019E+03/
+      DATA (SIGMA(J, 35),J=1,6) /
+     &1.430D+03,1.511D+03,1.602D+03,1.752D+03,1.935D+03,2.060D+03/
+      DATA (SIGMA(J, 36),J=1,6) /
+     &1.462D+03,1.499D+03,1.653D+03,1.805D+03,1.920D+03,2.057D+03/
+      DATA (SIGMA(J, 37),J=1,6) /
+     &1.470D+03,1.520D+03,1.656D+03,1.818D+03,1.946D+03,2.131D+03/
+      DATA (SIGMA(J, 38),J=1,6) /
+     &1.470D+03,1.542D+03,1.691D+03,1.800D+03,1.968D+03,2.133D+03/
+      DATA (SIGMA(J, 39),J=1,6) /
+     &1.495D+03,1.588D+03,1.676D+03,1.834D+03,1.969D+03,2.163D+03/
+      DATA (SIGMA(J, 40),J=1,6) /
+     &1.525D+03,1.551D+03,1.722D+03,1.833D+03,2.020D+03,2.192D+03/
+      DATA (SIGMA(J, 41),J=1,6) /
+     &1.526D+03,1.615D+03,1.709D+03,1.899D+03,2.040D+03,2.181D+03/
+      DATA (SIGMA(J, 42),J=1,6) /
+     &1.510D+03,1.567D+03,1.716D+03,1.892D+03,2.056D+03,2.197D+03/
+      DATA (SIGMA(J, 43),J=1,6) /
+     &1.557D+03,1.658D+03,1.776D+03,1.898D+03,2.092D+03,2.200D+03/
+      DATA (SIGMA(J, 44),J=1,6) /
+     &1.556D+03,1.645D+03,1.752D+03,1.920D+03,2.091D+03,2.243D+03/
+      DATA (SIGMA(J, 45),J=1,6) /
+     &1.583D+03,1.663D+03,1.798D+03,1.940D+03,2.051D+03,2.263D+03/
+      DATA (SIGMA(J, 46),J=1,6) /
+     &1.599D+03,1.642D+03,1.799D+03,1.941D+03,2.107D+03,2.268D+03/
+      DATA (SIGMA(J, 47),J=1,6) /
+     &1.611D+03,1.692D+03,1.811D+03,1.956D+03,2.107D+03,2.264D+03/
+      DATA (SIGMA(J, 48),J=1,6) /
+     &1.625D+03,1.706D+03,1.819D+03,1.986D+03,2.139D+03,2.354D+03/
+      DATA (SIGMA(J, 49),J=1,6) /
+     &1.666D+03,1.737D+03,1.854D+03,1.971D+03,2.160D+03,2.318D+03/
+      DATA (SIGMA(J, 50),J=1,6) /
+     &1.648D+03,1.747D+03,1.856D+03,2.023D+03,2.181D+03,2.352D+03/
+      DATA (SIGMA(J, 51),J=1,6) /
+     &1.653D+03,1.763D+03,1.868D+03,2.015D+03,2.203D+03,2.386D+03/
+      DATA (SIGMA(J, 52),J=1,6) /
+     &1.690D+03,1.720D+03,1.902D+03,2.027D+03,2.189D+03,2.357D+03/
+      DATA (SIGMA(J, 53),J=1,6) /
+     &1.690D+03,1.750D+03,1.921D+03,2.059D+03,2.208D+03,2.417D+03/
+      DATA (SIGMA(J, 54),J=1,6) /
+     &1.705D+03,1.781D+03,1.911D+03,2.073D+03,2.242D+03,2.411D+03/
+      DATA (SIGMA(J, 55),J=1,6) /
+     &1.714D+03,1.806D+03,1.896D+03,2.100D+03,2.253D+03,2.411D+03/
+      DATA (SIGMA(J, 56),J=1,6) /
+     &1.774D+03,1.813D+03,1.954D+03,2.098D+03,2.280D+03,2.482D+03/
+
+C  DATA ON 'QUASI-ELASTIC' NUCLEUS-AIR CROSS-SECTION
+      DATA (SIGQE(J, 2),J=1,6) /
+     &4.141D+01,3.708D+01,5.428D+01,8.696D+01,1.403D+02,1.885D+02/
+      DATA (SIGQE(J, 3),J=1,6) /
+     &4.357D+01,3.894D+01,5.177D+01,9.675D+01,1.447D+02,2.029D+02/
+      DATA (SIGQE(J, 4),J=1,6) /
+     &4.123D+01,3.933D+01,6.070D+01,9.482D+01,1.474D+02,2.023D+02/
+      DATA (SIGQE(J, 5),J=1,6) /
+     &4.681D+01,4.287D+01,6.381D+01,1.050D+02,1.519D+02,2.198D+02/
+      DATA (SIGQE(J, 6),J=1,6) /
+     &5.407D+01,5.195D+01,6.723D+01,1.108D+02,1.750D+02,2.368D+02/
+      DATA (SIGQE(J, 7),J=1,6) /
+     &4.975D+01,4.936D+01,6.880D+01,1.162D+02,1.689D+02,2.329D+02/
+      DATA (SIGQE(J, 8),J=1,6) /
+     &5.361D+01,5.027D+01,6.858D+01,1.177D+02,1.759D+02,2.412D+02/
+      DATA (SIGQE(J, 9),J=1,6) /
+     &4.980D+01,5.063D+01,7.210D+01,1.196D+02,1.806D+02,2.299D+02/
+      DATA (SIGQE(J, 10),J=1,6) /
+     &5.170D+01,5.070D+01,7.105D+01,1.182D+02,1.679D+02,2.411D+02/
+      DATA (SIGQE(J, 11),J=1,6) /
+     &4.950D+01,4.950D+01,7.286D+01,1.137D+02,1.769D+02,2.477D+02/
+      DATA (SIGQE(J, 12),J=1,6) /
+     &5.262D+01,5.133D+01,7.110D+01,1.204D+02,1.789D+02,2.501D+02/
+      DATA (SIGQE(J, 13),J=1,6) /
+     &5.320D+01,5.378D+01,6.847D+01,1.200D+02,1.805D+02,2.442D+02/
+      DATA (SIGQE(J, 14),J=1,6) /
+     &5.638D+01,5.271D+01,6.985D+01,1.209D+02,1.867D+02,2.610D+02/
+      DATA (SIGQE(J, 15),J=1,6) /
+     &5.294D+01,5.353D+01,7.435D+01,1.211D+02,1.899D+02,2.612D+02/
+      DATA (SIGQE(J, 16),J=1,6) /
+     &5.668D+01,5.254D+01,7.557D+01,1.269D+02,1.917D+02,2.707D+02/
+      DATA (SIGQE(J, 17),J=1,6) /
+     &5.456D+01,5.721D+01,7.481D+01,1.208D+02,1.859D+02,2.658D+02/
+      DATA (SIGQE(J, 18),J=1,6) /
+     &5.901D+01,5.382D+01,7.591D+01,1.246D+02,1.872D+02,2.874D+02/
+      DATA (SIGQE(J, 19),J=1,6) /
+     &6.328D+01,6.116D+01,8.451D+01,1.318D+02,2.088D+02,2.749D+02/
+      DATA (SIGQE(J, 20),J=1,6) /
+     &5.779D+01,5.924D+01,8.382D+01,1.370D+02,2.062D+02,2.837D+02/
+      DATA (SIGQE(J, 21),J=1,6) /
+     &7.155D+01,5.732D+01,8.231D+01,1.363D+02,2.047D+02,2.820D+02/
+      DATA (SIGQE(J, 22),J=1,6) /
+     &6.699D+01,5.651D+01,8.511D+01,1.477D+02,2.031D+02,2.921D+02/
+      DATA (SIGQE(J, 23),J=1,6) /
+     &6.179D+01,6.269D+01,9.395D+01,1.437D+02,2.195D+02,2.964D+02/
+      DATA (SIGQE(J, 24),J=1,6) /
+     &6.784D+01,6.028D+01,8.622D+01,1.279D+02,2.214D+02,2.867D+02/
+      DATA (SIGQE(J, 25),J=1,6) /
+     &6.589D+01,5.795D+01,8.890D+01,1.385D+02,2.055D+02,2.988D+02/
+      DATA (SIGQE(J, 26),J=1,6) /
+     &6.364D+01,6.325D+01,8.942D+01,1.421D+02,2.128D+02,3.083D+02/
+      DATA (SIGQE(J, 27),J=1,6) /
+     &6.449D+01,6.664D+01,8.986D+01,1.453D+02,2.140D+02,2.932D+02/
+      DATA (SIGQE(J, 28),J=1,6) /
+     &7.284D+01,6.139D+01,8.867D+01,1.425D+02,2.179D+02,2.978D+02/
+      DATA (SIGQE(J, 29),J=1,6) /
+     &7.221D+01,7.085D+01,9.079D+01,1.482D+02,2.277D+02,2.913D+02/
+      DATA (SIGQE(J, 30),J=1,6) /
+     &6.928D+01,6.294D+01,8.935D+01,1.463D+02,2.265D+02,2.834D+02/
+      DATA (SIGQE(J, 31),J=1,6) /
+     &6.611D+01,6.586D+01,9.133D+01,1.461D+02,2.201D+02,2.959D+02/
+      DATA (SIGQE(J, 32),J=1,6) /
+     &6.401D+01,6.177D+01,8.971D+01,1.480D+02,2.155D+02,3.152D+02/
+      DATA (SIGQE(J, 33),J=1,6) /
+     &7.057D+01,6.918D+01,8.410D+01,1.465D+02,2.288D+02,3.088D+02/
+      DATA (SIGQE(J, 34),J=1,6) /
+     &6.453D+01,7.020D+01,9.272D+01,1.517D+02,2.189D+02,2.999D+02/
+      DATA (SIGQE(J, 35),J=1,6) /
+     &6.741D+01,6.295D+01,9.323D+01,1.536D+02,2.190D+02,2.930D+02/
+      DATA (SIGQE(J, 36),J=1,6) /
+     &6.807D+01,7.046D+01,1.025D+02,1.565D+02,2.315D+02,3.090D+02/
+      DATA (SIGQE(J, 37),J=1,6) /
+     &8.082D+01,6.565D+01,9.160D+01,1.572D+02,2.229D+02,3.125D+02/
+      DATA (SIGQE(J, 38),J=1,6) /
+     &6.494D+01,6.964D+01,9.089D+01,1.653D+02,2.336D+02,3.120D+02/
+      DATA (SIGQE(J, 39),J=1,6) /
+     &6.833D+01,6.860D+01,8.933D+01,1.601D+02,2.261D+02,3.167D+02/
+      DATA (SIGQE(J, 40),J=1,6) /
+     &7.021D+01,6.866D+01,8.437D+01,1.588D+02,2.249D+02,2.941D+02/
+      DATA (SIGQE(J, 41),J=1,6) /
+     &7.122D+01,6.205D+01,9.545D+01,1.582D+02,2.335D+02,3.395D+02/
+      DATA (SIGQE(J, 42),J=1,6) /
+     &7.265D+01,6.936D+01,9.486D+01,1.505D+02,2.379D+02,3.248D+02/
+      DATA (SIGQE(J, 43),J=1,6) /
+     &7.048D+01,7.539D+01,9.192D+01,1.566D+02,2.532D+02,3.182D+02/
+      DATA (SIGQE(J, 44),J=1,6) /
+     &6.650D+01,7.139D+01,9.862D+01,1.602D+02,2.289D+02,3.077D+02/
+      DATA (SIGQE(J, 45),J=1,6) /
+     &7.511D+01,6.893D+01,9.245D+01,1.641D+02,2.519D+02,3.381D+02/
+      DATA (SIGQE(J, 46),J=1,6) /
+     &6.437D+01,6.894D+01,8.697D+01,1.544D+02,2.391D+02,3.213D+02/
+      DATA (SIGQE(J, 47),J=1,6) /
+     &7.980D+01,6.958D+01,1.022D+02,1.609D+02,2.408D+02,3.246D+02/
+      DATA (SIGQE(J, 48),J=1,6) /
+     &7.265D+01,7.313D+01,8.989D+01,1.578D+02,2.387D+02,3.235D+02/
+      DATA (SIGQE(J, 49),J=1,6) /
+     &6.959D+01,6.337D+01,9.084D+01,1.656D+02,2.331D+02,3.226D+02/
+      DATA (SIGQE(J, 50),J=1,6) /
+     &7.371D+01,6.807D+01,9.726D+01,1.535D+02,2.445D+02,3.189D+02/
+      DATA (SIGQE(J, 51),J=1,6) /
+     &7.882D+01,6.680D+01,9.377D+01,1.629D+02,2.448D+02,3.297D+02/
+      DATA (SIGQE(J, 52),J=1,6) /
+     &7.223D+01,6.794D+01,9.925D+01,1.738D+02,2.446D+02,3.162D+02/
+      DATA (SIGQE(J, 53),J=1,6) /
+     &7.703D+01,6.971D+01,9.601D+01,1.595D+02,2.484D+02,3.265D+02/
+      DATA (SIGQE(J, 54),J=1,6) /
+     &7.549D+01,7.459D+01,8.984D+01,1.645D+02,2.348D+02,3.201D+02/
+      DATA (SIGQE(J, 55),J=1,6) /
+     &7.891D+01,6.840D+01,1.017D+02,1.698D+02,2.501D+02,3.429D+02/
+      DATA (SIGQE(J, 56),J=1,6) /
+     &7.545D+01,6.673D+01,1.057D+02,1.684D+02,2.424D+02,3.181D+02/
+C-----------------------------------------------------------------------
+
+C ENERGY E0 IN GEV
+      ASQS  = 0.5D0*LOG10(1.876D0*E0)
+      JE    = MIN( INT( (ASQS-AMIN)/DA )+1, NE-2 )
+      ABEAM = DBLE(IA)
+C  INELASTIC CROSS-SECTION
+      S1 = QUAD_INT( ASQS, AA(JE),AA(JE+1),AA(JE+2),
+     +                   SIGMA(JE,IA),SIGMA(JE+1,IA),SIGMA(JE+2,IA) )
+C  QUASI ELASTIC CROSS-SECTION
+      S2 = QUAD_INT( ASQS, AA(JE),AA(JE+1),AA(JE+2),
+     +                   SIGQE(JE,IA),SIGQE(JE+1,IA),SIGQE(JE+2,IA) )
+C  ADD INELASTIC AND QUASI-ELASTIC CROSS-SECTIONS
+      SSIGNUC = S1 + S2
+
+      RETURN
+      END
diff --git a/Processes/Sibyll/testSibyll.cc b/Processes/Sibyll/testSibyll.cc
index 9b078fd087c16d6238837ce26783468640777054..8f53c6e12d687dcbfede62a31c3cc43917704ae4 100644
--- a/Processes/Sibyll/testSibyll.cc
+++ b/Processes/Sibyll/testSibyll.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -11,6 +11,7 @@
 
 #include <corsika/process/sibyll/Decay.h>
 #include <corsika/process/sibyll/Interaction.h>
+#include <corsika/process/sibyll/NuclearInteraction.h>
 #include <corsika/process/sibyll/ParticleConversion.h>
 
 #include <corsika/random/RNGManager.h>
@@ -116,7 +117,12 @@ TEST_CASE("SibyllInterface", "[processes]") {
   SECTION("InteractionInterface") {
 
     setup::Stack stack;
-    auto particle = stack.NewParticle();
+    const HEPEnergyType E0 = 100_GeV;
+    HEPMomentumType P0 =
+        sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
+    auto plab = stack::super_stupid::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(particles::Code::Proton, E0, plab, pos, 0_ns);
 
     Interaction model(env);
 
@@ -127,22 +133,36 @@ TEST_CASE("SibyllInterface", "[processes]") {
         model.GetInteractionLength(particle, track);
   }
 
+  SECTION("NuclearInteractionInterface") {
+
+    setup::Stack stack;
+    const HEPEnergyType E0 = 400_GeV;
+    HEPMomentumType P0 =
+        sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
+    auto plab = stack::super_stupid::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+
+    auto particle = stack.AddParticle(particles::Code::Nucleus, E0, plab, pos, 0_ns, 4, 2);
+
+    Interaction hmodel(env);
+    NuclearInteraction model(env, hmodel);
+
+    model.Init();
+    [[maybe_unused]] const process::EProcessReturn ret =
+        model.DoInteraction(particle, stack);
+    [[maybe_unused]] const GrammageType length =
+        model.GetInteractionLength(particle, track);
+  }
+
   SECTION("DecayInterface") {
 
     setup::Stack stack;
-    auto particle = stack.NewParticle();
-    {
-      const HEPEnergyType E0 = 10_GeV;
-      particle.SetPID(particles::Code::Proton);
-      HEPMomentumType P0 =
-          sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
-      auto plab = stack::super_stupid::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
-      particle.SetEnergy(E0);
-      particle.SetMomentum(plab);
-      particle.SetTime(0_ns);
-      geometry::Point p(cs, 0_m, 0_m, 0_m);
-      particle.SetPosition(p);
-    }
+    const HEPEnergyType E0 = 10_GeV;
+    HEPMomentumType P0 =
+        sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
+    auto plab = stack::super_stupid::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(particles::Code::Proton, E0, plab, pos, 0_ns);
 
     Decay model;
 
diff --git a/Processes/StackInspector/StackInspector.cc b/Processes/StackInspector/StackInspector.cc
index 184eae5b543b9779696ccbd5b45036ed95edcfe4..fb749c0b8c7e6430c7283f079055979d099ee454 100644
--- a/Processes/StackInspector/StackInspector.cc
+++ b/Processes/StackInspector/StackInspector.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -51,7 +51,10 @@ process::EProcessReturn StackInspector<Stack>::DoContinuous(Particle&, setup::Tr
     auto pos = iterP.GetPosition().GetCoordinates(rootCS);
     cout << "StackInspector: i=" << setw(5) << fixed << (i++) << ", id=" << setw(30)
          << iterP.GetPID() << " E=" << setw(15) << scientific << (E / 1_GeV) << " GeV, "
-         << " pos=" << pos << endl;
+         << " pos=" << pos;
+    // if (iterP.GetPID()==Code::Nucleus)
+    // cout << " nuc_ref=" << iterP.GetNucleusRef();
+    cout << endl;
   }
   fCountStep++;
   cout << "StackInspector: nStep=" << fCountStep << " stackSize=" << s.GetSize()
diff --git a/Processes/StackInspector/StackInspector.h b/Processes/StackInspector/StackInspector.h
index 6a14b4e6eb9578e8c283637c3afbaee71f97256b..8bb2ca45c498f7535aa6cae2761142ff8dabce74 100644
--- a/Processes/StackInspector/StackInspector.h
+++ b/Processes/StackInspector/StackInspector.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/StackInspector/testStackInspector.cc b/Processes/StackInspector/testStackInspector.cc
index 5ff999c1d13721365f560cf5c9ba741907356651..784be88f99131372f528b264660e7db6f93d3625 100644
--- a/Processes/StackInspector/testStackInspector.cc
+++ b/Processes/StackInspector/testStackInspector.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -30,16 +30,19 @@ using namespace corsika;
 
 TEST_CASE("StackInspector", "[processes]") {
 
-  auto const& cs =
+  auto const& rootCS =
       geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
-  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  geometry::Point const origin(rootCS, {0_m, 0_m, 0_m});
   geometry::Vector<corsika::units::si::SpeedType::dimension_type> v(
-      cs, 0_m / second, 0_m / second, 1_m / second);
+      rootCS, 0_m / second, 0_m / second, 1_m / second);
   geometry::Line line(origin, v);
   geometry::Trajectory<geometry::Line> track(line, 10_s);
 
   setup::Stack stack;
-  auto particle = stack.NewParticle();
+  auto particle = stack.AddParticle(
+      particles::Code::Electron, 10_GeV,
+      corsika::stack::super_stupid::MomentumVector(rootCS, {0_GeV, 0_GeV, -1_GeV}),
+      geometry::Point(rootCS, {0_m, 0_m, 10_km}), 0_ns);
 
   SECTION("interface") {
 
diff --git a/Processes/TrackWriter/TrackWriter.cc b/Processes/TrackWriter/TrackWriter.cc
index ffc67cde8a478486cca12670a7e0bb7838d130fa..65dec50ca0aab6d87d9471c99a1f32f788c5ddc6 100644
--- a/Processes/TrackWriter/TrackWriter.cc
+++ b/Processes/TrackWriter/TrackWriter.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/TrackWriter/TrackWriter.h b/Processes/TrackWriter/TrackWriter.h
index 10f2d574f355f72f46e9d681adcd853dac436c4c..c61d2a6c883882a7422539dd854e32af964852f5 100644
--- a/Processes/TrackWriter/TrackWriter.h
+++ b/Processes/TrackWriter/TrackWriter.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Processes/TrackingLine/TrackingLine.h b/Processes/TrackingLine/TrackingLine.h
index 31966195751d0a1dfaee6d61a60421a0f80d4676..02126ee12e41a98964fc997ec3f07a8a89332bcf 100644
--- a/Processes/TrackingLine/TrackingLine.h
+++ b/Processes/TrackingLine/TrackingLine.h
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -28,8 +29,6 @@
 #include <stdexcept>
 #include <utility>
 
-using namespace corsika;
-
 namespace corsika::process {
 
   namespace tracking_line {
diff --git a/Processes/TrackingLine/testTrackingLine.cc b/Processes/TrackingLine/testTrackingLine.cc
index 845d3268b619b919e2197298c13ea625bf8113d8..7dde7aec23efa39835a673305729f9b2f0782dbc 100644
--- a/Processes/TrackingLine/testTrackingLine.cc
+++ b/Processes/TrackingLine/testTrackingLine.cc
@@ -1,4 +1,5 @@
-/**
+
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/README.md b/README.md
index 7136e641e258c07c473fb1b3cb4b1969dc080535..67dd505f0d4dafc3f5ee73e055df7e4754429c99 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# CORSIKA 8 Framework for Particle Cascades in Astroparticle Physics**
+# CORSIKA 8 Framework for Particle Cascades in Astroparticle Physics 
 
 The purpose of CORSIKA is to simulate any particle cascades in
 astroparticle physics or astrophysical context. A lot of emphasis is
@@ -104,3 +104,4 @@ browse with firefox:
 ```
 firefox ../corsika-install/share/doc/html/index.html
 ```
+
diff --git a/Setup/CMakeLists.txt b/Setup/CMakeLists.txt
index 2f9a4ddf36a57d5f73d523fa5771ee17193a83bd..5b73fa434c99f42a5372c2f7488463a6d9c956de 100644
--- a/Setup/CMakeLists.txt
+++ b/Setup/CMakeLists.txt
@@ -20,6 +20,7 @@ target_link_libraries (
   INTERFACE
   CORSIKAgeometry
   SuperStupidStack
+  NuclearStackExtension
   )
 
 target_include_directories (
diff --git a/Setup/SetupEnvironment.h b/Setup/SetupEnvironment.h
index c5de9d53c9e26d6f5afe88d9762ec88df3043a64..08780b73b38311412a11500adb9d37a67a6d4228 100644
--- a/Setup/SetupEnvironment.h
+++ b/Setup/SetupEnvironment.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Setup/SetupLogger.h b/Setup/SetupLogger.h
index 2760bc7623fd244f38647d03e956e06ba39e84cd..76148050fc5a7f5f5fa8a03a0d96d1b12e465777 100644
--- a/Setup/SetupLogger.h
+++ b/Setup/SetupLogger.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Setup/SetupStack.h b/Setup/SetupStack.h
index 053d485f9e2352112f8c3db9dddfeba6bee775bf..fdfde3d8bbc572b05703a10b1e983873bc30fd04 100644
--- a/Setup/SetupStack.h
+++ b/Setup/SetupStack.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -12,11 +12,22 @@
 #ifndef _corsika_setup_setupstack_h_
 #define _corsika_setup_setupstack_h_
 
+#include <corsika/stack/nuclear_extension/NuclearStackExtension.h>
 #include <corsika/stack/super_stupid/SuperStupidStack.h>
 
+// this is an auxiliary help typedef, which I don't know how to put
+// into NuclearStackExtension.h where it belongs...
+template <typename StackIter>
+using ExtendedParticleInterfaceType =
+    corsika::stack::nuclear_extension::NuclearParticleInterface<
+        corsika::stack::super_stupid::SuperStupidStack::PIType, StackIter>;
+
 namespace corsika::setup {
 
-  typedef corsika::stack::super_stupid::SuperStupidStack Stack;
-}
+  using Stack = corsika::stack::nuclear_extension::NuclearStackExtension<
+      corsika::stack::super_stupid::SuperStupidStack, ExtendedParticleInterfaceType>;
+
+  // typedef corsika::stack::super_stupid::SuperStupidStack Stack;
+} // namespace corsika::setup
 
 #endif
diff --git a/Setup/SetupTrajectory.h b/Setup/SetupTrajectory.h
index de543484b5b7c496ffa0d11cec7c179fb9785281..0e93b3e4466eb98caa7ee3ccefd1edcf3946d104 100644
--- a/Setup/SetupTrajectory.h
+++ b/Setup/SetupTrajectory.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Stack/CMakeLists.txt b/Stack/CMakeLists.txt
index 4cf17a6163a1503f61ad50d4bb1658c4d35727c4..a9645130bd9f81cd4415fbfeccc88e5a736b7160 100644
--- a/Stack/CMakeLists.txt
+++ b/Stack/CMakeLists.txt
@@ -1,3 +1,4 @@
 
 add_subdirectory (DummyStack)
 add_subdirectory (SuperStupidStack)
+add_subdirectory (NuclearStackExtension)
diff --git a/Stack/DummyStack/DummyStack.h b/Stack/DummyStack/DummyStack.h
index 63b84bf30e4c03a80de512a78c1cb0677d95f7b9..adcf494a57b1d46f13d09d9f39e153866b70ea04 100644
--- a/Stack/DummyStack/DummyStack.h
+++ b/Stack/DummyStack/DummyStack.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
diff --git a/Stack/DummyStack/SuperStupidStack.h b/Stack/DummyStack/SuperStupidStack.h
deleted file mode 100644
index 47647e2c397ba8c7aab7ecda35cb05a700516176..0000000000000000000000000000000000000000
--- a/Stack/DummyStack/SuperStupidStack.h
+++ /dev/null
@@ -1,108 +0,0 @@
-
-/**
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * See file AUTHORS for a list of contributors.
- *
- * This software is distributed under the terms of the GNU General Public
- * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
- * the license.
- */
-
-#ifndef _include_superstupidstack_h_
-#define _include_superstupidstack_h_
-
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/stack/Stack.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <string>
-#include <vector>
-
-namespace corsika::stack {
-
-  namespace super_stupid {
-
-    using corsika::particles::Code;
-    using corsika::units::si::EnergyType;
-    using corsika::units::si::operator""_GeV; // literals;
-
-    /**
-     * Example of a particle object on the stack.
-     */
-
-    template <typename _Stack>
-    class ParticleRead : public StackIteratorInfo<_Stack, ParticleRead<_Stack> > {
-
-      using StackIteratorInfo<_Stack, ParticleRead>::GetIndex;
-      using StackIteratorInfo<_Stack, ParticleRead>::GetStack;
-
-    public:
-      void SetId(const Code id) { GetStack().SetId(GetIndex(), id); }
-      void SetEnergy(const EnergyType& e) { GetStack().SetEnergy(GetIndex(), e); }
-
-      Code GetId() const { return GetStack().GetId(GetIndex()); }
-      const EnergyType& GetEnergy() const { return GetStack().GetEnergy(GetIndex()); }
-    };
-
-    /**
-     *
-     * Memory implementation of the most simple (stupid) particle stack object.
-     */
-
-    class SuperStupidStackImpl {
-
-    public:
-      void Init() {}
-
-      void Clear() {
-        fDataE.clear();
-        fDataId.clear();
-      }
-
-      int GetSize() const { return fDataId.size(); }
-      int GetCapacity() const { return fDataId.size(); }
-
-      void SetId(const int i, const Code id) { fDataId[i] = id; }
-      void SetEnergy(const int i, const EnergyType& e) { fDataE[i] = e; }
-
-      const Code GetId(const int i) const { return fDataId[i]; }
-      const EnergyType& GetEnergy(const int i) const { return fDataE[i]; }
-
-      /**
-       *   Function to copy particle at location i2 in stack to i1
-       */
-      void Copy(const int i1, const int i2) {
-        fDataE[i2] = fDataE[i1];
-        fDataId[i2] = fDataId[i1];
-      }
-
-    protected:
-      void IncrementSize() {
-        fDataE.push_back(0_GeV);
-        fDataId.push_back(Code::unknown);
-      }
-      void DecrementSize() {
-        if (fDataE.size() > 0) {
-          fDataE.pop_back();
-          fDataId.pop_back();
-        }
-      }
-
-    private:
-      /// the actual memory to store particle data
-
-      std::vector<Code> fDataId;
-      std::vector<EnergyType> fDataE;
-
-    }; // end class SuperStupidStackImpl
-
-    typedef StackIterator<SuperStupidStackImpl, ParticleRead<SuperStupidStackImpl> >
-        Particle;
-    typedef Stack<SuperStupidStackImpl, Particle> SuperStupidStack;
-
-  } // namespace super_stupid
-
-} // namespace corsika::stack
-
-#endif
diff --git a/Stack/NuclearStackExtension/CMakeLists.txt b/Stack/NuclearStackExtension/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f2f34cfcfa4cf6108651282b464c476de9c125a5
--- /dev/null
+++ b/Stack/NuclearStackExtension/CMakeLists.txt
@@ -0,0 +1,49 @@
+
+set (NuclearStackExtension_HEADERS NuclearStackExtension.h)
+set (NuclearStackExtension_NAMESPACE corsika/stack/nuclear_extension)
+
+add_library (NuclearStackExtension INTERFACE)
+
+CORSIKA_COPY_HEADERS_TO_NAMESPACE (NuclearStackExtension ${NuclearStackExtension_NAMESPACE} ${NuclearStackExtension_HEADERS})
+
+target_link_libraries (
+  NuclearStackExtension
+  INTERFACE
+  CORSIKAstackinterface
+  CORSIKAunits
+  CORSIKAparticles
+  CORSIKAgeometry
+  )
+
+target_include_directories (
+  NuclearStackExtension
+  INTERFACE
+  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+  $<INSTALL_INTERFACE:include>
+  )
+
+install (
+  FILES
+  ${NuclearStackExtension_HEADERS}
+  DESTINATION
+  include/${NuclearStackExtension_NAMESPACE}
+  )
+
+# ----------------
+# code unit testing
+add_executable (
+  testNuclearStackExtension
+  testNuclearStackExtension.cc
+  )
+
+target_link_libraries (
+  testNuclearStackExtension
+  SuperStupidStack
+  NuclearStackExtension
+  #  CORSIKAutls
+  ProcessStackInspector
+  CORSIKAgeometry
+  CORSIKAunits
+  CORSIKAthirdparty # for catch2
+  )
+CORSIKA_ADD_TEST(testNuclearStackExtension)
diff --git a/Stack/NuclearStackExtension/NuclearStackExtension.h b/Stack/NuclearStackExtension/NuclearStackExtension.h
new file mode 100644
index 0000000000000000000000000000000000000000..355e9821d806fb3138cb36913b988e07ede4b234
--- /dev/null
+++ b/Stack/NuclearStackExtension/NuclearStackExtension.h
@@ -0,0 +1,315 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#ifndef _include_stack_nuclearstackextension_h_
+#define _include_stack_nuclearstackextension_h_
+
+#include <corsika/particles/ParticleProperties.h>
+#include <corsika/stack/Stack.h>
+#include <corsika/units/PhysicalUnits.h>
+
+#include <corsika/geometry/Point.h>
+#include <corsika/geometry/Vector.h>
+
+#include <algorithm>
+#include <vector>
+
+namespace corsika::stack {
+
+  /**
+   * @namespace nuclear_extension
+   *
+   * Add A and Z data to existing stack of particle properties.
+   *
+   * Only for Code::Nucleus particles A and Z are stored, not for all
+   * normal elementary particles.
+   *
+   * Thus in your code, make sure to always check <code>
+   * particle.GetPID()==Code::Nucleus </code> before attempting to
+   * read any nuclear information.
+   *
+   *
+   */
+
+  namespace nuclear_extension {
+
+    typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+
+    /**
+     * @class NuclearParticleInterface
+     *
+     * Define ParticleInterface for NuclearStackExtension Stack derived from
+     * ParticleInterface of Inner stack class
+     */
+    template <template <typename> typename InnerParticleInterface,
+              typename StackIteratorInterface>
+    class NuclearParticleInterface
+        : public InnerParticleInterface<StackIteratorInterface> {
+
+      // public:
+      // using ExtendedParticleInterface =
+      // NuclearParticleInterface<InnerParticleInterface, StackIteratorInterface>;
+
+    protected:
+      using InnerParticleInterface<StackIteratorInterface>::GetStackData;
+      using InnerParticleInterface<StackIteratorInterface>::GetIndex;
+
+    public:
+      void SetParticleData(const corsika::particles::Code vDataPID,
+                           const corsika::units::si::HEPEnergyType vDataE,
+                           const MomentumVector& vMomentum,
+                           const corsika::geometry::Point& vPosition,
+                           const corsika::units::si::TimeType vTime,
+                           const unsigned short vA = 0, const unsigned short vZ = 0) {
+        if (vDataPID == corsika::particles::Code::Nucleus) {
+          if (vA == 0 || vZ == 0) {
+            std::ostringstream err;
+            err << "NuclearStackExtension: no A and Z specified for new Nucleus!";
+            throw std::runtime_error(err.str());
+          }
+          SetNucleusRef(
+              GetStackData().GetNucleusNextRef()); // store this nucleus data ref
+          SetNuclearA(vA);
+          SetNuclearZ(vZ);
+        } else {
+          SetNucleusRef(-1); // this is not a nucleus
+        }
+        InnerParticleInterface<StackIteratorInterface>::SetParticleData(
+            vDataPID, vDataE, vMomentum, vPosition, vTime);
+      }
+
+      void SetParticleData(InnerParticleInterface<StackIteratorInterface>&,
+                           const corsika::particles::Code vDataPID,
+                           const corsika::units::si::HEPEnergyType vDataE,
+                           const MomentumVector& vMomentum,
+                           const corsika::geometry::Point& vPosition,
+                           const corsika::units::si::TimeType vTime,
+                           const unsigned short vA = 0, const unsigned short vZ = 0) {
+        SetParticleData(vDataPID, vDataE, vMomentum, vPosition, vTime, vA, vZ);
+      }
+
+      /**
+       * @name individual setters
+       * @{
+       */
+      void SetNuclearA(const unsigned short vA) {
+        GetStackData().SetNuclearA(GetIndex(), vA);
+      }
+      void SetNuclearZ(const unsigned short vZ) {
+        GetStackData().SetNuclearZ(GetIndex(), vZ);
+      }
+      /// @}
+
+      /**
+       * @name individual getters
+       * @{
+       */
+      int GetNuclearA() const { return GetStackData().GetNuclearA(GetIndex()); }
+      int GetNuclearZ() const { return GetStackData().GetNuclearZ(GetIndex()); }
+      /// @}
+
+      // int GetNucleusRef() const { return GetStackData().GetNucleusRef(GetIndex()); }
+
+    protected:
+      void SetNucleusRef(const int vR) { GetStackData().SetNucleusRef(GetIndex(), vR); }
+    };
+
+    /**
+     * @class NuclearStackExtension
+     *
+     * Memory implementation of adding nuclear inforamtion to the
+     * existing particle stack defined in class InnerStackImpl.
+     *
+     * Inside the NuclearStackExtension class there is a dedicated
+     * fNucleusRef index, where fNucleusRef[i] is referring to the
+     * correct A and Z for a specific particle index i. fNucleusRef[i]
+     * == -1 means that this is not a nucleus, and a subsequent call to
+     * GetNucleusA would produce an exception.
+     */
+    template <typename InnerStackImpl>
+    class NuclearStackExtensionImpl : public InnerStackImpl {
+
+    public:
+      void Init() { InnerStackImpl::Init(); }
+      void Dump() { InnerStackImpl::Dump(); }
+
+      void Clear() {
+        InnerStackImpl::Clear();
+        fNucleusRef.clear();
+        fNuclearA.clear();
+        fNuclearZ.clear();
+      }
+
+      unsigned int GetSize() const { return fNucleusRef.size(); }
+      unsigned int GetCapacity() const { return fNucleusRef.capacity(); }
+
+      void SetNuclearA(const unsigned int i, const unsigned short vA) {
+        fNuclearA[GetNucleusRef(i)] = vA;
+      }
+      void SetNuclearZ(const unsigned int i, const unsigned short vZ) {
+        fNuclearZ[GetNucleusRef(i)] = vZ;
+      }
+      void SetNucleusRef(const unsigned int i, const int v) { fNucleusRef[i] = v; }
+
+      int GetNuclearA(const unsigned int i) const { return fNuclearA[GetNucleusRef(i)]; }
+      int GetNuclearZ(const unsigned int i) const { return fNuclearZ[GetNucleusRef(i)]; }
+      // this function will create new storage for Nuclear Properties, and return the
+      // reference to it
+      int GetNucleusNextRef() {
+        fNuclearA.push_back(0);
+        fNuclearZ.push_back(0);
+        return fNuclearA.size() - 1;
+      }
+
+      int GetNucleusRef(const unsigned int i) const {
+        if (fNucleusRef[i] >= 0) return fNucleusRef[i];
+        std::ostringstream err;
+        err << "NuclearStackExtension: no nucleus at ref=" << i;
+        throw std::runtime_error(err.str());
+      }
+
+      /**
+       *   Function to copy particle at location i1 in stack to i2
+       */
+      void Copy(const unsigned int i1, const unsigned int i2) {
+        // index range check
+        if (i1 >= GetSize() || i2 >= GetSize()) {
+          std::ostringstream err;
+          err << "NuclearStackExtension: trying to access data beyond size of stack!";
+          throw std::runtime_error(err.str());
+        }
+        // copy internal particle data p[i2] = p[i1]
+        InnerStackImpl::Copy(i1, i2);
+        // check if any of p[i1] or p[i2] was a Code::Nucleus
+        const int ref1 = fNucleusRef[i1];
+        const int ref2 = fNucleusRef[i2];
+        if (ref2 < 0) {
+          if (ref1 >= 0) {
+            // i1 is nucleus, i2 is not
+            fNucleusRef[i2] = GetNucleusNextRef();
+            fNuclearA[fNucleusRef[i2]] = fNuclearA[ref1];
+            fNuclearZ[fNucleusRef[i2]] = fNuclearZ[ref1];
+          } else {
+            // neither i1 nor i2 are nuclei
+          }
+        } else {
+          if (ref1 >= 0) {
+            // both are nuclei, i2 is overwritten with nucleus i1
+            // fNucleusRef stays the same, but A and Z data is overwritten
+            fNuclearA[ref2] = fNuclearA[ref1];
+            fNuclearZ[ref2] = fNuclearZ[ref1];
+          } else {
+            // i2 is overwritten with non-nucleus i1
+            fNucleusRef[i2] = -1;                       // flag as non-nucleus
+            fNuclearA.erase(fNuclearA.cbegin() + ref2); // remove data for i2
+            fNuclearZ.erase(fNuclearZ.cbegin() + ref2); // remove data for i2
+            const int n = fNucleusRef.size(); // update fNucleusRef: indices above ref2
+                                              // must be decremented by 1
+            for (int i = 0; i < n; ++i) {
+              if (fNucleusRef[i] > ref2) { fNucleusRef[i] -= 1; }
+            }
+          }
+        }
+      }
+
+      /**
+       *   Function to copy particle at location i2 in stack to i1
+       */
+      void Swap(const unsigned int i1, const unsigned int i2) {
+        // index range check
+        if (i1 >= GetSize() || i2 >= GetSize()) {
+          std::ostringstream err;
+          err << "NuclearStackExtension: trying to access data beyond size of stack!";
+          throw std::runtime_error(err.str());
+        }
+        // swap original particle data
+        InnerStackImpl::Swap(i1, i2);
+        // swap corresponding nuclear reference data
+        std::swap(fNucleusRef[i2], fNucleusRef[i1]);
+      }
+
+      void IncrementSize() {
+        InnerStackImpl::IncrementSize();
+        fNucleusRef.push_back(-1);
+      }
+
+      void DecrementSize() {
+        InnerStackImpl::DecrementSize();
+        if (fNucleusRef.size() > 0) {
+          const int ref = fNucleusRef.back();
+          fNucleusRef.pop_back();
+          if (ref >= 0) {
+            fNuclearA.erase(fNuclearA.begin() + ref);
+            fNuclearZ.erase(fNuclearZ.begin() + ref);
+            const int n = fNucleusRef.size();
+            for (int i = 0; i < n; ++i) {
+              if (fNucleusRef[i] >= ref) { fNucleusRef[i] -= 1; }
+            }
+          }
+        }
+      }
+
+    private:
+      /// the actual memory to store particle data
+
+      std::vector<int> fNucleusRef;
+      std::vector<unsigned short> fNuclearA;
+      std::vector<unsigned short> fNuclearZ;
+
+    }; // end class NuclearStackExtensionImpl
+
+    //    template<typename StackIteratorInterface>
+    // using NuclearParticleInterfaceType<StackIteratorInterface> =
+    // NuclearParticleInterface< ,StackIteratorInterface>
+
+    // works, but requires stupd _PI class
+    // template<typename SS> using TEST =
+    // NuclearParticleInterface<corsika::stack::super_stupid::SuperStupidStack::PIType,
+    // SS>;
+    template <typename InnerStack, template <typename> typename _PI>
+    using NuclearStackExtension =
+        Stack<NuclearStackExtensionImpl<typename InnerStack::StackImpl>, _PI>;
+
+    // ----
+
+    // I'm dont't manage to do this properly.......
+    /*
+    template<typename TT, typename SS> using TESTi = typename
+    NuclearParticleInterface<TT::template PIType, SS>::ExtendedParticleInterface;
+    template<typename TT, typename SS> using TEST1 = TESTi<TT, SS>;
+    template<typename SS> using TEST2 = TEST1<typename
+    corsika::stack::super_stupid::SuperStupidStack, SS>;
+
+    using NuclearStackExtension = Stack<NuclearStackExtensionImpl<typename
+    InnerStack::StackImpl>, TEST2>;
+    */
+    /*
+      // .... this should be fixed ....
+
+    template <typename InnerStack, typename SS=StackIteratorInterface>
+      //using NuclearStackExtension = Stack<NuclearStackExtensionImpl<typename
+    InnerStack::StackImpl>, NuclearParticleInterface<typename InnerStack::template PIType,
+    StackIteratorInterface>::ExtendedParticleInterface>; using NuclearStackExtension =
+    Stack<NuclearStackExtensionImpl<typename InnerStack::StackImpl>, TEST1<typename
+    corsika::stack::super_stupid::SuperStupidStack, SS> >;
+
+    //template <typename InnerStack>
+      //  using NuclearStackExtension = Stack<NuclearStackExtensionImpl<typename
+    InnerStack::StackImpl>, TEST<typename
+    corsika::stack::super_stupid::SuperStupidStack::PIType>>;
+    //using NuclearStackExtension = Stack<NuclearStackExtensionImpl<typename
+    InnerStack::StackImpl>, TEST>;
+    */
+
+  } // namespace nuclear_extension
+} // namespace corsika::stack
+
+#endif
diff --git a/Stack/NuclearStackExtension/testNuclearStackExtension.cc b/Stack/NuclearStackExtension/testNuclearStackExtension.cc
new file mode 100644
index 0000000000000000000000000000000000000000..05983794970285750c462439bd3f1825515c56f7
--- /dev/null
+++ b/Stack/NuclearStackExtension/testNuclearStackExtension.cc
@@ -0,0 +1,221 @@
+
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * See file AUTHORS for a list of contributors.
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#include <corsika/geometry/RootCoordinateSystem.h>
+#include <corsika/stack/nuclear_extension/NuclearStackExtension.h>
+#include <corsika/stack/super_stupid/SuperStupidStack.h>
+#include <corsika/units/PhysicalUnits.h>
+
+#include <boost/type_index.hpp>
+using boost::typeindex::type_id_with_cvr;
+
+using namespace corsika::geometry;
+using namespace corsika::units::si;
+
+#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
+                          // cpp file
+#include <catch2/catch.hpp>
+
+using namespace corsika;
+using namespace corsika::stack::nuclear_extension;
+
+// this is an auxiliary help typedef, which I don't know how to put
+// into NuclearStackExtension.h where it belongs...
+template <typename StackIter>
+using ExtendedParticleInterfaceType =
+    corsika::stack::nuclear_extension::NuclearParticleInterface<
+        corsika::stack::super_stupid::SuperStupidStack::PIType, StackIter>;
+
+using ExtStack = NuclearStackExtension<corsika::stack::super_stupid::SuperStupidStack,
+                                       ExtendedParticleInterfaceType>;
+
+#include <iostream>
+using namespace std;
+
+TEST_CASE("NuclearStackExtension", "[stack]") {
+
+  geometry::CoordinateSystem& dummyCS =
+      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+  // cout << "ParticleType=" << type_id_with_cvr<ParticleType>().pretty_name() << endl;
+
+  SECTION("write non nucleus") {
+    NuclearStackExtension<corsika::stack::super_stupid::SuperStupidStack,
+                          ExtendedParticleInterfaceType>
+        s;
+    s.AddParticle(particles::Code::Electron, 1.5_GeV,
+                  MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                  Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s);
+    REQUIRE(s.GetSize() == 1);
+  }
+
+  SECTION("write nucleus") {
+    NuclearStackExtension<corsika::stack::super_stupid::SuperStupidStack,
+                          ExtendedParticleInterfaceType>
+        s;
+    s.AddParticle(particles::Code::Nucleus, 1.5_GeV,
+                  MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                  Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 10);
+    REQUIRE(s.GetSize() == 1);
+  }
+
+  SECTION("write invalid nucleus") {
+    ExtStack s;
+    REQUIRE_THROWS(s.AddParticle(
+        particles::Code::Nucleus, 1.5_GeV, MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 0, 0));
+  }
+
+  SECTION("read non nucleus") {
+    ExtStack s;
+    s.AddParticle(particles::Code::Electron, 1.5_GeV,
+                  MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                  Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s);
+    const auto pout = s.GetNextParticle();
+    REQUIRE(pout.GetPID() == particles::Code::Electron);
+    REQUIRE(pout.GetEnergy() == 1.5_GeV);
+    REQUIRE(pout.GetTime() == 100_s);
+  }
+
+  SECTION("read nucleus") {
+    ExtStack s;
+    s.AddParticle(particles::Code::Nucleus, 1.5_GeV,
+                  MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                  Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 9);
+    const auto pout = s.GetNextParticle();
+    REQUIRE(pout.GetPID() == particles::Code::Nucleus);
+    REQUIRE(pout.GetEnergy() == 1.5_GeV);
+    REQUIRE(pout.GetTime() == 100_s);
+    REQUIRE(pout.GetNuclearA() == 10);
+    REQUIRE(pout.GetNuclearZ() == 9);
+  }
+
+  SECTION("read invalid nucleus") {
+    ExtStack s;
+    s.AddParticle(particles::Code::Electron, 1.5_GeV,
+                  MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                  Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s);
+    const auto pout = s.GetNextParticle();
+    REQUIRE_THROWS(pout.GetNuclearA());
+    REQUIRE_THROWS(pout.GetNuclearZ());
+  }
+
+  SECTION("stack fill and cleanup") {
+
+    ExtStack s;
+    // add 99 particles, each 10th particle is a nucleus with A=i and Z=A/2!
+    for (int i = 0; i < 99; ++i) {
+      if ((i + 1) % 10 == 0) {
+        s.AddParticle(particles::Code::Nucleus, 1.5_GeV,
+                      MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                      Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2);
+      } else {
+        s.AddParticle(particles::Code::Electron, 1.5_GeV,
+                      MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                      Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s);
+      }
+    }
+
+    REQUIRE(s.GetSize() == 99);
+    for (int i = 0; i < 99; ++i) s.GetNextParticle().Delete();
+    REQUIRE(s.GetSize() == 0);
+  }
+
+  SECTION("stack operations") {
+
+    ExtStack s;
+    // add 99 particles, each 10th particle is a nucleus with A=i and Z=A/2!
+    for (int i = 0; i < 99; ++i) {
+      if ((i + 1) % 10 == 0) {
+        s.AddParticle(particles::Code::Nucleus, i * 15_GeV,
+                      MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                      Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2);
+      } else {
+        s.AddParticle(particles::Code::Electron, i * 1.5_GeV,
+                      MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                      Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s);
+      }
+    }
+
+    // copy
+    {
+      s.Copy(s.begin() + 9, s.begin() + 10); // nuclei to non-nuclei
+      const auto& p9 = s.cbegin() + 9;
+      const auto& p10 = s.cbegin() + 10;
+
+      REQUIRE(p9.GetPID() == particles::Code::Nucleus);
+      REQUIRE(p9.GetEnergy() == 9 * 15_GeV);
+      REQUIRE(p9.GetTime() == 100_s);
+      REQUIRE(p9.GetNuclearA() == 9);
+      REQUIRE(p9.GetNuclearZ() == 9 / 2);
+
+      REQUIRE(p10.GetPID() == particles::Code::Nucleus);
+      REQUIRE(p10.GetEnergy() == 9 * 15_GeV);
+      REQUIRE(p10.GetTime() == 100_s);
+      REQUIRE(p10.GetNuclearA() == 9);
+      REQUIRE(p10.GetNuclearZ() == 9 / 2);
+    }
+
+    // copy
+    {
+      s.Copy(s.begin() + 93, s.begin() + 9); // non-nuclei to nuclei
+      const auto& p93 = s.cbegin() + 93;
+      const auto& p9 = s.cbegin() + 9;
+
+      REQUIRE(p9.GetPID() == particles::Code::Electron);
+      REQUIRE(p9.GetEnergy() == 93 * 1.5_GeV);
+      REQUIRE(p9.GetTime() == 100_s);
+
+      REQUIRE(p93.GetPID() == particles::Code::Electron);
+      REQUIRE(p93.GetEnergy() == 93 * 1.5_GeV);
+      REQUIRE(p93.GetTime() == 100_s);
+    }
+
+    // swap
+    {
+      s.Swap(s.begin() + 11, s.begin() + 10);
+      const auto& p11 = s.cbegin() + 11; // now: nucleus
+      const auto& p10 = s.cbegin() + 10; // now: electron
+
+      REQUIRE(p11.GetPID() == particles::Code::Nucleus);
+      REQUIRE(p11.GetEnergy() == 9 * 15_GeV);
+      REQUIRE(p11.GetTime() == 100_s);
+      REQUIRE(p11.GetNuclearA() == 9);
+      REQUIRE(p11.GetNuclearZ() == 9 / 2);
+
+      REQUIRE(p10.GetPID() == particles::Code::Electron);
+      REQUIRE(p10.GetEnergy() == 11 * 1.5_GeV);
+      REQUIRE(p10.GetTime() == 100_s);
+    }
+
+    // swap two nuclei
+    {
+      s.Swap(s.begin() + 29, s.begin() + 59);
+      const auto& p29 = s.cbegin() + 29;
+      const auto& p59 = s.cbegin() + 59;
+
+      REQUIRE(p29.GetPID() == particles::Code::Nucleus);
+      REQUIRE(p29.GetEnergy() == 59 * 15_GeV);
+      REQUIRE(p29.GetTime() == 100_s);
+      REQUIRE(p29.GetNuclearA() == 59);
+      REQUIRE(p29.GetNuclearZ() == 59 / 2);
+
+      REQUIRE(p59.GetPID() == particles::Code::Nucleus);
+      REQUIRE(p59.GetEnergy() == 29 * 15_GeV);
+      REQUIRE(p59.GetTime() == 100_s);
+      REQUIRE(p59.GetNuclearA() == 29);
+      REQUIRE(p59.GetNuclearZ() == 29 / 2);
+    }
+
+    for (int i = 0; i < 99; ++i) s.DeleteLast();
+    REQUIRE(s.GetSize() == 0);
+  }
+}
diff --git a/Stack/SuperStupidStack/SuperStupidStack.h b/Stack/SuperStupidStack/SuperStupidStack.h
index 044ae32a1ae5adcabe5adaf9b5bc5b149d85aca1..cb63b03360b9df5c4c5593468258de900218b1bb 100644
--- a/Stack/SuperStupidStack/SuperStupidStack.h
+++ b/Stack/SuperStupidStack/SuperStupidStack.h
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -23,8 +23,6 @@
 #include <algorithm>
 #include <vector>
 
-using namespace corsika;
-
 namespace corsika::stack {
 
   namespace super_stupid {
@@ -38,50 +36,70 @@ namespace corsika::stack {
     template <typename StackIteratorInterface>
     class ParticleInterface : public ParticleBase<StackIteratorInterface> {
 
+    protected:
+      using corsika::stack::ParticleBase<StackIteratorInterface>::GetStack;
       using corsika::stack::ParticleBase<StackIteratorInterface>::GetStackData;
       using corsika::stack::ParticleBase<StackIteratorInterface>::GetIndex;
 
     public:
+      void SetParticleData(const corsika::particles::Code vDataPID,
+                           const corsika::units::si::HEPEnergyType vDataE,
+                           const MomentumVector& vMomentum,
+                           const corsika::geometry::Point& vPosition,
+                           const corsika::units::si::TimeType vTime) {
+        SetPID(vDataPID);
+        SetEnergy(vDataE);
+        SetMomentum(vMomentum);
+        SetPosition(vPosition);
+        SetTime(vTime);
+      }
+
+      void SetParticleData(ParticleInterface<StackIteratorInterface>& /*parent*/,
+                           const corsika::particles::Code vDataPID,
+                           const corsika::units::si::HEPEnergyType vDataE,
+                           const MomentumVector& vMomentum,
+                           const corsika::geometry::Point& vPosition,
+                           const corsika::units::si::TimeType vTime) {
+        SetPID(vDataPID);
+        SetEnergy(vDataE);
+        SetMomentum(vMomentum);
+        SetPosition(vPosition);
+        SetTime(vTime);
+      }
+
+      /// individual setters
       void SetPID(const corsika::particles::Code id) {
         GetStackData().SetPID(GetIndex(), id);
       }
-
       void SetEnergy(const corsika::units::si::HEPEnergyType& e) {
         GetStackData().SetEnergy(GetIndex(), e);
       }
-
       void SetMomentum(const MomentumVector& v) {
         GetStackData().SetMomentum(GetIndex(), v);
       }
-
       void SetPosition(const corsika::geometry::Point& v) {
         GetStackData().SetPosition(GetIndex(), v);
       }
-
       void SetTime(const corsika::units::si::TimeType& v) {
         GetStackData().SetTime(GetIndex(), v);
       }
 
+      /// individual getters
       corsika::particles::Code GetPID() const {
         return GetStackData().GetPID(GetIndex());
       }
-
       corsika::units::si::HEPEnergyType GetEnergy() const {
         return GetStackData().GetEnergy(GetIndex());
       }
-
       MomentumVector GetMomentum() const {
         return GetStackData().GetMomentum(GetIndex());
       }
-
       corsika::geometry::Point GetPosition() const {
         return GetStackData().GetPosition(GetIndex());
       }
-
       corsika::units::si::TimeType GetTime() const {
         return GetStackData().GetTime(GetIndex());
       }
-
       corsika::geometry::Vector<corsika::units::si::dimensionless_d> GetDirection()
           const {
         return GetMomentum() / GetEnergy();
@@ -89,7 +107,6 @@ namespace corsika::stack {
     };
 
     /**
-     *
      * Memory implementation of the most simple (stupid) particle stack object.
      */
 
@@ -97,6 +114,7 @@ namespace corsika::stack {
 
     public:
       void Init() {}
+      void Dump() const {}
 
       void Clear() {
         fDataPID.clear();
@@ -106,37 +124,41 @@ namespace corsika::stack {
         fTime.clear();
       }
 
-      int GetSize() const { return fDataPID.size(); }
-
-      int GetCapacity() const { return fDataPID.size(); }
-
-      void SetPID(const int i, const corsika::particles::Code id) { fDataPID[i] = id; }
+      unsigned int GetSize() const { return fDataPID.size(); }
+      unsigned int GetCapacity() const { return fDataPID.size(); }
 
-      void SetEnergy(const int i, const corsika::units::si::HEPEnergyType e) {
+      void SetPID(const unsigned int i, const corsika::particles::Code id) {
+        fDataPID[i] = id;
+      }
+      void SetEnergy(const unsigned int i, const corsika::units::si::HEPEnergyType e) {
         fDataE[i] = e;
       }
-      void SetMomentum(const int i, const MomentumVector& v) { fMomentum[i] = v; }
-
-      void SetPosition(const int i, const corsika::geometry::Point& v) {
+      void SetMomentum(const unsigned int i, const MomentumVector& v) {
+        fMomentum[i] = v;
+      }
+      void SetPosition(const unsigned int i, const corsika::geometry::Point& v) {
         fPosition[i] = v;
       }
+      void SetTime(const unsigned int i, const corsika::units::si::TimeType& v) {
+        fTime[i] = v;
+      }
 
-      void SetTime(const int i, const corsika::units::si::TimeType& v) { fTime[i] = v; }
-
-      corsika::particles::Code GetPID(const int i) const { return fDataPID[i]; }
-
-      corsika::units::si::HEPEnergyType GetEnergy(const int i) const { return fDataE[i]; }
-
-      MomentumVector GetMomentum(const int i) const { return fMomentum[i]; }
-
-      corsika::geometry::Point GetPosition(const int i) const { return fPosition[i]; }
-
-      corsika::units::si::TimeType GetTime(const int i) const { return fTime[i]; }
+      corsika::particles::Code GetPID(const unsigned int i) const { return fDataPID[i]; }
+      corsika::units::si::HEPEnergyType GetEnergy(const unsigned int i) const {
+        return fDataE[i];
+      }
+      MomentumVector GetMomentum(const unsigned int i) const { return fMomentum[i]; }
+      corsika::geometry::Point GetPosition(const unsigned int i) const {
+        return fPosition[i];
+      }
+      corsika::units::si::TimeType GetTime(const unsigned int i) const {
+        return fTime[i];
+      }
 
       /**
        *   Function to copy particle at location i2 in stack to i1
        */
-      void Copy(const int i1, const int i2) {
+      void Copy(const unsigned int i1, const unsigned int i2) {
         fDataPID[i2] = fDataPID[i1];
         fDataE[i2] = fDataE[i1];
         fMomentum[i2] = fMomentum[i1];
@@ -147,7 +169,7 @@ namespace corsika::stack {
       /**
        *   Function to copy particle at location i2 in stack to i1
        */
-      void Swap(const int i1, const int i2) {
+      void Swap(const unsigned int i1, const unsigned int i2) {
         std::swap(fDataPID[i2], fDataPID[i1]);
         std::swap(fDataE[i2], fDataE[i1]);
         std::swap(fMomentum[i2], fMomentum[i1]);
@@ -155,13 +177,11 @@ namespace corsika::stack {
         std::swap(fTime[i2], fTime[i1]);
       }
 
-    protected:
       void IncrementSize() {
         using corsika::geometry::Point;
         using corsika::particles::Code;
         fDataPID.push_back(Code::Unknown);
         fDataE.push_back(0 * corsika::units::si::electronvolt);
-        //#TODO this here makes no sense: see issue #48
         geometry::CoordinateSystem& dummyCS =
             geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
         fMomentum.push_back(MomentumVector(
diff --git a/Stack/SuperStupidStack/testSuperStupidStack.cc b/Stack/SuperStupidStack/testSuperStupidStack.cc
index dbb585a237d2ec201bd99449046046ea6afa7ecc..0e3628b46f6639e336a34cc8545f05b39fb98831 100644
--- a/Stack/SuperStupidStack/testSuperStupidStack.cc
+++ b/Stack/SuperStupidStack/testSuperStupidStack.cc
@@ -1,5 +1,5 @@
 
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -28,17 +28,15 @@ using namespace std;
 
 TEST_CASE("SuperStupidStack", "[stack]") {
 
+  geometry::CoordinateSystem& dummyCS =
+      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
   SECTION("read+write") {
 
     SuperStupidStack s;
-    auto p = s.NewParticle();
-    p.SetPID(particles::Code::Electron);
-    p.SetEnergy(1.5_GeV);
-    geometry::CoordinateSystem& dummyCS =
-        geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
-    p.SetMomentum(MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}));
-    p.SetPosition(Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}));
-    p.SetTime(100_s);
+    s.AddParticle(particles::Code::Electron, 1.5_GeV,
+                  MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                  Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s);
 
     // read
     REQUIRE(s.GetSize() == 1);
@@ -54,7 +52,10 @@ TEST_CASE("SuperStupidStack", "[stack]") {
   SECTION("write+delete") {
 
     SuperStupidStack s;
-    for (int i = 0; i < 99; ++i) s.NewParticle();
+    for (int i = 0; i < 99; ++i)
+      s.AddParticle(particles::Code::Electron, 1.5_GeV,
+                    MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                    Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s);
 
     REQUIRE(s.GetSize() == 99);
 
diff --git a/ThirdParty/ThirdParty.dox b/ThirdParty/ThirdParty.dox
index a7e46398fad57d563726578dd734677320785c67..b15d9fdd7b1ec6adbde20778d377785d7c0a3ae4 100644
--- a/ThirdParty/ThirdParty.dox
+++ b/ThirdParty/ThirdParty.dox
@@ -1,5 +1,5 @@
 /**
-@page ThirdParty
+@page ThirdParty Third party software
 @tableofcontents
 
 In the directory ThirdParty we provide simple dependencies. This
diff --git a/corsika.dox b/corsika.dox
index 2bcf4de1727cb9d80391d777fe781998a3ad9218..bfbb74d79eaaad1a07ba095c6a34c1a205f54678 100644
--- a/corsika.dox
+++ b/corsika.dox
@@ -1,8 +1,9 @@
 /**
-@mainpage CORSIKA air shower simulations framework
 
-Documentation and reference guide for the CORSIKA8 (CORSIKA version 8)
-software framework for air shower simulations. CORSIKA8 is developed
+@mainpage Technical documentation of the CORSIKA 8 software framework
+
+Software documentatin and reference guide for the CORSIKA 8
+software framework for air shower simulations. CORSIKA 8 is developed
 at <a
 href="https://gitlab.ikp.kit.edu/AirShowerPhysics">https://gitlab.ikp.kit.edu</a>. If
 you got the code from somewhere else, consider to switch to the
@@ -15,16 +16,12 @@ Write to corsika-devel@lists.kit.edu, or even register yourself at
 https://www.lists.kit.edu/sympa/info/corsika-devel to get in contact
 with other developers.
 
-If you use, or want to refer to, CORSIKA8 please cite <a href="https://doi.org/10.1007/s41781-018-0013-0">"Towards a Next
-Generation of CORSIKA: A Framework for the Simulation of Particle
-Cascades in Astroparticle Physics" [Comput.Softw.Big Sci. 3 (2019)
-2]</a>. We kindly ask (and
-expect) any relevant improvement or addition to be offered or
-contributed to the main CORSIKA8 repository for the benefit of the
-whole community.
+For more information about the project, see @ref md_README. 
+
+## Further details:
+ 1. @subpage Stack
+ 2. @subpage Particles
+ 3. @subpage COAST
 
-For more information, see also the 
-<a
-href="https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/blob/master/README.md">central README.md file</a>.
 
 */
diff --git a/do-copyright.py b/do-copyright.py
index 6f3ea67284282c0635621e742dc56015e95ea0f5..24c5beb6af4f277c016c2d8a0870ff303e734d61 100755
--- a/do-copyright.py
+++ b/do-copyright.py
@@ -3,7 +3,7 @@
 import os.path
 
 text = """
-/**
+/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * See file AUTHORS for a list of contributors.
@@ -15,65 +15,82 @@ text = """
 """
 
 excludeDirs = ["ThirdParty", "git"]
-excludeFiles = ['PhysicalConstants.h']
+excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc']
 
 extensions = [".cc", ".h", ".test"]
 
 def checkNote(filename):
 
-    startNote = -1
-    endNote = -1
-    isCopyright = False
-    lines = []
+    startNote = []
+    endNote = []
 
+    # read input file into lines
+    lines = []
     with open(filename, "r") as file:
         for line in file.readlines():
             lines.append(line)            
         file.close()
 
-            
+    searchStatus = 0 # 0:before comment block, #1 in comment block, #2 found copyright
+    blockStart = 0
     for iLine in range(len(lines)):
         line = lines[iLine]
-        if "/**" in line and startNote == -1:
-            startNote = iLine
-        if "copyright" in line.lower() and startNote>=0 and endNote==-1:
-            isCopyright = True
-        if "*/" in line and startNote>=0 and endNote==-1:
-            endNote = iLine
+        if "/*" in line and searchStatus==0:
+            searchStatus = 1
+            blockStart = iLine
+        if "copyright" in line.lower() and searchStatus>0:
+            searchStatus = 2
+        if "*/" in line:
+            if searchStatus>=2:
+                startNote.append(blockStart)
+                endNote.append(iLine)
+            searchStatus = 0
         iLine += 1
-
-    # now check if copyright notice is already there and identical...
+        
+    # now check if first copyright notices is already identical...
     isSame = False
-    if startNote>=0 and endNote>=0 and isCopyright:
+    if len(startNote)>0: 
         isSame = True
         noteLines = text.split('\n')        
         for iLine in range(len(noteLines)-2):
-            if startNote+iLine >= len(lines):
+            if startNote[0]+iLine >= len(lines):
                 isSame = False
-                break            
-            if noteLines[iLine+1].strip(" \n") != lines[startNote+iLine].strip(" \n"):
+                break
+            if noteLines[iLine+1].strip(" \n") != lines[startNote[0]+iLine].strip(" \n"):
                 isSame = False
-                print "not same: " + filename + " new=\'" + noteLines[iLine+1] + "\' vs old=\'" + lines[startNote+iLine].rstrip('\n') + "\'"
+                print "need update: " + filename + " new=\'" + noteLines[iLine+1] + "\' vs old=\'" + lines[startNote+iLine].rstrip('\n') + "\'"
                 break
-
-    # check if notice is the same 
-    if isSame:
+    
+    # check if notice is the same, or we need to remove multiple notices...
+    if isSame and len(startNote)<=1:
         return                
     
     # add (new) copyright notice here:
-        
+    print ("File: " + filename + ", make copy to " + filename+".bak")
     os.rename(filename, filename+".bak")
 
     with open(filename, "w") as file:
 
         file.write(text)
 
-        firstLine = 0
-        if startNote>=0 and endNote>=0 and isCopyright:
-            firstLine = endNote + 2
+        skip = False
+        for iLine in range(len(lines)):
 
-        for iLine in range(firstLine, len(lines)):
-            file.write(lines[iLine])
+            inBlock = False
+            for iBlock in range(len(startNote)):
+                if iLine>=startNote[iBlock] and iLine<=endNote[iBlock]:
+                    print "   [remove " + str(iBlock) + "] " + (lines[iLine]).strip()
+                    inBlock = True
+                    skip = True
+
+            if inBlock:
+                continue
+            
+            if lines[iLine].strip() != "": # if line after comment is empty, also remove it
+                skip = False
+                    
+            if not skip:
+                file.write(lines[iLine])
         
         file.close()
 
@@ -84,6 +101,8 @@ def next_file(x, dir_name, files):
             return
     for check in files :
         filename, file_extension = os.path.splitext(check)
+        if '#' in check or '~' in check:
+            return
         for check2 in excludeFiles :
             if check2 in check:
                 return
diff --git a/nuc/DataSet04.dat b/nuc/DataSet04.dat
new file mode 100644
index 0000000000000000000000000000000000000000..6a6787f0348e4ddb2ad732da6b90719c23022127
--- /dev/null
+++ b/nuc/DataSet04.dat
@@ -0,0 +1,1497 @@
+SPHERICA !   Z   N     B [MeV]     dB[MeV]    R0 [fm]   sigma [fm]  Rch [fm]   Rp [fm]
+            71
+             6    6   -92.16069    0.00000    2.44300    0.81000    0.00000    0.00000
+             8    8  -127.61723    0.00000    2.77700    0.83900    2.70100    2.57728
+            14   20  -283.42083    0.01411    0.00000    0.00000    0.00000    0.00000
+            16   20  -308.70312    0.00018    3.57700    0.99400    3.29900    3.20303
+            18   20  -327.32804    0.00034    0.00000    0.00000    3.40400    3.30864
+            20   16  -281.34140    0.04000    0.00000    0.00000    0.00000    0.00000
+            20   18  -313.10392    0.00456    0.00000    0.00000    0.00000    0.00000
+            20   20  -342.03360    0.00020    3.84500    0.97800    3.47800    3.38282
+            20   22  -361.87704    0.00025    3.87600    0.99900    3.51300    3.42049
+            20   24  -380.94104    0.00040    3.91200    0.97500    3.52300    3.43245
+            20   26  -398.75027    0.00225    0.00000    0.00000    3.50200    3.41260
+            20   28  -415.97198    0.00408    3.96400    0.88100    3.47900    3.39070
+            20   30  -427.47131    0.00925    0.00000    0.00000    3.52300    3.43752
+            20   32  -436.55224    0.69862    0.00000    0.00000    0.00000    0.00000
+            22   20  -346.88210    0.00546    0.00000    0.00000    0.00000    0.00000
+            22   28  -437.75775    0.00080    4.05100    0.94700    3.57000    3.48189
+            24   28  -456.32058    0.00078    4.17300    0.92400    3.64200    3.55394
+            26   28  -471.72806    0.00070    4.25800    0.90000    3.69300    3.60474
+            28   28  -483.95050    0.01109    0.00000    0.00000    3.75000    3.66189
+            28   30  -506.41717    0.00064    4.36400    0.00000    3.77600    3.68964
+            28   32  -526.80421    0.00060    4.39600    0.92600    3.81800    3.73372
+            28   34  -545.22083    0.00062    4.43800    0.93700    3.84800    3.76550
+            28   36  -561.71668    0.00064    4.48600    0.91600    3.86800    3.78703
+            28   40  -590.36648    0.00299    0.00000    0.00000    0.00000    0.00000
+            34   50  -727.28411    0.00198    0.00000    0.00000    0.00000    0.00000
+            36   50  -749.15919    0.00009    0.00000    0.00000    4.18400    4.11071
+            38   50  -768.38296    0.00106    4.99400    0.92300    4.22000    4.14633
+            40   50  -783.79526    0.00234    5.04000    0.95700    4.26900    4.19528
+            42   50  -796.39907    0.00377    5.10400    0.95000    4.31500    4.24126
+            44   50  -806.74888    0.00390    0.00000    0.00000    0.00000    0.00000
+            46   50  -814.91396    0.00470    0.00000    0.00000    0.00000    0.00000
+            48   50  -820.91761    0.07801    0.00000    0.00000    0.00000    0.00000
+            50   50  -824.62947    0.70540    0.00000    0.00000    0.00000    0.00000
+            50   58  -914.50074    0.00574    0.00000    0.00000    4.56300    4.49294
+            50   62  -953.36675    0.00426    5.47700    0.96300    4.59600    4.52748
+            50   64  -971.40893    0.00319    5.50900    0.94800    4.61000    4.54220
+            50   66  -988.51881    0.00290    5.54100    0.94500    4.62600    4.55895
+            50   68 -1004.78946    0.00283    5.57100    0.93100    4.64000    4.57366
+            50   70 -1020.38103    0.00252    5.59100    0.00000    4.65200    4.58634
+            50   72 -1035.36456    0.00268    5.62800    0.89500    4.66300    4.59800
+            50   74 -1049.79795    0.00136    5.64000    0.90800    4.67400    4.60966
+            50   76 -1063.72433    0.01071    0.00000    0.00000    0.00000    0.00000
+            50   78 -1077.18119    0.02726    0.00000    0.00000    0.00000    0.00000
+            50   80 -1090.12811    0.01066    0.00000    0.00000    0.00000    0.00000
+            50   82 -1102.68603    0.01360    0.00000    0.00000    0.00000    0.00000
+            50   84 -1109.07025    0.09996    0.00000    0.00000    0.00000    0.00000
+            52   82 -1123.25310    0.01072    0.00000    0.00000    0.00000    0.00000
+            54   82 -1141.67949    0.00707    0.00000    0.00000    4.79100    4.72873
+            56   82 -1158.07598    0.00041    5.86800    0.90000    4.83400    4.77163
+            58   82 -1172.45664    0.00252    0.00000    0.00000    4.87700    4.81458
+            60   82 -1184.88667    0.00227    5.87600    0.98900    4.91500    4.85250
+            62   82 -1195.46065    0.00274    0.00000    0.00000    4.96000    4.89755
+            64   82 -1204.13814    0.00467    0.00000    0.00000    4.98400    4.92137
+            66   82 -1210.45971    0.01066    0.00000    0.00000    5.04600    4.98370
+            68   82 -1214.98739    0.01725    0.00000    0.00000    5.07600    5.01365
+            70   82 -1218.01338    0.20839    0.00000    0.00000    0.00000    0.00000
+            80  126 -1620.54246    0.02039    0.00000    0.00000    5.48500    5.43129
+            82  116 -1559.48128    0.01465    0.00000    0.00000    5.45000    5.39422
+            82  118 -1575.81684    0.01100    0.00000    0.00000    5.45900    5.40357
+            82  120 -1591.64987    0.00808    0.00000    0.00000    5.47400    5.41899
+            82  122 -1606.96857    0.00122    6.74900    0.91800    5.48300    5.42834
+            82  124 -1621.78701    0.00124    6.76600    0.92100    5.49400    5.43971
+            82  126 -1635.89266    0.00125    6.77600    0.91300    5.50400    5.45007
+            82  128 -1645.01508    0.00147    0.00000    0.00000    5.52300    5.46952
+            82  130 -1653.97679    0.00212    0.00000    0.00000    5.54200    5.48896
+            82  132 -1662.75325    0.00235    0.00000    0.00000    5.55900    5.50638
+            84  126 -1644.64324    0.00126    0.00000    0.00000    5.53400    5.47998
+            86  126 -1651.89482    0.00318    0.00000    0.00000    5.55500    5.50082
+            88  126 -1657.67874    0.00920    0.00000    0.00000    5.57100    5.51662
+            90  126 -1662.01769    0.01296    0.00000    0.00000    0.00000    0.00000
+            92  126 -1664.94051    0.03052    0.00000    0.00000    0.00000    0.00000
+DEFORMED ! Z   N     B [MeV]      dB [MeV]    b2 (SLy4) Meas.
+            233
+            10   12  -177.76671    0.00002    0.26752   1
+            12   10  -168.57233    0.00134    0.31598   1
+            12   12  -198.25158    0.00002    0.41246   1
+            12   24  -259.73456    0.50400    0.33813   0
+            14   24  -299.81662    0.13748    0.25111   1
+            14   26  -306.42490    0.55604    0.28952   1
+            24   24  -411.43757    0.00739    0.29557   1
+            24   26  -435.02054    0.00100    0.27046   1
+            26   24  -417.66588    0.06000    0.28607   1
+            26   26  -447.66458    0.00655    0.26089   1
+            32   32  -545.82241    0.03168    0.27548   1
+            34   56  -755.66446    0.36000    0.26161   0
+            38   38  -637.84931    0.03724    0.63780   1
+            40   66  -883.83736    0.53000    0.51161   0
+            44   58  -877.82772    0.00204    0.25697   1
+            44   60  -892.96127    0.00312    0.30122   1
+            46   64  -940.07111    0.01089    0.26280   1
+            46   70  -980.00574    0.00792    0.25848   1
+            52   58  -919.25903    0.05269    0.25156   1
+            52   60  -940.42588    0.17024    0.25769   1
+            52   62  -961.15577    0.02793    0.36961   1
+            54   58  -921.50947    0.10405    0.32107   1
+            54   60  -944.77137    0.01117    0.34862   1
+            54   62  -966.87486    0.01299    0.39437   1
+            54   64  -988.04976    0.01038    0.42105   1
+            54   66 -1008.28584    0.01176    0.41785   1
+            54   68 -1027.61101    0.01110    0.39897   1
+            54   70 -1046.05870    0.00186    0.34610   1
+            54   72 -1063.70971    0.00630    0.28664   1
+            54   90 -1177.14600    0.28800    0.25107   0
+            56   60  -946.80802    0.34800    0.46283   0
+            56   62  -970.80602    0.23600    0.52386   0
+            56   64  -993.41930    0.30012    0.49423   1
+            56   66 -1015.28225    0.02794    0.45705   1
+            56   68 -1035.90570    0.01252    0.42758   1
+            56   70 -1055.62849    0.01247    0.38676   1
+            56   72 -1074.50274    0.01011    0.33565   1
+            56   74 -1092.50539    0.00273    0.28219   1
+            56   90 -1199.38499    0.07227    0.28276   1
+            56   92 -1208.54101    0.08421    0.32530   1
+            58   64  -996.87112    0.36600    0.55452   0
+            58   66 -1020.03712    0.24800    0.51992   0
+            58   68 -1042.19551    0.02797    0.47928   1
+            58   70 -1063.05152    0.02790    0.43066   1
+            58   72 -1083.08320    0.02795    0.37076   1
+            58   74 -1102.27691    0.02059    0.30596   1
+            58   88 -1208.47679    0.06643    0.27043   1
+            58   90 -1219.33470    0.02945    0.33434   1
+            58   92 -1229.91032    0.04785    0.39587   1
+            58   94 -1240.38912    0.15200    0.41706   0
+            58   96 -1250.09112    0.46200    0.42490   0
+            60   66 -1022.73930    0.37800    0.55224   0
+            60   68 -1046.14530    0.25600    0.53313   0
+            60   70 -1068.67199    0.02795    0.55097   1
+            60   72 -1089.64422    0.02416    0.55943   1
+            60   74 -1110.00739    0.01179    0.32527   1
+            60   76 -1129.70293    0.01183    0.26073   1
+            60   88 -1224.77282    0.00281    0.29271   1
+            60   90 -1237.19175    0.00315    0.39403   1
+            60   92 -1249.80272    0.02462    0.43627   1
+            60   94 -1261.47885    0.11396    0.44992   1
+            60   96 -1272.46022    0.20296    0.45671   1
+            60   98 -1282.54730    0.47400    0.45965   0
+            62   68 -1048.04454    0.39000    0.53869   0
+            62   70 -1071.82854    0.26400    0.54703   0
+            62   72 -1094.23654    0.13400    0.55625   0
+            62   74 -1115.72911    0.01251    0.35409   1
+            62   76 -1136.55860    0.01187    0.28020   1
+            62   88 -1238.97399    0.00240    0.31499   1
+            62   90 -1252.82804    0.00243    0.41549   1
+            62   92 -1266.66344    0.00262    0.44882   1
+            62   94 -1279.71483    0.00952    0.45958   1
+            62   96 -1291.69986    0.07837    0.46619   1
+            62   98 -1303.08454    0.16000    0.46941   0
+            62  100 -1313.54454    0.48600    0.46957   0
+            64   72 -1096.40682    0.40800    0.54681   0
+            64   74 -1119.29682    0.13800    0.52743   0
+            64   88 -1251.18707    0.00258    0.32767   1
+            64   90 -1266.32864    0.00246    0.40202   1
+            64   92 -1281.30023    0.00250    0.44183   1
+            64   94 -1295.59749    0.00253    0.45463   1
+            64   96 -1308.99194    0.00256    0.46137   1
+            64   98 -1321.47330    0.00454    0.46516   1
+            64  100 -1333.02282    0.32800    0.46572   0
+            64  102 -1343.80482    0.66400    0.46117   0
+            66   74 -1120.80014    0.56000    0.51905   0
+            66   88 -1261.42632    0.00770    0.32280   1
+            66   90 -1277.70063    0.00655    0.38571   1
+            66   92 -1293.72542    0.00348    0.43079   1
+            66   94 -1309.13406    0.00256    0.44749   1
+            66   96 -1323.78552    0.00259    0.45499   1
+            66   98 -1337.71449    0.00246    0.45935   1
+            66  100 -1350.47410    0.00249    0.46048   1
+            66  102 -1362.59073    0.13994    0.45600   1
+            66  104 -1373.79014    0.17000    0.44510   0
+            68   88 -1269.79523    0.02449    0.30023   1
+            68   90 -1287.02880    0.02528    0.35779   1
+            68   92 -1303.92609    0.02448    0.40452   1
+            68   94 -1320.35290    0.00340    0.43385   1
+            68   96 -1336.10249    0.00312    0.44738   1
+            68   98 -1351.22716    0.00249    0.45398   1
+            68  100 -1365.43500    0.00252    0.45582   1
+            68  102 -1378.69547    0.00272    0.45165   1
+            68  104 -1391.21286    0.00464    0.44102   1
+            68  106 -1402.79249    0.34800    0.42550   0
+            70   88 -1276.15050    0.00822    0.27784   1
+            70   90 -1294.44801    0.01648    0.32482   1
+            70   92 -1312.25256    0.01604    0.36478   1
+            70   94 -1329.58624    0.01607    0.40004   1
+            70   96 -1346.29473    0.00830    0.43024   1
+            70   98 -1362.42349    0.00437    0.45114   1
+            70  100 -1377.76048    0.00238    0.45638   1
+            70  102 -1392.39445    0.00241    0.45035   1
+            70  104 -1406.22627    0.00244    0.43576   1
+            70  106 -1418.91345    0.00264    0.41847   1
+            70  108 -1431.26039    0.01032    0.40207   1
+            72   88 -1280.62524    0.01152    0.26012   1
+            72   90 -1300.00369    0.00956    0.29605   1
+            72   92 -1318.79482    0.02034    0.32715   1
+            72   94 -1336.97491    0.02789    0.35843   1
+            72   96 -1354.61911    0.02789    0.39202   1
+            72   98 -1371.65495    0.02788    0.44582   1
+            72  100 -1387.94738    0.02442    0.46359   1
+            72  102 -1403.53303    0.00278    0.45428   1
+            72  104 -1418.40662    0.00229    0.41845   1
+            72  106 -1432.41596    0.00214    0.39316   1
+            72  108 -1445.90278    0.00216    0.37754   1
+            72  110 -1458.31546    0.00637    0.36434   1
+            74   90 -1303.61571    0.01181    0.27007   1
+            74   92 -1323.41644    0.01046    0.29382   1
+            74   94 -1342.55744    0.01630    0.31962   1
+            74   96 -1361.10309    0.01513    0.36255   1
+            74   98 -1379.04965    0.02786    0.43185   1
+            74  100 -1396.32210    0.02801    0.45015   1
+            74  102 -1412.87927    0.02798    0.44309   1
+            74  104 -1428.79638    0.01531    0.39061   1
+            74  106 -1444.16739    0.00396    0.36159   1
+            74  108 -1458.91307    0.00091    0.34661   1
+            74  110 -1472.51556    0.00092    0.33351   1
+            74  112 -1485.46046    0.00167    0.31548   1
+            74  114 -1497.76058    0.00338    0.28799   1
+            74  116 -1509.53254    0.16492    0.25136   1
+            76   92 -1326.06544    0.01210    0.25837   1
+            76   94 -1346.14517    0.01088    0.27800   1
+            76   96 -1365.59807    0.01462    0.39704   1
+            76   98 -1384.49897    0.01114    0.42099   1
+            76  100 -1402.74321    0.02798    0.43157   1
+            76  102 -1420.33418    0.01638    0.42633   1
+            76  104 -1437.28946    0.02034    0.39016   1
+            76  106 -1453.68238    0.02166    0.34946   1
+            76  108 -1469.47195    0.00129    0.32709   1
+            76  110 -1484.35808    0.00130    0.30812   1
+            76  112 -1498.63756    0.00150    0.28613   1
+            76  114 -1512.35012    0.00152    0.25840   1
+            78   98 -1387.97979    0.01443    0.40918   1
+            78  100 -1407.19257    0.01086    0.42264   1
+            78  102 -1425.77316    0.01098    0.42119   1
+            78  104 -1443.64914    0.01565    0.40118   1
+            78  106 -1460.95459    0.01822    0.36856   1
+            78  108 -1477.62966    0.02176    0.33139   1
+            80  102 -1429.46162    0.00965    0.42682   1
+            88  138 -1730.96591    0.00226    0.26738   1
+            88  140 -1741.83584    0.00251    0.28587   1
+            88  142 -1752.40246    0.01219    0.30148   1
+            90  136 -1729.83809    0.00475    0.28285   1
+            90  138 -1742.40562    0.00228    0.30560   1
+            90  140 -1754.45645    0.00184    0.32075   1
+            90  142 -1766.01478    0.00209    0.33337   1
+            90  144 -1776.99141    0.00351    0.34352   1
+            90  146 -1787.26475    0.23600    0.34980   0
+            92  134 -1724.10556    0.01311    0.27440   1
+            92  136 -1738.35228    0.01505    0.31225   1
+            92  138 -1752.10483    0.00483    0.33329   1
+            92  140 -1765.25149    0.00232    0.34715   1
+            92  142 -1777.85822    0.00187    0.35853   1
+            92  144 -1789.70112    0.00189    0.36677   1
+            92  146 -1800.98110    0.00190    0.37049   1
+            92  148 -1811.71758    0.00504    0.36876   1
+            94  136 -1745.18385    0.01518    0.32796   1
+            94  138 -1759.89465    0.01810    0.34664   1
+            94  140 -1774.05327    0.00702    0.36027   1
+            94  142 -1787.64270    0.00212    0.37183   1
+            94  144 -1800.52348    0.00190    0.38030   1
+            94  146 -1812.70387    0.00192    0.38394   1
+            94  148 -1824.25491    0.00194    0.38215   1
+            94  150 -1835.31058    0.00512    0.37683   1
+            96  140 -1781.01680    0.23600    0.36935   0
+            96  142 -1795.68911    0.03665    0.38077   1
+            96  144 -1809.50224    0.00240    0.38934   1
+            96  146 -1822.56507    0.00194    0.39340   1
+            96  148 -1835.05913    0.00171    0.39233   1
+            96  150 -1847.03719    0.00197    0.38842   1
+            96  152 -1858.40608    0.00496    0.38351   1
+            98  142 -1801.57723    0.24000    0.38866   0
+            98  144 -1816.42832    0.03678    0.39702   1
+            98  146 -1830.42944    0.00293    0.40140   1
+            98  148 -1843.95952    0.00221    0.40088   1
+            98  150 -1856.95416    0.00521    0.39770   1
+            98  152 -1869.16473    0.00200    0.39386   1
+            98  154 -1880.44518    0.00504    0.38872   1
+            98  156 -1891.28115    0.01219    0.38061   1
+           100  144 -1821.32853    0.24400    0.40128   0
+           100  146 -1836.30537    0.03862    0.40601   1
+           100  148 -1850.68221    0.01166    0.40598   1
+           100  150 -1864.65753    0.01200    0.40339   1
+           100  152 -1878.05634    0.00580    0.40036   1
+           100  154 -1890.11218    0.00279    0.39617   1
+           100  156 -1901.67298    0.00717    0.38846   1
+           100  158 -1912.98053    0.25800    0.37580   0
+           102  148 -1855.59468    0.25000    0.40581   0
+           102  150 -1870.38620    0.01310    0.40377   1
+           102  152 -1884.68553    0.01753    0.40139   1
+           102  154 -1897.72867    0.00794    0.39779   1
+           102  156 -1910.10068    0.25800    0.39039   0
+           102  158 -1922.31468    0.26000    0.37800   0
+           102  160 -1933.96468    0.52400    0.36201   0
+           104  152 -1889.70921    0.02406    0.39725   1
+           104  154 -1903.60768    0.25800    0.39400   0
+           104  156 -1917.07168    0.26000    0.38730   0
+           104  158 -1929.99168    0.26200    0.37652   0
+           104  160 -1942.35568    0.52800    0.36299   0
+           104  162 -1954.68368    0.53200    0.35035   0
+           106  154 -1908.03775    0.03874    0.38787   1
+           106  156 -1922.34951    0.26200    0.38176   0
+           106  158 -1936.23951    0.26400    0.37234   0
+           106  160 -1949.31951    0.26600    0.36073   0
+           106  162 -1962.10751    0.53600    0.34929   0
+           106  164 -1974.05751    0.54000    0.33592   0
+           108  156 -1925.69700    0.04380    0.30000   1
+           108  158 -1940.23016    0.26600    0.36570   0
+           108  160 -1954.55816    0.53600    0.35506   0
+           108  162 -1968.34216    0.27000    0.34422   0
+           108  164 -1980.21016    0.54400    0.33152   0
+           108  166 -1992.58616    0.54800    0.31692   0
+DELTA3_N !   Z   N      Delta3       Error  Meas.
+            179
+            66   90    1.236011    0.015817   1
+            66   91    1.043146    0.011608   1
+            66   92    1.111383    0.008124   1
+            66   93    0.871543    0.005721   1
+            66   94    1.060700    0.005200   1
+            66   95    0.871266    0.005152   1
+            66   96    0.963021    0.005184   1
+            66   97    0.693528    0.005134   1
+            66   98    0.970962    0.005001   1
+            66   99    0.663721    0.004950   1
+            66  100    0.812905    0.033871   1
+            66  101    0.640595    0.131504   1
+            66  102    0.794315    0.320413   1
+            66  103    0.489430    0.455623   0
+            66  104    0.798569    0.491326   0
+            66  105    0.667000    0.599000   0
+            66  106    0.878000    0.774500   0
+            68   90    1.310176    0.041399   1
+            68   91    1.113687    0.029173   1
+            68   92    1.170212    0.031296   1
+            68   93    0.991497    0.023279   1
+            68   94    1.151089    0.010679   1
+            68   95    0.972069    0.008475   1
+            68   96    1.098414    0.007291   1
+            68   97    0.912298    0.005938   1
+            68   98    1.019105    0.005310   1
+            68   99    0.667499    0.005010   1
+            68  100    0.884072    0.005040   1
+            68  101    0.626958    0.005155   1
+            68  102    0.787811    0.005356   1
+            68  103    0.577123    0.006418   1
+            68  104    0.795093    0.092512   0
+            68  105    0.544184    0.349322   0
+            68  106    0.797500    0.609500   0
+            68  107    0.597000    0.700000   0
+            68  108    0.720000    0.792500   0
+            70   90    1.326147    0.033592   1
+            70   91    1.156470    0.032198   1
+            70   92    1.257375    0.031995   1
+            70   93    1.122843    0.032029   1
+            70   94    1.226862    0.038001   1
+            70   95    1.018287    0.040071   1
+            70   96    1.147836    0.024580   1
+            70   97    0.987519    0.011010   1
+            70   98    1.092449    0.008903   1
+            70   99    0.801494    0.007768   1
+            70  100    0.927748    0.005774   1
+            70  101    0.702494    0.004788   1
+            70  102    0.826099    0.004816   1
+            70  103    0.548626    0.004844   1
+            70  104    0.821005    0.004872   1
+            70  105    0.521062    0.004988   1
+            70  106    0.649099    0.005192   1
+            70  107    0.607020    0.009137   1
+            70  108    0.967020    0.190652   0
+            70  109    0.599273    0.543162   0
+            70  110    0.825500    0.720000   0
+            72   90    1.370594    0.034765   1
+            72   91    1.211121    0.042820   1
+            72   92    1.360707    0.048215   1
+            72   93    1.204780    0.051997   1
+            72   94    1.307404    0.055775   1
+            72   95    1.142078    0.055777   1
+            72   96    1.268299    0.055775   1
+            72   97    1.090345    0.055769   1
+            72   98    1.179695    0.056272   1
+            72   99    0.897333    0.055051   1
+            72  100    0.981974    0.052886   1
+            72  101    0.713233    0.041630   1
+            72  102    0.898721    0.018197   1
+            72  103    0.728173    0.005336   1
+            72  104    0.890780    0.004750   1
+            72  105    0.621263    0.004336   1
+            72  106    0.763501    0.004272   1
+            72  107    0.644483    0.004296   1
+            72  108    0.846532    0.004320   1
+            72  109    0.511504    0.006437   1
+            72  110    0.709429    0.022462   1
+            72  111    0.493735    0.053069   1
+            72  112    0.695571    0.147250   0
+            72  113    0.609344    0.390872   0
+            72  114    0.758000    0.651500   0
+            72  115    0.734000    0.842000   0
+            90  136    0.861069    0.008582   1
+            90  137    0.821505    0.006010   1
+            90  138    0.924103    0.004903   1
+            90  139    0.768352    0.004808   1
+            90  140    0.837797    0.004138   1
+            90  141    0.660994    0.003812   1
+            90  142    0.826877    0.004060   1
+            90  143    0.701911    0.004896   1
+            90  144    0.880002    0.029586   1
+            90  145    0.706443    0.169810   0
+            90  146    0.792555    0.498027   0
+            90  147    0.700000    0.711000   0
+            92  136    0.891580    0.026424   1
+            92  137    0.790906    0.015893   1
+            92  138    0.894230    0.009308   1
+            92  139    0.694606    0.006578   1
+            92  140    0.752914    0.005220   1
+            92  141    0.541259    0.004892   1
+            92  142    0.773575    0.004210   1
+            92  143    0.623977    0.003760   1
+            92  144    0.709860    0.003776   1
+            92  145    0.514288    0.003792   1
+            92  146    0.673860    0.003808   1
+            92  147    0.561677    0.005384   1
+            92  148    0.727979    0.126496   0
+            92  149    0.685520    0.364520   0
+            94  136    0.908780    0.053995   1
+            94  137    0.635736    0.042972   1
+            94  138    0.803041    0.056427   1
+            94  139    0.694259    0.062886   1
+            94  140    0.768226    0.042524   1
+            94  141    0.557598    0.025252   1
+            94  142    0.735778    0.013530   1
+            94  143    0.559636    0.004147   1
+            94  144    0.676976    0.003927   1
+            94  145    0.444117    0.003824   1
+            94  146    0.646420    0.003840   1
+            94  147    0.534049    0.003856   1
+            94  148    0.637640    0.004479   1
+            94  149    0.493543    0.006689   1
+            94  150    0.625302    0.013931   1
+            94  151    0.505728    0.024643   1
+            94  152    0.686288    0.145979   0
+            96  138    0.860121    0.171634   0
+            96  139    0.549677    0.362126   0
+            96  140    0.709000    0.472000   0
+            96  141    0.734157    0.373326   0
+            96  142    0.882814    0.155152   0
+            96  143    0.601877    0.019526   0
+            96  144    0.707599    0.003484   0
+            96  145    0.438176    0.004337   1
+            96  146    0.638396    0.004114   1
+            96  147    0.554231    0.004009   1
+            96  148    0.640464    0.003781   1
+            96  149    0.468693    0.003798   1
+            96  150    0.650947    0.005171   1
+            96  151    0.528623    0.007910   1
+            96  152    0.749956    0.009673   1
+            96  153    0.559696    0.013085   1
+            96  154    0.709914    0.025160   1
+            96  155    0.679776    0.154466   0
+            98  140    0.831500    0.832500   0
+            98  141    0.598000    0.597000   0
+            98  142    0.720000    0.480000   0
+            98  143    0.638542    0.379392   0
+            98  144    0.800084    0.278784   0
+            98  145    0.536646    0.262856   0
+            98  146    0.686725    0.125898   0
+            98  147    0.601284    0.005511   1
+            98  148    0.669912    0.007759   1
+            98  149    0.470818    0.011862   1
+            98  150    0.691349    0.010404   1
+            98  151    0.519847    0.005845   1
+            98  152    0.758315    0.005379   1
+            98  153    0.531722    0.008038   1
+            98  154    0.683826    0.010335   1
+            98  155    0.613687    0.014688   1
+            98  156    0.722790    0.142728   0
+            98  157    0.657956    0.389096   0
+           100  143    0.609000    0.607000   0
+           100  144    0.853500    0.488000   0
+           100  145    0.755418    0.386311   0
+           100  146    0.778836    0.284622   0
+           100  147    0.502258    0.272139   0
+           100  148    0.723680    0.135156   0
+           100  149    0.744340    0.011828   0
+           100  150    0.786805    0.016141   0
+           100  151    0.541016    0.017181   1
+           100  152    0.850559    0.011835   1
+           100  153    0.488613    0.008090   1
+           100  154    0.670112    0.007114   1
+           100  155    0.604096    0.009826   1
+           100  156    0.708287    0.012803   1
+           100  157    0.685852    0.139009   0
+           100  158    0.885314    0.390713   0
+           100  159    0.899000    0.648000   0
+DELTA3_P !   N   Z      Delta3       Error  Meas.
+            149
+            90   56    1.547525    0.101742   1
+            90   57    0.846937    0.098930   1
+            90   58    1.438443    0.094536   1
+            90   59    0.983616    0.098400   1
+            90   60    1.463936    0.046842   1
+            90   61    0.833878    0.008076   1
+            90   62    1.384523    0.006299   1
+            90   63    0.867323    0.004896   1
+            90   64    1.399328    0.009733   1
+            90   65    0.867022    0.016598   1
+            90   66    1.488387    0.024843   1
+            90   67    1.087846    0.040408   1
+            90   68    1.604275    0.051518   1
+            90   69    1.166224    0.048864   1
+            90   70    1.603471    0.044479   1
+            90   71    1.108959    0.041033   1
+            90   72    1.621532    0.042636   1
+            90   73    1.162271    0.048825   1
+            90   74    1.634994    0.044739   1
+            94   56    1.545614    0.751000   0
+            94   57    0.550885    0.754000   0
+            94   58    1.165221    0.430367   0
+            94   59    0.796868    0.236714   0
+            94   60    1.390670    0.180862   1
+            94   61    0.557600    0.091808   1
+            94   62    1.150088    0.027220   1
+            94   63    0.565913    0.011360   1
+            94   64    1.193627    0.006469   1
+            94   65    0.648296    0.005088   1
+            94   66    1.307286    0.005442   1
+            94   67    0.807411    0.006201   1
+            94   68    1.373835    0.008027   1
+            94   69    0.947508    0.015768   1
+            94   70    1.434169    0.032370   1
+            94   71    0.998500    0.048545   1
+            94   72    1.462478    0.055115   1
+            94   73    1.023384    0.049981   1
+            94   74    1.521906    0.044268   1
+            98   58    1.454616    1.247000   0
+            98   59    0.965883    1.020000   0
+            98   60    1.560118    0.789000   0
+            98   61    0.569882    0.476000   0
+            98   62    1.110119    0.400500   0
+            98   63    0.576117    0.404268   0
+            98   64    1.089316    0.167900   0
+            98   65    0.528730    0.008225   1
+            98   66    1.220352    0.006061   1
+            98   67    0.547715    0.004950   1
+            98   68    1.205275    0.005064   1
+            98   69    0.704661    0.006101   1
+            98   70    1.261905    0.008323   1
+            98   71    0.836722    0.021363   1
+            98   72    1.355072    0.044436   1
+            98   73    0.955037    0.055745   1
+            98   74    1.460228    0.055814   1
+           102   62    1.294119    1.557500   0
+           102   63    0.673880    1.402000   0
+           102   64    1.151121    1.161000   0
+           102   65    0.639171    0.735972   0
+           102   66    1.258002    0.316999   0
+           102   67    0.536252    0.091443   1
+           102   68    1.105483    0.014058   1
+           102   69    0.471835    0.005129   1
+           102   70    1.209795    0.004902   1
+           102   71    0.667558    0.005018   1
+           102   72    1.199502    0.017995   1
+           102   73    0.835269    0.043384   1
+           102   74    1.302755    0.055967   1
+           106   66    1.536122    0.944500   0
+           106   67    0.785877    0.692000   0
+           106   68    1.231061    0.546025   0
+           106   69    0.394551    0.225370   0
+           106   70    1.141859    0.028727   1
+           106   71    0.579946    0.004512   1
+           106   72    1.066655    0.004272   1
+           106   73    0.677826    0.005196   1
+           106   74    1.205591    0.011279   1
+           140   87    0.764086    0.327361   0
+           140   88    1.262631    0.069164   1
+           140   89    0.850493    0.035379   1
+           140   90    1.225721    0.019598   1
+           140   91    0.688164    0.004390   1
+           140   92    1.077069    0.028989   1
+           140   93    0.469344    0.055697   1
+           140   94    0.956174    0.150033   0
+           140   95    0.523878    0.356510   0
+           140   96    0.963141    0.472000   0
+           140   97    0.571858    0.593000   0
+           142   87    0.861930    0.271422   0
+           142   88    1.349118    0.080865   1
+           142   89    0.934167    0.107162   1
+           142   90    1.255505    0.053148   1
+           142   91    0.692402    0.004077   1
+           142   92    1.120897    0.003861   1
+           142   93    0.519916    0.003878   1
+           142   94    0.930851    0.003064   0
+           142   95    0.472750    0.019388   0
+           142   96    1.017455    0.156152   0
+           142   97    0.483015    0.377326   0
+           142   98    0.981142    0.480000   0
+           142   99    0.579857    0.603000   0
+           144   88    1.275636    0.579500   0
+           144   89    0.913196    0.350755   0
+           144   90    1.344074    0.145038   0
+           144   91    0.800021    0.052754   1
+           144   92    1.155614    0.027864   1
+           144   93    0.567539    0.003792   1
+           144   94    0.968146    0.004047   1
+           144   95    0.446946    0.004542   1
+           144   96    0.978702    0.124095   0
+           144   97    0.484120    0.260592   0
+           144   98    1.060226    0.278784   0
+           144   99    0.623399    0.383392   0
+           144  100    1.120643    0.488000   0
+           146   89    0.822863    0.822000   0
+           146   90    1.192751    0.521007   0
+           146   91    0.745368    0.218966   0
+           146   92    1.168272    0.052986   1
+           146   93    0.594382    0.004063   1
+           146   94    0.997465    0.003959   1
+           146   95    0.469764    0.003856   1
+           146   96    1.008497    0.005330   1
+           146   97    0.548814    0.007292   1
+           146   98    1.086708    0.127858   0
+           146   99    0.630379    0.265775   0
+           146  100    1.044979    0.284622   0
+           146  101    0.492274    0.390311   0
+           148   91    0.688382    0.360520   0
+           148   92    1.116487    0.159967   0
+           148   93    0.544839    0.074342   1
+           148   94    1.000597    0.038456   1
+           148   95    0.589801    0.004009   1
+           148   96    1.042104    0.003904   1
+           148   97    0.542491    0.004166   1
+           148   98    1.117592    0.003316   0
+           148   99    0.603842    0.006935   0
+           148  100    1.112323    0.136156   0
+           148  101    0.715696    0.379828   0
+           148  102    1.146645    0.500000   0
+           150   93    0.824535    0.123562   0
+           150   94    1.143003    0.006839   0
+           150   95    0.687758    0.006976   1
+           150   96    1.076950    0.006400   1
+           150   97    0.561325    0.009022   1
+           150   98    1.145474    0.007925   0
+           150   99    0.622821    0.008604   0
+           150  100    1.037143    0.137500   0
+           150  101    0.464116    0.263552   0
+           150  102    0.967665    0.265104   0
+SDSTATES !   Z   N     B [MeV]   ESD [MeV]  beta   Reference
+            13
+            18   18  -306.70166    4.329    0.6    Nucl. Phys. A682, 1c (2001)
+            20   20  -342.03357    5.212    0.6    Phys. Rev. Lett. 87, 222501 (2001)
+            30   30  -514.94141    7.500    0.6    Phys. Rev. Lett. 82, 3400 (1999)
+            66   86 -1245.01013    7.500    0.6    Phys. Rev. Lett. 88, 042501 (2002)
+            80  112 -1518.61035    5.300    0.6    Phys. Rev. Lett. 77, 1707 (1996)
+            80  114 -1534.93335    6.017    0.6    Phys. Rev. Lett. 73, 777 (1994)
+            82  110 -1507.55969    4.011    0.6    Phys. Rev. C49, 2849 (1994)
+            82  112 -1525.35364    4.640    0.6    Phys. Rev. C55, 2819 (1997)
+            82  114 -1542.64868    5.630    0.6     ANU-P/1667 (2005)
+            92  144 -1789.70166    2.750    0.7    
+            92  146 -1800.98157    2.557    0.7    
+            94  146 -1812.70387    2.800    0.7    
+            96  146 -1822.56482    1.900    0.7
+MONOPRES !   Z   N     E [MeV]   DeltaE [MeV]
+             3
+            40   50     17.81      0.35
+            50   66     15.83      0.06
+            82  126     14.18      0.11
+DIPOLRES !   Z   N     E [MeV]
+             3
+            40   50     16.74
+            50   66     15.68
+            82  126     13.63
+ODDNUCLE !   Z   N   Spin  Par. Meas.
+           630
+             6    5   1.5   -1   1
+             6    7   0.5   -1   1
+             6    9   0.5    1   1
+             7    4   0.5    1   1
+             7    6   0.5   -1   1
+             7    8   0.5   -1   1
+             7   10   0.5   -1   1
+             8    7   0.5   -1   1
+             8    9   2.5    1   1
+             8   11   2.5    1   1
+             9    8   2.5    1   1
+             9   10   0.5    1   1
+             9   12   2.5    1   1
+            10    7   0.5   -1   1
+            10    9   0.5    1   1
+            10   11   1.5    1   1
+            10   13   2.5    1   1
+            11   10   1.5    1   1
+            11   12   1.5    1   1
+            11   14   2.5    1   1
+            11   16   2.5    1   1
+            12   11   1.5    1   1
+            12   13   2.5    1   1
+            12   15   0.5    1   1
+            12   17   1.5    1   1
+            12   19   1.5    1   1
+            13   12   2.5    1   1
+            13   14   2.5    1   1
+            13   16   2.5    1   1
+            14   11   2.5    1   1
+            14   13   2.5    1   1
+            14   15   0.5    1   1
+            14   17   1.5    1   1
+            15   12   0.5    1   1
+            15   14   0.5    1   1
+            15   16   0.5    1   1
+            15   18   0.5    1   1
+            15   20   0.5    1   1
+            16   13   2.5    1   1
+            16   15   0.5    1   1
+            16   17   1.5    1   1
+            16   19   1.5    1   1
+            16   21   3.5   -1   1
+            17   14   1.5    1   1
+            17   16   1.5    1   1
+            17   18   1.5    1   1
+            17   20   1.5    1   1
+            17   22   1.5    1   1
+            18   15   0.5    1   1
+            18   17   1.5    1   1
+            18   19   1.5    1   1
+            18   21   3.5   -1   1
+            18   23   3.5   -1   1
+            19   16   1.5    1   1
+            19   18   1.5    1   1
+            19   20   1.5    1   1
+            19   22   1.5    1   1
+            19   24   1.5    1   1
+            19   26   1.5    1   1
+            19   28   0.5    1   1
+            20   19   1.5    1   1
+            20   21   3.5   -1   1
+            20   23   3.5   -1   1
+            20   25   3.5   -1   1
+            20   27   3.5   -1   1
+            20   29   1.5   -1   1
+            21   20   3.5   -1   1
+            21   22   3.5   -1   1
+            21   24   3.5   -1   1
+            21   26   3.5   -1   1
+            21   28   3.5   -1   1
+            22   19   1.5    1   0
+            22   21   3.5   -1   1
+            22   23   3.5   -1   1
+            22   25   2.5   -1   1
+            22   27   3.5   -1   1
+            22   29   1.5   -1   1
+            23   22   3.5   -1   1
+            23   24   1.5   -1   1
+            23   26   3.5   -1   1
+            23   28   3.5   -1   1
+            23   30   3.5   -1   1
+            24   23   1.5   -1   1
+            24   25   2.5   -1   1
+            24   27   3.5   -1   1
+            24   29   1.5   -1   1
+            24   31   1.5   -1   1
+            25   24   2.5   -1   1
+            25   26   2.5   -1   1
+            25   28   3.5   -1   1
+            25   30   2.5   -1   1
+            25   32   2.5   -1   1
+            26   25   2.5   -1   1
+            26   27   3.5   -1   1
+            26   29   1.5   -1   1
+            26   31   0.5   -1   1
+            26   33   1.5   -1   1
+            27   28   3.5   -1   1
+            27   30   3.5   -1   1
+            27   32   3.5   -1   1
+            27   34   3.5   -1   1
+            27   36   3.5   -1   1
+            28   27   3.5   -1   1
+            28   29   1.5   -1   1
+            28   31   1.5   -1   1
+            28   33   1.5   -1   1
+            28   35   0.5   -1   1
+            28   37   2.5   -1   1
+            28   39   0.5   -1   1
+            28   41   4.5    1   1
+            29   28   1.5   -1   1
+            29   30   1.5   -1   1
+            29   32   1.5   -1   1
+            29   34   1.5   -1   1
+            29   36   1.5   -1   1
+            29   38   1.5   -1   1
+            29   40   1.5   -1   1
+            30   29   1.5   -1   1
+            30   31   1.5   -1   1
+            30   33   1.5   -1   1
+            30   35   2.5   -1   1
+            30   37   2.5   -1   1
+            30   39   0.5   -1   1
+            30   41   0.5   -1   1
+            31   30   1.5   -1   1
+            31   34   1.5   -1   1
+            31   36   1.5   -1   1
+            31   38   1.5   -1   1
+            31   40   1.5   -1   1
+            31   42   1.5   -1   1
+            32   35   0.5   -1   1
+            32   37   2.5   -1   1
+            32   39   0.5   -1   1
+            32   41   4.5    1   1
+            32   43   0.5   -1   1
+            32   45   3.5    1   1
+            33   36   2.5   -1   1
+            33   38   2.5   -1   1
+            33   40   1.5   -1   1
+            33   42   1.5   -1   1
+            33   44   1.5   -1   1
+            33   46   1.5   -1   1
+            33   48   1.5   -1   1
+            34   37   2.5   -1   1
+            34   39   4.5    1   1
+            34   41   2.5    1   1
+            34   43   0.5   -1   1
+            34   45   3.5    1   1
+            34   47   0.5   -1   1
+            34   49   4.5    1   1
+            35   38   0.5   -1   1
+            35   40   1.5   -1   1
+            35   42   1.5   -1   1
+            35   44   1.5   -1   1
+            35   46   1.5   -1   1
+            35   48   1.5   -1   1
+            35   50   1.5   -1   1
+            35   52   1.5   -1   1
+            36   37   1.5   -1   1
+            36   39   2.5    1   1
+            36   41   2.5    1   1
+            36   43   0.5   -1   1
+            36   45   3.5    1   1
+            36   47   4.5    1   1
+            36   49   4.5    1   1
+            36   51   2.5    1   1
+            36   57   0.5    1   1
+            37   40   1.5   -1   1
+            37   42   2.5    1   1
+            37   44   1.5   -1   1
+            37   46   2.5   -1   1
+            37   48   2.5   -1   1
+            37   50   1.5   -1   1
+            37   52   1.5   -1   1
+            37   56   2.5   -1   1
+            37   58   2.5   -1   1
+            37   60   1.5    1   1
+            38   39   2.5    1   1
+            38   43   0.5   -1   1
+            38   45   3.5    1   1
+            38   47   4.5    1   1
+            38   49   4.5    1   1
+            38   51   2.5    1   1
+            38   53   2.5    1   1
+            38   55   2.5    1   1
+            38   57   0.5    1   1
+            38   59   0.5    1   1
+            38   61   1.5    1   1
+            39   44   4.5    1   1
+            39   48   0.5   -1   1
+            39   50   0.5   -1   1
+            39   52   0.5   -1   1
+            39   54   0.5   -1   1
+            39   56   0.5   -1   1
+            40   45   3.5    1   1
+            40   49   4.5    1   1
+            40   51   2.5    1   1
+            40   53   2.5    1   1
+            40   55   2.5    1   1
+            40   57   0.5    1   1
+            40   59   0.5    1   1
+            40   61   1.5    1   1
+            41   50   4.5    1   1
+            41   52   4.5    1   1
+            41   54   4.5    1   1
+            41   56   4.5    1   1
+            41   58   4.5    1   1
+            42   49   4.5    1   1
+            42   51   2.5    1   1
+            42   53   2.5    1   1
+            42   55   2.5    1   1
+            42   57   0.5    1   1
+            42   59   0.5    1   1
+            43   50   4.5    1   1
+            43   52   4.5    1   1
+            43   54   4.5    1   1
+            43   56   4.5    1   1
+            43   58   4.5    1   1
+            43   60   2.5    1   1
+            44   51   2.5    1   1
+            44   53   2.5    1   1
+            44   55   2.5    1   1
+            44   57   2.5    1   1
+            44   59   1.5    1   1
+            44   61   1.5    1   1
+            45   52   4.5    1   1
+            45   56   0.5   -1   1
+            45   58   0.5   -1   1
+            45   60   3.5    1   1
+            45   62   3.5    1   1
+            45   64   3.5    1   1
+            46   55   2.5    1   1
+            46   57   2.5    1   1
+            46   59   2.5    1   1
+            46   61   2.5    1   1
+            46   63   2.5    1   1
+            46   65   2.5    1   1
+            47   54   4.5    1   1
+            47   56   3.5    1   1
+            47   58   0.5   -1   1
+            47   60   0.5   -1   1
+            47   62   0.5   -1   1
+            47   64   0.5   -1   1
+            47   66   0.5   -1   1
+            47   68   0.5   -1   1
+            48   55   2.5    1   1
+            48   57   2.5    1   1
+            48   59   2.5    1   1
+            48   61   2.5    1   1
+            48   63   0.5    1   1
+            48   65   0.5    1   1
+            48   67   0.5    1   1
+            48   69   0.5    1   1
+            49   56   4.5    1   1
+            49   58   4.5    1   1
+            49   60   4.5    1   1
+            49   62   4.5    1   1
+            49   64   4.5    1   1
+            49   66   4.5    1   1
+            49   68   4.5    1   1
+            49   70   4.5    1   1
+            49   72   4.5    1   1
+            49   74   4.5    1   1
+            49   76   4.5    1   1
+            50   61   3.5    1   1
+            50   63   0.5    1   1
+            50   65   0.5    1   1
+            50   67   0.5    1   1
+            50   69   0.5    1   1
+            50   71   1.5    1   1
+            50   73   5.5   -1   1
+            50   75   5.5   -1   1
+            51   62   2.5    1   1
+            51   64   2.5    1   1
+            51   66   2.5    1   1
+            51   68   2.5    1   1
+            51   70   2.5    1   1
+            51   72   3.5    1   1
+            51   74   3.5    1   1
+            51   76   3.5    1   1
+            51   78   3.5    1   1
+            52   63   3.5    1   1
+            52   65   0.5    1   1
+            52   67   0.5    1   1
+            52   69   0.5    1   1
+            52   71   0.5    1   1
+            52   73   0.5    1   1
+            52   75   1.5    1   1
+            52   77   1.5    1   1
+            52   79   1.5    1   1
+            53   66   2.5    1   1
+            53   68   2.5    1   1
+            53   70   2.5    1   1
+            53   72   2.5    1   1
+            53   74   2.5    1   1
+            53   76   3.5    1   1
+            53   78   3.5    1   1
+            53   80   3.5    1   1
+            53   82   3.5    1   1
+            54   69   0.5    1   1
+            54   73   0.5    1   1
+            54   75   0.5    1   1
+            54   77   1.5    1   1
+            54   79   1.5    1   1
+            54   81   1.5    1   1
+            54   83   3.5   -1   1
+            54   85   1.5   -1   1
+            54   89   2.5   -1   0
+            55   64   4.5    1   1
+            55   68   0.5    1   1
+            55   72   0.5    1   1
+            55   74   0.5    1   1
+            55   76   2.5    1   1
+            55   78   3.5    1   1
+            55   80   3.5    1   1
+            55   82   3.5    1   1
+            55   84   3.5    1   1
+            55   86   3.5    1   1
+            55   88   1.5    1   1
+            55   90   1.5    1   1
+            56   67   2.5    1   1
+            56   71   0.5    1   1
+            56   73   0.5    1   1
+            56   75   0.5    1   1
+            56   77   0.5    1   1
+            56   79   1.5    1   1
+            56   81   1.5    1   1
+            56   85   1.5   -1   1
+            56   87   2.5   -1   1
+            56   89   2.5   -1   1
+            57   72   1.5    1   1
+            57   74   1.5    1   1
+            57   76   2.5    1   1
+            57   78   2.5    1   1
+            57   80   3.5    1   1
+            57   82   3.5    1   1
+            58   75   0.5    1   1
+            58   79   1.5    1   1
+            58   81   1.5    1   1
+            58   83   3.5   -1   1
+            58   85   1.5   -1   1
+            59   78   2.5    1   1
+            59   80   2.5    1   1
+            59   82   2.5    1   1
+            59   84   3.5    1   1
+            59   86   3.5    1   1
+            60   77   0.5    1   1
+            60   79   1.5    1   1
+            60   81   1.5    1   1
+            60   83   3.5   -1   1
+            60   85   3.5   -1   1
+            60   87   2.5   -1   1
+            60   89   2.5   -1   1
+            60   91   1.5    1   1
+            61   80   2.5    1   1
+            61   82   2.5    1   1
+            61   84   2.5    1   1
+            61   86   3.5    1   1
+            61   88   3.5    1   1
+            61   90   2.5    1   1
+            61   92   2.5   -1   1
+            62   77   0.5    1   1
+            62   79   0.5    1   1
+            62   81   1.5    1   1
+            62   83   3.5   -1   1
+            62   85   3.5   -1   1
+            62   87   3.5   -1   1
+            62   89   2.5   -1   1
+            62   91   1.5    1   1
+            62   93   1.5   -1   1
+            62   97   2.5   -1   1
+            63   68   1.5    1   0
+            63   78   2.5    1   1
+            63   80   2.5    1   1
+            63   82   2.5    1   1
+            63   84   2.5    1   1
+            63   86   2.5    1   1
+            63   88   2.5    1   1
+            63   90   2.5    1   1
+            63   92   2.5    1   1
+            63   94   2.5    1   1
+            63   96   2.5    1   1
+            64   71   1.5   -1   0
+            64   81   0.5    1   1
+            64   83   3.5   -1   1
+            64   85   3.5   -1   1
+            64   87   3.5   -1   1
+            64   89   1.5   -1   1
+            64   91   1.5   -1   1
+            64   93   1.5   -1   1
+            64   95   1.5   -1   1
+            64   97   2.5   -1   1
+            65   84   0.5    1   1
+            65   88   2.5    1   1
+            65   90   1.5    1   1
+            65   92   1.5    1   1
+            65   94   1.5    1   1
+            65   96   1.5    1   1
+            65   98   1.5    1   1
+            66   81   0.5    1   1
+            66   89   1.5   -1   1
+            66   91   1.5   -1   1
+            66   93   1.5   -1   1
+            66   95   2.5    1   1
+            66   97   2.5   -1   1
+            66   99   3.5    1   1
+            67   86   5.5   -1   1
+            67   88   2.5    1   1
+            67   90   3.5   -1   1
+            67   92   3.5   -1   1
+            67   94   3.5   -1   1
+            67   96   3.5   -1   1
+            67   98   3.5   -1   1
+            67  100   3.5   -1   1
+            67  102   3.5   -1   1
+            68   87   3.5   -1   1
+            68   89   1.5   -1   1
+            68   91   1.5   -1   1
+            68   93   1.5   -1   1
+            68   95   2.5   -1   1
+            68   97   2.5   -1   1
+            68   99   3.5    1   1
+            68  101   0.5   -1   1
+            68  103   2.5   -1   1
+            69   78   5.5   -1   0
+            69   88   0.5    1   1
+            69   90   2.5    1   1
+            69   92   3.5    1   1
+            69   94   0.5    1   1
+            69   96   0.5    1   1
+            69   98   0.5    1   1
+            69  100   0.5    1   1
+            69  102   0.5    1   1
+            69  106   0.5    1   1
+            70   87   3.5   -1   1
+            70   91   1.5   -1   1
+            70   93   1.5   -1   1
+            70   95   2.5   -1   1
+            70   97   2.5   -1   1
+            70   99   3.5    1   1
+            70  101   0.5   -1   1
+            70  103   2.5   -1   1
+            70  105   3.5   -1   1
+            71   82   5.5   -1   1
+            71   90   0.5    1   1
+            71   94   0.5    1   1
+            71   96   3.5    1   1
+            71   98   3.5    1   1
+            71  100   3.5    1   1
+            71  102   3.5    1   1
+            71  104   3.5    1   1
+            71  106   3.5    1   1
+            72   85   3.5   -1   0
+            72  101   0.5   -1   1
+            72  103   2.5   -1   1
+            72  105   3.5   -1   1
+            72  107   4.5    1   1
+            72  109   0.5   -1   1
+            73   84   0.5    1   1
+            73  100   2.5   -1   1
+            73  102   3.5    1   1
+            73  104   3.5    1   1
+            73  106   3.5    1   1
+            73  108   3.5    1   1
+            73  110   3.5    1   1
+            74   99   2.5   -1   1
+            74  103   0.5   -1   1
+            74  107   4.5    1   1
+            74  109   0.5   -1   1
+            74  111   1.5   -1   1
+            74  113   1.5   -1   1
+            75   86   0.5    1   1
+            75  102   2.5   -1   1
+            75  106   2.5    1   1
+            75  108   2.5    1   1
+            75  110   2.5    1   1
+            75  112   2.5    1   1
+            75  114   2.5    1   1
+            76  101   0.5   -1   1
+            76  105   0.5   -1   1
+            76  107   4.5    1   1
+            76  109   0.5   -1   1
+            76  111   0.5   -1   1
+            76  113   1.5   -1   1
+            76  115   4.5   -1   1
+            76  117   1.5   -1   1
+            77   90   0.5    1   1
+            77  100   2.5   -1   1
+            77  106   2.5   -1   1
+            77  108   2.5   -1   1
+            77  110   1.5    1   1
+            77  112   1.5    1   1
+            77  114   1.5    1   1
+            77  116   1.5    1   1
+            77  118   1.5    1   1
+            77  120   1.5    1   1
+            78   99   2.5   -1   1
+            78  101   0.5   -1   1
+            78  103   0.5   -1   1
+            78  105   0.5   -1   1
+            78  109   1.5   -1   1
+            78  111   1.5   -1   1
+            78  113   1.5   -1   1
+            78  115   0.5   -1   1
+            78  117   0.5   -1   1
+            78  119   0.5   -1   1
+            78  121   2.5   -1   1
+            79  104   2.5   -1   1
+            79  106   2.5   -1   1
+            79  108   0.5    1   1
+            79  110   0.5    1   1
+            79  112   1.5    1   1
+            79  114   1.5    1   1
+            79  116   1.5    1   1
+            79  118   1.5    1   1
+            79  120   1.5    1   1
+            79  122   1.5    1   1
+            79  124   1.5    1   1
+            79  126   1.5    1   0
+            80  103   0.5   -1   1
+            80  105   0.5   -1   1
+            80  107   1.5   -1   1
+            80  109   1.5   -1   1
+            80  113   1.5   -1   1
+            80  115   0.5   -1   1
+            80  117   0.5   -1   1
+            80  119   0.5   -1   1
+            80  121   1.5   -1   1
+            80  123   2.5   -1   1
+            80  125   0.5   -1   1
+            81  114   0.5    1   1
+            81  116   0.5    1   1
+            81  118   0.5    1   1
+            81  120   0.5    1   1
+            81  122   0.5    1   1
+            81  124   0.5    1   1
+            81  126   0.5    1   1
+            82  103   1.5   -1   1
+            82  115   1.5   -1   1
+            82  117   1.5   -1   1
+            82  119   2.5   -1   1
+            82  121   2.5   -1   1
+            82  123   2.5   -1   1
+            82  125   0.5   -1   1
+            82  127   4.5    1   1
+            82  129   4.5    1   1
+            83  116   4.5   -1   1
+            83  118   4.5   -1   1
+            83  120   4.5   -1   1
+            83  122   4.5   -1   1
+            83  124   4.5   -1   1
+            83  126   4.5   -1   1
+            83  128   4.5   -1   1
+            83  130   4.5   -1   1
+            84  117   1.5   -1   1
+            84  119   2.5   -1   1
+            84  121   2.5   -1   1
+            84  123   2.5   -1   1
+            84  125   0.5   -1   1
+            84  127   4.5    1   1
+            84  129   4.5    1   1
+            84  131   4.5    1   1
+            85  118   4.5   -1   1
+            85  120   4.5   -1   1
+            85  122   4.5   -1   1
+            85  124   4.5   -1   1
+            85  126   4.5   -1   1
+            85  128   4.5   -1   1
+            85  130   4.5   -1   1
+            85  132   4.5   -1   1
+            86  119   2.5   -1   1
+            86  121   2.5   -1   1
+            86  123   2.5   -1   1
+            86  125   0.5   -1   1
+            86  129   4.5    1   1
+            86  131   4.5    1   1
+            86  133   2.5    1   1
+            86  139   3.5   -1   0
+            87  120   4.5   -1   1
+            87  122   4.5   -1   1
+            87  124   4.5   -1   1
+            87  126   4.5   -1   1
+            87  128   4.5   -1   1
+            87  130   4.5   -1   1
+            87  132   4.5   -1   1
+            87  134   2.5   -1   1
+            87  138   1.5   -1   1
+            87  140   0.5    1   1
+            88  121   2.5   -1   1
+            88  125   0.5   -1   1
+            88  133   2.5    1   1
+            88  135   1.5    1   1
+            88  137   0.5    1   1
+            88  139   1.5    1   1
+            89  126   4.5   -1   1
+            89  128   4.5   -1   1
+            89  130   4.5   -1   1
+            89  138   1.5   -1   1
+            90  137   0.5    1   1
+            90  139   2.5    1   1
+            90  141   2.5    1   1
+            90  143   0.5    1   1
+            91  128   4.5   -1   1
+            91  130   4.5   -1   1
+            91  140   1.5   -1   1
+            91  142   1.5   -1   1
+            92  141   2.5    1   1
+            92  143   3.5   -1   1
+            92  145   0.5    1   1
+            92  147   2.5    1   1
+            93  142   2.5    1   1
+            93  144   2.5    1   1
+            93  146   2.5    1   1
+            94  143   3.5   -1   1
+            94  145   0.5    1   1
+            94  147   2.5    1   1
+            94  149   3.5    1   1
+            95  146   2.5   -1   1
+            95  148   2.5   -1   1
+            96  145   0.5    1   1
+            96  147   2.5    1   1
+            96  149   3.5    1   1
+            96  151   4.5   -1   1
+            97  148   1.5   -1   1
+            97  152   3.5    1   1
+            98  151   4.5   -1   1
+            98  153   0.5    1   1
+            99  150   3.5    1   0
+            99  154   3.5    1   1
+           100  155   3.5    1   1
+QPSHELEM !   Z   N   Num. E [MeV]   Nilsson   Spin   Parity
+             4
+            96  149   3   0.00000    [624]     3.5      1
+                          0.25280    [622]     2.5      1
+                          0.38820    [734]     4.5     -1
+            97  152   4   0.00000    [633]     3.5      1
+                          0.00800    [521]     1.5     -1
+                          0.37760    [400]     0.5      1
+                          0.38920    [642]     2.5      1
+            98  153   4   0.00000    [620]     0.5      1
+                          0.10630    [613]     3.5      1
+                          0.17760    [622]     1.5      1
+                          0.37050    [725]     5.5     -1
+            99  154   3   0.00000    [633]     3.5      1
+                          0.10600    [521]     1.5     -1
+                          0.37100    [514]     3.5     -1
+2+ENERGY !   Z   N      E [MeV]   dE [MeV]  BE2(e2b2)  dBE2 (e2b2)
+            24
+            20   18    2.20600    0.00500    0.00960    0.00210
+            20   20    3.90438    0.00003    0.00990    0.00170
+            20   22    1.52473    0.00003    0.04200    0.00300
+            20   24    1.15705    0.00002    0.04700    0.00200
+            20   26    1.34600    0.00030    0.01820    0.00130
+            20   28    3.83172    0.00006    0.00950    0.00320
+            28   28    2.70060    0.00070    0.06000    0.01200
+            28   30    1.45400    0.00010    0.06950    0.00200
+            28   32    1.33252    0.00001    0.09330    0.00150
+            28   34    1.17291    0.00009    0.08900    0.00250
+            28   36    1.34575    0.00005    0.07600    0.00800
+            28   38    1.42510    0.00030    0.06200    0.00900
+            28   40    2.03320    0.00020    0.02600    0.00600
+            50   62    1.25685    0.00007    0.24000    0.01400
+            50   64    1.29992    0.00007    0.24000    0.05000
+            50   66    1.29356    0.00001    0.20900    0.00600
+            50   68    1.22967    0.00002    0.20900    0.00800
+            50   70    1.17134    0.00019    0.20200    0.00400
+            50   72    1.14055    0.00003    0.19200    0.00400
+            50   74    1.13174    0.00002    0.16600    0.00400
+            82  122    0.89917    0.00002    0.16200    0.00400
+            82  124    0.80310    0.00005    0.10000    0.00200
+            82  126    4.08540    0.00030    0.30000    0.03000
+            82  128    0.79970    0.00010    0.05100    0.01500
+DELTAVPN !   Z    N  Mass Exc.(keV) Err.(keV)   BE/A (keV)   Error (%)  dVpn (keV)  Err. (keV)
+           144
+            22   20    -25122.0       5.0        8529.65      0.13      871.1825     40.0400
+            22   22    -37548.5       0.7        8533.52      0.02     2181.4250      1.2650
+            22   24    -44123.4       0.8        8656.36      0.02      913.3675      0.2900
+            22   26    -48487.7       0.8        8722.90      0.02      674.4250      0.6475
+            22   28    -51426.7       0.8        8755.62      0.02      465.0250      1.1875
+            22   30    -49465.0       7.0        8691.57      0.14      670.3250      3.0275
+            22   32    -45590.0     120.0        8596.90      2.30      796.5000    177.5700
+            36   38    -62331.5       2.0        8533.03      0.03      636.6250     15.4350
+            36   40    -69014.0       4.0        8608.81      0.05      590.9500      3.2300
+            36   42    -74179.7       1.1        8661.26      0.01      531.5750      1.1975
+            36   44    -77892.5       1.5        8692.92      0.02      484.7000      0.7600
+            36   46    -80589.5       1.8        8710.65      0.02      490.8000      0.8800
+            36   48    -82431.0       2.8        8717.35      0.03      501.8500      1.0925
+            36   50    -83265.0       0.1        8712.03      0.00      619.1425      3.8475
+            36   52    -79692.0      13.0        8656.86      0.15      459.3575      6.7875
+            38   40    -63174.0       7.0        8500.10      0.10      562.8750     10.2125
+            38   42    -70308.0       7.0        8578.56      0.08      492.0750      2.6825
+            38   44    -76008.0       6.0        8635.70      0.07      496.8000      2.3525
+            38   46    -80644.0       3.0        8677.44      0.04      484.7500      1.7775
+            38   48    -84523.6       1.1        8708.46      0.01      509.5250      1.1525
+            38   50    -87921.7       1.1        8732.60      0.01      640.8825      0.8000
+            38   52    -85941.6       2.9        8695.90      0.03      398.3675      3.3425
+            38   54    -82868.0       3.0        8648.91      0.04      412.1000      5.8500
+            38   56    -78840.0       7.0        8593.78      0.08      539.2500      5.9250
+            40   48    -83623.0      10.0        8665.97      0.12      485.8500      7.9450
+            40   50    -88767.3       2.4        8709.91      0.03      436.5500      2.6000
+            40   52    -88453.9       2.3        8692.62      0.03      416.6750      1.1375
+            40   54    -87266.8       2.4        8666.77      0.03      471.6250      1.3325
+            40   56    -85442.8       2.8        8635.37      0.03      551.0000      2.1150
+            40   58    -81287.0      20.0        8581.45      0.20      436.3000      8.6100
+            40   60    -76600.0      40.0        8524.40      0.40      401.5000     14.5875
+            40   62    -71740.0      50.0        8467.90      0.50      391.5000     36.8075
+            42   48    -80167.0       6.0        8596.97      0.07      411.0000      9.4725
+            42   50    -86805.0       4.0        8657.69      0.04      373.4250      3.1400
+            42   52    -88409.7       1.9        8662.29      0.02      479.5250      1.3850
+            42   54    -88790.5       1.9        8653.94      0.02      391.9750      1.0675
+            42   56    -88111.7       1.9        8635.12      0.02      286.3000      1.1400
+            42   58    -86184.0       6.0        8604.57      0.06      557.0250      5.2875
+            42   60    -83557.0      21.0        8568.37      0.20      515.0000     12.4425
+            42   62    -80330.0      50.0        8257.80      0.50      408.2500     20.9775
+            48   52    -74250.0     100.0        8438.30      1.00      387.5000     49.5875
+            48   54    -79678.0      29.0        8484.31      0.28      375.5000     26.6950
+            48   56    -83975.0       9.0        8517.68      0.09      399.4750      8.1075
+            48   58    -87132.0       6.0        8539.05      0.06      423.0250      2.9800
+            48   60    -89252.0       6.0        8550.02      0.05      402.0000      2.5500
+            48   62    -90353.0       2.7        8551.32      0.02      369.7500      2.0650
+            48   64    -90580.5       2.7        8544.78      0.02      350.6250      3.0050
+            48   66    -90020.9       2.7        8531.56      0.02      363.3500      5.3600
+            48   68    -88719.0       3.0        8512.41      0.03      384.2750      7.5675
+            48   70    -86709.0      20.0        8487.89      0.17      381.7500     16.9275
+            48   72    -83974.0      19.0        8458.16      0.16      438.7500     55.0350
+            48   74    -80730.0      40.0        8425.20      0.40      519.0000     61.4725
+            62   76    -71498.0      12.0        8237.93      0.09      283.5000      6.0000
+            62   78    -75456.0      12.0        8263.82      0.09      284.7500      6.0000
+            62   80    -78993.0       6.0        8286.02      0.04      325.7500      8.3225
+            62   82    -81972.0       2.8        8303.72      0.02      318.9500      7.2150
+            62   84    -81002.0       4.0        8293.90      0.03      308.0000      1.4675
+            62   86    -79342.2       2.4        8279.67      0.02      290.5750      1.4225
+            62   88    -77057.3       2.4        8261.66      0.02      308.2000      1.2400
+            62   90    -74768.8       2.5        8244.10      0.02      358.7250      1.3425
+            62   92    -72461.6       2.5        8226.88      0.02      306.2000      6.3575
+            62   94    -69370.0      10.0        8205.07      0.06      344.1000     28.3200
+            62   96    -65210.0      80.0        8177.10      0.50      250.0000     60.5175
+            64   78    -66960.0      28.0        8190.26      0.20      305.0000     10.7700
+            64   80    -71760.0      28.0        8221.94      0.19      315.7500     10.4525
+            64   82    -76093.0       5.0        8249.56      0.03      388.5000      7.3000
+            64   84    -76275.8       2.8        8248.38      0.02      288.2000      1.7475
+            64   86    -75769.0       6.0        8242.64      0.04      288.2500      2.0250
+            64   88    -74714.2       2.5        8233.45      0.02      307.5250      1.8325
+            64   90    -73713.2       2.5        8224.84      0.02      321.8750      1.2375
+            64   92    -72542.2       2.5        8215.37      0.02      284.0500      1.2500
+            64   94    -70696.8       2.5        8201.86      0.02      311.5500      2.7250
+            64   96    -67948.6       2.6        8183.06      0.02      352.9500     20.1750
+            68   84    -60500.0      11.0        8119.35      0.07      302.2500      5.8950
+            68   86    -62612.0       5.0        8132.44      0.04      326.2500      3.5000
+            68   88    -64213.0      24.0        8141.91      0.16      331.7500      6.5675
+            68   90    -65304.0      25.0        8147.93      0.16      239.7500      8.9125
+            68   92    -66058.0      24.0        8151.69      0.15      218.0000      8.8700
+            68   94    -66343.0       3.0        8152.45      0.02      254.7250      6.1250
+            68   96    -65950.0       3.0        8149.06      0.02      274.5750      1.3800
+            68   98    -64931.6       2.5        8141.99      0.01      298.7750      1.3175
+            68  100    -62996.7       2.5        8129.63      0.01      362.0750      1.2625
+            68  102    -60114.6       2.8        8111.99      0.02      287.0000     35.0175
+            78   94    -21101.0      13.0        7839.21      0.07      214.5000      7.0500
+            78   96    -25319.0      12.0        7866.12      0.07      227.0000      6.4175
+            78   98    -28928.0      14.0        7888.96      0.08      212.7500      6.5475
+            78  100    -31998.0      11.0        7908.26      0.06      242.0000      8.7400
+            78  102    -34436.0      11.0        7923.61      0.06      247.5000      8.9525
+            78  104    -36169.0      16.0        7934.76      0.09      230.0000      8.0350
+            78  106    -37332.0      18.0        7942.56      0.10      228.2500      9.8100
+            78  108    -37864.0      22.0        7946.81      0.12      221.2250      8.9925
+            78  110    -37823.0       5.0        7947.91      0.03      303.9000      5.6600
+            78  112    -37323.0       6.0        7946.58      0.03      340.7750      2.0150
+            78  114    -36292.9       2.5        7942.51      0.01      350.0000      1.7050
+            78  116    -34763.1       0.9        7935.96      0.00      324.0000      1.0025
+            78  118    -32647.4       0.9        7926.54      0.00      333.0250      0.9735
+            78  120    -29908.0       3.0        7914.17      0.02      353.3250     10.0525
+            80   94     -6647.0      20.0        7749.82      0.11      190.5000    212.2000
+            80   96    -11779.0      14.0        7782.63      0.08      228.5000     30.1500
+            80   98    -16317.0      13.0        7811.37      0.07      232.2500     26.5500
+            80  100    -20245.0      14.0        7836.08      0.08      214.5000     26.1200
+            80  102    -23576.0      10.0        7856.97      0.05      223.2500     23.1900
+            80  104    -26349.0      10.0        7874.37      0.05      260.0000     24.0200
+            80  106    -28539.0      11.0        7888.26      0.06      256.7500     28.3000
+            80  108    -30202.0      12.0        7899.05      0.06      282.7500     32.7600
+            80  110    -31370.0      16.0        7907.02      0.08      302.2500     30.1500
+            80  112    -32011.0      16.0        7912.07      0.08      285.2500     23.9400
+            80  114    -32193.0      13.0        7914.64      0.06      303.0250     21.6200
+            80  116    -31826.7       2.9        7914.37      0.01      290.8750     13.5800
+            80  118    -30954.4       0.3        7911.55      0.00      310.8500      3.1800
+            80  120    -29504.1       0.4        7905.90      0.00      322.2750      3.1700
+            80  122    -27345.9       0.6        7896.85      0.00      286.7000     20.2400
+            82   98     -1939.0      21.0        7725.69      0.12      242.2500      9.2950
+            82  100     -6826.0      14.0        7756.34      0.08      239.7500      7.9125
+            82  102    -11045.0      14.0        7782.69      0.08      222.0000      6.5575
+            82  104    -14681.0      11.0        7805.34      0.06      215.7500      5.6850
+            82  106    -17815.0      11.0        7824.84      0.06      236.0000      5.3800
+            82  108    -20417.0      12.0        7841.13      0.06      234.7500      5.7550
+            82  110    -22556.0      13.0        7854.67      0.07      242.7500      6.6750
+            82  112    -24208.0      17.0        7865.42      0.09      252.7500      7.7850
+            82  114    -25361.0      14.0        7873.40      0.07      242.7500      7.5435
+            82  116    -26050.0      15.0        7878.88      0.07      263.8250      6.1150
+            82  118    -26243.0      11.0        7881.77      0.05      266.3250      4.7075
+            82  120    -25934.0       8.0        7882.12      0.04      285.3250      3.4025
+            82  122    -25109.7       1.2        7879.93      0.01      333.4750      2.0300
+            82  124    -23785.4       1.2        7875.36      0.01      332.8500      0.4550
+            82  126    -21748.5       1.2        7867.45      0.01      426.8250      5.0175
+            88  116      6054.0      15.0        7704.16      0.08      221.7500     16.4275
+            88  118      3565.0      18.0        7719.80      0.09      195.0000      8.2850
+            88  120      1714.0      15.0        7732.08      0.07      179.7500      7.9025
+            88  122       461.0      15.0        7741.28      0.07      180.2500      7.0525
+            88  124      -191.0      11.0        7747.47      0.05      175.5000      5.8525
+            88  126       101.0       9.0        7749.13      0.04      161.5000      4.2725
+            88  128      3291.0       9.0        7737.35      0.04      287.5000      3.9675
+            88  130      6651.0      11.0        7725.00      0.05      304.0000      4.5550
+            88  132     10273.0       9.0        7711.68      0.04      334.8750      4.0050
+            88  134     14321.0       5.0        7696.69      0.02      336.9750      2.7000
+            88  136     18827.2       2.2        7679.92      0.01      313.5000      1.5900
+            92  134     27329.0      13.0        7631.92      0.06      294.5000      8.1350
+            92  136     29225.0      15.0        7627.45      0.07      326.2500      5.8100
+            92  138     31615.0       5.0        7620.92      0.02      296.3000      4.1825
+            92  140     34610.7       2.2        7611.89      0.01      274.0250      1.5400
+            92  142     38146.6       1.8        7600.71      0.01      262.1000      0.9775
+            92  144     42446.3       1.8        7586.48      0.01      216.5000      1.1025
+TERMINAT !   Z   N    Imax(f7/2)  Parity   E*(f7/2)  ImaxdE   Parity   dE     Reference
+             8
+            20   22      6.0         1       3.189    11.0      -1    5.108   Eur. Phys. J. A16 (2003) 309
+            20   24      8.0         1       5.088    13.0      -1    5.480   S. Lenzi, Private communication
+            21   22      9.5        -1       3.124    13.5       1    5.709   Phys. Rev. C75, 054305 (2007); Phys. Rev. C75, 059904(E) (2007)
+            21   23     11.0         1       3.567    15.0      -1    5.574   Eur. Phys. J. A25 1 (2005)
+            21   24     11.5        -1       5.417    15.5       1    5.605   Acta Phys. Pol. B32 (2001) 747
+            22   23     13.5        -1       7.143    16.5       1   13.028   S. Lenzi, Private communication
+            22   24     14.0         1      10.034    17.0      -1   15.549   S. Lenzi, Private communication
+            23   24     15.5        -1      10.004    17.5       1   15.259   Nucl. Phys. A693 (2001) 517
+END_DATA !
diff --git a/nuc/ExpDatabase_Fortran77_v04.tar.gz b/nuc/ExpDatabase_Fortran77_v04.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..784164f85cbc4c63e632259bb29b09a4ad947632
Binary files /dev/null and b/nuc/ExpDatabase_Fortran77_v04.tar.gz differ
diff --git a/nuc/Makefile_ifc b/nuc/Makefile_ifc
new file mode 100644
index 0000000000000000000000000000000000000000..bea752980694aa0bf50d4b612f979bc9833d1e9e
--- /dev/null
+++ b/nuc/Makefile_ifc
@@ -0,0 +1,14 @@
+FORTRAN=gfortran
+#FLAGS=-r8 -C -w95
+FLAGS=
+
+all : main_f77
+
+main04.o : main04.f
+	$(FORTRAN) $(FLAGS) -c $<
+
+main_f77 : main04.o
+	$(FORTRAN) $(FLAGS) -o $@ $^
+
+clean :
+	-rm -f *.o *.mod *~ main
diff --git a/nuc/input04.f b/nuc/input04.f
new file mode 100644
index 0000000000000000000000000000000000000000..f10d39f494011d64ae26309c5bb84f0beb3d252b
--- /dev/null
+++ b/nuc/input04.f
@@ -0,0 +1,782 @@
+C
+C      The subroutine reads the database, allocates a number of arrays
+C      that are passed through the interface of this module, and fills
+C      out these arrays
+C
+C      Version 01: - Reads ATOMIC masses from Audi Wapstra.
+C                  - The electronic binding energy is removed in this
+C                    routine but is present in the data contained in the
+C                    file DataSet01.dat.
+C
+C      Version 02: - Reads NUCLEAR masses from a table that is a mix
+C                    of Audi-Wapstra 2003 and new Jyvaskyla masses.
+C                    The mass of a given nuclide is taken as the
+C                    weighted average of the original Audi-Wapstra
+C                    evaluation and the Jyvaskyla mass, see
+C
+C                   J.R. Taylor, An Introduction to Error Analysis
+C                   2nd Ed., University Science Books, 1997
+C
+C                  - Electronic correction has been removed from the
+C                    data contained in table DataSet02.dat. Also a bug
+C                    relative to deltaVpn data has been fixed.
+C
+C      Version 03: - Adds proton radius for spherical nuclei.
+C                  - Adds experimental error in binding energy of
+C                    spherical nuclei
+C                  - Adds flags for deformed nuclei, delta^(3)_n and
+C                    delta^(3)_p, and odd g.s.,which indicate if the
+C                    corresponding masses have been measured (1) or
+C                    evaluated (0).
+C
+C      Version 04: - Adds rough estimate of axial deformation of SD states
+C                  - Adds one nucleus in the list of SD states
+C
+C                        ------------------
+C
+C      Spherical nuclei:
+C        - IZsphe, INsphe: proton number Z and neutron number N
+C        - Bsphe: experimental binding energy
+C        - dBsphe: experimental error in binding energy
+C        - R0sphe: experimental diffraction radius
+C        - SIGsphe: experimental surface thickness
+C        - RMSspheCharge: experimental r.m.s charge radius
+C        - RMSspheProton: r.m.s proton radius computed from the charge radius
+C
+C      Deformed nuclei:
+C        - IZdefo, INdefo: proton number Z and neutron number N
+C        - Bdefo: experimental binding energy
+C        - dBdefo: experimental error in binding energy
+C        - b2defo: beta_2 value of g.s. quadrupole deformation (SLY4 calculation)
+C        - IsOKdefo: status of binding energy: 1 = measured, 0 = evaluated
+C
+C      Odd-even mass differences:
+C        - IZd3n, INd3n: proton number and neutron number related to the
+C                        neutron odd-even mass difference
+C        - DELd3n, ERRd3n: delta3 (neutrons) and relative error
+C        - IsOKd3n: status of binding energy: 1 = measured, 0 = evaluated
+C        - IZd3p, INd3p: proton number and neutron number related to the
+C                        proton odd-even mass difference
+C        - DELd3p, ERRd3p: delta3 (protons) and relative error
+C        - IsOKd3p: status of binding energy: 1 = measured, 0 = evaluated
+C
+C      Super-deformed states and fission isomers:
+C        - IZsupd, INsupd: proton number Z and neutron number N
+C        - Bsupd: experimental binding energy
+C        - ESDsupd: energy of the SD bandhead or fission isomer
+C        - b2supd: rough estimate of the beta_2 value of the SD state
+C
+C      Giant monopole resonance
+C        - IZmono, INmono: proton number Z and neutron number N
+C        - Emono: experimental energy
+c
+C      Giant dipole resonance
+C        - IZdipo, INdipo: proton number Z and neutron number N
+C        - Emdipo: experimental energy
+C
+C      Odd-mass nuclei:
+C        - IZodd, INodd: proton number Z and neutron number N
+C        - SPINodd: experimental g.s. spin
+C        - IPodd: experimental g.s. parity
+C        - IsOKodd: status of binding energy: 1 = measured, 0 = evaluated
+C
+C      One quasi-particle state in Odd-mass superheavy nuclei:
+C        - IZqpSH, INqpSH: proton number Z and neutron number N
+C        - NQPqpSH: number of q.p. states
+C        - EqpSH: experimental excitation energy
+C        - LABqpSH: experimental Nilsson label
+C        - SPINqpSH: experimental spin
+C        - IPqpSH: experimental parity
+C
+C      Position of the first 2+ state
+C        - IZtwop, INtwop: proton number Z and neutron number N
+C        - Etwop: experimental energy of the 2+ state
+C        - dEtwop: error bar on the energy
+C        - BE2twop: experimental BE2
+C        - dBE2twop: error bar on the BE2
+C
+C      Delta Vpn
+C        - IZdvpn, INdvpn: proton number Z and neutron number N
+C        - ExcMASdvpn: Mass excess
+C        - ExcERRdvpn: Error on mass excess
+C        - BnucMASdvpn: binding energy per nucleon B/A
+C        - BnucERRdvpn: error (in %) on B/A
+C        - DelVPNdvpn: delta Vpn
+C        - DelERRdvpn: error on delta Vpn
+C
+C      Terminating states:
+C        - IZterm, INterm: proton number Z and neutron number N
+C        - SPINterm, IP1term: spin Imax and parity for the f7/2 state
+C        - Eterm: energy of the f7/2 state
+C        - SpindETerm, IP2term: spin Imax and parity for the
+C                               d3/2^(-1)*f7/2 state
+C        - dEterm: experimental energy difference between the two
+C                  configurations
+C
+C      IMPORTANT REMARK
+C
+C          Experimental binding energies were extracted from Audi-Wapstra
+C          mass tables. BY DEFINITION, THEY DO INCLUDE A CONTRIBUTION FROM
+C          THE BINDING ENERGY OF THE ELECTRONS. To cancel out this effect
+C          and obtain the true NUCLEAR binding energy, a correction is added
+C          systematically, which goes (in MeV) as
+C
+C                    CorrELEC * Z^(2.39), CorrELEC = 1.433.10^(-5)
+C
+C
+      SUBROUTINE GetData()
+      PARAMETER
+     *         (NDSPHE=80,NDDEFO=250,NDSUPD=20,NDMONO=3,NDDIPO=3)
+      PARAMETER
+     *         (NDTWOP=600,NDTERM=20,ND_ODD=650,NDDVPN=150)
+      PARAMETER
+     *         (NDQPSH=5,NDSHEL=5,ND_D3N=250,ND_D3P=250)
+      CHARACTER
+     *          Keyword*8,LABqpSH*5
+C
+      COMMON
+     *      /NUCLEI_SPHERI/ IZsphe(1:NDSPHE),INsphe(1:NDSPHE),
+     *                                       IsOKsphe(1:NDSPHE)
+     *      /NUCLEI_DEFORM/ IZdefo(1:NDDEFO),INdefo(1:NDDEFO),
+     *                                       IsOKdefo(1:NDDEFO)
+     *      /NUCLEI_DELT3N/ IZd3n (1:ND_D3N),INd3n (1:ND_D3N),
+     *                                       IsOKd3n(1:ND_D3N)
+     *      /NUCLEI_DELT3P/ IZd3p (1:ND_D3P),INd3p (1:ND_D3P),
+     *                                       IsOKd3p(1:ND_D3P)
+     *      /NUCLEI_SDSTAT/ IZsupd(1:NDSUPD),INsupd(1:NDSUPD)
+     *      /NUCLEI_MONOPO/ IZmono(1:NDMONO),INmono(1:NDMONO)
+     *      /NUCLEI_DIPOLE/ IZdipo(1:NDDIPO),INdipo(1:NDDIPO)
+     *      /NUCLEI_ODDNUC/ IZodd (1:ND_ODD),INodd (1:ND_ODD),
+     *                                       IsOKodd(1:ND_ODD)
+     *      /NUCLEI_SHELEM/ IZqpSH(1:NDSHEL),INqpSH(1:NDSHEL)
+     *      /NUCLEI_TWOPLU/ IZtwop(1:NDTWOP),INtwop(1:NDTWOP)
+     *      /NUCLEI_TERMIN/ IZterm(1:NDTERM),INterm(1:NDTERM)
+     *      /NUCLEI_DELTPN/ IZdvpn(1:NDDVPN),INdvpn(1:NDDVPN)
+      COMMON
+     *      /DATABA_SIZVEC/ NUMsphe, NUModd,  NUMdefo,
+     *                      NUMd3n,  NUMd3p,  NUMsupd,
+     *                      NUMmono, NUMdipo, NUMtwop,
+     *                      NUMdvpn, NUMterm, NUMqpSH
+      COMMON
+     *      /DATABA_SPHERI/ Bsphe(1:NDSPHE),dBsphe(1:NDSPHE),
+     *                      R0sphe(1:NDSPHE),SIGsphe(1:NDSPHE),
+     *                      RMSspheCharge(1:NDSPHE),
+     *                      RMSspheProton(1:NDSPHE)
+      COMMON
+     *      /DATABA_DEFORM/ Bdefo(1:NDDEFO),dBdefo(1:NDDEFO),
+     *                      b2defo(1:NDDEFO)
+      COMMON
+     *      /DATABA_DELT3N/ DELd3n(1:ND_D3N),ERRd3n(1:ND_D3N)
+     *      /DATABA_DELT3P/ DELd3p(1:ND_D3P),ERRd3p(1:ND_D3P)
+      COMMON
+     *      /DATABA_SDSTAT/ Bsupd(1:NDSUPD),ESDsupd(1:NDSUPD),
+     *                                      b2supd(1:NDSUPD)
+      COMMON
+     *      /DATABA_MONOPO/ Emono(1:NDMONO),dEmono(1:NDMONO)
+      COMMON
+     *      /DATABA_DIPOLE/ Edipo(1:NDDIPO)
+      COMMON
+     *      /DATABA_ODDSPI/ SPINodd(1:ND_ODD)
+     *      /DATABA_ODDPAR/ IPodd(1:ND_ODD)
+      COMMON
+     *      /DATABA_QPNUMB/ NQPqpSH(1:NDSHEL)
+     *      /DATABA_QPEEXC/ EqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPSPIN/ SPINqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPPARI/ IPqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPLABL/ LABqpSH(1:NDSHEL,1:NDQPSH)
+      COMMON
+     *      /DATABA_TWOPLU/ Etwop(1:NDTWOP),dEtwop(1:NDTWOP),
+     *                      BE2twop(1:NDTWOP),dBE2twop(1:NDTWOP)
+      COMMON
+     *      /DATABA_DELTPN/ ExcMASdvpn(1:NDDVPN),
+     *                      ExcERRdvpn(1:NDDVPN),
+     *                      BnucMASdvpn(1:NDDVPN),
+     *                      BnucERRdvpn(1:NDDVPN),
+     *                      DelVPNdvpn(1:NDDVPN),
+     *                      DelERRdvpn(1:NDDVPN)
+      COMMON
+     *      /DATABA_TERMIN/ SPINterm(1:NDTERM),Eterm(1:NDTERM),
+     *                      SPINdEterm(1:NDTERM),dEterm(1:NDTERM)
+     *      /PARITY_TERMIN/ IP1Term(1:NDTERM),IP2term(1:NDTERM)
+C
+      n_unit = 15
+C
+      OPEN (n_unit, FILE='DataSet04.dat', ACTION='READ', IOSTAT=ierror)
+      IF (ierror .NE. 0) STOP 'Impossible to read: ./DataSet04.dat'
+C
+      Keyword = 'XXXXXXXX'
+C
+C      Scanning of the database proceeds by keywords
+C
+ 1    CONTINUE
+C
+      READ (n_unit,*) Keyword
+C
+      IF (Keyword .EQ. 'END_DATA') THEN
+          CLOSE (n_unit)
+          RETURN
+      END IF
+C
+      IF (Keyword .EQ. 'SPHERICA') THEN
+C
+          READ (n_unit,*) NUMsphe
+C
+          DO i=1, NUMsphe
+              READ (n_unit,*) IZsphe(i),INsphe(i),Bsphe(i),
+     *                        dBsphe(i),R0sphe(i),SIGsphe(i),
+     *                        RMSspheCharge(i),RMSspheProton(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'DEFORMED') THEN
+C
+          READ (n_unit,*) NUMdefo
+C
+          DO i=1, NUMdefo
+              READ (n_unit,*) IZdefo(i),INdefo(i),Bdefo(i),
+     *                        dBdefo(i),b2defo(i),IsOKdefo(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'DELTA3_N') THEN
+C
+          READ (n_unit,*) NUMd3n
+C
+          DO i=1, NUMd3n
+              READ (n_unit,*) IZd3n(i),INd3n(i),DELd3n(i),ERRd3n(i),
+     *                        IsOKd3n(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'DELTA3_P') THEN
+C
+          READ (n_unit,*) NUMd3p
+C
+          DO i=1, NUMd3p
+              READ (n_unit,*) INd3p(i),IZd3p(i),DELd3p(i),ERRd3p(i),
+     *                        IsOKd3p(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'SDSTATES') THEN
+C
+          READ (n_unit,*) NUMsupd
+C
+          DO i=1, NUMsupd
+              READ (n_unit,*) IZsupd(i),INsupd(i),Bsupd(i),ESDsupd(i),
+     *                                                     b2supd(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'MONOPRES') THEN
+C
+          READ (n_unit,*) NUMmono
+C
+          DO i=1, NUMmono
+              READ (n_unit,*) IZmono(i),INmono(i),Emono(i),dEmono(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'DIPOLRES') THEN
+C
+          READ (n_unit,*) NUMdipo
+C
+          DO i=1, NUMdipo
+              READ (n_unit,*) IZdipo(i),INdipo(i),Edipo(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'ODDNUCLE') THEN
+C
+          READ (n_unit,*) NUModd
+C
+          DO i=1, NUModd
+              READ (n_unit,*) IZodd(i),INodd(i),SPINodd(i),IPodd(i),
+     *                        IsOKodd(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'QPSHELEM') THEN
+C
+          READ (n_unit,*) NUMqpSH
+C
+          DO i=1, NUMqpSH
+              READ (n_unit,*) IZqpSH(i),INqpSH(i),NQPqpSH(i),
+     *                        EqpSH(i,1),LABqpSH(i,1),
+     *                        SPINqpSH(i,1),IPqpSH(i,1)
+              DO j=2,NQPqpSH(i)
+                 READ (n_unit,*) EqpSH(i,j),LABqpSH(i,j),
+     *                           SPINqpSH(i,j),IPqpSH(i,j)
+              END DO
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. '2+ENERGY') THEN
+C
+          READ (n_unit,*) NUMtwop
+C
+          DO i=1, NUMtwop
+              READ (n_unit,*) IZtwop(i),INtwop(i),Etwop(i),dEtwop(i),
+     *                        BE2twop(i),dBE2twop(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'DELTAVPN') THEN
+C
+          READ (n_unit,*) NUMdvpn
+C
+          DO i=1, NUMdvpn
+              READ (n_unit,*) IZdvpn(i),INdvpn(i),
+     *                        ExcMASdvpn(i), ExcERRdvpn(i),
+     *                        BnucMASdvpn(i), BnucERRdvpn(i),
+     *                        DelVPNdvpn(i), DelERRdvpn(i)
+          END DO
+C
+      END IF
+C
+      IF (Keyword .EQ. 'TERMINAT') THEN
+C
+          READ (n_unit,*) NUMterm
+C
+          DO i=1, NUMterm
+              READ (n_unit,*) IZterm(i),INterm(i),SPINterm(i),
+     *                        IP1term(i),Eterm(i),SpindETerm(i),
+     *                        IP2term(i),dEterm(i)
+          END DO
+C
+      END IF
+C
+      GO TO 1
+C
+      END
+
+C      This subroutine only prints the data so that the user can verify
+C      that everything has been read properly.
+
+      SUBROUTINE PrintData()
+      PARAMETER
+     *         (NDSPHE=80,NDDEFO=250,NDSUPD=20,NDMONO=3,NDDIPO=3)
+      PARAMETER
+     *         (NDTWOP=600,NDTERM=20,ND_ODD=650,NDDVPN=150)
+      PARAMETER
+     *         (NDQPSH=5,NDSHEL=5,ND_D3N=250,ND_D3P=250)
+      PARAMETER
+     *         (NDVALS=4000,NDPROT=140,NDNEUT=200)
+      CHARACTER
+     *          Keyword*8,LABqpSH*5
+C
+      COMMON
+     *       /WAPDAT/ BINDNG(0:NDPROT,0:NDNEUT),
+     *                ERRORB(0:NDPROT,0:NDNEUT),
+     *                IVALID(0:NDPROT,0:NDNEUT)
+      COMMON
+     *       /OEMALL/ OEMVAL(1:NDPROT,1:NDNEUT,0:1)
+C
+      COMMON
+     *      /NUCLEI_SPHERI/ IZsphe(1:NDSPHE),INsphe(1:NDSPHE),
+     *                                       IsOKsphe(1:NDSPHE)
+     *      /NUCLEI_DEFORM/ IZdefo(1:NDDEFO),INdefo(1:NDDEFO),
+     *                                       IsOKdefo(1:NDDEFO)
+     *      /NUCLEI_DELT3N/ IZd3n (1:ND_D3N),INd3n (1:ND_D3N),
+     *                                       IsOKd3n(1:ND_D3N)
+     *      /NUCLEI_DELT3P/ IZd3p (1:ND_D3P),INd3p (1:ND_D3P),
+     *                                       IsOKd3p(1:ND_D3P)
+     *      /NUCLEI_SDSTAT/ IZsupd(1:NDSUPD),INsupd(1:NDSUPD),
+     *                                       b2supd(1:NDSUPD)
+     *      /NUCLEI_MONOPO/ IZmono(1:NDMONO),INmono(1:NDMONO)
+     *      /NUCLEI_DIPOLE/ IZdipo(1:NDDIPO),INdipo(1:NDDIPO)
+     *      /NUCLEI_ODDNUC/ IZodd (1:ND_ODD),INodd (1:ND_ODD),
+     *                                       IsOKodd(1:ND_ODD)
+     *      /NUCLEI_SHELEM/ IZqpSH(1:NDSHEL),INqpSH(1:NDSHEL)
+     *      /NUCLEI_TWOPLU/ IZtwop(1:NDTWOP),INtwop(1:NDTWOP)
+     *      /NUCLEI_DELTPN/ IZdvpn(1:NDDVPN),INdvpn(1:NDDVPN)
+     *      /NUCLEI_TERMIN/ IZterm(1:NDTERM),INterm(1:NDTERM)
+C
+      COMMON
+     *      /DATABA_SIZVEC/ NUMsphe, NUModd,  NUMdefo,
+     *                      NUMd3n,  NUMd3p,  NUMsupd,
+     *                      NUMmono, NUMdipo, NUMtwop,
+     *                      NUMdvpn, NUMterm, NUMqpSH
+      COMMON
+     *      /DATABA_SPHERI/ Bsphe(1:NDSPHE),dBsphe(1:NDSPHE),
+     *                      R0sphe(1:NDSPHE),SIGsphe(1:NDSPHE),
+     *                      RMSspheCharge(1:NDSPHE),
+     *                      RMSspheProton(1:NDSPHE)
+      COMMON
+     *      /DATABA_DEFORM/ Bdefo(1:NDDEFO),dBdefo(1:NDDEFO),
+     *                      b2defo(1:NDDEFO)
+      COMMON
+     *      /DATABA_DELT3N/ DELd3n(1:ND_D3N),ERRd3n(1:ND_D3N)
+     *      /DATABA_DELT3P/ DELd3p(1:ND_D3P),ERRd3p(1:ND_D3P)
+      COMMON
+     *      /DATABA_SDSTAT/ Bsupd(1:NDSUPD),ESDsupd(1:NDSUPD),
+     *                                      b2supd(1:NDSUPD)
+      COMMON
+     *      /DATABA_MONOPO/ Emono(1:NDMONO),dEmono(1:NDMONO)
+      COMMON
+     *      /DATABA_DIPOLE/ Edipo(1:NDDIPO)
+      COMMON
+     *      /DATABA_ODDSPI/ SPINodd(1:ND_ODD)
+     *      /DATABA_ODDPAR/ IPodd(1:ND_ODD)
+      COMMON
+     *      /DATABA_QPNUMB/ NQPqpSH(1:NDSHEL)
+     *      /DATABA_QPEEXC/ EqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPSPIN/ SPINqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPPARI/ IPqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPLABL/ LABqpSH(1:NDSHEL,1:NDQPSH)
+      COMMON
+     *      /DATABA_TWOPLU/ Etwop(1:NDTWOP),dEtwop(1:NDTWOP),
+     *                      BE2twop(1:NDTWOP),dBE2twop(1:NDTWOP)
+      COMMON
+     *      /DATABA_DELTPN/ ExcMASdvpn(1:NDDVPN),
+     *                      ExcERRdvpn(1:NDDVPN),
+     *                      BnucMASdvpn(1:NDDVPN),
+     *                      BnucERRdvpn(1:NDDVPN),
+     *                      DelVPNdvpn(1:NDDVPN),
+     *                      DelERRdvpn(1:NDDVPN)
+      COMMON
+     *      /DATABA_TERMIN/ SPINterm(1:NDTERM),Eterm(1:NDTERM),
+     *                      SPINdEterm(1:NDTERM),dEterm(1:NDTERM)
+     *      /PARITY_TERMIN/ IP1Term(1:NDTERM),IP2term(1:NDTERM)
+C
+      Keyword = 'SPHERICA'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUMsphe
+C
+      DO i=1, NUMsphe
+         WRITE (6,'(9X,2I5,1X,6F11.5)')
+     *                  IZsphe(i),INsphe(i),
+     *                  Bsphe(i),dBsphe(i),
+     *                  R0sphe(i),SIGsphe(i),
+     *                  RMSspheCharge(i),
+     *                  RMSspheProton(i)
+      END DO
+C
+      Keyword = 'DEFORMED'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(10X,I5)') NUMdefo
+C
+      DO i=1, NUMdefo
+         WRITE (6,'(9X,2I5,F12.5,2F11.5,i4)') IZdefo(i),INdefo(i),
+     *                                        Bdefo(i),dBdefo(i),
+     *                                        b2defo(i),IsOKdefo(i)
+      END DO
+C
+      Keyword = 'DELTA3_N'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(10X,I5)') NUMd3n
+C
+      DO i=1, NUMd3n
+         WRITE (6,'(9X,2I5,2F12.6,i4)') IZd3n(i),INd3n(i),
+     *                                  DELd3n(i),ERRd3n(i),
+     *                                  IsOKd3n(i)
+      END DO
+C
+      Keyword = 'DELTA3_P'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(10X,I5)') NUMd3p
+C
+      DO i=1, NUMd3p
+         WRITE (6,'(9X,2I5,2F12.6,i4)') INd3p(i),IZd3p(i),
+     *                                  DELd3p(i),ERRd3p(i),
+     *                                  IsOKd3p(i)
+      END DO
+C
+      Keyword = 'SDSTATES'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUMsupd
+C
+      DO i=1, NUMsupd
+         WRITE (6,'(9X,2I5,F12.5,2F9.3)') IZsupd(i),INsupd(i),
+     *                                    Bsupd(i),ESDsupd(i),
+     *                                             b2supd(i)
+      END DO
+C
+      Keyword = 'MONOPRES'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUMmono
+
+      DO i=1, NUMmono
+         WRITE (6,'(9X,2I5,1X,F9.2,F10.2)') IZmono(i),INmono(i),
+     *                                       Emono(i),dEmono(i)
+      END DO
+C
+      Keyword = 'DIPOLRES'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUMdipo
+C
+      DO i=1, NUMdipo
+         WRITE (6,'(9X,2I5,1X,F9.2)') IZdipo(i),INdipo(i),Edipo(i)
+      END DO
+C
+      Keyword = 'ODDNUCLE'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUModd
+C
+      DO i=1, NUModd
+         WRITE (6,'(9X,2I5,F6.1,I5,i4)') IZodd(i),INodd(i),
+     *                                   SPINodd(i),IPodd(i),
+     *                                   IsOKodd(i)
+      END DO
+C
+      Keyword = 'QPSHELEM'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUMqpSH
+C
+      DO i=1, NUMqpSH
+         WRITE (6,'(9X,2I5,I4,F10.5,4X,A5,F8.1,5X,I2)')
+     *              IZqpSH(i),INqpSH(i),NQPqpSH(i),
+     *                        EqpSH(i,1),LABqpSH(i,1),
+     *                        SPINqpSH(i,1),IPqpSH(i,1)
+         DO j=2,NQPqpSH(i)
+            WRITE (6,'(23X,F10.5,4X,A5,F8.1,5X,I2)')
+     *              EqpSH(i,j),LABqpSH(i,j),
+     *              SPINqpSH(i,j),IPqpSH(i,j)
+         END DO
+      END DO
+C
+      Keyword = '2+ENERGY'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUMtwop
+C
+      DO i=1, NUMtwop
+         WRITE (6,'(9X,2I5,4F11.5)') IZtwop(i),INtwop(i),Etwop(i),
+     *                               dEtwop(i),BE2twop(i),dBE2twop(i)
+      END DO
+C
+      Keyword = 'DELTAVPN'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUMdvpn
+C
+      DO i=1, NUMdvpn
+         WRITE (6,'(9X,2I5,F12.1,F10.1,F15.2,F10.2,F14.4,F12.4)')
+     *              IZdvpn(i),INdvpn(i),
+     *                        ExcMASdvpn(i), ExcERRdvpn(i),
+     *                        BnucMASdvpn(i), BnucERRdvpn(i),
+     *                        DelVPNdvpn(i), DelERRdvpn(i)
+      END DO
+C
+      Keyword = 'TERMINAT'
+      WRITE (6,'(A8)') Keyword
+      WRITE (6,'(9X,I5)') NUMterm
+C
+      DO i=1, NUMterm
+         WRITE (6,'(9X,2I5,F9.1,I10,F12.3,F8.1,I8,F9.3)')
+     *              IZterm(i),INterm(i),SPINterm(i),IP1term(i),
+     *              Eterm(i),SpindETerm(i),IP2term(i),dEterm(i)
+      END DO
+C
+      RETURN
+      END
+C
+C      This subroutine only initializes all the common blocks
+C
+      SUBROUTINE InitializeData()
+      PARAMETER
+     *         (NDSPHE=80,NDDEFO=250,NDSUPD=20,NDMONO=3,NDDIPO=3)
+      PARAMETER
+     *         (NDTWOP=600,NDTERM=20,ND_ODD=650,NDDVPN=150)
+      PARAMETER
+     *         (NDQPSH=5,NDSHEL=5,ND_D3N=250,ND_D3P=250)
+C
+      CHARACTER
+     *          LABqpSH*5
+C
+      COMMON
+     *      /NUCLEI_SPHERI/ IZsphe(1:NDSPHE),INsphe(1:NDSPHE),
+     *                                       IsOKsphe(1:NDSPHE)
+     *      /NUCLEI_DEFORM/ IZdefo(1:NDDEFO),INdefo(1:NDDEFO),
+     *                                       IsOKdefo(1:NDDEFO)
+     *      /NUCLEI_DELT3N/ IZd3n (1:ND_D3N),INd3n (1:ND_D3N),
+     *                                       IsOKd3n(1:ND_D3N)
+     *      /NUCLEI_DELT3P/ IZd3p (1:ND_D3P),INd3p (1:ND_D3P),
+     *                                       IsOKd3p(1:ND_D3P)
+     *      /NUCLEI_SDSTAT/ IZsupd(1:NDSUPD),INsupd(1:NDSUPD)
+     *      /NUCLEI_MONOPO/ IZmono(1:NDMONO),INmono(1:NDMONO)
+     *      /NUCLEI_DIPOLE/ IZdipo(1:NDDIPO),INdipo(1:NDDIPO)
+     *      /NUCLEI_ODDNUC/ IZodd (1:ND_ODD),INodd (1:ND_ODD),
+     *                                       IsOKodd(1:ND_ODD)
+     *      /NUCLEI_SHELEM/ IZqpSH(1:NDSHEL),INqpSH(1:NDSHEL)
+     *      /NUCLEI_TWOPLU/ IZtwop(1:NDTWOP),INtwop(1:NDTWOP)
+     *      /NUCLEI_DELTPN/ IZdvpn(1:NDDVPN),INdvpn(1:NDDVPN)
+     *      /NUCLEI_TERMIN/ IZterm(1:NDTERM),INterm(1:NDTERM)
+C
+      COMMON
+     *      /DATABA_SIZVEC/ NUMsphe, NUModd,  NUMdefo,
+     *                      NUMd3n,  NUMd3p,  NUMsupd,
+     *                      NUMmono, NUMdipo, NUMtwop,
+     *                      NUMdvpn, NUMterm, NUMqpSH
+      COMMON
+     *      /DATABA_SPHERI/ Bsphe(1:NDSPHE),dBsphe(1:NDSPHE),
+     *                      R0sphe(1:NDSPHE),SIGsphe(1:NDSPHE),
+     *                      RMSspheCharge(1:NDSPHE),
+     *                      RMSspheProton(1:NDSPHE)
+      COMMON
+     *      /DATABA_DEFORM/ Bdefo(1:NDDEFO),dBdefo(1:NDDEFO),
+     *                      b2defo(1:NDDEFO)
+      COMMON
+     *      /DATABA_DELT3N/ DELd3n(1:ND_D3N),ERRd3n(1:ND_D3N)
+     *      /DATABA_DELT3P/ DELd3p(1:ND_D3P),ERRd3p(1:ND_D3P)
+      COMMON
+     *      /DATABA_SDSTAT/ Bsupd(1:NDSUPD),ESDsupd(1:NDSUPD),
+     *                                      b2supd(1:NDSUPD)
+      COMMON
+     *      /DATABA_MONOPO/ Emono(1:NDMONO),dEmono(1:NDMONO)
+      COMMON
+     *      /DATABA_DIPOLE/ Edipo(1:NDDIPO)
+      COMMON
+     *      /DATABA_ODDSPI/ SPINodd(1:ND_ODD)
+     *      /DATABA_ODDPAR/ IPodd(1:ND_ODD)
+      COMMON
+     *      /DATABA_QPNUMB/ NQPqpSH(1:NDSHEL)
+     *      /DATABA_QPEEXC/ EqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPSPIN/ SPINqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPPARI/ IPqpSH(1:NDSHEL,1:NDQPSH)
+     *      /DATABA_QPLABL/ LABqpSH(1:NDSHEL,1:NDQPSH)
+      COMMON
+     *      /DATABA_TWOPLU/ Etwop(1:NDTWOP),dEtwop(1:NDTWOP),
+     *                      BE2twop(1:NDTWOP),dBE2twop(1:NDTWOP)
+      COMMON
+     *      /DATABA_DELTPN/ ExcMASdvpn(1:NDDVPN),
+     *                      ExcERRdvpn(1:NDDVPN),
+     *                      BnucMASdvpn(1:NDDVPN),
+     *                      BnucERRdvpn(1:NDDVPN),
+     *                      DelVPNdvpn(1:NDDVPN),
+     *                      DelERRdvpn(1:NDDVPN)
+      COMMON
+     *      /DATABA_TERMIN/ SPINterm(1:NDTERM),Eterm(1:NDTERM),
+     *                      SPINdEterm(1:NDTERM),dEterm(1:NDTERM)
+     *      /PARITY_TERMIN/ IP1Term(1:NDTERM),IP2term(1:NDTERM)
+C
+      NUMsphe = 1
+      NUModd = 1
+      NUMdefo = 1
+      NUMsupd = 1
+      NUMmono = 1
+      NUMdipo = 1
+      NUMtwop = 1
+      NUMdvpn = 1
+      NUMterm = 1
+      NUMqpSH = 1
+C
+      DO i=1,NDSPHE
+         IZsphe(i) = 82
+         INsphe(i) = 126
+         Bsphe(i) = 0.0
+         dBsphe(i) = 0.0
+         R0sphe(i) = 0.0
+         SIGsphe(i) = 0.0
+         RMSspheCharge(i) = 0.0
+         RMSspheProton(i) = 0.0
+      END DO
+C
+      DO i=1,NDDEFO
+         IZdefo(i) = 82
+         INdefo(i) = 126
+         Bdefo(i) = 0.0
+         dBdefo(i) = 0.0
+         b2defo(i) = 0.0
+         IsOKdefo(i) = 0
+      END DO
+C
+      DO i=1,ND_D3N
+         IZd3n(i) = 82
+         INd3n(i) = 126
+         DELd3n(i) = 0.0
+         ERRd3n(i) = 0.0
+         IsOKd3n(i) = 0
+      END DO
+C
+      DO i=1,ND_D3P
+         IZd3p(i) = 82
+         INd3p(i) = 126
+         DELd3p(i) = 0.0
+         ERRd3p(i) = 0.0
+         IsOKd3p(i) = 0
+      END DO
+C
+      DO i=1,NDSUPD
+         IZsupd(i) = 82
+         INsupd(i) = 126
+         Bsupd(i) = 0.0
+         ESDsupd(i) = 0.0
+         b2supd(i) = 0.7
+      END DO
+C
+      DO i=1,NDMONO
+         IZmono(i) = 82
+         INmono(i) = 126
+         Emono(i) = 0.0
+         dEmono(i) = 0.0
+      END DO
+C
+      DO i=1,NDDIPO
+         IZdipo(i) = 82
+         INdipo(i) = 126
+         Edipo(i) = 0.0
+      END DO
+C
+      DO i=1,ND_ODD
+         IZodd(i) = 82
+         INodd(i) = 126
+         SPINodd(i) = 0.0
+         IPodd(i) = 0
+         IsOKodd(i) = 0
+      END DO
+C
+      DO i=1,NDSHEL
+         IZqpSH(i) = 82
+         INqpSH(i) = 126
+         NQPqpSH(i) = 1
+         DO j=1,NDQPSH
+            EqpSH(i,j)=0.0
+            SPINqpSH(i,j)=0.5
+            IPqpSH(i,j)=+1
+            LABqpSH(i,j)='XXXXX'
+         END DO
+      END DO
+C
+      DO i=1,NDTWOP
+         IZtwop(i) = 82
+         INtwop(i) = 126
+         Etwop(i) = 0.0
+         dEtwop(i) = 0.0
+         BE2twop(i) = 0.0
+         dBE2twop(i) = 0.0
+      END DO
+C
+      DO i=1,NDDVPN
+         IZdvpn(i) = 82
+         INdvpn(i) = 126
+         ExcMASdvpn(i) = 0.0
+         ExcERRdvpn(i) = 0.0
+         BnucMASdvpn(i) = 0.0
+         BnucERRdvpn(i) = 0.0
+         DelVPNdvpn(i) = 0.0
+         DelERRdvpn(i) = 0.0
+      END DO
+C
+      DO i=1,NDTERM
+         IZterm(i) = 82
+         INterm(i) = 126
+         SPINterm(i) = 0.0
+         Eterm(i) = 0.0
+         SPINdEterm(i) = 0.0
+         dEterm(i) = 0.0
+         IP1term(i) = 0
+         IP2term(i) = 0
+      END DO
+C
+      RETURN
+      END
+
diff --git a/nuc/main04.f b/nuc/main04.f
new file mode 100644
index 0000000000000000000000000000000000000000..6acca5720d794d70856cbfe5bae6f876a7a59fea
--- /dev/null
+++ b/nuc/main04.f
@@ -0,0 +1,20 @@
+      PROGRAM main
+      COMMON
+     *      /DATABA_SIZVEC/ NUMsphe, NUModd,  NUMdefo,
+     *                      NUMd3n,  NUMd3p,  NUMsupd,
+     *                      NUMmono, NUMdipo, NUMtwop,
+     *                      NUMdvpn, NUMterm, NUMqpSH
+C
+      CALL InitializeData()
+C
+      CALL GetData()
+C
+      CALL PrintData()
+C
+      STOP
+C
+      END
+C
+      INCLUDE 'input04.f'
+
+