diff --git a/CMakeLists.txt b/CMakeLists.txt
index e24a55b9592c0917db26acdab4fbdaf89a27d469..c06fdca0aba3e9c600b3a14919ccaff83f21c148 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,171 +1,146 @@
 cmake_minimum_required (VERSION 3.9)
 # we would need 3.16 to have CMP0097 for external subproject submodule (non) support
 
-# prevent in-source builds and give warning message
-if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") 
-  message (FATAL_ERROR "In-source builds are disabled.
-    Please create a build-dir and use `cmake <source-dir>` inside it.
-    NOTE: cmake will now create CMakeCache.txt and CMakeFiles/*.
-          You must delete them, or cmake will refuse to work.")
-endif ()
-
-project (
-  corsika
-  VERSION 8.0.0
-  DESCRIPTION "CORSIKA C++ project"
-  LANGUAGES CXX
-  )
-
-include (FeatureSummary)
-
-# as long as there still are modules using it:
-enable_language (Fortran)
-
-# TEMPORARY: this should be removed, the sanitizers should be always enabled
-option (WITH_CORSIKA_SANITIZERS_ENABLED "temporary way to globally disable sanitizers until the currently failing tests are fixed" OFF)
-add_feature_info (CORSIKA_SANITIZERS_ENABLED WITH_CORSIKA_SANITIZERS_ENABLED "Switch to run c++ sanitzers on CORSIKA objects and code.")
-
-option (WITH_COAST "Flag to switch on/off COAST (reverse) interface" OFF)
-add_feature_info (COAST WITH_COAST "The COAST interface, so that you can write C8 processes to run inside C7.")
-
-# HISTORY option selection
-option (WITH_HISTORY "Flag to switch on/off HISTORY" ON)
-add_feature_info (HISTORY WITH_HISTORY "The Foo feature provides very cool stuffdddd.")
-
-# check for python
-set (Python_ADDITIONAL_VERSIONS 3)
-find_package (PythonInterp 3 REQUIRED)
-
-# ignore many irrelevant Up-to-date messages during install
-set (CMAKE_INSTALL_MESSAGE LAZY)
-
-# directory for local cmake modules
-set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
-include (CorsikaUtilities) # a few cmake function
-
+#+++++++++++++++++++++++++++++
+# project name
+#
+project( CORSIKA8_Modules_Tests_Examples )
+#
+#
+#+++++++++++++++++++++++++++++
+# warn user if system is not UNIX
+#
+if(NOT UNIX)
+  message(FATAL_ERROR "| CORSIKA8 > This is an unsupported system.")
+endif()
+#
+#+++++++++++++++++++++++++++++
+# cmake path dir
+#
+SET(CORSIKA8_CMAKE_DIR "${PROJECT_SOURCE_DIR}/cmake")
+SET(CMAKE_MODULE_PATH  "${CORSIKA8_CMAKE_DIR}" ${CMAKE_MODULE_PATH})
+SET(CMAKE_VERBOSE_MAKEFILE  ON)
+#
+#+++++++++++++++++++++++++++++
+# check if compiler is C++17 compliant
+#
+include(CheckCXXCompilerFlag)
+CHECK_CXX_COMPILER_FLAG("--std=c++17" COMPILER_SUPPORTS_CXX17)
+if(NOT COMPILER_SUPPORTS_CXX17)
+ message(FATAL "| CORSIKA8 > The compiler ${CMAKE_CXX_COMPILER} has no C++17 support. Please use a different C++ compiler.")
+endif()
+
+# set CXX compile flags and options and warning settings
 set (CMAKE_CXX_STANDARD 17)
 set (CMAKE_CXX_EXTENSIONS OFF)
-enable_testing ()
-set (CTEST_OUTPUT_ON_FAILURE 1)
-list (APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
-
-# Set the possible values of build type for cmake-gui and command line check
-set (ALLOWED_BUILD_TYPES Debug Release MinSizeRel RelWithDebInfo Coverage)
-set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${ALLOWED_BUILD_TYPES})
-
-# Set a default build type if none was specified
-# by default: "Debug", if local ".git" directory is found, otherwise "Release"
-set (DEFAULT_BUILD_TYPE "Release")
-if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
-  set (DEFAULT_BUILD_TYPE "Debug")
-endif ()
-
-if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
-  message (STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as no other was specified.")
-  set (CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE
-      STRING "Choose the type of build." FORCE)
-else (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
-  # Ignore capitalization when build type is selected manually and check for valid setting
-  string (TOLOWER ${CMAKE_BUILD_TYPE} SELECTED_LOWER)
-  string (TOLOWER "${ALLOWED_BUILD_TYPES}" BUILD_TYPES_LOWER)
-  if (NOT SELECTED_LOWER IN_LIST BUILD_TYPES_LOWER)
-    message (FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE} [allowed: ${ALLOWED_BUILD_TYPES}]")
-  endif ()
-  message (STATUS "Build type is: ${CMAKE_BUILD_TYPE}")
-endif (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
 
 # enable warnings and disallow non-standard language
 # configure the various build types here, too
 # FYI: optimizer flags: -O2 would not trade speed for size, neither O2/3 use fast-math
-# debug: O0, relwithdebinfo: 02, release: O3, minsizerel: Os (all defaults), coverage -> O0
+# debug: O0, relwithdebinfo: 02, release: O3, minsizerel: Os (all defaults)
 set (CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers")
 set (CMAKE_Fortran_FLAGS "-std=legacy -Wfunction-elimination")
 
-# setup coverage build type
-set (CMAKE_CXX_FLAGS_COVERAGE "-g --coverage")
-set (CMAKE_EXE_LINKER_FLAGS_COVERAGE "--coverage")
-set (CMAKE_SHARED_LINKER_FLAGS_COVERAGE "--coverage")
-
 # clang produces a lot of unecessary warnings without this:
 add_compile_options ("$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-nonportable-include-path>")
 
-# set a flag to inform code that we are in debug mode
-set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
-
-# COAST - interface, this requires CORSIKA7 to be installed first
-# COAST will allow you to program code in CORSIKA8 and execute it inside CORSIKA7
-if (WITH_COAST)
-  message (STATUS "Compiling CORSIKA8 for the use with COAST/corsika7.")
-  add_compile_options ("-fPIC")
-endif ()
-
-# targets and settings needed to generate coverage reports
-if (CMAKE_BUILD_TYPE STREQUAL Coverage)
-  find_package (Perl REQUIRED)
-
-  # compile coverage under -O2 to remove unused functions
-  #  add_compile_options ("-O2")
-  # compile coverage under -O0 to avoid any optimization, function elimation etc.
-  add_compile_options ("-O0")
-  
-  set (GCOV gcov CACHE STRING "gcov executable" FORCE)
-  set (LCOV_BIN_DIR "${PROJECT_SOURCE_DIR}/ThirdParty/lcov/bin")
-  # collect coverage data
-  add_custom_command (
-    OUTPUT raw-coverage.info
-    COMMAND ${CMAKE_COMMAND} -E echo "Note: you need to run ctest at least once to generate the coverage data"
-    COMMAND ${LCOV_BIN_DIR}/lcov --gcov-tool=${GCOV} --directory . --capture --output-file raw-coverage.info
-    )
-  # remove uninteresting entries
-  add_custom_command (
-    OUTPUT coverage.info
-    COMMAND ${LCOV_BIN_DIR}/lcov -q --remove raw-coverage.info "*/usr/*" --output-file coverage2.info
-    COMMAND ${LCOV_BIN_DIR}/lcov --remove coverage2.info "*/ThirdParty/*" --output-file coverage.info
-    COMMAND ${CMAKE_COMMAND} -E remove coverage2.info
-    DEPENDS raw-coverage.info
-    )
-  # generate html report
-  add_custom_command (
-    OUTPUT coverage-report
-    COMMAND ${LCOV_BIN_DIR}/genhtml --demangle-cpp coverage.info -o coverage-report
-    DEPENDS coverage.info
-    )
-  add_custom_target (coverage DEPENDS coverage-report)
-endif ()
-
-# include this test only if NOT run on gitlab-ci, since there we have a dedicated job for it:
-if (NOT DEFINED ENV{CI})
-  # add call to ./do-copyright.py to run as unit-test-case
-  add_test (NAME copyright_notices COMMAND ./do-copyright.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-endif (NOT DEFINED ENV{CI})
-  
-if (DEFINED ENV{CORSIKA_DATA})
-  message ("Found  corsika-data in $ENV{CORSIKA_DATA}")
-  set (CORSIKA_DATA $ENV{CORSIKA_DATA})
-  add_subdirectory ($ENV{CORSIKA_DATA} corsika_data)
-else ()
-  message ("CORSIKA_DATA not defined: NEED to download AirShowerPhysics/corsika-data via git submodule")
-  message ("cmake will fail if you did not do this already.")
-  set (CORSIKA_DATA ${PROJECT_SOURCE_DIR}/Data)
-  add_subdirectory (Data)
-endif ()
-
-# include potential ThirdParty code provided with CORSIKA
-add_subdirectory (ThirdParty)
-
-# order of subdirectories
-add_subdirectory (Framework)
-add_subdirectory (Environment)
-add_subdirectory (Stack)
-add_subdirectory (Setup)
-add_subdirectory (Processes)
-add_subdirectory (Documentation)
-add_subdirectory (Main)
-add_subdirectory (Tools)
-if (WITH_COAST)
-  add_subdirectory (COAST)
-endif ()
+# ctest config
+enable_testing ()
+set (CTEST_OUTPUT_ON_FAILURE 1)
 
 
+#+++++++++++++++++++++++++++++
+# get CORSIKA8
+#
+find_package(CORSIKA8 REQUIRED)
+include_directories(${CORSIKA8_INCLUDE_DIR})
+# those are needed, since some headers (namely GeneratedParticleProperties.inc) are produced by python script from ParticleData.xml
+add_subdirectory(corsika/framework) 
+add_subdirectory(corsika/modules/sibyll) 
+#
+#+++++++++++++++++++++++++++++
+# get Eigen3 
+#
+find_package( Eigen3 REQUIRED )
+include_directories(${EIGEN3_INCLUDE_DIR})
+
+#+++++++++++++++++++++++++++++
+# get catch2 
+#
+find_package( Catch2 REQUIRED )
+
+#+++++++++++++++++++++++++++++
+# use spdlog
+#
+add_subdirectory(externals/spdlog)
+add_dependencies(CORSIKA8 spdlog::spdlog)
+
+#+++++++++++++++++++++++++++++
+# get phys_units
+#
+find_package( PhysUnits REQUIRED )
+
+#+++++++++++++++++++++++++++++
+# get Pythia
+#
+find_package( Pythia8 REQUIRED )
+if(Pythia_FOUND)
+include_directories(${Pythia_INCLUDE_DIR})
+endif(Pythia_FOUND)
+#
+#+++++++++++++++++++++++++++++
+# get UrQMD
+#
+#find_package( UrQMD REQUIRED )
+if(UrQMD_FOUND)
+include_directories(${UrQMD_INCLUDE_DIR})
+endif(UrQMD_FOUND)
+#
+#+++++++++++++++++++++++++++++
+# get Sybill
+#
+# find_package( Sibyll REQUIRED )
+add_subdirectory (dependencies/sibyll)
+if(Sibyll_FOUND)
+include_directories(${Sibyll_INCLUDE_DIR})
+endif(Sibyll_FOUND)
+#
+#+++++++++++++++++++++++++++++
+# get QGSJETII
+#
+#find_package( QGSJETII REQUIRED )
+if(QGSJETII_FOUND)
+include_directories(${QGSJETII_INCLUDE_DIR})
+endif(QGSJETII_FOUND)
+#
+#
+#+++++++++++++++++++++++++++++
+# =~~~~~~~~~~~~~~~~~~~~~~~~~=
+#  = Add of subdirectories =
+# =~~~~~~~~~~~~~~~~~~~~~~~~~=
+#+++++++++++++++++++++++++++++
+#
+# modules
+# 
+#add_subdirectory (dependencies/Pythia)
+#add_subdirectory (dependencies/Sibyll)
+#add_subdirectory (dependencies/QGSJetII)
+#add_subdirectory (dependencies/UrQMD)
+#
+#+++++++++++++++++++++++++++++++
+# tests
+# 
+add_subdirectory (tests/framework)
+add_subdirectory (tests/media)
+add_subdirectory (tests/stack)
+add_subdirectory (tests/modules)
+#
+#+++++++++++++++++++++++++++++++
+# examples
+# 
+#add_subdirectory (examples)
+#
+#+++++++++++++++++++++++++++++++
+#
 # final summary output
 feature_summary (WHAT ALL)
diff --git a/COAST/CMakeLists.txt b/COAST/CMakeLists.txt
deleted file mode 100644
index dc09ce62da9be3f057c59b66da61c68477eace6c..0000000000000000000000000000000000000000
--- a/COAST/CMakeLists.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-set (
-  COAST_HEADERS
-  COASTProcess.h
-  COASTStack.h
-  ParticleConversion.h
-  )
-
-set (
-  COAST_SOURCES
-  COASTUserLib.cc
-  COASTProcess.cc
-  ParticleConversion.cc
-  )
-
-set (
-  COAST_NAMESPACE
-  corsika/coast
-  )
-
-add_library (COAST SHARED ${COAST_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (COAST ${COAST_NAMESPACE} ${COAST_HEADERS})
-
-set_target_properties (
-  COAST
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-#  PUBLIC_HEADER "${MODEL_HEADERS}"
-  )
-
-target_link_libraries (
-  COAST
-  PUBLIC
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAparticles
-  CORSIKAgeometry
-  CORSIKAsetup
-  # SuperStupidStack
-  )
-
-target_include_directories (
-  COAST
-  PUBLIC
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-target_include_directories (
-  COAST
-  SYSTEM
-  PUBLIC
-  $ENV{COAST_DIR}/include
-  )
-
-install (
-  TARGETS COAST
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  PUBLIC_HEADER DESTINATION include/${COAST_NAMESPACE}
-  )
-
-#install (
-#  FILES ${COAST_HEADERS} 
-#  DESTINATION include/${COAST_NAMESPACE}
-#  )
diff --git a/COAST/COASTProcess.cc b/COAST/COASTProcess.cc
deleted file mode 100644
index 827d2f0fa5b05ba2ee41f2bc11bdee1cca431abf..0000000000000000000000000000000000000000
--- a/COAST/COASTProcess.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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/coast/COASTProcess.h>
-#include <corsika/coast/COASTStack.h>
-
-#include <iostream>
-
-using namespace std;
-
-namespace corsika::coast {
-
-  /**
-     the init function is called during the start of corsika.
-   */
-  void COASTProcess::Init() {
-    cout << "************* Greetings from CORSIKA8 *****************" << endl;
-  }
-
-  /**
-     the docontinous function is called for each tracking step in
-     corsika. Take care: you cannot modify the particle, the track or
-     the stack from here (docontinuous) inside corisika7. In corsika8
-     you will be able to do that.
-   */
-  corsika::process::EProcessReturn COASTProcess::DoContinuous(const Particle& p,
-                                                              const Track& t,
-                                                              const Stack&) {
-    using namespace corsika::units::si;
-    auto const start = t.GetPosition(0).GetCoordinates();
-    auto const delta = t.GetPosition(1).GetCoordinates() - start;
-    auto const name = corsika::particles::GetName(p.GetPID());
-    cout << "CORSIKA8: particle=" << name << ", pos=" << start
-         << " track-l=" << delta.norm() << ", track-t=" << t.GetDuration() << endl;
-    return corsika::process::EProcessReturn::eOk;
-  }
-
-} // namespace corsika::coast
diff --git a/COAST/COASTProcess.h b/COAST/COASTProcess.h
deleted file mode 100644
index 2886d13c4d7973c70ac5ef4886a968f02842a206..0000000000000000000000000000000000000000
--- a/COAST/COASTProcess.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/ContinuousProcess.h>
-#include <corsika/setup/SetupTrajectory.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <corsika/coast/COASTStack.h>
-
-#include <limits>
-
-typedef corsika::coast::COASTStack Stack;
-typedef corsika::coast::COASTStack::ParticleType Particle;
-typedef corsika::geometry::Trajectory<corsika::geometry::Line> Track;
-
-namespace corsika::coast {
-
-  class COASTProcess : public corsika::process::ContinuousProcess<COASTProcess> {
-
-  public:
-    void Init();
-
-    corsika::process::EProcessReturn DoContinuous(const Particle&, const Track&,
-                                                  const Stack&);
-
-    corsika::units::si::LengthType MaxStepLength(Particle&, Track&) {
-      return corsika::units::si::meter * std::numeric_limits<double>::infinity();
-    }
-
-  private:
-  };
-
-} // namespace corsika::coast
diff --git a/COAST/COASTStack.h b/COAST/COASTStack.h
deleted file mode 100644
index 72e0594a78aaf0931e61cccadb198bcfeff172c9..0000000000000000000000000000000000000000
--- a/COAST/COASTStack.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/coast/ParticleConversion.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/stack/ParticleBase.h>
-#include <corsika/stack/Stack.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h> // remove
-#include <corsika/geometry/Vector.h>
-
-#include <crs/CParticle.h>
-#include <crs/CorsikaTypes.h>
-
-#include <algorithm>
-#include <vector>
-
-namespace corsika::coast {
-
-  typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
-
-  /**
-   * Example of a particle object on the stack.
-   */
-
-  template <typename StackIteratorInterface>
-  class ParticleInterface : public corsika::stack::ParticleBase<StackIteratorInterface> {
-
-    using corsika::stack::ParticleBase<StackIteratorInterface>::GetStackData;
-    using corsika::stack::ParticleBase<StackIteratorInterface>::GetIndex;
-
-  public:
-    corsika::particles::Code GetPID() const { return GetStackData().GetPID(GetIndex()); }
-
-    corsika::units::si::HEPEnergyType GetEnergy() const {
-      return GetStackData().GetEnergy(GetIndex());
-    }
-
-    MomentumVector GetMomentum(const corsika::geometry::CoordinateSystem& cs) const {
-      using namespace corsika::units::si;
-      const HEPEnergyType mass = corsika::particles::GetMass(GetPID());
-      const auto P = sqrt((GetEnergy() - mass) * (GetEnergy() + mass));
-      const auto p = GetStackData().GetDirection(cs);
-      return p * P;
-    }
-
-    corsika::geometry::Point GetPosition(
-        const corsika::geometry::CoordinateSystem& cs) const {
-      return GetStackData().GetPosition(cs, GetIndex());
-    }
-
-    corsika::geometry::Vector<corsika::units::si::speed_d> GetVelocity(
-        const corsika::geometry::CoordinateSystem& cs) const {
-      return GetStackData().GetVelocity(cs, GetIndex());
-    }
-
-    corsika::units::si::TimeType GetTime() const {
-      return GetStackData().GetTime(GetIndex());
-    }
-
-    corsika::geometry::Vector<corsika::units::si::dimensionless_d> GetDirection(
-        const corsika::geometry::CoordinateSystem& cs) const {
-      return GetStackData().GetDirection(cs);
-    }
-
-    corsika::units::si::TimeType GetTimeInterval() const {
-      return GetStackData().GetTimeInterval();
-    }
-  };
-
-  /**
-   *
-   * Memory implementation of the most simple (stupid) particle stack object.
-   */
-
-  class COASTStackImpl {
-
-    const crs::CParticle* fParticle1 = 0;
-    const crs::CParticle* fParticle2 = 0;
-
-  public:
-    COASTStackImpl(const crs::CParticle* v1, const crs::CParticle* v2) {
-      fParticle1 = v1;
-      fParticle2 = v2;
-    }
-
-    void Init() {}
-    void Clear() {}
-
-    // there is one particle only
-    int GetSize() const { return 1; }
-    int GetCapacity() const { return 1; }
-
-    // you cannot modify the particle:
-    // there are no Set... function defined
-
-    // readout particle data, there is just one particle!
-    /*
-      double x;
-      double y;
-      double z;
-      double depth;
-      double time;
-      double energy;
-      double weight;
-      int    particleId;
-      int    hadronicGeneration;
-    */
-    corsika::particles::Code GetPID(const int) const {
-      return ConvertFromCoast(static_cast<CoastCode>(fParticle1->particleId));
-    }
-    corsika::units::si::HEPEnergyType GetEnergy(const int) const {
-      using namespace corsika::units::si;
-      return fParticle1->energy * 1_GeV;
-    }
-    corsika::geometry::Vector<corsika::units::si::dimensionless_d> GetDirection(
-        const corsika::geometry::CoordinateSystem& cs) const {
-      using namespace corsika::units::si;
-      corsika::geometry::Point p1(
-          cs, {fParticle1->x * 1_cm, fParticle1->y * 1_cm, fParticle1->z * 1_cm});
-      corsika::geometry::Point p2(
-          cs, {fParticle2->x * 1_cm, fParticle2->y * 1_cm, fParticle2->z * 1_cm});
-      const corsika::geometry::Vector D = p2 - p1;
-      const auto magD = D.norm();
-      const corsika::geometry::Vector dir = D / magD;
-      return dir;
-    }
-    corsika::geometry::Vector<corsika::units::si::speed_d> GetVelocity(
-        const corsika::geometry::CoordinateSystem& cs, const int) const {
-      using namespace corsika::units::si;
-      corsika::geometry::Vector<corsika::units::si::dimensionless_d> dir =
-          GetDirection(cs);
-      corsika::geometry::Point p1(
-          cs, {fParticle1->x * 1_cm, fParticle1->y * 1_cm, fParticle1->z * 1_cm});
-      corsika::geometry::Point p2(
-          cs, {fParticle2->x * 1_cm, fParticle2->y * 1_cm, fParticle2->z * 1_cm});
-      const corsika::geometry::Vector D = p2 - p1;
-      const LengthType magD = D.norm();
-      const TimeType deltaT = GetTimeInterval();
-      return dir * magD / deltaT;
-    }
-    corsika::geometry::Point GetPosition(const corsika::geometry::CoordinateSystem& cs,
-                                         const int) const {
-      using namespace corsika::units::si;
-      return corsika::geometry::Point(
-          cs, {fParticle1->x * 1_cm, fParticle1->y * 1_cm, fParticle1->z * 1_cm});
-    }
-    corsika::units::si::TimeType GetTime(const int) const {
-      using namespace corsika::units::si;
-      return fParticle1->time * 1_s;
-    }
-
-    corsika::units::si::TimeType GetTimeInterval() const {
-      using namespace corsika::units::si;
-      return (fParticle2->time - fParticle1->time) * 1_s;
-    }
-
-    /**
-     *   We do not allow copying!
-     */
-    void Copy(const int, const int) {}
-
-    /**
-     *   We do not allow swapping particles, there is just one...
-     */
-    void Swap(const int, const int) {}
-
-    // size cannot be increased, do nothing
-    void IncrementSize() {}
-
-    // size cannot be decremented, do nothing
-    void DecrementSize() {}
-
-  }; // end class COASTStackImpl
-
-  typedef corsika::stack::Stack<COASTStackImpl, ParticleInterface> COASTStack;
-
-} // namespace corsika::coast
diff --git a/COAST/COASTUserLib.cc b/COAST/COASTUserLib.cc
deleted file mode 100644
index d5b8b0b7c662a556f7d6fa6eb91bce147af6b829..0000000000000000000000000000000000000000
--- a/COAST/COASTUserLib.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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>
-#include <corsika/coast/COASTStack.h>
-#include <corsika/geometry/CoordinateSystem.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Trajectory.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <crs/CInteraction.h>
-#include <crs/CParticle.h>
-#include <crs/CorsikaTypes.h>
-#include <crs/TSubBlock.h>
-
-#include <iostream>
-#include <sstream>
-
-using namespace std;
-using namespace corsika;
-using namespace corsika::units::si;
-
-corsika::coast::COASTProcess gCorsikaProcess;
-
-/*
-  Data is one CORSIKA data-block constining of 21 SubBlocks.
-  A SubBlock can be:
-  - thinned mode:     39 (Particles) * 8 (ENTRIES) * 4 (BYTES)
-  - not-thinned mode: 39 (Particles) * 7 (ENTRIES) * 4 (BYTES)
-*/
-extern "C" void wrida_([[maybe_unused]] const CREAL* Data) {
-  // crs::CParticleFortranPtr p;
-  // const bool isF = prminfo_(p);
-}
-
-extern "C" void inida_([[maybe_unused]] const char* filename,
-                       [[maybe_unused]] const int& thinning,
-                       [[maybe_unused]] const int& /*curved*/,
-                       [[maybe_unused]] const int& /*slant*/,
-                       [[maybe_unused]] const int& /*stackinput*/,
-                       [[maybe_unused]] const int& /*preshower*/,
-                       [[maybe_unused]] int str_length) {
-  gCorsikaProcess.Init();
-}
-
-extern "C" void cloda_() {
-  // crs::CParticleFortranPtr pptr;
-  // const bool isF = prminfo_(pptr);
-  // gCorsikaProcess.Close();
-}
-
-void interaction_([[maybe_unused]] const crs::CInteraction& interaction) {
-  /*
-    all interactions in the shower are available in this function !
-    the information availabel in the CInteraction class are:
-    double x;
-    double y;
-    double z;
-    double etot;      // lab energy
-    double sigma;     // cross-section of process
-    double kela;      // elasticity
-    int    projId;    // projectile
-    int    targetId;  // target
-    double time;
-  */
-}
-
-extern "C" void track_([[maybe_unused]] const crs::CParticle& pre,
-                       [[maybe_unused]] const crs::CParticle& post) {
-  /*
-    all particles in the shower are available in this function !
-    The pre and post objecte are the two endpoints for one single track
-    in the shower, where the information available in CParticle is:
-    double x;
-    double y;
-    double z;
-    double depth;
-    double time;
-    double energy;
-    double weight;
-    int    particleId;
-    int    hadronicGeneration;
-  */
-  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, stack);
-}
-
-extern "C" void tabularizedatmosphere_([[maybe_unused]] const int& nPoints,
-                                       [[maybe_unused]] const double* height,
-                                       [[maybe_unused]] const double* refractiveIndex) {
-  // for special use only but should be defined because it is delcared in CORSIKA.F
-}
diff --git a/COAST/ParticleConversion.cc b/COAST/ParticleConversion.cc
deleted file mode 100644
index de8ca909f819331f4a4afbde917a7a2829ebb048..0000000000000000000000000000000000000000
--- a/COAST/ParticleConversion.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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/coast/ParticleConversion.h>
-#include <corsika/particles/ParticleProperties.h>
-
-#include <exception>
-#include <iostream>
-#include <sstream>
-
-using namespace std;
-
-namespace corsika::coast {
-
-  /**
-     Convert particle code, and check if it does exists. Throw exeption, if not!
-   */
-
-  corsika::particles::Code ConvertFromCoast(CoastCode pCode) {
-    if (coast2corsika.count(pCode) == 0) {
-      ostringstream err;
-      err << "corsika::coast::ConvertFromCoast CoastCode does not exists="
-          << static_cast<CoastCodeIntType>(pCode) << endl;
-      cout << err.str() << endl;
-      throw std::runtime_error(err.str());
-    }
-    return coast2corsika.find(pCode)->second;
-  }
-
-} // namespace corsika::coast
diff --git a/COAST/ParticleConversion.h b/COAST/ParticleConversion.h
deleted file mode 100644
index 68613783bbabfcfa55d4246b0473c0a1291cfcb5..0000000000000000000000000000000000000000
--- a/COAST/ParticleConversion.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/particles/ParticleProperties.h>
-
-#include <map>
-
-namespace corsika::coast {
-
-  /**
-     Here we define the original CORSIKA particle codes, see corsika manual
-   */
-  enum class CoastCode : int16_t {
-    Gamma = 1,
-    Positron = 2,
-    Electron = 3,
-    MuonBar = 5,
-    Muon = 6,
-    Pi0 = 7,
-    PiP = 8,
-    PiM = 9,
-    Klong = 10,
-    KP = 11,
-    KM = 12,
-    Neutron = 13,
-    Proton = 14,
-    ProtonBar = 15,
-    Kshort = 16,
-    Eta = 17,
-    Lambda = 18,
-    SigmaPlus = 19,
-    Sigma0 = 20,
-    SigmaMinus = 21,
-    Xi0 = 22,
-    XiMinus = 23,
-    OmegaMinus = 24,
-    NeutronBar = 25,
-    LambdaBar = 26,
-    SigmaMinusBar = 27,
-    Sigma0Bar = 28,
-    SigmaPlusBar = 29,
-    Xi0Bar = 30,
-    XiPlusBar = 31,
-    OmegaPlusBar = 32,
-
-    EtaPrime = 48,
-    Phi = 49,
-    omega = 50,
-    Rho0 = 51,
-    RhoPlus = 52,
-    RhoMinus = 53,
-    DeltaPlusPlus = 54,
-    DeltaPlus = 55,
-    Delta0 = 56,
-    DeltaMinus = 57,
-    DeltaMinusMinusBar = 58,
-    DeltaMinusBar = 59,
-    Delta0Bar = 60,
-    DeltaPlusBar = 61,
-    KStar0 = 62,
-    KStarPlus = 63,
-    KStarMinus = 64,
-    KStar0Bar = 65,
-
-    NeutrinoE = 66,
-    NeutrinoEBar = 67,
-    NeutrinoMu = 68,
-    NeutrinoMuBar = 69,
-
-    Code71 = 71,
-    Code72 = 72,
-    Code73 = 73,
-    Code74 = 74,
-    Code75 = 75,
-    Code76 = 76,
-
-    Code85 = 85,
-    Code86 = 86,
-
-    Code95 = 95,
-    Code96 = 96,
-
-    ProtonNucleus = 101,
-    Deuterium = 201,
-    Tritium = 301,
-    He3 = 302,
-    Helium = 402,
-    Lithium = 603,
-    Beryllium = 904,
-    Boron = 1005,
-    Carbon = 1206,
-    Carbon13 = 1306,
-    Nitrogen = 1407,
-    Oxygen = 1608,
-    Fluor = 1809,
-    Neon21 = 2110,
-    Neon = 2210,
-    Argon = 1838,
-    Iron = 5628,
-    Xenon = 12854,
-    Radon = 13888,
-  };
-
-  using CoastCodeIntType = std::underlying_type<CoastCode>::type;
-
-  /**
-     Here we convert CORSIKA7 to CORSIKA8 codes
-   */
-
-  const std::map<corsika::coast::CoastCode, corsika::particles::Code> coast2corsika = {
-      {CoastCode::Gamma, corsika::particles::Code::Gamma},
-      {CoastCode::Positron, corsika::particles::Code::Positron},
-      {CoastCode::Electron, corsika::particles::Code::Electron},
-      //{CoastCode::    ,corsika::particles::Code::Unknown}, // 4
-      {CoastCode::MuonBar, corsika::particles::Code::MuPlus},
-      {CoastCode::Muon, corsika::particles::Code::MuMinus},
-      {CoastCode::Pi0, corsika::particles::Code::Pi0},
-      {CoastCode::PiP, corsika::particles::Code::PiPlus},
-      {CoastCode::PiM, corsika::particles::Code::PiMinus},
-      {CoastCode::Klong, corsika::particles::Code::K0Long}, // 10
-      {CoastCode::KP, corsika::particles::Code::KPlus},
-      {CoastCode::KM, corsika::particles::Code::KMinus},
-      {CoastCode::Neutron, corsika::particles::Code::Neutron},
-      {CoastCode::Proton, corsika::particles::Code::Proton}, // 14
-      {CoastCode::ProtonBar, corsika::particles::Code::AntiProton},
-      {CoastCode::Kshort, corsika::particles::Code::K0Short},
-      {CoastCode::Eta, corsika::particles::Code::Eta}, // 17
-      {CoastCode::Lambda, corsika::particles::Code::Lambda0},
-      {CoastCode::SigmaPlus, corsika::particles::Code::SigmaPlus},
-      {CoastCode::Sigma0, corsika::particles::Code::Sigma0}, // 20
-      {CoastCode::SigmaMinus, corsika::particles::Code::SigmaMinus},
-      {CoastCode::Xi0, corsika::particles::Code::Xi0},
-      {CoastCode::XiMinus, corsika::particles::Code::XiMinus},
-      {CoastCode::OmegaMinus, corsika::particles::Code::OmegaMinus},
-      {CoastCode::NeutronBar, corsika::particles::Code::AntiNeutron}, // 25
-      {CoastCode::LambdaBar, corsika::particles::Code::Lambda0Bar},
-      {CoastCode::SigmaMinusBar, corsika::particles::Code::SigmaMinusBar},
-      {CoastCode::Sigma0Bar, corsika::particles::Code::Sigma0Bar},
-      {CoastCode::SigmaPlusBar, corsika::particles::Code::SigmaPlusBar},
-      {CoastCode::Xi0Bar, corsika::particles::Code::Xi0Bar},
-      {CoastCode::XiPlusBar, corsika::particles::Code::XiPlusBar},
-      {CoastCode::OmegaPlusBar, corsika::particles::Code::OmegaPlusBar}, // 32
-      //{CoastCode::    ,corsika::particles::Code::Unknown}, // eta-prime
-      //{CoastCode::    ,corsika::particles::Code::Unknown}, // PHI
-      //{CoastCode::    ,corsika::particles::Code::Unknown}, // omega
-      {CoastCode::Rho0, corsika::particles::Code::Rho0}, // 51
-      {CoastCode::RhoPlus, corsika::particles::Code::RhoPlus},
-      {CoastCode::RhoMinus, corsika::particles::Code::RhoMinus},
-      {CoastCode::DeltaPlusPlus, corsika::particles::Code::DeltaPlusPlus},
-      {CoastCode::DeltaPlus, corsika::particles::Code::DeltaPlus},
-      {CoastCode::Delta0, corsika::particles::Code::Delta0}, // 56
-      //{CoastCode::    ,corsika::particles::Code::Unknown}, // DeltaMinus},
-      {CoastCode::DeltaMinusMinusBar, corsika::particles::Code::DeltaMinusMinusBar},
-      {CoastCode::DeltaMinusBar, corsika::particles::Code::DeltaMinusBar},
-      {CoastCode::Delta0Bar, corsika::particles::Code::Delta0Bar},
-      //{CoastCode::    ,corsika::particles::Code::Unknown}, // DeltaPlusBar
-      {CoastCode::KStar0, corsika::particles::Code::KStar0}, // 62
-      {CoastCode::KStarPlus, corsika::particles::Code::KStarPlus},
-      {CoastCode::KStarMinus, corsika::particles::Code::KStarMinus},
-      {CoastCode::KStar0Bar, corsika::particles::Code::KStar0Bar},
-      {CoastCode::NeutrinoE, corsika::particles::Code::NuE},
-      {CoastCode::NeutrinoEBar, corsika::particles::Code::NuEBar},
-      {CoastCode::NeutrinoMu, corsika::particles::Code::NuMu},
-      {CoastCode::NeutrinoMuBar, corsika::particles::Code::NuMuBar}, // 69
-      {CoastCode::Code71, corsika::particles::Code::Unknown},
-      {CoastCode::Code72, corsika::particles::Code::Unknown},
-      {CoastCode::Code73, corsika::particles::Code::Unknown},
-      {CoastCode::Code74, corsika::particles::Code::Unknown},
-      {CoastCode::Code75, corsika::particles::Code::Unknown},
-      {CoastCode::Code76, corsika::particles::Code::Unknown},
-      {CoastCode::Code85, corsika::particles::Code::Unknown},
-      {CoastCode::Code86, corsika::particles::Code::Unknown},
-      {CoastCode::Code95, corsika::particles::Code::Unknown},
-      {CoastCode::Code96, corsika::particles::Code::Unknown},
-
-      {CoastCode::ProtonNucleus, corsika::particles::Code::Proton}, // 101
-      {CoastCode::Deuterium, corsika::particles::Code::Deuterium},
-      {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::Iron, corsika::particles::Code::Iron}, // 5628
-
-      //{CoastCode::, corsika::particles::Code::},
-
-  };
-
-  corsika::particles::Code ConvertFromCoast(CoastCode pCode);
-
-} // namespace corsika::coast
diff --git a/COAST/README.md b/COAST/README.md
deleted file mode 100644
index 96e62845bd4843c21e97d15e8c4a249c69cec0d6..0000000000000000000000000000000000000000
--- a/COAST/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# 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 CORSIKA 8. See code in namespace corsika::coast for all details.
-
-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
-
-
-Step 1:
--------
-
-Configure CORSIKA8 with 'cmake -DWITH_COAST=1' and other options you
-prefer. You have to define COAST_DIR environment variable to the
-location of your existing CORSIKA7 installation. Check that 'ls
-$COAST_DIR/include/interface' contains the file
-'CorsikaInterface.h'. If this is not the case, this is not a valid or
-proper installation of CORSIKA. First compile CORSIKA, e.g. with
-ROOTOUT option, or CoReas to get COAST installed!
-
-
-Step 2:
--------
-
-Compile CORSIKA8, edit COAST/COASTProcess.cc to modify/add your
-physics module. 
-
-There should be a libCOAST.so as a result! This is what you need.
-
-
-Step 3:
--------
-
-Create COAST_USER_LIB environment variable to point at your current
-directory, where now the 'libCOAST.so' library is located.
-Add the path in $COAST_USER_LIB to your LD_LIBRARY_PATH environment
-variable.
-
-
-Step 4:
--------
-
-Go back to your CORSIKA directory and re-start 'coconut'. The option
-COAST_USER_LIB will now be visible. Please select it, copile CORSIKA
-and start the executable. In the generated console output you will the
-statements from your COAST library during Init and Close of the
-simulation.  
-Add any kind of code now working on the CParticle or
-CInteraction class to start using the full power of COAST.
-
-Note: the default COASTProcess just prints out tons of ASCII. This is
-not very useful, don't run a full MC with this...
-
-
-Step 5:
--------
-
-enjoy...
-
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 000470412f22b17b22b1a38db5176fb2f776b207..e2e3262aa0aaf5133d5f1758c190f85aac1fe559 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -81,20 +81,24 @@ While `clang-format` does the structural formatting, we still need to agree on n
     - *Everything* is part of one of those namespaces:
        - ```corsika::framework```, ```corsika::physics```, or ```corsika::process```
     - All classes and objects are encapsulated into suited sub-namespaces,
-      thus ```corsika::framework::geometry```, ```corsika::physics::process```, ```corsika::physics::units```, etc.
+      thus corsika, corsikaes, corsika::units, etc.
     - Namespace names do not use capital letters.  
-  - Every header file is located in the source tree in ```include/corsika/[namespace]```, which also means that in almost all cases each header file
-    can only provide definitions for a _single_ namespace. It is one
-    main purpose of namespaces to structure the location of header
-    files.
-  - Each header file uses an include protection ```#pragma once```
-    immediately below the copyright statement.
-  - Header files should always be included with `<..>`, thus,
-    `#include <corsika/geometry/Point.h>` since the build system
-    will always provide the correct include directives (and files
-    anyway cannot be found in file-system paths, which generally do
-    not follow the namespace naming conventions outlined
-    here).
+    - Every header file is copied during build and install into
+      "include/corsika/[namespace]" which also means, each header file
+      can only provide definitions for a _single_ namespace. It is one
+      main purpose of namespaces to structure the location of header
+      files.
+    - Each header file uses an include protection that includes at
+      least the namespace name, and header file name, thus, `#ifndef
+      __include_geometry_Point_h__` or `#ifndef __geometry_Point_h__`,
+      or similar are acceptable.
+    - Header files should always be included with `<..>`, thus,
+      `#include <corsika/framework/geometry/Point.hpp>` since the build system
+      will always provide the correct include directives (and files
+      anyway cannot be found in file-system paths, which generally do
+      not follow the namespace naming conventions outlined
+      here).
+
   - Header files are named after the main class (or object) they
     define. This also means each header file name starts with a
     capital letter.
diff --git a/Documentation/CMakeLists.txt b/Documentation/CMakeLists.txt
deleted file mode 100644
index ffab73c843a22a06928395980a8b1e097a194234..0000000000000000000000000000000000000000
--- a/Documentation/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-add_subdirectory (Doxygen)
-add_subdirectory (Examples)
-
diff --git a/Documentation/Doxygen/CMakeLists.txt b/Documentation/Doxygen/CMakeLists.txt
deleted file mode 100644
index b3511f84ddbc9ccdce365479323f4d5f7d798596..0000000000000000000000000000000000000000
--- a/Documentation/Doxygen/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-find_package (Doxygen OPTIONAL_COMPONENTS dot mscgen dia)
-
-if (DOXYGEN_FOUND)
-  if (NOT DOXYGEN_DOT_EXECUTABLE)
-    message (FATAL_ERROR "Found doxygen but not 'dot' command, please install graphviz or set DOXYGEN_DOT_EXECUTABLE")
-  endif()
-
-  set (DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
-  set (DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-  set (DOXYGEN_GENERATE_HTML YES)
-  set (DOXYGEN_GENERATE_MAN YES)
-  configure_file (${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
-  message ("Start doxygen with \"make doxygen\"")
-  
-  # note the option ALL which allows to build the docs together with the application
-  add_custom_target (doxygen # ALL
-    COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMENT "Generating API documentation with Doxygen"
-    VERBATIM)
-
-  add_custom_command(TARGET doxygen POST_BUILD
-    COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/latex; pdflatex refman.tex
-    )
-  
-  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc OPTIONAL)
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf DESTINATION share/doc OPTIONAL)
-         
-else (DOXYGEN_FOUND)
-  
-  message ("Doxygen need to be installed to generate the doxygen documentation")
-  
-endif (DOXYGEN_FOUND)
diff --git a/Documentation/Examples/stack_example.cc b/Documentation/Examples/stack_example.cc
deleted file mode 100644
index cc638dbe8e622f27db71210a109784a0f4de7eff..0000000000000000000000000000000000000000
--- a/Documentation/Examples/stack_example.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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/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) {
-    s.AddParticle(
-        std::tuple<particles::Code, units::si::HEPEnergyType,
-                   corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{
-            particles::Code::Electron, 1.5_GeV * i,
-            corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 1_GeV}),
-            geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns});
-  }
-}
-
-void read(corsika::stack::super_stupid::SuperStupidStack& s) {
-  assert(s.getEntries() == 11); // stack has 11 particles
-
-  HEPEnergyType total_energy;
-  int i = 0;
-  for (auto& p : s) {
-    total_energy += p.GetEnergy();
-    // particles are electrons with 1.5 GeV energy times i
-    assert(p.GetPID() == particles::Code::Electron);
-    assert(p.GetEnergy() == 1.5_GeV * (i++));
-  }
-}
-
-int main() {
-
-  std::cout << "stack_example" << std::endl;
-
-  corsika::stack::super_stupid::SuperStupidStack s;
-  fill(s);
-  read(s);
-  return 0;
-}
diff --git a/Environment/CMakeLists.txt b/Environment/CMakeLists.txt
deleted file mode 100644
index 3231ab4a8a643b682a50723e9b64dc3837e1c761..0000000000000000000000000000000000000000
--- a/Environment/CMakeLists.txt
+++ /dev/null
@@ -1,116 +0,0 @@
-add_custom_command (
-  OUTPUT  ${PROJECT_BINARY_DIR}/Environment/GeneratedMediaProperties.inc
-  COMMAND ${PROJECT_SOURCE_DIR}/Environment/readProperties.py 
-          ${PROJECT_SOURCE_DIR}/Environment/properties8.dat
-  DEPENDS readProperties.py
-          properties8.dat
-  WORKING_DIRECTORY
-          ${PROJECT_BINARY_DIR}/Environment
-  COMMENT "Read NIST properties8 data file and produce C++ source code GeneratedMediaProperties.inc"
-  VERBATIM
-  )
-
-
-set (
-  ENVIRONMENT_SOURCES
-  ShowerAxis.cc
-)
-
-set (
-  ENVIRONMENT_HEADERS
-  VolumeTreeNode.h
-  IEmpty.hpp
-  IMediumModel.h
-  NuclearComposition.h
-  HomogeneousMedium.h
-  InhomogeneousMedium.h
-  HomogeneousMedium.h
-  LinearApproximationIntegrator.h
-  DensityFunction.h
-  Environment.h
-  NameModel.h
-  BaseExponential.h
-  FlatExponential.h
-  SlidingPlanarExponential.h
-  LayeredSphericalAtmosphereBuilder.h
-  ShowerAxis.h
-  IMagneticFieldModel.h
-  UniformMagneticField.h
-  NoMagneticField.h
-  IRefractiveIndexModel.h
-  UniformRefractiveIndex.h
-  IMediumPropertyModel.h
-  MediumProperties.h
-  MediumPropertyModel.h
-  ${PROJECT_BINARY_DIR}/Environment/GeneratedMediaProperties.inc # this one is auto-generated
-  )
-
-set (
-  ENVIRONMENT_NAMESPACE
-  corsika/environment
-  )
-
-add_library (CORSIKAenvironment STATIC ${ENVIRONMENT_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAenvironment ${ENVIRONMENT_NAMESPACE} ${ENVIRONMENT_HEADERS})
-
-set_target_properties (
-  CORSIKAenvironment
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  PUBLIC_HEADER "${ENVIRONMENT_HEADERS}"
-  )
-
-# ....................................................
-# since GeneratedMediaProperties.inc is an automatically produced file in the build directory,
-# create a symbolic link into the source tree, so that it can be found and edited more easily
-# this is not needed for the build to succeed! .......
-add_custom_command (
-  OUTPUT  ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedParticleProperties.inc
-  COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_BINARY_DIR}/include/corsika/environment/GeneratedMediaProperties.inc ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedMediaProperties.inc
-  COMMENT "Generate link in source-dir: ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedMediaProperties.inc"
-  )
-add_custom_target (SourceDirLinkMedia DEPENDS ${PROJECT_BINARY_DIR}/Environment/GeneratedMediaProperties.inc)
-add_dependencies (CORSIKAenvironment SourceDirLinkMedia)
-# .....................................................
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  CORSIKAenvironment
-  CORSIKAgeometry
-  CORSIKAparticles
-  CORSIKAunits
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  CORSIKAenvironment
-  PUBLIC
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include>
-  )
-
-install (
-  TARGETS CORSIKAenvironment
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  PUBLIC_HEADER DESTINATION include/${ENVIRONMENT_NAMESPACE}
-  )
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testEnvironment)
-target_link_libraries (
-  testEnvironment
-  CORSIKAsetup
-  CORSIKAenvironment
-  CORSIKAtesting
-  )
-
-CORSIKA_ADD_TEST(testShowerAxis)
-target_link_libraries (
-  testShowerAxis
-  CORSIKAsetup
-  CORSIKAenvironment
-  CORSIKAtesting
-  )
diff --git a/Environment/Environment.h b/Environment/Environment.h
deleted file mode 100644
index 1f807de45bc698718c74f93cbc7021c8329936b2..0000000000000000000000000000000000000000
--- a/Environment/Environment.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/VolumeTreeNode.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Sphere.h>
-#include <limits>
-
-namespace corsika::environment {
-  struct Universe : public corsika::geometry::Sphere {
-    Universe(corsika::geometry::CoordinateSystem const& pCS)
-        : corsika::geometry::Sphere(
-              corsika::geometry::Point{pCS, 0 * corsika::units::si::meter,
-                                       0 * corsika::units::si::meter,
-                                       0 * corsika::units::si::meter},
-              corsika::units::si::meter * std::numeric_limits<double>::infinity()) {}
-
-    bool Contains(corsika::geometry::Point const&) const override { return true; }
-  };
-
-  template <typename IEnvironmentModel>
-  class Environment {
-  public:
-    using BaseNodeType = VolumeTreeNode<IEnvironmentModel>;
-
-    Environment()
-        : fCoordinateSystem{corsika::geometry::RootCoordinateSystem::GetInstance()
-                                .GetRootCoordinateSystem()}
-        , fUniverse(std::make_unique<BaseNodeType>(
-              std::make_unique<Universe>(fCoordinateSystem))) {}
-
-    auto& GetUniverse() { return fUniverse; }
-    auto const& GetUniverse() const { return fUniverse; }
-
-    auto const& GetCoordinateSystem() const { return fCoordinateSystem; }
-
-    // factory method for creation of VolumeTreeNodes
-    template <class TVolumeType, typename... TVolumeArgs>
-    static auto CreateNode(TVolumeArgs&&... args) {
-      static_assert(std::is_base_of_v<corsika::geometry::Volume, TVolumeType>,
-                    "unusable type provided, needs to be derived from "
-                    "\"corsika::geometry::Volume\"");
-
-      return std::make_unique<BaseNodeType>(
-          std::make_unique<TVolumeType>(std::forward<TVolumeArgs>(args)...));
-    }
-
-  private:
-    corsika::geometry::CoordinateSystem const& fCoordinateSystem;
-    typename BaseNodeType::VTNUPtr fUniverse;
-  };
-
-} // namespace corsika::environment
diff --git a/Environment/FlatExponential.h b/Environment/FlatExponential.h
deleted file mode 100644
index 8aeafbce4a776c1ae1dd4b335c3578962a21e215..0000000000000000000000000000000000000000
--- a/Environment/FlatExponential.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/BaseExponential.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <corsika/setup/SetupTrajectory.h>
-
-namespace corsika::environment {
-
-  //clang-format off
-  /**
-   * flat exponential density distribution with
-   * \f[
-   *  \varrho(r) = \varrho_0 \exp\left( \frac{1}{\lambda} (r - p) \cdot
-   *    \vec{a} \right).
-   * \f]
-   * \f$ \vec{a} \f$ denotes the axis and should be normalized to avoid degeneracy
-   * with the scale parameter \f$ \lambda \f$.
-   */
-  //clang-format on
-  template <class T>
-  class FlatExponential : public BaseExponential<FlatExponential<T>>, public T {
-    geometry::Vector<units::si::dimensionless_d> const fAxis;
-    NuclearComposition const fNuclComp;
-
-    using Base = BaseExponential<FlatExponential<T>>;
-
-  public:
-    FlatExponential(geometry::Point const& vP0,
-                    geometry::Vector<units::si::dimensionless_d> const& vAxis,
-                    units::si::MassDensityType vRho, units::si::LengthType vLambda,
-                    NuclearComposition vNuclComp)
-        : Base(vP0, vRho, vLambda)
-        , fAxis(vAxis)
-        , fNuclComp(vNuclComp) {}
-
-    units::si::MassDensityType GetMassDensity(geometry::Point const& vP) const override {
-      return Base::fRho0 * exp(Base::fInvLambda * (vP - Base::fP0).dot(fAxis));
-    }
-
-    NuclearComposition const& GetNuclearComposition() const override { return fNuclComp; }
-
-    units::si::GrammageType IntegratedGrammage(setup::Trajectory const& vLine,
-                                               units::si::LengthType vTo) const override {
-      return Base::IntegratedGrammage(vLine, vTo, fAxis);
-    }
-
-    units::si::LengthType ArclengthFromGrammage(
-        setup::Trajectory const& vLine,
-        units::si::GrammageType vGrammage) const override {
-      return Base::ArclengthFromGrammage(vLine, vGrammage, fAxis);
-    }
-  };
-} // namespace corsika::environment
diff --git a/Environment/HomogeneousMedium.h b/Environment/HomogeneousMedium.h
deleted file mode 100644
index f39cc70610c7e9fdca38172e51f1d9c8179f494b..0000000000000000000000000000000000000000
--- a/Environment/HomogeneousMedium.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Trajectory.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <corsika/setup/SetupTrajectory.h>
-
-#include <cassert>
-
-/**
- * a homogeneous medium
- */
-
-namespace corsika::environment {
-
-  template <class T>
-  class HomogeneousMedium : public T {
-    corsika::units::si::MassDensityType const fDensity;
-    NuclearComposition const fNuclComp;
-
-  public:
-    HomogeneousMedium(corsika::units::si::MassDensityType pDensity,
-                      NuclearComposition pNuclComp)
-        : fDensity(pDensity)
-        , fNuclComp(pNuclComp) {}
-
-    corsika::units::si::MassDensityType GetMassDensity(
-        corsika::geometry::Point const&) const override {
-      return fDensity;
-    }
-    NuclearComposition const& GetNuclearComposition() const override { return fNuclComp; }
-
-    corsika::units::si::GrammageType IntegratedGrammage(
-        corsika::setup::Trajectory const&,
-        corsika::units::si::LengthType pTo) const override {
-      using namespace corsika::units::si;
-      return pTo * fDensity;
-    }
-
-    corsika::units::si::LengthType ArclengthFromGrammage(
-        corsika::setup::Trajectory const&,
-        corsika::units::si::GrammageType pGrammage) const override {
-      return pGrammage / fDensity;
-    }
-  };
-
-} // namespace corsika::environment
diff --git a/Environment/LinearApproximationIntegrator.h b/Environment/LinearApproximationIntegrator.h
deleted file mode 100644
index 3a6c37ccb6c7b92227093322a3024a864907fe0e..0000000000000000000000000000000000000000
--- a/Environment/LinearApproximationIntegrator.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <limits>
-
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/setup/SetupTrajectory.h>
-
-namespace corsika::environment {
-  template <class TDerived>
-  class LinearApproximationIntegrator {
-    auto const& GetImplementation() const { return *static_cast<TDerived const*>(this); }
-
-  public:
-    auto IntegrateGrammage(corsika::setup::Trajectory const& line,
-                           corsika::units::si::LengthType length) const {
-      auto const c0 = GetImplementation().EvaluateAt(line.GetPosition(0));
-      auto const c1 = GetImplementation().fRho.FirstDerivative(line.GetPosition(0),
-                                                               line.GetDirection(0));
-      return (c0 + 0.5 * c1 * length) * length;
-    }
-
-    auto ArclengthFromGrammage(corsika::setup::Trajectory const& line,
-                               corsika::units::si::GrammageType grammage) const {
-      auto const c0 = GetImplementation().fRho(line.GetPosition(0));
-      auto const c1 = GetImplementation().fRho.FirstDerivative(line.GetPosition(0),
-                                                               line.GetDirection(0));
-
-      return (1 - 0.5 * grammage * c1 / (c0 * c0)) * grammage / c0;
-    }
-
-    auto MaximumLength(corsika::setup::Trajectory const& line,
-                       [[maybe_unused]] double relError) const {
-      using namespace corsika::units::si;
-      [[maybe_unused]] auto const c1 = GetImplementation().fRho.SecondDerivative(
-          line.GetPosition(0), line.GetDirection(0));
-
-      // 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
deleted file mode 100644
index 42b1beca0af1791e057183de49efe4d2710bd192..0000000000000000000000000000000000000000
--- a/Environment/NuclearComposition.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <cassert>
-#include <functional>
-#include <numeric>
-#include <random>
-#include <stdexcept>
-#include <vector>
-
-namespace corsika::environment {
-  class NuclearComposition {
-    std::vector<float> const fNumberFractions; //!< relative fractions of number density
-    std::vector<corsika::particles::Code> const
-        fComponents; //!< particle codes of consitutents
-
-    double const fAvgMassNumber;
-
-    std::size_t hash_;
-
-    template <class AConstIterator, class BConstIterator>
-    class WeightProviderIterator {
-      AConstIterator fAIter;
-      BConstIterator fBIter;
-
-    public:
-      using value_type = double;
-      using iterator_category = std::input_iterator_tag;
-      using pointer = value_type*;
-      using reference = value_type&;
-      using difference_type = ptrdiff_t;
-
-      WeightProviderIterator(AConstIterator a, BConstIterator b)
-          : fAIter(a)
-          , fBIter(b) {}
-
-      value_type operator*() const { return ((*fAIter) * (*fBIter)).magnitude(); }
-
-      WeightProviderIterator& operator++() { // prefix ++
-        ++fAIter;
-        ++fBIter;
-        return *this;
-      }
-
-      auto operator==(WeightProviderIterator other) { return fAIter == other.fAIter; }
-
-      auto operator!=(WeightProviderIterator other) { return !(*this == other); }
-    };
-
-  public:
-    NuclearComposition(std::vector<corsika::particles::Code> pComponents,
-                       std::vector<float> pFractions)
-        : fNumberFractions(pFractions)
-        , fComponents(pComponents)
-        , fAvgMassNumber(std::inner_product(
-              pComponents.cbegin(), pComponents.cend(), pFractions.cbegin(), 0.,
-              std::plus<double>(), [](auto const compID, auto const fraction) -> double {
-                if (particles::IsNucleus(compID)) {
-                  return particles::GetNucleusA(compID) * fraction;
-                } else {
-                  return particles::GetMass(compID) /
-                         units::si::ConvertSIToHEP(units::constants::u) * fraction;
-                }
-              })) {
-      assert(pComponents.size() == pFractions.size());
-      auto const sumFractions =
-          std::accumulate(pFractions.cbegin(), pFractions.cend(), 0.f);
-
-      if (!(0.999f < sumFractions && sumFractions < 1.001f)) {
-        throw std::runtime_error("element fractions do not add up to 1");
-      }
-      updateHash();
-    }
-
-    template <typename TFunction>
-    auto WeightedSum(TFunction func) const {
-      using ResultQuantity = decltype(func(*fComponents.cbegin()));
-
-      auto const prod = [&](auto const compID, auto const fraction) {
-        return func(compID) * fraction;
-      };
-
-      if constexpr (phys::units::is_quantity_v<ResultQuantity>) {
-        return std::inner_product(
-            fComponents.cbegin(), fComponents.cend(), fNumberFractions.cbegin(),
-            ResultQuantity::zero(), // .zero() is defined for quantity types only
-            std::plus<ResultQuantity>(), prod);
-      } else {
-        return std::inner_product(
-            fComponents.cbegin(), fComponents.cend(), fNumberFractions.cbegin(),
-            ResultQuantity(0), // in other cases we have to use a bare 0
-            std::plus<ResultQuantity>(), prod);
-      }
-    }
-
-    auto size() const { return fNumberFractions.size(); }
-
-    auto const& GetFractions() const { return fNumberFractions; }
-    auto const& GetComponents() const { return fComponents; }
-    auto const GetAverageMassNumber() const { return fAvgMassNumber; }
-
-    template <class TRNG>
-    corsika::particles::Code SampleTarget(
-        std::vector<corsika::units::si::CrossSectionType> const& sigma,
-        TRNG& randomStream) const {
-      using namespace corsika::units::si;
-
-      assert(sigma.size() == fNumberFractions.size());
-
-      std::discrete_distribution channelDist(
-          WeightProviderIterator<decltype(fNumberFractions.begin()),
-                                 decltype(sigma.begin())>(fNumberFractions.begin(),
-                                                          sigma.begin()),
-          WeightProviderIterator<decltype(fNumberFractions.begin()),
-                                 decltype(sigma.end())>(fNumberFractions.end(),
-                                                        sigma.end()));
-
-      auto const iChannel = channelDist(randomStream);
-      return fComponents[iChannel];
-    }
-
-    // Note: when this class ever modifies its internal data, the hash
-    // must be updated, too!
-    size_t hash() const { return hash_; }
-
-  private:
-    void updateHash() {
-      std::vector<std::size_t> hashes;
-      for (float ifrac : GetFractions()) hashes.push_back(std::hash<float>{}(ifrac));
-      for (corsika::particles::Code icode : GetComponents())
-        hashes.push_back(std::hash<int>{}(static_cast<int>(icode)));
-      std::size_t h = std::hash<double>{}(GetAverageMassNumber());
-      for (std::size_t ih : hashes) h = h ^ (ih << 1);
-      hash_ = h;
-    }
-  };
-
-} // namespace corsika::environment
diff --git a/Environment/SlidingPlanarExponential.h b/Environment/SlidingPlanarExponential.h
deleted file mode 100644
index aae3ccef18ebd1abfafe48afe60963a3ed5da6f1..0000000000000000000000000000000000000000
--- a/Environment/SlidingPlanarExponential.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/FlatExponential.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Trajectory.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/units/PhysicalUnits.h>
-
-namespace corsika::environment {
-
-  // clang-format off
-  /**
-   * The SlidingPlanarExponential models mass density as
-   * \f[
-   *   \varrho(r) = \varrho_0 \exp\left( \frac{|p_0 - r|}{\lambda} \right).
-   * \f]
-   * For grammage/length conversion, the density distribution is approximated as
-   * locally flat at the starting point \f$ r_0 \f$ of the trajectory with the axis pointing
-   * from \f$ p_0 \f$ to \f$ r_0 \f$.
-   */
-   //clang-format on
-   
-  template <class T>
-  class SlidingPlanarExponential : public BaseExponential<SlidingPlanarExponential<T>>,
-                                   public T {
-    NuclearComposition const nuclComp_;
-    units::si::LengthType const referenceHeight_;
-
-    using Base = BaseExponential<SlidingPlanarExponential<T>>;
-
-  public:
-    SlidingPlanarExponential(geometry::Point const& p0, units::si::MassDensityType rho0,
-                             units::si::LengthType lambda, NuclearComposition nuclComp, units::si::LengthType referenceHeight = units::si::LengthType::zero())
-        : Base(p0, rho0, lambda)
-        , nuclComp_(nuclComp),
-        referenceHeight_(referenceHeight) {}
-
-    units::si::MassDensityType GetMassDensity(
-        geometry::Point const& p) const override {
-      auto const height = (p - Base::fP0).norm() - referenceHeight_;
-      return Base::fRho0 * exp(Base::fInvLambda * height);
-    }
-
-    NuclearComposition const& GetNuclearComposition() const override { return nuclComp_; }
-
-    units::si::GrammageType IntegratedGrammage(
-        setup::Trajectory const& line,
-        units::si::LengthType l) const override {
-      auto const axis = (line.GetLine().GetR0() - Base::fP0).normalized();
-      return Base::IntegratedGrammage(line, l, axis);
-    }
-
-    units::si::LengthType ArclengthFromGrammage(
-        setup::Trajectory const& line,
-        units::si::GrammageType grammage) const override {
-      auto const axis = (line.GetLine().GetR0() - Base::fP0).normalized();
-      return Base::ArclengthFromGrammage(line, grammage, axis);
-    }
-  };
-
-} // namespace corsika::environment
diff --git a/Environment/VolumeTreeNode.h b/Environment/VolumeTreeNode.h
deleted file mode 100644
index ad3306810d4efccbee8905d5d281785e6180880d..0000000000000000000000000000000000000000
--- a/Environment/VolumeTreeNode.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/IEmpty.hpp>
-#include <corsika/geometry/Volume.h>
-#include <memory>
-#include <vector>
-
-namespace corsika::environment {
-
-  template <typename TModelProperties = IEmpty>
-  class VolumeTreeNode {
-  public:
-    using IModelProperties = TModelProperties;
-    using VTN_type = VolumeTreeNode<IModelProperties>;
-    using VTNUPtr = std::unique_ptr<VolumeTreeNode<IModelProperties>>;
-    using IMPSharedPtr = std::shared_ptr<IModelProperties>;
-    using VolUPtr = std::unique_ptr<corsika::geometry::Volume>;
-
-    VolumeTreeNode(VolUPtr pVolume = nullptr)
-        : fGeoVolume(std::move(pVolume)) {}
-
-    //! convenience function equivalent to Volume::Contains
-    bool Contains(corsika::geometry::Point const& p) const {
-      return fGeoVolume->Contains(p);
-    }
-
-    VolumeTreeNode<IModelProperties> const* Excludes(
-        corsika::geometry::Point const& p) const {
-      auto exclContainsIter =
-          std::find_if(fExcludedNodes.cbegin(), fExcludedNodes.cend(),
-                       [&](auto const& s) { return bool(s->Contains(p)); });
-
-      return exclContainsIter != fExcludedNodes.cend() ? *exclContainsIter : nullptr;
-    }
-
-    /** returns a pointer to the sub-VolumeTreeNode which is "responsible" for the given
-     * \class Point \p p, or nullptr iff \p p is not contained in this volume.
-     */
-    VolumeTreeNode<IModelProperties> const* GetContainingNode(
-        corsika::geometry::Point const& p) const {
-      if (!Contains(p)) { return nullptr; }
-
-      if (auto const childContainsIter =
-              std::find_if(fChildNodes.cbegin(), fChildNodes.cend(),
-                           [&](auto const& s) { return bool(s->Contains(p)); });
-          childContainsIter == fChildNodes.cend()) // not contained in any of the children
-      {
-        if (auto const exclContainsIter = Excludes(p)) // contained in any excluded nodes
-        {
-          return exclContainsIter->GetContainingNode(p);
-        } else {
-          return this;
-        }
-      } else {
-        return (*childContainsIter)->GetContainingNode(p);
-      }
-    }
-
-    /**
-     * Traverses the VolumeTree pre- or post-order and calls the functor  \p func for each
-     * node. \p func takes a reference to VolumeTreeNode as argument. The return value \p
-     * func is ignored.
-     */
-    template <typename TCallable, bool preorder = true>
-    void walk(TCallable func) {
-      if constexpr (preorder) { func(*this); }
-
-      std::for_each(fChildNodes.begin(), fChildNodes.end(),
-                    [&](auto& v) { v->walk(func); });
-
-      if constexpr (!preorder) { func(*this); };
-    }
-
-    void AddChild(VTNUPtr pChild) {
-      pChild->fParentNode = this;
-      fChildNodes.push_back(std::move(pChild));
-      // It is a bad idea to return an iterator to the inserted element
-      // because it might get invalidated when the vector needs to grow
-      // later and the caller won't notice.
-    }
-
-    void ExcludeOverlapWith(VTNUPtr const& pNode) {
-      fExcludedNodes.push_back(pNode.get());
-    }
-
-    const VTN_type* GetParent() const { return fParentNode; };
-
-    auto const& GetChildNodes() const { return fChildNodes; }
-
-    auto const& GetExcludedNodes() const { return fExcludedNodes; }
-
-    auto const& GetVolume() const { return *fGeoVolume; }
-
-    auto const& GetModelProperties() const { return *fModelProperties; }
-
-    bool HasModelProperties() const { return fModelProperties.get() != nullptr; }
-
-    template <typename ModelProperties, typename... Args>
-    auto SetModelProperties(Args&&... args) {
-      static_assert(std::is_base_of_v<IModelProperties, ModelProperties>,
-                    "unusable model properties type provided");
-
-      fModelProperties = std::make_shared<ModelProperties>(std::forward<Args>(args)...);
-      return fModelProperties;
-    }
-
-    void SetModelProperties(IMPSharedPtr ptr) { fModelProperties = ptr; }
-
-    /*
-    template <class MediumType, typename... Args>
-    static auto CreateMedium(Args&&... args) {
-      static_assert(std::is_base_of_v<, MediumType>,
-                    "unusable type provided, needs to be derived from \"IMediumModel\"");
-
-      return std::make_shared<MediumType>(std::forward<Args>(args)...);
-    }
-    */
-  private:
-    std::vector<VTNUPtr> fChildNodes;
-    std::vector<VolumeTreeNode<IModelProperties> const*> fExcludedNodes;
-    VolumeTreeNode<IModelProperties> const* fParentNode = nullptr;
-    VolUPtr fGeoVolume;
-    IMPSharedPtr fModelProperties;
-  };
-
-} // namespace corsika::environment
diff --git a/FIXME.md b/FIXME.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a5acb220cba997c882604620a28a8014710fc9b
--- /dev/null
+++ b/FIXME.md
@@ -0,0 +1,5129 @@
+#All files:
+
+1. In all files do `#define guards` -> `#pragma once` to get faster compile times
+2. Redefine the folder structure:
+
+
+```
+#include <corsika/coast/...>
+#include <hydra/...>
+
+corsika
+|-- cmake
+|   |-- CodeCoverage
+|   |-- CodeCoverage.cmake
+|   |-- CorsikaUtilities.cmake
+|   `-- FindPythia8.cmake
+|-- coast
+|   |-- COASTProcess.h
+|   |-- COASTStack.h
+|   `-- ParticleConversion.h
+|-- docs
+|-- |doxygen
+|   `-- Doxyfile.in
+|-- testing  
+| 
+|-- examples
+|   |-- boundary_example.cc
+|   |-- cascade_example.cc
+|   |-- cascade_proton_example.cc
+|   |-- CMakeLists.txt
+|   |-- geometry_example.cc
+|   |-- helix_example.cc
+|   |-- logger_example.cc
+|   |-- stack_example.cc
+|   |-- staticsequence_example.cc
+|   |-- stopping_power.cc
+|   `-- vertical_EAS.cc
+|-- environment
+|   |-- BaseExponential.h
+|   |-- DensityFunction.h
+|   |-- Environment.h
+|   |-- FlatExponential.h
+|   |-- HomogeneousMedium.h
+|   |-- IMediumModel.hpp
+|   |-- InhomogeneousMedium.h
+|   |-- LayeredSphericalAtmosphereBuilder.h
+|   |-- LinearApproximationIntegrator.h
+|   |-- NameModel.h
+|   |-- NuclearComposition.h
+|   |-- SlidingPlanarExponential.h
+|   `-- VolumeTreeNode.hpp
+|-- framework
+|   |-- cascade
+|   |   |-- Cascade.h
+|   |-- geometry
+|   |   |-- BaseTrajectory.h
+|   |   |-- BaseVector.h
+|   |   |-- CMakeLists.txt
+|   |   |-- CoordinateSystem.h
+|   |   |-- FourVector.h
+|   |   |-- Helix.h
+|   |   |-- Line.h
+|   |   |-- Plane.h
+|   |   |-- Point.h
+|   |   |-- QuantityVector.h
+|   |   |-- RootCoordinateSystem.h
+|   |   |-- Sphere.h
+|   |   |-- Trajectory.h
+|   |   |-- Vector.h
+|   |   `-- Volume.h
+|   |-- logging
+|   |   |-- BufferedSink.h
+|   |   |-- Logger.h
+|   |   |-- MessageOff.h
+|   |   |-- MessageOn.h
+|   |   |-- NoSink.h
+|   |   `-- Sink.h
+|   |-- Particles
+|   |   `-- ParticleProperties.h
+|   |-- ProcessSequence
+|   |   |-- BaseProcess.h
+|   |   |-- BoundaryCrossingProcess.h
+|   |   |-- ContinuousProcess.h
+|   |   |-- DecayProcess.h
+|   |   |-- InteractionProcess.h
+|   |   |-- ProcessReturn.h
+|   |   |-- ProcessSequence.h
+|   |   |-- ProcessSignature.h
+|   |   |-- SecondariesProcess.h
+|   |   `-- StackProcess.h
+|   |-- Random
+|   |   |-- CMakeLists.txt
+|   |   |-- ExponentialDistribution.h
+|   |   |-- RNGManager.h
+|   |   `-- UniformRealDistribution.h
+|   |-- StackInterface
+|   |   |-- CMakeLists.txt
+|   |   |-- CombinedStack.h
+|   |   |-- comp
+|   |   |-- ParticleBase.h
+|   |   |-- SecondaryView.h
+|   |   |-- Stack.dox
+|   |   |-- Stack.h
+|   |   `-- StackIteratorInterface.h
+|   |-- Testing
+|   |   |-- test{...}.cc
+|   |-- Units
+|   |   |-- CMakeLists.txt
+|   |   |-- PhysicalConstants.h
+|   |   |-- PhysicalUnits.h
+|   |   `-- testUnits.cc
+|   |-- Utilities
+|   |   |-- Bit.h
+|   |   |-- CMakeLists.txt
+|   |   |-- COMBoost.cc
+|   |   |-- COMBoost.h
+|   |   |-- CorsikaFenvDefault.cc
+|   |   |-- CorsikaFenvFallback.cc
+|   |   |-- CorsikaFenv.h
+|   |   |-- CorsikaFenvOSX.cc
+|   |   |-- MetaProgramming.h
+|   |   |-- sgn.h
+|   |   |-- Singleton.h
+|   |   |-- testCOMBoost.cc
+|   |   |-- testCorsikaFenv.cc
+|   |   `-- try_feenableexcept.cc
+|   `-- CMakeLists.txt
+|-- Main
+|   |-- CMakeLists.txt
+|   `-- shower.cc
+|-- nuc
+|   |-- DataSet04.dat
+|   |-- ExpDatabase_Fortran77_v04.tar.gz
+|   |-- input04.f
+|   |-- main04.f
+|   `-- Makefile_ifc
+|-- Processes
+|   |-- EnergyLoss
+|   |   |-- CMakeLists.txt
+|   |   |-- EnergyLoss.cc
+|   |   |-- EnergyLoss.h
+|   |   |-- Properties8.dat
+|   |   |-- ReadData.py
+|   |   `-- SummaryPropTable.dat
+|   |-- HadronicElasticModel
+|   |   |-- CMakeLists.txt
+|   |   |-- HadronicElasticModel.cc
+|   |   `-- HadronicElasticModel.h
+|   |-- NullModel
+|   |   |-- CMakeLists.txt
+|   |   |-- NullModel.cc
+|   |   |-- NullModel.h
+|   |   `-- testNullModel.cc
+|   |-- ObservationPlane
+|   |   |-- CMakeLists.txt
+|   |   |-- ObservationPlane.cc
+|   |   |-- ObservationPlane.h
+|   |   `-- testObservationPlane.cc
+|   |-- ParticleCut
+|   |   |-- CMakeLists.txt
+|   |   |-- ParticleCut.cc
+|   |   |-- ParticleCut.h
+|   |   `-- testParticleCut.cc
+|   |-- Pythia
+|   |   |-- CMakeLists.txt
+|   |   |-- Decay.cc
+|   |   |-- Decay.h
+|   |   |-- Interaction.cc
+|   |   |-- Interaction.h
+|   |   |-- Random.cc
+|   |   |-- Random.h
+|   |   `-- testPythia.cc
+|   |-- QGSJetII
+|   |   |-- CMakeLists.txt
+|   |   |-- code_generator.py
+|   |   |-- Interaction.cc
+|   |   |-- Interaction.h
+|   |   |-- ParticleConversion.cc
+|   |   |-- ParticleConversion.h
+|   |   |-- qgsjet-II-04.cc
+|   |   |-- qgsjet-II-04-codes.dat
+|   |   |-- qgsjet-II-04.f
+|   |   |-- qgsjet-II-04.h
+|   |   |-- QGSJetIIFragmentsStack.h
+|   |   |-- QGSJetIIStack.h
+|   |   `-- testQGSJetII.cc
+|   |-- Sibyll
+|   |   |-- CMakeLists.txt
+|   |   |-- code_generator.py
+|   |   |-- Decay.cc
+|   |   |-- Decay.h
+|   |   |-- gasdev.f
+|   |   |-- Interaction.cc
+|   |   |-- Interaction.h
+|   |   |-- NuclearInteraction.cc
+|   |   |-- NuclearInteraction.h
+|   |   |-- nuclib.f
+|   |   |-- nuclib.h
+|   |   |-- ParticleConversion.cc
+|   |   |-- ParticleConversion.h
+|   |   |-- rndm_dbl.f
+|   |   |-- SibStack.h
+|   |   |-- sibyll2.3c.cc
+|   |   |-- sibyll2.3c.f
+|   |   |-- sibyll2.3c.h
+|   |   |-- sibyll_codes.dat
+|   |   |-- signuc.f
+|   |   `-- testSibyll.cc
+|   |-- StackInspector
+|   |   |-- CMakeLists.txt
+|   |   |-- StackInspector.cc
+|   |   |-- StackInspector.h
+|   |   `-- testStackInspector.cc
+|   |-- SwitchProcess
+|   |   |-- CMakeLists.txt
+|   |   |-- SwitchProcess.h
+|   |   `-- testSwitchProcess.cc
+|   |-- TrackingLine
+|   |   |-- CMakeLists.txt
+|   |   |-- testTrackingLine.cc
+|   |   |-- testTrackingLineStack.h
+|   |   |-- TrackingLine.cc
+|   |   `-- TrackingLine.h
+|   |-- TrackWriter
+|   |   |-- CMakeLists.txt
+|   |   |-- TrackWriter.cc
+|   |   `-- TrackWriter.h
+|   |-- UrQMD
+|   |   |-- addpart.f
+|   |   |-- angdis.f
+|   |   |-- anndec.f
+|   |   |-- blockres.f
+|   |   |-- boxinc.f
+|   |   |-- boxprg.f
+|   |   |-- cascinit.f
+|   |   |-- CMakeLists.txt
+|   |   |-- colltab.f
+|   |   |-- coload.f
+|   |   |-- comnorm.f
+|   |   |-- comres.f
+|   |   |-- coms.f
+|   |   |-- comstr.f
+|   |   |-- comwid.f
+|   |   |-- Copyright
+|   |   |-- dectim.f
+|   |   |-- delpart.f
+|   |   |-- detbal.f
+|   |   |-- dwidth.f
+|   |   |-- error.f
+|   |   |-- freezeout.f
+|   |   |-- getmass.f
+|   |   |-- getspin.f
+|   |   |-- init.f
+|   |   |-- inputs.f
+|   |   |-- iso.f
+|   |   |-- ityp2pdg.f
+|   |   |-- jdecay2.f
+|   |   |-- make22.f
+|   |   |-- newpart.f
+|   |   |-- numrec.f
+|   |   |-- options.f
+|   |   |-- outcom.f
+|   |   |-- output.f
+|   |   |-- paulibl.f
+|   |   |-- proppot.f
+|   |   |-- README
+|   |   |-- saveinfo.f
+|   |   |-- scatter.f
+|   |   |-- siglookup.f
+|   |   |-- string.f
+|   |   |-- tabinit.f
+|   |   |-- testUrQMD.cc
+|   |   |-- UrQMD.cc
+|   |   |-- urqmd.f
+|   |   |-- UrQMD.h
+|   |   |-- urqmdInterface.F
+|   |   `-- whichres.f
+|   `-- CMakeLists.txt
+|-- Setup
+|   |-- CMakeLists.txt
+|   |-- SetupEnvironment.h
+|   |-- SetupLogger.h
+|   |-- SetupStack.h
+|   `-- SetupTrajectory.h
+|-- Stack
+|   |-- DummyStack
+|   |   |-- CMakeLists.txt
+|   |   `-- DummyStack.h
+|   |-- NuclearStackExtension
+|   |   |-- CMakeLists.txt
+|   |   |-- NuclearStackExtension.h
+|   |   `-- testNuclearStackExtension.cc
+|   |-- SuperStupidStack
+|   |   |-- CMakeLists.txt
+|   |   |-- SuperStupidStack.h
+|   |   `-- testSuperStupidStack.cc
+|   `-- CMakeLists.txt
+|-- ThirdParty
+|   |-- boost
+|   |   |-- algorithm
+|   |   |   |-- cxx11
+|   |   |   |   `-- all_of.hpp
+|   |   |   |-- string
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- case_conv.hpp
+|   |   |   |   |   |-- classification.hpp
+|   |   |   |   |   |-- finder.hpp
+|   |   |   |   |   |-- find_format_all.hpp
+|   |   |   |   |   |-- find_format.hpp
+|   |   |   |   |   |-- find_format_store.hpp
+|   |   |   |   |   |-- find_iterator.hpp
+|   |   |   |   |   |-- formatter.hpp
+|   |   |   |   |   |-- predicate.hpp
+|   |   |   |   |   |-- replace_storage.hpp
+|   |   |   |   |   |-- sequence.hpp
+|   |   |   |   |   |-- trim.hpp
+|   |   |   |   |   `-- util.hpp
+|   |   |   |   |-- std
+|   |   |   |   |   |-- list_traits.hpp
+|   |   |   |   |   |-- slist_traits.hpp
+|   |   |   |   |   `-- string_traits.hpp
+|   |   |   |   |-- case_conv.hpp
+|   |   |   |   |-- classification.hpp
+|   |   |   |   |-- compare.hpp
+|   |   |   |   |-- concept.hpp
+|   |   |   |   |-- config.hpp
+|   |   |   |   |-- constants.hpp
+|   |   |   |   |-- erase.hpp
+|   |   |   |   |-- finder.hpp
+|   |   |   |   |-- find_format.hpp
+|   |   |   |   |-- find.hpp
+|   |   |   |   |-- find_iterator.hpp
+|   |   |   |   |-- formatter.hpp
+|   |   |   |   |-- iter_find.hpp
+|   |   |   |   |-- join.hpp
+|   |   |   |   |-- predicate_facade.hpp
+|   |   |   |   |-- predicate.hpp
+|   |   |   |   |-- replace.hpp
+|   |   |   |   |-- sequence_traits.hpp
+|   |   |   |   |-- split.hpp
+|   |   |   |   |-- std_containers_traits.hpp
+|   |   |   |   |-- trim.hpp
+|   |   |   |   `-- yes_no_type.hpp
+|   |   |   `-- string.hpp
+|   |   |-- assign
+|   |   |   |-- assignment_exception.hpp
+|   |   |   `-- list_of.hpp
+|   |   |-- bind
+|   |   |   |-- apply.hpp
+|   |   |   |-- arg.hpp
+|   |   |   |-- bind_cc.hpp
+|   |   |   |-- bind.hpp
+|   |   |   |-- bind_mf2_cc.hpp
+|   |   |   |-- bind_mf_cc.hpp
+|   |   |   |-- bind_template.hpp
+|   |   |   |-- mem_fn_cc.hpp
+|   |   |   |-- mem_fn.hpp
+|   |   |   |-- mem_fn_template.hpp
+|   |   |   |-- mem_fn_vw.hpp
+|   |   |   |-- placeholders.hpp
+|   |   |   `-- storage.hpp
+|   |   |-- chrono
+|   |   |   |-- detail
+|   |   |   |   |-- inlined
+|   |   |   |   |   |-- mac
+|   |   |   |   |   |   |-- chrono.hpp
+|   |   |   |   |   |   |-- process_cpu_clocks.hpp
+|   |   |   |   |   |   `-- thread_clock.hpp
+|   |   |   |   |   |-- posix
+|   |   |   |   |   |   |-- chrono.hpp
+|   |   |   |   |   |   |-- process_cpu_clocks.hpp
+|   |   |   |   |   |   `-- thread_clock.hpp
+|   |   |   |   |   |-- win
+|   |   |   |   |   |   |-- chrono.hpp
+|   |   |   |   |   |   |-- process_cpu_clocks.hpp
+|   |   |   |   |   |   `-- thread_clock.hpp
+|   |   |   |   |   |-- chrono.hpp
+|   |   |   |   |   |-- process_cpu_clocks.hpp
+|   |   |   |   |   `-- thread_clock.hpp
+|   |   |   |   |-- is_evenly_divisible_by.hpp
+|   |   |   |   |-- static_assert.hpp
+|   |   |   |   `-- system.hpp
+|   |   |   |-- chrono.hpp
+|   |   |   |-- clock_string.hpp
+|   |   |   |-- config.hpp
+|   |   |   |-- duration.hpp
+|   |   |   |-- process_cpu_clocks.hpp
+|   |   |   |-- system_clocks.hpp
+|   |   |   |-- thread_clock.hpp
+|   |   |   `-- time_point.hpp
+|   |   |-- concept
+|   |   |   |-- detail
+|   |   |   |   |-- backward_compatibility.hpp
+|   |   |   |   |-- borland.hpp
+|   |   |   |   |-- concept_def.hpp
+|   |   |   |   |-- concept_undef.hpp
+|   |   |   |   |-- general.hpp
+|   |   |   |   |-- has_constraints.hpp
+|   |   |   |   `-- msvc.hpp
+|   |   |   |-- assert.hpp
+|   |   |   `-- usage.hpp
+|   |   |-- config
+|   |   |   |-- abi
+|   |   |   |   |-- borland_prefix.hpp
+|   |   |   |   |-- borland_suffix.hpp
+|   |   |   |   |-- msvc_prefix.hpp
+|   |   |   |   `-- msvc_suffix.hpp
+|   |   |   |-- compiler
+|   |   |   |   |-- borland.hpp
+|   |   |   |   |-- clang.hpp
+|   |   |   |   |-- codegear.hpp
+|   |   |   |   |-- comeau.hpp
+|   |   |   |   |-- common_edg.hpp
+|   |   |   |   |-- compaq_cxx.hpp
+|   |   |   |   |-- cray.hpp
+|   |   |   |   |-- diab.hpp
+|   |   |   |   |-- digitalmars.hpp
+|   |   |   |   |-- gcc.hpp
+|   |   |   |   |-- gcc_xml.hpp
+|   |   |   |   |-- greenhills.hpp
+|   |   |   |   |-- hp_acc.hpp
+|   |   |   |   |-- intel.hpp
+|   |   |   |   |-- kai.hpp
+|   |   |   |   |-- metrowerks.hpp
+|   |   |   |   |-- mpw.hpp
+|   |   |   |   |-- nvcc.hpp
+|   |   |   |   |-- pathscale.hpp
+|   |   |   |   |-- pgi.hpp
+|   |   |   |   |-- sgi_mipspro.hpp
+|   |   |   |   |-- sunpro_cc.hpp
+|   |   |   |   |-- vacpp.hpp
+|   |   |   |   |-- visualc.hpp
+|   |   |   |   |-- xlcpp.hpp
+|   |   |   |   `-- xlcpp_zos.hpp
+|   |   |   |-- detail
+|   |   |   |   |-- posix_features.hpp
+|   |   |   |   |-- select_compiler_config.hpp
+|   |   |   |   |-- select_platform_config.hpp
+|   |   |   |   |-- select_stdlib_config.hpp
+|   |   |   |   `-- suffix.hpp
+|   |   |   |-- no_tr1
+|   |   |   |   |-- cmath.hpp
+|   |   |   |   |-- complex.hpp
+|   |   |   |   |-- functional.hpp
+|   |   |   |   |-- memory.hpp
+|   |   |   |   `-- utility.hpp
+|   |   |   |-- platform
+|   |   |   |   |-- aix.hpp
+|   |   |   |   |-- amigaos.hpp
+|   |   |   |   |-- beos.hpp
+|   |   |   |   |-- bsd.hpp
+|   |   |   |   |-- cloudabi.hpp
+|   |   |   |   |-- cray.hpp
+|   |   |   |   |-- cygwin.hpp
+|   |   |   |   |-- haiku.hpp
+|   |   |   |   |-- hpux.hpp
+|   |   |   |   |-- irix.hpp
+|   |   |   |   |-- linux.hpp
+|   |   |   |   |-- macos.hpp
+|   |   |   |   |-- qnxnto.hpp
+|   |   |   |   |-- solaris.hpp
+|   |   |   |   |-- symbian.hpp
+|   |   |   |   |-- vms.hpp
+|   |   |   |   |-- vxworks.hpp
+|   |   |   |   |-- win32.hpp
+|   |   |   |   `-- zos.hpp
+|   |   |   |-- stdlib
+|   |   |   |   |-- dinkumware.hpp
+|   |   |   |   |-- libcomo.hpp
+|   |   |   |   |-- libcpp.hpp
+|   |   |   |   |-- libstdcpp3.hpp
+|   |   |   |   |-- modena.hpp
+|   |   |   |   |-- msl.hpp
+|   |   |   |   |-- roguewave.hpp
+|   |   |   |   |-- sgi.hpp
+|   |   |   |   |-- stlport.hpp
+|   |   |   |   |-- vacpp.hpp
+|   |   |   |   `-- xlcpp_zos.hpp
+|   |   |   |-- abi_prefix.hpp
+|   |   |   |-- abi_suffix.hpp
+|   |   |   |-- auto_link.hpp
+|   |   |   |-- header_deprecated.hpp
+|   |   |   |-- helper_macros.hpp
+|   |   |   |-- pragma_message.hpp
+|   |   |   |-- requires_threads.hpp
+|   |   |   |-- user.hpp
+|   |   |   |-- warning_disable.hpp
+|   |   |   `-- workaround.hpp
+|   |   |-- container
+|   |   |   |-- detail
+|   |   |   |   |-- addressof.hpp
+|   |   |   |   |-- algorithm.hpp
+|   |   |   |   |-- allocation_type.hpp
+|   |   |   |   |-- allocator_version_traits.hpp
+|   |   |   |   |-- alloc_helpers.hpp
+|   |   |   |   |-- compare_functors.hpp
+|   |   |   |   |-- config_begin.hpp
+|   |   |   |   |-- config_end.hpp
+|   |   |   |   |-- construct_in_place.hpp
+|   |   |   |   |-- destroyers.hpp
+|   |   |   |   |-- iterator.hpp
+|   |   |   |   |-- iterators.hpp
+|   |   |   |   |-- mpl.hpp
+|   |   |   |   |-- multiallocation_chain.hpp
+|   |   |   |   |-- node_alloc_holder.hpp
+|   |   |   |   |-- placement_new.hpp
+|   |   |   |   |-- std_fwd.hpp
+|   |   |   |   |-- transform_iterator.hpp
+|   |   |   |   |-- type_traits.hpp
+|   |   |   |   |-- value_functors.hpp
+|   |   |   |   |-- value_init.hpp
+|   |   |   |   |-- variadic_templates_tools.hpp
+|   |   |   |   |-- version_type.hpp
+|   |   |   |   `-- workaround.hpp
+|   |   |   |-- allocator_traits.hpp
+|   |   |   |-- container_fwd.hpp
+|   |   |   |-- new_allocator.hpp
+|   |   |   |-- slist.hpp
+|   |   |   `-- throw_exception.hpp
+|   |   |-- container_hash
+|   |   |   |-- detail
+|   |   |   |   |-- float_functions.hpp
+|   |   |   |   |-- hash_float.hpp
+|   |   |   |   `-- limits.hpp
+|   |   |   |-- extensions.hpp
+|   |   |   |-- hash_fwd.hpp
+|   |   |   `-- hash.hpp
+|   |   |-- core
+|   |   |   |-- addressof.hpp
+|   |   |   |-- checked_delete.hpp
+|   |   |   |-- demangle.hpp
+|   |   |   |-- empty_value.hpp
+|   |   |   |-- enable_if.hpp
+|   |   |   |-- exchange.hpp
+|   |   |   |-- explicit_operator_bool.hpp
+|   |   |   |-- ignore_unused.hpp
+|   |   |   |-- is_same.hpp
+|   |   |   |-- lightweight_test.hpp
+|   |   |   |-- lightweight_test_trait.hpp
+|   |   |   |-- no_exceptions_support.hpp
+|   |   |   |-- noncopyable.hpp
+|   |   |   |-- null_deleter.hpp
+|   |   |   |-- pointer_traits.hpp
+|   |   |   |-- quick_exit.hpp
+|   |   |   |-- ref.hpp
+|   |   |   |-- scoped_enum.hpp
+|   |   |   |-- swap.hpp
+|   |   |   |-- typeinfo.hpp
+|   |   |   |-- uncaught_exceptions.hpp
+|   |   |   |-- underlying_type.hpp
+|   |   |   `-- use_default.hpp
+|   |   |-- detail
+|   |   |   |-- winapi
+|   |   |   |   |-- detail
+|   |   |   |   |   `-- deprecated_namespace.hpp
+|   |   |   |   |-- get_current_process.hpp
+|   |   |   |   |-- get_current_thread.hpp
+|   |   |   |   |-- get_last_error.hpp
+|   |   |   |   |-- get_process_times.hpp
+|   |   |   |   `-- get_thread_times.hpp
+|   |   |   |-- basic_pointerbuf.hpp
+|   |   |   |-- bitmask.hpp
+|   |   |   |-- call_traits.hpp
+|   |   |   |-- container_fwd.hpp
+|   |   |   |-- fenv.hpp
+|   |   |   |-- indirect_traits.hpp
+|   |   |   |-- is_incrementable.hpp
+|   |   |   |-- iterator.hpp
+|   |   |   |-- lcast_precision.hpp
+|   |   |   |-- lightweight_test.hpp
+|   |   |   |-- numeric_traits.hpp
+|   |   |   |-- reference_content.hpp
+|   |   |   |-- select_type.hpp
+|   |   |   |-- sp_typeinfo.hpp
+|   |   |   |-- templated_streams.hpp
+|   |   |   |-- utf8_codecvt_facet.hpp
+|   |   |   |-- utf8_codecvt_facet.ipp
+|   |   |   `-- workaround.hpp
+|   |   |-- exception
+|   |   |   |-- detail
+|   |   |   |   |-- error_info_impl.hpp
+|   |   |   |   |-- is_output_streamable.hpp
+|   |   |   |   |-- object_hex_dump.hpp
+|   |   |   |   |-- shared_ptr.hpp
+|   |   |   |   `-- type_info.hpp
+|   |   |   |-- current_exception_cast.hpp
+|   |   |   |-- diagnostic_information.hpp
+|   |   |   |-- exception.hpp
+|   |   |   |-- get_error_info.hpp
+|   |   |   |-- info.hpp
+|   |   |   |-- to_string.hpp
+|   |   |   `-- to_string_stub.hpp
+|   |   |-- filesystem
+|   |   |   |-- detail
+|   |   |   |   `-- utf8_codecvt_facet.hpp
+|   |   |   |-- config.hpp
+|   |   |   |-- convenience.hpp
+|   |   |   |-- fstream.hpp
+|   |   |   |-- operations.hpp
+|   |   |   |-- path.hpp
+|   |   |   |-- path_traits.hpp
+|   |   |   `-- string_file.hpp
+|   |   |-- format
+|   |   |   |-- detail
+|   |   |   |   |-- compat_workarounds.hpp
+|   |   |   |   |-- config_macros.hpp
+|   |   |   |   |-- msvc_disambiguater.hpp
+|   |   |   |   |-- unset_macros.hpp
+|   |   |   |   |-- workarounds_gcc-2_95.hpp
+|   |   |   |   `-- workarounds_stlport.hpp
+|   |   |   |-- alt_sstream.hpp
+|   |   |   |-- alt_sstream_impl.hpp
+|   |   |   |-- exceptions.hpp
+|   |   |   |-- feed_args.hpp
+|   |   |   |-- format_class.hpp
+|   |   |   |-- format_fwd.hpp
+|   |   |   |-- format_implementation.hpp
+|   |   |   |-- free_funcs.hpp
+|   |   |   |-- group.hpp
+|   |   |   |-- internals_fwd.hpp
+|   |   |   |-- internals.hpp
+|   |   |   `-- parsing.hpp
+|   |   |-- function
+|   |   |   |-- detail
+|   |   |   |   |-- function_iterate.hpp
+|   |   |   |   |-- gen_maybe_include.pl
+|   |   |   |   |-- maybe_include.hpp
+|   |   |   |   `-- prologue.hpp
+|   |   |   |-- function0.hpp
+|   |   |   |-- function10.hpp
+|   |   |   |-- function1.hpp
+|   |   |   |-- function2.hpp
+|   |   |   |-- function3.hpp
+|   |   |   |-- function4.hpp
+|   |   |   |-- function5.hpp
+|   |   |   |-- function6.hpp
+|   |   |   |-- function7.hpp
+|   |   |   |-- function8.hpp
+|   |   |   |-- function9.hpp
+|   |   |   |-- function_base.hpp
+|   |   |   |-- function_fwd.hpp
+|   |   |   `-- function_template.hpp
+|   |   |-- functional
+|   |   |   `-- hash_fwd.hpp
+|   |   |-- function_types
+|   |   |   |-- config
+|   |   |   |   |-- cc_names.hpp
+|   |   |   |   |-- compiler.hpp
+|   |   |   |   `-- config.hpp
+|   |   |   |-- detail
+|   |   |   |   |-- classifier_impl
+|   |   |   |   |   |-- arity10_0.hpp
+|   |   |   |   |   |-- arity10_1.hpp
+|   |   |   |   |   |-- arity20_0.hpp
+|   |   |   |   |   |-- arity20_1.hpp
+|   |   |   |   |   |-- arity30_0.hpp
+|   |   |   |   |   |-- arity30_1.hpp
+|   |   |   |   |   |-- arity40_0.hpp
+|   |   |   |   |   |-- arity40_1.hpp
+|   |   |   |   |   |-- arity50_0.hpp
+|   |   |   |   |   |-- arity50_1.hpp
+|   |   |   |   |   `-- master.hpp
+|   |   |   |   |-- components_impl
+|   |   |   |   |   |-- arity10_0.hpp
+|   |   |   |   |   |-- arity10_1.hpp
+|   |   |   |   |   |-- arity20_0.hpp
+|   |   |   |   |   |-- arity20_1.hpp
+|   |   |   |   |   |-- arity30_0.hpp
+|   |   |   |   |   |-- arity30_1.hpp
+|   |   |   |   |   |-- arity40_0.hpp
+|   |   |   |   |   |-- arity40_1.hpp
+|   |   |   |   |   |-- arity50_0.hpp
+|   |   |   |   |   |-- arity50_1.hpp
+|   |   |   |   |   `-- master.hpp
+|   |   |   |   |-- encoding
+|   |   |   |   |   |-- aliases_def.hpp
+|   |   |   |   |   |-- aliases_undef.hpp
+|   |   |   |   |   |-- def.hpp
+|   |   |   |   |   `-- undef.hpp
+|   |   |   |   |-- pp_cc_loop
+|   |   |   |   |   |-- master.hpp
+|   |   |   |   |   `-- preprocessed.hpp
+|   |   |   |   |-- pp_retag_default_cc
+|   |   |   |   |   |-- master.hpp
+|   |   |   |   |   `-- preprocessed.hpp
+|   |   |   |   |-- pp_tags
+|   |   |   |   |   |-- cc_tag.hpp
+|   |   |   |   |   |-- master.hpp
+|   |   |   |   |   `-- preprocessed.hpp
+|   |   |   |   |-- pp_variate_loop
+|   |   |   |   |   |-- master.hpp
+|   |   |   |   |   `-- preprocessed.hpp
+|   |   |   |   |-- synthesize_impl
+|   |   |   |   |   |-- arity10_0.hpp
+|   |   |   |   |   |-- arity10_1.hpp
+|   |   |   |   |   |-- arity20_0.hpp
+|   |   |   |   |   |-- arity20_1.hpp
+|   |   |   |   |   |-- arity30_0.hpp
+|   |   |   |   |   |-- arity30_1.hpp
+|   |   |   |   |   |-- arity40_0.hpp
+|   |   |   |   |   |-- arity40_1.hpp
+|   |   |   |   |   |-- arity50_0.hpp
+|   |   |   |   |   |-- arity50_1.hpp
+|   |   |   |   |   `-- master.hpp
+|   |   |   |   |-- classifier.hpp
+|   |   |   |   |-- class_transform.hpp
+|   |   |   |   |-- components_as_mpl_sequence.hpp
+|   |   |   |   |-- cv_traits.hpp
+|   |   |   |   |-- pp_arity_loop.hpp
+|   |   |   |   |-- pp_loop.hpp
+|   |   |   |   |-- retag_default_cc.hpp
+|   |   |   |   |-- synthesize.hpp
+|   |   |   |   `-- to_sequence.hpp
+|   |   |   |-- components.hpp
+|   |   |   |-- is_callable_builtin.hpp
+|   |   |   |-- is_function_pointer.hpp
+|   |   |   |-- property_tags.hpp
+|   |   |   `-- result_type.hpp
+|   |   |-- fusion
+|   |   |   |-- adapted
+|   |   |   |   |-- boost_tuple
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- build_cons.hpp
+|   |   |   |   |   |   |-- category_of_impl.hpp
+|   |   |   |   |   |   |-- convert_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- is_sequence_impl.hpp
+|   |   |   |   |   |   |-- is_view_impl.hpp
+|   |   |   |   |   |   |-- size_impl.hpp
+|   |   |   |   |   |   `-- value_at_impl.hpp
+|   |   |   |   |   |-- mpl
+|   |   |   |   |   |   `-- clear.hpp
+|   |   |   |   |   |-- boost_tuple_iterator.hpp
+|   |   |   |   |   `-- tag_of.hpp
+|   |   |   |   |-- mpl
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- category_of_impl.hpp
+|   |   |   |   |   |   |-- empty_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- has_key_impl.hpp
+|   |   |   |   |   |   |-- is_sequence_impl.hpp
+|   |   |   |   |   |   |-- is_view_impl.hpp
+|   |   |   |   |   |   |-- size_impl.hpp
+|   |   |   |   |   |   `-- value_at_impl.hpp
+|   |   |   |   |   `-- mpl_iterator.hpp
+|   |   |   |   |-- std_tuple
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- build_std_tuple.hpp
+|   |   |   |   |   |   |-- category_of_impl.hpp
+|   |   |   |   |   |   |-- convert_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- is_sequence_impl.hpp
+|   |   |   |   |   |   |-- is_view_impl.hpp
+|   |   |   |   |   |   |-- size_impl.hpp
+|   |   |   |   |   |   `-- value_at_impl.hpp
+|   |   |   |   |   |-- mpl
+|   |   |   |   |   |   `-- clear.hpp
+|   |   |   |   |   |-- std_tuple_iterator.hpp
+|   |   |   |   |   `-- tag_of.hpp
+|   |   |   |   |-- struct
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- preprocessor
+|   |   |   |   |   |   |   `-- is_seq.hpp
+|   |   |   |   |   |   |-- adapt_auto.hpp
+|   |   |   |   |   |   |-- adapt_base_attr_filler.hpp
+|   |   |   |   |   |   |-- adapt_base.hpp
+|   |   |   |   |   |   |-- adapt_is_tpl.hpp
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- category_of_impl.hpp
+|   |   |   |   |   |   |-- deref_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- extension.hpp
+|   |   |   |   |   |   |-- is_sequence_impl.hpp
+|   |   |   |   |   |   |-- is_view_impl.hpp
+|   |   |   |   |   |   |-- size_impl.hpp
+|   |   |   |   |   |   |-- value_at_impl.hpp
+|   |   |   |   |   |   `-- value_of_impl.hpp
+|   |   |   |   |   `-- adapt_struct.hpp
+|   |   |   |   |-- boost_tuple.hpp
+|   |   |   |   |-- mpl.hpp
+|   |   |   |   |-- std_pair.hpp
+|   |   |   |   `-- std_tuple.hpp
+|   |   |   |-- algorithm
+|   |   |   |   |-- iteration
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- preprocessed
+|   |   |   |   |   |   |   `-- fold.hpp
+|   |   |   |   |   |   |-- fold.hpp
+|   |   |   |   |   |   |-- for_each.hpp
+|   |   |   |   |   |   |-- segmented_fold.hpp
+|   |   |   |   |   |   `-- segmented_for_each.hpp
+|   |   |   |   |   |-- fold_fwd.hpp
+|   |   |   |   |   |-- fold.hpp
+|   |   |   |   |   |-- for_each_fwd.hpp
+|   |   |   |   |   `-- for_each.hpp
+|   |   |   |   |-- query
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- find_if.hpp
+|   |   |   |   |   |   `-- segmented_find.hpp
+|   |   |   |   |   |-- find_fwd.hpp
+|   |   |   |   |   |-- find.hpp
+|   |   |   |   |   `-- find_if_fwd.hpp
+|   |   |   |   `-- transformation
+|   |   |   |       |-- erase.hpp
+|   |   |   |       |-- erase_key.hpp
+|   |   |   |       |-- insert.hpp
+|   |   |   |       |-- insert_range.hpp
+|   |   |   |       |-- pop_back.hpp
+|   |   |   |       |-- pop_front.hpp
+|   |   |   |       |-- push_back.hpp
+|   |   |   |       |-- push_front.hpp
+|   |   |   |       `-- transform.hpp
+|   |   |   |-- container
+|   |   |   |   |-- deque
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- cpp03
+|   |   |   |   |   |   |   |-- preprocessed
+|   |   |   |   |   |   |   |   |-- as_deque10.hpp
+|   |   |   |   |   |   |   |   |-- as_deque20.hpp
+|   |   |   |   |   |   |   |   |-- as_deque30.hpp
+|   |   |   |   |   |   |   |   |-- as_deque40.hpp
+|   |   |   |   |   |   |   |   |-- as_deque50.hpp
+|   |   |   |   |   |   |   |   |-- as_deque.hpp
+|   |   |   |   |   |   |   |   |-- deque10_fwd.hpp
+|   |   |   |   |   |   |   |   |-- deque10.hpp
+|   |   |   |   |   |   |   |   |-- deque20_fwd.hpp
+|   |   |   |   |   |   |   |   |-- deque20.hpp
+|   |   |   |   |   |   |   |   |-- deque30_fwd.hpp
+|   |   |   |   |   |   |   |   |-- deque30.hpp
+|   |   |   |   |   |   |   |   |-- deque40_fwd.hpp
+|   |   |   |   |   |   |   |   |-- deque40.hpp
+|   |   |   |   |   |   |   |   |-- deque50_fwd.hpp
+|   |   |   |   |   |   |   |   |-- deque50.hpp
+|   |   |   |   |   |   |   |   |-- deque_fwd.hpp
+|   |   |   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |   |   |-- deque_initial_size10.hpp
+|   |   |   |   |   |   |   |   |-- deque_initial_size20.hpp
+|   |   |   |   |   |   |   |   |-- deque_initial_size30.hpp
+|   |   |   |   |   |   |   |   |-- deque_initial_size40.hpp
+|   |   |   |   |   |   |   |   |-- deque_initial_size50.hpp
+|   |   |   |   |   |   |   |   |-- deque_initial_size.hpp
+|   |   |   |   |   |   |   |   |-- deque_keyed_values10.hpp
+|   |   |   |   |   |   |   |   |-- deque_keyed_values20.hpp
+|   |   |   |   |   |   |   |   |-- deque_keyed_values30.hpp
+|   |   |   |   |   |   |   |   |-- deque_keyed_values40.hpp
+|   |   |   |   |   |   |   |   |-- deque_keyed_values50.hpp
+|   |   |   |   |   |   |   |   `-- deque_keyed_values.hpp
+|   |   |   |   |   |   |   |-- as_deque.hpp
+|   |   |   |   |   |   |   |-- build_deque.hpp
+|   |   |   |   |   |   |   |-- deque_forward_ctor.hpp
+|   |   |   |   |   |   |   |-- deque_fwd.hpp
+|   |   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |   |-- deque_initial_size.hpp
+|   |   |   |   |   |   |   |-- deque_keyed_values_call.hpp
+|   |   |   |   |   |   |   |-- deque_keyed_values.hpp
+|   |   |   |   |   |   |   `-- limits.hpp
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- build_deque.hpp
+|   |   |   |   |   |   |-- convert_impl.hpp
+|   |   |   |   |   |   |-- deque_keyed_values.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- is_sequence_impl.hpp
+|   |   |   |   |   |   |-- keyed_element.hpp
+|   |   |   |   |   |   `-- value_at_impl.hpp
+|   |   |   |   |   |-- back_extended_deque.hpp
+|   |   |   |   |   |-- convert.hpp
+|   |   |   |   |   |-- deque_fwd.hpp
+|   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |-- deque_iterator.hpp
+|   |   |   |   |   `-- front_extended_deque.hpp
+|   |   |   |   |-- generation
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- preprocessed
+|   |   |   |   |   |   |   |-- make_deque10.hpp
+|   |   |   |   |   |   |   |-- make_deque20.hpp
+|   |   |   |   |   |   |   |-- make_deque30.hpp
+|   |   |   |   |   |   |   |-- make_deque40.hpp
+|   |   |   |   |   |   |   |-- make_deque50.hpp
+|   |   |   |   |   |   |   |-- make_deque.hpp
+|   |   |   |   |   |   |   |-- make_list10.hpp
+|   |   |   |   |   |   |   |-- make_list20.hpp
+|   |   |   |   |   |   |   |-- make_list30.hpp
+|   |   |   |   |   |   |   |-- make_list40.hpp
+|   |   |   |   |   |   |   |-- make_list50.hpp
+|   |   |   |   |   |   |   |-- make_list.hpp
+|   |   |   |   |   |   |   |-- make_vector10.hpp
+|   |   |   |   |   |   |   |-- make_vector20.hpp
+|   |   |   |   |   |   |   |-- make_vector30.hpp
+|   |   |   |   |   |   |   |-- make_vector40.hpp
+|   |   |   |   |   |   |   |-- make_vector50.hpp
+|   |   |   |   |   |   |   `-- make_vector.hpp
+|   |   |   |   |   |   |-- pp_make_deque.hpp
+|   |   |   |   |   |   |-- pp_make_list.hpp
+|   |   |   |   |   |   `-- pp_make_vector.hpp
+|   |   |   |   |   |-- make_deque.hpp
+|   |   |   |   |   |-- make_list.hpp
+|   |   |   |   |   `-- make_vector.hpp
+|   |   |   |   |-- list
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- cpp03
+|   |   |   |   |   |   |   |-- preprocessed
+|   |   |   |   |   |   |   |   |-- list10_fwd.hpp
+|   |   |   |   |   |   |   |   |-- list10.hpp
+|   |   |   |   |   |   |   |   |-- list20_fwd.hpp
+|   |   |   |   |   |   |   |   |-- list20.hpp
+|   |   |   |   |   |   |   |   |-- list30_fwd.hpp
+|   |   |   |   |   |   |   |   |-- list30.hpp
+|   |   |   |   |   |   |   |   |-- list40_fwd.hpp
+|   |   |   |   |   |   |   |   |-- list40.hpp
+|   |   |   |   |   |   |   |   |-- list50_fwd.hpp
+|   |   |   |   |   |   |   |   |-- list50.hpp
+|   |   |   |   |   |   |   |   |-- list_fwd.hpp
+|   |   |   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |   |   |-- list_to_cons10.hpp
+|   |   |   |   |   |   |   |   |-- list_to_cons20.hpp
+|   |   |   |   |   |   |   |   |-- list_to_cons30.hpp
+|   |   |   |   |   |   |   |   |-- list_to_cons40.hpp
+|   |   |   |   |   |   |   |   |-- list_to_cons50.hpp
+|   |   |   |   |   |   |   |   `-- list_to_cons.hpp
+|   |   |   |   |   |   |   |-- limits.hpp
+|   |   |   |   |   |   |   |-- list_forward_ctor.hpp
+|   |   |   |   |   |   |   |-- list_fwd.hpp
+|   |   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |   |-- list_to_cons_call.hpp
+|   |   |   |   |   |   |   `-- list_to_cons.hpp
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- build_cons.hpp
+|   |   |   |   |   |   |-- convert_impl.hpp
+|   |   |   |   |   |   |-- deref_impl.hpp
+|   |   |   |   |   |   |-- empty_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- equal_to_impl.hpp
+|   |   |   |   |   |   |-- list_to_cons.hpp
+|   |   |   |   |   |   |-- next_impl.hpp
+|   |   |   |   |   |   |-- reverse_cons.hpp
+|   |   |   |   |   |   |-- value_at_impl.hpp
+|   |   |   |   |   |   `-- value_of_impl.hpp
+|   |   |   |   |   |-- cons_fwd.hpp
+|   |   |   |   |   |-- cons.hpp
+|   |   |   |   |   |-- cons_iterator.hpp
+|   |   |   |   |   |-- convert.hpp
+|   |   |   |   |   |-- list_fwd.hpp
+|   |   |   |   |   |-- list.hpp
+|   |   |   |   |   `-- nil.hpp
+|   |   |   |   |-- map
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   `-- cpp03
+|   |   |   |   |   |       |-- preprocessed
+|   |   |   |   |   |       |   |-- map10_fwd.hpp
+|   |   |   |   |   |       |   |-- map20_fwd.hpp
+|   |   |   |   |   |       |   |-- map30_fwd.hpp
+|   |   |   |   |   |       |   |-- map40_fwd.hpp
+|   |   |   |   |   |       |   |-- map50_fwd.hpp
+|   |   |   |   |   |       |   `-- map_fwd.hpp
+|   |   |   |   |   |       |-- limits.hpp
+|   |   |   |   |   |       `-- map_fwd.hpp
+|   |   |   |   |   `-- map_fwd.hpp
+|   |   |   |   |-- set
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   `-- cpp03
+|   |   |   |   |   |       |-- preprocessed
+|   |   |   |   |   |       |   |-- set10_fwd.hpp
+|   |   |   |   |   |       |   |-- set20_fwd.hpp
+|   |   |   |   |   |       |   |-- set30_fwd.hpp
+|   |   |   |   |   |       |   |-- set40_fwd.hpp
+|   |   |   |   |   |       |   |-- set50_fwd.hpp
+|   |   |   |   |   |       |   `-- set_fwd.hpp
+|   |   |   |   |   |       |-- limits.hpp
+|   |   |   |   |   |       `-- set_fwd.hpp
+|   |   |   |   |   `-- set_fwd.hpp
+|   |   |   |   |-- vector
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- cpp03
+|   |   |   |   |   |   |   |-- preprocessed
+|   |   |   |   |   |   |   |   |-- as_vector10.hpp
+|   |   |   |   |   |   |   |   |-- as_vector20.hpp
+|   |   |   |   |   |   |   |   |-- as_vector30.hpp
+|   |   |   |   |   |   |   |   |-- as_vector40.hpp
+|   |   |   |   |   |   |   |   |-- as_vector50.hpp
+|   |   |   |   |   |   |   |   |-- as_vector.hpp
+|   |   |   |   |   |   |   |   |-- vector10_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vector10.hpp
+|   |   |   |   |   |   |   |   |-- vector20_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vector20.hpp
+|   |   |   |   |   |   |   |   |-- vector30_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vector30.hpp
+|   |   |   |   |   |   |   |   |-- vector40_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vector40.hpp
+|   |   |   |   |   |   |   |   |-- vector50_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vector50.hpp
+|   |   |   |   |   |   |   |   |-- vector_chooser10.hpp
+|   |   |   |   |   |   |   |   |-- vector_chooser20.hpp
+|   |   |   |   |   |   |   |   |-- vector_chooser30.hpp
+|   |   |   |   |   |   |   |   |-- vector_chooser40.hpp
+|   |   |   |   |   |   |   |   |-- vector_chooser50.hpp
+|   |   |   |   |   |   |   |   |-- vector_chooser.hpp
+|   |   |   |   |   |   |   |   |-- vector_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vector.hpp
+|   |   |   |   |   |   |   |   |-- vvector10_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vvector10.hpp
+|   |   |   |   |   |   |   |   |-- vvector20_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vvector20.hpp
+|   |   |   |   |   |   |   |   |-- vvector30_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vvector30.hpp
+|   |   |   |   |   |   |   |   |-- vvector40_fwd.hpp
+|   |   |   |   |   |   |   |   |-- vvector40.hpp
+|   |   |   |   |   |   |   |   |-- vvector50_fwd.hpp
+|   |   |   |   |   |   |   |   `-- vvector50.hpp
+|   |   |   |   |   |   |   |-- as_vector.hpp
+|   |   |   |   |   |   |   |-- limits.hpp
+|   |   |   |   |   |   |   |-- value_at_impl.hpp
+|   |   |   |   |   |   |   |-- vector10_fwd.hpp
+|   |   |   |   |   |   |   |-- vector10.hpp
+|   |   |   |   |   |   |   |-- vector20_fwd.hpp
+|   |   |   |   |   |   |   |-- vector20.hpp
+|   |   |   |   |   |   |   |-- vector30_fwd.hpp
+|   |   |   |   |   |   |   |-- vector30.hpp
+|   |   |   |   |   |   |   |-- vector40_fwd.hpp
+|   |   |   |   |   |   |   |-- vector40.hpp
+|   |   |   |   |   |   |   |-- vector50_fwd.hpp
+|   |   |   |   |   |   |   |-- vector50.hpp
+|   |   |   |   |   |   |   |-- vector_forward_ctor.hpp
+|   |   |   |   |   |   |   |-- vector_fwd.hpp
+|   |   |   |   |   |   |   |-- vector.hpp
+|   |   |   |   |   |   |   |-- vector_n_chooser.hpp
+|   |   |   |   |   |   |   `-- vector_n.hpp
+|   |   |   |   |   |   |-- advance_impl.hpp
+|   |   |   |   |   |   |-- as_vector.hpp
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- config.hpp
+|   |   |   |   |   |   |-- convert_impl.hpp
+|   |   |   |   |   |   |-- deref_impl.hpp
+|   |   |   |   |   |   |-- distance_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- equal_to_impl.hpp
+|   |   |   |   |   |   |-- next_impl.hpp
+|   |   |   |   |   |   |-- prior_impl.hpp
+|   |   |   |   |   |   |-- value_at_impl.hpp
+|   |   |   |   |   |   `-- value_of_impl.hpp
+|   |   |   |   |   |-- convert.hpp
+|   |   |   |   |   |-- vector10.hpp
+|   |   |   |   |   |-- vector_fwd.hpp
+|   |   |   |   |   |-- vector.hpp
+|   |   |   |   |   `-- vector_iterator.hpp
+|   |   |   |   |-- deque.hpp
+|   |   |   |   |-- list.hpp
+|   |   |   |   `-- vector.hpp
+|   |   |   |-- include
+|   |   |   |   |-- at.hpp
+|   |   |   |   |-- deque.hpp
+|   |   |   |   |-- list.hpp
+|   |   |   |   |-- make_deque.hpp
+|   |   |   |   |-- make_list.hpp
+|   |   |   |   |-- make_vector.hpp
+|   |   |   |   `-- vector.hpp
+|   |   |   |-- iterator
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- adapt_deref_traits.hpp
+|   |   |   |   |   |-- adapt_value_traits.hpp
+|   |   |   |   |   |-- advance.hpp
+|   |   |   |   |   |-- distance.hpp
+|   |   |   |   |   |-- segmented_equal_to.hpp
+|   |   |   |   |   |-- segmented_iterator.hpp
+|   |   |   |   |   |-- segmented_next_impl.hpp
+|   |   |   |   |   `-- segment_sequence.hpp
+|   |   |   |   |-- mpl
+|   |   |   |   |   |-- convert_iterator.hpp
+|   |   |   |   |   `-- fusion_iterator.hpp
+|   |   |   |   |-- advance.hpp
+|   |   |   |   |-- basic_iterator.hpp
+|   |   |   |   |-- deref_data.hpp
+|   |   |   |   |-- deref.hpp
+|   |   |   |   |-- distance.hpp
+|   |   |   |   |-- equal_to.hpp
+|   |   |   |   |-- iterator_adapter.hpp
+|   |   |   |   |-- iterator_facade.hpp
+|   |   |   |   |-- key_of.hpp
+|   |   |   |   |-- mpl.hpp
+|   |   |   |   |-- next.hpp
+|   |   |   |   |-- prior.hpp
+|   |   |   |   |-- segmented_iterator.hpp
+|   |   |   |   |-- value_of_data.hpp
+|   |   |   |   `-- value_of.hpp
+|   |   |   |-- mpl
+|   |   |   |   |-- detail
+|   |   |   |   |   `-- clear.hpp
+|   |   |   |   |-- at.hpp
+|   |   |   |   |-- back.hpp
+|   |   |   |   |-- begin.hpp
+|   |   |   |   |-- clear.hpp
+|   |   |   |   |-- empty.hpp
+|   |   |   |   |-- end.hpp
+|   |   |   |   |-- erase.hpp
+|   |   |   |   |-- erase_key.hpp
+|   |   |   |   |-- front.hpp
+|   |   |   |   |-- has_key.hpp
+|   |   |   |   |-- insert.hpp
+|   |   |   |   |-- insert_range.hpp
+|   |   |   |   |-- pop_back.hpp
+|   |   |   |   |-- pop_front.hpp
+|   |   |   |   |-- push_back.hpp
+|   |   |   |   |-- push_front.hpp
+|   |   |   |   `-- size.hpp
+|   |   |   |-- sequence
+|   |   |   |   |-- comparison
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   `-- equal_to.hpp
+|   |   |   |   |   |-- enable_comparison.hpp
+|   |   |   |   |   `-- equal_to.hpp
+|   |   |   |   |-- intrinsic
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- segmented_begin.hpp
+|   |   |   |   |   |   |-- segmented_begin_impl.hpp
+|   |   |   |   |   |   |-- segmented_end.hpp
+|   |   |   |   |   |   |-- segmented_end_impl.hpp
+|   |   |   |   |   |   `-- segmented_size.hpp
+|   |   |   |   |   |-- at_c.hpp
+|   |   |   |   |   |-- at.hpp
+|   |   |   |   |   |-- begin.hpp
+|   |   |   |   |   |-- empty.hpp
+|   |   |   |   |   |-- end.hpp
+|   |   |   |   |   |-- has_key.hpp
+|   |   |   |   |   |-- segments.hpp
+|   |   |   |   |   |-- size.hpp
+|   |   |   |   |   `-- value_at.hpp
+|   |   |   |   |-- convert.hpp
+|   |   |   |   `-- intrinsic_fwd.hpp
+|   |   |   |-- support
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- access.hpp
+|   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |-- as_fusion_element.hpp
+|   |   |   |   |   |-- enabler.hpp
+|   |   |   |   |   |-- index_sequence.hpp
+|   |   |   |   |   |-- is_mpl_sequence.hpp
+|   |   |   |   |   |-- is_native_fusion_sequence.hpp
+|   |   |   |   |   |-- mpl_iterator_category.hpp
+|   |   |   |   |   |-- pp_round.hpp
+|   |   |   |   |   `-- segmented_fold_until_impl.hpp
+|   |   |   |   |-- as_const.hpp
+|   |   |   |   |-- category_of.hpp
+|   |   |   |   |-- config.hpp
+|   |   |   |   |-- is_iterator.hpp
+|   |   |   |   |-- is_segmented.hpp
+|   |   |   |   |-- is_sequence.hpp
+|   |   |   |   |-- is_view.hpp
+|   |   |   |   |-- iterator_base.hpp
+|   |   |   |   |-- segmented_fold_until.hpp
+|   |   |   |   |-- sequence_base.hpp
+|   |   |   |   |-- tag_of_fwd.hpp
+|   |   |   |   |-- tag_of.hpp
+|   |   |   |   `-- void.hpp
+|   |   |   |-- view
+|   |   |   |   |-- detail
+|   |   |   |   |   `-- strictest_traversal.hpp
+|   |   |   |   |-- iterator_range
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- is_segmented_impl.hpp
+|   |   |   |   |   |   |-- segmented_iterator_range.hpp
+|   |   |   |   |   |   |-- segments_impl.hpp
+|   |   |   |   |   |   |-- size_impl.hpp
+|   |   |   |   |   |   `-- value_at_impl.hpp
+|   |   |   |   |   `-- iterator_range.hpp
+|   |   |   |   |-- joint_view
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- deref_data_impl.hpp
+|   |   |   |   |   |   |-- deref_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- key_of_impl.hpp
+|   |   |   |   |   |   |-- next_impl.hpp
+|   |   |   |   |   |   |-- value_of_data_impl.hpp
+|   |   |   |   |   |   `-- value_of_impl.hpp
+|   |   |   |   |   |-- joint_view_fwd.hpp
+|   |   |   |   |   |-- joint_view.hpp
+|   |   |   |   |   `-- joint_view_iterator.hpp
+|   |   |   |   |-- single_view
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- advance_impl.hpp
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- deref_impl.hpp
+|   |   |   |   |   |   |-- distance_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- equal_to_impl.hpp
+|   |   |   |   |   |   |-- next_impl.hpp
+|   |   |   |   |   |   |-- prior_impl.hpp
+|   |   |   |   |   |   |-- size_impl.hpp
+|   |   |   |   |   |   |-- value_at_impl.hpp
+|   |   |   |   |   |   `-- value_of_impl.hpp
+|   |   |   |   |   |-- single_view.hpp
+|   |   |   |   |   `-- single_view_iterator.hpp
+|   |   |   |   |-- transform_view
+|   |   |   |   |   |-- detail
+|   |   |   |   |   |   |-- advance_impl.hpp
+|   |   |   |   |   |   |-- at_impl.hpp
+|   |   |   |   |   |   |-- begin_impl.hpp
+|   |   |   |   |   |   |-- deref_impl.hpp
+|   |   |   |   |   |   |-- distance_impl.hpp
+|   |   |   |   |   |   |-- end_impl.hpp
+|   |   |   |   |   |   |-- equal_to_impl.hpp
+|   |   |   |   |   |   |-- next_impl.hpp
+|   |   |   |   |   |   |-- prior_impl.hpp
+|   |   |   |   |   |   |-- value_at_impl.hpp
+|   |   |   |   |   |   `-- value_of_impl.hpp
+|   |   |   |   |   |-- transform_view_fwd.hpp
+|   |   |   |   |   |-- transform_view.hpp
+|   |   |   |   |   `-- transform_view_iterator.hpp
+|   |   |   |   `-- iterator_range.hpp
+|   |   |   `-- mpl.hpp
+|   |   |-- integer
+|   |   |   |-- common_factor_rt.hpp
+|   |   |   `-- static_log2.hpp
+|   |   |-- intrusive
+|   |   |   |-- detail
+|   |   |   |   |-- algorithm.hpp
+|   |   |   |   |-- algo_type.hpp
+|   |   |   |   |-- array_initializer.hpp
+|   |   |   |   |-- assert.hpp
+|   |   |   |   |-- common_slist_algorithms.hpp
+|   |   |   |   |-- config_begin.hpp
+|   |   |   |   |-- config_end.hpp
+|   |   |   |   |-- default_header_holder.hpp
+|   |   |   |   |-- ebo_functor_holder.hpp
+|   |   |   |   |-- equal_to_value.hpp
+|   |   |   |   |-- exception_disposer.hpp
+|   |   |   |   |-- function_detector.hpp
+|   |   |   |   |-- generic_hook.hpp
+|   |   |   |   |-- get_value_traits.hpp
+|   |   |   |   |-- has_member_function_callable_with.hpp
+|   |   |   |   |-- hook_traits.hpp
+|   |   |   |   |-- iiterator.hpp
+|   |   |   |   |-- is_stateful_value_traits.hpp
+|   |   |   |   |-- iterator.hpp
+|   |   |   |   |-- key_nodeptr_comp.hpp
+|   |   |   |   |-- minimal_less_equal_header.hpp
+|   |   |   |   |-- minimal_pair_header.hpp
+|   |   |   |   |-- mpl.hpp
+|   |   |   |   |-- node_holder.hpp
+|   |   |   |   |-- parent_from_member.hpp
+|   |   |   |   |-- reverse_iterator.hpp
+|   |   |   |   |-- simple_disposers.hpp
+|   |   |   |   |-- size_holder.hpp
+|   |   |   |   |-- slist_iterator.hpp
+|   |   |   |   |-- slist_node.hpp
+|   |   |   |   |-- std_fwd.hpp
+|   |   |   |   |-- tree_value_compare.hpp
+|   |   |   |   |-- uncast.hpp
+|   |   |   |   `-- workaround.hpp
+|   |   |   |-- circular_slist_algorithms.hpp
+|   |   |   |-- intrusive_fwd.hpp
+|   |   |   |-- linear_slist_algorithms.hpp
+|   |   |   |-- link_mode.hpp
+|   |   |   |-- options.hpp
+|   |   |   |-- pack_options.hpp
+|   |   |   |-- pointer_rebind.hpp
+|   |   |   |-- pointer_traits.hpp
+|   |   |   |-- slist_hook.hpp
+|   |   |   `-- slist.hpp
+|   |   |-- io
+|   |   |   |-- detail
+|   |   |   |   `-- quoted_manip.hpp
+|   |   |   `-- ios_state.hpp
+|   |   |-- iterator
+|   |   |   |-- detail
+|   |   |   |   |-- any_conversion_eater.hpp
+|   |   |   |   |-- config_def.hpp
+|   |   |   |   |-- config_undef.hpp
+|   |   |   |   |-- enable_if.hpp
+|   |   |   |   |-- facade_iterator_category.hpp
+|   |   |   |   `-- minimum_category.hpp
+|   |   |   |-- advance.hpp
+|   |   |   |-- counting_iterator.hpp
+|   |   |   |-- distance.hpp
+|   |   |   |-- filter_iterator.hpp
+|   |   |   |-- function_input_iterator.hpp
+|   |   |   |-- function_output_iterator.hpp
+|   |   |   |-- indirect_iterator.hpp
+|   |   |   |-- interoperable.hpp
+|   |   |   |-- is_lvalue_iterator.hpp
+|   |   |   |-- is_readable_iterator.hpp
+|   |   |   |-- iterator_adaptor.hpp
+|   |   |   |-- iterator_archetypes.hpp
+|   |   |   |-- iterator_categories.hpp
+|   |   |   |-- iterator_concepts.hpp
+|   |   |   |-- iterator_facade.hpp
+|   |   |   |-- iterator_traits.hpp
+|   |   |   |-- minimum_category.hpp
+|   |   |   |-- new_iterator_tests.hpp
+|   |   |   |-- permutation_iterator.hpp
+|   |   |   |-- reverse_iterator.hpp
+|   |   |   |-- transform_iterator.hpp
+|   |   |   `-- zip_iterator.hpp
+|   |   |-- lexical_cast
+|   |   |   |-- detail
+|   |   |   |   |-- converter_lexical.hpp
+|   |   |   |   |-- converter_lexical_streams.hpp
+|   |   |   |   |-- converter_numeric.hpp
+|   |   |   |   |-- inf_nan.hpp
+|   |   |   |   |-- is_character.hpp
+|   |   |   |   |-- lcast_char_constants.hpp
+|   |   |   |   |-- lcast_unsigned_converters.hpp
+|   |   |   |   `-- widest_char.hpp
+|   |   |   |-- bad_lexical_cast.hpp
+|   |   |   `-- try_lexical_convert.hpp
+|   |   |-- math
+|   |   |   |-- policies
+|   |   |   |   `-- policy.hpp
+|   |   |   |-- special_functions
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- fp_traits.hpp
+|   |   |   |   |   `-- round_fwd.hpp
+|   |   |   |   |-- fpclassify.hpp
+|   |   |   |   |-- math_fwd.hpp
+|   |   |   |   `-- sign.hpp
+|   |   |   `-- tools
+|   |   |       |-- config.hpp
+|   |   |       |-- promotion.hpp
+|   |   |       |-- real_cast.hpp
+|   |   |       `-- user.hpp
+|   |   |-- move
+|   |   |   |-- detail
+|   |   |   |   |-- config_begin.hpp
+|   |   |   |   |-- config_end.hpp
+|   |   |   |   |-- fwd_macros.hpp
+|   |   |   |   |-- iterator_to_raw_pointer.hpp
+|   |   |   |   |-- iterator_traits.hpp
+|   |   |   |   |-- meta_utils_core.hpp
+|   |   |   |   |-- meta_utils.hpp
+|   |   |   |   |-- move_helpers.hpp
+|   |   |   |   |-- pointer_element.hpp
+|   |   |   |   |-- std_ns_begin.hpp
+|   |   |   |   |-- std_ns_end.hpp
+|   |   |   |   |-- to_raw_pointer.hpp
+|   |   |   |   |-- type_traits.hpp
+|   |   |   |   `-- workaround.hpp
+|   |   |   |-- adl_move_swap.hpp
+|   |   |   |-- core.hpp
+|   |   |   |-- iterator.hpp
+|   |   |   |-- traits.hpp
+|   |   |   |-- utility_core.hpp
+|   |   |   `-- utility.hpp
+|   |   |-- mp11
+|   |   |   |-- detail
+|   |   |   |   |-- config.hpp
+|   |   |   |   |-- mp_append.hpp
+|   |   |   |   |-- mp_copy_if.hpp
+|   |   |   |   |-- mp_count.hpp
+|   |   |   |   |-- mp_fold.hpp
+|   |   |   |   |-- mp_is_list.hpp
+|   |   |   |   |-- mp_list.hpp
+|   |   |   |   |-- mp_map_find.hpp
+|   |   |   |   |-- mp_min_element.hpp
+|   |   |   |   |-- mp_plus.hpp
+|   |   |   |   |-- mp_remove_if.hpp
+|   |   |   |   |-- mp_void.hpp
+|   |   |   |   `-- mp_with_index.hpp
+|   |   |   |-- algorithm.hpp
+|   |   |   |-- bind.hpp
+|   |   |   |-- function.hpp
+|   |   |   |-- integer_sequence.hpp
+|   |   |   |-- integral.hpp
+|   |   |   |-- list.hpp
+|   |   |   |-- map.hpp
+|   |   |   |-- mpl.hpp
+|   |   |   |-- set.hpp
+|   |   |   |-- tuple.hpp
+|   |   |   |-- utility.hpp
+|   |   |   `-- version.hpp
+|   |   |-- mpl
+|   |   |   |-- aux_
+|   |   |   |   |-- config
+|   |   |   |   |   |-- adl.hpp
+|   |   |   |   |   |-- arrays.hpp
+|   |   |   |   |   |-- bcc.hpp
+|   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |-- compiler.hpp
+|   |   |   |   |   |-- ctps.hpp
+|   |   |   |   |   |-- dependent_nttp.hpp
+|   |   |   |   |   |-- dmc_ambiguous_ctps.hpp
+|   |   |   |   |   |-- dtp.hpp
+|   |   |   |   |   |-- eti.hpp
+|   |   |   |   |   |-- forwarding.hpp
+|   |   |   |   |   |-- gcc.hpp
+|   |   |   |   |   |-- gpu.hpp
+|   |   |   |   |   |-- has_apply.hpp
+|   |   |   |   |   |-- has_xxx.hpp
+|   |   |   |   |   |-- integral.hpp
+|   |   |   |   |   |-- intel.hpp
+|   |   |   |   |   |-- lambda.hpp
+|   |   |   |   |   |-- msvc.hpp
+|   |   |   |   |   |-- msvc_typename.hpp
+|   |   |   |   |   |-- nttp.hpp
+|   |   |   |   |   |-- overload_resolution.hpp
+|   |   |   |   |   |-- pp_counter.hpp
+|   |   |   |   |   |-- preprocessor.hpp
+|   |   |   |   |   |-- static_constant.hpp
+|   |   |   |   |   |-- ttp.hpp
+|   |   |   |   |   |-- typeof.hpp
+|   |   |   |   |   |-- use_preprocessed.hpp
+|   |   |   |   |   `-- workaround.hpp
+|   |   |   |   |-- preprocessed
+|   |   |   |   |   |-- bcc
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- bcc551
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- bcc_pre590
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- dmc
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- gcc
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- msvc60
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- msvc70
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- mwcw
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- no_ctps
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   |-- no_ttp
+|   |   |   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |   |   |-- and.hpp
+|   |   |   |   |   |   |-- apply_fwd.hpp
+|   |   |   |   |   |   |-- apply.hpp
+|   |   |   |   |   |   |-- apply_wrap.hpp
+|   |   |   |   |   |   |-- arg.hpp
+|   |   |   |   |   |   |-- basic_bind.hpp
+|   |   |   |   |   |   |-- bind_fwd.hpp
+|   |   |   |   |   |   |-- bind.hpp
+|   |   |   |   |   |   |-- bitand.hpp
+|   |   |   |   |   |   |-- bitor.hpp
+|   |   |   |   |   |   |-- bitxor.hpp
+|   |   |   |   |   |   |-- deque.hpp
+|   |   |   |   |   |   |-- divides.hpp
+|   |   |   |   |   |   |-- equal_to.hpp
+|   |   |   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |   |   |-- greater_equal.hpp
+|   |   |   |   |   |   |-- greater.hpp
+|   |   |   |   |   |   |-- inherit.hpp
+|   |   |   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |   |   |-- less_equal.hpp
+|   |   |   |   |   |   |-- less.hpp
+|   |   |   |   |   |   |-- list_c.hpp
+|   |   |   |   |   |   |-- list.hpp
+|   |   |   |   |   |   |-- map.hpp
+|   |   |   |   |   |   |-- minus.hpp
+|   |   |   |   |   |   |-- modulus.hpp
+|   |   |   |   |   |   |-- not_equal_to.hpp
+|   |   |   |   |   |   |-- or.hpp
+|   |   |   |   |   |   |-- placeholders.hpp
+|   |   |   |   |   |   |-- plus.hpp
+|   |   |   |   |   |   |-- quote.hpp
+|   |   |   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |   |   |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |   |   |-- set_c.hpp
+|   |   |   |   |   |   |-- set.hpp
+|   |   |   |   |   |   |-- shift_left.hpp
+|   |   |   |   |   |   |-- shift_right.hpp
+|   |   |   |   |   |   |-- template_arity.hpp
+|   |   |   |   |   |   |-- times.hpp
+|   |   |   |   |   |   |-- unpack_args.hpp
+|   |   |   |   |   |   |-- vector_c.hpp
+|   |   |   |   |   |   `-- vector.hpp
+|   |   |   |   |   `-- plain
+|   |   |   |   |       |-- advance_backward.hpp
+|   |   |   |   |       |-- advance_forward.hpp
+|   |   |   |   |       |-- and.hpp
+|   |   |   |   |       |-- apply_fwd.hpp
+|   |   |   |   |       |-- apply.hpp
+|   |   |   |   |       |-- apply_wrap.hpp
+|   |   |   |   |       |-- arg.hpp
+|   |   |   |   |       |-- basic_bind.hpp
+|   |   |   |   |       |-- bind_fwd.hpp
+|   |   |   |   |       |-- bind.hpp
+|   |   |   |   |       |-- bitand.hpp
+|   |   |   |   |       |-- bitor.hpp
+|   |   |   |   |       |-- bitxor.hpp
+|   |   |   |   |       |-- deque.hpp
+|   |   |   |   |       |-- divides.hpp
+|   |   |   |   |       |-- equal_to.hpp
+|   |   |   |   |       |-- fold_impl.hpp
+|   |   |   |   |       |-- full_lambda.hpp
+|   |   |   |   |       |-- greater_equal.hpp
+|   |   |   |   |       |-- greater.hpp
+|   |   |   |   |       |-- inherit.hpp
+|   |   |   |   |       |-- iter_fold_if_impl.hpp
+|   |   |   |   |       |-- iter_fold_impl.hpp
+|   |   |   |   |       |-- lambda_no_ctps.hpp
+|   |   |   |   |       |-- less_equal.hpp
+|   |   |   |   |       |-- less.hpp
+|   |   |   |   |       |-- list_c.hpp
+|   |   |   |   |       |-- list.hpp
+|   |   |   |   |       |-- map.hpp
+|   |   |   |   |       |-- minus.hpp
+|   |   |   |   |       |-- modulus.hpp
+|   |   |   |   |       |-- not_equal_to.hpp
+|   |   |   |   |       |-- or.hpp
+|   |   |   |   |       |-- placeholders.hpp
+|   |   |   |   |       |-- plus.hpp
+|   |   |   |   |       |-- quote.hpp
+|   |   |   |   |       |-- reverse_fold_impl.hpp
+|   |   |   |   |       |-- reverse_iter_fold_impl.hpp
+|   |   |   |   |       |-- set_c.hpp
+|   |   |   |   |       |-- set.hpp
+|   |   |   |   |       |-- shift_left.hpp
+|   |   |   |   |       |-- shift_right.hpp
+|   |   |   |   |       |-- template_arity.hpp
+|   |   |   |   |       |-- times.hpp
+|   |   |   |   |       |-- unpack_args.hpp
+|   |   |   |   |       |-- vector_c.hpp
+|   |   |   |   |       `-- vector.hpp
+|   |   |   |   |-- preprocessor
+|   |   |   |   |   |-- add.hpp
+|   |   |   |   |   |-- default_params.hpp
+|   |   |   |   |   |-- def_params_tail.hpp
+|   |   |   |   |   |-- enum.hpp
+|   |   |   |   |   |-- ext_params.hpp
+|   |   |   |   |   |-- filter_params.hpp
+|   |   |   |   |   |-- is_seq.hpp
+|   |   |   |   |   |-- params.hpp
+|   |   |   |   |   |-- partial_spec_params.hpp
+|   |   |   |   |   |-- range.hpp
+|   |   |   |   |   |-- repeat.hpp
+|   |   |   |   |   |-- sub.hpp
+|   |   |   |   |   |-- token_equal.hpp
+|   |   |   |   |   `-- tuple.hpp
+|   |   |   |   |-- adl_barrier.hpp
+|   |   |   |   |-- advance_backward.hpp
+|   |   |   |   |-- advance_forward.hpp
+|   |   |   |   |-- arg_typedef.hpp
+|   |   |   |   |-- arithmetic_op.hpp
+|   |   |   |   |-- arity.hpp
+|   |   |   |   |-- arity_spec.hpp
+|   |   |   |   |-- at_impl.hpp
+|   |   |   |   |-- back_impl.hpp
+|   |   |   |   |-- begin_end_impl.hpp
+|   |   |   |   |-- clear_impl.hpp
+|   |   |   |   |-- common_name_wknd.hpp
+|   |   |   |   |-- comparison_op.hpp
+|   |   |   |   |-- contains_impl.hpp
+|   |   |   |   |-- count_args.hpp
+|   |   |   |   |-- empty_impl.hpp
+|   |   |   |   |-- erase_impl.hpp
+|   |   |   |   |-- erase_key_impl.hpp
+|   |   |   |   |-- find_if_pred.hpp
+|   |   |   |   |-- fold_impl_body.hpp
+|   |   |   |   |-- fold_impl.hpp
+|   |   |   |   |-- front_impl.hpp
+|   |   |   |   |-- full_lambda.hpp
+|   |   |   |   |-- has_apply.hpp
+|   |   |   |   |-- has_begin.hpp
+|   |   |   |   |-- has_key_impl.hpp
+|   |   |   |   |-- has_rebind.hpp
+|   |   |   |   |-- has_size.hpp
+|   |   |   |   |-- has_tag.hpp
+|   |   |   |   |-- has_type.hpp
+|   |   |   |   |-- include_preprocessed.hpp
+|   |   |   |   |-- inserter_algorithm.hpp
+|   |   |   |   |-- insert_impl.hpp
+|   |   |   |   |-- insert_range_impl.hpp
+|   |   |   |   |-- integral_wrapper.hpp
+|   |   |   |   |-- is_msvc_eti_arg.hpp
+|   |   |   |   |-- iter_apply.hpp
+|   |   |   |   |-- iter_fold_if_impl.hpp
+|   |   |   |   |-- iter_fold_impl.hpp
+|   |   |   |   |-- iter_push_front.hpp
+|   |   |   |   |-- joint_iter.hpp
+|   |   |   |   |-- lambda_arity_param.hpp
+|   |   |   |   |-- lambda_no_ctps.hpp
+|   |   |   |   |-- lambda_spec.hpp
+|   |   |   |   |-- lambda_support.hpp
+|   |   |   |   |-- largest_int.hpp
+|   |   |   |   |-- logical_op.hpp
+|   |   |   |   |-- msvc_dtw.hpp
+|   |   |   |   |-- msvc_eti_base.hpp
+|   |   |   |   |-- msvc_is_class.hpp
+|   |   |   |   |-- msvc_never_true.hpp
+|   |   |   |   |-- msvc_type.hpp
+|   |   |   |   |-- na_assert.hpp
+|   |   |   |   |-- na_fwd.hpp
+|   |   |   |   |-- na.hpp
+|   |   |   |   |-- na_spec.hpp
+|   |   |   |   |-- nested_type_wknd.hpp
+|   |   |   |   |-- nttp_decl.hpp
+|   |   |   |   |-- numeric_cast_utils.hpp
+|   |   |   |   |-- numeric_op.hpp
+|   |   |   |   |-- O1_size_impl.hpp
+|   |   |   |   |-- pop_back_impl.hpp
+|   |   |   |   |-- pop_front_impl.hpp
+|   |   |   |   |-- push_back_impl.hpp
+|   |   |   |   |-- push_front_impl.hpp
+|   |   |   |   |-- reverse_fold_impl_body.hpp
+|   |   |   |   |-- reverse_fold_impl.hpp
+|   |   |   |   |-- sequence_wrapper.hpp
+|   |   |   |   |-- size_impl.hpp
+|   |   |   |   |-- static_cast.hpp
+|   |   |   |   |-- template_arity_fwd.hpp
+|   |   |   |   |-- template_arity.hpp
+|   |   |   |   |-- traits_lambda_spec.hpp
+|   |   |   |   |-- type_wrapper.hpp
+|   |   |   |   |-- unwrap.hpp
+|   |   |   |   |-- value_wknd.hpp
+|   |   |   |   `-- yes_no.hpp
+|   |   |   |-- limits
+|   |   |   |   |-- arity.hpp
+|   |   |   |   |-- list.hpp
+|   |   |   |   |-- unrolling.hpp
+|   |   |   |   `-- vector.hpp
+|   |   |   |-- list
+|   |   |   |   |-- aux_
+|   |   |   |   |   |-- preprocessed
+|   |   |   |   |   |   `-- plain
+|   |   |   |   |   |       |-- list10_c.hpp
+|   |   |   |   |   |       |-- list10.hpp
+|   |   |   |   |   |       |-- list20_c.hpp
+|   |   |   |   |   |       |-- list20.hpp
+|   |   |   |   |   |       |-- list30_c.hpp
+|   |   |   |   |   |       |-- list30.hpp
+|   |   |   |   |   |       |-- list40_c.hpp
+|   |   |   |   |   |       |-- list40.hpp
+|   |   |   |   |   |       |-- list50_c.hpp
+|   |   |   |   |   |       `-- list50.hpp
+|   |   |   |   |   |-- begin_end.hpp
+|   |   |   |   |   |-- clear.hpp
+|   |   |   |   |   |-- empty.hpp
+|   |   |   |   |   |-- front.hpp
+|   |   |   |   |   |-- include_preprocessed.hpp
+|   |   |   |   |   |-- item.hpp
+|   |   |   |   |   |-- iterator.hpp
+|   |   |   |   |   |-- numbered_c.hpp
+|   |   |   |   |   |-- numbered.hpp
+|   |   |   |   |   |-- O1_size.hpp
+|   |   |   |   |   |-- pop_front.hpp
+|   |   |   |   |   |-- push_back.hpp
+|   |   |   |   |   |-- push_front.hpp
+|   |   |   |   |   |-- size.hpp
+|   |   |   |   |   `-- tag.hpp
+|   |   |   |   |-- list0_c.hpp
+|   |   |   |   |-- list0.hpp
+|   |   |   |   |-- list10_c.hpp
+|   |   |   |   |-- list10.hpp
+|   |   |   |   |-- list20_c.hpp
+|   |   |   |   |-- list20.hpp
+|   |   |   |   |-- list30_c.hpp
+|   |   |   |   |-- list30.hpp
+|   |   |   |   |-- list40_c.hpp
+|   |   |   |   |-- list40.hpp
+|   |   |   |   |-- list50_c.hpp
+|   |   |   |   `-- list50.hpp
+|   |   |   |-- vector
+|   |   |   |   |-- aux_
+|   |   |   |   |   |-- preprocessed
+|   |   |   |   |   |   |-- no_ctps
+|   |   |   |   |   |   |   |-- vector10_c.hpp
+|   |   |   |   |   |   |   |-- vector10.hpp
+|   |   |   |   |   |   |   |-- vector20_c.hpp
+|   |   |   |   |   |   |   |-- vector20.hpp
+|   |   |   |   |   |   |   |-- vector30_c.hpp
+|   |   |   |   |   |   |   |-- vector30.hpp
+|   |   |   |   |   |   |   |-- vector40_c.hpp
+|   |   |   |   |   |   |   |-- vector40.hpp
+|   |   |   |   |   |   |   |-- vector50_c.hpp
+|   |   |   |   |   |   |   `-- vector50.hpp
+|   |   |   |   |   |   |-- plain
+|   |   |   |   |   |   |   |-- vector10_c.hpp
+|   |   |   |   |   |   |   |-- vector10.hpp
+|   |   |   |   |   |   |   |-- vector20_c.hpp
+|   |   |   |   |   |   |   |-- vector20.hpp
+|   |   |   |   |   |   |   |-- vector30_c.hpp
+|   |   |   |   |   |   |   |-- vector30.hpp
+|   |   |   |   |   |   |   |-- vector40_c.hpp
+|   |   |   |   |   |   |   |-- vector40.hpp
+|   |   |   |   |   |   |   |-- vector50_c.hpp
+|   |   |   |   |   |   |   `-- vector50.hpp
+|   |   |   |   |   |   `-- typeof_based
+|   |   |   |   |   |       |-- vector10_c.hpp
+|   |   |   |   |   |       |-- vector10.hpp
+|   |   |   |   |   |       |-- vector20_c.hpp
+|   |   |   |   |   |       |-- vector20.hpp
+|   |   |   |   |   |       |-- vector30_c.hpp
+|   |   |   |   |   |       |-- vector30.hpp
+|   |   |   |   |   |       |-- vector40_c.hpp
+|   |   |   |   |   |       |-- vector40.hpp
+|   |   |   |   |   |       |-- vector50_c.hpp
+|   |   |   |   |   |       `-- vector50.hpp
+|   |   |   |   |   |-- at.hpp
+|   |   |   |   |   |-- back.hpp
+|   |   |   |   |   |-- begin_end.hpp
+|   |   |   |   |   |-- clear.hpp
+|   |   |   |   |   |-- empty.hpp
+|   |   |   |   |   |-- front.hpp
+|   |   |   |   |   |-- include_preprocessed.hpp
+|   |   |   |   |   |-- item.hpp
+|   |   |   |   |   |-- iterator.hpp
+|   |   |   |   |   |-- numbered_c.hpp
+|   |   |   |   |   |-- numbered.hpp
+|   |   |   |   |   |-- O1_size.hpp
+|   |   |   |   |   |-- pop_back.hpp
+|   |   |   |   |   |-- pop_front.hpp
+|   |   |   |   |   |-- push_back.hpp
+|   |   |   |   |   |-- push_front.hpp
+|   |   |   |   |   |-- size.hpp
+|   |   |   |   |   |-- tag.hpp
+|   |   |   |   |   `-- vector0.hpp
+|   |   |   |   |-- vector0_c.hpp
+|   |   |   |   |-- vector0.hpp
+|   |   |   |   |-- vector10_c.hpp
+|   |   |   |   |-- vector10.hpp
+|   |   |   |   |-- vector20_c.hpp
+|   |   |   |   |-- vector20.hpp
+|   |   |   |   |-- vector30_c.hpp
+|   |   |   |   |-- vector30.hpp
+|   |   |   |   |-- vector40_c.hpp
+|   |   |   |   |-- vector40.hpp
+|   |   |   |   |-- vector50_c.hpp
+|   |   |   |   `-- vector50.hpp
+|   |   |   |-- advance_fwd.hpp
+|   |   |   |-- advance.hpp
+|   |   |   |-- always.hpp
+|   |   |   |-- and.hpp
+|   |   |   |-- apply_fwd.hpp
+|   |   |   |-- apply.hpp
+|   |   |   |-- apply_wrap.hpp
+|   |   |   |-- arg_fwd.hpp
+|   |   |   |-- arg.hpp
+|   |   |   |-- assert.hpp
+|   |   |   |-- at_fwd.hpp
+|   |   |   |-- at.hpp
+|   |   |   |-- back_fwd.hpp
+|   |   |   |-- back.hpp
+|   |   |   |-- back_inserter.hpp
+|   |   |   |-- begin_end_fwd.hpp
+|   |   |   |-- begin_end.hpp
+|   |   |   |-- begin.hpp
+|   |   |   |-- bind_fwd.hpp
+|   |   |   |-- bind.hpp
+|   |   |   |-- bitand.hpp
+|   |   |   |-- bitxor.hpp
+|   |   |   |-- bool_fwd.hpp
+|   |   |   |-- bool.hpp
+|   |   |   |-- clear_fwd.hpp
+|   |   |   |-- clear.hpp
+|   |   |   |-- comparison.hpp
+|   |   |   |-- contains_fwd.hpp
+|   |   |   |-- contains.hpp
+|   |   |   |-- copy.hpp
+|   |   |   |-- deref.hpp
+|   |   |   |-- distance_fwd.hpp
+|   |   |   |-- distance.hpp
+|   |   |   |-- empty_base.hpp
+|   |   |   |-- empty_fwd.hpp
+|   |   |   |-- empty.hpp
+|   |   |   |-- end.hpp
+|   |   |   |-- equal_to.hpp
+|   |   |   |-- erase_fwd.hpp
+|   |   |   |-- erase.hpp
+|   |   |   |-- erase_key_fwd.hpp
+|   |   |   |-- erase_key.hpp
+|   |   |   |-- eval_if.hpp
+|   |   |   |-- find.hpp
+|   |   |   |-- find_if.hpp
+|   |   |   |-- fold.hpp
+|   |   |   |-- for_each.hpp
+|   |   |   |-- front_fwd.hpp
+|   |   |   |-- front.hpp
+|   |   |   |-- front_inserter.hpp
+|   |   |   |-- greater_equal.hpp
+|   |   |   |-- greater.hpp
+|   |   |   |-- has_key_fwd.hpp
+|   |   |   |-- has_key.hpp
+|   |   |   |-- has_xxx.hpp
+|   |   |   |-- identity.hpp
+|   |   |   |-- if.hpp
+|   |   |   |-- inherit.hpp
+|   |   |   |-- inserter.hpp
+|   |   |   |-- insert_fwd.hpp
+|   |   |   |-- insert.hpp
+|   |   |   |-- insert_range_fwd.hpp
+|   |   |   |-- insert_range.hpp
+|   |   |   |-- integral_c_fwd.hpp
+|   |   |   |-- integral_c.hpp
+|   |   |   |-- integral_c_tag.hpp
+|   |   |   |-- int_fwd.hpp
+|   |   |   |-- int.hpp
+|   |   |   |-- is_placeholder.hpp
+|   |   |   |-- is_sequence.hpp
+|   |   |   |-- iterator_category.hpp
+|   |   |   |-- iterator_range.hpp
+|   |   |   |-- iterator_tags.hpp
+|   |   |   |-- iter_fold.hpp
+|   |   |   |-- iter_fold_if.hpp
+|   |   |   |-- joint_view.hpp
+|   |   |   |-- lambda_fwd.hpp
+|   |   |   |-- lambda.hpp
+|   |   |   |-- less_equal.hpp
+|   |   |   |-- less.hpp
+|   |   |   |-- list.hpp
+|   |   |   |-- logical.hpp
+|   |   |   |-- long_fwd.hpp
+|   |   |   |-- long.hpp
+|   |   |   |-- min_max.hpp
+|   |   |   |-- minus.hpp
+|   |   |   |-- multiplies.hpp
+|   |   |   |-- negate.hpp
+|   |   |   |-- next.hpp
+|   |   |   |-- next_prior.hpp
+|   |   |   |-- not_equal_to.hpp
+|   |   |   |-- not.hpp
+|   |   |   |-- numeric_cast.hpp
+|   |   |   |-- O1_size_fwd.hpp
+|   |   |   |-- O1_size.hpp
+|   |   |   |-- or.hpp
+|   |   |   |-- pair.hpp
+|   |   |   |-- pair_view.hpp
+|   |   |   |-- placeholders.hpp
+|   |   |   |-- plus.hpp
+|   |   |   |-- pop_back_fwd.hpp
+|   |   |   |-- pop_back.hpp
+|   |   |   |-- pop_front_fwd.hpp
+|   |   |   |-- pop_front.hpp
+|   |   |   |-- prior.hpp
+|   |   |   |-- protect.hpp
+|   |   |   |-- push_back_fwd.hpp
+|   |   |   |-- push_back.hpp
+|   |   |   |-- push_front_fwd.hpp
+|   |   |   |-- push_front.hpp
+|   |   |   |-- quote.hpp
+|   |   |   |-- remove.hpp
+|   |   |   |-- remove_if.hpp
+|   |   |   |-- reverse_fold.hpp
+|   |   |   |-- reverse.hpp
+|   |   |   |-- same_as.hpp
+|   |   |   |-- sequence_tag_fwd.hpp
+|   |   |   |-- sequence_tag.hpp
+|   |   |   |-- size_fwd.hpp
+|   |   |   |-- size.hpp
+|   |   |   |-- size_t_fwd.hpp
+|   |   |   |-- size_t.hpp
+|   |   |   |-- tag.hpp
+|   |   |   |-- times.hpp
+|   |   |   |-- transform.hpp
+|   |   |   |-- vector.hpp
+|   |   |   |-- void_fwd.hpp
+|   |   |   `-- void.hpp
+|   |   |-- numeric
+|   |   |   `-- conversion
+|   |   |       |-- detail
+|   |   |       |   |-- preprocessed
+|   |   |       |   |   |-- numeric_cast_traits_common.hpp
+|   |   |       |   |   `-- numeric_cast_traits_long_long.hpp
+|   |   |       |   |-- bounds.hpp
+|   |   |       |   |-- conversion_traits.hpp
+|   |   |       |   |-- converter.hpp
+|   |   |       |   |-- int_float_mixture.hpp
+|   |   |       |   |-- is_subranged.hpp
+|   |   |       |   |-- meta.hpp
+|   |   |       |   |-- numeric_cast_traits.hpp
+|   |   |       |   |-- old_numeric_cast.hpp
+|   |   |       |   |-- sign_mixture.hpp
+|   |   |       |   `-- udt_builtin_mixture.hpp
+|   |   |       |-- bounds.hpp
+|   |   |       |-- cast.hpp
+|   |   |       |-- conversion_traits.hpp
+|   |   |       |-- converter.hpp
+|   |   |       |-- converter_policies.hpp
+|   |   |       |-- int_float_mixture_enum.hpp
+|   |   |       |-- numeric_cast_traits.hpp
+|   |   |       |-- sign_mixture_enum.hpp
+|   |   |       `-- udt_builtin_mixture_enum.hpp
+|   |   |-- optional
+|   |   |   |-- detail
+|   |   |   |   |-- experimental_traits.hpp
+|   |   |   |   |-- old_optional_implementation.hpp
+|   |   |   |   |-- optional_aligned_storage.hpp
+|   |   |   |   |-- optional_config.hpp
+|   |   |   |   |-- optional_factory_support.hpp
+|   |   |   |   |-- optional_reference_spec.hpp
+|   |   |   |   |-- optional_relops.hpp
+|   |   |   |   |-- optional_swap.hpp
+|   |   |   |   `-- optional_trivially_copyable_base.hpp
+|   |   |   |-- bad_optional_access.hpp
+|   |   |   |-- optional_fwd.hpp
+|   |   |   |-- optional.hpp
+|   |   |   `-- optional_io.hpp
+|   |   |-- pending
+|   |   |   `-- iterator_tests.hpp
+|   |   |-- predef
+|   |   |   |-- architecture
+|   |   |   |   |-- x86
+|   |   |   |   |   |-- 32.h
+|   |   |   |   |   `-- 64.h
+|   |   |   |   |-- alpha.h
+|   |   |   |   |-- arm.h
+|   |   |   |   |-- blackfin.h
+|   |   |   |   |-- convex.h
+|   |   |   |   |-- ia64.h
+|   |   |   |   |-- m68k.h
+|   |   |   |   |-- mips.h
+|   |   |   |   |-- parisc.h
+|   |   |   |   |-- ppc.h
+|   |   |   |   |-- ptx.h
+|   |   |   |   |-- pyramid.h
+|   |   |   |   |-- rs6k.h
+|   |   |   |   |-- sparc.h
+|   |   |   |   |-- superh.h
+|   |   |   |   |-- sys370.h
+|   |   |   |   |-- sys390.h
+|   |   |   |   |-- x86.h
+|   |   |   |   `-- z.h
+|   |   |   |-- compiler
+|   |   |   |   |-- borland.h
+|   |   |   |   |-- clang.h
+|   |   |   |   |-- comeau.h
+|   |   |   |   |-- compaq.h
+|   |   |   |   |-- diab.h
+|   |   |   |   |-- digitalmars.h
+|   |   |   |   |-- dignus.h
+|   |   |   |   |-- edg.h
+|   |   |   |   |-- ekopath.h
+|   |   |   |   |-- gcc.h
+|   |   |   |   |-- gcc_xml.h
+|   |   |   |   |-- greenhills.h
+|   |   |   |   |-- hp_acc.h
+|   |   |   |   |-- iar.h
+|   |   |   |   |-- ibm.h
+|   |   |   |   |-- intel.h
+|   |   |   |   |-- kai.h
+|   |   |   |   |-- llvm.h
+|   |   |   |   |-- metaware.h
+|   |   |   |   |-- metrowerks.h
+|   |   |   |   |-- microtec.h
+|   |   |   |   |-- mpw.h
+|   |   |   |   |-- nvcc.h
+|   |   |   |   |-- palm.h
+|   |   |   |   |-- pgi.h
+|   |   |   |   |-- sgi_mipspro.h
+|   |   |   |   |-- sunpro.h
+|   |   |   |   |-- tendra.h
+|   |   |   |   |-- visualc.h
+|   |   |   |   `-- watcom.h
+|   |   |   |-- detail
+|   |   |   |   |-- _cassert.h
+|   |   |   |   |-- comp_detected.h
+|   |   |   |   |-- _exception.h
+|   |   |   |   |-- os_detected.h
+|   |   |   |   |-- platform_detected.h
+|   |   |   |   `-- test.h
+|   |   |   |-- hardware
+|   |   |   |   |-- simd
+|   |   |   |   |   |-- arm
+|   |   |   |   |   |   `-- versions.h
+|   |   |   |   |   |-- ppc
+|   |   |   |   |   |   `-- versions.h
+|   |   |   |   |   |-- x86
+|   |   |   |   |   |   `-- versions.h
+|   |   |   |   |   |-- x86_amd
+|   |   |   |   |   |   `-- versions.h
+|   |   |   |   |   |-- arm.h
+|   |   |   |   |   |-- ppc.h
+|   |   |   |   |   |-- x86_amd.h
+|   |   |   |   |   `-- x86.h
+|   |   |   |   `-- simd.h
+|   |   |   |-- language
+|   |   |   |   |-- cuda.h
+|   |   |   |   |-- objc.h
+|   |   |   |   |-- stdc.h
+|   |   |   |   `-- stdcpp.h
+|   |   |   |-- library
+|   |   |   |   |-- c
+|   |   |   |   |   |-- cloudabi.h
+|   |   |   |   |   |-- gnu.h
+|   |   |   |   |   |-- _prefix.h
+|   |   |   |   |   |-- uc.h
+|   |   |   |   |   |-- vms.h
+|   |   |   |   |   `-- zos.h
+|   |   |   |   |-- std
+|   |   |   |   |   |-- cxx.h
+|   |   |   |   |   |-- dinkumware.h
+|   |   |   |   |   |-- libcomo.h
+|   |   |   |   |   |-- modena.h
+|   |   |   |   |   |-- msl.h
+|   |   |   |   |   |-- _prefix.h
+|   |   |   |   |   |-- roguewave.h
+|   |   |   |   |   |-- sgi.h
+|   |   |   |   |   |-- stdcpp3.h
+|   |   |   |   |   |-- stlport.h
+|   |   |   |   |   `-- vacpp.h
+|   |   |   |   |-- c.h
+|   |   |   |   `-- std.h
+|   |   |   |-- os
+|   |   |   |   |-- bsd
+|   |   |   |   |   |-- bsdi.h
+|   |   |   |   |   |-- dragonfly.h
+|   |   |   |   |   |-- free.h
+|   |   |   |   |   |-- net.h
+|   |   |   |   |   `-- open.h
+|   |   |   |   |-- aix.h
+|   |   |   |   |-- amigaos.h
+|   |   |   |   |-- android.h
+|   |   |   |   |-- beos.h
+|   |   |   |   |-- bsd.h
+|   |   |   |   |-- cygwin.h
+|   |   |   |   |-- haiku.h
+|   |   |   |   |-- hpux.h
+|   |   |   |   |-- ios.h
+|   |   |   |   |-- irix.h
+|   |   |   |   |-- linux.h
+|   |   |   |   |-- macos.h
+|   |   |   |   |-- os400.h
+|   |   |   |   |-- qnxnto.h
+|   |   |   |   |-- solaris.h
+|   |   |   |   |-- unix.h
+|   |   |   |   |-- vms.h
+|   |   |   |   `-- windows.h
+|   |   |   |-- other
+|   |   |   |   `-- endian.h
+|   |   |   |-- platform
+|   |   |   |   |-- android.h
+|   |   |   |   |-- cloudabi.h
+|   |   |   |   |-- ios.h
+|   |   |   |   |-- mingw32.h
+|   |   |   |   |-- mingw64.h
+|   |   |   |   |-- mingw.h
+|   |   |   |   |-- windows_desktop.h
+|   |   |   |   |-- windows_phone.h
+|   |   |   |   |-- windows_runtime.h
+|   |   |   |   |-- windows_server.h
+|   |   |   |   |-- windows_store.h
+|   |   |   |   |-- windows_system.h
+|   |   |   |   `-- windows_uwp.h
+|   |   |   |-- architecture.h
+|   |   |   |-- compiler.h
+|   |   |   |-- hardware.h
+|   |   |   |-- language.h
+|   |   |   |-- library.h
+|   |   |   |-- make.h
+|   |   |   |-- os.h
+|   |   |   |-- other.h
+|   |   |   |-- platform.h
+|   |   |   |-- version.h
+|   |   |   `-- version_number.h
+|   |   |-- preprocessor
+|   |   |   |-- arithmetic
+|   |   |   |   |-- detail
+|   |   |   |   |   `-- div_base.hpp
+|   |   |   |   |-- add.hpp
+|   |   |   |   |-- dec.hpp
+|   |   |   |   |-- inc.hpp
+|   |   |   |   |-- mod.hpp
+|   |   |   |   `-- sub.hpp
+|   |   |   |-- array
+|   |   |   |   |-- data.hpp
+|   |   |   |   |-- elem.hpp
+|   |   |   |   `-- size.hpp
+|   |   |   |-- comparison
+|   |   |   |   |-- equal.hpp
+|   |   |   |   |-- less_equal.hpp
+|   |   |   |   |-- less.hpp
+|   |   |   |   `-- not_equal.hpp
+|   |   |   |-- config
+|   |   |   |   `-- config.hpp
+|   |   |   |-- control
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- dmc
+|   |   |   |   |   |   `-- while.hpp
+|   |   |   |   |   |-- edg
+|   |   |   |   |   |   `-- while.hpp
+|   |   |   |   |   |-- msvc
+|   |   |   |   |   |   `-- while.hpp
+|   |   |   |   |   `-- while.hpp
+|   |   |   |   |-- deduce_d.hpp
+|   |   |   |   |-- expr_if.hpp
+|   |   |   |   |-- expr_iif.hpp
+|   |   |   |   |-- if.hpp
+|   |   |   |   |-- iif.hpp
+|   |   |   |   `-- while.hpp
+|   |   |   |-- debug
+|   |   |   |   `-- error.hpp
+|   |   |   |-- detail
+|   |   |   |   |-- dmc
+|   |   |   |   |   `-- auto_rec.hpp
+|   |   |   |   |-- auto_rec.hpp
+|   |   |   |   |-- check.hpp
+|   |   |   |   |-- is_binary.hpp
+|   |   |   |   |-- is_unary.hpp
+|   |   |   |   `-- split.hpp
+|   |   |   |-- facilities
+|   |   |   |   |-- detail
+|   |   |   |   |   `-- is_empty.hpp
+|   |   |   |   |-- empty.hpp
+|   |   |   |   |-- expand.hpp
+|   |   |   |   |-- identity.hpp
+|   |   |   |   |-- intercept.hpp
+|   |   |   |   |-- is_1.hpp
+|   |   |   |   |-- is_empty.hpp
+|   |   |   |   |-- is_empty_variadic.hpp
+|   |   |   |   `-- overload.hpp
+|   |   |   |-- iteration
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- bounds
+|   |   |   |   |   |   |-- lower1.hpp
+|   |   |   |   |   |   |-- lower2.hpp
+|   |   |   |   |   |   |-- lower3.hpp
+|   |   |   |   |   |   |-- lower4.hpp
+|   |   |   |   |   |   |-- lower5.hpp
+|   |   |   |   |   |   |-- upper1.hpp
+|   |   |   |   |   |   |-- upper2.hpp
+|   |   |   |   |   |   |-- upper3.hpp
+|   |   |   |   |   |   |-- upper4.hpp
+|   |   |   |   |   |   `-- upper5.hpp
+|   |   |   |   |   |-- iter
+|   |   |   |   |   |   |-- forward1.hpp
+|   |   |   |   |   |   |-- forward2.hpp
+|   |   |   |   |   |   |-- forward3.hpp
+|   |   |   |   |   |   |-- forward4.hpp
+|   |   |   |   |   |   |-- forward5.hpp
+|   |   |   |   |   |   |-- reverse1.hpp
+|   |   |   |   |   |   |-- reverse2.hpp
+|   |   |   |   |   |   |-- reverse3.hpp
+|   |   |   |   |   |   |-- reverse4.hpp
+|   |   |   |   |   |   `-- reverse5.hpp
+|   |   |   |   |   |-- finish.hpp
+|   |   |   |   |   |-- local.hpp
+|   |   |   |   |   |-- rlocal.hpp
+|   |   |   |   |   |-- self.hpp
+|   |   |   |   |   `-- start.hpp
+|   |   |   |   |-- iterate.hpp
+|   |   |   |   |-- local.hpp
+|   |   |   |   `-- self.hpp
+|   |   |   |-- list
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- dmc
+|   |   |   |   |   |   `-- fold_left.hpp
+|   |   |   |   |   |-- edg
+|   |   |   |   |   |   |-- fold_left.hpp
+|   |   |   |   |   |   `-- fold_right.hpp
+|   |   |   |   |   |-- fold_left.hpp
+|   |   |   |   |   `-- fold_right.hpp
+|   |   |   |   |-- adt.hpp
+|   |   |   |   |-- fold_left.hpp
+|   |   |   |   |-- fold_right.hpp
+|   |   |   |   |-- for_each_i.hpp
+|   |   |   |   `-- reverse.hpp
+|   |   |   |-- logical
+|   |   |   |   |-- and.hpp
+|   |   |   |   |-- bitand.hpp
+|   |   |   |   |-- bitor.hpp
+|   |   |   |   |-- bool.hpp
+|   |   |   |   |-- compl.hpp
+|   |   |   |   |-- not.hpp
+|   |   |   |   `-- or.hpp
+|   |   |   |-- punctuation
+|   |   |   |   |-- detail
+|   |   |   |   |   `-- is_begin_parens.hpp
+|   |   |   |   |-- comma.hpp
+|   |   |   |   |-- comma_if.hpp
+|   |   |   |   |-- is_begin_parens.hpp
+|   |   |   |   `-- paren.hpp
+|   |   |   |-- repetition
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- dmc
+|   |   |   |   |   |   `-- for.hpp
+|   |   |   |   |   |-- edg
+|   |   |   |   |   |   `-- for.hpp
+|   |   |   |   |   |-- msvc
+|   |   |   |   |   |   `-- for.hpp
+|   |   |   |   |   `-- for.hpp
+|   |   |   |   |-- enum_binary_params.hpp
+|   |   |   |   |-- enum.hpp
+|   |   |   |   |-- enum_params.hpp
+|   |   |   |   |-- enum_params_with_a_default.hpp
+|   |   |   |   |-- enum_shifted.hpp
+|   |   |   |   |-- enum_shifted_params.hpp
+|   |   |   |   |-- enum_trailing.hpp
+|   |   |   |   |-- enum_trailing_params.hpp
+|   |   |   |   |-- for.hpp
+|   |   |   |   |-- repeat_from_to.hpp
+|   |   |   |   `-- repeat.hpp
+|   |   |   |-- seq
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- is_empty.hpp
+|   |   |   |   |   `-- split.hpp
+|   |   |   |   |-- cat.hpp
+|   |   |   |   |-- elem.hpp
+|   |   |   |   |-- enum.hpp
+|   |   |   |   |-- first_n.hpp
+|   |   |   |   |-- fold_left.hpp
+|   |   |   |   |-- for_each.hpp
+|   |   |   |   |-- for_each_i.hpp
+|   |   |   |   |-- push_front.hpp
+|   |   |   |   |-- rest_n.hpp
+|   |   |   |   |-- seq.hpp
+|   |   |   |   |-- size.hpp
+|   |   |   |   |-- subseq.hpp
+|   |   |   |   |-- to_tuple.hpp
+|   |   |   |   `-- transform.hpp
+|   |   |   |-- slot
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- counter.hpp
+|   |   |   |   |   |-- def.hpp
+|   |   |   |   |   |-- shared.hpp
+|   |   |   |   |   |-- slot1.hpp
+|   |   |   |   |   |-- slot2.hpp
+|   |   |   |   |   |-- slot3.hpp
+|   |   |   |   |   |-- slot4.hpp
+|   |   |   |   |   `-- slot5.hpp
+|   |   |   |   `-- slot.hpp
+|   |   |   |-- tuple
+|   |   |   |   |-- detail
+|   |   |   |   |   `-- is_single_return.hpp
+|   |   |   |   |-- eat.hpp
+|   |   |   |   |-- elem.hpp
+|   |   |   |   |-- rem.hpp
+|   |   |   |   |-- size.hpp
+|   |   |   |   |-- to_list.hpp
+|   |   |   |   `-- to_seq.hpp
+|   |   |   |-- variadic
+|   |   |   |   |-- elem.hpp
+|   |   |   |   |-- size.hpp
+|   |   |   |   `-- to_seq.hpp
+|   |   |   |-- cat.hpp
+|   |   |   |-- comma_if.hpp
+|   |   |   |-- dec.hpp
+|   |   |   |-- empty.hpp
+|   |   |   |-- enum.hpp
+|   |   |   |-- enum_params.hpp
+|   |   |   |-- enum_params_with_a_default.hpp
+|   |   |   |-- enum_shifted_params.hpp
+|   |   |   |-- expr_if.hpp
+|   |   |   |-- identity.hpp
+|   |   |   |-- if.hpp
+|   |   |   |-- inc.hpp
+|   |   |   |-- iterate.hpp
+|   |   |   |-- repeat_from_to.hpp
+|   |   |   |-- repeat.hpp
+|   |   |   `-- stringize.hpp
+|   |   |-- program_options
+|   |   |   |-- detail
+|   |   |   |   |-- cmdline.hpp
+|   |   |   |   |-- config_file.hpp
+|   |   |   |   |-- convert.hpp
+|   |   |   |   |-- parsers.hpp
+|   |   |   |   |-- utf8_codecvt_facet.hpp
+|   |   |   |   `-- value_semantic.hpp
+|   |   |   |-- cmdline.hpp
+|   |   |   |-- config.hpp
+|   |   |   |-- environment_iterator.hpp
+|   |   |   |-- eof_iterator.hpp
+|   |   |   |-- errors.hpp
+|   |   |   |-- option.hpp
+|   |   |   |-- options_description.hpp
+|   |   |   |-- parsers.hpp
+|   |   |   |-- positional_options.hpp
+|   |   |   |-- value_semantic.hpp
+|   |   |   |-- variables_map.hpp
+|   |   |   `-- version.hpp
+|   |   |-- range
+|   |   |   |-- algorithm
+|   |   |   |   `-- equal.hpp
+|   |   |   |-- detail
+|   |   |   |   |-- as_literal.hpp
+|   |   |   |   |-- begin.hpp
+|   |   |   |   |-- common.hpp
+|   |   |   |   |-- detail_str.hpp
+|   |   |   |   |-- end.hpp
+|   |   |   |   |-- extract_optional_type.hpp
+|   |   |   |   |-- has_member_size.hpp
+|   |   |   |   |-- implementation_help.hpp
+|   |   |   |   |-- misc_concept.hpp
+|   |   |   |   |-- msvc_has_iterator_workaround.hpp
+|   |   |   |   |-- remove_extent.hpp
+|   |   |   |   |-- safe_bool.hpp
+|   |   |   |   |-- sfinae.hpp
+|   |   |   |   |-- size_type.hpp
+|   |   |   |   |-- str_types.hpp
+|   |   |   |   `-- value_type.hpp
+|   |   |   |-- as_literal.hpp
+|   |   |   |-- begin.hpp
+|   |   |   |-- concepts.hpp
+|   |   |   |-- config.hpp
+|   |   |   |-- const_iterator.hpp
+|   |   |   |-- difference_type.hpp
+|   |   |   |-- distance.hpp
+|   |   |   |-- empty.hpp
+|   |   |   |-- end.hpp
+|   |   |   |-- functions.hpp
+|   |   |   |-- has_range_iterator.hpp
+|   |   |   |-- iterator.hpp
+|   |   |   |-- iterator_range_core.hpp
+|   |   |   |-- iterator_range.hpp
+|   |   |   |-- iterator_range_io.hpp
+|   |   |   |-- mutable_iterator.hpp
+|   |   |   |-- range_fwd.hpp
+|   |   |   |-- rbegin.hpp
+|   |   |   |-- rend.hpp
+|   |   |   |-- reverse_iterator.hpp
+|   |   |   |-- size.hpp
+|   |   |   |-- size_type.hpp
+|   |   |   `-- value_type.hpp
+|   |   |-- ratio
+|   |   |   |-- detail
+|   |   |   |   |-- mpl
+|   |   |   |   |   |-- abs.hpp
+|   |   |   |   |   |-- gcd.hpp
+|   |   |   |   |   |-- lcm.hpp
+|   |   |   |   |   `-- sign.hpp
+|   |   |   |   `-- overflow_helpers.hpp
+|   |   |   |-- mpl
+|   |   |   |   `-- rational_c_tag.hpp
+|   |   |   |-- config.hpp
+|   |   |   |-- ratio_fwd.hpp
+|   |   |   `-- ratio.hpp
+|   |   |-- smart_ptr
+|   |   |   |-- detail
+|   |   |   |   |-- atomic_count_gcc.hpp
+|   |   |   |   |-- atomic_count_gcc_x86.hpp
+|   |   |   |   |-- atomic_count.hpp
+|   |   |   |   |-- atomic_count_nt.hpp
+|   |   |   |   |-- atomic_count_pt.hpp
+|   |   |   |   |-- atomic_count_spin.hpp
+|   |   |   |   |-- atomic_count_std_atomic.hpp
+|   |   |   |   |-- atomic_count_sync.hpp
+|   |   |   |   |-- atomic_count_win32.hpp
+|   |   |   |   |-- lightweight_mutex.hpp
+|   |   |   |   |-- local_counted_base.hpp
+|   |   |   |   |-- local_sp_deleter.hpp
+|   |   |   |   |-- lwm_nop.hpp
+|   |   |   |   |-- lwm_pthreads.hpp
+|   |   |   |   |-- lwm_win32_cs.hpp
+|   |   |   |   |-- operator_bool.hpp
+|   |   |   |   |-- quick_allocator.hpp
+|   |   |   |   |-- shared_count.hpp
+|   |   |   |   |-- sp_convertible.hpp
+|   |   |   |   |-- sp_counted_base_acc_ia64.hpp
+|   |   |   |   |-- sp_counted_base_aix.hpp
+|   |   |   |   |-- sp_counted_base_clang.hpp
+|   |   |   |   |-- sp_counted_base_cw_ppc.hpp
+|   |   |   |   |-- sp_counted_base_gcc_ia64.hpp
+|   |   |   |   |-- sp_counted_base_gcc_mips.hpp
+|   |   |   |   |-- sp_counted_base_gcc_ppc.hpp
+|   |   |   |   |-- sp_counted_base_gcc_sparc.hpp
+|   |   |   |   |-- sp_counted_base_gcc_x86.hpp
+|   |   |   |   |-- sp_counted_base.hpp
+|   |   |   |   |-- sp_counted_base_nt.hpp
+|   |   |   |   |-- sp_counted_base_pt.hpp
+|   |   |   |   |-- sp_counted_base_snc_ps3.hpp
+|   |   |   |   |-- sp_counted_base_spin.hpp
+|   |   |   |   |-- sp_counted_base_std_atomic.hpp
+|   |   |   |   |-- sp_counted_base_sync.hpp
+|   |   |   |   |-- sp_counted_base_vacpp_ppc.hpp
+|   |   |   |   |-- sp_counted_base_w32.hpp
+|   |   |   |   |-- sp_counted_impl.hpp
+|   |   |   |   |-- sp_disable_deprecated.hpp
+|   |   |   |   |-- sp_forward.hpp
+|   |   |   |   |-- sp_has_sync.hpp
+|   |   |   |   |-- spinlock_gcc_arm.hpp
+|   |   |   |   |-- spinlock.hpp
+|   |   |   |   |-- spinlock_nt.hpp
+|   |   |   |   |-- spinlock_pool.hpp
+|   |   |   |   |-- spinlock_pt.hpp
+|   |   |   |   |-- spinlock_std_atomic.hpp
+|   |   |   |   |-- spinlock_sync.hpp
+|   |   |   |   |-- spinlock_w32.hpp
+|   |   |   |   |-- sp_interlocked.hpp
+|   |   |   |   |-- sp_noexcept.hpp
+|   |   |   |   |-- sp_nullptr_t.hpp
+|   |   |   |   `-- yield_k.hpp
+|   |   |   |-- allocate_shared_array.hpp
+|   |   |   |-- bad_weak_ptr.hpp
+|   |   |   |-- intrusive_ptr.hpp
+|   |   |   |-- intrusive_ref_counter.hpp
+|   |   |   |-- make_shared_array.hpp
+|   |   |   |-- make_shared.hpp
+|   |   |   |-- make_shared_object.hpp
+|   |   |   |-- scoped_array.hpp
+|   |   |   |-- scoped_ptr.hpp
+|   |   |   `-- shared_ptr.hpp
+|   |   |-- system
+|   |   |   |-- detail
+|   |   |   |   |-- config.hpp
+|   |   |   |   |-- generic_category.hpp
+|   |   |   |   |-- std_interoperability.hpp
+|   |   |   |   |-- system_category_posix.hpp
+|   |   |   |   `-- system_category_win32.hpp
+|   |   |   |-- api_config.hpp
+|   |   |   |-- config.hpp
+|   |   |   |-- error_code.hpp
+|   |   |   `-- system_error.hpp
+|   |   |-- test
+|   |   |   |-- detail
+|   |   |   |   |-- config.hpp
+|   |   |   |   |-- enable_warnings.hpp
+|   |   |   |   |-- fwd_decl.hpp
+|   |   |   |   |-- global_typedef.hpp
+|   |   |   |   |-- log_level.hpp
+|   |   |   |   |-- pp_variadic.hpp
+|   |   |   |   |-- suppress_warnings.hpp
+|   |   |   |   `-- throw_exception.hpp
+|   |   |   |-- impl
+|   |   |   |   |-- compiler_log_formatter.ipp
+|   |   |   |   |-- cpp_main.ipp
+|   |   |   |   |-- debug.ipp
+|   |   |   |   |-- decorator.ipp
+|   |   |   |   |-- execution_monitor.ipp
+|   |   |   |   |-- framework.ipp
+|   |   |   |   |-- junit_log_formatter.ipp
+|   |   |   |   |-- plain_report_formatter.ipp
+|   |   |   |   |-- progress_monitor.ipp
+|   |   |   |   |-- results_collector.ipp
+|   |   |   |   |-- results_reporter.ipp
+|   |   |   |   |-- test_framework_init_observer.ipp
+|   |   |   |   |-- test_main.ipp
+|   |   |   |   |-- test_tools.ipp
+|   |   |   |   |-- test_tree.ipp
+|   |   |   |   |-- unit_test_log.ipp
+|   |   |   |   |-- unit_test_main.ipp
+|   |   |   |   |-- unit_test_monitor.ipp
+|   |   |   |   |-- unit_test_parameters.ipp
+|   |   |   |   |-- xml_log_formatter.ipp
+|   |   |   |   `-- xml_report_formatter.ipp
+|   |   |   |-- output
+|   |   |   |   |-- compiler_log_formatter.hpp
+|   |   |   |   |-- junit_log_formatter.hpp
+|   |   |   |   |-- plain_report_formatter.hpp
+|   |   |   |   |-- xml_log_formatter.hpp
+|   |   |   |   `-- xml_report_formatter.hpp
+|   |   |   |-- tools
+|   |   |   |   |-- detail
+|   |   |   |   |   |-- bitwise_manip.hpp
+|   |   |   |   |   |-- expression_holder.hpp
+|   |   |   |   |   |-- fwd.hpp
+|   |   |   |   |   |-- indirections.hpp
+|   |   |   |   |   |-- it_pair.hpp
+|   |   |   |   |   |-- lexicographic_manip.hpp
+|   |   |   |   |   |-- per_element_manip.hpp
+|   |   |   |   |   |-- print_helper.hpp
+|   |   |   |   |   `-- tolerance_manip.hpp
+|   |   |   |   |-- old
+|   |   |   |   |   |-- impl.hpp
+|   |   |   |   |   `-- interface.hpp
+|   |   |   |   |-- assertion.hpp
+|   |   |   |   |-- assertion_result.hpp
+|   |   |   |   |-- collection_comparison_op.hpp
+|   |   |   |   |-- context.hpp
+|   |   |   |   |-- cstring_comparison_op.hpp
+|   |   |   |   |-- floating_point_comparison.hpp
+|   |   |   |   |-- fpc_op.hpp
+|   |   |   |   |-- fpc_tolerance.hpp
+|   |   |   |   |-- interface.hpp
+|   |   |   |   `-- output_test_stream.hpp
+|   |   |   |-- tree
+|   |   |   |   |-- auto_registration.hpp
+|   |   |   |   |-- decorator.hpp
+|   |   |   |   |-- fixture.hpp
+|   |   |   |   |-- global_fixture.hpp
+|   |   |   |   |-- observer.hpp
+|   |   |   |   |-- test_case_counter.hpp
+|   |   |   |   |-- test_case_template.hpp
+|   |   |   |   |-- test_unit.hpp
+|   |   |   |   |-- traverse.hpp
+|   |   |   |   `-- visitor.hpp
+|   |   |   |-- utils
+|   |   |   |   |-- basic_cstring
+|   |   |   |   |   |-- basic_cstring_fwd.hpp
+|   |   |   |   |   |-- basic_cstring.hpp
+|   |   |   |   |   |-- bcs_char_traits.hpp
+|   |   |   |   |   |-- compare.hpp
+|   |   |   |   |   `-- io.hpp
+|   |   |   |   |-- iterator
+|   |   |   |   |   |-- input_iterator_facade.hpp
+|   |   |   |   |   `-- token_iterator.hpp
+|   |   |   |   |-- runtime
+|   |   |   |   |   |-- cla
+|   |   |   |   |   |   |-- argv_traverser.hpp
+|   |   |   |   |   |   `-- parser.hpp
+|   |   |   |   |   |-- env
+|   |   |   |   |   |   `-- fetch.hpp
+|   |   |   |   |   |-- argument_factory.hpp
+|   |   |   |   |   |-- argument.hpp
+|   |   |   |   |   |-- errors.hpp
+|   |   |   |   |   |-- finalize.hpp
+|   |   |   |   |   |-- fwd.hpp
+|   |   |   |   |   |-- modifier.hpp
+|   |   |   |   |   `-- parameter.hpp
+|   |   |   |   |-- algorithm.hpp
+|   |   |   |   |-- assign_op.hpp
+|   |   |   |   |-- class_properties.hpp
+|   |   |   |   |-- custom_manip.hpp
+|   |   |   |   |-- foreach.hpp
+|   |   |   |   |-- is_cstring.hpp
+|   |   |   |   |-- is_forward_iterable.hpp
+|   |   |   |   |-- lazy_ostream.hpp
+|   |   |   |   |-- named_params.hpp
+|   |   |   |   |-- rtti.hpp
+|   |   |   |   |-- setcolor.hpp
+|   |   |   |   |-- string_cast.hpp
+|   |   |   |   |-- timer.hpp
+|   |   |   |   |-- wrap_stringstream.hpp
+|   |   |   |   `-- xml_printer.hpp
+|   |   |   |-- debug_config.hpp
+|   |   |   |-- debug.hpp
+|   |   |   |-- execution_monitor.hpp
+|   |   |   |-- framework.hpp
+|   |   |   |-- minimal.hpp
+|   |   |   |-- progress_monitor.hpp
+|   |   |   |-- results_collector.hpp
+|   |   |   |-- results_reporter.hpp
+|   |   |   |-- test_framework_init_observer.hpp
+|   |   |   |-- test_tools.hpp
+|   |   |   |-- unit_test_log_formatter.hpp
+|   |   |   |-- unit_test_log.hpp
+|   |   |   |-- unit_test_monitor.hpp
+|   |   |   |-- unit_test_parameters.hpp
+|   |   |   `-- unit_test_suite.hpp
+|   |   |-- timer
+|   |   |   |-- config.hpp
+|   |   |   `-- timer.hpp
+|   |   |-- tuple
+|   |   |   |-- detail
+|   |   |   |   `-- tuple_basic.hpp
+|   |   |   `-- tuple.hpp
+|   |   |-- type_index
+|   |   |   |-- detail
+|   |   |   |   |-- compile_time_type_info.hpp
+|   |   |   |   |-- ctti_register_class.hpp
+|   |   |   |   `-- stl_register_class.hpp
+|   |   |   |-- ctti_type_index.hpp
+|   |   |   |-- stl_type_index.hpp
+|   |   |   `-- type_index_facade.hpp
+|   |   |-- typeof
+|   |   |   |-- dmc
+|   |   |   |   `-- typeof_impl.hpp
+|   |   |   |-- msvc
+|   |   |   |   `-- typeof_impl.hpp
+|   |   |   |-- constant.hpp
+|   |   |   |-- decltype.hpp
+|   |   |   |-- encode_decode.hpp
+|   |   |   |-- encode_decode_params.hpp
+|   |   |   |-- integral_template_param.hpp
+|   |   |   |-- int_encoding.hpp
+|   |   |   |-- message.hpp
+|   |   |   |-- modifiers.hpp
+|   |   |   |-- native.hpp
+|   |   |   |-- pointers_data_members.hpp
+|   |   |   |-- register_functions.hpp
+|   |   |   |-- register_functions_iterate.hpp
+|   |   |   |-- register_fundamental.hpp
+|   |   |   |-- register_mem_functions.hpp
+|   |   |   |-- template_encoding.hpp
+|   |   |   |-- template_template_param.hpp
+|   |   |   |-- type_encoding.hpp
+|   |   |   |-- typeof.hpp
+|   |   |   |-- typeof_impl.hpp
+|   |   |   |-- type_template_param.hpp
+|   |   |   |-- unsupported.hpp
+|   |   |   |-- vector100.hpp
+|   |   |   |-- vector150.hpp
+|   |   |   |-- vector200.hpp
+|   |   |   |-- vector50.hpp
+|   |   |   `-- vector.hpp
+|   |   |-- type_traits
+|   |   |   |-- detail
+|   |   |   |   |-- bool_trait_undef.hpp
+|   |   |   |   |-- common_arithmetic_type.hpp
+|   |   |   |   |-- common_type_impl.hpp
+|   |   |   |   |-- composite_member_pointer_type.hpp
+|   |   |   |   |-- composite_pointer_type.hpp
+|   |   |   |   |-- config.hpp
+|   |   |   |   |-- has_binary_operator.hpp
+|   |   |   |   |-- has_postfix_operator.hpp
+|   |   |   |   |-- has_prefix_operator.hpp
+|   |   |   |   |-- is_function_cxx_03.hpp
+|   |   |   |   |-- is_function_cxx_11.hpp
+|   |   |   |   |-- is_function_msvc10_fix.hpp
+|   |   |   |   |-- is_function_ptr_helper.hpp
+|   |   |   |   |-- is_function_ptr_tester.hpp
+|   |   |   |   |-- is_likely_lambda.hpp
+|   |   |   |   |-- is_member_function_pointer_cxx_03.hpp
+|   |   |   |   |-- is_member_function_pointer_cxx_11.hpp
+|   |   |   |   |-- is_mem_fun_pointer_impl.hpp
+|   |   |   |   |-- is_mem_fun_pointer_tester.hpp
+|   |   |   |   |-- is_rvalue_reference_msvc10_fix.hpp
+|   |   |   |   |-- mp_defer.hpp
+|   |   |   |   `-- yes_no_type.hpp
+|   |   |   |-- add_const.hpp
+|   |   |   |-- add_cv.hpp
+|   |   |   |-- add_lvalue_reference.hpp
+|   |   |   |-- add_pointer.hpp
+|   |   |   |-- add_reference.hpp
+|   |   |   |-- add_rvalue_reference.hpp
+|   |   |   |-- add_volatile.hpp
+|   |   |   |-- aligned_storage.hpp
+|   |   |   |-- alignment_of.hpp
+|   |   |   |-- common_type.hpp
+|   |   |   |-- composite_traits.hpp
+|   |   |   |-- conditional.hpp
+|   |   |   |-- conversion_traits.hpp
+|   |   |   |-- copy_cv.hpp
+|   |   |   |-- copy_cv_ref.hpp
+|   |   |   |-- copy_reference.hpp
+|   |   |   |-- cv_traits.hpp
+|   |   |   |-- decay.hpp
+|   |   |   |-- declval.hpp
+|   |   |   |-- enable_if.hpp
+|   |   |   |-- extent.hpp
+|   |   |   |-- floating_point_promotion.hpp
+|   |   |   |-- function_traits.hpp
+|   |   |   |-- has_bit_and_assign.hpp
+|   |   |   |-- has_bit_and.hpp
+|   |   |   |-- has_bit_or_assign.hpp
+|   |   |   |-- has_bit_or.hpp
+|   |   |   |-- has_bit_xor_assign.hpp
+|   |   |   |-- has_bit_xor.hpp
+|   |   |   |-- has_complement.hpp
+|   |   |   |-- has_dereference.hpp
+|   |   |   |-- has_divides_assign.hpp
+|   |   |   |-- has_divides.hpp
+|   |   |   |-- has_equal_to.hpp
+|   |   |   |-- has_greater_equal.hpp
+|   |   |   |-- has_greater.hpp
+|   |   |   |-- has_left_shift_assign.hpp
+|   |   |   |-- has_left_shift.hpp
+|   |   |   |-- has_less_equal.hpp
+|   |   |   |-- has_less.hpp
+|   |   |   |-- has_logical_and.hpp
+|   |   |   |-- has_logical_not.hpp
+|   |   |   |-- has_logical_or.hpp
+|   |   |   |-- has_minus_assign.hpp
+|   |   |   |-- has_minus.hpp
+|   |   |   |-- has_modulus_assign.hpp
+|   |   |   |-- has_modulus.hpp
+|   |   |   |-- has_multiplies_assign.hpp
+|   |   |   |-- has_multiplies.hpp
+|   |   |   |-- has_negate.hpp
+|   |   |   |-- has_new_operator.hpp
+|   |   |   |-- has_not_equal_to.hpp
+|   |   |   |-- has_nothrow_assign.hpp
+|   |   |   |-- has_nothrow_constructor.hpp
+|   |   |   |-- has_nothrow_copy.hpp
+|   |   |   |-- has_nothrow_destructor.hpp
+|   |   |   |-- has_plus_assign.hpp
+|   |   |   |-- has_plus.hpp
+|   |   |   |-- has_post_decrement.hpp
+|   |   |   |-- has_post_increment.hpp
+|   |   |   |-- has_pre_decrement.hpp
+|   |   |   |-- has_pre_increment.hpp
+|   |   |   |-- has_right_shift_assign.hpp
+|   |   |   |-- has_right_shift.hpp
+|   |   |   |-- has_trivial_assign.hpp
+|   |   |   |-- has_trivial_constructor.hpp
+|   |   |   |-- has_trivial_copy.hpp
+|   |   |   |-- has_trivial_destructor.hpp
+|   |   |   |-- has_trivial_move_assign.hpp
+|   |   |   |-- has_trivial_move_constructor.hpp
+|   |   |   |-- has_unary_minus.hpp
+|   |   |   |-- has_unary_plus.hpp
+|   |   |   |-- has_virtual_destructor.hpp
+|   |   |   |-- integral_constant.hpp
+|   |   |   |-- integral_promotion.hpp
+|   |   |   |-- intrinsics.hpp
+|   |   |   |-- is_abstract.hpp
+|   |   |   |-- is_arithmetic.hpp
+|   |   |   |-- is_array.hpp
+|   |   |   |-- is_assignable.hpp
+|   |   |   |-- is_base_and_derived.hpp
+|   |   |   |-- is_base_of.hpp
+|   |   |   |-- is_bounded_array.hpp
+|   |   |   |-- is_class.hpp
+|   |   |   |-- is_complete.hpp
+|   |   |   |-- is_complex.hpp
+|   |   |   |-- is_compound.hpp
+|   |   |   |-- is_const.hpp
+|   |   |   |-- is_constructible.hpp
+|   |   |   |-- is_convertible.hpp
+|   |   |   |-- is_copy_assignable.hpp
+|   |   |   |-- is_copy_constructible.hpp
+|   |   |   |-- is_default_constructible.hpp
+|   |   |   |-- is_destructible.hpp
+|   |   |   |-- is_empty.hpp
+|   |   |   |-- is_enum.hpp
+|   |   |   |-- is_final.hpp
+|   |   |   |-- is_float.hpp
+|   |   |   |-- is_floating_point.hpp
+|   |   |   |-- is_function.hpp
+|   |   |   |-- is_fundamental.hpp
+|   |   |   |-- is_integral.hpp
+|   |   |   |-- is_list_constructible.hpp
+|   |   |   |-- is_lvalue_reference.hpp
+|   |   |   |-- is_member_function_pointer.hpp
+|   |   |   |-- is_member_object_pointer.hpp
+|   |   |   |-- is_member_pointer.hpp
+|   |   |   |-- is_noncopyable.hpp
+|   |   |   |-- is_nothrow_move_assignable.hpp
+|   |   |   |-- is_nothrow_move_constructible.hpp
+|   |   |   |-- is_nothrow_swappable.hpp
+|   |   |   |-- is_object.hpp
+|   |   |   |-- is_pod.hpp
+|   |   |   |-- is_pointer.hpp
+|   |   |   |-- is_polymorphic.hpp
+|   |   |   |-- is_reference.hpp
+|   |   |   |-- is_rvalue_reference.hpp
+|   |   |   |-- is_same.hpp
+|   |   |   |-- is_scalar.hpp
+|   |   |   |-- is_signed.hpp
+|   |   |   |-- is_stateless.hpp
+|   |   |   |-- is_unbounded_array.hpp
+|   |   |   |-- is_union.hpp
+|   |   |   |-- is_unsigned.hpp
+|   |   |   |-- is_virtual_base_of.hpp
+|   |   |   |-- is_void.hpp
+|   |   |   |-- is_volatile.hpp
+|   |   |   |-- make_signed.hpp
+|   |   |   |-- make_unsigned.hpp
+|   |   |   |-- make_void.hpp
+|   |   |   |-- promote.hpp
+|   |   |   |-- rank.hpp
+|   |   |   |-- remove_all_extents.hpp
+|   |   |   |-- remove_bounds.hpp
+|   |   |   |-- remove_const.hpp
+|   |   |   |-- remove_cv.hpp
+|   |   |   |-- remove_cv_ref.hpp
+|   |   |   |-- remove_extent.hpp
+|   |   |   |-- remove_pointer.hpp
+|   |   |   |-- remove_reference.hpp
+|   |   |   |-- remove_volatile.hpp
+|   |   |   |-- same_traits.hpp
+|   |   |   |-- type_identity.hpp
+|   |   |   `-- type_with_alignment.hpp
+|   |   |-- utility
+|   |   |   |-- detail
+|   |   |   |   |-- in_place_factory_prefix.hpp
+|   |   |   |   |-- in_place_factory_suffix.hpp
+|   |   |   |   `-- result_of_iterate.hpp
+|   |   |   |-- addressof.hpp
+|   |   |   |-- base_from_member.hpp
+|   |   |   |-- binary.hpp
+|   |   |   |-- compare_pointees.hpp
+|   |   |   |-- declval.hpp
+|   |   |   |-- enable_if.hpp
+|   |   |   |-- explicit_operator_bool.hpp
+|   |   |   |-- identity_type.hpp
+|   |   |   |-- in_place_factory.hpp
+|   |   |   |-- result_of.hpp
+|   |   |   |-- swap.hpp
+|   |   |   |-- typed_in_place_factory.hpp
+|   |   |   `-- value_init.hpp
+|   |   |-- winapi
+|   |   |   |-- basic_types.hpp
+|   |   |   |-- character_code_conversion.hpp
+|   |   |   |-- config.hpp
+|   |   |   |-- dll.hpp
+|   |   |   |-- error_codes.hpp
+|   |   |   |-- error_handling.hpp
+|   |   |   |-- get_current_process.hpp
+|   |   |   |-- get_current_thread.hpp
+|   |   |   |-- get_last_error.hpp
+|   |   |   |-- get_process_times.hpp
+|   |   |   |-- get_thread_times.hpp
+|   |   |   |-- local_memory.hpp
+|   |   |   |-- time.hpp
+|   |   |   `-- timers.hpp
+|   |   |-- aligned_storage.hpp
+|   |   |-- any.hpp
+|   |   |-- array.hpp
+|   |   |-- assert.hpp
+|   |   |-- bind.hpp
+|   |   |-- blank_fwd.hpp
+|   |   |-- blank.hpp
+|   |   |-- call_traits.hpp
+|   |   |-- cast.hpp
+|   |   |-- cerrno.hpp
+|   |   |-- checked_delete.hpp
+|   |   |-- concept_archetype.hpp
+|   |   |-- concept_check.hpp
+|   |   |-- config.hpp
+|   |   |-- cstdint.hpp
+|   |   |-- cstdlib.hpp
+|   |   |-- current_function.hpp
+|   |   |-- filesystem.hpp
+|   |   |-- format.hpp
+|   |   |-- function_equal.hpp
+|   |   |-- function.hpp
+|   |   |-- function_output_iterator.hpp
+|   |   |-- generator_iterator.hpp
+|   |   |-- get_pointer.hpp
+|   |   |-- implicit_cast.hpp
+|   |   |-- indirect_reference.hpp
+|   |   |-- integer_fwd.hpp
+|   |   |-- integer.hpp
+|   |   |-- integer_traits.hpp
+|   |   |-- io_fwd.hpp
+|   |   |-- is_placeholder.hpp
+|   |   |-- iterator_adaptors.hpp
+|   |   |-- iterator.hpp
+|   |   |-- lexical_cast.hpp
+|   |   |-- limits.hpp
+|   |   |-- make_shared.hpp
+|   |   |-- mem_fn.hpp
+|   |   |-- mp11.hpp
+|   |   |-- next_prior.hpp
+|   |   |-- noncopyable.hpp
+|   |   |-- none.hpp
+|   |   |-- none_t.hpp
+|   |   |-- non_type.hpp
+|   |   |-- operators.hpp
+|   |   |-- optional.hpp
+|   |   |-- pointee.hpp
+|   |   |-- polymorphic_cast.hpp
+|   |   |-- predef.h
+|   |   |-- program_options.hpp
+|   |   |-- rational.hpp
+|   |   |-- ref.hpp
+|   |   |-- scoped_array.hpp
+|   |   |-- scoped_ptr.hpp
+|   |   |-- shared_container_iterator.hpp
+|   |   |-- shared_ptr.hpp
+|   |   |-- static_assert.hpp
+|   |   |-- swap.hpp
+|   |   |-- throw_exception.hpp
+|   |   |-- timer.hpp
+|   |   |-- token_functions.hpp
+|   |   |-- token_iterator.hpp
+|   |   |-- tokenizer.hpp
+|   |   |-- type.hpp
+|   |   |-- type_index.hpp
+|   |   |-- type_traits.hpp
+|   |   |-- utility.hpp
+|   |   |-- version.hpp
+|   |   `-- visit_each.hpp
+|   |-- catch2
+|   |   `-- catch.hpp
+|   |-- eigen-eigen-b3f3d4950030
+|   |   |-- bench
+|   |   |   |-- btl
+|   |   |   |   |-- actions
+|   |   |   |   |   |-- action_aat_product.hh
+|   |   |   |   |   |-- action_ata_product.hh
+|   |   |   |   |   |-- action_atv_product.hh
+|   |   |   |   |   |-- action_axpby.hh
+|   |   |   |   |   |-- action_axpy.hh
+|   |   |   |   |   |-- action_cholesky.hh
+|   |   |   |   |   |-- action_ger.hh
+|   |   |   |   |   |-- action_hessenberg.hh
+|   |   |   |   |   |-- action_lu_decomp.hh
+|   |   |   |   |   |-- action_lu_solve.hh
+|   |   |   |   |   |-- action_matrix_matrix_product_bis.hh
+|   |   |   |   |   |-- action_matrix_matrix_product.hh
+|   |   |   |   |   |-- action_matrix_vector_product.hh
+|   |   |   |   |   |-- action_partial_lu.hh
+|   |   |   |   |   |-- action_rot.hh
+|   |   |   |   |   |-- action_symv.hh
+|   |   |   |   |   |-- action_syr2.hh
+|   |   |   |   |   |-- action_trisolve.hh
+|   |   |   |   |   |-- action_trisolve_matrix.hh
+|   |   |   |   |   |-- action_trmm.hh
+|   |   |   |   |   `-- basic_actions.hh
+|   |   |   |   |-- cmake
+|   |   |   |   |   |-- FindACML.cmake
+|   |   |   |   |   |-- FindATLAS.cmake
+|   |   |   |   |   |-- FindBLAZE.cmake
+|   |   |   |   |   |-- FindBlitz.cmake
+|   |   |   |   |   |-- FindCBLAS.cmake
+|   |   |   |   |   |-- FindGMM.cmake
+|   |   |   |   |   |-- FindMKL.cmake
+|   |   |   |   |   |-- FindMTL4.cmake
+|   |   |   |   |   |-- FindOPENBLAS.cmake
+|   |   |   |   |   |-- FindPackageHandleStandardArgs.cmake
+|   |   |   |   |   |-- FindTvmet.cmake
+|   |   |   |   |   `-- MacroOptionalAddSubdirectory.cmake
+|   |   |   |   |-- data
+|   |   |   |   |   |-- action_settings.txt
+|   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |-- gnuplot_common_settings.hh
+|   |   |   |   |   |-- go_mean
+|   |   |   |   |   |-- mean.cxx
+|   |   |   |   |   |-- mk_gnuplot_script.sh
+|   |   |   |   |   |-- mk_mean_script.sh
+|   |   |   |   |   |-- mk_new_gnuplot.sh
+|   |   |   |   |   |-- perlib_plot_settings.txt
+|   |   |   |   |   |-- regularize.cxx
+|   |   |   |   |   |-- smooth_all.sh
+|   |   |   |   |   `-- smooth.cxx
+|   |   |   |   |-- generic_bench
+|   |   |   |   |   |-- init
+|   |   |   |   |   |   |-- init_function.hh
+|   |   |   |   |   |   |-- init_matrix.hh
+|   |   |   |   |   |   `-- init_vector.hh
+|   |   |   |   |   |-- static
+|   |   |   |   |   |   |-- bench_static.hh
+|   |   |   |   |   |   |-- intel_bench_fixed_size.hh
+|   |   |   |   |   |   `-- static_size_generator.hh
+|   |   |   |   |   |-- timers
+|   |   |   |   |   |   |-- mixed_perf_analyzer.hh
+|   |   |   |   |   |   |-- portable_perf_analyzer.hh
+|   |   |   |   |   |   |-- portable_perf_analyzer_old.hh
+|   |   |   |   |   |   |-- portable_timer.hh
+|   |   |   |   |   |   |-- STL_perf_analyzer.hh
+|   |   |   |   |   |   |-- STL_timer.hh
+|   |   |   |   |   |   |-- x86_perf_analyzer.hh
+|   |   |   |   |   |   `-- x86_timer.hh
+|   |   |   |   |   |-- utils
+|   |   |   |   |   |   |-- size_lin_log.hh
+|   |   |   |   |   |   |-- size_log.hh
+|   |   |   |   |   |   |-- utilities.h
+|   |   |   |   |   |   `-- xy_file.hh
+|   |   |   |   |   |-- bench.hh
+|   |   |   |   |   |-- bench_parameter.hh
+|   |   |   |   |   `-- btl.hh
+|   |   |   |   |-- libs
+|   |   |   |   |   |-- BLAS
+|   |   |   |   |   |   |-- blas.h
+|   |   |   |   |   |   |-- blas_interface.hh
+|   |   |   |   |   |   |-- blas_interface_impl.hh
+|   |   |   |   |   |   |-- c_interface_base.h
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   `-- main.cpp
+|   |   |   |   |   |-- blaze
+|   |   |   |   |   |   |-- blaze_interface.hh
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   `-- main.cpp
+|   |   |   |   |   |-- blitz
+|   |   |   |   |   |   |-- blitz_interface.hh
+|   |   |   |   |   |   |-- blitz_LU_solve_interface.hh
+|   |   |   |   |   |   |-- btl_blitz.cpp
+|   |   |   |   |   |   |-- btl_tiny_blitz.cpp
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   `-- tiny_blitz_interface.hh
+|   |   |   |   |   |-- eigen2
+|   |   |   |   |   |   |-- btl_tiny_eigen2.cpp
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   |-- eigen2_interface.hh
+|   |   |   |   |   |   |-- main_adv.cpp
+|   |   |   |   |   |   |-- main_linear.cpp
+|   |   |   |   |   |   |-- main_matmat.cpp
+|   |   |   |   |   |   `-- main_vecmat.cpp
+|   |   |   |   |   |-- eigen3
+|   |   |   |   |   |   |-- btl_tiny_eigen3.cpp
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   |-- eigen3_interface.hh
+|   |   |   |   |   |   |-- main_adv.cpp
+|   |   |   |   |   |   |-- main_linear.cpp
+|   |   |   |   |   |   |-- main_matmat.cpp
+|   |   |   |   |   |   `-- main_vecmat.cpp
+|   |   |   |   |   |-- gmm
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   |-- gmm_interface.hh
+|   |   |   |   |   |   |-- gmm_LU_solve_interface.hh
+|   |   |   |   |   |   `-- main.cpp
+|   |   |   |   |   |-- mtl4
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   |-- main.cpp
+|   |   |   |   |   |   |-- mtl4_interface.hh
+|   |   |   |   |   |   `-- mtl4_LU_solve_interface.hh
+|   |   |   |   |   |-- STL
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   |-- main.cpp
+|   |   |   |   |   |   `-- STL_interface.hh
+|   |   |   |   |   |-- tensors
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   |-- main_linear.cpp
+|   |   |   |   |   |   |-- main_matmat.cpp
+|   |   |   |   |   |   |-- main_vecmat.cpp
+|   |   |   |   |   |   `-- tensor_interface.hh
+|   |   |   |   |   |-- tvmet
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   |-- main.cpp
+|   |   |   |   |   |   `-- tvmet_interface.hh
+|   |   |   |   |   `-- ublas
+|   |   |   |   |       |-- CMakeLists.txt
+|   |   |   |   |       |-- main.cpp
+|   |   |   |   |       `-- ublas_interface.hh
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- COPYING
+|   |   |   |   `-- README
+|   |   |   |-- perf_monitoring
+|   |   |   |   `-- gemm
+|   |   |   |       |-- changesets.txt
+|   |   |   |       |-- gemm.cpp
+|   |   |   |       |-- gemm_settings.txt
+|   |   |   |       |-- lazy_gemm.cpp
+|   |   |   |       |-- lazy_gemm_settings.txt
+|   |   |   |       |-- make_plot.sh
+|   |   |   |       `-- run.sh
+|   |   |   |-- spbench
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- spbench.dtd
+|   |   |   |   |-- spbenchsolver.cpp
+|   |   |   |   |-- spbenchsolver.h
+|   |   |   |   |-- spbenchstyle.h
+|   |   |   |   |-- sp_solver.cpp
+|   |   |   |   `-- test_sparseLU.cpp
+|   |   |   |-- tensors
+|   |   |   |   |-- benchmark.h
+|   |   |   |   |-- benchmark_main.cc
+|   |   |   |   |-- contraction_benchmarks_cpu.cc
+|   |   |   |   |-- README
+|   |   |   |   |-- tensor_benchmarks_cpu.cc
+|   |   |   |   |-- tensor_benchmarks_fp16_gpu.cu
+|   |   |   |   |-- tensor_benchmarks_gpu.cu
+|   |   |   |   |-- tensor_benchmarks.h
+|   |   |   |   `-- tensor_benchmarks_sycl.cc
+|   |   |   |-- analyze-blocking-sizes.cpp
+|   |   |   |-- basicbench.cxxlist
+|   |   |   |-- basicbenchmark.cpp
+|   |   |   |-- basicbenchmark.h
+|   |   |   |-- benchBlasGemm.cpp
+|   |   |   |-- benchCholesky.cpp
+|   |   |   |-- benchEigenSolver.cpp
+|   |   |   |-- benchFFT.cpp
+|   |   |   |-- bench_gemm.cpp
+|   |   |   |-- benchGeometry.cpp
+|   |   |   |-- benchmark-blocking-sizes.cpp
+|   |   |   |-- benchmark.cpp
+|   |   |   |-- benchmarkSlice.cpp
+|   |   |   |-- benchmark_suite
+|   |   |   |-- benchmarkX.cpp
+|   |   |   |-- benchmarkXcwise.cpp
+|   |   |   |-- bench_multi_compilers.sh
+|   |   |   |-- bench_norm.cpp
+|   |   |   |-- bench_reverse.cpp
+|   |   |   |-- BenchSparseUtil.h
+|   |   |   |-- bench_sum.cpp
+|   |   |   |-- BenchTimer.h
+|   |   |   |-- bench_unrolling
+|   |   |   |-- BenchUtil.h
+|   |   |   |-- benchVecAdd.cpp
+|   |   |   |-- check_cache_queries.cpp
+|   |   |   |-- dense_solvers.cpp
+|   |   |   |-- eig33.cpp
+|   |   |   |-- geometry.cpp
+|   |   |   |-- product_threshold.cpp
+|   |   |   |-- quatmul.cpp
+|   |   |   |-- quat_slerp.cpp
+|   |   |   |-- README.txt
+|   |   |   |-- sparse_cholesky.cpp
+|   |   |   |-- sparse_dense_product.cpp
+|   |   |   |-- sparse_lu.cpp
+|   |   |   |-- sparse_product.cpp
+|   |   |   |-- sparse_randomsetter.cpp
+|   |   |   |-- sparse_setter.cpp
+|   |   |   |-- sparse_transpose.cpp
+|   |   |   |-- sparse_trisolver.cpp
+|   |   |   |-- spmv.cpp
+|   |   |   `-- vdw_new.cpp
+|   |   |-- blas
+|   |   |   |-- f2c
+|   |   |   |   |-- chbmv.c
+|   |   |   |   |-- chpmv.c
+|   |   |   |   |-- complexdots.c
+|   |   |   |   |-- ctbmv.c
+|   |   |   |   |-- datatypes.h
+|   |   |   |   |-- d_cnjg.c
+|   |   |   |   |-- drotm.c
+|   |   |   |   |-- drotmg.c
+|   |   |   |   |-- dsbmv.c
+|   |   |   |   |-- dspmv.c
+|   |   |   |   |-- dtbmv.c
+|   |   |   |   |-- lsame.c
+|   |   |   |   |-- r_cnjg.c
+|   |   |   |   |-- srotm.c
+|   |   |   |   |-- srotmg.c
+|   |   |   |   |-- ssbmv.c
+|   |   |   |   |-- sspmv.c
+|   |   |   |   |-- stbmv.c
+|   |   |   |   |-- zhbmv.c
+|   |   |   |   |-- zhpmv.c
+|   |   |   |   `-- ztbmv.c
+|   |   |   |-- fortran
+|   |   |   |   `-- complexdots.f
+|   |   |   |-- testing
+|   |   |   |   |-- cblat1.f
+|   |   |   |   |-- cblat2.dat
+|   |   |   |   |-- cblat2.f
+|   |   |   |   |-- cblat3.dat
+|   |   |   |   |-- cblat3.f
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- dblat1.f
+|   |   |   |   |-- dblat2.dat
+|   |   |   |   |-- dblat2.f
+|   |   |   |   |-- dblat3.dat
+|   |   |   |   |-- dblat3.f
+|   |   |   |   |-- runblastest.sh
+|   |   |   |   |-- sblat1.f
+|   |   |   |   |-- sblat2.dat
+|   |   |   |   |-- sblat2.f
+|   |   |   |   |-- sblat3.dat
+|   |   |   |   |-- sblat3.f
+|   |   |   |   |-- zblat1.f
+|   |   |   |   |-- zblat2.dat
+|   |   |   |   |-- zblat2.f
+|   |   |   |   |-- zblat3.dat
+|   |   |   |   `-- zblat3.f
+|   |   |   |-- BandTriangularSolver.h
+|   |   |   |-- CMakeLists.txt
+|   |   |   |-- common.h
+|   |   |   |-- complex_double.cpp
+|   |   |   |-- complex_single.cpp
+|   |   |   |-- double.cpp
+|   |   |   |-- GeneralRank1Update.h
+|   |   |   |-- level1_cplx_impl.h
+|   |   |   |-- level1_impl.h
+|   |   |   |-- level1_real_impl.h
+|   |   |   |-- level2_cplx_impl.h
+|   |   |   |-- level2_impl.h
+|   |   |   |-- level2_real_impl.h
+|   |   |   |-- level3_impl.h
+|   |   |   |-- PackedSelfadjointProduct.h
+|   |   |   |-- PackedTriangularMatrixVector.h
+|   |   |   |-- PackedTriangularSolverVector.h
+|   |   |   |-- Rank2Update.h
+|   |   |   |-- README.txt
+|   |   |   |-- single.cpp
+|   |   |   `-- xerbla.cpp
+|   |   |-- cmake
+|   |   |   |-- Eigen3Config.cmake.in
+|   |   |   |-- Eigen3ConfigLegacy.cmake.in
+|   |   |   |-- EigenConfigureTesting.cmake
+|   |   |   |-- EigenDetermineOSVersion.cmake
+|   |   |   |-- EigenDetermineVSServicePack.cmake
+|   |   |   |-- EigenTesting.cmake
+|   |   |   |-- EigenUninstall.cmake
+|   |   |   |-- FindAdolc.cmake
+|   |   |   |-- FindBLAS.cmake
+|   |   |   |-- FindBLASEXT.cmake
+|   |   |   |-- FindCholmod.cmake
+|   |   |   |-- FindComputeCpp.cmake
+|   |   |   |-- FindEigen2.cmake
+|   |   |   |-- FindEigen3.cmake
+|   |   |   |-- FindFFTW.cmake
+|   |   |   |-- FindGLEW.cmake
+|   |   |   |-- FindGMP.cmake
+|   |   |   |-- FindGoogleHash.cmake
+|   |   |   |-- FindGSL.cmake
+|   |   |   |-- FindHWLOC.cmake
+|   |   |   |-- FindLAPACK.cmake
+|   |   |   |-- FindMetis.cmake
+|   |   |   |-- FindMPFR.cmake
+|   |   |   |-- FindPastix.cmake
+|   |   |   |-- FindPTSCOTCH.cmake
+|   |   |   |-- FindScotch.cmake
+|   |   |   |-- FindSPQR.cmake
+|   |   |   |-- FindStandardMathLibrary.cmake
+|   |   |   |-- FindSuperLU.cmake
+|   |   |   |-- FindUmfpack.cmake
+|   |   |   |-- language_support.cmake
+|   |   |   |-- RegexUtils.cmake
+|   |   |   `-- UseEigen3.cmake
+|   |   |-- debug
+|   |   |   |-- gdb
+|   |   |   |   |-- __init__.py
+|   |   |   |   `-- printers.py
+|   |   |   `-- msvc
+|   |   |       |-- eigen_autoexp_part.dat
+|   |   |       `-- eigen.natvis
+|   |   |-- demos
+|   |   |   |-- mandelbrot
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- mandelbrot.cpp
+|   |   |   |   |-- mandelbrot.h
+|   |   |   |   `-- README
+|   |   |   |-- mix_eigen_and_c
+|   |   |   |   |-- binary_library.cpp
+|   |   |   |   |-- binary_library.h
+|   |   |   |   |-- example.c
+|   |   |   |   `-- README
+|   |   |   |-- opengl
+|   |   |   |   |-- camera.cpp
+|   |   |   |   |-- camera.h
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- gpuhelper.cpp
+|   |   |   |   |-- gpuhelper.h
+|   |   |   |   |-- icosphere.cpp
+|   |   |   |   |-- icosphere.h
+|   |   |   |   |-- quaternion_demo.cpp
+|   |   |   |   |-- quaternion_demo.h
+|   |   |   |   |-- README
+|   |   |   |   |-- trackball.cpp
+|   |   |   |   `-- trackball.h
+|   |   |   `-- CMakeLists.txt
+|   |   |-- doc
+|   |   |   |-- examples
+|   |   |   |   |-- class_Block.cpp
+|   |   |   |   |-- class_CwiseBinaryOp.cpp
+|   |   |   |   |-- class_CwiseUnaryOp.cpp
+|   |   |   |   |-- class_CwiseUnaryOp_ptrfun.cpp
+|   |   |   |   |-- class_FixedBlock.cpp
+|   |   |   |   |-- class_FixedVectorBlock.cpp
+|   |   |   |   |-- class_VectorBlock.cpp
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- CustomizingEigen_Inheritance.cpp
+|   |   |   |   |-- Cwise_erfc.cpp
+|   |   |   |   |-- Cwise_erf.cpp
+|   |   |   |   |-- Cwise_lgamma.cpp
+|   |   |   |   |-- DenseBase_middleCols_int.cpp
+|   |   |   |   |-- DenseBase_middleRows_int.cpp
+|   |   |   |   |-- DenseBase_template_int_middleCols.cpp
+|   |   |   |   |-- DenseBase_template_int_middleRows.cpp
+|   |   |   |   |-- function_taking_eigenbase.cpp
+|   |   |   |   |-- function_taking_ref.cpp
+|   |   |   |   |-- make_circulant2.cpp
+|   |   |   |   |-- make_circulant.cpp
+|   |   |   |   |-- make_circulant.cpp.entry
+|   |   |   |   |-- make_circulant.cpp.evaluator
+|   |   |   |   |-- make_circulant.cpp.expression
+|   |   |   |   |-- make_circulant.cpp.main
+|   |   |   |   |-- make_circulant.cpp.preamble
+|   |   |   |   |-- make_circulant.cpp.traits
+|   |   |   |   |-- matrixfree_cg.cpp
+|   |   |   |   |-- nullary_indexing.cpp
+|   |   |   |   |-- QuickStart_example2_dynamic.cpp
+|   |   |   |   |-- QuickStart_example2_fixed.cpp
+|   |   |   |   |-- QuickStart_example.cpp
+|   |   |   |   |-- TemplateKeyword_flexible.cpp
+|   |   |   |   |-- TemplateKeyword_simple.cpp
+|   |   |   |   |-- tut_arithmetic_add_sub.cpp
+|   |   |   |   |-- tut_arithmetic_dot_cross.cpp
+|   |   |   |   |-- tut_arithmetic_matrix_mul.cpp
+|   |   |   |   |-- tut_arithmetic_redux_basic.cpp
+|   |   |   |   |-- tut_arithmetic_scalar_mul_div.cpp
+|   |   |   |   |-- tut_matrix_coefficient_accessors.cpp
+|   |   |   |   |-- tut_matrix_resize.cpp
+|   |   |   |   |-- tut_matrix_resize_fixed_size.cpp
+|   |   |   |   |-- Tutorial_ArrayClass_accessors.cpp
+|   |   |   |   |-- Tutorial_ArrayClass_addition.cpp
+|   |   |   |   |-- Tutorial_ArrayClass_cwise_other.cpp
+|   |   |   |   |-- Tutorial_ArrayClass_interop.cpp
+|   |   |   |   |-- Tutorial_ArrayClass_interop_matrix.cpp
+|   |   |   |   |-- Tutorial_ArrayClass_mult.cpp
+|   |   |   |   |-- Tutorial_BlockOperations_block_assignment.cpp
+|   |   |   |   |-- Tutorial_BlockOperations_colrow.cpp
+|   |   |   |   |-- Tutorial_BlockOperations_corner.cpp
+|   |   |   |   |-- Tutorial_BlockOperations_print_block.cpp
+|   |   |   |   |-- Tutorial_BlockOperations_vector.cpp
+|   |   |   |   |-- TutorialInplaceLU.cpp
+|   |   |   |   |-- TutorialLinAlgComputeTwice.cpp
+|   |   |   |   |-- TutorialLinAlgExComputeSolveError.cpp
+|   |   |   |   |-- TutorialLinAlgExSolveColPivHouseholderQR.cpp
+|   |   |   |   |-- TutorialLinAlgExSolveLDLT.cpp
+|   |   |   |   |-- TutorialLinAlgInverseDeterminant.cpp
+|   |   |   |   |-- TutorialLinAlgRankRevealing.cpp
+|   |   |   |   |-- TutorialLinAlgSelfAdjointEigenSolver.cpp
+|   |   |   |   |-- TutorialLinAlgSetThreshold.cpp
+|   |   |   |   |-- TutorialLinAlgSVDSolve.cpp
+|   |   |   |   |-- Tutorial_PartialLU_solve.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp
+|   |   |   |   |-- Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp
+|   |   |   |   |-- Tutorial_simple_example_dynamic_size.cpp
+|   |   |   |   `-- Tutorial_simple_example_fixed_size.cpp
+|   |   |   |-- snippets
+|   |   |   |   |-- AngleAxis_mimic_euler.cpp
+|   |   |   |   |-- BiCGSTAB_simple.cpp
+|   |   |   |   |-- BiCGSTAB_step_by_step.cpp
+|   |   |   |   |-- class_FullPivLU.cpp
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- ColPivHouseholderQR_solve.cpp
+|   |   |   |   |-- compile_snippet.cpp.in
+|   |   |   |   |-- ComplexEigenSolver_compute.cpp
+|   |   |   |   |-- ComplexEigenSolver_eigenvalues.cpp
+|   |   |   |   |-- ComplexEigenSolver_eigenvectors.cpp
+|   |   |   |   |-- ComplexSchur_compute.cpp
+|   |   |   |   |-- ComplexSchur_matrixT.cpp
+|   |   |   |   |-- ComplexSchur_matrixU.cpp
+|   |   |   |   |-- Cwise_abs2.cpp
+|   |   |   |   |-- Cwise_abs.cpp
+|   |   |   |   |-- Cwise_acos.cpp
+|   |   |   |   |-- Cwise_arg.cpp
+|   |   |   |   |-- Cwise_array_power_array.cpp
+|   |   |   |   |-- Cwise_asin.cpp
+|   |   |   |   |-- Cwise_atan.cpp
+|   |   |   |   |-- Cwise_boolean_and.cpp
+|   |   |   |   |-- Cwise_boolean_not.cpp
+|   |   |   |   |-- Cwise_boolean_or.cpp
+|   |   |   |   |-- Cwise_boolean_xor.cpp
+|   |   |   |   |-- Cwise_ceil.cpp
+|   |   |   |   |-- Cwise_cos.cpp
+|   |   |   |   |-- Cwise_cosh.cpp
+|   |   |   |   |-- Cwise_cube.cpp
+|   |   |   |   |-- Cwise_equal_equal.cpp
+|   |   |   |   |-- Cwise_exp.cpp
+|   |   |   |   |-- Cwise_floor.cpp
+|   |   |   |   |-- Cwise_greater.cpp
+|   |   |   |   |-- Cwise_greater_equal.cpp
+|   |   |   |   |-- Cwise_inverse.cpp
+|   |   |   |   |-- Cwise_isFinite.cpp
+|   |   |   |   |-- Cwise_isInf.cpp
+|   |   |   |   |-- Cwise_isNaN.cpp
+|   |   |   |   |-- Cwise_less.cpp
+|   |   |   |   |-- Cwise_less_equal.cpp
+|   |   |   |   |-- Cwise_log10.cpp
+|   |   |   |   |-- Cwise_log.cpp
+|   |   |   |   |-- Cwise_max.cpp
+|   |   |   |   |-- Cwise_min.cpp
+|   |   |   |   |-- Cwise_minus.cpp
+|   |   |   |   |-- Cwise_minus_equal.cpp
+|   |   |   |   |-- Cwise_not_equal.cpp
+|   |   |   |   |-- Cwise_plus.cpp
+|   |   |   |   |-- Cwise_plus_equal.cpp
+|   |   |   |   |-- Cwise_pow.cpp
+|   |   |   |   |-- Cwise_product.cpp
+|   |   |   |   |-- Cwise_quotient.cpp
+|   |   |   |   |-- Cwise_round.cpp
+|   |   |   |   |-- Cwise_scalar_power_array.cpp
+|   |   |   |   |-- Cwise_sign.cpp
+|   |   |   |   |-- Cwise_sin.cpp
+|   |   |   |   |-- Cwise_sinh.cpp
+|   |   |   |   |-- Cwise_slash_equal.cpp
+|   |   |   |   |-- Cwise_sqrt.cpp
+|   |   |   |   |-- Cwise_square.cpp
+|   |   |   |   |-- Cwise_tan.cpp
+|   |   |   |   |-- Cwise_tanh.cpp
+|   |   |   |   |-- Cwise_times_equal.cpp
+|   |   |   |   |-- DenseBase_LinSpaced.cpp
+|   |   |   |   |-- DenseBase_LinSpacedInt.cpp
+|   |   |   |   |-- DenseBase_LinSpaced_seq.cpp
+|   |   |   |   |-- DenseBase_setLinSpaced.cpp
+|   |   |   |   |-- DirectionWise_hnormalized.cpp
+|   |   |   |   |-- DirectionWise_replicate.cpp
+|   |   |   |   |-- DirectionWise_replicate_int.cpp
+|   |   |   |   |-- EigenSolver_compute.cpp
+|   |   |   |   |-- EigenSolver_EigenSolver_MatrixType.cpp
+|   |   |   |   |-- EigenSolver_eigenvalues.cpp
+|   |   |   |   |-- EigenSolver_eigenvectors.cpp
+|   |   |   |   |-- EigenSolver_pseudoEigenvectors.cpp
+|   |   |   |   |-- FullPivHouseholderQR_solve.cpp
+|   |   |   |   |-- FullPivLU_image.cpp
+|   |   |   |   |-- FullPivLU_kernel.cpp
+|   |   |   |   |-- FullPivLU_solve.cpp
+|   |   |   |   |-- GeneralizedEigenSolver.cpp
+|   |   |   |   |-- HessenbergDecomposition_compute.cpp
+|   |   |   |   |-- HessenbergDecomposition_matrixH.cpp
+|   |   |   |   |-- HessenbergDecomposition_packedMatrix.cpp
+|   |   |   |   |-- HouseholderQR_householderQ.cpp
+|   |   |   |   |-- HouseholderQR_solve.cpp
+|   |   |   |   |-- HouseholderSequence_HouseholderSequence.cpp
+|   |   |   |   |-- IOFormat.cpp
+|   |   |   |   |-- Jacobi_makeGivens.cpp
+|   |   |   |   |-- Jacobi_makeJacobi.cpp
+|   |   |   |   |-- JacobiSVD_basic.cpp
+|   |   |   |   |-- LeastSquaresNormalEquations.cpp
+|   |   |   |   |-- LeastSquaresQR.cpp
+|   |   |   |   |-- LLT_example.cpp
+|   |   |   |   |-- LLT_solve.cpp
+|   |   |   |   |-- Map_general_stride.cpp
+|   |   |   |   |-- Map_inner_stride.cpp
+|   |   |   |   |-- Map_outer_stride.cpp
+|   |   |   |   |-- Map_placement_new.cpp
+|   |   |   |   |-- Map_simple.cpp
+|   |   |   |   |-- MatrixBase_adjoint.cpp
+|   |   |   |   |-- MatrixBase_all.cpp
+|   |   |   |   |-- MatrixBase_applyOnTheLeft.cpp
+|   |   |   |   |-- MatrixBase_applyOnTheRight.cpp
+|   |   |   |   |-- MatrixBase_array_const.cpp
+|   |   |   |   |-- MatrixBase_array.cpp
+|   |   |   |   |-- MatrixBase_asDiagonal.cpp
+|   |   |   |   |-- MatrixBase_block_int_int.cpp
+|   |   |   |   |-- MatrixBase_block_int_int_int_int.cpp
+|   |   |   |   |-- MatrixBase_bottomLeftCorner_int_int.cpp
+|   |   |   |   |-- MatrixBase_bottomRightCorner_int_int.cpp
+|   |   |   |   |-- MatrixBase_bottomRows_int.cpp
+|   |   |   |   |-- MatrixBase_cast.cpp
+|   |   |   |   |-- MatrixBase_col.cpp
+|   |   |   |   |-- MatrixBase_colwise.cpp
+|   |   |   |   |-- MatrixBase_computeInverseAndDetWithCheck.cpp
+|   |   |   |   |-- MatrixBase_computeInverseWithCheck.cpp
+|   |   |   |   |-- MatrixBase_cwiseAbs2.cpp
+|   |   |   |   |-- MatrixBase_cwiseAbs.cpp
+|   |   |   |   |-- MatrixBase_cwiseEqual.cpp
+|   |   |   |   |-- MatrixBase_cwiseInverse.cpp
+|   |   |   |   |-- MatrixBase_cwiseMax.cpp
+|   |   |   |   |-- MatrixBase_cwiseMin.cpp
+|   |   |   |   |-- MatrixBase_cwiseNotEqual.cpp
+|   |   |   |   |-- MatrixBase_cwiseProduct.cpp
+|   |   |   |   |-- MatrixBase_cwiseQuotient.cpp
+|   |   |   |   |-- MatrixBase_cwiseSign.cpp
+|   |   |   |   |-- MatrixBase_cwiseSqrt.cpp
+|   |   |   |   |-- MatrixBase_diagonal.cpp
+|   |   |   |   |-- MatrixBase_diagonal_int.cpp
+|   |   |   |   |-- MatrixBase_diagonal_template_int.cpp
+|   |   |   |   |-- MatrixBase_eigenvalues.cpp
+|   |   |   |   |-- MatrixBase_end_int.cpp
+|   |   |   |   |-- MatrixBase_eval.cpp
+|   |   |   |   |-- MatrixBase_fixedBlock_int_int.cpp
+|   |   |   |   |-- MatrixBase_hnormalized.cpp
+|   |   |   |   |-- MatrixBase_homogeneous.cpp
+|   |   |   |   |-- MatrixBase_identity.cpp
+|   |   |   |   |-- MatrixBase_identity_int_int.cpp
+|   |   |   |   |-- MatrixBase_inverse.cpp
+|   |   |   |   |-- MatrixBase_isDiagonal.cpp
+|   |   |   |   |-- MatrixBase_isIdentity.cpp
+|   |   |   |   |-- MatrixBase_isOnes.cpp
+|   |   |   |   |-- MatrixBase_isOrthogonal.cpp
+|   |   |   |   |-- MatrixBase_isUnitary.cpp
+|   |   |   |   |-- MatrixBase_isZero.cpp
+|   |   |   |   |-- MatrixBase_leftCols_int.cpp
+|   |   |   |   |-- MatrixBase_noalias.cpp
+|   |   |   |   |-- MatrixBase_ones.cpp
+|   |   |   |   |-- MatrixBase_ones_int.cpp
+|   |   |   |   |-- MatrixBase_ones_int_int.cpp
+|   |   |   |   |-- MatrixBase_operatorNorm.cpp
+|   |   |   |   |-- MatrixBase_prod.cpp
+|   |   |   |   |-- MatrixBase_random.cpp
+|   |   |   |   |-- MatrixBase_random_int.cpp
+|   |   |   |   |-- MatrixBase_random_int_int.cpp
+|   |   |   |   |-- MatrixBase_replicate.cpp
+|   |   |   |   |-- MatrixBase_replicate_int_int.cpp
+|   |   |   |   |-- MatrixBase_reverse.cpp
+|   |   |   |   |-- MatrixBase_rightCols_int.cpp
+|   |   |   |   |-- MatrixBase_row.cpp
+|   |   |   |   |-- MatrixBase_rowwise.cpp
+|   |   |   |   |-- MatrixBase_segment_int_int.cpp
+|   |   |   |   |-- MatrixBase_select.cpp
+|   |   |   |   |-- MatrixBase_selfadjointView.cpp
+|   |   |   |   |-- MatrixBase_set.cpp
+|   |   |   |   |-- MatrixBase_setIdentity.cpp
+|   |   |   |   |-- MatrixBase_setOnes.cpp
+|   |   |   |   |-- MatrixBase_setRandom.cpp
+|   |   |   |   |-- MatrixBase_setZero.cpp
+|   |   |   |   |-- MatrixBase_start_int.cpp
+|   |   |   |   |-- MatrixBase_template_int_bottomRows.cpp
+|   |   |   |   |-- MatrixBase_template_int_end.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_block_int_int_int_int.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_bottomLeftCorner.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_bottomRightCorner.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_bottomRightCorner_int_int.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_topLeftCorner.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_topLeftCorner_int_int.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_topRightCorner.cpp
+|   |   |   |   |-- MatrixBase_template_int_int_topRightCorner_int_int.cpp
+|   |   |   |   |-- MatrixBase_template_int_leftCols.cpp
+|   |   |   |   |-- MatrixBase_template_int_rightCols.cpp
+|   |   |   |   |-- MatrixBase_template_int_segment.cpp
+|   |   |   |   |-- MatrixBase_template_int_start.cpp
+|   |   |   |   |-- MatrixBase_template_int_topRows.cpp
+|   |   |   |   |-- MatrixBase_topLeftCorner_int_int.cpp
+|   |   |   |   |-- MatrixBase_topRightCorner_int_int.cpp
+|   |   |   |   |-- MatrixBase_topRows_int.cpp
+|   |   |   |   |-- MatrixBase_transpose.cpp
+|   |   |   |   |-- MatrixBase_triangularView.cpp
+|   |   |   |   |-- MatrixBase_zero.cpp
+|   |   |   |   |-- MatrixBase_zero_int.cpp
+|   |   |   |   |-- MatrixBase_zero_int_int.cpp
+|   |   |   |   |-- Matrix_Map_stride.cpp
+|   |   |   |   |-- Matrix_resize_int.cpp
+|   |   |   |   |-- Matrix_resize_int_int.cpp
+|   |   |   |   |-- Matrix_resize_int_NoChange.cpp
+|   |   |   |   |-- Matrix_resize_NoChange_int.cpp
+|   |   |   |   |-- Matrix_setConstant_int.cpp
+|   |   |   |   |-- Matrix_setConstant_int_int.cpp
+|   |   |   |   |-- Matrix_setIdentity_int_int.cpp
+|   |   |   |   |-- Matrix_setOnes_int.cpp
+|   |   |   |   |-- Matrix_setOnes_int_int.cpp
+|   |   |   |   |-- Matrix_setRandom_int.cpp
+|   |   |   |   |-- Matrix_setRandom_int_int.cpp
+|   |   |   |   |-- Matrix_setZero_int.cpp
+|   |   |   |   |-- Matrix_setZero_int_int.cpp
+|   |   |   |   |-- PartialPivLU_solve.cpp
+|   |   |   |   |-- PartialRedux_count.cpp
+|   |   |   |   |-- PartialRedux_maxCoeff.cpp
+|   |   |   |   |-- PartialRedux_minCoeff.cpp
+|   |   |   |   |-- PartialRedux_norm.cpp
+|   |   |   |   |-- PartialRedux_prod.cpp
+|   |   |   |   |-- PartialRedux_squaredNorm.cpp
+|   |   |   |   |-- PartialRedux_sum.cpp
+|   |   |   |   |-- RealQZ_compute.cpp
+|   |   |   |   |-- RealSchur_compute.cpp
+|   |   |   |   |-- RealSchur_RealSchur_MatrixType.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_compute_MatrixType2.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_compute_MatrixType.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_eigenvalues.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_eigenvectors.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_operatorInverseSqrt.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_operatorSqrt.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp
+|   |   |   |   |-- SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp
+|   |   |   |   |-- SelfAdjointView_eigenvalues.cpp
+|   |   |   |   |-- SelfAdjointView_operatorNorm.cpp
+|   |   |   |   |-- SparseMatrix_coeffs.cpp
+|   |   |   |   |-- TopicAliasing_block_correct.cpp
+|   |   |   |   |-- TopicAliasing_block.cpp
+|   |   |   |   |-- TopicAliasing_cwise.cpp
+|   |   |   |   |-- TopicAliasing_mult1.cpp
+|   |   |   |   |-- TopicAliasing_mult2.cpp
+|   |   |   |   |-- TopicAliasing_mult3.cpp
+|   |   |   |   |-- TopicAliasing_mult4.cpp
+|   |   |   |   |-- TopicAliasing_mult5.cpp
+|   |   |   |   |-- TopicStorageOrders_example.cpp
+|   |   |   |   |-- Triangular_solve.cpp
+|   |   |   |   |-- Tridiagonalization_compute.cpp
+|   |   |   |   |-- Tridiagonalization_decomposeInPlace.cpp
+|   |   |   |   |-- Tridiagonalization_diagonal.cpp
+|   |   |   |   |-- Tridiagonalization_householderCoefficients.cpp
+|   |   |   |   |-- Tridiagonalization_packedMatrix.cpp
+|   |   |   |   |-- Tridiagonalization_Tridiagonalization_MatrixType.cpp
+|   |   |   |   |-- tut_arithmetic_redux_minmax.cpp
+|   |   |   |   |-- tut_arithmetic_transpose_aliasing.cpp
+|   |   |   |   |-- tut_arithmetic_transpose_conjugate.cpp
+|   |   |   |   |-- tut_arithmetic_transpose_inplace.cpp
+|   |   |   |   |-- tut_matrix_assignment_resizing.cpp
+|   |   |   |   |-- Tutorial_AdvancedInitialization_Block.cpp
+|   |   |   |   |-- Tutorial_AdvancedInitialization_CommaTemporary.cpp
+|   |   |   |   |-- Tutorial_AdvancedInitialization_Join.cpp
+|   |   |   |   |-- Tutorial_AdvancedInitialization_LinSpaced.cpp
+|   |   |   |   |-- Tutorial_AdvancedInitialization_ThreeWays.cpp
+|   |   |   |   |-- Tutorial_AdvancedInitialization_Zero.cpp
+|   |   |   |   |-- Tutorial_commainit_01b.cpp
+|   |   |   |   |-- Tutorial_commainit_01.cpp
+|   |   |   |   |-- Tutorial_commainit_02.cpp
+|   |   |   |   |-- Tutorial_Map_rowmajor.cpp
+|   |   |   |   |-- Tutorial_Map_using.cpp
+|   |   |   |   |-- Tutorial_ReshapeMat2Mat.cpp
+|   |   |   |   |-- Tutorial_ReshapeMat2Vec.cpp
+|   |   |   |   |-- Tutorial_SlicingCol.cpp
+|   |   |   |   |-- Tutorial_SlicingVec.cpp
+|   |   |   |   |-- Tutorial_solve_matrix_inverse.cpp
+|   |   |   |   |-- Tutorial_solve_multiple_rhs.cpp
+|   |   |   |   |-- Tutorial_solve_reuse_decomposition.cpp
+|   |   |   |   |-- Tutorial_solve_singular.cpp
+|   |   |   |   |-- Tutorial_solve_triangular.cpp
+|   |   |   |   |-- Tutorial_solve_triangular_inplace.cpp
+|   |   |   |   |-- VectorwiseOp_homogeneous.cpp
+|   |   |   |   `-- Vectorwise_reverse.cpp
+|   |   |   |-- special_examples
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- random_cpp11.cpp
+|   |   |   |   |-- Tutorial_sparse_example.cpp
+|   |   |   |   `-- Tutorial_sparse_example_details.cpp
+|   |   |   |-- A05_PortingFrom2To3.dox
+|   |   |   |-- AsciiQuickReference.txt
+|   |   |   |-- B01_Experimental.dox
+|   |   |   |-- ClassHierarchy.dox
+|   |   |   |-- CMakeLists.txt
+|   |   |   |-- CoeffwiseMathFunctionsTable.dox
+|   |   |   |-- CustomizingEigen_CustomScalar.dox
+|   |   |   |-- CustomizingEigen_InheritingMatrix.dox
+|   |   |   |-- CustomizingEigen_NullaryExpr.dox
+|   |   |   |-- CustomizingEigen_Plugins.dox
+|   |   |   |-- DenseDecompositionBenchmark.dox
+|   |   |   |-- Doxyfile.in
+|   |   |   |-- eigendoxy.css
+|   |   |   |-- eigendoxy_footer.html.in
+|   |   |   |-- eigendoxy_header.html.in
+|   |   |   |-- eigendoxy_layout.xml.in
+|   |   |   |-- eigendoxy_tabs.css
+|   |   |   |-- eigen_navtree_hacks.js
+|   |   |   |-- Eigen_Silly_Professor_64x64.png
+|   |   |   |-- FixedSizeVectorizable.dox
+|   |   |   |-- ftv2node.png
+|   |   |   |-- ftv2pnode.png
+|   |   |   |-- FunctionsTakingEigenTypes.dox
+|   |   |   |-- HiPerformance.dox
+|   |   |   |-- InplaceDecomposition.dox
+|   |   |   |-- InsideEigenExample.dox
+|   |   |   |-- LeastSquares.dox
+|   |   |   |-- Manual.dox
+|   |   |   |-- MatrixfreeSolverExample.dox
+|   |   |   |-- NewExpressionType.dox
+|   |   |   |-- Overview.dox
+|   |   |   |-- PassingByValue.dox
+|   |   |   |-- Pitfalls.dox
+|   |   |   |-- PreprocessorDirectives.dox
+|   |   |   |-- QuickReference.dox
+|   |   |   |-- QuickStartGuide.dox
+|   |   |   |-- SparseLinearSystems.dox
+|   |   |   |-- SparseQuickReference.dox
+|   |   |   |-- StlContainers.dox
+|   |   |   |-- StorageOrders.dox
+|   |   |   |-- StructHavingEigenMembers.dox
+|   |   |   |-- TemplateKeyword.dox
+|   |   |   |-- TopicAliasing.dox
+|   |   |   |-- TopicAssertions.dox
+|   |   |   |-- TopicCMakeGuide.dox
+|   |   |   |-- TopicEigenExpressionTemplates.dox
+|   |   |   |-- TopicLazyEvaluation.dox
+|   |   |   |-- TopicLinearAlgebraDecompositions.dox
+|   |   |   |-- TopicMultithreading.dox
+|   |   |   |-- TopicResizing.dox
+|   |   |   |-- TopicScalarTypes.dox
+|   |   |   |-- TopicVectorization.dox
+|   |   |   |-- TutorialAdvancedInitialization.dox
+|   |   |   |-- TutorialArrayClass.dox
+|   |   |   |-- TutorialBlockOperations.dox
+|   |   |   |-- tutorial.cpp
+|   |   |   |-- TutorialGeometry.dox
+|   |   |   |-- TutorialLinearAlgebra.dox
+|   |   |   |-- TutorialMapClass.dox
+|   |   |   |-- TutorialMatrixArithmetic.dox
+|   |   |   |-- TutorialMatrixClass.dox
+|   |   |   |-- TutorialReductionsVisitorsBroadcasting.dox
+|   |   |   |-- TutorialReshapeSlicing.dox
+|   |   |   |-- TutorialSparse.dox
+|   |   |   |-- TutorialSparse_example_details.dox
+|   |   |   |-- UnalignedArrayAssert.dox
+|   |   |   |-- UsingBlasLapackBackends.dox
+|   |   |   |-- UsingIntelMKL.dox
+|   |   |   |-- UsingNVCC.dox
+|   |   |   `-- WrongStackAlignment.dox
+|   |   |-- Eigen
+|   |   |   |-- src
+|   |   |   |   |-- Cholesky
+|   |   |   |   |   |-- LDLT.h
+|   |   |   |   |   |-- LLT.h
+|   |   |   |   |   `-- LLT_LAPACKE.h
+|   |   |   |   |-- CholmodSupport
+|   |   |   |   |   `-- CholmodSupport.h
+|   |   |   |   |-- Core
+|   |   |   |   |   |-- arch
+|   |   |   |   |   |   |-- AltiVec
+|   |   |   |   |   |   |   |-- Complex.h
+|   |   |   |   |   |   |   |-- MathFunctions.h
+|   |   |   |   |   |   |   `-- PacketMath.h
+|   |   |   |   |   |   |-- AVX
+|   |   |   |   |   |   |   |-- Complex.h
+|   |   |   |   |   |   |   |-- MathFunctions.h
+|   |   |   |   |   |   |   |-- PacketMath.h
+|   |   |   |   |   |   |   `-- TypeCasting.h
+|   |   |   |   |   |   |-- AVX512
+|   |   |   |   |   |   |   |-- MathFunctions.h
+|   |   |   |   |   |   |   `-- PacketMath.h
+|   |   |   |   |   |   |-- CUDA
+|   |   |   |   |   |   |   |-- Complex.h
+|   |   |   |   |   |   |   |-- Half.h
+|   |   |   |   |   |   |   |-- MathFunctions.h
+|   |   |   |   |   |   |   |-- PacketMath.h
+|   |   |   |   |   |   |   |-- PacketMathHalf.h
+|   |   |   |   |   |   |   `-- TypeCasting.h
+|   |   |   |   |   |   |-- Default
+|   |   |   |   |   |   |   |-- ConjHelper.h
+|   |   |   |   |   |   |   `-- Settings.h
+|   |   |   |   |   |   |-- NEON
+|   |   |   |   |   |   |   |-- Complex.h
+|   |   |   |   |   |   |   |-- MathFunctions.h
+|   |   |   |   |   |   |   `-- PacketMath.h
+|   |   |   |   |   |   |-- SSE
+|   |   |   |   |   |   |   |-- Complex.h
+|   |   |   |   |   |   |   |-- MathFunctions.h
+|   |   |   |   |   |   |   |-- PacketMath.h
+|   |   |   |   |   |   |   `-- TypeCasting.h
+|   |   |   |   |   |   `-- ZVector
+|   |   |   |   |   |       |-- Complex.h
+|   |   |   |   |   |       |-- MathFunctions.h
+|   |   |   |   |   |       `-- PacketMath.h
+|   |   |   |   |   |-- functors
+|   |   |   |   |   |   |-- AssignmentFunctors.h
+|   |   |   |   |   |   |-- BinaryFunctors.h
+|   |   |   |   |   |   |-- NullaryFunctors.h
+|   |   |   |   |   |   |-- StlFunctors.h
+|   |   |   |   |   |   |-- TernaryFunctors.h
+|   |   |   |   |   |   `-- UnaryFunctors.h
+|   |   |   |   |   |-- products
+|   |   |   |   |   |   |-- GeneralBlockPanelKernel.h
+|   |   |   |   |   |   |-- GeneralMatrixMatrix_BLAS.h
+|   |   |   |   |   |   |-- GeneralMatrixMatrix.h
+|   |   |   |   |   |   |-- GeneralMatrixMatrixTriangular_BLAS.h
+|   |   |   |   |   |   |-- GeneralMatrixMatrixTriangular.h
+|   |   |   |   |   |   |-- GeneralMatrixVector_BLAS.h
+|   |   |   |   |   |   |-- GeneralMatrixVector.h
+|   |   |   |   |   |   |-- Parallelizer.h
+|   |   |   |   |   |   |-- SelfadjointMatrixMatrix_BLAS.h
+|   |   |   |   |   |   |-- SelfadjointMatrixMatrix.h
+|   |   |   |   |   |   |-- SelfadjointMatrixVector_BLAS.h
+|   |   |   |   |   |   |-- SelfadjointMatrixVector.h
+|   |   |   |   |   |   |-- SelfadjointProduct.h
+|   |   |   |   |   |   |-- SelfadjointRank2Update.h
+|   |   |   |   |   |   |-- TriangularMatrixMatrix_BLAS.h
+|   |   |   |   |   |   |-- TriangularMatrixMatrix.h
+|   |   |   |   |   |   |-- TriangularMatrixVector_BLAS.h
+|   |   |   |   |   |   |-- TriangularMatrixVector.h
+|   |   |   |   |   |   |-- TriangularSolverMatrix_BLAS.h
+|   |   |   |   |   |   |-- TriangularSolverMatrix.h
+|   |   |   |   |   |   `-- TriangularSolverVector.h
+|   |   |   |   |   |-- util
+|   |   |   |   |   |   |-- BlasUtil.h
+|   |   |   |   |   |   |-- Constants.h
+|   |   |   |   |   |   |-- DisableStupidWarnings.h
+|   |   |   |   |   |   |-- ForwardDeclarations.h
+|   |   |   |   |   |   |-- Macros.h
+|   |   |   |   |   |   |-- Memory.h
+|   |   |   |   |   |   |-- Meta.h
+|   |   |   |   |   |   |-- MKL_support.h
+|   |   |   |   |   |   |-- NonMPL2.h
+|   |   |   |   |   |   |-- ReenableStupidWarnings.h
+|   |   |   |   |   |   |-- StaticAssert.h
+|   |   |   |   |   |   `-- XprHelper.h
+|   |   |   |   |   |-- ArrayBase.h
+|   |   |   |   |   |-- Array.h
+|   |   |   |   |   |-- ArrayWrapper.h
+|   |   |   |   |   |-- AssignEvaluator.h
+|   |   |   |   |   |-- Assign.h
+|   |   |   |   |   |-- Assign_MKL.h
+|   |   |   |   |   |-- BandMatrix.h
+|   |   |   |   |   |-- Block.h
+|   |   |   |   |   |-- BooleanRedux.h
+|   |   |   |   |   |-- CommaInitializer.h
+|   |   |   |   |   |-- ConditionEstimator.h
+|   |   |   |   |   |-- CoreEvaluators.h
+|   |   |   |   |   |-- CoreIterators.h
+|   |   |   |   |   |-- CwiseBinaryOp.h
+|   |   |   |   |   |-- CwiseNullaryOp.h
+|   |   |   |   |   |-- CwiseTernaryOp.h
+|   |   |   |   |   |-- CwiseUnaryOp.h
+|   |   |   |   |   |-- CwiseUnaryView.h
+|   |   |   |   |   |-- DenseBase.h
+|   |   |   |   |   |-- DenseCoeffsBase.h
+|   |   |   |   |   |-- DenseStorage.h
+|   |   |   |   |   |-- Diagonal.h
+|   |   |   |   |   |-- DiagonalMatrix.h
+|   |   |   |   |   |-- DiagonalProduct.h
+|   |   |   |   |   |-- Dot.h
+|   |   |   |   |   |-- EigenBase.h
+|   |   |   |   |   |-- ForceAlignedAccess.h
+|   |   |   |   |   |-- Fuzzy.h
+|   |   |   |   |   |-- GeneralProduct.h
+|   |   |   |   |   |-- GenericPacketMath.h
+|   |   |   |   |   |-- GlobalFunctions.h
+|   |   |   |   |   |-- Inverse.h
+|   |   |   |   |   |-- IO.h
+|   |   |   |   |   |-- MapBase.h
+|   |   |   |   |   |-- Map.h
+|   |   |   |   |   |-- MathFunctions.h
+|   |   |   |   |   |-- MathFunctionsImpl.h
+|   |   |   |   |   |-- MatrixBase.h
+|   |   |   |   |   |-- Matrix.h
+|   |   |   |   |   |-- NestByValue.h
+|   |   |   |   |   |-- NoAlias.h
+|   |   |   |   |   |-- NumTraits.h
+|   |   |   |   |   |-- PermutationMatrix.h
+|   |   |   |   |   |-- PlainObjectBase.h
+|   |   |   |   |   |-- ProductEvaluators.h
+|   |   |   |   |   |-- Product.h
+|   |   |   |   |   |-- Random.h
+|   |   |   |   |   |-- Redux.h
+|   |   |   |   |   |-- Ref.h
+|   |   |   |   |   |-- Replicate.h
+|   |   |   |   |   |-- ReturnByValue.h
+|   |   |   |   |   |-- Reverse.h
+|   |   |   |   |   |-- Select.h
+|   |   |   |   |   |-- SelfAdjointView.h
+|   |   |   |   |   |-- SelfCwiseBinaryOp.h
+|   |   |   |   |   |-- Solve.h
+|   |   |   |   |   |-- SolverBase.h
+|   |   |   |   |   |-- SolveTriangular.h
+|   |   |   |   |   |-- StableNorm.h
+|   |   |   |   |   |-- Stride.h
+|   |   |   |   |   |-- Swap.h
+|   |   |   |   |   |-- Transpose.h
+|   |   |   |   |   |-- Transpositions.h
+|   |   |   |   |   |-- TriangularMatrix.h
+|   |   |   |   |   |-- VectorBlock.h
+|   |   |   |   |   |-- VectorwiseOp.h
+|   |   |   |   |   `-- Visitor.h
+|   |   |   |   |-- Eigenvalues
+|   |   |   |   |   |-- ComplexEigenSolver.h
+|   |   |   |   |   |-- ComplexSchur.h
+|   |   |   |   |   |-- ComplexSchur_LAPACKE.h
+|   |   |   |   |   |-- EigenSolver.h
+|   |   |   |   |   |-- GeneralizedEigenSolver.h
+|   |   |   |   |   |-- GeneralizedSelfAdjointEigenSolver.h
+|   |   |   |   |   |-- HessenbergDecomposition.h
+|   |   |   |   |   |-- MatrixBaseEigenvalues.h
+|   |   |   |   |   |-- RealQZ.h
+|   |   |   |   |   |-- RealSchur.h
+|   |   |   |   |   |-- RealSchur_LAPACKE.h
+|   |   |   |   |   |-- SelfAdjointEigenSolver.h
+|   |   |   |   |   |-- SelfAdjointEigenSolver_LAPACKE.h
+|   |   |   |   |   `-- Tridiagonalization.h
+|   |   |   |   |-- Geometry
+|   |   |   |   |   |-- arch
+|   |   |   |   |   |   `-- Geometry_SSE.h
+|   |   |   |   |   |-- AlignedBox.h
+|   |   |   |   |   |-- AngleAxis.h
+|   |   |   |   |   |-- EulerAngles.h
+|   |   |   |   |   |-- Homogeneous.h
+|   |   |   |   |   |-- Hyperplane.h
+|   |   |   |   |   |-- OrthoMethods.h
+|   |   |   |   |   |-- ParametrizedLine.h
+|   |   |   |   |   |-- Quaternion.h
+|   |   |   |   |   |-- Rotation2D.h
+|   |   |   |   |   |-- RotationBase.h
+|   |   |   |   |   |-- Scaling.h
+|   |   |   |   |   |-- Transform.h
+|   |   |   |   |   |-- Translation.h
+|   |   |   |   |   `-- Umeyama.h
+|   |   |   |   |-- Householder
+|   |   |   |   |   |-- BlockHouseholder.h
+|   |   |   |   |   |-- Householder.h
+|   |   |   |   |   `-- HouseholderSequence.h
+|   |   |   |   |-- IterativeLinearSolvers
+|   |   |   |   |   |-- BasicPreconditioners.h
+|   |   |   |   |   |-- BiCGSTAB.h
+|   |   |   |   |   |-- ConjugateGradient.h
+|   |   |   |   |   |-- IncompleteCholesky.h
+|   |   |   |   |   |-- IncompleteLUT.h
+|   |   |   |   |   |-- IterativeSolverBase.h
+|   |   |   |   |   |-- LeastSquareConjugateGradient.h
+|   |   |   |   |   `-- SolveWithGuess.h
+|   |   |   |   |-- Jacobi
+|   |   |   |   |   `-- Jacobi.h
+|   |   |   |   |-- LU
+|   |   |   |   |   |-- arch
+|   |   |   |   |   |   `-- Inverse_SSE.h
+|   |   |   |   |   |-- Determinant.h
+|   |   |   |   |   |-- FullPivLU.h
+|   |   |   |   |   |-- InverseImpl.h
+|   |   |   |   |   |-- PartialPivLU.h
+|   |   |   |   |   `-- PartialPivLU_LAPACKE.h
+|   |   |   |   |-- MetisSupport
+|   |   |   |   |   `-- MetisSupport.h
+|   |   |   |   |-- misc
+|   |   |   |   |   |-- blas.h
+|   |   |   |   |   |-- Image.h
+|   |   |   |   |   |-- Kernel.h
+|   |   |   |   |   |-- lapacke.h
+|   |   |   |   |   |-- lapacke_mangling.h
+|   |   |   |   |   |-- lapack.h
+|   |   |   |   |   `-- RealSvd2x2.h
+|   |   |   |   |-- OrderingMethods
+|   |   |   |   |   |-- Amd.h
+|   |   |   |   |   |-- Eigen_Colamd.h
+|   |   |   |   |   `-- Ordering.h
+|   |   |   |   |-- PardisoSupport
+|   |   |   |   |   `-- PardisoSupport.h
+|   |   |   |   |-- PaStiXSupport
+|   |   |   |   |   `-- PaStiXSupport.h
+|   |   |   |   |-- plugins
+|   |   |   |   |   |-- ArrayCwiseBinaryOps.h
+|   |   |   |   |   |-- ArrayCwiseUnaryOps.h
+|   |   |   |   |   |-- BlockMethods.h
+|   |   |   |   |   |-- CommonCwiseBinaryOps.h
+|   |   |   |   |   |-- CommonCwiseUnaryOps.h
+|   |   |   |   |   |-- MatrixCwiseBinaryOps.h
+|   |   |   |   |   `-- MatrixCwiseUnaryOps.h
+|   |   |   |   |-- QR
+|   |   |   |   |   |-- ColPivHouseholderQR.h
+|   |   |   |   |   |-- ColPivHouseholderQR_LAPACKE.h
+|   |   |   |   |   |-- CompleteOrthogonalDecomposition.h
+|   |   |   |   |   |-- FullPivHouseholderQR.h
+|   |   |   |   |   |-- HouseholderQR.h
+|   |   |   |   |   `-- HouseholderQR_LAPACKE.h
+|   |   |   |   |-- SparseCholesky
+|   |   |   |   |   |-- SimplicialCholesky.h
+|   |   |   |   |   `-- SimplicialCholesky_impl.h
+|   |   |   |   |-- SparseCore
+|   |   |   |   |   |-- AmbiVector.h
+|   |   |   |   |   |-- CompressedStorage.h
+|   |   |   |   |   |-- ConservativeSparseSparseProduct.h
+|   |   |   |   |   |-- MappedSparseMatrix.h
+|   |   |   |   |   |-- SparseAssign.h
+|   |   |   |   |   |-- SparseBlock.h
+|   |   |   |   |   |-- SparseColEtree.h
+|   |   |   |   |   |-- SparseCompressedBase.h
+|   |   |   |   |   |-- SparseCwiseBinaryOp.h
+|   |   |   |   |   |-- SparseCwiseUnaryOp.h
+|   |   |   |   |   |-- SparseDenseProduct.h
+|   |   |   |   |   |-- SparseDiagonalProduct.h
+|   |   |   |   |   |-- SparseDot.h
+|   |   |   |   |   |-- SparseFuzzy.h
+|   |   |   |   |   |-- SparseMap.h
+|   |   |   |   |   |-- SparseMatrixBase.h
+|   |   |   |   |   |-- SparseMatrix.h
+|   |   |   |   |   |-- SparsePermutation.h
+|   |   |   |   |   |-- SparseProduct.h
+|   |   |   |   |   |-- SparseRedux.h
+|   |   |   |   |   |-- SparseRef.h
+|   |   |   |   |   |-- SparseSelfAdjointView.h
+|   |   |   |   |   |-- SparseSolverBase.h
+|   |   |   |   |   |-- SparseSparseProductWithPruning.h
+|   |   |   |   |   |-- SparseTranspose.h
+|   |   |   |   |   |-- SparseTriangularView.h
+|   |   |   |   |   |-- SparseUtil.h
+|   |   |   |   |   |-- SparseVector.h
+|   |   |   |   |   |-- SparseView.h
+|   |   |   |   |   `-- TriangularSolver.h
+|   |   |   |   |-- SparseLU
+|   |   |   |   |   |-- SparseLU_column_bmod.h
+|   |   |   |   |   |-- SparseLU_column_dfs.h
+|   |   |   |   |   |-- SparseLU_copy_to_ucol.h
+|   |   |   |   |   |-- SparseLU_gemm_kernel.h
+|   |   |   |   |   |-- SparseLU.h
+|   |   |   |   |   |-- SparseLU_heap_relax_snode.h
+|   |   |   |   |   |-- SparseLUImpl.h
+|   |   |   |   |   |-- SparseLU_kernel_bmod.h
+|   |   |   |   |   |-- SparseLU_Memory.h
+|   |   |   |   |   |-- SparseLU_panel_bmod.h
+|   |   |   |   |   |-- SparseLU_panel_dfs.h
+|   |   |   |   |   |-- SparseLU_pivotL.h
+|   |   |   |   |   |-- SparseLU_pruneL.h
+|   |   |   |   |   |-- SparseLU_relax_snode.h
+|   |   |   |   |   |-- SparseLU_Structs.h
+|   |   |   |   |   |-- SparseLU_SupernodalMatrix.h
+|   |   |   |   |   `-- SparseLU_Utils.h
+|   |   |   |   |-- SparseQR
+|   |   |   |   |   `-- SparseQR.h
+|   |   |   |   |-- SPQRSupport
+|   |   |   |   |   `-- SuiteSparseQRSupport.h
+|   |   |   |   |-- StlSupport
+|   |   |   |   |   |-- details.h
+|   |   |   |   |   |-- StdDeque.h
+|   |   |   |   |   |-- StdList.h
+|   |   |   |   |   `-- StdVector.h
+|   |   |   |   |-- SuperLUSupport
+|   |   |   |   |   `-- SuperLUSupport.h
+|   |   |   |   |-- SVD
+|   |   |   |   |   |-- BDCSVD.h
+|   |   |   |   |   |-- JacobiSVD.h
+|   |   |   |   |   |-- JacobiSVD_LAPACKE.h
+|   |   |   |   |   |-- SVDBase.h
+|   |   |   |   |   `-- UpperBidiagonalization.h
+|   |   |   |   `-- UmfPackSupport
+|   |   |   |       `-- UmfPackSupport.h
+|   |   |   |-- Cholesky
+|   |   |   |-- CholmodSupport
+|   |   |   |-- CMakeLists.txt
+|   |   |   |-- Core
+|   |   |   |-- Dense
+|   |   |   |-- Eigen
+|   |   |   |-- Eigenvalues
+|   |   |   |-- Geometry
+|   |   |   |-- Householder
+|   |   |   |-- IterativeLinearSolvers
+|   |   |   |-- Jacobi
+|   |   |   |-- LU
+|   |   |   |-- MetisSupport
+|   |   |   |-- OrderingMethods
+|   |   |   |-- PardisoSupport
+|   |   |   |-- PaStiXSupport
+|   |   |   |-- QR
+|   |   |   |-- QtAlignedMalloc
+|   |   |   |-- Sparse
+|   |   |   |-- SparseCholesky
+|   |   |   |-- SparseCore
+|   |   |   |-- SparseLU
+|   |   |   |-- SparseQR
+|   |   |   |-- SPQRSupport
+|   |   |   |-- StdDeque
+|   |   |   |-- StdList
+|   |   |   |-- StdVector
+|   |   |   |-- SuperLUSupport
+|   |   |   |-- SVD
+|   |   |   `-- UmfPackSupport
+|   |   |-- failtest
+|   |   |   |-- bdcsvd_int.cpp
+|   |   |   |-- block_nonconst_ctor_on_const_xpr_0.cpp
+|   |   |   |-- block_nonconst_ctor_on_const_xpr_1.cpp
+|   |   |   |-- block_nonconst_ctor_on_const_xpr_2.cpp
+|   |   |   |-- block_on_const_type_actually_const_0.cpp
+|   |   |   |-- block_on_const_type_actually_const_1.cpp
+|   |   |   |-- CMakeLists.txt
+|   |   |   |-- colpivqr_int.cpp
+|   |   |   |-- const_qualified_block_method_retval_0.cpp
+|   |   |   |-- const_qualified_block_method_retval_1.cpp
+|   |   |   |-- const_qualified_diagonal_method_retval.cpp
+|   |   |   |-- const_qualified_transpose_method_retval.cpp
+|   |   |   |-- cwiseunaryview_nonconst_ctor_on_const_xpr.cpp
+|   |   |   |-- cwiseunaryview_on_const_type_actually_const.cpp
+|   |   |   |-- diagonal_nonconst_ctor_on_const_xpr.cpp
+|   |   |   |-- diagonal_on_const_type_actually_const.cpp
+|   |   |   |-- eigensolver_cplx.cpp
+|   |   |   |-- eigensolver_int.cpp
+|   |   |   |-- failtest_sanity_check.cpp
+|   |   |   |-- fullpivlu_int.cpp
+|   |   |   |-- fullpivqr_int.cpp
+|   |   |   |-- jacobisvd_int.cpp
+|   |   |   |-- ldlt_int.cpp
+|   |   |   |-- llt_int.cpp
+|   |   |   |-- map_nonconst_ctor_on_const_ptr_0.cpp
+|   |   |   |-- map_nonconst_ctor_on_const_ptr_1.cpp
+|   |   |   |-- map_nonconst_ctor_on_const_ptr_2.cpp
+|   |   |   |-- map_nonconst_ctor_on_const_ptr_3.cpp
+|   |   |   |-- map_nonconst_ctor_on_const_ptr_4.cpp
+|   |   |   |-- map_on_const_type_actually_const_0.cpp
+|   |   |   |-- map_on_const_type_actually_const_1.cpp
+|   |   |   |-- partialpivlu_int.cpp
+|   |   |   |-- qr_int.cpp
+|   |   |   |-- ref_1.cpp
+|   |   |   |-- ref_2.cpp
+|   |   |   |-- ref_3.cpp
+|   |   |   |-- ref_4.cpp
+|   |   |   |-- ref_5.cpp
+|   |   |   |-- selfadjointview_nonconst_ctor_on_const_xpr.cpp
+|   |   |   |-- selfadjointview_on_const_type_actually_const.cpp
+|   |   |   |-- sparse_ref_1.cpp
+|   |   |   |-- sparse_ref_2.cpp
+|   |   |   |-- sparse_ref_3.cpp
+|   |   |   |-- sparse_ref_4.cpp
+|   |   |   |-- sparse_ref_5.cpp
+|   |   |   |-- sparse_storage_mismatch.cpp
+|   |   |   |-- swap_1.cpp
+|   |   |   |-- swap_2.cpp
+|   |   |   |-- ternary_1.cpp
+|   |   |   |-- ternary_2.cpp
+|   |   |   |-- transpose_nonconst_ctor_on_const_xpr.cpp
+|   |   |   |-- transpose_on_const_type_actually_const.cpp
+|   |   |   |-- triangularview_nonconst_ctor_on_const_xpr.cpp
+|   |   |   `-- triangularview_on_const_type_actually_const.cpp
+|   |   |-- lapack
+|   |   |   |-- cholesky.cpp
+|   |   |   |-- clacgv.f
+|   |   |   |-- cladiv.f
+|   |   |   |-- clarfb.f
+|   |   |   |-- clarf.f
+|   |   |   |-- clarfg.f
+|   |   |   |-- clarft.f
+|   |   |   |-- CMakeLists.txt
+|   |   |   |-- complex_double.cpp
+|   |   |   |-- complex_single.cpp
+|   |   |   |-- dladiv.f
+|   |   |   |-- dlamch.f
+|   |   |   |-- dlapy2.f
+|   |   |   |-- dlapy3.f
+|   |   |   |-- dlarfb.f
+|   |   |   |-- dlarf.f
+|   |   |   |-- dlarfg.f
+|   |   |   |-- dlarft.f
+|   |   |   |-- double.cpp
+|   |   |   |-- dsecnd_NONE.f
+|   |   |   |-- eigenvalues.cpp
+|   |   |   |-- ilaclc.f
+|   |   |   |-- ilaclr.f
+|   |   |   |-- iladlc.f
+|   |   |   |-- iladlr.f
+|   |   |   |-- ilaslc.f
+|   |   |   |-- ilaslr.f
+|   |   |   |-- ilazlc.f
+|   |   |   |-- ilazlr.f
+|   |   |   |-- lapack_common.h
+|   |   |   |-- lu.cpp
+|   |   |   |-- second_NONE.f
+|   |   |   |-- single.cpp
+|   |   |   |-- sladiv.f
+|   |   |   |-- slamch.f
+|   |   |   |-- slapy2.f
+|   |   |   |-- slapy3.f
+|   |   |   |-- slarfb.f
+|   |   |   |-- slarf.f
+|   |   |   |-- slarfg.f
+|   |   |   |-- slarft.f
+|   |   |   |-- svd.cpp
+|   |   |   |-- zlacgv.f
+|   |   |   |-- zladiv.f
+|   |   |   |-- zlarfb.f
+|   |   |   |-- zlarf.f
+|   |   |   |-- zlarfg.f
+|   |   |   `-- zlarft.f
+|   |   |-- scripts
+|   |   |   |-- buildtests.in
+|   |   |   |-- cdashtesting.cmake.in
+|   |   |   |-- check.in
+|   |   |   |-- CMakeLists.txt
+|   |   |   |-- debug.in
+|   |   |   |-- eigen_gen_credits.cpp
+|   |   |   |-- eigen_gen_docs
+|   |   |   |-- release.in
+|   |   |   `-- relicense.py
+|   |   |-- test
+|   |   |   |-- adjoint.cpp
+|   |   |   |-- array.cpp
+|   |   |   |-- array_for_matrix.cpp
+|   |   |   |-- array_of_string.cpp
+|   |   |   |-- array_replicate.cpp
+|   |   |   |-- array_reverse.cpp
+|   |   |   |-- bandmatrix.cpp
+|   |   |   |-- basicstuff.cpp
+|   |   |   |-- bdcsvd.cpp
+|   |   |   |-- bicgstab.cpp
+|   |   |   |-- block.cpp
+|   |   |   |-- boostmultiprec.cpp
+|   |   |   |-- bug1213.cpp
+|   |   |   |-- bug1213.h
+|   |   |   |-- bug1213_main.cpp
+|   |   |   |-- cholesky.cpp
+|   |   |   |-- cholmod_support.cpp
+|   |   |   |-- CMakeLists.txt
+|   |   |   |-- commainitializer.cpp
+|   |   |   |-- conjugate_gradient.cpp
+|   |   |   |-- conservative_resize.cpp
+|   |   |   |-- constructor.cpp
+|   |   |   |-- corners.cpp
+|   |   |   |-- ctorleak.cpp
+|   |   |   |-- cuda_basic.cu
+|   |   |   |-- cuda_common.h
+|   |   |   |-- denseLM.cpp
+|   |   |   |-- dense_storage.cpp
+|   |   |   |-- determinant.cpp
+|   |   |   |-- diagonal.cpp
+|   |   |   |-- diagonalmatrices.cpp
+|   |   |   |-- dontalign.cpp
+|   |   |   |-- dynalloc.cpp
+|   |   |   |-- eigen2support.cpp
+|   |   |   |-- eigensolver_complex.cpp
+|   |   |   |-- eigensolver_generalized_real.cpp
+|   |   |   |-- eigensolver_generic.cpp
+|   |   |   |-- eigensolver_selfadjoint.cpp
+|   |   |   |-- evaluator_common.h
+|   |   |   |-- evaluators.cpp
+|   |   |   |-- exceptions.cpp
+|   |   |   |-- fastmath.cpp
+|   |   |   |-- first_aligned.cpp
+|   |   |   |-- geo_alignedbox.cpp
+|   |   |   |-- geo_eulerangles.cpp
+|   |   |   |-- geo_homogeneous.cpp
+|   |   |   |-- geo_hyperplane.cpp
+|   |   |   |-- geo_orthomethods.cpp
+|   |   |   |-- geo_parametrizedline.cpp
+|   |   |   |-- geo_quaternion.cpp
+|   |   |   |-- geo_transformations.cpp
+|   |   |   |-- half_float.cpp
+|   |   |   |-- hessenberg.cpp
+|   |   |   |-- householder.cpp
+|   |   |   |-- incomplete_cholesky.cpp
+|   |   |   |-- inplace_decomposition.cpp
+|   |   |   |-- integer_types.cpp
+|   |   |   |-- inverse.cpp
+|   |   |   |-- is_same_dense.cpp
+|   |   |   |-- jacobi.cpp
+|   |   |   |-- jacobisvd.cpp
+|   |   |   |-- linearstructure.cpp
+|   |   |   |-- lscg.cpp
+|   |   |   |-- lu.cpp
+|   |   |   |-- main.h
+|   |   |   |-- mapped_matrix.cpp
+|   |   |   |-- mapstaticmethods.cpp
+|   |   |   |-- mapstride.cpp
+|   |   |   |-- meta.cpp
+|   |   |   |-- metis_support.cpp
+|   |   |   |-- miscmatrices.cpp
+|   |   |   |-- mixingtypes.cpp
+|   |   |   |-- mpl2only.cpp
+|   |   |   |-- nesting_ops.cpp
+|   |   |   |-- nomalloc.cpp
+|   |   |   |-- nullary.cpp
+|   |   |   |-- numext.cpp
+|   |   |   |-- packetmath.cpp
+|   |   |   |-- pardiso_support.cpp
+|   |   |   |-- pastix_support.cpp
+|   |   |   |-- permutationmatrices.cpp
+|   |   |   |-- prec_inverse_4x4.cpp
+|   |   |   |-- product_extra.cpp
+|   |   |   |-- product.h
+|   |   |   |-- product_large.cpp
+|   |   |   |-- product_mmtr.cpp
+|   |   |   |-- product_notemporary.cpp
+|   |   |   |-- product_selfadjoint.cpp
+|   |   |   |-- product_small.cpp
+|   |   |   |-- product_symm.cpp
+|   |   |   |-- product_syrk.cpp
+|   |   |   |-- product_trmm.cpp
+|   |   |   |-- product_trmv.cpp
+|   |   |   |-- product_trsolve.cpp
+|   |   |   |-- qr_colpivoting.cpp
+|   |   |   |-- qr.cpp
+|   |   |   |-- qr_fullpivoting.cpp
+|   |   |   |-- qtvector.cpp
+|   |   |   |-- rand.cpp
+|   |   |   |-- real_qz.cpp
+|   |   |   |-- redux.cpp
+|   |   |   |-- ref.cpp
+|   |   |   |-- resize.cpp
+|   |   |   |-- rvalue_types.cpp
+|   |   |   |-- schur_complex.cpp
+|   |   |   |-- schur_real.cpp
+|   |   |   |-- selfadjoint.cpp
+|   |   |   |-- simplicial_cholesky.cpp
+|   |   |   |-- sizeof.cpp
+|   |   |   |-- sizeoverflow.cpp
+|   |   |   |-- smallvectors.cpp
+|   |   |   |-- sparse_basic.cpp
+|   |   |   |-- sparse_block.cpp
+|   |   |   |-- sparse.h
+|   |   |   |-- sparseLM.cpp
+|   |   |   |-- sparselu.cpp
+|   |   |   |-- sparse_permutations.cpp
+|   |   |   |-- sparse_product.cpp
+|   |   |   |-- sparseqr.cpp
+|   |   |   |-- sparse_ref.cpp
+|   |   |   |-- sparse_solver.h
+|   |   |   |-- sparse_solvers.cpp
+|   |   |   |-- sparse_vector.cpp
+|   |   |   |-- special_numbers.cpp
+|   |   |   |-- spqr_support.cpp
+|   |   |   |-- stable_norm.cpp
+|   |   |   |-- stddeque.cpp
+|   |   |   |-- stddeque_overload.cpp
+|   |   |   |-- stdlist.cpp
+|   |   |   |-- stdlist_overload.cpp
+|   |   |   |-- stdvector.cpp
+|   |   |   |-- stdvector_overload.cpp
+|   |   |   |-- superlu_support.cpp
+|   |   |   |-- svd_common.h
+|   |   |   |-- svd_fill.h
+|   |   |   |-- swap.cpp
+|   |   |   |-- triangular.cpp
+|   |   |   |-- umeyama.cpp
+|   |   |   |-- umfpack_support.cpp
+|   |   |   |-- unalignedassert.cpp
+|   |   |   |-- unalignedcount.cpp
+|   |   |   |-- upperbidiagonalization.cpp
+|   |   |   |-- vectorization_logic.cpp
+|   |   |   |-- vectorwiseop.cpp
+|   |   |   |-- visitor.cpp
+|   |   |   `-- zerosized.cpp
+|   |   |-- unsupported
+|   |   |   |-- bench
+|   |   |   |   `-- bench_svd.cpp
+|   |   |   |-- doc
+|   |   |   |   |-- examples
+|   |   |   |   |   |-- BVH_Example.cpp
+|   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |-- EulerAngles.cpp
+|   |   |   |   |   |-- FFT.cpp
+|   |   |   |   |   |-- MatrixExponential.cpp
+|   |   |   |   |   |-- MatrixFunction.cpp
+|   |   |   |   |   |-- MatrixLogarithm.cpp
+|   |   |   |   |   |-- MatrixPower.cpp
+|   |   |   |   |   |-- MatrixPower_optimal.cpp
+|   |   |   |   |   |-- MatrixSine.cpp
+|   |   |   |   |   |-- MatrixSinh.cpp
+|   |   |   |   |   |-- MatrixSquareRoot.cpp
+|   |   |   |   |   |-- PolynomialSolver1.cpp
+|   |   |   |   |   `-- PolynomialUtils1.cpp
+|   |   |   |   |-- snippets
+|   |   |   |   |   `-- CMakeLists.txt
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- eigendoxy_layout.xml.in
+|   |   |   |   `-- Overview.dox
+|   |   |   |-- Eigen
+|   |   |   |   |-- CXX11
+|   |   |   |   |   |-- src
+|   |   |   |   |   |   |-- Tensor
+|   |   |   |   |   |   |   |-- README.md
+|   |   |   |   |   |   |   |-- TensorArgMax.h
+|   |   |   |   |   |   |   |-- TensorAssign.h
+|   |   |   |   |   |   |   |-- TensorBase.h
+|   |   |   |   |   |   |   |-- TensorBroadcasting.h
+|   |   |   |   |   |   |   |-- TensorChipping.h
+|   |   |   |   |   |   |   |-- TensorConcatenation.h
+|   |   |   |   |   |   |   |-- TensorContractionBlocking.h
+|   |   |   |   |   |   |   |-- TensorContractionCuda.h
+|   |   |   |   |   |   |   |-- TensorContraction.h
+|   |   |   |   |   |   |   |-- TensorContractionMapper.h
+|   |   |   |   |   |   |   |-- TensorContractionThreadPool.h
+|   |   |   |   |   |   |   |-- TensorConversion.h
+|   |   |   |   |   |   |   |-- TensorConvolution.h
+|   |   |   |   |   |   |   |-- TensorCostModel.h
+|   |   |   |   |   |   |   |-- TensorCustomOp.h
+|   |   |   |   |   |   |   |-- TensorDeviceCuda.h
+|   |   |   |   |   |   |   |-- TensorDeviceDefault.h
+|   |   |   |   |   |   |   |-- TensorDevice.h
+|   |   |   |   |   |   |   |-- TensorDeviceSycl.h
+|   |   |   |   |   |   |   |-- TensorDeviceThreadPool.h
+|   |   |   |   |   |   |   |-- TensorDimensionList.h
+|   |   |   |   |   |   |   |-- TensorDimensions.h
+|   |   |   |   |   |   |   |-- TensorEvalTo.h
+|   |   |   |   |   |   |   |-- TensorEvaluator.h
+|   |   |   |   |   |   |   |-- TensorExecutor.h
+|   |   |   |   |   |   |   |-- TensorExpr.h
+|   |   |   |   |   |   |   |-- TensorFFT.h
+|   |   |   |   |   |   |   |-- TensorFixedSize.h
+|   |   |   |   |   |   |   |-- TensorForcedEval.h
+|   |   |   |   |   |   |   |-- TensorForwardDeclarations.h
+|   |   |   |   |   |   |   |-- TensorFunctors.h
+|   |   |   |   |   |   |   |-- TensorGenerator.h
+|   |   |   |   |   |   |   |-- TensorGlobalFunctions.h
+|   |   |   |   |   |   |   |-- Tensor.h
+|   |   |   |   |   |   |   |-- TensorImagePatch.h
+|   |   |   |   |   |   |   |-- TensorIndexList.h
+|   |   |   |   |   |   |   |-- TensorInflation.h
+|   |   |   |   |   |   |   |-- TensorInitializer.h
+|   |   |   |   |   |   |   |-- TensorIntDiv.h
+|   |   |   |   |   |   |   |-- TensorIO.h
+|   |   |   |   |   |   |   |-- TensorLayoutSwap.h
+|   |   |   |   |   |   |   |-- TensorMacros.h
+|   |   |   |   |   |   |   |-- TensorMap.h
+|   |   |   |   |   |   |   |-- TensorMeta.h
+|   |   |   |   |   |   |   |-- TensorMorphing.h
+|   |   |   |   |   |   |   |-- TensorPadding.h
+|   |   |   |   |   |   |   |-- TensorPatch.h
+|   |   |   |   |   |   |   |-- TensorRandom.h
+|   |   |   |   |   |   |   |-- TensorReductionCuda.h
+|   |   |   |   |   |   |   |-- TensorReduction.h
+|   |   |   |   |   |   |   |-- TensorReductionSycl.h
+|   |   |   |   |   |   |   |-- TensorRef.h
+|   |   |   |   |   |   |   |-- TensorReverse.h
+|   |   |   |   |   |   |   |-- TensorScan.h
+|   |   |   |   |   |   |   |-- TensorShuffling.h
+|   |   |   |   |   |   |   |-- TensorStorage.h
+|   |   |   |   |   |   |   |-- TensorStriding.h
+|   |   |   |   |   |   |   |-- TensorSyclConvertToDeviceExpression.h
+|   |   |   |   |   |   |   |-- TensorSyclExprConstructor.h
+|   |   |   |   |   |   |   |-- TensorSyclExtractAccessor.h
+|   |   |   |   |   |   |   |-- TensorSyclExtractFunctors.h
+|   |   |   |   |   |   |   |-- TensorSycl.h
+|   |   |   |   |   |   |   |-- TensorSyclLeafCount.h
+|   |   |   |   |   |   |   |-- TensorSyclPlaceHolderExpr.h
+|   |   |   |   |   |   |   |-- TensorSyclRun.h
+|   |   |   |   |   |   |   |-- TensorSyclTuple.h
+|   |   |   |   |   |   |   |-- TensorTraits.h
+|   |   |   |   |   |   |   |-- TensorUInt128.h
+|   |   |   |   |   |   |   `-- TensorVolumePatch.h
+|   |   |   |   |   |   |-- TensorSymmetry
+|   |   |   |   |   |   |   |-- util
+|   |   |   |   |   |   |   |   `-- TemplateGroupTheory.h
+|   |   |   |   |   |   |   |-- DynamicSymmetry.h
+|   |   |   |   |   |   |   |-- StaticSymmetry.h
+|   |   |   |   |   |   |   `-- Symmetry.h
+|   |   |   |   |   |   |-- ThreadPool
+|   |   |   |   |   |   |   |-- EventCount.h
+|   |   |   |   |   |   |   |-- NonBlockingThreadPool.h
+|   |   |   |   |   |   |   |-- RunQueue.h
+|   |   |   |   |   |   |   |-- SimpleThreadPool.h
+|   |   |   |   |   |   |   |-- ThreadEnvironment.h
+|   |   |   |   |   |   |   |-- ThreadLocal.h
+|   |   |   |   |   |   |   |-- ThreadPoolInterface.h
+|   |   |   |   |   |   |   `-- ThreadYield.h
+|   |   |   |   |   |   `-- util
+|   |   |   |   |   |       |-- CXX11Meta.h
+|   |   |   |   |   |       |-- CXX11Workarounds.h
+|   |   |   |   |   |       |-- EmulateArray.h
+|   |   |   |   |   |       |-- EmulateCXX11Meta.h
+|   |   |   |   |   |       `-- MaxSizeVector.h
+|   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |-- Tensor
+|   |   |   |   |   |-- TensorSymmetry
+|   |   |   |   |   `-- ThreadPool
+|   |   |   |   |-- src
+|   |   |   |   |   |-- AutoDiff
+|   |   |   |   |   |   |-- AutoDiffJacobian.h
+|   |   |   |   |   |   |-- AutoDiffScalar.h
+|   |   |   |   |   |   `-- AutoDiffVector.h
+|   |   |   |   |   |-- BVH
+|   |   |   |   |   |   |-- BVAlgorithms.h
+|   |   |   |   |   |   `-- KdBVH.h
+|   |   |   |   |   |-- Eigenvalues
+|   |   |   |   |   |   `-- ArpackSelfAdjointEigenSolver.h
+|   |   |   |   |   |-- EulerAngles
+|   |   |   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |   |   |-- EulerAngles.h
+|   |   |   |   |   |   `-- EulerSystem.h
+|   |   |   |   |   |-- FFT
+|   |   |   |   |   |   |-- ei_fftw_impl.h
+|   |   |   |   |   |   `-- ei_kissfft_impl.h
+|   |   |   |   |   |-- IterativeSolvers
+|   |   |   |   |   |   |-- ConstrainedConjGrad.h
+|   |   |   |   |   |   |-- DGMRES.h
+|   |   |   |   |   |   |-- GMRES.h
+|   |   |   |   |   |   |-- IncompleteLU.h
+|   |   |   |   |   |   |-- IterationController.h
+|   |   |   |   |   |   |-- MINRES.h
+|   |   |   |   |   |   `-- Scaling.h
+|   |   |   |   |   |-- KroneckerProduct
+|   |   |   |   |   |   `-- KroneckerTensorProduct.h
+|   |   |   |   |   |-- LevenbergMarquardt
+|   |   |   |   |   |   |-- CopyrightMINPACK.txt
+|   |   |   |   |   |   |-- LevenbergMarquardt.h
+|   |   |   |   |   |   |-- LMcovar.h
+|   |   |   |   |   |   |-- LMonestep.h
+|   |   |   |   |   |   |-- LMpar.h
+|   |   |   |   |   |   `-- LMqrsolv.h
+|   |   |   |   |   |-- MatrixFunctions
+|   |   |   |   |   |   |-- MatrixExponential.h
+|   |   |   |   |   |   |-- MatrixFunction.h
+|   |   |   |   |   |   |-- MatrixLogarithm.h
+|   |   |   |   |   |   |-- MatrixPower.h
+|   |   |   |   |   |   |-- MatrixSquareRoot.h
+|   |   |   |   |   |   `-- StemFunction.h
+|   |   |   |   |   |-- MoreVectorization
+|   |   |   |   |   |   `-- MathFunctions.h
+|   |   |   |   |   |-- NonLinearOptimization
+|   |   |   |   |   |   |-- chkder.h
+|   |   |   |   |   |   |-- covar.h
+|   |   |   |   |   |   |-- dogleg.h
+|   |   |   |   |   |   |-- fdjac1.h
+|   |   |   |   |   |   |-- HybridNonLinearSolver.h
+|   |   |   |   |   |   |-- LevenbergMarquardt.h
+|   |   |   |   |   |   |-- lmpar.h
+|   |   |   |   |   |   |-- qrsolv.h
+|   |   |   |   |   |   |-- r1mpyq.h
+|   |   |   |   |   |   |-- r1updt.h
+|   |   |   |   |   |   `-- rwupdt.h
+|   |   |   |   |   |-- NumericalDiff
+|   |   |   |   |   |   `-- NumericalDiff.h
+|   |   |   |   |   |-- Polynomials
+|   |   |   |   |   |   |-- Companion.h
+|   |   |   |   |   |   |-- PolynomialSolver.h
+|   |   |   |   |   |   `-- PolynomialUtils.h
+|   |   |   |   |   |-- Skyline
+|   |   |   |   |   |   |-- SkylineInplaceLU.h
+|   |   |   |   |   |   |-- SkylineMatrixBase.h
+|   |   |   |   |   |   |-- SkylineMatrix.h
+|   |   |   |   |   |   |-- SkylineProduct.h
+|   |   |   |   |   |   |-- SkylineStorage.h
+|   |   |   |   |   |   `-- SkylineUtil.h
+|   |   |   |   |   |-- SparseExtra
+|   |   |   |   |   |   |-- BlockOfDynamicSparseMatrix.h
+|   |   |   |   |   |   |-- BlockSparseMatrix.h
+|   |   |   |   |   |   |-- DynamicSparseMatrix.h
+|   |   |   |   |   |   |-- MarketIO.h
+|   |   |   |   |   |   |-- MatrixMarketIterator.h
+|   |   |   |   |   |   `-- RandomSetter.h
+|   |   |   |   |   |-- SpecialFunctions
+|   |   |   |   |   |   |-- arch
+|   |   |   |   |   |   |   `-- CUDA
+|   |   |   |   |   |   |       `-- CudaSpecialFunctions.h
+|   |   |   |   |   |   |-- SpecialFunctionsArrayAPI.h
+|   |   |   |   |   |   |-- SpecialFunctionsFunctors.h
+|   |   |   |   |   |   |-- SpecialFunctionsHalf.h
+|   |   |   |   |   |   |-- SpecialFunctionsImpl.h
+|   |   |   |   |   |   `-- SpecialFunctionsPacketMath.h
+|   |   |   |   |   `-- Splines
+|   |   |   |   |       |-- SplineFitting.h
+|   |   |   |   |       |-- SplineFwd.h
+|   |   |   |   |       `-- Spline.h
+|   |   |   |   |-- AdolcForward
+|   |   |   |   |-- AlignedVector3
+|   |   |   |   |-- ArpackSupport
+|   |   |   |   |-- AutoDiff
+|   |   |   |   |-- BVH
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- EulerAngles
+|   |   |   |   |-- FFT
+|   |   |   |   |-- IterativeSolvers
+|   |   |   |   |-- KroneckerProduct
+|   |   |   |   |-- LevenbergMarquardt
+|   |   |   |   |-- MatrixFunctions
+|   |   |   |   |-- MoreVectorization
+|   |   |   |   |-- MPRealSupport
+|   |   |   |   |-- NonLinearOptimization
+|   |   |   |   |-- NumericalDiff
+|   |   |   |   |-- OpenGLSupport
+|   |   |   |   |-- Polynomials
+|   |   |   |   |-- Skyline
+|   |   |   |   |-- SparseExtra
+|   |   |   |   |-- SpecialFunctions
+|   |   |   |   `-- Splines
+|   |   |   |-- test
+|   |   |   |   |-- mpreal
+|   |   |   |   |   `-- mpreal.h
+|   |   |   |   |-- alignedvector3.cpp
+|   |   |   |   |-- autodiff.cpp
+|   |   |   |   |-- autodiff_scalar.cpp
+|   |   |   |   |-- BVH.cpp
+|   |   |   |   |-- CMakeLists.txt
+|   |   |   |   |-- cxx11_eventcount.cpp
+|   |   |   |   |-- cxx11_meta.cpp
+|   |   |   |   |-- cxx11_non_blocking_thread_pool.cpp
+|   |   |   |   |-- cxx11_runqueue.cpp
+|   |   |   |   |-- cxx11_tensor_argmax.cpp
+|   |   |   |   |-- cxx11_tensor_argmax_cuda.cu
+|   |   |   |   |-- cxx11_tensor_assign.cpp
+|   |   |   |   |-- cxx11_tensor_broadcasting.cpp
+|   |   |   |   |-- cxx11_tensor_broadcast_sycl.cpp
+|   |   |   |   |-- cxx11_tensor_cast_float16_cuda.cu
+|   |   |   |   |-- cxx11_tensor_casts.cpp
+|   |   |   |   |-- cxx11_tensor_chipping.cpp
+|   |   |   |   |-- cxx11_tensor_comparisons.cpp
+|   |   |   |   |-- cxx11_tensor_complex_cuda.cu
+|   |   |   |   |-- cxx11_tensor_complex_cwise_ops_cuda.cu
+|   |   |   |   |-- cxx11_tensor_concatenation.cpp
+|   |   |   |   |-- cxx11_tensor_const.cpp
+|   |   |   |   |-- cxx11_tensor_contract_cuda.cu
+|   |   |   |   |-- cxx11_tensor_contraction.cpp
+|   |   |   |   |-- cxx11_tensor_convolution.cpp
+|   |   |   |   |-- cxx11_tensor_cuda.cu
+|   |   |   |   |-- cxx11_tensor_custom_index.cpp
+|   |   |   |   |-- cxx11_tensor_custom_op.cpp
+|   |   |   |   |-- cxx11_tensor_device.cu
+|   |   |   |   |-- cxx11_tensor_device_sycl.cpp
+|   |   |   |   |-- cxx11_tensor_dimension.cpp
+|   |   |   |   |-- cxx11_tensor_empty.cpp
+|   |   |   |   |-- cxx11_tensor_expr.cpp
+|   |   |   |   |-- cxx11_tensor_fft.cpp
+|   |   |   |   |-- cxx11_tensor_fixed_size.cpp
+|   |   |   |   |-- cxx11_tensor_forced_eval.cpp
+|   |   |   |   |-- cxx11_tensor_forced_eval_sycl.cpp
+|   |   |   |   |-- cxx11_tensor_generator.cpp
+|   |   |   |   |-- cxx11_tensor_ifft.cpp
+|   |   |   |   |-- cxx11_tensor_image_patch.cpp
+|   |   |   |   |-- cxx11_tensor_index_list.cpp
+|   |   |   |   |-- cxx11_tensor_inflation.cpp
+|   |   |   |   |-- cxx11_tensor_intdiv.cpp
+|   |   |   |   |-- cxx11_tensor_io.cpp
+|   |   |   |   |-- cxx11_tensor_layout_swap.cpp
+|   |   |   |   |-- cxx11_tensor_lvalue.cpp
+|   |   |   |   |-- cxx11_tensor_map.cpp
+|   |   |   |   |-- cxx11_tensor_math.cpp
+|   |   |   |   |-- cxx11_tensor_mixed_indices.cpp
+|   |   |   |   |-- cxx11_tensor_morphing.cpp
+|   |   |   |   |-- cxx11_tensor_notification.cpp
+|   |   |   |   |-- cxx11_tensor_of_complex.cpp
+|   |   |   |   |-- cxx11_tensor_of_const_values.cpp
+|   |   |   |   |-- cxx11_tensor_of_float16_cuda.cu
+|   |   |   |   |-- cxx11_tensor_of_strings.cpp
+|   |   |   |   |-- cxx11_tensor_padding.cpp
+|   |   |   |   |-- cxx11_tensor_patch.cpp
+|   |   |   |   |-- cxx11_tensor_random.cpp
+|   |   |   |   |-- cxx11_tensor_random_cuda.cu
+|   |   |   |   |-- cxx11_tensor_reduction.cpp
+|   |   |   |   |-- cxx11_tensor_reduction_cuda.cu
+|   |   |   |   |-- cxx11_tensor_reduction_sycl.cpp
+|   |   |   |   |-- cxx11_tensor_ref.cpp
+|   |   |   |   |-- cxx11_tensor_reverse.cpp
+|   |   |   |   |-- cxx11_tensor_roundings.cpp
+|   |   |   |   |-- cxx11_tensor_scan.cpp
+|   |   |   |   |-- cxx11_tensor_scan_cuda.cu
+|   |   |   |   |-- cxx11_tensor_shuffling.cpp
+|   |   |   |   |-- cxx11_tensor_simple.cpp
+|   |   |   |   |-- cxx11_tensor_striding.cpp
+|   |   |   |   |-- cxx11_tensor_sugar.cpp
+|   |   |   |   |-- cxx11_tensor_sycl.cpp
+|   |   |   |   |-- cxx11_tensor_symmetry.cpp
+|   |   |   |   |-- cxx11_tensor_thread_pool.cpp
+|   |   |   |   |-- cxx11_tensor_uint128.cpp
+|   |   |   |   |-- cxx11_tensor_volume_patch.cpp
+|   |   |   |   |-- dgmres.cpp
+|   |   |   |   |-- EulerAngles.cpp
+|   |   |   |   |-- FFT.cpp
+|   |   |   |   |-- FFTW.cpp
+|   |   |   |   |-- forward_adolc.cpp
+|   |   |   |   |-- gmres.cpp
+|   |   |   |   |-- kronecker_product.cpp
+|   |   |   |   |-- levenberg_marquardt.cpp
+|   |   |   |   |-- matrix_exponential.cpp
+|   |   |   |   |-- matrix_function.cpp
+|   |   |   |   |-- matrix_functions.h
+|   |   |   |   |-- matrix_power.cpp
+|   |   |   |   |-- matrix_square_root.cpp
+|   |   |   |   |-- minres.cpp
+|   |   |   |   |-- mpreal_support.cpp
+|   |   |   |   |-- NonLinearOptimization.cpp
+|   |   |   |   |-- NumericalDiff.cpp
+|   |   |   |   |-- openglsupport.cpp
+|   |   |   |   |-- polynomialsolver.cpp
+|   |   |   |   |-- polynomialutils.cpp
+|   |   |   |   |-- sparse_extra.cpp
+|   |   |   |   |-- special_functions.cpp
+|   |   |   |   `-- splines.cpp
+|   |   |   |-- CMakeLists.txt
+|   |   |   `-- README.txt
+|   |   |-- CMakeLists.txt
+|   |   |-- COPYING.BSD
+|   |   |-- COPYING.GPL
+|   |   |-- COPYING.LGPL
+|   |   |-- COPYING.MINPACK
+|   |   |-- COPYING.MPL2
+|   |   |-- COPYING.README
+|   |   |-- CTestConfig.cmake
+|   |   |-- CTestCustom.cmake.in
+|   |   |-- eigen3.pc.in
+|   |   |-- INSTALL
+|   |   |-- README.md
+|   |   `-- signature_of_eigen3_matrix_library
+|   |-- lcov
+|   |   |-- bin
+|   |   |   |-- copy_dates.sh
+|   |   |   |-- gendesc
+|   |   |   |-- genhtml
+|   |   |   |-- geninfo
+|   |   |   |-- genpng
+|   |   |   |-- get_changes.sh
+|   |   |   |-- get_version.sh
+|   |   |   |-- install.sh
+|   |   |   |-- lcov
+|   |   |   `-- updateversion.pl
+|   |   |-- example
+|   |   |   |-- methods
+|   |   |   |   |-- gauss.c
+|   |   |   |   `-- iterate.c
+|   |   |   |-- descriptions.txt
+|   |   |   |-- example.c
+|   |   |   |-- gauss.h
+|   |   |   |-- iterate.h
+|   |   |   |-- Makefile
+|   |   |   `-- README
+|   |   |-- man
+|   |   |   |-- gendesc.1
+|   |   |   |-- genhtml.1
+|   |   |   |-- geninfo.1
+|   |   |   |-- genpng.1
+|   |   |   |-- lcov.1
+|   |   |   `-- lcovrc.5
+|   |   |-- rpm
+|   |   |   `-- lcov.spec
+|   |   |-- test
+|   |   |   |-- bin
+|   |   |   |   |-- common
+|   |   |   |   |-- mkinfo
+|   |   |   |   |-- norminfo
+|   |   |   |   |-- test_run
+|   |   |   |   |-- test_skip
+|   |   |   |   |-- testsuite_exit
+|   |   |   |   `-- testsuite_init
+|   |   |   |-- genhtml_output
+|   |   |   |   |-- genhtml_test
+|   |   |   |   `-- Makefile
+|   |   |   |-- lcov_add_files
+|   |   |   |   |-- add_test
+|   |   |   |   `-- Makefile
+|   |   |   |-- lcov_diff
+|   |   |   |   |-- new
+|   |   |   |   |   |-- Makefile
+|   |   |   |   |   `-- prog.c
+|   |   |   |   |-- old
+|   |   |   |   |   |-- Makefile
+|   |   |   |   |   `-- prog.c
+|   |   |   |   |-- diff_test
+|   |   |   |   `-- Makefile
+|   |   |   |-- lcov_misc
+|   |   |   |   `-- Makefile
+|   |   |   |-- lcov_summary
+|   |   |   |   |-- check_counts
+|   |   |   |   `-- Makefile
+|   |   |   |-- profiles
+|   |   |   |   |-- large
+|   |   |   |   |-- medium
+|   |   |   |   `-- small
+|   |   |   |-- common.mak
+|   |   |   |-- lcovrc
+|   |   |   `-- Makefile
+|   |   |-- CHANGES
+|   |   |-- CONTRIBUTING
+|   |   |-- COPYING
+|   |   |-- lcovrc
+|   |   |-- Makefile
+|   |   `-- README
+|   |-- phys
+|   |   `-- units
+|   |       |-- io.hpp
+|   |       |-- io_output_eng.hpp
+|   |       |-- io_output.hpp
+|   |       |-- io_symbols.hpp
+|   |       |-- other_units.hpp
+|   |       |-- physical_constants.hpp
+|   |       |-- quantity.hpp
+|   |       |-- quantity_io_ampere.hpp
+|   |       |-- quantity_io_becquerel.hpp
+|   |       |-- quantity_io_candela.hpp
+|   |       |-- quantity_io_celsius.hpp
+|   |       |-- quantity_io_coulomb.hpp
+|   |       |-- quantity_io_dimensionless.hpp
+|   |       |-- quantity_io_engineering.hpp
+|   |       |-- quantity_io_farad.hpp
+|   |       |-- quantity_io_gray.hpp
+|   |       |-- quantity_io_henry.hpp
+|   |       |-- quantity_io_hertz.hpp
+|   |       |-- quantity_io.hpp
+|   |       |-- quantity_io_joule.hpp
+|   |       |-- quantity_io_kelvin.hpp
+|   |       |-- quantity_io_kilogram.hpp
+|   |       |-- quantity_io_lumen.hpp
+|   |       |-- quantity_io_lux.hpp
+|   |       |-- quantity_io_meter.hpp
+|   |       |-- quantity_io_mole.hpp
+|   |       |-- quantity_io_newton.hpp
+|   |       |-- quantity_io_ohm.hpp
+|   |       |-- quantity_io_pascal.hpp
+|   |       |-- quantity_io_radian.hpp
+|   |       |-- quantity_io_second.hpp
+|   |       |-- quantity_io_siemens.hpp
+|   |       |-- quantity_io_sievert.hpp
+|   |       |-- quantity_io_speed.hpp
+|   |       |-- quantity_io_steradian.hpp
+|   |       |-- quantity_io_symbols.hpp
+|   |       |-- quantity_io_tesla.hpp
+|   |       |-- quantity_io_volt.hpp
+|   |       |-- quantity_io_watt.hpp
+|   |       `-- quantity_io_weber.hpp
+|   |-- CMakeLists.txt
+|   |-- eigen-eigen-b3f3d4950030.tar.bz2
+|   |-- pythia8235.tar.bz2
+|   `-- ThirdParty.dox
+|-- Tools
+|   |-- CMakeLists.txt
+|   |-- plot_crossings.sh
+|   `-- plot_tracks.sh
+|-- AUTHORS
+|-- CHANGELOG
+|-- CMakeLists.txt
+|-- COLLABORATION_AGREEMENT.md
+|-- CONTRIBUTING.md
+|-- corsika.dox
+|-- do-clang-format.py
+|-- do-copyright.py
+|-- FIXME.md
+|-- LICENSE
+|-- MCNET_GUIDELINES
+|-- README.md
+`-- SCIENTIFIC_AUTHORS
+```
diff --git a/Framework/CMakeLists.txt b/Framework/CMakeLists.txt
deleted file mode 100644
index 4e7baba255038652c60894b20f75df3606a80742..0000000000000000000000000000000000000000
--- a/Framework/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-add_subdirectory (Analytics)
-add_subdirectory (Cascade)
-add_subdirectory (Geometry)
-add_subdirectory (Logging)
-add_subdirectory (Particles)
-add_subdirectory (ProcessSequence)
-add_subdirectory (Random)
-add_subdirectory (StackInterface)
-add_subdirectory (Testing)
-add_subdirectory (Utilities)
-add_subdirectory (Units)
-
-
-
-
-
-
-
diff --git a/Framework/Cascade/CMakeLists.txt b/Framework/Cascade/CMakeLists.txt
deleted file mode 100644
index 2a12099736e967a7bbcfc9db3395f46fc94590cd..0000000000000000000000000000000000000000
--- a/Framework/Cascade/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# namespace of library -> location of header files
-set (
-  CORSIKAcascade_NAMESPACE
-  corsika/cascade
-  )
-
-# header files of this library
-set (
-  CORSIKAcascade_HEADERS
-  Cascade.h
-  testCascade.h
-  )
-
-add_library (CORSIKAcascade INTERFACE)
-
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAcascade ${CORSIKAcascade_NAMESPACE} ${CORSIKAcascade_HEADERS})
-
-target_link_libraries(
-  CORSIKAcascade
-  INTERFACE
-  CORSIKAsetup
-  CORSIKArandom
-  CORSIKAstackinterface
-  CORSIKAparticles
-  CORSIKAgeometry
-  CORSIKAenvironment
-  CORSIKAprocesssequence
-  CORSIKAunits
-  CORSIKAlogging
-  )
-
-# include directive for upstream code
-target_include_directories (
-  CORSIKAcascade
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/>
-  )
-
-# install library
-install (
-  FILES ${CORSIKAcascade_HEADERS}
-  DESTINATION include/${CORSIKAcascade_NAMESPACE}
-  )
-
-# ----------------
-# code unit testing
-CORSIKA_ADD_TEST(testCascade)
-target_link_libraries (
-  testCascade
-  CORSIKAcascade
-  ProcessStackInspector
-  ProcessTrackingLine
-  CORSIKAtesting
-  )
diff --git a/Framework/Cascade/Cascade.dox b/Framework/Cascade/Cascade.dox
deleted file mode 100644
index 7ea74e9c5f48191e010effd294c741494239b7c6..0000000000000000000000000000000000000000
--- a/Framework/Cascade/Cascade.dox
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
-
-
-  Here are have to explain the corsika::cascade::Cascade class and its
-  functionality.
-  
-
-*/
\ No newline at end of file
diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h
deleted file mode 100644
index bc29bb620fea26ae1225f4832395bb6834426fbd..0000000000000000000000000000000000000000
--- a/Framework/Cascade/Cascade.h
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/Environment.h>
-#include <corsika/logging/Logging.h>
-#include <corsika/process/ProcessReturn.h>
-#include <corsika/random/ExponentialDistribution.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/random/UniformRealDistribution.h>
-#include <corsika/stack/SecondaryView.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/stack/history/EventType.hpp>
-#include <corsika/stack/history/HistorySecondaryProducer.hpp>
-
-/*  see Issue 161, we need to include SetupStack only because we need
-    to globally define StackView. This is clearly not nice and should
-    be changed, when possible. It might be that StackView needs to be
-    templated in Cascade, but this would be even worse... so we don't
-    do that until it is really needed.
- */
-#include <corsika/setup/SetupStack.h>
-
-#include <cassert>
-#include <cmath>
-#include <limits>
-
-#include <boost/type_index.hpp>
-using boost::typeindex::type_id_with_cvr;
-
-#include <fstream>
-
-/**
- * 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>TTracking</b> must be a class according to the
-   * TrackingInterface providing the functions:
-   * <code>auto GetTrack(Particle const& p)</auto>,
-   * with the return type <code>geometry::Trajectory<corsika::geometry::Line>
-   * </code>
-   *
-   * <b>TProcessList</b> must be a ProcessSequence.   *
-   * <b>Stack</b> is the storage object for particle data, i.e. with
-   * Particle class type <code>Stack::ParticleType</code>
-   *
-   *
-   */
-
-  template <typename TTracking, typename TProcessList, typename TStack,
-            /*
-              TStackView is needed as explicit template parameter because
-              of issue 161 and the
-              inability of clang to understand "stack::MakeView" so far.
-             */
-            typename TStackView = corsika::setup::StackView>
-  class Cascade {
-    using Particle = typename TStack::ParticleType;
-    using VolumeTreeNode =
-        std::remove_pointer_t<decltype(((Particle*)nullptr)->GetNode())>;
-    using MediumInterface = typename VolumeTreeNode::IModelProperties;
-
-    // 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<MediumInterface> const& env, TTracking& tr,
-            TProcessList& pl, TStack& stack)
-        : environment_(env)
-        , tracking_(tr)
-        , process_sequence_(pl)
-        , stack_(stack)
-        , count_(0) {
-      C8LOG_INFO(c8_ascii_);
-      if constexpr (TStackView::has_event) {
-        C8LOG_INFO(" - With full cascade HISTORY.");
-      }
-    }
-
-    ~Cascade(){};
-
-    /**
-     * The Run function is the main simulation loop, which processes
-     * particles from the Stack until the Stack is empty.
-     */
-    void Run() {
-      setNodes();
-
-      while (!stack_.IsEmpty()) {
-        while (!stack_.IsEmpty()) {
-          C8LOG_TRACE("Stack: {}", stack_.as_string());
-          count_++;
-          auto pNext = stack_.GetNextParticle();
-          C8LOG_DEBUG(
-              "============== next particle : count={}, pid={} "
-              ", stack entries={}"
-              ", stack deleted={}",
-              count_, pNext.GetPID(), stack_.getEntries(), stack_.getDeleted());
-          Step(pNext);
-          process_sequence_.DoStack(stack_);
-        }
-        // do cascade equations, which can put new particles on Stack,
-        // thus, the double loop
-        // DoCascadeEquations();
-      }
-    }
-
-    /**
-     * Force an interaction of the top particle of the stack at its current position.
-     * Note that SetNodes() or an equivalent procedure needs to be called first if you
-     * want to call forceInteraction() for the primary interaction.
-     */
-    void forceInteraction() {
-      C8LOG_DEBUG("forced interaction!");
-      setNodes();
-      auto vParticle = stack_.GetNextParticle();
-      TStackView secondaries(vParticle);
-      interaction(secondaries);
-      process_sequence_.DoSecondaries(secondaries);
-      vParticle.Delete(); // primary particle has interacted and is gone
-    }
-
-  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& vParticle) {
-      using namespace corsika;
-      using namespace corsika::units::si;
-
-      // determine combined total interaction length (inverse)
-      InverseGrammageType const total_inv_lambda =
-          process_sequence_.GetInverseInteractionLength(vParticle);
-
-      // sample random exponential step length in grammage
-      corsika::random::ExponentialDistribution expDist(1 / total_inv_lambda);
-      GrammageType const next_interact = expDist(rng_);
-
-      C8LOG_DEBUG(
-          "total_lambda={} g/cm2, "
-          ", next_interact={} g/cm2",
-          double((1. / total_inv_lambda) / 1_g * 1_cm * 1_cm),
-          double(next_interact / 1_g * 1_cm * 1_cm));
-
-      auto const* currentLogicalNode = vParticle.GetNode();
-
-      // assert that particle stays outside void Universe if it has no
-      // model properties set
-      assert((currentLogicalNode != &*environment_.GetUniverse() ||
-              environment_.GetUniverse()->HasModelProperties()) &&
-             "FATAL: The environment model has no valid properties set!");
-
-      // determine combined total inverse decay time
-      InverseTimeType const total_inv_lifetime =
-          process_sequence_.GetInverseLifetime(vParticle);
-
-      // sample random exponential decay time
-      corsika::random::ExponentialDistribution expDistDecay(1 / total_inv_lifetime);
-      TimeType const next_decay = expDistDecay(rng_);
-      C8LOG_DEBUG(
-          "total_lifetime={} s"
-          ", next_decay={} s",
-          (1 / total_inv_lifetime) / 1_s, next_decay / 1_s);
-
-      // convert next_decay from time to length [m]
-      LengthType const distance_decay = next_decay * vParticle.GetMomentum().norm() /
-                                        vParticle.GetEnergy() * units::constants::c;
-
-      // determine geometric tracking
-      auto [step, nextVol] = tracking_.GetTrack(vParticle);
-      auto geomMaxLength = step.GetLength(1);
-
-      // convert next_step from grammage to length
-      LengthType const distance_interact =
-          currentLogicalNode->GetModelProperties().ArclengthFromGrammage(step,
-                                                                         next_interact);
-
-      // determine the maximum geometric step length
-      LengthType const continuous_max_dist = process_sequence_.MaxStepLength(vParticle, step);
-
-      // take minimum of geometry, interaction, decay for next step
-      auto min_distance =
-          std::min({distance_interact, distance_decay, continuous_max_dist, geomMaxLength});
-
-      C8LOG_DEBUG(
-          "transport particle by : {} m "
-          "Medium transition after: {} m "
-          "Decay after: {} m "
-          "Interaction after: {} m "
-          "Continuous limit: {} m ",
-          min_distance / 1_m, geomMaxLength / 1_m, distance_decay / 1_m,
-          distance_interact / 1_m, continuous_max_dist / 1_m);
-
-      // here the particle is actually moved along the trajectory to new position:
-      step.SetLength(min_distance);
-      vParticle.SetPosition(step.GetPosition(1));
-      vParticle.SetMomentum(step.GetDirection(1) * vParticle.GetMomentum().norm());
-      vParticle.SetTime(vParticle.GetTime() + step.GetDuration());
-      std::cout << "New Position: " << vParticle.GetPosition().GetCoordinates()
-                << std::endl;
-
-      // apply all continuous processes on particle + track
-      process::EProcessReturn status = process_sequence_.DoContinuous(vParticle, step);
-
-      if (status == process::EProcessReturn::eParticleAbsorbed) {
-        C8LOG_DEBUG("Cascade: delete absorbed particle PID={} E={} GeV",
-                    vParticle.GetPID(), vParticle.GetEnergy() / 1_GeV);
-        if (!vParticle.isDeleted()) vParticle.Delete();
-        return;
-      }
-
-      C8LOG_DEBUG("sth. happening before geometric limit ? {}",
-                  ((min_distance < geomMaxLength) ? "yes" : "no"));
-
-      if (min_distance < geomMaxLength) { // interaction to happen within geometric limit
-
-        // check whether decay or interaction limits this step the
-        // outcome of decay or interaction MAY be a) new particles in
-        // secondaries, b) the projectile particle deleted (or
-        // changed)
-
-        TStackView secondaries(vParticle);
-
-        if (min_distance < continuous_max_dist) {
-          /*
-            Create SecondaryView object on Stack. The data container
-            remains untouched and identical, and 'projectil' is identical
-            to 'vParticle' above this line. However,
-            projectil.AddSecondaries populate the SecondaryView, which can
-            then be used afterwards for further processing. Thus: it is
-            important to use projectle/view (and not vParticle) for Interaction,
-            and Decay!
-          */
-
-          [[maybe_unused]] auto projectile = secondaries.GetProjectile();
-
-          if (distance_interact < distance_decay) {
-            interaction(secondaries);
-          } else {
-            decay(secondaries);
-            // make sure particle actually did decay if it should have done so
-            if (secondaries.getSize() == 1 &&
-                projectile.GetPID() == secondaries.GetNextParticle().GetPID())
-              throw std::runtime_error(
-                  fmt::format("Cascade: {} decayed into itself!",
-                              particles::GetName(projectile.GetPID())));
-          }
-
-          process_sequence_.DoSecondaries(secondaries);
-          vParticle.Delete();
-
-        } else { // step-length limitation within volume
-          C8LOG_DEBUG("step-length limitation");
-          // no extra physics happens here. just proceed to next step.
-        }
-
-        [[maybe_unused]] auto const assertion = [&] {
-          auto const* numericalNodeAfterStep =
-              environment_.GetUniverse()->GetContainingNode(vParticle.GetPosition());
-          C8LOG_TRACE("Geometry check: numericalNodeAfterStep={} currentLogicalNode={}",
-                      fmt::ptr(numericalNodeAfterStep), fmt::ptr(currentLogicalNode));
-          return numericalNodeAfterStep == currentLogicalNode;
-        };
-        assert(assertion()); // numerical and logical nodes should
-                             // match, we did not cross any volume
-                             // boundary
-
-      } else { // boundary crossing, step is limited by volume boundary
-
-	if (nextVol != currentLogicalNode) {
-	
-	  C8LOG_DEBUG("volume boundary crossing to {}", fmt::ptr(nextVol));
-
-	  if (nextVol == environment_.GetUniverse().get()) {
-	    C8LOG_DEBUG("particle left physics world, is now in unknown space -> delete");
-	    vParticle.Delete();
-	  }
-	  vParticle.SetNode(nextVol);
-	  /*
-	    DoBoundary may delete the particle (or not)
-	    
-	    caveat: any changes to vParticle, or even the production
-	    of new secondaries is currently not passed to ParticleCut,
-	    thus, particles outside the desired phase space may be produced.
-	    
-	    todo: this must be fixed.
-	  */
-	  process_sequence_.DoBoundaryCrossing(vParticle, *currentLogicalNode, *nextVol);
-	}
-      }
-    }
-
-    process::EProcessReturn decay(TStackView& view) {
-      C8LOG_DEBUG("decay");
-      units::si::InverseTimeType const actual_decay_time =
-          process_sequence_.GetInverseLifetime(view.parent());
-
-      random::UniformRealDistribution<units::si::InverseTimeType> uniDist(
-          actual_decay_time);
-      const auto sample_process = uniDist(rng_);
-      auto const returnCode = process_sequence_.SelectDecay(view, sample_process);
-      if (returnCode != process::EProcessReturn::eDecayed) {
-        C8LOG_WARN("Particle did not decay!");
-      }
-      SetEventType(view, history::EventType::Decay);
-      return returnCode;
-    }
-
-    process::EProcessReturn interaction(TStackView& view) {
-      C8LOG_DEBUG("collide");
-
-      units::si::InverseGrammageType const current_inv_length =
-          process_sequence_.GetInverseInteractionLength(view.parent());
-
-      random::UniformRealDistribution<units::si::InverseGrammageType> uniDist(
-          current_inv_length);
-      const auto sample_process = uniDist(rng_);
-      auto const returnCode = process_sequence_.SelectInteraction(view, sample_process);
-      if (returnCode != process::EProcessReturn::eInteracted) {
-        C8LOG_WARN("Particle did not interact!");
-      }
-      SetEventType(view, history::EventType::Interaction);
-      return returnCode;
-    }
-
-    /**
-     * set the nodes for all particles on the stack according to their numerical
-     * position
-     */
-    void setNodes() {
-      std::for_each(stack_.begin(), stack_.end(), [&](auto& p) {
-        auto const* numericalNode =
-            environment_.GetUniverse()->GetContainingNode(p.GetPosition());
-        p.SetNode(numericalNode);
-      });
-    }
-
-    void SetEventType(TStackView& view, [[maybe_unused]] history::EventType eventType) {
-      if constexpr (TStackView::has_event) {
-        for (auto&& sec : view) { sec.GetEvent()->setEventType(eventType); }
-      }
-    }
-
-    // but this here temporarily. Should go into dedicated file later:
-    const char* c8_ascii_ =
-        R"V0G0N(
-  ,ad8888ba,     ,ad8888ba,    88888888ba    ad88888ba   88  88      a8P          db              ad88888ba   
- d8"'    `"8b   d8"'    `"8b   88      "8b  d8"     "8b  88  88    ,88'          d88b            d8"     "8b  
-d8'            d8'        `8b  88      ,8P  Y8,          88  88  ,88"           d8'`8b           Y8a     a8P  
-88             88          88  88aaaaaa8P'  `Y8aaaaa,    88  88,d88'           d8'  `8b           "Y8aaa8P"   
-88             88          88  88""""88'      `"""""8b,  88  8888"88,         d8YaaaaY8b          ,d8"""8b,   
-Y8,            Y8,        ,8P  88    `8b            `8b  88  88P   Y8b       d8""""""""8b        d8"     "8b  
- Y8a.    .a8P   Y8a.    .a8P   88     `8b   Y8a     a8P  88  88     "88,    d8'        `8b       Y8a     a8P  
-  `"Y8888Y"'     `"Y8888Y"'    88      `8b   "Y88888P"   88  88       Y8b  d8'          `8b       "Y88888P"
-	)V0G0N";
-
-  private:
-    // Data members
-    corsika::environment::Environment<MediumInterface> const& environment_;
-    TTracking& tracking_;
-    TProcessList& process_sequence_;
-    TStack& stack_;
-    corsika::random::RNG& rng_ =
-        corsika::random::RNGManager::GetInstance().GetRandomStream("cascade");
-    unsigned int count_ = 0;
-
-  }; // end class Cascade
-
-} // namespace corsika::cascade
diff --git a/Framework/Cascade/testCascade.h b/Framework/Cascade/testCascade.h
deleted file mode 100644
index e057441433a58f24e374ee925497fc445ab3cae9..0000000000000000000000000000000000000000
--- a/Framework/Cascade/testCascade.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/IEmpty.hpp>
-
-#include <corsika/stack/CombinedStack.h>
-#include <corsika/stack/SecondaryView.h>
-#include <corsika/stack/node/GeometryNodeStackExtension.h>
-#include <corsika/stack/nuclear_extension/NuclearStackExtension.h>
-
-using TestEnvironmentInterface = corsika::environment::IEmpty;
-using TestEnvironmentType = corsika::environment::Environment<TestEnvironmentInterface>;
-
-template <typename T>
-using SetupGeometryDataInterface =
-    corsika::stack::node::GeometryDataInterface<T, TestEnvironmentType>;
-
-// combine particle data stack with geometry information for tracking
-template <typename StackIter>
-using StackWithGeometryInterface = corsika::stack::CombinedParticleInterface<
-    corsika::stack::nuclear_extension::ParticleDataStack::MPIType,
-    SetupGeometryDataInterface, StackIter>;
-
-using TestCascadeStack = corsika::stack::CombinedStack<
-    typename corsika::stack::nuclear_extension::ParticleDataStack::StackImpl,
-    corsika::stack::node::GeometryData<TestEnvironmentType>, StackWithGeometryInterface>;
-
-/*
-  See also Issue 161
-*/
-#if defined(__clang__)
-using TestCascadeStackView =
-    corsika::stack::SecondaryView<typename TestCascadeStack::StackImpl,
-                                  StackWithGeometryInterface>;
-#elif defined(__GNUC__) || defined(__GNUG__)
-using TestCascadeStackView = corsika::stack::MakeView<TestCascadeStack>::type;
-#endif
diff --git a/Framework/Geometry/BaseTrajectory.h b/Framework/Geometry/BaseTrajectory.h
deleted file mode 100644
index 6d61e2eeb820064afc1d7f51c9b991e930960e93..0000000000000000000000000000000000000000
--- a/Framework/Geometry/BaseTrajectory.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <string>
-
-namespace corsika::geometry {
-
-  /*!
-   * Interface / base class for trajectories.
-   */
-  class BaseTrajectory {
-
-    BaseTrajectory() = delete;
-
-  public:
-    BaseTrajectory(corsika::units::si::TimeType start, corsika::units::si::TimeType end)
-        : fTStart(start)
-        , fTEnd(end) {}
-
-    //!< for \f$ t = 0 \f$, the starting Point shall be returned.
-    virtual Point GetPosition(corsika::units::si::TimeType) const = 0;
-
-    //!< the Point is return from u=0 (start) to u=1 (end)
-    virtual Point GetPosition(double u) const = 0;
-
-    /*!
-     * returns the length between two points of the trajectory
-     * parameterized by \arg t1 and \arg t2. Requires \arg t2 > \arg t1.
-     */
-
-    virtual corsika::units::si::TimeType TimeFromArclength(
-        corsika::units::si::LengthType) const = 0;
-
-    virtual LengthType ArcLength(corsika::units::si::TimeType t1,
-                                 corsika::units::si::TimeType t2) const = 0;
-
-    virtual corsika::units::si::TimeType GetDuration(
-        corsika::units::si::TimeType t1, corsika::units::si::TimeType t2) const {
-      return t2 - t1;
-    }
-
-    virtual Point GetEndpoint() const { return GetPosition(fTEnd); }
-    virtual Point GetStartpoint() const { return GetPosition(fTStart); }
-
-  protected:
-    corsika::units::si::TimeType const fTStart, fTEnd;
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/BaseVector.h b/Framework/Geometry/BaseVector.h
deleted file mode 100644
index f66ee84e2e6d4888d2d848a76590dcbf522ca981..0000000000000000000000000000000000000000
--- a/Framework/Geometry/BaseVector.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/CoordinateSystem.h>
-#include <corsika/geometry/QuantityVector.h>
-
-namespace corsika::geometry {
-
-  /*!
-   * Common base class for Vector and Point. Currently it does basically nothing.
-   */
-
-  template <typename dim>
-  class BaseVector {
-  protected:
-    QuantityVector<dim> qVector;
-    CoordinateSystem const* cs;
-
-  public:
-    BaseVector(CoordinateSystem const& pCS, QuantityVector<dim> pQVector)
-        : qVector(pQVector)
-        , cs(&pCS) {}
-
-    auto const& GetCoordinateSystem() const { return *cs; }
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/CMakeLists.txt b/Framework/Geometry/CMakeLists.txt
deleted file mode 100644
index d302289b0396ed786d3a9c95d3b2aed49145c413..0000000000000000000000000000000000000000
--- a/Framework/Geometry/CMakeLists.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-set (
-  GEOMETRY_SOURCES
-  CoordinateSystem.cc
-  )
-
-set (
-  GEOMETRY_HEADERS
-  Vector.h
-  Point.h
-  Line.h
-  Sphere.h
-  Plane.h
-  Volume.h
-  CoordinateSystem.h
-  RootCoordinateSystem.h
-  Helix.h
-  BaseVector.h
-  QuantityVector.h
-  Trajectory.h
-  FourVector.h
-  Intersections.hpp
-  )
-
-set (
-  GEOMETRY_NAMESPACE
-  corsika/geometry
-  )
-
-add_library (CORSIKAgeometry STATIC ${GEOMETRY_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAgeometry ${GEOMETRY_NAMESPACE} ${GEOMETRY_HEADERS})
-
-set_target_properties (
-  CORSIKAgeometry
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  PUBLIC_HEADER "${GEOMETRY_HEADERS}"
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAutilities
-  C8::ext::eigen3
-  )
-
-target_include_directories (
-  CORSIKAgeometry
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS CORSIKAgeometry
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  PUBLIC_HEADER DESTINATION include/${GEOMETRY_NAMESPACE}
-  )
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testGeometry)
-target_link_libraries (
-  testGeometry
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAtesting
-  )
-
-CORSIKA_ADD_TEST(testFourVector)
-target_link_libraries (
-  testFourVector
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAtesting
-  )
diff --git a/Framework/Geometry/CoordinateSystem.h b/Framework/Geometry/CoordinateSystem.h
deleted file mode 100644
index bc9ecd9a2bcacf5625437aa4ffab19ec9c8a171b..0000000000000000000000000000000000000000
--- a/Framework/Geometry/CoordinateSystem.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/QuantityVector.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/utl/sgn.h>
-#include <Eigen/Dense>
-#include <stdexcept>
-
-typedef Eigen::Transform<double, 3, Eigen::Affine> EigenTransform;
-typedef Eigen::Translation<double, 3> EigenTranslation;
-
-namespace corsika::geometry {
-
-  class RootCoordinateSystem;
-  template <typename T>
-  class Vector;
-
-  using corsika::units::si::length_d;
-
-  class CoordinateSystem {
-    CoordinateSystem const* reference = nullptr;
-    EigenTransform transf;
-
-    CoordinateSystem()
-        : // for creating the root CS
-        transf(EigenTransform::Identity()) {}
-
-  protected:
-    static auto CreateCS() { return CoordinateSystem(); }
-    friend corsika::geometry::RootCoordinateSystem; /// this is the only class that can
-                                                    /// create ONE unique root CS
-
-  public:
-    static EigenTransform GetTransformation(CoordinateSystem const& c1,
-                                            CoordinateSystem const& c2);
-
-    CoordinateSystem(CoordinateSystem const& reference, EigenTransform const& transf)
-        : reference(&reference)
-        , transf(transf) {}
-
-    auto& operator=(const CoordinateSystem& pCS) {
-      reference = pCS.reference;
-      transf = pCS.transf;
-      return *this;
-    }
-
-    auto translate(QuantityVector<length_d> vector) const {
-      EigenTransform const translation{EigenTranslation(vector.eVector)};
-
-      return CoordinateSystem(*this, translation);
-    }
-
-    /**
-     * creates a new CS in which vVec points in direction of the new z-axis
-     */
-    template <typename TDim>
-    auto RotateToZ(Vector<TDim> vVec) const {
-      auto const a = vVec.normalized().GetComponents(*this).eVector;
-      auto const a1 = a(0), a2 = a(1);
-
-      auto const s = utl::sgn(a(2));
-      auto const c = 1 / (1 + s * a(2));
-
-      Eigen::Matrix3d A, B;
-
-      if (s > 0) {
-        A << 1, 0, a1,                      // comment to prevent clang-format
-            0, 1, a2,                       // .
-            -a1, -a2, 1;                    // .
-        B << -a1 * a1 * c, -a1 * a2 * c, 0, // .
-            -a1 * a2 * c, -a2 * a2 * c, 0,  // .
-            0, 0, -(a1 * a1 + a2 * a2) * c; // .
-
-      } else {
-        A << 1, 0, a1,                      // .
-            0, -1, a2,                      // .
-            a1, -a2, -1;                    // .
-        B << -a1 * a1 * c, +a1 * a2 * c, 0, // .
-            -a1 * a2 * c, +a2 * a2 * c, 0,  // .
-            0, 0, (a1 * a1 + a2 * a2) * c;  // .
-      }
-
-      return CoordinateSystem(*this, EigenTransform(A + B));
-    }
-
-    template <typename TDim>
-    auto rotate(QuantityVector<TDim> axis, double angle) const {
-      if (axis.eVector.isZero()) {
-        throw std::runtime_error("null-vector given as axis parameter");
-      }
-
-      EigenTransform const rotation{Eigen::AngleAxisd(angle, axis.eVector.normalized())};
-
-      return CoordinateSystem(*this, rotation);
-    }
-
-    template <typename TDim>
-    auto translateAndRotate(QuantityVector<phys::units::length_d> translation,
-                            QuantityVector<TDim> axis, double angle) {
-      if (axis.eVector.isZero()) {
-        throw std::runtime_error("null-vector given as axis parameter");
-      }
-
-      EigenTransform const transf{Eigen::AngleAxisd(angle, axis.eVector.normalized()) *
-                                  EigenTranslation(translation.eVector)};
-
-      return CoordinateSystem(*this, transf);
-    }
-
-    auto const* GetReference() const { return reference; }
-
-    auto const& GetTransform() const { return transf; }
-
-    bool operator==(CoordinateSystem const& cs) const {
-      return reference == cs.reference && transf.matrix() == cs.transf.matrix();
-    }
-
-    bool operator!=(CoordinateSystem const& cs) const { return !(cs == *this); }
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/FourVector.h b/Framework/Geometry/FourVector.h
deleted file mode 100644
index 2ea2b28d42616f07545742d2589528680cd2658c..0000000000000000000000000000000000000000
--- a/Framework/Geometry/FourVector.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <iostream>
-
-namespace corsika::geometry {
-
-  /**
-     FourVector supports "full" units, e.g. E in [GeV/c] and p in [GeV],
-     or also t in [s] and r in [m], etc.
-
-     However, for HEP applications it is also possible to use E and p
-     both in [GeV].
-
-     The FourVector can return NormSqr and Norm, whereas Norm is
-     sqrt(abs(NormSqr)). The physical units are always calculated and
-     returned properly.
-
-     FourVector can also return if it is TimeLike, SpaceLike or PhotonLike.
-
-     When a FourVector is initialized with a lvalue reference, this is
-     also used for the internal storage, which should lead to complete
-     disappearance of the FourVector class during optimization.
-   */
-
-  template <typename TimeType, typename SpaceVecType>
-  class FourVector {
-
-  public:
-    using SpaceType = typename std::decay<SpaceVecType>::type::Quantity;
-
-    //! check the types and the physical units here:
-    static_assert(
-        std::is_same<typename std::decay<TimeType>::type, SpaceType>::value ||
-            std::is_same<typename std::decay<TimeType>::type,
-                         decltype(std::declval<SpaceType>() / corsika::units::si::meter *
-                                  corsika::units::si::second)>::value,
-        "Units of time-like and space-like coordinates must either be idential "
-        "(e.g. GeV) or [E/c]=[p]");
-
-  public:
-    FourVector(const TimeType& eT, const SpaceVecType& eS)
-        : fTimeLike(eT)
-        , fSpaceLike(eS) {}
-
-    TimeType GetTimeLikeComponent() const { return fTimeLike; }
-    SpaceVecType& GetSpaceLikeComponents() { return fSpaceLike; }
-    const SpaceVecType& GetSpaceLikeComponents() const { return fSpaceLike; }
-
-    auto GetNormSqr() const { return GetTimeSquared() - fSpaceLike.squaredNorm(); }
-
-    SpaceType GetNorm() const { return sqrt(abs(GetNormSqr())); }
-
-    bool IsTimelike() const {
-      return GetTimeSquared() < fSpaceLike.squaredNorm();
-    } //! Norm2 < 0
-
-    bool IsSpacelike() const {
-      return GetTimeSquared() > fSpaceLike.squaredNorm();
-    } //! Norm2 > 0
-
-    /* this is not numerically stable
-    bool IsPhotonlike() const {
-      return GetTimeSquared() == fSpaceLike.squaredNorm();
-    } //! Norm2 == 0
-    */
-
-    FourVector& operator+=(const FourVector& b) {
-      fTimeLike += b.fTimeLike;
-      fSpaceLike += b.fSpaceLike;
-      return *this;
-    }
-
-    FourVector& operator-=(const FourVector& b) {
-      fTimeLike -= b.fTimeLike;
-      fSpaceLike -= b.fSpaceLike;
-      return *this;
-    }
-
-    FourVector& operator*=(const double b) {
-      fTimeLike *= b;
-      fSpaceLike *= b;
-      return *this;
-    }
-
-    FourVector& operator/=(const double b) {
-      fTimeLike /= b;
-      fSpaceLike.GetComponents() /= b; // TODO: WHY IS THIS??????
-      return *this;
-    }
-
-    FourVector& operator/(const double b) {
-      *this /= b;
-      return *this;
-    }
-
-    /**
-       Note that the product between two 4-vectors assumes that you use
-       the same "c" convention for both. Only the LHS vector is checked
-       for this. You cannot mix different conventions due to
-       unit-checking.
-     */
-    SpaceType operator*(const FourVector& b) {
-      if constexpr (std::is_same<typename std::decay<TimeType>::type,
-                                 decltype(std::declval<SpaceType>() /
-                                          corsika::units::si::meter *
-                                          corsika::units::si::second)>::value)
-        return fTimeLike * b.fTimeLike *
-                   (corsika::units::constants::c * corsika::units::constants::c) -
-               fSpaceLike.norm();
-      else
-        return fTimeLike * fTimeLike - fSpaceLike.norm();
-    }
-
-  private:
-    /**
-       This function is automatically compiled to use of ignore the
-       extra factor of "c" for the time-like quantity
-     */
-    auto GetTimeSquared() const {
-      if constexpr (std::is_same<typename std::decay<TimeType>::type,
-                                 decltype(std::declval<SpaceType>() /
-                                          corsika::units::si::meter *
-                                          corsika::units::si::second)>::value)
-        return fTimeLike * fTimeLike *
-               (corsika::units::constants::c * corsika::units::constants::c);
-      else
-        return fTimeLike * fTimeLike;
-    }
-
-  protected:
-    //! the data members
-    TimeType fTimeLike;
-    SpaceVecType fSpaceLike;
-
-    //! the friends: math operators
-    template <typename T, typename U>
-    friend FourVector<typename std::decay<T>::type, typename std::decay<U>::type>
-    operator+(const FourVector<T, U>&, const FourVector<T, U>&);
-
-    template <typename T, typename U>
-    friend FourVector<typename std::decay<T>::type, typename std::decay<U>::type>
-    operator-(const FourVector<T, U>&, const FourVector<T, U>&);
-
-    template <typename T, typename U>
-    friend FourVector<typename std::decay<T>::type, typename std::decay<U>::type>
-    operator*(const FourVector<T, U>&, const double);
-
-    template <typename T, typename U>
-    friend FourVector<typename std::decay<T>::type, typename std::decay<U>::type>
-    operator/(const FourVector<T, U>&, const double);
-  };
-
-  /**
-      The math operator+
-   */
-  template <typename TimeType, typename SpaceVecType>
-  inline FourVector<typename std::decay<TimeType>::type,
-                    typename std::decay<SpaceVecType>::type>
-  operator+(const FourVector<TimeType, SpaceVecType>& a,
-            const FourVector<TimeType, SpaceVecType>& b) {
-    return FourVector<typename std::decay<TimeType>::type,
-                      typename std::decay<SpaceVecType>::type>(
-        a.fTimeLike + b.fTimeLike, a.fSpaceLike + b.fSpaceLike);
-  }
-
-  /**
-     The math operator-
-  */
-  template <typename TimeType, typename SpaceVecType>
-  inline FourVector<typename std::decay<TimeType>::type,
-                    typename std::decay<SpaceVecType>::type>
-  operator-(const FourVector<TimeType, SpaceVecType>& a,
-            const FourVector<TimeType, SpaceVecType>& b) {
-    return FourVector<typename std::decay<TimeType>::type,
-                      typename std::decay<SpaceVecType>::type>(
-        a.fTimeLike - b.fTimeLike, a.fSpaceLike - b.fSpaceLike);
-  }
-
-  /**
-     The math operator*
-  */
-  template <typename TimeType, typename SpaceVecType>
-  inline FourVector<typename std::decay<TimeType>::type,
-                    typename std::decay<SpaceVecType>::type>
-  operator*(const FourVector<TimeType, SpaceVecType>& a, const double b) {
-    return FourVector<typename std::decay<TimeType>::type,
-                      typename std::decay<SpaceVecType>::type>(a.fTimeLike * b,
-                                                               a.fSpaceLike * b);
-  }
-
-  /**
-      The math operator/
-   */
-  template <typename TimeType, typename SpaceVecType>
-  inline FourVector<typename std::decay<TimeType>::type,
-                    typename std::decay<SpaceVecType>::type>
-  operator/(const FourVector<TimeType, SpaceVecType>& a, const double b) {
-    return FourVector<typename std::decay<TimeType>::type,
-                      typename std::decay<SpaceVecType>::type>(a.fTimeLike / b,
-                                                               a.fSpaceLike / b);
-  }
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/Helix.h b/Framework/Geometry/Helix.h
deleted file mode 100644
index 5deaa082275d0e459cdd633b421bb3e685742392..0000000000000000000000000000000000000000
--- a/Framework/Geometry/Helix.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <cmath>
-
-namespace corsika::geometry {
-  /*!
-   * A Helix is defined by the cyclotron frequency \f$ \omega_c \f$, the initial
-   * Point r0 and
-   * the velocity vectors \f$ \vec{v}_{\parallel} \f$ and \f$ \vec{v}_{\perp} \f$
-   * denoting the projections of the initial velocity \f$ \vec{v}_0 \f$ parallel
-   * and perpendicular to the axis \f$ \vec{B} \f$, respectively, i.e.
-   * \f{align*}{
-        \vec{v}_{\parallel} &= \frac{\vec{v}_0 \cdot \vec{B}}{\vec{B}^2} \vec{B} \\
-        \vec{v}_{\perp} &= \vec{v}_0 - \vec{v}_{\parallel}
-     \f}
-   */
-
-  class Helix {
-
-    using VelocityVec = Vector<corsika::units::si::SpeedType::dimension_type>;
-
-    Point const r0;
-    corsika::units::si::FrequencyType const omegaC;
-    VelocityVec const vPar;
-    VelocityVec const vPerp, uPerp;
-
-    corsika::units::si::LengthType const radius;
-
-  public:
-    Helix(Point const& pR0, corsika::units::si::FrequencyType pOmegaC,
-          VelocityVec const& pvPar, VelocityVec const& pvPerp)
-        : r0(pR0)
-        , omegaC(pOmegaC)
-        , vPar(pvPar)
-        , vPerp(pvPerp)
-        , uPerp(vPerp.cross(vPar.normalized()))
-        , radius(pvPar.norm() / abs(pOmegaC)) {}
-
-    Point GetPosition(corsika::units::si::TimeType t) const {
-      return r0 + vPar * t +
-             (vPerp * (cos(omegaC * t) - 1) + uPerp * sin(omegaC * t)) / omegaC;
-    }
-
-    VelocityVec GetVelocity(corsika::units::si::TimeType t) const {
-      return vPar + (vPerp * (cos(omegaC * t) - 1) + uPerp * sin(omegaC * t));
-    }
-
-    Point PositionFromArclength(corsika::units::si::LengthType l) const {
-      return GetPosition(TimeFromArclength(l));
-    }
-
-    auto GetRadius() const { return radius; }
-
-    corsika::units::si::LengthType ArcLength(corsika::units::si::TimeType t1,
-                                             corsika::units::si::TimeType t2) const {
-      return (vPar + vPerp).norm() * (t2 - t1);
-    }
-
-    corsika::units::si::TimeType TimeFromArclength(
-        corsika::units::si::LengthType l) const {
-      return l / (vPar + vPerp).norm();
-    }
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/Line.h b/Framework/Geometry/Line.h
deleted file mode 100644
index f54b02dbd0914b94265b596107037fbac7d0ec43..0000000000000000000000000000000000000000
--- a/Framework/Geometry/Line.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
-
-namespace corsika::geometry {
-
-  /**
-   * \class Line
-   *
-   * A Line describes a movement in three dimensional space. It
-   * consists of a Point `$\vec{p_0}$` and and a speed-Vector
-   * `$\vec{v}$`, so that it can return GetPosition as
-   * `$\vec{p_0}*\vec{v}*t$` for any value of time `$t$`.
-   *
-   **/
-
-  class Line {
-
-    using VelocityVec = Vector<corsika::units::si::SpeedType::dimension_type>;
-
-    Point const r0;
-    VelocityVec const v0;
-
-  public:
-    Line() = delete;
-    Line(const Line&) = default;
-    Line(Line&&) = default;
-    Line& operator=(const Line&) = delete;
-    Line(Point const& pR0, VelocityVec const& pV0)
-        : r0(pR0)
-        , v0(pV0) {}
-
-    Point GetPosition(corsika::units::si::TimeType t) const { return r0 + v0 * t; }
-    VelocityVec GetVelocity(corsika::units::si::TimeType) const { return v0; }
-
-    Point PositionFromArclength(corsika::units::si::LengthType l) const {
-      return r0 + v0.normalized() * l;
-    }
-
-    LengthType ArcLength(corsika::units::si::TimeType t1,
-                         corsika::units::si::TimeType t2) const {
-      return v0.norm() * (t2 - t1);
-    }
-
-    corsika::units::si::TimeType TimeFromArclength(
-        corsika::units::si::LengthType t) const {
-      return t / v0.norm();
-    }
-
-    auto GetR0() const { return r0; }
-    auto GetV0() const { return v0; }
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/Point.h b/Framework/Geometry/Point.h
deleted file mode 100644
index 20e46032c12b341dfce300ff326c247f4da76b67..0000000000000000000000000000000000000000
--- a/Framework/Geometry/Point.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/BaseVector.h>
-#include <corsika/geometry/QuantityVector.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
-
-namespace corsika::geometry {
-
-  using corsika::units::si::length_d;
-  using corsika::units::si::LengthType;
-
-  /*!
-   * A Point represents a point in position space. It is defined by its
-   * coordinates with respect to some CoordinateSystem.
-   */
-  class Point : public BaseVector<length_d> {
-  public:
-    Point(CoordinateSystem const& pCS, QuantityVector<length_d> pQVector)
-        : BaseVector<length_d>(pCS, pQVector) {}
-
-    Point(CoordinateSystem const& cs, LengthType x, LengthType y, LengthType z)
-        : BaseVector<length_d>(cs, {x, y, z}) {}
-
-    // TODO: this should be private or protected, we don NOT want to expose numbers
-    // without reference to outside:
-    auto GetCoordinates() const { return BaseVector<length_d>::qVector; }
-    auto GetX() const { return BaseVector<length_d>::qVector.GetX(); }
-    auto GetY() const { return BaseVector<length_d>::qVector.GetY(); }
-    auto GetZ() const { return BaseVector<length_d>::qVector.GetZ(); }
-
-    /// this always returns a QuantityVector as triple
-    auto GetCoordinates(CoordinateSystem const& pCS) const {
-      if (&pCS == BaseVector<length_d>::cs) {
-        return BaseVector<length_d>::qVector;
-      } else {
-        return QuantityVector<length_d>(
-            CoordinateSystem::GetTransformation(*BaseVector<length_d>::cs, pCS) *
-            BaseVector<length_d>::qVector.eVector);
-      }
-    }
-
-    /*!
-     * transforms the Point into another CoordinateSystem by changing its
-     * coordinates interally
-     */
-    void rebase(CoordinateSystem const& pCS) {
-      BaseVector<length_d>::qVector = GetCoordinates(pCS);
-      BaseVector<length_d>::cs = &pCS;
-    }
-
-    Point operator+(Vector<length_d> const& pVec) const {
-      return Point(*BaseVector<length_d>::cs,
-                   GetCoordinates() + pVec.GetComponents(*BaseVector<length_d>::cs));
-    }
-
-    /*!
-     * returns the distance Vector between two points
-     */
-    Vector<length_d> operator-(Point const& pB) const {
-      auto& cs = *BaseVector<length_d>::cs;
-      return Vector<length_d>(cs, GetCoordinates() - pB.GetCoordinates(cs));
-    }
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/QuantityVector.h b/Framework/Geometry/QuantityVector.h
deleted file mode 100644
index b45138bf76eeb7a7a3e653a9df3f7e7a0a828930..0000000000000000000000000000000000000000
--- a/Framework/Geometry/QuantityVector.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/units/PhysicalUnits.h>
-
-#include <Eigen/Dense>
-
-#include <iostream>
-#include <utility>
-
-namespace corsika::geometry {
-
-  /*!
-   * A QuantityVector is a three-component container based on Eigen::Vector3d
-   * with a phys::units::si::dimension. Arithmethic operators are defined that
-   * propagate the dimensions by dimensional analysis.
-   */
-
-  template <typename dim>
-  class QuantityVector {
-  public:
-    using Quantity = phys::units::quantity<dim, double>; //< the phys::units::quantity
-                                                         // corresponding to the dimension
-
-  public:
-    Eigen::Vector3d eVector; //!< the actual container where the raw numbers are stored
-
-    typedef dim dimension; //!< should be a phys::units::dimension
-
-    QuantityVector(Quantity a, Quantity b, Quantity c)
-        : eVector{a.magnitude(), b.magnitude(), c.magnitude()} {}
-
-    QuantityVector(double a, double b, double c)
-        : eVector{a, b, c} {
-      static_assert(
-          std::is_same_v<dim, phys::units::dimensionless_d>,
-          "initialization of dimensionful QuantityVector with pure numbers not allowed!");
-    }
-
-    QuantityVector(Eigen::Vector3d pBareVector)
-        : eVector(pBareVector) {}
-
-    auto operator[](size_t index) const {
-      return Quantity(phys::units::detail::magnitude_tag, eVector[index]);
-    }
-
-    auto GetX() const { return (*this)[0]; }
-
-    auto GetY() const { return (*this)[1]; }
-
-    auto GetZ() const { return (*this)[2]; }
-
-    auto norm() const {
-      return Quantity(phys::units::detail::magnitude_tag, eVector.norm());
-    }
-
-    auto squaredNorm() const {
-      using QuantitySquared =
-          decltype(std::declval<Quantity>() * std::declval<Quantity>());
-      return QuantitySquared(phys::units::detail::magnitude_tag, eVector.squaredNorm());
-    }
-
-    auto operator+(QuantityVector<dim> const& pQVec) const {
-      return QuantityVector<dim>(eVector + pQVec.eVector);
-    }
-
-    auto operator-(QuantityVector<dim> const& pQVec) const {
-      return QuantityVector<dim>(eVector - pQVec.eVector);
-    }
-
-    template <typename ScalarDim>
-    auto operator*(phys::units::quantity<ScalarDim, double> const p) const {
-      using ResQuantity = phys::units::detail::Product<ScalarDim, dim, double, double>;
-
-      if constexpr (std::is_same<ResQuantity, double>::value) // result dimensionless, not
-                                                              // a "Quantity" anymore
-      {
-        return QuantityVector<phys::units::dimensionless_d>(eVector * p.magnitude());
-      } else {
-        return QuantityVector<typename ResQuantity::dimension_type>(eVector *
-                                                                    p.magnitude());
-      }
-    }
-
-    template <typename ScalarDim>
-    auto operator/(phys::units::quantity<ScalarDim, double> const p) const {
-      return (*this) * (1 / p);
-    }
-
-    auto operator*(double const p) const { return QuantityVector<dim>(eVector * p); }
-
-    auto operator/(double const p) const { return QuantityVector<dim>(eVector / p); }
-
-    auto& operator/=(double const p) {
-      eVector /= p;
-      return *this;
-    }
-
-    auto& operator*=(double const p) {
-      eVector *= p;
-      return *this;
-    }
-
-    auto& operator+=(QuantityVector<dim> const& pQVec) {
-      eVector += pQVec.eVector;
-      return *this;
-    }
-
-    auto& operator-=(QuantityVector<dim> const& pQVec) {
-      eVector -= pQVec.eVector;
-      return *this;
-    }
-
-    auto& operator-() const { return QuantityVector<dim>(-eVector); }
-
-    auto normalized() const { return QuantityVector<dim>(eVector.normalized()); }
-
-    auto operator==(QuantityVector<dim> const& p) const { return eVector == p.eVector; }
-  };
-
-  template <typename dim>
-  auto& operator<<(std::ostream& os, corsika::geometry::QuantityVector<dim> qv) {
-    using Quantity = phys::units::quantity<dim, double>;
-
-    os << '(' << qv.eVector(0) << ' ' << qv.eVector(1) << ' ' << qv.eVector(2) << ") "
-       << phys::units::to_unit_symbol<dim, double>(
-              Quantity(phys::units::detail::magnitude_tag, 1));
-    return os;
-  }
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/Sphere.h b/Framework/Geometry/Sphere.h
deleted file mode 100644
index a2a77efec78e2d6c3b063185c73be8423c265c5a..0000000000000000000000000000000000000000
--- a/Framework/Geometry/Sphere.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Volume.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/units/PhysicalUnits.h>
-
-namespace corsika::geometry {
-
-  class Sphere : public Volume {
-    Point const fCenter;
-    LengthType const fRadius;
-
-  public:
-    Sphere(Point const& pCenter, LengthType const pRadius)
-        : fCenter(pCenter)
-        , fRadius(pRadius) {}
-
-    //! returns true if the Point p is within the sphere
-    bool Contains(Point const& p) const override {
-      return fRadius * fRadius > (fCenter - p).squaredNorm();
-    }
-
-    const Point& GetCenter() const { return fCenter; }
-    LengthType GetRadius() const { return fRadius; }
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/Trajectory.h b/Framework/Geometry/Trajectory.h
deleted file mode 100644
index 1580a0db36b6c8e6d973513ac27916bc27a0498e..0000000000000000000000000000000000000000
--- a/Framework/Geometry/Trajectory.h
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/units/PhysicalUnits.h>
-
-namespace corsika::geometry {
-
-  /**
-   * \class LineTrajectory
-   *
-   * A Trajectory is a description of a momvement of an object in
-   * three-dimensional space that describes the trajectory (connection
-   * between two Points in space), as well as the direction of motion
-   * at any given point.
-   *
-   * A Trajectory has a start `0` and an end `1`, where
-   * e.g. GetPosition(0) returns the start point and GetDirection(1)
-   * the direction of motion at the end. Values outside 0...1 are not
-   * defined.
-   *
-   * A Trajectory has a length in [m], GetLength, a duration in [s], GetDuration.
-   *
-   * Note: so far it is assumed that the speed (d|vec{r}|/dt) between
-   * start and end does not change and is constant for the entire
-   * Trajectory.
-   *
-   **/
-
-  class LineTrajectory {
-
-    using VelocityVec = Vector<corsika::units::si::SpeedType::dimension_type>;
-
-  public:
-    LineTrajectory() = delete;
-    LineTrajectory(const LineTrajectory&) = default;
-    LineTrajectory(LineTrajectory&&) = default;
-    LineTrajectory& operator=(const LineTrajectory&) = delete;
-
-    /**
-     * \param theLine The geometric \sa Line object that represents a straight-line
-     * connection 
-     *
-     * \param timeLength The time duration to traverse the straight trajectory
-     * in units of \sa TimeType
-     */
-    LineTrajectory(Line const& theLine, corsika::units::si::TimeType timeLength)
-        : line_(theLine)
-        , timeLength_(timeLength)
-        , timeStep_(timeLength)
-        , initialVelocity_(theLine.GetVelocity(corsika::units::si::TimeType::zero()))
-        , finalVelocity_(theLine.GetVelocity(timeLength)) {}
-
-    /**
-     * \param theLine The geometric \sa Line object that represents a straight-line
-     * connection 
-     * 
-     * \param timeLength The time duration to traverse the straight trajectory
-     * in units of \sa TimeType 
-     * 
-     * \param timeStep Time duration to folow eventually curved
-     * trajectory in units of \sa TimesType 
-     * 
-     * \param initialV Initial velocity vector at
-     * start of trajectory \param finalV Final velocity vector at start of trajectory
-     */
-    LineTrajectory(
-        Line const& theLine,
-        corsika::units::si::TimeType timeLength, // length of theLine (straight)
-        corsika::units::si::TimeType timeStep,   // length of bend step (curved)
-        const VelocityVec& initialV, const VelocityVec& finalV)
-        : line_(theLine)
-        , timeLength_(timeLength)
-        , timeStep_(timeStep)
-        , initialVelocity_(initialV)
-        , finalVelocity_(finalV) {}
-
-    const Line& GetLine() const { return line_; }
-    Point GetPosition(double u) const { return line_.GetPosition(timeLength_ * u); }
-    VelocityVec GetVelocity(double u) const {
-      return initialVelocity_ * (1 - u) + finalVelocity_ * u;
-    }
-    Vector<corsika::units::si::dimensionless_d> GetDirection(double u) const {
-      return GetVelocity(u).normalized();
-    }
-
-    ///! duration along potentially bend trajectory
-    corsika::units::si::TimeType GetDuration(double u = 1) const { return u * timeStep_; }
-
-    ///! total length along potentially bend trajectory
-    corsika::units::si::LengthType GetLength(double u = 1) const {
-      using namespace corsika::units::si;
-      if (timeLength_ == 0_s) return 0_m;
-      if (timeStep_ ==
-          std::numeric_limits<corsika::units::si::TimeType::value_type>::infinity() * 1_s)
-        return std::numeric_limits<
-                   corsika::units::si::LengthType::value_type>::infinity() *
-               1_m;
-      return GetDistance(u) * timeStep_ / timeLength_;
-    }
-
-    ///! set new duration along potentially bend trajectory.
-    void SetLength(corsika::units::si::LengthType limit) {
-      SetDuration(line_.TimeFromArclength(limit));
-    }
-
-    ///! set new duration along potentially bend trajectory.
-    //   Scale other properties by "limit/timeLength_"
-    void SetDuration(corsika::units::si::TimeType limit) {
-      using namespace corsika::units::si;
-      if (timeStep_ == 0_s) {
-        timeLength_ = 0_s;
-        SetFinalVelocity(GetVelocity(0));
-        timeStep_ = limit;
-      } else {
-        // for infinite steps there can't be a difference between
-        // curved and straight trajectory, this is fundamentally
-        // undefined: assume they are the same (which, i.e. is always correct for a
-        // straight line trajectory).
-        //
-        // Final note: only straight-line trajectories should have
-        // infinite steps! Everything else is ill-defined.
-        if (timeStep_ == std::numeric_limits<
-                             corsika::units::si::TimeType::value_type>::infinity() *
-                             1_s ||
-            timeLength_ == std::numeric_limits<
-                               corsika::units::si::TimeType::value_type>::infinity() *
-                               1_s) {
-          timeLength_ = limit;
-          timeStep_ = limit;
-          // ...and don't touch velocity
-        } else {
-          const double scale = limit / timeStep_;
-          timeLength_ *= scale;
-          SetFinalVelocity(GetVelocity(scale));
-          timeStep_ = limit;
-        }
-      }
-    }
-
-  protected:
-    ///! total length along straight trajectory
-    corsika::units::si::LengthType GetDistance(double u) const {
-      assert(u <= 1);
-      assert(u >= 0);
-      return line_.ArcLength(0 * corsika::units::si::second, u * timeLength_);
-    }
-
-    void SetFinalVelocity(const VelocityVec& v) { finalVelocity_ = v; }
-
-  private:
-    Line line_;
-    corsika::units::si::TimeType
-        timeLength_; ///! length of straight step (shortest connecting line)
-    corsika::units::si::TimeType timeStep_; ///! length of bend step (curved)
-    VelocityVec initialVelocity_;
-    VelocityVec finalVelocity_;
-  };
-
-  /**
-   * \class LeapFrogTrajectory
-   *
-   *
-   **/
-
-  class LeapFrogTrajectory {
-
-    using VelocityVec = Vector<corsika::units::si::SpeedType::dimension_type>;
-    typedef corsika::geometry::Vector<corsika::units::si::magnetic_flux_density_d>
-        MagneticFieldVector;
-
-  public:
-    LeapFrogTrajectory() = delete;
-    LeapFrogTrajectory(const LeapFrogTrajectory&) = default;
-    LeapFrogTrajectory(LeapFrogTrajectory&&) = default;
-    LeapFrogTrajectory& operator=(const LeapFrogTrajectory&) = delete;
-    LeapFrogTrajectory(const Point& pos, const VelocityVec& initialVelocity,
-                       MagneticFieldVector Bfield,
-                       const decltype(square(corsika::units::si::meter) /
-                                      (square(corsika::units::si::second) *
-                                       corsika::units::si::volt)) k,
-                       corsika::units::si::TimeType timeStep) // leap-from total length
-        : initialPosition_(pos)
-        , initialVelocity_(initialVelocity)
-        , initialDirection_(initialVelocity.normalized())
-        , magneticfield_(Bfield)
-        , k_(k)
-        , timeStep_(timeStep) {}
-
-    const Line GetLine() const {
-      using namespace corsika::units::si;
-      auto D = GetPosition(1) - GetPosition(0);
-      auto d = D.norm();
-      auto v = initialVelocity_;
-      if (d>1_um) { // if trajectory is ultra-short, we do not
-		    // re-calculate velocity, just use initial
-		    // value. Otherwise, this is numerically unstable
-	v = D/d * GetVelocity(0).norm();
-      }
-      return Line(GetPosition(0), v);
-    }
-    Point GetPosition(double u) const {
-      Point position = initialPosition_ + initialVelocity_ * timeStep_ * u / 2;
-      VelocityVec velocity =
-          initialVelocity_ + initialVelocity_.cross(magneticfield_) * timeStep_ * u * k_;
-      return position + velocity * timeStep_ * u / 2;
-    }
-    VelocityVec GetVelocity(double u) const {
-      return initialVelocity_ +
-             initialVelocity_.cross(magneticfield_) * timeStep_ * u * k_;
-    }
-
-    Vector<corsika::units::si::dimensionless_d> GetDirection(double u) const {
-      return GetVelocity(u).normalized();
-    }
-
-    ///! duration along potentially bend trajectory
-    corsika::units::si::TimeType GetDuration(double u = 1) const {
-      return u * timeStep_ *
-             (double(GetVelocity(u).norm() / initialVelocity_.norm()) + 1.0) / 2;
-    }
-
-    ///! total length along potentially bend trajectory
-    corsika::units::si::LengthType GetLength(double u = 1) const {
-      using namespace corsika::units::si;
-      return timeStep_ * initialVelocity_.norm() * u;
-    }
-
-    ///! set new duration along potentially bend trajectory.
-    void SetLength(corsika::units::si::LengthType limit) {
-      using namespace corsika::units::si;
-      if (initialVelocity_.norm() == 0_m / 1_s) SetDuration(0_s);
-      SetDuration(limit / initialVelocity_.norm());
-    }
-
-    ///! set new duration along potentially bend trajectory.
-    //   Scale other properties by "limit/timeLength_"
-    void SetDuration(corsika::units::si::TimeType limit) {
-      using namespace corsika::units::si;
-      timeStep_ = limit;
-    }
-
-  private:
-    Point initialPosition_;
-    VelocityVec initialVelocity_;
-    geometry::Vector<corsika::units::si::dimensionless_d> initialDirection_;
-    MagneticFieldVector magneticfield_;
-    decltype(square(corsika::units::si::meter) /
-             (square(corsika::units::si::second) * corsika::units::si::volt)) k_;
-    corsika::units::si::TimeType timeStep_;
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Geometry/Vector.h b/Framework/Geometry/Vector.h
deleted file mode 100644
index 8be8fcfefa6b6716157233a7bcebafd1f9f0387c..0000000000000000000000000000000000000000
--- a/Framework/Geometry/Vector.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/BaseVector.h>
-#include <corsika/geometry/QuantityVector.h>
-
-#include <corsika/units/PhysicalUnits.h>
-
-/*!
- * A Vector represents a 3-vector in Euclidean space. It is defined by components
- * given in a specific CoordinateSystem. It has a physical dimension ("unit")
- * as part of its type, so you cannot mix up e.g. electric with magnetic fields
- * (but you could calculate their cross-product to get an energy flux vector).
- *
- * When transforming coordinate systems, a Vector is subject to the rotational
- * part only and invariant under translations.
- */
-
-namespace corsika::geometry {
-
-  template <typename dim>
-  class Vector : public BaseVector<dim> {
-  public:
-    using Quantity = phys::units::quantity<dim, double>;
-
-  public:
-    Vector(CoordinateSystem const& pCS, QuantityVector<dim> pQVector)
-        : BaseVector<dim>(pCS, pQVector) {}
-
-    Vector(CoordinateSystem const& cs, Quantity x, Quantity y, Quantity z)
-        : BaseVector<dim>(cs, QuantityVector<dim>(x, y, z)) {}
-
-    /*!
-     * returns a QuantityVector with the components given in the "home"
-     * CoordinateSystem of the Vector
-     */
-    auto GetComponents() const { return BaseVector<dim>::qVector; }
-
-    /*!
-     * returns a QuantityVector with the components given in an arbitrary
-     * CoordinateSystem
-     */
-    auto GetComponents(CoordinateSystem const& pCS) const {
-      if (&pCS == BaseVector<dim>::cs) {
-        return BaseVector<dim>::qVector;
-      } else {
-        return QuantityVector<dim>(
-            CoordinateSystem::GetTransformation(*BaseVector<dim>::cs, pCS).linear() *
-            BaseVector<dim>::qVector.eVector);
-      }
-    }
-
-    /*!
-     * transforms the Vector into another CoordinateSystem by changing
-     * its components internally
-     */
-    void rebase(CoordinateSystem const& pCS) {
-      BaseVector<dim>::qVector = GetComponents(pCS);
-      BaseVector<dim>::cs = &pCS;
-    }
-
-    /*!
-     * returns the norm/length of the Vector. Before using this method,
-     * think about whether squaredNorm() might be cheaper for your computation.
-     */
-    auto norm() const { return BaseVector<dim>::qVector.norm(); }
-    auto GetNorm() const { return BaseVector<dim>::qVector.norm(); }
-
-    /*!
-     * returns the squared norm of the Vector. Before using this method,
-     * think about whether norm() might be cheaper for your computation.
-     */
-    auto squaredNorm() const { return BaseVector<dim>::qVector.squaredNorm(); }
-    auto GetSquaredNorm() const { return BaseVector<dim>::qVector.squaredNorm(); }
-
-    /*!
-     * returns a Vector \f$ \vec{v}_{\parallel} \f$ which is the parallel projection
-     * of this vector \f$ \vec{v}_1 \f$ along another Vector \f$ \vec{v}_2 \f$ given by
-     *   \f[
-     *     \vec{v}_{\parallel} = \frac{\vec{v}_1 \cdot \vec{v}_2}{\vec{v}_2^2} \vec{v}_2
-     *   \f]
-     */
-    template <typename dim2>
-    auto parallelProjectionOnto(Vector<dim2> const& pVec,
-                                CoordinateSystem const& pCS) const {
-      auto const ourCompVec = GetComponents(pCS);
-      auto const otherCompVec = pVec.GetComponents(pCS);
-      auto const& a = ourCompVec.eVector;
-      auto const& b = otherCompVec.eVector;
-
-      return Vector<dim>(pCS, QuantityVector<dim>(b * ((a.dot(b)) / b.squaredNorm())));
-    }
-
-    template <typename dim2>
-    auto parallelProjectionOnto(Vector<dim2> const& pVec) const {
-      return parallelProjectionOnto<dim2>(pVec, *BaseVector<dim>::cs);
-    }
-
-    auto operator+(Vector<dim> const& pVec) const {
-      auto const components =
-          GetComponents(*BaseVector<dim>::cs) + pVec.GetComponents(*BaseVector<dim>::cs);
-      return Vector<dim>(*BaseVector<dim>::cs, components);
-    }
-
-    auto operator-(Vector<dim> const& pVec) const {
-      auto const components = GetComponents() - pVec.GetComponents(*BaseVector<dim>::cs);
-      return Vector<dim>(*BaseVector<dim>::cs, components);
-    }
-
-    auto& operator*=(double const p) {
-      BaseVector<dim>::qVector *= p;
-      return *this;
-    }
-
-    template <typename ScalarDim>
-    auto operator*(phys::units::quantity<ScalarDim, double> const p) const {
-      using ProdDim = phys::units::detail::product_d<dim, ScalarDim>;
-
-      return Vector<ProdDim>(*BaseVector<dim>::cs, BaseVector<dim>::qVector * p);
-    }
-
-    template <typename ScalarDim>
-    auto operator/(phys::units::quantity<ScalarDim, double> const p) const {
-      return (*this) * (1 / p);
-    }
-
-    auto operator*(double const p) const {
-      return Vector<dim>(*BaseVector<dim>::cs, BaseVector<dim>::qVector * p);
-    }
-
-    auto operator/(double const p) const {
-      return Vector<dim>(*BaseVector<dim>::cs, BaseVector<dim>::qVector / p);
-    }
-
-    auto& operator+=(Vector<dim> const& pVec) {
-      BaseVector<dim>::qVector += pVec.GetComponents(*BaseVector<dim>::cs);
-      return *this;
-    }
-
-    auto& operator-=(Vector<dim> const& pVec) {
-      BaseVector<dim>::qVector -= pVec.GetComponents(*BaseVector<dim>::cs);
-      return *this;
-    }
-
-    auto& operator-() const {
-      return Vector<dim>(*BaseVector<dim>::cs, -BaseVector<dim>::qVector);
-    }
-
-    auto normalized() const { return (*this) * (1 / norm()); }
-
-    template <typename dim2>
-    auto cross(Vector<dim2> pV) const {
-      auto const c1 = GetComponents().eVector;
-      auto const c2 = pV.GetComponents(*BaseVector<dim>::cs).eVector;
-      auto const bareResult = c1.cross(c2);
-
-      using ProdDim = phys::units::detail::product_d<dim, dim2>;
-      return Vector<ProdDim>(*BaseVector<dim>::cs, bareResult);
-    }
-
-    template <typename dim2>
-    auto dot(Vector<dim2> pV) const {
-      auto const c1 = GetComponents().eVector;
-      auto const c2 = pV.GetComponents(*BaseVector<dim>::cs).eVector;
-      auto const bareResult = c1.dot(c2);
-
-      using ProdDim = phys::units::detail::product_d<dim, dim2>;
-
-      return phys::units::quantity<ProdDim, double>(phys::units::detail::magnitude_tag,
-                                                    bareResult);
-    }
-  };
-
-} // namespace corsika::geometry
diff --git a/Framework/Logging/CMakeLists.txt b/Framework/Logging/CMakeLists.txt
deleted file mode 100644
index 8aa0abe3cebd3f9c5b18b05a6082d7ca2c36ef61..0000000000000000000000000000000000000000
--- a/Framework/Logging/CMakeLists.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-# create the library
-add_library (CORSIKAlogging INTERFACE)
-
-# namespace of library -> location of header files
-set (
-  CORSIKAlogging_NAMESPACE
-  corsika/logging
-  )
-
-# header files of this library
-set (
-  CORSIKAlogging_HEADERS
-  Logging.h
-  )
-
-# copy the headers into the namespace
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAlogging
-  ${CORSIKAlogging_NAMESPACE}
-  ${CORSIKAlogging_HEADERS}
-  )
-
-# include directive for upstream code
-target_include_directories (
-  CORSIKAlogging
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/>
-  )
-
-# and link against spdlog
-target_link_libraries(
-  CORSIKAlogging
-  INTERFACE
-  spdlog::spdlog
-)
-
-# install library
-install (
-  FILES ${CORSIKAlogging_HEADERS}
-  DESTINATION include/${CORSIKAlogging_NAMESPACE}
-  )
-
-# ----------------
-# code unit testing
-
-CORSIKA_ADD_TEST (testLogging)
-target_link_libraries (
- testLogging
- CORSIKAlogging
- CORSIKAtesting
- )
diff --git a/Framework/Particles/CMakeLists.txt b/Framework/Particles/CMakeLists.txt
deleted file mode 100644
index 96d89ebeb0a3c73ef3b21b44b5e3a2fdb42a5dfb..0000000000000000000000000000000000000000
--- a/Framework/Particles/CMakeLists.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-add_custom_command (
-  OUTPUT  ${PROJECT_BINARY_DIR}/Framework/Particles/GeneratedParticleProperties.inc
-          ${PROJECT_BINARY_DIR}/Framework/Particles/particle_db.pkl
-  COMMAND ${PROJECT_SOURCE_DIR}/Framework/Particles/pdxml_reader.py 
-          ${PROJECT_SOURCE_DIR}/Framework/Particles/ParticleData.xml
-          ${PROJECT_SOURCE_DIR}/Framework/Particles/NuclearData.xml
-          ${PROJECT_SOURCE_DIR}/Framework/Particles/ParticleClassNames.xml
-  DEPENDS pdxml_reader.py
-          ParticleData.xml
-          NuclearData.xml
-          ParticleClassNames.xml
-  WORKING_DIRECTORY
-          ${PROJECT_BINARY_DIR}/Framework/Particles/
-  COMMENT "Read PYTHIA8 particle data and produce C++ source code GeneratedParticleProperties.inc"
-  VERBATIM
-  )
-
-set (
-  PARTICLE_SOURCES
-  ParticleProperties.cc
-  )
-
-# all public header files of library, includes automatic generated file(s)
-set (
-  PARTICLE_HEADERS
-  ParticleProperties.h
-  ${PROJECT_BINARY_DIR}/Framework/Particles/GeneratedParticleProperties.inc # this one is auto-generated
-  )
-
-set (
-  PARTICLE_NAMESPACE
-  corsika/particles
-  )
-
-add_library (CORSIKAparticles STATIC ${PARTICLE_SOURCES})
-
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAparticles ${PARTICLE_NAMESPACE} ${PARTICLE_HEADERS})
-
-# ....................................................
-# since GeneratedParticleProperties.inc is an automatically produced file in the build directory,
-# create a symbolic link into the source tree, so that it can be found and edited more easily
-# this is not needed for the build to succeed! .......
-add_custom_command (
-  OUTPUT  ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedParticleProperties.inc
-  COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_BINARY_DIR}/include/corsika/particles/GeneratedParticleProperties.inc ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedParticleProperties.inc
-  COMMENT "Generate link in source-dir: ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedParticleProperties.inc"
-  )
-add_custom_target (SourceDirLink DEPENDS ${PROJECT_BINARY_DIR}/Framework/Particles/GeneratedParticleProperties.inc)
-add_dependencies (CORSIKAparticles SourceDirLink)
-# .....................................................
-
-target_link_libraries (
-  CORSIKAparticles
-  PUBLIC
-  CORSIKAunits
-  CORSIKAlogging
-  )
-
-set_target_properties (
-  CORSIKAparticles
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  PUBLIC_HEADER "${PARTICLE_HEADERS}"
-  )
-
-target_include_directories (
-  CORSIKAparticles
-  PUBLIC
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include>
-  )
-
-install (
-  FILES
-  ${PARTICLE_HEADERS}
-  DESTINATION
-  include/${PARTICLE_NAMESPACE}
-  )
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testParticles
-  SOURCES
-    testParticles.cc
-    ${PROJECT_BINARY_DIR}/Framework/Particles/GeneratedParticleProperties.inc
-)
-target_link_libraries (
-  testParticles
-  CORSIKAparticles
-  CORSIKAunits
-  CORSIKAtesting
-  )
diff --git a/Framework/Particles/particles.dox b/Framework/Particles/particles.dox
deleted file mode 100644
index 22a36c59f0a752074c076d1fb0f6450f0dff51dd..0000000000000000000000000000000000000000
--- a/Framework/Particles/particles.dox
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
-@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/ProcessSequence/CMakeLists.txt b/Framework/ProcessSequence/CMakeLists.txt
deleted file mode 100644
index 7a75548932875f31f19f4fdd0aab3fbf19cbf867..0000000000000000000000000000000000000000
--- a/Framework/ProcessSequence/CMakeLists.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-add_library (CORSIKAprocesssequence INTERFACE)
-
-#namespace of library->location of header files
-set (
-  CORSIKAprocesssequence_NAMESPACE
-  corsika/process
-  )
-
-#header files of this library
-set (
-  CORSIKAprocesssequence_HEADERS
-  BaseProcess.h
-  BoundaryCrossingProcess.h
-  ContinuousProcess.h
-  SecondariesProcess.h
-  InteractionProcess.h
-  StackProcess.h
-  DecayProcess.h
-  ProcessSequence.h
-  SwitchProcessSequence.h
-  ProcessReturn.h
-  ProcessTraits.h
-  NullModel.h
-  )
-
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAprocesssequence ${CORSIKAprocesssequence_NAMESPACE} ${CORSIKAprocesssequence_HEADERS})
-
-#include directive for upstream code
-target_link_libraries (
-  CORSIKAprocesssequence
-  INTERFACE
-  CORSIKAsetup
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  CORSIKAprocesssequence
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/>
-  )
-
-#install library
-install (
-  FILES ${CORSIKAprocesssequence_HEADERS}
-  DESTINATION include/${CORSIKAprocesssequence_NAMESPACE}
-  )
-  
-target_link_libraries (
-  CORSIKAprocesssequence
-  INTERFACE
-  CORSIKAenvironment
-)
-
-#-- -- -- -- -- -- -- --
-#code unit testing
-CORSIKA_ADD_TEST (testProcessSequence)
-target_link_libraries (
-  testProcessSequence
-  CORSIKAgeometry
-  CORSIKAprocesssequence
-  CORSIKAtesting
-  )
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST (testNullModel)
-target_link_libraries (
-  testNullModel
-  CORSIKAsetup
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAtesting
-  )
-
-# # CORSIKA_ADD_TEST (testSwitchProcessSequence)
-# # target_link_libraries (
-# #   testSwitchProcessSequence
-# #   CORSIKAgeometry
-# #   CORSIKAprocesssequence
-# #   CORSIKAtesting
-# #   )
diff --git a/Framework/ProcessSequence/ProcessSequence.h b/Framework/ProcessSequence/ProcessSequence.h
deleted file mode 100644
index 02a3d062ea09792f9c9e4f40d030bd7fc3c02414..0000000000000000000000000000000000000000
--- a/Framework/ProcessSequence/ProcessSequence.h
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/process/BaseProcess.h>
-#include <corsika/process/ProcessTraits.h>
-#include <corsika/process/BoundaryCrossingProcess.h>
-#include <corsika/process/ContinuousProcess.h>
-#include <corsika/process/DecayProcess.h>
-#include <corsika/process/InteractionProcess.h>
-#include <corsika/process/ProcessReturn.h>
-#include <corsika/process/SecondariesProcess.h>
-#include <corsika/process/StackProcess.h>
-#include <corsika/process/NullModel.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/logging/Logging.h>
-
-#include <cmath>
-#include <limits>
-
-namespace corsika::process {
-
-  /**
-     \class ProcessSequence
-
-     A compile time static list of processes. The compiler will
-     generate a new type based on template logic containing all the
-     elements provided by the user.
-
-     TProcess1 and TProcess2 must both be derived from BaseProcess,
-     and are both references if possible (lvalue), otherwise (rvalue)
-     they are just classes. This allows us to handle both, rvalue as
-     well as lvalue Processes in the ProcessSequence.
-
-     \comment Using CRTP pattern,
-     https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern
-   */
-  template <typename TProcess1, typename TProcess2 = NullModel>
-  class ProcessSequence : public BaseProcess<ProcessSequence<TProcess1, TProcess2>> {
-
-    using TProcess1type = typename std::decay_t<TProcess1>;
-    using TProcess2type = typename std::decay_t<TProcess2>;
-
-    static bool constexpr t1ProcSeq = is_process_sequence_v<TProcess1type>;
-    static bool constexpr t2ProcSeq = is_process_sequence_v<TProcess2type>;
-
-    static bool constexpr t1SwitchProcSeq = is_switch_process_sequence_v<TProcess1type>;
-    static bool constexpr t2SwitchProcSeq = is_switch_process_sequence_v<TProcess2type>;
-
-    // make sure only BaseProcess types TProcess1/2 are passed
-    static_assert(std::is_base_of_v<BaseProcess<TProcess1type>, TProcess1type>,
-                  "can only use process derived from BaseProcess in "
-                  "ProcessSequence, for Process 1");
-    static_assert(std::is_base_of_v<BaseProcess<TProcess2type>, TProcess2type>,
-                  "can only use process derived from BaseProcess in "
-                  "ProcessSequence, for Process 2");
-
-    TProcess1 A_; // this is a reference, if possible
-    TProcess2 B_; // this is a reference, if possible
-
-  public:
-    ProcessSequence(TProcess1 in_A, TProcess2 in_B)
-        : A_(in_A)
-        , B_(in_B) {}
-
-    template <typename TParticle, typename TVTNType>
-    EProcessReturn DoBoundaryCrossing(TParticle& particle, TVTNType const& from,
-                                      TVTNType const& to) {
-      EProcessReturn ret = EProcessReturn::eOk;
-
-      if constexpr (std::is_base_of_v<BoundaryCrossingProcess<TProcess1type>,
-                                      TProcess1type> ||
-                    t1ProcSeq) {
-        ret |= A_.DoBoundaryCrossing(particle, from, to);
-      }
-
-      if constexpr (std::is_base_of_v<BoundaryCrossingProcess<TProcess2type>,
-                                      TProcess2type> ||
-                    t2ProcSeq) {
-        ret |= B_.DoBoundaryCrossing(particle, from, to);
-      }
-
-      return ret;
-    }
-
-    template <typename TParticle, typename TTrack>
-    inline EProcessReturn DoContinuous(TParticle& particle, TTrack& vT) {
-      EProcessReturn ret = EProcessReturn::eOk;
-      if constexpr (std::is_base_of_v<ContinuousProcess<TProcess1type>, TProcess1type> ||
-                    t1ProcSeq) {
-        ret |= A_.DoContinuous(particle, vT);
-      }
-      if constexpr (std::is_base_of_v<ContinuousProcess<TProcess2type>, TProcess2type> ||
-                    t2ProcSeq) {
-        if (!isAbsorbed(ret)) { ret |= B_.DoContinuous(particle, vT); }
-      }
-      return ret;
-    }
-
-    template <typename TSecondaries>
-    inline void DoSecondaries(TSecondaries& vS) {
-      if constexpr (std::is_base_of_v<SecondariesProcess<TProcess1type>, TProcess1type> ||
-                    t1ProcSeq) {
-        A_.DoSecondaries(vS);
-      }
-      if constexpr (std::is_base_of_v<SecondariesProcess<TProcess2type>, TProcess2type> ||
-                    t2ProcSeq) {
-        B_.DoSecondaries(vS);
-      }
-    }
-
-    /**
-       The processes of type StackProcess do have an internal counter,
-       so they can be exectuted only each N steps. Often these are
-       "maintenacne processes" that do not need to run after each
-       single step of the simulations. In the CheckStep function it is
-       tested if either A_ or B_ are StackProcess and if they are due
-       for execution.
-     */
-    inline bool CheckStep() {
-      bool ret = false;
-      if constexpr (std::is_base_of_v<StackProcess<TProcess1type>, TProcess1type> ||
-                    (t1ProcSeq && !t1SwitchProcSeq)) {
-        ret |= A_.CheckStep();
-      }
-      if constexpr (std::is_base_of_v<StackProcess<TProcess2type>, TProcess2type> ||
-                    (t2ProcSeq && !t2SwitchProcSeq)) {
-        ret |= B_.CheckStep();
-      }
-      return ret;
-    }
-
-    /**
-       Execute the StackProcess-es in the ProcessSequence
-     */
-    template <typename TStack>
-    inline void DoStack(TStack& stack) {
-      if constexpr (std::is_base_of_v<StackProcess<TProcess1type>, TProcess1type> ||
-                    (t1ProcSeq && !t1SwitchProcSeq)) {
-        if (A_.CheckStep()) { A_.DoStack(stack); }
-      }
-      if constexpr (std::is_base_of_v<StackProcess<TProcess2type>, TProcess2type> ||
-                    (t2ProcSeq && !t2SwitchProcSeq)) {
-        if (B_.CheckStep()) { B_.DoStack(stack); }
-      }
-    }
-
-    template <typename TParticle, typename TTrack>
-    inline corsika::units::si::LengthType MaxStepLength(TParticle& particle,
-                                                        TTrack& vTrack) {
-      corsika::units::si::LengthType
-          max_length = // if no other process in the sequence implements it
-          std::numeric_limits<double>::infinity() * corsika::units::si::meter;
-
-      if constexpr (std::is_base_of_v<ContinuousProcess<TProcess1type>, TProcess1type> ||
-                    t1ProcSeq) {
-        corsika::units::si::LengthType const len = A_.MaxStepLength(particle, vTrack);
-        max_length = std::min(max_length, len);
-      }
-      if constexpr (std::is_base_of_v<ContinuousProcess<TProcess2type>, TProcess2type> ||
-                    t2ProcSeq) {
-        corsika::units::si::LengthType const len = B_.MaxStepLength(particle, vTrack);
-        max_length = std::min(max_length, len);
-      }
-      return max_length;
-    }
-
-    template <typename TParticle>
-    inline corsika::units::si::GrammageType GetInteractionLength(TParticle&& particle) {
-      return 1. / GetInverseInteractionLength(particle);
-    }
-
-    template <typename TParticle>
-    inline corsika::units::si::InverseGrammageType GetInverseInteractionLength(
-        TParticle&& particle) {
-      using namespace corsika::units::si;
-
-      InverseGrammageType tot = 0 * meter * meter / gram; // default value
-
-      if constexpr (std::is_base_of_v<InteractionProcess<TProcess1type>, TProcess1type> ||
-                    t1ProcSeq) {
-        tot += A_.GetInverseInteractionLength(particle);
-      }
-      if constexpr (std::is_base_of_v<InteractionProcess<TProcess2type>, TProcess2type> ||
-                    t2ProcSeq) {
-        tot += B_.GetInverseInteractionLength(particle);
-      }
-      return tot;
-    }
-
-    template <typename TSecondaryView>
-    inline EProcessReturn SelectInteraction(
-        TSecondaryView& view,
-        [[maybe_unused]] corsika::units::si::InverseGrammageType lambda_inv_select,
-        [[maybe_unused]] corsika::units::si::InverseGrammageType lambda_inv_sum =
-            corsika::units::si::InverseGrammageType::zero()) {
-
-      // TODO: add check for lambda_inv_select>lambda_inv_tot
-
-      if constexpr (t1ProcSeq) {
-        // if A is a process sequence --> check inside
-        const EProcessReturn ret =
-            A_.SelectInteraction(view, lambda_inv_select, lambda_inv_sum);
-        // if A_ did succeed, stop routine. Not checking other static branch B_.
-        if (ret != EProcessReturn::eOk) { return ret; }
-      } else if constexpr (std::is_base_of_v<InteractionProcess<TProcess1type>,
-                                             TProcess1type>) {
-        // if this is not a ContinuousProcess --> evaluate probability
-        const auto particle = view.parent();
-        lambda_inv_sum += A_.GetInverseInteractionLength(particle);
-        // check if we should execute THIS process and then EXIT
-        if (lambda_inv_select <= lambda_inv_sum) {
-          A_.DoInteraction(view);
-          return EProcessReturn::eInteracted;
-        }
-      } // end branch A_
-
-      if constexpr (t2ProcSeq) {
-        // if B_ is a process sequence --> check inside
-        return B_.SelectInteraction(view, lambda_inv_select, lambda_inv_sum);
-      } else if constexpr (std::is_base_of_v<InteractionProcess<TProcess2type>,
-                                             TProcess2type>) {
-        // if this is not a ContinuousProcess --> evaluate probability
-        lambda_inv_sum += B_.GetInverseInteractionLength(view.parent());
-        // check if we should execute THIS process and then EXIT
-        if (lambda_inv_select <= lambda_inv_sum) {
-          B_.DoInteraction(view);
-          return EProcessReturn::eInteracted;
-        }
-      } // end branch B_
-      return EProcessReturn::eOk;
-    }
-
-    template <typename TParticle>
-    inline corsika::units::si::TimeType GetLifetime(TParticle& particle) {
-      return 1. / GetInverseLifetime(particle);
-    }
-
-    template <typename TParticle>
-    inline corsika::units::si::InverseTimeType GetInverseLifetime(TParticle&& particle) {
-      using namespace corsika::units::si;
-
-      corsika::units::si::InverseTimeType tot = 0 / second; // default value
-
-      if constexpr (std::is_base_of_v<DecayProcess<TProcess1type>, TProcess1type> ||
-                    t1ProcSeq) {
-        tot += A_.GetInverseLifetime(particle);
-      }
-      if constexpr (std::is_base_of_v<DecayProcess<TProcess2type>, TProcess2type> ||
-                    t2ProcSeq) {
-        tot += B_.GetInverseLifetime(particle);
-      }
-      return tot;
-    }
-
-    // select decay process
-    template <typename TSecondaryView>
-    inline EProcessReturn SelectDecay(
-        TSecondaryView& view,
-        [[maybe_unused]] corsika::units::si::InverseTimeType decay_inv_select,
-        [[maybe_unused]] corsika::units::si::InverseTimeType decay_inv_sum =
-            corsika::units::si::InverseTimeType::zero()) {
-
-      // TODO: add check for decay_inv_select>decay_inv_tot
-
-      if constexpr (t1ProcSeq) {
-        // if A_ is a process sequence --> check inside
-        const EProcessReturn ret = A_.SelectDecay(view, decay_inv_select, decay_inv_sum);
-        // if A_ did succeed, stop routine here (not checking other static branch B_)
-        if (ret != EProcessReturn::eOk) { return ret; }
-      } else if constexpr (std::is_base_of_v<DecayProcess<TProcess1type>,
-                                             TProcess1type>) {
-        // if this is not a ContinuousProcess --> evaluate probability
-        decay_inv_sum += A_.GetInverseLifetime(view.parent());
-        // check if we should execute THIS process and then EXIT
-        if (decay_inv_select <= decay_inv_sum) { // more pedagogical: rndm_select <
-                                                 // decay_inv_sum / decay_inv_tot
-          A_.DoDecay(view);
-          return EProcessReturn::eDecayed;
-        }
-      } // end branch A_
-
-      if constexpr (t2ProcSeq) {
-        // if B_ is a process sequence --> check inside
-        return B_.SelectDecay(view, decay_inv_select, decay_inv_sum);
-      } else if constexpr (std::is_base_of_v<DecayProcess<TProcess2type>,
-                                             TProcess2type>) {
-        // if this is not a ContinuousProcess --> evaluate probability
-        decay_inv_sum += B_.GetInverseLifetime(view.parent());
-        // check if we should execute THIS process and then EXIT
-        if (decay_inv_select <= decay_inv_sum) {
-          B_.DoDecay(view);
-          return EProcessReturn::eDecayed;
-        }
-      } // end branch B_
-      return EProcessReturn::eOk;
-    }
-  };
-
-  /**
-   * \function sequence
-   *
-   * to construct ProcessSequences in a flexible and dynamic way the
-   * `sequence` factory functions are provided
-   *
-   * Any objects of type
-   *  - BaseProcess,
-   *  - ContinuousProcess, and
-   *  - Interaction/DecayProcess,
-   *  - StackProcess,
-   *  - SecondariesProcess
-   * can be assembled into a ProcessSequence, all
-   * combinatorics are allowed.
-
-   * The sequence function checks that all its arguments are all of
-   * types derived from BaseProcess. Also the ProcessSequence itself
-   * is derived from type BaseProcess
-   **/
-
-  template <typename... TProcesses, typename TProcess1>
-  inline typename std::enable_if_t<
-      std::is_base_of_v<BaseProcess<typename std::decay_t<TProcess1>>,
-                        typename std::decay_t<TProcess1>>,
-      ProcessSequence<TProcess1, decltype(sequence(std::declval<TProcesses>()...))>>
-  sequence(TProcess1&& vA, TProcesses&&... vBs) {
-    return ProcessSequence<TProcess1, decltype(sequence(std::declval<TProcesses>()...))>(
-        vA, sequence(std::forward<TProcesses>(vBs)...));
-  }
-
-  template <typename TProcess1, typename TProcess2>
-  inline typename std::enable_if_t<
-      std::is_base_of_v<BaseProcess<typename std::decay_t<TProcess1>>,
-                        typename std::decay_t<TProcess1>> &&
-          std::is_base_of_v<BaseProcess<typename std::decay_t<TProcess2>>,
-                            typename std::decay_t<TProcess2>>,
-      ProcessSequence<TProcess1, TProcess2>>
-  sequence(TProcess1&& vA, TProcess2&& vB) {
-    return ProcessSequence<TProcess1, TProcess2>(vA, vB);
-  }
-
-  /**
-   * also allow a single Process in ProcessSequence, accompany by
-   * `NullModel`
-   **/
-  template <typename TProcess>
-  inline typename std::enable_if_t<
-      std::is_base_of_v<BaseProcess<typename std::decay_t<TProcess>>,
-                        typename std::decay_t<TProcess>>,
-      ProcessSequence<TProcess, NullModel>>
-  sequence(TProcess&& vA) {
-    return ProcessSequence<TProcess, NullModel>(vA, NullModel());
-  }
-
-  /**
-   * traits marker to identify objectas ProcessSequence
-   **/
-  template <typename TProcess1, typename TProcess2>
-  struct is_process_sequence<ProcessSequence<TProcess1, TProcess2>> : std::true_type {
-    // only switch on for BaseProcesses
-    template <typename std::enable_if_t<
-        std::is_base_of_v<BaseProcess<typename std::decay_t<TProcess1>>,
-                          typename std::decay_t<TProcess1>> &&
-            std::is_base_of_v<BaseProcess<typename std::decay_t<TProcess2>>,
-                              typename std::decay_t<TProcess2>>,
-        int>>
-    is_process_sequence() {}
-  };
-
-  /**
-   * traits marker to identify objects containing any StackProcesses
-   **/
-  namespace detail {
-    // need helper alias to achieve this:
-    template <typename TProcess1, typename TProcess2,
-              typename = typename std::enable_if_t<
-                  contains_stack_process_v<TProcess1> ||
-                      std::is_base_of_v<StackProcess<typename std::decay_t<TProcess1>>,
-                                        typename std::decay_t<TProcess1>> ||
-                      contains_stack_process_v<TProcess2> ||
-                      std::is_base_of_v<StackProcess<typename std::decay_t<TProcess2>>,
-                                        typename std::decay_t<TProcess2>>,
-                  int>>
-    using enable_if_stack = ProcessSequence<TProcess1, TProcess2>;
-  } // namespace detail
-
-  template <typename TProcess1, typename TProcess2>
-  struct contains_stack_process<detail::enable_if_stack<TProcess1, TProcess2>>
-      : std::true_type {};
-
-} // namespace corsika::process
diff --git a/Framework/Random/CMakeLists.txt b/Framework/Random/CMakeLists.txt
deleted file mode 100644
index f909f77f1f32c88f77a52482839af3cf43e2949a..0000000000000000000000000000000000000000
--- a/Framework/Random/CMakeLists.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-set (
-  CORSIKArandom_SOURCES
-  RNGManager.cc
-  )
-
-set (
-  CORSIKArandom_HEADERS
-  RNGManager.h
-  UniformRealDistribution.h
-  ExponentialDistribution.h
-  )
-
-set (
-  CORSIKArandom_NAMESPACE
-  corsika/random
-  )
-
-add_library (CORSIKArandom STATIC ${CORSIKArandom_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKArandom ${CORSIKArandom_NAMESPACE} ${CORSIKArandom_HEADERS})
-
-target_link_libraries (
-  CORSIKArandom
-  CORSIKAutilities
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  CORSIKArandom
-  PUBLIC
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/>
-  )
-
-# target dependencies on other libraries (also the header onlys)
-# none
-
-install (
-  TARGETS CORSIKArandom
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  PUBLIC_HEADER DESTINATION include/${CORSIKArandom_NAMESPACE}
-  )
-
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testRandom)
-target_link_libraries (
-  testRandom
-  CORSIKArandom
-  CORSIKAtesting
-  CORSIKAunits
-  )
diff --git a/Framework/Random/RNGManager.cc b/Framework/Random/RNGManager.cc
deleted file mode 100644
index 8bbcf15dd391a744d69e017f7570e5163a0308a2..0000000000000000000000000000000000000000
--- a/Framework/Random/RNGManager.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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/random/RNGManager.h>
-#include <corsika/logging/Logging.h>
-
-#include <sstream>
-
-void corsika::random::RNGManager::RegisterRandomStream(std::string const& pStreamName) {
-  corsika::random::RNG rng;
-
-  if (auto const& it = seeds.find(pStreamName); it != seeds.end()) {
-    rng.seed(it->second);
-  }
-
-  rngs[pStreamName] = std::move(rng);
-}
-
-corsika::random::RNG& corsika::random::RNGManager::GetRandomStream(
-    std::string const& pStreamName) {
-  if (IsRegistered(pStreamName)) {
-    return rngs.at(pStreamName);
-  } else { // this stream name is not in the map
-    throw std::runtime_error("'" + pStreamName + "' is not a registered stream.");
-  }
-}
-
-bool corsika::random::RNGManager::IsRegistered(std::string const& pStreamName) const {
-  return rngs.count(pStreamName) > 0;
-}
-
-std::stringstream corsika::random::RNGManager::dumpState() const {
-  std::stringstream buffer;
-  for (auto const& [streamName, rng] : rngs) {
-    buffer << '"' << streamName << "\" = \"" << rng << '"' << std::endl;
-  }
-
-  return buffer;
-}
-
-void corsika::random::RNGManager::SeedAll(uint64_t vSeed) {
-  for (auto& entry : rngs) {
-    auto seed = vSeed++;
-    C8LOG_TRACE("Random seed stream {} seed {}", entry.first, seed);
-    entry.second.seed(seed);
-  }
-}
-
-void corsika::random::RNGManager::SeedAll() {
-  std::random_device rd;
-  std::seed_seq sseq{rd(), rd(), rd(), rd(), rd(), rd()};
-  for (auto& entry : rngs) {
-    std::vector<std::uint32_t> seeds(1);
-    sseq.generate(seeds.begin(), seeds.end());
-    std::uint32_t seed = seeds[0];
-    C8LOG_TRACE("Random seed stream {} seed {}", entry.first, seed);
-    entry.second.seed(seed);
-  }
-}
diff --git a/Framework/StackInterface/CMakeLists.txt b/Framework/StackInterface/CMakeLists.txt
deleted file mode 100644
index 956f1873b6f8781c426ab4ee52d31fac80c72e6f..0000000000000000000000000000000000000000
--- a/Framework/StackInterface/CMakeLists.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-set (
-  CORSIKAstackinterface_HEADERS
-  ParticleBase.h
-  StackIteratorInterface.h
-  Stack.h
-  SecondaryView.h
-  CombinedStack.h
-  )
-
-set (
-  CORSIKAstackinterface_NAMESPACE
-  corsika/stack
-  )
-
-add_library (
-  CORSIKAstackinterface
-  INTERFACE
-  )
-
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (
-  CORSIKAstackinterface ${CORSIKAstackinterface_NAMESPACE} ${CORSIKAstackinterface_HEADERS}
-  )
-
-target_link_libraries (
-  CORSIKAstackinterface
-  INTERFACE
-  CORSIKAlogging
-  CORSIKAsetup  
-  )
-
-target_include_directories (
-  CORSIKAstackinterface
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include>
-  )
-
-install (
-  FILES ${CORSIKAstackinterface_HEADERS}
-  DESTINATION include/${CORSIKAstackinterface_NAMESPACE}
-  )
-
-#code testing
-CORSIKA_ADD_TEST(testStackInterface)
-target_link_libraries (testStackInterface CORSIKAstackinterface CORSIKAtesting)
-
-CORSIKA_ADD_TEST(testSecondaryView)
-target_link_libraries (testSecondaryView CORSIKAstackinterface CORSIKAtesting)
-
-CORSIKA_ADD_TEST(testCombinedStack)
-target_link_libraries (testCombinedStack CORSIKAstackinterface CORSIKAtesting)
diff --git a/Framework/StackInterface/Stack.dox b/Framework/StackInterface/Stack.dox
deleted file mode 100644
index 8ac29c628c08a5c2a65ad8831d762b9b67c830e7..0000000000000000000000000000000000000000
--- a/Framework/StackInterface/Stack.dox
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
-  @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/Testing/CMakeLists.txt b/Framework/Testing/CMakeLists.txt
deleted file mode 100644
index 0c616e186861468c4b920a5c1387fec055904229..0000000000000000000000000000000000000000
--- a/Framework/Testing/CMakeLists.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-set (
-  TESTING_SOURCES
-  TestMain.cc
-  )
-
-set (
-  TESTING_HEADERS
-  )
-
-set (
-  TESTING_NAMESPACE
-  corsika/testing
-  )
-
-add_library (CORSIKAtesting STATIC ${TESTING_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAtesting ${TESTING_NAMESPACE} ${TESTING_HEADERS})
-
-set_target_properties (
-  CORSIKAtesting
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  PUBLIC_HEADER "${TESTING_HEADERS}"
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  CORSIKAtesting
-  CORSIKAthirdparty
-  )
-
-# target_include_directories (
-#  CORSIKAtesting
-#  SYSTEM
-#  PUBLIC    ${CATCH2_INCLUDE_DIR}
-#  INTERFACE ${CATCH2_INCLUDE_DIR}
-#  )
-
-target_include_directories (
-  CORSIKAtesting
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS CORSIKAtesting
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  PUBLIC_HEADER DESTINATION include/${TESTING_NAMESPACE}
-  )
-
diff --git a/Framework/Units/CMakeLists.txt b/Framework/Units/CMakeLists.txt
deleted file mode 100644
index 8386ae0264d3e5fc0f6cd63cc1617f2c82f7c6e9..0000000000000000000000000000000000000000
--- a/Framework/Units/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-add_library (CORSIKAunits INTERFACE)
-
-set (CORSIKAunits_NAMESPACE corsika/units)
-set (
-  CORSIKAunits_HEADERS
-  PhysicalUnits.h
-  PhysicalConstants.h
-  )
-
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAunits ${CORSIKAunits_NAMESPACE} ${CORSIKAunits_HEADERS})
-
-target_include_directories (CORSIKAunits
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/ThirdParty>
-  $<INSTALL_INTERFACE:include>
-  )
-
-install (FILES ${CORSIKAunits_HEADERS} DESTINATION include/${CORSIKAunits_NAMESPACE})
-
-# code testing
-CORSIKA_ADD_TEST (testUnits)
-target_link_libraries (testUnits CORSIKAunits CORSIKAtesting)
diff --git a/Framework/Utilities/CMakeLists.txt b/Framework/Utilities/CMakeLists.txt
deleted file mode 100644
index 3373c01718f97a8676ca0b5c5166710d2861e68f..0000000000000000000000000000000000000000
--- a/Framework/Utilities/CMakeLists.txt
+++ /dev/null
@@ -1,118 +0,0 @@
-#
-# cfenv feature test - select implementation to use
-#
-try_compile (HAS_FEENABLEEXCEPT "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/try_feenableexcept.cc")
-if (HAS_FEENABLEEXCEPT)
-  set (CORSIKA_FENV "CorsikaFenvDefault.cc")
-  set_property(DIRECTORY ${CMAKE_HOME_DIRECTORY} APPEND PROPERTY COMPILE_DEFINITIONS "HAS_FEENABLEEXCEPT")
-else ()
-  if (APPLE)
-    set (CORSIKA_FENV "CorsikaFenvOSX.cc")
-  else()
-    set (CORSIKA_FENV "CorsikaFenvFallback.cc")
-  endif()
-endif ()
-
-#
-# library setup
-#
-set (
-  UTILITIES_SOURCES  
-  COMBoost.cc
-  CorsikaData.cc
-  quartic.cpp
-  ${CORSIKA_FENV})
-
-set (
-  UTILITIES_HEADERS
-  CorsikaData.h
-  COMBoost.h
-  Bit.h
-  Singleton.h
-  sgn.h
-  CorsikaFenv.h
-  MetaProgramming.h
-  quartic.h
-  )
-
-set (
-  UTILITIES_DEPENDS
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAlogging
-  C8::ext::boost # so far only for MetaProgramming
-  C8::ext::eigen3 # for COMboost
-  )
-
-if (TARGET cnpy)
-  LIST (APPEND
-    UTILITIES_HEADERS
-    SaveBoostHistogram.hpp
-    )
-  LIST (APPEND
-    UTILITIES_DEPENDS
-    cnpy # for SaveBoostHistogram
-    )
-endif (TARGET cnpy)
-  
-set (
-  UTILITIES_NAMESPACE
-  corsika/utl
-  )
-
-add_library (CORSIKAutilities STATIC ${UTILITIES_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAutilities ${UTILITIES_NAMESPACE} ${UTILITIES_HEADERS})
-
-set_target_properties (
-  CORSIKAutilities
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  PUBLIC_HEADER "${UTILITIES_HEADERS}"
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  CORSIKAutilities
-  ${UTILITIES_DEPENDS}
-  )
-
-target_include_directories (
-  CORSIKAutilities
-  PUBLIC
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS CORSIKAutilities
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  PUBLIC_HEADER DESTINATION include/${UTILITIES_NAMESPACE}
-  )
-
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testCOMBoost)
-target_link_libraries (
-  testCOMBoost
-  CORSIKAutilities
-  CORSIKAtesting
-  )
-
-CORSIKA_ADD_TEST(testCorsikaFenv)
-target_link_libraries (
-  testCorsikaFenv
-  CORSIKAutilities
-  CORSIKAtesting
-)
-
-if (TARGET cnpy)
-  CORSIKA_ADD_TEST(testSaveBoostHistogram)
-  target_link_libraries (
-    testSaveBoostHistogram
-    CORSIKAutilities
-    CORSIKAtesting
-    )
-endif (TARGET cnpy)
diff --git a/Framework/Utilities/COMBoost.h b/Framework/Utilities/COMBoost.h
deleted file mode 100644
index 73b7c93001321dff22902477dc701aee043e9040..0000000000000000000000000000000000000000
--- a/Framework/Utilities/COMBoost.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/geometry/CoordinateSystem.h>
-#include <corsika/geometry/FourVector.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/logging/Logging.h>
-
-#include <Eigen/Dense>
-
-namespace corsika::utl {
-
-  /**
-     This utility class handles Lorentz boost between different
-     referenence frames, using FourVectors.
-   */
-
-  class COMBoost {
-    Eigen::Matrix2d boost_, inverseBoost_;
-    corsika::geometry::CoordinateSystem const &originalCS_, rotatedCS_;
-
-    void setBoost(double coshEta, double sinhEta);
-
-  public:
-    //! construct a COMBoost given four-vector of projectile and mass of target
-    COMBoost(
-        const corsika::geometry::FourVector<
-            corsika::units::si::HEPEnergyType,
-            corsika::geometry::Vector<corsika::units::si::hepmomentum_d>>& Pprojectile,
-        const corsika::units::si::HEPEnergyType massTarget);
-
-    //! construct a COMBoost to boost into the rest frame given a 3-momentum and mass
-    COMBoost(geometry::Vector<units::si::hepmomentum_d> const& momentum,
-             units::si::HEPEnergyType mass);
-
-    //! transforms a 4-momentum from lab frame to the center-of-mass frame
-    template <typename FourVector>
-    FourVector toCoM(const FourVector& p) const {
-      using namespace corsika::units::si;
-      auto pComponents = p.GetSpaceLikeComponents().GetComponents(rotatedCS_);
-      Eigen::Vector3d eVecRotated = pComponents.eVector;
-      Eigen::Vector2d lab;
-
-      lab << (p.GetTimeLikeComponent() * (1 / 1_GeV)),
-          (eVecRotated(2) * (1 / 1_GeV).magnitude());
-
-      auto const boostedZ = boost_ * lab;
-      auto const E_CoM = boostedZ(0) * 1_GeV;
-
-      eVecRotated(2) = boostedZ(1) * (1_GeV).magnitude();
-
-      return FourVector(
-          E_CoM, corsika::geometry::Vector<hepmomentum_d>(rotatedCS_, eVecRotated));
-    }
-
-    //! transforms a 4-momentum from the center-of-mass frame back to lab frame
-    template <typename FourVector>
-    FourVector fromCoM(const FourVector& p) const {
-      using namespace corsika::units::si;
-      auto pCM = p.GetSpaceLikeComponents().GetComponents(rotatedCS_);
-      auto const Ecm = p.GetTimeLikeComponent();
-
-      Eigen::Vector2d com;
-      com << (Ecm * (1 / 1_GeV)), (pCM.eVector(2) * (1 / 1_GeV).magnitude());
-
-      C8LOG_TRACE(
-          "COMBoost::fromCoM Ecm={} GeV"
-          " pcm={} GeV (norm = {} GeV), invariant mass={} GeV",
-          Ecm / 1_GeV, pCM / 1_GeV, pCM.norm() / 1_GeV, p.GetNorm() / 1_GeV);
-
-      auto const boostedZ = inverseBoost_ * com;
-      auto const E_lab = boostedZ(0) * 1_GeV;
-
-      pCM.eVector(2) = boostedZ(1) * (1_GeV).magnitude();
-
-      geometry::Vector<typename decltype(pCM)::dimension> pLab{rotatedCS_, pCM};
-      pLab.rebase(originalCS_);
-
-      FourVector f(E_lab, pLab);
-
-      C8LOG_TRACE("COMBoost::fromCoM --> Elab={} GeV",
-                  " plab={} GeV (norm={} GeV) "
-                  " GeV), invariant mass = {}",
-                  E_lab / 1_GeV, f.GetNorm() / 1_GeV, pLab.GetComponents(),
-                  pLab.norm() / 1_GeV);
-
-      return f;
-    }
-
-    geometry::CoordinateSystem const& GetRotatedCS() const;
-  };
-} // namespace corsika::utl
diff --git a/Processes/CMakeLists.txt b/Processes/CMakeLists.txt
deleted file mode 100644
index 63e66a331dfd12c2f3965933db81979fb1931e8a..0000000000000000000000000000000000000000
--- a/Processes/CMakeLists.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-# general
-add_subdirectory (AnalyticProcessors)
-add_subdirectory (ExampleProcessors)
-
-# tracking
-add_subdirectory (Tracking)
-add_subdirectory (TrackingLine)
-add_subdirectory (TrackingLeapFrogStraight)
-add_subdirectory (TrackingLeapFrogCurved)
-# hadron interaction models
-add_subdirectory (Sibyll)
-add_subdirectory (QGSJetII)
-if (Pythia8_FOUND)
-  add_subdirectory (Pythia)
-endif (Pythia8_FOUND)
-if (CONEX_FOUND)
-  add_subdirectory (CONEXSourceCut)
-endif (CONEX_FOUND)
-add_subdirectory (HadronicElasticModel)
-add_subdirectory (UrQMD)
-add_subdirectory (Proposal)
-
-# continuous physics
-add_subdirectory (EnergyLoss)
-add_subdirectory (LongitudinalProfile)
-add_subdirectory (TrackWriter)
-add_subdirectory (ObservationPlane)
-# stack processes
-add_subdirectory (StackInspector)
-# secondaries process
-# cuts, thinning, etc.
-add_subdirectory (ParticleCut)
-add_subdirectory (OnShellCheck)
-# meta-processes
-add_subdirectory (InteractionCounter)
-
-
-##########################################
-# add_custom_target(CORSIKAprocesses)
-add_library (CORSIKAprocesses INTERFACE)
-add_dependencies (CORSIKAprocesses ProcessSibyll)
-add_dependencies (CORSIKAprocesses ProcessProposal)
-if (Pythia8_FOUND)
-  add_dependencies (CORSIKAprocesses ProcessPythia8)
-endif (Pythia8_FOUND)
-add_dependencies (CORSIKAprocesses ProcessStackInspector)
-add_dependencies (CORSIKAprocesses ProcessTrackingLine)
-add_dependencies (CORSIKAprocesses ProcessEnergyLoss)
-add_dependencies (CORSIKAprocesses ProcessUrQMD)
-add_dependencies (CORSIKAprocesses ProcessParticleCut)
-add_dependencies (CORSIKAprocesses ProcessOnShellCheck)
diff --git a/Processes/EnergyLoss/CMakeLists.txt b/Processes/EnergyLoss/CMakeLists.txt
deleted file mode 100644
index 3df3978d5fdb4a23b3548e5c68b8a55f6c11f4d8..0000000000000000000000000000000000000000
--- a/Processes/EnergyLoss/CMakeLists.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-set (
-  MODEL_SOURCES
-  EnergyLoss.cc
-  )
-
-set (
-  MODEL_HEADERS
-  EnergyLoss.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/energy_loss
-  )
-
-add_library (ProcessEnergyLoss STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessEnergyLoss ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-set_target_properties (
-  ProcessEnergyLoss
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-#  PUBLIC_HEADER "${MODEL_HEADERS}"
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessEnergyLoss
-  CORSIKAunits
-  CORSIKAparticles
-  CORSIKAgeometry
-  CORSIKAenvironment
-  CORSIKAsetup
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  ProcessEnergyLoss 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessEnergyLoss
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-#  PUBLIC_HEADER DESTINATION include/${MODEL_NAMESPACE}
-  )
-
-
-# --------------------
-# code unit testing
-#CORSIKA_ADD_TEST (testNullModel testNullModel.cc)
-#target_link_libraries (
-#  testNullModel  ProcessNullModel
-#  CORSIKAsetup
-#  CORSIKAgeometry
-#  CORSIKAunits
-#  CORSIKAthirdparty # for catch2
-#  )
-
diff --git a/Processes/EnergyLoss/EnergyLoss.cc b/Processes/EnergyLoss/EnergyLoss.cc
deleted file mode 100644
index 66c8a76e24858c08431c15a8a5c4995c72096fce..0000000000000000000000000000000000000000
--- a/Processes/EnergyLoss/EnergyLoss.cc
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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/process/energy_loss/EnergyLoss.h>
-
-#include <corsika/particles/ParticleProperties.h>
-
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-
-#include <corsika/logging/Logging.h>
-
-#include <corsika/geometry/Line.h>
-
-#include <cmath>
-#include <fstream>
-#include <iostream>
-#include <limits>
-#include <numeric>
-
-using namespace std;
-
-using namespace corsika;
-using namespace corsika::units::si;
-using SetupParticle = corsika::setup::Stack::ParticleType;
-using SetupTrack = corsika::setup::Trajectory;
-
-using namespace corsika::process::energy_loss;
-
-EnergyLoss::EnergyLoss(environment::ShowerAxis const& shower_axis,
-                       corsika::units::si::HEPEnergyType emCut)
-    : shower_axis_(shower_axis)
-    , emCut_(emCut)
-    , profile_(int(shower_axis.maximumX() / dX_) + 1) {}
-
-auto elab2plab = [](HEPEnergyType Elab, HEPMassType m) {
-  return sqrt((Elab - m) * (Elab + m));
-};
-
-/**
- *   PDG2018, passage of particles through matter
- *
- * Note, that \f$I_{\mathrm{eff}}\f$ of composite media a determined from \f$ \ln I =
- * \sum_i a_i \ln(I_i) \f$ where \f$ a_i \f$ is the fraction of the electron population
- * (\f$\sim Z_i\f$) of the \f$i\f$-th element. This can also be used for shell
- * corrections or density effects.
- *
- * The \f$I_{\mathrm{eff}}\f$ of compounds is not better than a few percent, if not
- * measured explicitly.
- *
- * For shell correction, see Sec 6 of https://www.nap.edu/read/20066/chapter/8#115
- *
- */
-HEPEnergyType EnergyLoss::BetheBloch(SetupParticle const& p, GrammageType const dX) {
-
-  // all these are material constants and have to come through Environment
-  // right now: values for nitrogen_D
-  // 7 nitrogen_gas 82.0 0.49976 D E 0.0011653 0.0 1.7378 4.1323 0.15349 3.2125 10.54
-  auto Ieff = 82.0_eV;
-  [[maybe_unused]] auto Zmat = 7;
-  auto ZoverA = 0.49976_mol / 1_g;
-  const double x0 = 1.7378;
-  const double x1 = 4.1323;
-  const double Cbar = 10.54;
-  const double delta0 = 0.0;
-  const double aa = 0.15349;
-  const double sk = 3.2125;
-  // end of material constants
-
-  // this is the Bethe-Bloch coefficiet 4pi N_A r_e^2 m_e c^2
-  auto constexpr K = 0.307075_MeV / 1_mol * square(1_cm);
-  HEPEnergyType const E = p.GetEnergy();
-  HEPMassType const m = p.GetMass();
-  double const gamma = E / m;
-  int const Z = p.GetChargeNumber();
-  int const Z2 = Z * Z;
-  HEPMassType constexpr me = particles::Electron::GetMass();
-  auto const m2 = m * m;
-  auto constexpr me2 = me * me;
-  double const gamma2 = gamma * gamma;
-
-  double const beta2 = (gamma2 - 1) / gamma2; // 1-1/gamma2    (1-1/gamma)*(1+1/gamma);
-                                              // (gamma_2-1)/gamma_2 = (1-1/gamma2);
-  double constexpr c2 = 1;                    // HEP convention here c=c2=1
-  C8LOG_DEBUG("BetheBloch beta2={}, gamma2={}", beta2, gamma2);
-  [[maybe_unused]] double const eta2 = beta2 / (1 - beta2);
-  HEPMassType const Wmax =
-      2 * me * c2 * beta2 * gamma2 / (1 + 2 * gamma * me / m + me2 / m2);
-  // approx, but <<1%    HEPMassType const Wmax = 2*me*c2*beta2*gamma2;      for HEAVY
-  // PARTICLES Wmax ~ 2me v2 for non-relativistic particles
-  C8LOG_DEBUG("BetheBloch Wmax={}", Wmax);
-
-  // Sternheimer parameterization, density corrections towards high energies
-  // NOTE/TODO: when Cbar is 0 it needs to be approximated from parameterization ->
-  // MISSING
-  C8LOG_DEBUG("BetheBloch p.GetMomentum().GetNorm()/m{}=", p.GetMomentum().GetNorm() / m);
-  double const x = log10(p.GetMomentum().GetNorm() / m);
-  double delta = 0;
-  if (x >= x1) {
-    delta = 2 * (log(10)) * x - Cbar;
-  } else if (x < x1 && x >= x0) {
-    delta = 2 * (log(10)) * x - Cbar + aa * pow((x1 - x), sk);
-  } else if (x < x0) { // and IF conductor (otherwise, this is 0)
-    delta = delta0 * pow(100, 2 * (x - x0));
-  }
-  C8LOG_DEBUG("BetheBloch delta={}", delta);
-
-  // with further low energies correction, accurary ~1% down to beta~0.05 (1MeV for p)
-
-  // shell correction, <~100MeV
-  // need more clarity about formulas and units
-  const double Cadj = 0;
-  /*
-  // https://www.nap.edu/read/20066/chapter/8#104
-  HEPEnergyType Iadj = 12_eV * Z + 7_eV;  // Iadj<163eV
-  if (Iadj>=163_eV)
-    Iadj = 9.76_eV * Z + 58.8_eV * pow(Z, -0.19);  // Iadj>=163eV
-  double const Cadj = (0.422377/eta2 + 0.0304043/(eta2*eta2) -
-  0.00038106/(eta2*eta2*eta2)) * 1e-6 * Iadj*Iadj + (3.858019/eta2 -
-  0.1667989/(eta2*eta2) + 0.00157955/(eta2*eta2*eta2)) * 1e-9 * Iadj*Iadj*Iadj;
-  */
-
-  // Barkas correction O(Z3) higher-order Born approximation
-  // see Appl. Phys. 85 (1999) 1249
-  // double A = 1;
-  // if (p.GetPID() == particles::Code::Nucleus) A = p.GetNuclearA();
-  // double const Erel = (p.GetEnergy()-p.GetMass()) / A / 1_keV;
-  // double const Llow = 0.01 * Erel;
-  // double const Lhigh = 1.5/pow(Erel, 0.4) + 45000./Zmat * pow(Erel, 1.6);
-  // double const barkas = Z * Llow*Lhigh/(Llow+Lhigh); // RU, I think the Z was
-  // missing...
-  double const barkas = 1; // does not work yet
-
-  // Bloch correction for O(Z4) higher-order Born approximation
-  // see Appl. Phys. 85 (1999) 1249
-  const double alpha = 1. / 137.035999173;
-  double const y2 = Z * Z * alpha * alpha / beta2;
-  double const bloch = -y2 * (1.202 - y2 * (1.042 - 0.855 * y2 + 0.343 * y2 * y2));
-
-  double const aux = 2 * me * c2 * beta2 * gamma2 * Wmax / (Ieff * Ieff);
-  return -K * Z2 * ZoverA / beta2 *
-         (0.5 * log(aux) - beta2 - Cadj / Z - delta / 2 + barkas + bloch) * dX;
-}
-
-// radiation losses according to PDG 2018, ch. 33 ref. [5]
-HEPEnergyType EnergyLoss::RadiationLosses(SetupParticle const& vP,
-                                          GrammageType const vDX) {
-  // simple-minded hard-coded value for b(E) inspired by data from
-  // http://pdg.lbl.gov/2018/AtomicNuclearProperties/ for N and O.
-  auto constexpr b = 3.0 * 1e-6 * square(1_cm) / 1_g;
-  return -vP.GetEnergy() * b * vDX;
-}
-
-HEPEnergyType EnergyLoss::TotalEnergyLoss(SetupParticle const& vP,
-                                          GrammageType const vDX) {
-  return BetheBloch(vP, vDX) + RadiationLosses(vP, vDX);
-}
-
-process::EProcessReturn EnergyLoss::DoContinuous(SetupParticle& p, SetupTrack const& t) {
-  if (p.GetChargeNumber() == 0) return process::EProcessReturn::eOk;
-
-  GrammageType const dX =
-      p.GetNode()->GetModelProperties().IntegratedGrammage(t, t.GetLength());
-  C8LOG_DEBUG("EnergyLoss pid={}, z={}, dX={} g/cm2", p.GetPID(), p.GetChargeNumber(),
-              dX / 1_g * square(1_cm));
-  HEPEnergyType dE = TotalEnergyLoss(p, dX);
-  auto E = p.GetEnergy();
-  [[maybe_unused]] const auto Ekin = E - p.GetMass();
-  auto Enew = E + dE;
-  C8LOG_DEBUG("EnergyLoss  dE={} MeV, E={} GeV, Ekin={} GeV, Enew={} GeV", dE / 1_MeV,
-              E / 1_GeV, Ekin / 1_GeV, Enew / 1_GeV);
-  p.SetEnergy(Enew);
-  MomentumUpdate(p, Enew);
-  FillProfile(t, dE);
-  return process::EProcessReturn::eOk;
-}
-
-LengthType EnergyLoss::MaxStepLength(SetupParticle const& vParticle,
-                                     SetupTrack const& vTrack) const {
-  if (vParticle.GetChargeNumber() == 0) {
-    return units::si::meter * std::numeric_limits<double>::infinity();
-  }
-
-  auto constexpr dX = 1_g / square(1_cm);
-  auto const dEdX = -TotalEnergyLoss(vParticle, dX) / dX; // dE > 0
-  //~ auto const Ekin = vParticle.GetEnergy() - vParticle.GetMass();
-
-  // in any case: never go below 0.99*emCut_ This needs to be
-  // slightly smaller than emCut_ since, either this Step is limited
-  // by energy_lim, then the particle is stopped in a very short
-  // range (before doing anythin else) and is then removed
-  // instantly. The exact position where it reaches emCut is not
-  // important, the important fact is that its E_kin is zero
-  // afterwards.
-  //
-  const auto energy = vParticle.GetEnergy();
-  auto energy_lim = std::max(0.9 * energy, 0.99 * emCut_);
-
-  auto const maxGrammage = (energy - energy_lim) / dEdX;
-
-  return vParticle.GetNode()->GetModelProperties().ArclengthFromGrammage(vTrack,
-                                                                         maxGrammage);
-}
-
-void EnergyLoss::MomentumUpdate(corsika::setup::Stack::ParticleType& vP,
-                                corsika::units::si::HEPEnergyType Enew) {
-  HEPMomentumType Pnew = elab2plab(Enew, vP.GetMass());
-  auto pnew = vP.GetMomentum();
-  vP.SetMomentum(pnew * Pnew / pnew.GetNorm());
-}
-
-void EnergyLoss::FillProfile(SetupTrack const& vTrack, const HEPEnergyType dE) {
-
-  GrammageType const grammageStart = shower_axis_.projectedX(vTrack.GetPosition(0));
-  GrammageType const grammageEnd = shower_axis_.projectedX(vTrack.GetPosition(1));
-  const auto deltaX = grammageEnd - grammageStart;
-
-  int binStart = grammageStart / dX_;
-  if (binStart < 0) return;
-  int binEnd = grammageEnd / dX_;
-  if (binEnd > int(profile_.size() - 1)) return;
-  if (deltaX < dX_threshold_) return;
-
-  C8LOG_DEBUG("energy deposit of -dE={} between {} and {}", -dE, grammageStart,
-              grammageEnd);
-
-  auto energyCount = HEPEnergyType::zero();
-
-  auto fill = [&](const int bin, const double weight) {
-    auto const increment = -dE * weight;
-    profile_[bin] += increment;
-    energyCount += increment;
-
-    C8LOG_DEBUG("filling bin {} with weight {} : {} ", bin, weight, increment);
-  };
-
-  // fill longitudinal profile
-  if (binStart == binEnd) {
-    fill(binStart, 1);
-  } else {
-    fill(binStart, ((1 + binStart) * dX_ - grammageStart) / deltaX);
-    fill(binEnd, (grammageEnd - binEnd * dX_) / deltaX);
-    for (int bin = binStart + 1; bin < binEnd; ++bin) { fill(bin, 1); }
-  }
-
-  C8LOG_DEBUG("total energy added to histogram: {} ", energyCount);
-}
-
-void EnergyLoss::PrintProfile() const {
-  std::ofstream file("EnergyLossProfile.dat");
-  file << "# EnergyLoss profile" << std::endl
-       << "# lower X bin edge [g/cm2]  dE/dX [GeV/g/cm2]" << endl;
-  double const deltaX = dX_ / 1_g * square(1_cm);
-  for (size_t i = 0; i < profile_.size(); ++i) {
-    file << std::scientific << std::setw(15) << i * deltaX << std::setw(15)
-         << profile_.at(i) / (deltaX * 1_GeV) << endl;
-  }
-}
-
-HEPEnergyType EnergyLoss::GetTotal() const {
-  return std::accumulate(profile_.cbegin(), profile_.cend(), HEPEnergyType::zero());
-}
-
-void EnergyLoss::showResults() const {
-  using namespace corsika::units::si; // required for operator::_MeV
-  std::cout << " ******************************" << std::endl
-            << " PROCESS::ContinuousProcess: " << std::endl;
-  std::cout << " energy lost dE (GeV)      :  " << energy_lost_ / 1_GeV << std::endl;
-}
-
-void EnergyLoss::reset() {
-  using namespace corsika::units::si; // required for operator::_MeV
-  energy_lost_ = 0_GeV;
-}
diff --git a/Processes/EnergyLoss/Properties8.dat b/Processes/EnergyLoss/Properties8.dat
deleted file mode 100644
index 377c3df7748acf71795e02277fbf6cb8c1905943..0000000000000000000000000000000000000000
--- a/Processes/EnergyLoss/Properties8.dat
+++ /dev/null
@@ -1,2907 +0,0 @@
-# RU Mo 18. Feb 14:07:40 CET 2019
-# Data table obtained from: http://pdg.lbl.gov/2018/AtomicNuclearProperties/properties8.dat
-# see also: http://pdg.lbl.gov/2018/AtomicNuclearProperties/expert.html
-   1 Hydro  3   1.0080000000   7  0.99212 8.3748E-05 8.3755E-05 D  1  1  4 E
-H   hydrogen_gas
-hydrogen gas (H%2#)
-      19.2   9.5835   1.8639   3.2718  0.14092   5.7273     0.00
-         1  1.000000  1.000000
-Boiling point                   -252.87       20.267 K
-Melting point                   -259.34       13.82 K
-Index of ref (n-1)*E6           132.0         http://www.kayelaby.npl.co.uk/
-Note: The mass of atomic <SUP>1</SUP>H is 1.007 276 522 6 (13) u (mass of the proton less binding energy of 13.61 eV = 1.461E-09 u).
-----------------------------------------------------------------------------
-   2 Heliu  6   4.0026020000   2  0.49967 1.6632E-04 1.6632E-04 G  1  1  2 E
-He   helium_gas_He
-helium gas (He)
-      41.8  11.1393   2.2017   3.6122  0.13443   5.8347     0.00
-         2  1.000000  1.000000
-Boiling point                   -268.93
-Index of ref (n-1)*E6            35.0         http://www.kayelaby.npl.co.uk/
-----------------------------------------------------------------------------
-   3 Lithi  2   6.9400000000   2  0.43221 5.3400E-01 5.3400E-01 S  1  1  2 E
-Li   lithium_Li
-lithium (Li)
-      40.0   3.1221   0.1304   1.6397  0.95136   2.4993     0.14
-         3  1.000000  1.000000
-melting point               180.5
-boiling point               1342.
-----------------------------------------------------------------------------
-   4 Beryl  7   9.0121831000   5  0.44384 1.8480E+00 1.8480E+00 S  1  1  2 E
-Be   beryllium_Be
-beryllium (Be)
-      63.7   2.7847   0.0592   1.6922  0.80392   2.4339     0.14
-         4  1.000000  1.000000
-melting point               1287.
-boiling point               2471.
-----------------------------------------------------------------------------
-   5 Boron  2  10.8100000000   7  0.46249 2.3700E+00 2.3700E+00 S  1  1  0 E
-B   boron_B
-boron (B)
-      76.0   2.8477   0.0305   1.9688  0.56224   2.4512     0.14
-         5  1.000000  1.000000
-----------------------------------------------------------------------------
-   6 Carbo  4  12.0107000000   8  0.49955 2.0000E+00 2.0000E+00 S  1  1  0 E
-C   carbon_amorphous_C
-carbon (amorphous) (C)
-      78.0   2.9925  -0.0351   2.4860  0.20240   3.0036     0.10
-         6  1.000000  1.000000
-----------------------------------------------------------------------------
-   7 Nitro  3  14.0070000000   2  0.49976 1.1653E-03 1.1653E-03 D  1  1  3 E
-N   nitrogen_gas
-nitrogen gas (N%2#)
-      82.0  10.5400   1.7378   4.1323  0.15349   3.2125     0.00
-         7  1.000000  1.000000
-Melting point (C)               -210.00
-Boiling point (C)               -195.86
-Index of ref (n-1)*E6           298.0         http://www.kayelaby.npl.co.uk/
-----------------------------------------------------------------------------
-   8 Oxyge  3  15.9990000000   3  0.50002 1.3315E-03 1.3315E-03 D  1  1  3 E
-O   oxygen_gas
-oxygen gas (O%2#)
-      95.0  10.7004   1.7541   4.3213  0.11778   3.2913     0.00
-         8  1.000000  1.000000
-Melting point (C)               -218.79
-Boiling point (C)               -182.95
-Index of ref (n-1)*E6           271.0         http://www.kayelaby.npl.co.uk/
-----------------------------------------------------------------------------
-   9 Fluor  9  18.9984031630   6  0.47372 1.5803E-03 1.5803E-03 D  1  1  3 E
-F   fluorine_gas
-fluorine gas (F%2#)
-     115.0  10.9653   1.8433   4.4096  0.11083   3.2962     0.00
-         9  1.000000  1.000000
-Melting point                   -219.62
-Boiling point                   -188.12
-Index ref (n-1)                 195.
-----------------------------------------------------------------------------
-  10 Neon   4  20.1797000000   6  0.49555 8.3851E-04 8.3851E-04 G  1  1  3 E
-Ne   neon_gas_Ne
-neon gas (Ne)
-     137.0  11.9041   2.0735   4.6421  0.08064   3.5771     0.00
-        10  1.000000  1.000000
-Boiling point                -246.08
-Melting point                -248.59
-Index ref                    67.1
-----------------------------------------------------------------------------
-  11 Sodiu  8  22.9897692800   2  0.47847 9.7100E-01 9.7100E-01 S  1  1  0 E
-Na   sodium_Na
-sodium (Na)
-     149.0   5.0526   0.2880   3.1962  0.07772   3.6452     0.08
-        11  1.000000  1.000000
-----------------------------------------------------------------------------
-  12 Magne  3  24.3050000000   6  0.49373 1.7400E+00 1.7400E+00 S  1  1  0 E
-Mg   magnesium_Mg
-magnesium (Mg)
-     156.0   4.5297   0.1499   3.0668  0.08163   3.6166     0.08
-        12  1.000000  1.000000
-----------------------------------------------------------------------------
-  13 Alumi  7  26.9815385000   7  0.48181 2.6989E+00 2.6989E+00 S  1  1  2 E
-Al   aluminum_Al
-aluminum (Al)
-     166.0   4.2395   0.1708   3.0127  0.08024   3.6345     0.12
-        13  1.000000  1.000000
-melti                           660.32          Aluminum
-boili                           2519.           Aluminum
-----------------------------------------------------------------------------
-  14 Silic  4  28.0855000000   3  0.49848 2.3300E+00 2.3290E+00 S  1  1  3 E
-Si   silicon_Si
-silicon (Si)
-     173.0   4.4351   0.2014   2.8715  0.14921   3.2546     0.14
-        14  1.000000  1.000000
-Index of ref                    3.95
-Melting point                  1414.
-Boiling point                  3265.
-----------------------------------------------------------------------------
-  15 Phosp  9  30.9737619980   5  0.48428 2.2000E+00 2.2000E+00 S  1  1  0 E
-P   phosphorus_P
-phosphorus (P)
-     173.0   4.5214   0.1696   2.7815  0.23610   2.9158     0.14
-        15  1.000000  1.000000
-----------------------------------------------------------------------------
-  16 Sulfu  3  32.0650000000   5  0.49899 2.0000E+00 2.0000E+00 S  1  1  0 E
-S   sulfur_S
-sulfur (S)
-     180.0   4.6659   0.1580   2.7159  0.33992   2.6456     0.14
-        16  1.000000  1.000000
-----------------------------------------------------------------------------
-  17 Chlor  3  35.4530000000   2  0.47951 2.9947E-03 2.9800E-03 D  1  1  3 E
-Cl   chlorine_gas
-chlorine gas (Cl%2#)
-     174.0  11.1421   1.5555   4.2994  0.19849   2.9702     0.00
-        17  1.000000  1.000000
-Melting point             -101.5
-Boiling point             -34.04
-Index of ref (n-1)*E6           773.0         http://www.kayelaby.npl.co.uk/
-----------------------------------------------------------------------------
-  18 Argon  3  39.9480000000   1  0.45059 1.6620E-03 1.6620E-03 G  1  1  3 E
-Ar   argon_gas_Ar
-argon gas (Ar)
-     188.0  11.9480   1.7635   4.4855  0.19714   2.9618     0.00
-        18  1.000000  1.000000
-Boiling point               -185.89
-Melting point               -189.3442
-Index of ref (n-1)*E6           281.0         http://www.kayelaby.npl.co.uk/
-----------------------------------------------------------------------------
-  19 Potas  4  39.0983000000   1  0.48595 8.6200E-01 8.6200E-01 S  1  1  0 E
-K   potassium_K
-potassium (K)
-     190.0   5.6423   0.3851   3.1724  0.19827   2.9233     0.10
-        19  1.000000  1.000000
-----------------------------------------------------------------------------
-  20 Calci  3  40.0780000000   4  0.49903 1.5500E+00 1.5500E+00 S  1  1  0 E
-Ca   calcium_Ca
-calcium (Ca)
-     191.0   5.0396   0.3228   3.1191  0.15643   3.0745     0.14
-        20  1.000000  1.000000
-----------------------------------------------------------------------------
-  21 Scand  6  44.9559080000   5  0.46712 2.9890E+00 2.9890E+00 S  1  1  0 E
-Sc   scandium_Sc
-scandium (Sc)
-     216.0   4.6949   0.1640   3.0593  0.15754   3.0517     0.10
-        21  1.000000  1.000000
-----------------------------------------------------------------------------
-  22 Titan  3  47.8670000000   1  0.45961 4.5400E+00 4.5400E+00 S  1  1  2 E
-Ti   titanium_Ti
-titanium (Ti)
-     233.0   4.4450   0.0957   3.0386  0.15662   3.0302     0.12
-        22  1.000000  1.000000
-melti                           1668.           Titanium
-boili                           3287.           Titanium
-----------------------------------------------------------------------------
-  23 Vanad  4  50.9415000000   1  0.45150 6.1100E+00 6.1100E+00 S  1  1  0 E
-V   vanadium_V
-vanadium (V)
-     245.0   4.2659   0.0691   3.0322  0.15436   3.0163     0.14
-        23  1.000000  1.000000
-----------------------------------------------------------------------------
-  24 Chrom  4  51.9961000000   6  0.46157 7.1800E+00 7.1800E+00 S  1  1  0 E
-Cr   chromium_Cr
-chromium (Cr)
-     257.0   4.1781   0.0340   3.0451  0.15419   2.9896     0.14
-        24  1.000000  1.000000
-----------------------------------------------------------------------------
-  25 Manga  6  54.9380440000   3  0.45506 7.4400E+00 7.4400E+00 S  1  1  0 E
-Mn   manganese_Mn
-manganese (Mn)
-     272.0   4.2702   0.0447   3.1074  0.14973   2.9796     0.14
-        25  1.000000  1.000000
-----------------------------------------------------------------------------
-  26 Iron   3  55.8450000000   2  0.46557 7.8740E+00 7.8740E+00 S  1  1  2 E
-Fe   iron_Fe
-iron (Fe)
-     286.0   4.2911  -0.0012   3.1531  0.14680   2.9632     0.12
-        26  1.000000  1.000000
-Melting point C                1538.
-Boiling point C                2861.
-----------------------------------------------------------------------------
-  27 Cobal  6  58.9331940000   4  0.45815 8.9000E+00 8.9000E+00 S  1  1  0 E
-Co   cobalt_Co
-cobalt (Co)
-     297.0   4.2601  -0.0187   3.1790  0.14474   2.9502     0.12
-        27  1.000000  1.000000
-----------------------------------------------------------------------------
-  28 Nicke  4  58.6934000000   4  0.47706 8.9020E+00 8.9020E+00 S  1  1  0 E
-Ni   nickel_Ni
-nickel (Ni)
-     311.0   4.3115  -0.0566   3.1851  0.16496   2.8430     0.10
-        28  1.000000  1.000000
-----------------------------------------------------------------------------
-  29 Coppe  3  63.5460000000   3  0.45636 8.9600E+00 8.9600E+00 S  1  1  2 E
-Cu   copper_Cu
-copper (Cu)
-     322.0   4.4190  -0.0254   3.2792  0.14339   2.9044     0.08
-        29  1.000000  1.000000
-melti                           1084.62         Copper
-boili                           2562.           Copper
-----------------------------------------------------------------------------
-  30 Zinc   2  65.3800000000   2  0.45886 7.1330E+00 7.1330E+00 S  1  1  0 E
-Zn   zinc_Zn
-zinc (Zn)
-     330.0   4.6906   0.0049   3.3668  0.14714   2.8652     0.08
-        30  1.000000  1.000000
-----------------------------------------------------------------------------
-  31 Galli  3  69.7230000000   1  0.44462 5.9040E+00 5.9040E+00 S  1  1  0 E
-Ga   gallium_Ga
-gallium (Ga)
-     334.0   4.9353   0.2267   3.5434  0.09440   3.1314     0.14
-        31  1.000000  1.000000
-----------------------------------------------------------------------------
-  32 Germa  3  72.6300000000   1  0.44053 5.3230E+00 5.3230E+00 S  1  1  2 E
-Ge   germanium_Ge
-germanium (Ge)
-     350.0   5.1411   0.3376   3.6096  0.07188   3.3306     0.14
-        32  1.000000  1.000000
-melti                           938.25          Germanium
-boili                           2833.           Germanium
-----------------------------------------------------------------------------
-  33 Arsen  6  74.9215950000   6  0.44046 5.7300E+00 5.7300E+00 S  1  1  0 E
-As   arsenic_As
-arsenic (As)
-     347.0   5.0510   0.1767   3.5702  0.06633   3.4176     0.08
-        33  1.000000  1.000000
-----------------------------------------------------------------------------
-  34 Selen  3  78.9710000000   8  0.43060 4.5000E+00 4.5000E+00 S  1  1  0 E
-Se   selenium_Se
-selenium (Se)
-     348.0   5.3210   0.2258   3.6264  0.06568   3.4317     0.10
-        34  1.000000  1.000000
-----------------------------------------------------------------------------
-  35 Bromi  3  79.9040000000   1  0.43803 7.0722E-03 7.0722E-03 D  1  1  2 E
-Br   bromine_gas
-bromine gas (Br%2#)
-     343.0  11.7307   1.5262   4.9899  0.06335   3.4670     0.00
-        35  1.000000  1.000000
-melting point              -7.2
-boiling point              58.78
-----------------------------------------------------------------------------
-  36 Krypt  3  83.7980000000   2  0.42960 3.4783E-03 3.4856E-03 G  1  1  2 E
-Kr   krypton_gas_Kr
-krypton gas (Kr)
-     352.0  12.5115   1.7158   5.0748  0.07446   3.4051     0.00
-        36  1.000000  1.000000
-melting point              -157.36
-boiling point              -153.22
-----------------------------------------------------------------------------
-  37 Rubid  4  85.4678000000   3  0.43291 1.5320E+00 1.5320E+00 S  1  1  0 E
-Rb   rubidium_Rb
-rubidium (Rb)
-     363.0   6.4776   0.5737   3.7995  0.07261   3.4177     0.14
-        37  1.000000  1.000000
-----------------------------------------------------------------------------
-  38 Stron  2  87.6200000000   1  0.43369 2.5400E+00 2.5400E+00 S  1  1  0 E
-Sr   strontium_Sr
-strontium (Sr)
-     366.0   5.9867   0.4585   3.6778  0.07165   3.4435     0.14
-        38  1.000000  1.000000
-----------------------------------------------------------------------------
-  39 Yttri  5  88.9058400000   2  0.43867 4.4690E+00 4.4690E+00 S  1  1  0 E
-Y   yttrium_Y
-yttrium (Y)
-     379.0   5.4801   0.3608   3.5542  0.07138   3.4585     0.14
-        39  1.000000  1.000000
-----------------------------------------------------------------------------
-  40 Zirco  3  91.2240000000   2  0.43848 6.5060E+00 6.5060E+00 S  1  1  0 E
-Zr   zirconium_Zr
-zirconium (Zr)
-     393.0   5.1774   0.2957   3.4890  0.07177   3.4533     0.14
-        40  1.000000  1.000000
-----------------------------------------------------------------------------
-  41 Niobi  5  92.9063700000   2  0.44130 8.5700E+00 8.5700E+00 S  1  1  0 E
-Nb   niobium_Nb
-niobium (Nb)
-     417.0   5.0141   0.1785   3.2201  0.13883   3.0930     0.14
-        41  1.000000  1.000000
-----------------------------------------------------------------------------
-  42 Molyb  2  95.9500000000   1  0.43768 1.0220E+01 1.0220E+01 S  1  1  0 E
-Mo   molybdenum_Mo
-molybdenum (Mo)
-     424.0   4.8793   0.2267   3.2784  0.10525   3.2549     0.14
-        42  1.000000  1.000000
-----------------------------------------------------------------------------
-  43 Techn  5  97.9072200000   3  0.43919 1.1500E+01 1.1500E+01 S  1  1  3 R
-Tc   technetium_Tc
-technetium (Tc)
-     428.0   4.7769   0.0949   3.1253  0.16572   2.9738     0.14
-        43  1.000000  1.000000
-melting                    2157.
-boiling                    4265.
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  44 Ruthe  2 101.0700000000   2  0.43534 1.2410E+01 1.2410E+01 S  1  1  0 E
-Ru   ruthenium_Ru
-ruthenium (Ru)
-     441.0   4.7694   0.0599   3.0834  0.19342   2.8707     0.14
-        44  1.000000  1.000000
-----------------------------------------------------------------------------
-  45 Rhodi  5 102.9055000000   2  0.43729 1.2410E+01 1.2410E+01 S  1  1  0 E
-Rh   rhodium_Rh
-rhodium (Rh)
-     449.0   4.8008   0.0576   3.1069  0.19205   2.8633     0.14
-        45  1.000000  1.000000
-----------------------------------------------------------------------------
-  46 Palla  2 106.4200000000   1  0.43225 1.2020E+01 1.2020E+01 S  1  1  0 E
-Pd   palladium_Pd
-palladium (Pd)
-     470.0   4.9358   0.0563   3.0555  0.24178   2.7239     0.14
-        46  1.000000  1.000000
-----------------------------------------------------------------------------
-  47 Silve  4 107.8682000000   2  0.43572 1.0500E+01 1.0500E+01 S  1  1  0 E
-Ag   silver_Ag
-silver (Ag)
-     470.0   5.0630   0.0657   3.1074  0.24585   2.6899     0.14
-        47  1.000000  1.000000
-----------------------------------------------------------------------------
-  48 Cadmi  3 112.4140000000   4  0.42700 8.6500E+00 8.6500E+00 S  1  1  0 E
-Cd   cadmium_Cd
-cadmium (Cd)
-     469.0   5.2727   0.1281   3.1667  0.24609   2.6772     0.14
-        48  1.000000  1.000000
-----------------------------------------------------------------------------
-  49 Indiu  3 114.8180000000   3  0.42676 7.3100E+00 7.3100E+00 S  1  1  0 E
-In   indium_In
-indium (In)
-     488.0   5.5211   0.2406   3.2032  0.23879   2.7144     0.14
-        49  1.000000  1.000000
-----------------------------------------------------------------------------
-  50 Tin    3 118.7100000000   7  0.42119 7.3100E+00 7.3100E+00 S  1  1  2 E
-Sn   tin_Sn
-tin (Sn)
-     488.0   5.5340   0.2879   3.2959  0.18689   2.8576     0.14
-        50  1.000000  1.000000
-melti                        231.93             Tin
-boili                        2602.              Tin
-----------------------------------------------------------------------------
-  51 Antim  3 121.7600000000   1  0.41886 6.6910E+00 6.6910E+00 S  1  1  0 E
-Sb   antimony_Sb
-antimony (Sb)
-     487.0   5.6241   0.3189   3.3489  0.16652   2.9319     0.14
-        51  1.000000  1.000000
-----------------------------------------------------------------------------
-  52 Tellu  2 127.6000000000   3  0.40752 6.2400E+00 6.2400E+00 S  1  1  0 E
-Te   tellurium_Te
-tellurium (Te)
-     485.0   5.7131   0.3296   3.4418  0.13815   3.0354     0.14
-        52  1.000000  1.000000
-----------------------------------------------------------------------------
-  53 Iodin  5 126.9044700000   3  0.41764 4.9300E+00 4.9300E+00 S  1  1  2 E
-I   iodine_I
-iodine (I)
-     491.0   5.9488   0.0549   3.2596  0.23766   2.7276     0.00
-        53  1.000000  1.000000
-melting point                113.7
-boiling point                184.4
-----------------------------------------------------------------------------
-  54 Xenon  3 131.2930000000   6  0.41129 5.4854E-03 5.4830E-03 G  1  1  3 E
-Xe   xenon_gas_Xe
-xenon gas (Xe)
-     482.0  12.7281   1.5630   4.7371  0.23314   2.7414     0.00
-        54  1.000000  1.000000
-Index ref                 701.
-Melting point             -111.75
-Boiling point             -108.0
-----------------------------------------------------------------------------
-  55 Caesi  8 132.9054519600   6  0.41383 1.8730E+00 1.8730E+00 S  1  1  0 E
-Cs   caesium_Cs
-caesium (Cs)
-     488.0   6.9135   0.5473   3.5914  0.18233   2.8866     0.14
-        55  1.000000  1.000000
-----------------------------------------------------------------------------
-  56 Bariu  3 137.3270000000   7  0.40779 3.5000E+00 3.5000E+00 S  1  1  0 E
-Ba   barium_Ba
-barium (Ba)
-     491.0   6.3153   0.4190   3.4547  0.18268   2.8906     0.14
-        56  1.000000  1.000000
-----------------------------------------------------------------------------
-  57 Lanth  5 138.9054700000   7  0.41035 6.1540E+00 6.1450E+00 S  1  1  0 E
-La   lanthanum_La
-lanthanum (La)
-     501.0   5.7850   0.3161   3.3293  0.18591   2.8828     0.14
-        57  1.000000  1.000000
-----------------------------------------------------------------------------
-  58 Ceriu  3 140.1160000000   1  0.41394 6.6570E+00 6.7700E+00 S  1  1  0 E
-Ce   cerium_Ce
-cerium (Ce)
-     523.0   5.7837   0.2713   3.3432  0.18885   2.8592     0.14
-        58  1.000000  1.000000
-----------------------------------------------------------------------------
-  59 Prase  5 140.9076600000   2  0.41871 6.7100E+00 6.7730E+00 S  1  1  0 E
-Pr   praseodymium_Pr
-praseodymium (Pr)
-     535.0   5.8096   0.2333   3.2773  0.23265   2.7331     0.14
-        59  1.000000  1.000000
-----------------------------------------------------------------------------
-  60 Neody  3 144.2420000000   3  0.41597 6.9000E+00 7.0080E+00 S  1  1  0 E
-Nd   neodymium_Nd
-neodymium (Nd)
-     546.0   5.8290   0.1984   3.3063  0.23530   2.7050     0.14
-        60  1.000000  1.000000
-----------------------------------------------------------------------------
-  61 Prome  5 144.9127500000   3  0.42094 7.2200E+00 7.2640E+00 S  1  1  1 R
-Pm   promethium_Pm
-promethium (Pm)
-     560.0   5.8224   0.1627   3.3199  0.24280   2.6674     0.14
-        61  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  62 Samar  2 150.3600000000   2  0.41234 7.4600E+00 7.5200E+00 S  1  1  0 E
-Sm   samarium_Sm
-samarium (Sm)
-     574.0   5.8597   0.1520   3.3460  0.24698   2.6403     0.14
-        62  1.000000  1.000000
-----------------------------------------------------------------------------
-  63 Europ  3 151.9640000000   1  0.41457 5.2430E+00 5.2440E+00 S  1  1  0 E
-Eu   europium_Eu
-europium (Eu)
-     580.0   6.2278   0.1888   3.4633  0.24448   2.6245     0.14
-        63  1.000000  1.000000
-----------------------------------------------------------------------------
-  64 Gadol  2 157.2500000000   3  0.40700 7.9004E+00 7.9010E+00 S  1  1  0 E
-Gd   gadolinium_Gd
-gadolinium (Gd)
-     591.0   5.8738   0.1058   3.3932  0.25109   2.5977     0.14
-        64  1.000000  1.000000
-----------------------------------------------------------------------------
-  65 Terbi  5 158.9253500000   2  0.40900 8.2290E+00 8.2300E+00 S  1  1  0 E
-Tb   terbium_Tb
-terbium (Tb)
-     614.0   5.9045   0.0947   3.4224  0.24453   2.6056     0.14
-        65  1.000000  1.000000
-----------------------------------------------------------------------------
-  66 Dyspr  3 162.5000000000   1  0.40615 8.5500E+00 8.5510E+00 S  1  1  0 E
-Dy   dysprosium_Dy
-dysprosium (Dy)
-     628.0   5.9183   0.0822   3.4474  0.24665   2.5849     0.14
-        66  1.000000  1.000000
-----------------------------------------------------------------------------
-  67 Holmi  5 164.9303300000   2  0.40623 8.7950E+00 8.7950E+00 S  1  1  0 E
-Ho   holmium_Ho
-holmium (Ho)
-     650.0   5.9587   0.0761   3.4782  0.24638   2.5726     0.14
-        67  1.000000  1.000000
-----------------------------------------------------------------------------
-  68 Erbiu  3 167.2590000000   3  0.40656 9.0660E+00 9.0260E+00 S  1  1  0 E
-Er   erbium_Er
-erbium (Er)
-     658.0   5.9521   0.0648   3.4922  0.24823   2.5573     0.14
-        68  1.000000  1.000000
-----------------------------------------------------------------------------
-  69 Thuli  5 168.9342200000   2  0.40844 9.3210E+00 9.3210E+00 S  1  1  0 E
-Tm   thulium_Tm
-thulium (Tm)
-     674.0   5.9677   0.0812   3.5085  0.24889   2.5469     0.14
-        69  1.000000  1.000000
-----------------------------------------------------------------------------
-  70 Ytter  3 173.0540000000   5  0.40450 6.7300E+00 6.9030E+00 S  1  1  0 E
-Yb   ytterbium_Yb
-ytterbium (Yb)
-     684.0   6.3325   0.1199   3.6246  0.25295   2.5141     0.14
-        70  1.000000  1.000000
-----------------------------------------------------------------------------
-  71 Lutet  4 174.9668000000   1  0.40579 9.8400E+00 9.8410E+00 S  1  1  0 E
-Lu   lutetium_Lu
-lutetium (Lu)
-     694.0   5.9785   0.1560   3.5218  0.24033   2.5643     0.14
-        71  1.000000  1.000000
-----------------------------------------------------------------------------
-  72 Hafni  2 178.4900000000   2  0.40338 1.3310E+01 1.3310E+01 S  1  1  0 E
-Hf   hafnium_Hf
-hafnium (Hf)
-     705.0   5.7139   0.1965   3.4337  0.22918   2.6155     0.14
-        72  1.000000  1.000000
-----------------------------------------------------------------------------
-  73 Tanta  5 180.9478800000   2  0.40343 1.6654E+01 1.6654E+01 S  1  1  0 E
-Ta   tantalum_Ta
-tantalum (Ta)
-     718.0   5.5262   0.2117   3.4805  0.17798   2.7623     0.14
-        73  1.000000  1.000000
-----------------------------------------------------------------------------
-  74 Tungs  2 183.8400000000   1  0.40252 1.9300E+01 1.9300E+01 S  1  1  2 E
-W   tungsten_W
-tungsten (W)
-     727.0   5.4059   0.2167   3.4960  0.15509   2.8447     0.14
-        74  1.000000  1.000000
-melti                           3422.           Tungsten
-boili                           5555.           Tungsten
-----------------------------------------------------------------------------
-  75 Rheni  3 186.2070000000   1  0.40278 2.1020E+01 2.1020E+01 S  1  1  0 E
-Re   rhenium_Re
-rhenium (Re)
-     736.0   5.3445   0.0559   3.4845  0.15184   2.8627     0.08
-        75  1.000000  1.000000
-----------------------------------------------------------------------------
-  76 Osmiu  2 190.2300000000   3  0.39952 2.2570E+01 2.2570E+01 S  1  1  0 E
-Os   osmium_Os
-osmium (Os)
-     746.0   5.3083   0.0891   3.5414  0.12751   2.9608     0.10
-        76  1.000000  1.000000
-----------------------------------------------------------------------------
-  77 Iridi  3 192.2170000000   3  0.40059 2.2420E+01 2.2420E+01 S  1  1  0 E
-Ir   iridium_Ir
-iridium (Ir)
-     757.0   5.3418   0.0819   3.5480  0.12690   2.9658     0.10
-        77  1.000000  1.000000
-----------------------------------------------------------------------------
-  78 Plati  3 195.0840000000   9  0.39983 2.1450E+01 2.1450E+01 S  1  1  2 E
-Pt   platinum_Pt
-platinum (Pt)
-     790.0   5.4732   0.1484   3.6212  0.11128   3.0417     0.12
-        78  1.000000  1.000000
-melti                           1768.4          Platinum
-boili                           3825.           Platinum
-----------------------------------------------------------------------------
-  79 Gold   6 196.9665690000   5  0.40108 1.9320E+01 1.9320E+01 S  1  1  2 E
-Au   gold_Au
-gold (Au)
-     790.0   5.5747   0.2021   3.6979  0.09756   3.1101     0.14
-        79  1.000000  1.000000
-melti                           1064.18         Gold
-boili                           2856.           Gold
-----------------------------------------------------------------------------
-  80 Mercu  3 200.5920000000   2  0.39882 1.3546E+01 1.3546E+01 L  1  1  0 E
-Hg   mercury_Hg
-mercury (Hg)
-     800.0   5.9605   0.2756   3.7275  0.11014   3.0519     0.14
-        80  1.000000  1.000000
-----------------------------------------------------------------------------
-  81 Thall  2 204.3800000000   2  0.39631 1.1720E+01 1.1720E+01 S  1  1  0 E
-Tl   thallium_Tl
-thallium (Tl)
-     810.0   6.1365   0.3491   3.8044  0.09455   3.1450     0.14
-        81  1.000000  1.000000
-----------------------------------------------------------------------------
-  82 Lead   1 207.2000000000   1  0.39575 1.1350E+01 1.1350E+01 S  1  1  2 E
-Pb   lead_Pb
-lead (Pb)
-     823.0   6.2018   0.3776   3.8073  0.09359   3.1608     0.14
-        82  1.000000  1.000000
-melti                           327.46          Lead
-boili                           1749.           Lead
-----------------------------------------------------------------------------
-  83 Bismu  5 208.9804000000   1  0.39717 9.7470E+00 9.7470E+00 S  1  1  0 E
-Bi   bismuth_Bi
-bismuth (Bi)
-     823.0   6.3505   0.4152   3.8248  0.09410   3.1671     0.14
-        83  1.000000  1.000000
-----------------------------------------------------------------------------
-  84 Polon  5 208.9824300000   2  0.40195 9.3200E+00 9.3200E+00 S  1  1  1 R
-Po   polonium_Po
-polonium (Po)
-     830.0   6.4003   0.4267   3.8293  0.09282   3.1830     0.14
-        84  1.000000  1.000000
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  85 H-liq  3   1.0080000000   7  0.99212 6.0000E-02 7.0800E-02 L  1  1  3 E
-H   liquid_hydrogen
-liquid hydrogen (H%2#)
-      21.8   3.2632   0.4759   1.9215  0.13483   5.6249     0.00
-         1  1.000000  1.000000
-Melting point                   -259.34          Rubber Bible
-Boiling point                   -252.87          Rubber Bible
-Index of ref                    1.112
-----------------------------------------------------------------------------
-  86 Radon  5 222.0175800000   2  0.38736 9.0662E-03 9.0662E-03 G  1  1  3 R
-Rn   radon_Rn
-radon (Rn)
-     794.0  13.2839   1.5368   4.9889  0.20798   2.7409     0.00
-        86  1.000000  1.000000
-Melting point                   -71.
-Boiling point                   -61.7
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  87 C (gr  4  12.0107000000   8  0.49955 1.7000E+00 2.2100E+00 S  1  1  2 E
-C   carbon_graphite_C
-carbon (graphite) (C)
-      78.0   3.1550   0.0480   2.5387  0.20762   2.9532     0.14
-         6  1.000000  1.000000
-Sublimation point            3825.0
-Note: Density may vary 2.09 to 2.23
-----------------------------------------------------------------------------
-  88 Radiu  5 226.0254100000   2  0.38934 5.0000E+00 5.0000E+00 S  1  1  1 R
-Ra   radium_Ra
-radium (Ra)
-     826.0   7.0452   0.5991   3.9428  0.08804   3.2454     0.14
-        88  1.000000  1.000000
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  89 Actin  5 227.0277500000   2  0.39202 1.0070E+01 1.0070E+01 S  1  1  1 R
-Ac   actinium_Ac
-actinium (Ac)
-     841.0   6.3742   0.4559   3.7966  0.08567   3.2683     0.14
-        89  1.000000  1.000000
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  90 Thori  4 232.0377000000   4  0.38787 1.1720E+01 1.1720E+01 S  1  1  3 R
-Th   thorium_Th
-thorium (Th)
-     847.0   6.2473   0.4202   3.7681  0.08655   3.2610     0.14
-        90  1.000000  1.000000
-melting                    1135.
-boiling                    4131.
-Note: There is a well-defined terrestrial aboundance for thorium even though it is radioactive.
-----------------------------------------------------------------------------
-  91 Prota  5 231.0358800000   2  0.39388 1.5370E+01 1.5370E+01 S  1  1  2 R
-Pa   protactinium_Pa
-protactinium (Pa)
-     878.0   6.0327   0.3144   3.5079  0.14770   2.9845     0.14
-        91  1.000000  1.000000
-melting                    1572.
-Note: There is a well-defined terrestrial aboundance for protactinium even though it is radioactive.
-----------------------------------------------------------------------------
-  92 Urani  5 238.0289100000   3  0.38651 1.8950E+01 1.8950E+01 S  1  1  3 R
-U   uranium_U
-uranium (U)
-     890.0   5.8694   0.2260   3.3721  0.19677   2.8171     0.14
-        92  1.000000  1.000000
-melti                           1135.           Uranium
-boili                           4131.           Uranium
-Note: There is a well-defined terrestrial aboundance for uranium even though it is radioactive.
-----------------------------------------------------------------------------
-  93 Neptu  5 237.0481700000   2  0.39233 2.0250E+01 2.0250E+01 S  1  1  1 R
-Np   neptunium_Np
-neptunium (Np)
-     902.0   5.8149   0.1869   3.3690  0.19741   2.8082     0.14
-        93  1.000000  1.000000
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  94 Pluto  5 244.0642000000   4  0.38514 1.9840E+01 1.9840E+01 S  1  1  1 R
-Pu   plutonium_Pu
-plutonium (Pu)
-     921.0   5.8748   0.1557   3.3981  0.20419   2.7679     0.14
-        94  1.000000  1.000000
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  95 Ameri  5 243.0613800000   2  0.39085 1.3670E+01 1.3670E+01 S  1  1  1 R
-Am   americium_Am
-americium (Am)
-     934.0   6.2813   0.2274   3.5021  0.20308   2.7615     0.14
-        95  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  96 Curiu  5 247.0703500000   3  0.38855 1.3510E+01 1.3510E+01 S  1  1  2 R
-Cm   curium_Cm
-curium (Cm)
-     939.0   6.3097   0.2484   3.5160  0.20257   2.7579     0.14
-        96  1.000000  1.000000
-Melting               1345.
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  97 Berke  5 247.0703100000   4  0.39260 0.9860E+00 0.9860E+01 S  1  1  2 R
-Bk   berkelium_Bk
-berkelium (Bk)
-     952.0   6.2912   0.5509   3.0000  0.25556   3.0000     0.00
-        97  1.000000  1.000000
-Melting point              986.
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
-  98 Carbo  4  12.0107000000   8  0.49955 2.2650E+00 2.2650E+00 S  1  1  0 R
-C   carbon_compact_C
-carbon (compact) (C)
-      78.0   2.8680  -0.0178   2.3415  0.26142   2.8697     0.12
-         6  1.000000  1.000000
-----------------------------------------------------------------------------
-  99 A-150  5  -1.0000000000      0.54903 1.1270E+00 1.1270E+00 S  6  1  0 B
-     a-150_tissue-equivalent_plastic
-A-150 tissue-equivalent plastic
-      65.1   3.1100   0.1329   2.6234  0.10783   3.4442     0.00
-         1  1.000000  0.101327
-         6  0.642279  0.775501
-         7  0.024897  0.035057
-         8  0.032527  0.052316
-         9  0.009122  0.017422
-        20  0.004561  0.018378
-----------------------------------------------------------------------------
- 100 Aceto  5  -1.0000000000      0.55097 7.8990E-01 7.8990E-01 L  3  6  1 O
-     acetone
-acetone (CH%3#COCH%3#)
-      64.2   3.4341   0.2197   2.6928  0.11100   3.4047     0.00
-         1  6.000000  0.104122
-         6  3.000201  0.620405
-         8  1.000043  0.275473
-Index of ref                 1.36
-----------------------------------------------------------------------------
- 101 Acety  5  -1.0000000000      0.53768 1.0967E-03 1.0967E-03 G  2  2  0 O
-     acetylene_CHCH
-acetylene (CHCH)
-      58.2   9.8419   1.6017   4.0074  0.12167   3.4277     0.00
-         1  2.000000  0.077418
-         6  2.000135  0.922582
-----------------------------------------------------------------------------
- 102 Adeni  5  -1.0000000000      0.51903 1.3500E+00 1.3500E+00 S  3  5  0 O
-     adenine
-adenine (C%5#H%5#N%5#)
-      71.4   3.1724   0.1295   2.4219  0.20908   3.0271     0.00
-         1  5.000000  0.037294
-         6  5.000354  0.444430
-         7  5.000218  0.518275
-----------------------------------------------------------------------------
- 103 Adip-  5  -1.0000000000      0.55947 9.2000E-01 9.2000E-01 S 13  1  0 B
-     adipose_tissue_ICRP
-adipose tissue (ICRP)
-      63.2   3.2367   0.1827   2.6530  0.10278   3.4817     0.00
-         1  1.000000  0.119477
-         6  0.447595  0.637240
-         7  0.004800  0.007970
-         8  0.122506  0.232333
-        11  0.000183  0.000500
-        12  0.000007  0.000020
-        15  0.000044  0.000160
-        16  0.000192  0.000730
-        17  0.000283  0.001190
-        19  0.000069  0.000320
-        20  0.000004  0.000020
-        26  0.000003  0.000020
-        30  0.000003  0.000020
-----------------------------------------------------------------------------
- 104 Air    5  -1.0000000000      0.49919 1.2048E-03 1.2048E-03 G  4  0  2 M
-     air_dry_1_atm
-air (dry, 1 atm)
-      85.7  10.5961   1.7418   4.2759  0.10914   3.3994     0.00
-         6  0.000124  0.000124
-         7  0.755267  0.755267
-         8  0.231871  0.231781
-        18  0.012827  0.012827
-Boiling point              -194.35
-Index of ref               288.6             http://emtoolbox.nist.gov/
-----------------------------------------------------------------------------
- 105 Alani  5  -1.0000000000      0.53976 1.4200E+00 1.4200E+00 S  4  7  0 O
-     alanine
-alanine (C%3#H%7#NO%2#)
-      71.9   3.0965   0.1354   2.6336  0.11484   3.3526     0.00
-         1  7.000000  0.079190
-         6  3.000178  0.404439
-         7  1.000032  0.157213
-         8  2.000071  0.359159
-----------------------------------------------------------------------------
- 106 Al2O3  5  -1.0000000000      0.49038 3.9700E+00 3.9700E+00 S  2  3  3 I
-     aluminum_oxide_sapphire
-aluminum oxide (sapphire, Al%2#O%3#)
-     145.2   3.5682   0.0402   2.8665  0.08500   3.5458     0.00
-         8  3.000000  0.470749
-        13  2.000002  0.529251
-Index of refraction           1.77
-Melting point                 2054.
-Boiling point                 3000.              approximate
-----------------------------------------------------------------------------
- 107 Amber  5  -1.0000000000      0.55179 1.1000E+00 1.1000E+00 S  3 16  0 O
-     amber
-amber (C%10#H%16#O)
-      63.2   3.0701   0.1335   2.5610  0.11934   3.4098     0.00
-         1 16.000000  0.105930
-         6 10.000679  0.788973
-         8  1.000042  0.105096
-----------------------------------------------------------------------------
- 108 Ammon  5  -1.0000000000      0.59719 8.2602E-04 8.2602E-04 G  2  3  1 I
-     ammonia
-ammonia (NH%3#)
-      53.7   9.8763   1.6822   4.1158  0.08315   3.6464     0.00
-         1  3.000000  0.177547
-         7  1.000038  0.822453
-Index of ref (n-1)*E6           376.0         http://www.kayelaby.npl.co.uk/
-----------------------------------------------------------------------------
- 109 Anili  5  -1.0000000000      0.53699 1.0235E+00 1.0235E+00 L  3  7  0 O
-     aniline
-aniline (C%6#H%5#NH%2#)
-      66.2   3.2622   0.1618   2.5805  0.13134   3.3434     0.00
-         1  7.000000  0.075759
-         6  6.000400  0.773838
-         7  1.000041  0.150403
-----------------------------------------------------------------------------
- 110 Anthr  5  -1.0000000000      0.52740 1.2830E+00 1.2830E+00 S  2 10  0 O
-     anthracene
-anthracene (C%14#H%10#)
-      69.5   3.1514   0.1146   2.5213  0.14677   3.2831     0.00
-         1 10.000000  0.056550
-         6 14.000793  0.943450
-----------------------------------------------------------------------------
- 111 B-100  5  -1.0000000000      0.52740 1.4500E+00 1.4500E+00 S  6  1  0 B
-     b-100_Bone-equivalent_plastic
-b-100 Bone-equivalent plastic
-      85.9   3.4528   0.1252   3.0420  0.05268   3.7365     0.00
-         1  1.000000  0.065471
-         6  0.688251  0.536945
-         7  0.023631  0.021500
-         8  0.030873  0.032085
-         9  0.135660  0.167411
-        20  0.067833  0.176589
-----------------------------------------------------------------------------
- 112 Bakel  5  -1.0000000000      0.52792 1.2500E+00 1.2500E+00 S  3 38  0 P
-     bakelite
-bakelite [(C%43#H%38#O%7#)%n#]
-      72.4   3.2582   0.1471   2.6055  0.12713   3.3470     0.00
-         1 38.000000  0.057441
-         6 43.003166  0.774591
-         8  7.000340  0.167968
-----------------------------------------------------------------------------
- 113 Ba-F2  5  -1.0000000000      0.42207 4.8900E+00 4.8930E+00 S  2  2  3 I
-     barium_fluoride
-barium fluoride (BaF%2#)
-     375.9   5.4122  -0.0098   3.3871  0.15991   2.8867     0.00
-         9  2.000000  0.216720
-        56  1.000021  0.783280
-Melting point (C)                1368.
-Boiling point (C)                2260.
-Index of ref                     1.4744       CRC2006 10-246
-----------------------------------------------------------------------------
- 114 Ba-SO  5  -1.0000000000      0.44561 4.5000E+00 4.5000E+00 S  3  4  0 I
-     barium_sulfate
-barium sulfate BaSO%4#
-     285.7   4.8923  -0.0128   3.4069  0.11747   3.0427     0.00
-         8  4.000000  0.274212
-        16  0.999811  0.137368
-        56  1.000020  0.588420
-----------------------------------------------------------------------------
- 115 Benze  5  -1.0000000000      0.53769 8.7865E-01 8.7865E-01 L  2  6  0 O
-     benzene
-benzene C%6#H%6#
-      63.4   3.3269   0.1710   2.5091  0.16519   3.2174     0.00
-         1  6.000000  0.077418
-         6  6.000406  0.922582
-----------------------------------------------------------------------------
- 116 Be-O   5  -1.0000000000      0.47979 3.0100E+00 3.0100E+00 S  2  1  0 I
-     beryllium_oxide_BeO
-beryllium oxide (BeO)
-      93.2   2.9801   0.0241   2.5846  0.10755   3.4927     0.00
-         4  1.000000  0.360320
-         8  1.000002  0.639680
-----------------------------------------------------------------------------
- 117 BGO    5  -1.0000000000      0.42065 7.1300E+00 7.1300E+00 S  3 12  3 I
-     bismuth_germanate_BGO
-bismuth germanate (BGO) [(Bi%2#O%3#)%2#(GeO%2#)%3#]
-     534.1   5.7409   0.0456   3.7816  0.09569   3.0781     0.00
-         8 12.000000  0.154126
-        32  2.999188  0.174820
-        83  4.000009  0.671054
-Melting point                   1044.                 CRC2006
-Index of refraction            2.15
-Note: Evalite structure; less common is Bi{12}GeO{20}
-----------------------------------------------------------------------------
- 118 Blood  5  -1.0000000000      0.54995 1.0600E+00 1.0600E+00 L 14  1  0 B
-     blood_ICRP
-blood (ICRP)
-      75.2   3.4581   0.2239   2.8017  0.08492   3.5406     0.00
-         1  1.000000  0.101866
-         6  0.082399  0.100020
-         7  0.020939  0.029640
-         8  0.469656  0.759414
-        11  0.000796  0.001850
-        12  0.000016  0.000040
-        14  0.000011  0.000030
-        15  0.000112  0.000350
-        16  0.000571  0.001850
-        17  0.000776  0.002780
-        19  0.000413  0.001630
-        20  0.000015  0.000060
-        26  0.000082  0.000460
-        30  0.000002  0.000010
-----------------------------------------------------------------------------
- 119 Bonec  5  -1.0000000000      0.53010 1.8500E+00 1.8500E+00 S  8  1  0 B
-     compact_bone_ICRU
-compact bone (ICRU)
-      91.9   3.3390   0.0944   3.0201  0.05822   3.6419     0.00
-         1  1.000000  0.063984
-         6  0.364619  0.278000
-         7  0.030366  0.027000
-         8  0.403702  0.410016
-        12  0.001296  0.002000
-        15  0.035601  0.070000
-        16  0.000983  0.002000
-        20  0.057780  0.147000
-----------------------------------------------------------------------------
- 120 Bonec  5  -1.0000000000      0.52130 1.8500E+00 1.8500E+00 S  9  1  0 B
-     cortical_bone_ICRP
-cortical bone (ICRP)
-     106.4   3.6488   0.1161   3.0919  0.06198   3.5919     0.00
-         1  1.000000  0.047234
-         6  0.256430  0.144330
-         7  0.063972  0.041990
-         8  0.594983  0.446096
-        12  0.001932  0.002200
-        15  0.072319  0.104970
-        16  0.002096  0.003150
-        20  0.111776  0.209930
-        30  0.000033  0.000100
-----------------------------------------------------------------------------
- 121 B4-C   5  -1.0000000000      0.47059 2.5200E+00 2.5200E+00 S  2  4  0 I
-     boron_carbide
-boron carbide (B%4#C)
-      84.7   2.9859   0.0093   2.1006  0.37087   2.8076     0.00
-         5  4.000000  0.782610
-         6  1.000119  0.217390
-----------------------------------------------------------------------------
- 122 B2-O3  5  -1.0000000000      0.49839 1.8120E+00 1.8120E+00 S  2  2  0 I
-     boron_oxide
-boron oxide (B%2#O%3#)
-      99.6   3.6027   0.1843   2.7379  0.11548   3.3832     0.00
-         5  2.000000  0.310551
-         8  3.000277  0.689449
-----------------------------------------------------------------------------
- 123 Brain  5  -1.0000000000      0.55423 1.0300E+00 1.0300E+00 S 13  1  0 B
-     brain_ICRP
-brain (ICRP)
-      73.3   3.4279   0.2206   2.8021  0.08255   3.5585     0.00
-         1  1.000000  0.110667
-         6  0.095108  0.125420
-         7  0.008635  0.013280
-         8  0.419958  0.737723
-        11  0.000729  0.001840
-        12  0.000056  0.000150
-        15  0.001041  0.003540
-        16  0.000503  0.001770
-        17  0.000606  0.002360
-        19  0.000722  0.003100
-        20  0.000020  0.000090
-        26  0.000008  0.000050
-        30  0.000001  0.000010
-----------------------------------------------------------------------------
- 124 Butan  5  -1.0000000000      0.59497 2.4934E-03 2.4890E-03 G  2 10  2 O
-     butane
-butane (C%4#H%10#)
-      48.3   8.5633   1.3788   3.7524  0.10852   3.4884     0.00
-         1 10.000000  0.173408
-         6  4.000262  0.826592
-Boiling point                -0.5
-Melting point                -138.2
-----------------------------------------------------------------------------
- 125 Butyl  5  -1.0000000000      0.56663 8.0980E-01 8.0980E-01 L  3 10  0 O
-     n-butyl_alcohol
-n-butyl alcohol (C%4#H%9#OH)
-      59.9   3.2425   0.1937   2.6439  0.10081   3.5139     0.00
-         1 10.000000  0.135978
-         6  4.000252  0.648171
-         8  1.000038  0.215851
-----------------------------------------------------------------------------
- 126 C-552  5  -1.0000000000      0.49969 1.7600E+00 1.7600E+00 S  5  1  0 B
-     C-552_air-equivalent_plastic
-C-552 air-equivalent plastic
-      86.8   3.3338   0.1510   2.7083  0.10492   3.4344     0.00
-         1  1.000000  0.024680
-         6  1.705640  0.501610
-         8  0.011556  0.004527
-         9  1.000047  0.465209
-        14  0.005777  0.003973
-----------------------------------------------------------------------------
- 127 Cd-Te  5  -1.0000000000      0.41665 6.2000E+00 6.2000E+00 S  2  1  0 I
-     cadmium_telluride_CdTe
-cadmium telluride (CdTe)
-     539.3   5.9096   0.0438   3.2836  0.24840   2.6665     0.00
-        48  1.000000  0.468355
-        52  1.000011  0.531645
-----------------------------------------------------------------------------
- 128 Cd-W-  5  -1.0000000000      0.42747 7.9000E+00 7.9000E+00 S  3  4  0 I
-     cadmium_tungstate
-cadmium tungstate (CdWO%4#)
-     468.3   5.3594   0.0123   3.5941  0.12861   2.9150     0.00
-         8  4.000000  0.177644
-        48  0.999992  0.312027
-        74  1.000054  0.510329
-----------------------------------------------------------------------------
- 129 Ca-C-  5  -1.0000000000      0.49955 2.8000E+00 2.8000E+00 S  3  1  0 I
-     calcium_carbonate
-calcium carbonate (CaCO%3#)
-     136.4   3.7738   0.0492   3.0549  0.08301   3.4120     0.00
-         6  1.000000  0.120003
-         8  2.999923  0.479554
-        20  1.000025  0.400443
-----------------------------------------------------------------------------
- 130 Ca-F2  5  -1.0000000000      0.49670 3.1800E+00 3.1800E+00 S  2  2  1 I
-     calcium_fluoride
-calcium fluoride (CaF%2#)
-     166.0   4.0653   0.0676   3.1683  0.06942   3.5263     0.00
-         9  2.000000  0.486659
-        20  1.000051  0.513341
-Index of ref               1.434
-----------------------------------------------------------------------------
- 131 Ca-O   5  -1.0000000000      0.49929 3.3000E+00 3.3000E+00 S  2  1  0 I
-     calcium_oxide_CaO
-calcium oxide (CaO)
-     176.1   4.1209  -0.0172   3.0171  0.12128   3.1936     0.00
-         8  1.000000  0.285299
-        20  1.000050  0.714701
-----------------------------------------------------------------------------
- 132 Ca-S-  5  -1.0000000000      0.49950 2.9600E+00 2.9600E+00 S  3  4  0 I
-     calcium_sulfate
-calcium sulfate (CaSO%4#)
-     152.3   3.9388   0.0587   3.1229  0.07708   3.4495     0.00
-         8  4.000000  0.470095
-        16  0.999813  0.235497
-        20  1.000050  0.294408
-----------------------------------------------------------------------------
- 133 Ca-W-  5  -1.0000000000      0.43761 6.0620E+00 6.0620E+00 S  3  4  0 I
-     calcium_tungstate
-calcium tungstate (CaWO%4#)
-     395.0   5.2603   0.0323   3.8932  0.06210   3.2649     0.00
-         8  4.000000  0.222270
-        20  1.000051  0.139202
-        74  1.000054  0.638529
-----------------------------------------------------------------------------
- 134 C-O2   5  -1.0000000000      0.49989 1.8421E-03 1.8421E-03 G  2  2  2 I
-     carbon_dioxide_gas
-carbon dioxide gas (CO%2#)
-      85.0  10.1537   1.6294   4.1825  0.11768   3.3227     0.00
-         6  2.000000  0.272916
-         8  3.999910  0.727084
-Index of ref (n-1)*E6           449.0         http://www.kayelaby.npl.co.uk/
-Sublimation point             -78.4            194.7 K
-----------------------------------------------------------------------------
- 135 C-Cl4  5  -1.0000000000      0.49107 1.5940E+00 1.5940E+00 L  2  1  0 O
-     carbon_tetrachloride
-carbon tetrachloride (CCl%4#)
-     166.3   4.7712   0.1773   2.9165  0.19018   3.0116     0.00
-         6  1.000000  0.078083
-        17  3.999948  0.921917
-----------------------------------------------------------------------------
- 136 Cello  5  -1.0000000000      0.53040 1.4200E+00 1.4200E+00 S  3 10  0 P
-     cellulose
-cellulose [(C%6#H%10#O%5#)%n#]
-      77.6   3.2647   0.1580   2.6778  0.11151   3.3810     0.00
-         1 10.000000  0.062162
-         6  6.000342  0.444462
-         8  5.000161  0.493376
-----------------------------------------------------------------------------
- 137 Cella  5  -1.0000000000      0.53279 1.2000E+00 1.2000E+00 S  3 22  0 P
-     cellulose_acetate_butyrate
-cellulose acetate butyrate [(C%15#H%22#O%8#)%n#]
-      74.6   3.3497   0.1794   2.6809  0.11444   3.3738     0.00
-         1 22.000000  0.067125
-         6 15.001071  0.545403
-         8  8.000363  0.387472
-----------------------------------------------------------------------------
- 138 Celln  5  -1.0000000000      0.51424 1.4900E+00 1.4900E+00 S  4  7  0 P
-     cellulose_nitrate
-cellulose nitrate [(C%12#H%14#O%4#(ONO%2#)%6#)%n#]
-      87.0   3.4762   0.1897   2.7253  0.11813   3.3237     0.00
-         1  7.000000  0.029216
-         6  5.454903  0.271296
-         7  2.090979  0.121276
-         8  8.727611  0.578212
-----------------------------------------------------------------------------
- 139 Cersu  5  -1.0000000000      0.55279 1.0300E+00 1.0300E+00 L  5  1  0 B
-     ceric_sulfate_dosimeter_solution
-ceric sulfate dosimeter solution
-      76.7   3.5212   0.2363   2.8769  0.07666   3.5607     0.00
-         1  1.000000  0.107596
-         7  0.000535  0.000800
-         8  0.512308  0.874976
-        16  0.004273  0.014627
-        58  0.000134  0.002001
-----------------------------------------------------------------------------
- 140 Cs-F   5  -1.0000000000      0.42132 4.1150E+00 4.1150E+00 S  2  1  0 I
-     cesium_fluoride_CsF
-cesium fluoride (CsF)
-     440.7   5.9046   0.0084   3.3374  0.22052   2.7280     0.00
-         9  1.000000  0.125069
-        55  0.999996  0.874931
-----------------------------------------------------------------------------
- 141 Cs-I   5  -1.0000000000      0.41569 4.5100E+00 4.5100E+00 S  2  1  3 I
-     cesium_iodide_CsI
-cesium iodide (CsI)
-     553.1   6.2807   0.0395   3.3353  0.25381   2.6657     0.00
-        53  1.000000  0.488451
-        55  1.000001  0.511549
-melti                           621.            Caesium iodide
-boili                           1280.           Caesium iodide
-Index                       1.7873            CRC2006 10-147
-----------------------------------------------------------------------------
- 142 Chlor  5  -1.0000000000      0.51529 1.1058E+00 1.1058E+00 L  3  5  0 O
-     chlorobenzene
-chlorobenzene C%6#H%5#Cl
-      89.1   3.8201   0.1714   2.9272  0.09856   3.3797     0.00
-         1  5.000000  0.044772
-         6  6.000428  0.640254
-        17  1.000054  0.314974
-----------------------------------------------------------------------------
- 143 Chlor  5  -1.0000000000      0.48585 1.4832E+00 1.4832E+00 L  3  1  0 O
-     chloroform
-chloroform (CHCl%3#)
-     156.0   4.7055   0.1786   2.9581  0.16959   3.0627     0.00
-         1  1.000000  0.008443
-         6  1.000054  0.100613
-        17  3.000123  0.890944
-----------------------------------------------------------------------------
- 144 Concr  5  -1.0000000000      0.50274 2.3000E+00 2.3000E+00 S 10  1  2 M
-     shielding_concrete
-shielding concrete
-     135.2   3.9464   0.1301   3.0466  0.07515   3.5467     0.00
-         1  1.000000  0.010000
-         6  0.008392  0.001000
-         8  3.333301  0.529107
-        11  0.070149  0.016000
-        12  0.008294  0.002000
-        13  0.126534  0.033872
-        14  1.209510  0.337021
-        19  0.033514  0.013000
-        20  0.110658  0.044000
-        26  0.025268  0.014000
-Note: Standard shielding blocks, typical composition O%2# 0.52, Si 0.325, Ca 0.06, Na 0.015, Fe 0.02, Al 0.04
-      plus reinforcing iron bars, from CERN-LRL-RHEL Shielding exp., UCRA-17841.
-----------------------------------------------------------------------------
- 145 Cyclo  5  -1.0000000000      0.57034 7.7900E-01 7.7900E-01 L  2 12  0 O
-     cyclohexane
-cyclohexane (C%6#H%12#)
-      56.4   3.1544   0.1728   2.5549  0.12035   3.4278     0.00
-         1 12.000000  0.143711
-         6  6.000369  0.856289
-----------------------------------------------------------------------------
- 146 Dichl  5  -1.0000000000      0.50339 1.3048E+00 1.3048E+00 L  3  4  0 O
-     12-dichlorobenzene
-1,2-dichlorobenzene (C%6#H%4#Cl%2#)
-     106.5   4.0348   0.1587   2.8276  0.16010   3.0836     0.00
-         1  4.000000  0.027425
-         6  6.000428  0.490233
-        17  2.000110  0.482342
-----------------------------------------------------------------------------
- 147 Dichl  5  -1.0000000000      0.51744 1.2199E+00 1.2199E+00 L  4  8  0 O
-     dichlorodiethyl_ether
-dichlorodiethyl ether C%4#Cl%2#H%8#O
-     103.3   4.0135   0.1773   3.1586  0.06799   3.5250     0.00
-         1  8.000000  0.056381
-         6  4.000257  0.335942
-         8  1.000040  0.111874
-        17  2.000096  0.495802
-----------------------------------------------------------------------------
- 148 Dichl  5  -1.0000000000      0.50526 1.2351E+00 1.2351E+00 L  3  4  0 O
-     12-dichloroethane
-1,2-dichloroethane C%2#H%4#C%12#
-     111.9   4.1849   0.1375   2.9529  0.13383   3.1675     0.00
-         1  4.000000  0.040740
-         6  2.000126  0.242746
-        17  2.000090  0.716515
-----------------------------------------------------------------------------
- 149 Dieth  5  -1.0000000000      0.56663 7.1378E-01 7.1378E-01 L  3 10  0 O
-     diethyl_ether
-diethyl ether [(CH%3#CH%2#)%2#O]
-      60.0   3.3721   0.2231   2.6745  0.10550   3.4586     0.00
-         1 10.000000  0.135978
-         6  4.000252  0.648171
-         8  1.000038  0.215851
-----------------------------------------------------------------------------
- 150 Dimet  5  -1.0000000000      0.54724 9.4870E-01 9.4870E-01 S  4  7  0 O
-     mn-dimethyl_formamide
-mn-dimethyl formamide (C%3#H%6#NOH)
-      66.6   3.3311   0.1977   2.6686  0.11470   3.3710     0.00
-         1  7.000000  0.096523
-         6  3.000196  0.492965
-         7  1.000039  0.191625
-         8  1.000042  0.218887
-----------------------------------------------------------------------------
- 151 Dimet  5  -1.0000000000      0.53757 1.1014E+00 1.1014E+00 S  4  6  0 O
-     dimethyl_sulfoxide
-dimethyl sulfoxide (CH%3#)%2#SO
-      98.6   3.9844   0.2021   3.1263  0.06619   3.5708     0.00
-         1  6.000000  0.077403
-         6  2.000130  0.307467
-         8  1.000037  0.204782
-        16  0.999852  0.410348
-----------------------------------------------------------------------------
- 152 Ethan  5  -1.0000000000      0.59861 1.2532E-03 1.2630E-03 G  2  6  4 O
-     ethane
-ethane (C%2#H%6#)
-      45.4   9.1043   1.5107   3.8743  0.09627   3.6095     0.00
-         1  6.000000  0.201115
-         6  2.000126  0.798885
-Boiling point            -88.6
-Triple point             -89.88
-Melting point            -182.79
-Note: Density of liquid at - 88.6 C is 0.5645
-----------------------------------------------------------------------------
- 153 Ethan  5  -1.0000000000      0.56437 7.8930E-01 7.8930E-01 L  3  6  3 O
-     ethanol
-ethanol (C%2#H%5#OH)
-      62.9   3.3699   0.2218   2.7052  0.09878   3.4834     0.00
-         1  6.000000  0.131269
-         6  2.000130  0.521438
-         8  1.000040  0.347294
-Index of refraction           1.36
-Melting point                 -114.14
-Boiling point                 78.29
-----------------------------------------------------------------------------
- 154 Ethyl  5  -1.0000000000      0.54405 1.1300E+00 1.1300E+00 S  3 22  0 P
-     ethyl_cellulose
-ethyl cellulose ([C%12#H%22#O5)%n#]
-      69.3   3.2415   0.1683   2.6527  0.11077   3.4098     0.00
-         1 22.000000  0.090027
-         6 12.000718  0.585182
-         8  5.000172  0.324791
-----------------------------------------------------------------------------
- 155 Ethyl  5  -1.0000000000      0.57034 1.1750E-03 1.1750E-03 G  2  4  0 O
-     ethylene
-ethylene (C%2#H%4#)
-      50.7   9.4380   1.5528   3.9327  0.10636   3.5387     0.00
-         1  4.000000  0.143711
-         6  2.000123  0.856289
-----------------------------------------------------------------------------
- 156 Eye-l  5  -1.0000000000      0.54977 1.1000E+00 1.1000E+00 S  4  1  0 B
-     eye_lens_ICRP
-eye lens (ICRP)
-      73.3   3.3720   0.2070   2.7446  0.09690   3.4550     0.00
-         1  1.000000  0.099269
-         6  0.163759  0.193710
-         7  0.038616  0.053270
-         8  0.414887  0.653751
-----------------------------------------------------------------------------
- 157 Fe2-O  5  -1.0000000000      0.47592 5.2000E+00 5.2000E+00 S  2  3  0 I
-     ferric_oxide
-ferric oxide (Fe%2#O%3#)
-     227.3   4.2245  -0.0074   3.2573  0.10478   3.1313     0.00
-         8  3.000000  0.300567
-        26  2.000071  0.699433
-----------------------------------------------------------------------------
- 158 Fe-B   5  -1.0000000000      0.46507 7.1500E+00 7.1500E+00 S  2  1  0 I
-     ferroboride_FeB
-ferroboride (FeB)
-     261.0   4.2057  -0.0988   3.1749  0.12911   3.0240     0.00
-         5  1.000000  0.162174
-        26  1.000125  0.837826
-----------------------------------------------------------------------------
- 159 Fe-O   5  -1.0000000000      0.47323 5.7000E+00 5.7000E+00 S  2  1  0 I
-     ferrous_oxide_FeO
-ferrous oxide (FeO)
-     248.6   4.3175  -0.0279   3.2002  0.12959   3.0168     0.00
-         8  1.000000  0.222689
-        26  1.000036  0.777311
-----------------------------------------------------------------------------
- 160 Fe-su  5  -1.0000000000      0.55329 1.0240E+00 1.0240E+00 L  7  1  0 B
-     ferrous_sulfate_dosimeter_solution
-ferrous sulfate dosimeter solution
-      76.4   3.5183   0.2378   2.8254  0.08759   3.4923     0.00
-         1  1.000000  0.108259
-         7  0.000018  0.000027
-         8  0.511300  0.878636
-        11  0.000009  0.000022
-        16  0.003765  0.012968
-        17  0.000009  0.000034
-        26  0.000009  0.000054
-----------------------------------------------------------------------------
- 161 Freon  5  -1.0000000000      0.47969 1.1200E+00 1.1200E+00 G  3  1  0 O
-     Freon-12
-Freon-12 (CF%2#Cl%2#)
-     143.0   4.8251   0.3035   3.2659  0.07978   3.4626     0.00
-         6  1.000000  0.099335
-         9  1.999954  0.314247
-        17  1.999972  0.586418
-----------------------------------------------------------------------------
- 162 Freon  5  -1.0000000000      0.44901 1.8000E+00 1.8000E+00 G  3  1  0 O
-     Freon-12B2
-Freon-12B2 (CF%2#Br%2#)
-     284.9   5.7976   0.3406   3.7956  0.05144   3.5565     0.00
-         6  1.000000  0.057245
-         9  1.999966  0.181096
-        35  1.999967  0.761659
-----------------------------------------------------------------------------
- 163 Freon  5  -1.0000000000      0.47966 9.5000E-01 9.5000E-01 G  3  1  0 O
-     Freon-13
-Freon-13 (CF%3#Cl)
-     126.6   4.7483   0.3659   3.2337  0.07238   3.5551     0.00
-         6  1.000000  0.114983
-         9  2.999918  0.545622
-        17  0.999982  0.339396
-----------------------------------------------------------------------------
- 164 Freon  5  -1.0000000000      0.45665 1.5000E+00 1.5000E+00 G  3  1  0 O
-     Freon-13b1
-Freon-13b1 (CF%3#Br)
-     210.5   5.3555   0.3522   3.7554  0.03925   3.7194     0.00
-         6  1.000000  0.080659
-         9  2.999939  0.382749
-        35  0.999980  0.536592
-----------------------------------------------------------------------------
- 165 Freon  5  -1.0000000000      0.43997 1.8000E+00 1.8000E+00 G  3  1  0 O
-     Freon-13i1
-Freon-13i1 (CF%3#I)
-     293.5   5.8774   0.2847   3.7280  0.09112   3.1658     0.00
-         6  1.000000  0.061309
-         9  2.999898  0.290924
-        53  0.999968  0.647767
-----------------------------------------------------------------------------
- 166 Gd2-O  5  -1.0000000000      0.42266 7.4400E+00 7.4400E+00 S  3  2  0 I
-     gadolinium_oxysulfide
-gadolinium oxysulfide (Gd%2#O%2#S)
-     493.3   5.5347  -0.1774   3.4045  0.22161   2.6300     0.00
-         8  2.000000  0.084528
-        16  0.999817  0.084690
-        64  1.999998  0.830782
-----------------------------------------------------------------------------
- 167 Ga-As  5  -1.0000000000      0.44247 5.3100E+00 5.3100E+00 S  2  1  0 I
-     gallium_arsenide_GaAs
-gallium arsenide (GaAs)
-     384.9   5.3299   0.1764   3.6420  0.07152   3.3356     0.00
-        31  1.000000  0.482019
-        33  1.000043  0.517981
-----------------------------------------------------------------------------
- 168 Photo  5  -1.0000000000      0.53973 1.2914E+00 1.2914E+00 S  5  1  0 M
-     gel_in_photographic_emulsion
-gel in photographic emulsion
-      74.8   3.2687   0.1709   2.7058  0.10102   3.4418     0.00
-         1  1.000000  0.081180
-         6  0.430104  0.416060
-         7  0.098607  0.111240
-         8  0.295390  0.380640
-        16  0.004213  0.010880
-----------------------------------------------------------------------------
- 169 Pyrex  5  -1.0000000000      0.49707 2.2300E+00 2.2300E+00 S  6  1  0 M
-     borosilicate_glass_Pyrex_Corning_7740
-borosilicate glass (Pyrex Corning 7740)
-     134.0   3.9708   0.1479   2.9933  0.08270   3.5224     0.00
-         5  1.000000  0.040061
-         8  9.100880  0.539564
-        11  0.330918  0.028191
-        13  0.116461  0.011644
-        14  3.624571  0.377220
-        19  0.022922  0.003321
-----------------------------------------------------------------------------
- 170 Lead   5  -1.0000000000      0.42101 6.2200E+00 6.2200E+00 S  5  1  0 M
-     lead_glass
-lead glass
-     526.4   5.8476   0.0614   3.8146  0.09544   3.0740     0.00
-         8  1.000000  0.156453
-        14  0.294445  0.080866
-        22  0.017288  0.008092
-        33  0.003618  0.002651
-        82  0.371118  0.751938
-----------------------------------------------------------------------------
- 171 Glass  5  -1.0000000000      0.49731 2.4000E+00 2.4000E+00 S  4  1  0 M
-     plate_glass
-plate glass
-     145.4   4.0602   0.1237   3.0649  0.07678   3.5381     0.00
-         8  1.000000  0.459800
-        11  0.145969  0.096441
-        14  0.416971  0.336553
-        20  0.093077  0.107205
-----------------------------------------------------------------------------
- 172 Gluco  5  -1.0000000000      0.53499 1.5400E+00 1.5400E+00 S  3 14  0 O
-     glucose_dextrose_monohydrate
-glucose (dextrose monohydrate) (C%6#H%12#O%6#.H%2#O))
-      77.2   3.1649   0.1411   2.6700  0.10783   3.3946     0.00
-         1 14.000000  0.071204
-         6  6.000342  0.363652
-         8  7.000253  0.565144
-----------------------------------------------------------------------------
- 173 Gluta  5  -1.0000000000      0.53371 1.4600E+00 1.4600E+00 S  4 10  0 O
-     glutamine
-glutamine (C%5#H%10#N%2#O%3#)
-      73.3   3.1167   0.1347   2.6301  0.11931   3.3254     0.00
-         1 10.000000  0.068965
-         6  5.000360  0.410926
-         7  2.000082  0.191681
-         8  3.000137  0.328427
-----------------------------------------------------------------------------
- 174 Glyce  5  -1.0000000000      0.54292 1.2613E+00 1.2613E+00 L  3  8  0 O
-     glycerol
-glycerol (C%3#H%5#(OH)%3#)
-      72.6   3.2267   0.1653   2.6862  0.10168   3.4481     0.00
-         1  8.000000  0.087554
-         6  3.000185  0.391262
-         8  3.000108  0.521185
-----------------------------------------------------------------------------
- 175 Guani  5  -1.0000000000      0.51612 1.5800E+00 1.5800E+00 S  4  5  0 O
-     guanine
-guanine (C%5#H%5#N%5#O)
-      75.0   3.1171   0.1163   2.4296  0.20530   3.0186     0.00
-         1  5.000000  0.033346
-         6  5.000329  0.397380
-         7  5.000189  0.463407
-         8  1.000041  0.105867
-----------------------------------------------------------------------------
- 176 Gypsu  5  -1.0000000000      0.51113 2.3200E+00 2.3200E+00 S  4  4  0 I
-     gypsum_plaster_of_Paris
-gypsum (plaster of Paris, CaSO%4#$\cdot$H%2#O)
-     129.7   3.8382   0.0995   3.1206  0.06949   3.5134     0.00
-         1  4.000000  0.023416
-         8  6.000387  0.557572
-        16  0.999889  0.186215
-        20  1.000123  0.232797
-----------------------------------------------------------------------------
- 177 Hepta  5  -1.0000000000      0.57992 6.8376E-01 6.8376E-01 L  2 16  0 O
-     n-heptane
-n-heptane (C%7#H%16#)
-      54.4   3.1978   0.1928   2.5706  0.11255   3.4885     0.00
-         1 16.000000  0.160937
-         6  7.000435  0.839063
-----------------------------------------------------------------------------
- 178 Hexan  5  -1.0000000000      0.59020 6.6030E-01 6.6030E-01 L  2 14  0 O
-     n-hexane
-n-hexane C%6#H%14#
-      54.0   3.2156   0.1984   2.5757  0.11085   3.5027     0.00
-         1 14.000000  0.163741
-         6  6.000366  0.836259
-----------------------------------------------------------------------------
- 179 Kapto  5  -1.0000000000      0.51264 1.4200E+00 1.4200E+00 S  4 10  0 P
-     polyimide_film
-polyimide film [(C%22#H%10#N%2#O%5#)%n#]
-      79.6   3.3497   0.1509   2.5631  0.15972   3.1921     0.00
-         1 10.000000  0.026362
-         6 22.001366  0.691133
-         7  2.000071  0.073270
-         8  5.000195  0.209235
-----------------------------------------------------------------------------
- 180 La-O-  5  -1.0000000000      0.42599 6.2800E+00 6.2800E+00 S  3  1  0 I
-     lanthanum_oxybromide_LaOBr
-lanthanum oxybromide (LaOBr)
-     439.7   5.4666  -0.0350   3.3288  0.17830   2.8457     0.00
-         8  1.000000  0.068138
-        35  1.000000  0.340294
-        57  0.999999  0.591568
-----------------------------------------------------------------------------
- 181 La2-O  5  -1.0000000000      0.42706 5.8600E+00 5.8600E+00 S  3  2  0 I
-     lanthanum_oxysulfide
-lanthanum oxysulfide La%2#O%2#S
-     421.2   5.4470  -0.0906   3.2664  0.21501   2.7298     0.00
-         8  2.000000  0.093600
-        16  0.999802  0.093778
-        57  1.999986  0.812622
-----------------------------------------------------------------------------
- 182 Pb-O   5  -1.0000000000      0.40323 9.5300E+00 9.5300E+00 S  2  1  0 I
-     lead_oxide_PbO
-lead oxide (PbO)
-     766.7   6.2162   0.0356   3.5456  0.19645   2.7299     0.00
-         8  1.000000  0.071682
-        82  1.000001  0.928318
-----------------------------------------------------------------------------
- 183 Li-N-  5  -1.0000000000      0.52257 1.1780E+00 1.1780E+00 S  3  2  0 I
-     lithium_amide
-lithium amide (LiNH%2#)
-      55.5   2.7961   0.0198   2.5152  0.08740   3.7534     0.00
-         1  2.000000  0.087783
-         3  1.000036  0.302262
-         7  1.000035  0.609955
-----------------------------------------------------------------------------
- 184 LI2-C  5  -1.0000000000      0.49720 2.1100E+00 2.1100E+00 S  3  2  0 I
-     lithium_carbonate
-lithium carbonate (Li%2#C-O%3#)
-      87.9   3.2029   0.0551   2.6598  0.09936   3.5417     0.00
-         3  2.000000  0.187871
-         6  1.000025  0.162550
-         8  2.999995  0.649579
-----------------------------------------------------------------------------
- 185 Li-F   5  -1.0000000000      0.46262 2.6350E+00 2.6350E+00 S  2  1  3 I
-     lithium_fluoride_LiF
-lithium fluoride (LiF)
-      94.0   3.1667   0.0171   2.7049  0.07593   3.7478     0.00
-         3  1.000000  0.267585
-         9  1.000001  0.732415
-melti                           848.2           Lithium flouride
-boili                           1673.           Lithium flouride
-Index of ref                1.392               old RPP value
-----------------------------------------------------------------------------
- 186 Li-H   5  -1.0000000000      0.50321 8.2000E-01 8.2000E-01 S  2  1  1 I
-     lithium_hydride_LiH
-lithium hydride (LiH)
-      36.5   2.3580  -0.0988   1.4515  0.90567   2.5849     0.00
-         1  1.000000  0.126797
-         3  1.000043  0.873203
-Melting point                692
-----------------------------------------------------------------------------
- 187 Li-I   5  -1.0000000000      0.41939 3.4940E+00 3.4940E+00 S  2  1  0 I
-     lithium_iodide_LiI
-lithium iodide (LiI)
-     485.1   6.2671   0.0892   3.3702  0.23274   2.7146     0.00
-         3  1.000000  0.051858
-        53  1.000006  0.948142
-----------------------------------------------------------------------------
- 188 Li2-O  5  -1.0000000000      0.46952 2.0130E+00 2.0130E+00 S  2  2  0 I
-     lithium_oxide
-lithium oxide Li%2#O
-      73.6   2.9340  -0.0511   2.5874  0.08035   3.7878     0.00
-         3  2.000000  0.464570
-         8  1.000000  0.535430
-----------------------------------------------------------------------------
- 189 Li2-B  5  -1.0000000000      0.48487 2.4400E+00 2.4400E+00 S  3  2  0 I
-     lithium_tetraborate
-lithium tetraborate Li%2#B%4#O%7#
-      94.6   3.2093   0.0737   2.6502  0.11075   3.4389     0.00
-         3  2.000000  0.082085
-         5  3.999624  0.255680
-         8  6.999978  0.662235
-----------------------------------------------------------------------------
- 190 Lung   5  -1.0000000000      0.54965 1.0500E+00 1.0500E+00 S 13  1  0 B
-     lung_ICRP
-lung (ICRP)
-      75.3   3.4708   0.2261   2.8001  0.08588   3.5353     0.00
-         1  1.000000  0.101278
-         6  0.084775  0.102310
-         7  0.020357  0.028650
-         8  0.470926  0.757072
-        11  0.000797  0.001840
-        12  0.000299  0.000730
-        15  0.000257  0.000800
-        16  0.000698  0.002250
-        17  0.000747  0.002660
-        19  0.000494  0.001940
-        20  0.000022  0.000090
-        26  0.000066  0.000370
-        30  0.000002  0.000010
-----------------------------------------------------------------------------
- 191 M3-wa  5  -1.0000000000      0.55512 1.0500E+00 1.0500E+00 S  5  1  0 B
-     M3_WAX
-M3 WAX
-      67.9   3.2540   0.1523   2.7529  0.07864   3.6412     0.00
-         1  1.000000  0.114318
-         6  0.481436  0.655823
-         8  0.050800  0.092183
-        12  0.048898  0.134792
-        20  0.000634  0.002883
-----------------------------------------------------------------------------
- 192 Mg-C-  5  -1.0000000000      0.49814 2.9580E+00 2.9580E+00 S  3  1  0 I
-     magnesium_carbonate
-magnesium carbonate MgCO%3#
-     118.0   3.4319   0.0860   2.7997  0.09219   3.5003     0.00
-         6  1.000000  0.142455
-         8  2.999932  0.569278
-        12  0.999977  0.288267
-----------------------------------------------------------------------------
- 193 Mg-F2  5  -1.0000000000      0.48153 3.0000E+00 3.0000E+00 S  2  2  0 I
-     magnesium_fluoride
-magnesium fluoride MgF%2#
-     134.3   3.7105   0.1369   2.8630  0.07934   3.6485     0.00
-         9  2.000000  0.609883
-        12  1.000000  0.390117
-----------------------------------------------------------------------------
- 194 Mg-O   5  -1.0000000000      0.49622 3.5800E+00 3.5800E+00 S  2  1  0 I
-     magnesium_oxide_MgO
-magnesium oxide MgO
-     143.8   3.6404   0.0575   2.8580  0.08313   3.5968     0.00
-         8  1.000000  0.396964
-        12  1.000000  0.603036
-----------------------------------------------------------------------------
- 195 Mg-B4  5  -1.0000000000      0.49014 2.5300E+00 2.5300E+00 S  3  4  0 I
-     magnesium_tetraborate
-magnesium tetraborate MgB%4#O%7#
-     108.3   3.4328   0.1147   2.7635  0.09703   3.4893     0.00
-         5  4.000000  0.240837
-         8  7.000634  0.623790
-        12  1.000090  0.135373
-----------------------------------------------------------------------------
- 196 Hg-I2  5  -1.0000000000      0.40933 6.3600E+00 6.3600E+00 S  2  2  0 I
-     mercuric_iodide
-mercuric iodide HgI%2#
-     684.5   6.3787   0.1040   3.4728  0.21513   2.7264     0.00
-        53  2.000000  0.558560
-        80  0.999999  0.441440
-----------------------------------------------------------------------------
- 197 Metha  5  -1.0000000000      0.62334 6.6715E-04 6.6715E-04 G  2  4  3 O
-     methane
-methane (CH%4#)
-      41.7   9.5243   1.6263   3.9716  0.09253   3.6257     0.00
-         1  4.000000  0.251306
-         6  1.000064  0.748694
-Boiling point                  -161.48
-Melting point                    -182.47
-Index of ref (n-1)*E6           444.0         http://www.kayelaby.npl.co.uk/
-----------------------------------------------------------------------------
- 198 Metha  5  -1.0000000000      0.56176 7.9140E-01 7.9140E-01 L  3  4  0 O
-     methanol
-methanol (CH%3#OH)
-      67.6   3.5160   0.2529   2.7639  0.08970   3.5477     0.00
-         1  4.000000  0.125822
-         6  1.000068  0.374852
-         8  1.000043  0.499326
-----------------------------------------------------------------------------
- 199 mix-D  5  -1.0000000000      0.56479 9.9000E-01 9.9000E-01 S  5  1  0 B
-     mix_D_wax
-mix D wax
-      60.9   3.0780   0.1371   2.7145  0.07490   3.6823     0.00
-         1  1.000000  0.134040
-         6  0.487068  0.777960
-         8  0.016459  0.035020
-        12  0.011941  0.038594
-        22  0.002260  0.014386
-----------------------------------------------------------------------------
- 200 MS20   5  -1.0000000000      0.53886 1.0000E+00 1.0000E+00 S  6  1  0 B
-     ms20_tissue_substitute
-ms20 tissue substitute
-      75.1   3.5341   0.1997   2.8033  0.08294   3.6061     0.00
-         1  1.000000  0.081192
-         6  0.603046  0.583442
-         7  0.015774  0.017798
-         8  0.144617  0.186381
-        12  0.066547  0.130287
-        17  0.000315  0.000900
-----------------------------------------------------------------------------
- 201 Skelm  5  -1.0000000000      0.54938 1.0400E+00 1.0400E+00 S 13  1  0 B
-     skeletal_muscle_ICRP
-skeletal muscle (ICRP)
-      75.3   3.4809   0.2282   2.7999  0.08636   3.5330     0.00
-         1  1.000000  0.100637
-         6  0.089918  0.107830
-         7  0.019793  0.027680
-         8  0.472487  0.754773
-        11  0.000327  0.000750
-        12  0.000078  0.000190
-        15  0.000582  0.001800
-        16  0.000753  0.002410
-        17  0.000223  0.000790
-        19  0.000774  0.003020
-        20  0.000007  0.000030
-        26  0.000007  0.000040
-        30  0.000008  0.000050
-----------------------------------------------------------------------------
- 202 Strim  5  -1.0000000000      0.55005 1.0400E+00 1.0400E+00 S  9  1  0 B
-     striated_muscle_ICRU
-striated muscle (ICRU)
-      74.7   3.4636   0.2249   2.8032  0.08507   3.5383     0.00
-         1  1.000000  0.101997
-         6  0.101201  0.123000
-         7  0.024693  0.035000
-         8  0.450270  0.729003
-        11  0.000344  0.000800
-        12  0.000081  0.000200
-        15  0.000638  0.002000
-        16  0.001541  0.005000
-        19  0.001264  0.005000
-----------------------------------------------------------------------------
- 203 Eqvmu  5  -1.0000000000      0.54828 1.1100E+00 1.1100E+00 L  4  1  0 B
-     muscle-equivalent_liquid_with_sucrose
-muscle-equivalent liquid with sucrose
-      74.3   3.3910   0.2098   2.7550  0.09481   3.4699     0.00
-         1  1.000000  0.098234
-         6  0.133452  0.156214
-         7  0.025970  0.035451
-         8  0.455395  0.710100
-----------------------------------------------------------------------------
- 204 Eqvmu  5  -1.0000000000      0.55014 1.0700E+00 1.0700E+00 L  4  1  0 B
-     muscle-equivalent_liquid_without_sucrose
-muscle-equivalent liquid without sucrose
-      74.2   3.4216   0.2187   2.7680  0.09143   3.4982     0.00
-         1  1.000000  0.101969
-         6  0.098807  0.120058
-         7  0.025018  0.035451
-         8  0.458746  0.742522
-----------------------------------------------------------------------------
- 205 Napht  5  -1.0000000000      0.53053 1.1450E+00 1.1450E+00 S  2  8  0 O
-     naphtalene
-naphtalene (C%10#H%8#)
-      68.4   3.2274   0.1374   2.5429  0.14766   3.2654     0.00
-         1  8.000000  0.062909
-         6 10.000584  0.937091
-----------------------------------------------------------------------------
- 206 Nitro  5  -1.0000000000      0.51986 1.1987E+00 1.1987E+00 L  4  5  0 O
-     nitrobenzene
-nitrobenzene (C%6#H%5#NO%2#)
-      75.8   3.4073   0.1777   2.6630  0.12727   3.3091     0.00
-         1  5.000000  0.040935
-         6  6.000329  0.585374
-         7  1.000028  0.113773
-         8  2.000058  0.259918
-----------------------------------------------------------------------------
- 207 N2-O   5  -1.0000000000      0.49985 1.8309E-03 1.8309E-03 G  2  2  0 I
-     nitrous_oxide
-nitrous oxide (N%2#O)
-      84.9  10.1575   1.6477   4.1565  0.11992   3.3318     0.00
-         7  2.000000  0.636483
-         8  1.000003  0.363517
-----------------------------------------------------------------------------
- 208 Elvam  5  -1.0000000000      0.55063 1.0800E+00 1.0800E+00 S  4  1  0 P
-     Nylon_du_Pont_Elvamide_8062M
-Nylon du Pont Elvamide 8062M
-      64.3   3.1250   0.1503   2.6004  0.11513   3.4044     0.00
-         1  1.000000  0.103509
-         6  0.525704  0.648415
-         7  0.069199  0.099536
-         8  0.090405  0.148539
-----------------------------------------------------------------------------
- 209 Nylon  5  -1.0000000000      0.54790 1.1400E+00 1.1800E+00 S  4 11  0 P
-     Nylon_type_6_6-6
-Nylon (type 6, 6/6) [(CH(CH%2#)%5#NO)%n#]
-      63.9   3.0634   0.1336   2.5834  0.11818   3.3826     0.00
-         1 11.000000  0.097976
-         6  6.000405  0.636856
-         7  1.000040  0.123779
-         8  1.000045  0.141389
-----------------------------------------------------------------------------
- 210 Nylon  5  -1.0000000000      0.55236 1.1400E+00 1.1400E+00 S  4 15  0 P
-     Nylon_type_6-10
-Nylon type 6/10 [(CH(CH%2#)%7#NO)%n#]
-      63.2   3.0333   0.1304   2.5681  0.11852   3.3912     0.00
-         1 15.000000  0.107062
-         6  8.000514  0.680449
-         7  1.000039  0.099189
-         8  1.000039  0.113300
-----------------------------------------------------------------------------
- 211 Rilsa  5  -1.0000000000      0.55649 1.4250E+00 1.4250E+00 S  4 21  0 P
-     Nylon_type_11_Rilsan
-Nylon type 11 Rilsan ([C%11#H%21#ON)%n#], [(CH(CH%2#)%10#NO)%n#])
-      61.6   2.7514   0.0678   2.4281  0.14868   3.2576     0.00
-         1 21.000000  0.115476
-         6 11.000696  0.720819
-         7  1.000035  0.076417
-         8  1.000042  0.087289
-----------------------------------------------------------------------------
- 212 Octan  5  -1.0000000000      0.57778 7.0260E-01 7.0260E-01 L  2 18  2 O
-     octane
-octane (C%8#H%18#)
-      54.7   3.1834   0.1882   2.5664  0.11387   3.4776     0.00
-         1 18.000000  0.158821
-         6  8.000541  0.841179
-Boiling point                 125.6
-Melting point                -58.7
-----------------------------------------------------------------------------
- 213 Paraf  5  -1.0000000000      0.57275 9.3000E-01 9.3000E-01 S  2 52  0 O
-     paraffin
-paraffin (CH%3#(CH%2#)%n\approx23#CH%3#)
-      55.9   2.9551   0.1289   2.5084  0.12087   3.4288     0.00
-         1 52.000000  0.148605
-         6 25.001575  0.851395
-----------------------------------------------------------------------------
- 214 Penta  5  -1.0000000000      0.58212 6.2620E-01 6.2620E-01 L  2 12  1 O
-     n-pentane
-n-pentane (C%5#H%12#)
-      53.6   3.2504   0.2086   2.5855  0.10809   3.5265     0.00
-         1 12.000000  0.167635
-         6  5.000308  0.832365
-Index of ref (n-1)*E6          1711.0         http://www.kayelaby.npl.co.uk/
-----------------------------------------------------------------------------
- 215 Photo  5  -1.0000000000      0.45453 3.8150E+00 3.8150E+00 S  8  1  0 M
-     photographic_emulsion
-photographic emulsion
-     331.0   5.3319   0.1009   3.4866  0.12399   3.0094     0.00
-         1  1.000000  0.014100
-         6  0.430082  0.072261
-         7  0.098602  0.019320
-         8  0.295338  0.066101
-        16  0.004213  0.001890
-        35  0.312321  0.349103
-        47  0.314193  0.474105
-        53  0.001757  0.003120
-----------------------------------------------------------------------------
- 216 Plast  5  -1.0000000000      0.54141 1.0320E+00 1.0320E+00 S  2 10  1 P
-     polyvinyltoluene
-polyvinyltoluene [(2-CH%3#C%6#H%4#CHCH%2#)%n#]
-      64.7   3.1997   0.1464   2.4855  0.16101   3.2393     0.00
-         1 10.000000  0.085000
-         6  9.033760  0.915000
-Index of refraction           1.58
-----------------------------------------------------------------------------
- 217 Pu-O2  5  -1.0000000000      0.40583 1.1460E+01 1.1460E+01 S  2  2  0 I
-     plutonium_dioxide
-plutonium dioxide (PuO%2#)
-     746.5   5.9719  -0.2311   3.5554  0.20594   2.6522     0.00
-         8  2.000000  0.118055
-        94  0.979460  0.881945
-----------------------------------------------------------------------------
- 218 Pacry  5  -1.0000000000      0.52767 1.1700E+00 1.1700E+00 S  3  3  0 P
-     polyacrylonitrile
-polyacrylonitrile [(C%3#H%3#N)%n#]
-      69.6   3.2459   0.1504   2.5159  0.16275   3.1975     0.00
-         1  3.000000  0.056983
-         6  3.000184  0.679056
-         7  1.000034  0.263962
-----------------------------------------------------------------------------
- 219 Lexan  5  -1.0000000000      0.52697 1.2000E+00 1.2000E+00 S  3 14  0 P
-     polycarbonate_Lexan
-polycarbonate (Lexan, [OC%6#H%4#C(CH%3#)%2#C%6#H%4#OCO)%n#])
-      73.1   3.3201   0.1606   2.6225  0.12860   3.3288     0.00
-         1 14.000000  0.055491
-         6 16.001127  0.755751
-         8  3.000142  0.188758
-----------------------------------------------------------------------------
- 220 Pchlo  5  -1.0000000000      0.52518 1.3000E+00 1.3000E+00 S  3 18  0 P
-     polychlorostyrene
-polychlorostyrene [(C%17#H%18#C%l2#)%n#]
-      81.7   3.4659   0.1238   2.9241  0.07530   3.5441     0.00
-         1 18.000000  0.061869
-         6 17.001129  0.696325
-        17  2.000101  0.241806
-----------------------------------------------------------------------------
- 221 Polye  5  -1.0000000000      0.57034 9.4000E-01 8.9000E-01 S  2  2  0 P
-     polyethylene
-polyethylene [(CH%2#CH%2#)%n#]
-      57.4   3.0016   0.1370   2.5177  0.12108   3.4292     0.00
-         1  2.000000  0.143711
-         6  1.000062  0.856289
-----------------------------------------------------------------------------
- 222 Poly   5  -1.0000000000      0.52037 1.4000E+00 1.4000E+00 S  3  4  0 P
-     polyethylene_terephthalate_Mylar
-polyethylene terephthalate (Mylar) [(C%10#H%8#O%4#)%n#]
-      78.7   3.3262   0.1562   2.6507  0.12679   3.3076     0.00
-         1  4.000000  0.041959
-         6  5.000266  0.625017
-         8  2.000059  0.333025
-----------------------------------------------------------------------------
- 223 Acryl  5  -1.0000000000      0.53937 1.1900E+00 1.1900E+00 S  3  8  1 P
-     polymethylmethacrylate_acrylic
-polymethylmethacrylate (acrylic, [(CH%2#C(CH%3#)(COOCH%3#))%n#]
-      74.0   3.3297   0.1824   2.6681  0.11433   3.3836     0.00
-         1  8.000000  0.080538
-         6  5.000308  0.599848
-         8  2.000073  0.319614
-Index of refraction        1.49
-----------------------------------------------------------------------------
- 224 Polyo  5  -1.0000000000      0.53287 1.4250E+00 1.4250E+00 S  3  2  0 P
-     polyoxymethylene
-polyoxymethylene [(CH%2#O)%n#]
-      77.4   3.2514   0.1584   2.6838  0.10808   3.4002     0.00
-         1  2.000000  0.067135
-         6  1.000059  0.400017
-         8  1.000035  0.532848
-----------------------------------------------------------------------------
- 225 Polyp  5  -1.0000000000      0.55998 9.4000E-01 9.0500E-01 S  2  3  2 P
-     polypropylene
-polypropylene [(CH(CH%3#)CH%2#)%n#]
-      57.4   3.0016   0.1370   2.5177  0.12108   3.4292     0.00
-         1  2.000000  0.143711
-         6  1.000062  0.856289
-Note: Chem formula wrong in Sternheimer. <i>I</i> and density effect constants
-      for polyethylene, scaled with density, were used for these calculations.
-----------------------------------------------------------------------------
- 226 Polys  5  -1.0000000000      0.53768 1.0600E+00 1.0600E+00 S  2  8  1 P
-     polystyrene
-polystyrene [(C%6#H%5#CHCH%2#)%n#]
-      68.7   3.2999   0.1647   2.5031  0.16454   3.2224     0.00
-         1  8.000000  0.077418
-         6  8.000541  0.922582
-Index of ref               1.59
-----------------------------------------------------------------------------
- 227 Teflo  5  -1.0000000000      0.47992 2.2000E+00 2.2000E+00 S  2  1  0 P
-     polytetrafluoroethylene_Teflon
-polytetrafluoroethylene (Teflon, [(CF%2#CF%2#)%n#])
-      99.1   3.4161   0.1648   2.7404  0.10606   3.4046     0.00
-         6  1.000000  0.240183
-         9  1.999945  0.759817
-----------------------------------------------------------------------------
- 228 KEL-F  5  -1.0000000000      0.48081 2.1000E+00 2.1000E+00 S  3  2  0 P
-     polytrifluorochloroethylene
-polytrifluorochloroethylene [(C%2#F%3#Cl)%n#]
-     120.7   3.8551   0.1714   3.0265  0.07727   3.5085     0.00
-         6  2.000000  0.206250
-         9  2.999925  0.489354
-        17  0.999983  0.304395
-----------------------------------------------------------------------------
- 229 Pviny  5  -1.0000000000      0.53432 1.1900E+00 1.1900E+00 S  3  6  0 P
-     polyvinylacetate
-polyvinylacetate [(CH%2#CHOCOCH%3#)%n#]
-      73.7   3.3309   0.1769   2.6747  0.11442   3.3762     0.00
-         1  6.000000  0.070245
-         6  4.000256  0.558066
-         8  2.000076  0.371689
-----------------------------------------------------------------------------
- 230 Pviny  5  -1.0000000000      0.54480 1.3000E+00 1.3000E+00 S  3  4  0 P
-     polyvinyl_alcohol
-polyvinyl alcohol [(C%2#H3-O-H)%n#]
-      69.7   3.1115   0.1401   2.6315  0.11178   3.3893     0.00
-         1  4.000000  0.091517
-         6  2.000131  0.545298
-         8  1.000039  0.363185
-----------------------------------------------------------------------------
- 231 Pviny  5  -1.0000000000      0.54537 1.1200E+00 1.1200E+00 S  3 13  0 P
-     polyvinyl_butyral
-polyvinyl butyral [(C%8#H%13#0%2#)%n#]
-      67.2   3.1865   0.1555   2.6186  0.11544   3.3983     0.00
-         1 13.000000  0.092802
-         6  8.000543  0.680561
-         8  2.000082  0.226637
-----------------------------------------------------------------------------
- 232 PVC    5  -1.0000000000      0.51201 1.3000E+00 1.3000E+00 S  3  3  0 P
-     polyvinylchloride_PVC
-polyvinylchloride (PVC) [(CH%2#CHCl)%n#]
-     108.2   4.0532   0.1559   2.9415  0.12438   3.2104     0.00
-         1  3.000000  0.048380
-         6  2.000138  0.384360
-        17  1.000053  0.567260
-----------------------------------------------------------------------------
- 233 Saran  5  -1.0000000000      0.49513 1.7000E+00 1.7000E+00 S  3  2  0 P
-     polyvinylidene_chloride_Saran
-polyvinylidene chloride (Saran) [(C%2#H%2#Cl%2#)%n#]
-     134.3   4.2506   0.1314   2.9009  0.15466   3.1020     0.00
-         1  2.000000  0.020793
-         6  2.000176  0.247793
-        17  2.000142  0.731413
-----------------------------------------------------------------------------
- 234 Pvnyd  5  -1.0000000000      0.49973 1.7600E+00 1.7600E+00 S  3  2  0 P
-     polyvinylidene_fluoride
-polyvinylidene fluoride [(CH%2#CHF%2#)%n#]
-      88.8   3.3793   0.1717   2.7375  0.10316   3.4200     0.00
-         1  2.000000  0.031480
-         6  2.000121  0.375141
-         9  2.000069  0.593379
-----------------------------------------------------------------------------
- 235 Pvnyl  5  -1.0000000000      0.53984 1.2500E+00 1.2500E+00 S  4  9  0 P
-     polyvinyl_pyrrolidone
-polyvinyl pyrrolidone [(C%6#H%9#NO)%n#]
-      67.7   3.1017   0.1324   2.5867  0.12504   3.3326     0.00
-         1  9.000000  0.081616
-         6  6.000414  0.648407
-         7  1.000042  0.126024
-         8  1.000044  0.143953
-----------------------------------------------------------------------------
- 236 K-I    5  -1.0000000000      0.43373 3.1300E+00 3.1300E+00 S  2  1  0 I
-     potassium_iodide_KI
-potassium iodide (KI)
-     431.9   6.1088   0.1044   3.3442  0.22053   2.7558     0.00
-        19  1.000000  0.235528
-        53  1.000000  0.764472
-----------------------------------------------------------------------------
- 237 K2-O   5  -1.0000000000      0.48834 2.3200E+00 2.3200E+00 S  2  1  0 I
-     potassium_oxide
-potassium oxide (K%2#O)
-     189.9   4.6463   0.0480   3.0110  0.16789   3.0121     0.00
-         8  1.000000  0.169852
-        19  2.000003  0.830148
-----------------------------------------------------------------------------
- 238 Propa  5  -1.0000000000      0.58962 1.8794E-03 1.8680E-03 G  2  8  2 O
-     propane
-propane (C%3#H%8#)
-      47.1   8.7878   1.4326   3.7998  0.09916   3.5920     0.00
-         1  8.000000  0.182855
-         6  3.000189  0.817145
-Boiling point                -42.1
-Melting point                -187.63
-----------------------------------------------------------------------------
- 239 Propa  5  -1.0000000000      0.58962 4.3000E-01 4.9300E-01 L  2  8  2 O
-     liquid_propane
-liquid propane (C%3#H%8#)
-      52.0   3.5529   0.2861   2.6568  0.10329   3.5620     0.00
-         1  8.000000  0.182855
-         6  3.000189  0.817145
-Boiling point                -42.1
-Melting point                -187.63
-----------------------------------------------------------------------------
- 240 n-pro  5  -1.0000000000      0.56577 8.0350E-01 8.0350E-01 L  3  8  0 O
-     n-propyl_alcohol
-n-propyl alcohol (C%3#H%7#OH)
-      61.1   3.2915   0.2046   2.6681  0.09644   3.5415     0.00
-         1  8.000000  0.134173
-         6  3.000193  0.599595
-         8  1.000037  0.266232
-----------------------------------------------------------------------------
- 241 Pyrid  5  -1.0000000000      0.53096 9.8190E-01 9.8190E-01 L  3  5  0 O
-     pyridine
-pyridine (C%5#H%5#N)
-      66.2   3.3148   0.1670   2.5245  0.16399   3.1977     0.00
-         1  5.000000  0.063710
-         6  5.000285  0.759217
-         7  1.000028  0.177073
-----------------------------------------------------------------------------
- 242 Rubbe  5  -1.0000000000      0.57034 9.2000E-01 9.2000E-01 S  2  8  0 O
-     rubber_butyl
-rubber butyl ([C%4#H8)%n#]
-      56.5   2.9915   0.1347   2.5154  0.12108   3.4296     0.00
-         1  8.000000  0.143711
-         6  4.000246  0.856289
-----------------------------------------------------------------------------
- 243 Rubbe  5  -1.0000000000      0.55785 9.2000E-01 9.2000E-01 S  2  8  0 O
-     rubber_natural
-rubber natural [(C%5#H8)%n#]
-      59.8   3.1272   0.1512   2.4815  0.15058   3.2879     0.00
-         1  8.000000  0.118371
-         6  5.000309  0.881629
-----------------------------------------------------------------------------
- 244 Rubbe  5  -1.0000000000      0.51956 1.2300E+00 1.2300E+00 S  3  5  0 O
-     rubber_neoprene
-rubber neoprene [(C%4#H%5#Cl)%n#]
-      93.0   3.7911   0.1501   2.9461  0.09763   3.3632     0.00
-         1  5.000000  0.056920
-         6  4.000259  0.542646
-        17  1.000049  0.400434
-----------------------------------------------------------------------------
- 245 Si-O2  5  -1.0000000000      0.49930 2.3200E+00 2.2000E+00 S  2  2  3 I
-     silicon_dioxide_fused_quartz
-silicon dioxide (fused quartz) (SiO%2#)
-     139.2   4.0029   0.1385   3.0025  0.08408   3.5064     0.00
-         8  2.000000  0.532565
-        14  1.000000  0.467435
-Melting point                   1713.
-Boiling point                   2950.
-Index of refraction             1.458
-----------------------------------------------------------------------------
- 246 Ag-Br  5  -1.0000000000      0.43670 6.4730E+00 6.4730E+00 S  2  1  0 I
-     silver_bromide_AgBr
-silver bromide (AgBr)
-     486.6   5.6139   0.0352   3.2109  0.24582   2.6820     0.00
-        35  1.000000  0.425537
-        47  1.000000  0.574463
-----------------------------------------------------------------------------
- 247 Ag-Cl  5  -1.0000000000      0.44655 5.5600E+00 5.5600E+00 S  2  1  0 I
-     silver_chloride_AgCl
-silver chloride (AgCl)
-     398.4   5.3437  -0.0139   3.2022  0.22968   2.7041     0.00
-        17  1.000000  0.247368
-        47  0.999989  0.752632
-----------------------------------------------------------------------------
- 248 Ag-ha  5  -1.0000000000      0.43663 6.4700E+00 6.4700E+00 S  3  1  0 M
-     ag_halides_in_phot_emulsion
-ag halides in phot emulsion
-     487.1   5.6166   0.0353   3.2117  0.24593   2.6814     0.00
-        35  1.000000  0.422895
-        47  1.004995  0.573748
-        53  0.004998  0.003357
-----------------------------------------------------------------------------
- 249 Ag-I   5  -1.0000000000      0.42594 6.0100E+00 6.0100E+00 S  2  1  0 I
-     silver_iodide_AgI
-silver iodide (AgI)
-     543.5   5.9342   0.0148   3.2908  0.25059   2.6572     0.00
-        47  1.000000  0.459458
-        53  1.000000  0.540542
-----------------------------------------------------------------------------
- 250 Skin   5  -1.0000000000      0.54932 1.1000E+00 1.1000E+00 S 13  1  0 B
-     skin_ICRP
-skin (ICRP)
-      72.7   3.3546   0.2019   2.7526  0.09459   3.4643     0.00
-         1  1.000000  0.100588
-         6  0.190428  0.228250
-         7  0.033209  0.046420
-         8  0.387683  0.619002
-        11  0.000031  0.000070
-        12  0.000025  0.000060
-        15  0.000107  0.000330
-        16  0.000497  0.001590
-        17  0.000755  0.002670
-        19  0.000218  0.000850
-        20  0.000038  0.000150
-        26  0.000002  0.000010
-        30  0.000002  0.000010
-----------------------------------------------------------------------------
- 251 Na2-C  5  -1.0000000000      0.49062 2.5320E+00 2.5320E+00 S  3  1  0 I
-     sodium_carbonate
-sodium carbonate (Na%2#CO%3#)
-     125.0   3.7178   0.1287   2.8591  0.08715   3.5638     0.00
-         6  1.000000  0.113323
-         8  2.999933  0.452861
-        11  1.999955  0.433815
-----------------------------------------------------------------------------
- 252 Na-I   5  -1.0000000000      0.42697 3.6670E+00 3.6670E+00 S  2  1  3 I
-     sodium_iodide_NaI
-sodium iodide (NaI)
-     452.0   6.0572   0.1203   3.5920  0.12516   3.0398     0.00
-        11  1.000000  0.153373
-        53  1.000002  0.846627
-Melting point               660.
-Boiling point              1304.
-Index of ref                1.775
-----------------------------------------------------------------------------
- 253 Na2-O  5  -1.0000000000      0.48404 2.2700E+00 2.2700E+00 S  2  1  0 I
-     sodium_monoxide
-sodium monoxide (Na%2#O)
-     148.8   4.1892   0.1652   2.9793  0.07501   3.6943     0.00
-         8  1.000000  0.258143
-        11  1.999995  0.741857
-----------------------------------------------------------------------------
- 254 Na-N-  5  -1.0000000000      0.49415 2.2610E+00 2.2610E+00 S  3  1  0 I
-     sodium_nitrate
-sodium nitrate (NaNO%3#)
-     114.6   3.6502   0.1534   2.8221  0.09391   3.5097     0.00
-         7  1.000000  0.164795
-         8  3.000009  0.564720
-        11  1.000004  0.270485
-----------------------------------------------------------------------------
- 255 Stilb  5  -1.0000000000      0.53260 9.7070E-01 9.7070E-01 S  2 12  0 O
-     stilbene
-stilbene (C%6#H%5#)CHCH(C%6#H%5#)
-      67.7   3.3680   0.1734   2.5142  0.16659   3.2168     0.00
-         1 12.000000  0.067101
-         6 14.000813  0.932899
-----------------------------------------------------------------------------
- 256 Sucro  5  -1.0000000000      0.53170 1.5805E+00 1.5805E+00 S  3 22  0 O
-     sucrose
-sucrose (C%12#H%22#O%11#)
-      77.5   3.1526   0.1341   2.6558  0.11301   3.3630     0.00
-         1 22.000000  0.064779
-         6 12.000771  0.421070
-         8 11.000442  0.514151
-----------------------------------------------------------------------------
- 257 Terph  5  -1.0000000000      0.52148 1.2340E+00 1.2340E+00 S  2 10  0 O
-     terphenyl
-terphenyl (C%18#H%10#)
-      71.7   3.2639   0.1322   2.5429  0.14964   3.2685     0.00
-         1 10.000000  0.044543
-         6 18.001057  0.955457
-----------------------------------------------------------------------------
- 258 Teste  5  -1.0000000000      0.55108 1.0400E+00 1.0400E+00 S 13  1  0 B
-     testes_ICRP
-testes (ICRP)
-      75.0   3.4698   0.2274   2.7988  0.08533   3.5428     0.00
-         1  1.000000  0.104166
-         6  0.074336  0.092270
-         7  0.013775  0.019940
-         8  0.468038  0.773884
-        11  0.000951  0.002260
-        12  0.000044  0.000110
-        15  0.000391  0.001250
-        16  0.000441  0.001460
-        17  0.000666  0.002440
-        19  0.000515  0.002080
-        20  0.000024  0.000100
-        26  0.000003  0.000020
-        30  0.000003  0.000020
-----------------------------------------------------------------------------
- 259 C2-Cl  5  -1.0000000000      0.48241 1.6250E+00 1.6250E+00 L  2  2  0 O
-     tetrachloroethylene
-tetrachloroethylene (C%2#C%l4#)
-     159.2   4.6619   0.1713   2.9083  0.18595   3.0156     0.00
-         6  2.000000  0.144856
-        17  3.999924  0.855144
-----------------------------------------------------------------------------
- 260 Tl-Cl  5  -1.0000000000      0.40861 7.0040E+00 7.0040E+00 S  2  1  0 I
-     thallium_chloride_TlCl
-thallium chloride (TlCl)
-     690.3   6.3009   0.0705   3.5716  0.18599   2.7690     0.00
-        17  1.000000  0.147822
-        81  0.999999  0.852187
-----------------------------------------------------------------------------
- 261 Soft   5  -1.0000000000      0.55121 1.0000E+00 1.0000E+00 S 13  1  0 B
-     soft_tissue_ICRP
-soft tissue (ICRP)
-      72.3   3.4354   0.2211   2.7799  0.08926   3.5110     0.00
-         1  1.000000  0.104472
-         6  0.186513  0.232190
-         7  0.017138  0.024880
-         8  0.380046  0.630238
-        11  0.000474  0.001130
-        12  0.000052  0.000130
-        15  0.000414  0.001330
-        16  0.000599  0.001990
-        17  0.000365  0.001340
-        19  0.000491  0.001990
-        20  0.000055  0.000230
-        26  0.000009  0.000050
-        30  0.000004  0.000030
-----------------------------------------------------------------------------
- 262 Tissu  5  -1.0000000000      0.54975 1.0000E+00 1.0000E+00 S  4  1  0 B
-     soft_tissue_ICRU_four-component
-soft tissue (ICRU four-component)
-      74.9   3.5087   0.2377   2.7908  0.09629   3.4371     0.00
-         1  1.000000  0.101172
-         6  0.092072  0.111000
-         7  0.018493  0.026000
-         8  0.474381  0.761828
-----------------------------------------------------------------------------
- 263 TE-ga  5  -1.0000000000      0.54993 1.0641E-03 1.0641E-03 G  4  1  0 B
-     tissue-equivalent_gas_Methane_based
-tissue-equivalent gas (Methane based)
-      61.2   9.9500   1.6442   4.1399  0.09946   3.4708     0.00
-         1  1.000000  0.101869
-         6  0.375802  0.456179
-         7  0.024846  0.035172
-         8  0.251564  0.406780
-----------------------------------------------------------------------------
- 264 TE-ga  5  -1.0000000000      0.55027 1.8263E-03 1.8263E-03 G  4  1  0 B
-     tissue-equivalent_gas_Propane_based
-tissue-equivalent gas (Propane based)
-      59.5   9.3529   1.5139   3.9916  0.09802   3.5159     0.00
-         1  1.000000  0.102672
-         6  0.465030  0.568940
-         7  0.024546  0.035022
-         8  0.180007  0.293366
-----------------------------------------------------------------------------
- 265 Ti-O2  5  -1.0000000000      0.47572 4.2600E+00 4.2600E+00 S  2  2  0 I
-     titanium_dioxide
-titanium dioxide (TiO%2#)
-     179.5   3.9522  -0.0119   3.1647  0.08569   3.3267     0.00
-         8  2.000000  0.400592
-        22  1.000271  0.599408
-----------------------------------------------------------------------------
- 266 Tolue  5  -1.0000000000      0.54265 8.6690E-01 8.6690E-01 L  2  8  0 O
-     toluene
-toluene (C%6#H%5#CH%3#)
-      62.5   3.3026   0.1722   2.5728  0.13284   3.3558     0.00
-         1  8.000000  0.087510
-         6  7.000463  0.912490
-----------------------------------------------------------------------------
- 267 C2-H-  5  -1.0000000000      0.48710 1.4600E+00 1.4600E+00 L  3  1  0 O
-     trichloroethylene
-trichloroethylene (C%2#HCl%3#)
-     148.1   4.6148   0.1803   2.9140  0.18272   3.0137     0.00
-         1  1.000000  0.007671
-         6  2.000158  0.182831
-        17  3.000193  0.809498
-----------------------------------------------------------------------------
- 268 Triet  5  -1.0000000000      0.53800 1.0700E+00 1.0700E+00 S  4 15  0 O
-     triethyl_phosphate
-triethyl phosphate C%6#H%15#PO%4#
-      81.2   3.6242   0.2054   2.9428  0.06922   3.6302     0.00
-         1 15.000000  0.082998
-         6  6.000356  0.395628
-         8  4.000136  0.351334
-        15  1.000036  0.170040
-----------------------------------------------------------------------------
- 269 W-F6   5  -1.0000000000      0.42976 2.4000E+00 2.4000E+00 S  2  6  0 I
-     tungsten_hexafluoride
-tungsten hexafluoride (WF%6#)
-     354.4   5.9881   0.3020   4.2602  0.03658   3.5134     0.00
-         9  6.000000  0.382723
-        74  1.000055  0.617277
-----------------------------------------------------------------------------
- 270 U-C2   5  -1.0000000000      0.39687 1.1280E+01 1.1280E+01 S  2  2  0 I
-     uranium_dicarbide
-uranium dicarbide (UC%2#)
-     752.0   6.0247  -0.2191   3.5208  0.21120   2.6577     0.00
-         6  2.000000  0.091669
-        92  0.999978  0.908331
-----------------------------------------------------------------------------
- 271 U-C    5  -1.0000000000      0.39194 1.3630E+01 1.3630E+01 S  2  1  0 I
-     uranium_monocarbide_UC
-uranium monocarbide (UC)
-     862.0   6.1210  -0.2524   3.4941  0.22972   2.6169     0.00
-         6  1.000000  0.048036
-        92  0.999982  0.951964
-----------------------------------------------------------------------------
- 272 U-O2   5  -1.0000000000      0.39996 1.0960E+01 1.0960E+01 S  2  2  0 I
-     uranium_oxide
-uranium oxide (UO%2#)
-     720.6   5.9605  -0.1938   3.5292  0.20463   2.6711     0.00
-         8  2.000000  0.118502
-        92  0.999999  0.881498
-----------------------------------------------------------------------------
- 273 Urea   5  -1.0000000000      0.53284 1.3230E+00 1.3230E+00 S  4  4  0 O
-     urea
-urea (CO(NH%2#)%2#)
-      72.8   3.2032   0.1603   2.6525  0.11609   3.3461     0.00
-         1  4.000000  0.067131
-         6  1.000072  0.199999
-         7  2.000083  0.466459
-         8  1.000046  0.266411
-----------------------------------------------------------------------------
- 274 Valin  5  -1.0000000000      0.54632 1.2300E+00 1.2300E+00 S  4 11  0 O
-     valine
-valine (C%5#H%11#NOi%2#)
-      67.7   3.1059   0.1441   2.6227  0.11386   3.3774     0.00
-         1 11.000000  0.094641
-         6  5.000305  0.512645
-         7  1.000035  0.119565
-         8  2.000072  0.273150
-----------------------------------------------------------------------------
- 275 Viton  5  -1.0000000000      0.48585 1.8000E+00 1.8000E+00 S  3  2  0 P
-     viton_fluoroelastomer
-viton fluoroelastomer [(C%5#H%2#F8)%n#]
-      98.6   3.5943   0.2106   2.7874  0.09965   3.4556     0.00
-         1  2.000000  0.009417
-         6  5.000366  0.280555
-         9  8.000378  0.710028
-----------------------------------------------------------------------------
- 276 Water  5  -1.0000000000      0.55509 1.0000E+00 1.0000E+00 L  2  2  3 I
-     water_liquid
-water (liquid) (H%2#O)
-      79.7   3.5017   0.2400   2.8004  0.09116   3.4773     0.00
-         1  2.000000  0.111894
-         8  1.000044  0.888106
-Index of refraction         1.333
-Melting point                0.0
-Boiling point               99.964             CRC2006 4-98
-----------------------------------------------------------------------------
- 277 Water  5  -1.0000000000      0.55509 7.5618E-04 7.5618E-04 G  2  2  0 I
-     water_vapor
-water (vapor) (H%2#O)
-      71.6  10.5962   1.7952   4.3437  0.08101   3.5901     0.00
-         1  2.000000  0.111894
-         8  1.000044  0.888106
-----------------------------------------------------------------------------
- 278 Xylen  5  -1.0000000000      0.54631 8.7000E-01 8.7000E-01 L  2 10  0 O
-     xylene
-xylene (C%8#H%10#)
-      61.8   3.2698   0.1695   2.5675  0.13216   3.3564     0.00
-         1 10.000000  0.094935
-         6  8.000548  0.905065
-----------------------------------------------------------------------------
- 279 Heavy  5  -1.0000000000      0.40594 1.9300E+01 1.9300E+01 S  3  1  1 M
-     heavymet_in_ATLAS_calorimeter
-heavymet in ATLAS calorimeter
-     727.0   5.4059   0.2167   3.4960  0.15509   2.8447     0.14
-        28  1.000000  0.035000
-        29  0.395844  0.015000
-        74  8.665723  0.950000
-Note: Tungsten properties except for average Z/A used in calculations
-----------------------------------------------------------------------------
- 280 Heavy  5  -1.0000000000      0.40915 1.9300E+01 1.9300E+01 S  3  1  1 M
-     heavymet_in_Rochester_gamma_stop
-heavymet as Rochester gamma stop
-     727.0   5.4059   0.2167   3.4960  0.15509   2.8447     0.14
-        28  1.000000  0.060000
-        29  0.615758  0.040000
-        74  4.788952  0.900000
-Note: Tungsten properties except for average Z/A used in calculations
-----------------------------------------------------------------------------
- 281 Std-R  0  11.0000000000   9  0.50000 2.6500E+00 2.6500E+00 S  2  1  1 M
-     standard_rock
-standard rock
-     136.4   3.7738   0.0492   3.0549  0.08301   3.4120     0.00
-        11  1.000000  1.000000
-        12  0.000000  0.000000
-Note:  <A HREF="../standardrock.html">Explanation of "Standard Rock."
-----------------------------------------------------------------------------
- 282 Hydro  3   1.0080000000   7  0.99212 6.0000E-02 7.0800E-02 L  1  1  1 E
-H    nonsense           
-    Liquid hydrogen (H%2#)
-      21.8   2.8438   0.2000   2.0000  0.32969   3.0000     0.00
-         1  1.000000  1.000000
-Note: This looks like nonsense.  ind = 85 is correct!
-----------------------------------------------------------------------------
- 283 Heliu  6   4.0026020000   2  0.49967 1.2490E-01 1.2490E-01 L  1  1  2 E
-He   liquid_helium
-liquid helium (He)
-      41.8   4.5180   0.4729   2.0000  0.65713   3.0000     0.00
-         2  1.000000  1.000000
-Boiling point                   -268.93
-Index of ref                    1.024
-----------------------------------------------------------------------------
- 284 Nitro  3  14.0070000000   2  0.49976 8.0700E-01 8.0700E-01 L  1  1  4 E
-N   liquid_nitrogen
-liquid nitrogen (N%2#)
-      82.0   3.9996   0.3039   2.0000  0.53289   3.0000     0.00
-         7  1.000000  1.000000
-Melting point                   -210.00
-Boiling point                   -195.86
-Index of ref                    1.19876              CRC2006 4-148
-Note: Index of refraction at boiling point, 1 atm.
-----------------------------------------------------------------------------
- 285 Oxyge  3  15.9990000000   3  0.50002 1.1410E+00 1.1410E+00 L  1  1  4 E
-O   liquid_oxygen
-liquid oxygen (O%2#)
-      95.0   3.9471   0.2868   2.0000  0.52231   3.0000     0.00
-         8  1.000000  1.000000
-Melting point (C)               -218.79
-Boiling point (C)               -182.95
-Index of ref                    1.2243
-Note: Index of refraction at boiling point, 1 atm.
-----------------------------------------------------------------------------
- 286 Fluor  9  18.9984031630   6  0.47372 1.5070E+00 1.5070E+00 L  1  1  2 E
-F   liquid_fluorine
-liquid fluorine (F%2#)
-     115.0   4.1050   0.2000   3.0000  0.14504   3.0000     0.00
-         9  1.000000  1.000000
-Melting point                   -219.62
-Boiling point                   -188.12
-----------------------------------------------------------------------------
- 287 Neon   4  20.1797000000   6  0.49555 1.2040E+00 1.2040E+00 L  1  1  3 E
-Ne   liquid_neon
-liquid neon (Ne)
-     137.0   4.6345   0.2000   3.0000  0.16916   3.0000     0.00
-        10  1.000000  1.000000
-Boiling point                -246.08
-Melting point                -248.59
-Index of ref                  1.092
-----------------------------------------------------------------------------
- 288 Chlor  3  35.4530000000   2  0.47951 1.5740E+00 1.5740E+00 L  1  1  2 E
-Cl   liquid_chlorine
-liquid chlorine (Cl%2#)
-     174.0   4.8776   0.2000   3.0000  0.18024   3.0000     0.00
-        17  1.000000  1.000000
-Melting point             -101.5
-Boiling point             -34.04
-----------------------------------------------------------------------------
- 289 Argon  3  39.9480000000   1  0.45059 1.3960E+00 1.3960E+00 L  1  1  3 E
-Ar   liquid_argon
-liquid argon (Ar)
-     188.0   5.2146   0.2000   3.0000  0.19559   3.0000     0.00
-        18  1.000000  1.000000
-Boiling point              -185.85
-Melting point                -189.36
-Index of ref                1.233
-----------------------------------------------------------------------------
- 290 Bromi  3  79.9040000000   1  0.43803 3.1028E+00 3.1028E+00 L  1  1  2 E
-Br   liquid_bromine
-bromine liquid (Br%2#)
-     357.0   0.0000   0.0000   0.0000  0.0000   0.0000     0.00
-        35  1.000000  1.000000
-melting point              -7.2
-boiling point              58.78
-----------------------------------------------------------------------------
- 291 Krypt  3  83.7980000000   2  0.42960 2.4180E+00 2.4180E+00 L  1  1  4 E
-Kr   liquid_krypton_Kr
-liquid krypton (Kr)
-     352.0   5.9674   0.4454   3.0000  0.23491   3.0000     0.00
-        36  1.000000  1.000000
-melting point              -157.36
-boiling point              -153.22
-Index refraction          1.3032                 CRC2006 4-148
-Note: Index of refraction at boiling point, 1 atm.
-----------------------------------------------------------------------------
- 292 Xenon  3 131.2930000000   6  0.41129 2.9530E+00 2.9530E+00 L  1  1  4 E
-Xe   liquid_xenon_Xe
-liquid xenon (Xe)
-     482.0   6.4396   0.5993   3.0000  0.26595   3.0000     0.00
-        54  1.000000  1.000000
-Melting point             -111.75
-Boiling point             -108.0
-Index refraction          1.3918                 CRC2006 4-148
-Note: Index of refraction at boiling point, 1 atm.
-----------------------------------------------------------------------------
- 293 C-O2   5  -1.0000000000      0.49989 1.5630E+00 1.5630E+00 S  2  2  1 I
-     solid_carbon_dioxide_dry_ice
-solid carbon dioxide (dry ice, CO%2#)
-      85.0   3.4513   0.2000   2.0000  0.43387   3.0000     0.00
-         6  2.000000  0.272916
-         8  4.000010  0.727084
-Note: Sublimation point  194.7 K =  -78.4 C
-----------------------------------------------------------------------------
- 294 Hydro  5   1.0079400000   7  0.99212 6.0000E-02 6.0000E-02 L  1  1  0 E
-H   bubble_chamber_H_liquid
-Hydrogen BC liquid DEG calc to check code
-      21.8   3.0093   0.2000   2.0000  0.35807   3.0000     0.00
-         1  1.000000  1.000000
-----------------------------------------------------------------------------
- 295 Water  5  -1.0000000000      0.55509 1.0000E+00 1.0000E+00 L  2  2  0 I
-     water_as_calc_from_steam_to_check_code
-water as calc from steam to check code
-      71.6   3.5017   0.2000   2.0000  0.44251   3.0000     0.00
-         1  2.000000  0.111894
-         8  1.000044  0.888106
-----------------------------------------------------------------------------
- 296 Aerog  5  -1.0000000000      0.50093 2.0000E-01 2.0000E-01 S  3  2  1 M
-     silica_aerogel
-silica aerogel for rho = 0.2 (0.03 H%2#O, 0.97 SiO%2#)
-     139.2   6.4507   0.6029   3.0000  0.26675   3.0000     0.00
-         8  2.000000  0.543192
-        14  1.000000  0.453451
-         1  2.000000  0.003357
-Note: See A. R. Buzykaev et al, NIM A433 396 (1999)
-----------------------------------------------------------------------------
- 297 Carbo  4  12.0107000000   8  0.49955 2.2650E+00 3.5200E+00 S  1  1  2 E
-C   carbon_gem_diamond
-carbon (gem diamond)
-      78.0   2.8680  -0.0178   2.3415  0.26142   2.8697     0.12
-         6  1.000000  1.000000
-Note: variety of melting points found, e.g. 4400 C, 3675 C
-Index of ref (n-1)*E6           2.419
-----------------------------------------------------------------------------
- 298 Deute  9   2.014101764   13  0.49650 1.8000E-04 1.6770E-04 D  1  1  3 E
-D   deuterium_gas
-deuterium gas (D%2#)
-      19.2   9.5835   1.8639   3.2718  0.14092   5.7273     0.00
-         1  1.000000  1.000000
-Boiling point (C)                -249.5       (mass from Phys. Rev. A 47, 3433 - 3436 (1993))
-Triple point                   -254.461       CRC2006
-Index of ref (n-1)*E6           138.0
-----------------------------------------------------------------------------
- 299 D-liq  9   2.014101764   13  0.49650 1.4320E-01 1.6380E-01 L  1  1  3 E
-D   liquid_deuterium
-liquid deuterium (D%2#)
-      21.8   3.2632   0.4759   1.9215  0.13483   5.6249     0.00
-         1  1.000000  1.000000
-Boiling point                    -249.5
-Triple point                   -254.461       CRC2006
-Index of ref                    1.112
-----------------------------------------------------------------------------
- 300 Salt   5  -1.0000000000      0.47910 2.1650E+00 2.1700E+00 S  2  2  3 I
-     sodium_chloride_NaCl
-sodium chloride (NaCl)
-     175.3   4.4250   0.2000   3.0000  0.15962   3.0000     0.00
-        11  1.000000  0.393375
-        17  1.000000  0.606626
-Melting point  (C)                 802.018     CRC2008  15-11
-Boiling point  (C)                 1465.
-Index of refraction            1.544
-----------------------------------------------------------------------------
- 301 PbWO4  5  -1.0000000000      0.41315 8.3900E+00 8.3000E+00 S  3  1  2 I
-     lead_tungstate
-lead tungstate (PbWO%4#)
-     600.7   5.8420   0.4045   3.0000  0.22758   3.0000     0.00
-        82  1.000000  0.455347
-        74  1.000000  0.404011
-         8  4.000000  0.140462
-Melting point               1123.
-Index of refraction         2.20
-----------------------------------------------------------------------------
- 302 Calif  5 251.0795900000   3  0.39031 1.5100E+00 1.5100E+01 S  1  1  3 R
-Cf   californium_Cf
-californium (Cf)
-     966.0   6.3262   0.5623   3.0000  0.25796   3.0000     0.00
-        98  1.000000  1.000000
-melting                      900.
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: I<SUB><I>eff</I></SUB> = 966 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 303 Einst  4 252.0830000000   4  0.39273 0.0000E+00 1.4000E+01 S  1  1  3 R
-Es   einsteinium_Es
-einsteinium (Es)
-     980.0   6.3488   0.5697   3.0000  0.25952   3.0000     0.00
-        99  1.000000  1.000000
-melting                       860.
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 980 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 304 Fermi  5 257.0951000000   5  0.38896 0.0000E+00 1.4000E+01 S  1  1  3 R
-Fm   fermium_Fm
-fermium (Fm)
-     994.0   6.3868   0.5821   3.0000  0.26219   3.0000     0.00
-       100  1.000000  1.000000
-Melting:            1527.
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 994 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 305 Mende  5 258.0984300000   3  0.39132 0.0000E+00 1.4000E+01 S  1  1  3 R
-Md   mendelevium_Md
-mendelevium (Md)
-    1007.0   6.4068   0.5886   3.0000  0.26360   3.0000     0.00
-       101  1.000000  1.000000
-Melting                 827.
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1007 eV assumed in calculating critical energies and <I><I>dE/dx</I></I>.
-----------------------------------------------------------------------------
- 306 Nobel  4 259.1010000000   7  0.39367 0.0000E+00 1.4000E+01 S  1  1  2 R
-No   nobelium_No
-nobelium (No)
-    1020.0   6.4264   0.5950   3.0000  0.26500   3.0000     0.00
-       102  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1020 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 307 Lawre  5 262.1096100000   2  0.39296 0.0000E+00 1.4000E+01 S  1  1  2 R
-Lr   lawrencium_Lr
-lawrencium (Lr)
-    1034.0   6.4555   0.6045   3.0000  0.26710   3.0000     0.00
-       103  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = Z*10.0 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 308 Ruthe  5 267.1217900000   4  0.38934 0.0000E+00 1.4000E+01 S  1  1  2 R
-Rf   rutherfordium_Rf
-rutherfordium (Rf)
-    1047.0   6.4898   0.6157   3.0000  0.26960   3.0000     0.00
-       104  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1047 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 309 Dubni  5 268.1256700000   4  0.39161 0.0000E+00 1.4000E+01 S  1  1  2 R
-Db   dubnium_Db
-dubnium (Db)
-    1061.0   6.5105   0.6224   3.0000  0.27114   3.0000     0.00
-       105  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1061 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 310 Seabo  5 269.1286300000   5  0.39095 0.0000E+00 1.4000E+01 S  1  1  2 R
-Sg   seaborgium_Sg
-seaborgium (Sg)
-    1074.0   6.5365   0.6309   3.0000  0.27308   3.0000     0.00
-       106  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1074 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 311 Bohri  5 270.1333600000   4  0.39610 0.0000E+00 1.4000E+01 S  1  1  2 R
-Bh   bohrium_Bh
-bohrium (Bh)
-    1087.0   6.5549   0.6369   3.0000  0.27447   3.0000     0.00
-       107  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1087 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 312 Hassi  5 269.1337500000  13  0.40129 0.0000E+00 1.4000E+01 S  1  1  2 R
-Hs   hassium_Hs
-hassium (Hs)
-    1102.0   6.5913   0.6488   3.0000  0.27724   3.0000     0.00
-       108  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1102 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 313 Meitn  4 278.1563000000   7  0.39471 0.0000E+00 1.4000E+01 S  1  1  2 R
-Mt   meitnerium_Mt
-meitnerium (Mt)
-    1115.0   6.6019   0.6522   3.0000  0.27805   3.0000     0.00
-       109  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1115 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 314 Darms  4 281.1645000000   6  0.39123 0.0000E+00 1.4000E+01 S  1  1  2 R
-Ds   darmstadtium_Ds
-darmstadtium (Ds)
-    1129.0   6.6357   0.6632   3.0000  0.28068   3.0000     0.00
-       110  1.000000  1.000000
-Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1129 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 315 Roent  4 282.1691200000   7  0.39620 0.0000E+00 1.4000E+01 S  1  1  2 R
-Rg   roentgenium_Rg
-roentgenium (Rg)
-    1143.0   6.6477   0.6672   3.0000  0.28162   3.0000     0.00
-       111  1.000000  1.000000
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1143 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 316 Coper  5 285.17712        5  0.39274 0.0000E+00 1.4000E+01 S  1  1  2 R
-Cn   copernicium_Cn
-copernicium (Cn)
-    1156.0   6.6791   0.6774   3.0000  0.28410   3.0000     0.00
-       112  1.000000  1.000000
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = Z*10.0 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 317 nihon  5 286.1822100000   6  0.39764 0.0000E+00 1.4000E+01 S  1  1  1 R
-Nh   nihonium_Nh   
-nihonium (Nh)
-    1171.0   6.6925   0.6818   3.0000  0.28517   3.0000     0.00
-       113  1.000000  1.000000
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1171 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 318 flero  5 289.1904200000   5  0.39421 0.0000E+00 1.4000E+01 S  1  1  1 R
-Fl   flerovium_Fl
-flerovium (Fl)
-    1185.0   6.7249   0.6923   3.0000  0.28779   3.0000     0.00
-       114  1.000000  1.000000
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1185 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 319 mosco  5 289.1936300000   6  0.39904 0.0000E+00 1.4000E+01 S  1  1  1 R
-Mc   moscovium_Mc  
-moscovium (Mc)  
-    1199.0   6.7363   0.6960   3.0000  0.28871   3.0000     0.00
-       115  1.000000  1.000000
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1199 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 320 liver  4 293.2045000000   6  0.39563 0.0000E+00 1.4000E+01 S  1  1  1 R
-Lv   livermorium_Lv
-livermorium (Lv)
-    1213.0   6.7571   0.7028   3.0000  0.29041   3.0000     0.00
-       116  1.000000  1.000000
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1213 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 321 tenne  4 294.2105100000   7  0.39796 0.0000E+00 1.4000E+01 S  1  1  1 R
-Ts   tennessine_Ts 
-tennessine (Ts)
-    1227.0   6.7800   0.7103   3.0000  0.29231   3.0000     0.00
-       117  1.000000  1.000000
-Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1227 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 322 ogane  5 294.2139220000   8  0.40107 1.2000E-02 1.2000E-02 G  1  1  2 R
-Og   oganesson_Og  
-oganesson (Og)   
-    1242.0  13.8662   2.0204  -1.9972 -0.07035   3.0000     0.00
-       118  1.000000  1.000000
-Note: Density is that of an ideal monatomic gas.
-Note: I<SUB><I>eff</I></SUB> = 1242 eV assumed in calculating critical energies and <I>dE/dx</I>.
-----------------------------------------------------------------------------
- 323 Astat  5 209.9871500000   6  0.40479 0.0000E+00 5.0000E+00 S  1  1  3 R
-At   astatine_At
-astatine (At)
-     825.0   7.0039   0.7833   3.0000  0.31184   3.0000     0.00
-        85  1.000000  1.000000
-Melting :                     302.
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope (8.1 hr).
-Note: Density 5.0 g/cm<SUP>3</SUP> assumed.
-----------------------------------------------------------------------------
- 324 Franc  5 223.0197400000   2  0.39010 1.8700E+00 1.8700E+00 S  1  1  4 R
-Fr   francium_Fr
-francium (Fr)
-     827.0   8.0292   1.1175   3.0000  0.43214   3.0000     0.00
-        87  1.000000  1.000000
-Melting                     27.
-Boiling                    677.
-Note: Francium is less stable than any other element lighter than nobelium, element 102.
-Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017.
-----------------------------------------------------------------------------
- 325 Ice    5  -1.0000000000      0.55509 1.0000E+00 0.9180E+00 L  2  2  3 I
-     water_ice
-water (ice) (H%2#O)
-      79.7   3.5017   0.2400   2.8004  0.09116   3.4773     0.00
-         1  2.000000  0.111894
-         8  1.000044  0.888106
-Index of refraction         1.309
-Melting point                0.0
-Boiling point               99.964             CRC2006 4-98
-----------------------------------------------------------------------------
- 326 CF4    5  -1.0000000000      0.47721 3.78E-3    3.78E-3    G  2  1  4 O
-     carbon_tetrafluoride
-carbon tetrafluoride (CF%4#)
-     115.0   0.0      0.        .0000  0.         .0000     0.00
-         6  1.000000  0.136548
-         9  4.000000  0.86345
-Melting :                     -183.6
-boiling                       -127.8
-Note: Physical properties such as gas density are not well vetted
-Note: Ieff supplied by Hans Bichsel
-----------------------------------------------------------------------------
- 327 LaBr3  5  -1.0000000000      0.42787 5.2900e+00 5.2900e+00 S  2  1  1 I
-     lanthanum_bromide
-lanthanum bromide (LaBr%3#)
-     454.5   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        57  1.000000  0.366875
-        35  3.000000  0.633124
-Note: Ieff calculated using the ICRU37 algorithm given in Table 5.1
-----------------------------------------------------------------------------
- 328 YBr3   5  -1.0000000000      0.43820 5.2900e+00 5.2900e+00 S  2  1  1 I
-     yttrium_bromide
-yttrium bromide (YBr%3#)
-     410.0   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        39  1.000000  0.270545
-        35  3.000000  0.729455
-Note: Ieff calculated using the ICRU37 algorithm given in Table 5.1
-----------------------------------------------------------------------------
- 329 BSO    5  -1.0000000000      0.42260 9.2000e+00 7.1200e+00 S  3 12  3 I
-     bismuth_silicate_BSO
-bismuth silicate (BSO) [(Bi%2#O%3#)%2#(SiO%2#)%3#]
-     519.2   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-         8 12.000000  0.172629
-        14  3.000000  0.075759
-        83  4.000000  0.751613
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-Note: Evalite structure; less common is Bi{12}SiO{20}
-Note: Check density. Probably wrong
-----------------------------------------------------------------------------
- 330 PbF2   5  -1.0000000000      0.40784 7.7700e+00 7.7700e+00 S  2  1  1 I
-     lead_fluoride
-lead fluoride (PbF%2#)
-     635.4   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        82  1.000000  0.845035
-         9  2.000000  0.154965
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 331 LaF3   5  -1.0000000000      0.42879 5.9000e+00 5.9000e+00 S  2  1  1 I
-     lanthanum_fluoride
-lanthanum fluoride (LaF%3#)
-     336.3   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        57  1.000000  0.709061
-         9  3.000000  0.290939
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 332 CeF3   5  -1.0000000000      0.43123 6.1600e+00 6.1600e+00 S  2  1  1 I
-     cerium_fluoride
-cerium fluoride (CeF%3#)
-     348.4   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        58  1.000000  0.710847
-         9  3.000000  0.289153
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 333 LuF3   5  -1.0000000000      0.42248 8.3000e+00 8.3000e+00 S  2  1  1 I
-     lutetium_fluoride
-lutetium fluoride (LuF%3#)
-     458.7   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        71  1.000000  0.754291
-         9  3.000000  0.245709
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 334 LaCl3  5  -1.0000000000      0.44034 3.8600e+00 3.8600e+00 S  2  1  1 I
-     lanthanum_chloride
-lanthanum chloride (LaCl%3#)
-     329.5   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        57  1.000000  0.566350
-        17  3.000000  0.433650
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 335 LuAlO  5  -1.0000000000      0.43209 8.3000e+00 8.3000e+00 S  3  1  1 I
-     lutetium_aluminum_oxide_1
-lutetium aluminum oxide (1) (LuAlO%3#)
-     423.2   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        71  1.000000  0.700017
-        13  1.000000  0.107949
-         8  3.000000  0.192034
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 336 LuAlO  5  -1.0000000000      0.43907 6.7300e+00 6.7300e+00 S  3  3  1 I
-     lutetium_aluminum_oxide_2
-lutetium aluminum oxide (2) (Lu%3#Al%5#O%12#)
-     365.9   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        71  3.000000  0.616224
-        13  5.000000  0.158379
-         8 12.000000  0.225396
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 337 LuSiO  5  -1.0000000000      0.42793 7.4000e+00 7.4000e+00 S  3  2  1 I
-     lutetium_silicon_oxide
-lutetium silicon oxide (Lu%2#SiO%5#)
-     472.0   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        71  2.000000  0.764020
-        14  1.000000  0.061320
-         8  5.000000  0.174660
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 338 YAlO-1 5  -1.0000000000      0.46374 5.5000e+00 5.5000e+00 S  3  1  1 I
-     yttrium_aluminum_oxide_1
-yttrium aluminum oxide (1) (YAlO%3#)
-     239.3   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        39  1.000000  0.542487
-        13  1.000000  0.164636
-         8  3.000000  0.292876
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 339 YAlO-2 5  -1.0000000000      0.46831 4.5600e+00 4.5600e+00 S  3  3  1 I
-     yttrium_aluminum_oxide_2
-yttrium aluminum oxide (2) (Y%3#Al%5#O%12#)
-     218.0   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        39  3.000000  0.449308
-        13  5.000000  0.227263
-         8 12.000000  0.323428
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 340 YSiO   5  -1.0000000000      0.46171 4.5400e+00 4.5400e+00 S  3  2  1 I
-     yttrium_silicon_oxide
-yttrium silicon oxide (Y%2#SiO%5#)
-     258.1   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        39  2.000000  0.621949
-        14  1.000000  0.098237
-         8  5.000000  0.279813
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 341 GdSiO  5  -1.0000000000      0.43069 6.7100e+00 6.7100e+00 S  3  2  1 I
-     gadolinium_silicate
-gadolinium silicate (Gd%2#SiO%5#)
-     405.4   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        64  2.000000  0.744233
-        14  1.000000  0.066462
-         8  5.000000  0.189305
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
-----------------------------------------------------------------------------
- 342 baksa  5  -1.0000000000      0.49228 2.7400e+00 2.7400e+00 S  2  0  1 I
-      baksan_rock
-baksan rock
-     175.6   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        11  0.100000  0.095103
-        12  0.900000  0.904897
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
- 343 bakst  5  -1.0000000000      0.49228 2.7400e+00 2.6500e+00 S  2  0  1 I
-      baksan_rock_st
-baksan rock, std rock density
-     175.6   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        11  0.100000  0.095103
-        12  0.900000  0.904897
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
- 344 MtBla  5  -1.0000000000      0.48003 2.6000e+00 2.6000e+00 S  2  0  1 I
-      MtBlanc_rock
-Mt Blanc rock
-     159.2   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-         6  0.132000  0.073601
-        11  0.868000  0.926399
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
- 345 MtBst  5  -1.0000000000      0.48003 2.6000e+00 2.6500e+00 S  2  0  1 I
-      MtBlanc_rock_sd
-Mt Blanc rock, std rock density
-     159.2   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-         6  0.132000  0.073601
-        11  0.868000  0.926399
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
- 346 KGFst  5  -1.0000000000      0.48605 3.0200e+00 2.6500e+00 S  2  0  1 I
-      KGF_rock_st
-Kolar Gold Fields rock, std rock density
-     183.4   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        12  0.380000  0.355713
-        13  0.620000  0.644287
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
- 347   KGF  5  -1.0000000000      0.48605 3.0200e+00 3.0200e+00 S  2  0  1 I
-      KGF_rock
-Kolar Gold Fields rock
-     183.4   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        12  0.380000  0.355713
-        13  0.620000  0.644287
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
- 348    UD  5  -1.0000000000      0.49602 2.7000e+00 2.7000e+00 S 11  0  1 I
-      UD_rock
-UD rock for doug
-     145.4   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        14  0.245239  0.334025
-        22  0.001368  0.003176
-        13  0.056485  0.073911
-        26  0.009477  0.025666
-        25  0.000148  0.000394
-        12  0.004120  0.004856
-        20  0.009895  0.019232
-        11  0.041643  0.046428
-        19  0.001606  0.003045
-        15  0.000592  0.000889
-         8  0.629426  0.488377
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
- 349   LMP  5  -1.0000000000      0.49641 2.7000e+00 2.7000e+00 S 11  0  1 I
-      LMP_rock
-LMP rock for Doug
-     145.9   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        14  0.248086  0.335584
-        22  0.001242  0.002863
-        13  0.066504  0.086423
-        26  0.008725  0.023467
-        25  0.000146  0.000386
-        12  0.010053  0.011768
-        20  0.007152  0.013805
-        11  0.002935  0.003250
-        19  0.015537  0.029258
-        15  0.000437  0.000652
-         8  0.639181  0.492543
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
- 350    UM  5  -1.0000000000      0.49407 2.7000e+00 2.7000e+00 S 11  0  1 I
-      UM_rock
-UM rock for Doug
-     152.7   0.0000   0.0000   0.0000  0.00000   0.0000     0.00
-        14  0.184026  0.238952
-        22  0.002244  0.004966
-        13  0.069046  0.086130
-        26  0.030831  0.079602
-        25  0.000822  0.002088
-        12  0.042435  0.047684
-        20  0.031499  0.058365
-        11  0.025503  0.027107
-        19  0.000642  0.001160
-        15  0.000791  0.001133
-         8  0.612161  0.452813
-Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids
----------------------------------------------------------------------------
diff --git a/Processes/EnergyLoss/ReadData.py b/Processes/EnergyLoss/ReadData.py
deleted file mode 100644
index 377f3992d7a8ff7888b7a01ef5b202e019533016..0000000000000000000000000000000000000000
--- a/Processes/EnergyLoss/ReadData.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/python
-
-import os
-import sys
-import string
-
-
-data = open("Properties8.dat", "r")
-
-nEl = 0
-nOpt = 0
-count = 0 # the data comes with flexible row-blocks, need to count
-for line in data.readlines():
-    line = line.rstrip()
-    if line == "" or line[0] == "#":
-        continue
-
-#    print str(count) + " " + line
-    
-    if count == 0:
-        index = int(line[0:4].strip()) # sternheimers index
-        name = line[5:11].strip() # tag
-        sig = int(line[11:14].strip()) # significant figures of atomic mass if element
-        weight = float(line[16:27].strip()) # atomic weight, if element
-        weight_error = int((line[31:32].strip() or "0"))# error in last place
-        ZoverA = float(line[34:42].strip()) # Z/A
-        rho = float(line[42:52].strip())          # Sternheimers density
-        rho_corr = float(line[52:63].strip())# Corrected density
-        state = line[64].strip() # Solid Liquid Gas Diatomicgas
-        nEl = int(line[66:69].strip()) # number of elements
-        nAtom = int(line[70:72].strip()) # atoms of el. 1
-        nOpt = int(line[73:74].strip()) # number of optional lines
-        type = line[75] # type: Element, Radiactive element, Inorganic compound, Organic compound, Polymer, Mixture, Biological
-
-    elif count == 1:
-        short = line[0:4].strip() # if element
-        long = line[4:100].strip()
-                   
-    elif count == 2:
-        desc = line # description and formula
-                   
-    elif count == 3:
-        Ieff = float(line[0:10].strip()) # ieff
-        Cbar = float(line[11:19].strip()) # cbar
-        x0 = float(line[21:28].strip()) # x0
-        x1 = float(line[30:37].strip()) # x1
-        aa = float(line[39:46].strip()) # a / aa
-        sk = float(line[48:55].strip()) # k / sk
-        delta0 = float(line[59:].strip()) # delta0  / dlt0
-                   
-    elif count == 4 and count < 4+nEl:
-        elZ = int(line[0:11].strip()) # Z
-        # num frac.
-        # weigh frac.
-        pass
-                   
-    elif count>=4+nEl and count<=4+nEl+nOpt:
-        # print "opt : " + str(count) + " " + str(4+nEl+nOpt) + " " + line
-        # property A25
-        # value F20
-        # if 1:5 is "Note:" following lines are extra comments
-        if (count == 4+nEl+nOpt):
-            count = -1
-
-            print str(elZ) + " " + long + " " + str(Ieff) + " " + str(ZoverA) + " " + state + " " + type + " " + str(rho_corr) + " " + str(delta0) + " " + str(x0)  + " " + str(x1)  + " " + str(aa)  + " " + str(sk) + " " + str(Cbar)
-
-            
-    count += 1
-
-                  
-if (count != 0):
-    print ("Error " + str(count))
-                
diff --git a/Processes/EnergyLoss/SummaryPropTable.dat b/Processes/EnergyLoss/SummaryPropTable.dat
deleted file mode 100644
index 2ebc9d2e630ce5b3bd1e32e30cd00e5f3eb6f166..0000000000000000000000000000000000000000
--- a/Processes/EnergyLoss/SummaryPropTable.dat
+++ /dev/null
@@ -1,138 +0,0 @@
-# RU Mo 18. Feb 14:07:40 CET 2019
-# Data table obtained from http://pdg.lbl.gov/2018/AtomicNuclearProperties/summary_prop_table.dat
-# see also http://pdg.lbl.gov/2018/AtomicNuclearProperties/expert.html
-#  Z      A      density  dEmin    Xo       lam_I    lam_pi_I  E_c (elec)  E_c (pstrn) state
-   1   1.00794      0.00  4.103   63.04     52.01     80.26    344.80    338.33      D
-   1   1.00794      0.07  4.034   63.04     52.01     80.26    278.02    271.50      L
-   1   2.01410      0.00  2.053  125.98     71.78    110.12    345.50    339.03      D
-   1   2.01410      0.17  2.019  125.98     71.78    110.12    278.02    271.50      L
-   2   4.00260      0.00  1.937   94.32     71.00    103.61    257.13    252.23      G
-   2   4.00260      0.12  1.936   94.32     71.00    103.61    208.25    203.34      L
-   3   6.94100      0.53  1.639   82.78     71.34    103.26    149.06    145.33      S
-   4   9.01218      1.85  1.595   65.19     77.80    109.90    113.70    110.68      S
-   5  10.81100      2.37  1.623   52.69     83.32    115.54     93.95     91.41      S
-   6  12.01070      2.00  1.749   42.70     85.81    117.79     82.08     79.85      S
-   6  12.01070      2.21  1.742   42.70     85.81    117.79     81.74     79.51      S
-   6  12.01070      2.27  1.745   42.70     85.81    117.79     81.67     79.44      S
-   6  12.01070      3.52  1.725   42.70     85.81    117.79     80.17     77.94      S
-   7  14.00670      0.00  1.825   37.99     89.68    121.69     91.73     89.71      D
-   7  14.00670      0.81  1.813   37.99     89.68    121.69     75.47     73.49      L
-   8  15.99940      0.00  1.801   34.24     90.17    121.91     81.45     79.62      D
-   8  15.99940      1.14  1.788   34.24     90.17    121.91     66.82     65.04      L
-   9  18.99840      0.00  1.676   32.93     97.42    127.24     73.15     71.48      D
-   9  18.99840      1.51  1.634   32.93     97.42    127.24     59.81     58.17      L
-  10  20.17970      0.00  1.724   28.93     98.99    128.66     67.02     65.47      G
-  10  20.17970      1.20  1.695   28.93     98.99    128.66     55.10     53.59      L
-  11  22.98977      0.97  1.639   27.74    102.55    132.22     51.38     49.99      S
-  12  24.30500      1.74  1.674   25.03    104.12    133.65     46.55     45.25      S
-  13  26.98154      2.70  1.615   24.01    107.16    136.67     42.70     41.48      S
-  14  28.08550      2.33  1.664   21.82    108.35    137.74     40.19     39.05      S
-  15  30.97376      2.20  1.613   21.21    111.36    140.72     37.92     36.84      S
-  16  32.06500      2.00  1.652   19.50    112.44    141.70     35.85     34.83      S
-  17  35.45300      0.00  1.630   19.28    115.70    144.94     40.05     39.04      D
-  17  35.45300      1.57  1.608   19.28    115.70    144.94     34.32     33.35      L
-  18  39.94800      0.00  1.519   19.55    119.73    148.99     38.03     37.06      G
-  18  39.94800      1.40  1.508   19.55    119.73    148.99     32.84     31.91      L
-  19  39.09830      0.86  1.623   17.32    118.98    148.08     31.62     30.72      S
-  20  40.07800      1.55  1.655   16.14    119.83    148.83     29.56     28.71      S
-  21  44.95591      2.99  1.522   16.55    123.90    152.91     27.61     26.79      S
-  22  47.86700      4.54  1.477   16.16    126.20    155.17     26.01     25.23      S
-  23  50.94150      6.11  1.436   15.84    128.54    157.46     24.67     23.91      S
-  24  51.99610      7.18  1.456   14.94    129.31    158.16     23.52     22.79      S
-  25  54.93804      7.44  1.428   14.64    131.44    160.24     22.59     21.89      S
-  26  55.84500      7.87  1.451   13.84    132.08    160.80     21.68     21.00      S
-  27  58.93319      8.90  1.419   13.62    134.23    162.90     20.82     20.16      S
-  28  58.69340      8.90  1.468   12.68    134.06    162.64     20.05     19.41      S
-  29  63.54600      8.96  1.403   12.86    137.30    165.87     19.42     18.79      S
-  30  65.38000      7.13  1.411   12.43    138.49    166.99     18.93     18.33      S
-  31  69.72300      5.90  1.379   12.47    141.22    169.69     18.57     17.98      S
-  32  72.64000      5.32  1.370   12.25    143.00    171.42     18.16     17.58      S
-  33  74.92159      5.73  1.370   11.94    144.36    172.73     17.65     17.09      S
-  34  78.97100      4.50  1.343   11.91    146.71    175.04     17.34     16.79      S
-  35  79.90400      0.01  1.388   11.42    147.24    175.51     19.16     18.60      D
-  35  79.90400      3.10  1.380   11.42    147.24    175.51     17.28     16.75      L
-  36  83.79800      0.00  1.357   11.37    149.42    177.65     18.61     18.06      G
-  36  83.79800      2.42  1.357   11.37    149.42    177.65     17.03     16.51      L
-  37  85.46780      1.53  1.356   11.03    150.34    178.51     16.61     16.10      S
-  38  87.62000      2.54  1.353   10.76    151.50    179.62     15.97     15.47      S
-  39  88.90584      4.47  1.359   10.41    152.18    180.26     15.30     14.81      S
-  40  91.22400      6.51  1.349   10.20    153.41    181.44     14.74     14.27      S
-  41  92.90637      8.57  1.343    9.92    154.28    182.26     14.23     13.77      S
-  42  95.95000     10.22  1.329    9.80    155.84    183.78     13.85     13.39      S
-  43  97.90722     11.50  1.325    9.58    156.83    184.72     13.46     13.01      S
-  44 101.07000     12.41  1.307    9.48    158.40    186.25     13.12     12.68      S
-  45 102.90550     12.41  1.310    9.27    159.30    187.11     12.84     12.41      S
-  46 106.42000     12.02  1.289    9.20    161.00    188.76     12.57     12.15      S
-  47 107.86820     10.50  1.299    8.97    161.68    189.41     12.36     11.94      S
-  48 112.41400      8.65  1.277    9.00    163.81    191.49     12.21     11.80      S
-  49 114.81800      7.31  1.278    8.85    164.91    192.55     12.06     11.65      S
-  50 118.71000      7.31  1.263    8.82    166.67    194.27     11.86     11.46      S
-  51 121.76000      6.69  1.259    8.73    168.02    195.58     11.70     11.31      S
-  52 127.60000      6.24  1.227    8.83    170.56    198.08     11.54     11.16      S
-  53 126.90447      4.93  1.263    8.48    170.25    197.74     11.42     11.04      S
-  54 131.29300      0.01  1.255    8.48    172.12    199.56     12.30     11.91      G
-  54 131.29300      2.95  1.255    8.48    172.12    199.56     11.66     11.28      L
-  55 132.90545      1.87  1.254    8.31    172.79    200.20     11.34     10.97      S
-  56 137.32700      3.50  1.231    8.31    174.62    201.98     10.98     10.62      S
-  57 138.90547      6.14  1.231    8.14    175.26    202.59     10.63     10.27      S
-  58 140.11600      6.77  1.234    7.96    175.75    203.04     10.40     10.04      S
-  59 140.90766      6.77  1.243    7.76    176.07    203.32     10.21      9.86      S
-  60 144.24200      7.01  1.231    7.71    177.40    204.62     10.02      9.68      S
-  61 144.91275      7.26  1.240    7.51    177.66    204.85      9.83      9.49      S
-  62 150.36000      7.52  1.210    7.57    179.79    206.95      9.66      9.32      S
-  63 151.96400      5.24  1.219    7.44    180.41    207.53      9.59      9.26      S
-  64 157.25000      7.90  1.188    7.48    182.42    209.50      9.34      9.01      S
-  65 158.92535      8.23  1.188    7.36    183.05    210.10      9.17      8.85      S
-  66 162.50000      8.55  1.175    7.32    184.38    211.39      9.02      8.70      S
-  67 164.93033      8.80  1.170    7.23    185.27    212.25      8.86      8.55      S
-  68 167.25900      9.03  1.168    7.14    186.12    213.07      8.73      8.42      S
-  69 168.93422      9.32  1.170    7.03    186.72    213.64      8.59      8.28      S
-  70 173.05400      6.90  1.159    7.02    188.19    215.08      8.52      8.22      S
-  71 174.96680      9.84  1.160    6.92    188.87    215.72      8.36      8.06      S
-  72 178.49000     13.31  1.152    6.89    190.10    216.93      8.22      7.93      S
-  73 180.94788     16.65  1.149    6.82    190.96    217.75      8.09      7.79      S
-  74 183.84000     19.30  1.145    6.76    191.95    218.71      7.97      7.68      S
-  75 186.20700     21.02  1.143    6.69    192.75    219.49      7.85      7.57      S
-  76 190.23000     22.57  1.132    6.68    194.11    220.81      7.75      7.47      S
-  77 192.21700     22.42  1.134    6.59    194.77    221.45      7.67      7.39      S
-  78 195.08400     21.45  1.128    6.54    195.72    222.37      7.59      7.31      S
-  79 196.96657     19.32  1.134    6.46    196.34    222.96      7.53      7.26      S
-  80 200.59000     13.55  1.130    6.44    197.52    224.11      7.53      7.26      L
-  81 204.38330     11.72  1.125    6.42    198.75    225.30      7.50      7.23      S
-  82 207.20000     11.35  1.122    6.37    199.64    226.17      7.43      7.16      S
-  83 208.98040      9.75  1.128    6.29    200.21    226.71      7.39      7.13      S
-  84 208.98243      9.32  1.141    6.16    200.21    226.69      7.33      7.06      S
-  85 209.98715      5.00  1.160    6.07    200.52    226.98      7.60      7.33      S
-  86 222.01758      0.01  1.116    6.28    204.25    230.66      7.71      7.43      G
-  87 223.01974      1.87  1.118    6.19    204.56    230.94      7.59      7.32      S
-  88 226.02541      5.00  1.111    6.15    205.47    231.83      7.19      6.94      S
-  89 227.02775     10.07  1.112    6.06    205.77    232.11      7.00      6.75      S
-  90 232.03770     11.72  1.098    6.07    207.26    233.57      6.91      6.66      S
-  91 231.03588     15.37  1.107    5.93    206.96    233.25      6.77      6.52      S
-  92 238.02891     18.95  1.081    6.00    209.02    235.28      6.65      6.41      S
-  93 237.04817     20.25  1.095    5.87    208.73    234.97      6.57      6.33      S
-  94 244.06420     19.84  1.071    5.93    210.77    236.98      6.49      6.25      S
-  95 243.06138     13.67  1.089    5.80    210.48    236.67      6.50      6.25      S
-  96 247.07035     13.51  1.082    5.79    211.63    237.79      6.44      6.20      S
-  97 247.07031     14.00  1.106    5.69    211.63    237.77      6.59      6.35      S
-  98 251.07959     14.00  1.097    5.68    212.77    238.88      6.53      6.29      S
-  99 252.08300     14.00  1.102    5.61    213.05    239.15      6.47      6.24      S
- 100 257.09510     14.00  1.090    5.62    214.45    240.52      6.42      6.19      S
- 101 258.09843     14.00  1.095    5.55    214.73    240.78      6.37      6.13      S
- 102 259.10100     14.00  1.099    5.48    215.00    241.04      6.31      6.08      S
- 103 262.11000     14.00  1.096    5.45    215.83    241.84      6.26      6.03      S
- 104 267.12200     14.00  1.084    5.47    217.20    243.19      6.21      5.98      S
- 105 268.12500     14.00  1.088    5.40    217.48    243.44      6.16      5.93      S
- 106 271.13300     14.00  1.085    5.38    218.29    244.23      6.11      5.89      S
- 107 270.13400     14.00  1.097    5.27    218.02    243.95      6.06      5.84      S
- 108 269.13410     14.00  1.110    5.17    217.75    243.66      6.01      5.79      S
- 109 276.15100     14.00  1.090    5.23    219.63    245.51      5.97      5.75      S
- 110 281.16200     14.00  1.079    5.24    220.96    246.82      5.92      5.71      S
- 111 280.16400     14.00  1.091    5.14    220.69    246.54      5.88      5.66      S
- 112 285.00000     14.00  1.080    5.16    221.96    247.78      5.83      5.61      S
- 113 284.17800     14.00  1.091    5.07    221.75    247.55      5.79      5.57      S
- 114 289.18700     14.00  1.080    5.08    223.05    248.83      5.75      5.53      S
- 115 288.19200     14.00  1.092    4.99    222.79    248.56      5.71      5.49      S
- 116 293.20000     14.00  1.081    5.00    224.08    249.83      5.67      5.45      S
- 117 294.00000     14.00  1.086    4.95    224.29    250.01      5.62      5.41      S
- 118 294.21500      0.01  1.092    4.88    224.34    250.05      5.67      5.45      G
diff --git a/Processes/HadronicElasticModel/CMakeLists.txt b/Processes/HadronicElasticModel/CMakeLists.txt
deleted file mode 100644
index 55d774ec43981d88c3ab1d28e74cb8374888b1e7..0000000000000000000000000000000000000000
--- a/Processes/HadronicElasticModel/CMakeLists.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-set (
-  MODEL_SOURCES
-  HadronicElasticModel.cc
-  )
-
-set (
-  MODEL_HEADERS
-  HadronicElasticModel.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/hadronic_elastic_model
-  )
-
-add_library (ProcessHadronicElasticModel STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessHadronicElasticModel ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-set_target_properties (
-  ProcessHadronicElasticModel
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-#  PUBLIC_HEADER "${MODEL_HEADERS}"
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessHadronicElasticModel
-  CORSIKAunits
-  CORSIKAgeometry
-  CORSIKAsetup
-  CORSIKAutilities
-  )
-
-target_include_directories (
-  ProcessHadronicElasticModel 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessHadronicElasticModel
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-#  PUBLIC_HEADER DESTINATION include/${MODEL_NAMESPACE}
-  )
-
-
-# --------------------
-# code unit testing
-# CORSIKA_ADD_TEST (testProcessHadronicElasticModel)
-# target_link_libraries (
-  # testProcessHadronicElasticModel
-  # ProcessHadronicElasticModel
-  # CORSIKAsetup
-  # CORSIKAgeometry
-  # CORSIKAunits
-  # CORSIKAthirdparty # for catch2
-  # )
diff --git a/Processes/HadronicElasticModel/HadronicElasticModel.cc b/Processes/HadronicElasticModel/HadronicElasticModel.cc
deleted file mode 100644
index cdc01d9a92aa741de6b3af9775d021063c34d644..0000000000000000000000000000000000000000
--- a/Processes/HadronicElasticModel/HadronicElasticModel.cc
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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/environment/Environment.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/FourVector.h>
-#include <corsika/process/hadronic_elastic_model/HadronicElasticModel.h>
-#include <corsika/random/ExponentialDistribution.h>
-#include <corsika/utl/COMBoost.h>
-
-#include <corsika/setup/SetupStack.h>
-
-#include <iomanip>
-#include <iostream>
-
-using SetupParticle = corsika::setup::Stack::ParticleType;
-using SetupView = corsika::setup::StackView;
-
-using namespace corsika::process::HadronicElasticModel;
-using namespace corsika;
-
-HadronicElasticInteraction::HadronicElasticInteraction(units::si::CrossSectionType x,
-                                                       units::si::CrossSectionType y)
-    : fX(x)
-    , fY(y) {}
-
-template <>
-units::si::GrammageType HadronicElasticInteraction::GetInteractionLength(
-    SetupParticle const& p) {
-  using namespace units::si;
-  if (p.GetPID() == particles::Code::Proton) {
-    auto const* currentNode = p.GetNode();
-    auto const& mediumComposition =
-        currentNode->GetModelProperties().GetNuclearComposition();
-
-    auto const& components = mediumComposition.GetComponents();
-    auto const& fractions = mediumComposition.GetFractions();
-
-    auto const projectileMomentum = p.GetMomentum();
-    auto const projectileMomentumSquaredNorm = projectileMomentum.squaredNorm();
-    auto const projectileEnergy = p.GetEnergy();
-
-    auto const avgCrossSection = [&]() {
-      CrossSectionType avgCrossSection = 0_b;
-
-      for (size_t i = 0; i < fractions.size(); ++i) {
-        auto const targetMass = particles::GetMass(components[i]);
-        auto const s = units::static_pow<2>(projectileEnergy + targetMass) -
-                       projectileMomentumSquaredNorm;
-        avgCrossSection += CrossSection(s) * fractions[i];
-      }
-
-      std::cout << "avgCrossSection: " << avgCrossSection / 1_mb << " mb" << std::endl;
-
-      return avgCrossSection;
-    }();
-
-    auto const avgTargetMassNumber = mediumComposition.GetAverageMassNumber();
-
-    GrammageType const interactionLength =
-        avgTargetMassNumber * units::constants::u / avgCrossSection;
-
-    return interactionLength;
-  } else {
-    return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
-  }
-}
-
-template <>
-process::EProcessReturn HadronicElasticInteraction::DoInteraction(SetupView& view) {
-  using namespace units::si;
-  using namespace units::constants;
-
-  auto p = view.GetProjectile();
-  if (p.GetPID() != particles::Code::Proton) { return process::EProcessReturn::eOk; }
-
-  const auto* currentNode = p.GetNode();
-  const auto& composition = currentNode->GetModelProperties().GetNuclearComposition();
-  const auto& components = composition.GetComponents();
-
-  std::vector<units::si::CrossSectionType> cross_section_of_components(
-      composition.GetComponents().size());
-
-  auto const projectileMomentum = p.GetMomentum();
-  auto const projectileMomentumSquaredNorm = projectileMomentum.squaredNorm();
-  auto const projectileEnergy = p.GetEnergy();
-
-  for (size_t i = 0; i < components.size(); ++i) {
-    auto const targetMass = particles::GetMass(components[i]);
-    auto const s = units::static_pow<2>(projectileEnergy + targetMass) -
-                   projectileMomentumSquaredNorm;
-    cross_section_of_components[i] = CrossSection(s);
-  }
-
-  const auto targetCode = composition.SampleTarget(cross_section_of_components, fRNG);
-
-  auto const targetMass = particles::GetMass(targetCode);
-
-  std::uniform_real_distribution phiDist(0., 2 * M_PI);
-
-  geometry::FourVector const projectileLab(projectileEnergy, projectileMomentum);
-  geometry::FourVector const targetLab(
-      targetMass, geometry::Vector<units::si::hepmomentum_d>(
-                      projectileMomentum.GetCoordinateSystem(), {0_eV, 0_eV, 0_eV}));
-  utl::COMBoost const boost(projectileLab, targetMass);
-
-  auto const projectileCoM = boost.toCoM(projectileLab);
-  auto const targetCoM = boost.toCoM(targetLab);
-
-  auto const pProjectileCoMSqNorm = projectileCoM.GetSpaceLikeComponents().squaredNorm();
-  auto const pProjectileCoMNorm = sqrt(pProjectileCoMSqNorm);
-
-  auto const eProjectileCoM = projectileCoM.GetTimeLikeComponent();
-  auto const eTargetCoM = targetCoM.GetTimeLikeComponent();
-
-  auto const sqrtS = eProjectileCoM + eTargetCoM;
-  auto const s = units::static_pow<2>(sqrtS);
-
-  auto const B = this->B(s);
-  std::cout << B << std::endl;
-
-  random::ExponentialDistribution tDist(1 / B);
-  auto const absT = [&]() {
-    decltype(tDist(fRNG)) absT;
-    auto const maxT = 4 * pProjectileCoMSqNorm;
-
-    do {
-      // |t| cannot become arbitrarily large, max. given by GER eq. (4.16), so we just
-      // throw again until we have an acceptable value.
-      absT = tDist(fRNG);
-    } while (absT >= maxT);
-
-    return absT;
-  }();
-
-  std::cout << "HadronicElasticInteraction: s = " << s * invGeVsq
-            << " GeV²; absT = " << absT * invGeVsq
-            << " GeV² (max./GeV² = " << 4 * invGeVsq * projectileMomentumSquaredNorm
-            << ')' << std::endl;
-
-  auto const theta = 2 * asin(sqrt(absT / (4 * pProjectileCoMSqNorm)));
-  auto const phi = phiDist(fRNG);
-
-  auto const projectileScatteredLab =
-      boost.fromCoM(geometry::FourVector<HEPEnergyType, geometry::Vector<hepmomentum_d>>(
-          eProjectileCoM,
-          geometry::Vector<hepmomentum_d>(projectileMomentum.GetCoordinateSystem(),
-                                          {pProjectileCoMNorm * sin(theta) * cos(phi),
-                                           pProjectileCoMNorm * sin(theta) * sin(phi),
-                                           pProjectileCoMNorm * cos(theta)})));
-
-  view.AddSecondary(
-      std::tuple<particles::Code, units::si::HEPEnergyType,
-                 corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{
-          p.GetPID(),
-          sqrt(projectileScatteredLab.GetSpaceLikeComponents().squaredNorm() +
-               units::static_pow<2>(particles::GetMass(p.GetPID()))),
-          projectileScatteredLab.GetSpaceLikeComponents(), p.GetPosition(), p.GetTime()});
-
-  return process::EProcessReturn::eOk;
-}
-
-HadronicElasticInteraction::inveV2 HadronicElasticInteraction::B(eV2 s) const {
-  using namespace units::constants;
-  auto constexpr b_p = 2.3;
-  auto const result =
-      (2 * b_p + 2 * b_p + 4 * pow(s * invGeVsq, gfEpsilon) - 4.2) * invGeVsq;
-  std::cout << "B(" << s << ") = " << result / invGeVsq << " GeV¯²" << std::endl;
-  return result;
-}
-
-units::si::CrossSectionType HadronicElasticInteraction::CrossSection(
-    SquaredHEPEnergyType s) const {
-  using namespace units::si;
-  using namespace units::constants;
-  // assuming every target behaves like a proton, fX and fY are universal
-  CrossSectionType const sigmaTotal =
-      fX * pow(s * invGeVsq, gfEpsilon) + fY * pow(s * invGeVsq, -gfEta);
-
-  // according to Schuler & Sjöstrand, PRD 49, 2257 (1994)
-  // (we ignore rho because rho^2 is just ~2 %)
-  auto const sigmaElastic =
-      units::static_pow<2>(sigmaTotal) /
-      (16 * M_PI * ConvertHEPToSI<CrossSectionType::dimension_type>(B(s)));
-
-  std::cout << "HEM sigmaTot = " << sigmaTotal / 1_mb << " mb" << std::endl;
-  std::cout << "HEM sigmaElastic = " << sigmaElastic / 1_mb << " mb" << std::endl;
-  return sigmaElastic;
-}
diff --git a/Processes/NullModel/CMakeLists.txt b/Processes/NullModel/CMakeLists.txt
deleted file mode 100644
index 07e653a7ce0717c71c5ea7a25a64417098478987..0000000000000000000000000000000000000000
--- a/Processes/NullModel/CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-set (
-  MODEL_SOURCES
-  NullModel.cc
-  )
-
-set (
-  MODEL_HEADERS
-  NullModel.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/null_model
-  )
-
-add_library (ProcessNullModel STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessNullModel ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-set_target_properties (
-  ProcessNullModel
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-#  PUBLIC_HEADER "${MODEL_HEADERS}"
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessNullModel
-  CORSIKAunits
-  CORSIKAgeometry
-  CORSIKAsetup
-  )
-
-target_include_directories (
-  ProcessNullModel 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessNullModel
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-#  PUBLIC_HEADER DESTINATION include/${MODEL_NAMESPACE}
-  )
-
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST (testNullModel)
-target_link_libraries (
-  testNullModel
-  ProcessNullModel
-  CORSIKAsetup
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAtesting
-  )
diff --git a/Processes/ObservationPlane/CMakeLists.txt b/Processes/ObservationPlane/CMakeLists.txt
deleted file mode 100644
index 800c5dbd6b2e900f8e2228fe9e64615f304c4d28..0000000000000000000000000000000000000000
--- a/Processes/ObservationPlane/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-set (
-  MODEL_HEADERS
-  ObservationPlane.h
-  )
-
-set (
-  MODEL_SOURCES
-  ObservationPlane.cc
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/observation_plane
-  )
-
-add_library (ProcessObservationPlane STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessObservationPlane ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-#target dependencies on other libraries(also the header onlys)
-target_link_libraries (
-  ProcessObservationPlane
-  CORSIKAgeometry
-  CORSIKAprocesssequence
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  ProcessObservationPlane 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (FILES ${MODEL_HEADERS} DESTINATION include/${MODEL_NAMESPACE})
-
-#-- -- -- -- -- -- -- -- -- --
-#code unit testing
-CORSIKA_ADD_TEST(testObservationPlane)
-target_link_libraries (
-  testObservationPlane
-  ProcessObservationPlane
-  CORSIKAstackinterface
-  CORSIKAthirdparty # for catch2
-)
diff --git a/Processes/ParticleCut/CMakeLists.txt b/Processes/ParticleCut/CMakeLists.txt
deleted file mode 100644
index db1ee34c6db71a4013d19f3d35b2d9a5799ba24f..0000000000000000000000000000000000000000
--- a/Processes/ParticleCut/CMakeLists.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-set (
-  MODEL_SOURCES
-  ParticleCut.cc
-)
-
-set (
-  MODEL_HEADERS
-  ParticleCut.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/particle_cut
-  )
-
-add_library (ProcessParticleCut STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessParticleCut ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-set_target_properties (
-  ProcessParticleCut
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessParticleCut
-  CORSIKAunits
-  CORSIKAparticles
-  CORSIKAprocesssequence
-  CORSIKAsetup
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  ProcessParticleCut 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessParticleCut
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  )
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testParticleCut SOURCES
-  testParticleCut.cc
-  ${MODEL_HEADERS}
-)
-
-target_link_libraries (
-  testParticleCut
-  ProcessParticleCut
-  CORSIKAunits
-  CORSIKAstackinterface
-  CORSIKAprocesssequence
-  CORSIKAsetup
-  CORSIKAgeometry
-  CORSIKAenvironment
-  CORSIKAtesting
-  )
diff --git a/Processes/QGSJetII/CMakeLists.txt b/Processes/QGSJetII/CMakeLists.txt
deleted file mode 100644
index 77d43794c751b59713b6d962a4cc26177a0b81aa..0000000000000000000000000000000000000000
--- a/Processes/QGSJetII/CMakeLists.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-if (NOT DEFINED ENV{CORSIKA_DATA})
-  message (WARNING "WARNING: QGSJetII will not work without corsika-data. Set CORSIKA_DATA path!")
-endif ()
-
-add_custom_command (
-  OUTPUT  ${PROJECT_BINARY_DIR}/Processes/QGSJetII/Generated.inc
-  COMMAND ${PROJECT_SOURCE_DIR}/Processes/QGSJetII/code_generator.py 
-          ${PROJECT_BINARY_DIR}/Framework/Particles/particle_db.pkl
-          ${PROJECT_SOURCE_DIR}/Processes/QGSJetII/qgsjet-II-04-codes.dat
-  DEPENDS code_generator.py
-          qgsjet-II-04-codes.dat
-          CORSIKAparticles
-  WORKING_DIRECTORY
-          ${PROJECT_BINARY_DIR}/Processes/QGSJetII/
-  COMMENT "Generate conversion tables for particle codes QGSJetII <-> CORSIKA"
-  VERBATIM
-  )
-  
-set (
-  MODEL_SOURCES
-  ParticleConversion.cc
-  Interaction.cc
-  qgsjet-II-04.f
-  qgsjet-II-04.cc
-  )
-
-set (
-  MODEL_HEADERS
-  ParticleConversion.h
-  qgsjet-II-04.h
-  QGSJetIIStack.h
-  QGSJetIIFragmentsStack.h
-  Interaction.h
-  ${PROJECT_BINARY_DIR}/Processes/QGSJetII/Generated.inc
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/qgsjetII
-  )
-
-add_library (ProcessQGSJetII STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessQGSJetII ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-# ....................................................
-# since Generated.inc is an automatically produced file in the build directory,
-# create a symbolic link into the source tree, so that it can be found and edited more easily
-# this is not needed for the build to succeed! .......
-add_custom_command (
-  OUTPUT  ${CMAKE_CURRENT_SOURCE_DIR}/Generated.inc
-  COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_BINARY_DIR}/include/corsika/process/qgsjetII/Generated.inc ${CMAKE_CURRENT_SOURCE_DIR}/Generated.inc
-  COMMENT "Generate link in source-dir: ${CMAKE_CURRENT_SOURCE_DIR}/Generated.inc"
-  )
-add_custom_target (SourceDirLinkQgsII DEPENDS ${PROJECT_BINARY_DIR}/Processes/QGSJetII/Generated.inc)
-add_dependencies (ProcessQGSJetII SourceDirLinkQgsII)
-# .....................................................
-
-
-
-set_target_properties (
-  ProcessQGSJetII
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessQGSJetII
-  CORSIKAprocesssequence
-  CORSIKAparticles
-  CORSIKAutilities
-  CORSIKAunits
-  CORSIKAthirdparty
-  CORSIKAgeometry
-  CORSIKAenvironment
-  CORSIKAsetup
-  CORSIKArandom
-  CorsikaData
-  )
-
-target_include_directories (
-  ProcessQGSJetII 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessQGSJetII
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  )
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testQGSJetII
-  SOURCES
-  testQGSJetII.cc
-  ${MODEL_HEADERS}
-)
-
-target_link_libraries (
-  testQGSJetII
-  ProcessQGSJetII
-  CORSIKAtesting
-  stdc++fs)
diff --git a/Processes/Sibyll/CMakeLists.txt b/Processes/Sibyll/CMakeLists.txt
deleted file mode 100644
index 856135c789ff02fa40fd77b3e18d93f68a8e3dfa..0000000000000000000000000000000000000000
--- a/Processes/Sibyll/CMakeLists.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-add_custom_command (
-  OUTPUT  ${PROJECT_BINARY_DIR}/Processes/Sibyll/Generated.inc
-  COMMAND ${PROJECT_SOURCE_DIR}/Processes/Sibyll/code_generator.py 
-          ${PROJECT_BINARY_DIR}/Framework/Particles/particle_db.pkl
-          ${PROJECT_SOURCE_DIR}/Processes/Sibyll/sibyll_codes.dat
-  DEPENDS code_generator.py
-          sibyll_codes.dat          
-          CORSIKAparticles
-  WORKING_DIRECTORY
-          ${PROJECT_BINARY_DIR}/Processes/Sibyll/
-  COMMENT "Generate conversion tables for particle codes SIBYLL <-> CORSIKA"
-  VERBATIM
-  )
-  
-set (
-  MODEL_SOURCES
-  ParticleConversion.cc
-  Interaction.cc
-  Decay.cc
-  NuclearInteraction.cc
-  sibyll2.3d.f
-  nuclib.f
-  signuc.f
-  sibyll2.3d.cc
-  gasdev.f
-  )
-
-set (
-  MODEL_HEADERS
-  ParticleConversion.h
-  sibyll2.3d.h
-  nuclib.h
-  SibStack.h
-  Decay.h
-  Interaction.h
-  NuclearInteraction.h
-  ${PROJECT_BINARY_DIR}/Processes/Sibyll/Generated.inc
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/sibyll
-  )
-
-add_library (ProcessSibyll STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessSibyll ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-# ....................................................
-# since Generated.inc is an automatically produced file in the build directory,
-# create a symbolic link into the source tree, so that it can be found and edited more easily
-# this is not needed for the build to succeed! .......
-add_custom_command (
-  OUTPUT  ${CMAKE_CURRENT_SOURCE_DIR}/Generated.inc
-  COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_BINARY_DIR}/include/corsika/process/sibyll/Generated.inc ${CMAKE_CURRENT_SOURCE_DIR}/Generated.inc
-  COMMENT "Generate link in source-dir: ${CMAKE_CURRENT_SOURCE_DIR}/Generated.inc"
-  )
-add_custom_target (SourceDirLinkSib DEPENDS ${PROJECT_BINARY_DIR}/Processes/Sibyll/Generated.inc)
-add_dependencies (ProcessSibyll SourceDirLinkSib)
-# .....................................................
-
-
-
-set_target_properties (
-  ProcessSibyll
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessSibyll
-  CORSIKAprocesssequence
-  CORSIKAparticles
-  CORSIKAutilities
-  CORSIKAunits
-  CORSIKAthirdparty
-  CORSIKAgeometry
-  CORSIKAenvironment
-  CORSIKAsetup
-  CORSIKArandom
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  ProcessSibyll 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessSibyll
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  )
-
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testSibyll
-  SOURCES
-  testSibyll.cc
-  ${MODEL_HEADERS}
-)
-
-target_link_libraries (
-  testSibyll
-  ProcessSibyll
-  CORSIKAtesting
-  )
diff --git a/Processes/Sibyll/Interaction.h b/Processes/Sibyll/Interaction.h
deleted file mode 100644
index 52a43309d06efe3f0fbc622b84dc29a82c9d7328..0000000000000000000000000000000000000000
--- a/Processes/Sibyll/Interaction.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/InteractionProcess.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <tuple>
-
-namespace corsika::process::sibyll {
-
-  class Interaction : public corsika::process::InteractionProcess<Interaction> {
-
-    int count_ = 0;
-    int nucCount_ = 0;
-    static bool initialized_; ///! flag to assure init is done only once
-    bool sibyll_listing_;
-
-  public:
-    Interaction(const bool sibyll_printout_on = false);
-    ~Interaction();
-
-    void SetAllStable();
-
-    static bool WasInitialized() { return initialized_; }
-    bool IsValidCoMEnergy(corsika::units::si::HEPEnergyType ecm) const {
-      return (minEnergyCoM_ <= ecm) && (ecm <= maxEnergyCoM_);
-    }
-    int GetMaxTargetMassNumber() const { return maxTargetMassNumber_; }
-    corsika::units::si::HEPEnergyType GetMinEnergyCoM() const { return minEnergyCoM_; }
-    corsika::units::si::HEPEnergyType GetMaxEnergyCoM() const { return maxEnergyCoM_; }
-    bool IsValidTarget(corsika::particles::Code TargetId) const {
-      return (corsika::particles::GetNucleusA(TargetId) < maxTargetMassNumber_) &&
-             corsika::particles::IsNucleus(TargetId);
-    }
-
-    std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
-    GetCrossSection(const corsika::particles::Code, const corsika::particles::Code,
-                    const corsika::units::si::HEPEnergyType) const;
-
-    template <typename TParticle>
-    corsika::units::si::GrammageType GetInteractionLength(const TParticle&) const;
-
-    /**
-       In this function SIBYLL is called to produce one event. The
-       event is copied (and boosted) into the shower lab frame.
-     */
-
-    template <typename TSecondaryView>
-    corsika::process::EProcessReturn DoInteraction(TSecondaryView&);
-
-  private:
-    corsika::random::RNG& RNG_ =
-        corsika::random::RNGManager::GetInstance().GetRandomStream("sibyll");
-
-    const corsika::units::si::HEPEnergyType minEnergyCoM_ =
-        10. * 1e9 * corsika::units::si::electronvolt;
-    const corsika::units::si::HEPEnergyType maxEnergyCoM_ =
-        1.e6 * 1e9 * corsika::units::si::electronvolt;
-    const int maxTargetMassNumber_ = 18;
-  };
-
-} // namespace corsika::process::sibyll
diff --git a/Processes/StackInspector/CMakeLists.txt b/Processes/StackInspector/CMakeLists.txt
deleted file mode 100644
index 7ada9c0e57b8aaf51c6006392185f5a37d41870b..0000000000000000000000000000000000000000
--- a/Processes/StackInspector/CMakeLists.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-set (
-  MODEL_SOURCES
-  StackInspector.cc
-  )
-
-set (
-  MODEL_HEADERS
-  StackInspector.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/stack_inspector
-  )
-
-add_library (ProcessStackInspector STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessStackInspector ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-set_target_properties (
-  ProcessStackInspector
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-#  PUBLIC_HEADER "${MODEL_HEADERS}"
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessStackInspector
-  CORSIKAcascade
-  CORSIKAunits
-  CORSIKAgeometry
-  CORSIKAsetup
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  ProcessStackInspector 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessStackInspector
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-#  PUBLIC_HEADER DESTINATION include/${MODEL_NAMESPACE}
-  )
-
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST (testStackInspector)
-target_link_libraries (
-  testStackInspector
-  ProcessStackInspector
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAtesting
-  )
diff --git a/Processes/StackInspector/testStackInspector.cc b/Processes/StackInspector/testStackInspector.cc
deleted file mode 100644
index 3d4cdec2c4b63bfbfb99479848e5711013278930..0000000000000000000000000000000000000000
--- a/Processes/StackInspector/testStackInspector.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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 <catch2/catch.hpp>
-
-#include <corsika/process/stack_inspector/StackInspector.h>
-
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
-
-#include <corsika/units/PhysicalUnits.h>
-
-#include <corsika/cascade/testCascade.h>
-
-using namespace corsika::units::si;
-using namespace corsika::process::stack_inspector;
-using namespace corsika;
-using namespace corsika::geometry;
-
-TEST_CASE("StackInspector", "[processes]") {
-
-  auto const& rootCS =
-      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
-  geometry::Point const origin(rootCS, {0_m, 0_m, 0_m});
-  geometry::Vector<units::si::SpeedType::dimension_type> v(rootCS, 0_m / second,
-                                                           0_m / second, 1_m / second);
-  geometry::Line line(origin, v);
-  geometry::LineTrajectory track(line, 10_s);
-
-  TestCascadeStack stack;
-  stack.Clear();
-  HEPEnergyType E0 = 100_GeV;
-  stack.AddParticle(
-      std::make_tuple(particles::Code::Electron, E0,
-                      corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, -1_GeV}),
-                      Point(rootCS, {0_m, 0_m, 10_km}), 0_ns));
-
-  SECTION("interface") {
-
-    StackInspector<TestCascadeStack> model(1, true, E0);
-    model.DoStack(stack);
-  }
-}
diff --git a/Processes/SwitchProcess/CMakeLists.txt b/Processes/SwitchProcess/CMakeLists.txt
deleted file mode 100644
index 352eac7c865da4d37b20b5e52c4eacac11ebb72a..0000000000000000000000000000000000000000
--- a/Processes/SwitchProcess/CMakeLists.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-set (
-  MODEL_HEADERS
-  SwitchProcess.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/switch_process
-  )
-
-add_library (ProcessSwitch INTERFACE)
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessSwitch ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessSwitch
-  INTERFACE
-  CORSIKAunits
-  CORSIKAprocesssequence
-  )
-
-target_include_directories (
-  ProcessSwitch 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (FILES ${MODEL_HEADERS} DESTINATION include/${MODEL_NAMESPACE})
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testSwitchProcess)
-target_link_libraries (
-  testSwitchProcess
-  ProcessSwitch
-  CORSIKAstackinterface
-  CORSIKAtesting
-)
-
diff --git a/Processes/TrackWriter/CMakeLists.txt b/Processes/TrackWriter/CMakeLists.txt
deleted file mode 100644
index 4c7a19556f8913aa1f385b72b802d525532e1c08..0000000000000000000000000000000000000000
--- a/Processes/TrackWriter/CMakeLists.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-set (
-  MODEL_SOURCES
-  TrackWriter.cc
-  )
-
-set (
-  MODEL_HEADERS
-  TrackWriter.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/track_writer
-  )
-
-add_library (ProcessTrackWriter STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessTrackWriter ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-set_target_properties (
-  ProcessTrackWriter
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-#  PUBLIC_HEADER "${MODEL_HEADERS}"
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessTrackWriter
-  CORSIKAunits
-  CORSIKAparticles
-  CORSIKAgeometry
-  CORSIKAsetup
-  )
-
-target_include_directories (
-  ProcessTrackWriter 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessTrackWriter
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-#  PUBLIC_HEADER DESTINATION include/${MODEL_NAMESPACE}
-  )
-
-
-# --------------------
-# code unit testing
-# CORSIKA_ADD_TEST(testNullModel)
-#target_link_libraries (
-#  testNullModel  ProcessNullModel
-#  CORSIKAsetup
-#  CORSIKAgeometry
-#  CORSIKAunits
-#  CORSIKAthirdparty # for catch2
-#  )
-
diff --git a/Processes/TrackingLine/CMakeLists.txt b/Processes/TrackingLine/CMakeLists.txt
deleted file mode 100644
index 75dcaec7e4df4f510adab8f0801413fee77c90e0..0000000000000000000000000000000000000000
--- a/Processes/TrackingLine/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-set (
-  MODEL_HEADERS
-  Tracking.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/tracking_line
-  )
-
-add_library (ProcessTrackingLine INTERFACE)
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessTrackingLine ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessTrackingLine
-  INTERFACE
-  ProcessTrackingIntersects
-  CORSIKAsetup
-  CORSIKAutilities
-  CORSIKAenvironment
-  CORSIKAunits
-  CORSIKAenvironment
-  CORSIKAgeometry
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  ProcessTrackingLine 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (FILES ${MODEL_HEADERS} DESTINATION include/${MODEL_NAMESPACE})
-
-# Note: all Tracking Algorithms are tested in testTracking
diff --git a/Processes/TrackingLine/testTrackingLineStack.h b/Processes/TrackingLine/testTrackingLineStack.h
deleted file mode 100644
index 5c714048a5eb1e3978f39f6815c80eaaebcdc8a0..0000000000000000000000000000000000000000
--- a/Processes/TrackingLine/testTrackingLineStack.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/Environment.h>
-
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
-
-#include <corsika/particles/ParticleProperties.h>
-
-#include <corsika/stack/CombinedStack.h>
-#include <corsika/stack/node/GeometryNodeStackExtension.h>
-#include <corsika/stack/nuclear_extension/NuclearStackExtension.h>
-
-#include <corsika/units/PhysicalUnits.h>
-
-using TestEnvironmentType =
-    corsika::environment::Environment<corsika::environment::Empty>;
-
-template <typename T>
-using SetupGeometryDataInterface =
-    corsika::stack::node::GeometryDataInterface<T, TestEnvironmentType>;
-
-// combine particle data stack with geometry information for tracking
-template <typename StackIter>
-using StackWithGeometryInterface = corsika::stack::CombinedParticleInterface<
-    corsika::stack::nuclear_extension::ParticleDataStack::MPIType,
-    SetupGeometryDataInterface, StackIter>;
-
-using TestTrackingLineStack = corsika::stack::CombinedStack<
-    typename corsika::stack::nuclear_extension::ParticleDataStack::StackImpl,
-    corsika::stack::node::GeometryData<TestEnvironmentType>, StackWithGeometryInterface>;
diff --git a/Processes/UrQMD/CMakeLists.txt b/Processes/UrQMD/CMakeLists.txt
deleted file mode 100644
index 0fbdb064c86e4f8ab8e63dda4be96ff09b72004c..0000000000000000000000000000000000000000
--- a/Processes/UrQMD/CMakeLists.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-set (
-  MODEL_SOURCES
-  UrQMD.cc
-  urqmdInterface.F
-  addpart.f
-  angdis.f
-  anndec.f
-  blockres.f
-  boxprg.f
-  cascinit.f
-  coload.f
-  dectim.f
-  delpart.f
-  detbal.f
-  dwidth.f
-  error.f
-  getmass.f
-  getspin.f
-  init.f
-  iso.f
-  ityp2pdg.f
-  jdecay2.f
-  make22.f
-  numrec.f
-  output.f
-  paulibl.f
-  proppot.f
-  saveinfo.f
-  scatter.f
-  siglookup.f
-  string.f
-  tabinit.f
-  urqmd.f
-  whichres.f
-)
-
-set (
-  MODEL_HEADERS
-  UrQMD.h
-  )
-
-set (
-  MODEL_NAMESPACE
-  corsika/process/urqmd
-  )
-
-add_library (ProcessUrQMD STATIC ${MODEL_SOURCES})
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessUrQMD ${MODEL_NAMESPACE} ${MODEL_HEADERS})
-
-set_target_properties (
-  ProcessUrQMD
-  PROPERTIES
-  VERSION ${PROJECT_VERSION}
-  SOVERSION 1
-  )
-
-# target dependencies on other libraries (also the header onlys)
-target_link_libraries (
-  ProcessUrQMD
-  CORSIKAprocesssequence
-  CORSIKAparticles
-  CORSIKAunits
-  CORSIKAgeometry
-  CORSIKArandom
-  CORSIKAsetup
-  CORSIKAthirdparty
-  )
-
-target_include_directories (
-  ProcessUrQMD 
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  TARGETS ProcessUrQMD
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  )
-
-
-# --------------------
-# code unit testing
-CORSIKA_ADD_TEST(testUrQMD SOURCES testUrQMD.cc ${MODEL_HEADERS})
-target_link_libraries (
-  testUrQMD
-  ProcessUrQMD
-  CORSIKAtesting
-  )
-
-add_executable(urqmd_xs urqmd_xs.cc)
-target_link_libraries(urqmd_xs
-	ProcessUrQMD
-	CORSIKAparticles
-)
diff --git a/Setup/CMakeLists.txt b/Setup/CMakeLists.txt
deleted file mode 100644
index 94b1fc731c1cac8abd73e1ca0257254bdd9975f0..0000000000000000000000000000000000000000
--- a/Setup/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-set (
-  SETUP_HEADERS
-  SetupStack.h
-  SetupEnvironment.h
-  SetupTrajectory.h
-  )
-
-set (
-  SETUP_NAMESPACE
-  corsika/setup
-  )
-
-add_library (CORSIKAsetup INTERFACE)
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAsetup ${SETUP_NAMESPACE} ${SETUP_HEADERS})
-
-target_link_libraries (
-  CORSIKAsetup
-  INTERFACE
-  CORSIKAgeometry
-  NuclearStackExtension
-  GeometryNodeStackExtension
-  CORSIKAhistory
-  )
-
-if (WITH_HISTORY)
-  target_compile_definitions (CORSIKAsetup INTERFACE "WITH_HISTORY")
-endif (WITH_HISTORY)
-
-target_include_directories (
-  CORSIKAsetup
-  INTERFACE 
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include/include>
-  )
-
-install (
-  FILES ${SETUP_HEADERS} 
-  DESTINATION include/${SETUP_NAMESPACE}
-  )
diff --git a/Setup/SetupEnvironment.h b/Setup/SetupEnvironment.h
deleted file mode 100644
index 87f0c8e305e70b82d657edb16ed23974368f5855..0000000000000000000000000000000000000000
--- a/Setup/SetupEnvironment.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/IMagneticFieldModel.h>
-#include <corsika/environment/IMediumModel.h>
-#include <corsika/environment/IMediumPropertyModel.h>
-#include <corsika/environment/IRefractiveIndexModel.h>
-#include <corsika/environment/IMagneticFieldModel.h>
-
-namespace corsika::setup {
-
-  /**
-     Definition of the default environemnt model interface. Each model
-     interface provides properties of the environment in a position
-     bdependent way.
-   */
-
-  using EnvironmentInterface = environment::IMediumPropertyModel<
-      environment::IMagneticFieldModel<environment::IMediumModel>>;
-  using Environment = environment::Environment<EnvironmentInterface>;
-
-} // end namespace corsika::setup
-
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/InhomogeneousMedium.h>
-#include <corsika/environment/MediumPropertyModel.h>
-#include <corsika/environment/UniformMagneticField.h>
-
-/**
- * standard environment for unit testing. This can be moved to
- * "test" directory, when available.
- */
-namespace corsika::setup::testing {
-
-  inline auto setupEnvironment(particles::Code vTargetCode,
-                               const corsika::units::si::MagneticFluxType BfieldZ =
-                                   corsika::units::si::MagneticFluxType::zero()) {
-
-    using namespace corsika::units::si;
-    using namespace corsika;
-
-    auto env = std::make_unique<setup::Environment>();
-    auto& universe = *(env->GetUniverse());
-    const geometry::CoordinateSystem& cs = env->GetCoordinateSystem();
-
-    /**
-     * our world is a sphere at 0,0,0 with R=infty
-     */
-    auto world = setup::Environment::CreateNode<geometry::Sphere>(
-        geometry::Point{cs, 0_m, 0_m, 0_m}, 100_km);
-
-    /**
-     * construct suited environment medium model:
-     */
-    using MyHomogeneousModel =
-        environment::MediumPropertyModel<environment::UniformMagneticField<
-            environment::HomogeneousMedium<setup::EnvironmentInterface>>>;
-
-    world->SetModelProperties<MyHomogeneousModel>(
-        environment::Medium::AirDry1Atm, geometry::Vector(cs, 0_T, 0_T, BfieldZ),
-        1_kg / (1_m * 1_m * 1_m),
-        environment::NuclearComposition(std::vector<particles::Code>{vTargetCode},
-                                        std::vector<float>{1.}));
-
-    auto* nodePtr = world.get();
-    universe.AddChild(std::move(world));
-
-    return std::make_tuple(std::move(env), &cs, nodePtr);
-  }
-
-} // namespace corsika::setup::testing
diff --git a/Setup/SetupStack.h b/Setup/SetupStack.h
deleted file mode 100644
index f06aaf76093c88121e6f5d3f096d958fd5966909..0000000000000000000000000000000000000000
--- a/Setup/SetupStack.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#pragma once
-
-#include <corsika/stack/CombinedStack.h>
-#include <corsika/stack/node/GeometryNodeStackExtension.h>
-#include <corsika/stack/nuclear_extension/NuclearStackExtension.h>
-#include <corsika/stack/history/HistorySecondaryProducer.hpp>
-#include <corsika/stack/history/HistoryStackExtension.hpp>
-
-#include <corsika/setup/SetupEnvironment.h>
-
-namespace corsika::setup {
-
-  namespace detail {
-
-    // ------------------------------------------
-    // add geometry node tracking data to stack:
-
-    // the GeometryNode stack needs to know the type of geometry-nodes from the
-    // environment:
-    template <typename TStackIter>
-    using SetupGeometryDataInterface = typename stack::node::MakeGeometryDataInterface<
-        TStackIter, corsika::setup::Environment>::type;
-
-    // combine particle data stack with geometry information for tracking
-    template <typename TStackIter>
-    using StackWithGeometryInterface = corsika::stack::CombinedParticleInterface<
-        stack::nuclear_extension::ParticleDataStack::MPIType, SetupGeometryDataInterface,
-        TStackIter>;
-
-    using StackWithGeometry = corsika::stack::CombinedStack<
-        typename corsika::stack::nuclear_extension::ParticleDataStack::StackImpl,
-        corsika::stack::node::GeometryData<setup::Environment>,
-        StackWithGeometryInterface>;
-
-    // ------------------------------------------
-    // Add [optional] history data to stack, too:
-
-    // combine dummy stack with geometry information for tracking
-    template <typename TStackIter>
-    using StackWithHistoryInterface = corsika::stack::CombinedParticleInterface<
-        StackWithGeometry::MPIType, history::HistoryEventDataInterface, TStackIter>;
-
-    using StackWithHistory =
-        corsika::stack::CombinedStack<typename StackWithGeometry::StackImpl,
-                                      history::HistoryEventData,
-                                      StackWithHistoryInterface>;
-
-  } // namespace detail
-
-  // ---------------------------------------
-  // this is the FINAL stack we use in C8:
-
-#ifdef WITH_HISTORY
-
-  /*
-   * the version with history
-   */
-  using Stack = detail::StackWithHistory;
-  template <typename T1, template <typename> typename M2>
-  using StackViewProducer = corsika::history::HistorySecondaryProducer<T1, M2>;
-
-  namespace detail {
-    /*
-      See Issue 161
-
-      unfortunately clang does not support this in the same way (yet) as
-      gcc, so we have to distinguish here. If clang cataches up, we
-      could remove the clang branch here and also in
-      corsika::Cascade. The gcc code is much more generic and
-      universal. If we could do the gcc version, we won't had to define
-      StackView globally, we could do it with MakeView whereever it is
-      actually needed. Keep an eye on this!
-    */
-#if defined(__clang__)
-    using TheStackView = corsika::stack::SecondaryView<
-        typename corsika::setup::Stack::StackImpl,
-        // CHECK with CLANG: corsika::setup::Stack::MPIType>;
-        corsika::setup::detail::StackWithHistoryInterface, StackViewProducer>;
-#elif defined(__GNUC__) || defined(__GNUG__)
-    using TheStackView =
-        corsika::stack::MakeView<corsika::setup::Stack, StackViewProducer>::type;
-#endif
-  } // namespace detail
-
-#else // WITH_HISTORY
-
-  /*
-   * the version without history
-   */
-  using Stack = detail::StackWithGeometry;
-  template <typename T1, template <typename> typename M2>
-  using StackViewProducer = corsika::stack::DefaultSecondaryProducer<T1, M2>;
-
-  namespace detail {
-    /*
-      See Issue 161
-
-      unfortunately clang does not support this in the same way (yet) as
-      gcc, so we have to distinguish here. If clang cataches up, we
-      could remove the clang branch here and also in
-      corsika::Cascade. The gcc code is much more generic and
-      universal. If we could do the gcc version, we won't had to define
-      StackView globally, we could do it with MakeView whereever it is
-      actually needed. Keep an eye on this!
-    */
-#if defined(__clang__)
-    using TheStackView =
-        corsika::stack::SecondaryView<typename corsika::setup::Stack::StackImpl,
-                                      // CHECK with CLANG:
-                                      // corsika::setup::Stack::MPIType>;
-                                      corsika::setup::detail::StackWithGeometryInterface>;
-#elif defined(__GNUC__) || defined(__GNUG__)
-    using TheStackView = corsika::stack::MakeView<corsika::setup::Stack>::type;
-#endif
-  } // namespace detail
-
-#endif
-
-  // ---------------------------------------
-  // this is the FINAL stackitertor (particle type) we use in C8:
-
-  using StackView = detail::TheStackView;
-
-} // namespace corsika::setup
-
-/**
- * standard stack setup for unit tests. This can be moved to "test"
- * directory, when available.
- */
-
-namespace corsika::setup::testing {
-
-  inline auto setupStack(particles::Code vProjectileType, int vA, int vZ,
-                         units::si::HEPEnergyType vMomentum,
-                         const setup::Environment::BaseNodeType* vNodePtr,
-                         geometry::CoordinateSystem const& cs) {
-
-    using namespace corsika;
-    using namespace corsika::units::si;
-
-    auto stack = std::make_unique<setup::Stack>();
-
-    geometry::Point const origin(cs, {0_m, 0_m, 0_m});
-    corsika::stack::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV});
-
-    if (vProjectileType == particles::Code::Nucleus) {
-      auto constexpr mN = corsika::units::constants::nucleonMass;
-      HEPEnergyType const E0 = sqrt(units::static_pow<2>(mN * vA) + pLab.squaredNorm());
-      auto particle = stack->AddParticle(
-          std::make_tuple(particles::Code::Nucleus, E0, pLab, origin, 0_ns, vA, vZ));
-      particle.SetNode(vNodePtr);
-      return std::make_tuple(std::move(stack),
-                             std::make_unique<setup::StackView>(particle));
-    } else { // not a nucleus
-      HEPEnergyType const E0 = sqrt(
-          units::static_pow<2>(particles::GetMass(vProjectileType)) + pLab.squaredNorm());
-      auto particle =
-          stack->AddParticle(std::make_tuple(vProjectileType, E0, pLab, origin, 0_ns));
-      particle.SetNode(vNodePtr);
-      return std::make_tuple(std::move(stack),
-                             std::make_unique<setup::StackView>(particle));
-    }
-  }
-
-} // namespace corsika::setup::testing
diff --git a/Stack/CMakeLists.txt b/Stack/CMakeLists.txt
deleted file mode 100644
index ae5ee2acaabd768f8ac536e95a5706cdaae629cd..0000000000000000000000000000000000000000
--- a/Stack/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-add_subdirectory (DummyStack)
-add_subdirectory (SuperStupidStack)
-add_subdirectory (NuclearStackExtension)
-add_subdirectory (GeometryNodeStackExtension)
-add_subdirectory (History)
diff --git a/Stack/DummyStack/CMakeLists.txt b/Stack/DummyStack/CMakeLists.txt
deleted file mode 100644
index b7e09a9e49706079719e48c7a043ca4fa40404a7..0000000000000000000000000000000000000000
--- a/Stack/DummyStack/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-set (DummyStack_HEADERS DummyStack.h)
-set (DummyStack_NAMESPACE corsika/stack/dummy)
-
-add_library (DummyStack INTERFACE)
-
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (DummyStack ${DummyStack_NAMESPACE} ${DummyStack_HEADERS})
-
-target_link_libraries (
-  DummyStack
-  INTERFACE
-  CORSIKAstackinterface
-  CORSIKAunits
-  CORSIKAparticles
-  )
-
-target_include_directories (
-  DummyStack
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include>
-  )
-
-install (
-  FILES
-  ${DummyStack_HEADERS}
-  DESTINATION
-  include/${DummyStack_NAMESPACE}
-  )
-
-# ----------------
-# code unit testing
- CORSIKA_ADD_TEST(testDummyStack)
- target_link_libraries (
-   testDummyStack
-   DummyStack
-   CORSIKAtesting
-   )
diff --git a/Stack/NuclearStackExtension/CMakeLists.txt b/Stack/NuclearStackExtension/CMakeLists.txt
deleted file mode 100644
index 3e3c5e735317dbc76f9003a9a3d928df8f40a720..0000000000000000000000000000000000000000
--- a/Stack/NuclearStackExtension/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-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
-  SuperStupidStack
-  )
-
-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
-CORSIKA_ADD_TEST(testNuclearStackExtension)
-target_link_libraries (
-  testNuclearStackExtension
-  NuclearStackExtension
-  CORSIKAparticles
-  CORSIKAgeometry
-  CORSIKAunits
-  CORSIKAtesting
-  )
diff --git a/Stack/NuclearStackExtension/testNuclearStackExtension.cc b/Stack/NuclearStackExtension/testNuclearStackExtension.cc
deleted file mode 100644
index 72017c91a05c70d9c062fd72c20f0ff31cc4e246..0000000000000000000000000000000000000000
--- a/Stack/NuclearStackExtension/testNuclearStackExtension.cc
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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/units/PhysicalUnits.h>
-
-using namespace corsika;
-using namespace corsika::stack::nuclear_extension;
-using namespace corsika::geometry;
-using namespace corsika::units::si;
-
-#include <catch2/catch.hpp>
-
-#include <iostream>
-using namespace std;
-
-TEST_CASE("NuclearStackExtension", "[stack]") {
-
-  geometry::CoordinateSystem& dummyCS =
-      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
-
-  SECTION("write non nucleus") {
-    NuclearStackExtension<corsika::stack::super_stupid::SuperStupidStack,
-                          ExtendedParticleInterfaceType>
-        s;
-    s.AddParticle(
-        std::make_tuple(particles::Code::Electron, 1.5_GeV,
-                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s));
-    CHECK(s.getEntries() == 1);
-  }
-
-  SECTION("write nucleus") {
-    NuclearStackExtension<corsika::stack::super_stupid::SuperStupidStack,
-                          ExtendedParticleInterfaceType>
-        s;
-    s.AddParticle(std::make_tuple(
-        particles::Code::Nucleus, 1.5_GeV,
-        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 10));
-    CHECK(s.getEntries() == 1);
-  }
-
-  SECTION("write invalid nucleus") {
-    ParticleDataStack s;
-    CHECK_THROWS(s.AddParticle(
-        std::make_tuple(particles::Code::Nucleus, 1.5_GeV,
-                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 0, 0)));
-  }
-
-  SECTION("read non nucleus") {
-    ParticleDataStack s;
-    s.AddParticle(
-        std::make_tuple(particles::Code::Electron, 1.5_GeV,
-                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s));
-    const auto pout = s.GetNextParticle();
-    CHECK(pout.GetPID() == particles::Code::Electron);
-    CHECK(pout.GetEnergy() == 1.5_GeV);
-    CHECK(pout.GetTime() == 100_s);
-  }
-
-  SECTION("read nucleus") {
-    ParticleDataStack s;
-    s.AddParticle(
-        std::make_tuple(particles::Code::Nucleus, 1.5_GeV,
-                        corsika::stack::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();
-    CHECK(pout.GetPID() == particles::Code::Nucleus);
-    CHECK(pout.GetEnergy() == 1.5_GeV);
-    CHECK(pout.GetTime() == 100_s);
-    CHECK(pout.GetNuclearA() == 10);
-    CHECK(pout.GetNuclearZ() == 9);
-  }
-
-  SECTION("read invalid nucleus") {
-    ParticleDataStack s;
-    s.AddParticle(
-        std::make_tuple(particles::Code::Electron, 1.5_GeV,
-                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s));
-    const auto pout = s.GetNextParticle();
-    CHECK_THROWS(pout.GetNuclearA());
-    CHECK_THROWS(pout.GetNuclearZ());
-  }
-
-  SECTION("stack fill and cleanup") {
-
-    ParticleDataStack 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(std::make_tuple(
-            particles::Code::Nucleus, 1.5_GeV,
-            corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-            Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2));
-      } else {
-        s.AddParticle(std::make_tuple(
-            particles::Code::Electron, 1.5_GeV,
-            corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-            Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s));
-      }
-    }
-
-    CHECK(s.getEntries() == 99);
-    for (int i = 0; i < 99; ++i) s.GetNextParticle().Delete();
-    CHECK(s.getEntries() == 0);
-  }
-
-  SECTION("stack operations") {
-
-    ParticleDataStack s;
-    // add 99 particles, each 10th particle is a nucleus with A=i and Z=A/2!
-    // i=9, 19, 29, etc. are nuclei
-    for (int i = 0; i < 99; ++i) {
-      if ((i + 1) % 10 == 0) {
-        s.AddParticle(std::make_tuple(
-            particles::Code::Nucleus, i * 15_GeV,
-            corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-            Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2));
-      } else {
-        s.AddParticle(std::make_tuple(
-            particles::Code::Electron, i * 1.5_GeV,
-            corsika::stack::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;
-
-      CHECK(p9.GetPID() == particles::Code::Nucleus);
-      CHECK(p9.GetEnergy() == 9 * 15_GeV);
-      CHECK(p9.GetTime() == 100_s);
-      CHECK(p9.GetNuclearA() == 9);
-      CHECK(p9.GetNuclearZ() == 9 / 2);
-
-      CHECK(p10.GetPID() == particles::Code::Nucleus);
-      CHECK(p10.GetEnergy() == 9 * 15_GeV);
-      CHECK(p10.GetTime() == 100_s);
-      CHECK(p10.GetNuclearA() == 9);
-      CHECK(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;
-
-      CHECK(p9.GetPID() == particles::Code::Electron);
-      CHECK(p9.GetEnergy() == 93 * 1.5_GeV);
-      CHECK(p9.GetTime() == 100_s);
-
-      CHECK(p93.GetPID() == particles::Code::Electron);
-      CHECK(p93.GetEnergy() == 93 * 1.5_GeV);
-      CHECK(p93.GetTime() == 100_s);
-    }
-
-    // copy
-    {
-      s.Copy(s.begin() + 89, s.begin() + 79); // nuclei to nuclei
-      const auto& p89 = s.cbegin() + 89;
-      const auto& p79 = s.cbegin() + 79;
-
-      CHECK(p89.GetPID() == particles::Code::Nucleus);
-      CHECK(p89.GetEnergy() == 89 * 15_GeV);
-      CHECK(p89.GetTime() == 100_s);
-
-      CHECK(p79.GetPID() == particles::Code::Nucleus);
-      CHECK(p79.GetEnergy() == 89 * 15_GeV);
-      CHECK(p79.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
-
-      CHECK(p11.GetPID() == particles::Code::Nucleus);
-      CHECK(p11.GetEnergy() == 9 * 15_GeV);
-      CHECK(p11.GetTime() == 100_s);
-      CHECK(p11.GetNuclearA() == 9);
-      CHECK(p11.GetNuclearZ() == 9 / 2);
-
-      CHECK(p10.GetPID() == particles::Code::Electron);
-      CHECK(p10.GetEnergy() == 11 * 1.5_GeV);
-      CHECK(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;
-
-      CHECK(p29.GetPID() == particles::Code::Nucleus);
-      CHECK(p29.GetEnergy() == 59 * 15_GeV);
-      CHECK(p29.GetTime() == 100_s);
-      CHECK(p29.GetNuclearA() == 59);
-      CHECK(p29.GetNuclearZ() == 59 / 2);
-
-      CHECK(p59.GetPID() == particles::Code::Nucleus);
-      CHECK(p59.GetEnergy() == 29 * 15_GeV);
-      CHECK(p59.GetTime() == 100_s);
-      CHECK(p59.GetNuclearA() == 29);
-      CHECK(p59.GetNuclearZ() == 29 / 2);
-    }
-
-    for (int i = 0; i < 99; ++i) s.last().Delete();
-    CHECK(s.getEntries() == 0);
-  }
-
-  SECTION("not allowed") {
-    NuclearStackExtension<corsika::stack::super_stupid::SuperStupidStack,
-                          ExtendedParticleInterfaceType>
-        s;
-
-    // not valid:
-    CHECK_THROWS(s.AddParticle(std::make_tuple(
-        particles::Code::Oxygen, 1.5_GeV,
-        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 16, 8)));
-
-    // valid
-    auto particle = s.AddParticle(
-        std::make_tuple(particles::Code::Nucleus, 1.5_GeV,
-                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 9));
-
-    // not valid
-    CHECK_THROWS(particle.AddSecondary(std::make_tuple(
-        particles::Code::Oxygen, 1.5_GeV,
-        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 16, 8)));
-
-    // add a another nucleus, so there are two now
-    s.AddParticle(
-        std::make_tuple(particles::Code::Nucleus, 1.5_GeV,
-                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 9));
-
-    // not valid, since end() is not a valid entry
-    CHECK_THROWS(s.Swap(s.begin(), s.end()));
-  }
-}
diff --git a/Stack/SuperStupidStack/CMakeLists.txt b/Stack/SuperStupidStack/CMakeLists.txt
deleted file mode 100644
index 55b88c69c8c232a96c111e441426f4f23b8aca6a..0000000000000000000000000000000000000000
--- a/Stack/SuperStupidStack/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-set (SuperStupidStack_HEADERS SuperStupidStack.h)
-set (SuperStupidStack_NAMESPACE corsika/stack/super_stupid)
-
-add_library (SuperStupidStack INTERFACE)
-
-CORSIKA_COPY_HEADERS_TO_NAMESPACE (SuperStupidStack ${SuperStupidStack_NAMESPACE} ${SuperStupidStack_HEADERS})
-
-target_link_libraries (
-  SuperStupidStack
-  INTERFACE
-  CORSIKAstackinterface
-  CORSIKAunits
-  CORSIKAparticles
-  CORSIKAgeometry
-  CORSIKAlogging
-  )
-
-target_include_directories (
-  SuperStupidStack
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
-  $<INSTALL_INTERFACE:include>
-  )
-
-install (
-  FILES
-  ${SuperStupidStack_HEADERS}
-  DESTINATION
-  include/${SuperStupidStack_NAMESPACE}
-  )
-
-# ----------------
-# code unit testing
-CORSIKA_ADD_TEST(testSuperStupidStack)
-target_link_libraries (
-  testSuperStupidStack
-  SuperStupidStack
-  CORSIKAtesting
-  )
diff --git a/Stack/SuperStupidStack/testSuperStupidStack.cc b/Stack/SuperStupidStack/testSuperStupidStack.cc
deleted file mode 100644
index a9f4fadc90d9d21125a92173b13b652e5aa7af90..0000000000000000000000000000000000000000
--- a/Stack/SuperStupidStack/testSuperStupidStack.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
- *
- * 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.
- */
-
-#define protected public // to also test the internal state of objects
-
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/stack/super_stupid/SuperStupidStack.h>
-#include <corsika/units/PhysicalUnits.h>
-
-using namespace corsika::geometry;
-using namespace corsika::units::si;
-
-#include <catch2/catch.hpp>
-
-using namespace corsika;
-using namespace corsika::stack::super_stupid;
-
-using namespace std;
-
-TEST_CASE("SuperStupidStack", "[stack]") {
-
-  geometry::CoordinateSystem& dummyCS =
-      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
-
-  SECTION("read+write") {
-
-    SuperStupidStack s;
-    s.AddParticle(
-        std::make_tuple(particles::Code::Electron, 1.5_GeV,
-                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s));
-
-    // read
-    CHECK(s.getEntries() == 1);
-    CHECK(s.getSize() == 1);
-    auto pout = s.GetNextParticle();
-    CHECK(pout.GetPID() == particles::Code::Electron);
-    CHECK(pout.GetEnergy() == 1.5_GeV);
-    CHECK(pout.GetTime() == 100_s);
-  }
-
-  SECTION("write+delete") {
-
-    SuperStupidStack s;
-    for (int i = 0; i < 99; ++i)
-      s.AddParticle(
-          std::make_tuple(particles::Code::Electron, 1.5_GeV,
-                          corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
-                          Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s));
-
-    CHECK(s.getSize() == 99);
-
-    for (int i = 0; i < 99; ++i) s.GetNextParticle().Delete();
-
-    CHECK(s.getEntries() == 0);
-    CHECK(s.getSize() == 1);
-  }
-}
diff --git a/ThirdParty/.gitignore b/ThirdParty/.gitignore
deleted file mode 100644
index 0d7fe279527897921a3d07f84e8f70c1dd05ffac..0000000000000000000000000000000000000000
--- a/ThirdParty/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-eigen-eigen-b3f3d4950030/
diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt
deleted file mode 100644
index b1553b849d8fbf5d8c5c542b967b82ed663695b3..0000000000000000000000000000000000000000
--- a/ThirdParty/CMakeLists.txt
+++ /dev/null
@@ -1,292 +0,0 @@
-add_subdirectory (spdlog) # this is a git submodule 
-
-add_library (CORSIKAthirdparty INTERFACE)
-
-target_include_directories (CORSIKAthirdparty SYSTEM
-  INTERFACE
-  $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/ThirdParty>
-  $<INSTALL_INTERFACE:include/ThirdParty>
-  )
-
-install (DIRECTORY phys DESTINATION include/ThirdParty/)
-install (DIRECTORY catch2 DESTINATION include/ThirdParty/)
-
-include(ExternalProject)
-
-# eventually add AUTO here, too:
-set (ThirdPartyChoiceValues "C8;SYSTEM" CACHE STRING
-    "List of possible values for the ThirdParty package choice")
-mark_as_advanced (ThirdPartyChoiceValues)
-
-
-##############################################################################
-# check for boost: either use C8 or system-level installation
-
-message ("***** Configuring boost version")
-
-set (USE_BOOST_C8 "C8" CACHE STRING
-    "Selection of boost package. Can be \'C8\' or \'SYSTEM\'. Default: \'C8\'.")
-set_property (CACHE USE_BOOST_C8 PROPERTY STRINGS ${ThirdPartyChoiceValues} )
-if (NOT (${USE_BOOST_C8} IN_LIST ThirdPartyChoiceValues))
-  message (SEND_ERROR "Illegal USE_BOOST_C8=\"${USE_BOOST_C8}\" can only be one of: ${ThirdPartyChoiceValues}")
-endif (NOT (${USE_BOOST_C8} IN_LIST ThirdPartyChoiceValues))
-message (STATUS "USE_BOOST_C8='${USE_BOOST_C8}'")
-
-add_library (C8::ext::boost INTERFACE IMPORTED GLOBAL)
-if ("x_${USE_BOOST_C8}" STREQUAL "x_SYSTEM")
-  find_package (Boost REQUIRED COMPONENTS mp11 iterator core format interval optional type_index histogram multi_array)
-
-  message (STATUS "Using system-level boost version ${Boost_VERSION} at ${Boost_INCLUDE_DIR}")
-  set_target_properties (
-    C8::ext::boost PROPERTIES
-    INTERFACE_LINK_LIBRARIES Boost::headers
-    )
-  set (Boost_FOUND 1 PARENT_SCOPE)
-  
-else ()
-
-  set (_C8_Boost_VERSION "107400")
-  message (STATUS "Building ThirdParty/boost using boost-${_C8_Boost_VERSION}.tar.bz2")
-  ExternalProject_Add (boost
-    URL ${CMAKE_CURRENT_SOURCE_DIR}/boost-${_C8_Boost_VERSION}.tar.bz2
-    URL_MD5 d55f45e662d101985353136b321ec624
-    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/boost/install/boost 
-    INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/boost/install/boost 
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND ""
-    INSTALL_COMMAND ""
-    BUILD_IN_SOURCE ON
-    EXCLUDE_FROM_ALL FALSE
-    )
-  set (HAVE_Boost 1 CACHE BOOL "presence of boost, via external-project-add in ThirdParty folder")
-  set (Boost_FOUND 1 PARENT_SCOPE)
-  ExternalProject_Get_Property (boost INSTALL_DIR)
-  set (Boost_VERSION ${_C8_Boost_VERSION} CACHE STRING "Version of Boost")
-  set (Boost_PREFIX ${INSTALL_DIR}/..)
-  set (Boost_INCLUDE_DIR  ${Boost_PREFIX})
-  set (Boost_LIBRARY_DIR ${Boost_PREFIX})
-  add_dependencies (C8::ext::boost boost)
-  
-  # create include directory at config time
-  file (MAKE_DIRECTORY ${Boost_INCLUDE_DIR})
-  
-  set (Boost_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/externals/boost)
-  install (DIRECTORY ${Boost_PREFIX}/ DESTINATION ${Boost_INSTALL_DIR})
-  
-  message (STATUS "Use ThirdParty boost include dir ${Boost_INCLUDE_DIR}")
-  set_target_properties (
-    C8::ext::boost PROPERTIES
-    INTERFACE_INCLUDE_DIRECTORIES
-      $<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
-    )
- 
-endif ()
-
-
-##############################################################################
-# check for Eigen3: either use ThirdParty/eigen3 or system-level installation
-
-message ("***** Configuring eigen3 version")
-
-set (USE_EIGEN3_C8 "C8" CACHE STRING
-    "Selection of eigen3 package. Can be \'C8\' or \'SYSTEM\'. Default: \'C8\'.")
-set_property (CACHE USE_EIGEN3_C8 PROPERTY STRINGS ${ThirdPartyChoiceValues})
-if (NOT (${USE_EIGEN3_C8} IN_LIST ThirdPartyChoiceValues))
-  message (SEND_ERROR "Illegal USE_EIGEN3_C8=\"${USE_EIGEN3_C8}\" can only be one of: ${ThirdPartyChoiceValues}")
-endif (NOT (${USE_EIGEN3_C8} IN_LIST ThirdPartyChoiceValues))
-message (STATUS "USE_EIGEN3_C8='${USE_EIGEN3_C8}'")
-
-add_library (C8::ext::eigen3 INTERFACE IMPORTED GLOBAL)
-if ("x_${USE_EIGEN3_C8}" STREQUAL "x_SYSTEM")
-  
-  if (WITH_EIGEN3)
-    list (APPEND CMAKE_MODULE_PATH "${WITH_EIGEN3}/cmake")
-  endif (WITH_EIGEN3)
-  find_package (Eigen3 REQUIRED NO_MODULE)
-  message (STATUS "Using system-level eigen3 version ${Eigen3_VERSION} at ${Eigen3_INCLUDE_DIR}")
-  set_target_properties (
-    C8::ext::eigen3 PROPERTIES
-    INTERFACE_LINK_LIBRARIES Eigen3::Eigen
-  )
-set (Eigen3_FOUND 1 PARENT_SCOPE)
-
-else ()
-
-  set (_C8_Eigen3_VERSION "eigen-eigen-b3f3d4950030")
-
-  message (STATUS "Building ThirdParty/eigen3 using ${_C8_Eigen3_VERSION}.tar.bz2")
-  ExternalProject_Add (eigen3
-    URL ${CMAKE_CURRENT_SOURCE_DIR}/${_C8_Eigen3_VERSION}.tar.bz2
-    URL_MD5 e83549a79d1b721da0f8899ab34edf95
-    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/eigen3/install/eigen
-    INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/eigen3/install/eigen
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND ""
-    INSTALL_COMMAND ""
-    BUILD_IN_SOURCE ON
-    EXCLUDE_FROM_ALL FALSE
-    )
-  set (Eigen3_FOUND 1 PARENT_SCOPE)
-  ExternalProject_Get_Property (eigen3 INSTALL_DIR)
-  set (Eigen3_PREFIX ${INSTALL_DIR}/..)
-  set (Eigen3_INCLUDE_DIR  ${Eigen3_PREFIX}/eigen)
-  add_dependencies (C8::ext::eigen3 eigen3)
-
-  # create include directory at config time
-  file (MAKE_DIRECTORY ${Eigen3_INCLUDE_DIR})
-  
-  set (Eigen3_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/externals/eigen3)
-  install (DIRECTORY ${Eigen3_PREFIX}/ DESTINATION ${Eigen3_INSTALL_DIR})
-  
-  message (STATUS "Use ThirdParty eigen3 include dir ${Eigen3_INCLUDE_DIR}")
-  set_target_properties (
-    C8::ext::eigen3 PROPERTIES
-    INTERFACE_INCLUDE_DIRECTORIES
-      $<BUILD_INTERFACE:${Eigen3_INCLUDE_DIR}>
-    )
- 
-endif ()
-
-
-##############################################################################
-# check for Pythia8: either use C8 or system-level installation
-
-message ("***** Configuring Pythia8 version")
-
-set (USE_PYTHIA8_C8 "C8" CACHE STRING
-    "Selection of pythia8 package. Can be \'C8\' or \'SYSTEM\'. Default: \'C8\'.")
-set_property (CACHE USE_PYTHIA8_C8 PROPERTY STRINGS ${ThirdPartyChoiceValues})
-if (NOT (${USE_PYTHIA8_C8} IN_LIST ThirdPartyChoiceValues))
-  message (SEND_ERROR "Illegal USE_PYTHIA8_C8=\"${USE_PYTHIA8_C8}\" can only be one of: ${ThirdPartyChoiceValues}")
-endif (NOT (${USE_PYTHIA8_C8} IN_LIST ThirdPartyChoiceValues))
-message (STATUS "USE_PYTHIA8_C8='${USE_PYTHIA8_C8}'")
-
-add_library (C8::ext::pythia8 STATIC IMPORTED GLOBAL)
-if ("x_${USE_PYTHIA8_C8}" STREQUAL "x_SYSTEM")
-  
-  find_package (Pythia8 REQUIRED) 
-  message (STATUS "Using system-level Pythia8 version ${Pythia8_VERSION} at ${Pythia8_INCLUDE_DIR}")
-  set_target_properties (
-    C8::ext::pythia8 PROPERTIES
-    IMPORTED_LOCATION ${Pythia8_LIBRARY}
-    IMPORTED_LINK_INTERFACE_LIBRARIES dl
-    INTERFACE_INCLUDE_DIRECTORIES ${Pythia8_INCLUDE_DIR}
-    )
-  set (Pythia8_FOUND 1 PARENT_SCOPE)
-
-else ()
-
-  set (_C8_Pythia8_VERSION "8235")
-  message (STATUS "Building ThirdParty/pythia8 using pythia${_C8_Pythia8_VERSION}-stripped.tar.bz2")
-  message (STATUS "This will take a bit.....")
-  ExternalProject_Add (pythia8
-    URL ${CMAKE_CURRENT_SOURCE_DIR}/pythia${_C8_Pythia8_VERSION}-stripped.tar.bz2
-    URL_MD5 83132880c0594b808bd7fd37fb642606
-    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/pythia8/source
-    INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/pythia8/install
-    CONFIGURE_COMMAND ./configure --cxx-common=-Wno-deprecated-copy --prefix=${CMAKE_CURRENT_BINARY_DIR}/pythia8/install
-    BUILD_IN_SOURCE ON
-    EXCLUDE_FROM_ALL TRUE
-    )
-  set (Pythia8_FOUND 1 PARENT_SCOPE)
-  ExternalProject_Get_Property (pythia8 INSTALL_DIR)
-  set (Pythia8_VERSION ${_C8_Pythia8_VERSION} CACHE STRING "Version of Pythia8")
-  set (Pythia8_PREFIX ${INSTALL_DIR})
-  set (Pythia8_INCLUDE_DIR  ${Pythia8_PREFIX}/include)
-  set (Pythia8_LIBRARY ${Pythia8_PREFIX}/lib/libpythia8.a)
-  add_dependencies (C8::ext::pythia8 pythia8)
-
-  # create include directory at config time
-  file (MAKE_DIRECTORY ${Pythia8_INCLUDE_DIR})
-
-  set (Pythia8_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/externals/pythia8)
-  install (DIRECTORY ${INSTALL_DIR}/ DESTINATION ${Pythia8_INSTALL_DIR})
-  
-  set_target_properties (
-    C8::ext::pythia8 PROPERTIES
-    IMPORTED_LOCATION ${Pythia8_LIBRARY}
-    IMPORTED_LINK_INTERFACE_LIBRARIES dl
-    INTERFACE_INCLUDE_DIRECTORIES
-      $<BUILD_INTERFACE:${Pythia8_INCLUDE_DIR}>
-    )
-
-endif ()
-
-
-
-##############################################################################
-# check for CxRoot/CONEX: either use ThirdParty/cxroot or system-level installation
-
-message ("***** Configuring CxRoot/CONEX version")
-
-set (USE_CONEX_C8 "C8" CACHE STRING
-    "Selection of conex package. Can be \'C8\' or \'SYSTEM\'. Default: \'C8\'.")
-set_property (CACHE USE_CONEX_C8 PROPERTY STRINGS ${ThirdPartyChoiceValues})
-if (NOT (${USE_CONEX_C8} IN_LIST ThirdPartyChoiceValues))
-  message (SEND_ERROR "Illegal USE_CONEX_C8=\"${USE_CONEX_C8}\" can only be one of: ${ThirdPartyChoiceValues}")
-endif (NOT (${USE_CONEX_C8} IN_LIST ThirdPartyChoiceValues))
-message (STATUS "USE_CONEX_C8='${USE_CONEX_C8}'")
-
-add_library (C8::ext::conex STATIC IMPORTED GLOBAL)
-if ("x_${USE_CONEX_C8}" STREQUAL "x_SYSTEM")
-  
-  find_package (CONEX REQUIRED) 
-  message (STATUS "Using system-level CONEX version at ${CONEX_INCLUDE_DIR}")
-  set (CONEX_FOUND 1 PARENT_SCOPE)
-
-else ()
-  
-  message (STATUS "Building conex obtained via git and compiled")
-  message (STATUS "This will take a bit.....")
-  if (${CMAKE_VERSION} VERSION_LESS "3.16.0")
-    message (WARNING "You need cmake >= 3.16 to support proper external git submodules. Right now, it will be more inefficient than necessary.")
-  else (${CMAKE_VERSION} VERSION_LESS "3.16.0")
-    cmake_policy (SET CMP0097 NEW) # avoid cloning of git submodules
-  endif (${CMAKE_VERSION} VERSION_LESS "3.16.0")
-  ExternalProject_Add (cxroot
-    GIT_REPOSITORY https://gitlab.ikp.kit.edu/AirShowerPhysics/cxroot.git
-    GIT_SUBMODULES ""
-    GIT_TAG origin/master
-    GIT_SHALLOW 5
-    GIT_PROGRESS 1
-    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cxroot/source
-    INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/cxroot/source
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND make CX_NO_ROOT=1 CORSIKA_8=1 CORSIKA_DATA=${CORSIKA_DATA} all
-    INSTALL_COMMAND ""
-    BUILD_IN_SOURCE ON
-    EXCLUDE_FROM_ALL TRUE
-    )
-  set (CONEX_FOUND 1 PARENT_SCOPE)
-  ExternalProject_Get_Property (cxroot INSTALL_DIR)
-  get_filename_component(INSTALL_DIR_ABS ${INSTALL_DIR} ABSOLUTE)
-  set (CONEX_PREFIX ${INSTALL_DIR_ABS})
-  set (CONEX_INCLUDE_DIR  ${CONEX_PREFIX}/src)
-  set (CONEX_INCLUDE_DIR  ${CONEX_PREFIX}/src PARENT_SCOPE)
-  add_dependencies (C8::ext::conex cxroot)
-
-  # create include directory at config time
-  file (MAKE_DIRECTORY ${CONEX_INCLUDE_DIR})
-    
-endif ()
-
-set_target_properties (
-  C8::ext::conex PROPERTIES
-  IMPORTED_LOCATION ${CONEX_PREFIX}/lib/${CMAKE_SYSTEM_NAME}/libCONEXsibyll.a
-  IMPORTED_NO_SONAME 1
-  SKIP_BUILD_RPATH FALSE
-  IMPORTED_LINK_INTERFACE_LIBRARIES bz2
-  INTERFACE_INCLUDE_DIRECTORIES
-  $<BUILD_INTERFACE:${CONEX_INCLUDE_DIR}>    
-  )
-
-
-# libz needed for cnpy, used for SaveHistograms
-find_package (ZLIB QUIET)
-
-if (ZLIB_FOUND)
-  message (STATUS "Found ZLIB. Build cnpy for SaveHistograms")  
-  add_subdirectory (cnpy)
-else (ZLIB_FOUND)
-  message (WARNING "Did not find ZLIB. Cannot build cnpy for SaveHistograms")  
-endif (ZLIB_FOUND)
diff --git a/ThirdParty/ThirdParty.dox b/ThirdParty/ThirdParty.dox
deleted file mode 100644
index a271a23fa0c7999bbabb889887ea44a515fc89e1..0000000000000000000000000000000000000000
--- a/ThirdParty/ThirdParty.dox
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
-@page ThirdParty Third party software
-@tableofcontents
-
-In the directory ThirdParty we provide simple dependencies. This
-minimizes the need to install additional software for the user. Note
-the individual copyrights and licences here!
-
-
-@section PhysUnits
-
-The PhysUnits library is an external dependency included here just for
-convenience:
-
-Original source code from:
-https://github.com/martinmoene/PhysUnits-CT-Cpp11#references
-
-Licence: BSL-1.0
-(https://github.com/martinmoene/PhysUnits-CT-Cpp11/blob/master/LICENSE_1_0.txt)
-
-References: https://github.com/martinmoene/PhysUnits-CT-Cpp11#references
-
-
-@section catch2
- 
-The catch2 unit testing library is from:
-https://github.com/catchorg/Catch2
-
-Licence: BSL-1.0
-(https://github.com/martinmoene/PhysUnits-CT-Cpp11/blob/master/LICENSE_1_0.txt)
-
-References: https://github.com/catchorg/Catch2
-
-@section eigen3
- 
-eigen3 ....
-
-@section bitset2
-
-see https://github.com/ClaasBontus/bitset2, this package was obtained
-from a Boost Software License 1.0.
-
-@section Boost
-
-A subset of header-only Boost libraries. Boost is from:
-https://www.boost.org
-
-License: BSL-1.0
-(https://www.boost.org/LICENSE_1_0.txt)
-
-The subset was generated with the bcp tool:
-https://www.boost.org/doc/libs/1_73_0/tools/bcp/doc/html/index.html
-
-Instructions on how to update Boost with this tool:
-
-Download the latest tarball from www.boost.org.
-Unpack source code somewhere, go to into the folder.
-Run these commands:
-
-    ./bootstrap && ./b2 tools/bcp
-    ./dist/bin/bcp histogram multiarray math ./dist
-    mv ./dist/boost <CORSIKA-path>/ThirdParty/boost
-
-@section Pythia8
-
-There is a tar file provided with a default version of Pythia8. Some
-files have been removed from this with respect to the original
-distribution to save space.
-
-*/
diff --git a/ThirdParty/eigen-eigen-b3f3d4950030.tar.bz2 b/ThirdParty/eigen-eigen-b3f3d4950030.tar.bz2
deleted file mode 100644
index f7571b34f31468787f82a953029475b9896796a4..0000000000000000000000000000000000000000
Binary files a/ThirdParty/eigen-eigen-b3f3d4950030.tar.bz2 and /dev/null differ
diff --git a/ThirdParty/lcov/.version b/ThirdParty/lcov/.version
deleted file mode 100644
index ad1509c1e5fe761b2edd59aa9b46c4b9320e104f..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/.version
+++ /dev/null
@@ -1,3 +0,0 @@
-VERSION=1.14
-RELEASE=1
-FULL=1.14
diff --git a/ThirdParty/lcov/CHANGES b/ThirdParty/lcov/CHANGES
deleted file mode 100644
index 2e7086b994138249ee8f24b93a297015fc4fb245..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/CHANGES
+++ /dev/null
@@ -1,3454 +0,0 @@
-commit 6c7ad581ab9ed66f80050970c0d559c6684613b7 (HEAD, tag: v1.14, origin/master, origin/HEAD, master)
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Thu Feb 28 18:01:39 2019 +0100
-
-    lcov: Finalize release 1.14
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-
-commit 29814f18ec207ebaefa7b41f6e5acc4eca6d7a7a
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Thu Feb 28 17:31:17 2019 +0100
-
-    geninfo: Fix missing FN: entries in result files
-    
-    geninfo sometimes fails to correctly collect function starting lines for
-    some source files, resulting in output files with missing FN: lines.
-    Also such functions are missing from the function list in HTML output.
-    
-    The problem occurs when
-      a) multiple source files contribute to a function implementation (e.g.
-         via including code), and
-      b) the source file that contains the initial function definition
-         is not the source file that contains the most function
-         definitions
-    
-    The problem occurs due to a heuristic in function graph_find_base() that
-    incorrectly determines the source file for a function in this situation.
-    
-    Fix this by using the first file that contributes to a function as the
-    base source file for that function. Only apply this change to data
-    collected using GCC versions 4 and above since earlier versions did not
-    produce stable file orders in graph files.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-    Reported-by: Joshua Cranmer
-
-commit 74bae96e8ef724eb9dbdf126adad17505375e149
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Thu Feb 28 16:15:22 2019 +0100
-
-    Makefile: Make Perl path install-time configurable
-    
-    Add support for specifying the Perl interpreter path used in installed
-    Perl scripts. If no path is specified, the default '/usr/bin/perl' is
-    used.
-    
-    Set variable LCOV_PERL_PATH to specify a different path, for example:
-    
-      make install LCOV_PERL_PATH=/usr/local/bin/perl
-    
-    Unset this variable to keep the current path:
-    
-      make install LCOV_PERL_PATH=
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-
-commit 0b378cba2c0f93d728627aa8750849d3c33de0e1
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Thu Feb 28 14:21:18 2019 +0100
-
-    bin,test: Use /usr/bin/env to locate script interpreters
-    
-    Make use of the /usr/bin/env tool to locate script interpreters. This is
-    needed to locate the correct interpreter in non-standard environments.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-    Suggested-by: Bjørn Forsman <bjorn.forsman@gmail.com>
-    Suggested-by: Mario Costa
-
-commit 2ff99aefbd0c80fe0cfddf1e09a596d7344533e1
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Thu Feb 28 14:09:42 2019 +0100
-
-    bin/*: Remove '-w' from interpreter specifications
-    
-    Replace '-w' flag from Perl interpreter specifications with 'use strict'
-    directive. This is done in preparation of using a more flexible
-    interpreter specification.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-
-commit 3b378b0e76be95971680056d864d0e13f4a08557
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Wed Feb 27 16:33:42 2019 +0100
-
-    geninfo: Fix errors while resolving /././ path components
-    
-    Trying to collect code coverage data for source code that contains
-    repeat ./ references in a path components fails with the following
-    error message:
-    
-      geninfo: WARNING: cannot find an entry for <name>.gcov in .gcno file,
-               skipping file!
-    
-    This is caused by a bug in path normalization function
-    solve_relative_path() that does not correctly process adjacent ./
-    references.
-    
-    Fix this by repeating the resolution of ./ references in path
-    components.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-    Reported-by: Joshua Cranmer
-
-commit 42b55f5a497d2286566d0dd411e3e52fd4d50469
-Author: iignatyev <igor.v.ignatiev@gmail.com>
-Date:   Wed Feb 6 11:35:02 2019 -0800
-
-    geninfo: preserve-paths makes gcov to fail for long pathnames
-    
-    geninfo uses '--preserve-paths' gcov option whenever gcov supports it, this
-    forces gcov to use a whole pathname as a filename for .gcov files. So in cases
-    of quite large pathnames, gcov isn't able to create .gcov files and hence
-    geninfo can't get any data. The fix replaces usage '--preserve-paths' with
-    '--hash-filenames' when it is available.
-    
-    Signed-off-by: Igor Ignatev <igor.v.ignatiev@gmail.com>
-
-commit 04335632c371b5066e722298c9f8c6f11b210201
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Fri Jan 11 13:53:33 2019 +0100
-
-    geninfo: Fix "Can't use an undefined value" error
-    
-    When run on data for source code that causes gcc 8 to generate
-    artificial functions, geninfo emits warnings and eventually aborts
-    processing:
-    
-      geninfo: Use of uninitialized value in hash element at
-               /usr/local/bin/geninfo line 3001.
-      geninfo: Can't use an undefined value as an ARRAY reference at
-               /usr/local/bin/geninfo line 2889.
-    
-    This problem was introduced by commit 9aa0d14a ("geninfo: Ignore
-    artificial functions during --initial"). It is the result of an
-    incomplete removal of artificial functions from internal data.
-    
-    Fix this by explicitcly removing known artificial functions after
-    parsing of graph files completes.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-    Reported-by: Steven Peters <scpeters@osrfoundation.org>
-
-commit 9aa0d14af4446ef46d80356849a97bc961a91f97
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Thu Jan 10 13:20:15 2019 +0100
-
-    geninfo: Ignore artificial functions during --initial
-    
-    Graph files generated by gcc 8 may contain "artifical" functions that do
-    not exist in a source file. geninfo incorrectly generates coverage data
-    for these functions when run with option --initial.
-    
-    Fix this by filtering out artifical functions when generating initial
-    coverage data.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-    Reported-by: Marcin Konarski <marcin.konarski@codestation.org>
-
-commit 1e0df571198229b4701100ce5f596cf1658ede4b
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Thu Jan 10 11:39:07 2019 +0100
-
-    geninfo: Fix data collection for files containing templates
-    
-    When using gcc 8, lcov/geninfo produces corrupt coverage output for
-    source code that contains templates or other constructs that cause gcov
-    to produce multiple versions of output for some lines and branches.
-    
-    This is caused by an incorrect check for duplicate output in function
-    read_gcov_file() that is triggered when a template consists of multiple
-    lines, or contains branches.
-    
-    Fix this by ensuring that duplicate lines in per-instance gcov output are
-    correctly ignored. Only the initial occurrence of each line containing
-    the combined coverage of all instances will be processed by geninfo.
-    
-    Note that for branch coverage, gcov doesn't provide a combined view and
-    geninfo processes all branches provided. This should not be a problem
-    though as genhtml will combine the branch data when generating HTML
-    output.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-
-commit abd8bed2b013334d4ef978abadbfff6cc6f3d55d
-Author: MarcoFalke <falke.marco@gmail.com>
-Date:   Tue Jan 8 12:49:00 2019 +0100
-
-    genhtml: Unconditionally include anchor for each named line
-    
-    This helps with referencing the line in the html when sharing links.
-    
-    Signed-off-by: MarcoFalke <falke.marco@gmail.com>
-
-commit 28675dc7564aaa1ad231a7ac23106512a3956d68
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Tue Dec 18 13:07:58 2018 +0100
-
-    genhtml: Use gmtime for SOURCE_DATE_EPOCH conversion
-    
-    By changing that localtime to gmtime the "Known bug" section of the
-    commit message can be removed.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-    Suggested-by: Bjørn Forsman <bjorn.forsman@gmail.com>
-
-commit 180286bec651928c41de4d6ce3a8760678b38f60
-Author: Bjørn Forsman <bjorn.forsman@gmail.com>
-Date:   Tue Dec 4 14:30:28 2018 +0100
-
-    genhtml: honor the SOURCE_DATE_EPOCH variable
-    
-    Implement the SOURCE_DATE_EPOCH specification[1] for reproducible
-    builds. If SOURCE_DATE_EPOCH is set, use it as timestamp instead of the
-    current time.
-    
-    In this context, reproducible builds means reproducible HTML coverage
-    reports.
-    
-    Known bug: the specification[1] says to defer converting the timestamp
-    to local timezone at presentation time. This is currently not happening;
-    it's converted at build time.
-    
-    [1] https://reproducible-builds.org/specs/source-date-epoch/
-    
-    Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
-
-commit 41e07cadeeae3054ac22202d5b0b0f0ef6e26467
-Author: Bjørn Forsman <bjorn.forsman@gmail.com>
-Date:   Tue Dec 4 14:30:27 2018 +0100
-
-    Tolerate CDPATH being set
-    
-    If CDPATH is set, cd will print the path it enters, resulting in TOOLDIR
-    containing the path twice, separated by a newline.
-    
-    Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
-
-commit a3bbe8f0398a3c36b4228cc173e4739d27a863e1
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Mon Dec 10 13:58:10 2018 +0100
-
-    CONTRIBUTING: Clarify patch format requirements
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-
-commit e6750800fe4cb89eda1ff80b7a5fe70fe87ede36
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Tue Nov 13 17:28:17 2018 +0100
-
-    geninfo: Fix accounting of basic blocks in exceptional paths
-    
-    Basic blocks that are not executed and are only reachable via
-    exceptional paths are marked with a '%%%%%' marker in the GCOV output of
-    current GCC versions. Fix geninfo to also recognize this marker.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-    Reported-by: trotux (github user)
-
-commit 94eac0ee870e58630d8052dca1181b0cf802525f
-Author: Peter Oberparleiter <oberpar@linux.ibm.com>
-Date:   Mon Jul 16 13:24:58 2018 +0200
-
-    lcov: Fix branch coverage summary
-    
-    When combining two data files A (without branch coverage data) and B
-    (with branch coverage data), lcov will incorrectly report no branch
-    coverage data for the resulting file in program output, even though the
-    resulting file contains branch coverage data. This only happens when A
-    is specified first during the add operation.
-    
-    This is due to a bug in lcov that loses the correctly combined branch
-    coverage data internally in function brcount_db_combine() when its first
-    parameter is undefined. Fix this by ensuring that the first parameter is
-    an empty hash reference instead.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
-
-commit a5dd9529f9232b8d901a4d6eb9ae54cae179e5b3
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Mar 7 14:18:55 2018 +0100
-
-    geninfo: Add gcc 8 support
-    
-    Fix errors and incorrect data when trying to collect coverage data
-    for programs compiled with gcc 8.
-    
-    Covers the following gcov-related changes in gcc:
-    
-    .gcov-file format:
-      - Line coverage data can appear multiple times for the same line
-      - Line coverage count can be suffixed by '*' to indicated unexecuted
-        basic blocks in that line
-    
-    .gcno-file format:
-      - new header field 'support unexecuted blocks flag'
-      - new function record fields 'column number', 'ending line number',
-        and 'compiler-generated entity flag'
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit c30d88a3a8096dbb3f968de999480c3dc2dedb5f
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Tue Jan 30 15:12:09 2018 +0100
-
-    genhtml: Implement option to show miss counts
-    
-    Add new command line option --missed that can be used to show the
-    number of missed lines, functions, or branches.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 999abf2447b4df373b135dc3f8ee317350bd95f8
-Author: Benoit Belley <Benoit.Belley@autodesk.com>
-Date:   Fri Oct 6 10:01:28 2017 -0400
-
-    Adding the --include and --exclude options to lcov and geninfo
-    
-    * The --include command-line option allows the user to specify a regular
-      expression for the source files to be included. The command-line
-      option can be repeated to specify multiple patterns. The coverage
-      information is only included for the source files matching at least
-      one of the patterns.
-    
-      The "lcov --capture --include" (or "geninfo --include") option is
-      similar in functionality to the "lcov --extract" command-line
-      option. But, by directly using applying the pattern while capturing
-      coverage data one can often avoid having to run "lcov --extract" as a
-      second pass.
-    
-    * The --exclude command-line option allows the user to specify a regular
-      expression for the source files to be excluded. The command-line
-      option can be repeated to specify multiple patterns. The coverage
-      information is excluded for source files matching at least one of the
-      patterns.
-    
-      The "lcov --capture --exclude" (or "geninfo --exclude") option is
-      similar in functionality to the "lcov --extract" command-line
-      option. But, by directly using applying the pattern while capturing
-      coverage data one can often avoid having to run "lcov --remove" as a
-      second pass.
-    
-    * On one of our code base at Autodesk, this speeds-up the generation of
-      HTML code coverage reports by a factor of 3X.
-    
-    Signed-off-by: Benoit Belley <benoit.belley@autodesk.com>
-
-commit b6a11368c3cdc86c4e147ccd8e539918dfe37900
-Author: Ziqian SUN (Zamir) <zsun@redhat.com>
-Date:   Wed Jul 19 10:58:24 2017 +0800
-
-    Resolve some rpmlint issue in SPEC.
-    
-    Following messages reported by rpmlint on RHEL is fixed by this patch:
-    lcov.src: W: invalid-license GPL
-    lcov.src:9: W: hardcoded-path-in-buildroot-tag
-    /var/tmp/%{name}-%{version}-root
-    lcov.src: E: specfile-error warning: bogus date in %changelog: Fri Oct 8
-    2002 Peter Oberparleiter (Peter.Oberparleiter@de.ibm.com)
-    lcov.noarch: W: non-conffile-in-etc /etc/lcovrc
-    
-    Signed-off-by: Ziqian SUN (Zamir) <zsun@redhat.com>
-    [oberpar@linux.vnet.ibm.com: Corrected license to GPLv2+]
-
-commit a77a7628ef5377c525a0d4904cc0b73eeede4d7c
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Fri Apr 7 15:43:28 2017 +0200
-
-    genhtml: Reduce path resolution overhead
-    
-    Reduce overhead when reading coverage data files by consolidating
-    calls to Cwd:cwd().
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 526c5148ac0add40ef1224d2cdabdec73ce3f899
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Fri Apr 7 15:37:52 2017 +0200
-
-    genhtml: Reduce load times for complex coverage data files
-    
-    genhtml uses a significant amount of time loading coverage data files
-    containing complex branch coverage data (i.e. data with a large number
-    of branches per basic block). Most of this time is spent storing
-    branch coverage data in a vector-based data representation, with an
-    unnecessary amount of cross-checking being done for existing branch
-    data.
-    
-    Fix this by replacing the vector based data representation by two
-    separate representations, scalar for storage and hash for processing,
-    and by moving cross-checking out of the hot path. This results in a
-    significant speedup at the cost of a minor increase in memory usage.
-    
-    Test results for "make -C genhtml_output/ SIZE=large":
-    
-    Original:
-      6 tests executed, 6 passed, 0 failed, 0 skipped (time 768.4s, mem
-      893.8MB)
-    
-    Patched:
-      6 tests executed, 6 passed, 0 failed, 0 skipped (time 202.3s, mem
-      908.10MB)
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 0f07133f184af6670bdf1edf39fca9d2e90e9ad2
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Fri Apr 7 14:38:22 2017 +0200
-
-    test: Add self-tests for genhtml
-    
-    Add some tests for checking basic functionality of genhtml.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 544a6951db25679792bb0648006a897ea564d883
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Fri Apr 7 14:32:47 2017 +0200
-
-    genhtml: Ensure stable block order in branch output
-    
-    Sort order of basic blocks in output of branch coverage data. This
-    allows for a better comparison of output between test cases.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 477957fa4c6c104d5842911682ec17d6ad2d2980
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Thu Apr 6 12:28:11 2017 +0200
-
-    lcov: Reduce load times for complex coverage data files
-    
-    lcov uses a significant amount of time loading coverage data files
-    containing complex branch coverage data (i.e. data with a large number
-    of branches per basic block). Most of this time is spent storing
-    branch coverage data in a vector-based data representation, with an
-    unnecessary amount of cross-checking being done for existing branch
-    data.
-    
-    Fix this by replacing the vector based data representation by two
-    separate representations, scalar for storage and hash for processing,
-    and by moving cross-checking out of the hot path. This results in a
-    significant speedup at the cost of a minor increase in memory usage.
-    
-    Test results for "make test SIZE=large":
-    
-    Original:
-      17 tests executed, 17 passed, 0 failed, 0 skipped (time 1883.9s, mem
-      2459.0MB)
-    
-    Patched:
-      17 tests executed, 17 passed, 0 failed, 0 skipped (time 283.6s, mem
-      2544.2MB)
-    
-    Note that this fix only applies to the lcov tool. The same work is
-    necessary for genhtml.
-    
-    This approach was inspired by a patch by creich.3141592@gmail.com.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 3b397a3f3acdb62080e8366130758cb34703cfbf
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Thu Apr 6 09:01:36 2017 +0200
-
-    test: Improve test framework
-    
-    Various improvements to lcov's self-test framework:
-     - Add test case for lcov --diff
-     - Add new verbosity level
-     - Enable normalization of coverage data files from stdin
-     - Fix lcov_add_concatenated4 test name
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 53a6ce8ef604173b6de874a534a30121392d7cd0
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Thu Mar 30 15:42:56 2017 +0200
-
-    lcov: Add self-tests
-    
-    Add some tests for checking basic functionality of lcov. To run these
-    tests, type:
-    
-    	make test
-    
-    in either the top-level directory, or the test/ sub-directory.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 9753d5c0da107919537e91e504551e4ab3bccc2f
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Thu Mar 30 15:31:34 2017 +0200
-
-    lcov: Fix output on stderr for --summary
-    
-    Some functions of lcov erroneously print informational output to stderr
-    instead of stdout as expected. Fix this by inverting the "to_file" logic
-    in lcov to a "data_stdout" logic. Affected functions are --summary,
-    --reset and --list.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 25f5d38abad20eeaa407f62f53c3c00dfbbd0bf3
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Mon Mar 6 09:51:00 2017 +0100
-
-    lcovrc.5: Add genhtml_demangle_cpp default and CLI reference
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 66db744a1d63c5d3b1dee2d8a2ce76e6e06c7255
-Author: Katsuhiko Nishimra <ktns.87@gmail.com>
-Date:   Fri Mar 3 17:47:48 2017 +0900
-
-    Support passing demangle-cpp option via lcovrc
-    
-    This patch allows users to passing the demangle-cpp option to genhtml
-    via lcovrc, alongside with CUI.
-    
-    Signed-off-by: Katsuhiko Nishimra <ktns.87@gmail.com>
-
-commit b6fb452addaa6a33dcb37c101879b8b5e1e0c34c (tag: v1.13)
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Mon Dec 19 15:20:40 2016 +0100
-
-    lcov: Finalize release 1.13
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit daca8d9febe52ccf1976240a3b48ffc350dec902
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Mon Dec 19 14:36:00 2016 +0100
-
-    geninfo: Fix 'unexpected end of file' error
-    
-    Use the compiler version as stored in the .gcno file to determine if
-    the file contains function records with split checksums. This fixes
-    the following problem that can occur when lcov is run using a gcov
-    tool of GCC version 4.7 and above on .gcno files compiled with a
-    version below 4.7:
-    
-      # lcov -c -d . -o test.info --initial
-      [...]
-      geninfo: ERROR: test.gcno: reached unexpected end of file
-    
-    Also add missing lcov version to --debug output.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit a90d50e97cb49ea712c94d91cdef1cc21a3c7986
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Dec 14 11:00:08 2016 +0100
-
-    lcov: Remove use of install -D option
-    
-    Some versions of the install tool don't support the -D option, causing
-    a 'make install' call to fail. Fix this by replacing the -D option with
-    two calls to install, first to create all target directory components,
-    then to install the actual files.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-    Reported-by: <deanyang@tencent.com>
-
-commit 6ec3f2398d22e605c1a8019541fb32d26d18044b
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Fri Oct 7 09:47:35 2016 +0200
-
-    genhtml: Fix warning with small genhtml_line_field_width
-    
-    On systems with Perl versions 5.21 and above, genhtml prints a warning
-    similar to the following during processing:
-    
-      genhtml: Negative repeat count does nothing at bin/genhtml line 3854,
-               <SOURCE_HANDLE> line 4.
-    
-    This is due to size calculations resulting in a negative number of
-    padding characters when genhtml_line_field_width is lower than the size
-    of the strings to pad (9). Fix this by disabling padding in these cases.
-    
-    Reported-by: xaizek@openmailbox.org
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit d7cc7591b3a7cc1ec95371d04e4fc46f10b3fd54
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Tue Oct 4 09:50:52 2016 +0200
-
-    geninfo: Fix gcov version detection for XCode 8.0
-    
-    The LLVM gcov version included in XCode 8.0 reports its version in a
-    format that is not understood by geninfo, resulting in the wrong format
-    of coverage data files being expected. Fix this by reworking gcov
-    version detection in geninfo to be more robust.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 68320d932c5ee5537ae1c287fe52603ae2fecf8c
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Mon Aug 22 15:54:56 2016 +0200
-
-    lcov: Update installation mechanism
-    
-    Change default installation location to /usr/local to prevent
-    conflicts with files installed by package managers (reported by
-    Gregory Fong). To achieve this, rename PREFIX to DESTDIR and
-    introduce actual PREFIX Makefile variable and update spec file
-    to install packaged files to previous locations.
-    
-    Also fix spec file to not announce ownership of system directories
-    (reported by and based on patch by Jiri Kastner <jkastner@redhat.com>).
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 04a3c0ed1b4b9750b2ac5060aac0e6d5a3b9da7f
-Author: Benoit Belley <benoit.belley@autodesk.com>
-Date:   Mon Apr 4 18:16:54 2016 -0400
-
-    Pass --no-strip-underscore to c++filt on OS X
-    
-    * The --no-strip-underscope flag is necessary on OS X so that symbols
-      listed by gcov get demangled properly.
-    
-       From the c++filt man page: "On some systems, both the C and C++
-       compilers put an underscore in front of every name.  For example, the
-       C name "foo" gets the low-level name "_foo". This option tells c++filt
-       not to remove the initial underscore.  Whether c++filt removes the
-       underscore by default is target dependent."
-    
-    Signed-off-by: Benoit Belley <benoit.belley@autodesk.com>
-
-commit 632c25a0d1f5e4d2f4fd5b28ce7c8b86d388c91f
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Tue Mar 8 10:51:51 2016 +0100
-
-    lcov: Fix output files being created in / directory
-    
-    When a warning is emitted by lcov before creating an output file,
-    e.g. when a negative coverage count was found while combining
-    tracefiles, lcov tries to create the output file in the root
-    directory (/) instead of the current working directory.
-    
-    This is a result of lcov's warn handler calling a temp file cleanup
-    routine that changes directories to / before trying to remove its
-    temporary directory.
-    
-    Fix this by removing the temp cleanup call from the warn handler.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit e32aab1b4c85503a6592a91326c4b362613e1d66
-Author: Gabriel Laskar <gabriel@lse.epita.fr>
-Date:   Wed Feb 10 09:56:18 2016 +0100
-
-    lcov: Fix --remove pattern matching
-    
-    The --remove option of lcov now consider the pattern passed as parameter
-    as a full path, and not only a part of the filename.
-    
-    This behavior was discovered by using AX_CODE_COVERAGE[1] m4 macro from
-    a directory in $HOME/tmp. The macro itself calls lcov with
-    `--remove "/tmp/*"`.
-    
-    [1]: https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html
-    
-    Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
-
-commit 79e9f281ea893b2f6498b4bad79173b1414aa055
-Author: Reiner Herrmann <reiner@reiner-h.de>
-Date:   Fri Oct 30 20:26:59 2015 +0100
-
-    lcov: use UTC to get timezone-independent date
-    
-    The date is used for updating the time inside manpages.
-    If localtime is used, the date could vary depending on the user's
-    timezone. To enable reproducible builds, UTC is used instead.
-    
-    Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>
-
-commit de33f51b49dc6d01a285aa73990f03e7d982beb2 (tag: v1.12)
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Mon Oct 5 17:37:40 2015 +0200
-
-    lcov: Finalize release 1.12
-    
-     - Use full git describe output as tool version
-     - Update version numbers and last-changed-dates in man pages,
-       spec and README file
-     - Replace static CHANGES file with git log
-     - Switch Makefile logic to use mktemp for generating a temporary
-       directory
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 1ad4f7779b7721e311e552209e110e08bbf18fa1
-Author: Denis Abramov <abramov.denis@gmail.com>
-Date:   Mon Sep 21 09:29:20 2015 +0200
-
-    geninfo: Added support for Xcode 7.0 gcov version handling
-    
-    With Xcode 7.0 LLVM gcov keeps version information on the first line.
-    E.g. gcov --version yields: Apple LLVM 7.0.0 (clang-700.0.65)
-    
-    Signed-off-by: Denis Abramov <abramov.denis@gmail.com>
-
-commit c3602ea8e598deda4afff603bb123caa98eef159
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Mon Aug 3 11:05:51 2015 +0200
-
-    genhtml: Allow prefix paths with spaces
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit a3572971367198ef0febe476052640bd09bec931
-Author: Gilles Gouaillardet <gilles@rist.or.jp>
-Date:   Thu Jul 30 14:11:57 2015 +0900
-
-    genhtml: support a comma separated list of prefixes
-    
-    the --prefix option of genhtml now takes a comma separated list of prefixes
-    instead of a single prefix.
-    this can be required when running lcov vs projects configure'd with VPATH
-    and in which source files are both in the source and build directories.
-    
-    Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
-
-commit 997f32ae85717cd47d2305d7cd7ccce3ffa1abe6
-Author: Gilles Gouaillardet <gilles@rist.or.jp>
-Date:   Tue Jun 23 14:28:22 2015 +0900
-
-    Fix find command line
-    
-    find xxx -name \*.gcda -type f -o type l
-    does return :
-    - all files with the .gcda suffix
-    - all symbolic links
-    
-    the updated command line now returns
-    - all files with the .gcda suffix
-    - all symbolic links with the .gcda suffix
-    
-    Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
-
-commit 533db4e78b54ae01e023d00c1fec5dddaaaf37e6
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Jun 17 17:54:20 2015 +0200
-
-    lcov: Fix capture for package files containing graph files
-    
-    Depending on whether package files contain graph files, data should be
-    collected from the unpacked package file directly, or from the build
-    directory after linking data files. This approach fixes problems when
-    capturing coverage data via a package from a directory containing graph
-    files.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit a2a8b376ec5e9e5082a0cbb935137d6a8f526870
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Jun 17 17:34:33 2015 +0200
-
-    lcov: Fix .build_directory file not being deleted
-    
-    Using option --to-package while capturing coverage data creates a
-    temporary file named ".build_directory". Currently this file is not
-    properly removed at the end of processing due to a changed CWD. This
-    patch fixes this problem by reverting to the original CWD before trying
-    to remove the temporary file.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit b9de825f1fe018f381c8859ee0f3f4af15122c7a
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Tue Jun 16 13:53:00 2015 +0200
-
-    lcov: Enable userspace package capture with only data files
-    
-    Previously lcov's --from-package capture mechanism required
-    that .gcno files and source were present on the test machine.
-    
-    This patch modifies --from-package capturing to work when
-    only .gcda files are present in the package captured on the
-    test machine. It works by linking the .gcda files collected
-    on the test machine into their natural location on the build
-    machine. This requires existing .gcda files to be removed.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 0e4f0908aed3e1a071d5435c36c18cd493f0c309
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Tue Jun 16 13:33:54 2015 +0200
-
-    lcov: Make package handling more robust
-    
-    Apply some changes to --from-package and --to-package handling
-    to better handle failures:
-    
-     - Abort if tar tool is not available
-     - Abort if no data file is found in package file
-     - Ensure that temporary directories can be deleted
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit f87d980929a5a06d49d0a6856f6c3314418c27ef
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Tue May 12 17:28:44 2015 +0200
-
-    genhtml: Rework c++filt name demangling
-    
-    When running genhtml with command line option --demangle-cpp, do not
-    merge function call data based on demangled function names. Instead mark
-    duplicate function entries in the function view with a version suffix
-    (.<number>). This resolves problems with entries for functions that
-    demangle to the same name, but begin on different lines according to GCC
-    (e.g. virtual destructors).
-    
-    Reported-by: Lukasz Czajczyk <lukasz.czajczyk@gmail.com>
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 2e872175cbba2c09c9025da2660edf0b4abb55cb
-Author: Daniel Fahlgren <daniel@fahlgren.se>
-Date:   Wed Apr 22 15:17:10 2015 +0200
-
-    geninfo: make line exclusion markers configurable
-    
-    This patch exposes the variable $excl_line and $excl_br_line so they can
-    be set in the configuration file. It is not always possible to add the
-    exclusion markers to the code with reasons like third party code,
-    company policy, legacy code, no commit access etc.
-    
-    One obvious use case is to exclude assert() from the branch coverage and
-    abort() from line coverage. They are never meant to be triggered unless
-    something is wrong. Other use cases can be custom error handling macros
-    or macros that depend on endianness, like htons().
-    
-    Signed-off-by: Daniel Fahlgren <daniel@fahlgren.se>
-
-commit 10b11eaa178976d1433007adb2188d05b8605be6
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Mon Nov 10 17:17:23 2014 +0100
-
-    geninfo: Ignore empty .gcno files with --initial
-    
-    Some versions of GCC create empty .gcno files which cause geninfo
-    to abort processing with an error message:
-    
-      geninfo: ERROR: dummy.gcno: reached unexpected end of file
-    
-    Fix this problem by skipping empty .gcno files.
-    
-    Reported-by: Maarten Hoes <hoes.maarten@gmail.com>
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit f9d8079646aa906518c4ab7d326504e6837532a7
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Mon Nov 10 16:54:08 2014 +0100
-
-    lcov: Fix warning when specifying --rc
-    
-    Current Perl versions report the following warning when using the --rc
-    option of lcov:
-    
-      lcov: Use of each() on hash after insertion without resetting hash
-      iterator results in undefined behavior
-    
-    Fix this warning by not modifying the hash variable that is being
-    iterated on. Also add the missing whitespace fix-up of --rc parameters
-    to genhtml.
-    
-    Reported-by: Maarten Hoes <hoes.maarten@gmail.com>
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 2a634f6caa98f979606189ec3ee98f4cac270b97
-Author: Philip Withnall <philip.withnall@collabora.com>
-Date:   Mon Nov 10 14:58:34 2014 +0000
-
-    genhtml: Support relative source filenames in SF keys
-    
-    Some tools which generate .info files generate relative filenames for
-    the ‘SF’ keys. For example, nodeunit’s lcov output does. When genhtml is
-    run with --output-directory, it calls chdir() which breaks relative
-    lookup of the source files. Fix that by resolving all source filenames
-    to absolute paths when loading an info file, resolving any relative ones
-    using the info file’s path as a base.
-    
-    Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk>
-
-commit b4344c6a5d3c434ca0d801c197a09cfdeecb3f32
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Fri Sep 26 13:11:18 2014 +0200
-
-    man: Add description for --precision and genhtml_precision
-    
-    Add man page sections for genhtml's command-line option --precision
-    and lcovrc configuration setting genhtml_precision. Also add an
-    example configuration setting in lcovrc.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit aa1217412f1e8b540010fea5ca9844b9e4699e54
-Author: Euccas Chen <euchen@qti.qualcomm.com>
-Date:   Fri Sep 26 12:53:29 2014 +0200
-
-    genhtml: Implement option to specify coverage rate precision
-    
-    Add command line support and config file support for specifying the
-    coverage rate precision, valid precision range: [1,4].
-    
-    Signed-off-by: Euccas Chen <euchen@qti.qualcomm.com>
-
-commit 4d4eba1a8b5e7d2a6c5e93c0a50264da1a5c5540
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Jun 25 09:41:59 2014 +0200
-
-    get_version.sh: Remove - characters from release string
-    
-    Replace - with . in release strings to fix the following build
-    error in the dist Makefile target:
-    
-      error: line 4: Illegal char '-' in: Release: 4-g1d44b2a
-      make: *** [rpms] Error 1
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit ffbd3e08cc0871842b2205b0b73c2ae8f3ad02e8
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Jun 25 09:25:50 2014 +0200
-
-    genhtml: Improve demangle error message
-    
-    Improve error message that is shown when there are mangled function name
-    entries on different lines that demangle to the same clear text function
-    name.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 1d44b2a090aa933b15e4cafc1a440ccb390df92e
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Tue Jun 24 17:45:34 2014 +0200
-
-    geninfo: Fix error when using --demangle-cpp
-    
-    Using genhtml's --demangle-cpp option on data produced with recent GCC
-    versions (at least 4.8 and 4.9) can result in an error message similar
-    to the following:
-    
-      genhtml: ERROR: Demangled function name _ZN3subD2Ev  maps to different
-               lines (5 vs 4)
-    
-    The reason for this error is an unexpected sequence of lines records
-    in a .gcno file. These records mention line numbers as belonging to a
-    function which occur before the initial line number of that function
-    as reported by the corresponding function record.
-    
-    Fix this problem by retaining the order of lines belonging to a function
-    as found in the .gcno file. This way geninfo will consistently use the
-    initial line number as reported by the function record when merging
-    function data during the demangling process.
-    
-    Reported-by: Alexandre Duret-Lutz <adl@lrde.epita.fr>
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 566e5ec7e69a03612e1ed4961779d939af180d66
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Jun 18 16:05:29 2014 +0200
-
-    lcov: Remove unused files
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit c76172bfe630520e217ecc0bca8f18481c4c33b0
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Jun 18 16:01:05 2014 +0200
-
-    README: Fix typo
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit a6b10a41056cd10c7b735e259fee81f1865c2109
-Author: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Date:   Wed Jun 18 15:50:04 2014 +0200
-
-    lcov: Remove CVS artifacts
-    
-    Replace CVS specifics in the build environment and tools source with
-    Git mechanisms:
-     * CONTRIBUTING and README file now refer to github for the primary
-       source location
-     * When run from a Git repository, the tools dynamically determine the
-       Git version using 'git describe'
-     * When installed into the file system, the version information is
-       fixed with the current Git version
-     * When preparing distribution files, the version at the time of
-       preparing the files is written to file ".version"
-    
-    Also add a .gitignore file to filter out the most frequent temporary
-    file types.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit fa2a991cf6fad37fec7650b95be705df143e058a (tag: v1.11)
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri May 23 08:56:17 2014 +0000
-
-    lcov: finalizing release 1.11
-
-commit e2729beea0d7769ef0e992c27a294b0742a6ac77
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri May 23 08:47:10 2014 +0000
-
-    CHANGES: update
-
-commit 866d187602bfc2e3a8199f4e9e9430ef38f106a8
-Author: Jeffrey Hutzelman <jhutz@cmu.edu>
-Date:   Tue May 20 14:12:55 2014 +0000
-
-    lcov: Sort branches in unnamed blocks first
-    
-    When processing branch coverage data, consider branches in "unnamed"
-    blocks to come before other blocks on the same line, so that they
-    appear in the correct order in HTML output.
-    
-    This is accomplished by using block number -1 for unnamed blocks,
-    instead of 9999 as was previously done.  In branch data vectors, this
-    is reprsented by the value $BR_VEC_MAX, which is defined to be the
-    largest value representable in the field width used.  This same value
-    is also used in .info files, for backward-compatibility with regular
-    expressions used to parse these files.  As a result, .info files
-    generated by versions of lcov with this change can be read by older
-    versions, though branch results will still appear out of order.
-    
-    Signed-off-by: Jeffrey Hutzelman <jhutz@cmu.edu>
-
-commit 17c0edec32193b9e8058908447d3eb403d76c8de
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu May 15 10:23:45 2014 +0000
-
-    lcov: Update man page
-    
-    Add missing description for command line parameter value.
-    
-    Reported-by: sylvestre@mozilla.com
-
-commit c0958139e015805cce15b60b740c735690ad4002
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Apr 14 12:14:55 2014 +0000
-
-    genhtml: Implement option to allow HTML in test description
-    
-    Add lcovrc directive genhtml_desc_html to allow using HTML markup in
-    test case description text.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 4f2c3aefcfcf816806da83a8609bd743eb227d37
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Apr 14 11:24:05 2014 +0000
-
-    genhtml: Check for proper description file format
-    
-    Ensure that description files contain test name lines before test
-    description lines. This fixes a "use of uninitialized value" warning
-    in genhtml.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 3a68239905c28a7c3bfac52172a254872d6a7aa7
-Author: Jonah Petri <jonah@petri.us>
-Date:   Mon Apr 14 11:06:21 2014 +0000
-
-    lcov: make geninfo compatible with LLVM's gcov
-    
-    These changes are needed to make geninfo compatible with LLVM's gcov:
-    * Use --version rather than -v to probe version info
-    * Convert LLVM gcov version numbers to the GCC gcov version they emulate
-    * Translate short options into their equivalent long option capabilities
-    
-    Signed-off-by: Jonah Petri <jonah@petri.us>
-
-commit a74bdeeae0383b197b1dafa44d01a54129fb3d7c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 8 13:26:04 2014 +0000
-
-    genhtml: Reduce hash copying while adding up files
-    
-    Reduce copying effort and memory usage. Based on similar patch for
-    lcov by olly@survex.com.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit c6b4d91fdf667cfca17213742e2e04f6281ebed4
-Author: Olly Betts <olly@survex.com>
-Date:   Wed Jan 8 13:14:05 2014 +0000
-
-    lcov: Avoiding copying hashes passed to add_counts function
-    
-    This patch reduces memory usage - without it lcov was failing every time
-    for me with out of memory errors in a VM with 1GB of RAM and 1GB of
-    swap, but with it lcov completes every time.
-    
-    It's presumably also faster to avoid these copies.
-    
-    Signed-off-by: Olly Betts <olly@survex.com>
-
-commit cf6f2e685510da62bd2eb1f386f71d57c41f4594
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Dec 13 16:09:05 2013 +0000
-
-    geninfo: Tolerate garbage at end of gcno file
-    
-    Some versions of gcc produce garbage at the end of a gcno file
-    when recompiling a source code file after removing some lines.
-    
-    This patch makes geninfo's gcno file parser more robust by assuming
-    end-of-file when it finds a record that extends beyond the end-of-file.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 14286b29d076208452da6021c792ebf43552ac2c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Dec 13 15:23:27 2013 +0000
-
-    geninfo: make gcov tool version detection more robust
-    
-    Don't consider gcov tool version information in parenthesis when
-    determining the gcov tool version. This fixes problems where the
-    version string contains a different version number in parenthesis
-    before the actual gcov version.
-    
-    Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-
-commit 0bde87338cd155af46804d77701c93ef263c3d53
-Author: Sebastian Stigler <s_stigler@gmx.de>
-Date:   Fri Dec 13 15:09:58 2013 +0000
-
-    geninfo: add exclude marker for branch coverage
-    
-    Sometimes it can be helpful to generally use branch coverage but to
-    disable it for some lines of code without excluding the line or function
-    coverage too.
-    
-    For example if you make heavily use of assertions in your code (which is
-    generally a good idea) you will see that for each 'assert(...)' exist
-    one branch which is taken and one that is not. Similarly you can see the
-    same phenomenon for 'delete' in C++ code.
-    
-    If you use the 'LCOV_EXCL_LINE' marker in such a situation both of these
-    branches will be omitted from the output. But in doing so, you loose the
-    ability to determine if this peace of code is genuine 'dead code' or not
-    because the line coverage is omitted too.
-    
-    The newly introduces 'LCOV_EXCL_BR_LINE', 'LCOV_EXCL_BR_START' and
-    'LCOV_EXCL_BR_STOP' marker address this problem. The usage is similar to
-    the 'LCOV_EXCL_LINE' etc. markers.
-    
-    Signed-off-by: Sebastian Stigler <s_stigler@gmx.de>
-
-commit 119be727596f567e83b03de384b4150b926911a3
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Dec 12 14:58:44 2013 +0000
-
-    geninfo: Fix handling of non-english locales
-    
-    geninfo expects gcov output in the default C locale. This isn't always
-    given, for example when running in an environment where variable
-    LANGUAGE is set to a non-english locale. In such cases gcov output
-    cannot be correctly parsed, resulting for example in the absence of
-    branch coverage data.
-    
-    gcov uses gettext() for writing internationalized messages. The info
-    page for gettext mentions the order in which locale-defining
-    environment variables are evaluated:
-    
-    LANGUAGE
-    LC_ALL
-    LC_MESSAGES
-    LANG
-    
-    In addition, gettext implements special handling where LC_ALL=C takes
-    precedence over LANGUAGE.
-    
-    geninfo currently only specifies LANG=C. Fix the issue by specifying
-    LC_ALL=C instead.
-    
-    Based on fix suggestion by Sebastian Stigler.
-    
-    Reported-by: Sebastian Stigler <s_stigler@gmx.de>
-
-commit 0f7bb3ebc8487b83ce9b7047c81a3655135876ea
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Dec 9 15:49:35 2013 +0000
-
-    lcov: Added contribution guidelines
-
-commit f83688fe27f133ef02e9ab47a435d6a5d2074932
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 2 07:29:20 2013 +0000
-
-    geninfo: fix --no-external not working with --initial
-    
-    When running lcov --capture --initial together with --no-external.
-    the --no-external has no effect. Fix this by applying the external
-    filtering also for graph files.
-    
-    Reported-by: malcolm.parsons@gmail.com
-
-commit 6a8a678046bd75aa81d30484b1817425022d71e5
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jul 1 11:49:46 2013 +0000
-
-    lcov: fix --config-file not being passed to geninfo
-    
-    Calling lcov to capture coverage data while specifying --config-file
-    will result in the configuration directives of that file not being
-    used during data collection.
-    
-    Fix this by ensuring that --config-file is passed on to geninfo.
-    
-    Reported-by: liuyhlinux@gmail.com
-
-commit c3be5b6859ef280b469b6b75cf4709fc35f91ced
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu May 2 11:02:24 2013 +0000
-
-    lcov: fix whitespace handling in --rc command line option
-    
-    Specifying blanks around --rc options results in the options not
-    being correctly recognized, for example:
-    
-    This doesn't work:
-    geninfo . -o - --rc="geninfo_adjust_src_path = /tmp => /usr"
-    
-    This works:
-    geninfo . -o - --rc="geninfo_adjust_src_path=/tmp => /usr"
-    
-    Fix this by automatically removing whitespaces at the start and end
-    of --rc options and values.
-
-commit 4699f8d391325335777ed234e388be2e2f87478c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Apr 12 07:51:34 2013 +0000
-
-    README: improve usage hint
-
-commit 36e0539737198ad1bee51103f47842f13c575239
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Mar 13 10:28:07 2013 +0000
-
-    genhtml: add time to date string
-    
-    Add the current time to the date information in the HTML output
-    generated by genhtml. This way users can differentiate results when
-    creating HTML output multiple times a day.
-    
-    Based on patch by sylvestre@debian.org.
-
-commit 38fbe93c8cd8402be8e4821825fdeeaa23e8367c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Feb 22 14:09:08 2013 +0000
-
-    geninfo: don't warn about missing .gcov files
-    
-    Newer versions of gcc remove .gcov files for source files that do
-    not contribute instrumented lines. Remove the
-    
-      WARNING: no data found for file.c
-    
-    warning that geninfo issues in this case.
-
-commit 29346542c30af221a2ffdfe097fbd858044b712a
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Feb 1 11:44:03 2013 +0000
-
-    genhtml: fix handling of user-specified prefixes with trailing /
-    
-    A trailing / in a user-specified prefix is not correctly recognized.
-    Fix this by removing any number of trailing / in a user-specified
-    prefix. Reported by ahmed_osman@mentor.com.
-
-commit 5241e2afadca5f172bd0b8cafe61e20d2153f0bf
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 30 11:46:42 2013 +0000
-
-    lcov: fix bug when converting function data in --diff operation
-    
-    When a patch is applied to a tracefile using command line option --diff
-    and the patch changes the list of functions, the operation aborts with
-    the following error:
-    
-      lcov: Use of freed value in iteration at lcov line 3718.
-    
-    Fix by applying missing calls to keys() when iterating function data
-    hashes. Reported by Nasir.Amanullah@us.fujitsu.com.
-
-commit 9ce8d8cb4f978eb80fb88ecafd52e869fab75d8f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 25 16:30:25 2013 +0000
-
-    lcov/genhtml: fix outdated comment regarding data structure
-
-commit c85e73a36e3f8c4e7fab888ac1536bee94a6fe56
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 25 16:29:30 2013 +0000
-
-    genhtml: merge function data during demangling
-    
-    Merge function execution counts when multiple function names demangle
-    to the same name.
-
-commit 2dfafc99c1eccbb81066436845e06a868eb3c434
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 25 11:46:28 2013 +0000
-
-    genhtml: improve function table sorting
-    
-    In the function table view, the initial view should show the functions
-    sorted by execution count because - unlike with file names - the function
-    name is not a natural order for functions (the line number would be,
-    but that is not available). Also sort functions with the same execution
-    count alphabetically for a stable order.
-    
-    Base on a suggestion by paul.bignier@hotmail.fr.
-
-commit 331a29011709a27d2ec11c6cbd6ac51dfdaf70c6
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 23 16:52:06 2013 +0000
-
-    genhtml: consolidate calls to c++filt
-    
-    When using --demanglecpp, call c++filt only once instead of per
-    function. This approach can reduce the run-time for source files
-    with a lot of overloaded functions significantly. Based on idea
-    by olly@survex.com.
-
-commit 49b877160b1d28cd6c3d8332d5d47c9c74420070
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Jan 10 09:02:32 2013 +0000
-
-    geninfo: make empty data directories non-fatal
-    
-    Emit a warning when no data file is found in a data directory
-    to allow processing of additional directories.
-    
-    Based on suggestion by rich_drake@yahoo.com.
-
-commit 3836c162c2864ed180df7d80fa03c70d17102edc
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Nov 13 09:58:53 2012 +0000
-
-    geninfo: fix parsing of gcc 4.7 gcov format
-    
-    GCC 4.7 changes the gcov format for lines which can only be reached
-    by exceptions to "=====" instead of "#####". This results in the
-    following warning:
-    
-    geninfo: Argument "=====" isn't numeric in numeric gt (>) at geninfo
-    line 1281.
-    
-    Fix this by handling "=====" correctly.
-
-commit b932f94cc83c3df169c76689533336bba4de4dba
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Oct 10 09:14:17 2012 +0000
-
-    lcov.spec: back to CVS version
-
-commit 6af00fa26e1a91a39c873ff9fa6df7fb8830ec42
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Oct 10 09:12:42 2012 +0000
-
-    lcov.spec: fix Perl dependency
-
-commit 4eac16e93db328e86e44da40e3d5e96a0301d361
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Oct 10 08:36:16 2012 +0000
-
-    lcov: update CVS version to 1.11-pre1
-
-commit b5c1bdddd1380be3ad12952ed2747df3744e227e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Oct 10 08:20:21 2012 +0000
-
-    lcov: finalizing release 1.10
-
-commit 089861768a94d0f6e827539c828f19141092f529
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Oct 10 08:07:54 2012 +0000
-
-    CHANGES: update
-
-commit 9037de17458c5d9767d201bd0599d40347a9bc41
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Oct 10 08:07:01 2012 +0000
-
-    genhtml: handle source files in root directory gracefully
-
-commit 68dd0f19da0d8d6e82375e09b97f7ffc22847db4
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Oct 9 13:58:22 2012 +0000
-
-    geninfo: add automatic detection of base directory
-    
-    Add a heuristic to automatically determine the base directory
-    when collecting coverage data. This heuristic should cover many,
-    if not most cases of build systems moving files around during
-    compilation (e.g. libtool, automake, etc.). The heuristic can be
-    enabled or disabled using the configuration file directory
-    'geninfo_auto_base'.
-
-commit 631d2b11bfde56ffca4568382abf5d90653c4141
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Oct 8 15:03:23 2012 +0000
-
-    geninfo: fix missing line data after last commit
-
-commit b1e14c4a1a0f3ccaad0c665f439624cf4588a68d
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Oct 8 13:02:45 2012 +0000
-
-    lcov: add missing help text for option --rc
-
-commit a432efff6ee8485ec0724aca4eae79a4c390a328
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 5 15:53:09 2012 +0000
-
-    lcov: updated CHANGES file and copyright years
-
-commit 897322ecdb858f18e4a12f4716bbb08c067b6c9c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 5 15:20:41 2012 +0000
-
-    geninfo: fix warning about unhandled .gcov files
-    
-    gcov will sometimes create .gcov files that contain no instrumented
-    line. When geninfo reads .gcno files it filters out such files,
-    resulting in the following warning:
-    
-    geninfo: WARNING: cannot find an entry for #path#to#file.gcov in
-             .gcno file, skipping file!
-    
-    Avoid this warning by not filtering out non-instrumented lines.
-
-commit 37d381ae99a66f59ea55d966f1da13a726d2efe8
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 5 15:09:58 2012 +0000
-
-    genhtml: fix source path prefix calculation
-    
-    Fix the following problems of the algorithm used to identify an
-    optimal source path prefix:
-    - the last two path components (filename and first parent
-      directory) are ignored when trying to identify the optimal
-      prefix
-    - if a path prefix matches a longer path prefix, the weight
-      of the filenames associated with the latter is incorrectly
-      attributed to the former
-
-commit 263de2b40e21193ef8d11e899eb55aa52b17225d
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 5 12:00:57 2012 +0000
-
-    lcov: set default for branch coverage data to disabled
-    
-    Collecting branch coverage data can significantly slow down
-    coverage data collection and processing of data files. Assuming
-    that most users are more interested in line/function coverage,
-    change defaults to not collect/process branch coverage data.
-    
-    Users can still override this default using lcov_branch_coverage=1
-    in the lcovrc file or command line option --rc lcov_branch_coverage=1
-
-commit 7e04a152683ff66e24b87f2125474c6765d4524b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 5 11:49:30 2012 +0000
-
-    geninfo: fix problems with adjust_src_path option
-    
-    Fix the following problems with adjust_src_path:
-    
-     * specifying --compat libtool=on and geninfo_adjust_src_path
-       unexpectedly sets --compat libtool=off
-     * path components that are assembled from sub-directory names are
-       not correctly adjusted
-
-commit 74e4296b6e2a0b0f164c6828c28cc82449344f08
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 5 08:23:06 2012 +0000
-
-    lcov: add setting to disable function and branch coverage
-    
-    Add two new configuration file settings:
-    
-     * lcov_function_coverage and
-     * lcov_branch_coverage
-    
-    When set to zero, lcov will skip the corresponding coverage data
-    type from being collected or processed, resulting in reduced
-    memory and CPU time consumption and smaller data files.
-
-commit 37bc1a1a5f721c6b88fff4c63121c1cbb794c14f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Oct 2 14:29:57 2012 +0000
-
-    lcovrc: clarify meaning of geninfo_external in man page
-
-commit fc4b9e21efe8f3409d9b0b90cfe7a3e8bc59a74c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Oct 2 09:12:38 2012 +0000
-
-    geninfo: fix processing of pre-3.3 gcov files
-    
-    When trying to collect coverage data for programs compiled with
-    GCC versions prior to 3.3, geninfo skips each data file with the
-    following warning:
-    
-    geninfo: WARNING: cannot find an entry for test.c.gcov in .bb file,
-    skipping file!
-    
-    Fix this by deriving the source code filename from the gcov filename
-    in case the gcov files do not follow the GCC 3.3 format.
-    
-    Reported-by: georgysebastian@gmail.com
-
-commit d1014dfcabfee2f305278a14ec8e5343e3889139
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 24 11:43:18 2012 +0000
-
-    lcov: fix problems with --rc option
-    
-    Fix error "Invalid option linkage for \"rc=s%\"" when running lcov
-    with an older version of the Getopt::Long module. Also pass --rc
-    options through lcov to geninfo.
-
-commit a9f08b79e2e7ec2b4a5c9ad27a077df8dfb46890
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Jul 24 15:41:38 2012 +0000
-
-    geninfo: implement rc option geninfo_adjust_src_path
-    
-    Provide a new lcovrc file option geninfo_adjust_src_path that users
-    can use to change incorrect source paths.
-    
-    Inspired by patch by ammon.riley@gmail.com.
-
-commit 108f805788590defda99fdf252bfb71cb749f31e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Jul 19 13:12:35 2012 +0000
-
-    lcov: implement command line option --rc
-    
-    Users can now use command line option --rc to override configuration
-    file directives.
-
-commit eeeeeca74706e88a9b8ecfef2bb3451957512e20
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 18 12:56:21 2012 +0000
-
-    lcovrc: add description for geninfo_compat setting
-
-commit f842e46149b48ff316e80f68f630bf94085e4d19
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 18 12:40:56 2012 +0000
-
-    lcov: improve --compat description
-
-commit 392a690ba31092857f7d21d0008783d87954ebce
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 18 12:13:00 2012 +0000
-
-    lcov: add missing documentation for --compat option
-    
-    Add missing sections in the geninfo and lcov man-pages for the
-    newly introduced command line option --compat. Also set the
-    default value for the hammer compatibility mode to 'auto' to
-    keep the behavior of previous releases.
-
-commit 691cab3e3aaebc295c2cfe91c43c6a7c48f1ec2b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 18 10:40:12 2012 +0000
-
-    lcov: fix extra closing parenthesis in comment
-
-commit cef6f0ff8baa9b2b3dfb437463e7a88d3380b555
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Jul 17 11:37:13 2012 +0000
-
-    lcov: make 0%/100% exclusive to no/full coverage rate
-    
-    Ensure that coverage rates 0% and 100% are only used when no or all
-    lines/functions/branches are hit respectively. This approach is
-    implemented to allow better identification of boundary cases, and
-    to be in accordance with the behavior of the gcov tool.
-    
-    Based on suggestions by: Paul.Zimmermann@loria.fr and
-    vincent@vinc17.net
-
-commit 9cec8f7e332258c9128f1c53d61acb9f0bc17085
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 11 14:09:27 2012 +0000
-
-    geninfo: more improvements to the .gcno format auto-detection
-    
-    Suggestions by garnold@google.com:
-    - rename command line setting
-    - simplify logic
-
-commit 0bbca3bd0c1ad3e3d3fd0b6eebfc3afbbc212a85
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jul 6 14:29:27 2012 +0000
-
-    geninfo: rename compatibility setting to compatibility mode
-
-commit f30fb978662996e29517c733218292a91f5fd12b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jul 6 09:03:27 2012 +0000
-
-    geninfo: improve detection of gcc 4.7 function records
-    
-    Suggestions by garnold@google.com:
-    - perform detection only once
-    - add warning in case detection is off but overlong strings are found
-    
-    Misc:
-    - add help text for --compat
-    - isolate detection heuristic into separate function
-    - rename corresponding compatibility setting to "gcc_4_7"
-    - allow "android_4_4_0" as alias for "gcc_4_7"
-
-commit 01321c3f170e5d24ffb3bb998441c99f5b775836
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 4 16:06:10 2012 +0000
-
-    geninfo: enable auto-detection of gcc-4.7 function record format
-    
-    gcc-4.7 introduced a modified function record format. This format
-    is in use by android toolchains and has also been ported to some
-    pre-4.7 versions of gcc. Introduce a heuristic-based auto-detection
-    to correctly handle .gcno files in these cases.
-
-commit d929600a0e2133168085e5ddea7ee832afd902b7
-Author: Martin Hopfeld <martin.hopfeld@sse-erfurt.de>
-Date:   Fri Jun 8 14:19:49 2012 +0000
-
-    geninfo: Make geninfo work more reliably on MSYS
-    
-    Using the lcov tools on Win7 with MSYS and MinGW 4.5.1/4.5.2
-    raised some issues for us:
-    
-    geninfo created in the for one source file in the 'SF:' line
-    paths starting with a lowercase drive letter and sometimes
-    starting with uppercase drive letters.
-    
-    This lead to inaccurate coverage results on the MSYS platform.
-    
-    This patch fixes this issue.
-
-commit 5b2751854aa19e6443fdc5fecc139595988d1e99
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon May 7 16:04:49 2012 +0000
-
-    lcov: add perl version dependency to RPM spec file
-    
-    lcov CVS (1.10 pre) seems to be broken on MSYS with perl 5.6.1.
-    The issue is the following:
-    
-      genhtml: Unknown open() mode '>>&' at /usr/bin/genhtml line 5512.
-    
-      $> perl genhtml --version
-      genhtml: LCOV version 1.10 pre (CVS 1.58)
-    
-      $> perl --version
-      This is perl, v5.6.1 built for msys
-    
-    Fortunately perl v5.8.8 is available for MSYS and genhtml works like a
-    charm with that 'new' version.
-    
-    Reported-by: Martin Hopfeld <martin.hopfeld@sse-erfurt.de>
-
-commit 83957a145d243cad0f8060e4a9ccc6cb8ed8fc09
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Apr 10 11:48:52 2012 +0000
-
-    geninfo: add support for gcc 4.7 .gcno file format
-    
-    Based on patch by berrange@redhat.com.
-
-commit 91c91dbc63d1e880d106919300c2fb37737697b0
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 20 11:53:57 2012 +0000
-
-    lcov: add new command line option --compat
-    
-    Add new option to lcov and geninfo to specify compatibility settings.
-    
-    Supported settings:
-      libtool: same as --compat-libtool
-      hammer: gcc3.3 hammer patch compatibility
-      android_4_4_0: android toolchain 4_4_0 compatibility
-
-commit 9588355790a302da680eff2f664058f78439a03e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 11 08:29:21 2011 +0000
-
-    lcov: fix problem with Objective-C functions
-    
-    Fix geninfo not recognizing function entries for Objective-C functions.
-    
-    Based on patch by abrahamh@web.de:
-    current version of lcov unfortunately not support Objective-C files.
-    In details the count of tested function is zero always and the annotated
-    lines have an offset by one if the Objective-C method have one ore more
-    arguments.
-
-commit e1acd78d1e88fe51aad96badf32555c470ee029b
-Author: Martin Hopfeld <martin.hopfeld@sse-erfurt.de>
-Date:   Mon May 23 08:03:13 2011 +0000
-
-    geninfo: Make geninfo handle MinGW output on MSYS.
-    
-    This patch converts path mixtures from MinGW when running on MSYS to
-    correct MSYS paths.
-    
-    In solve_relative_path() an additional conversion step will be inserted
-    when running on MSYS. This will extract the drive letter and convert the
-    remaining path from Windows pathnames to Unix Paths, which are used by
-    MSYS.
-    
-    Additionally, if no drive letter is found, the (relative) path is
-    converted to Unix style. There may be the case where Windows and Unix
-    path separators are intermixed within one path string.
-
-commit ed161e3db5cd5a7c6c8b2113930c729f001cdd4e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Dec 16 08:11:22 2010 +0000
-
-    genpng: handle empty source files
-    
-    Generating an overview PNG image for an empty source code file fails.
-    Handle this case by assuming a single empty line when run for an empty
-    source code file.
-    
-    Reported by: sylvestre@debian.org
-
-commit 95e2c5c337d281b4e88144d95d29bbec183c8728
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Dec 7 08:40:09 2010 +0000
-
-    genhtml: add note to further explain branch coverage output
-
-commit b1c66916151dd4b20998c79f81edf174659ebb14
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Dec 7 08:29:45 2010 +0000
-
-    genhtml: fixed incorrect description of default coverage rates
-
-commit 1994be7d8ed472772b884063af74235f2f25ab39
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Nov 19 16:33:25 2010 +0000
-
-    geninfo: add missing man page sections
-    
-    Add sections describing options --derive-func-data and --no-markers to
-    the geninfo man page.
-
-commit 01a393ef76092e43ebd2d8bf7892ebf375481a84
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Nov 19 16:15:27 2010 +0000
-
-    geninfo: remove help text for unimplemented parameter
-    
-    Parameter --function-coverage was removed but the help text still
-    mentions it. Fix this by removing the option from the help text as
-    well.
-
-commit b92f99d9db0af131080c462300dc9baf292a8ff6
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Nov 19 16:00:22 2010 +0000
-
-    genhtml: handle special characters in file and directory names
-    
-    HTML special characters (e.g. '<') found in file or directory names are
-    not correctly shown in HTML output. Fix this by correctly escaping such
-    characters.
-
-commit 17e158d4569d25218e79901e2d8cd03bfc7752fc
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Nov 19 15:45:01 2010 +0000
-
-    gendesc/genhtml/geninfo/genpng/lcov: handle '<' in filenames
-    
-    Use 3-arg open mode to prevent that a special character (e.g. '<')
-    found in a user-specified filename interfers with the required open
-    mode for that file.
-
-commit b87e40e475c560bdc88206df4de6dc8cf094d91f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Nov 19 15:11:53 2010 +0000
-
-    geninfo: ignore <built-in>.gcov files
-    
-    The gcov tool will sometimes create a file <built-in>.gcov for code
-    which was added by gcc itself during compilation. Since there isn't
-    any source available for such code, geninfo will fail. Fix this
-    by skipping these files while capturing code coverage data.
-
-commit 398d8f385423927b5675c1429f58c67b6a89a1a8
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Oct 28 14:17:57 2010 +0000
-
-    geninfo: add function comment
-    
-    Add comment explaining data structures used by function derive_data.
-
-commit f5c2072e0e7195d35455db50705884e7f6c5fbe5
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Oct 28 14:16:34 2010 +0000
-
-    geninfo: apply exclusion marker to derived function data
-    
-    When option --derive-func-data is used together with exclusion markers,
-    function data for excluded lines is still included. Fix this by
-    only deriving function data for lines which are instrumented and not
-    excluded.
-    
-    Reported by: bettse@gmail.com
-
-commit 82280b8a5a78e8a147c333c8850a556729d9d96d
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Aug 31 08:19:03 2010 +0000
-
-    geninfo: improve --debug output
-
-commit 6375a03010cb1bb22490b9d19a176188940e2f8b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Aug 31 08:17:23 2010 +0000
-
-    gcov: add configuration file option to not use gcov's -a option
-    
-    lcov calls gcov while specifying its --all-blocks option to get more
-    detailed branch coverage data per line. It turns out that this option
-    is broken on many versions of gcov, resulting in an endless loop while
-    processing some gcov data files. There's also a slight performance
-    penalty when specifying -a.
-    
-    lcov users can opt to not use the -a option by setting configuration
-    option geninfo_gcov_all_blocks to 0 in the lcovrc file.
-
-commit 7706fb73ebef8060fbbd92c0e08b5d68a2cd284e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Aug 24 16:15:53 2010 +0000
-
-    lcov: add option to specify a configuration file
-    
-    Provide an option for users to specify a configuration file to lcov.
-    This option may be useful when there is a need to run several instances
-    of a tool with different configuration file options in parallel.
-
-commit a404dafc2da12608a936afeb095d68410fa49b0a
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Aug 23 16:14:37 2010 +0000
-
-    lcov: add option to display summary coverage information
-    
-    Provide an option for users to determine the summary coverage
-    information of one or more tracefiles. Example output:
-    
-    Summary coverage rate:
-      lines......: 26.0% (78132 of 300355 lines)
-      functions..: 34.9% (8413 of 24081 functions)
-      branches...: 16.9% (32610 of 193495 branches)
-
-commit 526b5b6a43f2b29f11eb02c1dd8f645293d8c295
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Aug 23 14:47:43 2010 +0000
-
-    lcov: add option to exclude external files
-    
-    Implement an option for users to specify that external source files
-    should be excluded when capturing coverage data. External source files
-    are files which are not located in the directories specified by the
-    --directory and --base-directory options of lcov/geninfo.
-
-commit c2255a0344648dc6eaef0189c53f345fdc70ed4e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 20 14:58:48 2010 +0000
-
-    lcov: pass --no-recursion to geninfo
-    
-    When specifying --no-recursion, make sure that the option is also passed
-    to the helper tool geninfo.
-
-commit 83543f3d21b5a5496b57c8d73e8e9c1819f82f34
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 20 14:31:59 2010 +0000
-
-    genhtml: fix HTML page title for directory pages
-
-commit b77df8ef1a69de3809e0b0bfa5cbbe5a84f313ae
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 20 14:27:19 2010 +0000
-
-    genhtml: make HTML charset specification customizable
-    
-    Provide a configuration file setting to adjust the charset specification
-    used by all generated HTML pages. Also change the default charset to
-    UTF-8.
-
-commit 1ff260462a67c440dc709d34c1fadf7d64760120
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 20 13:14:50 2010 +0000
-
-    lcov: follow Perl naming guidelines
-
-commit f637eb8c6ecb793b64eeb6bea57c6be8501d1484
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 20 13:08:25 2010 +0000
-
-    genhtml: add --ignore-errors option
-    
-    Provide a means for users to specify that genhtml should not abort if
-    it cannot read a source code file. Also make handling of --ignore-errors
-    parameter consistent accross lcov, geninfo and genhtml.
-
-commit 617bced393d5bb97e3409ec140768d9c8a2e2bfb
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 6 11:25:12 2010 +0000
-
-    lcov: update CVS version to 1.10
-
-commit 4dcb4f0ed014ca0f49859ef84fc9ced650f6deb8
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 6 11:14:38 2010 +0000
-
-    lcov: finalizing release 1.9
-
-commit 594779e047eed2f534905ac40912969955d3797f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 5 16:17:44 2010 +0000
-
-    lcov: update CHANGES file in preparation of new release
-
-commit fbbd9034e7a4ea4bc59342b22bfbe9612dd4bdb8
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 5 15:11:56 2010 +0000
-
-    lcov: introduce configuration file parameters for list output
-    
-    Make some aspects of list output customizable via configuration
-    file parameters. Also introduce special handling, if the root
-    directory is chosen as prefix.
-
-commit c6e783c1a1d3fb6db7419af95f9e2dcb89836fe9
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 5 14:07:35 2010 +0000
-
-    lcov: switch coverage rate and number columns in list view
-    
-    To be more consistent with the order of output in the "Overall
-    coverage rate" case, rates are now shown first in the list output.
-
-commit 3c87b66c68c2e06811c9be479c6813cb409e5461
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 5 11:22:12 2010 +0000
-
-    lcov: fix display of total line coverage rate in list view
-
-commit 3cb6bc4ae0ef34aa63931d63f659f1ef43804c77
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Aug 4 16:15:19 2010 +0000
-
-    lcov: more lcov --list improvement
-    
-    Further improve list output to increase readability.
-
-commit dd98ff68ad143b985a728fc585c86d69e6027bd8
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 28 14:49:47 2010 +0000
-
-    lcov: minor list improvement
-
-commit d4778c75ce8cf3c9d44607b6fd0e385db71126dd
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 28 14:48:25 2010 +0000
-
-    geninfo: remove unneeded functions
-
-commit 65a15afef3430c49c9c7c0d151cc2afec5fc83cc
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 28 14:19:09 2010 +0000
-
-    geninfo: print note on branch coverage data only once
-
-commit bd8ab633298ec27acf5f7db4b2cc4766baf1f153
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 28 14:17:59 2010 +0000
-
-    geninfo: remove incorrect overall coverage rate calculation
-    
-    geninfo output showing the overall coverage rate of its current
-    operation is incorrect since it may count lines, functions and
-    branches for included files multiple times. Remove the output
-    and associated code until a fixed version is available.
-
-commit 8c54de96a1326b7ee0632773816c52eda43393e8
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 28 13:56:26 2010 +0000
-
-    lcov: more list output fixes
-
-commit 7e5fa9900d991320677c381db747c764495b2cc2
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 28 13:52:01 2010 +0000
-
-    lcov: fix list output
-    
-    Fix list output for directories with short filenames.
-
-commit badd4790c70bd8ef8b991a9d56d0e062b28006a8
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jul 26 13:33:18 2010 +0000
-
-    lcov: fix problem when using --initial and --kernel-directory
-    
-    Fix a problem in lcov that resulted in --kernel-directory options
-    being ignored when specifying --initial at the same time.
-    
-    Reported by hjia@redhat.com.
-
-commit a06c2038babb2f6d3e0a634cd298b0434041f834
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jul 19 16:06:15 2010 +0000
-
-    genhtml: change wording for branches which were not executed
-    
-    Since gcov sometimes reports both branches which were never executed
-    as well as branches which were executed in a single block, the wording
-    of the HTML alt text needs to be adjusted accordingly.
-
-commit e6b2491823ffd84c85406145031646af675170ee
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jul 19 15:50:02 2010 +0000
-
-    geninfo: handle branches in unnamed blocks
-    
-    gcov will sometimes report branches outside of a block. In that case,
-    account these branches to a special block so that they are not
-    accidentally merged with subsequently reported blocks.
-
-commit d6c82edf2117ce8b6232c998baf06c7a87269081
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jul 19 15:23:10 2010 +0000
-
-    genhtml: fix branch formatting code
-    
-    Fix the vertical alignment of the HTML representation of branches in
-    the source code view.
-
-commit 44ac74a47e25064ad1b421f65a28d057fdb9925d
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jul 19 14:27:08 2010 +0000
-
-    lcov: improve list output
-    
-    Improve list output by separating directory and file names. Also provide
-    an option to show full path names.
-
-commit 0ab6f7507f3c4f074bec41e571ff1afbeb943185
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jul 19 12:12:43 2010 +0000
-
-    genhtml: fix large numbers being shown as negative in html output
-    
-    genhtml uses a "%d" format string for printing execution counts. For
-    counts exceeding integer range, the output becomes negative. Fix this
-    by using the "%.0f" format string instead.
-    
-    Reported by kkyriako@yahoo.com.
-
-commit bbf0ef40a51dd716c544f91576cffde7986bb6ec
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jun 7 12:22:18 2010 +0000
-
-    geninfo: ensure that exclusion markers apply to --initial
-    
-    Fix a problem where exclusion markers are ignored when gathering
-    initial coverage data.
-    
-    Problem was reported by ahmed_osman@mentor.com.
-
-commit b371fc59fa52f7176f62f382457fba498f39f4b2
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Jun 1 13:48:29 2010 +0000
-
-    lcov: fix problem with relative path names
-    
-    Fix a problem where coverage data is missing because gcov produces
-    output files starting with a dot.
-    
-    Problem reported by weston_schmidt@open-roadster.com.
-
-commit 93c70ddd0edbc2b0addf9d135dfd76871cc7a160
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Sun Feb 28 20:57:37 2010 +0000
-
-    lcov: fix problem with relative paths in build paths
-    
-    When binaries are built using relative paths, lcov cannot find any
-    coverage data. Instead, warnings similar to the following are printed:
-    
-    geninfo: WARNING: cannot find an entry for ^#src#test.c.gcov in .gcno
-    file, skipping file!
-    
-    The reason for this is that File::Spec::rel2abs does not remove ../ from
-    paths which results in lcov not being able to match the relative and
-    absolute versions of the corresponding filenames. Fix this by using the
-    internal function solve_relative_path instead.
-
-commit fad24a75cc69364d002d40e4fb75736b0efbdb37
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Sun Feb 21 14:57:52 2010 +0000
-
-    geninfo: write all debugging output to STDERR
-
-commit c0943385fa0acb927f63f9f78c9aeaebe3a8ece1
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Sun Feb 21 14:56:46 2010 +0000
-
-    geninfo: fix problem with some .gcno files
-    
-    Some .gcno files contain more data in a line record than
-    expected. Skip unhandled bytes of a .gcno file record.
-    This prevents the following unexpected error message:
-    
-    geninfo: ERROR: file.gcno: reached unexpected end of file
-
-commit 4b9ee7598e991b503425148eb43a35de2702aded
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Sun Feb 7 13:07:09 2010 +0000
-
-    lcov: add COPYING file
-
-commit de0e43a098ade45d6624ea43a53e6fad9a176469
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 29 11:07:25 2010 +0000
-
-    lcov: update CVS version to 1.9
-
-commit 4a33269fa3a73ea2577f7616d90bd3f1d14ae460
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 29 10:09:53 2010 +0000
-
-    lcov: finalizing release 1.8
-
-commit 310ffb28d8847f96e02b5a5db3d16bdcb406a876
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 29 10:01:35 2010 +0000
-
-    lcov: updated CHANGES file
-
-commit 9e12808e6108e05dca42b5e682bd8be121f3608d
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 29 09:21:22 2010 +0000
-
-    genhtml: use sans-serif font for function table
-
-commit 71baabb6a1c15228213f8b25359346ee202300ce
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 29 09:12:55 2010 +0000
-
-    lcov: improve list output
-
-commit cc61a28dbc3c46ac84340141fafbfa559e1bf318
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 29 08:56:19 2010 +0000
-
-    lcov: fix overall rate display for tracefiles with more than one testcase
-
-commit b89028529db5110b3b76d117df788768a593d7dd
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 29 08:44:47 2010 +0000
-
-    lcov/genhtml: fix warning while merging branch data
-
-commit b7c69f31d9b1bfbd4bfc0fcb880cb8e514bcdb3f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Jan 28 15:59:23 2010 +0000
-
-    lcov: fix branch coverage related issues
-    
-    - warnings when combining certain combinations of branch data
-    - branches are not merged correctly when multiple input files are specified
-      to genhtml or when lcov -a is used
-
-commit 817875459df122fa3536a5e57c05ddfae19a089e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 27 16:37:50 2010 +0000
-
-    gendesc: fix problem with single word descriptions
-
-commit 33f60f48747b5ba12a6fdfb505bb662c922496bd
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 27 12:10:04 2010 +0000
-
-    lcov: remove temporary files when creating a package
-
-commit 6775457cbd3fa86acba4655d77b4ba2054b13253
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 27 12:00:05 2010 +0000
-
-    lcov: correctly retain information about converted test data
-
-commit f4d13eccc54f31a53ad109c3c4b86e4b52d6dfcb
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 27 10:17:43 2010 +0000
-
-    lcov. fixed overview output for function data
-
-commit aa00c65b7514c93320c1c787b848c8277593dcb0
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Jan 26 09:36:19 2010 +0000
-
-    genhtml: don't use too much gcc-specific terms (basic block -> block)
-
-commit 3562f60b9500d8ad167c4629e9d95485308aa665
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:17:37 2010 +0000
-
-    lcov: consolidate coverage rate classification limits
-    
-    Classifying coverage rates per coverage type (line, function or branch
-    coverage) is not useful in most cases. Also the respective
-    color legend takes up too much space in the HTML output. Remove
-    function and branch coverage rates from the documentation and from
-    the color legend. Instead the original limits will be applied to those
-    coverage types as well. The per type rates can still be used if required
-    but it is recommended to only use one rate set.
-
-commit d77dc6a0adf259e322ac9f35c93241d446269a5b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:16:47 2010 +0000
-
-    lcov: minor code cleanup
-    
-    - remove unused function definitions and declarations
-    - remove unused CSS declarations
-    - add missing function declarations
-    - fix function prototypes
-
-commit b3243d1fdc17571ca9b1ed6a1ea975a9b3f1b86b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:16:15 2010 +0000
-
-    geninfo: consolidate similar functions
-
-commit 739e2bca054c69975594c2570049e8aa9ae1b5ce
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:15:35 2010 +0000
-
-    lcov: add coverage result output to more operations
-
-commit 0a31d3c0696015c5e4878e821529eba45451c3dd
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:14:57 2010 +0000
-
-    lcov: minor cosmetic HTML changes
-    
-    - top level view is now named "top-level"
-    - use sans-serif font for coverage values in file list
-    - use smaller font for show/hide details link
-    - use smaller font for function/source view link
-    - use smaller font for show descriptions link
-
-commit b631fa0cb9aabdf18f9365423f0b0bf85d6b8e16
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:14:27 2010 +0000
-
-    lcov: improve color legend
-    
-    Move color legend closer to the table containing coverage rates.
-
-commit 2aeeeafb31c36ccd1a51051f040e29a9fcf59df2
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:13:58 2010 +0000
-
-    lcov: implement branch coverage
-
-commit 49dfe22f41b6c3edcb774dfb89b1a807ce7aee6c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:13:34 2010 +0000
-
-    genhtml: implement branch coverage
-
-commit 6aa2422401bb854c9710f5ed2936f06e487848c5
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:13:07 2010 +0000
-
-    geninfo: implement branch coverage
-
-commit ca2c9781b0a512bd6789eac2b6840405e2d87330
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 22 16:12:27 2010 +0000
-
-    geninfo: consolidate handling of extra gcov parameters
-
-commit 9d9c964eb6ece00b15ef068f176c68cb0eedfda0
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Jan 21 11:26:34 2010 +0000
-
-    lcov: minor fix for lcov --diff
-
-commit 4306f81d1e8446a89fe83d20cd71abe075a3cd61
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Jan 21 10:23:35 2010 +0000
-
-    lcov: improve lcov --list output
-
-commit 3242ce1bae94cfd859c3bc964fab11f85bd7d1ed
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 20 17:13:28 2010 +0000
-
-    lcov: unify data order in tracefiles
-
-commit 8f53b2e8dbbe5580050fbe0c604bd9a9322735a7
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 20 16:05:56 2010 +0000
-
-    lcov: fix bug when applying baseline files without function coverage data
-    
-    Fix the following error that occurs when genthml's --baseline-file option
-    is used on files which do not contain any function data:
-    
-    genhtml: Can't use an undefined value as a HASH reference at ./lcov/bin/genhtml line 4441.
-
-commit 96fcd676d5ac9c1eb9f83f3dc4c3089ba478baad
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 20 15:28:21 2010 +0000
-
-    lcov: resolve short-name option ambiguities
-
-commit f1d34d49b394a13c33c7a5b51f04e5dfbded5d26
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 20 14:47:50 2010 +0000
-
-    lcov: fix error messages
-
-commit 89ff61aa7cd2ca23b8cacd649288ecf7f67746de
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 20 08:35:20 2010 +0000
-
-    lcov: fix bug when using genhtml's --baseline-file option
-    
-    Fix the following error message when trying to use genhtml's
-    --baseline-file option:
-    
-    genhtml: Undefined subroutine &main::add_fnccounts called at
-    /home/oberpar/bin/genhtml line 4560.
-    
-    Reported by Brian DeGeeter <sixarm@gmail.com>
-
-commit c3df3a8504b06ca32b9863fdb2abb8cf0ce62251
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jan 18 09:17:17 2010 +0000
-
-    lcov: ensure LANG=C before calling gcov
-    
-    Fix problem calling lcov when LANG is not set to an english locale.
-    Reported by benoit_belbezet@yahoo.fr.
-
-commit d945f23345e02ca535d740782e7ae10cb3396b8c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Nov 18 09:39:21 2009 +0000
-
-    lcov: more version fixup
-
-commit 413249e6336cff432083954e6ed47236dd35f647
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Nov 18 09:38:03 2009 +0000
-
-    lcov: fix version fixup
-
-commit d0b7148e2d76164e5ea091fe56035c24f7dce22a
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Nov 18 09:34:45 2009 +0000
-
-    lcov: add more CVS versioning
-
-commit 4e0219f918a15cbc9ff40d0e0e4dab91ac073f72
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Nov 18 09:14:56 2009 +0000
-
-    lcov: add CVS revision number to version output
-
-commit 34154c2d48497d9aad41ec1452ba94dd4cbce881
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 30 14:18:45 2009 +0000
-
-    lcov: further clarification in the README
-
-commit 7a4ab1340dd7f88ba0fb56a7b0eb368bf2d0112e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 30 13:58:56 2009 +0000
-
-    lcov: update README to mention required -lgcov switch during linking
-
-commit 3fa5b311b123af84debbd774baa4a1cd30e7085b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Oct 27 16:54:41 2009 +0000
-
-    lcov: remove further unneeded warning
-    
-    ... + use correct source for list of filenames
-
-commit cd4051719e72129f4abf1ad177269bf14031f83a
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Oct 27 16:19:05 2009 +0000
-
-    lcov: fix problem with matching filename
-    
-    - used correct source for filenames
-    - converted match_filenames to portable version
-
-commit 0d0ff8a9945260eebed6d316aa08c0021faf3549
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Oct 27 15:29:41 2009 +0000
-
-    lcov: remove unnecessary warning
-
-commit 6c711d664c38d18f788ee8a5239586cd4a5b77d9
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Oct 26 14:21:40 2009 +0000
-
-    lcov: improve derive-func-data option
-    
-    - rewrite graph file handling
-    - make derive data look at all lines belonging to a function to find
-      out whether it has been hit or not
-    - introduce --debug option to better debug problems with graph files
-
-commit 214cda20c4b591a823045f35b73f2a16221c9aa1
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Oct 1 15:26:58 2009 +0000
-
-    lcov: introduce new options --derive-func-data
-    
-    When using a gcov version that does not provide function data,
-    this option will attempt to guess the function coverage data
-    for a function by looking at the number of times that the first
-    line of that function was called.
-
-commit 9a75125895fd07a775a2a25f2cbe66b9fbf332d6
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Oct 1 11:49:53 2009 +0000
-
-    lcov: ignore incomplete function names in .bb files
-    
-    - don't abort processing when an incomplete function name is
-      encountered in a .bb file (gcc 2.95.3 adds those)
-    - fix filename prefix detection
-
-commit d5ab6076a0bfc5ad80652ba592583f7fc7946dc6
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Sep 28 12:27:09 2009 +0000
-
-    lcov: improve detection of gcov-kernel support
-
-commit 3cca782fcac9c4ea54adcebe75e1f047a8dca636
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Sep 22 13:44:04 2009 +0000
-
-    lcov: fix problem with CONFIG_MODVERSIONS
-    
-    Make geninfo work with Linux 2.6.31 and CONFIG_MODVERSIONS.
-
-commit 8af873f44c104cd214b796e13b916718fc8f6f99
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Sep 16 15:24:51 2009 +0000
-
-    lcov: remove default for gcov_dir so that auto-sensing works
-    
-    Fix problem with lcov not finding kernel coverage data at
-    /sys/kernel/debug/gcov because the default system-wide
-    lcovrc file contained a specification for the gcov directory
-    which prevented auto-detection from working.
-
-commit 50f90681af4d105a52b5b0dbf4f0bfd04369ffd2
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 27 10:14:23 2009 +0000
-
-    lcov: apply excluded lines also to function coverage data
-
-commit 4aeb840d25c85a419171970e1a445aeb81079e53
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 27 09:23:13 2009 +0000
-
-    lcov: fix help text typo
-
-commit c17a783f87aa8e42949131d2fbc1c540bb3751a3
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 27 09:22:43 2009 +0000
-
-    lcov: add exclusion markers
-    
-    Users can exclude lines of code from coverage reports by adding keywords
-    to the source code.
-
-commit 445715c88337c13ce496bd05423ee5e58d84705c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 14 08:19:26 2009 +0000
-
-    lcov: ignore gcov errors for unnamed source files
-    
-    When specifying "--ignore-errors gcov", lcov/geninfo should not abort when
-    they cannot read a .gcov file. Fix this by introducing warnings in the
-    respective places.
-
-commit 0e23f03a9ce130e8ebec679fb5a9a6f854efbee5
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 6 12:34:04 2009 +0000
-
-    lcov: improvements
-    
-    - added --from-package and --to-package options
-    - improved gcov-kernel handling
-
-commit 17a05bdf646870cd61794274c7165211c93c82f9
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Jul 23 12:45:15 2009 +0000
-
-    lcov: fix kernel capture for new gcov-kernel version
-    
-    - fix problems when compiling without O=
-
-commit 64e302b9134b6098852cad2e6180e0722f2dea41
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Jul 21 15:42:44 2009 +0000
-
-    lcov: improve lcov -l output
-
-commit cea6941ef36d0860330b6e94f8c6096dca78ca58
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Jul 21 09:10:49 2009 +0000
-
-    lcov: add support for the linux-2.6.31 upstream gcov kernel support
-
-commit 04470d2b25808f195d338112155b9f7db405d902
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Apr 22 09:13:12 2009 +0000
-
-    genhtml: fix warning about undefined value used
-    
-    nikita@zhuk.fi:
-    genhtml.patch checks that $funcdata->{$func} is defined before using
-    it - I got few "undefined value used" warnings without this check.
-
-commit a12d4f9a5d36232b928be12b7cbfaa9a00b3a923
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Apr 22 09:08:19 2009 +0000
-
-    genpng: fix runtime-warning
-    
-    - when called from within genhtml, genpng would warn about warn_handler
-      being redefined
-
-commit d0b5641c62bbdac89757b9ff185a7aa3f38fc0bb
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Mar 13 09:58:00 2009 +0000
-
-    lcov: improve function name filtering
-    
-    Only remove those characters from function names which would conflict
-    with internal delimiters.
-
-commit fbafa4a5628a639544e83f88083082c685677c36
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Feb 13 15:04:40 2009 +0000
-
-    genhtml: minor man page update
-
-commit 085a2150e38a3c1bdadb5af23c0a8a8a79dc4b0d
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Feb 13 14:56:45 2009 +0000
-
-    genhtml: added --demangle-cpp option
-    
-    - used to convert C++ internal function names to human readable format
-    - based on a patch by slava.semushin@gmail.com
-
-commit 53f3ed4afb45a2a4248314b677d36377598cc73c
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Feb 13 14:07:46 2009 +0000
-
-    genhtml: update comment
-
-commit 3c2b2e8541387506fd514d183f9a4a63c07c0aa4
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Feb 12 17:01:19 2009 +0000
-
-    genhtml: fix error when combining tracefiles without function data
-    
-    - genhtml: Can't use an undefined value as a HASH reference at genhtml
-      line 1506.
-    - bug reported by richard.corden@gmail.com
-
-commit 22397370ada6893b6e9a1c3f6ad0aba7f4864f81
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Feb 11 09:31:24 2009 +0000
-
-    lcov: fix error when combining tracefiles without function data
-    
-    - lcov: Can't use an undefined value as a HASH reference at lcov line
-      1341.
-    - bug reported by richard.corden@gmail.com
-
-commit 24ec53ae83acdd35682ba757adae23750bd4c623
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Feb 9 16:15:49 2009 +0000
-
-    lcov: fix warning when $HOME is not set
-    
-    - based on patch by acalando@free.fr
-
-commit 5da3521d5a438db0a21e93b0d14ea5a3cdab14d9
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Feb 9 12:41:44 2009 +0000
-
-    lcov: use install -pD -m <mode> for file installation
-
-commit bdce1bda2ac1a86aa6dfefae8e18353ba57afe4b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Feb 9 09:46:00 2009 +0000
-
-    lcov: fix double-counting of function data
-
-commit ea62c4e701abb05dd560ef22b52a4a72c17660e8
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 21 16:33:29 2009 +0000
-
-    geninfo: need to add CR removal to geninfo as well
-    
-    ... or checksumming will fail
-
-commit 70be5df7d58a393e27cee178df669c12ec670c5a
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 21 16:24:01 2009 +0000
-
-    lcov: modify end-of-line CR removal
-    
-    - s///g is 10% slower than s/// - \r may be 0x10 or 0x13 (see man
-      perlport)
-
-commit d8df4b0f83ff175f1a06afb693903ee1a93ec377
-Author: Michael Knigge <michael.knigge@set-software.de>
-Date:   Tue Jan 20 11:41:39 2009 +0000
-
-    lcov: remove CRLF line breaks in source code when generating html output
-    
-    - added patch by michael.knigge@set-software.de
-
-commit 442cca7e69356e7f8ba03bd95f7813576bd197cc
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Nov 17 14:11:20 2008 +0000
-
-    lcov: updated CVS version to 1.8
-
-commit 5c5c85a1c090360facd50cb089b8af98f0b37c47
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Nov 17 13:55:52 2008 +0000
-
-    lcov: version + date updates
-
-commit 9f6a735809c23559b861e97a20af55a66b6b96bb
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Nov 17 13:49:43 2008 +0000
-
-    lcov: fix spec file bug
-
-commit 11483dc0b56d326718edcd31d06458143add858f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Nov 17 13:44:38 2008 +0000
-
-    lcov: update error and warning messages
-
-commit 4dd11b80d14e34fee2e75b3fe8c7aa163f61ad1d
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Nov 17 12:48:03 2008 +0000
-
-    lcov: preparations for release 1.7
-
-commit b847ed6f3103a4c9f0a48417b9c3f160b9e00557
-Author: Jeff Connelly <jeffconnelly@users.sourceforge.net>
-Date:   Fri Oct 10 07:54:47 2008 +0000
-
-    lcov: geninfo chokes on spaces in the directory name
-    
-    In lcov 1.6, geninfo fails to find gcno/gcda files if the source directory
-    has spaces in the name, because it uses backticks to shell out to "find",
-    passing $directory on the command-line.
-    
-    Attached is a patch that double-quotes the variable, allowing geninfo to
-    operate on directories with spaces in their name. The fix isn't perfect; it
-    won't work on directories with a " character, but it works fine for my
-    purposes (I don't have any directories with quotes). A better fix would be
-    to use IPC::System::Simple's capturex from
-    http://search.cpan.org/~pjf/IPC-System-Simple-0.15/lib/IPC/System/Simple.pm
-    #runx(),_systemx()_and_capturex(). capturex() is a multiple-argument form
-    of the backticks, so it avoids any interpolation errors.
-
-commit ee3cdd554ee4e6d3ef5bdc9c5dcfee50de6375a7
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Aug 18 07:12:33 2008 +0000
-
-    lcov: change sorting order to low-to-high coverage
-
-commit fe665ca5ccf9d73d9ebdae17de88e181c1b9b0eb
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 15 08:38:21 2008 +0000
-
-    lcov: several changes
-    
-    - update download link
-    - unify webpage links
-    - provide --sort and --function-coverage switch + documentation
-
-commit 14137c5456f307982fed418e1e8fac65d7f086c3
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Aug 13 15:57:23 2008 +0000
-
-    lcov: fix function view page creation when --no-func is specified
-
-commit e59f7d15ffc7f1b3794a4212c53d0fb97ac7fb2a
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Aug 13 15:35:48 2008 +0000
-
-    lcov: updated versioning mechanism
-    
-    ... + fixed some man page bugs
-
-commit e933698b31bc2fb4a750d89a5755bb8155313da2
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Aug 13 14:08:23 2008 +0000
-
-    lcov: updated rpm description
-    
-    ... + summary and version strings
-
-commit 5a9660585ce39a77fa38607d0c2d2440955e7242
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Aug 13 13:53:50 2008 +0000
-
-    lcov: integrated function coverage patch
-    
-    ... by Tom Zoernen + sorting function
-
-commit d10ede8179747cfd675a3989578350c710e9bdd5
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed May 7 15:08:12 2008 +0000
-
-    lcov: --norecursion becomes --no-recursion
-    
-    + added docs
-
-commit 4096130608b9faf74c5b5feac554a10b5d9f83ce
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Feb 21 10:20:33 2008 +0000
-
-    lcov: fix error when trying to use genhtml -b
-    
-    genhtml fails when the data file contains an entry which is not
-    found in the base file.
-
-commit 9578099e13388344a6179c7cce54bfa094fd9b08
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Feb 20 17:21:51 2008 +0000
-
-    lcov: fixed problem with pre gcc-3.3 versions
-    
-    read_gcov_headers does not return valid results for pre gcc-3.3 versions.
-    Due to an unnecessary check, parsing of gcov files was aborted. Fix
-    by removing check.
-
-commit 16ec76b48fbc50c32890919e5bd0c30653719af9
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Feb 5 09:18:50 2008 +0000
-
-    lcov: adding support for gzipped html
-    
-    ... based on patch by dnozay@vmware.com
-    
-    dnozay@vmware.com: genhtml is a great tool to generate html, but the more
-    files, the more space it takes (here I have over 113MB of html generated),
-    add to that I need to have different sets, and space usage increases
-    dramatically (2.7GB). we are using browsers with htmlz support, so it would
-    be nice to have support for that in genhtml, relying on 'gzip -S z' to do
-    the job.
-
-commit f2c98a8c8581180533508eb4af41720d8566049e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jan 7 16:33:57 2008 +0000
-
-    Filter non-word characters in function name
-    
-    ... as they would break our file format which uses comma and '=' as
-    field separator.
-
-commit 37725fc78fcacaf06e6240971edc3bdd7fe3d142
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Nov 1 16:29:39 2007 +0000
-
-    lcov: fix for problem resulting in lcov aborting with "ERROR: reading string"
-
-commit 48f13fcec1b521d2daba6202ccd7ec0ec8c5ece9
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Oct 4 08:18:07 2007 +0000
-
-    lcov: workaround for gcc 4.1.0 .gcno file oddness
-    
-    scott.heavner@philips.com:
-    I'm trying to use lcov 1.6 with gcov/gcc 4.1.0. The geninfo parser was
-    aborting on a small number of .gcno files. I've patched my local copy so
-    that geninfo prints out the offset of the error and skips the remainder of
-    the problem file
-
-commit 1a805ea068db29b63a83c801f3bb1840fda8dd35
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 24 08:50:26 2007 +0000
-
-    lcov: add experimental option "--norecursion"
-
-commit 194de5071db1d9903d22164432448b73c1ec6cd0
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 23 11:08:39 2007 +0000
-
-    lcov: Makefile for post-release
-
-commit 0750f8a3e5235833711d616a3763c04103cf55a5
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Aug 23 11:04:30 2007 +0000
-
-    lcov: Makefile for release 1.6
-
-commit cb911f7a79593c89a730dc93fa54179fbf1df363
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Aug 20 10:29:35 2007 +0000
-
-    lcov: fixed spec file
-
-commit 62cefebdda87784140eb5f997ae4e575d2338298
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jul 6 07:38:47 2007 +0000
-
-    lcov: add new option --initial to get zero coverage data from graph files
-
-commit f0b6927f1ab1052b00081c662ced614a6e5f9ed7
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 4 14:38:59 2007 +0000
-
-    lcov: fixed bug that would not delete .gcda files when using -z
-
-commit 13941c3a159caf7dc6ba18a5b13e43c20fc18f2b
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 4 14:18:26 2007 +0000
-
-    lcov: another update in preparation for a new release
-
-commit d25e630a77ef2d0f69139058322269387866e414
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jul 4 13:13:22 2007 +0000
-
-    lcov: man page update
-
-commit 7844b915af5402441df9ab0423e4c20ef9a2632f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Jul 3 16:43:05 2007 +0000
-
-    lcov: update manpage
-
-commit 5adaa72bfb32737d18c328492777c1c6116d4a9e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jul 2 15:29:02 2007 +0000
-
-    lcov: preparations for new release
-    
-    - updated CHANGES file
-    - added compat-libtool + no-compat-libtool option
-    - changed libtool default to on (due to popular request)
-    - added checksum option
-    - changed checksum default to off (to reduce cpu time + file size)
-    - added geninfo_checksum option to lcovrc, deprecated
-      geninfo_no_checksum
-    - added geninfo_compat_libtool option to lcovrc
-    - minor update of README file
-
-commit 6cbfd5022703a6198e1a1e2a2ddddcc0b90f5334
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue May 22 08:11:44 2007 +0000
-
-    lcov: minor help text update
-
-commit 2416ed02ba299c4d0bceb1e47c214b7dec066d7a
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Mar 7 14:59:25 2007 +0000
-
-    lcov
-    
-    - add --ignore-errors option to lcov/geninfo
-    - add --gcov-tool option to lcov/geninfo
-    - remove s390 test case modification in geninfo
-    - restructured help text for lcov/geninfo
-
-commit a13375811717d3ada718e6f52364e4344a7e3187
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jan 8 17:07:21 2007 +0000
-
-    lcov
-    
-    - re-added libtool compatibility workaround patch by
-      thomas@apestaart.org
-    - added new lcov/geninfo-option --compat_libtool to activate libtool
-      compatibility patch
-
-commit 14871d7b097282819db60266d8b8a38506d7b14a
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Nov 14 11:45:17 2006 +0000
-
-    lcov
-    
-    Fix for problem found by Joerg Hohwieler: lcov -k doesn't work if -k is
-    specified more than once.
-
-commit 43b52b37006822c0fca12548bc72fecc957342ca
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Jun 26 15:48:52 2006 +0000
-
-    lcov: new version for prerelease rpms
-
-commit 89e9d59709c9d9d8722170c86251090adc3b96c9
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jun 7 09:31:57 2006 +0000
-
-    lcov: removed autoupdate of copyright date (second thoughts)
-
-commit bb0cf1c9d0ed58b37c1551fea765fb1622bcacde
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jun 7 09:20:37 2006 +0000
-
-    lcov: minor cleanup (release preparations)
-
-commit 527693d753d11ac2b59fe26b923662c99e6e3715
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Apr 5 10:10:05 2006 +0000
-
-    lcov
-    
-    - added base-directory documentation
-    - updated CHANGES file
-
-commit 11ef9338cc4124801c8b61e3edd51a02e50b4c68
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Mar 20 17:09:50 2006 +0000
-
-    genhtml: added html-extension option
-
-commit 93d22308ffb410327248059b7dcdb592f85e249e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Mar 20 16:39:25 2006 +0000
-
-    genhtml
-    
-    - adding html-prolog and html-epilog options (based on patch by Marcus
-      Boerger)
-    - specified behavior when both --no-prefix and --prefix options where
-      provided
-    - small whitespace diff
-
-commit dcac095cdc00cc65930285bb6fc01d0f257ee4ed
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Feb 15 16:02:07 2006 +0000
-
-    lcov: added check for invalid characters in test names
-
-commit d89e561dfd9c5fde43350af1b145b1892d0710d0
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Dec 2 06:38:16 2005 +0000
-
-    lcov
-    
-    - updated Makefile so that people building RPMs from the CVS version get
-      a correct build version. Note: this needs to be adjusted after each
-      release!
-
-commit 1960123050f9098690768d10cd2490dd49b995f7
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Thu Nov 10 13:10:09 2005 +0000
-
-    lcov
-    
-    - fixed bug: .info file generation with new gcc 4.x compilers may fail
-      for programming languages that allow ':' in function names (c++,
-      objective c)
-    - removed special handling for libtool .libs files
-    - libtool should work with currently undocumented option --base-directory
-
-commit 479d446d3bf20a84c2933100ead279c79eeaf5c4
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Sep 7 16:24:39 2005 +0000
-
-    lcov
-    
-    - implementation of new option --base-directory (untested, undocumented)
-    - minor fix for link-traversal when looking for object directory
-    
-    TODO: document option (man page, online help), add to config file, check
-    whether libtool fix still works
-
-commit 770b94a3172f206de7f194c7497ebae14348b521
-Author: Robert Williamson <robbiew@users.sourceforge.net>
-Date:   Mon Jul 11 17:54:25 2005 +0000
-
-    Applied patch from Stefan Kost
-    
-    when running lcov over an uninstalled user-space apps tests, it finds
-    the .da file in the .libs directories, but does not look for the sources
-    one hierarchy up. Libtool places the object in the .libs dirs. when
-    running gcov manually one can specify -o.libs/ to produce a source.c.gov
-    file. I now have attached a patch that fixes the problem for me. please
-    do not just ignore this report. the lcov tool is so nice and it would be
-    a shame if it can not be used for normal apps.
-
-commit 79f2ff2c168150e7532046c2cdbc1e42c8b4708f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Jun 14 11:34:59 2005 +0000
-
-    lcov
-    
-    - renamed support for modified compilers (gcc 3.3 hammer patch)
-    - fixed bugs in the support for modified compilers
-
-commit fb7dab3494fdd8b093e6a84f088f6ea07fcefe6e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Mar 15 18:02:54 2005 +0000
-
-    lcov
-    
-    Emil.Jansson@oss.teleca.se:
-    lcov 1.4 does not work with the gcc version in Mandrake Linux 10.0
-    
-    >> gcc --version
-    
-    gcc (GCC) 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
-    
-    This patch for geninfo fixes the problem:
-
-commit ae3fe899d824e8af8a16736a0c8104c903565a56
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Mar 8 14:23:06 2005 +0000
-
-    lcov
-    
-    - added optional legend to HTML output
-    - changed background color for "good coverage" entries to green for
-      consistency reasons
-
-commit 18b73d39fd9d6bc8829395baa612a6ed98b89efe
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Mar 2 14:49:47 2005 +0000
-
-    lcov
-    
-    - fixed rpm build process to exclude unnecessary directories in RPM
-
-commit ef6ee74df5bf1d1d104322f8fff36b5c6fda34b4
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Mar 2 12:48:29 2005 +0000
-
-    lcov
-    
-    - added man page for configuration file lcovrc
-
-commit be3afe2626d6bc72256e1873d409c737ac4391c9
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Feb 28 16:31:51 2005 +0000
-
-    lcov
-    
-    - Updated CHANGES file in preparation for a new release
-
-commit dc68ce9c804ef21bc8e149d9b468e18c1619bb54
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Nov 2 15:48:45 2004 +0000
-
-    lcov
-    
-    - temporary fix for a problem which occurs when trying to parse C++
-      coverage data generated with vanilla gcc 3.3.3
-
-commit efedc5b930ab6743ea9f47ce4ea4a1a75bd739ff
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Sep 27 13:13:51 2004 +0000
-
-    lcov
-    
-    - fix for minor bug in geninfo (access to uninitialized variable)
-      related to SLES9 compatibility test and test for existing source code
-      files
-
-commit 47943eedfbec7a12c52e7a8ccbcfaf8d0706f142
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Sep 20 14:11:16 2004 +0000
-
-    lcov
-    
-    - minor fix for regular expression used to parse .gcov files - caused
-      problems when parsing branch coverage data and when using custom
-      gcov versions
-
-commit ce6335ebd92ce017b75ee3e194e9e3ca7bc7e1f3
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Sep 14 15:52:38 2004 +0000
-
-    lcov
-    
-    - fixed bug in geninfo which would not report any FN: data for data
-      generated with gcc versions 3.4.0 and above
-
-commit 58df8af3a62fa4e60569ef300e0ddd0073bf109e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Aug 31 15:57:41 2004 +0000
-
-    lcov
-    
-    - added support for modified GCC version provided by SUSE SLES9
-
-commit 69f3bc3a0c59b35eb6882205286a68b04a8a8d22
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Aug 31 15:48:32 2004 +0000
-
-    lcov
-    
-    - fixed bug in lcov RPM spec file which would not include the global
-      config file in the package list
-
-commit 5d10ca22144ad2be885405c3683b20c0976f7562
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Aug 9 14:32:23 2004 +0000
-
-    lcov
-    
-    - fixed a bug which would cause generation of incorrect line checksums
-      when source code is not available while capturing coverage data
-    - changed default directory for temporary files from . to /tmp
-
-commit 8ee3061f23f17a5074deda0777c66c3e82b5d852
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Aug 9 11:15:02 2004 +0000
-
-    lcov
-    
-    - added configuration file support
-    - fixed Makefile error for target "uninstall"
-
-commit 58af07f0b0ca1af8c9f2b90ad1683447bb560165
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Aug 6 11:36:33 2004 +0000
-
-    lcov
-    
-    - fixed bug which would cause an error when lcov was used on a source
-      directory which contained perl regular expression special characters
-    - simplified regular expression character escaping
-    - removed unnecessary function escape_shell from lcov
-
-commit 69a6918d4cd386aff2fbff093a6e0b5ddcc46602
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Mar 30 13:27:55 2004 +0000
-
-    lcov: - added --path option to fix --diff functionality
-
-commit cbc6cb11b532e525ae8b0c0742a4fd41189ca7c2
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Mar 29 12:56:08 2004 +0000
-
-    lcov
-    
-    - Added compatibility for gcc-3.4
-    - Modified --diff function to better cope with ambiguous entries in
-      patch files
-    - Modified --capture option to use modprobe before insmod (needed for
-      2.6)
-
-commit 1cf9a02c3ea0e98cc1d8b626eaa0a2a1cbd96cf1
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Jan 30 09:42:13 2004 +0000
-
-    lcov
-    
-    - updated CHANGES file
-    - changed Makefile install path (/usr/local/bin -> /usr/bin)
-
-commit c60f0668059032cf4dc5f6c556fd6117925f535f
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Jan 14 10:14:10 2004 +0000
-
-    lcov-patch by Laurent Deniel
-    
-    avoids aborting the geninfo processing when an empty .bb file is
-    encountered (e.g. source code with no profiled statement)
-
-commit 7f2966f8f874a6c905b4d31e5aaf0f4654929044
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Dec 19 16:22:52 2003 +0000
-
-    lcov: updated references to lcov webpage to reflect recent site changes
-
-commit a3893f4eb2b4fadc4d7350324d74fa453a5ba0f3
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Dec 19 12:50:28 2003 +0000
-
-    Added changes by Laurent Deniel
-    
-    - a small patch to lcov 1.1 that introduces the --follow option (in
-      lcov & geninfo) to control whether or not links should be followed
-      while searching for .da files.
-    - a workaround for a gcov (3.2) bug which aborts with empty .da files
-      (gcov 3.3 is fixed but many distributions include gcc 3.2)
-
-commit d44f2f8e8672e31cc104c0598b0556a5949dc067
-Author: Paul Larson <plars@users.sourceforge.net>
-Date:   Fri Nov 21 19:34:59 2003 +0000
-
-    Fixed two buglets that caused geninfo to break with some versions of gcov.
-    
-    1. Return value for gcov --help might not be 0, expect -1 when it
-       doesn't exist
-    2. use -b instead of expanded (--branch-coverage or whatever it was)
-
-commit 5a1a33a840a665c77409f799be91cc2dce5cd3b2
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Tue Nov 18 14:06:47 2003 +0000
-
-    lcov
-    
-    - fixed function which interprets branch possibility data in geninfo
-      (branch x taken = y% would not be interpreted correctly)
-    - deactivated function which would add 'uname -a' output to testname
-      in geninfo (output in genhtml/showdetails looked unreadable, there
-      needs to be some better solution)
-
-commit e0ea03fedf43a3232c35708f882d7058998b2b3d
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Oct 10 14:18:32 2003 +0000
-
-    New function and bug fix update.
-    
-    Makefile:
-    - Added rule to build source rpm
-    
-    lcov.spec:
-    - Modified to support building source rpms
-    
-    genhtml:
-    - Fixed bug which would not correctly associate data sets with an empty
-      test name (only necessary when using --show-details in genhtml)
-    - Added checksumming mechanism: each tracefile now contains a checksum for
-      each instrumented line to detect incompatible data
-    - Implemented new command line option '--nochecksum' to suppress generation
-      of checksums
-    - Implemented new command line option '--highlight' which highlights lines of
-      code which were only covered in converted tracefiles (see '--diff' option of
-      lcov)
-    
-    geninfo:
-    - Added checksumming mechanism: each tracefile now contains a checksum for
-      each instrumented line to detect incompatible data
-    - Implemented new command line option '--nochecksum' to suppress generation
-      of checksums
-    - Added function to collect branch coverage data
-    
-    lcov:
-    - Fixed bug which would not correctly associate data sets with an empty
-      test name (only necessary when using --show-details in genhtml)
-    - Cleaned up internal command line option check
-    - Added info() output when reading tracefiles
-    - Added checksumming mechanism: each tracefile now contains a checksum for
-      each instrumented line to detect incompatible data
-    - Implemented new command line option '--nochecksum' to suppress generation
-      of checksums
-    - Implemented new command line option '--diff' which allows converting
-      coverage data from an older source code version by using a diff file
-      to map line numbers
-    
-    genpng:
-    - Added support for the highlighting option of genhtml
-    - Corrected tab to spaces conversion
-
-commit c17af02b4a856d8733a763e6c0685c31f3c7fb74
-Author: Nigel Hinds <nhinds@users.sourceforge.net>
-Date:   Fri Sep 19 21:51:06 2003 +0000
-
-    capture branch coverage data from GCOV.
-
-commit e2fc88f85254017bcf1fb04a3c935395a9b7a4a1
-Author: James M Kenefick Jr <parseexception@users.sourceforge.net>
-Date:   Thu Sep 4 16:56:10 2003 +0000
-
-    Initial checking of the galaxy map
-
-commit dfec606f3b30e1ac0f4114cfb98b29f91e9edb21
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Sat Jul 5 13:48:45 2003 +0000
-
-    LCOV: Fixed negative count handling
-    
-    - Negative counts are treated as zero
-    - Warning is issued when encountering negative counts
-
-commit a2ee105a07b19c52efe7a3e6e5b11a27b4b60ef8
-Author: Paul Larson <plars@users.sourceforge.net>
-Date:   Wed Jul 2 19:37:50 2003 +0000
-
-    Small fixes before the release
-
-commit 72860625dd904f84909253b20a7fc024b4e3377e
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon May 5 08:32:04 2003 +0000
-
-    Adjusted example program and README file
-    
-    ... to reflect renaming of lcov option '--reset' to '--zerocounters'.
-
-commit cbd9e315832960604d2949439326b30f4061e512
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Apr 30 15:47:51 2003 +0000
-
-    Renamed lcov option '--reset' to '--zerocounters'
-    
-    - Included '--remove' in help text of lcov
-    - Adjusted man pages to include option changes
-    - Extended info() change to geninfo and genhtml (infos are now printed
-      to STDERR)
-
-commit 8155960cb5db0359470d2a5f652bdc744e9ecfcd
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Wed Apr 16 15:43:31 2003 +0000
-
-    Modified read_gcov so that it can also parse the new gcov format which is to be introduced in gcc 3.3.
-
-commit 382440f781b12ade8f1f7962a0eb1cfc0525f2a5
-Author: Paul Larson <plars@users.sourceforge.net>
-Date:   Tue Apr 15 16:06:59 2003 +0000
-
-    Added --remove option info() now prints to stderr
-
-commit 62760fa1840326e849c7e58892ce671f510bb0af
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Mon Apr 14 09:31:51 2003 +0000
-
-    Check-in of updated LCOV version (to be released as 1.1).
-    
-    Includes fixes and modifications by Mike Kobler, Paul Larson and
-    myself.
-    
-    A quote from the CHANGS file:
-    - Added CHANGES file
-    - Added Makefile implementing the following targets:
-      * install    : install LCOV scripts and man pages
-      * uninstall  : revert previous installation
-      * dist       : create lcov.tar.gz file and lcov.rpm file
-      * clean      : clean up example directory, remove .tar and .rpm files
-    - Added man pages for all scripts
-    - Added example program to demonstrate the use of LCOV with a userspace
-      application
-    - Implemented RPM build process
-    - New directory structure:
-      * bin        : contains all executables
-      * example    : contains a userspace example for LCOV
-      * man        : contains man pages
-      * rpm        : contains files required for the RPM build process
-    - LCOV-scripts are now in bin/
-    - Removed .pl-extension from LCOV-script files
-    - Renamed readme.txt to README
-    
-    README:
-    - Adjusted mailing list address to ltp-coverage@lists.sourceforge.net
-    - Fixed incorrect parameter '--output-filename' in example LCOV call
-    - Removed tool descriptions and turned them into man pages
-    - Installation instructions now refer to RPM and tarball
-    
-    descriptions.tests:
-    - Fixed some spelling errors
-    
-    genhtml:
-    - Fixed bug which resulted in an error when trying to combine .info files
-      containing data without a test name
-    - Fixed bug which would not correctly handle data files in directories
-      with names containing some special characters ('+', etc.)
-    - Added check for empty tracefiles to prevent division-by-zeros
-    - Implemented new command line option --num-spaces / the number of spaces
-      which replace a tab in source code view is now user defined
-    - Fixed tab expansion so that in source code view, a tab doesn't produce a
-      fixed number of spaces, but as many spaces as are needed to advance to the
-      next tab position
-    - Output directory is now created if it doesn't exist
-    - Renamed "overview page" to "directory view page"
-    - HTML output pages are now titled "LCOV" instead of "GCOV"
-    
-    geninfo:
-    - Fixed bug which would not allow .info files to be generated in directories
-      with names containing some special characters
-    
-    lcov:
-    - Fixed bug which would cause lcov to fail when the tool is installed in
-      a path with a name containing some special characters
-    - Implemented new command line option '--add-tracefile' which allows the
-      combination of data from several tracefiles
-    - Implemented new command line option '--list' which lists the contents
-      of a tracefile
-    - Implemented new command line option '--extract' which allows extracting
-      data for a particular set of files from a tracefile
-    - Fixed name of gcov kernel module (new package contains gcov-prof.c)
-    - Changed name of gcov kernel directory from /proc/gcov to a global constant
-      so that it may be changed easily when required in future versions
-
-commit ec94ed71838a9780e82ea8bd67742bde2f4eeb47
-Author: Paul Larson <plars@users.sourceforge.net>
-Date:   Fri Mar 7 20:28:15 2003 +0000
-
-    Fix lcov.pl to work with the new gcov-kernel module
-    
-    ... ,documentation fixes in readme.txt
-
-commit e70d9abdb60b83de7174815371259c63fa75bf76
-Author: Robert Williamson <robbiew@users.sourceforge.net>
-Date:   Tue Feb 18 20:05:09 2003 +0000
-
-    Applied patch from Mike Kobler:
-    
-    One of my source file paths includes a "+" in the directory name.  I found
-    that genhtml.pl died when it encountered it. I was able to fix the problem
-    by modifying the string with the escape character before parsing it.
-
-commit 69ef6f1b607670589aae1ae1e6c78ef1b5d204e3
-Author: Peter Oberparleiter <oberpapr@users.sourceforge.net>
-Date:   Fri Sep 6 09:04:34 2002 +0000
-
-    Replaced reference to "cat" cvs directory
-    
-    ... and to .zip package.
-
-commit c641f6e694e2bebf9ef0a507091460026463d169
-Author: Manoj Iyer <iyermanoj@users.sourceforge.net>
-Date:   Thu Sep 5 19:14:51 2002 +0000
-
-    Coverage analysis files.
-    
-    Peter worked on this version.
diff --git a/ThirdParty/lcov/CONTRIBUTING b/ThirdParty/lcov/CONTRIBUTING
deleted file mode 100644
index 6890789bd140c4443e89b6d3412a362860ebffda..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/CONTRIBUTING
+++ /dev/null
@@ -1,93 +0,0 @@
-Contributing to LCOV
-====================
-
-Please read this document if you would like to help improving the LTP GCOV
-extension (LCOV). In general, all types of contributions are welcome, for
-example:
-
- * Fixes for code or documentation
- * Performance and compatibility improvements
- * Functional enhancements
-
-There are some rules that these contributions must follow to be acceptable for
-inclusion:
-
- 1. The contribution must align with the project goals of LCOV.
- 2. The contribution must follow a particular format.
- 3. The contribution must be signed.
-
-Once you have made sure that your contribution follows these rules, send it via
-e-mail to the LTP coverage mailing list [1].
-
-
-Signing your work
-=================
-
-All contributions to LCOV must be signed by putting the following line at the
-end of the explanation of a patch:
-
-  Signed-off-by: Your Name <your.email@example.org>
-
-By signing a patch, you certify the following:
-
-  By making a contribution to the LTP GCOV extension (LCOV) on
-  http://ltp.sourceforge.net, I certify that:
-
-  a) The contribution was created by me and I have the right to submit it
-     under the terms and conditions of the open source license
-     "GNU General Public License, version 2 or later".
-     (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
-
-  b) The contribution is made free of any other party's intellectual property
-     claims or rights.
-
-  c) I understand and agree that this project and the contribution are public
-     and that a record of the contribution (including all personal information
-     I submit with it, including my sign-off) is maintained indefinitely and
-     may be redistributed consistent with this project or the open source
-     license(s) involved.
-
-
-Project goals
-=============
-
-The goal of LCOV is to provide a set of command line tools that can be used to
-collect, process and visualize code coverage data as produced by the gcov tool
-that is part of the GNU Compiler Collection (GCC) [2].
-
-If you have an idea for a contribution but are unsure if it aligns with the
-project goals, feel free to discuss the idea on the LTP coverage mailing
-list [1].
-
-
-Contribution format
-===================
-
-To contribute a change, please create a patch using 'git format-patch'.
-Alternatively you can use the diff utility with the following command line
-options:
-
-  diff -Naurp
-
-Please base your changes on the most current version of LCOV. You can use the
-following command line to obtain this version from the lcov Git repository:
-
- git clone https://github.com/linux-test-project/lcov.git
-
-Add a meaningful description of the contribution to the top of the patch. The
-description should follow this format:
-
-  component: short description
-
-  detailed description
-
-  Signed-off-by: Your Name <your.email@example.org>
-
-With your Signed-off-by, you certify the rules stated in section
-"Signing your work".
-
-
--- 
-
-[1] ltp-coverage@lists.sourceforge.net
-[2] http://gcc.gnu.org
diff --git a/ThirdParty/lcov/COPYING b/ThirdParty/lcov/COPYING
deleted file mode 100644
index d511905c1647a1e311e8b20d5930a37a9c2531cd..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/ThirdParty/lcov/Makefile b/ThirdParty/lcov/Makefile
deleted file mode 100644
index 1207cb19add633f0b5f99f2e7c0c4ce1b95bed95..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/Makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-#
-# Makefile for LCOV
-#
-# Make targets:
-#   - install:   install LCOV tools and man pages on the system
-#   - uninstall: remove tools and man pages from the system
-#   - dist:      create files required for distribution, i.e. the lcov.tar.gz
-#                and the lcov.rpm file. Just make sure to adjust the VERSION
-#                and RELEASE variables below - both version and date strings
-#                will be updated in all necessary files.
-#   - clean:     remove all generated files
-#
-
-VERSION := $(shell bin/get_version.sh --version)
-RELEASE := $(shell bin/get_version.sh --release)
-FULL    := $(shell bin/get_version.sh --full)
-
-# Set this variable during 'make install' to specify the Perl interpreter used in
-# installed scripts, or leave empty to keep the current interpreter.
-export LCOV_PERL_PATH := /usr/bin/perl
-
-PREFIX  := /usr/local
-
-CFG_DIR := $(PREFIX)/etc
-BIN_DIR := $(PREFIX)/bin
-MAN_DIR := $(PREFIX)/share/man
-TMP_DIR := $(shell mktemp -d)
-FILES   := $(wildcard bin/*) $(wildcard man/*) README Makefile \
-	   $(wildcard rpm/*) lcovrc
-
-.PHONY: all info clean install uninstall rpms test
-
-all: info
-
-info:
-	@echo "Available make targets:"
-	@echo "  install   : install binaries and man pages in DESTDIR (default /)"
-	@echo "  uninstall : delete binaries and man pages from DESTDIR (default /)"
-	@echo "  dist      : create packages (RPM, tarball) ready for distribution"
-	@echo "  test      : perform self-tests"
-
-clean:
-	rm -f lcov-*.tar.gz
-	rm -f lcov-*.rpm
-	make -C example clean
-	make -C test -s clean
-
-install:
-	bin/install.sh bin/lcov $(DESTDIR)$(BIN_DIR)/lcov -m 755
-	bin/install.sh bin/genhtml $(DESTDIR)$(BIN_DIR)/genhtml -m 755
-	bin/install.sh bin/geninfo $(DESTDIR)$(BIN_DIR)/geninfo -m 755
-	bin/install.sh bin/genpng $(DESTDIR)$(BIN_DIR)/genpng -m 755
-	bin/install.sh bin/gendesc $(DESTDIR)$(BIN_DIR)/gendesc -m 755
-	bin/install.sh man/lcov.1 $(DESTDIR)$(MAN_DIR)/man1/lcov.1 -m 644
-	bin/install.sh man/genhtml.1 $(DESTDIR)$(MAN_DIR)/man1/genhtml.1 -m 644
-	bin/install.sh man/geninfo.1 $(DESTDIR)$(MAN_DIR)/man1/geninfo.1 -m 644
-	bin/install.sh man/genpng.1 $(DESTDIR)$(MAN_DIR)/man1/genpng.1 -m 644
-	bin/install.sh man/gendesc.1 $(DESTDIR)$(MAN_DIR)/man1/gendesc.1 -m 644
-	bin/install.sh man/lcovrc.5 $(DESTDIR)$(MAN_DIR)/man5/lcovrc.5 -m 644
-	bin/install.sh lcovrc $(DESTDIR)$(CFG_DIR)/lcovrc -m 644
-	bin/updateversion.pl $(DESTDIR)$(BIN_DIR)/lcov $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(BIN_DIR)/genhtml $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(BIN_DIR)/geninfo $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(BIN_DIR)/genpng $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(BIN_DIR)/gendesc $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(MAN_DIR)/man1/lcov.1 $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(MAN_DIR)/man1/genhtml.1 $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(MAN_DIR)/man1/geninfo.1 $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(MAN_DIR)/man1/genpng.1 $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(MAN_DIR)/man1/gendesc.1 $(VERSION) $(RELEASE) $(FULL)
-	bin/updateversion.pl $(DESTDIR)$(MAN_DIR)/man5/lcovrc.5 $(VERSION) $(RELEASE) $(FULL)
-
-uninstall:
-	bin/install.sh --uninstall bin/lcov $(DESTDIR)$(BIN_DIR)/lcov
-	bin/install.sh --uninstall bin/genhtml $(DESTDIR)$(BIN_DIR)/genhtml
-	bin/install.sh --uninstall bin/geninfo $(DESTDIR)$(BIN_DIR)/geninfo
-	bin/install.sh --uninstall bin/genpng $(DESTDIR)$(BIN_DIR)/genpng
-	bin/install.sh --uninstall bin/gendesc $(DESTDIR)$(BIN_DIR)/gendesc
-	bin/install.sh --uninstall man/lcov.1 $(DESTDIR)$(MAN_DIR)/man1/lcov.1
-	bin/install.sh --uninstall man/genhtml.1 $(DESTDIR)$(MAN_DIR)/man1/genhtml.1
-	bin/install.sh --uninstall man/geninfo.1 $(DESTDIR)$(MAN_DIR)/man1/geninfo.1
-	bin/install.sh --uninstall man/genpng.1 $(DESTDIR)$(MAN_DIR)/man1/genpng.1
-	bin/install.sh --uninstall man/gendesc.1 $(DESTDIR)$(MAN_DIR)/man1/gendesc.1
-	bin/install.sh --uninstall man/lcovrc.5 $(DESTDIR)$(MAN_DIR)/man5/lcovrc.5
-	bin/install.sh --uninstall lcovrc $(DESTDIR)$(CFG_DIR)/lcovrc
-
-dist: lcov-$(VERSION).tar.gz lcov-$(VERSION)-$(RELEASE).noarch.rpm \
-      lcov-$(VERSION)-$(RELEASE).src.rpm
-
-lcov-$(VERSION).tar.gz: $(FILES)
-	mkdir $(TMP_DIR)/lcov-$(VERSION)
-	cp -r * $(TMP_DIR)/lcov-$(VERSION)
-	bin/copy_dates.sh . $(TMP_DIR)/lcov-$(VERSION)
-	make -C $(TMP_DIR)/lcov-$(VERSION) clean
-	bin/updateversion.pl $(TMP_DIR)/lcov-$(VERSION) $(VERSION) $(RELEASE) $(FULL)
-	bin/get_changes.sh > $(TMP_DIR)/lcov-$(VERSION)/CHANGES
-	cd $(TMP_DIR) ; \
-	tar cfz $(TMP_DIR)/lcov-$(VERSION).tar.gz lcov-$(VERSION)
-	mv $(TMP_DIR)/lcov-$(VERSION).tar.gz .
-	rm -rf $(TMP_DIR)
-
-lcov-$(VERSION)-$(RELEASE).noarch.rpm: rpms
-lcov-$(VERSION)-$(RELEASE).src.rpm: rpms
-
-rpms: lcov-$(VERSION).tar.gz
-	mkdir $(TMP_DIR)
-	mkdir $(TMP_DIR)/BUILD
-	mkdir $(TMP_DIR)/RPMS
-	mkdir $(TMP_DIR)/SOURCES
-	mkdir $(TMP_DIR)/SRPMS
-	cp lcov-$(VERSION).tar.gz $(TMP_DIR)/SOURCES
-	cd $(TMP_DIR)/BUILD ; \
-	tar xfz $(TMP_DIR)/SOURCES/lcov-$(VERSION).tar.gz \
-		lcov-$(VERSION)/rpm/lcov.spec
-	rpmbuild --define '_topdir $(TMP_DIR)' \
-		 -ba $(TMP_DIR)/BUILD/lcov-$(VERSION)/rpm/lcov.spec
-	mv $(TMP_DIR)/RPMS/noarch/lcov-$(VERSION)-$(RELEASE).noarch.rpm .
-	mv $(TMP_DIR)/SRPMS/lcov-$(VERSION)-$(RELEASE).src.rpm .
-	rm -rf $(TMP_DIR)
-
-test:
-	@make -C test -s all
diff --git a/ThirdParty/lcov/README b/ThirdParty/lcov/README
deleted file mode 100644
index ad53c3cbcbf06c6cd326b2bac49cd973ebf6bb8b..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/README
+++ /dev/null
@@ -1,135 +0,0 @@
--------------------------------------------------
-- README file for the LTP GCOV extension (LCOV) -
-- Last changes: 2019-02-28                      -
--------------------------------------------------
-
-Description
------------
-  LCOV is an extension of GCOV, a GNU tool which provides information about
-  what parts of a program are actually executed (i.e. "covered") while running
-  a particular test case. The extension consists of a set of Perl scripts
-  which build on the textual GCOV output to implement the following enhanced
-  functionality:
-
-    * HTML based output: coverage rates are additionally indicated using bar
-      graphs and specific colors.
-
-    * Support for large projects: overview pages allow quick browsing of
-      coverage data by providing three levels of detail: directory view,
-      file view and source code view.
-
-  LCOV was initially designed to support Linux kernel coverage measurements,
-  but works as well for coverage measurements on standard user space
-  applications.
-
-
-Further README contents
------------------------
-  1. Included files
-  2. Installing LCOV
-  3. An example of how to access kernel coverage data
-  4. An example of how to access coverage data for a user space program
-  5. Questions and Comments
-
-
-
-1. Important files
-------------------
-  README             - This README file
-  CHANGES            - List of changes between releases
-  bin/lcov           - Tool for capturing LCOV coverage data
-  bin/genhtml        - Tool for creating HTML output from LCOV data
-  bin/gendesc        - Tool for creating description files as used by genhtml
-  bin/geninfo        - Internal tool (creates LCOV data files)
-  bin/genpng         - Internal tool (creates png overviews of source files)
-  bin/install.sh     - Internal tool (takes care of un-/installing)
-  man                - Directory containing man pages for included tools
-  example            - Directory containing an example to demonstrate LCOV
-  lcovrc             - LCOV configuration file
-  Makefile           - Makefile providing 'install' and 'uninstall' targets
-
-
-2. Installing LCOV
-------------------
-The LCOV package is available as either RPM or tarball from:
-     
-  http://ltp.sourceforge.net/coverage/lcov.php
-
-To install the tarball, unpack it to a directory and run:
-
-  make install
-
-Use Git for the most recent (but possibly unstable) version:
-
-  git clone https://github.com/linux-test-project/lcov.git
-
-Change to the resulting lcov directory and type:
-
-  make install
-
-
-3. An example of how to access kernel coverage data
----------------------------------------------------
-Requirements: get and install the gcov-kernel package from
-
-  http://sourceforge.net/projects/ltp
-
-Copy the resulting gcov kernel module file to either the system wide modules
-directory or the same directory as the Perl scripts. As root, do the following:
-
-  a) Resetting counters
-
-     lcov --zerocounters
-
-  b) Capturing the current coverage state to a file
-
-     lcov --capture --output-file kernel.info
-
-  c) Getting HTML output
-
-     genhtml kernel.info
-
-Point the web browser of your choice to the resulting index.html file.
-
-
-4. An example of how to access coverage data for a user space program
----------------------------------------------------------------------
-Requirements: compile the program in question using GCC with the options
--fprofile-arcs and -ftest-coverage. During linking, make sure to specify
--lgcov or -coverage.
-
-Assuming the compile directory is called "appdir", do the following:
-
-  a) Resetting counters
-
-     lcov --directory appdir --zerocounters
-
-  b) Capturing the current coverage state to a file
-
-     lcov --directory appdir --capture --output-file app.info
-
-     Note that this step only works after the application has
-     been started and stopped at least once. Otherwise lcov will
-     abort with an error mentioning that there are no data/.gcda files.
-
-  c) Getting HTML output
-
-     genhtml app.info
-
-Point the web browser of your choice to the resulting index.html file.
-
-Please note that independently of where the application is installed or
-from which directory it is run, the --directory statement needs to
-point to the directory in which the application was compiled.
-
-For further information on the gcc profiling mechanism, please also
-consult the gcov man page.
-
-
-5. Questions and comments
--------------------------
-See the included man pages for more information on how to use the LCOV tools.
-
-Please email further questions or comments regarding this tool to the
-LTP Mailing list at ltp-coverage@lists.sourceforge.net  
-
diff --git a/ThirdParty/lcov/bin/copy_dates.sh b/ThirdParty/lcov/bin/copy_dates.sh
deleted file mode 100755
index aef5f5ed36cfce1d36186425b2260c5fee94a51a..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/copy_dates.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env bash
-#
-# Usage: copy_dates.sh SOURCE TARGET
-#
-# For each file found in SOURCE, set the modification time of the copy of that
-# file in TARGET to either the time of the latest Git commit (if SOURCE contains
-# a Git repository and the file was not modified after the last commit), or the
-# modification time of the original file.
-
-SOURCE="$1"
-TARGET="$2"
-
-if [ -z "$SOURCE" -o -z "$TARGET" ] ; then
-	echo "Usage: $0 SOURCE TARGET" >&2
-	exit 1
-fi
-
-[ -d "$SOURCE/.git" ] ; NOGIT=$?
-
-echo "Copying modification/commit times from $SOURCE to $TARGET"
-
-cd "$SOURCE" || exit 1
-find * -type f | while read FILENAME ; do
-	[ ! -e "$TARGET/$FILENAME" ] && continue
-
-	# Copy modification time
-	touch -m "$TARGET/$FILENAME" -r "$FILENAME"
-
-	[ $NOGIT -eq 1 ] && continue				# No Git
-	git diff --quiet -- "$FILENAME" || continue		# Modified
-	git diff --quiet --cached -- "$FILENAME" || continue	# Modified
-
-	# Apply modification time from Git commit time
-	TIME=$(git log --pretty=format:%cd -n 1 --date=iso -- "$FILENAME")
-	[ -n "$TIME" ] && touch -m "$TARGET/$FILENAME" --date "$TIME"
-done
diff --git a/ThirdParty/lcov/bin/gendesc b/ThirdParty/lcov/bin/gendesc
deleted file mode 100755
index 334ee7892372935d48dc349ce2fb3cc373af3080..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/gendesc
+++ /dev/null
@@ -1,226 +0,0 @@
-#!/usr/bin/env perl
-#
-#   Copyright (c) International Business Machines  Corp., 2002
-#
-#   This program is free software;  you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or (at
-#   your option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY;  without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   General Public License for more details.                 
-#
-#   You should have received a copy of the GNU General Public License
-#   along with this program;  if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#
-# gendesc
-#
-#   This script creates a description file as understood by genhtml.
-#   Input file format:
-#
-#   For each test case:
-#     <test name><optional whitespace>
-#     <at least one whitespace character (blank/tab)><test description>
-#   
-#   Actual description may consist of several lines. By default, output is
-#   written to stdout. Test names consist of alphanumeric characters
-#   including _ and -.
-#
-#
-# History:
-#   2002-09-02: created by Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-#
-
-use strict;
-use warnings;
-use File::Basename; 
-use Getopt::Long;
-use Cwd qw/abs_path/;
-
-
-# Constants
-our $tool_dir		= abs_path(dirname($0));
-our $lcov_version	= "LCOV version 1.14";
-our $lcov_url		= "http://ltp.sourceforge.net/coverage/lcov.php";
-our $tool_name		= basename($0);
-
-
-# Prototypes
-sub print_usage(*);
-sub gen_desc();
-sub warn_handler($);
-sub die_handler($);
-
-
-# Global variables
-our $help;
-our $version;
-our $output_filename;
-our $input_filename;
-
-
-#
-# Code entry point
-#
-
-$SIG{__WARN__} = \&warn_handler;
-$SIG{__DIE__} = \&die_handler;
-
-# Parse command line options
-if (!GetOptions("output-filename=s" => \$output_filename,
-		"version" =>\$version,
-		"help|?" => \$help
-		))
-{
-	print(STDERR "Use $tool_name --help to get usage information\n");
-	exit(1);
-}
-
-$input_filename = $ARGV[0];
-
-# Check for help option
-if ($help)
-{
-	print_usage(*STDOUT);
-	exit(0);
-}
-
-# Check for version option
-if ($version)
-{
-	print("$tool_name: $lcov_version\n");
-	exit(0);
-}
-
-
-# Check for input filename
-if (!$input_filename)
-{
-	die("No input filename specified\n".
-	    "Use $tool_name --help to get usage information\n");
-}
-
-# Do something
-gen_desc();
-
-
-#
-# print_usage(handle)
-#
-# Write out command line usage information to given filehandle.
-#
-
-sub print_usage(*)
-{
-	local *HANDLE = $_[0];
-
-	print(HANDLE <<END_OF_USAGE)
-Usage: $tool_name [OPTIONS] INPUTFILE
-
-Convert a test case description file into a format as understood by genhtml.
-
-  -h, --help                        Print this help, then exit
-  -v, --version                     Print version number, then exit
-  -o, --output-filename FILENAME    Write description to FILENAME
-
-For more information see: $lcov_url
-END_OF_USAGE
-	;
-}
-
-
-#
-# gen_desc()
-#
-# Read text file INPUT_FILENAME and convert the contained description to a
-# format as understood by genhtml, i.e.
-#
-#    TN:<test name>
-#    TD:<test description>
-#
-# If defined, write output to OUTPUT_FILENAME, otherwise to stdout.
-#
-# Die on error.
-#
-
-sub gen_desc()
-{
-	local *INPUT_HANDLE;
-	local *OUTPUT_HANDLE;
-	my $empty_line = "ignore";
-
-	open(INPUT_HANDLE, "<", $input_filename)
-		or die("ERROR: cannot open $input_filename!\n");
-
-	# Open output file for writing
-	if ($output_filename)
-	{
-		open(OUTPUT_HANDLE, ">", $output_filename)
-			or die("ERROR: cannot create $output_filename!\n");
-	}
-	else
-	{
-		*OUTPUT_HANDLE = *STDOUT;
-	}
-
-	# Process all lines in input file
-	while (<INPUT_HANDLE>)
-	{
-		chomp($_);
-
-		if (/^(\w[\w-]*)(\s*)$/)
-		{
-			# Matched test name
-			# Name starts with alphanum or _, continues with
-			# alphanum, _ or -
-			print(OUTPUT_HANDLE "TN: $1\n");
-			$empty_line = "ignore";
-		}
-		elsif (/^(\s+)(\S.*?)\s*$/)
-		{
-			# Matched test description
-			if ($empty_line eq "insert")
-			{
-				# Write preserved empty line
-				print(OUTPUT_HANDLE "TD: \n");
-			}
-			print(OUTPUT_HANDLE "TD: $2\n");
-			$empty_line = "observe";
-		}
-		elsif (/^\s*$/)
-		{
-			# Matched empty line to preserve paragraph separation
-			# inside description text
-			if ($empty_line eq "observe")
-			{
-				$empty_line = "insert";
-			}
-		}
-	}
-
-	# Close output file if defined
-	if ($output_filename)
-	{
-		close(OUTPUT_HANDLE);
-	}
-
-	close(INPUT_HANDLE);
-}
-
-sub warn_handler($)
-{
-	my ($msg) = @_;
-
-	warn("$tool_name: $msg");
-}
-
-sub die_handler($)
-{
-	my ($msg) = @_;
-
-	die("$tool_name: $msg");
-}
diff --git a/ThirdParty/lcov/bin/genhtml b/ThirdParty/lcov/bin/genhtml
deleted file mode 100755
index 2352300c11403acdc39f4b27582d68f6387ac685..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/genhtml
+++ /dev/null
@@ -1,5974 +0,0 @@
-#!/usr/bin/env perl
-#
-#   Copyright (c) International Business Machines  Corp., 2002,2012
-#
-#   This program is free software;  you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or (at
-#   your option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY;  without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   General Public License for more details. 
-#
-#   You should have received a copy of the GNU General Public License
-#   along with this program;  if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#
-# genhtml
-#
-#   This script generates HTML output from .info files as created by the
-#   geninfo script. Call it with --help and refer to the genhtml man page
-#   to get information on usage and available options.
-#
-#
-# History:
-#   2002-08-23 created by Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-#                         IBM Lab Boeblingen
-#        based on code by Manoj Iyer <manjo@mail.utexas.edu> and
-#                         Megan Bock <mbock@us.ibm.com>
-#                         IBM Austin
-#   2002-08-27 / Peter Oberparleiter: implemented frame view
-#   2002-08-29 / Peter Oberparleiter: implemented test description filtering
-#                so that by default only descriptions for test cases which
-#                actually hit some source lines are kept
-#   2002-09-05 / Peter Oberparleiter: implemented --no-sourceview
-#   2002-09-05 / Mike Kobler: One of my source file paths includes a "+" in
-#                the directory name.  I found that genhtml.pl died when it
-#                encountered it. I was able to fix the problem by modifying
-#                the string with the escape character before parsing it.
-#   2002-10-26 / Peter Oberparleiter: implemented --num-spaces
-#   2003-04-07 / Peter Oberparleiter: fixed bug which resulted in an error
-#                when trying to combine .info files containing data without
-#                a test name
-#   2003-04-10 / Peter Oberparleiter: extended fix by Mike to also cover
-#                other special characters
-#   2003-04-30 / Peter Oberparleiter: made info write to STDERR, not STDOUT
-#   2003-07-10 / Peter Oberparleiter: added line checksum support
-#   2004-08-09 / Peter Oberparleiter: added configuration file support
-#   2005-03-04 / Cal Pierog: added legend to HTML output, fixed coloring of
-#                "good coverage" background
-#   2006-03-18 / Marcus Boerger: added --custom-intro, --custom-outro and
-#                overwrite --no-prefix if --prefix is present
-#   2006-03-20 / Peter Oberparleiter: changes to custom_* function (rename
-#                to html_prolog/_epilog, minor modifications to implementation),
-#                changed prefix/noprefix handling to be consistent with current
-#                logic
-#   2006-03-20 / Peter Oberparleiter: added --html-extension option
-#   2008-07-14 / Tom Zoerner: added --function-coverage command line option;
-#                added function table to source file page
-#   2008-08-13 / Peter Oberparleiter: modified function coverage
-#                implementation (now enabled per default),
-#                introduced sorting option (enabled per default)
-#
-
-use strict;
-use warnings;
-use File::Basename;
-use File::Temp qw(tempfile);
-use Getopt::Long;
-use Digest::MD5 qw(md5_base64);
-use Cwd qw/abs_path cwd/;
-
-
-# Global constants
-our $title		= "LCOV - code coverage report";
-our $tool_dir		= abs_path(dirname($0));
-our $lcov_version	= "LCOV version 1.14";
-our $lcov_url		= "http://ltp.sourceforge.net/coverage/lcov.php";
-our $tool_name		= basename($0);
-
-# Specify coverage rate default precision
-our $default_precision = 1;
-
-# Specify coverage rate limits (in %) for classifying file entries
-# HI:   $hi_limit <= rate <= 100          graph color: green
-# MED: $med_limit <= rate <  $hi_limit    graph color: orange
-# LO:          0  <= rate <  $med_limit   graph color: red
-
-# For line coverage/all coverage types if not specified
-our $hi_limit = 90;
-our $med_limit = 75;
-
-# For function coverage
-our $fn_hi_limit;
-our $fn_med_limit;
-
-# For branch coverage
-our $br_hi_limit;
-our $br_med_limit;
-
-# Width of overview image
-our $overview_width = 80;
-
-# Resolution of overview navigation: this number specifies the maximum
-# difference in lines between the position a user selected from the overview
-# and the position the source code window is scrolled to.
-our $nav_resolution = 4;
-
-# Clicking a line in the overview image should show the source code view at
-# a position a bit further up so that the requested line is not the first
-# line in the window. This number specifies that offset in lines.
-our $nav_offset = 10;
-
-# Clicking on a function name should show the source code at a position a
-# few lines before the first line of code of that function. This number
-# specifies that offset in lines.
-our $func_offset = 2;
-
-our $overview_title = "top level";
-
-# Width for line coverage information in the source code view
-our $line_field_width = 12;
-
-# Width for branch coverage information in the source code view
-our $br_field_width = 16;
-
-# Internal Constants
-
-# Header types
-our $HDR_DIR		= 0;
-our $HDR_FILE		= 1;
-our $HDR_SOURCE		= 2;
-our $HDR_TESTDESC	= 3;
-our $HDR_FUNC		= 4;
-
-# Sort types
-our $SORT_FILE		= 0;
-our $SORT_LINE		= 1;
-our $SORT_FUNC		= 2;
-our $SORT_BRANCH	= 3;
-
-# Fileview heading types
-our $HEAD_NO_DETAIL	= 1;
-our $HEAD_DETAIL_HIDDEN	= 2;
-our $HEAD_DETAIL_SHOWN	= 3;
-
-# Additional offsets used when converting branch coverage data to HTML
-our $BR_LEN	= 3;
-our $BR_OPEN	= 4;
-our $BR_CLOSE	= 5;
-
-# Branch data combination types
-our $BR_SUB = 0;
-our $BR_ADD = 1;
-
-# Error classes which users may specify to ignore during processing
-our $ERROR_SOURCE	= 0;
-our %ERROR_ID = (
-	"source" => $ERROR_SOURCE,
-);
-
-# Data related prototypes
-sub print_usage(*);
-sub gen_html();
-sub html_create($$);
-sub process_dir($);
-sub process_file($$$);
-sub info(@);
-sub read_info_file($);
-sub get_info_entry($);
-sub set_info_entry($$$$$$$$$;$$$$$$);
-sub get_prefix($@);
-sub shorten_prefix($);
-sub get_dir_list(@);
-sub get_relative_base_path($);
-sub read_testfile($);
-sub get_date_string();
-sub create_sub_dir($);
-sub subtract_counts($$);
-sub add_counts($$);
-sub apply_baseline($$);
-sub remove_unused_descriptions();
-sub get_found_and_hit($);
-sub get_affecting_tests($$$);
-sub combine_info_files($$);
-sub merge_checksums($$$);
-sub combine_info_entries($$$);
-sub apply_prefix($@);
-sub system_no_output($@);
-sub read_config($);
-sub apply_config($);
-sub get_html_prolog($);
-sub get_html_epilog($);
-sub write_dir_page($$$$$$$$$$$$$$$$$);
-sub classify_rate($$$$);
-sub combine_brcount($$$;$);
-sub get_br_found_and_hit($);
-sub warn_handler($);
-sub die_handler($);
-sub parse_ignore_errors(@);
-sub parse_dir_prefix(@);
-sub rate($$;$$$);
-
-
-# HTML related prototypes
-sub escape_html($);
-sub get_bar_graph_code($$$);
-
-sub write_png_files();
-sub write_htaccess_file();
-sub write_css_file();
-sub write_description_file($$$$$$$);
-sub write_function_table(*$$$$$$$$$$);
-
-sub write_html(*$);
-sub write_html_prolog(*$$);
-sub write_html_epilog(*$;$);
-
-sub write_header(*$$$$$$$$$$);
-sub write_header_prolog(*$);
-sub write_header_line(*@);
-sub write_header_epilog(*$);
-
-sub write_file_table(*$$$$$$$);
-sub write_file_table_prolog(*$@);
-sub write_file_table_entry(*$$$@);
-sub write_file_table_detail_entry(*$@);
-sub write_file_table_epilog(*);
-
-sub write_test_table_prolog(*$);
-sub write_test_table_entry(*$$);
-sub write_test_table_epilog(*);
-
-sub write_source($$$$$$$);
-sub write_source_prolog(*);
-sub write_source_line(*$$$$$);
-sub write_source_epilog(*);
-
-sub write_frameset(*$$$);
-sub write_overview_line(*$$$);
-sub write_overview(*$$$$);
-
-# External prototype (defined in genpng)
-sub gen_png($$$@);
-
-
-# Global variables & initialization
-our %info_data;		# Hash containing all data from .info file
-our @opt_dir_prefix;	# Array of prefixes to remove from all sub directories
-our @dir_prefix;
-our %test_description;	# Hash containing test descriptions if available
-our $date = get_date_string();
-
-our @info_filenames;	# List of .info files to use as data source
-our $test_title;	# Title for output as written to each page header
-our $output_directory;	# Name of directory in which to store output
-our $base_filename;	# Optional name of file containing baseline data
-our $desc_filename;	# Name of file containing test descriptions
-our $css_filename;	# Optional name of external stylesheet file to use
-our $quiet;		# If set, suppress information messages
-our $help;		# Help option flag
-our $version;		# Version option flag
-our $show_details;	# If set, generate detailed directory view
-our $no_prefix;		# If set, do not remove filename prefix
-our $func_coverage;	# If set, generate function coverage statistics
-our $no_func_coverage;	# Disable func_coverage
-our $br_coverage;	# If set, generate branch coverage statistics
-our $no_br_coverage;	# Disable br_coverage
-our $sort = 1;		# If set, provide directory listings with sorted entries
-our $no_sort;		# Disable sort
-our $frames;		# If set, use frames for source code view
-our $keep_descriptions;	# If set, do not remove unused test case descriptions
-our $no_sourceview;	# If set, do not create a source code view for each file
-our $highlight;		# If set, highlight lines covered by converted data only
-our $legend;		# If set, include legend in output
-our $tab_size = 8;	# Number of spaces to use in place of tab
-our $config;		# Configuration file contents
-our $html_prolog_file;	# Custom HTML prolog file (up to and including <body>)
-our $html_epilog_file;	# Custom HTML epilog file (from </body> onwards)
-our $html_prolog;	# Actual HTML prolog
-our $html_epilog;	# Actual HTML epilog
-our $html_ext = "html";	# Extension for generated HTML files
-our $html_gzip = 0;	# Compress with gzip
-our $demangle_cpp = 0;	# Demangle C++ function names
-our @opt_ignore_errors;	# Ignore certain error classes during processing
-our @ignore;
-our $opt_config_file;	# User-specified configuration file location
-our %opt_rc;
-our $opt_missed;	# List/sort lines by missed counts
-our $charset = "UTF-8";	# Default charset for HTML pages
-our @fileview_sortlist;
-our @fileview_sortname = ("", "-sort-l", "-sort-f", "-sort-b");
-our @funcview_sortlist;
-our @rate_name = ("Lo", "Med", "Hi");
-our @rate_png = ("ruby.png", "amber.png", "emerald.png");
-our $lcov_func_coverage = 1;
-our $lcov_branch_coverage = 0;
-our $rc_desc_html = 0;	# lcovrc: genhtml_desc_html
-
-our $cwd = cwd();	# Current working directory
-
-
-#
-# Code entry point
-#
-
-$SIG{__WARN__} = \&warn_handler;
-$SIG{__DIE__} = \&die_handler;
-
-# Check command line for a configuration file name
-Getopt::Long::Configure("pass_through", "no_auto_abbrev");
-GetOptions("config-file=s" => \$opt_config_file,
-	   "rc=s%" => \%opt_rc);
-Getopt::Long::Configure("default");
-
-{
-	# Remove spaces around rc options
-	my %new_opt_rc;
-
-	while (my ($key, $value) = each(%opt_rc)) {
-		$key =~ s/^\s+|\s+$//g;
-		$value =~ s/^\s+|\s+$//g;
-
-		$new_opt_rc{$key} = $value;
-	}
-	%opt_rc = %new_opt_rc;
-}
-
-# Read configuration file if available
-if (defined($opt_config_file)) {
-	$config = read_config($opt_config_file);
-} elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc"))
-{
-	$config = read_config($ENV{"HOME"}."/.lcovrc");
-}
-elsif (-r "/etc/lcovrc")
-{
-	$config = read_config("/etc/lcovrc");
-} elsif (-r "/usr/local/etc/lcovrc")
-{
-	$config = read_config("/usr/local/etc/lcovrc");
-}
-
-if ($config || %opt_rc)
-{
-	# Copy configuration file and --rc values to variables
-	apply_config({
-		"genhtml_css_file"		=> \$css_filename,
-		"genhtml_hi_limit"		=> \$hi_limit,
-		"genhtml_med_limit"		=> \$med_limit,
-		"genhtml_line_field_width"	=> \$line_field_width,
-		"genhtml_overview_width"	=> \$overview_width,
-		"genhtml_nav_resolution"	=> \$nav_resolution,
-		"genhtml_nav_offset"		=> \$nav_offset,
-		"genhtml_keep_descriptions"	=> \$keep_descriptions,
-		"genhtml_no_prefix"		=> \$no_prefix,
-		"genhtml_no_source"		=> \$no_sourceview,
-		"genhtml_num_spaces"		=> \$tab_size,
-		"genhtml_highlight"		=> \$highlight,
-		"genhtml_legend"		=> \$legend,
-		"genhtml_html_prolog"		=> \$html_prolog_file,
-		"genhtml_html_epilog"		=> \$html_epilog_file,
-		"genhtml_html_extension"	=> \$html_ext,
-		"genhtml_html_gzip"		=> \$html_gzip,
-		"genhtml_precision"		=> \$default_precision,
-		"genhtml_function_hi_limit"	=> \$fn_hi_limit,
-		"genhtml_function_med_limit"	=> \$fn_med_limit,
-		"genhtml_function_coverage"	=> \$func_coverage,
-		"genhtml_branch_hi_limit"	=> \$br_hi_limit,
-		"genhtml_branch_med_limit"	=> \$br_med_limit,
-		"genhtml_branch_coverage"	=> \$br_coverage,
-		"genhtml_branch_field_width"	=> \$br_field_width,
-		"genhtml_sort"			=> \$sort,
-		"genhtml_charset"		=> \$charset,
-		"genhtml_desc_html"		=> \$rc_desc_html,
-		"genhtml_demangle_cpp"		=> \$demangle_cpp,
-		"genhtml_missed"		=> \$opt_missed,
-		"lcov_function_coverage"	=> \$lcov_func_coverage,
-		"lcov_branch_coverage"		=> \$lcov_branch_coverage,
-		});
-}
-
-# Copy related values if not specified
-$fn_hi_limit	= $hi_limit if (!defined($fn_hi_limit));
-$fn_med_limit	= $med_limit if (!defined($fn_med_limit));
-$br_hi_limit	= $hi_limit if (!defined($br_hi_limit));
-$br_med_limit	= $med_limit if (!defined($br_med_limit));
-$func_coverage	= $lcov_func_coverage if (!defined($func_coverage));
-$br_coverage	= $lcov_branch_coverage if (!defined($br_coverage));
-
-# Parse command line options
-if (!GetOptions("output-directory|o=s"	=> \$output_directory,
-		"title|t=s"		=> \$test_title,
-		"description-file|d=s"	=> \$desc_filename,
-		"keep-descriptions|k"	=> \$keep_descriptions,
-		"css-file|c=s"		=> \$css_filename,
-		"baseline-file|b=s"	=> \$base_filename,
-		"prefix|p=s"		=> \@opt_dir_prefix,
-		"num-spaces=i"		=> \$tab_size,
-		"no-prefix"		=> \$no_prefix,
-		"no-sourceview"		=> \$no_sourceview,
-		"show-details|s"	=> \$show_details,
-		"frames|f"		=> \$frames,
-		"highlight"		=> \$highlight,
-		"legend"		=> \$legend,
-		"quiet|q"		=> \$quiet,
-		"help|h|?"		=> \$help,
-		"version|v"		=> \$version,
-		"html-prolog=s"		=> \$html_prolog_file,
-		"html-epilog=s"		=> \$html_epilog_file,
-		"html-extension=s"	=> \$html_ext,
-		"html-gzip"		=> \$html_gzip,
-		"function-coverage"	=> \$func_coverage,
-		"no-function-coverage"	=> \$no_func_coverage,
-		"branch-coverage"	=> \$br_coverage,
-		"no-branch-coverage"	=> \$no_br_coverage,
-		"sort"			=> \$sort,
-		"no-sort"		=> \$no_sort,
-		"demangle-cpp"		=> \$demangle_cpp,
-		"ignore-errors=s"	=> \@opt_ignore_errors,
-		"config-file=s"		=> \$opt_config_file,
-		"rc=s%"			=> \%opt_rc,
-		"precision=i"		=> \$default_precision,
-		"missed"		=> \$opt_missed,
-		))
-{
-	print(STDERR "Use $tool_name --help to get usage information\n");
-	exit(1);
-} else {
-	# Merge options
-	if ($no_func_coverage) {
-		$func_coverage = 0;
-	}
-	if ($no_br_coverage) {
-		$br_coverage = 0;
-	}
-
-	# Merge sort options
-	if ($no_sort) {
-		$sort = 0;
-	}
-}
-
-@info_filenames = @ARGV;
-
-# Check for help option
-if ($help)
-{
-	print_usage(*STDOUT);
-	exit(0);
-}
-
-# Check for version option
-if ($version)
-{
-	print("$tool_name: $lcov_version\n");
-	exit(0);
-}
-
-# Determine which errors the user wants us to ignore
-parse_ignore_errors(@opt_ignore_errors);
-
-# Split the list of prefixes if needed
-parse_dir_prefix(@opt_dir_prefix);
-
-# Check for info filename
-if (!@info_filenames)
-{
-	die("No filename specified\n".
-	    "Use $tool_name --help to get usage information\n");
-}
-
-# Generate a title if none is specified
-if (!$test_title)
-{
-	if (scalar(@info_filenames) == 1)
-	{
-		# Only one filename specified, use it as title
-		$test_title = basename($info_filenames[0]);
-	}
-	else
-	{
-		# More than one filename specified, used default title
-		$test_title = "unnamed";
-	}
-}
-
-# Make sure css_filename is an absolute path (in case we're changing
-# directories)
-if ($css_filename)
-{
-	if (!($css_filename =~ /^\/(.*)$/))
-	{
-		$css_filename = $cwd."/".$css_filename;
-	}
-}
-
-# Make sure tab_size is within valid range
-if ($tab_size < 1)
-{
-	print(STDERR "ERROR: invalid number of spaces specified: ".
-		     "$tab_size!\n");
-	exit(1);
-}
-
-# Get HTML prolog and epilog
-$html_prolog = get_html_prolog($html_prolog_file);
-$html_epilog = get_html_epilog($html_epilog_file);
-
-# Issue a warning if --no-sourceview is enabled together with --frames
-if ($no_sourceview && defined($frames))
-{
-	warn("WARNING: option --frames disabled because --no-sourceview ".
-	     "was specified!\n");
-	$frames = undef;
-}
-
-# Issue a warning if --no-prefix is enabled together with --prefix
-if ($no_prefix && @dir_prefix)
-{
-	warn("WARNING: option --prefix disabled because --no-prefix was ".
-	     "specified!\n");
-	@dir_prefix = undef;
-}
-
-@fileview_sortlist = ($SORT_FILE);
-@funcview_sortlist = ($SORT_FILE);
-
-if ($sort) {
-	push(@fileview_sortlist, $SORT_LINE);
-	push(@fileview_sortlist, $SORT_FUNC) if ($func_coverage);
-	push(@fileview_sortlist, $SORT_BRANCH) if ($br_coverage);
-	push(@funcview_sortlist, $SORT_LINE);
-}
-
-if ($frames)
-{
-	# Include genpng code needed for overview image generation
-	do("$tool_dir/genpng");
-}
-
-# Ensure that the c++filt tool is available when using --demangle-cpp
-if ($demangle_cpp)
-{
-	if (system_no_output(3, "c++filt", "--version")) {
-		die("ERROR: could not find c++filt tool needed for ".
-		    "--demangle-cpp\n");
-	}
-}
-
-# Make sure precision is within valid range
-if ($default_precision < 1 || $default_precision > 4)
-{
-	die("ERROR: specified precision is out of range (1 to 4)\n");
-}
-
-
-# Make sure output_directory exists, create it if necessary
-if ($output_directory)
-{
-	stat($output_directory);
-
-	if (! -e _)
-	{
-		create_sub_dir($output_directory);
-	}
-}
-
-# Do something
-gen_html();
-
-exit(0);
-
-
-
-#
-# print_usage(handle)
-#
-# Print usage information.
-#
-
-sub print_usage(*)
-{
-	local *HANDLE = $_[0];
-
-	print(HANDLE <<END_OF_USAGE);
-Usage: $tool_name [OPTIONS] INFOFILE(S)
-
-Create HTML output for coverage data found in INFOFILE. Note that INFOFILE
-may also be a list of filenames.
-
-Misc:
-  -h, --help                        Print this help, then exit
-  -v, --version                     Print version number, then exit
-  -q, --quiet                       Do not print progress messages
-      --config-file FILENAME        Specify configuration file location
-      --rc SETTING=VALUE            Override configuration file setting
-      --ignore-errors ERRORS        Continue after ERRORS (source)
-
-Operation:
-  -o, --output-directory OUTDIR     Write HTML output to OUTDIR
-  -s, --show-details                Generate detailed directory view
-  -d, --description-file DESCFILE   Read test case descriptions from DESCFILE
-  -k, --keep-descriptions           Do not remove unused test descriptions
-  -b, --baseline-file BASEFILE      Use BASEFILE as baseline file
-  -p, --prefix PREFIX               Remove PREFIX from all directory names
-      --no-prefix                   Do not remove prefix from directory names
-      --(no-)function-coverage      Enable (disable) function coverage display
-      --(no-)branch-coverage        Enable (disable) branch coverage display
-
-HTML output:
-  -f, --frames                      Use HTML frames for source code view
-  -t, --title TITLE                 Display TITLE in header of all pages
-  -c, --css-file CSSFILE            Use external style sheet file CSSFILE
-      --no-source                   Do not create source code view
-      --num-spaces NUM              Replace tabs with NUM spaces in source view
-      --highlight                   Highlight lines with converted-only data
-      --legend                      Include color legend in HTML output
-      --html-prolog FILE            Use FILE as HTML prolog for generated pages
-      --html-epilog FILE            Use FILE as HTML epilog for generated pages
-      --html-extension EXT          Use EXT as filename extension for pages
-      --html-gzip                   Use gzip to compress HTML
-      --(no-)sort                   Enable (disable) sorted coverage views
-      --demangle-cpp                Demangle C++ function names
-      --precision NUM               Set precision of coverage rate
-      --missed                      Show miss counts as negative numbers
-
-For more information see: $lcov_url
-END_OF_USAGE
-	;
-}
-
-
-#
-# get_rate(found, hit)
-#
-# Return a relative value for the specified found&hit values
-# which is used for sorting the corresponding entries in a
-# file list.
-#
-
-sub get_rate($$)
-{
-	my ($found, $hit) = @_;
-
-	if ($found == 0) {
-		return 10000;
-	}
-	return int($hit * 1000 / $found) * 10 + 2 - (1 / $found);
-}
-
-
-#
-# get_overall_line(found, hit, name_singular, name_plural)
-#
-# Return a string containing overall information for the specified
-# found/hit data.
-#
-
-sub get_overall_line($$$$)
-{
-	my ($found, $hit, $name_sn, $name_pl) = @_;
-	my $name;
-
-	return "no data found" if (!defined($found) || $found == 0);
-	$name = ($found == 1) ? $name_sn : $name_pl;
-	return rate($hit, $found, "% ($hit of $found $name)");
-}
-
-
-#
-# print_overall_rate(ln_do, ln_found, ln_hit, fn_do, fn_found, fn_hit, br_do
-#                    br_found, br_hit)
-#
-# Print overall coverage rates for the specified coverage types.
-#
-
-sub print_overall_rate($$$$$$$$$)
-{
-	my ($ln_do, $ln_found, $ln_hit, $fn_do, $fn_found, $fn_hit,
-	    $br_do, $br_found, $br_hit) = @_;
-
-	info("Overall coverage rate:\n");
-	info("  lines......: %s\n",
-	     get_overall_line($ln_found, $ln_hit, "line", "lines"))
-		if ($ln_do);
-	info("  functions..: %s\n",
-	     get_overall_line($fn_found, $fn_hit, "function", "functions"))
-		if ($fn_do);
-	info("  branches...: %s\n",
-	     get_overall_line($br_found, $br_hit, "branch", "branches"))
-		if ($br_do);
-}
-
-sub get_fn_list($)
-{
-	my ($info) = @_;
-	my %fns;
-	my @result;
-
-	foreach my $filename (keys(%{$info})) {
-		my $data = $info->{$filename};
-		my $funcdata = $data->{"func"};
-		my $sumfnccount = $data->{"sumfnc"};
-
-		if (defined($funcdata)) {
-			foreach my $func_name (keys(%{$funcdata})) {
-				$fns{$func_name} = 1;
-			}
-		}
-
-		if (defined($sumfnccount)) {
-			foreach my $func_name (keys(%{$sumfnccount})) {
-				$fns{$func_name} = 1;
-			}
-		}
-	}
-
-	@result = keys(%fns);
-
-	return \@result;
-}
-
-#
-# rename_functions(info, conv)
-#
-# Rename all function names in INFO according to CONV: OLD_NAME -> NEW_NAME.
-# In case two functions demangle to the same name, assume that they are
-# different object code implementations for the same source function.
-#
-
-sub rename_functions($$)
-{
-	my ($info, $conv) = @_;
-
-	foreach my $filename (keys(%{$info})) {
-		my $data = $info->{$filename};
-		my $funcdata;
-		my $testfncdata;
-		my $sumfnccount;
-		my %newfuncdata;
-		my %newsumfnccount;
-		my $f_found;
-		my $f_hit;
-
-		# funcdata: function name -> line number
-		$funcdata = $data->{"func"};
-		foreach my $fn (keys(%{$funcdata})) {
-			my $cn = $conv->{$fn};
-
-			# Abort if two functions on different lines map to the
-			# same demangled name.
-			if (defined($newfuncdata{$cn}) &&
-			    $newfuncdata{$cn} != $funcdata->{$fn}) {
-				die("ERROR: Demangled function name $cn ".
-				    "maps to different lines (".
-				    $newfuncdata{$cn}." vs ".
-				    $funcdata->{$fn}.") in $filename\n");
-			}
-			$newfuncdata{$cn} = $funcdata->{$fn};
-		}
-		$data->{"func"} = \%newfuncdata;
-
-		# testfncdata: test name -> testfnccount
-		# testfnccount: function name -> execution count
-		$testfncdata = $data->{"testfnc"};
-		foreach my $tn (keys(%{$testfncdata})) {
-			my $testfnccount = $testfncdata->{$tn};
-			my %newtestfnccount;
-
-			foreach my $fn (keys(%{$testfnccount})) {
-				my $cn = $conv->{$fn};
-
-				# Add counts for different functions that map
-				# to the same name.
-				$newtestfnccount{$cn} +=
-					$testfnccount->{$fn};
-			}
-			$testfncdata->{$tn} = \%newtestfnccount;
-		}
-
-		# sumfnccount: function name -> execution count
-		$sumfnccount = $data->{"sumfnc"};
-		foreach my $fn (keys(%{$sumfnccount})) {
-			my $cn = $conv->{$fn};
-
-			# Add counts for different functions that map
-			# to the same name.
-			$newsumfnccount{$cn} += $sumfnccount->{$fn};
-		}
-		$data->{"sumfnc"} = \%newsumfnccount;
-
-		# Update function found and hit counts since they may have
-		# changed
-		$f_found = 0;
-		$f_hit = 0;
-		foreach my $fn (keys(%newsumfnccount)) {
-			$f_found++;
-			$f_hit++ if ($newsumfnccount{$fn} > 0);
-		}
-		$data->{"f_found"} = $f_found;
-		$data->{"f_hit"} = $f_hit;
-	}
-}
-
-#
-# gen_html()
-#
-# Generate a set of HTML pages from contents of .info file INFO_FILENAME.
-# Files will be written to the current directory. If provided, test case
-# descriptions will be read from .tests file TEST_FILENAME and included
-# in ouput.
-#
-# Die on error.
-#
-
-sub gen_html()
-{
-	local *HTML_HANDLE;
-	my %overview;
-	my %base_data;
-	my $lines_found;
-	my $lines_hit;
-	my $fn_found;
-	my $fn_hit;
-	my $br_found;
-	my $br_hit;
-	my $overall_found = 0;
-	my $overall_hit = 0;
-	my $total_fn_found = 0;
-	my $total_fn_hit = 0;
-	my $total_br_found = 0;
-	my $total_br_hit = 0;
-	my $dir_name;
-	my $link_name;
-	my @dir_list;
-	my %new_info;
-
-	# Read in all specified .info files
-	foreach (@info_filenames)
-	{
-		%new_info = %{read_info_file($_)};
-
-		# Combine %new_info with %info_data
-		%info_data = %{combine_info_files(\%info_data, \%new_info)};
-	}
-
-	info("Found %d entries.\n", scalar(keys(%info_data)));
-
-	# Read and apply baseline data if specified
-	if ($base_filename)
-	{
-		# Read baseline file
-		info("Reading baseline file $base_filename\n");
-		%base_data = %{read_info_file($base_filename)};
-		info("Found %d entries.\n", scalar(keys(%base_data)));
-
-		# Apply baseline
-		info("Subtracting baseline data.\n");
-		%info_data = %{apply_baseline(\%info_data, \%base_data)};
-	}
-
-	@dir_list = get_dir_list(keys(%info_data));
-
-	if ($no_prefix)
-	{
-		# User requested that we leave filenames alone
-		info("User asked not to remove filename prefix\n");
-	}
-	elsif (! @dir_prefix)
-	{
-		# Get prefix common to most directories in list
-		my $prefix = get_prefix(1, keys(%info_data));
-
-		if ($prefix)
-		{
-			info("Found common filename prefix \"$prefix\"\n");
-			$dir_prefix[0] = $prefix;
-
-		}
-		else
-		{
-			info("No common filename prefix found!\n");
-			$no_prefix=1;
-		}
-	}
-	else
-	{
-		my $msg = "Using user-specified filename prefix ";
-		for my $i (0 .. $#dir_prefix)
-		{
-				$dir_prefix[$i] =~ s/\/+$//;
-				$msg .= ", " unless 0 == $i;
-				$msg .= "\"" . $dir_prefix[$i] . "\"";
-		}
-		info($msg . "\n");
-	}
-
-
-	# Read in test description file if specified
-	if ($desc_filename)
-	{
-		info("Reading test description file $desc_filename\n");
-		%test_description = %{read_testfile($desc_filename)};
-
-		# Remove test descriptions which are not referenced
-		# from %info_data if user didn't tell us otherwise
-		if (!$keep_descriptions)
-		{
-			remove_unused_descriptions();
-		}
-	}
-
-	# Change to output directory if specified
-	if ($output_directory)
-	{
-		chdir($output_directory)
-			or die("ERROR: cannot change to directory ".
-			"$output_directory!\n");
-	}
-
-	info("Writing .css and .png files.\n");
-	write_css_file();
-	write_png_files();
-
-	if ($html_gzip)
-	{
-		info("Writing .htaccess file.\n");
-		write_htaccess_file();
-	}
-
-	info("Generating output.\n");
-
-	# Process each subdirectory and collect overview information
-	foreach $dir_name (@dir_list)
-	{
-		($lines_found, $lines_hit, $fn_found, $fn_hit,
-		 $br_found, $br_hit)
-			= process_dir($dir_name);
-
-		# Handle files in root directory gracefully
-		$dir_name = "root" if ($dir_name eq "");
-
-		# Remove prefix if applicable
-		if (!$no_prefix && @dir_prefix)
-		{
-			# Match directory names beginning with one of @dir_prefix
-			$dir_name = apply_prefix($dir_name,@dir_prefix);
-		}
-
-		# Generate name for directory overview HTML page
-		if ($dir_name =~ /^\/(.*)$/)
-		{
-			$link_name = substr($dir_name, 1)."/index.$html_ext";
-		}
-		else
-		{
-			$link_name = $dir_name."/index.$html_ext";
-		}
-
-		$overview{$dir_name} = [$lines_found, $lines_hit, $fn_found,
-					$fn_hit, $br_found, $br_hit, $link_name,
-					get_rate($lines_found, $lines_hit),
-					get_rate($fn_found, $fn_hit),
-					get_rate($br_found, $br_hit)];
-		$overall_found	+= $lines_found;
-		$overall_hit	+= $lines_hit;
-		$total_fn_found	+= $fn_found;
-		$total_fn_hit	+= $fn_hit;
-		$total_br_found	+= $br_found;
-		$total_br_hit	+= $br_hit;
-	}
-
-	# Generate overview page
-	info("Writing directory view page.\n");
-
-	# Create sorted pages
-	foreach (@fileview_sortlist) {
-		write_dir_page($fileview_sortname[$_], ".", "", $test_title,
-			       undef, $overall_found, $overall_hit,
-			       $total_fn_found, $total_fn_hit, $total_br_found,
-			       $total_br_hit, \%overview, {}, {}, {}, 0, $_);
-	}
-
-	# Check if there are any test case descriptions to write out
-	if (%test_description)
-	{
-		info("Writing test case description file.\n");
-		write_description_file( \%test_description,
-					$overall_found, $overall_hit,
-					$total_fn_found, $total_fn_hit,
-					$total_br_found, $total_br_hit);
-	}
-
-	print_overall_rate(1, $overall_found, $overall_hit,
-			   $func_coverage, $total_fn_found, $total_fn_hit,
-			   $br_coverage, $total_br_found, $total_br_hit);
-
-	chdir($cwd);
-}
-
-#
-# html_create(handle, filename)
-#
-
-sub html_create($$)
-{
-	my $handle = $_[0];
-	my $filename = $_[1];
-
-	if ($html_gzip)
-	{
-		open($handle, "|-", "gzip -c >'$filename'")
-			or die("ERROR: cannot open $filename for writing ".
-			       "(gzip)!\n");
-	}
-	else
-	{
-		open($handle, ">", $filename)
-			or die("ERROR: cannot open $filename for writing!\n");
-	}
-}
-
-sub write_dir_page($$$$$$$$$$$$$$$$$)
-{
-	my ($name, $rel_dir, $base_dir, $title, $trunc_dir, $overall_found,
-	    $overall_hit, $total_fn_found, $total_fn_hit, $total_br_found,
-	    $total_br_hit, $overview, $testhash, $testfnchash, $testbrhash,
-	    $view_type, $sort_type) = @_;
-
-	# Generate directory overview page including details
-	html_create(*HTML_HANDLE, "$rel_dir/index$name.$html_ext");
-	if (!defined($trunc_dir)) {
-		$trunc_dir = "";
-	}
-	$title .= " - " if ($trunc_dir ne "");
-	write_html_prolog(*HTML_HANDLE, $base_dir, "LCOV - $title$trunc_dir");
-	write_header(*HTML_HANDLE, $view_type, $trunc_dir, $rel_dir,
-		     $overall_found, $overall_hit, $total_fn_found,
-		     $total_fn_hit, $total_br_found, $total_br_hit, $sort_type);
-	write_file_table(*HTML_HANDLE, $base_dir, $overview, $testhash,
-			 $testfnchash, $testbrhash, $view_type, $sort_type);
-	write_html_epilog(*HTML_HANDLE, $base_dir);
-	close(*HTML_HANDLE);
-}
-
-
-#
-# process_dir(dir_name)
-#
-
-sub process_dir($)
-{
-	my $abs_dir = $_[0];
-	my $trunc_dir;
-	my $rel_dir = $abs_dir;
-	my $base_dir;
-	my $filename;
-	my %overview;
-	my $lines_found;
-	my $lines_hit;
-	my $fn_found;
-	my $fn_hit;
-	my $br_found;
-	my $br_hit;
-	my $overall_found=0;
-	my $overall_hit=0;
-	my $total_fn_found=0;
-	my $total_fn_hit=0;
-	my $total_br_found = 0;
-	my $total_br_hit = 0;
-	my $base_name;
-	my $extension;
-	my $testdata;
-	my %testhash;
-	my $testfncdata;
-	my %testfnchash;
-	my $testbrdata;
-	my %testbrhash;
-	my @sort_list;
-	local *HTML_HANDLE;
-
-	# Remove prefix if applicable
-	if (!$no_prefix)
-	{
-		# Match directory name beginning with one of @dir_prefix
-		$rel_dir = apply_prefix($rel_dir,@dir_prefix);
-	}
-
-	$trunc_dir = $rel_dir;
-
-	# Remove leading /
-	if ($rel_dir =~ /^\/(.*)$/)
-	{
-		$rel_dir = substr($rel_dir, 1);
-	}
-
-	# Handle files in root directory gracefully
-	$rel_dir = "root" if ($rel_dir eq "");
-	$trunc_dir = "root" if ($trunc_dir eq "");
-
-	$base_dir = get_relative_base_path($rel_dir);
-
-	create_sub_dir($rel_dir);
-
-	# Match filenames which specify files in this directory, not including
-	# sub-directories
-	foreach $filename (grep(/^\Q$abs_dir\E\/[^\/]*$/,keys(%info_data)))
-	{
-		my $page_link;
-		my $func_link;
-
-		($lines_found, $lines_hit, $fn_found, $fn_hit, $br_found,
-		 $br_hit, $testdata, $testfncdata, $testbrdata) =
-			process_file($trunc_dir, $rel_dir, $filename);
-
-		$base_name = basename($filename);
-
-		if ($no_sourceview) {
-			$page_link = "";
-		} elsif ($frames) {
-			# Link to frameset page
-			$page_link = "$base_name.gcov.frameset.$html_ext";
-		} else {
-			# Link directory to source code view page
-			$page_link = "$base_name.gcov.$html_ext";
-		}
-		$overview{$base_name} = [$lines_found, $lines_hit, $fn_found,
-					 $fn_hit, $br_found, $br_hit,
-					 $page_link,
-					 get_rate($lines_found, $lines_hit),
-					 get_rate($fn_found, $fn_hit),
-					 get_rate($br_found, $br_hit)];
-
-		$testhash{$base_name} = $testdata;
-		$testfnchash{$base_name} = $testfncdata;
-		$testbrhash{$base_name} = $testbrdata;
-
-		$overall_found	+= $lines_found;
-		$overall_hit	+= $lines_hit;
-
-		$total_fn_found += $fn_found;
-		$total_fn_hit   += $fn_hit;
-
-		$total_br_found += $br_found;
-		$total_br_hit   += $br_hit;
-	}
-
-	# Create sorted pages
-	foreach (@fileview_sortlist) {
-		# Generate directory overview page (without details)	
-		write_dir_page($fileview_sortname[$_], $rel_dir, $base_dir,
-			       $test_title, $trunc_dir, $overall_found,
-			       $overall_hit, $total_fn_found, $total_fn_hit,
-			       $total_br_found, $total_br_hit, \%overview, {},
-			       {}, {}, 1, $_);
-		if (!$show_details) {
-			next;
-		}
-		# Generate directory overview page including details
-		write_dir_page("-detail".$fileview_sortname[$_], $rel_dir,
-			       $base_dir, $test_title, $trunc_dir,
-			       $overall_found, $overall_hit, $total_fn_found,
-			       $total_fn_hit, $total_br_found, $total_br_hit,
-			       \%overview, \%testhash, \%testfnchash,
-			       \%testbrhash, 1, $_);
-	}
-
-	# Calculate resulting line counts
-	return ($overall_found, $overall_hit, $total_fn_found, $total_fn_hit,
-		$total_br_found, $total_br_hit);
-}
-
-
-#
-# get_converted_lines(testdata)
-#
-# Return hash of line numbers of those lines which were only covered in
-# converted data sets.
-#
-
-sub get_converted_lines($)
-{
-	my $testdata = $_[0];
-	my $testcount;
-	my %converted;
-	my %nonconverted;
-	my $hash;
-	my $testcase;
-	my $line;
-	my %result;
-
-
-	# Get a hash containing line numbers with positive counts both for
-	# converted and original data sets
-	foreach $testcase (keys(%{$testdata}))
-	{
-		# Check to see if this is a converted data set
-		if ($testcase =~ /,diff$/)
-		{
-			$hash = \%converted;
-		}
-		else
-		{
-			$hash = \%nonconverted;
-		}
-
-		$testcount = $testdata->{$testcase};
-		# Add lines with a positive count to hash
-		foreach $line (keys%{$testcount})
-		{
-			if ($testcount->{$line} > 0)
-			{
-				$hash->{$line} = 1;
-			}
-		}
-	}
-
-	# Combine both hashes to resulting list
-	foreach $line (keys(%converted))
-	{
-		if (!defined($nonconverted{$line}))
-		{
-			$result{$line} = 1;
-		}
-	}
-
-	return \%result;
-}
-
-
-sub write_function_page($$$$$$$$$$$$$$$$$$)
-{
-	my ($base_dir, $rel_dir, $trunc_dir, $base_name, $title,
-	    $lines_found, $lines_hit, $fn_found, $fn_hit, $br_found, $br_hit,
-	    $sumcount, $funcdata, $sumfnccount, $testfncdata, $sumbrcount,
-	    $testbrdata, $sort_type) = @_;
-	my $pagetitle;
-	my $filename;
-
-	# Generate function table for this file
-	if ($sort_type == 0) {
-		$filename = "$rel_dir/$base_name.func.$html_ext";
-	} else {
-		$filename = "$rel_dir/$base_name.func-sort-c.$html_ext";
-	}
-	html_create(*HTML_HANDLE, $filename);
-	$pagetitle = "LCOV - $title - $trunc_dir/$base_name - functions";
-	write_html_prolog(*HTML_HANDLE, $base_dir, $pagetitle);
-	write_header(*HTML_HANDLE, 4, "$trunc_dir/$base_name",
-		     "$rel_dir/$base_name", $lines_found, $lines_hit,
-		     $fn_found, $fn_hit, $br_found, $br_hit, $sort_type);
-	write_function_table(*HTML_HANDLE, "$base_name.gcov.$html_ext",
-			     $sumcount, $funcdata,
-			     $sumfnccount, $testfncdata, $sumbrcount,
-			     $testbrdata, $base_name,
-			     $base_dir, $sort_type);
-	write_html_epilog(*HTML_HANDLE, $base_dir, 1);
-	close(*HTML_HANDLE);
-}
-
-
-#
-# process_file(trunc_dir, rel_dir, filename)
-#
-
-sub process_file($$$)
-{
-	info("Processing file ".apply_prefix($_[2], @dir_prefix)."\n");
-
-	my $trunc_dir = $_[0];
-	my $rel_dir = $_[1];
-	my $filename = $_[2];
-	my $base_name = basename($filename);
-	my $base_dir = get_relative_base_path($rel_dir);
-	my $testdata;
-	my $testcount;
-	my $sumcount;
-	my $funcdata;
-	my $checkdata;
-	my $testfncdata;
-	my $sumfnccount;
-	my $testbrdata;
-	my $sumbrcount;
-	my $lines_found;
-	my $lines_hit;
-	my $fn_found;
-	my $fn_hit;
-	my $br_found;
-	my $br_hit;
-	my $converted;
-	my @source;
-	my $pagetitle;
-	local *HTML_HANDLE;
-
-	($testdata, $sumcount, $funcdata, $checkdata, $testfncdata,
-	 $sumfnccount, $testbrdata, $sumbrcount, $lines_found, $lines_hit,
-	 $fn_found, $fn_hit, $br_found, $br_hit)
-		= get_info_entry($info_data{$filename});
-
-	# Return after this point in case user asked us not to generate
-	# source code view
-	if ($no_sourceview)
-	{
-		return ($lines_found, $lines_hit, $fn_found, $fn_hit,
-			$br_found, $br_hit, $testdata, $testfncdata,
-			$testbrdata);
-	}
-
-	$converted = get_converted_lines($testdata);
-	# Generate source code view for this file
-	html_create(*HTML_HANDLE, "$rel_dir/$base_name.gcov.$html_ext");
-	$pagetitle = "LCOV - $test_title - $trunc_dir/$base_name";
-	write_html_prolog(*HTML_HANDLE, $base_dir, $pagetitle);
-	write_header(*HTML_HANDLE, 2, "$trunc_dir/$base_name",
-		     "$rel_dir/$base_name", $lines_found, $lines_hit,
-		     $fn_found, $fn_hit, $br_found, $br_hit, 0);
-	@source = write_source(*HTML_HANDLE, $filename, $sumcount, $checkdata,
-			       $converted, $funcdata, $sumbrcount);
-
-	write_html_epilog(*HTML_HANDLE, $base_dir, 1);
-	close(*HTML_HANDLE);
-
-	if ($func_coverage) {
-		# Create function tables
-		foreach (@funcview_sortlist) {
-			write_function_page($base_dir, $rel_dir, $trunc_dir,
-					    $base_name, $test_title,
-					    $lines_found, $lines_hit,
-					    $fn_found, $fn_hit, $br_found,
-					    $br_hit, $sumcount,
-					    $funcdata, $sumfnccount,
-					    $testfncdata, $sumbrcount,
-					    $testbrdata, $_);
-		}
-	}
-
-	# Additional files are needed in case of frame output
-	if (!$frames)
-	{
-		return ($lines_found, $lines_hit, $fn_found, $fn_hit,
-			$br_found, $br_hit, $testdata, $testfncdata,
-			$testbrdata);
-	}
-
-	# Create overview png file
-	gen_png("$rel_dir/$base_name.gcov.png", $overview_width, $tab_size,
-		@source);
-
-	# Create frameset page
-	html_create(*HTML_HANDLE,
-		    "$rel_dir/$base_name.gcov.frameset.$html_ext");
-	write_frameset(*HTML_HANDLE, $base_dir, $base_name, $pagetitle);
-	close(*HTML_HANDLE);
-
-	# Write overview frame
-	html_create(*HTML_HANDLE,
-		    "$rel_dir/$base_name.gcov.overview.$html_ext");
-	write_overview(*HTML_HANDLE, $base_dir, $base_name, $pagetitle,
-		       scalar(@source));
-	close(*HTML_HANDLE);
-
-	return ($lines_found, $lines_hit, $fn_found, $fn_hit, $br_found,
-		$br_hit, $testdata, $testfncdata, $testbrdata);
-}
-
-
-sub compress_brcount($)
-{
-	my ($brcount) = @_;
-	my $db;
-
-	$db = brcount_to_db($brcount);
-	return db_to_brcount($db, $brcount);
-}
-
-
-#
-# read_info_file(info_filename)
-#
-# Read in the contents of the .info file specified by INFO_FILENAME. Data will
-# be returned as a reference to a hash containing the following mappings:
-#
-# %result: for each filename found in file -> \%data
-#
-# %data: "test"  -> \%testdata
-#        "sum"   -> \%sumcount
-#        "func"  -> \%funcdata
-#        "found" -> $lines_found (number of instrumented lines found in file)
-#	 "hit"   -> $lines_hit (number of executed lines in file)
-#        "f_found" -> $fn_found (number of instrumented functions found in file)
-#	 "f_hit"   -> $fn_hit (number of executed functions in file)
-#        "b_found" -> $br_found (number of instrumented branches found in file)
-#	 "b_hit"   -> $br_hit (number of executed branches in file)
-#        "check" -> \%checkdata
-#        "testfnc" -> \%testfncdata
-#        "sumfnc"  -> \%sumfnccount
-#        "testbr"  -> \%testbrdata
-#        "sumbr"   -> \%sumbrcount
-#
-# %testdata   : name of test affecting this file -> \%testcount
-# %testfncdata: name of test affecting this file -> \%testfnccount
-# %testbrdata:  name of test affecting this file -> \%testbrcount
-#
-# %testcount   : line number   -> execution count for a single test
-# %testfnccount: function name -> execution count for a single test
-# %testbrcount : line number   -> branch coverage data for a single test
-# %sumcount    : line number   -> execution count for all tests
-# %sumfnccount : function name -> execution count for all tests
-# %sumbrcount  : line number   -> branch coverage data for all tests
-# %funcdata    : function name -> line number
-# %checkdata   : line number   -> checksum of source code line
-# $brdata      : vector of items: block, branch, taken
-# 
-# Note that .info file sections referring to the same file and test name
-# will automatically be combined by adding all execution counts.
-#
-# Note that if INFO_FILENAME ends with ".gz", it is assumed that the file
-# is compressed using GZIP. If available, GUNZIP will be used to decompress
-# this file.
-#
-# Die on error.
-#
-
-sub read_info_file($)
-{
-	my $tracefile = $_[0];		# Name of tracefile
-	my %result;			# Resulting hash: file -> data
-	my $data;			# Data handle for current entry
-	my $testdata;			#       "             "
-	my $testcount;			#       "             "
-	my $sumcount;			#       "             "
-	my $funcdata;			#       "             "
-	my $checkdata;			#       "             "
-	my $testfncdata;
-	my $testfnccount;
-	my $sumfnccount;
-	my $testbrdata;
-	my $testbrcount;
-	my $sumbrcount;
-	my $line;			# Current line read from .info file
-	my $testname;			# Current test name
-	my $filename;			# Current filename
-	my $hitcount;			# Count for lines hit
-	my $count;			# Execution count of current line
-	my $negative;			# If set, warn about negative counts
-	my $changed_testname;		# If set, warn about changed testname
-	my $line_checksum;		# Checksum of current line
-	my $notified_about_relative_paths;
-	local *INFO_HANDLE;		# Filehandle for .info file
-
-	info("Reading data file $tracefile\n");
-
-	# Check if file exists and is readable
-	stat($_[0]);
-	if (!(-r _))
-	{
-		die("ERROR: cannot read file $_[0]!\n");
-	}
-
-	# Check if this is really a plain file
-	if (!(-f _))
-	{
-		die("ERROR: not a plain file: $_[0]!\n");
-	}
-
-	# Check for .gz extension
-	if ($_[0] =~ /\.gz$/)
-	{
-		# Check for availability of GZIP tool
-		system_no_output(1, "gunzip" ,"-h")
-			and die("ERROR: gunzip command not available!\n");
-
-		# Check integrity of compressed file
-		system_no_output(1, "gunzip", "-t", $_[0])
-			and die("ERROR: integrity check failed for ".
-				"compressed file $_[0]!\n");
-
-		# Open compressed file
-		open(INFO_HANDLE, "-|", "gunzip -c '$_[0]'")
-			or die("ERROR: cannot start gunzip to decompress ".
-			       "file $_[0]!\n");
-	}
-	else
-	{
-		# Open decompressed file
-		open(INFO_HANDLE, "<", $_[0])
-			or die("ERROR: cannot read file $_[0]!\n");
-	}
-
-	$testname = "";
-	while (<INFO_HANDLE>)
-	{
-		chomp($_);
-		$line = $_;
-
-		# Switch statement
-		foreach ($line)
-		{
-			/^TN:([^,]*)(,diff)?/ && do
-			{
-				# Test name information found
-				$testname = defined($1) ? $1 : "";
-				if ($testname =~ s/\W/_/g)
-				{
-					$changed_testname = 1;
-				}
-				$testname .= $2 if (defined($2));
-				last;
-			};
-
-			/^[SK]F:(.*)/ && do
-			{
-				# Filename information found
-				# Retrieve data for new entry
-				$filename = File::Spec->rel2abs($1, $cwd);
-
-				if (!File::Spec->file_name_is_absolute($1) &&
-				    !$notified_about_relative_paths)
-				{
-					info("Resolved relative source file ".
-					     "path \"$1\" with CWD to ".
-					     "\"$filename\".\n");
-					$notified_about_relative_paths = 1;
-				}
-
-				$data = $result{$filename};
-				($testdata, $sumcount, $funcdata, $checkdata,
-				 $testfncdata, $sumfnccount, $testbrdata,
-				 $sumbrcount) =
-					get_info_entry($data);
-
-				if (defined($testname))
-				{
-					$testcount = $testdata->{$testname};
-					$testfnccount = $testfncdata->{$testname};
-					$testbrcount = $testbrdata->{$testname};
-				}
-				else
-				{
-					$testcount = {};
-					$testfnccount = {};
-					$testbrcount = {};
-				}
-				last;
-			};
-
-			/^DA:(\d+),(-?\d+)(,[^,\s]+)?/ && do
-			{
-				# Fix negative counts
-				$count = $2 < 0 ? 0 : $2;
-				if ($2 < 0)
-				{
-					$negative = 1;
-				}
-				# Execution count found, add to structure
-				# Add summary counts
-				$sumcount->{$1} += $count;
-
-				# Add test-specific counts
-				if (defined($testname))
-				{
-					$testcount->{$1} += $count;
-				}
-
-				# Store line checksum if available
-				if (defined($3))
-				{
-					$line_checksum = substr($3, 1);
-
-					# Does it match a previous definition
-					if (defined($checkdata->{$1}) &&
-					    ($checkdata->{$1} ne
-					     $line_checksum))
-					{
-						die("ERROR: checksum mismatch ".
-						    "at $filename:$1\n");
-					}
-
-					$checkdata->{$1} = $line_checksum;
-				}
-				last;
-			};
-
-			/^FN:(\d+),([^,]+)/ && do
-			{
-				last if (!$func_coverage);
-
-				# Function data found, add to structure
-				$funcdata->{$2} = $1;
-
-				# Also initialize function call data
-				if (!defined($sumfnccount->{$2})) {
-					$sumfnccount->{$2} = 0;
-				}
-				if (defined($testname))
-				{
-					if (!defined($testfnccount->{$2})) {
-						$testfnccount->{$2} = 0;
-					}
-				}
-				last;
-			};
-
-			/^FNDA:(\d+),([^,]+)/ && do
-			{
-				last if (!$func_coverage);
-				# Function call count found, add to structure
-				# Add summary counts
-				$sumfnccount->{$2} += $1;
-
-				# Add test-specific counts
-				if (defined($testname))
-				{
-					$testfnccount->{$2} += $1;
-				}
-				last;
-			};
-
-			/^BRDA:(\d+),(\d+),(\d+),(\d+|-)/ && do {
-				# Branch coverage data found
-				my ($line, $block, $branch, $taken) =
-				   ($1, $2, $3, $4);
-
-				last if (!$br_coverage);
-				$sumbrcount->{$line} .=
-					"$block,$branch,$taken:";
-
-				# Add test-specific counts
-				if (defined($testname)) {
-					$testbrcount->{$line} .=
-						"$block,$branch,$taken:";
-				}
-				last;
-			};
-
-			/^end_of_record/ && do
-			{
-				# Found end of section marker
-				if ($filename)
-				{
-					# Store current section data
-					if (defined($testname))
-					{
-						$testdata->{$testname} =
-							$testcount;
-						$testfncdata->{$testname} =
-							$testfnccount;
-						$testbrdata->{$testname} =
-							$testbrcount;
-					}	
-
-					set_info_entry($data, $testdata,
-						       $sumcount, $funcdata,
-						       $checkdata, $testfncdata,
-						       $sumfnccount,
-						       $testbrdata,
-						       $sumbrcount);
-					$result{$filename} = $data;
-					last;
-				}
-			};
-
-			# default
-			last;
-		}
-	}
-	close(INFO_HANDLE);
-
-	# Calculate lines_found and lines_hit for each file
-	foreach $filename (keys(%result))
-	{
-		$data = $result{$filename};
-
-		($testdata, $sumcount, undef, undef, $testfncdata,
-		 $sumfnccount, $testbrdata, $sumbrcount) =
-			get_info_entry($data);
-
-		# Filter out empty files
-		if (scalar(keys(%{$sumcount})) == 0)
-		{
-			delete($result{$filename});
-			next;
-		}
-		# Filter out empty test cases
-		foreach $testname (keys(%{$testdata}))
-		{
-			if (!defined($testdata->{$testname}) ||
-			    scalar(keys(%{$testdata->{$testname}})) == 0)
-			{
-				delete($testdata->{$testname});
-				delete($testfncdata->{$testname});
-			}
-		}
-
-		$data->{"found"} = scalar(keys(%{$sumcount}));
-		$hitcount = 0;
-
-		foreach (keys(%{$sumcount}))
-		{
-			if ($sumcount->{$_} > 0) { $hitcount++; }
-		}
-
-		$data->{"hit"} = $hitcount;
-
-		# Get found/hit values for function call data
-		$data->{"f_found"} = scalar(keys(%{$sumfnccount}));
-		$hitcount = 0;
-
-		foreach (keys(%{$sumfnccount})) {
-			if ($sumfnccount->{$_} > 0) {
-				$hitcount++;
-			}
-		}
-		$data->{"f_hit"} = $hitcount;
-
-		# Combine branch data for the same branches
-		(undef, $data->{"b_found"}, $data->{"b_hit"}) =
-			compress_brcount($sumbrcount);
-		foreach $testname (keys(%{$testbrdata})) {
-			compress_brcount($testbrdata->{$testname});
-		}
-	}
-
-	if (scalar(keys(%result)) == 0)
-	{
-		die("ERROR: no valid records found in tracefile $tracefile\n");
-	}
-	if ($negative)
-	{
-		warn("WARNING: negative counts found in tracefile ".
-		     "$tracefile\n");
-	}
-	if ($changed_testname)
-	{
-		warn("WARNING: invalid characters removed from testname in ".
-		     "tracefile $tracefile\n");
-	}
-
-	return(\%result);
-}
-
-
-#
-# get_info_entry(hash_ref)
-#
-# Retrieve data from an entry of the structure generated by read_info_file().
-# Return a list of references to hashes:
-# (test data hash ref, sum count hash ref, funcdata hash ref, checkdata hash
-#  ref, testfncdata hash ref, sumfnccount hash ref, lines found, lines hit,
-#  functions found, functions hit)
-#
-
-sub get_info_entry($)
-{
-	my $testdata_ref = $_[0]->{"test"};
-	my $sumcount_ref = $_[0]->{"sum"};
-	my $funcdata_ref = $_[0]->{"func"};
-	my $checkdata_ref = $_[0]->{"check"};
-	my $testfncdata = $_[0]->{"testfnc"};
-	my $sumfnccount = $_[0]->{"sumfnc"};
-	my $testbrdata = $_[0]->{"testbr"};
-	my $sumbrcount = $_[0]->{"sumbr"};
-	my $lines_found = $_[0]->{"found"};
-	my $lines_hit = $_[0]->{"hit"};
-	my $fn_found = $_[0]->{"f_found"};
-	my $fn_hit = $_[0]->{"f_hit"};
-	my $br_found = $_[0]->{"b_found"};
-	my $br_hit = $_[0]->{"b_hit"};
-
-	return ($testdata_ref, $sumcount_ref, $funcdata_ref, $checkdata_ref,
-		$testfncdata, $sumfnccount, $testbrdata, $sumbrcount,
-		$lines_found, $lines_hit, $fn_found, $fn_hit,
-		$br_found, $br_hit);
-}
-
-
-#
-# set_info_entry(hash_ref, testdata_ref, sumcount_ref, funcdata_ref,
-#                checkdata_ref, testfncdata_ref, sumfcncount_ref,
-#                testbrdata_ref, sumbrcount_ref[,lines_found,
-#                lines_hit, f_found, f_hit, $b_found, $b_hit])
-#
-# Update the hash referenced by HASH_REF with the provided data references.
-#
-
-sub set_info_entry($$$$$$$$$;$$$$$$)
-{
-	my $data_ref = $_[0];
-
-	$data_ref->{"test"} = $_[1];
-	$data_ref->{"sum"} = $_[2];
-	$data_ref->{"func"} = $_[3];
-	$data_ref->{"check"} = $_[4];
-	$data_ref->{"testfnc"} = $_[5];
-	$data_ref->{"sumfnc"} = $_[6];
-	$data_ref->{"testbr"} = $_[7];
-	$data_ref->{"sumbr"} = $_[8];
-
-	if (defined($_[9])) { $data_ref->{"found"} = $_[9]; }
-	if (defined($_[10])) { $data_ref->{"hit"} = $_[10]; }
-	if (defined($_[11])) { $data_ref->{"f_found"} = $_[11]; }
-	if (defined($_[12])) { $data_ref->{"f_hit"} = $_[12]; }
-	if (defined($_[13])) { $data_ref->{"b_found"} = $_[13]; }
-	if (defined($_[14])) { $data_ref->{"b_hit"} = $_[14]; }
-}
-
-
-#
-# add_counts(data1_ref, data2_ref)
-#
-# DATA1_REF and DATA2_REF are references to hashes containing a mapping
-#
-#   line number -> execution count
-#
-# Return a list (RESULT_REF, LINES_FOUND, LINES_HIT) where RESULT_REF
-# is a reference to a hash containing the combined mapping in which
-# execution counts are added.
-#
-
-sub add_counts($$)
-{
-	my $data1_ref = $_[0];	# Hash 1
-	my $data2_ref = $_[1];	# Hash 2
-	my %result;		# Resulting hash
-	my $line;		# Current line iteration scalar
-	my $data1_count;	# Count of line in hash1
-	my $data2_count;	# Count of line in hash2
-	my $found = 0;		# Total number of lines found
-	my $hit = 0;		# Number of lines with a count > 0
-
-	foreach $line (keys(%$data1_ref))
-	{
-		$data1_count = $data1_ref->{$line};
-		$data2_count = $data2_ref->{$line};
-
-		# Add counts if present in both hashes
-		if (defined($data2_count)) { $data1_count += $data2_count; }
-
-		# Store sum in %result
-		$result{$line} = $data1_count;
-
-		$found++;
-		if ($data1_count > 0) { $hit++; }
-	}
-
-	# Add lines unique to data2_ref
-	foreach $line (keys(%$data2_ref))
-	{
-		# Skip lines already in data1_ref
-		if (defined($data1_ref->{$line})) { next; }
-
-		# Copy count from data2_ref
-		$result{$line} = $data2_ref->{$line};
-
-		$found++;
-		if ($result{$line} > 0) { $hit++; }
-	}
-
-	return (\%result, $found, $hit);
-}
-
-
-#
-# merge_checksums(ref1, ref2, filename)
-#
-# REF1 and REF2 are references to hashes containing a mapping
-#
-#   line number -> checksum
-#
-# Merge checksum lists defined in REF1 and REF2 and return reference to
-# resulting hash. Die if a checksum for a line is defined in both hashes
-# but does not match.
-#
-
-sub merge_checksums($$$)
-{
-	my $ref1 = $_[0];
-	my $ref2 = $_[1];
-	my $filename = $_[2];
-	my %result;
-	my $line;
-
-	foreach $line (keys(%{$ref1}))
-	{
-		if (defined($ref2->{$line}) &&
-		    ($ref1->{$line} ne $ref2->{$line}))
-		{
-			die("ERROR: checksum mismatch at $filename:$line\n");
-		}
-		$result{$line} = $ref1->{$line};
-	}
-
-	foreach $line (keys(%{$ref2}))
-	{
-		$result{$line} = $ref2->{$line};
-	}
-
-	return \%result;
-}
-
-
-#
-# merge_func_data(funcdata1, funcdata2, filename)
-#
-
-sub merge_func_data($$$)
-{
-	my ($funcdata1, $funcdata2, $filename) = @_;
-	my %result;
-	my $func;
-
-	if (defined($funcdata1)) {
-		%result = %{$funcdata1};
-	}
-
-	foreach $func (keys(%{$funcdata2})) {
-		my $line1 = $result{$func};
-		my $line2 = $funcdata2->{$func};
-
-		if (defined($line1) && ($line1 != $line2)) {
-			warn("WARNING: function data mismatch at ".
-			     "$filename:$line2\n");
-			next;
-		}
-		$result{$func} = $line2;
-	}
-
-	return \%result;
-}
-
-
-#
-# add_fnccount(fnccount1, fnccount2)
-#
-# Add function call count data. Return list (fnccount_added, f_found, f_hit)
-#
-
-sub add_fnccount($$)
-{
-	my ($fnccount1, $fnccount2) = @_;
-	my %result;
-	my $fn_found;
-	my $fn_hit;
-	my $function;
-
-	if (defined($fnccount1)) {
-		%result = %{$fnccount1};
-	}
-	foreach $function (keys(%{$fnccount2})) {
-		$result{$function} += $fnccount2->{$function};
-	}
-	$fn_found = scalar(keys(%result));
-	$fn_hit = 0;
-	foreach $function (keys(%result)) {
-		if ($result{$function} > 0) {
-			$fn_hit++;
-		}
-	}
-
-	return (\%result, $fn_found, $fn_hit);
-}
-
-#
-# add_testfncdata(testfncdata1, testfncdata2)
-#
-# Add function call count data for several tests. Return reference to
-# added_testfncdata.
-#
-
-sub add_testfncdata($$)
-{
-	my ($testfncdata1, $testfncdata2) = @_;
-	my %result;
-	my $testname;
-
-	foreach $testname (keys(%{$testfncdata1})) {
-		if (defined($testfncdata2->{$testname})) {
-			my $fnccount;
-
-			# Function call count data for this testname exists
-			# in both data sets: add
-			($fnccount) = add_fnccount(
-				$testfncdata1->{$testname},
-				$testfncdata2->{$testname});
-			$result{$testname} = $fnccount;
-			next;
-		}
-		# Function call count data for this testname is unique to
-		# data set 1: copy
-		$result{$testname} = $testfncdata1->{$testname};
-	}
-
-	# Add count data for testnames unique to data set 2
-	foreach $testname (keys(%{$testfncdata2})) {
-		if (!defined($result{$testname})) {
-			$result{$testname} = $testfncdata2->{$testname};
-		}
-	}
-	return \%result;
-}
-
-
-#
-# brcount_to_db(brcount)
-#
-# Convert brcount data to the following format:
-#
-# db:          line number    -> block hash
-# block hash:  block number   -> branch hash
-# branch hash: branch number  -> taken value
-#
-
-sub brcount_to_db($)
-{
-	my ($brcount) = @_;
-	my $line;
-	my $db;
-
-	# Add branches to database
-	foreach $line (keys(%{$brcount})) {
-		my $brdata = $brcount->{$line};
-
-		foreach my $entry (split(/:/, $brdata)) {
-			my ($block, $branch, $taken) = split(/,/, $entry);
-			my $old = $db->{$line}->{$block}->{$branch};
-
-			if (!defined($old) || $old eq "-") {
-				$old = $taken;
-			} elsif ($taken ne "-") {
-				$old += $taken;
-			}
-
-			$db->{$line}->{$block}->{$branch} = $old;
-		}
-	}
-
-	return $db;
-}
-
-
-#
-# db_to_brcount(db[, brcount])
-#
-# Convert branch coverage data back to brcount format. If brcount is specified,
-# the converted data is directly inserted in brcount.
-#
-
-sub db_to_brcount($;$)
-{
-	my ($db, $brcount) = @_;
-	my $line;
-	my $br_found = 0;
-	my $br_hit = 0;
-
-	# Convert database back to brcount format
-	foreach $line (sort({$a <=> $b} keys(%{$db}))) {
-		my $ldata = $db->{$line};
-		my $brdata;
-		my $block;
-
-		foreach $block (sort({$a <=> $b} keys(%{$ldata}))) {
-			my $bdata = $ldata->{$block};
-			my $branch;
-
-			foreach $branch (sort({$a <=> $b} keys(%{$bdata}))) {
-				my $taken = $bdata->{$branch};
-
-				$br_found++;
-				$br_hit++ if ($taken ne "-" && $taken > 0);
-				$brdata .= "$block,$branch,$taken:";
-			}
-		}
-		$brcount->{$line} = $brdata;
-	}
-
-	return ($brcount, $br_found, $br_hit);
-}
-
-
-#
-# brcount_db_combine(db1, db2, op)
-#
-# db1 := db1 op db2, where
-#   db1, db2: brcount data as returned by brcount_to_db
-#   op:       one of $BR_ADD and BR_SUB
-#
-sub brcount_db_combine($$$)
-{
-	my ($db1, $db2, $op) = @_;
-
-	foreach my $line (keys(%{$db2})) {
-		my $ldata = $db2->{$line};
-
-		foreach my $block (keys(%{$ldata})) {
-			my $bdata = $ldata->{$block};
-
-			foreach my $branch (keys(%{$bdata})) {
-				my $taken = $bdata->{$branch};
-				my $new = $db1->{$line}->{$block}->{$branch};
-
-				if (!defined($new) || $new eq "-") {
-					$new = $taken;
-				} elsif ($taken ne "-") {
-					if ($op == $BR_ADD) {
-						$new += $taken;
-					} elsif ($op == $BR_SUB) {
-						$new -= $taken;
-						$new = 0 if ($new < 0);
-					}
-				}
-
-				$db1->{$line}->{$block}->{$branch} = $new;
-			}
-		}
-	}
-}
-
-
-#
-# brcount_db_get_found_and_hit(db)
-#
-# Return (br_found, br_hit) for db.
-#
-
-sub brcount_db_get_found_and_hit($)
-{
-	my ($db) = @_;
-	my ($br_found , $br_hit) = (0, 0);
-
-	foreach my $line (keys(%{$db})) {
-		my $ldata = $db->{$line};
-
-		foreach my $block (keys(%{$ldata})) {
-			my $bdata = $ldata->{$block};
-
-			foreach my $branch (keys(%{$bdata})) {
-				my $taken = $bdata->{$branch};
-
-				$br_found++;
-				$br_hit++ if ($taken ne "-" && $taken > 0);
-			}
-		}
-	}
-
-	return ($br_found, $br_hit);
-}
-
-
-# combine_brcount(brcount1, brcount2, type, inplace)
-#
-# If add is BR_ADD, add branch coverage data and return list brcount_added.
-# If add is BR_SUB, subtract the taken values of brcount2 from brcount1 and
-# return brcount_sub. If inplace is set, the result is inserted into brcount1.
-#
-
-sub combine_brcount($$$;$)
-{
-	my ($brcount1, $brcount2, $type, $inplace) = @_;
-	my ($db1, $db2);
-
-	$db1 = brcount_to_db($brcount1);
-	$db2 = brcount_to_db($brcount2);
-	brcount_db_combine($db1, $db2, $type);
-
-	return db_to_brcount($db1, $inplace ? $brcount1 : undef);
-}
-
-
-#
-# add_testbrdata(testbrdata1, testbrdata2)
-#
-# Add branch coverage data for several tests. Return reference to
-# added_testbrdata.
-#
-
-sub add_testbrdata($$)
-{
-	my ($testbrdata1, $testbrdata2) = @_;
-	my %result;
-	my $testname;
-
-	foreach $testname (keys(%{$testbrdata1})) {
-		if (defined($testbrdata2->{$testname})) {
-			my $brcount;
-
-			# Branch coverage data for this testname exists
-			# in both data sets: add
-			($brcount) = combine_brcount($testbrdata1->{$testname},
-					 $testbrdata2->{$testname}, $BR_ADD);
-			$result{$testname} = $brcount;
-			next;
-		}
-		# Branch coverage data for this testname is unique to
-		# data set 1: copy
-		$result{$testname} = $testbrdata1->{$testname};
-	}
-
-	# Add count data for testnames unique to data set 2
-	foreach $testname (keys(%{$testbrdata2})) {
-		if (!defined($result{$testname})) {
-			$result{$testname} = $testbrdata2->{$testname};
-		}
-	}
-	return \%result;
-}
-
-
-#
-# combine_info_entries(entry_ref1, entry_ref2, filename)
-#
-# Combine .info data entry hashes referenced by ENTRY_REF1 and ENTRY_REF2.
-# Return reference to resulting hash.
-#
-
-sub combine_info_entries($$$)
-{
-	my $entry1 = $_[0];	# Reference to hash containing first entry
-	my $testdata1;
-	my $sumcount1;
-	my $funcdata1;
-	my $checkdata1;
-	my $testfncdata1;
-	my $sumfnccount1;
-	my $testbrdata1;
-	my $sumbrcount1;
-
-	my $entry2 = $_[1];	# Reference to hash containing second entry
-	my $testdata2;
-	my $sumcount2;
-	my $funcdata2;
-	my $checkdata2;
-	my $testfncdata2;
-	my $sumfnccount2;
-	my $testbrdata2;
-	my $sumbrcount2;
-
-	my %result;		# Hash containing combined entry
-	my %result_testdata;
-	my $result_sumcount = {};
-	my $result_funcdata;
-	my $result_testfncdata;
-	my $result_sumfnccount;
-	my $result_testbrdata;
-	my $result_sumbrcount;
-	my $lines_found;
-	my $lines_hit;
-	my $fn_found;
-	my $fn_hit;
-	my $br_found;
-	my $br_hit;
-
-	my $testname;
-	my $filename = $_[2];
-
-	# Retrieve data
-	($testdata1, $sumcount1, $funcdata1, $checkdata1, $testfncdata1,
-	 $sumfnccount1, $testbrdata1, $sumbrcount1) = get_info_entry($entry1);
-	($testdata2, $sumcount2, $funcdata2, $checkdata2, $testfncdata2,
-	 $sumfnccount2, $testbrdata2, $sumbrcount2) = get_info_entry($entry2);
-
-	# Merge checksums
-	$checkdata1 = merge_checksums($checkdata1, $checkdata2, $filename);
-
-	# Combine funcdata
-	$result_funcdata = merge_func_data($funcdata1, $funcdata2, $filename);
-
-	# Combine function call count data
-	$result_testfncdata = add_testfncdata($testfncdata1, $testfncdata2);
-	($result_sumfnccount, $fn_found, $fn_hit) =
-		add_fnccount($sumfnccount1, $sumfnccount2);
-	
-	# Combine branch coverage data
-	$result_testbrdata = add_testbrdata($testbrdata1, $testbrdata2);
-	($result_sumbrcount, $br_found, $br_hit) =
-		combine_brcount($sumbrcount1, $sumbrcount2, $BR_ADD);
-
-	# Combine testdata
-	foreach $testname (keys(%{$testdata1}))
-	{
-		if (defined($testdata2->{$testname}))
-		{
-			# testname is present in both entries, requires
-			# combination
-			($result_testdata{$testname}) =
-				add_counts($testdata1->{$testname},
-					   $testdata2->{$testname});
-		}
-		else
-		{
-			# testname only present in entry1, add to result
-			$result_testdata{$testname} = $testdata1->{$testname};
-		}
-
-		# update sum count hash
-		($result_sumcount, $lines_found, $lines_hit) =
-			add_counts($result_sumcount,
-				   $result_testdata{$testname});
-	}
-
-	foreach $testname (keys(%{$testdata2}))
-	{
-		# Skip testnames already covered by previous iteration
-		if (defined($testdata1->{$testname})) { next; }
-
-		# testname only present in entry2, add to result hash
-		$result_testdata{$testname} = $testdata2->{$testname};
-
-		# update sum count hash
-		($result_sumcount, $lines_found, $lines_hit) =
-			add_counts($result_sumcount,
-				   $result_testdata{$testname});
-	}
-	
-	# Calculate resulting sumcount
-
-	# Store result
-	set_info_entry(\%result, \%result_testdata, $result_sumcount,
-		       $result_funcdata, $checkdata1, $result_testfncdata,
-		       $result_sumfnccount, $result_testbrdata,
-		       $result_sumbrcount, $lines_found, $lines_hit,
-		       $fn_found, $fn_hit, $br_found, $br_hit);
-
-	return(\%result);
-}
-
-
-#
-# combine_info_files(info_ref1, info_ref2)
-#
-# Combine .info data in hashes referenced by INFO_REF1 and INFO_REF2. Return
-# reference to resulting hash.
-#
-
-sub combine_info_files($$)
-{
-	my %hash1 = %{$_[0]};
-	my %hash2 = %{$_[1]};
-	my $filename;
-
-	foreach $filename (keys(%hash2))
-	{
-		if ($hash1{$filename})
-		{
-			# Entry already exists in hash1, combine them
-			$hash1{$filename} =
-				combine_info_entries($hash1{$filename},
-						     $hash2{$filename},
-						     $filename);
-		}
-		else
-		{
-			# Entry is unique in both hashes, simply add to
-			# resulting hash
-			$hash1{$filename} = $hash2{$filename};
-		}
-	}
-
-	return(\%hash1);
-}
-
-
-#
-# get_prefix(min_dir, filename_list)
-#
-# Search FILENAME_LIST for a directory prefix which is common to as many
-# list entries as possible, so that removing this prefix will minimize the
-# sum of the lengths of all resulting shortened filenames while observing
-# that no filename has less than MIN_DIR parent directories.
-#
-
-sub get_prefix($@)
-{
-	my ($min_dir, @filename_list) = @_;
-	my %prefix;			# mapping: prefix -> sum of lengths
-	my $current;			# Temporary iteration variable
-
-	# Find list of prefixes
-	foreach (@filename_list)
-	{
-		# Need explicit assignment to get a copy of $_ so that
-		# shortening the contained prefix does not affect the list
-		$current = $_;
-		while ($current = shorten_prefix($current))
-		{
-			$current .= "/";
-
-			# Skip rest if the remaining prefix has already been
-			# added to hash
-			if (exists($prefix{$current})) { last; }
-
-			# Initialize with 0
-			$prefix{$current}="0";
-		}
-
-	}
-
-	# Remove all prefixes that would cause filenames to have less than
-	# the minimum number of parent directories
-	foreach my $filename (@filename_list) {
-		my $dir = dirname($filename);
-
-		for (my $i = 0; $i < $min_dir; $i++) {
-			delete($prefix{$dir."/"});
-			$dir = shorten_prefix($dir);
-		}
-	}
-
-	# Check if any prefix remains
-	return undef if (!%prefix);
-
-	# Calculate sum of lengths for all prefixes
-	foreach $current (keys(%prefix))
-	{
-		foreach (@filename_list)
-		{
-			# Add original length
-			$prefix{$current} += length($_);
-
-			# Check whether prefix matches
-			if (substr($_, 0, length($current)) eq $current)
-			{
-				# Subtract prefix length for this filename
-				$prefix{$current} -= length($current);
-			}
-		}
-	}
-
-	# Find and return prefix with minimal sum
-	$current = (keys(%prefix))[0];
-
-	foreach (keys(%prefix))
-	{
-		if ($prefix{$_} < $prefix{$current})
-		{
-			$current = $_;
-		}
-	}
-
-	$current =~ s/\/$//;
-
-	return($current);
-}
-
-
-#
-# shorten_prefix(prefix)
-#
-# Return PREFIX shortened by last directory component.
-#
-
-sub shorten_prefix($)
-{
-	my @list = split("/", $_[0]);
-
-	pop(@list);
-	return join("/", @list);
-}
-
-
-
-#
-# get_dir_list(filename_list)
-#
-# Return sorted list of directories for each entry in given FILENAME_LIST.
-#
-
-sub get_dir_list(@)
-{
-	my %result;
-
-	foreach (@_)
-	{
-		$result{shorten_prefix($_)} = "";
-	}
-
-	return(sort(keys(%result)));
-}
-
-
-#
-# get_relative_base_path(subdirectory)
-#
-# Return a relative path string which references the base path when applied
-# in SUBDIRECTORY.
-#
-# Example: get_relative_base_path("fs/mm") -> "../../"
-#
-
-sub get_relative_base_path($)
-{
-	my $result = "";
-	my $index;
-
-	# Make an empty directory path a special case
-	if (!$_[0]) { return(""); }
-
-	# Count number of /s in path
-	$index = ($_[0] =~ s/\//\//g);
-
-	# Add a ../ to $result for each / in the directory path + 1
-	for (; $index>=0; $index--)
-	{
-		$result .= "../";
-	}
-
-	return $result;
-}
-
-
-#
-# read_testfile(test_filename)
-#
-# Read in file TEST_FILENAME which contains test descriptions in the format:
-#
-#   TN:<whitespace><test name>
-#   TD:<whitespace><test description>
-#
-# for each test case. Return a reference to a hash containing a mapping
-#
-#   test name -> test description.
-#
-# Die on error.
-#
-
-sub read_testfile($)
-{
-	my %result;
-	my $test_name;
-	my $changed_testname;
-	local *TEST_HANDLE;
-
-	open(TEST_HANDLE, "<", $_[0])
-		or die("ERROR: cannot open $_[0]!\n");
-
-	while (<TEST_HANDLE>)
-	{
-		chomp($_);
-
-		# Match lines beginning with TN:<whitespace(s)>
-		if (/^TN:\s+(.*?)\s*$/)
-		{
-			# Store name for later use
-			$test_name = $1;
-			if ($test_name =~ s/\W/_/g)
-			{
-				$changed_testname = 1;
-			}
-		}
-
-		# Match lines beginning with TD:<whitespace(s)>
-		if (/^TD:\s+(.*?)\s*$/)
-		{
-			if (!defined($test_name)) {
-				die("ERROR: Found test description without prior test name in $_[0]:$.\n");
-			}
-			# Check for empty line
-			if ($1)
-			{
-				# Add description to hash
-				$result{$test_name} .= " $1";
-			}
-			else
-			{
-				# Add empty line
-				$result{$test_name} .= "\n\n";
-			}
-		}
-	}
-
-	close(TEST_HANDLE);
-
-	if ($changed_testname)
-	{
-		warn("WARNING: invalid characters removed from testname in ".
-		     "descriptions file $_[0]\n");
-	}
-
-	return \%result;
-}
-
-
-#
-# escape_html(STRING)
-#
-# Return a copy of STRING in which all occurrences of HTML special characters
-# are escaped.
-#
-
-sub escape_html($)
-{
-	my $string = $_[0];
-
-	if (!$string) { return ""; }
-
-	$string =~ s/&/&amp;/g;		# & -> &amp;
-	$string =~ s/</&lt;/g;		# < -> &lt;
-	$string =~ s/>/&gt;/g;		# > -> &gt;
-	$string =~ s/\"/&quot;/g;	# " -> &quot;
-
-	while ($string =~ /^([^\t]*)(\t)/)
-	{
-		my $replacement = " "x($tab_size - (length($1) % $tab_size));
-		$string =~ s/^([^\t]*)(\t)/$1$replacement/;
-	}
-
-	$string =~ s/\n/<br>/g;		# \n -> <br>
-
-	return $string;
-}
-
-
-#
-# get_date_string()
-#
-# Return the current date in the form: yyyy-mm-dd
-#
-
-sub get_date_string()
-{
-	my $year;
-	my $month;
-	my $day;
-	my $hour;
-	my $min;
-	my $sec;
-	my @timeresult;
-
-	if (defined $ENV{'SOURCE_DATE_EPOCH'})
-	{
-		@timeresult = gmtime($ENV{'SOURCE_DATE_EPOCH'});
-	}
-	else
-	{
-		@timeresult = localtime();
-	}
-	($year, $month, $day, $hour, $min, $sec) =
-		@timeresult[5, 4, 3, 2, 1, 0];
-
-	return sprintf("%d-%02d-%02d %02d:%02d:%02d", $year+1900, $month+1,
-		       $day, $hour, $min, $sec);
-}
-
-
-#
-# create_sub_dir(dir_name)
-#
-# Create subdirectory DIR_NAME if it does not already exist, including all its
-# parent directories.
-#
-# Die on error.
-#
-
-sub create_sub_dir($)
-{
-	my ($dir) = @_;
-
-	system("mkdir", "-p" ,$dir)
-		and die("ERROR: cannot create directory $dir!\n");
-}
-
-
-#
-# write_description_file(descriptions, overall_found, overall_hit,
-#                        total_fn_found, total_fn_hit, total_br_found,
-#                        total_br_hit)
-#
-# Write HTML file containing all test case descriptions. DESCRIPTIONS is a
-# reference to a hash containing a mapping
-#
-#   test case name -> test case description
-#
-# Die on error.
-#
-
-sub write_description_file($$$$$$$)
-{
-	my %description = %{$_[0]};
-	my $found = $_[1];
-	my $hit = $_[2];
-	my $fn_found = $_[3];
-	my $fn_hit = $_[4];
-	my $br_found = $_[5];
-	my $br_hit = $_[6];
-	my $test_name;
-	local *HTML_HANDLE;
-
-	html_create(*HTML_HANDLE,"descriptions.$html_ext");
-	write_html_prolog(*HTML_HANDLE, "", "LCOV - test case descriptions");
-	write_header(*HTML_HANDLE, 3, "", "", $found, $hit, $fn_found,
-		     $fn_hit, $br_found, $br_hit, 0);
-
-	write_test_table_prolog(*HTML_HANDLE,
-			 "Test case descriptions - alphabetical list");
-
-	foreach $test_name (sort(keys(%description)))
-	{
-		my $desc = $description{$test_name};
-
-		$desc = escape_html($desc) if (!$rc_desc_html);
-		write_test_table_entry(*HTML_HANDLE, $test_name, $desc);
-	}
-
-	write_test_table_epilog(*HTML_HANDLE);
-	write_html_epilog(*HTML_HANDLE, "");
-
-	close(*HTML_HANDLE);
-}
-
-
-
-#
-# write_png_files()
-#
-# Create all necessary .png files for the HTML-output in the current
-# directory. .png-files are used as bar graphs.
-#
-# Die on error.
-#
-
-sub write_png_files()
-{
-	my %data;
-	local *PNG_HANDLE;
-
-	$data{"ruby.png"} =
-		[0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 
-		 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 
-		 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 
-		 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 
-		 0x45, 0x07, 0xd2, 0x07, 0x11, 0x0f, 0x18, 0x10, 0x5d, 0x57, 
-		 0x34, 0x6e, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 
-		 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 0xd2, 
-		 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, 
-		 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, 
-		 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x35, 0x2f, 
-		 0x00, 0x00, 0x00, 0xd0, 0x33, 0x9a, 0x9d, 0x00, 0x00, 0x00, 
-		 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x00, 
-		 0x00, 0x00, 0x02, 0x00, 0x01, 0xe5, 0x27, 0xde, 0xfc, 0x00, 
-		 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 
-		 0x82];
-	$data{"amber.png"} =
-		[0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 
-		 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 
-		 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 
-		 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 
-		 0x45, 0x07, 0xd2, 0x07, 0x11, 0x0f, 0x28, 0x04, 0x98, 0xcb, 
-		 0xd6, 0xe0, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 
-		 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 0xd2, 
-		 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, 
-		 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, 
-		 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xe0, 0x50, 
-		 0x00, 0x00, 0x00, 0xa2, 0x7a, 0xda, 0x7e, 0x00, 0x00, 0x00, 
-		 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x00, 
-	  	 0x00, 0x00, 0x02, 0x00, 0x01, 0xe5, 0x27, 0xde, 0xfc, 0x00, 
-		 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 
-		 0x82];
-	$data{"emerald.png"} =
-		[0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 
-		 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 
-		 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 
-		 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 
-		 0x45, 0x07, 0xd2, 0x07, 0x11, 0x0f, 0x22, 0x2b, 0xc9, 0xf5, 
-		 0x03, 0x33, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 
-		 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 0xd2, 
-		 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, 
-		 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, 
-		 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0x1b, 0xea, 0x59, 
-		 0x0a, 0x0a, 0x0a, 0x0f, 0xba, 0x50, 0x83, 0x00, 0x00, 0x00, 
-		 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x00, 
-		 0x00, 0x00, 0x02, 0x00, 0x01, 0xe5, 0x27, 0xde, 0xfc, 0x00, 
-		 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 
-		 0x82];
-	$data{"snow.png"} =
-		[0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 
-		 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 
-		 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 
-		 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 
-		 0x45, 0x07, 0xd2, 0x07, 0x11, 0x0f, 0x1e, 0x1d, 0x75, 0xbc, 
-		 0xef, 0x55, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 
-		 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 0xd2, 
-		 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, 
-		 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, 
-		 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 
-		 0x00, 0x00, 0x00, 0x55, 0xc2, 0xd3, 0x7e, 0x00, 0x00, 0x00, 
-		 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x00, 
-		 0x00, 0x00, 0x02, 0x00, 0x01, 0xe5, 0x27, 0xde, 0xfc, 0x00, 
-		 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 
-		 0x82];
-	$data{"glass.png"} =
-		[0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 
-		 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 
-		 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 
-		 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, 
-		 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, 
-		 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 
-		 0x00, 0x00, 0x00, 0x55, 0xc2, 0xd3, 0x7e, 0x00, 0x00, 0x00, 
-		 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 
-		 0x00, 0x00, 0x00, 0x01, 0x62, 0x4b, 0x47, 0x44, 0x00, 0x88, 
-		 0x05, 0x1d, 0x48, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 
-		 0x73, 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 
-		 0xd2, 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 
-		 0x4d, 0x45, 0x07, 0xd2, 0x07, 0x13, 0x0f, 0x08, 0x19, 0xc4, 
-		 0x40, 0x56, 0x10, 0x00, 0x00, 0x00, 0x0a, 0x49, 0x44, 0x41, 
-		 0x54, 0x78, 0x9c, 0x63, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 
-		 0x01, 0x48, 0xaf, 0xa4, 0x71, 0x00, 0x00, 0x00, 0x00, 0x49, 
-		 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82];
-	$data{"updown.png"} =
-		[0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 
-		 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0a, 
-		 0x00, 0x00, 0x00, 0x0e, 0x08, 0x06, 0x00, 0x00, 0x00, 0x16, 
-		 0xa3, 0x8d, 0xab, 0x00, 0x00, 0x00, 0x3c, 0x49, 0x44, 0x41, 
-		 0x54, 0x28, 0xcf, 0x63, 0x60, 0x40, 0x03, 0xff, 0xa1, 0x00, 
-		 0x5d, 0x9c, 0x11, 0x5d, 0x11, 0x8a, 0x24, 0x23, 0x23, 0x23, 
-		 0x86, 0x42, 0x6c, 0xa6, 0x20, 0x2b, 0x66, 0xc4, 0xa7, 0x08, 
-		 0x59, 0x31, 0x23, 0x21, 0x45, 0x30, 0xc0, 0xc4, 0x30, 0x60, 
-		 0x80, 0xfa, 0x6e, 0x24, 0x3e, 0x78, 0x48, 0x0a, 0x70, 0x62, 
-		 0xa2, 0x90, 0x81, 0xd8, 0x44, 0x01, 0x00, 0xe9, 0x5c, 0x2f, 
-		 0xf5, 0xe2, 0x9d, 0x0f, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x49, 
-		 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82] if ($sort);
-	foreach (keys(%data))
-	{
-		open(PNG_HANDLE, ">", $_)
-			or die("ERROR: cannot create $_!\n");
-		binmode(PNG_HANDLE);
-		print(PNG_HANDLE map(chr,@{$data{$_}}));
-		close(PNG_HANDLE);
-	}
-}
-
-
-#
-# write_htaccess_file()
-#
-
-sub write_htaccess_file()
-{
-	local *HTACCESS_HANDLE;
-	my $htaccess_data;
-
-	open(*HTACCESS_HANDLE, ">", ".htaccess")
-		or die("ERROR: cannot open .htaccess for writing!\n");
-
-	$htaccess_data = (<<"END_OF_HTACCESS")
-AddEncoding x-gzip .html
-END_OF_HTACCESS
-	;
-
-	print(HTACCESS_HANDLE $htaccess_data);
-	close(*HTACCESS_HANDLE);
-}
-
-
-#
-# write_css_file()
-#
-# Write the cascading style sheet file gcov.css to the current directory.
-# This file defines basic layout attributes of all generated HTML pages.
-#
-
-sub write_css_file()
-{
-	local *CSS_HANDLE;
-
-	# Check for a specified external style sheet file
-	if ($css_filename)
-	{
-		# Simply copy that file
-		system("cp", $css_filename, "gcov.css")
-			and die("ERROR: cannot copy file $css_filename!\n");
-		return;
-	}
-
-	open(CSS_HANDLE, ">", "gcov.css")
-		or die ("ERROR: cannot open gcov.css for writing!\n");
-
-
-	# *************************************************************
-
-	my $css_data = ($_=<<"END_OF_CSS")
-	/* All views: initial background and text color */
-	body
-	{
-	  color: #000000;
-	  background-color: #FFFFFF;
-	}
-	
-	/* All views: standard link format*/
-	a:link
-	{
-	  color: #284FA8;
-	  text-decoration: underline;
-	}
-	
-	/* All views: standard link - visited format */
-	a:visited
-	{
-	  color: #00CB40;
-	  text-decoration: underline;
-	}
-	
-	/* All views: standard link - activated format */
-	a:active
-	{
-	  color: #FF0040;
-	  text-decoration: underline;
-	}
-	
-	/* All views: main title format */
-	td.title
-	{
-	  text-align: center;
-	  padding-bottom: 10px;
-	  font-family: sans-serif;
-	  font-size: 20pt;
-	  font-style: italic;
-	  font-weight: bold;
-	}
-	
-	/* All views: header item format */
-	td.headerItem
-	{
-	  text-align: right;
-	  padding-right: 6px;
-	  font-family: sans-serif;
-	  font-weight: bold;
-	  vertical-align: top;
-	  white-space: nowrap;
-	}
-	
-	/* All views: header item value format */
-	td.headerValue
-	{
-	  text-align: left;
-	  color: #284FA8;
-	  font-family: sans-serif;
-	  font-weight: bold;
-	  white-space: nowrap;
-	}
-
-	/* All views: header item coverage table heading */
-	td.headerCovTableHead
-	{
-	  text-align: center;
-	  padding-right: 6px;
-	  padding-left: 6px;
-	  padding-bottom: 0px;
-	  font-family: sans-serif;
-	  font-size: 80%;
-	  white-space: nowrap;
-	}
-	
-	/* All views: header item coverage table entry */
-	td.headerCovTableEntry
-	{
-	  text-align: right;
-	  color: #284FA8;
-	  font-family: sans-serif;
-	  font-weight: bold;
-	  white-space: nowrap;
-	  padding-left: 12px;
-	  padding-right: 4px;
-	  background-color: #DAE7FE;
-	}
-	
-	/* All views: header item coverage table entry for high coverage rate */
-	td.headerCovTableEntryHi
-	{
-	  text-align: right;
-	  color: #000000;
-	  font-family: sans-serif;
-	  font-weight: bold;
-	  white-space: nowrap;
-	  padding-left: 12px;
-	  padding-right: 4px;
-	  background-color: #A7FC9D;
-	}
-	
-	/* All views: header item coverage table entry for medium coverage rate */
-	td.headerCovTableEntryMed
-	{
-	  text-align: right;
-	  color: #000000;
-	  font-family: sans-serif;
-	  font-weight: bold;
-	  white-space: nowrap;
-	  padding-left: 12px;
-	  padding-right: 4px;
-	  background-color: #FFEA20;
-	}
-	
-	/* All views: header item coverage table entry for ow coverage rate */
-	td.headerCovTableEntryLo
-	{
-	  text-align: right;
-	  color: #000000;
-	  font-family: sans-serif;
-	  font-weight: bold;
-	  white-space: nowrap;
-	  padding-left: 12px;
-	  padding-right: 4px;
-	  background-color: #FF0000;
-	}
-	
-	/* All views: header legend value for legend entry */
-	td.headerValueLeg
-	{
-	  text-align: left;
-	  color: #000000;
-	  font-family: sans-serif;
-	  font-size: 80%;
-	  white-space: nowrap;
-	  padding-top: 4px;
-	}
-	
-	/* All views: color of horizontal ruler */
-	td.ruler
-	{
-	  background-color: #6688D4;
-	}
-	
-	/* All views: version string format */
-	td.versionInfo
-	{
-	  text-align: center;
-	  padding-top: 2px;
-	  font-family: sans-serif;
-	  font-style: italic;
-	}
-	
-	/* Directory view/File view (all)/Test case descriptions:
-	   table headline format */
-	td.tableHead
-	{
-	  text-align: center;
-	  color: #FFFFFF;
-	  background-color: #6688D4;
-	  font-family: sans-serif;
-	  font-size: 120%;
-	  font-weight: bold;
-	  white-space: nowrap;
-	  padding-left: 4px;
-	  padding-right: 4px;
-	}
-
-	span.tableHeadSort
-	{
-	  padding-right: 4px;
-	}
-	
-	/* Directory view/File view (all): filename entry format */
-	td.coverFile
-	{
-	  text-align: left;
-	  padding-left: 10px;
-	  padding-right: 20px; 
-	  color: #284FA8;
-	  background-color: #DAE7FE;
-	  font-family: monospace;
-	}
-	
-	/* Directory view/File view (all): bar-graph entry format*/
-	td.coverBar
-	{
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #DAE7FE;
-	}
-	
-	/* Directory view/File view (all): bar-graph outline color */
-	td.coverBarOutline
-	{
-	  background-color: #000000;
-	}
-	
-	/* Directory view/File view (all): percentage entry for files with
-	   high coverage rate */
-	td.coverPerHi
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #A7FC9D;
-	  font-weight: bold;
-	  font-family: sans-serif;
-	}
-	
-	/* Directory view/File view (all): line count entry for files with
-	   high coverage rate */
-	td.coverNumHi
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #A7FC9D;
-	  white-space: nowrap;
-	  font-family: sans-serif;
-	}
-	
-	/* Directory view/File view (all): percentage entry for files with
-	   medium coverage rate */
-	td.coverPerMed
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #FFEA20;
-	  font-weight: bold;
-	  font-family: sans-serif;
-	}
-	
-	/* Directory view/File view (all): line count entry for files with
-	   medium coverage rate */
-	td.coverNumMed
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #FFEA20;
-	  white-space: nowrap;
-	  font-family: sans-serif;
-	}
-	
-	/* Directory view/File view (all): percentage entry for files with
-	   low coverage rate */
-	td.coverPerLo
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #FF0000;
-	  font-weight: bold;
-	  font-family: sans-serif;
-	}
-	
-	/* Directory view/File view (all): line count entry for files with
-	   low coverage rate */
-	td.coverNumLo
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #FF0000;
-	  white-space: nowrap;
-	  font-family: sans-serif;
-	}
-	
-	/* File view (all): "show/hide details" link format */
-	a.detail:link
-	{
-	  color: #B8D0FF;
-	  font-size:80%;
-	}
-	
-	/* File view (all): "show/hide details" link - visited format */
-	a.detail:visited
-	{
-	  color: #B8D0FF;
-	  font-size:80%;
-	}
-	
-	/* File view (all): "show/hide details" link - activated format */
-	a.detail:active
-	{
-	  color: #FFFFFF;
-	  font-size:80%;
-	}
-	
-	/* File view (detail): test name entry */
-	td.testName
-	{
-	  text-align: right;
-	  padding-right: 10px;
-	  background-color: #DAE7FE;
-	  font-family: sans-serif;
-	}
-	
-	/* File view (detail): test percentage entry */
-	td.testPer
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px; 
-	  background-color: #DAE7FE;
-	  font-family: sans-serif;
-	}
-	
-	/* File view (detail): test lines count entry */
-	td.testNum
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px; 
-	  background-color: #DAE7FE;
-	  font-family: sans-serif;
-	}
-	
-	/* Test case descriptions: test name format*/
-	dt
-	{
-	  font-family: sans-serif;
-	  font-weight: bold;
-	}
-	
-	/* Test case descriptions: description table body */
-	td.testDescription
-	{
-	  padding-top: 10px;
-	  padding-left: 30px;
-	  padding-bottom: 10px;
-	  padding-right: 30px;
-	  background-color: #DAE7FE;
-	}
-	
-	/* Source code view: function entry */
-	td.coverFn
-	{
-	  text-align: left;
-	  padding-left: 10px;
-	  padding-right: 20px; 
-	  color: #284FA8;
-	  background-color: #DAE7FE;
-	  font-family: monospace;
-	}
-
-	/* Source code view: function entry zero count*/
-	td.coverFnLo
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #FF0000;
-	  font-weight: bold;
-	  font-family: sans-serif;
-	}
-
-	/* Source code view: function entry nonzero count*/
-	td.coverFnHi
-	{
-	  text-align: right;
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  background-color: #DAE7FE;
-	  font-weight: bold;
-	  font-family: sans-serif;
-	}
-
-	/* Source code view: source code format */
-	pre.source
-	{
-	  font-family: monospace;
-	  white-space: pre;
-	  margin-top: 2px;
-	}
-	
-	/* Source code view: line number format */
-	span.lineNum
-	{
-	  background-color: #EFE383;
-	}
-	
-	/* Source code view: format for lines which were executed */
-	td.lineCov,
-	span.lineCov
-	{
-	  background-color: #CAD7FE;
-	}
-	
-	/* Source code view: format for Cov legend */
-	span.coverLegendCov
-	{
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  padding-bottom: 2px;
-	  background-color: #CAD7FE;
-	}
-	
-	/* Source code view: format for lines which were not executed */
-	td.lineNoCov,
-	span.lineNoCov
-	{
-	  background-color: #FF6230;
-	}
-	
-	/* Source code view: format for NoCov legend */
-	span.coverLegendNoCov
-	{
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  padding-bottom: 2px;
-	  background-color: #FF6230;
-	}
-	
-	/* Source code view (function table): standard link - visited format */
-	td.lineNoCov > a:visited,
-	td.lineCov > a:visited
-	{  
-	  color: black;
-	  text-decoration: underline;
-	}  
-	
-	/* Source code view: format for lines which were executed only in a
-	   previous version */
-	span.lineDiffCov
-	{
-	  background-color: #B5F7AF;
-	}
-	
-	/* Source code view: format for branches which were executed
-	 * and taken */
-	span.branchCov
-	{
-	  background-color: #CAD7FE;
-	}
-
-	/* Source code view: format for branches which were executed
-	 * but not taken */
-	span.branchNoCov
-	{
-	  background-color: #FF6230;
-	}
-
-	/* Source code view: format for branches which were not executed */
-	span.branchNoExec
-	{
-	  background-color: #FF6230;
-	}
-
-	/* Source code view: format for the source code heading line */
-	pre.sourceHeading
-	{
-	  white-space: pre;
-	  font-family: monospace;
-	  font-weight: bold;
-	  margin: 0px;
-	}
-
-	/* All views: header legend value for low rate */
-	td.headerValueLegL
-	{
-	  font-family: sans-serif;
-	  text-align: center;
-	  white-space: nowrap;
-	  padding-left: 4px;
-	  padding-right: 2px;
-	  background-color: #FF0000;
-	  font-size: 80%;
-	}
-
-	/* All views: header legend value for med rate */
-	td.headerValueLegM
-	{
-	  font-family: sans-serif;
-	  text-align: center;
-	  white-space: nowrap;
-	  padding-left: 2px;
-	  padding-right: 2px;
-	  background-color: #FFEA20;
-	  font-size: 80%;
-	}
-
-	/* All views: header legend value for hi rate */
-	td.headerValueLegH
-	{
-	  font-family: sans-serif;
-	  text-align: center;
-	  white-space: nowrap;
-	  padding-left: 2px;
-	  padding-right: 4px;
-	  background-color: #A7FC9D;
-	  font-size: 80%;
-	}
-
-	/* All views except source code view: legend format for low coverage */
-	span.coverLegendCovLo
-	{
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  padding-top: 2px;
-	  background-color: #FF0000;
-	}
-
-	/* All views except source code view: legend format for med coverage */
-	span.coverLegendCovMed
-	{
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  padding-top: 2px;
-	  background-color: #FFEA20;
-	}
-
-	/* All views except source code view: legend format for hi coverage */
-	span.coverLegendCovHi
-	{
-	  padding-left: 10px;
-	  padding-right: 10px;
-	  padding-top: 2px;
-	  background-color: #A7FC9D;
-	}
-END_OF_CSS
-	;
-
-	# *************************************************************
-
-
-	# Remove leading tab from all lines
-	$css_data =~ s/^\t//gm;
-
-	print(CSS_HANDLE $css_data);
-
-	close(CSS_HANDLE);
-}
-
-
-#
-# get_bar_graph_code(base_dir, cover_found, cover_hit)
-#
-# Return a string containing HTML code which implements a bar graph display
-# for a coverage rate of cover_hit * 100 / cover_found.
-#
-
-sub get_bar_graph_code($$$)
-{
-	my ($base_dir, $found, $hit) = @_;
-	my $rate;
-	my $alt;
-	my $width;
-	my $remainder;
-	my $png_name;
-	my $graph_code;
-
-	# Check number of instrumented lines
-	if ($_[1] == 0) { return ""; }
-
-	$alt		= rate($hit, $found, "%");
-	$width		= rate($hit, $found, undef, 0);
-	$remainder	= 100 - $width;
-
-	# Decide which .png file to use
-	$png_name = $rate_png[classify_rate($found, $hit, $med_limit,
-					    $hi_limit)];
-
-	if ($width == 0)
-	{
-		# Zero coverage
-		$graph_code = (<<END_OF_HTML)
-	        <table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="$_[0]snow.png" width=100 height=10 alt="$alt"></td></tr></table>
-END_OF_HTML
-		;
-	}
-	elsif ($width == 100)
-	{
-		# Full coverage
-		$graph_code = (<<END_OF_HTML)
-		<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="$_[0]$png_name" width=100 height=10 alt="$alt"></td></tr></table>
-END_OF_HTML
-		;
-	}
-	else
-	{
-		# Positive coverage
-		$graph_code = (<<END_OF_HTML)
-		<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="$_[0]$png_name" width=$width height=10 alt="$alt"><img src="$_[0]snow.png" width=$remainder height=10 alt="$alt"></td></tr></table>
-END_OF_HTML
-		;
-	}
-
-	# Remove leading tabs from all lines
-	$graph_code =~ s/^\t+//gm;
-	chomp($graph_code);
-
-	return($graph_code);
-}
-
-#
-# sub classify_rate(found, hit, med_limit, high_limit)
-#
-# Return 0 for low rate, 1 for medium rate and 2 for hi rate.
-#
-
-sub classify_rate($$$$)
-{
-	my ($found, $hit, $med, $hi) = @_;
-	my $rate;
-
-	if ($found == 0) {
-		return 2;
-	}
-	$rate = rate($hit, $found);
-	if ($rate < $med) {
-		return 0;
-	} elsif ($rate < $hi) {
-		return 1;
-	}
-	return 2;
-}
-
-
-#
-# write_html(filehandle, html_code)
-#
-# Write out HTML_CODE to FILEHANDLE while removing a leading tabulator mark
-# in each line of HTML_CODE.
-#
-
-sub write_html(*$)
-{
-	local *HTML_HANDLE = $_[0];
-	my $html_code = $_[1];
-
-	# Remove leading tab from all lines
-	$html_code =~ s/^\t//gm;
-
-	print(HTML_HANDLE $html_code)
-		or die("ERROR: cannot write HTML data ($!)\n");
-}
-
-
-#
-# write_html_prolog(filehandle, base_dir, pagetitle)
-#
-# Write an HTML prolog common to all HTML files to FILEHANDLE. PAGETITLE will
-# be used as HTML page title. BASE_DIR contains a relative path which points
-# to the base directory.
-#
-
-sub write_html_prolog(*$$)
-{
-	my $basedir = $_[1];
-	my $pagetitle = $_[2];
-	my $prolog;
-
-	$prolog = $html_prolog;
-	$prolog =~ s/\@pagetitle\@/$pagetitle/g;
-	$prolog =~ s/\@basedir\@/$basedir/g;
-
-	write_html($_[0], $prolog);
-}
-
-
-#
-# write_header_prolog(filehandle, base_dir)
-#
-# Write beginning of page header HTML code.
-#
-
-sub write_header_prolog(*$)
-{
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	  <table width="100%" border=0 cellspacing=0 cellpadding=0>
-	    <tr><td class="title">$title</td></tr>
-	    <tr><td class="ruler"><img src="$_[1]glass.png" width=3 height=3 alt=""></td></tr>
-
-	    <tr>
-	      <td width="100%">
-	        <table cellpadding=1 border=0 width="100%">
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# write_header_line(handle, content)
-#
-# Write a header line with the specified table contents.
-#
-
-sub write_header_line(*@)
-{
-	my ($handle, @content) = @_;
-	my $entry;
-
-	write_html($handle, "          <tr>\n");
-	foreach $entry (@content) {
-		my ($width, $class, $text, $colspan) = @{$entry};
-
-		if (defined($width)) {
-			$width = " width=\"$width\"";
-		} else {
-			$width = "";
-		}
-		if (defined($class)) {
-			$class = " class=\"$class\"";
-		} else {
-			$class = "";
-		}
-		if (defined($colspan)) {
-			$colspan = " colspan=\"$colspan\"";
-		} else {
-			$colspan = "";
-		}
-		$text = "" if (!defined($text));
-		write_html($handle,
-			   "            <td$width$class$colspan>$text</td>\n");
-	}
-	write_html($handle, "          </tr>\n");
-}
-
-
-#
-# write_header_epilog(filehandle, base_dir)
-#
-# Write end of page header HTML code.
-#
-
-sub write_header_epilog(*$)
-{
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	          <tr><td><img src="$_[1]glass.png" width=3 height=3 alt=""></td></tr>
-	        </table>
-	      </td>
-	    </tr>
-
-	    <tr><td class="ruler"><img src="$_[1]glass.png" width=3 height=3 alt=""></td></tr>
-	  </table>
-
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# write_file_table_prolog(handle, file_heading, ([heading, num_cols], ...))
-#
-# Write heading for file table.
-#
-
-sub write_file_table_prolog(*$@)
-{
-	my ($handle, $file_heading, @columns) = @_;
-	my $num_columns = 0;
-	my $file_width;
-	my $col;
-	my $width;
-
-	$width = 20 if (scalar(@columns) == 1);
-	$width = 10 if (scalar(@columns) == 2);
-	$width = 8 if (scalar(@columns) > 2);
-
-	foreach $col (@columns) {
-		my ($heading, $cols) = @{$col};
-
-		$num_columns += $cols;
-	}
-	$file_width = 100 - $num_columns * $width;
-
-	# Table definition
-	write_html($handle, <<END_OF_HTML);
-	  <center>
-	  <table width="80%" cellpadding=1 cellspacing=1 border=0>
-
-	    <tr>
-	      <td width="$file_width%"><br></td>
-END_OF_HTML
-	# Empty first row
-	foreach $col (@columns) {
-		my ($heading, $cols) = @{$col};
-
-		while ($cols-- > 0) {
-			write_html($handle, <<END_OF_HTML);
-	      <td width="$width%"></td>
-END_OF_HTML
-		}
-	}
-	# Next row
-	write_html($handle, <<END_OF_HTML);
-	    </tr>
-
-	    <tr>
-	      <td class="tableHead">$file_heading</td>
-END_OF_HTML
-	# Heading row
-	foreach $col (@columns) {
-		my ($heading, $cols) = @{$col};
-		my $colspan = "";
-
-		$colspan = " colspan=$cols" if ($cols > 1);
-		write_html($handle, <<END_OF_HTML);
-	      <td class="tableHead"$colspan>$heading</td>
-END_OF_HTML
-	}
-	write_html($handle, <<END_OF_HTML);
-	    </tr>
-END_OF_HTML
-}
-
-
-# write_file_table_entry(handle, base_dir, filename, page_link,
-#			 ([ found, hit, med_limit, hi_limit, graph ], ..)
-#
-# Write an entry of the file table.
-#
-
-sub write_file_table_entry(*$$$@)
-{
-	my ($handle, $base_dir, $filename, $page_link, @entries) = @_;
-	my $file_code;
-	my $entry;
-	my $esc_filename = escape_html($filename);
-
-	# Add link to source if provided
-	if (defined($page_link) && $page_link ne "") {
-		$file_code = "<a href=\"$page_link\">$esc_filename</a>";
-	} else {
-		$file_code = $esc_filename;
-	}
-
-	# First column: filename
-	write_html($handle, <<END_OF_HTML);
-	    <tr>
-	      <td class="coverFile">$file_code</td>
-END_OF_HTML
-	# Columns as defined
-	foreach $entry (@entries) {
-		my ($found, $hit, $med, $hi, $graph) = @{$entry};
-		my $bar_graph;
-		my $class;
-		my $rate;
-
-		# Generate bar graph if requested
-		if ($graph) {
-			$bar_graph = get_bar_graph_code($base_dir, $found,
-							$hit);
-			write_html($handle, <<END_OF_HTML);
-	      <td class="coverBar" align="center">
-	        $bar_graph
-	      </td>
-END_OF_HTML
-		}
-		# Get rate color and text
-		if ($found == 0) {
-			$rate = "-";
-			$class = "Hi";
-		} else {
-			$rate = rate($hit, $found, "&nbsp;%");
-			$class = $rate_name[classify_rate($found, $hit,
-					    $med, $hi)];
-		}
-		if ($opt_missed) {
-			# Show negative number of items without coverage
-			$hit = -($found - $hit);
-		}
-		write_html($handle, <<END_OF_HTML);
-	      <td class="coverPer$class">$rate</td>
-	      <td class="coverNum$class">$hit / $found</td>
-END_OF_HTML
-	}
-	# End of row
-        write_html($handle, <<END_OF_HTML);
-	    </tr>
-END_OF_HTML
-}
-
-
-#
-# write_file_table_detail_entry(filehandle, test_name, ([found, hit], ...))
-#
-# Write entry for detail section in file table.
-#
-
-sub write_file_table_detail_entry(*$@)
-{
-	my ($handle, $test, @entries) = @_;
-	my $entry;
-
-	if ($test eq "") {
-		$test = "<span style=\"font-style:italic\">&lt;unnamed&gt;</span>";
-	} elsif ($test =~ /^(.*),diff$/) {
-		$test = $1." (converted)";
-	}
-	# Testname
-	write_html($handle, <<END_OF_HTML);
-	    <tr>
-	      <td class="testName" colspan=2>$test</td>
-END_OF_HTML
-	# Test data
-	foreach $entry (@entries) {
-		my ($found, $hit) = @{$entry};
-		my $rate = rate($hit, $found, "&nbsp;%");
-
-		write_html($handle, <<END_OF_HTML);
-	      <td class="testPer">$rate</td>
-	      <td class="testNum">$hit&nbsp;/&nbsp;$found</td>
-END_OF_HTML
-	}
-
-        write_html($handle, <<END_OF_HTML);
-	    </tr>
-
-END_OF_HTML
-
-	# *************************************************************
-}
-
-
-#
-# write_file_table_epilog(filehandle)
-#
-# Write end of file table HTML code.
-#
-
-sub write_file_table_epilog(*)
-{
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	  </table>
-	  </center>
-	  <br>
-
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# write_test_table_prolog(filehandle, table_heading)
-#
-# Write heading for test case description table.
-#
-
-sub write_test_table_prolog(*$)
-{
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	  <center>
-	  <table width="80%" cellpadding=2 cellspacing=1 border=0>
-
-	    <tr>
-	      <td><br></td>
-	    </tr>
-
-	    <tr>
-	      <td class="tableHead">$_[1]</td>
-	    </tr>
-
-	    <tr>
-	      <td class="testDescription">
-	        <dl>
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# write_test_table_entry(filehandle, test_name, test_description)
-#
-# Write entry for the test table.
-#
-
-sub write_test_table_entry(*$$)
-{
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-          <dt>$_[1]<a name="$_[1]">&nbsp;</a></dt>
-          <dd>$_[2]<br><br></dd>
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# write_test_table_epilog(filehandle)
-#
-# Write end of test description table HTML code.
-#
-
-sub write_test_table_epilog(*)
-{
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	        </dl>
-	      </td>
-	    </tr>
-	  </table>
-	  </center>
-	  <br>
-
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-sub fmt_centered($$)
-{
-	my ($width, $text) = @_;
-	my $w0 = length($text);
-	my $w1 = $width > $w0 ? int(($width - $w0) / 2) : 0;
-	my $w2 = $width > $w0 ? $width - $w0 - $w1 : 0;
-
-	return (" "x$w1).$text.(" "x$w2);
-}
-
-
-#
-# write_source_prolog(filehandle)
-#
-# Write start of source code table.
-#
-
-sub write_source_prolog(*)
-{
-	my $lineno_heading = "         ";
-	my $branch_heading = "";
-	my $line_heading = fmt_centered($line_field_width, "Line data");
-	my $source_heading = " Source code";
-
-	if ($br_coverage) {
-		$branch_heading = fmt_centered($br_field_width, "Branch data").
-				  " ";
-	}
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	  <table cellpadding=0 cellspacing=0 border=0>
-	    <tr>
-	      <td><br></td>
-	    </tr>
-	    <tr>
-	      <td>
-<pre class="sourceHeading">${lineno_heading}${branch_heading}${line_heading} ${source_heading}</pre>
-<pre class="source">
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-sub cmp_blocks($$)
-{
-	my ($a, $b) = @_;
-	my ($fa, $fb) = ($a->[0], $b->[0]);
-
-	return $fa->[0] <=> $fb->[0] if ($fa->[0] != $fb->[0]);
-	return $fa->[1] <=> $fb->[1];
-}
-
-#
-# get_branch_blocks(brdata)
-#
-# Group branches that belong to the same basic block.
-#
-# Returns: [block1, block2, ...]
-# block:   [branch1, branch2, ...]
-# branch:  [block_num, branch_num, taken_count, text_length, open, close]
-#
-
-sub get_branch_blocks($)
-{
-	my ($brdata) = @_;
-	my $last_block_num;
-	my $block = [];
-	my @blocks;
-
-	return () if (!defined($brdata));
-
-	# Group branches
-	foreach my $entry (split(/:/, $brdata)) {
-		my ($block_num, $branch, $taken) = split(/,/, $entry);
-		my $br;
-
-		if (defined($last_block_num) && $block_num != $last_block_num) {
-			push(@blocks, $block);
-			$block = [];
-		}
-		$br = [$block_num, $branch, $taken, 3, 0, 0];
-		push(@{$block}, $br);
-		$last_block_num = $block_num;
-	}
-	push(@blocks, $block) if (scalar(@{$block}) > 0);
-
-	# Add braces to first and last branch in group
-	foreach $block (@blocks) {
-		$block->[0]->[$BR_OPEN] = 1;
-		$block->[0]->[$BR_LEN]++;
-		$block->[scalar(@{$block}) - 1]->[$BR_CLOSE] = 1;
-		$block->[scalar(@{$block}) - 1]->[$BR_LEN]++;
-	}
-
-	return sort(cmp_blocks @blocks);
-}
-
-#
-# get_block_len(block)
-#
-# Calculate total text length of all branches in a block of branches.
-#
-
-sub get_block_len($)
-{
-	my ($block) = @_;
-	my $len = 0;
-	my $branch;
-
-	foreach $branch (@{$block}) {
-		$len += $branch->[$BR_LEN];
-	}
-
-	return $len;
-}
-
-
-#
-# get_branch_html(brdata)
-#
-# Return a list of HTML lines which represent the specified branch coverage
-# data in source code view.
-#
-
-sub get_branch_html($)
-{
-	my ($brdata) = @_;
-	my @blocks = get_branch_blocks($brdata);
-	my $block;
-	my $branch;
-	my $line_len = 0;
-	my $line = [];	# [branch2|" ", branch|" ", ...]
-	my @lines;	# [line1, line2, ...]
-	my @result;
-
-	# Distribute blocks to lines
-	foreach $block (@blocks) {
-		my $block_len = get_block_len($block);
-
-		# Does this block fit into the current line?
-		if ($line_len + $block_len <= $br_field_width) {
-			# Add it
-			$line_len += $block_len;
-			push(@{$line}, @{$block});
-			next;
-		} elsif ($block_len <= $br_field_width) {
-			# It would fit if the line was empty - add it to new
-			# line
-			push(@lines, $line);
-			$line_len = $block_len;
-			$line = [ @{$block} ];
-			next;
-		}
-		# Split the block into several lines
-		foreach $branch (@{$block}) {
-			if ($line_len + $branch->[$BR_LEN] >= $br_field_width) {
-				# Start a new line
-				if (($line_len + 1 <= $br_field_width) &&
-				    scalar(@{$line}) > 0 &&
-				    !$line->[scalar(@$line) - 1]->[$BR_CLOSE]) {
-					# Try to align branch symbols to be in
-					# one # row
-					push(@{$line}, " ");
-				}
-				push(@lines, $line);
-				$line_len = 0;
-				$line = [];
-			}
-			push(@{$line}, $branch);
-			$line_len += $branch->[$BR_LEN];
-		}
-	}
-	push(@lines, $line);
-
-	# Convert to HTML
-	foreach $line (@lines) {
-		my $current = "";
-		my $current_len = 0;
-
-		foreach $branch (@$line) {
-			# Skip alignment space
-			if ($branch eq " ") {
-				$current .= " ";
-				$current_len++;
-				next;
-			}
-
-			my ($block_num, $br_num, $taken, $len, $open, $close) =
-			   @{$branch};
-			my $class;
-			my $title;
-			my $text;
-
-			if ($taken eq '-') {
-				$class	= "branchNoExec";
-				$text	= " # ";
-				$title	= "Branch $br_num was not executed";
-			} elsif ($taken == 0) {
-				$class	= "branchNoCov";
-				$text	= " - ";
-				$title	= "Branch $br_num was not taken";
-			} else {
-				$class	= "branchCov";
-				$text	= " + ";
-				$title	= "Branch $br_num was taken $taken ".
-					  "time";
-				$title .= "s" if ($taken > 1);
-			}
-			$current .= "[" if ($open);
-			$current .= "<span class=\"$class\" title=\"$title\">";
-			$current .= $text."</span>";
-			$current .= "]" if ($close);
-			$current_len += $len;
-		}
-
-		# Right-align result text
-		if ($current_len < $br_field_width) {
-			$current = (" "x($br_field_width - $current_len)).
-				   $current;
-		}
-		push(@result, $current);
-	}
-
-	return @result;
-}
-
-
-#
-# format_count(count, width)
-#
-# Return a right-aligned representation of count that fits in width characters.
-#
-
-sub format_count($$)
-{
-	my ($count, $width) = @_;
-	my $result;
-	my $exp;
-
-	$result = sprintf("%*.0f", $width, $count);
-	while (length($result) > $width) {
-		last if ($count < 10);
-		$exp++;
-		$count = int($count/10);
-		$result = sprintf("%*s", $width, ">$count*10^$exp");
-	}
-	return $result;
-}
-
-#
-# write_source_line(filehandle, line_num, source, hit_count, converted,
-#                   brdata)
-#
-# Write formatted source code line. Return a line in a format as needed
-# by gen_png()
-#
-
-sub write_source_line(*$$$$$)
-{
-	my ($handle, $line, $source, $count, $converted, $brdata) = @_;
-	my $source_format;
-	my $count_format;
-	my $result;
-	my $anchor_start = "";
-	my $anchor_end = "";
-	my $count_field_width = $line_field_width - 1;
-	my @br_html;
-	my $html;
-
-	# Get branch HTML data for this line
-	@br_html = get_branch_html($brdata) if ($br_coverage);
-
-	if (!defined($count)) {
-		$result		= "";
-		$source_format	= "";
-		$count_format	= " "x$count_field_width;
-	}
-	elsif ($count == 0) {
-		$result		= $count;
-		$source_format	= '<span class="lineNoCov">';
-		$count_format	= format_count($count, $count_field_width);
-	}
-	elsif ($converted && defined($highlight)) {
-		$result		= "*".$count;
-		$source_format	= '<span class="lineDiffCov">';
-		$count_format	= format_count($count, $count_field_width);
-	}
-	else {
-		$result		= $count;
-		$source_format	= '<span class="lineCov">';
-		$count_format	= format_count($count, $count_field_width);
-	}
-	$result .= ":".$source;
-
-	# Write out a line number navigation anchor every $nav_resolution
-	# lines if necessary
-	$anchor_start	= "<a name=\"$_[1]\">";
-	$anchor_end	= "</a>";
-
-
-	# *************************************************************
-
-	$html = $anchor_start;
-	$html .= "<span class=\"lineNum\">".sprintf("%8d", $line)." </span>";
-	$html .= shift(@br_html).":" if ($br_coverage);
-	$html .= "$source_format$count_format : ";
-	$html .= escape_html($source);
-	$html .= "</span>" if ($source_format);
-	$html .= $anchor_end."\n";
-
-	write_html($handle, $html);
-
-	if ($br_coverage) {
-		# Add lines for overlong branch information
-		foreach (@br_html) {
-			write_html($handle, "<span class=\"lineNum\">".
-				   "         </span>$_\n");
-		}
-	}
-	# *************************************************************
-
-	return($result);
-}
-
-
-#
-# write_source_epilog(filehandle)
-#
-# Write end of source code table.
-#
-
-sub write_source_epilog(*)
-{
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	</pre>
-	      </td>
-	    </tr>
-	  </table>
-	  <br>
-
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# write_html_epilog(filehandle, base_dir[, break_frames])
-#
-# Write HTML page footer to FILEHANDLE. BREAK_FRAMES should be set when
-# this page is embedded in a frameset, clicking the URL link will then
-# break this frameset.
-#
-
-sub write_html_epilog(*$;$)
-{
-	my $basedir = $_[1];
-	my $break_code = "";
-	my $epilog;
-
-	if (defined($_[2]))
-	{
-		$break_code = " target=\"_parent\"";
-	}
-
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	  <table width="100%" border=0 cellspacing=0 cellpadding=0>
-	    <tr><td class="ruler"><img src="$_[1]glass.png" width=3 height=3 alt=""></td></tr>
-	    <tr><td class="versionInfo">Generated by: <a href="$lcov_url"$break_code>$lcov_version</a></td></tr>
-	  </table>
-	  <br>
-END_OF_HTML
-	;
-
-	$epilog = $html_epilog;
-	$epilog =~ s/\@basedir\@/$basedir/g;
-
-	write_html($_[0], $epilog);
-}
-
-
-#
-# write_frameset(filehandle, basedir, basename, pagetitle)
-#
-#
-
-sub write_frameset(*$$$)
-{
-	my $frame_width = $overview_width + 40;
-
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
-
-	<html lang="en">
-
-	<head>
-	  <meta http-equiv="Content-Type" content="text/html; charset=$charset">
-	  <title>$_[3]</title>
-	  <link rel="stylesheet" type="text/css" href="$_[1]gcov.css">
-	</head>
-
-	<frameset cols="$frame_width,*">
-	  <frame src="$_[2].gcov.overview.$html_ext" name="overview">
-	  <frame src="$_[2].gcov.$html_ext" name="source">
-	  <noframes>
-	    <center>Frames not supported by your browser!<br></center>
-	  </noframes>
-	</frameset>
-
-	</html>
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# sub write_overview_line(filehandle, basename, line, link)
-#
-#
-
-sub write_overview_line(*$$$)
-{
-	my $y1 = $_[2] - 1;
-	my $y2 = $y1 + $nav_resolution - 1;
-	my $x2 = $overview_width - 1;
-
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	    <area shape="rect" coords="0,$y1,$x2,$y2" href="$_[1].gcov.$html_ext#$_[3]" target="source" alt="overview">
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# write_overview(filehandle, basedir, basename, pagetitle, lines)
-#
-#
-
-sub write_overview(*$$$$)
-{
-	my $index;
-	my $max_line = $_[4] - 1;
-	my $offset;
-
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-	<html lang="en">
-
-	<head>
-	  <title>$_[3]</title>
-	  <meta http-equiv="Content-Type" content="text/html; charset=$charset">
-	  <link rel="stylesheet" type="text/css" href="$_[1]gcov.css">
-	</head>
-
-	<body>
-	  <map name="overview">
-END_OF_HTML
-	;
-
-	# *************************************************************
-
-	# Make $offset the next higher multiple of $nav_resolution
-	$offset = ($nav_offset + $nav_resolution - 1) / $nav_resolution;
-	$offset = sprintf("%d", $offset ) * $nav_resolution;
-
-	# Create image map for overview image
-	for ($index = 1; $index <= $_[4]; $index += $nav_resolution)
-	{
-		# Enforce nav_offset
-		if ($index < $offset + 1)
-		{
-			write_overview_line($_[0], $_[2], $index, 1);
-		}
-		else
-		{
-			write_overview_line($_[0], $_[2], $index, $index - $offset);
-		}
-	}
-
-	# *************************************************************
-
-	write_html($_[0], <<END_OF_HTML)
-	  </map>
-
-	  <center>
-	  <a href="$_[2].gcov.$html_ext#top" target="source">Top</a><br><br>
-	  <img src="$_[2].gcov.png" width=$overview_width height=$max_line alt="Overview" border=0 usemap="#overview">
-	  </center>
-	</body>
-	</html>
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-sub max($$)
-{
-	my ($a, $b) = @_;
-
-	return $a if ($a > $b);
-	return $b;
-}
-
-
-#
-# write_header(filehandle, type, trunc_file_name, rel_file_name, lines_found,
-# lines_hit, funcs_found, funcs_hit, sort_type)
-#
-# Write a complete standard page header. TYPE may be (0, 1, 2, 3, 4)
-# corresponding to (directory view header, file view header, source view
-# header, test case description header, function view header)
-#
-
-sub write_header(*$$$$$$$$$$)
-{
-	local *HTML_HANDLE = $_[0];
-	my $type = $_[1];
-	my $trunc_name = $_[2];
-	my $rel_filename = $_[3];
-	my $lines_found = $_[4];
-	my $lines_hit = $_[5];
-	my $fn_found = $_[6];
-	my $fn_hit = $_[7];
-	my $br_found = $_[8];
-	my $br_hit = $_[9];
-	my $sort_type = $_[10];
-	my $base_dir;
-	my $view;
-	my $test;
-	my $base_name;
-	my $style;
-	my $rate;
-	my @row_left;
-	my @row_right;
-	my $num_rows;
-	my $i;
-	my $esc_trunc_name = escape_html($trunc_name);
-
-	$base_name = basename($rel_filename);
-
-	# Prepare text for "current view" field
-	if ($type == $HDR_DIR)
-	{
-		# Main overview
-		$base_dir = "";
-		$view = $overview_title;
-	}
-	elsif ($type == $HDR_FILE)
-	{
-		# Directory overview
-		$base_dir = get_relative_base_path($rel_filename);
-		$view = "<a href=\"$base_dir"."index.$html_ext\">".
-			"$overview_title</a> - $esc_trunc_name";
-	}
-	elsif ($type == $HDR_SOURCE || $type == $HDR_FUNC)
-	{
-		# File view
-		my $dir_name = dirname($rel_filename);
-		my $esc_base_name = escape_html($base_name);
-		my $esc_dir_name = escape_html($dir_name);
-
-		$base_dir = get_relative_base_path($dir_name);
-		if ($frames)
-		{
-			# Need to break frameset when clicking any of these
-			# links
-			$view = "<a href=\"$base_dir"."index.$html_ext\" ".
-				"target=\"_parent\">$overview_title</a> - ".
-				"<a href=\"index.$html_ext\" target=\"_parent\">".
-				"$esc_dir_name</a> - $esc_base_name";
-		}
-		else
-		{
-			$view = "<a href=\"$base_dir"."index.$html_ext\">".
-				"$overview_title</a> - ".
-				"<a href=\"index.$html_ext\">".
-				"$esc_dir_name</a> - $esc_base_name";
-		}
-
-		# Add function suffix
-		if ($func_coverage) {
-			$view .= "<span style=\"font-size: 80%;\">";
-			if ($type == $HDR_SOURCE) {
-				if ($sort) {
-					$view .= " (source / <a href=\"$base_name.func-sort-c.$html_ext\">functions</a>)";
-				} else {
-					$view .= " (source / <a href=\"$base_name.func.$html_ext\">functions</a>)";
-				}
-			} elsif ($type == $HDR_FUNC) {
-				$view .= " (<a href=\"$base_name.gcov.$html_ext\">source</a> / functions)";
-			}
-			$view .= "</span>";
-		}
-	}
-	elsif ($type == $HDR_TESTDESC)
-	{
-		# Test description header
-		$base_dir = "";
-		$view = "<a href=\"$base_dir"."index.$html_ext\">".
-			"$overview_title</a> - test case descriptions";
-	}
-
-	# Prepare text for "test" field
-	$test = escape_html($test_title);
-
-	# Append link to test description page if available
-	if (%test_description && ($type != $HDR_TESTDESC))
-	{
-		if ($frames && ($type == $HDR_SOURCE || $type == $HDR_FUNC))
-		{
-			# Need to break frameset when clicking this link
-			$test .= " ( <span style=\"font-size:80%;\">".
-				 "<a href=\"$base_dir".
-				 "descriptions.$html_ext\" target=\"_parent\">".
-				 "view descriptions</a></span> )";
-		}
-		else
-		{
-			$test .= " ( <span style=\"font-size:80%;\">".
-				 "<a href=\"$base_dir".
-				 "descriptions.$html_ext\">".
-				 "view descriptions</a></span> )";
-		}
-	}
-
-	# Write header
-	write_header_prolog(*HTML_HANDLE, $base_dir);
-
-	# Left row
-	push(@row_left, [[ "10%", "headerItem", "Current view:" ],
-			 [ "35%", "headerValue", $view ]]);
-	push(@row_left, [[undef, "headerItem", "Test:"],
-			 [undef, "headerValue", $test]]);
-	push(@row_left, [[undef, "headerItem", "Date:"],
-			 [undef, "headerValue", $date]]);
-
-	# Right row
-	if ($legend && ($type == $HDR_SOURCE || $type == $HDR_FUNC)) {
-		my $text = <<END_OF_HTML;
-            Lines:
-            <span class="coverLegendCov">hit</span>
-            <span class="coverLegendNoCov">not hit</span>
-END_OF_HTML
-		if ($br_coverage) {
-			$text .= <<END_OF_HTML;
-            | Branches:
-            <span class="coverLegendCov">+</span> taken
-            <span class="coverLegendNoCov">-</span> not taken
-            <span class="coverLegendNoCov">#</span> not executed
-END_OF_HTML
-		}
-		push(@row_left, [[undef, "headerItem", "Legend:"],
-				 [undef, "headerValueLeg", $text]]);
-	} elsif ($legend && ($type != $HDR_TESTDESC)) {
-		my $text = <<END_OF_HTML;
-	    Rating:
-            <span class="coverLegendCovLo" title="Coverage rates below $med_limit % are classified as low">low: &lt; $med_limit %</span>
-            <span class="coverLegendCovMed" title="Coverage rates between $med_limit % and $hi_limit % are classified as medium">medium: &gt;= $med_limit %</span>
-            <span class="coverLegendCovHi" title="Coverage rates of $hi_limit % and more are classified as high">high: &gt;= $hi_limit %</span>
-END_OF_HTML
-		push(@row_left, [[undef, "headerItem", "Legend:"],
-				 [undef, "headerValueLeg", $text]]);
-	}
-	if ($type == $HDR_TESTDESC) {
-		push(@row_right, [[ "55%" ]]);
-	} else {
-		push(@row_right, [["15%", undef, undef ],
-				  ["10%", "headerCovTableHead", "Hit" ],
-				  ["10%", "headerCovTableHead", "Total" ],
-				  ["15%", "headerCovTableHead", "Coverage"]]);
-	}
-	# Line coverage
-	$style = $rate_name[classify_rate($lines_found, $lines_hit,
-					  $med_limit, $hi_limit)];
-	$rate = rate($lines_hit, $lines_found, " %");
-	push(@row_right, [[undef, "headerItem", "Lines:"],
-			  [undef, "headerCovTableEntry", $lines_hit],
-			  [undef, "headerCovTableEntry", $lines_found],
-			  [undef, "headerCovTableEntry$style", $rate]])
-			if ($type != $HDR_TESTDESC);
-	# Function coverage
-	if ($func_coverage) {
-		$style = $rate_name[classify_rate($fn_found, $fn_hit,
-						  $fn_med_limit, $fn_hi_limit)];
-		$rate = rate($fn_hit, $fn_found, " %");
-		push(@row_right, [[undef, "headerItem", "Functions:"],
-				  [undef, "headerCovTableEntry", $fn_hit],
-				  [undef, "headerCovTableEntry", $fn_found],
-				  [undef, "headerCovTableEntry$style", $rate]])
-			if ($type != $HDR_TESTDESC);
-	}
-	# Branch coverage
-	if ($br_coverage) {
-		$style = $rate_name[classify_rate($br_found, $br_hit,
-						  $br_med_limit, $br_hi_limit)];
-		$rate = rate($br_hit, $br_found, " %");
-		push(@row_right, [[undef, "headerItem", "Branches:"],
-				  [undef, "headerCovTableEntry", $br_hit],
-				  [undef, "headerCovTableEntry", $br_found],
-				  [undef, "headerCovTableEntry$style", $rate]])
-			if ($type != $HDR_TESTDESC);
-	}
-
-	# Print rows
-	$num_rows = max(scalar(@row_left), scalar(@row_right));
-	for ($i = 0; $i < $num_rows; $i++) {
-		my $left = $row_left[$i];
-		my $right = $row_right[$i];
-
-		if (!defined($left)) {
-			$left = [[undef, undef, undef], [undef, undef, undef]];
-		}
-		if (!defined($right)) {
-			$right = [];
-		}
-		write_header_line(*HTML_HANDLE, @{$left},
-				  [ $i == 0 ? "5%" : undef, undef, undef],
-				  @{$right});
-	}
-
-	# Fourth line
-	write_header_epilog(*HTML_HANDLE, $base_dir);
-}
-
-sub get_sorted_by_rate($$)
-{
-	my ($hash, $type) = @_;
-
-	if ($type == $SORT_LINE) {
-		# Sort by line coverage
-		return sort({$hash->{$a}[7] <=> $hash->{$b}[7]} keys(%{$hash}));
-	} elsif ($type == $SORT_FUNC) {
-		# Sort by function coverage;
-		return sort({$hash->{$a}[8] <=> $hash->{$b}[8]}	keys(%{$hash}));
-	} elsif ($type == $SORT_BRANCH) {
-		# Sort by br coverage;
-		return sort({$hash->{$a}[9] <=> $hash->{$b}[9]}	keys(%{$hash}));
-	}
-}
-
-sub get_sorted_by_missed($$)
-{
-	my ($hash, $type) = @_;
-
-	if ($type == $SORT_LINE) {
-		# Sort by number of instrumented lines without coverage
-		return sort(
-			{
-				($hash->{$b}[0] - $hash->{$b}[1]) <=>
-				($hash->{$a}[0] - $hash->{$a}[1])
-			} keys(%{$hash}));
-	} elsif ($type == $SORT_FUNC) {
-		# Sort by number of instrumented functions without coverage
-		return sort(
-			{
-				($hash->{$b}[2] - $hash->{$b}[3]) <=>
-				($hash->{$a}[2] - $hash->{$a}[3])
-			} keys(%{$hash}));
-	} elsif ($type == $SORT_BRANCH) {
-		# Sort by number of instrumented branches without coverage
-		return sort(
-			{
-				($hash->{$b}[4] - $hash->{$b}[5]) <=>
-				($hash->{$a}[4] - $hash->{$a}[5])
-			} keys(%{$hash}));
-	}
-}
-
-#
-# get_sorted_keys(hash_ref, sort_type)
-#
-# hash_ref: filename -> stats
-# stats: [ lines_found, lines_hit, fn_found, fn_hit, br_found, br_hit,
-#          link_name, line_rate, fn_rate, br_rate ]
-#
-
-sub get_sorted_keys($$)
-{
-	my ($hash, $type) = @_;
-
-	if ($type == $SORT_FILE) {
-		# Sort by name
-		return sort(keys(%{$hash}));
-	} elsif ($opt_missed) {
-		return get_sorted_by_missed($hash, $type);
-	} else {
-		return get_sorted_by_rate($hash, $type);
-	}
-}
-
-sub get_sort_code($$$)
-{
-	my ($link, $alt, $base) = @_;
-	my $png;
-	my $link_start;
-	my $link_end;
-
-	if (!defined($link)) {
-		$png = "glass.png";
-		$link_start = "";
-		$link_end = "";
-	} else {
-		$png = "updown.png";
-		$link_start = '<a href="'.$link.'">';
-		$link_end = "</a>";
-	}
-
-	return ' <span class="tableHeadSort">'.$link_start.
-	       '<img src="'.$base.$png.'" width=10 height=14 '.
-	       'alt="'.$alt.'" title="'.$alt.'" border=0>'.$link_end.'</span>';
-}
-
-sub get_file_code($$$$)
-{
-	my ($type, $text, $sort_button, $base) = @_;
-	my $result = $text;
-	my $link;
-
-	if ($sort_button) {
-		if ($type == $HEAD_NO_DETAIL) {
-			$link = "index.$html_ext";
-		} else {
-			$link = "index-detail.$html_ext";
-		}
-	}
-	$result .= get_sort_code($link, "Sort by name", $base);
-
-	return $result;
-}
-
-sub get_line_code($$$$$)
-{
-	my ($type, $sort_type, $text, $sort_button, $base) = @_;
-	my $result = $text;
-	my $sort_link;
-
-	if ($type == $HEAD_NO_DETAIL) {
-		# Just text
-		if ($sort_button) {
-			$sort_link = "index-sort-l.$html_ext";
-		}
-	} elsif ($type == $HEAD_DETAIL_HIDDEN) {
-		# Text + link to detail view
-		$result .= ' ( <a class="detail" href="index-detail'.
-			   $fileview_sortname[$sort_type].'.'.$html_ext.
-			   '">show details</a> )';
-		if ($sort_button) {
-			$sort_link = "index-sort-l.$html_ext";
-		}
-	} else {
-		# Text + link to standard view
-		$result .= ' ( <a class="detail" href="index'.
-			   $fileview_sortname[$sort_type].'.'.$html_ext.
-			   '">hide details</a> )';
-		if ($sort_button) {
-			$sort_link = "index-detail-sort-l.$html_ext";
-		}
-	}
-	# Add sort button
-	$result .= get_sort_code($sort_link, "Sort by line coverage", $base);
-
-	return $result;
-}
-
-sub get_func_code($$$$)
-{
-	my ($type, $text, $sort_button, $base) = @_;
-	my $result = $text;
-	my $link;
-
-	if ($sort_button) {
-		if ($type == $HEAD_NO_DETAIL) {
-			$link = "index-sort-f.$html_ext";
-		} else {
-			$link = "index-detail-sort-f.$html_ext";
-		}
-	}
-	$result .= get_sort_code($link, "Sort by function coverage", $base);
-	return $result;
-}
-
-sub get_br_code($$$$)
-{
-	my ($type, $text, $sort_button, $base) = @_;
-	my $result = $text;
-	my $link;
-
-	if ($sort_button) {
-		if ($type == $HEAD_NO_DETAIL) {
-			$link = "index-sort-b.$html_ext";
-		} else {
-			$link = "index-detail-sort-b.$html_ext";
-		}
-	}
-	$result .= get_sort_code($link, "Sort by branch coverage", $base);
-	return $result;
-}
-
-#
-# write_file_table(filehandle, base_dir, overview, testhash, testfnchash,
-#                  testbrhash, fileview, sort_type)
-#
-# Write a complete file table. OVERVIEW is a reference to a hash containing
-# the following mapping:
-#
-#   filename -> "lines_found,lines_hit,funcs_found,funcs_hit,page_link,
-#		 func_link"
-#
-# TESTHASH is a reference to the following hash:
-#
-#   filename -> \%testdata
-#   %testdata: name of test affecting this file -> \%testcount
-#   %testcount: line number -> execution count for a single test
-#
-# Heading of first column is "Filename" if FILEVIEW is true, "Directory name"
-# otherwise.
-#
-
-sub write_file_table(*$$$$$$$)
-{
-	local *HTML_HANDLE = $_[0];
-	my $base_dir = $_[1];
-	my $overview = $_[2];
-	my $testhash = $_[3];
-	my $testfnchash = $_[4];
-	my $testbrhash = $_[5];
-	my $fileview = $_[6];
-	my $sort_type = $_[7];
-	my $filename;
-	my $bar_graph;
-	my $hit;
-	my $found;
-	my $fn_found;
-	my $fn_hit;
-	my $br_found;
-	my $br_hit;
-	my $page_link;
-	my $testname;
-	my $testdata;
-	my $testfncdata;
-	my $testbrdata;
-	my %affecting_tests;
-	my $line_code = "";
-	my $func_code;
-	my $br_code;
-	my $file_code;
-	my @head_columns;
-
-	# Determine HTML code for column headings
-	if (($base_dir ne "") && $show_details)
-	{
-		my $detailed = keys(%{$testhash});
-
-		$file_code = get_file_code($detailed ? $HEAD_DETAIL_HIDDEN :
-					$HEAD_NO_DETAIL,
-					$fileview ? "Filename" : "Directory",
-					$sort && $sort_type != $SORT_FILE,
-					$base_dir);
-		$line_code = get_line_code($detailed ? $HEAD_DETAIL_SHOWN :
-					$HEAD_DETAIL_HIDDEN,
-					$sort_type,
-					"Line Coverage",
-					$sort && $sort_type != $SORT_LINE,
-					$base_dir);
-		$func_code = get_func_code($detailed ? $HEAD_DETAIL_HIDDEN :
-					$HEAD_NO_DETAIL,
-					"Functions",
-					$sort && $sort_type != $SORT_FUNC,
-					$base_dir);
-		$br_code = get_br_code($detailed ? $HEAD_DETAIL_HIDDEN :
-					$HEAD_NO_DETAIL,
-					"Branches",
-					$sort && $sort_type != $SORT_BRANCH,
-					$base_dir);
-	} else {
-		$file_code = get_file_code($HEAD_NO_DETAIL,
-					$fileview ? "Filename" : "Directory",
-					$sort && $sort_type != $SORT_FILE,
-					$base_dir);
-		$line_code = get_line_code($HEAD_NO_DETAIL, $sort_type, "Line Coverage",
-					$sort && $sort_type != $SORT_LINE,
-					$base_dir);
-		$func_code = get_func_code($HEAD_NO_DETAIL, "Functions",
-					$sort && $sort_type != $SORT_FUNC,
-					$base_dir);
-		$br_code = get_br_code($HEAD_NO_DETAIL, "Branches",
-					$sort && $sort_type != $SORT_BRANCH,
-					$base_dir);
-	}
-	push(@head_columns, [ $line_code, 3 ]);
-	push(@head_columns, [ $func_code, 2]) if ($func_coverage);
-	push(@head_columns, [ $br_code, 2]) if ($br_coverage);
-
-	write_file_table_prolog(*HTML_HANDLE, $file_code, @head_columns);
-
-	foreach $filename (get_sorted_keys($overview, $sort_type))
-	{
-		my @columns;
-		($found, $hit, $fn_found, $fn_hit, $br_found, $br_hit,
-		 $page_link) = @{$overview->{$filename}};
-
-		# Line coverage
-		push(@columns, [$found, $hit, $med_limit, $hi_limit, 1]);
-		# Function coverage
-		if ($func_coverage) {
-			push(@columns, [$fn_found, $fn_hit, $fn_med_limit,
-					$fn_hi_limit, 0]);
-		}
-		# Branch coverage
-		if ($br_coverage) {
-			push(@columns, [$br_found, $br_hit, $br_med_limit,
-					$br_hi_limit, 0]);
-		}
-		write_file_table_entry(*HTML_HANDLE, $base_dir, $filename,
-				       $page_link, @columns);
-
-		$testdata = $testhash->{$filename};
-		$testfncdata = $testfnchash->{$filename};
-		$testbrdata = $testbrhash->{$filename};
-
-		# Check whether we should write test specific coverage
-		# as well
-		if (!($show_details && $testdata)) { next; }
-
-		# Filter out those tests that actually affect this file
-		%affecting_tests = %{ get_affecting_tests($testdata,
-					$testfncdata, $testbrdata) };
-
-		# Does any of the tests affect this file at all?
-		if (!%affecting_tests) { next; }
-
-		foreach $testname (keys(%affecting_tests))
-		{
-			my @results;
-			($found, $hit, $fn_found, $fn_hit, $br_found, $br_hit) =
-				split(",", $affecting_tests{$testname});
-
-			# Insert link to description of available
-			if ($test_description{$testname})
-			{
-				$testname = "<a href=\"$base_dir".
-					    "descriptions.$html_ext#$testname\">".
-					    "$testname</a>";
-			}
-
-			push(@results, [$found, $hit]);
-			push(@results, [$fn_found, $fn_hit]) if ($func_coverage);
-			push(@results, [$br_found, $br_hit]) if ($br_coverage);
-			write_file_table_detail_entry(*HTML_HANDLE, $testname,
-				@results);
-		}
-	}
-
-	write_file_table_epilog(*HTML_HANDLE);
-}
-
-
-#
-# get_found_and_hit(hash)
-#
-# Return the count for entries (found) and entries with an execution count
-# greater than zero (hit) in a hash (linenumber -> execution count) as
-# a list (found, hit)
-#
-
-sub get_found_and_hit($)
-{
-	my %hash = %{$_[0]};
-	my $found = 0;
-	my $hit = 0;
-
-	# Calculate sum
-	$found = 0;
-	$hit = 0;
-			
-	foreach (keys(%hash))
-	{
-		$found++;
-		if ($hash{$_}>0) { $hit++; }
-	}
-
-	return ($found, $hit);
-}
-
-
-#
-# get_func_found_and_hit(sumfnccount)
-#
-# Return (f_found, f_hit) for sumfnccount
-#
-
-sub get_func_found_and_hit($)
-{
-	my ($sumfnccount) = @_;
-	my $function;
-	my $fn_found;
-	my $fn_hit;
-
-	$fn_found = scalar(keys(%{$sumfnccount}));
-	$fn_hit = 0;
-	foreach $function (keys(%{$sumfnccount})) {
-		if ($sumfnccount->{$function} > 0) {
-			$fn_hit++;
-		}
-	}
-	return ($fn_found, $fn_hit);
-}
-
-
-sub get_br_found_and_hit($)
-{
-	my ($brcount) = @_;
-	my $db;
-
-	$db = brcount_to_db($brcount);
-
-	return brcount_db_get_found_and_hit($db);
-}
-
-
-#
-# get_affecting_tests(testdata, testfncdata, testbrdata)
-#
-# HASHREF contains a mapping filename -> (linenumber -> exec count). Return
-# a hash containing mapping filename -> "lines found, lines hit" for each
-# filename which has a nonzero hit count.
-#
-
-sub get_affecting_tests($$$)
-{
-	my ($testdata, $testfncdata, $testbrdata) = @_;
-	my $testname;
-	my $testcount;
-	my $testfnccount;
-	my $testbrcount;
-	my %result;
-	my $found;
-	my $hit;
-	my $fn_found;
-	my $fn_hit;
-	my $br_found;
-	my $br_hit;
-
-	foreach $testname (keys(%{$testdata}))
-	{
-		# Get (line number -> count) hash for this test case
-		$testcount = $testdata->{$testname};
-		$testfnccount = $testfncdata->{$testname};
-		$testbrcount = $testbrdata->{$testname};
-
-		# Calculate sum
-		($found, $hit) = get_found_and_hit($testcount);
-		($fn_found, $fn_hit) = get_func_found_and_hit($testfnccount);
-		($br_found, $br_hit) = get_br_found_and_hit($testbrcount);
-
-		if ($hit>0)
-		{
-			$result{$testname} = "$found,$hit,$fn_found,$fn_hit,".
-					     "$br_found,$br_hit";
-		}
-	}
-
-	return(\%result);
-}
-
-
-sub get_hash_reverse($)
-{
-	my ($hash) = @_;
-	my %result;
-
-	foreach (keys(%{$hash})) {
-		$result{$hash->{$_}} = $_;
-	}
-
-	return \%result;
-}
-
-#
-# write_source(filehandle, source_filename, count_data, checksum_data,
-#              converted_data, func_data, sumbrcount)
-#
-# Write an HTML view of a source code file. Returns a list containing
-# data as needed by gen_png().
-#
-# Die on error.
-#
-
-sub write_source($$$$$$$)
-{
-	local *HTML_HANDLE = $_[0];
-	local *SOURCE_HANDLE;
-	my $source_filename = $_[1];
-	my %count_data;
-	my $line_number;
-	my @result;
-	my $checkdata = $_[3];
-	my $converted = $_[4];
-	my $funcdata  = $_[5];
-	my $sumbrcount = $_[6];
-	my $datafunc = get_hash_reverse($funcdata);
-	my @file;
-
-	if ($_[2])
-	{
-		%count_data = %{$_[2]};
-	}
-
-	if (!open(SOURCE_HANDLE, "<", $source_filename)) {
-		my @lines;
-		my $last_line = 0;
-
-		if (!$ignore[$ERROR_SOURCE]) {
-			die("ERROR: cannot read $source_filename\n");
-		}
-
-		# Continue without source file
-		warn("WARNING: cannot read $source_filename!\n");
-
-		@lines = sort( { $a <=> $b }  keys(%count_data));
-		if (@lines) {
-			$last_line = $lines[scalar(@lines) - 1];
-		}
-		return ( ":" ) if ($last_line < 1);
-
-		# Simulate gcov behavior
-		for ($line_number = 1; $line_number <= $last_line;
-		     $line_number++) {
-			push(@file, "/* EOF */");
-		}
-	} else {
-		@file = <SOURCE_HANDLE>;
-	}
-	
-	write_source_prolog(*HTML_HANDLE);
-	$line_number = 0;
-	foreach (@file) {
-		$line_number++;
-		chomp($_);
-
-		# Also remove CR from line-end
-		s/\015$//;
-
-		# Source code matches coverage data?
-		if (defined($checkdata->{$line_number}) &&
-		    ($checkdata->{$line_number} ne md5_base64($_)))
-		{
-			die("ERROR: checksum mismatch  at $source_filename:".
-			    "$line_number\n");
-		}
-
-		push (@result,
-		      write_source_line(HTML_HANDLE, $line_number,
-					$_, $count_data{$line_number},
-					$converted->{$line_number},
-					$sumbrcount->{$line_number}));
-	}
-
-	close(SOURCE_HANDLE);
-	write_source_epilog(*HTML_HANDLE);
-	return(@result);
-}
-
-
-sub funcview_get_func_code($$$)
-{
-	my ($name, $base, $type) = @_;
-	my $result;
-	my $link;
-
-	if ($sort && $type == 1) {
-		$link = "$name.func.$html_ext";
-	}
-	$result = "Function Name";
-	$result .= get_sort_code($link, "Sort by function name", $base);
-
-	return $result;
-}
-
-sub funcview_get_count_code($$$)
-{
-	my ($name, $base, $type) = @_;
-	my $result;
-	my $link;
-
-	if ($sort && $type == 0) {
-		$link = "$name.func-sort-c.$html_ext";
-	}
-	$result = "Hit count";
-	$result .= get_sort_code($link, "Sort by hit count", $base);
-
-	return $result;
-}
-
-#
-# funcview_get_sorted(funcdata, sumfncdata, sort_type)
-#
-# Depending on the value of sort_type, return a list of functions sorted
-# by name (type 0) or by the associated call count (type 1).
-#
-
-sub funcview_get_sorted($$$)
-{
-	my ($funcdata, $sumfncdata, $type) = @_;
-
-	if ($type == 0) {
-		return sort(keys(%{$funcdata}));
-	}
-	return sort({
-		$sumfncdata->{$b} == $sumfncdata->{$a} ?
-			$a cmp $b : $sumfncdata->{$a} <=> $sumfncdata->{$b}
-		} keys(%{$sumfncdata}));
-}
-
-sub demangle_list($)
-{
-	my ($list) = @_;
-	my $tmpfile;
-	my $handle;
-	my %demangle;
-	my $demangle_arg = "";
-	my %versions;
-
-	# Write function names to file
-	($handle, $tmpfile) = tempfile();
-	die("ERROR: could not create temporary file") if (!defined($tmpfile));
-	print($handle join("\n", @$list));
-	close($handle);
-
-	# Extra flag necessary on OS X so that symbols listed by gcov get demangled
-	# properly.
-	if ($^O eq "darwin") {
-		$demangle_arg = "--no-strip-underscores";
-	}
-
-	# Build translation hash from c++filt output
-	open($handle, "-|", "c++filt $demangle_arg < $tmpfile") or
-		die("ERROR: could not run c++filt: $!\n");
-	foreach my $func (@$list) {
-		my $translated = <$handle>;
-		my $version;
-
-		last if (!defined($translated));
-		chomp($translated);
-
-		$version = ++$versions{$translated};
-		$translated .= ".$version" if ($version > 1);
-		$demangle{$func} = $translated;
-	}
-	close($handle);
-
-	if (scalar(keys(%demangle)) != scalar(@$list)) {
-		die("ERROR: c++filt output not as expected (".
-		    scalar(keys(%demangle))." vs ".scalar(@$list).") lines\n");
-	}
-
-	unlink($tmpfile) or
-		warn("WARNING: could not remove temporary file $tmpfile: $!\n");
-
-	return \%demangle;
-}
-
-#
-# write_function_table(filehandle, source_file, sumcount, funcdata,
-#		       sumfnccount, testfncdata, sumbrcount, testbrdata,
-#		       base_name, base_dir, sort_type)
-#
-# Write an HTML table listing all functions in a source file, including
-# also function call counts and line coverages inside of each function.
-#
-# Die on error.
-#
-
-sub write_function_table(*$$$$$$$$$$)
-{
-	local *HTML_HANDLE = $_[0];
-	my $source = $_[1];
-	my $sumcount = $_[2];
-	my $funcdata = $_[3];
-	my $sumfncdata = $_[4];
-	my $testfncdata = $_[5];
-	my $sumbrcount = $_[6];
-	my $testbrdata = $_[7];
-	my $name = $_[8];
-	my $base = $_[9];
-	my $type = $_[10];
-	my $func;
-	my $func_code;
-	my $count_code;
-	my $demangle;
-
-	# Get HTML code for headings
-	$func_code = funcview_get_func_code($name, $base, $type);
-	$count_code = funcview_get_count_code($name, $base, $type);
-	write_html(*HTML_HANDLE, <<END_OF_HTML)
-	  <center>
-	  <table width="60%" cellpadding=1 cellspacing=1 border=0>
-	    <tr><td><br></td></tr>
-	    <tr>
-	      <td width="80%" class="tableHead">$func_code</td>
-	      <td width="20%" class="tableHead">$count_code</td>
-	    </tr>
-END_OF_HTML
-	;
-
-	# Get demangle translation hash
-	if ($demangle_cpp) {
-		$demangle = demangle_list([ sort(keys(%{$funcdata})) ]);
-	}
-
-	# Get a sorted table
-	foreach $func (funcview_get_sorted($funcdata, $sumfncdata, $type)) {
-		if (!defined($funcdata->{$func}))
-		{
-			next;
-		}
-
-		my $startline = $funcdata->{$func} - $func_offset;
-		my $name = $func;
-		my $count = $sumfncdata->{$name};
-		my $countstyle;
-
-		# Replace function name with demangled version if available
-		$name = $demangle->{$name} if (exists($demangle->{$name}));
-
-		# Escape special characters
-		$name = escape_html($name);
-		if ($startline < 1) {
-			$startline = 1;
-		}
-		if ($count == 0) {
-			$countstyle = "coverFnLo";
-		} else {
-			$countstyle = "coverFnHi";
-		}
-
-		write_html(*HTML_HANDLE, <<END_OF_HTML)
-	    <tr>
-              <td class="coverFn"><a href="$source#$startline">$name</a></td>
-              <td class="$countstyle">$count</td>
-            </tr>
-END_OF_HTML
-                ;
-	}
-	write_html(*HTML_HANDLE, <<END_OF_HTML)
-	  </table>
-	  <br>
-	  </center>
-END_OF_HTML
-	;
-}
-
-
-#
-# info(printf_parameter)
-#
-# Use printf to write PRINTF_PARAMETER to stdout only when the $quiet flag
-# is not set.
-#
-
-sub info(@)
-{
-	if (!$quiet)
-	{
-		# Print info string
-		printf(@_);
-	}
-}
-
-
-#
-# subtract_counts(data_ref, base_ref)
-#
-
-sub subtract_counts($$)
-{
-	my %data = %{$_[0]};
-	my %base = %{$_[1]};
-	my $line;
-	my $data_count;
-	my $base_count;
-	my $hit = 0;
-	my $found = 0;
-
-	foreach $line (keys(%data))
-	{
-		$found++;
-		$data_count = $data{$line};
-		$base_count = $base{$line};
-
-		if (defined($base_count))
-		{
-			$data_count -= $base_count;
-
-			# Make sure we don't get negative numbers
-			if ($data_count<0) { $data_count = 0; }
-		}
-
-		$data{$line} = $data_count;
-		if ($data_count > 0) { $hit++; }
-	}
-
-	return (\%data, $found, $hit);
-}
-
-
-#
-# subtract_fnccounts(data, base)
-#
-# Subtract function call counts found in base from those in data.
-# Return (data, f_found, f_hit).
-#
-
-sub subtract_fnccounts($$)
-{
-	my %data;
-	my %base;
-	my $func;
-	my $data_count;
-	my $base_count;
-	my $fn_hit = 0;
-	my $fn_found = 0;
-
-	%data = %{$_[0]} if (defined($_[0]));
-	%base = %{$_[1]} if (defined($_[1]));
-	foreach $func (keys(%data)) {
-		$fn_found++;
-		$data_count = $data{$func};
-		$base_count = $base{$func};
-
-		if (defined($base_count)) {
-			$data_count -= $base_count;
-
-			# Make sure we don't get negative numbers
-			if ($data_count < 0) {
-				$data_count = 0;
-			}
-		}
-
-		$data{$func} = $data_count;
-		if ($data_count > 0) {
-			$fn_hit++;
-		}
-	}
-
-	return (\%data, $fn_found, $fn_hit);
-}
-
-
-#
-# apply_baseline(data_ref, baseline_ref)
-#
-# Subtract the execution counts found in the baseline hash referenced by
-# BASELINE_REF from actual data in DATA_REF.
-#
-
-sub apply_baseline($$)
-{
-	my %data_hash = %{$_[0]};
-	my %base_hash = %{$_[1]};
-	my $filename;
-	my $testname;
-	my $data;
-	my $data_testdata;
-	my $data_funcdata;
-	my $data_checkdata;
-	my $data_testfncdata;
-	my $data_testbrdata;
-	my $data_count;
-	my $data_testfnccount;
-	my $data_testbrcount;
-	my $base;
-	my $base_checkdata;
-	my $base_sumfnccount;
-	my $base_sumbrcount;
-	my $base_count;
-	my $sumcount;
-	my $sumfnccount;
-	my $sumbrcount;
-	my $found;
-	my $hit;
-	my $fn_found;
-	my $fn_hit;
-	my $br_found;
-	my $br_hit;
-
-	foreach $filename (keys(%data_hash))
-	{
-		# Get data set for data and baseline
-		$data = $data_hash{$filename};
-		$base = $base_hash{$filename};
-
-		# Skip data entries for which no base entry exists
-		if (!defined($base))
-		{
-			next;
-		}
-
-		# Get set entries for data and baseline
-		($data_testdata, undef, $data_funcdata, $data_checkdata,
-		 $data_testfncdata, undef, $data_testbrdata) =
-			get_info_entry($data);
-		(undef, $base_count, undef, $base_checkdata, undef,
-		 $base_sumfnccount, undef, $base_sumbrcount) =
-			get_info_entry($base);
-
-		# Check for compatible checksums
-		merge_checksums($data_checkdata, $base_checkdata, $filename);
-
-		# sumcount has to be calculated anew
-		$sumcount = {};
-		$sumfnccount = {};
-		$sumbrcount = {};
-
-		# For each test case, subtract test specific counts
-		foreach $testname (keys(%{$data_testdata}))
-		{
-			# Get counts of both data and baseline
-			$data_count = $data_testdata->{$testname};
-			$data_testfnccount = $data_testfncdata->{$testname};
-			$data_testbrcount = $data_testbrdata->{$testname};
-
-			($data_count, undef, $hit) =
-				subtract_counts($data_count, $base_count);
-			($data_testfnccount) =
-				subtract_fnccounts($data_testfnccount,
-						   $base_sumfnccount);
-			($data_testbrcount) =
-				combine_brcount($data_testbrcount,
-						 $base_sumbrcount, $BR_SUB);
-
-
-			# Check whether this test case did hit any line at all
-			if ($hit > 0)
-			{
-				# Write back resulting hash
-				$data_testdata->{$testname} = $data_count;
-				$data_testfncdata->{$testname} =
-					$data_testfnccount;
-				$data_testbrdata->{$testname} =
-					$data_testbrcount;
-			}
-			else
-			{
-				# Delete test case which did not impact this
-				# file
-				delete($data_testdata->{$testname});
-				delete($data_testfncdata->{$testname});
-				delete($data_testbrdata->{$testname});
-			}
-
-			# Add counts to sum of counts
-			($sumcount, $found, $hit) =
-				add_counts($sumcount, $data_count);
-			($sumfnccount, $fn_found, $fn_hit) =
-				add_fnccount($sumfnccount, $data_testfnccount);
-			($sumbrcount, $br_found, $br_hit) =
-				combine_brcount($sumbrcount, $data_testbrcount,
-						$BR_ADD);
-		}
-
-		# Write back resulting entry
-		set_info_entry($data, $data_testdata, $sumcount, $data_funcdata,
-			       $data_checkdata, $data_testfncdata, $sumfnccount,
-			       $data_testbrdata, $sumbrcount, $found, $hit,
-			       $fn_found, $fn_hit, $br_found, $br_hit);
-
-		$data_hash{$filename} = $data;
-	}
-
-	return (\%data_hash);
-}
-
-
-#
-# remove_unused_descriptions()
-#
-# Removes all test descriptions from the global hash %test_description which
-# are not present in %info_data.
-#
-
-sub remove_unused_descriptions()
-{
-	my $filename;		# The current filename
-	my %test_list;		# Hash containing found test names
-	my $test_data;		# Reference to hash test_name -> count_data
-	my $before;		# Initial number of descriptions
-	my $after;		# Remaining number of descriptions
-	
-	$before = scalar(keys(%test_description));
-
-	foreach $filename (keys(%info_data))
-	{
-		($test_data) = get_info_entry($info_data{$filename});
-		foreach (keys(%{$test_data}))
-		{
-			$test_list{$_} = "";
-		}
-	}
-
-	# Remove descriptions for tests which are not in our list
-	foreach (keys(%test_description))
-	{
-		if (!defined($test_list{$_}))
-		{
-			delete($test_description{$_});
-		}
-	}
-
-	$after = scalar(keys(%test_description));
-	if ($after < $before)
-	{
-		info("Removed ".($before - $after).
-		     " unused descriptions, $after remaining.\n");
-	}
-}
-
-
-#
-# apply_prefix(filename, PREFIXES)
-#
-# If FILENAME begins with PREFIX from PREFIXES, remove PREFIX from FILENAME
-# and return resulting string, otherwise return FILENAME.
-#
-
-sub apply_prefix($@)
-{
-	my $filename = shift;
-	my @dir_prefix = @_;
-
-	if (@dir_prefix)
-	{
-		foreach my $prefix (@dir_prefix)
-		{
-			if ($prefix ne "" && $filename =~ /^\Q$prefix\E\/(.*)$/)
-			{
-				return substr($filename, length($prefix) + 1);
-			}
-		}
-	}
-
-	return $filename;
-}
-
-
-#
-# system_no_output(mode, parameters)
-#
-# Call an external program using PARAMETERS while suppressing depending on
-# the value of MODE:
-#
-#   MODE & 1: suppress STDOUT
-#   MODE & 2: suppress STDERR
-#
-# Return 0 on success, non-zero otherwise.
-#
-
-sub system_no_output($@)
-{
-	my $mode = shift;
-	my $result;
-	local *OLD_STDERR;
-	local *OLD_STDOUT;
-
-	# Save old stdout and stderr handles
-	($mode & 1) && open(OLD_STDOUT, ">>&", "STDOUT");
-	($mode & 2) && open(OLD_STDERR, ">>&", "STDERR");
-
-	# Redirect to /dev/null
-	($mode & 1) && open(STDOUT, ">", "/dev/null");
-	($mode & 2) && open(STDERR, ">", "/dev/null");
-
-	system(@_);
-	$result = $?;
-
-	# Close redirected handles
-	($mode & 1) && close(STDOUT);
-	($mode & 2) && close(STDERR);
-
-	# Restore old handles
-	($mode & 1) && open(STDOUT, ">>&", "OLD_STDOUT");
-	($mode & 2) && open(STDERR, ">>&", "OLD_STDERR");
-
-	return $result;
-}
-
-
-#
-# read_config(filename)
-#
-# Read configuration file FILENAME and return a reference to a hash containing
-# all valid key=value pairs found.
-#
-
-sub read_config($)
-{
-	my $filename = $_[0];
-	my %result;
-	my $key;
-	my $value;
-	local *HANDLE;
-
-	if (!open(HANDLE, "<", $filename))
-	{
-		warn("WARNING: cannot read configuration file $filename\n");
-		return undef;
-	}
-	while (<HANDLE>)
-	{
-		chomp;
-		# Skip comments
-		s/#.*//;
-		# Remove leading blanks
-		s/^\s+//;
-		# Remove trailing blanks
-		s/\s+$//;
-		next unless length;
-		($key, $value) = split(/\s*=\s*/, $_, 2);
-		if (defined($key) && defined($value))
-		{
-			$result{$key} = $value;
-		}
-		else
-		{
-			warn("WARNING: malformed statement in line $. ".
-			     "of configuration file $filename\n");
-		}
-	}
-	close(HANDLE);
-	return \%result;
-}
-
-
-#
-# apply_config(REF)
-#
-# REF is a reference to a hash containing the following mapping:
-#
-#   key_string => var_ref
-#
-# where KEY_STRING is a keyword and VAR_REF is a reference to an associated
-# variable. If the global configuration hashes CONFIG or OPT_RC contain a value
-# for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. 
-#
-
-sub apply_config($)
-{
-	my $ref = $_[0];
-
-	foreach (keys(%{$ref}))
-	{
-		if (defined($opt_rc{$_})) {
-			${$ref->{$_}} = $opt_rc{$_};
-		} elsif (defined($config->{$_})) {
-			${$ref->{$_}} = $config->{$_};
-		}
-	}
-}
-
-
-#
-# get_html_prolog(FILENAME)
-#
-# If FILENAME is defined, return contents of file. Otherwise return default
-# HTML prolog. Die on error.
-#
-
-sub get_html_prolog($)
-{
-	my $filename = $_[0];
-	my $result = "";
-
-	if (defined($filename))
-	{
-		local *HANDLE;
-
-		open(HANDLE, "<", $filename)
-			or die("ERROR: cannot open html prolog $filename!\n");
-		while (<HANDLE>)
-		{
-			$result .= $_;
-		}
-		close(HANDLE);
-	}
-	else
-	{
-		$result = <<END_OF_HTML
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html lang="en">
-
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=$charset">
-  <title>\@pagetitle\@</title>
-  <link rel="stylesheet" type="text/css" href="\@basedir\@gcov.css">
-</head>
-
-<body>
-
-END_OF_HTML
-		;
-	}
-
-	return $result;
-}
-
-
-#
-# get_html_epilog(FILENAME)
-#
-# If FILENAME is defined, return contents of file. Otherwise return default
-# HTML epilog. Die on error.
-#
-sub get_html_epilog($)
-{
-	my $filename = $_[0];
-	my $result = "";
-
-	if (defined($filename))
-	{
-		local *HANDLE;
-
-		open(HANDLE, "<", $filename)
-			or die("ERROR: cannot open html epilog $filename!\n");
-		while (<HANDLE>)
-		{
-			$result .= $_;
-		}
-		close(HANDLE);
-	}
-	else
-	{
-		$result = <<END_OF_HTML
-
-</body>
-</html>
-END_OF_HTML
-		;
-	}
-
-	return $result;
-
-}
-
-sub warn_handler($)
-{
-	my ($msg) = @_;
-
-	warn("$tool_name: $msg");
-}
-
-sub die_handler($)
-{
-	my ($msg) = @_;
-
-	die("$tool_name: $msg");
-}
-
-#
-# parse_ignore_errors(@ignore_errors)
-#
-# Parse user input about which errors to ignore.
-#
-
-sub parse_ignore_errors(@)
-{
-	my (@ignore_errors) = @_;
-	my @items;
-	my $item;
-
-	return if (!@ignore_errors);
-
-	foreach $item (@ignore_errors) {
-		$item =~ s/\s//g;
-		if ($item =~ /,/) {
-			# Split and add comma-separated parameters
-			push(@items, split(/,/, $item));
-		} else {
-			# Add single parameter
-			push(@items, $item);
-		}
-	}
-	foreach $item (@items) {
-		my $item_id = $ERROR_ID{lc($item)};
-
-		if (!defined($item_id)) {
-			die("ERROR: unknown argument for --ignore-errors: ".
-			    "$item\n");
-		}
-		$ignore[$item_id] = 1;
-	}
-}
-
-#
-# parse_dir_prefix(@dir_prefix)
-#
-# Parse user input about the prefix list
-#
-
-sub parse_dir_prefix(@)
-{
-	my (@opt_dir_prefix) = @_;
-	my $item;
-
-	return if (!@opt_dir_prefix);
-
-	foreach $item (@opt_dir_prefix) {
-		if ($item =~ /,/) {
-			# Split and add comma-separated parameters
-			push(@dir_prefix, split(/,/, $item));
-		} else {
-			# Add single parameter
-			push(@dir_prefix, $item);
-		}
-	}
-}
-
-#
-# rate(hit, found[, suffix, precision, width])
-#
-# Return the coverage rate [0..100] for HIT and FOUND values. 0 is only
-# returned when HIT is 0. 100 is only returned when HIT equals FOUND.
-# PRECISION specifies the precision of the result. SUFFIX defines a
-# string that is appended to the result if FOUND is non-zero. Spaces
-# are added to the start of the resulting string until it is at least WIDTH
-# characters wide.
-#
-
-sub rate($$;$$$)
-{
-        my ($hit, $found, $suffix, $precision, $width) = @_;
-        my $rate; 
-
-	# Assign defaults if necessary
-	$precision	= $default_precision if (!defined($precision));
-	$suffix		= ""	if (!defined($suffix));
-	$width		= 0	if (!defined($width));
-        
-        return sprintf("%*s", $width, "-") if (!defined($found) || $found == 0);
-        $rate = sprintf("%.*f", $precision, $hit * 100 / $found);
-
-	# Adjust rates if necessary
-        if ($rate == 0 && $hit > 0) {
-		$rate = sprintf("%.*f", $precision, 1 / 10 ** $precision);
-        } elsif ($rate == 100 && $hit != $found) {
-		$rate = sprintf("%.*f", $precision, 100 - 1 / 10 ** $precision);
-	}
-
-	return sprintf("%*s", $width, $rate.$suffix);
-}
diff --git a/ThirdParty/lcov/bin/geninfo b/ThirdParty/lcov/bin/geninfo
deleted file mode 100755
index f41eaec1cdfaadddecec3184eaeb4f7ff93c9890..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/geninfo
+++ /dev/null
@@ -1,4014 +0,0 @@
-#!/usr/bin/env perl
-#
-#   Copyright (c) International Business Machines  Corp., 2002,2012
-#
-#   This program is free software;  you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or (at
-#   your option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY;  without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   General Public License for more details.                 
-#
-#   You should have received a copy of the GNU General Public License
-#   along with this program;  if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#
-# geninfo
-#
-#   This script generates .info files from data files as created by code
-#   instrumented with gcc's built-in profiling mechanism. Call it with
-#   --help and refer to the geninfo man page to get information on usage
-#   and available options.
-#
-#
-# Authors:
-#   2002-08-23 created by Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-#                         IBM Lab Boeblingen
-#        based on code by Manoj Iyer <manjo@mail.utexas.edu> and
-#                         Megan Bock <mbock@us.ibm.com>
-#                         IBM Austin
-#   2002-09-05 / Peter Oberparleiter: implemented option that allows file list
-#   2003-04-16 / Peter Oberparleiter: modified read_gcov so that it can also
-#                parse the new gcov format which is to be introduced in gcc 3.3
-#   2003-04-30 / Peter Oberparleiter: made info write to STDERR, not STDOUT
-#   2003-07-03 / Peter Oberparleiter: added line checksum support, added
-#                --no-checksum
-#   2003-09-18 / Nigel Hinds: capture branch coverage data from GCOV
-#   2003-12-11 / Laurent Deniel: added --follow option
-#                workaround gcov (<= 3.2.x) bug with empty .da files
-#   2004-01-03 / Laurent Deniel: Ignore empty .bb files
-#   2004-02-16 / Andreas Krebbel: Added support for .gcno/.gcda files and
-#                gcov versioning
-#   2004-08-09 / Peter Oberparleiter: added configuration file support
-#   2008-07-14 / Tom Zoerner: added --function-coverage command line option
-#   2008-08-13 / Peter Oberparleiter: modified function coverage
-#                implementation (now enabled per default)
-#
-
-use strict;
-use warnings;
-use File::Basename; 
-use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir
-			      splitpath catpath/;
-use Getopt::Long;
-use Digest::MD5 qw(md5_base64);
-use Cwd qw/abs_path/;
-if( $^O eq "msys" )
-{
-	require File::Spec::Win32;
-}
-
-# Constants
-our $tool_dir		= abs_path(dirname($0));
-our $lcov_version	= "LCOV version 1.14";
-our $lcov_url		= "http://ltp.sourceforge.net/coverage/lcov.php";
-our $gcov_tool		= "gcov";
-our $tool_name		= basename($0);
-
-our $GCOV_VERSION_8_0_0	= 0x80000;
-our $GCOV_VERSION_4_7_0	= 0x40700;
-our $GCOV_VERSION_3_4_0	= 0x30400;
-our $GCOV_VERSION_3_3_0	= 0x30300;
-our $GCNO_FUNCTION_TAG	= 0x01000000;
-our $GCNO_LINES_TAG	= 0x01450000;
-our $GCNO_FILE_MAGIC	= 0x67636e6f;
-our $BBG_FILE_MAGIC	= 0x67626267;
-
-# Error classes which users may specify to ignore during processing
-our $ERROR_GCOV		= 0;
-our $ERROR_SOURCE	= 1;
-our $ERROR_GRAPH	= 2;
-our %ERROR_ID = (
-	"gcov" => $ERROR_GCOV,
-	"source" => $ERROR_SOURCE,
-	"graph" => $ERROR_GRAPH,
-);
-
-our $EXCL_START = "LCOV_EXCL_START";
-our $EXCL_STOP = "LCOV_EXCL_STOP";
-
-# Marker to exclude branch coverage but keep function and line coveage
-our $EXCL_BR_START = "LCOV_EXCL_BR_START";
-our $EXCL_BR_STOP = "LCOV_EXCL_BR_STOP";
-
-# Compatibility mode values
-our $COMPAT_VALUE_OFF	= 0;
-our $COMPAT_VALUE_ON	= 1;
-our $COMPAT_VALUE_AUTO	= 2;
-
-# Compatibility mode value names
-our %COMPAT_NAME_TO_VALUE = (
-	"off"	=> $COMPAT_VALUE_OFF,
-	"on"	=> $COMPAT_VALUE_ON,
-	"auto"	=> $COMPAT_VALUE_AUTO,
-);
-
-# Compatiblity modes
-our $COMPAT_MODE_LIBTOOL	= 1 << 0;
-our $COMPAT_MODE_HAMMER		= 1 << 1;
-our $COMPAT_MODE_SPLIT_CRC	= 1 << 2;
-
-# Compatibility mode names
-our %COMPAT_NAME_TO_MODE = (
-	"libtool"	=> $COMPAT_MODE_LIBTOOL,
-	"hammer"	=> $COMPAT_MODE_HAMMER,
-	"split_crc"	=> $COMPAT_MODE_SPLIT_CRC,
-	"android_4_4_0"	=> $COMPAT_MODE_SPLIT_CRC,
-);
-
-# Map modes to names
-our %COMPAT_MODE_TO_NAME = (
-	$COMPAT_MODE_LIBTOOL	=> "libtool",
-	$COMPAT_MODE_HAMMER	=> "hammer",
-	$COMPAT_MODE_SPLIT_CRC	=> "split_crc",
-);
-
-# Compatibility mode default values
-our %COMPAT_MODE_DEFAULTS = (
-	$COMPAT_MODE_LIBTOOL	=> $COMPAT_VALUE_ON,
-	$COMPAT_MODE_HAMMER	=> $COMPAT_VALUE_AUTO,
-	$COMPAT_MODE_SPLIT_CRC	=> $COMPAT_VALUE_AUTO,
-);
-
-# Compatibility mode auto-detection routines
-sub compat_hammer_autodetect();
-our %COMPAT_MODE_AUTO = (
-	$COMPAT_MODE_HAMMER	=> \&compat_hammer_autodetect,
-	$COMPAT_MODE_SPLIT_CRC	=> 1,	# will be done later
-);
-
-our $BR_LINE		= 0;
-our $BR_BLOCK		= 1;
-our $BR_BRANCH		= 2;
-our $BR_TAKEN		= 3;
-our $BR_VEC_ENTRIES	= 4;
-our $BR_VEC_WIDTH	= 32;
-our $BR_VEC_MAX		= vec(pack('b*', 1 x $BR_VEC_WIDTH), 0, $BR_VEC_WIDTH);
-
-our $UNNAMED_BLOCK	= -1;
-
-# Prototypes
-sub print_usage(*);
-sub transform_pattern($);
-sub gen_info($);
-sub process_dafile($$);
-sub match_filename($@);
-sub solve_ambiguous_match($$$);
-sub split_filename($);
-sub solve_relative_path($$);
-sub read_gcov_header($);
-sub read_gcov_file($);
-sub info(@);
-sub map_llvm_version($);
-sub version_to_str($);
-sub get_gcov_version();
-sub system_no_output($@);
-sub read_config($);
-sub apply_config($);
-sub get_exclusion_data($);
-sub apply_exclusion_data($$);
-sub process_graphfile($$);
-sub filter_fn_name($);
-sub warn_handler($);
-sub die_handler($);
-sub graph_error($$);
-sub graph_expect($);
-sub graph_read(*$;$$);
-sub graph_skip(*$;$);
-sub uniq(@);
-sub sort_uniq(@);
-sub sort_uniq_lex(@);
-sub graph_cleanup($);
-sub graph_find_base($);
-sub graph_from_bb($$$$);
-sub graph_add_order($$$);
-sub read_bb_word(*;$);
-sub read_bb_value(*;$);
-sub read_bb_string(*$);
-sub read_bb($);
-sub read_bbg_word(*;$);
-sub read_bbg_value(*;$);
-sub read_bbg_string(*);
-sub read_bbg_lines_record(*$$$$$);
-sub read_bbg($);
-sub read_gcno_word(*;$$);
-sub read_gcno_value(*$;$$);
-sub read_gcno_string(*$);
-sub read_gcno_lines_record(*$$$$$$);
-sub determine_gcno_split_crc($$$$);
-sub read_gcno_function_record(*$$$$$);
-sub read_gcno($);
-sub get_gcov_capabilities();
-sub get_overall_line($$$$);
-sub print_overall_rate($$$$$$$$$);
-sub br_gvec_len($);
-sub br_gvec_get($$);
-sub debug($);
-sub int_handler();
-sub parse_ignore_errors(@);
-sub is_external($);
-sub compat_name($);
-sub parse_compat_modes($);
-sub is_compat($);
-sub is_compat_auto($);
-
-
-# Global variables
-our $gcov_version;
-our $gcov_version_string;
-our $graph_file_extension;
-our $data_file_extension;
-our @data_directory;
-our $test_name = "";
-our $quiet;
-our $help;
-our $output_filename;
-our $base_directory;
-our $version;
-our $follow;
-our $checksum;
-our $no_checksum;
-our $opt_compat_libtool;
-our $opt_no_compat_libtool;
-our $rc_adjust_src_path;# Regexp specifying parts to remove from source path
-our $adjust_src_pattern;
-our $adjust_src_replace;
-our $adjust_testname;
-our $config;		# Configuration file contents
-our @ignore_errors;	# List of errors to ignore (parameter)
-our @ignore;		# List of errors to ignore (array)
-our $initial;
-our @include_patterns; # List of source file patterns to include
-our @exclude_patterns; # List of source file patterns to exclude
-our %excluded_files; # Files excluded due to include/exclude options
-our $no_recursion = 0;
-our $maxdepth;
-our $no_markers = 0;
-our $opt_derive_func_data = 0;
-our $opt_external = 1;
-our $opt_no_external;
-our $debug = 0;
-our $gcov_caps;
-our @gcov_options;
-our @internal_dirs;
-our $opt_config_file;
-our $opt_gcov_all_blocks = 1;
-our $opt_compat;
-our %opt_rc;
-our %compat_value;
-our $gcno_split_crc;
-our $func_coverage = 1;
-our $br_coverage = 0;
-our $rc_auto_base = 1;
-our $excl_line = "LCOV_EXCL_LINE";
-our $excl_br_line = "LCOV_EXCL_BR_LINE";
-
-our $cwd = `pwd`;
-chomp($cwd);
-
-
-#
-# Code entry point
-#
-
-# Register handler routine to be called when interrupted
-$SIG{"INT"} = \&int_handler;
-$SIG{__WARN__} = \&warn_handler;
-$SIG{__DIE__} = \&die_handler;
-
-# Set LC_ALL so that gcov output will be in a unified format
-$ENV{"LC_ALL"} = "C";
-
-# Check command line for a configuration file name
-Getopt::Long::Configure("pass_through", "no_auto_abbrev");
-GetOptions("config-file=s" => \$opt_config_file,
-	   "rc=s%" => \%opt_rc);
-Getopt::Long::Configure("default");
-
-{
-	# Remove spaces around rc options
-	my %new_opt_rc;
-
-	while (my ($key, $value) = each(%opt_rc)) {
-		$key =~ s/^\s+|\s+$//g;
-		$value =~ s/^\s+|\s+$//g;
-
-		$new_opt_rc{$key} = $value;
-	}
-	%opt_rc = %new_opt_rc;
-}
-
-# Read configuration file if available
-if (defined($opt_config_file)) {
-	$config = read_config($opt_config_file);
-} elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc"))
-{
-	$config = read_config($ENV{"HOME"}."/.lcovrc");
-}
-elsif (-r "/etc/lcovrc")
-{
-	$config = read_config("/etc/lcovrc");
-} elsif (-r "/usr/local/etc/lcovrc")
-{
-	$config = read_config("/usr/local/etc/lcovrc");
-}
-
-if ($config || %opt_rc)
-{
-	# Copy configuration file and --rc values to variables
-	apply_config({
-		"geninfo_gcov_tool"		=> \$gcov_tool,
-		"geninfo_adjust_testname"	=> \$adjust_testname,
-		"geninfo_checksum"		=> \$checksum,
-		"geninfo_no_checksum"		=> \$no_checksum, # deprecated
-		"geninfo_compat_libtool"	=> \$opt_compat_libtool,
-		"geninfo_external"		=> \$opt_external,
-		"geninfo_gcov_all_blocks"	=> \$opt_gcov_all_blocks,
-		"geninfo_compat"		=> \$opt_compat,
-		"geninfo_adjust_src_path"	=> \$rc_adjust_src_path,
-		"geninfo_auto_base"		=> \$rc_auto_base,
-		"lcov_function_coverage"	=> \$func_coverage,
-		"lcov_branch_coverage"		=> \$br_coverage,
-		"lcov_excl_line"		=> \$excl_line,
-		"lcov_excl_br_line"		=> \$excl_br_line,
-	});
-
-	# Merge options
-	if (defined($no_checksum))
-	{
-		$checksum = ($no_checksum ? 0 : 1);
-		$no_checksum = undef;
-	}
-
-	# Check regexp
-	if (defined($rc_adjust_src_path)) {
-		my ($pattern, $replace) = split(/\s*=>\s*/,
-						$rc_adjust_src_path);
-		local $SIG{__DIE__};
-		eval '$adjust_src_pattern = qr>'.$pattern.'>;';
-		if (!defined($adjust_src_pattern)) {
-			my $msg = $@;
-
-			chomp($msg);
-			$msg =~ s/at \(eval.*$//;
-			warn("WARNING: invalid pattern in ".
-			     "geninfo_adjust_src_path: $msg\n");
-		} elsif (!defined($replace)) {
-			# If no replacement is specified, simply remove pattern
-			$adjust_src_replace = "";
-		} else {
-			$adjust_src_replace = $replace;
-		}
-	}
-	for my $regexp (($excl_line, $excl_br_line)) {
-		eval 'qr/'.$regexp.'/';
-		my $error = $@;
-		chomp($error);
-		$error =~ s/at \(eval.*$//;
-		die("ERROR: invalid exclude pattern: $error") if $error;
-	}
-}
-
-# Parse command line options
-if (!GetOptions("test-name|t=s" => \$test_name,
-		"output-filename|o=s" => \$output_filename,
-		"checksum" => \$checksum,
-		"no-checksum" => \$no_checksum,
-		"base-directory|b=s" => \$base_directory,
-		"version|v" =>\$version,
-		"quiet|q" => \$quiet,
-		"help|h|?" => \$help,
-		"follow|f" => \$follow,
-		"compat-libtool" => \$opt_compat_libtool,
-		"no-compat-libtool" => \$opt_no_compat_libtool,
-		"gcov-tool=s" => \$gcov_tool,
-		"ignore-errors=s" => \@ignore_errors,
-		"initial|i" => \$initial,
-		"include=s" => \@include_patterns,
-		"exclude=s" => \@exclude_patterns,
-		"no-recursion" => \$no_recursion,
-		"no-markers" => \$no_markers,
-		"derive-func-data" => \$opt_derive_func_data,
-		"debug" => \$debug,
-		"external|e" => \$opt_external,
-		"no-external" => \$opt_no_external,
-		"compat=s" => \$opt_compat,
-		"config-file=s" => \$opt_config_file,
-		"rc=s%" => \%opt_rc,
-		))
-{
-	print(STDERR "Use $tool_name --help to get usage information\n");
-	exit(1);
-}
-else
-{
-	# Merge options
-	if (defined($no_checksum))
-	{
-		$checksum = ($no_checksum ? 0 : 1);
-		$no_checksum = undef;
-	}
-
-	if (defined($opt_no_compat_libtool))
-	{
-		$opt_compat_libtool = ($opt_no_compat_libtool ? 0 : 1);
-		$opt_no_compat_libtool = undef;
-	}
-
-	if (defined($opt_no_external)) {
-		$opt_external = 0;
-		$opt_no_external = undef;
-	}
-
-	if(@include_patterns) {
-		# Need perlreg expressions instead of shell pattern
-		@include_patterns = map({ transform_pattern($_); } @include_patterns);
-	}
-
-	if(@exclude_patterns) {
-		# Need perlreg expressions instead of shell pattern
-		@exclude_patterns = map({ transform_pattern($_); } @exclude_patterns);
-	}
-}
-
-@data_directory = @ARGV;
-
-debug("$lcov_version\n");
-
-# Check for help option
-if ($help)
-{
-	print_usage(*STDOUT);
-	exit(0);
-}
-
-# Check for version option
-if ($version)
-{
-	print("$tool_name: $lcov_version\n");
-	exit(0);
-}
-
-# Check gcov tool
-if (system_no_output(3, $gcov_tool, "--help") == -1)
-{
-	die("ERROR: need tool $gcov_tool!\n");
-}
-
-($gcov_version, $gcov_version_string) = get_gcov_version();
-
-# Determine gcov options
-$gcov_caps = get_gcov_capabilities();
-push(@gcov_options, "-b") if ($gcov_caps->{'branch-probabilities'} &&
-			      ($br_coverage || $func_coverage));
-push(@gcov_options, "-c") if ($gcov_caps->{'branch-counts'} &&
-			      $br_coverage);
-push(@gcov_options, "-a") if ($gcov_caps->{'all-blocks'} &&
-			      $opt_gcov_all_blocks && $br_coverage);
-if ($gcov_caps->{'hash-filenames'})
-{
-	push(@gcov_options, "-x");
-} else {
-	push(@gcov_options, "-p") if ($gcov_caps->{'preserve-paths'});
-}
-
-# Determine compatibility modes
-parse_compat_modes($opt_compat);
-
-# Determine which errors the user wants us to ignore
-parse_ignore_errors(@ignore_errors);
-
-# Make sure test names only contain valid characters
-if ($test_name =~ s/\W/_/g)
-{
-	warn("WARNING: invalid characters removed from testname!\n");
-}
-
-# Adjust test name to include uname output if requested
-if ($adjust_testname)
-{
-	$test_name .= "__".`uname -a`;
-	$test_name =~ s/\W/_/g;
-}
-
-# Make sure base_directory contains an absolute path specification
-if ($base_directory)
-{
-	$base_directory = solve_relative_path($cwd, $base_directory);
-}
-
-# Check for follow option
-if ($follow)
-{
-	$follow = "-follow"
-}
-else
-{
-	$follow = "";
-}
-
-# Determine checksum mode
-if (defined($checksum))
-{
-	# Normalize to boolean
-	$checksum = ($checksum ? 1 : 0);
-}
-else
-{
-	# Default is off
-	$checksum = 0;
-}
-
-# Determine max depth for recursion
-if ($no_recursion)
-{
-	$maxdepth = "-maxdepth 1";
-}
-else
-{
-	$maxdepth = "";
-}
-
-# Check for directory name
-if (!@data_directory)
-{
-	die("No directory specified\n".
-	    "Use $tool_name --help to get usage information\n");
-}
-else
-{
-	foreach (@data_directory)
-	{
-		stat($_);
-		if (!-r _)
-		{
-			die("ERROR: cannot read $_!\n");
-		}
-	}
-}
-
-if ($gcov_version < $GCOV_VERSION_3_4_0)
-{
-	if (is_compat($COMPAT_MODE_HAMMER))
-	{
-		$data_file_extension = ".da";
-		$graph_file_extension = ".bbg";
-	}
-	else
-	{
-		$data_file_extension = ".da";
-		$graph_file_extension = ".bb";
-	}
-}
-else
-{
-	$data_file_extension = ".gcda";
-	$graph_file_extension = ".gcno";
-}	
-
-# Check output filename
-if (defined($output_filename) && ($output_filename ne "-"))
-{
-	# Initially create output filename, data is appended
-	# for each data file processed
-	local *DUMMY_HANDLE;
-	open(DUMMY_HANDLE, ">", $output_filename)
-		or die("ERROR: cannot create $output_filename!\n");
-	close(DUMMY_HANDLE);
-
-	# Make $output_filename an absolute path because we're going
-	# to change directories while processing files
-	if (!($output_filename =~ /^\/(.*)$/))
-	{
-		$output_filename = $cwd."/".$output_filename;
-	}
-}
-
-# Build list of directories to identify external files
-foreach my $entry(@data_directory, $base_directory) {
-	next if (!defined($entry));
-	push(@internal_dirs, solve_relative_path($cwd, $entry));
-}
-
-# Do something
-foreach my $entry (@data_directory) {
-	gen_info($entry);
-}
-
-if ($initial && $br_coverage) {
-	warn("Note: --initial does not generate branch coverage ".
-	     "data\n");
-}
-info("Finished .info-file creation\n");
-
-exit(0);
-
-
-
-#
-# print_usage(handle)
-#
-# Print usage information.
-#
-
-sub print_usage(*)
-{
-	local *HANDLE = $_[0];
-
-	print(HANDLE <<END_OF_USAGE);
-Usage: $tool_name [OPTIONS] DIRECTORY
-
-Traverse DIRECTORY and create a .info file for each data file found. Note
-that you may specify more than one directory, all of which are then processed
-sequentially.
-
-  -h, --help                        Print this help, then exit
-  -v, --version                     Print version number, then exit
-  -q, --quiet                       Do not print progress messages
-  -i, --initial                     Capture initial zero coverage data
-  -t, --test-name NAME              Use test case name NAME for resulting data
-  -o, --output-filename OUTFILE     Write data only to OUTFILE
-  -f, --follow                      Follow links when searching .da/.gcda files
-  -b, --base-directory DIR          Use DIR as base directory for relative paths
-      --(no-)checksum               Enable (disable) line checksumming
-      --(no-)compat-libtool         Enable (disable) libtool compatibility mode
-      --gcov-tool TOOL              Specify gcov tool location
-      --ignore-errors ERROR         Continue after ERROR (gcov, source, graph)
-      --no-recursion                Exclude subdirectories from processing
-      --no-markers                  Ignore exclusion markers in source code
-      --derive-func-data            Generate function data from line data
-      --(no-)external               Include (ignore) data for external files
-      --config-file FILENAME        Specify configuration file location
-      --rc SETTING=VALUE            Override configuration file setting
-      --compat MODE=on|off|auto     Set compat MODE (libtool, hammer, split_crc)
-      --include PATTERN             Include files matching PATTERN
-      --exclude PATTERN             Exclude files matching PATTERN
-
-For more information see: $lcov_url
-END_OF_USAGE
-	;
-}
-
-
-#
-# transform_pattern(pattern)
-#
-# Transform shell wildcard expression to equivalent Perl regular expression.
-# Return transformed pattern.
-#
-
-sub transform_pattern($)
-{
-	my $pattern = $_[0];
-
-	# Escape special chars
-
-	$pattern =~ s/\\/\\\\/g;
-	$pattern =~ s/\//\\\//g;
-	$pattern =~ s/\^/\\\^/g;
-	$pattern =~ s/\$/\\\$/g;
-	$pattern =~ s/\(/\\\(/g;
-	$pattern =~ s/\)/\\\)/g;
-	$pattern =~ s/\[/\\\[/g;
-	$pattern =~ s/\]/\\\]/g;
-	$pattern =~ s/\{/\\\{/g;
-	$pattern =~ s/\}/\\\}/g;
-	$pattern =~ s/\./\\\./g;
-	$pattern =~ s/\,/\\\,/g;
-	$pattern =~ s/\|/\\\|/g;
-	$pattern =~ s/\+/\\\+/g;
-	$pattern =~ s/\!/\\\!/g;
-
-	# Transform ? => (.) and * => (.*)
-
-	$pattern =~ s/\*/\(\.\*\)/g;
-	$pattern =~ s/\?/\(\.\)/g;
-
-	return $pattern;
-}
-
-
-#
-# get_common_prefix(min_dir, filenames)
-#
-# Return the longest path prefix shared by all filenames. MIN_DIR specifies
-# the minimum number of directories that a filename may have after removing
-# the prefix.
-#
-
-sub get_common_prefix($@)
-{
-	my ($min_dir, @files) = @_;
-	my $file;
-	my @prefix;
-	my $i;
-
-	foreach $file (@files) {
-		my ($v, $d, $f) = splitpath($file);
-		my @comp = splitdir($d);
-
-		if (!@prefix) {
-			@prefix = @comp;
-			next;
-		}
-		for ($i = 0; $i < scalar(@comp) && $i < scalar(@prefix); $i++) {
-			if ($comp[$i] ne $prefix[$i] ||
-			    ((scalar(@comp) - ($i + 1)) <= $min_dir)) {
-				delete(@prefix[$i..scalar(@prefix)]);
-				last;
-			}
-		}
-	}
-
-	return catdir(@prefix);
-}
-
-#
-# gen_info(directory)
-#
-# Traverse DIRECTORY and create a .info file for each data file found.
-# The .info file contains TEST_NAME in the following format:
-#
-#   TN:<test name>
-#
-# For each source file name referenced in the data file, there is a section
-# containing source code and coverage data:
-#
-#   SF:<absolute path to the source file>
-#   FN:<line number of function start>,<function name> for each function
-#   DA:<line number>,<execution count> for each instrumented line
-#   LH:<number of lines with an execution count> greater than 0
-#   LF:<number of instrumented lines>
-#
-# Sections are separated by:
-#
-#   end_of_record
-#
-# In addition to the main source code file there are sections for each
-# #included file containing executable code. Note that the absolute path
-# of a source file is generated by interpreting the contents of the respective
-# graph file. Relative filenames are prefixed with the directory in which the
-# graph file is found. Note also that symbolic links to the graph file will be
-# resolved so that the actual file path is used instead of the path to a link.
-# This approach is necessary for the mechanism to work with the /proc/gcov
-# files.
-#
-# Die on error.
-#
-
-sub gen_info($)
-{
-	my $directory = $_[0];
-	my @file_list;
-	my $file;
-	my $prefix;
-	my $type;
-	my $ext;
-
-	if ($initial) {
-		$type = "graph";
-		$ext = $graph_file_extension;
-	} else {
-		$type = "data";
-		$ext = $data_file_extension;
-	}
-
-	if (-d $directory)
-	{
-		info("Scanning $directory for $ext files ...\n");
-
-		@file_list = `find "$directory" $maxdepth $follow -name \\*$ext -type f -o -name \\*$ext -type l 2>/dev/null`;
-		chomp(@file_list);
-		if (!@file_list) {
-			warn("WARNING: no $ext files found in $directory - ".
-			     "skipping!\n");
-			return;
-		}
-		$prefix = get_common_prefix(1, @file_list);
-		info("Found %d %s files in %s\n", $#file_list+1, $type,
-		     $directory);
-	}
-	else
-	{
-		@file_list = ($directory);
-		$prefix = "";
-	}
-
-	# Process all files in list
-	foreach $file (@file_list) {
-		# Process file
-		if ($initial) {
-			process_graphfile($file, $prefix);
-		} else {
-			process_dafile($file, $prefix);
-		}
-	}
-
-	# Report whether files were excluded.
-	if (%excluded_files) {
-		info("Excluded data for %d files due to include/exclude options\n",
-			 scalar keys %excluded_files);
-	}
-}
-
-
-#
-# derive_data(contentdata, funcdata, bbdata)
-#
-# Calculate function coverage data by combining line coverage data and the
-# list of lines belonging to a function.
-#
-# contentdata: [ instr1, count1, source1, instr2, count2, source2, ... ]
-# instr<n>: Instrumentation flag for line n
-# count<n>: Execution count for line n
-# source<n>: Source code for line n
-#
-# funcdata: [ count1, func1, count2, func2, ... ]
-# count<n>: Execution count for function number n
-# func<n>: Function name for function number n
-#
-# bbdata: function_name -> [ line1, line2, ... ]
-# line<n>: Line number belonging to the corresponding function
-#
-
-sub derive_data($$$)
-{
-	my ($contentdata, $funcdata, $bbdata) = @_;
-	my @gcov_content = @{$contentdata};
-	my @gcov_functions = @{$funcdata};
-	my %fn_count;
-	my %ln_fn;
-	my $line;
-	my $maxline;
-	my %fn_name;
-	my $fn;
-	my $count;
-
-	if (!defined($bbdata)) {
-		return @gcov_functions;
-	}
-
-	# First add existing function data
-	while (@gcov_functions) {
-		$count = shift(@gcov_functions);
-		$fn = shift(@gcov_functions);
-
-		$fn_count{$fn} = $count;
-	}
-
-	# Convert line coverage data to function data
-	foreach $fn (keys(%{$bbdata})) {
-		my $line_data = $bbdata->{$fn};
-		my $line;
-		my $fninstr = 0;
-
-		if ($fn eq "") {
-			next;
-		}
-		# Find the lowest line count for this function
-		$count = 0;
-		foreach $line (@$line_data) {
-			my $linstr = $gcov_content[ ( $line - 1 ) * 3 + 0 ];
-			my $lcount = $gcov_content[ ( $line - 1 ) * 3 + 1 ];
-
-			next if (!$linstr);
-			$fninstr = 1;
-			if (($lcount > 0) &&
-			    (($count == 0) || ($lcount < $count))) {
-				$count = $lcount;
-			}
-		}
-		next if (!$fninstr);
-		$fn_count{$fn} = $count;
-	}
-
-
-	# Check if we got data for all functions
-	foreach $fn (keys(%fn_name)) {
-		if ($fn eq "") {
-			next;
-		}
-		if (defined($fn_count{$fn})) {
-			next;
-		}
-		warn("WARNING: no derived data found for function $fn\n");
-	}
-
-	# Convert hash to list in @gcov_functions format
-	foreach $fn (sort(keys(%fn_count))) {
-		push(@gcov_functions, $fn_count{$fn}, $fn);
-	}
-
-	return @gcov_functions;
-}
-
-#
-# get_filenames(directory, pattern)
-#
-# Return a list of filenames found in directory which match the specified
-# pattern.
-#
-# Die on error.
-#
-
-sub get_filenames($$)
-{
-	my ($dirname, $pattern) = @_;
-	my @result;
-	my $directory;
-	local *DIR;
-
-	opendir(DIR, $dirname) or
-		die("ERROR: cannot read directory $dirname\n");
-	while ($directory = readdir(DIR)) {
-		push(@result, $directory) if ($directory =~ /$pattern/);
-	}
-	closedir(DIR);
-
-	return @result;
-}
-
-#
-# process_dafile(da_filename, dir)
-#
-# Create a .info file for a single data file.
-#
-# Die on error.
-#
-
-sub process_dafile($$)
-{
-	my ($file, $dir) = @_;
-	my $da_filename;	# Name of data file to process
-	my $da_dir;		# Directory of data file
-	my $source_dir;		# Directory of source file
-	my $da_basename;	# data filename without ".da/.gcda" extension
-	my $bb_filename;	# Name of respective graph file
-	my $bb_basename;	# Basename of the original graph file
-	my $graph;		# Contents of graph file
-	my $instr;		# Contents of graph file part 2
-	my $gcov_error;		# Error code of gcov tool
-	my $object_dir;		# Directory containing all object files
-	my $source_filename;	# Name of a source code file
-	my $gcov_file;		# Name of a .gcov file
-	my @gcov_content;	# Content of a .gcov file
-	my $gcov_branches;	# Branch content of a .gcov file
-	my @gcov_functions;	# Function calls of a .gcov file
-	my @gcov_list;		# List of generated .gcov files
-	my $line_number;	# Line number count
-	my $lines_hit;		# Number of instrumented lines hit
-	my $lines_found;	# Number of instrumented lines found
-	my $funcs_hit;		# Number of instrumented functions hit
-	my $funcs_found;	# Number of instrumented functions found
-	my $br_hit;
-	my $br_found;
-	my $source;		# gcov source header information
-	my $object;		# gcov object header information
-	my @matches;		# List of absolute paths matching filename
-	my $base_dir;		# Base directory for current file
-	my @tmp_links;		# Temporary links to be cleaned up
-	my @result;
-	my $index;
-	my $da_renamed;		# If data file is to be renamed
-	local *INFO_HANDLE;
-
-	info("Processing %s\n", abs2rel($file, $dir));
-	# Get path to data file in absolute and normalized form (begins with /,
-	# contains no more ../ or ./)
-	$da_filename = solve_relative_path($cwd, $file);
-
-	# Get directory and basename of data file
-	($da_dir, $da_basename) = split_filename($da_filename);
-
-	$source_dir = $da_dir;
-	if (is_compat($COMPAT_MODE_LIBTOOL)) {
-		# Avoid files from .libs dirs 	 
-		$source_dir =~ s/\.libs$//;
-	}
-
-	if (-z $da_filename)
-	{
-		$da_renamed = 1;
-	}
-	else
-	{
-		$da_renamed = 0;
-	}
-
-	# Construct base_dir for current file
-	if ($base_directory)
-	{
-		$base_dir = $base_directory;
-	}
-	else
-	{
-		$base_dir = $source_dir;
-	}
-
-	# Check for writable $base_dir (gcov will try to write files there)
-	stat($base_dir);
-	if (!-w _)
-	{
-		die("ERROR: cannot write to directory $base_dir!\n");
-	}
-
-	# Construct name of graph file
-	$bb_basename = $da_basename.$graph_file_extension;
-	$bb_filename = "$da_dir/$bb_basename";
-
-	# Find out the real location of graph file in case we're just looking at
-	# a link
-	while (readlink($bb_filename))
-	{
-		my $last_dir = dirname($bb_filename);
-
-		$bb_filename = readlink($bb_filename);
-		$bb_filename = solve_relative_path($last_dir, $bb_filename);
-	}
-
-	# Ignore empty graph file (e.g. source file with no statement)
-	if (-z $bb_filename)
-	{
-		warn("WARNING: empty $bb_filename (skipped)\n");
-		return;
-	}
-
-	# Read contents of graph file into hash. We need it later to find out
-	# the absolute path to each .gcov file created as well as for
-	# information about functions and their source code positions.
-	if ($gcov_version < $GCOV_VERSION_3_4_0)
-	{
-		if (is_compat($COMPAT_MODE_HAMMER))
-		{
-			($instr, $graph) = read_bbg($bb_filename);
-		}
-		else
-		{
-			($instr, $graph) = read_bb($bb_filename);
-		}
-	} 
-	else
-	{
-		($instr, $graph) = read_gcno($bb_filename);
-	} 
-
-	# Try to find base directory automatically if requested by user
-	if ($rc_auto_base) {
-		$base_dir = find_base_from_graph($base_dir, $instr, $graph);
-	}
-
-	($instr, $graph) = adjust_graph_filenames($base_dir, $instr, $graph);
-
-	# Set $object_dir to real location of object files. This may differ
-	# from $da_dir if the graph file is just a link to the "real" object
-	# file location.
-	$object_dir = dirname($bb_filename);
-
-	# Is the data file in a different directory? (this happens e.g. with
-	# the gcov-kernel patch)
-	if ($object_dir ne $da_dir)
-	{
-		# Need to create link to data file in $object_dir
-		system("ln", "-s", $da_filename, 
-		       "$object_dir/$da_basename$data_file_extension")
-			and die ("ERROR: cannot create link $object_dir/".
-				 "$da_basename$data_file_extension!\n");
-		push(@tmp_links,
-		     "$object_dir/$da_basename$data_file_extension");
-		# Need to create link to graph file if basename of link
-		# and file are different (CONFIG_MODVERSION compat)
-		if ((basename($bb_filename) ne $bb_basename) &&
-		    (! -e "$object_dir/$bb_basename")) {
-			symlink($bb_filename, "$object_dir/$bb_basename") or
-				warn("WARNING: cannot create link ".
-				     "$object_dir/$bb_basename\n");
-			push(@tmp_links, "$object_dir/$bb_basename");
-		}
-	}
-
-	# Change to directory containing data files and apply GCOV
-	debug("chdir($base_dir)\n");
-        chdir($base_dir);
-
-	if ($da_renamed)
-	{
-		# Need to rename empty data file to workaround
-	        # gcov <= 3.2.x bug (Abort)
-		system_no_output(3, "mv", "$da_filename", "$da_filename.ori")
-			and die ("ERROR: cannot rename $da_filename\n");
-	}
-
-	# Execute gcov command and suppress standard output
-	$gcov_error = system_no_output(1, $gcov_tool, $da_filename,
-				       "-o", $object_dir, @gcov_options);
-
-	if ($da_renamed)
-	{
-		system_no_output(3, "mv", "$da_filename.ori", "$da_filename")
-			and die ("ERROR: cannot rename $da_filename.ori");
-	}
-
-	# Clean up temporary links
-	foreach (@tmp_links) {
-		unlink($_);
-	}
-
-	if ($gcov_error)
-	{
-		if ($ignore[$ERROR_GCOV])
-		{
-			warn("WARNING: GCOV failed for $da_filename!\n");
-			return;
-		}
-		die("ERROR: GCOV failed for $da_filename!\n");
-	}
-
-	# Collect data from resulting .gcov files and create .info file
-	@gcov_list = get_filenames('.', '\.gcov$');
-
-	# Check for files
-	if (!@gcov_list)
-	{
-		warn("WARNING: gcov did not create any files for ".
-		     "$da_filename!\n");
-	}
-
-	# Check whether we're writing to a single file
-	if ($output_filename)
-	{
-		if ($output_filename eq "-")
-		{
-			*INFO_HANDLE = *STDOUT;
-		}
-		else
-		{
-			# Append to output file
-			open(INFO_HANDLE, ">>", $output_filename)
-				or die("ERROR: cannot write to ".
-				       "$output_filename!\n");
-		}
-	}
-	else
-	{
-		# Open .info file for output
-		open(INFO_HANDLE, ">", "$da_filename.info")
-			or die("ERROR: cannot create $da_filename.info!\n");
-	}
-
-	# Write test name
-	printf(INFO_HANDLE "TN:%s\n", $test_name);
-
-	# Traverse the list of generated .gcov files and combine them into a
-	# single .info file
-	foreach $gcov_file (sort(@gcov_list))
-	{
-		my $i;
-		my $num;
-
-		# Skip gcov file for gcc built-in code
-		next if ($gcov_file eq "<built-in>.gcov");
-
-		($source, $object) = read_gcov_header($gcov_file);
-
-		if (!defined($source)) {
-			# Derive source file name from gcov file name if
-			# header format could not be parsed
-			$source = $gcov_file;
-			$source =~ s/\.gcov$//;
-		}
-
-		$source = solve_relative_path($base_dir, $source);
-
-		if (defined($adjust_src_pattern)) {
-			# Apply transformation as specified by user
-			$source =~ s/$adjust_src_pattern/$adjust_src_replace/g;
-		}
-
-		# gcov will happily create output even if there's no source code
-		# available - this interferes with checksum creation so we need
-		# to pull the emergency brake here.
-		if (! -r $source && $checksum)
-		{
-			if ($ignore[$ERROR_SOURCE])
-			{
-				warn("WARNING: could not read source file ".
-				     "$source\n");
-				next;
-			}
-			die("ERROR: could not read source file $source\n");
-		}
-
-		@matches = match_filename($source, keys(%{$instr}));
-
-		# Skip files that are not mentioned in the graph file
-		if (!@matches)
-		{
-			warn("WARNING: cannot find an entry for ".$gcov_file.
-			     " in $graph_file_extension file, skipping ".
-			     "file!\n");
-			unlink($gcov_file);
-			next;
-		}
-
-		# Read in contents of gcov file
-		@result = read_gcov_file($gcov_file);
-		if (!defined($result[0])) {
-			warn("WARNING: skipping unreadable file ".
-			     $gcov_file."\n");
-			unlink($gcov_file);
-			next;
-		}
-		@gcov_content = @{$result[0]};
-		$gcov_branches = $result[1];
-		@gcov_functions = @{$result[2]};
-
-		# Skip empty files
-		if (!@gcov_content)
-		{
-			warn("WARNING: skipping empty file ".$gcov_file."\n");
-			unlink($gcov_file);
-			next;
-		}
-
-		if (scalar(@matches) == 1)
-		{
-			# Just one match
-			$source_filename = $matches[0];
-		}
-		else
-		{
-			# Try to solve the ambiguity
-			$source_filename = solve_ambiguous_match($gcov_file,
-						\@matches, \@gcov_content);
-		}
-
-		if (@include_patterns)
-		{
-			my $keep = 0;
-
-			foreach my $pattern (@include_patterns)
-			{
-				$keep ||= ($source_filename =~ (/^$pattern$/));
-			}
-
-			if (!$keep)
-			{
-				$excluded_files{$source_filename} = ();
-				unlink($gcov_file);
-				next;
-			}
-		}
-
-		if (@exclude_patterns)
-		{
-			my $exclude = 0;
-
-			foreach my $pattern (@exclude_patterns)
-			{
-				$exclude ||= ($source_filename =~ (/^$pattern$/));
-			}
-
-			if ($exclude)
-			{
-				$excluded_files{$source_filename} = ();
-				unlink($gcov_file);
-				next;
-			}
-		}
-
-		# Skip external files if requested
-		if (!$opt_external) {
-			if (is_external($source_filename)) {
-				info("  ignoring data for external file ".
-				     "$source_filename\n");
-				unlink($gcov_file);
-				next;
-			}
-		}
-
-		# Write absolute path of source file
-		printf(INFO_HANDLE "SF:%s\n", $source_filename);
-
-		# If requested, derive function coverage data from
-		# line coverage data of the first line of a function
-		if ($opt_derive_func_data) {
-			@gcov_functions =
-				derive_data(\@gcov_content, \@gcov_functions,
-					    $graph->{$source_filename});
-		}
-
-		# Write function-related information
-		if (defined($graph->{$source_filename}))
-		{
-			my $fn_data = $graph->{$source_filename};
-			my $fn;
-
-			foreach $fn (sort
-				{$fn_data->{$a}->[0] <=> $fn_data->{$b}->[0]}
-				keys(%{$fn_data})) {
-				my $ln_data = $fn_data->{$fn};
-				my $line = $ln_data->[0];
-
-				# Skip empty function
-				if ($fn eq "") {
-					next;
-				}
-				# Remove excluded functions
-				if (!$no_markers) {
-					my $gfn;
-					my $found = 0;
-
-					foreach $gfn (@gcov_functions) {
-						if ($gfn eq $fn) {
-							$found = 1;
-							last;
-						}
-					}
-					if (!$found) {
-						next;
-					}
-				}
-
-				# Normalize function name
-				$fn = filter_fn_name($fn);
-
-				print(INFO_HANDLE "FN:$line,$fn\n");
-			}
-		}
-
-		#--
-		#-- FNDA: <call-count>, <function-name>
-		#-- FNF: overall count of functions
-		#-- FNH: overall count of functions with non-zero call count
-		#--
-		$funcs_found = 0;
-		$funcs_hit = 0;
-		while (@gcov_functions)
-		{
-			my $count = shift(@gcov_functions);
-			my $fn = shift(@gcov_functions);
-
-			$fn = filter_fn_name($fn);
-			printf(INFO_HANDLE "FNDA:$count,$fn\n");
-			$funcs_found++;
-			$funcs_hit++ if ($count > 0);
-		}
-		if ($funcs_found > 0) {
-			printf(INFO_HANDLE "FNF:%s\n", $funcs_found);
-			printf(INFO_HANDLE "FNH:%s\n", $funcs_hit);
-		}
-
-		# Write coverage information for each instrumented branch:
-		#
-		#   BRDA:<line number>,<block number>,<branch number>,<taken>
-		#
-		# where 'taken' is the number of times the branch was taken
-		# or '-' if the block to which the branch belongs was never
-		# executed
-		$br_found = 0;
-		$br_hit = 0;
-		$num = br_gvec_len($gcov_branches);
-		for ($i = 0; $i < $num; $i++) {
-			my ($line, $block, $branch, $taken) =
-				br_gvec_get($gcov_branches, $i);
-
-			$block = $BR_VEC_MAX if ($block < 0);
-			print(INFO_HANDLE "BRDA:$line,$block,$branch,$taken\n");
-			$br_found++;
-			$br_hit++ if ($taken ne '-' && $taken > 0);
-		}
-		if ($br_found > 0) {
-			printf(INFO_HANDLE "BRF:%s\n", $br_found);
-			printf(INFO_HANDLE "BRH:%s\n", $br_hit);
-		}
-
-		# Reset line counters
-		$line_number = 0;
-		$lines_found = 0;
-		$lines_hit = 0;
-
-		# Write coverage information for each instrumented line
-		# Note: @gcov_content contains a list of (flag, count, source)
-		# tuple for each source code line
-		while (@gcov_content)
-		{
-			$line_number++;
-
-			# Check for instrumented line
-			if ($gcov_content[0])
-			{
-				$lines_found++;
-				printf(INFO_HANDLE "DA:".$line_number.",".
-				       $gcov_content[1].($checksum ?
-				       ",". md5_base64($gcov_content[2]) : "").
-				       "\n");
-
-				# Increase $lines_hit in case of an execution
-				# count>0
-				if ($gcov_content[1] > 0) { $lines_hit++; }
-			}
-
-			# Remove already processed data from array
-			splice(@gcov_content,0,3);
-		}
-
-		# Write line statistics and section separator
-		printf(INFO_HANDLE "LF:%s\n", $lines_found);
-		printf(INFO_HANDLE "LH:%s\n", $lines_hit);
-		print(INFO_HANDLE "end_of_record\n");
-
-		# Remove .gcov file after processing
-		unlink($gcov_file);
-	}
-
-	if (!($output_filename && ($output_filename eq "-")))
-	{
-		close(INFO_HANDLE);
-	}
-
-	# Change back to initial directory
-	chdir($cwd);
-}
-
-
-#
-# solve_relative_path(path, dir)
-#
-# Solve relative path components of DIR which, if not absolute, resides in PATH.
-#
-
-sub solve_relative_path($$)
-{
-	my $path = $_[0];
-	my $dir = $_[1];
-	my $volume;
-	my $directories;
-	my $filename;
-	my @dirs;			# holds path elements
-	my $result;
-
-	# Convert from Windows path to msys path
-	if( $^O eq "msys" )
-	{
-		# search for a windows drive letter at the beginning
-		($volume, $directories, $filename) = File::Spec::Win32->splitpath( $dir );
-		if( $volume ne '' )
-		{
-			my $uppercase_volume;
-			# transform c/d\../e/f\g to Windows style c\d\..\e\f\g
-			$dir = File::Spec::Win32->canonpath( $dir );
-			# use Win32 module to retrieve path components
-			# $uppercase_volume is not used any further
-			( $uppercase_volume, $directories, $filename ) = File::Spec::Win32->splitpath( $dir );
-			@dirs = File::Spec::Win32->splitdir( $directories );
-			
-			# prepend volume, since in msys C: is always mounted to /c
-			$volume =~ s|^([a-zA-Z]+):|/\L$1\E|;
-			unshift( @dirs, $volume );
-			
-			# transform to Unix style '/' path
-			$directories = File::Spec->catdir( @dirs );
-			$dir = File::Spec->catpath( '', $directories, $filename );
-		} else {
-			# eliminate '\' path separators
-			$dir = File::Spec->canonpath( $dir );
-		}
-	}
-
-	$result = $dir;
-	# Prepend path if not absolute
-	if ($dir =~ /^[^\/]/)
-	{
-		$result = "$path/$result";
-	}
-
-	# Remove //
-	$result =~ s/\/\//\//g;
-
-	# Remove .
-	while ($result =~ s/\/\.\//\//g)
-	{
-	}
-	$result =~ s/\/\.$/\//g;
-
-	# Remove trailing /
-	$result =~ s/\/$//g;
-
-	# Solve ..
-	while ($result =~ s/\/[^\/]+\/\.\.\//\//)
-	{
-	}
-
-	# Remove preceding ..
-	$result =~ s/^\/\.\.\//\//g;
-
-	return $result;
-}
-
-
-#
-# match_filename(gcov_filename, list)
-#
-# Return a list of those entries of LIST which match the relative filename
-# GCOV_FILENAME.
-#
-
-sub match_filename($@)
-{
-	my ($filename, @list) = @_;
-	my ($vol, $dir, $file) = splitpath($filename);
-	my @comp = splitdir($dir);
-	my $comps = scalar(@comp);
-	my $entry;
-	my @result;
-
-entry:
-	foreach $entry (@list) {
-		my ($evol, $edir, $efile) = splitpath($entry);
-		my @ecomp;
-		my $ecomps;
-		my $i;
-
-		# Filename component must match
-		if ($efile ne $file) {
-			next;
-		}
-		# Check directory components last to first for match
-		@ecomp = splitdir($edir);
-		$ecomps = scalar(@ecomp);
-		if ($ecomps < $comps) {
-			next;
-		}
-		for ($i = 0; $i < $comps; $i++) {
-			if ($comp[$comps - $i - 1] ne
-			    $ecomp[$ecomps - $i - 1]) {
-				next entry;
-			}
-		}
-		push(@result, $entry),
-	}
-
-	return @result;
-}
-
-#
-# solve_ambiguous_match(rel_filename, matches_ref, gcov_content_ref)
-#
-# Try to solve ambiguous matches of mapping (gcov file) -> (source code) file
-# by comparing source code provided in the GCOV file with that of the files
-# in MATCHES. REL_FILENAME identifies the relative filename of the gcov
-# file.
-# 
-# Return the one real match or die if there is none.
-#
-
-sub solve_ambiguous_match($$$)
-{
-	my $rel_name = $_[0];
-	my $matches = $_[1];
-	my $content = $_[2];
-	my $filename;
-	my $index;
-	my $no_match;
-	local *SOURCE;
-
-	# Check the list of matches
-	foreach $filename (@$matches)
-	{
-
-		# Compare file contents
-		open(SOURCE, "<", $filename)
-			or die("ERROR: cannot read $filename!\n");
-
-		$no_match = 0;
-		for ($index = 2; <SOURCE>; $index += 3)
-		{
-			chomp;
-
-			# Also remove CR from line-end
-			s/\015$//;
-
-			if ($_ ne @$content[$index])
-			{
-				$no_match = 1;
-				last;
-			}
-		}
-
-		close(SOURCE);
-
-		if (!$no_match)
-		{
-			info("Solved source file ambiguity for $rel_name\n");
-			return $filename;
-		}
-	}
-
-	die("ERROR: could not match gcov data for $rel_name!\n");
-}
-
-
-#
-# split_filename(filename)
-#
-# Return (path, filename, extension) for a given FILENAME.
-#
-
-sub split_filename($)
-{
-	my @path_components = split('/', $_[0]);
-	my @file_components = split('\.', pop(@path_components));
-	my $extension = pop(@file_components);
-
-	return (join("/",@path_components), join(".",@file_components),
-		$extension);
-}
-
-
-#
-# read_gcov_header(gcov_filename)
-#
-# Parse file GCOV_FILENAME and return a list containing the following
-# information:
-#
-#   (source, object)
-#
-# where:
-#
-# source: complete relative path of the source code file (gcc >= 3.3 only)
-# object: name of associated graph file
-#
-# Die on error.
-#
-
-sub read_gcov_header($)
-{
-	my $source;
-	my $object;
-	local *INPUT;
-
-	if (!open(INPUT, "<", $_[0]))
-	{
-		if ($ignore_errors[$ERROR_GCOV])
-		{
-			warn("WARNING: cannot read $_[0]!\n");
-			return (undef,undef);
-		}
-		die("ERROR: cannot read $_[0]!\n");
-	}
-
-	while (<INPUT>)
-	{
-		chomp($_);
-
-		# Also remove CR from line-end
-		s/\015$//;
-
-		if (/^\s+-:\s+0:Source:(.*)$/)
-		{
-			# Source: header entry
-			$source = $1;
-		}
-		elsif (/^\s+-:\s+0:Object:(.*)$/)
-		{
-			# Object: header entry
-			$object = $1;
-		}
-		else
-		{
-			last;
-		}
-	}
-
-	close(INPUT);
-
-	return ($source, $object);
-}
-
-
-#
-# br_gvec_len(vector)
-#
-# Return the number of entries in the branch coverage vector.
-#
-
-sub br_gvec_len($)
-{
-	my ($vec) = @_;
-
-	return 0 if (!defined($vec));
-	return (length($vec) * 8 / $BR_VEC_WIDTH) / $BR_VEC_ENTRIES;
-}
-
-
-#
-# br_gvec_get(vector, number)
-#
-# Return an entry from the branch coverage vector.
-#
-
-sub br_gvec_get($$)
-{
-	my ($vec, $num) = @_;
-	my $line;
-	my $block;
-	my $branch;
-	my $taken;
-	my $offset = $num * $BR_VEC_ENTRIES;
-
-	# Retrieve data from vector
-	$line	= vec($vec, $offset + $BR_LINE, $BR_VEC_WIDTH);
-	$block	= vec($vec, $offset + $BR_BLOCK, $BR_VEC_WIDTH);
-	$block = -1 if ($block == $BR_VEC_MAX);
-	$branch = vec($vec, $offset + $BR_BRANCH, $BR_VEC_WIDTH);
-	$taken	= vec($vec, $offset + $BR_TAKEN, $BR_VEC_WIDTH);
-
-	# Decode taken value from an integer
-	if ($taken == 0) {
-		$taken = "-";
-	} else {
-		$taken--;
-	}
-
-	return ($line, $block, $branch, $taken);
-}
-
-
-#
-# br_gvec_push(vector, line, block, branch, taken)
-#
-# Add an entry to the branch coverage vector.
-#
-
-sub br_gvec_push($$$$$)
-{
-	my ($vec, $line, $block, $branch, $taken) = @_;
-	my $offset;
-
-	$vec = "" if (!defined($vec));
-	$offset = br_gvec_len($vec) * $BR_VEC_ENTRIES;
-	$block = $BR_VEC_MAX if $block < 0;
-
-	# Encode taken value into an integer
-	if ($taken eq "-") {
-		$taken = 0;
-	} else {
-		$taken++;
-	}
-
-	# Add to vector
-	vec($vec, $offset + $BR_LINE, $BR_VEC_WIDTH) = $line;
-	vec($vec, $offset + $BR_BLOCK, $BR_VEC_WIDTH) = $block;
-	vec($vec, $offset + $BR_BRANCH, $BR_VEC_WIDTH) = $branch;
-	vec($vec, $offset + $BR_TAKEN, $BR_VEC_WIDTH) = $taken;
-
-	return $vec;
-}
-
-
-#
-# read_gcov_file(gcov_filename)
-#
-# Parse file GCOV_FILENAME (.gcov file format) and return the list:
-# (reference to gcov_content, reference to gcov_branch, reference to gcov_func)
-#
-# gcov_content is a list of 3 elements
-# (flag, count, source) for each source code line:
-#
-# $result[($line_number-1)*3+0] = instrumentation flag for line $line_number
-# $result[($line_number-1)*3+1] = execution count for line $line_number
-# $result[($line_number-1)*3+2] = source code text for line $line_number
-#
-# gcov_branch is a vector of 4 4-byte long elements for each branch:
-# line number, block number, branch number, count + 1 or 0
-#
-# gcov_func is a list of 2 elements
-# (number of calls, function name) for each function
-#
-# Die on error.
-#
-
-sub read_gcov_file($)
-{
-	my $filename = $_[0];
-	my @result = ();
-	my $branches = "";
-	my @functions = ();
-	my $number;
-	my $exclude_flag = 0;
-	my $exclude_line = 0;
-	my $exclude_br_flag = 0;
-	my $exclude_branch = 0;
-	my $last_block = $UNNAMED_BLOCK;
-	my $last_line = 0;
-	local *INPUT;
-
-	if (!open(INPUT, "<", $filename)) {
-		if ($ignore_errors[$ERROR_GCOV])
-		{
-			warn("WARNING: cannot read $filename!\n");
-			return (undef, undef, undef);
-		}
-		die("ERROR: cannot read $filename!\n");
-	}
-
-	if ($gcov_version < $GCOV_VERSION_3_3_0)
-	{
-		# Expect gcov format as used in gcc < 3.3
-		while (<INPUT>)
-		{
-			chomp($_);
-
-			# Also remove CR from line-end
-			s/\015$//;
-
-			if (/^branch\s+(\d+)\s+taken\s+=\s+(\d+)/) {
-				next if (!$br_coverage);
-				next if ($exclude_line);
-				next if ($exclude_branch);
-				$branches = br_gvec_push($branches, $last_line,
-						$last_block, $1, $2);
-			} elsif (/^branch\s+(\d+)\s+never\s+executed/) {
-				next if (!$br_coverage);
-				next if ($exclude_line);
-				next if ($exclude_branch);
-				$branches = br_gvec_push($branches, $last_line,
-						$last_block, $1, '-');
-			}
-			elsif (/^call/ || /^function/)
-			{
-				# Function call return data
-			}
-			else
-			{
-				$last_line++;
-				# Check for exclusion markers
-				if (!$no_markers) {
-					if (/$EXCL_STOP/) {
-						$exclude_flag = 0;
-					} elsif (/$EXCL_START/) {
-						$exclude_flag = 1;
-					}
-					if (/$excl_line/ || $exclude_flag) {
-						$exclude_line = 1;
-					} else {
-						$exclude_line = 0;
-					}
-				}
-				# Check for exclusion markers (branch exclude)
-				if (!$no_markers) {
-					if (/$EXCL_BR_STOP/) {
-						$exclude_br_flag = 0;
-					} elsif (/$EXCL_BR_START/) {
-						$exclude_br_flag = 1;
-					}
-					if (/$excl_br_line/ || $exclude_br_flag) {
-						$exclude_branch = 1;
-					} else {
-						$exclude_branch = 0;
-					}
-				}
-				# Source code execution data
-				if (/^\t\t(.*)$/)
-				{
-					# Uninstrumented line
-					push(@result, 0);
-					push(@result, 0);
-					push(@result, $1);
-					next;
-				}
-				$number = (split(" ",substr($_, 0, 16)))[0];
-
-				# Check for zero count which is indicated
-				# by ######
-				if ($number eq "######") { $number = 0;	}
-
-				if ($exclude_line) {
-					# Register uninstrumented line instead
-					push(@result, 0);
-					push(@result, 0);
-				} else {
-					push(@result, 1);
-					push(@result, $number);
-				}
-				push(@result, substr($_, 16));
-			}
-		}
-	}
-	else
-	{
-		# Expect gcov format as used in gcc >= 3.3
-		while (<INPUT>)
-		{
-			chomp($_);
-
-			# Also remove CR from line-end
-			s/\015$//;
-
-			if (/^\s*(\d+|\$+|\%+):\s*(\d+)-block\s+(\d+)\s*$/) {
-				# Block information - used to group related
-				# branches
-				$last_line = $2;
-				$last_block = $3;
-			} elsif (/^branch\s+(\d+)\s+taken\s+(\d+)/) {
-				next if (!$br_coverage);
-				next if ($exclude_line);
-				next if ($exclude_branch);
-				$branches = br_gvec_push($branches, $last_line,
-						$last_block, $1, $2);
-			} elsif (/^branch\s+(\d+)\s+never\s+executed/) {
-				next if (!$br_coverage);
-				next if ($exclude_line);
-				next if ($exclude_branch);
-				$branches = br_gvec_push($branches, $last_line,
-						$last_block, $1, '-');
-			}
-			elsif (/^function\s+(.+)\s+called\s+(\d+)\s+/)
-			{
-				next if (!$func_coverage);
-				if ($exclude_line) {
-					next;
-				}
-				push(@functions, $2, $1);
-			}
-			elsif (/^call/)
-			{
-				# Function call return data
-			}
-			elsif (/^\s*([^:]+):\s*([^:]+):(.*)$/)
-			{
-				my ($count, $line, $code) = ($1, $2, $3);
-
-				# Skip instance-specific counts
-				next if ($line <= (scalar(@result) / 3));
-
-				$last_line = $line;
-				$last_block = $UNNAMED_BLOCK;
-				# Check for exclusion markers
-				if (!$no_markers) {
-					if (/$EXCL_STOP/) {
-						$exclude_flag = 0;
-					} elsif (/$EXCL_START/) {
-						$exclude_flag = 1;
-					}
-					if (/$excl_line/ || $exclude_flag) {
-						$exclude_line = 1;
-					} else {
-						$exclude_line = 0;
-					}
-				}
-				# Check for exclusion markers (branch exclude)
-				if (!$no_markers) {
-					if (/$EXCL_BR_STOP/) {
-						$exclude_br_flag = 0;
-					} elsif (/$EXCL_BR_START/) {
-						$exclude_br_flag = 1;
-					}
-					if (/$excl_br_line/ || $exclude_br_flag) {
-						$exclude_branch = 1;
-					} else {
-						$exclude_branch = 0;
-					}
-				}
-
-				# Strip unexecuted basic block marker
-				$count =~ s/\*$//;
-
-				# <exec count>:<line number>:<source code>
-				if ($line eq "0")
-				{
-					# Extra data
-				}
-				elsif ($count eq "-")
-				{
-					# Uninstrumented line
-					push(@result, 0);
-					push(@result, 0);
-					push(@result, $code);
-				}
-				else
-				{
-					if ($exclude_line) {
-						push(@result, 0);
-						push(@result, 0);
-					} else {
-						# Check for zero count
-						if ($count =~ /^[#=]/) {
-							$count = 0;
-						}
-						push(@result, 1);
-						push(@result, $count);
-					}
-					push(@result, $code);
-				}
-			}
-		}
-	}
-
-	close(INPUT);
-	if ($exclude_flag || $exclude_br_flag) {
-		warn("WARNING: unterminated exclusion section in $filename\n");
-	}
-	return(\@result, $branches, \@functions);
-}
-
-
-# Map LLVM versions to the version of GCC gcov which they emulate.
-
-sub map_llvm_version($)
-{
-	my ($ver) = @_;
-
-	return 0x040200 if ($ver >= 0x030400);
-
-	warn("WARNING: This version of LLVM's gcov is unknown.  ".
-	     "Assuming it emulates GCC gcov version 4.2.\n");
-
-	return 0x040200;
-}
-
-
-# Return a readable version of encoded gcov version.
-
-sub version_to_str($)
-{
-	my ($ver) = @_;
-	my ($a, $b, $c);
-
-	$a = $ver >> 16 & 0xff;
-	$b = $ver >> 8 & 0xff;
-	$c = $ver & 0xff;
-
-	return "$a.$b.$c";
-}
-
-
-#
-# Get the GCOV tool version. Return an integer number which represents the
-# GCOV version. Version numbers can be compared using standard integer
-# operations.
-#
-
-sub get_gcov_version()
-{
-	local *HANDLE;
-	my $version_string;
-	my $result;
-	my ($a, $b, $c) = (4, 2, 0);	# Fallback version
-
-	# Examples for gcov version output:
-	#
-	# gcov (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
-	#
-	# gcov (crosstool-NG 1.18.0) 4.7.2
-	#
-	# LLVM (http://llvm.org/):
-	#   LLVM version 3.4svn
-	#
-	# Apple LLVM version 8.0.0 (clang-800.0.38)
-	#       Optimized build.
-	#       Default target: x86_64-apple-darwin16.0.0
-	#       Host CPU: haswell
-
-	open(GCOV_PIPE, "-|", "$gcov_tool --version")
-		or die("ERROR: cannot retrieve gcov version!\n");
-	local $/;
-	$version_string = <GCOV_PIPE>;
-	close(GCOV_PIPE);
-
-	# Remove all bracketed information
-	$version_string =~ s/\([^\)]*\)//g;
-
-	if ($version_string =~ /(\d+)\.(\d+)(\.(\d+))?/) {
-		($a, $b, $c) = ($1, $2, $4);
-		$c = 0 if (!defined($c));
-	} else {
-		warn("WARNING: cannot determine gcov version - ".
-		     "assuming $a.$b.$c\n");
-	}
-	$result = $a << 16 | $b << 8 | $c;
-
-	if ($version_string =~ /LLVM/) {
-		$result = map_llvm_version($result);
-		info("Found LLVM gcov version $a.$b.$c, which emulates gcov ".
-		     "version ".version_to_str($result)."\n");
-	} else {
-		info("Found gcov version: ".version_to_str($result)."\n");
-	}
-
-	return ($result, $version_string);
-}
-
-
-#
-# info(printf_parameter)
-#
-# Use printf to write PRINTF_PARAMETER to stdout only when the $quiet flag
-# is not set.
-#
-
-sub info(@)
-{
-	if (!$quiet)
-	{
-		# Print info string
-		if (defined($output_filename) && ($output_filename eq "-"))
-		{
-			# Don't interfere with the .info output to STDOUT
-			printf(STDERR @_);
-		}
-		else
-		{
-			printf(@_);
-		}
-	}
-}
-
-
-#
-# int_handler()
-#
-# Called when the script was interrupted by an INT signal (e.g. CTRl-C)
-#
-
-sub int_handler()
-{
-	if ($cwd) { chdir($cwd); }
-	info("Aborted.\n");
-	exit(1);
-}
-
-
-#
-# system_no_output(mode, parameters)
-#
-# Call an external program using PARAMETERS while suppressing depending on
-# the value of MODE:
-#
-#   MODE & 1: suppress STDOUT
-#   MODE & 2: suppress STDERR
-#
-# Return 0 on success, non-zero otherwise.
-#
-
-sub system_no_output($@)
-{
-	my $mode = shift;
-	my $result;
-	local *OLD_STDERR;
-	local *OLD_STDOUT;
-
-	# Save old stdout and stderr handles
-	($mode & 1) && open(OLD_STDOUT, ">>&", "STDOUT");
-	($mode & 2) && open(OLD_STDERR, ">>&", "STDERR");
-
-	# Redirect to /dev/null
-	($mode & 1) && open(STDOUT, ">", "/dev/null");
-	($mode & 2) && open(STDERR, ">", "/dev/null");
- 
-	debug("system(".join(' ', @_).")\n");
-	system(@_);
-	$result = $?;
-
-	# Close redirected handles
-	($mode & 1) && close(STDOUT);
-	($mode & 2) && close(STDERR);
-
-	# Restore old handles
-	($mode & 1) && open(STDOUT, ">>&", "OLD_STDOUT");
-	($mode & 2) && open(STDERR, ">>&", "OLD_STDERR");
- 
-	return $result;
-}
-
-
-#
-# read_config(filename)
-#
-# Read configuration file FILENAME and return a reference to a hash containing
-# all valid key=value pairs found.
-#
-
-sub read_config($)
-{
-	my $filename = $_[0];
-	my %result;
-	my $key;
-	my $value;
-	local *HANDLE;
-
-	if (!open(HANDLE, "<", $filename))
-	{
-		warn("WARNING: cannot read configuration file $filename\n");
-		return undef;
-	}
-	while (<HANDLE>)
-	{
-		chomp;
-		# Skip comments
-		s/#.*//;
-		# Remove leading blanks
-		s/^\s+//;
-		# Remove trailing blanks
-		s/\s+$//;
-		next unless length;
-		($key, $value) = split(/\s*=\s*/, $_, 2);
-		if (defined($key) && defined($value))
-		{
-			$result{$key} = $value;
-		}
-		else
-		{
-			warn("WARNING: malformed statement in line $. ".
-			     "of configuration file $filename\n");
-		}
-	}
-	close(HANDLE);
-	return \%result;
-}
-
-
-#
-# apply_config(REF)
-#
-# REF is a reference to a hash containing the following mapping:
-#
-#   key_string => var_ref
-#
-# where KEY_STRING is a keyword and VAR_REF is a reference to an associated
-# variable. If the global configuration hashes CONFIG or OPT_RC contain a value
-# for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. 
-#
-
-sub apply_config($)
-{
-	my $ref = $_[0];
-
-	foreach (keys(%{$ref}))
-	{
-		if (defined($opt_rc{$_})) {
-			${$ref->{$_}} = $opt_rc{$_};
-		} elsif (defined($config->{$_})) {
-			${$ref->{$_}} = $config->{$_};
-		}
-	}
-}
-
-
-#
-# get_exclusion_data(filename)
-#
-# Scan specified source code file for exclusion markers and return
-#   linenumber -> 1
-# for all lines which should be excluded.
-#
-
-sub get_exclusion_data($)
-{
-	my ($filename) = @_;
-	my %list;
-	my $flag = 0;
-	local *HANDLE;
-
-	if (!open(HANDLE, "<", $filename)) {
-		warn("WARNING: could not open $filename\n");
-		return undef;
-	}
-	while (<HANDLE>) {
-		if (/$EXCL_STOP/) {
-			$flag = 0;
-		} elsif (/$EXCL_START/) {
-			$flag = 1;
-		}
-		if (/$excl_line/ || $flag) {
-			$list{$.} = 1;
-		}
-	}
-	close(HANDLE);
-
-	if ($flag) {
-		warn("WARNING: unterminated exclusion section in $filename\n");
-	}
-
-	return \%list;
-}
-
-
-#
-# apply_exclusion_data(instr, graph)
-#
-# Remove lines from instr and graph data structures which are marked
-# for exclusion in the source code file.
-#
-# Return adjusted (instr, graph).
-#
-# graph         : file name -> function data
-# function data : function name -> line data
-# line data     : [ line1, line2, ... ]
-#
-# instr     : filename -> line data
-# line data : [ line1, line2, ... ]
-#
-
-sub apply_exclusion_data($$)
-{
-	my ($instr, $graph) = @_;
-	my $filename;
-	my %excl_data;
-	my $excl_read_failed = 0;
-
-	# Collect exclusion marker data
-	foreach $filename (sort_uniq_lex(keys(%{$graph}), keys(%{$instr}))) {
-		my $excl = get_exclusion_data($filename);
-
-		# Skip and note if file could not be read
-		if (!defined($excl)) {
-			$excl_read_failed = 1;
-			next;
-		}
-
-		# Add to collection if there are markers
-		$excl_data{$filename} = $excl if (keys(%{$excl}) > 0);
-	}
-
-	# Warn if not all source files could be read
-	if ($excl_read_failed) {
-		warn("WARNING: some exclusion markers may be ignored\n");
-	}
-
-	# Skip if no markers were found
-	return ($instr, $graph) if (keys(%excl_data) == 0);
-
-	# Apply exclusion marker data to graph
-	foreach $filename (keys(%excl_data)) {
-		my $function_data = $graph->{$filename};
-		my $excl = $excl_data{$filename};
-		my $function;
-
-		next if (!defined($function_data));
-
-		foreach $function (keys(%{$function_data})) {
-			my $line_data = $function_data->{$function};
-			my $line;
-			my @new_data;
-
-			# To be consistent with exclusion parser in non-initial
-			# case we need to remove a function if the first line
-			# was excluded
-			if ($excl->{$line_data->[0]}) {
-				delete($function_data->{$function});
-				next;
-			}
-			# Copy only lines which are not excluded
-			foreach $line (@{$line_data}) {
-				push(@new_data, $line) if (!$excl->{$line});
-			}
-
-			# Store modified list
-			if (scalar(@new_data) > 0) {
-				$function_data->{$function} = \@new_data;
-			} else {
-				# All of this function was excluded
-				delete($function_data->{$function});
-			}
-		}
-
-		# Check if all functions of this file were excluded
-		if (keys(%{$function_data}) == 0) {
-			delete($graph->{$filename});
-		}
-	}
-
-	# Apply exclusion marker data to instr
-	foreach $filename (keys(%excl_data)) {
-		my $line_data = $instr->{$filename};
-		my $excl = $excl_data{$filename};
-		my $line;
-		my @new_data;
-
-		next if (!defined($line_data));
-
-		# Copy only lines which are not excluded
-		foreach $line (@{$line_data}) {
-			push(@new_data, $line) if (!$excl->{$line});
-		}
-
-		# Store modified list
-		$instr->{$filename} = \@new_data;
-	}
-
-	return ($instr, $graph);
-}
-
-
-sub process_graphfile($$)
-{
-	my ($file, $dir) = @_;
-	my $graph_filename = $file;
-	my $graph_dir;
-	my $graph_basename;
-	my $source_dir;
-	my $base_dir;
-	my $graph;
-	my $instr;
-	my $filename;
-	local *INFO_HANDLE;
-
-	info("Processing %s\n", abs2rel($file, $dir));
-
-	# Get path to data file in absolute and normalized form (begins with /,
-	# contains no more ../ or ./)
-	$graph_filename = solve_relative_path($cwd, $graph_filename);
-
-	# Get directory and basename of data file
-	($graph_dir, $graph_basename) = split_filename($graph_filename);
-
-	$source_dir = $graph_dir;
-	if (is_compat($COMPAT_MODE_LIBTOOL)) {
-		# Avoid files from .libs dirs 	 
-		$source_dir =~ s/\.libs$//;
-	}
-
-	# Construct base_dir for current file
-	if ($base_directory)
-	{
-		$base_dir = $base_directory;
-	}
-	else
-	{
-		$base_dir = $source_dir;
-	}
-
-	# Ignore empty graph file (e.g. source file with no statement)
-	if (-z $graph_filename)
-	{
-		warn("WARNING: empty $graph_filename (skipped)\n");
-		return;
-	}
-
-	if ($gcov_version < $GCOV_VERSION_3_4_0)
-	{
-		if (is_compat($COMPAT_MODE_HAMMER))
-		{
-			($instr, $graph) = read_bbg($graph_filename);
-		}
-		else
-		{
-			($instr, $graph) = read_bb($graph_filename);
-		}
-	} 
-	else
-	{
-		($instr, $graph) = read_gcno($graph_filename);
-	}
-
-	# Try to find base directory automatically if requested by user
-	if ($rc_auto_base) {
-		$base_dir = find_base_from_graph($base_dir, $instr, $graph);
-	}
-
-	($instr, $graph) = adjust_graph_filenames($base_dir, $instr, $graph);
-
-	if (!$no_markers) {
-		# Apply exclusion marker data to graph file data
-		($instr, $graph) = apply_exclusion_data($instr, $graph);
-	}
-
-	# Check whether we're writing to a single file
-	if ($output_filename)
-	{
-		if ($output_filename eq "-")
-		{
-			*INFO_HANDLE = *STDOUT;
-		}
-		else
-		{
-			# Append to output file
-			open(INFO_HANDLE, ">>", $output_filename)
-				or die("ERROR: cannot write to ".
-				       "$output_filename!\n");
-		}
-	}
-	else
-	{
-		# Open .info file for output
-		open(INFO_HANDLE, ">", "$graph_filename.info")
-			or die("ERROR: cannot create $graph_filename.info!\n");
-	}
-
-	# Write test name
-	printf(INFO_HANDLE "TN:%s\n", $test_name);
-	foreach $filename (sort(keys(%{$instr})))
-	{
-		my $funcdata = $graph->{$filename};
-		my $line;
-		my $linedata;
-
-		# Skip external files if requested
-		if (!$opt_external) {
-			if (is_external($filename)) {
-				info("  ignoring data for external file ".
-				     "$filename\n");
-				next;
-			}
-		}
-
-		print(INFO_HANDLE "SF:$filename\n");
-
-		if (defined($funcdata) && $func_coverage) {
-			my @functions = sort {$funcdata->{$a}->[0] <=>
-					      $funcdata->{$b}->[0]}
-					     keys(%{$funcdata});
-			my $func;
-
-			# Gather list of instrumented lines and functions
-			foreach $func (@functions) {
-				$linedata = $funcdata->{$func};
-
-				# Print function name and starting line
-				print(INFO_HANDLE "FN:".$linedata->[0].
-				      ",".filter_fn_name($func)."\n");
-			}
-			# Print zero function coverage data
-			foreach $func (@functions) {
-				print(INFO_HANDLE "FNDA:0,".
-				      filter_fn_name($func)."\n");
-			}
-			# Print function summary
-			print(INFO_HANDLE "FNF:".scalar(@functions)."\n");
-			print(INFO_HANDLE "FNH:0\n");
-		}
-		# Print zero line coverage data
-		foreach $line (@{$instr->{$filename}}) {
-			print(INFO_HANDLE "DA:$line,0\n");
-		}
-		# Print line summary
-		print(INFO_HANDLE "LF:".scalar(@{$instr->{$filename}})."\n");
-		print(INFO_HANDLE "LH:0\n");
-
-		print(INFO_HANDLE "end_of_record\n");
-	}
-	if (!($output_filename && ($output_filename eq "-")))
-	{
-		close(INFO_HANDLE);
-	}
-}
-
-sub filter_fn_name($)
-{
-	my ($fn) = @_;
-
-	# Remove characters used internally as function name delimiters
-	$fn =~ s/[,=]/_/g;
-
-	return $fn;
-}
-
-sub warn_handler($)
-{
-	my ($msg) = @_;
-
-	warn("$tool_name: $msg");
-}
-
-sub die_handler($)
-{
-	my ($msg) = @_;
-
-	die("$tool_name: $msg");
-}
-
-
-#
-# graph_error(filename, message)
-#
-# Print message about error in graph file. If ignore_graph_error is set, return.
-# Otherwise abort.
-#
-
-sub graph_error($$)
-{
-	my ($filename, $msg) = @_;
-
-	if ($ignore[$ERROR_GRAPH]) {
-		warn("WARNING: $filename: $msg - skipping\n");
-		return;
-	}
-	die("ERROR: $filename: $msg\n");
-}
-
-#
-# graph_expect(description)
-#
-# If debug is set to a non-zero value, print the specified description of what
-# is expected to be read next from the graph file.
-#
-
-sub graph_expect($)
-{
-	my ($msg) = @_;
-
-	if (!$debug || !defined($msg)) {
-		return;
-	}
-
-	print(STDERR "DEBUG: expecting $msg\n");
-}
-
-#
-# graph_read(handle, bytes[, description, peek])
-#
-# Read and return the specified number of bytes from handle. Return undef
-# if the number of bytes could not be read. If PEEK is non-zero, reset
-# file position after read.
-#
-
-sub graph_read(*$;$$)
-{
-	my ($handle, $length, $desc, $peek) = @_;
-	my $data;
-	my $result;
-	my $pos;
-
-	graph_expect($desc);
-	if ($peek) {
-		$pos = tell($handle);
-		if ($pos == -1) {
-			warn("Could not get current file position: $!\n");
-			return undef;
-		}
-	}
-	$result = read($handle, $data, $length);
-	if ($debug) {
-		my $op = $peek ? "peek" : "read";
-		my $ascii = "";
-		my $hex = "";
-		my $i;
-
-		print(STDERR "DEBUG: $op($length)=$result: ");
-		for ($i = 0; $i < length($data); $i++) {
-			my $c = substr($data, $i, 1);;
-			my $n = ord($c);
-
-			$hex .= sprintf("%02x ", $n);
-			if ($n >= 32 && $n <= 127) {
-				$ascii .= $c;
-			} else {
-				$ascii .= ".";
-			}
-		}
-		print(STDERR "$hex |$ascii|");
-		print(STDERR "\n");
-	}
-	if ($peek) {
-		if (!seek($handle, $pos, 0)) {
-			warn("Could not set file position: $!\n");
-			return undef;
-		}
-	}
-	if ($result != $length) {
-		return undef;
-	}
-	return $data;
-}
-
-#
-# graph_skip(handle, bytes[, description])
-#
-# Read and discard the specified number of bytes from handle. Return non-zero
-# if bytes could be read, zero otherwise.
-#
-
-sub graph_skip(*$;$)
-{
-	my ($handle, $length, $desc) = @_;
-
-	if (defined(graph_read($handle, $length, $desc))) {
-		return 1;
-	}
-	return 0;
-}
-
-#
-# uniq(list)
-#
-# Return list without duplicate entries.
-#
-
-sub uniq(@)
-{
-	my (@list) = @_;
-	my @new_list;
-	my %known;
-
-	foreach my $item (@list) {
-		next if ($known{$item});
-		$known{$item} = 1;
-		push(@new_list, $item);
-	}
-
-	return @new_list;
-}
-
-#
-# sort_uniq(list)
-#
-# Return list in numerically ascending order and without duplicate entries.
-#
-
-sub sort_uniq(@)
-{
-	my (@list) = @_;
-	my %hash;
-
-	foreach (@list) {
-		$hash{$_} = 1;
-	}
-	return sort { $a <=> $b } keys(%hash);
-}
-
-#
-# sort_uniq_lex(list)
-#
-# Return list in lexically ascending order and without duplicate entries.
-#
-
-sub sort_uniq_lex(@)
-{
-	my (@list) = @_;
-	my %hash;
-
-	foreach (@list) {
-		$hash{$_} = 1;
-	}
-	return sort keys(%hash);
-}
-
-#
-# parent_dir(dir)
-#
-# Return parent directory for DIR. DIR must not contain relative path
-# components.
-#
-
-sub parent_dir($)
-{
-	my ($dir) = @_;
-	my ($v, $d, $f) = splitpath($dir, 1);
-	my @dirs = splitdir($d);
-
-	pop(@dirs);
-
-	return catpath($v, catdir(@dirs), $f);
-}
-
-#
-# find_base_from_graph(base_dir, instr, graph)
-#
-# Try to determine the base directory of the graph file specified by INSTR
-# and GRAPH. The base directory is the base for all relative filenames in
-# the graph file. It is defined by the current working directory at time
-# of compiling the source file.
-#
-# This function implements a heuristic which relies on the following
-# assumptions:
-# - all files used for compilation are still present at their location
-# - the base directory is either BASE_DIR or one of its parent directories
-# - files by the same name are not present in multiple parent directories
-#
-
-sub find_base_from_graph($$$)
-{
-	my ($base_dir, $instr, $graph) = @_;
-	my $old_base;
-	my $best_miss;
-	my $best_base;
-	my %rel_files;
-
-	# Determine list of relative paths
-	foreach my $filename (keys(%{$instr}), keys(%{$graph})) {
-		next if (file_name_is_absolute($filename));
-
-		$rel_files{$filename} = 1;
-	}
-
-	# Early exit if there are no relative paths
-	return $base_dir if (!%rel_files);
-
-	do {
-		my $miss = 0;
-
-		foreach my $filename (keys(%rel_files)) {
-			if (!-e solve_relative_path($base_dir, $filename)) {
-				$miss++;
-			}
-		}
-
-		debug("base_dir=$base_dir miss=$miss\n");
-
-		# Exit if we find an exact match with no misses
-		return $base_dir if ($miss == 0);
-
-		# No exact match, aim for the one with the least source file
-		# misses
-		if (!defined($best_base) || $miss < $best_miss) {
-			$best_base = $base_dir;
-			$best_miss = $miss;
-		}
-
-		# Repeat until there's no more parent directory
-		$old_base = $base_dir;
-		$base_dir = parent_dir($base_dir);
-	} while ($old_base ne $base_dir);
-
-	return $best_base;
-}
-
-#
-# adjust_graph_filenames(base_dir, instr, graph)
-#
-# Make relative paths in INSTR and GRAPH absolute and apply
-# geninfo_adjust_src_path setting to graph file data.
-#
-
-sub adjust_graph_filenames($$$)
-{
-	my ($base_dir, $instr, $graph) = @_;
-
-	foreach my $filename (keys(%{$instr})) {
-		my $old_filename = $filename;
-
-		# Convert to absolute canonical form
-		$filename = solve_relative_path($base_dir, $filename);
-
-		# Apply adjustment
-		if (defined($adjust_src_pattern)) {
-			$filename =~ s/$adjust_src_pattern/$adjust_src_replace/g;
-		}
-
-		if ($filename ne $old_filename) {
-			$instr->{$filename} = delete($instr->{$old_filename});
-		}
-	}
-
-	foreach my $filename (keys(%{$graph})) {
-		my $old_filename = $filename;
-
-		# Make absolute
-		# Convert to absolute canonical form
-		$filename = solve_relative_path($base_dir, $filename);
-
-		# Apply adjustment
-		if (defined($adjust_src_pattern)) {
-			$filename =~ s/$adjust_src_pattern/$adjust_src_replace/g;
-		}
-
-		if ($filename ne $old_filename) {
-			$graph->{$filename} = delete($graph->{$old_filename});
-		}
-	}
-
-	return ($instr, $graph);
-}
-
-#
-# graph_cleanup(graph)
-#
-# Remove entries for functions with no lines. Remove duplicate line numbers.
-# Sort list of line numbers numerically ascending.
-#
-
-sub graph_cleanup($)
-{
-	my ($graph) = @_;
-	my $filename;
-
-	foreach $filename (keys(%{$graph})) {
-		my $per_file = $graph->{$filename};
-		my $function;
-
-		foreach $function (keys(%{$per_file})) {
-			my $lines = $per_file->{$function};
-
-			if (scalar(@$lines) == 0) {
-				# Remove empty function
-				delete($per_file->{$function});
-				next;
-			}
-			# Normalize list
-			$per_file->{$function} = [ uniq(@$lines) ];
-		}
-		if (scalar(keys(%{$per_file})) == 0) {
-			# Remove empty file
-			delete($graph->{$filename});
-		}
-	}
-}
-
-#
-# graph_find_base(bb)
-#
-# Try to identify the filename which is the base source file for the
-# specified bb data.
-#
-
-sub graph_find_base($)
-{
-	my ($bb) = @_;
-	my %file_count;
-	my $basefile;
-	my $file;
-	my $func;
-	my $filedata;
-	my $count;
-	my $num;
-
-	# Identify base name for this bb data.
-	foreach $func (keys(%{$bb})) {
-		$filedata = $bb->{$func};
-
-		foreach $file (keys(%{$filedata})) {
-			$count = $file_count{$file};
-
-			# Count file occurrence
-			$file_count{$file} = defined($count) ? $count + 1 : 1;
-		}
-	}
-	$count = 0;
-	$num = 0;
-	foreach $file (keys(%file_count)) {
-		if ($file_count{$file} > $count) {
-			# The file that contains code for the most functions
-			# is likely the base file
-			$count = $file_count{$file};
-			$num = 1;
-			$basefile = $file;
-		} elsif ($file_count{$file} == $count) {
-			# If more than one file could be the basefile, we
-			# don't have a basefile
-			$basefile = undef;
-		}
-	}
-
-	return $basefile;
-}
-
-#
-# graph_from_bb(bb, fileorder, bb_filename, fileorder_first)
-#
-# Convert data from bb to the graph format and list of instrumented lines.
-#
-# If FILEORDER_FIRST is set, use fileorder data to determine a functions
-# base source file.
-#
-# Returns (instr, graph).
-#
-# bb         : function name -> file data
-#            : undef -> file order
-# file data  : filename -> line data
-# line data  : [ line1, line2, ... ]
-#
-# file order : function name -> [ filename1, filename2, ... ]
-#
-# graph         : file name -> function data
-# function data : function name -> line data
-# line data     : [ line1, line2, ... ]
-#
-# instr     : filename -> line data
-# line data : [ line1, line2, ... ]
-#
-
-sub graph_from_bb($$$$)
-{
-	my ($bb, $fileorder, $bb_filename, $fileorder_first) = @_;
-	my $graph = {};
-	my $instr = {};
-	my $basefile;
-	my $file;
-	my $func;
-	my $filedata;
-	my $linedata;
-	my $order;
-
-	$basefile = graph_find_base($bb);
-	# Create graph structure
-	foreach $func (keys(%{$bb})) {
-		$filedata = $bb->{$func};
-		$order = $fileorder->{$func};
-
-		# Account for lines in functions
-		if (defined($basefile) && defined($filedata->{$basefile}) &&
-		    !$fileorder_first) {
-			# If the basefile contributes to this function,
-			# account this function to the basefile.
-			$graph->{$basefile}->{$func} = $filedata->{$basefile};
-		} else {
-			# If the basefile does not contribute to this function,
-			# account this function to the first file contributing
-			# lines.
-			$graph->{$order->[0]}->{$func} =
-				$filedata->{$order->[0]};
-		}
-
-		foreach $file (keys(%{$filedata})) {
-			# Account for instrumented lines
-			$linedata = $filedata->{$file};
-			push(@{$instr->{$file}}, @$linedata);
-		}
-	}
-	# Clean up array of instrumented lines
-	foreach $file (keys(%{$instr})) {
-		$instr->{$file} = [ sort_uniq(@{$instr->{$file}}) ];
-	}
-
-	return ($instr, $graph);
-}
-
-#
-# graph_add_order(fileorder, function, filename)
-#
-# Add an entry for filename to the fileorder data set for function.
-#
-
-sub graph_add_order($$$)
-{
-	my ($fileorder, $function, $filename) = @_;
-	my $item;
-	my $list;
-
-	$list = $fileorder->{$function};
-	foreach $item (@$list) {
-		if ($item eq $filename) {
-			return;
-		}
-	}
-	push(@$list, $filename);
-	$fileorder->{$function} = $list;
-}
-
-#
-# read_bb_word(handle[, description])
-#
-# Read and return a word in .bb format from handle.
-#
-
-sub read_bb_word(*;$)
-{
-	my ($handle, $desc) = @_;
-
-	return graph_read($handle, 4, $desc);
-}
-
-#
-# read_bb_value(handle[, description])
-#
-# Read a word in .bb format from handle and return the word and its integer
-# value.
-#
-
-sub read_bb_value(*;$)
-{
-	my ($handle, $desc) = @_;
-	my $word;
-
-	$word = read_bb_word($handle, $desc);
-	return undef if (!defined($word));
-
-	return ($word, unpack("V", $word));
-}
-
-#
-# read_bb_string(handle, delimiter)
-#
-# Read and return a string in .bb format from handle up to the specified
-# delimiter value.
-#
-
-sub read_bb_string(*$)
-{
-	my ($handle, $delimiter) = @_;
-	my $word;
-	my $value;
-	my $string = "";
-
-	graph_expect("string");
-	do {
-		($word, $value) = read_bb_value($handle, "string or delimiter");
-		return undef if (!defined($value));
-		if ($value != $delimiter) {
-			$string .= $word;
-		}
-	} while ($value != $delimiter);
-	$string =~ s/\0//g;
-
-	return $string;
-}
-
-#
-# read_bb(filename)
-#
-# Read the contents of the specified .bb file and return (instr, graph), where:
-#
-#   instr     : filename -> line data
-#   line data : [ line1, line2, ... ]
-#
-#   graph     :     filename -> file_data
-#   file_data : function name -> line_data
-#   line_data : [ line1, line2, ... ]
-#
-# See the gcov info pages of gcc 2.95 for a description of the .bb file format.
-#
-
-sub read_bb($)
-{
-	my ($bb_filename) = @_;
-	my $minus_one = 0x80000001;
-	my $minus_two = 0x80000002;
-	my $value;
-	my $filename;
-	my $function;
-	my $bb = {};
-	my $fileorder = {};
-	my $instr;
-	my $graph;
-	local *HANDLE;
-
-	open(HANDLE, "<", $bb_filename) or goto open_error;
-	binmode(HANDLE);
-	while (!eof(HANDLE)) {
-		$value = read_bb_value(*HANDLE, "data word");
-		goto incomplete if (!defined($value));
-		if ($value == $minus_one) {
-			# Source file name
-			graph_expect("filename");
-			$filename = read_bb_string(*HANDLE, $minus_one);
-			goto incomplete if (!defined($filename));
-		} elsif ($value == $minus_two) {
-			# Function name
-			graph_expect("function name");
-			$function = read_bb_string(*HANDLE, $minus_two);
-			goto incomplete if (!defined($function));
-		} elsif ($value > 0) {
-			# Line number
-			if (!defined($filename) || !defined($function)) {
-				warn("WARNING: unassigned line number ".
-				     "$value\n");
-				next;
-			}
-			push(@{$bb->{$function}->{$filename}}, $value);
-			graph_add_order($fileorder, $function, $filename);
-		}
-	}
-	close(HANDLE);
-
-	($instr, $graph) = graph_from_bb($bb, $fileorder, $bb_filename, 0);
-	graph_cleanup($graph);
-
-	return ($instr, $graph);
-
-open_error:
-	graph_error($bb_filename, "could not open file");
-	return undef;
-incomplete:
-	graph_error($bb_filename, "reached unexpected end of file");
-	return undef;
-}
-
-#
-# read_bbg_word(handle[, description])
-#
-# Read and return a word in .bbg format.
-#
-
-sub read_bbg_word(*;$)
-{
-	my ($handle, $desc) = @_;
-
-	return graph_read($handle, 4, $desc);
-}
-
-#
-# read_bbg_value(handle[, description])
-#
-# Read a word in .bbg format from handle and return its integer value.
-#
-
-sub read_bbg_value(*;$)
-{
-	my ($handle, $desc) = @_;
-	my $word;
-
-	$word = read_bbg_word($handle, $desc);
-	return undef if (!defined($word));
-
-	return unpack("N", $word);
-}
-
-#
-# read_bbg_string(handle)
-#
-# Read and return a string in .bbg format.
-#
-
-sub read_bbg_string(*)
-{
-	my ($handle, $desc) = @_;
-	my $length;
-	my $string;
-
-	graph_expect("string");
-	# Read string length
-	$length = read_bbg_value($handle, "string length");
-	return undef if (!defined($length));
-	if ($length == 0) {
-		return "";
-	}
-	# Read string
-	$string = graph_read($handle, $length, "string");
-	return undef if (!defined($string));
-	# Skip padding
-	graph_skip($handle, 4 - $length % 4, "string padding") or return undef;
-
-	return $string;
-}
-
-#
-# read_bbg_lines_record(handle, bbg_filename, bb, fileorder, filename,
-#                       function)
-#
-# Read a bbg format lines record from handle and add the relevant data to
-# bb and fileorder. Return filename on success, undef on error.
-#
-
-sub read_bbg_lines_record(*$$$$$)
-{
-	my ($handle, $bbg_filename, $bb, $fileorder, $filename, $function) = @_;
-	my $string;
-	my $lineno;
-
-	graph_expect("lines record");
-	# Skip basic block index
-	graph_skip($handle, 4, "basic block index") or return undef;
-	while (1) {
-		# Read line number
-		$lineno = read_bbg_value($handle, "line number");
-		return undef if (!defined($lineno));
-		if ($lineno == 0) {
-			# Got a marker for a new filename
-			graph_expect("filename");
-			$string = read_bbg_string($handle);
-			return undef if (!defined($string));
-			# Check for end of record
-			if ($string eq "") {
-				return $filename;
-			}
-			$filename = $string;
-			if (!exists($bb->{$function}->{$filename})) {
-				$bb->{$function}->{$filename} = [];
-			}
-			next;
-		}
-		# Got an actual line number
-		if (!defined($filename)) {
-			warn("WARNING: unassigned line number in ".
-			     "$bbg_filename\n");
-			next;
-		}
-		push(@{$bb->{$function}->{$filename}}, $lineno);
-		graph_add_order($fileorder, $function, $filename);
-	}
-}
-
-#
-# read_bbg(filename)
-#
-# Read the contents of the specified .bbg file and return the following mapping:
-#   graph:     filename -> file_data
-#   file_data: function name -> line_data
-#   line_data: [ line1, line2, ... ]
-#
-# See the gcov-io.h file in the SLES 9 gcc 3.3.3 source code for a description
-# of the .bbg format.
-#
-
-sub read_bbg($)
-{
-	my ($bbg_filename) = @_;
-	my $file_magic = 0x67626267;
-	my $tag_function = 0x01000000;
-	my $tag_lines = 0x01450000;
-	my $word;
-	my $tag;
-	my $length;
-	my $function;
-	my $filename;
-	my $bb = {};
-	my $fileorder = {};
-	my $instr;
-	my $graph;
-	local *HANDLE;
-
-	open(HANDLE, "<", $bbg_filename) or goto open_error;
-	binmode(HANDLE);
-	# Read magic
-	$word = read_bbg_value(*HANDLE, "file magic");
-	goto incomplete if (!defined($word));
-	# Check magic
-	if ($word != $file_magic) {
-		goto magic_error;
-	}
-	# Skip version
-	graph_skip(*HANDLE, 4, "version") or goto incomplete;
-	while (!eof(HANDLE)) {
-		# Read record tag
-		$tag = read_bbg_value(*HANDLE, "record tag");
-		goto incomplete if (!defined($tag));
-		# Read record length
-		$length = read_bbg_value(*HANDLE, "record length");
-		goto incomplete if (!defined($tag));
-		if ($tag == $tag_function) {
-			graph_expect("function record");
-			# Read function name
-			graph_expect("function name");
-			$function = read_bbg_string(*HANDLE);
-			goto incomplete if (!defined($function));
-			$filename = undef;
-			# Skip function checksum
-			graph_skip(*HANDLE, 4, "function checksum")
-				or goto incomplete;
-		} elsif ($tag == $tag_lines) {
-			# Read lines record
-			$filename = read_bbg_lines_record(HANDLE, $bbg_filename,
-					  $bb, $fileorder, $filename,
-					  $function);
-			goto incomplete if (!defined($filename));
-		} else {
-			# Skip record contents
-			graph_skip(*HANDLE, $length, "unhandled record")
-				or goto incomplete;
-		}
-	}
-	close(HANDLE);
-	($instr, $graph) = graph_from_bb($bb, $fileorder, $bbg_filename, 0);
-
-	graph_cleanup($graph);
-
-	return ($instr, $graph);
-
-open_error:
-	graph_error($bbg_filename, "could not open file");
-	return undef;
-incomplete:
-	graph_error($bbg_filename, "reached unexpected end of file");
-	return undef;
-magic_error:
-	graph_error($bbg_filename, "found unrecognized bbg file magic");
-	return undef;
-}
-
-#
-# read_gcno_word(handle[, description, peek])
-#
-# Read and return a word in .gcno format.
-#
-
-sub read_gcno_word(*;$$)
-{
-	my ($handle, $desc, $peek) = @_;
-
-	return graph_read($handle, 4, $desc, $peek);
-}
-
-#
-# read_gcno_value(handle, big_endian[, description, peek])
-#
-# Read a word in .gcno format from handle and return its integer value
-# according to the specified endianness. If PEEK is non-zero, reset file
-# position after read.
-#
-
-sub read_gcno_value(*$;$$)
-{
-	my ($handle, $big_endian, $desc, $peek) = @_;
-	my $word;
-	my $pos;
-
-	$word = read_gcno_word($handle, $desc, $peek);
-	return undef if (!defined($word));
-	if ($big_endian) {
-		return unpack("N", $word);
-	} else {
-		return unpack("V", $word);
-	}
-}
-
-#
-# read_gcno_string(handle, big_endian)
-#
-# Read and return a string in .gcno format.
-#
-
-sub read_gcno_string(*$)
-{
-	my ($handle, $big_endian) = @_;
-	my $length;
-	my $string;
-
-	graph_expect("string");
-	# Read string length
-	$length = read_gcno_value($handle, $big_endian, "string length");
-	return undef if (!defined($length));
-	if ($length == 0) {
-		return "";
-	}
-	$length *= 4;
-	# Read string
-	$string = graph_read($handle, $length, "string and padding");
-	return undef if (!defined($string));
-	$string =~ s/\0//g;
-
-	return $string;
-}
-
-#
-# read_gcno_lines_record(handle, gcno_filename, bb, fileorder, filename,
-#                        function, big_endian)
-#
-# Read a gcno format lines record from handle and add the relevant data to
-# bb and fileorder. Return filename on success, undef on error.
-#
-
-sub read_gcno_lines_record(*$$$$$$)
-{
-	my ($handle, $gcno_filename, $bb, $fileorder, $filename, $function,
-	    $big_endian) = @_;
-	my $string;
-	my $lineno;
-
-	graph_expect("lines record");
-	# Skip basic block index
-	graph_skip($handle, 4, "basic block index") or return undef;
-	while (1) {
-		# Read line number
-		$lineno = read_gcno_value($handle, $big_endian, "line number");
-		return undef if (!defined($lineno));
-		if ($lineno == 0) {
-			# Got a marker for a new filename
-			graph_expect("filename");
-			$string = read_gcno_string($handle, $big_endian);
-			return undef if (!defined($string));
-			# Check for end of record
-			if ($string eq "") {
-				return $filename;
-			}
-			$filename = $string;
-			if (!exists($bb->{$function}->{$filename})) {
-				$bb->{$function}->{$filename} = [];
-			}
-			next;
-		}
-		# Got an actual line number
-		if (!defined($filename)) {
-			warn("WARNING: unassigned line number in ".
-			     "$gcno_filename\n");
-			next;
-		}
-		# Add to list
-		push(@{$bb->{$function}->{$filename}}, $lineno);
-		graph_add_order($fileorder, $function, $filename);
-	}
-}
-
-#
-# determine_gcno_split_crc(handle, big_endian, rec_length, version)
-#
-# Determine if HANDLE refers to a .gcno file with a split checksum function
-# record format. Return non-zero in case of split checksum format, zero
-# otherwise, undef in case of read error.
-#
-
-sub determine_gcno_split_crc($$$$)
-{
-	my ($handle, $big_endian, $rec_length, $version) = @_;
-	my $strlen;
-	my $overlong_string;
-
-	return 1 if ($version >= $GCOV_VERSION_4_7_0);
-	return 1 if (is_compat($COMPAT_MODE_SPLIT_CRC));
-
-	# Heuristic:
-	# Decide format based on contents of next word in record:
-	# - pre-gcc 4.7
-	#   This is the function name length / 4 which should be
-	#   less than the remaining record length
-	# - gcc 4.7
-	#   This is a checksum, likely with high-order bits set,
-	#   resulting in a large number
-	$strlen = read_gcno_value($handle, $big_endian, undef, 1);
-	return undef if (!defined($strlen));
-	$overlong_string = 1 if ($strlen * 4 >= $rec_length - 12);
-
-	if ($overlong_string) {
-		if (is_compat_auto($COMPAT_MODE_SPLIT_CRC)) {
-			info("Auto-detected compatibility mode for split ".
-			     "checksum .gcno file format\n");
-
-			return 1;
-		} else {
-			# Sanity check
-			warn("Found overlong string in function record: ".
-			     "try '--compat split_crc'\n");
-		}
-	}
-
-	return 0;
-}
-
-#
-# read_gcno_function_record(handle, graph, big_endian, rec_length, version)
-#
-# Read a gcno format function record from handle and add the relevant data
-# to graph. Return (filename, function, artificial) on success, undef on error.
-#
-
-sub read_gcno_function_record(*$$$$$)
-{
-	my ($handle, $bb, $fileorder, $big_endian, $rec_length, $version) = @_;
-	my $filename;
-	my $function;
-	my $lineno;
-	my $lines;
-	my $artificial;
-
-	graph_expect("function record");
-	# Skip ident and checksum
-	graph_skip($handle, 8, "function ident and checksum") or return undef;
-	# Determine if this is a function record with split checksums
-	if (!defined($gcno_split_crc)) {
-		$gcno_split_crc = determine_gcno_split_crc($handle, $big_endian,
-							   $rec_length,
-							   $version);
-		return undef if (!defined($gcno_split_crc));
-	}
-	# Skip cfg checksum word in case of split checksums
-	graph_skip($handle, 4, "function cfg checksum") if ($gcno_split_crc);
-	# Read function name
-	graph_expect("function name");
-	$function = read_gcno_string($handle, $big_endian);
-	return undef if (!defined($function));
-	if ($version >= $GCOV_VERSION_8_0_0) {
-		$artificial = read_gcno_value($handle, $big_endian,
-					      "compiler-generated entity flag");
-		return undef if (!defined($artificial));
-	}
-	# Read filename
-	graph_expect("filename");
-	$filename = read_gcno_string($handle, $big_endian);
-	return undef if (!defined($filename));
-	# Read first line number
-	$lineno = read_gcno_value($handle, $big_endian, "initial line number");
-	return undef if (!defined($lineno));
-	# Skip column and ending line number
-	if ($version >= $GCOV_VERSION_8_0_0) {
-		graph_skip($handle, 4, "column number") or return undef;
-		graph_skip($handle, 4, "ending line number") or return undef;
-	}
-	# Add to list
-	push(@{$bb->{$function}->{$filename}}, $lineno);
-	graph_add_order($fileorder, $function, $filename);
-
-	return ($filename, $function, $artificial);
-}
-
-#
-# map_gcno_version
-#
-# Map version number as found in .gcno files to the format used in geninfo.
-#
-
-sub map_gcno_version($)
-{
-	my ($version) = @_;
-	my ($a, $b, $c);
-	my ($major, $minor);
-
-	$a = $version >> 24;
-	$b = $version >> 16 & 0xff;
-	$c = $version >> 8 & 0xff;
-
-	if ($a < ord('A')) {
-		$major = $a - ord('0');
-		$minor = ($b - ord('0')) * 10 + $c - ord('0');
-	} else {
-		$major = ($a - ord('A')) * 10 + $b - ord('0');
-		$minor = $c - ord('0');
-	}
-
-	return $major << 16 | $minor << 8;
-}
-
-sub remove_fn_from_hash($$)
-{
-	my ($hash, $fns) = @_;
-
-	foreach my $fn (@$fns) {
-		delete($hash->{$fn});
-	}
-}
-
-#
-# read_gcno(filename)
-#
-# Read the contents of the specified .gcno file and return the following
-# mapping:
-#   graph:    filename -> file_data
-#   file_data: function name -> line_data
-#   line_data: [ line1, line2, ... ]
-#
-# See the gcov-io.h file in the gcc 3.3 source code for a description of
-# the .gcno format.
-#
-
-sub read_gcno($)
-{
-	my ($gcno_filename) = @_;
-	my $file_magic = 0x67636e6f;
-	my $tag_function = 0x01000000;
-	my $tag_lines = 0x01450000;
-	my $big_endian;
-	my $word;
-	my $tag;
-	my $length;
-	my $filename;
-	my $function;
-	my $bb = {};
-	my $fileorder = {};
-	my $instr;
-	my $graph;
-	my $filelength;
-	my $version;
-	my $artificial;
-	my @artificial_fns;
-	local *HANDLE;
-
-	open(HANDLE, "<", $gcno_filename) or goto open_error;
-	$filelength = (stat(HANDLE))[7];
-	binmode(HANDLE);
-	# Read magic
-	$word = read_gcno_word(*HANDLE, "file magic");
-	goto incomplete if (!defined($word));
-	# Determine file endianness
-	if (unpack("N", $word) == $file_magic) {
-		$big_endian = 1;
-	} elsif (unpack("V", $word) == $file_magic) {
-		$big_endian = 0;
-	} else {
-		goto magic_error;
-	}
-	# Read version
-	$version = read_gcno_value(*HANDLE, $big_endian, "compiler version");
-	$version = map_gcno_version($version);
-	debug(sprintf("found version 0x%08x\n", $version));
-	# Skip stamp
-	graph_skip(*HANDLE, 4, "file timestamp") or goto incomplete;
-	if ($version >= $GCOV_VERSION_8_0_0) {
-		graph_skip(*HANDLE, 4, "support unexecuted blocks flag")
-			or goto incomplete;
-	}
-	while (!eof(HANDLE)) {
-		my $next_pos;
-		my $curr_pos;
-
-		# Read record tag
-		$tag = read_gcno_value(*HANDLE, $big_endian, "record tag");
-		goto incomplete if (!defined($tag));
-		# Read record length
-		$length = read_gcno_value(*HANDLE, $big_endian,
-					  "record length");
-		goto incomplete if (!defined($length));
-		# Convert length to bytes
-		$length *= 4;
-		# Calculate start of next record
-		$next_pos = tell(HANDLE);
-		goto tell_error if ($next_pos == -1);
-		$next_pos += $length;
-		# Catch garbage at the end of a gcno file
-		if ($next_pos > $filelength) {
-			debug("Overlong record: file_length=$filelength ".
-			      "rec_length=$length\n");
-			warn("WARNING: $gcno_filename: Overlong record at end ".
-			     "of file!\n");
-			last;
-		}
-		# Process record
-		if ($tag == $tag_function) {
-			($filename, $function, $artificial) =
-				read_gcno_function_record(
-				*HANDLE, $bb, $fileorder, $big_endian,
-				$length, $version);
-			goto incomplete if (!defined($function));
-			push(@artificial_fns, $function) if ($artificial);
-		} elsif ($tag == $tag_lines) {
-			# Read lines record
-			$filename = read_gcno_lines_record(*HANDLE,
-					$gcno_filename, $bb, $fileorder,
-					$filename, $function, $big_endian);
-			goto incomplete if (!defined($filename));
-		} else {
-			# Skip record contents
-			graph_skip(*HANDLE, $length, "unhandled record")
-				or goto incomplete;
-		}
-		# Ensure that we are at the start of the next record
-		$curr_pos = tell(HANDLE);
-		goto tell_error if ($curr_pos == -1);
-		next if ($curr_pos == $next_pos);
-		goto record_error if ($curr_pos > $next_pos);
-		graph_skip(*HANDLE, $next_pos - $curr_pos,
-			   "unhandled record content")
-			or goto incomplete;
-	}
-	close(HANDLE);
-
-	# Remove artificial functions from result data
-	remove_fn_from_hash($bb, \@artificial_fns);
-	remove_fn_from_hash($fileorder, \@artificial_fns);
-
-	($instr, $graph) = graph_from_bb($bb, $fileorder, $gcno_filename, 1);
-	graph_cleanup($graph);
-
-	return ($instr, $graph);
-
-open_error:
-	graph_error($gcno_filename, "could not open file");
-	return undef;
-incomplete:
-	graph_error($gcno_filename, "reached unexpected end of file");
-	return undef;
-magic_error:
-	graph_error($gcno_filename, "found unrecognized gcno file magic");
-	return undef;
-tell_error:
-	graph_error($gcno_filename, "could not determine file position");
-	return undef;
-record_error:
-	graph_error($gcno_filename, "found unrecognized record format");
-	return undef;
-}
-
-sub debug($)
-{
-	my ($msg) = @_;
-
-	return if (!$debug);
-	print(STDERR "DEBUG: $msg");
-}
-
-#
-# get_gcov_capabilities
-#
-# Determine the list of available gcov options.
-#
-
-sub get_gcov_capabilities()
-{
-	my $help = `$gcov_tool --help`;
-	my %capabilities;
-	my %short_option_translations = (
-		'a' => 'all-blocks',
-		'b' => 'branch-probabilities',
-		'c' => 'branch-counts',
-		'f' => 'function-summaries',
-		'h' => 'help',
-		'l' => 'long-file-names',
-		'n' => 'no-output',
-		'o' => 'object-directory',
-		'p' => 'preserve-paths',
-		'u' => 'unconditional-branches',
-		'v' => 'version',
-		'x' => 'hash-filenames',
-	);
-
-	foreach (split(/\n/, $help)) {
-		my $capability;
-		if (/--(\S+)/) {
-			$capability = $1;
-		} else {
-			# If the line provides a short option, translate it.
-			next if (!/^\s*-(\S)\s/);
-			$capability = $short_option_translations{$1};
-			next if not defined($capability);
-		}
-		next if ($capability eq 'help');
-		next if ($capability eq 'version');
-		next if ($capability eq 'object-directory');
-
-		$capabilities{$capability} = 1;
-		debug("gcov has capability '$capability'\n");
-	}
-
-	return \%capabilities;
-}
-
-#
-# parse_ignore_errors(@ignore_errors)
-#
-# Parse user input about which errors to ignore.
-#
-
-sub parse_ignore_errors(@)
-{
-	my (@ignore_errors) = @_;
-	my @items;
-	my $item;
-
-	return if (!@ignore_errors);
-
-	foreach $item (@ignore_errors) {
-		$item =~ s/\s//g;
-		if ($item =~ /,/) {
-			# Split and add comma-separated parameters
-			push(@items, split(/,/, $item));
-		} else {
-			# Add single parameter
-			push(@items, $item);
-		}
-	}
-	foreach $item (@items) {
-		my $item_id = $ERROR_ID{lc($item)};
-
-		if (!defined($item_id)) {
-			die("ERROR: unknown argument for --ignore-errors: ".
-			    "$item\n");
-		}
-		$ignore[$item_id] = 1;
-	}
-}
-
-#
-# is_external(filename)
-#
-# Determine if a file is located outside of the specified data directories.
-#
-
-sub is_external($)
-{
-	my ($filename) = @_;
-	my $dir;
-
-	foreach $dir (@internal_dirs) {
-		return 0 if ($filename =~ /^\Q$dir\/\E/);
-	}
-	return 1;
-}
-
-#
-# compat_name(mode)
-#
-# Return the name of compatibility mode MODE.
-#
-
-sub compat_name($)
-{
-	my ($mode) = @_;
-	my $name = $COMPAT_MODE_TO_NAME{$mode};
-
-	return $name if (defined($name));
-
-	return "<unknown>";
-}
-
-#
-# parse_compat_modes(opt)
-#
-# Determine compatibility mode settings.
-#
-
-sub parse_compat_modes($)
-{
-	my ($opt) = @_;
-	my @opt_list;
-	my %specified;
-
-	# Initialize with defaults
-	%compat_value = %COMPAT_MODE_DEFAULTS;
-
-	# Add old style specifications
-	if (defined($opt_compat_libtool)) {
-		$compat_value{$COMPAT_MODE_LIBTOOL} =
-			$opt_compat_libtool ? $COMPAT_VALUE_ON
-					    : $COMPAT_VALUE_OFF;
-	}
-
-	# Parse settings
-	if (defined($opt)) {
-		@opt_list = split(/\s*,\s*/, $opt);
-	}
-	foreach my $directive (@opt_list) {
-		my ($mode, $value);
-
-		# Either
-		#   mode=off|on|auto or
-		#   mode (implies on)
-		if ($directive !~ /^(\w+)=(\w+)$/ &&
-		    $directive !~ /^(\w+)$/) {
-			die("ERROR: Unknown compatibility mode specification: ".
-			    "$directive!\n");
-		}
-		# Determine mode
-		$mode = $COMPAT_NAME_TO_MODE{lc($1)};
-		if (!defined($mode)) {
-			die("ERROR: Unknown compatibility mode '$1'!\n");
-		}
-		$specified{$mode} = 1;
-		# Determine value
-		if (defined($2)) {
-			$value = $COMPAT_NAME_TO_VALUE{lc($2)};
-			if (!defined($value)) {
-				die("ERROR: Unknown compatibility mode ".
-				    "value '$2'!\n");
-			}
-		} else {
-			$value = $COMPAT_VALUE_ON;
-		}
-		$compat_value{$mode} = $value;
-	}
-	# Perform auto-detection
-	foreach my $mode (sort(keys(%compat_value))) {
-		my $value = $compat_value{$mode};
-		my $is_autodetect = "";
-		my $name = compat_name($mode);
-
-		if ($value == $COMPAT_VALUE_AUTO) {
-			my $autodetect = $COMPAT_MODE_AUTO{$mode};
-
-			if (!defined($autodetect)) {
-				die("ERROR: No auto-detection for ".
-				    "mode '$name' available!\n");
-			}
-
-			if (ref($autodetect) eq "CODE") {
-				$value = &$autodetect();
-				$compat_value{$mode} = $value;
-				$is_autodetect = " (auto-detected)";
-			}
-		}
-
-		if ($specified{$mode}) {
-			if ($value == $COMPAT_VALUE_ON) {
-				info("Enabling compatibility mode ".
-				     "'$name'$is_autodetect\n");
-			} elsif ($value == $COMPAT_VALUE_OFF) {
-				info("Disabling compatibility mode ".
-				     "'$name'$is_autodetect\n");
-			} else {
-				info("Using delayed auto-detection for ".
-				     "compatibility mode ".
-				     "'$name'\n");
-			}
-		}
-	}
-}
-
-sub compat_hammer_autodetect()
-{
-        if ($gcov_version_string =~ /suse/i && $gcov_version == 0x30303 ||
-            $gcov_version_string =~ /mandrake/i && $gcov_version == 0x30302)
-	{
-		info("Auto-detected compatibility mode for GCC 3.3 (hammer)\n");
-		return $COMPAT_VALUE_ON;
-	}
-	return $COMPAT_VALUE_OFF;
-}
-
-#
-# is_compat(mode)
-#
-# Return non-zero if compatibility mode MODE is enabled.
-#
-
-sub is_compat($)
-{
-	my ($mode) = @_;
-
-	return 1 if ($compat_value{$mode} == $COMPAT_VALUE_ON);
-	return 0;
-}
-
-#
-# is_compat_auto(mode)
-#
-# Return non-zero if compatibility mode MODE is set to auto-detect.
-#
-
-sub is_compat_auto($)
-{
-	my ($mode) = @_;
-
-	return 1 if ($compat_value{$mode} == $COMPAT_VALUE_AUTO);
-	return 0;
-}
diff --git a/ThirdParty/lcov/bin/genpng b/ThirdParty/lcov/bin/genpng
deleted file mode 100755
index 943a49d5f0454e01aa12430fbc97a44805ac404e..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/genpng
+++ /dev/null
@@ -1,389 +0,0 @@
-#!/usr/bin/env perl
-#
-#   Copyright (c) International Business Machines  Corp., 2002
-#
-#   This program is free software;  you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or (at
-#   your option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY;  without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   General Public License for more details.                 
-#
-#   You should have received a copy of the GNU General Public License
-#   along with this program;  if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#
-# genpng
-#
-#   This script creates an overview PNG image of a source code file by
-#   representing each source code character by a single pixel.
-#
-#   Note that the Perl module GD.pm is required for this script to work.
-#   It may be obtained from http://www.cpan.org
-#
-# History:
-#   2002-08-26: created by Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-#
-
-use strict;
-use warnings;
-use File::Basename; 
-use Getopt::Long;
-use Cwd qw/abs_path/;
-
-
-# Constants
-our $tool_dir		= abs_path(dirname($0));
-our $lcov_version	= "LCOV version 1.14";
-our $lcov_url		= "http://ltp.sourceforge.net/coverage/lcov.php";
-our $tool_name		= basename($0);
-
-
-# Prototypes
-sub gen_png($$$@);
-sub check_and_load_module($);
-sub genpng_print_usage(*);
-sub genpng_process_file($$$$);
-sub genpng_warn_handler($);
-sub genpng_die_handler($);
-
-
-#
-# Code entry point
-#
-
-# Check whether required module GD.pm is installed
-if (check_and_load_module("GD"))
-{
-	# Note: cannot use die() to print this message because inserting this
-	# code into another script via do() would not fail as required!
-	print(STDERR <<END_OF_TEXT)
-ERROR: required module GD.pm not found on this system (see www.cpan.org).
-END_OF_TEXT
-	;
-	exit(2);
-}
-
-# Check whether we're called from the command line or from another script
-if (!caller)
-{
-	my $filename;
-	my $tab_size = 4;
-	my $width = 80;
-	my $out_filename;
-	my $help;
-	my $version;
-
-	$SIG{__WARN__} = \&genpng_warn_handler;
-	$SIG{__DIE__} = \&genpng_die_handler;
-
-	# Parse command line options
-	if (!GetOptions("tab-size=i" => \$tab_size,
-			"width=i" => \$width,
-			"output-filename=s" => \$out_filename,
-			"help" => \$help,
-			"version" => \$version))
-	{
-		print(STDERR "Use $tool_name --help to get usage ".
-		      "information\n");
-		exit(1);
-	}
-
-	$filename = $ARGV[0];
-
-	# Check for help flag
-	if ($help)
-	{
-		genpng_print_usage(*STDOUT);
-		exit(0);
-	}
-
-	# Check for version flag
-	if ($version)
-	{
-		print("$tool_name: $lcov_version\n");
-		exit(0);
-	}
-
-	# Check options
-	if (!$filename)
-	{
-		die("No filename specified\n");
-	}
-
-	# Check for output filename
-	if (!$out_filename)
-	{
-		$out_filename = "$filename.png";
-	}
-
-	genpng_process_file($filename, $out_filename, $width, $tab_size);
-	exit(0);
-}
-
-
-#
-# genpng_print_usage(handle)
-#
-# Write out command line usage information to given filehandle.
-#
-
-sub genpng_print_usage(*)
-{
-	local *HANDLE = $_[0];
-
-	print(HANDLE <<END_OF_USAGE)
-Usage: $tool_name [OPTIONS] SOURCEFILE
-
-Create an overview image for a given source code file of either plain text
-or .gcov file format.
-
-  -h, --help                        Print this help, then exit
-  -v, --version                     Print version number, then exit
-  -t, --tab-size TABSIZE            Use TABSIZE spaces in place of tab
-  -w, --width WIDTH                 Set width of output image to WIDTH pixel
-  -o, --output-filename FILENAME    Write image to FILENAME
-
-For more information see: $lcov_url
-END_OF_USAGE
-	;
-}
-
-
-#
-# check_and_load_module(module_name)
-#
-# Check whether a module by the given name is installed on this system
-# and make it known to the interpreter if available. Return undefined if it
-# is installed, an error message otherwise.
-#
-
-sub check_and_load_module($)
-{
-	eval("use $_[0];");
-	return $@;
-}
-
-
-#
-# genpng_process_file(filename, out_filename, width, tab_size)
-#
-
-sub genpng_process_file($$$$)
-{
-	my $filename		= $_[0];
-	my $out_filename	= $_[1];
-	my $width		= $_[2];
-	my $tab_size		= $_[3];
-	local *HANDLE;
-	my @source;
-
-	open(HANDLE, "<", $filename)
-		or die("ERROR: cannot open $filename!\n");
-
-	# Check for .gcov filename extension
-	if ($filename =~ /^(.*).gcov$/)
-	{
-		# Assume gcov text format
-		while (<HANDLE>)
-		{
-			if (/^\t\t(.*)$/)
-			{
-				# Uninstrumented line
-				push(@source, ":$1");
-			}
-			elsif (/^      ######    (.*)$/)
-			{
-				# Line with zero execution count
-				push(@source, "0:$1");
-			}
-			elsif (/^( *)(\d*)    (.*)$/)
-			{
-				# Line with positive execution count
-				push(@source, "$2:$3");
-			}
-		}
-	}
-	else
-	{
-		# Plain text file
-		while (<HANDLE>) { push(@source, ":$_"); }
-	}
-	close(HANDLE);
-
-	gen_png($out_filename, $width, $tab_size, @source);
-}
-
-
-#
-# gen_png(filename, width, tab_size, source)
-#
-# Write an overview PNG file to FILENAME. Source code is defined by SOURCE
-# which is a list of lines <count>:<source code> per source code line.
-# The output image will be made up of one pixel per character of source,
-# coloring will be done according to execution counts. WIDTH defines the
-# image width. TAB_SIZE specifies the number of spaces to use as replacement
-# string for tabulator signs in source code text.
-#
-# Die on error.
-#
-
-sub gen_png($$$@)
-{
-	my $filename = shift(@_);	# Filename for PNG file
-	my $overview_width = shift(@_);	# Imagewidth for image
-	my $tab_size = shift(@_);	# Replacement string for tab signs
-	my @source = @_;	# Source code as passed via argument 2
-	my $height;		# Height as define by source size
-	my $overview;		# Source code overview image data
-	my $col_plain_back;	# Color for overview background
-	my $col_plain_text;	# Color for uninstrumented text
-	my $col_cov_back;	# Color for background of covered lines
-	my $col_cov_text;	# Color for text of covered lines
-	my $col_nocov_back;	# Color for background of lines which
-				# were not covered (count == 0)
-	my $col_nocov_text;	# Color for test of lines which were not
-				# covered (count == 0)
-	my $col_hi_back;	# Color for background of highlighted lines
-	my $col_hi_text;	# Color for text of highlighted lines
-	my $line;		# Current line during iteration
-	my $row = 0;		# Current row number during iteration
-	my $column;		# Current column number during iteration
-	my $color_text;		# Current text color during iteration
-	my $color_back;		# Current background color during iteration
-	my $last_count;		# Count of last processed line
-	my $count;		# Count of current line
-	my $source;		# Source code of current line
-	my $replacement;	# Replacement string for tabulator chars
-	local *PNG_HANDLE;	# Handle for output PNG file
-
-	# Handle empty source files
-	if (!@source) {
-		@source = ( "" );
-	}
-	$height = scalar(@source);
-	# Create image
-	$overview = new GD::Image($overview_width, $height)
-		or die("ERROR: cannot allocate overview image!\n");
-
-	# Define colors
-	$col_plain_back	= $overview->colorAllocate(0xff, 0xff, 0xff);
-	$col_plain_text	= $overview->colorAllocate(0xaa, 0xaa, 0xaa);
-	$col_cov_back	= $overview->colorAllocate(0xaa, 0xa7, 0xef);
-	$col_cov_text	= $overview->colorAllocate(0x5d, 0x5d, 0xea);
-	$col_nocov_back = $overview->colorAllocate(0xff, 0x00, 0x00);
-	$col_nocov_text = $overview->colorAllocate(0xaa, 0x00, 0x00);
-	$col_hi_back = $overview->colorAllocate(0x00, 0xff, 0x00);
-	$col_hi_text = $overview->colorAllocate(0x00, 0xaa, 0x00);
-
-	# Visualize each line
-	foreach $line (@source)
-	{
-		# Replace tabs with spaces to keep consistent with source
-		# code view
-		while ($line =~ /^([^\t]*)(\t)/)
-		{
-			$replacement = " "x($tab_size - ((length($1) - 1) %
-				       $tab_size));
-			$line =~ s/^([^\t]*)(\t)/$1$replacement/;
-		}
-
-		# Skip lines which do not follow the <count>:<line>
-		# specification, otherwise $1 = count, $2 = source code
-		if (!($line =~ /(\*?)(\d*):(.*)$/)) { next; }
-		$count = $2;
-		$source = $3;
-
-		# Decide which color pair to use
-
-		# If this line was not instrumented but the one before was,
-		# take the color of that line to widen color areas in
-		# resulting image
-		if (($count eq "") && defined($last_count) &&
-		    ($last_count ne ""))
-		{
-			$count = $last_count;
-		}
-
-		if ($count eq "")
-		{
-			# Line was not instrumented
-			$color_text = $col_plain_text;
-			$color_back = $col_plain_back;
-		}
-		elsif ($count == 0)
-		{
-			# Line was instrumented but not executed
-			$color_text = $col_nocov_text;
-			$color_back = $col_nocov_back;
-		}
-		elsif ($1 eq "*")
-		{
-			# Line was highlighted
-			$color_text = $col_hi_text;
-			$color_back = $col_hi_back;
-		}
-		else
-		{
-			# Line was instrumented and executed
-			$color_text = $col_cov_text;
-			$color_back = $col_cov_back;
-		}
-
-		# Write one pixel for each source character
-		$column = 0;
-		foreach (split("", $source))
-		{
-			# Check for width
-			if ($column >= $overview_width) { last; }
-
-			if ($_ eq " ")
-			{
-				# Space
-				$overview->setPixel($column++, $row,
-						    $color_back);
-			}
-			else
-			{
-				# Text
-				$overview->setPixel($column++, $row,
-						    $color_text);
-			}
-		}
-
-		# Fill rest of line		
-		while ($column < $overview_width)
-		{
-			$overview->setPixel($column++, $row, $color_back);
-		}
-
-		$last_count = $2;
-
-		$row++;
-	}
-
-	# Write PNG file
-	open (PNG_HANDLE, ">", $filename)
-		or die("ERROR: cannot write png file $filename!\n");
-	binmode(*PNG_HANDLE);
-	print(PNG_HANDLE $overview->png());
-	close(PNG_HANDLE);
-}
-
-sub genpng_warn_handler($)
-{
-	my ($msg) = @_;
-
-	warn("$tool_name: $msg");
-}
-
-sub genpng_die_handler($)
-{
-	my ($msg) = @_;
-
-	die("$tool_name: $msg");
-}
diff --git a/ThirdParty/lcov/bin/get_changes.sh b/ThirdParty/lcov/bin/get_changes.sh
deleted file mode 100755
index ec373b4f4f023207c5aed6383f293a5c8a4ab4e0..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/get_changes.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-#
-# Usage: get_changes.sh
-#
-# Print lcov change log information as provided by Git
-
-TOOLDIR=$(cd $(dirname $0) >/dev/null ; pwd)
-
-cd $TOOLDIR
-
-if ! git --no-pager log --no-merges --decorate=short --color=never 2>/dev/null ; then
-	cat "$TOOLDIR/../CHANGES" 2>/dev/null
-fi 
diff --git a/ThirdParty/lcov/bin/get_version.sh b/ThirdParty/lcov/bin/get_version.sh
deleted file mode 100755
index ac5a36314699c7ccfa374d14a1c6e5ab68a62270..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/get_version.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env bash
-#
-# Usage: get_version.sh --version|--release|--full
-#
-# Print lcov version or release information as provided by Git, .version
-# or a fallback.
-
-TOOLDIR=$(cd $(dirname $0) >/dev/null ; pwd)
-GITVER=$(cd $TOOLDIR ; git describe --tags 2>/dev/null)
-
-if [ -z "$GITVER" ] ; then
-	# Get version information from file
-	if [ -e "$TOOLDIR/../.version" ] ; then
-		source "$TOOLDIR/../.version"
-	fi
-else
-	# Get version information from git
-	FULL=${GITVER:1}
-	VERSION=${GITVER%%-*}
-	VERSION=${VERSION:1}
-	if [ "${GITVER#*-}" != "$GITVER" ] ; then
-		RELEASE=${GITVER#*-}
-		RELEASE=${RELEASE/-/.}
-	fi
-fi
-
-# Fallback
-[ -z "$VERSION" ] && VERSION="1.0"
-[ -z "$RELEASE" ] && RELEASE="1"
-[ -z "$FULL" ]    && FULL="$VERSION"
-
-[ "$1" == "--version" ] && echo -n "$VERSION"
-[ "$1" == "--release" ] && echo -n "$RELEASE"
-[ "$1" == "--full"    ] && echo -n "$FULL"
diff --git a/ThirdParty/lcov/bin/install.sh b/ThirdParty/lcov/bin/install.sh
deleted file mode 100755
index 2cdef45b6ca50fe0f745140c860f15b06e883ede..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/install.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env bash
-#
-# install.sh [--uninstall] sourcefile targetfile [install options]
-#
-
-
-# Check for uninstall option
-if test "x$1" == "x--uninstall" ; then
-  UNINSTALL=true
-  SOURCE=$2
-  TARGET=$3
-  shift 3
-else
-  UNINSTALL=false
-  SOURCE=$1
-  TARGET=$2
-  shift 2
-fi
-
-# Check usage
-if test -z "$SOURCE" || test -z "$TARGET" ; then
-  echo Usage: install.sh [--uninstall] source target [install options] >&2
-  exit 1
-fi
-
-
-#
-# do_install(SOURCE_FILE, TARGET_FILE)
-#
-
-do_install()
-{
-  local SOURCE=$1
-  local TARGET=$2
-  local PARAMS=$3
-
-  install -d $(dirname $TARGET)
-  install -p $PARAMS $SOURCE $TARGET
-  if [ -n "$LCOV_PERL_PATH" ] ; then
-    # Replace Perl interpreter specification
-    sed -e "1 s%^#\!.*perl.*$%#\!$LCOV_PERL_PATH%" -i $TARGET
-  fi
-}
-
-
-#
-# do_uninstall(SOURCE_FILE, TARGET_FILE)
-#
-
-do_uninstall()
-{
-  local SOURCE=$1
-  local TARGET=$2
-
-  # Does target exist?
-  if test -r $TARGET ; then
-    # Is target of the same version as this package?
-    if diff -I '^our \$lcov_version' -I '^\.TH ' -I '^#!' $SOURCE $TARGET >/dev/null; then
-      rm -f $TARGET
-    else
-      echo WARNING: Skipping uninstall for $TARGET - versions differ! >&2
-    fi
-  else
-    echo WARNING: Skipping uninstall for $TARGET - not installed! >&2
-  fi
-}
-
-
-# Call sub routine
-if $UNINSTALL ; then
-  do_uninstall $SOURCE $TARGET
-else
-  do_install $SOURCE $TARGET "$*"
-fi
-
-exit 0
diff --git a/ThirdParty/lcov/bin/lcov b/ThirdParty/lcov/bin/lcov
deleted file mode 100755
index 33c9f4d16e718f2f76e83d090b2ed2beeec4435f..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/lcov
+++ /dev/null
@@ -1,4329 +0,0 @@
-#!/usr/bin/env perl
-#
-#   Copyright (c) International Business Machines  Corp., 2002,2012
-#
-#   This program is free software;  you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or (at
-#   your option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY;  without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   General Public License for more details.                 
-#
-#   You should have received a copy of the GNU General Public License
-#   along with this program;  if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#
-# lcov
-#
-#   This is a wrapper script which provides a single interface for accessing
-#   LCOV coverage data.
-#
-#
-# History:
-#   2002-08-29 created by Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-#                         IBM Lab Boeblingen
-#   2002-09-05 / Peter Oberparleiter: implemented --kernel-directory +
-#                multiple directories
-#   2002-10-16 / Peter Oberparleiter: implemented --add-tracefile option
-#   2002-10-17 / Peter Oberparleiter: implemented --extract option
-#   2002-11-04 / Peter Oberparleiter: implemented --list option
-#   2003-03-07 / Paul Larson: Changed to make it work with the latest gcov 
-#                kernel patch.  This will break it with older gcov-kernel
-#                patches unless you change the value of $gcovmod in this script
-#   2003-04-07 / Peter Oberparleiter: fixed bug which resulted in an error
-#                when trying to combine .info files containing data without
-#                a test name
-#   2003-04-10 / Peter Oberparleiter: extended Paul's change so that LCOV
-#                works both with the new and the old gcov-kernel patch
-#   2003-04-10 / Peter Oberparleiter: added $gcov_dir constant in anticipation
-#                of a possible move of the gcov kernel directory to another
-#                file system in a future version of the gcov-kernel patch
-#   2003-04-15 / Paul Larson: make info write to STDERR, not STDOUT
-#   2003-04-15 / Paul Larson: added --remove option
-#   2003-04-30 / Peter Oberparleiter: renamed --reset to --zerocounters
-#                to remove naming ambiguity with --remove
-#   2003-04-30 / Peter Oberparleiter: adjusted help text to include --remove
-#   2003-06-27 / Peter Oberparleiter: implemented --diff
-#   2003-07-03 / Peter Oberparleiter: added line checksum support, added
-#                --no-checksum
-#   2003-12-11 / Laurent Deniel: added --follow option
-#   2004-03-29 / Peter Oberparleiter: modified --diff option to better cope with
-#                ambiguous patch file entries, modified --capture option to use
-#                modprobe before insmod (needed for 2.6)
-#   2004-03-30 / Peter Oberparleiter: added --path option
-#   2004-08-09 / Peter Oberparleiter: added configuration file support
-#   2008-08-13 / Peter Oberparleiter: added function coverage support
-#
-
-use strict;
-use warnings;
-use File::Basename;
-use File::Path;
-use File::Find;
-use File::Temp qw /tempdir/;
-use File::Spec::Functions qw /abs2rel canonpath catdir catfile catpath
-			      file_name_is_absolute rootdir splitdir splitpath/;
-use Getopt::Long;
-use Cwd qw /abs_path getcwd/;
-
-
-# Global constants
-our $tool_dir		= abs_path(dirname($0));
-our $lcov_version	= "LCOV version 1.14";
-our $lcov_url		= "http://ltp.sourceforge.net/coverage/lcov.php";
-our $tool_name		= basename($0);
-
-# Directory containing gcov kernel files
-our $gcov_dir;
-
-# Where to create temporary directories
-our $tmp_dir;
-
-# Internal constants
-our $GKV_PROC = 0;	# gcov-kernel data in /proc via external patch
-our $GKV_SYS = 1;	# gcov-kernel data in /sys via vanilla 2.6.31+
-our @GKV_NAME = ( "external", "upstream" );
-our $pkg_gkv_file = ".gcov_kernel_version";
-our $pkg_build_file = ".build_directory";
-
-# Branch data combination types
-our $BR_SUB = 0;
-our $BR_ADD = 1;
-
-# Prototypes
-sub print_usage(*);
-sub check_options();
-sub userspace_reset();
-sub userspace_capture();
-sub kernel_reset();
-sub kernel_capture();
-sub kernel_capture_initial();
-sub package_capture();
-sub add_traces();
-sub read_info_file($);
-sub get_info_entry($);
-sub set_info_entry($$$$$$$$$;$$$$$$);
-sub add_counts($$);
-sub merge_checksums($$$);
-sub combine_info_entries($$$);
-sub combine_info_files($$);
-sub write_info_file(*$);
-sub extract();
-sub remove();
-sub list();
-sub get_common_filename($$);
-sub read_diff($);
-sub diff();
-sub system_no_output($@);
-sub read_config($);
-sub apply_config($);
-sub info(@);
-sub create_temp_dir();
-sub transform_pattern($);
-sub warn_handler($);
-sub die_handler($);
-sub abort_handler($);
-sub temp_cleanup();
-sub setup_gkv();
-sub get_overall_line($$$$);
-sub print_overall_rate($$$$$$$$$);
-sub lcov_geninfo(@);
-sub create_package($$$;$);
-sub get_func_found_and_hit($);
-sub summary();
-sub rate($$;$$$);
-
-# Global variables & initialization
-our @directory;		# Specifies where to get coverage data from
-our @kernel_directory;	# If set, captures only from specified kernel subdirs
-our @add_tracefile;	# If set, reads in and combines all files in list
-our $list;		# If set, list contents of tracefile
-our $extract;		# If set, extracts parts of tracefile
-our $remove;		# If set, removes parts of tracefile
-our $diff;		# If set, modifies tracefile according to diff
-our $reset;		# If set, reset all coverage data to zero
-our $capture;		# If set, capture data
-our $output_filename;	# Name for file to write coverage data to
-our $test_name = "";	# Test case name
-our $quiet = "";	# If set, suppress information messages
-our $help;		# Help option flag
-our $version;		# Version option flag
-our $convert_filenames;	# If set, convert filenames when applying diff
-our $strip;		# If set, strip leading directories when applying diff
-our $temp_dir_name;	# Name of temporary directory
-our $cwd = `pwd`;	# Current working directory
-our $data_stdout;	# If set, indicates that data is written to stdout
-our $follow;		# If set, indicates that find shall follow links
-our $diff_path = "";	# Path removed from tracefile when applying diff
-our $base_directory;	# Base directory (cwd of gcc during compilation)
-our $checksum;		# If set, calculate a checksum for each line
-our $no_checksum;	# If set, don't calculate a checksum for each line
-our $compat_libtool;	# If set, indicates that libtool mode is to be enabled
-our $no_compat_libtool;	# If set, indicates that libtool mode is to be disabled
-our $gcov_tool;
-our @opt_ignore_errors;
-our $initial;
-our @include_patterns; # List of source file patterns to include
-our @exclude_patterns; # List of source file patterns to exclude
-our $no_recursion = 0;
-our $to_package;
-our $from_package;
-our $maxdepth;
-our $no_markers;
-our $config;		# Configuration file contents
-chomp($cwd);
-our @temp_dirs;
-our $gcov_gkv;		# gcov kernel support version found on machine
-our $opt_derive_func_data;
-our $opt_debug;
-our $opt_list_full_path;
-our $opt_no_list_full_path;
-our $opt_list_width = 80;
-our $opt_list_truncate_max = 20;
-our $opt_external;
-our $opt_no_external;
-our $opt_config_file;
-our %opt_rc;
-our @opt_summary;
-our $opt_compat;
-our $ln_overall_found;
-our $ln_overall_hit;
-our $fn_overall_found;
-our $fn_overall_hit;
-our $br_overall_found;
-our $br_overall_hit;
-our $func_coverage = 1;
-our $br_coverage = 0;
-
-
-#
-# Code entry point
-#
-
-$SIG{__WARN__} = \&warn_handler;
-$SIG{__DIE__} = \&die_handler;
-$SIG{'INT'} = \&abort_handler;
-$SIG{'QUIT'} = \&abort_handler;
-
-# Check command line for a configuration file name
-Getopt::Long::Configure("pass_through", "no_auto_abbrev");
-GetOptions("config-file=s" => \$opt_config_file,
-	   "rc=s%" => \%opt_rc);
-Getopt::Long::Configure("default");
-
-{
-	# Remove spaces around rc options
-	my %new_opt_rc;
-
-	while (my ($key, $value) = each(%opt_rc)) {
-		$key =~ s/^\s+|\s+$//g;
-		$value =~ s/^\s+|\s+$//g;
-
-		$new_opt_rc{$key} = $value;
-	}
-	%opt_rc = %new_opt_rc;
-}
-
-# Read configuration file if available
-if (defined($opt_config_file)) {
-	$config = read_config($opt_config_file);
-} elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc"))
-{
-	$config = read_config($ENV{"HOME"}."/.lcovrc");
-}
-elsif (-r "/etc/lcovrc")
-{
-	$config = read_config("/etc/lcovrc");
-} elsif (-r "/usr/local/etc/lcovrc")
-{
-	$config = read_config("/usr/local/etc/lcovrc");
-}
-
-if ($config || %opt_rc)
-{
-	# Copy configuration file and --rc values to variables
-	apply_config({
-		"lcov_gcov_dir"		=> \$gcov_dir,
-		"lcov_tmp_dir"		=> \$tmp_dir,
-		"lcov_list_full_path"	=> \$opt_list_full_path,
-		"lcov_list_width"	=> \$opt_list_width,
-		"lcov_list_truncate_max"=> \$opt_list_truncate_max,
-		"lcov_branch_coverage"	=> \$br_coverage,
-		"lcov_function_coverage"=> \$func_coverage,
-	});
-}
-
-# Parse command line options
-if (!GetOptions("directory|d|di=s" => \@directory,
-		"add-tracefile|a=s" => \@add_tracefile,
-		"list|l=s" => \$list,
-		"kernel-directory|k=s" => \@kernel_directory,
-		"extract|e=s" => \$extract,
-		"remove|r=s" => \$remove,
-		"diff=s" => \$diff,
-		"convert-filenames" => \$convert_filenames,
-		"strip=i" => \$strip,
-		"capture|c" => \$capture,
-		"output-file|o=s" => \$output_filename,
-		"test-name|t=s" => \$test_name,
-		"zerocounters|z" => \$reset,
-		"quiet|q" => \$quiet,
-		"help|h|?" => \$help,
-		"version|v" => \$version,
-		"follow|f" => \$follow,
-		"path=s" => \$diff_path,
-		"base-directory|b=s" => \$base_directory,
-		"checksum" => \$checksum,
-		"no-checksum" => \$no_checksum,
-		"compat-libtool" => \$compat_libtool,
-		"no-compat-libtool" => \$no_compat_libtool,
-		"gcov-tool=s" => \$gcov_tool,
-		"ignore-errors=s" => \@opt_ignore_errors,
-		"initial|i" => \$initial,
-		"include=s" => \@include_patterns,
-		"exclude=s" => \@exclude_patterns,
-		"no-recursion" => \$no_recursion,
-		"to-package=s" => \$to_package,
-		"from-package=s" => \$from_package,
-		"no-markers" => \$no_markers,
-		"derive-func-data" => \$opt_derive_func_data,
-		"debug" => \$opt_debug,
-		"list-full-path" => \$opt_list_full_path,
-		"no-list-full-path" => \$opt_no_list_full_path,
-		"external" => \$opt_external,
-		"no-external" => \$opt_no_external,
-		"summary=s" => \@opt_summary,
-		"compat=s" => \$opt_compat,
-		"config-file=s" => \$opt_config_file,
-		"rc=s%" => \%opt_rc,
-		))
-{
-	print(STDERR "Use $tool_name --help to get usage information\n");
-	exit(1);
-}
-else
-{
-	# Merge options
-	if (defined($no_checksum))
-	{
-		$checksum = ($no_checksum ? 0 : 1);
-		$no_checksum = undef;
-	}
-
-	if (defined($no_compat_libtool))
-	{
-		$compat_libtool = ($no_compat_libtool ? 0 : 1);
-		$no_compat_libtool = undef;
-	}
-
-	if (defined($opt_no_list_full_path))
-	{
-		$opt_list_full_path = ($opt_no_list_full_path ? 0 : 1);
-		$opt_no_list_full_path = undef;
-	}
-
-	if (defined($opt_no_external)) {
-		$opt_external = 0;
-		$opt_no_external = undef;
-	}
-}
-
-# Check for help option
-if ($help)
-{
-	print_usage(*STDOUT);
-	exit(0);
-}
-
-# Check for version option
-if ($version)
-{
-	print("$tool_name: $lcov_version\n");
-	exit(0);
-}
-
-# Check list width option
-if ($opt_list_width <= 40) {
-	die("ERROR: lcov_list_width parameter out of range (needs to be ".
-	    "larger than 40)\n");
-}
-
-# Normalize --path text
-$diff_path =~ s/\/$//;
-
-if ($follow)
-{
-	$follow = "-follow";
-}
-else
-{
-	$follow = "";
-}
-
-if ($no_recursion)
-{
-	$maxdepth = "-maxdepth 1";
-}
-else
-{
-	$maxdepth = "";
-}
-
-# Check for valid options
-check_options();
-
-# Only --extract, --remove and --diff allow unnamed parameters
-if (@ARGV && !($extract || $remove || $diff || @opt_summary))
-{
-	die("Extra parameter found: '".join(" ", @ARGV)."'\n".
-	    "Use $tool_name --help to get usage information\n");
-}
-
-# Check for output filename
-$data_stdout = !($output_filename && ($output_filename ne "-"));
-
-if ($capture)
-{
-	if ($data_stdout)
-	{
-		# Option that tells geninfo to write to stdout
-		$output_filename = "-";
-	}
-}
-
-# Determine kernel directory for gcov data
-if (!$from_package && !@directory && ($capture || $reset)) {
-	($gcov_gkv, $gcov_dir) = setup_gkv();
-}
-
-# Check for requested functionality
-if ($reset)
-{
-	$data_stdout = 0;
-	# Differentiate between user space and kernel reset
-	if (@directory)
-	{
-		userspace_reset();
-	}
-	else
-	{
-		kernel_reset();
-	}
-}
-elsif ($capture)
-{
-	# Capture source can be user space, kernel or package
-	if ($from_package) {
-		package_capture();
-	} elsif (@directory) {
-		userspace_capture();
-	} else {
-		if ($initial) {
-			if (defined($to_package)) {
-				die("ERROR: --initial cannot be used together ".
-				    "with --to-package\n");
-			}
-			kernel_capture_initial();
-		} else {
-			kernel_capture();
-		}
-	}
-}
-elsif (@add_tracefile)
-{
-	($ln_overall_found, $ln_overall_hit,
-	 $fn_overall_found, $fn_overall_hit,
-	 $br_overall_found, $br_overall_hit) = add_traces();
-}
-elsif ($remove)
-{
-	($ln_overall_found, $ln_overall_hit,
-	 $fn_overall_found, $fn_overall_hit,
-	 $br_overall_found, $br_overall_hit) = remove();
-}
-elsif ($extract)
-{
-	($ln_overall_found, $ln_overall_hit,
-	 $fn_overall_found, $fn_overall_hit,
-	 $br_overall_found, $br_overall_hit) = extract();
-}
-elsif ($list)
-{
-	$data_stdout = 0;
-	list();
-}
-elsif ($diff)
-{
-	if (scalar(@ARGV) != 1)
-	{
-		die("ERROR: option --diff requires one additional argument!\n".
-		    "Use $tool_name --help to get usage information\n");
-	}
-	($ln_overall_found, $ln_overall_hit,
-	 $fn_overall_found, $fn_overall_hit,
-	 $br_overall_found, $br_overall_hit) = diff();
-}
-elsif (@opt_summary)
-{
-	$data_stdout = 0;
-	($ln_overall_found, $ln_overall_hit,
-	 $fn_overall_found, $fn_overall_hit,
-	 $br_overall_found, $br_overall_hit) = summary();
-}
-
-temp_cleanup();
-
-if (defined($ln_overall_found)) {
-	print_overall_rate(1, $ln_overall_found, $ln_overall_hit,
-			   1, $fn_overall_found, $fn_overall_hit,
-			   1, $br_overall_found, $br_overall_hit);
-} else {
-	info("Done.\n") if (!$list && !$capture);
-}
-exit(0);
-
-#
-# print_usage(handle)
-#
-# Print usage information.
-#
-
-sub print_usage(*)
-{
-	local *HANDLE = $_[0];
-
-	print(HANDLE <<END_OF_USAGE);
-Usage: $tool_name [OPTIONS]
-
-Use lcov to collect coverage data from either the currently running Linux
-kernel or from a user space application. Specify the --directory option to
-get coverage data for a user space program.
-
-Misc:
-  -h, --help                      Print this help, then exit
-  -v, --version                   Print version number, then exit
-  -q, --quiet                     Do not print progress messages
-
-Operation:
-  -z, --zerocounters              Reset all execution counts to zero
-  -c, --capture                   Capture coverage data
-  -a, --add-tracefile FILE        Add contents of tracefiles
-  -e, --extract FILE PATTERN      Extract files matching PATTERN from FILE
-  -r, --remove FILE PATTERN       Remove files matching PATTERN from FILE
-  -l, --list FILE                 List contents of tracefile FILE
-      --diff FILE DIFF            Transform tracefile FILE according to DIFF
-      --summary FILE              Show summary coverage data for tracefiles
-
-Options:
-  -i, --initial                   Capture initial zero coverage data
-  -t, --test-name NAME            Specify test name to be stored with data
-  -o, --output-file FILENAME      Write data to FILENAME instead of stdout
-  -d, --directory DIR             Use .da files in DIR instead of kernel
-  -f, --follow                    Follow links when searching .da files
-  -k, --kernel-directory KDIR     Capture kernel coverage data only from KDIR
-  -b, --base-directory DIR        Use DIR as base directory for relative paths
-      --convert-filenames         Convert filenames when applying diff
-      --strip DEPTH               Strip initial DEPTH directory levels in diff
-      --path PATH                 Strip PATH from tracefile when applying diff
-      --(no-)checksum             Enable (disable) line checksumming
-      --(no-)compat-libtool       Enable (disable) libtool compatibility mode
-      --gcov-tool TOOL            Specify gcov tool location
-      --ignore-errors ERRORS      Continue after ERRORS (gcov, source, graph)
-      --no-recursion              Exclude subdirectories from processing
-      --to-package FILENAME       Store unprocessed coverage data in FILENAME
-      --from-package FILENAME     Capture from unprocessed data in FILENAME
-      --no-markers                Ignore exclusion markers in source code
-      --derive-func-data          Generate function data from line data
-      --list-full-path            Print full path during a list operation
-      --(no-)external             Include (ignore) data for external files
-      --config-file FILENAME      Specify configuration file location
-      --rc SETTING=VALUE          Override configuration file setting
-      --compat MODE=on|off|auto   Set compat MODE (libtool, hammer, split_crc)
-      --include PATTERN           Include files matching PATTERN
-      --exclude PATTERN           Exclude files matching PATTERN
-
-For more information see: $lcov_url
-END_OF_USAGE
-	;
-}
-
-
-#
-# check_options()
-#
-# Check for valid combination of command line options. Die on error.
-#
-
-sub check_options()
-{
-	my $i = 0;
-
-	# Count occurrence of mutually exclusive options
-	$reset && $i++;
-	$capture && $i++;
-	@add_tracefile && $i++;
-	$extract && $i++;
-	$remove && $i++;
-	$list && $i++;
-	$diff && $i++;
-	@opt_summary && $i++;
-	
-	if ($i == 0)
-	{
-		die("Need one of options -z, -c, -a, -e, -r, -l, ".
-		    "--diff or --summary\n".
-		    "Use $tool_name --help to get usage information\n");
-	}
-	elsif ($i > 1)
-	{
-		die("ERROR: only one of -z, -c, -a, -e, -r, -l, ".
-		    "--diff or --summary allowed!\n".
-		    "Use $tool_name --help to get usage information\n");
-	}
-}
-
-
-#
-# userspace_reset()
-#
-# Reset coverage data found in DIRECTORY by deleting all contained .da files.
-#
-# Die on error.
-#
-
-sub userspace_reset()
-{
-	my $current_dir;
-	my @file_list;
-
-	foreach $current_dir (@directory)
-	{
-		info("Deleting all .da files in $current_dir".
-		     ($no_recursion?"\n":" and subdirectories\n"));
-		@file_list = `find "$current_dir" $maxdepth $follow -name \\*\\.da -type f -o -name \\*\\.gcda -type f 2>/dev/null`;
-		chomp(@file_list);
-		foreach (@file_list)
-		{
-			unlink($_) or die("ERROR: cannot remove file $_!\n");
-		}
-	}
-}
-
-
-#
-# userspace_capture()
-#
-# Capture coverage data found in DIRECTORY and write it to a package (if
-# TO_PACKAGE specified) or to OUTPUT_FILENAME or STDOUT.
-#
-# Die on error.
-#
-
-sub userspace_capture()
-{
-	my $dir;
-	my $build;
-
-	if (!defined($to_package)) {
-		lcov_geninfo(@directory);
-		return;
-	}
-	if (scalar(@directory) != 1) {
-		die("ERROR: -d may be specified only once with --to-package\n");
-	}
-	$dir = $directory[0];
-	if (defined($base_directory)) {
-		$build = $base_directory;
-	} else {
-		$build = $dir;
-	}
-	create_package($to_package, $dir, $build);
-}
-
-
-#
-# kernel_reset()
-#
-# Reset kernel coverage.
-#
-# Die on error.
-#
-
-sub kernel_reset()
-{
-	local *HANDLE;
-	my $reset_file;
-
-	info("Resetting kernel execution counters\n");
-	if (-e "$gcov_dir/vmlinux") {
-		$reset_file = "$gcov_dir/vmlinux";
-	} elsif (-e "$gcov_dir/reset") {
-		$reset_file = "$gcov_dir/reset";
-	} else {
-		die("ERROR: no reset control found in $gcov_dir\n");
-	}
-	open(HANDLE, ">", $reset_file) or
-		die("ERROR: cannot write to $reset_file!\n");
-	print(HANDLE "0");
-	close(HANDLE);
-}
-
-
-#
-# lcov_copy_single(from, to)
-# 
-# Copy single regular file FROM to TO without checking its size. This is
-# required to work with special files generated by the kernel
-# seq_file-interface.
-#
-#
-sub lcov_copy_single($$)
-{
-	my ($from, $to) = @_;
-	my $content;
-	local $/;
-	local *HANDLE;
-
-	open(HANDLE, "<", $from) or die("ERROR: cannot read $from: $!\n");
-	$content = <HANDLE>;
-	close(HANDLE);
-	open(HANDLE, ">", $to) or die("ERROR: cannot write $from: $!\n");
-	if (defined($content)) {
-		print(HANDLE $content);
-	}
-	close(HANDLE);
-}
-
-#
-# lcov_find(dir, function, data[, extension, ...)])
-#
-# Search DIR for files and directories whose name matches PATTERN and run
-# FUNCTION for each match. If not pattern is specified, match all names.
-#
-# FUNCTION has the following prototype:
-#   function(dir, relative_name, data)
-#
-# Where:
-#   dir: the base directory for this search
-#   relative_name: the name relative to the base directory of this entry
-#   data: the DATA variable passed to lcov_find
-#
-sub lcov_find($$$;@)
-{
-	my ($dir, $fn, $data, @pattern) = @_;
-	my $result;
-	my $_fn = sub {
-		my $filename = $File::Find::name;
-
-		if (defined($result)) {
-			return;
-		}		
-		$filename = abs2rel($filename, $dir);
-		foreach (@pattern) {
-			if ($filename =~ /$_/) {
-				goto ok;
-			}
-		}
-		return;
-	ok:
-		$result = &$fn($dir, $filename, $data);
-	};
-	if (scalar(@pattern) == 0) {
-		@pattern = ".*";
-	}
-	find( { wanted => $_fn, no_chdir => 1 }, $dir);
-
-	return $result;
-}
-
-#
-# lcov_copy_fn(from, rel, to)
-#
-# Copy directories, files and links from/rel to to/rel.
-#
-
-sub lcov_copy_fn($$$)
-{
-	my ($from, $rel, $to) = @_;
-	my $absfrom = canonpath(catfile($from, $rel));
-	my $absto = canonpath(catfile($to, $rel));
-
-	if (-d) {
-		if (! -d $absto) {
-			mkpath($absto) or
-				die("ERROR: cannot create directory $absto\n");
-			chmod(0700, $absto);
-		}
-	} elsif (-l) {
-		# Copy symbolic link
-		my $link = readlink($absfrom);
-
-		if (!defined($link)) {
-			die("ERROR: cannot read link $absfrom: $!\n");
-		}
-		symlink($link, $absto) or
-			die("ERROR: cannot create link $absto: $!\n");
-	} else {
-		lcov_copy_single($absfrom, $absto);
-		chmod(0600, $absto);
-	}
-	return undef;
-}
-
-#
-# lcov_copy(from, to, subdirs)
-# 
-# Copy all specified SUBDIRS and files from directory FROM to directory TO. For
-# regular files, copy file contents without checking its size. This is required
-# to work with seq_file-generated files.
-#
-
-sub lcov_copy($$;@)
-{
-	my ($from, $to, @subdirs) = @_;
-	my @pattern;
-
-	foreach (@subdirs) {
-		push(@pattern, "^$_");
-	}
-	lcov_find($from, \&lcov_copy_fn, $to, @pattern);
-}
-
-#
-# lcov_geninfo(directory)
-#
-# Call geninfo for the specified directory and with the parameters specified
-# at the command line.
-#
-
-sub lcov_geninfo(@)
-{
-	my (@dir) = @_;
-	my @param;
-
-	# Capture data
-	info("Capturing coverage data from ".join(" ", @dir)."\n");
-	@param = ("$tool_dir/geninfo", @dir);
-	if ($output_filename)
-	{
-		@param = (@param, "--output-filename", $output_filename);
-	}
-	if ($test_name)
-	{
-		@param = (@param, "--test-name", $test_name);
-	}
-	if ($follow)
-	{
-		@param = (@param, "--follow");
-	}
-	if ($quiet)
-	{
-		@param = (@param, "--quiet");
-	}
-	if (defined($checksum))
-	{
-		if ($checksum)
-		{
-			@param = (@param, "--checksum");
-		}
-		else
-		{
-			@param = (@param, "--no-checksum");
-		}
-	}
-	if ($base_directory)
-	{
-		@param = (@param, "--base-directory", $base_directory);
-	}
-	if ($no_compat_libtool)
-	{
-		@param = (@param, "--no-compat-libtool");
-	}
-	elsif ($compat_libtool)
-	{
-		@param = (@param, "--compat-libtool");
-	}
-	if ($gcov_tool)
-	{
-		@param = (@param, "--gcov-tool", $gcov_tool);
-	}
-	foreach (@opt_ignore_errors) {
-		@param = (@param, "--ignore-errors", $_);
-	}
-	if ($no_recursion) {
-		@param = (@param, "--no-recursion");
-	}
-	if ($initial)
-	{
-		@param = (@param, "--initial");
-	}
-	if ($no_markers)
-	{
-		@param = (@param, "--no-markers");
-	}
-	if ($opt_derive_func_data)
-	{
-		@param = (@param, "--derive-func-data");
-	}
-	if ($opt_debug)
-	{
-		@param = (@param, "--debug");
-	}
-	if (defined($opt_external) && $opt_external)
-	{
-		@param = (@param, "--external");
-	}
-	if (defined($opt_external) && !$opt_external)
-	{
-		@param = (@param, "--no-external");
-	}
-	if (defined($opt_compat)) {
-		@param = (@param, "--compat", $opt_compat);
-	}
-	if (%opt_rc) {
-		foreach my $key (keys(%opt_rc)) {
-			@param = (@param, "--rc", "$key=".$opt_rc{$key});
-		}
-	}
-	if (defined($opt_config_file)) {
-		@param = (@param, "--config-file", $opt_config_file);
-	}
-	foreach (@include_patterns) {
-		@param = (@param, "--include", $_);
-	}
-	foreach (@exclude_patterns) {
-		@param = (@param, "--exclude", $_);
-	}
-
-	system(@param) and exit($? >> 8);
-}
-
-#
-# read_file(filename)
-#
-# Return the contents of the file defined by filename.
-#
-
-sub read_file($)
-{
-	my ($filename) = @_;
-	my $content;
-	local $\;
-	local *HANDLE;
-
-	open(HANDLE, "<", $filename) || return undef;
-	$content = <HANDLE>;
-	close(HANDLE);
-
-	return $content;
-}
-
-#
-# get_package(package_file)
-#
-# Unpack unprocessed coverage data files from package_file to a temporary
-# directory and return directory name, build directory and gcov kernel version
-# as found in package.
-#
-
-sub get_package($)
-{
-	my ($file) = @_;
-	my $dir = create_temp_dir();
-	my $gkv;
-	my $build;
-	my $cwd = getcwd();
-	my $count;
-	local *HANDLE;
-
-	info("Reading package $file:\n");
-	$file = abs_path($file);
-	chdir($dir);
-	open(HANDLE, "-|", "tar xvfz '$file' 2>/dev/null")
-		or die("ERROR: could not process package $file\n");
-	$count = 0;
-	while (<HANDLE>) {
-		if (/\.da$/ || /\.gcda$/) {
-			$count++;
-		}
-	}
-	close(HANDLE);
-	if ($count == 0) {
-		die("ERROR: no data file found in package $file\n");
-	}
-	info("  data directory .......: $dir\n");
-	$build = read_file("$dir/$pkg_build_file");
-	if (defined($build)) {
-		info("  build directory ......: $build\n");
-	}
-	$gkv = read_file("$dir/$pkg_gkv_file");
-	if (defined($gkv)) {
-		$gkv = int($gkv);
-		if ($gkv != $GKV_PROC && $gkv != $GKV_SYS) {
-			die("ERROR: unsupported gcov kernel version found ".
-			    "($gkv)\n");
-		}
-		info("  content type .........: kernel data\n");
-		info("  gcov kernel version ..: %s\n", $GKV_NAME[$gkv]);
-	} else {
-		info("  content type .........: application data\n");
-	}
-	info("  data files ...........: $count\n");
-	chdir($cwd);
-
-	return ($dir, $build, $gkv);
-}
-
-#
-# write_file(filename, $content)
-#
-# Create a file named filename and write the specified content to it.
-#
-
-sub write_file($$)
-{
-	my ($filename, $content) = @_;
-	local *HANDLE;
-
-	open(HANDLE, ">", $filename) || return 0;
-	print(HANDLE $content);
-	close(HANDLE) || return 0;
-
-	return 1;
-}
-
-# count_package_data(filename)
-#
-# Count the number of coverage data files in the specified package file.
-#
-
-sub count_package_data($)
-{
-	my ($filename) = @_;
-	local *HANDLE;
-	my $count = 0;
-
-	open(HANDLE, "-|", "tar tfz '$filename'") or return undef;
-	while (<HANDLE>) {
-		if (/\.da$/ || /\.gcda$/) {
-			$count++;
-		}
-	}
-	close(HANDLE);
-	return $count;
-}
-
-#
-# create_package(package_file, source_directory, build_directory[,
-# 		 kernel_gcov_version])
-#
-# Store unprocessed coverage data files from source_directory to package_file.
-#
-
-sub create_package($$$;$)
-{
-	my ($file, $dir, $build, $gkv) = @_;
-	my $cwd = getcwd();
-
-	# Check for availability of tar tool first
-	system("tar --help > /dev/null")
-		and die("ERROR: tar command not available\n");
-
-	# Print information about the package
-	info("Creating package $file:\n");
-	info("  data directory .......: $dir\n");
-
-	# Handle build directory
-	if (defined($build)) {
-		info("  build directory ......: $build\n");
-		write_file("$dir/$pkg_build_file", $build)
-			or die("ERROR: could not write to ".
-			       "$dir/$pkg_build_file\n");
-	}
-
-	# Handle gcov kernel version data
-	if (defined($gkv)) {
-		info("  content type .........: kernel data\n");
-		info("  gcov kernel version ..: %s\n", $GKV_NAME[$gkv]);
-		write_file("$dir/$pkg_gkv_file", $gkv)
-			or die("ERROR: could not write to ".
-			       "$dir/$pkg_gkv_file\n");
-	} else {
-		info("  content type .........: application data\n");
-	}
-
-	# Create package
-	$file = abs_path($file);
-	chdir($dir);
-	system("tar cfz $file .")
-		and die("ERROR: could not create package $file\n");
-	chdir($cwd);
-
-	# Remove temporary files
-	unlink("$dir/$pkg_build_file");
-	unlink("$dir/$pkg_gkv_file");
-
-	# Show number of data files
-	if (!$quiet) {
-		my $count = count_package_data($file);
-
-		if (defined($count)) {
-			info("  data files ...........: $count\n");
-		}
-	}
-}
-
-sub find_link_fn($$$)
-{
-	my ($from, $rel, $filename) = @_;
-	my $absfile = catfile($from, $rel, $filename);
-
-	if (-l $absfile) {
-		return $absfile;
-	}
-	return undef;
-}
-
-#
-# get_base(dir)
-#
-# Return (BASE, OBJ), where
-#  - BASE: is the path to the kernel base directory relative to dir
-#  - OBJ: is the absolute path to the kernel build directory
-#
-
-sub get_base($)
-{
-	my ($dir) = @_;
-	my $marker = "kernel/gcov/base.gcno";
-	my $markerfile;
-	my $sys;
-	my $obj;
-	my $link;
-
-	$markerfile = lcov_find($dir, \&find_link_fn, $marker);
-	if (!defined($markerfile)) {
-		return (undef, undef);
-	}
-
-	# sys base is parent of parent of markerfile.
-	$sys = abs2rel(dirname(dirname(dirname($markerfile))), $dir);
-
-	# obj base is parent of parent of markerfile link target.
-	$link = readlink($markerfile);
-	if (!defined($link)) {
-		die("ERROR: could not read $markerfile\n");
-	}
-	$obj = dirname(dirname(dirname($link)));
-
-	return ($sys, $obj);
-}
-
-#
-# apply_base_dir(data_dir, base_dir, build_dir, @directories)
-#
-# Make entries in @directories relative to data_dir.
-#
-
-sub apply_base_dir($$$@)
-{
-	my ($data, $base, $build, @dirs) = @_;
-	my $dir;
-	my @result;
-
-	foreach $dir (@dirs) {
-		# Is directory path relative to data directory?
-		if (-d catdir($data, $dir)) {
-			push(@result, $dir);
-			next;
-		}
-		# Relative to the auto-detected base-directory?
-		if (defined($base)) {
-			if (-d catdir($data, $base, $dir)) {
-				push(@result, catdir($base, $dir));
-				next;
-			}
-		}
-		# Relative to the specified base-directory?
-		if (defined($base_directory)) {
-			if (file_name_is_absolute($base_directory)) {
-				$base = abs2rel($base_directory, rootdir());
-			} else {
-				$base = $base_directory;
-			}
-			if (-d catdir($data, $base, $dir)) {
-				push(@result, catdir($base, $dir));
-				next;
-			}
-		}
-		# Relative to the build directory?
-		if (defined($build)) {
-			if (file_name_is_absolute($build)) {
-				$base = abs2rel($build, rootdir());
-			} else {
-				$base = $build;
-			}
-			if (-d catdir($data, $base, $dir)) {
-				push(@result, catdir($base, $dir));
-				next;
-			}
-		}
-		die("ERROR: subdirectory $dir not found\n".
-		    "Please use -b to specify the correct directory\n");
-	}
-	return @result;
-}
-
-#
-# copy_gcov_dir(dir, [@subdirectories])
-#
-# Create a temporary directory and copy all or, if specified, only some
-# subdirectories from dir to that directory. Return the name of the temporary
-# directory.
-#
-
-sub copy_gcov_dir($;@)
-{
-	my ($data, @dirs) = @_;
-	my $tempdir = create_temp_dir();
-
-	info("Copying data to temporary directory $tempdir\n");
-	lcov_copy($data, $tempdir, @dirs);
-
-	return $tempdir;
-}
-
-#
-# kernel_capture_initial
-#
-# Capture initial kernel coverage data, i.e. create a coverage data file from
-# static graph files which contains zero coverage data for all instrumented
-# lines.
-#
-
-sub kernel_capture_initial()
-{
-	my $build;
-	my $source;
-	my @params;
-
-	if (defined($base_directory)) {
-		$build = $base_directory;
-		$source = "specified";
-	} else {
-		(undef, $build) = get_base($gcov_dir);
-		if (!defined($build)) {
-			die("ERROR: could not auto-detect build directory.\n".
-			    "Please use -b to specify the build directory\n");
-		}
-		$source = "auto-detected";
-	}
-	info("Using $build as kernel build directory ($source)\n");
-	# Build directory needs to be passed to geninfo
-	$base_directory = $build;
-	if (@kernel_directory) {
-		foreach my $dir (@kernel_directory) {
-			push(@params, "$build/$dir");
-		}
-	} else {
-		push(@params, $build);
-	}
-	lcov_geninfo(@params);
-}
-
-#
-# kernel_capture_from_dir(directory, gcov_kernel_version, build)
-#
-# Perform the actual kernel coverage capturing from the specified directory
-# assuming that the data was copied from the specified gcov kernel version.
-#
-
-sub kernel_capture_from_dir($$$)
-{
-	my ($dir, $gkv, $build) = @_;
-
-	# Create package or coverage file
-	if (defined($to_package)) {
-		create_package($to_package, $dir, $build, $gkv);
-	} else {
-		# Build directory needs to be passed to geninfo
-		$base_directory = $build;
-		lcov_geninfo($dir);
-	}
-}
-
-#
-# adjust_kernel_dir(dir, build)
-#
-# Adjust directories specified with -k so that they point to the directory
-# relative to DIR. Return the build directory if specified or the auto-
-# detected build-directory.
-#
-
-sub adjust_kernel_dir($$)
-{
-	my ($dir, $build) = @_;
-	my ($sys_base, $build_auto) = get_base($dir);
-
-	if (!defined($build)) {
-		$build = $build_auto;
-	}
-	if (!defined($build)) {
-		die("ERROR: could not auto-detect build directory.\n".
-		    "Please use -b to specify the build directory\n");
-	}
-	# Make @kernel_directory relative to sysfs base
-	if (@kernel_directory) {
-		@kernel_directory = apply_base_dir($dir, $sys_base, $build,
-						   @kernel_directory);
-	}
-	return $build;
-}
-
-sub kernel_capture()
-{
-	my $data_dir;
-	my $build = $base_directory;
-
-	if ($gcov_gkv == $GKV_SYS) {
-		$build = adjust_kernel_dir($gcov_dir, $build);
-	}
-	$data_dir = copy_gcov_dir($gcov_dir, @kernel_directory);
-	kernel_capture_from_dir($data_dir, $gcov_gkv, $build);
-}
-
-#
-# link_data_cb(datadir, rel, graphdir)
-#
-# Create symbolic link in GRAPDIR/REL pointing to DATADIR/REL.
-#
-
-sub link_data_cb($$$)
-{
-	my ($datadir, $rel, $graphdir) = @_;
-	my $absfrom = catfile($datadir, $rel);
-	my $absto = catfile($graphdir, $rel);
-	my $base;
-	my $dir;
-
-	if (-e $absto) {
-		die("ERROR: could not create symlink at $absto: ".
-		    "File already exists!\n");
-	}
-	if (-l $absto) {
-		# Broken link - possibly from an interrupted earlier run
-		unlink($absto);
-	}
-
-	# Check for graph file
-	$base = $absto;
-	$base =~ s/\.(gcda|da)$//;
-	if (! -e $base.".gcno" && ! -e $base.".bbg" && ! -e $base.".bb") {
-		die("ERROR: No graph file found for $absfrom in ".
-		    dirname($base)."!\n");
-	}
-
-	symlink($absfrom, $absto) or
-		die("ERROR: could not create symlink at $absto: $!\n");
-}
-
-#
-# unlink_data_cb(datadir, rel, graphdir)
-#
-# Remove symbolic link from GRAPHDIR/REL to DATADIR/REL.
-#
-
-sub unlink_data_cb($$$)
-{
-	my ($datadir, $rel, $graphdir) = @_;
-	my $absfrom = catfile($datadir, $rel);
-	my $absto = catfile($graphdir, $rel);
-	my $target;
-
-	return if (!-l $absto);
-	$target = readlink($absto);
-	return if (!defined($target) || $target ne $absfrom);
-
-	unlink($absto) or
-		warn("WARNING: could not remove symlink $absto: $!\n");
-}
-
-#
-# link_data(datadir, graphdir, create)
-#
-# If CREATE is non-zero, create symbolic links in GRAPHDIR for data files
-# found in DATADIR. Otherwise remove link in GRAPHDIR.
-#
-
-sub link_data($$$)
-{
-	my ($datadir, $graphdir, $create) = @_;
-
-	$datadir = abs_path($datadir);
-	$graphdir = abs_path($graphdir);
-	if ($create) {
-		lcov_find($datadir, \&link_data_cb, $graphdir, '\.gcda$',
-			  '\.da$');
-	} else {
-		lcov_find($datadir, \&unlink_data_cb, $graphdir, '\.gcda$',
-			  '\.da$');
-	}
-}
-
-#
-# find_graph_cb(datadir, rel, count_ref)
-#
-# Count number of files found.
-#
-
-sub find_graph_cb($$$)
-{
-	my ($dir, $rel, $count_ref) = @_;
-
-	($$count_ref)++;
-}
-
-#
-# find_graph(dir)
-#
-# Search DIR for a graph file. Return non-zero if one was found, zero otherwise.
-#
-
-sub find_graph($)
-{
-	my ($dir) = @_;
-	my $count = 0;
-
-	lcov_find($dir, \&find_graph_cb, \$count, '\.gcno$', '\.bb$', '\.bbg$');
-
-	return $count > 0 ? 1 : 0;
-}
-
-#
-# package_capture()
-#
-# Capture coverage data from a package of unprocessed coverage data files
-# as generated by lcov --to-package.
-#
-
-sub package_capture()
-{
-	my $dir;
-	my $build;
-	my $gkv;
-
-	($dir, $build, $gkv) = get_package($from_package);
-
-	# Check for build directory
-	if (defined($base_directory)) {
-		if (defined($build)) {
-			info("Using build directory specified by -b.\n");
-		}
-		$build = $base_directory;
-	}
-
-	# Do the actual capture
-	if (defined($gkv)) {
-		if ($gkv == $GKV_SYS) {
-			$build = adjust_kernel_dir($dir, $build);
-		}
-		if (@kernel_directory) {
-			$dir = copy_gcov_dir($dir, @kernel_directory);	
-		}
-		kernel_capture_from_dir($dir, $gkv, $build);
-	} else {
-		# Build directory needs to be passed to geninfo
-		$base_directory = $build;
-		if (find_graph($dir)) {
-			# Package contains graph files - collect from there
-			lcov_geninfo($dir);
-		} else {
-			# No graph files found, link data files next to
-			# graph files
-			link_data($dir, $base_directory, 1);
-			lcov_geninfo($base_directory);
-			link_data($dir, $base_directory, 0);
-		}
-	}
-}
-
-
-#
-# info(printf_parameter)
-#
-# Use printf to write PRINTF_PARAMETER to stdout only when the $quiet flag
-# is not set.
-#
-
-sub info(@)
-{
-	if (!$quiet)
-	{
-		# Print info string
-		if (!$data_stdout)
-		{
-			printf(@_)
-		}
-		else
-		{
-			# Don't interfere with the .info output to STDOUT
-			printf(STDERR @_);
-		}
-	}
-}
-
-
-#
-# create_temp_dir()
-#
-# Create a temporary directory and return its path.
-#
-# Die on error.
-#
-
-sub create_temp_dir()
-{
-	my $dir;
-
-	if (defined($tmp_dir)) {
-		$dir = tempdir(DIR => $tmp_dir, CLEANUP => 1);
-	} else {
-		$dir = tempdir(CLEANUP => 1);
-	}
-	if (!defined($dir)) {
-		die("ERROR: cannot create temporary directory\n");
-	}
-	push(@temp_dirs, $dir);
-
-	return $dir;
-}
-
-sub compress_brcount($)
-{
-	my ($brcount) = @_;
-	my $db;
-
-	$db = brcount_to_db($brcount);
-	return db_to_brcount($db, $brcount);
-}
-
-sub get_br_found_and_hit($)
-{
-	my ($brcount) = @_;
-	my $db;
-
-	$db = brcount_to_db($brcount);
-
-	return brcount_db_get_found_and_hit($db);
-}
-
-
-#
-# read_info_file(info_filename)
-#
-# Read in the contents of the .info file specified by INFO_FILENAME. Data will
-# be returned as a reference to a hash containing the following mappings:
-#
-# %result: for each filename found in file -> \%data
-#
-# %data: "test"  -> \%testdata
-#        "sum"   -> \%sumcount
-#        "func"  -> \%funcdata
-#        "found" -> $lines_found (number of instrumented lines found in file)
-#	 "hit"   -> $lines_hit (number of executed lines in file)
-#        "f_found" -> $fn_found (number of instrumented functions found in file)
-#	 "f_hit"   -> $fn_hit (number of executed functions in file)
-#        "b_found" -> $br_found (number of instrumented branches found in file)
-#	 "b_hit"   -> $br_hit (number of executed branches in file)
-#        "check" -> \%checkdata
-#        "testfnc" -> \%testfncdata
-#        "sumfnc"  -> \%sumfnccount
-#        "testbr"  -> \%testbrdata
-#        "sumbr"   -> \%sumbrcount
-#
-# %testdata   : name of test affecting this file -> \%testcount
-# %testfncdata: name of test affecting this file -> \%testfnccount
-# %testbrdata:  name of test affecting this file -> \%testbrcount
-#
-# %testcount   : line number   -> execution count for a single test
-# %testfnccount: function name -> execution count for a single test
-# %testbrcount : line number   -> branch coverage data for a single test
-# %sumcount    : line number   -> execution count for all tests
-# %sumfnccount : function name -> execution count for all tests
-# %sumbrcount  : line number   -> branch coverage data for all tests
-# %funcdata    : function name -> line number
-# %checkdata   : line number   -> checksum of source code line
-# $brdata      : text "block,branch,taken:..."
-# 
-# Note that .info file sections referring to the same file and test name
-# will automatically be combined by adding all execution counts.
-#
-# Note that if INFO_FILENAME ends with ".gz", it is assumed that the file
-# is compressed using GZIP. If available, GUNZIP will be used to decompress
-# this file.
-#
-# Die on error.
-#
-
-sub read_info_file($)
-{
-	my $tracefile = $_[0];		# Name of tracefile
-	my %result;			# Resulting hash: file -> data
-	my $data;			# Data handle for current entry
-	my $testdata;			#       "             "
-	my $testcount;			#       "             "
-	my $sumcount;			#       "             "
-	my $funcdata;			#       "             "
-	my $checkdata;			#       "             "
-	my $testfncdata;
-	my $testfnccount;
-	my $sumfnccount;
-	my $testbrdata;
-	my $testbrcount;
-	my $sumbrcount;
-	my $line;			# Current line read from .info file
-	my $testname;			# Current test name
-	my $filename;			# Current filename
-	my $hitcount;			# Count for lines hit
-	my $count;			# Execution count of current line
-	my $negative;			# If set, warn about negative counts
-	my $changed_testname;		# If set, warn about changed testname
-	my $line_checksum;		# Checksum of current line
-	local *INFO_HANDLE;		# Filehandle for .info file
-
-	info("Reading tracefile $tracefile\n");
-
-	# Check if file exists and is readable
-	stat($_[0]);
-	if (!(-r _))
-	{
-		die("ERROR: cannot read file $_[0]!\n");
-	}
-
-	# Check if this is really a plain file
-	if (!(-f _))
-	{
-		die("ERROR: not a plain file: $_[0]!\n");
-	}
-
-	# Check for .gz extension
-	if ($_[0] =~ /\.gz$/)
-	{
-		# Check for availability of GZIP tool
-		system_no_output(1, "gunzip" ,"-h")
-			and die("ERROR: gunzip command not available!\n");
-
-		# Check integrity of compressed file
-		system_no_output(1, "gunzip", "-t", $_[0])
-			and die("ERROR: integrity check failed for ".
-				"compressed file $_[0]!\n");
-
-		# Open compressed file
-		open(INFO_HANDLE, "-|", "gunzip -c '$_[0]'")
-			or die("ERROR: cannot start gunzip to decompress ".
-			       "file $_[0]!\n");
-	}
-	else
-	{
-		# Open decompressed file
-		open(INFO_HANDLE, "<", $_[0])
-			or die("ERROR: cannot read file $_[0]!\n");
-	}
-
-	$testname = "";
-	while (<INFO_HANDLE>)
-	{
-		chomp($_);
-		$line = $_;
-
-		# Switch statement
-		foreach ($line)
-		{
-			/^TN:([^,]*)(,diff)?/ && do
-			{
-				# Test name information found
-				$testname = defined($1) ? $1 : "";
-				if ($testname =~ s/\W/_/g)
-				{
-					$changed_testname = 1;
-				}
-				$testname .= $2 if (defined($2));
-				last;
-			};
-
-			/^[SK]F:(.*)/ && do
-			{
-				# Filename information found
-				# Retrieve data for new entry
-				$filename = $1;
-
-				$data = $result{$filename};
-				($testdata, $sumcount, $funcdata, $checkdata,
-				 $testfncdata, $sumfnccount, $testbrdata,
-				 $sumbrcount) =
-					get_info_entry($data);
-
-				if (defined($testname))
-				{
-					$testcount = $testdata->{$testname};
-					$testfnccount = $testfncdata->{$testname};
-					$testbrcount = $testbrdata->{$testname};
-				}
-				else
-				{
-					$testcount = {};
-					$testfnccount = {};
-					$testbrcount = {};
-				}
-				last;
-			};
-
-			/^DA:(\d+),(-?\d+)(,[^,\s]+)?/ && do
-			{
-				# Fix negative counts
-				$count = $2 < 0 ? 0 : $2;
-				if ($2 < 0)
-				{
-					$negative = 1;
-				}
-				# Execution count found, add to structure
-				# Add summary counts
-				$sumcount->{$1} += $count;
-
-				# Add test-specific counts
-				if (defined($testname))
-				{
-					$testcount->{$1} += $count;
-				}
-
-				# Store line checksum if available
-				if (defined($3))
-				{
-					$line_checksum = substr($3, 1);
-
-					# Does it match a previous definition
-					if (defined($checkdata->{$1}) &&
-					    ($checkdata->{$1} ne
-					     $line_checksum))
-					{
-						die("ERROR: checksum mismatch ".
-						    "at $filename:$1\n");
-					}
-
-					$checkdata->{$1} = $line_checksum;
-				}
-				last;
-			};
-
-			/^FN:(\d+),([^,]+)/ && do
-			{
-				last if (!$func_coverage);
-
-				# Function data found, add to structure
-				$funcdata->{$2} = $1;
-
-				# Also initialize function call data
-				if (!defined($sumfnccount->{$2})) {
-					$sumfnccount->{$2} = 0;
-				}
-				if (defined($testname))
-				{
-					if (!defined($testfnccount->{$2})) {
-						$testfnccount->{$2} = 0;
-					}
-				}
-				last;
-			};
-
-			/^FNDA:(\d+),([^,]+)/ && do
-			{
-				last if (!$func_coverage);
-
-				# Function call count found, add to structure
-				# Add summary counts
-				$sumfnccount->{$2} += $1;
-
-				# Add test-specific counts
-				if (defined($testname))
-				{
-					$testfnccount->{$2} += $1;
-				}
-				last;
-			};
-
-			/^BRDA:(\d+),(\d+),(\d+),(\d+|-)/ && do {
-				# Branch coverage data found
-				my ($line, $block, $branch, $taken) =
-				   ($1, $2, $3, $4);
-
-				last if (!$br_coverage);
-				$sumbrcount->{$line} .=
-					"$block,$branch,$taken:";
-
-				# Add test-specific counts
-				if (defined($testname)) {
-					$testbrcount->{$line} .=
-						"$block,$branch,$taken:";
-				}
-				last;
-			};
-
-			/^end_of_record/ && do
-			{
-				# Found end of section marker
-				if ($filename)
-				{
-					# Store current section data
-					if (defined($testname))
-					{
-						$testdata->{$testname} =
-							$testcount;
-						$testfncdata->{$testname} =
-							$testfnccount;
-						$testbrdata->{$testname} =
-							$testbrcount;
-					}	
-
-					set_info_entry($data, $testdata,
-						       $sumcount, $funcdata,
-						       $checkdata, $testfncdata,
-						       $sumfnccount,
-						       $testbrdata,
-						       $sumbrcount);
-					$result{$filename} = $data;
-					last;
-				}
-			};
-
-			# default
-			last;
-		}
-	}
-	close(INFO_HANDLE);
-
-	# Calculate hit and found values for lines and functions of each file
-	foreach $filename (keys(%result))
-	{
-		$data = $result{$filename};
-
-		($testdata, $sumcount, undef, undef, $testfncdata,
-		 $sumfnccount, $testbrdata, $sumbrcount) =
-			get_info_entry($data);
-
-		# Filter out empty files
-		if (scalar(keys(%{$sumcount})) == 0)
-		{
-			delete($result{$filename});
-			next;
-		}
-		# Filter out empty test cases
-		foreach $testname (keys(%{$testdata}))
-		{
-			if (!defined($testdata->{$testname}) ||
-			    scalar(keys(%{$testdata->{$testname}})) == 0)
-			{
-				delete($testdata->{$testname});
-				delete($testfncdata->{$testname});
-			}
-		}
-
-		$data->{"found"} = scalar(keys(%{$sumcount}));
-		$hitcount = 0;
-
-		foreach (keys(%{$sumcount}))
-		{
-			if ($sumcount->{$_} > 0) { $hitcount++; }
-		}
-
-		$data->{"hit"} = $hitcount;
-
-		# Get found/hit values for function call data
-		$data->{"f_found"} = scalar(keys(%{$sumfnccount}));
-		$hitcount = 0;
-
-		foreach (keys(%{$sumfnccount})) {
-			if ($sumfnccount->{$_} > 0) {
-				$hitcount++;
-			}
-		}
-		$data->{"f_hit"} = $hitcount;
-
-		# Combine branch data for the same branches
-		(undef, $data->{"b_found"}, $data->{"b_hit"}) =
-			compress_brcount($sumbrcount);
-		foreach $testname (keys(%{$testbrdata})) {
-			compress_brcount($testbrdata->{$testname});
-		}
-	}
-
-	if (scalar(keys(%result)) == 0)
-	{
-		die("ERROR: no valid records found in tracefile $tracefile\n");
-	}
-	if ($negative)
-	{
-		warn("WARNING: negative counts found in tracefile ".
-		     "$tracefile\n");
-	}
-	if ($changed_testname)
-	{
-		warn("WARNING: invalid characters removed from testname in ".
-		     "tracefile $tracefile\n");
-	}
-
-	return(\%result);
-}
-
-
-#
-# get_info_entry(hash_ref)
-#
-# Retrieve data from an entry of the structure generated by read_info_file().
-# Return a list of references to hashes:
-# (test data hash ref, sum count hash ref, funcdata hash ref, checkdata hash
-#  ref, testfncdata hash ref, sumfnccount hash ref, testbrdata hash ref,
-#  sumbrcount hash ref, lines found, lines hit, functions found,
-#  functions hit, branches found, branches hit)
-#
-
-sub get_info_entry($)
-{
-	my $testdata_ref = $_[0]->{"test"};
-	my $sumcount_ref = $_[0]->{"sum"};
-	my $funcdata_ref = $_[0]->{"func"};
-	my $checkdata_ref = $_[0]->{"check"};
-	my $testfncdata = $_[0]->{"testfnc"};
-	my $sumfnccount = $_[0]->{"sumfnc"};
-	my $testbrdata = $_[0]->{"testbr"};
-	my $sumbrcount = $_[0]->{"sumbr"};
-	my $lines_found = $_[0]->{"found"};
-	my $lines_hit = $_[0]->{"hit"};
-	my $f_found = $_[0]->{"f_found"};
-	my $f_hit = $_[0]->{"f_hit"};
-	my $br_found = $_[0]->{"b_found"};
-	my $br_hit = $_[0]->{"b_hit"};
-
-	return ($testdata_ref, $sumcount_ref, $funcdata_ref, $checkdata_ref,
-		$testfncdata, $sumfnccount, $testbrdata, $sumbrcount,
-		$lines_found, $lines_hit, $f_found, $f_hit,
-		$br_found, $br_hit);
-}
-
-
-#
-# set_info_entry(hash_ref, testdata_ref, sumcount_ref, funcdata_ref,
-#                checkdata_ref, testfncdata_ref, sumfcncount_ref,
-#                testbrdata_ref, sumbrcount_ref[,lines_found,
-#                lines_hit, f_found, f_hit, $b_found, $b_hit])
-#
-# Update the hash referenced by HASH_REF with the provided data references.
-#
-
-sub set_info_entry($$$$$$$$$;$$$$$$)
-{
-	my $data_ref = $_[0];
-
-	$data_ref->{"test"} = $_[1];
-	$data_ref->{"sum"} = $_[2];
-	$data_ref->{"func"} = $_[3];
-	$data_ref->{"check"} = $_[4];
-	$data_ref->{"testfnc"} = $_[5];
-	$data_ref->{"sumfnc"} = $_[6];
-	$data_ref->{"testbr"} = $_[7];
-	$data_ref->{"sumbr"} = $_[8];
-
-	if (defined($_[9])) { $data_ref->{"found"} = $_[9]; }
-	if (defined($_[10])) { $data_ref->{"hit"} = $_[10]; }
-	if (defined($_[11])) { $data_ref->{"f_found"} = $_[11]; }
-	if (defined($_[12])) { $data_ref->{"f_hit"} = $_[12]; }
-	if (defined($_[13])) { $data_ref->{"b_found"} = $_[13]; }
-	if (defined($_[14])) { $data_ref->{"b_hit"} = $_[14]; }
-}
-
-
-#
-# add_counts(data1_ref, data2_ref)
-#
-# DATA1_REF and DATA2_REF are references to hashes containing a mapping
-#
-#   line number -> execution count
-#
-# Return a list (RESULT_REF, LINES_FOUND, LINES_HIT) where RESULT_REF
-# is a reference to a hash containing the combined mapping in which
-# execution counts are added.
-#
-
-sub add_counts($$)
-{
-	my $data1_ref = $_[0];	# Hash 1
-	my $data2_ref = $_[1];	# Hash 2
-	my %result;		# Resulting hash
-	my $line;		# Current line iteration scalar
-	my $data1_count;	# Count of line in hash1
-	my $data2_count;	# Count of line in hash2
-	my $found = 0;		# Total number of lines found
-	my $hit = 0;		# Number of lines with a count > 0
-
-	foreach $line (keys(%$data1_ref))
-	{
-		$data1_count = $data1_ref->{$line};
-		$data2_count = $data2_ref->{$line};
-
-		# Add counts if present in both hashes
-		if (defined($data2_count)) { $data1_count += $data2_count; }
-
-		# Store sum in %result
-		$result{$line} = $data1_count;
-
-		$found++;
-		if ($data1_count > 0) { $hit++; }
-	}
-
-	# Add lines unique to data2_ref
-	foreach $line (keys(%$data2_ref))
-	{
-		# Skip lines already in data1_ref
-		if (defined($data1_ref->{$line})) { next; }
-
-		# Copy count from data2_ref
-		$result{$line} = $data2_ref->{$line};
-
-		$found++;
-		if ($result{$line} > 0) { $hit++; }
-	}
-
-	return (\%result, $found, $hit);
-}
-
-
-#
-# merge_checksums(ref1, ref2, filename)
-#
-# REF1 and REF2 are references to hashes containing a mapping
-#
-#   line number -> checksum
-#
-# Merge checksum lists defined in REF1 and REF2 and return reference to
-# resulting hash. Die if a checksum for a line is defined in both hashes
-# but does not match.
-#
-
-sub merge_checksums($$$)
-{
-	my $ref1 = $_[0];
-	my $ref2 = $_[1];
-	my $filename = $_[2];
-	my %result;
-	my $line;
-
-	foreach $line (keys(%{$ref1}))
-	{
-		if (defined($ref2->{$line}) &&
-		    ($ref1->{$line} ne $ref2->{$line}))
-		{
-			die("ERROR: checksum mismatch at $filename:$line\n");
-		}
-		$result{$line} = $ref1->{$line};
-	}
-
-	foreach $line (keys(%{$ref2}))
-	{
-		$result{$line} = $ref2->{$line};
-	}
-
-	return \%result;
-}
-
-
-#
-# merge_func_data(funcdata1, funcdata2, filename)
-#
-
-sub merge_func_data($$$)
-{
-	my ($funcdata1, $funcdata2, $filename) = @_;
-	my %result;
-	my $func;
-
-	if (defined($funcdata1)) {
-		%result = %{$funcdata1};
-	}
-
-	foreach $func (keys(%{$funcdata2})) {
-		my $line1 = $result{$func};
-		my $line2 = $funcdata2->{$func};
-
-		if (defined($line1) && ($line1 != $line2)) {
-			warn("WARNING: function data mismatch at ".
-			     "$filename:$line2\n");
-			next;
-		}
-		$result{$func} = $line2;
-	}
-
-	return \%result;
-}
-
-
-#
-# add_fnccount(fnccount1, fnccount2)
-#
-# Add function call count data. Return list (fnccount_added, f_found, f_hit)
-#
-
-sub add_fnccount($$)
-{
-	my ($fnccount1, $fnccount2) = @_;
-	my %result;
-	my $f_found;
-	my $f_hit;
-	my $function;
-
-	if (defined($fnccount1)) {
-		%result = %{$fnccount1};
-	}
-	foreach $function (keys(%{$fnccount2})) {
-		$result{$function} += $fnccount2->{$function};
-	}
-	$f_found = scalar(keys(%result));
-	$f_hit = 0;
-	foreach $function (keys(%result)) {
-		if ($result{$function} > 0) {
-			$f_hit++;
-		}
-	}
-
-	return (\%result, $f_found, $f_hit);
-}
-
-#
-# add_testfncdata(testfncdata1, testfncdata2)
-#
-# Add function call count data for several tests. Return reference to
-# added_testfncdata.
-#
-
-sub add_testfncdata($$)
-{
-	my ($testfncdata1, $testfncdata2) = @_;
-	my %result;
-	my $testname;
-
-	foreach $testname (keys(%{$testfncdata1})) {
-		if (defined($testfncdata2->{$testname})) {
-			my $fnccount;
-
-			# Function call count data for this testname exists
-			# in both data sets: merge
-			($fnccount) = add_fnccount(
-				$testfncdata1->{$testname},
-				$testfncdata2->{$testname});
-			$result{$testname} = $fnccount;
-			next;
-		}
-		# Function call count data for this testname is unique to
-		# data set 1: copy
-		$result{$testname} = $testfncdata1->{$testname};
-	}
-
-	# Add count data for testnames unique to data set 2
-	foreach $testname (keys(%{$testfncdata2})) {
-		if (!defined($result{$testname})) {
-			$result{$testname} = $testfncdata2->{$testname};
-		}
-	}
-	return \%result;
-}
-
-
-#
-# brcount_to_db(brcount)
-#
-# Convert brcount data to the following format:
-#
-# db:          line number    -> block hash
-# block hash:  block number   -> branch hash
-# branch hash: branch number  -> taken value
-#
-
-sub brcount_to_db($)
-{
-	my ($brcount) = @_;
-	my $line;
-	my $db = {};
-
-	# Add branches to database
-	foreach $line (keys(%{$brcount})) {
-		my $brdata = $brcount->{$line};
-
-		foreach my $entry (split(/:/, $brdata)) {
-			my ($block, $branch, $taken) = split(/,/, $entry);
-			my $old = $db->{$line}->{$block}->{$branch};
-
-			if (!defined($old) || $old eq "-") {
-				$old = $taken;
-			} elsif ($taken ne "-") {
-				$old += $taken;
-			}
-
-			$db->{$line}->{$block}->{$branch} = $old;
-		}
-	}
-
-	return $db;
-}
-
-
-#
-# db_to_brcount(db[, brcount])
-#
-# Convert branch coverage data back to brcount format. If brcount is specified,
-# the converted data is directly inserted in brcount.
-#
-
-sub db_to_brcount($;$)
-{
-	my ($db, $brcount) = @_;
-	my $line;
-	my $br_found = 0;
-	my $br_hit = 0;
-
-	# Convert database back to brcount format
-	foreach $line (sort({$a <=> $b} keys(%{$db}))) {
-		my $ldata = $db->{$line};
-		my $brdata;
-		my $block;
-
-		foreach $block (sort({$a <=> $b} keys(%{$ldata}))) {
-			my $bdata = $ldata->{$block};
-			my $branch;
-
-			foreach $branch (sort({$a <=> $b} keys(%{$bdata}))) {
-				my $taken = $bdata->{$branch};
-
-				$br_found++;
-				$br_hit++ if ($taken ne "-" && $taken > 0);
-				$brdata .= "$block,$branch,$taken:";
-			}
-		}
-		$brcount->{$line} = $brdata;
-	}
-
-	return ($brcount, $br_found, $br_hit);
-}
-
-
-#
-# brcount_db_combine(db1, db2, op)
-#
-# db1 := db1 op db2, where
-#   db1, db2: brcount data as returned by brcount_to_db
-#   op:       one of $BR_ADD and BR_SUB
-#
-sub brcount_db_combine($$$)
-{
-	my ($db1, $db2, $op) = @_;
-
-	foreach my $line (keys(%{$db2})) {
-		my $ldata = $db2->{$line};
-
-		foreach my $block (keys(%{$ldata})) {
-			my $bdata = $ldata->{$block};
-
-			foreach my $branch (keys(%{$bdata})) {
-				my $taken = $bdata->{$branch};
-				my $new = $db1->{$line}->{$block}->{$branch};
-
-				if (!defined($new) || $new eq "-") {
-					$new = $taken;
-				} elsif ($taken ne "-") {
-					if ($op == $BR_ADD) {
-						$new += $taken;
-					} elsif ($op == $BR_SUB) {
-						$new -= $taken;
-						$new = 0 if ($new < 0);
-					}
-				}
-
-				$db1->{$line}->{$block}->{$branch} = $new;
-			}
-		}
-	}
-}
-
-
-#
-# brcount_db_get_found_and_hit(db)
-#
-# Return (br_found, br_hit) for db.
-#
-
-sub brcount_db_get_found_and_hit($)
-{
-	my ($db) = @_;
-	my ($br_found , $br_hit) = (0, 0);
-
-	foreach my $line (keys(%{$db})) {
-		my $ldata = $db->{$line};
-
-		foreach my $block (keys(%{$ldata})) {
-			my $bdata = $ldata->{$block};
-
-			foreach my $branch (keys(%{$bdata})) {
-				my $taken = $bdata->{$branch};
-
-				$br_found++;
-				$br_hit++ if ($taken ne "-" && $taken > 0);
-			}
-		}
-	}
-
-	return ($br_found, $br_hit);
-}
-
-
-# combine_brcount(brcount1, brcount2, type, inplace)
-#
-# If add is BR_ADD, add branch coverage data and return list brcount_added.
-# If add is BR_SUB, subtract the taken values of brcount2 from brcount1 and
-# return brcount_sub. If inplace is set, the result is inserted into brcount1.
-#
-
-sub combine_brcount($$$;$)
-{
-	my ($brcount1, $brcount2, $type, $inplace) = @_;
-	my ($db1, $db2);
-
-	$db1 = brcount_to_db($brcount1);
-	$db2 = brcount_to_db($brcount2);
-	brcount_db_combine($db1, $db2, $type);
-
-	return db_to_brcount($db1, $inplace ? $brcount1 : undef);
-}
-
-
-#
-# add_testbrdata(testbrdata1, testbrdata2)
-#
-# Add branch coverage data for several tests. Return reference to
-# added_testbrdata.
-#
-
-sub add_testbrdata($$)
-{
-	my ($testbrdata1, $testbrdata2) = @_;
-	my %result;
-	my $testname;
-
-	foreach $testname (keys(%{$testbrdata1})) {
-		if (defined($testbrdata2->{$testname})) {
-			my $brcount;
-
-			# Branch coverage data for this testname exists
-			# in both data sets: add
-			($brcount) = combine_brcount(
-				$testbrdata1->{$testname},
-				$testbrdata2->{$testname}, $BR_ADD);
-			$result{$testname} = $brcount;
-			next;
-		}
-		# Branch coverage data for this testname is unique to
-		# data set 1: copy
-		$result{$testname} = $testbrdata1->{$testname};
-	}
-
-	# Add count data for testnames unique to data set 2
-	foreach $testname (keys(%{$testbrdata2})) {
-		if (!defined($result{$testname})) {
-			$result{$testname} = $testbrdata2->{$testname};
-		}
-	}
-	return \%result;
-}
-
-
-#
-# combine_info_entries(entry_ref1, entry_ref2, filename)
-#
-# Combine .info data entry hashes referenced by ENTRY_REF1 and ENTRY_REF2.
-# Return reference to resulting hash.
-#
-
-sub combine_info_entries($$$)
-{
-	my $entry1 = $_[0];	# Reference to hash containing first entry
-	my $testdata1;
-	my $sumcount1;
-	my $funcdata1;
-	my $checkdata1;
-	my $testfncdata1;
-	my $sumfnccount1;
-	my $testbrdata1;
-	my $sumbrcount1;
-
-	my $entry2 = $_[1];	# Reference to hash containing second entry
-	my $testdata2;
-	my $sumcount2;
-	my $funcdata2;
-	my $checkdata2;
-	my $testfncdata2;
-	my $sumfnccount2;
-	my $testbrdata2;
-	my $sumbrcount2;
-
-	my %result;		# Hash containing combined entry
-	my %result_testdata;
-	my $result_sumcount = {};
-	my $result_funcdata;
-	my $result_testfncdata;
-	my $result_sumfnccount;
-	my $result_testbrdata;
-	my $result_sumbrcount;
-	my $lines_found;
-	my $lines_hit;
-	my $f_found;
-	my $f_hit;
-	my $br_found;
-	my $br_hit;
-
-	my $testname;
-	my $filename = $_[2];
-
-	# Retrieve data
-	($testdata1, $sumcount1, $funcdata1, $checkdata1, $testfncdata1,
-	 $sumfnccount1, $testbrdata1, $sumbrcount1) = get_info_entry($entry1);
-	($testdata2, $sumcount2, $funcdata2, $checkdata2, $testfncdata2,
-	 $sumfnccount2, $testbrdata2, $sumbrcount2) = get_info_entry($entry2);
-
-	# Merge checksums
-	$checkdata1 = merge_checksums($checkdata1, $checkdata2, $filename);
-
-	# Combine funcdata
-	$result_funcdata = merge_func_data($funcdata1, $funcdata2, $filename);
-
-	# Combine function call count data
-	$result_testfncdata = add_testfncdata($testfncdata1, $testfncdata2);
-	($result_sumfnccount, $f_found, $f_hit) =
-		add_fnccount($sumfnccount1, $sumfnccount2);
-
-	# Combine branch coverage data
-	$result_testbrdata = add_testbrdata($testbrdata1, $testbrdata2);
-	($result_sumbrcount, $br_found, $br_hit) =
-		combine_brcount($sumbrcount1, $sumbrcount2, $BR_ADD);
-
-	# Combine testdata
-	foreach $testname (keys(%{$testdata1}))
-	{
-		if (defined($testdata2->{$testname}))
-		{
-			# testname is present in both entries, requires
-			# combination
-			($result_testdata{$testname}) =
-				add_counts($testdata1->{$testname},
-					   $testdata2->{$testname});
-		}
-		else
-		{
-			# testname only present in entry1, add to result
-			$result_testdata{$testname} = $testdata1->{$testname};
-		}
-
-		# update sum count hash
-		($result_sumcount, $lines_found, $lines_hit) =
-			add_counts($result_sumcount,
-				   $result_testdata{$testname});
-	}
-
-	foreach $testname (keys(%{$testdata2}))
-	{
-		# Skip testnames already covered by previous iteration
-		if (defined($testdata1->{$testname})) { next; }
-
-		# testname only present in entry2, add to result hash
-		$result_testdata{$testname} = $testdata2->{$testname};
-
-		# update sum count hash
-		($result_sumcount, $lines_found, $lines_hit) =
-			add_counts($result_sumcount,
-				   $result_testdata{$testname});
-	}
-	
-	# Calculate resulting sumcount
-
-	# Store result
-	set_info_entry(\%result, \%result_testdata, $result_sumcount,
-		       $result_funcdata, $checkdata1, $result_testfncdata,
-		       $result_sumfnccount, $result_testbrdata,
-		       $result_sumbrcount, $lines_found, $lines_hit,
-		       $f_found, $f_hit, $br_found, $br_hit);
-
-	return(\%result);
-}
-
-
-#
-# combine_info_files(info_ref1, info_ref2)
-#
-# Combine .info data in hashes referenced by INFO_REF1 and INFO_REF2. Return
-# reference to resulting hash.
-#
-
-sub combine_info_files($$)
-{
-	my %hash1 = %{$_[0]};
-	my %hash2 = %{$_[1]};
-	my $filename;
-
-	foreach $filename (keys(%hash2))
-	{
-		if ($hash1{$filename})
-		{
-			# Entry already exists in hash1, combine them
-			$hash1{$filename} =
-				combine_info_entries($hash1{$filename},
-						     $hash2{$filename},
-						     $filename);
-		}
-		else
-		{
-			# Entry is unique in both hashes, simply add to
-			# resulting hash
-			$hash1{$filename} = $hash2{$filename};
-		}
-	}
-
-	return(\%hash1);
-}
-
-
-#
-# add_traces()
-#
-
-sub add_traces()
-{
-	my $total_trace;
-	my $current_trace;
-	my $tracefile;
-	my @result;
-	local *INFO_HANDLE;
-
-	info("Combining tracefiles.\n");
-
-	foreach $tracefile (@add_tracefile)
-	{
-		$current_trace = read_info_file($tracefile);
-		if ($total_trace)
-		{
-			$total_trace = combine_info_files($total_trace,
-							  $current_trace);
-		}
-		else
-		{
-			$total_trace = $current_trace;
-		}
-	}
-
-	# Write combined data
-	if (!$data_stdout)
-	{
-		info("Writing data to $output_filename\n");
-		open(INFO_HANDLE, ">", $output_filename)
-			or die("ERROR: cannot write to $output_filename!\n");
-		@result = write_info_file(*INFO_HANDLE, $total_trace);
-		close(*INFO_HANDLE);
-	}
-	else
-	{
-		@result = write_info_file(*STDOUT, $total_trace);
-	}
-
-	return @result;
-}
-
-
-#
-# write_info_file(filehandle, data)
-#
-
-sub write_info_file(*$)
-{
-	local *INFO_HANDLE = $_[0];
-	my %data = %{$_[1]};
-	my $source_file;
-	my $entry;
-	my $testdata;
-	my $sumcount;
-	my $funcdata;
-	my $checkdata;
-	my $testfncdata;
-	my $sumfnccount;
-	my $testbrdata;
-	my $sumbrcount;
-	my $testname;
-	my $line;
-	my $func;
-	my $testcount;
-	my $testfnccount;
-	my $testbrcount;
-	my $found;
-	my $hit;
-	my $f_found;
-	my $f_hit;
-	my $br_found;
-	my $br_hit;
-	my $ln_total_found = 0;
-	my $ln_total_hit = 0;
-	my $fn_total_found = 0;
-	my $fn_total_hit = 0;
-	my $br_total_found = 0;
-	my $br_total_hit = 0;
-
-	foreach $source_file (sort(keys(%data)))
-	{
-		$entry = $data{$source_file};
-		($testdata, $sumcount, $funcdata, $checkdata, $testfncdata,
-		 $sumfnccount, $testbrdata, $sumbrcount, $found, $hit,
-		 $f_found, $f_hit, $br_found, $br_hit) =
-			get_info_entry($entry);
-
-		# Add to totals
-		$ln_total_found += $found;
-		$ln_total_hit += $hit;
-		$fn_total_found += $f_found;
-		$fn_total_hit += $f_hit;
-		$br_total_found += $br_found;
-		$br_total_hit += $br_hit;
-
-		foreach $testname (sort(keys(%{$testdata})))
-		{
-			$testcount = $testdata->{$testname};
-			$testfnccount = $testfncdata->{$testname};
-			$testbrcount = $testbrdata->{$testname};
-			$found = 0;
-			$hit   = 0;
-
-			print(INFO_HANDLE "TN:$testname\n");
-			print(INFO_HANDLE "SF:$source_file\n");
-
-			# Write function related data
-			foreach $func (
-				sort({$funcdata->{$a} <=> $funcdata->{$b}}
-				keys(%{$funcdata})))
-			{
-				print(INFO_HANDLE "FN:".$funcdata->{$func}.
-				      ",$func\n");
-			}
-			foreach $func (keys(%{$testfnccount})) {
-				print(INFO_HANDLE "FNDA:".
-				      $testfnccount->{$func}.
-				      ",$func\n");
-			}
-			($f_found, $f_hit) =
-				get_func_found_and_hit($testfnccount);
-			print(INFO_HANDLE "FNF:$f_found\n");
-			print(INFO_HANDLE "FNH:$f_hit\n");
-
-			# Write branch related data
-			$br_found = 0;
-			$br_hit = 0;
-			foreach $line (sort({$a <=> $b}
-					    keys(%{$testbrcount}))) {
-				my $brdata = $testbrcount->{$line};
-
-				foreach my $brentry (split(/:/, $brdata)) {
-					my ($block, $branch, $taken) =
-						split(/,/, $brentry);
-
-					print(INFO_HANDLE "BRDA:$line,$block,".
-					      "$branch,$taken\n");
-					$br_found++;
-					$br_hit++ if ($taken ne '-' &&
-						      $taken > 0);
-				}
-			}
-			if ($br_found > 0) {
-				print(INFO_HANDLE "BRF:$br_found\n");
-				print(INFO_HANDLE "BRH:$br_hit\n");
-			}
-
-			# Write line related data
-			foreach $line (sort({$a <=> $b} keys(%{$testcount})))
-			{
-				print(INFO_HANDLE "DA:$line,".
-				      $testcount->{$line}.
-				      (defined($checkdata->{$line}) &&
-				       $checksum ?
-				       ",".$checkdata->{$line} : "")."\n");
-				$found++;
-				if ($testcount->{$line} > 0)
-				{
-					$hit++;
-				}
-
-			}
-			print(INFO_HANDLE "LF:$found\n");
-			print(INFO_HANDLE "LH:$hit\n");
-			print(INFO_HANDLE "end_of_record\n");
-		}
-	}
-
-	return ($ln_total_found, $ln_total_hit, $fn_total_found, $fn_total_hit,
-		$br_total_found, $br_total_hit);
-}
-
-
-#
-# transform_pattern(pattern)
-#
-# Transform shell wildcard expression to equivalent Perl regular expression.
-# Return transformed pattern.
-#
-
-sub transform_pattern($)
-{
-	my $pattern = $_[0];
-
-	# Escape special chars
-
-	$pattern =~ s/\\/\\\\/g;
-	$pattern =~ s/\//\\\//g;
-	$pattern =~ s/\^/\\\^/g;
-	$pattern =~ s/\$/\\\$/g;
-	$pattern =~ s/\(/\\\(/g;
-	$pattern =~ s/\)/\\\)/g;
-	$pattern =~ s/\[/\\\[/g;
-	$pattern =~ s/\]/\\\]/g;
-	$pattern =~ s/\{/\\\{/g;
-	$pattern =~ s/\}/\\\}/g;
-	$pattern =~ s/\./\\\./g;
-	$pattern =~ s/\,/\\\,/g;
-	$pattern =~ s/\|/\\\|/g;
-	$pattern =~ s/\+/\\\+/g;
-	$pattern =~ s/\!/\\\!/g;
-
-	# Transform ? => (.) and * => (.*)
-
-	$pattern =~ s/\*/\(\.\*\)/g;
-	$pattern =~ s/\?/\(\.\)/g;
-
-	return $pattern;
-}
-
-
-#
-# extract()
-#
-
-sub extract()
-{
-	my $data = read_info_file($extract);
-	my $filename;
-	my $keep;
-	my $pattern;
-	my @pattern_list;
-	my $extracted = 0;
-	my @result;
-	local *INFO_HANDLE;
-
-	# Need perlreg expressions instead of shell pattern
-	@pattern_list = map({ transform_pattern($_); } @ARGV);
-
-	# Filter out files which do not match any pattern
-	foreach $filename (sort(keys(%{$data})))
-	{
-		$keep = 0;
-
-		foreach $pattern (@pattern_list)
-		{
-			$keep ||= ($filename =~ (/^$pattern$/));
-		}
-
-
-		if (!$keep)
-		{
-			delete($data->{$filename});
-		}
-		else
-		{
-			info("Extracting $filename\n"),
-			$extracted++;
-		}
-	}
-
-	# Write extracted data
-	if (!$data_stdout)
-	{
-		info("Extracted $extracted files\n");
-		info("Writing data to $output_filename\n");
-		open(INFO_HANDLE, ">", $output_filename)
-			or die("ERROR: cannot write to $output_filename!\n");
-		@result = write_info_file(*INFO_HANDLE, $data);
-		close(*INFO_HANDLE);
-	}
-	else
-	{
-		@result = write_info_file(*STDOUT, $data);
-	}
-
-	return @result;
-}
-
-
-#
-# remove()
-#
-
-sub remove()
-{
-	my $data = read_info_file($remove);
-	my $filename;
-	my $match_found;
-	my $pattern;
-	my @pattern_list;
-	my $removed = 0;
-	my @result;
-	local *INFO_HANDLE;
-
-	# Need perlreg expressions instead of shell pattern
-	@pattern_list = map({ transform_pattern($_); } @ARGV);
-
-	# Filter out files that match the pattern
-	foreach $filename (sort(keys(%{$data})))
-	{
-		$match_found = 0;
-
-		foreach $pattern (@pattern_list)
-		{
-			$match_found ||= ($filename =~ (/^$pattern$/));
-		}
-
-
-		if ($match_found)
-		{
-			delete($data->{$filename});
-			info("Removing $filename\n"),
-			$removed++;
-		}
-	}
-
-	# Write data
-	if (!$data_stdout)
-	{
-		info("Deleted $removed files\n");
-		info("Writing data to $output_filename\n");
-		open(INFO_HANDLE, ">", $output_filename)
-			or die("ERROR: cannot write to $output_filename!\n");
-		@result = write_info_file(*INFO_HANDLE, $data);
-		close(*INFO_HANDLE);
-	}
-	else
-	{
-		@result = write_info_file(*STDOUT, $data);
-	}
-
-	return @result;
-}
-
-
-# get_prefix(max_width, max_percentage_too_long, path_list)
-#
-# Return a path prefix that satisfies the following requirements:
-# - is shared by more paths in path_list than any other prefix
-# - the percentage of paths which would exceed the given max_width length
-#   after applying the prefix does not exceed max_percentage_too_long
-#
-# If multiple prefixes satisfy all requirements, the longest prefix is
-# returned. Return an empty string if no prefix could be found.
-
-sub get_prefix($$@)
-{
-	my ($max_width, $max_long, @path_list) = @_;
-	my $path;
-	my $ENTRY_NUM = 0;
-	my $ENTRY_LONG = 1;
-	my %prefix;
-
-	# Build prefix hash
-	foreach $path (@path_list) {
-		my ($v, $d, $f) = splitpath($path);
-		my @dirs = splitdir($d);
-		my $p_len = length($path);
-		my $i;
-
-		# Remove trailing '/'
-		pop(@dirs) if ($dirs[scalar(@dirs) - 1] eq '');
-		for ($i = 0; $i < scalar(@dirs); $i++) {
-			my $subpath = catpath($v, catdir(@dirs[0..$i]), '');
-			my $entry = $prefix{$subpath};
-
-			$entry = [ 0, 0 ] if (!defined($entry));
-			$entry->[$ENTRY_NUM]++;
-			if (($p_len - length($subpath) - 1) > $max_width) {
-				$entry->[$ENTRY_LONG]++;
-			}
-			$prefix{$subpath} = $entry;
-		}
-	}
-	# Find suitable prefix (sort descending by two keys: 1. number of
-	# entries covered by a prefix, 2. length of prefix)
-	foreach $path (sort {($prefix{$a}->[$ENTRY_NUM] ==
-			      $prefix{$b}->[$ENTRY_NUM]) ?
-				length($b) <=> length($a) :
-				$prefix{$b}->[$ENTRY_NUM] <=>
-				$prefix{$a}->[$ENTRY_NUM]}
-				keys(%prefix)) {
-		my ($num, $long) = @{$prefix{$path}};
-
-		# Check for additional requirement: number of filenames
-		# that would be too long may not exceed a certain percentage
-		if ($long <= $num * $max_long / 100) {
-			return $path;
-		}
-	}
-
-	return "";
-}
-
-
-#
-# shorten_filename(filename, width)
-#
-# Truncate filename if it is longer than width characters.
-#
-
-sub shorten_filename($$)
-{
-	my ($filename, $width) = @_;
-	my $l = length($filename);
-	my $s;
-	my $e;
-
-	return $filename if ($l <= $width);
-	$e = int(($width - 3) / 2);
-	$s = $width - 3 - $e;
-
-	return substr($filename, 0, $s).'...'.substr($filename, $l - $e);
-}
-
-
-sub shorten_number($$)
-{
-	my ($number, $width) = @_;
-	my $result = sprintf("%*d", $width, $number);
-
-	return $result if (length($result) <= $width);
-	$number = $number / 1000;
-	return $result if (length($result) <= $width);
-	$result = sprintf("%*dk", $width - 1, $number);
-	return $result if (length($result) <= $width);
-	$number = $number / 1000;
-	$result = sprintf("%*dM", $width - 1, $number);
-	return $result if (length($result) <= $width);
-	return '#';
-}
-
-sub shorten_rate($$$)
-{
-	my ($hit, $found, $width) = @_;
-	my $result = rate($hit, $found, "%", 1, $width);
-
-	return $result if (length($result) <= $width);
-	$result = rate($hit, $found, "%", 0, $width);
-	return $result if (length($result) <= $width);
-	return "#";
-}
-
-#
-# list()
-#
-
-sub list()
-{
-	my $data = read_info_file($list);
-	my $filename;
-	my $found;
-	my $hit;
-	my $entry;
-	my $fn_found;
-	my $fn_hit;
-	my $br_found;
-	my $br_hit;
-	my $total_found = 0;
-	my $total_hit = 0;
-	my $fn_total_found = 0;
-	my $fn_total_hit = 0;
-	my $br_total_found = 0;
-	my $br_total_hit = 0;
-	my $prefix;
-	my $strlen = length("Filename");
-	my $format;
-	my $heading1;
-	my $heading2;
-	my @footer;
-	my $barlen;
-	my $rate;
-	my $fnrate;
-	my $brrate;
-	my $lastpath;
-	my $F_LN_NUM = 0;
-	my $F_LN_RATE = 1;
-	my $F_FN_NUM = 2;
-	my $F_FN_RATE = 3;
-	my $F_BR_NUM = 4;
-	my $F_BR_RATE = 5;
-	my @fwidth_narrow = (5, 5, 3, 5, 4, 5);
-	my @fwidth_wide = (6, 5, 5, 5, 6, 5);
-	my @fwidth = @fwidth_wide;
-	my $w;
-	my $max_width = $opt_list_width;
-	my $max_long = $opt_list_truncate_max;
-	my $fwidth_narrow_length;
-	my $fwidth_wide_length;
-	my $got_prefix = 0;
-	my $root_prefix = 0;
-
-	# Calculate total width of narrow fields
-	$fwidth_narrow_length = 0;
-	foreach $w (@fwidth_narrow) {
-		$fwidth_narrow_length += $w + 1;
-	}
-	# Calculate total width of wide fields
-	$fwidth_wide_length = 0;
-	foreach $w (@fwidth_wide) {
-		$fwidth_wide_length += $w + 1;
-	}
-	# Get common file path prefix
-	$prefix = get_prefix($max_width - $fwidth_narrow_length, $max_long,
-			     keys(%{$data}));
-	$root_prefix = 1 if ($prefix eq rootdir());
-	$got_prefix = 1 if (length($prefix) > 0);
-	$prefix =~ s/\/$//;
-	# Get longest filename length
-	foreach $filename (keys(%{$data})) {
-		if (!$opt_list_full_path) {
-			if (!$got_prefix || !$root_prefix &&
-			    !($filename =~ s/^\Q$prefix\/\E//)) {
-				my ($v, $d, $f) = splitpath($filename);
-
-				$filename = $f;
-			}
-		}
-		# Determine maximum length of entries
-		if (length($filename) > $strlen) {
-			$strlen = length($filename)
-		}
-	}
-	if (!$opt_list_full_path) {
-		my $blanks;
-
-		$w = $fwidth_wide_length;
-		# Check if all columns fit into max_width characters
-		if ($strlen + $fwidth_wide_length > $max_width) {
-			# Use narrow fields
-			@fwidth = @fwidth_narrow;
-			$w = $fwidth_narrow_length;
-			if (($strlen + $fwidth_narrow_length) > $max_width) {
-				# Truncate filenames at max width
-				$strlen = $max_width - $fwidth_narrow_length;
-			}
-		}
-		# Add some blanks between filename and fields if possible
-		$blanks = int($strlen * 0.5);
-		$blanks = 4 if ($blanks < 4);
-		$blanks = 8 if ($blanks > 8);
-		if (($strlen + $w + $blanks) < $max_width) {
-			$strlen += $blanks;
-		} else {
-			$strlen = $max_width - $w;
-		}
-	}
-	# Filename
-	$w = $strlen;
-	$format		= "%-${w}s|";
-	$heading1 	= sprintf("%*s|", $w, "");
-	$heading2 	= sprintf("%-*s|", $w, "Filename");
-	$barlen		= $w + 1;
-	# Line coverage rate
-	$w = $fwidth[$F_LN_RATE];
-	$format		.= "%${w}s ";
-	$heading1 	.= sprintf("%-*s |", $w + $fwidth[$F_LN_NUM],
-				   "Lines");
-	$heading2 	.= sprintf("%-*s ", $w, "Rate");
-	$barlen		+= $w + 1;
-	# Number of lines
-	$w = $fwidth[$F_LN_NUM];
-	$format		.= "%${w}s|";
-	$heading2	.= sprintf("%*s|", $w, "Num");
-	$barlen		+= $w + 1;
-	# Function coverage rate
-	$w = $fwidth[$F_FN_RATE];
-	$format		.= "%${w}s ";
-	$heading1 	.= sprintf("%-*s|", $w + $fwidth[$F_FN_NUM] + 1,
-				   "Functions");
-	$heading2 	.= sprintf("%-*s ", $w, "Rate");
-	$barlen		+= $w + 1;
-	# Number of functions
-	$w = $fwidth[$F_FN_NUM];
-	$format		.= "%${w}s|";
-	$heading2	.= sprintf("%*s|", $w, "Num");
-	$barlen		+= $w + 1;
-	# Branch coverage rate
-	$w = $fwidth[$F_BR_RATE];
-	$format		.= "%${w}s ";
-	$heading1 	.= sprintf("%-*s", $w + $fwidth[$F_BR_NUM] + 1,
-				   "Branches");
-	$heading2 	.= sprintf("%-*s ", $w, "Rate");
-	$barlen		+= $w + 1;
-	# Number of branches
-	$w = $fwidth[$F_BR_NUM];
-	$format		.= "%${w}s";
-	$heading2	.= sprintf("%*s", $w, "Num");
-	$barlen		+= $w;
-	# Line end
-	$format		.= "\n";
-	$heading1	.= "\n";
-	$heading2	.= "\n";
-
-	# Print heading
-	print($heading1);
-	print($heading2);
-	print(("="x$barlen)."\n");
-
-	# Print per file information
-	foreach $filename (sort(keys(%{$data})))
-	{
-		my @file_data;
-		my $print_filename = $filename;
-
-		$entry = $data->{$filename};
-		if (!$opt_list_full_path) {
-			my $p;
-
-			$print_filename = $filename;
-			if (!$got_prefix || !$root_prefix &&
-			    !($print_filename =~ s/^\Q$prefix\/\E//)) {
-				my ($v, $d, $f) = splitpath($filename);
-
-				$p = catpath($v, $d, "");
-				$p =~ s/\/$//;
-				$print_filename = $f;
-			} else {
-				$p = $prefix;
-			}
-
-			if (!defined($lastpath) || $lastpath ne $p) {
-				print("\n") if (defined($lastpath));
-				$lastpath = $p;
-				print("[$lastpath/]\n") if (!$root_prefix);
-			}
-			$print_filename = shorten_filename($print_filename,
-							   $strlen);
-		}
-
-		(undef, undef, undef, undef, undef, undef, undef, undef,
-		 $found, $hit, $fn_found, $fn_hit, $br_found, $br_hit) =
-			get_info_entry($entry);
-
-		# Assume zero count if there is no function data for this file
-		if (!defined($fn_found) || !defined($fn_hit)) {
-			$fn_found = 0;
-			$fn_hit = 0;
-		}
-		# Assume zero count if there is no branch data for this file
-		if (!defined($br_found) || !defined($br_hit)) {
-			$br_found = 0;
-			$br_hit = 0;
-		}
-
-		# Add line coverage totals
-		$total_found += $found;
-		$total_hit += $hit;
-		# Add function coverage totals
-		$fn_total_found += $fn_found;
-		$fn_total_hit += $fn_hit;
-		# Add branch coverage totals
-		$br_total_found += $br_found;
-		$br_total_hit += $br_hit;
-
-		# Determine line coverage rate for this file
-		$rate = shorten_rate($hit, $found, $fwidth[$F_LN_RATE]);
-		# Determine function coverage rate for this file
-		$fnrate = shorten_rate($fn_hit, $fn_found, $fwidth[$F_FN_RATE]);
-		# Determine branch coverage rate for this file
-		$brrate = shorten_rate($br_hit, $br_found, $fwidth[$F_BR_RATE]);
-
-		# Assemble line parameters
-		push(@file_data, $print_filename);
-		push(@file_data, $rate);
-		push(@file_data, shorten_number($found, $fwidth[$F_LN_NUM]));
-		push(@file_data, $fnrate);
-		push(@file_data, shorten_number($fn_found, $fwidth[$F_FN_NUM]));
-		push(@file_data, $brrate);
-		push(@file_data, shorten_number($br_found, $fwidth[$F_BR_NUM]));
-
-		# Print assembled line
-		printf($format, @file_data);
-	}
-
-	# Determine total line coverage rate
-	$rate = shorten_rate($total_hit, $total_found, $fwidth[$F_LN_RATE]);
-	# Determine total function coverage rate
-	$fnrate = shorten_rate($fn_total_hit, $fn_total_found,
-			       $fwidth[$F_FN_RATE]);
-	# Determine total branch coverage rate
-	$brrate = shorten_rate($br_total_hit, $br_total_found,
-			       $fwidth[$F_BR_RATE]);
-
-	# Print separator
-	print(("="x$barlen)."\n");
-
-	# Assemble line parameters
-	push(@footer, sprintf("%*s", $strlen, "Total:"));
-	push(@footer, $rate);
-	push(@footer, shorten_number($total_found, $fwidth[$F_LN_NUM]));
-	push(@footer, $fnrate);
-	push(@footer, shorten_number($fn_total_found, $fwidth[$F_FN_NUM]));
-	push(@footer, $brrate);
-	push(@footer, shorten_number($br_total_found, $fwidth[$F_BR_NUM]));
-
-	# Print assembled line
-	printf($format, @footer);
-}
-
-
-#
-# get_common_filename(filename1, filename2)
-#
-# Check for filename components which are common to FILENAME1 and FILENAME2.
-# Upon success, return
-#
-#   (common, path1, path2)
-#
-#  or 'undef' in case there are no such parts.
-#
-
-sub get_common_filename($$)
-{
-        my @list1 = split("/", $_[0]);
-        my @list2 = split("/", $_[1]);
-	my @result;
-
-	# Work in reverse order, i.e. beginning with the filename itself
-	while (@list1 && @list2 && ($list1[$#list1] eq $list2[$#list2]))
-	{
-		unshift(@result, pop(@list1));
-		pop(@list2);
-	}
-
-	# Did we find any similarities?
-	if (scalar(@result) > 0)
-	{
-	        return (join("/", @result), join("/", @list1),
-			join("/", @list2));
-	}
-	else
-	{
-		return undef;
-	}
-}
-
-
-#
-# strip_directories($path, $depth)
-#
-# Remove DEPTH leading directory levels from PATH.
-#
-
-sub strip_directories($$)
-{
-	my $filename = $_[0];
-	my $depth = $_[1];
-	my $i;
-
-	if (!defined($depth) || ($depth < 1))
-	{
-		return $filename;
-	}
-	for ($i = 0; $i < $depth; $i++)
-	{
-		$filename =~ s/^[^\/]*\/+(.*)$/$1/;
-	}
-	return $filename;
-}
-
-
-#
-# read_diff(filename)
-#
-# Read diff output from FILENAME to memory. The diff file has to follow the
-# format generated by 'diff -u'. Returns a list of hash references:
-#
-#   (mapping, path mapping)
-#
-#   mapping:   filename -> reference to line hash
-#   line hash: line number in new file -> corresponding line number in old file
-#
-#   path mapping:  filename -> old filename
-#
-# Die in case of error.
-#
-
-sub read_diff($)
-{
-	my $diff_file = $_[0];	# Name of diff file
-	my %diff;		# Resulting mapping filename -> line hash
-	my %paths;		# Resulting mapping old path  -> new path
-	my $mapping;		# Reference to current line hash
-	my $line;		# Contents of current line
-	my $num_old;		# Current line number in old file
-	my $num_new;		# Current line number in new file
-	my $file_old;		# Name of old file in diff section
-	my $file_new;		# Name of new file in diff section
-	my $filename;		# Name of common filename of diff section
-	my $in_block = 0;	# Non-zero while we are inside a diff block
-	local *HANDLE;		# File handle for reading the diff file
-
-	info("Reading diff $diff_file\n");
-
-	# Check if file exists and is readable
-	stat($diff_file);
-	if (!(-r _))
-	{
-		die("ERROR: cannot read file $diff_file!\n");
-	}
-
-	# Check if this is really a plain file
-	if (!(-f _))
-	{
-		die("ERROR: not a plain file: $diff_file!\n");
-	}
-
-	# Check for .gz extension
-	if ($diff_file =~ /\.gz$/)
-	{
-		# Check for availability of GZIP tool
-		system_no_output(1, "gunzip", "-h")
-			and die("ERROR: gunzip command not available!\n");
-
-		# Check integrity of compressed file
-		system_no_output(1, "gunzip", "-t", $diff_file)
-			and die("ERROR: integrity check failed for ".
-				"compressed file $diff_file!\n");
-
-		# Open compressed file
-		open(HANDLE, "-|", "gunzip -c '$diff_file'")
-			or die("ERROR: cannot start gunzip to decompress ".
-			       "file $_[0]!\n");
-	}
-	else
-	{
-		# Open decompressed file
-		open(HANDLE, "<", $diff_file)
-			or die("ERROR: cannot read file $_[0]!\n");
-	}
-
-	# Parse diff file line by line
-	while (<HANDLE>)
-	{
-		chomp($_);
-		$line = $_;
-
-		foreach ($line)
-		{
-			# Filename of old file:
-			# --- <filename> <date>
-			/^--- (\S+)/ && do
-			{
-				$file_old = strip_directories($1, $strip);
-				last;
-			};
-			# Filename of new file:
-			# +++ <filename> <date>
-			/^\+\+\+ (\S+)/ && do
-			{
-				# Add last file to resulting hash
-				if ($filename)
-				{
-					my %new_hash;
-					$diff{$filename} = $mapping;
-					$mapping = \%new_hash;
-				}
-				$file_new = strip_directories($1, $strip);
-				$filename = $file_old;
-				$paths{$filename} = $file_new;
-				$num_old = 1;
-				$num_new = 1;
-				last;
-			};
-			# Start of diff block:
-			# @@ -old_start,old_num, +new_start,new_num @@
-			/^\@\@\s+-(\d+),(\d+)\s+\+(\d+),(\d+)\s+\@\@$/ && do
-			{
-			$in_block = 1;
-			while ($num_old < $1)
-			{
-				$mapping->{$num_new} = $num_old;
-				$num_old++;
-				$num_new++;
-			}
-			last;
-			};
-			# Unchanged line
-			# <line starts with blank>
-			/^ / && do
-			{
-				if ($in_block == 0)
-				{
-					last;
-				}
-				$mapping->{$num_new} = $num_old;
-				$num_old++;
-				$num_new++;
-				last;
-			};
-			# Line as seen in old file
-			# <line starts with '-'>
-			/^-/ && do
-			{
-				if ($in_block == 0)
-				{
-					last;
-				}
-				$num_old++;
-				last;
-			};
-			# Line as seen in new file
-			# <line starts with '+'>
-			/^\+/ && do
-			{
-				if ($in_block == 0)
-				{
-					last;
-				}
-				$num_new++;
-				last;
-			};
-			# Empty line
-			/^$/ && do
-			{
-				if ($in_block == 0)
-				{
-					last;
-				}
-				$mapping->{$num_new} = $num_old;
-				$num_old++;
-				$num_new++;
-				last;
-			};
-		}
-	}
-
-	close(HANDLE);
-
-	# Add final diff file section to resulting hash
-	if ($filename)
-	{
-		$diff{$filename} = $mapping;
-	}
-
-	if (!%diff)
-	{
-		die("ERROR: no valid diff data found in $diff_file!\n".
-		    "Make sure to use 'diff -u' when generating the diff ".
-		    "file.\n");
-	}
-	return (\%diff, \%paths);
-}
-
-
-#
-# apply_diff($count_data, $line_hash)
-#
-# Transform count data using a mapping of lines:
-#
-#   $count_data: reference to hash: line number -> data
-#   $line_hash:  reference to hash: line number new -> line number old
-#
-# Return a reference to transformed count data.
-#
-
-sub apply_diff($$)
-{
-	my $count_data = $_[0];	# Reference to data hash: line -> hash
-	my $line_hash = $_[1];	# Reference to line hash: new line -> old line
-	my %result;		# Resulting hash
-	my $last_new = 0;	# Last new line number found in line hash
-	my $last_old = 0;	# Last old line number found in line hash
-
-	# Iterate all new line numbers found in the diff
-	foreach (sort({$a <=> $b} keys(%{$line_hash})))
-	{
-		$last_new = $_;
-		$last_old = $line_hash->{$last_new};
-
-		# Is there data associated with the corresponding old line?
-		if (defined($count_data->{$line_hash->{$_}}))
-		{
-			# Copy data to new hash with a new line number
-			$result{$_} = $count_data->{$line_hash->{$_}};
-		}
-	}
-	# Transform all other lines which come after the last diff entry
-	foreach (sort({$a <=> $b} keys(%{$count_data})))
-	{
-		if ($_ <= $last_old)
-		{
-			# Skip lines which were covered by line hash
-			next;
-		}
-		# Copy data to new hash with an offset
-		$result{$_ + ($last_new - $last_old)} = $count_data->{$_};
-	}
-
-	return \%result;
-}
-
-
-#
-# apply_diff_to_brcount(brcount, linedata)
-#
-# Adjust line numbers of branch coverage data according to linedata.
-#
-
-sub apply_diff_to_brcount($$)
-{
-	my ($brcount, $linedata) = @_;
-	my $db;
-
-	# Convert brcount to db format
-	$db = brcount_to_db($brcount);
-	# Apply diff to db format
-	$db = apply_diff($db, $linedata);
-	# Convert db format back to brcount format
-	($brcount) = db_to_brcount($db);
-
-	return $brcount;
-}
-
-
-#
-# get_hash_max(hash_ref)
-#
-# Return the highest integer key from hash.
-#
-
-sub get_hash_max($)
-{
-	my ($hash) = @_;
-	my $max;
-
-	foreach (keys(%{$hash})) {
-		if (!defined($max)) {
-			$max = $_;
-		} elsif ($hash->{$_} > $max) {
-			$max = $_;
-		}
-	}
-	return $max;
-}
-
-sub get_hash_reverse($)
-{
-	my ($hash) = @_;
-	my %result;
-
-	foreach (keys(%{$hash})) {
-		$result{$hash->{$_}} = $_;
-	}
-
-	return \%result;
-}
-
-#
-# apply_diff_to_funcdata(funcdata, line_hash)
-#
-
-sub apply_diff_to_funcdata($$)
-{
-	my ($funcdata, $linedata) = @_;
-	my $last_new = get_hash_max($linedata);
-	my $last_old = $linedata->{$last_new};
-	my $func;
-	my %result;
-	my $line_diff = get_hash_reverse($linedata);
-
-	foreach $func (keys(%{$funcdata})) {
-		my $line = $funcdata->{$func};
-
-		if (defined($line_diff->{$line})) {
-			$result{$func} = $line_diff->{$line};
-		} elsif ($line > $last_old) {
-			$result{$func} = $line + $last_new - $last_old;
-		}
-	}
-
-	return \%result;
-}
-
-
-#
-# get_line_hash($filename, $diff_data, $path_data)
-#
-# Find line hash in DIFF_DATA which matches FILENAME. On success, return list
-# line hash. or undef in case of no match. Die if more than one line hashes in
-# DIFF_DATA match.
-#
-
-sub get_line_hash($$$)
-{
-	my $filename = $_[0];
-	my $diff_data = $_[1];
-	my $path_data = $_[2];
-	my $conversion;
-	my $old_path;
-	my $new_path;
-	my $diff_name;
-	my $common;
-	my $old_depth;
-	my $new_depth;
-
-	# Remove trailing slash from diff path
-	$diff_path =~ s/\/$//;
-	foreach (keys(%{$diff_data}))
-	{
-		my $sep = "";
-
-		$sep = '/' if (!/^\//);
-
-		# Try to match diff filename with filename
-		if ($filename =~ /^\Q$diff_path$sep$_\E$/)
-		{
-			if ($diff_name)
-			{
-				# Two files match, choose the more specific one
-				# (the one with more path components)
-				$old_depth = ($diff_name =~ tr/\///);
-				$new_depth = (tr/\///);
-				if ($old_depth == $new_depth)
-				{
-					die("ERROR: diff file contains ".
-					    "ambiguous entries for ".
-					    "$filename\n");
-				}
-				elsif ($new_depth > $old_depth)
-				{
-					$diff_name = $_;
-				}
-			}
-			else
-			{
-				$diff_name = $_;
-			}
-		};
-	}
-	if ($diff_name)
-	{
-		# Get converted path
-		if ($filename =~ /^(.*)$diff_name$/)
-		{
-			($common, $old_path, $new_path) =
-				get_common_filename($filename,
-					$1.$path_data->{$diff_name});
-		}
-		return ($diff_data->{$diff_name}, $old_path, $new_path);
-	}
-	else
-	{
-		return undef;
-	}
-}
-
-
-#
-# convert_paths(trace_data, path_conversion_data)
-#
-# Rename all paths in TRACE_DATA which show up in PATH_CONVERSION_DATA.
-#
-
-sub convert_paths($$)
-{
-	my $trace_data = $_[0];
-	my $path_conversion_data = $_[1];
-	my $filename;
-	my $new_path;
-
-	if (scalar(keys(%{$path_conversion_data})) == 0)
-	{
-		info("No path conversion data available.\n");
-		return;
-	}
-
-	# Expand path conversion list
-	foreach $filename (keys(%{$path_conversion_data}))
-	{
-		$new_path = $path_conversion_data->{$filename};
-		while (($filename =~ s/^(.*)\/[^\/]+$/$1/) &&
-		       ($new_path =~ s/^(.*)\/[^\/]+$/$1/) &&
-		       ($filename ne $new_path))
-		{
-			$path_conversion_data->{$filename} = $new_path;
-		}
-	}
-
-	# Adjust paths
-	FILENAME: foreach $filename (keys(%{$trace_data}))
-	{
-		# Find a path in our conversion table that matches, starting
-		# with the longest path
-		foreach (sort({length($b) <=> length($a)}
-			      keys(%{$path_conversion_data})))
-		{
-			# Is this path a prefix of our filename?
-			if (!($filename =~ /^$_(.*)$/))
-			{
-				next;
-			}
-			$new_path = $path_conversion_data->{$_}.$1;
-
-			# Make sure not to overwrite an existing entry under
-			# that path name
-			if ($trace_data->{$new_path})
-			{
-				# Need to combine entries
-				$trace_data->{$new_path} =
-					combine_info_entries(
-						$trace_data->{$filename},
-						$trace_data->{$new_path},
-						$filename);
-			}
-			else
-			{
-				# Simply rename entry
-				$trace_data->{$new_path} =
-					$trace_data->{$filename};
-			}
-			delete($trace_data->{$filename});
-			next FILENAME;
-		}
-		info("No conversion available for filename $filename\n");
-	}
-}
-
-#
-# sub adjust_fncdata(funcdata, testfncdata, sumfnccount)
-#
-# Remove function call count data from testfncdata and sumfnccount which
-# is no longer present in funcdata.
-#
-
-sub adjust_fncdata($$$)
-{
-	my ($funcdata, $testfncdata, $sumfnccount) = @_;
-	my $testname;
-	my $func;
-	my $f_found;
-	my $f_hit;
-
-	# Remove count data in testfncdata for functions which are no longer
-	# in funcdata
-	foreach $testname (keys(%{$testfncdata})) {
-		my $fnccount = $testfncdata->{$testname};
-
-		foreach $func (keys(%{$fnccount})) {
-			if (!defined($funcdata->{$func})) {
-				delete($fnccount->{$func});
-			}
-		}
-	}
-	# Remove count data in sumfnccount for functions which are no longer
-	# in funcdata
-	foreach $func (keys(%{$sumfnccount})) {
-		if (!defined($funcdata->{$func})) {
-			delete($sumfnccount->{$func});
-		}
-	}
-}
-
-#
-# get_func_found_and_hit(sumfnccount)
-#
-# Return (f_found, f_hit) for sumfnccount
-#
-
-sub get_func_found_and_hit($)
-{
-	my ($sumfnccount) = @_;
-	my $function;
-	my $f_found;
-	my $f_hit;
-
-	$f_found = scalar(keys(%{$sumfnccount}));
-	$f_hit = 0;
-	foreach $function (keys(%{$sumfnccount})) {
-		if ($sumfnccount->{$function} > 0) {
-			$f_hit++;
-		}
-	}
-	return ($f_found, $f_hit);
-}
-
-#
-# diff()
-#
-
-sub diff()
-{
-	my $trace_data = read_info_file($diff);
-	my $diff_data;
-	my $path_data;
-	my $old_path;
-	my $new_path;
-	my %path_conversion_data;
-	my $filename;
-	my $line_hash;
-	my $new_name;
-	my $entry;
-	my $testdata;
-	my $testname;
-	my $sumcount;
-	my $funcdata;
-	my $checkdata;
-	my $testfncdata;
-	my $sumfnccount;
-	my $testbrdata;
-	my $sumbrcount;
-	my $found;
-	my $hit;
-	my $f_found;
-	my $f_hit;
-	my $br_found;
-	my $br_hit;
-	my $converted = 0;
-	my $unchanged = 0;
-	my @result;
-	local *INFO_HANDLE;
-
-	($diff_data, $path_data) = read_diff($ARGV[0]);
-
-        foreach $filename (sort(keys(%{$trace_data})))
-        {
-		# Find a diff section corresponding to this file
-		($line_hash, $old_path, $new_path) =
-			get_line_hash($filename, $diff_data, $path_data);
-		if (!$line_hash)
-		{
-			# There's no diff section for this file
-			$unchanged++;
-			next;
-		}
-		$converted++;
-		if ($old_path && $new_path && ($old_path ne $new_path))
-		{
-			$path_conversion_data{$old_path} = $new_path;
-		}
-		# Check for deleted files
-		if (scalar(keys(%{$line_hash})) == 0)
-		{
-			info("Removing $filename\n");
-			delete($trace_data->{$filename});
-			next;
-		}
-		info("Converting $filename\n");
-		$entry = $trace_data->{$filename};
-		($testdata, $sumcount, $funcdata, $checkdata, $testfncdata,
-		 $sumfnccount, $testbrdata, $sumbrcount) =
-			get_info_entry($entry);
-		# Convert test data
-		foreach $testname (keys(%{$testdata}))
-		{
-			# Adjust line numbers of line coverage data
-			$testdata->{$testname} =
-				apply_diff($testdata->{$testname}, $line_hash);
-			# Adjust line numbers of branch coverage data
-			$testbrdata->{$testname} =
-				apply_diff_to_brcount($testbrdata->{$testname},
-						      $line_hash);
-			# Remove empty sets of test data
-			if (scalar(keys(%{$testdata->{$testname}})) == 0)
-			{
-				delete($testdata->{$testname});
-				delete($testfncdata->{$testname});
-				delete($testbrdata->{$testname});
-			}
-		}
-		# Rename test data to indicate conversion
-		foreach $testname (keys(%{$testdata}))
-		{
-			# Skip testnames which already contain an extension
-			if ($testname =~ /,[^,]+$/)
-			{
-				next;
-			}
-			# Check for name conflict
-			if (defined($testdata->{$testname.",diff"}))
-			{
-				# Add counts
-				($testdata->{$testname}) = add_counts(
-					$testdata->{$testname},
-					$testdata->{$testname.",diff"});
-				delete($testdata->{$testname.",diff"});
-				# Add function call counts
-				($testfncdata->{$testname}) = add_fnccount(
-					$testfncdata->{$testname},
-					$testfncdata->{$testname.",diff"});
-				delete($testfncdata->{$testname.",diff"});
-				# Add branch counts
-				combine_brcount(
-					$testbrdata->{$testname},
-					$testbrdata->{$testname.",diff"},
-					$BR_ADD, 1);
-				delete($testbrdata->{$testname.",diff"});
-			}
-			# Move test data to new testname
-			$testdata->{$testname.",diff"} = $testdata->{$testname};
-			delete($testdata->{$testname});
-			# Move function call count data to new testname
-			$testfncdata->{$testname.",diff"} =
-				$testfncdata->{$testname};
-			delete($testfncdata->{$testname});
-			# Move branch count data to new testname
-			$testbrdata->{$testname.",diff"} =
-				$testbrdata->{$testname};
-			delete($testbrdata->{$testname});
-		}
-		# Convert summary of test data
-		$sumcount = apply_diff($sumcount, $line_hash);
-		# Convert function data
-		$funcdata = apply_diff_to_funcdata($funcdata, $line_hash);
-		# Convert branch coverage data
-		$sumbrcount = apply_diff_to_brcount($sumbrcount, $line_hash);
-		# Update found/hit numbers
-		# Convert checksum data
-		$checkdata = apply_diff($checkdata, $line_hash);
-		# Convert function call count data
-		adjust_fncdata($funcdata, $testfncdata, $sumfnccount);
-		($f_found, $f_hit) = get_func_found_and_hit($sumfnccount);
-		($br_found, $br_hit) = get_br_found_and_hit($sumbrcount);
-		# Update found/hit numbers
-		$found = 0;
-		$hit = 0;
-		foreach (keys(%{$sumcount}))
-		{
-			$found++;
-			if ($sumcount->{$_} > 0)
-			{
-				$hit++;
-			}
-		}
-		if ($found > 0)
-		{
-			# Store converted entry
-			set_info_entry($entry, $testdata, $sumcount, $funcdata,
-				       $checkdata, $testfncdata, $sumfnccount,
-				       $testbrdata, $sumbrcount, $found, $hit,
-				       $f_found, $f_hit, $br_found, $br_hit);
-		}
-		else
-		{
-			# Remove empty data set
-			delete($trace_data->{$filename});
-		}
-        }
-
-	# Convert filenames as well if requested
-	if ($convert_filenames)
-	{
-		convert_paths($trace_data, \%path_conversion_data);
-	}
-
-	info("$converted entr".($converted != 1 ? "ies" : "y")." converted, ".
-	     "$unchanged entr".($unchanged != 1 ? "ies" : "y")." left ".
-	     "unchanged.\n");
-
-	# Write data
-	if (!$data_stdout)
-	{
-		info("Writing data to $output_filename\n");
-		open(INFO_HANDLE, ">", $output_filename)
-			or die("ERROR: cannot write to $output_filename!\n");
-		@result = write_info_file(*INFO_HANDLE, $trace_data);
-		close(*INFO_HANDLE);
-	}
-	else
-	{
-		@result = write_info_file(*STDOUT, $trace_data);
-	}
-
-	return @result;
-}
-
-#
-# summary()
-#
-
-sub summary()
-{
-	my $filename;
-	my $current;
-	my $total;
-	my $ln_total_found;
-	my $ln_total_hit;
-	my $fn_total_found;
-	my $fn_total_hit;
-	my $br_total_found;
-	my $br_total_hit;
-
-	# Read and combine trace files
-	foreach $filename (@opt_summary) {
-		$current = read_info_file($filename);
-		if (!defined($total)) {
-			$total = $current;
-		} else {
-			$total = combine_info_files($total, $current);
-		}
-	}
-	# Calculate coverage data
-	foreach $filename (keys(%{$total}))
-	{
-		my $entry = $total->{$filename};
-		my $ln_found;
-		my $ln_hit;
-		my $fn_found;
-		my $fn_hit;
-		my $br_found;
-		my $br_hit;
-
-		(undef, undef, undef, undef, undef, undef, undef, undef,
-			$ln_found, $ln_hit, $fn_found, $fn_hit, $br_found,
-			$br_hit) = get_info_entry($entry);
-
-		# Add to totals
-		$ln_total_found	+= $ln_found;
-		$ln_total_hit	+= $ln_hit;
-		$fn_total_found += $fn_found;
-		$fn_total_hit	+= $fn_hit;
-		$br_total_found += $br_found;
-		$br_total_hit	+= $br_hit;
-	}
-
-
-	return ($ln_total_found, $ln_total_hit, $fn_total_found, $fn_total_hit,
-		$br_total_found, $br_total_hit);
-}
-
-#
-# system_no_output(mode, parameters)
-#
-# Call an external program using PARAMETERS while suppressing depending on
-# the value of MODE:
-#
-#   MODE & 1: suppress STDOUT
-#   MODE & 2: suppress STDERR
-#
-# Return 0 on success, non-zero otherwise.
-#
-
-sub system_no_output($@)
-{
-	my $mode = shift;
-	my $result;
-	local *OLD_STDERR;
-	local *OLD_STDOUT;
-
-	# Save old stdout and stderr handles
-	($mode & 1) && open(OLD_STDOUT, ">>&", "STDOUT");
-	($mode & 2) && open(OLD_STDERR, ">>&", "STDERR");
-
-	# Redirect to /dev/null
-	($mode & 1) && open(STDOUT, ">", "/dev/null");
-	($mode & 2) && open(STDERR, ">", "/dev/null");
- 
-	system(@_);
-	$result = $?;
-
-	# Close redirected handles
-	($mode & 1) && close(STDOUT);
-	($mode & 2) && close(STDERR);
-
-	# Restore old handles
-	($mode & 1) && open(STDOUT, ">>&", "OLD_STDOUT");
-	($mode & 2) && open(STDERR, ">>&", "OLD_STDERR");
- 
-	return $result;
-}
-
-
-#
-# read_config(filename)
-#
-# Read configuration file FILENAME and return a reference to a hash containing
-# all valid key=value pairs found.
-#
-
-sub read_config($)
-{
-	my $filename = $_[0];
-	my %result;
-	my $key;
-	my $value;
-	local *HANDLE;
-
-	if (!open(HANDLE, "<", $filename))
-	{
-		warn("WARNING: cannot read configuration file $filename\n");
-		return undef;
-	}
-	while (<HANDLE>)
-	{
-		chomp;
-		# Skip comments
-		s/#.*//;
-		# Remove leading blanks
-		s/^\s+//;
-		# Remove trailing blanks
-		s/\s+$//;
-		next unless length;
-		($key, $value) = split(/\s*=\s*/, $_, 2);
-		if (defined($key) && defined($value))
-		{
-			$result{$key} = $value;
-		}
-		else
-		{
-			warn("WARNING: malformed statement in line $. ".
-			     "of configuration file $filename\n");
-		}
-	}
-	close(HANDLE);
-	return \%result;
-}
-
-
-#
-# apply_config(REF)
-#
-# REF is a reference to a hash containing the following mapping:
-#
-#   key_string => var_ref
-#
-# where KEY_STRING is a keyword and VAR_REF is a reference to an associated
-# variable. If the global configuration hashes CONFIG or OPT_RC contain a value
-# for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. 
-#
-
-sub apply_config($)
-{
-	my $ref = $_[0];
-
-	foreach (keys(%{$ref}))
-	{
-		if (defined($opt_rc{$_})) {
-			${$ref->{$_}} = $opt_rc{$_};
-		} elsif (defined($config->{$_})) {
-			${$ref->{$_}} = $config->{$_};
-		}
-	}
-}
-
-sub warn_handler($)
-{
-	my ($msg) = @_;
-
-	warn("$tool_name: $msg");
-}
-
-sub die_handler($)
-{
-	my ($msg) = @_;
-
-	temp_cleanup();
-	die("$tool_name: $msg");
-}
-
-sub abort_handler($)
-{
-	temp_cleanup();
-	exit(1);
-}
-
-sub temp_cleanup()
-{
-	# Ensure temp directory is not in use by current process
-	chdir("/");
-
-	if (@temp_dirs) {
-		info("Removing temporary directories.\n");
-		foreach (@temp_dirs) {
-			rmtree($_);
-		}
-		@temp_dirs = ();
-	}
-}
-
-sub setup_gkv_sys()
-{
-	system_no_output(3, "mount", "-t", "debugfs", "nodev",
-			 "/sys/kernel/debug");
-}
-
-sub setup_gkv_proc()
-{
-	if (system_no_output(3, "modprobe", "gcov_proc")) {
-		system_no_output(3, "modprobe", "gcov_prof");
-	}
-}
-
-sub check_gkv_sys($)
-{
-	my ($dir) = @_;
-
-	if (-e "$dir/reset") {
-		return 1;
-	}
-	return 0;
-}
-
-sub check_gkv_proc($)
-{
-	my ($dir) = @_;
-
-	if (-e "$dir/vmlinux") {
-		return 1;
-	}
-	return 0;
-}
-
-sub setup_gkv()
-{
-	my $dir;
-	my $sys_dir = "/sys/kernel/debug/gcov";
-	my $proc_dir = "/proc/gcov";
-	my @todo;
-
-	if (!defined($gcov_dir)) {
-		info("Auto-detecting gcov kernel support.\n");
-		@todo = ( "cs", "cp", "ss", "cs", "sp", "cp" );
-	} elsif ($gcov_dir =~ /proc/) {
-		info("Checking gcov kernel support at $gcov_dir ".
-		     "(user-specified).\n");
-		@todo = ( "cp", "sp", "cp", "cs", "ss", "cs");
-	} else {
-		info("Checking gcov kernel support at $gcov_dir ".
-		     "(user-specified).\n");
-		@todo = ( "cs", "ss", "cs", "cp", "sp", "cp", );
-	}
-	foreach (@todo) {
-		if ($_ eq "cs") {
-			# Check /sys
-			$dir = defined($gcov_dir) ? $gcov_dir : $sys_dir;
-			if (check_gkv_sys($dir)) {
-				info("Found ".$GKV_NAME[$GKV_SYS]." gcov ".
-				     "kernel support at $dir\n");
-				return ($GKV_SYS, $dir);
-			}
-		} elsif ($_ eq "cp") {
-			# Check /proc
-			$dir = defined($gcov_dir) ? $gcov_dir : $proc_dir;
-			if (check_gkv_proc($dir)) {
-				info("Found ".$GKV_NAME[$GKV_PROC]." gcov ".
-				     "kernel support at $dir\n");
-				return ($GKV_PROC, $dir);
-			}
-		} elsif ($_ eq "ss") {
-			# Setup /sys
-			setup_gkv_sys();
-		} elsif ($_ eq "sp") {
-			# Setup /proc
-			setup_gkv_proc();
-		}
-	}
-	if (defined($gcov_dir)) {
-		die("ERROR: could not find gcov kernel data at $gcov_dir\n");
-	} else {
-		die("ERROR: no gcov kernel data found\n");
-	}
-}
-
-
-#
-# get_overall_line(found, hit, name_singular, name_plural)
-#
-# Return a string containing overall information for the specified
-# found/hit data.
-#
-
-sub get_overall_line($$$$)
-{
-	my ($found, $hit, $name_sn, $name_pl) = @_;
-	my $name;
-
-	return "no data found" if (!defined($found) || $found == 0);
-	$name = ($found == 1) ? $name_sn : $name_pl;
-
-	return rate($hit, $found, "% ($hit of $found $name)");
-}
-
-
-#
-# print_overall_rate(ln_do, ln_found, ln_hit, fn_do, fn_found, fn_hit, br_do
-#                    br_found, br_hit)
-#
-# Print overall coverage rates for the specified coverage types.
-#
-
-sub print_overall_rate($$$$$$$$$)
-{
-	my ($ln_do, $ln_found, $ln_hit, $fn_do, $fn_found, $fn_hit,
-	    $br_do, $br_found, $br_hit) = @_;
-
-	info("Summary coverage rate:\n");
-	info("  lines......: %s\n",
-	     get_overall_line($ln_found, $ln_hit, "line", "lines"))
-		if ($ln_do);
-	info("  functions..: %s\n",
-	     get_overall_line($fn_found, $fn_hit, "function", "functions"))
-		if ($fn_do);
-	info("  branches...: %s\n",
-	     get_overall_line($br_found, $br_hit, "branch", "branches"))
-		if ($br_do);
-}
-
-
-#
-# rate(hit, found[, suffix, precision, width])
-#
-# Return the coverage rate [0..100] for HIT and FOUND values. 0 is only
-# returned when HIT is 0. 100 is only returned when HIT equals FOUND.
-# PRECISION specifies the precision of the result. SUFFIX defines a
-# string that is appended to the result if FOUND is non-zero. Spaces
-# are added to the start of the resulting string until it is at least WIDTH
-# characters wide.
-#
-
-sub rate($$;$$$)
-{
-        my ($hit, $found, $suffix, $precision, $width) = @_;
-        my $rate; 
-
-	# Assign defaults if necessary
-        $precision	= 1	if (!defined($precision));
-	$suffix		= ""	if (!defined($suffix));
-	$width		= 0	if (!defined($width));
-        
-        return sprintf("%*s", $width, "-") if (!defined($found) || $found == 0);
-        $rate = sprintf("%.*f", $precision, $hit * 100 / $found);
-
-	# Adjust rates if necessary
-        if ($rate == 0 && $hit > 0) {
-		$rate = sprintf("%.*f", $precision, 1 / 10 ** $precision);
-        } elsif ($rate == 100 && $hit != $found) {
-		$rate = sprintf("%.*f", $precision, 100 - 1 / 10 ** $precision);
-	}
-
-	return sprintf("%*s", $width, $rate.$suffix);
-}
diff --git a/ThirdParty/lcov/bin/updateversion.pl b/ThirdParty/lcov/bin/updateversion.pl
deleted file mode 100755
index 19db81ecd3e3228e0f5115dada99755eae2f611d..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/bin/updateversion.pl
+++ /dev/null
@@ -1,194 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-use File::Basename;
-
-sub update_man_page($);
-sub update_bin_tool($);
-sub update_txt_file($);
-sub update_spec_file($);
-sub write_version_file($);
-sub get_file_info($);
-
-our $directory = $ARGV[0];
-our $version = $ARGV[1];
-our $release = $ARGV[2];
-our $full = $ARGV[3];
-
-our @man_pages = ("man/gendesc.1",  "man/genhtml.1",  "man/geninfo.1",
-		  "man/genpng.1", "man/lcov.1", "man/lcovrc.5");
-our @bin_tools = ("bin/gendesc", "bin/genhtml", "bin/geninfo",
-		  "bin/genpng", "bin/lcov");
-our @txt_files = ("README");
-our @spec_files = ("rpm/lcov.spec");
-
-if (!defined($directory) || !defined($version) || !defined($release)) {
-	die("Usage: $0 DIRECTORY|FILE VERSION RELEASE FULL_VERSION\n");
-}
-
-# Determine mode of operation
-if (-f $directory) {
-	my $file = $directory;
-	my $base = basename($file);
-
-	if (grep(/^$base$/, map({ basename($_) } @man_pages))) {
-		print("Updating man page $file\n");
-		update_man_page($file);
-	} elsif (grep(/^$base$/, map({ basename($_) } @bin_tools))) {
-		print("Updating bin tool $file\n");
-		update_bin_tool($file);
-	} elsif (grep(/^$base$/, map({ basename($_) } @txt_files))) {
-		print("Updating text file $file\n");
-		update_txt_file($file);
-	} elsif (grep(/^$base$/, map({ basename($_) } @spec_files))) {
-		print("Updating spec file $file\n");
-		update_spec_file($file);
-	} elsif ($base eq ".version") {
-		print("Updating version file $file\n");
-		write_version_file($file);
-	} else {
-		print("WARNING: Skipping unknown file $file\n");
-	}
-	print("Done.\n");
-	exit(0);
-}
-
-foreach (@man_pages) {
-	print("Updating man page $_\n");
-	update_man_page($directory."/".$_);
-}
-foreach (@bin_tools) {
-	print("Updating bin tool $_\n");
-	update_bin_tool($directory."/".$_);
-}
-foreach (@txt_files) {
-	print("Updating text file $_\n");
-	update_txt_file($directory."/".$_);
-}
-foreach (@spec_files) {
-	print("Updating spec file $_\n");
-	update_spec_file($directory."/".$_);
-}
-print("Updating version file $directory/.version\n");
-write_version_file("$directory/.version");
-print("Done.\n");
-
-sub get_file_info($)
-{
-	my ($filename) = @_;
-	my ($sec, $min, $hour, $year, $month, $day);
-	my @stat;
-	my $gittime;
-
-	return (0, 0, 0) if (!-e $filename);
-	@stat = stat($filename);
-	($sec, $min, $hour, $day, $month, $year) = gmtime($stat[9]);
-	$year += 1900;
-	$month += 1;
-
-	return (sprintf("%04d-%02d-%02d", $year, $month, $day),
-		sprintf("%04d%02d%02d%02d%02d.%02d", $year, $month, $day,
-			$hour, $min, $sec),
-		sprintf("%o", $stat[2] & 07777));
-}
-
-sub update_man_page($)
-{
-	my ($filename) = @_;
-	my @date = get_file_info($filename);
-	my $date_string = $date[0];
-	local *IN;
-	local *OUT;
-
-	$date_string =~ s/-/\\-/g;
-	open(IN, "<$filename") || die ("Error: cannot open $filename\n");
-	open(OUT, ">$filename.new") ||
-		die("Error: cannot create $filename.new\n");
-	while (<IN>) {
-		s/\"LCOV\s+\d+\.\d+\"/\"LCOV $version\"/g;
-		s/\d\d\d\d\\\-\d\d\\\-\d\d/$date_string/g;
-		print(OUT $_);
-	}
-	close(OUT);
-	close(IN);
-	chmod(oct($date[2]), "$filename.new");
-	system("mv", "-f", "$filename.new", "$filename");
-	system("touch", "$filename", "-t", $date[1]);
-}
-
-sub update_bin_tool($)
-{
-	my ($filename) = @_;
-	my @date = get_file_info($filename);
-	local *IN;
-	local *OUT;
-
-	open(IN, "<$filename") || die ("Error: cannot open $filename\n");
-	open(OUT, ">$filename.new") ||
-		die("Error: cannot create $filename.new\n");
-	while (<IN>) {
-		s/^(our\s+\$lcov_version\s*=).*$/$1 "LCOV version $full";/g;
-		print(OUT $_);
-	}
-	close(OUT);
-	close(IN);
-	chmod(oct($date[2]), "$filename.new");
-	system("mv", "-f", "$filename.new", "$filename");
-	system("touch", "$filename", "-t", $date[1]);
-}
-
-sub update_txt_file($)
-{
-	my ($filename) = @_;
-	my @date = get_file_info($filename);
-	local *IN;
-	local *OUT;
-
-	open(IN, "<$filename") || die ("Error: cannot open $filename\n");
-	open(OUT, ">$filename.new") ||
-		die("Error: cannot create $filename.new\n");
-	while (<IN>) {
-		s/(Last\s+changes:\s+)\d\d\d\d-\d\d-\d\d/$1$date[0]/g;
-		print(OUT $_);
-	}
-	close(OUT);
-	close(IN);
-	chmod(oct($date[2]), "$filename.new");
-	system("mv", "-f", "$filename.new", "$filename");
-	system("touch", "$filename", "-t", $date[1]);
-}
-
-sub update_spec_file($)
-{
-	my ($filename) = @_;
-	my @date = get_file_info($filename);
-	local *IN;
-	local *OUT;
-
-	open(IN, "<$filename") || die ("Error: cannot open $filename\n");
-	open(OUT, ">$filename.new") ||
-		die("Error: cannot create $filename.new\n");
-	while (<IN>) {
-		s/^(Version:\s*)\d+\.\d+.*$/$1$version/;
-		s/^(Release:\s*).*$/$1$release/;
-		print(OUT $_);
-	}
-	close(OUT);
-	close(IN);
-	system("mv", "-f", "$filename.new", "$filename");
-	system("touch", "$filename", "-t", $date[1]);
-}
-
-sub write_version_file($)
-{
-	my ($filename) = @_;
-	my $fd;
-
-	open($fd, ">", $filename) or die("Error: cannot write $filename: $!\n");
-	print($fd "VERSION=$version\n");
-	print($fd "RELEASE=$release\n");
-	print($fd "FULL=$full\n");
-	close($fd);
-}
diff --git a/ThirdParty/lcov/example/Makefile b/ThirdParty/lcov/example/Makefile
deleted file mode 100644
index 2f698a1b32f3186a9e7d093742141b9a478f39f9..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/example/Makefile
+++ /dev/null
@@ -1,98 +0,0 @@
-#
-# Makefile for the LCOV example program.
-#
-# Make targets:
-#   - example: compile the example program
-#   - output:  run test cases on example program and create HTML output
-#   - clean:   clean up directory
-#
-
-CC      := gcc
-CFLAGS  := -Wall -I. -fprofile-arcs -ftest-coverage
-
-LCOV    := ../bin/lcov
-GENHTML := ../bin/genhtml
-GENDESC := ../bin/gendesc
-GENPNG  := ../bin/genpng
-
-# Depending on the presence of the GD.pm perl module, we can use the
-# special option '--frames' for genhtml
-USE_GENPNG := $(shell $(GENPNG) --help >/dev/null 2>/dev/null; echo $$?)
-
-ifeq ($(USE_GENPNG),0)
-  FRAMES := --frames
-else
-  FRAMES :=
-endif
-
-.PHONY: clean output test_noargs test_2_to_2000 test_overflow
-
-all: output
-
-example: example.o iterate.o gauss.o
-	$(CC) example.o iterate.o gauss.o -o example -lgcov
-
-example.o: example.c iterate.h gauss.h
-	$(CC) $(CFLAGS) -c example.c -o example.o
-
-iterate.o: methods/iterate.c iterate.h
-	$(CC) $(CFLAGS) -c methods/iterate.c -o iterate.o
-
-gauss.o: methods/gauss.c gauss.h
-	$(CC) $(CFLAGS) -c methods/gauss.c -o gauss.o
-
-output: example descriptions test_noargs test_2_to_2000 test_overflow
-	@echo
-	@echo '*'
-	@echo '* Generating HTML output'
-	@echo '*'
-	@echo
-	$(GENHTML) trace_noargs.info trace_args.info trace_overflow.info \
-		   --output-directory output --title "Basic example" \
-		   --show-details --description-file descriptions $(FRAMES) \
-		   --legend
-	@echo
-	@echo '*'
-	@echo '* See '`pwd`/output/index.html
-	@echo '*'
-	@echo
-
-descriptions: descriptions.txt
-	$(GENDESC) descriptions.txt -o descriptions
-
-all_tests: example test_noargs test_2_to_2000 test_overflow
-
-test_noargs:
-	@echo
-	@echo '*'
-	@echo '* Test case 1: running ./example without parameters'
-	@echo '*'
-	@echo
-	$(LCOV) --zerocounters --directory .
-	./example
-	$(LCOV) --capture --directory . --output-file trace_noargs.info --test-name test_noargs --no-external
-
-test_2_to_2000:
-	@echo
-	@echo '*'
-	@echo '* Test case 2: running ./example 2 2000'
-	@echo '*'
-	@echo
-	$(LCOV) --zerocounters --directory .
-	./example 2 2000
-	$(LCOV) --capture --directory . --output-file trace_args.info --test-name test_2_to_2000 --no-external
-
-test_overflow:
-	@echo
-	@echo '*'
-	@echo '* Test case 3: running ./example 0 100000 (causes an overflow)'
-	@echo '*'
-	@echo
-	$(LCOV) --zerocounters --directory .
-	./example 0 100000 || true
-	$(LCOV) --capture --directory . --output-file trace_overflow.info --test-name "test_overflow" --no-external
-
-clean:
-	rm -rf *.o *.bb *.bbg *.da *.gcno *.gcda *.info output example \
-	descriptions
-
diff --git a/ThirdParty/lcov/example/README b/ThirdParty/lcov/example/README
deleted file mode 100644
index cf6cf2e4c688d32220293484bcfaf9794f16abf8..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/example/README
+++ /dev/null
@@ -1,6 +0,0 @@
-
-To get an example of how the LCOV generated HTML output looks like,
-type 'make output' and point a web browser to the resulting file
-
-  output/index.html
-
diff --git a/ThirdParty/lcov/example/descriptions.txt b/ThirdParty/lcov/example/descriptions.txt
deleted file mode 100644
index 47e6021310d3ed1bb55d2a1bf239ff9dab1d2b82..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/example/descriptions.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-test_noargs
-	Example program is called without arguments so that default range
-	[0..9] is used.
-
-test_2_to_2000
-	Example program is called with "2" and "2000" as arguments.
-
-test_overflow
-	Example program is called with "0" and "100000" as arguments. The
-	resulting sum is too large to be stored as an int variable.
diff --git a/ThirdParty/lcov/example/example.c b/ThirdParty/lcov/example/example.c
deleted file mode 100644
index f9049aa64bafad3aad81910c355c625742290008..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/example/example.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  example.c
- * 
- *  Calculate the sum of a given range of integer numbers. The range is
- *  specified by providing two integer numbers as command line argument.
- *  If no arguments are specified, assume the predefined range [0..9].
- *  Abort with an error message if the resulting number is too big to be
- *  stored as int variable.
- *
- *  This program example is similar to the one found in the GCOV documentation.
- *  It is used to demonstrate the HTML output generated by LCOV.
- *
- *  The program is split into 3 modules to better demonstrate the 'directory
- *  overview' function. There are also a lot of bloated comments inserted to
- *  artificially increase the source code size so that the 'source code
- *  overview' function makes at least a minimum of sense.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "iterate.h"
-#include "gauss.h"
-
-static int start = 0;
-static int end = 9;
-
-
-int main (int argc, char* argv[])
-{
-	int total1, total2;
-
-	/* Accept a pair of numbers as command line arguments. */
-
-	if (argc == 3)
-	{
-		start	= atoi(argv[1]);
-		end	= atoi(argv[2]);
-	}
-
-
-	/* Use both methods to calculate the result. */
-
-	total1 = iterate_get_sum (start, end);
-	total2 = gauss_get_sum (start, end);
-
-
-	/* Make sure both results are the same. */
-
-	if (total1 != total2)
-	{
-		printf ("Failure (%d != %d)!\n", total1, total2);
-	}
-	else
-	{
-		printf ("Success, sum[%d..%d] = %d\n", start, end, total1);
-	}
-
-	return 0;
-}
diff --git a/ThirdParty/lcov/example/gauss.h b/ThirdParty/lcov/example/gauss.h
deleted file mode 100644
index 302a4a980382ed38909900cc941e91069a30b96e..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/example/gauss.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef GAUSS_H
-#define GAUSS_H GAUSS_h
-
-extern int gauss_get_sum (int min, int max);
-
-#endif /* GAUSS_H */
diff --git a/ThirdParty/lcov/example/iterate.h b/ThirdParty/lcov/example/iterate.h
deleted file mode 100644
index 471327951cf470e9e5b1e7286583c15124b28c3e..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/example/iterate.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef ITERATE_H
-#define ITERATE_H ITERATE_H
-
-extern int iterate_get_sum (int min, int max);
-
-#endif /* ITERATE_H */
diff --git a/ThirdParty/lcov/example/methods/gauss.c b/ThirdParty/lcov/example/methods/gauss.c
deleted file mode 100644
index 9da3ce50835b1f32141b1d4ba321abd053ac0aac..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/example/methods/gauss.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  methods/gauss.c
- *
- *  Calculate the sum of a given range of integer numbers.
- *
- *  Somewhat of a more subtle way of calculation - and it even has a story
- *  behind it:
- *
- *  Supposedly during math classes in elementary school, the teacher of
- *  young mathematician Gauss gave the class an assignment to calculate the
- *  sum of all natural numbers between 1 and 100, hoping that this task would
- *  keep the kids occupied for some time. The story goes that Gauss had the
- *  result ready after only a few minutes. What he had written on his black
- *  board was something like this:
- *
- *    1 + 100 = 101
- *    2 + 99  = 101
- *    3 + 98  = 101
- *    .
- *    .
- *    100 + 1 = 101
- *
- *    s = (1/2) * 100 * 101 = 5050
- *
- *  A more general form of this formula would be
- *  
- *    s = (1/2) * (max + min) * (max - min + 1)
- *
- *  which is used in the piece of code below to implement the requested
- *  function in constant time, i.e. without dependencies on the size of the
- *  input parameters.
- *
- */
-
-#include "gauss.h"
-
-
-int gauss_get_sum (int min, int max)
-{
-	/* This algorithm doesn't work well with invalid range specifications
-	   so we're intercepting them here. */
-	if (max < min)
-	{
-		return 0;
-	}
-
-	return (int) ((max + min) * (double) (max - min + 1) / 2);
-}
diff --git a/ThirdParty/lcov/example/methods/iterate.c b/ThirdParty/lcov/example/methods/iterate.c
deleted file mode 100644
index 023d1801c9364f71c994e8c0dbe04b93f3992f34..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/example/methods/iterate.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  methods/iterate.c
- *  
- *  Calculate the sum of a given range of integer numbers.
- *
- *  This particular method of implementation works by way of brute force,
- *  i.e. it iterates over the entire range while adding the numbers to finally
- *  get the total sum. As a positive side effect, we're able to easily detect
- *  overflows, i.e. situations in which the sum would exceed the capacity
- *  of an integer variable.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "iterate.h"
-
-
-int iterate_get_sum (int min, int max)
-{
-	int i, total;
-
-	total = 0;
-
-	/* This is where we loop over each number in the range, including
-	   both the minimum and the maximum number. */
-
-	for (i = min; i <= max; i++)
-	{
-		/* We can detect an overflow by checking whether the new
-		   sum would become negative. */
-
-		if (total + i < total)
-		{
-			printf ("Error: sum too large!\n");
-			exit (1);
-		}
-
-		/* Everything seems to fit into an int, so continue adding. */
-
-		total += i;
-	}
-
-	return total;
-}
diff --git a/ThirdParty/lcov/lcovrc b/ThirdParty/lcov/lcovrc
deleted file mode 100644
index 40f364f17aa6497f4ccd8af98145367f4b8341ae..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/lcovrc
+++ /dev/null
@@ -1,169 +0,0 @@
-#
-# /etc/lcovrc - system-wide defaults for LCOV
-#
-# To change settings for a single user, place a customized copy of this file
-# at location ~/.lcovrc
-#
-
-# Specify an external style sheet file (same as --css-file option of genhtml)
-#genhtml_css_file = gcov.css
-
-# Specify coverage rate limits (in %) for classifying file entries
-# HI:   hi_limit <= rate <= 100         graph color: green
-# MED: med_limit <= rate <  hi_limit    graph color: orange
-# LO:         0  <= rate <  med_limit   graph color: red
-genhtml_hi_limit = 90
-genhtml_med_limit = 75
-
-# Width of line coverage field in source code view
-genhtml_line_field_width = 12
-
-# Width of branch coverage field in source code view
-genhtml_branch_field_width = 16
-
-# Width of overview image (used by --frames option of genhtml)
-genhtml_overview_width = 80
-
-# Resolution of overview navigation: this number specifies the maximum
-# difference in lines between the position a user selected from the overview
-# and the position the source code window is scrolled to (used by --frames
-# option of genhtml)
-genhtml_nav_resolution = 4
-
-# Clicking a line in the overview image should show the source code view at
-# a position a bit further up so that the requested line is not the first
-# line in the window. This number specifies that offset in lines (used by
-# --frames option of genhtml)
-genhtml_nav_offset = 10
-
-# Do not remove unused test descriptions if non-zero (same as
-# --keep-descriptions option of genhtml)
-genhtml_keep_descriptions = 0
-
-# Do not remove prefix from directory names if non-zero (same as --no-prefix
-# option of genhtml)
-genhtml_no_prefix = 0
-
-# Do not create source code view if non-zero (same as --no-source option of
-# genhtml)
-genhtml_no_source = 0
-
-# Replace tabs with number of spaces in source view (same as --num-spaces
-# option of genhtml)
-genhtml_num_spaces = 8
-
-# Highlight lines with converted-only data if non-zero (same as --highlight
-# option of genhtml)
-genhtml_highlight = 0
-
-# Include color legend in HTML output if non-zero (same as --legend option of
-# genhtml)
-genhtml_legend = 0
-
-# Use FILE as HTML prolog for generated pages (same as --html-prolog option of
-# genhtml)
-#genhtml_html_prolog = FILE
-
-# Use FILE as HTML epilog for generated pages (same as --html-epilog option of
-# genhtml)
-#genhtml_html_epilog = FILE
-
-# Use custom filename extension for pages (same as --html-extension option of
-# genhtml)
-#genhtml_html_extension = html
-
-# Compress all generated html files with gzip.
-#genhtml_html_gzip = 1
-
-# Include sorted overview pages (can be disabled by the --no-sort option of
-# genhtml)
-genhtml_sort = 1
-
-# Include function coverage data display (can be disabled by the
-# --no-func-coverage option of genhtml)
-#genhtml_function_coverage = 1
-
-# Include branch coverage data display (can be disabled by the
-# --no-branch-coverage option of genhtml)
-#genhtml_branch_coverage = 1
-
-# Specify the character set of all generated HTML pages
-genhtml_charset=UTF-8
-
-# Allow HTML markup in test case description text if non-zero
-genhtml_desc_html=0
-
-# Specify the precision for coverage rates
-#genhtml_precision=1
-
-# Show missed counts instead of hit counts
-#genhtml_missed=1
-
-# Demangle C++ symbols
-#genhtml_demangle_cpp=1
-
-# Location of the gcov tool (same as --gcov-info option of geninfo)
-#geninfo_gcov_tool = gcov
-
-# Adjust test names to include operating system information if non-zero
-#geninfo_adjust_testname = 0
-
-# Calculate checksum for each source code line if non-zero (same as --checksum
-# option of geninfo if non-zero, same as --no-checksum if zero)
-#geninfo_checksum = 1
-
-# Specify whether to capture coverage data for external source files (can
-# be overridden by the --external and --no-external options of geninfo/lcov)
-#geninfo_external = 1
-
-# Enable libtool compatibility mode if non-zero (same as --compat-libtool option
-# of geninfo if non-zero, same as --no-compat-libtool if zero)
-#geninfo_compat_libtool = 0
-
-# Use gcov's --all-blocks option if non-zero
-#geninfo_gcov_all_blocks = 1
-
-# Specify compatiblity modes (same as --compat option of geninfo).
-#geninfo_compat = libtool=on, hammer=auto, split_crc=auto
-
-# Adjust path to source files by removing or changing path components that
-# match the specified pattern (Perl regular expression format)
-#geninfo_adjust_src_path = /tmp/build => /usr/src
-
-# Specify if geninfo should try to automatically determine the base-directory
-# when collecting coverage data.
-geninfo_auto_base = 1
-
-# Directory containing gcov kernel files
-# lcov_gcov_dir = /proc/gcov
-
-# Location of the insmod tool
-lcov_insmod_tool = /sbin/insmod
-
-# Location of the modprobe tool
-lcov_modprobe_tool = /sbin/modprobe
-
-# Location of the rmmod tool
-lcov_rmmod_tool = /sbin/rmmod
-
-# Location for temporary directories
-lcov_tmp_dir = /tmp
-
-# Show full paths during list operation if non-zero (same as --list-full-path
-# option of lcov)
-lcov_list_full_path = 0
-
-# Specify the maximum width for list output. This value is ignored when
-# lcov_list_full_path is non-zero.
-lcov_list_width = 80
-
-# Specify the maximum percentage of file names which may be truncated when
-# choosing a directory prefix in list output. This value is ignored when
-# lcov_list_full_path is non-zero.
-lcov_list_truncate_max = 20
-
-# Specify if function coverage data should be collected and processed.
-lcov_function_coverage = 1
-
-# Specify if branch coverage data should be collected and processed.
-lcov_branch_coverage = 0
diff --git a/ThirdParty/lcov/man/gendesc.1 b/ThirdParty/lcov/man/gendesc.1
deleted file mode 100644
index 9c9a7084db2f39c8245a19c2a08db3e610acf5b8..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/man/gendesc.1
+++ /dev/null
@@ -1,78 +0,0 @@
-.TH gendesc 1 "LCOV 1.14" 2019\-02\-28 "User Manuals"
-.SH NAME
-gendesc \- Generate a test case description file
-.SH SYNOPSIS
-.B gendesc
-.RB [ \-h | \-\-help ]
-.RB [ \-v | \-\-version ]
-.RS 8
-.br
-.RB [ \-o | \-\-output\-filename
-.IR filename ]
-.br
-.I inputfile
-.SH DESCRIPTION
-Convert plain text test case descriptions into a format as understood by
-.BR genhtml .
-.I inputfile
-needs to observe the following format:
-
-For each test case:
-.IP "     \-"
-one line containing the test case name beginning at the start of the line
-.RE
-.IP "     \-"
-one or more lines containing the test case description indented with at
-least one whitespace character (tab or space)
-.RE
-
-.B Example input file:
-
-test01
-.RS
-An example test case description.
-.br
-Description continued
-.RE
-
-test42
-.RS
-Supposedly the answer to most of your questions
-.RE
-
-Note: valid test names can consist of letters, decimal digits and the
-underscore character ('_').
-.SH OPTIONS
-.B \-h
-.br
-.B \-\-help
-.RS
-Print a short help text, then exit.
-.RE
-
-.B \-v
-.br
-.B \-\-version
-.RS
-Print version number, then exit.
-.RE
-
-
-.BI "\-o " filename
-.br
-.BI "\-\-output\-filename " filename
-.RS
-Write description data to
-.IR filename .
-
-By default, output is written to STDOUT.
-.RE
-.SH AUTHOR
-Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-
-.SH SEE ALSO
-.BR lcov (1),
-.BR genhtml (1),
-.BR geninfo (1),
-.BR genpng (1),
-.BR gcov (1)
diff --git a/ThirdParty/lcov/man/genhtml.1 b/ThirdParty/lcov/man/genhtml.1
deleted file mode 100644
index 949bd4c574b977f1824150751763e2c81a45bb95..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/man/genhtml.1
+++ /dev/null
@@ -1,600 +0,0 @@
-.TH genhtml 1 "LCOV 1.14" 2019\-02\-28 "User Manuals"
-.SH NAME
-genhtml \- Generate HTML view from LCOV coverage data files
-.SH SYNOPSIS
-.B genhtml
-.RB [ \-h | \-\-help ]
-.RB [ \-v | \-\-version ]
-.RS 8
-.br
-.RB [ \-q | \-\-quiet ]
-.RB [ \-s | \-\-show\-details ]
-.RB [ \-f | \-\-frames ]
-.br
-.RB [ \-b | \-\-baseline\-file  ]
-.IR baseline\-file
-.br
-.RB [ \-o | \-\-output\-directory
-.IR output\-directory ]
-.br
-.RB [ \-t | \-\-title
-.IR title ]
-.br
-.RB [ \-d | \-\-description\-file
-.IR description\-file ]
-.br
-.RB [ \-k | \-\-keep\-descriptions ]
-.RB [ \-c | \-\-css\-file
-.IR css\-file ]
-.br
-.RB [ \-p | \-\-prefix
-.IR prefix ]
-.RB [ \-\-no\-prefix ]
-.br
-.RB [ \-\-no\-source ]
-.RB [ \-\-num\-spaces
-.IR num ]
-.RB [ \-\-highlight ]
-.br
-.RB [ \-\-legend ]
-.RB [ \-\-html\-prolog
-.IR prolog\-file ]
-.br
-.RB [ \-\-html\-epilog
-.IR epilog\-file ]
-.RB [ \-\-html\-extension
-.IR extension ]
-.br
-.RB [ \-\-html\-gzip ]
-.RB [ \-\-sort ]
-.RB [ \-\-no\-sort ]
-.br
-.RB [ \-\-function\-coverage ]
-.RB [ \-\-no\-function\-coverage ]
-.br
-.RB [ \-\-branch\-coverage ]
-.RB [ \-\-no\-branch\-coverage ]
-.br
-.RB [ \-\-demangle\-cpp ]
-.RB [ \-\-ignore\-errors
-.IR errors  ]
-.br
-.RB [ \-\-config\-file
-.IR config\-file ]
-.RB [ \-\-rc
-.IR keyword = value ]
-.br
-.RB [ \-\-precision
-.RB [ \-\-missed ]
-.br
-.IR tracefile(s)
-.RE
-.SH DESCRIPTION
-Create an HTML view of coverage data found in
-.IR tracefile .
-Note that
-.I tracefile
-may also be a list of filenames.
-
-HTML output files are created in the current working directory unless the
-\-\-output\-directory option is used. If 
-.I tracefile
-ends with ".gz", it is assumed to be GZIP\-compressed and the gunzip tool
-will be used to decompress it transparently.
-
-Note that all source code files have to be present and readable at the
-exact file system location they were compiled.
-
-Use option
-.I \--css\-file
-to modify layout and colors of the generated HTML output. Files are
-marked in different colors depending on the associated coverage rate. By
-default, the coverage limits for low, medium and high coverage are set to
-0\-75%, 75\-90% and 90\-100% percent respectively. To change these
-values, use configuration file options
-.IR genhtml_hi_limit " and " genhtml_med_limit .
-
-Also note that when displaying percentages, 0% and 100% are only printed when
-the values are exactly 0% and 100% respectively. Other values which would
-conventionally be rounded to 0% or 100% are instead printed as nearest
-non-boundary value. This behavior is in accordance with that of the
-.BR gcov (1)
-tool.
-
-.SH OPTIONS
-.B \-h
-.br
-.B \-\-help
-.RS
-Print a short help text, then exit.
-
-.RE
-.B \-v
-.br
-.B \-\-version
-.RS
-Print version number, then exit.
-
-.RE
-.B \-q
-.br
-.B \-\-quiet
-.RS
-Do not print progress messages.
-
-Suppresses all informational progress output. When this switch is enabled,
-only error or warning messages are printed.
-
-.RE
-.B \-f
-.br
-.B \-\-frames
-.RS
-Use HTML frames for source code view.
-
-If enabled, a frameset is created for each source code file, providing
-an overview of the source code as a "clickable" image. Note that this
-option will slow down output creation noticeably because each source
-code character has to be inspected once. Note also that the GD.pm Perl
-module has to be installed for this option to work (it may be obtained
-from http://www.cpan.org).
-
-.RE
-.B \-s
-.br
-.B \-\-show\-details
-.RS
-Generate detailed directory view.
-
-When this option is enabled,
-.B genhtml
-generates two versions of each
-file view. One containing the standard information plus a link to a
-"detailed" version. The latter additionally contains information about
-which test case covered how many lines of each source file.
-
-.RE
-.BI "\-b " baseline\-file
-.br
-.BI "\-\-baseline\-file " baseline\-file
-.RS
-Use data in
-.I baseline\-file
-as coverage baseline.
-
-The tracefile specified by
-.I baseline\-file
-is read and all counts found in the original
-.I tracefile
-are decremented by the corresponding counts in 
-.I baseline\-file
-before creating any output.
-
-Note that when a count for a particular line in
-.I baseline\-file
-is greater than the count in the
-.IR tracefile ,
-the result is zero.
-
-.RE
-.BI "\-o " output\-directory
-.br
-.BI "\-\-output\-directory " output\-directory
-.RS
-Create files in 
-.I output\-directory.
-
-Use this option to tell 
-.B genhtml
-to write the resulting files to a directory other than
-the current one. If 
-.I output\-directory
-does not exist, it will be created.
-
-It is advisable to use this option since depending on the
-project size, a lot of files and subdirectories may be created.
-
-.RE
-.BI "\-t " title
-.br
-.BI "\-\-title " title
-.RS
-Display 
-.I title
-in header of all pages.
-
-.I title
-is written to the header portion of each generated HTML page to
-identify the context in which a particular output
-was created. By default this is the name of the tracefile.
-
-.RE
-.BI "\-d " description\-file
-.br
-.BI "\-\-description\-file " description\-file
-.RS
-Read test case descriptions from 
-.IR description\-file .
-
-All test case descriptions found in
-.I description\-file
-and referenced in the input data file are read and written to an extra page
-which is then incorporated into the HTML output.
-
-The file format of
-.IR "description\-file " is:
-
-for each test case:
-.RS
-TN:<testname>
-.br
-TD:<test description>
-
-.RE
-
-Valid test case names can consist of letters, numbers and the underscore
-character ('_').
-.RE
-.B \-k
-.br
-.B \-\-keep\-descriptions
-.RS
-Do not remove unused test descriptions.
-
-Keep descriptions found in the description file even if the coverage data
-indicates that the associated test case did not cover any lines of code.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_keep_descriptions .
-
-.RE
-.BI "\-c " css\-file
-.br
-.BI "\-\-css\-file " css\-file
-.RS
-Use external style sheet file
-.IR css\-file .
-
-Using this option, an extra .css file may be specified which will replace
-the default one. This may be helpful if the default colors make your eyes want
-to jump out of their sockets :)
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_css_file .
-
-.RE
-.BI "\-p " prefix
-.br
-.BI "\-\-prefix " prefix
-.RS
-Remove 
-.I prefix
-from all directory names.
-
-Because lists containing long filenames are difficult to read, there is a
-mechanism implemented that will automatically try to shorten all directory
-names on the overview page beginning with a common prefix. By default,
-this is done using an algorithm that tries to find the prefix which, when
-applied, will minimize the resulting sum of characters of all directory
-names.
-
-Use this option to specify the prefix to be removed by yourself.
-
-.RE
-.B \-\-no\-prefix
-.RS
-Do not remove prefix from directory names.
-
-This switch will completely disable the prefix mechanism described in the
-previous section.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_no_prefix .
-
-.RE
-.B \-\-no\-source
-.RS
-Do not create source code view.
-
-Use this switch if you don't want to get a source code view for each file.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_no_source .
-
-.RE
-.BI "\-\-num\-spaces " spaces
-.RS
-Replace tabs in source view with
-.I num
-spaces.
-
-Default value is 8.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_num_spaces .
-
-.RE
-.B \-\-highlight
-.RS
-Highlight lines with converted\-only coverage data.
-
-Use this option in conjunction with the \-\-diff option of
-.B lcov
-to highlight those lines which were only covered in data sets which were
-converted from previous source code versions.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_highlight .
-
-.RE
-.B \-\-legend
-.RS
-Include color legend in HTML output.
-
-Use this option to include a legend explaining the meaning of color coding
-in the resulting HTML output.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_legend .
-
-.RE
-.BI "\-\-html\-prolog " prolog\-file
-.RS
-Read customized HTML prolog from 
-.IR prolog\-file .
-
-Use this option to replace the default HTML prolog (the initial part of the
-HTML source code leading up to and including the <body> tag) with the contents
-of
-.IR prolog\-file .
-Within the prolog text, the following words will be replaced when a page is generated:
-
-.B "@pagetitle@"
-.br
-The title of the page.
-
-.B "@basedir@"
-.br
-A relative path leading to the base directory (e.g. for locating css\-files).
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_html_prolog .
-
-.RE
-.BI "\-\-html\-epilog " epilog\-file
-.RS
-Read customized HTML epilog from 
-.IR epilog\-file .
-
-Use this option to replace the default HTML epilog (the final part of the HTML
-source including </body>) with the contents of
-.IR epilog\-file .
-
-Within the epilog text, the following words will be replaced when a page is generated:
-
-.B "@basedir@"
-.br
-A relative path leading to the base directory (e.g. for locating css\-files).
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_html_epilog .
-
-.RE
-.BI "\-\-html\-extension " extension
-.RS
-Use customized filename extension for generated HTML pages.
-
-This option is useful in situations where different filename extensions
-are required to render the resulting pages correctly (e.g. php). Note that
-a '.' will be inserted between the filename and the extension specified by
-this option.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_html_extension .
-.RE
-
-.B \-\-html\-gzip
-.RS
-Compress all generated html files with gzip and add a .htaccess file specifying
-gzip\-encoding in the root output directory.
-
-Use this option if you want to save space on your webserver. Requires a
-webserver with .htaccess support and a browser with support for gzip
-compressed html.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_html_gzip .
-
-.RE
-.B \-\-sort
-.br
-.B \-\-no\-sort
-.RS
-Specify whether to include sorted views of file and directory overviews.
-
-Use \-\-sort to include sorted views or \-\-no\-sort to not include them.
-Sorted views are
-.B enabled
-by default.
-
-When sorted views are enabled, each overview page will contain links to
-views of that page sorted by coverage rate.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_sort .
-
-.RE
-.B \-\-function\-coverage
-.br
-.B \-\-no\-function\-coverage
-.RS
-Specify whether to display function coverage summaries in HTML output.
-
-Use \-\-function\-coverage to enable function coverage summaries or
-\-\-no\-function\-coverage to disable it. Function coverage summaries are
-.B enabled
-by default
-
-When function coverage summaries are enabled, each overview page will contain
-the number of functions found and hit per file or directory, together with
-the resulting coverage rate. In addition, each source code view will contain
-a link to a page which lists all functions found in that file plus the
-respective call count for those functions.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_function_coverage .
-
-.RE
-.B \-\-branch\-coverage
-.br
-.B \-\-no\-branch\-coverage
-.RS
-Specify whether to display branch coverage data in HTML output.
-
-Use \-\-branch\-coverage to enable branch coverage display or
-\-\-no\-branch\-coverage to disable it. Branch coverage data display is
-.B enabled
-by default
-
-When branch coverage display is enabled, each overview page will contain
-the number of branches found and hit per file or directory, together with
-the resulting coverage rate. In addition, each source code view will contain
-an extra column which lists all branches of a line with indications of
-whether the branch was taken or not. Branches are shown in the following format:
-
- ' + ': Branch was taken at least once
-.br
- ' - ': Branch was not taken
-.br
- ' # ': The basic block containing the branch was never executed
-.br
-
-Note that it might not always be possible to relate branches to the
-corresponding source code statements: during compilation, GCC might shuffle
-branches around or eliminate some of them to generate better code.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_branch_coverage .
-
-.RE
-.B \-\-demangle\-cpp
-.RS
-Specify whether to demangle C++ function names.
-
-Use this option if you want to convert C++ internal function names to
-human readable format for display on the HTML function overview page.
-This option requires that the c++filt tool is installed (see
-.BR c++filt (1)).
-
-.RE
-.B \-\-ignore\-errors
-.I errors
-.br
-.RS
-Specify a list of errors after which to continue processing.
-
-Use this option to specify a list of one or more classes of errors after which
-geninfo should continue processing instead of aborting.
-
-.I errors
-can be a comma\-separated list of the following keywords:
-
-.B source:
-the source code file for a data set could not be found.
-.RE
-
-.B \-\-config\-file
-.I config\-file
-.br
-.RS
-Specify a configuration file to use.
-
-When this option is specified, neither the system\-wide configuration file
-/etc/lcovrc, nor the per\-user configuration file ~/.lcovrc is read.
-
-This option may be useful when there is a need to run several
-instances of
-.B genhtml
-with different configuration file options in parallel.
-.RE
-
-.B \-\-rc
-.IR keyword = value
-.br
-.RS
-Override a configuration directive.
-
-Use this option to specify a
-.IR keyword = value
-statement which overrides the corresponding configuration statement in
-the lcovrc configuration file. You can specify this option more than once
-to override multiple configuration statements.
-See
-.BR lcovrc (5)
-for a list of available keywords and their meaning.
-.RE
-
-.BI "\-\-precision " num
-.RS
-Show coverage rates with
-.I num
-number of digits after the decimal-point.
-
-Default value is 1.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_precision .
-.RE
-
-.B \-\-missed
-.RS
-Show counts of missed lines, functions, or branches
-
-Use this option to change overview pages to show the count of lines, functions,
-or branches that were not hit. These counts are represented by negative numbers.
-
-When specified together with \-\-sort, file and directory views will be sorted
-by missed counts.
-
-This option can also be configured permanently using the configuration file
-option
-.IR genhtml_missed .
-.RE
-
-.SH FILES
-
-.I /etc/lcovrc
-.RS
-The system\-wide configuration file.
-.RE
-
-.I ~/.lcovrc
-.RS
-The per\-user configuration file.
-.RE
-
-.SH AUTHOR
-Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-
-.SH SEE ALSO
-.BR lcov (1),
-.BR lcovrc (5),
-.BR geninfo (1),
-.BR genpng (1),
-.BR gendesc (1),
-.BR gcov (1)
diff --git a/ThirdParty/lcov/man/geninfo.1 b/ThirdParty/lcov/man/geninfo.1
deleted file mode 100644
index 2ce917126c413c54919907147202b18141062b2f..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/man/geninfo.1
+++ /dev/null
@@ -1,578 +0,0 @@
-.TH geninfo 1 "LCOV 1.14" 2019\-02\-28 "User Manuals"
-.SH NAME
-geninfo \- Generate tracefiles from .da files
-.SH SYNOPSIS
-.B geninfo
-.RB [ \-h | \-\-help ]
-.RB [ \-v | \-\-version ]
-.RB [ \-q | \-\-quiet ]
-.br
-.RS 8
-.RB [ \-i | \-\-initial ]
-.RB [ \-t | \-\-test\-name
-.IR test\-name ]
-.br
-.RB [ \-o | \-\-output\-filename
-.IR filename ]
-.RB [ \-f | \-\-follow ]
-.br
-.RB [ \-b | \-\-base\-directory
-.IR directory ]
-.br
-.RB [ \-\-checksum ]
-.RB [ \-\-no\-checksum ]
-.br
-.RB [ \-\-compat\-libtool ]
-.RB [ \-\-no\-compat\-libtool ]
-.br
-.RB [ \-\-gcov\-tool
-.IR tool  ]
-.RB [ \-\-ignore\-errors
-.IR errors  ]
-.br
-.RB [ \-\-no\-recursion ]
-.I directory
-.RB [ \-\-external ]
-.RB [ \-\-no\-external ]
-.br
-.RB [ \-\-config\-file
-.IR config\-file ]
-.RB [ \-\-no\-markers ]
-.br
-.RB [ \-\-derive\-func\-data ]
-.RB [ \-\-compat
-.IR  mode =on|off|auto]
-.br
-.RB [ \-\-rc
-.IR keyword = value ]
-.br
-.RB [ \-\-include
-.IR pattern ]
-.RB [ \-\-exclude
-.IR pattern ]
-.RE
-.SH DESCRIPTION
-.B geninfo 
-converts all GCOV coverage data files found in 
-.I directory
-into tracefiles, which the
-.B genhtml
-tool can convert to HTML output.
-
-Unless the \-\-output\-filename option is specified,
-.B geninfo
-writes its
-output to one file per .da file, the name of which is generated by simply
-appending ".info" to the respective .da file name.
-
-Note that the current user needs write access to both
-.I directory
-as well as to the original source code location. This is necessary because
-some temporary files have to be created there during the conversion process.
-
-Note also that
-.B geninfo
-is called from within
-.BR lcov ,
-so that there is usually no need to call it directly.
-
-.B Exclusion markers
-
-To exclude specific lines of code from a tracefile, you can add exclusion
-markers to the source code. Additionally you can exclude specific branches from
-branch coverage without excluding the involved lines from line and function
-coverage. Exclusion markers are keywords which can for example be added in the
-form of a comment.
-See
-.BR lcovrc (5)
-how to override some of them.
-
-The following markers are recognized by geninfo:
-
-LCOV_EXCL_LINE
-.RS
-Lines containing this marker will be excluded.
-.br
-.RE
-LCOV_EXCL_START
-.RS
-Marks the beginning of an excluded section. The current line is part of this
-section.
-.br
-.RE
-LCOV_EXCL_STOP
-.RS
-Marks the end of an excluded section. The current line not part of this
-section.
-.RE
-.br
-LCOV_EXCL_BR_LINE
-.RS
-Lines containing this marker will be excluded from branch coverage.
-.br
-.RE
-LCOV_EXCL_BR_START
-.RS
-Marks the beginning of a section which is excluded from branch coverage. The
-current line is part of this section.
-.br
-.RE
-LCOV_EXCL_BR_STOP
-.RS
-Marks the end of a section which is excluded from branch coverage. The current
-line not part of this section.
-.RE
-.br
-
-.SH OPTIONS
-
-.B \-b
-.I directory
-.br
-.B \-\-base\-directory
-.I directory
-.br
-.RS
-.RI "Use " directory
-as base directory for relative paths.
-
-Use this option to specify the base directory of a build\-environment
-when geninfo produces error messages like:
-
-.RS
-ERROR: could not read source file /home/user/project/subdir1/subdir2/subdir1/subdir2/file.c
-.RE
-
-In this example, use /home/user/project as base directory.
-
-This option is required when using geninfo on projects built with libtool or
-similar build environments that work with a base directory, i.e. environments,
-where the current working directory when invoking the compiler is not the same
-directory in which the source code file is located.
-
-Note that this option will not work in environments where multiple base
-directories are used. In that case use configuration file setting
-.B geninfo_auto_base=1
-(see
-.BR lcovrc (5)).
-.RE
-
-.B \-\-checksum
-.br
-.B \-\-no\-checksum
-.br
-.RS
-Specify whether to generate checksum data when writing tracefiles.
-
-Use \-\-checksum to enable checksum generation or \-\-no\-checksum to
-disable it. Checksum generation is
-.B disabled
-by default.
-
-When checksum generation is enabled, a checksum will be generated for each
-source code line and stored along with the coverage data. This checksum will
-be used to prevent attempts to combine coverage data from different source
-code versions.
-
-If you don't work with different source code versions, disable this option
-to speed up coverage data processing and to reduce the size of tracefiles.
-.RE
-
-.B \-\-compat
-.IR mode = value [, mode = value ,...]
-.br
-.RS
-Set compatibility mode.
-
-Use \-\-compat to specify that geninfo should enable one or more compatibility
-modes when capturing coverage data. You can provide a comma-separated list
-of mode=value pairs to specify the values for multiple modes.
-
-Valid
-.I values
-are:
-
-.B on
-.RS
-Enable compatibility mode.
-.RE
-.B off
-.RS
-Disable compatibility mode.
-.RE
-.B auto
-.RS
-Apply auto-detection to determine if compatibility mode is required. Note that
-auto-detection is not available for all compatibility modes.
-.RE
-
-If no value is specified, 'on' is assumed as default value.
-
-Valid
-.I modes
-are:
-
-.B libtool
-.RS
-Enable this mode if you are capturing coverage data for a project that
-was built using the libtool mechanism. See also
-\-\-compat\-libtool.
-
-The default value for this setting is 'on'.
-
-.RE
-.B hammer
-.RS
-Enable this mode if you are capturing coverage data for a project that
-was built using a version of GCC 3.3 that contains a modification
-(hammer patch) of later GCC versions. You can identify a modified GCC 3.3
-by checking the build directory of your project for files ending in the
-extension '.bbg'. Unmodified versions of GCC 3.3 name these files '.bb'.
-
-The default value for this setting is 'auto'.
-
-.RE
-.B split_crc
-.RS
-Enable this mode if you are capturing coverage data for a project that
-was built using a version of GCC 4.6 that contains a modification
-(split function checksums) of later GCC versions. Typical error messages
-when running geninfo on coverage data produced by such GCC versions are
-\'out of memory' and 'reached unexpected end of file'.
-
-The default value for this setting is 'auto'
-.RE
-
-.RE
-
-.B \-\-compat\-libtool
-.br
-.B \-\-no\-compat\-libtool
-.br
-.RS
-Specify whether to enable libtool compatibility mode.
-
-Use \-\-compat\-libtool to enable libtool compatibility mode or \-\-no\-compat\-libtool
-to disable it. The libtool compatibility mode is
-.B enabled
-by default.
-
-When libtool compatibility mode is enabled, geninfo will assume that the source
-code relating to a .da file located in a directory named ".libs" can be
-found in its parent directory.
-
-If you have directories named ".libs" in your build environment but don't use
-libtool, disable this option to prevent problems when capturing coverage data.
-.RE
-
-.B \-\-config\-file
-.I config\-file
-.br
-.RS
-Specify a configuration file to use.
-
-When this option is specified, neither the system\-wide configuration file
-/etc/lcovrc, nor the per\-user configuration file ~/.lcovrc is read.
-
-This option may be useful when there is a need to run several
-instances of
-.B geninfo
-with different configuration file options in parallel.
-.RE
-
-.B \-\-derive\-func\-data
-.br
-.RS
-Calculate function coverage data from line coverage data.
-
-Use this option to collect function coverage data, even if the version of the
-gcov tool installed on the test system does not provide this data. lcov will
-instead derive function coverage data from line coverage data and
-information about which lines belong to a function.
-.RE
-
-.B \-\-exclude
-.I pattern
-.br
-.RS
-Exclude source files matching
-.IR pattern .
-
-Use this switch if you want to exclude coverage data for a particular set
-of source files matching any of the given patterns. Multiple patterns can be
-specified by using multiple
-.B --exclude
-command line switches. The
-.I patterns
-will be interpreted as shell wildcard patterns (note that they may need to be
-escaped accordingly to prevent the shell from expanding them first).
-
-Can be combined with the
-.B --include
-command line switch. If a given file matches both the include pattern and the
-exclude pattern, the exclude pattern will take precedence.
-.RE
-
-.B \-\-external
-.br
-.B \-\-no\-external
-.br
-.RS
-Specify whether to capture coverage data for external source files.
-
-External source files are files which are not located in one of the directories
-specified by \-\-directory or \-\-base\-directory. Use \-\-external to include
-external source files while capturing coverage data or \-\-no\-external to
-ignore this data.
-
-Data for external source files is
-.B included
-by default.
-.RE
-
-.B \-f
-.br
-.B \-\-follow
-.RS
-Follow links when searching .da files.
-.RE
-
-.B \-\-gcov\-tool
-.I tool
-.br
-.RS
-Specify the location of the gcov tool.
-.RE
-
-.B \-h
-.br
-.B \-\-help
-.RS
-Print a short help text, then exit.
-.RE
-
-.B \-\-include
-.I pattern
-.br
-.RS
-Include source files matching
-.IR pattern .
-
-Use this switch if you want to include coverage data for only a particular set
-of source files matching any of the given patterns. Multiple patterns can be
-specified by using multiple
-.B --include
-command line switches. The
-.I patterns
-will be interpreted as shell wildcard patterns (note that they may need to be
-escaped accordingly to prevent the shell from expanding them first).
-.RE
-
-.B \-\-ignore\-errors
-.I errors
-.br
-.RS
-Specify a list of errors after which to continue processing.
-
-Use this option to specify a list of one or more classes of errors after which
-geninfo should continue processing instead of aborting.
-
-.I errors
-can be a comma\-separated list of the following keywords:
-
-.B gcov:
-the gcov tool returned with a non\-zero return code.
-
-.B source:
-the source code file for a data set could not be found.
-.RE
-
-.B \-i
-.br
-.B \-\-initial
-.RS
-Capture initial zero coverage data.
-
-Run geninfo with this option on the directories containing .bb, .bbg or .gcno
-files before running any test case. The result is a "baseline" coverage data
-file that contains zero coverage for every instrumented line and function.
-Combine this data file (using lcov \-a) with coverage data files captured
-after a test run to ensure that the percentage of total lines covered is
-correct even when not all object code files were loaded during the test.
-
-Note: currently, the \-\-initial option does not generate branch coverage
-information.
-.RE
-
-.B \-\-no\-markers
-.br
-.RS
-Use this option if you want to get coverage data without regard to exclusion
-markers in the source code file.
-.RE
-
-.B \-\-no\-recursion
-.br
-.RS
-Use this option if you want to get coverage data for the specified directory
-only without processing subdirectories.
-.RE
-
-.BI "\-o " output\-filename
-.br
-.BI "\-\-output\-filename " output\-filename
-.RS
-Write all data to
-.IR output\-filename .
-
-If you want to have all data written to a single file (for easier
-handling), use this option to specify the respective filename. By default,
-one tracefile will be created for each processed .da file.
-.RE
-
-.B \-q
-.br
-.B \-\-quiet
-.RS
-Do not print progress messages.
-
-Suppresses all informational progress output. When this switch is enabled,
-only error or warning messages are printed.
-.RE
-
-.B \-\-rc
-.IR keyword = value
-.br
-.RS
-Override a configuration directive.
-
-Use this option to specify a
-.IR keyword = value
-statement which overrides the corresponding configuration statement in
-the lcovrc configuration file. You can specify this option more than once
-to override multiple configuration statements.
-See
-.BR lcovrc (5)
-for a list of available keywords and their meaning.
-.RE
-
-.BI "\-t " testname
-.br
-.BI "\-\-test\-name " testname
-.RS
-Use test case name 
-.I testname
-for resulting data. Valid test case names can consist of letters, decimal
-digits and the underscore character ('_').
-
-This proves useful when data from several test cases is merged (i.e. by
-simply concatenating the respective tracefiles) in which case a test
-name can be used to differentiate between data from each test case.
-.RE
-
-.B \-v
-.br
-.B \-\-version
-.RS
-Print version number, then exit.
-.RE
-
-
-.SH FILES
-
-.I /etc/lcovrc
-.RS
-The system\-wide configuration file.
-.RE
-
-.I ~/.lcovrc
-.RS
-The per\-user configuration file.
-.RE
-
-Following is a quick description of the tracefile format as used by
-.BR genhtml ", " geninfo " and " lcov .
-
-A tracefile is made up of several human\-readable lines of text,
-divided into sections. If available, a tracefile begins with the
-.I testname
-which is stored in the following format:
-
-  TN:<test name>
-
-For each source file referenced in the .da file, there is a section containing
-filename and coverage data:
-
-  SF:<absolute path to the source file>
-
-Following is a list of line numbers for each function name found in the
-source file:
-
-  FN:<line number of function start>,<function name>
-
-Next, there is a list of execution counts for each instrumented function:
-
-  FNDA:<execution count>,<function name>
-
-This list is followed by two lines containing the number of functions found
-and hit:
-
-  FNF:<number of functions found>
-  FNH:<number of function hit>
-
-Branch coverage information is stored which one line per branch:
-
-  BRDA:<line number>,<block number>,<branch number>,<taken>
-
-Block number and branch number are gcc internal IDs for the branch. Taken is
-either '-' if the basic block containing the branch was never executed or
-a number indicating how often that branch was taken.
-
-Branch coverage summaries are stored in two lines:
-
-  BRF:<number of branches found>
-  BRH:<number of branches hit>
-
-Then there is a list of execution counts for each instrumented line
-(i.e. a line which resulted in executable code):
-
-  DA:<line number>,<execution count>[,<checksum>]
-
-Note that there may be an optional checksum present for each instrumented
-line. The current
-.B geninfo
-implementation uses an MD5 hash as checksumming algorithm.
-
-At the end of a section, there is a summary about how many lines
-were found and how many were actually instrumented:
-
-  LH:<number of lines with a non\-zero execution count>
-  LF:<number of instrumented lines>
-
-Each sections ends with:
-
-  end_of_record
-
-In addition to the main source code file there are sections for all
-#included files which also contain executable code.
-
-Note that the absolute path of a source file is generated by interpreting
-the contents of the respective .bb file (see
-.BR "gcov " (1)
-for more information on this file type). Relative filenames are prefixed
-with the directory in which the .bb file is found.
-
-Note also that symbolic links to the .bb file will be resolved so that the
-actual file path is used instead of the path to a link. This approach is
-necessary for the mechanism to work with the /proc/gcov files.
-
-.SH AUTHOR
-Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-
-.SH SEE ALSO
-.BR lcov (1),
-.BR lcovrc (5),
-.BR genhtml (1),
-.BR genpng (1),
-.BR gendesc (1),
-.BR gcov (1)
diff --git a/ThirdParty/lcov/man/genpng.1 b/ThirdParty/lcov/man/genpng.1
deleted file mode 100644
index f6a49b8a5d48af9f9b0c10b151592fd703ca01d4..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/man/genpng.1
+++ /dev/null
@@ -1,101 +0,0 @@
-.TH genpng 1 "LCOV 1.14" 2019\-02\-28 "User Manuals"
-.SH NAME
-genpng \- Generate an overview image from a source file
-.SH SYNOPSIS
-.B genpng
-.RB [ \-h | \-\-help ]
-.RB [ \-v | \-\-version ]
-.RS 7
-.br
-.RB [ \-t | \-\-tab\-size
-.IR tabsize ]
-.RB [ \-w | \-\-width
-.IR width ]
-.br
-.RB [ \-o | \-\-output\-filename
-.IR output\-filename ]
-.br
-.IR source\-file
-.SH DESCRIPTION
-.B genpng
-creates an overview image for a given source code file of either
-plain text or .gcov file format.
-
-Note that the
-.I GD.pm
-Perl module has to be installed for this script to work
-(it may be obtained from
-.IR http://www.cpan.org ).
-
-Note also that
-.B genpng
-is called from within
-.B genhtml
-so that there is usually no need to call it directly.
-
-.SH OPTIONS
-.B \-h
-.br
-.B \-\-help
-.RS
-Print a short help text, then exit.
-.RE
-
-.B \-v
-.br
-.B \-\-version
-.RS
-Print version number, then exit.
-.RE
-
-.BI "\-t " tab\-size
-.br
-.BI "\-\-tab\-size " tab\-size
-.RS
-Use 
-.I tab\-size
-spaces in place of tab.
-
-All occurrences of tabulator signs in the source code file will be replaced
-by the number of spaces defined by
-.I tab\-size
-(default is 4).
-.RE
-
-.BI "\-w " width
-.br
-.BI "\-\-width " width
-.RS
-Set width of output image to 
-.I width
-pixel.
-
-The resulting image will be exactly
-.I width
-pixel wide (default is 80).
-
-Note that source code lines which are longer than
-.I width
-will be truncated.
-.RE
-
-
-.BI "\-o " filename
-.br
-.BI "\-\-output\-filename " filename
-.RS
-Write image to
-.IR filename .
-
-Specify a name for the resulting image file (default is 
-.IR source\-file .png).
-.RE
-.SH AUTHOR
-Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-
-.SH SEE ALSO
-.BR lcov (1),
-.BR genhtml (1),
-.BR geninfo (1),
-.BR gendesc (1),
-.BR gcov (1)
diff --git a/ThirdParty/lcov/man/lcov.1 b/ThirdParty/lcov/man/lcov.1
deleted file mode 100644
index e86eb3aa7624a76d122d791eaca2666dd41362de..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/man/lcov.1
+++ /dev/null
@@ -1,930 +0,0 @@
-.TH lcov 1 "LCOV 1.14" 2019\-02\-28 "User Manuals"
-.SH NAME
-lcov \- a graphical GCOV front\-end
-.SH SYNOPSIS
-.B lcov
-.BR \-c | \-\-capture
-.RS 5
-.br
-.RB [ \-d | \-\-directory
-.IR directory ]
-.RB [ \-k | \-\-kernel\-directory
-.IR directory ]
-.br
-.RB [ \-o | \-\-output\-file
-.IR tracefile ]
-.RB [ \-t | \-\-test\-name
-.IR testname ]
-.br
-.RB [ \-b | \-\-base\-directory
-.IR directory ]
-.RB [ \-i | \-\-initial ]
-.RB [ \-\-gcov\-tool
-.IR tool ]
-.br
-.RB [ \-\-checksum ]
-.RB [ \-\-no\-checksum ]
-.RB [ \-\-no\-recursion ]
-.RB [ \-f | \-\-follow ]
-.br
-.RB [ \-\-compat\-libtool ]
-.RB [ \-\-no\-compat\-libtool ]
-.RB [ \-\-ignore\-errors
-.IR errors ]
-.br
-.RB [ \-\-to\-package
-.IR package ]
-.RB [ \-\-from\-package
-.IR package ]
-.RB [ \-q | \-\-quiet ]
-.br
-.RB [ \-\-no\-markers ]
-.RB [ \-\-external ]
-.RB [ \-\-no\-external ]
-.br
-.RB [ \-\-config\-file
-.IR config\-file ]
-.RB [ \-\-rc
-.IR keyword = value ]
-.br
-.RB [ \-\-compat
-.IR  mode =on|off|auto]
-.br
-.RB [ \-\-include
-.IR pattern ]
-.RB [ \-\-exclude
-.IR pattern ]
-.br
-.RE
-
-.B lcov
-.BR \-z | \-\-zerocounters
-.RS 5
-.br
-.RB [ \-d | \-\-directory
-.IR directory ]
-.RB [ \-\-no\-recursion ]
-.RB [ \-f | \-\-follow ]
-.br
-.RB [ \-q | \-\-quiet ]
-.br
-.RE
-
-.B lcov
-.BR \-l | \-\-list
-.I tracefile
-.RS 5
-.br
-.RB [ \-q | \-\-quiet ]
-.RB [ \-\-list\-full\-path ]
-.RB [ \-\-no\-list\-full\-path ]
-.br
-.RB [ \-\-config\-file
-.IR config\-file ]
-.RB [ \-\-rc
-.IR keyword = value ]
-.br
-.RE
-
-.B lcov
-.BR \-a | \-\-add\-tracefile
-.I tracefile
-.RS 5
-.br
-.RB [ \-o | \-\-output\-file
-.IR tracefile ]
-.RB [ \-\-checksum ]
-.RB [ \-\-no\-checksum ]
-.br
-.RB [ \-q | \-\-quiet ]
-.RB [ \-\-config\-file
-.IR config\-file ]
-.RB [ \-\-rc
-.IR keyword = value ]
-.br
-.RE
-
-.B lcov
-.BR \-e | \-\-extract
-.I tracefile pattern
-.RS 5
-.br
-.RB [ \-o | \-\-output\-file
-.IR tracefile ]
-.RB [ \-\-checksum ]
-.RB [ \-\-no\-checksum ]
-.br
-.RB [ \-q | \-\-quiet ]
-.RB [ \-\-config\-file
-.IR config\-file ]
-.RB [ \-\-rc
-.IR keyword = value ]
-.br
-.RE
-
-.B lcov
-.BR \-r | \-\-remove
-.I tracefile pattern
-.RS 5
-.br
-.RB [ \-o | \-\-output\-file
-.IR tracefile ]
-.RB [ \-\-checksum ]
-.RB [ \-\-no\-checksum ]
-.br
-.RB [ \-q | \-\-quiet ]
-.RB [ \-\-config\-file
-.IR config\-file ]
-.RB [ \-\-rc
-.IR keyword = value ]
-.br
-.RE
-
-.B lcov
-.BR \-\-diff
-.IR "tracefile diff"
-.RS 5
-.br
-.RB [ \-o | \-\-output\-file
-.IR tracefile ]
-.RB [ \-\-checksum ]
-.RB [ \-\-no\-checksum ]
-.br
-.RB [ \-\-convert\-filenames ]
-.RB [ \-\-strip
-.IR depth ]
-.RB [ \-\-path
-.IR path ]
-.RB [ \-q | \-\-quiet ]
-.br
-.RB [ \-\-config\-file
-.IR config\-file ]
-.RB [ \-\-rc
-.IR keyword = value ]
-.br
-.RE
-
-.B lcov
-.BR \-\-summary
-.I tracefile
-.RS 5
-.br
-.RB [ \-q | \-\-quiet ]
-.br
-.RE
-
-.B lcov
-.RB [ \-h | \-\-help ]
-.RB [ \-v | \-\-version ]
-.RS 5
-.br
-.RE
-
-.SH DESCRIPTION
-.B lcov
-is a graphical front\-end for GCC's coverage testing tool gcov. It collects
-line, function and branch coverage data for multiple source files and creates
-HTML pages containing the source code annotated with coverage information.
-It also adds overview pages for easy navigation within the file structure.
-
-Use
-.B lcov
-to collect coverage data and
-.B genhtml
-to create HTML pages. Coverage data can either be collected from the
-currently running Linux kernel or from a user space application. To do this,
-you have to complete the following preparation steps:
-
-For Linux kernel coverage:
-.RS
-Follow the setup instructions for the gcov\-kernel infrastructure:
-.I http://ltp.sourceforge.net/coverage/gcov.php
-.br
-
-
-.RE
-For user space application coverage:
-.RS
-Compile the application with GCC using the options
-"\-fprofile\-arcs" and "\-ftest\-coverage".
-.RE
-
-Please note that this man page refers to the output format of
-.B lcov
-as ".info file" or "tracefile" and that the output of GCOV
-is called ".da file".
-
-Also note that when printing percentages, 0% and 100% are only printed when
-the values are exactly 0% and 100% respectively. Other values which would
-conventionally be rounded to 0% or 100% are instead printed as nearest
-non-boundary value. This behavior is in accordance with that of the
-.BR gcov (1)
-tool.
-
-.SH OPTIONS
-
-
-.B \-a
-.I tracefile
-.br
-.B \-\-add\-tracefile
-.I tracefile
-.br
-.RS
-Add contents of
-.IR tracefile .
-
-Specify several tracefiles using the \-a switch to combine the coverage data
-contained in these files by adding up execution counts for matching test and
-filename combinations.
-
-The result of the add operation will be written to stdout or the tracefile
-specified with \-o.
-
-Only one of  \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
-specified at a time.
-
-.RE
-
-.B \-b
-.I directory
-.br
-.B \-\-base\-directory
-.I directory
-.br
-.RS
-.RI "Use " directory
-as base directory for relative paths.
-
-Use this option to specify the base directory of a build\-environment
-when lcov produces error messages like:
-
-.RS
-ERROR: could not read source file /home/user/project/subdir1/subdir2/subdir1/subdir2/file.c
-.RE
-
-In this example, use /home/user/project as base directory.
-
-This option is required when using lcov on projects built with libtool or
-similar build environments that work with a base directory, i.e. environments,
-where the current working directory when invoking the compiler is not the same
-directory in which the source code file is located.
-
-Note that this option will not work in environments where multiple base
-directories are used. In that case use configuration file setting
-.B geninfo_auto_base=1
-(see
-.BR lcovrc (5)).
-.RE
-
-.B \-c
-.br
-.B \-\-capture
-.br
-.RS
-Capture coverage data.
-
-By default captures the current kernel execution counts and writes the
-resulting coverage data to the standard output. Use the \-\-directory
-option to capture counts for a user space program.
-
-The result of the capture operation will be written to stdout or the tracefile
-specified with \-o.
-
-Only one of  \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
-specified at a time.
-.RE
-
-.B \-\-checksum
-.br
-.B \-\-no\-checksum
-.br
-.RS
-Specify whether to generate checksum data when writing tracefiles.
-
-Use \-\-checksum to enable checksum generation or \-\-no\-checksum to
-disable it. Checksum generation is
-.B disabled
-by default.
-
-When checksum generation is enabled, a checksum will be generated for each
-source code line and stored along with the coverage data. This checksum will
-be used to prevent attempts to combine coverage data from different source
-code versions.
-
-If you don't work with different source code versions, disable this option
-to speed up coverage data processing and to reduce the size of tracefiles.
-.RE
-
-.B \-\-compat
-.IR mode = value [, mode = value ,...]
-.br
-.RS
-Set compatibility mode.
-
-Use \-\-compat to specify that lcov should enable one or more compatibility
-modes when capturing coverage data. You can provide a comma-separated list
-of mode=value pairs to specify the values for multiple modes.
-
-Valid
-.I values
-are:
-
-.B on
-.RS
-Enable compatibility mode.
-.RE
-.B off
-.RS
-Disable compatibility mode.
-.RE
-.B auto
-.RS
-Apply auto-detection to determine if compatibility mode is required. Note that
-auto-detection is not available for all compatibility modes.
-.RE
-
-If no value is specified, 'on' is assumed as default value.
-
-Valid
-.I modes
-are:
-
-.B libtool
-.RS
-Enable this mode if you are capturing coverage data for a project that
-was built using the libtool mechanism. See also
-\-\-compat\-libtool.
-
-The default value for this setting is 'on'.
-
-.RE
-.B hammer
-.RS
-Enable this mode if you are capturing coverage data for a project that
-was built using a version of GCC 3.3 that contains a modification
-(hammer patch) of later GCC versions. You can identify a modified GCC 3.3
-by checking the build directory of your project for files ending in the
-extension '.bbg'. Unmodified versions of GCC 3.3 name these files '.bb'.
-
-The default value for this setting is 'auto'.
-
-.RE
-.B split_crc
-.RS
-Enable this mode if you are capturing coverage data for a project that
-was built using a version of GCC 4.6 that contains a modification
-(split function checksums) of later GCC versions. Typical error messages
-when running lcov on coverage data produced by such GCC versions are
-\'out of memory' and 'reached unexpected end of file'.
-
-The default value for this setting is 'auto'
-.RE
-
-.RE
-
-.B \-\-compat\-libtool
-.br
-.B \-\-no\-compat\-libtool
-.br
-.RS
-Specify whether to enable libtool compatibility mode.
-
-Use \-\-compat\-libtool to enable libtool compatibility mode or \-\-no\-compat\-libtool
-to disable it. The libtool compatibility mode is
-.B enabled
-by default.
-
-When libtool compatibility mode is enabled, lcov will assume that the source
-code relating to a .da file located in a directory named ".libs" can be
-found in its parent directory.
-
-If you have directories named ".libs" in your build environment but don't use
-libtool, disable this option to prevent problems when capturing coverage data.
-.RE
-
-.B \-\-config\-file
-.I config\-file
-.br
-.RS
-Specify a configuration file to use.
-
-When this option is specified, neither the system\-wide configuration file
-/etc/lcovrc, nor the per\-user configuration file ~/.lcovrc is read.
-
-This option may be useful when there is a need to run several
-instances of
-.B lcov
-with different configuration file options in parallel.
-.RE
-
-.B \-\-convert\-filenames
-.br
-.RS
-Convert filenames when applying diff.
-
-Use this option together with \-\-diff to rename the file names of processed
-data sets according to the data provided by the diff.
-.RE
-
-.B \-\-diff
-.I tracefile
-.I difffile
-.br
-.RS
-Convert coverage data in
-.I tracefile
-using source code diff file
-.IR difffile .
-
-Use this option if you want to merge coverage data from different source code
-levels of a program, e.g. when you have data taken from an older version
-and want to combine it with data from a more current version.
-.B lcov
-will try to map source code lines between those versions and adjust the coverage
-data respectively.
-.I difffile
-needs to be in unified format, i.e. it has to be created using the "\-u" option
-of the
-.B diff
-tool.
-
-Note that lines which are not present in the old version will not be counted
-as instrumented, therefore tracefiles resulting from this operation should
-not be interpreted individually but together with other tracefiles taken
-from the newer version. Also keep in mind that converted coverage data should
-only be used for overview purposes as the process itself introduces a loss
-of accuracy.
-
-The result of the diff operation will be written to stdout or the tracefile
-specified with \-o.
-
-Only one of  \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
-specified at a time.
-.RE
-
-.B \-d
-.I directory
-.br
-.B \-\-directory
-.I  directory
-.br
-.RS
-Use .da files in
-.I directory
-instead of kernel.
-
-If you want to work on coverage data for a user space program, use this
-option to specify the location where the program was compiled (that's
-where the counter files ending with .da will be stored).
-
-Note that you may specify this option more than once.
-.RE
-
-.B \-\-exclude
-.I pattern
-.br
-.RS
-Exclude source files matching
-.IR pattern .
-
-Use this switch if you want to exclude coverage data for a particular set
-of source files matching any of the given patterns. Multiple patterns can be
-specified by using multiple
-.B --exclude
-command line switches. The
-.I patterns
-will be interpreted as shell wildcard patterns (note that they may need to be
-escaped accordingly to prevent the shell from expanding them first).
-
-Can be combined with the
-.B --include
-command line switch. If a given file matches both the include pattern and the
-exclude pattern, the exclude pattern will take precedence.
-.RE
-
-.B \-\-external
-.br
-.B \-\-no\-external
-.br
-.RS
-Specify whether to capture coverage data for external source files.
-
-External source files are files which are not located in one of the directories
-specified by \-\-directory or \-\-base\-directory. Use \-\-external to include
-external source files while capturing coverage data or \-\-no\-external to
-ignore this data.
-
-Data for external source files is
-.B included
-by default.
-.RE
-
-.B \-e
-.I tracefile
-.I pattern
-.br
-.B \-\-extract
-.I tracefile
-.I pattern
-.br
-.RS
-Extract data from
-.IR tracefile .
-
-Use this switch if you want to extract coverage data for only a particular
-set of files from a tracefile. Additional command line parameters will be
-interpreted as shell wildcard patterns (note that they may need to be
-escaped accordingly to prevent the shell from expanding them first).
-Every file entry in
-.I tracefile
-which matches at least one of those patterns will be extracted.
-
-The result of the extract operation will be written to stdout or the tracefile
-specified with \-o.
-
-Only one of  \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
-specified at a time.
-.RE
-
-.B \-f
-.br
-.B \-\-follow
-.br
-.RS
-Follow links when searching for .da files.
-.RE
-
-.B \-\-from\-package
-.I package
-.br
-.RS
-Use .da files in
-.I package
-instead of kernel or directory.
-
-Use this option if you have separate machines for build and test and
-want to perform the .info file creation on the build machine. See
-\-\-to\-package for more information.
-.RE
-
-.B \-\-gcov\-tool
-.I tool
-.br
-.RS
-Specify the location of the gcov tool.
-.RE
-
-.B \-h
-.br
-.B \-\-help
-.br
-.RS
-Print a short help text, then exit.
-.RE
-
-.B \-\-include
-.I pattern
-.br
-.RS
-Include source files matching
-.IR pattern .
-
-Use this switch if you want to include coverage data for only a particular set
-of source files matching any of the given patterns. Multiple patterns can be
-specified by using multiple
-.B --include
-command line switches. The
-.I patterns
-will be interpreted as shell wildcard patterns (note that they may need to be
-escaped accordingly to prevent the shell from expanding them first).
-.RE
-
-.B \-\-ignore\-errors
-.I errors
-.br
-.RS
-Specify a list of errors after which to continue processing.
-
-Use this option to specify a list of one or more classes of errors after which
-lcov should continue processing instead of aborting.
-
-.I errors
-can be a comma\-separated list of the following keywords:
-
-.B gcov:
-the gcov tool returned with a non\-zero return code.
-
-.B source:
-the source code file for a data set could not be found.
-
-.B graph:
-the graph file could not be found or is corrupted.
-.RE
-
-.B \-i
-.br
-.B \-\-initial
-.RS
-Capture initial zero coverage data.
-
-Run lcov with \-c and this option on the directories containing .bb, .bbg
-or .gcno files before running any test case. The result is a "baseline"
-coverage data file that contains zero coverage for every instrumented line.
-Combine this data file (using lcov \-a) with coverage data files captured
-after a test run to ensure that the percentage of total lines covered is
-correct even when not all source code files were loaded during the test.
-
-Recommended procedure when capturing data for a test case:
-
-1. create baseline coverage data file
-.RS
-# lcov \-c \-i \-d appdir \-o app_base.info
-.br
-
-.RE
-2. perform test
-.RS
-# appdir/test
-.br
-
-.RE
-3. create test coverage data file
-.RS
-# lcov \-c \-d appdir \-o app_test.info
-.br
-
-.RE
-4. combine baseline and test coverage data
-.RS
-# lcov \-a app_base.info \-a app_test.info \-o app_total.info
-.br
-
-.RE
-.RE
-
-.B \-k
-.I subdirectory
-.br
-.B \-\-kernel\-directory
-.I subdirectory
-.br
-.RS
-Capture kernel coverage data only from
-.IR subdirectory .
-
-Use this option if you don't want to get coverage data for all of the
-kernel, but only for specific subdirectories. This option may be specified
-more than once.
-
-Note that you may need to specify the full path to the kernel subdirectory
-depending on the version of the kernel gcov support.
-.RE
-
-.B \-l
-.I tracefile
-.br
-.B \-\-list
-.I tracefile
-.br
-.RS
-List the contents of the
-.IR tracefile .
-
-Only one of  \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
-specified at a time.
-.RE
-
-.B \-\-list\-full\-path
-.br
-.B \-\-no\-list\-full\-path
-.br
-.RS
-Specify whether to show full paths during list operation.
-
-Use \-\-list\-full\-path to show full paths during list operation
-or \-\-no\-list\-full\-path to show shortened paths. Paths are
-.B shortened
-by default.
-.RE
-
-.B \-\-no\-markers
-.br
-.RS
-Use this option if you want to get coverage data without regard to exclusion
-markers in the source code file. See
-.BR "geninfo " (1)
-for details on exclusion markers.
-.RE
-
-.B \-\-no\-recursion
-.br
-.RS
-Use this option if you want to get coverage data for the specified directory
-only without processing subdirectories.
-.RE
-
-.B \-o
-.I tracefile
-.br
-.B \-\-output\-file
-.I tracefile
-.br
-.RS
-Write data to
-.I tracefile
-instead of stdout.
-
-Specify "\-" as a filename to use the standard output.
-
-By convention, lcov\-generated coverage data files are called "tracefiles" and
-should have the filename extension ".info".
-.RE
-
-.B \-\-path
-.I path
-.br
-.RS
-Strip path from filenames when applying diff.
-
-Use this option together with \-\-diff to tell lcov to disregard the specified
-initial path component when matching between tracefile and diff filenames.
-.RE
-
-.B \-q
-.br
-.B \-\-quiet
-.br
-.RS
-Do not print progress messages.
-
-This option is implied when no output filename is specified to prevent
-progress messages to mess with coverage data which is also printed to
-the standard output.
-.RE
-
-.B \-\-rc
-.IR keyword = value
-.br
-.RS
-Override a configuration directive.
-
-Use this option to specify a
-.IR keyword = value
-statement which overrides the corresponding configuration statement in
-the lcovrc configuration file. You can specify this option more than once
-to override multiple configuration statements.
-See
-.BR lcovrc (5)
-for a list of available keywords and their meaning.
-.RE
-
-.B \-r
-.I tracefile
-.I pattern
-.br
-.B \-\-remove
-.I tracefile
-.I pattern
-.br
-.RS
-Remove data from
-.IR tracefile .
-
-Use this switch if you want to remove coverage data for a particular
-set of files from a tracefile. Additional command line parameters will be
-interpreted as shell wildcard patterns (note that they may need to be
-escaped accordingly to prevent the shell from expanding them first).
-Every file entry in
-.I tracefile
-which matches at least one of those patterns will be removed.
-
-The result of the remove operation will be written to stdout or the tracefile
-specified with \-o.
-
-Only one of  \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
-specified at a time.
-.RE
-
-.B \-\-strip
-.I depth
-.br
-.RS
-Strip path components when applying diff.
-
-Use this option together with \-\-diff to tell lcov to disregard the specified
-number of initial directories when matching tracefile and diff filenames.
-.RE
-
-.B \-\-summary
-.I tracefile
-.br
-.RS
-Show summary coverage information for the specified tracefile.
-
-Note that you may specify this option more than once.
-
-Only one of  \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
-specified at a time.
-.RE
-
-.B \-t
-.I testname
-.br
-.B \-\-test\-name
-.I testname
-.br
-.RS
-Specify test name to be stored in the tracefile.
-
-This name identifies a coverage data set when more than one data set is merged
-into a combined tracefile (see option \-a).
-
-Valid test names can consist of letters, decimal digits and the underscore
-character ("_").
-.RE
-
-.B \-\-to\-package
-.I package
-.br
-.RS
-Store .da files for later processing.
-
-Use this option if you have separate machines for build and test and
-want to perform the .info file creation on the build machine. To do this,
-follow these steps:
-
-On the test machine:
-.RS
-.br
-\- run the test
-.br
-\- run lcov \-c [\-d directory] \-\-to-package
-.I file
-.br
-\- copy
-.I file
-to the build machine
-.RE
-.br
-
-On the build machine:
-.RS
-.br
-\- run lcov \-c \-\-from-package
-.I file
-[\-o and other options]
-.RE
-.br
-
-This works for both kernel and user space coverage data. Note that you might
-have to specify the path to the build directory using \-b with
-either \-\-to\-package or \-\-from-package. Note also that the package data
-must be converted to a .info file before recompiling the program or it will
-become invalid.
-.RE
-
-.B \-v
-.br
-.B \-\-version
-.br
-.RS
-Print version number, then exit.
-.RE
-
-.B \-z
-.br
-.B \-\-zerocounters
-.br
-.RS
-Reset all execution counts to zero.
-
-By default tries to reset kernel execution counts. Use the \-\-directory
-option to reset all counters of a user space program.
-
-Only one of  \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
-specified at a time.
-.RE
-
-.SH FILES
-
-.I /etc/lcovrc
-.RS
-The system\-wide configuration file.
-.RE
-
-.I ~/.lcovrc
-.RS
-The per\-user configuration file.
-.RE
-
-.SH AUTHOR
-Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
-
-.SH SEE ALSO
-.BR lcovrc (5),
-.BR genhtml (1),
-.BR geninfo (1),
-.BR genpng (1),
-.BR gendesc (1),
-.BR gcov (1)
diff --git a/ThirdParty/lcov/man/lcovrc.5 b/ThirdParty/lcov/man/lcovrc.5
deleted file mode 100644
index f20d273a92c8ebd48ac8a9f68498024124ef0a8f..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/man/lcovrc.5
+++ /dev/null
@@ -1,913 +0,0 @@
-.TH lcovrc 5 "LCOV 1.14" 2019\-02\-28 "User Manuals"
-
-.SH NAME
-lcovrc \- lcov configuration file
-
-.SH DESCRIPTION
-The
-.I lcovrc
-file contains configuration information for the
-.B lcov
-code coverage tool (see
-.BR lcov (1)).
-.br
-
-The system\-wide configuration file is located at
-.IR /etc/lcovrc .
-To change settings for a single user, place a customized copy of this file at
-location
-.IR ~/.lcovrc .
-Where available, command\-line options override configuration file settings.
-
-Lines in a configuration file can either be:
-.IP "     *"
-empty lines or lines consisting only of white space characters. These lines are
-ignored.
-.IP "     *"
-comment lines which start with a hash sign ('#'). These are treated like empty
-lines and will be ignored.
-.IP "     *"
-statements in the form
-.RI ' key " = " value '.
-A list of valid statements and their description can be found in
-section 'OPTIONS' below.
-.PP
-
-.B Example configuration:
-.IP
-#
-.br
-# Example LCOV configuration file
-.br
-#
-.br
-
-# External style sheet file
-.br
-#genhtml_css_file = gcov.css
-.br
-
-# Coverage rate limits
-.br
-genhtml_hi_limit = 90
-.br
-genhtml_med_limit = 75
-.br
-
-# Width of line coverage field in source code view
-.br
-genhtml_line_field_width = 12
-.br
-
-# Width of branch coverage field in source code view
-.br
-genhtml_branch_field_width = 16
-.br
-
-# Width of overview image
-.br
-genhtml_overview_width = 80
-.br
-
-# Resolution of overview navigation
-.br
-genhtml_nav_resolution = 4
-.br
-
-# Offset for source code navigation
-.br
-genhtml_nav_offset = 10
-.br
-
-# Do not remove unused test descriptions if non\-zero
-.br
-genhtml_keep_descriptions = 0
-.br
-
-# Do not remove prefix from directory names if non\-zero
-.br
-genhtml_no_prefix = 0
-.br
-
-# Do not create source code view if non\-zero
-.br
-genhtml_no_source = 0
-.br
-
-# Specify size of tabs
-.br
-genhtml_num_spaces = 8
-.br
-
-# Highlight lines with converted\-only data if non\-zero
-.br
-genhtml_highlight = 0
-.br
-
-# Include color legend in HTML output if non\-zero
-.br
-genhtml_legend = 0
-.br
-
-# Include HTML file at start of HTML output
-.br
-#genhtml_html_prolog = prolog.html
-.br
-
-# Include HTML file at end of HTML output
-.br
-#genhtml_html_epilog = epilog.html
-.br
-
-# Use custom HTML file extension
-.br
-#genhtml_html_extension = html
-.br
-
-# Compress all generated html files with gzip.
-.br
-#genhtml_html_gzip = 1
-.br
-
-# Include sorted overview pages
-.br
-genhtml_sort = 1
-.br
-
-# Include function coverage data display
-.br
-#genhtml_function_coverage = 1
-.br
-
-# Include branch coverage data display
-.br
-#genhtml_branch_coverage = 1
-.br
-
-# Specify the character set of all generated HTML pages
-.br
-genhtml_charset=UTF\-8
-.br
-
-# Allow HTML markup in test case description text if non\-zero
-.br
-genhtml_desc_html=0
-.br
-
-# Specify the precision for coverage rates
-.br
-#genhtml_precision=1
-.br
-
-# Show missed counts instead of hit counts
-.br
-#genhtml_missed=1
-.br
-
-# Demangle C++ symbols
-.br
-#genhtml_demangle_cpp=1
-.br
-
-# Location of the gcov tool
-.br
-#geninfo_gcov_tool = gcov
-.br
-
-# Adjust test names if non\-zero
-.br
-#geninfo_adjust_testname = 0
-.br
-
-# Calculate a checksum for each line if non\-zero
-.br
-geninfo_checksum = 0
-.br
-
-# Enable libtool compatibility mode if non\-zero
-.br
-geninfo_compat_libtool = 0
-.br
-
-# Specify whether to capture coverage data for external source
-.br
-# files
-.br
-#geninfo_external = 1
-.br
-
-# Use gcov's --all-blocks option if non-zero
-.br
-#geninfo_gcov_all_blocks = 1
-.br
-
-# Specify compatiblity modes (same as \-\-compat option
-.br
-# of geninfo)
-.br
-#geninfo_compat = libtool=on, hammer=auto, split_crc=auto
-.br
-
-# Adjust path to source files by removing or changing path
-.br
-# components that match the specified pattern (Perl regular
-.br
-# expression format)
-.br
-#geninfo_adjust_src_path = /tmp/build => /usr/src
-
-# Specify if geninfo should try to automatically determine
-.br
-# the base-directory when collecting coverage data.
-.br
-geninfo_auto_base = 1
-.br
-
-# Directory containing gcov kernel files
-.br
-lcov_gcov_dir = /proc/gcov
-.br
-
-# Location for temporary directories
-.br
-lcov_tmp_dir = /tmp
-.br
-
-# Show full paths during list operation if non\-zero
-.br
-lcov_list_full_path = 0
-.br
-
-# Specify the maximum width for list output. This value is
-.br
-# ignored when lcov_list_full_path is non\-zero.
-.br
-lcov_list_width = 80
-.br
-
-# Specify the maximum percentage of file names which may be
-.br
-# truncated when choosing a directory prefix in list output.
-.br
-# This value is ignored when lcov_list_full_path is non\-zero.
-.br
-lcov_list_truncate_max = 20
-
-# Specify if function coverage data should be collected and
-.br
-# processed.
-.br
-lcov_function_coverage = 1
-.br
-
-# Specify if branch coverage data should be collected and
-.br
-# processed.
-.br
-lcov_branch_coverage = 0
-.br
-.PP
-
-.SH OPTIONS
-
-.BR genhtml_css_file " ="
-.I filename
-.IP
-Specify an external style sheet file. Use this option to modify the appearance of the HTML output as generated by
-.BR genhtml .
-During output generation, a copy of this file will be placed in the output
-directory.
-.br
-
-This option corresponds to the \-\-css\-file command line option of
-.BR genhtml .
-.br
-
-By default, a standard CSS file is generated.
-.PP
-
-.BR genhtml_hi_limit "  ="
-.I hi_limit
-.br
-.BR genhtml_med_limit " ="
-.I med_limit
-.br
-.IP
-Specify coverage rate limits for classifying file entries. Use this option to
-modify the coverage rates (in percent) for line, function and branch coverage at
-which a result is classified as high, medium or low coverage. This
-classification affects the color of the corresponding entries on the overview
-pages of the HTML output:
-.br
-
-High:   hi_limit  <= rate <= 100        default color: green
-.br
-Medium: med_limit <= rate < hi_limit    default color: orange
-.br
-Low:    0         <= rate < med_limit   default color: red
-.br
-
-Defaults are 90 and 75 percent.
-.PP
-
-.BR genhtml_line_field_width " ="
-.I number_of_characters
-.IP
-Specify the width (in characters) of the source code view column containing
-line coverage information.
-.br
-
-Default is 12.
-.PP
-
-.BR genhtml_branch_field_width " ="
-.I number_of_characters
-.IP
-Specify the width (in characters) of the source code view column containing
-branch coverage information.
-.br
-
-Default is 16.
-.PP
-
-.BR genhtml_overview_width " ="
-.I pixel_size
-.IP
-Specify the width (in pixel) of the overview image created when generating HTML
-output using the \-\-frames option of
-.BR genhtml .
-.br
-
-Default is 80.
-.PP
-
-.BR genhtml_nav_resolution " ="
-.I lines
-.IP
-Specify the resolution of overview navigation when generating HTML output using
-the \-\-frames option of
-.BR genhtml .
-This number specifies the maximum difference in lines between the position a
-user selected from the overview and the position the source code window is
-scrolled to.
-.br
-
-Default is 4.
-.PP
-
-
-.BR genhtml_nav_offset " ="
-.I lines
-.IP
-Specify the overview navigation line offset as applied when generating HTML
-output using the \-\-frames option of
-.BR genhtml.
-.br
-
-Clicking a line in the overview image should show the source code view at
-a position a bit further up, so that the requested line is not the first
-line in the window.  This number specifies that offset.
-.br
-
-Default is 10.
-.PP
-
-
-.BR genhtml_keep_descriptions " ="
-.IR 0 | 1
-.IP
-If non\-zero, keep unused test descriptions when generating HTML output using
-.BR genhtml .
-.br
-
-This option corresponds to the \-\-keep\-descriptions option of
-.BR genhtml .
-.br
-
-Default is 0.
-.PP
-
-.BR genhtml_no_prefix " ="
-.IR 0 | 1
-.IP
-If non\-zero, do not try to find and remove a common prefix from directory names.
-.br
-
-This option corresponds to the \-\-no\-prefix option of
-.BR genhtml .
-.br
-
-Default is 0.
-.PP
-
-.BR genhtml_no_source " ="
-.IR 0 | 1
-.IP
-If non\-zero, do not create a source code view when generating HTML output using
-.BR genhtml .
-.br
-
-This option corresponds to the \-\-no\-source option of
-.BR genhtml .
-.br
-
-Default is 0.
-.PP
-
-.BR genhtml_num_spaces " ="
-.I num
-.IP
-Specify the number of spaces to use as replacement for tab characters in the
-HTML source code view as generated by
-.BR genhtml .
-.br
-
-This option corresponds to the \-\-num\-spaces option of
-.BR genthml .
-.br
-
-Default is 8.
-
-.PP
-
-.BR genhtml_highlight " ="
-.IR 0 | 1
-.IP
-If non\-zero, highlight lines with converted\-only data in
-HTML output as generated by
-.BR genhtml .
-.br
-
-This option corresponds to the \-\-highlight option of
-.BR genhtml .
-.br
-
-Default is 0.
-.PP
-
-.BR genhtml_legend " ="
-.IR 0 | 1
-.IP
-If non\-zero, include a legend explaining the meaning of color coding in the HTML
-output as generated by
-.BR genhtml .
-.br
-
-This option corresponds to the \-\-legend option of
-.BR genhtml .
-.br
-
-Default is 0.
-.PP
-
-.BR genhtml_html_prolog " ="
-.I filename
-.IP
-If set, include the contents of the specified file at the beginning of HTML
-output.
-
-This option corresponds to the \-\-html\-prolog option of
-.BR genhtml .
-.br
-
-Default is to use no extra prolog.
-.PP
-
-.BR genhtml_html_epilog " ="
-.I filename
-.IP
-If set, include the contents of the specified file at the end of HTML output.
-
-This option corresponds to the \-\-html\-epilog option of
-.BR genhtml .
-.br
-
-Default is to use no extra epilog.
-.PP
-
-.BR genhtml_html_extension " ="
-.I extension
-.IP
-If set, use the specified string as filename extension for generated HTML files.
-
-This option corresponds to the \-\-html\-extension option of
-.BR genhtml .
-.br
-
-Default extension is "html".
-.PP
-
-.BR genhtml_html_gzip " ="
-.IR 0 | 1
-.IP
-If set, compress all html files using gzip.
-
-This option corresponds to the \-\-html\-gzip option of
-.BR genhtml .
-.br
-
-Default extension is 0.
-.PP
-
-.BR genhtml_sort " ="
-.IR 0 | 1
-.IP
-If non\-zero, create overview pages sorted by coverage rates when generating
-HTML output using
-.BR genhtml .
-.br
-
-This option can be set to 0 by using the \-\-no\-sort option of
-.BR genhtml .
-.br
-
-Default is 1.
-.PP
-
-.BR genhtml_function_coverage " ="
-.IR 0 | 1
-.IP
-If non\-zero, include function coverage data when generating HTML output using
-.BR genhtml .
-.br
-
-This option can be set to 0 by using the \-\-no\-function\-coverage option of
-.BR genhtml .
-.br
-
-Default is 1.
-.PP
-
-.BR genhtml_branch_coverage " ="
-.IR 0 | 1
-.IP
-If non\-zero, include branch coverage data when generating HTML output using
-.BR genhtml .
-.br
-
-This option can be set to 0 by using the \-\-no\-branch\-coverage option of
-.BR genhtml .
-.br
-
-Default is 1.
-.PP
-
-.BR genhtml_charset " ="
-.I charset
-.IP
-Specify the character set of all generated HTML pages.
-.br
-
-Use this option if the source code contains characters which are not
-part of the default character set. Note that this option is ignored
-when a custom HTML prolog is specified (see also
-.BR genhtml_html_prolog ).
-.br
-
-Default is UTF-8.
-.PP
-
-.BR genhtml_demangle_cpp " ="
-.IR 0 | 1
-.IP
-If non-zero, demangle C++ function names in function overviews.
-
-Set this option to one if you want to convert C++ internal function
-names to human readable format for display on the HTML function overview
-page.  This option requires that the c++filt tool is installed (see
-.BR c++filt(1)
-).
-.br
-
-This option corresponds to the \-\-demangle\-cpp command line option of
-.BR genhtml .
-.br
-
-Default is 0.
-.PP
-
-.BR genhtml_desc_html " ="
-.IR 0 | 1
-.IP
-If non-zero, test case descriptions may contain HTML markup.
-
-Set this option to one if you want to embed HTML markup (for example to
-include links) in test case descriptions. When set to zero, HTML markup
-characters will be escaped to show up as plain text on the test case
-description page.
-.br
-
-Default is 0.
-.PP
-
-.BR genhtml_precision " ="
-.IR  1 | 2 | 3 | 4
-.IP
-Specify how many digits after the decimal-point should be used for
-displaying coverage rates.
-.br
-
-Default is 1.
-.PP
-.BR genhtml_missed " ="
-.IR  0 | 1
-.IP
-If non-zero, the count of missed lines, functions, or branches is shown
-as negative numbers in overview pages.
-.br
-
-Default is 0.
-.PP
-
-.
-.BR geninfo_gcov_tool " ="
-.I path_to_gcov
-.IP
-Specify the location of the gcov tool (see
-.BR gcov (1))
-which is used to generate coverage information from data files. 
-.br
-
-Default is 'gcov'.
-.PP
-
-.BR geninfo_adjust_testname " ="
-.IR 0 | 1
-.IP
-If non\-zero,  adjust test names to include operating system information
-when capturing coverage data.
-.br
-
-Default is 0.
-.PP
-
-.BR geninfo_checksum " ="
-.IR 0 | 1
-.IP
-If non\-zero, generate source code checksums when capturing coverage data.
-Checksums are useful to prevent merging coverage data from incompatible
-source code versions but checksum generation increases the size of coverage
-files and the time used to generate those files.
-.br
-
-This option corresponds to the \-\-checksum and \-\-no\-checksum command line
-option of
-.BR geninfo .
-.br
-
-Default is 0.
-.PP
-
-.BR geninfo_compat_libtool " ="
-.IR 0 | 1
-.IP
-If non\-zero, enable libtool compatibility mode. When libtool compatibility
-mode is enabled, lcov will assume that the source code relating to a .da file
-located in a directory named ".libs" can be found in its parent directory.
-.br
-
-This option corresponds to the \-\-compat\-libtool and \-\-no\-compat\-libtool
-command line option of
-.BR geninfo .
-.br
-
-Default is 1.
-.PP
-
-.BR geninfo_external " ="
-.IR 0 | 1
-.IP
-If non\-zero, capture coverage data for external source files.
-
-External source files are files which are not located in one of the directories
-(including sub-directories)
-specified by the \-\-directory or \-\-base\-directory options of
-.BR lcov / geninfo .
-
-Default is 1.
-.PP
-
-.BR geninfo_gcov_all_blocks " ="
-.IR 0 | 1
-.IP
-If non\-zero, call the gcov tool with option --all-blocks.
-
-Using --all-blocks will produce more detailed branch coverage information for
-each line. Set this option to zero if you do not need detailed branch coverage
-information to speed up the process of capturing code coverage or to work
-around a bug in some versions of gcov which will cause it to endlessly loop
-when analysing some files.
-
-Default is 1.
-.PP
-
-.BR geninfo_compat " ="
-.IR mode = value [, mode = value ,...]
-.IP
-Specify that geninfo should enable one or more compatibility modes
-when capturing coverage data.
-
-This option corresponds to the \-\-compat command line option of
-.BR geninfo .
-
-Default is 'libtool=on, hammer=auto, split_crc=auto'.
-.PP
-
-.BR geninfo_adjust_src_path " ="
-.IR pattern " => " replacement
-.br
-.BR geninfo_adjust_src_path " ="
-.I pattern
-.IP
-Adjust source paths when capturing coverage data.
-
-Use this option in situations where geninfo cannot find the correct
-path to source code files of a project. By providing a
-.I pattern
-in Perl regular expression format (see
-.BR perlre (1))
-and an optional replacement string, you can instruct geninfo to
-remove or change parts of the incorrect source path.
-
-.B Example:
-.br
-
-1. When geninfo reports that it cannot find source file
-.br
-
-    /path/to/src/.libs/file.c
-.br
-
-while the file is actually located in
-.br
-
-    /path/to/src/file.c
-.br
-
-use the following parameter:
-.br
-
-    geninfo_adjust_src_path = /.libs
-
-This will remove all "/.libs" strings from the path.
-
-2. When geninfo reports that it cannot find source file
-.br
-
-    /tmp/build/file.c
-.br
-
-while the file is actually located in
-.br
-
-    /usr/src/file.c
-.br
-
-use the following parameter:
-.br
-
-    geninfo_adjust_src_path = /tmp/build => /usr/src
-.br
-
-This will change all "/tmp/build" strings in the path to "/usr/src".
-.PP
-
-.BR geninfo_auto_base " ="
-.IR 0 | 1
-.IP
-If non\-zero, apply a heuristic to determine the base directory when
-collecting coverage data.
-.br
-
-Use this option when using geninfo on projects built with libtool or
-similar build environments that work with multiple base directories,
-i.e. environments, where the current working directory when invoking the
-compiler ist not the same directory in which the source code file is
-located, and in addition, is different between files of the same project.
-.br
-
-Default is 1.
-.PP
-
-.BR lcov_gcov_dir " ="
-.I path_to_kernel_coverage_data
-.IP
-Specify the path to the directory where kernel coverage data can be found
-or leave undefined for auto-detection.
-.br
-
-Default is auto-detection.
-.PP
-
-.BR lcov_tmp_dir " ="
-.I temp
-.IP
-Specify the location of a directory used for temporary files.
-.br
-
-Default is '/tmp'.
-.PP
-
-.BR lcov_list_full_path " ="
-.IR 0 | 1
-.IP
-If non-zero, print the full path to source code files during a list operation.
-.br
-
-This option corresponds to the \-\-list\-full\-path option of
-.BR lcov .
-.br
-
-Default is 0.
-.PP
-
-.BR lcov_list_max_width " ="
-.IR width
-.IP
-Specify the maximum width for list output. This value is ignored when
-lcov_list_full_path is non\-zero.
-.br
-
-Default is 80.
-.PP
-
-.BR lcov_list_truncate_max
-.B " ="
-.IR percentage
-.IP
-Specify the maximum percentage of file names which may be truncated when
-choosing a directory prefix in list output. This value is ignored when
-lcov_list_full_path is non\-zero.
-.br
-
-Default is 20.
-.PP
-
-.BR lcov_function_coverage " ="
-.IR 0 | 1
-.IP
-Specify whether lcov should handle function coverage data.
-.br
-
-Setting this option to 0 can reduce memory and CPU time consumption
-when lcov is collecting and processing coverage data, as well as
-reduce the size of the resulting data files. Note that setting
-.B genhtml_function_coverage
-will override this option for HTML generation.
-.br
-
-Default is 1.
-.PP
-
-.BR lcov_branch_coverage " ="
-.IR 0 | 1
-.IP
-Specify whether lcov should handle branch coverage data.
-.br
-
-Setting this option to 0 can reduce memory and CPU time consumption
-when lcov is collecting and processing coverage data, as well as
-reduce the size of the resulting data files. Note that setting
-.B genhtml_branch_coverage
-will override this option for HTML generation.
-.br
-
-Default is 0.
-.PP
-
-.BR lcov_excl_line " ="
-.I expression
-.IP
-Specify the regular expression of lines to exclude.
-.br
-
-Default is 'LCOV_EXCL_LINE'.
-.PP
-
-.BR lcov_excl_br_line " ="
-.I expression
-.IP
-Specify the regular expression of lines to exclude from branch coverage.
-.br
-
-Default is 'LCOV_EXCL_BR_LINE'.
-.PP
-
-.SH FILES
-
-.TP
-.I /etc/lcovrc
-The system\-wide
-.B lcov
-configuration file.
-
-.TP
-.I ~/.lcovrc
-The individual per\-user configuration file.
-.PP
-
-.SH SEE ALSO
-.BR lcov (1),
-.BR genhtml (1),
-.BR geninfo (1),
-.BR gcov (1)
diff --git a/ThirdParty/lcov/rpm/lcov.spec b/ThirdParty/lcov/rpm/lcov.spec
deleted file mode 100644
index e96c8d47bd08ce9c2c185c0ac417f88b1e25e77f..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/rpm/lcov.spec
+++ /dev/null
@@ -1,59 +0,0 @@
-Summary: A graphical GCOV front-end
-Name: lcov
-Version: 1.14
-Release: 1
-License: GPLv2+
-Group: Development/Tools
-URL: http://ltp.sourceforge.net/coverage/lcov.php
-Source0: http://downloads.sourceforge.net/ltp/%{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildArch: noarch
-Requires: perl >= 5.8.8
-
-%description
-LCOV is a graphical front-end for GCC's coverage testing tool gcov. It collects
-gcov data for multiple source files and creates HTML pages containing the
-source code annotated with coverage information. It also adds overview pages
-for easy navigation within the file structure.
-
-%prep
-%setup -q -n %{name}-%{version}
-
-%build
-exit 0
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr CFG_DIR=/etc
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-/usr/bin/*
-/usr/share/man/man*/*
-%config /etc/*
-
-%changelog
-* Mon Aug 22 2016 Peter Oberparleiter (Peter.Oberparleiter@de.ibm.com)
-- updated "make install" call to work with PREFIX Makefile changes
-
-* Mon May 07 2012 Peter Oberparleiter (Peter.Oberparleiter@de.ibm.com)
-- added dependency on perl 5.8.8 for >>& open mode support
-
-* Wed Aug 13 2008 Peter Oberparleiter (Peter.Oberparleiter@de.ibm.com)
-- changed description + summary text
-
-* Mon Aug 20 2007 Peter Oberparleiter (Peter.Oberparleiter@de.ibm.com)
-- fixed "Copyright" tag
-
-* Mon Jul 14 2003 Peter Oberparleiter (Peter.Oberparleiter@de.ibm.com)
-- removed variables for version/release to support source rpm building
-- added initial rm command in install section
-
-* Mon Apr 7 2003 Peter Oberparleiter (Peter.Oberparleiter@de.ibm.com)
-- implemented variables for version/release
-
-* Fri Oct 18 2002 Peter Oberparleiter (Peter.Oberparleiter@de.ibm.com)
-- created initial spec file
diff --git a/ThirdParty/lcov/test/Makefile b/ThirdParty/lcov/test/Makefile
deleted file mode 100644
index ecb96042aab0bb2aa802cb9316323e2f384e7929..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-include common.mak
-
-TESTDIRS   := $(sort $(patsubst %/,%,$(dir $(wildcard */Makefile))))
-
-help: info
-
-info:
-	echo "Available make targets:"
-	echo "  test   : perform self-tests"
-	echo "  clean  : remove all temporary files"
-	echo ""
-	echo "Available make variables:"
-	echo "  SIZE   : specify size of test data (small, medium, large)"
-	echo "  V      : specify level of verbosity (0, 1, 2)"
-
-test:
-	for TEST in $(TESTDIRS) ; do \
-		make -C $$TEST test ; \
-	done
-
-clean:
-	rm -rf *.info *.counts test.log src/
-	for TEST in $(TESTDIRS) ; do \
-		make -C $$TEST clean ; \
-	done
-
-.PHONY: help info test clean
diff --git a/ThirdParty/lcov/test/bin/common b/ThirdParty/lcov/test/bin/common
deleted file mode 100644
index a8b527deda0567c093e3bceebe286ecbb4c8c6c6..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/bin/common
+++ /dev/null
@@ -1,103 +0,0 @@
-function elapsed_to_ms()
-{
-	local ELAPSED=$1
-	local IFS=:.
-	local MS
-
-	set -- $ELAPSED
-	if [ $# -eq 3 ] ; then
-		let MS=${3#0}*10+${2#0}*1000+$1*60000
-	else
-		let MS=${4#0}*10+${3#0}*1000+${2#0}*60000+$1*3600000
-	fi
-
-	echo $MS
-}
-
-function t_timestamp()
-{
-	date +"%Y-%m-%d %H:%M:%S %z"
-}
-
-function t_marker()
-{
-	echo
-	echo "======================================================================"
-}
-
-function t_detail()
-{
-	local KEY=$1
-	local VALUE=$2
-	local DOTS=" ............"
-
-	printf "%-.12s: %s\n" "$KEY$DOTS" "$VALUE"
-}
-
-function t_announce()
-{
-	local TESTNAME="$1"
-
-	printf "$BOLD%-.30s$RESET " "$TESTNAME .............................."
-	t_marker >> "$LOGFILE"
-	t_detail "DATE" "$(t_timestamp)" >> "$LOGFILE"
-	t_detail "TESTNAME" "$TESTNAME" >> "$LOGFILE"
-}
-
-function t_result()
-{
-	local COLOR="$1"
-	local TEXT="$2"
-
-	printf "[$COLOR$TEXT$RESET]"
-}
-
-function t_pass()
-{
-	local TESTNAME="$1"
-
-	t_result "$GREEN" "pass"
-	echo "pass $TESTNAME" >> "$COUNTFILE"
-}
-
-function t_fail()
-{
-	local TESTNAME="$1"
-
-	t_result "$RED" "fail"
-	echo "fail $TESTNAME" >> "$COUNTFILE"
-}
-
-function t_kill()
-{
-	local TESTNAME="$1"
-
-	t_result "$RED" "kill"
-	echo "fail $TESTNAME" >> "$COUNTFILE"
-}
-
-function t_skip()
-{
-	local TESTNAME="$1"
-
-	t_result "$BLUE" "skip"
-	echo "skip $TESTNAME" >> "$COUNTFILE"
-}
-
-function t_indent()
-{
-	sed -e 's/^/  /'
-}
-
-LOGFILE="$TOPDIR/test.log"
-COUNTFILE="$TOPDIR/test.counts"
-TIMEFILE="$TOPDIR/test.time"
-
-if [ -t 1 ] ; then
-	RED="\e[31m"
-	GREEN="\e[32m"
-	BLUE="\e[34m"
-	BOLD="\e[1m"
-	DEFAULT="\e[39m"
-	RESET="\e[0m"
-fi
diff --git a/ThirdParty/lcov/test/bin/mkinfo b/ThirdParty/lcov/test/bin/mkinfo
deleted file mode 100755
index 5231aeac5d12ce32f2230581a9741f354a19bdd1..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/bin/mkinfo
+++ /dev/null
@@ -1,952 +0,0 @@
-#!/usr/bin/env perl
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: mkinfo <config_file> [-o <output_dir>] [--seed <seed>]
-#               [<key>=<value>...]
-# 
-# Create a fake lcov code coverage data file and optionally the corresponding
-# source tree. DATA_FILE contains all specifications for creating the data
-# file. Directives can be overridden using KEY=VALUE specifications with KEY
-# being in the form SECTION.KEY. SEED specifies the number used to initialize
-# the pseudo random number generator.
-# 
-# Example:
-# mkinfo profiles/small -o src files.numfiles=12
-#
-
-use strict;
-use warnings;
-
-use Getopt::Long;
-use Cwd qw(abs_path getcwd);
-use File::Path qw(make_path);
-use File::Basename;
-use Data::Dumper;
-
-my $MAX_TAKEN	= 1000;
-my $use_colors	= -t STDIN;
-my $BOLD	= $use_colors ? "\033[1m" : "";
-my $RESET	= $use_colors ? "\033[0m" : "";
-
-sub usage()
-{
-	print(<<EOF)
-Usage: $0 <config_file> [-o <output_dir>] [--seed <seed>] [<key>=<value>...]
-
-Create a fake lcov code coverage data file and optionally the corresponding
-source tree. DATA_FILE contains all specifications for creating the data
-file. Directives can be overridden using KEY=VALUE specifications with KEY
-being in the form SECTION.KEY. SEED specifies the number used to initialize
-the pseudo random number generator.
- 
-Example:
-$0 profiles/small -o src files.numfiles=12
-EOF
-}
-
-sub read_config($)
-{
-	my ($filename) = @_;
-	my $fd;
-	my %config;
-	my $section;
-
-	open($fd, "<", $filename) or die("Could not open $filename: $!\n");
-	while (my $line = <$fd>) {
-		my ($key, $value);
-
-		$line =~ s/(^\s*|\s*$)//g;
-		next if ($line eq "" || $line =~ /^#/);
-		if ($line =~ /^\[\s*(\S+)\s*]$/) {
-			$section = $1;
-			next;
-		}
-		if ($line !~ /^(\S+)\s*=\s*(.*)$/) {
-			die("$filename:$.: Unknown line format: $line\n");
-		}
-		($key, $value) = ($1, $2);
-		if (!defined($section)) {
-			die("$filename:$.: Directive outside of section\n");
-		}
-		$config{$section}->{$1} = $2;
-	}
-	close($fd);
-
-	return \%config;
-}
-
-sub apply_config($$)
-{
-	my ($config, $directive) = @_;
-
-	for my $dir (@$directive) {
-		if ($dir !~ /^([^\.]+)\.([^=]+)=(.*)$/) {
-			die("Unknown directive format: $dir\n");
-		}
-		$config->{$1}->{$2} = $3;
-	}
-}
-
-sub get_value($$;$)
-{
-	my ($config, $dir, $default) = @_;
-	my ($section, $key, $value);
-
-	if ($dir !~ /^([^\.]+)\.([^=]+)$/) {
-		die("$0: Internal error: Unknown key format: $key\n");
-	}
-	($section, $key) = ($1, $2);
-
-	$value = $config->{$section}->{$key};
-
-	if (!defined($value)) {
-		if (!defined($default)) {
-			die("$0: Missing config value for $dir\n");
-		}
-		$value = $default;
-	}
-
-	return $value;
-}
-
-sub get_int($$;$$$)
-{
-	my ($config, $dir, $default, $min, $max) = @_;
-	my $value = get_value($config, $dir, $default);
-
-	if ($value !~ /^\d+$/) {
-		die("$0: Config value $dir must be an integer: $value\n");
-	}
-	$value = int($value);
-	if (defined($min) && $value < $min) {
-		die("$0: Config value $dir is too low (min $min): $value\n");
-	}
-	if (defined($max) && $value > $max) {
-		die("$0: Config value $dir is too high (max $max): $value\n");
-	}
-
-	return int($value);
-}
-
-sub get_list($$;$)
-{
-	my ($config, $dir, $default) = @_;
-	my $value = get_value($config, $dir, $default);
-	my @list = split(/\s+/, $value);
-
-	return \@list;
-}
-
-sub randlist($)
-{
-	my ($list) = @_;
-
-	return "" if (!@$list);
-	return $list->[int(rand(scalar(@$list)))];
-}
-
-sub randbool()
-{
-	return int(rand(2));
-}
-
-# Reduce LIST to PERCENTAGE of its former size.
-sub reduce_list_per($$)
-{
-	my ($list, $percentage) = @_;
-	my $remove;
-
-	$remove = int((100 - $percentage) * scalar(@$list) / 100);
-
-	for (my $i = 0; $i < $remove; $i++) {
-		splice(@$list, int(rand(scalar(@$list))), 1);
-	}
-}
-
-# Reduce LIST to NUM items.
-sub reduce_list_num($$)
-{
-	my ($list, $num) = @_;
-	my $remove;
-
-	$remove = scalar(@$list) - $num;
-
-	for (my $i = 0; $i < $remove; $i++) {
-		splice(@$list, int(rand(scalar(@$list))), 1);
-	}
-}
-
-sub _gen_filename($$)
-{
-	my ($c, $root) = @_;
-	my $ltop = get_list($c, "files.top", "");
-	my $lsub = get_list($c, "files.sub", "");
-	my $lsubsub = get_list($c, "files.subsub", "");
-	my $lprefix = get_list($c, "files.prefix");
-	my $lsuffix = get_list($c, "files.suffix", "");
-	my $lext = get_list($c, "files.ext");
-	my ($top, $sub, $subsub, $prefix, $suffix, $ext) =
-		("", "", "", "", "", "");
-	my $filename = "";
-
-	$top = randlist($ltop) if (randbool());
-	$sub = randlist($lsub) if (randbool());
-	$subsub = randlist($lsubsub) if (randbool());
-	$prefix = randlist($lprefix);
-	$suffix = randlist($lsuffix) if (randbool());
-	$ext = randlist($lext);
-
-	$filename = $root;
-	$filename .= "/".$top if ($top ne "");
-	$filename .= "/".$sub if ($sub ne "");
-	$filename .= "/".$subsub if ($subsub ne "");
-	$filename .= "/".$prefix;
-	$filename .= "_".$suffix if ($suffix ne "");
-	$filename .= $ext;
-	$filename =~ s#^//#/#;
-
-	return $filename;
-}
-
-sub gen_filename($$$)
-{
-	my ($c, $root, $filenames) = @_;
-	my $filename;
-
-	do {
-		$filename = _gen_filename($c, $root);
-	} while ($filenames->{$filename});
-	$filenames->{$filename} = 1;
-
-	return $filename;
-}
-
-sub gen_lines($$)
-{
-	my ($c, $length) = @_;
-	my @lines = 1 .. $length;
-	my $percent = get_int($c, "lines.instrumented", undef, 0, 100);
-
-	reduce_list_per(\@lines, $percent);
-
-	return \@lines;
-}
-
-sub gen_fnname($$)
-{
-	my ($c, $hash) = @_;
-	my $lverb = get_list($c, "functions.verb");
-	my $ladj = get_list($c, "functions.adj", "");
-	my $lnoun = get_list($c, "functions.noun", "");
-	my ($verb, $adj, $noun) = ("", "", "");
-	my $fnname;
-
-	$verb = randlist($lverb);
-	$adj = randlist($ladj) if (randbool());
-	$noun = randlist($lnoun) if (randbool());
-
-	$fnname = $verb;
-	$fnname .= "_".$adj if ($adj ne "");
-	$fnname .= "_".$noun if ($noun ne "");
-
-	if (exists($hash->{$fnname})) {
-		my $i = 2;
-
-		while (exists($hash->{$fnname.$i})) {
-			$i++;
-		}
-		$fnname .= $i;
-	}
-	$hash->{$fnname} = 1;
-
-	return $fnname;
-}
-
-sub gen_functions($$)
-{
-	my ($c, $lines) = @_;
-	my @fnlines;
-	my @functions;
-	my %names;
-	my $percent = get_int($c, "functions.perinstrumented", undef, 0, 100);
-
-	@fnlines = @$lines;
-	reduce_list_per(\@fnlines, $percent);
-
-	foreach my $fnline (@fnlines) {
-		push(@functions, [ $fnline, gen_fnname($c, \%names) ]);
-	}
-
-	return \@functions;
-}
-
-
-# Returns a value distribution object. This object can be used to randomly
-# choose one element from a list of elements with a given relative distribution.
-#
-# dist: [ sumprob, probs]
-# sumprob: Sum of all probabilities
-# probs: [ prob1, prob2, ... ]
-# prob: [ num, x ]
-# num: Value
-sub get_dist($$;$)
-{
-	my ($c, $dir, $default) = @_;
-	my $list = get_list($c, $dir, $default);
-	my $sumprob = 0;
-	my @probs;
-
-	foreach my $spec (@$list) {
-		my ($n, $p);
-
-		if ($spec =~ /^(\d+):(\d+)$/) {
-			($n, $p) = ($1, $2);
-		} elsif ($spec =~ /^(\d+)$/) {
-			$n = $1;
-			$p = 1;
-		} else {
-			die("$0: Config value $dir must be a distribution ".
-			    "list (a:p1 b:p2 ...)\n");
-		}
-		$sumprob += $p;
-		push(@probs, [ $n, $sumprob ]);
-	}
-
-	return [ $sumprob, \@probs ];
-}
-
-sub rand_dist($)
-{
-	my ($dist) = @_;
-	my ($sumprob, $probs) = @$dist;
-	my $r = int(rand($sumprob));
-
-	foreach my $prob (@$probs) {
-		my ($num, $x) = @$prob;
-		return $num if ($r < $x);
-	}
-
-	die("Internal error: Incomplete distribution list\n");
-}
-
-sub gen_branches($$)
-{
-	my ($c, $lines) = @_;
-	my $percent = get_int($c, "branches.perinstrumented", undef, 0, 100);
-	my @allblocks = @{get_list($c, "branches.blocks", "0")};
-	my $branchdist = get_dist($c, "branches.branchdist", "2");
-	my @brlines;
-	my @branches;
-
-	@brlines = @$lines;
-	reduce_list_per(\@brlines, $percent);
-
-	foreach my $brline (@brlines) {
-		my @blocks = @allblocks;
-		my $numblocks = int(rand(scalar(@blocks))) + 1;
-
-		reduce_list_num(\@blocks, $numblocks);
-
-		foreach my $block (@blocks) {
-			my $numbranch = rand_dist($branchdist);
-
-			for (my $branch = 0; $branch < $numbranch; $branch++) {
-				push(@branches, [ $brline, $block, $branch]);
-			}
-		}
-	}
-
-	return \@branches;
-}
-
-sub gen_filesrc($)
-{
-	my ($c) = @_;
-	my ($length, $lines, $functions, $branches);
-	my $do_ln = get_int($c, "lines.enabled");
-	my $do_fn = get_int($c, "functions.enabled");
-	my $do_br = get_int($c, "branches.enabled");
-
-	$length		= 1 + int(rand(get_int($c, "lines.maxlines")));
-	$lines		= gen_lines($c, $length);
-	$functions	= gen_functions($c, $lines) if ($do_fn);
-	$branches	= gen_branches($c, $lines) if ($do_br);
-
-	return [ $length, $lines, $functions, $branches ];
-}
-
-# Generate fake source tree.
-#
-# returns:	[ files, numlns, numfns, numbrs ]
-# files:	filename -> filesrc
-# filesrc:	[ length, lines, functions, branches ]
-# length:	Total number of lines in file
-#
-# lines:	[ line1, line2, ... ]
-#
-# functions:	[ fn1, fn2, ... ]
-# fn:		[ fnline, fnname ]
-# fnline:	Starting line of function
-# fnname:	Function name
-#
-# branches:	[ brdata1, brdata2, ...]
-# brdata:	[ brline, block, branch ]
-# brline:	Line number containing branches
-# block:	Block ID
-# branch:	Branch ID
-#
-sub gen_src($$)
-{
-	my ($c, $root) = @_;
-	my %files;
-	my $numfiles = get_int($c, "files.numfiles");
-	my %filenames;
-	my ($numlns, $numfns, $numbrs) = (0, 0, 0);
-
-	for (my $i = 0; $i < $numfiles; $i++) {
-		my $filename = gen_filename($c, $root, \%filenames);
-		my $filesrc = gen_filesrc($c);
-
-		$files{$filename} = $filesrc;
-		$numlns += scalar(@{$filesrc->[1]}) if (defined($filesrc->[1]));
-		$numfns += scalar(@{$filesrc->[2]}) if (defined($filesrc->[2]));
-		$numbrs += scalar(@{$filesrc->[3]}) if (defined($filesrc->[3]));
-	}
-
-	return [ \%files, $numlns, $numfns, $numbrs ];
-}
-
-sub write_src($)
-{
-	my ($src) = @_;
-	my ($files, $numlns, $numfns, $numbrs) = @$src;
-
-	foreach my $filename (sort(keys(%{$files}))) {
-		my $filesrc = $files->{$filename};
-		my $length = $filesrc->[0];
-		my $dir = dirname($filename);
-		my $fd;
-
-		if (!-d $dir) {
-			make_path($dir) or
-				die("Could not create directory $dir\n");
-		}
-
-		open($fd, ">", $filename) or
-			die("Could not create file $filename: $!\n");
-		for (my $i = 0; $i < $length; $i++) {
-			print($fd "\n");
-		}
-		close($fd);
-	}
-}
-
-sub write_branches($$$$)
-{
-	my ($fd, $branches, $brhits, $iref) = @_;
-	my ($found, $hit) = (0, 0);
-
-	# Line coverage data
-	foreach my $brdata (@$branches) {
-		my $brhit = $brhits->[$$iref++];
-		my ($brline, $block, $branch) = @$brdata;
-
-		$found++;
-		$hit++ if ($brhit ne "-" && $brhit > 0);
-		print($fd "BRDA:$brline,$block,$branch,$brhit\n");
-	}
-	if ($found > 0) {
-		print($fd "BRF:$found\n");
-		print($fd "BRH:$hit\n");
-	}
-}
-
-sub write_lines($$$$)
-{
-	my ($fd, $lines, $lnhist, $iref) = @_;
-	my ($found, $hit) = (0, 0);
-
-	# Line coverage data
-	foreach my $line (@$lines) {
-		my $lnhit = $lnhist->[$$iref++];
-
-		$found++;
-		$hit++ if ($lnhit > 0);
-		print($fd "DA:$line,$lnhit\n");
-	}
-	print($fd "LF:$found\n");
-	print($fd "LH:$hit\n");
-}
-
-sub write_functions($$$$)
-{
-	my ($fd, $functions, $fnhits, $iref) = @_;
-	my ($found, $hit) = (0, 0);
-
-	# Function coverage data
-	foreach my $fn (@$functions) {
-		my ($fnline, $fnname) = @$fn;
-
-		print($fd "FN:$fnline,$fnname\n");
-	}
-	foreach my $fn (@$functions) {
-		my ($fnline, $fnname) = @$fn;
-		my $fnhit = $fnhits->[$$iref++];
-
-		$found++;
-		$hit++ if ($fnhit > 0);
-		print($fd "FNDA:$fnhit,$fnname\n");
-	}
-	print($fd "FNF:$found\n");
-	print($fd "FNH:$hit\n");
-}
-
-sub write_filesrc($$$$$)
-{
-	my ($c, $fd, $filesrc, $hits, $iter) = @_;
-	my ($length, $lines, $functions, $branches) = @$filesrc;
-	my $do_ln = get_int($c, "lines.enabled");
-	my $do_fn = get_int($c, "functions.enabled");
-	my $do_br = get_int($c, "branches.enabled");
-
-	write_functions($fd, $functions, $hits->[1], \$iter->[1]) if ($do_fn);
-	write_branches($fd, $branches, $hits->[2], \$iter->[2]) if ($do_br);
-	write_lines($fd, $lines, $hits->[0], \$iter->[0]) if ($do_ln);
-}
-
-sub write_info($$$$)
-{
-	my ($c, $filename, $src, $hits) = @_;
-	my $files = $src->[0];
-	my $fd;
-	my %iters;
-
-	foreach my $testname (keys(%{$hits})) {
-		$iters{$testname} = [ 0, 0, 0 ];
-	}
-
-	open($fd, ">", $filename) or die("Could not create $filename: $!\n");
-
-	foreach my $filename (sort(keys(%{$files}))) {
-		my $filesrc = $files->{$filename};
-
-		foreach my $testname (sort(keys(%{$hits}))) {
-			my $testhits = $hits->{$testname};
-			my $iter = $iters{$testname};
-
-			print($fd "TN:$testname\n");
-			print($fd "SF:$filename\n");
-
-			write_filesrc($c, $fd, $filesrc, $testhits, $iter);
-
-			print($fd "end_of_record\n");
-		}
-	}
-
-	close($fd);
-}
-
-sub get_hit_found($)
-{
-	my ($list) = @_;
-	my ($hit, $found) = (0, 0);
-
-	foreach my $e (@$list) {
-		$hit++ if ($e ne "-" && $e > 0);
-		$found++;
-	}
-	return ($hit, $found);
-}
-
-sub write_counts($$)
-{
-	my ($filename, $hits) = @_;
-	my $fd;
-	my (@tlnhits, @tfnhits, @tbrhits);
-
-	foreach my $testname (keys(%{$hits})) {
-		my $testhits = $hits->{$testname};
-		my ($lnhits, $fnhits, $brhits) = @$testhits;
-
-		for (my $i = 0; $i < scalar(@$lnhits); $i++) {
-			$tlnhits[$i] += $lnhits->[$i];
-		}
-		for (my $i = 0; $i < scalar(@$fnhits); $i++) {
-			$tfnhits[$i] += $fnhits->[$i];
-		}
-		for (my $i = 0; $i < scalar(@$brhits); $i++) {
-			my $h = $brhits->[$i];
-
-			$h = 0 if ($h eq "-");
-			$tbrhits[$i] += $h;
-		}
-	}
-
-	open($fd, ">", $filename) or die("Could not create $filename: $!\n");
-	print($fd join(" ", get_hit_found(\@tlnhits), get_hit_found(\@tfnhits),
-			    get_hit_found(\@tbrhits))."\n");
-	close($fd);
-}
-
-# A branch hit value for a block that was not hit must be "-". A branch hit
-# value for a block that was hit cannot be "-", but must be "0" if not hit.
-sub sanitize_brhits($)
-{
-	my ($brhits) = @_;
-	my $block_hit = 0;
-
-	foreach my $brhit_ref (@$brhits) {
-		if ($$brhit_ref ne "-" && $$brhit_ref > 0) {
-			$block_hit = 1;
-			last;
-		}
-	}
-	foreach my $brhit_ref (@$brhits) {
-		if (!$block_hit) {
-			$$brhit_ref = "-";
-		} elsif ($$brhit_ref eq "-") {
-			$$brhit_ref = 0;
-		}
-	}
-}
-
-# Ensure coverage rate interdependencies are met
-sub sanitize_hits($$)
-{
-	my ($src, $hits) = @_;
-	my $files = $src->[0];
-
-	foreach my $hits (values(%{$hits})) {
-		my $brhits = $hits->[2];
-		my $i = 0;
-
-		foreach my $filename (sort(keys(%{$files}))) {
-			my $filesrc = $files->{$filename};
-			my $branches = $filesrc->[3];
-			my $lastblock;
-			my $lastline;
-			my @blist;
-
-			foreach my $brdata (@$branches) {
-				my ($brline, $block, $branch) = @$brdata;
-
-				if (!defined($lastblock) ||
-				    $block != $lastblock ||
-				    $brline != $lastline) {
-					sanitize_brhits(\@blist);
-					@blist = ();
-					$lastblock = $block;
-					$lastline = $brline;
-				}
-				push(@blist, \$brhits->[$i++]);
-			}
-			sanitize_brhits(\@blist);
-		}
-	}
-}
-
-# Generate random coverage data
-#
-# returns:	testname -> testhits
-# testhits:	[ lnhits, fnhits, brhits ]
-# lnhits:	[ ln1hit, ln2hit, ... ]
-# lnhit:	Number of times a line was hit by a specific test
-# fnhits:	[ fn1hit, fn2hit, ... ]
-# fnhit:	Number of times a function was hit by a specific test
-# brhits:	[ br1hit, br2hit, ... ]
-# brhit:	Number of times a branch was hit by a specific test
-sub gen_hits($$)
-{
-	my ($c, $src) = @_;
-	my (@lnhits, @fnhits, @brhits);
-	my ($files, $numlns, $numfns, $numbrs) = @$src;
-	my $testnames = get_list($c, "tests.names", "");
-	my %hits;
-
-	$testnames = [ "" ] if (!@$testnames);
-
-	foreach my $testname (@$testnames) {
-		my (@lnhits, @fnhits, @brhits);
-
-		for (my $i = 0; $i < $numlns; $i++) {
-			push(@lnhits, 1 + int(rand($MAX_TAKEN)));
-		}
-
-		for (my $i = 0; $i < $numfns; $i++) {
-			push(@fnhits, 1 + int(rand($MAX_TAKEN)));
-		}
-
-		for (my $i = 0; $i < $numbrs; $i++) {
-			push(@brhits, 1 + int(rand($MAX_TAKEN)));
-		}
-
-		$hits{$testname} = [ \@lnhits, \@fnhits, \@brhits ];
-	}
-
-	sanitize_hits($src, \%hits);
-
-	return \%hits;
-}
-
-# Return a hash containing RATE percent of indices [0..NUM-1].
-sub gen_filter($$)
-{
-	my ($num, $rate) = @_;
-	my @list = (0 .. ($num - 1));
-	my %hash;
-
-	reduce_list_per(\@list, $rate);
-	foreach my $i (@list) {
-		$hash{$i} = 1;
-	}
-
-	return \%hash;
-}
-
-# Zero all entries in LIST identified by the indices in FILTER.
-sub zero_by_filter($$)
-{
-	my ($list, $filter) = @_;
-
-	foreach my $i (keys(%{$filter})) {
-		$list->[$i] = 0;
-	}
-}
-
-# Add a random number of indices between [0..NUM-1] to FILTER.
-sub widen_filter($$)
-{
-	my ($filter, $num) = @_;
-	my @list;
-
-	for (my $i = 0; $i < $num; $i++) {
-		push(@list, $i) if (!exists($filter->{$i}));
-	}
-	reduce_list_per(\@list, int(rand(101)));
-
-	foreach my $i (@list) {
-		$filter->{$i} = 1;
-	}
-}
-
-# Zero coverage data in HITS until the combined coverage rates reach the
-# specified RATEs.
-sub reduce_hits($$$$$)
-{
-	my ($src, $hits, $lnrate, $fnrate, $brrate) = @_;
-	my ($files, $numlns, $numfns, $numbrs) = @$src;
-	my ($lnfilter, $fnfilter, $brfilter);
-
-	$lnfilter = gen_filter($numlns, 100 - $lnrate);
-	$fnfilter = gen_filter($numfns, 100 - $fnrate);
-	$brfilter = gen_filter($numbrs, 100 - $brrate);
-
-	foreach my $testhits (values(%{$hits})) {
-		my ($lnhits, $fnhits, $brhits) = @$testhits;
-
-		zero_by_filter($lnhits, $lnfilter);
-		zero_by_filter($fnhits, $fnfilter);
-		zero_by_filter($brhits, $brfilter);
-
-		# Provide some variation between tests
-		widen_filter($lnfilter, $numlns);
-		widen_filter($fnfilter, $numfns);
-		widen_filter($brfilter, $numbrs);
-	}
-
-	sanitize_hits($src, $hits);
-}
-
-sub zero_list($)
-{
-	my ($list) = @_;
-
-	foreach my $i (@$list) {
-		$i = 0;
-	}
-}
-
-# Zero all coverage in HITS.
-sub zero_hits($$)
-{
-	my ($src, $hits) = @_;
-
-	foreach my $testhits (values(%{$hits})) {
-		my ($lnhits, $fnhits, $brhits) = @$testhits;
-
-		zero_list($lnhits);
-		zero_list($fnhits);
-		zero_list($brhits);
-	}
-
-	sanitize_hits($src, $hits);
-}
-
-# Distribute items from LIST to A and B depending on whether the index for
-# an item is found in FILTER.
-sub split_by_filter($$$$)
-{
-	my ($list, $filter, $a, $b) = @_;
-
-	for (my $i = 0; $i < scalar(@$list); $i++) {
-		if (exists($filter->{$i})) {
-			push(@$a, $list->[$i]);
-			push(@$b, 0);
-		} else {
-			push(@$a, 0);
-			push(@$b, $list->[$i]);
-		}
-	}
-}
-
-sub split_hits($$$)
-{
-	my ($c, $src, $hits) = @_;
-	my ($files, $numlns, $numfns, $numbrs) = @$src;
-	my ($lnsplit, $fnsplit, $brsplit);
-	my (%a, %b);
-
-	$lnsplit = gen_filter($numlns, int(rand(101)));
-	$fnsplit = gen_filter($numfns, int(rand(101)));
-	$brsplit = gen_filter($numbrs, int(rand(101)));
-
-	foreach my $testname (keys(%{$hits})) {
-		my $testhits = $hits->{$testname};
-		my ($lnhits, $fnhits, $brhits) = @$testhits;
-		my (@lnhitsa, @fnhitsa, @brhitsa);
-		my (@lnhitsb, @fnhitsb, @brhitsb);
-
-		split_by_filter($lnhits, $lnsplit, \@lnhitsa, \@lnhitsb);
-		split_by_filter($fnhits, $fnsplit, \@fnhitsa, \@fnhitsb);
-		split_by_filter($brhits, $brsplit, \@brhitsa, \@brhitsb);
-
-		$a{$testname} = [ \@lnhitsa, \@fnhitsa, \@brhitsa ];
-		$b{$testname} = [ \@lnhitsb, \@fnhitsb, \@brhitsb ];
-	}
-
-	sanitize_hits($src, \%a);
-	sanitize_hits($src, \%b);
-
-	return (\%a, \%b);
-}
-
-sub plural($$$)
-{
-	my ($num, $sing, $plur) = @_;
-
-	return $num <= 1 ? $sing : $plur;
-}
-
-sub print_intro($)
-{
-	my ($c) = @_;
-	my $numtests = scalar(@{get_list($c, "tests.names")});
-	my $numfiles = get_int($c, "files.numfiles");
-
-	$numtests = 1 if ($numtests < 1);
-
-	print($BOLD."Creating coverage files ($numtests ".
-	      plural($numtests, "test", "tests").", $numfiles ".
-	      plural($numfiles, "source file", "source files").")\n".$RESET);
-}
-
-sub main()
-{
-	my $opt_help;
-	my $opt_output;
-	my $opt_configfile;
-	my $opt_seed = 0;
-	my $c;
-	my $src;
-	my $hits;
-	my $root;
-	my $enum;
-	my ($a, $b);
-
-	# Parse options
-	if (!GetOptions("output|o=s" => \$opt_output,
-			"seed=s" => \$opt_seed,
-			"help|h" => \$opt_help,
-	)) {
-		print(STDERR "Use $0 --help to get usage information\n");
-		exit(2);
-	}
-
-	if ($opt_help) {
-		usage();
-		exit(0);
-	}
-
-	$opt_configfile = shift(@ARGV);
-	if (!defined($opt_configfile)) {
-		print(STDERR "Please specify a config file\n");
-		exit(2);
-	}
-
-	if (defined($opt_output)) {
-		if (! -d $opt_output) {
-			mkdir($opt_output) or
-				die("$0: Could not create directory ".
-				    "$opt_output: $!\n");
-		}
-		$root = abs_path($opt_output)
-	} else {
-		$root = "/";
-	}
-
-	srand($opt_seed);
-
-	# Get config
-	$c = read_config($opt_configfile);
-	apply_config($c, \@ARGV) if (@ARGV);
-
-	print_intro($c);
-	# Show lines on STDOUT without newline
-	$| = 1;
-
-	# Create source tree
-	print("  Source tree ......... ");
-	$src = gen_src($c, $root);
-	# Write out source code if requested
-	write_src($src) if (defined($opt_output));
-	print("done (");
-	print($src->[1]." lines, ");
-	print($src->[2]." functions, ");
-	print($src->[3]." branches)\n");
-
-	# Write out full-coverage data files
-	print("  Full coverage ....... ");
-	$hits = gen_hits($c, $src);
-	write_info($c, "full.info", $src, $hits);
-	write_counts("full.counts", $hits);
-	print("done\n");
-
-	# Write out data files with target coverage rates
-	print("  Target coverage ..... ");
-	reduce_hits($src, $hits, get_int($c, "lines.covered"),
-				 get_int($c, "functions.covered"),
-				 get_int($c, "branches.covered"));
-	write_info($c, "target.info", $src, $hits);
-	write_counts("target.counts", $hits);
-	print("done\n");
-
-	# Write out partial data files
-	print("  Partial coverage .... ");
-	($a, $b) = split_hits($c, $src, $hits);
-	write_info($c, "part1.info", $src, $a);
-	write_counts("part1.counts", $a);
-	write_info($c, "part2.info", $src, $b);
-	write_counts("part2.counts", $b);
-	print("done\n");
-
-	# Write out zero-coverage data files
-	print("  Zero coverage ....... ");
-	zero_hits($src, $hits);
-	write_info($c, "zero.info", $src, $hits);
-	write_counts("zero.counts", $hits);
-	print("done\n");
-}
-
-main();
-exit(0);
diff --git a/ThirdParty/lcov/test/bin/norminfo b/ThirdParty/lcov/test/bin/norminfo
deleted file mode 100755
index 9fe0ef2f00dfc7771e9eb636b931f3f41f1ffec4..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/bin/norminfo
+++ /dev/null
@@ -1,243 +0,0 @@
-#!/usr/bin/env perl
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: norminfo <coverage-data-file> [<multiplier>]
-#
-# Normalize coverage data file (ensure stable order), perform some sanity
-# checks, and apply optional multiplier to execution counts.
-#
-
-use strict;
-use warnings;
-
-sub ferr($$$)
-{
-	my ($pos, $filename, $msg) = @_;
-
-	if (defined($pos)) {
-		$pos .= ":";
-	} else {
-		$pos = "";
-	}
-
-	die("$0:$filename:$pos $msg");
-}
-
-sub print_sorted($$$)
-{
-	my ($fd, $info, $multi) = @_;
-	my (%fn, %fns, %fnda, %brda, %da);
-	my ($fnf, $fnh, $brf, $brh, $lf, $lh);
-
-	while (my $line = <$fd>) {
-		$line =~ s/(^\s*|\s*$)//g;
-
-		if ($line =~ /^end_of_record$/) {
-			last;
-		} elsif ($line =~ /^FN:(\d+),(.*)$/) {
-			my ($lineno, $fnname) = ($1, $2);
-
-			if (exists($fn{$lineno})) {
-				ferr($., $info, "Duplicate FN: entry\n");
-			}
-			$fn{$lineno} = $fnname;
-			if (exists($fns{$fnname})) {
-				ferr($., $info, "Duplicate function name\n");
-			}
-			$fns{$fnname} = $lineno;
-		} elsif ($line =~ /^FNDA:(\d+),(.*)$/) {
-			my ($count, $fnname) = ($1, $2);
-
-			if (exists($fnda{$fnname})) {
-				ferr($., $info, "Duplicate FNDA: entry\n");
-			}
-			$fnda{$fnname} = int($count * $multi);
-		} elsif ($line =~ /^FNF:(\d+)$/) {
-			if (defined($fnf)) {
-				ferr($., $info, "Duplicate FNF: entry\n");
-			}
-			$fnf = $1;
-		} elsif ($line =~ /^FNH:(\d+)$/) {
-			if (defined($fnh)) {
-				ferr($., $info, "Duplicate FNH: entry\n");
-			}
-			$fnh = $1;
-		} elsif ($line =~ /^BRDA:(\d+),(\d+),(\d+),(\d+|-)$/) {
-			my ($lineno, $block, $branch, $count) = ($1, $2, $3, $4);
-
-			if (exists($brda{$lineno}->{$block}->{$branch})) {
-				ferr($., $info, "Duplicate BRDA: entry\n");
-			}
-			$count = int($count * $multi) if ($count ne "-");
-			$brda{$lineno}->{$block}->{$branch} = $count;
-
-		} elsif ($line =~ /^BRF:(\d+)$/) {
-			if (defined($brf)) {
-				ferr($., $info, "Duplicate BRF: entry\n");
-			}
-			$brf = $1;
-		} elsif ($line =~ /^BRH:(\d+)$/) {
-			if (defined($brh)) {
-				ferr($., $info, "Duplicate BRH: entry\n");
-			}
-			$brh = $1;
-		} elsif ($line =~ /^DA:(\d+),(\d+)$/) {
-			my ($lineno, $count) = ($1, $2);
-
-			if (exists($da{$lineno})) {
-				ferr($., $info, "Duplicate FNDA: entry\n");
-			}
-			$da{$lineno} = int($count * $multi);
-		} elsif ($line =~ /^LF:(\d+)$/) {
-			if (defined($lf)) {
-				ferr($., $info, "Duplicate LF: entry\n");
-			}
-			$lf = $1;
-		} elsif ($line =~ /^LH:(\d+)$/) {
-			if (defined($lh)) {
-				ferr($., $info, "Duplicate LH: entry\n");
-			}
-			$lh = $1;
-		} else {
-			ferr($., $info, "Unknown line: $line\n");
-		}
-	}
-
-	# FN:<line>,<fnname>
-	foreach my $lineno (sort({ $a <=> $b } keys(%fn))) {
-		my $fnname = $fn{$lineno};
-		print("FN:$lineno,$fnname\n");
-	}
-
-	# FNDA:<counts>,<fnname>
-	foreach my $fnname (keys(%fnda)) {
-		if (!exists($fns{$fnname})) {
-			ferr(undef, $info, "FNDA entry without FN: $fnname\n");
-		}
-	}
-	foreach my $fnname (sort({ $fns{$a} <=> $fns{$b} } keys(%fnda))) {
-		my $count = $fnda{$fnname};
-		print("FNDA:$count,$fnname\n");
-	}
-	# FNF:<counts>
-	print("FNF:$fnf\n") if (defined($fnf));
-	# FNH:<counts>
-	if (defined($fnh)) {
-		$fnh = 0 if ($multi == 0);
-		print("FNH:$fnh\n");
-	}
-	# BRDA:<line>,<block>,<branch>,<count>
-	foreach my $lineno (sort({ $a <=> $b } keys(%brda))) {
-		my $blocks = $brda{$lineno};
-
-		foreach my $block (sort({ $a <=> $b } keys(%{$blocks}))) {
-			my $branches = $blocks->{$block};
-
-			foreach my $branch (sort({ $a <=> $b }
-					    keys(%{$branches}))) {
-				my $count = $branches->{$branch};
-
-				$count = "-" if ($multi == 0);
-				print("BRDA:$lineno,$block,$branch,$count\n");
-			}
-		}
-
-	}
-	# BRF:<counts>
-	print("BRF:$brf\n") if (defined($brf));
-	# BRH:<counts>
-	if (defined($brh)) {
-		$brh = 0 if ($multi == 0);
-		print("BRH:$brh\n");
-	}
-	# DA:<line>,<counts>
-	foreach my $lineno (sort({ $a <=> $b } keys(%da))) {
-		my $count = $da{$lineno};
-
-		print("DA:$lineno,$count\n");
-	}
-	# LF:<counts>
-	print("LF:$lf\n") if (defined($lf));
-	# LH:<count>
-	if (defined($lh)) {
-		$lh = 0 if ($multi == 0);
-		print("LH:$lh\n");
-	}
-}
-
-sub main()
-{
-	my $infofile = $ARGV[0];
-	my $multi = $ARGV[1];
-	# info: testname -> files
-	# files: infofile -> data
-	# data: [ starting offset, starting line ]
-	my %info;
-	my $fd;
-	my $tn = "";
-	my %allfiles;
-
-	$multi = 1 if (!defined($multi));
-	if (!defined($infofile)) {
-		$infofile = "standard input";
-		warn("$0: Reading data from standard input\n");
-		open($fd, "<&STDIN") or
-			die("$0: Could not duplicated stdin: $!\n");
-	} else {
-		open($fd, "<", $infofile) or
-			die("$0: Could not open $infofile: $!\n");
-	}
-
-	# Register starting positions of data sets
-	while (my $line = <$fd>) {
-		if ($line =~ /^TN:(.*)$/) {
-			$tn = $1;
-		} elsif ($line =~ /^SF:(.*)$/) {
-			my $sf = $1;
-			my $pos = tell($fd);
-
-			die("$0: Could not get file position: $!\n")
-				if ($pos == -1);
-			if (exists($info{$tn}->{$sf})) {
-				ferr($., $infofile,
-				     "Duplicate entry for $tn:$sf\n");
-			}
-			$info{$tn}->{$sf} = [ $pos, $. ];
-			$allfiles{$sf} = 1;
-		}
-	}
-
-	# Print data sets in normalized order
-	foreach my $filename (sort(keys(%allfiles))) {
-		foreach my $testname (sort(keys(%info))) {
-			my $pos = $info{$testname}->{$filename};
-			my ($cpos, $lpos) = @$pos;
-
-			next if (!defined($pos));
-
-			if (seek($fd, $cpos, 0) != 1) {
-				die("$0: Could not seek in $infofile: $!\n");
-			}
-			printf("TN:$testname\n");
-			printf("SF:$filename\n");
-
-			$. = $lpos;
-			print_sorted($fd, $infofile, $multi);
-
-			printf("end_of_record\n");
-
-		}
-	}
-	foreach my $testname (sort(keys(%info))) {
-		my $files = $info{$testname};
-
-		foreach my $filename (sort(keys(%{$files}))) {
-		}
-	}
-
-	close($fd);
-}
-
-main();
-exit(0);
diff --git a/ThirdParty/lcov/test/bin/test_run b/ThirdParty/lcov/test/bin/test_run
deleted file mode 100755
index 23e69d0f4e9534b424f9a2ecdf1ae712d1ff38df..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/bin/test_run
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: test_run <testname> <cmdline>
-#
-# Announce a test case, run it, and record the resulting output in the
-# test log file. Must be run after testsuite_init.
-#
-
-TOPDIR=$(realpath $(dirname $0)/..) && source "$TOPDIR/bin/common"
-EXCERPTLEN=10
-TESTNAME="$1"
-shift
-
-TIME=$(which time 2>/dev/null)
-if [ ! -z "$TIME" ] ; then
-	TIME="$TIME -v -o $TIMEFILE"
-	if ! $TIME true 2>/dev/null ; then
-		TIME=""
-	fi
-fi
-
-t_announce "$TESTNAME"
-
-let POS=$(stat -c %s "$LOGFILE")+1
-
-t_detail "COMMAND" "\"$*\"" >>"$LOGFILE"
-t_detail "OUTPUT" "" >>"$LOGFILE"
-
-# Run command
-$TIME bash -c "$*" 2>&1 | t_indent >>"$LOGFILE"
-RC=$?
-
-# Evaluate output of time command
-ELAPSED=
-RESIDENT=
-SIGNAL=
-if [ ! -z "$TIME" ] ; then
-	while read LINE ; do
-		case "$LINE" in
-		"Command terminated by signal"*) SIGNAL=${LINE##* } ;;
-		"Elapsed"*) ELAPSED=$(elapsed_to_ms ${LINE##* }) ;;
-		"Maximum resident"*) RESIDENT=${LINE##* } ;;
-		"Exit status"*) RC=${LINE##* } ;;
-		esac
-	done < "$TIMEFILE"
-	rm -f "$TIMEFILE"
-fi
-
-t_detail "EXITCODE" "$RC" >>"$LOGFILE"
-
-# Show result
-if [ $RC -eq 0 -a -z "$SIGNAL" ] ; then
-	RESULT="pass"
-	t_pass "$TESTNAME"
-else
-	if [ -z "$SIGNAL" ] ; then
-		RESULT="fail"
-		t_fail "$TESTNAME"
-	else
-		RESULT="kill"
-		t_kill "$TESTNAME"
-	fi
-fi
-
-if [ ! -z "$SIGNAL" ] ; then
-	t_detail "SIGNAL" "$SIGNAL" >>"$LOGFILE"
-fi
-
-if [ ! -z "$ELAPSED" ] ; then
-	echo -n " (time $(($ELAPSED/1000)).$(($ELAPSED%1000/100))s, "
-	echo "elapsed $TESTNAME $ELAPSED" >> "$COUNTFILE"
-fi
-
-if [ ! -z "$RESIDENT" ] ; then
-	echo -n "mem $(($RESIDENT/1024)).$((($RESIDENT%1024)/100))MB)"
-	echo "resident $TESTNAME $RESIDENT" >> "$COUNTFILE"
-fi
-
-echo
-
-# Show log excerpt on failure or if requested
-if [ $RC -ne 0 -o "$V" == "1" ] ; then
-	LEN=$(tail -c "+$POS" "$LOGFILE" | wc -l)
-	if [ "$LEN" -gt "$EXCERPTLEN" -a "$V" != "1" ] ; then
-		tail -c "+$POS" "$LOGFILE" | head -n $EXCERPTLEN | t_indent
-		let LEN=$LEN-$EXCERPTLEN
-		echo "    ..."
-		echo "    Skipping $LEN more lines (see $LOGFILE)"
-	else
-		tail -c "+$POS" "$LOGFILE" | t_indent
-	fi
-fi
-
-# Log more details
-[ ! -z "$ELAPSED" ] && t_detail "TIME" "${ELAPSED}ms" >>"$LOGFILE"
-[ ! -z "$RESIDENT" ] && t_detail "MEM" "${RESIDENT}kB" >>"$LOGFILE"
-t_detail "RESULT" "$RESULT" >> "$LOGFILE"
diff --git a/ThirdParty/lcov/test/bin/test_skip b/ThirdParty/lcov/test/bin/test_skip
deleted file mode 100755
index 202606f4f9acb5db95410ae06814d81952f14ad3..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/bin/test_skip
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: test_skip <testname> <reason>
-#
-# Announce and record that a single test case was skipped, including an
-# optional reason text. Must be run after testsuite_init.
-#
-
-TOPDIR=$(realpath $(dirname $0)/..) && source "$TOPDIR/bin/common"
-TESTNAME="$1"
-REASON="${*:2}" ; [ -z "$REASON" ] && REASON="<no reason given>"
-
-t_announce "$TESTNAME"
-t_skip "$TESTNAME"
-echo
-t_detail "REASON" "$REASON" >>"$LOGFILE"
-t_detail "REASON" "$REASON" | t_indent
diff --git a/ThirdParty/lcov/test/bin/testsuite_exit b/ThirdParty/lcov/test/bin/testsuite_exit
deleted file mode 100755
index 6720df99f20bd924700a127cd903f2de1117ea36..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/bin/testsuite_exit
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: testsuite_exit
-#
-# Announce end of test suite and show aggregate results.
-#
-
-TOPDIR=$(realpath $(dirname $0)/..) && source "$TOPDIR/bin/common"
-
-echo "end_time $(date +%s.%N)" >>"$COUNTFILE"
-
-SUCCESS=0
-FAILED=0
-SKIPPED=0
-TOTAL_TIME=0
-TOTAL_MEM=0
-HAVE_EXT=0
-
-# Get results
-while read LINE ; do
-	set -- $LINE
-	case "$1" in
-	start_time)	START_TIME=$2 ;;
-	end_time)	END_TIME=$2 ;;
-	pass)		let SUCCESS=$SUCCESS+1 ;;
-	fail)		let FAILED=$FAILED+1 ;;
-	skip)		let SKIPPED=$SKIPPED+1 ;;
-	elapsed)	let TOTAL_TIME=$TOTAL_TIME+$3 ; HAVE_EXT=1 ;;
-	resident)	let TOTAL_MEM=$TOTAL_MEM+$3 ; HAVE_EXT=1 ;;
-	esac
-done < "$COUNTFILE"
-
-exec 3>&1
-exec >>"$LOGFILE" 2>&1
-
-t_marker
-t_detail "DATE" "$(t_timestamp)"
-
-let TOTAL=$SUCCESS+$SKIPPED+$FAILED
-t_detail "EXECUTED" "$TOTAL"
-t_detail "PASSED" "$SUCCESS"
-t_detail "FAILED" "$FAILED"
-t_detail "SKIPPED" "$SKIPPED"
-[ $HAVE_EXT -eq 1 ] && t_detail "TIME" "${TOTAL_TIME}ms"
-[ $HAVE_EXT -eq 1 ] && t_detail "MEM" "${TOTAL_MEM}kB"
-
-TOTAL_TIME=$(($TOTAL_TIME/1000)).$(($TOTAL_TIME%1000/100))
-TOTAL_MEM=$(($TOTAL_MEM/1024)).$((($TOTAL_MEM%1024)/100))
-TOTAL="$BOLD$TOTAL tests executed$RESET"
-PASS="$SUCCESS passed"
-FAIL="$FAILED failed"
-SKIP="$SKIPPED skipped"
-TIME="time ${TOTAL_TIME}s"
-MEM="mem ${TOTAL_MEM}MB"
-
-[ "$SUCCESS" -gt 0 ] && PASS="$GREEN$PASS$DEFAULT"
-[ "$FAILED"  -gt 0 ] && FAIL="$RED$FAIL$DEFAULT"
-[ "$SKIPPED" -gt 0 ] && SKIP="$BLUE$SKIP$DEFAULT"
-
-echo -en "$TOTAL, $PASS, $FAIL, $SKIP$RESET" >&3
-[ $HAVE_EXT -eq 1 ] && echo -n " ($TIME, $MEM)" >&3
-echo >&3
-echo "Result log stored in $LOGFILE" >&3
-
-if [ "$FAILED" -gt 0 ] ; then
-	exit 1
-fi
-
-exit 0
diff --git a/ThirdParty/lcov/test/bin/testsuite_init b/ThirdParty/lcov/test/bin/testsuite_init
deleted file mode 100755
index f901e35f13998caf371717a4946c53e1c49aafa2..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/bin/testsuite_init
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: testsuite_init
-#
-# Announce start of test suite and prepare log files.
-#
-
-TOPDIR=$(realpath $(dirname $0)/..) && source "$TOPDIR/bin/common"
-
-echo -e $BOLD"Starting tests"$RESET
-echo "start_time $(date +%s.%N)" >"$COUNTFILE"
-exec >"$LOGFILE" 2>&1
-
-t_detail "DATE" "$(t_timestamp)"
-
-t_detail "LCOV" ""
-lcov --version 2>&1 | t_indent
-
-t_detail "GCOV" ""
-gcov --version 2>&1 | t_indent
-
-t_detail "CPUINFO" ""
-t_indent < /proc/cpuinfo
-
-t_detail "MEMINFO" ""
-t_indent < /proc/meminfo
diff --git a/ThirdParty/lcov/test/common.mak b/ThirdParty/lcov/test/common.mak
deleted file mode 100644
index 55f31eb99c32453e3a4325c3d7434bce4b0d3c1c..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/common.mak
+++ /dev/null
@@ -1,50 +0,0 @@
-TOPDIR       := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
-TESTDIR      := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
-PARENTDIR    := $(dir $(patsubst %/,%,$(TOPDIR)))
-RELDIR       := $(TESTDIR:$(PARENTDIR)%=%)
-ZEROINFO     := $(TOPDIR)zero.info
-ZEROCOUNTS   := $(TOPDIR)zero.counts
-FULLINFO     := $(TOPDIR)full.info
-FULLCOUNTS   := $(TOPDIR)full.counts
-TARGETINFO   := $(TOPDIR)target.info
-TARGETCOUNTS := $(TOPDIR)target.counts
-PART1INFO    := $(TOPDIR)part1.info
-PART1COUNTS  := $(TOPDIR)part1.counts
-PART2INFO    := $(TOPDIR)part2.info
-PART2COUNTS  := $(TOPDIR)part2.counts
-INFOFILES    := $(ZEROINFO) $(FULLINFO) $(TARGETINFO) $(PART1INFO) $(PART2INFO)
-COUNTFILES   := $(ZEROCOUNTS) $(FULLCOUNTS) $(TARGETCOUNTS) $(PART1COUNTS) \
-		$(PART2COUNTS)
-LCOVRC       := $(TOPDIR)lcovrc
-LCOVFLAGS    := --config-file $(LCOVRC)
-SIZE         := small
-CC           := gcc
-
-export LCOV := lcov $(LCOVFLAGS)
-export GENHTML := genhtml $(LCOVFLAGS)
-export PATH := $(TOPDIR)/../bin:$(TOPDIR)/bin:$(PATH)
-export LANG := C
-
-all: prepare init test exit
-
-init:
-	testsuite_init
-
-exit:
-	testsuite_exit
-
-prepare: $(INFOFILES) $(COUNTFILES)
-
-clean: clean_common
-
-clean_common:
-	echo "  CLEAN   $(patsubst %/,%,$(RELDIR))"
-
-$(INFOFILES) $(COUNTFILES):
-	cd $(TOPDIR) && mkinfo profiles/$(SIZE) -o src/
-
-ifneq ($(V),2)
-.SILENT:
-endif
-
-.PHONY: all init exit prepare clean clean_common
diff --git a/ThirdParty/lcov/test/genhtml_output/Makefile b/ThirdParty/lcov/test/genhtml_output/Makefile
deleted file mode 100644
index 0fbd88267074b651e8bb94146136e8ed162dce13..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/genhtml_output/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-include ../common.mak
-
-GENHTML_TEST := ./genhtml_test
-
-TESTS := genhtml_output_zero genhtml_output_full genhtml_output_target \
-	 genhtml_output_part1 genhtml_output_part2 genhtml_output_combined
-
-test: $(TESTS)
-
-genhtml_output_zero:
-	@test_run genhtml_output_zero $(GENHTML) $(ZEROINFO) -o out_zero/
-
-genhtml_output_full:
-	@test_run genhtml_output_full $(GENHTML) $(FULLINFO) -o out_full/
-
-genhtml_output_target:
-	@test_run genhtml_output_target $(GENHTML) $(TARGETINFO) -o out_target/
-
-genhtml_output_part1:
-	@test_run genhtml_output_part1 $(GENHTML) $(PART1INFO) -o out_part1/
-
-genhtml_output_part2:
-	@test_run genhtml_output_part2 $(GENHTML) $(PART2INFO) -o out_part2/
-
-genhtml_output_combined: genhtml_output_target
-	@test_run genhtml_output_combined $(GENHTML_TEST) $(TARGETINFO) $(PART1INFO) $(PART2INFO)
-
-clean:
-	rm -rf out_*/
-
-.PHONY: test $(TESTS) clean
diff --git a/ThirdParty/lcov/test/genhtml_output/genhtml_test b/ThirdParty/lcov/test/genhtml_output/genhtml_test
deleted file mode 100755
index 0b0f834918e5eb92076d98a592aaea028aa0ab86..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/genhtml_output/genhtml_test
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: genhtml_test <ref-file> <file1> [<file2>...]
-#
-# Compare genhtml output of a reference coverage data file with that of
-# a combination of multiple files.
-#
-
-function die()
-{
-	echo "Error: $@" >&2
-	exit 1
-}
-
-GENHTMLFLAGS="-t title"
-REFFILE=$1
-shift
-
-if [ -z "$REFFILE" -o -z "$*" ] ; then
-	echo "Usage: $0 <ref-file> <file1> [<file2>...]" >&2
-	exit 2
-fi
-
-OUTREF="out_$(basename $REFFILE .info)"
-OUTCOMBINED="out_combined"
-
-$GENHTML $GENHTMLFLAGS "$REFFILE" -o "$OUTREF" || \
-	die "Could not generate HTML for reference file"
-
-$GENHTML $GENHTMLFLAGS "$@" -o "$OUTCOMBINED" || \
-	die "Could not generate HTML for combined files"
-
-diff -ur "$OUTREF" "$OUTCOMBINED" -I "headerValue" || \
-	die "Mismatch in generated output"
diff --git a/ThirdParty/lcov/test/lcov_add_files/Makefile b/ThirdParty/lcov/test/lcov_add_files/Makefile
deleted file mode 100644
index 87937a155845f676e6352fe5c161c5f4cb0d31ae..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_add_files/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-include ../common.mak
-
-ADDTEST := ./add_test
-
-TESTS := lcov_add_zero lcov_add_zero2 lcov_add_full lcov_add_full2 \
-	 lcov_add_part lcov_add_part2 lcov_add_concatenated4
-
-
-test: $(TESTS)
-
-lcov_add_zero:
-	# Add single zero coverage file - output should be same as input
-	test_run lcov_add_zero $(ADDTEST) 1 "$(ZEROINFO)" "$(ZEROINFO)"
-
-lcov_add_zero2:
-	# Add two zero coverage files - output should be same as input
-	test_run lcov_add_zero2 $(ADDTEST) 1 "$(ZEROINFO)" "$(ZEROINFO)" "$(ZEROINFO)"
-
-lcov_add_full:
-	# Add single 100% coverage file - output should be same as input
-	test_run lcov_add_full $(ADDTEST) 1 "$(FULLINFO)" "$(FULLINFO)"
-
-lcov_add_full2:
-	# Add two 100% coverage file and reduce counts to 1/2 - output should
-	# be same as input
-	test_run lcov_add_full2 $(ADDTEST) 0.5 "$(FULLINFO)" "$(FULLINFO)" "$(FULLINFO)"
-
-lcov_add_part:
-	# Add single coverage file with random coverage rate - output should
-	# be same as input
-	test_run lcov_add_part $(ADDTEST) 1 "$(PART1INFO)" "$(PART1INFO)"
-
-lcov_add_part2:
-	# Add two coverage files that were split from target file - output
-	# should be same as target file
-	test_run lcov_add_part2 $(ADDTEST) 1 "$(TARGETINFO)" "$(PART1INFO)" "$(PART2INFO)"
-
-lcov_add_concatenated4:
-	# Add coverage file that consists of 4 concatenation of target files 
-	# and reduce counts to 1/4 - output should be the same as input
-	cat $(TARGETINFO) $(TARGETINFO) $(TARGETINFO) $(TARGETINFO) >concatenated.info
-	test_run lcov_add_concatenated4 $(ADDTEST) 0.25 $(TARGETINFO) concatenated.info
-
-clean:
-	rm -f *.info
-
-.PHONY: test $(TESTS) clean
diff --git a/ThirdParty/lcov/test/lcov_add_files/add_test b/ThirdParty/lcov/test/lcov_add_files/add_test
deleted file mode 100755
index 4ff5ffeb6c74270e2acdceceb93556334281a014..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_add_files/add_test
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: add_test <multiplier> <reference_file> <add_file> [<add_file>...]
-#
-# Add multiple coverage data files, normalize the output and multiply counts
-# with multiplier. Compare against reference file. Report deviations.
-#
-
-MULTI=$1
-REFFILE=$2
-shift 2
-
-ADD=
-for INFO in $* ; do
-	ADD="$ADD -a $INFO"
-done
-
-if [ -z "$MULTI" -o -z "$REFFILE" -o -z "$ADD" ] ; then
-	echo "Usage: $0 <multiplier> <reference_file> <add_file> [<add_file>...]" >&2
-	exit 1
-fi
-
-OUTFILE="add_"$(basename "$REFFILE")
-SORTFILE="norm_$OUTFILE"
-
-set -x
-
-echo "Adding files..."
-if ! $LCOV $ADD -o "$OUTFILE" ; then
-	echo "Error: lcov returned with non-zero exit code $?" >&2
-	exit 1
-fi
-
-echo "Normalizing result..."
-if ! norminfo "$OUTFILE" "$MULTI" > "$SORTFILE" ; then
-	echo "Error: Normalization of lcov result file failed" >&2
-	exit 1
-fi
-
-echo "Comparing with reference..."
-if ! diff -u "$REFFILE" "$SORTFILE" ; then
-	echo "Error: Result of combination differs from reference file" >&2
-	exit 1
-fi
diff --git a/ThirdParty/lcov/test/lcov_diff/Makefile b/ThirdParty/lcov/test/lcov_diff/Makefile
deleted file mode 100644
index d2d4dd6621bd5b0c1b858ce811450385625fa8b5..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_diff/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-include ../common.mak
-
-test:
-	test_run lcov_diff_apply ./diff_test
-
-clean:
-	make -C old clean
-	make -C new clean
-	rm -f *.info diff
diff --git a/ThirdParty/lcov/test/lcov_diff/diff_test b/ThirdParty/lcov/test/lcov_diff/diff_test
deleted file mode 100755
index e0f8c0b3081845a795960514b5f2b33a443bc4b9..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_diff/diff_test
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: diff_test
-#
-# Check lcov's diff function:
-# - Compile two slightly different test programs
-# - Run the programs and collect coverage data
-# - Generate a patch containing the difference between the source code
-# - Apply the patch to the coverage data
-# - Compare the resulting patched coverage data file with the data from the
-#   patched source file
-#
-
-function die()
-{
-	echo "Error: $@" >&2
-	exit 1
-}
-
-make -C old || die "Failed to compile old source"
-make -C new || die "Failed to compile new source"
-diff -u $PWD/old/prog.c $PWD/new/prog.c > diff
-
-$LCOV --diff old/prog.info diff --convert-filenames -o patched.info -t bla || \
-	die "Failed to apply patch to coverage data file"
-norminfo new/prog.info > new_normalized.info
-norminfo patched.info > patched_normalized.info
-sed -i -e 's/^TN:.*$/TN:/' patched_normalized.info
-
-diff -u patched_normalized.info new_normalized.info || \
-	die "Mismatch in patched coverage data file"
-
-echo "Patched coverage data file matches expected file"
diff --git a/ThirdParty/lcov/test/lcov_diff/new/Makefile b/ThirdParty/lcov/test/lcov_diff/new/Makefile
deleted file mode 100644
index 51005c71dd74b21133d48f5c64ee1998e2473d67..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_diff/new/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-prog.info:
-
-include ../../common.mak
-
-prog.info: prog.gcda
-	$(LCOV) -c -d . -o prog.info
-
-prog.gcda: prog
-	./prog || true
-
-prog: prog.c
-	$(CC) prog.c -o prog --coverage
-
-clean:
-	rm -f prog prog.gcda prog.gcno prog.info
-
-.PHONY: all clean
diff --git a/ThirdParty/lcov/test/lcov_diff/new/prog.c b/ThirdParty/lcov/test/lcov_diff/new/prog.c
deleted file mode 100644
index 6f4607cc4fd8d6b537f19eac54080e3a09f506de..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_diff/new/prog.c
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-int fn(int x)
-{
-	switch (x) {
-	case -1: return 0;
-
-
-	case 0:  return 2;
-	case 2:  return 3;
-
-
-	case 12: return 7;
-	default: return 255;
-	}
-
-
-
-}
-
-int fn2()
-{
-
-
-	return 7;
-}
-
-
-
-int main(int argc, char *argv[])
-{
-
-
-	if (argc > 1)
-		return fn(argc);
-
-	return fn2();
-
-
-}
diff --git a/ThirdParty/lcov/test/lcov_diff/old/Makefile b/ThirdParty/lcov/test/lcov_diff/old/Makefile
deleted file mode 100644
index 51005c71dd74b21133d48f5c64ee1998e2473d67..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_diff/old/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-prog.info:
-
-include ../../common.mak
-
-prog.info: prog.gcda
-	$(LCOV) -c -d . -o prog.info
-
-prog.gcda: prog
-	./prog || true
-
-prog: prog.c
-	$(CC) prog.c -o prog --coverage
-
-clean:
-	rm -f prog prog.gcda prog.gcno prog.info
-
-.PHONY: all clean
diff --git a/ThirdParty/lcov/test/lcov_diff/old/prog.c b/ThirdParty/lcov/test/lcov_diff/old/prog.c
deleted file mode 100644
index a4eda2555769efe16e0d7bba542fc3dfb31d28b5..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_diff/old/prog.c
+++ /dev/null
@@ -1,22 +0,0 @@
-int fn(int x)
-{
-	switch (x) {
-	case -1: return 0;
-	case 0:  return 2;
-	case 2:  return 3;
-	case 12: return 7;
-	default: return 255;
-	}
-}
-
-int fn2()
-{
-	return 7;
-}
-
-int main(int argc, char *argv[])
-{
-	if (argc > 1)
-		return fn(argc);
-	return fn2();
-}
diff --git a/ThirdParty/lcov/test/lcov_misc/Makefile b/ThirdParty/lcov/test/lcov_misc/Makefile
deleted file mode 100644
index d3bcc4ab28582cd7a34a0fdc1a54aceaecf08ca0..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_misc/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../common.mak
-
-test:
-	@test_run lcov_version lcov --version
-	@test_run lcov_help lcov --help
diff --git a/ThirdParty/lcov/test/lcov_summary/Makefile b/ThirdParty/lcov/test/lcov_summary/Makefile
deleted file mode 100644
index f48d0bc7667d759e2cf04597095ad012626ff647..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_summary/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-include ../common.mak
-
-CHECK := ./check_counts
-TESTS := lcov_summary_zero lcov_summary_full lcov_summary_target \
-	 lcov_summary_part1 lcov_summary_part2 lcov_summary_concatenated \
-	 lcov_summary_concatenated2
-
-test: $(TESTS)
-
-lcov_summary_zero:
-	# Compare output of lcov --summary with generated counts
-	test_run lcov_summary_zero $(CHECK) $(ZEROCOUNTS) $(ZEROINFO)
-lcov_summary_full:
-	# Compare output of lcov --summary with generated counts
-	test_run lcov_summary_full $(CHECK) $(FULLCOUNTS) $(FULLINFO)
-lcov_summary_target:
-	# Compare output of lcov --summary with generated counts
-	test_run lcov_summary_target $(CHECK) $(TARGETCOUNTS) $(TARGETINFO)
-lcov_summary_part1:
-	# Compare output of lcov --summary with generated counts
-	test_run lcov_summary_part1 $(CHECK) $(PART1COUNTS) $(PART1INFO)
-lcov_summary_part2:
-	# Compare output of lcov --summary with generated counts
-	test_run lcov_summary_part2 $(CHECK) $(PART2COUNTS) $(PART2INFO)
-lcov_summary_concatenated:
-	# Compare output of lcov --summary with generated counts for a
-	# concatenated coverage data file
-	cat $(TARGETINFO) $(TARGETINFO) > concatenated.info
-	test_run lcov_summary_concatenated $(CHECK) $(TARGETCOUNTS) concatenated.info
-lcov_summary_concatenated2:
-	# Compare output of lcov --summary with generated counts for a
-	# concatenated coverage data file (part1+part2=target)
-	cat $(PART1INFO) $(PART2INFO) > concatenated2.info
-	test_run lcov_summary_concatenated2 $(CHECK) $(TARGETCOUNTS) concatenated2.info
-
-
-
-clean:
-	rm -f *.info
-
-.PHONY: test $(TESTS) clean
diff --git a/ThirdParty/lcov/test/lcov_summary/check_counts b/ThirdParty/lcov/test/lcov_summary/check_counts
deleted file mode 100755
index 32d454230ccc4682f532524bce4638e9dfe0be49..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcov_summary/check_counts
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env perl
-#
-# Copyright IBM Corp. 2017
-#
-# Usage: check_counts <counts_file> <coverage_data_file>
-#
-# Compare the output of "lcov --summary" for <coverage_data_file> with the
-# coverage data counts specified in <counts_file>. This file has the following
-# format (all in a single line):
-#
-#   lnhit lnfound fnhit fnfound brhit brfound2
-#
-
-use strict;
-use warnings;
-
-sub do_cmp($$$)
-{
-	my ($title, $a, $b) = @_;
-
-	if ($a == $b) {
-		print("$title: $a == $b\n");
-		return 0;
-	} else {
-		print("$title: $a != $b => mismatch!\n");
-		return 1;
-	}
-}
-
-my $lcov = $ENV{"LCOV"};
-my ($counts, $info) = @ARGV;
-my $fd;
-my $cmdline;
-my ($lnhit, $lnfound, $fnhit, $fnfound, $brhit, $brfound) = (0, 0, 0, 0, 0, 0);
-my ($lnhit2, $lnfound2, $fnhit2, $fnfound2, $brhit2, $brfound2);
-my $rc = 0;
-
-die("$0: LCOV environment variable not defined\n") if (!defined($lcov));
-if (!defined($counts) || !defined($info)) {
-	die("Usage: $0 <counts_file> <coverage_data_file>\n");
-}
-
-$cmdline = "$lcov --summary $info";
-open($fd, "-|", $cmdline) or die("$0: Could not run $cmdline: $!\n");
-while (<$fd>) {
-	($lnhit, $lnfound) = ($1, $2) if (/(\d+) of (\d+) lines/);
-	($fnhit, $fnfound) = ($1, $2) if (/(\d+) of (\d+) functions/);
-	($brhit, $brfound) = ($1, $2) if (/(\d+) of (\d+) branches/);
-}
-close($fd);
-
-die("$0: Non-zero result code ($?) of command: $cmdline\n") if ($? != 0);
-
-open($fd, "<", $counts) or die("$0: Could not open $counts: $!\n");
-if (<$fd> !~ /^(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
-	die("$0: Invalid count file: $counts\n");
-}
-($lnhit2, $lnfound2, $fnhit2, $fnfound2, $brhit2, $brfound2) =
-	($1, $2, $3, $4, $5, $6);
-close($fd);
-
-print("Comparing --summary output for $info and $counts:\n");
-$rc |= do_cmp("line hit", $lnhit, $lnhit2);
-$rc |= do_cmp("line found", $lnfound, $lnfound2);
-$rc |= do_cmp("functions hit", $fnhit, $fnhit2);
-$rc |= do_cmp("functions found", $fnfound, $fnfound2);
-$rc |= do_cmp("branches hit", $brhit, $brhit2);
-$rc |= do_cmp("branches found", $brfound, $brfound2);
-
-exit($rc);
diff --git a/ThirdParty/lcov/test/lcovrc b/ThirdParty/lcov/test/lcovrc
deleted file mode 100644
index 5005f637d5f7f2d434b54ab88067152fb12f208f..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/lcovrc
+++ /dev/null
@@ -1,4 +0,0 @@
-# lcovrc file used during tests
-
-lcov_function_coverage = 1
-lcov_branch_coverage = 1
diff --git a/ThirdParty/lcov/test/profiles/large b/ThirdParty/lcov/test/profiles/large
deleted file mode 100644
index 31788b040933f33b044a6f7591a83fa310d910bb..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/profiles/large
+++ /dev/null
@@ -1,51 +0,0 @@
-# Profile of a large source code project. Use with mkinfo to generate fake test
-# source code and coverage data.
-
-[tests]
-# List of test names
-names	= test1 test2
-
-[files]
-# Create this many files
-numfiles = 500
-# Generate paths from these components (top/sub/subsub/prefix_suffix.ext)
-top	= lib tools test bin img scripts
-sub	= build debug release include target sys config
-subsub	= work www utils gui info log basic
-prefix	= main misc report tune mem list 
-suffix	= a b c top work proto final fast
-ext	= .c .h
-
-[lines]
-# Generate line coverage data
-enabled	= 1
-# Line coverage rate
-covered	= 80
-# Percentage of lines covered
-instrumented = 80
-# Maximum number of lines per file
-maxlines = 2000
-
-[functions]
-# Generate function coverage data
-enabled	= 1
-# Function coverage rate
-covered	= 60
-# Percent of instrumented lines containing function definitions
-perinstrumented = 10
-# Generate function names from these components (verb_adj_noun)
-verb	= get set find read write stat add sub combine
-adj	= first last best min max avg
-noun	= bit byte file str num obj data
-
-[branches]
-# Generate branch coverage data
-enabled	= 1
-# Branch coverage rate
-covered = 20
-# Percent of instrumented lines containing branches
-perinstrumented = 5
-# List of blocks to use
-blocks	= 0 4294967295
-# Distribution of number of branches per block (num:probability)
-branchdist = 2:50 3:25 5:20 100:5
diff --git a/ThirdParty/lcov/test/profiles/medium b/ThirdParty/lcov/test/profiles/medium
deleted file mode 100644
index 56598e868271a98498b88f7361f9b5b5a109f4d4..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/profiles/medium
+++ /dev/null
@@ -1,51 +0,0 @@
-# Profile of a medium-sized source code project. Use with mkinfo to generate
-# fake test source code and coverage data.
-
-[tests]
-# List of test names
-names	= test1 test2 test3
-
-[files]
-# Create this many files
-numfiles = 50
-# Generate paths from these components (top/sub/subsub/prefix_suffix.ext)
-top	= lib tools test bin img scripts
-sub	= build debug release include target sys config
-subsub	= work www utils gui info log basic
-prefix	= main misc report tune mem list 
-suffix	= a b c top work proto final fast
-ext	= .c .h
-
-[lines]
-# Generate line coverage data
-enabled	= 1
-# Line coverage rate
-covered	= 80
-# Percentage of lines covered
-instrumented = 50
-# Maximum number of lines per file
-maxlines = 1000
-
-[functions]
-# Generate function coverage data
-enabled	= 1
-# Function coverage rate
-covered	= 60
-# Percent of instrumented lines containing function definitions
-perinstrumented = 5
-# Generate function names from these components (verb_adj_noun)
-verb	= get set find read write stat add sub combine
-adj	= first last best min max avg
-noun	= bit byte file str num obj data
-
-[branches]
-# Generate branch coverage data
-enabled	= 1
-# Branch coverage rate
-covered = 20
-# Percent of instrumented lines containing branches
-perinstrumented = 50
-# List of blocks to use
-blocks	= 0 4294967295
-# Distribution of number of branches per block (num:probability)
-branchdist = 2:50 3:50
diff --git a/ThirdParty/lcov/test/profiles/small b/ThirdParty/lcov/test/profiles/small
deleted file mode 100644
index 388d2a3bb55926031ed85164fa2250bd096191c3..0000000000000000000000000000000000000000
--- a/ThirdParty/lcov/test/profiles/small
+++ /dev/null
@@ -1,51 +0,0 @@
-# Profile of a small source code project. Use with mkinfo to generate fake test
-# source code and coverage data.
-
-[tests]
-# List of test names
-names	= test1 test2
-
-[files]
-# Create this many files
-numfiles = 5
-# Generate paths from these components (top/sub/subsub/prefix_suffix.ext)
-top	= lib tools test bin img scripts
-sub	= build debug release include target sys config
-subsub	= work www utils gui info log basic
-prefix	= main misc report tune mem list 
-suffix	= a b c top work proto final fast
-ext	= .c .h
-
-[lines]
-# Generate line coverage data
-enabled	= 1
-# Line coverage rate
-covered	= 80
-# Percentage of lines covered
-instrumented = 50
-# Maximum number of lines per file
-maxlines = 500
-
-[functions]
-# Generate function coverage data
-enabled	= 1
-# Function coverage rate
-covered	= 60
-# Percent of instrumented lines containing function definitions
-perinstrumented = 5
-# Generate function names from these components (verb_adj_noun)
-verb	= get set find read write stat add sub combine
-adj	= first last best min max avg
-noun	= bit byte file str num obj data
-
-[branches]
-# Generate branch coverage data
-enabled	= 1
-# Branch coverage rate
-covered = 20
-# Percent of instrumented lines containing branches
-perinstrumented = 50
-# List of blocks to use
-blocks	= 0 4294967295
-# Distribution of number of branches per block (num:probability)
-branchdist = 2:50 3:45 50:5
diff --git a/Tools/CMakeLists.txt b/Tools/CMakeLists.txt
deleted file mode 100644
index 109b6d44abe7794a1f9ee39456ae24d883872e30..0000000000000000000000000000000000000000
--- a/Tools/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-set (TOOLS_FILES plot_tracks.sh plot_crossings.sh read_hist.py)
-
-install (
-  FILES ${TOOLS_FILES} 
-  DESTINATION share/tools
-  )
diff --git a/CMakeModules/CodeCoverage b/cmake/CodeCoverage
similarity index 100%
rename from CMakeModules/CodeCoverage
rename to cmake/CodeCoverage
diff --git a/CMakeModules/CodeCoverage.cmake b/cmake/CodeCoverage.cmake
similarity index 100%
rename from CMakeModules/CodeCoverage.cmake
rename to cmake/CodeCoverage.cmake
diff --git a/CMakeModules/CorsikaUtilities.cmake b/cmake/CorsikaUtilities.cmake
similarity index 100%
rename from CMakeModules/CorsikaUtilities.cmake
rename to cmake/CorsikaUtilities.cmake
diff --git a/cmake/FindCORSIKA.cmake b/cmake/FindCORSIKA.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..5a18d9772d405ba09479ede5c6c8f6b69d6d37ad
--- /dev/null
+++ b/cmake/FindCORSIKA.cmake
@@ -0,0 +1,6 @@
+
+add_library(CORSIKA INTERFACE)
+
+target_compile_coptions(CORSIKA
+  INTERFACE
+  ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/cmake/FindCORSIKA8.cmake b/cmake/FindCORSIKA8.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..39f936323ef79cb71ab0843ea41c7c85eca66526
--- /dev/null
+++ b/cmake/FindCORSIKA8.cmake
@@ -0,0 +1,9 @@
+add_library (CORSIKA8 INTERFACE)
+
+target_include_directories (CORSIKA8
+  INTERFACE
+  ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+
+target_link_libraries (CORSIKA8 INTERFACE PhysUnits)
+
+set (CORSIKA8_FOUND TRUE)
diff --git a/cmake/FindCatch2.cmake b/cmake/FindCatch2.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..19bd4387611896390fafce1d1c6b533f1bd7bb02
--- /dev/null
+++ b/cmake/FindCatch2.cmake
@@ -0,0 +1,8 @@
+add_library (Catch2 INTERFACE)
+
+target_compile_options (Catch2
+  INTERFACE
+  -I${CMAKE_SOURCE_DIR}/externals/catch2
+  )
+
+set (Catch2_FOUND True)
diff --git a/cmake/FindCorsika8.cmake b/cmake/FindCorsika8.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..1a8549ce0c9170c05ef3d4bdce60150de486ee97
--- /dev/null
+++ b/cmake/FindCorsika8.cmake
@@ -0,0 +1,63 @@
+#
+# FindCorsika8
+#
+# This module tries to find the Corsika8 header files and extrats their version.  It
+# sets the following variables.
+#
+# CORSIKA8_FOUND       -  Set ON if Corsika8 headers are found, otherwise OFF.
+#
+# CORSIKA8_INCLUDE_DIR -  Include directory for hydra header files.  (All header
+#                       files will actually be in the Corsika8 subdirectory.)
+# CORSIKA8_VERSION     -  Version of hydra in the form "major.minor.patch".
+#
+
+find_path( CORSIKA8_INCLUDE_DIR
+  PATHS
+    ${CMAKE_SOURCE_DIR}
+    /usr/include
+    /usr/local/include
+    ${CORSIKA8_DIR}
+  NAMES corsika/corsika.h
+  DOC "Corsika8 headers"
+  )
+
+
+if( CORSIKA8_INCLUDE_DIR )
+  list( REMOVE_DUPLICATES CORSIKA8_INCLUDE_DIR )
+endif( CORSIKA8_INCLUDE_DIR )
+
+# Find hydra version
+if (CORSIKA8_INCLUDE_DIR)
+  file( STRINGS ${CORSIKA_INCLUDE_DIR}/corsika/corsika.h
+    version
+    REGEX "#define CORSIKA_VERSION[ \t]+([0-9x]+)"
+    )
+  string( REGEX REPLACE
+    "#define CORSIKA_VERSION[ \t]+"
+    ""
+    version
+    "${version}"
+    )
+
+  string( REGEX MATCH "^[0-9]" major ${version} )
+  string( REGEX REPLACE "^${major}00" "" version "${version}" )
+  string( REGEX MATCH "^[0-9]" minor ${version} )
+  string( REGEX REPLACE "^${minor}0" "" version "${version}" )
+  set( CORSIKA_VERSION "${major}.${minor}.${version}")
+  set( CORSIKA_MAJOR_VERSION "${major}")
+  set( CORSIKA_MINOR_VERSION "${minor}")
+endif()
+
+# Check for required components
+include( FindPackageHandleStandardArgs )
+find_package_handle_standard_args( Corsika8
+  FOUND_VAR CORSIKA8_FOUND
+  REQUIRED_VARS CORSIKA8_INCLUDE_DIR
+  VERSION_VAR CORSIKA8_VERSION
+  )
+
+if(CORSIKA8_FOUND)
+  set(CORSIKA8_INCLUDE_DIRS ${CORSIKA8_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(CORSIKA8_INCLUDE_DIR)
diff --git a/cmake/FindEigen3.cmake b/cmake/FindEigen3.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..0b36805e75ec37ba2af7a8fe9c8036f73558a618
--- /dev/null
+++ b/cmake/FindEigen3.cmake
@@ -0,0 +1,107 @@
+# - Try to find Eigen3 lib
+#
+# This module supports requiring a minimum version, e.g. you can do
+#   find_package(Eigen3 3.1.2)
+# to require version 3.1.2 or newer of Eigen3.
+#
+# Once done this will define
+#
+#  EIGEN3_FOUND - system has eigen lib with correct version
+#  EIGEN3_INCLUDE_DIR - the eigen include directory
+#  EIGEN3_VERSION - eigen version
+#
+# and the following imported target:
+#
+#  Eigen3::Eigen - The header-only Eigen library
+#
+# This module reads hints about search locations from 
+# the following environment variables:
+#
+# EIGEN3_ROOT
+# EIGEN3_ROOT_DIR
+
+# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
+# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
+# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
+# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
+
+if(NOT Eigen3_FIND_VERSION)
+  if(NOT Eigen3_FIND_VERSION_MAJOR)
+    set(Eigen3_FIND_VERSION_MAJOR 2)
+  endif()
+  if(NOT Eigen3_FIND_VERSION_MINOR)
+    set(Eigen3_FIND_VERSION_MINOR 91)
+  endif()
+  if(NOT Eigen3_FIND_VERSION_PATCH)
+    set(Eigen3_FIND_VERSION_PATCH 0)
+  endif()
+
+  set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
+endif()
+
+macro(_eigen3_check_version)
+  file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
+
+  string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
+  set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
+  string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
+  set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
+  string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
+  set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
+
+  set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
+  if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+    set(EIGEN3_VERSION_OK FALSE)
+  else()
+    set(EIGEN3_VERSION_OK TRUE)
+  endif()
+
+  if(NOT EIGEN3_VERSION_OK)
+
+    message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
+                   "but at least version ${Eigen3_FIND_VERSION} is required")
+  endif()
+endmacro()
+
+if (EIGEN3_INCLUDE_DIR)
+
+  # in cache already
+  _eigen3_check_version()
+  set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
+  set(Eigen3_FOUND ${EIGEN3_VERSION_OK})
+
+else ()
+  
+  # search first if an Eigen3Config.cmake is available in the system,
+  # if successful this would set EIGEN3_INCLUDE_DIR and the rest of
+  # the script will work as usual
+  find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)
+
+  if(NOT EIGEN3_INCLUDE_DIR)
+    find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
+        HINTS
+        ENV EIGEN3_ROOT 
+        ENV EIGEN3_ROOT_DIR
+        PATHS
+        ${CMAKE_INSTALL_PREFIX}/include
+        ${KDE4_INCLUDE_DIR}
+        PATH_SUFFIXES eigen3 eigen
+      )
+  endif()
+
+  if(EIGEN3_INCLUDE_DIR)
+    _eigen3_check_version()
+  endif()
+
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
+
+  mark_as_advanced(EIGEN3_INCLUDE_DIR)
+
+endif()
+
+if(EIGEN3_FOUND AND NOT TARGET Eigen3::Eigen)
+  add_library(Eigen3::Eigen INTERFACE IMPORTED)
+  set_target_properties(Eigen3::Eigen PROPERTIES
+    INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}")
+endif()
diff --git a/cmake/FindPhysUnits.cmake b/cmake/FindPhysUnits.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..321ec043e882c5c98d611a6daf5c23438e8b4c81
--- /dev/null
+++ b/cmake/FindPhysUnits.cmake
@@ -0,0 +1,8 @@
+add_library (PhysUnits INTERFACE)
+
+target_compile_options (PhysUnits
+  INTERFACE
+  -I${CMAKE_SOURCE_DIR}/externals/phys_units
+  )
+
+set (PhysUnits_FOUND True)
diff --git a/CMakeModules/FindPythia8.cmake b/cmake/FindPythia8.cmake
similarity index 100%
rename from CMakeModules/FindPythia8.cmake
rename to cmake/FindPythia8.cmake
diff --git a/corsika/corsika.hpp b/corsika/corsika.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/corsika/detail/framework/core/Cascade.inl b/corsika/detail/framework/core/Cascade.inl
new file mode 100644
index 0000000000000000000000000000000000000000..1f784caa6e04944b273e49eafba6d929f7588401
--- /dev/null
+++ b/corsika/detail/framework/core/Cascade.inl
@@ -0,0 +1,262 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/random/ExponentialDistribution.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/random/UniformRealDistribution.hpp>
+#include <corsika/framework/stack/SecondaryView.hpp>
+#include <cassert>
+#include <cmath>
+#include <iostream>
+#include <limits>
+#include <type_traits>
+
+#include <boost/type_index.hpp>
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+using boost::typeindex::type_id_with_cvr;
+
+/**
+ * The cascade namespace assembles all objects needed to simulate full particles cascades.
+ */
+
+namespace corsika {
+
+
+    template <typename TTracking, typename TProcessList, typename TStack, typename TStackView>
+    void Cascade<TTracking, TProcessList, TStack, TStackView >::Init()
+    {
+      fProcessSequence.Init();
+      fStack.Init();
+    }
+
+
+    template <typename TTracking, typename TProcessList, typename TStack, typename TStackView>
+    void Cascade<TTracking, TProcessList, TStack, TStackView >::SetNodes() {
+      std::for_each(fStack.begin(), fStack.end(), [&](auto& p) {
+        auto const* numericalNode =
+            fEnvironment.GetUniverse()->GetContainingNode(p.GetPosition());
+        p.SetNode(numericalNode);
+      });
+    }
+
+    template <typename TTracking, typename TProcessList, typename TStack, typename TStackView>
+    void Cascade<TTracking, TProcessList, TStack, TStackView >::Run()
+    {
+      SetNodes();
+
+      while (!fStack.IsEmpty()) {
+        while (!fStack.IsEmpty()) {
+          auto pNext = fStack.GetNextParticle();
+          std::cout << "========= next: " << pNext.GetPID() << std::endl;
+          Step(pNext);
+          std::cout << "========= stack ============" << std::endl;
+          fProcessSequence.DoStack(fStack);
+        }
+        // do cascade equations, which can put new particles on Stack,
+        // thus, the double loop
+        // DoCascadeEquations();
+      }
+    }
+
+    template <typename TTracking, typename TProcessList, typename TStack, typename TStackView>
+    void Cascade<TTracking, TProcessList, TStack, TStackView >::forceInteraction()
+    {
+      std::cout << "forced interaction!" << std::endl;
+      auto vParticle = fStack.GetNextParticle();
+      TStackView secondaries(vParticle);
+      auto projectile = secondaries.GetProjectile();
+      interaction(vParticle, projectile);
+      fProcessSequence.DoSecondaries(secondaries);
+      vParticle.Delete(); // todo: this should be reviewed, see below
+    }
+
+    template <typename TTracking, typename TProcessList, typename TStack, typename TStackView>
+    void Cascade<TTracking, TProcessList, TStack, TStackView >::Step(Particle& vParticle)
+    {
+      using namespace corsika;
+      using namespace corsika::units::si;
+
+      // determine geometric tracking
+      auto [step, geomMaxLength, nextVol] = fTracking.GetTrack(vParticle);
+      [[maybe_unused]] auto const& dummy_nextVol = nextVol;
+
+      // determine combined total interaction length (inverse)
+      InverseGrammageType const total_inv_lambda =
+          fProcessSequence.GetTotalInverseInteractionLength(vParticle);
+
+      // sample random exponential step length in grammage
+      corsika::ExponentialDistribution expDist(1 / total_inv_lambda);
+      GrammageType const next_interact = expDist(fRNG);
+
+      std::cout << "total_inv_lambda=" << total_inv_lambda
+                << ", next_interact=" << next_interact << std::endl;
+
+      auto const* currentLogicalNode = vParticle.GetNode();
+
+      // assert that particle stays outside void Universe if it has no
+      // model properties set
+      assert(currentLogicalNode != &*fEnvironment.GetUniverse() ||
+             fEnvironment.GetUniverse()->HasModelProperties());
+
+      // convert next_step from grammage to length
+      LengthType const distance_interact =
+          currentLogicalNode->GetModelProperties().ArclengthFromGrammage(step,
+                                                                         next_interact);
+
+      // determine the maximum geometric step length
+      LengthType const distance_max = fProcessSequence.MaxStepLength(vParticle, step);
+      std::cout << "distance_max=" << distance_max << std::endl;
+
+      // determine combined total inverse decay time
+      InverseTimeType const total_inv_lifetime =
+          fProcessSequence.GetTotalInverseLifetime(vParticle);
+
+      // sample random exponential decay time
+      corsika::ExponentialDistribution expDistDecay(1 / total_inv_lifetime);
+      TimeType const next_decay = expDistDecay(fRNG);
+      std::cout << "total_inv_lifetime=" << total_inv_lifetime
+                << ", next_decay=" << next_decay << std::endl;
+
+      // convert next_decay from time to length [m]
+      LengthType const distance_decay = next_decay * vParticle.GetMomentum().norm() /
+                                        vParticle.GetEnergy() * units::constants::c;
+
+      // take minimum of geometry, interaction, decay for next step
+      auto const min_distance =
+          std::min({distance_interact, distance_decay, distance_max, geomMaxLength});
+
+      std::cout << " move particle by : " << min_distance << std::endl;
+
+      // here the particle is actually moved along the trajectory to new position:
+      // std::visit(setup::ParticleUpdate<particle_type>{vParticle}, step);
+      vParticle.SetPosition(step.PositionFromArclength(min_distance));
+      // .... also update time, momentum, direction, ...
+      vParticle.SetTime(vParticle.GetTime() + min_distance / units::constants::c);
+
+      step.LimitEndTo(min_distance);
+
+      // apply all continuous processes on particle + track
+      process::EProcessReturn status = fProcessSequence.DoContinuous(vParticle, step);
+
+      if (status == process::EProcessReturn::eParticleAbsorbed) {
+        std::cout << "Cascade: delete absorbed particle " << vParticle.GetPID() << " "
+                  << vParticle.GetEnergy() / 1_GeV << "GeV" << std::endl;
+        vParticle.Delete();
+        return;
+      }
+
+      std::cout << "sth. happening before geometric limit ? "
+                << ((min_distance < geomMaxLength) ? "yes" : "no") << std::endl;
+
+      if (min_distance < geomMaxLength) { // interaction to happen within geometric limit
+
+        // check whether decay or interaction limits this step the
+        // outcome of decay or interaction MAY be a) new particles in
+        // secondaries, b) the projectile particle deleted (or
+        // changed)
+
+        TStackView secondaries(vParticle);
+
+        if (min_distance != distance_max) {
+          /*
+            Create SecondaryView object on Stack. The data container
+            remains untouched and identical, and 'projectil' is identical
+            to 'vParticle' above this line. However,
+            projectil.AddSecondaries populate the SecondaryView, which can
+            then be used afterwards for further processing. Thus: it is
+            important to use projectle (and not vParticle) for Interaction,
+            and Decay!
+          */
+
+          [[maybe_unused]] auto projectile = secondaries.GetProjectile();
+
+          if (min_distance == distance_interact) {
+            interaction(vParticle, projectile);
+          } else {
+            assert(min_distance == distance_decay);
+            decay(vParticle, projectile);
+            // make sure particle actually did decay if it should have done so
+            if (secondaries.GetSize() == 1 &&
+                projectile.GetPID() == secondaries.GetNextParticle().GetPID())
+              throw std::runtime_error("Cascade::Step: particle_type decays into itself!");
+          }
+
+          fProcessSequence.DoSecondaries(secondaries);
+          vParticle.Delete(); // todo: this should be reviewed. Where
+                              // exactly are particles best deleted, and
+                              // where they should NOT be
+                              // deleted... maybe Delete function should
+                              // be "protected" and not accessible to physics
+
+        } else { // step-length limitation within volume
+
+          std::cout << "step-length limitation" << std::endl;
+          fProcessSequence.DoSecondaries(secondaries);
+        }
+
+        [[maybe_unused]] auto const assertion = [&] {
+          auto const* numericalNodeAfterStep =
+              fEnvironment.GetUniverse()->GetContainingNode(vParticle.GetPosition());
+          return numericalNodeAfterStep == currentLogicalNode;
+        };
+
+        assert(assertion()); // numerical and logical nodes don't match
+      } else {               // boundary crossing, step is limited by volume boundary
+        std::cout << "boundary crossing! next node = " << nextVol << std::endl;
+        vParticle.SetNode(nextVol);
+        // DoBoundary may delete the particle (or not)
+        fProcessSequence.DoBoundaryCrossing(vParticle, *currentLogicalNode, *nextVol);
+      }
+    }
+
+    template <typename TTracking, typename TProcessList, typename TStack, typename TStackView>
+    auto Cascade<TTracking, TProcessList, TStack, TStackView >::decay(Particle& particle,
+               decltype(std::declval<TStackView>().GetProjectile()) projectile)
+    {
+      std::cout << "decay" << std::endl;
+      units::si::InverseTimeType const actual_decay_time =
+          fProcessSequence.GetTotalInverseLifetime(particle);
+
+      random::UniformRealDistribution<units::si::InverseTimeType> uniDist(
+          actual_decay_time);
+      const auto sample_process = uniDist(fRNG);
+      units::si::InverseTimeType inv_decay_count = units::si::InverseTimeType::zero();
+      return fProcessSequence.SelectDecay(particle, projectile, sample_process,
+                                          inv_decay_count);
+    }
+
+    template <typename TTracking, typename TProcessList, typename TStack, typename TStackView>
+    auto Cascade<TTracking, TProcessList, TStack, TStackView >::interaction(particle_type& particle,
+                     decltype(std::declval<TStackView>().GetProjectile()) projectile)
+    {
+      std::cout << "collide" << std::endl;
+
+      units::si::InverseGrammageType const current_inv_length =
+          fProcessSequence.GetTotalInverseInteractionLength(particle);
+
+      random::UniformRealDistribution<units::si::InverseGrammageType> uniDist(
+          current_inv_length);
+      const auto sample_process = uniDist(fRNG);
+      auto inv_lambda_count = units::si::InverseGrammageType::zero();
+      return fProcessSequence.SelectInteraction(particle, projectile, sample_process,
+                                                inv_lambda_count);
+    }
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/BaseVector.inl b/corsika/detail/framework/geometry/BaseVector.inl
new file mode 100644
index 0000000000000000000000000000000000000000..b1b7361ceb8943e80441986e4962acb20bd9302f
--- /dev/null
+++ b/corsika/detail/framework/geometry/BaseVector.inl
@@ -0,0 +1,26 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
+#include <corsika/framework/geometry/QuantityVector.hpp>
+
+namespace corsika {
+
+	template <typename dim>
+	auto const& BaseVector<dim>::GetCoordinateSystem() const
+	{
+		return *cs;
+	}
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/CoordinateSystem.inl b/corsika/detail/framework/geometry/CoordinateSystem.inl
new file mode 100644
index 0000000000000000000000000000000000000000..732f44e0955c8613c42dd793dbd4b0f6db04bca3
--- /dev/null
+++ b/corsika/detail/framework/geometry/CoordinateSystem.inl
@@ -0,0 +1,152 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/QuantityVector.hpp>
+#include <Eigen/Dense>
+#include <stdexcept>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/utility/sgn.hpp>
+
+
+namespace corsika {
+
+
+    CoordinateSystem& CoordinateSystem::operator=(const corsika::CoordinateSystem& pCS)
+    {
+      reference = pCS.reference;
+      transf = pCS.transf;
+      return *this;
+    }
+
+    inline CoordinateSystem CoordinateSystem::translate(QuantityVector<length_d> vector) const
+    {
+      EigenTransform const translation{EigenTranslation(vector.eVector)};
+
+      return CoordinateSystem(*this, translation);
+    }
+
+    template <typename TDim>
+    auto CoordinateSystem::RotateToZ(Vector<TDim> vVec) const
+    {
+      auto const a = vVec.normalized().GetComponents(*this).eVector;
+      auto const a1 = a(0), a2 = a(1);
+
+      auto const s = corsika::sgn(a(2));
+      auto const c = 1 / (1 + s * a(2));
+
+      Eigen::Matrix3d A, B;
+
+      if (s > 0) {
+        A << 1, 0, -a1,                     // comment to prevent clang-format
+            0, 1, -a2,                      // .
+            a1, a2, 1;                      // .
+        B << -a1 * a1 * c, -a1 * a2 * c, 0, // .
+            -a1 * a2 * c, -a2 * a2 * c, 0,  // .
+            0, 0, -(a1 * a1 + a2 * a2) * c; // .
+
+      } else {
+        A << 1, 0, a1,                      // .
+            0, -1, -a2,                     // .
+            a1, a2, -1;                     // .
+        B << -a1 * a1 * c, -a1 * a2 * c, 0, // .
+            +a1 * a2 * c, +a2 * a2 * c, 0,  // .
+            0, 0, (a1 * a1 + a2 * a2) * c;  // .
+      }
+
+      return CoordinateSystem(*this, EigenTransform(A + B));
+    }
+
+    template <typename TDim>
+    auto CoordinateSystem::rotate(QuantityVector<TDim> axis, double angle) const
+    {
+      if (axis.eVector.isZero()) {
+        throw std::runtime_error("null-vector given as axis parameter");
+      }
+
+      EigenTransform const rotation{Eigen::AngleAxisd(angle, axis.eVector.normalized())};
+
+      return CoordinateSystem(*this, rotation);
+    }
+
+    template <typename TDim>
+    auto CoordinateSystem::translateAndRotate(QuantityVector<phys::units::length_d> translation, QuantityVector<TDim> axis, double angle)
+    {
+      if (axis.eVector.isZero()) {
+        throw std::runtime_error("null-vector given as axis parameter");
+      }
+
+      EigenTransform const transf{Eigen::AngleAxisd(angle, axis.eVector.normalized()) *
+                                  EigenTranslation(translation.eVector)};
+
+      return CoordinateSystem(*this, transf);
+    }
+
+    CoordinateSystem const* CoordinateSystem::GetReference() const
+    {
+    	return reference;
+    }
+
+    const EigenTransform& CoordinateSystem::GetTransform() const
+    {
+    	return transf;
+    }
+
+    /**
+     * returns the transformation matrix necessary to transform primitives with coordinates
+     * in \a pFrom to \a pTo, e.g.
+     * \f$ \vec{v}^{\text{(to)}} = \mathcal{M} \vec{v}^{\text{(from)}} \f$
+     * (\f$ \vec{v}^{(.)} \f$ denotes the coordinates/components of the component in
+     * the indicated CoordinateSystem).
+     */
+    inline EigenTransform getTransformation(CoordinateSystem const& pFrom,
+                                                                                          CoordinateSystem const& pTo) {
+      CoordinateSystem const* a{&pFrom};
+      CoordinateSystem const* b{&pTo};
+      CoordinateSystem const* commonBase{nullptr};
+
+      while (a != b && b != nullptr) {
+        a = &pFrom;
+
+        while (a != b && a != nullptr) { a = a->GetReference(); }
+
+        if (a == b) break;
+
+        b = b->GetReference();
+      }
+
+      if (a == b && a != nullptr) {
+        commonBase = a;
+
+      } else {
+        throw std::runtime_error("no connection between coordinate systems found!");
+      }
+
+      EigenTransform t = EigenTransform::Identity();
+      auto* p = &pFrom;
+
+      while (p != commonBase) {
+        t = p->GetTransform() * t;
+        p = p->GetReference();
+      }
+
+      p = &pTo;
+
+      while (p != commonBase) {
+        t = t * p->GetTransform().inverse(Eigen::TransformTraits::Isometry);
+        p = p->GetReference();
+      }
+
+      return t;
+    }
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/FourVector.inl b/corsika/detail/framework/geometry/FourVector.inl
new file mode 100644
index 0000000000000000000000000000000000000000..4d629b65964cf5dc398f586fa8439b2c88a2296d
--- /dev/null
+++ b/corsika/detail/framework/geometry/FourVector.inl
@@ -0,0 +1,189 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <iostream>
+#include <type_traits>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+
+
+namespace corsika {
+
+
+	template <typename TimeType, typename SpaceVecType>
+    TimeType FourVector<TimeType, SpaceVecType>::GetTimeLikeComponent() const
+    {
+    	return fTimeLike;
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+    SpaceVecType& FourVector<TimeType, SpaceVecType>::GetSpaceLikeComponents()
+	{
+		return fSpaceLike;
+	}
+
+
+	template <typename TimeType, typename SpaceVecType>
+    const SpaceVecType& FourVector<TimeType, SpaceVecType>::GetSpaceLikeComponents() const
+	{
+		return fSpaceLike;
+	}
+
+	template <typename TimeType, typename SpaceVecType>
+    auto FourVector<TimeType, SpaceVecType>::GetNormSqr() const
+	{
+		return GetTimeSquared() - fSpaceLike.squaredNorm();
+	}
+
+	template <typename TimeType, typename SpaceVecType>
+	typename FourVector<TimeType, SpaceVecType>::SpaceType
+	FourVector<TimeType, SpaceVecType>::GetNorm() const
+	{
+
+		return sqrt(abs(GetNormSqr()));
+	}
+
+	template <typename TimeType, typename SpaceVecType>
+    bool FourVector<TimeType, SpaceVecType>::IsTimelike() const
+	{
+      return GetTimeSquared() < fSpaceLike.squaredNorm();
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+    bool FourVector<TimeType, SpaceVecType>::IsSpacelike() const {
+      return GetTimeSquared() > fSpaceLike.squaredNorm();
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+    FourVector<TimeType, SpaceVecType>&
+	FourVector<TimeType, SpaceVecType>::operator+=(const FourVector& b)
+	{
+      fTimeLike += b.fTimeLike;
+      fSpaceLike += b.fSpaceLike;
+
+      return *this;
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+    FourVector<TimeType, SpaceVecType>&
+	FourVector<TimeType, SpaceVecType>::operator-=(const FourVector& b)
+	{
+      fTimeLike -= b.fTimeLike;
+      fSpaceLike -= b.fSpaceLike;
+      return *this;
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+    FourVector<TimeType, SpaceVecType>&
+	FourVector<TimeType, SpaceVecType>::operator*=(const double b)
+	{
+      fTimeLike *= b;
+      fSpaceLike *= b;
+      return *this;
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+    FourVector<TimeType, SpaceVecType>&
+	FourVector<TimeType, SpaceVecType>::operator/=(const double b)
+	{
+      fTimeLike /= b;
+      fSpaceLike.GetComponents() /= b; // TODO: WHY IS THIS??????
+      return *this;
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+    FourVector<TimeType, SpaceVecType>&
+	FourVector<TimeType, SpaceVecType>::operator/(const double b)
+	{
+      *this /= b;
+      return *this;
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+	typename FourVector<TimeType, SpaceVecType>::SpaceType
+	FourVector<TimeType, SpaceVecType>::operator*(const FourVector& b)
+	{
+      if constexpr (std::is_same<typename std::decay<TimeType>::type,
+                                 decltype(std::declval<SpaceType>() /
+                                          corsika::units::si::meter *
+                                          corsika::units::si::second)>::value)
+        return fTimeLike * b.fTimeLike *
+                   (corsika::units::constants::c * corsika::units::constants::c) -
+               fSpaceLike.norm();
+      else
+        return fTimeLike * fTimeLike - fSpaceLike.norm();
+    }
+
+	template <typename TimeType, typename SpaceVecType>
+    auto FourVector<TimeType, SpaceVecType>::GetTimeSquared() const
+	{
+      if constexpr (std::is_same<typename std::decay<TimeType>::type,
+                                 decltype(std::declval<SpaceType>() /
+                                          corsika::units::si::meter *
+                                          corsika::units::si::second)>::value)
+        return fTimeLike * fTimeLike *
+               (corsika::units::constants::c * corsika::units::constants::c);
+      else
+        return fTimeLike * fTimeLike;
+    }
+
+  /**
+      The math operator+
+   */
+  template <typename TimeType, typename SpaceVecType>
+  inline FourVector<typename std::decay<TimeType>::type, typename std::decay<SpaceVecType>::type>
+  operator+(const FourVector<TimeType, SpaceVecType>& a, const FourVector<TimeType, SpaceVecType>& b)
+  {
+    return FourVector<typename std::decay<TimeType>::type,
+    		          typename std::decay<SpaceVecType>::type>(a.fTimeLike + b.fTimeLike, a.fSpaceLike + b.fSpaceLike);
+  }
+
+  /**
+     The math operator-
+  */
+  template <typename TimeType, typename SpaceVecType>
+  inline FourVector<typename std::decay<TimeType>::type,
+                    typename std::decay<SpaceVecType>::type>
+  operator-(const FourVector<TimeType, SpaceVecType>& a, const FourVector<TimeType, SpaceVecType>& b)
+  {
+    return FourVector<typename std::decay<TimeType>::type,
+                      typename std::decay<SpaceVecType>::type>(
+        a.fTimeLike - b.fTimeLike, a.fSpaceLike - b.fSpaceLike);
+  }
+
+  /**
+     The math operator*
+  */
+  template <typename TimeType, typename SpaceVecType>
+  inline FourVector<typename std::decay<TimeType>::type,
+                    typename std::decay<SpaceVecType>::type>
+  operator*(const FourVector<TimeType, SpaceVecType>& a, const double b)
+  {
+    return FourVector<typename std::decay<TimeType>::type,
+                      typename std::decay<SpaceVecType>::type>(a.fTimeLike * b,
+                                                               a.fSpaceLike * b);
+  }
+
+  /**
+      The math operator/
+   */
+  template <typename TimeType, typename SpaceVecType>
+  inline FourVector<typename std::decay<TimeType>::type,
+                    typename std::decay<SpaceVecType>::type>
+  operator/(const FourVector<TimeType, SpaceVecType>& a, const double b) {
+    return FourVector<typename std::decay<TimeType>::type,
+                      typename std::decay<SpaceVecType>::type>(a.fTimeLike / b,
+                                                               a.fSpaceLike / b);
+  }
+
+} // namespace corsika
diff --git a/corsika/detail/framework/geometry/Helix.inl b/corsika/detail/framework/geometry/Helix.inl
new file mode 100644
index 0000000000000000000000000000000000000000..103aac9826c6e314e3b7b5e42ba0cf8e0f34152e
--- /dev/null
+++ b/corsika/detail/framework/geometry/Helix.inl
@@ -0,0 +1,51 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/Point.hpp>
+#include <cmath>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+namespace corsika {
+
+
+    Point Helix::GetPosition(corsika::units::si::TimeType t) const
+    {
+      return r0 + vPar * t +
+             (vPerp * (cos(omegaC * t) - 1) + uPerp * sin(omegaC * t)) / omegaC;
+    }
+
+    Point Helix::PositionFromArclength(corsika::units::si::LengthType l) const
+    {
+      return GetPosition(TimeFromArclength(l));
+    }
+
+    units::si::LengthType Helix::GetRadius() const
+    {
+    	return radius;
+    }
+
+    corsika::units::si::LengthType
+    Helix::ArcLength(corsika::units::si::TimeType t1, corsika::units::si::TimeType t2) const
+    {
+      return (vPar + vPerp).norm() * (t2 - t1);
+    }
+
+    corsika::units::si::TimeType
+	Helix::TimeFromArclength(corsika::units::si::LengthType l) const
+    {
+      return l / (vPar + vPerp).norm();
+    }
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/Line.inl b/corsika/detail/framework/geometry/Line.inl
new file mode 100644
index 0000000000000000000000000000000000000000..5446bad4e52e002754d734cee62fac6a44548b95
--- /dev/null
+++ b/corsika/detail/framework/geometry/Line.inl
@@ -0,0 +1,54 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+namespace corsika {
+
+
+    Point Line::GetPosition(units::si::TimeType t) const
+    {
+    	return r0 + v0 * t;
+    }
+
+    Point Line::PositionFromArclength(units::si::LengthType l) const
+    {
+      return r0 + v0.normalized() * l;
+    }
+
+    units::si::LengthType
+	Line::ArcLength(units::si::TimeType t1, units::si::TimeType t2) const
+    {
+      return v0.norm() * (t2 - t1);
+    }
+
+    units::si::TimeType
+	Line::TimeFromArclength( units::si::LengthType t) const
+    {
+      return t / v0.norm();
+    }
+
+    const Point& Line::GetR0() const
+    {
+    	return r0;
+    }
+
+    const Line::VelocityVec& Line::GetV0() const
+    {
+    	return v0;
+    }
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/Plane.inl b/corsika/detail/framework/geometry/Plane.inl
new file mode 100644
index 0000000000000000000000000000000000000000..f2170b48ea1cebd0076f13bee6fcc513c06ebf3f
--- /dev/null
+++ b/corsika/detail/framework/geometry/Plane.inl
@@ -0,0 +1,42 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+namespace corsika {
+
+
+    bool Plane::IsAbove(Point const& vP) const
+    {
+      return fNormal.dot(vP - fCenter) > corsika::units::si::LengthType::zero();
+    }
+
+    units::si::LengthType Plane::DistanceTo(geometry::Point const& vP) const
+    {
+      return (fNormal * (vP - fCenter).dot(fNormal)).norm();
+    }
+
+    Point const& Plane::GetCenter() const
+    {
+    	return fCenter;
+    }
+
+    Plane::DimLessVec const& Plane::GetNormal() const
+    {
+    	return fNormal;
+    }
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/Point.inl b/corsika/detail/framework/geometry/Point.inl
new file mode 100644
index 0000000000000000000000000000000000000000..b2c01105b2c152943f18ed698529c71697079d4b
--- /dev/null
+++ b/corsika/detail/framework/geometry/Point.inl
@@ -0,0 +1,82 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/BaseVector.hpp>
+#include <corsika/framework/geometry/QuantityVector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+namespace corsika {
+
+
+    // TODO: this should be private or protected, we don NOT want to expose numbers
+    // without reference to outside:
+    auto Point::GetCoordinates() const
+    {
+    	return BaseVector<length_d>::qVector;
+    }
+
+    auto Point::GetX() const
+    {
+    	return BaseVector<length_d>::qVector.GetX();
+    }
+
+    auto Point::GetY() const
+    {
+    	return BaseVector<length_d>::qVector.GetY();
+    }
+
+    auto Point::GetZ() const
+    {
+    	return BaseVector<length_d>::qVector.GetZ();
+    }
+
+    /// this always returns a QuantityVector as triple
+    auto Point::GetCoordinates( CoordinateSystem const& pCS) const
+    {
+      if (&pCS == BaseVector<length_d>::cs) {
+        return BaseVector<length_d>::qVector;
+      } else {
+        return QuantityVector<length_d>(
+            getTransformation(*BaseVector<length_d>::cs, pCS) *
+            BaseVector<length_d>::qVector.eVector);
+      }
+    }
+
+    /*!
+     * transforms the Point into another CoordinateSystem by changing its
+     * coordinates interally
+     */
+    void Point::rebase(CoordinateSystem const& pCS)
+    {
+      BaseVector<length_d>::qVector = GetCoordinates(pCS);
+      BaseVector<length_d>::cs = &pCS;
+    }
+
+    Point Point::operator+(Vector<length_d> const& pVec) const
+    {
+      return Point(*BaseVector<length_d>::cs,
+                   GetCoordinates() + pVec.GetComponents(*BaseVector<length_d>::cs));
+    }
+
+    /*!
+     * returns the distance Vector between two points
+     */
+    Vector<length_d> Point::operator-( Point const& pB) const
+    {
+      auto& cs = *BaseVector<length_d>::cs;
+      return Vector<length_d>(cs, GetCoordinates() - pB.GetCoordinates(cs));
+    }
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/QuantityVector.inl b/corsika/detail/framework/geometry/QuantityVector.inl
new file mode 100644
index 0000000000000000000000000000000000000000..9ac8513a93f7334ecbbe2140bf77cf89dcc630b9
--- /dev/null
+++ b/corsika/detail/framework/geometry/QuantityVector.inl
@@ -0,0 +1,152 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <Eigen/Dense>
+
+#include <iostream>
+#include <utility>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika {
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::operator[](size_t index) const {
+      return Quantity(phys::units::detail::magnitude_tag, eVector[index]);
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::GetX() const
+    {
+    	return (*this)[0];
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::GetY() const
+    {
+    	return (*this)[1];
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::GetZ() const
+    {
+    	return (*this)[2];
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::norm() const
+    {
+      return Quantity(phys::units::detail::magnitude_tag, eVector.norm());
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::squaredNorm() const
+    {
+      using QuantitySquared =
+          decltype(std::declval<Quantity>() * std::declval<Quantity>());
+      return QuantitySquared(phys::units::detail::magnitude_tag, eVector.squaredNorm());
+    }
+
+    template <typename dim>
+    inline auto  QuantityVector<dim>::operator+(QuantityVector<dim> const& pQVec) const
+    {
+      return QuantityVector<dim>(eVector + pQVec.eVector);
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::operator-(QuantityVector<dim> const& pQVec) const
+    {
+      return QuantityVector<dim>(eVector - pQVec.eVector);
+    }
+
+    template <typename dim>
+    template <typename ScalarDim>
+    inline auto QuantityVector<dim>::operator*(phys::units::quantity<ScalarDim, double> const p) const
+    {
+      using ResQuantity = phys::units::detail::Product<ScalarDim, dim, double, double>;
+
+      if constexpr (std::is_same<ResQuantity, double>::value) // result dimensionless, not
+                                                              // a "Quantity" anymore
+      {
+        return QuantityVector<phys::units::dimensionless_d>(eVector * p.magnitude());
+      } else {
+        return QuantityVector<typename ResQuantity::dimension_type>(eVector *
+                                                                    p.magnitude());
+      }
+    }
+
+    template <typename dim>
+    template <typename ScalarDim>
+    inline auto QuantityVector<dim>::operator/(phys::units::quantity<ScalarDim, double> const p) const
+    {
+      return (*this) * (1 / p);
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::operator*(double const p) const
+    {
+    	return QuantityVector<dim>(eVector * p);
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::operator/(double const p) const
+    {
+    	return QuantityVector<dim>(eVector / p);
+    }
+
+    template <typename dim>
+    inline auto& QuantityVector<dim>::operator/=(double const p) {
+      eVector /= p;
+      return *this;
+    }
+
+    template <typename dim>
+    inline auto& QuantityVector<dim>::operator*=(double const p) {
+      eVector *= p;
+      return *this;
+    }
+
+    template <typename dim>
+    inline auto& QuantityVector<dim>::operator+=(QuantityVector<dim> const& pQVec) {
+      eVector += pQVec.eVector;
+      return *this;
+    }
+
+    template <typename dim>
+    inline auto& QuantityVector<dim>::operator-=(QuantityVector<dim> const& pQVec) {
+      eVector -= pQVec.eVector;
+      return *this;
+    }
+
+    template <typename dim>
+    inline auto& QuantityVector<dim>::operator-() const {
+    	return QuantityVector<dim>(-eVector);
+    }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::normalized() const { return QuantityVector<dim>(eVector.normalized()); }
+
+    template <typename dim>
+    inline auto QuantityVector<dim>::operator==(QuantityVector<dim> const& p) const { return eVector == p.eVector; }
+
+
+  template <typename dim>
+  inline auto& operator<<(std::ostream& os, corsika::QuantityVector<dim> qv) {
+    using Quantity = phys::units::quantity<dim, double>;
+
+    os << '(' << qv.eVector(0) << ' ' << qv.eVector(1) << ' ' << qv.eVector(2) << ") "
+       << phys::units::to_unit_symbol<dim, double>(
+              Quantity(phys::units::detail::magnitude_tag, 1));
+    return os;
+  }
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/Sphere.inl b/corsika/detail/framework/geometry/Sphere.inl
new file mode 100644
index 0000000000000000000000000000000000000000..68e10467c1e9bf048f6b117ee934812027ff8ef7
--- /dev/null
+++ b/corsika/detail/framework/geometry/Sphere.inl
@@ -0,0 +1,36 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Volume.hpp>
+
+namespace corsika {
+
+    //! returns true if the Point p is within the sphere
+    bool Sphere::Contains(Point const& p) const
+    {
+      return fRadius * fRadius > (fCenter - p).squaredNorm();
+    }
+
+    const Point& Sphere::GetCenter() const
+    {
+    	return fCenter;
+    }
+
+    units::si::LengthType Sphere::GetRadius() const
+    {
+    	return fRadius;
+    }
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/geometry/Trajectory.inl b/corsika/detail/framework/geometry/Trajectory.inl
new file mode 100644
index 0000000000000000000000000000000000000000..8a34d758daa2120bbea9081331a4cd184d1884f8
--- /dev/null
+++ b/corsika/detail/framework/geometry/Trajectory.inl
@@ -0,0 +1,61 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika {
+
+    template <typename T>
+    Point Trajectory<T>::GetPosition(double u) const
+    {
+    	return T::GetPosition(fTimeLength * u);
+    }
+
+    template <typename T>
+    corsika::units::si::TimeType Trajectory<T>::GetDuration() const
+    {
+    	return fTimeLength;
+    }
+
+    template <typename T>
+    corsika::units::si::LengthType Trajectory<T>::GetLength() const
+    {
+    	return GetDistance(fTimeLength);
+    }
+
+    template <typename T>
+    corsika::units::si::LengthType Trajectory<T>::GetDistance(corsika::units::si::TimeType t) const
+    {
+      assert(t <= fTimeLength);
+      assert(t >= 0 * corsika::units::si::second);
+      return T::ArcLength(0 * corsika::units::si::second, t);
+    }
+
+    template <typename T>
+    void Trajectory<T>::LimitEndTo(corsika::units::si::LengthType limit)
+    {
+      fTimeLength = T::TimeFromArclength(limit);
+    }
+
+    template <typename T>
+    auto Trajectory<T>::NormalizedDirection() const
+    {
+      static_assert(std::is_same_v<T, corsika::Line>);
+      return T::GetV0().normalized();
+    }
+
+
+} // namespace corsika
+
+
diff --git a/corsika/detail/framework/geometry/Vector.inl b/corsika/detail/framework/geometry/Vector.inl
new file mode 100644
index 0000000000000000000000000000000000000000..419bce29833971ded68824ba242763690392ba18
--- /dev/null
+++ b/corsika/detail/framework/geometry/Vector.inl
@@ -0,0 +1,195 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/BaseVector.hpp>
+#include <corsika/framework/geometry/QuantityVector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+
+namespace corsika {
+
+
+    template <typename dim>
+    auto Vector<dim>::GetComponents() const
+    {
+    	return BaseVector<dim>::qVector;
+    }
+
+
+    template <typename dim>
+    auto Vector<dim>::GetComponents(CoordinateSystem const& pCS) const
+    {
+      if (&pCS == BaseVector<dim>::cs) {
+        return BaseVector<dim>::qVector;
+      } else {
+        return QuantityVector<dim>(
+            getTransformation(*BaseVector<dim>::cs, pCS).linear() *
+            BaseVector<dim>::qVector.eVector);
+      }
+    }
+
+    template <typename dim>
+    void Vector<dim>::rebase(CoordinateSystem const& pCS)
+    {
+      BaseVector<dim>::qVector = GetComponents(pCS);
+      BaseVector<dim>::cs = &pCS;
+    }
+
+    template <typename dim>
+    auto Vector<dim>::norm() const
+    {
+    	return BaseVector<dim>::qVector.norm();
+    }
+
+    template <typename dim>
+    auto Vector<dim>::GetNorm() const
+    {
+    	return BaseVector<dim>::qVector.norm();
+    }
+
+    template <typename dim>
+    auto Vector<dim>::squaredNorm() const
+    {
+    	return BaseVector<dim>::qVector.squaredNorm();
+    }
+
+    template <typename dim>
+    auto Vector<dim>::GetSquaredNorm() const
+    {
+    	return BaseVector<dim>::qVector.squaredNorm();
+    }
+
+    template <typename dim>
+    template <typename dim2>
+    auto Vector<dim>::parallelProjectionOnto(Vector<dim2> const& pVec,
+                                CoordinateSystem const& pCS) const
+    {
+      auto const ourCompVec = GetComponents(pCS);
+      auto const otherCompVec = pVec.GetComponents(pCS);
+      auto const& a = ourCompVec.eVector;
+      auto const& b = otherCompVec.eVector;
+
+      return Vector<dim>(pCS, QuantityVector<dim>(b * ((a.dot(b)) / b.squaredNorm())));
+    }
+
+    template <typename dim>
+    template <typename dim2>
+    auto Vector<dim>::parallelProjectionOnto(Vector<dim2> const& pVec) const
+    {
+      return parallelProjectionOnto<dim2>(pVec, *BaseVector<dim>::cs);
+    }
+
+    template <typename dim>
+    auto Vector<dim>::operator+(Vector<dim> const& pVec) const
+    {
+      auto const components =
+          GetComponents(*BaseVector<dim>::cs) + pVec.GetComponents(*BaseVector<dim>::cs);
+      return Vector<dim>(*BaseVector<dim>::cs, components);
+    }
+
+    template <typename dim>
+    auto Vector<dim>::operator-(Vector<dim> const& pVec) const
+    {
+      auto const components = GetComponents() - pVec.GetComponents(*BaseVector<dim>::cs);
+      return Vector<dim>(*BaseVector<dim>::cs, components);
+    }
+
+    template <typename dim>
+    auto&  Vector<dim>::operator*=(double const p)
+	{
+      BaseVector<dim>::qVector *= p;
+      return *this;
+    }
+
+    template <typename dim>
+    template <typename ScalarDim>
+    auto  Vector<dim>::operator*(phys::units::quantity<ScalarDim, double> const p) const
+    {
+      using ProdDim = phys::units::detail::product_d<dim, ScalarDim>;
+
+      return Vector<ProdDim>(*BaseVector<dim>::cs, BaseVector<dim>::qVector * p);
+    }
+
+    template <typename dim>
+    template <typename ScalarDim>
+    auto Vector<dim>::operator/(phys::units::quantity<ScalarDim, double> const p) const
+    {
+      return (*this) * (1 / p);
+    }
+
+    template <typename dim>
+    auto Vector<dim>::operator*(double const p) const
+    {
+      return Vector<dim>(*BaseVector<dim>::cs, BaseVector<dim>::qVector * p);
+    }
+
+    template <typename dim>
+    auto Vector<dim>::operator/(double const p) const
+    {
+      return Vector<dim>(*BaseVector<dim>::cs, BaseVector<dim>::qVector / p);
+    }
+
+    template <typename dim>
+    auto& Vector<dim>::operator+=(Vector<dim> const& pVec)
+	{
+      BaseVector<dim>::qVector += pVec.GetComponents(*BaseVector<dim>::cs);
+      return *this;
+    }
+
+    template <typename dim>
+    auto& Vector<dim>::operator-=(Vector<dim> const& pVec)
+	{
+      BaseVector<dim>::qVector -= pVec.GetComponents(*BaseVector<dim>::cs);
+      return *this;
+    }
+
+    template <typename dim>
+    auto& Vector<dim>::operator-() const
+    {
+      return Vector<dim>(*BaseVector<dim>::cs, -BaseVector<dim>::qVector);
+    }
+
+    template <typename dim>
+    auto Vector<dim>::normalized() const
+    {
+    	return (*this) * (1 / norm());
+    }
+
+    template <typename dim>
+    template <typename dim2>
+    auto Vector<dim>::cross(Vector<dim2> pV) const
+    {
+      auto const c1 = GetComponents().eVector;
+      auto const c2 = pV.GetComponents(*BaseVector<dim>::cs).eVector;
+      auto const bareResult = c1.cross(c2);
+
+      using ProdDim = phys::units::detail::product_d<dim, dim2>;
+      return Vector<ProdDim>(*BaseVector<dim>::cs, bareResult);
+    }
+
+    template <typename dim>
+    template <typename dim2>
+    auto Vector<dim>::dot(Vector<dim2> pV) const
+    {
+      auto const c1 = GetComponents().eVector;
+      auto const c2 = pV.GetComponents(*BaseVector<dim>::cs).eVector;
+      auto const bareResult = c1.dot(c2);
+
+      using ProdDim = phys::units::detail::product_d<dim, dim2>;
+
+      return phys::units::quantity<ProdDim, double>(phys::units::detail::magnitude_tag,
+                                                    bareResult);
+    }
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/random/RNGManager.inl b/corsika/detail/framework/random/RNGManager.inl
new file mode 100644
index 0000000000000000000000000000000000000000..8bc88135b1d0122e1668f85c34780d1104b91ece
--- /dev/null
+++ b/corsika/detail/framework/random/RNGManager.inl
@@ -0,0 +1,59 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+
+namespace corsika {
+
+	void RNGManager::RegisterRandomStream(std::string const& pStreamName)
+	{
+	  RNG rng;
+
+	  if (auto const& it = seeds.find(pStreamName); it != seeds.end()) {
+	    rng.seed(it->second);
+	  }
+
+	  rngs[pStreamName] = std::move(rng);
+	}
+
+	RNG& RNGManager::GetRandomStream
+	(
+	    std::string const& pStreamName) {
+	  return rngs.at(pStreamName);
+	}
+
+	std::stringstream RNGManager::dumpState() const
+	{
+	  std::stringstream buffer;
+	  for (auto const& [streamName, rng] : rngs) {
+	    buffer << '"' << streamName << "\" = \"" << rng << '"' << std::endl;
+	  }
+
+	  return buffer;
+	}
+
+	void RNGManager::SeedAll(uint64_t vSeed)
+	{
+	  for (auto& entry : rngs) { entry.second.seed(vSeed++); }
+	}
+
+	void RNGManager::SeedAll()
+	{
+	  std::random_device rd;
+
+	  for (auto& entry : rngs) {
+	    std::seed_seq sseq{rd(), rd(), rd(), rd(), rd(), rd()};
+	    entry.second.seed(sseq);
+	  }
+	}
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/sequence/ProcessSequence.inl b/corsika/detail/framework/sequence/ProcessSequence.inl
new file mode 100644
index 0000000000000000000000000000000000000000..60295fd8b9be57b425df17165c8259f9cbb2ad9b
--- /dev/null
+++ b/corsika/detail/framework/sequence/ProcessSequence.inl
@@ -0,0 +1,258 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/sequence/BaseProcess.hpp>
+#include <corsika/framework/sequence/BoundaryCrossingProcess.hpp>
+#include <corsika/framework/sequence/DecayProcess.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/sequence/StackProcess.hpp>
+#include <cmath>
+#include <limits>
+#include <type_traits>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/sequence/ContinuousProcess.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp>
+#include <corsika/framework/sequence/SecondariesProcess.hpp>
+
+namespace corsika {
+
+
+
+	template <typename T1, typename T2>
+	template <typename Particle, typename VTNType>
+	EProcessReturn ProcessSequence<T1, T2>::DoBoundaryCrossing(Particle& p, VTNType const& from,
+			VTNType const& to) {
+		EProcessReturn ret = EProcessReturn::eOk;
+
+		if constexpr (std::is_base_of<BoundaryCrossingProcess<T1type>, T1type>::value ||
+				t1ProcSeq) {
+			ret |= A.DoBoundaryCrossing(p, from, to);
+		}
+
+		if constexpr (std::is_base_of<BoundaryCrossingProcess<T2type>, T2type>::value ||
+				t2ProcSeq) {
+			ret |= B.DoBoundaryCrossing(p, from, to);
+		}
+
+		return ret;
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle, typename TTrack>
+	EProcessReturn ProcessSequence<T1, T2>::DoContinuous(TParticle& vP, TTrack& vT) {
+		EProcessReturn ret = EProcessReturn::eOk;
+		if constexpr (std::is_base_of<ContinuousProcess<T1type>, T1type>::value || t1ProcSeq) {
+
+			ret |= A.DoContinuous(vP, vT);
+		}
+		if constexpr (std::is_base_of<ContinuousProcess<T2type>, T2type>::value || t2ProcSeq) {
+			ret |= B.DoContinuous(vP, vT);
+		}
+		return ret;
+	}
+
+	template <typename T1, typename T2>
+	template <typename TSecondaries>
+	EProcessReturn ProcessSequence<T1, T2>::DoSecondaries(TSecondaries& vS) {
+		EProcessReturn ret = EProcessReturn::eOk;
+		if constexpr (std::is_base_of<SecondariesProcess<T1type>, T1type>::value || t1ProcSeq) {
+			ret |= A.DoSecondaries(vS);
+		}
+		if constexpr (std::is_base_of<SecondariesProcess<T2type>, T2type>::value || t2ProcSeq) {
+			ret |= B.DoSecondaries(vS);
+		}
+		return ret;
+	}
+
+	template <typename T1, typename T2>
+	bool ProcessSequence<T1, T2>::CheckStep() {
+		bool ret = false;
+		if constexpr (std::is_base_of<StackProcess<T1type>, T1type>::value || t1ProcSeq) {
+			ret |= A.CheckStep();
+		}
+		if constexpr (std::is_base_of<StackProcess<T2type>, T2type>::value || t2ProcSeq) {
+			ret |= B.CheckStep();
+		}
+		return ret;
+	}
+
+	template <typename T1, typename T2>
+	template <typename TStack>
+	EProcessReturn ProcessSequence<T1, T2>::DoStack(TStack& vS) {
+		EProcessReturn ret = EProcessReturn::eOk;
+		if constexpr (std::is_base_of<StackProcess<T1type>, T1type>::value || t1ProcSeq) {
+			if (A.CheckStep()) { ret |= A.DoStack(vS); }
+		}
+		if constexpr (std::is_base_of<StackProcess<T2type>, T2type>::value || t2ProcSeq) {
+			if (B.CheckStep()) { ret |= B.DoStack(vS); }
+		}
+		return ret;
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle, typename TTrack>
+	corsika::units::si::LengthType ProcessSequence<T1, T2>::MaxStepLength(TParticle& vP, TTrack& vTrack) {
+		corsika::units::si::LengthType
+		max_length = // if no other process in the sequence implements it
+		std::numeric_limits<double>::infinity() * corsika::units::si::meter;
+
+		if constexpr (std::is_base_of<ContinuousProcess<T1type>, T1type>::value || t1ProcSeq) {
+			corsika::units::si::LengthType const len = A.MaxStepLength(vP, vTrack);
+			max_length = std::min(max_length, len);
+		}
+		if constexpr (std::is_base_of<ContinuousProcess<T2type>, T2type>::value || t2ProcSeq) {
+			corsika::units::si::LengthType const len = B.MaxStepLength(vP, vTrack);
+			max_length = std::min(max_length, len);
+		}
+		return max_length;
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle>
+	corsika::units::si::GrammageType ProcessSequence<T1, T2>::GetTotalInteractionLength(TParticle& vP) {
+		return 1. / GetInverseInteractionLength(vP);
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle>
+	corsika::units::si::InverseGrammageType ProcessSequence<T1, T2>::GetTotalInverseInteractionLength(
+			TParticle& vP) {
+		return GetInverseInteractionLength(vP);
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle>
+	corsika::units::si::InverseGrammageType ProcessSequence<T1, T2>::GetInverseInteractionLength(TParticle& vP) {
+		corsika::units::si::InverseGrammageType tot = 0 * corsika::units::si::meter * corsika::units::si::meter / corsika::units::si::gram;
+
+		if constexpr (std::is_base_of<InteractionProcess<T1type>, T1type>::value || t1ProcSeq ||
+				t1SwitchProc) {
+			tot += A.GetInverseInteractionLength(vP);
+		}
+		if constexpr (std::is_base_of<InteractionProcess<T2type>, T2type>::value || t2ProcSeq ||
+				t2SwitchProc) {
+			tot += B.GetInverseInteractionLength(vP);
+		}
+		return tot;
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle, typename TSecondaries>
+	EProcessReturn ProcessSequence<T1, T2>::SelectInteraction(
+			TParticle& vP, TSecondaries& vS,
+			[[maybe_unused]] corsika::units::si::InverseGrammageType lambda_select,
+			corsika::units::si::InverseGrammageType& lambda_inv_count)
+	{
+
+		if constexpr (t1ProcSeq || t1SwitchProc) {
+			// if A is a process sequence --> check inside
+			const EProcessReturn ret =
+					A.SelectInteraction(vP, vS, lambda_select, lambda_inv_count);
+			// if A did succeed, stop routine
+			if (ret != EProcessReturn::eOk) { return ret; }
+		} else if constexpr (std::is_base_of<InteractionProcess<T1type>, T1type>::value ) {
+			// if this is not a ContinuousProcess --> evaluate probability
+			lambda_inv_count += A.GetInverseInteractionLength(vP);
+			// check if we should execute THIS process and then EXIT
+			if (lambda_select < lambda_inv_count) {
+				A.DoInteraction(vS);
+				return EProcessReturn::eInteracted;
+			}
+		} // end branch A
+
+		if constexpr (t2ProcSeq || t2SwitchProc) {
+			// if A is a process sequence --> check inside
+			const EProcessReturn ret =
+					B.SelectInteraction(vP, vS, lambda_select, lambda_inv_count);
+			// if A did succeed, stop routine
+			if (ret != EProcessReturn::eOk) { return ret; }
+		} else if constexpr (std::is_base_of<InteractionProcess<T2type>, T2type>::value) {
+			// if this is not a ContinuousProcess --> evaluate probability
+			lambda_inv_count += B.GetInverseInteractionLength(vP);
+			// check if we should execute THIS process and then EXIT
+			if (lambda_select < lambda_inv_count) {
+				B.DoInteraction(vS);
+				return EProcessReturn::eInteracted;
+			}
+		} // end branch A
+		return EProcessReturn::eOk;
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle>
+	corsika::units::si::TimeType ProcessSequence<T1, T2>::GetTotalLifetime(TParticle& p) {
+		return 1. / GetInverseLifetime(p);
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle>
+	corsika::units::si::InverseTimeType ProcessSequence<T1, T2>::GetTotalInverseLifetime(TParticle& p) {
+		return GetInverseLifetime(p);
+	}
+
+	template <typename T1, typename T2>
+	template <typename TParticle>
+	corsika::units::si::InverseTimeType ProcessSequence<T1, T2>::GetInverseLifetime(TParticle& p) {
+		corsika::units::si::InverseTimeType tot = 0 / corsika::units::si::second;
+
+		if constexpr (std::is_base_of<DecayProcess<T1type>, T1type>::value || t1ProcSeq) {
+			tot += A.GetInverseLifetime(p);
+		}
+		if constexpr (std::is_base_of<DecayProcess<T2type>, T2type>::value || t2ProcSeq) {
+			tot += B.GetInverseLifetime(p);
+		}
+		return tot;
+	}
+
+
+	template <typename T1, typename T2>
+	template <typename TParticle, typename TSecondaries>
+	EProcessReturn ProcessSequence<T1, T2>::SelectDecay(
+			TParticle& vP, TSecondaries& vS,
+			[[maybe_unused]] corsika::units::si::InverseTimeType decay_select,
+			corsika::units::si::InverseTimeType& decay_inv_count) {
+		if constexpr (t1ProcSeq) {
+			// if A is a process sequence --> check inside
+			const EProcessReturn ret = A.SelectDecay(vP, vS, decay_select, decay_inv_count);
+			// if A did succeed, stop routine
+			if (ret != EProcessReturn::eOk) { return ret; }
+		} else if constexpr (std::is_base_of<DecayProcess<T1type>, T1type>::value) {
+			// if this is not a ContinuousProcess --> evaluate probability
+			decay_inv_count += A.GetInverseLifetime(vP);
+			// check if we should execute THIS process and then EXIT
+			if (decay_select < decay_inv_count) { // more pedagogical: rndm_select <
+				// decay_inv_count / decay_inv_tot
+				A.DoDecay(vS);
+				return EProcessReturn::eDecayed;
+			}
+		} // end branch A
+
+		if constexpr (t2ProcSeq) {
+			// if A is a process sequence --> check inside
+			const EProcessReturn ret = B.SelectDecay(vP, vS, decay_select, decay_inv_count);
+			// if A did succeed, stop routine
+			if (ret != EProcessReturn::eOk) { return ret; }
+		} else if constexpr (std::is_base_of<DecayProcess<T2type>, T2type>::value) {
+			// if this is not a ContinuousProcess --> evaluate probability
+			decay_inv_count += B.GetInverseLifetime(vP);
+			// check if we should execute THIS process and then EXIT
+			if (decay_select < decay_inv_count) {
+				B.DoDecay(vS);
+				return EProcessReturn::eDecayed;
+			}
+		} // end branch B
+		return EProcessReturn::eOk;
+	}
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/stack/CombinedStack.inl b/corsika/detail/framework/stack/CombinedStack.inl
new file mode 100644
index 0000000000000000000000000000000000000000..48ff64e7152ea635ec4c339f39a7fca3c1092e0b
--- /dev/null
+++ b/corsika/detail/framework/stack/CombinedStack.inl
@@ -0,0 +1,119 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+
+namespace corsika {
+
+	template <template <typename> typename ParticleInterfaceA,
+	            template <typename> typename ParticleInterfaceB, typename StackIterator>
+    template <typename... Args1>
+    void CombinedParticleInterface<ParticleInterfaceA, ParticleInterfaceB,
+	                          StackIterator>::SetParticleData(const std::tuple<Args1...> vA) {
+      PI_A::SetParticleData(vA);
+      PI_B::SetParticleData();
+    }
+
+	template <template <typename> typename ParticleInterfaceA,
+		            template <typename> typename ParticleInterfaceB, typename StackIterator>
+    template <typename... Args1, typename... Args2>
+    void CombinedParticleInterface<ParticleInterfaceA, ParticleInterfaceB,
+    StackIterator>::SetParticleData(const std::tuple<Args1...> vA, const std::tuple<Args2...> vB) {
+      PI_A::SetParticleData(vA);
+      PI_B::SetParticleData(vB);
+    }
+
+	template <template <typename> typename ParticleInterfaceA,
+		            template <typename> typename ParticleInterfaceB, typename StackIterator>
+    template <typename... Args1>
+    void CombinedParticleInterface<ParticleInterfaceA, ParticleInterfaceB,
+    StackIterator>::SetParticleData(PI_C& p, const std::tuple<Args1...> vA) {
+      // static_assert(MT<I>::has_not, "error");
+      PI_A::SetParticleData(static_cast<PI_A&>(p), vA); // original stack
+      PI_B::SetParticleData(static_cast<PI_B&>(p));     // addon stack
+    }
+
+	template <template <typename> typename ParticleInterfaceA,
+		            template <typename> typename ParticleInterfaceB, typename StackIterator>
+    template <typename... Args1, typename... Args2>
+    void CombinedParticleInterface<ParticleInterfaceA, ParticleInterfaceB,
+    StackIterator>::SetParticleData(PI_C& p, const std::tuple<Args1...> vA,
+                         const std::tuple<Args2...> vB) {
+      PI_A::SetParticleData(static_cast<PI_A&>(p), vA);
+      PI_B::SetParticleData(static_cast<PI_B&>(p), vB);
+    }
+
+
+namespace detail {
+
+  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();
+    }
+
+  }; // end class CombinedStackImpl
+
+}  // namespace detail
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/stack/SecondaryView.inl b/corsika/detail/framework/stack/SecondaryView.inl
new file mode 100644
index 0000000000000000000000000000000000000000..13fa27de42303bee4e6f08709b947c07b9db2e97
--- /dev/null
+++ b/corsika/detail/framework/stack/SecondaryView.inl
@@ -0,0 +1,80 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <stdexcept>
+#include <vector>
+#include <corsika/framework/stack/Stack.hpp>
+
+namespace corsika {
+
+
+
+ // template <typename StackDataType, template <typename> typename ParticleInterface>
+ // SecondaryView<StackDataType, ParticleInterface>:
+
+
+
+	template <typename StackDataType, template <typename> typename ParticleInterface>
+    template <typename... Args>
+    auto SecondaryView<StackDataType, ParticleInterface>::AddSecondary(const Args... v) {
+      StackIterator proj = GetProjectile();
+      return AddSecondary(proj, v...);
+    }
+
+	template <typename StackDataType, template <typename> typename ParticleInterface>
+    template <typename... Args>
+    auto SecondaryView<StackDataType, ParticleInterface>::AddSecondary(StackIterator& proj, const Args... v) {
+      // make space on stack
+      InnerStackType::GetStackData().IncrementSize();
+      // get current number of secondaries on stack
+      const unsigned int idSec = GetSize();
+      // determine index on (inner) stack where new particle will be located
+      const unsigned int index = InnerStackType::GetStackData().GetSize() - 1;
+      fIndices.push_back(index);
+      // NOTE: "+1" is since "0" is special marker here for PROJECTILE, see
+      // GetIndexFromIterator
+      return StackIterator(*this, idSec + 1, proj, v...);
+    }
+
+
+
+	template <typename StackDataType, template <typename> typename ParticleInterface>
+    void SecondaryView<StackDataType, ParticleInterface>::Delete(StackIterator p) {
+      if (IsEmpty()) { /* error */
+        throw std::runtime_error("Stack, cannot delete entry since size is zero");
+      }
+      const int innerSize = InnerStackType::GetSize();
+      const int innerIndex = GetIndexFromIterator(p.GetIndex());
+      if (innerIndex < innerSize - 1)
+        InnerStackType::GetStackData().Copy(innerSize - 1,
+                                            GetIndexFromIterator(p.GetIndex()));
+      DeleteLast();
+    }
+
+    template <typename StackDataType, template <typename> typename ParticleInterface>
+    void SecondaryView<StackDataType, ParticleInterface>::Delete(ParticleInterfaceType p) { Delete(p.GetIterator()); }
+
+   template <typename StackDataType, template <typename> typename ParticleInterface>
+    void SecondaryView<StackDataType, ParticleInterface>::DeleteLast() {
+      fIndices.pop_back();
+      InnerStackType::GetStackData().DecrementSize();
+    }
+
+   template <typename StackDataType, template <typename> typename ParticleInterface>
+   unsigned int SecondaryView<StackDataType, ParticleInterface>::GetIndexFromIterator(const unsigned int vI) const {
+      if (vI == 0) return fProjectileIndex;
+      return fIndices[vI - 1];
+    }
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/framework/utility/COMBoost.inl b/corsika/detail/framework/utility/COMBoost.inl
new file mode 100644
index 0000000000000000000000000000000000000000..da63c03fe2e524fad74bb89c72723d3a873557d3
--- /dev/null
+++ b/corsika/detail/framework/utility/COMBoost.inl
@@ -0,0 +1,126 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/utility/sgn.hpp>
+#include <Eigen/Dense>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika {
+
+      auto const& COMBoost::GetRotationMatrix() const { return fRotation; }
+
+    //! transforms a 4-momentum from lab frame to the center-of-mass frame
+    template <typename FourVector>
+    FourVector COMBoost::toCoM(const FourVector& p) const {
+      using namespace corsika::units::si;
+      auto pComponents = p.GetSpaceLikeComponents().GetComponents(fCS);
+      Eigen::Vector3d eVecRotated = fRotation * pComponents.eVector;
+      Eigen::Vector2d lab;
+
+      lab << (p.GetTimeLikeComponent() * (1 / 1_GeV)),
+          (eVecRotated(2) * (1 / 1_GeV).magnitude());
+
+      auto const boostedZ = fBoost * lab;
+      auto const E_CoM = boostedZ(0) * 1_GeV;
+
+      eVecRotated(2) = boostedZ(1) * (1_GeV).magnitude();
+
+      return FourVector(E_CoM,
+                        corsika::Vector<corsika::units::si::hepmomentum_d>(fCS, eVecRotated));
+    }
+
+    //! transforms a 4-momentum from the center-of-mass frame back to lab frame
+    template <typename FourVector>
+    FourVector COMBoost::fromCoM(const FourVector& p) const {
+      using namespace corsika::units::si;
+      Eigen::Vector2d com;
+      com << (p.GetTimeLikeComponent() * (1 / 1_GeV)),
+          (p.GetSpaceLikeComponents().GetComponents().eVector(2) *
+           (1 / 1_GeV).magnitude());
+
+      auto const plab = p.GetSpaceLikeComponents().GetComponents();
+      std::cout << "COMBoost::fromCoM Ecm=" << p.GetTimeLikeComponent() / 1_GeV
+                << " GeV, "
+                << " pcm = " << plab / 1_GeV << " (norm = " << plab.norm() / 1_GeV
+                << " GeV), invariant mass = " << p.GetNorm() / 1_GeV << " GeV"
+                << std::endl;
+
+      auto const boostedZ = fInverseBoost * com;
+      auto const E_lab = boostedZ(0) * 1_GeV;
+
+      auto pLab = p.GetSpaceLikeComponents().GetComponents();
+      pLab.eVector(2) = boostedZ(1) * (1_GeV).magnitude();
+      pLab.eVector = fRotation.transpose() * pLab.eVector;
+
+      FourVector f(E_lab, corsika::Vector(fCS, pLab));
+
+      std::cout << "COMBoost::fromCoM --> Elab=" << E_lab / 1_GeV << "GeV, "
+                << " pcm = " << pLab / 1_GeV << " (norm =" << pLab.norm() / 1_GeV
+                << " GeV), invariant mass = " << f.GetNorm() / 1_GeV << " GeV"
+                << std::endl;
+
+      return f;
+    }
+
+    COMBoost::COMBoost(FourVector<corsika::units::si::HEPEnergyType, Vector<corsika::units::si::hepmomentum_d>> const& Pprojectile,
+                       const corsika::units::si::HEPMassType massTarget)
+        : fCS(Pprojectile.GetSpaceLikeComponents().GetCoordinateSystem()) {
+      auto const pProjectile = Pprojectile.GetSpaceLikeComponents();
+      auto const pProjNorm = pProjectile.norm();
+      auto const a = (pProjectile / pProjNorm).GetComponents().eVector;
+      auto const a1 = a(0), a2 = a(1);
+
+      auto const s = sgn(a(2));
+      auto const c = 1 / (1 + s * a(2));
+
+      Eigen::Matrix3d A, B;
+
+      if (s > 0) {
+        A << 1, 0, -a1,                     // comment to prevent clang-format
+            0, 1, -a2,                      // .
+            a1, a2, 1;                      // .
+        B << -a1 * a1 * c, -a1 * a2 * c, 0, // .
+            -a1 * a2 * c, -a2 * a2 * c, 0,  // .
+            0, 0, -(a1 * a1 + a2 * a2) * c; // .
+
+      } else {
+        A << 1, 0, a1,                      // comment to prevent clang-format
+            0, -1, -a2,                     // .
+            a1, a2, -1;                     // .
+        B << -a1 * a1 * c, -a1 * a2 * c, 0, // .
+            +a1 * a2 * c, +a2 * a2 * c, 0,  // .
+            0, 0, (a1 * a1 + a2 * a2) * c;  // .
+      }
+
+      fRotation = A + B;
+
+      // calculate boost
+      double const beta = pProjNorm / (Pprojectile.GetTimeLikeComponent() + massTarget);
+
+      /* Accurracy matters here, beta = 1 - epsilon for ultra-relativistic boosts */
+      double const coshEta = 1 / std::sqrt((1 + beta) * (1 - beta));
+      //~ double const coshEta = 1 / std::sqrt((1-beta*beta));
+      double const sinhEta = -beta * coshEta;
+
+      std::cout << "COMBoost (1-beta)=" << 1 - beta << " gamma=" << coshEta << std::endl;
+      std::cout << "  det = " << fRotation.determinant() - 1 << std::endl;
+
+      fBoost << coshEta, sinhEta, sinhEta, coshEta;
+
+      fInverseBoost << coshEta, -sinhEta, -sinhEta, coshEta;
+    }
+} // namespace corsika
diff --git a/corsika/detail/framework/utility/CorsikaFenvFallback.inl b/corsika/detail/framework/utility/CorsikaFenvFallback.inl
new file mode 100644
index 0000000000000000000000000000000000000000..4fb6e1c654b70a41a05e272a94b323236793fc87
--- /dev/null
+++ b/corsika/detail/framework/utility/CorsikaFenvFallback.inl
@@ -0,0 +1,20 @@
+/*
+ * (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/framework/utility/CorsikaFenv.hpp>
+#include <cfenv>
+
+extern "C" {
+#warning No enabling/disabling of floating point exceptions - platform needs better implementation
+
+int feenableexcept(int excepts) { return -1; }
+
+int fedisableexcept(int excepts) { return -1; }
+}
diff --git a/Framework/Utilities/CorsikaFenvOSX.cc b/corsika/detail/framework/utility/CorsikaFenvOSX.inl
similarity index 96%
rename from Framework/Utilities/CorsikaFenvOSX.cc
rename to corsika/detail/framework/utility/CorsikaFenvOSX.inl
index 1028c4b7e0988bb7ced605f71990c9c9f344fbbc..490dfec65395135929293924e5908ec2c3200169 100644
--- a/Framework/Utilities/CorsikaFenvOSX.cc
+++ b/corsika/detail/framework/utility/CorsikaFenvOSX.inl
@@ -10,7 +10,7 @@
  *
  */
 
-#include <corsika/utl/CorsikaFenv.h>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 #include <cfenv>
 
 // Implementation for OS X on intel X64_86
diff --git a/corsika/detail/media/BaseExponential.inl b/corsika/detail/media/BaseExponential.inl
new file mode 100644
index 0000000000000000000000000000000000000000..c4c51cb77a40146e367b19c0b4c1134f0c331874
--- /dev/null
+++ b/corsika/detail/media/BaseExponential.inl
@@ -0,0 +1,63 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/media/BaseExponential.hpp>
+
+namespace corsika {
+
+
+  template <class TDerived>
+    auto const& BaseExponential<TDerived>::GetImplementation() const 
+{ return *static_cast<TDerived const*>(this); }
+
+  template <class TDerived>
+    units::si::GrammageType BaseExponential<TDerived>::IntegratedGrammage(
+        Trajectory<Line> const& vLine,
+		units::si::LengthType vL,
+        Vector<units::si::dimensionless_d> const& vAxis) const {
+      if (vL == units::si::LengthType::zero()) { return units::si::GrammageType::zero(); }
+
+      auto const uDotA = vLine.NormalizedDirection().dot(vAxis).magnitude();
+      auto const rhoStart = GetImplementation().GetMassDensity(vLine.GetR0());
+
+      if (uDotA == 0) {
+        return vL * rhoStart;
+      } else {
+        return rhoStart * (fLambda / uDotA) * (exp(uDotA * vL * fInvLambda) - 1);
+      }
+    }
+
+  template <class TDerived>
+    units::si::LengthType BaseExponential<TDerived>::ArclengthFromGrammage(
+        Trajectory<Line> const& vLine,
+        units::si::GrammageType vGrammage,
+        Vector<units::si::dimensionless_d> const& vAxis) const {
+      auto const uDotA = vLine.NormalizedDirection().dot(vAxis).magnitude();
+      auto const rhoStart = GetImplementation().GetMassDensity(vLine.GetR0());
+
+      if (uDotA == 0) {
+        return vGrammage / rhoStart;
+      } else {
+        auto const logArg = vGrammage * fInvLambda * uDotA / rhoStart + 1;
+        if (logArg > 0) {
+          return fLambda / uDotA * log(logArg);
+        } else {
+          return std::numeric_limits<typename decltype(
+                     vGrammage)::value_type>::infinity() *
+                 units::si::meter;
+        }
+      }
+    }
+
+
+} // namespace corsika
+
diff --git a/corsika/detail/media/Environment.inl b/corsika/detail/media/Environment.inl
new file mode 100644
index 0000000000000000000000000000000000000000..cc5a945519bed11dffccfacf9084a1008ad2e074
--- /dev/null
+++ b/corsika/detail/media/Environment.inl
@@ -0,0 +1,39 @@
+/*
+ * (c) Copyright 2020 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.
+ */
+
+#pragma once
+
+#include <corsika/media/Environment.hpp>
+
+namespace corsika {
+
+    template <typename IEnvironmentModel>
+    auto& Environment<IEnvironmentModel>::GetUniverse() {
+ return fUniverse;     }
+
+    template <typename IEnvironmentModel>
+    auto const& Environment<IEnvironmentModel>::GetUniverse() const {  return fUniverse; }
+
+    template <typename IEnvironmentModel>
+    auto const& Environment<IEnvironmentModel>::GetCoordinateSystem() const { return fCoordinateSystem; }
+
+    // factory method for creation of VolumeTreeNodes
+    template <typename IEnvironmentModel>
+    template <class TVolumeType, typename... TVolumeArgs>
+    auto Environment<IEnvironmentModel>::CreateNode(TVolumeArgs&&... args) {
+      static_assert(std::is_base_of_v<corsika::Volume, TVolumeType>,
+                    "unusable type provided, needs to be derived from "
+                    "\"corsika::Volume\"");
+
+      return std::make_unique<BaseNodeType>(
+          std::make_unique<TVolumeType>(std::forward<TVolumeArgs>(args)...));
+    }
+
+}
\ No newline at end of file
diff --git a/corsika/detail/media/FlatExponential.inl b/corsika/detail/media/FlatExponential.inl
new file mode 100644
index 0000000000000000000000000000000000000000..24f66e557983d8db5ad5679920760d39824c5d3f
--- /dev/null
+++ b/corsika/detail/media/FlatExponential.inl
@@ -0,0 +1,41 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/media/FlatExponential.hpp>
+
+namespace corsika {
+
+  template <class T>
+  units::si::MassDensityType FlatExponential<T>::GetMassDensity(Point const& vP) const {
+    return Base::fRho0 * exp(Base::fInvLambda * (vP - Base::fP0).dot(fAxis));
+  }
+
+  template <class T>
+  NuclearComposition const& FlatExponential<T>::GetNuclearComposition() const {
+    return fNuclComp;
+  }
+
+  template <class T>
+  units::si::GrammageType FlatExponential<T>::IntegratedGrammage(
+      Trajectory<Line> const& vLine, units::si::LengthType vTo) const {
+    return Base::IntegratedGrammage(vLine, vTo, fAxis);
+  }
+
+  template <class T>
+  units::si::LengthType FlatExponential<T>::ArclengthFromGrammage(
+      Trajectory<Line> const& vLine, units::si::GrammageType vGrammage) const {
+    return Base::ArclengthFromGrammage(vLine, vGrammage, fAxis);
+  }
+
+} // namespace corsika
+
+#include <corsika/detail/media/BaseExponential.inl>
diff --git a/corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl b/corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl
new file mode 100644
index 0000000000000000000000000000000000000000..be0781236549f4958cb1e975c50d07fd5afc46ed
--- /dev/null
+++ b/corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl
@@ -0,0 +1,87 @@
+/*
+ * (c) Copyright 2020 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/media/LayeredSphericalAtmosphereBuilder.hpp>
+#include <corsika/media/FlatExponential.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/SlidingPlanarExponential.hpp>
+
+namespace corsika {
+
+void LayeredSphericalAtmosphereBuilder::checkRadius(units::si::LengthType r) const {
+  if (r <= previousRadius_) {
+    throw std::runtime_error("radius must be greater than previous");
+  }
+}
+
+void LayeredSphericalAtmosphereBuilder::setNuclearComposition(
+    NuclearComposition composition) {
+  composition_ = std::make_unique<NuclearComposition>(composition);
+}
+
+void LayeredSphericalAtmosphereBuilder::addExponentialLayer(
+    units::si::GrammageType b, units::si::LengthType c,
+    units::si::LengthType upperBoundary) {
+  auto const radius = seaLevel_ + upperBoundary;
+  checkRadius(radius);
+  previousRadius_ = radius;
+
+  auto node = std::make_unique<VolumeTreeNode<IMediumModel>>(
+      std::make_unique<Sphere>(center_, radius));
+
+  auto const rho0 = b / c;
+  std::cout << "rho0 = " << rho0 << ", c = " << c << std::endl;
+
+  node->SetModelProperties<SlidingPlanarExponential<IMediumModel>>(
+      center_, rho0, -c, *composition_, seaLevel_);
+
+  layers_.push(std::move(node));
+}
+
+void LayeredSphericalAtmosphereBuilder::addLinearLayer(
+    units::si::LengthType c, units::si::LengthType upperBoundary) {
+  using namespace units::si;
+
+  auto const radius = seaLevel_ + upperBoundary;
+  checkRadius(radius);
+  previousRadius_ = radius;
+
+  units::si::GrammageType constexpr b = 1 * 1_g / (1_cm * 1_cm);
+  auto const rho0 = b / c;
+
+  std::cout << "rho0 = " << rho0;
+
+  auto node = std::make_unique<VolumeTreeNode<IMediumModel>>(
+      std::make_unique<Sphere>(center_, radius));
+  node->SetModelProperties<HomogeneousMedium<IMediumModel>>(rho0, *composition_);
+
+  layers_.push(std::move(node));
+}
+
+Environment<IMediumModel> LayeredSphericalAtmosphereBuilder::assemble() {
+  Environment<IMediumModel> env;
+  assemble(env);
+  return env;
+}
+
+void LayeredSphericalAtmosphereBuilder::assemble(Environment<IMediumModel>& env) {
+  auto& universe = env.GetUniverse();
+  auto* outmost = universe.get();
+
+  while (!layers_.empty()) {
+    auto l = std::move(layers_.top());
+    auto* tmp = l.get();
+    outmost->AddChild(std::move(l));
+    layers_.pop();
+    outmost = tmp;
+  }
+}
+
+} // namespace corsika
diff --git a/corsika/detail/media/LinearApproximationIntegrator.inl b/corsika/detail/media/LinearApproximationIntegrator.inl
new file mode 100644
index 0000000000000000000000000000000000000000..77766a6d9a4f3e64b85064f79cf5055984cfd407
--- /dev/null
+++ b/corsika/detail/media/LinearApproximationIntegrator.inl
@@ -0,0 +1,57 @@
+/*
+ * (c) Copyright 2020 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.
+ */
+
+#pragma once
+
+#include <corsika/media/LinearApproximationIntegrator.hpp>
+
+namespace corsika {
+
+
+   template <class TDerived>
+     auto const& LinearApproximationIntegrator<TDerived>::GetImplementation() const {
+		   return *static_cast<TDerived const*>(this);
+	   }
+
+
+   template <class TDerived>
+    auto LinearApproximationIntegrator<TDerived>::IntegrateGrammage(
+        corsika::Trajectory<corsika::Line> const& line,
+        corsika::units::si::LengthType length) const {
+      auto const c0 = GetImplementation().EvaluateAt(line.GetPosition(0));
+      auto const c1 = GetImplementation().fRho.FirstDerivative(
+          line.GetPosition(0), line.NormalizedDirection());
+      return (c0 + 0.5 * c1 * length) * length;
+    }
+
+   template <class TDerived>
+    auto LinearApproximationIntegrator<TDerived>::ArclengthFromGrammage(
+        corsika::Trajectory<corsika::Line> const& line,
+        corsika::units::si::GrammageType grammage) const {
+      auto const c0 = GetImplementation().fRho(line.GetPosition(0));
+      auto const c1 = GetImplementation().fRho.FirstDerivative(
+          line.GetPosition(0), line.NormalizedDirection());
+
+      return (1 - 0.5 * grammage * c1 / (c0 * c0)) * grammage / c0;
+    }
+
+   template <class TDerived>
+    auto LinearApproximationIntegrator<TDerived>::MaximumLength(corsika::Trajectory<corsika::Line> const& line,
+                       [[maybe_unused]] double relError) const {
+      using namespace corsika::units::si;
+      [[maybe_unused]] auto const c1 = GetImplementation().fRho.SecondDerivative(
+          line.GetPosition(0), line.NormalizedDirection());
+
+      // todo: provide a real, working implementation
+      return 1_m * std::numeric_limits<double>::infinity();
+    }
+
+
+}
\ No newline at end of file
diff --git a/corsika/detail/media/SlidingPlanarExponential.inl b/corsika/detail/media/SlidingPlanarExponential.inl
new file mode 100644
index 0000000000000000000000000000000000000000..224826efc36937facb55c5a9c3829ffdfc579411
--- /dev/null
+++ b/corsika/detail/media/SlidingPlanarExponential.inl
@@ -0,0 +1,38 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/media/SlidingPlanarExponential.hpp>
+
+namespace corsika {
+
+  template <class T>
+  units::si::MassDensityType SlidingPlanarExponential<T>::GetMassDensity(
+      Point const& p) const {
+    auto const height = (p - Base::fP0).norm() - referenceHeight_;
+    return Base::fRho0 * exp(Base::fInvLambda * height);
+  }
+
+  template <class T>
+  units::si::GrammageType SlidingPlanarExponential<T>::IntegratedGrammage(
+      Trajectory<Line> const& line, units::si::LengthType l) const {
+    auto const axis = (line.GetR0() - Base::fP0).normalized();
+    return Base::IntegratedGrammage(line, l, axis);
+  }
+
+  template <class T>
+  units::si::LengthType SlidingPlanarExponential<T>::ArclengthFromGrammage(
+      Trajectory<Line> const& line, units::si::GrammageType grammage) const {
+    auto const axis = (line.GetR0() - Base::fP0).normalized();
+    return Base::ArclengthFromGrammage(line, grammage, axis);
+  }
+
+} // namespace corsika
\ No newline at end of file
diff --git a/corsika/detail/media/Universe.inl b/corsika/detail/media/Universe.inl
new file mode 100644
index 0000000000000000000000000000000000000000..d1f16c4e5f0773bf75192bc2cc520c99568ea8a5
--- /dev/null
+++ b/corsika/detail/media/Universe.inl
@@ -0,0 +1,31 @@
+/*
+ * (c) Copyright 2020 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.
+ */
+
+#pragma once
+
+#include <corsika/media/Environment.hpp>
+
+namespace corsika {
+
+          Universe::Universe(corsika::CoordinateSystem const& pCS):
+       corsika::Sphere(
+              corsika::Point{pCS,
+    	                               0 * corsika::units::si::meter,
+                                       0 * corsika::units::si::meter,
+                                       0 * corsika::units::si::meter},
+              corsika::units::si::meter * std::numeric_limits<double>::infinity())
+    {}
+
+    bool Universe::Contains(corsika::Point const&) const
+    {
+    	return true;
+    } 
+
+} 
\ No newline at end of file
diff --git a/corsika/detail/media/VolumeTreeNode.inl b/corsika/detail/media/VolumeTreeNode.inl
new file mode 100644
index 0000000000000000000000000000000000000000..14eaef6b5738412951e271cbc5761955b690e2e4
--- /dev/null
+++ b/corsika/detail/media/VolumeTreeNode.inl
@@ -0,0 +1,92 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/Volume.hpp>
+#include <corsika/media/IMediumModel.hpp>
+
+namespace corsika {
+
+  //! convenience function equivalent to Volume::Contains
+  template <typename IModelProperties>
+  bool VolumeTreeNode<IModelProperties>::Contains(corsika::Point const& p) const {
+    return fGeoVolume->Contains(p);
+  }
+
+  template <typename IModelProperties>
+  inline VolumeTreeNode<IModelProperties> const*
+  VolumeTreeNode<IModelProperties>::Excludes(corsika::Point const& p) const {
+    auto exclContainsIter =
+        std::find_if(fExcludedNodes.cbegin(), fExcludedNodes.cend(),
+                     [&](auto const& s) { return bool(s->Contains(p)); });
+
+    return exclContainsIter != fExcludedNodes.cend() ? *exclContainsIter : nullptr;
+  }
+
+  /** returns a pointer to the sub-VolumeTreeNode which is "responsible" for the given
+   * \class Point \p p, or nullptr iff \p p is not contained in this volume.
+   */
+  template <typename IModelProperties>
+  VolumeTreeNode<IModelProperties> const*
+  VolumeTreeNode<IModelProperties>::GetContainingNode(corsika::Point const& p) const {
+    if (!Contains(p)) { return nullptr; }
+
+    if (auto const childContainsIter =
+            std::find_if(fChildNodes.cbegin(), fChildNodes.cend(),
+                         [&](auto const& s) { return bool(s->Contains(p)); });
+        childContainsIter == fChildNodes.cend()) // not contained in any of the children
+    {
+      if (auto const exclContainsIter = Excludes(p)) // contained in any excluded nodes
+      {
+        return exclContainsIter->GetContainingNode(p);
+      } else {
+        return this;
+      }
+    } else {
+      return (*childContainsIter)->GetContainingNode(p);
+    }
+  }
+
+  template <typename IModelProperties>
+  template <typename TCallable, bool preorder>
+  void VolumeTreeNode<IModelProperties>::walk(TCallable func) {
+    if constexpr (preorder) { func(*this); }
+
+    std::for_each(fChildNodes.begin(), fChildNodes.end(),
+                  [&](auto& v) { v->walk(func); });
+
+    if constexpr (!preorder) { func(*this); };
+  }
+
+  template <typename IModelProperties>
+  void VolumeTreeNode<IModelProperties>::AddChild(typename VolumeTreeNode<IModelProperties>::VTNUPtr pChild) {
+    pChild->fParentNode = this;
+    fChildNodes.push_back(std::move(pChild));
+    // It is a bad idea to return an iterator to the inserted element
+    // because it might get invalidated when the vector needs to grow
+    // later and the caller won't notice.
+  }
+
+  template <typename IModelProperties>
+  void VolumeTreeNode<IModelProperties>::ExcludeOverlapWith(typename VolumeTreeNode<IModelProperties>::VTNUPtr const& pNode) {
+    fExcludedNodes.push_back(pNode.get());
+  }
+
+  template <typename IModelProperties>
+  template <class MediumType, typename... Args>
+  auto VolumeTreeNode<IModelProperties>::CreateMedium(Args&&... args) {
+    static_assert(std::is_base_of_v<IMediumModel, MediumType>,
+                  "unusable type provided, needs to be derived from \"IMediumModel\"");
+
+    return std::make_shared<MediumType>(std::forward<Args>(args)...);
+  }
+
+} // namespace corsika
\ No newline at end of file
diff --git a/corsika/detail/modules/sibyll/Decay.inl b/corsika/detail/modules/sibyll/Decay.inl
new file mode 100644
index 0000000000000000000000000000000000000000..a6ffafa224d414759cd95c5a2aba6ef799edcbdf
--- /dev/null
+++ b/corsika/detail/modules/sibyll/Decay.inl
@@ -0,0 +1,163 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/modules/sibyll/Decay.hpp>
+#include <corsika/modules/sibyll/ParticleConversion.hpp>
+#include <corsika/modules/sibyll/SibStack.hpp>
+
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+#include <iostream>
+#include <vector>
+
+using SetupView = corsika::setup::StackView;
+using SetupProjectile = corsika::setup::StackView::ParticleType;
+using SetupParticle = corsika::setup::Stack::ParticleType;
+
+namespace corsika::sibyll {
+
+  Decay::Decay() {}
+  Decay::~Decay() { std::cout << "Sibyll::Decay n=" << fCount << std::endl; }
+  void Decay::Init() {
+    // switch off decays to avoid internal decay chains
+    SetAllStable();
+  }
+
+  void Decay::SetStable(const std::vector<corsika::Code> vParticleList) {
+    for (auto p : vParticleList) Decay::SetStable(p);
+  }
+
+  void Decay::SetUnstable(const std::vector<corsika::Code> vParticleList) {
+    for (auto p : vParticleList) Decay::SetUnstable(p);
+  }
+
+  bool Decay::IsStable(const corsika::Code vCode) {
+    return abs(corsika::sibyll::ConvertToSibyllRaw(vCode)) <= 0 ? true : false;
+  }
+
+  bool Decay::IsUnstable(const corsika::Code vCode) {
+    return abs(corsika::sibyll::ConvertToSibyllRaw(vCode)) > 0 ? true : false;
+  }
+
+  void Decay::SetDecay(const corsika::Code vCode, const bool vMakeUnstable) {
+    vMakeUnstable ? SetUnstable(vCode) : SetStable(vCode);
+  }
+
+  void Decay::SetUnstable(const corsika::Code vCode) {
+    std::cout << "Sibyll::Interaction: setting " << vCode << " unstable.." << std::endl;
+    const int s_id = abs(corsika::sibyll::ConvertToSibyllRaw(vCode));
+    s_csydec_.idb[s_id - 1] = abs(s_csydec_.idb[s_id - 1]);
+  }
+
+  void Decay::SetStable(const corsika::Code vCode) {
+    std::cout << "Sibyll::Interaction: setting " << vCode << " stable.." << std::endl;
+    const int s_id = abs(corsika::sibyll::ConvertToSibyllRaw(vCode));
+    s_csydec_.idb[s_id - 1] = (-1) * abs(s_csydec_.idb[s_id - 1]);
+  }
+
+  void Decay::SetAllStable() {
+    for (int i = 0; i < 99; ++i) s_csydec_.idb[i] = -1 * abs(s_csydec_.idb[i]);
+  }
+
+  void Decay::SetAllUnstable() {
+    for (int i = 0; i < 99; ++i) s_csydec_.idb[i] = abs(s_csydec_.idb[i]);
+  }
+
+  void Decay::PrintDecayConfig(const corsika::Code vCode) {
+    std::cout << "Decay: Sibyll decay configuration:" << std::endl;
+    const int sibCode = corsika::sibyll::ConvertToSibyllRaw(vCode);
+    const int absSibCode = abs(sibCode);
+    std::cout << vCode << " is ";
+    if (s_csydec_.idb[absSibCode - 1] <= 0)
+      std::cout << "stable" << std::endl;
+    else
+      std::cout << "unstable" << std::endl;
+  }
+
+  template <>
+  units::si::TimeType Decay::GetLifetime(SetupParticle const& vP) const {
+    using namespace units::si;
+
+    HEPEnergyType E = vP.GetEnergy();
+    HEPMassType m = vP.GetMass();
+
+    const double gamma = E / m;
+
+    const TimeType t0 = corsika::GetLifetime(vP.GetPID());
+    auto const lifetime = gamma * t0;
+
+    const auto mkin =
+        (E * E - vP.GetMomentum().squaredNorm()); // delta_mass(vP.GetMomentum(), E, m);
+    std::cout << "Decay: code: " << vP.GetPID() << std::endl;
+    std::cout << "Decay: MinStep: t0: " << t0 << std::endl;
+    std::cout << "Decay: MinStep: energy: " << E / 1_GeV << " GeV" << std::endl;
+    std::cout << "Decay: momentum: " << vP.GetMomentum().GetComponents() / 1_GeV << " GeV"
+         << std::endl;
+    std::cout << "Decay: momentum: shell mass-kin. inv. mass " << mkin / 1_GeV / 1_GeV << " "
+         << m / 1_GeV * m / 1_GeV << std::endl;
+    auto sib_id = corsika::sibyll::ConvertToSibyllRaw(vP.GetPID());
+    std::cout << "Decay: sib mass: " << get_sibyll_mass2(sib_id) << std::endl;
+    std::cout << "Decay: MinStep: gamma: " << gamma << std::endl;
+    std::cout << "Decay: MinStep: tau: " << lifetime << std::endl;
+
+    return lifetime;
+  }
+
+  template <>
+  void Decay::DoDecay(SetupProjectile& vP) {
+    using corsika::Point;
+    using namespace units::si;
+
+    fCount++;
+    SibStack ss;
+    ss.Clear();
+    const corsika::Code pCode = vP.GetPID();
+    // copy particle to sibyll stack
+    ss.AddParticle(corsika::sibyll::ConvertToSibyllRaw(pCode), vP.GetEnergy(),
+                   vP.GetMomentum(),
+                   // setting particle mass with Corsika values, may be inconsistent
+                   // with sibyll internal values
+                   corsika::GetMass(pCode));
+    // remember position
+    Point const decayPoint = vP.GetPosition();
+    TimeType const t0 = vP.GetTime();
+    // remember if particles is unstable
+    // auto const priorIsUnstable = IsUnstable(pCode);
+    // switch on decay for this particle
+    SetUnstable(pCode);
+    PrintDecayConfig(pCode);
+
+    // call sibyll decay
+    std::cout << "Decay: calling Sibyll decay routine.." << std::endl;
+    decsib_();
+
+    // reset to stable
+    SetStable(pCode);
+    // print output
+    int print_unit = 6;
+    sib_list_(print_unit);
+
+    // copy particles from sibyll stack to corsika
+    for (auto& psib : ss) {
+      // FOR NOW: skip particles that have decayed in Sibyll, move to iterator?
+      if (psib.HasDecayed()) continue;
+      // add to corsika stack
+      vP.AddSecondary(
+      std::tuple<corsika::Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                Point, units::si::TimeType>{
+              corsika::sibyll::ConvertFromSibyll(psib.GetPID()), psib.GetEnergy(),
+              psib.GetMomentum(), decayPoint, t0});
+    }
+    // empty sibyll stack
+    ss.Clear();
+  }
+
+} // namespace corsika::sibyll
diff --git a/corsika/detail/modules/sibyll/Interaction.inl b/corsika/detail/modules/sibyll/Interaction.inl
new file mode 100644
index 0000000000000000000000000000000000000000..b27988241f1d2c2c907c69b30d8a92b03a190ffb
--- /dev/null
+++ b/corsika/detail/modules/sibyll/Interaction.inl
@@ -0,0 +1,365 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/modules/sibyll/Interaction.hpp>
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/modules/sibyll/ParticleConversion.hpp>
+#include <corsika/modules/sibyll/SibStack.hpp>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
+
+#include <sibyll2.3d.hpp>
+
+#include <tuple>
+
+using std::make_tuple;
+using std::tuple;
+
+using namespace corsika;
+using SetupParticle = setup::Stack::StackIterator;
+using SetupView = setup::StackView;
+using Track = setup::Trajectory;
+
+namespace corsika::sibyll {
+
+  Interaction::Interaction() {
+    using corsika::RNGManager;
+
+    // initialize Sibyll
+    if (!initialized_) {
+      sibyll_ini_();
+      initialized_ = true;
+    }
+  }
+
+  Interaction::~Interaction() {
+    std::cout << "Sibyll::Interaction n=" << count_ << " Nnuc=" << nucCount_ << std::endl;
+  }
+
+  void Interaction::SetStable(std::vector<corsika::Code> const& vParticleList) {
+    for (auto p : vParticleList) Interaction::SetStable(p);
+  }
+
+  void Interaction::SetUnstable(std::vector<corsika::Code> const& vParticleList) {
+    for (auto p : vParticleList) Interaction::SetUnstable(p);
+  }
+
+  void Interaction::SetUnstable(const corsika::Code vCode) {
+    std::cout << "Sibyll::Interaction: setting " << vCode << " unstable.." << std::endl;
+    const int s_id = abs(corsika::sibyll::ConvertToSibyllRaw(vCode));
+    s_csydec_.idb[s_id - 1] = abs(s_csydec_.idb[s_id - 1]);
+  }
+
+  void Interaction::SetStable(const corsika::Code vCode) {
+    std::cout << "Sibyll::Interaction: setting " << vCode << " stable.." << std::endl;
+    const int s_id = abs(corsika::sibyll::ConvertToSibyllRaw(vCode));
+    s_csydec_.idb[s_id - 1] = (-1) * abs(s_csydec_.idb[s_id - 1]);
+  }
+
+  void Interaction::SetAllUnstable() {
+    for (int i = 0; i < 99; ++i) s_csydec_.idb[i] = abs(s_csydec_.idb[i]);
+  }
+
+  void Interaction::SetAllStable() {
+    for (int i = 0; i < 99; ++i) s_csydec_.idb[i] = -1 * abs(s_csydec_.idb[i]);
+  }
+
+  tuple<units::si::CrossSectionType, units::si::CrossSectionType>
+  Interaction::GetCrossSection(const corsika::Code BeamId,
+                               const corsika::Code TargetId,
+                               const units::si::HEPEnergyType CoMenergy) const {
+    using namespace units::si;
+    double sigProd, sigEla, dummy, dum1, dum3, dum4;
+    double dumdif[3];
+    const int iBeam = corsika::sibyll::GetSibyllXSCode(BeamId);
+    if (!IsValidCoMEnergy(CoMenergy)) {
+      throw std::runtime_error(
+          "Interaction: GetCrossSection: CoM energy outside range for Sibyll!");
+    }
+    const double dEcm = CoMenergy / 1_GeV;
+    if (corsika::IsNucleus(TargetId)) {
+      const int iTarget = corsika::GetNucleusA(TargetId);
+      if (iTarget > maxTargetMassNumber_ || 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, sigEla);
+    } else if (TargetId == corsika::Proton::GetCode()) {
+      sib_sigma_hp_(iBeam, dEcm, dum1, sigEla, sigProd, dumdif, dum3, dum4);
+    } else {
+      // no interaction in sibyll possible, return infinite cross section? or throw?
+      sigProd = std::numeric_limits<double>::infinity();
+      sigEla = std::numeric_limits<double>::infinity();
+    }
+    return std::make_tuple(sigProd * 1_mb, sigEla * 1_mb);
+  }
+
+
+  template <>
+  units::si::GrammageType Interaction::GetInteractionLength(
+      SetupParticle const& vP) const {
+
+    using namespace units;
+    using namespace units::si;
+
+    // coordinate system, get global frame of reference
+    CoordinateSystem& rootCS =
+        RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+    const corsika::Code corsikaBeamId = vP.GetPID();
+
+    // beam corsika for sibyll : 1, 2, 3 for p, pi, k
+    // read from cross section code table
+    const bool kInteraction = corsika::sibyll::CanInteract(corsikaBeamId);
+
+    // FOR NOW: assume target is at rest
+    MomentumVector pTarget(rootCS, {0_GeV, 0_GeV, 0_GeV});
+
+    // total momentum and energy
+    HEPEnergyType Elab = vP.GetEnergy() + constants::nucleonMass;
+    MomentumVector pTotLab(rootCS, {0_GeV, 0_GeV, 0_GeV});
+    pTotLab += vP.GetMomentum();
+    pTotLab += pTarget;
+    auto const pTotLabNorm = pTotLab.norm();
+    // calculate cm. energy
+    const HEPEnergyType ECoM = sqrt(
+        (Elab + pTotLabNorm) * (Elab - pTotLabNorm)); // binomial for numerical accuracy
+
+    std::cout << "Interaction: LambdaInt: \n"
+         << " input energy: " << vP.GetEnergy() / 1_GeV << std::endl
+         << " beam can interact:" << kInteraction << std::endl
+         << " beam pid:" << vP.GetPID() << std::endl;
+
+    // TODO: move limits into variables
+    // FR: removed && Elab >= 8.5_GeV
+    if (kInteraction && IsValidCoMEnergy(ECoM)) {
+
+      // 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..
+      */
+
+      auto const* currentNode = vP.GetNode();
+      const auto& mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+
+      si::CrossSectionType weightedProdCrossSection = mediumComposition.WeightedSum(
+          [=](corsika::Code targetID) -> si::CrossSectionType {
+            return std::get<0>(this->GetCrossSection(corsikaBeamId, targetID, ECoM));
+          });
+
+      std::cout << "Interaction: "
+           << "IntLength: weighted CrossSection (mb): " << weightedProdCrossSection / 1_mb
+           << std::endl;
+
+      // calculate interaction length in medium
+      GrammageType const int_length = mediumComposition.GetAverageMassNumber() *
+                                      units::constants::u / weightedProdCrossSection;
+      std::cout << "Interaction: "
+           << "interaction length (g/cm2): " << int_length / (0.001_kg) * 1_cm * 1_cm
+           << std::endl;
+
+      return int_length;
+    }
+
+    return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+  }
+
+  /**
+     In this function SIBYLL is called to produce one event. The
+     event is copied (and boosted) into the shower lab frame.
+   */
+
+  template <>
+  corsika::EProcessReturn Interaction::DoInteraction(SetupProjectile& vP) {
+
+    using namespace units::si;
+
+    const auto corsikaBeamId = vP.GetPID();
+    std::cout << "ProcessSibyll: "
+         << "DoInteraction: " << corsikaBeamId << " interaction? "
+         << corsika::sibyll::CanInteract(corsikaBeamId) << std::endl;
+
+    if (corsika::IsNucleus(corsikaBeamId)) {
+      // nuclei handled by different process, this should not happen
+      throw std::runtime_error("Nuclear projectile are not handled by SIBYLL!");
+    }
+
+    if (corsika::sibyll::CanInteract(corsikaBeamId)) {
+      const CoordinateSystem& rootCS =
+          RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+      // position and time of interaction, not used in Sibyll
+      Point pOrig = vP.GetPosition();
+      TimeType tOrig = vP.GetTime();
+
+      // define target
+      // for Sibyll is always a single nucleon
+      // FOR NOW: target is always at rest
+      const auto eTargetLab = 0_GeV + corsika::units::constants::nucleonMass;
+      const auto pTargetLab = MomentumVector(rootCS, 0_GeV, 0_GeV, 0_GeV);
+      const FourVector PtargLab(eTargetLab, pTargetLab);
+
+      // define projectile
+      HEPEnergyType const eProjectileLab = vP.GetEnergy();
+      auto const pProjectileLab = vP.GetMomentum();
+
+      std::cout << "Interaction: ebeam lab: " << eProjectileLab / 1_GeV << std::endl
+           << "Interaction: pbeam lab: " << pProjectileLab.GetComponents() / 1_GeV
+           << std::endl;
+      std::cout << "Interaction: etarget lab: " << eTargetLab / 1_GeV << std::endl
+           << "Interaction: ptarget lab: " << pTargetLab.GetComponents() / 1_GeV << std::endl;
+
+      const FourVector PprojLab(eProjectileLab, pProjectileLab);
+
+      // define target kinematics in lab frame
+      // define boost to and from CoM frame
+      // CoM frame definition in Sibyll projectile: +z
+      COMBoost const boost(PprojLab, corsika::units::constants::nucleonMass);
+
+      // just for show:
+      // boost projecticle
+      auto const PprojCoM = boost.toCoM(PprojLab);
+
+      // boost target
+      auto const PtargCoM = boost.toCoM(PtargLab);
+
+      std::cout << "Interaction: ebeam CoM: " << PprojCoM.GetTimeLikeComponent() / 1_GeV
+           << std::endl
+           << "Interaction: pbeam CoM: "
+           << PprojCoM.GetSpaceLikeComponents().GetComponents() / 1_GeV << std::endl;
+      std::cout << "Interaction: etarget CoM: " << PtargCoM.GetTimeLikeComponent() / 1_GeV
+           << std::endl
+           << "Interaction: ptarget CoM: "
+           << PtargCoM.GetSpaceLikeComponents().GetComponents() / 1_GeV << std::endl;
+
+      std::cout << "Interaction: position of interaction: " << pOrig.GetCoordinates() << std::endl;
+      std::cout << "Interaction: time: " << tOrig << std::endl;
+
+      HEPEnergyType Etot = eProjectileLab + eTargetLab;
+      MomentumVector Ptot = vP.GetMomentum();
+      // invariant mass, i.e. cm. energy
+      HEPEnergyType Ecm = sqrt(Etot * Etot - Ptot.squaredNorm());
+
+      // sample target mass number
+      auto const* currentNode = vP.GetNode();
+      auto const& mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+      // get cross sections for target materials
+      /*
+        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
+      auto const& compVec = mediumComposition.GetComponents();
+      std::vector<corsika::units::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, sigEla] = GetCrossSection(corsikaBeamId, targetId, Ecm);
+        [[maybe_unused]] const auto& dummy_sigEla = sigEla;
+        cross_section_of_components[i] = sigProd;
+      }
+
+      const auto targetCode =
+          mediumComposition.SampleTarget(cross_section_of_components, RNG_);
+      std::cout << "Interaction: target selected: " << targetCode << std::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 targetSibCode = -1;
+      if (IsNucleus(targetCode)) targetSibCode = GetNucleusA(targetCode);
+      if (targetCode == corsika::Proton::GetCode()) targetSibCode = 1;
+      std::cout << "Interaction: sibyll code: " << targetSibCode << std::endl;
+      if (targetSibCode > maxTargetMassNumber_ || targetSibCode < 1)
+        throw std::runtime_error(
+            "Sibyll target outside range. Only nuclei with A<18 or protons are "
+            "allowed.");
+
+      // beam id for sibyll
+      const int kBeam = corsika::sibyll::ConvertToSibyllRaw(corsikaBeamId);
+
+      std::cout << "Interaction: "
+           << " DoInteraction: E(GeV):" << eProjectileLab / 1_GeV
+           << " Ecm(GeV): " << Ecm / 1_GeV << std::endl;
+      if (Ecm > GetMaxEnergyCoM())
+        throw std::runtime_error("Interaction::DoInteraction: CoM energy too high!");
+      // FR: removed eProjectileLab < 8.5_GeV ||
+      if (Ecm < GetMinEnergyCoM()) {
+        std::cout << "Interaction: "
+             << " DoInteraction: should have dropped particle.. "
+             << "THIS IS AN ERROR" << std::endl;
+        throw std::runtime_error("energy too low for SIBYLL");
+      } else {
+        count_++;
+        // Sibyll does not know about units..
+        const double sqs = Ecm / 1_GeV;
+        // running sibyll, filling stack
+        std::cout << "kBeam " << kBeam << " targetSibCode " << targetSibCode << " sqs " << sqs << std::endl;
+        sibyll_(kBeam, targetSibCode, sqs);
+        if (internalDecays_) {
+          // corsika that decay internally will never appear on the corsika stack
+          // switch on all decays except for the corsika we want to take part in the
+          // tracking
+          SetAllUnstable();
+          SetStable(trackedParticles_);
+          decsib_();
+          // reset
+          SetAllStable();
+        }
+        // print final state
+        int print_unit = 6;
+        sib_list_(print_unit);
+        nucCount_ += get_nwounded() - 1;
+
+        // add corsika from sibyll to stack
+        // link to sibyll stack
+        SibStack ss;
+
+        MomentumVector Plab_final(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+        HEPEnergyType Elab_final = 0_GeV, Ecm_final = 0_GeV;
+        for (auto& psib : ss) {
+
+          // skip corsika that have decayed in Sibyll
+          if (psib.HasDecayed()) continue;
+
+          // transform energy to lab. frame
+          auto const pCoM = psib.GetMomentum();
+          HEPEnergyType const eCoM = psib.GetEnergy();
+          auto const Plab = boost.fromCoM(FourVector(eCoM, pCoM));
+
+          // add to corsika stack
+          auto pnew = vP.AddSecondary(
+          std::tuple<corsika::Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                    corsika::Point, units::si::TimeType>{
+                  corsika::sibyll::ConvertFromSibyll(psib.GetPID()),
+                  Plab.GetTimeLikeComponent(), Plab.GetSpaceLikeComponents(), pOrig,
+                  tOrig});
+
+          Plab_final += pnew.GetMomentum();
+          Elab_final += pnew.GetEnergy();
+          Ecm_final += psib.GetEnergy();
+        }
+        std::cout << "conservation (all GeV): Ecm_final=" << Ecm_final / 1_GeV << std::endl
+             << "Elab_final=" << Elab_final / 1_GeV
+             << ", Plab_final=" << (Plab_final / 1_GeV).GetComponents() << std::endl;
+      }
+    }
+    return corsika::EProcessReturn::eOk;
+  }
+
+} // namespace corsika::sibyll
diff --git a/corsika/detail/modules/sibyll/NuclearInteraction.inl b/corsika/detail/modules/sibyll/NuclearInteraction.inl
new file mode 100644
index 0000000000000000000000000000000000000000..5f08a662ff6672a056baed43018963862356a684
--- /dev/null
+++ b/corsika/detail/modules/sibyll/NuclearInteraction.inl
@@ -0,0 +1,600 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/modules/sibyll/Interaction.hpp>
+#include <corsika/modules/sibyll/NuclearInteraction.hpp>
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
+
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+#include <nuclib.hpp>
+
+namespace corsika::sibyll {
+
+  template <>
+  NuclearInteraction<corsika::setup::SetupEnvironment>::NuclearInteraction(
+      corsika::sibyll::Interaction& hadint, corsika::setup::SetupEnvironment const& env)
+      : environment_(env)
+      , hadronicInteraction_(hadint) {}
+
+  template <>
+  NuclearInteraction<corsika::setup::SetupEnvironment>::~NuclearInteraction() {
+    std::cout << "Nuclib::NuclearInteraction n=" << count_ << " Nnuc=" << nucCount_ << std::endl;
+  }
+
+  template <>
+  void NuclearInteraction<corsika::setup::SetupEnvironment>::PrintCrossSectionTable(
+      corsika::Code pCode) {
+    const int k = targetComponentsIndex_.at(pCode);
+    Code pNuclei[] = {Code::Helium, Code::Lithium7, Code::Oxygen,
+                      Code::Neon,   Code::Argon,    Code::Iron};
+    std::cout << "en/A ";
+    for (auto& j : pNuclei) std::cout << std::setw(9) << j;
+    std::cout << std::endl;
+
+    // loop over energy bins
+    for (unsigned int i = 0; i < GetNEnergyBins(); ++i) {
+      std::cout << " " << i << "  ";
+      for (auto& n : pNuclei) {
+        auto const j = GetNucleusA(n);
+        std::cout << " " << std::setprecision(5) << std::setw(8)
+             << cnucsignuc_.sigma[j - 1][k][i];
+      }
+      std::cout << std::endl;
+    }
+  }
+
+  template <>
+  void NuclearInteraction<corsika::setup::SetupEnvironment>::InitializeNuclearCrossSections() {
+
+    using namespace corsika::units::si;
+
+    auto& universe = *(environment_.GetUniverse());
+
+    auto const allElementsInUniverse = std::invoke([&]() {
+      std::set<corsika::Code> allElementsInUniverse;
+      auto collectElements = [&](auto& vtn) {
+        if (vtn.HasModelProperties()) {
+          auto const& comp =
+              vtn.GetModelProperties().GetNuclearComposition().GetComponents();
+          for (auto const c : comp) allElementsInUniverse.insert(c);
+        }
+      };
+      universe.walk(collectElements);
+      return allElementsInUniverse;
+    });
+
+    std::cout << "NuclearInteraction: initializing nuclear cross sections..." << std::endl;
+
+    // loop over target components, at most 4!!
+    int k = -1;
+    for (auto& ptarg : allElementsInUniverse) {
+      ++k;
+      std::cout << "NuclearInteraction: init target component: " << ptarg << std::endl;
+      const int ib = GetNucleusA(ptarg);
+      if (!hadronicInteraction_.IsValidTarget(ptarg)) {
+        std::cout << "NuclearInteraction::InitializeNuclearCrossSections: target nucleus? id="
+             << ptarg << std::endl;
+        throw std::runtime_error(
+            " target can not be handled by hadronic interaction model! ");
+      }
+      targetComponentsIndex_.insert(std::pair<Code, int>(ptarg, k));
+      // loop over energies, fNEnBins log. energy bins
+      for (unsigned int i = 0; i < GetNEnergyBins(); ++i) {
+        // hard coded energy grid, has to be aligned to definition in signuc2!!, no
+        // comment..
+        const corsika::units::si::HEPEnergyType Ecm = pow(10., 1. + 1. * i) * 1_GeV;
+        // get p-p cross sections
+        auto const protonId = Code::Proton;
+        auto const [siginel, sigela] =
+            hadronicInteraction_.GetCrossSection(protonId, protonId, Ecm);
+        const double dsig = siginel / 1_mb;
+        const double dsigela = sigela / 1_mb;
+        // loop over projectiles, mass numbers from 2 to fMaxNucleusAProjectile
+        for (unsigned int j = 1; j < gMaxNucleusAProjectile_; ++j) {
+          const int jj = j + 1;
+          double sig_out, dsig_out, sigqe_out, dsigqe_out;
+          sigma_mc_(jj, ib, dsig, dsigela, gNSample_, sig_out, dsig_out, sigqe_out,
+                    dsigqe_out);
+          // write to table
+          cnucsignuc_.sigma[j][k][i] = sig_out;
+          cnucsignuc_.sigqe[j][k][i] = sigqe_out;
+        }
+      }
+    }
+    std::cout << "NuclearInteraction: cross sections for " << targetComponentsIndex_.size()
+         << " components initialized!" << std::endl;
+    for (auto& ptarg : allElementsInUniverse) {
+      std::cout << "cross section table: " << ptarg << std::endl;
+      PrintCrossSectionTable(ptarg);
+    }
+  }
+
+  template <>
+  void NuclearInteraction<corsika::setup::SetupEnvironment>::Init() {
+  
+    // initialize hadronic interaction module
+    // TODO: safe to run multiple initializations?
+    if (!hadronicInteraction_.WasInitialized()) hadronicInteraction_.Init();
+
+    // check compatibility of energy ranges, someone could try to use low-energy model..
+    if (!hadronicInteraction_.IsValidCoMEnergy(GetMinEnergyPerNucleonCoM()) ||
+        !hadronicInteraction_.IsValidCoMEnergy(GetMaxEnergyPerNucleonCoM()))
+      throw std::runtime_error(
+          "NuclearInteraction: hadronic interaction model incompatible!");
+
+    // initialize nuclib
+    // TODO: make sure this does not overlap with sibyll
+    nuc_nuc_ini_();
+
+    // initialize cross sections
+    InitializeNuclearCrossSections();
+  }
+
+  template <>
+  corsika::units::si::CrossSectionType NuclearInteraction<corsika::setup::SetupEnvironment>::ReadCrossSectionTable(
+      const int ia, corsika::Code pTarget, corsika::units::si::HEPEnergyType elabnuc) {
+
+    using namespace corsika::units::si;
+
+    const int ib = targetComponentsIndex_.at(pTarget) + 1; // table index in fortran
+    auto const ECoMNuc = sqrt(2. * corsika::units::constants::nucleonMass * elabnuc);
+    if (ECoMNuc < GetMinEnergyPerNucleonCoM() || ECoMNuc > GetMaxEnergyPerNucleonCoM())
+      throw std::runtime_error("NuclearInteraction: energy outside tabulated range!");
+    const double e0 = elabnuc / 1_GeV;
+    double sig;
+    std::cout << "ReadCrossSectionTable: " << ia << " " << ib << " " << e0 << std::endl;
+    signuc2_(ia, ib, e0, sig);
+    std::cout << "ReadCrossSectionTable: sig=" << sig << std::endl;
+    return sig * 1_mb;
+  }
+
+  // TODO: remove elastic cross section?
+  template <>
+  template <typename TParticle>
+  std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
+  NuclearInteraction<corsika::setup::SetupEnvironment>::GetCrossSection(const TParticle& vP,
+                                                        const corsika::Code TargetId) {
+
+    using namespace corsika::units::si;
+
+    if (vP.GetPID() != corsika::Code::Nucleus)
+      throw std::runtime_error(
+          "NuclearInteraction: GetCrossSection: particle not a nucleus!");
+
+    unsigned int const iBeamA = vP.GetNuclearA();
+    HEPEnergyType LabEnergyPerNuc = vP.GetEnergy() / iBeamA;
+    std::cout << "NuclearInteraction: GetCrossSection: called with: beamNuclA= " << iBeamA
+         << " 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 (iBeamA > GetMaxNucleusAProjectile() || iBeamA < 2) {
+      std::cout << "NuclearInteraction: beam nucleus outside allowed range for NUCLIB!" << std::endl
+           << "A=" << iBeamA << std::endl;
+      throw std::runtime_error(
+          "NuclearInteraction: GetCrossSection: beam nucleus outside allowed range for "
+          "NUCLIB!");
+    }
+
+    if (hadronicInteraction_.IsValidTarget(TargetId)) {
+      auto const sigProd = ReadCrossSectionTable(iBeamA, TargetId, LabEnergyPerNuc);
+      std::cout << "cross section (mb): " << sigProd / 1_mb << std::endl;
+      return std::make_tuple(sigProd, 0_mb);
+    } else {
+      throw std::runtime_error("target outside range.");
+    }
+    return std::make_tuple(std::numeric_limits<double>::infinity() * 1_mb,
+                           std::numeric_limits<double>::infinity() * 1_mb);
+  }
+
+  template <>
+  template <typename TParticle>
+  corsika::units::si::GrammageType NuclearInteraction<corsika::setup::SetupEnvironment>::GetInteractionLength(
+                               const TParticle& vP) {
+
+    using namespace corsika::units::si;
+
+    // coordinate system, get global frame of reference
+    CoordinateSystem& rootCS =
+        RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+    const corsika::Code corsikaBeamId = vP.GetPID();
+
+    if (corsikaBeamId != corsika::Code::Nucleus) {
+      // check if target-style nucleus (enum), these are not allowed as projectile
+      if (corsika::IsNucleus(corsikaBeamId))
+        throw std::runtime_error(
+            "NuclearInteraction: GetInteractionLength: Wrong nucleus type. Nuclear "
+            "projectiles should use NuclearStackExtension!");
+      else {
+        // no nuclear interaction
+        return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+      }
+    }
+
+    // read from cross section code table
+
+    // FOR NOW: assume target is at rest
+    corsika::MomentumVector pTarget(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+
+    // total momentum and energy
+    HEPEnergyType Elab = vP.GetEnergy() + corsika::units::constants::nucleonMass;
+    int const nuclA = vP.GetNuclearA();
+    auto const ElabNuc = vP.GetEnergy() / nuclA;
+
+    corsika::MomentumVector pTotLab(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+    pTotLab += vP.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 * corsika::units::constants::nucleonMass);
+    std::cout << "NuclearInteraction: LambdaInt: \n"
+         << " input energy: " << Elab / 1_GeV << std::endl
+         << " input energy CoM: " << ECoM / 1_GeV << std::endl
+         << " beam pid:" << corsikaBeamId << std::endl
+         << " beam A: " << nuclA << std::endl
+         << " input energy per nucleon: " << ElabNuc / 1_GeV << std::endl
+         << " input energy CoM per nucleon: " << ECoMNN / 1_GeV << std::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 >= gMinEnergyPerNucleonCoM_ &&
+        ECoMNN < gMaxEnergyPerNucleonCoM_) {
+
+      // 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..
+      */
+      auto const* const currentNode = vP.GetNode();
+      auto const& mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+      // determine average interaction length
+      // weighted sum
+      int i = -1;
+      CrossSectionType weightedProdCrossSection = 0_mb;
+      // get weights of components from environment/medium
+      const auto& w = mediumComposition.GetFractions();
+      // loop over components in medium
+      for (auto const targetId : mediumComposition.GetComponents()) {
+        i++;
+        std::cout << "NuclearInteraction: get interaction length for target: " << targetId
+             << std::endl;
+        auto const [productionCrossSection, elaCrossSection] =
+            GetCrossSection(vP, targetId);
+        [[maybe_unused]] auto& dummy_elaCrossSection = elaCrossSection;
+
+        std::cout << "NuclearInteraction: "
+             << "IntLength: nuclib return (mb): " << productionCrossSection / 1_mb
+             << std::endl;
+        weightedProdCrossSection += w[i] * productionCrossSection;
+      }
+      std::cout << "NuclearInteraction: "
+           << "IntLength: weighted CrossSection (mb): " << weightedProdCrossSection / 1_mb
+           << std::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 * (1_cm * 1_cm / (0.001_kg))
+           << std::endl;
+
+      return int_length;
+    } else {
+      return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+    }
+  }
+
+  template <>
+  template <typename TProjectile>
+  corsika::EProcessReturn NuclearInteraction<corsika::setup::SetupEnvironment>::DoInteraction(
+       TProjectile& vP) {
+
+    using namespace corsika::units::si;
+
+    // this routine superimposes different nucleon-nucleon interactions
+    // in a nucleus-nucleus interaction, based the SIBYLL routine SIBNUC
+
+    const auto ProjId = vP.GetPID();
+    // TODO: calculate projectile mass in nuclearStackExtension
+    //      const auto ProjMass = vP.GetMass();
+    std::cout << "NuclearInteraction: DoInteraction: called with:" << ProjId << std::endl;
+
+    // check if target-style nucleus (enum)
+    if (ProjId != corsika::Code::Nucleus)
+      throw std::runtime_error(
+          "NuclearInteraction: DoInteraction: Wrong nucleus type. Nuclear projectiles "
+          "should use NuclearStackExtension!");
+
+    auto const ProjMass =
+        vP.GetNuclearZ() * corsika::Proton::GetMass() +
+        (vP.GetNuclearA() - vP.GetNuclearZ()) * corsika::Neutron::GetMass();
+    std::cout << "NuclearInteraction: projectile mass: " << ProjMass / 1_GeV << std::endl;
+
+    count_++;
+
+    const CoordinateSystem& rootCS =
+        RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+    // position and time of interaction, not used in NUCLIB
+    Point pOrig = vP.GetPosition();
+    TimeType tOrig = vP.GetTime();
+
+    std::cout << "Interaction: position of interaction: " << pOrig.GetCoordinates() << std::endl;
+    std::cout << "Interaction: time: " << tOrig << std::endl;
+
+    // projectile nucleon number
+    const unsigned int kAProj = vP.GetNuclearA();
+    if (kAProj > GetMaxNucleusAProjectile())
+      throw std::runtime_error("Projectile nucleus too large for NUCLIB!");
+
+    // kinematics
+    // define projectile nucleus
+    HEPEnergyType const eProjectileLab = vP.GetEnergy();
+    auto const pProjectileLab = vP.GetMomentum();
+    const FourVector PprojLab(eProjectileLab, pProjectileLab);
+
+    std::cout << "NuclearInteraction: eProj lab: " << eProjectileLab / 1_GeV << std::endl
+         << "NuclearInteraction: pProj lab: " << pProjectileLab.GetComponents() / 1_GeV
+         << std::endl;
+
+    // define projectile nucleon
+    HEPEnergyType const eProjectileNucLab = vP.GetEnergy() / kAProj;
+    auto const pProjectileNucLab = vP.GetMomentum() / kAProj;
+    const FourVector PprojNucLab(eProjectileNucLab, pProjectileNucLab);
+
+    std::cout << "NuclearInteraction: eProjNucleon lab: " << eProjectileNucLab / 1_GeV << std::endl
+         << "NuclearInteraction: pProjNucleon lab: "
+         << pProjectileNucLab.GetComponents() / 1_GeV << std::endl;
+
+    // define target
+    // always a nucleon
+    // target is always at rest
+    const auto eTargetNucLab = 0_GeV + corsika::units::constants::nucleonMass;
+    const auto pTargetNucLab =
+        corsika::MomentumVector(rootCS, 0_GeV, 0_GeV, 0_GeV);
+    const FourVector PtargNucLab(eTargetNucLab, pTargetNucLab);
+
+    std::cout << "NuclearInteraction: etarget lab: " << eTargetNucLab / 1_GeV << std::endl
+         << "NuclearInteraction: ptarget lab: " << pTargetNucLab.GetComponents() / 1_GeV
+         << std::endl;
+
+    // center-of-mass energy in nucleon-nucleon frame
+    auto const PtotNN4 = PtargNucLab + PprojNucLab;
+    HEPEnergyType EcmNN = PtotNN4.GetNorm();
+    std::cout << "NuclearInteraction: nuc-nuc cm energy: " << EcmNN / 1_GeV << std::endl;
+
+    if (!hadronicInteraction_.IsValidCoMEnergy(EcmNN)) {
+      std::cout << "NuclearInteraction: nuc-nuc. CoM energy too low for hadronic "
+              "interaction model!"
+           << std::endl;
+      throw std::runtime_error("NuclearInteraction: DoInteraction: energy too low!");
+    }
+
+    // define boost to NUCLEON-NUCLEON frame
+    COMBoost const boost(PprojNucLab, corsika::units::constants::nucleonMass);
+    // boost projecticle
+    auto const PprojNucCoM = boost.toCoM(PprojNucLab);
+
+    // boost target
+    auto const PtargNucCoM = boost.toCoM(PtargNucLab);
+
+    std::cout << "Interaction: ebeam CoM: " << PprojNucCoM.GetTimeLikeComponent() / 1_GeV
+         << std::endl
+         << "Interaction: pbeam CoM: "
+         << PprojNucCoM.GetSpaceLikeComponents().GetComponents() / 1_GeV << std::endl;
+    std::cout << "Interaction: etarget CoM: " << PtargNucCoM.GetTimeLikeComponent() / 1_GeV
+         << std::endl
+         << "Interaction: ptarget CoM: "
+         << PtargNucCoM.GetSpaceLikeComponents().GetComponents() / 1_GeV << std::endl;
+
+    // sample target nucleon number
+    //
+    // proton stand-in for nucleon
+    const auto beamId = corsika::Proton::GetCode();
+    auto const* const currentNode = vP.GetNode();
+    const auto& mediumComposition =
+        currentNode->GetModelProperties().GetNuclearComposition();
+    std::cout << "get nucleon-nucleus cross sections for target materials.." << std::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<CrossSectionType> cross_section_of_components(compVec.size());
+
+    for (size_t i = 0; i < compVec.size(); ++i) {
+      auto const targetId = compVec[i];
+      std::cout << "target component: " << targetId << std::endl;
+      std::cout << "beam id: " << beamId << std::endl;
+      const auto [sigProd, sigEla] =
+          hadronicInteraction_.GetCrossSection(beamId, targetId, EcmNN);
+      cross_section_of_components[i] = sigProd;
+      [[maybe_unused]] auto sigElaCopy = sigEla; // ONLY TO AVOID COMPILER WARNINGS
+    }
+
+    const auto targetCode =
+        mediumComposition.SampleTarget(cross_section_of_components, RNG_);
+    std::cout << "Interaction: target selected: " << targetCode << std::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::Proton::GetCode()) kATarget = 1;
+    std::cout << "NuclearInteraction: nuclib target code: " << kATarget << std::endl;
+    if (!hadronicInteraction_.IsValidTarget(targetCode))
+      throw std::runtime_error("target outside range. ");
+    // end of target sampling
+
+    // superposition
+    std::cout << "NuclearInteraction: sampling nuc. multiple interaction structure.. " << std::endl;
+    // get nucleon-nucleon cross section
+    // (needed to determine number of nucleon-nucleon scatterings)
+    const auto protonId = corsika::Proton::GetCode();
+    const auto [prodCrossSection, elaCrossSection] =
+        hadronicInteraction_.GetCrossSection(protonId, protonId, EcmNN);
+    const double sigProd = prodCrossSection / 1_mb;
+    const double sigEla = elaCrossSection / 1_mb;
+    // 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);
+
+    std::cout << "number of nucleons in target           : " << kATarget << std::endl
+         << "number of wounded nucleons in target   : " << cnucms_.na << std::endl
+         << "number of nucleons in projectile       : " << kAProj << std::endl
+         << "number of wounded nucleons in project. : " << cnucms_.nb << std::endl
+         << "number of inel. nuc.-nuc. interactions : " << cnucms_.ni << std::endl
+         << "number of elastic nucleons in target   : " << cnucms_.nael << std::endl
+         << "number of elastic nucleons in project. : " << cnucms_.nbel << std::endl
+         << "impact parameter: " << cnucms_.b << std::endl;
+
+    // calculate fragmentation
+    std::cout << "calculating nuclear fragments.." << std::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 > GetMaxNFragments())
+      throw std::runtime_error("Number of nuclear fragments in NUCLIB exceeded!");
+
+    std::cout << "number of fragments: " << nFragments << std::endl;
+    for (int j = 0; j < nFragments; ++j)
+      std::cout << "fragment: " << j << " A=" << AFragments[j]
+           << " px=" << fragments_.ppp[j][0] << " py=" << fragments_.ppp[j][1]
+           << " pz=" << fragments_.ppp[j][2] << std::endl;
+
+    std::cout << "adding nuclear fragments to particle stack.." << std::endl;
+    // put nuclear fragments on corsika stack
+    for (int j = 0; j < nFragments; ++j) {
+      corsika::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::Code::Proton;
+      else
+        specCode = corsika::Code::Nucleus;
+
+      // TODO: mass of nuclei?
+      const HEPMassType mass =
+          corsika::Proton::GetMass() * nuclZ +
+          (nuclA - nuclZ) * corsika::Neutron::GetMass(); // this neglects binding energy
+
+      std::cout << "NuclearInteraction: adding fragment: " << specCode << std::endl;
+      std::cout << "NuclearInteraction: A,Z: " << nuclA << "," << nuclZ << std::endl;
+      std::cout << "NuclearInteraction: mass: " << mass / 1_GeV << std::endl;
+
+      // CORSIKA 7 way
+      // spectators inherit momentum from original projectile
+      const double mass_ratio = mass / ProjMass;
+
+      std::cout << "NuclearInteraction: mass ratio " << mass_ratio << std::endl;
+
+      auto const Plab = PprojLab * mass_ratio;
+
+      std::cout << "NuclearInteraction: fragment momentum: "
+           << Plab.GetSpaceLikeComponents().GetComponents() / 1_GeV << std::endl;
+
+      if (nuclA == 1)
+        // add nucleon
+        vP.AddSecondary(
+            std::tuple<corsika::Code, corsika::units::si::HEPEnergyType, corsika::MomentumVector,
+                  corsika::Point, corsika::units::si::TimeType>{
+                specCode, Plab.GetTimeLikeComponent(), Plab.GetSpaceLikeComponents(),
+                pOrig, tOrig});
+      else
+        // add nucleus
+        vP.AddSecondary(std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                              corsika::MomentumVector, corsika::Point,
+                              corsika::units::si::TimeType, unsigned short, unsigned short>{
+            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
+    std::cout << "adding elastically scattered nucleons to particle stack.." << std::endl;
+    for (int j = 0; j < nElasticNucleons; ++j) {
+      // TODO: sample proton or neutron
+      auto const elaNucCode = corsika::Code::Proton;
+
+      // CORSIKA 7 way
+      // elastic nucleons inherit momentum from original projectile
+      // neglecting momentum transfer in interaction
+      const double mass_ratio = corsika::GetMass(elaNucCode) / ProjMass;
+      auto const Plab = PprojLab * mass_ratio;
+
+      vP.AddSecondary(
+          std::tuple<corsika::Code, corsika::units::si::HEPEnergyType, corsika::MomentumVector,
+                corsika::Point, corsika::units::si::TimeType>{
+              elaNucCode, Plab.GetTimeLikeComponent(), Plab.GetSpaceLikeComponents(),
+              pOrig, tOrig});
+    }
+
+    // add inelastic interactions
+    std::cout << "calculate inelastic nucleon-nucleon interactions.." << std::endl;
+    for (int j = 0; j < nInelNucleons; ++j) {
+      // TODO: sample neutron or proton
+      auto pCode = corsika::Proton::GetCode();
+      // temporarily add to stack, will be removed after interaction in DoInteraction
+      std::cout << "inelastic interaction no. " << j << std::endl;
+      auto inelasticNucleon = vP.AddSecondary(
+          std::tuple<corsika::Code, corsika::units::si::HEPEnergyType, corsika::MomentumVector,
+                corsika::Point, corsika::units::si::TimeType>{
+              pCode, PprojNucLab.GetTimeLikeComponent(),
+              PprojNucLab.GetSpaceLikeComponents(), pOrig, tOrig});
+      // create inelastic interaction
+      std::cout << "calling HadronicInteraction..." << std::endl;
+      hadronicInteraction_.DoInteraction(inelasticNucleon);
+    }
+
+    std::cout << "NuclearInteraction: DoInteraction: done" << std::endl;
+
+    return corsika::EProcessReturn::eOk;
+  }
+
+} // namespace corsika::sibyll
+
diff --git a/corsika/detail/modules/sibyll/ParticleConversion.inl b/corsika/detail/modules/sibyll/ParticleConversion.inl
new file mode 100644
index 0000000000000000000000000000000000000000..fbc978d2a0264f3c65bfff71420d3b898bcd6939
--- /dev/null
+++ b/corsika/detail/modules/sibyll/ParticleConversion.inl
@@ -0,0 +1,26 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+
+using namespace corsika::sibyll;
+
+corsika::units::si::HEPMassType corsika::sibyll::GetSibyllMass(
+    corsika::Code const pCode) {
+  using namespace corsika::units;
+  using namespace corsika::units::si;
+  if (pCode == corsika::Code::Nucleus)
+    throw std::runtime_error("Cannot GetMass() of particle::Nucleus -> unspecified");
+  auto sCode = ConvertToSibyllRaw(pCode);
+  if (sCode == 0)
+    throw std::runtime_error("GetSibyllMass: unknown particle!");
+  else
+    return sqrt(get_sibyll_mass2(sCode)) * 1_GeV;
+}
diff --git a/corsika/framework/CMakeLists.txt b/corsika/framework/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8fabe1c93e381b10c7f82daa2788b5ed0f2e0a4a
--- /dev/null
+++ b/corsika/framework/CMakeLists.txt
@@ -0,0 +1,21 @@
+set (input_dir ${PROJECT_SOURCE_DIR}/corsika/framework/core)
+set (output_dir ${PROJECT_BINARY_DIR}/corsika/framework/core)
+
+file (MAKE_DIRECTORY ${output_dir})
+
+add_custom_command (
+  OUTPUT  ${output_dir}/GeneratedParticleProperties.inc
+          ${output_dir}/particle_db.pkl
+  COMMAND ${input_dir}/pdxml_reader.py ${input_dir}/ParticleData.xml ${input_dir}/NuclearData.xml  ${input_dir}/ParticleClassNames.xml
+  DEPENDS ${input_dir}/pdxml_reader.py
+          ${input_dir}/ParticleData.xml
+          ${input_dir}/NuclearData.xml
+          ${input_dir}/ParticleClassNames.xml
+  WORKING_DIRECTORY
+          ${output_dir}
+  COMMENT "Read PYTHIA8 particle data and produce C++ source code GeneratedParticleProperties.inc"
+  VERBATIM
+  )
+
+add_custom_target (GenParticlesHeaders DEPENDS ${output_dir}/GeneratedParticleProperties.inc)
+add_dependencies (CORSIKA8 GenParticlesHeaders)
diff --git a/corsika/framework/core/CMakeLists.txt b/corsika/framework/core/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c922c93da0b9cf6b326199a6bdc0c202d7ffcb37
--- /dev/null
+++ b/corsika/framework/core/CMakeLists.txt
@@ -0,0 +1,18 @@
+add_custom_command (
+  OUTPUT  ${PROJECT_BINARY_DIR}/GeneratedParticleProperties.inc
+          ${PROJECT_BINARY_DIR}/particle_db.pkl
+  COMMAND ${PROJECT_SOURCE_DIR}/Framework/Particles/pdxml_reader.py 
+          ${PROJECT_SOURCE_DIR}/Framework/Particles/ParticleData.xml
+          ${PROJECT_SOURCE_DIR}/Framework/Particles/NuclearData.xml
+          ${PROJECT_SOURCE_DIR}/Framework/Particles/ParticleClassNames.xml
+  DEPENDS pdxml_reader.py
+          ParticleData.xml
+          NuclearData.xml
+          ParticleClassNames.xml
+  WORKING_DIRECTORY
+          ${PROJECT_BINARY_DIR}/
+  COMMENT "Read PYTHIA8 particle data and produce C++ source code GeneratedParticleProperties.inc"
+  VERBATIM
+  )
+
+add_dependencies (CORSIKA8 ${PROJECT_BINARY_DIR}/Framework/Particles/GeneratedParticleProperties.inc)
diff --git a/corsika/framework/core/Cascade.hpp b/corsika/framework/core/Cascade.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..0a7bf3d7bcb3e4d1754f484595b9575f6328dd3d
--- /dev/null
+++ b/corsika/framework/core/Cascade.hpp
@@ -0,0 +1,125 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <cassert>
+#include <cmath>
+#include <limits>
+
+//FIXME: importing what from BOOST ?
+#include <boost/type_index.hpp>
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+#include <corsika/framework/random/ExponentialDistribution.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/random/UniformRealDistribution.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp>
+#include <corsika/framework/stack/SecondaryView.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+//FIXME: importing what from BOOST ?
+//using boost::typeindex::type_id_with_cvr;
+
+#include <fstream>
+
+/**
+ * The cascade namespace assembles all objects needed to simulate full particles cascades.
+ */
+
+namespace corsika {
+
+  /**
+   * \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>TTracking</b> must be a class according to the
+   * TrackingInterface providing the functions:
+   *
+   * <code>
+   * auto GetTrack(Particle const& p)</auto>,
+   * with the return type <code>geometry::Trajectory<corsika::Line>
+   * </code>
+   *
+   * <b>TProcessList</b> must be a ProcessSequence.   *
+   * <b>Stack</b> is the storage object for particle data, i.e. with
+   * Particle class type <code>Stack::ParticleType</code>
+   *
+   *
+   */
+  template <typename TTracking, typename TProcessList, typename TStack,
+  	  	  	  typename TStackView = corsika::StackView>
+  class Cascade
+  {
+
+    typedef typename TStack::ParticleType Particle;
+    typedef std::remove_pointer_t<decltype(((Particle*)nullptr)->GetNode())> VolumeTreeNode;
+    typedef typename VolumeTreeNode::IModelProperties MediumInterface;
+
+  public:
+
+    Cascade() = delete;
+
+    Cascade(corsika::Environment<MediumInterface> const& env, TTracking& tr,
+    		 TProcessList& pl, TStack& stack):
+    	fEnvironment(env),
+		fTracking(tr),
+		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();
+
+    /**
+     * set the nodes for all particles on the stack according to their numerical
+     * position
+     */
+    void SetNodes();
+
+    /**
+     * The Run function is the main simulation loop, which processes
+     * particles from the Stack until the Stack is empty.
+     */
+    void Run();
+
+    /**
+     * Force an interaction of the top particle of the stack at its current position.
+     * Note that SetNodes() or an equivalent procedure needs to be called first if you
+     * want to call forceInteraction() for the primary interaction.
+     */
+    void forceInteraction();
+
+  private:
+
+    void Step(Particle& vParticle);
+
+    auto decay(Particle& particle, decltype(std::declval<TStackView>().GetProjectile()) projectile);
+
+    auto interaction(particle_type& particle, decltype(std::declval<TStackView>().GetProjectile()) projectile) ;
+
+    corsika::Environment<MediumInterface> const& fEnvironment;
+    TTracking& fTracking;
+    TProcessList& fProcessSequence;
+    TStack& fStack;
+    corsika::RNG& fRNG =
+        corsika::RNGManager::GetInstance().GetRandomStream("cascade");
+
+  };
+
+} // namespace corsika
+
+#include <corsika/detail/framework/core/Cascade.inl>
diff --git a/Framework/Particles/NuclearData.xml b/corsika/framework/core/NuclearData.xml
similarity index 100%
rename from Framework/Particles/NuclearData.xml
rename to corsika/framework/core/NuclearData.xml
diff --git a/Framework/Particles/ParticleClassNames.xml b/corsika/framework/core/ParticleClassNames.xml
similarity index 100%
rename from Framework/Particles/ParticleClassNames.xml
rename to corsika/framework/core/ParticleClassNames.xml
diff --git a/corsika/framework/core/ParticleData.xml b/corsika/framework/core/ParticleData.xml
new file mode 100644
index 0000000000000000000000000000000000000000..40cd64c8a4e9b5dc03a8f87e32e308f16e3a3b94
--- /dev/null
+++ b/corsika/framework/core/ParticleData.xml
@@ -0,0 +1,9721 @@
+<chapter name="Particle Data">
+
+  <!-- MR: copied from Pythia 8235 -->
+<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"> 
+</particle> 
+ 
+<particle id="2" name="u" antiName="ubar" spinType="2" chargeType="2" colType="1" 
+          m0="0.33000"> 
+</particle> 
+ 
+<particle id="3" name="s" antiName="sbar" spinType="2" chargeType="-1" colType="1" 
+          m0="0.50000"> 
+</particle> 
+ 
+<particle id="4" name="c" antiName="cbar" spinType="2" chargeType="2" colType="1" 
+          m0="1.50000"> 
+</particle> 
+ 
+<particle id="5" name="b" antiName="bbar" spinType="2" chargeType="-1" colType="1" 
+          m0="4.80000"> 
+</particle> 
+ 
+<particle id="6" name="t" antiName="tbar" spinType="2" chargeType="2" colType="1" 
+          m0="171.00000" mWidth="1.40000" mMin="86.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000300" products="24 1"/> 
+ <channel onMode="1" bRatio="0.0017650" products="24 3"/> 
+ <channel onMode="1" bRatio="0.9982050" products="24 5"/> 
+ <channel onMode="0" bRatio="0.0000000" products="37 5"/> 
+</particle> 
+ 
+<particle id="7" name="b'" antiName="b'bar" spinType="2" chargeType="-1" colType="1" 
+          m0="400.00000"> 
+ <channel onMode="1" bRatio="0.0000000" products="-24 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-24 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-24 6"/> 
+ <channel onMode="1" bRatio="1.0000000" products="-24 8"/> 
+</particle> 
+ 
+<particle id="8" name="t'" antiName="t'bar" spinType="2" chargeType="2" colType="1" 
+          m0="400.00000"> 
+ <channel onMode="1" bRatio="0.0000000" products="24 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="24 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="24 5"/> 
+ <channel onMode="1" bRatio="1.0000000" products="24 7"/> 
+</particle> 
+-->
+ 
+<particle id="11" name="e-" antiName="e+" spinType="2" chargeType="-3" colType="0" 
+          m0="5.110e-04"> 
+</particle> 
+ 
+<particle id="12" name="nu_e" antiName="nu_ebar" spinType="2" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="13" name="mu-" antiName="mu+" spinType="2" chargeType="-3" colType="0" 
+          m0="0.10566" tau0="6.58654e+05"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="22" products="-12 11 14"/> 
+</particle> 
+ 
+<particle id="14" name="nu_mu" antiName="nu_mubar" spinType="2" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="15" name="tau-" antiName="tau+" spinType="2" chargeType="-3" colType="0" 
+          m0="1.77682" tau0="8.71100e-02"> 
+ <channel onMode="1" bRatio="0.1076825" meMode="1521" products="16 -211"/> 
+ <channel onMode="1" bRatio="0.0069601" meMode="1521" products="16 -321"/> 
+ <channel onMode="1" bRatio="0.1772832" meMode="1531" products="16 11 -12"/> 
+ <channel onMode="1" bRatio="0.1731072" meMode="1531" products="16 13 -14"/> 
+ <channel onMode="1" bRatio="0.2537447" meMode="1532" products="16 111 -211"/> 
+ <channel onMode="1" bRatio="0.0015809" meMode="1532" products="16 311 -321"/> 
+ <channel onMode="1" bRatio="0.0001511" meMode="1532" products="16 221 -321"/> 
+ <channel onMode="1" bRatio="0.0083521" meMode="1533" products="16 -211 -311"/> 
+ <channel onMode="1" bRatio="0.0042655" meMode="1533" products="16 111 -321"/> 
+ <channel onMode="1" bRatio="0.0924697" meMode="1541" products="16 111 111 -211"/> 
+ <channel onMode="1" bRatio="0.0925691" meMode="1541" products="16 -211 -211 211"/> 
+ <channel onMode="1" bRatio="0.0039772" meMode="1542" products="16 111 -211 -311"/> 
+ <channel onMode="1" bRatio="0.0034701" meMode="1542" products="16 -211 211 -321"/> 
+ <channel onMode="1" bRatio="0.0014318" meMode="1542" products="16 -211 -321 321"/> 
+ <channel onMode="1" bRatio="0.0015809" meMode="1542" products="16 111 311 -321"/> 
+ <channel onMode="1" bRatio="0.0011932" meMode="1542" products="16 130 -211 310"/> 
+ <channel onMode="1" bRatio="0.0006463" meMode="1542" products="16 111 111 -321"/> 
+ <channel onMode="1" bRatio="0.0002386" meMode="1542" products="16 130 130 -211"/> 
+ <channel onMode="1" bRatio="0.0002386" meMode="1542" products="16 -211 310 310"/> 
+ <channel onMode="1" bRatio="0.0013821" meMode="1543" products="16 111 -211 221"/> 
+ <channel onMode="1" bRatio="0.0017520" meMode="1544" products="16 22 111 -211"/> 
+ <channel onMode="1" bRatio="0.0459365" meMode="1551" products="16 111 -211 -211 211"/> 
+ <channel onMode="1" bRatio="0.0104401" meMode="1551" products="16 111 111 111 -211"/> 
+ <channel onMode="1" bRatio="0.0049069" meMode="1561" products="16 111 111 -211 -211 211"/> 
+ <channel onMode="1" bRatio="0.0009515" meMode="1561" products="16 111 111 111 111 -211"/> 
+ <channel onMode="1" bRatio="0.0008342" meMode="1561" products="16 -211 -211 -211 211 211"/> 
+ <channel onMode="1" bRatio="0.0001631" meMode="0" products="16 -211 -211 211 221"/> 
+ <channel onMode="1" bRatio="0.0001491" meMode="0" products="16 111 111 -211 221"/> 
+ <channel onMode="1" bRatio="0.0001392" meMode="0" products="16 111 111 -211 223"/> 
+ <channel onMode="1" bRatio="0.0001193" meMode="0" products="16 -211 -211 211 223"/> 
+ <channel onMode="1" bRatio="0.0004077" meMode="0" products="16 223 -321"/> 
+ <channel onMode="1" bRatio="0.0004773" meMode="0" products="16 111 111 111 -321"/> 
+ <channel onMode="1" bRatio="0.0003052" meMode="0" products="16 111 -211 211 -321"/> 
+ <channel onMode="1" bRatio="0.0002784" meMode="0" products="16 221 -323"/> 
+ <channel onMode="1" bRatio="0.0002366" meMode="0" products="16 111 111 -211 -311"/> 
+ <channel onMode="1" bRatio="0.0002237" meMode="0" products="16 -211 -211 211 -311"/> 
+ <channel onMode="1" bRatio="0.0002953" meMode="0" products="16 111 -211 -311 311"/> 
+ <channel onMode="1" bRatio="0.0000590" meMode="0" products="16 111 -211 -321 321"/> 
+</particle> 
+ 
+<particle id="16" name="nu_tau" antiName="nu_taubar" spinType="2" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<!--
+<particle id="17" name="tau'-" antiName="tau'+" spinType="2" chargeType="-3" colType="0" 
+          m0="400.00000"> 
+ <channel onMode="1" bRatio="1.0000000" products="-24 18"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="18" name="nu'_tau" antiName="nu'_taubar" spinType="2" chargeType="0" colType="0" 
+          m0="400.00000"> 
+ <channel onMode="1" bRatio="1.0000000" products="24 17"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="21" name="g" spinType="3" chargeType="0" colType="2" 
+          m0="0.00000"> 
+</particle> 
+-->
+ 
+<particle id="22" name="gamma" spinType="3" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<!--
+<particle id="23" name="Z0" spinType="3" chargeType="0" colType="0" 
+          m0="91.18760" mWidth="2.49520" mMin="10.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1539950" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.1194200" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.1539840" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.1192590" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.1522720" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0335760" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0668060" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.0335760" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0668060" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.0335000" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0668060" products="16 -16"/> 
+</particle> 
+ 
+<particle id="24" name="W+" antiName="W-" spinType="3" chargeType="3" colType="0" 
+          m0="80.38500" mWidth="2.08500" mMin="10.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.3213690" products="-1 2"/> 
+ <channel onMode="1" bRatio="0.0164940" products="-1 4"/> 
+ <channel onMode="1" bRatio="0.0165020" products="-3 2"/> 
+ <channel onMode="1" bRatio="0.3206150" products="-3 4"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-5 2"/> 
+ <channel onMode="1" bRatio="0.0005910" products="-5 4"/> 
+ <channel onMode="1" bRatio="0.1081660" products="-11 12"/> 
+ <channel onMode="1" bRatio="0.1081660" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.1080870" products="-15 16"/> 
+</particle> 
+ 
+<particle id="25" name="h0" spinType="1" chargeType="0" colType="0" 
+          m0="125.00000" mWidth="0.00374" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000009" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0000002" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0002361" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0335602" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.5876728" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0002445" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0690800" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0630585" products="21 21"/> 
+ <channel onMode="1" bRatio="0.0028438" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0017601" products="22 23"/> 
+ <channel onMode="1" bRatio="0.0259708" products="23 23"/> 
+ <channel onMode="1" bRatio="0.2155720" products="24 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000022 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000023 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000023 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000025"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000025"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000035"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000024 -1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000024 -1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000037 -1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000037 -1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000001 -1000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000001 -2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000001 -2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000001 2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000002 -1000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000002 -2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000002 -2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000002 2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000003 -1000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000003 -2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000003 -2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000003 2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000004 -1000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000004 -2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000004 -2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000004 2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000005 -1000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000005 -2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000005 -2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000005 2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000006 -1000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000006 -2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000006 -2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000006 2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000011 -1000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000011 -2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000011 -2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000011 2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000012 -1000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000012 -2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000012 -2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000012 2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000013 -1000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000013 -2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000013 -2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000013 2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000014 -1000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000014 -2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000014 -2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000014 2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000015 -1000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000015 -2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000015 -2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000015 2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000016 -1000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000016 -2000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000016 -2000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000016 2000016"/> 
+</particle> 
+ 
+<particle id="32" name="Z'0" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="14.54029" mMin="10.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1458350" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.1132760" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.1458350" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.1132710" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.1457810" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0490020" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="7 -7"/> 
+ <channel onMode="1" bRatio="0.0000000" products="8 -8"/> 
+ <channel onMode="1" bRatio="0.0320250" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0636420" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.0320250" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0636420" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.0320220" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0636420" products="16 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="17 -17"/> 
+ <channel onMode="1" bRatio="0.0000000" products="18 -18"/> 
+ <channel onMode="1" bRatio="0.0000000" products="24 -24"/> 
+</particle> 
+ 
+<particle id="33" name="Z''0" spinType="3" chargeType="0" colType="0" 
+          m0="900.00000"> 
+</particle> 
+ 
+<particle id="34" name="W'+" antiName="W'-" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" mWidth="16.66099" mMin="10.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.2512250" products="-1 2"/> 
+ <channel onMode="1" bRatio="0.0129000" products="-1 4"/> 
+ <channel onMode="1" bRatio="0.0000060" products="-1 6"/> 
+ <channel onMode="1" bRatio="0.0129000" products="-3 2"/> 
+ <channel onMode="1" bRatio="0.2507640" products="-3 4"/> 
+ <channel onMode="1" bRatio="0.0003800" products="-3 6"/> 
+ <channel onMode="1" bRatio="0.0000080" products="-5 2"/> 
+ <channel onMode="1" bRatio="0.0004650" products="-5 4"/> 
+ <channel onMode="1" bRatio="0.2154180" products="-5 6"/> 
+ <channel onMode="1" bRatio="0.0853120" products="-11 12"/> 
+ <channel onMode="1" bRatio="0.0853120" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.0853100" products="-15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="24 23"/> 
+</particle> 
+ 
+<particle id="35" name="H0" spinType="1" chargeType="0" colType="0" 
+          m0="300.00000" mWidth="8.38842" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0000490" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.0007740" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0000740" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0004170" products="21 21"/> 
+ <channel onMode="1" bRatio="0.0000150" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0000610" products="22 23"/> 
+ <channel onMode="1" bRatio="0.3067100" products="23 23"/> 
+ <channel onMode="1" bRatio="0.6890110" products="24 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="23 25"/> 
+ <channel onMode="1" bRatio="0.0028890" products="25 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="24 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="37 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="23 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="25 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="36 36"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000022 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000023 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000023 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000025"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000025"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000035"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000024 -1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000024 -1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000037 -1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000037 -1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000001 -1000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000001 -2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000001 -2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000001 2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000002 -1000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000002 -2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000002 -2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000002 2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000003 -1000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000003 -2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000003 -2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000003 2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000004 -1000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000004 -2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000004 -2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000004 2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000005 -1000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000005 -2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000005 -2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000005 2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000006 -1000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000006 -2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000006 -2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000006 2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000011 -1000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000011 -2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000011 -2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000011 2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000012 -1000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000012 -2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000012 -2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000012 2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000013 -1000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000013 -2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000013 -2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000013 2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000014 -1000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000014 -2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000014 -2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000014 2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000015 -1000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000015 -2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000015 -2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000015 2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000016 -1000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000016 -2000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000016 -2000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000016 2000016"/> 
+</particle> 
+ 
+<particle id="36" name="A0" spinType="1" chargeType="0" colType="0" 
+          m0="300.00000" mWidth="3.37520" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0000010" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0001210" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.0019240" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0000010" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0001840" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0031060" products="21 21"/> 
+ <channel onMode="1" bRatio="0.0000150" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0000030" products="22 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="23 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="24 -24"/> 
+ <channel onMode="1" bRatio="0.9946460" products="23 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="25 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="24 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="37 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000022 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000023 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000023 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000025"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000022"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000023"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000025"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000035"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000024 -1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000024 -1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000037 -1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000037 -1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000001 -1000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000001 -2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000001 -2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000001 2000001"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000002 -1000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000002 -2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000002 -2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000002 2000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000003 -1000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000003 -2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000003 -2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000003 2000003"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000004 -1000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000004 -2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000004 -2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000004 2000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000005 -1000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000005 -2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000005 -2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000005 2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000006 -1000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000006 -2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000006 -2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000006 2000006"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000011 -1000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000011 -2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000011 -2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000011 2000011"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000012 -1000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000012 -2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000012 -2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000012 2000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000013 -1000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000013 -2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000013 -2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000013 2000013"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000014 -1000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000014 -2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000014 -2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000014 2000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000015 -1000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000015 -2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000015 -2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000015 2000015"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000016 -1000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000016 -2000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000016 -2000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000016 2000016"/> 
+</particle> 
+ 
+<particle id="37" name="H+" antiName="H-" spinType="1" chargeType="3" colType="0" 
+          m0="300.00000" mWidth="4.17669" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 2"/> 
+ <channel onMode="1" bRatio="0.0000210" products="-3 4"/> 
+ <channel onMode="1" bRatio="0.0901350" products="-5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 12"/> 
+ <channel onMode="1" bRatio="0.0000130" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.0037140" products="-15 16"/> 
+ <channel onMode="1" bRatio="0.9061170" products="24 25"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000022 1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000022 1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000023 1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000023 1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000025 1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000024"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000035 1000037"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000006 -1000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000006 -1000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000006 -2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="2000006 -2000005"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000001 1000002"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000003 1000004"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000011 1000012"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000013 1000014"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-1000015 1000016"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="-2000015 1000016"/> 
+</particle> 
+ 
+<particle id="39" name="Graviton" spinType="5" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="40" name="BlackHole" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="41" name="R0" antiName="Rbar0" spinType="3" chargeType="0" colType="0" 
+          m0="5.000e+03" mWidth="4.173e+02" mMin="1.000e+02" mMax="0.000e+00"> 
+ <channel onMode="1" bRatio="0.2151190" products="1 -3"/> 
+ <channel onMode="1" bRatio="0.2151190" products="2 -4"/> 
+ <channel onMode="1" bRatio="0.2151190" products="3 -5"/> 
+ <channel onMode="1" bRatio="0.2147240" products="4 -6"/> 
+ <channel onMode="1" bRatio="0.0699600" products="11 -13"/> 
+ <channel onMode="1" bRatio="0.0699590" products="13 -15"/> 
+</particle> 
+ 
+<particle id="42" name="LQ_ue" antiName="LQ_uebar" spinType="1" chargeType="-1" colType="1" 
+          m0="200.00000" mWidth="0.39162" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" products="2 11"/> 
+</particle> 
+ 
+<particle id="45" name="H_3" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000"> 
+</particle> 
+ 
+<particle id="46" name="A_2" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000"> 
+</particle> 
+ 
+<particle id="51" name="DM(s=0)" antiName="DMbar(s=0)" spinType="1" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="52" name="DM(s=1/2)" antiName="DMbar(s=1/2)" spinType="2" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="53" name="DM(s=1)" antiName="DMbar(s=1)" spinType="3" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="54" name="DMmed(s=0)" antiName="DMmedbar(s=0)" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="0.1" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.000" products=" 1  -1"/> 
+ <channel onMode="1" bRatio="0.000" products=" 2  -2"/> 
+ <channel onMode="1" bRatio="0.000" products=" 3  -3"/> 
+ <channel onMode="1" bRatio="0.000" products=" 4  -4"/> 
+ <channel onMode="1" bRatio="0.300" products=" 5  -5"/> 
+ <channel onMode="1" bRatio="0.000" products=" 6  -6"/> 
+ <channel onMode="1" bRatio="0.000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.000" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.000" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.000" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.000" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.000" products="16 -16"/> 
+ <channel onMode="1" bRatio="0.100" products="21  21"/> 
+ <channel onMode="1" bRatio="0.000" products="22  22"/> 
+ <channel onMode="1" bRatio="0.000" products="22  23"/> 
+ <channel onMode="1" bRatio="0.000" products="23  23"/> 
+ <channel onMode="1" bRatio="0.000" products="24 -24"/> 
+ <channel onMode="1" bRatio="0.000" products="25  25"/> 
+ <channel onMode="1" bRatio="0.000" products="51 -51"/> 
+ <channel onMode="1" bRatio="0.000" products="51  51"/> 
+ <channel onMode="1" bRatio="0.600" products="52 -52"/> 
+ <channel onMode="1" bRatio="0.000" products="52  52"/> 
+ <channel onMode="1" bRatio="0.000" products="53 -53"/> 
+ <channel onMode="1" bRatio="0.000" products="53  53"/> 
+</particle> 
+ 
+<particle id="55" name="DMmed(s=1)" antiName="DMmedbar(s=1)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="0.1" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.050" products=" 1  -1"/> 
+ <channel onMode="1" bRatio="0.050" products=" 2  -2"/> 
+ <channel onMode="1" bRatio="0.050" products=" 3  -3"/> 
+ <channel onMode="1" bRatio="0.050" products=" 4  -4"/> 
+ <channel onMode="1" bRatio="0.050" products=" 5  -5"/> 
+ <channel onMode="1" bRatio="0.050" products=" 6  -6"/> 
+ <channel onMode="1" bRatio="0.050" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.050" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.050" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.050" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.050" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.050" products="16 -16"/> 
+ <channel onMode="1" bRatio="0.025" products="21  21"/> 
+ <channel onMode="1" bRatio="0.025" products="22  22"/> 
+ <channel onMode="1" bRatio="0.050" products="22  23"/> 
+ <channel onMode="1" bRatio="0.050" products="23  23"/> 
+ <channel onMode="1" bRatio="0.050" products="24 -24"/> 
+ <channel onMode="1" bRatio="0.050" products="25  25"/> 
+ <channel onMode="1" bRatio="0.025" products="51 -51"/> 
+ <channel onMode="1" bRatio="0.025" products="51  51"/> 
+ <channel onMode="1" bRatio="0.025" products="52 -52"/> 
+ <channel onMode="1" bRatio="0.025" products="52  52"/> 
+ <channel onMode="1" bRatio="0.025" products="53 -53"/> 
+ <channel onMode="1" bRatio="0.025" products="53  53"/> 
+</particle> 
+ 
+<particle id="56" name="DM?1" antiName="DMbar?1" spinType="1" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="57" name="DM?2" antiName="DMbar?1" spinType="1" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="58" name="DM?3" antiName="DMbar?3" spinType="1" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="59" name="DM?4" antiName="DMbar?4" spinType="1" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="60" name="DM?5" antiName="DMbar?5" spinType="1" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="81" name="specflav" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="82" name="rndmflavq" antiName="rndmflavqbar" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="83" name="rndmflavg" antiName="rndmflavgbar" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="90" name="system" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="93" name="Z0copy" spinType="3" chargeType="0" colType="0" 
+          m0="91.18760" mWidth="2.49520" mMin="10.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1539950" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.1194200" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.1539840" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.1192590" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.1522720" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0335760" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0668060" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.0335760" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0668060" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.0335000" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0668060" products="16 -16"/> 
+</particle> 
+ 
+<particle id="94" name="W+copy" antiName="W-copy" spinType="3" chargeType="3" colType="0" 
+          m0="80.38500" mWidth="2.08500" mMin="10.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.3213690" products="-1 2"/> 
+ <channel onMode="1" bRatio="0.0164940" products="-1 4"/> 
+ <channel onMode="1" bRatio="0.0165020" products="-3 2"/> 
+ <channel onMode="1" bRatio="0.3206150" products="-3 4"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-5 2"/> 
+ <channel onMode="1" bRatio="0.0005910" products="-5 4"/> 
+ <channel onMode="1" bRatio="0.1081660" products="-11 12"/> 
+ <channel onMode="1" bRatio="0.1081660" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.1080870" products="-15 16"/> 
+</particle> 
+ 
+<particle id="110" name="Reggeon" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+-->
+ 
+<particle id="111" name="pi0" spinType="1" chargeType="0" colType="0" 
+          m0="0.13498" tau0="2.55313e-05"> 
+ <channel onMode="1" bRatio="0.9879900" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0119800" meMode="11" products="22 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000300" meMode="13" products="11 -11 11 -11"/> 
+</particle> 
+ 
+<particle id="113" name="rho0" spinType="3" chargeType="0" colType="0" 
+          m0="0.77549" mWidth="0.14910" mMin="0.30000" mMax="1.50000"> 
+ <channel onMode="1" bRatio="0.9988447" meMode="2" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0005993" products="111 22"/> 
+ <channel onMode="1" bRatio="0.0002997" products="221 22"/> 
+ <channel onMode="1" bRatio="0.0001009" meMode="1" products="211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000471" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0000454" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0000449" products="111 111 22"/> 
+ <channel onMode="1" bRatio="0.0000180" products="211 -211 211 -211"/> 
+</particle> 
+ 
+<!--
+<particle id="115" name="a_20" spinType="5" chargeType="0" colType="0" 
+          m0="1.31830" mWidth="0.10700" mMin="1.00000" mMax="1.70000"> 
+ <channel onMode="1" bRatio="0.3483455" products="213 -211"/> 
+ <channel onMode="1" bRatio="0.3483455" products="-213 211"/> 
+ <channel onMode="1" bRatio="0.1440000" products="221 111"/> 
+ <channel onMode="1" bRatio="0.1050000" products="223 211 -211"/> 
+ <channel onMode="1" bRatio="0.0245000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0122500" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0122500" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0053000" products="331 111"/> 
+ <channel onMode="1" bRatio="0.0000090" products="22 22"/> 
+</particle> 
+-->
+ 
+<particle id="130" name="K_L0" spinType="1" chargeType="0" colType="0" 
+          m0="0.49761" tau0="1.53300e+04"> 
+ <channel onMode="1" bRatio="0.1952278" products="111 111 111"/> 
+ <channel onMode="1" bRatio="0.1254178" products="211 -211 111"/> 
+ <channel onMode="1" bRatio="0.2027688" meMode="22" products="-12 11 211"/> 
+ <channel onMode="1" bRatio="0.2027688" meMode="22" products="12 -11 -211"/> 
+ <channel onMode="1" bRatio="0.1352191" meMode="22" products="-14 13 211"/> 
+ <channel onMode="1" bRatio="0.1352191" meMode="22" products="14 -13 -211"/> 
+ <channel onMode="1" bRatio="0.0019673" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0008641" products="111 111"/> 
+ <channel onMode="1" bRatio="0.0005471" products="22 22"/> 
+</particle> 
+ 
+<particle id="211" name="pi+" antiName="pi-" spinType="1" chargeType="3" colType="0" 
+          m0="0.13957" tau0="7.80450e+03"> 
+ <channel onMode="1" bRatio="0.9998770" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.0001230" products="-11 12"/> 
+</particle> 
+ 
+<particle id="213" name="rho+" antiName="rho-" spinType="3" chargeType="3" colType="0" 
+          m0="0.77549" mWidth="0.14910" mMin="0.30000" mMax="1.50000"> 
+ <channel onMode="1" bRatio="0.9995502" meMode="2" products="211 111"/> 
+ <channel onMode="1" bRatio="0.0004498" products="211 22"/> 
+</particle> 
+
+<particle id="100211" name="pi(1300)+" antiName="pi(1300)-" spinType="1" chargeType="3" colType="0" 
+          m0="1.300" mWidth="0.200"> 
+</particle>
+
+<particle id="100111" name="pi(1300)0" spinType="1" chargeType="3" colType="0" 
+          m0="1.300" mWidth="0.200"> 
+</particle>
+
+<!--
+<particle id="215" name="a_2+" antiName="a_2-" spinType="5" chargeType="3" colType="0" 
+          m0="1.31830" mWidth="0.10700" mMin="1.00000" mMax="1.70000"> 
+ <channel onMode="1" bRatio="0.3480100" products="213 111"/> 
+ <channel onMode="1" bRatio="0.3480100" products="113 211"/> 
+ <channel onMode="1" bRatio="0.1440000" products="221 211"/> 
+ <channel onMode="1" bRatio="0.1040000" products="223 211 111"/> 
+ <channel onMode="1" bRatio="0.0480000" products="321 -311"/> 
+ <channel onMode="1" bRatio="0.0053000" products="331 211"/> 
+ <channel onMode="1" bRatio="0.0026800" products="211 22"/> 
+</particle> 
+-->
+ 
+<particle id="221" name="eta" spinType="1" chargeType="0" colType="0" 
+          m0="0.54785" tau0="1.51e-07"> 
+ <channel onMode="1" bRatio="0.3931181" products="22 22"/> 
+ <channel onMode="1" bRatio="0.3257150" products="111 111 111"/> 
+ <channel onMode="1" bRatio="0.0002700" products="111 22 22"/> 
+ <channel onMode="1" bRatio="0.2274105" products="211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0460021" products="211 -211 22"/> 
+ <channel onMode="1" bRatio="0.0069003" meMode="11" products="22 11 -11"/> 
+ <channel onMode="1" bRatio="0.0003100" meMode="11" products="22 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000060" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0002680" meMode="12" products="211 -211 11 -11"/> 
+</particle> 
+ 
+<particle id="223" name="omega" spinType="3" chargeType="0" colType="0" 
+          m0="0.78265" mWidth="0.00849" mMin="0.50000" mMax="1.10000"> 
+ <channel onMode="1" bRatio="0.8994773" meMode="1" products="211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0834941" products="111 22"/> 
+ <channel onMode="1" bRatio="0.0154283" meMode="2" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0004639" products="221 22"/> 
+ <channel onMode="1" bRatio="0.0007765" meMode="11" products="111 11 -11"/> 
+ <channel onMode="1" bRatio="0.0001311" meMode="11" products="111 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000728" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0000900" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0000660" products="111 111 22"/> 
+</particle> 
+ 
+<!--
+<particle id="225" name="f_2" spinType="5" chargeType="0" colType="0" 
+          m0="1.27510" mWidth="0.18510" mMin="0.60000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.5653260" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.2826600" products="111 111"/> 
+ <channel onMode="1" bRatio="0.0710000" products="211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0280000" products="211 -211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0230000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0115000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0115000" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0040000" products="221 221"/> 
+ <channel onMode="1" bRatio="0.0030000" products="111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000140" products="22 22"/> 
+</particle> 
+-->
+ 
+<particle id="310" name="K_S0" spinType="1" chargeType="0" colType="0" 
+          m0="0.49761" tau0="2.68420e+01"> 
+ <channel onMode="1" bRatio="0.6922420" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.3070073" products="111 111"/> 
+ <channel onMode="1" bRatio="0.0000479" meMode="12" products="211 -211 11 -11"/> 
+ <channel onMode="1" bRatio="0.0003501" meMode="22" products="-12 11 211"/> 
+ <channel onMode="1" bRatio="0.0003501" meMode="22" products="12 -11 -211"/> 
+ <channel onMode="1" bRatio="0.0000026" products="22 22"/> 
+</particle> 
+ 
+<particle id="311" name="K0" antiName="Kbar0" spinType="1" chargeType="0" colType="0" 
+          m0="0.49761" tau0="1e-15"> 
+ <channel onMode="1" bRatio="0.5000000" products="130"/> 
+ <channel onMode="1" bRatio="0.5000000" products="310"/> 
+</particle> 
+ 
+<particle id="313" name="K*0" antiName="K*bar0" spinType="3" chargeType="0" colType="0" 
+          m0="0.89594" mWidth="0.04870" mMin="0.65000" mMax="1.20000"> 
+ <channel onMode="1" bRatio="0.6649467" meMode="2" products="321 -211"/> 
+ <channel onMode="1" bRatio="0.3326633" meMode="2" products="311 111"/> 
+ <channel onMode="1" bRatio="0.0023900" products="311 22"/> 
+</particle> 
+
+<particle id="10311" name="K*0(1430)0" antiName="K*0(1430)0bar" spinType="1" chargeType="0" colType="0" 
+          m0="1.425" mWidth="0.270" mMin="1.3750" mMax="1.4750"> 
+</particle> 
+
+<particle id="10321" name="K*0(1430)+" antiName="K*0(1430)bar-" spinType="1" chargeType="0" colType="0" 
+          m0="1.425" mWidth="0.270" mMin="1.3750" mMax="1.4750"> 
+</particle> 
+
+<!--
+<particle id="315" name="K*_2(1430)0" antiName="K*_2(1430)bar0" spinType="5" chargeType="0" colType="0" 
+          m0="1.43240" mWidth="0.10900" mMin="1.10000" mMax="1.80000"> 
+ <channel onMode="1" bRatio="0.3335002" products="321 -211"/> 
+ <channel onMode="1" bRatio="0.1667502" products="311 111"/> 
+ <channel onMode="1" bRatio="0.1650794" products="323 -211"/> 
+ <channel onMode="1" bRatio="0.0825397" products="313 111"/> 
+ <channel onMode="1" bRatio="0.0892231" products="323 -211 111"/> 
+ <channel onMode="1" bRatio="0.0451128" products="313 211 -211"/> 
+ <channel onMode="1" bRatio="0.0581454" products="321 -213"/> 
+ <channel onMode="1" bRatio="0.0290727" products="311 113"/> 
+ <channel onMode="1" bRatio="0.0290727" products="311 223"/> 
+ <channel onMode="1" bRatio="0.0015038" products="311 221"/> 
+</particle> 
+-->
+ 
+<particle id="321" name="K+" antiName="K-" spinType="1" chargeType="3" colType="0" 
+          m0="0.49368" tau0="3.71300e+03"> 
+ <channel onMode="1" bRatio="0.6355250" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.0000158" products="-11 12"/> 
+ <channel onMode="1" bRatio="0.2066081" products="211 111"/> 
+ <channel onMode="1" bRatio="0.0559022" products="211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0176107" products="211 111 111"/> 
+ <channel onMode="1" bRatio="0.0507020" meMode="22" products="12 -11 111"/> 
+ <channel onMode="1" bRatio="0.0335313" meMode="22" products="14 -13 111"/> 
+ <channel onMode="1" bRatio="0.0000220" products="-11 12 111 111"/> 
+ <channel onMode="1" bRatio="0.0000409" products="-11 12 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000140" products="-13 14 111 111"/> 
+ <channel onMode="1" bRatio="0.0000280" products="-13 14 211 -211"/> 
+</particle> 
+ 
+<particle id="323" name="K*+" antiName="K*-" spinType="3" chargeType="3" colType="0" 
+          m0="0.89166" mWidth="0.05080" mMin="0.65000" mMax="1.20000"> 
+ <channel onMode="1" bRatio="0.6660067" meMode="2" products="311 211"/> 
+ <channel onMode="1" bRatio="0.3330033" meMode="2" products="321 111"/> 
+ <channel onMode="1" bRatio="0.0009900" products="321 22"/> 
+</particle> 
+ 
+<!--
+<particle id="325" name="K*_2(1430)+" antiName="K*_2(1430)-" spinType="5" chargeType="3" colType="0" 
+          m0="1.42560" mWidth="0.09850" mMin="1.10000" mMax="1.80000"> 
+ <channel onMode="1" bRatio="0.3330333" products="311 211"/> 
+ <channel onMode="1" bRatio="0.1660166" products="321 111"/> 
+ <channel onMode="1" bRatio="0.1646498" products="313 211"/> 
+ <channel onMode="1" bRatio="0.0823749" products="323 111"/> 
+ <channel onMode="1" bRatio="0.0890089" products="313 211 111"/> 
+ <channel onMode="1" bRatio="0.0450045" products="323 211 -211"/> 
+ <channel onMode="1" bRatio="0.0580058" products="311 213"/> 
+ <channel onMode="1" bRatio="0.0290029" products="321 113"/> 
+ <channel onMode="1" bRatio="0.0290029" products="321 223"/> 
+ <channel onMode="1" bRatio="0.0015002" products="321 221"/> 
+ <channel onMode="1" bRatio="0.0024002" products="321 22"/> 
+</particle> 
+-->
+ 
+<particle id="331" name="eta'" spinType="1" chargeType="0" colType="0" 
+          m0="0.95778" mWidth="0.00020" mMin="0.95578" mMax="0.95978"> 
+ <channel onMode="1" bRatio="0.4365815" products="211 -211 221"/> 
+ <channel onMode="1" bRatio="0.2947428" products="113 22"/> 
+ <channel onMode="1" bRatio="0.2172848" products="111 111 221"/> 
+ <channel onMode="1" bRatio="0.0276636" products="223 22"/> 
+ <channel onMode="1" bRatio="0.0219297" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0016900" products="111 111 111"/> 
+ <channel onMode="1" bRatio="0.0001076" products="13 -13 22"/> 
+</particle> 
+ 
+<particle id="333" name="phi" spinType="3" chargeType="0" colType="0" 
+          m0="1.01946" mWidth="0.00426" mMin="1.00000" mMax="1.04000"> 
+ <channel onMode="1" bRatio="0.4893042" meMode="2" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.3422127" meMode="2" products="130 310"/> 
+ <channel onMode="1" bRatio="0.0420984" products="-213 211"/> 
+ <channel onMode="1" bRatio="0.0420984" products="113 111"/> 
+ <channel onMode="1" bRatio="0.0420984" products="213 -211"/> 
+ <channel onMode="1" bRatio="0.0270000" meMode="1" products="211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0130981" products="221 22"/> 
+ <channel onMode="1" bRatio="0.0012708" products="111 22"/> 
+ <channel onMode="1" bRatio="0.0002956" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0002872" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0001151" meMode="11" products="221 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000740" meMode="2" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0000470" products="223 111"/> 
+</particle> 
+ 
+<!--
+<particle id="335" name="f'_2(1525)" spinType="5" chargeType="0" colType="0" 
+          m0="1.52500" mWidth="0.07300" mMin="1.10000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.4444000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.2222000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.2222000" products="310 310"/> 
+ <channel onMode="1" bRatio="0.1030000" products="221 221"/> 
+ <channel onMode="1" bRatio="0.0041000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0041000" products="111 111"/> 
+</particle> 
+-->
+ 
+<particle id="411" name="D+" antiName="D-" spinType="1" chargeType="3" colType="0" 
+          m0="1.86962" tau0="3.11800e-01"> 
+ <channel onMode="1" bRatio="0.0004000" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-15 16"/> 
+ <channel onMode="1" bRatio="0.0043000" meMode="22" products="-11 12 111"/> 
+ <channel onMode="1" bRatio="0.0028000" meMode="22" products="-11 12 113"/> 
+ <channel onMode="1" bRatio="0.0026000" meMode="22" products="-11 12 221"/> 
+ <channel onMode="1" bRatio="0.0028000" meMode="22" products="-11 12 223"/> 
+ <channel onMode="1" bRatio="0.0900000" meMode="22" products="-11 12 311"/> 
+ <channel onMode="1" bRatio="0.0554000" meMode="22" products="-11 12 -313"/> 
+ <channel onMode="1" bRatio="0.0038000" meMode="22" products="-11 12 -315"/> 
+ <channel onMode="1" bRatio="0.0005000" meMode="22" products="-11 12 331"/> 
+ <channel onMode="1" bRatio="0.0036000" meMode="22" products="-11 12 -10313"/> 
+ <channel onMode="1" bRatio="0.0043000" meMode="22" products="-13 14 111"/> 
+ <channel onMode="1" bRatio="0.0028000" meMode="22" products="-13 14 113"/> 
+ <channel onMode="1" bRatio="0.0026000" meMode="22" products="-13 14 221"/> 
+ <channel onMode="1" bRatio="0.0028000" meMode="22" products="-13 14 223"/> 
+ <channel onMode="1" bRatio="0.0874000" meMode="22" products="-13 14 311"/> 
+ <channel onMode="1" bRatio="0.0533000" meMode="22" products="-13 14 -313"/> 
+ <channel onMode="1" bRatio="0.0038000" meMode="22" products="-13 14 -315"/> 
+ <channel onMode="1" bRatio="0.0005000" meMode="22" products="-13 14 331"/> 
+ <channel onMode="1" bRatio="0.0036000" meMode="22" products="-13 14 -10313"/> 
+ <channel onMode="1" bRatio="0.0014000" meMode="22" products="-11 12 311 111"/> 
+ <channel onMode="1" bRatio="0.0027000" meMode="22" products="-11 12 -321 211"/> 
+ <channel onMode="1" bRatio="0.0014000" meMode="22" products="-13 14 311 111"/> 
+ <channel onMode="1" bRatio="0.0027000" meMode="22" products="-13 14 -321 211"/> 
+ <channel onMode="1" bRatio="0.0026000" products="211 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="211 113"/> 
+ <channel onMode="1" bRatio="0.0076000" products="221 211"/> 
+ <channel onMode="1" bRatio="0.0282000" products="311 211"/> 
+ <channel onMode="1" bRatio="0.0210000" products="-313 213"/> 
+ <channel onMode="1" bRatio="0.0074000" products="321 311"/> 
+ <channel onMode="1" bRatio="0.0042000" products="321 -313"/> 
+ <channel onMode="1" bRatio="0.0310000" products="323 311"/> 
+ <channel onMode="1" bRatio="0.0180000" products="323 -313"/> 
+ <channel onMode="1" bRatio="0.0070000" products="333 211"/> 
+ <channel onMode="1" bRatio="0.0115000" products="-10311 211"/> 
+ <channel onMode="1" bRatio="0.0800000" products="20213 311"/> 
+ <channel onMode="1" bRatio="0.0508000" products="-20313 211"/> 
+ <channel onMode="1" bRatio="0.0015000" products="211 111 111"/> 
+ <channel onMode="1" bRatio="0.0020000" products="211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0030000" products="221 211 111"/> 
+ <channel onMode="1" bRatio="0.0970000" products="311 211 111"/> 
+ <channel onMode="1" bRatio="0.0050000" products="311 211 113"/> 
+ <channel onMode="1" bRatio="0.0100000" products="311 221 211"/> 
+ <channel onMode="1" bRatio="0.0050000" products="311 223 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="311 311 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="313 311 211"/> 
+ <channel onMode="1" bRatio="0.0100000" products="-313 211 111"/> 
+ <channel onMode="1" bRatio="0.0078000" products="-313 211 113"/> 
+ <channel onMode="1" bRatio="0.0100000" products="-313 221 211"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-313 223 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-313 311 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="321 311 111"/> 
+ <channel onMode="1" bRatio="0.0100000" products="321 311 311"/> 
+ <channel onMode="1" bRatio="0.0010000" products="321 -313 111"/> 
+ <channel onMode="1" bRatio="0.0046000" products="321 -321 211"/> 
+ <channel onMode="1" bRatio="0.0920000" products="-321 211 211"/> 
+ <channel onMode="1" bRatio="0.0110000" products="-321 213 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="323 311 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="323 -321 211"/> 
+ <channel onMode="1" bRatio="0.0070000" products="-323 211 211"/> 
+ <channel onMode="1" bRatio="0.0100000" products="-323 213 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-323 321 211"/> 
+ <channel onMode="1" bRatio="0.0230000" products="333 211 111"/> 
+ <channel onMode="1" bRatio="0.0050000" products="211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0090000" products="211 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0020000" products="221 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0030000" products="221 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0188000" products="311 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0120000" products="-321 211 211 111"/> 
+ <channel onMode="1" bRatio="0.0021000" products="211 211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0035000" products="311 211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0087000" products="311 211 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-321 211 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0022000" products="-321 211 211 211 -211"/> 
+</particle> 
+ 
+<particle id="413" name="D*+" antiName="D*-" spinType="3" chargeType="3" colType="0" 
+          m0="2.01028" tau0="2.36e-09"> 
+ <channel onMode="1" bRatio="0.6770000" meMode="2" products="421 211"/> 
+ <channel onMode="1" bRatio="0.3070000" meMode="2" products="411 111"/> 
+ <channel onMode="1" bRatio="0.0160000" products="411 22"/> 
+</particle> 
+ 
+<!--
+<particle id="415" name="D*_2(2460)+" antiName="D*_2(2460)-" spinType="5" chargeType="3" colType="0" 
+          m0="2.46440" mWidth="0.03700" mMin="2.30000" mMax="2.65000"> 
+ <channel onMode="1" bRatio="0.2200000" products="423 211"/> 
+ <channel onMode="1" bRatio="0.1100000" products="413 111"/> 
+ <channel onMode="1" bRatio="0.3800000" products="421 211"/> 
+ <channel onMode="1" bRatio="0.1900000" products="411 111"/> 
+ <channel onMode="1" bRatio="0.0670000" products="423 211 111"/> 
+ <channel onMode="1" bRatio="0.0330000" products="413 211 -211"/> 
+</particle> 
+-->
+ 
+<particle id="421" name="D0" antiName="Dbar0" spinType="1" chargeType="0" colType="0" 
+          m0="1.86486" tau0="1.22900e-01"> 
+ <channel onMode="1" bRatio="0.0034000" meMode="22" products="-11 12 -211"/> 
+ <channel onMode="1" bRatio="0.0022000" meMode="22" products="-11 12 -213"/> 
+ <channel onMode="1" bRatio="0.0350000" meMode="22" products="-11 12 -321"/> 
+ <channel onMode="1" bRatio="0.0225000" meMode="22" products="-11 12 -323"/> 
+ <channel onMode="1" bRatio="0.0015000" meMode="22" products="-11 12 -325"/> 
+ <channel onMode="1" bRatio="0.0014000" meMode="22" products="-11 12 -10323"/> 
+ <channel onMode="1" bRatio="0.0034000" meMode="22" products="-13 14 -211"/> 
+ <channel onMode="1" bRatio="0.0022000" meMode="22" products="-13 14 -213"/> 
+ <channel onMode="1" bRatio="0.0340000" meMode="22" products="-13 14 -321"/> 
+ <channel onMode="1" bRatio="0.0214000" meMode="22" products="-13 14 -323"/> 
+ <channel onMode="1" bRatio="0.0015000" meMode="22" products="-13 14 -325"/> 
+ <channel onMode="1" bRatio="0.0014000" meMode="22" products="-13 14 -10323"/> 
+ <channel onMode="1" bRatio="0.0011000" meMode="22" products="-11 12 311 -211"/> 
+ <channel onMode="1" bRatio="0.0006000" meMode="22" products="-11 12 -321 111"/> 
+ <channel onMode="1" bRatio="0.0011000" meMode="22" products="-13 14 311 -211"/> 
+ <channel onMode="1" bRatio="0.0006000" meMode="22" products="-13 14 -321 111"/> 
+ <channel onMode="1" bRatio="0.0008000" products="111 111"/> 
+ <channel onMode="1" bRatio="0.0020000" products="113 111"/> 
+ <channel onMode="1" bRatio="0.0006000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0015000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0040000" products="213 -211"/> 
+ <channel onMode="1" bRatio="0.0040000" products="-213 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="221 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="221 221"/> 
+ <channel onMode="1" bRatio="0.0006000" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0212000" products="311 111"/> 
+ <channel onMode="1" bRatio="0.0071000" products="311 221"/> 
+ <channel onMode="1" bRatio="0.0210000" products="311 223"/> 
+ <channel onMode="1" bRatio="0.0004000" products="313 311"/> 
+ <channel onMode="1" bRatio="0.0014000" products="313 -313"/> 
+ <channel onMode="1" bRatio="0.0085000" products="-313 111"/> 
+ <channel onMode="1" bRatio="0.0146000" products="-313 113"/> 
+ <channel onMode="1" bRatio="0.0190000" products="-313 221"/> 
+ <channel onMode="1" bRatio="0.0110000" products="-313 223"/> 
+ <channel onMode="1" bRatio="0.0008000" products="-313 311"/> 
+ <channel onMode="1" bRatio="0.0001500" products="321 -211"/> 
+ <channel onMode="1" bRatio="0.0043000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0383000" products="-321 211"/> 
+ <channel onMode="1" bRatio="0.0035000" products="323 -321"/> 
+ <channel onMode="1" bRatio="0.0610000" products="-323 213"/> 
+ <channel onMode="1" bRatio="0.0018000" products="-323 321"/> 
+ <channel onMode="1" bRatio="0.0010000" products="331 111"/> 
+ <channel onMode="1" bRatio="0.0172000" products="331 311"/> 
+ <channel onMode="1" bRatio="0.0020000" products="331 -313"/> 
+ <channel onMode="1" bRatio="0.0007000" products="333 111"/> 
+ <channel onMode="1" bRatio="0.0086000" products="333 311"/> 
+ <channel onMode="1" bRatio="0.0071000" products="-10313 111"/> 
+ <channel onMode="1" bRatio="0.0107000" products="-10323 211"/> 
+ <channel onMode="1" bRatio="0.0730000" products="20213 -321"/> 
+ <channel onMode="1" bRatio="0.0010000" products="111 111 111"/> 
+ <channel onMode="1" bRatio="0.0060000" products="211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0270000" products="211 -211 130"/> 
+ <channel onMode="1" bRatio="0.0270000" products="310 211 -211"/> 
+ <channel onMode="1" bRatio="0.0008000" products="310 310 310"/> 
+ <channel onMode="1" bRatio="0.0078000" products="311 111 111"/> 
+ <channel onMode="1" bRatio="0.0116000" products="-313 111 111"/> 
+ <channel onMode="1" bRatio="0.0225000" products="-313 211 -211"/> 
+ <channel onMode="1" bRatio="0.0005000" products="321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0051000" products="321 -321 311"/> 
+ <channel onMode="1" bRatio="0.1390000" products="-321 211 111"/> 
+ <channel onMode="1" bRatio="0.0060000" products="-321 211 113"/> 
+ <channel onMode="1" bRatio="0.0068000" products="-321 213 111"/> 
+ <channel onMode="1" bRatio="0.0100000" products="-321 221 211"/> 
+ <channel onMode="1" bRatio="0.0303000" products="-321 223 211"/> 
+ <channel onMode="1" bRatio="0.0100000" products="-323 211 111"/> 
+ <channel onMode="1" bRatio="0.0075000" products="331 -321 211"/> 
+ <channel onMode="1" bRatio="0.0011000" products="333 211 -211"/> 
+ <channel onMode="1" bRatio="0.0073000" products="211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0050000" products="211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0143000" products="311 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0085000" products="311 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0015000" products="311 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0015000" products="311 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0030000" products="321 -321 111 111"/> 
+ <channel onMode="1" bRatio="0.0025000" products="321 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0257500" products="-321 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0074000" products="-321 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0177000" products="211 211 -211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0060000" products="211 -211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0058000" products="311 211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0638000" products="311 211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0038000" products="-321 211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0038000" products="-321 211 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0192000" products="311 211 -211 111 111 111"/> 
+</particle> 
+ 
+<particle id="423" name="D*0" antiName="D*bar0" spinType="3" chargeType="0" colType="0" 
+          m0="2.00698"> 
+ <channel onMode="1" bRatio="0.6190000" meMode="2" products="421 111"/> 
+ <channel onMode="1" bRatio="0.3810000" products="421 22"/> 
+</particle> 
+ 
+<!--
+<particle id="425" name="D*_2(2460)0" antiName="D*_2(2460)bar0" spinType="5" chargeType="0" colType="0" 
+          m0="2.46260" mWidth="0.04900" mMin="2.30000" mMax="2.65000"> 
+ <channel onMode="1" bRatio="0.2200000" products="413 -211"/> 
+ <channel onMode="1" bRatio="0.1100000" products="423 111"/> 
+ <channel onMode="1" bRatio="0.3800000" products="411 -211"/> 
+ <channel onMode="1" bRatio="0.1900000" products="421 111"/> 
+ <channel onMode="1" bRatio="0.0670000" products="413 -211 111"/> 
+ <channel onMode="1" bRatio="0.0330000" products="423 211 -211"/> 
+</particle> 
+-->
+ 
+<particle id="431" name="D_s+" antiName="D_s-" spinType="1" chargeType="3" colType="0" 
+          m0="1.96849" tau0="1.49900e-01"> 
+ <channel onMode="1" bRatio="0.0061600" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.0640000" products="-15 16"/> 
+ <channel onMode="1" bRatio="0.0307000" meMode="22" products="-11 12 221"/> 
+ <channel onMode="1" bRatio="0.0027000" meMode="22" products="-11 12 311"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="-11 12 -313"/> 
+ <channel onMode="1" bRatio="0.0106000" meMode="22" products="-11 12 331"/> 
+ <channel onMode="1" bRatio="0.0242000" meMode="22" products="-11 12 333"/> 
+ <channel onMode="1" bRatio="0.0307000" meMode="22" products="-13 14 221"/> 
+ <channel onMode="1" bRatio="0.0027000" meMode="22" products="-13 14 311"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="-13 14 -313"/> 
+ <channel onMode="1" bRatio="0.0106000" meMode="22" products="-13 14 331"/> 
+ <channel onMode="1" bRatio="0.0242000" meMode="22" products="-13 14 333"/> 
+ <channel onMode="1" bRatio="0.0010000" products="211 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="211 113"/> 
+ <channel onMode="1" bRatio="0.0004000" products="213 111"/> 
+ <channel onMode="1" bRatio="0.0210000" products="221 211"/> 
+ <channel onMode="1" bRatio="0.1310400" products="221 213"/> 
+ <channel onMode="1" bRatio="0.0034000" products="223 211"/> 
+ <channel onMode="1" bRatio="0.0023000" products="225 211"/> 
+ <channel onMode="1" bRatio="0.0040000" products="311 211"/> 
+ <channel onMode="1" bRatio="0.0015000" products="311 213"/> 
+ <channel onMode="1" bRatio="0.0079000" products="313 211"/> 
+ <channel onMode="1" bRatio="0.0050000" products="313 213"/> 
+ <channel onMode="1" bRatio="0.0015000" products="321 113"/> 
+ <channel onMode="1" bRatio="0.0002000" products="321 221"/> 
+ <channel onMode="1" bRatio="0.0440000" products="321 311"/> 
+ <channel onMode="1" bRatio="0.0400000" products="321 -313"/> 
+ <channel onMode="1" bRatio="0.0530000" products="323 311"/> 
+ <channel onMode="1" bRatio="0.0700000" products="323 -313"/> 
+ <channel onMode="1" bRatio="0.0470000" products="331 211"/> 
+ <channel onMode="1" bRatio="0.1220000" products="331 213"/> 
+ <channel onMode="1" bRatio="0.0002000" products="331 321"/> 
+ <channel onMode="1" bRatio="0.0440000" products="333 211"/> 
+ <channel onMode="1" bRatio="0.0820000" products="333 213"/> 
+ <channel onMode="1" bRatio="0.0003000" products="333 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="20213 311"/> 
+ <channel onMode="1" bRatio="0.0100000" products="9010221 211"/> 
+ <channel onMode="1" bRatio="0.0000500" products="211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000500" products="211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0150000" products="221 211 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="311 211 111"/> 
+ <channel onMode="1" bRatio="0.0050000" products="313 211 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="321 221 111"/> 
+ <channel onMode="1" bRatio="0.0030000" products="321 311 111"/> 
+ <channel onMode="1" bRatio="0.0012000" products="321 -313 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="321 321 -321"/> 
+ <channel onMode="1" bRatio="0.0110000" products="321 -321 211"/> 
+ <channel onMode="1" bRatio="0.0012000" products="323 311 111"/> 
+ <channel onMode="1" bRatio="0.0040000" products="323 -313 111"/> 
+ <channel onMode="1" bRatio="0.0150000" products="331 211 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="331 321 111"/> 
+ <channel onMode="1" bRatio="0.0100000" products="333 211 111"/> 
+ <channel onMode="1" bRatio="0.0050000" products="221 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0050000" products="221 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="321 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="321 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="321 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="331 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0050000" products="333 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0080000" products="333 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0043000" products="321 -321 211 211 -211"/> 
+</particle> 
+ 
+<particle id="433" name="D*_s+" antiName="D*_s-" spinType="3" chargeType="3" colType="0" 
+          m0="2.11230"> 
+ <channel onMode="1" bRatio="0.9420000" products="431 22"/> 
+ <channel onMode="1" bRatio="0.0580000" meMode="2" products="431 111"/> 
+</particle> 
+ 
+<!--
+<particle id="435" name="D*_2s(2573)+" antiName="D*_2s(2573)-" spinType="5" chargeType="3" colType="0" 
+          m0="2.57190" mWidth="0.01700" mMin="2.51000" mMax="2.70000"> 
+ <channel onMode="1" bRatio="0.0500000" products="413 311"/> 
+ <channel onMode="1" bRatio="0.0500000" products="423 321"/> 
+ <channel onMode="1" bRatio="0.4500000" products="411 311"/> 
+ <channel onMode="1" bRatio="0.4500000" products="421 321"/> 
+</particle> 
+-->
+ 
+<particle id="441" name="eta_c" spinType="1" chargeType="0" colType="0" 
+          m0="2.98100" mWidth="0.02970" mMin="2.78040" mMax="3.18040"> 
+ <channel onMode="1" bRatio="0.0002800" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0087000" products="113 113"/> 
+ <channel onMode="1" bRatio="0.0173000" products="213 -213"/> 
+ <channel onMode="1" bRatio="0.0042000" products="313 -313"/> 
+ <channel onMode="1" bRatio="0.0043000" products="323 -323"/> 
+ <channel onMode="1" bRatio="0.0026000" products="333 333"/> 
+ <channel onMode="1" bRatio="0.0013000" products="2212 -2212"/> 
+ <channel onMode="1" bRatio="0.0163000" products="221 111 111"/> 
+ <channel onMode="1" bRatio="0.0327000" products="221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0095000" products="311 311 111"/> 
+ <channel onMode="1" bRatio="0.0191000" products="321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0072000" products="321 -313 -211"/> 
+ <channel onMode="1" bRatio="0.0095000" products="321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0191000" products="-321 311 211"/> 
+ <channel onMode="1" bRatio="0.0072000" products="-321 313 211"/> 
+ <channel onMode="1" bRatio="0.0137000" products="331 111 111"/> 
+ <channel onMode="1" bRatio="0.0273000" products="331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0018000" products="333 321 -321"/> 
+ <channel onMode="1" bRatio="0.0033000" products="211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0006000" products="321 321 -321 -321"/> 
+ <channel onMode="1" bRatio="0.0054000" products="321 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.7886200" meMode="52" products="83 -83"/> 
+</particle> 
+ 
+<particle id="443" name="J/psi" spinType="3" chargeType="0" colType="0" 
+          m0="3.09692" mWidth="0.00009" mMin="3.09602" mMax="3.09782"> 
+ <channel onMode="1" bRatio="0.8023950" meMode="43" products="83 -83"/> 
+ <channel onMode="1" bRatio="0.0594000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0593000" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0130000" products="441 22"/> 
+ <channel onMode="1" bRatio="0.0056000" products="113 111"/> 
+ <channel onMode="1" bRatio="0.0056500" products="213 -211"/> 
+ <channel onMode="1" bRatio="0.0056500" products="-213 211"/> 
+ <channel onMode="1" bRatio="0.0036000" products="115 113"/> 
+ <channel onMode="1" bRatio="0.0036000" products="-215 213"/> 
+ <channel onMode="1" bRatio="0.0036000" products="215 -213"/> 
+ <channel onMode="1" bRatio="0.0043000" products="225 223"/> 
+ <channel onMode="1" bRatio="0.0022000" products="313 -315"/> 
+ <channel onMode="1" bRatio="0.0022000" products="323 -325"/> 
+ <channel onMode="1" bRatio="0.0022000" products="-323 325"/> 
+ <channel onMode="1" bRatio="0.0025000" products="321 -323"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-321 323"/> 
+ <channel onMode="1" bRatio="0.0021000" products="311 -313"/> 
+ <channel onMode="1" bRatio="0.0021000" products="-311 313"/> 
+ <channel onMode="1" bRatio="0.0019000" products="20323 -321"/> 
+ <channel onMode="1" bRatio="0.0019000" products="-20323 321"/> 
+ <channel onMode="1" bRatio="0.0015000" products="10213 -211"/> 
+ <channel onMode="1" bRatio="0.0015000" products="-10213 211"/> 
+ <channel onMode="1" bRatio="0.0023000" products="10113 111"/> 
+ <channel onMode="1" bRatio="0.0004800" products="10331 223"/> 
+ <channel onMode="1" bRatio="0.0007400" products="223 221"/> 
+ <channel onMode="1" bRatio="0.0003600" products="10331 333"/> 
+ <channel onMode="1" bRatio="0.0008000" products="333 335"/> 
+ <channel onMode="1" bRatio="0.0006800" products="20333 223"/> 
+ <channel onMode="1" bRatio="0.0007400" products="333 221"/> 
+ <channel onMode="1" bRatio="0.0004500" products="223 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="333 331"/> 
+ <channel onMode="1" bRatio="0.0003200" products="333 9010221"/> 
+ <channel onMode="1" bRatio="0.0002600" products="333 20223"/> 
+ <channel onMode="1" bRatio="0.0001930" products="113 221"/> 
+ <channel onMode="1" bRatio="0.0001820" products="223 331"/> 
+ <channel onMode="1" bRatio="0.0001400" products="223 9010221"/> 
+ <channel onMode="1" bRatio="0.0001050" products="113 331"/> 
+ <channel onMode="1" bRatio="0.0011000" products="2224 -2224"/> 
+ <channel onMode="1" bRatio="0.0005150" products="3112 -3112"/> 
+ <channel onMode="1" bRatio="0.0005900" products="3314 -3314"/> 
+ <channel onMode="1" bRatio="0.0003200" products="3324 -3324"/> 
+ <channel onMode="1" bRatio="0.0003200" products="3324 -3324"/> 
+ <channel onMode="1" bRatio="0.0001550" products="3114 -3114"/> 
+ <channel onMode="1" bRatio="0.0001550" products="3224 -3224"/> 
+</particle> 
+ 
+<!--
+<particle id="445" name="chi_2c" spinType="5" chargeType="0" colType="0" 
+          m0="3.55620" mWidth="0.00198" mMin="3.53620" mMax="3.57620"> 
+ <channel onMode="1" bRatio="0.0002590" products="22 22"/> 
+ <channel onMode="1" bRatio="0.2020000" products="443 22"/> 
+ <channel onMode="1" bRatio="0.0008900" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0018000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0008900" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0047000" products="313 -313"/> 
+ <channel onMode="1" bRatio="0.0009000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0024000" products="333 333"/> 
+ <channel onMode="1" bRatio="0.0000680" products="2212 -2212"/> 
+ <channel onMode="1" bRatio="0.0003000" products="3122 -3122"/> 
+ <channel onMode="1" bRatio="0.0046000" products="211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0046000" products="213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0046000" products="-213 211 111"/> 
+ <channel onMode="1" bRatio="0.0015000" products="321 -313 -211"/> 
+ <channel onMode="1" bRatio="0.0015000" products="-321 313 211"/> 
+ <channel onMode="1" bRatio="0.0016000" products="323 311 -211"/> 
+ <channel onMode="1" bRatio="0.0016000" products="-323 311 211"/> 
+ <channel onMode="1" bRatio="0.0102000" products="211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0003000" products="310 310 211 -211"/> 
+ <channel onMode="1" bRatio="0.0012000" products="321 321 -321 -321"/> 
+ <channel onMode="1" bRatio="0.0103000" products="321 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0003000" products="321 -321 310 310"/> 
+ <channel onMode="1" bRatio="0.0017000" products="2212 -2212 211 -211"/> 
+ <channel onMode="1" bRatio="0.0107000" products="211 211 211 -211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.7310930" meMode="52" products="83 -83"/> 
+</particle> 
+-->
+ 
+<particle id="511" name="B0" antiName="Bbar0" spinType="1" chargeType="0" colType="0" 
+          m0="5.27958" tau0="4.58700e-01"> 
+ <channel onMode="1" bRatio="0.0001330" meMode="22" products="12 -11 -211"/> 
+ <channel onMode="1" bRatio="0.0002690" meMode="22" products="12 -11 -213"/> 
+ <channel onMode="1" bRatio="0.0207000" meMode="22" products="12 -11 -411"/> 
+ <channel onMode="1" bRatio="0.0570000" meMode="22" products="12 -11 -413"/> 
+ <channel onMode="1" bRatio="0.0023000" meMode="22" products="12 -11 -415"/> 
+ <channel onMode="1" bRatio="0.0045000" meMode="22" products="12 -11 -10411"/> 
+ <channel onMode="1" bRatio="0.0052000" meMode="22" products="12 -11 -10413"/> 
+ <channel onMode="1" bRatio="0.0083000" meMode="22" products="12 -11 -20413"/> 
+ <channel onMode="1" bRatio="0.0001330" meMode="22" products="14 -13 -211"/> 
+ <channel onMode="1" bRatio="0.0002690" meMode="22" products="14 -13 -213"/> 
+ <channel onMode="1" bRatio="0.0207000" meMode="22" products="14 -13 -411"/> 
+ <channel onMode="1" bRatio="0.0570000" meMode="22" products="14 -13 -413"/> 
+ <channel onMode="1" bRatio="0.0023000" meMode="22" products="14 -13 -415"/> 
+ <channel onMode="1" bRatio="0.0045000" meMode="22" products="14 -13 -10411"/> 
+ <channel onMode="1" bRatio="0.0052000" meMode="22" products="14 -13 -10413"/> 
+ <channel onMode="1" bRatio="0.0083000" meMode="22" products="14 -13 -20413"/> 
+ <channel onMode="1" bRatio="0.0000600" meMode="22" products="16 -15 -211"/> 
+ <channel onMode="1" bRatio="0.0000830" meMode="22" products="16 -15 -213"/> 
+ <channel onMode="1" bRatio="0.0000080" meMode="22" products="16 -15 -215"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="22" products="16 -15 -411"/> 
+ <channel onMode="1" bRatio="0.0160000" meMode="22" products="16 -15 -413"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="16 -15 -415"/> 
+ <channel onMode="1" bRatio="0.0000080" meMode="22" products="16 -15 -10213"/> 
+ <channel onMode="1" bRatio="0.0013000" meMode="22" products="16 -15 -10411"/> 
+ <channel onMode="1" bRatio="0.0013000" meMode="22" products="16 -15 -10413"/> 
+ <channel onMode="1" bRatio="0.0000900" meMode="22" products="16 -15 -20213"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="16 -15 -20413"/> 
+ <channel onMode="1" bRatio="0.0000080" meMode="22" products="16 -15 -9000211"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="12 -11 -411 111"/> 
+ <channel onMode="1" bRatio="0.0003000" meMode="22" products="12 -11 -413 111"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="12 -11 -421 -211"/> 
+ <channel onMode="1" bRatio="0.0007000" meMode="22" products="12 -11 -423 -211"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="14 -13 -411 111"/> 
+ <channel onMode="1" bRatio="0.0003000" meMode="22" products="14 -13 -413 111"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="14 -13 -421 -211"/> 
+ <channel onMode="1" bRatio="0.0007000" meMode="22" products="14 -13 -423 -211"/> 
+ <channel onMode="1" bRatio="0.0000015" products="111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="113 113"/> 
+ <channel onMode="1" bRatio="0.0000060" products="130 111"/> 
+ <channel onMode="1" bRatio="0.0000026" products="130 113"/> 
+ <channel onMode="1" bRatio="0.0000006" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0000046" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0000300" products="213 -213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 130"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 221"/> 
+ <channel onMode="1" bRatio="0.0000005" products="223 22"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 113"/> 
+ <channel onMode="1" bRatio="0.0000023" products="223 130"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 223"/> 
+ <channel onMode="1" bRatio="0.0000060" products="310 111"/> 
+ <channel onMode="1" bRatio="0.0000026" products="310 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="310 221"/> 
+ <channel onMode="1" bRatio="0.0000023" products="310 223"/> 
+ <channel onMode="1" bRatio="0.0000006" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0000401" products="313 22"/> 
+ <channel onMode="1" bRatio="0.0000017" products="313 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 113"/> 
+ <channel onMode="1" bRatio="0.0000190" products="313 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 223"/> 
+ <channel onMode="1" bRatio="0.0000030" products="313 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 -313"/> 
+ <channel onMode="1" bRatio="0.0000180" products="321 -211"/> 
+ <channel onMode="1" bRatio="0.0000099" products="321 -213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0000130" products="323 -211"/> 
+ <channel onMode="1" bRatio="0.0000200" products="323 -213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="323 -321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -323"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 113"/> 
+ <channel onMode="1" bRatio="0.0000320" products="331 130"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 223"/> 
+ <channel onMode="1" bRatio="0.0000320" products="331 310"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 331"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 113"/> 
+ <channel onMode="1" bRatio="0.0000042" products="333 130"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 223"/> 
+ <channel onMode="1" bRatio="0.0000042" products="333 310"/> 
+ <channel onMode="1" bRatio="0.0000110" products="333 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 331"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 333"/> 
+ <channel onMode="1" bRatio="0.0002700" products="411 -411"/> 
+ <channel onMode="1" bRatio="0.0028000" products="-411 211"/> 
+ <channel onMode="1" bRatio="0.0077000" products="-411 213"/> 
+ <channel onMode="1" bRatio="0.0002000" products="-411 321"/> 
+ <channel onMode="1" bRatio="0.0003700" products="-411 323"/> 
+ <channel onMode="1" bRatio="0.0003350" products="413 -411"/> 
+ <channel onMode="1" bRatio="0.0008300" products="413 -413"/> 
+ <channel onMode="1" bRatio="0.0028000" products="-413 211"/> 
+ <channel onMode="1" bRatio="0.0068000" products="-413 213"/> 
+ <channel onMode="1" bRatio="0.0001700" products="-413 321"/> 
+ <channel onMode="1" bRatio="0.0003800" products="-413 323"/> 
+ <channel onMode="1" bRatio="0.0003350" products="-413 411"/> 
+ <channel onMode="1" bRatio="0.0009000" products="-415 211"/> 
+ <channel onMode="1" bRatio="0.0022000" products="-415 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="421 313"/> 
+ <channel onMode="1" bRatio="0.0002900" products="-421 111"/> 
+ <channel onMode="1" bRatio="0.0002900" products="-421 113"/> 
+ <channel onMode="1" bRatio="0.0002200" products="-421 221"/> 
+ <channel onMode="1" bRatio="0.0002500" products="-421 223"/> 
+ <channel onMode="1" bRatio="0.0000400" products="-421 311"/> 
+ <channel onMode="1" bRatio="0.0000400" products="-421 313"/> 
+ <channel onMode="1" bRatio="0.0001700" products="-421 331"/> 
+ <channel onMode="1" bRatio="0.0000100" products="423 313"/> 
+ <channel onMode="1" bRatio="0.0002700" products="-423 111"/> 
+ <channel onMode="1" bRatio="0.0002900" products="-423 113"/> 
+ <channel onMode="1" bRatio="0.0002600" products="-423 221"/> 
+ <channel onMode="1" bRatio="0.0004200" products="-423 223"/> 
+ <channel onMode="1" bRatio="0.0000400" products="-423 311"/> 
+ <channel onMode="1" bRatio="0.0000400" products="-423 313"/> 
+ <channel onMode="1" bRatio="0.0001700" products="-423 331"/> 
+ <channel onMode="1" bRatio="0.0000390" products="431 -211"/> 
+ <channel onMode="1" bRatio="0.0000160" products="431 -213"/> 
+ <channel onMode="1" bRatio="0.0090000" products="431 -411"/> 
+ <channel onMode="1" bRatio="0.0126000" products="431 -413"/> 
+ <channel onMode="1" bRatio="0.0042000" products="431 -415"/> 
+ <channel onMode="1" bRatio="0.0000460" products="-431 321"/> 
+ <channel onMode="1" bRatio="0.0000160" products="-431 323"/> 
+ <channel onMode="1" bRatio="0.0000260" products="433 -211"/> 
+ <channel onMode="1" bRatio="0.0000160" products="433 -213"/> 
+ <channel onMode="1" bRatio="0.0090000" products="433 -411"/> 
+ <channel onMode="1" bRatio="0.0240000" products="433 -413"/> 
+ <channel onMode="1" bRatio="0.0040000" products="433 -415"/> 
+ <channel onMode="1" bRatio="0.0000160" products="-433 321"/> 
+ <channel onMode="1" bRatio="0.0000160" products="-433 323"/> 
+ <channel onMode="1" bRatio="0.0006000" products="441 130"/> 
+ <channel onMode="1" bRatio="0.0006000" products="441 310"/> 
+ <channel onMode="1" bRatio="0.0016200" products="441 313"/> 
+ <channel onMode="1" bRatio="0.0000220" products="443 111"/> 
+ <channel onMode="1" bRatio="0.0000160" products="443 113"/> 
+ <channel onMode="1" bRatio="0.0004400" products="443 130"/> 
+ <channel onMode="1" bRatio="0.0000300" products="443 223"/> 
+ <channel onMode="1" bRatio="0.0004400" products="443 310"/> 
+ <channel onMode="1" bRatio="0.0005000" products="443 315"/> 
+ <channel onMode="1" bRatio="0.0000300" products="445 313"/> 
+ <channel onMode="1" bRatio="0.0000001" products="2212 -2212"/> 
+ <channel onMode="1" bRatio="0.0000010" products="10113 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="10113 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10113 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="10113 331"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10213 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10213 321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="10311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 113"/> 
+ <channel onMode="1" bRatio="0.0000030" products="10311 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 333"/> 
+ <channel onMode="1" bRatio="0.0015000" products="10313 443"/> 
+ <channel onMode="1" bRatio="0.0000010" products="10321 -211"/> 
+ <channel onMode="1" bRatio="0.0000200" products="10321 -213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 -321"/> 
+ <channel onMode="1" bRatio="0.0002000" products="-10411 211"/> 
+ <channel onMode="1" bRatio="0.0006000" products="-10413 211"/> 
+ <channel onMode="1" bRatio="0.0004000" products="-10413 213"/> 
+ <channel onMode="1" bRatio="0.0012000" products="-10413 431"/> 
+ <channel onMode="1" bRatio="0.0024000" products="-10413 433"/> 
+ <channel onMode="1" bRatio="0.0016000" products="10431 -411"/> 
+ <channel onMode="1" bRatio="0.0016000" products="10431 -413"/> 
+ <channel onMode="1" bRatio="0.0001500" products="10441 130"/> 
+ <channel onMode="1" bRatio="0.0001500" products="10441 310"/> 
+ <channel onMode="1" bRatio="0.0003000" products="10441 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20113 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 223"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 311"/> 
+ <channel onMode="1" bRatio="0.0000200" products="20113 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20113 331"/> 
+ <channel onMode="1" bRatio="0.0000500" products="20113 20113"/> 
+ <channel onMode="1" bRatio="0.0000400" products="20213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 -213"/> 
+ <channel onMode="1" bRatio="0.0083400" products="20213 -411"/> 
+ <channel onMode="1" bRatio="0.0120000" products="20213 -413"/> 
+ <channel onMode="1" bRatio="0.0000500" products="20213 -20213"/> 
+ <channel onMode="1" bRatio="0.0000400" products="-20213 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-20213 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-20213 321"/> 
+ <channel onMode="1" bRatio="0.0000200" products="-20213 323"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 333"/> 
+ <channel onMode="1" bRatio="0.0001000" products="20313 443"/> 
+ <channel onMode="1" bRatio="0.0001000" products="-20413 211"/> 
+ <channel onMode="1" bRatio="0.0013000" products="-20413 213"/> 
+ <channel onMode="1" bRatio="0.0006000" products="-20413 431"/> 
+ <channel onMode="1" bRatio="0.0012000" products="-20413 433"/> 
+ <channel onMode="1" bRatio="0.0041000" products="20433 -411"/> 
+ <channel onMode="1" bRatio="0.0098000" products="20433 -413"/> 
+ <channel onMode="1" bRatio="0.0002300" products="20443 130"/> 
+ <channel onMode="1" bRatio="0.0002300" products="20443 310"/> 
+ <channel onMode="1" bRatio="0.0003000" products="20443 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="30313 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="30313 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="30323 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="30323 -321"/> 
+ <channel onMode="1" bRatio="0.0002400" products="30443 130"/> 
+ <channel onMode="1" bRatio="0.0002400" products="30443 310"/> 
+ <channel onMode="1" bRatio="0.0004800" products="30443 313"/> 
+ <channel onMode="1" bRatio="0.0002900" products="30443 10313"/> 
+ <channel onMode="1" bRatio="0.0000005" products="100113 130"/> 
+ <channel onMode="1" bRatio="0.0000005" products="100113 310"/> 
+ <channel onMode="1" bRatio="0.0002400" products="100441 130"/> 
+ <channel onMode="1" bRatio="0.0002400" products="100441 310"/> 
+ <channel onMode="1" bRatio="0.0006600" products="100441 313"/> 
+ <channel onMode="1" bRatio="0.0003300" products="100443 130"/> 
+ <channel onMode="1" bRatio="0.0003300" products="100443 310"/> 
+ <channel onMode="1" bRatio="0.0006600" products="100443 313"/> 
+ <channel onMode="1" bRatio="0.0004000" products="100443 10313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 223"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 311"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000111 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 331"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 10113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 20113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 9000111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9000211 -213"/> 
+ <channel onMode="1" bRatio="0.0000030" products="-9000211 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-9000211 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-9000211 321"/> 
+ <channel onMode="1" bRatio="0.0000050" products="-9000211 323"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 223"/> 
+ <channel onMode="1" bRatio="0.0000060" products="9010221 311"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9010221 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 331"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 10113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 20113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 9000111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 9010221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="113 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="113 113 111"/> 
+ <channel onMode="1" bRatio="0.0000240" products="211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000030" products="211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="213 -213 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-213 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="221 113 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 113 113"/> 
+ <channel onMode="1" bRatio="0.0000170" products="221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 213 -213"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 221 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="221 221 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="223 113 111"/> 
+ <channel onMode="1" bRatio="0.0000030" products="223 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="223 221 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="223 221 113"/> 
+ <channel onMode="1" bRatio="0.0000002" products="223 221 221"/> 
+ <channel onMode="1" bRatio="0.0000006" meMode="11" products="311 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000006" meMode="11" products="311 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000001" meMode="11" products="311 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 113 111"/> 
+ <channel onMode="1" bRatio="0.0000260" products="311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 221 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 221 221"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 223 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 223 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 223"/> 
+ <channel onMode="1" bRatio="0.0000480" products="311 311 311"/> 
+ <channel onMode="1" bRatio="0.0000018" meMode="11" products="313 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000014" meMode="11" products="313 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000002" meMode="11" products="313 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="313 221 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 223 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="313 223 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 -313 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="313 -313 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-313 311 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -213 111"/> 
+ <channel onMode="1" bRatio="0.0000200" products="321 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 221 -213"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 223 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 -213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -313 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 223"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 313"/> 
+ <channel onMode="1" bRatio="0.0000005" products="-321 311 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-321 311 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-321 313 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 -213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="323 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="323 221 -213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 223 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -313 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 -321 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -323 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="323 -323 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 311 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 313 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 321 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-323 321 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 113 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 113 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 213 -213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 221 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 221 113"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 223 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 223 113"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 223 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 223"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 311"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 313 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 313 223"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 313 -313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 -213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 323 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 323 -213"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 323 -323"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 331 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 113 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="333 221 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 223 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 311 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 311 223"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 311 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 313 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="333 313 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 321 -213"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 323 -211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="333 331 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="333 331 313"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 333 111"/> 
+ <channel onMode="1" bRatio="0.0000030" products="333 333 311"/> 
+ <channel onMode="1" bRatio="0.0000030" products="333 333 313"/> 
+ <channel onMode="1" bRatio="0.0015000" products="411 -411 311"/> 
+ <channel onMode="1" bRatio="0.0025000" products="411 -411 313"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-411 211 111"/> 
+ <channel onMode="1" bRatio="0.0011000" products="-411 211 113"/> 
+ <channel onMode="1" bRatio="0.0011000" products="-411 213 111"/> 
+ <channel onMode="1" bRatio="0.0047000" products="413 -411 311"/> 
+ <channel onMode="1" bRatio="0.0025000" products="413 -411 313"/> 
+ <channel onMode="1" bRatio="0.0070000" products="413 -413 311"/> 
+ <channel onMode="1" bRatio="0.0050000" products="413 -413 313"/> 
+ <channel onMode="1" bRatio="0.0008000" products="-413 211 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-413 211 113"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-413 213 111"/> 
+ <channel onMode="1" bRatio="0.0018000" products="-413 411 311"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-413 411 313"/> 
+ <channel onMode="1" bRatio="0.0017000" products="421 -411 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="421 -411 323"/> 
+ <channel onMode="1" bRatio="0.0031000" products="421 -413 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="421 -413 323"/> 
+ <channel onMode="1" bRatio="0.0005000" products="421 -421 311"/> 
+ <channel onMode="1" bRatio="0.0005000" products="421 -421 313"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-421 211 -211"/> 
+ <channel onMode="1" bRatio="0.0049000" products="423 -411 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="423 -411 323"/> 
+ <channel onMode="1" bRatio="0.0100000" products="423 -413 321"/> 
+ <channel onMode="1" bRatio="0.0050000" products="423 -413 323"/> 
+ <channel onMode="1" bRatio="0.0005000" products="423 -421 313"/> 
+ <channel onMode="1" bRatio="0.0015000" products="423 -423 311"/> 
+ <channel onMode="1" bRatio="0.0010000" products="423 -423 313"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-423 111 111"/> 
+ <channel onMode="1" bRatio="0.0003000" products="-423 211 -211"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-423 421 313"/> 
+ <channel onMode="1" bRatio="0.0018000" products="431 -411 111"/> 
+ <channel onMode="1" bRatio="0.0037000" products="431 -421 -211"/> 
+ <channel onMode="1" bRatio="0.0018000" products="433 -411 111"/> 
+ <channel onMode="1" bRatio="0.0037000" products="433 -421 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 311 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="441 321 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="443 311 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="443 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000900" products="443 333 311"/> 
+ <channel onMode="1" bRatio="0.0001000" products="445 311 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="445 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 221 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10311 331 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 333 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 -213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10321 221 -213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 -321 311"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 331 -213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 333 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10321 321 311"/> 
+ <channel onMode="1" bRatio="0.0001000" products="10441 311 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="10441 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="20113 221 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20113 331 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="20213 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20213 331 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-20213 211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="-20213 221 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-20213 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-20213 321 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-20213 331 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 333 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20313 333 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20313 333 331"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20323 333 -211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="20443 311 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="20443 321 -211"/> 
+ <channel onMode="1" bRatio="0.0001400" products="30443 311 111"/> 
+ <channel onMode="1" bRatio="0.0001400" products="30443 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000500" products="100441 311 111"/> 
+ <channel onMode="1" bRatio="0.0000800" products="100441 321 -211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100443 311 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="100443 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000111 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000111 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000111 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000111 221 113"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000111 313 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9000111 313 221"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000111 323 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9000111 331 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 331 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000211 -213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000211 221 -213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9000211 331 -213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-9000211 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-9000211 211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-9000211 213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="-9000211 221 213"/> 
+ <channel onMode="1" bRatio="0.0000050" products="-9000211 323 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-9000211 323 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-9000211 331 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-9000211 331 323"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 113 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9010221 221 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 223 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 313 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9010221 313 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 323 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9010221 331 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9010221 331 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 333 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 333 311"/> 
+ <channel onMode="1" bRatio="0.0000020" products="113 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="211 -211 113 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="213 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="213 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-213 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-213 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 113 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 -213 211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="221 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="223 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="223 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 113 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 -213 211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 221 113 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 221 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 221 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 221 221 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 223 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 223 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 223 221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 113 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="311 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="311 311 221 113"/> 
+ <channel onMode="1" bRatio="0.0000002" products="311 311 221 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 223 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000001" products="311 311 311 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="313 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="313 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="313 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-313 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-313 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="-313 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -211 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 213 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -213 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -213 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 221 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 221 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 221 -213 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 221 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 223 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 223 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 -213 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 311 221 -213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 223 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 313 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -313 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 -313 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -313 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 321 -321 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 321 -321 -213"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 321 -321 -321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 113 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 -321 221 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 -321 221 113"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 -321 221 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 223 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 -321 223 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 311 113"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 -321 311 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 311 223"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 -321 311 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-321 311 211 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-321 311 213 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="-321 311 221 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-321 311 223 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-321 313 211 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="-321 313 221 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="323 221 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 311 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="323 311 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 311 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 321 -321 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="323 -321 221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="-323 311 221 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="-323 321 221 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-323 321 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 113 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 -213 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 223 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 223 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 311 113 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 311 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 311 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 311 223 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 311 311 113"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 313 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 313 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 313 311 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 -313 311 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 -213 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 223 -211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 311 -213"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 -313 -211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 -321 113"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 321 -321 221"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 -321 223"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 -321 311 213"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 -321 313 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 323 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 323 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 323 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 -323 311 211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 -323 321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="333 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="333 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="333 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 311 311 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 313 311 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 -313 311 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="333 321 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 -321 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 -321 313"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 -323 321 311"/> 
+ <channel onMode="1" bRatio="0.0000002" products="333 331 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="333 331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="333 331 311 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="333 331 321 -211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-411 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0022000" products="-411 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-413 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="-421 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-421 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="-423 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-423 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0022000" products="431 -411 111 111"/> 
+ <channel onMode="1" bRatio="0.0030000" products="431 -411 211 -211"/> 
+ <channel onMode="1" bRatio="0.0022000" products="431 -421 -211 111"/> 
+ <channel onMode="1" bRatio="0.0022000" products="433 -411 111 111"/> 
+ <channel onMode="1" bRatio="0.0030000" products="433 -411 211 -211"/> 
+ <channel onMode="1" bRatio="0.0022000" products="433 -421 -211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="441 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="445 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="445 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="445 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 321 -321 221"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 331 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10311 331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10311 331 311 311"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10311 331 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10311 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="-10311 311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10311 321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-10311 331 311 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10321 221 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 311 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 321 -321 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 331 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10321 321 321 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="10441 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="10441 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="10441 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20313 311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20313 321 -321 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20313 331 311 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20313 331 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-20313 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-20313 311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-20313 331 311 311"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20323 321 -321 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-20323 321 321 -211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="20443 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="20443 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="20443 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000700" products="30443 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0001400" products="30443 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000700" products="30443 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000500" products="100441 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000800" products="100441 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000500" products="100441 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="100443 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100443 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="100443 321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-9000211 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-9000211 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9010221 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9010221 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 321 -321 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 331 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="111 111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="211 211 -211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="211 -211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="221 111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="221 211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="221 211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 221 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 221 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="311 311 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="311 311 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="311 311 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="311 311 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 311 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 311 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 311 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="311 311 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 211 -211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 -211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 221 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 221 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 311 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 311 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 311 221 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 311 311 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 311 311 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 311 311 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 321 -321 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 321 -321 221 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 321 -321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 321 -321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 321 -321 -321 311"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 -321 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 -321 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 -321 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 -321 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 -321 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 -321 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 -321 311 311 311"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 -321 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="-321 311 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="-321 311 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="-321 311 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="-321 311 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 311 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 311 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 311 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 321 311 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 311 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 321 -321 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 321 -321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 321 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="331 321 -321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 -321 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 311 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 321 311 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 321 321 -321 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="333 321 -321 311 111"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="55" products="-3 1"/> 
+ <channel onMode="1" bRatio="0.0110000" meMode="63" products="-4101 2101"/> 
+ <channel onMode="1" bRatio="0.0220000" meMode="63" products="-4103 2103"/> 
+ <channel onMode="1" bRatio="0.0030000" meMode="63" products="-4301 2101"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="63" products="-4303 2103"/> 
+ <channel onMode="1" bRatio="0.0000700" meMode="23" products="1 -1 -1 1"/> 
+ <channel onMode="1" bRatio="0.0018000" meMode="23" products="1 -1 -3 1"/> 
+ <channel onMode="1" bRatio="0.0030000" meMode="23" products="2 -1 -2 1"/> 
+ <channel onMode="1" bRatio="0.0020500" meMode="23" products="2 -2 -1 1"/> 
+ <channel onMode="1" bRatio="0.0022000" meMode="23" products="2 -2 -3 1"/> 
+ <channel onMode="1" bRatio="0.0210000" meMode="63" products="2 -3 -4 1"/> 
+ <channel onMode="1" bRatio="0.0180000" meMode="23" products="2 -4 -1 1"/> 
+ <channel onMode="1" bRatio="0.0009000" meMode="23" products="2 -4 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000900" meMode="23" products="3 -3 -1 1"/> 
+ <channel onMode="1" bRatio="0.0015000" meMode="23" products="3 -3 -3 1"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="43" products="4 -1 -4 1"/> 
+ <channel onMode="1" bRatio="0.0040000" meMode="23" products="4 -3 -2 1"/> 
+ <channel onMode="1" bRatio="0.0740000" meMode="43" products="4 -3 -4 1"/> 
+ <channel onMode="2" bRatio="0.0018920" meMode="22" products="12 -11 1 -2"/> 
+ <channel onMode="2" bRatio="0.0018920" meMode="22" products="14 -13 1 -2"/> 
+ <channel onMode="2" bRatio="0.0012910" products="443 313"/> 
+ <channel onMode="2" bRatio="0.0000500" products="445 130"/> 
+ <channel onMode="2" bRatio="0.0000500" products="445 310"/> 
+ <channel onMode="2" bRatio="0.0000100" products="213 -211 113"/> 
+ <channel onMode="2" bRatio="0.0000100" products="223 213 -211"/> 
+ <channel onMode="2" bRatio="0.0000067" products="313 111 111"/> 
+ <channel onMode="2" bRatio="0.0000100" products="321 -211 113"/> 
+ <channel onMode="2" bRatio="0.0000010" products="321 -321 130"/> 
+ <channel onMode="2" bRatio="0.0000010" products="321 -321 310"/> 
+ <channel onMode="2" bRatio="0.0000070" products="333 311 221"/> 
+ <channel onMode="2" bRatio="0.0005000" products="423 -421 311"/> 
+ <channel onMode="2" bRatio="0.0015000" products="-423 421 311"/> 
+ <channel onMode="2" bRatio="0.0000050" products="9000211 313 -211"/> 
+ <channel onMode="2" bRatio="0.0003118" meMode="31" products="1 -3 22"/> 
+ <channel onMode="2" bRatio="0.0000050" meMode="12" products="1 -3 11 -11"/> 
+ <channel onMode="2" bRatio="0.0000025" meMode="12" products="1 -3 13 -13"/> 
+ <channel onMode="2" bRatio="0.0000002" meMode="12" products="1 -3 15 -15"/> 
+ <channel onMode="2" bRatio="0.3158500" meMode="23" products="2 -1 -4 1"/> 
+ <channel onMode="3" bRatio="0.0018920" meMode="22" products="12 -11 -2 1"/> 
+ <channel onMode="3" bRatio="0.0018920" meMode="22" products="14 -13 -2 1"/> 
+ <channel onMode="3" bRatio="0.0012310" products="443 313"/> 
+ <channel onMode="3" bRatio="0.0000100" products="445 130"/> 
+ <channel onMode="3" bRatio="0.0000100" products="445 310"/> 
+ <channel onMode="3" bRatio="0.0000100" products="-213 211 113"/> 
+ <channel onMode="3" bRatio="0.0000100" products="223 -213 211"/> 
+ <channel onMode="3" bRatio="0.0000067" products="-313 111 111"/> 
+ <channel onMode="3" bRatio="0.0000050" products="321 -211 113"/> 
+ <channel onMode="3" bRatio="0.0000105" products="321 -321 130"/> 
+ <channel onMode="3" bRatio="0.0000105" products="321 -321 310"/> 
+ <channel onMode="3" bRatio="0.0000050" products="333 311 221"/> 
+ <channel onMode="3" bRatio="0.0015000" products="423 -421 311"/> 
+ <channel onMode="3" bRatio="0.0005000" products="-423 421 311"/> 
+ <channel onMode="3" bRatio="0.0000050" products="-9000211 313 211"/> 
+ <channel onMode="3" bRatio="0.0003118" meMode="31" products="-3 1 22"/> 
+ <channel onMode="3" bRatio="0.3160000" meMode="23" products="2 -1 -4 1"/> 
+ <channel onMode="3" bRatio="0.0000050" meMode="12" products="-3 1 11 -11"/> 
+ <channel onMode="3" bRatio="0.0000025" meMode="12" products="-3 1 13 -13"/> 
+ <channel onMode="3" bRatio="0.0000002" meMode="12" products="-3 1 15 -15"/> 
+</particle> 
+ 
+<!--
+<particle id="513" name="B*0" antiName="B*bar0" spinType="3" chargeType="0" colType="0" 
+          m0="5.32520"> 
+ <channel onMode="1" bRatio="1.0000000" products="511 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="515" name="B*_20" antiName="B*_2bar0" spinType="5" chargeType="0" colType="0" 
+          m0="5.74300" mWidth="0.02300" mMin="5.63000" mMax="6.03000"> 
+ <channel onMode="1" bRatio="0.3100000" products="523 -211"/> 
+ <channel onMode="1" bRatio="0.1500000" products="513 111"/> 
+ <channel onMode="1" bRatio="0.3100000" products="521 -211"/> 
+ <channel onMode="1" bRatio="0.1500000" products="511 111"/> 
+ <channel onMode="1" bRatio="0.0500000" products="523 -211 111"/> 
+ <channel onMode="1" bRatio="0.0300000" products="513 211 -211"/> 
+</particle> 
+-->
+ 
+<particle id="521" name="B+" antiName="B-" spinType="1" chargeType="3" colType="0" 
+          m0="5.27925" tau0="4.91100e-01"> 
+ <channel onMode="1" bRatio="0.0000930" products="16 -15"/> 
+ <channel onMode="1" bRatio="0.0000720" meMode="22" products="12 -11 111"/> 
+ <channel onMode="1" bRatio="0.0001450" meMode="22" products="12 -11 113"/> 
+ <channel onMode="1" bRatio="0.0000840" meMode="22" products="12 -11 221"/> 
+ <channel onMode="1" bRatio="0.0001450" meMode="22" products="12 -11 223"/> 
+ <channel onMode="1" bRatio="0.0000840" meMode="22" products="12 -11 331"/> 
+ <channel onMode="1" bRatio="0.0224000" meMode="22" products="12 -11 -421"/> 
+ <channel onMode="1" bRatio="0.0617000" meMode="22" products="12 -11 -423"/> 
+ <channel onMode="1" bRatio="0.0030000" meMode="22" products="12 -11 -425"/> 
+ <channel onMode="1" bRatio="0.0049000" meMode="22" products="12 -11 -10421"/> 
+ <channel onMode="1" bRatio="0.0056000" meMode="22" products="12 -11 -10423"/> 
+ <channel onMode="1" bRatio="0.0090000" meMode="22" products="12 -11 -20423"/> 
+ <channel onMode="1" bRatio="0.0000720" meMode="22" products="14 -13 111"/> 
+ <channel onMode="1" bRatio="0.0001450" meMode="22" products="14 -13 113"/> 
+ <channel onMode="1" bRatio="0.0000840" meMode="22" products="14 -13 221"/> 
+ <channel onMode="1" bRatio="0.0001450" meMode="22" products="14 -13 223"/> 
+ <channel onMode="1" bRatio="0.0000840" meMode="22" products="14 -13 331"/> 
+ <channel onMode="1" bRatio="0.0224000" meMode="22" products="14 -13 -421"/> 
+ <channel onMode="1" bRatio="0.0617000" meMode="22" products="14 -13 -423"/> 
+ <channel onMode="1" bRatio="0.0030000" meMode="22" products="14 -13 -425"/> 
+ <channel onMode="1" bRatio="0.0049000" meMode="22" products="14 -13 -10421"/> 
+ <channel onMode="1" bRatio="0.0056000" meMode="22" products="14 -13 -10423"/> 
+ <channel onMode="1" bRatio="0.0090000" meMode="22" products="14 -13 -20423"/> 
+ <channel onMode="1" bRatio="0.0000300" meMode="22" products="16 -15 111"/> 
+ <channel onMode="1" bRatio="0.0000420" meMode="22" products="16 -15 113"/> 
+ <channel onMode="1" bRatio="0.0000120" meMode="22" products="16 -15 221"/> 
+ <channel onMode="1" bRatio="0.0000420" meMode="22" products="16 -15 223"/> 
+ <channel onMode="1" bRatio="0.0000200" meMode="22" products="16 -15 225"/> 
+ <channel onMode="1" bRatio="0.0000180" meMode="22" products="16 -15 331"/> 
+ <channel onMode="1" bRatio="0.0000200" meMode="22" products="16 -15 335"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="22" products="16 -15 -421"/> 
+ <channel onMode="1" bRatio="0.0160000" meMode="22" products="16 -15 -423"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="16 -15 -425"/> 
+ <channel onMode="1" bRatio="0.0000270" meMode="22" products="16 -15 10113"/> 
+ <channel onMode="1" bRatio="0.0000020" meMode="22" products="16 -15 10221"/> 
+ <channel onMode="1" bRatio="0.0000130" meMode="22" products="16 -15 10223"/> 
+ <channel onMode="1" bRatio="0.0000130" meMode="22" products="16 -15 10333"/> 
+ <channel onMode="1" bRatio="0.0013000" meMode="22" products="16 -15 -10421"/> 
+ <channel onMode="1" bRatio="0.0013000" meMode="22" products="16 -15 -10423"/> 
+ <channel onMode="1" bRatio="0.0000460" meMode="22" products="16 -15 20113"/> 
+ <channel onMode="1" bRatio="0.0000230" meMode="22" products="16 -15 20223"/> 
+ <channel onMode="1" bRatio="0.0000230" meMode="22" products="16 -15 20333"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="16 -15 -20423"/> 
+ <channel onMode="1" bRatio="0.0000040" meMode="22" products="16 -15 9000111"/> 
+ <channel onMode="1" bRatio="0.0000020" meMode="22" products="16 -15 9010221"/> 
+ <channel onMode="1" bRatio="0.0019000" meMode="22" products="12 -11 -411 211"/> 
+ <channel onMode="1" bRatio="0.0006000" meMode="22" products="12 -11 -413 211"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="12 -11 -421 111"/> 
+ <channel onMode="1" bRatio="0.0003000" meMode="22" products="12 -11 -423 111"/> 
+ <channel onMode="1" bRatio="0.0019000" meMode="22" products="14 -13 -411 211"/> 
+ <channel onMode="1" bRatio="0.0006000" meMode="22" products="14 -13 -413 211"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="14 -13 -421 111"/> 
+ <channel onMode="1" bRatio="0.0003000" meMode="22" products="14 -13 -423 111"/> 
+ <channel onMode="1" bRatio="0.0000055" products="211 111"/> 
+ <channel onMode="1" bRatio="0.0000091" products="211 113"/> 
+ <channel onMode="1" bRatio="0.0000120" products="211 130"/> 
+ <channel onMode="1" bRatio="0.0000120" products="213 111"/> 
+ <channel onMode="1" bRatio="0.0000150" products="213 113"/> 
+ <channel onMode="1" bRatio="0.0000048" products="221 211"/> 
+ <channel onMode="1" bRatio="0.0000086" products="221 213"/> 
+ <channel onMode="1" bRatio="0.0000059" products="223 211"/> 
+ <channel onMode="1" bRatio="0.0000130" products="223 213"/> 
+ <channel onMode="1" bRatio="0.0000023" products="225 211"/> 
+ <channel onMode="1" bRatio="0.0000120" products="310 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 213"/> 
+ <channel onMode="1" bRatio="0.0000120" products="321 111"/> 
+ <channel onMode="1" bRatio="0.0000052" products="321 113"/> 
+ <channel onMode="1" bRatio="0.0000026" products="321 221"/> 
+ <channel onMode="1" bRatio="0.0000051" products="321 223"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311"/> 
+ <channel onMode="1" bRatio="0.0000403" products="323 22"/> 
+ <channel onMode="1" bRatio="0.0000020" products="323 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 113"/> 
+ <channel onMode="1" bRatio="0.0000240" products="323 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 223"/> 
+ <channel onMode="1" bRatio="0.0000030" products="323 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -313"/> 
+ <channel onMode="1" bRatio="0.0000042" products="331 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 213"/> 
+ <channel onMode="1" bRatio="0.0000780" products="331 321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 323"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 213"/> 
+ <channel onMode="1" bRatio="0.0000090" products="333 321"/> 
+ <channel onMode="1" bRatio="0.0000110" products="333 323"/> 
+ <channel onMode="1" bRatio="0.0000005" products="411 111"/> 
+ <channel onMode="1" bRatio="0.0000110" products="411 311"/> 
+ <channel onMode="1" bRatio="0.0000005" products="413 111"/> 
+ <channel onMode="1" bRatio="0.0000060" products="413 311"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-421 211"/> 
+ <channel onMode="1" bRatio="0.0134000" products="-421 213"/> 
+ <channel onMode="1" bRatio="0.0004100" products="-421 321"/> 
+ <channel onMode="1" bRatio="0.0006100" products="-421 323"/> 
+ <channel onMode="1" bRatio="0.0002700" products="-421 411"/> 
+ <channel onMode="1" bRatio="0.0003350" products="-421 413"/> 
+ <channel onMode="1" bRatio="0.0046000" products="-423 211"/> 
+ <channel onMode="1" bRatio="0.0098000" products="-423 213"/> 
+ <channel onMode="1" bRatio="0.0003600" products="-423 321"/> 
+ <channel onMode="1" bRatio="0.0007700" products="-423 323"/> 
+ <channel onMode="1" bRatio="0.0003350" products="-423 411"/> 
+ <channel onMode="1" bRatio="0.0010400" products="-423 413"/> 
+ <channel onMode="1" bRatio="0.0008000" products="-425 211"/> 
+ <channel onMode="1" bRatio="0.0038000" products="-425 213"/> 
+ <channel onMode="1" bRatio="0.0000200" products="431 111"/> 
+ <channel onMode="1" bRatio="0.0000280" products="431 113"/> 
+ <channel onMode="1" bRatio="0.0129000" products="431 -421"/> 
+ <channel onMode="1" bRatio="0.0124000" products="431 -423"/> 
+ <channel onMode="1" bRatio="0.0042000" products="431 -425"/> 
+ <channel onMode="1" bRatio="0.0000200" products="433 111"/> 
+ <channel onMode="1" bRatio="0.0000280" products="433 113"/> 
+ <channel onMode="1" bRatio="0.0111000" products="433 -421"/> 
+ <channel onMode="1" bRatio="0.0278000" products="433 -423"/> 
+ <channel onMode="1" bRatio="0.0040000" products="433 -425"/> 
+ <channel onMode="1" bRatio="0.0009000" products="441 321"/> 
+ <channel onMode="1" bRatio="0.0012000" products="441 323"/> 
+ <channel onMode="1" bRatio="0.0000400" products="443 211"/> 
+ <channel onMode="1" bRatio="0.0000600" products="443 213"/> 
+ <channel onMode="1" bRatio="0.0010600" products="443 321"/> 
+ <channel onMode="1" bRatio="0.0014300" products="443 323"/> 
+ <channel onMode="1" bRatio="0.0005000" products="443 325"/> 
+ <channel onMode="1" bRatio="0.0000200" products="445 321"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10113 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10113 321"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10213 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10213 311"/> 
+ <channel onMode="1" bRatio="0.0000700" products="10311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-10311 321"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 333"/> 
+ <channel onMode="1" bRatio="0.0018000" products="10323 443"/> 
+ <channel onMode="1" bRatio="0.0009100" products="-10421 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-10423 211"/> 
+ <channel onMode="1" bRatio="0.0007000" products="-10423 213"/> 
+ <channel onMode="1" bRatio="0.0012000" products="-10423 431"/> 
+ <channel onMode="1" bRatio="0.0024000" products="-10423 433"/> 
+ <channel onMode="1" bRatio="0.0016000" products="10431 -421"/> 
+ <channel onMode="1" bRatio="0.0016000" products="10431 -423"/> 
+ <channel onMode="1" bRatio="0.0003000" products="10441 321"/> 
+ <channel onMode="1" bRatio="0.0004000" products="10441 323"/> 
+ <channel onMode="1" bRatio="0.0000400" products="20113 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 321"/> 
+ <channel onMode="1" bRatio="0.0000200" products="20113 323"/> 
+ <channel onMode="1" bRatio="0.0000400" products="20213 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 223"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 311"/> 
+ <channel onMode="1" bRatio="0.0000200" products="20213 313"/> 
+ <channel onMode="1" bRatio="0.0088700" products="20213 -421"/> 
+ <channel onMode="1" bRatio="0.0159700" products="20213 -423"/> 
+ <channel onMode="1" bRatio="0.0000500" products="20213 20113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20323 333"/> 
+ <channel onMode="1" bRatio="0.0001000" products="20323 443"/> 
+ <channel onMode="1" bRatio="0.0007500" products="-20423 211"/> 
+ <channel onMode="1" bRatio="0.0022000" products="-20423 213"/> 
+ <channel onMode="1" bRatio="0.0006000" products="-20423 431"/> 
+ <channel onMode="1" bRatio="0.0012000" products="-20423 433"/> 
+ <channel onMode="1" bRatio="0.0041000" products="20433 -421"/> 
+ <channel onMode="1" bRatio="0.0098000" products="20433 -423"/> 
+ <channel onMode="1" bRatio="0.0005700" products="20443 321"/> 
+ <channel onMode="1" bRatio="0.0002900" products="20443 323"/> 
+ <channel onMode="1" bRatio="0.0004800" products="30443 321"/> 
+ <channel onMode="1" bRatio="0.0005000" products="30443 323"/> 
+ <channel onMode="1" bRatio="0.0003000" products="30443 10323"/> 
+ <channel onMode="1" bRatio="0.0000022" products="100113 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="100113 321"/> 
+ <channel onMode="1" bRatio="0.0003600" products="100441 321"/> 
+ <channel onMode="1" bRatio="0.0004800" products="100441 323"/> 
+ <channel onMode="1" bRatio="0.0006300" products="100443 321"/> 
+ <channel onMode="1" bRatio="0.0006000" products="100443 323"/> 
+ <channel onMode="1" bRatio="0.0004000" products="100443 10323"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000111 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 321"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000111 323"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9000211 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000211 311"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000211 313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 213"/> 
+ <channel onMode="1" bRatio="0.0000085" products="9010221 321"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 323"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 20213"/> 
+ <channel onMode="1" bRatio="0.0000260" products="211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="211 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="211 113 113"/> 
+ <channel onMode="1" bRatio="0.0000160" products="211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="213 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="213 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="213 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="213 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-213 211 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 211 113"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 213 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 221 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="221 221 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="223 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="223 211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="223 213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="223 221 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="223 221 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 213 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 221 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 221 213"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 223 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="313 221 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="313 221 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 223 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 311 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 -313 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-313 311 211"/> 
+ <channel onMode="1" bRatio="0.0000006" meMode="11" products="321 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000006" meMode="11" products="321 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000001" meMode="11" products="321 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 113 111"/> 
+ <channel onMode="1" bRatio="0.0000049" products="321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 221 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 221 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 221 221"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 223 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 223 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 223"/> 
+ <channel onMode="1" bRatio="0.0000480" products="321 311 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 313 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -313 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 -313 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -313 311"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000260" products="321 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 213"/> 
+ <channel onMode="1" bRatio="0.0000001" products="-321 211 211"/> 
+ <channel onMode="1" bRatio="0.0000018" meMode="11" products="323 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000014" meMode="11" products="323 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000002" meMode="11" products="323 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="323 221 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="323 221 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="323 221 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 223 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="323 223 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 311 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="323 311 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 311 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -313 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="323 -313 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -321 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 321 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-323 321 321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 211 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 213 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 213 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 221 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 223 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 223 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 311 213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 313 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 223"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 311"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 -313"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 323 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 323 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 323 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 323 223"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 323 311"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 323 -313"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 331 321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 211 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 213 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="333 221 211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="333 221 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 223 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 311 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 321 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 321 113"/> 
+ <channel onMode="1" bRatio="0.0000050" products="333 321 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 321 223"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 323 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="333 331 211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="333 331 213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="333 331 321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 333 211"/> 
+ <channel onMode="1" bRatio="0.0000030" products="333 333 321"/> 
+ <channel onMode="1" bRatio="0.0000030" products="333 333 323"/> 
+ <channel onMode="1" bRatio="0.0005000" products="411 -411 321"/> 
+ <channel onMode="1" bRatio="0.0005000" products="411 -411 323"/> 
+ <channel onMode="1" bRatio="0.0010200" products="-411 211 211"/> 
+ <channel onMode="1" bRatio="0.0020000" products="-411 213 211"/> 
+ <channel onMode="1" bRatio="0.0005000" products="413 -411 321"/> 
+ <channel onMode="1" bRatio="0.0005000" products="413 -411 323"/> 
+ <channel onMode="1" bRatio="0.0015000" products="413 -413 321"/> 
+ <channel onMode="1" bRatio="0.0010000" products="413 -413 323"/> 
+ <channel onMode="1" bRatio="0.0012500" products="-413 211 211"/> 
+ <channel onMode="1" bRatio="0.0020000" products="-413 213 211"/> 
+ <channel onMode="1" bRatio="0.0015000" products="-413 411 321"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-413 411 323"/> 
+ <channel onMode="1" bRatio="0.0015000" products="421 -421 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="421 -421 323"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-421 211 111"/> 
+ <channel onMode="1" bRatio="0.0021000" products="-421 211 113"/> 
+ <channel onMode="1" bRatio="0.0017000" products="-421 411 311"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-421 411 313"/> 
+ <channel onMode="1" bRatio="0.0049000" products="-421 413 311"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-421 413 313"/> 
+ <channel onMode="1" bRatio="0.0047000" products="423 -421 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="423 -421 323"/> 
+ <channel onMode="1" bRatio="0.0070000" products="423 -423 321"/> 
+ <channel onMode="1" bRatio="0.0050000" products="423 -423 323"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-423 211 111"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-423 211 113"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-423 213 111"/> 
+ <channel onMode="1" bRatio="0.0031000" products="-423 411 311"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-423 411 313"/> 
+ <channel onMode="1" bRatio="0.0100000" products="-423 413 311"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-423 413 313"/> 
+ <channel onMode="1" bRatio="0.0018000" products="-423 421 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-423 421 323"/> 
+ <channel onMode="1" bRatio="0.0036000" products="431 -411 211"/> 
+ <channel onMode="1" bRatio="0.0018000" products="431 -421 111"/> 
+ <channel onMode="1" bRatio="0.0037000" products="433 -411 211"/> 
+ <channel onMode="1" bRatio="0.0018000" products="433 -421 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="441 311 211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 321 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="443 311 211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="443 321 111"/> 
+ <channel onMode="1" bRatio="0.0000900" products="443 333 321"/> 
+ <channel onMode="1" bRatio="0.0002000" products="445 311 211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="445 321 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 221 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 321 311"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10311 331 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 333 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10311 321 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10321 221 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 331 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 333 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10321 333 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 333 331"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10321 321 321"/> 
+ <channel onMode="1" bRatio="0.0002000" products="10441 311 211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="10441 321 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="20113 221 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20113 321 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20113 331 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="20213 221 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20213 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20213 331 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-20213 211 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 333 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20323 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20323 333 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20323 333 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20323 333 331"/> 
+ <channel onMode="1" bRatio="0.0004000" products="20443 311 211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="20443 321 111"/> 
+ <channel onMode="1" bRatio="0.0003000" products="30443 311 211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="30443 321 111"/> 
+ <channel onMode="1" bRatio="0.0000800" products="100441 311 211"/> 
+ <channel onMode="1" bRatio="0.0000500" products="100441 321 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="100443 311 211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100443 321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000111 213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000111 221 213"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000111 323 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9000111 331 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000211 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9000211 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000211 221 113"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9000211 313 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9000211 331 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-9000211 211 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 211 113"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 213 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9010221 221 213"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 223 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 313 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 323 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="9010221 323 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9010221 331 213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9010221 331 323"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 333 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 333 321"/> 
+ <channel onMode="1" bRatio="0.0000100" products="211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="211 113 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="211 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="211 211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="213 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="213 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-213 211 211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 211 113 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="221 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 213 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 213 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 -213 211 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="221 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 221 213 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="223 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 211 113 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 213 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 213 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 -213 211 211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="311 221 213 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 221 221 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 223 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 211 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 213 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="311 311 221 211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="311 311 221 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 311 223 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="313 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="313 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="313 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-313 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 113 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -213 211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 221 113 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 221 221 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 223 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 223 221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 113 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 213 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 -213 211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 311 221 113"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 311 221 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 223 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 311 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 313 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -313 111 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 -313 221 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -313 311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 321 -321 113"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 321 -321 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 321 -321 223"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 321 -321 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 211 113"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 213 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 -321 221 211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="321 -321 221 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 223 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 311 213"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-321 311 213 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-321 313 211 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="323 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="323 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="323 221 221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000005" products="323 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="323 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="323 -321 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 311 211 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-323 321 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-323 321 321 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 211 113 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 213 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 213 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 -213 211 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 223 211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 311 213 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 311 311 213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 313 211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 113 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 221 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 223 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 311 113"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 321 311 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 311 311"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 -313 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 -321 211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 321 -321 213"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 323 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 323 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 323 221 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="331 323 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000005" products="333 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="333 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="333 321 221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 311 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 323 311 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 323 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000002" products="333 331 211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="333 331 321 111"/> 
+ <channel onMode="1" bRatio="0.0020000" products="-411 211 211 111"/> 
+ <channel onMode="1" bRatio="0.0150000" products="-413 211 211 111"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-421 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-423 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0005000" products="-423 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0033000" products="431 -411 211 111"/> 
+ <channel onMode="1" bRatio="0.0008000" products="431 -421 111 111"/> 
+ <channel onMode="1" bRatio="0.0033000" products="431 -421 211 -211"/> 
+ <channel onMode="1" bRatio="0.0033000" products="433 -411 211 111"/> 
+ <channel onMode="1" bRatio="0.0008000" products="433 -421 111 111"/> 
+ <channel onMode="1" bRatio="0.0033000" products="433 -421 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="441 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="445 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="445 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="445 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10311 321 311 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10311 321 -321 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10311 331 211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10311 331 321 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10311 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10311 321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="-10311 321 311 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10311 321 321 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-10311 331 321 311"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10321 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="10321 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="10321 321 -321 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 331 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="10321 331 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-10321 321 321 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="-10321 321 321 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-10321 331 321 321"/> 
+ <channel onMode="1" bRatio="0.0001000" products="10441 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="10441 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="10441 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="20313 321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="20313 321 311 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 321 -321 211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20313 331 321 311"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-20313 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="-20313 321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="-20313 321 311 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-20313 331 321 311"/> 
+ <channel onMode="1" bRatio="0.0000040" products="20323 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20323 311 311 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20323 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20323 321 -321 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="20323 331 311 311"/> 
+ <channel onMode="1" bRatio="0.0000010" products="20323 331 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-20323 321 321 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="20443 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="20443 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="20443 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="30443 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="30443 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="30443 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000500" products="100441 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000500" products="100441 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000800" products="100441 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="100443 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="100443 321 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100443 321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000111 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9000211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="-9000211 211 211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9010221 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="9010221 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="9010221 321 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000010" products="9010221 331 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="211 111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="211 211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="221 211 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="311 211 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 221 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 221 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="311 221 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="311 311 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="311 311 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="311 311 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="311 311 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="321 211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 221 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 221 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 221 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 311 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 311 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 311 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 311 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 311 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 311 311 221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 311 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 321 -321 111 111"/> 
+ <channel onMode="1" bRatio="0.0000050" products="321 321 -321 221 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 321 -321 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 321 -321 -321 211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 -321 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0000002" products="321 -321 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="321 -321 221 211 111"/> 
+ <channel onMode="1" bRatio="0.0000100" products="321 -321 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="321 -321 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000002" products="-321 311 211 211 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="-321 311 221 211 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 211 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 211 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 311 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 311 311 211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 111 111 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="331 321 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 321 311 111 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 321 311 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000020" products="331 321 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 321 -321 211 111"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 -321 311 211 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 311 311 311 211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 321 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="55" products="-3 2"/> 
+ <channel onMode="1" bRatio="0.0330000" meMode="63" products="-4103 2203"/> 
+ <channel onMode="1" bRatio="0.0090000" meMode="63" products="-4303 2203"/> 
+ <channel onMode="1" bRatio="0.0000700" meMode="23" products="1 -1 -1 2"/> 
+ <channel onMode="1" bRatio="0.0018000" meMode="23" products="1 -1 -3 2"/> 
+ <channel onMode="1" bRatio="0.0030000" meMode="23" products="2 -1 -2 2"/> 
+ <channel onMode="1" bRatio="0.0020500" meMode="23" products="2 -2 -1 2"/> 
+ <channel onMode="1" bRatio="0.0022000" meMode="23" products="2 -2 -3 2"/> 
+ <channel onMode="1" bRatio="0.0225000" meMode="43" products="2 -3 -4 2"/> 
+ <channel onMode="1" bRatio="0.0000900" meMode="23" products="3 -3 -1 2"/> 
+ <channel onMode="1" bRatio="0.0015000" meMode="23" products="3 -3 -3 2"/> 
+ <channel onMode="1" bRatio="0.0040000" meMode="43" products="4 -1 -4 2"/> 
+ <channel onMode="1" bRatio="0.0040000" meMode="23" products="4 -3 -2 2"/> 
+ <channel onMode="1" bRatio="0.0740000" meMode="43" products="4 -3 -4 2"/> 
+ <channel onMode="2" bRatio="0.0019480" meMode="22" products="12 -11 2 -2"/> 
+ <channel onMode="2" bRatio="0.0019480" meMode="22" products="14 -13 2 -2"/> 
+ <channel onMode="2" bRatio="0.0000200" products="445 323"/> 
+ <channel onMode="2" bRatio="0.0000010" products="333 321 313 311"/> 
+ <channel onMode="2" bRatio="0.0000020" products="-20313 321 321 -211"/> 
+ <channel onMode="2" bRatio="0.0003118" meMode="31" products="2 -3 22"/> 
+ <channel onMode="2" bRatio="0.2682660" meMode="23" products="2 -1 -4 2"/> 
+ <channel onMode="2" bRatio="0.0000050" meMode="12" products="2 -3 11 -11"/> 
+ <channel onMode="2" bRatio="0.0000025" meMode="12" products="2 -3 13 -13"/> 
+ <channel onMode="2" bRatio="0.0000002" meMode="12" products="2 -3 15 -15"/> 
+ <channel onMode="3" bRatio="0.0019480" meMode="22" products="12 -11 -2 2"/> 
+ <channel onMode="3" bRatio="0.0019480" meMode="22" products="14 -13 -2 2"/> 
+ <channel onMode="3" bRatio="0.0000400" products="445 323"/> 
+ <channel onMode="3" bRatio="0.0000010" products="333 321 -313 311"/> 
+ <channel onMode="3" bRatio="0.0000020" products="20313 321 321 -211"/> 
+ <channel onMode="3" bRatio="0.0003118" meMode="31" products="-3 2 22"/> 
+ <channel onMode="3" bRatio="0.2683360" meMode="23" products="2 -1 -4 2"/> 
+ <channel onMode="3" bRatio="0.0000050" meMode="12" products="-3 2 11 -11"/> 
+ <channel onMode="3" bRatio="0.0000025" meMode="12" products="-3 2 13 -13"/> 
+ <channel onMode="3" bRatio="0.0000002" meMode="12" products="-3 2 15 -15"/> 
+</particle> 
+ 
+<!--
+<particle id="523" name="B*+" antiName="B*-" spinType="3" chargeType="3" colType="0" 
+          m0="5.32520"> 
+ <channel onMode="1" bRatio="1.0000000" products="521 22"/> 
+</particle> 
+ 
+<particle id="525" name="B*_2+" antiName="B*_2-" spinType="5" chargeType="3" colType="0" 
+          m0="5.74300" mWidth="0.02300" mMin="5.63000" mMax="6.03000"> 
+ <channel onMode="1" bRatio="0.3100000" products="513 211"/> 
+ <channel onMode="1" bRatio="0.1500000" products="523 111"/> 
+ <channel onMode="1" bRatio="0.3100000" products="511 211"/> 
+ <channel onMode="1" bRatio="0.1500000" products="521 111"/> 
+ <channel onMode="1" bRatio="0.0500000" products="513 211 111"/> 
+ <channel onMode="1" bRatio="0.0300000" products="523 211 -211"/> 
+</particle> 
+-->
+ 
+<particle id="531" name="B_s0" antiName="B_sbar0" spinType="1" chargeType="0" colType="0" 
+          m0="5.36677" tau0="4.39000e-01"> 
+ <channel onMode="1" bRatio="0.0002000" meMode="22" products="12 -11 -321"/> 
+ <channel onMode="1" bRatio="0.0003000" meMode="22" products="12 -11 -323"/> 
+ <channel onMode="1" bRatio="0.0210000" meMode="22" products="12 -11 -431"/> 
+ <channel onMode="1" bRatio="0.0490000" meMode="22" products="12 -11 -433"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="22" products="12 -11 -435"/> 
+ <channel onMode="1" bRatio="0.0003000" meMode="22" products="12 -11 -10323"/> 
+ <channel onMode="1" bRatio="0.0040000" meMode="22" products="12 -11 -10431"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="22" products="12 -11 -10433"/> 
+ <channel onMode="1" bRatio="0.0002000" meMode="22" products="12 -11 -20323"/> 
+ <channel onMode="1" bRatio="0.0040000" meMode="22" products="12 -11 -20433"/> 
+ <channel onMode="1" bRatio="0.0002000" meMode="22" products="14 -13 -321"/> 
+ <channel onMode="1" bRatio="0.0003000" meMode="22" products="14 -13 -323"/> 
+ <channel onMode="1" bRatio="0.0210000" meMode="22" products="14 -13 -431"/> 
+ <channel onMode="1" bRatio="0.0490000" meMode="22" products="14 -13 -433"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="22" products="14 -13 -435"/> 
+ <channel onMode="1" bRatio="0.0003000" meMode="22" products="14 -13 -10323"/> 
+ <channel onMode="1" bRatio="0.0040000" meMode="22" products="14 -13 -10431"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="22" products="14 -13 -10433"/> 
+ <channel onMode="1" bRatio="0.0002000" meMode="22" products="14 -13 -20323"/> 
+ <channel onMode="1" bRatio="0.0040000" meMode="22" products="14 -13 -20433"/> 
+ <channel onMode="1" bRatio="0.0080000" meMode="22" products="16 -15 -431"/> 
+ <channel onMode="1" bRatio="0.0160000" meMode="22" products="16 -15 -433"/> 
+ <channel onMode="1" bRatio="0.0028000" meMode="22" products="16 -15 -435"/> 
+ <channel onMode="1" bRatio="0.0018000" meMode="22" products="16 -15 -10431"/> 
+ <channel onMode="1" bRatio="0.0028000" meMode="22" products="16 -15 -10433"/> 
+ <channel onMode="1" bRatio="0.0018000" meMode="22" products="16 -15 -20433"/> 
+ <channel onMode="1" bRatio="0.0000005" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0000100" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0000000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0000040" products="221 221"/> 
+ <channel onMode="1" bRatio="0.0000012" products="223 221"/> 
+ <channel onMode="1" bRatio="0.0000100" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0000002" products="311 111"/> 
+ <channel onMode="1" bRatio="0.0000000" products="311 113"/> 
+ <channel onMode="1" bRatio="0.0000002" products="311 221"/> 
+ <channel onMode="1" bRatio="0.0000001" products="311 223"/> 
+ <channel onMode="1" bRatio="0.0000020" products="313 130"/> 
+ <channel onMode="1" bRatio="0.0000020" products="313 310"/> 
+ <channel onMode="1" bRatio="0.0000040" products="313 -313"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-313 111"/> 
+ <channel onMode="1" bRatio="0.0000008" products="-313 113"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-313 130"/> 
+ <channel onMode="1" bRatio="0.0000001" products="-313 221"/> 
+ <channel onMode="1" bRatio="0.0000020" products="-313 310"/> 
+ <channel onMode="1" bRatio="0.0000185" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0000048" products="-321 211"/> 
+ <channel onMode="1" bRatio="0.0000120" products="-321 213"/> 
+ <channel onMode="1" bRatio="0.0000046" products="323 -321"/> 
+ <channel onMode="1" bRatio="0.0000060" products="323 -323"/> 
+ <channel onMode="1" bRatio="0.0000250" products="-323 211"/> 
+ <channel onMode="1" bRatio="0.0000200" products="-323 213"/> 
+ <channel onMode="1" bRatio="0.0000082" products="-323 321"/> 
+ <channel onMode="1" bRatio="0.0000250" products="331 221"/> 
+ <channel onMode="1" bRatio="0.0000025" products="331 223"/> 
+ <channel onMode="1" bRatio="0.0000001" products="331 311"/> 
+ <channel onMode="1" bRatio="0.0000000" products="331 -313"/> 
+ <channel onMode="1" bRatio="0.0000580" products="331 331"/> 
+ <channel onMode="1" bRatio="0.0000450" products="333 22"/> 
+ <channel onMode="1" bRatio="0.0000213" products="333 221"/> 
+ <channel onMode="1" bRatio="0.0000004" products="333 -313"/> 
+ <channel onMode="1" bRatio="0.0000125" products="333 331"/> 
+ <channel onMode="1" bRatio="0.0000080" products="333 333"/> 
+ <channel onMode="1" bRatio="0.0002000" products="-421 311"/> 
+ <channel onMode="1" bRatio="0.0002000" products="-421 -313"/> 
+ <channel onMode="1" bRatio="0.0002000" products="-423 311"/> 
+ <channel onMode="1" bRatio="0.0002000" products="-423 -313"/> 
+ <channel onMode="1" bRatio="0.0017000" products="431 -411"/> 
+ <channel onMode="1" bRatio="0.0017000" products="431 -413"/> 
+ <channel onMode="1" bRatio="0.0086000" products="431 -431"/> 
+ <channel onMode="1" bRatio="0.0026000" products="-431 211"/> 
+ <channel onMode="1" bRatio="0.0073000" products="-431 213"/> 
+ <channel onMode="1" bRatio="0.0001500" products="-431 321"/> 
+ <channel onMode="1" bRatio="0.0003000" products="-431 323"/> 
+ <channel onMode="1" bRatio="0.0017000" products="433 -411"/> 
+ <channel onMode="1" bRatio="0.0017000" products="433 -413"/> 
+ <channel onMode="1" bRatio="0.0197000" products="433 -433"/> 
+ <channel onMode="1" bRatio="0.0027000" products="-433 211"/> 
+ <channel onMode="1" bRatio="0.0070000" products="-433 213"/> 
+ <channel onMode="1" bRatio="0.0001500" products="-433 321"/> 
+ <channel onMode="1" bRatio="0.0003000" products="-433 323"/> 
+ <channel onMode="1" bRatio="0.0013000" products="-435 211"/> 
+ <channel onMode="1" bRatio="0.0004000" products="441 221"/> 
+ <channel onMode="1" bRatio="0.0008000" products="441 331"/> 
+ <channel onMode="1" bRatio="0.0015000" products="441 333"/> 
+ <channel onMode="1" bRatio="0.0003200" products="443 221"/> 
+ <channel onMode="1" bRatio="0.0000800" products="443 311"/> 
+ <channel onMode="1" bRatio="0.0006400" products="443 331"/> 
+ <channel onMode="1" bRatio="0.0013500" products="443 333"/> 
+ <channel onMode="1" bRatio="0.0002350" products="445 221"/> 
+ <channel onMode="1" bRatio="0.0004650" products="445 331"/> 
+ <channel onMode="1" bRatio="0.0000500" products="10441 221"/> 
+ <channel onMode="1" bRatio="0.0001000" products="10441 331"/> 
+ <channel onMode="1" bRatio="0.0002000" products="10441 333"/> 
+ <channel onMode="1" bRatio="0.0002350" products="10443 221"/> 
+ <channel onMode="1" bRatio="0.0004650" products="10443 331"/> 
+ <channel onMode="1" bRatio="0.0010000" products="10443 333"/> 
+ <channel onMode="1" bRatio="0.0085000" products="20213 -431"/> 
+ <channel onMode="1" bRatio="0.0122000" products="20213 -433"/> 
+ <channel onMode="1" bRatio="0.0008000" products="-20433 211"/> 
+ <channel onMode="1" bRatio="0.0021000" products="-20433 213"/> 
+ <channel onMode="1" bRatio="0.0003000" products="20443 221"/> 
+ <channel onMode="1" bRatio="0.0007000" products="20443 331"/> 
+ <channel onMode="1" bRatio="0.0014000" products="20443 333"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100441 221"/> 
+ <channel onMode="1" bRatio="0.0004000" products="100441 331"/> 
+ <channel onMode="1" bRatio="0.0006000" products="100441 333"/> 
+ <channel onMode="1" bRatio="0.0002350" products="100443 221"/> 
+ <channel onMode="1" bRatio="0.0004650" products="100443 331"/> 
+ <channel onMode="1" bRatio="0.0012000" products="100443 333"/> 
+ <channel onMode="1" bRatio="0.0000023" meMode="11" products="333 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000023" meMode="11" products="333 13 -13"/> 
+ <channel onMode="1" bRatio="0.0007000" products="411 -411 311"/> 
+ <channel onMode="1" bRatio="0.0007000" products="413 -411 311"/> 
+ <channel onMode="1" bRatio="0.0007000" products="421 411 -321"/> 
+ <channel onMode="1" bRatio="0.0007000" products="-421 413 -321"/> 
+ <channel onMode="1" bRatio="0.0096000" products="431 -411 311"/> 
+ <channel onMode="1" bRatio="0.0096000" products="431 421 -321"/> 
+ <channel onMode="1" bRatio="0.0009000" products="-431 211 113"/> 
+ <channel onMode="1" bRatio="0.0009000" products="-431 213 111"/> 
+ <channel onMode="1" bRatio="0.0020000" products="-431 411 311"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-431 411 313"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-431 413 311"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-431 413 313"/> 
+ <channel onMode="1" bRatio="0.0020000" products="-431 421 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-431 421 323"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-431 423 321"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-431 423 323"/> 
+ <channel onMode="1" bRatio="0.0096000" products="433 -411 311"/> 
+ <channel onMode="1" bRatio="0.0096000" products="433 -421 -321"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-433 211 113"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-433 213 111"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-433 411 311"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-433 411 313"/> 
+ <channel onMode="1" bRatio="0.0150000" products="-433 413 311"/> 
+ <channel onMode="1" bRatio="0.0030000" products="-433 413 313"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-433 421 321"/> 
+ <channel onMode="1" bRatio="0.0050000" products="-433 421 323"/> 
+ <channel onMode="1" bRatio="0.0150000" products="-433 423 321"/> 
+ <channel onMode="1" bRatio="0.0030000" products="-433 423 323"/> 
+ <channel onMode="1" bRatio="0.0002800" products="441 311 311"/> 
+ <channel onMode="1" bRatio="0.0002800" products="441 321 -321"/> 
+ <channel onMode="1" bRatio="0.0002000" products="443 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="443 211 -211"/> 
+ <channel onMode="1" bRatio="0.0007000" products="443 311 311"/> 
+ <channel onMode="1" bRatio="0.0007000" products="443 321 -321"/> 
+ <channel onMode="1" bRatio="0.0001600" products="445 311 311"/> 
+ <channel onMode="1" bRatio="0.0001600" products="445 321 -321"/> 
+ <channel onMode="1" bRatio="0.0000300" products="10441 311 311"/> 
+ <channel onMode="1" bRatio="0.0000300" products="10441 321 -321"/> 
+ <channel onMode="1" bRatio="0.0001600" products="10443 311 311"/> 
+ <channel onMode="1" bRatio="0.0001600" products="10443 321 -321"/> 
+ <channel onMode="1" bRatio="0.0002600" products="20443 311 311"/> 
+ <channel onMode="1" bRatio="0.0002600" products="20443 321 -321"/> 
+ <channel onMode="1" bRatio="0.0001200" products="100441 311 311"/> 
+ <channel onMode="1" bRatio="0.0001200" products="100441 321 -321"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100443 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100443 211 -211"/> 
+ <channel onMode="1" bRatio="0.0003000" products="100443 311 311"/> 
+ <channel onMode="1" bRatio="0.0003000" products="100443 321 -321"/> 
+ <channel onMode="1" bRatio="0.0003000" products="411 -411 311 111"/> 
+ <channel onMode="1" bRatio="0.0003000" products="411 -411 -321 211"/> 
+ <channel onMode="1" bRatio="0.0003000" products="413 -411 311 111"/> 
+ <channel onMode="1" bRatio="0.0003000" products="413 -411 -321 211"/> 
+ <channel onMode="1" bRatio="0.0007000" products="-421 411 311 -211"/> 
+ <channel onMode="1" bRatio="0.0007000" products="-421 411 -321 111"/> 
+ <channel onMode="1" bRatio="0.0007000" products="-421 413 311 -211"/> 
+ <channel onMode="1" bRatio="0.0007000" products="-421 413 -321 111"/> 
+ <channel onMode="1" bRatio="0.0024000" products="431 -411 311 111"/> 
+ <channel onMode="1" bRatio="0.0048000" products="431 -411 -321 211"/> 
+ <channel onMode="1" bRatio="0.0048000" products="431 -421 311 -211"/> 
+ <channel onMode="1" bRatio="0.0024000" products="431 -421 -321 111"/> 
+ <channel onMode="1" bRatio="0.0009000" products="-431 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0009000" products="-431 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0024000" products="433 -411 311 111"/> 
+ <channel onMode="1" bRatio="0.0048000" products="433 -411 -321 211"/> 
+ <channel onMode="1" bRatio="0.0048000" products="433 -421 311 -211"/> 
+ <channel onMode="1" bRatio="0.0024000" products="433 -421 -321 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-433 211 111 111"/> 
+ <channel onMode="1" bRatio="0.0077000" products="-433 211 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0002800" products="441 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0002800" products="441 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0002800" products="441 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="441 331 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="441 331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0004000" products="441 333 111 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="441 333 211 -211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="443 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="443 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0007000" products="443 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0007000" products="443 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0007000" products="443 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0004000" products="443 331 111 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="443 331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0003900" products="443 333 111 111"/> 
+ <channel onMode="1" bRatio="0.0003900" products="443 333 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001600" products="445 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0001600" products="445 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0001600" products="445 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0000300" products="10441 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0000300" products="10441 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0000300" products="10441 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0001600" products="10443 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0001600" products="10443 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0001600" products="10443 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0001000" products="20443 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0001000" products="20443 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0002600" products="20443 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0002600" products="20443 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0002600" products="20443 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="20443 331 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="20443 331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0004000" products="20443 333 111 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="20443 333 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001200" products="100441 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0001200" products="100441 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0001200" products="100441 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100443 221 111 111"/> 
+ <channel onMode="1" bRatio="0.0002000" products="100443 221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0003000" products="100443 311 311 111"/> 
+ <channel onMode="1" bRatio="0.0003000" products="100443 321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0003000" products="100443 -321 311 211"/> 
+ <channel onMode="1" bRatio="0.0004000" products="100443 331 111 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="100443 331 211 -211"/> 
+ <channel onMode="1" bRatio="0.0003400" products="100443 333 111 111"/> 
+ <channel onMode="1" bRatio="0.0003400" products="100443 333 211 -211"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="55" products="-3 3"/> 
+ <channel onMode="1" bRatio="0.0200000" meMode="63" products="-4301 2101"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="63" products="-4303 2103"/> 
+ <channel onMode="1" bRatio="0.0007000" meMode="23" products="1 -1 -1 3"/> 
+ <channel onMode="1" bRatio="0.0016000" meMode="23" products="1 -1 -3 3"/> 
+ <channel onMode="1" bRatio="0.3574344" meMode="23" products="2 -1 -4 3"/> 
+ <channel onMode="1" bRatio="0.0036000" meMode="23" products="2 -2 -1 3"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="23" products="2 -2 -3 3"/> 
+ <channel onMode="1" bRatio="0.0172000" meMode="23" products="2 -3 -4 3"/> 
+ <channel onMode="1" bRatio="0.0195000" meMode="23" products="2 -4 -1 3"/> 
+ <channel onMode="1" bRatio="0.0009000" meMode="23" products="2 -4 -3 3"/> 
+ <channel onMode="1" bRatio="0.0009000" meMode="23" products="3 -3 -1 3"/> 
+ <channel onMode="1" bRatio="0.0013000" meMode="23" products="3 -3 -3 3"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="43" products="4 -1 -4 3"/> 
+ <channel onMode="1" bRatio="0.0040000" meMode="23" products="4 -3 -2 3"/> 
+ <channel onMode="2" bRatio="0.0090000" products="433 -431"/> 
+ <channel onMode="2" bRatio="0.0099000" products="-433 431"/> 
+ <channel onMode="3" bRatio="0.0099000" products="433 -431"/> 
+ <channel onMode="3" bRatio="0.0090000" products="-433 431"/> 
+</particle> 
+ 
+<!--
+<particle id="533" name="B*_s0" antiName="B*_sbar0" spinType="3" chargeType="0" colType="0" 
+          m0="5.41540"> 
+ <channel onMode="1" bRatio="1.0000000" products="531 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="535" name="B*_2s0" antiName="B*_2sbar0" spinType="5" chargeType="0" colType="0" 
+          m0="5.83970" mWidth="0.02000" mMin="5.81970" mMax="5.85970"> 
+ <channel onMode="1" bRatio="0.1700000" products="513 311"/> 
+ <channel onMode="1" bRatio="0.1700000" products="523 -321"/> 
+ <channel onMode="1" bRatio="0.3300000" products="511 311"/> 
+ <channel onMode="1" bRatio="0.3300000" products="521 -321"/> 
+</particle> 
+-->
+ 
+<particle id="541" name="B_c+" antiName="B_c-" spinType="1" chargeType="3" colType="0" 
+          m0="6.27700" tau0="1.38000e-01"> 
+ <channel onMode="1" bRatio="0.0160000" products="16 -15"/> 
+ <channel onMode="1" bRatio="0.0034000" meMode="22" products="-11 12 511"/> 
+ <channel onMode="1" bRatio="0.0058000" meMode="22" products="-11 12 513"/> 
+ <channel onMode="1" bRatio="0.0403000" meMode="22" products="-11 12 531"/> 
+ <channel onMode="1" bRatio="0.0506000" meMode="22" products="-11 12 533"/> 
+ <channel onMode="1" bRatio="0.0000400" meMode="22" products="12 -11 421"/> 
+ <channel onMode="1" bRatio="0.0001800" meMode="22" products="12 -11 423"/> 
+ <channel onMode="1" bRatio="0.0075000" meMode="22" products="12 -11 441"/> 
+ <channel onMode="1" bRatio="0.0190000" meMode="22" products="12 -11 443"/> 
+ <channel onMode="1" bRatio="0.0002000" meMode="22" products="12 -11 100441"/> 
+ <channel onMode="1" bRatio="0.0009400" meMode="22" products="12 -11 100443"/> 
+ <channel onMode="1" bRatio="0.0034000" meMode="22" products="-13 14 511"/> 
+ <channel onMode="1" bRatio="0.0058000" meMode="22" products="-13 14 513"/> 
+ <channel onMode="1" bRatio="0.0403000" meMode="22" products="-13 14 531"/> 
+ <channel onMode="1" bRatio="0.0506000" meMode="22" products="-13 14 533"/> 
+ <channel onMode="1" bRatio="0.0000400" meMode="22" products="14 -13 421"/> 
+ <channel onMode="1" bRatio="0.0001800" meMode="22" products="14 -13 423"/> 
+ <channel onMode="1" bRatio="0.0075000" meMode="22" products="14 -13 441"/> 
+ <channel onMode="1" bRatio="0.0190000" meMode="22" products="14 -13 443"/> 
+ <channel onMode="1" bRatio="0.0002000" meMode="22" products="14 -13 100441"/> 
+ <channel onMode="1" bRatio="0.0009400" meMode="22" products="14 -13 100443"/> 
+ <channel onMode="1" bRatio="0.0000200" meMode="22" products="16 -15 421"/> 
+ <channel onMode="1" bRatio="0.0000800" meMode="22" products="16 -15 423"/> 
+ <channel onMode="1" bRatio="0.0023000" meMode="22" products="16 -15 441"/> 
+ <channel onMode="1" bRatio="0.0048000" meMode="22" products="16 -15 443"/> 
+ <channel onMode="1" bRatio="0.0000160" meMode="22" products="16 -15 100441"/> 
+ <channel onMode="1" bRatio="0.0000800" meMode="22" products="16 -15 100443"/> 
+ <channel onMode="1" bRatio="0.0000200" products="211 113"/> 
+ <channel onMode="1" bRatio="0.0000003" products="421 411"/> 
+ <channel onMode="1" bRatio="0.0000004" products="421 413"/> 
+ <channel onMode="1" bRatio="0.0000530" products="-421 411"/> 
+ <channel onMode="1" bRatio="0.0000490" products="-421 413"/> 
+ <channel onMode="1" bRatio="0.0000003" products="423 411"/> 
+ <channel onMode="1" bRatio="0.0000016" products="423 413"/> 
+ <channel onMode="1" bRatio="0.0000750" products="-423 411"/> 
+ <channel onMode="1" bRatio="0.0003300" products="-423 413"/> 
+ <channel onMode="1" bRatio="0.0000066" products="431 421"/> 
+ <channel onMode="1" bRatio="0.0000048" products="431 -421"/> 
+ <channel onMode="1" bRatio="0.0000063" products="431 423"/> 
+ <channel onMode="1" bRatio="0.0000071" products="431 -423"/> 
+ <channel onMode="1" bRatio="0.0000085" products="433 421"/> 
+ <channel onMode="1" bRatio="0.0000045" products="433 -421"/> 
+ <channel onMode="1" bRatio="0.0000404" products="433 423"/> 
+ <channel onMode="1" bRatio="0.0000260" products="433 -423"/> 
+ <channel onMode="1" bRatio="0.0020000" products="441 211"/> 
+ <channel onMode="1" bRatio="0.0042000" products="441 213"/> 
+ <channel onMode="1" bRatio="0.0001300" products="441 321"/> 
+ <channel onMode="1" bRatio="0.0002000" products="441 323"/> 
+ <channel onMode="1" bRatio="0.0001500" products="441 411"/> 
+ <channel onMode="1" bRatio="0.0001000" products="441 413"/> 
+ <channel onMode="1" bRatio="0.0028000" products="441 431"/> 
+ <channel onMode="1" bRatio="0.0027000" products="441 433"/> 
+ <channel onMode="1" bRatio="0.0013000" products="443 211"/> 
+ <channel onMode="1" bRatio="0.0040000" products="443 213"/> 
+ <channel onMode="1" bRatio="0.0001100" products="443 321"/> 
+ <channel onMode="1" bRatio="0.0002200" products="443 323"/> 
+ <channel onMode="1" bRatio="0.0000900" products="443 411"/> 
+ <channel onMode="1" bRatio="0.0002800" products="443 413"/> 
+ <channel onMode="1" bRatio="0.0017000" products="443 431"/> 
+ <channel onMode="1" bRatio="0.0067000" products="443 433"/> 
+ <channel onMode="1" bRatio="0.0106000" products="511 211"/> 
+ <channel onMode="1" bRatio="0.0096000" products="511 213"/> 
+ <channel onMode="1" bRatio="0.0007000" products="511 321"/> 
+ <channel onMode="1" bRatio="0.0001500" products="511 323"/> 
+ <channel onMode="1" bRatio="0.0095000" products="513 211"/> 
+ <channel onMode="1" bRatio="0.0257000" products="513 213"/> 
+ <channel onMode="1" bRatio="0.0005500" products="513 321"/> 
+ <channel onMode="1" bRatio="0.0005800" products="513 323"/> 
+ <channel onMode="1" bRatio="0.0003700" products="521 111"/> 
+ <channel onMode="1" bRatio="0.0003400" products="521 113"/> 
+ <channel onMode="1" bRatio="0.0198000" products="521 311"/> 
+ <channel onMode="1" bRatio="0.0003300" products="523 111"/> 
+ <channel onMode="1" bRatio="0.0009000" products="523 113"/> 
+ <channel onMode="1" bRatio="0.0160000" products="523 311"/> 
+ <channel onMode="1" bRatio="0.1640000" products="531 211"/> 
+ <channel onMode="1" bRatio="0.0720000" products="531 213"/> 
+ <channel onMode="1" bRatio="0.0106000" products="531 321"/> 
+ <channel onMode="1" bRatio="0.0650000" products="533 211"/> 
+ <channel onMode="1" bRatio="0.2020000" products="533 213"/> 
+ <channel onMode="1" bRatio="0.0037000" products="533 321"/> 
+ <channel onMode="1" bRatio="0.0600502" meMode="42" products="4 -3"/> 
+ <channel onMode="2" bRatio="0.0043000" products="521 313"/> 
+ <channel onMode="2" bRatio="0.0167000" products="523 313"/> 
+ <channel onMode="3" bRatio="0.0043000" products="521 -313"/> 
+ <channel onMode="3" bRatio="0.0167000" products="523 -313"/> 
+</particle> 
+ 
+<!--
+<particle id="543" name="B*_c+" antiName="B*_c-" spinType="3" chargeType="3" colType="0" 
+          m0="6.34000"> 
+ <channel onMode="1" bRatio="1.0000000" products="541 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="545" name="B*_2c+" antiName="B*_2c-" spinType="5" chargeType="3" colType="0" 
+          m0="7.35000" mWidth="0.02000" mMin="7.20000" mMax="7.50000"> 
+ <channel onMode="1" bRatio="0.3000000" products="511 411"/> 
+ <channel onMode="1" bRatio="0.3000000" products="521 421"/> 
+ <channel onMode="1" bRatio="0.2000000" products="513 411"/> 
+ <channel onMode="1" bRatio="0.2000000" products="523 421"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="551" name="eta_b" spinType="1" chargeType="0" colType="0" 
+          m0="9.40000" mWidth="0.010" mMin="9.30000" mMax="9.50000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="91" products="21 21"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="553" name="Upsilon" spinType="3" chargeType="0" colType="0" 
+          m0="9.46030" mWidth="0.00005" mMin="9.45980" mMax="9.46080"> 
+ <channel onMode="1" bRatio="0.7757000" meMode="92" products="21 21 21"/> 
+ <channel onMode="1" bRatio="0.0290000" meMode="92" products="22 21 21"/> 
+ <channel onMode="1" bRatio="0.0238000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0248000" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0267000" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="91" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0450000" meMode="91" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="91" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0450000" meMode="91" products="4 -4"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="555" name="chi_2b" spinType="5" chargeType="0" colType="0" 
+          m0="9.91220"> 
+ <channel onMode="1" bRatio="0.2200000" products="553 22"/> 
+ <channel onMode="1" bRatio="0.7800000" meMode="91" products="21 21"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="990990" name="Pomeron" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="1103" name="dd_1" antiName="dd_1bar" spinType="3" chargeType="-2" colType="-1" 
+          m0="0.77133"> 
+</particle> 
+-->
+
+<particle id="1114" name="Delta-" antiName="Deltabar+" spinType="4" chargeType="-3" colType="0" 
+          m0="1.23200" mWidth="0.11700" mMin="1.08000" mMax="1.60000"> 
+ <channel onMode="1" bRatio="1.0000000" products="2112 -211"/> 
+</particle> 
+
+<!-- 
+<particle id="2101" name="ud_0" antiName="ud_0bar" spinType="1" chargeType="1" colType="-1" 
+          m0="0.57933"> 
+</particle> 
+ 
+<particle id="2103" name="ud_1" antiName="ud_1bar" spinType="3" chargeType="1" colType="-1" 
+          m0="0.77133"> 
+</particle> 
+-->
+ 
+<particle id="2112" name="n0" antiName="nbar0" spinType="2" chargeType="0" colType="0" 
+          m0="0.93957" tau0="2.65500e+14"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="22" products="-12 11 2212"/> 
+</particle> 
+ 
+<particle id="2114" name="Delta0" antiName="Deltabar0" spinType="4" chargeType="0" colType="0" 
+          m0="1.23200" mWidth="0.11700" mMin="1.08000" mMax="1.60000"> 
+ <channel onMode="1" bRatio="0.3314104" products="2212 -211"/> 
+ <channel onMode="1" bRatio="0.6630208" products="2112 111"/> 
+ <channel onMode="1" bRatio="0.0055688" products="2112 22"/> 
+</particle> 
+ 
+<!--
+<particle id="2203" name="uu_1" antiName="uu_1bar" spinType="3" chargeType="4" colType="-1" 
+          m0="0.77133"> 
+</particle> 
+-->
+ 
+<particle id="2212" name="p+" antiName="pbar-" spinType="2" chargeType="3" colType="0" 
+          m0="0.93827"> 
+</particle> 
+
+<particle id="202212" name="N(1440)+" antiName="N(1440)bar-" spinType="2" chargeType="3" colType="0" 
+          m0="1.440" mWidth="0.350" mMin="1.4100" mMax="1.4500">
+  <channel onMode="1" bRatio="0.466" products="2212 211"/>
+  <channel onMode="1" bRatio="0.2340" products="2112 111"/>
+  <channel onMode="1" bRatio="0.1990" products="2212 211 111"/>
+  <channel onMode="1" bRatio="0.1010" products="2112 211 -211"/>
+</particle> 
+
+<particle id="202112" name="N(1440)0" antiName="N(1440)bar0" spinType="2" chargeType="3" colType="0" 
+          m0="1.440" mWidth="0.350" mMin="1.4100" mMax="1.4500">
+    <channel onMode="1" bRatio="0.4660" products="2112 -211"/>
+    <channel onMode="1" bRatio="0.2340" products="2212 111"/>
+    <channel onMode="1" bRatio="0.1990" products="2112 111 -211"/>
+    <channel onMode="1" bRatio="0.1010" products="2212 211 -211"/>
+</particle> 
+
+<particle id="212212" name="N(1710)+" antiName="N(1710)bar-" spinType="2" chargeType="3" colType="0" 
+          m0="1.710" mWidth="0.100" mMin="1.6800" mMax="1.7400">
+      <channel onMode="1" bRatio="0.3334" products="2212 211 111"/>
+      <channel onMode="1" bRatio="0.1666" products="2112 211 -211"/>
+      <channel onMode="1" bRatio="0.1334" products="2212 211"/>
+      <channel onMode="1" bRatio="0.1300" products="2112 223"/>
+      <channel onMode="1" bRatio="0.1100" products="3122 321"/>
+      <channel onMode="1" bRatio="0.0660" products="2112 111"/>
+      <channel onMode="1" bRatio="0.0660" products="2112 221"/>
+</particle> 
+
+<particle id="212112" name="N(1710)0" antiName="N(1710)bar0" spinType="2" chargeType="3" colType="0" 
+          m0="1.710" mWidth="0.100" mMin="1.6800" mMax="1.7400">
+  <channel onMode="1" bRatio="0.3334" products="2112 -211 111"/>
+  <channel onMode="1" bRatio="0.1666" products="2212 211 -211"/>
+  <channel onMode="1" bRatio="0.1334" products="2112 -211"/>
+  <channel onMode="1" bRatio="0.1300" products="2212 223"/>
+  <channel onMode="1" bRatio="0.1100" products="3122 311"/>
+  <channel onMode="1" bRatio="0.0660" products="2212 111"/>
+  <channel onMode="1" bRatio="0.0660" products="2212 221"/>
+</particle> 
+
+<particle id="2214" name="Delta+" antiName="Deltabar-" spinType="4" chargeType="3" colType="0" 
+          m0="1.23200" mWidth="0.11700" mMin="1.08000" mMax="1.60000"> 
+ <channel onMode="1" bRatio="0.6630208" products="2212 111"/> 
+ <channel onMode="1" bRatio="0.3314104" products="2112 211"/> 
+ <channel onMode="1" bRatio="0.0055688" products="2212 22"/> 
+</particle> 
+ 
+<particle id="2224" name="Delta++" antiName="Deltabar--" spinType="4" chargeType="6" colType="0" 
+          m0="1.23200" mWidth="0.11700" mMin="1.08000" mMax="1.60000"> 
+ <channel onMode="1" bRatio="1.0000000" products="2212 211"/> 
+</particle> 
+ 
+<!--
+<particle id="3101" name="sd_0" antiName="sd_0bar" spinType="1" chargeType="-2" colType="-1" 
+          m0="0.80473"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="3103" name="sd_1" antiName="sd_1bar" spinType="3" chargeType="-2" colType="-1" 
+          m0="0.92953"> 
+</particle> 
+-->
+ 
+<particle id="3112" name="Sigma-" antiName="Sigmabar+" spinType="2" chargeType="-3" colType="0" 
+          m0="1.19745" tau0="4.43400e+01"> 
+ <channel onMode="1" bRatio="0.9984757" products="2112 -211"/> 
+ <channel onMode="1" bRatio="0.0010170" meMode="22" products="-12 11 2112"/> 
+ <channel onMode="1" bRatio="0.0004500" meMode="22" products="-14 13 2112"/> 
+ <channel onMode="1" bRatio="0.0000573" meMode="22" products="-12 11 3122"/> 
+</particle> 
+ 
+
+<particle id="3114" name="Sigma*-" antiName="Sigma*bar+" spinType="4" chargeType="-3" colType="0" 
+          m0="1.38720" mWidth="0.03940" mMin="1.34000" mMax="1.70000"> 
+ <channel onMode="1" bRatio="0.8814590" products="3122 -211"/> 
+ <channel onMode="1" bRatio="0.0592705" products="3212 -211"/> 
+ <channel onMode="1" bRatio="0.0592705" products="3112 111"/> 
+</particle> 
+
+ 
+<particle id="3122" name="Lambda0" antiName="Lambdabar0" spinType="2" chargeType="0" colType="0" 
+          m0="1.11568" tau0="7.89000e+01"> 
+ <channel onMode="1" bRatio="0.6391668" products="2212 -211"/> 
+ <channel onMode="1" bRatio="0.3580935" products="2112 111"/> 
+ <channel onMode="1" bRatio="0.0017505" products="2112 22"/> 
+ <channel onMode="1" bRatio="0.0008322" meMode="22" products="-12 11 2212"/> 
+ <channel onMode="1" bRatio="0.0001570" meMode="22" products="-14 13 2212"/> 
+</particle> 
+ 
+<!--
+<particle id="3124" name="Lambda(1520)0" antiName="Lambda(1520)bar0" spinType="4" chargeType="0" colType="0" 
+          m0="1.51950" mWidth="0.01560" mMin="1.40000" mMax="1.65000"> 
+ <channel onMode="1" bRatio="0.2300000" products="2212 -321"/> 
+ <channel onMode="1" bRatio="0.2300000" products="2112 -311"/> 
+ <channel onMode="1" bRatio="0.1400000" products="3222 -211"/> 
+ <channel onMode="1" bRatio="0.1400000" products="3112 211"/> 
+ <channel onMode="1" bRatio="0.1400000" products="3212 111"/> 
+ <channel onMode="1" bRatio="0.0333000" products="3122 111 111"/> 
+ <channel onMode="1" bRatio="0.0667000" products="3122 211 -211"/> 
+ <channel onMode="1" bRatio="0.0030000" products="3222 -211 111"/> 
+ <channel onMode="1" bRatio="0.0030000" products="3112 211 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="3212 111 111"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3212 211 -211"/> 
+ <channel onMode="1" bRatio="0.0110000" products="3122 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="3201" name="su_0" antiName="su_0bar" spinType="1" chargeType="1" colType="-1" 
+          m0="0.80473"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="3203" name="su_1" antiName="su_1bar" spinType="3" chargeType="1" colType="-1" 
+          m0="0.92953"> 
+</particle> 
+-->
+ 
+<particle id="3212" name="Sigma0" antiName="Sigmabar0" spinType="2" chargeType="0" colType="0" 
+          m0="1.19264" tau0="2.22e-08"> 
+ <channel onMode="1" bRatio="0.9950249" products="3122 22"/> 
+ <channel onMode="1" bRatio="0.0049751" meMode="11" products="3122 11 -11"/> 
+</particle> 
+ 
+
+<particle id="3214" name="Sigma*0" antiName="Sigma*bar0" spinType="4" chargeType="0" colType="0" 
+          m0="1.38370" mWidth="0.03600" mMin="1.34000" mMax="1.70000"> 
+ <channel onMode="1" bRatio="0.8700000" products="3122 111"/> 
+ <channel onMode="1" bRatio="0.0585000" products="3222 -211"/> 
+ <channel onMode="1" bRatio="0.0585000" products="3112 211"/> 
+ <channel onMode="1" bRatio="0.0130000" products="3122 22"/> 
+</particle> 
+
+ 
+<particle id="3222" name="Sigma+" antiName="Sigmabar-" spinType="2" chargeType="3" colType="0" 
+          m0="1.18937" tau0="2.40400e+01"> 
+ <channel onMode="1" bRatio="0.5156743" products="2212 111"/> 
+ <channel onMode="1" bRatio="0.4830758" products="2112 211"/> 
+ <channel onMode="1" bRatio="0.0012299" products="2212 22"/> 
+ <channel onMode="1" bRatio="0.0000200" meMode="22" products="-11 12 3122"/> 
+</particle> 
+ 
+
+<particle id="3224" name="Sigma*+" antiName="Sigma*bar-" spinType="4" chargeType="3" colType="0" 
+          m0="1.38280" mWidth="0.03600" mMin="1.34000" mMax="1.70000"> 
+ <channel onMode="1" bRatio="0.8814590" products="3122 211"/> 
+ <channel onMode="1" bRatio="0.0592705" products="3222 111"/> 
+ <channel onMode="1" bRatio="0.0592705" products="3212 211"/> 
+</particle> 
+
+ 
+<!--
+<particle id="3303" name="ss_1" antiName="ss_1bar" spinType="3" chargeType="-2" colType="-1" 
+          m0="1.09361"> 
+</particle> 
+-->
+ 
+<particle id="3312" name="Xi-" antiName="Xibar+" spinType="2" chargeType="-3" colType="0" 
+          m0="1.32171" tau0="4.91000e+01"> 
+ <channel onMode="1" bRatio="0.9988730" products="3122 -211"/> 
+ <channel onMode="1" bRatio="0.0001270" products="3112 22"/> 
+ <channel onMode="1" bRatio="0.0005630" meMode="22" products="-12 11 3122"/> 
+ <channel onMode="1" bRatio="0.0003500" meMode="22" products="-14 13 3122"/> 
+ <channel onMode="1" bRatio="0.0000870" meMode="22" products="-12 11 3212"/> 
+</particle> 
+ 
+
+<particle id="3314" name="Xi*-" antiName="Xi*bar+" spinType="4" chargeType="-3" colType="0" 
+          m0="1.53500" mWidth="0.00990" mMin="1.46000" mMax="1.63000"> 
+ <channel onMode="1" bRatio="0.6670000" products="3322 -211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="3312 111"/> 
+</particle> 
+ 
+<particle id="3322" name="Xi0" antiName="Xibar0" spinType="2" chargeType="0" colType="0" 
+          m0="1.31486" tau0="8.71000e+01"> 
+ <channel onMode="1" bRatio="0.9952424" products="3122 111"/> 
+ <channel onMode="1" bRatio="0.0011700" products="3122 22"/> 
+ <channel onMode="1" bRatio="0.0033300" products="3212 22"/> 
+ <channel onMode="1" bRatio="0.0002530" meMode="22" products="-12 11 3222"/> 
+ <channel onMode="1" bRatio="0.0000046" meMode="22" products="-14 13 3222"/> 
+</particle> 
+ 
+<particle id="3324" name="Xi*0" antiName="Xi*bar0" spinType="4" chargeType="0" colType="0" 
+          m0="1.53180" mWidth="0.00910" mMin="1.46000" mMax="1.63000"> 
+ <channel onMode="1" bRatio="0.3330000" products="3322 111"/> 
+ <channel onMode="1" bRatio="0.6670000" products="3312 211"/> 
+</particle> 
+ 
+<particle id="3334" name="Omega-" antiName="Omegabar+" spinType="4" chargeType="-3" colType="0" 
+          m0="1.67245" tau0="2.46100e+01"> 
+ <channel onMode="1" bRatio="0.6737955" products="3122 -321"/> 
+ <channel onMode="1" bRatio="0.2345365" products="3322 -211"/> 
+ <channel onMode="1" bRatio="0.0854667" products="3312 111"/> 
+ <channel onMode="1" bRatio="0.0006360" products="3324 -211"/> 
+ <channel onMode="1" bRatio="0.0055653" meMode="22" products="-12 11 3322"/> 
+</particle> 
+ 
+<!--
+<particle id="4101" name="cd_0" antiName="cd_0bar" spinType="1" chargeType="1" colType="-1" 
+          m0="1.96908"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4103" name="cd_1" antiName="cd_1bar" spinType="3" chargeType="1" colType="-1" 
+          m0="2.00808"> 
+</particle> 
+-->
+ 
+<particle id="4112" name="Sigma_c0" antiName="Sigma_cbar0" spinType="2" chargeType="0" colType="0" 
+          m0="2.45374" mWidth="0.00216" mMin="2.43176" mMax="2.47576"> 
+ <channel onMode="1" bRatio="1.0000000" products="4122 -211"/> 
+</particle> 
+ 
+<particle id="4114" name="Sigma*_c0" antiName="Sigma*_cbar0" spinType="4" chargeType="0" colType="0" 
+          m0="2.51880" mWidth="0.01450" mMin="2.43000" mMax="2.68000"> 
+ <channel onMode="1" bRatio="1.0000000" products="4122 -211"/> 
+</particle> 
+ 
+<particle id="4122" name="Lambda_c+" antiName="Lambda_cbar-" spinType="2" chargeType="3" colType="0" 
+          m0="2.28646" tau0="5.99000e-02"> 
+ <channel onMode="1" bRatio="0.0030000" meMode="22" products="-11 12 2112"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="-11 12 2114"/> 
+ <channel onMode="1" bRatio="0.0180000" meMode="22" products="-11 12 3122"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-11 12 3212"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-11 12 3214"/> 
+ <channel onMode="1" bRatio="0.0030000" meMode="22" products="-13 14 2112"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="-13 14 2114"/> 
+ <channel onMode="1" bRatio="0.0180000" meMode="22" products="-13 14 3122"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-13 14 3212"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-13 14 3214"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="22" products="-11 12 2112 111"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="22" products="-11 12 2212 -211"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="22" products="-13 14 2112 111"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="22" products="-13 14 2212 -211"/> 
+ <channel onMode="1" bRatio="0.0030000" products="2112 211"/> 
+ <channel onMode="1" bRatio="0.0030000" products="2112 213"/> 
+ <channel onMode="1" bRatio="0.0030000" products="2114 211"/> 
+ <channel onMode="1" bRatio="0.0030000" products="2114 213"/> 
+ <channel onMode="1" bRatio="0.0020000" products="2212 111"/> 
+ <channel onMode="1" bRatio="0.0020000" products="2212 113"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2212 221"/> 
+ <channel onMode="1" bRatio="0.0020000" products="2212 223"/> 
+ <channel onMode="1" bRatio="0.0230000" products="2212 311"/> 
+ <channel onMode="1" bRatio="0.0400000" products="2212 -313"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2212 331"/> 
+ <channel onMode="1" bRatio="0.0013000" products="2212 333"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2214 111"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2214 113"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2214 221"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2214 223"/> 
+ <channel onMode="1" bRatio="0.0050000" products="2214 311"/> 
+ <channel onMode="1" bRatio="0.0050000" products="2214 -313"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2214 331"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2224 -211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="2224 -213"/> 
+ <channel onMode="1" bRatio="0.0066000" products="2224 -321"/> 
+ <channel onMode="1" bRatio="0.0250000" products="2224 -323"/> 
+ <channel onMode="1" bRatio="0.0058000" products="3122 211"/> 
+ <channel onMode="1" bRatio="0.0050000" products="3122 213"/> 
+ <channel onMode="1" bRatio="0.0050000" products="3122 321"/> 
+ <channel onMode="1" bRatio="0.0050000" products="3122 323"/> 
+ <channel onMode="1" bRatio="0.0055000" products="3212 211"/> 
+ <channel onMode="1" bRatio="0.0040000" products="3212 213"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3212 321"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3212 323"/> 
+ <channel onMode="1" bRatio="0.0040000" products="3214 211"/> 
+ <channel onMode="1" bRatio="0.0040000" products="3214 213"/> 
+ <channel onMode="1" bRatio="0.0010000" products="3214 321"/> 
+ <channel onMode="1" bRatio="0.0010000" products="3214 323"/> 
+ <channel onMode="1" bRatio="0.0040000" products="3222 111"/> 
+ <channel onMode="1" bRatio="0.0040000" products="3222 113"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3222 221"/> 
+ <channel onMode="1" bRatio="0.0040000" products="3222 223"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3222 311"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3222 313"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3222 331"/> 
+ <channel onMode="1" bRatio="0.0030000" products="3224 111"/> 
+ <channel onMode="1" bRatio="0.0030000" products="3224 113"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3224 221"/> 
+ <channel onMode="1" bRatio="0.0030000" products="3224 223"/> 
+ <channel onMode="1" bRatio="0.0010000" products="3224 311"/> 
+ <channel onMode="1" bRatio="0.0010000" products="3224 313"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3322 321"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3322 323"/> 
+ <channel onMode="1" bRatio="0.0020000" products="3324 321"/> 
+ <channel onMode="1" bRatio="0.0018000" products="9010221 2212"/> 
+ <channel onMode="1" bRatio="0.0300000" meMode="43" products="1 2203"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="43" products="2 2101"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="43" products="2 2103"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="43" products="2 3201"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="43" products="2 3203"/> 
+ <channel onMode="1" bRatio="0.0950000" meMode="43" products="3 2203"/> 
+ <channel onMode="1" bRatio="0.0350000" meMode="43" products="2 -1 1 2101"/> 
+ <channel onMode="1" bRatio="0.1300000" meMode="43" products="2 -1 1 3201"/> 
+ <channel onMode="1" bRatio="0.0570000" meMode="43" products="2 -1 1 3203"/> 
+ <channel onMode="1" bRatio="0.0350000" meMode="43" products="2 -3 1 3201"/> 
+</particle> 
+ 
+<!--
+<particle id="4124" name="Lambda_c(2625)+" antiName="Lambda_c(2625)-" spinType="4" chargeType="3" colType="0" 
+          m0="2.62810"> 
+ <channel onMode="1" bRatio="0.6600000" products="4122 211 -211"/> 
+ <channel onMode="1" bRatio="0.3300000" products="4122 111"/> 
+ <channel onMode="1" bRatio="0.0100000" products="4122 22"/> 
+</particle> 
+-->
+ 
+<particle id="4132" name="Xi_c0" antiName="Xi_cbar0" spinType="2" chargeType="0" colType="0" 
+          m0="2.47088" tau0="3.36000e-02"> 
+ <channel onMode="1" bRatio="0.0200000" meMode="22" products="-11 12 3 3101"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-11 12 3 3103"/> 
+ <channel onMode="1" bRatio="0.0200000" meMode="22" products="-13 14 3 3101"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-13 14 3 3103"/> 
+ <channel onMode="1" bRatio="0.5400000" meMode="42" products="2 -1 3 3101"/> 
+ <channel onMode="1" bRatio="0.2100000" meMode="42" products="3 3201"/> 
+ <channel onMode="1" bRatio="0.1000000" meMode="42" products="3 3203"/> 
+ <channel onMode="1" bRatio="0.1000000" meMode="42" products="2 3303"/> 
+</particle> 
+ 
+<!--
+<particle id="4201" name="cu_0" antiName="cu_0bar" spinType="1" chargeType="4" colType="-1" 
+          m0="1.96908"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4203" name="cu_1" antiName="cu_1bar" spinType="3" chargeType="4" colType="-1" 
+          m0="2.00808"> 
+</particle> 
+-->
+ 
+<particle id="4212" name="Sigma_c+" antiName="Sigma_cbar-" spinType="2" chargeType="3" colType="0" 
+          m0="2.45290" mWidth="0.00220" mMin="2.43090" mMax="2.47490"> 
+ <channel onMode="1" bRatio="1.0000000" products="4122 111"/> 
+</particle> 
+ 
+<particle id="4214" name="Sigma*_c+" antiName="Sigma*_cbar-" spinType="4" chargeType="3" colType="0" 
+          m0="2.51750" mWidth="0.01550" mMin="2.43000" mMax="2.68000"> 
+ <channel onMode="1" bRatio="1.0000000" products="4122 111"/> 
+</particle> 
+ 
+<particle id="4222" name="Sigma_c++" antiName="Sigma_cbar--" spinType="2" chargeType="6" colType="0" 
+          m0="2.45398" mWidth="0.00226" mMin="2.43202" mMax="2.47602"> 
+ <channel onMode="1" bRatio="1.0000000" products="4122 211"/> 
+</particle> 
+ 
+<particle id="4224" name="Sigma*_c++" antiName="Sigma*_cbar--" spinType="4" chargeType="6" colType="0" 
+          m0="2.51790" mWidth="0.01490" mMin="2.43000" mMax="2.68000"> 
+ <channel onMode="1" bRatio="1.0000000" products="4122 211"/> 
+</particle> 
+ 
+<particle id="4232" name="Xi_c+" antiName="Xi_cbar-" spinType="2" chargeType="3" colType="0" 
+          m0="2.46780" tau0="1.32000e-01"> 
+ <channel onMode="1" bRatio="0.0280000" meMode="22" products="-11 12 3 3201"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="22" products="-11 12 3 3203"/> 
+ <channel onMode="1" bRatio="0.0280000" meMode="22" products="-13 14 3 3201"/> 
+ <channel onMode="1" bRatio="0.0070000" meMode="22" products="-13 14 3 3203"/> 
+ <channel onMode="1" bRatio="0.9300000" meMode="42" products="2 -1 3 3201"/> 
+</particle> 
+ 
+<!--
+<particle id="4301" name="cs_0" antiName="cs_0bar" spinType="1" chargeType="1" colType="-1" 
+          m0="2.15432"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4303" name="cs_1" antiName="cs_1bar" spinType="3" chargeType="1" colType="-1" 
+          m0="2.17967"> 
+</particle> 
+-->
+ 
+<particle id="4312" name="Xi'_c0" antiName="Xi'_cbar0" spinType="2" chargeType="0" colType="0" 
+          m0="2.57790"> 
+ <channel onMode="1" bRatio="1.0000000" products="4132 22"/> 
+</particle> 
+ 
+
+<particle id="4314" name="Xi*_c0" antiName="Xi*_cbar0" spinType="4" chargeType="0" colType="0" 
+          m0="2.64590" mWidth="0.0026" mMin="2.63590" mMax="2.65590"> 
+ <channel onMode="1" bRatio="0.5000000" products="4132 111"/> 
+ <channel onMode="1" bRatio="0.5000000" products="4132 22"/> 
+</particle> 
+
+ 
+<particle id="4322" name="Xi'_c+" antiName="Xi'_cbar-" spinType="2" chargeType="3" colType="0" 
+          m0="2.57560"> 
+ <channel onMode="1" bRatio="1.0000000" products="4232 22"/> 
+</particle> 
+ 
+
+<particle id="4324" name="Xi*_c+" antiName="Xi*_cbar-" spinType="4" chargeType="3" colType="0" 
+          m0="2.64590" mWidth="0.0026" mMin="2.63590" mMax="2.65590"> 
+ <channel onMode="1" bRatio="0.5000000" products="4232 111"/> 
+ <channel onMode="1" bRatio="0.5000000" products="4232 22"/> 
+</particle> 
+
+ 
+<particle id="4332" name="Omega_c0" antiName="Omega_cbar0" spinType="2" chargeType="0" colType="0" 
+          m0="2.69520" tau0="2.10000e-02"> 
+ <channel onMode="1" bRatio="0.0180000" meMode="22" products="-11 12 3 3303"/> 
+ <channel onMode="1" bRatio="0.0180000" meMode="22" products="-13 14 3 3303"/> 
+ <channel onMode="1" bRatio="0.9640000" meMode="42" products="2 -1 3 3303"/> 
+</particle> 
+ 
+<!--
+<particle id="4334" name="Omega*_c0" antiName="Omega*_cbar0" spinType="4" chargeType="0" colType="0" 
+          m0="2.76590"> 
+ <channel onMode="1" bRatio="1.0000000" products="4332 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4403" name="cc_1" antiName="cc_1bar" spinType="3" chargeType="4" colType="-1" 
+          m0="3.27531"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4412" name="Xi_cc+" antiName="Xi_ccbar-" spinType="2" chargeType="3" colType="0" 
+          m0="3.59798" tau0="1.00000e-01"> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-11 12 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-13 14 3 81"/> 
+ <channel onMode="1" bRatio="0.7600000" meMode="42" products="2 -1 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="42" products="2 -3 3 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4414" name="Xi*_cc+" antiName="Xi*_ccbar-" spinType="4" chargeType="3" colType="0" 
+          m0="3.65648" tau0="1.00000e-01"> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-11 12 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-13 14 3 81"/> 
+ <channel onMode="1" bRatio="0.7600000" meMode="42" products="2 -1 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="42" products="2 -3 3 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4422" name="Xi_cc++" antiName="Xi_ccbar&#45;&#45;" spinType="2" chargeType="6" colType="0" 
+          m0="3.59798" tau0="1.00000e-01"> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-11 12 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-13 14 3 81"/> 
+ <channel onMode="1" bRatio="0.7600000" meMode="42" products="2 -1 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="42" products="2 -3 3 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4424" name="Xi*_cc++" antiName="Xi*_ccbar&#45;&#45;" spinType="4" chargeType="6" colType="0" 
+          m0="3.65648" tau0="1.00000e-01"> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-11 12 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-13 14 3 81"/> 
+ <channel onMode="1" bRatio="0.7600000" meMode="42" products="2 -1 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="42" products="2 -3 3 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4432" name="Omega_cc+" antiName="Omega_ccbar-" spinType="2" chargeType="3" colType="0" 
+          m0="3.78663" tau0="1.00000e-01"> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-11 12 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-13 14 3 81"/> 
+ <channel onMode="1" bRatio="0.7600000" meMode="42" products="2 -1 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="42" products="2 -3 3 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4434" name="Omega*_cc+" antiName="Omega*_ccbar-" spinType="4" chargeType="3" colType="0" 
+          m0="3.82466" tau0="1.00000e-01"> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-11 12 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-13 14 3 81"/> 
+ <channel onMode="1" bRatio="0.7600000" meMode="42" products="2 -1 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="42" products="2 -3 3 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="4444" name="Omega*_ccc++" antiName="Omega*_cccbar&#45;&#45;" spinType="4" chargeType="6" colType="0" 
+          m0="4.91594" tau0="1.00000e-01"> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-11 12 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-13 14 3 81"/> 
+ <channel onMode="1" bRatio="0.7600000" meMode="42" products="2 -1 3 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="42" products="2 -3 3 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5101" name="bd_0" antiName="bd_0bar" spinType="1" chargeType="-2" colType="-1" 
+          m0="5.38897"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5103" name="bd_1" antiName="bd_1bar" spinType="3" chargeType="-2" colType="-1" 
+          m0="5.40145"> 
+</particle> 
+-->
+ 
+<particle id="5112" name="Sigma_b-" antiName="Sigma_bbar+" spinType="2" chargeType="-3" colType="0" 
+          m0="5.81550"> 
+ <channel onMode="1" bRatio="1.0000000" products="5122 -211"/> 
+</particle> 
+ 
+<!--
+<particle id="5114" name="Sigma*_b-" antiName="Sigma*_bbar+" spinType="4" chargeType="-3" colType="0" 
+          m0="5.83510"> 
+ <channel onMode="1" bRatio="1.0000000" products="5122 -211"/> 
+</particle> 
+-->
+ 
+<particle id="5122" name="Lambda_b0" antiName="Lambda_bbar0" spinType="2" chargeType="0" colType="0" 
+          m0="5.61940" tau0="3.69000e-01"> 
+ <channel onMode="1" bRatio="0.0546000" meMode="22" products="-12 11 4122"/> 
+ <channel onMode="1" bRatio="0.0096000" meMode="22" products="-12 11 4124"/> 
+ <channel onMode="1" bRatio="0.0128000" meMode="22" products="-12 11 14122"/> 
+ <channel onMode="1" bRatio="0.0546000" meMode="22" products="-14 13 4122"/> 
+ <channel onMode="1" bRatio="0.0096000" meMode="22" products="-14 13 4124"/> 
+ <channel onMode="1" bRatio="0.0128000" meMode="22" products="-14 13 14122"/> 
+ <channel onMode="1" bRatio="0.0172000" meMode="22" products="-16 15 4122"/> 
+ <channel onMode="1" bRatio="0.0032000" meMode="22" products="-16 15 4124"/> 
+ <channel onMode="1" bRatio="0.0043000" meMode="22" products="-16 15 14122"/> 
+ <channel onMode="1" bRatio="0.0008000" products="2112 421"/> 
+ <channel onMode="1" bRatio="0.0000048" products="2212 -211"/> 
+ <channel onMode="1" bRatio="0.0000185" products="2212 -321"/> 
+ <channel onMode="1" bRatio="0.0000650" products="3122 22"/> 
+ <channel onMode="1" bRatio="0.0000050" products="3122 113"/> 
+ <channel onMode="1" bRatio="0.0000200" products="3122 333"/> 
+ <channel onMode="1" bRatio="0.0008000" products="3122 -421"/> 
+ <channel onMode="1" bRatio="0.0010000" products="3122 441"/> 
+ <channel onMode="1" bRatio="0.0004700" products="3122 443"/> 
+ <channel onMode="1" bRatio="0.0000590" products="3124 22"/> 
+ <channel onMode="1" bRatio="0.0006000" products="4112 111"/> 
+ <channel onMode="1" bRatio="0.0004000" products="4112 221"/> 
+ <channel onMode="1" bRatio="0.0005000" products="4112 331"/> 
+ <channel onMode="1" bRatio="0.0400000" products="4122 -211"/> 
+ <channel onMode="1" bRatio="0.0100000" products="4122 -213"/> 
+ <channel onMode="1" bRatio="0.0005500" products="4122 -321"/> 
+ <channel onMode="1" bRatio="0.0220000" products="4122 -431"/> 
+ <channel onMode="1" bRatio="0.0440000" products="4122 -433"/> 
+ <channel onMode="1" bRatio="0.0003000" products="4132 311"/> 
+ <channel onMode="1" bRatio="0.0006000" products="4212 -211"/> 
+ <channel onMode="1" bRatio="0.0005000" products="4312 311"/> 
+ <channel onMode="1" bRatio="0.0200000" products="-20213 4122"/> 
+ <channel onMode="1" bRatio="0.0000570" products="23122 22"/> 
+ <channel onMode="1" bRatio="0.0000560" products="33122 22"/> 
+ <channel onMode="1" bRatio="0.0003800" products="100443 3122"/> 
+ <channel onMode="1" bRatio="0.0220000" products="4122 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0200000" products="3122 311 211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0120000" meMode="22" products="-2 1 2 2101"/> 
+ <channel onMode="1" bRatio="0.4411147" meMode="23" products="-2 1 4 2101"/> 
+ <channel onMode="1" bRatio="0.0910000" meMode="43" products="-2 4 1 2101"/> 
+ <channel onMode="1" bRatio="0.0120000" meMode="22" products="-4 3 2 2101"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="43" products="-4 3 4 2101"/> 
+</particle> 
+ 
+<particle id="5132" name="Xi_b-" antiName="Xi_bbar+" spinType="2" chargeType="-3" colType="0" 
+          m0="5.79110" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1080010" meMode="22" products="-12 11 4 3101"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="-12 11 2 3101"/> 
+ <channel onMode="1" bRatio="0.1080000" meMode="22" products="-14 13 4 3101"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="-14 13 2 3101"/> 
+ <channel onMode="1" bRatio="0.0250000" meMode="22" products="-16 15 4 3101"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="-16 15 4 3101"/> 
+ <channel onMode="1" bRatio="0.0010000" products="443 3312"/> 
+ <channel onMode="1" bRatio="0.0004370" products="100443 3312"/> 
+ <channel onMode="1" bRatio="0.0004710" products="20443 3312"/> 
+ <channel onMode="1" bRatio="0.0000900" products="445 3312"/> 
+ <channel onMode="1" bRatio="0.0004900" products="441 3312"/> 
+ <channel onMode="1" bRatio="0.0015000" products="443 3314"/> 
+ <channel onMode="1" bRatio="0.0006560" products="100443 3314"/> 
+ <channel onMode="1" bRatio="0.0007060" products="20443 3314"/> 
+ <channel onMode="1" bRatio="0.0001350" products="445 3314"/> 
+ <channel onMode="1" bRatio="0.0007350" products="441 3314"/> 
+ <channel onMode="1" bRatio="0.0012000" products="443 -321 3122"/> 
+ <channel onMode="1" bRatio="0.0005240" products="100443 -321 3122"/> 
+ <channel onMode="1" bRatio="0.0005650" products="20443 -321 3122"/> 
+ <channel onMode="1" bRatio="0.0001080" products="445 -321 3122"/> 
+ <channel onMode="1" bRatio="0.0005880" products="441 -321 3122"/> 
+ <channel onMode="1" bRatio="0.0006000" products="443 -311 3112"/> 
+ <channel onMode="1" bRatio="0.0002620" products="100443 -311 3112"/> 
+ <channel onMode="1" bRatio="0.0002830" products="20443 -311 3112"/> 
+ <channel onMode="1" bRatio="0.0000540" products="445 -311 3112"/> 
+ <channel onMode="1" bRatio="0.0002940" products="441 -311 3112"/> 
+ <channel onMode="1" bRatio="0.0038200" meMode="43" products="443 3 3101"/> 
+ <channel onMode="1" bRatio="0.0016690" meMode="43" products="100443 3 3101"/> 
+ <channel onMode="1" bRatio="0.0017990" meMode="43" products="20443 3 3101"/> 
+ <channel onMode="1" bRatio="0.0003440" meMode="43" products="445 3 3101"/> 
+ <channel onMode="1" bRatio="0.0018720" meMode="43" products="441 3 3101"/> 
+ <channel onMode="1" bRatio="0.1096770" meMode="22" products="-2 1 4 3101"/> 
+ <channel onMode="1" bRatio="0.2632250" meMode="22" products="-2 4 1 3101"/> 
+ <channel onMode="1" bRatio="0.0658060" meMode="42" products="-2 1 4 3101"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="42" products="-2 4 1 3101"/> 
+ <channel onMode="1" bRatio="0.0057720" meMode="22" products="-2 3 4 3101"/> 
+ <channel onMode="1" bRatio="0.0138540" meMode="22" products="-2 4 3 3101"/> 
+ <channel onMode="1" bRatio="0.0034630" meMode="42" products="-2 3 4 3101"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="42" products="-2 4 3 3101"/> 
+ <channel onMode="1" bRatio="0.0090000" meMode="22" products="-2 1 2 3101"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="22" products="-2 2 1 3101"/> 
+ <channel onMode="1" bRatio="0.0230000" meMode="63" products="-431 4 3101"/> 
+ <channel onMode="1" bRatio="0.0230000" meMode="63" products="-433 4 3101"/> 
+ <channel onMode="1" bRatio="0.0130000" products="-431 4132"/> 
+ <channel onMode="1" bRatio="0.0090000" products="-431 4314"/> 
+ <channel onMode="1" bRatio="0.0090000" products="-433 4132"/> 
+ <channel onMode="1" bRatio="0.0230000" products="-433 4314"/> 
+ <channel onMode="1" bRatio="0.0080000" meMode="22" products="-421 -321 4 3101"/> 
+ <channel onMode="1" bRatio="0.0080000" meMode="22" products="-411 -311 4 3101"/> 
+ <channel onMode="1" bRatio="0.0320000" meMode="22" products="-423 -321 4 3101"/> 
+ <channel onMode="1" bRatio="0.0320000" meMode="22" products="-413 -311 4 3101"/> 
+ <channel onMode="1" bRatio="0.0770000" meMode="42" products="4122 -2203 3101"/> 
+</particle> 
+ 
+<!--
+<particle id="5142" name="Xi_bc0" antiName="Xi_bcbar0" spinType="2" chargeType="0" colType="0" 
+          m0="7.00575" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5201" name="bu_0" antiName="bu_0bar" spinType="1" chargeType="1" colType="-1" 
+          m0="5.38897"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5203" name="bu_1" antiName="bu_1bar" spinType="3" chargeType="1" colType="-1" 
+          m0="5.40145"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5212" name="Sigma_b0" antiName="Sigma_bbar0" spinType="2" chargeType="0" colType="0" 
+          m0="5.80000"> 
+ <channel onMode="1" bRatio="1.0000000" products="5122 111"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5214" name="Sigma*_b0" antiName="Sigma*_bbar0" spinType="4" chargeType="0" colType="0" 
+          m0="5.81000"> 
+ <channel onMode="1" bRatio="1.0000000" products="5122 111"/> 
+</particle> 
+-->
+ 
+<particle id="5222" name="Sigma_b+" antiName="Sigma_bbar-" spinType="2" chargeType="3" colType="0" 
+          m0="5.81130"> 
+ <channel onMode="1" bRatio="1.0000000" products="5122 211"/> 
+</particle> 
+ 
+<!--
+<particle id="5224" name="Sigma*_b+" antiName="Sigma*_bbar-" spinType="4" chargeType="3" colType="0" 
+          m0="5.83210"> 
+ <channel onMode="1" bRatio="1.0000000" products="5122 211"/> 
+</particle> 
+-->
+ 
+<particle id="5232" name="Xi_b0" antiName="Xi_bbar0" spinType="2" chargeType="0" colType="0" 
+          m0="5.78800" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1080010" meMode="22" products="-12 11 4 3201"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="-12 11 2 3201"/> 
+ <channel onMode="1" bRatio="0.1080000" meMode="22" products="-14 13 4 3201"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="-14 13 2 3201"/> 
+ <channel onMode="1" bRatio="0.0250000" meMode="22" products="-16 15 4 3201"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="-16 15 4 3201"/> 
+ <channel onMode="1" bRatio="0.0010000" products="443 3322"/> 
+ <channel onMode="1" bRatio="0.0004370" products="100443 3322"/> 
+ <channel onMode="1" bRatio="0.0004710" products="20443 3322"/> 
+ <channel onMode="1" bRatio="0.0000900" products="445 3322"/> 
+ <channel onMode="1" bRatio="0.0004900" products="441 3322"/> 
+ <channel onMode="1" bRatio="0.0015000" products="443 3324"/> 
+ <channel onMode="1" bRatio="0.0006560" products="100443 3324"/> 
+ <channel onMode="1" bRatio="0.0007060" products="20443 3324"/> 
+ <channel onMode="1" bRatio="0.0001350" products="445 3324"/> 
+ <channel onMode="1" bRatio="0.0007350" products="441 3324"/> 
+ <channel onMode="1" bRatio="0.0012000" products="443 -321 3222"/> 
+ <channel onMode="1" bRatio="0.0005240" products="100443 -321 3222"/> 
+ <channel onMode="1" bRatio="0.0005650" products="20443 -321 3222"/> 
+ <channel onMode="1" bRatio="0.0001080" products="445 -321 3222"/> 
+ <channel onMode="1" bRatio="0.0005880" products="441 -321 3222"/> 
+ <channel onMode="1" bRatio="0.0006000" products="443 -311 3212"/> 
+ <channel onMode="1" bRatio="0.0002620" products="100443 -311 3212"/> 
+ <channel onMode="1" bRatio="0.0002830" products="20443 -311 3212"/> 
+ <channel onMode="1" bRatio="0.0000540" products="445 -311 3212"/> 
+ <channel onMode="1" bRatio="0.0002940" products="441 -311 3212"/> 
+ <channel onMode="1" bRatio="0.0038200" meMode="43" products="443 3 3201"/> 
+ <channel onMode="1" bRatio="0.0016690" meMode="43" products="100443 3 3201"/> 
+ <channel onMode="1" bRatio="0.0017990" meMode="43" products="20443 3 3201"/> 
+ <channel onMode="1" bRatio="0.0003440" meMode="43" products="445 3 3201"/> 
+ <channel onMode="1" bRatio="0.0018720" meMode="43" products="441 3 3201"/> 
+ <channel onMode="1" bRatio="0.1096770" meMode="22" products="-2 1 4 3201"/> 
+ <channel onMode="1" bRatio="0.2632250" meMode="22" products="-2 4 1 3201"/> 
+ <channel onMode="1" bRatio="0.0658060" meMode="42" products="-2 1 4 3201"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="42" products="-2 4 1 3201"/> 
+ <channel onMode="1" bRatio="0.0057720" meMode="22" products="-2 3 4 3201"/> 
+ <channel onMode="1" bRatio="0.0138540" meMode="22" products="-2 4 3 3201"/> 
+ <channel onMode="1" bRatio="0.0034630" meMode="42" products="-2 3 4 3201"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="42" products="-2 4 3 3201"/> 
+ <channel onMode="1" bRatio="0.0090000" meMode="22" products="-2 1 2 3201"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="22" products="-2 2 1 3201"/> 
+ <channel onMode="1" bRatio="0.0230000" meMode="63" products="-431 4 3201"/> 
+ <channel onMode="1" bRatio="0.0230000" meMode="63" products="-433 4 3201"/> 
+ <channel onMode="1" bRatio="0.0130000" products="-431 4232"/> 
+ <channel onMode="1" bRatio="0.0090000" products="-431 4324"/> 
+ <channel onMode="1" bRatio="0.0090000" products="-433 4232"/> 
+ <channel onMode="1" bRatio="0.0230000" products="-433 4324"/> 
+ <channel onMode="1" bRatio="0.0080000" meMode="22" products="-421 -321 4 3201"/> 
+ <channel onMode="1" bRatio="0.0080000" meMode="22" products="-411 -311 4 3201"/> 
+ <channel onMode="1" bRatio="0.0320000" meMode="22" products="-423 -321 4 3201"/> 
+ <channel onMode="1" bRatio="0.0320000" meMode="22" products="-413 -311 4 3201"/> 
+ <channel onMode="1" bRatio="0.0770000" meMode="42" products="4122 -2203 3201"/> 
+</particle> 
+ 
+<!--
+<particle id="5242" name="Xi_bc+" antiName="Xi_bcbar-" spinType="2" chargeType="3" colType="0" 
+          m0="7.00575" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5301" name="bs_0" antiName="bs_0bar" spinType="1" chargeType="-2" colType="-1" 
+          m0="5.56725"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5303" name="bs_1" antiName="bs_1bar" spinType="3" chargeType="-2" colType="-1" 
+          m0="5.57536"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5312" name="Xi'_b-" antiName="Xi'_bbar+" spinType="2" chargeType="-3" colType="0" 
+          m0="5.96000"> 
+ <channel onMode="1" bRatio="1.0000000" products="5132 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5314" name="Xi*_b-" antiName="Xi*_bbar+" spinType="4" chargeType="-3" colType="0" 
+          m0="5.97000"> 
+ <channel onMode="1" bRatio="1.0000000" products="5132 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5322" name="Xi'_b0" antiName="Xi'_bbar0" spinType="2" chargeType="0" colType="0" 
+          m0="5.96000"> 
+ <channel onMode="1" bRatio="1.0000000" products="5232 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5324" name="Xi*_b0" antiName="Xi*_bbar0" spinType="4" chargeType="0" colType="0" 
+          m0="5.97000"> 
+ <channel onMode="1" bRatio="1.0000000" products="5232 22"/> 
+</particle> 
+-->
+ 
+<particle id="5332" name="Omega_b-" antiName="Omega_bbar+" spinType="2" chargeType="-3" colType="0" 
+          m0="6.07000" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1080010" meMode="22" products="-12 11 4 3303"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="-12 11 2 3303"/> 
+ <channel onMode="1" bRatio="0.1080000" meMode="22" products="-14 13 4 3303"/> 
+ <channel onMode="1" bRatio="0.0020000" meMode="22" products="-14 13 2 3303"/> 
+ <channel onMode="1" bRatio="0.0250000" meMode="22" products="-16 15 4 3303"/> 
+ <channel onMode="1" bRatio="0.0010000" meMode="22" products="-16 15 4 3303"/> 
+ <channel onMode="1" bRatio="0.0025000" products="443 3334"/> 
+ <channel onMode="1" bRatio="0.0010930" products="100443 3334"/> 
+ <channel onMode="1" bRatio="0.0011770" products="20443 3334"/> 
+ <channel onMode="1" bRatio="0.0002250" products="445 3334"/> 
+ <channel onMode="1" bRatio="0.0012250" products="441 3334"/> 
+ <channel onMode="1" bRatio="0.0012000" products="443 -321 3322"/> 
+ <channel onMode="1" bRatio="0.0005240" products="100443 -321 3322"/> 
+ <channel onMode="1" bRatio="0.0005650" products="20443 -321 3322"/> 
+ <channel onMode="1" bRatio="0.0001080" products="445 -321 3322"/> 
+ <channel onMode="1" bRatio="0.0005880" products="441 -321 3322"/> 
+ <channel onMode="1" bRatio="0.0006000" products="443 -311 3312"/> 
+ <channel onMode="1" bRatio="0.0002620" products="100443 -311 3312"/> 
+ <channel onMode="1" bRatio="0.0002830" products="20443 -311 3312"/> 
+ <channel onMode="1" bRatio="0.0000540" products="445 -311 3312"/> 
+ <channel onMode="1" bRatio="0.0002940" products="441 -311 3312"/> 
+ <channel onMode="1" bRatio="0.0038200" meMode="43" products="443 3 3303"/> 
+ <channel onMode="1" bRatio="0.0016690" meMode="43" products="100443 3 3303"/> 
+ <channel onMode="1" bRatio="0.0017990" meMode="43" products="20443 3 3303"/> 
+ <channel onMode="1" bRatio="0.0003440" meMode="43" products="445 3 3303"/> 
+ <channel onMode="1" bRatio="0.0018720" meMode="43" products="441 3 3303"/> 
+ <channel onMode="1" bRatio="0.1096770" meMode="22" products="-2 1 4 3303"/> 
+ <channel onMode="1" bRatio="0.2632250" meMode="22" products="-2 4 1 3303"/> 
+ <channel onMode="1" bRatio="0.0658060" meMode="42" products="-2 1 4 3303"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="42" products="-2 4 1 3303"/> 
+ <channel onMode="1" bRatio="0.0057720" meMode="22" products="-2 3 4 3303"/> 
+ <channel onMode="1" bRatio="0.0138540" meMode="22" products="-2 4 3 3303"/> 
+ <channel onMode="1" bRatio="0.0034630" meMode="42" products="-2 3 4 3303"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="42" products="-2 4 3 3303"/> 
+ <channel onMode="1" bRatio="0.0090000" meMode="22" products="-2 1 2 3303"/> 
+ <channel onMode="1" bRatio="0.0060000" meMode="22" products="-2 2 1 3303"/> 
+ <channel onMode="1" bRatio="0.0230000" meMode="63" products="-431 4 3303"/> 
+ <channel onMode="1" bRatio="0.0230000" meMode="63" products="-433 4 3303"/> 
+ <channel onMode="1" bRatio="0.0130000" products="-431 4332"/> 
+ <channel onMode="1" bRatio="0.0090000" products="-431 4334"/> 
+ <channel onMode="1" bRatio="0.0090000" products="-433 4332"/> 
+ <channel onMode="1" bRatio="0.0230000" products="-433 4334"/> 
+ <channel onMode="1" bRatio="0.0080000" meMode="22" products="-421 -321 4 3303"/> 
+ <channel onMode="1" bRatio="0.0080000" meMode="22" products="-411 -311 4 3303"/> 
+ <channel onMode="1" bRatio="0.0320000" meMode="22" products="-423 -321 4 3303"/> 
+ <channel onMode="1" bRatio="0.0320000" meMode="22" products="-413 -311 4 3303"/> 
+ <channel onMode="1" bRatio="0.0770000" meMode="42" products="4122 -2203 3303"/> 
+</particle> 
+ 
+<!--
+<particle id="5334" name="Omega*_b-" antiName="Omega*_bbar+" spinType="4" chargeType="-3" colType="0" 
+          m0="6.13000"> 
+ <channel onMode="1" bRatio="1.0000000" products="5332 22"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5342" name="Omega_bc0" antiName="Omega_bcbar0" spinType="2" chargeType="0" colType="0" 
+          m0="7.19099" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5401" name="bc_0" antiName="bc_0bar" spinType="1" chargeType="1" colType="-1" 
+          m0="6.67143"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5403" name="bc_1" antiName="bc_1bar" spinType="3" chargeType="1" colType="-1" 
+          m0="6.67397"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5412" name="Xi'_bc0" antiName="Xi'_bcbar0" spinType="2" chargeType="0" colType="0" 
+          m0="7.03724" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5414" name="Xi*_bc0" antiName="Xi*_bcbar0" spinType="4" chargeType="0" colType="0" 
+          m0="7.04850" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5422" name="Xi'_bc+" antiName="Xi'_bcbar-" spinType="2" chargeType="3" colType="0" 
+          m0="7.03724" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5424" name="Xi*_bc+" antiName="Xi*_bcbar-" spinType="4" chargeType="3" colType="0" 
+          m0="7.04850" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5432" name="Omega'_bc0" antiName="Omega'_bcbar0" spinType="2" chargeType="0" colType="0" 
+          m0="7.21101" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5434" name="Omega*_bc0" antiName="Omega*_bcbar0" spinType="4" chargeType="0" colType="0" 
+          m0="7.21900" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5442" name="Omega_bcc+" antiName="Omega_bccbar-" spinType="2" chargeType="3" colType="0" 
+          m0="8.30945" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5444" name="Omega*_bcc+" antiName="Omega*_bccbar-" spinType="4" chargeType="3" colType="0" 
+          m0="8.31325" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5503" name="bb_1" antiName="bb_1bar" spinType="3" chargeType="-2" colType="-1" 
+          m0="10.07354"> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5512" name="Xi_bb-" antiName="Xi_bbbar+" spinType="2" chargeType="-3" colType="0" 
+          m0="10.42272" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5514" name="Xi*_bb-" antiName="Xi*_bbbar+" spinType="4" chargeType="-3" colType="0" 
+          m0="10.44144" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5522" name="Xi_bb0" antiName="Xi_bbbar0" spinType="2" chargeType="0" colType="0" 
+          m0="10.42272" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5524" name="Xi*_bb0" antiName="Xi*_bbbar0" spinType="4" chargeType="0" colType="0" 
+          m0="10.44144" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5532" name="Omega_bb-" antiName="Omega_bbbar+" spinType="2" chargeType="-3" colType="0" 
+          m0="10.60209" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5534" name="Omega*_bb-" antiName="Omega*_bbbar+" spinType="4" chargeType="-3" colType="0" 
+          m0="10.61426" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5542" name="Omega_bbc0" antiName="Omega_bbcbar0" spinType="2" chargeType="0" colType="0" 
+          m0="11.70767" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5544" name="Omega*_bbc0" antiName="Omega*_bbcbar0" spinType="4" chargeType="0" colType="0" 
+          m0="11.71147" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="5554" name="Omega*_bbb-" antiName="Omega*_bbbbar+" spinType="4" chargeType="-3" colType="0" 
+          m0="15.11061" tau0="3.64000e-01"> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-12 11 4 81"/> 
+ <channel onMode="1" bRatio="0.1050000" meMode="22" products="-14 13 4 81"/> 
+ <channel onMode="1" bRatio="0.0400000" meMode="22" products="-16 15 4 81"/> 
+ <channel onMode="1" bRatio="0.5000000" meMode="22" products="-2 1 4 81"/> 
+ <channel onMode="1" bRatio="0.0800000" meMode="22" products="-2 4 1 81"/> 
+ <channel onMode="1" bRatio="0.1400000" meMode="22" products="-4 3 4 81"/> 
+ <channel onMode="1" bRatio="0.0100000" meMode="22" products="-4 4 3 81"/> 
+ <channel onMode="1" bRatio="0.0150000" meMode="22" products="-2 1 2 81"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="22" products="-4 3 2 81"/> 
+</particle> 
+-->
+ 
+<!--
+<particle id="10111" name="a_0(1450)0" spinType="1" chargeType="0" colType="0" 
+          m0="1.47400" mWidth="0.26500" mMin="1.00000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.3000000" products="111 221"/> 
+ <channel onMode="1" bRatio="0.1000000" products="111 331"/> 
+ <channel onMode="1" bRatio="0.1200000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0600000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0600000" products="310 310"/> 
+ <channel onMode="1" bRatio="0.1800000" products="223 211 -211"/> 
+ <channel onMode="1" bRatio="0.1800000" products="223 111 111"/> 
+</particle> 
+ 
+<particle id="10113" name="b_1(1235)0" spinType="3" chargeType="0" colType="0" 
+          m0="1.22950" mWidth="0.14200" mMin="0.95000" mMax="1.70000"> 
+ <channel onMode="1" bRatio="1.0000000" products="223 111"/> 
+</particle> 
+ 
+<particle id="10211" name="a_0(1450)+" antiName="a_0(1450)-" spinType="1" chargeType="3" colType="0" 
+          m0="1.47400" mWidth="0.26500" mMin="1.00000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.3000000" products="211 221"/> 
+ <channel onMode="1" bRatio="0.1000000" products="211 331"/> 
+ <channel onMode="1" bRatio="0.2400000" products="321 -311"/> 
+ <channel onMode="1" bRatio="0.3600000" products="223 211 111"/> 
+</particle> 
+ 
+<particle id="10213" name="b_1(1235)+" antiName="b_1(1235)-" spinType="3" chargeType="3" colType="0" 
+          m0="1.22950" mWidth="0.14200" mMin="0.95000" mMax="1.70000"> 
+ <channel onMode="1" bRatio="0.9984000" products="223 211"/> 
+ <channel onMode="1" bRatio="0.0016000" products="211 22"/> 
+</particle> 
+ 
+<particle id="10221" name="f_0(1370)" spinType="1" chargeType="0" colType="0" 
+          m0="1.35000" mWidth="0.20000" mMin="1.00000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.2000000" products="113 111"/> 
+ <channel onMode="1" bRatio="0.2000000" products="213 -213"/> 
+ <channel onMode="1" bRatio="0.1000000" products="111 111 111 111"/> 
+ <channel onMode="1" bRatio="0.2000000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.1000000" products="111 111"/> 
+ <channel onMode="1" bRatio="0.0500000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0250000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0250000" products="310 310"/> 
+ <channel onMode="1" bRatio="0.1000000" products="221 221"/> 
+</particle> 
+ 
+<particle id="10223" name="h_1(1170)" spinType="3" chargeType="0" colType="0" 
+          m0="1.17000" mWidth="0.36000" mMin="0.95000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.3330000" products="213 -211"/> 
+ <channel onMode="1" bRatio="0.3340000" products="113 111"/> 
+ <channel onMode="1" bRatio="0.3330000" products="-213 211"/> 
+</particle> 
+ 
+<particle id="10311" name="K*_0(1430)0" antiName="K*_0(1430)bar0" spinType="1" chargeType="0" colType="0" 
+          m0="1.43000" mWidth="0.27000" mMin="0.70000" mMax="2.20000"> 
+ <channel onMode="1" bRatio="0.6670000" products="321 -211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="311 111"/> 
+</particle> 
+ 
+<particle id="10313" name="K_1(1270)0" antiName="K_1(1270)bar0" spinType="3" chargeType="0" colType="0" 
+          m0="1.27200" mWidth="0.09000" mMin="1.00000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.2886598" products="321 -213"/> 
+ <channel onMode="1" bRatio="0.1443299" products="311 113"/> 
+ <channel onMode="1" bRatio="0.1924399" products="10321 -211"/> 
+ <channel onMode="1" bRatio="0.0962199" products="10311 111"/> 
+ <channel onMode="1" bRatio="0.1099656" products="323 -211"/> 
+ <channel onMode="1" bRatio="0.0549828" products="313 111"/> 
+ <channel onMode="1" bRatio="0.1134021" products="311 223"/> 
+</particle> 
+ 
+<particle id="10321" name="K*_0(1430)+" antiName="K*_0(1430)-" spinType="1" chargeType="3" colType="0" 
+          m0="1.43000" mWidth="0.27000" mMin="0.70000" mMax="2.20000"> 
+ <channel onMode="1" bRatio="0.6670000" products="311 211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="321 111"/> 
+</particle> 
+ 
+<particle id="10323" name="K_1(1270)+" antiName="K_1(1270)-" spinType="3" chargeType="3" colType="0" 
+          m0="1.27200" mWidth="0.09000" mMin="1.00000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.2886598" products="311 213"/> 
+ <channel onMode="1" bRatio="0.1443299" products="321 113"/> 
+ <channel onMode="1" bRatio="0.1924399" products="10311 211"/> 
+ <channel onMode="1" bRatio="0.0962199" products="10321 111"/> 
+ <channel onMode="1" bRatio="0.1099656" products="313 211"/> 
+ <channel onMode="1" bRatio="0.0549828" products="323 111"/> 
+ <channel onMode="1" bRatio="0.1134021" products="321 223"/> 
+</particle> 
+ 
+<particle id="10331" name="f_0(1710)" spinType="1" chargeType="0" colType="0" 
+          m0="1.72000" mWidth="0.13500" mMin="1.10000" mMax="2.40000"> 
+ <channel onMode="1" bRatio="0.3000000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.1500000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.1500000" products="310 310"/> 
+ <channel onMode="1" bRatio="0.3000000" products="221 221"/> 
+ <channel onMode="1" bRatio="0.0500000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0500000" products="111 111"/> 
+</particle> 
+ 
+<particle id="10333" name="h_1(1380)" spinType="3" chargeType="0" colType="0" 
+          m0="1.38600" mWidth="0.09100" mMin="1.38000" mMax="1.60000"> 
+ <channel onMode="1" bRatio="0.2500000" products="313 -311"/> 
+ <channel onMode="1" bRatio="0.2500000" products="-313 311"/> 
+ <channel onMode="1" bRatio="0.2500000" products="323 -321"/> 
+ <channel onMode="1" bRatio="0.2500000" products="-323 321"/> 
+</particle> 
+ 
+<particle id="10411" name="D*_0+" antiName="D*_0-" spinType="1" chargeType="3" colType="0" 
+          m0="2.31800" mWidth="0.27000" mMin="2.05000" mMax="2.50000"> 
+ <channel onMode="1" bRatio="0.6670000" products="421 211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="411 111"/> 
+</particle> 
+ 
+<particle id="10413" name="D_1+" antiName="D_1-" spinType="3" chargeType="3" colType="0" 
+          m0="2.42400" mWidth="0.02000" mMin="2.22400" mMax="2.62400"> 
+ <channel onMode="1" bRatio="0.6670000" products="423 211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="413 111"/> 
+</particle> 
+ 
+<particle id="10421" name="D*_00" antiName="D*_0bar0" spinType="1" chargeType="0" colType="0" 
+          m0="2.31800" mWidth="0.27000" mMin="2.05000" mMax="2.50000"> 
+ <channel onMode="1" bRatio="0.6670000" products="411 -211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="421 111"/> 
+</particle> 
+ 
+<particle id="10423" name="D_10" antiName="D_1bar0" spinType="3" chargeType="0" colType="0" 
+          m0="2.42130" mWidth="0.02710" mMin="2.21830" mMax="2.62630"> 
+ <channel onMode="1" bRatio="0.6670000" products="413 -211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="423 111"/> 
+</particle> 
+ 
+<particle id="10431" name="D*_0s+" antiName="D*_0s-" spinType="1" chargeType="3" colType="0" 
+          m0="2.31780" mWidth="0.02000" mMin="2.20000" mMax="2.44000"> 
+ <channel onMode="1" bRatio="1.0000000" products="431 111"/> 
+</particle> 
+ 
+<particle id="10433" name="D_1s+" antiName="D_1s-" spinType="3" chargeType="3" colType="0" 
+          m0="2.53512" mWidth="0.00092" mMin="2.52512" mMax="2.54512"> 
+ <channel onMode="1" bRatio="0.5000000" products="423 321"/> 
+ <channel onMode="1" bRatio="0.5000000" products="413 311"/> 
+</particle> 
+ 
+<particle id="10441" name="chi_0c" spinType="1" chargeType="0" colType="0" 
+          m0="3.41475" mWidth="0.01040" mMin="3.31076" mMax="3.51876"> 
+ <channel onMode="1" bRatio="0.0002600" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0021000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0049000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0021000" products="221 221"/> 
+ <channel onMode="1" bRatio="0.0021000" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0016000" products="313 -313"/> 
+ <channel onMode="1" bRatio="0.0060000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0010000" products="333 333"/> 
+ <channel onMode="1" bRatio="0.0200000" products="443 22"/> 
+ <channel onMode="1" bRatio="0.0002200" products="2212 -2212"/> 
+ <channel onMode="1" bRatio="0.0005000" products="3122 -3122"/> 
+ <channel onMode="1" bRatio="0.0028000" products="9010221 9010221"/> 
+ <channel onMode="1" bRatio="0.0100000" products="211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0100000" products="213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0100000" products="-213 211 111"/> 
+ <channel onMode="1" bRatio="0.0032000" products="321 -313 -211"/> 
+ <channel onMode="1" bRatio="0.0032000" products="-321 313 211"/> 
+ <channel onMode="1" bRatio="0.0043000" products="323 311 -211"/> 
+ <channel onMode="1" bRatio="0.0043000" products="-323 311 211"/> 
+ <channel onMode="1" bRatio="0.0134000" products="211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0021000" products="321 321 -321 -321"/> 
+ <channel onMode="1" bRatio="0.0153000" products="321 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0022000" products="2212 -2212 211 -211"/> 
+ <channel onMode="1" bRatio="0.0098000" products="211 211 211 -211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.8686200" meMode="52" products="83 -83"/> 
+</particle> 
+ 
+<particle id="10443" name="h_1c" spinType="3" chargeType="0" colType="0" 
+          m0="3.52541" mWidth="0.01000" mMin="3.36000" mMax="3.56000"> 
+ <channel onMode="1" bRatio="0.5000000" products="441 22"/> 
+ <channel onMode="1" bRatio="0.0100000" products="443 111"/> 
+ <channel onMode="1" bRatio="0.4900000" meMode="42" products="83 -83"/> 
+</particle> 
+ 
+<particle id="10511" name="B*_00" antiName="B*_0bar0" spinType="1" chargeType="0" colType="0" 
+          m0="5.68000" mWidth="0.05000" mMin="5.58000" mMax="5.78000"> 
+ <channel onMode="1" bRatio="0.6670000" products="521 -211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="511 111"/> 
+</particle> 
+ 
+<particle id="10513" name="B_10" antiName="B_1bar0" spinType="3" chargeType="0" colType="0" 
+          m0="5.73000" mWidth="0.05000" mMin="5.63000" mMax="5.83000"> 
+ <channel onMode="1" bRatio="0.6670000" products="523 -211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="513 111"/> 
+</particle> 
+ 
+<particle id="10521" name="B*_0+" antiName="B*_0-" spinType="1" chargeType="3" colType="0" 
+          m0="5.68000" mWidth="0.05000" mMin="5.58000" mMax="5.78000"> 
+ <channel onMode="1" bRatio="0.6670000" products="511 211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="521 111"/> 
+</particle> 
+ 
+<particle id="10523" name="B_1+" antiName="B_1-" spinType="3" chargeType="3" colType="0" 
+          m0="5.73000" mWidth="0.05000" mMin="5.63000" mMax="5.83000"> 
+ <channel onMode="1" bRatio="0.6670000" products="513 211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="523 111"/> 
+</particle> 
+ 
+<particle id="10531" name="B*_0s0" antiName="B*_0sbar0" spinType="1" chargeType="0" colType="0" 
+          m0="5.92000" mWidth="0.05000" mMin="5.82000" mMax="6.02000"> 
+ <channel onMode="1" bRatio="0.5000000" products="521 -321"/> 
+ <channel onMode="1" bRatio="0.5000000" products="511 -311"/> 
+</particle> 
+ 
+<particle id="10533" name="B_1s0" antiName="B_1sbar0" spinType="3" chargeType="0" colType="0" 
+          m0="5.82900" mWidth="0.05000" mMin="5.77900" mMax="5.87900"> 
+ <channel onMode="1" bRatio="0.5000000" products="523 -321"/> 
+ <channel onMode="1" bRatio="0.5000000" products="513 -311"/> 
+</particle> 
+ 
+<particle id="10541" name="B*_0c+" antiName="B*_0c-" spinType="1" chargeType="3" colType="0" 
+          m0="7.25000" mWidth="0.05000" mMin="7.20000" mMax="7.30000"> 
+ <channel onMode="1" bRatio="0.5000000" products="511 411"/> 
+ <channel onMode="1" bRatio="0.5000000" products="521 421"/> 
+</particle> 
+ 
+<particle id="10543" name="B_1c+" antiName="B_1c-" spinType="3" chargeType="3" colType="0" 
+          m0="7.30000" mWidth="0.05000" mMin="7.20000" mMax="7.40000"> 
+ <channel onMode="1" bRatio="0.5000000" products="513 411"/> 
+ <channel onMode="1" bRatio="0.5000000" products="523 421"/> 
+</particle> 
+ 
+<particle id="10551" name="chi_0b" spinType="1" chargeType="0" colType="0" 
+          m0="9.85940"> 
+ <channel onMode="1" bRatio="0.9800000" meMode="91" products="21 21"/> 
+ <channel onMode="1" bRatio="0.0200000" products="553 22"/> 
+</particle> 
+ 
+<particle id="10553" name="h_1b" spinType="3" chargeType="0" colType="0" 
+          m0="9.89860" mWidth="0.01000" mMin="9.85500" mMax="9.89500"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="91" products="21 21"/> 
+</particle> 
+-->
+
+<particle id="13122" name="Lambda(1405)0" antiName="Lambda(1405)bar0" spinType="2" chargeType="0" colType="0" 
+          m0="1.40510" mWidth="0.05000" mMin="1.32000" mMax="1.80000"> 
+ <channel onMode="1" bRatio="0.3333000" products="3222 -211"/> 
+ <channel onMode="1" bRatio="0.3333000" products="3112 211"/> 
+ <channel onMode="1" bRatio="0.3334000" products="3212 111"/> 
+</particle> 
+<!-- 
+<particle id="14122" name="Lambda_c(2593)+" antiName="Lambda_c(2593)-" spinType="2" chargeType="3" colType="0" 
+          m0="2.59225" mWidth="0.00260" mMin="2.57000" mMax="2.63000"> 
+ <channel onMode="1" bRatio="0.2400000" products="4222 -211"/> 
+ <channel onMode="1" bRatio="0.2400000" products="4112 211"/> 
+ <channel onMode="1" bRatio="0.1800000" products="4122 211 -211"/> 
+ <channel onMode="1" bRatio="0.2400000" products="4212 111"/> 
+ <channel onMode="1" bRatio="0.0900000" products="4122 111 111"/> 
+ <channel onMode="1" bRatio="0.0100000" products="4122 22"/> 
+</particle> 
+ 
+<particle id="20113" name="a_1(1260)0" spinType="3" chargeType="0" colType="0" 
+          m0="1.23000" mWidth="0.42000" mMin="0.93000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.3300000" products="213 -211"/> 
+ <channel onMode="1" bRatio="0.3300000" products="-213 211"/> 
+ <channel onMode="1" bRatio="0.3400000" products="113 111"/> 
+</particle> 
+ 
+<particle id="20213" name="a_1(1260)+" antiName="a_1(1260)-" spinType="3" chargeType="3" colType="0" 
+          m0="1.23000" mWidth="0.42000" mMin="0.93000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.5000000" products="113 211"/> 
+ <channel onMode="1" bRatio="0.5000000" products="213 111"/> 
+</particle> 
+ 
+<particle id="20223" name="f_1(1285)" spinType="3" chargeType="0" colType="0" 
+          m0="1.28210" mWidth="0.02420" mMin="1.20000" mMax="1.50000"> 
+ <channel onMode="1" bRatio="0.1200000" products="9000211 -211"/> 
+ <channel onMode="1" bRatio="0.1200000" products="9000111 111"/> 
+ <channel onMode="1" bRatio="0.1200000" products="-9000211 211"/> 
+ <channel onMode="1" bRatio="0.0800000" products="221 211 -211"/> 
+ <channel onMode="1" bRatio="0.0800000" products="221 111 111"/> 
+ <channel onMode="1" bRatio="0.1100000" products="113 211 -211"/> 
+ <channel onMode="1" bRatio="0.0740000" products="213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0740000" products="113 111 111"/> 
+ <channel onMode="1" bRatio="0.0740000" products="-213 211 111"/> 
+ <channel onMode="1" bRatio="0.0230000" products="321 -321 111"/> 
+ <channel onMode="1" bRatio="0.0230000" products="321 -311 -211"/> 
+ <channel onMode="1" bRatio="0.0230000" products="311 -311 111"/> 
+ <channel onMode="1" bRatio="0.0230000" products="311 -321 211"/> 
+ <channel onMode="1" bRatio="0.0552600" products="113 22"/> 
+ <channel onMode="1" bRatio="0.0007400" products="333 22"/> 
+</particle> 
+ 
+<particle id="20313" name="K_1(1400)0" antiName="K_1(1400)bar0" spinType="3" chargeType="0" colType="0" 
+          m0="1.40300" mWidth="0.17400" mMin="1.10000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.6270000" products="323 -211"/> 
+ <channel onMode="1" bRatio="0.3130000" products="313 111"/> 
+ <channel onMode="1" bRatio="0.0200000" products="321 -213"/> 
+ <channel onMode="1" bRatio="0.0100000" products="311 113"/> 
+ <channel onMode="1" bRatio="0.0200000" products="311 10221"/> 
+ <channel onMode="1" bRatio="0.0100000" products="311 223"/> 
+</particle> 
+ 
+<particle id="20323" name="K_1(1400)+" antiName="K_1(1400)-" spinType="3" chargeType="3" colType="0" 
+          m0="1.40300" mWidth="0.17400" mMin="1.10000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.6270000" products="313 211"/> 
+ <channel onMode="1" bRatio="0.3130000" products="323 111"/> 
+ <channel onMode="1" bRatio="0.0200000" products="311 213"/> 
+ <channel onMode="1" bRatio="0.0100000" products="321 113"/> 
+ <channel onMode="1" bRatio="0.0200000" products="321 10221"/> 
+ <channel onMode="1" bRatio="0.0100000" products="321 223"/> 
+</particle> 
+ 
+<particle id="20333" name="f_1(1420)" spinType="3" chargeType="0" colType="0" 
+          m0="1.42640" mWidth="0.05490" mMin="1.40000" mMax="1.80000"> 
+ <channel onMode="1" bRatio="0.2500000" products="313 -311"/> 
+ <channel onMode="1" bRatio="0.2500000" products="-313 311"/> 
+ <channel onMode="1" bRatio="0.2500000" products="323 -321"/> 
+ <channel onMode="1" bRatio="0.2500000" products="-323 321"/> 
+</particle> 
+ 
+<particle id="20413" name="D*_1+" antiName="D*_1-" spinType="3" chargeType="3" colType="0" 
+          m0="2.42700" mWidth="0.38400" mMin="2.15000" mMax="3.00000"> 
+ <channel onMode="1" bRatio="0.6670000" products="423 211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="413 111"/> 
+</particle> 
+ 
+<particle id="20423" name="D*_10" antiName="D*_1bar0" spinType="3" chargeType="0" colType="0" 
+          m0="2.42700" mWidth="0.38400" mMin="2.15000" mMax="3.00000"> 
+ <channel onMode="1" bRatio="0.6670000" products="413 -211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="423 111"/> 
+</particle> 
+ 
+<particle id="20433" name="D*_1s+" antiName="D*_1s-" spinType="3" chargeType="3" colType="0" 
+          m0="2.45960" mWidth="0.03000" mMin="2.40000" mMax="2.60000"> 
+ <channel onMode="1" bRatio="0.7600000" products="433 111"/> 
+ <channel onMode="1" bRatio="0.2400000" products="433 22"/> 
+</particle> 
+ 
+<particle id="20443" name="chi_1c" spinType="3" chargeType="0" colType="0" 
+          m0="3.51066" mWidth="0.00086" mMin="3.50176" mMax="3.51956"> 
+ <channel onMode="1" bRatio="0.3560000" products="443 22"/> 
+ <channel onMode="1" bRatio="0.0000100" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0000100" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0016000" products="313 -313"/> 
+ <channel onMode="1" bRatio="0.0000720" products="2212 -2212"/> 
+ <channel onMode="1" bRatio="0.0003000" products="3122 -3122"/> 
+ <channel onMode="1" bRatio="0.0020000" products="211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0020000" products="213 -211 111"/> 
+ <channel onMode="1" bRatio="0.0020000" products="-213 211 111"/> 
+ <channel onMode="1" bRatio="0.0025000" products="321 311 -211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="321 -313 -211"/> 
+ <channel onMode="1" bRatio="0.0025000" products="-321 311 211"/> 
+ <channel onMode="1" bRatio="0.0002000" products="-321 313 211"/> 
+ <channel onMode="1" bRatio="0.0009000" products="323 311 -211"/> 
+ <channel onMode="1" bRatio="0.0009000" products="-323 311 211"/> 
+ <channel onMode="1" bRatio="0.0062000" products="211 211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0008000" products="310 310 211 -211"/> 
+ <channel onMode="1" bRatio="0.0004000" products="321 321 -321 -321"/> 
+ <channel onMode="1" bRatio="0.0038000" products="321 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0003000" products="321 -321 310 310"/> 
+ <channel onMode="1" bRatio="0.0005000" products="2212 -2212 211 -211"/> 
+ <channel onMode="1" bRatio="0.0058000" products="211 211 211 -211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.6110080" meMode="52" products="83 -83"/> 
+</particle> 
+ 
+<particle id="20513" name="B*_10" antiName="B*_1bar0" spinType="3" chargeType="0" colType="0" 
+          m0="5.78000" mWidth="0.05000" mMin="5.68000" mMax="5.88000"> 
+ <channel onMode="1" bRatio="0.6670000" products="523 -211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="513 111"/> 
+</particle> 
+ 
+<particle id="20523" name="B*_1+" antiName="B*_1-" spinType="3" chargeType="3" colType="0" 
+          m0="5.78000" mWidth="0.05000" mMin="5.68000" mMax="5.88000"> 
+ <channel onMode="1" bRatio="0.6670000" products="513 211"/> 
+ <channel onMode="1" bRatio="0.3330000" products="523 111"/> 
+</particle> 
+ 
+<particle id="20533" name="B*_1s0" antiName="B*_1sbar0" spinType="3" chargeType="0" colType="0" 
+          m0="6.02000" mWidth="0.05000" mMin="5.92000" mMax="6.12000"> 
+ <channel onMode="1" bRatio="0.5000000" products="523 -321"/> 
+ <channel onMode="1" bRatio="0.5000000" products="513 -311"/> 
+</particle> 
+ 
+<particle id="20543" name="B*_1c+" antiName="B*_1c-" spinType="3" chargeType="3" colType="0" 
+          m0="7.30000" mWidth="0.05000" mMin="7.20000" mMax="7.40000"> 
+ <channel onMode="1" bRatio="0.5000000" products="513 411"/> 
+ <channel onMode="1" bRatio="0.5000000" products="523 421"/> 
+</particle> 
+ 
+<particle id="20553" name="chi_1b" spinType="3" chargeType="0" colType="0" 
+          m0="9.89280"> 
+ <channel onMode="1" bRatio="0.3500000" products="553 22"/> 
+ <channel onMode="1" bRatio="0.6500000" meMode="91" products="21 21"/> 
+</particle> 
+ 
+<particle id="23122" name="Lambda(1600)0" antiName="Lambda(1600)bar0" spinType="2" chargeType="0" colType="0" 
+          m0="1.60000" mWidth="0.15000" mMin="1.42000" mMax="2.20000"> 
+ <channel onMode="1" bRatio="0.1760000" products="2212 -321"/> 
+ <channel onMode="1" bRatio="0.1760000" products="2112 -311"/> 
+ <channel onMode="1" bRatio="0.2160000" products="3222 -211"/> 
+ <channel onMode="1" bRatio="0.2160000" products="3112 211"/> 
+ <channel onMode="1" bRatio="0.2160000" products="3212 111"/> 
+</particle> 
+ 
+<particle id="30313" name="K*(1680)0" antiName="K*(1680)bar0" spinType="3" chargeType="0" colType="0" 
+          m0="1.71700" mWidth="0.32000" mMin="1.05000" mMax="2.50000"> 
+ <channel onMode="1" bRatio="0.2580000" products="321 -211"/> 
+ <channel onMode="1" bRatio="0.1290000" products="311 111"/> 
+ <channel onMode="1" bRatio="0.2093000" products="323 -211"/> 
+ <channel onMode="1" bRatio="0.1047000" products="313 111"/> 
+ <channel onMode="1" bRatio="0.1993000" products="-213 321"/> 
+ <channel onMode="1" bRatio="0.0997000" products="113 311"/> 
+</particle> 
+ 
+<particle id="30323" name="K*(1680)+" antiName="K*(1680)-" spinType="3" chargeType="3" colType="0" 
+          m0="1.71700" mWidth="0.32000" mMin="1.05000" mMax="2.50000"> 
+ <channel onMode="1" bRatio="0.2580000" products="311 211"/> 
+ <channel onMode="1" bRatio="0.1290000" products="321 111"/> 
+ <channel onMode="1" bRatio="0.2093000" products="313 211"/> 
+ <channel onMode="1" bRatio="0.1047000" products="323 111"/> 
+ <channel onMode="1" bRatio="0.1993000" products="213 311"/> 
+ <channel onMode="1" bRatio="0.0997000" products="113 321"/> 
+</particle> 
+ 
+<particle id="30443" name="psi(3770)" spinType="3" chargeType="0" colType="0" 
+          m0="3.77315" mWidth="0.02720" mMin="3.54110" mMax="4.00110"> 
+ <channel onMode="1" bRatio="0.4243000" products="411 -411"/> 
+ <channel onMode="1" bRatio="0.5723000" products="421 -421"/> 
+ <channel onMode="1" bRatio="0.0034000" products="443 211 -211"/> 
+</particle> 
+ 
+<particle id="33122" name="Lambda(1670)0" antiName="Lambda(1670)bar0" spinType="2" chargeType="0" colType="0" 
+          m0="1.67000" mWidth="0.03500" mMin="1.42000" mMax="2.00000"> 
+ <channel onMode="1" bRatio="0.1000000" products="2212 -321"/> 
+ <channel onMode="1" bRatio="0.1000000" products="2112 -311"/> 
+ <channel onMode="1" bRatio="0.1600000" products="3222 -211"/> 
+ <channel onMode="1" bRatio="0.1600000" products="3112 211"/> 
+ <channel onMode="1" bRatio="0.1600000" products="3212 111"/> 
+ <channel onMode="1" bRatio="0.3200000" products="3122 221"/> 
+</particle> 
+ 
+<particle id="100113" name="rho(1450)0" spinType="3" chargeType="0" colType="0" 
+          m0="1.46500" mWidth="0.40000" mMin="1.00000" mMax="2.20000"> 
+ <channel onMode="1" bRatio="0.4000000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.3500000" products="211 -211 211 -211"/> 
+ <channel onMode="1" bRatio="0.1500000" products="211 -211 111 111"/> 
+ <channel onMode="1" bRatio="0.1000000" products="111 111 111 111"/> 
+</particle> 
+ 
+<particle id="100213" name="rho(1450)+" antiName="rho(1450)-" spinType="3" chargeType="3" colType="0" 
+          m0="1.46500" mWidth="0.40000" mMin="1.00000" mMax="2.20000"> 
+ <channel onMode="1" bRatio="0.4000000" products="211 111"/> 
+ <channel onMode="1" bRatio="0.4000000" products="211 211 -211 111"/> 
+ <channel onMode="1" bRatio="0.2000000" products="211 111 111 111"/> 
+</particle> 
+ 
+<particle id="100441" name="eta_c(2S)" spinType="1" chargeType="0" colType="0" 
+          m0="3.63890" mWidth="0.01000" mMin="3.49800" mMax="3.77800"> 
+ <channel onMode="1" bRatio="0.0190000" products="321 -311 -211"/> 
+ <channel onMode="1" bRatio="0.0190000" products="-321 311 211"/> 
+ <channel onMode="1" bRatio="0.0095000" products="111 321 -321"/> 
+ <channel onMode="1" bRatio="0.0095000" products="311 -311 111"/> 
+ <channel onMode="1" bRatio="0.9430000" meMode="52" products="83 -83"/> 
+</particle> 
+ 
+<particle id="100443" name="psi(2S)" spinType="3" chargeType="0" colType="0" 
+          m0="3.68611" mWidth="0.00030" mMin="3.68269" mMax="3.68949"> 
+ <channel onMode="1" bRatio="0.0073500" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0073000" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0028000" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0000080" products="113 111"/> 
+ <channel onMode="1" bRatio="0.0000800" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.0000080" products="213 -211"/> 
+ <channel onMode="1" bRatio="0.0000080" products="-213 211"/> 
+ <channel onMode="1" bRatio="0.0000300" products="221 113"/> 
+ <channel onMode="1" bRatio="0.0000250" products="223 111"/> 
+ <channel onMode="1" bRatio="0.0000010" products="223 221"/> 
+ <channel onMode="1" bRatio="0.0002100" products="225 22"/> 
+ <channel onMode="1" bRatio="0.0000520" products="310 130"/> 
+ <channel onMode="1" bRatio="0.0000460" products="313 311"/> 
+ <channel onMode="1" bRatio="0.0000460" products="-313 311"/> 
+ <channel onMode="1" bRatio="0.0001000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0000065" products="323 -321"/> 
+ <channel onMode="1" bRatio="0.0000065" products="-323 321"/> 
+ <channel onMode="1" bRatio="0.0001500" products="331 22"/> 
+ <channel onMode="1" bRatio="0.0000010" products="333 111"/> 
+ <channel onMode="1" bRatio="0.0000200" products="333 221"/> 
+ <channel onMode="1" bRatio="0.0032000" products="441 22"/> 
+ <channel onMode="1" bRatio="0.0013000" products="443 111"/> 
+ <channel onMode="1" bRatio="0.0324000" products="443 221"/> 
+ <channel onMode="1" bRatio="0.0933000" products="445 22"/> 
+ <channel onMode="1" bRatio="0.0002100" products="2212 -2212"/> 
+ <channel onMode="1" bRatio="0.0001300" products="2224 -2224"/> 
+ <channel onMode="1" bRatio="0.0001800" products="3122 -3122"/> 
+ <channel onMode="1" bRatio="0.0001200" products="3212 -3212"/> 
+ <channel onMode="1" bRatio="0.0001100" products="3224 -3224"/> 
+ <channel onMode="1" bRatio="0.0000900" products="3312 -3312"/> 
+ <channel onMode="1" bRatio="0.0002140" products="10113 111"/> 
+ <channel onMode="1" bRatio="0.0002140" products="10213 -211"/> 
+ <channel onMode="1" bRatio="0.0002140" products="-10213 211"/> 
+ <channel onMode="1" bRatio="0.0010000" products="10323 -321"/> 
+ <channel onMode="1" bRatio="0.0010000" products="-10323 321"/> 
+ <channel onMode="1" bRatio="0.0922000" products="10441 22"/> 
+ <channel onMode="1" bRatio="0.0008000" products="10443 111"/> 
+ <channel onMode="1" bRatio="0.0907000" products="20443 22"/> 
+ <channel onMode="1" bRatio="0.0001640" products="211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0004200" products="211 -211 113"/> 
+ <channel onMode="1" bRatio="0.0001500" products="321 -321 223"/> 
+ <channel onMode="1" bRatio="0.0001500" products="333 211 -211"/> 
+ <channel onMode="1" bRatio="0.0000600" products="333 321 -321"/> 
+ <channel onMode="1" bRatio="0.1658000" products="443 111 111"/> 
+ <channel onMode="1" bRatio="0.3366000" products="443 211 -211"/> 
+ <channel onMode="1" bRatio="0.0001400" products="2212 -2212 111"/> 
+ <channel onMode="1" bRatio="0.0002200" products="310 310 211 -211"/> 
+ <channel onMode="1" bRatio="0.0016000" products="321 -321 211 -211"/> 
+ <channel onMode="1" bRatio="0.0008000" products="2212 -2212 211 -211"/> 
+ <channel onMode="1" bRatio="0.0030000" products="211 211 -211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0001500" products="211 211 211 -211 -211 -211"/> 
+ <channel onMode="1" bRatio="0.0035000" products="211 211 211 -211 -211 -211 111"/> 
+ <channel onMode="1" bRatio="0.0168000" meMode="53" products="83 -83"/> 
+ <channel onMode="1" bRatio="0.1258780" meMode="92" products="21 21 21"/> 
+ <channel onMode="1" bRatio="0.0089380" meMode="92" products="22 21 21"/> 
+</particle> 
+ 
+<particle id="100553" name="Upsilon(2S)" spinType="3" chargeType="0" colType="0" 
+          m0="10.02326" mWidth="0.00003" mMin="10.02297" mMax="10.02357"> 
+ <channel onMode="1" bRatio="0.0191000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0193000" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0170000" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0670000" products="555 22"/> 
+ <channel onMode="1" bRatio="0.0430000" products="10551 22"/> 
+ <channel onMode="1" bRatio="0.0660000" products="20553 22"/> 
+ <channel onMode="1" bRatio="0.0900000" products="553 111 111"/> 
+ <channel onMode="1" bRatio="0.1850000" products="553 211 -211"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="91" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0200000" meMode="91" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0050000" meMode="91" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0200000" meMode="91" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.4276000" meMode="92" products="21 21 21"/> 
+ <channel onMode="1" bRatio="0.0160000" meMode="92" products="22 21 21"/> 
+</particle> 
+ 
+<particle id="200553" name="Upsilon(3S)" spinType="3" chargeType="0" colType="0" 
+          m0="10.3552" mWidth="0.00002" mMin="10.3552" mMax="10.3552"> 
+ <channel onMode="1" bRatio="0.0000000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0379639" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0398795" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0383122" products="553 111 111"/> 
+ <channel onMode="1" bRatio="0.0761019" products="553 211 -211"/> 
+ <channel onMode="1" bRatio="0.0322171" products="100553 111 111"/> 
+ <channel onMode="1" bRatio="0.0491092" products="100553 211 -211"/> 
+ <channel onMode="1" bRatio="0.0870731" products="100553 22 22"/> 
+ <channel onMode="1" bRatio="0.0007488" products="10553 111"/> 
+ <channel onMode="1" bRatio="0.6217021" meMode="92" products="21 21 21"/> 
+ <channel onMode="1" bRatio="0.0168922" meMode="92" products="22 21 21"/> 
+</particle> 
+ 
+<particle id="1000001" name="~d_L" antiName="~d_Lbar" spinType="1" chargeType="-1" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 1"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 3"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -5"/> 
+</particle> 
+ 
+<particle id="1000002" name="~u_L" antiName="~u_Lbar" spinType="1" chargeType="2" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 2"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 4"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -5"/> 
+</particle> 
+ 
+<particle id="1000003" name="~s_L" antiName="~s_Lbar" spinType="1" chargeType="-1" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 1"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 3"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -5"/> 
+</particle> 
+ 
+<particle id="1000004" name="~c_L" antiName="~c_Lbar" spinType="1" chargeType="2" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 2"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 4"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -5"/> 
+</particle> 
+ 
+<particle id="1000005" name="~b_1" antiName="~b_1bar" spinType="1" chargeType="-1" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 1"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 3"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3"/> 
+</particle> 
+ 
+<particle id="1000006" name="~t_1" antiName="~t_1bar" spinType="1" chargeType="2" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 2"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 4"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -5"/> 
+</particle> 
+ 
+<particle id="1000011" name="~e_L-" antiName="~e_L+" spinType="1" chargeType="-3" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000012 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 5"/> 
+</particle> 
+ 
+<particle id="1000012" name="~nu_eL" antiName="~nu_eLbar" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000011 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000011 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 5"/> 
+</particle> 
+ 
+<particle id="1000013" name="~mu_L-" antiName="~mu_L+" spinType="1" chargeType="-3" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 5"/> 
+</particle> 
+ 
+<particle id="1000014" name="~nu_muL" antiName="~nu_muLbar" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000013 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000013 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 5"/> 
+</particle> 
+ 
+<particle id="1000015" name="~tau_1-" antiName="~tau_1+" spinType="1" chargeType="-3" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 5"/> 
+</particle> 
+ 
+<particle id="1000016" name="~nu_tauL" antiName="~nu_tauLbar" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000015 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000015 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 5"/> 
+</particle> 
+ 
+<particle id="1000021" name="~g" spinType="2" chargeType="0" colType="2" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 21"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000006 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 3 5"/> 
+</particle> 
+ 
+<particle id="1000022" name="~chi_10" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="20.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 22"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 23"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 25"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 35"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 3 5"/> 
+</particle> 
+ 
+<particle id="1000023" name="~chi_20" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 22"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 23"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 25"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 35"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 22"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000011 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000011 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000011 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000012 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000012 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000012 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000013 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000013 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000013 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000014 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000014 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000015 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000015 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000015 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000016 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000016 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 16 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 11 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 13 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 15 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 11 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 13 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 15 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000006 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 3 5"/> 
+</particle> 
+ 
+<particle id="1000024" name="~chi_1+" antiName="~chi_1-" spinType="2" chargeType="3" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 24"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000012 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000011 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000011 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000013 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000013 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000015 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000015 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 14 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 14 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 14 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 16 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 16 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 16 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 16 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 16 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 16 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 6 3"/> 
+</particle> 
+ 
+<particle id="1000025" name="~chi_30" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 22"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 23"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 25"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 35"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 22"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 22"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000011 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000011 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000011 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000012 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000012 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000012 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000013 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000013 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000013 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000014 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000014 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000015 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000015 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000015 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000016 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000016 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 16 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 16 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 11 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 13 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 15 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 11 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 13 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 15 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000006 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 3 5"/> 
+</particle> 
+ 
+<particle id="1000035" name="~chi_40" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 22"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 23"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 25"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 35"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 22"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 22"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 22"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 16 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 16 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 16 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 11 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 13 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 15 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 11 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 13 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 15 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000011 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000011 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000011 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000012 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000012 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000012 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000013 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000013 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000013 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000014 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000014 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000015 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000015 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000015 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000016 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000016 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000002 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000002 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000004 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000004 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000006 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000006 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 3 5"/> 
+</particle> 
+ 
+<particle id="1000037" name="~chi_2+" antiName="~chi_2-" spinType="2" chargeType="3" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 24"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 16 -16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000012 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000011 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000011 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000013 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000013 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000015 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000015 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 2 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 2 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 4 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 4 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 6 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 6 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000001 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000001 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000003 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000003 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000005 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2000005 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 14 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 14 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -13 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 14 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 16 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 16 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 16 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 12 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 12 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -11 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 12 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 16 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -15 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 16 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -15 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -15 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 16 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -15 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 12 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -11 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 12 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -11 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -11 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 12 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -11 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 14 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -13 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 14 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -13 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -13 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 14 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -13 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -2 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -4 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -6 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -2 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -4 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -6 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -1 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -1 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -1 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -2 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -1 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -3 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -3 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -4 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -3 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -5 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -5 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 -5 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -6 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 -5 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 6 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -3 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 6 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 6 3"/> 
+</particle> 
+ 
+<particle id="1000039" name="~Gravitino" spinType="4" chargeType="0" colType="0" 
+          m0="1.000e-03"> 
+</particle> 
+ 
+<particle id="1000045" name="~chi_50" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000"> 
+</particle> 
+ 
+<particle id="1000512" name="R0(~b dbar)" antiName="R0(~bbar d)" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000522" name="R-(~b ubar)" antiName="R+(~bbar u)" spinType="2" chargeType="-3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000532" name="R0(~b sbar)" antiName="R0(~bbar s)" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000542" name="R-(~b cbar)" antiName="R+(~bbar c)" spinType="2" chargeType="-3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000552" name="R0(~b bbar)" antiName="R0(~bbar b)" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000612" name="R+(~t dbar)" antiName="R-(~tbar d)" spinType="2" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000622" name="R0(~t ubar)" antiName="R0(~tbar u)" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000632" name="R+(~t sbar)" antiName="R-(~tbar s)" spinType="2" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000642" name="R0(~t cbar)" antiName="R0(~tbar c)" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000652" name="R+(~t bbar)" antiName="R-(~tbar b)" spinType="2" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1000993" name="R0(~g g)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005113" name="R-(~b dd1)" antiName="Rbar+(~b dd1)" spinType="3" chargeType="-3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005211" name="R0(~b ud0)" antiName="Rbar0(~b ud0)" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005213" name="R0(~b ud1)" antiName="Rbar0(~b ud1)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005223" name="R+(~b uu1)" antiName="Rbar-(~b uu1)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005311" name="R-(~b sd0)" antiName="Rbar+(~b sd0)" spinType="1" chargeType="-3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005313" name="R-(~b sd1)" antiName="Rbar+(~b sd1)" spinType="3" chargeType="-3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005321" name="R0(~b su0)" antiName="Rbar0(~b su0)" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005323" name="R0(~b su1)" antiName="Rbar0(~b su1)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1005333" name="R-(~b ss1)" antiName="Rbar+(~b ss1)" spinType="3" chargeType="-3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006113" name="R0(~t dd1)" antiName="Rbar0(~t dd1)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006211" name="R+(~t ud0)" antiName="Rbar-(~t ud0)" spinType="1" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006213" name="R+(~t ud1)" antiName="Rbar-(~t ud1)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006223" name="R++(~t uu1)" antiName="Rbar&#45;&#45;(~t uu1)" spinType="3" chargeType="6" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006311" name="R-(~t sd0)" antiName="Rbar+(~t sd0)" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006313" name="R-(~t sd1)" antiName="Rbar+(~t sd1)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006321" name="R0(~t su0)" antiName="Rbar0(~t su0)" spinType="1" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006323" name="R0(~t su1)" antiName="Rbar0(~t su1)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1006333" name="R0(~t ss1)" antiName="Rbar0(~t ss1)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009002" name="Rtemp(~g q)" antiName="Rtemp(~g qbar)" spinType="2" chargeType="0" colType="1" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009113" name="R0(~g d dbar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009213" name="R+(~g u dbar)" antiName="R-(~g d ubar)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009223" name="R0(~g u ubar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009313" name="R0(~g d sbar)" antiName="R0(~g s dbar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009323" name="R+(~g u sbar)" antiName="R-(~g s ubar)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009333" name="R0(~g s sbar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009413" name="R+(~g c dbar)" antiName="R-(~g d cbar)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009423" name="R0(~g c ubar)" antiName="R0(~g u cbar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009433" name="R+(~g c sbar)" antiName="R-(~g s cbar)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009443" name="R0(~g c cbar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009513" name="R0(~g d bbar)" antiName="R0(~g b dbar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009523" name="R+(~g u bbar)" antiName="R-(~g b ubar)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009533" name="R0(~g s bbar)" antiName="R0(~g b sbar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009543" name="R+(~g c bbar)" antiName="R-(~g b cbar)" spinType="3" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1009553" name="R0(~g b bbar)" spinType="3" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1091114" name="R-(~g ddd)" antiName="Rbar+(~g ddd)" spinType="4" chargeType="-3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1092114" name="R0(~g udd)" antiName="Rbar0(~g udd)" spinType="4" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1092214" name="R+(~g uud)" antiName="Rbar-(~g uud)" spinType="4" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1092224" name="R++(~g uuu)" antiName="Rbar&#45;&#45;(~g uuu)" spinType="4" chargeType="6" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1093114" name="R-(~g sdd)" antiName="Rbar+(~g sdd)" spinType="4" chargeType="-3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1093214" name="R0(~g sud)" antiName="Rbar0(~g sud)" spinType="4" chargeType="0" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1093224" name="R+(~g suu)" antiName="Rbar-(~g suu)" spinType="4" chargeType="3" colType="0" 
+          m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1093314" name="R-(~g ssd)" antiName="Rbar+(~g ssd)" spinType="4" chargeType="-3" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1093324" name="R0(~g ssu)" antiName="Rbar0(~g ssu)" spinType="4" chargeType="0" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1093334" name="R-(~g sss)" antiName="Rbar+(~g sss)" spinType="4" chargeType="-3" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1094114" name="R0(~g cdd)" antiName="Rbar0(~g cdd)" spinType="4" chargeType="0" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1094214" name="R+(~g cud)" antiName="Rbar-(~g cud)" spinType="4" chargeType="3" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1094224" name="R++(~g cuu)" antiName="Rbar&#45;&#45;(~g cuu)" spinType="4" chargeType="6" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1094314" name="R0(~g csd)" antiName="Rbar0(~g csd)" spinType="4" chargeType="0" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1094324" name="R+(~g csu)" antiName="Rbar-(~g csu)" spinType="4" chargeType="3" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1094334" name="R0(~g css)" antiName="Rbar0(~g css)" spinType="4" chargeType="0" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1095114" name="R-(~g bdd)" antiName="Rbar+(~g bdd)" spinType="4" chargeType="-3" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1095214" name="R0(~g bud)" antiName="Rbar0(~g bud)" spinType="4" chargeType="0" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1095224" name="R+(~g buu)" antiName="Rbar-(~g buu)" spinType="4" chargeType="3" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1095314" name="R-(~g bsd)" antiName="Rbar+(~g bsd)" spinType="4" chargeType="-3" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1095324" name="R0(~g bsu)" antiName="Rbar0(~g bsu)" spinType="4" chargeType="0" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="1095334" name="R-(~g bss)" antiName="Rbar+(~g bss)" spinType="4" chargeType="-3" colType="0" 
+           m0="500.00000" tau0="1e-05"> 
+</particle> 
+ 
+<particle id="2000001" name="~d_R" antiName="~d_Rbar" spinType="1" chargeType="-1" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 1"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 3"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -5"/> 
+</particle> 
+ 
+<particle id="2000002" name="~u_R" antiName="~u_Rbar" spinType="1" chargeType="2" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 2"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 4"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -5"/> 
+</particle> 
+ 
+<particle id="2000003" name="~s_R" antiName="~s_Rbar" spinType="1" chargeType="-1" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 1"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 3"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -5"/> 
+</particle> 
+ 
+<particle id="2000004" name="~c_R" antiName="~c_Rbar" spinType="1" chargeType="2" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 2"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 4"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -5"/> 
+</particle> 
+ 
+<particle id="2000005" name="~b_2" antiName="~b_2bar" spinType="1" chargeType="-1" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 1"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 3"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000006 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 -3"/> 
+</particle> 
+ 
+<particle id="2000006" name="~t_2" antiName="~t_2bar" spinType="1" chargeType="2" colType="1" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 2"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 4"/> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000024 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000037 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000002 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000004 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000006 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000002 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000004 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000001 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000003 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000005 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000021 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-3 -5"/> 
+</particle> 
+ 
+<particle id="2000011" name="~e_R-" antiName="~e_R+" spinType="1" chargeType="-3" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000011 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000012 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000012 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000012 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 5"/> 
+</particle> 
+ 
+<particle id="2000012" name="~nu_eR" antiName="~nu_eRbar" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000"> 
+</particle> 
+ 
+<particle id="2000013" name="~mu_R-" antiName="~mu_R+" spinType="1" chargeType="-3" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000013 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000014 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000014 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-16 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 5"/> 
+</particle> 
+ 
+<particle id="2000014" name="~nu_muR" antiName="~nu_muRbar" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000"> 
+</particle> 
+ 
+<particle id="2000015" name="~tau_2-" antiName="~tau_2+" spinType="1" chargeType="-3" colType="0" 
+          m0="500.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" meMode="103" products="1000039 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000024 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1000037 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000022 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000023 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000025 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000035 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 25"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 35"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000015 36"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="1000016 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2000016 -37"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-12 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-14 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-2 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-4 5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-6 5"/> 
+</particle> 
+ 
+<particle id="2000016" name="~nu_tauR" antiName="~nu_tauRbar" spinType="1" chargeType="0" colType="0" 
+          m0="500.00000"> 
+</particle> 
+ 
+<particle id="3000111" name="pi_tc0" spinType="1" chargeType="0" colType="0" 
+          m0="110.00000" mWidth="0.02911" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0174310" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0540480" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.8576940" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0002500" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0705780" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="21 21"/> 
+</particle> 
+ 
+<particle id="3000113" name="rho_tc0" spinType="3" chargeType="0" colType="0" 
+          m0="210.00000" mWidth="0.86860" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1440510" products="24 -24"/> 
+ <channel onMode="1" bRatio="0.3519020" products="24 -3000211"/> 
+ <channel onMode="1" bRatio="0.3519020" products="3000211 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="3000211 -3000211"/> 
+ <channel onMode="1" bRatio="0.0821070" products="22 3000111"/> 
+ <channel onMode="1" bRatio="0.0295660" products="22 3000221"/> 
+ <channel onMode="1" bRatio="0.0015110" products="23 3000111"/> 
+ <channel onMode="1" bRatio="0.0007260" products="23 3000221"/> 
+ <channel onMode="1" bRatio="0.0045180" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0065220" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0045180" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0065220" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.0045130" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0029080" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0009730" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.0029080" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0009730" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.0029080" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0009730" products="16 -16"/> 
+</particle> 
+ 
+<particle id="3000211" name="pi_tc+" antiName="pi_tc-" spinType="1" chargeType="3" colType="0" 
+          m0="110.00000" mWidth="0.01741" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0227480" products="4 -1"/> 
+ <channel onMode="1" bRatio="0.0265760" products="4 -3"/> 
+ <channel onMode="1" bRatio="0.3594860" products="2 -5"/> 
+ <channel onMode="1" bRatio="0.5615810" products="4 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="24 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 12"/> 
+ <channel onMode="1" bRatio="0.0001040" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.0295040" products="-15 16"/> 
+</particle> 
+ 
+<particle id="3000213" name="rho_tc+" antiName="rho_tc-" spinType="3" chargeType="3" colType="0" 
+          m0="210.00000" mWidth="0.62395" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1439820" products="24 23"/> 
+ <channel onMode="1" bRatio="0.4898880" products="24 3000111"/> 
+ <channel onMode="1" bRatio="0.1951000" products="3000211 23"/> 
+ <channel onMode="1" bRatio="0.0000000" products="3000211 3000111"/> 
+ <channel onMode="1" bRatio="0.1143020" products="3000211 22"/> 
+ <channel onMode="1" bRatio="0.0084260" products="24 3000221"/> 
+ <channel onMode="1" bRatio="0.0148680" products="-1 2"/> 
+ <channel onMode="1" bRatio="0.0007630" products="-1 4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-1 6"/> 
+ <channel onMode="1" bRatio="0.0007630" products="-3 2"/> 
+ <channel onMode="1" bRatio="0.0148400" products="-3 4"/> 
+ <channel onMode="1" bRatio="0.0000030" products="-3 6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-5 2"/> 
+ <channel onMode="1" bRatio="0.0000270" products="-5 4"/> 
+ <channel onMode="1" bRatio="0.0019450" products="-5 6"/> 
+ <channel onMode="1" bRatio="0.0050300" products="-11 12"/> 
+ <channel onMode="1" bRatio="0.0050300" products="-13 14"/> 
+ <channel onMode="1" bRatio="0.0050300" products="-15 16"/> 
+</particle> 
+ 
+<particle id="3000221" name="pi'_tc0" spinType="1" chargeType="0" colType="0" 
+          m0="110.00000" mWidth="0.04536" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0111850" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0346810" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.5503540" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0001600" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0452870" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.3583330" products="21 21"/> 
+</particle> 
+ 
+<particle id="3000223" name="omega_tc" spinType="3" chargeType="0" colType="0" 
+          m0="210.00000" mWidth="0.19192" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1337760" products="22 3000111"/> 
+ <channel onMode="1" bRatio="0.0032840" products="23 3000111"/> 
+ <channel onMode="1" bRatio="0.3716900" products="22 3000221"/> 
+ <channel onMode="1" bRatio="0.0068380" products="23 3000221"/> 
+ <channel onMode="1" bRatio="0.0309540" products="24 -3000211"/> 
+ <channel onMode="1" bRatio="0.0309540" products="3000211 -24"/> 
+ <channel onMode="1" bRatio="0.0016300" products="24 -24"/> 
+ <channel onMode="1" bRatio="0.0000000" products="3000211 -3000211"/> 
+ <channel onMode="1" bRatio="0.0472240" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0737370" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0472240" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0737320" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.0471790" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0347610" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0091660" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.0347610" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0091660" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.0347590" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0091660" products="16 -16"/> 
+</particle> 
+ 
+<particle id="3000331" name="eta_tc0" spinType="1" chargeType="0" colType="2" 
+          m0="350.00000" mWidth="0.09511" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.4457810" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.5542190" products="21 21"/> 
+</particle> 
+ 
+<particle id="3100021" name="V8_tc" spinType="1" chargeType="0" colType="2" 
+          m0="500.00000" mWidth="123.27638" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0090690" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0090690" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0090690" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0090690" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.5101470" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.4535760" products="6 -6"/> 
+</particle> 
+ 
+<particle id="3100111" name="pi_22_1_tc" spinType="1" chargeType="0" colType="0" 
+          m0="125.00000" mWidth="0.02296" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="1.0000000" products="21 21"/> 
+</particle> 
+ 
+<particle id="3100113" name="rho_11_tc" spinType="3" chargeType="0" colType="2" 
+          m0="400.00000" mWidth="23.26819" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0011280" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0011280" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0011280" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0011280" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.5710470" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.3822880" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0421530" products="21 21"/> 
+</particle> 
+ 
+<particle id="3200111" name="pi_22_8_tc" spinType="1" chargeType="0" colType="2" 
+          m0="250.00000" mWidth="0.18886" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0000000" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="1.0000000" products="21 21"/> 
+</particle> 
+ 
+<particle id="3200113" name="rho_12_tc" spinType="3" chargeType="0" colType="2" 
+          m0="350.00000" mWidth="2.86306" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0165970" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0165970" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0165970" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0165970" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.9336100" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+</particle> 
+ 
+<particle id="3300113" name="rho_21_tc" spinType="3" chargeType="0" colType="2" 
+          m0="350.00000"> 
+ <channel onMode="1" bRatio="0.0165970" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0165970" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0165970" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0165970" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.9336100" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+</particle> 
+ 
+<particle id="3400113" name="rho_22_tc" spinType="3" chargeType="0" colType="2" 
+          m0="300.00000" mWidth="3.45903" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0551500" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0551500" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0551500" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0551500" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.3446900" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.2289980" products="21 21"/> 
+ <channel onMode="1" bRatio="0.1642080" products="3100111 21"/> 
+ <channel onMode="1" bRatio="0.0415030" products="3200111 21"/> 
+</particle> 
+ 
+<particle id="4000001" name="d*" antiName="d*bar" spinType="2" chargeType="-1" colType="1" 
+          m0="400.00000" mWidth="2.59359" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.8509730" products="21 1"/> 
+ <channel onMode="1" bRatio="0.0054110" products="22 1"/> 
+ <channel onMode="1" bRatio="0.0450250" products="23 1"/> 
+ <channel onMode="1" bRatio="0.0985910" products="-24 2"/> 
+</particle> 
+ 
+<particle id="4000002" name="u*" antiName="u*bar" spinType="2" chargeType="2" colType="1" 
+          m0="400.00000" mWidth="2.59687" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.8498980" products="21 2"/> 
+ <channel onMode="1" bRatio="0.0216170" products="22 2"/> 
+ <channel onMode="1" bRatio="0.0300180" products="23 2"/> 
+ <channel onMode="1" bRatio="0.0984660" products="24 1"/> 
+</particle> 
+ 
+<particle id="4000003" name="s*" antiName="s*bar" spinType="2" chargeType="-1" colType="1" 
+          m0="400.00000" mWidth="2.59359" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.8509730" products="21 3"/> 
+ <channel onMode="1" bRatio="0.0054110" products="22 3"/> 
+ <channel onMode="1" bRatio="0.0450250" products="23 3"/> 
+ <channel onMode="1" bRatio="0.0985910" products="-24 4"/> 
+</particle> 
+ 
+<particle id="4000004" name="c*" antiName="c*bar" spinType="2" chargeType="2" colType="1" 
+          m0="400.00000" mWidth="2.59687" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.8498980" products="21 4"/> 
+ <channel onMode="1" bRatio="0.0216170" products="22 4"/> 
+ <channel onMode="1" bRatio="0.0300180" products="23 4"/> 
+ <channel onMode="1" bRatio="0.0984660" products="24 3"/> 
+</particle> 
+ 
+<particle id="4000005" name="b*" antiName="b*bar" spinType="2" chargeType="-1" colType="1" 
+          m0="400.00000" mWidth="2.59359" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.8509730" products="21 5"/> 
+ <channel onMode="1" bRatio="0.0054110" products="22 5"/> 
+ <channel onMode="1" bRatio="0.0450250" products="23 5"/> 
+ <channel onMode="1" bRatio="0.0985910" products="-24 6"/> 
+</particle> 
+ 
+<particle id="4000006" name="t*" antiName="t*bar" spinType="2" chargeType="2" colType="1" 
+          m0="400.00000" mWidth="2.59687" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.8498980" products="21 6"/> 
+ <channel onMode="1" bRatio="0.0216170" products="22 6"/> 
+ <channel onMode="1" bRatio="0.0300180" products="23 6"/> 
+ <channel onMode="1" bRatio="0.0984660" products="24 5"/> 
+</particle> 
+ 
+<particle id="4000011" name="e*-" antiName="e*bar+" spinType="2" chargeType="-3" colType="0" 
+          m0="400.00000" mWidth="0.42896" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.2944480" products="22 11"/> 
+ <channel onMode="1" bRatio="0.1094500" products="23 11"/> 
+ <channel onMode="1" bRatio="0.5961020" products="-24 12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 16 -16"/> 
+</particle> 
+ 
+<particle id="4000012" name="nu*_e0" antiName="nu*_ebar0" spinType="2" chargeType="0" colType="0" 
+          m0="400.00000" mWidth="0.41912" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.3899060" products="23 12"/> 
+ <channel onMode="1" bRatio="0.6100940" products="24 11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="12 16 -16"/> 
+</particle> 
+ 
+<particle id="4000013" name="mu*-" antiName="mu*bar+" spinType="2" chargeType="-3" colType="0" 
+          m0="400.00000" mWidth="0.42896" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.2944480" products="22 13"/> 
+ <channel onMode="1" bRatio="0.1094500" products="23 13"/> 
+ <channel onMode="1" bRatio="0.5961020" products="-24 14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 16 -16"/> 
+</particle> 
+ 
+<particle id="4000014" name="nu*_mu0" antiName="nu*_mubar0" spinType="2" chargeType="0" colType="0" 
+          m0="400.00000" mWidth="0.41912" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.3899060" products="23 14"/> 
+ <channel onMode="1" bRatio="0.6100940" products="24 13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="14 16 -16"/> 
+</particle> 
+ 
+<particle id="4000015" name="tau*-" antiName="tau*bar+" spinType="2" chargeType="-3" colType="0" 
+          m0="400.00000" mWidth="0.42896" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.2944480" products="22 15"/> 
+ <channel onMode="1" bRatio="0.1094500" products="23 15"/> 
+ <channel onMode="1" bRatio="0.5961020" products="-24 16"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 16 -16"/> 
+</particle> 
+ 
+<particle id="4000016" name="nu*_tau0" antiName="nu*_taubar0" spinType="2" chargeType="0" colType="0" 
+          m0="400.00000" mWidth="0.41912" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.3899060" products="23 16"/> 
+ <channel onMode="1" bRatio="0.6100940" products="24 15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 1 -1"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 2 -2"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 3 -3"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 4 -4"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 5 -5"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 6 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 11 -11"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 12 -12"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 13 -13"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 14 -14"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="16 16 -16"/> 
+</particle> 
+ 
+<particle id="4900001" name="Dv" antiName="Dvbar" spinType="2" chargeType="-1" colType="1" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="1 4900101"/> 
+</particle> 
+ 
+<particle id="4900002" name="Uv" antiName="Uvbar" spinType="2" chargeType="2" colType="1" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="2 4900101"/> 
+</particle> 
+ 
+<particle id="4900003" name="Sv" antiName="Svbar" spinType="2" chargeType="-1" colType="1" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="3 4900101"/> 
+</particle> 
+ 
+<particle id="4900004" name="Cv" antiName="Cvbar" spinType="2" chargeType="2" colType="1" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="4 4900101"/> 
+</particle> 
+ 
+<particle id="4900005" name="Bv" antiName="Bvbar" spinType="2" chargeType="-1" colType="1" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="5 4900101"/> 
+</particle> 
+ 
+<particle id="4900006" name="Tv" antiName="Tvbar" spinType="2" chargeType="2" colType="1" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="6 4900101"/> 
+</particle> 
+ 
+<particle id="4900011" name="Ev" antiName="Evbar" spinType="2" chargeType="-3" colType="0" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="11 4900101"/> 
+</particle> 
+ 
+<particle id="4900012" name="nuEv" antiName="nuEvbar" spinType="2" chargeType="0" colType="0" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="12 4900101"/> 
+</particle> 
+ 
+<particle id="4900013" name="MUv" antiName="MUvbar" spinType="2" chargeType="-3" colType="0" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="13 4900101"/> 
+</particle> 
+ 
+<particle id="4900014" name="nuMUv" antiName="nuMUvbar" spinType="2" chargeType="0" colType="0" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="14 4900101"/> 
+</particle> 
+ 
+<particle id="4900015" name="TAUv" antiName="TAUvbar" spinType="2" chargeType="-3" colType="0" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="15 4900101"/> 
+</particle> 
+ 
+<particle id="4900016" name="nuTAUv" antiName="nuTAUvbar" spinType="2" chargeType="0" colType="0" 
+          m0="400.00000" mWidth="1.00000" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="1.0000000" meMode="103" products="16 4900101"/> 
+</particle> 
+ 
+<particle id="4900021" name="gv" spinType="3" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="4900022" name="gammav" spinType="3" chargeType="0" colType="0" 
+          m0="0.00000"> 
+ <channel onMode="0" bRatio="0.05" meMode="91" products="1 -1"/> 
+ <channel onMode="0" bRatio="0.20" meMode="91" products="2 -2"/> 
+ <channel onMode="0" bRatio="0.05" meMode="91" products="3 -3"/> 
+ <channel onMode="0" bRatio="0.20" meMode="91" products="4 -4"/> 
+ <channel onMode="0" bRatio="0.05" meMode="91" products="5 -5"/> 
+ <channel onMode="0" bRatio="0.15" meMode="91" products="11 -11"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="12 -12"/> 
+ <channel onMode="0" bRatio="0.15" meMode="91" products="13 -13"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="14 -14"/> 
+ <channel onMode="0" bRatio="0.15" meMode="91" products="15 -15"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="16 -16"/> 
+</particle> 
+ 
+<particle id="4900023" name="Zv" spinType="3" chargeType="0" colType="0" 
+          m0="1000.00000" mWidth="20.00000" mMin="100.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.075" meMode="102" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.075" meMode="102" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.075" meMode="102" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.075" meMode="102" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.075" meMode="102" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.075" meMode="102" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.025" meMode="102" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.025" meMode="102" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.025" meMode="102" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.025" meMode="102" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.025" meMode="102" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.025" meMode="102" products="16 -16"/> 
+ <channel onMode="1" bRatio="0.400" meMode="102" products="4900101 -4900101"/> 
+</particle> 
+ 
+<particle id="4900101" name="qv" antiName="qvbar" spinType="1" chargeType="0" colType="0" 
+          m0="100.00000"> 
+</particle> 
+ 
+<particle id="4900111" name="pivDiag" spinType="1" chargeType="0" colType="0" 
+          m0="10.00000"> 
+ <channel onMode="0" bRatio="1.23e-6" meMode="91" products="1 -1"/> 
+ <channel onMode="0" bRatio="4.96e-7" meMode="91" products="2 -2"/> 
+ <channel onMode="0" bRatio="0.000492" meMode="91" products="3 -3"/> 
+ <channel onMode="0" bRatio="0.079384" meMode="91" products="4 -4"/> 
+ <channel onMode="0" bRatio="0.8679713" meMode="91" products="5 -5"/> 
+ <channel onMode="0" bRatio="4.0e-9" meMode="91" products="11 -11"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="12 -12"/> 
+ <channel onMode="0" bRatio="0.000184" meMode="91" products="13 -13"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="14 -14"/> 
+ <channel onMode="0" bRatio="0.051967" meMode="91" products="15 -15"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="16 -16"/> 
+</particle> 
+ 
+<particle id="4900113" name="rhovDiag" spinType="3" chargeType="0" colType="0" 
+          m0="10.00000"> 
+ <channel onMode="0" bRatio="0.05" meMode="91" products="1 -1"/> 
+ <channel onMode="0" bRatio="0.20" meMode="91" products="2 -2"/> 
+ <channel onMode="0" bRatio="0.05" meMode="91" products="3 -3"/> 
+ <channel onMode="0" bRatio="0.20" meMode="91" products="4 -4"/> 
+ <channel onMode="0" bRatio="0.05" meMode="91" products="5 -5"/> 
+ <channel onMode="0" bRatio="0.15" meMode="91" products="11 -11"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="12 -12"/> 
+ <channel onMode="0" bRatio="0.15" meMode="91" products="13 -13"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="14 -14"/> 
+ <channel onMode="0" bRatio="0.15" meMode="91" products="15 -15"/> 
+ <channel onMode="0" bRatio="0.00" meMode="91" products="16 -16"/> 
+</particle> 
+ 
+<particle id="4900211" name="pivUp" antiName="pivDn" spinType="1" chargeType="0" colType="0" 
+          m0="10.00000"> 
+</particle> 
+ 
+<particle id="4900213" name="rhovUp" antiName="rhovDn" spinType="3" chargeType="0" colType="0" 
+          m0="10.00000"> 
+</particle> 
+ 
+<particle id="4900991" name="ggv" spinType="1" chargeType="0" colType="0" 
+          m0="1.00000"> 
+</particle> 
+ 
+<particle id="5000023" name="Z_KK" spinType="3" chargeType="0" colType="0" 
+          m0="4000.00000" mWidth="240.00000" mMin="1000.00000" mMax="0.00000"> 
+</particle> 
+ 
+<particle id="5000039" name="Graviton" spinType="5" chargeType="0" colType="0" 
+           m0="0.00000"> 
+</particle> 
+ 
+<particle id="5100021" name="KKgluon*" spinType="3" chargeType="0" colType="2" 
+           m0="1.000e+03" mWidth="1.7e02" mMin="5.000e+01" mMax="0.000e+00"> 
+ <channel onMode="1" bRatio="0.005" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.005" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.005" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.005" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.055" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.925" products="6 -6"/> 
+</particle> 
+ 
+<particle id="5100039" name="Graviton*" spinType="5" chargeType="0" colType="0" 
+          m0="1.000e+03" mWidth="1.415e-01" mMin="5.000e+01" mMax="0.000e+00"> 
+ <channel onMode="1" bRatio="0.0633000" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.0633000" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.0633000" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.0632990" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.0632950" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0562810" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0204950" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0204950" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.0204950" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0204950" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.0204950" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0204950" products="16 -16"/> 
+ <channel onMode="1" bRatio="0.3279190" products="21 21"/> 
+ <channel onMode="1" bRatio="0.0409900" products="22 22"/> 
+ <channel onMode="1" bRatio="0.0452360" products="23 23"/> 
+ <channel onMode="1" bRatio="0.0901120" products="24 -24"/> 
+ <channel onMode="1" bRatio="0.0"       products="25 25"/> 
+</particle> 
+ 
+<particle id="9000111" name="a_0(980)0" spinType="1" chargeType="0" colType="0" 
+          m0="0.98350" mWidth="0.06000" mMin="0.70000" mMax="1.50000"> 
+ <channel onMode="1" bRatio="0.9000000" products="221 111"/> 
+ <channel onMode="1" bRatio="0.0250000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0250000" products="310 310"/> 
+ <channel onMode="1" bRatio="0.0500000" products="321 -321"/> 
+</particle> 
+ 
+<particle id="9000211" name="a_0(980)+" antiName="a_0(980)-" spinType="1" chargeType="3" colType="0" 
+          m0="0.98350" mWidth="0.06000" mMin="0.70000" mMax="1.50000"> 
+ <channel onMode="1" bRatio="0.9000000" products="221 211"/> 
+ <channel onMode="1" bRatio="0.1000000" products="321 311"/> 
+</particle> 
+ 
+<particle id="9010221" name="f_0(980)" spinType="1" chargeType="0" colType="0" 
+          m0="1.00000" tau0="4e-12"> 
+ <channel onMode="1" bRatio="0.5200000" products="211 -211"/> 
+ <channel onMode="1" bRatio="0.2600000" products="111 111"/> 
+ <channel onMode="1" bRatio="0.1100000" products="321 -321"/> 
+ <channel onMode="1" bRatio="0.0550000" products="130 130"/> 
+ <channel onMode="1" bRatio="0.0550000" products="310 310"/> 
+</particle> 
+ 
+<particle id="9900012" name="nu_Re" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="0.00098" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1987400" products="11 -1 2"/> 
+ <channel onMode="1" bRatio="0.0102040" products="11 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000030" products="11 -1 6"/> 
+ <channel onMode="1" bRatio="0.0102050" products="11 -3 2"/> 
+ <channel onMode="1" bRatio="0.1983560" products="11 -3 4"/> 
+ <channel onMode="1" bRatio="0.0001510" products="11 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000060" products="11 -5 2"/> 
+ <channel onMode="1" bRatio="0.0003670" products="11 -5 4"/> 
+ <channel onMode="1" bRatio="0.0819670" products="11 -5 6"/> 
+ <channel onMode="1" bRatio="0.1987400" products="-11 1 -2"/> 
+ <channel onMode="1" bRatio="0.0102040" products="-11 1 -4"/> 
+ <channel onMode="1" bRatio="0.0000030" products="-11 1 -6"/> 
+ <channel onMode="1" bRatio="0.0102050" products="-11 3 -2"/> 
+ <channel onMode="1" bRatio="0.1983560" products="-11 3 -4"/> 
+ <channel onMode="1" bRatio="0.0001510" products="-11 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000060" products="-11 5 -2"/> 
+ <channel onMode="1" bRatio="0.0003670" products="-11 5 -4"/> 
+ <channel onMode="1" bRatio="0.0819670" products="-11 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 -13 9900014"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 13 9900014"/> 
+ <channel onMode="1" bRatio="0.0000000" products="11 -15 9900016"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-11 15 9900016"/> 
+</particle> 
+ 
+<particle id="9900014" name="nu_Rmu" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="0.00098" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1987760" products="13 -1 2"/> 
+ <channel onMode="1" bRatio="0.0102060" products="13 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000030" products="13 -1 6"/> 
+ <channel onMode="1" bRatio="0.0102070" products="13 -3 2"/> 
+ <channel onMode="1" bRatio="0.1983900" products="13 -3 4"/> 
+ <channel onMode="1" bRatio="0.0001510" products="13 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000060" products="13 -5 2"/> 
+ <channel onMode="1" bRatio="0.0003670" products="13 -5 4"/> 
+ <channel onMode="1" bRatio="0.0818930" products="13 -5 6"/> 
+ <channel onMode="1" bRatio="0.1987760" products="-13 1 -2"/> 
+ <channel onMode="1" bRatio="0.0102060" products="-13 1 -4"/> 
+ <channel onMode="1" bRatio="0.0000030" products="-13 1 -6"/> 
+ <channel onMode="1" bRatio="0.0102070" products="-13 3 -2"/> 
+ <channel onMode="1" bRatio="0.1983900" products="-13 3 -4"/> 
+ <channel onMode="1" bRatio="0.0001510" products="-13 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000060" products="-13 5 -2"/> 
+ <channel onMode="1" bRatio="0.0003670" products="-13 5 -4"/> 
+ <channel onMode="1" bRatio="0.0818930" products="-13 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 -11 9900012"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 11 9900012"/> 
+ <channel onMode="1" bRatio="0.0000000" products="13 -15 9900016"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-13 15 9900016"/> 
+</particle> 
+ 
+<particle id="9900016" name="nu_Rtau" spinType="2" chargeType="0" colType="0" 
+          m0="500.00000" mWidth="0.00097" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.1993440" products="15 -1 2"/> 
+ <channel onMode="1" bRatio="0.0102340" products="15 -1 4"/> 
+ <channel onMode="1" bRatio="0.0000030" products="15 -1 6"/> 
+ <channel onMode="1" bRatio="0.0102360" products="15 -3 2"/> 
+ <channel onMode="1" bRatio="0.1989280" products="15 -3 4"/> 
+ <channel onMode="1" bRatio="0.0001490" products="15 -3 6"/> 
+ <channel onMode="1" bRatio="0.0000060" products="15 -5 2"/> 
+ <channel onMode="1" bRatio="0.0003680" products="15 -5 4"/> 
+ <channel onMode="1" bRatio="0.0807330" products="15 -5 6"/> 
+ <channel onMode="1" bRatio="0.1993440" products="-15 1 -2"/> 
+ <channel onMode="1" bRatio="0.0102340" products="-15 1 -4"/> 
+ <channel onMode="1" bRatio="0.0000030" products="-15 1 -6"/> 
+ <channel onMode="1" bRatio="0.0102360" products="-15 3 -2"/> 
+ <channel onMode="1" bRatio="0.1989280" products="-15 3 -4"/> 
+ <channel onMode="1" bRatio="0.0001490" products="-15 3 -6"/> 
+ <channel onMode="1" bRatio="0.0000060" products="-15 5 -2"/> 
+ <channel onMode="1" bRatio="0.0003680" products="-15 5 -4"/> 
+ <channel onMode="1" bRatio="0.0807330" products="-15 5 -6"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 -11 9900012"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 11 9900012"/> 
+ <channel onMode="1" bRatio="0.0000000" products="15 -13 9900014"/> 
+ <channel onMode="1" bRatio="0.0000000" products="-15 13 9900014"/> 
+</particle> 
+ 
+<particle id="9900020" name="gam_diff0" spinType="3" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="9900023" name="Z_R0" spinType="3" chargeType="0" colType="0" 
+          m0="1.200e+03" mWidth="2.672e+01" mMin="5.000e+01" mMax="0.000e+00"> 
+ <channel onMode="1" bRatio="0.1847380" products="1 -1"/> 
+ <channel onMode="1" bRatio="0.1045880" products="2 -2"/> 
+ <channel onMode="1" bRatio="0.1847380" products="3 -3"/> 
+ <channel onMode="1" bRatio="0.1045870" products="4 -4"/> 
+ <channel onMode="1" bRatio="0.1847310" products="5 -5"/> 
+ <channel onMode="1" bRatio="0.0958200" products="6 -6"/> 
+ <channel onMode="1" bRatio="0.0229020" products="11 -11"/> 
+ <channel onMode="1" bRatio="0.0084290" products="12 -12"/> 
+ <channel onMode="1" bRatio="0.0156020" products="9900012 9900012"/> 
+ <channel onMode="1" bRatio="0.0229020" products="13 -13"/> 
+ <channel onMode="1" bRatio="0.0084290" products="14 -14"/> 
+ <channel onMode="1" bRatio="0.0156020" products="9900014 9900014"/> 
+ <channel onMode="1" bRatio="0.0229020" products="15 -15"/> 
+ <channel onMode="1" bRatio="0.0084290" products="16 -16"/> 
+ <channel onMode="1" bRatio="0.0156020" products="9900016 9900016"/> 
+</particle> 
+ 
+<particle id="9900024" name="W_R+" antiName="W_R-" spinType="3" chargeType="3" colType="0" 
+          m0="750.00000" mWidth="21.74916" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.2895900" products="-1 2"/> 
+ <channel onMode="1" bRatio="0.0148700" products="-1 4"/> 
+ <channel onMode="1" bRatio="0.0000080" products="-1 6"/> 
+ <channel onMode="1" bRatio="0.0148700" products="-3 2"/> 
+ <channel onMode="1" bRatio="0.2890610" products="-3 4"/> 
+ <channel onMode="1" bRatio="0.0004920" products="-3 6"/> 
+ <channel onMode="1" bRatio="0.0000090" products="-5 2"/> 
+ <channel onMode="1" bRatio="0.0005360" products="-5 4"/> 
+ <channel onMode="1" bRatio="0.2791100" products="-5 6"/> 
+ <channel onMode="1" bRatio="0.0371510" products="-11 9900012"/> 
+ <channel onMode="1" bRatio="0.0371510" products="-13 9900014"/> 
+ <channel onMode="1" bRatio="0.0371500" products="-15 9900016"/> 
+</particle> 
+ 
+<particle id="9900041" name="H_L++" antiName="H_L&#45;&#45;" spinType="1" chargeType="6" colType="0" 
+          m0="200.00000" mWidth="0.88159" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0902660" products="-11 -11"/> 
+ <channel onMode="1" bRatio="0.0018050" products="-11 -13"/> 
+ <channel onMode="1" bRatio="0.0018050" products="-11 -15"/> 
+ <channel onMode="1" bRatio="0.0902660" products="-13 -13"/> 
+ <channel onMode="1" bRatio="0.0018050" products="-13 -15"/> 
+ <channel onMode="1" bRatio="0.8122630" products="-15 -15"/> 
+ <channel onMode="1" bRatio="0.0017900" products="24 24"/> 
+</particle> 
+ 
+<particle id="9900042" name="H_R++" antiName="H_R&#45;&#45;" spinType="1" chargeType="6" colType="0" 
+          m0="200.00000" mWidth="0.88001" mMin="50.00000" mMax="0.00000"> 
+ <channel onMode="1" bRatio="0.0904280" products="-11 -11"/> 
+ <channel onMode="1" bRatio="0.0018090" products="-11 -13"/> 
+ <channel onMode="1" bRatio="0.0018080" products="-11 -15"/> 
+ <channel onMode="1" bRatio="0.0904280" products="-13 -13"/> 
+ <channel onMode="1" bRatio="0.0018080" products="-13 -15"/> 
+ <channel onMode="1" bRatio="0.8137200" products="-15 -15"/> 
+ <channel onMode="1" bRatio="0.0000000" products="9900024 9900024"/> 
+</particle> 
+ 
+<particle id="9900110" name="rho_diff0" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="9900210" name="pi_diffr+" antiName="pi_diffr-" spinType="0" chargeType="3" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="9900220" name="omega_di" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="9900330" name="phi_diff" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="9900440" name="J/psi_di" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="9902110" name="n_diffr0" antiName="n_diffrbar0" spinType="0" chargeType="0" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="9902210" name="p_diffr+" antiName="p_diffrbar-" spinType="0" chargeType="3" colType="0" 
+          m0="0.00000"> 
+</particle> 
+ 
+<particle id="9940003" name="J/psi[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="3.29692" mWidth="0.0" mMin="3.29692" mMax="3.29692"> 
+ <channel onMode="1" bRatio="1.0000000" products="443 21"/> 
+</particle> 
+ 
+<particle id="9940005" name="chi_2c[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="3.7562" mWidth="0.0" mMin="3.7562" mMax="3.7562"> 
+ <channel onMode="1" bRatio="1.0000000" products="445 21"/> 
+</particle> 
+ 
+<particle id="9940011" name="chi_0c[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="3.61475" mWidth="0.0" mMin="3.61475" mMax="3.61475"> 
+ <channel onMode="1" bRatio="1.0000000" products="10441 21"/> 
+</particle> 
+ 
+<particle id="9940023" name="chi_1c[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="3.71066" mWidth="0.0" mMin="3.71066" mMax="3.71066"> 
+ <channel onMode="1" bRatio="1.0000000" products="20443 21"/> 
+</particle> 
+ 
+<particle id="9940103" name="psi(2S)[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="3.88611" mWidth="0.0" mMin="3.88611" mMax="3.88611"> 
+ <channel onMode="1" bRatio="1.0000000" products="100443 21"/> 
+</particle> 
+ 
+<particle id="9941003" name="J/psi[1S0(8)]" spinType="1" chargeType="0" colType="2" 
+          m0="3.29692" mWidth="0.0" mMin="3.29692" mMax="3.29692"> 
+ <channel onMode="1" bRatio="1.0000000" products="443 21"/> 
+</particle> 
+ 
+<particle id="9941103" name="psi(2S)[1S0(8)]" spinType="1" chargeType="0" colType="2" 
+          m0="3.88611" mWidth="0.0" mMin="3.88611" mMax="3.88611"> 
+ <channel onMode="1" bRatio="1.0000000" products="100443 21"/> 
+</particle> 
+ 
+<particle id="9942003" name="J/psi[3PJ(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="3.29692" mWidth="0.0" mMin="3.29692" mMax="3.29692"> 
+ <channel onMode="1" bRatio="1.0000000" products="443 21"/> 
+</particle> 
+ 
+<particle id="9942033" name="psi(3770)[3PJ(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="3.97315" mWidth="0.0" mMin="3.97315" mMax="3.97315"> 
+ <channel onMode="1" bRatio="1.0000000" products="30443 21"/> 
+</particle> 
+ 
+<particle id="9942103" name="psi(2S)[3PJ(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="3.88611" mWidth="0.0" mMin="3.88611" mMax="3.88611"> 
+ <channel onMode="1" bRatio="1.0000000" products="100443 21"/> 
+</particle> 
+ 
+<particle id="9950003" name="Upsilon[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="9.6603" mWidth="0.0" mMin="9.6603" mMax="9.6603"> 
+ <channel onMode="1" bRatio="1.0000000" products="553 21"/> 
+</particle> 
+ 
+<particle id="9950005" name="chi_2b[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="10.1122" mWidth="0.0" mMin="10.1122" mMax="10.1122"> 
+ <channel onMode="1" bRatio="1.0000000" products="555 21"/> 
+</particle> 
+ 
+<particle id="9950011" name="chi_0b[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="10.0594" mWidth="0.0" mMin="10.0594" mMax="10.0594"> 
+ <channel onMode="1" bRatio="1.0000000" products="10551 21"/> 
+</particle> 
+ 
+<particle id="9950023" name="chi_1b[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="10.09280" mWidth="0.0" mMin="10.09280" mMax="10.09280"> 
+ <channel onMode="1" bRatio="1.0000000" products="20553 21"/> 
+</particle> 
+ 
+<particle id="9950103" name="Upsilon(2S)[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="10.22326" mWidth="0.0" mMin="10.22326" mMax="10.22326"> 
+ <channel onMode="1" bRatio="1.0000000" products="100553 21"/> 
+</particle> 
+ 
+<particle id="9950203" name="Upsilon(3S)[3S1(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="10.5552" mWidth="0.0" mMin="10.5552" mMax="10.5552"> 
+ <channel onMode="1" bRatio="1.0000000" products="200553 21"/> 
+</particle> 
+ 
+<particle id="9951003" name="Upsilon[1S0(8)]" spinType="1" chargeType="0" colType="2" 
+          m0="9.6603" mWidth="0.0" mMin="9.6603" mMax="9.6603"> 
+ <channel onMode="1" bRatio="1.0000000" products="553 21"/> 
+</particle> 
+ 
+<particle id="9951103" name="Upsilon(2S)[1S0(8)]" spinType="1" chargeType="0" colType="2" 
+          m0="10.22326" mWidth="0.0" mMin="10.22326" mMax="10.22326"> 
+ <channel onMode="1" bRatio="1.0000000" products="100553 21"/> 
+</particle> 
+ 
+<particle id="9951203" name="Upsilon(3S)[1S0(8)]" spinType="1" chargeType="0" colType="2" 
+          m0="10.5552" mWidth="0.0" mMin="10.5552" mMax="10.5552"> 
+ <channel onMode="1" bRatio="1.0000000" products="200553 21"/> 
+</particle> 
+ 
+<particle id="9952003" name="Upsilon[3PJ(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="9.6603" mWidth="0.0" mMin="9.6603" mMax="9.6603"> 
+ <channel onMode="1" bRatio="1.0000000" products="553 21"/> 
+</particle> 
+ 
+<particle id="9952103" name="Upsilon(2S)[3PJ(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="10.22326" mWidth="0.0" mMin="10.22326" mMax="10.22326"> 
+ <channel onMode="1" bRatio="1.0000000" products="100553 21"/> 
+</particle> 
+ 
+<particle id="9952203" name="Upsilon(3S)[3PJ(8)]" spinType="3" chargeType="0" colType="2" 
+          m0="10.5552" mWidth="0.0" mMin="10.5552" mMax="10.5552"> 
+ <channel onMode="1" bRatio="1.0000000" products="200553 21"/> 
+</particle> 
+ 
+<particle id="1000020040" name="4He" antiName="4Hebar" 
+          spinType="1" chargeType="6" colType="0" m0="3.7284"> 
+</particle> 
+ 
+<particle id="1000030060" name="6Li" antiName="6Libar" 
+          spinType="1" chargeType="9" colType="0" m0="5.6030512"> 
+</particle> 
+ 
+<particle id="1000060120" name="12C" antiName="12Cbar" 
+          spinType="1" chargeType="18" colType="0" m0="11.177929"> 
+</particle> 
+ 
+<particle id="1000080160" name="16O" antiName="16Obar" 
+          spinType="1" chargeType="24" colType="0" m0="14.899168"> 
+</particle> 
+ 
+<particle id="1000290630" name="63Cu" antiName="63Cubar" 
+          spinType="2" chargeType="87" colType="0" m0="58.618646"> 
+</particle> 
+ 
+<particle id="1000541290" name="129Xe" antiName="129Xebar" 
+          spinType="2" chargeType="162" colType="0" m0="120.04645"> 
+</particle> 
+ 
+<particle id="1000791970" name="197Au" antiName="197Aubar" 
+          spinType="2" chargeType="237" colType="0" m0="183.47319"> 
+</particle> 
+ 
+<particle id="1000822080" name="208Pb" antiName="208Pbbar" 
+          spinType="1" chargeType="246" colType="0" m0="193.72902"> 
+</particle> 
+-->
+ 
+</chapter> 
+ 
+<!-- Copyright (C) 2018 Torbjorn Sjostrand --> 
diff --git a/Framework/Particles/ParticleProperties.h b/corsika/framework/core/ParticleProperties.hpp
similarity index 63%
rename from Framework/Particles/ParticleProperties.h
rename to corsika/framework/core/ParticleProperties.hpp
index 7abcc768b5444e15414f6880c6a56aa54b288087..3bba1f509af3e6bc624739a3e42c15d81438b3d9 100644
--- a/Framework/Particles/ParticleProperties.h
+++ b/corsika/framework/core/ParticleProperties.hpp
@@ -18,7 +18,7 @@
 #include <cstdint>
 #include <iosfwd>
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 /**
  *
@@ -27,7 +27,7 @@
  *
  */
 
-namespace corsika::particles {
+namespace corsika {
 
   /**
    * @enum Code
@@ -54,10 +54,7 @@ namespace corsika::particles {
   int constexpr GetNucleusA(Code const);
   int constexpr GetNucleusZ(Code const);
 
-} // namespace corsika::particles
-
-// here we read the implementation of all those objects and function
-#include <corsika/particles/GeneratedParticleProperties.inc>
+#include <corsika/framework/core/GeneratedParticleProperties.inc>
 
 namespace corsika::particles {
 
@@ -67,14 +64,14 @@ namespace corsika::particles {
   corsika::units::si::HEPMassType constexpr GetMass(Code const p) {
     if (p == Code::Nucleus)
       throw std::runtime_error("Cannot GetMass() of particle::Nucleus -> unspecified");
-    return detail::masses[static_cast<CodeIntType>(p)];
+    return particle::detail::masses[static_cast<CodeIntType>(p)];
   }
 
   /*!
    * returns PDG id
    */
   PDGCode constexpr GetPDG(Code const p) {
-    return detail::pdg_codes[static_cast<CodeIntType>(p)];
+    return particle::detail::pdg_codes[static_cast<CodeIntType>(p)];
   }
 
   /*!
@@ -85,7 +82,7 @@ namespace corsika::particles {
       throw std::runtime_error(
           "Cannot GetChargeNumber() of particle::Nucleus -> unspecified");
     // electric_charges stores charges in units of (e/3), e.g. 3 for a proton
-    return detail::electric_charges[static_cast<CodeIntType>(p)] / 3;
+    return particle::detail::electric_charges[static_cast<CodeIntType>(p)] / 3;
   }
 
   /*!
@@ -98,43 +95,43 @@ namespace corsika::particles {
   }
 
   constexpr std::string const& GetName(Code const p) {
-    return detail::names[static_cast<CodeIntType>(p)];
+    return particle::detail::names[static_cast<CodeIntType>(p)];
   }
 
-  corsika::units::si::TimeType constexpr GetLifetime(Code const p) {
-    return detail::lifetime[static_cast<CodeIntType>(p)] * corsika::units::si::second;
+  inline corsika::units::si::TimeType constexpr GetLifetime(Code const p) {
+    return particle::detail::lifetime[static_cast<CodeIntType>(p)] * corsika::units::si::second;
   }
 
-  bool constexpr IsHadron(Code const p) {
-    return detail::isHadron[static_cast<CodeIntType>(p)];
+  inline bool constexpr IsHadron(Code const p) {
+    return particle::detail::isHadron[static_cast<CodeIntType>(p)];
   }
 
-  bool constexpr IsEM(Code c) {
+  inline bool constexpr IsEM(Code c) {
     return c == Code::Electron || c == Code::Positron || c == Code::Gamma;
   }
 
-  bool constexpr IsMuon(Code c) { return c == Code::MuPlus || c == Code::MuMinus; }
+  inline bool constexpr IsMuon(Code c) { return c == Code::MuPlus || c == Code::MuMinus; }
 
-  bool constexpr IsNeutrino(Code c) {
+  inline bool constexpr IsNeutrino(Code c) {
     return c == Code::NuE || c == Code::NuMu || c == Code::NuTau || c == Code::NuEBar ||
            c == Code::NuMuBar || c == Code::NuTauBar;
   }
 
-  int constexpr GetNucleusA(Code const p) {
+  inline int constexpr GetNucleusA(Code const p) {
     if (p == Code::Nucleus) {
       throw std::runtime_error("GetNucleusA(Code::Nucleus) is impossible!");
     }
-    return detail::nucleusA[static_cast<CodeIntType>(p)];
+    return particle::detail::nucleusA[static_cast<CodeIntType>(p)];
   }
 
-  int constexpr GetNucleusZ(Code const p) {
+  inline int constexpr GetNucleusZ(Code const p) {
     if (p == Code::Nucleus) {
       throw std::runtime_error("GetNucleusZ(Code::Nucleus) is impossible!");
     }
-    return detail::nucleusZ[static_cast<CodeIntType>(p)];
+    return particle::detail::nucleusZ[static_cast<CodeIntType>(p)];
   }
 
-  bool constexpr IsNucleus(Code const p) {
+  inline bool constexpr IsNucleus(Code const p) {
     return (p == Code::Nucleus) || (GetNucleusA(p) != 0);
   }
 
@@ -142,19 +139,27 @@ namespace corsika::particles {
    * the output operator for humand-readable particle codes
    **/
 
-  std::ostream& operator<<(std::ostream&, corsika::particles::Code);
-
-  Code ConvertFromPDG(PDGCode);
+  inline std::ostream& operator<<(std::ostream& stream, corsika::Code const p) {
+    return stream << corsika::GetName(p);
+  }
 
+  inline Code ConvertFromPDG(PDGCode p) {
+    static_assert(particle::detail::conversionArray.size() % 2 == 1);
+    // this will fail, for the strange case where the maxPDG is negative...
+    unsigned int constexpr maxPDG{(particle::detail::conversionArray.size() - 1) >> 1};
+    auto k = static_cast<PDGCodeType>(p);
+    if ((unsigned int)abs(k) <= maxPDG) {
+      return particle::detail::conversionArray[k + maxPDG];
+    } else {
+      return particle::detail::conversionMap.at(p);
+    }
+  }
   /**
    * Get mass of nucleus
    **/
-  corsika::units::si::HEPMassType constexpr GetNucleusMass(const int vA, const int vZ) {
+  inline corsika::units::si::HEPMassType constexpr GetNucleusMass(const int vA, const int vZ) {
     return Proton::GetMass() * vZ + (vA - vZ) * Neutron::GetMass();
   }
 
-  std::initializer_list<Code> constexpr getAllParticles() {
-    return detail::all_particles;
-  }
+} // namespace corsika
 
-} // namespace corsika::particles
diff --git a/Framework/Units/PhysicalConstants.h b/corsika/framework/core/PhysicalConstants.hpp
similarity index 99%
rename from Framework/Units/PhysicalConstants.h
rename to corsika/framework/core/PhysicalConstants.hpp
index f47b917e6919762d7b1c73a950192c086e7afe4b..306f48ebd32830c7f11084dbc5f3de20a4ebca12 100644
--- a/Framework/Units/PhysicalConstants.h
+++ b/corsika/framework/core/PhysicalConstants.hpp
@@ -64,3 +64,4 @@ namespace corsika::units::constants {
   // etc.
 
 } // namespace corsika::units::constants
+
diff --git a/Framework/Units/PhysicalUnits.h b/corsika/framework/core/PhysicalUnits.hpp
similarity index 98%
rename from Framework/Units/PhysicalUnits.h
rename to corsika/framework/core/PhysicalUnits.hpp
index 36a835e7e9e072bcce1db01f8980099d864d9afe..ebbdbcb2e7b8e495d0d2b7ae0af0e70db24d6404 100644
--- a/Framework/Units/PhysicalUnits.h
+++ b/corsika/framework/core/PhysicalUnits.hpp
@@ -8,8 +8,9 @@
 
 #pragma once
 
-#include <corsika/units/PhysicalConstants.h>
+#include <corsika/framework/core/PhysicalConstants.hpp>
 
+//FIXME: What package is this?
 #include <phys/units/io.hpp>
 #include <phys/units/quantity.hpp>
 
diff --git a/Framework/Particles/ParticleProperties.cc b/corsika/framework/core/detail/ParticleProperties.cc
similarity index 100%
rename from Framework/Particles/ParticleProperties.cc
rename to corsika/framework/core/detail/ParticleProperties.cc
diff --git a/corsika/framework/core/pdxml_reader.py b/corsika/framework/core/pdxml_reader.py
new file mode 100755
index 0000000000000000000000000000000000000000..8ce20b80a058cc86090e053ddde888b1902d5db9
--- /dev/null
+++ b/corsika/framework/core/pdxml_reader.py
@@ -0,0 +1,516 @@
+#!/usr/bin/env python3
+
+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
+# for nuclear masses
+mneutron = 0.9395654133 # GeV
+mproton = 0.9382720813 # GeV
+
+namespace = "corsika"
+
+##############################################################
+# 
+# reading xml input data, return line by line particle data
+# 
+def parsePythia(filename):
+    tree = ET.parse(filename)
+    root = tree.getroot()
+    
+    for particle in root.iter("particle"):
+        name = particle.attrib["name"]        
+        antiName = "Unknown"
+        if ("antiName" in particle.attrib):
+            antiName = particle.attrib["antiName"]
+        pdg_id = int(particle.attrib["id"])
+        mass = float(particle.attrib["m0"])  # GeV
+        electric_charge = int(particle.attrib["chargeType"])  # in units of e/3        
+        ctau = 0.
+        if pdg_id in (11, 12, 14, 16, 22, 2212):  # these are the stable particles !
+            ctau = float('Inf')
+        elif 'tau0' in particle.attrib:
+            ctau = float(particle.attrib['tau0'])  # mm / c
+        elif 'mWidth' in particle.attrib:
+            ctau = GeVfm / float(particle.attrib['mWidth']) * 1e-15 * 1000.0  # mm / s
+        elif pdg_id in (0, 423, 433, 4312, 4322, 5112, 5222):  # those are certainly not stable....
+            ctau = 0.
+        else:
+            print ("missing lifetime: " + str(pdg_id) + " " + str(name))
+            sys.exit(1)
+        
+        yield (pdg_id, name, mass, electric_charge, antiName, ctau/c_speed_of_light)
+                
+        # TODO: read decay channels from child elements
+        
+        if "antiName" in particle.attrib:
+            yield (-pdg_id, antiName, mass, -electric_charge, name, ctau/c_speed_of_light)
+
+
+##############################################################
+# 
+# reading xml input data, return line by line particle data
+# 
+def parseNuclei(filename):
+    tree = ET.parse(filename)
+    root = tree.getroot()
+        
+    for particle in root.iter("particle"):
+        name = particle.attrib["name"]        
+        antiName = "Unknown"
+        if ("antiName" in particle.attrib):
+            antiName = particle.attrib["antiName"]
+        pdg_id = int(particle.attrib["id"])
+        A = int(particle.attrib["A"])
+        Z = int(particle.attrib["Z"])
+        # mass in GeV
+        if ("mass" in particle.attrib):
+            mass = particle.attrib["mass"] 
+        else:
+            mass = (A-Z)*mneutron + Z*mproton
+
+        electric_charge = Z*3  # in units of e/3        
+        ctau = float('Inf')
+        
+        yield (pdg_id, name, mass, electric_charge, antiName, ctau/c_speed_of_light, A, Z)
+                
+
+        
+##############################################################
+# 
+# returns dict with particle codes and class names
+# 
+def class_names(filename):
+    tree = ET.parse(filename)
+    root = tree.getroot()
+
+    map = {}
+    
+    for particle in root.iter("particle"):
+        name = particle.attrib["classname"]
+        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 "DeltaPlusPlus"
+# 
+def c_identifier_camel(name):
+    orig = name
+    name = name[0].upper() + name[1:].lower() # all lower case
+    
+    for c in "() /": # replace funny characters
+        name = name.replace(c, "_")
+    
+    name = name.replace("bar", "Bar")
+    name = name.replace("*", "Star")
+    name = name.replace("'", "Prime")
+    name = name.replace("+", "Plus")
+    name = name.replace("-", "Minus")
+
+    # move "Bar" to end of name
+    ibar = name.find('Bar')
+    if ibar > 0 and ibar < len(name)-3:
+        name = name[:ibar] + name[ibar+3:] + 'Bar'
+    
+    # cleanup "_"s
+    while True:
+        tmp = name.replace("__", "_")
+        if tmp == name:
+            break
+        else:
+            name = tmp
+    name.strip("_")
+
+    # remove all "_", if this does not by accident concatenate two numbers
+    istart = 0
+    while True:
+        i = name.find('_', istart)
+        if i < 1 or i > len(name)-1:
+            break
+        istart = i
+        if name[i-1].isdigit() and name[i+1].isdigit():
+            # there is a number on both sides
+            break
+        name = name[:i] + name[i+1:]
+        # and last, for example: make NuE out of Nue
+        if name[i-1].islower() and name[i].islower():
+            if i < len(name)-1:
+                name = name[:i] + name[i].upper() + name[i+1:]
+            else:
+                name = name[:i] + name[i].upper()
+
+    # check if name is valid C++ identifier
+    pattern = re.compile(r'^[a-zA-Z_][a-zA-Z_0-9]*$')
+    if pattern.match(name):
+        return name
+    else:
+        raise Exception("could not generate C identifier for '{:s}': result '{:s}'".format(orig, name))
+
+
+    
+##########################################################
+# 
+# returns dict containing all data from pythia-xml input
+#     
+def read_pythia_db(filename, particle_db, classnames):    
+    
+    counter = itertools.count(len(particle_db))
+    
+    for (pdg, name, mass, electric_charge, antiName, lifetime) in parsePythia(filename):
+
+        c_id = "Unknown"
+        if pdg in classnames:
+            c_id = classnames[pdg]
+        else:
+            c_id = c_identifier_camel(name) # the camel case names
+
+        hadron =abs(pdg) > 100
+
+        if c_id in particle_db.keys():
+            raise RuntimeError("particle '{:s}' already known (new PDG id {:d}, stored PDG id: {:d})".format(c_id, pdg, particle_db[c_id]['pdg']))
+            
+        particle_db[c_id] = {
+            "name" : name,
+            "antiName" : antiName,
+            "pdg" : pdg,
+            "mass" : mass, # in GeV
+            "electric_charge" : electric_charge, # in e/3
+            "lifetime" : lifetime,
+            "ngc_code" : next(counter),
+            "isNucleus" : False,
+            "isHadron" : hadron,
+        }
+    
+    return particle_db
+    
+
+
+##########################################################
+# 
+# returns dict containing all data from pythia-xml input
+#     
+def read_nuclei_db(filename, particle_db, classnames):    
+    
+    counter = itertools.count(len(particle_db))
+
+    for (pdg, name, mass, electric_charge, antiName, lifetime, A, Z) in parseNuclei(filename):
+        
+        c_id = "Unknown"
+        if pdg in classnames:
+            c_id = classnames[pdg]
+        else:
+            c_id = c_identifier_camel(name)
+
+        particle_db[c_id] = {
+            "name" : name,
+            "antiName" : antiName,
+            "pdg" : pdg,
+            "mass" : mass, # in GeV
+            "electric_charge" : electric_charge, # in e/3
+            "lifetime" : lifetime,
+            "ngc_code" : next(counter),
+            "A" : A,
+            "Z" : Z,
+            "isNucleus" : True,
+            "isHadron" : True,
+        }
+    
+    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 : CodeIntType {\n"
+              "  FirstParticle = 1, // if you want to loop over particles, you want to start with \"1\"  \n") # identifier for eventual loops...
+    
+    
+    for k in filter(lambda k: "ngc_code" in particle_db[k], particle_db):
+        last_ngc_id = particle_db[k]['ngc_code']
+        string += "  {key:s} = {code:d},\n".format(key = k, code = last_ngc_id)
+
+    string += ("  LastParticle = {:d},\n" # identifier for eventual loops...
+               "}};").format(last_ngc_id + 1)
+               
+    if last_ngc_id > 0x7fff: # does not fit into int16_t
+        raise Exception("Integer overflow in internal particle code definition prevented!")
+    
+    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
+
+
+###############################################################
+# 
+# return string with all data arrays 
+# 
+def gen_properties(particle_db):
+
+    # number of particles, size of tables
+    string = "static constexpr std::size_t size = {size:d};\n".format(size = len(particle_db))
+    string += "\n"
+
+    # all particle initializer_list
+    string += "constexpr std::initializer_list<Code> all_particles = {"
+    for k in particle_db:        
+        string += "  Code::{name:s},\n".format(name = k)
+    string += "};\n"
+    string += "\n"
+    
+    # particle masses table
+    string += "static constexpr std::array<corsika::units::si::HEPMassType const, size> masses = {\n"    
+    for p in particle_db.values():
+        string += "  {mass:e} * 1e9 * corsika::units::si::electronvolt, // {name:s}\n".format(mass = p['mass'], name = p['name'])
+    string += "};\n\n"
+                   
+    # PDG code table
+    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
+    string += "static const std::array<std::string const, size> names = {\n"
+    for p in particle_db.values():
+        string += "  \"{name:s}\",\n".format(name = p['name'])            
+    string += "};\n"
+    
+    # electric charges table
+    string += "static constexpr std::array<int16_t, size> electric_charges = {\n"
+    for p in particle_db.values():
+        string += "  {charge:d},\n".format(charge = p['electric_charge'])
+    string += "};\n"
+
+    # anti-particle table
+    #    string += "static constexpr std::array<size, size> anti_particle = {\n"
+    #    for p in particle_db.values():
+    #        string += "  {anti:d},\n".format(charge = p['anti_particle'])
+    #    string += "};\n"
+
+    # lifetime
+    #string += "static constexpr std::array<corsika::units::si::TimeType const, size> lifetime = {\n"
+    string += "static constexpr std::array<double const, size> lifetime = {\n"
+    for p in particle_db.values():
+        if p['lifetime'] == float("Inf") :
+            string += "  std::numeric_limits<double>::infinity(), \n" # * corsika::units::si::second, \n"
+        else :
+            string += "  {tau:e}, \n".format(tau = p['lifetime'])
+            #string += "  {tau:e} * corsika::units::si::second, \n".format(tau = p['lifetime'])
+    string += "};\n"
+    
+    # is Hadron flag
+    string += "static constexpr std::array<bool, size> isHadron = {\n"
+    for p in particle_db.values():
+        value = 'false'
+        if p['isHadron']:
+            value = 'true'
+        string += "  {val},\n".format(val = value)
+    string += "};\n"
+
+    
+    ### nuclear data ###
+    
+    # nucleus mass number A
+    string += "static constexpr std::array<int16_t, size> nucleusA = {\n"
+    for p in particle_db.values():
+        A = p.get('A', 0)
+        string += "  {val},\n".format(val = A)
+    string += "};\n"
+    
+    # nucleus charge number Z
+    string += "static constexpr std::array<int16_t, size> nucleusZ = {\n"
+    for p in particle_db.values():
+        Z = p.get('Z', 0)
+        string += "  {val},\n".format(val = Z)
+    string += "};\n"
+
+    return string
+
+
+###############################################################
+# 
+# return string with a list of classes for all particles
+# 
+def gen_classes(particle_db):
+
+    string = "// list of C++ classes to access particle properties"
+    
+    for cname in particle_db:
+
+        antiP = 'Unknown'
+        for cname_anti in particle_db:
+            if (particle_db[cname_anti]['name'] == particle_db[cname]['antiName']):
+                antiP = cname_anti
+                break
+        
+        string += "\n"
+        string += "/** @class " + cname + "\n\n"
+        string += " * Particle properties are taken from the PYTHIA8 ParticleData.xml file:<br>\n"
+        string += " *  - pdg=" + str(particle_db[cname]['pdg']) +"\n"
+        string += " *  - mass=" + str(particle_db[cname]['mass']) + " GeV \n"
+        string += " *  - charge= " + str(particle_db[cname]['electric_charge']/3) + " \n"
+        string += " *  - name=" + str(cname) + "\n"
+        string += " *  - anti=" + str(antiP) + "\n"
+        if (particle_db[cname]['isNucleus']):
+            string += " *  - nuclear A=" + str(particle_db[cname]['A']) + "\n"
+            string += " *  - nuclear Z=" + str(particle_db[cname]['Z']) + "\n"        
+        string += "*/\n\n"
+        string += "class " + cname + " {\n"
+        string += "  public:\n"
+        string += "   static constexpr Code GetCode() { return Type; }\n"
+        string += "   static constexpr corsika::units::si::HEPMassType GetMass() { return corsika::GetMass(Type); }\n"
+        string += "   static constexpr corsika::units::si::ElectricChargeType GetCharge() { return corsika::GetCharge(Type); }\n"
+        string += "   static constexpr int16_t GetChargeNumber() { return corsika::GetChargeNumber(Type); }\n"
+        string += "   static std::string const& GetName() { return corsika::GetName(Type); }\n"
+        string += "   static constexpr Code GetAntiParticle() { return AntiType; }\n"
+        string += "   static constexpr bool IsNucleus() { return corsika::IsNucleus(Type); }\n"
+        string += "   static constexpr int16_t GetNucleusA() { return corsika::GetNucleusA(Type); }\n"
+        string += "   static constexpr int16_t GetNucleusZ() { return corsika::GetNucleusZ(Type); }\n"
+        string += "   static constexpr Code Type = Code::" + cname + ";\n"
+        string += "   static constexpr Code AntiType = Code::" + antiP + ";\n"
+        string += " private:\n"
+        string += "   static constexpr CodeIntType TypeIndex = static_cast<CodeIntType const>(Type);\n"
+        string += "};\n"
+
+    return string
+
+
+###############################################################
+# 
+# 
+def inc_start():
+    string = ('// generated by pdxml_reader.py\n'
+              '// MANUAL EDITS ON OWN RISK. THEY WILL BE OVERWRITTEN. \n')
+    return string
+
+
+###############################################################
+# 
+# 
+def detail_start():
+    string = ('namespace particle::detail {\n\n')
+    return string
+
+
+###############################################################
+# 
+# 
+def detail_end():
+    string = "\n}//end namespace particle::detail\n"
+    return string
+
+###############################################################
+# 
+# 
+def inc_end():
+    string = ""
+    return string
+
+
+###################################################################
+# 
+# Serialize particle_db into file 
+# 
+def serialize_particle_db(particle_db, file):
+    pickle.dump(particle_db, file)
+
+    
+###################################################################
+# 
+# Main function
+# 
+if __name__ == "__main__":
+    
+    if len(sys.argv) != 4:
+        print("usage: {:s} <Pythia8.xml> <Nuclei.xml> <ClassNames.xml>".format(sys.argv[0]), file=sys.stderr)
+        sys.exit(1)
+        
+    print("\n       pdxml_reader.py: automatically produce particle properties from input files\n")
+    
+    names = class_names(sys.argv[3])
+    particle_db = OrderedDict()
+    read_pythia_db(sys.argv[1], particle_db, names)
+    read_nuclei_db(sys.argv[2], particle_db, names)
+    
+    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) 
+    
+    with open("particle_db.pkl", "wb") as f:
+        serialize_particle_db(particle_db, f)
+    
diff --git a/corsika/framework/geometry/BaseVector.hpp b/corsika/framework/geometry/BaseVector.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..97becb2d5e307d7432e3256a15305ed6e1ef3b91
--- /dev/null
+++ b/corsika/framework/geometry/BaseVector.hpp
@@ -0,0 +1,49 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
+#include <corsika/framework/geometry/QuantityVector.hpp>
+
+namespace corsika {
+
+	/*!
+	 * Common base class for Vector and Point. Currently it does basically nothing.
+	 */
+	/*
+	 * FIXME Many potential issues:
+	 * 1. does this class really need to be templated ?
+	 * 2. copy constructor, assignment operator not implemented
+	 * 3. this member pointer is quite scary...
+	 */
+	template <typename dim>
+	class BaseVector {
+
+	public:
+
+	/*
+	 * FIXME Why to copy pQVector twice?
+	 */
+	BaseVector(CoordinateSystem const& pCS, QuantityVector<dim> pQVector):
+		qVector(pQVector),
+		cs(&pCS)
+	{}
+
+	  auto const& GetCoordinateSystem() const;
+
+
+	protected:
+		QuantityVector<dim> qVector;
+		CoordinateSystem const* cs;
+
+	};
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/BaseVector.inl>
diff --git a/corsika/framework/geometry/CoordinateSystem.hpp b/corsika/framework/geometry/CoordinateSystem.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..3b155fc4ab4385bde2965253ebb0890eecc7e26a
--- /dev/null
+++ b/corsika/framework/geometry/CoordinateSystem.hpp
@@ -0,0 +1,90 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/QuantityVector.hpp>
+#include <corsika/framework/utility/sgn.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <Eigen/Dense>
+#include <stdexcept>
+
+
+/*
+ * FIXME Review this global typedef.
+ */
+typedef Eigen::Transform<double, 3, Eigen::Affine> EigenTransform;
+typedef Eigen::Translation<double, 3> EigenTranslation;
+
+namespace corsika {
+
+  class RootCoordinateSystem;
+
+
+  template <typename T>
+  class Vector;
+
+  /*
+   * FIXME this statement should be scoped.
+   */
+  using corsika::units::si::length_d;
+
+  class CoordinateSystem
+  {
+
+    CoordinateSystem const* reference = nullptr;
+    EigenTransform transf;
+
+    CoordinateSystem(CoordinateSystem const& reference, EigenTransform const& transf):
+    	reference(&reference),
+		transf(transf)
+    {}
+
+    CoordinateSystem()
+        : // for creating the root CS
+        transf(EigenTransform::Identity()) {}
+
+  public:
+
+    //FIXME missing test for self assignment
+    inline CoordinateSystem& operator=(const CoordinateSystem& pCS);
+
+    inline CoordinateSystem translate(QuantityVector<length_d> vector) const;
+
+    /**
+     * creates a new CS in which vVec points in direction of the new z-axis
+     */
+    template <typename TDim>
+    auto RotateToZ(Vector<TDim> vVec) const;
+
+    template <typename TDim>
+    auto rotate(QuantityVector<TDim> axis, double angle) const ;
+
+    template <typename TDim>
+    auto translateAndRotate(QuantityVector<phys::units::length_d> translation,
+                            QuantityVector<TDim> axis, double angle);
+
+    inline CoordinateSystem const* GetReference() const;
+
+    inline const EigenTransform& GetTransform() const;
+
+  protected:
+
+    static CoordinateSystem CreateCS() { return CoordinateSystem(); }
+
+    friend corsika::RootCoordinateSystem; /// this is the only class that can
+                                                    /// create ONE unique root CS
+  };
+
+
+  EigenTransform getTransformation(CoordinateSystem const& c1, CoordinateSystem const& c2);
+  
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/CoordinateSystem.inl>
diff --git a/corsika/framework/geometry/FourVector.hpp b/corsika/framework/geometry/FourVector.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..2dcde2131310c31a1f6f6fc4b4b88b6798f38684
--- /dev/null
+++ b/corsika/framework/geometry/FourVector.hpp
@@ -0,0 +1,207 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <iostream>
+#include <type_traits>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+namespace corsika {
+
+  /**
+     FourVector supports "full" units, e.g. E in [GeV/c] and p in [GeV],
+     or also t in [s] and r in [m], etc.
+
+     However, for HEP applications it is also possible to use E and p
+     both in [GeV].
+
+     The FourVector can return NormSqr and Norm, whereas Norm is
+     sqrt(abs(NormSqr)). The physical units are always calculated and
+     returned properly.
+
+     FourVector can also return if it is TimeLike, SpaceLike or PhotonLike.
+
+     When a FourVector is initialized with a lvalue reference, this is
+     also used for the internal storage, which should lead to complete
+     disappearance of the FourVector class during optimization.
+   */
+
+  template <typename TimeType, typename SpaceVecType>
+  class FourVector
+  {
+
+  public:
+
+    using SpaceType = typename std::decay<SpaceVecType>::type::Quantity;
+
+    //! check the types and the physical units here:
+    static_assert(
+        std::is_same<typename std::decay<TimeType>::type, SpaceType>::value ||
+            std::is_same<typename std::decay<TimeType>::type,
+                         decltype(std::declval<SpaceType>() / corsika::units::si::meter *
+                                  corsika::units::si::second)>::value,
+        "Units of time-like and space-like coordinates must either be idential "
+        "(e.g. GeV) or [E/c]=[p]");
+
+  public:
+
+    FourVector() = default;
+
+    FourVector(const TimeType& eT, const SpaceVecType& eS):
+    	fTimeLike(eT),
+		fSpaceLike(eS)
+    {}
+
+    /*
+     * FIXME: These Getters are mis-leading and does not favor
+     * locality. Adhere to Getter/Setter
+     */
+    /**
+     * @brief
+     *
+     * @return fTimeLike
+     */
+    TimeType GetTimeLikeComponent() const ;
+
+    /**
+     * @brief
+     *
+     * @return fSpaceLike
+     */
+    SpaceVecType& GetSpaceLikeComponents() ;
+
+    /**
+     * @brief
+     *
+     * @return fSpaceLike;
+     */
+    const SpaceVecType& GetSpaceLikeComponents() const ;
+
+    /**
+     * @brief
+     *
+     * @return
+     */
+    auto GetNormSqr() const;
+
+    /**
+     * @brief
+     *
+     * @return
+     */
+    SpaceType GetNorm() const;
+
+
+    /*
+     * FIXME: a better alternative would be to define an enumeration
+     * enum { SpaceLike =-1, TimeLike, LightLike } V4R_Category;
+     * and a method called  V4R_Category GetCategory() const;
+     */
+    /**
+     * @brief
+     *
+     * @return
+     */
+    bool IsTimelike() const;
+
+    /**
+     * @brief
+     *
+     * @return
+     */
+    bool IsSpacelike() const;
+
+
+    FourVector& operator+=(const FourVector& b);
+
+    FourVector& operator-=(const FourVector& b);
+
+    FourVector& operator*=(const double b);
+
+    FourVector& operator/=(const double b);
+
+    FourVector& operator/(const double b);
+
+    /**
+       Note that the product between two 4-vectors assumes that you use
+       the same "c" convention for both. Only the LHS vector is checked
+       for this. You cannot mix different conventions due to
+       unit-checking.
+     */
+    SpaceType operator*(const FourVector& b) ;
+
+
+  protected:
+
+    //! the data members
+    TimeType fTimeLike;
+    SpaceVecType fSpaceLike;
+
+    //! the friends: math operators
+    template <typename T, typename U>
+    friend FourVector<typename std::decay<T>::type, typename std::decay<U>::type>
+    operator+(const FourVector<T, U>&, const FourVector<T, U>&);
+
+    template <typename T, typename U>
+    friend FourVector<typename std::decay<T>::type, typename std::decay<U>::type>
+    operator-(const FourVector<T, U>&, const FourVector<T, U>&);
+
+    template <typename T, typename U>
+    friend FourVector<typename std::decay<T>::type, typename std::decay<U>::type>
+    operator*(const FourVector<T, U>&, const double);
+
+    template <typename T, typename U>
+    friend FourVector<typename std::decay<T>::type, typename std::decay<U>::type>
+    operator/(const FourVector<T, U>&, const double);
+
+    private:
+    /**
+       This function is automatically compiled to use of ignore the
+       extra factor of "c" for the time-like quantity
+     */
+    auto GetTimeSquared() const ;
+
+  };
+
+
+
+  /**
+      The math operator+
+   */
+  template <typename TimeType, typename SpaceVecType>
+  inline FourVector<typename std::decay<TimeType>::type, typename std::decay<SpaceVecType>::type>
+  operator+(const FourVector<TimeType, SpaceVecType>& a,  const FourVector<TimeType, SpaceVecType>& b) ;
+
+  /**
+     The math operator-
+  */
+  template <typename TimeType, typename SpaceVecType>
+  inline FourVector<typename std::decay<TimeType>::type, typename std::decay<SpaceVecType>::type>
+  operator-(const FourVector<TimeType, SpaceVecType>& a, const FourVector<TimeType, SpaceVecType>& b) ;
+
+  /**
+     The math operator*
+     FIXME: Add overload to deal with multiplication by a scalar and 3-vectors
+  */
+  template <typename TimeType, typename SpaceVecType>
+  inline FourVector<typename std::decay<TimeType>::type, typename std::decay<SpaceVecType>::type>
+  operator*(const FourVector<TimeType, SpaceVecType>& a, const double b) ;
+
+  /**
+      The math operator/
+   */
+  template <typename TimeType, typename SpaceVecType>
+  inline FourVector<typename std::decay<TimeType>::type,typename std::decay<SpaceVecType>::type>
+  operator/(const FourVector<TimeType, SpaceVecType>& a, const double b) ;
+
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/FourVector.inl>
diff --git a/corsika/framework/geometry/Helix.hpp b/corsika/framework/geometry/Helix.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..09f8672f9dafba8875f1b3f9223c6ecf9f6f0d70
--- /dev/null
+++ b/corsika/framework/geometry/Helix.hpp
@@ -0,0 +1,66 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <cmath>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+namespace corsika {
+  /*!
+   * A Helix is defined by the cyclotron frequency \f$ \omega_c \f$, the initial
+   * Point r0 and
+   * the velocity vectors \f$ \vec{v}_{\parallel} \f$ and \f$ \vec{v}_{\perp} \f$
+   * denoting the projections of the initial velocity \f$ \vec{v}_0 \f$ parallel
+   * and perpendicular to the axis \f$ \vec{B} \f$, respectively, i.e.
+   * \f{align*}{
+        \vec{v}_{\parallel} &= \frac{\vec{v}_0 \cdot \vec{B}}{\vec{B}^2} \vec{B} \\
+        \vec{v}_{\perp} &= \vec{v}_0 - \vec{v}_{\parallel}
+     \f}
+   */
+
+  class Helix {
+
+    using VelocityVec = Vector<units::si::SpeedType::dimension_type>;
+
+    Point const r0;
+    units::si::FrequencyType const omegaC;
+    VelocityVec const vPar;
+    VelocityVec const vPerp, uPerp;
+
+    corsika::units::si::LengthType const radius;
+
+  public:
+
+    Helix(Point const& pR0, units::si::FrequencyType pOmegaC,
+          VelocityVec const& pvPar, VelocityVec const& pvPerp)
+        : r0(pR0)
+        , omegaC(pOmegaC)
+        , vPar(pvPar)
+        , vPerp(pvPerp)
+        , uPerp(vPerp.cross(vPar.normalized()))
+        , radius(pvPar.norm() / abs(pOmegaC)) {}
+
+    inline Point GetPosition(units::si::TimeType t) const ;
+
+    inline Point PositionFromArclength(units::si::LengthType l) const ;
+
+    inline units::si::LengthType GetRadius() const ;
+
+    inline units::si::LengthType
+	ArcLength(units::si::TimeType t1, units::si::TimeType t2) const ;
+
+    inline units::si::TimeType TimeFromArclength(units::si::LengthType l) const ;
+
+  };
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/Helix.inl>
diff --git a/corsika/framework/geometry/Line.hpp b/corsika/framework/geometry/Line.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..f25a3d9e3699f924f6cba2821543cf5ba50d4bc3
--- /dev/null
+++ b/corsika/framework/geometry/Line.hpp
@@ -0,0 +1,56 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+namespace corsika {
+
+  /**
+   * \class Line
+   *
+   * A Line describes a movement in three dimensional space. It
+   * consists of a Point `$\vec{p_0}$` and and a speed-Vector
+   * `$\vec{v}$`, so that it can return GetPosition as
+   * `$\vec{p_0}*\vec{v}*t$` for any value of time `$t$`.
+   *
+   **/
+
+  class Line {
+
+    using VelocityVec = Vector<units::si::SpeedType::dimension_type>;
+
+    Point const r0;
+    VelocityVec const v0;
+
+  public:
+
+    Line(Point const& pR0, VelocityVec const& pV0)
+        : r0(pR0)
+        , v0(pV0) {}
+
+    inline Point GetPosition(units::si::TimeType t) const ;
+
+    inline Point PositionFromArclength(units::si::LengthType l) const ;
+
+    inline units::si::LengthType ArcLength(units::si::TimeType t1, units::si::TimeType t2) const ;
+
+    inline units::si::TimeType TimeFromArclength( units::si::LengthType t) const ;
+
+    inline const Point& GetR0() const ;
+
+    inline const VelocityVec& GetV0() const ;
+
+  };
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/Line.inl>
diff --git a/Framework/Geometry/Plane.h b/corsika/framework/geometry/Plane.hpp
similarity index 55%
rename from Framework/Geometry/Plane.h
rename to corsika/framework/geometry/Plane.hpp
index 9a3b04ff45a5b48cded875474c6eaad9bb6d100b..6a0d04f4c0c8e776b1ef6a8e324978897be5c0ae 100644
--- a/Framework/Geometry/Plane.h
+++ b/corsika/framework/geometry/Plane.hpp
@@ -8,11 +8,12 @@
 
 #pragma once
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika {
 
-namespace corsika::geometry {
   class Plane {
 
     using DimLessVec = Vector<corsika::units::si::dimensionless_d>;
@@ -21,20 +22,23 @@ namespace corsika::geometry {
     DimLessVec const fNormal;
 
   public:
+
     Plane(Point const& vCenter, DimLessVec const& vNormal)
         : fCenter(vCenter)
         , fNormal(vNormal.normalized()) {}
 
-    bool IsAbove(Point const& vP) const {
-      return fNormal.dot(vP - fCenter) > corsika::units::si::LengthType::zero();
-    }
+    bool IsAbove(Point const& vP) const ;
+
+    units::si::LengthType DistanceTo(geometry::Point const& vP) const ;
+
 
-    units::si::LengthType DistanceTo(geometry::Point const& vP) const {
-      return (fNormal * (vP - fCenter).dot(fNormal)).norm();
-    }
+    Point const& GetCenter() const ;
+
+    DimLessVec const& GetNormal() const ;
 
-    Point const& GetCenter() const { return fCenter; }
-    DimLessVec const& GetNormal() const { return fNormal; }
   };
 
-} // namespace corsika::geometry
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/Plane.inl>
+
diff --git a/corsika/framework/geometry/Point.hpp b/corsika/framework/geometry/Point.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..22b9f75580c7a5d882096f87ccf5453c82730745
--- /dev/null
+++ b/corsika/framework/geometry/Point.hpp
@@ -0,0 +1,66 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/QuantityVector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/BaseVector.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+namespace corsika {
+
+  //FIXME: remove aliasing here
+  using corsika::units::si::length_d;
+  using corsika::units::si::LengthType;
+
+  /*!
+   * A Point represents a point in position space. It is defined by its
+   * coordinates with respect to some CoordinateSystem.
+   */
+  class Point : public BaseVector<length_d> {
+
+  public:
+
+    Point(CoordinateSystem const& pCS, QuantityVector<length_d> pQVector)
+        : BaseVector<length_d>(pCS, pQVector) {}
+
+    Point(CoordinateSystem const& cs, LengthType x, LengthType y, LengthType z)
+        : BaseVector<length_d>(cs, {x, y, z}) {}
+
+    // TODO: this should be private or protected, we don NOT want to expose numbers
+    // without reference to outside:
+    inline auto GetCoordinates() const ;
+
+    inline auto GetX() const ;
+
+    inline auto GetY() const ;
+
+    inline auto GetZ() const ;
+
+    /// this always returns a QuantityVector as triple
+    inline auto GetCoordinates(CoordinateSystem const& pCS) const ;
+
+    /*!
+     * transforms the Point into another CoordinateSystem by changing its
+     * coordinates interally
+     */
+    inline void rebase(CoordinateSystem const& pCS) ;
+
+    inline Point operator+(Vector<length_d> const& pVec) const ;
+
+    /*!
+     * returns the distance Vector between two points
+     */
+    inline Vector<length_d> operator-(Point const& pB) const ;
+
+  };
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/Point.inl>
diff --git a/corsika/framework/geometry/QuantityVector.hpp b/corsika/framework/geometry/QuantityVector.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..e3195c34ec92f69876bd41dd84e47000be8f0c44
--- /dev/null
+++ b/corsika/framework/geometry/QuantityVector.hpp
@@ -0,0 +1,100 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <Eigen/Dense>
+
+#include <iostream>
+#include <utility>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika {
+
+  /*!
+   * A QuantityVector is a three-component container based on Eigen::Vector3d
+   * with a phys::units::si::dimension. Arithmethic operators are defined that
+   * propagate the dimensions by dimensional analysis.
+   */
+
+  template <typename dim>
+  class QuantityVector {
+  public:
+    using Quantity = phys::units::quantity<dim, double>; //< the phys::units::quantity
+                                                         // corresponding to the dimension
+
+  public:
+    Eigen::Vector3d eVector; //!< the actual container where the raw numbers are stored
+
+    typedef dim dimension; //!< should be a phys::units::dimension
+
+    QuantityVector(Quantity a, Quantity b, Quantity c)
+        : eVector{a.magnitude(), b.magnitude(), c.magnitude()} {}
+
+    QuantityVector(double a, double b, double c)
+        : eVector{a, b, c} {
+      static_assert(
+          std::is_same_v<dim, phys::units::dimensionless_d>,
+          "initialization of dimensionful QuantityVector with pure numbers not allowed!");
+    }
+
+    QuantityVector(Eigen::Vector3d pBareVector)
+        : eVector(pBareVector) {}
+
+    auto operator[](size_t index) const ;
+
+    auto GetX() const ;
+
+    auto GetY() const ;
+
+    auto GetZ() const ;
+
+    auto norm() const ;
+
+    auto squaredNorm() const ;
+
+    auto operator+(QuantityVector<dim> const& pQVec) const ;
+
+    auto operator-(QuantityVector<dim> const& pQVec) const ;
+
+    template <typename ScalarDim>
+    auto operator*(phys::units::quantity<ScalarDim, double> const p) const ;
+
+    template <typename ScalarDim>
+    auto operator/(phys::units::quantity<ScalarDim, double> const p) const ;
+
+    auto operator*(double const p) const ;
+
+    auto operator/(double const p) const ;
+
+    auto& operator/=(double const p) ;
+
+    auto& operator*=(double const p) ;
+
+    auto& operator+=(QuantityVector<dim> const& pQVec) ;
+
+    auto& operator-=(QuantityVector<dim> const& pQVec) ;
+
+    auto& operator-() const ;
+
+    auto normalized() const ;
+
+    auto operator==(QuantityVector<dim> const& p) const ;
+
+  };
+
+  /*
+   * FIXME free function operators not implemented.
+   */
+
+  template <typename dim>
+  auto& operator<<(std::ostream& os, corsika::QuantityVector<dim> qv);
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/QuantityVector.inl>
diff --git a/Framework/Geometry/RootCoordinateSystem.h b/corsika/framework/geometry/RootCoordinateSystem.hpp
similarity index 50%
rename from Framework/Geometry/RootCoordinateSystem.h
rename to corsika/framework/geometry/RootCoordinateSystem.hpp
index a2208fd716c11279dcdf119220b02b8d3e99e6d6..f88c7a27076bb7f568b9961fbfb21d14c464cadc 100644
--- a/Framework/Geometry/RootCoordinateSystem.h
+++ b/corsika/framework/geometry/RootCoordinateSystem.hpp
@@ -8,9 +8,8 @@
 
 #pragma once
 
-#include <corsika/utl/Singleton.h>
-
-#include <corsika/geometry/CoordinateSystem.h>
+#include <corsika/framework/utility/Singleton.hpp>
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
 
 /*!
  * This is the only way to get a root-coordinate system, and it is a
@@ -18,23 +17,28 @@
  * RootCoordinateSystem
  */
 
-namespace corsika::geometry {
+namespace corsika {
 
-  class RootCoordinateSystem : public corsika::utl::Singleton<RootCoordinateSystem> {
+  class RootCoordinateSystem : public corsika::Singleton<RootCoordinateSystem> {
 
-    friend class corsika::utl::Singleton<RootCoordinateSystem>;
+    friend class corsika::Singleton<RootCoordinateSystem>;
 
   protected:
     RootCoordinateSystem() {}
 
   public:
-    corsika::geometry::CoordinateSystem& GetRootCoordinateSystem() { return fRootCS; }
-    const corsika::geometry::CoordinateSystem& GetRootCoordinateSystem() const {
+    corsika::CoordinateSystem& GetRootCoordinateSystem()
+    {
+    	return fRootCS;
+    }
+    const corsika::CoordinateSystem& GetRootCoordinateSystem() const
+    {
       return fRootCS;
     }
 
   private:
-    corsika::geometry::CoordinateSystem fRootCS; // THIS IS IT
+    corsika::CoordinateSystem fRootCS; // THIS IS IT
   };
 
-} // namespace corsika::geometry
+} // namespace corsika
+
diff --git a/corsika/framework/geometry/Sphere.hpp b/corsika/framework/geometry/Sphere.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..edbeae194bdb53f08a70b493ed6ec65d5422df3c
--- /dev/null
+++ b/corsika/framework/geometry/Sphere.hpp
@@ -0,0 +1,36 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Volume.hpp>
+
+namespace corsika {
+
+  class Sphere : public Volume {
+    Point const fCenter;
+    units::si::LengthType const fRadius;
+
+  public:
+    Sphere(Point const& pCenter, units::si::LengthType const pRadius)
+        : fCenter(pCenter)
+        , fRadius(pRadius) {}
+
+    //! returns true if the Point p is within the sphere
+    inline bool Contains(Point const& p) const override ;
+    
+    inline const Point& GetCenter() const;
+    
+    inline units::si::LengthType GetRadius() const;
+  };
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/Sphere.inl>
diff --git a/corsika/framework/geometry/Trajectory.hpp b/corsika/framework/geometry/Trajectory.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..89a9490ad8ed117f9712d0dd0890d5f0aba0f672
--- /dev/null
+++ b/corsika/framework/geometry/Trajectory.hpp
@@ -0,0 +1,111 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+
+namespace corsika {
+
+  /**
+   * \class LineTrajectory
+   *
+   * A Trajectory is a description of a momvement of an object in
+   * three-dimensional space that describes the trajectory (connection
+   * between two Points in space), as well as the direction of motion
+   * at any given point.
+   *
+   * A Trajectory has a start `0` and an end `1`, where
+   * e.g. GetPosition(0) returns the start point and GetDirection(1)
+   * the direction of motion at the end. Values outside 0...1 are not
+   * defined.
+   *
+   * A Trajectory has a length in [m], GetLength, a duration in [s], GetDuration.
+   *
+   * Note: so far it is assumed that the speed (d|vec{r}|/dt) between
+   * start and end does not change and is constant for the entire
+   * Trajectory.
+   *
+   **/
+
+  class LineTrajectory {
+
+    using VelocityVec = Vector<corsika::units::si::SpeedType::dimension_type>;
+
+  public:
+    LineTrajectory() = delete;
+    LineTrajectory(const LineTrajectory&) = default;
+    LineTrajectory(LineTrajectory&&) = default;
+    LineTrajectory& operator=(const LineTrajectory&) = delete;
+
+    /**
+     * \param theLine The geometric \sa Line object that represents a straight-line
+     * connection 
+     *
+     * \param timeLength The time duration to traverse the straight trajectory
+     * in units of \sa TimeType
+     */
+    LineTrajectory(Line const& theLine, corsika::units::si::TimeType timeLength)
+        : line_(theLine)
+        , timeLength_(timeLength)
+        , timeStep_(timeLength)
+        , initialVelocity_(theLine.GetVelocity(corsika::units::si::TimeType::zero()))
+        , finalVelocity_(theLine.GetVelocity(timeLength)) {}
+
+    /**
+     * \param theLine The geometric \sa Line object that represents a straight-line
+     * connection 
+     * 
+     * \param timeLength The time duration to traverse the straight trajectory
+     * in units of \sa TimeType 
+     * 
+     * \param timeStep Time duration to folow eventually curved
+     * trajectory in units of \sa TimesType 
+     * 
+     * \param initialV Initial velocity vector at
+     * start of trajectory \param finalV Final velocity vector at start of trajectory
+     */
+    LineTrajectory(
+        Line const& theLine,
+        corsika::units::si::TimeType timeLength, // length of theLine (straight)
+        corsika::units::si::TimeType timeStep,   // length of bend step (curved)
+        const VelocityVec& initialV, const VelocityVec& finalV)
+        : line_(theLine)
+        , timeLength_(timeLength)
+        , timeStep_(timeStep)
+        , initialVelocity_(initialV)
+        , finalVelocity_(finalV) {}
+
+    const Line& GetLine() const { return line_; }
+    Point GetPosition(double u) const { return line_.GetPosition(timeLength_ * u); }
+    VelocityVec GetVelocity(double u) const {
+      return initialVelocity_ * (1 - u) + finalVelocity_ * u;
+    }
+    Vector<corsika::units::si::dimensionless_d> GetDirection(double u) const {
+      return GetVelocity(u).normalized();
+    }
+
+    Point GetPosition(double u) const ;
+
+    corsika::units::si::TimeType GetDuration() const ;
+
+    corsika::units::si::LengthType GetLength() const ;
+
+    corsika::units::si::LengthType GetDistance(corsika::units::si::TimeType t) const ;
+
+    void LimitEndTo(corsika::units::si::LengthType limit) ;
+
+    auto NormalizedDirection() const ;
+
+  };
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/Trajectory.inl>
diff --git a/corsika/framework/geometry/Vector.hpp b/corsika/framework/geometry/Vector.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..d117e3fcca4d5dedae2dd1504ffc38823c6ead07
--- /dev/null
+++ b/corsika/framework/geometry/Vector.hpp
@@ -0,0 +1,117 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/BaseVector.hpp>
+#include <corsika/framework/geometry/QuantityVector.hpp>
+
+/*!
+ * A Vector represents a 3-vector in Euclidean space. It is defined by components
+ * given in a specific CoordinateSystem. It has a physical dimension ("unit")
+ * as part of its type, so you cannot mix up e.g. electric with magnetic fields
+ * (but you could calculate their cross-product to get an energy flux vector).
+ *
+ * When transforming coordinate systems, a Vector is subject to the rotational
+ * part only and invariant under translations.
+ */
+
+namespace corsika {
+
+  template <typename dim>
+  class Vector : public BaseVector<dim> {
+  public:
+    using Quantity = phys::units::quantity<dim, double>;
+
+  public:
+    Vector(CoordinateSystem const& pCS, QuantityVector<dim> pQVector)
+        : BaseVector<dim>(pCS, pQVector) {}
+
+    Vector(CoordinateSystem const& cs, Quantity x, Quantity y, Quantity z)
+        : BaseVector<dim>(cs, QuantityVector<dim>(x, y, z)) {}
+
+    /*!
+     * returns a QuantityVector with the components given in the "home"
+     * CoordinateSystem of the Vector
+     */
+    auto GetComponents() const;
+
+    /*!
+     * returns a QuantityVector with the components given in an arbitrary
+     * CoordinateSystem
+     */
+    auto GetComponents(CoordinateSystem const& pCS) const;
+
+    /*!
+     * transforms the Vector into another CoordinateSystem by changing
+     * its components internally
+     */
+    void rebase(CoordinateSystem const& pCS);
+
+    /*!
+     * returns the norm/length of the Vector. Before using this method,
+     * think about whether squaredNorm() might be cheaper for your computation.
+     */
+    auto norm() const;
+
+    auto GetNorm() const ;
+
+    /*!
+     * returns the squared norm of the Vector. Before using this method,
+     * think about whether norm() might be cheaper for your computation.
+     */
+    auto squaredNorm() const ;
+
+    auto GetSquaredNorm() const ;
+    /*!
+     * returns a Vector \f$ \vec{v}_{\parallel} \f$ which is the parallel projection
+     * of this vector \f$ \vec{v}_1 \f$ along another Vector \f$ \vec{v}_2 \f$ given by
+     *   \f[
+     *     \vec{v}_{\parallel} = \frac{\vec{v}_1 \cdot \vec{v}_2}{\vec{v}_2^2} \vec{v}_2
+     *   \f]
+     */
+    template <typename dim2>
+    auto parallelProjectionOnto(Vector<dim2> const& pVec, CoordinateSystem const& pCS) const ;
+    template <typename dim2>
+    auto parallelProjectionOnto(Vector<dim2> const& pVec) const ;
+
+    auto operator+(Vector<dim> const& pVec) const ;
+
+    auto operator-(Vector<dim> const& pVec) const ;
+
+    auto& operator*=(double const p) ;
+
+    template <typename ScalarDim>
+    auto operator*(phys::units::quantity<ScalarDim, double> const p) const ;
+    template <typename ScalarDim>
+    auto operator/(phys::units::quantity<ScalarDim, double> const p) const ;
+
+    auto operator*(double const p) const ;
+
+    auto operator/(double const p) const ;
+
+    auto& operator+=(Vector<dim> const& pVec) ;
+
+    auto& operator-=(Vector<dim> const& pVec);
+
+    auto& operator-() const ;
+
+    auto normalized() const ;
+
+    template <typename dim2>
+    auto cross(Vector<dim2> pV) const ;
+
+    template <typename dim2>
+    auto dot(Vector<dim2> pV) const ;
+
+  };
+
+} // namespace corsika
+
+#include <corsika/detail/framework/geometry/Vector.inl>
diff --git a/Framework/Geometry/Volume.h b/corsika/framework/geometry/Volume.hpp
similarity index 81%
rename from Framework/Geometry/Volume.h
rename to corsika/framework/geometry/Volume.hpp
index c1dfbd3130765f169344ccd421399eaeca2a93ac..d566e45c1706151a30e48516d10f0d6429ca4b0d 100644
--- a/Framework/Geometry/Volume.h
+++ b/corsika/framework/geometry/Volume.hpp
@@ -8,9 +8,9 @@
 
 #pragma once
 
-#include <corsika/geometry/Point.h>
+#include <corsika/framework/geometry/Point.hpp>
 
-namespace corsika::geometry {
+namespace corsika {
 
   class Volume {
 
@@ -21,4 +21,5 @@ namespace corsika::geometry {
     virtual ~Volume() = default;
   };
 
-} // namespace corsika::geometry
+} // namespace corsika
+
diff --git a/Framework/Geometry/CoordinateSystem.cc b/corsika/framework/geometry/detail/CoordinateSystem.cc
similarity index 100%
rename from Framework/Geometry/CoordinateSystem.cc
rename to corsika/framework/geometry/detail/CoordinateSystem.cc
diff --git a/corsika/framework/logging/BufferedSink.h b/corsika/framework/logging/BufferedSink.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b2b3a62ae40ce505c682cc704e9428a7f5821fe
--- /dev/null
+++ b/corsika/framework/logging/BufferedSink.h
@@ -0,0 +1,80 @@
+/*
+ * (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_BufferedSink_h_
+#define _include_BufferedSink_h_
+
+namespace corsika::logging {
+
+  namespace sink {
+
+    /**
+       Output buffer template. NoBuffer does nothingk.
+    */
+    /*
+    struct NoBuffer {
+      inline bool Test(const std::string&) const { return false; }
+      inline std::string GetString() const { return std::string(""); }
+      inline void Clear() {}
+      inline void Add(const std::string&) {}
+    };
+    */
+    /**
+       Output buffer template. StdBuffer records fSize characters in
+       local memeory before passing it on to further output stages.
+    */
+
+    struct StdBuffer {
+      StdBuffer(const int size)
+          : fSize(size) {}
+      inline bool Test(const std::string& s) {
+        return int(fBuffer.tellp()) + s.length() < fSize;
+      }
+      inline std::string GetString() const { return fBuffer.str(); }
+      inline void Clear() { fBuffer.str(""); }
+      inline void Add(const std::string& s) { fBuffer << s; }
+
+    private:
+      unsigned int fSize;
+      std::ostringstream fBuffer;
+    };
+
+    /**
+       Definition of Sink for log output.
+    */
+    template <typename TStream, typename TBuffer = StdBuffer>
+    class BufferedSink {
+    public:
+      BufferedSink(TStream& out, TBuffer buffer = {})
+          : fOutput(out)
+          , fBuffer(std::move(buffer)) {}
+      void operator<<(const std::string& msg) {
+        if (!fBuffer.Test(msg)) {
+          fOutput << fBuffer.GetString();
+          fBuffer.Clear();
+        }
+        if (!fBuffer.Test(msg))
+          fOutput << msg;
+        else
+          fBuffer.Add(msg);
+      }
+      void Close() { fOutput << fBuffer.GetString(); }
+
+    private:
+      TStream& fOutput;
+      TBuffer fBuffer;
+    };
+
+    typedef BufferedSink<std::ostream, StdBuffer> BufferedSinkStream;
+
+  } // namespace sink
+} // namespace corsika::logging
+
+#endif
diff --git a/corsika/framework/logging/Logger.h b/corsika/framework/logging/Logger.h
new file mode 100644
index 0000000000000000000000000000000000000000..15ebe3c54f521f0112d0a61bf80d14521903808c
--- /dev/null
+++ b/corsika/framework/logging/Logger.h
@@ -0,0 +1,90 @@
+/*
+ * (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.
+ */
+
+/**
+   @File Logger.h
+
+   Everything around logfile generation and text output.
+ */
+
+#ifndef _include_logger_h_
+#define _include_logger_h_
+
+#include <iosfwd>
+#include <sstream>
+#include <string>
+#include <typeinfo>
+
+#include <boost/format.hpp>
+
+#include <corsika/logging/BufferedSink.h>
+#include <corsika/logging/MessageOff.h>
+#include <corsika/logging/MessageOn.h>
+#include <corsika/logging/NoSink.h>
+#include <corsika/logging/Sink.h>
+
+namespace corsika::logging {
+
+  /**
+     @class Logger
+
+     Defines one stream to accept messages, and to wrote those into
+     TSink.  The helper class MessageOn will convert input at
+     compile-time into message strings. The helper class MessageOff,
+     will just do nothing and will be optimized away at compile time.
+  */
+  template <typename MSG = MessageOn, typename TSink = sink::NoSink>
+  class Logger : private MSG {
+
+    using MSG::Message;
+
+  public:
+    // Logger() : fName("") {}
+    Logger(const std::string color, const std::string name, TSink& sink)
+        : fSink(sink)
+        , fName(color + "[" + name + "]\033[39m ") {}
+    ~Logger() { fSink.Close(); }
+    // Logger(const Logger&) = delete;
+
+    /**
+       Function to add string-concatenation of all inputs to output
+       sink.
+     */
+    template <typename... Strings>
+    void Log(const Strings&... inputs) {
+      fSink << MSG::Message(inputs...);
+    }
+
+    const std::string& GetName() const { return fName; }
+
+  private:
+    TSink& fSink;
+    std::string fName;
+  };
+
+} // namespace corsika::logging
+
+/**
+ * @def LOG(...)
+ *
+ * This is the main interface to the logging facilities. If Logger
+ * object are defined (e.g. log1) use as
+ * @example LOG(log1, "var1=", variable1int, "var2=", variabl2double)
+ * for arbitrary long sequence
+ * of arguments. This may also include boost::format objects the
+ * output is concatenated, if log1 is switched off at compile time,
+ * the whole LOG command is optimized away by the compiler.
+ */
+
+#define LOG(__LOGGER, ...)                                                           \
+  __LOGGER.Log(__LOGGER.GetName(), __FILE__, ":", __LINE__, " (", __func__, ") -> ", \
+               __VA_ARGS__);
+
+#endif
diff --git a/corsika/framework/logging/MessageOff.h b/corsika/framework/logging/MessageOff.h
new file mode 100644
index 0000000000000000000000000000000000000000..691824be0100c9a9123ae4c538241830553073ae
--- /dev/null
+++ b/corsika/framework/logging/MessageOff.h
@@ -0,0 +1,30 @@
+/*
+ * (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_MessageOff_h_
+#define _include_MessageOff_h_
+
+namespace corsika::logging {
+
+  /**
+     Helper class to ignore all arguments to MessagesOn::Message and
+     always return empty string "".
+   */
+  class MessageOff {
+  protected:
+    template <typename First, typename... Strings>
+    std::string Message(const First&, const Strings&...) {
+      return "";
+    }
+  };
+
+} // namespace corsika::logging
+
+#endif
diff --git a/corsika/framework/logging/MessageOn.h b/corsika/framework/logging/MessageOn.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b013a6350b95afdd1bb6ef5a43ab34ef47b7a92
--- /dev/null
+++ b/corsika/framework/logging/MessageOn.h
@@ -0,0 +1,70 @@
+/*
+ * (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_MessageOn_h_
+#define _include_MessageOn_h_
+
+namespace corsika::logging {
+
+  /**
+     Helper class to convert all input arguments of MessageOn::Message
+     into string-concatenated version and return this as string.
+  */
+  class MessageOn {
+  protected:
+    std::string Message() { return "\n"; }
+
+    template <typename First, typename... Strings>
+    std::string Message(const First& arg, const Strings&... rest) {
+      std::ostringstream ss;
+      ss << arg << Message(rest...);
+      return ss.str();
+    }
+
+    template <typename... Strings>
+    std::string Message(const int& arg, const Strings&... rest) {
+      return std::to_string(arg) + Message(rest...);
+    }
+
+    template <typename... Strings>
+    std::string Message(const double& arg, const Strings&... rest) {
+      return std::to_string(arg) + Message(rest...);
+    }
+
+    template <typename... Strings>
+    std::string Message(char const* arg, const Strings&... rest) {
+      return std::string(arg) + Message(rest...);
+    }
+
+    template <typename... Strings>
+    std::string Message(const std::string& arg, const Strings&... rest) {
+      return arg + Message(rest...);
+    }
+
+    // ----------------------
+    // boost format
+    template <typename... Strings>
+    std::string Message(const boost::format& fmt, const Strings&... rest) {
+      boost::format FMT(fmt);
+      return bformat(FMT, rest...);
+    }
+
+    template <typename Arg, typename... Strings>
+    std::string bformat(boost::format& fmt, const Arg& arg, const Strings&... rest) {
+      fmt % arg;
+      return bformat(fmt, rest...);
+    }
+
+    std::string bformat(boost::format& fmt) { return fmt.str() + "\n"; }
+  };
+
+} // namespace corsika::logging
+
+#endif
diff --git a/corsika/framework/logging/NoSink.h b/corsika/framework/logging/NoSink.h
new file mode 100644
index 0000000000000000000000000000000000000000..866d35601d8805da00884df2fac551acb4cf7bdd
--- /dev/null
+++ b/corsika/framework/logging/NoSink.h
@@ -0,0 +1,26 @@
+/*
+ * (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_NoSink_h_
+#define _include_NoSink_h_
+
+namespace corsika::logging {
+
+  namespace sink {
+
+    struct NoSink {
+      inline void operator<<(const std::string&) {}
+      inline void Close() {}
+    };
+
+  } // namespace sink
+} // namespace corsika::logging
+
+#endif
diff --git a/corsika/framework/logging/Sink.h b/corsika/framework/logging/Sink.h
new file mode 100644
index 0000000000000000000000000000000000000000..28c768d6f425a25515dfeeff0065df9b9e628643
--- /dev/null
+++ b/corsika/framework/logging/Sink.h
@@ -0,0 +1,47 @@
+/*
+ * (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_Sink_h_
+#define _include_Sink_h_
+
+namespace corsika::logging {
+
+  /**
+     a sink for the logger must implement the two functions
+     operator<<(const std::string&)
+     and
+     Close()
+
+     See example: NoSink
+   */
+
+  namespace sink {
+
+    /**
+       Definition of Sink for log output.
+    */
+    template <typename TStream>
+    class Sink {
+    public:
+      Sink(TStream& out)
+          : fOutput(out) {}
+      void operator<<(const std::string& msg) { fOutput << msg; }
+      void Close() {}
+
+    private:
+      TStream& fOutput;
+    };
+
+    typedef Sink<std::ostream> SinkStream;
+
+  } // namespace sink
+} // namespace corsika::logging
+
+#endif
diff --git a/Framework/Random/ExponentialDistribution.h b/corsika/framework/random/ExponentialDistribution.hpp
similarity index 69%
rename from Framework/Random/ExponentialDistribution.h
rename to corsika/framework/random/ExponentialDistribution.hpp
index 2431e316e1465ba669610993b127b4aeef735c9e..d0d08be73a1851f0ab216aca501f4ad4b18cdecc 100644
--- a/Framework/Random/ExponentialDistribution.h
+++ b/corsika/framework/random/ExponentialDistribution.hpp
@@ -8,10 +8,14 @@
 
 #pragma once
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 #include <random>
 
-namespace corsika::random {
+namespace corsika {
+	  //FIXME: This whole facility needs to re-designed.
+	  //It is not parallel friendly neither polymorphic
+	  //and the streaming management is prone to produce
+	  //huge correlation between the streams
 
   template <class TQuantity>
   class ExponentialDistribution {
@@ -30,4 +34,5 @@ namespace corsika::random {
     }
   };
 
-} // namespace corsika::random
+} // namespace corsika
+
diff --git a/Framework/Random/RNGManager.h b/corsika/framework/random/RNGManager.hpp
similarity index 76%
rename from Framework/Random/RNGManager.h
rename to corsika/framework/random/RNGManager.hpp
index 0826642a86e57df9f25ab0c297e5ce080839565b..7fc2d327a8e3d5fe4f06910d5af2c67c5cfe0fe7 100644
--- a/Framework/Random/RNGManager.h
+++ b/corsika/framework/random/RNGManager.hpp
@@ -8,32 +8,34 @@
 
 #pragma once
 
-#include <corsika/utl/Singleton.h>
-
 #include <map>
 #include <random>
 #include <string>
+#include <corsika/framework/utility/Singleton.hpp>
 
 /*!
  * With this class modules can register streams of random numbers.
  */
 
-namespace corsika::random {
+namespace corsika {
+
+  //FIXME: This while facility needs to re-designed.
+  //It is not parallel friendly neither polymorphic
+  //and the streaming management is prone to produce
+  //huge correlation between the streams
 
   using RNG = std::mt19937; //!< the actual RNG type that will be used
 
-  /*!
-   * Manage random number generators.
-   */
-  class RNGManager final : public corsika::utl::Singleton<RNGManager> {
+  class RNGManager : public corsika::Singleton<RNGManager> {
 
-    friend class corsika::utl::Singleton<RNGManager>;
+    friend class corsika::Singleton<RNGManager>;
 
     std::map<std::string, RNG> rngs;
     std::map<std::string, std::seed_seq> seeds;
 
   protected:
-    RNGManager() {}
+
+    RNGManager() {} // why ?
 
   public:
     /*!
@@ -70,4 +72,6 @@ namespace corsika::random {
     void SeedAll(); //!< seed all currently registered streams with "real" randomness
   };
 
-} // namespace corsika::random
+} // namespace corsika
+
+#include <corsika/detail/framework/random/RNGManager.inl>
diff --git a/Framework/Random/UniformRealDistribution.h b/corsika/framework/random/UniformRealDistribution.hpp
similarity index 73%
rename from Framework/Random/UniformRealDistribution.h
rename to corsika/framework/random/UniformRealDistribution.hpp
index 0c63e85428a1e2556a81995b386ba46493546866..ce112acc47de7e30758c6a9e3ee992406efd0cf1 100644
--- a/Framework/Random/UniformRealDistribution.h
+++ b/corsika/framework/random/UniformRealDistribution.hpp
@@ -8,9 +8,15 @@
 
 #pragma once
 
+#include <corsika/framework/core/PhysicalUnits.hpp>
 #include <random>
 
-namespace corsika::random {
+namespace corsika {
+
+	  //FIXME: This while facility needs to re-designed.
+	  //It is not parallel friendly neither polymorphic
+	  //and the streaming management is prone to produce
+	  //huge correlation between the streams
 
   template <class TQuantity>
   class UniformRealDistribution {
@@ -33,4 +39,5 @@ namespace corsika::random {
     }
   };
 
-} // namespace corsika::random
+} // namespace corsika
+
diff --git a/Framework/ProcessSequence/BaseProcess.h b/corsika/framework/sequence/BaseProcess.hpp
similarity index 78%
rename from Framework/ProcessSequence/BaseProcess.h
rename to corsika/framework/sequence/BaseProcess.hpp
index c1a4e232e0e0689b67aaca62af99b0abcfb47c8f..a17b8faf6de7bf79dee88edb7cbc02f5236d58fc 100644
--- a/Framework/ProcessSequence/BaseProcess.h
+++ b/corsika/framework/sequence/BaseProcess.hpp
@@ -8,9 +8,10 @@
 
 #pragma once
 
-#include <corsika/process/ProcessReturn.h> // for convenience
+#include <type_traits>
+#include <corsika/framework/sequence/ProcessReturn.hpp> // for convenience
 
-namespace corsika::process {
+namespace corsika {
 
   class TDerived; // fwd decl
 
@@ -42,4 +43,9 @@ namespace corsika::process {
     using TProcessType = TDerived;
   };
 
-} // namespace corsika::process
+  // overwrite the default trait class, to mark BaseProcess<T> as useful process
+  template <class T>
+  std::true_type is_process_impl(const BaseProcess<T>* impl);
+
+} // namespace corsika
+
diff --git a/Framework/ProcessSequence/BoundaryCrossingProcess.h b/corsika/framework/sequence/BoundaryCrossingProcess.hpp
similarity index 61%
rename from Framework/ProcessSequence/BoundaryCrossingProcess.h
rename to corsika/framework/sequence/BoundaryCrossingProcess.hpp
index 6526648a8fc36f422ec22ebdea529e572c42ef95..057d156bcef5bcc6c35a7554527a96114cc6f5aa 100644
--- a/Framework/ProcessSequence/BoundaryCrossingProcess.h
+++ b/corsika/framework/sequence/BoundaryCrossingProcess.hpp
@@ -8,12 +8,15 @@
 
 #pragma once
 
-#include <corsika/process/BaseProcess.h>
-#include <corsika/process/ProcessReturn.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp>
 
-#include <type_traits>
+namespace corsika {
 
-namespace corsika::process {
+  template <typename TDerived>
+  struct BoundaryCrossingProcess {
+    auto& GetRef() { return static_cast<TDerived&>(*this); }
+    auto const& GetRef() const { return static_cast<const TDerived&>(*this); }
 
   template <typename TDerived>
   class BoundaryCrossingProcess : public BaseProcess<TDerived> {
@@ -29,4 +32,9 @@ namespace corsika::process {
                                       TVolumeNode const& to);
   };
 
-} // namespace corsika::process
+  template <class T>
+  std::true_type is_process_impl(BoundaryCrossingProcess<T> const* impl);
+
+} // namespace corsika
+
+
diff --git a/Framework/ProcessSequence/ContinuousProcess.h b/corsika/framework/sequence/ContinuousProcess.hpp
similarity index 74%
rename from Framework/ProcessSequence/ContinuousProcess.h
rename to corsika/framework/sequence/ContinuousProcess.hpp
index c4138a755264be14c3551ddbb310dceb2495231a..ec20510db22763d8a606b61f25cd3b61c305de88 100644
--- a/Framework/ProcessSequence/ContinuousProcess.h
+++ b/corsika/framework/sequence/ContinuousProcess.hpp
@@ -8,10 +8,10 @@
 
 #pragma once
 
-#include <corsika/process/BaseProcess.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp> // for convenience
 
-namespace corsika::process {
+namespace corsika {
 
   /**
      \class ContinuousProcess
@@ -37,4 +37,10 @@ namespace corsika::process {
     units::si::LengthType MaxStepLength(TParticle const& p, TTrack const& track) const;
   };
 
-} // namespace corsika::process
+  // overwrite the default trait class, to mark BaseProcess<T> as useful process
+  template <class T>
+  std::true_type is_process_impl(const ContinuousProcess<T>* impl);
+
+} // namespace corsika
+
+
diff --git a/Framework/ProcessSequence/DecayProcess.h b/corsika/framework/sequence/DecayProcess.hpp
similarity index 84%
rename from Framework/ProcessSequence/DecayProcess.h
rename to corsika/framework/sequence/DecayProcess.hpp
index 09ba807434de88dbbe1952ebf1c86de7e260d0ed..5b238fda5b2814c72c6655f263e3c3af4bd299d7 100644
--- a/Framework/ProcessSequence/DecayProcess.h
+++ b/corsika/framework/sequence/DecayProcess.hpp
@@ -8,10 +8,13 @@
 
 #pragma once
 
-#include <corsika/process/BaseProcess.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <type_traits>
 
-namespace corsika::process {
+#include <corsika/setup/SetupTrajectory.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include "corsika/framework/sequence/ProcessReturn.hpp" // for convenience
+
+namespace corsika {
 
   /**
      \class DecayProcess
@@ -46,4 +49,4 @@ namespace corsika::process {
       }*/
   };
 
-} // namespace corsika::process
+} // namespace corsika
diff --git a/Framework/ProcessSequence/InteractionProcess.h b/corsika/framework/sequence/InteractionProcess.hpp
similarity index 73%
rename from Framework/ProcessSequence/InteractionProcess.h
rename to corsika/framework/sequence/InteractionProcess.hpp
index e70729db8d2ae7ba3149b1f42ade39d78aaf29b5..153364e303ff519828881a2e9280d456eb73c900 100644
--- a/Framework/ProcessSequence/InteractionProcess.h
+++ b/corsika/framework/sequence/InteractionProcess.hpp
@@ -8,10 +8,13 @@
 
 #pragma once
 
-#include <corsika/process/BaseProcess.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <type_traits>
 
-namespace corsika::process {
+#include <corsika/setup/SetupTrajectory.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp> // for convenience
+
+namespace corsika {
 
   /**
      \class InteractionProcess
@@ -42,4 +45,9 @@ namespace corsika::process {
     }
   };
 
-} // namespace corsika::process
+  // overwrite the default trait class, to mark BaseProcess<T> as useful process
+  template <class T>
+  std::true_type is_process_impl(const InteractionProcess<T>* impl);
+
+} // namespace corsika
+
diff --git a/Framework/ProcessSequence/ProcessReturn.h b/corsika/framework/sequence/ProcessReturn.hpp
similarity index 69%
rename from Framework/ProcessSequence/ProcessReturn.h
rename to corsika/framework/sequence/ProcessReturn.hpp
index c4e7d5890411e461b8d50c4b31d44e6803b6c8d2..e54877fab39f7a5bb1e43711fef10b9d01d97509 100644
--- a/Framework/ProcessSequence/ProcessReturn.h
+++ b/corsika/framework/sequence/ProcessReturn.hpp
@@ -8,7 +8,7 @@
 
 #pragma once
 
-namespace corsika::process {
+namespace corsika {
 
   /**
      since in a process sequence many status updates can accumulate
@@ -39,20 +39,5 @@ namespace corsika::process {
     return (static_cast<int>(a) & static_cast<int>(b)) != 0;
   }
 
-  inline bool isOk(const EProcessReturn a) {
-    return static_cast<int>(a & EProcessReturn::eOk);
-  }
-
-  inline bool isAbsorbed(const EProcessReturn a) {
-    return static_cast<int>(a & EProcessReturn::eParticleAbsorbed);
-  }
-
-  inline bool isDecayed(const EProcessReturn a) {
-    return static_cast<int>(a & EProcessReturn::eDecayed);
-  }
-
-  inline bool isInteracted(const EProcessReturn a) {
-    return static_cast<int>(a & EProcessReturn::eInteracted);
-  }
+} // namespace corsika
 
-} // namespace corsika::process
diff --git a/corsika/framework/sequence/ProcessSequence.hpp b/corsika/framework/sequence/ProcessSequence.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..4ef3effef8359888e5ffc2bac164f97441411ef5
--- /dev/null
+++ b/corsika/framework/sequence/ProcessSequence.hpp
@@ -0,0 +1,175 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <cmath>
+#include <limits>
+#include <type_traits>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/sequence/BaseProcess.hpp>
+#include <corsika/framework/sequence/BoundaryCrossingProcess.hpp>
+#include <corsika/framework/sequence/ContinuousProcess.hpp>
+#include <corsika/framework/sequence/DecayProcess.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp>
+#include <corsika/framework/sequence/SecondariesProcess.hpp>
+#include <corsika/framework/sequence/StackProcess.hpp>
+
+namespace corsika {
+
+  /**
+   * FIXME
+     \class ProcessSequence
+
+     A compile time static list of processes. The compiler will
+     generate a new type based on template logic containing all the
+     elements provided by the user.
+
+     TProcess1 and TProcess2 must both be derived from BaseProcess,
+     and are both references if possible (lvalue), otherwise (rvalue)
+     they are just classes. This allows us to handle both, rvalue as
+     well as lvalue Processes in the ProcessSequence.
+
+     \comment Using CRTP pattern,
+     https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern
+   */
+  template <typename TProcess1, typename TProcess2 = NullModel>
+  class ProcessSequence : public BaseProcess<ProcessSequence<TProcess1, TProcess2>> {
+
+    using TProcess1type = typename std::decay_t<TProcess1>;
+    using TProcess2type = typename std::decay_t<TProcess2>;
+
+    static bool constexpr t1ProcSeq = is_process_sequence_v<TProcess1type>;
+    static bool constexpr t2ProcSeq = is_process_sequence_v<TProcess2type>;
+
+    static bool constexpr t1SwitchProcSeq = is_switch_process_sequence_v<TProcess1type>;
+    static bool constexpr t2SwitchProcSeq = is_switch_process_sequence_v<TProcess2type>;
+
+    // make sure only BaseProcess types TProcess1/2 are passed
+    static_assert(std::is_base_of_v<BaseProcess<TProcess1type>, TProcess1type>,
+                  "can only use process derived from BaseProcess in "
+                  "ProcessSequence, for Process 1");
+    static_assert(std::is_base_of_v<BaseProcess<TProcess2type>, TProcess2type>,
+                  "can only use process derived from BaseProcess in "
+                  "ProcessSequence, for Process 2");
+
+    TProcess1 A_; // this is a reference, if possible
+    TProcess2 B_; // this is a reference, if possible
+
+  public:
+    ProcessSequence(TProcess1 in_A, TProcess2 in_B)
+        : A_(in_A)
+        , B_(in_B) {}
+
+    // example for a trait-based call:
+    // void Hello() const  { detail::CallHello<T1,T2>::Call(A, B); }
+
+    template <typename Particle, typename VTNType>
+    EProcessReturn DoBoundaryCrossing(Particle& p, VTNType const& from,
+                                      VTNType const& to);
+
+    template <typename TParticle, typename TTrack>
+    EProcessReturn DoContinuous(TParticle& vP, TTrack& vT) ;
+
+    template <typename TSecondaries>
+    EProcessReturn DoSecondaries(TSecondaries& vS) ;
+
+    /**
+       The processes of type StackProcess do have an internal counter,
+       so they can be exectuted only each N steps. Often these are
+       "maintenacne processes" that do not need to run after each
+       single step of the simulations. In the CheckStep function it is
+       tested if either A_ or B_ are StackProcess and if they are due
+       for execution.
+     */
+    bool CheckStep() ;
+
+    /**
+       Execute the StackProcess-es in the ProcessSequence
+     */
+    template <typename TStack>
+    EProcessReturn DoStack(TStack& vS);
+
+    template <typename TParticle, typename TTrack>
+    corsika::units::si::LengthType MaxStepLength(TParticle& vP, TTrack& vTrack) ;
+    template <typename TParticle>
+    corsika::units::si::GrammageType GetTotalInteractionLength(TParticle& vP);
+
+    template <typename TParticle>
+    inline corsika::units::si::InverseGrammageType GetTotalInverseInteractionLength(
+        TParticle& vP) ;
+
+    template <typename TParticle>
+    inline corsika::units::si::InverseGrammageType GetInverseInteractionLength(TParticle& vP) ;
+
+    template <typename TParticle, typename TSecondaries>
+    EProcessReturn SelectInteraction(
+        TParticle& vP, TSecondaries& vS,
+        [[maybe_unused]] corsika::units::si::InverseGrammageType lambda_select,
+        corsika::units::si::InverseGrammageType& lambda_inv_count);
+
+    template <typename TParticle>
+    corsika::units::si::TimeType GetTotalLifetime(TParticle& p) ;
+
+    template <typename TParticle>
+    corsika::units::si::InverseTimeType GetTotalInverseLifetime(TParticle& p) ;
+
+    template <typename TParticle>
+    corsika::units::si::InverseTimeType GetInverseLifetime(TParticle& p) ;
+
+    // select decay process
+    template <typename TParticle, typename TSecondaries>
+    EProcessReturn SelectDecay(
+        TParticle& vP, TSecondaries& vS,
+        [[maybe_unused]] corsika::units::si::InverseTimeType decay_select,
+        corsika::units::si::InverseTimeType& decay_inv_count) ;
+
+    void Init() {
+      A.Init();
+      B.Init();
+    }
+  };
+
+  /**
+   * \function sequence
+   *
+   * to construct ProcessSequences in a flexible and dynamic way the
+   * `sequence` factory functions are provided
+   *
+   * Any objects of type
+   *  - BaseProcess,
+   *  - ContinuousProcess, and
+   *  - Interaction/DecayProcess,
+   *  - StackProcess,
+   *  - SecondariesProcess
+   * can be assembled into a ProcessSequence, all
+   * combinatorics are allowed.
+
+   * The sequence function checks that all its arguments are all of
+   * types derived from BaseProcess. Also the ProcessSequence itself
+   * is derived from type BaseProcess
+   **/
+
+  template <typename... TProcesses, typename TProcess1>
+  inline typename std::enable_if_t<
+      std::is_base_of_v<BaseProcess<typename std::decay_t<TProcess1>>,
+                        typename std::decay_t<TProcess1>>,
+      ProcessSequence<TProcess1, decltype(sequence(std::declval<TProcesses>()...))>>
+  sequence(TProcess1&& vA, TProcesses&&... vBs) {
+    return ProcessSequence<TProcess1, decltype(sequence(std::declval<TProcesses>()...))>(
+        vA, sequence(std::forward<TProcesses>(vBs)...));
+  }
+
+  /// marker to identify objectas ProcessSequence
+  template <typename A, typename B>
+  struct is_process_sequence<corsika::ProcessSequence<A, B>> : std::true_type {};
+
+} // namespace corsika
+
+#include<corsika/detail/framework/sequence/ProcessSequence.inl>
diff --git a/Framework/ProcessSequence/ProcessSignature.h b/corsika/framework/sequence/ProcessSignature.hpp
similarity index 99%
rename from Framework/ProcessSequence/ProcessSignature.h
rename to corsika/framework/sequence/ProcessSignature.hpp
index 346e8a33cc2bb3898c5cce5153cac573d4ee7bd0..56148548adb8b557c57d33731eaa4f6cd04914f1 100644
--- a/Framework/ProcessSequence/ProcessSignature.h
+++ b/corsika/framework/sequence/ProcessSignature.hpp
@@ -24,3 +24,4 @@
   }
 
 // FORCE_SIGNATURE(thisMustBeDefined, T::thisMustBeDefined, int(*)(void));
+
diff --git a/Framework/ProcessSequence/SecondariesProcess.h b/corsika/framework/sequence/SecondariesProcess.hpp
similarity index 66%
rename from Framework/ProcessSequence/SecondariesProcess.h
rename to corsika/framework/sequence/SecondariesProcess.hpp
index a9bc3832a2e8a82949a6d03c3b9c1c5d44a49828..ecedb02e5a9126e5990b1f9a5985d5c0dd7b287c 100644
--- a/Framework/ProcessSequence/SecondariesProcess.h
+++ b/corsika/framework/sequence/SecondariesProcess.hpp
@@ -8,10 +8,11 @@
 
 #pragma once
 
-#include <corsika/process/BaseProcess.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/setup/SetupTrajectory.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp> // for convenience
 
-namespace corsika::process {
+namespace corsika {
 
   /**
      \class SecondariesProcess
@@ -31,4 +32,9 @@ namespace corsika::process {
     inline void DoSecondaries(TSecondaries&);
   };
 
-} // namespace corsika::process
+  // overwrite the default trait class, to mark BaseProcess<T> as useful process
+  template <class T>
+  std::true_type is_process_impl(const SecondariesProcess<T>* impl);
+
+} // namespace corsika
+
diff --git a/Framework/ProcessSequence/StackProcess.h b/corsika/framework/sequence/StackProcess.hpp
similarity index 76%
rename from Framework/ProcessSequence/StackProcess.h
rename to corsika/framework/sequence/StackProcess.hpp
index ce5c0998df246ed5ceb20bed618b40814a79077f..6e503d68aa2ec734cdeb5227665983a123d74bae 100644
--- a/Framework/ProcessSequence/StackProcess.h
+++ b/corsika/framework/sequence/StackProcess.hpp
@@ -8,10 +8,11 @@
 
 #pragma once
 
-#include <corsika/process/BaseProcess.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/setup/SetupTrajectory.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/sequence/ProcessReturn.hpp> // for convenience
 
-namespace corsika::process {
+namespace corsika {
 
   /**
      \class StackProcess
@@ -51,4 +52,8 @@ namespace corsika::process {
     //! @}
   };
 
-} // namespace corsika::process
+  // overwrite the default trait class, to mark BaseProcess<T> as useful process
+  template <class T>
+  std::true_type is_process_impl(const StackProcess<T>* impl);
+
+} // namespace corsika
diff --git a/Framework/StackInterface/CombinedStack.h b/corsika/framework/stack/CombinedStack.hpp
similarity index 59%
rename from Framework/StackInterface/CombinedStack.h
rename to corsika/framework/stack/CombinedStack.hpp
index d8cecfd57bdf2fe43d549dffd1e4432818a6f961..8bbe41e6d48e4f712b0d478767d1c7ebd9d28061 100644
--- a/Framework/StackInterface/CombinedStack.h
+++ b/corsika/framework/stack/CombinedStack.hpp
@@ -8,12 +8,11 @@
 
 #pragma once
 
-#include <corsika/logging/Logging.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/stack/Stack.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/stack/Stack.hpp>
 
-namespace corsika::stack {
+namespace corsika {
 
   /**
    * @class CombinedParticleInterface
@@ -38,6 +37,12 @@ namespace corsika::stack {
   class CombinedParticleInterface
       : public ParticleInterfaceB<ParticleInterfaceA<StackIterator>> {
 
+    //FIXME: class has no ctors, assignment operators etc.
+
+    // template<template <typename> typename _PI>
+    // template <typename StackDataType, template <typename> typename ParticleInterface>
+    // template<typename T1, template <typename> typename T2> friend class Stack<T1, T2>;
+
     using PI_C =
         CombinedParticleInterface<ParticleInterfaceA, ParticleInterfaceB, StackIterator>;
     using PI_A = ParticleInterfaceA<StackIterator>;
@@ -65,28 +70,17 @@ namespace corsika::stack {
      */
 
     template <typename... Args1>
-    void SetParticleData(const std::tuple<Args1...> vA) {
-      PI_A::SetParticleData(vA);
-      PI_B::SetParticleData();
-    }
+    void SetParticleData(const std::tuple<Args1...> vA) ;
+
     template <typename... Args1, typename... Args2>
-    void SetParticleData(const std::tuple<Args1...> vA, const std::tuple<Args2...> vB) {
-      PI_A::SetParticleData(vA);
-      PI_B::SetParticleData(vB);
-    }
+    void SetParticleData(const std::tuple<Args1...> vA, const std::tuple<Args2...> vB) ;
 
     template <typename... Args1>
-    void SetParticleData(PI_C& p, const std::tuple<Args1...> vA) {
-      // static_assert(MT<I>::has_not, "error");
-      PI_A::SetParticleData(static_cast<PI_A&>(p), vA); // original stack
-      PI_B::SetParticleData(static_cast<PI_B&>(p));     // addon stack
-    }
+    void SetParticleData(PI_C& p, const std::tuple<Args1...> vA) ;
+
     template <typename... Args1, typename... Args2>
     void SetParticleData(PI_C& p, const std::tuple<Args1...> vA,
-                         const std::tuple<Args2...> vB) {
-      PI_A::SetParticleData(static_cast<PI_A&>(p), vA);
-      PI_B::SetParticleData(static_cast<PI_B&>(p), vB);
-    }
+                         const std::tuple<Args2...> vB) ;
     ///@}
 
     std::string as_string() const {
@@ -94,6 +88,8 @@ namespace corsika::stack {
     }
   };
 
+  namespace detail {
+
   /**
    * @class CombinedStackImpl
    *
@@ -104,54 +100,9 @@ namespace corsika::stack {
    * access to the combined number of data entries.
    */
   template <typename Stack1Impl, typename Stack2Impl>
-  class CombinedStackImpl : public Stack1Impl, public Stack2Impl {
-
-  public:
-    void Clear() {
-      Stack1Impl::Clear();
-      Stack2Impl::Clear();
-    }
-
-    unsigned int GetSize() const { return Stack1Impl::GetSize(); }
-    unsigned int GetCapacity() const { return Stack1Impl::GetCapacity(); }
+  class CombinedStackImpl ;
 
-    /**
-     *   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();
-    }
-
-  }; // end class CombinedStackImpl
+}  // namespace detail
 
   /**
    * Helper template alias `CombinedStack` to construct new combined
@@ -163,6 +114,8 @@ namespace corsika::stack {
    */
 
   template <typename Stack1Impl, typename Stack2Impl, template <typename> typename _PI>
-  using CombinedStack = Stack<CombinedStackImpl<Stack1Impl, Stack2Impl>, _PI>;
+  using CombinedStack = Stack<detail::CombinedStackImpl<Stack1Impl, Stack2Impl>, _PI>;
+
+} // namespace corsika
 
-} // namespace corsika::stack
+#include <corsika/detail/framework/stack/CombinedStack.inl>
diff --git a/Framework/StackInterface/ParticleBase.h b/corsika/framework/stack/ParticleBase.hpp
similarity index 98%
rename from Framework/StackInterface/ParticleBase.h
rename to corsika/framework/stack/ParticleBase.hpp
index 1bf7d0ad8834eddd51971feffcd4db0fd23fabb6..067f54afb90449f0c9208007be118cd212f26bd6 100644
--- a/Framework/StackInterface/ParticleBase.h
+++ b/corsika/framework/stack/ParticleBase.hpp
@@ -8,7 +8,9 @@
 
 #pragma once
 
-namespace corsika::stack {
+#include <type_traits>
+
+namespace corsika {
 
   /**
    @class ParticleBase
@@ -105,4 +107,4 @@ namespace corsika::stack {
     ///@}
   };
 
-} // namespace corsika::stack
+} // namespace corsika
diff --git a/Framework/StackInterface/SecondaryView.h b/corsika/framework/stack/SecondaryView.hpp
similarity index 79%
rename from Framework/StackInterface/SecondaryView.h
rename to corsika/framework/stack/SecondaryView.hpp
index 709a8c4feb658659f9369f938490b7101e91b1da..a45a6d4fc3fbccd6dcc39f5687d26f6a01696d95 100644
--- a/Framework/StackInterface/SecondaryView.h
+++ b/corsika/framework/stack/SecondaryView.hpp
@@ -8,14 +8,13 @@
 
 #pragma once
 
-#include <corsika/stack/Stack.h>
-
-#include <corsika/logging/Logging.h>
-
 #include <stdexcept>
 #include <vector>
+#include <type_traits>
+#include <corsika/framework/stack/Stack.hpp>
+#include <corsika/framework/stack/StackIteratorInterface.hpp>
 
-namespace corsika::stack {
+namespace corsika {
 
   // forward-decl:
   template <class T1, template <class> class T2>
@@ -196,11 +195,7 @@ namespace corsika::stack {
      * Method to add a new secondary particle on this SecondaryView
      */
     template <typename... Args>
-    StackIterator AddSecondary(const Args... v) {
-      C8LOG_TRACE("SecondaryView::AddSecondary(Args&&)");
-      StackIterator proj = GetProjectile(); // make this const
-      return AddSecondary(proj, v...);
-    }
+    auto AddSecondary(const Args... v) ;
 
   protected:
     /**
@@ -213,24 +208,7 @@ namespace corsika::stack {
      * StackIterator::AddSecondary via ParticleBase
      */
     template <typename... Args>
-    StackIterator AddSecondary(StackIterator& proj, const Args... v) {
-      C8LOG_TRACE("SecondaryView::AddSecondary(StackIterator&, Args&&)");
-      // make space on stack
-      InnerStackTypeRef::GetStackData().IncrementSize();
-      inner_stack_.deleted_.push_back(false);
-      // get current number of secondaries on stack
-      const unsigned int idSec = getSize();
-      // determine index on (inner) stack where new particle will be located
-      const unsigned int index = InnerStackTypeRef::GetStackData().GetSize() - 1;
-      indices_.push_back(index);
-      // NOTE: "+1" is since "0" is special marker here for PROJECTILE, see
-      // GetIndexFromIterator
-      auto sec = StackIterator(*this, idSec + 1, proj, v...);
-      MSecondaryProducer<StackDataType, ParticleInterface>::new_secondary(sec);
-      return sec;
-    }
-
-  public:
+    auto AddSecondary(StackIterator& proj, const Args... v) ;
     /**
      * overwrite Stack::GetSize to return actual number of secondaries
      */
@@ -327,27 +305,13 @@ namespace corsika::stack {
      * remove the last particle.
      *
      */
-    void Delete(StackIterator p) {
-      C8LOG_TRACE("SecondaryView::Delete");
-      if (IsEmpty()) { /*error*/
-        throw std::runtime_error("Stack, cannot delete entry since size is zero");
-      }
-      if (isDeleted(p.GetIndex() - 1)) { /*error*/
-        throw std::runtime_error("Stack, cannot delete entry since already deleted");
-      }
-      inner_stack_.Delete(GetIndexFromIterator(p.GetIndex()));
-      InnerStackTypeRef::nDeleted_++; // also count in SecondaryView
-    }
+    inline void Delete(StackIterator p);
 
     /**
      * return next particle from stack, need to overwrtie Stack::GetNextParticle to get
      * right reference
      */
-    StackIterator GetNextParticle() {
-      while (purgeLastIfDeleted()) {}
-      return last();
-    }
-
+    inline void Delete(ParticleInterfaceType p) ;
     /**
      * check if this particle was already deleted
      *
@@ -361,24 +325,14 @@ namespace corsika::stack {
     /**
      * delete this particle
      */
-    bool isDeleted(const ParticleInterfaceType& p) const {
-      return isDeleted(p.GetIterator());
-    }
+    inline void DeleteLast() ;
 
     /**
      * Function to ultimatively remove the last entry from the stack,
      * if it was marked as deleted before. If this is not the case,
      * the function will just return false and do nothing.
      */
-    bool purgeLastIfDeleted() {
-      C8LOG_TRACE("SecondaryView::purgeLastIfDeleted");
-      if (!isDeleted(getSize() - 1))
-        return false; // the last particle is not marked for deletion. Do nothing.
-      inner_stack_.purge(GetIndexFromIterator(getSize()));
-      InnerStackTypeRef::nDeleted_--;
-      indices_.pop_back();
-      return true;
-    }
+    inline StackIterator GetNextParticle() { return last(); }
 
     /**
      * Function to ultimatively remove all entries from the stack
@@ -388,34 +342,7 @@ namespace corsika::stack {
      * "gaps" in the stack are filled with entries from the back
      * (copied).
      */
-    void purge() {
-      unsigned int iStack = 0;
-      unsigned int size = getSize();
-      while (iStack < size) {
-        if (isDeleted(iStack)) {
-          inner_stack_.purge(iStack);
-          indices_.erase(indices_.begin() + iStack);
-        }
-        size = getSize();
-        iStack++;
-      }
-      InnerStackTypeRef::nDeleted_ = 0;
-    }
-
-    std::string as_string() const {
-      std::string str(fmt::format("size {}\n", getSize()));
-      // we make our own begin/end since we want ALL entries
-      std::string new_line = "     ";
-      for (unsigned int iPart = 0; iPart != getSize(); ++iPart) {
-        ConstStackIterator itPart(*this, iPart);
-        str += fmt::format(
-            "{}{}{}", new_line, itPart.as_string(),
-            (inner_stack_.deleted_[GetIndexFromIterator(itPart.GetIndex())] ? " [deleted]"
-                                                                            : ""));
-        new_line = "\n     ";
-      }
-      return str;
-    }
+    inline bool IsEmpty() { return GetSize() == 0; }
 
   protected:
     // forward to inner stack
@@ -430,13 +357,7 @@ namespace corsika::stack {
      * function the conversion form iterator-index to stack-index is
      * performed.
      */
-    unsigned int GetIndexFromIterator(const unsigned int vI) const {
-      // this is too much: C8LOG_TRACE("SecondaryView::GetIndexFromIterator({})={}", vI,
-      // (vI?indices_[vI-1]:projectile_index_));
-      if (vI == 0) return projectile_index_;
-      return indices_[vI - 1];
-    }
-  };
+    inline unsigned int GetIndexFromIterator(const unsigned int vI) const;
 
   /**
    * Class to handle the generation of new secondaries. Used as default mix-in for
@@ -489,9 +410,10 @@ namespace corsika::stack {
             class MSecondaryProducer = corsika::stack::DefaultSecondaryProducer,
             template <typename> typename MPIType_ = TStack::template MPIType>
   struct MakeView {
-    using type = corsika::stack::SecondaryView<typename TStack::StackImpl, MPIType_,
-                                               MSecondaryProducer>;
+    using type = corsika::SecondaryView<typename S::StackImpl, _PIType>;
   };
 #endif
 
-} // namespace corsika::stack
+} // namespace corsika
+
+#include <corsika/detail/framework/stack/SecondaryView.inl>
diff --git a/Framework/StackInterface/Stack.h b/corsika/framework/stack/Stack.hpp
similarity index 92%
rename from Framework/StackInterface/Stack.h
rename to corsika/framework/stack/Stack.hpp
index 85ec6418fe0898573b3db16d9d52e867404d3b76..4f20d4a7e1da72236d81369030129a75478b6b25 100644
--- a/Framework/StackInterface/Stack.h
+++ b/corsika/framework/stack/Stack.hpp
@@ -8,19 +8,20 @@
 
 #pragma once
 
-#include <corsika/logging/Logging.h>
-#include <corsika/stack/StackIteratorInterface.h>
-#include <corsika/utl/MetaProgramming.h>
-
+#include <corsika/framework/stack/StackIteratorInterface.hpp>
+// must be after StackIteratorInterface
 #include <stdexcept>
 #include <string>
 #include <vector>
 
+#include <corsika/framework/utility/MetaProgramming.hpp>
+#include <corsika/framework/stack/SecondaryView.hpp>
+
 /**
    All classes around management of particles on a stack.
  */
 
-namespace corsika::stack {
+namespace corsika {
 
   /**
      This is just a forward declatation for the user-defined
@@ -71,11 +72,9 @@ namespace corsika::stack {
      * if TStackData is a reference member we *HAVE* to initialize
      * it in the constructor, this is typically needed for SecondaryView
      */
-    template <typename _ = TStackData, typename = utl::enable_if<std::is_reference<_>>>
-    Stack(TStackData vD)
-        : data_(vD)
-        , deleted_(std::vector<bool>(data_.GetSize(), false))
-        , nDeleted_(0) {}
+    template <typename _ = StackDataType, typename = corsika::enable_if<std::is_reference<_>>>
+    Stack(StackDataType vD)
+        : fData(vD) {}
 
     /**
      * This constructor takes any argument and passes it on to the
@@ -86,12 +85,10 @@ namespace corsika::stack {
      * stacks, where the inner data container is always a reference
      * and cannot be initialized here.
      */
-    template <typename... TArgs, typename _ = TStackData,
-              typename = utl::disable_if<std::is_reference<_>>>
-    Stack(TArgs... args)
-        : data_(args...)
-        , deleted_(std::vector<bool>(data_.GetSize(), false))
-        , nDeleted_(0) {}
+    template <typename... Args, typename _ = StackDataType,
+              typename = corsika::disable_if<std::is_reference<_>>>
+    Stack(Args... args)
+        : fData(args...) {}
 
   public:
     typedef TStackData
@@ -141,15 +138,17 @@ namespace corsika::stack {
      * @name Most generic proxy methods for TStackData data_
      * @{
      */
-    unsigned int GetCapacity() const { return data_.GetCapacity(); }
-    unsigned int getDeleted() const { return nDeleted_; }
-    unsigned int getEntries() const { return getSize() - getDeleted(); }
+    unsigned int GetCapacity() const { return fData.GetCapacity(); }
+    unsigned int GetSize() const { return fData.GetSize(); }
 
-    template <typename... TArgs>
-    void Clear(TArgs... args) {
-      data_.Clear(args...);
-      deleted_ = std::vector<bool>(data_.GetSize(), false);
-      nDeleted_ = 0;
+    template <typename... Args>
+    auto Init(Args... args) {
+      return fData.Init(args...);
+    }
+
+    template <typename... Args>
+    auto Clear(Args... args) {
+      return fData.Clear(args...);
     }
     ///@}
 
@@ -409,4 +408,6 @@ namespace corsika::stack {
     ///@}
   };
 
-} // namespace corsika::stack
+} // namespace corsika
+
+
diff --git a/Framework/StackInterface/StackIteratorInterface.h b/corsika/framework/stack/StackIteratorInterface.hpp
similarity index 92%
rename from Framework/StackInterface/StackIteratorInterface.h
rename to corsika/framework/stack/StackIteratorInterface.hpp
index 6c4901084843c568016450205435884d3e6bb972..d725862397ca3e382c60816229d4c71b3143f0f3 100644
--- a/Framework/StackInterface/StackIteratorInterface.h
+++ b/corsika/framework/stack/StackIteratorInterface.hpp
@@ -8,14 +8,9 @@
 
 #pragma once
 
-#include <corsika/stack/ParticleBase.h>
+#include <corsika/framework/stack/ParticleBase.hpp>
 
-namespace corsika::history {
-  template <typename T, template <typename> typename ParticleInterface>
-  class HistorySecondaryProducer; // forward decl.
-}
-
-namespace corsika::stack {
+namespace corsika {
 
   template <typename TStackData, template <typename> typename TParticleInterface>
   class Stack; // forward decl
@@ -63,8 +58,8 @@ namespace corsika::stack {
      vIndex).
 
      For two examples see stack_example.cc, or the
-     corsika::processes::sibyll::SibStack class
-  **/
+     corsikaes::sibyll::SibStack class
+  */
 
   template <typename TStackData, template <typename> typename TParticleInterface,
             typename StackType = Stack<TStackData, TParticleInterface>>
@@ -74,8 +69,8 @@ namespace corsika::stack {
 
   public:
     using ParticleInterfaceType =
-        TParticleInterface<corsika::stack::StackIteratorInterface<
-            TStackData, TParticleInterface, StackType>>;
+        ParticleInterface<corsika::StackIteratorInterface<
+            StackDataType, ParticleInterface, StackType>>;
 
     // friends are needed for access to protected methods
     friend class Stack<TStackData,
@@ -360,20 +355,5 @@ namespace corsika::stack {
     ///@}
   }; // end class ConstStackIterator
 
-  template <typename TStackData, template <typename> typename TParticleInterface,
-            typename StackType>
-  bool StackIteratorInterface<TStackData, TParticleInterface, StackType>::operator==(
-      const ConstStackIteratorInterface<TStackData, TParticleInterface, StackType>& rhs)
-      const {
-    return index_ == rhs.index_;
-  }
-
-  template <typename TStackData, template <typename> typename TParticleInterface,
-            typename StackType>
-  bool StackIteratorInterface<TStackData, TParticleInterface, StackType>::operator!=(
-      const ConstStackIteratorInterface<TStackData, TParticleInterface, StackType>& rhs)
-      const {
-    return index_ != rhs.index_;
-  }
+} // namespace corsika
 
-} // namespace corsika::stack
diff --git a/Framework/Utilities/Bit.h b/corsika/framework/utility/Bit.hpp
similarity index 97%
rename from Framework/Utilities/Bit.h
rename to corsika/framework/utility/Bit.hpp
index 1443ddf9b3a06acd6c434180ca7c103e1d5914d7..94faa5dc778348d19bae65bf7cb0ef9c202b0608 100644
--- a/Framework/Utilities/Bit.h
+++ b/corsika/framework/utility/Bit.hpp
@@ -21,7 +21,7 @@
 
 // #include <utl/AugerException.h>
 
-namespace corsika::utl {
+namespace corsika {
 
   namespace Bit {
 
@@ -88,4 +88,5 @@ namespace corsika::utl {
     return Bit::Array<T>(target);
   }
 
-} // namespace corsika::utl
+} // namespace corsika
+
diff --git a/corsika/framework/utility/COMBoost.hpp b/corsika/framework/utility/COMBoost.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..04232fe6eb88d8cfbe15c1685d800f80302f99ae
--- /dev/null
+++ b/corsika/framework/utility/COMBoost.hpp
@@ -0,0 +1,52 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <iostream>
+
+#include <Eigen/Dense>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+
+namespace corsika {
+
+  /**
+     This utility class handles Lorentz boost between different
+     referenence frames, using FourVectors.
+   */
+
+  class COMBoost {
+    Eigen::Matrix3d fRotation;
+    Eigen::Matrix2d fBoost, fInverseBoost;
+    corsika::CoordinateSystem const& fCS;
+
+  public:
+    //! construct a COMBoost given four-vector of prjectile and mass of target
+    COMBoost(
+        const corsika::FourVector<
+            corsika::units::si::HEPEnergyType,
+            corsika::Vector<corsika::units::si::hepmomentum_d>>& Pprojectile,
+        const corsika::units::si::HEPEnergyType massTarget);
+
+    auto const& GetRotationMatrix() const;
+
+    //! transforms a 4-momentum from lab frame to the center-of-mass frame
+    template <typename FourVector>
+    FourVector toCoM(const FourVector& p) const ;
+
+    //! transforms a 4-momentum from the center-of-mass frame back to lab frame
+    template <typename FourVector>
+    FourVector fromCoM(const FourVector& p) const ;
+  };
+} // namespace corsika
+
+#include <corsika/detail/framework/utility/COMBoost.inl>
diff --git a/Framework/Utilities/CorsikaFenv.h b/corsika/framework/utility/CorsikaFenv.hpp
similarity index 100%
rename from Framework/Utilities/CorsikaFenv.h
rename to corsika/framework/utility/CorsikaFenv.hpp
diff --git a/Framework/Utilities/MetaProgramming.h b/corsika/framework/utility/MetaProgramming.hpp
similarity index 77%
rename from Framework/Utilities/MetaProgramming.h
rename to corsika/framework/utility/MetaProgramming.hpp
index 689357769ebf357fe6cd085a1336e71d89a4fbb0..9bd9688b4f457fa0c88fd3fe745250110f233df3 100644
--- a/Framework/Utilities/MetaProgramming.h
+++ b/corsika/framework/utility/MetaProgramming.hpp
@@ -16,14 +16,14 @@
   Tools to emulate conditional compilation of method overloads.
 
   ```
-  #include <corsika/utl/MetaProgramming.h>
+  #include <corsika/framework/utility/MetaProgramming.h>
 
   template <class T>
   struct Foo {
-    template <class U, class = corsika::utl::enable_if<std::reference<U>>>
+    template <class U, class = corsika::enable_if<std::reference<U>>>
     void enable_only_if_U_is_reference(U x) {}
 
-    template <class _ = T, class = corsika::utl::disable_if<std::reference<_>>>
+    template <class _ = T, class = corsika::disable_if<std::reference<_>>>
     void enable_only_if_T_is_not_reference() {}
   };
   ```
@@ -31,12 +31,12 @@
   To combine traits, use boost::mp11::mp_and or boost::mp11::mp_or.
 
   ```
-  #include <corsika/utl/MetaProgramming.h>
+  #include <corsika/framework/utility/MetaProgramming.h>
   #include <boost/mp11.hpp>
 
   template <class T>
   struct Foo {
-    template <class U, class = corsika::utl::enable_if<
+    template <class U, class = corsika::enable_if<
       boost::mp11::mp_and<std::is_reference<T>, std::is_const<T>>
     >
     void enable_only_if_U_is_const_reference(U x) {}
@@ -51,10 +51,11 @@
 }
 */
 
-namespace corsika::utl {
+namespace corsika {
   template <class Trait>
   using enable_if = typename std::enable_if<(Trait::value == true)>::type;
 
   template <class Trait>
   using disable_if = typename std::enable_if<(Trait::value == false)>::type;
-} // namespace corsika::utl
+} // namespace corsika
+
diff --git a/Framework/Utilities/Singleton.h b/corsika/framework/utility/Singleton.hpp
similarity index 93%
rename from Framework/Utilities/Singleton.h
rename to corsika/framework/utility/Singleton.hpp
index 68667df8d82a0090639b528daac1f19bf392c4ce..801c3f5e59a68ab1ba457d1825d8de322f4a4cf4 100644
--- a/Framework/Utilities/Singleton.h
+++ b/corsika/framework/utility/Singleton.hpp
@@ -10,7 +10,7 @@
 
 //#define OFFLINE_USE_GAMMA_SINGLETON
 
-namespace corsika::utl {
+namespace corsika {
   /**
    * \class Singleton Singleton.h utl/Singleton.h
    *
@@ -18,7 +18,7 @@ namespace corsika::utl {
    *
    * The singleton class is implemented as follows
    * \code
-   * #include <utl/Singleton.h>
+   * #include <utl/Singleton.hpp>
    *
    * class SomeClass : public utl::Singleton<SomeClass> {
    *   ...
@@ -55,4 +55,5 @@ namespace corsika::utl {
     ~Singleton() {}
   };
 
-} // namespace corsika::utl
+} // namespace corsika
+
diff --git a/Framework/Utilities/COMBoost.cc b/corsika/framework/utility/detail/COMBoost.cc
similarity index 100%
rename from Framework/Utilities/COMBoost.cc
rename to corsika/framework/utility/detail/COMBoost.cc
diff --git a/corsika/framework/utility/detail/COMBoost.inl b/corsika/framework/utility/detail/COMBoost.inl
new file mode 100644
index 0000000000000000000000000000000000000000..95ac32b4b6eee8940248ce30e4c912277b4013e5
--- /dev/null
+++ b/corsika/framework/utility/detail/COMBoost.inl
@@ -0,0 +1,125 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/utility/sgn.hpp>
+#include <Eigen/Dense>
+#include "../../core/PhysicalUnits.hpp"
+
+namespace corsika::utl {
+
+      auto const& COMBoost::GetRotationMatrix() const { return fRotation; }
+
+    //! transforms a 4-momentum from lab frame to the center-of-mass frame
+    template <typename FourVector>
+    FourVector COMBoost::toCoM(const FourVector& p) const {
+      using namespace corsika::units::si;
+      auto pComponents = p.GetSpaceLikeComponents().GetComponents(rotatedCS_);
+      Eigen::Vector3d eVecRotated = pComponents.eVector;
+      Eigen::Vector2d lab;
+
+      lab << (p.GetTimeLikeComponent() * (1 / 1_GeV)),
+          (eVecRotated(2) * (1 / 1_GeV).magnitude());
+
+      auto const boostedZ = boost_ * lab;
+      auto const E_CoM = boostedZ(0) * 1_GeV;
+
+      eVecRotated(2) = boostedZ(1) * (1_GeV).magnitude();
+
+      return FourVector(
+          E_CoM, corsika::geometry::Vector<hepmomentum_d>(rotatedCS_, eVecRotated));
+    }
+
+    //! transforms a 4-momentum from the center-of-mass frame back to lab frame
+    template <typename FourVector>
+    FourVector COMBoost::fromCoM(const FourVector& p) const {
+      using namespace corsika::units::si;
+      auto pCM = p.GetSpaceLikeComponents().GetComponents(rotatedCS_);
+      auto const Ecm = p.GetTimeLikeComponent();
+
+      Eigen::Vector2d com;
+      com << (Ecm * (1 / 1_GeV)), (pCM.eVector(2) * (1 / 1_GeV).magnitude());
+
+      C8LOG_TRACE(
+          "COMBoost::fromCoM Ecm={} GeV"
+          " pcm={} GeV (norm = {} GeV), invariant mass={} GeV",
+          Ecm / 1_GeV, pCM / 1_GeV, pCM.norm() / 1_GeV, p.GetNorm() / 1_GeV);
+
+      auto const boostedZ = inverseBoost_ * com;
+      auto const E_lab = boostedZ(0) * 1_GeV;
+
+      pCM.eVector(2) = boostedZ(1) * (1_GeV).magnitude();
+
+      geometry::Vector<typename decltype(pCM)::dimension> pLab{rotatedCS_, pCM};
+      pLab.rebase(originalCS_);
+
+      FourVector f(E_lab, pLab);
+
+      C8LOG_TRACE("COMBoost::fromCoM --> Elab={} GeV",
+                  " plab={} GeV (norm={} GeV) "
+                  " GeV), invariant mass = {}",
+                  E_lab / 1_GeV, f.GetNorm() / 1_GeV, pLab.GetComponents(),
+                  pLab.norm() / 1_GeV);
+
+      return f;
+    }
+
+    COMBoost::COMBoost(FourVector<HEPEnergyType, Vector<hepmomentum_d>> const& Pprojectile,
+                       const HEPMassType massTarget)
+        : fCS(Pprojectile.GetSpaceLikeComponents().GetCoordinateSystem()) {
+      auto const pProjectile = Pprojectile.GetSpaceLikeComponents();
+      auto const pProjNorm = pProjectile.norm();
+      auto const a = (pProjectile / pProjNorm).GetComponents().eVector;
+      auto const a1 = a(0), a2 = a(1);
+
+      auto const s = sgn(a(2));
+      auto const c = 1 / (1 + s * a(2));
+
+      Eigen::Matrix3d A, B;
+
+      if (s > 0) {
+        A << 1, 0, -a1,                     // comment to prevent clang-format
+            0, 1, -a2,                      // .
+            a1, a2, 1;                      // .
+        B << -a1 * a1 * c, -a1 * a2 * c, 0, // .
+            -a1 * a2 * c, -a2 * a2 * c, 0,  // .
+            0, 0, -(a1 * a1 + a2 * a2) * c; // .
+
+      } else {
+        A << 1, 0, a1,                      // comment to prevent clang-format
+            0, -1, -a2,                     // .
+            a1, a2, -1;                     // .
+        B << -a1 * a1 * c, -a1 * a2 * c, 0, // .
+            +a1 * a2 * c, +a2 * a2 * c, 0,  // .
+            0, 0, (a1 * a1 + a2 * a2) * c;  // .
+      }
+
+      fRotation = A + B;
+
+      // calculate boost
+      double const beta = pProjNorm / (Pprojectile.GetTimeLikeComponent() + massTarget);
+
+      /* Accurracy matters here, beta = 1 - epsilon for ultra-relativistic boosts */
+      double const coshEta = 1 / std::sqrt((1 + beta) * (1 - beta));
+      //~ double const coshEta = 1 / std::sqrt((1-beta*beta));
+      double const sinhEta = -beta * coshEta;
+
+      std::cout << "COMBoost (1-beta)=" << 1 - beta << " gamma=" << coshEta << std::endl;
+      std::cout << "  det = " << fRotation.determinant() - 1 << std::endl;
+
+      fBoost << coshEta, sinhEta, sinhEta, coshEta;
+
+      fInverseBoost << coshEta, -sinhEta, -sinhEta, coshEta;
+    }
+} // namespace corsika::utl
diff --git a/Framework/Utilities/CorsikaFenvDefault.cc b/corsika/framework/utility/detail/CorsikaFenvDefault.cc
similarity index 100%
rename from Framework/Utilities/CorsikaFenvDefault.cc
rename to corsika/framework/utility/detail/CorsikaFenvDefault.cc
diff --git a/Framework/Utilities/CorsikaFenvFallback.cc b/corsika/framework/utility/detail/CorsikaFenvFallback.inl
similarity index 89%
rename from Framework/Utilities/CorsikaFenvFallback.cc
rename to corsika/framework/utility/detail/CorsikaFenvFallback.inl
index 64327b2c7b7500b6925a86a4ec8997aebeec6f15..ba847a3a04dd63dc980b95148113f440e8d70aaf 100644
--- a/Framework/Utilities/CorsikaFenvFallback.cc
+++ b/corsika/framework/utility/detail/CorsikaFenvFallback.inl
@@ -6,7 +6,7 @@
  * the license.
  */
 
-#include <corsika/utl/CorsikaFenv.h>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 #include <cfenv>
 
 extern "C" {
diff --git a/Framework/Utilities/sgn.h b/corsika/framework/utility/sgn.hpp
similarity index 88%
rename from Framework/Utilities/sgn.h
rename to corsika/framework/utility/sgn.hpp
index 2cc3a936b2f326835e46ad1ed4a96fb63080975f..e9e0f514d719f9b6387c203aa1b16dcc7ba9f879 100644
--- a/Framework/Utilities/sgn.h
+++ b/corsika/framework/utility/sgn.hpp
@@ -9,7 +9,7 @@
 
 #pragma once
 
-namespace corsika::utl {
+namespace corsika {
 
   //! sign function without branches
   template <typename T>
@@ -17,4 +17,5 @@ namespace corsika::utl {
     return (T(0) < val) - (val < T(0));
   }
 
-} // namespace corsika::utl
+} // namespace corsika
+
diff --git a/Environment/BaseExponential.h b/corsika/media/BaseExponential.hpp
similarity index 52%
rename from Environment/BaseExponential.h
rename to corsika/media/BaseExponential.hpp
index bf8c16d961c4cfdeb28827851dd8e20e8040c17e..48fe5a520085e076dac7666574f7878867f11d58 100644
--- a/Environment/BaseExponential.h
+++ b/corsika/media/BaseExponential.hpp
@@ -8,29 +8,42 @@
 
 #pragma once
 
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <limits>
 
-namespace corsika::environment {
+namespace corsika {
 
   /**
    * This class provides the grammage/length conversion functionality for
    * (locally) flat exponential atmospheres.
    */
   template <class TDerived>
-  class BaseExponential {
+  class BaseExponential
+  {
+
+  public:
+
+	  BaseExponential(Point const& vP0, units::si::MassDensityType vRho,
+			  units::si::LengthType vLambda):
+				  fRho0(vRho),
+				  fLambda(vLambda),
+				  fInvLambda(1 / vLambda),
+				  fP0(vP0)
+  {}
+
   protected:
+
     units::si::MassDensityType const fRho0;
     units::si::LengthType const fLambda;
     units::si::InverseLengthType const fInvLambda;
-    geometry::Point const fP0;
+    Point const fP0;
 
-    auto const& GetImplementation() const { return *static_cast<TDerived const*>(this); }
+    auto const& GetImplementation() const ;
 
     // clang-format off
     /**
@@ -47,19 +60,9 @@ namespace corsika::environment {
      */
     // clang-format on
     units::si::GrammageType IntegratedGrammage(
-        setup::Trajectory const& vLine, units::si::LengthType vL,
-        geometry::Vector<units::si::dimensionless_d> const& vAxis) const {
-      if (vL == units::si::LengthType::zero()) { return units::si::GrammageType::zero(); }
-
-      auto const uDotA = vLine.GetDirection(0).dot(vAxis).magnitude();
-      auto const rhoStart = GetImplementation().GetMassDensity(vLine.GetLine().GetR0());
-
-      if (uDotA == 0) {
-        return vL * rhoStart;
-      } else {
-        return rhoStart * (fLambda / uDotA) * (exp(uDotA * vL * fInvLambda) - 1);
-      }
-    }
+        Trajectory<Line> const& vLine,
+		units::si::LengthType vL,
+        Vector<units::si::dimensionless_d> const& vAxis) const;
 
     // clang-format off
     /**
@@ -80,32 +83,13 @@ namespace corsika::environment {
      */
     // clang-format on
     units::si::LengthType ArclengthFromGrammage(
-        setup::Trajectory const& vLine, units::si::GrammageType vGrammage,
-        geometry::Vector<units::si::dimensionless_d> const& vAxis) const {
-      auto const uDotA = vLine.GetDirection(0).dot(vAxis).magnitude();
-      auto const rhoStart = GetImplementation().GetMassDensity(vLine.GetLine().GetR0());
-
-      if (uDotA == 0) {
-        return vGrammage / rhoStart;
-      } else {
-        auto const logArg = vGrammage * fInvLambda * uDotA / rhoStart + 1;
-        if (logArg > 0) {
-          return fLambda / uDotA * log(logArg);
-        } else {
-          return std::numeric_limits<typename decltype(
-                     vGrammage)::value_type>::infinity() *
-                 units::si::meter;
-        }
-      }
-    }
+        Trajectory<Line> const& vLine,
+        units::si::GrammageType vGrammage,
+        Vector<units::si::dimensionless_d> const& vAxis) const;
+
 
-  public:
-    BaseExponential(geometry::Point const& vP0, units::si::MassDensityType vRho,
-                    units::si::LengthType vLambda)
-        : fRho0(vRho)
-        , fLambda(vLambda)
-        , fInvLambda(1 / vLambda)
-        , fP0(vP0) {}
   };
 
 } // namespace corsika::environment
+
+#include <corsika/detail/media/BaseExponential.inl>
diff --git a/Environment/DensityFunction.h b/corsika/media/DensityFunction.hpp
similarity index 55%
rename from Environment/DensityFunction.h
rename to corsika/media/DensityFunction.hpp
index 3ac33c3f21ebc0a8fbe792d9641b3a37c4dec7c4..2105f521f8fb8693191b449994a3052a185a6143 100644
--- a/Environment/DensityFunction.h
+++ b/corsika/media/DensityFunction.hpp
@@ -8,27 +8,30 @@
 
 #pragma once
 
-#include <corsika/environment/LinearApproximationIntegrator.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
+#include <corsika/media/LinearApproximationIntegrator.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
 
-namespace corsika::environment {
+namespace corsika {
 
-  template <class TDerivableRho,
-            template <typename> class TIntegrator = LinearApproximationIntegrator>
-  class DensityFunction
-      : public TIntegrator<DensityFunction<TDerivableRho, TIntegrator>> {
+  template <class TDerivableRho, template <typename> class TIntegrator = LinearApproximationIntegrator>
+  class DensityFunction: public TIntegrator<DensityFunction<TDerivableRho, TIntegrator>>
+  {
     friend class TIntegrator<DensityFunction<TDerivableRho, TIntegrator>>;
 
     TDerivableRho fRho; //!< functor for density
 
   public:
+
     DensityFunction(TDerivableRho rho)
         : fRho(rho) {}
 
     corsika::units::si::MassDensityType EvaluateAt(
-        corsika::geometry::Point const& p) const {
+        corsika::Point const& p) const {
       return fRho(p);
     }
   };
+
 } // namespace corsika::environment
+
diff --git a/corsika/media/Environment.hpp b/corsika/media/Environment.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..9c909a631be0b22d784b1d01c15faf1ece6c2cff
--- /dev/null
+++ b/corsika/media/Environment.hpp
@@ -0,0 +1,60 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/media/Universe.hpp>
+#include <corsika/media/IMediumModel.hpp>
+#include <corsika/media/VolumeTreeNode.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Sphere.hpp>
+#include <limits>
+
+namespace corsika {
+
+  template <typename IEnvironmentModel>
+  class Environment
+  {
+  public:
+	  using BaseNodeType = VolumeTreeNode<IEnvironmentModel>;
+
+	  Environment():
+		fCoordinateSystem(
+		    corsika::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem()),
+        fUniverse(
+        	std::make_unique<BaseNodeType>(std::make_unique<Universe>(fCoordinateSystem)))
+        {}
+
+    // using IEnvironmentModel = corsika::IEnvironmentModel;
+
+    inline auto& GetUniverse();
+
+    inline auto const& GetUniverse() const ;
+
+    inline auto const& GetCoordinateSystem() const ;
+
+    // factory method for creation of VolumeTreeNodes
+    template <class TVolumeType, typename... TVolumeArgs>
+    static auto CreateNode(TVolumeArgs&&... args);
+
+
+  private:
+
+    corsika::CoordinateSystem const& fCoordinateSystem;
+    typename BaseNodeType::VTNUPtr fUniverse;
+
+  };
+
+  // using SetupBaseNodeType = VolumeTreeNode<corsika::IEnvironmentModel>;
+  // using SetupEnvironment = Environment<corsika::IEnvironmentModel>;
+
+} // namespace corsika::environment
+
+
+#include <corsika/detail/media/Environment.inl>
diff --git a/corsika/media/FlatExponential.hpp b/corsika/media/FlatExponential.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..ed066bbe9ce539447c38673724467b6f4d4becad
--- /dev/null
+++ b/corsika/media/FlatExponential.hpp
@@ -0,0 +1,51 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/media/BaseExponential.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika {
+
+  template <class T>
+  class FlatExponential : public BaseExponential<FlatExponential<T>>, public T
+  {
+    Vector<units::si::dimensionless_d> const fAxis;
+    NuclearComposition const fNuclComp;
+
+    using Base = BaseExponential<FlatExponential<T>>;
+
+  public:
+
+    FlatExponential(Point const& vP0, Vector<units::si::dimensionless_d> const& vAxis,
+                    units::si::MassDensityType vRho, units::si::LengthType vLambda, NuclearComposition vNuclComp):
+                	Base(vP0, vRho, vLambda),
+        fAxis(vAxis),
+        fNuclComp(vNuclComp)
+     {}
+
+    units::si::MassDensityType GetMassDensity(Point const& vP) const override;
+
+    NuclearComposition const& GetNuclearComposition() const override ;
+
+    units::si::GrammageType IntegratedGrammage(Trajectory<Line> const& vLine,
+        units::si::LengthType vTo) const override ;
+
+    units::si::LengthType ArclengthFromGrammage( Trajectory<Line> const& vLine,
+        units::si::GrammageType vGrammage) const override ;
+  };
+
+} // namespace corsika::environment
+
+#include <corsika/detail/media/FlatExponential.inl>
diff --git a/corsika/media/HomogeneousMedium.hpp b/corsika/media/HomogeneousMedium.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..cde94452edeffdb3a4f6ffef7de0f76c8dcbfb96
--- /dev/null
+++ b/corsika/media/HomogeneousMedium.hpp
@@ -0,0 +1,70 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <corsika/setup/SetupTrajectory.h>
+
+#include <cassert>
+
+/**
+ * a homogeneous medium
+ */
+
+namespace corsika {
+
+  template <class T>
+  class HomogeneousMedium : public T {
+    corsika::units::si::MassDensityType const fDensity;
+    NuclearComposition const fNuclComp;
+
+  public:
+
+    HomogeneousMedium(corsika::units::si::MassDensityType pDensity, NuclearComposition pNuclComp):
+        fDensity(pDensity),
+        fNuclComp(pNuclComp)
+  {}
+
+    corsika::units::si::MassDensityType
+	GetMassDensity( corsika::Point const&) const override
+    {
+      return fDensity;
+    }
+
+    NuclearComposition const&
+	GetNuclearComposition() const override
+    {
+    	return fNuclComp;
+    }
+
+    corsika::units::si::GrammageType
+	IntegratedGrammage( corsika::Trajectory<corsika::Line> const&,
+        corsika::units::si::LengthType pTo) const override
+    {
+      using namespace corsika::units::si;
+      return pTo * fDensity;
+    }
+
+    corsika::units::si::LengthType
+	ArclengthFromGrammage(corsika::Trajectory<corsika::Line> const&,
+        corsika::units::si::GrammageType pGrammage) const override
+    {
+      return pGrammage / fDensity;
+    }
+  };
+
+} // namespace corsika::environment
+
diff --git a/Environment/IMediumModel.h b/corsika/media/IMediumModel.hpp
similarity index 58%
rename from Environment/IMediumModel.h
rename to corsika/media/IMediumModel.hpp
index 7a3b951711b8fe19f928eed3c5cf3d21a17e73d6..1623ce225388179ee4b046c15a0d643f52aa15e7 100644
--- a/Environment/IMediumModel.h
+++ b/corsika/media/IMediumModel.hpp
@@ -8,33 +8,35 @@
 
 #pragma once
 
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/setup/SetupTrajectory.h>
+namespace corsika {
 
-namespace corsika::environment {
+  class IMediumModel
+  {
 
-  class IMediumModel {
   public:
     virtual ~IMediumModel() = default; // LCOV_EXCL_LINE
 
-    virtual corsika::units::si::MassDensityType GetMassDensity(
-        corsika::geometry::Point const&) const = 0;
+    virtual corsika::units::si::MassDensityType
+	GetMassDensity( corsika::Point const&) const = 0;
 
     // todo: think about the mixin inheritance of the trajectory vs the BaseTrajectory
     // approach; for now, only lines are supported
     virtual corsika::units::si::GrammageType IntegratedGrammage(
-        corsika::setup::Trajectory const&,
+        corsika::Trajectory<corsika::Line> const&,
         corsika::units::si::LengthType) const = 0;
 
     virtual corsika::units::si::LengthType ArclengthFromGrammage(
-        corsika::setup::Trajectory const&,
-        corsika::units::si::GrammageType) const = 0;
+        corsika::Trajectory<corsika::Line> const&,
+        corsika::units::si::GrammageType ) const = 0;
 
     virtual NuclearComposition const& GetNuclearComposition() const = 0;
   };
 
 } // namespace corsika::environment
+
diff --git a/Environment/InhomogeneousMedium.h b/corsika/media/InhomogeneousMedium.hpp
similarity index 50%
rename from Environment/InhomogeneousMedium.h
rename to corsika/media/InhomogeneousMedium.hpp
index 76378d5d5202527b54d32811ec688f00807b0382..a85016848f75e0ea18059db6605c03a04a708ffc 100644
--- a/Environment/InhomogeneousMedium.h
+++ b/corsika/media/InhomogeneousMedium.hpp
@@ -8,49 +8,65 @@
 
 #pragma once
 
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Trajectory.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 /**
  * A general inhomogeneous medium. The mass density distribution TDensityFunction must be
  * a \f$C^2\f$-function.
  */
 
-namespace corsika::environment {
+namespace corsika
+{
 
   template <class T, class TDensityFunction>
-  class InhomogeneousMedium : public T {
+  class InhomogeneousMedium : public T
+  {
     NuclearComposition const fNuclComp;
     TDensityFunction const fDensityFunction;
 
   public:
+
+    /*
+     * FIXME: should have traits here for ...Args
+     */
     template <typename... Args>
-    InhomogeneousMedium(NuclearComposition pNuclComp, Args&&... rhoArgs)
-        : fNuclComp(pNuclComp)
-        , fDensityFunction(rhoArgs...) {}
+    InhomogeneousMedium(NuclearComposition pNuclComp, Args&&... rhoArgs):
+	fNuclComp(pNuclComp),
+	fDensityFunction(rhoArgs...)
+	{}
 
-    corsika::units::si::MassDensityType GetMassDensity(
-        corsika::geometry::Point const& p) const override {
+    corsika::units::si::MassDensityType
+	GetMassDensity(corsika::Point const& p) const override
+    {
       return fDensityFunction.EvaluateAt(p);
     }
-    NuclearComposition const& GetNuclearComposition() const override { return fNuclComp; }
 
-    corsika::units::si::GrammageType IntegratedGrammage(
-        corsika::setup::Trajectory const& pLine,
-        corsika::units::si::LengthType pTo) const override {
+    NuclearComposition const& GetNuclearComposition() const override
+    {
+    	return fNuclComp;
+    }
+
+    corsika::units::si::GrammageType
+	IntegratedGrammage( corsika::Trajectory<corsika::Line> const& pLine,
+        corsika::units::si::LengthType pTo) const override
+    {
       return fDensityFunction.IntegrateGrammage(pLine, pTo);
     }
 
-    corsika::units::si::LengthType ArclengthFromGrammage(
-        corsika::setup::Trajectory const& pLine,
-        corsika::units::si::GrammageType pGrammage) const override {
+    corsika::units::si::LengthType
+	ArclengthFromGrammage( corsika::Trajectory<corsika::Line> const& pLine,
+        corsika::units::si::GrammageType pGrammage) const override
+    {
       return fDensityFunction.ArclengthFromGrammage(pLine, pGrammage);
     }
+
   };
 
 } // namespace corsika::environment
+
diff --git a/Environment/LayeredSphericalAtmosphereBuilder.h b/corsika/media/LayeredSphericalAtmosphereBuilder.hpp
similarity index 56%
rename from Environment/LayeredSphericalAtmosphereBuilder.h
rename to corsika/media/LayeredSphericalAtmosphereBuilder.hpp
index 096f9b181cb9596da1b93a844792a3b07cae9ece..13d1ce86a7e32877984e2d50d4e7f74ddffc5b58 100644
--- a/Environment/LayeredSphericalAtmosphereBuilder.h
+++ b/corsika/media/LayeredSphericalAtmosphereBuilder.hpp
@@ -6,17 +6,14 @@
  * the license.
  */
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/FlatExponential.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/IMediumModel.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/environment/SlidingPlanarExponential.h>
-#include <corsika/environment/VolumeTreeNode.h>
-
-#include <corsika/geometry/Point.h>
-#include <corsika/units/PhysicalConstants.h>
-#include <corsika/units/PhysicalUnits.h>
+#pragma once
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/IMediumModel.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/media/VolumeTreeNode.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <functional>
 #include <memory>
@@ -24,50 +21,17 @@
 #include <tuple>
 #include <type_traits>
 
-namespace corsika::environment {
-
-  // forward-decl
-  template <typename TMediumInterface, template <typename> typename MExtraEnvirnoment>
-  struct make_layered_spherical_atmosphere_builder;
-
-  /**
-   * Helper class to setup concentric spheres of layered atmosphere
-   * with spcified density profiles (exponential, linear, ...).
-   *
-   * This can be used most importantly to replicate CORSIKA7
-   * atmospheres.
-   *
-   * Each layer by definition has a density profile and a (constant)
-   * nuclear composition model.
-   *
-   */
-
-  namespace detail {
-
-    struct NoExtraModelInner {};
-
-    template <typename M>
-    struct NoExtraModel {};
-
-    template <template <typename> typename M>
-    struct has_extra_models : std::true_type {};
+namespace corsika {
 
-    template <>
-    struct has_extra_models<NoExtraModel> : std::false_type {};
-
-  } // namespace detail
-
-  template <typename TMediumInterface = environment::IMediumModel,
-            template <typename> typename TMediumModelExtra = detail::NoExtraModel,
-            typename... TModelArgs>
-  class LayeredSphericalAtmosphereBuilder {
+  class LayeredSphericalAtmosphereBuilder
+  {
     std::unique_ptr<NuclearComposition> composition_;
-    geometry::Point center_;
+    Point center_;
     units::si::LengthType previousRadius_{units::si::LengthType::zero()};
     units::si::LengthType earthRadius_;
     std::tuple<TModelArgs...> const additionalModelArgs_;
 
-    std::stack<typename VolumeTreeNode<TMediumInterface>::VTNUPtr>
+    std::stack<VolumeTreeNode<IMediumModel>::VTNUPtr>
         layers_; // innermost layer first
 
     void checkRadius(units::si::LengthType r) const {
@@ -76,19 +40,12 @@ namespace corsika::environment {
       }
     }
 
-    LayeredSphericalAtmosphereBuilder() = delete;
-    LayeredSphericalAtmosphereBuilder(const LayeredSphericalAtmosphereBuilder&) = delete;
-    LayeredSphericalAtmosphereBuilder(const LayeredSphericalAtmosphereBuilder&&) = delete;
-    LayeredSphericalAtmosphereBuilder& operator=(
-        const LayeredSphericalAtmosphereBuilder&) = delete;
+  public:
 
-    // friend, to allow construction
-    template <typename, template <typename> typename>
-    friend struct make_layered_spherical_atmosphere_builder;
+    static auto constexpr earthRadius = 6'371'000 * units::si::meter;
 
-  protected:
-    LayeredSphericalAtmosphereBuilder(TModelArgs... args, corsika::geometry::Point center,
-                                      units::si::LengthType earthRadius)
+    LayeredSphericalAtmosphereBuilder(corsika::Point center,
+                                      units::si::LengthType seaLevel = earthRadius)
         : center_(center)
         , earthRadius_(earthRadius)
         , additionalModelArgs_{args...} {}
@@ -194,26 +151,12 @@ namespace corsika::environment {
 
   }; // end class LayeredSphericalAtmosphereBuilder
 
-  /**
-   * \class make_layered_spherical_atmosphere_builder
-   *
-   * Helper class to create LayeredSphericalAtmosphereBuilder, the
-   * extra environment models have to be passed as template-template
-   * argument to make_layered_spherical_atmosphere_builder, the member
-   * function `create` does then take an unspecified number of extra
-   * parameters to internalize those models for all layers later
-   * produced.
-   **/
-  template <typename TMediumInterface = environment::IMediumModel,
-            template <typename> typename MExtraEnvirnoment = detail::NoExtraModel>
-  struct make_layered_spherical_atmosphere_builder {
-    template <typename... TArgs>
-    static auto create(geometry::Point const& center, units::si::LengthType earthRadius,
-                       TArgs... args) {
-      return environment::LayeredSphericalAtmosphereBuilder<TMediumInterface,
-                                                            MExtraEnvirnoment, TArgs...>{
-          std::forward<TArgs>(args)..., center, earthRadius};
-    }
+    void assemble(Environment<IMediumModel>&);
+
+    Environment<IMediumModel> assemble();
+
   };
 
 } // namespace corsika::environment
+
+#include <corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl>
diff --git a/corsika/media/LinearApproximationIntegrator.hpp b/corsika/media/LinearApproximationIntegrator.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..37f52f358bf43eeb38b78a394319f79c9d9467ea
--- /dev/null
+++ b/corsika/media/LinearApproximationIntegrator.hpp
@@ -0,0 +1,38 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <limits>
+
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
+
+namespace corsika {
+
+   template <class TDerived>
+   class LinearApproximationIntegrator
+   {
+
+     auto const& GetImplementation() const;
+
+  public:
+
+     inline auto IntegrateGrammage( corsika::Trajectory<corsika::Line> const& line,
+        corsika::units::si::LengthType length) const;
+
+    inline auto ArclengthFromGrammage( corsika::Trajectory<corsika::Line> const& line,
+        corsika::units::si::GrammageType grammage) const ;
+
+    inline auto MaximumLength(corsika::Trajectory<corsika::Line> const& line,
+                       [[maybe_unused]] double relError) const ;
+  };
+
+} // namespace corsika::environment
+
+#include <corsika/detail/media/LinearApproximationIntegrator.inl>
diff --git a/Environment/NameModel.h b/corsika/media/NameModel.hpp
similarity index 93%
rename from Environment/NameModel.h
rename to corsika/media/NameModel.hpp
index d5b6ea4fe42d5dd69cd5bd9c56bb5721f09b06a8..5f6b9b24ff2aeeab02756ac3dbd0a7be06a23ebf 100644
--- a/Environment/NameModel.h
+++ b/corsika/media/NameModel.hpp
@@ -11,7 +11,7 @@
 #include <string>
 #include <utility>
 
-namespace corsika::environment {
+namespace corsika {
 
   template <typename T>
   struct NameModel : public T {
diff --git a/corsika/media/NuclearComposition.hpp b/corsika/media/NuclearComposition.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..42de98fc043b2327edce0c50f11e1efa92e2008e
--- /dev/null
+++ b/corsika/media/NuclearComposition.hpp
@@ -0,0 +1,145 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <cassert>
+#include <functional>
+#include <numeric>
+#include <random>
+#include <stdexcept>
+#include <vector>
+
+namespace corsika {
+
+
+  namespace nuc_comp::detail {
+
+		template <class AConstIterator, class BConstIterator>
+		class WeightProviderIterator
+		{
+			AConstIterator fAIter;
+			BConstIterator fBIter;
+
+		public:
+			using value_type = double;
+			using iterator_category = std::input_iterator_tag;
+			using pointer = value_type*;
+			using reference = value_type&;
+			using difference_type = ptrdiff_t;
+
+			WeightProviderIterator(AConstIterator a, BConstIterator b)
+			: fAIter(a)
+			, fBIter(b) {}
+
+			value_type operator*() const { return ((*fAIter) * (*fBIter)).magnitude(); }
+
+			WeightProviderIterator& operator++() { // prefix ++
+				++fAIter;
+				++fBIter;
+				return *this;
+			}
+
+			auto operator==(WeightProviderIterator other) { return fAIter == other.fAIter; }
+
+			auto operator!=(WeightProviderIterator other) { return !(*this == other); }
+		};
+
+	}// namespace nuc_comp::detail
+
+	class NuclearComposition
+	{
+		std::vector<float> const fNumberFractions; //!< relative fractions of number density
+		std::vector<corsika::Code> const	fComponents; //!< particle codes of consitutents
+
+		double const fAvgMassNumber;
+
+		/*
+		 * FIXME: smelling here... nested class why? ...done
+		 * FIXME: promote it to namespace detail ... done
+		 */
+
+
+	public:
+
+		NuclearComposition(std::vector<corsika::Code> pComponents, std::vector<float> pFractions):
+			fNumberFractions(pFractions),
+			fComponents(pComponents),
+			fAvgMassNumber( std::inner_product(
+			pComponents.cbegin(), pComponents.cend(), pFractions.cbegin(), 0.,
+			std::plus<double>(), [](auto const compID, auto const fraction) -> double {
+			  if (IsNucleus(compID)) {
+				return GetNucleusA(compID) * fraction;
+			} else {
+			  return GetMass(compID) /
+			    units::si::ConvertSIToHEP(units::constants::u) * fraction;
+			}
+		}))
+	{
+			assert(pComponents.size() == pFractions.size());
+			auto const sumFractions =
+					std::accumulate(pFractions.cbegin(), pFractions.cend(), 0.f);
+
+			if (!(0.999f < sumFractions && sumFractions < 1.001f)) {
+				throw std::runtime_error("element fractions do not add up to 1");
+			}
+	}
+
+		template <typename TFunction>
+		auto WeightedSum(TFunction func) const {
+			using ResultQuantity = decltype(func(*fComponents.cbegin()));
+
+			auto const prod = [&](auto const compID, auto const fraction) {
+				return func(compID) * fraction;
+			};
+
+			if constexpr (phys::units::is_quantity_v<ResultQuantity>) {
+				return std::inner_product(
+						fComponents.cbegin(), fComponents.cend(), fNumberFractions.cbegin(),
+						ResultQuantity::zero(), // .zero() is defined for quantity types only
+						std::plus<ResultQuantity>(), prod);
+			} else {
+				return std::inner_product(
+						fComponents.cbegin(), fComponents.cend(), fNumberFractions.cbegin(),
+						ResultQuantity(0), // in other cases we have to use a bare 0
+						std::plus<ResultQuantity>(), prod);
+			}
+		}
+
+		auto size() const { return fNumberFractions.size(); }
+
+		auto const& GetFractions() const { return fNumberFractions; }
+		auto const& GetComponents() const { return fComponents; }
+		auto const GetAverageMassNumber() const { return fAvgMassNumber; }
+
+		template <class TRNG>
+		corsika::Code SampleTarget(
+				std::vector<corsika::units::si::CrossSectionType> const& sigma,
+				TRNG& randomStream) const {
+			using namespace corsika::units::si;
+
+			assert(sigma.size() == fNumberFractions.size());
+
+			std::discrete_distribution channelDist(
+							       nuc_comp::detail::WeightProviderIterator<decltype(fNumberFractions.begin()),
+					decltype(sigma.begin())>(fNumberFractions.begin(),
+							sigma.begin()),
+							       nuc_comp::detail::WeightProviderIterator<decltype(fNumberFractions.begin()),
+							decltype(sigma.end())>(fNumberFractions.end(),
+									sigma.end()));
+
+			auto const iChannel = channelDist(randomStream);
+			return fComponents[iChannel];
+		}
+	};
+
+} // namespace corsika::environment
+
diff --git a/corsika/media/SlidingPlanarExponential.hpp b/corsika/media/SlidingPlanarExponential.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..264fcf4d2d2cd840b50c6b0d55333bf9d01f755e
--- /dev/null
+++ b/corsika/media/SlidingPlanarExponential.hpp
@@ -0,0 +1,62 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/media/FlatExponential.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika {
+
+
+	template <class T>
+	class SlidingPlanarExponential : public BaseExponential<SlidingPlanarExponential<T>>, public T
+	{
+
+		NuclearComposition const nuclComp_;
+		units::si::LengthType const referenceHeight_;
+
+		using Base = BaseExponential<SlidingPlanarExponential<T>>;
+
+	public:
+
+		SlidingPlanarExponential(Point const& p0,
+				units::si::MassDensityType rho0, units::si::LengthType lambda,
+				NuclearComposition nuclComp, units::si::LengthType referenceHeight = units::si::LengthType::zero()):
+					Base(p0, rho0, lambda),
+					nuclComp_(nuclComp),
+	                referenceHeight_(referenceHeight)
+	{}
+
+		inline units::si::MassDensityType
+		GetMassDensity(Point const& p) const override ;
+
+		inline NuclearComposition const&
+		GetNuclearComposition() const override
+		{
+			return nuclComp_;
+		}
+
+		inline units::si::GrammageType
+		IntegratedGrammage( Trajectory<Line> const& line,
+				units::si::LengthType l) const override ;
+
+		inline units::si::LengthType
+		ArclengthFromGrammage( Trajectory<Line> const& line,
+				units::si::GrammageType grammage) const override;
+	};
+
+} // namespace corsika::environment
+
+#include <corsika/detail/media/SlidingPlanarExponential.inl>
diff --git a/corsika/media/Universe.hpp b/corsika/media/Universe.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..7241b794b05ed91f06595f39eb9cb27e70cdd2dd
--- /dev/null
+++ b/corsika/media/Universe.hpp
@@ -0,0 +1,26 @@
+/*
+ * (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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/Sphere.hpp>
+#include <limits>
+
+namespace corsika {
+
+  struct Universe : public corsika::Sphere
+  {
+    Universe(corsika::CoordinateSystem const& pCS);
+    inline bool Contains(corsika::Point const&) const override;
+  };
+
+}
+
+#include <corsika/detail/media/Universe.inl>
diff --git a/corsika/media/VolumeTreeNode.hpp b/corsika/media/VolumeTreeNode.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..f280dba4077fea59d251b3a54aab6dfe5c782f85
--- /dev/null
+++ b/corsika/media/VolumeTreeNode.hpp
@@ -0,0 +1,98 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/media/IMediumModel.hpp>
+#include <corsika/framework/geometry/Volume.hpp>
+#include <memory>
+#include <vector>
+
+namespace corsika {
+
+  class Empty {}; //<! intended for usage as default template argument
+
+  template <typename TModelProperties = Empty>
+  class VolumeTreeNode
+  {
+
+  public:
+
+    using IModelProperties = TModelProperties;
+    using VTN_type = VolumeTreeNode<IModelProperties>;
+    using VTNUPtr = std::unique_ptr<VolumeTreeNode<IModelProperties>>;
+    using IMPSharedPtr = std::shared_ptr<IModelProperties>;
+    using VolUPtr = std::unique_ptr<corsika::Volume>;
+
+    VolumeTreeNode(VolUPtr pVolume = nullptr):
+    	fGeoVolume(std::move(pVolume))
+    {}
+
+    //! convenience function equivalent to Volume::Contains
+    inline bool Contains(corsika::Point const& p) const;
+
+    inline VolumeTreeNode<IModelProperties> const*
+	Excludes(corsika::Point const& p) const ;
+
+    /** returns a pointer to the sub-VolumeTreeNode which is "responsible" for the given
+     * \class Point \p p, or nullptr iff \p p is not contained in this volume.
+     */
+    inline VolumeTreeNode<IModelProperties> const*
+	GetContainingNode(corsika::Point const& p) const;
+
+
+    /**
+     * Traverses the VolumeTree pre- or post-order and calls the functor  \p func for each
+     * node. \p func takes a reference to VolumeTreeNode as argument. The return value \p
+     * func is ignored.
+     */
+    template <typename TCallable, bool preorder = true>
+    inline void walk(TCallable func) ;
+
+    inline void AddChild(VTNUPtr pChild) ;
+
+    inline void ExcludeOverlapWith(VTNUPtr const& pNode) ;
+
+    inline auto* GetParent() const { return fParentNode; };
+
+    inline auto const& GetChildNodes() const { return fChildNodes; }
+
+    inline auto const& GetExcludedNodes() const { return fExcludedNodes; }
+
+    inline auto const& GetVolume() const { return *fGeoVolume; }
+
+    inline auto const& GetModelProperties() const { return *fModelProperties; }
+
+    inline bool HasModelProperties() const { return fModelProperties.get() != nullptr; }
+
+    template <typename ModelProperties, typename... Args>
+    inline auto SetModelProperties(Args&&... args) {
+      static_assert(std::is_base_of_v<IModelProperties, ModelProperties>,
+                    "unusable model properties type provided");
+
+      fModelProperties = std::make_shared<ModelProperties>(std::forward<Args>(args)...);
+      return fModelProperties;
+    }
+
+    inline void SetModelProperties(IMPSharedPtr ptr) { fModelProperties = ptr; }
+
+    /*
+    template <class MediumType, typename... Args>
+    static auto CreateMedium(Args&&... args) ;
+
+  private:
+    std::vector<VTNUPtr> fChildNodes;
+    std::vector<VolumeTreeNode<IModelProperties> const*> fExcludedNodes;
+    VolumeTreeNode<IModelProperties> const* fParentNode = nullptr;
+    VolUPtr fGeoVolume;
+    IMPSharedPtr fModelProperties;
+  };
+
+} // namespace corsika::environment
+
+#include <corsika/detail/media/VolumeTreeNode.inl>
diff --git a/Processes/Sibyll/Decay.cc b/corsika/modules/Sibyll/Decay.cc
similarity index 92%
rename from Processes/Sibyll/Decay.cc
rename to corsika/modules/Sibyll/Decay.cc
index 8297739b793e33d7b4fe9b65bfd66def992f372e..844f3fdab9c1f497b87ef0e874ac6c56866f741a 100644
--- a/Processes/Sibyll/Decay.cc
+++ b/corsika/modules/Sibyll/Decay.cc
@@ -11,21 +11,21 @@
 #include <corsika/process/sibyll/ParticleConversion.h>
 #include <corsika/process/sibyll/SibStack.h>
 
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
 
 using std::make_tuple;
 using std::tuple;
 using std::vector;
 
 using namespace corsika;
-using namespace corsika::setup;
+using namespace corsika;
 
-using SetupView = corsika::setup::StackView;
-using SetupProjectile = corsika::setup::StackView::ParticleType;
-using Particle = corsika::setup::Stack::ParticleType;
+using SetupView = corsika::StackView;
+using SetupProjectile = corsika::StackView::ParticleType;
+using SetupParticle = corsika::Stack::ParticleType;
 
-namespace corsika::process::sibyll {
+namespace corsika::sibyll {
 
   Decay::Decay(const bool sibyll_printout_on)
       : sibyll_listing_(sibyll_printout_on) {
@@ -222,11 +222,14 @@ namespace corsika::process::sibyll {
       // FOR NOW: skip particles that have decayed in Sibyll, move to iterator?
       if (psib.HasDecayed()) continue;
       // add to corsika stack
-      view.AddSecondary(make_tuple(process::sibyll::ConvertFromSibyll(psib.GetPID()),
-                                   psib.GetEnergy(), psib.GetMomentum(), decayPoint, t0));
+      vP.AddSecondary(
+          tuple<particles::Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                geometry::Point, units::si::TimeType>{
+              process::sibyll::ConvertFromSibyll(psib.GetPID()), psib.GetEnergy(),
+              psib.GetMomentum(), decayPoint, t0});
     }
     // empty sibyll stack
     ss.Clear();
   }
 
-} // namespace corsika::process::sibyll
+} // namespace corsika::sibyll
diff --git a/Processes/Sibyll/Interaction.cc b/corsika/modules/Sibyll/Interaction.cc
similarity index 95%
rename from Processes/Sibyll/Interaction.cc
rename to corsika/modules/Sibyll/Interaction.cc
index aa222b7f65ced91a80b5e6402a0ae5a45926c6dc..219494e057c4e1a1eb9fba63131ee529905383da 100644
--- a/Processes/Sibyll/Interaction.cc
+++ b/corsika/modules/Sibyll/Interaction.cc
@@ -8,28 +8,30 @@
 
 #include <corsika/process/sibyll/Interaction.h>
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/FourVector.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
 #include <corsika/process/sibyll/ParticleConversion.h>
 #include <corsika/process/sibyll/SibStack.h>
-#include <corsika/process/sibyll/sibyll2.3d.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-#include <corsika/utl/COMBoost.h>
+#include <corsika/process/sibyll/sibyll2.3c.h>
+#include <corsika/framework/utility/COMBoost.hpp>
 
 #include <tuple>
 
-using std::make_tuple;
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
+
+using std::cout;
+using std::endl;
 using std::tuple;
 
 using namespace corsika;
-using namespace corsika::setup;
-using Particle = setup::Stack::StackIterator;
-using SetupView = setup::StackView;
+using namespace corsika;
+using SetupParticle = setup::Stack::StackIterator;
+using SetupProjectile = setup::StackView::StackIterator;
 using Track = Trajectory;
 
-namespace corsika::process::sibyll {
+namespace corsika::sibyll {
 
   bool Interaction::initialized_ = false;
 
@@ -356,4 +358,4 @@ namespace corsika::process::sibyll {
     return process::EProcessReturn::eOk;
   }
 
-} // namespace corsika::process::sibyll
+} // namespace corsika::sibyll
diff --git a/Processes/Sibyll/NuclearInteraction.cc b/corsika/modules/Sibyll/NuclearInteraction.cc
similarity index 86%
rename from Processes/Sibyll/NuclearInteraction.cc
rename to corsika/modules/Sibyll/NuclearInteraction.cc
index 4c22491a41ffaec2a24c1870357a132542a59143..2ec18ed40d8f7b8a915978e6be0a6e39ab9d3162 100644
--- a/Processes/Sibyll/NuclearInteraction.cc
+++ b/corsika/modules/Sibyll/NuclearInteraction.cc
@@ -9,31 +9,31 @@
 #include <corsika/process/sibyll/Interaction.h>
 #include <corsika/process/sibyll/NuclearInteraction.h>
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/FourVector.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
 #include <corsika/process/sibyll/nuclib.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/utl/COMBoost.h>
-
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-
-#include <corsika/logging/Logging.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
 
 #include <set>
 #include <sstream>
 
-using std::make_tuple;
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
+
+using std::cout;
+using std::endl;
 using std::tuple;
 using std::vector;
 
 using namespace corsika;
-using Particle = corsika::setup::Stack::ParticleType; // StackIterator; // ParticleType;
-using View = corsika::setup::StackView;               // StackView::ParticleType;
-using Track = setup::Trajectory;
+using namespace corsika;
+using Particle = Stack::ParticleType;        // StackIterator; // ParticleType;
+using Projectile = StackView::StackIterator; // StackView::ParticleType;
+using Track = Trajectory;
 
-namespace corsika::process::sibyll {
+namespace corsika::sibyll {
 
   template <>
   NuclearInteraction<setup::Environment>::~NuclearInteraction() {
@@ -42,9 +42,9 @@ namespace corsika::process::sibyll {
   }
 
   template <>
-  void NuclearInteraction<setup::Environment>::PrintCrossSectionTable(
-      corsika::particles::Code pCode) {
-    using namespace corsika::particles;
+  void NuclearInteraction<SetupEnvironment>::PrintCrossSectionTable(
+      corsika::Code pCode) {
+    using namespace corsika;
     const int k = targetComponentsIndex_.at(pCode);
     Code pNuclei[] = {Code::Helium, Code::Lithium7, Code::Oxygen,
                       Code::Neon,   Code::Argon,    Code::Iron};
@@ -67,8 +67,8 @@ namespace corsika::process::sibyll {
   }
 
   template <>
-  void NuclearInteraction<setup::Environment>::InitializeNuclearCrossSections() {
-    using namespace corsika::particles;
+  void NuclearInteraction<SetupEnvironment>::InitializeNuclearCrossSections() {
+    using namespace corsika;
     using namespace units::si;
 
     auto& universe = *(environment_.GetUniverse());
@@ -136,7 +136,7 @@ namespace corsika::process::sibyll {
   units::si::CrossSectionType
   NuclearInteraction<setup::Environment>::ReadCrossSectionTable(
       const int ia, particles::Code pTarget, units::si::HEPEnergyType elabnuc) {
-    using namespace corsika::particles;
+    using namespace corsika;
     using namespace units::si;
     const int ib = targetComponentsIndex_.at(pTarget) + 1; // table index in fortran
     auto const ECoMNuc = sqrt(2. * corsika::units::constants::nucleonMass * elabnuc);
@@ -223,14 +223,14 @@ namespace corsika::process::sibyll {
     // read from cross section code table
 
     // FOR NOW: assume target is at rest
-    corsika::stack::MomentumVector pTarget(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+    corsika::MomentumVector pTarget(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
 
     // total momentum and energy
     HEPEnergyType Elab = vP.GetEnergy() + constants::nucleonMass;
     unsigned int const nuclA = vP.GetNuclearA();
     auto const ElabNuc = vP.GetEnergy() / nuclA;
 
-    corsika::stack::MomentumVector pTotLab(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+    corsika::MomentumVector pTotLab(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
     pTotLab += vP.GetMomentum();
     pTotLab += pTarget;
     auto const pTotLabNorm = pTotLab.norm();
@@ -382,7 +382,7 @@ namespace corsika::process::sibyll {
     // target is always at rest
     const auto eTargetNucLab = 0_GeV + constants::nucleonMass;
     const auto pTargetNucLab =
-        corsika::stack::MomentumVector(rootCS, 0_GeV, 0_GeV, 0_GeV);
+        corsika::MomentumVector(rootCS, 0_GeV, 0_GeV, 0_GeV);
     const FourVector PtargNucLab(eTargetNucLab, pTargetNucLab);
 
     C8LOG_DEBUG(
@@ -559,9 +559,11 @@ namespace corsika::process::sibyll {
                                            Plab.GetSpaceLikeComponents(), pOrig, tOrig));
       else
         // add nucleus
-        projectile.AddSecondary(make_tuple(specCode, Plab.GetTimeLikeComponent(),
-                                           Plab.GetSpaceLikeComponents(), pOrig, tOrig,
-                                           nuclA, nuclZ));
+        vP.AddSecondary(tuple<particles::Code, units::si::HEPEnergyType,
+                              corsika::MomentumVector, geometry::Point,
+                              units::si::TimeType, unsigned short, unsigned short>{
+            specCode, Plab.GetTimeLikeComponent(), Plab.GetSpaceLikeComponents(), pOrig,
+            tOrig, nuclA, nuclZ});
     }
 
     // add elastic nucleons to corsika stack
@@ -578,8 +580,11 @@ namespace corsika::process::sibyll {
       const double mass_ratio = particles::GetMass(elaNucCode) / ProjMass;
       auto const Plab = PprojLab * mass_ratio;
 
-      projectile.AddSecondary(make_tuple(elaNucCode, Plab.GetTimeLikeComponent(),
-                                         Plab.GetSpaceLikeComponents(), pOrig, tOrig));
+      vP.AddSecondary(
+          tuple<particles::Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                geometry::Point, units::si::TimeType>{
+              elaNucCode, Plab.GetTimeLikeComponent(), Plab.GetSpaceLikeComponents(),
+              pOrig, tOrig});
     }
 
     // add inelastic interactions
@@ -588,25 +593,15 @@ namespace corsika::process::sibyll {
       // TODO: sample neutron or proton
       auto pCode = particles::Proton::GetCode();
       // temporarily add to stack, will be removed after interaction in DoInteraction
-      C8LOG_DEBUG(fmt::format("inelastic interaction no. {}", j));
-      setup::Stack nucleonStack;
-      // auto inelasticNucleon = projectile.AddSecondary(
-      auto inelasticNucleon = nucleonStack.AddParticle(
-          make_tuple(pCode, PprojNucLab.GetTimeLikeComponent(),
-                     PprojNucLab.GetSpaceLikeComponents(), pOrig, tOrig));
-      inelasticNucleon.SetNode(projectile.GetNode());
-      // create inelastic interaction for each nucleon
-      C8LOG_TRACE("calling HadronicInteraction...");
-      // create new StackView for each of the nucleons
-      View nucleon_secondaries(inelasticNucleon);
-      // all inner hadronic event generator
-      hadronicInteraction_.DoInteraction(nucleon_secondaries);
-      // inelasticNucleon.Delete(); // this is just a temporary object
-      for (const auto& pSec : nucleon_secondaries) {
-        projectile.AddSecondary(make_tuple(pSec.GetPID(), pSec.GetEnergy(),
-                                           pSec.GetMomentum(), pSec.GetPosition(),
-                                           pSec.GetTime()));
-      }
+      cout << "inelastic interaction no. " << j << endl;
+      auto inelasticNucleon = vP.AddSecondary(
+          tuple<particles::Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                geometry::Point, units::si::TimeType>{
+              pCode, PprojNucLab.GetTimeLikeComponent(),
+              PprojNucLab.GetSpaceLikeComponents(), pOrig, tOrig});
+      // create inelastic interaction
+      cout << "calling HadronicInteraction..." << endl;
+      hadronicInteraction_.DoInteraction(inelasticNucleon);
     }
 
     C8LOG_DEBUG("NuclearInteraction: DoInteraction: done");
@@ -614,27 +609,4 @@ namespace corsika::process::sibyll {
     return process::EProcessReturn::eOk;
   }
 
-  template <>
-  NuclearInteraction<setup::Environment>::NuclearInteraction(
-      process::sibyll::Interaction& hadint, setup::Environment const& env)
-      : environment_(env)
-      , hadronicInteraction_(hadint) {
-
-    // initialize hadronic interaction module
-    // TODO: safe to run multiple initializations?
-
-    // check compatibility of energy ranges, someone could try to use low-energy model..
-    if (!hadronicInteraction_.IsValidCoMEnergy(GetMinEnergyPerNucleonCoM()) ||
-        !hadronicInteraction_.IsValidCoMEnergy(GetMaxEnergyPerNucleonCoM()))
-      throw std::runtime_error(
-          "NuclearInteraction: hadronic interaction model incompatible!");
-
-    // initialize nuclib
-    // TODO: make sure this does not overlap with sibyll
-    nuc_nuc_ini_();
-
-    // initialize cross sections
-    InitializeNuclearCrossSections();
-  }
-
-} // namespace corsika::process::sibyll
+} // namespace corsika::sibyll
diff --git a/Processes/Sibyll/ParticleConversion.cc b/corsika/modules/Sibyll/ParticleConversion.cc
similarity index 89%
rename from Processes/Sibyll/ParticleConversion.cc
rename to corsika/modules/Sibyll/ParticleConversion.cc
index a6cf965cb4908a8ce129116626443975ab6e9275..2e73f3a66373bb16d8dfe3b2cf330c2f52d6d1ad 100644
--- a/Processes/Sibyll/ParticleConversion.cc
+++ b/corsika/modules/Sibyll/ParticleConversion.cc
@@ -6,10 +6,10 @@
  * the license.
  */
 
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
 #include <corsika/process/sibyll/ParticleConversion.h>
 
-using namespace corsika::process::sibyll;
+using namespace corsika::sibyll;
 
 corsika::units::si::HEPMassType corsika::process::sibyll::GetSibyllMass(
     corsika::particles::Code const pCode) {
diff --git a/Processes/Sibyll/code_generator.py b/corsika/modules/Sibyll/code_generator.py
similarity index 96%
rename from Processes/Sibyll/code_generator.py
rename to corsika/modules/Sibyll/code_generator.py
index 7044c95e01df1c5507f8b1dd45b89d4634189ffa..22cb11022741597b6807c844766dcf0158f24365 100755
--- a/Processes/Sibyll/code_generator.py
+++ b/corsika/modules/Sibyll/code_generator.py
@@ -106,14 +106,14 @@ def generate_sibyll2corsika(particle_db) :
             pDict[sib_code] = identifier
     
     nPart = max(pDict.keys()) - min(pDict.keys()) + 1
-    string += "std::array<corsika::particles::Code, {:d}> constexpr sibyll2corsika = {{\n".format(nPart)
+    string += "std::array<corsika::Code, {:d}> constexpr sibyll2corsika = {{\n".format(nPart)
     
     for iPart in range(nPart) :
         if iPart in pDict:
             identifier = pDict[iPart]
         else:
             identifier = "Unknown"
-        string += "  corsika::particles::Code::{:s}, \n".format(identifier)
+        string += "  corsika::Code::{:s}, \n".format(identifier)
     
     string += "};\n"
     return string
diff --git a/Processes/Sibyll/sibyll_codes.dat b/corsika/modules/Sibyll/sibyll_codes.dat
similarity index 100%
rename from Processes/Sibyll/sibyll_codes.dat
rename to corsika/modules/Sibyll/sibyll_codes.dat
diff --git a/Processes/Sibyll/testSibyll.cc b/corsika/modules/Sibyll/testSibyll.cc
similarity index 76%
rename from Processes/Sibyll/testSibyll.cc
rename to corsika/modules/Sibyll/testSibyll.cc
index c229e886178806bad80b05764e9e82db1e167cdd..cc9245629639004dd9bec1551faeec4eb0c9127e 100644
--- a/Processes/Sibyll/testSibyll.cc
+++ b/corsika/modules/Sibyll/testSibyll.cc
@@ -11,20 +11,18 @@
 #include <corsika/process/sibyll/NuclearInteraction.h>
 #include <corsika/process/sibyll/ParticleConversion.h>
 
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/random/RNGManager.hpp>
 
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
 
-#include <corsika/geometry/Point.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <catch2/catch.hpp>
 #include <tuple>
 
 using namespace corsika;
-using namespace corsika::process::sibyll;
-using namespace corsika::units;
-using namespace corsika::units::si;
+using namespace corsika::sibyll;
 
 TEST_CASE("Sibyll", "[processes]") {
 
@@ -67,21 +65,20 @@ TEST_CASE("Sibyll", "[processes]") {
   }
 }
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/setup/SetupEnvironment.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/environment/UniformMagneticField.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/process/sibyll/sibyll2.3c.h>
 
 using namespace corsika::units::si;
 using namespace corsika::units;
@@ -111,7 +108,19 @@ TEST_CASE("SibyllInterface", "[processes]") {
         cs, {P0, 0_eV, 0_eV}); // this is secret knowledge about setupStack
     setup::StackView& view = *viewPtr;
 
-    auto particle = stack->first();
+    setup::Stack stack;
+    const HEPEnergyType E0 = 100_GeV;
+    HEPMomentumType P0 =
+        sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
+    auto plab = corsika::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(
+        std::tuple<particles::Code, units::si::HEPEnergyType,
+                   corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+            particles::Code::Proton, E0, plab, pos, 0_ns});
+    particle.SetNode(nodePtr);
+    corsika::SecondaryView view(particle);
+    auto projectile = view.GetProjectile();
 
     Interaction model;
 
@@ -187,10 +196,21 @@ TEST_CASE("SibyllInterface", "[processes]") {
 
   SECTION("NuclearInteractionInterface") {
 
-    auto [stack, viewPtr] =
-        setup::testing::setupStack(particles::Code::Nucleus, 4, 2, 500_GeV, nodePtr, cs);
-    setup::StackView& view = *viewPtr;
-    auto particle = stack->first();
+    setup::Stack stack;
+    const HEPEnergyType E0 = 400_GeV;
+    HEPMomentumType P0 =
+        sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
+    auto plab = corsika::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+
+    auto particle =
+        stack.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType,
+                                     corsika::MomentumVector, geometry::Point,
+                                     units::si::TimeType, unsigned short, unsigned short>{
+            particles::Code::Nucleus, E0, plab, pos, 0_ns, 4, 2});
+    particle.SetNode(nodePtr);
+    corsika::SecondaryView view(particle);
+    auto projectile = view.GetProjectile();
 
     Interaction hmodel;
     NuclearInteraction model(hmodel, *env);
@@ -203,11 +223,18 @@ TEST_CASE("SibyllInterface", "[processes]") {
 
   SECTION("DecayInterface") {
 
-    auto [stackPtr, viewPtr] =
-        setup::testing::setupStack(particles::Code::Lambda0, 0, 0, 10_GeV, nodePtr, cs);
-    setup::StackView& view = *viewPtr;
-    auto& stack = *stackPtr;
-    auto particle = stack.first();
+    setup::Stack stack;
+    const HEPEnergyType E0 = 10_GeV;
+    HEPMomentumType P0 =
+        sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
+    auto plab = corsika::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(
+        std::tuple<particles::Code, units::si::HEPEnergyType,
+                   corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+            particles::Code::Lambda0, E0, plab, pos, 0_ns});
+    corsika::SecondaryView view(particle);
+    auto projectile = view.GetProjectile();
 
     Decay model;
     model.PrintDecayConfig();
diff --git a/corsika/modules/UrQMD/UrQMD.cc b/corsika/modules/UrQMD/UrQMD.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a433088454a218c29075975f7bbe673fb35bc9da
--- /dev/null
+++ b/corsika/modules/UrQMD/UrQMD.cc
@@ -0,0 +1,385 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/framework/geometry/QuantityVector.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/process/urqmd/UrQMD.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <algorithm>
+#include <array>
+#include <cassert>
+#include <cmath>
+#include <fstream>
+#include <functional>
+#include <random>
+#include <sstream>
+
+using namespace corsika::UrQMD;
+using namespace corsika::units::si;
+
+UrQMD::UrQMD() { iniurqmd_(); }
+
+using SetupStack = corsika::Stack;
+using SetupParticle = corsika::Stack::StackIterator;
+using SetupProjectile = corsika::StackView::StackIterator;
+
+CrossSectionType UrQMD::GetCrossSection(particles::Code vProjectileCode,
+                                        corsika::Code vTargetCode,
+                                        HEPEnergyType vLabEnergy, int vAProjectile = 1) {
+  // the following is a translation of ptsigtot() into C++
+  if (vProjectileCode != particles::Code::Nucleus &&
+      !IsNucleus(vTargetCode)) { // both particles are "special"
+    auto const mProj = particles::GetMass(vProjectileCode);
+    auto const mTar = particles::GetMass(vTargetCode);
+    double sqrtS = sqrt(units::si::detail::static_pow<2>(mProj) +
+                        units::si::detail::static_pow<2>(mTar) + 2 * vLabEnergy * mTar) *
+                   (1 / 1_GeV);
+
+    // we must set some UrQMD globals first...
+    auto const [ityp, iso3] = ConvertToUrQMD(projectileCode);
+    inputs_.spityp[0] = ityp;
+    inputs_.spiso3[0] = iso3;
+
+    auto const [itypTar, iso3Tar] = ConvertToUrQMD(targetCode);
+    inputs_.spityp[1] = itypTar;
+    inputs_.spiso3[1] = iso3Tar;
+
+    int one = 1;
+    int two = 2;
+    int three = 3;
+
+    double const totalXS = sigtot_(one, two, sqrtS);
+
+    // subtract elastic cross-section as in ptsigtot()
+    int itypmn, itypmx, iso3mn, iso3mx;
+    if (ityp < itypTar) {
+      itypmn = ityp;
+      itypmx = itypTar;
+
+      iso3mn = iso3;
+      iso3mx = iso3Tar;
+    } else {
+      itypmx = ityp;
+      itypmn = itypTar;
+
+      iso3mx = iso3;
+      iso3mn = iso3Tar;
+    }
+
+    int isigline = collclass_(itypmx, iso3mx, itypmn, iso3mn);
+    int iline = readsigmaln_(three, one, isigline);
+    double sigEl;
+    double massProj = mProj / 1_GeV;
+    double massTar = mTar / 1_GeV;
+
+    crossx_(iline, sqrtS, ityp, iso3, massProj, itypTar, iso3Tar, massTar, sigEl);
+
+    if (totalXS > sigEl) {
+      return (totalXS - sigEl) * 1_mb;
+    } else {
+      return sigEl * 0_mb;
+    }
+  } else {
+    int const Ap = projectileA;
+    int const At = IsNucleus(targetCode) ? particles::GetNucleusA(targetCode) : 1;
+
+    double const maxImpact = nucrad_(Ap) + nucrad_(At) + 2 * options_.CTParam[30 - 1];
+    return 10_mb * M_PI * units::static_pow<2>(maxImpact);
+    // is a constant cross-section really reasonable?
+  }
+}
+
+template <typename TParticle> // need template here, as this is called both with
+                              // SetupParticle as well as SetupProjectile
+CrossSectionType UrQMD::GetCrossSection(TParticle const& vProjectile,
+                                        corsika::Code vTargetCode) const {
+  // TODO: return 0 for non-hadrons?
+
+  auto const projectileCode = vProjectile.GetPID();
+  auto const projectileEnergyLab = vProjectile.GetEnergy();
+
+  if (projectileCode == particles::Code::K0Long) {
+    return 0.5 *
+           (GetCrossSection(particles::Code::K0, vTargetCode, projectileEnergyLab) +
+            GetCrossSection(particles::Code::K0Bar, vTargetCode, projectileEnergyLab));
+  }
+
+  return GetTabulatedCrossSection(projectileCode, targetCode, projectileEnergyLab);
+}
+
+bool UrQMD::CanInteract(particles::Code code) const {
+  // According to the manual, UrQMD can use all mesons, baryons and nucleons
+  // which are modeled also as input particles. I think it is safer to accept
+  // only the usual long-lived species as input.
+
+  // Interactions with nucleus projectiles are possible in principle with UrQMD
+  // but right now we don't have access to the inelastic (production) cross-section,
+  // so we unfortunately have to forbid these interactions for the time being.
+
+  static particles::Code const validProjectileCodes[] = {
+      particles::Code::Proton,      particles::Code::AntiProton, particles::Code::Neutron,
+      particles::Code::AntiNeutron, particles::Code::PiPlus,     particles::Code::PiMinus,
+      particles::Code::KPlus,       particles::Code::KMinus,     particles::Code::K0Short,
+      particles::Code::K0Long};
+
+  return std::find(std::cbegin(validProjectileCodes), std::cend(validProjectileCodes),
+                   code) != std::cend(validProjectileCodes);
+}
+
+GrammageType UrQMD::GetInteractionLength(SetupParticle const& particle) const {
+  if (!CanInteract(particle.GetPID())) {
+    // we could do the canInteract check in GetCrossSection, too but if
+    // we do it here we have the advantage of avoiding the loop
+    return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+  }
+
+  auto const& mediumComposition =
+      particle.GetNode()->GetModelProperties().GetNuclearComposition();
+  using namespace std::placeholders;
+
+  CrossSectionType const weightedProdCrossSection = mediumComposition.WeightedSum(
+      std::bind(&UrQMD::GetCrossSection<decltype(particle)>, this, particle, _1));
+
+  return mediumComposition.GetAverageMassNumber() * units::constants::u /
+         weightedProdCrossSection;
+}
+
+corsika::EProcessReturn UrQMD::DoInteraction(SetupProjectile& vProjectile) {
+  using namespace units::si;
+
+  auto const projectile = view.GetProjectile();
+
+  auto projectileCode = projectile.GetPID();
+  auto const projectileEnergyLab = projectile.GetEnergy();
+  auto const& projectileMomentumLab = projectile.GetMomentum();
+  auto const& projectilePosition = projectile.GetPosition();
+  auto const projectileTime = projectile.GetTime();
+
+  C8LOG_DEBUG("UrQMD::DoInteraction pid={} E={} GeV", projectileCode,
+              projectileEnergyLab / 1_GeV);
+
+  // sample target particle
+  auto const& mediumComposition =
+      projectile.GetNode()->GetModelProperties().GetNuclearComposition();
+  auto const componentCrossSections = std::invoke([&]() {
+    auto const& components = mediumComposition.GetComponents();
+    std::vector<CrossSectionType> crossSections;
+    crossSections.reserve(components.size());
+
+    for (auto const c : components) {
+      crossSections.push_back(GetCrossSection(projectile, c));
+    }
+
+    return crossSections;
+  });
+
+  auto const targetCode = mediumComposition.SampleTarget(componentCrossSections, rng_);
+  auto const targetA = particles::GetNucleusA(targetCode);
+  auto const targetZ = particles::GetNucleusZ(targetCode);
+
+  inputs_.nevents = 1;
+  sys_.eos = 0; // could be configurable in principle
+  inputs_.outsteps = 1;
+  sys_.nsteps = 1;
+
+  // initialization regarding projectile
+  if (particles::Code::Nucleus == projectileCode) {
+    // is this everything?
+    inputs_.prspflg = 0;
+
+    sys_.Ap = projectile.GetNuclearA();
+    sys_.Zp = projectile.GetNuclearZ();
+    rsys_.ebeam = (projectileEnergyLab - projectile.GetMass()) * (1 / 1_GeV) /
+                  projectile.GetNuclearA();
+
+    rsys_.bdist = nucrad_(targetA) + nucrad_(sys_.Ap) + 2 * options_.CTParam[30 - 1];
+
+    int const id = 1;
+    cascinit_(sys_.Zp, sys_.Ap, id);
+  } else {
+    inputs_.prspflg = 1;
+    sys_.Ap = 1; // even for non-baryons this has to be set, see vanilla UrQMD.f
+    rsys_.bdist = nucrad_(targetA) + nucrad_(1) + 2 * options_.CTParam[30 - 1];
+    rsys_.ebeam = (projectileEnergyLab - projectile.GetMass()) * (1 / 1_GeV);
+
+    if (projectileCode == particles::Code::K0Long ||
+        projectileCode == particles::Code::K0Short) {
+      projectileCode = booleanDist_(rng_) ? particles::Code::K0 : particles::Code::K0Bar;
+    }
+
+    auto const [ityp, iso3] = ConvertToUrQMD(projectileCode);
+    // todo: conversion of K_long/short into strong eigenstates;
+    inputs_.spityp[0] = ityp;
+    inputs_.spiso3[0] = iso3;
+  }
+
+  // initilazation regarding target
+  if (particles::IsNucleus(targetCode)) {
+    sys_.Zt = targetZ;
+    sys_.At = targetA;
+    inputs_.trspflg = 0; // nucleus as target
+    int const id = 2;
+    cascinit_(sys_.Zt, sys_.At, id);
+  } else {
+    inputs_.trspflg = 1; // special particle as target
+    auto const [ityp, iso3] = ConvertToUrQMD(targetCode);
+    inputs_.spityp[1] = ityp;
+    inputs_.spiso3[1] = iso3;
+  }
+
+  int iflb = 0; // flag for retrying interaction in case of empty event, 0 means retry
+  urqmd_(iflb);
+
+  // now retrieve secondaries from UrQMD
+  auto const& originalCS = projectileMomentumLab.GetCoordinateSystem();
+  geometry::CoordinateSystem const zAxisFrame =
+      originalCS.RotateToZ(projectileMomentumLab);
+
+  for (int i = 0; i < sys_.npart; ++i) {
+    auto code = ConvertFromUrQMD(isys_.ityp[i], isys_.iso3[i]);
+    if (code == particles::Code::K0 || code == particles::Code::K0Bar) {
+      code = booleanDist_(rng_) ? particles::Code::K0Short : particles::Code::K0Long;
+    }
+
+    // "coor_.p0[i] * 1_GeV" is likely off-shell as UrQMD doesn't preserve masses well
+    auto momentum = geometry::Vector(
+        zAxisFrame,
+        geometry::QuantityVector<dimensionless_d>{coor_.px[i], coor_.py[i], coor_.pz[i]} *
+            1_GeV);
+
+    auto const energy = sqrt(momentum.squaredNorm() + square(particles::GetMass(code)));
+
+    momentum.rebase(originalCS); // transform back into standard lab frame
+    C8LOG_DEBUG(" Secondary {} code {} p={} GeV", i, code,
+                momentum.GetComponents() / 1_GeV);
+
+    view.AddSecondary(
+        std::make_tuple(code, energy, momentum, projectilePosition, projectileTime));
+  }
+
+  C8LOG_DEBUG("UrQMD generated {} secondaries!", sys_.npart);
+
+  return process::EProcessReturn::eOk;
+}
+
+/**
+ * the random number generator function of UrQMD
+ */
+double corsika::UrQMD::ranf_(int&) {
+  static corsika::RNG& rng =
+      corsika::RNGManager::GetInstance().GetRandomStream("UrQMD");
+  static std::uniform_real_distribution<double> dist;
+
+  return dist(rng);
+}
+
+corsika::Code corsika::UrQMD::ConvertFromUrQMD(int vItyp, int vIso3) {
+  int const pdgInt =
+      pdgid_(vItyp, vIso3); // use the conversion function provided by UrQMD
+  if (pdgInt == 0) {        // pdgid_ returns 0 on error
+    throw std::runtime_error("UrQMD pdgid() returned 0");
+  }
+  auto const pdg = static_cast<particles::PDGCode>(pdgInt);
+  return particles::ConvertFromPDG(pdg);
+}
+
+std::pair<int, int> corsika::UrQMD::ConvertToUrQMD(
+    corsika::Code code) {
+  static const std::map<int, std::pair<int, int>> mapPDGToUrQMD{
+      // data mostly from github.com/afedynitch/ParticleDataTool
+      {22, {100, 0}},      // gamma
+      {111, {101, 0}},     // pi0
+      {211, {101, 2}},     // pi+
+      {-211, {101, -2}},   // pi-
+      {321, {106, 1}},     // K+
+      {-321, {-106, -1}},  // K-
+      {311, {106, -1}},    // K0
+      {-311, {-106, 1}},   // K0bar
+      {2212, {1, 1}},      // p
+      {2112, {1, -1}},     // n
+      {-2212, {-1, -1}},   // pbar
+      {-2112, {-1, 1}},    // nbar
+      {221, {102, 0}},     // eta
+      {213, {104, 2}},     // rho+
+      {-213, {104, -2}},   // rho-
+      {113, {104, 0}},     // rho0
+      {323, {108, 2}},     // K*+
+      {-323, {108, -2}},   // K*-
+      {313, {108, 0}},     // K*0
+      {-313, {-108, 0}},   // K*0-bar
+      {223, {103, 0}},     // omega
+      {333, {109, 0}},     // phi
+      {3222, {40, 2}},     // Sigma+
+      {3212, {40, 0}},     // Sigma0
+      {3112, {40, -2}},    // Sigma-
+      {3322, {49, 0}},     // Xi0
+      {3312, {49, -1}},    // Xi-
+      {3122, {27, 0}},     // Lambda0
+      {2224, {17, 4}},     // Delta++
+      {2214, {17, 2}},     // Delta+
+      {2114, {17, 0}},     // Delta0
+      {1114, {17, -2}},    // Delta-
+      {3224, {41, 2}},     // Sigma*+
+      {3214, {41, 0}},     // Sigma*0
+      {3114, {41, -2}},    // Sigma*-
+      {3324, {50, 0}},     // Xi*0
+      {3314, {50, -1}},    // Xi*-
+      {3334, {55, 0}},     // Omega-
+      {411, {133, 2}},     // D+
+      {-411, {133, -2}},   // D-
+      {421, {133, 0}},     // D0
+      {-421, {-133, 0}},   // D0-bar
+      {441, {107, 0}},     // etaC
+      {431, {138, 1}},     // Ds+
+      {-431, {138, -1}},   // Ds-
+      {433, {139, 1}},     // Ds*+
+      {-433, {139, -1}},   // Ds*-
+      {413, {134, 1}},     // D*+
+      {-413, {134, -1}},   // D*-
+      {10421, {134, 0}},   // D*0
+      {-10421, {-134, 0}}, // D*0-bar
+      {443, {135, 0}},     // jpsi
+  };
+
+  return mapPDGToUrQMD.at(static_cast<int>(GetPDG(code)));
+}
+
+void UrQMD::readXSFile(std::string const& filename) {
+  std::ifstream file(filename, std::ios::in);
+
+  if (!file.is_open()) { throw std::runtime_error(filename + " could not be opened."); }
+
+  std::string line;
+
+  std::getline(file, line);
+  std::stringstream ss(line);
+
+  char dummy;
+  int nTargets, nProjectiles, nSupports;
+  ss >> dummy >> nTargets >> nProjectiles >> nSupports;
+
+  decltype(xs_interp_support_table_)::extent_gen extents;
+  xs_interp_support_table_.resize(extents[nProjectiles][nTargets][nSupports]);
+
+  for (int i = 0; i < nTargets; ++i) {
+    for (int j = 0; j < nProjectiles; ++j) {
+      for (int k = 0; k < nSupports; ++k) {
+        std::getline(file, line);
+        std::stringstream s(line);
+        double energy, sigma;
+        s >> energy >> sigma;
+        xs_interp_support_table_[j][i][k] = sigma * 1_mb;
+      }
+
+      std::getline(file, line);
+      std::getline(file, line);
+    }
+  }
+}
diff --git a/corsika/modules/UrQMD/UrQMD.h b/corsika/modules/UrQMD/UrQMD.h
new file mode 100644
index 0000000000000000000000000000000000000000..61a23b0ef876be1fd48d746a8f1cd3c451eec6d4
--- /dev/null
+++ b/corsika/modules/UrQMD/UrQMD.h
@@ -0,0 +1,148 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <array>
+#include <random>
+#include <string>
+#include <utility>
+#include "../../corsika/setup/SetupStack.hpp"
+
+namespace corsika::UrQMD {
+  class UrQMD : public corsika::InteractionProcess<UrQMD> {
+  public:
+    UrQMD(std::string const& path = utl::CorsikaData("UrQMD/UrQMD-1.3.1-xs.dat"));
+    corsika::units::si::GrammageType GetInteractionLength(
+        corsika::Stack::StackIterator&) const;
+
+    template <typename TParticle>
+    corsika::units::si::CrossSectionType GetCrossSection(TParticle const&,
+                                                         corsika::Code) const;
+
+    corsika::EProcessReturn DoInteraction(
+        corsika::StackView::StackIterator&);
+
+    bool CanInteract(particles::Code) const;
+
+  private:
+    static corsika::units::si::CrossSectionType GetCrossSection(
+        particles::Code, particles::Code, corsika::units::si::HEPEnergyType, int);
+    corsika::RNG& fRNG =
+        corsika::RNGManager::GetInstance().GetRandomStream("UrQMD");
+
+    corsika::random::RNG& rng_ =
+        corsika::random::RNGManager::GetInstance().GetRandomStream("urqmd");
+
+    std::uniform_int_distribution<int> booleanDist_{0, 1};
+    boost::multi_array<corsika::units::si::CrossSectionType, 3> xs_interp_support_table_;
+  };
+
+  namespace details::constants {
+    // from coms.f
+    int constexpr nmax = 500;
+
+    // from options.f
+    int constexpr numcto = 400;
+    int constexpr numctp = 400;
+
+    // from inputs.f
+    int constexpr aamax = 300;
+
+  } // namespace details::constants
+
+  template <typename T>
+  using nmaxArray = std::array<T, details::constants::nmax>;
+  using nmaxIntArray = nmaxArray<int>;
+  using nmaxDoubleArray = nmaxArray<double>;
+
+  extern "C" {
+  // FORTRAN functions defined in UrQMD
+  void iniurqmdc8_();
+  double ranf_(int&);
+  void cascinit_(int const&, int const&, int const&);
+  double nucrad_(int const&);
+  void urqmd_(int&);
+  int pdgid_(int const&, int const&);
+  double sigtot_(int&, int&, double&);
+  int collclass_(int&, int&, int&, int&);
+  double crossx_(int const&, double const&, int const&, int const&, double const&,
+                 int const&, int const&, double const&, double&);
+  int readsigmaln_(int const&, int const&, int const&);
+
+  // defined in coms.f
+  extern struct {
+    int npart, nbar, nmes, ctag, nsteps, uid_cnt, ranseed, event;
+    int Ap; // projectile mass number (in case of nucleus)
+    int At; // target mass number (in case of nucleus)
+    int Zp; // projectile charge number (in case of nucleus)
+    int Zt; // target charge number (in case of nucleus)
+    int eos, dectag, NHardRes, NSoftRes, NDecRes, NElColl, NBlColl;
+  } sys_;
+
+  extern struct {
+    double time, acttime, bdist, bimp, bmin;
+    double ebeam; // lab-frame energy of projectile
+    double ecm;
+  } rsys_;
+
+  // defined in coms.f
+  extern struct {
+    nmaxIntArray spin, ncoll, charge, ityp, lstcoll, iso3, origin, strid, uid;
+  } isys_;
+
+  // defined in coor.f
+  extern struct {
+    nmaxDoubleArray r0, rx, ry, rz, p0, px, py, pz, fmass, rww, dectime;
+  } coor_;
+
+  // defined in inputs.f
+  extern struct {
+    int nevents;
+    std::array<int, 2> spityp; // particle codes of: [0]: projectile, [1]: target
+    int prspflg;               // projectile special flag
+    int trspflg; // target special flag, set to 1 unless target is nucleus > H
+    std::array<int, 2> spiso3; // particle codes of: [0]: projectile, [1]: target
+    int outsteps, bflag, srtflag, efuncflag, nsrt, npb, firstev;
+  } inputs_;
+
+  // defined in inputs.f
+  extern struct {
+    double srtmin, srtmax, pbeam, betann, betatar, betapro, pbmin, pbmax;
+  } input2_;
+
+  // defined in options.f
+  extern struct {
+    std::array<double, details::constants::numcto> CTOption;
+    std::array<double, details::constants::numctp> CTParam;
+  } options_;
+
+  extern struct {
+    int fixedseed, bf13, bf14, bf15, bf16, bf17, bf18, bf19, bf20;
+  } loptions_;
+
+  // defined in urqmdInterface.F
+  extern struct { std::array<double, 3> xs, bim; } cxs_u2_;
+  }
+
+  /**
+   * convert CORSIKA code to UrQMD code tuple
+   *
+   * In the current implementation a detour via the PDG code is made.
+   */
+  std::pair<int, int> ConvertToUrQMD(particles::Code);
+  particles::Code ConvertFromUrQMD(int vItyp, int vIso3);
+
+} // namespace corsika::UrQMD
+
+#endif
diff --git a/Processes/UrQMD/testUrQMD.cc b/corsika/modules/UrQMD/testUrQMD.cc
similarity index 62%
rename from Processes/UrQMD/testUrQMD.cc
rename to corsika/modules/UrQMD/testUrQMD.cc
index 17a010c2fb324bea5aa800c793451bafbce48f7c..8bcfd651c5b386be18c119d94fe09455229a8c66 100644
--- a/Processes/UrQMD/testUrQMD.cc
+++ b/corsika/modules/UrQMD/testUrQMD.cc
@@ -7,32 +7,32 @@
  */
 
 #include <corsika/process/urqmd/UrQMD.h>
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/random/RNGManager.hpp>
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
-#include <corsika/units/PhysicalConstants.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalConstants.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/utl/CorsikaFenv.h>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/NuclearComposition.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/NuclearComposition.hpp>
 
 #include <tuple>
 #include <utility>
 
 #include <catch2/catch.hpp>
 
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
+
 using namespace corsika;
-using namespace corsika::process::UrQMD;
+using namespace corsika::UrQMD;
 using namespace corsika::units::si;
 
 template <typename TStackView>
@@ -53,6 +53,74 @@ auto sumMomentum(TStackView const& view, geometry::CoordinateSystem const& vCS)
   return sum;
 }
 
+auto setupEnvironment(particles::Code vTargetCode) {
+  // setup environment, geometry
+  auto env = std::make_unique<environment::Environment<environment::IMediumModel>>();
+  auto& universe = *(env->GetUniverse());
+  const geometry::CoordinateSystem& cs = env->GetCoordinateSystem();
+
+  auto theMedium =
+      environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>(
+          geometry::Point{cs, 0_m, 0_m, 0_m},
+          1_km * std::numeric_limits<double>::infinity());
+
+  using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>;
+  theMedium->SetModelProperties<MyHomogeneousModel>(
+      1_kg / (1_m * 1_m * 1_m),
+      environment::NuclearComposition(std::vector<particles::Code>{vTargetCode},
+                                      std::vector<float>{1.}));
+
+  auto const* nodePtr = theMedium.get();
+  universe.AddChild(std::move(theMedium));
+
+  return std::make_tuple(std::move(env), &cs, nodePtr);
+}
+
+template <typename TNodeType>
+auto setupStack(int vA, int vZ, HEPEnergyType vMomentum, TNodeType* vNodePtr,
+                geometry::CoordinateSystem const& cs) {
+  auto stack = std::make_unique<setup::Stack>();
+  auto constexpr mN = corsika::units::constants::nucleonMass;
+
+  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  corsika::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV});
+
+  HEPEnergyType const E0 =
+      sqrt(units::si::detail::static_pow<2>(mN * vA) + pLab.squaredNorm());
+  auto particle =
+      stack->AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType,
+                                    corsika::MomentumVector, geometry::Point,
+                                    units::si::TimeType, unsigned short, unsigned short>{
+          particles::Code::Nucleus, E0, pLab, origin, 0_ns, vA, vZ});
+
+  particle.SetNode(vNodePtr);
+  return std::make_tuple(
+      std::move(stack),
+      std::make_unique<decltype(corsika::SecondaryView(particle))>(particle));
+}
+
+template <typename TNodeType>
+auto setupStack(particles::Code vProjectileType, HEPEnergyType vMomentum,
+                TNodeType* vNodePtr, geometry::CoordinateSystem const& cs) {
+  auto stack = std::make_unique<setup::Stack>();
+
+  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  corsika::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV});
+
+  HEPEnergyType const E0 =
+      sqrt(units::si::detail::static_pow<2>(particles::GetMass(vProjectileType)) +
+           pLab.squaredNorm());
+  auto particle = stack->AddParticle(
+      std::tuple<particles::Code, units::si::HEPEnergyType,
+                 corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+          vProjectileType, E0, pLab, origin, 0_ns});
+
+  particle.SetNode(vNodePtr);
+  return std::make_tuple(
+      std::move(stack),
+      std::make_unique<decltype(corsika::SecondaryView(particle))>(particle));
+}
+
 TEST_CASE("UrQMD") {
   SECTION("conversion") {
     REQUIRE_THROWS(process::UrQMD::ConvertFromUrQMD(106, 0));
@@ -62,7 +130,7 @@ TEST_CASE("UrQMD") {
   }
 
   feenableexcept(FE_INVALID);
-  corsika::random::RNGManager::GetInstance().RegisterRandomStream("urqmd");
+  corsika::RNGManager::GetInstance().RegisterRandomStream("UrQMD");
   UrQMD urqmd;
 
   SECTION("interaction length") {
diff --git a/Processes/UrQMD/urqmdInterface.F b/corsika/modules/UrQMD/urqmdInterface.F
similarity index 100%
rename from Processes/UrQMD/urqmdInterface.F
rename to corsika/modules/UrQMD/urqmdInterface.F
diff --git a/corsika/modules/sibyll/CMakeLists.txt b/corsika/modules/sibyll/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..7982d74c39f0dfe08017515fbcdeeffd6990473a
--- /dev/null
+++ b/corsika/modules/sibyll/CMakeLists.txt
@@ -0,0 +1,22 @@
+set (input_dir ${PROJECT_SOURCE_DIR}/corsika/modules/sibyll)
+set (output_dir ${PROJECT_BINARY_DIR}/corsika/modules/sibyll)
+
+file (MAKE_DIRECTORY ${output_dir})
+
+add_custom_command (
+  OUTPUT  ${output_dir}/Generated.inc
+  COMMAND ${input_dir}/code_generator.py 
+          ${PROJECT_BINARY_DIR}/corsika/framework/core/particle_db.pkl
+          ${input_dir}/sibyll_codes.dat
+  DEPENDS code_generator.py
+          ${PROJECT_BINARY_DIR}/corsika/framework/core/particle_db.pkl
+          sibyll_codes.dat
+  WORKING_DIRECTORY
+          ${output_dir}/
+  COMMENT "Generate conversion tables for particle codes SIBYLL <-> CORSIKA"
+  VERBATIM
+  )
+
+add_custom_target (SourceDirLinkSib DEPENDS ${output_dir}/Generated.inc)
+add_dependencies (CORSIKA8 SourceDirLinkSib)
+
diff --git a/corsika/modules/sibyll/Decay.hpp b/corsika/modules/sibyll/Decay.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..9de7938a1afce2401bb25d77221d063ee35bb000
--- /dev/null
+++ b/corsika/modules/sibyll/Decay.hpp
@@ -0,0 +1,86 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/DecayProcess.hpp>
+
+#include <set>
+#include <vector>
+
+namespace corsika::sibyll {
+
+    class Decay : public corsika::DecayProcess<Decay> {
+      int fCount = 0;
+      bool handleAllDecays_ = true;
+
+    public:
+      Decay();
+      Decay(std::set< Code>);
+      ~Decay();
+
+      void Init();
+
+            void SetStable(const std::vector< Code>);
+      void SetUnstable(const std::vector< Code>);
+
+      void SetStable(const corsika::Code);
+      void SetUnstable(const corsika::Code);
+
+      // internally set all particles to decay/not to decay
+      void SetAllUnstable();
+      void SetAllStable();
+
+      // will this particle be stable in sibyll ?
+      bool IsStable(const corsika::Code);
+      // will this particle decay in sibyll ?
+      bool IsUnstable(const corsika::Code);
+      // set particle with input code to decay or not
+      void SetDecay(const  Code, const bool);
+
+      
+      void PrintDecayConfig(const corsika::Code);
+      void PrintDecayConfig();
+      void SetHadronsUnstable();
+
+      // is Sibyll::Decay set to handle the decay of this particle?
+      bool IsDecayHandled(const corsika::Code);
+
+      // is decay possible in principle?
+      bool CanHandleDecay(const corsika::Code);
+
+      // set Sibyll::Decay to handle the decay of this particle!
+      void SetHandleDecay(const corsika::Code);
+      // set Sibyll::Decay to handle the decay of this list of particles!
+      void SetHandleDecay(const std::vector< Code>);
+      // set Sibyll::Decay to handle all particle decays
+      void SetHandleAllDecay();
+
+      template <typename TParticle>
+      corsika::units::si::TimeType GetLifetime(TParticle const&) const;
+
+      /**
+       In this function SIBYLL is called to produce to decay the input particle.
+     */
+
+      template <typename TSecondaryParticle>
+      void DoDecay(TSecondaryParticle&);
+
+    private:
+      // internal routines to set particles stable and unstable in the COMMON blocks in
+      // sibyll
+
+      std::set< Code> handledDecays_;
+    };
+
+} // namespace corsika::sibyll
+
+
+#include <corsika/detail/modules/sibyll/Decay.inl>
+
diff --git a/corsika/modules/sibyll/Interaction.hpp b/corsika/modules/sibyll/Interaction.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..4c29a5f0120a0274b0e677163709e2a61d2d66d9
--- /dev/null
+++ b/corsika/modules/sibyll/Interaction.hpp
@@ -0,0 +1,92 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <tuple>
+
+namespace corsika::sibyll {
+
+  class Interaction : public corsika::InteractionProcess<Interaction> {
+
+    int count_ = 0;
+    int nucCount_ = 0;
+    bool initialized_ = false;
+
+  public:
+    Interaction();
+    ~Interaction();
+
+    void Init() {}
+
+    void SetStable(std::vector<corsika::Code> const&);
+    void SetUnstable(std::vector<corsika::Code> const&);
+
+    void SetUnstable(const corsika::Code);
+    void SetStable(const corsika::Code);
+    void SetAllUnstable();
+    void SetAllStable();
+
+    bool WasInitialized() { return initialized_; }
+    bool IsValidCoMEnergy(corsika::units::si::HEPEnergyType ecm) const {
+      return (minEnergyCoM_ <= ecm) && (ecm <= maxEnergyCoM_);
+    }
+    int GetMaxTargetMassNumber() const { return maxTargetMassNumber_; }
+    corsika::units::si::HEPEnergyType GetMinEnergyCoM() const { return minEnergyCoM_; }
+    corsika::units::si::HEPEnergyType GetMaxEnergyCoM() const { return maxEnergyCoM_; }
+    bool IsValidTarget(corsika::Code TargetId) const {
+      return (corsika::GetNucleusA(TargetId) < maxTargetMassNumber_) &&
+             corsika::IsNucleus(TargetId);
+    }
+
+    std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
+    GetCrossSection(const corsika::Code, const corsika::Code,
+                    const corsika::units::si::HEPEnergyType) const;
+
+    template <typename TParticle>
+    corsika::units::si::GrammageType GetInteractionLength(TParticle const&) const;
+
+    /**
+       In this function SIBYLL is called to produce one event. The
+       event is copied (and boosted) into the shower lab frame.
+     */
+
+    template <typename TProjectile>
+    corsika::EProcessReturn DoInteraction(TProjectile&);
+
+  private:
+    corsika::RNG& RNG_ =
+        corsika::RNGManager::GetInstance().GetRandomStream("s_rndm");
+    // FOR NOW keep trackedParticles private, could be configurable
+    std::vector<corsika::Code> const trackedParticles_ = {
+        corsika::Code::PiPlus,     corsika::Code::PiMinus,
+        corsika::Code::Pi0,        corsika::Code::KMinus,
+        corsika::Code::KPlus,      corsika::Code::K0Long,
+        corsika::Code::K0Short,    corsika::Code::SigmaPlus,
+        corsika::Code::Sigma0,     corsika::Code::Sigma0Bar,
+        corsika::Code::SigmaMinus, corsika::Code::Lambda0,
+        corsika::Code::Xi0,        corsika::Code::XiMinus,
+        corsika::Code::OmegaMinus, corsika::Code::DPlus,
+        corsika::Code::DMinus,     corsika::Code::D0,
+        corsika::Code::MuMinus,    corsika::Code::MuPlus,
+        corsika::Code::D0Bar};
+    const bool internalDecays_ = true;
+    const corsika::units::si::HEPEnergyType minEnergyCoM_ =
+        10. * 1e9 * corsika::units::si::electronvolt;
+    const corsika::units::si::HEPEnergyType maxEnergyCoM_ =
+        1.e6 * 1e9 * corsika::units::si::electronvolt;
+    const int maxTargetMassNumber_ = 18;
+  };
+
+} // namespace corsika::sibyll
+
+#include <corsika/detail/modules/sibyll/Interaction.inl>
diff --git a/Processes/Sibyll/NuclearInteraction.h b/corsika/modules/sibyll/NuclearInteraction.hpp
similarity index 68%
rename from Processes/Sibyll/NuclearInteraction.h
rename to corsika/modules/sibyll/NuclearInteraction.hpp
index 4a561fad1298d78e8c45f03bd25711639366e1d6..5ec3f1866c8a16e6a8edfb3f50acab921bb885c6 100644
--- a/Processes/Sibyll/NuclearInteraction.h
+++ b/corsika/modules/sibyll/NuclearInteraction.hpp
@@ -8,11 +8,11 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/InteractionProcess.h>
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
 
-namespace corsika::process::sibyll {
+namespace corsika::sibyll {
 
   class Interaction; // fwd-decl
 
@@ -22,19 +22,21 @@ namespace corsika::process::sibyll {
    **/
   template <class TEnvironment>
   class NuclearInteraction
-      : public corsika::process::InteractionProcess<NuclearInteraction<TEnvironment>> {
+      : public corsika::InteractionProcess<NuclearInteraction<TEnvironment>> {
 
     int count_ = 0;
     int nucCount_ = 0;
 
   public:
-    NuclearInteraction(corsika::process::sibyll::Interaction&, TEnvironment const&);
+    NuclearInteraction(corsika::sibyll::Interaction&, TEnvironment const&);
     ~NuclearInteraction();
 
+    void Init();
+    
     void InitializeNuclearCrossSections();
-    void PrintCrossSectionTable(corsika::particles::Code);
+    void PrintCrossSectionTable(corsika::Code);
     corsika::units::si::CrossSectionType ReadCrossSectionTable(
-        const int, corsika::particles::Code, corsika::units::si::HEPEnergyType);
+        const int, corsika::Code, corsika::units::si::HEPEnergyType);
     corsika::units::si::HEPEnergyType GetMinEnergyPerNucleonCoM() {
       return gMinEnergyPerNucleonCoM_;
     }
@@ -47,20 +49,20 @@ namespace corsika::process::sibyll {
 
     template <typename Particle>
     std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
-    GetCrossSection(Particle const& p, const corsika::particles::Code TargetId);
+    GetCrossSection(Particle const& p, const corsika::Code TargetId);
 
     template <typename Particle>
     corsika::units::si::GrammageType GetInteractionLength(Particle const&);
 
     template <typename TSecondaryView>
-    corsika::process::EProcessReturn DoInteraction(TSecondaryView&);
+    corsika::EProcessReturn DoInteraction(TSecondaryView&);
 
   private:
     TEnvironment const& environment_;
-    corsika::process::sibyll::Interaction& hadronicInteraction_;
-    std::map<corsika::particles::Code, int> targetComponentsIndex_;
-    corsika::random::RNG& RNG_ =
-        corsika::random::RNGManager::GetInstance().GetRandomStream("sibyll");
+    corsika::sibyll::Interaction& hadronicInteraction_;
+    std::map<corsika::Code, int> targetComponentsIndex_;
+    corsika::RNG& RNG_ =
+        corsika::RNGManager::GetInstance().GetRandomStream("s_rndm");
     static constexpr unsigned int gNSample_ =
         500; // number of samples in MC estimation of cross section
     static constexpr unsigned int gMaxNucleusAProjectile_ = 56;
@@ -74,4 +76,7 @@ namespace corsika::process::sibyll {
         1.e6 * 1e9 * corsika::units::si::electronvolt;
   };
 
-} // namespace corsika::process::sibyll
+} // namespace corsika::sibyll
+
+
+#include <corsika/detail/modules/sibyll/NuclearInteraction.inl>
diff --git a/corsika/modules/sibyll/ParticleConversion.hpp b/corsika/modules/sibyll/ParticleConversion.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..52bcb30942d5f687713e7f1eb1c9d720b2082889
--- /dev/null
+++ b/corsika/modules/sibyll/ParticleConversion.hpp
@@ -0,0 +1,70 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <sibyll2.3d.hpp>
+
+#include <string>
+
+namespace corsika::sibyll {
+
+  enum class SibyllCode : int8_t;
+  using SibyllCodeIntType = std::underlying_type<SibyllCode>::type;
+
+  /**
+     These are the possible projectile for which Sibyll knows the cross section
+   */
+  enum class SibyllXSClass : int8_t {
+    CannotInteract = 0,
+    Baryon = 1,
+    Pion = 2,
+    Kaon = 3,
+  };
+  using SibyllXSClassIntType = std::underlying_type<SibyllXSClass>::type;
+
+#include <corsika/modules/sibyll/Generated.inc>
+
+  SibyllCode constexpr ConvertToSibyll(corsika::Code pCode) {
+    return corsika2sibyll[static_cast<corsika::CodeIntType>(pCode)];
+  }
+
+  corsika::Code constexpr ConvertFromSibyll(SibyllCode pCode) {
+    auto const s = static_cast<SibyllCodeIntType>(pCode);
+    auto const corsikaCode = sibyll2corsika[s - minSibyll];
+    if (corsikaCode == corsika::Code::Unknown) {
+      throw std::runtime_error(std::string("SIBYLL/CORSIKA conversion of ")
+                                   .append(std::to_string(s))
+                                   .append(" impossible"));
+    }
+    return corsikaCode;
+  }
+
+  int constexpr ConvertToSibyllRaw(corsika::Code pCode) {
+    return static_cast<int>(ConvertToSibyll(pCode));
+  }
+
+  int constexpr GetSibyllXSCode(corsika::Code pCode) {
+    return static_cast<SibyllXSClassIntType>(
+        corsika2sibyllXStype[static_cast<corsika::CodeIntType>(pCode)]);
+  }
+
+  bool constexpr CanInteract(corsika::Code pCode) {
+    return GetSibyllXSCode(pCode) > 0;
+  }
+
+  corsika::units::si::HEPMassType GetSibyllMass(corsika::Code const);
+
+} // namespace corsika::sibyll
+
+
+
+#include <corsika/detail/modules/sibyll/ParticleConversion.inl>
diff --git a/corsika/modules/sibyll/Random.hpp b/corsika/modules/sibyll/Random.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..3d82be78bc0100e40e41c867a04f3a48cc6c6eb0
--- /dev/null
+++ b/corsika/modules/sibyll/Random.hpp
@@ -0,0 +1,22 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/framework/random/RNGManager.hpp>
+#include <random>
+
+namespace sibyll {
+
+  double rndm_interface() {
+    static corsika::RNG& rng =
+      corsika::RNGManager::GetInstance().GetRandomStream("s_rndm");    
+    std::uniform_real_distribution<double> dist;
+    return dist(rng);
+  }
+  
+}
+
diff --git a/corsika/modules/sibyll/SibStack.hpp b/corsika/modules/sibyll/SibStack.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..d28fb66ab58e5078c3941409cdbdd826c51fea96
--- /dev/null
+++ b/corsika/modules/sibyll/SibStack.hpp
@@ -0,0 +1,147 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/modules/sibyll/ParticleConversion.hpp>
+#include <corsika/framework/stack/Stack.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <sibyll2.3d.hpp>
+
+namespace corsika::sibyll {
+
+  typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+
+  class SibStackData {
+
+  public:
+    void Dump() const {}
+
+    void Clear() { s_plist_.np = 0; }
+    unsigned int GetSize() const { return s_plist_.np; }
+    unsigned int GetCapacity() const { return 8000; }
+
+    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 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 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 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 unsigned int i) const {
+      using namespace corsika::units::si;
+      return s_plist_.p[4][i] * 1_GeV;
+    }
+    MomentumVector GetMomentum(const unsigned int i) const {
+      using corsika::CoordinateSystem;
+      using corsika::QuantityVector;
+      using corsika::RootCoordinateSystem;
+      using namespace corsika::units::si;
+      CoordinateSystem& rootCS =
+          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};
+      return MomentumVector(rootCS, components);
+    }
+
+    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]);
+    }
+
+    void IncrementSize() { s_plist_.np++; }
+    void DecrementSize() {
+      if (s_plist_.np > 0) { s_plist_.np--; }
+    }
+  };
+
+  template <typename StackIteratorInterface>
+  class ParticleInterface : public corsika::ParticleBase<StackIteratorInterface> {
+
+    using corsika::ParticleBase<StackIteratorInterface>::GetStackData;
+    using corsika::ParticleBase<StackIteratorInterface>::GetIndex;
+
+  public:
+    void SetParticleData(const int vID, // corsika::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::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);
+    }
+
+    corsika::units::si::HEPEnergyType GetEnergy() const {
+      return GetStackData().GetEnergy(GetIndex());
+    }
+
+    bool HasDecayed() const { return abs(GetStackData().GetId(GetIndex())) > 100; }
+
+    void SetMass(const corsika::units::si::HEPMassType v) {
+      GetStackData().SetMass(GetIndex(), v);
+    }
+
+    corsika::units::si::HEPEnergyType GetMass() const {
+      return GetStackData().GetMass(GetIndex());
+    }
+
+    void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); }
+
+    corsika::sibyll::SibyllCode GetPID() const {
+      return static_cast<corsika::sibyll::SibyllCode>(
+          GetStackData().GetId(GetIndex()));
+    }
+
+    MomentumVector GetMomentum() const { return GetStackData().GetMomentum(GetIndex()); }
+
+    void SetMomentum(const MomentumVector& v) {
+      GetStackData().SetMomentum(GetIndex(), v);
+    }
+  };
+
+  typedef corsika::Stack<SibStackData, ParticleInterface> SibStack;
+
+} // end namespace corsika::sibyll
diff --git a/corsika/modules/sibyll/code_generator.py b/corsika/modules/sibyll/code_generator.py
new file mode 100755
index 0000000000000000000000000000000000000000..22cb11022741597b6807c844766dcf0158f24365
--- /dev/null
+++ b/corsika/modules/sibyll/code_generator.py
@@ -0,0 +1,136 @@
+#!/usr/bin/env python3
+
+# (c) Copyright 2018-2019 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.
+
+
+import pickle, sys, itertools
+
+
+
+def load_particledb(filename):
+    '''
+    loads the pickled particle_db (which is an OrderedDict)
+    '''
+    with open(filename, "rb") as f:
+        particle_db = pickle.load(f)
+    return particle_db
+
+
+
+def read_sibyll_codes(filename, particle_db):
+    '''
+    reads to sibyll codes data file
+
+    For particls known to sibyll, add 'sibyll_code' and 'sibyll_xsType' to particle_db
+    '''
+    with open(filename) as f:
+        for line in f:
+            line = line.strip()
+            if len(line)==0 or line[0] == '#':
+                continue            
+            identifier, sib_code, canInteractFlag, xsType = line.split()
+            try:
+                particle_db[identifier]["sibyll_code"] = int(sib_code)
+                particle_db[identifier]["sibyll_xsType"] = xsType
+            except KeyError as e:
+                raise Exception("Identifier '{:s}' not found in particle_db".format(identifier))
+
+
+            
+
+def generate_sibyll_enum(particle_db):
+    '''
+     generates the enum to access sibyll particles by readable names
+    '''
+    output = "enum class SibyllCode : int8_t {\n"
+    for identifier, pData in particle_db.items():
+        if 'sibyll_code' in pData:
+            output += "  {:s} = {:d},\n".format(identifier, pData['sibyll_code'])
+    output += "};\n"
+    return output
+
+
+
+def generate_corsika2sibyll(particle_db):    
+    '''
+    generates the look-up table to convert corsika codes to sibyll codes
+    '''
+    string = "std::array<SibyllCode, {:d}> constexpr corsika2sibyll = {{\n".format(len(particle_db))
+    for identifier, pData in particle_db.items():
+        if 'sibyll_code' in pData:
+            string += "  SibyllCode::{:s}, \n".format(identifier)
+        else:
+            string += "  SibyllCode::Unknown, // {:s}\n".format(identifier + ' not implemented in SIBYLL')
+    string += "};\n"
+    return string
+    
+
+
+def generate_corsika2sibyll_xsType(particle_db):    
+    '''
+    generates the look-up table to convert corsika codes to sibyll codes
+    '''
+    string = "std::array<SibyllXSClass, {:d}> constexpr corsika2sibyllXStype = {{\n".format(len(particle_db))
+    for identifier, pData in particle_db.items():
+        if 'sibyll_xsType' in pData:
+            string += "  SibyllXSClass::{:s}, // {:s}\n".format(pData['sibyll_xsType'], identifier)
+        else:
+            string += "  SibyllXSClass::CannotInteract, // {:s}\n".format(identifier + ' not implemented in SIBYLL')
+    string += "};\n"
+    return string
+
+
+def generate_sibyll2corsika(particle_db) :
+    '''
+    generates the look-up table to convert sibyll codes to corsika codes    
+    '''
+    string = ""
+    
+    minID = 0
+    for identifier, pData in particle_db.items() :
+        if 'sibyll_code' in pData:
+            minID = min(minID, pData['sibyll_code'])
+
+    string += "SibyllCodeIntType constexpr minSibyll = {:d};\n\n".format(minID)
+
+    pDict = {}
+    for identifier, pData in particle_db.items() :
+        if 'sibyll_code' in pData:
+            sib_code = pData['sibyll_code'] - minID
+            pDict[sib_code] = identifier
+    
+    nPart = max(pDict.keys()) - min(pDict.keys()) + 1
+    string += "std::array<corsika::Code, {:d}> constexpr sibyll2corsika = {{\n".format(nPart)
+    
+    for iPart in range(nPart) :
+        if iPart in pDict:
+            identifier = pDict[iPart]
+        else:
+            identifier = "Unknown"
+        string += "  corsika::Code::{:s}, \n".format(identifier)
+    
+    string += "};\n"
+    return string
+
+if __name__ == "__main__":
+    if len(sys.argv) != 3:
+        print("usage: {:s} <particle_db.pkl> <sibyll_codes.dat>".format(sys.argv[0]), file=sys.stderr)
+        sys.exit(1)
+        
+    print("code_generator.py for SIBYLL")
+    
+    particle_db = load_particledb(sys.argv[1])
+    read_sibyll_codes(sys.argv[2], particle_db)
+    
+    with open("Generated.inc", "w") as f:
+        print("// this file is automatically generated\n// edit at your own risk!\n", file=f)
+        print(generate_sibyll_enum(particle_db), file=f)
+        print(generate_corsika2sibyll(particle_db), file=f)
+        print(generate_sibyll2corsika(particle_db), file=f)
+        print(generate_corsika2sibyll_xsType(particle_db), file=f)
diff --git a/corsika/modules/sibyll/sibyll_codes.dat b/corsika/modules/sibyll/sibyll_codes.dat
new file mode 100644
index 0000000000000000000000000000000000000000..d8cce42e494585023d460a0a50635a12d44139fd
--- /dev/null
+++ b/corsika/modules/sibyll/sibyll_codes.dat
@@ -0,0 +1,132 @@
+# input file for particle conversion to/from SIBYLL
+# the format of this file is: "corsika-identifier" "sibyll-id" "can-interact-in-sibyll" "cross-section-type"
+
+# The unknown particle is to handle all particles that are not known to SIBYLL.
+# It is important that sibyll-id does not overlap with any existing sibyll particle!
+# Be careful
+Unknown                  0       0       CannotInteract
+
+# Here is the list of particles known to sibyll 
+Electron                 3       0       CannotInteract
+Positron                 2       0       CannotInteract
+NuE                      15      0       CannotInteract
+NuEBar                   16      0       CannotInteract
+MuMinus                  5       0       CannotInteract
+MuPlus                   4       0       CannotInteract
+NuMu                     17      0       CannotInteract
+NuMuBar                  18      0       CannotInteract
+TauMinus                 91      0       CannotInteract
+TauPlus                  90      0       CannotInteract
+NuTau                    92      0       CannotInteract
+NuTauBar                 93      0       CannotInteract
+Gamma                    1       0       CannotInteract
+Pi0                      6       1       Pion
+#                        rho0    could interact but sibyll has no cross section/interaction length. was used for gamma had int
+Rho0                     27      0       CannotInteract
+K0Long                   11      1       Kaon
+K0                       21      0       Kaon
+K0Bar                    22      0       Kaon
+PiPlus                   7       1       Pion
+PiMinus                  8       1       Pion
+RhoPlus                  25      0       CannotInteract
+RhoMinus                 26      0       CannotInteract
+Eta                      23      0       CannotInteract
+EtaPrime                 24      0       CannotInteract
+Pi1300Plus               62      0       CannotInteract
+Pi1300Minus              63      0       CannotInteract
+Pi1300_0                 61      0       CannotInteract
+Omega                    32      0       CannotInteract
+K0Short                  12      1       Kaon
+KStar0                   30      0       CannotInteract
+KStar0Bar                31      0       CannotInteract
+KPlus                    9       1       Kaon
+KMinus                   10      1       Kaon
+KStarPlus                28      0       CannotInteract
+KStarMinus               29      0       CannotInteract
+KStar0_1430_0            66      0       CannotInteract
+KStar0_1430_0Bar         67      0       CannotInteract
+KStar0_1430_Plus         64      0       CannotInteract
+KStar0_1430_MinusBar     65      0       CannotInteract
+DPlus                    59      1       Kaon
+DMinus                   60      1       Kaon
+DStarPlus                78      0       CannotInteract
+DStarMinus               79      0       CannotInteract
+D0                       71      1       Kaon
+D0Bar                    72      1       Kaon
+DStar0                   80      0       CannotInteract
+DStar0Bar                81      0       CannotInteract
+DsPlus                   74      1       Kaon
+DsMinus                  75      1       Kaon
+DStarSPlus               76      0       CannotInteract
+DStarSMinus              77      0       CannotInteract
+EtaC                     73      0       CannotInteract
+Neutron                  14      1       Baryon
+AntiNeutron              -14     1       Baryon
+Delta0                   42      0       CannotInteract
+Delta0Bar                -42     0       CannotInteract
+DeltaMinus               43      0       CannotInteract
+DeltaPlusBar             -43     0       CannotInteract
+Proton                   13      1       Baryon
+AntiProton               -13     1       Baryon
+N1440Plus                51      0       CannotInteract
+N1440MinusBar            -51     0       CannotInteract
+N1440_0                  52      0       CannotInteract
+N1440_0Bar               -52     0       CannotInteract
+N1710Plus                53      0       CannotInteract
+N1710MinusBar            -53     0       CannotInteract
+N1710_0                  54      0       CannotInteract
+N1710_0Bar               -54     0       CannotInteract
+DeltaPlus                41      0       CannotInteract
+DeltaMinusBar            -41     0       CannotInteract
+DeltaPlusPlus            40      0       CannotInteract
+DeltaMinusMinusBar       -40     0       CannotInteract
+SigmaMinus               36      1       Baryon
+SigmaPlusBar             -36     1       Baryon
+SigmaStarMinus           46      0       CannotInteract
+SigmaStarPlusBar         -46     0       CannotInteract
+SigmaStarPlus            44      0       CannotInteract
+SigmaStarMinusBar        -44     0       CannotInteract
+SigmaStar0               45      0       CannotInteract
+SigmaStar0Bar            -45     0       CannotInteract
+Lambda0                  39      1       Baryon
+Lambda0Bar               -39     1       Baryon
+Sigma0                   35      1       Baryon
+Sigma0Bar                -35     1       Baryon
+SigmaPlus                34      1       Baryon
+SigmaMinusBar            -34     1       Baryon
+XiMinus                  38      1       Baryon
+XiPlusBar                -38     1       Baryon
+Xi0                      37      1       Baryon
+Xi0Bar                   -37     1       Baryon
+XiStarMinus              48      0       CannotInteract
+XiStarPlusBar            -48     0       CannotInteract  
+XiStar0                  47      0       CannotInteract
+XiStar0Bar               -47     0       CannotInteract
+OmegaMinus               49      0       CannotInteract
+OmegaPlusBar             -49     0       CannotInteract
+SigmaC0                  86      0       CannotInteract
+SigmaC0Bar               -86     0       CannotInteract
+SigmaStarC0              96      0       CannotInteract
+SigmaStarC0Bar           -96     0       CannotInteract
+LambdaCPlus              89      1       Baryon
+LambdaCMinusBar          -89     1       Baryon
+XiC0                     88      1       Baryon
+XiC0Bar                  -88     1       Baryon
+SigmaCPlus               85      0       CannotInteract
+SigmaCMinusBar           -85     0       CannotInteract
+SigmaStarCPlus           95      0       CannotInteract
+SigmaStarCMinusBar       -95     0       CannotInteract
+SigmaCPlusPlus           84      0       CannotInteract
+SigmaCMinusMinusBar      -84     0       CannotInteract
+SigmaStarCPlusPlus       94      0       CannotInteract
+SigmaStarCMinusMinusBar  -94     0       CannotInteract
+XiCPlus                  87      1       Baryon
+XiCMinusBar              -87     1       Baryon
+XiStarCPlus              97      0       CannotInteract
+XiStarCMinusBar          -97     0       CannotInteract
+XiStarC0                 98      0       CannotInteract
+XiStarC0Bar              -98     0       CannotInteract
+OmegaC0                  99      0       CannotInteract
+OmegaC0Bar               -99     0       CannotInteract
+Jpsi                     83      0       CannotInteract
+Phi                      33      0       CannotInteract
diff --git a/Processes/EnergyLoss/EnergyLoss.h b/corsika/process/EnergyLoss.hpp
similarity index 73%
rename from Processes/EnergyLoss/EnergyLoss.h
rename to corsika/process/EnergyLoss.hpp
index f60e16b358f2dbf9671009b5c0c4eef1eeaae9a4..6378824d21eedbc431a9fabf9b3d4c85bad7840c 100644
--- a/Processes/EnergyLoss/EnergyLoss.h
+++ b/corsika/process/EnergyLoss.hpp
@@ -8,20 +8,19 @@
 
 #pragma once
 
-#include <corsika/environment/ShowerAxis.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/process/ContinuousProcess.h>
-#include <corsika/units/PhysicalUnits.h>
-
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/framework/sequence/ContinuousProcess.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <map>
 
-namespace corsika::process::energy_loss {
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+namespace corsika {
 
-  class EnergyLoss : public corsika::process::ContinuousProcess<EnergyLoss> {
+  class EnergyLoss : public corsika::ContinuousProcess<EnergyLoss> {
 
     using MeVgcm2 = decltype(1e6 * units::si::electronvolt / units::si::gram *
                              units::si::square(1e-2 * units::si::meter));
@@ -29,8 +28,15 @@ namespace corsika::process::energy_loss {
     void MomentumUpdate(setup::Stack::ParticleType&, units::si::HEPEnergyType Enew);
 
   public:
-    EnergyLoss(environment::ShowerAxis const& showerAxis,
-               corsika::units::si::HEPEnergyType emCut);
+
+    template <typename TDim>
+    EnergyLoss(geometry::Point const& injectionPoint,
+               geometry::Vector<TDim> const& direction)
+        : InjectionPoint_(injectionPoint)
+        , ShowerAxisDirection_(direction.normalized()) {}
+
+    EnergyLoss(setup::Trajectory const& trajectory)
+        : EnergyLoss(trajectory.GetPosition(0), trajectory.GetV0()){};
 
     process::EProcessReturn DoContinuous(setup::Stack::ParticleType&,
                                          setup::Trajectory const&);
@@ -68,4 +74,5 @@ namespace corsika::process::energy_loss {
     using namespace units::si;
     return 0.0001_g / square(1_cm);
   });
-} // namespace corsika::process::energy_loss
+} // namespace corsika
+
diff --git a/Processes/HadronicElasticModel/HadronicElasticModel.h b/corsika/process/HadronicElasticModel.hpp
similarity index 74%
rename from Processes/HadronicElasticModel/HadronicElasticModel.h
rename to corsika/process/HadronicElasticModel.hpp
index 3273bfec15aad2a47128a169e1031790f0dda3c6..3b15c4b52593094345f7e77078761b1a70aec523 100644
--- a/Processes/HadronicElasticModel/HadronicElasticModel.h
+++ b/corsika/process/HadronicElasticModel.hpp
@@ -8,14 +8,14 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/InteractionProcess.h>
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
 
-#include <corsika/units/PhysicalConstants.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalConstants.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-namespace corsika::process::HadronicElasticModel {
+namespace corsika::HadronicElasticModel {
   /**
    * A simple model for elastic hadronic interactions based on the formulas
    * in Gaisser, Engel, Resconi, Cosmic Rays and Particle Physics (Cambridge Univ. Press,
@@ -25,7 +25,7 @@ namespace corsika::process::HadronicElasticModel {
    * \f$pp\f$-like even for nuclei.
    */
   class HadronicElasticInteraction
-      : public corsika::process::InteractionProcess<HadronicElasticInteraction> {
+      : public corsika::InteractionProcess<HadronicElasticInteraction> {
   private:
     corsika::units::si::CrossSectionType const fX, fY;
 
@@ -39,8 +39,8 @@ namespace corsika::process::HadronicElasticModel {
     using eV2 = decltype(units::si::square(units::si::electronvolt));
     using inveV2 = decltype(1 / units::si::square(units::si::electronvolt));
 
-    corsika::random::RNG& fRNG =
-        corsika::random::RNGManager::GetInstance().GetRandomStream(
+    corsika::RNG& fRNG =
+        corsika::RNGManager::GetInstance().GetRandomStream(
             "HadronicElasticModel");
 
     inveV2 B(eV2 s) const;
@@ -54,8 +54,9 @@ namespace corsika::process::HadronicElasticModel {
     template <typename Particle>
     corsika::units::si::GrammageType GetInteractionLength(Particle const& p);
 
-    template <typename TStackView>
-    corsika::process::EProcessReturn DoInteraction(TStackView&);
+    template <typename Particle>
+    corsika::EProcessReturn DoInteraction(Particle&);
   };
 
-} // namespace corsika::process::HadronicElasticModel
+} // namespace corsika::HadronicElasticModel
+
diff --git a/Processes/ObservationPlane/ObservationPlane.h b/corsika/process/ObservationPlane.hpp
similarity index 63%
rename from Processes/ObservationPlane/ObservationPlane.h
rename to corsika/process/ObservationPlane.hpp
index 3b530f6213a6d88160329c3165e004a3ec6b66b7..5749e69d95b99fe15f0329c518b61b3358bdb615 100644
--- a/Processes/ObservationPlane/ObservationPlane.h
+++ b/corsika/process/ObservationPlane.hpp
@@ -8,35 +8,36 @@
 
 #pragma once
 
-#include <corsika/geometry/Plane.h>
-#include <corsika/process/ContinuousProcess.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/geometry/Plane.hpp>
+#include <corsika/framework/sequence/ContinuousProcess.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <fstream>
 
-namespace corsika::process::observation_plane {
+#include "corsika/setup/SetupStack.hpp"
+#include "corsika/setup/SetupTrajectory.hpp"
+
+namespace corsika::observation_plane {
 
   /**
    * The ObservationPlane writes PDG codes, energies, and distances of particles to the
    * central point of the plane into its output file. The particles are considered
    * "absorbed" afterwards.
    */
-  class ObservationPlane : public corsika::process::ContinuousProcess<ObservationPlane> {
+  class ObservationPlane : public corsika::ContinuousProcess<ObservationPlane> {
 
   public:
     ObservationPlane(geometry::Plane const&,
                      geometry::Vector<units::si::dimensionless_d> const&,
                      std::string const&, bool = true);
 
-    corsika::process::EProcessReturn DoContinuous(
-        corsika::setup::Stack::ParticleType& vParticle,
-        corsika::setup::Trajectory const& vTrajectory);
+    corsika::EProcessReturn DoContinuous(
+        corsika::Stack::ParticleType const& vParticle,
+        corsika::Trajectory const& vTrajectory);
 
     corsika::units::si::LengthType MaxStepLength(
-        corsika::setup::Stack::ParticleType const&,
-        corsika::setup::Trajectory const& vTrajectory);
+        corsika::Stack::ParticleType const&,
+        corsika::Trajectory const& vTrajectory);
 
     void ShowResults() const;
     void Reset();
@@ -51,4 +52,6 @@ namespace corsika::process::observation_plane {
     unsigned int count_ground_ = 0;
     geometry::Vector<units::si::dimensionless_d> const xAxis_, yAxis_;
   };
-} // namespace corsika::process::observation_plane
+} // namespace corsika::observation_plane
+
+
diff --git a/Processes/ParticleCut/ParticleCut.h b/corsika/process/ParticleCut.hpp
similarity index 82%
rename from Processes/ParticleCut/ParticleCut.h
rename to corsika/process/ParticleCut.hpp
index b0e8977530a8fd7a800908bd6eb48519a411d9f0..5674e2c0306fb2ab82ebd1a8fa62c7053a3fca53 100644
--- a/Processes/ParticleCut/ParticleCut.h
+++ b/corsika/process/ParticleCut.hpp
@@ -8,14 +8,12 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/ContinuousProcess.h>
-#include <corsika/process/SecondariesProcess.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-#include <corsika/units/PhysicalUnits.h>
-
-namespace corsika::process {
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/SecondariesProcess.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include "corsika/setup/SetupStack.hpp"
+
+namespace corsika {
   namespace particle_cut {
     class ParticleCut : public process::SecondariesProcess<ParticleCut>,
                         public corsika::process::ContinuousProcess<ParticleCut> {
@@ -31,7 +29,11 @@ namespace corsika::process {
       unsigned int uiInvCount = 0;
 
     public:
-      ParticleCut(const units::si::HEPEnergyType eCut, bool em, bool inv);
+      ParticleCut(const units::si::HEPEnergyType vCut)
+          : fECut(vCut) {}
+
+      bool ParticleIsInvisible(particles::Code) const;
+      EProcessReturn DoSecondaries(corsika::StackView&);
 
       void DoSecondaries(corsika::setup::StackView&);
 
@@ -64,4 +66,6 @@ namespace corsika::process {
       bool ParticleIsInvisible(particles::Code) const;
     };
   } // namespace particle_cut
-} // namespace corsika::process
+} // namespace corsika
+
+
diff --git a/corsika/process/Pythia/Decay.hpp b/corsika/process/Pythia/Decay.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..f8cfa8f97a6fdc3b222f09c8a7e21978c9e757a3
--- /dev/null
+++ b/corsika/process/Pythia/Decay.hpp
@@ -0,0 +1,58 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <Pythia8/Pythia.h>
+
+#include <iostream>
+#include <vector>
+#include <tuple>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/DecayProcess.hpp>
+
+namespace corsika {
+
+  namespace pythia {
+
+    typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+
+    class Decay : public corsika::DecayProcess<Decay>
+    {
+
+    const std::vector<particles::Code> fTrackedParticles;
+    int fCount = 0;
+
+    public:
+
+      Decay(std::vector<corsika::Code>);
+      ~Decay();
+
+      void SetParticleListStable(std::vector<particles::Code> const& );
+      void SetUnstable(const corsika::Code);
+      void SetStable(const corsika::Code);
+
+      corsika::units::si::TimeType GetLifetime(corsika::Stack::ParticleType const&);
+
+      void DoDecay(corsika::StackView::ParticleType&);
+
+    private:
+      void SetUnstable(const corsika::particles::Code);
+      void SetStable(const corsika::particles::Code);
+      void SetStable(const std::vector<particles::Code>);
+      bool IsStable(const corsika::particles::Code);
+
+      Pythia8::Pythia fPythia;
+      std::set<particles::Code> handledDecays_;
+    };
+
+  } // namespace pythia
+} // namespace corsika
+
+#include <corsika/detail/process/Pythia/Decay.inl>
diff --git a/Processes/Pythia/Interaction.h b/corsika/process/Pythia/Interaction.hpp
similarity index 58%
rename from Processes/Pythia/Interaction.h
rename to corsika/process/Pythia/Interaction.hpp
index ef2bdfbcc5566951434c73df86ec621e561f48b9..27634e0f0159f854d1cf268abaae264a53c7d939 100644
--- a/Processes/Pythia/Interaction.h
+++ b/corsika/process/Pythia/Interaction.hpp
@@ -10,15 +10,15 @@
 
 #include <Pythia8/Pythia.h>
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/InteractionProcess.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 #include <tuple>
 
-namespace corsika::process::pythia {
+namespace corsika::pythia {
 
-  class Interaction : public corsika::process::InteractionProcess<Interaction> {
+  class Interaction : public corsika::InteractionProcess<Interaction> {
 
     int fCount = 0;
     bool fInitialized = false;
@@ -29,8 +29,8 @@ namespace corsika::process::pythia {
     ~Interaction() = default;
 
     void SetParticleListStable(std::vector<particles::Code> const&);
-    void SetUnstable(const corsika::particles::Code);
-    void SetStable(const corsika::particles::Code);
+    void SetUnstable(const corsika::Code);
+    void SetStable(const corsika::Code);
 
     bool WasInitialized() { return fInitialized; }
     bool ValidCoMEnergy(corsika::units::si::HEPEnergyType ecm) {
@@ -38,13 +38,13 @@ namespace corsika::process::pythia {
       return (10_GeV < ecm) && (ecm < 1_PeV);
     }
 
-    bool CanInteract(const corsika::particles::Code);
-    void ConfigureLabFrameCollision(const corsika::particles::Code,
-                                    const corsika::particles::Code,
+    bool CanInteract(const corsika::Code);
+    void ConfigureLabFrameCollision(const corsika::Code,
+                                    const corsika::Code,
                                     const corsika::units::si::HEPEnergyType);
     std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
-    GetCrossSection(const corsika::particles::Code BeamId,
-                    const corsika::particles::Code TargetId,
+    GetCrossSection(const corsika::Code BeamId,
+                    const corsika::Code TargetId,
                     const corsika::units::si::HEPEnergyType CoMenergy);
 
     template <typename TParticle>
@@ -55,15 +55,17 @@ namespace corsika::process::pythia {
        event is copied (and boosted) into the shower lab frame.
      */
 
-    template <typename TSecondaryView>
-    corsika::process::EProcessReturn DoInteraction(TSecondaryView&);
+    template <typename TProjectile>
+    corsika::EProcessReturn DoInteraction(TProjectile&);
 
   private:
-    corsika::random::RNG& fRNG =
-        corsika::random::RNGManager::GetInstance().GetRandomStream("pythia");
+    corsika::RNG& fRNG =
+        corsika::RNGManager::GetInstance().GetRandomStream("pythia");
     Pythia8::Pythia fPythia;
     Pythia8::SigmaTotal fSigma;
     const bool fInternalDecays = true;
   };
 
-} // namespace corsika::process::pythia
+} // namespace corsika::pythia
+
+#endif
diff --git a/corsika/process/Pythia/Random.hpp b/corsika/process/Pythia/Random.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..339a9cf8790a3f78c9e7c36e13ab569e130d417b
--- /dev/null
+++ b/corsika/process/Pythia/Random.hpp
@@ -0,0 +1,30 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <Pythia8/Pythia.h>
+#include <corsika/framework/random/RNGManager.hpp>
+
+namespace corsika {
+
+  namespace pythia {
+
+    class Random : public Pythia8::RndmEngine {
+      double flat();
+
+    private:
+      std::uniform_real_distribution<double> fDist;
+      corsika::RNG& fRNG =
+          corsika::RNGManager::GetInstance().GetRandomStream("pythia");
+    };
+
+  } // namespace pythia
+} // namespace corsika
+
+#endif
diff --git a/corsika/process/QGSJetII/Interaction.hpp b/corsika/process/QGSJetII/Interaction.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..dbe201090fde8c9367897ff1177deedf3155d424
--- /dev/null
+++ b/corsika/process/QGSJetII/Interaction.hpp
@@ -0,0 +1,63 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <string>
+
+namespace corsika::qgsjetII {
+
+  class Interaction : public corsika::InteractionProcess<Interaction> {
+
+    std::string data_path_;
+    int count_ = 0;
+    bool initialized_ = false;
+    QgsjetIIHadronType alternate_ =
+        QgsjetIIHadronType::PiPlusType; // for pi0, rho0 projectiles
+
+  public:
+    Interaction(const std::string& dataPath = "");
+    ~Interaction();
+
+    bool WasInitialized() { return initialized_; }
+    int GetMaxTargetMassNumber() const { return maxMassNumber_; }
+    bool IsValidTarget(corsika::Code TargetId) const {
+      return (corsika::GetNucleusA(TargetId) < maxMassNumber_) &&
+             corsika::IsNucleus(TargetId);
+    }
+
+    corsika::units::si::CrossSectionType GetCrossSection(
+        const corsika::Code, const corsika::Code,
+        const corsika::units::si::HEPEnergyType, const unsigned int Abeam = 0,
+        const unsigned int Atarget = 0) const;
+
+    template <typename TParticle>
+    corsika::units::si::GrammageType GetInteractionLength(TParticle const&) const;
+
+    /**
+       In this function QGSJETII is called to produce one event. The
+       event is copied (and boosted) into the shower lab frame.
+     */
+
+    template <typename TProjectile>
+    corsika::EProcessReturn DoInteraction(TProjectile&);
+
+  private:
+    corsika::RNG& fRNG =
+        corsika::RNGManager::GetInstance().GetRandomStream("qgran");
+    const int maxMassNumber_ = 208;
+  };
+
+} // namespace corsika::qgsjetII
+
+#endif
diff --git a/corsika/process/QGSJetII/ParticleConversion.hpp b/corsika/process/QGSJetII/ParticleConversion.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..aef660ee28ab3261320d44d386d9bb835100e29b
--- /dev/null
+++ b/corsika/process/QGSJetII/ParticleConversion.hpp
@@ -0,0 +1,88 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+
+#include <string>
+
+namespace corsika::qgsjetII {
+
+  /**
+     These are the possible secondaries produced by QGSJetII
+   */
+  enum class QgsjetIICode : int8_t;
+  using QgsjetIICodeIntType = std::underlying_type<QgsjetIICode>::type;
+
+  /**
+     These are the possible projectile for which QGSJetII knwos cross section
+   */
+  enum class QgsjetIIXSClass : int8_t {
+    CannotInteract = 0,
+    LightMesons = 1,
+    Baryons = 2,
+    Kaons = 3,
+  };
+  using QgsjetIIXSClassIntType = std::underlying_type<QgsjetIIXSClass>::type;
+
+  /**
+     These are the only possible projectile types in QGSJetII
+   */
+  enum class QgsjetIIHadronType : int8_t {
+    UndefinedType = 0,
+    PiPlusType = +1,
+    PiMinusType = -1,
+    ProtonType = +2,
+    AntiProtonType = -2,
+    NeutronType = +3,
+    AntiNeutronType = -3,
+    KaonPlusType = +4,
+    KaonMinusType = -4,
+    Kaon0LType = +5,
+    Kaon0SType = -5,
+    // special codes, not in QGSJetII
+    NucleusType = 100,
+    NeutralLightMesonType = 101,
+  };
+  using QgsjetIIHadronTypeIntType = std::underlying_type<QgsjetIIHadronType>::type;
+
+#include <corsika/process/qgsjetII/Generated.inc>
+
+  QgsjetIICode constexpr ConvertToQgsjetII(corsika::Code pCode) {
+    return static_cast<QgsjetIICode>(
+        corsika2qgsjetII[static_cast<corsika::CodeIntType>(pCode)]);
+  }
+
+  corsika::Code constexpr ConvertFromQgsjetII(QgsjetIICode pCode) {
+    auto const pCodeInt = static_cast<QgsjetIICodeIntType>(pCode);
+    auto const corsikaCode = qgsjetII2corsika[pCodeInt - minQgsjetII];
+    if (corsikaCode == corsika::Code::Unknown) {
+      throw std::runtime_error(std::string("QGSJETII/CORSIKA conversion of pCodeInt=")
+                                   .append(std::to_string(pCodeInt))
+                                   .append(" impossible"));
+    }
+    return corsikaCode;
+  }
+
+  int constexpr ConvertToQgsjetIIRaw(corsika::Code pCode) {
+    return static_cast<int>(ConvertToQgsjetII(pCode));
+  }
+
+  int constexpr GetQgsjetIIXSCode(corsika::Code pCode) {
+    if (pCode == corsika::Code::Nucleus) return 2;
+    return corsika2qgsjetIIXStype[static_cast<corsika::CodeIntType>(pCode)];
+  }
+
+  bool constexpr CanInteract(corsika::Code pCode) {
+    return (GetQgsjetIIXSCode(pCode) > 0) && (ConvertToQgsjetIIRaw(pCode) <= 5);
+  }
+
+} // namespace corsika::qgsjetII
+
+} // namespace corsika::process::qgsjetII
diff --git a/corsika/process/QGSJetII/QGSJetIIFragmentsStack.hpp b/corsika/process/QGSJetII/QGSJetIIFragmentsStack.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bbb852f245cbeec06a8c8043de741e6232aa4a6e
--- /dev/null
+++ b/corsika/process/QGSJetII/QGSJetIIFragmentsStack.hpp
@@ -0,0 +1,76 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/process/QGSJetII/ParticleConversion.hpp>
+#include <corsika/process/QGSJetII/qgsjet-II-04.h>
+#include <corsika/framework/stack/Stack.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika::qgsjetII {
+
+  class QGSJetIIFragmentsStackData {
+
+  public:
+    void Dump() const {}
+
+    void Clear() {
+      qgarr13_.nsf = 0;
+      qgarr55_.nwt = 0;
+    }
+    unsigned int GetSize() const { return qgarr13_.nsf; }
+    unsigned int GetCapacity() const { return iapmax; }
+
+    static unsigned int GetWoundedNucleonsTarget() { return qgarr55_.nwt; }
+    static unsigned int GetWoundedNucleonsProjectile() { return qgarr55_.nwp; }
+
+    int GetFragmentSize(const unsigned int i) const { return qgarr13_.iaf[i]; }
+    void SetFragmentSize(const unsigned int i, const int v) { qgarr13_.iaf[i] = v; }
+
+    void Copy(const unsigned int i1, const unsigned int i2) {
+      qgarr13_.iaf[i2] = qgarr13_.iaf[i1];
+    }
+
+    void Swap(const unsigned int i1, const unsigned int i2) {
+      std::swap(qgarr13_.iaf[i1], qgarr13_.iaf[i2]);
+    }
+
+    void IncrementSize() { qgarr13_.nsf++; }
+    void DecrementSize() {
+      if (qgarr13_.nsf > 0) { qgarr13_.nsf--; }
+    }
+  };
+
+  template <typename StackIteratorInterface>
+  class FragmentsInterface : public corsika::ParticleBase<StackIteratorInterface> {
+
+    using corsika::ParticleBase<StackIteratorInterface>::GetStackData;
+    using corsika::ParticleBase<StackIteratorInterface>::GetIndex;
+
+  public:
+    void SetParticleData(const int vSize) { SetFragmentSize(vSize); }
+
+    void SetParticleData(FragmentsInterface<StackIteratorInterface>& /*parent*/,
+                         const int vSize) {
+      SetFragmentSize(vSize);
+    }
+
+    void SetFragmentSize(const int v) { GetStackData().SetFragmentSize(GetIndex(), v); }
+
+    double GetFragmentSize() const { return GetStackData().GetFragmentSize(GetIndex()); }
+  };
+
+  typedef corsika::Stack<QGSJetIIFragmentsStackData, FragmentsInterface>
+      QGSJetIIFragmentsStack;
+
+} // end namespace corsika::qgsjetII
+
+#endif
diff --git a/corsika/process/QGSJetII/QGSJetIIStack.hpp b/corsika/process/QGSJetII/QGSJetIIStack.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..9bd8512d1eeced3b31fd7e6142d6c5a43d90391c
--- /dev/null
+++ b/corsika/process/QGSJetII/QGSJetIIStack.hpp
@@ -0,0 +1,129 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/process/QGSJetII/ParticleConversion.hpp>
+#include <corsika/process/QGSJetII/qgsjet-II-04.h>
+#include <corsika/framework/stack/Stack.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+namespace corsika::qgsjetII {
+
+  typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+
+  class QGSJetIIStackData {
+
+  public:
+    void Dump() const {}
+
+    void Clear() {
+      qgarr12_.nsp = 0;
+      qgarr13_.nsf = 0;
+      qgarr55_.nwt = 0;
+    }
+    unsigned int GetSize() const { return qgarr12_.nsp; }
+    unsigned int GetCapacity() const { return nptmax; }
+
+    void SetId(const unsigned int i, const int v) { qgarr14_.ich[i] = v; }
+    void SetEnergy(const unsigned int i, const corsika::units::si::HEPEnergyType v) {
+      using namespace corsika::units::si;
+      qgarr14_.esp[i][0] = v / 1_GeV;
+    }
+
+    void SetMomentum(const unsigned int i, const MomentumVector& v) {
+      using namespace corsika::units::si;
+      auto tmp = v.GetComponents();
+      qgarr14_.esp[i][2] = tmp[0] / 1_GeV;
+      qgarr14_.esp[i][3] = tmp[1] / 1_GeV;
+      qgarr14_.esp[i][1] = tmp[2] / 1_GeV;
+    }
+
+    int GetId(const unsigned int i) const { return qgarr14_.ich[i]; }
+    corsika::units::si::HEPEnergyType GetEnergy(const int i) const {
+      using namespace corsika::units::si;
+      return qgarr14_.esp[i][0] * 1_GeV;
+    }
+    MomentumVector GetMomentum(const unsigned int i, const corsika::CoordinateSystem& CS) const {
+      using namespace corsika::units::si;
+      geometry::QuantityVector<hepmomentum_d> components = {qgarr14_.esp[i][2] * 1_GeV,
+                                                            qgarr14_.esp[i][3] * 1_GeV,
+                                                            qgarr14_.esp[i][1] * 1_GeV};
+      return MomentumVector(CS, components);
+    }
+
+    void Copy(const unsigned int i1, const unsigned int i2) {
+      qgarr14_.ich[i2] = qgarr14_.ich[i1];
+      for (unsigned int i = 0; i < 4; ++i) qgarr14_.esp[i2][i] = qgarr14_.esp[i1][i];
+    }
+
+    void Swap(const unsigned int i1, const unsigned int i2) {
+      std::swap(qgarr14_.ich[i1], qgarr14_.ich[i2]);
+      for (unsigned int i = 0; i < 4; ++i)
+        std::swap(qgarr14_.esp[i1][i], qgarr14_.esp[i2][i]);
+    }
+
+    void IncrementSize() { qgarr12_.nsp++; }
+    void DecrementSize() {
+      if (qgarr12_.nsp > 0) { qgarr12_.nsp--; }
+    }
+  };
+
+  template <typename StackIteratorInterface>
+  class ParticleInterface : public corsika::ParticleBase<StackIteratorInterface> {
+
+    using corsika::ParticleBase<StackIteratorInterface>::GetStackData;
+    using corsika::ParticleBase<StackIteratorInterface>::GetIndex;
+
+  public:
+    void SetParticleData(const int vID, const corsika::units::si::HEPEnergyType vE,
+                         const MomentumVector& vP,
+                         const corsika::units::si::HEPMassType) {
+      SetPID(vID);
+      SetEnergy(vE);
+      SetMomentum(vP);
+    }
+
+    void SetParticleData(ParticleInterface<StackIteratorInterface>& /*parent*/,
+                         const int vID, const corsika::units::si::HEPEnergyType vE,
+                         const MomentumVector& vP,
+                         const corsika::units::si::HEPMassType) {
+      SetPID(vID);
+      SetEnergy(vE);
+      SetMomentum(vP);
+    }
+
+    void SetEnergy(const corsika::units::si::HEPEnergyType v) {
+      GetStackData().SetEnergy(GetIndex(), v);
+    }
+
+    corsika::units::si::HEPEnergyType GetEnergy() const {
+      return GetStackData().GetEnergy(GetIndex());
+    }
+
+    void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); }
+
+    corsika::qgsjetII::QgsjetIICode GetPID() const {
+      return static_cast<corsika::qgsjetII::QgsjetIICode>(
+          GetStackData().GetId(GetIndex()));
+    }
+
+    MomentumVector GetMomentum(const corsika::CoordinateSystem& CS) const { return GetStackData().GetMomentum(GetIndex(), CS); }
+
+    void SetMomentum(const MomentumVector& v) {
+      GetStackData().SetMomentum(GetIndex(), v);
+    }
+  };
+
+  typedef corsika::Stack<QGSJetIIStackData, ParticleInterface> QGSJetIIStack;
+
+} // end namespace corsika::qgsjetII
+
+#endif
diff --git a/Processes/QGSJetII/qgsjet-II-04.h b/corsika/process/QGSJetII/qgsjet-II-04.h
similarity index 100%
rename from Processes/QGSJetII/qgsjet-II-04.h
rename to corsika/process/QGSJetII/qgsjet-II-04.h
diff --git a/Processes/Sibyll/Decay.h b/corsika/process/Sibyll/Decay.hpp
similarity index 76%
rename from Processes/Sibyll/Decay.h
rename to corsika/process/Sibyll/Decay.hpp
index e5862344e86c13d6dbc11ee78246987fe3fcf198..dbd009dcfe0a7f0d33c7c0467034e92f4dd38839 100644
--- a/Processes/Sibyll/Decay.h
+++ b/corsika/process/Sibyll/Decay.hpp
@@ -8,29 +8,37 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
 #include <corsika/process/DecayProcess.h>
-#include <corsika/process/SecondariesProcess.h>
+#include <corsika/framework/sequence/SecondariesProcess.hpp>
 
 #include <set>
 #include <vector>
 
-namespace corsika::process {
+namespace corsika {
 
   namespace sibyll {
 
-    class Decay : public corsika::process::DecayProcess<Decay> {
-      int count_ = 0;
-      bool handleAllDecays_ = true;
-      bool sibyll_listing_ = false;
+    class Decay : public corsika::DecayProcess<Decay> {
+      int fCount = 0;
 
     public:
       Decay(const bool sibyll_listing = false);
       Decay(std::set<particles::Code>);
       ~Decay();
+      void Init();
 
-      void PrintDecayConfig(const corsika::particles::Code);
-      void PrintDecayConfig();
+      void SetStable(const std::vector<particles::Code>);
+      void SetUnstable(const std::vector<particles::Code>);
+      void SetUnstable(const corsika::Code);
+      void SetStable(const corsika::Code);
+      void SetAllUnstable();
+      void SetAllStable();
+      bool IsStable(const corsika::Code);
+      bool IsUnstable(const corsika::Code);
+      void SetDecay(const particles::Code, const bool);
+
+      void PrintDecayConfig(const corsika::Code);
       void SetHadronsUnstable();
 
       // is Sibyll::Decay set to handle the decay of this particle?
@@ -84,4 +92,6 @@ namespace corsika::process {
 
   } // namespace sibyll
 
-} // namespace corsika::process
+} // namespace corsika
+
+#endif
diff --git a/corsika/process/Sibyll/Interaction.hpp b/corsika/process/Sibyll/Interaction.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..f89245b217d249061c530dd488cda22f7c66a90e
--- /dev/null
+++ b/corsika/process/Sibyll/Interaction.hpp
@@ -0,0 +1,93 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <tuple>
+
+namespace corsika::sibyll {
+
+  class Interaction : public corsika::InteractionProcess<Interaction> {
+
+    int count_ = 0;
+    int nucCount_ = 0;
+    static bool initialized_; ///! flag to assure init is done only once
+    bool sibyll_listing_;
+
+  public:
+    Interaction(const bool sibyll_printout_on = false);
+    ~Interaction();
+
+    void Init();
+
+    void SetStable(std::vector<particles::Code> const&);
+    void SetUnstable(std::vector<particles::Code> const&);
+
+    void SetUnstable(const corsika::Code);
+    void SetStable(const corsika::Code);
+    void SetAllUnstable();
+    void SetAllStable();
+
+    static bool WasInitialized() { return initialized_; }
+    bool IsValidCoMEnergy(corsika::units::si::HEPEnergyType ecm) const {
+      return (minEnergyCoM_ <= ecm) && (ecm <= maxEnergyCoM_);
+    }
+    int GetMaxTargetMassNumber() const { return maxTargetMassNumber_; }
+    corsika::units::si::HEPEnergyType GetMinEnergyCoM() const { return minEnergyCoM_; }
+    corsika::units::si::HEPEnergyType GetMaxEnergyCoM() const { return maxEnergyCoM_; }
+    bool IsValidTarget(corsika::Code TargetId) const {
+      return (corsika::GetNucleusA(TargetId) < maxTargetMassNumber_) &&
+             corsika::IsNucleus(TargetId);
+    }
+
+    std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
+    GetCrossSection(const corsika::Code, const corsika::Code,
+                    const corsika::units::si::HEPEnergyType) const;
+
+    template <typename TParticle>
+    corsika::units::si::GrammageType GetInteractionLength(const TParticle&) const;
+
+    /**
+       In this function SIBYLL is called to produce one event. The
+       event is copied (and boosted) into the shower lab frame.
+     */
+
+    template <typename TProjectile>
+    corsika::EProcessReturn DoInteraction(TProjectile&);
+
+  private:
+    corsika::RNG& RNG_ =
+        corsika::RNGManager::GetInstance().GetRandomStream("s_rndm");
+    // FOR NOW keep trackedParticles private, could be configurable
+    std::vector<particles::Code> const trackedParticles_ = {
+        particles::Code::PiPlus,     particles::Code::PiMinus,
+        particles::Code::Pi0,        particles::Code::KMinus,
+        particles::Code::KPlus,      particles::Code::K0Long,
+        particles::Code::K0Short,    particles::Code::SigmaPlus,
+        particles::Code::Sigma0,     particles::Code::Sigma0Bar,
+        particles::Code::SigmaMinus, particles::Code::Lambda0,
+        particles::Code::Xi0,        particles::Code::XiMinus,
+        particles::Code::OmegaMinus, particles::Code::DPlus,
+        particles::Code::DMinus,     particles::Code::D0,
+        particles::Code::MuMinus,    particles::Code::MuPlus,
+        particles::Code::D0Bar};
+    const bool internalDecays_ = true;
+    const corsika::units::si::HEPEnergyType minEnergyCoM_ =
+        10. * 1e9 * corsika::units::si::electronvolt;
+    const corsika::units::si::HEPEnergyType maxEnergyCoM_ =
+        1.e6 * 1e9 * corsika::units::si::electronvolt;
+    const int maxTargetMassNumber_ = 18;
+  };
+
+} // namespace corsika::sibyll
+
+#endif
diff --git a/corsika/process/Sibyll/NuclearInteraction.hpp b/corsika/process/Sibyll/NuclearInteraction.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..7a0fe1dfc4e87beaa68479595c114cf946f671ec
--- /dev/null
+++ b/corsika/process/Sibyll/NuclearInteraction.hpp
@@ -0,0 +1,79 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+
+namespace corsika::sibyll {
+
+  class Interaction; // fwd-decl
+
+  /**
+   *
+   *
+   **/
+  template <class TEnvironment>
+  class NuclearInteraction
+      : public corsika::InteractionProcess<NuclearInteraction<TEnvironment>> {
+
+    int count_ = 0;
+    int nucCount_ = 0;
+
+  public:
+    NuclearInteraction(corsika::sibyll::Interaction&, TEnvironment const&);
+    ~NuclearInteraction();
+
+    void InitializeNuclearCrossSections();
+    void PrintCrossSectionTable(corsika::Code);
+    corsika::units::si::CrossSectionType ReadCrossSectionTable(
+        const int, corsika::Code, corsika::units::si::HEPEnergyType);
+    corsika::units::si::HEPEnergyType GetMinEnergyPerNucleonCoM() {
+      return gMinEnergyPerNucleonCoM_;
+    }
+    corsika::units::si::HEPEnergyType GetMaxEnergyPerNucleonCoM() {
+      return gMaxEnergyPerNucleonCoM_;
+    }
+    unsigned int constexpr GetMaxNucleusAProjectile() { return gMaxNucleusAProjectile_; }
+    unsigned int constexpr GetMaxNFragments() { return gMaxNFragments_; }
+    unsigned int constexpr GetNEnergyBins() { return gNEnBins_; }
+
+    template <typename Particle>
+    std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
+    GetCrossSection(Particle& p, const corsika::Code TargetId);
+
+    template <typename Particle>
+    corsika::units::si::GrammageType GetInteractionLength(Particle const&);
+
+    template <typename Projectile>
+    corsika::EProcessReturn DoInteraction(Projectile&);
+
+  private:
+    TEnvironment const& environment_;
+    corsika::sibyll::Interaction& hadronicInteraction_;
+    std::map<corsika::Code, int> targetComponentsIndex_;
+    corsika::RNG& RNG_ =
+        corsika::RNGManager::GetInstance().GetRandomStream("s_rndm");
+    static constexpr int gNSample_ =
+        500; // number of samples in MC estimation of cross section
+    static constexpr unsigned int gMaxNucleusAProjectile_ = 56;
+    static constexpr unsigned int gNEnBins_ = 6;
+    static constexpr unsigned int gMaxNFragments_ = 60;
+    // energy limits defined by table used for cross section in signuc.f
+    // 10**1 GeV to 10**6 GeV
+    static constexpr corsika::units::si::HEPEnergyType gMinEnergyPerNucleonCoM_ =
+        10. * 1e9 * corsika::units::si::electronvolt;
+    static constexpr corsika::units::si::HEPEnergyType gMaxEnergyPerNucleonCoM_ =
+        1.e6 * 1e9 * corsika::units::si::electronvolt;
+  };
+
+} // namespace corsika::sibyll
+
+#endif
diff --git a/Processes/Sibyll/ParticleConversion.h b/corsika/process/Sibyll/ParticleConversion.h
similarity index 58%
rename from Processes/Sibyll/ParticleConversion.h
rename to corsika/process/Sibyll/ParticleConversion.h
index 143e15e63aac36287de7f05d918cae8f2c1065a4..a2bc716cafd56e9a1aa8a52c4448f4466510a79b 100644
--- a/Processes/Sibyll/ParticleConversion.h
+++ b/corsika/process/Sibyll/ParticleConversion.h
@@ -8,13 +8,11 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/sibyll/sibyll2.3d.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
 
 #include <string>
 
-namespace corsika::process::sibyll {
+namespace corsika::sibyll {
 
   enum class SibyllCode : int8_t;
   using SibyllCodeIntType = std::underlying_type<SibyllCode>::type;
@@ -32,14 +30,15 @@ namespace corsika::process::sibyll {
 
 #include <corsika/process/sibyll/Generated.inc>
 
-  SibyllCode constexpr ConvertToSibyll(corsika::particles::Code pCode) {
-    return corsika2sibyll[static_cast<corsika::particles::CodeIntType>(pCode)];
+  SibyllCode constexpr ConvertToSibyll(corsika::Code pCode) {
+    return static_cast<SibyllCode>(
+        corsika2sibyll[static_cast<corsika::CodeIntType>(pCode)]);
   }
 
-  corsika::particles::Code constexpr ConvertFromSibyll(SibyllCode pCode) {
+  corsika::Code constexpr ConvertFromSibyll(SibyllCode pCode) {
     auto const s = static_cast<SibyllCodeIntType>(pCode);
     auto const corsikaCode = sibyll2corsika[s - minSibyll];
-    if (corsikaCode == corsika::particles::Code::Unknown) {
+    if (corsikaCode == corsika::Code::Unknown) {
       throw std::runtime_error(std::string("SIBYLL/CORSIKA conversion of ")
                                    .append(std::to_string(s))
                                    .append(" impossible"));
@@ -47,19 +46,18 @@ namespace corsika::process::sibyll {
     return corsikaCode;
   }
 
-  int constexpr ConvertToSibyllRaw(corsika::particles::Code pCode) {
+  int constexpr ConvertToSibyllRaw(corsika::Code pCode) {
     return static_cast<int>(ConvertToSibyll(pCode));
   }
 
-  int constexpr GetSibyllXSCode(corsika::particles::Code pCode) {
-    return static_cast<SibyllXSClassIntType>(
-        corsika2sibyllXStype[static_cast<corsika::particles::CodeIntType>(pCode)]);
+  int constexpr GetSibyllXSCode(corsika::Code pCode) {
+    return corsika2sibyllXStype[static_cast<corsika::CodeIntType>(pCode)];
   }
 
-  bool constexpr CanInteract(corsika::particles::Code pCode) {
+  bool constexpr CanInteract(corsika::Code pCode) {
     return GetSibyllXSCode(pCode) > 0;
   }
 
-  corsika::units::si::HEPMassType GetSibyllMass(corsika::particles::Code const);
+} // namespace corsika::sibyll
 
 } // namespace corsika::process::sibyll
diff --git a/Processes/Sibyll/SibStack.h b/corsika/process/Sibyll/SibStack.hpp
similarity index 78%
rename from Processes/Sibyll/SibStack.h
rename to corsika/process/Sibyll/SibStack.hpp
index e3ebcc8ff87ba629a32c93f30840c131d5ae0cbb..e17e2c536f58ab1908f5333a96b17f1b917ef14a 100644
--- a/Processes/Sibyll/SibStack.h
+++ b/corsika/process/Sibyll/SibStack.hpp
@@ -8,16 +8,16 @@
 
 #pragma once
 
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 #include <corsika/process/sibyll/ParticleConversion.h>
-#include <corsika/process/sibyll/sibyll2.3d.h>
-#include <corsika/stack/Stack.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/process/sibyll/sibyll2.3c.h>
+#include <corsika/framework/stack/Stack.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-namespace corsika::process::sibyll {
+namespace corsika::sibyll {
 
-  typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+  typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
 
   class SibStackData {
 
@@ -53,9 +53,9 @@ namespace corsika::process::sibyll {
       return s_plist_.p[4][i] * 1_GeV;
     }
     MomentumVector GetMomentum(const unsigned int i) const {
-      using corsika::geometry::CoordinateSystem;
-      using corsika::geometry::QuantityVector;
-      using corsika::geometry::RootCoordinateSystem;
+      using corsika::CoordinateSystem;
+      using corsika::QuantityVector;
+      using corsika::RootCoordinateSystem;
       using namespace corsika::units::si;
       CoordinateSystem& rootCS =
           RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
@@ -82,13 +82,13 @@ namespace corsika::process::sibyll {
   };
 
   template <typename StackIteratorInterface>
-  class ParticleInterface : public corsika::stack::ParticleBase<StackIteratorInterface> {
+  class ParticleInterface : public corsika::ParticleBase<StackIteratorInterface> {
 
-    using corsika::stack::ParticleBase<StackIteratorInterface>::GetStackData;
-    using corsika::stack::ParticleBase<StackIteratorInterface>::GetIndex;
+    using corsika::ParticleBase<StackIteratorInterface>::GetStackData;
+    using corsika::ParticleBase<StackIteratorInterface>::GetIndex;
 
   public:
-    void SetParticleData(const int vID, // corsika::process::sibyll::SibyllCode vID,
+    void SetParticleData(const int vID, // corsika::sibyll::SibyllCode vID,
                          const corsika::units::si::HEPEnergyType vE,
                          const MomentumVector& vP,
                          const corsika::units::si::HEPMassType vM) {
@@ -99,7 +99,7 @@ namespace corsika::process::sibyll {
     }
 
     void SetParticleData(ParticleInterface<StackIteratorInterface>& /*parent*/,
-                         const int vID, //  corsika::process::sibyll::SibyllCode vID,
+                         const int vID, //  corsika::sibyll::SibyllCode vID,
                          const corsika::units::si::HEPEnergyType vE,
                          const MomentumVector& vP,
                          const corsika::units::si::HEPMassType vM) {
@@ -129,8 +129,8 @@ namespace corsika::process::sibyll {
 
     void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); }
 
-    corsika::process::sibyll::SibyllCode GetPID() const {
-      return static_cast<corsika::process::sibyll::SibyllCode>(
+    corsika::sibyll::SibyllCode GetPID() const {
+      return static_cast<corsika::sibyll::SibyllCode>(
           GetStackData().GetId(GetIndex()));
     }
 
@@ -141,6 +141,8 @@ namespace corsika::process::sibyll {
     }
   };
 
-  typedef corsika::stack::Stack<SibStackData, ParticleInterface> SibStack;
+  typedef corsika::Stack<SibStackData, ParticleInterface> SibStack;
 
-} // end namespace corsika::process::sibyll
+} // end namespace corsika::sibyll
+
+#endif
diff --git a/Processes/StackInspector/StackInspector.h b/corsika/process/StackInspector.hpp
similarity index 75%
rename from Processes/StackInspector/StackInspector.h
rename to corsika/process/StackInspector.hpp
index 6d99a4164844c4fae10fb0e29b15afc15a67d8aa..0b2d8aaf7e17b5b83a09352b14fa00ed56f79d30 100644
--- a/Processes/StackInspector/StackInspector.h
+++ b/corsika/process/StackInspector.hpp
@@ -8,22 +8,22 @@
 
 #pragma once
 
-#include <corsika/process/StackProcess.h>
-#include <corsika/setup/SetupTrajectory.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/sequence/StackProcess.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <chrono>
+#include "corsika/setup/SetupTrajectory.hpp"
 
-namespace corsika::process {
+namespace corsika {
 
   namespace stack_inspector {
 
     template <typename TStack>
-    class StackInspector : public corsika::process::StackProcess<StackInspector<TStack>> {
+    class StackInspector : public corsika::StackProcess<StackInspector<TStack>> {
 
       typedef typename TStack::ParticleType Particle;
 
-      using corsika::process::StackProcess<StackInspector<TStack>>::GetStep;
+      using corsika::StackProcess<StackInspector<TStack>>::GetStep;
 
     public:
       StackInspector(const int vNStep, const bool vReportStack,
@@ -49,4 +49,5 @@ namespace corsika::process {
 
   } // namespace stack_inspector
 
-} // namespace corsika::process
+} // namespace corsika
+
diff --git a/Processes/SwitchProcess/SwitchProcess.h b/corsika/process/SwitchProcess.hpp
similarity index 92%
rename from Processes/SwitchProcess/SwitchProcess.h
rename to corsika/process/SwitchProcess.hpp
index 6da1b82d86c6075bf672d935bd4022e45f3b6800..1ade22295e4f8dfbc98ea512cb462524e6fe351c 100644
--- a/Processes/SwitchProcess/SwitchProcess.h
+++ b/corsika/process/SwitchProcess.hpp
@@ -8,12 +8,12 @@
 
 #pragma once
 
-#include <corsika/process/InteractionProcess.h>
-#include <corsika/process/ProcessSequence.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/framework/sequence/ProcessSequence.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include "corsika/setup/SetupStack.hpp"
 
-namespace corsika::process::switch_process {
+namespace corsika::switch_process {
 
   /**
    * This process provides an energy-based switch between two interaction processes P1 and
@@ -97,4 +97,5 @@ namespace corsika::process::switch_process {
       }
     }
   };
-} // namespace corsika::process::switch_process
+} // namespace corsika::switch_process
+
diff --git a/Processes/TrackWriter/TrackWriter.h b/corsika/process/TrackWriter.hpp
similarity index 68%
rename from Processes/TrackWriter/TrackWriter.h
rename to corsika/process/TrackWriter.hpp
index b62e09feac758cf1a30ef1966d4e02379313076e..3af5fdda68233dc5f45adce7bf8d6ebcfcaa7b93 100644
--- a/Processes/TrackWriter/TrackWriter.h
+++ b/corsika/process/TrackWriter.hpp
@@ -8,21 +8,21 @@
 
 #pragma once
 
-#include <corsika/process/ContinuousProcess.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/sequence/ContinuousProcess.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <fstream>
 #include <string>
 
-namespace corsika::process::track_writer {
+namespace corsika::track_writer {
 
-  class TrackWriter : public corsika::process::ContinuousProcess<TrackWriter> {
+  class TrackWriter : public corsika::ContinuousProcess<TrackWriter> {
 
   public:
     TrackWriter(std::string const& filename);
 
     template <typename Particle, typename Track>
-    corsika::process::EProcessReturn DoContinuous(Particle&, Track&);
+    corsika::EProcessReturn DoContinuous(Particle&, Track&);
 
     template <typename Particle, typename Track>
     corsika::units::si::LengthType MaxStepLength(Particle&, Track&) {
@@ -37,4 +37,5 @@ namespace corsika::process::track_writer {
     int precision = 6;
   };
 
-} // namespace corsika::process::track_writer
+} // namespace corsika::track_writer
+
diff --git a/corsika/process/detail/EnergyLoss.cc b/corsika/process/detail/EnergyLoss.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6e6d44ac7305f3cb58ad95b301355c8b0fabf8b0
--- /dev/null
+++ b/corsika/process/detail/EnergyLoss.cc
@@ -0,0 +1,303 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/process/energy_loss/EnergyLoss.h>
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+
+#include <corsika/framework/geometry/Line.hpp>
+
+#include <cmath>
+#include <fstream>
+#include <iostream>
+#include <limits>
+#include <numeric>
+
+#include "../corsika/setup/SetupStack.hpp"
+#include "../corsika/setup/SetupTrajectory.hpp"
+
+using namespace std;
+
+using namespace corsika;
+using namespace corsika::units::si;
+using SetupParticle = corsika::Stack::ParticleType;
+using SetupTrack = corsika::Trajectory;
+
+namespace corsika {
+
+  auto elab2plab = [](HEPEnergyType Elab, HEPMassType m) {
+    return sqrt((Elab - m) * (Elab + m));
+  };
+
+  /**
+   *   PDG2018, passage of particles through matter
+   *
+   * Note, that \f$I_{\mathrm{eff}}\f$ of composite media a determined from \f$ \ln I =
+   * \sum_i a_i \ln(I_i) \f$ where \f$ a_i \f$ is the fraction of the electron population
+   * (\f$\sim Z_i\f$) of the \f$i\f$-th element. This can also be used for shell
+   * corrections or density effects.
+   *
+   * The \f$I_{\mathrm{eff}}\f$ of compounds is not better than a few percent, if not
+   * measured explicitly.
+   *
+   * For shell correction, see Sec 6 of https://www.nap.edu/read/20066/chapter/8#115
+   *
+   */
+  HEPEnergyType EnergyLoss::BetheBloch(SetupParticle const& p, GrammageType const dX) {
+
+    // all these are material constants and have to come through Environment
+    // right now: values for nitrogen_D
+    // 7 nitrogen_gas 82.0 0.49976 D E 0.0011653 0.0 1.7378 4.1323 0.15349 3.2125 10.54
+    auto Ieff = 82.0_eV;
+    [[maybe_unused]] auto Zmat = 7;
+    auto ZoverA = 0.49976_mol / 1_g;
+    const double x0 = 1.7378;
+    const double x1 = 4.1323;
+    const double Cbar = 10.54;
+    const double delta0 = 0.0;
+    const double aa = 0.15349;
+    const double sk = 3.2125;
+    // end of material constants
+
+    // this is the Bethe-Bloch coefficiet 4pi N_A r_e^2 m_e c^2
+    auto constexpr K = 0.307075_MeV / 1_mol * square(1_cm);
+    HEPEnergyType const E = p.GetEnergy();
+    HEPMassType const m = p.GetMass();
+    double const gamma = E / m;
+    int const Z = p.GetChargeNumber();
+    int const Z2 = Z * Z;
+    HEPMassType constexpr me = particles::Electron::GetMass();
+    auto const m2 = m * m;
+    auto constexpr me2 = me * me;
+    double const gamma2 = gamma * gamma;
+
+    double const beta2 = (gamma2 - 1) / gamma2; // 1-1/gamma2    (1-1/gamma)*(1+1/gamma);
+                                                // (gamma_2-1)/gamma_2 = (1-1/gamma2);
+    double constexpr c2 = 1;                    // HEP convention here c=c2=1
+    cout << "BetheBloch beta2=" << beta2 << " gamma2=" << gamma2 << endl;
+    [[maybe_unused]] double const eta2 = beta2 / (1 - beta2);
+    HEPMassType const Wmax =
+        2 * me * c2 * beta2 * gamma2 / (1 + 2 * gamma * me / m + me2 / m2);
+    // approx, but <<1%    HEPMassType const Wmax = 2*me*c2*beta2*gamma2;      for HEAVY
+    // PARTICLES Wmax ~ 2me v2 for non-relativistic particles
+    cout << "BetheBloch Wmax=" << Wmax << endl;
+
+    // Sternheimer parameterization, density corrections towards high energies
+    // NOTE/TODO: when Cbar is 0 it needs to be approximated from parameterization ->
+    // MISSING
+    cout << "BetheBloch p.GetMomentum().GetNorm()/m=" << p.GetMomentum().GetNorm() / m
+         << endl;
+    double const x = log10(p.GetMomentum().GetNorm() / m);
+    double delta = 0;
+    if (x >= x1) {
+      delta = 2 * (log(10)) * x - Cbar;
+    } else if (x < x1 && x >= x0) {
+      delta = 2 * (log(10)) * x - Cbar + aa * pow((x1 - x), sk);
+    } else if (x < x0) { // and IF conductor (otherwise, this is 0)
+      delta = delta0 * pow(100, 2 * (x - x0));
+    }
+    cout << "BetheBloch delta=" << delta << endl;
+
+    // with further low energies correction, accurary ~1% down to beta~0.05 (1MeV for p)
+
+    // shell correction, <~100MeV
+    // need more clarity about formulas and units
+    const double Cadj = 0;
+    /*
+    // https://www.nap.edu/read/20066/chapter/8#104
+    HEPEnergyType Iadj = 12_eV * Z + 7_eV;  // Iadj<163eV
+    if (Iadj>=163_eV)
+      Iadj = 9.76_eV * Z + 58.8_eV * pow(Z, -0.19);  // Iadj>=163eV
+    double const Cadj = (0.422377/eta2 + 0.0304043/(eta2*eta2) -
+    0.00038106/(eta2*eta2*eta2)) * 1e-6 * Iadj*Iadj + (3.858019/eta2 -
+    0.1667989/(eta2*eta2) + 0.00157955/(eta2*eta2*eta2)) * 1e-9 * Iadj*Iadj*Iadj;
+    */
+
+    // Barkas correction O(Z3) higher-order Born approximation
+    // see Appl. Phys. 85 (1999) 1249
+    // double A = 1;
+    // if (p.GetPID() == particles::Code::Nucleus) A = p.GetNuclearA();
+    // double const Erel = (p.GetEnergy()-p.GetMass()) / A / 1_keV;
+    // double const Llow = 0.01 * Erel;
+    // double const Lhigh = 1.5/pow(Erel, 0.4) + 45000./Zmat * pow(Erel, 1.6);
+    // double const barkas = Z * Llow*Lhigh/(Llow+Lhigh); // RU, I think the Z was
+    // missing...
+    double const barkas = 1; // does not work yet
+
+    // Bloch correction for O(Z4) higher-order Born approximation
+    // see Appl. Phys. 85 (1999) 1249
+    const double alpha = 1. / 137.035999173;
+    double const y2 = Z * Z * alpha * alpha / beta2;
+    double const bloch = -y2 * (1.202 - y2 * (1.042 - 0.855 * y2 + 0.343 * y2 * y2));
+
+    // cout << "BetheBloch Erel=" << Erel << " barkas=" << barkas << " bloch=" << bloch <<
+    // endl;
+
+    double const aux = 2 * me * c2 * beta2 * gamma2 * Wmax / (Ieff * Ieff);
+    return -K * Z2 * ZoverA / beta2 *
+           (0.5 * log(aux) - beta2 - Cadj / Z - delta / 2 + barkas + bloch) * dX;
+  }
+
+EnergyLoss::EnergyLoss(environment::ShowerAxis const& shower_axis,
+                       corsika::units::si::HEPEnergyType emCut)
+    : shower_axis_(shower_axis)
+    , emCut_(emCut)
+    , profile_(int(shower_axis.maximumX() / dX_) + 1) {}
+
+auto elab2plab = [](HEPEnergyType Elab, HEPMassType m) {
+  return sqrt((Elab - m) * (Elab + m));
+};
+
+/**
+ *   PDG2018, passage of particles through matter
+ *
+ * Note, that \f$I_{\mathrm{eff}}\f$ of composite media a determined from \f$ \ln I =
+ * \sum_i a_i \ln(I_i) \f$ where \f$ a_i \f$ is the fraction of the electron population
+ * (\f$\sim Z_i\f$) of the \f$i\f$-th element. This can also be used for shell
+ * corrections or density effects.
+ *
+ * The \f$I_{\mathrm{eff}}\f$ of compounds is not better than a few percent, if not
+ * measured explicitly.
+ *
+ * For shell correction, see Sec 6 of https://www.nap.edu/read/20066/chapter/8#115
+ *
+ */
+HEPEnergyType EnergyLoss::BetheBloch(SetupParticle const& p, GrammageType const dX) {
+
+  // all these are material constants and have to come through Environment
+  // right now: values for nitrogen_D
+  // 7 nitrogen_gas 82.0 0.49976 D E 0.0011653 0.0 1.7378 4.1323 0.15349 3.2125 10.54
+  auto Ieff = 82.0_eV;
+  [[maybe_unused]] auto Zmat = 7;
+  auto ZoverA = 0.49976_mol / 1_g;
+  const double x0 = 1.7378;
+  const double x1 = 4.1323;
+  const double Cbar = 10.54;
+  const double delta0 = 0.0;
+  const double aa = 0.15349;
+  const double sk = 3.2125;
+  // end of material constants
+
+  // this is the Bethe-Bloch coefficiet 4pi N_A r_e^2 m_e c^2
+  auto constexpr K = 0.307075_MeV / 1_mol * square(1_cm);
+  HEPEnergyType const E = p.GetEnergy();
+  HEPMassType const m = p.GetMass();
+  double const gamma = E / m;
+  int const Z = p.GetChargeNumber();
+  int const Z2 = Z * Z;
+  HEPMassType constexpr me = particles::Electron::GetMass();
+  auto const m2 = m * m;
+  auto constexpr me2 = me * me;
+  double const gamma2 = gamma * gamma;
+
+  double const beta2 = (gamma2 - 1) / gamma2; // 1-1/gamma2    (1-1/gamma)*(1+1/gamma);
+                                              // (gamma_2-1)/gamma_2 = (1-1/gamma2);
+  double constexpr c2 = 1;                    // HEP convention here c=c2=1
+  C8LOG_DEBUG("BetheBloch beta2={}, gamma2={}", beta2, gamma2);
+  [[maybe_unused]] double const eta2 = beta2 / (1 - beta2);
+  HEPMassType const Wmax =
+      2 * me * c2 * beta2 * gamma2 / (1 + 2 * gamma * me / m + me2 / m2);
+  // approx, but <<1%    HEPMassType const Wmax = 2*me*c2*beta2*gamma2;      for HEAVY
+  // PARTICLES Wmax ~ 2me v2 for non-relativistic particles
+  C8LOG_DEBUG("BetheBloch Wmax={}", Wmax);
+
+  // Sternheimer parameterization, density corrections towards high energies
+  // NOTE/TODO: when Cbar is 0 it needs to be approximated from parameterization ->
+  // MISSING
+  C8LOG_DEBUG("BetheBloch p.GetMomentum().GetNorm()/m{}=", p.GetMomentum().GetNorm() / m);
+  double const x = log10(p.GetMomentum().GetNorm() / m);
+  double delta = 0;
+  if (x >= x1) {
+    delta = 2 * (log(10)) * x - Cbar;
+  } else if (x < x1 && x >= x0) {
+    delta = 2 * (log(10)) * x - Cbar + aa * pow((x1 - x), sk);
+  } else if (x < x0) { // and IF conductor (otherwise, this is 0)
+    delta = delta0 * pow(100, 2 * (x - x0));
+  }
+
+  void EnergyLoss::MomentumUpdate(corsika::Stack::ParticleType& vP,
+                                  corsika::units::si::HEPEnergyType Enew) {
+    HEPMomentumType Pnew = elab2plab(Enew, vP.GetMass());
+    auto pnew = vP.GetMomentum();
+    vP.SetMomentum(pnew * Pnew / pnew.GetNorm());
+  }
+
+  void EnergyLoss::FillProfile(SetupParticle const& vP, SetupTrack const& vTrack,
+                               const HEPEnergyType dE) {
+
+    using namespace corsika;
+
+    auto const toStart = vTrack.GetPosition(0) - InjectionPoint_;
+    auto const toEnd = vTrack.GetPosition(1) - InjectionPoint_;
+
+    auto const v1 = (toStart * 1_Hz).dot(ShowerAxisDirection_);
+    auto const v2 = (toEnd * 1_Hz).dot(ShowerAxisDirection_);
+    geometry::Line const lineToStartBin(InjectionPoint_, ShowerAxisDirection_ * v1);
+    geometry::Line const lineToEndBin(InjectionPoint_, ShowerAxisDirection_ * v2);
+
+    SetupTrack const trajToStartBin(lineToStartBin, 1_s);
+    SetupTrack const trajToEndBin(lineToEndBin, 1_s);
+
+    GrammageType const grammageStart =
+        vP.GetNode()->GetModelProperties().IntegratedGrammage(trajToStartBin,
+                                                              trajToStartBin.GetLength());
+    GrammageType const grammageEnd =
+        vP.GetNode()->GetModelProperties().IntegratedGrammage(trajToEndBin,
+                                                              trajToEndBin.GetLength());
+
+    const int binStart = grammageStart / dX_;
+    const int binEnd = grammageEnd / dX_;
+
+    std::cout << "energy deposit of " << -dE << " between " << grammageStart << " and "
+              << grammageEnd << std::endl;
+
+    auto energyCount = HEPEnergyType::zero();
+
+    auto fill = [&](int bin, GrammageType weight) {
+      const auto dX = grammageEnd - grammageStart;
+      if (dX > dX_threshold_) {
+        auto const increment = -dE * weight / (grammageEnd - grammageStart);
+        Profile_[bin] += increment;
+        energyCount += increment;
+
+        std::cout << "filling bin " << bin << " with weight " << weight << ": "
+                  << increment << std::endl;
+      }
+    };
+
+    // fill longitudinal profile
+    fill(binStart, (1 + binStart) * dX_ - grammageStart);
+    fill(binEnd, grammageEnd - binEnd * dX_);
+
+    if (binStart == binEnd) { fill(binStart, -dX_); }
+
+    for (int bin = binStart + 1; bin < binEnd; ++bin) { fill(bin, dX_); }
+
+  // fill longitudinal profile
+  if (binStart == binEnd) {
+    fill(binStart, 1);
+  } else {
+    fill(binStart, ((1 + binStart) * dX_ - grammageStart) / deltaX);
+    fill(binEnd, (grammageEnd - binEnd * dX_) / deltaX);
+    for (int bin = binStart + 1; bin < binEnd; ++bin) { fill(bin, 1); }
+  }
+
+  C8LOG_DEBUG("total energy added to histogram: {} ", energyCount);
+}
+
+void EnergyLoss::PrintProfile() const {
+  std::ofstream file("EnergyLossProfile.dat");
+  file << "# EnergyLoss profile" << std::endl
+       << "# lower X bin edge [g/cm2]  dE/dX [GeV/g/cm2]" << endl;
+  double const deltaX = dX_ / 1_g * square(1_cm);
+  for (size_t i = 0; i < profile_.size(); ++i) {
+    file << std::scientific << std::setw(15) << i * deltaX << std::setw(15)
+         << profile_.at(i) / (deltaX * 1_GeV) << endl;
+  }
+
+} // namespace corsika
diff --git a/corsika/process/detail/HadronicElasticModel.cc b/corsika/process/detail/HadronicElasticModel.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a7fad5814c73ce63029c04575beb48e9c4d14ed5
--- /dev/null
+++ b/corsika/process/detail/HadronicElasticModel.cc
@@ -0,0 +1,122 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/process/hadronic_elastic_model/HadronicElasticModel.h>
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/random/ExponentialDistribution.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
+
+#include <iomanip>
+#include <iostream>
+#include "../corsika/setup/SetupStack.hpp"
+
+using namespace corsika;
+using SetupParticle = corsika::Stack::ParticleType;
+
+namespace corsika::HadronicElasticModel {
+
+  void HadronicElasticInteraction::Init() {}
+
+  HadronicElasticInteraction::HadronicElasticInteraction(units::si::CrossSectionType x,
+                                                         units::si::CrossSectionType y)
+      : fX(x)
+      , fY(y) {}
+
+  template <>
+  units::si::GrammageType HadronicElasticInteraction::GetInteractionLength(
+      SetupParticle const& p) {
+    using namespace units::si;
+    if (p.GetPID() == particles::Code::Proton) {
+      auto const* currentNode = p.GetNode();
+      auto const& mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+
+      auto const& components = mediumComposition.GetComponents();
+      auto const& fractions = mediumComposition.GetFractions();
+
+      auto const projectileMomentum = p.GetMomentum();
+      auto const projectileMomentumSquaredNorm = projectileMomentum.squaredNorm();
+      auto const projectileEnergy = p.GetEnergy();
+
+HadronicElasticInteraction::HadronicElasticInteraction(units::si::CrossSectionType x,
+                                                       units::si::CrossSectionType y)
+    : fX(x)
+    , fY(y) {}
+
+template <>
+units::si::GrammageType HadronicElasticInteraction::GetInteractionLength(
+    SetupParticle const& p) {
+  using namespace units::si;
+  if (p.GetPID() == particles::Code::Proton) {
+    auto const* currentNode = p.GetNode();
+    auto const& mediumComposition =
+        currentNode->GetModelProperties().GetNuclearComposition();
+
+    auto const& components = mediumComposition.GetComponents();
+    auto const& fractions = mediumComposition.GetFractions();
+
+    auto const projectileMomentum = p.GetMomentum();
+    auto const projectileMomentumSquaredNorm = projectileMomentum.squaredNorm();
+    auto const projectileEnergy = p.GetEnergy();
+
+    auto const avgCrossSection = [&]() {
+      CrossSectionType avgCrossSection = 0_b;
+
+      for (size_t i = 0; i < fractions.size(); ++i) {
+        auto const targetMass = particles::GetMass(components[i]);
+        auto const s = units::static_pow<2>(projectileEnergy + targetMass) -
+                       projectileMomentumSquaredNorm;
+        avgCrossSection += CrossSection(s) * fractions[i];
+      }
+
+      std::cout << "avgCrossSection: " << avgCrossSection / 1_mb << " mb" << std::endl;
+
+      return avgCrossSection;
+    }();
+
+    auto const avgTargetMassNumber = mediumComposition.GetAverageMassNumber();
+
+    GrammageType const interactionLength =
+        avgTargetMassNumber * units::constants::u / avgCrossSection;
+
+    return interactionLength;
+  } else {
+    return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+  }
+}
+
+template <>
+process::EProcessReturn HadronicElasticInteraction::DoInteraction(SetupView& view) {
+  using namespace units::si;
+  using namespace units::constants;
+
+  auto p = view.GetProjectile();
+  if (p.GetPID() != particles::Code::Proton) { return process::EProcessReturn::eOk; }
+
+  const auto* currentNode = p.GetNode();
+  const auto& composition = currentNode->GetModelProperties().GetNuclearComposition();
+  const auto& components = composition.GetComponents();
+
+  std::vector<units::si::CrossSectionType> cross_section_of_components(
+      composition.GetComponents().size());
+
+  auto const projectileMomentum = p.GetMomentum();
+  auto const projectileMomentumSquaredNorm = projectileMomentum.squaredNorm();
+  auto const projectileEnergy = p.GetEnergy();
+
+  for (size_t i = 0; i < components.size(); ++i) {
+    auto const targetMass = particles::GetMass(components[i]);
+    auto const s = units::static_pow<2>(projectileEnergy + targetMass) -
+                   projectileMomentumSquaredNorm;
+    cross_section_of_components[i] = CrossSection(s);
+  }
+
+} // namespace corsika::HadronicElasticModel
diff --git a/Processes/ObservationPlane/ObservationPlane.cc b/corsika/process/detail/ObservationPlane.cc
similarity index 95%
rename from Processes/ObservationPlane/ObservationPlane.cc
rename to corsika/process/detail/ObservationPlane.cc
index dd8b797436a7bb1c892b75ca742ff6a9e0557ade..402d9c0f303ce3f21155c9f57a93926c14a22a67 100644
--- a/Processes/ObservationPlane/ObservationPlane.cc
+++ b/corsika/process/detail/ObservationPlane.cc
@@ -6,12 +6,11 @@
  * the license.
  */
 
-#include <corsika/process/observation_plane/ObservationPlane.h>
-#include <corsika/logging/Logging.h>
+#include <corsika/process/observation_plane/ObservationPlane.hpp>
 
 #include <fstream>
 
-using namespace corsika::process::observation_plane;
+using namespace corsika::observation_plane;
 using namespace corsika::units::si;
 
 ObservationPlane::ObservationPlane(
@@ -28,9 +27,8 @@ ObservationPlane::ObservationPlane(
   outputStream_ << "#PDG code, energy / eV, x distance / m, y distance / m" << std::endl;
 }
 
-corsika::process::EProcessReturn ObservationPlane::DoContinuous(
-    setup::Stack::ParticleType& particle, setup::Trajectory const& trajectory) {
-  
+corsika::EProcessReturn ObservationPlane::DoContinuous(
+    setup::Stack::ParticleType const& particle, setup::Trajectory const& trajectory) {
   TimeType const timeOfIntersection =
       (plane_.GetCenter() - trajectory.GetLine().GetR0()).dot(plane_.GetNormal()) /
       trajectory.GetLine().GetV0().dot(plane_.GetNormal());
diff --git a/Processes/ParticleCut/ParticleCut.cc b/corsika/process/detail/ParticleCut.cc
similarity index 71%
rename from Processes/ParticleCut/ParticleCut.cc
rename to corsika/process/detail/ParticleCut.cc
index 5176ab88737ff10f310ede66f397d861d49c73c1..5cd87dad75a07b89679bee90efc33e05997620dd 100644
--- a/Processes/ParticleCut/ParticleCut.cc
+++ b/corsika/process/detail/ParticleCut.cc
@@ -6,18 +6,17 @@
  * the license.
  */
 
-#include <corsika/logging/Logging.h>
-#include <corsika/process/particle_cut/ParticleCut.h>
+#include <corsika/process/particle_cut/ParticleCut.hpp>
 
 using namespace std;
 
 using namespace corsika;
-using namespace corsika::process;
+using namespace corsika;
 using namespace corsika::units::si;
-using namespace corsika::particles;
-using namespace corsika::setup;
+using namespace corsika;
+using namespace corsika;
 
-namespace corsika::process {
+namespace corsika {
   namespace particle_cut {
 
     template <typename TParticle>
@@ -57,32 +56,35 @@ namespace corsika::process {
       }
     }
 
-    template <typename TParticle>
-    bool ParticleCut::checkCutParticle(const TParticle& particle) {
-
-      const Code pid = particle.GetPID();
-      HEPEnergyType energy = particle.GetEnergy();
-      C8LOG_DEBUG(fmt::format("ParticleCut: checking {}, E= {} GeV, EcutTot={} GeV", pid,
-                              energy / 1_GeV,
-                              (fEmEnergy + fInvEnergy + fEnergy) / 1_GeV));
-      if (bCutEm && ParticleIsEmParticle(pid)) {
-        C8LOG_DEBUG("removing em. particle...");
-        fEmEnergy += energy;
-        uiEmCount += 1;
-        return true;
-      } else if (bCutInv && ParticleIsInvisible(pid)) {
-        C8LOG_DEBUG("removing inv. particle...");
-        fInvEnergy += energy;
-        uiInvCount += 1;
-        return true;
-      } else if (ParticleIsBelowEnergyCut(particle)) {
-        C8LOG_DEBUG("removing low en. particle...");
-        fEnergy += energy;
-        return true;
-      } else if (particle.GetTime() > 10_ms) {
-        C8LOG_DEBUG("removing OLD particle...");
-        fEnergy += energy;
-        return true;
+    EProcessReturn ParticleCut::DoSecondaries(corsika::StackView& vS) {
+      auto p = vS.begin();
+      while (p != vS.end()) {
+        const Code pid = p.GetPID();
+        HEPEnergyType energy = p.GetEnergy();
+        cout << "ProcessCut: DoSecondaries: " << pid << " E= " << energy
+             << ", EcutTot=" << (fEmEnergy + fInvEnergy + fEnergy) / 1_GeV << " GeV"
+             << endl;
+        if (ParticleIsEmParticle(pid)) {
+          cout << "removing em. particle..." << endl;
+          fEmEnergy += energy;
+          fEmCount += 1;
+          p.Delete();
+        } else if (ParticleIsInvisible(pid)) {
+          cout << "removing inv. particle..." << endl;
+          fInvEnergy += energy;
+          fInvCount += 1;
+          p.Delete();
+        } else if (ParticleIsBelowEnergyCut(p)) {
+          cout << "removing low en. particle..." << endl;
+          fEnergy += energy;
+          p.Delete();
+        } else if (p.GetTime() > 10_ms) {
+          cout << "removing OLD particle..." << endl;
+          fEnergy += energy;
+          p.Delete();
+        } else {
+          ++p; // next entry in SecondaryView
+        }
       }
       return false; // this particle will not be removed/cut
     }
@@ -143,4 +145,4 @@ namespace corsika::process {
     }
 
   } // namespace particle_cut
-} // namespace corsika::process
+} // namespace corsika
diff --git a/Processes/Pythia/Decay.cc b/corsika/process/detail/Pythia/Decay.cc
similarity index 93%
rename from Processes/Pythia/Decay.cc
rename to corsika/process/detail/Pythia/Decay.cc
index 92920dfbacdcaa809df665db59ae57bc70d8b46c..e79d534bd7245c2ad81ab8459f658d4ade4edde3 100644
--- a/Processes/Pythia/Decay.cc
+++ b/corsika/process/detail/Pythia/Decay.cc
@@ -10,10 +10,8 @@
 #include <corsika/process/pythia/Decay.h>
 #include <corsika/process/pythia/Random.h>
 
-#include <corsika/geometry/FourVector.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-#include <corsika/utl/COMBoost.h>
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
 
 using std::cout;
 using std::endl;
@@ -21,18 +19,18 @@ using std::tuple;
 using std::vector;
 
 using namespace corsika;
-using namespace corsika::setup;
-using View = corsika::setup::StackView;
-using Particle = corsika::setup::Stack::ParticleType;
+using namespace corsika;
+using Projectile = corsika::StackView::ParticleType;
+using Particle = corsika::Stack::ParticleType;
 using Track = Trajectory;
 
-namespace corsika::process::pythia {
+namespace corsika::pythia {
 
   Decay::Decay(const bool print_listing)
       : print_listing_(print_listing) {
 
     // set random number generator in pythia
-    Pythia8::RndmEngine* rndm = new corsika::process::pythia::Random();
+    Pythia8::RndmEngine* rndm = new corsika::pythia::Random();
     fPythia.setRndmEnginePtr(rndm);
 
     /*
@@ -255,13 +253,12 @@ namespace corsika::process::pythia {
 
         view.AddSecondary(
             tuple<particles::Code, units::si::HEPEnergyType,
-                  corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{
-                pyId, fourMomLab.GetTimeLikeComponent(),
-                fourMomLab.GetSpaceLikeComponents(), decayPoint, t0});
+                  corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+                pyId, pyEn, pyP, decayPoint, t0});
       }
 
     // set particle stable
     Decay::SetStable(particleId);
   }
 
-} // namespace corsika::process::pythia
+} // namespace corsika::pythia
diff --git a/Processes/Pythia/Interaction.cc b/corsika/process/detail/Pythia/Interaction.cc
similarity index 94%
rename from Processes/Pythia/Interaction.cc
rename to corsika/process/detail/Pythia/Interaction.cc
index 7a0dbfa64878c77d3fbed0b6fd58798219dc0b38..1b22153ef6a5f326eb30b5698a6acaef3c66fc48 100644
--- a/Processes/Pythia/Interaction.cc
+++ b/corsika/process/detail/Pythia/Interaction.cc
@@ -8,26 +8,26 @@
 
 #include <corsika/process/pythia/Interaction.h>
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/FourVector.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/utl/COMBoost.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
 
 #include <tuple>
+#include "../../corsika/setup/SetupStack.hpp"
 
 using std::cout;
 using std::endl;
 using std::tuple;
 
 using namespace corsika;
-using namespace corsika::setup;
-using SecondaryView = corsika::setup::StackView;
-using Particle = corsika::setup::Stack::ParticleType;
+using namespace corsika;
+using Projectile = corsika::StackView::ParticleType;
+using Particle = corsika::Stack::ParticleType;
 
-namespace corsika::process::pythia {
+namespace corsika::pythia {
 
-  typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+  typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
 
   Interaction::Interaction(const bool print_listing)
       : print_listing_(print_listing) {
@@ -120,13 +120,13 @@ namespace corsika::process::pythia {
     fPythia.init();
   }
 
-  bool Interaction::CanInteract(const corsika::particles::Code pCode) {
-    return pCode == corsika::particles::Code::Proton ||
-           pCode == corsika::particles::Code::Neutron ||
-           pCode == corsika::particles::Code::AntiProton ||
-           pCode == corsika::particles::Code::AntiNeutron ||
-           pCode == corsika::particles::Code::PiMinus ||
-           pCode == corsika::particles::Code::PiPlus;
+  bool Interaction::CanInteract(const corsika::Code pCode) {
+    return pCode == corsika::Code::Proton ||
+           pCode == corsika::Code::Neutron ||
+           pCode == corsika::Code::AntiProton ||
+           pCode == corsika::Code::AntiNeutron ||
+           pCode == corsika::Code::PiMinus ||
+           pCode == corsika::Code::PiPlus;
   }
 
   tuple<units::si::CrossSectionType, units::si::CrossSectionType>
@@ -402,4 +402,4 @@ namespace corsika::process::pythia {
     return process::EProcessReturn::eOk;
   }
 
-} // namespace corsika::process::pythia
+} // namespace corsika::pythia
diff --git a/Processes/Pythia/Random.cc b/corsika/process/detail/Pythia/Random.cc
similarity index 81%
rename from Processes/Pythia/Random.cc
rename to corsika/process/detail/Pythia/Random.cc
index acf2837a5ee7ee991a672ab28e21e8fbe16c87b2..0ebfbd85b670637d7339366f60713cf7d26b8c4d 100644
--- a/Processes/Pythia/Random.cc
+++ b/corsika/process/detail/Pythia/Random.cc
@@ -8,8 +8,8 @@
 
 #include <corsika/process/pythia/Random.h>
 
-namespace corsika::process::pythia {
+namespace corsika::pythia {
 
   double Random::flat() { return fDist(fRNG); }
 
-} // namespace corsika::process::pythia
+} // namespace corsika::pythia
diff --git a/Processes/QGSJetII/Interaction.cc b/corsika/process/detail/QGSJetII/Interaction.cc
similarity index 90%
rename from Processes/QGSJetII/Interaction.cc
rename to corsika/process/detail/QGSJetII/Interaction.cc
index c16233af582c5908261f88e6de89af58748b0e09..086f98a9a592c42633298e9e5ce27f8368d17c2c 100644
--- a/Processes/QGSJetII/Interaction.cc
+++ b/corsika/process/detail/QGSJetII/Interaction.cc
@@ -8,22 +8,24 @@
 
 #include <corsika/process/qgsjetII/Interaction.h>
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/geometry/FourVector.h>
-#include <corsika/geometry/QuantityVector.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/framework/geometry/QuantityVector.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/process/qgsjetII/ParticleConversion.h>
 #include <corsika/process/qgsjetII/QGSJetIIFragmentsStack.h>
 #include <corsika/process/qgsjetII/QGSJetIIStack.h>
 #include <corsika/process/qgsjetII/qgsjet-II-04.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-#include <corsika/utl/COMBoost.h>
+#include <corsika/framework/utility/COMBoost.hpp>
 
 #include <random>
 #include <sstream>
 #include <string>
 #include <tuple>
 
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
+
 using std::cout;
 using std::endl;
 using std::ostringstream;
@@ -31,12 +33,12 @@ using std::string;
 using std::tuple;
 
 using namespace corsika;
-using namespace corsika::setup;
+using namespace corsika;
 using SetupParticle = setup::Stack::StackIterator;
 using SetupView = setup::StackView;
 using Track = Trajectory;
 
-namespace corsika::process::qgsjetII {
+namespace corsika::qgsjetII {
 
   Interaction::Interaction(const string& dataPath)
       : data_path_(dataPath) {
@@ -141,7 +143,7 @@ namespace corsika::process::qgsjetII {
       si::CrossSectionType weightedProdCrossSection = mediumComposition.WeightedSum(
           [=](particles::Code targetID) -> si::CrossSectionType {
             int targetA = 0;
-            if (corsika::particles::IsNucleus(targetID))
+            if (corsika::IsNucleus(targetID))
               targetA = particles::GetNucleusA(targetID);
             return GetCrossSection(corsikaBeamId, targetID, Elab, Abeam, targetA);
           });
@@ -233,7 +235,7 @@ namespace corsika::process::qgsjetII {
       for (size_t i = 0; i < compVec.size(); ++i) {
         auto const targetId = compVec[i];
         int targetA = 0;
-        if (corsika::particles::IsNucleus(targetId))
+        if (corsika::IsNucleus(targetId))
           targetA = particles::GetNucleusA(targetId);
         const auto sigProd =
             GetCrossSection(corsikaBeamId, targetId, projectileEnergyLab, beamA, targetA);
@@ -306,28 +308,18 @@ namespace corsika::process::qgsjetII {
         int Z = 0;
         switch (A) {
           case 1: { // proton/neutron
-            std::uniform_real_distribution<double> select;
-            if (select(rng_) > 0.5) {
-              idFragm = particles::Code::Proton;
-              Z = 1;
-            } else {
-              idFragm = particles::Code::Neutron;
-              Z = 0;
-            }
-
-            const HEPMassType nucleonMass = particles::GetMass(idFragm);
-
-            auto momentum = geometry::Vector(
-                zAxisFrame, corsika::geometry::QuantityVector<hepmomentum_d>{
-                                0.0_GeV, 0.0_GeV,
-                                sqrt((projectileEnergyLabPerNucleon + nucleonMass) *
-                                     (projectileEnergyLabPerNucleon - nucleonMass))});
-
-            auto const energy = sqrt(momentum.squaredNorm() + square(nucleonMass));
-            momentum.rebase(originalCS); // transform back into standard lab frame
-            std::cout << "secondary fragment> id=" << idFragm
-                      << " p=" << momentum.GetComponents() << std::endl;
-            auto pnew = view.AddSecondary(
+            idFragm = particles::Code::Proton;
+
+	    auto momentum = geometry::Vector(
+					     zAxisFrame,
+					     corsika::QuantityVector<hepmomentum_d>{0.0_GeV, 0.0_GeV,
+						 sqrt((projectileEnergyLab + particles::Proton::GetMass()) *
+						      (projectileEnergyLab - particles::Proton::GetMass()))});
+	    
+	    auto const energy = sqrt(momentum.squaredNorm() + square(particles::GetMass(idFragm)));	    
+	    momentum.rebase(originalCS); // transform back into standard lab frame
+	    std::cout << "secondary fragment> id=" << idFragm << " p=" << momentum.GetComponents() << std::endl;
+            auto pnew = vP.AddSecondary(
                 tuple<particles::Code, units::si::HEPEnergyType, stack::MomentumVector,
                       geometry::Point, units::si::TimeType>{idFragm, energy, momentum,
                                                             pOrig, tOrig});
@@ -403,4 +395,4 @@ namespace corsika::process::qgsjetII {
     return process::EProcessReturn::eOk;
   }
 
-} // namespace corsika::process::qgsjetII
+} // namespace corsika::qgsjetII
diff --git a/Processes/QGSJetII/ParticleConversion.cc b/corsika/process/detail/QGSJetII/ParticleConversion.cc
similarity index 76%
rename from Processes/QGSJetII/ParticleConversion.cc
rename to corsika/process/detail/QGSJetII/ParticleConversion.cc
index c8057e9ad7c7677aebf6e96f1e3e89e998f62ad1..b9e40535448c230d80022c82ecfb3089218995e6 100644
--- a/Processes/QGSJetII/ParticleConversion.cc
+++ b/corsika/process/detail/QGSJetII/ParticleConversion.cc
@@ -6,7 +6,7 @@
  * the license.
  */
 
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
 #include <corsika/process/qgsjetII/ParticleConversion.h>
 
-using namespace corsika::process::qgsjetII;
+using namespace corsika::qgsjetII;
diff --git a/Processes/QGSJetII/qgsjet-II-04.cc b/corsika/process/detail/QGSJetII/qgsjet-II-04.cc
similarity index 83%
rename from Processes/QGSJetII/qgsjet-II-04.cc
rename to corsika/process/detail/QGSJetII/qgsjet-II-04.cc
index a318d0a6cb774057203d34a93c977f290c70362b..d668daf0b025c5361e43b863cb441fcbf2939a68 100644
--- a/Processes/QGSJetII/qgsjet-II-04.cc
+++ b/corsika/process/detail/QGSJetII/qgsjet-II-04.cc
@@ -8,7 +8,7 @@
 
 #include <corsika/process/qgsjetII/qgsjet-II-04.h>
 
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/random/RNGManager.hpp>
 
 #include <iostream>
 #include <random>
@@ -25,8 +25,8 @@ datadir::datadir(const std::string& dir) {
 }
 
 double qgran_(int&) {
-  static corsika::random::RNG& rng =
-      corsika::random::RNGManager::GetInstance().GetRandomStream("qgsjet");
+  static corsika::RNG& rng =
+      corsika::RNGManager::GetInstance().GetRandomStream("qgran");
 
   std::uniform_real_distribution<double> dist;
   return dist(rng);
diff --git a/Processes/StackInspector/StackInspector.cc b/corsika/process/detail/StackInspector.cc
similarity index 87%
rename from Processes/StackInspector/StackInspector.cc
rename to corsika/process/detail/StackInspector.cc
index 6bd1bceb3c912abbaf971ba18039504a6422c0b0..2a5622b3e67b33c6e9cbb34899ba0d5afca7a2e6 100644
--- a/Processes/StackInspector/StackInspector.cc
+++ b/corsika/process/detail/StackInspector.cc
@@ -6,23 +6,25 @@
  * the license.
  */
 
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/stack_inspector/StackInspector.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/process/stack_inspector/StackInspector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/logging/Logger.h>
 
 #include <chrono>
 #include <iomanip>
 #include <iostream>
 #include <limits>
+
+#include "../corsika/setup/SetupTrajectory.hpp"
 using namespace std;
 
 using namespace corsika;
-using namespace corsika::particles;
+using namespace corsika;
 using namespace corsika::units::si;
-using namespace corsika::process::stack_inspector;
+using namespace corsika_inspector;
 
 template <typename TStack>
 StackInspector<TStack>::StackInspector(const int vNStep, const bool vReportStack,
@@ -81,7 +83,7 @@ void StackInspector<TStack>::DoStack(const TStack& vS) {
 }
 
 #include <corsika/cascade/testCascade.h>
-#include <corsika/setup/SetupStack.h>
+#include "../corsika/setup/SetupStack.hpp"
 
 template class process::stack_inspector::StackInspector<setup::Stack>;
 template class process::stack_inspector::StackInspector<TestCascadeStack>;
diff --git a/Processes/TrackWriter/TrackWriter.cc b/corsika/process/detail/TrackWriter.cc
similarity index 82%
rename from Processes/TrackWriter/TrackWriter.cc
rename to corsika/process/detail/TrackWriter.cc
index 2d9825d869f69a1da7956c7631e8ffdb6d85fea2..7ce08e49d1b8c17604850d45c96ca0d58adbb1d5 100644
--- a/Processes/TrackWriter/TrackWriter.cc
+++ b/corsika/process/detail/TrackWriter.cc
@@ -8,19 +8,19 @@
 
 #include <corsika/process/track_writer/TrackWriter.h>
 
-#include <corsika/particles/ParticleProperties.h>
-
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
 
 #include <iomanip>
 #include <limits>
 
-using namespace corsika::setup;
+#include "../corsika/setup/SetupStack.hpp"
+#include "../corsika/setup/SetupTrajectory.hpp"
+
+using namespace corsika;
 using Particle = Stack::ParticleType;
 using Track = Trajectory;
 
-namespace corsika::process::track_writer {
+namespace corsika::track_writer {
 
   TrackWriter::TrackWriter(std::string const& filename)
       : fFilename(filename) {
@@ -56,4 +56,9 @@ namespace corsika::process::track_writer {
     return process::EProcessReturn::eOk;
   }
 
-} // namespace corsika::process::track_writer
+  template <>
+  units::si::LengthType TrackWriter::MaxStepLength(Particle&, Track&) {
+    return units::si::meter * std::numeric_limits<double>::infinity();
+  }
+
+} // namespace corsika::track_writer
diff --git a/corsika/setup/SetupEnvironment.hpp b/corsika/setup/SetupEnvironment.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..37b9357b6465a8333e7a9a19a0c431747ae76a2f
--- /dev/null
+++ b/corsika/setup/SetupEnvironment.hpp
@@ -0,0 +1,19 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/IMediumModel.hpp>
+#include <corsika/media/NameModel.hpp>
+
+namespace corsika::setup {
+  using IEnvironmentModel = corsika::IMediumModel;
+  using SetupEnvironment = corsika::Environment<IEnvironmentModel>;
+} // namespace corsika
+
diff --git a/Framework/Utilities/try_feenableexcept.cc b/corsika/setup/SetupLogger.hpp
similarity index 74%
rename from Framework/Utilities/try_feenableexcept.cc
rename to corsika/setup/SetupLogger.hpp
index d70dbebadff7a8ba3841daa65a7f51c333a5cafa..5bddc24d1d825c6a0d14eeda303cdcf04b017cbb 100644
--- a/Framework/Utilities/try_feenableexcept.cc
+++ b/corsika/setup/SetupLogger.hpp
@@ -1,14 +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 <cfenv>
+#pragma once
+
+namespace corsika {}
 
-int main() {
-  feenableexcept(FE_ALL_EXCEPT);
-  return 0;
-}
\ No newline at end of file
diff --git a/corsika/setup/SetupStack.hpp b/corsika/setup/SetupStack.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..8b16947d5e1dafa052013c9212acb160c7a88a73
--- /dev/null
+++ b/corsika/setup/SetupStack.hpp
@@ -0,0 +1,204 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+// the basic particle data stack:
+#include <corsika/stack/SuperStupidStack.h>
+
+// extension with nuclear data for Code::Nucleus
+#include <corsika/stack/NuclearStackExtension.h>
+
+// extension with geometry information for tracking
+#include <corsika/media/Environment.hpp>
+#include <corsika/framework/stack/CombinedStack.hpp>
+
+#include <tuple>
+#include <utility>
+#include <vector>
+#include <corsika/setup/SetupEnvironment.hpp>
+
+  namespace detail {
+
+/**
+ * @class GeometryData
+ *
+ * definition of stack-data object to store geometry information
+ */
+class GeometryData {
+
+public:
+  using BaseNodeType = typename TEnvType::BaseNodeType;
+
+  // these functions are needed for the Stack interface
+  void Init() {}
+  void Clear() { fNode.clear(); }
+  unsigned int GetSize() const { return fNode.size(); }
+  unsigned int GetCapacity() const { return fNode.size(); }
+  void Copy(const int i1, const int i2) { fNode[i2] = fNode[i1]; }
+  void Swap(const int i1, const int i2) { std::swap(fNode[i1], fNode[i2]); }
+
+  // custom data access function
+  void SetNode(const int i, BaseNodeType const* v) { fNode[i] = v; }
+  auto const* GetNode(const int i) const { return fNode[i]; }
+
+  // these functions are also needed by the Stack interface
+  void IncrementSize() { fNode.push_back(nullptr); }
+  void DecrementSize() {
+    if (fNode.size() > 0) { fNode.pop_back(); }
+  }
+
+  // custom private data section
+private:
+  std::vector<const BaseNodeType*> fNode;
+};
+
+/**
+ * @class GeometryDataInterface
+ *
+ * corresponding defintion of a stack-readout object, the iteractor
+ * dereference operator will deliver access to these function
+// defintion of a stack-readout object, the iteractor dereference
+// operator will deliver access to these function
+ */
+template <typename T, typename TEnvType>
+class GeometryDataInterface : public T {
+
+public:
+  using T::GetIndex;
+  using T::GetStackData;
+  using T::SetParticleData;
+  using BaseNodeType = typename TEnvType::BaseNodeType;
+
+  // default version for particle-creation from input data
+  void SetParticleData(const std::tuple<BaseNodeType const*> v) {
+    SetNode(std::get<0>(v));
+  }
+  void SetParticleData(GeometryDataInterface& parent,
+                       const std::tuple<BaseNodeType const*>) {
+    SetNode(parent.GetNode()); // copy Node from parent particle!
+  }
+  void SetParticleData() { SetNode(nullptr); }
+  void SetParticleData(GeometryDataInterface& parent) {
+    SetNode(parent.GetNode()); // copy Node from parent particle!
+  }
+  void SetNode(BaseNodeType const* v) { GetStackData().SetNode(GetIndex(), v); }
+  auto const* GetNode() const { return GetStackData().GetNode(GetIndex()); }
+};
+
+namespace corsika::setup {
+
+    // the GeometryNode stack needs to know the type of geometry-nodes from the
+    // environment:
+    template <typename TStackIter>
+    using SetupGeometryDataInterface = typename stack::node::MakeGeometryDataInterface<
+        TStackIter, corsika::setup::Environment>::type;
+
+    //
+    // 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::nuclear_extension::NuclearParticleInterface<
+            corsika::super_stupid::SuperStupidStack::PIType, StackIter>;
+    //
+
+    // the particle data stack with extra nuclear information:
+    using ParticleDataStack = corsika::nuclear_extension::NuclearStackExtension<
+        corsika::super_stupid::SuperStupidStack, ExtendedParticleInterfaceType>;
+
+    // ------------------------------------------
+    // Add [optional] history data to stack, too:
+
+    // combine particle data stack with geometry information for tracking
+    template <typename StackIter>
+    using StackWithGeometryInterface =
+        corsika::CombinedParticleInterface<ParticleDataStack::PIType,
+                                                  SetupGeometryDataInterface, StackIter>;
+
+    using StackWithGeometry =
+        corsika::CombinedStack<typename ParticleDataStack::StackImpl,
+                                      GeometryData<setup::SetupEnvironment>,
+                                      StackWithGeometryInterface>;
+
+  } // namespace detail
+
+  // ---------------------------------------
+  // this is the FINAL stack we use in C8:
+
+#ifdef WITH_HISTORY
+
+  /*
+   * the version with history
+   */
+  using Stack = detail::StackWithHistory;
+  template <typename T1, template <typename> typename M2>
+  using StackViewProducer = corsika::history::HistorySecondaryProducer<T1, M2>;
+
+  namespace detail {
+    /*
+      See Issue 161
+
+      unfortunately clang does not support this in the same way (yet) as
+      gcc, so we have to distinguish here. If clang cataches up, we
+      could remove the clang branch here and also in
+      corsika::Cascade. The gcc code is much more generic and
+      universal. If we could do the gcc version, we won't had to define
+      StackView globally, we could do it with MakeView whereever it is
+      actually needed. Keep an eye on this!
+    */
+#if defined(__clang__)
+    using TheStackView = corsika::stack::SecondaryView<
+        typename corsika::setup::Stack::StackImpl,
+        // CHECK with CLANG: corsika::setup::Stack::MPIType>;
+        corsika::setup::detail::StackWithHistoryInterface, StackViewProducer>;
+#elif defined(__GNUC__) || defined(__GNUG__)
+    using TheStackView =
+        corsika::stack::MakeView<corsika::setup::Stack, StackViewProducer>::type;
+#endif
+  } // namespace detail
+
+#else // WITH_HISTORY
+
+  /*
+   * the version without history
+   */
+  using Stack = detail::StackWithGeometry;
+  template <typename T1, template <typename> typename M2>
+  using StackViewProducer = corsika::stack::DefaultSecondaryProducer<T1, M2>;
+
+  namespace detail {
+    /*
+      See Issue 161
+
+      unfortunately clang does not support this in the same way (yet) as
+      gcc, so we have to distinguish here. If clang cataches up, we
+      could remove the clang branch here and also in
+      corsika::Cascade. The gcc code is much more generic and
+      universal. If we could do the gcc version, we won't had to define
+      StackView globally, we could do it with MakeView whereever it is
+      actually needed. Keep an eye on this!
+    */
+#if defined(__clang__)
+  using StackView =
+      corsika::SecondaryView<typename corsika::Stack::StackImpl,
+                                    corsika::detail::StackWithGeometryInterface>;
+#elif defined(__GNUC__) || defined(__GNUG__)
+  using StackView = corsika::MakeView<corsika::setup::Stack>::type;
+#endif
+  } // namespace detail
+
+#endif
+
+  // ---------------------------------------
+  // this is the FINAL stackitertor (particle type) we use in C8:
+
+  using StackView = detail::TheStackView;
+
+} // namespace corsika
+
diff --git a/Setup/SetupTrajectory.h b/corsika/setup/SetupTrajectory.hpp
similarity index 78%
rename from Setup/SetupTrajectory.h
rename to corsika/setup/SetupTrajectory.hpp
index 2a42db7a649054b5cbe72ae6590174a4f926320a..5b84a140075503c2a068fafa46e3108213912c45 100644
--- a/Setup/SetupTrajectory.h
+++ b/corsika/setup/SetupTrajectory.hpp
@@ -8,25 +8,23 @@
 
 #pragma once
 
-#include <corsika/geometry/Helix.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Trajectory.h>
+#include <corsika/framework/geometry/Helix.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
 
-#include <corsika/process/tracking_line/Tracking.h>
-#include <corsika/process/tracking_leapfrog_curved/Tracking.h>
-#include <corsika/process/tracking_leapfrog_straight/Tracking.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <corsika/units/PhysicalUnits.h>
 
 namespace corsika::setup {
 
-  /**
-    Note/Warning:     Tracking and Trajectory must fit together !
+  /// definition of Trajectory base class, to be used in tracking and cascades
+  typedef corsika::Trajectory<corsika::Line> Trajectory;
 
-    tracking_leapfrog_curved::Tracking is the result of the Bachelor
-    thesis of Andre Schmidt, KIT. This is a leap-frog algorithm with
-    an analytical, precise calculation of volume intersections. This
-    algorithm needs a LeapFrogTrajectory.
+  /*
+  typedef std::variant<std::monostate, corsika::Trajectory<Line>,
+                       corsika::Trajectory<Helix>>
+                       Trajectory;
 
     tracking_leapfrog_straight::Tracking is a more simple and direct
     leap-frog implementation. The two halve steps are coded explicitly
@@ -79,7 +77,7 @@ namespace corsika::setup {
           MagneticFieldVector{line.GetR0().GetCoordinateSystem(), 0_T, 0_T, 0_T}, k,
           tEnd);
     }
-
-  } // namespace testing
-
+  };
+  */
 } // namespace corsika::setup
+
diff --git a/Stack/DummyStack/DummyStack.h b/corsika/stack/DummyStack.h
similarity index 90%
rename from Stack/DummyStack/DummyStack.h
rename to corsika/stack/DummyStack.h
index 26270b51cc0f8b9202ccdcba6dc268e6b29a3198..64934107b1dbfd35d823c289663d60b7121b3f63 100644
--- a/Stack/DummyStack/DummyStack.h
+++ b/corsika/stack/DummyStack.h
@@ -8,15 +8,14 @@
 
 #pragma once
 
-#include <corsika/logging/Logging.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/stack/Stack.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/stack/Stack.hpp>
 
 #include <string>
 #include <tuple>
 
-namespace corsika::stack {
+namespace corsika {
 
   namespace dummy {
 
@@ -84,4 +83,4 @@ namespace corsika::stack {
 
   } // namespace dummy
 
-} // namespace corsika::stack
+} // namespace corsika
diff --git a/Stack/NuclearStackExtension/NuclearStackExtension.h b/corsika/stack/NuclearStackExtension.h
similarity index 77%
rename from Stack/NuclearStackExtension/NuclearStackExtension.h
rename to corsika/stack/NuclearStackExtension.h
index c2ac33e2e0f25079dbd535ed52360bbb0c1e6244..a8dc432303b6f296d326141b3b9af2e415c13532 100644
--- a/Stack/NuclearStackExtension/NuclearStackExtension.h
+++ b/corsika/stack/NuclearStackExtension.h
@@ -8,15 +8,12 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/stack/Stack.hpp>
 
-#include <corsika/stack/Stack.h>
-#include <corsika/stack/super_stupid/SuperStupidStack.h>
-
-#include <corsika/units/PhysicalUnits.h>
-
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
 #include <corsika/logging/Logging.h>
 
@@ -24,7 +21,7 @@
 #include <tuple>
 #include <vector>
 
-namespace corsika::stack {
+namespace corsika {
 
   /**
    * @namespace nuclear_extension
@@ -44,7 +41,7 @@ namespace corsika::stack {
    *
    */
 
-  typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+  typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
 
   namespace nuclear_extension {
 
@@ -66,10 +63,10 @@ namespace corsika::stack {
 
     public:
       void SetParticleData(
-          const std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                           corsika::stack::MomentumVector, corsika::geometry::Point,
+          const std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                           corsika::MomentumVector, corsika::Point,
                            corsika::units::si::TimeType>& v) {
-        if (std::get<0>(v) == corsika::particles::Code::Nucleus) {
+        if (std::get<0>(v) == corsika::Code::Nucleus) {
           std::ostringstream err;
           err << "NuclearStackExtension: no A and Z specified for new Nucleus!";
           throw std::runtime_error(err.str());
@@ -79,13 +76,13 @@ namespace corsika::stack {
       }
 
       void SetParticleData(
-          const std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                           corsika::stack::MomentumVector, corsika::geometry::Point,
+          const std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                           corsika::MomentumVector, corsika::Point,
                            corsika::units::si::TimeType, unsigned short, unsigned short>&
               v) {
         const unsigned short A = std::get<5>(v);
         const unsigned short Z = std::get<6>(v);
-        if (std::get<0>(v) != corsika::particles::Code::Nucleus || A == 0 || Z == 0) {
+        if (std::get<0>(v) != corsika::Code::Nucleus || A == 0 || Z == 0) {
           std::ostringstream err;
           err << "NuclearStackExtension: no A and Z specified for new Nucleus!";
           throw std::runtime_error(err.str());
@@ -94,8 +91,8 @@ namespace corsika::stack {
         SetNuclearA(A);
         SetNuclearZ(Z);
         InnerParticleInterface<StackIteratorInterface>::SetParticleData(
-            std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                       corsika::stack::MomentumVector, corsika::geometry::Point,
+            std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                       corsika::MomentumVector, corsika::Point,
                        corsika::units::si::TimeType>{std::get<0>(v), std::get<1>(v),
                                                      std::get<2>(v), std::get<3>(v),
                                                      std::get<4>(v)});
@@ -103,17 +100,17 @@ namespace corsika::stack {
 
       void SetParticleData(
           InnerParticleInterface<StackIteratorInterface>& p,
-          const std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                           corsika::stack::MomentumVector, corsika::geometry::Point,
+          const std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                           corsika::MomentumVector, corsika::Point,
                            corsika::units::si::TimeType>& v) {
-        if (std::get<0>(v) == corsika::particles::Code::Nucleus) {
+        if (std::get<0>(v) == corsika::Code::Nucleus) {
           std::ostringstream err;
           err << "NuclearStackExtension: no A and Z specified for new Nucleus!";
           throw std::runtime_error(err.str());
         }
         InnerParticleInterface<StackIteratorInterface>::SetParticleData(
-            p, std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                          corsika::stack::MomentumVector, corsika::geometry::Point,
+            p, std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                          corsika::MomentumVector, corsika::Point,
                           corsika::units::si::TimeType>{std::get<0>(v), std::get<1>(v),
                                                         std::get<2>(v), std::get<3>(v),
                                                         std::get<4>(v)});
@@ -122,13 +119,13 @@ namespace corsika::stack {
 
       void SetParticleData(
           InnerParticleInterface<StackIteratorInterface>& p,
-          const std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                           corsika::stack::MomentumVector, corsika::geometry::Point,
+          const std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                           corsika::MomentumVector, corsika::Point,
                            corsika::units::si::TimeType, unsigned short, unsigned short>&
               v) {
         const unsigned short A = std::get<5>(v);
         const unsigned short Z = std::get<6>(v);
-        if (std::get<0>(v) != corsika::particles::Code::Nucleus || A == 0 || Z == 0) {
+        if (std::get<0>(v) != corsika::Code::Nucleus || A == 0 || Z == 0) {
           std::ostringstream err;
           err << "NuclearStackExtension: no A and Z specified for new Nucleus!";
           throw std::runtime_error(err.str());
@@ -137,8 +134,8 @@ namespace corsika::stack {
         SetNuclearA(A);
         SetNuclearZ(Z);
         InnerParticleInterface<StackIteratorInterface>::SetParticleData(
-            p, std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                          corsika::stack::MomentumVector, corsika::geometry::Point,
+            p, std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                          corsika::MomentumVector, corsika::Point,
                           corsika::units::si::TimeType>{std::get<0>(v), std::get<1>(v),
                                                         std::get<2>(v), std::get<3>(v),
                                                         std::get<4>(v)});
@@ -176,8 +173,8 @@ namespace corsika::stack {
        */
       corsika::units::si::HEPMassType GetMass() const {
         if (InnerParticleInterface<StackIteratorInterface>::GetPID() ==
-            corsika::particles::Code::Nucleus)
-          return corsika::particles::GetNucleusMass(GetNuclearA(), GetNuclearZ());
+            corsika::Code::Nucleus)
+          return corsika::GetNucleusMass(GetNuclearA(), GetNuclearZ());
         return InnerParticleInterface<StackIteratorInterface>::GetMass();
       }
       /**
@@ -185,7 +182,7 @@ namespace corsika::stack {
        **/
       int16_t GetChargeNumber() const {
         if (InnerParticleInterface<StackIteratorInterface>::GetPID() ==
-            corsika::particles::Code::Nucleus)
+            corsika::Code::Nucleus)
           return GetNuclearZ();
         return InnerParticleInterface<StackIteratorInterface>::GetChargeNumber();
       }
@@ -345,19 +342,48 @@ namespace corsika::stack {
 
     }; // end class NuclearStackExtensionImpl
 
+    //    template<typename StackIteratorInterface>
+    // using NuclearParticleInterfaceType<StackIteratorInterface> =
+    // NuclearParticleInterface< ,StackIteratorInterface>
+
+    // works, but requires stupd _PI class
+    // template<typename SS> using TEST =
+    // NuclearParticleInterface<corsika::super_stupid::SuperStupidStack::PIType,
+    // SS>;
     template <typename InnerStack, template <typename> typename _PI>
     using NuclearStackExtension =
         Stack<NuclearStackExtensionImpl<typename InnerStack::StackImpl>, _PI>;
 
-    //
-    template <typename StackIter>
-    using ExtendedParticleInterfaceType =
-        corsika::stack::nuclear_extension::NuclearParticleInterface<
-            corsika::stack::super_stupid::SuperStupidStack::MPIType, StackIter>;
-
-    // the particle data stack with extra nuclear information:
-    using ParticleDataStack = corsika::stack::nuclear_extension::NuclearStackExtension<
-        corsika::stack::super_stupid::SuperStupidStack, ExtendedParticleInterfaceType>;
+    // ----
+
+    // 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::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::super_stupid::SuperStupidStack, SS> >;
+
+    //template <typename InnerStack>
+      //  using NuclearStackExtension = Stack<NuclearStackExtensionImpl<typename
+    InnerStack::StackImpl>, TEST<typename
+    corsika::super_stupid::SuperStupidStack::PIType>>;
+    //using NuclearStackExtension = Stack<NuclearStackExtensionImpl<typename
+    InnerStack::StackImpl>, TEST>;
+    */
 
   } // namespace nuclear_extension
-} // namespace corsika::stack
+} // namespace corsika
diff --git a/Stack/SuperStupidStack/SuperStupidStack.h b/corsika/stack/SuperStupidStack.h
similarity index 64%
rename from Stack/SuperStupidStack/SuperStupidStack.h
rename to corsika/stack/SuperStupidStack.h
index eae265cc72d5329cc8d18cad7b762609bee06e9e..267f172dd6b90937152179e4ebebad6bbcf8d1a4 100644
--- a/Stack/SuperStupidStack/SuperStupidStack.h
+++ b/corsika/stack/SuperStupidStack.h
@@ -8,21 +8,21 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/stack/Stack.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/stack/Stack.hpp>
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h> // remove
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp> // remove
+#include <corsika/framework/geometry/Vector.hpp>
 
 #include <string>
 #include <tuple>
 #include <vector>
 
-namespace corsika::stack {
+namespace corsika {
 
-  typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+  typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
 
   namespace super_stupid {
 
@@ -34,11 +34,11 @@ namespace corsika::stack {
     class ParticleInterface : public ParticleBase<StackIteratorInterface> {
 
     protected:
-      using corsika::stack::ParticleBase<StackIteratorInterface>::GetStack;
-      using corsika::stack::ParticleBase<StackIteratorInterface>::GetStackData;
+      using corsika::ParticleBase<StackIteratorInterface>::GetStack;
+      using corsika::ParticleBase<StackIteratorInterface>::GetStackData;
 
     public:
-      using corsika::stack::ParticleBase<StackIteratorInterface>::GetIndex;
+      using corsika::ParticleBase<StackIteratorInterface>::GetIndex;
 
     public:
       std::string as_string() const {
@@ -48,39 +48,56 @@ namespace corsika::stack {
       }
 
       void SetParticleData(
-          const std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                           MomentumVector, corsika::geometry::Point,
-                           corsika::units::si::TimeType>& v) {
+          const std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                           MomentumVector, corsika::Point, corsika::units::si::TimeType>&
+              v) {
         SetPID(std::get<0>(v));
         SetEnergy(std::get<1>(v));
         SetMomentum(std::get<2>(v));
         SetPosition(std::get<3>(v));
         SetTime(std::get<4>(v));
       }
+      /*
+    void SetParticleData(const corsika::Code vDataPID,
+                         const corsika::units::si::HEPEnergyType vDataE,
+                         const MomentumVector& vMomentum,
+                         const corsika::Point& vPosition,
+                         const corsika::units::si::TimeType vTime) {
+      }*/
 
       void SetParticleData(
           ParticleInterface<StackIteratorInterface>&,
-          const std::tuple<corsika::particles::Code, corsika::units::si::HEPEnergyType,
-                           MomentumVector, corsika::geometry::Point,
-                           corsika::units::si::TimeType>& v) {
+          const std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                           MomentumVector, corsika::Point, corsika::units::si::TimeType>&
+              v) {
         SetPID(std::get<0>(v));
         SetEnergy(std::get<1>(v));
         SetMomentum(std::get<2>(v));
         SetPosition(std::get<3>(v));
         SetTime(std::get<4>(v));
       }
+      /*      void SetParticleData(ParticleInterface<StackIteratorInterface>&,
+                           const corsika::Code vDataPID,
+                           const corsika::units::si::HEPEnergyType vDataE,
+                           const MomentumVector& vMomentum,
+                           const corsika::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 SetPID(const corsika::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) {
+      void SetPosition(const corsika::Point& v) {
         GetStackData().SetPosition(GetIndex(), v);
       }
       void SetTime(const corsika::units::si::TimeType& v) {
@@ -88,16 +105,14 @@ namespace corsika::stack {
       }
 
       /// individual getters
-      corsika::particles::Code GetPID() const {
-        return GetStackData().GetPID(GetIndex());
-      }
+      corsika::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 {
+      corsika::Point GetPosition() const {
         return GetStackData().GetPosition(GetIndex());
       }
       corsika::units::si::TimeType GetTime() const {
@@ -108,16 +123,13 @@ namespace corsika::stack {
        *
        * @{
        */
-      corsika::geometry::Vector<corsika::units::si::dimensionless_d> GetDirection()
-          const {
+      corsika::Vector<corsika::units::si::dimensionless_d> GetDirection() const {
         return GetMomentum() / GetEnergy();
       }
       corsika::units::si::HEPMassType GetMass() const {
-        return corsika::particles::GetMass(GetPID());
-      }
-      int16_t GetChargeNumber() const {
-        return corsika::particles::GetChargeNumber(GetPID());
+        return corsika::GetMass(GetPID());
       }
+      int16_t GetChargeNumber() const { return corsika::GetChargeNumber(GetPID()); }
       ///@}
     };
 
@@ -142,30 +154,26 @@ namespace corsika::stack {
       unsigned int GetSize() const { return fDataPID.size(); }
       unsigned int GetCapacity() const { return fDataPID.size(); }
 
-      void SetPID(const unsigned int i, const corsika::particles::Code id) {
-        fDataPID[i] = id;
-      }
+      void SetPID(const unsigned int i, const corsika::Code id) { fDataPID[i] = id; }
       void SetEnergy(const unsigned int i, const corsika::units::si::HEPEnergyType e) {
         fDataE[i] = e;
       }
       void SetMomentum(const unsigned int i, const MomentumVector& v) {
         fMomentum[i] = v;
       }
-      void SetPosition(const unsigned int i, const corsika::geometry::Point& v) {
+      void SetPosition(const unsigned int i, const corsika::Point& v) {
         fPosition[i] = v;
       }
       void SetTime(const unsigned int i, const corsika::units::si::TimeType& v) {
         fTime[i] = v;
       }
 
-      corsika::particles::Code GetPID(const unsigned int i) const { return fDataPID[i]; }
+      corsika::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::Point GetPosition(const unsigned int i) const { return fPosition[i]; }
       corsika::units::si::TimeType GetTime(const unsigned int i) const {
         return fTime[i];
       }
@@ -193,12 +201,12 @@ namespace corsika::stack {
       }
 
       void IncrementSize() {
-        using corsika::geometry::Point;
-        using corsika::particles::Code;
+        using corsika::Code;
+        using corsika::Point;
         fDataPID.push_back(Code::Unknown);
         fDataE.push_back(0 * corsika::units::si::electronvolt);
-        geometry::CoordinateSystem& dummyCS =
-            geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+        CoordinateSystem& dummyCS =
+            RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
         fMomentum.push_back(MomentumVector(
             dummyCS,
             {0 * corsika::units::si::electronvolt, 0 * corsika::units::si::electronvolt,
@@ -222,10 +230,10 @@ namespace corsika::stack {
     private:
       /// the actual memory to store particle data
 
-      std::vector<corsika::particles::Code> fDataPID;
+      std::vector<corsika::Code> fDataPID;
       std::vector<corsika::units::si::HEPEnergyType> fDataE;
       std::vector<MomentumVector> fMomentum;
-      std::vector<corsika::geometry::Point> fPosition;
+      std::vector<corsika::Point> fPosition;
       std::vector<corsika::units::si::TimeType> fTime;
 
     }; // end class SuperStupidStackImpl
@@ -234,4 +242,4 @@ namespace corsika::stack {
 
   } // namespace super_stupid
 
-} // namespace corsika::stack
+} // namespace corsika
diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ed2ead3f69b33185506f3cd720e30820f7c551f1
--- /dev/null
+++ b/dependencies/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required (VERSION 3.9)
+
+project (
+  corsika_modules
+  VERSION 8.0.0
+  DESCRIPTION "CORSIKA modules"
+  LANGUAGES CXX
+  )
+
+include (FeatureSummary)
+
+# as long as there still are modules using it:
+enable_language (Fortran)
+
+set (CMAKE_CXX_STANDARD 17)
+set (CMAKE_CXX_EXTENSIONS OFF)
+
+# enable warnings and disallow non-standard language
+# configure the various build types here, too
+# FYI: optimizer flags: -O2 would not trade speed for size, neither O2/3 use fast-math
+# debug: O0, relwithdebinfo: 02, release: O3, minsizerel: Os (all defaults)
+set (CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers")
+set (CMAKE_Fortran_FLAGS "-std=legacy -Wfunction-elimination")
+
+# clang produces a lot of unecessary warnings without this:
+add_compile_options ("$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-nonportable-include-path>")
+
+# order of subdirectories
+add_subdirectory (Sibyll)
+#add_subdirectory (Pythia)
+add_subdirectory (QGSJetII)
+add_subdirectory (UrQMD)
diff --git a/Processes/Pythia/CMakeLists.txt b/dependencies/Pythia/CMakeLists.txt
similarity index 97%
rename from Processes/Pythia/CMakeLists.txt
rename to dependencies/Pythia/CMakeLists.txt
index f4fab94931ae0aba3aeb08e33e0ebe6e13e0f2d3..516afe3af6a4c81b3302b97082a35c0efcc4fa4e 100644
--- a/Processes/Pythia/CMakeLists.txt
+++ b/dependencies/Pythia/CMakeLists.txt
@@ -14,7 +14,7 @@ set (
 
 set (
   MODEL_NAMESPACE
-  corsika/process/pythia
+  dependencies/Pythia
   )
 
 add_library (ProcessPythia8 STATIC ${MODEL_SOURCES})
diff --git a/dependencies/Pythia/Decay.cc b/dependencies/Pythia/Decay.cc
new file mode 100644
index 0000000000000000000000000000000000000000..690593913f9969814dcc0eb8d894019210235744
--- /dev/null
+++ b/dependencies/Pythia/Decay.cc
@@ -0,0 +1,262 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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 <Pythia8/Pythia.h>
+#include <dependencies/Pythia/Decay.h>
+#include <dependencies/Pythia/Random.h>
+
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+using std::cout;
+using std::endl;
+using std::tuple;
+using std::vector;
+
+using namespace corsika;
+using namespace corsika::setup;
+using View = corsika::StackView;
+using Particle = corsika::Stack::ParticleType;
+using Track = Trajectory;
+
+namespace corsika::pythia {
+
+  Decay::Decay() {
+
+    // set random number generator in pythia
+    Pythia8::RndmEngine* rndm = new corsika::pythia::Random();
+    fPythia.setRndmEnginePtr(rndm);
+
+    /*
+       issue xyz: definition of particles and decay channels use the same mechanism in
+       corsika and pythia we should force pythia to use the file in corsika.
+     */
+    // bool ParticleData::reInit(string startFile, bool xmlFormat = true)
+    // read in particle data from Corsika 8
+    // fPythia.particleData.reInit("/home/felix/ngcorsika/corsika-build/include/corsika/framework/coreParticleData.xml");
+    // fPythia.particleData.checkTable();
+
+    fPythia.readString("Next:numberShowInfo = 0");
+    fPythia.readString("Next:numberShowProcess = 0");
+    fPythia.readString("Next:numberShowEvent = 0");
+
+    fPythia.readString("Print:quiet = on");
+    fPythia.readString("Check:particleData = 0");
+
+    /*
+       switching off event check in pythia is needed to allow decays that are off-shell
+       according to the mass definition in pythia.
+       the consistency of particle masses between event generators is an unsolved issues
+    */
+    cout << "Pythia::Init: switching off event checking in pythia.." << endl;
+    fPythia.readString("Check:event = 1");
+
+    fPythia.readString("ProcessLevel:all = off");
+    fPythia.readString("ProcessLevel:resonanceDecays = off");
+
+    // making sure
+    SetStable(Code::Pi0);
+
+    //    fPythia.particleData.readString("59:m0 = 101.00");
+
+    if (!fPythia.init())
+      throw std::runtime_error("Pythia::Decay: Initialization failed!");
+  }
+
+  Decay::Decay(std::set<Code> vHandled)
+      : handleAllDecays_(false)
+      , handledDecays_(vHandled) {}
+
+  Decay::~Decay() { cout << "Pythia::Decay n=" << fCount << endl; }
+
+  bool Decay::CanHandleDecay(const Code vParticleCode) {
+    using namespace corsika::particles;
+    // if known to pythia and not proton, electron or neutrino it can decay
+    if (vParticleCode == Code::Proton || vParticleCode == Code::AntiProton ||
+        vParticleCode == Code::NuE || vParticleCode == Code::NuMu ||
+        vParticleCode == Code::NuTau || vParticleCode == Code::NuEBar ||
+        vParticleCode == Code::NuMuBar || vParticleCode == Code::NuTauBar ||
+        vParticleCode == Code::Electron || vParticleCode == Code::Positron)
+      return false;
+    else if (CanDecay(vParticleCode)) // non-zero for particles known to sibyll
+      return true;
+    else
+      return false;
+  }
+
+  void Decay::SetHandleDecay(const Code vParticleCode) {
+    handleAllDecays_ = false;
+    cout << "Pythia::Decay: set to handle decay of " << vParticleCode << endl;
+    if (Decay::CanHandleDecay(vParticleCode))
+      handledDecays_.insert(vParticleCode);
+    else
+      throw std::runtime_error("this decay can not be handled by pythia!");
+  }
+
+  void Decay::SetHandleDecay(const vector<Code> vParticleList) {
+    handleAllDecays_ = false;
+    for (auto p : vParticleList) SetHandleDecay(p);
+  }
+
+  bool Decay::IsDecayHandled(const corsika::Code vParticleCode) {
+    if (handleAllDecays_ && CanHandleDecay(vParticleCode))
+      return true;
+    else
+      return handledDecays_.find(vParticleCode) != Decay::handledDecays_.end();
+  }
+
+  bool Decay::IsStable(const Code vCode) {
+    return fPythia.particleData.canDecay(static_cast<int>(GetPDG(vCode)));
+  }
+
+  void Decay::PrintDecayConfig(const Code vCode) {
+    cout << "Decay: Pythia decay configuration:" << endl;
+    cout << vCode << " is ";
+    if (IsStable(vCode))
+      cout << "stable" << endl;
+    else
+      cout << "unstable" << endl;
+  }
+
+  void Decay::PrintDecayConfig() {
+    cout << "Pythia::Decay: decay configuration:" << endl;
+    if (handleAllDecays_)
+      cout << " all particles known to Pythia are handled by Pythia::Decay!" << endl;
+    else
+      for (auto& pCode : handledDecays_)
+        cout << "Decay of " << pCode << " is handled by Pythia!" << endl;
+  }
+
+  void Decay::SetStable(const vector<Code> particleList) {
+    for (auto p : particleList) Decay::SetStable(p);
+  }
+
+  bool Decay::CanDecay(const Code pCode) {
+    std::cout << "Pythia::Decay: checking if particle: " << pCode
+              << " can decay in PYTHIA? ";
+    const bool ans = fPythia.particleData.canDecay(static_cast<int>(GetPDG(pCode)));
+    std::cout << ans << std::endl;
+    return ans;
+  }
+
+  void Decay::SetUnstable(const Code pCode) {
+    cout << "Pythia::Decay: setting " << pCode << " unstable.." << endl;
+    fPythia.particleData.mayDecay(static_cast<int>(GetPDG(pCode)), true);
+  }
+
+  void Decay::SetStable(const Code pCode) {
+    cout << "Pythia::Decay: setting " << pCode << " stable.." << endl;
+    fPythia.particleData.mayDecay(static_cast<int>(GetPDG(pCode)), false);
+  }
+
+  template <>
+  units::si::TimeType Decay::GetLifetime(Particle const& vP) {
+    using namespace units::si;
+
+    const auto pid = vP.GetPID();
+    if (CanDecay(pid)) {
+      HEPEnergyType E = vP.GetEnergy();
+      HEPMassType m = vP.GetMass();
+
+      const double gamma = E / m;
+
+      const TimeType t0 = GetLifetime(pid);
+      auto const lifetime = gamma * t0;
+      cout << "Pythia::Decay: code: " << vP.GetPID() << endl;
+      cout << "Pythia::Decay: MinStep: t0: " << t0 << endl;
+      cout << "Pythia::Decay: MinStep: energy: " << E / 1_GeV << " GeV" << endl;
+      cout << "Pythia::Decay: momentum: " << vP.GetMomentum().GetComponents() / 1_GeV
+           << " GeV" << endl;
+      cout << "Pythia::Decay: MinStep: gamma: " << gamma << endl;
+      cout << "Pythia::Decay: MinStep: tau: " << lifetime << endl;
+
+      return lifetime;
+    } else
+      return std::numeric_limits<double>::infinity() * 1_s;
+  }
+
+  template <>
+  void Decay::DoDecay(View& view) {
+    using geometry::Point;
+    using namespace units;
+    using namespace units::si;
+
+    auto const projectile = view.GetProjectile();
+
+    auto const& decayPoint = projectile.GetPosition();
+    auto const t0 = projectile.GetTime();
+
+    auto const& labMomentum = projectile.GetMomentum();
+    geometry::CoordinateSystem const& labCS = labMomentum.GetCoordinateSystem();
+
+    // define target kinematics in lab frame
+    // define boost to and from CoM frame
+    // CoM frame definition in Pythia projectile: +z
+    utl::COMBoost const boost(labMomentum, projectile.GetMass());
+    auto const& rotatedCS = boost.GetRotatedCS();
+
+    fCount++;
+
+    // pythia stack
+    Pythia8::Event& event = fPythia.event;
+    event.reset();
+
+    auto const particleId = projectile.GetPID();
+
+    // set particle unstable
+    Decay::SetUnstable(particleId);
+
+    // input particle PDG
+    auto const pdgCode = static_cast<int>(GetPDG(particleId));
+
+    double constexpr px = 0;
+    double constexpr py = 0;
+    double constexpr pz = 0;
+    double const en = projectile.GetMass() / 1_GeV;
+    double const m = en;
+
+    // add particle to pythia stack
+    event.append(pdgCode, 1, 0, 0, px, py, pz, en, m);
+
+    if (!fPythia.next())
+      throw std::runtime_error("Pythia::Decay: decay failed!");
+    else
+      cout << "Pythia::Decay: particles after decay: " << event.size() << endl;
+
+    // list final state
+    event.list();
+
+    // loop over final state
+    for (int i = 0; i < event.size(); ++i)
+      if (event[i].isFinal()) {
+        auto const pyId = ConvertFromPDG(static_cast<PDGCode>(event[i].id()));
+        HEPEnergyType const Erest = event[i].e() * 1_GeV;
+        MomentumVector const pRest(
+            rotatedCS,
+            {event[i].px() * 1_GeV, event[i].py() * 1_GeV, event[i].pz() * 1_GeV});
+        geometry::FourVector const fourMomRest{Erest, pRest};
+        auto const fourMomLab = boost.fromCoM(fourMomRest);
+
+        cout << "particle: id=" << pyId << " momentum="
+             << fourMomLab.GetSpaceLikeComponents().GetComponents(labCS) / 1_GeV
+             << " energy=" << fourMomLab.GetTimeLikeComponent() << endl;
+
+        view.AddSecondary(
+            tuple<Code, units::si::HEPEnergyType, corsika::stack::MomentumVector,
+                  geometry::Point, units::si::TimeType>{
+                pyId, fourMomLab.GetTimeLikeComponent(),
+                fourMomLab.GetSpaceLikeComponents(), decayPoint, t0});
+      }
+
+    // set particle stable
+    Decay::SetStable(particleId);
+  }
+
+} // namespace corsika::pythia
diff --git a/Processes/Pythia/Decay.h b/dependencies/Pythia/Decay.h
similarity index 58%
rename from Processes/Pythia/Decay.h
rename to dependencies/Pythia/Decay.h
index 51a43b7e3824ec399eefa4bf96893144cb2db8f4..48ce89f8e47c2ae5717fcfd60514d0959a8087ad 100644
--- a/Processes/Pythia/Decay.h
+++ b/dependencies/Pythia/Decay.h
@@ -9,46 +9,43 @@
 #pragma once
 
 #include <Pythia8/Pythia.h>
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/coreParticleProperties.h>
 #include <corsika/process/DecayProcess.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/geometry/FourVector.h>
 
-namespace corsika::process {
+namespace corsika {
 
   namespace pythia {
 
-    typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+    typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
 
-    class Decay : public corsika::process::DecayProcess<Decay> {
+    class Decay : public corsika::DecayProcess<Decay> {
       int fCount = 0;
       bool handleAllDecays_ = true;
-      bool print_listing_ = false;
 
     public:
-      Decay(const bool print_listing = false);
-      Decay(std::set<particles::Code>);
+      Decay();
+      Decay(std::set<Code>);
       ~Decay();
 
       // is Pythia::Decay set to handle the decay of this particle?
-      bool IsDecayHandled(const corsika::particles::Code);
+      bool IsDecayHandled(const corsika::Code);
 
       // is decay possible in principle?
-      bool CanHandleDecay(const corsika::particles::Code);
+      bool CanHandleDecay(const corsika::Code);
 
       // set Pythia::Decay to handle the decay of this particle!
-      void SetHandleDecay(const corsika::particles::Code);
+      void SetHandleDecay(const corsika::Code);
       // set Pythia::Decay to handle the decay of this list of particles!
-      void SetHandleDecay(const std::vector<particles::Code>);
+      void SetHandleDecay(const std::vector<Code>);
       // set Pythia::Decay to handle all particle decays
       void SetHandleAllDecays();
 
       // print internal configuration for this particle
-      void PrintDecayConfig(const corsika::particles::Code);
+      void PrintDecayConfig(const corsika::Code);
       // print configuration of decays in corsika
       void PrintDecayConfig();
 
-      bool CanDecay(const corsika::particles::Code);
+      bool CanDecay(const corsika::Code);
 
       /**
        In this function PYTHIA is asked for the lifetime of the input particle.
@@ -67,14 +64,14 @@ namespace corsika::process {
       void DoDecay(TSecondaryView&);
 
     private:
-      void SetUnstable(const corsika::particles::Code);
-      void SetStable(const corsika::particles::Code);
-      void SetStable(const std::vector<particles::Code>);
-      bool IsStable(const corsika::particles::Code);
+      void SetUnstable(const corsika::Code);
+      void SetStable(const corsika::Code);
+      void SetStable(const std::vector<Code>);
+      bool IsStable(const corsika::Code);
 
       Pythia8::Pythia fPythia;
-      std::set<particles::Code> handledDecays_;
+      std::set<Code> handledDecays_;
     };
 
   } // namespace pythia
-} // namespace corsika::process
+} // namespace corsika
diff --git a/dependencies/Pythia/Interaction.cc b/dependencies/Pythia/Interaction.cc
new file mode 100644
index 0000000000000000000000000000000000000000..dbe514cf272059e48ac0ddcdb8ce6a303d39dc51
--- /dev/null
+++ b/dependencies/Pythia/Interaction.cc
@@ -0,0 +1,389 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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 <dependencies/Pythia/Interaction.h>
+
+#include <corsika/environment/Environment.h>
+#include <corsika/environment/NuclearComposition.h>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
+#include <corsika/setup/SetupStack.hpp>
+
+#include <tuple>
+
+using std::cout;
+using std::endl;
+using std::tuple;
+
+using namespace corsika;
+using namespace corsika::setup;
+using SecondaryView = corsika::setup::StackView;
+using Particle = corsika::setup::Stack::ParticleType;
+
+namespace corsika::pythia {
+
+  typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+
+  Interaction::~Interaction() {}
+
+  Interaction::Interaction() {
+    cout << "Pythia::Interaction n=" << fCount << endl;
+
+    using random::RNGManager;
+
+    // initialize Pythia
+    if (!fInitialized) {
+
+      fPythia.readString("Print:quiet = on");
+      // TODO: proper process initialization for MinBias needed
+      fPythia.readString("HardQCD:all = on");
+      fPythia.readString("ProcessLevel:resonanceDecays = off");
+
+      fPythia.init();
+
+      // any decays in pythia? if yes need to define which particles
+      if (fInternalDecays) {
+        // define which particles are passed to corsika, i.e. which particles make it into
+        // history even very shortlived particles like charm or pi0 are of interest here
+        const std::vector<Code> HadronsWeWantTrackedByCorsika = {
+            Code::PiPlus,     Code::PiMinus, Code::Pi0,     Code::KMinus,
+            Code::KPlus,      Code::K0Long,  Code::K0Short, Code::SigmaPlus,
+            Code::SigmaMinus, Code::Lambda0, Code::Xi0,     Code::XiMinus,
+            Code::OmegaMinus, Code::DPlus,   Code::DMinus,  Code::D0,
+            Code::D0Bar};
+
+        Interaction::SetParticleListStable(HadronsWeWantTrackedByCorsika);
+      }
+
+      // basic initialization of cross section routines
+      fSigma.init(&fPythia.info, fPythia.settings, &fPythia.particleData, &fPythia.rndm);
+
+      fInitialized = true;
+    }
+  }
+
+  void Interaction::SetParticleListStable(std::vector<Code> const& particleList) {
+    for (auto p : particleList) Interaction::SetStable(p);
+  }
+
+  void Interaction::SetUnstable(const Code pCode) {
+    cout << "Pythia::Interaction: setting " << pCode << " unstable.." << endl;
+    fPythia.particleData.mayDecay(static_cast<int>(GetPDG(pCode)), true);
+  }
+
+  void Interaction::SetStable(const Code pCode) {
+    cout << "Pythia::Interaction: setting " << pCode << " stable.." << endl;
+    fPythia.particleData.mayDecay(static_cast<int>(GetPDG(pCode)), false);
+  }
+
+  void Interaction::ConfigureLabFrameCollision(
+      const Code BeamId, const Code TargetId, const units::si::HEPEnergyType BeamEnergy) {
+    using namespace units::si;
+    // Pythia configuration of the current event
+    // very clumsy. I am sure this can be done better..
+
+    // set beam
+    // beam id for pythia
+    auto const pdgBeam = static_cast<int>(GetPDG(BeamId));
+    std::stringstream stBeam;
+    stBeam << "Beams:idA = " << pdgBeam;
+    fPythia.readString(stBeam.str());
+    // set target
+    auto pdgTarget = static_cast<int>(GetPDG(TargetId));
+    // replace hydrogen with proton, otherwise pythia goes into heavy ion mode!
+    if (TargetId == Code::Hydrogen) pdgTarget = static_cast<int>(GetPDG(Code::Proton));
+    std::stringstream stTarget;
+    stTarget << "Beams:idB = " << pdgTarget;
+    fPythia.readString(stTarget.str());
+    // set frame to lab. frame
+    fPythia.readString("Beams:frameType = 2");
+    // set beam energy
+    const double Elab = BeamEnergy / 1_GeV;
+    std::stringstream stEnergy;
+    stEnergy << "Beams:eA = " << Elab;
+    fPythia.readString(stEnergy.str());
+    // target at rest
+    fPythia.readString("Beams:eB = 0.");
+    // initialize this config
+    fPythia.init();
+  }
+
+  bool Interaction::CanInteract(const corsika::Code pCode) {
+    return pCode == corsika::Code::Proton || pCode == corsika::Code::Neutron ||
+           pCode == corsika::Code::AntiProton || pCode == corsika::Code::AntiNeutron ||
+           pCode == corsika::Code::PiMinus || pCode == corsika::Code::PiPlus;
+  }
+
+  tuple<units::si::CrossSectionType, units::si::CrossSectionType>
+  Interaction::GetCrossSection(const Code BeamId, const Code TargetId,
+                               const units::si::HEPEnergyType CoMenergy) {
+    using namespace units::si;
+
+    // interaction possible in pythia?
+    if (TargetId == Code::Proton || TargetId == Code::Hydrogen) {
+      if (CanInteract(BeamId) && ValidCoMEnergy(CoMenergy)) {
+        // input particle PDG
+        auto const pdgCodeBeam = static_cast<int>(GetPDG(BeamId));
+        auto const pdgCodeTarget = static_cast<int>(GetPDG(TargetId));
+        const double ecm = CoMenergy / 1_GeV;
+
+        // calculate cross section
+        fSigma.calc(pdgCodeBeam, pdgCodeTarget, ecm);
+        if (fSigma.hasSigmaTot()) {
+          const double sigEla = fSigma.sigmaEl();
+          const double sigProd = fSigma.sigmaTot() - sigEla;
+
+          return std::make_tuple(sigProd * (1_fm * 1_fm), sigEla * (1_fm * 1_fm));
+
+        } else
+          throw std::runtime_error("pythia cross section init failed");
+
+      } else {
+        return std::make_tuple(std::numeric_limits<double>::infinity() * 1_mb,
+                               std::numeric_limits<double>::infinity() * 1_mb);
+      }
+    } else {
+      throw std::runtime_error("invalid target for pythia");
+    }
+  }
+
+  template <>
+  units::si::GrammageType Interaction::GetInteractionLength(Particle& p) {
+
+    using namespace units;
+    using namespace units::si;
+    using namespace geometry;
+
+    // coordinate system, get global frame of reference
+    CoordinateSystem& rootCS =
+        RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+    const Code corsikaBeamId = p.GetPID();
+
+    // beam particles for pythia : 1, 2, 3 for p, pi, k
+    // read from cross section code table
+    const bool kInteraction = CanInteract(corsikaBeamId);
+
+    // FOR NOW: assume target is at rest
+    process::pythia::MomentumVector pTarget(rootCS, {0_GeV, 0_GeV, 0_GeV});
+
+    // total momentum and energy
+    HEPEnergyType Elab = p.GetEnergy() + constants::nucleonMass;
+    process::pythia::MomentumVector pTotLab(rootCS, {0_GeV, 0_GeV, 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
+
+    cout << "Interaction: LambdaInt: \n"
+         << " input energy: " << p.GetEnergy() / 1_GeV << endl
+         << " beam can interact:" << kInteraction << endl
+         << " beam pid:" << p.GetPID() << endl;
+
+    // TODO: move limits into variables
+    if (kInteraction && Elab >= 8.5_GeV && ValidCoMEnergy(ECoM)) {
+
+      // 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 = p.GetNode();
+      const auto mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+      // determine average interaction length
+
+      auto const weightedProdCrossSection =
+          mediumComposition.WeightedSum([=](auto vTargetID) {
+            return std::get<0>(this->GetCrossSection(corsikaBeamId, vTargetID, ECoM));
+          });
+
+      cout << "Interaction: IntLength: weighted CrossSection (mb): "
+           << weightedProdCrossSection / 1_mb << endl
+           << "Interaction: IntLength: average mass number: "
+           << mediumComposition.GetAverageMassNumber() << endl;
+
+      // calculate interaction length in medium
+      GrammageType const int_length = mediumComposition.GetAverageMassNumber() *
+                                      units::constants::u / weightedProdCrossSection;
+      cout << "Interaction: "
+           << "interaction length (g/cm2): " << int_length / (0.001_kg) * 1_cm * 1_cm
+           << endl;
+
+      return int_length;
+    }
+
+    return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+  }
+
+  /**
+     In this function PYTHIA is called to produce one event. The
+     event is copied (and boosted) into the shower lab frame.
+   */
+
+  template <>
+  process::EProcessReturn Interaction::DoInteraction(SecondaryView& view) {
+
+    using namespace units;
+    using namespace utl;
+    using namespace units::si;
+    using namespace geometry;
+
+    auto const projectile = view.GetProjectile();
+
+    const auto corsikaBeamId = projectile.GetPID();
+    cout << "Pythia::Interaction: "
+         << "DoInteraction: " << corsikaBeamId << " interaction? "
+         << process::pythia::Interaction::CanInteract(corsikaBeamId) << endl;
+
+    if (IsNucleus(corsikaBeamId)) {
+      // nuclei handled by different process, this should not happen
+      throw std::runtime_error("Nuclear projectile are not handled by PYTHIA!");
+    }
+
+    if (process::pythia::Interaction::CanInteract(corsikaBeamId)) {
+
+      const CoordinateSystem& rootCS =
+          RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+      // position and time of interaction, not used in Sibyll
+      Point pOrig = projectile.GetPosition();
+      TimeType tOrig = projectile.GetTime();
+
+      // define target
+      // FOR NOW: target is always at rest
+      const auto eTargetLab = 0_GeV + constants::nucleonMass;
+      const auto pTargetLab = MomentumVector(rootCS, 0_GeV, 0_GeV, 0_GeV);
+      const FourVector PtargLab(eTargetLab, pTargetLab);
+
+      // define projectile
+      HEPEnergyType const eProjectileLab = projectile.GetEnergy();
+      auto const pProjectileLab = projectile.GetMomentum();
+
+      cout << "Interaction: ebeam lab: " << eProjectileLab / 1_GeV << endl
+           << "Interaction: pbeam lab: " << pProjectileLab.GetComponents() / 1_GeV
+           << endl;
+      cout << "Interaction: etarget lab: " << eTargetLab / 1_GeV << endl
+           << "Interaction: ptarget lab: " << pTargetLab.GetComponents() / 1_GeV << endl;
+
+      const FourVector PprojLab(eProjectileLab, pProjectileLab);
+
+      // define target kinematics in lab frame
+      // define boost to and from CoM frame
+      // CoM frame definition in Pythia projectile: +z
+      COMBoost const boost(PprojLab, constants::nucleonMass);
+
+      // just for show:
+      // boost projecticle
+      auto const PprojCoM = boost.toCoM(PprojLab);
+
+      // boost target
+      auto const PtargCoM = boost.toCoM(PtargLab);
+
+      cout << "Interaction: ebeam CoM: " << PprojCoM.GetTimeLikeComponent() / 1_GeV
+           << endl
+           << "Interaction: pbeam CoM: "
+           << PprojCoM.GetSpaceLikeComponents().GetComponents() / 1_GeV << endl;
+      cout << "Interaction: etarget CoM: " << PtargCoM.GetTimeLikeComponent() / 1_GeV
+           << endl
+           << "Interaction: ptarget CoM: "
+           << PtargCoM.GetSpaceLikeComponents().GetComponents() / 1_GeV << endl;
+
+      cout << "Interaction: position of interaction: " << pOrig.GetCoordinates() << endl;
+      cout << "Interaction: time: " << tOrig << endl;
+
+      HEPEnergyType Etot = eProjectileLab + eTargetLab;
+      MomentumVector Ptot = projectile.GetMomentum();
+      // invariant mass, i.e. cm. energy
+      HEPEnergyType Ecm = sqrt(Etot * Etot - Ptot.squaredNorm());
+
+      // sample target mass number
+      const auto* currentNode = projectile.GetNode();
+      const auto& mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+      // get cross sections for target materials
+      /*
+        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
+      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, sigEla] = GetCrossSection(corsikaBeamId, targetId, Ecm);
+        [[maybe_unused]] const auto& dummy_sigEla = sigEla;
+        cross_section_of_components[i] = sigProd;
+      }
+
+      const auto corsikaTargetId =
+          mediumComposition.SampleTarget(cross_section_of_components, fRNG);
+      cout << "Interaction: target selected: " << corsikaTargetId << endl;
+
+      if (corsikaTargetId != Code::Hydrogen && corsikaTargetId != Code::Neutron &&
+          corsikaTargetId != Code::Proton)
+        throw std::runtime_error("DoInteraction: wrong target for PYTHIA");
+
+      cout << "Interaction: "
+           << " DoInteraction: E(GeV):" << eProjectileLab / 1_GeV
+           << " Ecm(GeV): " << Ecm / 1_GeV << endl;
+
+      if (eProjectileLab < 8.5_GeV || !ValidCoMEnergy(Ecm)) {
+        cout << "Interaction: "
+             << " DoInteraction: should have dropped particle.. "
+             << "THIS IS AN ERROR" << endl;
+        throw std::runtime_error("energy too low for PYTHIA");
+
+      } else {
+        fCount++;
+
+        ConfigureLabFrameCollision(corsikaBeamId, corsikaTargetId, eProjectileLab);
+
+        // create event in pytia
+        if (!fPythia.next()) throw std::runtime_error("Pythia::DoInteraction: failed!");
+
+        // link to pythia stack
+        Pythia8::Event& event = fPythia.event;
+        // print final state
+        event.list();
+
+        MomentumVector Plab_final(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+        HEPEnergyType Elab_final = 0_GeV;
+        for (int i = 0; i < event.size(); ++i) {
+          Pythia8::Particle& p8p = event[i];
+          // skip particles that have decayed in pythia
+          if (!p8p.isFinal()) continue;
+
+          auto const pyId = ConvertFromPDG(static_cast<PDGCode>(p8p.id()));
+
+          const MomentumVector pyPlab(
+              rootCS, {p8p.px() * 1_GeV, p8p.py() * 1_GeV, p8p.pz() * 1_GeV});
+          HEPEnergyType const pyEn = p8p.e() * 1_GeV;
+
+          // add to corsika stack
+          auto pnew = view.AddSecondary(
+              tuple<Code, units::si::HEPEnergyType, stack::MomentumVector,
+                    geometry::Point, units::si::TimeType>{pyId, pyEn, pyPlab, pOrig,
+                                                          tOrig});
+
+          Plab_final += pnew.GetMomentum();
+          Elab_final += pnew.GetEnergy();
+        }
+        cout << "conservation (all GeV): "
+             << "Elab_final=" << Elab_final / 1_GeV
+             << ", Plab_final=" << (Plab_final / 1_GeV).GetComponents() << endl;
+      }
+    }
+    return process::EProcessReturn::eOk;
+  }
+
+} // namespace corsika::pythia
diff --git a/dependencies/Pythia/Interaction.h b/dependencies/Pythia/Interaction.h
new file mode 100644
index 0000000000000000000000000000000000000000..c5006ea6804d61f9c65ec27cfbf4d824e01712f9
--- /dev/null
+++ b/dependencies/Pythia/Interaction.h
@@ -0,0 +1,66 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <Pythia8/Pythia.h>
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <tuple>
+
+namespace corsika::pythia {
+
+  class Interaction : public corsika::InteractionProcess<Interaction> {
+
+    int fCount = 0;
+    bool fInitialized = false;
+
+  public:
+    Interaction();
+    ~Interaction();
+
+    void SetParticleListStable(std::vector<Code> const&);
+    void SetUnstable(const corsika::Code);
+    void SetStable(const corsika::Code);
+
+    bool WasInitialized() { return fInitialized; }
+    bool ValidCoMEnergy(corsika::units::si::HEPEnergyType ecm) {
+      using namespace corsika::units::si;
+      return (10_GeV < ecm) && (ecm < 1_PeV);
+    }
+
+    bool CanInteract(const corsika::Code);
+    void ConfigureLabFrameCollision(const corsika::Code, const corsika::Code,
+                                    const corsika::units::si::HEPEnergyType);
+    std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
+    GetCrossSection(const corsika::Code BeamId, const corsika::Code TargetId,
+                    const corsika::units::si::HEPEnergyType CoMenergy);
+
+    template <typename TParticle>
+    corsika::units::si::GrammageType GetInteractionLength(TParticle&);
+
+    /**
+       In this function PYTHIA is called to produce one event. The
+       event is copied (and boosted) into the shower lab frame.
+     */
+
+    template <typename TSecondaryView>
+    corsika::EProcessReturn DoInteraction(TSecondaryView&);
+
+  private:
+    corsika::random::RNG& fRNG =
+        corsika::random::RNGManager::GetInstance().GetRandomStream("pythia");
+    Pythia8::Pythia fPythia;
+    Pythia8::SigmaTotal fSigma;
+    const bool fInternalDecays = true;
+  };
+
+} // namespace corsika::pythia
diff --git a/dependencies/Pythia/Random.cc b/dependencies/Pythia/Random.cc
new file mode 100644
index 0000000000000000000000000000000000000000..099a1fd2a78b0437df4059f06ff2b17c2d9f94e2
--- /dev/null
+++ b/dependencies/Pythia/Random.cc
@@ -0,0 +1,15 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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 <dependencies/Pythia/Random.h>
+
+namespace corsika::pythia {
+
+  double Random::flat() { return fDist(fRNG); }
+
+} // namespace corsika::pythia
diff --git a/Processes/Pythia/Random.h b/dependencies/Pythia/Random.h
similarity index 92%
rename from Processes/Pythia/Random.h
rename to dependencies/Pythia/Random.h
index c649e42bc4a0724677b8f23f353b93ebbfb05bd6..59bee7a356b5afbeb425f843bcd1dafff98e25ff 100644
--- a/Processes/Pythia/Random.h
+++ b/dependencies/Pythia/Random.h
@@ -9,7 +9,7 @@
 #pragma once
 
 #include <Pythia8/Pythia.h>
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/random/RNGManager.hpp>
 
 namespace corsika::process {
 
diff --git a/dependencies/Pythia/testPythia8.cc b/dependencies/Pythia/testPythia8.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f495f56ecf0472ba35e7145976b5c2826fec02c4
--- /dev/null
+++ b/dependencies/Pythia/testPythia8.cc
@@ -0,0 +1,185 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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 <Pythia8/Pythia.h>
+#include <dependencies/Pythia/Decay.h>
+#include <dependencies/Pythia/Interaction.h>
+
+#include <corsika/framework/random/RNGManager.hpp>
+
+#include <corsika/framework/coreParticleProperties.h>
+
+#include <corsika/framework/geometry/Point.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <corsika/utl/CorsikaFenv.h>
+#include <catch2/catch.hpp>
+
+TEST_CASE("Pythia", "[processes]") {
+
+  SECTION("linking pythia") {
+    using namespace Pythia8;
+    using std::cout;
+    using std::endl;
+
+    // Generator. Process selection. LHC initialization. Histogram.
+    Pythia pythia;
+
+    pythia.readString("Next:numberShowInfo = 0");
+    pythia.readString("Next:numberShowProcess = 0");
+    pythia.readString("Next:numberShowEvent = 0");
+
+    pythia.readString("ProcessLevel:all = off");
+
+    pythia.init();
+
+    Event& event = pythia.event;
+    event.reset();
+
+    pythia.particleData.mayDecay(321, true);
+    double pz = 100.;
+    double m = 0.49368;
+    event.append(321, 1, 0, 0, 0., 0., 100., sqrt(pz * pz + m * m), m);
+
+    if (!pythia.next())
+      cout << "decay failed!" << endl;
+    else
+      cout << "particles after decay: " << event.size() << endl;
+    event.list();
+
+    // loop over final state
+    for (int i = 0; i < pythia.event.size(); ++i)
+      if (pythia.event[i].isFinal()) {
+        cout << "particle: id=" << pythia.event[i].id() << endl;
+      }
+  }
+
+  SECTION("pythia interface") {
+    using namespace corsika;
+
+    random::RNGManager::GetInstance().RegisterRandomStream("pythia");
+
+    process::pythia::Decay model;
+  }
+}
+
+#include <corsika/framework/geometry/Point.h>
+#include <corsika/framework/geometry/RootCoordinateSystem.h>
+#include <corsika/framework/geometry/Vector.h>
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <corsika/framework/coreParticleProperties.h>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+#include <corsika/environment/Environment.h>
+#include <corsika/environment/HomogeneousMedium.h>
+#include <corsika/environment/NuclearComposition.h>
+
+using namespace corsika;
+using namespace corsika::units::si;
+
+template <typename TStackView>
+auto sumMomentum(TStackView const& view, geometry::CoordinateSystem const& vCS) {
+  geometry::Vector<hepenergy_d> sum{vCS, 0_eV, 0_eV, 0_eV};
+
+  for (auto const& p : view) { sum += p.GetMomentum(); }
+
+  return sum;
+}
+
+TEST_CASE("pythia process") {
+
+  // setup environment, geometry
+  environment::Environment<environment::IMediumModel> env;
+
+  geometry::CoordinateSystem const& cs = env.GetCoordinateSystem();
+
+  auto theMedium =
+      environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>(
+          geometry::Point{cs, 0_m, 0_m, 0_m},
+          1_km * std::numeric_limits<double>::infinity());
+
+  using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>;
+  theMedium->SetModelProperties<MyHomogeneousModel>(
+      1_kg / (1_m * 1_m * 1_m),
+      environment::NuclearComposition(std::vector<Code>{Code::Hydrogen},
+                                      std::vector<float>{1.}));
+
+  auto const* nodePtr = theMedium.get(); // save the medium for later use before moving it
+
+  SECTION("pythia decay") {
+    feenableexcept(FE_INVALID);
+    setup::Stack stack;
+    const HEPEnergyType E0 = 10_GeV;
+    HEPMomentumType P0 = sqrt(E0 * E0 - PiPlus::GetMass() * PiPlus::GetMass());
+    auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(
+        std::tuple<Code, units::si::HEPEnergyType, corsika::stack::MomentumVector,
+                   geometry::Point, units::si::TimeType>{Code::PiPlus, E0, plab, pos,
+                                                         0_ns});
+
+    random::RNGManager::GetInstance().RegisterRandomStream("pythia");
+
+    setup::StackView view(particle);
+
+    process::pythia::Decay model;
+
+    [[maybe_unused]] const TimeType time = model.GetLifetime(particle);
+    model.DoDecay(view);
+    CHECK(stack.getEntries() == 3);
+    auto const pSum = sumMomentum(view, cs);
+    CHECK((pSum - plab).norm() / 1_GeV == Approx(0).margin(1e-4));
+    CHECK((pSum.norm() - plab.norm()) / 1_GeV == Approx(0).margin(1e-4));
+  }
+
+  SECTION("pythia decay config") {
+    process::pythia::Decay model({Code::PiPlus, Code::PiMinus});
+    REQUIRE(model.IsDecayHandled(Code::PiPlus));
+    REQUIRE(model.IsDecayHandled(Code::PiMinus));
+    REQUIRE_FALSE(model.IsDecayHandled(Code::KPlus));
+
+    const std::vector<Code> particleTestList = {Code::PiPlus, Code::PiMinus, Code::KPlus,
+                                                Code::Lambda0Bar, Code::D0Bar};
+
+    // setup decays
+    model.SetHandleDecay(particleTestList);
+    for (auto& pCode : particleTestList) REQUIRE(model.IsDecayHandled(pCode));
+
+    // individually
+    model.SetHandleDecay(Code::KMinus);
+
+    // possible decays
+    REQUIRE_FALSE(model.CanHandleDecay(Code::Proton));
+    REQUIRE_FALSE(model.CanHandleDecay(Code::Electron));
+    REQUIRE(model.CanHandleDecay(Code::PiPlus));
+    REQUIRE(model.CanHandleDecay(Code::MuPlus));
+  }
+
+  SECTION("pythia interaction") {
+
+    setup::Stack stack;
+    const HEPEnergyType E0 = 100_GeV;
+    HEPMomentumType P0 = sqrt(E0 * E0 - PiPlus::GetMass() * PiPlus::GetMass());
+    auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(
+        std::tuple<Code, units::si::HEPEnergyType, corsika::stack::MomentumVector,
+                   geometry::Point, units::si::TimeType>{Code::PiPlus, E0, plab, pos,
+                                                         0_ns});
+    particle.SetNode(nodePtr);
+    setup::StackView view(particle);
+
+    process::pythia::Interaction model;
+
+    [[maybe_unused]] const process::EProcessReturn ret = model.DoInteraction(view);
+    [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle);
+  }
+}
diff --git a/dependencies/QGSJetII/CMakeLists.txt b/dependencies/QGSJetII/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..75327b3f6cbce8520c493cb0f2fa2ba14f525834
--- /dev/null
+++ b/dependencies/QGSJetII/CMakeLists.txt
@@ -0,0 +1,21 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(libQGSJetII)
+
+set (
+  MODEL_SOURCES
+  qgsjet-II-04.f
+  )
+
+set (
+  MODEL_HEADERS
+  )
+
+
+enable_language(Fortran)
+add_library (QGSJetII SHARED ${MODEL_SOURCES})
+set_property(TARGET QGSJetII PROPERTY POSITION_INDEPENDENT_CODE 1)
+
+add_library (QGSJetII_static STATIC ${MODEL_SOURCES})
+set_property(TARGET QGSJetII_static PROPERTY POSITION_INDEPENDENT_CODE 1)
+
diff --git a/dependencies/QGSJetII/Interaction.cc b/dependencies/QGSJetII/Interaction.cc
new file mode 100644
index 0000000000000000000000000000000000000000..df505c115b40cf69d97dd74655aa18a69e35b984
--- /dev/null
+++ b/dependencies/QGSJetII/Interaction.cc
@@ -0,0 +1,403 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/process/qgsjetII/Interaction.h>
+
+#include <corsika/environment/Environment.h>
+#include <corsika/environment/NuclearComposition.h>
+#include <corsika/framework/geometry/QuantityVector.h>
+#include <corsika/process/qgsjetII/QGSJetIIFragmentsStack.h>
+#include <corsika/process/qgsjetII/QGSJetIIStack.h>
+#include <corsika/process/qgsjetII/qgsjet-II-04.h>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+#include <random>
+#include <sstream>
+#include <string>
+#include <tuple>
+
+using std::cout;
+using std::endl;
+using std::ostringstream;
+using std::string;
+using std::tuple;
+
+using namespace corsika;
+using namespace corsika::setup;
+using SetupParticle = setup::Stack::StackIterator;
+using SetupView = setup::StackView;
+using Track = Trajectory;
+
+namespace corsika::qgsjetII {
+
+  Interaction::Interaction(const string& dataPath)
+      : data_path_(dataPath) {
+    if (dataPath == "") {
+      if (std::getenv("CORSIKA_DATA")) {
+        data_path_ = string(std::getenv("CORSIKA_DATA")) + "/QGSJetII/";
+        cout << "Searching for QGSJetII data tables in " << data_path_ << endl;
+      }
+    }
+
+    // initialize QgsjetII
+    if (!initialized_) {
+      qgset_();
+      datadir DIR(data_path_);
+      qgaini_(DIR.data);
+      initialized_ = true;
+    }
+  }
+
+  Interaction::~Interaction() { cout << "QgsjetII::Interaction n=" << count_ << endl; }
+
+  units::si::CrossSectionType Interaction::GetCrossSection(
+      const Code beamId, const Code targetId, const units::si::HEPEnergyType Elab,
+      const unsigned int Abeam, const unsigned int targetA) const {
+    using namespace units::si;
+    double sigProd = std::numeric_limits<double>::infinity();
+
+    if (process::qgsjetII::CanInteract(beamId)) {
+
+      const int xsCode = process::qgsjetII::GetQgsjetIIXSCodeRaw(beamId);
+      int iTarget = 1;
+      if (IsNucleus(targetId)) {
+        iTarget = targetA;
+        if (iTarget > maxMassNumber_ || iTarget <= 0) {
+          std::ostringstream txt;
+          txt << "QgsjetII target outside range. iTarget=" << iTarget;
+          throw std::runtime_error(txt.str().c_str());
+        }
+      }
+      int iProjectile = 1;
+      if (IsNucleus(beamId)) {
+        iProjectile = Abeam;
+        if (iProjectile > maxMassNumber_ || iProjectile <= 0)
+          throw std::runtime_error("QgsjetII target outside range. ");
+      }
+
+      cout << "QgsjetII::GetCrossSection Elab=" << Elab << " xs-code=" << xsCode
+           << " iProjectile=" << iProjectile << " iTarget=" << iTarget << endl;
+      sigProd = qgsect_(Elab / 1_GeV, xsCode, iProjectile, iTarget);
+      cout << "QgsjetII::GetCrossSection sigProd=" << sigProd << endl;
+    }
+
+    return sigProd * 1_mb;
+  }
+
+  template <>
+  units::si::GrammageType Interaction::GetInteractionLength(
+      SetupParticle const& vP) const {
+
+    using namespace units;
+    using namespace units::si;
+    using namespace geometry;
+
+    // coordinate system, get global frame of reference
+    CoordinateSystem& rootCS =
+        RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+    const Code corsikaBeamId = vP.GetPID();
+
+    // beam particles for qgsjetII : 1, 2, 3 for p, pi, k
+    // read from cross section code table
+    const bool kInteraction = process::qgsjetII::CanInteract(corsikaBeamId);
+
+    // FOR NOW: assume target is at rest
+    MomentumVector pTarget(rootCS, {0_GeV, 0_GeV, 0_GeV});
+
+    // total momentum and energy
+    HEPEnergyType Elab = vP.GetEnergy();
+
+    cout << "Interaction: LambdaInt: \n"
+         << " input energy: " << vP.GetEnergy() / 1_GeV << endl
+         << " beam can interact:" << kInteraction << endl
+         << " beam pid:" << vP.GetPID() << endl;
+
+    if (kInteraction) {
+
+      int Abeam = 0;
+      if (IsNucleus(vP.GetPID())) Abeam = vP.GetNuclearA();
+
+      // 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..
+      */
+
+      auto const* currentNode = vP.GetNode();
+      const auto& mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+
+      si::CrossSectionType weightedProdCrossSection =
+          mediumComposition.WeightedSum([=](Code targetID) -> si::CrossSectionType {
+            int targetA = 0;
+            if (corsika::IsNucleus(targetID)) targetA = GetNucleusA(targetID);
+            return GetCrossSection(corsikaBeamId, targetID, Elab, Abeam, targetA);
+          });
+
+      cout << "Interaction: "
+           << "IntLength: weighted CrossSection (mb): " << weightedProdCrossSection / 1_mb
+           << endl;
+
+      // calculate interaction length in medium
+      GrammageType const int_length = mediumComposition.GetAverageMassNumber() *
+                                      units::constants::u / weightedProdCrossSection;
+      cout << "Interaction: "
+           << "interaction length (g/cm2): " << int_length / (0.001_kg) * 1_cm * 1_cm
+           << endl;
+
+      return int_length;
+    }
+
+    return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
+  }
+
+  /**
+     In this function QGSJETII is called to produce one event. The
+     event is copied (and boosted) into the shower lab frame.
+   */
+
+  template <>
+  process::EProcessReturn Interaction::DoInteraction(SetupView& view) {
+
+    using namespace units;
+    using namespace utl;
+    using namespace units::si;
+    using namespace geometry;
+
+    auto const projectile = view.GetProjectile();
+
+    const auto corsikaBeamId = projectile.GetPID();
+    cout << "ProcessQgsjetII: "
+         << "DoInteraction: " << corsikaBeamId << " interaction? "
+         << process::qgsjetII::CanInteract(corsikaBeamId) << endl;
+
+    if (process::qgsjetII::CanInteract(corsikaBeamId)) {
+
+      const CoordinateSystem& rootCS =
+          RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+      // position and time of interaction, not used in QgsjetII
+      Point pOrig = projectile.GetPosition();
+      TimeType tOrig = projectile.GetTime();
+
+      // define target
+      // for QgsjetII is always a single nucleon
+      // FOR NOW: target is always at rest
+      const auto targetEnergyLab = 0_GeV + constants::nucleonMass;
+      const auto targetMomentumLab = MomentumVector(rootCS, 0_GeV, 0_GeV, 0_GeV);
+      const FourVector PtargLab(targetEnergyLab, targetMomentumLab);
+
+      // define projectile
+      HEPEnergyType const projectileEnergyLab = projectile.GetEnergy();
+      auto const projectileMomentumLab = projectile.GetMomentum();
+
+      int beamA = 1;
+      if (IsNucleus(corsikaBeamId)) beamA = projectile.GetNuclearA();
+
+      const HEPEnergyType projectileEnergyLabPerNucleon = projectileEnergyLab / beamA;
+
+      cout << "Interaction: ebeam lab: " << projectileEnergyLab / 1_GeV << endl
+           << "Interaction: pbeam lab: " << projectileMomentumLab.GetComponents() / 1_GeV
+           << endl;
+      cout << "Interaction: etarget lab: " << targetEnergyLab / 1_GeV << endl
+           << "Interaction: ptarget lab: " << targetMomentumLab.GetComponents() / 1_GeV
+           << endl;
+
+      cout << "Interaction: position of interaction: " << pOrig.GetCoordinates() << endl;
+      cout << "Interaction: time: " << tOrig << endl;
+
+      // sample target mass number
+      auto const* currentNode = projectile.GetNode();
+      auto const& mediumComposition =
+          currentNode->GetModelProperties().GetNuclearComposition();
+      // get cross sections for target materials
+      /*
+        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];
+        int targetA = 0;
+        if (corsika::IsNucleus(targetId)) targetA = GetNucleusA(targetId);
+        const auto sigProd =
+            GetCrossSection(corsikaBeamId, targetId, projectileEnergyLab, beamA, targetA);
+        cross_section_of_components[i] = sigProd;
+      }
+
+      const auto targetCode =
+          mediumComposition.SampleTarget(cross_section_of_components, rng_);
+      cout << "Interaction: target selected: " << targetCode << endl;
+
+      int targetMassNumber = 1;    // proton
+      if (IsNucleus(targetCode)) { // nucleus
+        targetMassNumber = GetNucleusA(targetCode);
+        if (targetMassNumber > maxMassNumber_)
+          throw std::runtime_error("QgsjetII target mass outside range.");
+      } else {
+        if (targetCode != Proton::GetCode())
+          throw std::runtime_error("QgsjetII Taget not possible.");
+      }
+      cout << "Interaction: target qgsjetII code/A: " << targetMassNumber << endl;
+
+      int projectileMassNumber = 1; // "1" means "hadron"
+      QgsjetIIHadronType qgsjet_hadron_type =
+          process::qgsjetII::GetQgsjetIIHadronType(corsikaBeamId);
+      if (qgsjet_hadron_type == QgsjetIIHadronType::NucleusType) {
+        projectileMassNumber = projectile.GetNuclearA();
+        if (projectileMassNumber > maxMassNumber_)
+          throw std::runtime_error("QgsjetII projectile mass outside range.");
+        std::array<QgsjetIIHadronType, 2> constexpr nucleons = {
+            QgsjetIIHadronType::ProtonType, QgsjetIIHadronType::NeutronType};
+        std::uniform_int_distribution select(0, 1);
+        qgsjet_hadron_type = nucleons[select(rng_)];
+      } else {
+        // from conex: replace pi0 or rho0 with pi+/pi- in alternating sequence
+        if (qgsjet_hadron_type == QgsjetIIHadronType::NeutralLightMesonType) {
+          qgsjet_hadron_type = alternate_;
+          alternate_ = (alternate_ == QgsjetIIHadronType::PiPlusType
+                            ? QgsjetIIHadronType::PiMinusType
+                            : QgsjetIIHadronType::PiPlusType);
+        }
+      }
+      cout << "Interaction: projectile qgsjetII code/A: " << projectileMassNumber << " "
+           << corsikaBeamId << endl;
+
+      int qgsjet_hadron_type_int = static_cast<QgsjetIICodeIntType>(qgsjet_hadron_type);
+
+      cout << "Interaction: "
+           << " DoInteraction: E(GeV):" << projectileEnergyLab / 1_GeV << endl;
+      count_++;
+      qgini_(projectileEnergyLab / 1_GeV, qgsjet_hadron_type_int, projectileMassNumber,
+             targetMassNumber);
+      qgconf_();
+
+      // bookkeeping
+      MomentumVector Plab_final(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
+      HEPEnergyType Elab_final = 0_GeV;
+
+      // to read the secondaries
+      // define rotation to and from CoM frame
+      // CoM frame definition in QgsjetII projectile: +z
+      auto const& originalCS = projectileMomentumLab.GetCoordinateSystem();
+      geometry::CoordinateSystem const zAxisFrame =
+          originalCS.RotateToZ(projectileMomentumLab);
+
+      // nuclear projectile fragments
+      QGSJetIIFragmentsStack qfs;
+      for (auto& fragm : qfs) {
+        Code idFragm = Code::Nucleus;
+        const int A = fragm.GetFragmentSize();
+        int Z = 0;
+        switch (A) {
+          case 1: { // proton/neutron
+            std::uniform_real_distribution<double> select;
+            if (select(rng_) > 0.5) {
+              idFragm = Code::Proton;
+              Z = 1;
+            } else {
+              idFragm = Code::Neutron;
+              Z = 0;
+            }
+
+            const HEPMassType nucleonMass = GetMass(idFragm);
+
+            auto momentum = geometry::Vector(
+                zAxisFrame, corsika::QuantityVector<hepmomentum_d>{
+                                0.0_GeV, 0.0_GeV,
+                                sqrt((projectileEnergyLabPerNucleon + nucleonMass) *
+                                     (projectileEnergyLabPerNucleon - nucleonMass))});
+
+            auto const energy = sqrt(momentum.squaredNorm() + square(nucleonMass));
+            momentum.rebase(originalCS); // transform back into standard lab frame
+            std::cout << "secondary fragment> id=" << idFragm
+                      << " p=" << momentum.GetComponents() << std::endl;
+            auto pnew = view.AddSecondary(
+                tuple<Code, units::si::HEPEnergyType, stack::MomentumVector,
+                      geometry::Point, units::si::TimeType>{idFragm, energy, momentum,
+                                                            pOrig, tOrig});
+            Plab_final += pnew.GetMomentum();
+            Elab_final += pnew.GetEnergy();
+          } break;
+          case 2: // deuterium
+            Z = 1;
+            break;
+          case 3: // tritium
+            Z = 1;
+            break;
+          case 4: // helium
+            Z = 2;
+            break;
+          default: // nucleus
+          {
+            Z = int(A / 2.15 + 0.7);
+          }
+        }
+
+        if (idFragm == Code::Nucleus) { // thus: not p or n
+          const HEPMassType nucleusMass =
+              Proton::GetMass() * Z + Neutron::GetMass() * (A - Z);
+          auto momentum = geometry::Vector(
+              zAxisFrame, geometry::QuantityVector<hepmomentum_d>{
+                              0.0_GeV, 0.0_GeV,
+                              sqrt((projectileEnergyLabPerNucleon * A + nucleusMass) *
+                                   (projectileEnergyLabPerNucleon * A - nucleusMass))});
+
+          auto const energy = sqrt(momentum.squaredNorm() + square(nucleusMass));
+          momentum.rebase(originalCS); // transform back into standard lab frame
+          std::cout << "secondary fragment> id=" << idFragm
+                    << " p=" << momentum.GetComponents() << " A=" << A << " Z=" << Z
+                    << std::endl;
+          auto pnew = view.AddSecondary(
+              tuple<Code, units::si::HEPEnergyType, stack::MomentumVector,
+                    geometry::Point, units::si::TimeType, unsigned short, unsigned short>{
+                  idFragm, energy, momentum, pOrig, tOrig, A, Z});
+          Plab_final += pnew.GetMomentum();
+          Elab_final += pnew.GetEnergy();
+        }
+      }
+
+      // secondaries
+      QGSJetIIStack qs;
+      for (auto& psec : qs) {
+
+        auto momentum = psec.GetMomentum(zAxisFrame);
+        auto const energy = psec.GetEnergy();
+
+        momentum.rebase(originalCS); // transform back into standard lab frame
+        std::cout << "secondary fragment> id="
+                  << process::qgsjetII::ConvertFromQgsjetII(psec.GetPID())
+                  << " p=" << momentum.GetComponents() << std::endl;
+        auto pnew =
+            view.AddSecondary(tuple<Code, units::si::HEPEnergyType, stack::MomentumVector,
+                                    geometry::Point, units::si::TimeType>{
+                process::qgsjetII::ConvertFromQgsjetII(psec.GetPID()), energy, momentum,
+                pOrig, tOrig});
+        Plab_final += pnew.GetMomentum();
+        Elab_final += pnew.GetEnergy();
+      }
+      cout << "conservation (all GeV): Ecm_final= n/a" /* << Ecm_final / 1_GeV*/ << endl
+           << "Elab_final=" << Elab_final / 1_GeV
+           << ", Plab_final=" << (Plab_final / 1_GeV).GetComponents()
+           << ", N_wounded,targ="
+           << QGSJetIIFragmentsStackData::GetWoundedNucleonsTarget()
+           << ", N_wounded,proj="
+           << QGSJetIIFragmentsStackData::GetWoundedNucleonsProjectile()
+           << ", N_fragm,proj=" << qfs.getEntries() << endl;
+    }
+    return process::EProcessReturn::eOk;
+  }
+
+} // namespace corsika::qgsjetII
diff --git a/Processes/QGSJetII/Interaction.h b/dependencies/QGSJetII/Interaction.h
similarity index 61%
rename from Processes/QGSJetII/Interaction.h
rename to dependencies/QGSJetII/Interaction.h
index bef66e3ce3ac61ea8975aaf89ed4ae3645b4d811..4984761c29b7522e223c2a8d278fc53cfaa85006 100644
--- a/Processes/QGSJetII/Interaction.h
+++ b/dependencies/QGSJetII/Interaction.h
@@ -8,17 +8,17 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/InteractionProcess.h>
+#include <corsika/framework/coreParticleProperties.h>
 #include <corsika/process/qgsjetII/ParticleConversion.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
 
 #include <string>
 
-namespace corsika::process::qgsjetII {
+namespace corsika::qgsjetII {
 
-  class Interaction : public corsika::process::InteractionProcess<Interaction> {
+  class Interaction : public corsika::InteractionProcess<Interaction> {
 
     std::string data_path_;
     int count_ = 0;
@@ -32,15 +32,14 @@ namespace corsika::process::qgsjetII {
 
     bool WasInitialized() { return initialized_; }
     int GetMaxTargetMassNumber() const { return maxMassNumber_; }
-    bool IsValidTarget(corsika::particles::Code TargetId) const {
-      return (corsika::particles::GetNucleusA(TargetId) < maxMassNumber_) &&
-             corsika::particles::IsNucleus(TargetId);
+    bool IsValidTarget(corsika::Code TargetId) const {
+      return (corsika::GetNucleusA(TargetId) < maxMassNumber_) &&
+             corsika::IsNucleus(TargetId);
     }
 
     corsika::units::si::CrossSectionType GetCrossSection(
-        const corsika::particles::Code, const corsika::particles::Code,
-        const corsika::units::si::HEPEnergyType, const unsigned int Abeam = 0,
-        const unsigned int Atarget = 0) const;
+        const corsika::Code, const corsika::Code, const corsika::units::si::HEPEnergyType,
+        const unsigned int Abeam = 0, const unsigned int Atarget = 0) const;
 
     template <typename TParticle>
     corsika::units::si::GrammageType GetInteractionLength(TParticle const&) const;
@@ -51,7 +50,7 @@ namespace corsika::process::qgsjetII {
      */
 
     template <typename TSecondaryView>
-    corsika::process::EProcessReturn DoInteraction(TSecondaryView&);
+    corsika::EProcessReturn DoInteraction(TSecondaryView&);
 
   private:
     corsika::random::RNG& rng_ =
@@ -59,4 +58,4 @@ namespace corsika::process::qgsjetII {
     static constexpr int maxMassNumber_ = 208;
   };
 
-} // namespace corsika::process::qgsjetII
+} // namespace corsika::qgsjetII
diff --git a/dependencies/QGSJetII/ParticleConversion.cc b/dependencies/QGSJetII/ParticleConversion.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8dc5ed9a7b5ef78df51f4118189741fc9b09b67a
--- /dev/null
+++ b/dependencies/QGSJetII/ParticleConversion.cc
@@ -0,0 +1,12 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/framework/coreParticleProperties.h>
+#include <corsika/process/qgsjetII/ParticleConversion.h>
+
+using namespace corsika::qgsjetII;
diff --git a/Processes/QGSJetII/ParticleConversion.h b/dependencies/QGSJetII/ParticleConversion.h
similarity index 67%
rename from Processes/QGSJetII/ParticleConversion.h
rename to dependencies/QGSJetII/ParticleConversion.h
index 9171706b331e6a388c486e038f6c982d94c2f71d..db19a24539b716ca208c90b55c5b858014e1c113 100644
--- a/Processes/QGSJetII/ParticleConversion.h
+++ b/dependencies/QGSJetII/ParticleConversion.h
@@ -8,11 +8,11 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/coreParticleProperties.h>
 
 #include <string>
 
-namespace corsika::process::qgsjetII {
+namespace corsika::qgsjetII {
 
   /**
      These are the possible secondaries produced by QGSJetII
@@ -54,14 +54,14 @@ namespace corsika::process::qgsjetII {
 
 #include <corsika/process/qgsjetII/Generated.inc>
 
-  QgsjetIICode constexpr ConvertToQgsjetII(corsika::particles::Code pCode) {
-    return corsika2qgsjetII[static_cast<corsika::particles::CodeIntType>(pCode)];
+  QgsjetIICode constexpr ConvertToQgsjetII(corsika::Code pCode) {
+    return corsika2qgsjetII[static_cast<corsika::CodeIntType>(pCode)];
   }
 
-  corsika::particles::Code constexpr ConvertFromQgsjetII(QgsjetIICode pCode) {
+  corsika::Code constexpr ConvertFromQgsjetII(QgsjetIICode pCode) {
     auto const pCodeInt = static_cast<QgsjetIICodeIntType>(pCode);
     auto const corsikaCode = qgsjetII2corsika[pCodeInt - minQgsjetII];
-    if (corsikaCode == corsika::particles::Code::Unknown) {
+    if (corsikaCode == corsika::Code::Unknown) {
       throw std::runtime_error(std::string("QGSJETII/CORSIKA conversion of pCodeInt=")
                                    .append(std::to_string(pCodeInt))
                                    .append(" impossible"));
@@ -69,27 +69,26 @@ namespace corsika::process::qgsjetII {
     return corsikaCode;
   }
 
-  QgsjetIICodeIntType constexpr ConvertToQgsjetIIRaw(corsika::particles::Code pCode) {
+  QgsjetIICodeIntType constexpr ConvertToQgsjetIIRaw(corsika::Code pCode) {
     return static_cast<QgsjetIICodeIntType>(ConvertToQgsjetII(pCode));
   }
 
-  QgsjetIIXSClass constexpr GetQgsjetIIXSCode(corsika::particles::Code pCode) {
-    // if (pCode == corsika::particles::Code::Nucleus)
+  QgsjetIIXSClass constexpr GetQgsjetIIXSCode(corsika::Code pCode) {
+    // if (pCode == corsika::Code::Nucleus)
     // static_cast(QgsjetIIXSClassIntType>();
-    return corsika2qgsjetIIXStype[static_cast<corsika::particles::CodeIntType>(pCode)];
+    return corsika2qgsjetIIXStype[static_cast<corsika::CodeIntType>(pCode)];
   }
 
-  QgsjetIIXSClassIntType constexpr GetQgsjetIIXSCodeRaw(corsika::particles::Code pCode) {
+  QgsjetIIXSClassIntType constexpr GetQgsjetIIXSCodeRaw(corsika::Code pCode) {
     return static_cast<QgsjetIIXSClassIntType>(GetQgsjetIIXSCode(pCode));
   }
 
-  bool constexpr CanInteract(corsika::particles::Code pCode) {
+  bool constexpr CanInteract(corsika::Code pCode) {
     return GetQgsjetIIXSCode(pCode) != QgsjetIIXSClass::CannotInteract;
   }
 
-  QgsjetIIHadronType constexpr GetQgsjetIIHadronType(corsika::particles::Code pCode) {
-    return corsika2qgsjetIIHadronType[static_cast<corsika::particles::CodeIntType>(
-        pCode)];
+  QgsjetIIHadronType constexpr GetQgsjetIIHadronType(corsika::Code pCode) {
+    return corsika2qgsjetIIHadronType[static_cast<corsika::CodeIntType>(pCode)];
   }
 
-} // namespace corsika::process::qgsjetII
+} // namespace corsika::qgsjetII
diff --git a/Processes/QGSJetII/QGSJetIIFragmentsStack.h b/dependencies/QGSJetII/QGSJetIIFragmentsStack.h
similarity index 90%
rename from Processes/QGSJetII/QGSJetIIFragmentsStack.h
rename to dependencies/QGSJetII/QGSJetIIFragmentsStack.h
index 5da94661c7d054bf93ceae558cab13b9bc3f0310..3776a85a8e597538ffb789fa1a8963ed00fa5d77 100644
--- a/Processes/QGSJetII/QGSJetIIFragmentsStack.h
+++ b/dependencies/QGSJetII/QGSJetIIFragmentsStack.h
@@ -8,14 +8,14 @@
 
 #pragma once
 
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/RootCoordinateSystem.h>
+#include <corsika/framework/geometry/Vector.h>
 #include <corsika/process/qgsjetII/ParticleConversion.h>
 #include <corsika/process/qgsjetII/qgsjet-II-04.h>
 #include <corsika/stack/Stack.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-namespace corsika::process::qgsjetII {
+namespace corsika::qgsjetII {
 
   class QGSJetIIFragmentsStackData {
 
@@ -71,4 +71,4 @@ namespace corsika::process::qgsjetII {
   typedef corsika::stack::Stack<QGSJetIIFragmentsStackData, FragmentsInterface>
       QGSJetIIFragmentsStack;
 
-} // end namespace corsika::process::qgsjetII
+} // end namespace corsika::qgsjetII
diff --git a/Processes/QGSJetII/QGSJetIIStack.h b/dependencies/QGSJetII/QGSJetIIStack.h
similarity index 86%
rename from Processes/QGSJetII/QGSJetIIStack.h
rename to dependencies/QGSJetII/QGSJetIIStack.h
index 04685ab7cf0a3efc89f6c953b6c3f0354758003c..9f1d18cd41c2c202e334422bb08f03788f7e42ab 100644
--- a/Processes/QGSJetII/QGSJetIIStack.h
+++ b/dependencies/QGSJetII/QGSJetIIStack.h
@@ -8,16 +8,16 @@
 
 #pragma once
 
-#include <corsika/geometry/CoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/CoordinateSystem.h>
+#include <corsika/framework/geometry/Vector.h>
 #include <corsika/process/qgsjetII/ParticleConversion.h>
 #include <corsika/process/qgsjetII/qgsjet-II-04.h>
 #include <corsika/stack/Stack.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-namespace corsika::process::qgsjetII {
+namespace corsika::qgsjetII {
 
-  typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
+  typedef corsika::Vector<corsika::units::si::hepmomentum_d> MomentumVector;
 
   class QGSJetIIStackData {
 
@@ -52,7 +52,7 @@ namespace corsika::process::qgsjetII {
       return qgarr14_.esp[i][0] * 1_GeV;
     }
     MomentumVector GetMomentum(const unsigned int i,
-                               const corsika::geometry::CoordinateSystem& CS) const {
+                               const corsika::CoordinateSystem& CS) const {
       using namespace corsika::units::si;
       geometry::QuantityVector<hepmomentum_d> components = {qgarr14_.esp[i][2] * 1_GeV,
                                                             qgarr14_.esp[i][3] * 1_GeV,
@@ -111,12 +111,12 @@ namespace corsika::process::qgsjetII {
 
     void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); }
 
-    corsika::process::qgsjetII::QgsjetIICode GetPID() const {
-      return static_cast<corsika::process::qgsjetII::QgsjetIICode>(
+    corsika::qgsjetII::QgsjetIICode GetPID() const {
+      return static_cast<corsika::qgsjetII::QgsjetIICode>(
           GetStackData().GetId(GetIndex()));
     }
 
-    MomentumVector GetMomentum(const corsika::geometry::CoordinateSystem& CS) const {
+    MomentumVector GetMomentum(const corsika::CoordinateSystem& CS) const {
       return GetStackData().GetMomentum(GetIndex(), CS);
     }
 
@@ -127,4 +127,4 @@ namespace corsika::process::qgsjetII {
 
   typedef corsika::stack::Stack<QGSJetIIStackData, ParticleInterface> QGSJetIIStack;
 
-} // end namespace corsika::process::qgsjetII
+} // end namespace corsika::qgsjetII
diff --git a/dependencies/QGSJetII/code_generator.py b/dependencies/QGSJetII/code_generator.py
new file mode 100755
index 0000000000000000000000000000000000000000..65c3fe54fbb639b82e5c527e438aac422d1e25b6
--- /dev/null
+++ b/dependencies/QGSJetII/code_generator.py
@@ -0,0 +1,203 @@
+#!/usr/bin/env python3
+
+# (c) Copyright 2020 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.
+
+
+import pickle, sys, itertools
+
+
+
+def load_particledb(filename):
+    '''
+    loads the pickled particle_db (which is an OrderedDict)
+    definition of particle_db dict is: "name", "antiName", "pdg", "mass", "electric_charge", "lifetime", "ngc_code", "isNucleus", "isHadron"
+    '''
+    with open(filename, "rb") as f:
+        particle_db = pickle.load(f)
+    return particle_db
+
+
+def set_default_qgsjetII_definition(particle_db):
+    '''
+    Also particles not explicitly known by QGSJetII may in fact interact via mapping 
+    to cross section types (xsType) and hadron type (hadronType)
+
+    This is achieved here.
+
+    The function return nothing, but modified the input particle_db by adding the 
+    fields 'xsType' and 'hadronType'
+    '''
+    for identifier, pData in particle_db.items():
+        # the cross-section types
+        xsType = "CannotInteract"
+        hadronType = "UndefinedType"
+        if (pData['isNucleus']):
+            xsType = "Baryons"
+            hadronType = "NucleusType"
+        elif (pData['isHadron']):
+            pdg = abs(pData['pdg'])
+            anti = pData['pdg'] < 0
+            isBaryon = (1000 <= pdg < 4000)
+            charge = pData['electric_charge']
+            if (pdg>=100 and pdg<300 and pdg!=130): # light mesons
+                xsType = "LightMesons"
+                if (charge==0):
+                    hadronType = "NeutralLightMesonType"
+                else:
+                    if (charge>0):
+                        hadronType = "PiPlusType"
+                    else:
+                        hadronType = "PiMinusType"               
+            elif ((pdg>=300 and pdg<400) or pdg in [130, 10313, 10323]): # kaons
+                xsType = "Kaons"
+                if (charge>0):
+                    hadronType = "KaonPlusType"
+                else:
+                    hadronType = "KaonMinusType"
+                if (charge==0):
+                    hadronType = "Kaon0SType"
+                    if (pdg == 130):
+                        hadronType = "Kaon0LType"
+                    elif (pdg == 310):
+                        hadronType = "Kaon0SType"
+            elif (isBaryon or pData['isNucleus']): # baryons
+                xsType = "Baryons"
+                if (charge==0):
+                    if (anti):
+                        hadronType = "AntiNeutronType"
+                    else: 
+                        hadronType = "NeutronType"
+                else:
+                    if (charge>0):
+                        hadronType = "ProtonType"
+                    else:
+                        hadronType = "AntiProtonType"
+            # all othe not-captured cased are hopefully irrelevant
+            
+        pData['qgsjetII_xsType'] = xsType
+        pData['qgsjetII_hadronType'] = hadronType
+
+            
+def read_qgsjetII_codes(filename, particle_db):
+    '''
+    reads the qgsjet-codes data file. For particles known to QGSJetII the 'qgsjetII_code' is set in the particle_db, as
+    well as the 'xsType' is updated in case it is different from its default value set above. 
+    '''
+    with open(filename) as f:
+        for line in f:
+            line = line.strip()
+            if len(line)==0 or line[0] == '#':
+                continue
+            line = line.split('#')[0]
+            print (line)
+            identifier, model_code, xsType = line.split()
+            try:
+                particle_db[identifier]["qgsjetII_code"] = int(model_code)
+                particle_db[identifier]["qgsjetII_xsType"] = xsType
+            except KeyError as e:
+                raise Exception("Identifier '{:s}' not found in particle_db".format(identifier))
+
+            
+def generate_qgsjetII_enum(particle_db):
+    '''
+    generates the enum to access qgsjetII particles by readable names
+    '''
+    output = "enum class QgsjetIICode : int8_t {\n"
+    for identifier, pData in particle_db.items():
+        if 'qgsjetII_code' in pData:
+            output += "  {:s} = {:d},\n".format(identifier, pData['qgsjetII_code'])
+    output += "};\n"
+    return output
+
+
+def generate_corsika2qgsjetII(particle_db):    
+    '''
+    generates the look-up table to convert corsika codes to qgsjetII codes
+    '''
+    string = "std::array<QgsjetIICode, {:d}> constexpr corsika2qgsjetII = {{\n".format(len(particle_db))
+    for identifier, pData in particle_db.items():
+        if 'qgsjetII_code' in pData:
+            string += "  QgsjetIICode::{:s}, \n".format(identifier)
+        else:
+            string += "  QgsjetIICode::Unknown, // {:s}\n".format(identifier + ' not implemented in QGSJetII')
+    string += "};\n"
+    return string
+    
+
+def generate_corsika2qgsjetII_xsType(particle_db):    
+    '''
+    generates the look-up table to convert corsika codes to qgsjetII codes
+    '''
+    string = "std::array<QgsjetIIXSClass, {:d}> constexpr corsika2qgsjetIIXStype = {{\n".format(len(particle_db))
+    for identifier, pData in particle_db.items():
+        modelCodeXS = pData.get("qgsjetII_xsType", "CannotInteract")
+        string += "  QgsjetIIXSClass::{:s}, // {:s}\n".format(modelCodeXS, identifier if modelCodeXS else identifier + " (not implemented in QGSJETII)")
+    string += "};\n"
+    return string
+
+
+def generate_corsika2qgsjetII_hadronType(particle_db):    
+    '''
+    generates the look-up table to convert corsika codes to qgsjetII codes
+    '''
+    string = "std::array<QgsjetIIHadronType, {:d}> constexpr corsika2qgsjetIIHadronType = {{\n".format(len(particle_db))
+    for identifier, pData in particle_db.items():
+        modelCode = pData.get("qgsjetII_hadronType", "UndefinedType")
+        string += "  QgsjetIIHadronType::{:s}, // {:s}\n".format(modelCode, identifier if modelCode else identifier + " (not implemented in QGSJETII)")
+    string += "};\n"
+    return string
+
+
+def generate_qgsjetII2corsika(particle_db) :
+    '''
+    generates the look-up table to convert qgsjetII codes to corsika codes    
+    '''
+    minID = 0
+    for identifier, pData in particle_db.items() :
+        if 'qgsjetII_code' in pData:
+            minID = min(minID, pData['qgsjetII_code'])
+
+    string = "QgsjetIICodeIntType constexpr minQgsjetII = {:d};\n\n".format(minID)
+
+    pDict = {}
+    for identifier, pData in particle_db.items() :
+        if 'qgsjetII_code' in pData:
+            model_code = pData['qgsjetII_code'] - minID
+            pDict[model_code] = identifier
+    
+    nPart = max(pDict.keys()) - min(pDict.keys()) + 1
+    string += "std::array<corsika::Code, {:d}> constexpr qgsjetII2corsika = {{\n".format(nPart)
+    
+    for iPart in range(nPart) :
+        identifier = pDict.get(iPart, "Unknown")
+        qgsID = iPart + minID
+        string += "  corsika::Code::{:s}, // {:d} \n".format(identifier, qgsID)
+    
+    string += "};\n"
+    return string
+
+
+if __name__ == "__main__":
+    if len(sys.argv) != 3:
+        print("usage: {:s} <particle_db.pkl> <qgsjetII_codes.dat>".format(sys.argv[0]), file=sys.stderr)
+        sys.exit(1)
+        
+    print("code_generator.py for QGSJETII")
+    
+    particle_db = load_particledb(sys.argv[1])
+    read_qgsjetII_codes(sys.argv[2], particle_db)
+    set_default_qgsjetII_definition(particle_db)
+    
+    with open("Generated.inc", "w") as f:
+        print("// this file is automatically generated\n// edit at your own risk!\n", file=f)
+        print(generate_qgsjetII_enum(particle_db), file=f)
+        print(generate_corsika2qgsjetII(particle_db), file=f)
+        print(generate_qgsjetII2corsika(particle_db), file=f)
+        print(generate_corsika2qgsjetII_xsType(particle_db), file=f)
+        print(generate_corsika2qgsjetII_hadronType(particle_db), file=f)
diff --git a/dependencies/QGSJetII/qgsjet-II-04-codes.dat b/dependencies/QGSJetII/qgsjet-II-04-codes.dat
new file mode 100644
index 0000000000000000000000000000000000000000..8b1bee7c74fe678c6d8c1ca05f12d92c7fd634ad
--- /dev/null
+++ b/dependencies/QGSJetII/qgsjet-II-04-codes.dat
@@ -0,0 +1,44 @@
+# input file for particle conversion to/from QGSJet
+# the format of this file is: "corsika-identifier" "qgsjet-id"  "xs-class"
+
+# The 'Unknown' particle is needed to mark all particles qgsjetII does
+# not know
+# IMPORTANT Note: the code "20" MAY NOT BE USED by qgsjetII. Change to
+# another positive integer if a conflict arises. Since we use std::array
+# to store PID data keep the number as low as reasonable.  
+Unknown 20 CannotInteract
+
+# Note, we list here only the particles, which are produced by
+# QGSJetII as secondaries.  There is additional mapping of corsika
+# particles on QGSJetII "xs-class"es and "hadron-type"s, which are
+# programmed in code_generator.py
+
+# class 1 (-> as pions)
+Pi0          0 LightMesons
+PiPlus       1 LightMesons
+PiMinus     -1 LightMesons
+Eta         10 LightMesons
+Rho0       -10 LightMesons
+
+# class 2 (-> as proton)
+Neutron      3 Baryons
+AntiNeutron -3 Baryons
+Proton       2 Baryons
+AntiProton  -2 Baryons 
+Lambda0      6 Baryons
+Lambda0Bar  -6 Baryons
+LambdaCPlus      9 Baryons
+LambdaCMinusBar -9 Baryons
+
+# class 3 (-> as kaon)
+K0Short      5 Kaons
+K0Long      -5 Kaons
+KPlus        4 Kaons
+KMinus      -4 Kaons
+
+# class 4 (-> charmed mesons, not in qgsjetII)
+D0           8 Charmed
+D0Bar       -8 Charmed
+DPlus        7 Charmed
+DMinus      -7 Charmed
+
diff --git a/dependencies/QGSJetII/qgsjet-II-04.cc b/dependencies/QGSJetII/qgsjet-II-04.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7bb93c1a471c2c5a887b1672abc1107059c5ceaf
--- /dev/null
+++ b/dependencies/QGSJetII/qgsjet-II-04.cc
@@ -0,0 +1,33 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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 <qgsjet-II-04.h>
+
+//#include <corsika/framework/random/RNGManager.hpp>
+
+#include <iostream>
+#include <random>
+
+datadir::datadir(const std::string& dir) {
+  if (dir.length() > 130) {
+    std::cerr << "QGSJetII error, will cut datadir \"" << dir
+              << "\" to 130 characters: " << std::endl;
+  }
+  int i = 0;
+  for (i = 0; i < std::min(130, int(dir.length())); ++i) data[i] = dir[i];
+  data[i + 0] = ' ';
+  data[i + 1] = '\0';
+}
+
+double qgran_(int&) {
+  // static corsika::random::RNG& rng =
+  //  corsika::random::RNGManager::GetInstance().GetRandomStream("qgsjet");
+
+  //  std::uniform_real_distribution<double> dist;
+  return 0; // dist(rng);
+}
diff --git a/Processes/QGSJetII/qgsjet-II-04.f b/dependencies/QGSJetII/qgsjet-II-04.f
similarity index 100%
rename from Processes/QGSJetII/qgsjet-II-04.f
rename to dependencies/QGSJetII/qgsjet-II-04.f
diff --git a/dependencies/QGSJetII/qgsjet-II-04.h b/dependencies/QGSJetII/qgsjet-II-04.h
new file mode 100644
index 0000000000000000000000000000000000000000..f9f75d826371873fc9985fb05478c48c81ab17dc
--- /dev/null
+++ b/dependencies/QGSJetII/qgsjet-II-04.h
@@ -0,0 +1,100 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <string>
+
+//----------------------------------------------
+//  C++ interface for the QGSJetII event generator
+//----------------------------------------------
+// wrapper
+
+extern "C" {
+
+// data memory layout
+
+extern struct { int nsp; } qgarr12_;
+
+const int nptmax = 95000;
+const int iapmax = 208;
+
+extern struct {
+  double esp[nptmax][4];
+  int ich[nptmax];
+} qgarr14_;
+
+extern struct {
+  // c nsf - number of secondary fragments;
+  // c iaf(i) - mass of the i-th fragment
+  int nsf;
+  int iaf[iapmax];
+} qgarr13_;
+
+extern struct {
+  int nwt;
+  int nwp;
+} qgarr55_;
+
+/**
+   Small helper class to provide a data-directory name in the format qgsjetII expects
+ */
+class datadir {
+private:
+  datadir operator=(const std::string& dir);
+  datadir operator=(const datadir&);
+
+public:
+  datadir(const std::string& dir);
+  char data[132];
+};
+
+// functions
+void qgset_();
+void qgaini_(
+    const char* datdir); // Note: there is a length limiation 132 from fortran-qgsjet here
+
+/**
+   @function qgini_
+
+   additional initialization procedure per event
+
+   @parameter e0n  - interaction energy (per hadron/nucleon),
+   @parameter icp0 - hadron type (+-1 - pi+-, +-2 - p(p~), +-3 - n(n~), +-4 - K+-, +-5 -
+   K_l/s),
+   @parameter iap  - projectile mass number (1 - for a hadron),
+   @parameter iat  - target mass number
+*/
+void qgini_(const double& e0n, const int& icp0, const int& iap, const int& iat);
+
+/**
+   @function qgconf_
+
+   generate one event configuration
+*/
+void qgconf_();
+
+/**
+   @function qgsect_
+
+   hadron-nucleus (hadron-nucleus) particle production cross section
+
+   @parameter e0n lab. energy per projectile nucleon (hadron)
+   @parameter icz hadron class (1 - pion, 2 - nucleon, 3 - kaon)
+   @parameter iap projectile mass number (1=<iap<=iapmax),
+   @parameter iat target mass number     (1=<iat<=iapmax)
+ */
+double qgsect_(const double& e0n, const int& icz, const int& iap0, const int& iat0);
+
+/**
+   @function qgran
+
+   link to random number generation
+ */
+double qgran_(int&);
+}
diff --git a/dependencies/QGSJetII/testQGSJetII.cc b/dependencies/QGSJetII/testQGSJetII.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a5f8a145a96ee4317ae93f7e215e9919a1a9d537
--- /dev/null
+++ b/dependencies/QGSJetII/testQGSJetII.cc
@@ -0,0 +1,186 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/process/qgsjetII/Interaction.h>
+#include <corsika/process/qgsjetII/ParticleConversion.h>
+
+#include <corsika/framework/random/RNGManager.hpp>
+
+#include <corsika/framework/coreParticleProperties.h>
+
+#include <corsika/framework/geometry/Point.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <catch2/catch.hpp>
+
+#include <cstdlib>
+#include <experimental/filesystem>
+#include <iostream>
+
+using namespace corsika;
+using namespace corsika::qgsjetII;
+using namespace corsika::units::si;
+
+template <typename TStackView>
+auto sumCharge(TStackView const& view) {
+  int totalCharge = 0;
+
+  for (auto const& p : view) { totalCharge += GetChargeNumber(p.GetPID()); }
+
+  return totalCharge;
+}
+
+template <typename TStackView>
+auto sumMomentum(TStackView const& view, geometry::CoordinateSystem const& vCS) {
+  geometry::Vector<hepenergy_d> sum{vCS, 0_eV, 0_eV, 0_eV};
+
+  for (auto const& p : view) { sum += p.GetMomentum(); }
+
+  return sum;
+}
+
+TEST_CASE("CORSIKA_DATA", "[processes]") {
+
+  SECTION("check CORSIKA_DATA") {
+
+    const char* data = std::getenv("CORSIKA_DATA");
+    // these REQUIRES are needed:
+    REQUIRE(data != 0);
+    REQUIRE(std::experimental::filesystem::is_directory(
+        std::experimental::filesystem::path(std::string(data) + "/QGSJetII")));
+    std::cout << "data: " << data << " isDir: "
+              << std::experimental::filesystem::is_directory(std::string(data) +
+                                                             "/QGSJetII")
+              << std::endl;
+  }
+}
+
+TEST_CASE("QgsjetII", "[processes]") {
+
+  SECTION("Corsika -> QgsjetII") {
+    CHECK(process::qgsjetII::ConvertToQgsjetII(PiMinus::GetCode()) ==
+          process::qgsjetII::QgsjetIICode::PiMinus);
+    CHECK(process::qgsjetII::ConvertToQgsjetIIRaw(Proton::GetCode()) == 2);
+  }
+
+  SECTION("QgsjetII -> Corsika") {
+    CHECK(PiPlus::GetCode() == process::qgsjetII::ConvertFromQgsjetII(
+                                   process::qgsjetII::QgsjetIICode::PiPlus));
+  }
+
+  SECTION("Corsika -> QgsjetII") {
+    CHECK(process::qgsjetII::ConvertToQgsjetII(PiMinus::GetCode()) ==
+          process::qgsjetII::QgsjetIICode::PiMinus);
+    CHECK(process::qgsjetII::ConvertToQgsjetIIRaw(Proton::GetCode()) == 2);
+  }
+
+  SECTION("canInteractInQgsjetII") {
+
+    CHECK(process::qgsjetII::CanInteract(Proton::GetCode()));
+    CHECK(process::qgsjetII::CanInteract(Code::KPlus));
+    CHECK(process::qgsjetII::CanInteract(Nucleus::GetCode()));
+    // CHECK(process::qgsjetII::CanInteract( Helium::GetCode()));
+
+    CHECK_FALSE(process::qgsjetII::CanInteract(EtaC::GetCode()));
+    CHECK_FALSE(process::qgsjetII::CanInteract(SigmaC0::GetCode()));
+  }
+
+  SECTION("cross-section type") {
+
+    CHECK(process::qgsjetII::GetQgsjetIIXSCode(Code::Neutron) ==
+          process::qgsjetII::QgsjetIIXSClass::Baryons);
+    CHECK(process::qgsjetII::GetQgsjetIIXSCode(Code::K0Long) ==
+          process::qgsjetII::QgsjetIIXSClass::Kaons);
+    CHECK(process::qgsjetII::GetQgsjetIIXSCode(Code::Proton) ==
+          process::qgsjetII::QgsjetIIXSClass::Baryons);
+    CHECK(process::qgsjetII::GetQgsjetIIXSCode(Code::PiMinus) ==
+          process::qgsjetII::QgsjetIIXSClass::LightMesons);
+  }
+}
+
+#include <corsika/framework/geometry/Point.h>
+#include <corsika/framework/geometry/RootCoordinateSystem.h>
+#include <corsika/framework/geometry/Vector.h>
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <corsika/framework/coreParticleProperties.h>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+#include <corsika/environment/Environment.h>
+#include <corsika/environment/HomogeneousMedium.h>
+#include <corsika/environment/NuclearComposition.h>
+#include <corsika/process/qgsjetII/qgsjet-II-04.h>
+
+using namespace corsika::units::si;
+using namespace corsika::units;
+
+TEST_CASE("QgsjetIIInterface", "[processes]") {
+
+  // setup environment, geometry
+  environment::Environment<environment::IMediumModel> env;
+  auto& universe = *(env.GetUniverse());
+
+  auto theMedium =
+      environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>(
+          geometry::Point{env.GetCoordinateSystem(), 0_m, 0_m, 0_m},
+          1_km * std::numeric_limits<double>::infinity());
+
+  using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>;
+  theMedium->SetModelProperties<MyHomogeneousModel>(
+      1_kg / (1_m * 1_m * 1_m),
+      environment::NuclearComposition(std::vector<Code>{Code::Oxygen},
+                                      std::vector<float>{1.}));
+
+  auto const* nodePtr = theMedium.get();
+  universe.AddChild(std::move(theMedium));
+
+  const geometry::CoordinateSystem& cs = env.GetCoordinateSystem();
+
+  corsika::random::RNGManager::GetInstance().RegisterRandomStream("qgsjet");
+
+  SECTION("InteractionInterface") {
+
+    setup::Stack stack;
+    const HEPEnergyType E0 = 100_GeV;
+    HEPMomentumType P0 = sqrt(E0 * E0 - Proton::GetMass() * Proton::GetMass());
+    auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(
+        std::tuple<Code, units::si::HEPEnergyType, corsika::stack::MomentumVector,
+                   geometry::Point, units::si::TimeType>{Code::Proton, E0, plab, pos,
+                                                         0_ns});
+
+    particle.SetNode(nodePtr);
+    setup::StackView view(particle);
+    auto projectile = view.GetProjectile();
+    auto const projectileMomentum = projectile.GetMomentum();
+
+    Interaction model;
+
+    [[maybe_unused]] const process::EProcessReturn ret = model.DoInteraction(view);
+    [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle);
+
+    CHECK(length / (1_g / square(1_cm)) == Approx(93.47).margin(0.1));
+
+    /***********************************
+     It as turned out already two times (#291 and #307) that the detailed output of
+    QGSJetII event generation depends on the gfortran version used. This is not reliable
+    and cannot be tested in a unit test here. One related problem was already found (#291)
+    and is realted to undefined behaviour in the evaluation of functions in logical
+    expressions. It is not clear if #307 is the same issue.
+
+     CHECK(view.GetSize() == 14);
+     CHECK(sumCharge(view) == 2);
+    ************************************/
+    auto const secMomSum = sumMomentum(view, projectileMomentum.GetCoordinateSystem());
+    CHECK((secMomSum - projectileMomentum).norm() / projectileMomentum.norm() ==
+          Approx(0).margin(1e-2));
+  }
+}
diff --git a/dependencies/UrQMD/CMakeLists.txt b/dependencies/UrQMD/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..6c538f7ff17f4e4d0fcb1a37f2b71c6ab6cf04c7
--- /dev/null
+++ b/dependencies/UrQMD/CMakeLists.txt
@@ -0,0 +1,51 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(libUrQMD)
+
+set (
+  MODEL_SOURCES
+  urqmdInterface.F
+  addpart.f
+  angdis.f
+  anndec.f
+  blockres.f
+  boxprg.f
+  cascinit.f
+  coload.f
+  dectim.f
+  delpart.f
+  detbal.f
+  dwidth.f
+  error.f
+  getmass.f
+  getspin.f
+  init.f
+  iso.f
+  ityp2pdg.f
+  jdecay2.f
+  make22.f
+  numrec.f
+  output.f
+  paulibl.f
+  proppot.f
+  saveinfo.f
+  scatter.f
+  siglookup.f
+  string.f
+  tabinit.f
+  urqmd.f
+  whichres.f
+)
+
+set (
+  MODEL_HEADERS
+  )
+
+enable_language(Fortran)
+add_library (UrQMD SHARED ${MODEL_SOURCES})
+set_property(TARGET UrQMD PROPERTY POSITION_INDEPENDENT_CODE 1)
+
+add_library (UrQMD_static STATIC ${MODEL_SOURCES})
+set_property(TARGET UrQMD_static PROPERTY POSITION_INDEPENDENT_CODE 1)
+
+
diff --git a/Processes/UrQMD/Copyright b/dependencies/UrQMD/Copyright
similarity index 100%
rename from Processes/UrQMD/Copyright
rename to dependencies/UrQMD/Copyright
diff --git a/Processes/UrQMD/README b/dependencies/UrQMD/README
similarity index 100%
rename from Processes/UrQMD/README
rename to dependencies/UrQMD/README
diff --git a/Processes/UrQMD/UrQMD.cc b/dependencies/UrQMD/UrQMD.cc
similarity index 78%
rename from Processes/UrQMD/UrQMD.cc
rename to dependencies/UrQMD/UrQMD.cc
index 9d78d20ae7f209cdc62d0c368ee336a70dabd49a..90be92d6e621f2128b8535414d4b30705fb46d4f 100644
--- a/Processes/UrQMD/UrQMD.cc
+++ b/dependencies/UrQMD/UrQMD.cc
@@ -6,12 +6,12 @@
  * the license.
  */
 
-#include <corsika/geometry/QuantityVector.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/coreParticleProperties.h>
+#include <corsika/framework/geometry/QuantityVector.h>
+#include <corsika/framework/geometry/Vector.h>
 #include <corsika/logging/Logging.h>
-#include <corsika/particles/ParticleProperties.h>
 #include <corsika/process/urqmd/UrQMD.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <algorithm>
 #include <array>
@@ -19,10 +19,11 @@
 #include <cmath>
 #include <fstream>
 #include <functional>
+#include <iostream>
 #include <random>
 #include <sstream>
 
-using namespace corsika::process::UrQMD;
+using namespace corsika::UrQMD;
 using namespace corsika::units::si;
 
 using SetupStack = corsika::setup::Stack;
@@ -34,12 +35,15 @@ UrQMD::UrQMD(std::string const& xs_file) {
   iniurqmdc8_();
 }
 
-CrossSectionType UrQMD::GetTabulatedCrossSection(particles::Code projectileCode,
-                                                 corsika::particles::Code targetCode,
+CrossSectionType UrQMD::GetTabulatedCrossSection(Code projectileCode,
+                                                 corsika::Code targetCode,
                                                  HEPEnergyType labEnergy) const {
   // translated to C++ from CORSIKA 7 subroutine cxtot_u
 
-  auto const kinEnergy = labEnergy - particles::GetMass(projectileCode);
+  C8LOG_DEBUG("UrQMD::GetTabulatedCrossSection proj={}, targ={}, E={}GeV",
+              GetName(projectileCode), GetName(targetCode), labEnergy / 1_GeV);
+
+  auto const kinEnergy = labEnergy - GetMass(projectileCode);
 
   assert(kinEnergy >= HEPEnergyType::zero());
 
@@ -54,53 +58,53 @@ CrossSectionType UrQMD::GetTabulatedCrossSection(particles::Code projectileCode,
 
   int projectileIndex;
   switch (projectileCode) {
-    case particles::Code::Proton:
+    case Code::Proton:
       projectileIndex = 0;
       break;
-    case particles::Code::AntiProton:
+    case Code::AntiProton:
       projectileIndex = 1;
       break;
-    case particles::Code::Neutron:
+    case Code::Neutron:
       projectileIndex = 2;
       break;
-    case particles::Code::AntiNeutron:
+    case Code::AntiNeutron:
       projectileIndex = 3;
       break;
-    case particles::Code::PiPlus:
+    case Code::PiPlus:
       projectileIndex = 4;
       break;
-    case particles::Code::PiMinus:
+    case Code::PiMinus:
       projectileIndex = 5;
       break;
-    case particles::Code::KPlus:
+    case Code::KPlus:
       projectileIndex = 6;
       break;
-    case particles::Code::KMinus:
+    case Code::KMinus:
       projectileIndex = 7;
       break;
-    case particles::Code::K0Short:
-    case particles::Code::K0Long:
+    case Code::K0Short:
+    case Code::K0Long:
     /* since K0Short and K0Long are treated the same, we can also add K0 and K0Bar
      * to the list. This is a deviation from CORSIKA 7. */
-    case particles::Code::K0:
-    case particles::Code::K0Bar:
+    case Code::K0:
+    case Code::K0Bar:
       projectileIndex = 8;
       break;
-    default: {
-      C8LOG_WARN("WARNING: UrQMD cross-section not tabulated for {}", projectileCode);
+    default:
+      std::cout << "WARNING: UrQMD cross-section not tabulated for " << projectileCode
+                << std::endl;
       return CrossSectionType::zero();
-    }
   }
 
   int targetIndex;
   switch (targetCode) {
-    case particles::Code::Nitrogen:
+    case Code::Nitrogen:
       targetIndex = 0;
       break;
-    case particles::Code::Oxygen:
+    case Code::Oxygen:
       targetIndex = 1;
       break;
-    case particles::Code::Argon:
+    case Code::Argon:
       targetIndex = 2;
       break;
     default:
@@ -115,21 +119,16 @@ CrossSectionType UrQMD::GetTabulatedCrossSection(particles::Code projectileCode,
         xs_interp_support_table_[projectileIndex][targetIndex][je + i - 1 - 1] * w[i];
   }
 
-  C8LOG_DEBUG("UrQMD::GetTabulatedCrossSection proj={}, targ={}, E={}GeV, sigma={}",
-              particles::GetName(projectileCode), particles::GetName(targetCode),
-              labEnergy / 1_GeV, result);
-
   return result;
 }
 
-CrossSectionType UrQMD::GetCrossSection(particles::Code projectileCode,
-                                        corsika::particles::Code targetCode,
+CrossSectionType UrQMD::GetCrossSection(Code projectileCode, corsika::Code targetCode,
                                         HEPEnergyType labEnergy, int projectileA) const {
   // the following is a (incomplete!) translation of ptsigtot() into C++
-  if (projectileCode != particles::Code::Nucleus &&
+  if (projectileCode != Code::Nucleus &&
       !IsNucleus(targetCode)) { // both particles are "special"
-    auto const mProj = particles::GetMass(projectileCode);
-    auto const mTar = particles::GetMass(targetCode);
+    auto const mProj = GetMass(projectileCode);
+    auto const mTar = GetMass(targetCode);
     double sqrtS = sqrt(units::static_pow<2>(mProj) + units::static_pow<2>(mTar) +
                         2 * labEnergy * mTar) *
                    (1 / 1_GeV);
@@ -180,7 +179,7 @@ CrossSectionType UrQMD::GetCrossSection(particles::Code projectileCode,
     }
   } else {
     int const Ap = projectileA;
-    int const At = IsNucleus(targetCode) ? particles::GetNucleusA(targetCode) : 1;
+    int const At = IsNucleus(targetCode) ? GetNucleusA(targetCode) : 1;
 
     double const maxImpact = nucrad_(Ap) + nucrad_(At) + 2 * options_.CTParam[30 - 1];
     return 10_mb * M_PI * units::static_pow<2>(maxImpact);
@@ -191,12 +190,12 @@ CrossSectionType UrQMD::GetCrossSection(particles::Code projectileCode,
 template <typename TParticle> // need template here, as this is called both with
                               // SetupParticle as well as SetupProjectile
 CrossSectionType UrQMD::GetCrossSection(TParticle const& projectile,
-                                        corsika::particles::Code targetCode) const {
+                                        corsika::Code targetCode) const {
 
   auto const projectileCode = projectile.GetPID();
   auto const projectileEnergyLab = projectile.GetEnergy();
 
-  if (projectileCode == particles::Code::Nucleus) {
+  if (projectileCode == Code::Nucleus) {
     /*
      * unfortunately unavoidable at the moment until we have tools to get the actual
      * inealstic cross-section from UrQMD
@@ -207,7 +206,7 @@ CrossSectionType UrQMD::GetCrossSection(TParticle const& projectile,
   return GetTabulatedCrossSection(projectileCode, targetCode, projectileEnergyLab);
 }
 
-bool UrQMD::CanInteract(particles::Code code) const {
+bool UrQMD::CanInteract(Code code) const {
   // According to the manual, UrQMD can use all mesons, baryons and nucleons
   // which are modeled also as input particles. I think it is safer to accept
   // only the usual long-lived species as input.
@@ -216,11 +215,9 @@ bool UrQMD::CanInteract(particles::Code code) const {
   // but right now we don't have access to the inelastic (production) cross-section,
   // so we unfortunately have to forbid these interactions for the time being.
 
-  static particles::Code const validProjectileCodes[] = {
-      particles::Code::Proton,      particles::Code::AntiProton, particles::Code::Neutron,
-      particles::Code::AntiNeutron, particles::Code::PiPlus,     particles::Code::PiMinus,
-      particles::Code::KPlus,       particles::Code::KMinus,     particles::Code::K0Short,
-      particles::Code::K0Long};
+  static Code const validProjectileCodes[] = {
+      Code::Proton,  Code::AntiProton, Code::Neutron, Code::AntiNeutron, Code::PiPlus,
+      Code::PiMinus, Code::KPlus,      Code::KMinus,  Code::K0Short,     Code::K0Long};
 
   return std::find(std::cbegin(validProjectileCodes), std::cend(validProjectileCodes),
                    code) != std::cend(validProjectileCodes);
@@ -244,7 +241,7 @@ GrammageType UrQMD::GetInteractionLength(SetupParticle const& particle) const {
          weightedProdCrossSection;
 }
 
-corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
+corsika::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
   using namespace units::si;
 
   auto const projectile = view.GetProjectile();
@@ -255,9 +252,6 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
   auto const& projectilePosition = projectile.GetPosition();
   auto const projectileTime = projectile.GetTime();
 
-  C8LOG_DEBUG("UrQMD::DoInteraction pid={} E={} GeV", projectileCode,
-              projectileEnergyLab / 1_GeV);
-
   // sample target particle
   auto const& mediumComposition =
       projectile.GetNode()->GetModelProperties().GetNuclearComposition();
@@ -274,8 +268,8 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
   });
 
   auto const targetCode = mediumComposition.SampleTarget(componentCrossSections, rng_);
-  auto const targetA = particles::GetNucleusA(targetCode);
-  auto const targetZ = particles::GetNucleusZ(targetCode);
+  auto const targetA = GetNucleusA(targetCode);
+  auto const targetZ = GetNucleusZ(targetCode);
 
   inputs_.nevents = 1;
   sys_.eos = 0; // could be configurable in principle
@@ -283,7 +277,7 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
   sys_.nsteps = 1;
 
   // initialization regarding projectile
-  if (particles::Code::Nucleus == projectileCode) {
+  if (Code::Nucleus == projectileCode) {
     // is this everything?
     inputs_.prspflg = 0;
 
@@ -302,9 +296,8 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
     rsys_.bdist = nucrad_(targetA) + nucrad_(1) + 2 * options_.CTParam[30 - 1];
     rsys_.ebeam = (projectileEnergyLab - projectile.GetMass()) * (1 / 1_GeV);
 
-    if (projectileCode == particles::Code::K0Long ||
-        projectileCode == particles::Code::K0Short) {
-      projectileCode = booleanDist_(rng_) ? particles::Code::K0 : particles::Code::K0Bar;
+    if (projectileCode == Code::K0Long || projectileCode == Code::K0Short) {
+      projectileCode = booleanDist_(rng_) ? Code::K0 : Code::K0Bar;
     }
 
     auto const [ityp, iso3] = ConvertToUrQMD(projectileCode);
@@ -314,7 +307,7 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
   }
 
   // initilazation regarding target
-  if (particles::IsNucleus(targetCode)) {
+  if (IsNucleus(targetCode)) {
     sys_.Zt = targetZ;
     sys_.At = targetA;
     inputs_.trspflg = 0; // nucleus as target
@@ -337,8 +330,8 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
 
   for (int i = 0; i < sys_.npart; ++i) {
     auto code = ConvertFromUrQMD(isys_.ityp[i], isys_.iso3[i]);
-    if (code == particles::Code::K0 || code == particles::Code::K0Bar) {
-      code = booleanDist_(rng_) ? particles::Code::K0Short : particles::Code::K0Long;
+    if (code == Code::K0 || code == Code::K0Bar) {
+      code = booleanDist_(rng_) ? Code::K0Short : Code::K0Long;
     }
 
     // "coor_.p0[i] * 1_GeV" is likely off-shell as UrQMD doesn't preserve masses well
@@ -347,17 +340,17 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
         geometry::QuantityVector<dimensionless_d>{coor_.px[i], coor_.py[i], coor_.pz[i]} *
             1_GeV);
 
-    auto const energy = sqrt(momentum.squaredNorm() + square(particles::GetMass(code)));
+    auto const energy = sqrt(momentum.squaredNorm() + square(GetMass(code)));
 
     momentum.rebase(originalCS); // transform back into standard lab frame
-    C8LOG_DEBUG(" Secondary {} code {} p={} GeV", i, code,
-                momentum.GetComponents() / 1_GeV);
+    std::cout << i << " " << code << " " << momentum.GetComponents() << std::endl;
 
     view.AddSecondary(
-        std::make_tuple(code, energy, momentum, projectilePosition, projectileTime));
+        std::tuple<Code, HEPEnergyType, stack::MomentumVector, geometry::Point, TimeType>{
+            code, energy, momentum, projectilePosition, projectileTime});
   }
 
-  C8LOG_DEBUG("UrQMD generated {} secondaries!", sys_.npart);
+  std::cout << "UrQMD generated " << sys_.npart << " secondaries!" << std::endl;
 
   return process::EProcessReturn::eOk;
 }
@@ -365,7 +358,7 @@ corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
 /**
  * the random number generator function of UrQMD
  */
-double corsika::process::UrQMD::ranf_(int&) {
+double corsika::UrQMD::ranf_(int&) {
   static corsika::random::RNG& rng =
       corsika::random::RNGManager::GetInstance().GetRandomStream("urqmd");
   static std::uniform_real_distribution<double> dist;
@@ -373,18 +366,17 @@ double corsika::process::UrQMD::ranf_(int&) {
   return dist(rng);
 }
 
-corsika::particles::Code corsika::process::UrQMD::ConvertFromUrQMD(int vItyp, int vIso3) {
+corsika::Code corsika::UrQMD::ConvertFromUrQMD(int vItyp, int vIso3) {
   int const pdgInt =
       pdgid_(vItyp, vIso3); // use the conversion function provided by UrQMD
   if (pdgInt == 0) {        // pdgid_ returns 0 on error
     throw std::runtime_error("UrQMD pdgid() returned 0");
   }
-  auto const pdg = static_cast<particles::PDGCode>(pdgInt);
-  return particles::ConvertFromPDG(pdg);
+  auto const pdg = static_cast<PDGCode>(pdgInt);
+  return ConvertFromPDG(pdg);
 }
 
-std::pair<int, int> corsika::process::UrQMD::ConvertToUrQMD(
-    corsika::particles::Code code) {
+std::pair<int, int> corsika::UrQMD::ConvertToUrQMD(corsika::Code code) {
   static const std::map<int, std::pair<int, int>> mapPDGToUrQMD{
       // data mostly from github.com/afedynitch/ParticleDataTool
       {22, {100, 0}},      // gamma
diff --git a/Processes/UrQMD/UrQMD.h b/dependencies/UrQMD/UrQMD.h
similarity index 83%
rename from Processes/UrQMD/UrQMD.h
rename to dependencies/UrQMD/UrQMD.h
index 937b6d702f63443fe0e221060e86739010ffcae8..e6535ca54aaf64721eed38de55f91e95937b144d 100644
--- a/Processes/UrQMD/UrQMD.h
+++ b/dependencies/UrQMD/UrQMD.h
@@ -8,12 +8,12 @@
 
 #pragma once
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/process/InteractionProcess.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/coreParticleProperties.h>
 #include <corsika/utl/CorsikaData.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/sequence/InteractionProcess.hpp>
+#include <corsika/setup/SetupStack.hpp>
 
 #include <boost/multi_array.hpp>
 
@@ -22,8 +22,8 @@
 #include <string>
 #include <utility>
 
-namespace corsika::process::UrQMD {
-  class UrQMD : public corsika::process::InteractionProcess<UrQMD> {
+namespace corsika::UrQMD {
+  class UrQMD : public corsika::InteractionProcess<UrQMD> {
   public:
     UrQMD(std::string const& path = utl::CorsikaData("UrQMD/UrQMD-1.3.1-xs.dat"));
     corsika::units::si::GrammageType GetInteractionLength(
@@ -31,18 +31,17 @@ namespace corsika::process::UrQMD {
 
     template <typename TParticle>
     corsika::units::si::CrossSectionType GetCrossSection(TParticle const&,
-                                                         corsika::particles::Code) const;
+                                                         corsika::Code) const;
 
     corsika::units::si::CrossSectionType GetCrossSection(
-        particles::Code, particles::Code, corsika::units::si::HEPEnergyType,
-        int Ap = 1) const;
+        Code, Code, corsika::units::si::HEPEnergyType, int Ap = 1) const;
 
     corsika::units::si::CrossSectionType GetTabulatedCrossSection(
-        particles::Code, particles::Code, corsika::units::si::HEPEnergyType) const;
+        Code, Code, corsika::units::si::HEPEnergyType) const;
 
-    corsika::process::EProcessReturn DoInteraction(corsika::setup::StackView&);
+    corsika::EProcessReturn DoInteraction(corsika::setup::StackView&);
 
-    bool CanInteract(particles::Code) const;
+    bool CanInteract(Code) const;
 
   private:
     void readXSFile(std::string const&);
@@ -146,7 +145,7 @@ namespace corsika::process::UrQMD {
    *
    * In the current implementation a detour via the PDG code is made.
    */
-  std::pair<int, int> ConvertToUrQMD(particles::Code);
-  particles::Code ConvertFromUrQMD(int vItyp, int vIso3);
+  std::pair<int, int> ConvertToUrQMD(Code);
+  Code ConvertFromUrQMD(int vItyp, int vIso3);
 
-} // namespace corsika::process::UrQMD
+} // namespace corsika::UrQMD
diff --git a/Processes/UrQMD/addpart.f b/dependencies/UrQMD/addpart.f
similarity index 100%
rename from Processes/UrQMD/addpart.f
rename to dependencies/UrQMD/addpart.f
diff --git a/Processes/UrQMD/angdis.f b/dependencies/UrQMD/angdis.f
similarity index 100%
rename from Processes/UrQMD/angdis.f
rename to dependencies/UrQMD/angdis.f
diff --git a/Processes/UrQMD/anndec.f b/dependencies/UrQMD/anndec.f
similarity index 100%
rename from Processes/UrQMD/anndec.f
rename to dependencies/UrQMD/anndec.f
diff --git a/Processes/UrQMD/blockres.f b/dependencies/UrQMD/blockres.f
similarity index 100%
rename from Processes/UrQMD/blockres.f
rename to dependencies/UrQMD/blockres.f
diff --git a/Processes/UrQMD/boxinc.f b/dependencies/UrQMD/boxinc.f
similarity index 100%
rename from Processes/UrQMD/boxinc.f
rename to dependencies/UrQMD/boxinc.f
diff --git a/Processes/UrQMD/boxprg.f b/dependencies/UrQMD/boxprg.f
similarity index 100%
rename from Processes/UrQMD/boxprg.f
rename to dependencies/UrQMD/boxprg.f
diff --git a/Processes/UrQMD/cascinit.f b/dependencies/UrQMD/cascinit.f
similarity index 100%
rename from Processes/UrQMD/cascinit.f
rename to dependencies/UrQMD/cascinit.f
diff --git a/Processes/UrQMD/colltab.f b/dependencies/UrQMD/colltab.f
similarity index 100%
rename from Processes/UrQMD/colltab.f
rename to dependencies/UrQMD/colltab.f
diff --git a/Processes/UrQMD/coload.f b/dependencies/UrQMD/coload.f
similarity index 100%
rename from Processes/UrQMD/coload.f
rename to dependencies/UrQMD/coload.f
diff --git a/Processes/UrQMD/comnorm.f b/dependencies/UrQMD/comnorm.f
similarity index 100%
rename from Processes/UrQMD/comnorm.f
rename to dependencies/UrQMD/comnorm.f
diff --git a/Processes/UrQMD/comres.f b/dependencies/UrQMD/comres.f
similarity index 100%
rename from Processes/UrQMD/comres.f
rename to dependencies/UrQMD/comres.f
diff --git a/Processes/UrQMD/coms.f b/dependencies/UrQMD/coms.f
similarity index 100%
rename from Processes/UrQMD/coms.f
rename to dependencies/UrQMD/coms.f
diff --git a/Processes/UrQMD/comstr.f b/dependencies/UrQMD/comstr.f
similarity index 100%
rename from Processes/UrQMD/comstr.f
rename to dependencies/UrQMD/comstr.f
diff --git a/Processes/UrQMD/comwid.f b/dependencies/UrQMD/comwid.f
similarity index 100%
rename from Processes/UrQMD/comwid.f
rename to dependencies/UrQMD/comwid.f
diff --git a/Processes/UrQMD/dectim.f b/dependencies/UrQMD/dectim.f
similarity index 100%
rename from Processes/UrQMD/dectim.f
rename to dependencies/UrQMD/dectim.f
diff --git a/Processes/UrQMD/delpart.f b/dependencies/UrQMD/delpart.f
similarity index 100%
rename from Processes/UrQMD/delpart.f
rename to dependencies/UrQMD/delpart.f
diff --git a/Processes/UrQMD/detbal.f b/dependencies/UrQMD/detbal.f
similarity index 100%
rename from Processes/UrQMD/detbal.f
rename to dependencies/UrQMD/detbal.f
diff --git a/Processes/UrQMD/dwidth.f b/dependencies/UrQMD/dwidth.f
similarity index 100%
rename from Processes/UrQMD/dwidth.f
rename to dependencies/UrQMD/dwidth.f
diff --git a/Processes/UrQMD/error.f b/dependencies/UrQMD/error.f
similarity index 100%
rename from Processes/UrQMD/error.f
rename to dependencies/UrQMD/error.f
diff --git a/Processes/UrQMD/freezeout.f b/dependencies/UrQMD/freezeout.f
similarity index 100%
rename from Processes/UrQMD/freezeout.f
rename to dependencies/UrQMD/freezeout.f
diff --git a/Processes/UrQMD/getmass.f b/dependencies/UrQMD/getmass.f
similarity index 100%
rename from Processes/UrQMD/getmass.f
rename to dependencies/UrQMD/getmass.f
diff --git a/Processes/UrQMD/getspin.f b/dependencies/UrQMD/getspin.f
similarity index 100%
rename from Processes/UrQMD/getspin.f
rename to dependencies/UrQMD/getspin.f
diff --git a/Processes/UrQMD/init.f b/dependencies/UrQMD/init.f
similarity index 100%
rename from Processes/UrQMD/init.f
rename to dependencies/UrQMD/init.f
diff --git a/Processes/UrQMD/inputs.f b/dependencies/UrQMD/inputs.f
similarity index 100%
rename from Processes/UrQMD/inputs.f
rename to dependencies/UrQMD/inputs.f
diff --git a/Processes/UrQMD/iso.f b/dependencies/UrQMD/iso.f
similarity index 100%
rename from Processes/UrQMD/iso.f
rename to dependencies/UrQMD/iso.f
diff --git a/Processes/UrQMD/ityp2pdg.f b/dependencies/UrQMD/ityp2pdg.f
similarity index 100%
rename from Processes/UrQMD/ityp2pdg.f
rename to dependencies/UrQMD/ityp2pdg.f
diff --git a/Processes/UrQMD/jdecay2.f b/dependencies/UrQMD/jdecay2.f
similarity index 100%
rename from Processes/UrQMD/jdecay2.f
rename to dependencies/UrQMD/jdecay2.f
diff --git a/Processes/UrQMD/make22.f b/dependencies/UrQMD/make22.f
similarity index 100%
rename from Processes/UrQMD/make22.f
rename to dependencies/UrQMD/make22.f
diff --git a/Processes/UrQMD/newpart.f b/dependencies/UrQMD/newpart.f
similarity index 100%
rename from Processes/UrQMD/newpart.f
rename to dependencies/UrQMD/newpart.f
diff --git a/Processes/UrQMD/numrec.f b/dependencies/UrQMD/numrec.f
similarity index 100%
rename from Processes/UrQMD/numrec.f
rename to dependencies/UrQMD/numrec.f
diff --git a/Processes/UrQMD/options.f b/dependencies/UrQMD/options.f
similarity index 100%
rename from Processes/UrQMD/options.f
rename to dependencies/UrQMD/options.f
diff --git a/Processes/UrQMD/outcom.f b/dependencies/UrQMD/outcom.f
similarity index 100%
rename from Processes/UrQMD/outcom.f
rename to dependencies/UrQMD/outcom.f
diff --git a/Processes/UrQMD/output.f b/dependencies/UrQMD/output.f
similarity index 100%
rename from Processes/UrQMD/output.f
rename to dependencies/UrQMD/output.f
diff --git a/Processes/UrQMD/paulibl.f b/dependencies/UrQMD/paulibl.f
similarity index 100%
rename from Processes/UrQMD/paulibl.f
rename to dependencies/UrQMD/paulibl.f
diff --git a/Processes/UrQMD/proppot.f b/dependencies/UrQMD/proppot.f
similarity index 100%
rename from Processes/UrQMD/proppot.f
rename to dependencies/UrQMD/proppot.f
diff --git a/Processes/UrQMD/saveinfo.f b/dependencies/UrQMD/saveinfo.f
similarity index 100%
rename from Processes/UrQMD/saveinfo.f
rename to dependencies/UrQMD/saveinfo.f
diff --git a/Processes/UrQMD/scatter.f b/dependencies/UrQMD/scatter.f
similarity index 100%
rename from Processes/UrQMD/scatter.f
rename to dependencies/UrQMD/scatter.f
diff --git a/Processes/UrQMD/siglookup.f b/dependencies/UrQMD/siglookup.f
similarity index 100%
rename from Processes/UrQMD/siglookup.f
rename to dependencies/UrQMD/siglookup.f
diff --git a/Processes/UrQMD/string.f b/dependencies/UrQMD/string.f
similarity index 100%
rename from Processes/UrQMD/string.f
rename to dependencies/UrQMD/string.f
diff --git a/Processes/UrQMD/tabinit.f b/dependencies/UrQMD/tabinit.f
similarity index 100%
rename from Processes/UrQMD/tabinit.f
rename to dependencies/UrQMD/tabinit.f
diff --git a/dependencies/UrQMD/testUrQMD.cc b/dependencies/UrQMD/testUrQMD.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2fcb9b083110e6792eb042d9323ea6aef60386e0
--- /dev/null
+++ b/dependencies/UrQMD/testUrQMD.cc
@@ -0,0 +1,222 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/process/urqmd/UrQMD.h>
+#include <corsika/framework/random/RNGManager.hpp>
+
+#include <corsika/framework/geometry/Point.h>
+#include <corsika/framework/geometry/RootCoordinateSystem.h>
+#include <corsika/framework/geometry/Vector.h>
+
+#include <corsika/units/PhysicalConstants.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <corsika/utl/CorsikaFenv.h>
+
+#include <corsika/framework/coreParticleProperties.h>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+#include <corsika/environment/Environment.h>
+#include <corsika/environment/HomogeneousMedium.h>
+#include <corsika/environment/NuclearComposition.h>
+
+#include <tuple>
+#include <utility>
+
+#include <catch2/catch.hpp>
+
+using namespace corsika;
+using namespace corsika::UrQMD;
+using namespace corsika::units::si;
+
+template <typename TStackView>
+auto sumCharge(TStackView const& view) {
+  int totalCharge = 0;
+
+  for (auto const& p : view) { totalCharge += GetChargeNumber(p.GetPID()); }
+
+  return totalCharge;
+}
+
+template <typename TStackView>
+auto sumMomentum(TStackView const& view, geometry::CoordinateSystem const& vCS) {
+  geometry::Vector<hepenergy_d> sum{vCS, 0_eV, 0_eV, 0_eV};
+
+  for (auto const& p : view) { sum += p.GetMomentum(); }
+
+  return sum;
+}
+
+auto setupEnvironment(Code vTargetCode) {
+  // setup environment, geometry
+  auto env = std::make_unique<environment::Environment<environment::IMediumModel>>();
+  auto& universe = *(env->GetUniverse());
+  const geometry::CoordinateSystem& cs = env->GetCoordinateSystem();
+
+  auto theMedium =
+      environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>(
+          geometry::Point{cs, 0_m, 0_m, 0_m},
+          1_km * std::numeric_limits<double>::infinity());
+
+  using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>;
+  theMedium->SetModelProperties<MyHomogeneousModel>(
+      1_kg / (1_m * 1_m * 1_m),
+      environment::NuclearComposition(std::vector<Code>{vTargetCode},
+                                      std::vector<float>{1.}));
+
+  auto const* nodePtr = theMedium.get();
+  universe.AddChild(std::move(theMedium));
+
+  return std::make_tuple(std::move(env), &cs, nodePtr);
+}
+
+template <typename TNodeType>
+auto setupStack(int vA, int vZ, HEPEnergyType vMomentum, TNodeType* vNodePtr,
+                geometry::CoordinateSystem const& cs) {
+  auto stack = std::make_unique<setup::Stack>();
+  auto constexpr mN = corsika::units::constants::nucleonMass;
+
+  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  corsika::stack::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV});
+
+  HEPEnergyType const E0 = sqrt(units::static_pow<2>(mN * vA) + pLab.squaredNorm());
+  auto particle = stack->AddParticle(
+      std::tuple<Code, units::si::HEPEnergyType, corsika::stack::MomentumVector,
+                 geometry::Point, units::si::TimeType, unsigned short, unsigned short>{
+          Code::Nucleus, E0, pLab, origin, 0_ns, vA, vZ});
+
+  particle.SetNode(vNodePtr);
+  return std::make_tuple(
+      std::move(stack), std::make_unique<decltype(setup::StackView{particle})>(particle));
+}
+
+template <typename TNodeType>
+auto setupStack(Code vProjectileType, HEPEnergyType vMomentum, TNodeType* vNodePtr,
+                geometry::CoordinateSystem const& cs) {
+  auto stack = std::make_unique<setup::Stack>();
+
+  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  corsika::stack::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV});
+
+  HEPEnergyType const E0 =
+      sqrt(units::static_pow<2>(GetMass(vProjectileType)) + pLab.squaredNorm());
+  auto particle = stack->AddParticle(
+      std::tuple<Code, units::si::HEPEnergyType, corsika::stack::MomentumVector,
+                 geometry::Point, units::si::TimeType>{vProjectileType, E0, pLab, origin,
+                                                       0_ns});
+
+  particle.SetNode(vNodePtr);
+  return std::make_tuple(
+      std::move(stack), std::make_unique<decltype(setup::StackView{particle})>(particle));
+}
+
+TEST_CASE("UrQMD") {
+  SECTION("conversion") {
+    REQUIRE_THROWS(process::UrQMD::ConvertFromUrQMD(106, 0));
+    REQUIRE(process::UrQMD::ConvertFromUrQMD(101, 0) == Code::Pi0);
+    REQUIRE(process::UrQMD::ConvertToUrQMD(Code::PiPlus) ==
+            std::make_pair<int, int>(101, 2));
+  }
+
+  feenableexcept(FE_INVALID);
+  corsika::random::RNGManager::GetInstance().RegisterRandomStream("urqmd");
+  UrQMD urqmd;
+
+  SECTION("interaction length") {
+    auto [env, csPtr, nodePtr] = setupEnvironment(Code::Nitrogen);
+    auto const& cs = *csPtr;
+    [[maybe_unused]] auto const& env_dummy = env;
+    [[maybe_unused]] auto const& node_dummy = nodePtr;
+
+    Code validProjectileCodes[] = {Code::PiPlus,  Code::PiMinus, Code::Proton,
+                                   Code::Neutron, Code::KPlus,   Code::KMinus,
+                                   Code::K0,      Code::K0Bar,   Code::K0Long};
+
+    for (auto code : validProjectileCodes) {
+      auto [stack, view] = setupStack(code, 100_GeV, nodePtr, cs);
+      REQUIRE(stack->getEntries() == 1);
+      REQUIRE(view->getEntries() == 0);
+
+      // simple check whether the cross-section is non-vanishing
+      // only nuclei with available tabluated data so far
+      REQUIRE(urqmd.GetInteractionLength(stack->GetNextParticle()) > 1_g / square(1_cm));
+    }
+  }
+
+  SECTION("nucleus projectile") {
+    auto [env, csPtr, nodePtr] = setupEnvironment(Code::Oxygen);
+    [[maybe_unused]] auto const& env_dummy = env;      // against warnings
+    [[maybe_unused]] auto const& node_dummy = nodePtr; // against warnings
+
+    unsigned short constexpr A = 14, Z = 7;
+    auto [stackPtr, secViewPtr] = setupStack(A, Z, 400_GeV, nodePtr, *csPtr);
+    REQUIRE(stackPtr->getEntries() == 1);
+    REQUIRE(secViewPtr->getEntries() == 0);
+
+    // must be assigned to variable, cannot be used as rvalue?!
+    auto projectile = secViewPtr->GetProjectile();
+    auto const projectileMomentum = projectile.GetMomentum();
+    [[maybe_unused]] process::EProcessReturn const ret = urqmd.DoInteraction(*secViewPtr);
+
+    REQUIRE(sumCharge(*secViewPtr) == Z + GetChargeNumber(Code::Oxygen));
+
+    auto const secMomSum =
+        sumMomentum(*secViewPtr, projectileMomentum.GetCoordinateSystem());
+    REQUIRE((secMomSum - projectileMomentum).norm() / projectileMomentum.norm() ==
+            Approx(0).margin(1e-2));
+  }
+
+  SECTION("\"special\" projectile") {
+    auto [env, csPtr, nodePtr] = setupEnvironment(Code::Oxygen);
+    [[maybe_unused]] auto const& env_dummy = env;      // against warnings
+    [[maybe_unused]] auto const& node_dummy = nodePtr; // against warnings
+
+    auto [stackPtr, secViewPtr] = setupStack(Code::PiPlus, 400_GeV, nodePtr, *csPtr);
+    REQUIRE(stackPtr->getEntries() == 1);
+    REQUIRE(secViewPtr->getEntries() == 0);
+
+    // must be assigned to variable, cannot be used as rvalue?!
+    auto projectile = secViewPtr->GetProjectile();
+    auto const projectileMomentum = projectile.GetMomentum();
+
+    [[maybe_unused]] process::EProcessReturn const ret = urqmd.DoInteraction(*secViewPtr);
+
+    REQUIRE(sumCharge(*secViewPtr) ==
+            GetChargeNumber(Code::PiPlus) + GetChargeNumber(Code::Oxygen));
+
+    auto const secMomSum =
+        sumMomentum(*secViewPtr, projectileMomentum.GetCoordinateSystem());
+    REQUIRE((secMomSum - projectileMomentum).norm() / projectileMomentum.norm() ==
+            Approx(0).margin(1e-2));
+  }
+
+  SECTION("K0Long projectile") {
+    auto [env, csPtr, nodePtr] = setupEnvironment(Code::Oxygen);
+    [[maybe_unused]] auto const& env_dummy = env;      // against warnings
+    [[maybe_unused]] auto const& node_dummy = nodePtr; // against warnings
+
+    auto [stackPtr, secViewPtr] = setupStack(Code::K0Long, 400_GeV, nodePtr, *csPtr);
+    REQUIRE(stackPtr->getEntries() == 1);
+    REQUIRE(secViewPtr->getEntries() == 0);
+
+    // must be assigned to variable, cannot be used as rvalue?!
+    auto projectile = secViewPtr->GetProjectile();
+    auto const projectileMomentum = projectile.GetMomentum();
+
+    [[maybe_unused]] process::EProcessReturn const ret = urqmd.DoInteraction(*secViewPtr);
+
+    REQUIRE(sumCharge(*secViewPtr) ==
+            GetChargeNumber(Code::K0Long) + GetChargeNumber(Code::Oxygen));
+
+    auto const secMomSum =
+        sumMomentum(*secViewPtr, projectileMomentum.GetCoordinateSystem());
+    REQUIRE((secMomSum - projectileMomentum).norm() / projectileMomentum.norm() ==
+            Approx(0).margin(1e-2));
+  }
+}
diff --git a/Processes/UrQMD/urqmd.f b/dependencies/UrQMD/urqmd.f
similarity index 100%
rename from Processes/UrQMD/urqmd.f
rename to dependencies/UrQMD/urqmd.f
diff --git a/dependencies/UrQMD/urqmdInterface.F b/dependencies/UrQMD/urqmdInterface.F
new file mode 100644
index 0000000000000000000000000000000000000000..ec2bd092a8386393368a6789df73b3efa3253160
--- /dev/null
+++ b/dependencies/UrQMD/urqmdInterface.F
@@ -0,0 +1,447 @@
+c 18.11.2011 Link routines between UrQMD 1.3 and CONEX.
+c author T. Pierog based on CORSIKA and EPOS link to UrQMD
+
+c adapted by M. Reininghaus for linking UrQMD to CORSIKA 8 (Apr 2019)
+
+#ifdef __STD__
+#define __GHEISHA__
+#define __QGSJET__
+#define __ANALYSIS__
+#endif
+
+
+c-----------------------------------------------------------------------
+      subroutine IniUrQMDC8
+c-----------------------------------------------------------------------
+c Primary initialization for UrQMD 1.31
+c-----------------------------------------------------------------------
+      implicit none
+c CONEX includes
+c~ #include "conex.h"
+c~ #include "conex.incnex"
+#ifndef __CXCORSIKA__
+c~       character*500 furqdat
+c~       integer ifurqdat, nfurqdat
+c~       common/urqfname/  furqdat, ifurqdat, nfurqdat
+
+      include 'boxinc.f'
+      include 'inputs.f'
+      include 'options.f'
+      
+c commons from coms.f
+      integer Ap, At, Zp, Zt, npart, nbar, nmes, ctag
+      integer nsteps,ranseed,event,eos,dectag,uid_cnt
+      integer NHardRes,NSoftRes,NDecRes,NElColl,NBlColl
+      common /sys/ npart, nbar, nmes, ctag,nsteps,uid_cnt,
+     +             ranseed,event,Ap,At,Zp,Zt,eos,dectag,
+     +             NHardRes,NSoftRes,NDecRes,NElColl,NBlColl
+
+c local
+      INTEGER          i,io,ia,ie,id
+      CHARACTER        CTPStrg(numctp)*60, CTOStrng(numcto)*60
+      integer mxie,mxid,mxia
+      parameter (mxie=41,mxid=10,mxia=3)
+      character adum
+      double precision sig_u1,ekdummy
+      integer iamaxu,idmaxu,iemaxu
+c~       common /cxs_u1/ sig_u1(mxie,mxid,mxia),iamaxu,idmaxu,iemaxu
+c~       double precision xs(3),bim(3)
+c~ c M.R.: bim added to cxs_u2
+c~       common /cxs_u2/ xs,bim
+      integer iudebug
+c~       data bim/6.d0,6.d0,7.d0/
+      integer init
+      data init/0/
+      SAVE
+
+      if(init.ge.1)return
+      init=init+1
+#ifdef __CXDEBUG__
+      call utisx1('iniurqmd  ',4)
+      write(*,'(a)')'initialize URQMD ...'
+#endif
+
+C-----------------------------------------------------------------------
+
+c~       IF ( isx.ge.2 ) THEN
+c~         IUDEBUG = isx-1
+c~       ELSE
+c~         IUDEBUG = 0
+c~       ENDIF
+
+      WRITE (*,*)
+     $   '############################################################'
+      WRITE (*,*)
+     $   '##                                                        ##'
+      WRITE (*,*)
+     $   '##     UrQMD 1.3.1  University of Frankfurt               ##'
+      WRITE (*,*)
+     $   '##                  urqmd@th.physik.uni-frankfurt.de      ##'
+      WRITE (*,*)
+     $   '##                                                        ##'
+      WRITE (*,*)
+     $   '############################################################'
+      WRITE (*,*)
+     $   '##                                                        ##'
+      WRITE (*,*)
+     $   '##     please cite when using this model:                 ##'
+      WRITE (*,*)
+     $   '##     S.A.Bass et al. Prog.Part.Nucl.Phys. 41 (1998) 225 ##'
+      WRITE (*,*)
+     $   '##     M.Bleicher et al. J.Phys. G25  (1999) 1859         ##'
+      WRITE (*,*)
+     $   '##                                                        ##'
+      WRITE (*,*)
+     $   '############################################################'
+
+C  SET THE 'LARGE' CROSS-SECTIONS FOR ALL 3 TARGET ELEMENTS
+c~       DO  I = 1, 3
+c~         XS(I) = 10.D0 * PI * BIM(I)**2
+c~       ENDDO
+
+C  SET NMAX TO DEFAULT VALUE
+      call set0
+      call params
+
+C  THIS IS THE SUBSTITUE FOR THE URQMD INPUT ROUTINE
+C  INITIALIZE COUNTERS
+      boxflag = 0
+      mbflag  = 0
+      edens   = 0.d0
+      para    = 0
+      solid   = 0
+      mbox    = 0
+      io      = 0
+
+C  THE FOLLOWING FLAGS CHECK, WHETHER ALL NECESSARY INPUT IS GIVEN
+C  PROJECTILE
+      prspflg = 0
+C  TARGET
+      trspflg = 0
+C
+      srtflag = 0
+      firstev = 0
+C  EXCITATION FUNCTION
+      nsrt    = 1
+      npb     = 1
+      efuncflag = 0
+C  DEFAULT NUMBER OF EVENTS
+      nevents = 1
+C  DEFAULT NUMBER OF TIMESTEPS
+      nsteps  = 1000
+
+C  SKIP CONDITIONS ON UNIT 13, 14, 15, 16 & 18
+C  SUPPRESS ALL OUTPUT
+      bf13 = .true.
+      bf14 = .true.
+      bf15 = .true.
+      bf16 = .true.
+      bf18 = .true.
+      bf19 = .true.
+      bf20 = .true.
+C  SET DEBUG OUTPUT DEPENDING ON CHOSEN DEBUG LEVEL
+C  SET THE OUTPUT OF UNITS 13, 14, 15 TO THE DEBUG OUTPUT UNIT
+c~       IF     ( IUDEBUG .EQ. 1 ) THEN
+c~         bf13 = .true.
+c~         bf14 = .false.
+c~         call uounit(14,IFCK)
+c~         bf15 = .true.
+c~       ELSEIF ( IUDEBUG .EQ. 2 ) THEN
+c~         bf13 = .false.
+c~         call uounit(13,IFCK)
+c~         bf14 = .true.
+c~         bf15 = .true.
+c~       ELSEIF ( IUDEBUG .GT. 2 ) THEN
+c~         bf13 = .true.
+c~         bf14 = .true.
+c~         bf15 = .false.
+c~         call uounit(15,IFCK)
+c~       ENDIF
+      do  i = 1, numcto
+         CTOdc(i) = '  '
+      enddo
+      do  i = 1, numctp
+         CTPdc(i) = '  '
+      enddo
+      do  i = 1, maxstables
+         stabvec(i) = 0
+      enddo
+      nstable = 0
+
+C  DEFAULT SETTINGS FOR CTParam AND CTOption
+C  DEFAULT SETTINGS FOR CTParam
+      CTParam(1)=1.d0
+      CTPStrg(1)='scaling factor for decay-width'
+      CTParam(2)=0.52d0
+      CTPStrg(2)='used for minimal stringmass & el/inel cut in makestr'
+      CTParam(3)=2.d0
+      CTPStrg(3)='velocity exponent for modified AQM'
+      CTParam(4)=0.3d0
+      CTPStrg(4)='transverse pion mass, used in make22 & strexct'
+      CTParam(5)=0.d0
+      CTPStrg(5)='probabil. for quark rearrangement in cluster'
+      CTParam(6)=0.37d0
+      CTPstrg(6)='strangeness probability'
+      CTParam(7)=0.d0
+      CTPStrg(7)='charm probability (not yet implemented in UQMD)'
+      CTParam(8)=0.093d0
+      CTPStrg(8)='probability to create a diquark'
+      CTParam(9)=0.35d0
+      CTPStrg(9)='kinetic energy cut off for last string break'
+      CTParam(10)=0.25d0
+      CTPStrg(10)='min. kinetic energy for hadron in string'
+      CTParam(11)=0.d0
+      CTPStrg(11)='fraction of non groundstate resonances'
+      CTParam(12)=.5d0
+      CTPStrg(12)='probability for rho 770 in String'
+      CTParam(13)=.27d0
+      CTPStrg(13)='probability for rho 1450 (rest->rho1700)'
+      CTParam(14)=.49d0
+      CTPStrg(14)='probability for omega 782'
+      CTParam(15)=.27d0
+      CTPStrg(15)='probability for omega 1420(rest->om1600)'
+      CTParam(16)=1.0d0
+      CTPStrg(16)='mass cut betw. rho770 and rho 1450'
+      CTParam(17)=1.6d0
+      CTPSTRG(17)='mass cut betw. rho1450 and rho1700'
+      CTParam(18)=.85d0
+      CTPStrg(18)='mass cut betw. om 782 and om1420'
+      CTParam(19)=1.55d0
+      CTPStrg(19)='mass cut betw. om1420 and om1600'
+      CTParam(20)=0.0d0
+      CTPStrg(20)=' distance for second projectile'
+      CTParam(21)=0.0d0
+      CTPStrg(21)=' deformation parameter'
+
+      CTParam(25)=.9d0
+      CTPStrg(25)=' probability for diquark not to break'
+      CTParam(26)=50.d0
+      CTPStrg(26)=' maximum trials to get string masses'
+      CTParam(27)=1.d0
+      CTPStrg(27)=' scaling factor for xmin in string excitation'
+      CTParam(28)=1.d0
+      CTPStrg(28)=' scaling factor for transverse fermi motion'
+      CTParam(29)=0.4d0
+      CTPStrg(29)=' single strange di-quark suppression factor '
+      CTParam(30)=1.5d0
+      CTPStrg(30)=' radius offset for initialization  '
+      CTParam(31)=1.6d0
+      CTPStrg(31)=' sigma of gaussian for tranverse momentum tranfer '
+      CTParam(32)=0.d0
+      CTPStrg(32)=' alpha-1 for valence quark distribution  '
+      CTParam(33)=2.5d0
+      CTPStrg(33)=' betav for valence quark distribution  (DPM)'
+      CTParam(34)=0.1d0
+      CTPStrg(34)=' minimal x multiplied with ecm  '
+      CTParam(35)=3.0d0
+      CTPStrg(35)=' offset for cut for the FSM '
+      CTParam(36)=0.275d0
+      CTPStrg(36)=' fragmentation function parameter a  '
+      CTParam(37)=0.42d0
+      CTPStrg(37)=' fragmentation function parameter b  '
+      CTParam(38)=1.08d0
+      CTPStrg(38)=' diquark pt scaling factor '
+      CTParam(39)=0.8d0
+      CTPStrg(39)=' strange quark pt scaling factor '
+      CTParam(40)=0.5d0
+      CTPStrg(40)=' betas-1 for valence quark distribution (LEM)'
+      CTParam(41)=0.d0
+      CTPStrg(41)=' distance of initialization'
+      CTParam(42)=0.55d0
+      CTPStrg(42)=' width of gaussian -> pt in string-fragmentation '
+      CTParam(43)=5.d0
+      CTPStrg(43)=' maximum kinetic energy in mesonic clustr '
+      CTParam(44)=0.8d0
+      CTPStrg(44)=' prob. of double vs. single excitation for AQM inel.'
+      CTParam(45)=0.5d0
+      CTPStrg(45)=' offset for minimal mass generation of strings'
+      CTParam(46)=800000.d0
+      CTPStrg(46)=' maximal number of rejections for initialization'
+      CTParam(47)=1.0d0
+      CTPStrg(47)=' field feynman fragmentation funct. param. a'
+      CTParam(48)=2.0d0
+      CTPStrg(48)=' field feynman fragmentation funct. param. b'
+
+      CTParam(50)=1.d0
+      CTPStrg(50)=' enhancement factor for 0- mesons'
+      CTParam(51)=1.d0
+      CTPStrg(51)=' enhancement factor for 1- mesons'
+      CTParam(52)=1.d0
+      CTPStrg(52)=' enhancement factor for 0+ mesons'
+      CTParam(53)=1.d0
+      CTPStrg(53)=' enhancement factor for 1+ mesons'
+      CTParam(54)=1.d0
+      CTPStrg(54)=' enhancement factor for 2+ mesons'
+      CTParam(55)=1.d0
+      CTPStrg(55)=' enhancement factor for 1+-mesons'
+      CTParam(56)=1.d0
+      CTPStrg(56)=' enhancement factor for 1-*mesons'
+      CTParam(57)=1.d0
+      CTPStrg(57)=' enhancement factor for 1-*mesons'
+      CTParam(58)=1.d0
+      CTPStrg(58)=' scaling factor for DP time-delay'
+
+C  DEFAULT SETTINGS FOR CTOption
+      CTOption(1)=1                  ! hjd1
+      CTOStrng(1)=' resonance widths are mass dependent '
+      CTOption(2)=0
+      CTOStrng(2)=' conservation of scattering plane'
+      CTOption(3)=0
+      CTOStrng(3)=' use modified detailed balance'
+      CTOption(4)=0
+      CTOStrng(4)=' no initial conf. output '
+      CTOption(5)=0
+      CTOStrng(5)=' fixed random impact parameter'
+      CTOption(6)=0
+      CTOStrng(6)=' no first collisions inside proj/target'
+      CTOption(7)=0
+      CTOStrng(7)=' elastic cross-section enabled (<>0:total=inelast)'
+      CTOption(8)=0
+      CTOStrng(8)=' extrapolate branching ratios '
+      CTOption(9)=0
+      CTOStrng(9)=' use tabulated pp cross-sections '
+      CTOption(10)=0
+      CTOStrng(10)=' enable Pauli Blocker'
+      CTOption(11)=0
+      CTOStrng(11)=' mass reduction for cascade initialization'
+      CTOption(12)=0
+      CTOStrng(12)=' string condition =0 (.ne.0 no strings)'
+      CTOption(13)=0
+      CTOStrng(13)=' enhanced file16 output '
+      CTOption(14)=0
+      CTOStrng(14)=' cos(the) is distributet between -1..1 '
+      CTOption(15)=0
+      CTOStrng(15)=' allow mm&mb-scattering'
+      CTOption(16)=0
+      CTOStrng(16)=' propagate without collisions'
+      CTOption(17)=0
+      CTOStrng(17)=' colload after every timestep '
+      CTOption(18)=0
+      CTOStrng(18)=' final decay of unstable particles'
+      CTOption(19)=0
+      CTOStrng(19)=' allow bbar annihilaion'
+      CTOption(20)=0
+      CTOStrng(20)=' dont generate e+e- instead of bbar'
+      CTOption(21)=0
+      CTOStrng(21)=' use field feynman frgm. function'
+      CTOption(22)=1
+      CTOStrng(22)=' use lund excitation function'
+      CTOption(23)=0
+      CTOStrng(23)=' lorentz contraction of projectile & targed'
+      CTOption(24)=2      ! 1 is default    2 means fast method
+      CTOStrng(24)=' Wood-Saxon initialization'
+      CTOption(25)=0
+      CTOStrng(25)=' phase space corrections for resonance mass'
+      CTOption(26)=0
+      CTOStrng(26)=' use z -> 1-z for diquark-pairs'
+      CTOption(27)=1             ! hjd1
+      CTOStrng(27)=' reference frame (1=target, 2=projectile, else=cms)'
+      CTOption(28)=1             ! M.R. 2019-04-15
+      CTOStrng(28)=' propagate spectators also '
+      CTOption(29)=2
+      CTOStrng(29)=' no transverse momentum in clustr '
+      CTOption(30)=1
+      CTOStrng(30)=' frozen fermi motion '
+      CTOption(31)=0
+      CTOStrng(31)='  reduced mass spectrum in string'
+      CTOption(32)=0
+      CTOStrng(32)=' masses are distributed acc. to m-dep. widths'
+      CTOption(33)=0
+      CTOStrng(33)=' use tables & m-dep. for pmean in fprwdt & fwidth'
+      CTOption(34)=1
+      CTOStrng(34)=' lifetme according to m-dep. width'
+      CTOption(35)=1
+      CTOStrng(35)=' generate high precision tables'
+      CTOption(36)=0
+      CTOStrng(36)=' normalize Breit-Wigners with m.dep. widths '
+      CTOption(37)=0
+      CTOStrng(37)=' heavy quarks form di-quark clusters'
+      CTOption(38)=0
+      CTOStrng(38)=' scale p-pbar to b-bbar with equal p_lab '
+      CTOption(39)=0
+      CTOStrng(39)=' dont call pauliblocker'
+      CTOption(40)=0
+      CTOStrng(40)=' read old fort.14 file '
+      CTOption(41)=0
+      CTOStrng(41)=' generate extended output for cto40'
+      CTOption(42)=0
+      CTOStrng(42)=' hadrons now have color fluctuations'
+      CTOption(43)=0
+      CTOStrng(43)=' dont generate dimuon intead of dielectron output'
+      CTOption(44)=0
+      CTOStrng(44)=' not used at the moment'
+      CTOption(45)=0
+      CTOStrng(45)=' not used at the moment'
+
+C  INITIALIZE ARRAYS FOR SPECIAL PRO/TAR COMBINATIONS
+      do  i = 1, 2
+         spityp(i) = 0
+         spiso3(i) = 0
+      enddo
+
+C  INITIALIZE ARRAYS FOR SPECIAL PARTICLES
+      EoS = 0
+
+C  READ CROSS-SECTION FILES
+Cdh   CALL URQREC()
+
+C  INITIALIZES SOME ARRAYS
+      call strini      ! initialize mixing angles for meson-multipletts
+      call loginit
+
+      IF ( CTOption(33) .EQ. 0  .OR.  CTOption(9) .EQ. 0 ) THEN
+        call loadwtab(io)
+c~         IF ( IUDEBUG .GT. 0 ) WRITE(IFCK,*) 'URQINI: AFTER LOADWTAB'
+      ENDIF
+
+C READ URQMD TOTAL CROSS SECTION TABLE
+c
+c   ie=1..41   E=10.0**(float(ie)/10-1.0-0.05)  (bin-middle)
+c   id=1..9    p,ap,n,an,pi+,pi-,K+,K-,KS
+c   ia=1..3    N,O,Ar
+c
+c~       if(ifurqdat.eq.1)then
+c~         OPEN(UNIT=76,FILE=furqdat(1:nfurqdat),STATUS='OLD')
+c~       else
+c~         OPEN(UNIT=76,FILE='UrQMD-1.3.1-xs.dat',STATUS='OLD')
+c~       endif
+c~       read(76,*) adum,iamaxu,idmaxu,iemaxu
+c~       do ia=1,iamaxu
+c~         do id=1,idmaxu
+c~           do ie=1,iemaxu
+c~             read(76,*) ekdummy,sig_u1(ie,id,ia)
+c~           enddo
+c~           read(76,*)
+c~           read(76,*)
+c~         enddo
+c~       enddo
+c~       close(76)
+
+C  IN CASE OF CASCADE MODE, THE POTENTIALS NEED NOT BE CALCULATED
+
+C  CALCULATE NORMALIZATION OF RESONANCES DISTRIBUTION...
+      call norm_init
+#endif
+
+
+c~       xsegymin=0.25d0
+
+#ifdef __CXDEBUG__
+      call utisx2
+#endif
+
+      end
+
+c
+c M. Reininghaus, 2020-04-08
+c
+      integer function ReadSigmaLn(ia, ib, ic)
+      implicit none
+
+      include 'comres.f'
+
+      integer :: ia, ib, ic
+
+      ReadSigmaLn = SigmaLn(ia, ib, ic)
+
+      end function ReadSigmaLn
diff --git a/dependencies/UrQMD/urqmd_xs.cc b/dependencies/UrQMD/urqmd_xs.cc
new file mode 100644
index 0000000000000000000000000000000000000000..79ce9c7c877605a147cb41c1e8157663c81c409e
--- /dev/null
+++ b/dependencies/UrQMD/urqmd_xs.cc
@@ -0,0 +1,39 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+// a little helper to dump UrQMD cross-sections
+
+#include <corsika/process/urqmd/UrQMD.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+
+#include <cstdlib>
+#include <fstream>
+#include <iostream>
+
+using namespace corsika;
+using namespace corsika::units::si;
+
+int main() {
+  random::RNGManager::GetInstance().RegisterRandomStream("UrQMD");
+  corsika::UrQMD::UrQMD urqmd;
+
+  std::vector<Code> const projectiles{{Code::Proton, Code::AntiProton, Code::Neutron,
+                                       Code::AntiNeutron, Code::PiPlus, Code::PiMinus,
+                                       Code::KPlus, Code::KMinus, Code::K0Short}};
+
+  for (auto const& p : projectiles) {
+    std::ofstream file(std::string("xs_") + GetName(p) + ".dat");
+    for (auto Elab = GetMass(p) + 200_MeV; Elab <= 10_TeV; Elab *= 1.02) {
+      file << Elab / 1_GeV << '\t'
+           << urqmd.GetTabulatedCrossSection(p, Code::Nitrogen, Elab) / 1_mb << std::endl;
+    }
+  }
+
+  return EXIT_SUCCESS;
+}
diff --git a/Processes/UrQMD/whichres.f b/dependencies/UrQMD/whichres.f
similarity index 100%
rename from Processes/UrQMD/whichres.f
rename to dependencies/UrQMD/whichres.f
diff --git a/dependencies/sibyll/CMakeLists.txt b/dependencies/sibyll/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..32c967165b1e2cd6fa924348cbf9f699f40ac0de
--- /dev/null
+++ b/dependencies/sibyll/CMakeLists.txt
@@ -0,0 +1,47 @@
+#cmake_minimum_required(VERSION 3.1)
+#project(Sibyll)
+
+set (
+  MODEL_SOURCES
+  sibyll2.3d.cpp
+  sibyll2.3d.f
+  nuclib.f
+  signuc.f
+  gasdev.f
+  #rndm_dbl.f
+  )
+
+set (
+  MODEL_HEADERS
+  sibyll2.3d.hpp
+  nuclib.hpp
+  )
+
+enable_language(Fortran)
+add_library (Sibyll SHARED ${MODEL_SOURCES})
+set_property(TARGET Sibyll PROPERTY POSITION_INDEPENDENT_CODE 1)
+
+add_library (Sibyll_static STATIC ${MODEL_SOURCES})
+set_property(TARGET Sibyll_static PROPERTY POSITION_INDEPENDENT_CODE 1)
+
+target_include_directories (
+  Sibyll
+  PUBLIC
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+  $<INSTALL_INTERFACE:include/include>
+  )
+
+target_include_directories (
+  Sibyll_static
+  PUBLIC
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+  $<INSTALL_INTERFACE:include/include>
+  )
+
+target_link_libraries (
+  Sibyll_static
+  PUBLIC
+  gfortran
+  )
+
+add_dependencies (CORSIKA8 Sibyll_static)
diff --git a/Processes/Sibyll/gasdev.f b/dependencies/sibyll/gasdev.f
similarity index 100%
rename from Processes/Sibyll/gasdev.f
rename to dependencies/sibyll/gasdev.f
diff --git a/Processes/Sibyll/nuclib.f b/dependencies/sibyll/nuclib.f
similarity index 100%
rename from Processes/Sibyll/nuclib.f
rename to dependencies/sibyll/nuclib.f
diff --git a/Processes/Sibyll/nuclib.h b/dependencies/sibyll/nuclib.hpp
similarity index 100%
rename from Processes/Sibyll/nuclib.h
rename to dependencies/sibyll/nuclib.hpp
diff --git a/Processes/Sibyll/rndm_dbl.f b/dependencies/sibyll/rndm_dbl.f
similarity index 100%
rename from Processes/Sibyll/rndm_dbl.f
rename to dependencies/sibyll/rndm_dbl.f
diff --git a/dependencies/sibyll/sibyll2.3d.cpp b/dependencies/sibyll/sibyll2.3d.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..229ddad9c2341040966178a92e0a6f12888735d5
--- /dev/null
+++ b/dependencies/sibyll/sibyll2.3d.cpp
@@ -0,0 +1,19 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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 <sibyll2.3d.hpp>
+
+#include <cmath>
+
+int get_nwounded() { return s_chist_.nwd; }
+double get_sibyll_mass2(int& id) { return s_mass1_.am2[std::abs(id) - 1]; }
+
+double s_rndm_(int&) {
+  return sibyll::rndm_interface();
+}
+
diff --git a/dependencies/sibyll/sibyll2.3d.f b/dependencies/sibyll/sibyll2.3d.f
new file mode 100644
index 0000000000000000000000000000000000000000..8fccb7a42026eef3621cd80ef20797e27a65a4e1
--- /dev/null
+++ b/dependencies/sibyll/sibyll2.3d.f
@@ -0,0 +1,20471 @@
+C=======================================================================
+C          SSSSSS   IIIIIII  BBBBB   YY      YY   L        L
+C         S            I     B    B    YY  YY     L        L
+C          SSSSS       I     BBBBB       YY       L        L
+C               S      I     B    B      YY       L        L
+C         SSSSSS    IIIIIII  BBBBB       YY       LLLLLLL  LLLLLLL
+C=======================================================================
+C  Code for SIBYLL:  hadronic interaction Monte Carlo event generator
+C=======================================================================
+C   Version 2.3d (Jun-01-2017, modified May-20-2020)
+C
+C     with CHARM production
+C
+C       By   Eun-Joo Ahn
+C            Ralph Engel
+C            A. Fedynitch      
+C            R.S. Fletcher
+C            T.K. Gaisser
+C            Paolo Lipari
+C            Felix Riehn
+C            Todor Stanev
+C
+C-----------------------------------------------------------------------
+C***  Please  have people who want this code contact one of the authors.
+C***  Please report any problems.       ****
+C
+C      For a correct copy contact:
+C                sein@fnal.gov
+C                ralph.engel@kit.edu
+C                afedynitch@gmail.com 
+C                gaisser@bartol.udel.edu
+C                paolo.lipari@roma1.infn.it
+C                friehn@lip.pt
+C                stanev@bartol.udel.edu
+C     
+C     last changes relative to Sibyll 2.3c:
+C     * no pi0 suppression in minijets
+C     * added cross section tables for hadron-nitrogen and hadron-oxygen
+C       (changed S_CCSIG common)
+C     * no remnant in high mass diff. events (pi0-had scattering)
+C     * repaired had-nuc. cross section routine for kaon beams
+C       routine remains inactive in ordinary calls.
+C      
+C=======================================================================
+
+      SUBROUTINE SIBYLL (K_beam, IATARG, Ecm)
+
+C-----------------------------------------------------------------------
+C...Main routine for the production of hadronic events,
+C.  generates an inelastic hadronic interaction of 
+C.  a `projectile particle' of code K_beam with a 
+C.  target nucleus of mass number A = IATARG (integer)
+C.  IATARG = 0 is an "air" nucleus  (superposition of oxygen and nitrogen)
+C.  with c.m. energy for the hadron-nucleon system Ecm (GeV)
+C.  
+C.  Allowed values of K_beam: 7,8,9,10,11,12,13,14,-13,-14
+C.                            pi+-,K+-,KL,KS,p,n,pbar,nbar
+C.                 also:
+C.                  hyperons: 34,35,36,37,38,39
+C.                            Sig+-,Sig0,Xi0-,Lam0
+C.                        
+C.                  charmed:  59,60,71,72,74,75
+C.                            D+,D-,D0,D0b,Ds+,Ds-
+C.                            87,88,89,99
+C.                            Xic+,Xic0,LamC+,OmC0      
+C.                  rho0:27 is allowed as well to emulate photons!
+C.
+C.  The output is contained in COMMON /S_PLIST/ that contains:
+C.
+C.     NP           number of final particles
+C.     P(1:NP, 1:5) 4-momenta + masses of the final particles 
+C.     LLIST (1:NP) codes of final particles.
+C.  the reaction is studied in the c.m. of  hadron-nucleon system
+C.
+C.  The COMMON block /S_CHIST/ contains information about 
+C.  the structure of the  generated event:
+C.    NW   = number of wounded nucleons
+C.    NJET = total number of hard interactions
+C.    NSOF = total number of soft interactions
+C.    NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C.    NNJET (1:NW) = number of minijets produced in each interaction 
+C.    XJ1 (1:Index) = x1  for each string
+C.    XJ2 (1:Index) = x2   "   "     "
+C.    PTJET (1:Index) = pT   "   "     "
+C.    NNPJET (1:Index) = total number of particles in each string
+C.    NNPSTR (1:2*NW) = number of particles in each `beam string'
+C.    JDIF(1:NW) = diffraction code
+C----------------------------------------------------------------------
+      IMPLICIT NONE
+c     external type declarations
+      DOUBLE PRECISION ECM
+      INTEGER K_beam, IATARG
+
+c     COMMONs
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER LDIFF
+      COMMON /S_CLDIF/ LDIFF
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C     parameters that represent: NW: max. number of wounded nucleons,
+C     NS,NH: max. number of soft and hard interactions
+c      PARAMETER (NW_max = 20)
+C     The COMMON block /S_CHIST/ contains information about the
+C     the structure of the  generated event:
+C     NWD   = number of wounded nucleons
+C     NJET = total number of hard interactions
+C     NSOF = total number of soft interactions
+C     NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C     NNJET (1:NW) = number of minijets produced in each interaction 
+C     JDIF(1:NW) = diffraction code 
+C                  0 : non-diff,
+C                  1 : beam-diff
+C                  2 : target-diff
+C                  3 : double-diff
+      INTEGER NNSOF,NNJET,JDIF,NWD,NJET,NSOF
+      COMMON /S_CHIST/ NNSOF(NW_max),NNJET(NW_max),
+     &     JDIF(NW_max),NWD,NJET,NSOF
+
+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
+
+c     internal type declarations
+      DOUBLE PRECISION Esum,PXsum,PYsum,PZsum,xchgRate
+      INTEGER LL,IATARGET,IAIR,KBM,L,NW,IREJ,NF,J
+      DIMENSION LL(99)
+      SAVE
+      DATA LL /5*0,7*2,2*1,12*0,2,6*0,6*1,19*0,2,2,10*0,
+     &     2,2,0,2,2,11*0,1,1,1,9*0,1/
+
+      if(Ndebug.gt.0)then
+        WRITE(LUN,'(A42,I3,I3,1X,F10.2)')
+     &     '  SIBYLL: called with (K_beam,IATARG,Ecm):',
+     &     K_beam,IATARG,Ecm
+        WRITE(LUN,*)'Event type selection LDIFF: ',LDIFF
+      endif
+
+ 100  CONTINUE
+      
+      Ncall = Ncall+1
+
+      IATARGET = IATARG
+      IAIR = IABS(MIN(IATARG-1,0))
+      KBM = K_beam
+      
+      CALL INI_EVENT(ECM,KBM,IATARGET,1)
+
+      L = LL(IABS(K_beam))
+      IF(L.eq.0) THEN
+         WRITE(LUN,*)'SIB_MAIN: unknown beam particle! kbeam=',k_beam
+         WRITE(6,*)'SIB_MAIN: unknown beam particle! kbeam=',k_beam
+         CALL SIB_REJECT('SIB_MAIN        ')
+      endif
+
+C...Generate number NW wounded nucleons, and diffraction code.
+
+1000  continue  
+      CALL SIB_START_EV (Ecm, L, IATARGET, IAIR, NWD, JDIF)
+      NW = NWD
+C...limits on simulation of pure diffraction dissociation
+      IF((LDIFF.NE.0).and.(NW.EQ.1)) THEN 
+         IF((LDIFF.EQ.-1) .AND. (JDIF(1).NE.0) ) GOTO 1000
+         IF((LDIFF.EQ. 1) .AND. ((JDIF(1).NE.0).AND.(JDIF(1).NE.3)))
+     +     GOTO 1000
+         IF((LDIFF.EQ. 5) .AND. (JDIF(1).EQ.2)) GOTO 1000
+         IF((LDIFF.GE. 2) .AND. (LDIFF.LE.4)) THEN
+           JDIF(1) = LDIFF-1
+         ENDIF
+      ENDIF
+
+C...Diffractive/non-diffractive interactions
+
+      IF((NW.EQ.1).and.(JDIF(1).NE.0)) THEN
+        CALL SIB_DIFF (KBM, JDIF(1), Ecm, 1, IREJ)
+      ELSE
+        CALL SIB_NDIFF (KBM, NW, Ecm, 1, IREJ)
+      ENDIF
+
+      IF (IREJ.NE.0) THEN
+        if(Ndebug.gt.0) WRITE(LUN,'(A38,F10.2,I3,I3,I3)')
+     &   '  SIBYLL: rejection (Ecm,Ncall,Nw,JDIF):',Ecm,Ncall,NW,JDIF(1)
+        GOTO 100
+      ENDIF
+
+      do J=1,NP
+         if (P(J,4).lt.0.D0 ) then
+            if(Ndebug.gt.0)then
+               WRITE(LUN,*)' negative energy particle!' , P(J,4)
+               CALL SIB_LIST(LUN)
+            endif
+            goto 100
+         endif
+      enddo
+
+C...Check energy-momentum conservation
+      
+      CALL PFSUM(1,NP,Esum,PXsum,PYsum,PZsum,NF)
+      IF (ABS(Esum/(0.5D0*Ecm*DBLE(NW+1)) - 1.D0) .GT. EPS3)  THEN
+         WRITE(LUN,*) ' SIBYLL: energy not conserved (L,call): ',L,Ncall
+         WRITE(LUN,*) ' sqs_inp = ', Ecm, ' sqs_out = ', Esum
+         CALL PRNT_PRTN_STCK
+         CALL SIB_LIST(LUN)
+         WRITE(LUN,*) ' SIBYLL: event rejected'
+c         a = -1.D0
+c         a = log(a)
+c         stop
+         goto 100
+      ENDIF
+      IF (ABS(PZsum+0.5D0*Ecm*DBLE(NW-1)) .GT. 0.1D0)  THEN
+         if(Ndebug.gt.0)THEN
+            WRITE(LUN,*) ' SIBYLL: momentum not conserved (L,call): ',
+     &           L,Ncall
+            WRITE(LUN,*) ' pz_inp = ', 0., ' pz_out = ', pzsum
+         ENDIF
+         IF(ndebug.gt.0)then
+            CALL PRNT_PRTN_STCK
+            CALL SIB_LIST(LUN)
+            WRITE(LUN,*) ' SIBYLL: event rejected'
+         endif
+c         a = -1.D0
+c         a = log(a)
+c         stop
+         goto 100
+      ENDIF
+
+c     exchange pions with vector mesons
+      IF(IPAR(45).ne.0) then
+         xchgRate = PAR(75)
+         CALL FORCE_VECTORS(xchgRate,1,NP)
+      endif
+
+c     exchange pi0 with charged pions for meson projectiles
+      IF(IPAR(50).ne.0.and.IABS(KBM).lt.13) then
+         xchgrate = PAR(136)
+         CALL REMOVE_PI0(xchgRate,1,NP)
+      endif
+      
+      
+C...list final state particles
+      if(Ndebug.gt.10) CALL SIB_LIST(LUN)
+
+      END
+
+
+C======================================================================
+
+      SUBROUTINE SIBNUC (IAB, IATG, ECM)
+
+C-----------------------------------------------------------------------
+C.  Routine that generates the interaction of a nucleus of
+C.  mass number IAB with a  target nucleus  of mass IATG
+C.  (IATG=0 : air).
+C.  SQS (GeV) is the  center of mass energy of each
+C.  nucleon - nucleon cross section
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+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
+      COMMON /S_PLNUC/ PA(5,40000), LLA(40000), NPA
+      COMMON /CKFRAG/ KODFRAG
+      PARAMETER (IAMAX=56)
+      COMMON /CNUCMS/ B, BMAX, NTRY, NA, NB, NI, NAEL, NBEL
+     +         ,JJA(IAMAX), JJB(IAMAX), JJINT(IAMAX,IAMAX)
+     +         ,JJAEL(IAMAX), JJBEL(IAMAX)            
+      COMMON /FRAGMENTS/ PPP(3,60)
+      DIMENSION SIGDIF(3)
+      DIMENSION IAF(60)
+      DOUBLE PRECISION FOX
+      SAVE
+      DATA FOX /0.21522D0/  !atomic percentage of 'non-nitrogen' in air
+
+C...Target mass
+      IF (IATG .EQ. 0) THEN
+c  select target IATARGET from air composition
+         R = S_RNDM(0)
+         IATARGET = 14
+         IF (R .LT. FOX)  IATARGET = 16
+      ELSE
+         IATARGET = IATG
+      ENDIF
+       
+C...Single nucleon (proton) case
+
+      IF (IAB .EQ. 1)  THEN
+         NPA = 0
+         CALL SIBYLL (13,IATARGET, ECM)
+         CALL DECSIB
+         DO J=1,NP
+            LA = IABS(LLIST(J))
+            IF (LA .LT. 10000)  THEN
+               NPA = NPA + 1
+               LLA(NPA) = LLIST(J)
+               DO K=1,5
+                  PA(K,NPA) = P(J,K)
+               ENDDO
+            ENDIF
+         ENDDO
+         RETURN
+      ENDIF
+
+
+C...Nuclei
+
+      CALL SIB_SIGMA_HP(1,ECM,SIGT,SIGEL,SIG0,SIGDIF,SLOPE,RHO)
+      CALL INT_NUC (IATARGET, IAB, SIG0, SIGEL) 
+
+C...fragment spectator nucleons
+      NBT = NB + NBEL
+      IF (KODFRAG .EQ. 1)  THEN
+          CALL FRAGM1(IAB,NBT, NF, IAF)
+      ELSE IF(KODFRAG .EQ. 2)  THEN
+          CALL FRAGM2(IAB,NBT, NF, IAF)
+      ELSE 
+          CALL FRAGM (IATARGET, IAB, NBT,B, NF, IAF)
+      ENDIF
+     
+C...Spectator fragments
+      NPA = 0
+      DO J=1,NF
+         NPA = NPA+1
+         if(NPA.gt.40000) then
+           write(6,'(1x,a,2i8)') 
+     &       ' SIBNUC: no space left in S_PLNUC (NPA,NF)',NPA,NF
+           NPA = NPA-1
+           return
+         endif
+         LLA(NPA) = 1000+IAF(J)
+         PA(1,NPA) = 0.D0
+         PA(2,NPA) = 0.D0
+         PA(3,NPA) = ECM/2.D0
+         PA(4,NPA) = ECM/2.D0
+         PA(5,NPA) = DBLE(IAF(J))*0.5D0*(AM(13)+AM(14))
+      ENDDO
+
+C...Elastically scattered fragments
+      DO J=1,NBEL
+         NPA = NPA+1
+         if(NPA.gt.40000) then
+           write(6,'(1x,a,2i8)') 
+     &       ' SIBNUC: no space left in S_PLNUC (NPA,NBEL)',NPA,NBEL
+           NPA = NPA-1
+           return
+         endif
+         LLA(NPA) = 1001
+         PA(1,NPA) = 0.D0
+         PA(2,NPA) = 0.D0
+         PA(3,NPA) = ECM/2.D0
+         PA(4,NPA) = ECM/2.D0
+         PA(5,NPA) = 0.5D0*(AM(13)+AM(14))
+      ENDDO
+
+C...Superimpose NB  nucleon interactions
+      DO JJ=1,NB
+          CALL SIBYLL (13,IATARGET, ECM)
+          CALL DECSIB
+          DO J=1,NP
+             LA = IABS(LLIST(J))
+             IF (LA .LT. 10000)   THEN
+                NPA = NPA + 1
+                if(NPA.gt.40000) then
+                  write(6,'(1x,a,2i8)') 
+     &              ' SIBNUC: no space left in S_PLNUC (NPA,NP)',NPA,NP
+                  NPA = NPA-1
+                  return
+                endif
+                LLA(NPA) = LLIST(J)
+                DO K=1,5
+                    PA(K,NPA) = P(J,K)
+                ENDDO
+             ENDIF
+          ENDDO
+      ENDDO
+
+      END
+C=======================================================================
+
+      SUBROUTINE SIBYLL_INI
+
+C-----------------------------------------------------------------------
+C...Initialization routine for SYBILL 
+C.  
+C.  the routine fills the COMMON block /CCSIG/ that contains
+C.  important information for the generation of events
+C.
+C     PARAMETER (NS_max = 20, NH_max = 80)
+C     COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+C    &    SSIGN(61,3,3),SSIGNSD(61,3,3) ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+C.
+C.  NSQS = number of energy points  (61 is current version)
+C.  ASQSMIN = log_10 [sqrt(s) GeV]   minimum value
+C.  ASQSMIN = log_10 [sqrt(s) GeV]   maximum value
+C.  DASQS   = step  in log_10[sqrt(s)]
+C.            DASQS = (ASQSMAX - ASQSMIN)/(NSQS-1)
+C.
+C.  SSIG(J,1) inelastic cross section for pp interaction
+C.            at energy: sqrt(s)(GeV) = 10**[ASQSMIN+DASQS*(J-1)]
+C.  SSIG(J,2)  inelastic cross section for pi-p interaction
+C.  SSIGN(J,1,1) inelastic cross section for p-Air interaction
+C.  SSIGN(J,2,1) inelastic cross section for pi-Air interaction
+C.  SSIGN(J,1,2) inelastic cross section for p-Nitrogen interaction
+C.  SSIGN(J,2,2) inelastic cross section for pi-Nitrogen interaction
+C.
+C.  PJETC(n_s,n_j,J,1) Cumulative  probability distribution
+C.                 for the production of n_s soft interactions and
+C.                 n_j (n_j=0:30) jet pairs at sqrt(s) labeled 
+C.                 by J, for p-p interaction
+C.  PJETC(n_s,n_j,J,2) Same as above for pi-p interaction
+C.  ALINT(J,1)   proton-air  interaction length (g cm-2)
+C.  ALINT(J,2)   pi-air  interaction length (g cm-2)
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+      WRITE(*,100)
+ 100  FORMAT(' ','====================================================',
+     *     /,' ','|                                                  |',
+     *     /,' ','|                 S I B Y L L  2.3d                |',
+     *     /,' ','|                                                  |',
+     *     /,' ','|         HADRONIC INTERACTION MONTE CARLO         |',
+     *     /,' ','|                        BY                        |',
+     *     /,' ','|            Eun-Joo AHN, Felix RIEHN              |',
+     *     /,' ','|      R. ENGEL, A. FEDYNITCH, R.S. FLETCHER,      |',
+     *     /,' ','|       T.K. GAISSER, P. LIPARI, T. STANEV         |',
+     *     /,' ','|                                                  |',
+     *     /,' ','| Publication to be cited when using this program: |',
+     *     /,' ','| Eun-Joo AHN et al., Phys.Rev. D80 (2009) 094003  |',
+     *     /,' ','| F. RIEHN et al., hep-ph: 1912.03300              |',
+     *     /,' ','| last modifications: F. Riehn (05/20/2020)        |',
+     *     /,' ','====================================================',
+     *     /)
+
+      CALL PAR_INI
+      CALL DIFF_INI
+      CALL JET_INI
+      CALL PDF_INI
+      CALL BLOCK_INI
+      CALL NUC_GEOM_INI
+      CALL SIG_AIR_INI
+
+c...  charm frag. normalisation
+      CALL ZNORMAL
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE NO_CHARM
+      IMPLICIT NONE
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+c     turn off charm production
+c     global charm rate
+      PAR(24) = 0.D0
+c     minijet string charm rate
+      PAR(156) = 0.D0
+c     remnant string charm rate
+      PAR(107) = 0.D0
+c     soft sea charm rate
+      PAR(97) = 0.D0
+c     valence string charm rate
+      PAR(25) = 0.D0
+c     minijet charm rate
+      PAR(27) = 0.D0
+      END
+      
+C=======================================================================
+
+      SUBROUTINE PAR_INI
+
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      DOUBLE PRECISION FAin, FB0in
+      COMMON /S_CZDIS/ FAin, FB0in
+
+      DOUBLE PRECISION FAs1, fAs2
+      COMMON /S_CZDISs/ FAs1, fAs2
+      DOUBLE PRECISION ZDMAX, EPSI
+      COMMON /S_CZDISc/ ZDMAX, EPSI
+
+      DOUBLE PRECISION CLEAD, FLEAD
+      COMMON /S_CZLEAD/ CLEAD, FLEAD
+      DOUBLE PRECISION CCHIK
+      COMMON /S_CPSPL/ CCHIK(4,99)
+
+      PARAMETER ( NPARFIT = 22 )
+      DOUBLE PRECISION PARS
+      COMMON /XSCTN_FIT/ PARS( 50 , 2 )
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      SAVE
+      DATA (PARS(K,1),K=    1,NPARFIT) /
+     &3.9223D+01,4.2055D+01,5.0913D-02,-4.0000D-01,2.0000D-01,
+     &5.0000D-01,0.0000D+00,6.0000D-01,9.0000D-02,1.0000D+00,
+     &2.0000D+00,3.2327D+00,2.5000D-01,5.4000D-01,1.0000D+00,
+     &-8.8000D-01,5.4000D-01,5.0000D-01,9.0000D-01,5.4000D-01,
+     &6.5000D-02,9.0000D-01/
+      DATA (PARS(K,2),K=    1,NPARFIT) /
+     &2.0590D+01,9.6579D+01,5.6069D-02,-7.6393D-01,2.0000D-01,
+     &5.0000D-01,0.0000D+00,6.0000D-01,9.0000D-02,1.0000D+00,
+     &2.0000D+00,2.9191D+00,2.5000D-01,5.4000D-01,1.0000D+00,
+     &-8.8000D-01,5.4000D-01,5.4895D-01,9.0000D-01,5.4000D-01,
+     &6.5000D-02,9.0000D-01/
+c
+c     adjusted central particle production
+c     23rc5.4frgB1 aka retune5 aka Sibyll 2.3.5
+      PAR(1) = 4.0000D-02
+      PAR(2) = 2.5000D-01
+      PAR(3) = 5.0000D-01
+      PAR(4) = 1.4000D-01
+      PAR(5) = 3.0000D-01
+      PAR(6) = 3.0000D-01
+      PAR(7) = 1.5000D-01
+      PAR(8) = 1.3903D-02
+      PAR(9) = 7.0000D+00
+      PAR(10) = 1.0000D+00
+      PAR(11) = 6.5000D-02
+      PAR(12) = 9.0000D-01
+      PAR(13) = 1.0000D-01
+      PAR(14) = 6.0000D-02
+      PAR(15) = 1.3000D-01
+      PAR(16) = 4.0000D-02
+      PAR(17) = 4.0000D-02
+      PAR(18) = 5.0000D-01
+      PAR(19) = 8.0000D-01
+      PAR(20) = 8.0000D-01
+      PAR(21) = 6.0000D-01
+      PAR(22) = 4.0000D+00
+      PAR(23) = 7.0000D-01
+      PAR(24) = 4.0000D-03
+      PAR(25) = 4.0000D-03
+      PAR(26) = 2.0000D+01
+      PAR(27) = 2.0000D-02
+      PAR(28) = 2.0000D+01
+      PAR(29) = 0.0000D+00
+      PAR(30) = 2.0000D+00
+      PAR(31) = 3.3000D-01
+      PAR(32) = 0.0000D+00
+      PAR(33) = 1.0000D-01
+      PAR(34) = 0.0000D+00
+      PAR(35) = 0.0000D+00
+      PAR(36) = 7.0000D-01
+      PAR(37) = 0.0000D+00
+      PAR(38) = 5.0000D-01
+      PAR(39) = 8.0000D-01
+      PAR(40) = 0.0000D+00
+      PAR(41) = 1.0000D+00
+      PAR(42) = 0.0000D+00
+      PAR(43) = 2.3564D-01
+      PAR(44) = 9.9000D-01
+      PAR(45) = 1.0000D+00
+      PAR(46) = 1.8000D-01
+      PAR(47) = 2.8000D-01
+      PAR(48) = 2.7000D-01
+      PAR(49) = 1.0000D-01
+      PAR(50) = 6.0000D-01
+      PAR(51) = 6.0000D-03
+      PAR(52) = 6.0000D-03
+      PAR(53) = 6.0000D+00
+      PAR(54) = 2.0000D-01
+      PAR(55) = 0.0000D+00
+      PAR(56) = 0.0000D+00
+      PAR(57) = 0.0000D+00
+      PAR(58) = 0.0000D+00
+      PAR(59) = 6.8345D-01
+      PAR(60) = 8.0000D-01
+      PAR(61) = 6.6000D-01
+      PAR(62) = 0.0000D+00
+      PAR(63) = 1.0000D+00
+      PAR(64) = 2.5000D-01
+      PAR(65) = 3.0000D-01
+      PAR(66) = 3.0000D-01
+      PAR(67) = 6.0000D-01
+      PAR(68) = 6.0000D-03
+      PAR(69) = 5.0000D-02
+      PAR(70) = 7.0000D-03
+      PAR(71) = 1.0000D+00
+      PAR(72) = 3.8000D-01
+      PAR(73) = 5.0000D-01
+      PAR(74) = 6.0000D-01
+      PAR(75) = 0.0000D+00
+      PAR(76) = 3.5298D-01
+      PAR(77) = 7.0000D-01
+      PAR(78) = 2.0000D+00
+      PAR(79) = 1.0000D+01
+      PAR(80) = 5.0816D-01
+      PAR(81) = 1.0000D+04
+      PAR(82) = 1.0000D-01
+      PAR(83) = 0.0000D+00
+      PAR(84) = 6.0000D+00
+      PAR(85) = 1.0000D+00
+      PAR(86) = 1.0000D+00
+      PAR(87) = 3.0000D-01
+      PAR(88) = 8.0000D-01
+      PAR(89) = 6.0000D-01
+      PAR(90) = 1.1000D+01
+      PAR(91) = -7.2000D+00
+      PAR(92) = 3.5000D+00
+      PAR(93) = 1.0000D+00
+      PAR(94) = 4.0000D+00
+      PAR(95) = 0.0000D+00
+      PAR(96) = 1.0000D+00
+      PAR(97) = 2.0000D-03
+      PAR(98) = 1.5000D+00
+      PAR(99) = 5.0000D-01
+      PAR(100) = 2.0000D+00
+      PAR(101) = 1.0000D+00
+      PAR(102) = 0.0000D+00
+      PAR(103) = 2.0000D+00
+      PAR(104) = 4.0000D-01
+      PAR(105) = 1.0000D-01
+      PAR(106) = 0.0000D+00
+      PAR(107) = 0.0000D+00
+      PAR(108) = 0.0000D+00
+      PAR(109) = 2.0000D+01
+      PAR(110) = 1.5000D+00
+      PAR(111) = 0.0000D+00
+      PAR(112) = 7.0000D-01
+      PAR(113) = 8.0000D-01
+      PAR(114) = 2.0000D+00
+      PAR(115) = 0.0000D+00
+      PAR(116) = 1.0000D+00
+      PAR(117) = 0.0000D+00
+      PAR(118) = 5.0000D-03
+      PAR(119) = 0.0000D+00
+      PAR(120) = 1.0000D+00
+      PAR(121) = 3.0000D-01
+      PAR(122) = 0.0000D+00
+      PAR(123) = 3.0000D-01
+      PAR(124) = 1.0000D+00
+      PAR(125) = 1.0000D+00
+      PAR(126) = 1.0000D+00
+      PAR(127) = 6.0000D+00
+      PAR(128) = 1.0000D+00
+      PAR(129) = 8.0000D-02
+      PAR(130) = 1.2000D+01
+      PAR(131) = 5.0000D-01
+      PAR(132) = 5.0000D-01
+      PAR(133) = 1.0000D+01
+      PAR(134) = -5.0000D+00
+      PAR(135) = 6.0000D+00
+      PAR(136) = 0.0000D+00
+      PAR(137) = 1.2000D+00
+      PAR(138) = 0.0000D+00
+      PAR(139) = 5.0000D-01
+      PAR(140) = 4.5000D-01
+      PAR(141) = 1.5000D+00
+      PAR(142) = 0.0000D+00
+      PAR(143) = 5.0000D-01
+      PAR(144) = 9.5000D-01
+      PAR(145) = 8.5000D-01
+      PAR(146) = 0.0000D+00
+      PAR(147) = 3.0000D-01
+      PAR(148) = 5.0000D-01
+      PAR(149) = 3.0000D-01
+      PAR(150) = 4.0000D-03
+      PAR(151) = 2.0000D+00
+      PAR(152) = 4.0000D+00
+      PAR(153) = 1.0000D+01
+      PAR(154) = 3.0000D-01
+      PAR(155) = 0.0000D+00
+      PAR(156) = 5.0000D-01
+      PAR(157) = 8.0000D-01
+      PAR(158) = 0.0000D+00
+      PAR(159) = 0.0000D+00
+      PAR(160) = 0.0000D+00
+      PAR(161) = 0.0000D+00
+      PAR(162) = 0.0000D+00
+      PAR(163) = 0.0000D+00
+      PAR(164) = 0.0000D+00
+      PAR(165) = 0.0000D+00
+      PAR(166) = 0.0000D+00
+      PAR(167) = 0.0000D+00
+      PAR(168) = 0.0000D+00
+      PAR(169) = 0.0000D+00
+      PAR(170) = 0.0000D+00
+      PAR(171) = 0.0000D+00
+      PAR(172) = 0.0000D+00
+      PAR(173) = 0.0000D+00
+      PAR(174) = 0.0000D+00
+      PAR(175) = 0.0000D+00
+      PAR(176) = 0.0000D+00
+      PAR(177) = 0.0000D+00
+      PAR(178) = 0.0000D+00
+      PAR(179) = 0.0000D+00
+      PAR(180) = 0.0000D+00
+      PAR(181) = 0.0000D+00
+      PAR(182) = 0.0000D+00
+      PAR(183) = 0.0000D+00
+      PAR(184) = 0.0000D+00
+      PAR(185) = 0.0000D+00
+      PAR(186) = 0.0000D+00
+      PAR(187) = 0.0000D+00
+      PAR(188) = 0.0000D+00
+      PAR(189) = 0.0000D+00
+      PAR(190) = 0.0000D+00
+      PAR(191) = 0.0000D+00
+      PAR(192) = 0.0000D+00
+      PAR(193) = 0.0000D+00
+      PAR(194) = 0.0000D+00
+      PAR(195) = 0.0000D+00
+      PAR(196) = 0.0000D+00
+      PAR(197) = 0.0000D+00
+      PAR(198) = 0.0000D+00
+      PAR(199) = 0.0000D+00
+      PAR(200) = 0.0000D+00
+      IPAR(1) = 1
+      IPAR(2) = 0
+      IPAR(3) = 8
+      IPAR(4) = 0
+      IPAR(5) = 1
+      IPAR(6) = 0
+      IPAR(7) = 0
+      IPAR(8) = 1
+      IPAR(9) = 1
+      IPAR(10) = 1
+      IPAR(11) = 0
+      IPAR(12) = 3
+      IPAR(13) = 0
+      IPAR(14) = -2
+      IPAR(15) = 9
+      IPAR(16) = 8
+      IPAR(17) = 1
+      IPAR(18) = 4
+      IPAR(19) = 1
+      IPAR(20) = 0
+      IPAR(21) = 0
+      IPAR(22) = 0
+      IPAR(23) = 0
+      IPAR(24) = 0
+      IPAR(25) = 1
+      IPAR(26) = 0
+      IPAR(27) = 0
+      IPAR(28) = 4
+      IPAR(29) = 1
+      IPAR(30) = 0
+      IPAR(31) = 1
+      IPAR(32) = 0
+      IPAR(33) = 0
+      IPAR(34) = 0
+      IPAR(35) = 0
+      IPAR(36) = 1
+      IPAR(37) = 0
+      IPAR(38) = 1
+      IPAR(39) = 0
+      IPAR(40) = 0
+      IPAR(41) = 0
+      IPAR(42) = 3
+      IPAR(43) = 1
+      IPAR(44) = 0
+      IPAR(45) = 0
+      IPAR(46) = 2
+      IPAR(47) = 6
+      IPAR(48) = 1
+      IPAR(49) = 4
+      IPAR(50) = 0
+      IPAR(51) = 2
+      IPAR(52) = 0
+      IPAR(53) = 1
+      IPAR(54) = 0
+      IPAR(55) = 0
+      IPAR(56) = 0
+      IPAR(57) = 1
+      IPAR(58) = 3
+      IPAR(59) = 1
+      IPAR(60) = 0
+      IPAR(61) = 100
+      IPAR(62) = 1
+      IPAR(63) = 0
+      IPAR(64) = 0
+      IPAR(65) = 1
+      IPAR(66) = 3
+      IPAR(67) = 0
+      IPAR(68) = 0
+      IPAR(69) = 1
+      IPAR(70) = 1
+      IPAR(71) = 0
+      IPAR(72) = 0
+      IPAR(73) = 0
+      IPAR(74) = 1
+      IPAR(75) = 0
+      IPAR(76) = 0
+      IPAR(77) = 0
+      IPAR(78) = 2
+      IPAR(79) = 1
+      IPAR(80) = 1
+      IPAR(81) = 5
+      IPAR(82) = 2
+      IPAR(83) = 0
+      IPAR(84) = 2
+      IPAR(85) = 1
+      IPAR(86) = 0
+      IPAR(87) = 3
+      IPAR(88) = 1
+      IPAR(89) = 0
+      IPAR(90) = 1
+      IPAR(91) = 0
+      IPAR(92) = 1
+      IPAR(93) = 1
+      IPAR(94) = 0
+      IPAR(95) = 1
+      IPAR(96) = 0
+      IPAR(97) = 0
+      IPAR(98) = 0
+      IPAR(99) = 0
+      IPAR(100) = 0
+
+C...  valence quark distribution function
+c     large x suppression
+      do i=1,3                  ! quark flavors
+         CCHIK(i,13)=PAR(62)
+         CCHIK(i,14)=PAR(62)
+      enddo
+C...string fragmentation parameters
+c     effective quark mass
+      STR_mass_val = PAR(36) 
+      STR_mass_sea = PAR(41)
+
+C...energy dependence of PTmin
+c     pt_cut offset
+      PAR(10) = PARS(10 , 1)
+c     lambda
+      PAR(11) = PARS(21 , 1)
+c     c parameter
+      PAR(12) = PARS(22 , 1)
+
+C...fragmentation function
+      FAin = PAR(20)
+      FB0in = PAR(21)
+
+C...Strange fragmentation function
+      FAs1 = PAR(35)
+      FAs2 = PAR(35)
+
+C...leading baryon fragmentation function
+c     hard proton mixing
+      CLEAD = PAR(50)
+
+      END
+C=======================================================================
+
+      SUBROUTINE PAR_INI_FROM_FILE
+      IMPLICIT NONE
+c     locals
+      CHARACTER*10 FILENA
+      CHARACTER*6 CNAME
+      CHARACTER*70 NUMBER
+
+      INTEGER ISTAT,J,IVAL,I
+      DOUBLE PRECISION VAL      
+c     commons
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+
+      DOUBLE PRECISION FAin, FB0in
+      COMMON /S_CZDIS/ FAin, FB0in
+
+      DOUBLE PRECISION FAs1, fAs2
+      COMMON /S_CZDISs/ FAs1, fAs2
+      DOUBLE PRECISION ZDMAX, EPSI
+      COMMON /S_CZDISc/ ZDMAX, EPSI
+
+      DOUBLE PRECISION CLEAD, FLEAD
+      COMMON /S_CZLEAD/ CLEAD, FLEAD
+      DOUBLE PRECISION CCHIK
+      COMMON /S_CPSPL/ CCHIK(4,99)
+
+      SAVE
+      DATA FILENA /'sibyll.par'/
+ 14   FORMAT(A6,A70)
+ 15   FORMAT(A5,I3,A2,I8)
+ 16   FORMAT(A5,I3,A2,F8.2)      
+      OPEN(unit=4,file=filena,status='OLD')
+      istat = 1
+c     set standard parameters (full set)
+      CALL PAR_INI
+c     read new parameters from file
+      IF(ndebug.gt.0)WRITE(LUN,*)'reading parameter file: sibyll.par'
+      DO WHILE (istat.ge.0) 
+         READ(4,14,iostat=ISTAT) CNAME,NUMBER
+         IF(CNAME.eq.'IPAR  ')THEN
+            READ(NUMBER,*) j, ival
+            IF(ndebug.gt.1)write(LUN,15) 'IPAR(',j,')=', ival
+            IPAR(J) = iVAL
+         ELSEif(CNAME.eq.'PAR   ')THEN
+            READ(NUMBER,*) j, val
+            PAR(J) = VAL
+            IF(ndebug.gt.1)write(LUN,16) ' PAR(',j,')=', val
+         ELSE
+            WRITE(LUN,*)'wrong format in parameter file!'
+            WRITE(6,*)'wrong format in parameter file!'
+            WRITE(LUN,*) CNAME, NUMBER
+            stop
+         ENDIF
+      ENDDO
+C     copy parameter values to their respective COMMONs
+C...  valence quark distribution function
+c     large x suppression
+      do i=1,3                  ! quark flavors
+         CCHIK(i,13)=PAR(62)
+         CCHIK(i,14)=PAR(62)
+      enddo
+C...string fragmentation parameters
+c     effective quark mass
+      STR_mass_val = PAR(36) 
+      STR_mass_sea = PAR(41)
+C...fragmentation function
+      FAin = PAR(20)
+      FB0in = PAR(21)
+C...Strange fragmentation function
+      FAs1 = PAR(35)
+      FAs2 = PAR(35)
+C...leading baryon fragmentation function
+c     hard proton mixing
+      CLEAD = PAR(50)
+      END
+      
+C=======================================================================
+      
+      SUBROUTINE MESON_FLV_MRG_INI
+
+C-----------------------------------------------------------------------
+c     change flavor merging for pions (favor spin)
+C-----------------------------------------------------------------------
+      INTEGER KFLV
+      COMMON /S_KFLV/ KFLV(4,43)
+
+c     pi+ --> rho+
+      KFLV(2,1) = 25
+c     pi- --> rho-
+      KFLV(1,2) = 26
+c     pi0 --> rho0
+      KFLV(1,1) = 27
+      KFLV(2,2) = 27     
+      END
+C=======================================================================
+
+      BLOCK DATA PARAM_INI
+
+C-----------------------------------------------------------------------
+C....This block data contains default values
+C.   of the parameters used in fragmentation
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      DOUBLE PRECISION FAin, FB0in
+      COMMON /S_CZDIS/ FAin, FB0in
+
+      DOUBLE PRECISION FAs1, fAs2
+      COMMON /S_CZDISs/ FAs1, fAs2
+      DOUBLE PRECISION ZDMAX, EPSI
+      COMMON /S_CZDISc/ ZDMAX, EPSI
+
+      DOUBLE PRECISION CLEAD, FLEAD
+      COMMON /S_CZLEAD/ CLEAD, FLEAD
+      DOUBLE PRECISION CCHIK
+      COMMON /S_CPSPL/ CCHIK(4,99)
+
+      INTEGER ITRY, NREJ
+      COMMON /S_CNT/ ITRY(20), NREJ(20)
+
+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
+
+      COMMON /CKFRAG/ KODFRAG
+      SAVE
+
+      DATA ITRY /20*0/
+      DATA NREJ /5,5,20,10,20,20,14*0/ 
+      DATA EPS3,EPS5,EPS8,EPS10 /1.D-3,1.D-5,1.D-8,1.D-10/
+      DATA PI,TWOPI,CMBARN/3.14159265358979D0,6.283185308D0,0.389385D0/
+      DATA FACN /2.D0,5.D0,15.D0,60.D0,250.D0,1500.D0,12000.D0,
+     &     120000.D0/
+
+C...  default output unit
+      DATA LUN /7/
+c...new fragmentation for charmed particles
+      DATA EPSI /2.D0/
+C...mass cutoff for soft strings
+      data STR_mass_val /0.35D0/ 
+      data STR_mass_val_hyp /0.4D0/ 
+      data STR_mass_sea /1.D0/ 
+C...Longitudinal Fragmentation function
+      DATA FAin /0.5D0/, FB0in /0.8D0/
+C...Longitudinal Fragmentation function for leading baryons
+      DATA CLEAD  /0.6D0/, FLEAD  /0.6D0/
+c     strange fragmentation
+      data FAs1 /3.D0/, fAs2 /3.D0/
+C...  Splitting parameters
+      DATA CCHIK /20*0.D0,28*2.D0,8*3.D0,48*0.D0,4*2.D0,24*0.D0,
+     &     24*3.D0,76*0.D0,8*2.D0,40*0.D0,12*2.D0,40*0.D0,24*3.D0,
+     &     40*0.D0/
+C...Parameters of flavor formation 
+c     last in use: 158
+      DATA PAR/0.04D0,0.3D0,0.3D0,0.14D0,0.3D0,0.3D0,0.15D0,0.D0,7.D0, ! 10
+     &     2*0.D0,0.9D0,0.2D0,4*0.04D0,0.5D0,0.8D0,0.5D0,              ! 20 
+     &     0.8D0,6.D0,0.5D0,0.004D0,5*0.D0,0.7D0,                      ! 30
+     &     2*0.D0,0.1D0,0.D0,3.D0,0.35D0,0.D0,0.5D0,2*0.D0,            ! 40
+     &     1.D0,2.D0,0.D0,0.99D0,0.D0,0.3D0,0.45D0,0.6D0,0.6D0,0.6D0,  ! 50
+     &     .03D0,.03D0,6.D0,0.2D0,4*0.D0,1.1D0,0.8D0,                  ! 60
+     &     .33D0,3.D0,1.D0,.25D0,.3D0,0.3D0,0.6D0,.007D0,.03D0,.007D0, ! 70
+     &     1.D0,0.3D0,0.D0,0.3D0,0.0D0,0.2D0,0.5D0,1.0D0,10.D0,0.D0,   ! 80
+     &     1000.D0,1000.D0,1.D0,6.D0,1.D0,0.D0,0.3D0,0.8D0,0.3D0,31.D0,! 90
+     &     1.D0,6.5D0,1.D0,1.D0,0.D0,1.0D0,0.004D0,1.D0,0.33D0,1.D0,   ! 100
+     &     1.D0,0.D0,2.D0,0.3D0,0.15D0,3*0.D0,20.D0,0.25D0,            ! 110
+     &     0.D0,0.7D0,0.3D0,0.D0,0.D0,1.D0,3*0.D0,1.D0,                ! 120
+     &     0.3D0,0.D0,0.3D0,1.D0,1.D0,1.D0,6.D0,1.D0,1.D0,6.D0,        ! 130
+     &     0.0001D0,0.5D0,31.10362D0,-15.29012D0,6.5D0,                ! 135
+     &     0.D0,4 *0.D0,                                               ! 140
+     &     1.D0,0.D0,0.5D0,0.D0,0.5D0,0.D0,0.3D0,0.8D0,0.08D0,0.004D0, ! 150
+     &     2.D0,1.D0,1.D0,1.D0,1.D0,1.D0,0.D0,1.D0,2*0.D0,             ! 160      
+     &     40*0.D0/                                                    ! 200
+c     last in use:93
+      DATA IPAR /9*0,1,0,1,8*0,20*0,    ! 40
+     &     9*0,0,2,9*0,                 ! 60
+     &     100,25*0,2,1,0,0,0,1,0,7*0/  ! 100   
+
+C...Fragmentation of nuclei
+      DATA KODFRAG /0/
+C...Debug label and event counter
+      DATA Ndebug /0/
+      DATA Ncall /0/
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE PARAM_PRINT(LUN)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON /S_CZLEAD/ CLEAD, FLEAD
+      COMMON /S_CPSPL/ CCHIK(4,99)
+      COMMON /S_DEBUG/ Ncall, Ndebug, Lunn
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      DOUBLE PRECISION FAin, FB0in
+      COMMON /S_CZDIS/ FAin, FB0in
+
+      DOUBLE PRECISION PPT02
+      COMMON /S_CQDIS2/ PPT02(44)
+      DOUBLE PRECISION PPT0,ptflag
+      COMMON /S_CQDIS/ PPT0(35),ptflag
+      SAVE
+
+      WRITE (LUN, 25)
+25      FORMAT( /,1x,40('-'), /
+     +   ' SIBYLL MONTE CARLO PROGRAM. Version 2.3.f',/,
+     +    1x,40('-'),/'  List of parameters: ' )
+
+      WRITE (LUN, 31) FAin, FB0in
+31      FORMAT ('  Parameters of longitudinal fragmentation: ', /,
+     +          '   f(z) = (1-z)**a * exp(-b * mt**2/z) ', /,
+     +          '   a = ', f9.3, 3x, ' b = ', f9.3, ' GeV**-2' )
+      WRITE (LUN, 32) CLEAD, 1.D0/FLEAD-1.D0
+32      FORMAT ('  Parameters of leading fragmentation: ', /,
+     +   '   f(z) = c + (1-z)**a ', /,
+     +   '   c = ',f9.3,3x,' a = ',f9.3) 
+
+        WRITE (LUN, 33) str_mass_val, str_mass_sea
+ 33     FORMAT ('  Mass cuts ', /,
+     +          '   val = ', f9.3, 3x, ' sea = ', f9.3, ' GeV' )
+
+      WRITE (LUN, 35) PPT02(1), PPT02(3), PPT02(11),ppt02(10),ppt02(20)
+35      FORMAT ('   <pT> of sea partons ', /,
+     +   3x,'<pT>(u/d) ',F8.3,2x,'<pT>(s) ',f8.3,2x,'<pT>(qq) ',f8.3,
+     +     2x,'<pT>(val) ',f8.3,2x,'<pT>(sea) ',f8.3)
+
+      WRITE (LUN, 120) (PAR(K),K=1,24)
+120      FORMAT (1x, ' Parameters of flavor formation: ',/,
+     +   3x,'PAR(1) = Prob(qq)/Prob(q)              = ',F10.2,/,
+     +   3x,'PAR(2) = Prob(s)/Prob(u)               = ',F10.2,/,
+     +   3x,'PAR(3) = Prob(us)/Prob(ud)             = ',F10.2,/,
+     +   3x,'PAR(4) = Prob(ud_0)/Prob(ud_1)         = ',F10.2,/,
+     +   3x,'PAR(5) = Prob(Vector)/Prob(Scalar)     = ',F10.2,/,
+     +   3x,'PAR(6) = Prob(K*)/Prob(K)              = ',F10.2,/,
+     +   3x,'PAR(7) = Prob(spin 3/2)/Prob(spin=1/2) = ',F10.2,/,
+     +   3x,'PAR(8) = Prob(B-M-Bbar)/Prob(B-Bbar)   = ',F10.2,/,
+     +   3x,'PAR(9) = Phase space suppression of MI = ',F10.2,/,
+     +   3x,'PAR(10)= Low-energy limit for pt cutoff= ',F10.2,/,
+     +   3x,'PAR(11)= Pt cutoff factor for exp      = ',F10.2,/,
+     +   3x,'PAR(12)= Pt cutoff factor for exp      = ',F10.2,/,
+     +   3x,'PAR(13)= max. mass in diffraction      = ',F10.2,/,
+     +   3x,'PAR(14)= Prob(qq)/Prob(q) std. value   = ',F10.2,/,
+     +   3x,'PAR(15)= Prob(qq)/Prob(q) in hard jets = ',F10.2,/,
+     +   3x,'PAR(16)= Prob(qq)/Prob(q) in diff.     = ',F10.2,/,
+     +   3x,'PAR(17)= not used                      = ',F10.2,/,
+     +   3x,'PAR(18)= not used                      = ',F10.2,/,
+     +   3x,'PAR(19)= not used                      = ',F10.2,/,
+     +   3x,'PAR(20)= not used                      = ',F10.2,/,
+     +   3x,'PAR(21)= not used                      = ',F10.2,/,
+     +   3x,'PAR(22)= effective scale in PDF (Q2)   = ',F10.2,/,
+     +   3x,'PAR(23)= not used                      = ',F10.2,/,
+     +   3x,'PAR(24)= Prob(s->c)                    = ',F10.2  )
+
+      WRITE (LUN, 130) (IPAR(K),K=1,17)
+130      FORMAT (1x, ' Model switches: ',/,
+     +   3x,'IPAR(1) = not used                      =',I4,/,
+     +   3x,'IPAR(2) = not used                      =',I4,/,
+     +   3x,'IPAR(3) = exponential pt                =',I4,/,
+     +   3x,'IPAR(4) = decouple qq/q in val. strings =',I4,/,
+     +   3x,'IPAR(5) = decouple qq/q in hm. diff.    =',I4,/,
+     +   3x,'IPAR(6) = decouple qq/q in hard strings =',I4,/,
+     +   3x,'IPAR(7) = remnant (not implemented yet) =',I4,/,
+     +   3x,'IPAR(8) = jet kinematic pdf set (DO/GRV)=',I4,/,
+     +   3x,'IPAR(9) = smear lowest diff. mass       =',I4,/,
+     +   3x,'IPAR(10)= high mass diff. mode (d:ON)   =',I4,/,
+     +   3x,'IPAR(11)= leading vec. meson prod. model=',I4,/,
+     +   3x,'IPAR(12)= inel. screening in pAir       =',I4,/,
+     +   3x,'IPAR(13)= decouple qq/q in val. strings =',I4,/,
+     +   3x,'IPAR(14)= fireball model                =',I4,/,
+     +   3x,'IPAR(15)= charm production              =',I4,/,
+     +   3x,'IPAR(16)= charmed transverse momentum   =',I4,/,
+     +   3x,'IPAR(17)= full charm model              =',I4 )
+
+      WRITE (LUN, 40)
+      WRITE (LUN, 41) CCHIK (1,13), CCHIK(2,13)
+ 40   FORMAT(' Parameters of hadron splitting ' )
+ 41   FORMAT('   p -> [(ud) u] splitting: alpha = ', F10.3, /,
+     +       '   p -> [(uu) d] splitting: alpha = ', F10.3 )
+c     print rho0 splitting
+      WRITE (LUN, 42) CCHIK (1,27), CCHIK(2,27)        
+ 42   FORMAT(' rho0 -> [u ubar] splitting: alpha = ', F10.3, /,
+     +       ' rho0 -> [d dbar] splitting: alpha = ', F10.3 )
+c     print d+ splitting
+      WRITE (LUN, 43) CCHIK (4,59), CCHIK(2,59)        
+ 43   FORMAT('  dp -> [c ubar] splitting: alpha = ', F10.3, /,
+     +       '  dp -> [dbar c] splitting: alpha = ', F10.3 )
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIB_LIST(LUN)
+
+C-----------------------------------------------------------------------
+C...This routine prints the event record for the
+C.  current event on unit LUN
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON /S_DEBUG/ Ncall, Ndebug, Lunn
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+      INTEGER LLIST1
+      COMMON /S_PLIST1/ LLIST1(8000)
+C     parameters that represent: NW: max. number of wounded nucleons,
+C     NS,NH: max. number of soft and hard interactions
+c      PARAMETER (NW_max = 20)
+C     The COMMON block /S_CHIST/ contains information about the
+C     the structure of the  generated event:
+C     NWD   = number of wounded nucleons
+C     NJET = total number of hard interactions
+C     NSOF = total number of soft interactions
+C     NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C     NNJET (1:NW) = number of minijets produced in each interaction 
+C     JDIF(1:NW) = diffraction code 
+C                  0 : non-diff,
+C                  1 : beam-diff
+C                  2 : target-diff
+C                  3 : double-diff
+      INTEGER NNSOF,NNJET,JDIF,NWD,NJET,NSOF
+      COMMON /S_CHIST/ NNSOF(NW_max),NNJET(NW_max),
+     &     JDIF(NW_max),NWD,NJET,NSOF
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+      CHARACTER*6 NAMP
+      COMMON /S_CNAM/ NAMP (0:99)
+      INTEGER IRMNT,KRB,KRT
+      DOUBLE PRECISION XRMASS,XRMEX
+      COMMON /S_RMNT/ XRMASS(2),XRMEX(2),IRMNT(NW_max),KRB,KRT(NW_max)
+
+      CHARACTER*7 CTGT(0:20)
+      CHARACTER CODE*18
+      CHARACTER*18 NAMDIF(0:3)
+      CHARACTER*18 NAMRMNT(0:3)
+      SAVE
+      DATA CTGT /'Air    ','Proton ',19*'Nucleus'/
+      DATA NAMDIF /'Non-diff. event   ',
+     &  'Beam diffraction  ','Target diffraction','Double diffraction'/
+      DATA NAMRMNT /'No resolvd remnant',
+     &  'Beam remnant     ','Target remnant    ','Double remnant    '/
+
+ 50   FORMAT(3X,88('-'),/,25X,'SIBYLL EVENT SUMMARY',25X,
+     &     /,3X,88('-'))
+ 52   FORMAT( 3X,'Beam + Target @ Energy:',2X,A6,2X,'+',2X,A7,2X,
+     &     '@',1p,E11.3,' GeV')
+ 53   FORMAT( 3X,'Beam + Target @ Energy:',2X,'Anti-',A6,2X,'+',2X,A7,
+     &     2X,'@',1p,E11.3,' GeV')
+
+      WRITE (LUN,50)
+      IF (KB .GT. 0 ) THEN
+        WRITE (LUN,52)
+     &     NAMP(IABS(KB)),CTGT(IAT),SQS
+      ELSE 
+        WRITE (LUN,53)
+     &     NAMP(IABS(KB)),CTGT(IAT),SQS
+      ENDIF
+      if(NWD.eq.1)THEN
+         WRITE (LUN,*) '  ',NAMDIF(JDIF(1))
+         IF(jdif(1).eq.0)
+     &    WRITE (LUN,*) '  ',NAMRMNT(abs(IRMNT(1)))
+      else
+         WRITE (LUN,*) '  ',NAMDIF(0)
+      endif
+
+      WRITE (LUN,*) '  A/N_w/N_s/N_j = ', IAT , NWD, NSOF, NJET
+      WRITE (LUN,100)
+
+C...Print particle list
+      kchar = 0
+      ibary = 0
+      ichmd = 0
+      istrg = 0
+      DO J=1,NP
+        L = MOD(LLIST(J),10000)
+        CODE = '                  '
+        CODE(1:6) = NAMP(IABS(L))
+        IF (L .LT. 0) CODE(7:9) = 'bar'
+        IF(IABS(LLIST(J)) .GT. 10000)   CODE(10:10) = '*'
+        WRITE (LUN,120) J, CODE, NIORIG(J),JDIF(NIORIG(J)),LLIST1(J), 
+     &       NPORIG(J), (P(J,K),K=1,4)
+        if(abs(LLIST(J)).LT.10000) then
+          kchar = kchar+sign(1,l)*ICHP(iabs(l))
+          ibary = ibary+sign(1,l)*IBAR(iabs(l))
+          ichmd = ichmd+sign(1,l)*ICHM(iabs(l))
+          istrg = istrg+sign(1,l)*ISTR(iabs(l))
+        endif
+      ENDDO
+      CALL PFSUM(1,NP,Esum,PXsum,PYsum,PZsum,NF)
+      WRITE(LUN,140) PXsum,PYsum,PZsum,Esum
+100      FORMAT(3X,'N  Particle',12X,'Int',2x,'Jdif',2x,'Prnt',2x,'Proc'
+     +         ,6x,'PX',9x,'PY',9x,'PZ',9x,'E', /, 3X,88('-'))
+120      FORMAT(I6,1X,A18,3I5,I8,2F10.3,1p,2E11.3)
+140      FORMAT(3X,88('-'),/,'  Tot =',41X,2F10.3,1p,2E11.3)
+         write(LUN,'(1x,a,i3,3x,a,i3)') ' Total charge:     ',kchar,
+     &        'total baryon number:',ibary
+         write(LUN,'(1x,a,i3,3x,a,i3)') ' Total strangeness:',istrg,
+     &        'total charm number: ',ichmd
+
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE KCODE (J,CODE,NC)
+
+C-----------------------------------------------------------------------
+C...Produce the code for parton J
+C.  Input K, Output CODE, NC=number of characters
+C..................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      CHARACTER*5 CODE
+      CHARACTER*1 NAMQ(4)
+      SAVE
+      DATA NAMQ /'u','d','s','c'/
+
+      CODE = '     '
+      IF(J.EQ.0)  THEN
+         CODE(1:3) = 'glu'
+         NC = 3
+         RETURN
+      ENDIF
+      JA = IABS(J)
+      J1 = MOD(JA,10)
+      J2 = (JA-J1)/10
+      IF(JA .GT. 10) THEN
+         CODE(1:1) = NAMQ(J2)
+         CODE(2:2) = NAMQ(J1)
+         NC = 2
+      ELSE
+         CODE(1:1) = NAMQ(J1)
+         NC = 1      
+      ENDIF
+      IF (J .LT. 0)  THEN
+         CODE(NC+1:NC+3) = 'bar'
+         NC = NC+3
+      ENDIF
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_PARTPR(LUN)
+
+C----------------------------------------------------------------
+C     prints the particles known to SIBYLL with their internal
+C     and PDG labels \FR'13
+C----------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+      CHARACTER*6 NAMP
+      COMMON /S_CNAM/ NAMP (0:99)
+      SAVE
+
+      WRITE(LUN,50)
+ 50   FORMAT(/,2X,16X,'SIBYLL PARTICLE TABLE:',/,2x,80('-'))
+      WRITE(LUN,100)
+ 100  FORMAT(2X,'Particle',4X,'SIB PID',6x,'SIB2PDG',6x,'SIB2PDG^-1', 
+     &     4x,'MASS',4x,'STRG',4x,'CHRM',4x,'BRYN'/, 2X,80('-'))
+
+      DO J=1,99
+         IA = ISIB_PID2PDG( j )         
+         IF(IA.ne.0)THEN
+            ISIBPDG2PIDIA=ISIB_PDG2PID( IA )
+         ELSE
+            WRITE(LUN,'(1X,A,I2)') 'PDG conversion not found! pid=', j
+         ENDIF         
+         WRITE (LUN,120)  NAMP(J), J, IA, ISIBPDG2PIDIA, AM(J), ISTR(J),
+     &        ICHM(J), IBAR(J)
+      ENDDO
+ 120  FORMAT(4X,A6,4X,I4,7X,I7,8X,I4,5X,F9.3,3(6X,I2))
+
+      END
+
+C=======================================================================
+
+      INTEGER FUNCTION ISIB_PID2PDG(Npid)
+
+C----------------------------------------------------------------
+C     conversion of SIBYLL internal particle code to PDG standard
+C
+C     input:     Npid        internal particle number
+C     output:    sib_pid2pdg  PDG particle number
+C
+C     based on similar phojet function \FR'13
+C----------------------------------------------------------------
+      COMMON /S_PDG2PID/ ID_PDG_LIST(99),ID_LIST(577)
+      INTEGER NPIDA,NPID
+      SAVE
+
+      Npida = iabs(Npid)
+      ISIB_PID2PDG = ID_PDG_LIST(Npida)
+      IF(NPID.lt.0)ISIB_PID2PDG = isign(ISIB_PID2PDG,Npid)
+      RETURN
+      END
+
+C=======================================================================
+
+      INTEGER FUNCTION ISIB_PDG2PID(Npdg)
+
+C-----------------------------------------------------------------------
+C     conversion of PDG standard particle code to SIBYLL internal
+C
+C     input:     Npdg        PDG particle number
+C     output:    sib_pdg2pid internal particle id
+C
+C     based on similar phojet function \FR'13
+C----------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /S_PDG2PID/ IPID_PDG_LIST(99),ID_LIST(577)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+
+      DOUBLE PRECISION CBR
+      INTEGER KDEC,LBARP,IDB
+      COMMON /S_CSYDEC/ CBR(223+16+12+8), KDEC(1338+6*(16+12+8)),
+     &     LBARP(99), IDB(99)
+      SAVE
+
+      Nin = abs(Npdg)
+      if((Nin.gt.999999).or.(Nin.eq.0)) then
+C  invalid particle number
+        if(ndebug.gt.5) write(6,'(1x,A,I10)')
+     &    ' ISIB_PDG2PID: invalid PDG ID number ',Npdg
+        ISIB_PDG2PID = 0
+        return
+      else If(Nin.le.577) then
+C  simple case
+        Nout = Nin
+      else
+C  use hash algorithm
+        Nout = mod(Nin,577)
+      endif
+
+ 100  continue
+
+C  particle not in table
+      if(ID_list(Nout).Eq.0) then
+         if(ndebug.gt.0) write(6,'(1x,A,I10)')
+     &    ' ISIB_PDG2PID: particle not in table ',Npdg
+        ISIB_PDG2PID = 0
+        return
+      endif
+      ID_out = ID_list(Nout)
+      IF(abs(ID_out).gt.99)then
+         ISIB_PDG2PID = 0
+         return
+      else
+
+         if(IPID_PDG_LIST(ID_list(Nout)).eq.Nin) then
+C     particle ID found
+            ISIB_PDG2PID = ID_list(Nout)
+            if (NPDG.lt.0) ISIB_PDG2PID = lbarp( ISIB_PDG2PID )
+            return
+         else
+C     increment and try again
+            Nout = Nout + 5
+            If(Nout.gt.577) Nout = Mod(Nout,577)
+            goto 100
+         endif
+      endif
+      END
+
+C=======================================================================
+
+      SUBROUTINE PDG_INI
+
+C-----------------------------------------------------------------------
+C     PDG conversion blocks \FR'13
+C----------------------------------------------------------------
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER ( ID_PDG_MAX = 260 )
+      COMMON /S_PDG2PID/ ID_PDG_LIST(99),ID_LIST(577)
+      SAVE
+      DATA ID_PDG_LIST /22,-11,11,-13,13,111,211,-211,321,-321, !10
+     &     130,310,2212,2112,12,-12,14,-14,-2212,-2112,         !20
+     &     311,-311,221,331,213,-213,113,323,-323,313,          !30
+     &     -313,223,333,3222,3212,3112,3322,3312,3122,2224,     !40
+     &     2214,2114,1114,3224,3214,3114,3324,3314,3334,0,      !50
+     &     202212,202112,212212,212112,4*0,411,-411,            !60
+     &     900111,900211,-900211,7*0,                           !70
+     &     421,-421,441,431,-431,433,-433,413,-413,423,         !80
+     &     -423,0,443,4222,4212,4112,4232,4132,4122,-15,        !90
+     &     15,-16,16,4224,4214,4114,4324,4314,4332/
+
+      IF(Ndebug.gt.2)
+     & WRITE(LUN,*) ' INITIALIZING PDG TABLES..'
+      CALL SIB_CPCINI(ID_pdg_max,ID_pdg_list,ID_list)
+      
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIB_CPCINI(Nrows,Number,List)
+
+C-----------------------------------------------------------------------
+C     initialization of particle hash table
+C
+C     input:   Number     vector with Nrows entries according to PDG
+C                         convention
+C
+C     output:  List       vector with hash table
+C
+C     (this code is based on the function initpns written by
+C      Gerry Lynch, LBL, January 1990)
+C
+C***********************************************************************
+      IMPLICIT NONE
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      integer Number(*),List(*),Nrows
+      Integer Nin,Nout,Ip,I
+      SAVE
+
+      do I = 1,577
+        List(I) = 0
+      enddo
+
+C    Loop over all of the elements in the Number vector
+
+        Do 500 Ip = 1,Nrows
+            Nin = Number(Ip)
+
+C    Calculate a list number for this particle id number
+            If(Nin.Gt.999999.or.Nin.Le.0) Then
+                 Nout = -1
+            Else If(Nin.Le.577) Then
+                 Nout = Nin
+            Else
+               Nout = Mod(Nin,577)
+            End If
+
+ 200        continue
+
+            If(Nout.Lt.0) Then
+C    Count the bad entries
+               IF(Ndebug.gt.3) Write(LUN,'(1x,a,i10)')
+     &            ' SIB_CPCINI: invalid particle ID',Nin
+               Go to 500
+            End If
+            If(List(Nout).eq.0) Then
+                List(Nout) = Ip
+            Else
+                If(Nin.eq.Number(List(Nout))) Then
+                  IF(Ndebug.gt.3)Write(LUN,'(1x,a,i10)')
+     &              ' SIB_CPCINI: double particle  ID',Nin
+                End If
+                Nout = Nout + 5
+                If(Nout.Gt.577) Nout = Mod(Nout, 577)
+
+                Go to 200
+            End If
+ 500    Continue
+
+      END
+C=======================================================================
+
+      SUBROUTINE PFSUM(N1,N2,ETOT,PXT,PYT,PZT,NF)
+
+C-----------------------------------------------------------------------
+C...Return the energy,px,py,pz and the number of stable
+C.  particles in the list between N1 and N2
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+c      COMMON /S_PLIST/ P(8000,5), LLIST(8000), NP
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      SAVE
+
+      NF=0
+      ETOT=0.D0
+      PXT=0.D0
+      PYT=0.D0
+      PZT=0.D0
+      DO J=N1,N2
+         L = LLIST(J)     
+         IF (IABS(L) .LT. 10000)  THEN
+           NF = NF+1
+           ETOT = ETOT + ABS( P(J,4) )
+           PXT = PXT + P(J,1)
+           PYT = PYT + P(J,2)
+           PZT = PZT + P(J,3)
+         ENDIF
+      ENDDO
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE QNUM (JQ,JS,JC,JB,JBA, NC, NF)
+
+C-----------------------------------------------------------------------
+C...Return the quantum numbers of one event
+C.  JQ = charge, JB = baryon number, JS = strangeness, JC = charmedness
+C.  JBA = (number of baryons+antibaryons)
+C.  NC  = number of charged particles
+C.  NF  = number of final particles
+C..................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+      SAVE
+
+      JQ = 0
+      JB = 0
+      JS = 0
+      JC = 0
+      JBA= 0
+      NC = 0
+      NF = 0
+      DO J=1,NP
+          L = LLIST(J)
+          LL = IABS(L)
+          IF (LL .LT. 10000)  THEN
+              IF(ICHP(LL) .NE. 0) NC = NC + 1
+              NF = NF + 1
+              JQ = JQ + ICHP(LL)*ISIGN(1,L)
+              JB = JB + IBAR(LL)*ISIGN(1,L)
+              JBA= JBA+ IBAR(LL)
+              JS = JS + ISTR(LL)*ISIGN(1,L)
+              JC = JC + ICHM(LL)*ISIGN(1,L)
+          ENDIF
+      ENDDO
+      RETURN
+      END
+
+C=======================================================================
+
+      BLOCK DATA KFLV_INI
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      INTEGER KFLV
+      COMMON /S_KFLV/ KFLV(4,43)
+      SAVE
+      DATA (KFLV(1,i),i=1,4) /6,8,10,71/
+      DATA (KFLV(1,i),i=5,43) /6*0,40,13,34,84,6*0,13,14,39,89,6*0,
+     &     34,39,37,87,6*0,84,85,87/      
+      DATA (KFLV(2,i),i=1,4) /7,6,21,59/
+      DATA (KFLV(2,i),i=5,43) /6*0,13,14,39,89,6*0,14,43,36,86,6*0,
+     &     39,36,38,88,6*0,84,85,87/     
+      DATA (KFLV(3,i),i=1,4) /9,22,33,74/
+      DATA (KFLV(3,i),i=5,43) /6*0,34,39,35,87,6*0,39,36,38,88,6*0,
+     &     35,36,49,99,6*0,84,85,87/
+      DATA (KFLV(4,i),i=1,4) /72,60,75,83/
+      DATA (KFLV(4,i),i=5,43) /6*0,84,85,87,0,6*0,85,86,88,0,6*0,
+     &     87,88,99,0,6*0,0,0,0/
+
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_I4FLAV (IFL1, IFL2_A, IRNK, IFL2, KF)
+
+C-----------------------------------------------------------------------
+C.  This subroutine receives as input IFL1 the flavor code
+C.  of a quark (antiquark) and  generates the antiquark (quark)
+C.  of flavor code IFL2 that combine with the original parton
+C.  to compose an hadron of code KF.
+C.
+C.  updated to 4 FLAVORS \FR'13
+C.  Baryon sector is from jetset code
+C.  assuming D*_s+- are J=1, only Charm=1 baryons
+C.
+C.  If (IFL2_A.NE.0) returns an hadron KF composed of IFL1 and IFL2_A
+c
+c     Input: IFL1 - flavor of first quark
+c            IFL2_A - flavor of second quark ( if 0 randomly chosen ) 
+c            IRNK - position in hadron chain
+c     Output: IFL2 - flavor of second quark partner to be passed on
+c             KF - final hadron
+C-----------------------------------------------------------------------
+Cf2py integer,intent(out) :: ifl2
+Cf2py integer,intent(out) :: kf
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)      
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      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
+
+      DIMENSION KFLA(4,4,2), CDIAG(16), KDIAG(8)
+      DIMENSION KBAR(40), CFR(28), KFR(80)
+      SAVE
+      DATA KFLA /0,8,10,71,7,0,22,59,9,21,0,74,72,60,75,0, ! spin-zero mesons
+     +     0,26,29,80,25,0,31,78,28,30,0,76,81,79,77,0/ ! spin-one mesons
+      DATA CDIAG/.5D0,.25D0,.5D0,.25D0,1.D0,.5D0,2.D0,1.D0, !spin-zero diagonal mesons
+     +     .5D0,0.D0,.5D0,0.D0,1.D0,1.D0,2.D0,1.D0/ ! spin-one diagonal mesons
+      DATA KDIAG /6,23,24,73,27,32,33,83/
+      DATA KBAR /13,14,34,35,36,37,38,84,85,86, !jetset -> sibyll part. code map
+     +     87,88,99,3*0,39,89,87,88, 
+     +     40,41,42,43,44,45,46,47,48,49,      
+     +     94,95,96,97,98,99,4*0/ ! spin-3/2 css baryon added to 1/2 css
+      DATA CFR /0.75D0,0.D0,0.5D0,0.D0,0.D0,1.D0,0.1667D0,0.3333D0,
+     $          0.0833D0,0.6667D0,0.1667D0,0.3333D0,-3.D0,1.D0,-2.D0,
+     $          -2.D0,1.D0,0.D0,0.D0,-3.D0,1.D0,1.D0,1.D0,5*0.D0/
+      DATA KFR/0,16,17,19,100,104,109,115,0,26,27,29,122,126,131,137
+     +  ,0,40,42,47,144,158,178,205,0,1,3,6,10,15,21,28,0,0,56,57,240,
+     +  246,256,271,0,0,1,3,6,10,15,21,60,61,64,70,292,307,328,356,
+     +  0,1,3,6,10,15,21,28,16*0/
+
+      IF(NDEBUG.gt.6)
+     &     WRITE(LUN,*)' SIB_FLAV: input:',IFL1, IFL2_A, IRNK, IFL2, KF
+
+c     set rho0 / ( omega, phi ) ratio, i.e. I=1 to I=0
+c     default: 0.5, 0.0 ( phi only created from s-sbar)
+      CDIAG(8+1) =  1.D0-PAR(143) ! u-flavor, Prob. I=1 vs 0
+      CDIAG(8+3) =  1.D0-PAR(143) ! d-flavor, Prob. I=1 vs 0
+
+      XDIQ = 1.D0
+      
+      IARNK = IABS(IRNK)
+      IFLA = IABS(IFL1)
+c     check if diq production allowed?
+c     for strings with leading diquarks the immediate formation of another diquark may be forbidden
+      if(ifla.gt.100.and.mod(ifla,100).lt.10)then
+         XDIQ = PAR(158)
+         ifl1 = mod(ifl1,100)
+         IFLA = IABS(IFL1)
+      endif
+      
+      IFL2A = IFL2_A
+      IF (IFL2A .NE. 0)  THEN
+c     combine existing flavors to hadron
+c     three cases: input diquark (MB=2): need to sample additional quark,
+c                  input quark (MB=0,1): sample quark (0) or diquark (1)?         
+         IFL2A = MOD(IFL2A,100)
+         IFL2 = IFL2A
+         IFLB = IABS(IFL2A)
+         MB = 0
+         IF (IFLB .GT. 10)   MB=1
+         IF (IFLA .GT. 10)   MB=2
+      ELSE
+c     sample new flavor
+         MB = 2
+         IF (IFLA .LT. 10)   THEN
+             MB = 1
+             IF ((1.D0+PAR(1))*S_RNDM(0).LT. 1.D0)  MB=0
+             XDIQ = 1.D0             
+c     suppress baryons close to the string end
+c     IPAR(55) defines largest forbidden rank
+c     PAR(101) is the rejection probability
+             IF (IPAR(54).eq.1)THEN
+                IF(IARNK.le.IPAR(55).and.S_RNDM(1).lt.PAR(101)) MB=0
+             ENDIF
+         ENDIF
+      ENDIF
+
+ 50   IF (MB .EQ. 0)  THEN
+c     flavor open, sample from u,d,s,c
+         IF (IFL2A.EQ.0)THEN
+            IF(IPAR(69).eq.2)THEN
+c     asymmetric between u,d
+               IFL2 = MIN(2,1+INT((2.D0+PAR(115))*S_RNDM(0)))
+               IFLS = 3*INT(INT((2.D0+PAR(2))*S_RNDM(1))*0.5D0)
+               IFL2 = MAX(IFL2,IFLS)
+               IFL2 = ISIGN(IFL2,-IFL1)
+            ELSE
+c     symmetric in u,d
+               IFL2=ISIGN(1+INT((2.D0+PAR(2))*S_RNDM(0)),-IFL1)
+            ENDIF
+            IF(IABS(IFL2).eq.3) THEN
+               IF(S_RNDM(1).lt.PAR(24)*PAR(125))
+     +              IFL2=ISIGN(4,-IFL1)
+            ENDIF
+         ENDIF
+         IFLD = MAX(IFL1,IFL2)
+         IFLE = MIN(IFL1,IFL2)
+         GOTO 100
+      ENDIF
+
+C...  Decide if the diquark must be split
+c     if diquark is from previous splitting (popcorn) do NOT split diquark
+c     jump to sample quark and form baryon      
+      IF (MB .EQ. 2 .AND. IFLA .GT. 100)   THEN
+         IFLA = MOD(IFLA,100)
+           GOTO 200
+      ENDIF
+c     split diquark? if yes sample single flavor and form meson
+c     diquark with any flavor combination is passed on with id+100        
+      IF (MB .EQ. 2 .AND. IFL2A .EQ. 0)   THEN
+          IF (S_RNDM(0) .LT. PAR(8))  THEN
+             MB = 0
+             IFLG = MOD(IFL1,10)
+             IFLH =(IFL1-IFLG)/10
+             IF (S_RNDM(1) .GT. 0.5D0)  THEN
+                IFLDUM = IFLG
+                IFLG = IFLH
+                IFLH = IFLDUM
+             ENDIF
+             IFL11=IFLG
+             IFL22=ISIGN(1+INT((2.D0+PAR(2))*S_RNDM(2)),-IFL1)
+             IFLD = MAX(IFL11,IFL22)
+             IFLE = MIN(IFL11,IFL22)
+             IFL2 = -IFLH*10+IFL22
+             IF (S_RNDM(3) .GT. 0.5D0)  IFL2 = IFL22*10-IFLH
+c     limit diquark splitting to B-M-B (default: yes)             
+             IF(IPAR(92).eq.1) IFL2 = IFL2+ISIGN(100,IFL2)
+          ENDIF
+      ENDIF
+       
+C...Form a meson: consider spin and flavor mixing for the diagonal states
+ 100  IF (MB .EQ. 0)  THEN
+         IF1 = IABS(IFLD)
+         IF2 = IABS(IFLE)
+         IFLC = MAX(IF1,IF2)
+         KSP = INT(PAR(5)+S_RNDM(0))
+         KSP = MIN(KSP,1)
+         IF (IFLC.EQ.3)  KSP = INT(PAR(6)+S_RNDM(1))
+         IF (IFLC.EQ.4)  KSP = INT(PAR(6)+S_RNDM(2))
+         IF (IF1 .NE. IF2)   THEN
+            KF = KFLA(IF1,IF2,KSP+1)
+         ELSE
+            R = S_RNDM(0)
+            JF=1+INT(R+CDIAG(8*KSP+2*IF1-1))+
+     +             INT(R+CDIAG(8*KSP+2*IF1))
+            JF = MIN(JF,4)
+            KF=KDIAG(JF+4*KSP)
+c     suppress neutral pions
+            IF(KF.eq.6)THEN
+               IF(IPAR(82).eq.1.and.
+     +              S_RNDM(kf).lt.PAR(137))then
+                  IF(IFL2A.ne.0) goto 100
+                  IF(IFLA.gt.10) mb = 2                  
+                  GOTO 50
+               endif
+c     suppress neutral pions, depending on rank
+               IF(IPAR(82).eq.2.and.S_RNDM(3).lt.PAR(137).and.
+     +              irnk.gt.0.and.irnk.lt.2) then
+                  IF(IFL2A.ne.0) goto 100
+                  IF(IFLA.gt.10) mb = 2
+                  GOTO 50
+               endif
+            ENDIF
+c     suppress rank1 (leading) omega
+            IF(KF.eq.32)THEN
+               IF(IPAR(83).ne.0.and.
+     +              S_RNDM(kf).lt.PAR(138))then
+                  IF(IFL2A.ne.0) goto 100
+                  IF(IFLA.gt.10) mb = 2                  
+                  GOTO 50
+               endif
+            ENDIF
+         ENDIF
+c         PRINT*,' I4FLAV returns :(IFL1,IFL2,LL)',IFL1,IFL2,KF
+        IF(NDEBUG.gt.6)
+     &     WRITE(LUN,*)' SIB_FLAV: output:',IFL1, IFL2_A, IRNK, IFL2, KF
+         RETURN
+      ENDIF
+
+C...Form a baryon
+ 200  IF (IFL2A .NE. 0)   THEN
+         IF (MB .EQ. 1)  THEN
+            IFLD = IFLA
+            IFLE = IFLB/10
+            IFLF = MOD(IFLB,10)
+         ELSE
+            IFLD = IFLB
+            IFLE = IFLA/10
+            IFLF = MOD(IFLA,10)
+         ENDIF
+         LFR = 3+2*((2*(IFLE-IFLF))/(1+IABS(IFLE-IFLF)))
+         IF(IFLD.NE.IFLE.AND.IFLD.NE.IFLF)  LFR=LFR+1
+      ELSE
+ 110     CONTINUE
+         IF(MB.EQ.1)   THEN     ! generate diquark
+            IFLD = IFLA
+ 120        IFLE = 1+INT((2.D0+PAR(2)*PAR(3))*S_RNDM(0))
+            IFLF = 1+INT((2.D0+PAR(2)*PAR(3))*S_RNDM(1))          
+            IF(IFLD.NE.4)THEN
+               IF(IFLE.EQ.3)THEN 
+                  IF(S_RNDM(2).lt.PAR(24)*PAR(125))
+     +                 IFLE=4
+               ENDIF
+               IF(IFLF.EQ.3.and.IFLE.NE.4)THEN 
+                  IF(S_RNDM(3).lt.PAR(24)*PAR(125))
+     +                 IFLF=4
+               ENDIF
+            ENDIF
+            IF(IFLE.GE.IFLF.AND.PAR(4).LT.S_RNDM(4))    GOTO 120
+            IF(IFLE.LT.IFLF.AND.PAR(4)*S_RNDM(5).GT.1.D0) GOTO 120     
+            IFL2=ISIGN(10*IFLE+IFLF,IFL1)
+         ELSE                   ! generate quark
+            IF(IPAR(69).eq.2)THEN
+c     asymmetric between u,d
+               IFL2 = MIN(2,1+INT((2.D0+PAR(115))*S_RNDM(6)))
+               IFLS = 3*(INT((2.D0+PAR(2))*S_RNDM(7))/2)
+               IFL2 = MAX(IFL2,IFLS)
+               IFL2 = ISIGN(IFL2,IFL1)
+            ELSE
+c     symmetric in u,d
+               IFL2=ISIGN(1+INT((2.D0+PAR(2))*S_RNDM(8)),IFL1)
+            ENDIF
+            IFLE=IFLA/10
+            IFLF=MOD(IFLA,10)
+            IF(IABS(IFL2).EQ.3.and.IFLF.ne.4.and.IFLE.ne.4) THEN
+               IF(S_RNDM(9).lt.PAR(24)*PAR(125))
+     +              IFL2=ISIGN(4,IFL1)
+            ENDIF
+            IFLD=IABS(IFL2)
+         ENDIF
+C...SU(6) factors for baryon formation
+         LFR=3+2*((2*(IFLE-IFLF))/(1+IABS(IFLE-IFLF)))
+         IF(IFLD.NE.IFLE.AND.IFLD.NE.IFLF)  LFR=LFR+1
+         WT = CFR(2*LFR-1)+PAR(7)*CFR(2*LFR)
+         IF(IFLE.LT.IFLF)  WT=WT/3.D0
+         IF (WT.LT.S_RNDM(0)) GOTO 110
+      ENDIF
+
+C...Form Baryon
+      IFLG=MAX(IFLD,IFLE,IFLF)
+      IFLI=MIN(IFLD,IFLE,IFLF)
+      IFLH=IFLD+IFLE+IFLF-IFLG-IFLI
+c      IF(IFLG+IFLH.gt.7) GOTO 200 ! forbid double charmed
+      KSP=2+2*INT(1.D0-CFR(2*LFR-1)+(CFR(2*LFR-1)+PAR(7)*
+     1       CFR(2*LFR))*S_RNDM(0))
+
+C...Distinguish Lambda- and Sigma- like particles
+      IF (KSP.EQ.2.AND.IFLG.GT.IFLH.AND.IFLH.GT.IFLI)  THEN
+         IF(IFLE.GT.IFLF.AND.IFLD.NE.IFLG) KSP=2+INT(0.75D0+S_RNDM(1))
+         IF(IFLE.LT.IFLF.AND.IFLD.EQ.IFLG) KSP=3
+         IF(IFLE.LT.IFLF.AND.IFLD.NE.IFLG) KSP=2+INT(0.25D0+S_RNDM(2))
+      ENDIF
+      KF=KFR(16*KSP-16+IFLG)+KFR(16*KSP-8+IFLH)+IFLI
+      IF(KBAR(KF-40).eq.0)THEN
+         WRITE(LUN,*)' jetset code missing,flvs:',kf,IFLG,IFLH,IFLI
+         CALL SIB_REJECT('SIB_I4FLAV      ')
+      ENDIF
+      KF=KBAR(KF-40)
+      IF(KF.le.14)THEN
+         IF(PAR(106).gt.S_RNDM(3).and.IARNK.le.IPAR(61)) KF=KF-13+51
+     &        +2*INT(PAR(108)+S_RNDM(4))
+      ENDIF
+      KF=ISIGN(KF,IFL1)
+c     if leading baryon, mark quark to supress baryon production in the next iteration
+c     i.e. forbid: Blead-Bbar-B combination
+      if(iarnk.eq.1.and.IPAR(93).eq.1.and.iabs(mod(ifl1,100)).gt.10)then
+         IFL2 = IFL2 + ISIGN(100,IFL2)
+      endif
+
+      IF(NDEBUG.gt.6)
+     &     WRITE(LUN,*)' SIB_FLAV: output:',IFL1, IFL2_A, IRNK, IFL2, KF
+      
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_ICFLAV( Q2, IS0, IS, IFL )
+
+C-----------------------------------------------------------------------
+C     Routine that samples symmetric between the available flavors
+C     Input: Q2 - mass scale, usually filled with s_hat
+C           IS0 - input flavor sign
+C     
+C     Output: IFL - flavor code: u,d,s,c or anti-quarks
+C              IS - flavor sign: quark or anti-quark, if 0 passed then
+C                   a new value is sampled      
+C     Parameters:   kT_s and kT_c i.e. width of the fermi function
+C-----------------------------------------------------------------------
+C     f2py double precision,intent(in) :: q2
+Cf2py integer,intent(in) :: is0
+Cf2py integer,intent(out) :: is
+Cf2py integer,intent(out) :: ifl
+      IMPLICIT NONE
+      DOUBLE PRECISION Q2
+      INTEGER IFL,IS
+      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
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      
+      DOUBLE PRECISION XMS2,XMC2,P_S,P_C,S_RNDM,QMASS,FERMI
+      INTEGER IFL1,IS0
+      
+      IF( NDEBUG.gt.6 )
+     &     WRITE(LUN,*)'  SIB_ICFLAV: input (Q2,IFL,IS):',Q2,IFL,IS
+      
+c     quark or antiquark, sampled if input is zero
+      IF(IS0.eq.0) THEN
+         IS = -1 + 2*INT((2.D0-EPS8)*S_RNDM(IS0))
+      ELSE
+         IS = IS0
+      ENDIF
+      
+c     strange and charm quark masses
+      XMS2 = 4*QMASS(3)**2
+      XMC2 = 4*QMASS(4)**2 * PAR(153)
+      
+c     strange and charm parameters
+      IF(IPAR(89).eq.1)THEN
+c     exponential thresholds
+         P_S = PAR(154) *  EXP(-PAR(151)/Q2)
+         P_C = PAR(156) * EXP(-PAR(152)/Q2)
+      ELSE
+c     fermi func. threshold      
+c     P_s: 0 (u,d only) --> 1 (u,d,s equal) --> 2 (u+d,s+c equal)
+c     P_c: 0 (s only) --> 1 (s,c) equal
+         P_S = PAR(154) * FERMI( Q2, XMS2, -PAR(151) )
+     &        + PAR(155) * FERMI( Q2, XMC2, -PAR(152) )
+         P_C = PAR(156) * 0.5D0*FERMI( Q2, XMC2, -PAR(152) )
+      ENDIF
+      IF(NDEBUG.gt.6)THEN
+         WRITE(LUN,*)'  SIB_ICFLAV: (4*M_S**2, P_S, kT):',
+     &        xms2, P_s, PAR(151)
+         WRITE(LUN,*)'  SIB_ICFLAV: (4*M_C**2, P_C, kT):',
+     &        xmc2, P_c, PAR(152)
+      ENDIF
+
+c     sample u,d,s
+      IFL1 = MIN(INT((2.D0+P_S)*S_RNDM(IS0))+1,3)
+
+c     replace s with c
+      IFL1 = IFL1 + IFL1/3*MIN(INT(P_C+S_RNDM(IS0)),1)
+
+      IFL = IS*IFL1
+
+      IF(NDEBUG.gt.6)
+     &     WRITE(LUN,*)'  SIB_ICFLAV: output (Q2,IFL,IS):',Q2,IFL,IS
+
+      END
+C=======================================================================      
+      
+      SUBROUTINE SIB_DIFF (L0, JDIF1, Ecm, Irec, IREJ)
+
+C-----------------------------------------------------------------------
+C...diffraction dissociation
+C.  INPUT L0 = index of "beam particle"
+C.             the target is assumed to be a proton.
+C.    JDIF1 = 1  "beam diffraction"
+C.          = 2  "target diffraction"
+C.          = 3  "double diffraction"
+C     Irec  flag to avoid recursive calls of SIB_DIFF and SIB_NDIFF
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      DOUBLE PRECISION XM2MIN,ALXMIN,SLOP0,ASLOP,BSLOP,XMASS
+      COMMON /S_DIFMAss/ XM2MIN(6),ALXMIN(6),SLOP0,ASLOP,BSLOP,XMASS(2)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+
+      INTEGER LRNK
+      COMMON /SIB_RNK/ LRNK(8000)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+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
+      
+      DIMENSION P0(5),P1(5),P2(5)
+      
+C     mapping array from particle space to diff. mass
+c     six groups: proton, pion, kaons, hyperons,
+c                 charmed mesons, charmed baryons
+      INTEGER KK,I
+      DIMENSION KK(99)      
+      SAVE
+      DATA (KK(I), I= 1,39) /5*0,3*2,4*3,2*1,6*0,6*2,3,6*2,6*4/      
+      DATA (KK(I), I=40,99) /19*0,5,5,10*0,5,5,0,5,5,11*0,6,6,6,9*0,6/
+
+      if(Ndebug.gt.1) 
+     &  WRITE(LUN,*)' SIB_DIFF: called with (L0,JDIF1,Ecm):',
+     &  L0,JDIF1,Ecm
+
+      if(Irec.eq.1) THEN
+         Ipflag= -1
+         IIFLAG = 1
+c     add incoming target particles
+         PZ = PAWT(ECM,AM(IABS(L0)),AM(13))
+         E2 = SQRT(PZ**2+AM2(13))
+         CALL ADD_PRTN(0.D0,0.D0,-PZ,E2,AM(13),13,-2,0,IREFout)
+
+c     add interactions
+        xjdif = dble(jdif1)
+        CALL ADD_PRTN(0.D0,0.D0,xjdif,ecm,0.D0,1,-1,IREFout,IREF)
+      ENDIF
+      CALL GET_NPP(NPP_0,NPP0_0)
+
+      IDBAD = 0
+      NTRY = 0
+ 20   IREJ = 1
+      CALL INI_PRTN_STCK(NPP_0,NPP0_0)
+
+      IF(NTRY.gt.20*Irec) RETURN ! zero tolerance for recursive calls 
+      NTRY = NTRY + 1
+     
+      LL = L0
+      LA = IABS(L0)
+      XM2MAX = PAR(13)*Ecm*Ecm
+      if(Ndebug.gt.1) 
+     &   WRITE(LUN,*)' SIB_DIFF: max diff. mass (M,Xi):',XM2MAX,PAR(13)
+      
+C...Double diffraction
+      IF (JDIF1 .EQ. 3)   THEN
+         K = MAX(1,2-IBAR(LA)-ISTR(LA)-ICHM(LA))
+         IF(Irec.eq.1) K = KK(LA)
+c     minimal mass if larger than particle mass plus one pion
+         XMMIN = XM2MIN(K)
+         IF(Irec.eq.0) XMMIN = MAX(XMMIN,(AM(LA)+AM(7)+0.02D0)**2)
+         XMB2 = XM2DIS(XMMIN,XM2MAX,1.D0)
+         XMB = SQRT (XMB2)
+         XMT2 = XM2DIS(XM2MIN(1),XM2MAX,1.D0)
+         XMT = SQRT (XMT2)
+         CALL TRANSFONSHELL(ECM,XMB,XMT,XM2MAX,0,P1,P2,IBAD)
+         IF(IBAD.ne.0) goto 20
+         XMASS(1) = XMB
+         IF(Irec.eq.1)THEN
+c     add diffractive system to parton stack
+            CALL ADD_PRTN_4VEC(P1,3,0,0,Iref)
+            CALL ADD_INT_REF(Iref,1)
+            CALL ADD_PRTN_4VEC(P2,-3,0,0,Iref)
+            CALL ADD_INT_REF(Iref,1)
+         ENDIF
+         if(Ndebug.gt.1) 
+     &        write(lun,*)' double-diff.: (kb,xmb,kt,xmt)',LL,xmb,13,xmt
+         CALL DIFDEC (LL, Irec, IDBAD, P1)
+         IF(IDBAD.eq.1)goto 20
+         Ipflag= -2
+         XMASS(2) = XMT
+         CALL DIFDEC (13, Irec, IDBAD, P2)
+         IF(IDBAD.eq.1)goto 20
+         IREJ = 0
+         RETURN
+      ENDIF
+
+C...Single diffraction
+      IF (JDIF1.EQ. 1)  THEN
+         K = MAX(1,2-IBAR(LA))
+         IF(Irec.eq.1) K = KK(LA)
+         EM  = AM(13)
+         EM2 = AM2(13)
+         L = 13
+         ZD = -1.D0
+         if(Ndebug.gt.1) 
+     &        write(lun,*)' single-diff. (beam): (kb)',LL
+      ELSE
+         K = 1
+         EM  = AM(LA)
+         EM2 = AM2(LA)
+         L = LL
+         LL = 13
+         ZD = +1.D0
+         if(Ndebug.gt.1) 
+     &        write(lun,*)' single-diff. (target): (kt)', LL
+
+      ENDIF
+C...Generate the mass of the diffracted system Mx (1/Mx**2 distribution)
+      XMMIN = XM2MIN(K)
+      IF(Irec.eq.0) XMMIN = MAX(XMMIN,(AM(LA)+AM(7)+0.02D0)**2)
+      XM2 = XM2DIS(XMMIN,XM2MAX,1.D0)
+      ALX = log(XM2)
+c... added part
+      X = XM2/XM2MAX*PAR(13)
+      IF (X.GT.PAR(13)-0.05D0) THEN
+        PRO = 0.5D0*(1.D0+(X-PAR(13))/0.05D0)
+        IF (S_RNDM(0).LT.PRO) X = 2.D0*PAR(13)-X
+        XM2 = XM2MAX*X/PAR(13)
+      ENDIF
+c...
+
+      XM = SQRT (XM2)
+      XMB = XM
+      XMT = XM
+      XMASS(1) = XMB
+      XMASS(2) = XMT
+
+C..   kinematics
+      CALL TRANSFONSHELL(ECM,XMB,EM,XM2MAX,0,P1,P2,IBAD)
+      IF(IBAD.ne.0) goto 20
+
+C...Generate the Kinematics of the pseudoelastic hadron
+      NP = NP+1
+      P(NP,4) = P2(4)
+      P(NP,3) = abs(P2(3))*ZD
+      P(NP,1) = p2(1)
+      P(NP,2) = p2(2)
+      P(NP,5) = EM
+      LLIST(NP) = L
+      NPORIG(NP) = IPFLAG
+      niorig(NP) = iiflag
+      LRNK(NP) = 0
+      
+C...Generating the hadronic system recoiling against the produced particle
+      P0(5) = SQRT(XM2)
+      P0(4) = P1(4)
+      DO J=1,3
+         P0(J) = -P(NP,J)
+      ENDDO
+      IF(Irec.eq.1)THEN
+c     add diffractive system to parton stack
+         CALL ADD_PRTN_4VEC(P1,JDIF1,0,0,Iref)
+         CALL ADD_INT_REF(Iref,1)
+         CALL ADD_PRTN_4VEC(P2,int(zd),0,0,Iref)
+         CALL ADD_INT_REF(Iref,1)
+      ENDIF
+      CALL DIFDEC (LL, Irec, IDBAD, P0)
+      IF(IDBAD.eq.1)goto 20
+      IREJ = 0
+
+      END
+      
+C=======================================================================
+      
+      SUBROUTINE DIFF_INI
+
+C----------------------------------------------------------------------
+      IMPLICIT NONE
+      INTEGER I,NPION
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DOUBLE PRECISION XM2MIN,ALXMIN,SLOP0,ASLOP,BSLOP,XMASS
+      COMMON /S_DIFMAss/ XM2MIN(6),ALXMIN(6),SLOP0,ASLOP,BSLOP,XMASS(2)
+      INTEGER NIPAR_max,NPAR_max      
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      SAVE      
+C...  Diffractive mass parameters from Sibyll 2.1
+c     minimal mass
+      DATA (XM2MIN(I), I=1,3) /1.5D0, 0.2D0, 0.6D0/ ! M_x**2(min) GeV**2
+      DATA (ALXMIN(I), I=1,3)   ! log[M_x**2(min)]
+     &     /0.405465D0,-1.6094379D0,-0.5108256D0/ 
+C...  pt spectrum
+      DATA SLOP0 /6.5D0/                 ! b (slope_ for Mx**2 > 5 GeV**2
+      DATA ASLOP /31.10362D0/            ! fit to the slope parameter.
+      DATA BSLOP /-15.29012D0/
+
+C     minimal mass for strange and charmed hadrons: 
+C     m_beam + n_pi * m_pi
+      NPION = IPAR(86)
+      
+C     hyperons (4), lowest mass: lambda
+      XM2MIN(4) = AM2(39) + NPION * AM2(7)
+      ALXMIN(4) = log(XM2MIN(4))
+      
+C     charmed mesons (5), lowest mass: Dmeson
+      XM2MIN(5) = AM2(59) + NPION * AM2(7)
+      ALXMIN(5) = log(XM2MIN(5))
+      
+C     charmed baryons (6), lowest mass: lambda_c
+      XM2MIN(6) = AM2(89) + NPION * AM2(7)
+      ALXMIN(6) = log(XM2MIN(6))
+
+c     debug output
+      IF(NDEBUG.gt.1)THEN
+         WRITE(LUN,*)'DIFF_INI: setting diff. mass parameters'
+         WRITE(LUN,*)' min mass: ', (XM2MIN(I), I=1,6)
+         WRITE(LUN,*)' log min mass: ', (ALXMIN(I), I=1,6)
+      ENDIF
+      
+      END
+
+C=======================================================================      
+
+      DOUBLE PRECISION FUNCTION SIGELA_PN(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy pn/np elastic cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 02/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  pn elastic cross section
+      DATA (PTPP(K),K=    1,   18) /
+     &  -1.0128D+00,-8.8365D-01,-7.8000D-01,-6.8973D-01,-5.7462D-01,
+     &  -4.2138D-01,-2.9384D-01,-1.1581D-01, 1.1309D-01, 5.3273D-01,
+     &   9.6497D-01, 1.4860D+00, 2.0449D+00, 2.6798D+00, 3.5939D+00,
+     &   4.9903D+00, 6.2215D+00, 6.8942D+00/
+      DATA (STPP(K),K=    1,   18) /
+     &1.0001D+02,8.2414D+01,6.5819D+01,5.4660D+01,4.7794D+01,4.0500D+01,
+     &3.5781D+01,3.3208D+01,2.9921D+01,2.3919D+01,1.8633D+01,1.4206D+01,
+     &1.1068D+01,9.0752D+00,7.5167D+00,6.6817D+00,6.8455D+00,6.8568D+00/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 18
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGELA_PN: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigela_pn = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGELA_PN: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigela_pn = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGELA_PP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy pp elastic cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 02/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  pp elastic cross section
+      DATA (PTPP(K),K=    1,   20) /
+     &  -1.0548D+00,-9.9070D-01,-8.2516D-01,-6.8608D-01,-4.7199D-01,
+     &  -2.7085D-01,-1.0784D-01,-7.6152D-03, 1.6806D-01, 3.3154D-01,
+     &   5.4551D-01, 8.2275D-01, 1.3768D+00, 2.0058D+00, 2.9862D+00,
+     &   3.7151D+00, 4.3182D+00, 5.1348D+00, 5.6750D+00, 6.2152D+00/
+      DATA (STPP(K),K=    1,   20) /
+     &4.2555D+01,3.7310D+01,2.8426D+01,2.4873D+01,2.2758D+01,2.2166D+01,
+     &2.3350D+01,2.4450D+01,2.5212D+01,2.4535D+01,2.2927D+01,1.9459D+01,
+     &1.4213D+01,1.0745D+01,8.4602D+00,7.3604D+00,6.8528D+00,6.6836D+00,
+     &6.6836D+00,6.6836D+00/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 20
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGELA_PP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigela_pp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGELA_PP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigela_pp = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGTOT_PN(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy pn and np total cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 02/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  pn total cross section
+      DATA (PTPP(K),K=    1,   17) /
+     &  -1.0129D+00,-8.4520D-01,-7.4136D-01,-5.3626D-01,-3.3210D-01,
+     &  -1.2859D-01, 8.7237D-02, 3.1519D-01, 6.7022D-01, 1.0889D+00,
+     &   1.5714D+00, 2.0792D+00, 2.6760D+00, 3.9453D+00, 4.9226D+00,
+     &   5.6207D+00, 6.7629D+00/
+      DATA (STPP(K),K=    1,   17) /
+     &1.0000D+02,7.9053D+01,6.0976D+01,4.5194D+01,3.6729D+01,3.3429D+01,
+     &3.3142D+01,3.7303D+01,4.0316D+01,4.1607D+01,4.0746D+01,3.9885D+01,
+     &3.8594D+01,3.8307D+01,3.8881D+01,3.9168D+01,4.1320D+01/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 17
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGTOT_PN: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigtot_pn = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGTOT_PN: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigtot_pn = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGTOT_PP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy pp 
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 02/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  pp total cross section
+      DATA (PTPP(K),K=    1,   23) /
+     &  -1.4202D+00,-1.2583D+00,-1.0464D+00,-8.3253D-01,-6.0471D-01,
+     &  -3.6376D-01,-8.4289D-02, 6.8739D-02, 1.9666D-01, 3.2471D-01,
+     &   4.2673D-01, 5.5375D-01, 7.5675D-01, 1.0737D+00, 1.5176D+00,
+     &   2.1393D+00, 2.7230D+00, 3.5353D+00, 4.3223D+00, 5.1728D+00,
+     &   5.7949D+00, 6.2392D+00, 6.9122D+00/
+      DATA (STPP(K),K=    1,   23) /
+     &9.2081D+01,7.0000D+01,4.2437D+01,2.8579D+01,2.3858D+01,2.2335D+01,
+     &2.3858D+01,2.8883D+01,3.5888D+01,4.3807D+01,4.7157D+01,4.7766D+01,
+     &4.7157D+01,4.4569D+01,4.1523D+01,3.9695D+01,3.8782D+01,3.8173D+01,
+     &3.8173D+01,3.8477D+01,3.9391D+01,4.0000D+01,4.1523D+01/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 23
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGTOT_PP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigtot_pp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGTOT_PP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigtot_pp = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGELA_PIPP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy pi+p elastic cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 05/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  pi+p elastic cross section
+      DATA (PTPP(K),K=    1,   24) /
+     &  -9.1117D-01,-8.4887D-01,-7.8656D-01,-6.6196D-01,-5.3736D-01,
+     &  -4.4390D-01,-3.6083D-01,-2.6738D-01,-1.8431D-01,-5.9706D-02,
+     &   5.4515D-02, 1.3758D-01, 2.4142D-01, 3.5564D-01, 4.0756D-01,
+     &   5.1140D-01, 6.9830D-01, 1.0410D+00, 1.6225D+00, 2.2455D+00,
+     &   2.9620D+00, 3.7407D+00, 4.6026D+00, 5.5163D+00/
+      DATA (STPP(K),K=    1,   24) /
+     &7.3812D+01,5.8453D+01,4.5967D+01,3.1602D+01,2.2652D+01,1.6133D+01,
+     &1.2044D+01,9.2818D+00,8.3978D+00,9.9448D+00,1.2818D+01,1.4144D+01,
+     &1.6354D+01,1.8011D+01,1.7238D+01,1.2928D+01,1.0055D+01,7.1823D+00,
+     &5.5249D+00,4.6409D+00,3.6464D+00,2.9834D+00,3.2044D+00,3.0939D+00/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 24
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGELA_PIPP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigela_pipp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGELA_PIPP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigela_pipp = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGTOT_PIPP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy pi+p total cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 05/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  pi+p total cross section
+      DATA (PTPP(K),K=    1,   37) /
+     &  -9.2155D-01,-8.6963D-01,-8.0733D-01,-7.2426D-01,-5.4774D-01,
+     &  -4.7505D-01,-4.1275D-01,-3.6083D-01,-3.0891D-01,-2.2585D-01,
+     &  -1.7393D-01,-8.0473D-02, 2.3363D-02, 1.5835D-01, 2.3104D-01,
+     &   2.9334D-01, 3.1411D-01, 3.5564D-01, 4.1794D-01, 4.2833D-01,
+     &   4.9063D-01, 5.7370D-01, 6.7754D-01, 7.2945D-01, 8.1252D-01,
+     &   8.8521D-01, 9.9943D-01, 1.1033D+00, 1.4044D+00, 1.7782D+00,
+     &   2.1313D+00, 2.6712D+00, 3.2942D+00, 3.8342D+00, 4.6441D+00,
+     &   5.4748D+00, 5.8382D+00/
+      DATA (STPP(K),K=    1,   37) /
+     &7.3812D+01,6.4420D+01,5.0939D+01,3.7790D+01,2.3867D+01,1.8674D+01,
+     &1.6022D+01,1.5138D+01,1.4365D+01,1.5138D+01,1.7127D+01,2.0773D+01,
+     &2.4420D+01,2.7845D+01,3.3591D+01,3.9116D+01,4.0773D+01,4.1215D+01,
+     &4.0000D+01,3.8232D+01,3.3370D+01,3.0608D+01,2.9061D+01,2.8619D+01,
+     &2.9834D+01,3.0829D+01,3.0497D+01,2.9061D+01,2.7514D+01,2.5746D+01,
+     &2.4862D+01,2.3646D+01,2.3094D+01,2.2873D+01,2.3204D+01,2.3978D+01,
+     &2.4420D+01/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 37
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGTOT_PIPP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigtot_pipp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGTOT_PIPP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigtot_pipp = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGELA_PIMP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy pi-p elastic cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 05/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  pi-p elastic cross section
+      DATA (PTPP(K),K=    1,   56) /
+     &  -1.8980D+00,-1.5458D+00,-1.4323D+00,-1.3602D+00,-1.2880D+00,
+     &  -1.2571D+00,-1.1845D+00,-1.1531D+00,-1.1112D+00,-1.0691D+00,
+     &  -1.0063D+00,-9.1252D-01,-8.2935D-01,-7.0477D-01,-6.0118D-01,
+     &  -4.6652D-01,-4.1489D-01,-3.9435D-01,-3.6334D-01,-3.4267D-01,
+     &  -3.0100D-01,-2.6966D-01,-2.4866D-01,-2.1741D-01,-1.6542D-01,
+     &  -1.1357D-01,-9.2992D-02,-8.2923D-02,-4.1875D-02,-1.1054D-02,
+     &   3.0281D-02, 7.2145D-02, 8.2958D-02, 1.1458D-01, 1.5645D-01,
+     &   2.6051D-01, 3.4368D-01, 3.8539D-01, 4.7900D-01, 5.3080D-01,
+     &   6.3455D-01, 7.4898D-01, 9.1527D-01, 1.1023D+00, 1.3412D+00,
+     &   1.5594D+00, 1.9541D+00, 2.4007D+00, 2.7122D+00, 3.0653D+00,
+     &   3.4392D+00, 3.8130D+00, 4.2387D+00, 5.0175D+00, 5.3602D+00,
+     &   5.8897D+00/
+      DATA (STPP(K),K=    1,   56) /
+     &2.9793D+00,9.7103D+00,1.5007D+01,1.9862D+01,2.3393D+01,2.5269D+01,
+     &2.6041D+01,2.4276D+01,2.1076D+01,1.6772D+01,1.3021D+01,1.0372D+01,
+     &9.6000D+00,9.8207D+00,1.1697D+01,1.4234D+01,1.6441D+01,1.8207D+01,
+     &1.9310D+01,2.0083D+01,1.8979D+01,1.7545D+01,1.5779D+01,1.5007D+01,
+     &1.4455D+01,1.5007D+01,1.6441D+01,1.8869D+01,2.2621D+01,2.5159D+01,
+     &2.6703D+01,2.4166D+01,2.0855D+01,1.7214D+01,1.4676D+01,1.2910D+01,
+     &1.2138D+01,1.0814D+01,9.6000D+00,1.0483D+01,1.1145D+01,9.6000D+00,
+     &8.3862D+00,7.5034D+00,6.6207D+00,6.0690D+00,4.9655D+00,4.4138D+00,
+     &4.4138D+00,3.7517D+00,3.3103D+00,3.2000D+00,3.3103D+00,3.3103D+00,
+     &3.3103D+00,3.5310D+00/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 56
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGELA_PIMP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigela_pimp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGELA_PIMP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigela_pimp = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGTOT_PIMP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy pi-p total cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 05/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  pi-p total cross section
+      DATA (PTPP(K),K=    1,   53) /
+     &  -1.9302D+00,-1.8269D+00,-1.6617D+00,-1.5490D+00,-1.4577D+00,
+     &  -1.3146D+00,-1.2630D+00,-1.2211D+00,-1.1686D+00,-1.1364D+00,
+     &  -1.0937D+00,-1.0305D+00,-9.4645D-01,-8.5245D-01,-7.6915D-01,
+     &  -6.7584D-01,-5.2057D-01,-4.3813D-01,-4.0781D-01,-3.6669D-01,
+     &  -3.1507D-01,-2.8372D-01,-2.6240D-01,-2.0995D-01,-1.7861D-01,
+     &  -1.1661D-01,-9.6329D-02,-7.6149D-02,-3.5817D-02,-5.0811D-03,
+     &   1.5958D-02, 5.8095D-02, 1.1175D-01, 1.7444D-01, 1.9540D-01,
+     &   2.8868D-01, 3.7173D-01, 4.5500D-01, 5.4845D-01, 6.4176D-01,
+     &   7.1436D-01, 8.3919D-01, 9.6397D-01, 1.3069D+00, 1.7018D+00,
+     &   2.0447D+00, 2.5952D+00, 3.1249D+00, 3.6130D+00, 4.1426D+00,
+     &   4.8175D+00, 5.3159D+00, 5.9284D+00/
+      DATA (STPP(K),K=    1,   53) /
+     &1.1145D+01,1.5007D+01,2.2179D+01,3.4428D+01,5.0428D+01,6.7862D+01,
+     &7.0952D+01,6.7972D+01,6.3007D+01,5.5393D+01,4.6566D+01,3.9614D+01,
+     &3.1779D+01,2.7586D+01,2.5821D+01,2.6924D+01,3.0676D+01,3.5531D+01,
+     &4.1931D+01,4.5131D+01,4.7448D+01,4.5903D+01,4.1600D+01,3.7517D+01,
+     &3.6083D+01,3.8400D+01,4.2152D+01,4.6676D+01,5.5945D+01,5.9145D+01,
+     &5.7048D+01,5.2414D+01,3.9062D+01,3.6083D+01,3.4538D+01,3.5862D+01,
+     &3.6083D+01,3.4538D+01,3.4538D+01,3.5641D+01,3.6303D+01,3.4538D+01,
+     &3.3214D+01,3.1117D+01,2.8690D+01,2.7145D+01,2.5600D+01,2.4717D+01,
+     &2.4166D+01,2.4166D+01,2.3945D+01,2.4055D+01,2.5159D+01/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 53
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGTOT_PIMP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigtot_pimp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGTOT_PIMP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigtot_pimp = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGELA_KPP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy K+p elastic cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 05/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  K+p elastic cross section
+      DATA (PTPP(K),K=    1,   22) /
+     &  -1.1500D+00,-8.0733D-01,-5.4774D-01,-4.1275D-01,-2.5700D-01,
+     &  -8.0474D-02, 7.5281D-02, 2.5180D-01, 3.7641D-01, 5.3216D-01,
+     &   6.8792D-01, 8.4368D-01, 1.0929D+00, 1.5913D+00, 1.9340D+00,
+     &   2.3182D+00, 2.8166D+00, 3.2215D+00, 3.4708D+00, 3.9276D+00,
+     &   4.6233D+00, 5.5475D+00/
+      DATA (STPP(K),K=    1,   22) /
+     &1.2227D+01,1.2570D+01,1.2499D+01,1.2498D+01,1.2428D+01,1.2012D+01,
+     &1.1183D+01,1.0284D+01,9.4544D+00,8.2796D+00,6.8977D+00,5.9300D+00,
+     &4.6854D+00,3.6461D+00,3.2293D+00,3.0193D+00,2.6704D+00,2.4602D+00,
+     &2.3203D+00,2.0407D+00,2.2426D+00,2.5809D+00/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 22
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGELA_KPP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigela_kpp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGELA_KPP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigela_kpp = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGTOT_KPP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy K+p total cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 05/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  K+p total cross section
+      DATA (PTPP(K),K=    1,   20) /
+     &  -1.0981D+00,-7.1388D-01,-4.7505D-01,-3.1930D-01,-1.7393D-01,
+     &  -8.0474D-02, 2.3363D-02, 9.6049D-02, 1.9989D-01, 3.2449D-01,
+     &   4.6986D-01, 6.2562D-01, 8.3329D-01, 1.0825D+00, 1.4355D+00,
+     &   2.1001D+00, 2.6920D+00, 3.5434D+00, 4.6337D+00, 5.7448D+00/
+      DATA (STPP(K),K=    1,   20) /
+     &1.2158D+01,1.2362D+01,1.2429D+01,1.2428D+01,1.3187D+01,1.4429D+01,
+     &1.5809D+01,1.7327D+01,1.8224D+01,1.8430D+01,1.7945D+01,1.7806D+01,
+     &1.7459D+01,1.7250D+01,1.7041D+01,1.7381D+01,1.7446D+01,1.7853D+01,
+     &1.8881D+01,2.0529D+01/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 20
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGTOT_KPP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigtot_kpp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGTOT_KPP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigtot_kpp = FV(1) 
+
+      END
+
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGELA_KMP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy K-p elastic cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 05/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  K-p elastic cross section
+      DATA (PTPP(K),K=    1,   36) /
+     &  -1.7871D+00,-1.4709D+00,-1.2813D+00,-1.1867D+00,-1.0179D+00,
+     &  -8.8055D-01,-8.0666D-01,-7.9648D-01,-7.7560D-01,-6.5951D-01,
+     &  -5.6450D-01,-4.7995D-01,-3.9539D-01,-3.4256D-01,-2.7894D-01,
+     &  -2.4691D-01,-2.0439D-01,-1.1952D-01,-1.3598D-02, 6.0479D-02,
+     &   1.1311D-01, 1.4462D-01, 2.0784D-01, 2.6053D-01, 3.2387D-01,
+     &   4.4022D-01, 5.5672D-01, 6.9424D-01, 8.6348D-01, 1.2127D+00,
+     &   1.6678D+00, 2.3770D+00, 3.2133D+00, 3.9226D+00, 4.6425D+00,
+     &   5.1612D+00/
+      DATA (STPP(K),K=    1,   36) /
+     &6.8962D+01,5.6135D+01,4.7307D+01,4.0271D+01,3.5582D+01,3.2549D+01,
+     &3.0480D+01,2.6617D+01,2.3858D+01,2.0410D+01,1.7927D+01,1.6549D+01,
+     &1.5308D+01,1.4343D+01,1.5310D+01,1.7794D+01,1.9451D+01,2.1108D+01,
+     &2.1661D+01,2.1386D+01,1.8490D+01,1.6144D+01,1.3386D+01,1.1041D+01,
+     &9.3860D+00,8.4219D+00,8.8376D+00,7.8738D+00,6.4965D+00,4.7080D+00,
+     &3.8869D+00,3.3456D+00,2.6682D+00,2.5409D+00,2.6896D+00,2.6974D+00/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 36
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGELA_KMP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigela_kmp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGELA_KMP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigela_kmp = FV(1) 
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIGTOT_KMP(plab)
+
+C-----------------------------------------------------------------------
+C
+C     low-energy K-p total cross section
+C     (based on spline interpolations)
+C
+C                                              (R.Engel 05/01)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+
+      dimension PTPP(100),STPP(100),DERIV(100,2),Z(10),FV(10),FD(10,2)
+      logical init
+      SAVE
+      data init /.true./
+
+C  K-p total cross section
+      DATA (PTPP(K),K=    1,   43) /
+     &  -1.3500D+00,-1.2345D+00,-9.8216D-01,-8.2491D-01,-7.4143D-01,
+     &  -6.1508D-01,-4.5679D-01,-3.7223D-01,-2.9802D-01,-2.6595D-01,
+     &  -1.7037D-01,-1.0660D-01,-2.1599D-02,-2.5037D-04, 6.3445D-02,
+     &   8.4428D-02, 1.3703D-01, 1.5769D-01, 1.8898D-01, 2.4156D-01,
+     &   3.3667D-01, 3.5796D-01, 4.1106D-01, 5.1700D-01, 5.9099D-01,
+     &   6.5431D-01, 6.9651D-01, 7.7067D-01, 8.5538D-01, 9.6104D-01,
+     &   1.1303D+00, 1.3209D+00, 1.4266D+00, 1.5853D+00, 1.8075D+00,
+     &   1.9769D+00, 2.4743D+00, 3.0353D+00, 3.5222D+00, 4.0515D+00,
+     &   4.6550D+00, 5.1949D+00, 5.7455D+00/
+      DATA (STPP(K),K=    1,   43) /
+     &9.7669D+01,8.8840D+01,7.2700D+01,5.8076D+01,4.6625D+01,4.0142D+01,
+     &3.5315D+01,3.4074D+01,3.5041D+01,3.7939D+01,4.0838D+01,4.3185D+01,
+     &4.6084D+01,4.7740D+01,4.9397D+01,4.7603D+01,4.4430D+01,3.9601D+01,
+     &3.5186D+01,3.1876D+01,3.0221D+01,3.1325D+01,3.2982D+01,3.3674D+01,
+     &3.2571D+01,3.0640D+01,2.9261D+01,2.9814D+01,2.9953D+01,2.8023D+01,
+     &2.6922D+01,2.6924D+01,2.5684D+01,2.4859D+01,2.4034D+01,2.3761D+01,
+     &2.2112D+01,2.1155D+01,2.0472D+01,2.0480D+01,2.0627D+01,2.0773D+01,
+     &2.1472D+01/
+
+
+C  initialize cross section tables
+
+      if(init) then
+        N = 43
+        M = 0
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,-1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)') 
+     &      ' SIGTOT_KMP: spline initialization failed: ',IERR
+          stop
+        endif
+        NXY_save = NXY
+        init = .false.
+      endif
+
+C  spline interpolation 
+
+      sigtot_kmp = 0.D0
+      Z(1) = log(plab)
+
+      if((Z(1).gt.PTPP(1)).and.(Z(1).lt.PTPP(N))) then
+        M = 1
+        NXY = NXY_save
+        CALL SPLIN3(PTPP,STPP,DERIV,N,100,Z,FV,FD,M,10,1)
+        if(IERR.ne.0) then
+          write(6,'(1x,a,i6)')
+     &      ' SIGTOT_KMP: spline interpolation failed: ',IERR
+          return
+        endif
+      else
+        return
+      endif
+
+      sigtot_kmp = FV(1) 
+
+      END
+
+
+C=======================================================================
+
+      SUBROUTINE SPLIN3(X,Y,DERIV,N,NC,Z,FVALUE,FDERIV,M,MC,IOP)
+
+C-----------------------------------------------------------------------
+C
+C     CERN LIBRARY PROGRAM NO E-209.
+C
+C     REVISED VERSION JULY 1973.
+C
+C     CHANGED BY R.ENGEL (10/10/93) TO CONFORM WITH F77 STANDARD
+C
+C     PURPOSE = TO COMPUTE A NATURAL SPLINE APPROXIMATION OF THIRD ORDER
+C               FOR A FUNCTION Y(X) GIVEN IN THE N POINTS (X(I),Y(I)) ,
+C               I=1(1)N.
+C
+C     PARAMETERS (IN LIST).
+C
+C     X       = AN ARRAY STORING THE INPUT ARGUMENTS.DIMENSION X(N).
+C     Y       = AN ARRAY STORING THE INPUT FUNCTION VALUES.THE ELEMENT
+C               Y(I) REPRESENT THE FUNCTION VALUE Y(X) FOR X=X(I).
+C     DERIV   = AN ARRAY USED FOR STORING THE COMPUTED DERIVATIVES OF
+C               THE FUNCTION Y(X).IN DERIV(I,1) AND DERIV(I,2) ARE STOR-
+C               ED THE FIRST-AND SECOND ORDER DERIVATIVES OF Y(X) FOR
+C               X=X(I) RESPECTIVELY.
+C     N       = NUMBER OF INPUT FUNCTION VALUES.
+C     NC      = ARRAY DERIV IS DIMENSIONED DERIV(NC,2) IN CALLING
+C               PROGRAM.
+C     Z       = AN ARRAY STORING THE ARGUMENTS FOR THE INTERPOLATED
+C               VALUES TO BE COMPUTED.
+C     FVALUE  = AN ARRAY STORING THE COMPUTED INTERPOLATED VALUES.
+C               FVALUE(J) REPRESENT THE FUNCTION VALUE FVALUE(Z) FOR
+C               Z=Z(J).
+C     FDERIV    = AN ARRAY USED FOR STORING THE DERIVATIVES OF THE COM-
+C               PUTED INTERPOLATED VALUES.EXPLANATION AS FOR DERIV.
+C     M       = NUMBER OF INTERPOLATED VALUES TO BE COMPUTED.
+C     MC      = ARRAY FDERIV IS DIMENSIONED FDERIV(MC,2) IN CALLING
+C               PROGRAM.
+C     IOP     = OPTION PARAMETER.FOR IOP.LE.0 THE DERIVATIVES FOR EACH
+C               SUB-INTERVAL IN THE SPLINE APPROXIMATION ARE COMPUTED.
+C                                  IOP=-1, THE SECOND ORDER END-POINT
+C                                          DERIVATIVES ARE COMPUTED BY
+C                                          LINEAR EXTRAPOLATION.
+C                                  IOP=0 , THE SECOND ORDER END-POINT
+C                                          DERIVATIVES ASSUMED TO BE GI-
+C                                          VEN (SEE COMMON /SPAPPR/).
+C                                  IOP=1 , COMPUTE SPLINE APPROXIMATIONS
+C                                          FOR THE ARGUMENTS GIVEN IN
+C                                          THE ARRAY Z,THE DERIVATIVES
+C                                          BEEING ASSUMED TO HAVE BEEN
+C                                          CALCULATED IN A PREVIOUS CALL
+C                                          ON THE ROUTINE.
+C
+C     PARAMETERS (IN COMMON BLOCK / SPAPPR /).
+C
+C     SECD1   = VALUE OF THE SECOND DERIVATIVE D2Y(X)/DX2 FOR THE INPUT
+C               ARGUMENT X=X(1).
+C     SECDN   = VALUE OF THE SECOND DERIVATIVE D2Y(X)/DX2 FOR THE INPUT
+C               ARGUMENT X=X(N).
+C               NB. VALUES HAVE TO BE ASSIGNED TO SECD1 AND SECDN IN THE
+C               CALLING PROGRAM.IF A NATURAL SPLINE FIT IS WANTED PUT
+C               SECD1=SECDN=0.
+C     VOFINT  = COMPUTED APPROXIMATION FOR THE INTEGRAL OF Y(X) TAKEN
+C               FROM X(1) TO X(N).
+C     IERR    = ERROR PARAMETER.IERR=0,NO ERRORS OCCURED.
+C                               IERR=1,THE NUMBER OF POINTS TOO SMALL
+C                                      I.E.N LESS THAN 4.
+C                               IERR=2,THE ARGUMENTS X(I) NOT IN INCREA-
+C                                      SING ORDER.
+C                               IERR=3,ARGUMENT TO BE USED IN INTERPOLA-
+C                                      TION ABOVE RANGE.
+C                               IERR=4,ARGUMENT TO BE USED IN INTERPOLA-
+C                                      TION BELOW RANGE.
+C     NXY     = N (SEE ABOVE),HAS TO BE STORED FOR ENTRIES CORRESPONDING
+C               TO IOP=1.
+C
+C**********************************************************************
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C
+      DIMENSION X(NC) , Y(NC) , DERIV(NC,2) , Z(MC) , FVALUE(MC) ,
+     1          FDERIV(MC,2)
+C
+      COMMON / SPAPPR / SECD1 , SECDN , VOFINT , IERR , NXY
+      SAVE
+      DATA THIRD , SIXTH / .333333333333333D0 , .166666666666667D0 /
+C
+C 1000 
+      IF (IOP.GT.0) GO TO 1110
+C
+      IERR=0
+C
+C     CHECK IF ENOUGH DATA-POINTS ARE AVAILABLEI.E. IF N LESS THAN 4 NO
+C     THIRD ORDER SPLINE APPROXIMATION IS POSSIBLE.
+C
+      IF (N.GE.4) GO TO 1010
+C
+      IERR=1
+      GO TO 2000
+C
+C     START CALCULATION OF COEFFICIENTS TO BE USED IN THE SYSTEM OF EQU-
+C     ATIONS FOR THE SECOND ORDER DERIVATIVES OF Y(X).
+C
+ 1010 IF (IOP.NE.-1) GO TO 1015
+      SECD1=0.D0
+      SECDN = 0.D0
+      BET1=1.D0/(1.D0+0.5D0*(X(2)-X(1))/(X(3)-X(2)))
+      ALF1=BET1*(1.D0- ((X(2)-X(1))/(X(3)-X(2)))**2)
+      BETN=1.D0/(1.D0+0.5D0*(X(N)-X(N-1))/(X(N-1)-X(N-2)))
+      ALFN=BETN*(1.D0- ((X(N)-X(N-1))/(X(N-1)-X(N-2)))**2)
+C
+ 1015 DERIV(1,2)=SECD1
+      DERIV(N,2)=SECDN
+      DERIV(1,1)=0.D0
+      DXPLUS=X(2)-X(1)
+C
+C     CHECK IF ARGUMENTS ARE IN INCREASING ORDER.IF NOT PRINT ERROR
+C     MESSAGE AND STOP.
+C
+      IF ( DXPLUS.GT.0.D0) GO TO 1020
+      IN=1
+      IERR=2
+      GO TO 2000
+C
+ 1020 DYPLUS=(Y(2)-Y(1))/DXPLUS
+      IU=N-1
+      DO 1040 I=2,IU
+      DXMIN =DXPLUS
+      DYMIN =DYPLUS
+      DXPLUS=X(I+1)-X(I)
+C
+C     CHECK IF ARGUMENTS ARE IN INCREASING ORDER.IF NOT PRINT ERROR
+C     MESSAGE AND STOP.
+C
+      IF (DXPLUS.GT.0.D0) GO TO 1030
+C
+      IN=I
+      IERR=2
+      GO TO 2000
+C
+ 1030 DXINV =1.D0/(DXPLUS+DXMIN)
+      DYPLUS=(Y(I+1)-Y(I))/DXPLUS
+      DIVDIF=DXINV*(DYPLUS-DYMIN)
+      ALF   =0.5D0*DXINV*DXMIN
+      BET   =0.5D0-ALF
+C
+      IF (I.EQ.2)  DIVDIF=DIVDIF-THIRD*ALF*DERIV(1,2)
+      IF (I.EQ.IU) DIVDIF=DIVDIF-THIRD*BET*DERIV(N,2)
+      IF (I.EQ.2) ALF=0.D0
+C
+      IF (IOP.NE.-1) GO TO 1035
+      IF (I.NE.2) GO TO 1032
+      BET=BET*ALF1
+      DIVDIF=DIVDIF*BET1
+      GO TO 1035
+ 1032 IF (I.NE.IU) GO TO 1035
+      ALF=ALF*ALFN
+      DIVDIF=DIVDIF*BETN
+C
+ 1035 DXINV =1.D0/(1.D0+ALF*DERIV(I-1,1))
+      DERIV(I,1)=-DXINV*BET
+      DERIV(I,2)= DXINV*(3.D0*DIVDIF-ALF*DERIV(I-1,2))
+ 1040 CONTINUE
+C
+C     COMPUTE THE SECOND DERIVATIVES BY BACKWARDS RECURRENCE RELATION.
+C     THE SECOND ORDER DERIVATIVES FOR X=X(N-1) ALREADY COMPUTED.
+C
+C 1050 
+      DO 1060 I=2,IU
+      J=N-I
+      DERIV(J,2)=DERIV(J,1)*DERIV(J+1,2)+DERIV(J,2)
+ 1060 CONTINUE
+C
+      IF (IOP.NE.-1) GO TO 1070
+      DERIV(1,2)=((X(3)-X(1))/(X(3)-X(2)))*DERIV(2,2)-((X(2)-X(1))/(X(3)
+     $-X(2)))*DERIV(3,2)
+      DERIV(N,2)=-((X(N)-X(N-1))/(X(N-1)-X(N-2)))*DERIV(N-2,2)+((X(N)-X(
+     $N-2))/(X(N-1)-X(N-2)))*DERIV(N-1,2)
+C
+C     CALCULATION OF THE SECOND ORDER DERIVATIVES FINISHED.START CAL-
+C     CULATION OF THE FIRST ORDER DERIVATIVES AND OF THE INTEGRAL.
+C
+ 1070 VOFINT=0.D0
+      DO 1080 I=1,IU
+      DXPLUS=X(I+1)-X(I)
+      DYPLUS=Y(I+1)-Y(I)
+      DIVDIF=DYPLUS/DXPLUS
+      DERIV(I,1)=DIVDIF-DXPLUS*(THIRD*DERIV(I,2)+SIXTH*DERIV(I+1,2))
+      DXPLUS=0.5D0*DXPLUS
+      VOFINT=VOFINT+DXPLUS*(Y(I+1)+Y(I)-THIRD*(DERIV(I+1,2)+DERIV(I,2))*
+     $DXPLUS**2)
+ 1080 CONTINUE
+C
+C     COMPUTE THE LAST FIRST ORDER DERIVATIVE.
+C
+      DXPLUS=X(N)-X(N-1)
+      DYPLUS=Y(N)-Y(N-1)
+      DIVDIF=DYPLUS/DXPLUS
+      DERIV(N,1)=DIVDIF+DXPLUS*(SIXTH*DERIV(N-1,2)+THIRD*DERIV(N,2))
+C
+C     CALCULATION OF FIRST ORDER DERIVATIVES AND INTEGRAL FINISHED.
+C
+C     SET VALUE OF N IN COMMON BLOCK / SPAPPR /.
+C
+      NXY=N
+C
+C     COMPUTE INTERPOLATED VALUES IF ANY.
+C
+ 1110 IF (M.LT.1) RETURN
+C
+      XL=X(1)
+      XU=X(2)
+      IP=3
+      IL=0
+C
+C 1120 
+      DO 1160 J=1,M
+      ARG=Z(J)
+      IF (ARG.GT.XU) GO TO 1170
+      IF (ARG.LT.XL) GO TO 1190
+C
+C     ARGUMENT IN CORRECT RANGE.CHECK IF POLYNOMIAL COEFFICIENTS HAVE
+C     TO BE CALCULATED.
+C
+C 1130 
+      IF (IL.GT.0) GO TO 1150
+C
+C     COMPUTE POLYNOMIAL COEFFICIENTS.
+C
+ 1140 II=IP-2
+      A0=Y(II)
+      A1=DERIV(II,1)
+      A4=DERIV(II,2)
+      A6=(DERIV(II+1,2)-A4)/(XU-XL)
+      A2=0.5D0*A4
+      A3=SIXTH*A6
+      A5=0.5D0*A6
+      IL=1
+C
+C     CALCULATION OF POLYNOMIAL COEFFICIENTS FINISHED.COMPUTE VALUES.
+C
+ 1150 ARG=ARG-XL
+      FVALUE(J)=((A3*ARG+A2)*ARG+A1)*ARG+A0
+      FDERIV(J,1)=(A5*ARG+A4)*ARG+A1
+      FDERIV(J,2)=A6*ARG+A4
+C
+ 1155 CONTINUE
+      GOTO 1160
+C
+C     RANGE MOVING
+C
+C
+C     ARGUMENT ABOVE PRESENT RANGE.SHIFT RANGE UPWARDS.
+C
+ 1170 IF(IP.GT.NXY) GO TO 1185
+      IPP=IP
+      DO 1180 I=IPP,NXY
+      IF (ARG.GT.X(I)) GO TO 1180
+      XL=X(I-1)
+      XU=X(I)
+      IP=I+1
+      IL=0
+      GO TO 1140
+C
+ 1180 CONTINUE
+C
+C     ARGUMENT  OUT OF RANGE,I.E. ARG GREATER THAN X(N).
+C
+ 1185 IERR=3
+      IP=NXY+1
+      GO TO 2010
+C
+C     ARGUMENT BELOW PRESENT RANGE.SHIFT DOWNWARDS.
+C
+ 1190 IPP=IP
+      DO 1200 I=1,IPP
+      II=IP-I-2
+      IF (II.EQ.0) GO TO 1210
+      IF (ARG.LT.X(II)) GO TO 1200
+      XL=X(II)
+      XU=X(II+1)
+      IP=II+2
+      IL=0
+      GO TO 1140
+C
+ 1200 CONTINUE
+C
+C     ARGUMENT OUT OF RANGE,I.E. ARG LESS THAN X(1).
+C
+ 1210 IERR=4
+      IP=3
+      GO TO 2010
+C
+ 2010 WRITE(6,3000)  IERR , ARG
+C
+      FVALUE(J)=0.D0
+      FDERIV(J,1)=0.D0
+      FDERIV(J,2)=0.D0
+C
+      II=IP-2
+      XL=X(II)
+      XU=X(II+1)
+      IL=0
+      GO TO 1155
+C
+C
+C     END OF INTERPOLATION LOOP
+C
+ 1160 CONTINUE
+C
+C     CALCULATION OF INTERPOLATED VALUES FINISHED.
+C
+      RETURN
+C
+C     PRINT ERROR MESSAGES.
+C
+ 2000 IF (IERR.EQ.1) WRITE(6,3000)  IERR
+      IF (IERR.EQ.2) WRITE(6,3000)  IERR , X(IN) , X(IN+1)
+      RETURN
+C
+ 3000 FORMAT(//5X,'*** SUBROUTINE SPLIN3 ERROR NO ',I2,' ***',
+     $       2(4X,E21.14))
+C
+      END
+C=======================================================================
+
+      SUBROUTINE FRAG_VLNCE(IDX,LBAD)
+
+C-----------------------------------------------------------------------
+C     routine that fragments a quark - quark system               \FR'14
+C
+C     INPUT: IDX : parton stack index of central string
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+      INTEGER IDX,LBAD
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+C     parameters that represent: NW: max. number of wounded nucleons,
+C     NS,NH: max. number of soft and hard interactions
+c      PARAMETER (NW_max = 20)
+C     The COMMON block /S_CHIST/ contains information about the
+C     the structure of the  generated event:
+C     NWD   = number of wounded nucleons
+C     NJET = total number of hard interactions
+C     NSOF = total number of soft interactions
+C     NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C     NNJET (1:NW) = number of minijets produced in each interaction 
+C     JDIF(1:NW) = diffraction code 
+C                  0 : non-diff,
+C                  1 : beam-diff
+C                  2 : target-diff
+C                  3 : double-diff
+      INTEGER NNSOF,NNJET,JDIF,NWD,NJET,NSOF
+      COMMON /S_CHIST/ NNSOF(NW_max),NNJET(NW_max),
+     &     JDIF(NW_max),NWD,NJET,NSOF
+
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+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
+
+      DOUBLE PRECISION PST,PBM,PTG,PSTH,P1,P2,GABE,EE,
+     &     PAR1_def,PAR24_def,PX1,PY1,PX2,PY2,GAM,BET,P1TOT,P2TOT,
+     &     SIF,COF,COD,SID,ANORF,PZ
+      DIMENSION PST(5),PBM(5),PTG(5),PSTH(5),P1(4),P2(4),GABE(4)
+      INTEGER LSTH,IPID,IBMST,ITGST,ISTH,IFLB,IFLT,IST,I,IFBAD,JJ,
+     &     NOLD,II,K,J
+      SAVE
+      
+      LBAD = 2
+      LSTH = 0
+      
+c     references are:
+c     string --> bm-parton --> tg-parton (--> merged string/hadron)
+c     read string 4momentum from stack
+      CALL RD_PRTN_4VEC(IDX,PST,IPID,IBMST)
+      CALL RD_PRTN_4VEC(IBMST,PBM,IFLB,ITGST)
+      CALL RD_PRTN_4VEC(ITGST,PTG,IFLT,ISTH)
+
+C     kinematic variables
+      EE = PST(5)            ! string mass
+      
+      IF(NDEBUG.gt.1) WRITE(LUN,*)' FRAG_VLNCE: IDX,EE,IFLB,IFLT',
+     &     IDX,EE,IFLB,IFLT
+
+      IF(IDX.ne.ISTH) then
+c     read merged string and add hadron to final particle stack..
+         CALL RD_PRTN_4VEC(ISTH,PstH,LSTH,IST)
+         IF(NDEBUG.gt.1) WRITE(LUN,*)' FRAG_VLNCE: found merged string',
+     &        LSTH,(PSTH(I),I=1,5)         
+         IF(IDX.ne.IST) then
+            write(lun,*) ' FRAG_VLNCE: reference loop broken!' , IDX
+            CALL SIB_REJECT('FRAG_VLNCE      ')
+         endif
+         NP = NP + 1
+         DO I=1,4
+            P(NP,I) = PST(I)
+         ENDDO
+         P(NP,5) = AM(IABS(LSTH))
+         LLIST(NP) = LSTH
+         NPORIG(NP) = IPFLAG*2+KINT
+         niorig(NP) = iiflag
+         LBAD = 0
+         RETURN
+      ENDIF
+
+c     baryon production setup
+      PAR1_def = PAR(1)
+      if( NSOF+NJET.gt.0) then
+         PAR(1)= PAR(15)
+      else
+         PAR(1)= PAR(14)
+      endif
+
+c     charm fractions in different parameterizations
+      PAR24_def = PAR(24)
+      IF(IPAR(15).gt.2.and.IPAR(15).ne.7.and.IPAR(15).lt.12)THEN
+         PAR(24) = PAR(25)*EXP(-PAR(26)/EE)
+      ENDIF
+
+      IF(NDEBUG.gt.1)
+     &     WRITE(LUN,*)' FRAG_VLNCE: parameters (CHM,DIQ,STR,VEC,POP)',
+     &     PAR(24),PAR(1),PAR(2),PAR(5),PAR(8)
+
+      NOLD=NP
+      IF(IPAR(38).eq.1.or.IPAR(38).eq.2)THEN
+C...  rotate strings instead of attaching all pt to string end hadrons
+         PX1 = 0.D0
+         PY1 = 0.D0
+         PX2 = 0.D0
+         PY2 = 0.D0
+      ELSEIF(IPAR(38).eq.0.or.IPAR(38).eq.3)THEN
+c     assign pt to hadrons at string end (old model)
+         PX1 = PBM(1)
+         PY1 = PBM(2)
+         PX2 = PTG(1)
+         PY2 = PTG(2)
+         GAM = PST(4)/EE
+         BET = PST(3)/PST(4)
+      ENDIF         
+
+C...  fragment strings in string restframe
+      CALL STRING_FRAG_4FLV
+     &     (EE,IFLB,IFLT,PX1,PY1,PX2,PY2,IFBAD,1)
+
+      PAR(24) = PAR24_def
+      PAR(1) = PAR1_def
+      KINT= 0
+      IF (IFBAD .EQ. 1) then
+         if(Ndebug.gt.1) 
+     &        WRITE(LUN,*)' STRING_FRAG: rejection (Ncall):',Ncall
+         RETURN
+      ENDIF
+
+C...  rotate and boost string
+      IF(IPAR(38).eq.1.or.IPAR(38).eq.2)THEN
+C     boost quark momentum to string center-of-mass 
+c     to calculate rotation angles in string center-of-mass
+         do jj=1,3
+            gabe(jj) = PST(jj)/PST(5)
+         enddo
+         GABE(4) = PST(4)/PST(5)
+         CALL SIB_ALTRA(gabe(4),-gabe(1),-gabe(2),-gabe(3),
+     &        PBM(1),pbm(2),pbm(3),pbm(4),
+     &        P1TOT,p1(1),p1(2),p1(3),p1(4))
+         CALL SIB_ALTRA(gabe(4),-gabe(1),-gabe(2),-gabe(3),
+     &        PTG(1),pTG(2),ptg(3),ptg(4),
+     &        P2TOT,p2(1),p2(2),p2(3),p2(4))
+
+c     should be back-to-back...
+         IF(ndebug.gt.1)THEN
+            write(lun,*)
+     &      ' FRAG_VLNCE: string c.m. momentum, parton 1 (Pabs,P(i)):' ,
+     &           P1TOT, (P1(j),j=1,4)
+            write(lun,*)
+     &      ' FRAG_VLNCE: string c.m. momentum, parton 2 (Pabs,P(i)):' ,
+     &           P2TOT, (P2(j),j=1,4)
+            write(lun,*) '  partons should be back to back...'
+         ENDIF
+c     rotation factors
+         COD= P1(3)/P1TOT
+         SID= DSQRT(P1(1)**2+P1(2)**2)/P1TOT
+         COF=1.D0
+         SIF=0.D0
+         IF(P1TOT*SID.GT.EPS5) THEN
+            COF=P1(1)/(SID*P1TOT)
+            SIF=P1(2)/(SID*P1TOT)
+            ANORF=DSQRT(COF*COF+SIF*SIF)
+            COF=COF/ANORF
+            SIF=SIF/ANORF
+         ENDIF
+c     rotate string final state
+         DO K=NOLD+1,NP
+            CALL SIB_TRANI(P(K,1),P(k,2),P(k,3),cod,sid,cof,sif
+     &           ,P2(1),P2(2),P2(3))
+            do ii=1,3
+               P(K,ii)=P2(ii)
+            enddo
+         ENDDO
+c     boost to hadron - hadron center-of-mass
+         DO K=NOLD+1,NP
+            CALL SIB_ALTRA(gabe(4),gabe(1),gabe(2),
+     &           gabe(3),P(k,1),p(k,2),p(k,3),p(k,4),
+     &           P1TOT,p2(1),p2(2),p2(3),p2(4))
+            do ii=1,4
+               P(K,ii)=P2(ii)
+            enddo
+         ENDDO
+      ELSEIF(IPAR(38).eq.0.or.IPAR(38).eq.3)THEN
+C...  boost string
+         DO K=NOLD+1,NP
+            PZ = P(K,3)
+            P(K,3) = GAM*(PZ+BET*P(K,4))
+            P(K,4) = GAM*(P(K,4)+BET*PZ)
+         ENDDO
+      ENDIF
+      LBAD = 0
+      END
+
+
+C-----------------------------------------------------------------------
+C     fragmentation functions in SIBYLL                        \FR'14
+C=======================================================================
+
+      FUNCTION ZDIS_4FLV (IFL1,IFL2, XMT2)
+
+C-----------------------------------------------------------------------
+C...z distribution
+c     includes charmed fragmentation (Peterson/SLAC)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DOUBLE PRECISION FAin, FB0in
+      COMMON /S_CZDIS/ FAin, FB0in
+
+      DOUBLE PRECISION FAs1, fAs2
+      COMMON /S_CZDISs/ FAs1, fAs2
+      DOUBLE PRECISION ZDMAX, EPSI
+      COMMON /S_CZDISc/ ZDMAX, EPSI
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+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
+
+      IAFL1 = IABS(mod(IFL1,100))
+      IAFL2 = IABS(mod(IFL2,100))
+c     SLAC-Peterson fragmentation function for charm
+      IF ((IAFL1/10.eq.4.or.mod(IAFL1,10).eq.4)
+     +     .or.(IAFL2/10.eq.4.or.mod(IAFL2,10).eq.4))THEN
+ 90      z = max(S_RNDM(0),1.e-8)
+         tcp = zmefn(z,epsi)/zdmax
+         if (tcp .lt. S_RNDM(1)) goto 90
+         zdis_4flv = z
+      else                      
+c     original lund function, non charm
+         fa=fain                ! lund parameter a
+         fb0=fb0in              ! lund parameter b
+c     parameters for hard scattering (gluon) fragmentation
+         IF(IPAR(6).eq.2)THEN
+            fa= PAR(18)
+            fb0= PAR(19)
+         ENDIF   
+c     special parameters for strange fragmentation
+c     only active for baryon beams (or K0,K0bar)
+C     DH   correction  may 10-1996
+         if (iabs(kb).ge.13) then ! baryons only
+            if (iafl2.eq.3)  fa=fain+fas2
+            if (iafl1.eq.3)  fa=fain+fas1
+         endif
+c     special parameters for baryon fragmentation
+c     similar to pythia
+         IF((IAFL1+IAFL2).gt.10.and.
+     &        (IPAR(36).eq.1.or.IPAR(20).eq.3))then
+            fa = fain + PAR(45)
+            fb0 = PAR(60)
+         ENDIF        
+         FB = FB0*XMT2
+         IF(FA.GT.0.01D0.AND.ABS(FA-1.D0)/FB.LE.0.01D0)
+     +         ZMAX=FB/(1.D0+FB)+(1.D0-FA)*FB**2/(1.D0+FB)**3
+         IF(FA.GT.0.01D0.AND.ABS(FA-1.D0)/FB.GT.0.01D0)
+     +     ZMAX=0.5D0*(1.D0+FB-DSQRT((1.D0-FB)**2+4.D0*FA*FB))/(1.D0-FA)
+         IF(ZMAX.LT.0.1D0)  ZDIV=2.75D0*ZMAX
+         IF(ZMAX.GT.0.85D0) 
+     +        ZDIV=ZMAX-0.6D0/FB**2+(FA/FB)*dLOG((0.01D0+FA)/FB)
+C...  Choice if z, preweighted for peaks at low or high z
+ 100     Z=S_RNDM(0)
+         IDIV=1
+         FPRE=1.D0
+         IF (ZMAX.LT.0.1D0)  THEN
+            IF(1.D0.LT.S_RNDM(1)*(1.D0-dLOG(ZDIV)))  IDIV=2
+            IF (IDIV.EQ.1)  Z=ZDIV*Z
+            IF (IDIV.EQ.2)  Z=ZDIV**Z
+            IF (IDIV.EQ.2)  FPRE=ZDIV/Z
+         ELSEIF (ZMAX.GT.0.85D0)  THEN
+            IF(1.D0.LT.S_RNDM(2)*(FB*(1.D0-ZDIV)+1.D0)) IDIV=2
+            IF (IDIV.EQ.1)  Z=ZDIV+dLOG(Z)/FB
+            IF (IDIV.EQ.1)  FPRE=dEXP(FB*(Z-ZDIV))
+            IF (IDIV.EQ.2)  Z=ZDIV+Z*(1.D0-ZDIV)
+         ENDIF
+C...weighting according to the correct formula
+         IF (Z.LE.FB/(50.D0+FB).OR.Z.GE.1.D0)  GOTO 100
+         FVAL=(ZMAX/Z)*dEXP(FB*(1.D0/ZMAX-1.D0/Z))
+         IF(FA.GT.0.01D0)  FVAL=((1.D0-Z)/(1.D0-ZMAX))**FA*FVAL
+         IF(FVAL.LT.S_RNDM(3)*FPRE)  GOTO 100
+         ZDIS_4FLV=Z
+         
+      ENDIF
+      
+      RETURN
+      END
+C=======================================================================
+      
+      SUBROUTINE ZNORMAL
+
+C-----------------------------------------------------------------------
+C...  normalisation for Peterson/SLAC frag. func
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DOUBLE PRECISION ZDMAX, EPSI
+      COMMON /S_CZDISc/ ZDMAX, EPSI
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      SAVE
+
+c     get the maximum zmefn value first for normalisation
+      jmax = 1000
+      zdmax = 1.D-10
+
+      DO j = 1, jmax
+         z = dble(j)/dble(jmax+1)
+         zdmax = max(zdmax, zmefn(z,epsi))
+      enddo
+      if (ndebug .gt. 0) WRITE(LUN,*)' ZDMAX,EPS:',zdmax, epsi
+      RETURN
+      END
+C=======================================================================
+
+      FUNCTION ZMEFN(z,eps)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+C...  Peterson/SLAC frag. func
+cdh   zmefn = (z*(1.D0-z**(-1)-eps/(1.D0-z))**2)**(-1)
+      zmefn = 1.D0/(z*(1.D0-z**(-1)-eps/(1.D0-z))**2)
+      RETURN
+      END
+
+C=======================================================================
+
+      FUNCTION ZBLEAD (LB)
+
+C-----------------------------------------------------------------------
+C...fragmentation function for leading baryon
+C.  simple form:  f(z) = a + x**b
+C   INPUT : LB = particle code.
+C..................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      DOUBLE PRECISION CLEAD, FLEAD
+      COMMON /S_CZLEAD/ CLEAD, FLEAD
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+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
+
+c      ncall = ncall + 1
+c      print*,'leading baryon frag. called:',lb,ncall
+
+C...  leading z lower bound
+c     used for protons only in Sib21 (if ..)
+c     used for all baryons alike in Sib22 (else..)    
+      ZLMIN = PAR(55)
+      ZSMR = PAR(56)
+
+      IF(IPAR(30).ne.0)THEN
+C     Sibyll 2.1 hard fragmentation function
+
+        IC = ICHP(LB)*ISIGN(1,LB)
+      
+        if (LB.ge.34.and.LB.le.39)  then ! Lambda's and Sigma's
+           IF(IPAR(35).eq.1)then
+              zblead=zdisn(1)     ! zblead**2   !soft
+           ELSE
+ 665          ZBLEAD = S_RNDM(LB)
+              if (zblead.le.0.01D0) goto 665
+           ENDIF
+c     zblead=zdisn(1) ! blead**2   ! soft
+        elseif (ic.eq.0)     then
+           if(IPAR(30).eq.2)then
+ 555          zblead = S_RNDM(1)
+              if (zblead .le. 0.01D0) goto 555     
+           else
+              zblead=zdisn(1)     ! blead**2   !soft
+           endif
+        elseif (ic.eq.1)  then   ! fast protons only
+           if (abs(lb).eq.13) then
+ 661          IF (S_RNDM(2) .LT. CLEAD)  THEN
+ 666             ZBLEAD = S_RNDM(0)
+                 if (zblead.le.0.01D0) goto 666
+              ELSE
+                 zblead=1.D0-zdisn(1) ! zblead**2   !hard
+              ENDIF
+c     truncated zblead to fix antiprotons
+              if (zblead.le.ZLMIN+ZSMR*(1.D0-2.D0*S_RNDM(LB))) goto 661
+           else
+              zblead=zdisn(1)     ! zblead**2   !hard
+           endif   
+        else if (ic.eq.2)  then   ! fast delta++
+           zblead=1.D0- zdisn(1)    ! (zblead)**.3333
+        else
+           zblead=S_RNDM(0)       ! zdisn(1)     !hard
+        endif
+        RETURN
+      ELSE
+C...  Sein's flat baryon fragmentation function a.k.a. Sibyll 2.2
+ 999     zblead = S_RNDM(0)
+         if (zblead .le. 0.01D0) goto 999
+c     truncated zblead to fix instring pair production (antiprotons)
+         if (zblead.le.ZLMIN+ZSMR*(1.D0-2.D0*S_RNDM(LB))) goto 999
+         RETURN
+      ENDIF
+      END
+
+C=======================================================================
+
+      FUNCTION ZDISN (n)
+
+C-----------------------------------------------------------------------
+C...Generate (1-x)**n
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+666   rmin=1.1D0
+      do i=1,n+1
+         R1=S_RNDM(i)
+         IF (R1.LE.RMIN) RMIN=R1
+      ENDDO
+      ZDISn=RMIN
+      if (zdisn.le.0.01D0) goto 666
+      if (zdisn.ge.0.99D0) goto 666
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_SIG(Jint,SIB_SQS,SIB_PTmin,SIB_SIG_tot,
+     &                 SIB_SIG_ine,SIB_diff,SIB_diff2,SIB_B_el,SIB_PJET)
+
+C-----------------------------------------------------------------------
+C
+C...SIBYLL 2.1 cross sections 
+C
+C   input parameter: SIB_SQS   c.m.s. energy (GeV)
+C                    Jint      1 p-p cross sections
+C                              2 pi-p cross sections
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      DOUBLE PRECISION SIB_PJET(0:NS_max,0:NH_max)
+      DOUBLE PRECISION SIB_SQS,SIB_PTmin,
+     &     SIB_SIG_ine,SIB_SIG_tot,SIB_diff(3),SIB_diff2(3,2),SIB_B_el
+
+
+      COMMON /SIGMAS/SQS,SIGTOT,SIGEL,SIGINE,
+     &               SIGSD1(2),SIGSD2(2),SIGDD(2),
+     &               SLOPE,SLOPEc,RHO,PROB(0:NS_max,0:NH_max),SIGSUM
+
+
+      COMMON /PROFILE/XNUS2,XMUS2,XNUSPI2,
+     &                XNUH2,XMUH2,XNUHPI2,
+     &                ENHPP,ENHPIP,al1,be1,al2,be2
+
+      COMMON /S_CHDCNV/ABR(2,400),ABP(2,400),ABH(2,400),DB,NB
+
+      DIMENSION XI(50)
+
+      DIMENSION SIG_BRN(3)
+      DIMENSION SIG_dif_1(2),SIG_dif_2(2),SIG_dd(2)
+
+      DIMENSION IHAR(2)
+
+      PARAMETER ( NPARFIT = 22 )
+      DOUBLE PRECISION PARS
+      COMMON /XSCTN_FIT/ PARS( 50 , 2 )
+
+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
+
+      COMMON /QCD_XSCTN/SIGQCD(61,2),INIT
+      DOUBLE PRECISION SIGQCD
+      SAVE
+      DATA INIT /0/
+      DATA (SIGQCD(K,1),K=    1,   61) /
+     &8.4663D-02,1.8246D-01,3.3880D-01,5.6845D-01,8.8686D-01,1.3116D+00,
+     &1.8626D+00,2.5645D+00,3.4445D+00,4.5343D+00,5.8715D+00,7.4962D+00,
+     &9.4579D+00,1.1811D+01,1.4620D+01,1.7955D+01,2.1890D+01,2.6522D+01,
+     &3.1952D+01,3.8303D+01,4.5704D+01,5.4307D+01,6.4284D+01,7.5818D+01,
+     &8.9121D+01,1.0447D+02,1.2213D+02,1.4240D+02,1.6562D+02,1.9221D+02,
+     &2.2260D+02,2.5733D+02,2.9694D+02,3.4207D+02,3.9348D+02,4.5194D+02,
+     &5.1838D+02,5.9376D+02,6.7921D+02,7.7609D+02,8.8578D+02,1.0099D+03,
+     &1.1504D+03,1.3090D+03,1.4882D+03,1.6903D+03,1.9183D+03,2.1754D+03,
+     &2.4650D+03,2.7912D+03,3.1582D+03,3.5707D+03,4.0341D+03,4.5538D+03,
+     &5.1360D+03,5.7883D+03,6.5193D+03,7.3358D+03,8.2428D+03,9.2498D+03,
+     &1.0369D+04/
+      DATA (SIGQCD(K,2),K=    1,   61) /
+     &1.5665D-01,2.8800D-01,4.7863D-01,7.4235D-01,1.0949D+00,1.5547D+00,
+     &2.1433D+00,2.8859D+00,3.8118D+00,4.9547D+00,6.3534D+00,8.0525D+00,
+     &1.0103D+01,1.2563D+01,1.5498D+01,1.8986D+01,2.3111D+01,2.7971D+01,
+     &3.3678D+01,4.0358D+01,4.8154D+01,5.7228D+01,6.7762D+01,7.9965D+01,
+     &9.4071D+01,1.1034D+02,1.2909D+02,1.5063D+02,1.7536D+02,2.0370D+02,
+     &2.3613D+02,2.7321D+02,3.1553D+02,3.6379D+02,4.1875D+02,4.8129D+02,
+     &5.5238D+02,6.3311D+02,7.2470D+02,8.2854D+02,9.4614D+02,1.0792D+03,
+     &1.2298D+03,1.3999D+03,1.5920D+03,1.8089D+03,2.0534D+03,2.3291D+03,
+     &2.6396D+03,2.9892D+03,3.3825D+03,3.8248D+03,4.3219D+03,4.8803D+03,
+     &5.5072D+03,6.2109D+03,7.0001D+03,7.8849D+03,8.8764D+03,9.9871D+03,
+     &1.1231D+04/
+
+
+      IF(INIT.EQ.0) THEN
+*        CALL HAR_INI
+        CALL FACT_INI
+        IHAR(1) = 0
+        IHAR(2) = 0
+        INIT = 1
+      ENDIF
+
+      ECM = SIB_SQS
+
+      IF(JINT.EQ.1) THEN
+c     K = 1 , proton
+         DO K=1,NPARFIT
+            XI(K) = PARS(K,1)
+         ENDDO
+
+      ELSE IF(JINT.EQ.2) THEN
+c     K = 2 , pion
+         DO K=1,NPARFIT
+            XI(K) = PARS(K,2)
+         ENDDO
+
+      ENDIF
+
+      XNUS2   = XI(12)
+      XMUS2   = XI(13)
+      XNUSPI2 = XI(14)
+
+      XNUH2   = XI(15)
+      XMUH2   = XI(16)
+      XNUHPI2 = XI(17)
+
+      CALL HAD_CONV(IABS(JINT))
+
+      PTCUT = XI(10)+XI(21)*dEXP(XI(22)*DSQRT(2.D0*dLOG(ECM)))
+      INDX = abs(JINT)
+      IHAR(INDX) = IHAR(INDX)+1
+      SIGHAR = SIGQCD(IHAR(INDX),INDX)
+
+      S = ECM**2
+
+      BREG =  ABS(XI(18)) + XI(19)*dLOG(S)
+      BPOM =  ABS(XI(12)) + XI(13)*dLOG(S)
+      IK = ABS(JINT)
+      DO JB=1,NB
+        B = DB*DBLE(JB-1)
+        ABR(IK,JB) = 2.D0/(8.D0*PI*BREG)*dEXP(-B**2/(4.D0*BREG))
+        ABP(IK,JB) = 2.D0/(8.D0*PI*BPOM)*dEXP(-B**2/(4.D0*BPOM))
+      ENDDO
+
+C  reggeon
+      SIGSR = ABS(XI(2))*S**(-ABS(XI(4)))
+      SIG_BRN(1) = SIGSR/CMBARN
+C  pomeron (soft part)
+      SIGSP = ABS(XI(1))*S**ABS(XI(3))
+      SIG_BRN(2) = SIGSP/CMBARN
+C  pomeron (hard part)
+      SIG_BRN(3) = SIGHAR/CMBARN
+
+C  2x2 channel low-mass model and separate high-mass diffraction
+        
+      al1 = XI(5)
+      be1 = XI(6)
+      al2 = al1
+      be2 = be1
+      EnhPP  = XI(9)
+      EnhPiP = EnhPP
+
+      CALL SIG_JET_3 (SIG_brn,JINT,SIG_tot,SIG_ela,SIG_ine,SIG_sum,
+     &                SIG_dif_1,SIG_dif_2,SIG_dd,B_el,PROB)
+
+      SIGTOT = SIG_tot*CMBARN
+      SIGINE = SIG_ine*CMBARN
+      SIGSUM = SIG_sum*CMBARN
+      SIGELc = SIGTOT-SIGINE
+      SIGEL  = SIG_ela*CMBARN
+      SIGSD1(1) = SIG_dif_1(1)*CMBARN
+      SIGSD1(2) = SIG_dif_1(2)*CMBARN
+      SIGSD2(1) = SIG_dif_2(1)*CMBARN
+      SIGSD2(2) = SIG_dif_2(2)*CMBARN
+      SIGDD(1)  = SIG_dd(1)*CMBARN
+      SIGDD(2)  = SIG_dd(2)*CMBARN
+      SLOPE  = B_EL
+      SLOPEc = SIG_tot**2/(16.D0*PI*SIG_ela)
+
+      DE = ABS(SIGEL+SIGINE-SIGTOT)/SIGTOT
+      IF(DE.GT.0.01D0) THEN
+        print *,'SIBSIG:      Ecm: ',ECM
+        print *,'          SIGTOT: ',SIGTOT
+        print *,'        SIGEL1/2: ',SIGEL,SIGELc
+        print *,'        SLOPE1/2: ',SLOPE,SLOPEc
+        print *,'        SIGDIF 1: ',SIGSD1
+        print *,'        SIGDIF 2: ',SIGSD2
+        print *,'         SIGDDIF: ',SIGDD
+        print *,'      SUM-SIGTOT: ',SIGEL+SIGINE-SIGTOT
+      ENDIF
+
+C  SIBYLL interface to single precision
+
+      SIB_PTmin   = PTCUT
+      SIB_SIG_tot = SIGTOT
+      SIB_SIG_ine = SIGINE
+      SIB_diff(1) = SIGSD1(1)+SIGSD1(2)
+      SIB_diff(2) = SIGSD2(1)+SIGSD2(2)
+      SIB_diff(3) = SIGDD(1)+SIGDD(2)
+      SIB_B_el    = SLOPE
+      DO I=0,NS_max
+        DO K=0,NH_max
+          SIB_PJET(I,K) = PROB(I,K)
+        ENDDO
+      ENDDO
+c     full diff. cross section 
+c     ( ( b.single , t.single , double ) , ( low mass , high mass ) ) 
+      SIB_diff2(1,1) = SIGSD1(1)
+      SIB_diff2(1,2) = SIGSD1(2)
+      SIB_diff2(2,1) = SIGSD2(1)
+      SIB_diff2(2,2) = SIGSD2(2)
+      SIB_diff2(3,1) = SIGDD(1)
+      SIB_diff2(3,2) = SIGDD(2)
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIG_JET_3 (SIG_brn, JINT, SIG_TOT, SIG_ELA, 
+     &        SIG_INE, SIG_sum, SIG_DIF1, SIG_DIF2, SIG_DD, B_EL, P_int)
+
+C-----------------------------------------------------------------------
+C
+C...This subroutine  receives in INPUT:
+C.       SIG_brn (GeV-2)  Born graph cross sections
+C.       JINT (1 = pp interaction)    (2 pi-p interaction)
+C.       neg. value: without calculation of interaction probabilities
+C.
+C.  and returns as output:
+C.       SIG_???  , B_el
+C.       and P_int(0:NS_max,0:NH_max)   interaction probabilities
+C
+C   two x two -channel approximation for diffraction
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      DIMENSION SIG_brn(3)
+      PARAMETER (NS_max = 20, NH_max = 80)
+
+      COMMON /S_CFACT/ FACT(0:NH_max), CO_BIN(0:NH_max,0:NH_max)
+      COMMON /S_CHDCNV/ABR(2,400),ABP(2,400),ABH(2,400),DB,NB
+
+      COMMON /PROFILE/XNUS2,XMUS2,XNUSPI2,
+     &                XNUH2,XMUH2,XNUHPI2,
+     &                EnhPP,EnhPiP,al1,be1,al2,be2
+
+      DIMENSION SIG_DIF1(2),SIG_DIF2(2),SIG_DD(2),
+     &          P_int(0:NS_max,0:NH_max)
+
+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
+
+      DOUBLE PRECISION EPS100
+      SAVE
+      DATA EPS100 /1.D-100/
+      
+      DO J=0,NH_max
+        DO I=0,NS_max
+          P_int(I,J) = 0.D0
+        ENDDO
+      ENDDO
+
+      ga1 = dsqrt(al1*al1+be1*be1)
+      ga2 = dsqrt(al2*al2+be2*be2)
+
+      fe_a_1  = (1.D0+al1/ga1)/2.D0
+      fe_a_2  = (1.D0-al1/ga1)/2.D0
+      fd_a_1  = sqrt(1.D0-(al1/ga1)**2)/2.D0
+      fd_a_2  = -fd_a_1
+
+      fe_b_1  = (1.D0+al2/ga2)/2.D0
+      fe_b_2  = (1.D0-al2/ga2)/2.D0
+      fd_b_1  = dsqrt(1.D0-(al2/ga2)**2)/2.D0
+      fd_b_2  = -fd_b_1
+
+      fe_11 = fe_a_1*fe_b_1
+      fe_22 = fe_a_2*fe_b_2
+      fe_12 = fe_a_1*fe_b_2
+      fe_21 = fe_a_2*fe_b_1
+
+      fd_a_11 = fd_a_1*fe_b_1
+      fd_a_22 = fd_a_2*fe_b_2
+      fd_a_12 = fd_a_1*fe_b_2
+      fd_a_21 = fd_a_2*fe_b_1
+
+      fd_b_11 = fe_a_1*fd_b_1
+      fd_b_22 = fe_a_2*fd_b_2
+      fd_b_12 = fe_a_1*fd_b_2
+      fd_b_21 = fe_a_2*fd_b_1
+
+      fdd_11 = fd_a_1*fd_b_1
+      fdd_22 = fd_a_2*fd_b_2
+      fdd_12 = fd_a_1*fd_b_2
+      fdd_21 = fd_a_2*fd_b_1
+
+
+      sum_abs = 0.D0
+      sum_tot = 0.D0
+      sum_ela = 0.D0
+      sum_sd_a = 0.D0
+      sum_sd_b = 0.D0
+      sum_dd  = 0.D0
+      sum_B   = 0.D0
+
+      IK = ABS(JINT)
+      if(JINT.GT.0) then
+        I0MAX = NS_max
+        J0MAX = NH_max
+      ELSE
+        I0MAX = 1
+        J0MAX = 1
+      ENDIF
+      SIG_REG = SIG_BRN(1)
+      SIG_POM = SIG_BRN(2)
+      SIG_HAR = SIG_BRN(3)
+
+      DO JB=1,NB
+
+         B = DB*DBLE(JB-1)
+
+         ABREG = ABR(IK,JB)
+         ABPOM = ABP(IK,JB)
+         ABHAR = ABH(IK,JB)
+
+         chi2_soft = ABREG*SIG_REG+ABPOM*SIG_POM
+         chi2_soft_11 = (1.D0-al1+ga1)*(1.D0-al2+ga2)*chi2_soft
+         chi2_soft_22 = (1.D0-al1-ga1)*(1.D0-al2-ga2)*chi2_soft
+         chi2_soft_12 = (1.D0-al1+ga1)*(1.D0-al2-ga2)*chi2_soft
+         chi2_soft_21 = (1.D0-al1-ga1)*(1.D0-al2+ga2)*chi2_soft
+
+         chi2_hard = ABHAR*SIG_HAR
+         chi2_hard_11 = (1.D0-al1+ga1)*(1.D0-al2+ga2)*chi2_hard
+         chi2_hard_22 = (1.D0-al1-ga1)*(1.D0-al2-ga2)*chi2_hard
+         chi2_hard_12 = (1.D0-al1+ga1)*(1.D0-al2-ga2)*chi2_hard
+         chi2_hard_21 = (1.D0-al1-ga1)*(1.D0-al2+ga2)*chi2_hard
+          
+         ef_11 = max(-0.5D0*(chi2_soft_11+chi2_hard_11),log(EPS100))
+         ef_22 = max(-0.5D0*(chi2_soft_22+chi2_hard_22),log(EPS100))
+         ef_12 = max(-0.5D0*(chi2_soft_12+chi2_hard_12),log(EPS100))
+         ef_21 = max(-0.5D0*(chi2_soft_21+chi2_hard_21),log(EPS100))
+         
+         ef_11 = dexp(ef_11)
+         ef_22 = dexp(ef_22)
+         ef_12 = dexp(ef_12)
+         ef_21 = dexp(ef_21)
+
+         esf_11  = max(ef_11,EPS100)**2
+         esf_22  = max(ef_22,EPS100)**2
+         esf_12  = max(ef_12,EPS100)**2
+         esf_21  = max(ef_21,EPS100)**2
+
+         F_ine = B*(1.D0 - fe_11*esf_11 - fe_12*esf_12 
+     &                   - fe_21*esf_21 - fe_22*esf_22)
+         F_tot = 1.D0 - fe_11*ef_11 - fe_12*ef_12
+     &                - fe_21*ef_21 - fe_22*ef_22
+         F_ela = B*F_tot**2
+         F_tot = B*F_tot
+
+         F_sd_a = B*(fd_a_11*ef_11 + fd_a_12*ef_12
+     &             + fd_a_21*ef_21 + fd_a_22*ef_22)**2
+         F_sd_b = B*(fd_b_11*ef_11 + fd_b_12*ef_12
+     &             + fd_b_21*ef_21 + fd_b_22*ef_22)**2
+         F_dd  = B*(fdd_11*ef_11 + fdd_12*ef_12
+     &            + fdd_21*ef_21 + fdd_22*ef_22)**2
+
+         sum_abs = sum_abs+F_ine
+         sum_tot = sum_tot+F_tot
+         sum_ela = sum_ela+F_ela
+
+         sum_sd_a = sum_sd_a+F_sd_a
+         sum_sd_b = sum_sd_b+F_sd_b
+         sum_dd  = sum_dd +F_dd 
+
+         sum_B   = sum_b+B**2*F_tot
+
+         fac_11 = B*esf_11
+         fac_22 = B*esf_22
+         fac_12 = B*esf_12
+         fac_21 = B*esf_21
+         soft_rec_11 = 1.D0/chi2_soft_11
+         soft_rec_22 = 1.D0/chi2_soft_22
+         soft_rec_12 = 1.D0/chi2_soft_12
+         soft_rec_21 = 1.D0/chi2_soft_21
+         chi2_hard_11 = max(chi2_hard_11,EPS100)
+         chi2_hard_22 = max(chi2_hard_22,EPS100)
+         chi2_hard_12 = max(chi2_hard_12,EPS100)
+         chi2_hard_21 = max(chi2_hard_21,EPS100)
+         DO I=0,I0MAX
+           soft_rec_11 = max(soft_rec_11*chi2_soft_11,EPS100)
+           soft_rec_22 = max(soft_rec_22*chi2_soft_22,EPS100)
+           soft_rec_12 = max(soft_rec_12*chi2_soft_12,EPS100)
+           soft_rec_21 = max(soft_rec_21*chi2_soft_21,EPS100)
+           hard_rec_11 = max(1.D0/chi2_hard_11,EPS100)
+           hard_rec_22 = max(1.D0/chi2_hard_22,EPS100)
+           hard_rec_12 = max(1.D0/chi2_hard_12,EPS100)
+           hard_rec_21 = max(1.D0/chi2_hard_21,EPS100)
+           DO J=0,J0MAX
+             hard_rec_11 = max(hard_rec_11*chi2_hard_11,EPS100)
+             hard_rec_22 = max(hard_rec_22*chi2_hard_22,EPS100)
+             hard_rec_12 = max(hard_rec_12*chi2_hard_12,EPS100)
+             hard_rec_21 = max(hard_rec_21*chi2_hard_21,EPS100)
+             P_int(I,J) = P_int(I,J) 
+     &                + fe_11*soft_rec_11*hard_rec_11*fac_11
+     &                + fe_22*soft_rec_22*hard_rec_22*fac_22
+     &                + fe_12*soft_rec_12*hard_rec_12*fac_12
+     &                + fe_21*soft_rec_21*hard_rec_21*fac_21
+           ENDDO
+         ENDDO
+
+      ENDDO
+
+      SIG_abs  = SUM_abs*TWOPI*DB
+      SIG_tot  = SUM_tot*4.D0*PI*DB
+      SIG_ela  = SUM_ela*TWOPI*DB
+      SIG_dif1(1) = SUM_sd_a*TWOPI*DB
+      SIG_dif2(1) = SUM_sd_b*TWOPI*DB
+      SIG_dd(1)   = SUM_dd*TWOPI*DB
+      SIG_ine  = SIG_abs + SIG_dif1(1) + SIG_dif2(1) + SIG_dd(1)
+      B_EL     = sum_B/SUM_tot/2.D0
+
+      SA = 0.D0
+      P_int(0,0) = 0.D0
+      DO I=0,I0MAX
+        DO J=0,J0MAX
+          fac = FACT(I)*FACT(J)
+          P_int(I,J) = P_int(I,J)/fac
+          SA = SA + P_int(I,J)
+        ENDDO
+      ENDDO
+
+      SIG_hmsd = EnhPP*(P_int(1,0)+P_int(0,1))*TWOPI*DB
+      SIG_hmdd = be1**2*SIG_hmsd + be2**2*SIG_hmsd
+     &          + EnhPP**2*P_int(1,1)*TWOPI*DB
+
+      SIG_dif1(2) = SIG_hmsd
+      SIG_dif2(2) = SIG_hmsd
+      SIG_dd(2)   = SIG_hmdd
+
+      SIG_sum = SA*TWOPI*DB
+
+      DO I=0,I0MAX
+        DO J=0,J0MAX
+          P_int(I,J) = P_int(I,J)/SA
+        ENDDO
+      ENDDO
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE HAD_CONV(JINT)
+
+C-----------------------------------------------------------------------
+C
+C...Convolution of hadrons profile
+C.  [function A(b) of Durand and Pi]
+C.  precalculate and put  in COMMON block
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C
+      COMMON /S_CHDCNV/ABR(2,400),ABP(2,400),ABH(2,400),DB,NB
+
+      DOUBLE PRECISION NU2, MU2, NUPI2, NU, MU, NUPI
+      COMMON /S_CH0CNV/ NU2, MU2, NUPI2, NU, MU, NUPI
+
+C
+      COMMON /PROFILE/XNUS2,XMUS2,XNUSPI2,
+     &                XNUH2,XMUH2,XNUHPI2,
+     &                ENHPP,ENHPIP,al1,be1,al2,be2
+      SAVE
+
+C...integration constants
+      BMAX = 50.D0
+      NB  = 400
+      DB = BMAX/DBLE(NB)
+
+C  soft reggeon interactions
+
+      NU2   = XNUS2
+      MU2   = XMUS2
+      NUPI2 = XNUSPI2
+
+      NU = SQRT(NU2)
+      MU = SQRT(ABS(MU2))
+      NUPI = SQRT(NUPI2) 
+
+      DO JB=1,NB
+         B = DB*DBLE(JB-1)
+         IF(JINT.EQ.1) THEN
+           ABR(JINT,JB) = A_PP(B)
+         ELSE
+           ABR(JINT,JB) = A_PIP(B)
+         ENDIF
+      ENDDO 
+
+C  soft pomeron interactions
+
+      NU2   = XNUS2
+      MU2   = XMUS2
+      NUPI2 = XNUSPI2
+
+      NU = SQRT(NU2)
+      MU = SQRT(ABS(MU2))
+      NUPI = SQRT(NUPI2)
+
+      DO JB=1,NB
+         B = DB*DBLE(JB-1)
+         IF(JINT.EQ.1) THEN
+           ABP(JINT,JB) = A_PP(B)
+         ELSE
+           ABP(JINT,JB) = A_PIP(B)
+         ENDIF
+      ENDDO
+
+C  hard pomeron interactions
+
+      NU2   = XNUH2
+      MU2   = XMUH2
+      NUPI2 = XNUHPI2
+
+      NU = SQRT(NU2)
+      MU = SQRT(ABS(MU2))
+      NUPI = SQRT(NUPI2)
+
+      DB = BMAX/DBLE(NB)
+      DO JB=1,NB
+         B = DB*DBLE(JB-1)
+         IF(JINT.EQ.1) THEN
+           ABH(JINT,JB) = A_PP(B)
+         ELSE
+           ABH(JINT,JB) = A_PIP(B)
+         ENDIF
+      ENDDO
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION A_PP (b)
+
+C-----------------------------------------------------------------------
+C...Convolution of parton distribution for pp interaction
+      IMPLICIT DOUBLE PRECISION (A-Z)
+C
+      DOUBLE PRECISION NU2, MU2, NUPI2, NU, MU, NUPI
+      COMMON /S_CH0CNV/ NU2, MU2, NUPI2, NU, MU, NUPI
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      ETA = NU2/MU2
+ 
+      IF(ETA.LT.0.D0) THEN
+   
+        c = nu**5/(96.D0*PI)
+        if (b .gt. 0.0001D0)  then
+           A_pp = c*b**3 * bessk (3, b*nu)
+        else
+           A_pp = nu**2/(12.D0*PI)
+        endif
+
+      ELSE
+
+        X = B*NU
+        Y = B*MU
+        C = NU2/(12.D0*PI)/(1.D0-ETA)**2
+        IF(X.GT.0.0001D0) THEN
+          A_PP = C*(1.D0/8.D0*X**3*BESSK(3,X)
+     &          -3.D0/2.D0*ETA/(1.D0-ETA)*X**2*BESSK(2,X)
+     &          + 9.D0*ETA**2/(1.D0-ETA)**2*X*BESSK1(X)
+     &          -24.D0*ETA**3/(1.D0-ETA)**3*(BESSK0(X)-BESSK0(Y))
+     &          + 3.D0*ETA**3/(1.D0-ETA)**2*Y*BESSK1(Y))
+        ELSE
+          A_PP = C*(1.D0 /8.D0*8.D0
+     &          -3.D0/2.D0*ETA/(1.D0-ETA)*2.D0
+     &          +9.D0*ETA**2/(1.D0-ETA)**2*1.D0
+     &          -24.D0*ETA**3/(1.D0-ETA)**3*LOG(MU/NU)
+     &          +3.D0*ETA**3/(1.D0-ETA)**2*1.D0)
+        ENDIF
+
+      ENDIF
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION A_PIP (b)
+
+C-----------------------------------------------------------------------
+C...Convolution of parton distribution for pip interaction
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-Z)
+C
+      DOUBLE PRECISION NU2, MU2, NUPI2, NU, MU, NUPI
+      COMMON /S_CH0CNV/ NU2, MU2, NUPI2, NU, MU, NUPI
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      eta = nu2/nupi2
+      c = nu2/(2.D0*PI) * 1.D0/(1.D0-eta)
+
+      if (b .gt. 0.0001D0)  then
+         b1 = b*nu
+         b2 = b*nupi
+         f1 = 0.5D0*b1 * bessk1(b1)
+         f2 = eta/(1.D0-eta)*(bessk0(b2)- bessk0(b1))
+         A_pip = c*(f1+f2)
+      else
+         A_pip = c*(0.5D0 + eta/(1.D0-eta)*log(nu/nupi))
+      endif
+      return
+      end
+C
+C
+C-----------------------------------------------------------------------
+C  Bessel functions
+C=======================================================================
+
+      FUNCTION BESSK0(X)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C
+      DOUBLE PRECISION P1,P2,P3,P4,P5,P6,P7,
+     *                 Q1,Q2,Q3,Q4,Q5,Q6,Q7
+      SAVE
+      DATA P1,P2,P3,P4,P5,P6,P7/-0.57721566D0,0.42278420D0,
+     *    0.23069756D0,0.3488590D-1,0.262698D-2,0.10750D-3,0.74D-5/
+      DATA Q1,Q2,Q3,Q4,Q5,Q6,Q7/1.25331414D0,-0.7832358D-1,
+     * 0.2189568D-1,-0.1062446D-1,0.587872D-2,-0.251540D-2,0.53208D-3/
+
+      IF (X.LE.2.0D0) THEN
+        Y=X*X/4.D0
+        BESSK0=(-LOG(X/2.D0)*BESSI0(X))+(P1+Y*(P2+Y*(P3+
+     *        Y*(P4+Y*(P5+Y*(P6+Y*P7))))))
+      ELSE
+        Y=(2.D0/X)
+        BESSK0=(EXP(-X)/SQRT(X))*(Q1+Y*(Q2+Y*(Q3+
+     *        Y*(Q4+Y*(Q5+Y*(Q6+Y*Q7))))))
+      ENDIF
+      RETURN
+      END
+C
+C=======================================================================
+
+      FUNCTION BESSK1(X)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C
+      DOUBLE PRECISION P1,P2,P3,P4,P5,P6,P7,
+     *                 Q1,Q2,Q3,Q4,Q5,Q6,Q7
+      SAVE
+      DATA P1,P2,P3,P4,P5,P6,P7/1.0D0,0.15443144D0,-0.67278579D0,
+     *    -0.18156897D0,-0.1919402D-1,-0.110404D-2,-0.4686D-4/
+      DATA Q1,Q2,Q3,Q4,Q5,Q6,Q7/1.25331414D0,0.23498619D0,
+     *    -0.3655620D-1,0.1504268D-1,-0.780353D-2,0.325614D-2,
+     *    -0.68245D-3/
+
+      IF (X.LE.2.D0) THEN
+        Y=X*X/4.D0
+        BESSK1=(LOG(X/2.D0)*BESSI1(X))+(1.D0/X)*(P1+Y*(P2+
+     *      Y*(P3+Y*(P4+Y*(P5+Y*(P6+Y*P7))))))
+      ELSE
+        Y=2.D0/X
+        BESSK1=(EXP(-X)/SQRT(X))*(Q1+Y*(Q2+Y*(Q3+
+     *      Y*(Q4+Y*(Q5+Y*(Q6+Y*Q7))))))
+      ENDIF
+      RETURN
+      END
+C
+C=======================================================================
+
+      FUNCTION BESSK(N,X)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+C
+      IF (N.LT.2) stop 'bad argument N in BESSK'
+      TOX=2.D0/X
+      BKM=BESSK0(X)
+      BK=BESSK1(X)
+      DO 11 J=1,N-1
+        BKP=BKM+J*TOX*BK
+        BKM=BK
+        BK=BKP
+11    CONTINUE
+      BESSK=BK
+      RETURN
+      END
+C
+C=======================================================================
+
+      FUNCTION BESSI0(X)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C
+      DOUBLE PRECISION P1,P2,P3,P4,P5,P6,P7,
+     *                 Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9
+      SAVE
+      DATA P1,P2,P3,P4,P5,P6,P7/1.0D0,3.5156229D0,3.0899424D0,
+     *    1.2067492D0, 0.2659732D0,0.360768D-1,0.45813D-2/
+      DATA Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9/0.39894228D0,0.1328592D-1,
+     *    0.225319D-2,-0.157565D-2,0.916281D-2,-0.2057706D-1,
+     *    0.2635537D-1,-0.1647633D-1,0.392377D-2/
+
+      IF (ABS(X).LT.3.75D0) THEN
+        Y=(X/3.75D0)**2
+        BESSI0=P1+Y*(P2+Y*(P3+Y*(P4+Y*(P5+Y*(P6+Y*P7)))))
+      ELSE
+        AX=ABS(X)
+        Y=3.75D0/AX
+        BESSI0=(EXP(AX)/SQRT(AX))*(Q1+Y*(Q2+Y*(Q3+Y*(Q4
+     *      +Y*(Q5+Y*(Q6+Y*(Q7+Y*(Q8+Y*Q9))))))))
+      ENDIF
+      RETURN
+      END
+C
+C=======================================================================
+
+      FUNCTION BESSI1(X)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C
+      DOUBLE PRECISION P1,P2,P3,P4,P5,P6,P7,
+     *                 Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9
+      SAVE
+      DATA P1,P2,P3,P4,P5,P6,P7/0.5D0,0.87890594D0,0.51498869D0,
+     *    0.15084934D0,0.2658733D-1,0.301532D-2,0.32411D-3/
+      DATA Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9/0.39894228D0,-0.3988024D-1,
+     *    -0.362018D-2,0.163801D-2,-0.1031555D-1,0.2282967D-1,
+     *    -0.2895312D-1,0.1787654D-1,-0.420059D-2/
+
+      IF (ABS(X).LT.3.75D0) THEN
+        Y=(X/3.75D0)**2
+        BESSI1=X*(P1+Y*(P2+Y*(P3+Y*(P4+Y*(P5+Y*(P6+Y*P7))))))
+      ELSE
+        AX=ABS(X)
+        Y=3.75D0/AX
+        BESSI1=(EXP(AX)/SQRT(AX))*(Q1+Y*(Q2+Y*(Q3+Y*(Q4+
+     *      Y*(Q5+Y*(Q6+Y*(Q7+Y*(Q8+Y*Q9))))))))
+      ENDIF
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE FACT_INI
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      COMMON /S_CFACT/ FACT(0:NH_max), CO_BIN(0:NH_max,0:NH_max)
+
+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
+      
+      FACT(0) = 1.D0
+      FACT(NS_max) = 1.D0  ! avoid unused warning and keep parameter block
+      DO J=1,NH_max
+         FACT(J) = FACT(J-1)*DBLE(J)
+      ENDDO
+      DO J=0,NH_max
+         DO K=0,J
+            CO_BIN(J,K) = FACT(J)/(FACT(K)*FACT(J-K))
+         ENDDO
+      ENDDO
+
+      END
+cC=======================================================================
+c
+c      SUBROUTINE SAMPLE_SOFT (STR_mass_min, X1,X2,PT)
+c
+C-----------------------------------------------------------------------
+C...  Routine for the sampling the kinematical variables of sea quarks
+C.     according to (1-x)**b / x**2
+C.  INPUT:  STR_mass_min : minimal string mass ** 2 = x1 * x2 * s
+C.          SLOPE : large x suppression exponent
+C.  OUTPUT:  gluon 4momenta on parton stack (GeV)                /FR'14
+C-----------------------------------------------------------------------
+c      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+c      IMPLICIT INTEGER(I-N)
+c
+c      INTEGER NW_max
+c      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+c
+c     EVENT INFO COMMON
+c     contains overall interaction properties, like
+c     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+c      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+c      INTEGER KB,IAT,KT
+c      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+c
+c      INTEGER NCALL, NDEBUG, LUN
+c      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+c
+c      DOUBLE PRECISION PPT02
+c      COMMON /S_CQDIS2/ PPT02(44)
+c      INTEGER NIPAR_max,NPAR_max
+c      PARAMETER (NPAR_max=200,NIPAR_max=100)
+c      DOUBLE PRECISION PAR
+c      INTEGER IPAR
+c      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+c
+C--------------------------------------------------------------------
+C     SIBYLL utility common blocks containing constants       \FR'14
+C--------------------------------------------------------------------
+c      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+c      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+c
+c      DOUBLE PRECISION PI,TWOPI,CMBARN
+c      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+c
+c      DOUBLE PRECISION FACN
+c      DIMENSION FACN(3:10)
+c      COMMON /SIB_FAC/ FACN
+c      SAVE
+c
+c      SLOPE = max(1.D0,PAR(42))
+c      ZSOF = 2.D0*dLOG(STR_mass_min/SQS) ! minim. mass ~ x1 * x2
+c 50   XMIN = dEXP(ZSOF)
+c      axmin = 1.D0/xmin
+c 100  Z1 = -1.D0*dLOG(axmin-(axmin-1.D0)*S_RNDM(0))
+c      x1 = dexp(z1)
+c      XR = dlog(1.D0-X1) - dlog(1.D0-xmin)
+c      if(SLOPE*XR.le.log(S_RNDM(0))) goto 100
+c
+c 200  Z2 = -1.D0*dLOG(axmin-(axmin-1.D0)*S_RNDM(0))
+c      X2 = dEXP(Z2)
+c      XR = dlog(1.D0-X2) - dlog(1.D0-dEXP(ZSOF))
+c      if(SLOPE*XR.le.dlog(S_RNDM(0))) goto 200     
+c
+c      IF(Z1+Z2.LE.ZSOF) GOTO 50
+c      STR_mass2 = dsqrt(X1*X2*S)/2.D0
+c      PPTT = PPT02(10)
+c 150  PT = PPTT*dSQRT(-dLOG(MAX(EPS10,S_RNDM(0))))
+c      IF(IPAR(3).eq.6)THEN
+c         XM = 0.D0
+c         XM2 = XM**2
+c         RNDM = MAX(EPS10,S_RNDM(IFL))
+c         XMT = PPTT * dLOG(RNDM) - XM
+c         XMT2 = XMT**2
+c         PT = dSQRT(XMT2-XM2)
+c      ENDIF
+c      IF(PT.GT.PTmin) GOTO 150
+c      IF(PT.GE.STR_mass2) GOTO 150
+c      END
+c
+cC=======================================================================
+c
+c      SUBROUTINE SAMPLE_SOFT2 (STR_mass_min, X1,X2,PT)
+c
+C-----------------------------------------------------------------------
+C...Routine for sampling the kinematical variables
+C.  that characterize a soft cut pomeron (x1,x2, pT)
+C.  from the differential cross section:
+C.     d3sigma/(dx1 dx2 dpT)
+C.      ~ 1/x_i**a .*. exp(-mT)
+C.  INPUT: STR_mass_min : minimal string mass defined by kinematic limits
+C.                        of the string fragmentation
+C.  PAR:   PAR(42) : exponent a
+C.  OUTPUT:  X1, X2, PT (GeV)
+C-----------------------------------------------------------------------
+c      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+c      IMPLICIT INTEGER(I-N)
+c      INTEGER NW_max
+c      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+c
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+c      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+c      INTEGER KB,IAT,KT
+c      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+c
+c      INTEGER NCALL, NDEBUG, LUN
+c      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+c
+c      DOUBLE PRECISION PPT02
+c      COMMON /S_CQDIS2/ PPT02(44)
+c      INTEGER NIPAR_max,NPAR_max
+c      PARAMETER (NPAR_max=200,NIPAR_max=100)
+c      DOUBLE PRECISION PAR
+c      INTEGER IPAR
+c      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+c
+cC--------------------------------------------------------------------
+cC     SIBYLL utility common blocks containing constants       \FR'14
+cC--------------------------------------------------------------------
+c      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+c      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+c
+c      DOUBLE PRECISION PI,TWOPI,CMBARN
+c      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+c
+c      DOUBLE PRECISION FACN
+c      DIMENSION FACN(3:10)
+c      COMMON /SIB_FAC/ FACN
+c      SAVE
+c
+c      SLOPE = PAR(42)
+c      ZSOF = 2.D0*dLOG(STR_mass_min/SQS) ! zmin
+c      zsof = zsof * slope
+c 100  Z1=1.D0/SLOPE*(-zsof*S_RNDM(0)+zsof)
+c      Z2=1.D0/SLOPE*(-zsof*S_RNDM(0)+zsof)
+cc      print *,'zsof,z1,z2',zsof,z1,z2
+c      IF(Z1+Z2.LE.ZSOF) GOTO 100
+c      X1=dEXP(Z1)
+c      X2=dEXP(Z2)
+c      STR_mass2 = sqrt(X1*X2*S)/2.D0
+c      if(str_mass2.lt.0.9D0)goto 100
+c      PPTT = PPT02(10)
+cc      print *,'ptmin,str_mass:',ptmin,str_mass2
+c 150  PT = PPTT*dSQRT(-dLOG(MAX(EPS10,S_RNDM(0))))
+c      IF(IPAR(3).eq.6)THEN
+c         XM = 0.D0
+c         XM2 = XM**2
+c         RNDM = MAX(EPS10,S_RNDM(IFL))
+c         XMT = PPTT * dLOG(RNDM) - XM
+c         XMT2 = XMT**2
+c         PT = dSQRT(XMT2-XM2)
+c      ENDIF
+c      IF(PT.GT.PTmin) GOTO 150
+c      IF(PT.GE.STR_mass2) GOTO 150
+c      PHI = TWOPI*S_RNDM(L)
+c      END
+cC=======================================================================
+cc
+c      SUBROUTINE SAMPLE_SOFT3 (STR_mass_min, X1,X2,PT)
+c
+cC-----------------------------------------------------------------------
+cC...Routine for the sampling the kinematical variables
+cC.  that characterize a soft cut pomeron (x1,x2, pT)
+cC.  from the differential cross section:
+cC.     d3sigma/(dx1 dx2 dpT)
+cC.  INPUT:  L=1 incident proton, L=2  incident pi
+cC.          (soft strings identical for pi and p interactions)
+cC.  OUTPUT:  X1, X2, PT (GeV)
+cC-----------------------------------------------------------------------
+c      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+c      IMPLICIT INTEGER(I-N)
+c      INTEGER NW_max
+c      PARAMETER (NW_max = 20)
+cC--------------------------------------------------------------------
+cC     SIBYLL common blocks containing event information       \FR'14
+cC--------------------------------------------------------------------
+c
+cC     EVENT INFO COMMON
+cC     contains overall interaction properties, like
+cC     SQS : center-of-mass energy
+cC     S   :         "       "     squared
+cC     PTmin : low pt cut of QCD cross section, 
+cC             i.e. minimal pt of hard minijets
+cC     Xmin : low-x bound for PDFs, 
+cC            i.e. minimal momentum fraction of hard partons
+cC     Zmin : logarithm of that
+cC     KB : PID of beam hadron
+cC     KT() : PID of target
+cC     IAT : mass number of target
+c      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+c      INTEGER KB,IAT,KT
+c      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+c
+c      INTEGER NCALL, NDEBUG, LUN
+c      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+c
+c      DOUBLE PRECISION PPT02
+c      COMMON /S_CQDIS2/ PPT02(44)
+c      INTEGER NIPAR_max,NPAR_max
+c      PARAMETER (NPAR_max=200,NIPAR_max=100)
+c      DOUBLE PRECISION PAR
+c      INTEGER IPAR
+c      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+c
+cC--------------------------------------------------------------------
+cC     SIBYLL utility common blocks containing constants       \FR'14
+cC--------------------------------------------------------------------
+c      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+c      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+c
+c      DOUBLE PRECISION PI,TWOPI,CMBARN
+c      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+c
+c      DOUBLE PRECISION FACN
+c      DIMENSION FACN(3:10)
+c      COMMON /SIB_FAC/ FACN
+c      SAVE
+c
+c      SLOPE = max(1.D0,PAR(42))
+c      ZSOF = 2.D0*dLOG(STR_mass_min/SQS) ! minim. mass ~ x1 * x2
+c 100  Z1=-ZSOF*S_RNDM(0)+ZSOF   ! sample envelope 1/x
+c      X1 = dEXP(Z1)
+cc      print *,'z1,x1:',z1,x1
+c      XR = dlog(1.D0-X1) - dlog(1.D0-dEXP(ZSOF))
+cc      print *,'ratio:',(1.-X1)/(1.-EXP(ZSOF)),(1.-X1),1.-EXP(ZSOF)
+cc      print *,'log ratio:',xr,log(1.-X1),log(1.-EXP(ZSOF))
+c      if(SLOPE*XR.le.dlog(S_RNDM(0))) goto 100
+c
+c 200  Z2=-ZSOF*S_RNDM(0)+ZSOF   ! sample envelope 1/x
+c      X2 = dEXP(Z2)
+c      XR = dlog(1.D0-X2) - dlog(1.D0-dEXP(ZSOF))
+c      if(SLOPE*XR.le.dlog(S_RNDM(0))) goto 200     
+cc      print *,'zsof,z1,z2',zsof,z1,z2
+c      IF(Z1+Z2.LE.ZSOF) GOTO 100
+c      STR_mass2 = sqrt(X1*X2*S)/2.D0
+c      PPTT = PPT02(10)
+c      IF(IPAR(3).eq.8) PPTT = PPT02(20)
+c 150  PT = PPTT*dSQRT(-dLOG(MAX(EPS10,S_RNDM(0))))
+c      IF(IPAR(3).ge.6)THEN
+c         XM = 0.D0
+c         XM2 = XM**2
+c         RNDM = MAX(EPS10,S_RNDM(IFL))
+c         XMT = PPTT * dLOG(RNDM) - XM
+c         XMT2 = XMT**2
+c         PT = dSQRT(XMT2-XM2)
+c      ENDIF
+c      IF(PT.GT.PTmin) GOTO 150
+c      IF(PT.GE.STR_mass2) GOTO 150
+c      PHI = TWOPI*S_RNDM(L)
+c      END
+cC=======================================================================
+c
+c      SUBROUTINE SAMPLE_SOFT5 (STR_mass_min, X1,X2,PT)
+c
+cC-----------------------------------------------------------------------
+cC...Routine for the sampling the kinematical variables of sea quarks
+cC.     according to (1-x)**b / x**2
+cC.  INPUT:  STR_mass_min : minimal string mass ** 2 = x1 * x2 * s
+cC.          SLOPE : large x suppression exponent
+cC.  OUTPUT:  X1, X2, PT (GeV)                                   /FR'14
+cC-----------------------------------------------------------------------
+c      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+c      IMPLICIT INTEGER(I-N)
+c      INTEGER NW_max
+c      PARAMETER (NW_max = 20)
+cc      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, kb ,kt
+cC--------------------------------------------------------------------
+cC     SIBYLL common blocks containing event information       \FR'14
+cC--------------------------------------------------------------------
+c
+cC     EVENT INFO COMMON
+cC     contains overall interaction properties, like
+cC     SQS : center-of-mass energy
+cC     S   :         "       "     squared
+cC     PTmin : low pt cut of QCD cross section, 
+cC             i.e. minimal pt of hard minijets
+cC     Xmin : low-x bound for PDFs, 
+cC            i.e. minimal momentum fraction of hard partons
+cC     Zmin : logarithm of that
+cC     KB : PID of beam hadron
+cC     KT() : PID of target
+cC     IAT : mass number of target
+c      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+c      INTEGER KB,IAT,KT
+c      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+c
+c      INTEGER NCALL, NDEBUG, LUN
+c      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+c
+c      DOUBLE PRECISION PPT02
+c      COMMON /S_CQDIS2/ PPT02(44)
+c      INTEGER NIPAR_max,NPAR_max
+c      PARAMETER (NPAR_max=200,NIPAR_max=100)
+c      DOUBLE PRECISION PAR
+c      INTEGER IPAR
+c      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+c
+cC--------------------------------------------------------------------
+cC     SIBYLL utility common blocks containing constants       \FR'14
+cC--------------------------------------------------------------------
+c      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+c      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+c
+c      DOUBLE PRECISION PI,TWOPI,CMBARN
+c      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+c
+c      DOUBLE PRECISION FACN
+c      DIMENSION FACN(3:10)
+c      COMMON /SIB_FAC/ FACN
+c      SAVE
+c
+c      SLOPE = max(1.D0,PAR(42))
+c      ZSOF = 2.D0*dLOG(STR_mass_min/SQS) ! minim. mass ~ x1 * x2
+c 50   XMIN = dEXP(ZSOF)
+c      axmin = 1.D0/xmin
+c 100  Z1 = -1.D0*dLOG(axmin-(axmin-1.D0)*S_RNDM(0))
+c      x1 = dexp(z1)
+c      XR = dlog(1.D0-X1) - dlog(1.D0-xmin)
+c      if(SLOPE*XR.le.log(S_RNDM(0))) goto 100
+c
+c 200  Z2 = -1.D0*dLOG(axmin-(axmin-1.D0)*S_RNDM(0))
+c      X2 = dEXP(Z2)
+c      XR = dlog(1.D0-X2) - dlog(1.D0-dEXP(ZSOF))
+c      if(SLOPE*XR.le.dlog(S_RNDM(0))) goto 200     
+c
+c      IF(Z1+Z2.LE.ZSOF) GOTO 50
+c      STR_mass2 = dsqrt(X1*X2*S)/2.D0
+c      PPTT = PPT02(10)
+c      IF(IPAR(3).eq.8) PPTT = PPT02(20)
+c 150  PT = PPTT*dSQRT(-dLOG(MAX(EPS10,S_RNDM(0))))
+c      IF(IPAR(3).ge.6)THEN
+c         XM = 0.D0
+c         XM2 = XM**2
+c         RNDM = MAX(EPS10,S_RNDM(IFL))
+c         XMT = PPTT * dLOG(RNDM) - XM
+c         XMT2 = XMT**2
+c         PT = dSQRT(XMT2-XM2)
+c      ENDIF
+c      IF(PT.GT.PTmin) GOTO 150
+c      IF(PT.GE.STR_mass2) GOTO 150
+c      END
+c
+C=======================================================================
+
+      SUBROUTINE SAMPLE_SOFT6 (STR_mass_min, X1,X2,PT)
+
+C-----------------------------------------------------------------------
+C...Routine for the sampling the kinematical variables of sea quarks
+C.     according to (1-x)**b / x
+C.  INPUT:  STR_mass_min : minimal string mass ** 2 = x1 * x2 * s
+C.          SLOPE : large x suppression exponent
+C.  OUTPUT:  X1, X2, PT (GeV)                                   /FR'14
+C-----------------------------------------------------------------------
+Cf2py double precision, intent(in) :: STR_mass_min
+Cf2py double precision, intent(out) :: X1
+Cf2py double precision, intent(out) :: X2
+Cf2py double precision, intent(out) :: PT
+
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      DOUBLE PRECISION PPT02
+      COMMON /S_CQDIS2/ PPT02(44)
+
+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
+      
+      NOSLOPE = 0
+      SLOPE = PAR(42)
+      IF(SLOPE.lt.0.5D0) NOSLOPE = 1
+      XMAX = 0.8D0
+      ZSOF = 2.D0*LOG(STR_mass_min/SQS)       ! minim. mass ~ x1 * x2
+      XMINA = MAX(EXP(ZSOF),EPS10)
+      AXMINA = 1.D0/XMINA
+      IF(ndebug.gt.2)
+     &    write(lun,*) ' SAMPLE_SOFT6: Mmin,ZSOF,XMINA,XMAX,SLOPE:',
+     &     STR_mass_min,ZSOF,XMINA,XMAX,SLOPE
+      
+ 100  X1 = XM2DIS(XMINA,XMAX,1.D0)            ! ~(1/x)**alpha
+      IF(NOSLOPE.eq.1) goto 200
+      XRNDM = S_RNDM(0)
+      XR = LOG(1.D0-X1)-LOG(1.D0-XMINA)
+      IF(ndebug.gt.5)
+     &     write(lun,*) '  X1,XR,SLOPE*XR:',X1,XR,SLOPE*XR
+      if(SLOPE*XR.le.LOG(max(xrndm,eps10))) goto 100
+
+ 200  X2 = XM2DIS(XMINA,XMAX,1.D0)            ! ~(1/x)**alpha
+      IF(NOSLOPE.eq.1) goto 300
+      XRNDM = S_RNDM(1)
+      XR = log(1.D0-X2) - log(1.D0-XMINA)
+      IF(ndebug.gt.5)
+     &    write(lun,*) '  X2,XR,SLOPE*XR:',X2,XR,SLOPE*XR
+      if(SLOPE*XR.le.log(max(xrndm,eps10))) goto 200
+
+ 300  Z1 = log(X1)
+      Z2 = log(X2)
+      IF(Z1+Z2.LE.ZSOF) GOTO 100     
+      STR_mass2 = sqrt(X1*X2*S)/2.D0
+      PPTT = PPT02(10)
+      IF(IPAR(3).eq.8) PPTT = PPT02(20)
+      IF(ndebug.gt.2)
+     &    write(lun,*) ' SAMPLE_SOFT6: PPTT,Mmin2,PTmin:',
+     &PPTT,STR_mass2,PTmin
+ 150  PT = PPTT*SQRT(-LOG(MAX(EPS10,S_RNDM(0))))
+      IF(IPAR(3).ge.6)THEN
+         XM = 0.D0
+         XM2 = XM**2
+         RNDM = MAX(EPS10,S_RNDM(1))
+         XMT = PPTT * LOG(RNDM) - XM
+         XMT2 = XMT**2
+         PT = SQRT(XMT2-XM2)
+      ENDIF
+      IF(ndebug.gt.2)
+     &    write(lun,*) '  XM,XMT2,PT:',XM,XMT2,PT
+      IF(PT.GT.PTmin) GOTO 150
+      IF(PT.GE.STR_mass2) GOTO 150
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_START_EV (SQS, L, IA, IAFLG, NW, JDIF)
+
+C-----------------------------------------------------------------------
+C...Beginning of a SIBYLL interaction 
+C.
+C.  add l.m. Glauber SD cross section for pAir  13/FR
+C.
+C.  INPUT : SQS = c.m.s. energy (GeV)
+C.          L = 1:proton, 2:charged pion
+C.          IA = mass of target nucleon
+C.          IAFLG = target is air
+C. 
+C.  OUTPUT: NW    = number of wounded nucleons
+C.          JDIF(JW)  = diffraction code    !!!! changed to field !!!!
+C.                  (0 : non-diffractive interaction)
+C.                  (1 : forward diffraction)
+C.                  (2 : backward diffraction)
+C.                  (3 : double diffraction)
+C.
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+c     external type declarations
+      INTEGER NW_max,JDIF,IA,L,IAFLG,NW
+      DOUBLE PRECISION SQS
+      PARAMETER (NW_max = 20)
+      DIMENSION JDIF(NW_max)
+      
+      DOUBLE PRECISION B, BMAX
+      INTEGER NTRY, NA
+      COMMON /S_CNCM0/ B, BMAX, NTRY, NA
+      DOUBLE PRECISION XM2MIN,ALXMIN,SLOP0,ASLOP,BSLOP,XMASS
+      COMMON /S_DIFMAss/ XM2MIN(6),ALXMIN(6),SLOP0,ASLOP,BSLOP,XMASS(2)
+      DOUBLE PRECISION XI_MAX, ALAM
+      COMMON /GLAUB_SCR/ XI_MAX, ALAM(61)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+c     local type declarations
+      DOUBLE PRECISION SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO,
+     &     SIGPROD,SIGBDIF,SIGELA,S_RNDM,S,PF,PB,PD,P0,P1,P2,R
+      DIMENSION SIGDIF(3)
+      INTEGER K
+      SAVE
+
+      IF(NDEBUG.gt.0)
+     &WRITE(LUN,*)'SIB_START_EV:', SQS, L, IA, IAFLG, NW, JDIF
+      
+C...sample number of wounded nucleons
+c     read hadron-nucleon cross section from table
+      CALL SIB_SIGMA_HP(L,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO) 
+
+      IF (IA .GT. 1)  THEN
+         IF(IPAR(12).NE.0)THEN
+            IF(IPAR(12).eq.3)THEN
+c     distinguish between nuclear cross sections..
+               IF(IAFLG.eq.0)THEN
+c     if target is nucleus calc. hadron-nucleus cross section
+                  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)
+               ENDIF
+            ELSE
+c     always use air cross section...
+               CALL SIB_SIGMA_HAIR(L,SQS,SIGprod,SIGbdif)
+            ENDIF
+C     2channel low-mass (coherent) diffraction?
+            IF(S_RNDM(L).LT.SIGbdif/SIGprod)THEN
+               NW = 1
+               JDIF(1) = 1
+               RETURN
+            ENDIF
+         ENDIF
+c     sample number of wounded nucleons
+         CALL INT_H_NUC (IA, SIGT, SLOPE, RHO) 
+      ELSE
+         NA = 1
+      ENDIF      
+      NW = NA
+
+      IF(NDEBUG.gt.0) 
+     &   WRITE(LUN,'(A50,2I3,1P,3E10.3)')
+     &   '  START_EVT: IA, NW, SIGT, SLOPE, RHO:',IA,NW,SIGT,SLOPE,RHO
+C...new treatment of diffraction 
+      IF(IA.GT.1) THEN
+c     hadron-nucleus case
+         IF(NW.eq.1)THEN
+            IF(IPAR(12).NE.0)THEN
+c     high mass (incoherent) diffraction?
+               S = SQS ** 2
+               PF =(1.D0-dLOG(S*XI_MAX/XM2MIN(L))/
+     &              dLOG(S*PAR(13)/XM2MIN(L)))*SIGDIF(1)/SIGINEL
+               PB = SIGDIF(2)/SIGINEL
+               PD = SIGDIF(3)/SIGINEL
+            ELSE
+               PF = SIGDIF(1)/SIGINEL
+               PB = SIGDIF(2)/SIGINEL
+               PD = SIGDIF(3)/SIGINEL
+            ENDIF
+         ELSE
+c     Nw>1:
+            IF(IPAR(12).EQ.1)THEN
+c     all interactions with Nw>1 are non-diff.
+               DO K=1, NW
+                  JDIF(K) = 0
+               ENDDO
+               RETURN
+            ELSE
+c     some Nw>1 are attached by diff. 
+               PF = PAR(124)*SIGDIF(1)/SIGINEL
+               PB = PAR(124)*SIGDIF(2)/SIGINEL
+               PD = PAR(124)*SIGDIF(3)/SIGINEL
+            ENDIF
+         ENDIF
+      ELSE
+c     hadron-nucleon case
+         PF = SIGDIF(1)/SIGINEL
+         PB = SIGDIF(2)/SIGINEL
+         PD = SIGDIF(3)/SIGINEL
+      ENDIF
+      P0 = 1.D0-PF-PB-PD
+      P1 = P0 + PF
+      P2 = P1 + PB
+      DO K=1, NW
+         R = S_RNDM(0)
+         IF (R .LT. P0)  THEN
+            JDIF(K) = 0
+         ELSE IF (R .LT. P1)  THEN
+            JDIF(K) = 1
+         ELSE IF (R .LT. P2)  THEN
+            JDIF(K) = 2
+         ELSE 
+            JDIF(K) = 3
+         ENDIF
+      ENDDO
+      
+      END
+C=======================================================================
+
+      SUBROUTINE INI_EVENT(ECM,KBEAM,IATARG,IMOD)
+
+C-----------------------------------------------------------------------
+C     initializes the stacks and event info common
+c     if Imod : 0 - initiate subevent in recursive call
+c                  ( keeps the final hadron stack intact )
+C             : 1 - initiate entire new event
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+c     external type declarations
+      DOUBLE PRECISION ECM
+      INTEGER KBEAM,IATARG,IMOD
+
+c     COMMONs
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+C     parameters that represent: NW: max. number of wounded nucleons,
+C     NS,NH: max. number of soft and hard interactions
+c      PARAMETER (NW_max = 20)
+C     The COMMON block /S_CHIST/ contains information about the
+C     the structure of the  generated event:
+C     NWD   = number of wounded nucleons
+C     NJET = total number of hard interactions
+C     NSOF = total number of soft interactions
+C     NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C     NNJET (1:NW) = number of minijets produced in each interaction 
+C     JDIF(1:NW) = diffraction code 
+C                  0 : non-diff,
+C                  1 : beam-diff
+C                  2 : target-diff
+C                  3 : double-diff
+      INTEGER NNSOF,NNJET,JDIF,NWD,NJET,NSOF
+      COMMON /S_CHIST/ NNSOF(NW_max),NNJET(NW_max),
+     &     JDIF(NW_max),NWD,NJET,NSOF
+
+      INTEGER IBMRDX,ITGRDX,IHMJDX,ISMJDX,ICSTDX,IINTDX
+      COMMON /S_INDX/ IBMRDX(3),ITGRDX(NW_max,3),
+     &     IHMJDX(NW_max*NH_max),IINTDX(NW_max),
+     &     ISMJDX(NW_max*NS_max),ICSTDX(2*NW_max,3)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+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
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      INTEGER II2,JJ2
+      DOUBLE PRECISION U2,C2,CD2,CM2
+      COMMON /SIB_RAND/ U2(97),C2,CD2,CM2,II2,JJ2
+
+c     local types
+      DOUBLE PRECISION PZ,E1,PAWT,S_RNDM,R,FOX
+      INTEGER KK,JJ,II,KBA,IREFout,JN
+      SAVE
+      DATA FOX /0.21522D0/  !atomic percentage of 'non-nitrogen' in air
+ 
+      
+      IF(NDEBUG.gt.0.and.IMOD.eq.1) 
+     &     WRITE(LUN,'(A50,F10.2,I4,I3,I3)')
+     &     '  INI_EVENT: called with (ECM,KBEAM,IATARG,NCALL):',
+     &     ECM,KBEAM,IATARG,NCALL
+
+c     set final particle stack to zero
+      IF(IMOD.eq.1)then
+         NP = 0
+         NWD = 0
+         NJET = 0
+         NSOF = 0
+      endif
+
+      CALL INI_PRTN_STCK(0,0)
+
+c     clear index cache
+      do kk=1,3
+         IBMRDX(kk) = 0
+      ENDDO
+      do jj=1,NW_max
+         do kk=1,3
+            ICSTDX(jj,kk) = 0
+            ICSTDX(jj+1,kk) = 0
+            ITGRDX(jj,kk) = 0
+            IINTDX(jj) = 0
+         ENDDO
+         do ii=1,NH_max
+            IHMJDX(NH_max*(JJ-1)+II) = 0
+         enddo
+         do ii=1,NS_max
+            ISMJDX(NS_max*(JJ-1)+II) = 0
+         enddo
+      ENDDO
+
+      SQS   = Ecm
+      S     = SQS*SQS
+      
+      KB = KBEAM
+      KBA = IABS(KBEAM)
+c     add beam particles to parton stack, lvl -2
+      PZ = PAWT(SQS,AM(KBA),AM(13))
+      E1 = SQRT(PZ**2+AM2(KBA))
+      CALL ADD_PRTN(0.D0,0.D0,PZ,E1,AM(KBA),KB,-2,0,IREFout)
+      IF(IMOD.eq.1)THEN
+         IAT = IATARG
+         IF(IATARG.EQ.1)THEN
+            KT(1) = 13
+         ELSE
+            IF(IATARG.eq.0)THEN
+C...  Generate an 'air' interaction by choosing Nitrogen or Oxygen
+               R = S_RNDM(0)
+               IATARG = 14
+               IF (R .LT. FOX)  IATARG = 16
+               if (NDEBUG.gt.0) 
+     *           WRITE(lun,*)'fox,rndm,iatarg,eps:',fox,r,iatarg,eps8
+            ENDIF
+            DO JN=1,IATARG
+c     for nuclear target: proton (13) or neutron (14)
+               KT(JN) = 13 + INT((2.D0-EPS8)*S_RNDM(JN))
+            ENDDO
+         ENDIF
+      ELSE
+         KT(1) = IATARG
+      ENDIF
+
+C...energy-dependent transverse momentum cutoff
+c...EJA correction 2007.03.27
+      IF(IPAR(27).eq.1)THEN
+         PTmin = PAR(10)+PAR(11)*EXP(PAR(12)*SQRT(LOG(SQS)))
+      else
+         PTmin = PAR(10)+PAR(11)*EXP(PAR(12)*SQRT(LOG(S)))
+      endif
+      XMIN = 4.D0*PTmin**2/S
+      ZMIN = LOG(XMIN)
+      IF(ndebug.gt.0)then
+         write(lun,*) ' INI_EVENT: ncall:', ncall
+         write(lun,'(2X,A33,F10.2,1X,F16.2,F8.5,E10.3,F10.5)')
+     &        'INI_EVENT: (SQS,S,PTmin,Xmin,Zmin)',
+     &        SQS,S,PTmin,Xmin,Zmin
+         write(lun,*) ' INI_EVENT: KB,IAT,IATARG,KT',KB,IAT,IATARG
+         write(lun,*) '         ',(KT(jj),jj=1,IATARG)
+      endif
+
+      CALL PTSETUP_4FLV(ECM)
+
+      return
+      END
+C-----------------------------------------------------------------------
+C     parton level administration tools for SIBYLL                \FR'14
+C-----------------------------------------------------------------------
+
+C...  COMMON /S_PRTNS/ : parton stack
+c     PP: 4momentum of parton, px,py,pz,energy,mass
+c     LPID(1): parton id, i.e. flavor (u:1,d:2,s:3,c:4) for quarks
+c     LPID(2): level of parton
+c              fragmenting systems (strings,remnants) are marked as level0
+c              partons that make up these systems are marked as level1
+c     LPID(3): 'downward' reference 
+c               pointer from level1 partons to their level0 parent
+c     LPID(4): 'upward' reference 
+c               pointer from level0 partons to their level-1 parent
+c     LVL0IDX: index cache for level0 partons
+c     NPP: total number of partons on stack
+c     NPP0: number of level0 partons on stack
+
+C=======================================================================
+
+      SUBROUTINE ADD_PRTN(PX,PY,PZ,E,XMS,IPID,LVL,IREFin,IREFout)
+
+C-----------------------------------------------------------------------
+C     routine to add a parton to the stack \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      PP(NPP+1,1) = PX
+      PP(NPP+1,2) = PY
+      PP(NPP+1,3) = PZ
+      PP(NPP+1,4) = E
+      PP(NPP+1,5) = XMS
+      LPID(NPP+1,1) = IPID
+      LPID(NPP+1,2) = LVL     
+      LPID(NPP+1,3) = IREFin
+      NPP = NPP + 1
+c     level0 index
+      IF(LVL.eq.0)THEN
+         LVL0IDX(NPP0+1) = NPP
+         NPP0 = NPP0 + 1
+      ENDIF
+      IREFout = NPP
+      IF(NDEBUG.gt.6)THEN
+         WRITE(LUN,*) ' ADD_PRTN: (#,PID,LEVEL,REF)',
+     &        NPP,LPID(NPP,1),LPID(NPP,2),LPID(NPP,3)
+         WRITE(LUN,*) '  4momentum:        ',(PP(NPP,JJ),JJ=1,5)
+      ENDIF
+      END
+
+C=======================================================================
+
+      SUBROUTINE ADD_PRTN_4VEC(PIN,IPID,LVL,IREFin,IREFout)
+
+C-----------------------------------------------------------------------
+C     wrapper for ADD_PRTN to add 4momentum directly \FR'14
+C----------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DIMENSION PIN(5)
+      SAVE
+
+      CALL ADD_PRTN
+     &     (PIN(1),PIN(2),PIN(3),PIN(4),PIN(5),IPID,LVL,IREFin,IRF)
+      IREFout = IRF
+      END
+
+C=======================================================================
+
+      SUBROUTINE ADD_REF(IDX,Irefin)
+
+C-----------------------------------------------------------------------
+C     routine to add a reference label to a particle
+C     after it has been added to the stack        \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+      
+c      IF(LPID(IDX,3).ne.0)  WRITE(LUN,*)
+c     &     ' ADD_REF: warning particle already has defined reference,',
+c     &     IDX,' overwritting..'
+      IF(NDEBUG.gt.6)
+     &WRITE(LUN,*) ' ADD_REF: (IDX,REFin)',IDX,Irefin
+      LPID(IDX,3) = Irefin
+      END
+
+C=======================================================================
+
+      SUBROUTINE RD_REF(IDX,Irefout)
+
+C-----------------------------------------------------------------------
+C     routine to add a reference label to a particle
+C     after it has been added to the stack        \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      Irefout = LPID(IDX,3)
+      IF(NDEBUG.gt.6)
+     &  WRITE(LUN,*) ' RD_ref: (IDX,REFout)',IDX,Irefout
+      END
+
+C=======================================================================
+
+      SUBROUTINE ADD_INT_REF(IDX,Irefin)
+
+C-----------------------------------------------------------------------
+C     routine to add a reference label to an interaction
+C     after it has been added to the stack        \FR'15
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      IF(NDEBUG.gt.6)
+     &    WRITE(LUN,*) ' ADD_INT_REF: (IDX,REFin)',IDX,Irefin
+      LPID(IDX,4) = Irefin
+      END
+
+C=======================================================================
+
+      SUBROUTINE RD_INT(IDX,Irefout,Iout)
+
+C-----------------------------------------------------------------------
+C     routine to add a reference label to an interaction
+C     after it has been added to the stack        \FR'15
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      Irefout = LPID(IDX,4)
+      IF(Irefout.ne.0) Iout = LPID(Irefout,1)
+      IF(NDEBUG.gt.6)
+     &  WRITE(LUN,*) ' RD_INT: (IDX,REFout,Iint)',IDX,Irefout,Iout
+      END
+
+C=======================================================================
+
+      SUBROUTINE EDT_PRTN(IDX,PX,PY,PZ,EN,XMS,IREFout)
+
+C-----------------------------------------------------------------------
+C     routine to edit a parton already on stack   \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      IF(NDEBUG.gt.6)THEN
+         WRITE(LUN,*) ' EDT_PRTN: (#,PID,LEVEL,REF)',
+     &        IDX,LPID(IDX,1),LPID(IDX,2),LPID(IDX,3)
+         WRITE(LUN,*) '  initial 4momentum:',(PP(IDX,JJ),JJ=1,5)
+      ENDIF
+      PP(IDX,1) = PX
+      PP(IDX,2) = PY
+      PP(IDX,3) = PZ
+      PP(IDX,4) = EN
+      PP(IDX,5) = XMS
+c     return reference to other partons
+      IREFout = LPID(IDX,3)
+      IF(NDEBUG.gt.6)
+     &     WRITE(LUN,*) '  final 4momentum:  ',(PP(IDX,JJ),JJ=1,5)
+      END
+
+C=======================================================================
+
+      SUBROUTINE RD_PRTN(IDX,PX,PY,PZ,EN,XMS,IFL,IREFout)
+
+C-----------------------------------------------------------------------
+C     routine to read a parton from the stack     \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      IF(NDEBUG.gt.6)THEN
+         WRITE(LUN,*) ' RD_PRTN: (#,PID,LEVEL,REF)',
+     &        IDX,LPID(IDX,1),LPID(IDX,2),LPID(IDX,3)
+         WRITE(LUN,*) '  4momentum:        ',(PP(IDX,JJ),JJ=1,5)
+      ENDIF
+      PX = PP(IDX,1)
+      PY = PP(IDX,2)
+      PZ = PP(IDX,3)
+      EN = PP(IDX,4)
+      XMS = PP(IDX,5)
+      IFL = LPID(IDX,1)
+c     return reference to other partons
+      IREFout = LPID(IDX,3)
+      END
+
+C=======================================================================
+
+      SUBROUTINE RD_PRTN_4VEC(IDX,Pin,IFL,IREFout)
+
+C-----------------------------------------------------------------------
+C     routine to read a parton from the stack     \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+
+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
+      DIMENSION Pin(5)
+      SAVE
+
+      IF(IDX.EQ.0) THEN
+         WRITE(LUN,*) ' RD_PRTN_4VEC: invalid index!',IDX
+         xa = -1.D0
+         xa = log(xa)
+         RETURN
+      ELSE         
+         do ii = 1,5
+            PIN(ii) = PP(IDX,ii)
+         enddo
+         IFL = LPID(IDX,1)
+c     return reference to other partons
+         IREFout = LPID(IDX,3)
+         IF(NDEBUG.gt.6)THEN
+            WRITE(LUN,*) ' RD_PRTN: (#,PID,LEVEL,REF)',
+     &           IDX,IFL,LPID(IDX,2),IREFout
+            WRITE(LUN,*) '  4momentum:        ',(PIN(JJ),JJ=1,5)
+         ENDIF
+
+      ENDIF
+      END
+
+C=======================================================================
+
+      SUBROUTINE ITR_LVL0_PRTN(JJ,IDX,LID)
+
+C-----------------------------------------------------------------------
+C     routine that serves as iterator over the level0
+C     partons on the stack                        \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+ 
+      IDX = LVL0IDX(JJ)
+      IF(ndebug.gt.6)
+     &  WRITE(LUN,*) ' ITR_LVL0_PRTN: JJ,IDX',JJ,IDX
+      LID = LPID(IDX,1)
+      IF(JJ+1.gt.NPP0) THEN
+         JJ = -1
+         RETURN
+      ELSE
+         JJ = JJ + 1
+      ENDIF      
+      END
+
+C=======================================================================
+
+      SUBROUTINE INI_PRTN_STCK(NOLD,N0OLD)
+
+C-----------------------------------------------------------------------
+C     reset parton stack                          \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      IF(NDEBUG.gt.6) WRITE(LUN,*) ' PRTN_STCK: reset .. '
+      IF(NDEBUG.gt.6) WRITE(LUN,*) '  old state: NPP,NPP0',NPP,NPP0
+      
+      NPP = NOLD
+      NPP0 = N0OLD
+
+      IF(NDEBUG.gt.6) WRITE(LUN,*) '  new state: NPP,NPP0',NPP,NPP0
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE GET_NPP(NPPLD,NPP0LD)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      NPPLD = NPP
+      NPP0LD = NPP0
+      END
+
+C=======================================================================
+
+      SUBROUTINE GET_LVL0(NPP0LD,IDXLIST)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      DIMENSION IDXLIST(NPP0_max)
+      INTEGER   N
+      SAVE
+
+      NPP0LD = NPP0
+      DO N = 1, NPP0_max
+        IDXLIST(N) = LVL0IDX(N)
+      ENDDO
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE PRNT_PRTN_STCK
+
+C-----------------------------------------------------------------------
+C     as the name suggests, prints the current state
+C     of the parton stack                         
+C     print unit is defined in S_DEBUG:LUN        \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      CHARACTER*5 CDE
+      CHARACTER*9 CODE
+
+      CHARACTER*6 NAMP
+      COMMON /S_CNAM/ NAMP (0:99)
+      SAVE
+
+      WRITE (LUN,50) 
+ 50   FORMAT(3X,88('-'),/,21X,'SIBYLL PARTON LEVEL EVENT SUMMARY',21X,
+     &     /,3X,75('-'),13('-'))
+
+c     beam particles
+      WRITE(LUN,*) '  BEAM PARTICLES'
+ 52   FORMAT(4X,'#',3X,'PID',2x,'LVL',2x,'REF',20x,'PX',9x,'PY',7x,
+     +     'PZ',9x,'E',11X,'Mass', /, 3X,75('-'),13('-'))
+      WRITE (LUN,52)
+      DO J=1,NPP
+         IF(LPID(J,2).eq.-2)then
+            WRITE (LUN,60) J, (LPID(J,KK),KK=1,3), (PP(J,K),K=1,5)
+         ENDIF
+      ENDDO
+c     level -2 format
+ 60   FORMAT(4I5,14X,2F11.3,1p,2E11.3,0p,F9.3)
+      WRITE(LUN,61)
+ 61   FORMAT(3X,75('-'),13('-'))
+
+c     interactions
+      WRITE(LUN,*) '  INTERACTIONS'
+ 62   FORMAT(4X,'#',3X,'PID',2x,'LVL',2x,'REF',20x,'NSOF',8x,'NJET',7x,
+     +     'JDIF',7x,'E',11X,'Mass', /, 3X,75('-'),13('-'))
+      WRITE (LUN,62)
+      DO J=1,NPP
+         IF(LPID(J,2).eq.-1)then
+            WRITE (LUN,63) J, (LPID(J,KK),KK=1,3), (PP(J,K),K=1,5)
+         ENDIF
+      ENDDO
+c     level -1 format
+ 63   FORMAT(4I5,12X,4F12.0,F11.3)
+ 64   FORMAT(3X,75('-'),13('-'))
+      WRITE(LUN,64)
+      
+c     partons
+      WRITE (LUN,100)
+      DO J=1,NPP
+         IF(LPID(J,2).eq.0)then
+            WRITE (LUN,120) J, (LPID(J,KK),KK=1,3), (PP(J,K),K=1,5)
+         elseif(LPID(J,2).eq.1)then
+            CALL KCODE(LPID(J,1),cde,nc)
+            WRITE (LUN,121) J, CDE(1:nc),(LPID(J,KK),KK=2,3), 
+     &           (PP(J,K),K=1,5)
+         elseif(LPID(J,2).eq.2)then
+            CODE = '        '
+            L = LPID(J,1)
+            CODE(1:6) = NAMP(IABS(L))
+            IF (L .LT. 0) CODE(7:9) = 'bar'
+            WRITE (LUN,122) J,CODE,(LPID(J,KK),KK=2,3), (PP(J,K),K=1,5)
+         endif
+      ENDDO
+      CALL PPSUM(1,NPP,Esum,PXsum,PYsum,PZsum,NF)
+      WRITE(LUN,140) PXsum,PYsum,PZsum,Esum
+ 
+ 100  FORMAT(4X,'#',3X,'PID',2x,'LVL',2x,'REF',20x,'PX',9x,'PY',7x,
+     +     'PZ',9x,'E',11X,'Mass', /, 3X,75('-'),13('-'))
+c     level 0 format
+ 120  FORMAT(4I5,14X,2F11.3,1p,2E11.3,0p,F11.3)
+c     level 1 format cjoe
+ 121  FORMAT(I7,1X,A5,2I5,14X,2F11.3,1p,2E11.3,0p,F11.3)
+c     level 2 format
+ 122  FORMAT(I10,1X,A9,2I5,10X,2F11.3,1p,2E11.3,0p,F11.3)
+ 140  FORMAT(3X,75('-'),13('-'),/,'  Tot = ',26X,2F11.3,1p,2e11.3)
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE PPSUM(N1,N2,ETOT,PXT,PYT,PZT,NF)
+
+C-----------------------------------------------------------------------
+C     Return the energy,px,py,pz of level0 partons 
+C     in the list between N1 and N2
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+
+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
+
+      NF=0
+      ETOT=0.D0
+      PXT=0.D0
+      PYT=0.D0
+      PZT=0.D0
+      DO J=N1,N2
+         IF (LPID(J,2) .EQ. 0)  THEN
+           NF = NF+1
+           ETOT = ETOT + ABS( PP(J,4) )
+           PXT = PXT + PP(J,1)
+           PYT = PYT + PP(J,2)
+           PZT = PZT + PP(J,3)
+         ENDIF
+      ENDDO
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE FOUR_LENGTH(XP,XM2)
+
+C-----------------------------------------------------------------------
+C     Calculate the length of a 4vector (+---)    \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION XP(5)
+      SAVE
+
+      XM2 = XP(4)**2 - XP(1)**2 - XP(2)**2 - XP(3)**2
+      END
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION CALC_INVM(XP1,XP2)
+
+C-----------------------------------------------------------------------
+C     Calculate the invariant mass of two 4vectors FR'15
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION XP1(5),XP2(5)
+      SAVE
+
+      CALC_INVM = (XP1(4)+ XP2(4))**2
+      DO I=1,3
+         CALC_INVM = CALC_INVM-(XP1(I)+XP2(I))**2         
+      ENDDO
+      CALC_INVM = SQRT(CALC_INVM)
+      END
+
+C=======================================================================
+      
+      SUBROUTINE GET_XMT2(IDX,XM2)
+
+C-----------------------------------------------------------------------
+C     Calculate the transverse mass of a parton 
+C     on the stack                                \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      XM2 = PP(IDX,1)**2 + PP(IDX,2)**2 + PP(IDX,5)**2
+      END
+C=======================================================================
+
+      SUBROUTINE GET_IMASS2(IDX,XM2)
+
+C-----------------------------------------------------------------------
+C     Calculate the invariant mass squared of a parton 
+C     on the stack  (+---)                        \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      SAVE
+
+      XM2 = PP(IDX,1)**2 + PP(IDX,2)**2 + PP(IDX,3)**2
+      XM2 = PP(IDX,4)**2 - XM2
+      END
+
+C=======================================================================
+
+      SUBROUTINE GET_MASS(IDX,XM)
+
+C-----------------------------------------------------------------------
+C     read mass of parton on stack                \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+
+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
+
+      IF(IDX.EQ.0) THEN 
+         XM2 = 0.D0
+      else
+         XM = PP(IDX,5)
+      ENDIF
+      END
+C=======================================================================
+
+      SUBROUTINE GET_MASS2(IDX,XM2)
+
+C-----------------------------------------------------------------------
+C     read mass of parton on stack                \FR'14
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+
+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
+
+      IF(IDX.EQ.0) THEN 
+         XM2 = 0.D0
+      else
+         XM2 = PP(IDX,5)**2
+      ENDIF
+      END
+
+C=======================================================================
+
+      SUBROUTINE GET_VRTLTY(IDX,XX)
+
+C-----------------------------------------------------------------------
+C     calculate virtuality of parton on stack     \FR'14
+C     = on-shell mass - inv. mass
+C-------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      PARAMETER (NPP_max = 1000, NPP0_max = 500)
+      COMMON /S_PRTNS/ PP(NPP_max,5), LPID(NPP_max,4), LVL0IDX(NPP0_max)
+     &     ,NPP,NPP0
+      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+      SAVE
+
+      IF(IDX.EQ.0) XM2 = 0.D0
+      CALL GET_IMASS2(IDX,xm2)
+      XX = PP(IDX,5)**2-xm2
+      END
+
+C=======================================================================
+
+      SUBROUTINE ADD_4VECS(P1,P2,POUT)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+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
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DIMENSION P1(5),P2(5),POUT(5)
+      SAVE
+
+      DO II=1,4
+         POUT(II) = P1(II) + P2(II)
+      ENDDO
+      CALL FOUR_LENGTH(POUT,XM2)
+      IF(XM2.LT.0)THEN
+c     virtual particle
+         POUT(5) = -1.D0
+         IF(NDEBUG.gt.6)then
+            WRITE(LUN,*)
+     &           ' ADD_4VECS: resulting particle virtual!! (m**2):',XM2
+            WRITE(LUN,*) ' p**2' , POUT(1)**2+POUT(2)**2+POUT(3)**2
+            WRITE(LUN,*) ' E**2: ', POUT(4)**2
+         ENDIF
+      ELSE
+         POUT(5) = sqrt(xm2)
+      ENDIF
+      END
+C=======================================================================
+
+      SUBROUTINE DECPAR (LA,P0,ND,LL,P)
+
+C-----------------------------------------------------------------------
+C...This subroutine generates the decay of a particle
+C.  with ID = LA, and 5-momentum P0(1:5)
+C.  into ND particles of 5-momenta P(j,1:5) (j=1:ND)
+C.
+C.  If the initial particle code is LA=0
+C.  then ND and LL(1:ND) are considered as  input and
+C.  the routine generates a phase space decay into ND
+C.  particles of codes LL(1:nd)
+C.
+C.  june 1992
+C.  This version  contains the decay of polarized muons
+C.  The muon codes are  L =  4 : mu+ R
+C.                          -4 : mu+ L
+C.                           5 : mu- L
+C.                          -5 : mu- R
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      DOUBLE PRECISION CBR
+      INTEGER KDEC,LBARP,IDB
+      COMMON /S_CSYDEC/ CBR(223+16+12+8), KDEC(1338+6*(16+12+8)),
+     &     LBARP(99), IDB(99)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      DIMENSION P0(5), LL(10), P(10,5)
+      DIMENSION PV(10,5), RORD(10), UE(3),BE(3)
+
+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
+      
+C...Phase space decay into the particles in the list
+      IF (LA .EQ. 0)  THEN
+          MAT = 0
+          MBST = 0
+          PS = 0.D0
+          DO J=1,ND
+CDH          following statements corrected by D.H. dec 20.,1995
+             P (J,5) = AM(IABS(LL(J)))
+             PV(J,5) = AM(IABS(LL(J)))
+             PS = PS+P(J,5)
+          ENDDO
+          DO J=1,4
+             PV(1,J) = P0(J)
+          ENDDO
+          PV(1,5) = P0(5)
+          GOTO 140
+      ENDIF
+         
+C...Choose decay channel
+      L = IABS(LA)
+      ND=0
+      IDC = IDB(L)-1
+      IF (IDC+1 .LE.0)  RETURN
+      RBR = S_RNDM(0)
+110   IDC=IDC+1
+      IF(RBR.GT.CBR(IDC))  GOTO 110
+
+      KD =6*(IDC-1)+1
+      ND = KDEC(KD)
+      MAT= KDEC(KD+1)
+      MBST=0
+      IF (MAT .GT.0 .AND. P0(4) .GT. 20.D0*P0(5)) MBST=1
+      IF (MAT .GT.0 .AND. MBST .EQ. 0) 
+     +        BETA = DSQRT(P0(1)**2+P0(2)**2+P0(3)**2)/P0(4)
+      PS = 0.D0
+c     reduce omega mass by 50MeV to allow on-shell N(1710) decay
+      Xmomega = am(32)
+      IF(L.eq.53.or.L.eq.54) AM(32) = AM(32)-0.05D0
+      DO J=1,ND
+         LL(J) = KDEC(KD+1+J)
+         P(J,5)  = AM(LL(J))
+         PV(J,5) = AM(LL(J))
+         PS = PS + P(J,5)
+      ENDDO
+      AM(32) = Xmomega
+      DO J=1,4
+         PV(1,J) = 0.D0
+         IF (MBST .EQ. 0)  PV(1,J) = P0(J)
+      ENDDO
+      IF (MBST .EQ. 1)  PV(1,4) = P0(5)
+      PV(1,5) = P0(5)
+
+140   IF (ND .EQ. 2) GOTO 280
+
+      IF (ND .EQ. 1)  THEN
+         DO J=1,4
+            P(1,J) = P0(J)
+         ENDDO
+         RETURN
+      ENDIF
+
+C...Calculate maximum weight for ND-particle decay
+      WWTMAX = 1.D0/FACN(ND)      
+      PMAX=PV(1,5)-PS+P(ND,5)
+      PMIN=0.D0
+      DO IL=ND-1,1,-1
+         PMAX = PMAX+P(IL,5)
+         PMIN = PMIN+P(IL+1,5)
+         WWTMAX = WWTMAX*PAWT(PMAX,PMIN,P(IL,5))
+      ENDDO
+
+C...generation of the masses, compute weight, if rejected try again
+240   RORD(1) = 1.D0
+      DO 260 IL1=2,ND-1
+        RSAV = S_RNDM(0)
+        DO 250 IL2=IL1-1,1,-1
+          IF(RSAV.LE.RORD(IL2))   GOTO 260
+250     RORD(IL2+1)=RORD(IL2)
+260   RORD(IL2+1)=RSAV
+      RORD(ND) = 0.D0
+      WT = 1.D0      
+      DO 270 IL=ND-1,1,-1
+        PV(IL,5)=PV(IL+1,5)+P(IL,5)+(RORD(IL)-RORD(IL+1))*(PV(1,5)-PS)
+270   WT=WT*PAWT(PV(IL,5),PV(IL+1,5),P(IL,5))
+      IF (WT.LT.S_RNDM(1)*WWTMAX)   GOTO 240
+
+C...Perform two particle decays in respective cm frame
+280   DO 300 IL=1,ND-1
+        PA=PAWT(PV(IL,5),PV(IL+1,5),P(IL,5))
+        UE(3)=2.D0*S_RNDM(IL)-1.D0
+        PHI=TWOPI*S_RNDM(3)
+        UT = DSQRT(1.D0-UE(3)**2)
+        UE(1) = UT*dCOS(PHI)
+        UE(2) = UT*dSIN(PHI)
+        DO 290 J=1,3
+          P(IL,J)=PA*UE(J)
+290     PV(IL+1,J)=-PA*UE(J)
+        P(IL,4)=DSQRT(PA**2+P(IL,5)**2)
+300   PV(IL+1,4)=DSQRT(PA**2+PV(IL+1,5)**2)
+
+C...Lorentz transform decay products to lab frame
+      DO 310 J=1,4
+310   P(ND,J)=PV(ND,J)
+      DO 340 IL=ND-1,1,-1
+        DO 320 J=1,3
+320     BE(J)=PV(IL,J)/PV(IL,4)
+        GA=PV(IL,4)/PV(IL,5)
+        DO 340 I=IL,ND
+          BEP = BE(1)*P(I,1)+BE(2)*P(I,2)+BE(3)*P(I,3)
+          DO 330 J=1,3
+330       P(I,J)=P(I,J)+GA*(GA*BEP/(1.D0+GA)+P(I,4))*BE(J)
+340   P(I,4)=GA*(P(I,4)+BEP)
+      
+C...Weak decays
+      IF (MAT .EQ. 1)  THEN
+         F1=P(2,4)*P(3,4)-P(2,1)*P(3,1)-P(2,2)*P(3,2)-P(2,3)*P(3,3)     
+         IF (MBST.EQ.1)  THEN
+C           WT = P0(5)*P(1,4)*F1
+            WT = P0(5)*(P(1,4)+DBLE(LA/L)*P(1,3))*F1
+         ENDIF
+         IF (MBST.EQ.0)  THEN  
+            WT=F1*(P(1,4)*P0(4)-P(1,1)*P0(1)-P(1,2)*P0(2)-P(1,3)*P0(3))
+            IF(L.lt.50)
+     +           WT= WT-DBLE(LA/L)*(P0(4)*BETA*P(1,4)-P0(4)*P(1,3))*F1
+         ENDIF
+         WTMAX = P0(5)**4/8.D0
+         IF(WT.LT.S_RNDM(0)*WTMAX)   GOTO 240
+      ENDIF
+
+C...Boost back for rapidly moving particle
+      IF (MBST .EQ. 1)   THEN
+         DO 440 J=1,3
+440      BE(J)=P0(J)/P0(4)
+         GA= P0(4)/P0(5)
+         DO 460 I=1,ND
+           BEP=BE(1)*P(I,1)+BE(2)*P(I,2)+BE(3)*P(I,3)
+           DO 450 J=1,3
+450        P(I,J)=P(I,J)+GA*(GA*BEP/(1.D0+GA)+P(I,4))*BE(J)
+460      P(I,4)=GA*(P(I,4)+BEP)
+      ENDIF
+
+C...labels for antiparticle decay
+      IF (LA .LT. 0 .AND. L .GT. 18)  THEN
+           DO J=1,ND
+            LL(J) = LBARP(LL(J))
+         ENDDO
+      ENDIF
+
+      RETURN
+      END
+
+C=======================================================================
+
+      BLOCK DATA DATDEC
+
+C-----------------------------------------------------------------------
+C...initialization of SIBYLL particle data
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      DOUBLE PRECISION CBR
+      INTEGER KDEC,LBARP,IDB
+      COMMON /S_CSYDEC/ CBR(223+16+12+8), KDEC(1338+6*(16+12+8)),
+     &     LBARP(99), IDB(99)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      DOUBLE PRECISION AW,AW2
+      COMMON /S_WIDTH1/ AW(99), AW2(99)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+      CHARACTER*6 NAMP
+      COMMON /S_CNAM/ NAMP (0:99)
+      SAVE
+c     CBR contains the normed sum of the branching ratios of the decay channels
+c     indexed by IDB, i.e. a particle with 4 decay channels will have the entries
+c     [B1/Btot, (B1+B2)/Btot, (B1+B2+B3)/Btot, 1.]
+      DATA CBR /3*1.D0,0.D0,1.D0,1.D0,0.6354D0,0.8422D0,0.8981D0,
+     + 0.9157D0,0.9492D0,1.D0,0.6354D0,0.8422D0,0.8981D0,0.9157D0,
+     + 0.9492D0,1.D0,0.1965D0,0.3224D0,0.4579D0,0.5934D0,0.7967D0,1.D0,
+     + 0.6925D0,1.D0,3*0.D0,0.5D0,1.D0,0.5D0,1.D0,
+     + 0.3941D0,0.7197D0,0.9470D0,0.9930D0,1.D0,                     ! eta
+     + 0.4285D0,0.7193D0,0.9487D0,0.9750D0,0.9973D0,0.9999D0,1.D0,   ! eta'
+     + 3*1.D0,                                                       ! rho-mesons
+     + 0.6670D0,1.D0,                                                ! K*+
+     + 0.4894D0,0.8317D0,0.9850D0,0.9981D0,0.9994D0,0.9997D0,1.D0,   ! phi(1020)
+     + 2*0.D0,                                                       ! (empty)      
+     + 0.6670D0,1.D0,                                                ! K*-
+     + 0.6670D0,1.D0,                                                ! K*0
+     + 0.6670D0,1.D0,                                                ! K*0 bar
+     + 0.8940D0,0.9830D0,1.D0,                                       ! omega
+     + 4*0.D0,                                                       ! (empty)
+     + 0.5160D0,5*1.D0,0.6410D0,2*1.D0,0.67D0,1.D0,0.33D0,2*1.D0,
+     + 0.88D0,0.94D0,1.D0,0.88D0,0.94D0,1.D0,0.88D0,0.94D0,1.D0,0.33D0,
+     + 1.D0,0.67D0,1.D0,0.678D0,0.914D0,1.D0,0.217D0,0.398D0,0.506D0,
+     + 0.595D0,0.684D0,0.768D0,0.852D0,0.923D0,0.976D0,1.D0,0.217D0,
+     + 0.398D0,0.506D0,0.595D0,0.684D0,0.768D0,0.852D0,0.923D0,0.976D0,
+     + 1.D0,0.2490D0,0.4604D0,0.5338D0,0.5703D0,0.7440D0,0.7840D0,
+     + 0.8460D0,0.8880D0,0.9230D0,0.9650D0,1.D0,0.2490D0,0.4604D0,
+     + 0.5338D0,0.5703D0,0.7440D0,0.7840D0,0.8460D0,0.8880D0,0.9230D0,
+     + 0.9650D0,1.D0,0.1666D0,0.3332D0,0.4998D0,0.6664D0,0.8330D0,1.D0,
+     + 0.6770D0,0.9840D0,1.D0,
+     + 0.6770D0,0.9840D0,1.D0,0.6190D0,1.D0,0.6190D0,1.D0,0.0602D0,
+     + 0.1203D0,1.D0,3*1.D0,0.06D0,0.08D0,0.14D0,0.16D0,0.73D0,0.855D0,
+     + 0.98D0,1.D0,0.08D0,0.16D0,0.92D0,1.D0,0.2335D0,0.4283D0,0.6446D0,
+     + 0.7099D0,0.8080D0,0.9080D0,0.9380D0,0.9540D0,0.9840D0,1.D0,
+     + 3*1.D0,0.5D0,1.D0,0.5D0,1.D0,0.08D0,0.16D0,0.92D0,1.D0,0.942D0,
+     + 1.D0,0.942D0,1.D0,0.2493D0,0.4061D0,0.5602D0,0.6860D0,0.7608D0,
+     + 0.8305D0,0.8818D0,0.9277D0,0.9691D0,1.D0,0.2493D0,0.4061D0,
+     + 0.5602D0,0.6860D0,0.7608D0,0.8305D0,0.8818D0,0.9277D0,0.9691D0,
+     + 1.D0,
+     & 0.466D0,0.7D0,0.899D0,1.D0,0.466D0,0.7D0,0.899D0,1.D0, ! N1440+-
+     & 0.3334D0,0.5D0,0.6334D0,0.7634D0,0.8734D0,0.9394D0,1.D0, ! N1710+
+     & 0.3334D0,0.5D0,0.6334D0,0.7634D0,0.8734D0,0.9394D0,1.D0, ! N1710-
+     & 0.5D0, 1.D0, 0.5D0, 1.D0, 0.5D0, 1.0D0, ! pi1+-0      
+     & 0.6666D0,1.D0, 0.6666D0,1.D0,0.6666D0,1.D0,0.6666D0,1.D0/ ! K0*
+      DATA AM / 0.0,2*0.511D-3, 2*0.10566, 0.13497, 2*0.13957,
+     +   2*0.49368, 2*0.49761, 0.93827, 0.93957, 4*0.0,0.93827,
+     +   0.93957, 2*0.49761, 0.54785,0.95766,2*0.76690,0.76850,
+     +   2*0.89166D0,2*0.89600,0.78265,1.01946D0,1.18937D0,1.19264D0,
+     +   1.19745,1.31486,1.32171,1.11568,1.23100,1.23500,
+     +   1.23400,1.23300,1.38280,1.38370,1.38720,
+     +   1.53180,1.53500,1.67245,0.,1.44,1.44,1.71,1.71,4*0.0,
+     +   2*1.86926,1.30,1.30,1.30,4*1.430, 3*0.0,      
+     +   2*1.86484,2.9803,2*1.9685,2*2.1123,2*2.01027,2*2.00697,
+     +   0.0,3.09692,2.45402,2.4529,2.45376,2.4679,2.4710,
+     +   2.28646, 2*1.777, 2*0.0, 2.5184,2.5175, 2.5180, 2.6466,
+     +   2.6461, 2.6975 /
+      DATA AM2 /0.0,2*2.61121D-07,2*0.011164,0.018217,0.019480,
+     + 0.019480,0.243720,0.243720,0.247616,0.247616,0.880351,
+     + 0.882792,0.000000,0.000000,0.000000,0.000000,0.880351,
+     + 0.882792,0.247616,0.247616,0.300140,0.917113,0.588136,
+     + 0.588136,0.590592,0.795058,0.795058,0.802816,0.802816,
+     + 0.612541,1.039299,1.414601,1.422390,1.433887,1.728857,
+     + 1.746917,1.244742,1.515361,1.525225,1.522765,1.520289,
+     + 1.912136,1.914626,1.924324,2.346411,2.356225,2.797022,
+     + 0.,2.0736,2.0736,2.9241,2.9241,4*0.0, 2*3.49414,
+     + 1.690, 1.690, 1.690, 4*2.0449, 3*0.0, 2*3.477628, 8.882188,       
+     + 2*3.8750,2*4.4618,2*4.041186,2*4.027928, 0.0, 9.590914, 6.022214,
+     + 6.016718, 6.020938,6.09053, 6.105841, 5.227899, 2*3.158, 2*0.0,
+     + 6.342339, 6.337806, 6.340323,7.004492, 7.001845, 7.276506/
+      DATA AW /24*0.D0,0.022231D0,0.022231D0,0.022231D0,0.002581D0,
+     &     0.002581D0,0.D0,0.D0,7.20801D-05,1.81476D-05,6*0.D0,
+     &     0.013689D0,0.013689D0,0.013689D0,0.013689D0,0.001296D0,
+     &     0.001295D0,0.00155D0,8.281D-05,9.801D-05,0.D0,0.D0,0.09D0,
+     &     0.01D0,0.09D0,0.01D0,6*0.D0,0.1D0,0.1D0,0.1D0,4*0.27D0,
+     &     32*0.D0/
+      DATA AW2 /24*0.D0,0.022231D0,0.022231D0,0.022231D0,0.002581D0,
+     &     0.002581D0,0.D0,0.D0,7.20801D-05,1.81476D-05,6*0.D0,
+     &     0.013689D0,0.013689D0,0.013689D0,0.013689D0,0.001296D0,
+     &     0.001295D0,0.00155D0,8.281D-05,9.801D-05,0.D0,0.D0,0.09D0,
+     &     0.01D0,0.09D0,0.01D0,6*0.D0,0.01D0,0.01D0,0.01D0,4*0.0729D0,
+     &     32*0.D0/
+c     IDB is the index to the branching ratios (CBR) and decay channels (KDEC).
+c     always indicates the first decay channel
+      DATA IDB /
+     +     0,0,0,1,2,                                        ! leptons
+     +     3,5,6,7,13,19,25,                                 ! pions and kaons
+     +     8*0,30,32,34,39,46,47,48,49,60,62,64,66,51, !69,       ! meson resonances
+     +     73,75,76,77,78,79,81,82,84,86,87,90,93,96,98,100, ! baryons : Sibyll 2.1
+     +     0,224,228,232,239,4*0,                            ! Nucleon resonaces
+     +     103,113,246,248,250, 252,254,256,258,3*0,      
+     +     123,134,145,204,214,200,202,151,154,157,159,0,
+     +     161,164,165,166,167,175,179,4*0,189,190,191,192,194,196 /
+c     KDEC contains decay channels, format is [ND, MAT, LL(1:4)]
+c     where ND is the number of particles in the final state (max 4)
+C     MAT is 0, 1 for semi-leptonic (weak decay) or not
+c     (adds primitive matrix element)
+c     LL(1:4) are the particle ids of the final state particles
+      DATA KDEC /
+     + 3,1,15,2,18,0,3,1,16,3,17,0,2,0,1,1,8*0,2,0,4,17,0,0,2,0,5,18,0,
+     + 0,2,0,4,17,0,0,2,0,7,6,0,0,3,0,7,7,8,0,3,0,7,6,6,0,3,1,17,4,6,0,
+     + 3,1,15,2,6,0,2,0,5,18,0,0,2,0,8,6,0,0,3,0,8,8,7,0,3,0,8,6,6,0,3,
+     + 1,18,5,6,0,3,1,16,3,6,0,3,0,6,6,6,0,3,0,7,8,6,0,3,1,18,5,7,0,3,
+     + 1,17,4,8,0,3,1,16,3,7,0,3,1,15,2,8,0,2,0,7,8,0,0,2,0,6,6,20*0,1,
+     + 0,11,3*0,1,0,12,0,0,0,1,0,11,0,0,0,1,0,12,0,0,0,2,0,1,1,0,0,3,0,
+     + 6,6,6,0,3,0,7,8,6,0,3,0,1,7,8,0,3,0,1,3,2,0,
+     + 3,0,7,8,23,0, 3,0,6,6,23,0, 2,0,1,27,0,0, 2,0,1,32,0,0,           ! eta'
+     + 2,0,1,1,0,0, 3,0,6,6,6,0, 3,0,1,4,5,0,                            ! eta'
+     + 2,0,7,6,0,0,                                                      ! rho+
+     + 2,0,8,6,0,0,                                                      ! rho-
+     + 2,0,7,8,0,0,                                                      ! rho0
+     + 2,0,21,7,0,0, 2,0,9,6,0,0,                                        ! K*+
+     + 2,0,9,10,0,0, 2,0,11,12,0,0, 3,0,7,8,6,0, 2,0,1,23,0,0,           ! phi(1020)
+     + 2,0,1,6,0,0, 2,0,2,3,0,0, 2,0,4,5,0,0,                            ! phi(1020)                  
+     + 12*0,
+     + 2,0,22,8,0,0, 2,0,10,6,0,0,                                       ! K*-
+     + 2,0,9,8,0,0, 2,0,21,6,0,0,                                        ! K*0
+     + 2,0,10,7,0,0, 2,0,22,6,0,0,                                       ! K*0 bar
+     + 3,0,7,8,6,0, 2,0,1,6,0,0, 2,0,7,8,0,0,                            ! omega
+     + 24*0,
+     + 2,0,13,6,0,0,2,0,14,7,0,0,2,0,39,1,0,0,2,                         ! baryons
+     + 0,14,8,0,0,2,0,39,6,0,0,2,0,39,8,0,0,2,0,13,8,0,0,2,0,
+     + 14,6,0,0,2,0,13,7,0,0,2,0,13,6,
+     + 0,0,2,0,14,7,0,0,2,0,13,8,0,0,2,0,14,6,0,0,2,0,14,8,0,0,2,0,
+     + 39,7,0,0,2,0,34,6,0,0,2,0,35,7,0,0,2,0,39,6,0,0,2,0,34,8,0,0,
+     + 2,0,36,7,0,0,2,0,39,8,0,0,2,
+     + 0,35,8,0,0,2,0,36,6,0,0,2,0,37,6,0,0,2,0,38,7,0,0,2,0,
+     + 37,8,0,0,2,0,38,6,0,0,2,0,39,10,0,0,2,0,37,8,0,0,2,0,38,6,0,0,
+     + 3,0,22,7,6,0,3,0,22,9,22,0,2,0,22,7,0,0,3,1,2,15,22,0,3,1,4,17,
+     + 22,0,3,1,2,15,31,0,3,1,4,17,31,0,2,0,31,25,0,0,3,0,33,7,6,0,
+     + 3,0,10,7,7,0,
+     + 3,0,21,8,6,0,3,0,21,10,21,0,2,0,21,8,0,0,3,1,3,16,21,0,3,1,5,18,
+     + 21,0,3,1,3,16,30,0,3,1,5,18,30,0,2,0,30,26,0,0,3,0,33,8,6,0,
+     + 3,0,9,8,8,0,
+     + 2,0,29,7,0,0,2,0,31,6,0,0,2,0,22,6,0,0,2,0,10,7,0,0,2,0,31,27,0,
+     + 0,2,0,30,27,0,0,2,0,29,25,0,0,3,1,2,15,10,0,3,1,2,15,29,0,
+     + 3,1,4,17,10,0,3,1,4,17,29,0,
+     + 2,0,28,8,0,0,2,0,30,6,0,0,2,0,21,6,0,0,2,0,9,8,0,0,2,0,30,27,0,
+     + 0,2,0,31,27,0,0,2,0,28,26,0,0,3,1,3,16,9,0,3,1,3,16,28,0,
+     + 3,1,5,18,9,0,3,1,5,18,28,0,
+     + 3,0,6,21,22,0,3,0,6,9,10,0,3,0,23,6,6,0,3,0,23,7,8,0,3,0,24,6,6,
+     + 0,3,0,24,7,8,0,
+     + 2,0,71,7,0,0,2,0,59,6,0,0,2,0,59,1,0,0,
+     + 2,0,72,8,0,0,2,0,60,6,0,0,2,0,60,1,0,0,
+     + 2,0,71,6,0,0,2,0,71,1,0,0,2,0,72,6,0,0,2,0,72,1,0,0,
+     + 2,0,2,3,0,0,2,0,4,5,0,0,3,0,6,7,8,0,
+     + 2,0,89,7,0,0,2,0,89,6,0,0,2,0,89,8,0,0,
+     + 3,1,2,15,22,0,3,1,2,15,33,0,3,1,4,17,22,0,3,1,4,17,33,0,2,0,7,22,
+     + 0,0,2,0,9,22,0,0,2,0,7,33,0,0,2,0,9,33,0,0,
+     + 3,1,2,15,10,0,3,1,4,17,10,0,2,0,7,10,0,0,2,0,9,10,0,0,
+     + 3,0,7,10,13,0,3,0,7,22,14,0,3,0,7,8,13,0,3,0,9,10,13,0,3,0,9,22,
+     + 14,0,3,0,22,8,40,0,3,1,2,15,39,0,3,1,2,15,14,0,3,1,4,17,39,0,3,
+     + 1,4,17,14,0,
+     + 2,0,89,7,0,0,2,0,89,6,0,0,2,0,89,8,0,0,
+     + 2,0,87,6,0,0,2,0,87,1,0,0,2,0,88,6,0,0,2,0,88,1,0,0,
+     + 3,1,2,15,10,0,3,1,4,17,10,0,2,0,7,10,0,0,2,0,9,10,0,0 ,
+     + 2,0,74,1,0,0 ,2,0,74,6,0,0 , 2,0,75,1,0,0 ,2,0,75,6,0,0, !C=1,S=1 mesons
+     + 2,0,23,25,0,0, 4,0,9,10,7,6, 3,0,9,10,7,0, 2,0,33,7,0,0, 
+     + 3,1,23,2,15,0, 3,1,33,2,15,0, 2,0,23,7,0,0, 4,0,12,10,7,7,
+     + 2,0,9,12,0,0, 4,0,7,8,7,8, 2,0,23,26,0,0, 4,0,10,9,8,6, !  | D*(_s)
+     + 3,0,10,9,8,0, 2,0,33,8,0,0, 3,1,23,3,16,0, 3,1,33,3,16,0,! v
+     + 2,0,23,8,0,0, 4,0,12,9,8,8, 2,0,10,12,0,0, 4,0,7,8,7,8, ! ----
+     & 2,0,14,7,0,0, 2,0,13,6,0,0, 3,0,14,7,6,0, 3,0,13,7,8,0, ! N-res
+     & 2,0,13,8,0,0, 2,0,14,6,0,0, 3,0,13,6,8,0, 3,0,14,7,8,0, 
+     & 3,0,14,7,6,0, 3,0,13,7,8,0, 2,0,14,7,0,0, 2,0,13,32,0,0,  
+     & 2,0,39,9,0,0, 2,0,13,6,0,0, 2,0,13,23,0,0,
+     & 3,0,13,8,6,0, 3,0,14,7,8,0, 2,0,13,8,0,0, 2,0,14,32,0,0,  
+     & 2,0,39,21,0,0, 2,0,14,6,0,0, 2,0,14,23,0,0, ! ---
+     & 2,0,25,8,0,0, 2,0,26,7,0,0,    ! pi10 |  
+     & 2,0,25,6,0,0, 2,0,27,7,0,0,    !  +   v
+     & 2,0,27,8,0,0, 2,0,26,6,0,0,    !  -  ---
+     & 2,0,21,7,0,0, 2,0,9,6,0,0, 2,0,22,8,0,0, 2,0,10,6,0,0,    ! k0* |  
+     & 2,0,9,8,0,0, 2,0,21,6,0,0, 2,0,10,7,0,0, 2,0,22,6,0,0/ !        v
+      DATA LBARP/1,3,2,5,4,6,8,7,10,9,11,12,-13,-14,16,15,18,17,13,14,
+     +  22,21,23,24,26,25,27,29,28,31,30,32,33,-34,-35,-36,-37,-38,-39,
+     +  -40,-41,-42,-43,-44,-45,-46,-47,-48,-49,0,-51,-52,-53,-54,4*0,
+     +  60,59,61,63,62,65,64,67,66,3*0,72,71,
+     +  73,75,74,77,76,79,78,81,80,0,83,-84,-85,-86,-87,-88,-89,
+     +  91,90,93,92,-94,-95,-96,-97,-98,-99 /
+      DATA ICHP /0,1,-1,1,-1,0,1,-1,1,-1,0,0,1,0,4*0,-1,0,4*0, !24
+     + 1,-1,0,1,-1,4*0,1,0,-1,0,-1,0,2,1,0,-1,1,0,-1,0,-1,-1,  !49
+     + 0,1,0,1,0,4*0,1,-1,0,1,-1,1,-1,0,0,3*0,                 !70
+     + 0,0,0,1,-1,1,-1,1,-1,0,0,0,                             !82
+     + 0,2,1,0,1,0,1,1,-1,2*0,2,1,0,1,0,0 / ! charmed baryons + tau
+
+      DATA ISTR /8*0,-1,+1,-1,-1,8*0,-1,+1,5*0,-1,+1,-1,+1,2*0, ! mesons
+     +     3*1,2*2,1,4*0,3*1,2*2,3,0,4*0, ! 54
+     +     4*0,2*0,3*0,-1,1,-1,1,3*0,2*0,0,-1,1,-1,1,2*0,2*0,0,0, ! 83
+     +     3*0,2*1,0,4*0,3*0,2*1,2 / ! charmed baryons
+      DATA IBAR /12*0,2*1,4*0,2*-1,13*0,16*1,0,4*1,4*0,
+     +     2*0,10*0,2*0,0,4*0,2*0,2*0,0,0,6*1,4*0,6*1 /
+      DATA ICHM /58*0,1,-1,10*0,1,-1,0,1,-1,+1,-1,1,-1,1,-1,0,0,
+     +     6*1,4*0,6*1/
+      DATA NAMP /
+     +     '     ','gam   ','e+','e-','mu+','mu-','pi0',
+     +     'pi+','pi-','k+', 'k-', 'k0l','k0s',
+     +     'p', 'n', 'nue', 'nueb', 'num', 'numb', 'pbar', 'nbar',
+     +     'k0', 'k0b', 'eta', 'etap', 'rho+', 'rho-','rho0',
+     +     'k*+','k*-','k*0','k*0b','omeg', 'phi', 'SIG+', 'SIG0',
+     +     'SIG-','XI0','XI-','LAM','DELT++','DELT+','DELT0','DELT-',
+     +     'SIG*+','SIG*0','SIG*-', 'XI*0', 'XI*-', 'OME-',
+     +     '     ','N144_+','N144_0','N171_+','N171_0',
+     +     4*'     ', 'D+', 'D-','pi1_0 ','pi1_+ ','pi1_- ',
+     +     'k0*_+','k0*_-','k0*_0','k0*_0b',
+     +     3*'     ', 'D0', 'D0b', 'eta_c', 
+     +     'D_s+','D_s-','D*_s+','D*_s-','D*+', 'D*-', 'D*0', 'D*0b',
+     +     '     ', 'J/psi',
+     +     'SIGc++', 'SIGc+', 'SIGc0','XI_c+','XI_c0','LAM_c+',
+     +     'tau+  ','tau-  ','nut   ','nutb  ',
+     +     'SIc*++','SIGc*+','SIGc*0', 'XI_c*+', 'XI_c*0',
+     +     'OME_c0'  /
+      END
+C->
+C=======================================================================
+
+      SUBROUTINE DECPR (LUN)
+
+C-----------------------------------------------------------------------
+C...Print on unit LUN the list of particles and decay channels
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      DOUBLE PRECISION CBR
+      INTEGER KDEC,LBARP,IDB
+      COMMON /S_CSYDEC/ CBR(223+16+12+8), KDEC(1338+6*(16+12+8)),
+     &     LBARP(99), IDB(99)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      DOUBLE PRECISION AW,AW2
+      COMMON /S_WIDTH1/ AW(99), AW2(99)
+
+      CHARACTER*6 NAMP
+      COMMON /S_CNAM/ NAMP (0:99)
+      DIMENSION LL(4)
+      SAVE
+      
+ 100  FORMAT(/,1X,75('-'),/,28X,'SIBYLL DECAY TABLE')
+      WRITE(LUN,100)
+ 101  FORMAT(1X,75('-'),/,2X,'PID',1X,'Particle',6X,'Mass',9X,'Width',/,
+     +     4X,'Channel',1X,'Br.frac.',1X,'Nf',2X,'MAT',1X,
+     +     'Final Particles',/,1X,75('-'))
+      WRITE(LUN,101)
+      DO L=1,99
+         IF(MOD(L,10).EQ.0)WRITE(LUN,101)
+         IDC = IDB(L)-1
+         NC = 0
+         WRITE (LUN,10) L,NAMP(L), AM(L), AW(L)
+         IF(IDC+1 .GT. 0)  THEN
+            CB = 0.D0
+110         IDC=IDC+1
+            NC = NC+1
+            CBOLD = CB
+            CB = CBR(IDC)
+            BR = CB-CBOLD
+            KD = 6*(IDC-1)+1
+            ND = KDEC(KD)
+            MAT= KDEC(KD+1)
+            DO J=1,ND
+               LL(J) = KDEC(KD+1+J)
+            ENDDO
+            WRITE (LUN,15) NC,BR,ND,MAT, (NAMP(LL(J)),J=1,ND)
+            IF (CB .LT. 1.D0)  GOTO 110
+         ENDIF
+      ENDDO
+      RETURN
+10    FORMAT(2X,I3,2X,A6,3X,F10.4,3X,F10.4)
+15    FORMAT(5X,I2,2X,F9.4,I4,I4,2X,3(A6,2X))
+      END
+
+C=======================================================================
+
+      SUBROUTINE DEC_DEBUG (L,P0, ND, LL, PD)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      CHARACTER*6 NAMP
+      COMMON /S_CNAM/ NAMP (0:99)
+      DIMENSION P0(5), LL(10), PD(10,5)
+      SAVE
+
+      ETOT = 0.D0
+      DO J=1,ND
+         ETOT = ETOT + PD(J,4)
+      ENDDO
+      WRITE(*,*)  NAMP(IABS(L)),' -> ', (NAMP(IABS(LL(J))),J=1,ND)
+      WRITE(*,*)  ' Ei, Ef = ', P0(4), ETOT, ' L = ', L
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE DEC_INI
+
+C-----------------------------------------------------------------------
+C     decay initialization routine
+C     sets which particles should decay and wich should be stable
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      DOUBLE PRECISION CBR
+      INTEGER KDEC,LBARP,IDB
+      COMMON /S_CSYDEC/ CBR(223+16+12+8), KDEC(1338+6*(16+12+8)),
+     &     LBARP(99), IDB(99)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      SAVE
+      
+      if ( ndebug .gt. 0 ) then
+        write(lun,*)' -----------------------------------------'
+        write(lun,*)' SIBYLL DEC_INI: setting particle decays!'
+        write(lun,*)'  to be used in stand-alone SIBYLL only ! '
+        write(lun,*)' -----------------------------------------'
+      endif
+      
+C...  Definition of stable particles
+      DO J=4,12
+         IDB(J) = -abs(IDB(J))
+      ENDDO
+c----------------------------------------------------------
+c     if the folowing is commented out then all particles
+c     except leptons, protons and neutrons are UNSTABLE
+c----------------------------------------------------------
+c     all particles with t<0.3e-10s are considered unstable
+c     i.e. all the mesons from K0s onwards(K0l is stable)
+c----------------------------------------------------------
+C     K0s stable
+      if (ndebug .gt. 0 ) write(lun,*)' making K0s stable..'
+      IDB(12) = -abs(IDB(12))
+
+C     Lambda/Anti-lambda stable
+      if (ndebug .gt. 0 ) write(lun,*)' making LAMBDA stable..'
+      IDB(39) = -abs(IDB(39))
+
+c     Sigmas stable
+      if (ndebug .gt. 0 ) write(lun,*)' making SIGMAs stable..'
+      do i=34,36
+         IDB(i) = -abs(IDB(i))
+      enddo
+      IDB(35) = -abs(IDB(35))
+C     Eta stable
+cfr   in reasonable contex eta is never stable !
+      
+cdh  initializing the pythia routines is done in corsika/SIBINI
+c     IF(IPAR(44).eq.1)THEN
+c     use pythia decay routine
+c        if (ndebug .gt. 0 ) write(LUN,*) ' using PYTHIA decay routine...'
+c        CALL PYDEC_INI
+c     endif
+
+      if (ndebug .gt. 0 ) 
+     *       write(lun,*)' ------------------------------------------'
+      end
+C=======================================================================
+
+      SUBROUTINE STRING_FRAG_4FLV
+     +     (E0,IFL1,IFL2,PX1,PY1,PX2,PY2,IFBAD,IFQRK)
+
+C-----------------------------------------------------------------------
+C.  This routine fragments a string of energy E0
+C.  the ends of the strings  have flavors IFL1 and IFL2
+C.  the particles produced are in the  jet-jet frame
+C.  with IFL1 going in the +z direction
+C.     E0 = total energy in jet-jet system
+C.  This version consider also a primordial pT attached
+C.  to the ends of the string PX1,PY1,  PX2,PY2
+C.  OUTPUT:  IFBAD =1  kinematically impossible decay
+c       2010.03.11 ifqrk - leading quark flag
+c       1 in valence quark, 0 in others
+c
+c      Modified Nov. 91.  RSF and TSS to fragment symmetrically
+c      ie forward and backward are fragmented as leading.
+c      Change- Dec. 92  RSF.  call to ptdis moved- to use flavor
+c      of NEW quark in fragmentation.
+c
+c     includes 4 FLAVORS \FR'13
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      DOUBLE PRECISION ZLIST
+      COMMON /S_ZLIST/ ZLIST(8000)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+      DOUBLE PRECISION FAin, FB0in
+      COMMON /S_CZDIS/ FAin, FB0in
+
+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
+
+      INTEGER LRNK
+      COMMON /SIB_RNK/ LRNK(8000)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+      DIMENSION WW(2,2), PTOT(4), PX(3),PY(3),IFL(3),ILEAD(2)
+      DIMENSION LPOINT(8000), PMQ(3), IRNK(2), LRES(6:99)
+      LOGICAL LRANK
+      SAVE
+      DATA LRANK/.true./
+
+      DATA (LRES(I),I=6, 39)
+     &     /27,25,26,28,29,9,9,41,42,19*0,44,45,46,47,48,39/
+      DATA (LRES(I),I=40, 49) /40,41,42,43,44,45,46,47,48,49/
+      DATA (LRES(I),I=50, 83) 
+     &     /0,51,52,53,54,4*0,78,79,10*0,71,72,73,76,77,76,
+     &     77,78,79,80,81,0,83/
+      DATA (LRES(I),I=84, 99) /94,95,96,97,98,89,4*0,94,95,96,97,98,99/
+      
+      IF(Ndebug.gt.3) THEN
+        WRITE(LUN,*)
+     &        ' STRING_FRAG_4FLV: called with ',
+     &        '(E0,IFL1,IFL2,PX1,PY1,PX2,PY2,IVAL)',
+     &        E0,IFL1,IFL2,PX1,PY1,PX2,PY2,IFQRK
+        WRITE(LUN,*)' STRING_FRAG_4FLV: NP before fragmentation:',NP
+      ENDIF
+
+c...  remember initial values
+c     strange fraction
+      par2_def = PAR(2)
+c     vector model
+      IPAR11_def = IPAR(11)
+c     vector fraction
+      PAR5_def = PAR(5)      
+c     charm fraction
+      PAR24_def = PAR(24)
+c     popcorn fraction
+      PAR8_def = PAR(8)
+
+C...initialise
+      NTRY = 0
+      IFBAD = 0
+ 200  NTRY = NTRY + 1
+
+c     reset parameters after rejection
+      PAR(2) = PAR2_def
+      PAR(5) = PAR5_def
+      PAR(24) = PAR24_def
+      IPAR(11) = IPAR11_def
+      PAR(8) = PAR8_def
+
+      IF (NTRY .GT. 50)  THEN
+         IFBAD = 1
+         RETURN
+      ENDIF
+      I = NP
+      DO K=1,2
+         WW(K,1) = 1.D0
+         WW(K,2) = 0.D0
+         IRNK(K) = 0
+      ENDDO
+      PX(1) = PX1
+      PY(1) = PY1
+      PX(2) = PX2
+      PY(2) = PY2
+      PX(3) = 0.D0
+      PY(3) = 0.D0
+      PTOT (1) = PX1+PX2
+      PTOT (2) = PY1+PY2
+      PTOT (3) = 0.D0
+      PTOT (4) = E0
+c     turn on/off splitting of leading diquark
+c     (1: no splitting, 0: diq may be split, producing leading meson)
+      IFL(1) = IFL1+ISIGN(100,IFL1)*MIN(1,IABS(IFL1)/10)*IPAR(90)
+      IFL(2) = IFL2+ISIGN(100,IFL2)*MIN(1,IABS(IFL2)/10)*IPAR(90)     
+      PMQ(1) = QMASS(IFL(1))
+      PMQ(2) = QMASS(IFL(2))
+
+      ILEAD(1) = 0
+      ILEAD(2) = 0
+      IBLEAD = 0
+      IF(IABS(IFQRK).eq.1) THEN
+         ILEAD(1) = 1
+         ILEAD(2) = 1
+      ENDIF
+c     switch leading baryon fragmentation function on/off
+      IF(IPAR(20).eq.0) GOTO 300
+c     set flags for leading baryon
+C
+C      SET FLAG FOR GENERATION OF LEADING PARTICLES. 
+C      "AND" IS FOR PPBAR ( DIQUARK AT BOTH ENDS)
+C      "OR" IS FOR PP, PPI, ( DIQUARK AT ONE END.)
+C
+      IF (IABS(IFL1) .GT. 10 .AND. IABS(IFL2) .GT. 10)  THEN
+         IBLEAD = 2
+         I = I+1
+         JT = INT(1.5D0+S_RNDM(0))
+         GOTO 350
+      ENDIF         
+      IF (IABS(IFL1) .GT. 10 .OR. IABS(IFL2) .GT. 10)  THEN
+         IBLEAD = 1
+         I = I+1
+         JT = 2
+         IF (IABS(IFL2) .GT. 10) JT = 1
+         GOTO 350
+      ENDIF         
+
+C...produce new particle: side, pT
+ 300  continue
+      I=I+1
+      if(i.gt.8000) then
+        write(LUN,'(1x,a,i8)') 
+     &        ' STRING_FRAG_4FLV: no space left in S_PLIST:',I
+        CALL SIB_REJECT('STRING_FRAG_4FLV')
+      endif
+      IF (IBLEAD .GT. 0)  THEN
+         JT = 3 - JT   
+         GO TO 350              
+      ENDIF
+c     
+c 349  continue
+c     choose side (1 or 2)
+      JT=INT(1.5D0+S_RNDM(0))
+c     set 'other' side
+ 350  JR=3-JT
+c     remember side particle was produced
+      LPOINT(I) = JT
+c     increase rank counter
+      IRNK(JT) = ISIGN(ABS(IRNK(JT))+1,1-JT)
+c     set particle rank
+      LRNK(I) = IRNK(JT)
+
+      nporig(I)= Ipflag*2 + KINT
+      niorig(I)= iiflag
+      IF(ILEAD(JT).eq.1) nporig(I)= -1 * nporig(I)
+      nforig(I) = 0
+
+ 555  CONTINUE
+c
+c.... CHARM config
+c
+      charmPARdef=PAR(24)
+      IF(IPAR(15).lt.9)THEN
+c     no s->c
+         PAR(24) = 0.D0
+         IF (IFQRK.EQ.1) THEN
+c     ifqrk = 1 (valence quark attatched) 
+            IF(IPAR(15).ge.1) THEN
+c     enforce s->c at string end
+               IF(ILEAD(JT).eq.1) PAR(24)=charmPARdef
+c     produce charm in all strings
+               IF(IPAR(15).eq.8) PAR(24)=charmPARdef
+            ELSE
+c     compatibility to broken version
+               PAR(24)=charmPARdef
+            ENDIF
+         ELSE
+c     no val. quark at string end or diff
+            PAR(24)=charmPARdef
+         ENDIF
+      ENDIF
+c
+C.... Vector meson config
+c
+c     increase vec.meson ratio for leading particle in str. diff.
+      IF(IFQRK.eq.-1)THEN
+         IF(IPAR(66).eq.1)THEN
+            IF(ILEAD(JT).EQ.1)THEN
+              IF(IBAR(IABS(kb)).eq.0.or.IPAR(70).eq.1) PAR(5) = PAR(113)
+           ENDIF
+        ELSEIF(IPAR(66).eq.2)THEN
+            IF(IBAR(IABS(kb)).eq.0.or.IPAR(70).eq.1) PAR(5) = PAR(113)
+
+        ELSEIF(IPAR(66).eq.3)THEN
+c     increase vector meson rate for meson beam
+c     on beam side (rank+) only!            
+            IF(ILEAD(JT).EQ.1)THEN               
+               IF(IBAR(IABS(kb)).eq.0.and.IRNK(JT).gt.0)
+     &              PAR(5) = PAR(113)
+c     always incr. vector rate for diff. strings independent of beam type
+               IF(IPAR(70).eq.1) PAR(5) = PAR(113)               
+            ENDIF         
+            
+         ENDIF           
+      endif
+      
+c...  switch off for proton beam
+      IF(IPAR(31).eq.1)then
+c         print*,'ipar11,ipar11def,1-kb/13,kb',IPAR(11),ipar11_def,
+c     +        max((1-iabs(kb)/13),0),kb
+         IPAR(11) = IPAR(11)*max((1-iabs(kb)/13),0) ! meson beam only
+      endif
+c     increase vec.meson ratio for leading quarks
+      IF(IABS(IFQRK).eq.1)THEN
+         IF(IPAR(11).le.-5.and.IPAR(11).ge.-7
+     &        .and.ilead(jt).eq.1)
+     &        PAR(5) = 9.D0
+         
+c     increase vec.meson ratio for diff.
+         IF(IFQRK.eq.-1.and.IPAR(11).le.-4.and.IPAR(11).ge.-7)
+     &        PAR(5) = 9.D0
+
+c     increase vec.meson ratio for leading particle in str. diff. (lvec16)
+         IF(IFQRK.eq.-1.and.IPAR(11).le.-11.and.ILEAD(JT).EQ.1)
+     &        PAR(5) = 99.D0
+      ENDIF
+
+c...  suppress leading charm for pion and kaon beams
+      IF(IPAR(15).eq.11)then
+         IF((1-IABS(KB)/13)*ILEAD(JT).gt.0) PAR(24)=0.D0
+      ENDIF
+
+C...  suppress rank-1 baryon through popcorn
+      IF(IBLEAD .GT. 0.and.abs(ifl(jt)).gt.10
+     &     .and.abs(ifl(3)).lt.10) PAR(8)=PAR(63)*PAR(8)
+
+C...  leading strange/charm
+      IF(ILEAD(JT).eq.1.and.IPAR(39).gt.0) PAR(2) = PAR(65)
+      
+c     scale valence string end charm for assoc. prod.      
+      IF(IPAR(41).eq.1)THEN
+         IF(ILEAD(JT).eq.1.and.IFQRK.eq.1) PAR(24) = PAR(71)*PAR(24)
+      ENDIF
+
+c     suppress direct pi0 for meson projectiles
+c     rate set by par( 137 )
+      ipar82_def = IPAR(82)
+c     skip if baryon projectile or minijet (i.e no flavor attached)
+      if(ibar(iabs(kb)).ne.0.or.ifqrk.eq.0) IPAR(82) = 0
+
+c     suppress direct omega for meson projectiles
+c     rate set by par( 138 )
+      ipar83_def = IPAR(83)
+c     skip if baryon projectile or central string
+      if(ibar(iabs(kb)).ne.0.or.(ifqrk.gt.0.and.IPAR(83).eq.2))
+     &     IPAR(83) = 0
+
+c     change rho0 / omega ratio
+      PAR143_def = PAR(143)
+      IF(IPAR(81).eq.1)THEN
+c     change if beam is meson
+         if(ibar(iabs(kb)).eq.0) PAR(143) = PAR(144)
+      ELSEIF(IPAR(81).eq.2)THEN         
+c     change if beam is meson, on meson side only         
+         if(ibar(iabs(kb)).eq.0.and.IRNK(JT).gt.0) PAR(143) = PAR(144) 
+      ELSEIF(IPAR(81).eq.3)THEN         
+c     change if beam is meson, on meson side only, for leading only
+         if(ibar(iabs(kb)).eq.0.and.ISIGN(ILEAD(JT),IRNK(JT)).eq.1)
+     &        PAR(143) = PAR(144)
+      ELSEIF(IPAR(81).eq.4)THEN         
+c     change if beam is meson, on meson side only, for diff. strings only
+         if(ibar(iabs(kb)).eq.0.and.IFQRK.eq.-1)
+     &        PAR(143) = PAR(144)
+      ELSEIF(IPAR(81).eq.5)THEN         
+c     change if beam is meson, for leading on meson side only and
+c     for diff. strings only
+         if(ibar(iabs(kb)).eq.0.and.IFQRK.eq.-1.and.
+     &        ISIGN(ILEAD(JT),IRNK(JT)).eq.1) PAR(143) = PAR(144)
+      ENDIF
+      
+C...particle ID and pt.
+
+      CALL SIB_I4FLAV (IFL(JT), 0, IRNK(JT), IFL(3), LLIST(I))
+
+c     reset strange fraction
+      PAR(2) = PAR2_def
+c     reset vec.meson production
+      PAR(5) = PAR5_def
+c     reset charm fraction
+      PAR(24) = PAR24_def
+c     reset popcorn
+      PAR(8) = par8_def
+
+c     reset pi0 suppr.
+      IPAR(82) = ipar82_def
+
+c     reset omega suppr.
+      IPAR(83) = ipar83_def
+
+c     reset rho0 / omega ratio
+      PAR(143) = PAR143_def
+      
+c     reject iso 0 spin 1 for meson projectiles
+      IF(IBAR(IABS(KB)).eq.0)THEN
+c     reject leading spin1,isospin singlett
+         IF(ILEAD(JT).EQ.1.and.LLIST(I).eq.32.and.
+     +        PAR(136).gt.S_RNDM(I)) LLIST(I) = 27
+      endif
+      
+c     replace leading or all pi0 with rho0
+      IF(IFQRK.eq.-1) THEN 
+         IF(IPAR(67).eq.1)THEN
+            IF(ILEAD(JT).EQ.1) THEN 
+c     replace leading pi0 with rho0
+               IF(ABS(LLIST(I)).EQ.6) LLIST(I) = 27*isign(1,LLIST(I))  
+            ENDIF
+         ELSEIF(IPAR(67).eq.2)THEN
+c     replace all pi0 with rho0 for all beams
+            IF(ABS(LLIST(I)).EQ.6) LLIST(I) = 27*isign(1,LLIST(I))
+         ELSEIF(IPAR(67).eq.3)THEN
+c     replace all pi0 with rho0 for meson beam only
+            IF(IBAR(IABS(KB)).eq.0)THEN
+               IF(ABS(LLIST(I)).EQ.6) LLIST(I) = 27*isign(1,LLIST(I))
+            ENDIF
+         ELSEIF(IPAR(67).eq.4)THEN
+c     replace all pi0 with rho0 for meson beam only
+c     replace some beam mesons with their vector partner
+            IF(IBAR(IABS(KB)).eq.0)THEN
+               IF(ABS(LLIST(I)).EQ.6) LLIST(I) = 27*isign(1,LLIST(I))
+c     reject leading spin1,isospin singlett
+               IF(ILEAD(JT).EQ.1.and.LLIST(I).eq.32.and.
+     +              PAR(136).gt.S_RNDM(I)) LLIST(I) = 27
+               IF(S_RNDM(0).lt.PAR(120).and.LLIST(I).eq.KB) 
+     &              LLIST(I) = LRES(LLIST(I))
+            ENDIF
+         ENDIF
+      ENDIF
+
+c     replace leading pi0 by rho0's
+      IF(IABS(IFQRK).eq.1)THEN
+         IF(ABS(IPAR(11)).ge.2.and.IPAR(11).ge.-3)THEN
+            IF(ilead(jt).EQ.1) then 
+               IF(ABS(LLIST(I)).EQ.6) THEN
+                  LLIST(I) = 27*isign(1,LLIST(I))
+               endif
+            endif
+        
+c     replace leading pi0 in string diff by rho0's (lvec15)
+         ELSEIF(IFQRK.eq.-1.and.IPAR(11).eq.-10)THEN
+            IF(ILEAD(JT).EQ.1) THEN 
+               IF(ABS(LLIST(I)).EQ.6) THEN
+                  LLIST(I) = 27*isign(1,LLIST(I))
+               ENDIF
+            ENDIF
+c     replace leading pi0 in string diff by rho0's 
+c     in addition to increased leading vec.meson ratio (lvec20)
+         ELSEIF(IFQRK.eq.-1.and.IPAR(11).eq.-15)THEN
+            IF(ILEAD(JT).EQ.1) THEN 
+               IF(ABS(LLIST(I)).EQ.6) THEN
+                  LLIST(I) = 27*isign(1,LLIST(I))
+               ENDIF
+            ENDIF     
+c     replace leading omega in string diff by rho0's 
+c     in addition to increased leading vec.meson ratio (lvec21)
+         ELSEIF(IFQRK.eq.-1.and.IPAR(11).eq.-16)THEN
+            IF(ILEAD(JT).EQ.1) THEN 
+               IF(ABS(LLIST(I)).EQ.32) 
+     &              LLIST(I) = 27*isign(1,LLIST(I))
+            ENDIF     
+c     replace leading omega in string diff by rho0's 
+c     suppress pi0 in diff. strings
+c     in addition to increased leading vec.meson ratio (lvec22)
+         ELSEIF(IFQRK.eq.-1.and.IPAR(11).eq.-17)THEN
+            IF(ILEAD(JT).EQ.1) THEN 
+c     print*,'replacing leading omega with rho0'
+               IF(ABS(LLIST(I)).EQ.32)
+     &              LLIST(I) = 27*isign(1,LLIST(I))
+            ENDIF
+            IF(LLIST(I).EQ.6) then
+c     print*,'pi0 found! start again.. '
+               GOTO 555
+            endif
+
+c     replace all for diff.
+         ELSEIF(IFQRK.eq.-1.and.IPAR(11).lt.0.and.
+     &           IPAR(11).ge.-3) then
+            IF(ABS(LLIST(I)).EQ.6)  LLIST(I) = 27*isign(1,LLIST(I))
+
+c     increased vec.meson ratio and replace pi0 with rho0 in str.diff
+         ELSEIF(IFQRK.eq.-1.and.IPAR(11).eq.-7) then
+            IF(ABS(LLIST(I)).EQ.6)  LLIST(I) = 27*isign(1,LLIST(I))  
+
+c     replace leading pi's by vec.mesons, iso-spin conserving
+         ELSEIF(IPAR(11).eq.-8.and.IPAR(11).lt.0)THEN
+            PAR(5) = 9.D0
+            IF(ilead(jt).EQ.1.and.
+     $                       INT((PAR(5)+1.D0)*S_RNDM(0)).gt.1) then 
+               IF(ABS(LLIST(I)).EQ.6) LLIST(I) = 27*isign(1,LLIST(I))
+               IF(ABS(LLIST(I)).EQ.7) LLIST(I) = 25*isign(1,LLIST(I))
+c     IF(ABS(LLIST(I)).EQ.8) LLIST(I) = 26*isign(1,LLIST(I))
+            endif
+
+c     replace almost all for diff.
+         ELSEIF(IFQRK.eq.-1.and.IPAR(11).eq.-8.and.IPAR(11).lt.0) then
+            PAR(5) = 9.D0
+            if( INT((PAR(5)+1.D0)*S_RNDM(0)).gt.1 ) then
+               IF(ABS(LLIST(I)).EQ.6)  LLIST(I) = 27*isign(1,LLIST(I))
+               IF(ABS(LLIST(I)).EQ.7) LLIST(I) = 25*isign(1,LLIST(I))
+            endif
+      
+c     replace leading pi0's by vec.mesons
+         ELSEIF(IPAR(11).eq.-9.and.IPAR(11).lt.0)THEN
+            PCHF = 0.1D0
+            IF(ilead(jt).EQ.1.and.ABS(LLIST(I)).EQ.6) 
+     &           LLIST(I) = 27*isign(1,LLIST(I))
+            if(ilead(jt).EQ.1.and.ABS(LLIST(I)).EQ.7)then
+               if(S_RNDM(0).lt.PCHF) LLIST(I) = 25*isign(1,LLIST(I))
+            endif        
+
+c     replace for string diff.
+         ELSEIF(IFQRK.eq.-1.and.IPAR(11).eq.-9) then
+            IF(ABS(LLIST(I)).EQ.6) 
+     &           LLIST(I) = 27*isign(1,LLIST(I))
+            if(ABS(LLIST(I)).EQ.7)then
+               if(S_RNDM(0).lt.PCHF) 
+     &              LLIST(I) = 25*isign(1,LLIST(I))
+            endif
+         ELSE
+            CONTINUE
+         ENDIF
+      ENDIF
+
+c     reset vec.meson ratio
+      PAR(5) = 0.3D0
+      IF(IABS(IFQRK).eq.1) ILEAD(JT) = 0
+      
+      PMQ(3) = QMASS(IFL(3))
+      P(I,5) = AM(IABS(LLIST(I)))
+      CALL PTDIS_4FLV (IFL(3), PX(3),PY(3))
+
+C...fill transverse momentum
+      P(I,1) = PX(JT) + PX(3)
+      P(I,2) = PY(JT) + PY(3)
+      XMT2 = P(I,5)**2+P(I,1)**2+P(I,2)**2
+
+C...test end of fragmentation
+
+      WREM2 = PTOT(4)**2-PTOT(1)**2-PTOT(2)**2-PTOT(3)**2
+c      IF (WREM2 .LT. 0.1)  GOTO 200
+      IF (WREM2 .LT. 0.1D0)  GOTO 200
+c      WMIN = PMQ(1)+PMQ(2)+2.*PMQ(3)+ 1.1 + (2.*S_RNDM(0)-1.)*0.2
+      WMIN=PMQ(1)+PMQ(2)+2.D0*PMQ(3)+PAR(59)+(2.D0*S_RNDM(0)-1.D0)*0.2D0
+      IF (WREM2 .LT. WMIN**2) Then
+         if (IABS(ifl(3)).ne.3.and.IABS(IFL(3)).ne.4) GOTO 400
+         goto 200
+      endif
+
+C...Choose z
+      IF(IABS(IFQRK).eq.1) THEN
+c     valence strings: ( str.diff and non diff. )
+         IF(IPAR(11).EQ.1) THEN
+c     use hard distribution for leading quarks ( no exchange )
+            IF(ILEAD(JT).eq.1) THEN
+               Z = ZBLEAD (IABS(LLIST(I)))
+            ELSE
+               IF(IBLEAD .GT. 0.and.iabs(ifl(jt)).gt.10
+     &              .and.iabs(ifl(3)).lt.10)  THEN
+                  Z = ZBLEAD (IABS(LLIST(I)))   
+                  IBLEAD = IBLEAD - 1
+               ELSE
+                  Z = ZDIS_4FLV (IFL(3),ifl(jt),XMT2)
+               ENDIF
+            ENDIF
+c     use hard frag. for leading particles
+         ELSEIF(IPAR(11).ge.3.or.IPAR(11).eq.-3.or.IPAR(11).eq.-6
+     &           .or.IPAR(11).eq.-7) THEN
+            IF(ILEAD(jt).eq.1) THEN
+               Z = ZBLEAD (IABS(LLIST(I)))
+            ELSE
+               IF(IBLEAD .GT. 0.and.iabs(ifl(jt)).gt.10
+     &              .and.iabs(ifl(3)).lt.10)  THEN
+                  Z = ZBLEAD (IABS(LLIST(I)))   
+                  IBLEAD = IBLEAD - 1
+               ELSE
+                  Z = ZDIS_4FLV (IFL(3),ifl(jt),XMT2)
+               ENDIF
+            ENDIF
+         ELSEIF(IPAR(11).EQ.-11) THEN
+c     very hard leading frag. for diff and non. diff val. strings (lvec16)
+            IF(IBLEAD .GT. 0.and.iabs(ifl(jt)).gt.10) THEN
+               Z = ZBLEAD (IABS(LLIST(I)))
+            ELSEIF(ILEAD(jt).eq.1)THEN
+               Z = 1.D0 - ZDISN(1)
+            ELSE
+               Z = ZDIS_4FLV (IFL(3),ifl(jt),XMT2)
+            ENDIF
+
+         ELSEIF(IPAR(11).EQ.-12.OR.IPAR(11).LE.-15.or.IPAR(68).eq.1)THEN
+c     very hard leading frag. for diff. val. strings only (lvec17)
+            IF(IBLEAD .GT. 0.and.iabs(ifl(jt)).gt.10) THEN
+               Z = ZBLEAD (IABS(LLIST(I)))
+            ELSEIF(ILEAD(jt).eq.1.and.IFQRK.eq.-1)THEN
+               Z = 1.D0 - ZDISN(1)
+            ELSE
+               Z = ZDIS_4FLV (IFL(3),ifl(jt),XMT2)
+            ENDIF
+
+         ELSEIF(IPAR(11).EQ.-13.AND.IFQRK.eq.-1) THEN
+c     hard leading frag. for diff. val. strings only (lvec18)
+            IF(IBLEAD .GT. 0.and.iabs(ifl(jt)).gt.10) THEN
+               Z = ZBLEAD (IABS(LLIST(I)))
+            ELSEIF(ILEAD(jt).eq.1)THEN
+               Z = S_RNDM(JT)
+            ELSE
+               Z = ZDIS_4FLV (IFL(3),ifl(jt),XMT2)
+            ENDIF
+         ELSEIF(IPAR(11).EQ.-14.AND.IFQRK.eq.-1) THEN
+c     hard leading frag. for diff. AND ndiff. val. strings (lvec19)
+            IF(IBLEAD .GT. 0.and.iabs(ifl(jt)).gt.10) THEN
+               Z = ZBLEAD (IABS(LLIST(I)))
+            ELSEIF(ILEAD(jt).eq.1)THEN
+               Z = S_RNDM(JT)
+            ELSE
+               Z = ZDIS_4FLV (IFL(3),ifl(jt),XMT2)
+            ENDIF
+            
+         ELSE
+
+c     hard leading baryons only ( standard )
+            IF(IBLEAD .GT. 0.and.iabs(ifl(jt)).gt.10
+     &           .and.abs(ifl(3)).lt.10)  THEN
+c           print*,'calling zblead: i,id,jt,ncall', i,llist(i),jt,ncall
+               IF(IPAR(20).eq.3)THEN
+c     use lund function with different parameters for leading baryon
+                  fa_def = FAin
+                  fb_def = FB0in
+                  FAin = PAR(57)
+                  FB0in = PAR(58)
+                  z = zdis_4flv(IFL(3),ifl(jt),xmt2)
+c     set parameters to initial values again
+                  FAin = fa_def
+                  FB0in = fb_def
+               ELSE
+                  Z = ZBLEAD (IABS(LLIST(I)))
+               ENDIF
+               IBLEAD = IBLEAD - 1
+            ELSE
+               Z = ZDIS_4FLV (IFL(3),ifl(jt),XMT2)
+            ENDIF
+         ENDIF
+      ELSE
+c     non valence string
+         IF (IBLEAD .GT. 0.and.iabs(ifl(jt)).gt.10
+     &        .and.iabs(ifl(3)).lt.10)  THEN
+C     Special frag. for leading Baryon only
+c            print*,'calling zblead: i,id,jt,ncall', i,llist(i),jt,ncall
+            Z = ZBLEAD (IABS(LLIST(I)))   
+            IBLEAD = IBLEAD - 1
+         ELSE
+            Z = ZDIS_4FLV (IFL(3),ifl(jt),XMT2)
+         ENDIF
+      ENDIF
+      IF(IPAR(20).eq.2)IBLEAD = 2
+      IF(IFQRK.eq.1) ILEAD(JT) = 0
+
+      ZLIST(I) = Z
+      WW(JT,2) = Z*WW(JT,1)
+      WW(JR,2) = XMT2/(WW(JT,2)*E0**2)
+
+      P(I,3) = WW(1,2)*0.5D0*E0 - WW(2,2)*0.5D0*E0
+      P(I,4) = WW(1,2)*0.5D0*E0 + WW(2,2)*0.5D0*E0
+
+      DO J=1,4
+         PTOT (J) = PTOT(J) - P(I,J)
+      ENDDO
+      DO K=1,2
+         WW(K,1) = WW(K,1) - WW(K,2)
+      ENDDO
+
+C...Reset pT and flavor at ends of the string
+      PX(JT) = -PX(3)
+      PY(JT) = -PY(3)
+      IFL(JT) =-IFL(3)
+      PMQ(JT) = PMQ(3)
+
+      GOTO 300
+
+C...Final two hadrons
+ 400  IAFL1 = IABS(mod(IFL(JR),100))
+      IAFL2 = IABS(mod(IFL(3),100))
+      IF(NDEBUG.gt.5)
+     &     write(lun,*)'STRING_FRAG: final flavors:', IFL(JR), -IFL(3)
+      
+C..   check if flavor combination is allowed..
+      
+c     reject anti-baryon next to leading baryon
+c     remaining anti-quark from leading baryon is marked by id+100
+      IF((IABS(IFL(JR)).gt.100.and.IAFL2.gt.10).or.
+     & (IABS(IFL(3)).gt.100.and.IAFL1.gt.10)) GOTO 200
+      
+      IF(IPAR(40).eq.0)THEN
+c     reject two diquarks, two anti-diquarks AND diquark anti-diquark pairs
+         IF (IAFL1*IAFL2 .GT. 100)  GOTO 200 
+      ELSE
+c     ONLY reject two diquarks or two anti-diquarks (unphysical) 
+c     AND KEEP diquark anti-diquark pairs 
+         IF (mod(IFL(JR),100)*mod(IFL(3),100).GT.100) GOTO 200 
+      ENDIF
+
+      IF ((IAFL1/10.eq.4.or.mod(IAFL1,10).eq.4)
+     +     .and.(IAFL2/10.eq.4.or.mod(IAFL2,10).eq.4))
+     +     GOTO 200             ! reject two charm quarks
+
+C.... Vector meson config
+c     increase vec.meson ration for diff.
+      IF(IFQRK.eq.-1.and.IPAR(11).le.-4.and.IPAR(11).gt.-8) PAR(5) =9.D0
+c     increase vec.meson ration for leading quarks in valence interactions
+      IF(IABS(IFQRK).eq.1.and.IPAR(11).le.-5.and.ilead(jr).eq.1
+     &     .and.IPAR(11).gt.-8) PAR(5) = 9.D0
+
+c     suppress direct pi0 for meson projectiles
+c     rate set by par( 137 )
+ 666  ipar82_def = IPAR(82)
+c     skip if baryon projectile
+      if(ibar(iabs(kb)).ne.0.or.ifqrk.eq.0) IPAR(82) = 0
+
+c     suppress direct omega for meson projectiles
+c     rate set by par( 138 )
+      ipar83_def = IPAR(83)
+c     skip if baryon projectile or central string     
+      if(ibar(iabs(kb)).ne.0.or.(ifqrk.gt.0.and.IPAR(83).eq.2))
+     &     IPAR(83) = 0
+
+c     set current rank
+      IRNK(JR)=ISIGN(IABS(IRNK(JR))+1,1-JR)
+      
+c     change rho0 / omega ratio
+      IF(IPAR(81).eq.1)THEN
+c     change if beam is meson
+         if(ibar(iabs(kb)).eq.0) PAR(143) = PAR(144)
+      ELSEIF(IPAR(81).eq.2)THEN         
+c     change if beam is meson, on meson side only         
+         if(ibar(iabs(kb)).eq.0.and.IRNK(JR).gt.0) PAR(143) = PAR(144)  
+      ELSEIF(IPAR(81).eq.3)THEN         
+c     change if beam is meson, on meson side only, for leading only
+         if(ibar(iabs(kb)).eq.0.and.ISIGN(ILEAD(JR),IRNK(JR)).eq.1)
+     &        PAR(143) = PAR(144)
+      ELSEIF(IPAR(81).eq.4)THEN         
+c     change if beam is meson, on meson side only, for diff. strings only
+         if(ibar(iabs(kb)).eq.0.and.IFQRK.eq.-1)
+     &        PAR(143) = PAR(144)
+      ELSEIF(IPAR(81).eq.5)THEN         
+c     change if beam is meson, for leading on meson side only and
+c     for diff. strings only
+         if(ibar(iabs(kb)).eq.0.and.IFQRK.eq.-1.and.
+     &        ISIGN(ILEAD(JR),IRNK(JR)).eq.1) PAR(143) = PAR(144)
+      ENDIF
+
+c     increase vec.meson ratio for leading particle in str. diff.
+      IF(IPAR(66).eq.1)THEN
+         IF(ILEAD(JT).EQ.1.and.IFQRK.eq.-1)THEN
+            IF(IBAR(IABS(kb)).eq.0.or.IPAR(70).eq.1) PAR(5) = PAR(113)
+         ENDIF
+
+      ELSEIF(IPAR(66).eq.2)THEN
+         IF(IFQRK.eq.-1)THEN
+            IF(IBAR(IABS(kb)).eq.0.or.IPAR(70).eq.1) PAR(5) = PAR(113)
+         ENDIF
+
+      ELSEIF(IPAR(66).eq.3)THEN
+c     increase vector meson rate for meson beam
+c     on beam side (rank+) only!
+         IF(IFQRK.eq.-1)THEN
+            IF(ILEAD(JR).EQ.1)THEN               
+               IF(IBAR(IABS(kb)).eq.0.and.IRNK(JR).gt.0)
+     &              PAR(5) = PAR(113)
+c     always incr. vector rate for diff. strings independent of beam type
+               IF(IPAR(70).eq.1) PAR(5) = PAR(113)               
+            ENDIF
+         ENDIF
+      ENDIF
+
+      CALL SIB_I4FLAV (IFL(JR), -IFL(3), IRNK(JR), IFLA, LLIST(I+1))
+
+      IPAR(82) = ipar82_def
+      IPAR(83) = ipar83_def
+      PAR(143) = PAR143_def
+      
+      nporig(I+1)= Ipflag*2 + KINT
+      niorig(I+1)= iiflag
+      IF(ILEAD(1).eq.1.or.ILEAD(2).eq.1) nporig(I+1)= -1 * nporig(I+1)
+
+c     replace leading or all pi0 with rho0
+      IF(IFQRK.eq.-1) THEN 
+         IF(IPAR(67).eq.1)THEN
+            IF(ILEAD(JR).EQ.1) THEN 
+               IF(IABS(LLIST(I+1)).EQ.6) 
+     &              LLIST(I+1) = 27*isign(1,LLIST(I+1))           
+            ENDIF
+         ELSEIF(IPAR(67).eq.2)THEN
+            IF(IABS(LLIST(I+1)).EQ.6) LLIST(I+1) =27*isign(1,LLIST(I+1))
+         ELSEIF(IPAR(67).eq.3)THEN
+            IF(IBAR(IABS(KB)).eq.0)THEN
+               IF(ABS(LLIST(I+1)).EQ.6)LLIST(I+1)=27*isign(1,LLIST(I+1))
+            ENDIF
+         ENDIF
+      ENDIF
+      
+c     replace all for diff.
+      IF(IABS(IFQRK).EQ.1)THEN
+         IF(IFQRK.eq.-1.and.IPAR(11).lt.0
+     &        .and.IPAR(11).ge.-3) then
+            IF(ABS(LLIST(I+1)).EQ.6) LLIST(I+1) = 27*isign(1,LLIST(I+1))
+         endif
+c     replace all for leading val.
+         IF(IPAR(11).le.-2.and.IPAR(11).ge.-3) then
+            if( ilead(jr).eq.1 ) then
+               IF(IABS(LLIST(I+1)).EQ.6)
+     &              LLIST(I+1) = 27*isign(1,LLIST(I+1))
+            endif
+         endif
+
+c     increased vec.meson ratio and replace pi0 with rho0
+         IF(IFQRK.eq.-1.and.IPAR(11).eq.-7) then
+           IF(IABS(LLIST(I+1)).EQ.6) LLIST(I+1) = 27*isign(1,LLIST(I+1))
+c     IF(ABS(LLIST(I+1)).EQ.7)  LLIST(I+1) = 25*isign(1,LLIST(I+1))
+         endif
+         
+c     replace all for diff. ( same as lvec6 but for rhop as well )
+c     reset vec.meson ratio
+         IF(IFQRK.eq.-1.and.IPAR(11).eq.-8) then
+            PAR(5) = 9.D0
+            if( INT((PAR(5)+1.D0)*S_RNDM(0)).gt.1 ) then
+               IF(IABS(LLIST(I+1)).EQ.6)
+     &              LLIST(I+1) = 27*isign(1,LLIST(I+1))
+               IF(IABS(LLIST(I+1)).EQ.7)
+     &              LLIST(I+1) = 25*isign(1,LLIST(I+1))
+            endif
+         endif
+c     replace leading pseudoscalar by vector
+         IF(IPAR(11).eq.-8.and.ilead(jr).eq.1) then
+            PAR(5) = 9.D0
+            if( INT((PAR(5)+1.D0)*S_RNDM(0)).gt.1 ) then
+               IF(IABS(LLIST(I+1)).EQ.6) 
+     &              LLIST(I+1) = 27*isign(1,LLIST(I+1))
+               IF(IABS(LLIST(I+1)).EQ.7)
+     &              LLIST(I+1) = 25*isign(1,LLIST(I+1))
+            endif
+         endif
+         
+c     replace all pi0 for string diff.( same as lvec7 but for rhop as well )
+         IF(IFQRK.eq.-1.and.IPAR(11).eq.-9) then
+            if(IABS(LLIST(I+1)).EQ.6) LLIST(I+1) =27*isign(1,LLIST(I+1))
+         endif
+c     replace leading pi0 by vector
+         IF(IPAR(11).eq.-9.and.ILEAD(JR).eq.1) then
+            if(IABS(LLIST(I+1)).EQ.6) LLIST(I+1) =27*isign(1,LLIST(I+1))
+         endif
+
+c     replace leading omega in string diff by rho0's 
+c     suppress pi0 in diff. strings
+c     in addition to increased leading vec.meson ratio (lvec22)
+         IF(IFQRK.eq.-1.and.IPAR(11).eq.-17)THEN
+            IF(IABS(LLIST(I+1)).EQ.6)THEN
+c     print*,'found pi0, restarting..'
+               GOTO 666
+            ENDIF
+         ENDIF
+         ILEAD(JR)= 0
+      ENDIF
+
+c     reject iso 0 spin 1 (omega) for meson projectiles
+      IF(IBAR(IABS(KB)).eq.0)THEN
+c     reject leading spin1,isospin singlett
+         IF(ILEAD(JR).EQ.1.and.LLIST(I+1).eq.32.and.
+     +        PAR(136).gt.S_RNDM(I)) LLIST(I+1) = 27
+      endif
+      
+c     reset vec.mes. ratio
+      PAR(5) = PAR5_def
+      PAR(24) = charmPARdef
+      IPAR(11) = IPAR11_def
+
+      P(I,1)   = PX(JT)+PX(3)      
+      P(I,2)   = PY(JT)+PY(3)
+      LPOINT(I) = JT
+      I1 = I+1
+      nforig(I1) = 0      
+      P(I1,5) = AM(IABS(LLIST(I1)))
+      P(I1,1) = PX(JR)-PX(3)      
+      P(I1,2) = PY(JR)-PY(3)   
+      LPOINT(I1) = JR 
+      LRNK(I1) = IRNK(JR)
+      XM1 = P(I,5)**2+P(I,1)**2+P(I,2)**2
+      XM2 = P(I1,5)**2+P(I1,1)**2+P(I1,2)**2
+      IF (DSQRT(XM1)+dSQRT(XM2) .GT. dSQRT(WREM2)) GOTO 200
+
+c...RE & EJA fix
+      PT2 = (P(I,1)+P(I1,1))**2+(P(I,2)+P(I1,2))**2
+      WREMPT = dsqrt(WREM2+PT2)
+      EA1 = (WREM2+XM1-XM2+PT2)/(2.D0*WREMPT)
+
+      PA2 = (EA1**2-XM1)
+      if (pa2.gt.0.D0)  then
+            PA = dSQRT(PA2)
+      else
+            goto 200
+      endif
+      BA = PTOT(3)/PTOT(4)
+      GA = PTOT(4)/WREMPT
+      SGN = DBLE(3-2*JT)
+      P(I,3) = GA*(BA*EA1+SGN*PA)
+      P(I,4) = GA*(EA1+BA*SGN*PA)
+      P(I+1,3) = PTOT(3)-P(I,3)
+      P(I+1,4) = PTOT(4)-P(I,4)
+
+c     mark as final hadrons
+      ZLIST(I) = 0.D0
+      ZLIST(I+1) = 0.D0
+
+      NA= NP+1
+      NP=I+1
+         
+C...reorder  particles along chain (in rank)
+      IF (LRANK)  THEN
+      N1 = NA-1
+      N2 = 0
+      DO J=NA,NP
+         IF(P(J,4).lt.0) THEN
+            NP=NA-1
+            GOTO 200            ! negative energy bug 'fix'
+         ENDIF
+         IF(LPOINT(J) .EQ. 2)  THEN
+            N2=N2+1
+            LLIST (NP+N2) = LLIST(J)
+            LRNK(NP+N2) = LRNK(J)
+            ZLIST (NP+N2) = ZLIST(J)
+            nporig(NP+N2) = nporig(J)
+            niorig(NP+N2) = niorig(J)
+            nforig(NP+N2) = 0
+            DO K=1,5
+               P(NP+N2,K)=P(J,K)
+            ENDDO
+         ELSE
+            N1= N1+1
+            IF (N1.LT.J)   THEN
+               LLIST(N1) = LLIST(J)
+               LRNK(N1) = LRNK(J)
+               ZLIST(N1) = ZLIST(J)
+               nporig(N1) = nporig(J)
+               niorig(N1) = niorig(J)
+               nforig(N1) = nforig(J)
+               DO K=1,5
+                  P(N1,K) = P(J,K)
+               ENDDO
+            ENDIF
+         ENDIF
+      ENDDO
+      JJ=N1
+      DO J=NP+N2,NP+1,-1
+         JJ= JJ+1
+         LLIST(JJ) = LLIST(J)
+         LRNK(JJ) = LRNK(J)
+         ZLIST(JJ) = ZLIST(J)
+         nporig(JJ) = nporig(J)
+         niorig(JJ) = niorig(J)
+         nforig(JJ) = nforig(J)
+         DO K=1,5
+            P(JJ,K) = P(J,K)
+         ENDDO
+      ENDDO
+      ENDIF
+
+      if(Ndebug.gt.3)
+     &  WRITE(LUN,*)' STRING_FRAG_4FLV: NP after fragmentation:',NP
+
+      END
+
+
+C=======================================================================
+
+      SUBROUTINE GG_FRAG_4FLV (E0)
+
+C-----------------------------------------------------------------------
+C...This routine fragments a  gluon-gluon system
+C.  of mass E0 (GeV)
+C.  the particles produced are in the  jet-jet frame
+C.  oriented along the z axis
+C...........................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      DOUBLE PRECISION ZLIST
+      COMMON /S_ZLIST/ ZLIST(8000)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+
+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
+
+      DIMENSION WW(2,2),PTOT(4),PX(3),PY(3),IFL(3),PMQ(3)
+      SAVE
+
+      if(Ndebug.gt.3) then
+        WRITE(LUN,*)
+     &    ' GG_FRAG_4FLV: called with (E0)',
+     &    E0
+        WRITE(LUN,*)' GG_FRAG_4FLV: NP before fragmentation:',NP
+      endif
+
+C...  'leading' strange fraction
+      PAR2_def = PAR(2)
+      IF(IPAR(39).eq.2) PAR(2) = PAR(66)
+
+      PAR24_def = PAR(24)
+C     leading charm fraction
+      IF(IPAR(87).eq.1) PAR(24) = PAR(150)
+      IF(IPAR(87).eq.2) PAR(24) = PAR(150)*PAR(24)
+
+      E0S = E0**2
+      
+C...Generate the 'forward' leading particle.
+100   I = NP+1
+c     dummy rank argument
+      IDM = 5
+c     sample new flavor, i.e. split gluon into quark-antiquark, quark or antiquark
+      if( IPAR(87).eq.3 )THEN
+C     flavor threshold model            
+c     u,d -> u,d,s -> u,d,s,c
+         CALL SIB_ICFLAV(E0S,0,I0,IFL1)
+      ELSE
+c     default u,d,s model, same rates as in hadronization (string frag.)
+         I0 = INT(-1 + 2.D0*INT((2.D0-EPS8)*S_RNDM(I)))               
+         CALL SIB_I4FLAV(I0,0,IDM,IFL1, LDUM)
+      ENDIF
+c     form first hadron from new flavor
+      CALL SIB_I4FLAV(IFL1,0,IDM,IFL2, LLIST(I))
+      CALL PTDIS_4FLV(IFL1,PX1,PY1)
+      CALL PTDIS_4FLV(IFL2,PX2,PY2)
+      P(I,1) = PX1+PX2
+      P(I,2) = PY1+PY2
+      P(I,5) = AM(IABS(LLIST(I)))
+      XM1 = P(I,5)**2+P(I,1)**2+P(I,2)**2
+      Z1 = ZDIS_4FLV (IFL1,1,0.25D0*XM1)
+      Z2 = ZDIS_4FLV (IFL2,1,0.25D0*XM1)
+      T1  = 4.D0*XM1/(E0S*(Z1+Z2))
+      P(I,4) = 0.25D0*E0*(Z1+Z2 + T1)
+      P(I,3) = 0.25D0*E0*(Z1+Z2 - T1)
+
+      nforig(I)= 0
+      nporig(I)= Ipflag*3 + KINT
+      niorig(I)= iiflag
+      ZLIST(I) = Z1 + Z2
+
+C...Generate the 'backward' leading particle.
+      I = I+1
+      IF( IPAR(87).eq.3 )THEN
+         CALL SIB_ICFLAV(E0S,-I0,IDM,IFL3)
+      ELSE
+         CALL SIB_I4FLAV(-I0,0,IDM,IFL3, LDUM)
+      ENDIF
+      CALL SIB_I4FLAV(IFL3,0,IDM,IFL4, LLIST(I))
+      CALL PTDIS_4FLV(IFL3,PX3,PY3)
+      CALL PTDIS_4FLV(IFL4,PX4,PY4)
+      P(I,1) = PX3+PX4
+      P(I,2) = PY3+PY4
+      P(I,5) = AM(IABS(LLIST(I)))
+      XM2 = P(I,5)**2+P(I,1)**2+P(I,2)**2
+      Z3 = ZDIS_4FLV (IFL3,1,0.25D0*XM2)
+      Z4 = ZDIS_4FLV (IFL4,1,0.25D0*XM2)
+      T2  = 4.D0*XM2/(E0S*(Z3+Z4))
+      P(I,4) = 0.25D0*E0*( Z3+Z4 + T2)
+      P(I,3) = 0.25D0*E0*(-Z3-Z4 + T2)
+
+      nforig(I)= 0
+      nporig(I)= Ipflag*3 + KINT
+      niorig(I)= iiflag
+      ZLIST(I) = Z3 + Z4
+c      PAR24def = PAR(24)
+c     charm QCD fusion
+c      IF(IPAR(17).eq.2) PAR(24) = 0.
+
+c     reset strange fraction
+      PAR(2) = PAR2_def
+
+c     reset charm fraction
+      PAR(24) = PAR24_def
+      
+C...Fragment the two remaning strings
+      N0 = 0
+      DO KS=1,2
+      
+      NTRY = 0
+200   NTRY = NTRY+1
+      I = NP+2+N0
+      IF (NTRY .GT. 30)  GOTO 100
+
+      IF (KS .EQ. 1)  THEN
+         WW(1,1) = 0.5D0 * (1.D0 - Z1 - 0.5D0*T2) 
+         WW(2,1) = 0.5D0 * (1.D0 - Z3 - 0.5D0*T1)
+         PX(1) = -PX1
+         PY(1) = -PY1
+         PX(2) = -PX3
+         PY(2) = -PY3
+         IFL(1) = -IFL1
+         IFL(2) = -IFL3
+      ELSE
+         WW(1,1) = 0.5D0 * (1.D0 - Z2 - 0.5D0*T2) 
+         WW(2,1) = 0.5D0 * (1.D0 - Z4 - 0.5D0*T1)
+         PX(1) = -PX2
+         PY(1) = -PY2
+         PX(2) = -PX4
+         PY(2) = -PY4
+         IFL(1) = -IFL2
+         IFL(2) = -IFL4
+      ENDIF
+      PX(3) = 0.D0
+      PY(3) = 0.D0
+      PTOT (1) = PX(1)+PX(2)
+      PTOT (2) = PY(1)+PY(2)
+      PTOT (3) = 0.5D0*E0*(WW(1,1)-WW(2,1))
+      PTOT (4) = 0.5D0*E0*(WW(1,1)+WW(2,1))
+
+      PMQ(1) = QMASS(IFL(1))
+      PMQ(2) = QMASS(IFL(2))
+
+C...produce new particle: side, pT
+300   I=I+1
+      if(i.gt.8000) then
+        write(LUN,'(1x,a,i8)') 
+     &    ' GG_FRAG: no space left in S_PLIST:',I
+        CALL SIB_REJECT ('GG_FRAG         ')
+      endif
+      nforig(I)= 0
+      nporig(I)= Ipflag*2 + KINT
+      niorig(I)= iiflag
+
+      JT=INT(1.5D0+S_RNDM(0))
+      JR=3-JT
+c      CALL PTDIS (IFL(JT), PX(3),PY(3))
+
+C...particle ID
+      CALL SIB_I4FLAV (IFL(JT), 0, IDM, IFL(3), LLIST(I))
+      PMQ(3) = QMASS(IFL(3))
+      P(I,5) = AM(IABS(LLIST(I)))
+
+      CALL PTDIS_4FLV (IFL(3), PX(3),PY(3))
+      
+C...test end of fragmentation
+      WREM2 = PTOT(4)**2-PTOT(1)**2-PTOT(2)**2-PTOT(3)**2
+      IF (WREM2 .LT. 0.1D0)  GOTO 200
+      WMIN = PMQ(1)+PMQ(2)+2.D0*PMQ(3)+1.1D0+(2.D0*S_RNDM(0)-1.D0)*0.2D0
+      IF (WREM2 .LT. WMIN**2)THEN
+         GOTO 400
+      ENDIF
+
+C...fill transverse momentum
+      P(I,1) = PX(JT) + PX(3)
+      P(I,2) = PY(JT) + PY(3)
+
+C...Choose z
+      XMT2 = P(I,5)**2+P(I,1)**2+P(I,2)**2
+      Z = ZDIS_4FLV (ifl(3),IFL(JT), XMT2)
+
+      ZLIST(I) = Z      
+      WW(JT,2) = Z*WW(JT,1)
+      WW(JR,2) = XMT2/(WW(JT,2)*E0S)
+
+      P(I,3) = WW(1,2)*0.5D0*E0 - WW(2,2)*0.5D0*E0
+      P(I,4) = WW(1,2)*0.5D0*E0 + WW(2,2)*0.5D0*E0
+
+      DO J=1,4
+         PTOT (J) = PTOT(J) - P(I,J)
+      ENDDO
+      DO K=1,2
+         WW(K,1) = WW(K,1) - WW(K,2)
+      ENDDO
+
+C...Reset pT and flavor at ends of the string
+      PX(JT) = -PX(3)
+      PY(JT) = -PY(3)
+      IFL(JT) =-IFL(3)
+      PMQ(JT) = PMQ(3)
+      GOTO 300
+
+C...Final two hadrons
+ 400  IAFL1 = mod(IABS(IFL(JR)),100)
+      IAFL2 = mod(IABS(IFL(3)),100)
+      IF (IAFL1*IAFL2 .GT. 100)  GOTO 200 ! reject two diquarks
+      IF ((IAFL1/10.eq.4.or.mod(IAFL1,10).eq.4)
+     +     .and.(IAFL2/10.eq.4.or.mod(IAFL2,10).eq.4))
+     +     GOTO 200             ! reject two charm quarks
+
+      CALL SIB_I4FLAV (IFL(JR), -IFL(3), IDM, IFLA, LLIST(I+1))
+      P(I+1,5) = AM(IABS(LLIST(I+1)))
+      P(I,1)   = PX(JT)+PX(3)      
+      P(I,2)   = PY(JT)+PY(3)      
+      nporig(I)= Ipflag*2 + KINT
+      niorig(I)= iiflag
+      I1 = I+1
+      nporig(I1)= Ipflag*2 + KINT
+      niorig(I1)= iiflag
+      P(I1,1) = PX(JR)-PX(3)      
+      P(I1,2) = PY(JR)-PY(3)      
+      XM1 = P(I,5)**2+P(I,1)**2+P(I,2)**2
+      XM2 = P(I1,5)**2+P(I1,1)**2+P(I1,2)**2
+      IF (dSQRT(XM1)+dSQRT(XM2) .GT. dSQRT(WREM2)) GOTO 200
+      if (ptot(4).le.0.D0) goto 200
+      PT2 = (P(I,1)+P(I1,1))**2+(P(I,2)+P(I1,2))**2
+      WREMPT = dsqrt(WREM2+PT2)
+      EA1 = (WREM2+XM1-XM2+PT2)/(2.D0*WREMPT)
+      PA2 = (EA1**2-XM1)
+      if (PA2.ge.0.D0) then
+        PA = dSQRT(PA2)
+      else
+         goto 200
+      endif
+      BA = PTOT(3)/PTOT(4)
+      GA = PTOT(4)/WREMPT
+      SGN = DBLE(3-2*JT)
+      P(I,3) = GA*(BA*EA1+SGN*PA)
+      P(I,4) = GA*(EA1+BA*SGN*PA)
+      P(I+1,3) = PTOT(3)-P(I,3)
+      P(I+1,4) = PTOT(4)-P(I,4)
+      ZLIST(I) = 0.D0
+      ZLIST(I+1) = 0.D0
+      N0 = I-NP-1
+      ENDDO                  ! loop on two `remaining strings'
+
+      NP = I+1
+c      PAR(24) = PAR24def 
+      IF(Ndebug.gt.3) then
+        WRITE(LUN,*)' GG_FRAG_4FLV: NP after fragmentation:',NP
+      ENDIF
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE DIFDEC (L0, Irec, IBAD, P0)
+
+C-----------------------------------------------------------------------
+C..."decay" of an excited state with the quantum numbers
+C.   of particle L0 and the 5-momentum P0
+C.   - low energy: phase space decay (fire ball model)
+C.   - intermediate energy: one-string decay (longitudinal phase space)
+C.   - high energy: pomeron-hadron scattering (multi-string model) 
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+c     external types
+      INTEGER L0, Irec, IBAD
+      DOUBLE PRECISION P0
+      DIMENSION P0(5)
+      
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+
+      INTEGER LRNK
+      COMMON /SIB_RNK/ LRNK(8000)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+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
+
+c     internal types
+      INTEGER LL,LCON,LRES,LRES1,NTRYS,NRJECT,LA,N1,IREJ,I,J,IFLA,
+     &     IFL1,IFL2,IFBAD,NPI,IRES,LA1,JQQ,JQTOT,K,JQR,
+     &     KB_0,IAT_0
+      DOUBLE PRECISION PD,BE,EMIN,EMIN2,PCHEX,PRES,DELTAE,
+     &     SQS_0,S_0,PTmin_0,XMIN_0,ZMIN_0,
+     &     PAR1_def,PAR24_def,PAR53_def,GA,BEP,S_RNDM,AV,GASDEV,PCXG,
+     &     XI1,XI2,XSMR         !,FERMI
+      DIMENSION LL(10), PD(10,5), BE(3), LCON(6:99),LRES1(6:99)
+      DIMENSION LRES(6:99)
+      SAVE
+      EXTERNAL GASDEV
+      DATA (LRES(k),k=6,22)  /27,25,26,28,29,0,0,51,52,6*0,30,31/
+      DATA (LRES(k),k=23,33) /23,24,25,26,27,28,29,30,31,27,27/
+      DATA (LRES(k),k=34,49) /34,35,36,37,38,39,40,41,42,43,34,35,36,
+     &     37,38,49/
+      DATA (LRES(k),k=50,83) /0,51,52,53,54,4*0,78,79,10*0,80,81,73,
+     &     74,75,76,77,78,79,80,81,0,83/
+      DATA (LRES(k),k=84,99) /94,95,96,97,98,89,4*0,94,95,96,97,98,99/
+      
+      DATA EMIN /0.7D0/
+      DATA EMIN2 /10.D0/
+      DATA LCON /7,6,6,11,11,9,9,14,13,19*0,35,34,35,38,37,39,
+     &     19*0,71,72,10*0,59,60,73,10*0,85,86,85,88,87,89,10*0/
+      DATA LRES1 /27,25,26,11,11,9,9,14,13,19*0,35,34,35,38,37,39,
+     &     19*0,78,79,10*0,80,81,83,10*0,94,95,96,97,98,89,10*0/      
+      DATA PCHEX /0.33D0/            ! probability of charge exchange
+      DATA PRES /0.7D0/         ! probability of forming a resonance
+      DATA NRJECT /0/
+
+      IF(NDEBUG.gt.2)
+     &     WRITE(LUN,'(2X,A,1x,I2,1x,I2,/,5(2x,F10.3))')
+     &     'DIFDEC: (L0,Irec,P0):',L0,Irec,(P0(i),i=1,5)
+      
+      
+      NTRYS = 0
+
+      LA = IABS(L0)
+      DELTAE = P0(5) - AM(LA)
+      IF(IBAR(LA).ne.0.or.IPAR(65).eq.0)THEN
+c     baryons
+         EMIN = PAR(30)
+      ELSE
+c     mesons
+         EMIN = PAR(112)
+      ENDIF
+c      IBAD = 0
+      PAR1_def= PAR(1)
+      if(Irec.gt.0) PAR(1)= PAR(16)
+c      XSMR = 0.5D0
+c     XI2=FERMI(DELTAE,EMIN2,XSMR)
+c     XI1=FERMI(DELTAE,EMIN,XSMR)
+      XSMR=PAR(131)*EMIN
+      XI1=MAX((EMIN-DELTAE)/XSMR,0.D0)      
+      XSMR=PAR(131)*EMIN2
+      XI2=MAX((EMIN2-DELTAE)/XSMR,0.D0)
+      if(Ndebug.gt.2) 
+     &     WRITE(LUN,'(1x,A29,2(2x,F5.2),2(2x,F8.3))')
+     &     '  DIFDEC: EMIN1,EMIN2,XI1,XI2',
+     &     EMIN,EMIN2,Xi1,Xi2
+      
+C...  pomeron-hadron scattering (pi0 is used instead of pomeron)      
+      IF ((IPAR(10).gt.0).and.(Irec.gt.0).and.
+     &     (DELTAE.gt.EMIN2.or.S_RNDM(LA).gt.XI2))  THEN
+         if(Ndebug.gt.2) 
+     &        WRITE(LUN,*)' DIFDEC: central (L0,DELTAE,NP,XI):',
+     &        L0,DELTAE,NP,XI2
+         N1 = NP+1
+         if(irec.gt.0.and.IPAR(5).eq.1) par(1)= par(15)
+ 50      CONTINUE
+         IPFLAG= IPFLAG*100
+c     create subevent
+         SQS_0   = SQS
+         S_0     = S
+         PTmin_0 = PTmin 
+         XMIN_0  = XMIN
+         ZMIN_0  = ZMIN
+         KB_0    = KB
+         IAT_0   = IAT
+         CALL INI_EVENT(P0(5),L0,6,0)
+c     create L0 - pi0 interaction, pi0(pid=6) target
+         CALL SIB_NDIFF(L0, 1, P0(5), 0, IREJ) ! ori
+c     restore main event
+         SQS   = SQS_0
+         S     = S_0
+         PTmin = PTmin_0         
+         XMIN  = XMIN_0
+         ZMIN  = ZMIN_0
+         KB    = KB_0
+         IAT   = IAT_0
+         IF(IREJ.NE.0) THEN
+            NP = N1-1
+            GOTO 50
+         ENDIF
+         PAR(1) = PAR1_def
+         DO J=1,3
+            BE(J)=P0(J)/P0(4)
+         ENDDO
+         GA=P0(4)/P0(5)
+         if(P0(3).lt.0.D0) then
+           do i=N1,NP
+             P(I,3) = -P(I,3)
+           enddo
+         endif
+         DO I=N1,NP
+            BEP=BE(1)*P(I,1)+BE(2)*P(I,2)+BE(3)*P(I,3)
+            DO J=1,3
+               P(I,J)=P(I,J)+GA*(GA*BEP/(1.D0+GA)+P(I,4))*BE(J)
+            ENDDO
+            P(I,4)=GA*(P(I,4)+BEP)
+         ENDDO
+
+C..."string-like" decay
+      ELSE IF (DELTAE .GT. EMIN .or. S_RNDM(LA).gt.XI1)  THEN          
+         IF(NDEBUG.gt.2) 
+     &        WRITE(LUN,'(2X,A,3(2x,F8.3))')
+     &        'DIFDEC: string-like, (DELTAE,E0,central prob.):',
+     &        DELTAE,P0(5),1.D0-XI2
+c     set charge exchange probability, i.e. prob for p* -> n + pip
+         PAR53_def = PAR(53)
+         PAR(53) = PAR(130)
+         N1 = NP+1
+         CALL HSPLI(L0,IFL1,IFL2)
+         PAR(53) = PAR53_def
+         IF (P0(3) .GT. 0.D0.and.L0.gt.0)  THEN
+            IFLA = IFL2
+            IFL2 = IFL1
+            IFL1 = IFLA
+         ENDIF
+c     randomize flavor orientation in string
+         IF(IPAR(25).eq.1.and.S_RNDM(L0).gt.PAR(39))THEN
+            IFLA = IFL2
+            IFL2 = IFL1
+            IFL1 = IFLA
+         ENDIF
+         PAR24_def = PAR(24)
+         IF(IPAR(15).eq.2.and.IPAR(15).eq.3.and.IPAR(15).ne.7.and.
+     &        IPAR(15).lt.12)THEN
+         PAR(24) = PAR(25)*dEXP(-PAR(26)/P0(5))
+         ELSEIF(IPAR(15).eq.7)THEN
+            PAR(24) = PAR(25)
+         ENDIF
+ 10      CONTINUE
+         IPFLAG = IPFLAG*10
+         CALL STRING_FRAG_4FLV 
+     +        (P0(5), IFL1, IFL2, 0.D0,0.D0,0.D0,0.D0,IFBAD,-1)
+         IF (IFBAD .EQ. 1)then
+            if(ndebug.gt.1)
+     &           WRITE(lun,*)' SIB_DIFF: string-frag rejection! ',
+     &           '(M,NCALL)',P0(5),NCALL
+            NTRYS = NTRYS + 1
+            NP = N1-1
+            IFBAD = 0
+            IF(NTRYS.gt.5)then ! resample diff. mass              
+               NP = 0
+               IBAD = 1
+               PAR(24) = PAR24_def
+               RETURN
+            endif
+            GOTO 10
+         ENDIF
+         DO J=1,3
+            BE(J)=P0(J)/P0(4)
+         ENDDO
+         GA=P0(4)/P0(5)
+         DO I=N1,NP
+            BEP=BE(1)*P(I,1)+BE(2)*P(I,2)+BE(3)*P(I,3)
+            DO J=1,3
+               P(I,J)=P(I,J)+GA*(GA*BEP/(1.D0+GA)+P(I,4))*BE(J)
+            ENDDO
+            P(I,4)=GA*(P(I,4)+BEP)
+         ENDDO
+         PAR(24) = PAR24_def
+
+C...Phase space decay of the excited state
+      ELSEIF(DELTAE.GT.AM(7)+0.02D0)THEN
+         if(Ndebug.gt.2) 
+     &        WRITE(LUN,*)' DIFDEC: fireball, (DELTAE,string prob.):',
+     &        DELTAE,1.D0-XI1
+         IF(IPAR(14).GT.0.and.IPAR(14).NE.7)THEN
+            IF(IPAR(14).eq.5) PCHEX = 0.D0
+            NPI=0
+            IRES = 0
+            IF (S_RNDM(0).LT.PRES) THEN
+               IF (LA.LT.9) THEN
+c     if kinematically possible produce rho0 in charge exchange
+                  LL(1) = LRES(LA)
+                  DELTAE = P0(5) -  AM(LRES(LA))
+                  IF (DELTAE.GT.AM(7)+0.02D0) GOTO 100
+               ENDIF
+            ENDIF
+c     switch charge exchange on/off
+            IF( S_RNDM(1).LT.PCHEX)THEN
+               LL(1) = LCON(LA)*ISIGN(1,L0)
+               IF( (L0 .EQ. 6) .OR. (L0 .EQ. 11) )
+     .              LL(1) = LL(1)+INT((2.D0-EPS8)*S_RNDM(2))
+            ELSE
+               LL(1) = L0
+            ENDIF
+            
+            DELTAE = P0(5) - AM(LA)
+ 100        AV = 2.D0*dSQRT(DELTAE)
+            LA1 = IABS(LL(1))
+            NPI = INT(AV*(2.D0+0.5D0*GASDEV(LA)))
+            IF (IPAR(14).EQ.6)THEN
+               IF(NPI.LT.1.OR.NPI.GT.9.OR.AM(LA1)+NPI*AM(7)+0.02D0
+     .              .GT.P0(5))  GOTO 100
+            ELSE
+               IF(NPI.LT.0.OR.NPI.GT.9.OR.AM(LA1)+NPI*AM(7)+0.02D0
+     .              .GT.P0(5))  GOTO 100
+            ENDIF
+c     create resonances inside fireball..
+            IF(IPAR(14).ge.2
+     +           .and.DELTAE.GE.AM(LA1)+AM(27)+(NPI-1)*AM(7)+0.02D0)
+     +           IRES = 1
+            IF(IPAR(14).ge.3.and.DELTAE.GE.AM(LA1)+NPI*AM(27)+0.02D0) 
+     +           IRES=3
+            JQQ = ICHP(LA)*ISIGN(1,L0)-
+     .           ICHP(IABS(LL(1)))*ISIGN(1,LL(1))  
+ 120        JQTOT = 0
+            DO K=2,NPI
+               LL(K) = 6+INT(S_RNDM(K)*(3.D0-EPS8))
+c     suppress pi0 in fireball
+               IF(IPAR(14).ge.4)
+     +              LL(K) = 7+INT(S_RNDM(0)*(2.D0-EPS8))
+c     IF(IRES.EQ.1.and.S_RNDM(LA).LT.0.5D0)
+               IF(IRES.EQ.1) THEN
+                  LL(K) = 27-INT(S_RNDM(1)*(3.D0-EPS8))
+                  IRES = 2
+               ENDIF
+               IF(IRES.EQ.3)
+     +              LL(K) = 27-INT(S_RNDM(2)*(3.D0-EPS8))
+               JQTOT = JQTOT + ICHP(LL(K))
+            ENDDO
+            JQR = JQQ-JQTOT
+            IF (JQR.LT.-1.OR.JQR.GT.1)  GOTO 120
+            LL(NPI+1) = 6+JQR
+            IF (LL(NPI+1) .EQ. 5)  LL(NPI+1)=8
+            CALL DECPAR (0,P0,NPI+1,LL, PD)
+            DO J=1,NPI+1
+               NP = NP+1
+               LLIST(NP) = LL(J)
+               nporig(NP)= Ipflag*2
+               lrnk(Np) = 0
+               niorig(NP)= iiflag
+               DO K=1,5
+                  P(NP,K) = PD(J,K)
+               ENDDO
+            ENDDO
+
+         ELSEIF (IPAR(14).EQ.7.AND.LA.LT.9) THEN
+c     all diff states go to resonances for pi beam ..
+            NPI=0
+            IRES = 0
+            LL(1) = LRES1(LA)
+            DELTAE = P0(5) -  AM(LL(1))
+cdh         IF( DELTAE.LT.AM(7)+0.02D0) GOTO 222
+            IF( DELTAE.LT.AM(7)+0.02D0) THEN
+              IF(IPAR(14).EQ.7)  DELTAE = P0(5) - AM(LA)
+              AV = 2.D0*DSQRT(DELTAE)
+ 201          NPI = INT(AV*(1.D0+0.5D0*GASDEV(LA)))
+c              print *,'npi:',npi,'av',av,'p05',p0(5),am(la),deltae
+              IF(NPI.LE.0.OR.NPI.GT.9.OR.AM(LA)+NPI*AM(7)+0.02D0
+     .             .GT.P0(5))  GOTO 201
+              IF (S_RNDM(0).LT.PCHEX)  THEN
+                 LL(NPI+1) = LCON(LA)*ISIGN(1,L0)
+                 IF( (L0 .EQ. 6) .OR. (L0 .EQ. 11) )
+     .                LL(NPI+1) = LL(NPI+1)+INT((2.D0-EPS8)*S_RNDM(1))
+              ELSE
+                 LL(NPI+1) = L0
+              ENDIF
+              JQQ = ICHP(LA)*ISIGN(1,L0)-
+     .             ICHP(IABS(LL(NPI+1)))*ISIGN(1,LL(NPI+1))
+ 221          JQTOT = 0
+              DO K=1,NPI-1
+                 LL(K) = 6+INT(S_RNDM(K)*(3.D0-EPS8))
+                 JQTOT = JQTOT + ICHP(LL(K))
+              ENDDO
+              JQR = JQQ-JQTOT
+              IF (JQR.LT.-1.OR.JQR.GT.1)  GOTO 221
+              LL(NPI) = 6+JQR
+              IF (LL(NPI) .EQ. 5)  LL(NPI)=8
+              CALL DECPAR (0,P0,NPI+1,LL, PD)
+              DO J=1,NPI+1
+                 NP = NP+1
+                 LLIST(NP) = LL(J)
+                 NPORIG(NP) = IPFLAG*2
+                 lrnk(Np) = 0
+                 niorig(NP)= iiflag
+                 DO K=1,5
+                    P(NP,K) = PD(J,K)
+                 ENDDO
+              ENDDO
+
+            ELSE
+              IF( S_RNDM(0).LT.PAR(31))THEN
+                 LL(1) = LRES1(LCON(LA))
+                 IF( (L0 .EQ. 6) .OR. (L0 .EQ. 11) )
+     .                LL(1) = LRES1(IABS(L0)+INT((2.D0-EPS8)*S_RNDM(1)))
+              ENDIF
+ 300          AV = 2.D0*dSQRT(DELTAE)
+              LA1 = IABS(LL(1))
+              NPI = INT(AV*(2.D0+0.5D0*GASDEV(LA)))
+              IF(ABS(PAR(32)).gt.0.D0)
+     &             NPI = INT(AV*(PAR(32)+0.5D0*GASDEV(LA)))
+              IF(NPI.LT.0.OR.NPI.GT.9.OR.AM(LA1)+NPI*AM(7)+0.02D0
+     .             .GT.P0(5))  GOTO 300
+c     create resonances inside fireball..
+c              IRES=3
+              JQQ = ICHP(LA)*ISIGN(1,L0)-
+     .             ICHP(IABS(LL(1)))*ISIGN(1,LL(1))
+ 320          JQTOT = 0
+              DO K=2,NPI
+                 LL(K) = 6+INT(S_RNDM(K)*(3.D0-EPS8))
+c     suppress pi0 in fireball
+c                 IF(IPAR(14).ge.4)
+c     +                LL(K) = 7+INT(S_RNDM(0)*1.99999D0)
+c       IF(IRES.EQ.1.and.S_RNDM(LA).LT.0.5D0)
+c                 LL(K) = 27-INT(S_RNDM(0)*2.99999D0)
+                 JQTOT = JQTOT + ICHP(LL(K))
+              ENDDO
+              JQR = JQQ-JQTOT
+              IF (JQR.LT.-1.OR.JQR.GT.1)  GOTO 320
+              LL(NPI+1) = 6+JQR
+              IF (LL(NPI+1) .EQ. 5)  LL(NPI+1)=8
+              CALL DECPAR (0,P0,NPI+1,LL, PD)
+              DO J=1,NPI+1
+                 NP = NP+1
+                 LLIST(NP) = LL(J)
+                 nporig(NP)= Ipflag*2
+                 lrnk(Np) = 0
+                 niorig(NP)= iiflag
+                 DO K=1,5
+                    P(NP,K) = PD(J,K)
+                 ENDDO
+              ENDDO
+            ENDIF
+
+         ELSEIF (IPAR(14).LE.-1) THEN
+C...  generalized fireball model
+            IF(Ndebug.gt.2) 
+     &           WRITE(LUN,*)' DIFDEC: using generalized fireball!'
+c     set charge exchange probability, 
+c     i.e. prob for p* -> n + pip
+            PCXG = PAR(61)
+            CALL FIREBALL_4FLV(L0,P0,PCXG,IFBAD)
+            IF(IFBAD.eq.1)THEN
+               IF(ndebug.gt.0)THEN
+                  IF(NRJECT.le.10)THEN
+                     WRITE(LUN,*)
+     &                    ' DIFDEC: warning: fireball rejection! ',
+     &                    'diff. mass to low to dissociate beam!'
+                     WRITE(LUN,*)
+     &                ' DIFDEC: m_Beam, DELTAE ,AM(7)+0.02, NCALL: ', 
+     &                AM(LA),DELTAE,'>',AM(7)+0.02D0,NCALL
+                  ENDIF
+                  IF(NRJECT.eq.10) 
+     &             write(lun,*)' this was the last warning.. good luck!'
+               ENDIF
+               NRJECT = NRJECT + 1
+               NP = 0
+               IBAD = 1
+               RETURN
+            ENDIF
+
+         ELSE
+cdh 222       IF(IPAR(14).EQ.7)  DELTAE = P0(5) - AM(LA)
+           IF(IPAR(14).EQ.7)  DELTAE = P0(5) - AM(LA)
+            AV = 2.D0*dSQRT(DELTAE)
+ 200        NPI = INT(AV*(1.D0+0.5D0*GASDEV(0)))
+c            print *,'npi:',npi,'av',av,'p05',p0(5),am(la),deltae
+            IF(NPI.LE.0.OR.NPI.GT.9.OR.AM(LA)+NPI*AM(7)+0.02D0
+     .           .GT.P0(5))  GOTO 200
+            IF (S_RNDM(0).LT.PCHEX)  THEN
+               LL(NPI+1) = LCON(LA)*ISIGN(1,L0)
+               IF( (L0 .EQ. 6) .OR. (L0 .EQ. 11) )
+     .              LL(NPI+1) = LL(NPI+1)+INT((2.D0-EPS8)*S_RNDM(1))
+            ELSE
+               LL(NPI+1) = L0
+            ENDIF
+            JQQ = ICHP(LA)*ISIGN(1,L0)-
+     .           ICHP(IABS(LL(NPI+1)))*ISIGN(1,LL(NPI+1))  
+ 220        JQTOT = 0
+            DO K=1,NPI-1
+               LL(K) = 6+INT(S_RNDM(K)*(3.D0-EPS8))
+               JQTOT = JQTOT + ICHP(LL(K))
+            ENDDO
+            JQR = JQQ-JQTOT
+            IF (JQR.LT.-1.OR.JQR.GT.1)  GOTO 220
+            LL(NPI) = 6+JQR
+            IF (LL(NPI) .EQ. 5)  LL(NPI)=8
+            CALL DECPAR (0,P0,NPI+1,LL, PD)
+            DO J=1,NPI+1
+               NP = NP+1
+               LLIST(NP) = LL(J)
+               NPORIG(NP) = IPFLAG*2
+               lrnk(Np) = 0
+               niorig(NP)= iiflag
+               DO K=1,5
+                  P(NP,K) = PD(J,K)
+               ENDDO
+            ENDDO
+         ENDIF
+      ELSE
+         if (ndebug .gt. 0) then
+           IF(NRJECT.le.10)THEN
+            WRITE(LUN,*) ' DIFDEC rejection! ',
+     &           'diff. mass to low to dissociate beam!'
+            WRITE(LUN,*) ' DIFDEC: LA, m_Beam, DELTAE, NCALL : ', 
+     &           LA, AM(LA),DELTAE,'>',AM(7)+0.02D0,NCALL
+            IF(Irec.ne.1) 
+     &           WRITE(LUN,*) '   was recursive call! (ECM):',P0(5)
+           ENDIF
+           IF(NRJECT.eq.10) 
+     &        write(lun,*)' this was the last warning.. good luck!'
+         endif
+         NRJECT = NRJECT + 1            
+         NP = 0
+         IBAD = 1
+         RETURN
+      ENDIF
+      PAR(1) = PAR1_def
+      END
+C=======================================================================
+
+      SUBROUTINE EXCT_RMNT(JW,KRMNT,IREJ)
+
+C-----------------------------------------------------------------------
+C     routine to produce massive excitations of beam and/or target \FR'14
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTMIN,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+
+      INTEGER IBMRDX,ITGRDX,IHMJDX,ISMJDX,ICSTDX,IINTDX
+      COMMON /S_INDX/ IBMRDX(3),ITGRDX(NW_max,3),
+     &     IHMJDX(NW_max*NH_max),IINTDX(NW_max),
+     &     ISMJDX(NW_max*NS_max),ICSTDX(2*NW_max,3)
+
+      INTEGER IRMNT,KRB,KRT
+      DOUBLE PRECISION XRMASS,XRMEX
+      COMMON /S_RMNT/ XRMASS(2),XRMEX(2),IRMNT(NW_max),KRB,KRT(NW_max)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+C     parameters that represent: NW: max. number of wounded nucleons,
+C     NS,NH: max. number of soft and hard interactions
+c      PARAMETER (NW_max = 20)
+C     The COMMON block /S_CHIST/ contains information about the
+C     the structure of the  generated event:
+C     NWD   = number of wounded nucleons
+C     NJET = total number of hard interactions
+C     NSOF = total number of soft interactions
+C     NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C     NNJET (1:NW) = number of minijets produced in each interaction 
+C     JDIF(1:NW) = diffraction code 
+C                  0 : non-diff,
+C                  1 : beam-diff
+C                  2 : target-diff
+C                  3 : double-diff
+      INTEGER NNSOF,NNJET,JDIF,NWD,NJET,NSOF
+      COMMON /S_CHIST/ NNSOF(NW_max),NNJET(NW_max),
+     &     JDIF(NW_max),NWD,NJET,NSOF
+
+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
+      INTEGER ITRY, NREJ
+      COMMON /S_CNT/ ITRY(20), NREJ(20)
+      DOUBLE PRECISION XM2MIN,ALXMIN,SLOP0,ASLOP,BSLOP,XMASS
+      COMMON /S_DIFMAss/ XM2MIN(6),ALXMIN(6),SLOP0,ASLOP,BSLOP,XMASS(2)
+
+      DOUBLE PRECISION P1(5),P2(5),P1N(5),P2N(5),PBM1(5),PBM2(5),PBM(5),
+     &     PTG1(5),PTG2(5),PTG(5),PTT(5),GABE(4)
+      DOUBLE PRECISION XMB,XMB2,ALPHA,XMSQMIN,XM2MAX,XM2,SHAT,ECM,EE,EE2
+      DOUBLE PRECISION XMFRAC,XSFRAC,XMT,XMT2,XMT12,XMT22,P1TOT,P2TOT
+      DOUBLE PRECISION DELTAE,XMMIN,COD,COF,SID,SIF,ANORF,PX,PY,PZ
+      DOUBLE PRECISION XM1,ETOT,XI,XM2DIS,S_RNDM
+c     DOUBLE PRECISION XDUMMY
+
+      INTEGER   IMRG2HAD,LL(99)
+      INTEGER   IBM1,IBM2,IBMST1,IBMST2,ITG1,ITG2,ITGST1,ITGST2,ITGH
+      INTEGER   IDM,IFL,IBMH, IREF,I, II,K,J,JJ,L01,L02,NP0LD,NPLD
+      INTEGER   JW,IREJ,KRMNT,LREJ,IBD,ICST11,ICST21
+      INTEGER   IFLB1,IFLB2,IFLT1,IFLT2,L0,IDHAD,ISTH,IBMST,ITGST
+      INTEGER   IFL1,IFL2,IMRG,IMST,IMST1,IMRGBAR,ICST2,LBD
+      INTEGER   IMST11,IMST2,IMST21,ISTH1,ISTH2,IAFL1,IAFL2!,IMST22
+
+      SAVE
+      DATA LL /5*0,7*2,2*1,12*0,2,6*0,6*1,19*0,2,2,10*0,
+     &     2,2,0,2,2,11*0,1,1,1,9*0,1/     
+
+      
+c     default return point, beam and target sampling
+c      IREJ = 1
+
+      IF(NDEBUG.gt.2)
+     &     WRITE(LUN,*) ' EXCT_RMNT: input (JW,KRMNT,IREJ)', 
+     &     JW,KRMNT,IREJ
+
+      IF(NDEBUG.gt.3)THEN
+         write(LUN,*)'  beam remnant index: (lvl0,flv1,flv2)  ',IBMRDX
+         write(LUN,*)'  1st central string index: (lvl0,bm,tg)', 
+     &        (ICSTDX(2*(JW-1)+1,ii),ii=1,3)
+         write(LUN,*)'  2nd central string index: (lvl0,bm,tg)',
+     &        (ICSTDX(2*(JW-1)+2,ii),ii=1,3)
+         write(LUN,*)'  target remnant index: (lvl0,flv1,flv2)',
+     &        (ITGRDX(JW,ii),ii=1,3)
+      ENDIF
+
+      ITRY(5) = 0
+
+C...  select indices depending on configuration
+C     krmnt = 0 : no excitation on either side
+c           = 1 : beam side excited remnant
+c           = 2 : target side
+c           = 3 : both sides
+
+c     write remnant configuration to remnant common
+      IRMNT(JW) = KRMNT
+      IF(KRMNT.eq.1)THEN
+c     beam side remnant only
+c     proto-remnant position: IBMRDX(1)
+c     partons in : IBMRDX(2:3)
+         IBM1 = IBMRDX(2)
+         IBM2 = IBMRDX(3)
+c     target side to transfer energy from: 
+c     (sofar always choose valence pair)
+         ITG1 = ICSTDX(2*(JW-1)+1,3)
+         ITG2 = ICSTDX(2*(JW-1)+2,3)
+c     beam-side partons to go into central strings
+         IBMST1 = ICSTDX(2*(JW-1)+1,2)
+         IBMST2 = ICSTDX(2*(JW-1)+2,2)
+c     target-side partons to go into central strings
+         ITGST1 = ITG1
+         ITGST2 = ITG2
+
+      ELSEIF(KRMNT.eq.2)THEN
+c     target side remnant only
+c     proto-remnant in ITGRDX(JW,1)
+         ITG1 = ITGRDX(JW,2)
+         ITG2 = ITGRDX(JW,3)
+c     transfer energy from beam remnant or 
+c     central strings with valence quarks
+c     in ICSTDX(JW+0:1,2)
+c     means no beam remnant --> get from valence strings
+         IBM1 = ICSTDX(2*(JW-1)+1,2)
+         IBM2 = ICSTDX(2*(JW-1)+2,2)
+c     beam-side partons to go into central strings
+         IBMST1 = IBM1
+         IBMST2 = IBM2
+c     target-side partons to go into central strings
+         ITGST1 = ICSTDX(2*(JW-1)+1,3)
+         ITGST2 = ICSTDX(2*(JW-1)+2,3)
+
+      ELSEIF(KRMNT.eq.3)THEN
+c     beam and target side remnant
+c     transfer energy from pairs in rmnt or central strings
+c     listed in I?RDX and ICSTDX()
+         IBM1 = IBMRDX(2)
+         IBM2 = IBMRDX(3)
+         ITG1 = ITGRDX(JW,2)
+         ITG2 = ITGRDX(JW,3)
+
+      ELSEIF(KRMNT.eq.0)THEN
+c     no excited remnant case, jump straight to central strings..
+         GOTO 100
+
+      ENDIF
+
+      IF(NDEBUG.gt.3)then
+         write(lun,*) '  beam parton1:  ',IBM1
+         write(lun,*) '  beam parton2:  ',IBM2
+         write(lun,*) '  target parton1:',ITG1
+         write(lun,*) '  target parton2:',ITG2
+      endif
+
+c     save status of parton stack
+      CALL GET_NPP(NPLD,NP0LD)
+
+ 10   ITRY(5) = ITRY(5) + 1
+      IF(ITRY(5).GT.NREJ(5))THEN
+         IF(NDEBUG.gt.2) 
+     &        WRITE(LUN,*) ' EXCT_RMNT: no. of trials exceeded, ',
+     &        NREJ(5), 'resample minijets ...' , IREJ
+         RETURN
+      ENDIF
+c     reset parton stack after rmnt mass rejection
+      CALL INI_PRTN_STCK(NPLD,NP0LD)
+
+C..   construct 4momenta of proto-remnants
+c     index of beam remnant on stack: IBMRDX(1)
+
+C..   center-of-mass energy of parton system (s hat)
+c     calculated in hadron-hadron frame
+c     for first interaction (jw=1) partons are massless and collinear (sum pt=0)
+c     in this case ecm = SQS*SQRT(XB*XT), xb,t=x1+x2 
+c      for jw>1 beam partons may have already acquired mass and additional pt
+c     therefore ecm = sqs*sqrt(xb*xt) + corr.
+c     IRDX: index of remnant on parton stack
+c      SHAT = S*XB*XT+XM2+(XT/XB)*XMT2
+
+c     with 4momenta of partons on stack, momentum fractions are obsolete
+c     center-of-mass energy is simply: shat = (pbm+ptg)**2
+
+c     construct total 4momentum
+c     add beam-side parton momenta, in had.-had. frame
+      CALL RD_PRTN_4VEC(IBM1,PBM1,IFL,IDM)
+      CALL RD_PRTN_4VEC(IBM2,PBM2,IFL,IBMH)
+      CALL ADD_4VECS(PBM1,PBM2,PBM)
+      
+c     target-side parton momenta, in had.-had. frame
+      CALL RD_PRTN_4VEC(ITG1,PTG1,IFL,IDM)
+      CALL RD_PRTN_4VEC(ITG2,PTG2,IFL,IDM)
+      CALL ADD_4VECS(PTG1,PTG2,PTG)
+      
+c     add beam and target side to get total 4momentum
+      CALL ADD_4VECS(PBM,PTG,PTT)
+      SHAT = PTT(5)**2
+      ECM = PTT(5)
+c     catch virtual remnants
+      IF(PTT(5).LT.0.D0) THEN
+         IF(NDEBUG.GT.2)THEN
+            WRITE(LUN,*) ' EXCT_RMNT: too little mass left (Shat):',
+     &           SHAT
+            WRITE(LUN,*) '        resample minijets...'
+         ENDIF
+         LREJ = 2
+         RETURN                 ! resample minijets
+      ENDIF
+
+
+      IF(NDEBUG.GT.2) WRITE(LUN,*) ' EXCT_RMNT: try no.',ITRY(5)
+      IF(NDEBUG.GT.3)THEN
+         write(LUN,*) '  4momenta before scattering:'
+         write(LUN,*) '  PBM1:' , (PBM1(jj),jj=1,5)
+         write(LUN,*) '  PBM2:' , (PBM2(jj),jj=1,5)
+         write(LUN,*) '  PBM:' , (PBM(jj),jj=1,5)
+
+         write(LUN,*) '  PTG1:' , (PTG1(jj),jj=1,5)
+         write(LUN,*) '  PTG2:' , (PTG2(jj),jj=1,5)
+         write(LUN,*) '  PTG:' , (PTG(jj),jj=1,5)
+
+         write(LUN,*) '  PTT:' , (PTT(jj),jj=1,5)
+      ENDIF
+
+      IF(NDEBUG.gt.2)
+     &     WRITE(LUN,*)' EXCT_RMNT: SHAT:',SHAT
+
+      XMFRAC = PAR(81)
+      XSFRAC = PAR(82)
+
+c     exponent of remnant mass distribution (1/Mx**2)**alpha
+c     by default: alpha = 1
+c     different for baryons and mesons
+c      ALPHA = PAR(98)
+
+C..   Sample masses
+      IF(KRMNT.eq.1)THEN
+         XM2MAX = MIN(XSFRAC*S,XMFRAC*AM2(IABS(KB)))
+         XM2MAX = MAX(XM2MAX,1.D0)
+
+c     mass of target-side: 0
+         XMT = 0.D0
+         XMT2 = 0.D0
+c     get remnant mass
+c     (might have received mass from prior interaction)
+         CALL GET_MASS2(IBMRDX(1),XM2)
+c     allowing excitation to fallback to beam means min.
+c     mass is beam mass, or more exact smallest mass of hadrons 
+c     with flavors in remnant
+         IF(IPAR(64).eq.1)THEN
+c     remnant mass can also decrease through interactions
+            XMSQMIN = AM2(IABS(KB))
+         ELSE
+c     remnant mass only increased by multiple interactions..
+            XMSQMIN = MAX(AM2(IABS(KB)),XM2)
+         ENDIF
+C     select exponent from COMMON
+         ALPHA = XRMEX(LL(IABS(KB)))
+c     sample beam mass
+         XMB2 = XM2DIS(XMSQMIN,XM2MAX,ALPHA)
+         IF(NDEBUG.gt.2)
+     &        WRITE(LUN,*)' EXCT_RMNT: XM2min,XM2max,ALPHA,XM2:',
+     &        XMSQMIN,XM2MAX,ALPHA,XMB2
+c     check if resonance or massive hadron has to be formed
+         CALL SEL_RES(XMB2,KRB,IBMRDX(1),IBMH)
+         XMB = dsqrt(XMB2)
+
+      ELSEIF(KRMNT.eq.2)THEN
+c     target side mass
+         XM2MAX = MIN(XSFRAC*S,XMFRAC*AM2(IABS(KT(JW))))
+         XM2MAX = MAX(XM2MAX,1.D0)
+
+         XMB = 0.D0
+         XMB2 = 0.D0
+         XMSQMIN = AM2(KT(JW))
+C     select exponent from COMMON
+         ALPHA = XRMEX(LL(IABS(KT(JW))))
+         XMT2 = XM2DIS(XMSQMIN,XM2MAX,ALPHA)
+         IF(NDEBUG.gt.2)
+     &        WRITE(LUN,*)' EXCT_RMNT: XM2min,XM2max,ALPHA,XM2:',
+     &        XMSQMIN,XM2MAX,ALPHA,XMT2
+
+c     check if resonance or massive hadron has to be formed
+         CALL SEL_RES(XMT2,KRT(JW),ITGRDX(JW,1),ITGH)
+         XMT = dsqrt(XMT2)
+
+      ELSEIF(KRMNT.eq.3)THEN
+         XM2MAX = MIN(XSFRAC*S,XMFRAC*AM2(IABS(KB)))
+         XM2MAX = MAX(XM2MAX,1.D0)
+
+         CALL GET_MASS2(IBMRDX(1),XM2)
+         IF(IPAR(64).eq.1)THEN
+c     remnant mass can also decrease through interactions
+            XMSQMIN = AM2(IABS(KB))
+         ELSE
+c     remnant mass only increased by multiple interactions..
+            XMSQMIN = MAX(AM2(IABS(KB)),XM2)
+         ENDIF
+C     select exponent from COMMON
+         ALPHA = XRMEX(LL(IABS(KB)))        
+         XMB2 = XM2DIS(XMSQMIN,XM2MAX,ALPHA)
+         IF(NDEBUG.gt.2)
+     &        WRITE(LUN,*)' EXCT_RMNT: XM2min,XM2max,ALPHA,xm2:',
+     &        XMSQMIN,XM2MAX,ALPHA,XMB2
+
+c     check if resonance or massive hadron has to be formed
+         CALL SEL_RES(XMB2,KRB,IBMRDX(1),IBMH)
+         XMB = SQRT(XMB2)
+         
+c     target always nucleon
+         XM2MAX = MIN(XSFRAC*S,XMFRAC*AM2(IABS(KT(JW))))
+         XM2MAX = MAX(XM2MAX,1.D0)
+
+         XMSQMIN = AM2(IABS(KT(JW)))
+C     select exponent from COMMON
+         ALPHA = XRMEX(LL(IABS(KT(JW))))        
+         XMT2 = XM2DIS(XMSQMIN,XM2MAX,ALPHA)
+         IF(NDEBUG.gt.2)
+     &        WRITE(LUN,*)' EXCT_RMNT: XM2min,XM2max,alpha,XM2:',
+     &        XMSQMIN,XM2MAX,ALPHA,XMT2
+
+c     check if resonance or massive hadron has to be formed
+         CALL SEL_RES(XMT2,KRT(JW),ITGRDX(JW,1),ITGH)
+         XMT = SQRT(XMT2)
+
+      ENDIF
+c     write excitation mass to output common
+      XRMASS(1) = XMB
+      XRMASS(2) = XMT
+
+c     minimal mass requirement
+c      IF(SHAT.lt.XMB2+XMT2+0.3) GOTO 10
+      IF(SHAT.lt.XMB2+XMT2+2.D0*XMB*XMT+0.3D0) GOTO 10
+
+C     transfer cm energy to mass of particle in parton-parton cm
+      CALL TRANSFONSHELL(ECM,XMB,XMT,XM2MAX,1,P1,P2,IBD)
+      IF(IBD.eq.1) THEN
+         IF(NDEBUG.gt.2) WRITE(LUN,*) ' EXCT_RMNT: excitation rejected!'
+         RETURN
+      ENDIF
+
+C...  Boost 4momenta to hadron-hadron center-of-mass
+c     along z only if initial partons do not carry transverse momentum
+c     (cancels between val1 and val2)
+c     with multiple nucleons interacting beam val partons can aquire 
+c     transverse momentum from the target. in this case need arbitrary boost
+      DO K = 1,4
+         GABE(k) = PTT(k)/PTT(5)
+      ENDDO
+      CALL SIB_ALTRA(GABE(4), GABE(1), GABE(2), GABE(3),
+     &     P1(1),P1(2),P1(3),P1(4),
+     &     P1TOT,P1N(1),P1N(2),P1N(3),P1N(4))
+      P1N(5)=P1(5)
+      CALL SIB_ALTRA(GABE(4), GABE(1), GABE(2), GABE(3),
+     &     P2(1),P2(2),P2(3),P2(4),
+     &     P2TOT,P2N(1),P2N(2),P2N(3),P2N(4))
+      P2N(5)=P2(5)
+
+C...  Calculate new 4momentum of partons in had.-had. frame
+c     P1,P2: momenta after scattering in parton-parton cm.
+c     P1n,P2n: momenta after scattering in had.-had. cm
+c     PBM1,2: momenta of beam partons in had.-had. before scattering
+c     PTG1,2: momenta of target partons in had.-had. before scattering
+c     PBM: combined momentum of all beam partons before scattering
+c     PTG: combined momentum of all target partons before scattering
+
+c     energy and z component
+      DO II=3,4
+         PBM1(II) = PBM1(II)*P1n(II)/PBM(II)
+         PBM2(II) = PBM2(II)*P1n(II)/PBM(II)
+
+         PTG1(II) = PTG1(II)*abs(P2N(II)/PTG(II))
+         PTG2(ii) = PTG2(ii)*abs(P2N(II)/PTG(II))
+      ENDDO
+
+c     if transverse momentum prior to interaction zero then
+c     assign transverse momentum of partons according to random fraction
+      IF(ABS(PBM(1)).LT.EPS10.or.ABS(PBM(2)).LT.EPS10)THEN
+         DO II = 1,2
+            XI = S_RNDM(II)
+            PBM1(II) = XI*P1N(Ii)
+            PBM2(II) = (1.D0-XI)*P1N(II)
+         ENDDO
+      ELSE
+         DO II=1,2
+            PBM1(II) = PBM1(II)*P1N(II)/PBM(II)
+            PBM2(II) = PBM2(II)*P1N(II)/PBM(II)
+         ENDDO         
+      ENDIF
+
+      IF(ABS(PTG(1)).LT.EPS10.or.ABS(PTG(2)).LT.EPS10)THEN
+         DO II=1,2
+            XI = S_RNDM(II)
+            PTG1(II) = XI*P2N(II)
+            PTG2(II) = (1.D0-XI)*P2N(II)
+         ENDDO
+      ELSE
+         DO II=1,2
+            PTG1(II) = PTG1(II)*P2N(II)/PTG(II)
+            PTG2(II) = PTG2(II)*P2N(II)/PTG(II)
+         ENDDO                  
+      ENDIF
+
+      IF(NDEBUG.GT.3)THEN
+         write(LUN,*) '  parton 4momenta after scattering:'
+         write(LUN,*) '   PBM1:' , (PBM1(jj),jj=1,5)
+         write(LUN,*) '   PBM2:' , (PBM2(jj),jj=1,5)
+         write(LUN,*) '   sum: ' , (PBM2(jj)+PBM1(jj),jj=1,5)
+         write(LUN,*) '   PTG1:' , (PTG1(jj),jj=1,5)
+         write(LUN,*) '   PTG2:' , (PTG2(jj),jj=1,5)
+         write(LUN,*) '   sum: ' , (PTG2(jj)+PTG1(jj),jj=1,5)
+      ENDIF
+      
+C...  change parton 4momenta on stack
+      CALL EDT_PRTN(IBM1,PBM1(1),PBM1(2),PBM1(3),PBM1(4),PBM1(5),IDM)
+      CALL EDT_PRTN(IBM2,PBM2(1),PBM2(2),PBM2(3),PBM2(4),PBM2(5),IDM)
+
+      CALL EDT_PRTN(ITG1,PTG1(1),PTG1(2),PTG1(3),PTG1(4),PTG1(5),IDM)
+      CALL EDT_PRTN(ITG2,PTG2(1),PTG2(2),PTG2(3),PTG2(4),PTG2(5),IDM)
+         
+C...  add remnants
+c     references are circular: 
+c     rmnt --> parton1 --> parton2 --> lvl2 rmnt (hadron) --> rmnt
+      IF(KRMNT.eq.1)THEN
+c     beam side remnant, add only if does not exist yet otherwise edit
+         IF(IBMRDX(1).eq.0)THEN
+            CALL ADD_PRTN
+     &           (P1N(1),P1N(2),P1N(3),P1N(4),P1N(5),2,0,IBM1,IBMRDX(1))
+         ELSE
+            CALL EDT_PRTN
+     &           (IBMRDX(1),P1N(1),P1N(2),P1N(3),P1N(4),P1N(5),IREF)
+         ENDIF
+c     add beam hadron as hypothetical final state
+         IF(IBMH.eq.0)THEN
+            CALL ADD_PRTN
+     &         (P1N(1),P1N(2),P1N(3),P1N(4),P1N(5),KRB,2,IBMRDX(1),IBMH)
+         ELSE
+            CALL EDT_PRTN
+     &           (IBMH,P1N(1),P1N(2),P1N(3),P1N(4),P1N(5),IREF)
+         ENDIF
+c     add references rmnt --> parton1 etc
+         CALL ADD_REF(IBMRDX(1),IBM1)
+         CALL ADD_REF(IBM1,IBM2)
+         CALL ADD_REF(IBM2,IBMH)
+
+      ELSEIF(KRMNT.eq.2)THEN
+c     add target side remnant
+         IF(ITGRDX(JW,1).eq.0)THEN
+            CALL ADD_PRTN
+     &           (P2N(1),P2N(2),P2N(3),P2N(4),P2N(5),
+     &           -2,0,0,ITGRDX(JW,1))
+         ELSE
+            CALL EDT_PRTN
+     &           (ITGRDX(JW,1),P2N(1),P2N(2),P2N(3),P2N(4),P2N(5),IREF)
+         ENDIF
+         IF(ITGH.eq.0)THEN
+c     add target hadron as hypothetical final state, always nucleon
+            CALL ADD_PRTN
+     &           (P2N(1),P2N(2),P2N(3),P2N(4),P2N(5),
+     &           KRT(JW),2,ITGRDX(JW,1),ITGH)
+         ELSE
+            CALL EDT_PRTN
+     &           (ITGH,P2N(1),P2N(2),P2N(3),P2N(4),P2N(5),IREF)
+         ENDIF
+
+c     add references rmnt --> parton1 etc
+         CALL ADD_REF(ITGRDX(JW,1),ITG1)
+         CALL ADD_REF(ITG1,ITG2)
+         CALL ADD_REF(ITG2,ITGH)
+
+      ELSEIF(KRMNT.eq.3)THEN
+c     beam side remnant, add only if does not exist yet, otherwise edit
+         IF(IBMRDX(1).EQ.0)THEN
+            CALL ADD_PRTN
+     &           (P1N(1),P1N(2),P1N(3),P1N(4),P1N(5),2,0,0,IBMRDX(1))
+         ELSE
+            CALL EDT_PRTN
+     &           (IBMRDX(1),P1N(1),P1N(2),P1N(3),P1N(4),P1N(5),IREF)
+         ENDIF
+c     add beam hadron as hypothetical final state
+         IF(IBMH.EQ.0)THEN
+            CALL ADD_PRTN
+     &         (P1N(1),P1N(2),P1N(3),P1N(4),P1N(5),KRB,2,IBMRDX(1),IBMH)
+         ELSE
+            CALL EDT_PRTN
+     &           (IBMH,P1N(1),P1N(2),P1N(3),P1N(4),P1N(5),IREF)
+         ENDIF
+         CALL ADD_REF(IBMRDX(1),IBM1)
+         CALL ADD_REF(IBM1,IBM2)
+         CALL ADD_REF(IBM2,IBMH)
+
+c     add target side remnant
+         IF(ITGRDX(JW,1).eq.0)THEN
+            CALL ADD_PRTN
+     &           (P2N(1),P2N(2),P2N(3),P2N(4),P2N(5),-2,0,0,IREF)
+            ITGRDX(JW,1) = IREF
+         ELSE
+            CALL EDT_PRTN
+     &           (ITGRDX(JW,1),P2N(1),P2N(2),P2N(3),P2N(4),P2N(5),IREF)
+         ENDIF
+         IF(ITGH.eq.0)THEN
+c     add target hadron as hypothetical final state
+            CALL ADD_PRTN
+     &           (P2N(1),P2N(2),P2N(3),P2N(4),P2N(5),
+     &           KRT(JW),2,ITGRDX(JW,1),ITGH)
+         ELSE
+            CALL EDT_PRTN
+     &           (ITGH,P2N(1),P2N(2),P2N(3),P2N(4),P2N(5),IREF)
+         ENDIF
+c     add references rmnt --> parton1 etc
+         CALL ADD_REF(ITGRDX(JW,1),ITG1)
+         CALL ADD_REF(ITG1,ITG2)
+         CALL ADD_REF(ITG2,ITGH)
+
+      ENDIF
+
+ 100  IF(JDIF(JW).ne.0.and.NWD.ne.1)THEN
+c     incoherent diffraction case
+c     add parton 4momenta to obtain c.m energy
+         
+c     beam side
+         IBMST1 = ICSTDX(2*(JW-1)+1,2)
+         IBMST2 = ICSTDX(2*(JW-1)+2,2)
+
+c     target side
+         ITGST1 = ICSTDX(2*(JW-1)+1,3)
+         ITGST2 = ICSTDX(2*(JW-1)+2,3)
+         
+         CALL RD_PRTN_4VEC(IBMST1,PBM1,IFLB1,IDM)
+         CALL RD_PRTN_4VEC(IBMST2,PBM2,IFLB2,IDM)
+         CALL ADD_4VECS(PBM1,PBM2,PBM)
+         CALL RD_PRTN_4VEC(ITGST1,PTG1,IFLT1,IDM)
+         CALL RD_PRTN_4VEC(ITGST2,PTG2,IFLT2,IDM)
+         CALL ADD_4VECS(PTG1,PTG2,PTG)
+c     total 4momentum
+         CALL ADD_4VECS(PBM,PTG,PTT)
+c     add diffractive system to parton stack
+c     references are: diff --> diff. hadron 
+c     --> beam parton1 --> beam parton2 --> target parton1 etc
+         CALL ADD_PRTN_4VEC(PTT,-10*JDIF(JW),0,IBMST1,IREF)
+         CALL ADD_INT_REF(IREF,IINTDX(JW))
+c     both string indices point to diff. system
+         ICSTDX(2*(JW-1)+1,1) = IREF
+         ICSTDX(2*(JW-1)+2,1) = IREF
+c     add diff. beam hadron to stack
+c     model assumes remnant always excited in first interaction
+         L0 = KB
+c     if not first interaction or remnant excited, merge sea pair to hadron
+         IF(KRMNT.ne.0.or.JW.ne.1) THEN       
+            L0 = IMRG2HAD(IFLB1,IFLB2)
+c     CALL SIB_I4FLAV(IFLB1,IFLB2,IDM,IDM1,L0)
+         ENDIF
+c     check kinematic limits
+c     m2_max should be smaller than m2_min
+         IREJ = 1
+         EE = PTT(5)
+         EE2 = PTT(5)**2
+         K = 2-IBAR(IABS(L0))
+         IF(JDIF(jw).gt.1)THEN
+            DELTAE = EE-AM(13)
+            XMMIN=max(XM2MIN(1),(AM(IABS(l0))+AM(7)+0.02D0)**2)
+         ELSE
+            DELTAE = EE-AM(IABS(L0))
+            XMMIN=max(XM2MIN(K),(AM(IABS(l0))+AM(7)+0.02D0)**2)
+         ENDIF
+c         print *,'jw,jdif,nwd,l0,ifl1,ifl2,deltae,xmin,ee,xmax',
+c     &        jw,jdif(jw),nwd,l0,ifl1,ifl2,deltae,xmmin,ee,par(13)*ee2
+         IF(DELTAE.lt.AM(7)+0.02D0) THEN
+            IF(ndebug.gt.2) 
+     &           WRITE(lun,*) ' EXCT_RMNT: inchoherent diff. :',
+     &           ' not enough mass left for excitation! (DELTAE,PION,',
+     &           'IREJ,NCALL)',DELTAE,AM(7)+0.02D0,IREJ,NCALL
+            RETURN
+         ENDIF
+         IF(PAR(13)*EE2.lt.XMMIN)THEN
+            IF(ndebug.gt.2)
+     &           WRITE(lun,*) ' EXCT_RMNT: inchoherent diff. :',
+     &           ' not enough mass left for excitation! (min,max,',
+     &           'IREJ,NCALL)',PAR(13)*EE2,XMMIN,IREJ,NCALL
+            RETURN
+         ENDIF
+         CALL ADD_PRTN_4VEC(PTT,L0,2,IBMST1,IDHAD)
+         CALL ADD_REF(IREF,IDHAD)
+c     reset references of partons
+         CALL ADD_REF(IBMST1,IBMST2)
+         CALL ADD_REF(IBMST2,ITGST1)
+         CALL ADD_REF(ITGST1,ITGST2)
+         CALL ADD_REF(ITGST2,IREF)
+         IF(ndebug.gt.2) THEN
+            WRITE(LUN,*) ' EXCT_RMNT: incoherent diff. ',
+     &           '(IDX,IDX2,JDIF,ECM,L0)',IREF,IDHAD,JDIF(JW),PTT(5),L0
+            WRITE(LUN,*) ' EXCT_RMNT: DELTAE,XM2MAX:',DELTAE,PAR(13)*EE2
+         ENDIF
+         IREJ = 0
+         RETURN
+      ENDIF
+
+C...  add central strings to stack
+c     partons designated for central strings 
+c     are indexed in ICSTDX(JW,2:3)
+c     pstr_j = p_j_bm + p_j_tg
+c     string mass ** 2 = pstr_j ** 2
+c     --> read momenta from stack, add beam and target side, 
+c     references are set in a loop:
+c     string --> beam-parton --> target-parton --> string
+c     then write string 4momentum on stack
+      IMRG = 0
+      DO JJ=1,2
+         ISTH = 0
+         IBMST = ICSTDX(2*(JW-1)+JJ,2)
+         ITGST = ICSTDX(2*(JW-1)+JJ,3)
+         CALL RD_PRTN_4VEC(IBMST,PBM1,IFL1,IDM)
+         CALL RD_PRTN_4VEC(ITGST,PTG1,IFL2,IDM)
+         CALL ADD_4VECS(PBM1,PTG1,PTT)
+c     transverse mass of string end partons (pt**2)
+         CALL GET_XMT2(IBMST,XMT12)
+         CALL GET_XMT2(ITGST,XMT22)
+c     available mass for string
+         EE = SQRT(PTT(4)**2-PTT(3)**2)
+c     catch virtual strings
+         IF(PTT(5).lt.0.D0) THEN
+            IREJ = 1
+            IF(ndebug.gt.2)
+     &           write(LUN,*)' EXCT_RMNT: virt. string (M):',EE
+            IF(ndebug.gt.3)then
+               CALL GET_IMASS2(IBMST,XM2)
+               write(LUN,*) '  PBM1:', (PBM1(j),j=1,5),XM2
+               CALL GET_IMASS2(ITGST,xm2)
+               write(LUN,*) '  PTG1:', (PTG1(j),j=1,5),XM2
+               write(LUN,*) '  Ptot:', (PTT(j),j=1,5)
+            ENDIF
+c               stop
+            RETURN
+         ENDIF
+c     minimal string mass requirement
+         IF(EE.lt.sqrt(XMT12)+sqrt(XMT22)+PAR(123))THEN
+            IAFL1 = IABS(IFL1)
+            IAFL2 = IABS(IFL2)
+            IF(IPAR(74).eq.1)THEN
+c     try to form single meson, set merge flag
+               IF(IAFL1.gt.10.and.IAFL2.gt.10) THEN
+c     skip if two diquarks need merging..                  
+                  IREJ = 1
+                  RETURN
+               ENDIF
+               IF((IAFL1/10.eq.4.or.mod(IAFL1,10).eq.4)
+     +              .and.(IAFL2/10.eq.4.or.mod(IAFL2,10).eq.4)) THEN
+c     skip if two charm quarks need merging..                  
+                  IREJ = 1
+                  RETURN
+               ENDIF                             
+               L0 = IMRG2HAD(IFL1,IFL2)
+               IF(EE.gt.AM(IABS(L0))) then
+                  IMRG = IMRG + JJ
+                  CALL ADD_PRTN_4VEC(PTT,L0,2,IBMST,ISTH)
+                  IF(ndebug.gt.2)then
+                     write(lun,*)
+     &                    ' EXCT_RMNT: c.string mass too low! ',
+     &                    'merge into hadron..',l0
+                  ENDIF
+               ENDIF
+            ELSE
+               IF(ndebug.gt.2)then
+                  write(lun,*)
+     &                 ' EXCT_RMNT: c.string kinematic rejection!'
+                  write(lun,*) ' EE,limit,XMT1,XMT2:',
+     &                 EE,sqrt(XMT12)+sqrt(XMT22)+0.3D0,sqrt(XMT12),
+     &                 sqrt(XMT22)
+                  write(lun,*) ' return to momentum sampling..'
+               endif
+               IREJ = 1
+               RETURN
+            ENDIF
+         ENDIF
+c     add central string to stack, refering to beam-end parton
+         CALL ADD_PRTN_4VEC(PTT,1,0,IBMST,IREF)
+         ICSTDX(2*(JW-1)+JJ,1) = IREF
+         CALL ADD_INT_REF(Iref,IINTDX(JW))
+c     add reference to target parton to beam parton
+         CALL ADD_REF(IBMST,ITGST)
+         IF(ISTH.ne.0) THEN
+c     if string merged to hadron add reference corresponding reference            
+            CALL ADD_REF(ITGST,ISTH)
+            CALL ADD_REF(ISTH,IREF)
+         ELSE
+c     add reference to corresponding central string to target parton
+            CALL ADD_REF(ITGST,IREF)
+         ENDIF
+      ENDDO
+      
+c     form single hadron from string if mass was too low ..
+c     need to put hadron on shell by exchanging energy with other string            
+      IF(IMRG.eq.1.or.IMRG.eq.2)THEN
+         IF(ndebug.gt.2)
+     &        WRITE(LUN,*)' EXCT_RMNT: merging one string..',IMRG
+c     one string merged
+c     index of merged string and its last parton
+         IMST = ICSTDX(2*(JW-1)+IMRG,1)
+         IMST1 = ICSTDX(2*(JW-1)+IMRG,3)
+c     index of ordinary string
+         IMRGBAR = 3-IMRG
+         ICST2 = ICSTDX(2*(JW-1)+IMRGBAR,1)
+c     read 4momenta
+         CALL RD_REF(IMST1,ISTH)
+         CALL RD_PRTN_4VEC(ISTH,P1,L0,IREF)
+c     string two
+         CALL RD_PRTN_4VEC(ICST2,P2,IFL2,IDM)
+c     cm energy
+         CALL ADD_4VECS(P1,P2,PTT)
+         IF(ndebug.gt.2)THEN
+            write(lun,*)' EXCT_RMNT: string A :',(P1(i),i=1,5)
+            write(lun,*)' EXCT_RMNT: string B :',(P2(i),i=1,5)
+            write(lun,*)' EXCT_RMNT: total :',(PTT(i),i=1,5)
+         ENDIF
+         ECM = PTT(5)
+         XM1 = AM(IABS(L0))
+         XM2 = P2(5)
+         CALL TRANSFONSHELL(ECM,XM1,XM2,1.D0,3,P1N,P2N,LBD)
+         IF(LBD.eq.1) THEN
+            IF(NDEBUG.gt.2)
+     &           WRITE(LUN,*)' EXCT_RMNT: mass transfer failed!'
+            RETURN
+         ENDIF
+c     by definition p1n is along +z in string cm, need to invert if pzA < pzB
+c         IF(P2(3).gt.P1(3)) CALL SWTCH_LMNTS(P1N(3),P2N(3))
+
+C..   rotate parton-parton axis onto string-string axis
+c     therefore boost to parton-parton cm
+c     to calc. rotation angles BEFORE interaction !
+         DO K = 1,4
+            GABE(K) = PTT(K)/PTT(5)
+         enddo         
+         CALL SIB_ALTRA(GABE(4),-GABE(1),-GABE(2),-GABE(3),
+     &        P1(1),P1(2),P1(3),P1(4),
+     &        P1TOT,PBM1(1),PBM1(2),PBM1(3),PBM1(4))
+c     rotation factors
+         COD= PBM1(3)/P1TOT
+         SID= DSQRT(PBM1(1)**2+PBM1(2)**2)/P1TOT
+         COF=1.D0
+         SIF=0.D0
+         IF(P1TOT*SID.GT.EPS5) THEN
+            COF=PBM1(1)/(SID*P1TOT)
+            SIF=PBM1(2)/(SID*P1TOT)
+            ANORF=DSQRT(COF*COF+SIF*SIF)
+            COF=COF/ANORF
+            SIF=SIF/ANORF
+         ENDIF
+         IF(ndebug.gt.2)THEN
+            write(lun,*)' EXCT_RMNT: momentum in cm:',(PBM1(i),i=1,5)
+            write(lun,*)' EXCT_RMNT: rotation factors:',COD,SID,COF,SIF
+            write(lun,*)' EXCT_RMNT: rotation angles (theta,phi):',
+     &           ACOS(COD),ACOS(COF),ASIN(SID),ASIN(SIF)
+            write(lun,*)' EXCT_RMNT: momentum:',
+     &           sqrt(P1N(1)**2+P1N(2)**2+P1N(3)**2)
+         ENDIF
+c     rotate parton momenta after interaction, still in parton-parton frame
+         CALL SIB_TRANI(P1N(1),P1N(2),P1N(3),COD,SID,COF,SIF
+     &        ,PX,PY,PZ)
+         P1N(1)=PX
+         P1N(2)=PY
+         P1N(3)=PZ
+         CALL SIB_TRANI(P2N(1),P2N(2),P2N(3),COD,SID,COF,SIF
+     &        ,PX,PY,PZ)
+         P2N(1)=PX
+         P2N(2)=PY
+         P2N(3)=PZ
+         IF(ndebug.gt.2) write(lun,*)' EXCT_RMNT: momentum*:',
+     &        sqrt(P1N(1)**2+P1N(2)**2+P1N(3)**2)
+
+c     boost back to hadron-hadron
+         DO K = 1,4
+            GABE(K) = PTT(K)/PTT(5)
+         ENDDO
+         CALL SIB_ALTRA(GABE(4), GABE(1), GABE(2), GABE(3),
+     &        P1N(1),P1N(2),P1N(3),P1N(4),
+     &        P1TOT,P1(1),P1(2),P1(3),P1(4))
+         P1(5)=P1N(5)
+         CALL SIB_ALTRA(GABE(4), GABE(1), GABE(2), GABE(3),
+     &        P2N(1),P2N(2),P2N(3),P2N(4),
+     &        P2TOT,P2(1),P2(2),P2(3),P2(4))
+         p2(5)=p2n(5)
+         IF(ndebug.gt.2)THEN
+            write(lun,*)' EXCT_RMNT: momenta after scattering:'
+            write(lun,*)' EXCT_RMNT: hadron A :',(P1(i),i=1,5)
+            write(lun,*)' EXCT_RMNT: string B :',(P2(i),i=1,5)
+         ENDIF
+
+c     edit partons on stack
+         CALL EDT_PRTN
+     &        (ISTH,P1(1),P1(2),P1(3),P1(4),P1(5),IREF)
+         ICST11 = ICSTDX(2*(JW-1)+IMRG,2)
+         CALL EDT_PRTN
+     &        (IMST,P1(1),P1(2),P1(3),P1(4),P1(5),ICST11)
+         ICST21 = ICSTDX(2*(JW-1)+IMRGBAR,2)
+         CALL EDT_PRTN
+     &        (ICST2,P2(1),P2(2),P2(3),P2(4),P2(5),ICST21)
+         
+      ELSEIF(IMRG.eq.3)THEN
+         IF(ndebug.gt.2)
+     &        WRITE(LUN,*)' EXCT_RMNT: merge both strings..'
+
+c     both strings merged
+c     index of merged string and its last parton
+         IMST1 = ICSTDX(2*(JW-1)+1,1)
+         IMST11 = ICSTDX(2*(JW-1)+1,3)
+c     index of ordinary string
+         IMST2 = ICSTDX(2*(JW-1)+2,1)
+         IMST21 = ICSTDX(2*(JW-1)+2,3)
+c     read 4momenta
+         CALL RD_REF(IMST11,ISTH1)
+         CALL RD_PRTN_4VEC(ISTH1,P1,L01,IREF)
+c     string two
+         CALL RD_REF(IMST21,ISTH2)
+         CALL RD_PRTN_4VEC(ISTH2,P2,L02,IREF)
+         XM1 = AM(IABS(L01))
+         XM2 = AM(IABS(L02))
+c     cm energy
+         CALL ADD_4VECS(P1,P2,PTT)
+         ECM = PTT(5)
+         ETOT = PTT(4)
+         IF(ndebug.gt.2)THEN
+            write(lun,*)' EXCT_RMNT: string A :',(P1(i),i=1,5)
+            write(lun,*)' EXCT_RMNT: string B :',(P2(i),i=1,5)
+            write(lun,*)' EXCT_RMNT: total :',(PTT(i),i=1,5)
+         ENDIF
+
+         CALL TRANSFONSHELL(ecm,xm1,xm2,1.D0,3,P1n,P2n,LBD)
+         IF(LBD.eq.1) THEN
+            IF(NDEBUG.gt.2)
+     &           WRITE(LUN,*)' EXCT_RMNT: mass transfer failed!'
+            RETURN
+         ENDIF
+c     by definition p1n is along +z in string cm, need to invert if pzA < pzB
+c         IF(P2(3).gt.P1(3)) CALL SWTCH_LMNTS(P1N(3),P2N(3))
+c     rotate parton-parton axis onto string-string axis
+c     boost to parton-parton cm to calc. rotation angles BEFORE interaction!
+         DO K = 1,4
+            GABE(K) = PTT(K)/PTT(5)
+         ENDDO
+         CALL SIB_ALTRA(GABE(4),-GABE(1),-GABE(2),-GABE(3),
+     &        P1(1),P1(2),P1(3),P1(4),
+     &        P1TOT,PBM1(1),PBM1(2),PBM1(3),PBM1(4))
+c     rotation factors
+         COD= PBM1(3)/P1TOT
+         SID= DSQRT(PBM1(1)**2+PBM1(2)**2)/P1TOT
+         COF=1.D0
+         SIF=0.D0
+         IF(P1TOT*SID.GT.EPS5) THEN
+            COF=PBM1(1)/(SID*P1TOT)
+            SIF=PBM1(2)/(SID*P1TOT)
+            ANORF=DSQRT(COF*COF+SIF*SIF)
+            COF=COF/ANORF
+            SIF=SIF/ANORF
+         ENDIF
+c     rotate parton momenta after interaction
+         CALL SIB_TRANI(P1N(1),P1N(2),P1N(3),COD,SID,COF,SIF
+     &        ,PX,PY,PZ)
+         P1N(1)=PX
+         P1N(2)=PY
+         P1N(3)=PZ
+         CALL SIB_TRANI(P2N(1),P2N(2),P2N(3),COD,SID,COF,SIF
+     &        ,PX,PY,PZ)
+         P2N(1)=PX
+         P2N(2)=PY
+         P2N(3)=PZ
+
+c     boost massive hadrons back to hadron-hadron
+         CALL SIB_ALTRA(GABE(4), GABE(1), GABE(2), GABE(3),
+     &        P1N(1),P1N(2),P1N(3),P1N(4),
+     &        P1TOT,P1(1),P1(2),P1(3),P1(4))
+         P1(5)=P1N(5)
+         CALL SIB_ALTRA(GABE(4), GABE(1), GABE(2), GABE(3),
+     &        P2N(1),P2N(2),P2N(3),P2N(4),
+     &        P2TOT,P2(1),P2(2),P2(3),P2(4))
+         P2(5)=P2N(5)
+         IF(ndebug.gt.2)THEN
+            write(lun,*)' EXCT_RMNT: hadron A :',(P1(i),i=1,5)
+            write(lun,*)' EXCT_RMNT: hadron B :',(P2(i),i=1,5)
+         ENDIF
+
+c     edit partons on stack
+         CALL EDT_PRTN
+     &        (ISTH1,P1(1),P1(2),P1(3),P1(4),P1(5),IREF)
+         ICST11 = ICSTDX(2*(JW-1)+1,2)
+         CALL EDT_PRTN
+     &        (IMST1,P1(1),P1(2),P1(3),P1(4),P1(5),ICST11)
+
+         CALL EDT_PRTN
+     &        (ISTH2,P2(1),P2(2),P2(3),P2(4),P2(5),IREF)
+         ICST21 = ICSTDX(2*(JW-1)+2,2)
+         CALL EDT_PRTN
+     &        (IMST2,P2(1),P2(2),P2(3),P2(4),P2(5),ICST21)
+         
+      ENDIF
+
+      IREJ = 0
+
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE FIREBALL_4FLV(L0,P0,PCHEXin,IREJ)
+
+C-----------------------------------------------------------------------
+C... "decay" of an excited state with the quantum numbers
+C.   of particle L0 and the 5-momentum P0
+C.   4 flavor generalization /FR'13
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+      CHARACTER*6 NAMP
+      COMMON /S_CNAM/ NAMP (0:99)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+
+      DIMENSION P0(5), LL(10), PD(10,5), IFL(3), INONLEAD(2)
+      DIMENSION LRESCHEX(6:99), LRES(6:99), LCON(6:99), LPIC(-1:1)
+      DIMENSION LSTR(6:99), LPICS(-2:2)
+      
+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
+c     charge exchange map
+      DATA (LCON(I),I=6, 33)  /7,6,6,21,22,9,9,14,13,4*0,20,19,9,10,23,
+     &     24,27,27,25,30,31,28,29,32,33/
+      DATA (LCON(I),I=34, 49) 
+     &     /35,34,35,38,37,39,41,42,41,42,45,44,45,48,47,49/
+      DATA (LCON(I),I=50, 83) /0,52,51,54,53,4*0,71,72,10*0,
+     &     59,60,73,74,75,76,77,80,81,78,79,0,83/
+      DATA (LCON(I),I=84, 99) /84,85,86,87,88,89,4*0,94,95,96,97,98,99/
+c     pion charge conversion map
+      DATA LPIC /8,6,7/
+c     kaon charge conversion map      
+      DATA LPICS /9,21,0,22,10/     
+c     charge exchange to resonances map
+      DATA (LRESCHEX(I),I=6, 33) /26,27,27,30,31,9,9,42,41,19*0/
+      DATA (LRESCHEX(I),I=34, 39) /45,44,45,48,47,39/ 
+      DATA (LRESCHEX(I),I=40, 49) /41,42,43,42,45,46,45,48,47,49/
+      DATA (LRESCHEX(I),I=50, 83) 
+     &     /0,52,51,54,53,4*0,60,59,10*0,71,72,73,75,74,
+     &     77,76,79,78,80,81,0,83/
+      DATA (LRESCHEX(I),I=84, 99) 
+     &     /84,85,86,87,88,89,4*0,94,95,96,97,98,99/
+c     resonance excitation map
+      DATA (LRES(I),I=6, 39) 
+     &     /27,25,26,28,29,9,9,41,42,19*0,44,45,46,47,48,39/
+      DATA (LRES(I),I=40, 49) /40,41,42,43,44,45,46,47,48,49/
+      DATA (LRES(I),I=50, 83) 
+     &     /0,51,52,53,54,4*0,78,79,10*0,71,72,73,76,77,76,
+     &     77,78,79,80,81,0,83/
+      DATA (LRES(I),I=84, 99) /94,95,96,97,98,89,4*0,94,95,96,97,98,99/
+c     strangeness excitation map
+      DATA LSTR(6:27) /6,7,8,9,10,11,12,34,39,6*0,21,22,23,24,25,26,27/
+      DATA LSTR(28:39) /28,29,30,31,32,33,44,45,46,47,48,39/
+      DATA LSTR(40:49) /40,41,42,43,44,45,46,47,48,49/
+      DATA LSTR(50:83) /0,51,52,53,54,4*0,78,79,10*0,71,72,73,76,77,76,
+     &     77,78,79,80,81,0,83/
+      DATA LSTR(84:99) /94,95,96,97,98,89,4*0,94,95,96,97,98,99/
+      
+c...  charge exchange reaction rate
+c      DATA PCHEX /0.33/
+
+c     default parameter: PAR(61)
+      PCHEX = PCHEXin
+
+c     split charge exchange between 2 and 3+ fireballs
+      IF(IPAR(91).eq.1.and.NPI.gt.2)THEN
+         PCHEX = 1.D0-PCHEX
+      ENDIF
+
+c     hyperon production rate
+      PLAM = PAR(157)
+      
+c...  suppression of high mass particles in fireball
+c     xmpsuppr = prob. accepting additional proton
+      XMPSUPPR=PAR(33)
+      IF(ABS(XMPSUPPR).lt.EPS3) THEN
+         WRITE(LUN,*)
+     &        ' Error: too low mass suppression in 4 flv fireball!'
+         WRITE(LUN,*)
+     &        ' Probably PAR(33)/IPAR(14) not properly set, aborting..'
+         STOP
+      ENDIF
+      XTEMPH=(AM(6)-AM(13))/dLOG(XMPSUPPR)
+
+      IF(Ndebug.gt.3) THEN
+         WRITE(LUN,*)' FIRBALL_4FLV: called with (L0,P0):',
+     &        L0,P0
+         WRITE(LUN,*)' 2nd Proton rejection prob.:',XMPSUPPR
+         WRITE(LUN,*)' fireball temperature:',XTEMPH
+         WRITE(LUN,*)' charge exchange prob.:',PCHEX
+         WRITE(LUN,*)' multiplicity width:',PAR(38)
+      ENDIF
+
+c...  special vector resonance treatment for meson projectiles
+c     i.e. spin exchange probability
+      PAR5def = PAR(5)
+      IF(IPAR(14).eq.-2.and.abs(kb).lt.13)THEN
+         PAR(5)=PAR(34)
+      ENDIF
+
+      NTRY=0
+ 100  NTRY=NTRY+1
+      IF(NTRY.GT.20)THEN
+         WRITE(LUN,*)' FIRBALL_4FLV: unable to sample 4flv fireball!'
+         WRITE(LUN,*)' lacking rejection mechanism, abort..'
+         CALL SIB_REJECT ('FIRBALL_4FLV    ')
+c         RETURN
+      ENDIF
+
+      LA = ABS(L0)
+      ISGN = ISIGN(1,L0)
+      DELTAE = P0(5) - AM(LA)
+      IF(DELTAE.lt.AM(6)+0.02D0)THEN
+         IREJ = 1
+         IF(ndebug.gt.3)
+     &    WRITE(LUN,*)' FIRBALL_4FLV:  too low mass!! aborting...',IREJ
+c         xa=-1.
+c         xa=log(xa)
+c         stop        
+         RETURN
+      ENDIF
+      AV = 2.D0*SQRT(DELTAE)
+
+c...  select number of particles in fireball
+c     at least two
+ 200  XRNDM = GASDEV(LA)
+      NPI = INT(AV*(1.D0+PAR(38)*XRNDM))
+      XMMIN = AM(LA)+DBLE(NPI-1)*AM(6)+0.02D0
+      IF(Ndebug.gt.3)
+     &     WRITE(LUN,*)'  NPI,av,rndm,xmin,delta',
+     &     NPI,av,XRNDM,xmmin,P0(5)-XMMIN
+
+      IF((NPI.LE.1).OR.(NPI.GT.9).OR.(P0(5).LT.XMMIN))THEN
+         GOTO 200
+      ENDIF
+      IF(Ndebug.gt.3) 
+     &  WRITE(LUN,*)' FIRBALL_4FLV: No. of particles sampled. ',
+     &  '(NPI,DELTAE,NTRY):',NPI,DELTAE,NTRY
+
+c...  sample particle list      
+      NTRYL=0
+ 210  CONTINUE
+c...  special vector resonance treatment with meson projectile
+      IF(IPAR(14).eq.-3.and.LA.lt.13)THEN
+c     form resonance from meson beam
+cdh      IF(NTRY.GT.5) GOTO 211
+         IF(NTRY.GT.5) THEN
+c     split last hadron again to start hadron chain
+           CALL HSPLI (LL(I+1),IFL(1),IFL(2))
+
+           IF(Ndebug.gt.3)
+     &          WRITE(LUN,*)' FIRBALL_4FLV: Input hadron split. ',
+     &          '(L0,IFL1,IFL2):',LL(I+1),IFL(1),IFL(2)
+           WREM = P0(5)
+           WREM2 = AM2(ABS(LL(1)))
+           INONLEAD(1)=0
+           INONLEAD(2)=0
+         ELSE
+           I=1
+           IF(PCHEX.gt.S_RNDM(LA))THEN
+              LL(I)=LRESCHEX(LA)
+              CALL HSPLI(LCON(LA),IFL1,IFL2)
+              IFL(1)=IFL1
+              IFL(2)=IFL2
+           ELSE
+              LL(I)=LRES(LA)
+              CALL HSPLI(L0,IFL1,IFL2)
+              IFL(1)=-IFL1
+              IFL(2)=-IFL2
+           ENDIF
+           WREM = P0(5)-AM(ABS(LL(1)))
+           WREM2 = AM2(ABS(LL(1)))
+           INONLEAD(1)=1
+           INONLEAD(2)=1
+         ENDIF
+
+      ELSE
+c...  baryon projectile
+c     first two particles defined by charge exchange
+         I=1
+         LA1=LA
+c     add strangeness
+         XLIMLAM=sqrt(AM2(35)+AM2(9)+0.4)
+         IF(S_RNDM(LA1).lt.PLAM*(1-IABS(ISTR(LA))).and.
+     &        DELTAE.gt.XLIMLAM)THEN
+            LA1 = LSTR(LA)
+c            print *,'xlim<deltae?: ',xlimlam,deltae
+            IF(Ndebug.gt.3)
+     &write(lun,*)' FIRBALL_4FLV: producing hyperon:',namp(LA),namp(LA1)
+         endif        
+         IF(PCHEX.gt.S_RNDM(LA1))THEN
+            L1=LCON(LA1)
+            if(la.eq.42) l1 = l1 + 2 * int(2.D0*S_RNDM(L1))
+            LL(I)=L1*ISGN
+c            WRITE(LUN,*)' charge exchange!',ISGN*LA,'->',L1
+         ELSE
+            L1=LA1
+            LL(I)=LA1*ISGN
+         ENDIF
+c     determine remaining charge and strangeness         
+         IDQ=ICHP(LA1)*ISGN-ICHP(L1)*ISIGN(1,LL(I))
+         IDS=ISTR(LA)*ISGN-ISTR(L1)*ISIGN(1,LL(I))
+         IF(ABS(IDQ).gt.1) write(lun,*) 'LA,LA1,L1',LA,LA1,L1
+         IF(IABS(IDS).gt.1)
+     &        write(lun,*) 'too much strangeness,LA,LA1,L1:'
+     &        ,namp(LA),namp(LA1),namp(L1)
+         IF(IDS.ne.0)THEN
+            IDX = IDS-IDQ
+            LL(I+1)=LPICS(IDX)  ! compensate with strange meson if 
+         ELSE
+            LL(I+1)=LPIC(IDQ)   ! compensate with meson
+         ENDIF         
+         IF(NPI.eq.2) GOTO 300
+c     split last hadron again to start hadron chain
+cdh 211     CALL HSPLI (LL(I+1),IFL(1),IFL(2))
+         CALL HSPLI (LL(I+1),IFL(1),IFL(2))
+
+         IF(Ndebug.gt.3) 
+     &        WRITE(LUN,*)' FIRBALL_4FLV: Input hadron split. ',
+     &        '(L0,IFL1,IFL2):',LL(I+1),IFL(1),IFL(2)
+         WREM = P0(5)
+         WREM2 = AM2(ABS(LL(1)))
+         INONLEAD(1)=0
+         INONLEAD(2)=0
+      ENDIF
+
+      IF(NTRYL.gt.20) GOTO 100
+      NTRYL=NTRYL+1
+
+ 230  I=I+1    
+      JT=INT(1.5D0+S_RNDM(I))
+      JR=3-JT
+      NTRYS=0
+      IFLB=IFL(JT)
+      IDM = 5
+ 240  CALL SIB_I4FLAV (IFL(JT), 0, IDM, IFL(3), LL(I))
+      IF(NTRYS.gt.50) GOTO 210    
+      NTRYS=NTRYS+1
+      W=dEXP(-AM(ABS(LL(I)))/XTEMPH)
+      IF(Ndebug.gt.4) 
+     &  WRITE(LUN,*)' FIRBALL_4FLV: flavor added: ',
+     &  '(I,NTRYS,LL(I),IFL3,W):',I,NTRYS,LL(I),IFL(3),W
+      IF(W.LT.S_RNDM(I).and.INONLEAD(JT).eq.1) GOTO 240
+
+c...  kinematic limits...     
+      WREM = WREM-AM(IABS(LL(I)))
+      WREM2_2=WREM2+2.D0*dSQRT(WREM2)*AM(IABS(LL(I)))+AM2(IABS(LL(I)))
+      IF(Ndebug.gt.4) 
+     &  WRITE(LUN,*)' FIRBALL_4FLV: kinematic limits: ',
+     &  '(I,NTRYS,P05**2,WREM2):',I,NTRYS,P0(5)**2,WREM2_2
+      IF(WREM2_2+0.2D0*S_RNDM(I+1).ge.P0(5)**2) GOTO 240
+      WREM2=WREM2_2
+      IF(Ndebug.gt.3) 
+     & WRITE(LUN,*)
+     & ' FIRBALL_4FLV: Hadron added: (KF,NAMP,I,NONlead,WRME2)',
+     & LL(I),NAMP(ABS(LL(I))),I,INONLEAD(JT),WREM2
+
+      IFL(JT)=-IFL(3)
+      INONLEAD(JT)=1
+      IF(I.lt.NPI-1) GOTO 230
+      IF(ABS(IFL(JT)).gt.3.and.ABS(IFL(JR)).gt.3) THEN
+         IFL(JT)=IFLB
+         GOTO 240
+      ENDIF
+
+c...  close list
+      I=I+1
+      NTRYC=0
+c$$$      IAFL1 = IABS(mod(IFL(JR),100))
+c$$$      IAFL2 = IABS(mod(IFL(jt),100))
+c$$$      IF ((IAFL1/10.eq.4.or.mod(IAFL1,10).eq.4)
+c$$$     +     .and.(IAFL2/10.eq.4.or.mod(IAFL2,10).eq.4))
+c$$$     +     GOTO 100             ! reject two charm quarks
+c$$$      IF(IAFL1*IAFL2.GT.100)  GOTO 100
+ 250  CALL SIB_I4FLAV (IFL(JT), IFL(JR), IDM, IFL(3), LL(I))
+      IF(NTRYC.gt.10) GOTO 210
+      NTRYC=NTRYC+1
+      WREM2_2=WREM2+2.D0*dSQRT(WREM2)*AM(ABS(LL(I)))+AM2(ABS(LL(I)))
+      IF(Ndebug.gt.5) 
+     &  WRITE(LUN,*)' FIRBALL_4FLV: closing List: (IFL1,IFL2,KF,',
+     &             'NAMP,I,NTRYC,WREM2)',
+     &  IFL(JT),IFL(JR),LL(I),NAMP(ABS(LL(I))),I,NTRYC,WREM2_2
+
+      IF(WREM2_2+0.2D0*S_RNDM(I).ge.P0(5)**2) GOTO 250
+
+ 300  IF(Ndebug.gt.3) 
+     &     WRITE(LUN,*)
+     &     ' FIRBALL_4FLV: flavors sampled. (NPI,LL,WREM,NTRYL):',
+     &     NPI,(LL(ii),ii=1,NPI),WREM,NTRYL
+
+c...  fill phasespace
+      CALL DECPAR (0,P0,NPI,LL,PD)
+      DO J=1,NPI
+         NP = NP+1
+         LLIST(NP) = LL(J)
+         NPORIG(NP) = IPFLAG*2
+         niorig(NP)= iiflag
+         DO K=1,5
+            P(NP,K) = PD(J,K)
+         ENDDO
+      ENDDO
+      PAR(5)=PAR5def
+      IREJ = 0
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SIG_RPP2014(L,KT,SQS,SLOPE,SIGT,SIGEL,SIGINEL,RHO)
+
+C-----------------------------------------------------------------------
+C     implementation of the PDG RPP 2014 cross section fit
+C     proton-, pion-, kaon-nucleon interactions
+C      
+c     projectile dependent parameters are stored in amp array
+c     dimensions are: (beam,target,exchange mode)
+c     cross section is used for interaction length in AIR
+c     therefore proton and neutron cross sections are averaged.
+c
+C     Input:
+c     L : beam id (1: proton, 2: pion, 3: kaon)
+c     KT: target id (0: Nucleon, 1: proton, 2: neutron)
+c     SQS: c.m. energy in GeV
+c     SLOPE: fit does not include elastic slope, need input to calc
+c            elastic and inelastic cross section
+c     Output:      
+c     SIGT,SIGEL,SIGINEL,RHO
+c     cross sections and ratio of real and imaginary part of ela. amp.
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+c     external types
+      DOUBLE PRECISION SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO!,SIGDIF
+      integer l,kt
+c     commons
+      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 AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      DOUBLE PRECISION FACN
+      DIMENSION FACN(3:10)
+      COMMON /SIB_FAC/ FACN
+c     internal types
+      DOUBLE PRECISION S,S0,SIG,RHO1,XI
+      INTEGER k,i,INIT
+C     universal constants and parameters
+      DOUBLE PRECISION M0,ETA1,ETA2,H
+      DOUBLE PRECISION AMP(3,2,3)
+      DOUBLE PRECISION XMA(3),XMB(2)
+      SAVE
+      DATA M0,ETA1,ETA2,H /2.076D0,0.412D0,0.5626D0,0.2838D0/
+c     hadron-proton
+      DATA (AMP(1,1,i),i=1,3) /33.73D0, 13.67D0, 7.77D0 /
+      DATA (AMP(2,1,i),i=1,3) /18.08D0, 10.44D0, 1.977D0 /
+      DATA (AMP(3,1,i),i=1,3) /15.84D0, 5.12D0, 3.538D0 /
+c     hadron-neutron
+      DATA (AMP(1,2,i),i=1,3) /33.77D0, 14.05D0, 6.93D0 /
+      DATA (AMP(2,2,i),i=1,3) /18.08D0, 10.44D0, 1.977D0 /
+      DATA (AMP(3,2,i),i=1,3) /15.73D0, 4.81D0, 1.86D0 /
+      DATA INIT/0/
+c     particle masses
+c     DATA XMA /0.93827D0,0.13957D0,0.493667D0/
+c     DATA XMB /0.93827D0,0.939565D0/
+
+      IF(INIT.EQ.0) THEN
+c  use the masses from the mass table
+        XMA(1) = AM(13)     ! proton
+        XMA(2) = AM(7)      ! pi+
+        XMA(3) = AM(9)      ! K+
+        XMB(1) = AM(13)     ! proton
+        XMB(2) = AM(14)     ! neutron
+        INIT = 1
+      ENDIF
+
+      s = SQS**2
+      sigt = 0.D0
+      rho = 0.D0
+      k = kt
+ 100  if(kt.eq.0.and.k.lt.2) k = k + 1
+      s0=XMA(l)+XMB(k)+M0
+      s0=s0**2
+      xi=s/s0
+c     print *,'s,s0,xi',s,s0,xi
+c     print *,'eta1,eta2,h,M0',eta1,eta2,h,M0
+c     print *,'P,R1,R2',amp(l,k,1),amp(l,k,2),amp(l,k,3)
+c     print *,H*log(xi)**2,amp(l,k,1),amp(l,k,2)*(1.D0/xi)**eta1,
+c     &        amp(l,k,3)*(1.D0/xi)**eta2
+      sig = H*log(xi)**2+amp(l,k,1)+amp(l,k,2)*(1.D0/xi)**eta1
+     &     +amp(l,k,3)*(1.D0/xi)**eta2
+c     print *,'sig',sig
+c     print *,'pi,0.5D0,0.D0',pi,0.5D0,0.D0
+c     print *,pi*h*log(xi),amp(l,k,2)*xi**(-eta1),tan(eta1*pi*0.5D0),
+c     &        amp(l,k,3)*xi**(-eta2),(tan(pi*eta2*0.5D0)+EPS5)
+      rho1 = PI*h*log(xi)-amp(l,k,2)*xi**(-eta1)*tan(eta1*PI*0.5D0)
+     &     +amp(l,k,3)*xi**(-eta2)/(tan(PI*eta2*0.5D0)+EPS5)
+c     print *,'rho:',rho1
+      rho = rho + rho1/sig
+      sigt = sigt + sig
+c     write(LUN,*) ' l,k,sig,rho:',l,k,sig,rho
+      if(kt.eq.0.and.k.lt.2) goto 100
+      if(kt.eq.0) then
+         sigt = sigt*0.5D0
+         rho = rho*0.5D0
+      endif
+c     derive elastic and inelastic cross section
+      sigel = sigt**2*(1.D0+rho**2)/(16.D0*PI*slope*cmbarn)
+      siginel = sigt-sigel
+      IF(ndebug.gt.2)
+     &  write(LUN,*)
+     &  ' SIG_RPP2014: L,KT,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO',
+     &     L,KT,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO
+      end
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION FERMI(XARG,X0,XALPH)
+
+C-----------------------------------------------------------------------
+C     fermi function, used to smoothen samplings
+C     f = 1/(1+exp((x-x0)/alpha))
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+c     externals
+      DOUBLE PRECISION XARG,X0,XALPH,XE
+c     COMMONs
+
+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
+
+c     internals
+      xe = max((xarg-x0)/xalph,-10.D0)
+      fermi=1.D0+exp(xe)
+      fermi=1.D0/fermi
+      END
+C=======================================================================
+      
+      SUBROUTINE SEL_RES(XM2in,KDin,IRDX,IKDH)
+      
+C--------------------------------------------------------------------
+C     routine that checks if excitation should go into resonant state
+C     or rather should fallback to on-shell beam hadron
+C     Input: XM2in : squared excitation mass
+C            KDin : projectile hadron code
+C            IRDX : reference to remnant on stack
+C     Output: adds hadron to stack
+C             IKDH : parton stack index of final hadron
+C--------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      DOUBLE PRECISION AW,AW2
+      COMMON /S_WIDTH1/ AW(99), AW2(99)
+      INTEGER          MRES(6:99,2)
+      DOUBLE PRECISION XM2,XM1,DELTAE,EMIN1,EMIN2
+      INTEGER          KD
+      SAVE
+
+      DATA (MRES(k,1),k=6,22)  /27,25,26,28,29,0,0,51,52,6*0,30,31/
+      DATA (MRES(k,1),k=23,33) /23,24,25,26,27,28,29,30,31,27,27/
+      DATA (MRES(k,1),k=34,49) /34,35,36,37,38,39,40,41,42,43,34,35,36,
+     &     37,38,49/
+      DATA (MRES(k,1),k=50,83) /0,51,52,53,54,4*0,78,79,10*0,80,81,73,
+     &     74,75,76,77,78,79,80,81,0,83/
+      DATA (MRES(k,1),k=84,99) /94,95,96,97,98,89,4*0,94,95,96,97,98,99/
+
+      DATA (MRES(k,2),k=6,22)  /61,62,63,64,65,0,0,53,54,6*0,66,67/
+      DATA (MRES(k,2),k=23,33) /61,61,62,63,61,64,65,66,67,61,61/
+      DATA (MRES(k,2),k=34,49) /34,35,36,37,38,39,40,41,42,43,44,45,46,
+     &     47,48,49/
+      DATA (MRES(k,2),k=50,83) /0,51,52,53,54,4*0,78,79,10*0,80,81,73,74
+     &     ,75,76,77,78,79,80,81,0,83/
+      DATA (MRES(k,2),k=84,99) /94,95,96,97,98,89,4*0,94,95,96,97,98,99/
+
+      XM2 = XM2in
+      XM1 = sqrt(XM2)
+      KD = KDin
+
+C     thresholds
+c     fallback threshold
+      EMIN1 = PAR(76)
+      
+c     resonance threshold
+      EMIN2 = PAR(77)
+      
+c     parton stack index of incoming hadron
+      IKDH = 0
+      
+c     if too low, fallback on beam
+      IF(ndebug.gt.2)
+     &     write(lun,*)' SEL_RES: input (XM2in,KDin,IRDX):',XM2,KD,IRDX
+      DELTAE = XM1-AM(ABS(KD))
+      IF(ndebug.gt.1)then
+         write(lun,*)' SEL_RES: DELTAE,EMIN1,EMIN2',deltae,emin1,emin2
+         write(lun,*)' SEL_RES: XM,XM1,XM2',
+     &        XM1,emin1+AM(ABS(KD)),emin2+AM(ABS(KD))
+      endif
+      IF(DELTAE.LT.EMIN1)THEN
+c     fallback to beam region
+         KDH = kd
+         XM1 = AM(abs(kd))
+         XM2 = AM2(abs(kd))
+
+      ELSEIF(DELTAE.LT.EMIN2)THEN
+c     form resonance
+         II = 1
+         KDH = KD
+         DO WHILE (II.le.2.and.KDH.eq.KD)
+            KDD = IABS(KD)
+            
+c     K0s and K0l projection on K0 and K0bar
+cdh         IF(KDD.eq.11.or.KDD.eq.12)KDD=21
+cdh  &                              +INT((2.D0-EPS10)*S_RNDM(KD))
+            IF(KDD.eq.11.or.KDD.eq.12)KDD=21
+     &                              +INT(0.5D0+S_RNDM(KD))
+            IL = MRES(KDD,II)
+            IF(ndebug.gt.2) then
+               write(lun,*) ' SEL_RES: res. select (KD,II,IL):',
+     &         KD,II,IL
+            ENDif
+cdh   to prevent  index of array AW2 out of range
+            IF(IL.eq.0) write(lun,*) ' SEL_RES: KD,KDD:' , KD,KDD
+            IF(IL.eq.0) CALL SIB_REJECT('SEL_RES         ')
+c     sample probability for resonance to occur at this mass
+c     from the relativistic breit-wigner dist.
+c     scale widths to artificially increase or decrease resonance occurence
+            XWDTH = PAR(94)*AW2(IL)
+            PRES = BREIT_WIGNER(XM2,AM2(IL),XWDTH)
+            IF(ndebug.gt.2)
+     &           write(lun,*)
+     &           ' SEL_RES: res. proposal (AM2,AW2,Prob.):',
+     &           AM2(IL),XWDTH,PRES
+            IF(S_RNDM(ii).lt.PRES) KDH = ISIGN(IL,KD)            
+            II = II + 1
+         ENDDO
+c     no resonance selected, fallback to beam or phasespace decay?
+         IF(IPAR(59).eq.1.and.KDH.eq.KD)THEN
+c     distinguish regions in deltaE
+            IF(DELTAE.LT.EMIN1)THEN
+c     fallback to beam
+               XM1 = AM(abs(kdh))
+               XM2 = AM2(abs(kdh))           
+            ELSE
+               KDH = 0
+            ENDIF
+         ELSE
+c     case where resonance has been selected 
+c     or no overlap between resonance and phasespace region exists
+c     set mass to pole masses of selected particles
+            XM1 = AM(abs(kdh))
+            XM2 = AM2(abs(kdh))
+         ENDIF
+      ELSE
+c     neither resonance nor fallback
+         KDH = 0
+      ENDIF
+      IF(KDH.ne.0)THEN
+c     add new beam hadron to stack
+         XM2in = XM2
+         CALL ADD_PRTN
+     &        (0.D0,0.D0,0.D0,0.D0,XM1,KDH,2,IRDX,IKDH)
+      endif
+      IF(ndebug.gt.2)
+     &     write(lun,*)' SEL_RES: output (XM2in,KDin,KDH):',XM2,KD,KDH
+
+      RETURN
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION BREIT_WIGNER(S,XM2,XWDTH2)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+C     peak set to one
+      x1 = (s-xm2)**2+xm2*xwdth2
+      breit_wigner = xm2*xwdth2/x1
+      end
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION TBREIT_WIGNER(S,XM2,XWDTH2)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+C     breit-wigner truncated at 2*gamma from peak
+C     peak set to one
+      DATA N /10/
+
+      XMLOW = MAX(XM2-N*XWDTH2,0.D0)
+      XCUT = SIGN(1.D0,S-XMLOW)
+      XCUT = MAX(XCUT,0.D0)
+      x1 = (S-xm2)**2+xm2*xwdth2
+      TBREIT_WIGNER = xcut * xm2*xwdth2/x1
+      
+      end
+C=======================================================================
+
+      SUBROUTINE FRAG_MINIJET(IDX,IBAD)
+
+C-----------------------------------------------------------------------
+C     routine that fragments a gluon - gluon system \FR'14
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+      INTEGER IDX,IBAD
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+C     parameters that represent: NW: max. number of wounded nucleons,
+C     NS,NH: max. number of soft and hard interactions
+c      PARAMETER (NW_max = 20)
+C     The COMMON block /S_CHIST/ contains information about the
+C     the structure of the  generated event:
+C     NWD   = number of wounded nucleons
+C     NJET = total number of hard interactions
+C     NSOF = total number of soft interactions
+C     NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C     NNJET (1:NW) = number of minijets produced in each interaction 
+C     JDIF(1:NW) = diffraction code 
+C                  0 : non-diff,
+C                  1 : beam-diff
+C                  2 : target-diff
+C                  3 : double-diff
+      INTEGER NNSOF,NNJET,JDIF,NWD,NJET,NSOF
+      COMMON /S_CHIST/ NNSOF(NW_max),NNJET(NW_max),
+     &     JDIF(NW_max),NWD,NJET,NSOF
+
+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
+      
+      DOUBLE PRECISION PGG,PST,PBM,PTG,E0,PT2JET,PTJET,TH,FI,S_RNDM,
+     &     PAR1_def,PAR24_def,PAR3_def,PAR2_1_def,PAR2_2_def,PAR5_def,
+     &     PAR6_def,PAR24_2_def,XM,QMASS,DBETJ      
+      DIMENSION PST(5),PBM(5),PTG(5)
+      INTEGER IST,ITGST,IBMST,IPID,IFLB,IFLT,NOLD,IS,IFL1,IFBAD,IDM,
+     &     ipar82_def
+      SAVE
+      DATA PGG /1.D0/
+
+C     read partons from stack
+c     references are string --> bm-parton --> tg-parton
+c     read string 4momentum from stack
+      CALL RD_PRTN_4VEC(IDX,PST,IPID,IBMST)
+      CALL RD_PRTN_4VEC(IBMST,PBM,IFLB,ITGST)
+      CALL RD_PRTN_4VEC(ITGST,PTG,IFLT,IST)
+      IF(IDX.ne.IST) then
+         write(lun,*) ' FRAG_MINIJET: reference loop broken!' , IDX
+         CALL SIB_REJECT('FRAG_MINIJET    ')
+      endif
+
+C..   kinematic variables
+      E0 = PST(5)            ! string mass
+      PT2JET = PBM(1)**2 + PBM(2)**2
+      PTJET = sqrt(PT2JET)
+      TH = ASIN(MIN((1.D0-EPS8),2.D0*PTJET/E0))
+c      FI = ASIN(MIN((1.D0-EPS8),PBM(2)/PTJET))
+      FI = TWOPI*S_RNDM(IDX)
+c      TH = PST(1)
+c      FI = PST(2)
+
+      IF(NDEBUG.gt.1) WRITE(LUN,*)' FRAG_MINIJET: IDX,EE,IFLB,IFLT,PT',
+     &     IDX,E0,IFLB,IFLT,PTJET,IBAD
+      IF(NDEBUG.gt.1) WRITE(LUN,*)' FRAG_MINIJET: PTJET,TH,FI:',
+     &     PTJET,TH,FI
+
+C...  parameter setup (string fragmentation)
+
+c     baryon production setup
+      PAR1_def = PAR(1)
+      if( NSOF+NJET.gt.0) then
+         PAR(1)= PAR(15)
+      else
+         PAR(1)= PAR(14)
+      endif
+            
+C...  charm setup
+      PAR24_def = PAR(24)
+      IF(IPAR(15).eq.2.or.IPAR(15).eq.3)THEN
+         PAR(24) = PAR(25)*EXP(-PAR(26)/E0)
+      ELSEIF(IPAR(15).eq.4)THEN
+         PAR(24) = PAR(27)*EXP(-PAR(26)/E0)
+      ELSEIF(IPAR(15).eq.5)THEN
+         PAR(24) = PAR(27)*EXP(-PAR(26)/E0)
+         PAR(29) = PAR(27)*EXP(-PAR(28)/E0)
+      ELSEIF(IPAR(15).eq.6.or.IPAR(15).eq.8.or.IPAR(15).eq.9.or.
+     &        IPAR(15).eq.11)THEN
+         PAR(24) = PAR(27)*EXP(-PAR(28)/E0)
+      ELSEIF(IPAR(15).eq.7)THEN
+         PAR(24) = PAR(27)
+      ELSEIF(IPAR(15).eq.10)THEN
+         WRITE(LUN,*)' FRAG_minijet: charm model not implemented!'
+         CALL SIB_REJECT('FRAG_minijet    ')
+      ENDIF
+
+C...  strange setup
+      PAR2_1_def = PAR(2)
+      PAR3_def = PAR(3)
+      IF(IPAR(42).eq.1)THEN
+c     change to constant value 
+         PAR(2) = PAR(72)
+      ELSEIF(IPAR(42).eq.2)THEN
+c     change according to string mass, saturating
+         PAR(2) = PAR(72)*EXP(-PAR(73)/E0)
+      ELSEIF(IPAR(42).eq.3)THEN
+c     change strange diq fraction as well
+         PAR(2) = PAR(72)       ! P_s / P_ud
+         PAR(3) = PAR(73)       ! P_us / P_ud
+      ENDIF
+
+C...  vector setup
+      PAR5_def = PAR(5)
+      PAR6_def = PAR(6)
+      IF(IPAR(43).eq.1)THEN
+c     change vector rate and kaon vector rate
+         PAR(5) = PAR(74)       ! P_vec
+         PAR(6) = PAR(74)       ! P_K* from K
+         
+      ENDIF
+      
+C...  switch off pi0 suppression
+c     should only be applied for remnant, diff and valence
+c     in case of meson projectile
+      ipar82_def = IPAR(82)
+      IF(IPAR(95).eq.1)THEN
+         IPAR(82) = 0
+      ENDIF
+      
+      NOLD = NP
+      IF ( (E0.LT.8.D0) .OR. (S_RNDM(0).GT.PGG)) THEN
+C...  one string case, q - qbar
+         
+C     sample flavor for q-qbar minijet        
+         IF( IPAR(87).eq.3 )THEN
+C     flavor threshold model            
+c     u,d -> u,d,s -> u,d,s,c
+c     s and transition from massive to massless at m_s and m_c thresholds
+c     beyond the charm mass all flavors are equally likely
+            CALL SIB_ICFLAV(E0**2,0,IDM,IFL1)
+            
+         ELSE
+C     default u,d,s model, same rates as in hadronization (string frag.)
+            PAR2_2_def = PAR(2)
+            PAR24_2_def = PAR(24)
+C     set 'leading' strange fraction         
+            IF(IPAR(39).eq.2) PAR(2) = PAR(66)         
+c     leading charm fraction
+            IF( IPAR(87).eq.1 )THEN
+               PAR(24) = PAR(150)
+            ELSEIF( IPAR(87).eq.2 )THEN
+               PAR(24) = PAR(150)*PAR(24)
+            ENDIF
+
+            IS = -1 + 2*INT((2.D0-EPS8)*S_RNDM(0))
+ 100        IFL1 = IS*(INT((2.D0+PAR(2))*S_RNDM(0))+1)
+            XM = 2.D0*QMASS(IFL1)+0.3D0
+            if(E0.LE.XM) GOTO 100
+            IF(IABS(IFL1).eq.3)THEN
+               IF(S_RNDM(IFL1).lt.PAR(24)*PAR(125))IFL1 = IS*4
+               XM = 2.D0*QMASS(IFL1)+0.3D0
+               if(E0.LE.XM) GOTO 100
+            ENDIF
+            PAR(2) = PAR2_2_def
+            PAR(24) = PAR24_2_def                        
+         ENDIF
+      
+         CALL STRING_FRAG_4FLV 
+     &        (E0,IFL1,-IFL1,0.D0,0.D0,0.D0,0.D0,IFBAD,0)
+         if(IFBAD.gt.0) then
+            IF(ndebug.gt.1)
+     &       WRITE(LUN,*)
+     &           ' JET_FRAG: rejection in STRING_FRAG (IFL,E0,NCALL):',
+     &           IFL1,E0,NCALL
+            PAR(24) = PAR24_def
+            PAR(1) = PAR1_def
+            PAR(2) = PAR2_1_def
+            PAR(5) = PAR5_def
+            PAR(6) = PAR6_def
+            PAR(3) = PAR3_def
+            IPAR(82) = ipar82_def       
+            RETURN
+         ENDIF
+      ELSE
+C...  two string case, gluon - gluon
+         CALL GG_FRAG_4FLV(E0)
+      ENDIF
+
+c      DBETJ = (DX1J-DX2J)/(DX1J+DX2J)
+      DBETJ = PST(3)/PST(4)
+      CALL SIROBO (NOLD+1,NP,TH,FI,0.D0,0.D0,DBETJ)
+
+      if(Ndebug.gt.1) WRITE(LUN,*)
+     &     ' JET_FRAG: particles produced:',NP-NOLD
+      PAR(24) = PAR24_def
+      PAR(1) = PAR1_def
+      PAR(2) = PAR2_1_def
+      PAR(5) = PAR5_def
+      PAR(6) = PAR6_def
+      PAR(3) = PAR3_def
+      IPAR(82) = ipar82_def  
+      IBAD = 0
+      END
+C=======================================================================
+
+      SUBROUTINE INT_H_NUC (IA, SIGT, SLOPE, RHO) 
+
+C-----------------------------------------------------------------------
+C...Compute with a montecarlo method the "multiple interaction structure"
+C.  of an hadron-nucleus collision.
+C.  
+C.
+C.  INPUT : IA               = mass of target nucleus
+C.          SIGT (mbarn)     = total hp cross section
+C.          SLOPE (GeV**-2)  = slope of hp elastic scattering
+C.          RHO              = real/imaginary part of forward elastic
+C.                             scattering amplitude
+C.
+C.  OUTPUT : in COMMON block /CNCMS0/
+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. Author : P.Lipari  (may 1993)
+C---------------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      PARAMETER (IAMAX=56)
+      COMMON /S_CNCM0/ B, BMAX, NTRY, NA
+      DIMENSION XA(IAMAX), YA(IAMAX)
+
+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
+
+
+      PI=4.d0*atan(1.d0)
+
+      CC = SIGT/(4.D0*PI*SLOPE*CMBARN)         
+      DEN = 2.D0*SLOPE*CMBARN*0.1D0
+      BMAX = 1.D0*10.D0             ! fm
+      NTRY = 0
+      CALL NUC_CONF (IA, XA, YA)
+1000  CONTINUE
+      B = BMAX*dSQRT(S_RNDM(0))
+      PHI = 2.D0*PI*S_RNDM(NTRY)
+      BX = B*DCOS(PHI)
+      BY = B*DSIN(PHI)
+      NTRY = NTRY + 1
+      NA = 0
+      DO JA=1,IA
+         S = (XA(JA)-BX)**2 + (YA(JA)-BY)**2
+         F = dEXP(-S/DEN)
+         PEL = CC*CC*(1.D0+RHO*RHO)*F*F
+         PINEL  = 2.D0*CC*F-PEL
+         R = S_RNDM(JA)
+         IF (R .LT. PINEL)  THEN
+            NA = NA + 1
+         ENDIF
+      ENDDO
+      IF (NA .EQ. 0 .and. NTRY .lt. 1000)  GOTO 1000
+
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_REJECT(text)
+
+C-----------------------------------------------------------------------
+c     subroutine dumps state of random number generator 
+c     at beginning of event to file then produces fpe/stops
+C----------------------------------------------------------
+      IMPLICIT NONE
+
+      character*16  text
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER II2,JJ2
+      DOUBLE PRECISION U2,C2,CD2,CM2
+      COMMON /SIB_RAND/ U2(97),C2,CD2,CM2,II2,JJ2
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      DOUBLE PRECISION XDM
+c      CHARACTER*13 FILENA
+      SAVE
+c      DATA FILENA /'sib_rjctn.rnd'/
+
+      WRITE(LUN,*)
+     &     ' SIB_REJECT:(from,ncall,KB,iat,ECM) ',
+     &                   text,ncall,kb,iat,sqs
+c     produce floating point error
+      XDM = -1.D0
+      XDM = LOG(XDM)
+      STOP
+      END
+C=======================================================================
+
+      SUBROUTINE CUT_PRO (L, SQS, PTmin, NSOFR, NJETR)
+
+C-----------------------------------------------------------------------
+C...  Generate a number of soft/hard (jet-)pairs for a 'projectile'
+C     (K=1:p),(K=2:pi) interacting with a nucleon at sqrt(s)=SQS(GeV)
+C     the interaction structure is only destinguished between nucleons
+C     (L=1) and mesons (L=2), for cross sections there is a 
+C     distinction between pions and kaons as well (L=2 or 3).
+C     For Hyperons the same cross section and interaction structure
+C     as for nucleons is used (L=1).
+C
+C     requires initialization by JET_INI                         /FR'14
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+c      COMMON /S_DEBUG/ Ncall, Ndebug, Lun
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      
+      DOUBLE PRECISION SSIG,PJETC,SSIGN,SSIGNSD,SSIGNEL,ALINT,ASQSMIN,
+     &     ASQSMAX,DASQS
+      INTEGER NSQS
+      COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+     &     SSIGN(61,3,3), SSIGNSD(61,3,3), SSIGNEL(61,3,3), 
+     &     ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+
+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
+
+C     check if tables initialized
+      IF(NSQS.eq.0) THEN
+         WRITE(LUN,*) ' CUT_PRO: tables not initialized! aborting...'
+         xa = -1.D0
+         xa = log(xa)
+         stop
+      ENDIF
+      IF(NDEBUG.GT.1) 
+     &     WRITE(LUN,*) ' CUT_PRO: input: L, SQS, PTmin',L, SQS, PTmin
+
+c     choose nucleon or meson table
+      K = L
+      if(K.eq.3) K = 2
+
+      AL = dLOG10 (SQS)
+      IF (AL .LT. ASQSMIN)  THEN
+          WRITE(LUN,*)  ' CUT_PRO:  low sqrt(s) ', SQS
+          NSOFR = 1
+          NJETR = 0
+          RETURN
+      ENDIF
+      IF (AL .GT. ASQSMAX)  THEN
+          WRITE(LUN,*)  ' CUT_PRO:  sqrt(s) out of bounds ', SQS
+          NJETR = 0
+          RETURN
+      ENDIF
+
+      J1 = INT((AL - ASQSMIN)/DASQS + 1)
+      J1 = MIN(J1,60)
+      J1 = MAX(J1,1)
+      J2 = J1+1
+      T = (AL-ASQSMIN)/DASQS - DBLE(J1-1)
+
+      R = (1.D0-EPS8)*S_RNDM(0)
+      DO I=0,NS_max
+        DO J=0,NH_max
+          IF (R.LT.(1.D0-T)*PJETC(I,J,J1,K)+T*PJETC(I,J,J2,K)) GOTO 100
+        ENDDO
+      ENDDO
+100   CONTINUE
+
+C...phase space limitation
+
+ 120  CONTINUE
+      XM = DBLE(2*I)*STR_mass_sea + DBLE(2*J)*PTmin
+      PACC = EXP(PAR(9)*(2.D0-XM)/SQS)
+      IF(S_RNDM(0).GT.PACC) THEN
+        IF(I+J.GT.1) THEN
+          IF(I.GT.0) THEN
+            I = I-1
+            GOTO 120
+          ELSE IF(J.GT.0) THEN
+            J = J-1
+            GOTO 120
+          ENDIF
+        ENDIF
+      ENDIF
+
+      NSOFR = I
+      NJETR = J
+
+      if(Ndebug.gt.1) 
+     &  write(lun,*)' CUT_PRO: (L,SQS,PTmin,Ns,Nh) ',K,SQS,PTmin,I,J
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE JET_INI
+
+C-----------------------------------------------------------------------
+C...Compute table of cross sections, and table of probability
+C.  for the production of multiple soft and hard interactions
+C.
+C.  The output of this routine  is the COMMON block /S_CCSIG/
+C.  that contains  the cross sections h-p, h-Air, and the 
+C.  cumulative probability of NS soft and NH hard interactions
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      
+      DOUBLE PRECISION SSIG,PJETC,SSIGN,SSIGNSD,SSIGNEL,ALINT,ASQSMIN,
+     &     ASQSMAX,DASQS
+      INTEGER NSQS
+      COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+     &     SSIGN(61,3,3), SSIGNSD(61,3,3), SSIGNEL(61,3,3), 
+     &     ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+      DOUBLE PRECISION SSIG_TOT,SSIG_SD1,SSIG_SD2,SSIG_DD,SSIG_B,
+     &     SSIG_RHO
+      COMMON /S_CCSIG2/ SSIG_TOT(61,3),SSIG_SD1(61,3),SSIG_SD2(61,3),
+     &    SSIG_DD(61,3),SSIG_B(61,3),SSIG_RHO(61,3)
+      DOUBLE PRECISION SSIG_SD1LM,SSIG_SD1HM,SSIG_SD2LM,SSIG_SD2HM,
+     &     SSIG_DDLM,SSIG_DDHM
+      COMMON /S_CCSIG3/ SSIG_SD1LM(61,3),SSIG_SD1HM(61,3),
+     &     SSIG_SD2LM(61,3),SSIG_SD2HM(61,3),
+     &     SSIG_DDLM(61,3),SSIG_DDHM(61,3)
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+
+      DIMENSION Pjet(0:NS_max,0:NH_max)
+      DIMENSION SIG_df(3),SIG_df2(3,2),SIGDIF(3),SIGDIF_pi(3),
+     &          PS_tab(61),PH_tab(61),PT_tab(61)
+
+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
+
+C...spacing in energy for table of cross sections.
+
+      NSQS = 61
+      ASQSMIN = 1.D0
+      ASQSMAX = 7.D0
+      DASQS = (ASQSMAX-ASQSMIN)/DBLE(NSQS-1)
+
+C...initialization of proton and pion tables
+      
+      IF(LUN.ne.6) WRITE(6,*)' Calculating cross section tables...'
+      DO KK=1,2
+
+         IF(NDEBUG.gt.0)
+     &    WRITE(LUN,'(2(/,1X,A,A))') 
+     &     'Table: J, sqs,  PT_cut,  SIG_tot, SIG_inel, B_el,  ',
+     &     'rho,    <n_s>,  <n_h>, SIG_SD, SD1_lm, SD1_hm',
+     &     '---------------------------------------------------',
+     &     '----------------------------------------------'
+
+         JINT = KK
+         DO J=1, NSQS
+           ASQS = ASQSMIN + DASQS*DBLE(J-1)
+           SQS = 10.D0**ASQS
+
+           CALL SIB_SIG (JINT, SQS, PTmin,
+     &                   SIG_tot, SIG_inel, SIG_df, SIG_df2, B_el, Pjet)
+
+C...low-energy interpolation with data-parametrizations
+           CALL SIB_HADCSL(JINT,SQS,
+     &                     SIGTOT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+           if(SQS.le.100.D0) then
+             SIG_TOT  = SIGTOT
+             SIG_inel = SIGINEL
+             B_EL     = SLOPE
+           else if(SQS.le.1000.D0) then
+             Xi = dlog(SQS/100.D0)/2.30258509299405D0
+             SIG_TOT  = Xi*SIG_TOT+(1.D0-Xi)*SIGTOT
+             SIG_inel = Xi*SIG_inel+(1.D0-Xi)*SIGINEL
+             B_EL     = Xi*B_EL+(1.D0-Xi)*SLOPE
+           endif
+
+           SSIG_TOT(J,KK) = SIG_TOT
+           SSIG(J,KK)     = SIG_inel
+           SSIG_SD1(J,KK) = SIGDIF(1)
+           SSIG_SD2(J,KK) = SIGDIF(2)
+           SSIG_DD(J,KK)  = SIG_df(3)
+           SSIG_B(J,KK)   = B_EL
+           SSIG_RHO(J,KK) = RHO
+
+           SSIG_SD1LM(J,KK) = SIG_df2(1,1)
+           SSIG_SD1HM(J,KK) = SIG_df2(1,2)
+           SSIG_SD2LM(J,KK) = SIG_df2(2,1)
+           SSIG_SD2HM(J,KK) = SIG_df2(2,2)
+           SSIG_DDLM(J,KK) = SIG_df2(3,1)
+           SSIG_DDHM(J,KK) = SIG_df2(3,2)
+
+           PSUM = 0.D0
+           PH = 0.D0
+           PS = 0.D0
+           DO NS=0,NS_max
+             DO NJ=0,NH_max
+
+               PS = PS+DBLE(NS)*Pjet(NS,NJ)
+               PH = PH+DBLE(NJ)*Pjet(NS,NJ)
+
+               PSUM = PSUM+Pjet(NS,NJ)
+               PJETC(NS,NJ,J,KK) = PSUM
+
+             ENDDO
+           ENDDO
+           PS_tab(J) = PS
+           PH_tab(J) = PH
+           PT_tab(J) = PTmin
+
+           IF(NDEBUG.gt.0)
+     &      WRITE(LUN,'(3X,I2,1P,E12.3,0P,4F8.2,6F8.3)') 
+     &       JINT,SQS,PTmin,SIG_tot,SIG_inel,B_el,RHO,PS,PH
+     &          ,SIGDIF(1)+SIGDIF(2),SIG_df2(1,1),SIG_df2(1,2)
+
+         ENDDO
+      ENDDO
+
+C...initialization of kaon tables
+
+      JINT = 3
+
+      IF(NDEBUG.gt.0)
+     & WRITE(LUN,'(2(/,1X,A,A))') 
+     &  'Table: J, sqs,  PT_cut,  SIG_tot, SIG_inel, B_el,  ',
+     &  'rho,    <n_s>,  <n_h>',
+     &  '---------------------------------------------------',
+     &  '---------------------'
+      DO J=1, NSQS
+        ASQS = ASQSMIN + DASQS*DBLE(J-1)
+        SQS = 10.D0**ASQS
+C...use pion cross section rescaled for high-energy extrapolation
+        SIG_tot   = SSIG_TOT(J,2)
+        SIG_inel  = SSIG(J,2)
+        SIG_df(1) = SSIG_SD1(J,2)
+        SIG_df(2) = SSIG_SD2(J,2)
+        SIG_df(3) = SSIG_DD(J,2)
+        B_el = SSIG_B(J,2)
+        PTmin = PT_tab(J)
+        PS = PS_tab(J)
+        PH = PH_tab(J)
+
+C...low-energy interpolation with data-parametrizations
+        CALL SIB_HADCSL(2,SQS,
+     &                  SIGTOT_pi,SIGEL_pi,SIGINEL,SIGDIF_pi,SLOPE,RHO)
+        CALL SIB_HADCSL(3,SQS,
+     &                  SIGTOT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+        SIG_el    = (SIGEL/SIGEL_pi)*(SIG_TOT-SIG_inel)
+        SIG_TOT   = (SIGTOT/SIGTOT_pi)*SIG_TOT
+        SIG_inel  = SIG_TOT-SIG_el
+        SIG_df(3) = (SIGDIF(3)/SIGDIF_pi(3))*SIG_df(3)
+        if(SQS.le.100.D0) then
+          SIG_TOT  = SIGTOT
+          SIG_inel = SIGINEL
+          B_EL     = SLOPE
+        else if(SQS.le.1000.D0) then
+          Xi = dlog(SQS/100.D0)/2.30258509299405D0
+          SIG_TOT  = Xi*SIG_TOT+(1.D0-Xi)*SIGTOT
+          SIG_inel = Xi*SIG_inel+(1.D0-Xi)*SIGINEL
+          B_EL     = Xi*B_EL+(1.D0-Xi)*SLOPE
+        endif
+
+        SSIG_TOT(J,3) = SIG_TOT
+        SSIG(J,3)     = SIG_inel
+        SSIG_SD1(J,3) = SIGDIF(1)
+        SSIG_SD2(J,3) = SIGDIF(2)
+        SSIG_DD(J,3)  = SIG_df(3)
+        SSIG_B(J,3)   = B_EL
+        SSIG_RHO(J,3) = RHO
+
+        IF(NDEBUG.gt.0)
+     &   WRITE(LUN,'(3X,I2,1P,E12.3,0P,4F8.2,3F8.3)') 
+     &    JINT,SQS,PTmin,SIG_tot,SIG_inel,B_el,RHO,PS,PH
+
+      ENDDO
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE INI_WRITE (LUN)
+
+C-----------------------------------------------------------------------
+C   This subroutine prints on unit LUN
+C   a table of the cross sections  used in the program
+C   and of the average number of hard interactions, and the average
+C   number of wounded nucleons in a hadron-air interaction
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      
+      DOUBLE PRECISION SSIG,PJETC,SSIGN,SSIGNSD,SSIGNEL,ALINT,ASQSMIN,
+     &     ASQSMAX,DASQS
+      INTEGER NSQS
+      COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+     &     SSIGN(61,3,3), SSIGNSD(61,3,3), SSIGNEL(61,3,3), 
+     &     ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+      DIMENSION PJ(2),PS(2),PW(2)
+
+      SAVE
+      DATA ATARGET /14.514D0/
+
+      if ( ndebug .gt. 3 ) CALL PARAM_PRINT(LUN)
+      if ( ndebug .gt. 0 ) THEN
+        WRITE (LUN, 10)
+        WRITE (LUN, 15)
+        WRITE (LUN, 16)
+        WRITE (LUN, 18)
+10    FORMAT(//,' Table of cross sections, and average number',
+     &         ' of minijets and wounded nucleons ')
+15    FORMAT('        [sqrt(s) in GeV, cross sections in mbarn]. ')
+16    FORMAT(' sqrt(s) sig(pp) sig(pA) <n_s> <n_j> <n_w>',
+     &    ' sig(pip) sig(piA) <n_s> <n_j> <n_w>')
+18    FORMAT(1X,77('-') )
+        DO J=1,61,1
+         SQS = 10.D0**(ASQSMIN + DASQS*DBLE(J-1))
+
+         DO K=1,2
+
+           PW(K) = ATARGET*SSIG(J,K)/SSIGN(J,K,1)
+
+           PJ(K) = 0.D0
+           PS(K) = 0.D0
+           DO NS=0,NS_max
+             DO NJ=0,NH_max
+               IF(NJ.GT.0) THEN
+                 PROB = PJETC(NS,NJ,J,K) - PJETC(NS,NJ-1,J,K)
+               ELSE IF(NS.GT.0) THEN
+                 PROB = PJETC(NS,NJ,J,K) - PJETC(NS-1,NH_max,J,K)
+               ELSE
+                 PROB = 0.D0
+               ENDIF
+               PJ(K) = PJ(K)+DBLE(NJ)*PROB
+               PS(K) = PS(K)+DBLE(NS)*PROB
+             ENDDO
+           ENDDO
+
+         ENDDO
+
+         WRITE(LUN,20) SQS,SSIG(J,1),SSIGN(J,1,1),PS(1),PJ(1),PW(1)
+     &                      ,SSIG(J,2),SSIGN(J,2,1),PS(2),PJ(2),PW(2)
+
+        ENDDO
+
+        WRITE(LUN, 18)
+      endif
+20    FORMAT(1p,E10.2,2(2F7.1,1X,3F6.2,1X))
+
+      return
+      END
+
+C=======================================================================
+
+            SUBROUTINE SIG_AIR_INI 
+
+C-----------------------------------------------------------------------
+C...  Initialize the cross section and interaction lengths on air, 
+C.    nitrogen and oxygen      
+C.  (this version initializes p-air, pi-air, and K-air cross sections)
+C.
+C.  also calculates the low mass beam diffraction cross section in hAir \FR
+C.  using the same lambda for all hadrons
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      
+      DOUBLE PRECISION SSIG,PJETC,SSIGN,SSIGNSD,SSIGNEL,ALINT,ASQSMIN,
+     &     ASQSMAX,DASQS
+      INTEGER NSQS
+      COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+     &     SSIGN(61,3,3), SSIGNSD(61,3,3), SSIGNEL(61,3,3), 
+     &     ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+      COMMON /GLAUB_SCR/ XI_MAX , ALAM(61)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      DIMENSION SIGDIF(3)
+      DIMENSION ITARGC(3)
+      CHARACTER*3 TARGN
+      DIMENSION TARGN(3)
+      SAVE
+      DATA AVOG /6.0221367D-04/
+      DATA ATARGET /14.514D0/
+      DATA ITARGC /0,14,16/
+      DATA TARGN /'air','nit','oxy'/
+
+      IF ( IPAR(12).GT.0 ) THEN
+         if (ndebug.gt.0) then
+           WRITE(LUN,*) ' SIG_AIR_INI:'
+           WRITE(LUN,*)' using Goulianos param. for res.coupling..'
+         endif
+         XI_MAX = 0.02D0
+         if (ndebug.gt.0)WRITE(LUN,*)' low mass Xi_max: ' , XI_MAX
+      ENDIF
+
+C...target loop (air, N, O)      
+      DO IK=1,3
+         IAT = ITARGC(IK)
+         WRITE(6,*) 'SIG_AIR_INI: initializing target: (i,A)',
+     &    ik, IAT, TARGN(IK) , '..'
+C...particle loop (p, pi, K)
+         DO K=1,3
+         
+            if (NDEBUG .gt. 0 ) then
+               WRITE(6,'(/,1X,A,A)') 
+     &          'Table: J, IK, sqs,    SIGtot,     SIGprod,    SIG_SD,',
+     &'     Lambda  '
+               WRITE(6,*) 
+     &              '-------------------------------------------------',
+     &              '-------------'
+            endif
+            DO J=1,NSQS
+
+               ASQS = ASQSMIN + DASQS*DBLE(J-1)
+               SQS = 10.D0**ASQS
+
+               IF (K.EQ.1) THEN
+c     Goulianos param. from GAP-2012-056, Mx**2s = 0.02
+c     against PDG elastic cross section
+                  CALL SIB_HADCS1
+     &             (K,SQS,SIGT1,SIGEL1,SIGINEL1,SLOPE1,RHO1)
+                  SIGEFF = 0.68D0*(1.D0+36.D0/SQS**2)*
+     &                 dlog(0.6D0+XI_MAX/1.5D0*SQS**2)
+                  ALAM(J) = dSQRT(SIGEFF/SIGEL1)
+               ENDIF
+               CALL SIB_SIGMA_HP(K,SQS,
+     &              SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+               IF(IK.eq.1)THEN
+c     fixed O-N mixture
+                  CALL SIG_H_AIR
+     &                 (SIGT, SLOPE, RHO, ALAM(J),
+     &                 SSIGT, SSIGEL, SSIGQE, SSIGSD, SSIGQSD)
+               ELSE
+                  CALL SIG_H_NUC
+     &                 (IAT, SIGT, SLOPE, RHO, ALAM(J),
+     &                 SSIGT, SSIGEL, SSIGQE, SSIGSD, SSIGQSD)
+               ENDIF
+               if (ndebug .gt. 0 ) WRITE(6,'(1X,I2,1P,5E12.3)') 
+     &              K,SQS,SSIGT,SSIGT-SSIGQE,SSIGQSD,ALAM(J)
+C     particle production cross section
+               SSIGN(J,K,IK) = SSIGT-SSIGQE
+c     diffractive cross section               
+               SSIGNSD(J,K,IK) = SSIGQSD
+c     elastic cross section
+               SSIGNEL(J,K,IK) = SSIGEL
+c     interaction length
+               IF(IK.eq.1)then
+                  ALINT(J,K,IK) = 1.D0/(AVOG*SSIGn(j,K,IK)/ATARGET)
+               else
+                  ALINT(J,K,IK) = 1.D0/(AVOG*SSIGn(j,K,IK)/IAT)
+               endif
+            ENDDO
+         ENDDO
+     
+         if (ndebug .gt. 0 ) then
+            WRITE(6,'(/,1X,A)') 
+     &           ' SIG_AIR_INI: NUCLIB interaction lengths [g/cm**2]'
+            WRITE(6,*) 'target:', TARGN(IK)
+            WRITE(6,'(1X,A)') 
+     &           '     sqs,       p-targ,      pi-targ,     K-targ'
+            DO J=1,NSQS
+               ASQS = ASQSMIN + DASQS*DBLE(J-1)
+               SQS = 10.D0**ASQS
+               WRITE(6,'(1X,1P,4E12.3)') 
+     &              SQS,ALINT(J,1,IK),ALINT(J,2,IK),ALINT(J,3,IK)
+            ENDDO
+         endif
+      ENDDO
+      END
+C=======================================================================
+
+      SUBROUTINE SAMPLE_TARGET(NW,XCHG,KRMNT,XJET,Irec,IREJ)
+
+C-----------------------------------------------------------------------/
+C...Subroutine to sample valence and sea quark kinematic variables
+C     on the target side
+C.    fills IFLT,X2 and PXT,PYT
+C.    1,2 are valence quarks, 3,4 are additional sea quarks
+C.    transverse momentum is shared between the val. and sea pairs
+C.    X and flv are exchanged occasionally, not pt so far
+C-------------------------------------------------------------------      
+      IMPLICIT NONE
+
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+c     external types
+      DOUBLE PRECISION XJET,XCHG
+      DIMENSION XJET(NW_max)
+      INTEGER KRMNT,NW,IREC,IREJ
+      DIMENSION KRMNT(NW_max)
+
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+
+      INTEGER IBMRDX,ITGRDX,IHMJDX,ISMJDX,ICSTDX,IINTDX
+      COMMON /S_INDX/ IBMRDX(3),ITGRDX(NW_max,3),
+     &     IHMJDX(NW_max*NH_max),IINTDX(NW_max),
+     &     ISMJDX(NW_max*NS_max),ICSTDX(2*NW_max,3)
+
+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
+
+      INTEGER IRMNT,KRB,KRT
+      DOUBLE PRECISION XRMASS,XRMEX
+      COMMON /S_RMNT/ XRMASS(2),XRMEX(2),IRMNT(NW_max),KRB,KRT(NW_max)
+
+c     internal types
+      DOUBLE PRECISION XX,X2,PX,PXT,PY,PYT,PZ,PZ1,PZ2
+      DIMENSION XX(2*NW_max+2),PX(2*NW_max+2),PY(2*NW_max+2)
+      DIMENSION X2(4*NW_max),PXT(4*NW_max),PYT(4*NW_max)
+      INTEGER IFL,IFLT,IREJ1,J,J1,J2,J3,J4,JJ,JJJ,JI,I,KID,Iref1,
+     &     Iref,KID1
+      DIMENSION IFL(2*NW_max+2),IFLT(4*NW_max)
+      SAVE
+
+      IREJ1 = 1
+
+      IF(ndebug.gt.2) 
+     +     WRITE(LUN,*)
+     +     ' SAMPLE_TARGET: NW,XCHG,LRMNT,XJET,IREC,IREJ',
+     +     NW,XCHG,(KRMNT(j),j=1,NW),(XJET(j),j=1,NW),IREC,IREJ
+
+      DO J=1,NW ! zero arrays
+         j1 = 1+4*(j-1)
+         j2 = j1 + 1
+         j3 = j2 + 1
+         j4 = j3 + 1
+         X2(j1) = 0.D0
+         X2(j2) = 0.D0
+         X2(j3) = 0.D0
+         X2(j4) = 0.D0
+         PXT(j1) = 0.D0
+         PXT(j2) = 0.D0
+         PXT(j3) = 0.D0
+         PXT(j4) = 0.D0
+         PyT(j1) = 0.D0
+         PyT(j2) = 0.D0
+         PyT(j3) = 0.D0
+         PyT(j4) = 0.D0
+      ENDDO
+
+      DO j=1,NW
+c     read target id from event info 
+         KID = KT(J)
+c     reset rejection
+         IREJ = IREJ1
+c     always fills remnant partons into 1,2 and c.strings into 3,4
+c     so far only one interaction possible (beam is always a single hadron!)        
+         CALL SAMPLE_PROJECTILE
+     +        (KID,1,KRMNT(j),XCHG,XJET(j),XX,PX,PY,IFL,KID1,IREJ)
+         IF(IREJ.ne.0) RETURN
+
+c     write to target variables
+         do jj=3-2*KRMNT(j),4
+            ji = jj+4*(j-1)
+            IFLT(ji) = IFL(jj)
+            X2(ji) = XX(jj)
+            PXT(ji) = PX(jj)
+            PYT(ji) = PY(jj)
+         enddo
+
+         IF(KRMNT(j).ne.0)THEN
+c     by convention hadron is split such that diq is 2nd flv
+c     for string frag routine argument flv1 is along +z, flv2 -z
+c     by convention again flv2 in the remnant is passed to +z and flv1 to -z
+c     therefor on the target side the flavors need to be switched such that
+c     the diq is along -z
+            j1 = 1+4*(j-1)
+            j2 = j1 + 1
+            CALL ISWTCH_LMNTS(IFLT(j1),IFLT(j2))
+         ENDIF
+
+c     central strings
+c     flavors need to be switched as well (strictly speaking color)
+c     in dual-parton model: q : color , diq : anticolor
+c     need to combine q with diq for color neutral system..
+         j3 = 3+4*(j-1)
+         j4 = j3 + 1
+         CALL ISWTCH_LMNTS(IFLT(j3),IFLT(j4))
+         CALL SWTCH_LMNTS(X2(j3),X2(j4))
+         
+c     reset remnant id 
+c     might have changed in flavor exchange (actually color)...
+         KRT(J) = KID1
+      ENDDO
+
+C..   write target partons to stack
+      DO I=1,NW
+         IF(KRMNT(I).ne.0)THEN
+c     add proto-remnant
+            j1 = 1+4*(i-1)
+            j2 = j1 + 1
+            CALL ADD_PRTN(PXT(J1)+PXT(J2),PYT(J1)+PYT(J2),
+     &           -0.5D0*SQS*(X2(J1)+X2(j2)),0.5D0*SQS*(X2(J1)+X2(j2)),
+     &           0.D0,-2,0,0,Iref1)
+            ITGRDX(I,1) = Iref1
+            CALL ADD_INT_REF(Iref1,IINTDX(I))
+c     add quarks to stack
+            do j = 1,2
+               jj = 4*(i-1)+j
+               jjj = 4*(i-1)+j + 2
+               pz1 = (0.5D0*SQS*X2(JJ))**2
+c               PZ1 = (0.5D0*SQS*X2(JJ))**2-PXT(JJ)**2-PYT(JJ)**2
+               CALL ADD_PRTN(PXT(JJ),PYT(JJ),-sqrt(pz1),
+     &              0.5D0*SQS*X2(JJ),0.D0,IFLT(JJ),1,Iref1,Iref)
+               ITGRDX(I,j+1) = Iref
+               pz2 = (0.5D0*SQS*X2(JJj))**2
+c               pz2 = (0.5D0*SQS*X2(JJj))**2-PXT(JJj)**2-PYT(JJj)**2
+               CALL ADD_PRTN(PXT(JJj),PYT(JJj),-sqrt(pz2),
+     &              0.5D0*SQS*X2(JJj),0.D0,IFLT(JJj),1,0,Iref)
+               ICSTDX(2*(I-1)+j,3) = Iref
+            enddo
+         else
+            do j = 3,4
+               jj = 4*(i-1)+j
+               pz = (0.5D0*SQS*X2(JJ))**2
+c               pz = (0.5D0*SQS*X2(JJ))**2-PXT(JJ)**2-PYT(JJ)**2
+               CALL ADD_PRTN(PXT(JJ),PYT(JJ),-sqrt(pz),
+     &              0.5D0*SQS*X2(JJ),0.D0,IFLT(JJ),1,0,Iref)
+               ICSTDX(2*(I-1)+(J-2),3) = Iref
+            enddo
+         ENDIF
+      ENDDO
+      IF(NDEBUG.GT.3) CALL PRNT_PRTN_STCK
+
+      IREJ = 0
+      END
+C=======================================================================
+
+      SUBROUTINE SIGMA_NUC_AIR(IA,ECM,KINT)
+
+C-----------------------------------------------------------------------
+C.  wrapping for SIGMA_NUC in NUCLIB
+C...Compute with a montecarlo method the "production"
+C.  and "quasi-elastic" cross section for  
+C.  a nucleus-nucleus interaction
+C.  nucleon - nucleon cross section is taken from 
+C.  the table calculated by SIBYLL_INI
+C.
+C.  INPUT : IA            = mass of target nucleus
+C.          ECM          = c.m. energy
+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.      in COMMON /NUCNUCSIG/ 
+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)
+      COMMON /NUCNUCSIG/ SIGPROD,DSIGPROD,SIGQE,DSIGQE,IBE,ITG
+      DIMENSION SIGDIF(3)
+      SAVE
+      DATA NDB /0/
+      
+      DSIGPROD = 0.D0
+      DSIGQE = 0.D0
+
+      CALL SIB_SIGMA_HP(1,ECM,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+      CALL SIGMA_AIR(IA,SIGINEL,SIGEL,KINT,SIGPROD,DSIGPROD,
+     +     SIGQE,DSIGQE)
+      IBE = IA
+      ITG = 0
+      IF(DSIGPROD/SIGPROD.gt.0.1D0)THEN
+         IF( NDB.EQ.0 ) 
+     +     PRINT*,'SIG_NUC_AIR: warning! : large error in cross section'
+         NDB = 1
+      ENDIF
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIG_NUC_AIR(IA,SIGPP,SIGPPEL,KINT)
+
+C-----------------------------------------------------------------------
+C.  wrapping for SIGMA_NUC in NUCLIB
+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.          SIGPP (mbarn)  = inelastic pp cross section
+C.          SIGPPEL        = elastic 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.      in COMMON /NUCNUCSIG/ 
+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)
+      COMMON /NUCNUCSIG/ SIGPROD,DSIGPROD,SIGQE,DSIGQE,IBE,ITG
+      SAVE
+
+      DSIGPROD = 0.D0
+      DSIGQE = 0.D0
+      CALL SIGMA_AIR(IA,SIGPP,SIGPPEL,KINT,SIGPROD,DSIGPROD,
+     +     SIGQE,DSIGQE)
+      IBE = IA
+      ITG = 0
+      IF(DSIGPROD/SIGPROD.gt.0.1D0)THEN
+         IF( NDB.EQ.0 ) 
+     +     PRINT*,'SIG_NUC_AIR: warning! : large error in cross section'
+         NDB = 1
+      ENDIF
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIG_NUC_NUC(IA,IB,SIGPP,SIGPPEL,KINT)
+
+C-----------------------------------------------------------------------
+C.  wrapping for SIGMA_NUC in NUCLIB
+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.          SIGPP (mbarn)  = inelastic pp cross section
+C.          SIGPPEL        = elastic 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.      in COMMON /NUCNUCSIG/ 
+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)
+      COMMON /NUCNUCSIG/ SIGPROD,DSIGPROD,SIGQE,DSIGQE,IBE,ITG
+      SAVE
+
+      DSIGPROD = 0.D0
+      DSIGQE = 0.D0
+      CALL SIGMA_MC(IA,IB,SIGPP,SIGPPEL,KINT,SIGPROD,DSIGPROD,
+     +     SIGQE,DSIGQE)
+      IBE = IA
+      ITG = IB
+      IF(DSIGPROD/SIGPROD.gt.0.1D0)THEN
+         IF( NDB.EQ.0 ) 
+     +     PRINT*,'SIG_NUC_NUC: warning! : large error in cross section'
+         NDB = 1
+      ENDIF
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SIG_HAD_NUC(L,IA,ECM,ALAM,ICSMOD,IPARM)
+
+C-----------------------------------------------------------------------
+C**********************************************************************
+C...Subroutine to compute hadron-nucleus cross sections
+C.  according to:
+C.  R.J. Glauber and G.Matthiae  Nucl.Phys. B21, 135, (1970)
+C.
+C.
+C.  INPUT :  L projectile particle (1:p , 2:pi, 3:K )
+C.           IA mass-number of target nucleus
+C.           SSIG  (mbarn) total pp cross section
+C.           SLOPE (GeV**-2)  elastic scattering slope for pp
+C.           ALPHA    real/imaginary part of the forward pp elastic
+C.                                               scattering amplitude
+C.           ALAM: inel. screening coupling
+C.
+C.  OUTPUT : ( in COMMON block /NUCSIG/ )
+C.           SIGT  = Total cross section
+C.           SIGEL = Elastic cross section
+C.           SIGQEL  = Elastic + Quasi elastic cross section
+C.           SIGSD  = beam single diff. cross section
+C......................................................................
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /NUCSIG/ SIGT,SIGEL,SIGINEL,SIGQE,SIGSD,
+     +     SIGQSD,SIGPPT,SIGPPEL,SIGPPSD,ITG
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+c      double precision dplab
+c      double precision DSSIG,DSLOPE,DALPHA,DALAM
+c      DOUBLE PRECISION SG1,SGEL1,SGQE1,SGSD1,SGQSD1
+      DIMENSION SSIGDIF(3),XM(4)     
+      SAVE
+c     DATA XM / 0.93956563, 0.13956995, 0.493677, 0.93956563 /
+      DATA GEV2MB /0.3893D0/
+      DATA INIT/0/
+
+      IF(INIT.EQ.0) THEN
+c  use the masses from the mass table
+cdh     XM(1) = AM(14)     ! neutron
+        XM(1) = AM(13)     ! proton
+        XM(2) = AM(7)      ! pi+
+        XM(3) = AM(9)      ! K+
+        XM(4) = AM(14)     ! neutron
+        INIT = 1
+      ENDIF
+
+      xma = XM(L)
+      xmb = (XM(1)+XM(4))/2.D0
+
+      Plab = dsqrt(((ecm**2-xma**2-xmb**2)/(2.D0*xmb))**2-xma**2)
+
+C     hadron proton cross section to be used for calculation
+
+      IF( ICSMOD.EQ.1 ) THEN
+c     sibyll 2.1 cross section
+
+         CALL SIB_SIGMA_HP(L,ECM,SSIG,SSIGEL,SSIGINEL,SSIGDIF,SLOPE,RHO)
+
+      ELSEIF( ICSMOD.EQ.0 ) THEN
+c     cross section parametrizations
+
+         if(Ecm.gt.12.D0) then
+
+           CALL SIB_HADCSL(L,ECM,SSIG,SSIGEL,SSIGINEL,SSIGDIF,SLOPE,RHO)
+
+         else
+c     low energy parametrization
+            SSIG = (sigtot_pp(Plab)+sigtot_pn(plab))/2.D0
+            SSIGEL  = (sigela_pp(Plab)+sigela_pn(plab))/2.D0
+C     parametrization from U. Dersch et al. Nucl Phys. B579 (2000) 277
+            RHO = 6.8D0/plab**0.742D0-6.6D0/plab**0.599D0+0.124D0
+            SLOPE = (1.D0+RHO**2)*SIGTOT**2/(16.D0*PI*SIGEL)/GEV2MB
+            SSIGDIF(1) = 0.D0
+            SSIGDIF(2) = 0.D0
+            SSIGDIF(3) = 0.D0
+         endif
+      ENDIF
+      SSIGSD = SSIGDIF(1) + SSIGDIF(2)
+
+c     energy dependence of lambda parameter
+      if( IPARM.eq.1 ) then
+
+c     empirical parametrization
+         SIGEFF = 0.25D0*Ecm**2/(Ecm**2+10.D0**2)*dLOG(1000.D0*Ecm**2)
+     &        -1.5D0/2.D0
+         SIGEFF = MAX(0.D0,SIGEFF)
+         
+         ALAM = dsqrt(SIGEFF/SSIGEL)
+
+         SSIGSD = 2.D0 * SIGEFF
+         
+      elseif( IPARM.EQ.2 ) then
+         
+c     lambda derived from proton interactions
+         CALL SIB_HADCS1(1,ECM,SIGT1,SSIGEL1,SIGINEL1,SLOPE1,RHO1)
+C     parametrization by Goulianos for diff. interaction
+         SIGEFF = 0.68D0*(1.D0+36.D0/Ecm**2)
+     &        *LOG(0.6D0+0.02D0/1.5D0*Ecm**2)
+         SIGEFF = MAX(0.D0,SIGEFF)
+         ALAM = sqrt(SIGEFF/SSIGEL1)
+         
+         SSIGSD = 2.D0 * SIGEFF
+         
+      elseif( IPARM.eq.3)then
+
+C     data from Paolo Lipari's note
+         SIGTOT = 129.D0
+         SIGEL  = 0.3D0*SIGTOT
+         SIGEFF = ECM*0.01D0*SIGTOT
+         RHO    = 0.D0
+         SLOPE  = (1.D0+RHO**2)*SIGTOT**2/(16.D0*PI*SIGEL)/GEV2MB
+         ALAM   = dsqrt(SIGEFF/SIGEL)
+         
+         SSIG = SIGTOT
+         SSIGEL = SIGEL
+         SSIGSD = 2.D0 * SIGEFF
+      endif 
+
+      ALPHA = RHO
+
+C     hadron - nucleon cross section
+      
+      IF( IA.EQ.0 ) THEN
+         CALL SIG_H_AIR
+     +        (SSIG,SLOPE,ALPHA,ALAM,SG1,SGEL1,SGQE1,SGSD1,SGQSD1)
+      else
+         CALL GLAUBER2
+     +        (IA,SSIG,SLOPE,ALPHA,ALAM,SG1,SGEL1,SGQE1,SGSD1,SGQSD1)
+      endif
+
+      ITG = IA
+
+      SIGPPT = SSIG
+      SIGPPEL = SSIGEL
+      SIGPPSD = SSIGSD
+      SIGT  = SG1
+      SIGEL = SGEL1
+      SIGQE = SGQE1
+      SIGSD = SGSD1
+      SIGQSD = SGQSD1
+      SIGINEL = SIGT - SIGEL
+
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SIG_H_AIR
+     +     (SSIG,SLOPE,ALPHA,ALAM,SIGT,SIGEL,SIGQE,SIGSD,SIGQSD)
+
+C-----------------------------------------------------------------------
+C**********************************************************************
+C...Subroutine to compute hadron-air cross sections
+C.  according to:
+C.  R.J. Glauber and G.Matthiae  Nucl.Phys. B21, 135, (1970)
+C.
+C.  Air is a linear combination of Nitrogen and oxygen
+C.
+C.  INPUT :  SSIG  (mbarn) total pp cross section
+C.           SLOPE (GeV**-2)  elastic scattering slope for pp
+C.           ALPHA    real/imaginary part of the forward pp elastic
+C.                                               scattering amplitude
+C.           ALAM  coupling to inel. intermediat states
+C.  OUTPUT : SIGT  = Total cross section
+C.           SIGEL = Elastic cross section
+C.           SIGQEL  = Elastic + Quasi elastic cross section
+C.           SIGSD   = single diff. cross section (beam) 
+C.           SIGQSD  = Elastic + Quasi elastic SD cross section (beam)
+C.
+C.  ALSO including interface from single precision in SIBYLL to
+C.       double precision in GLAUBER2
+C......................................................................
+      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+      DATA FOX /0.21522D0/  !atomic percentage of 'non-nitrogen' in air
+
+      CALL GLAUBER2
+     +  (14,SSIG,SLOPE,ALPHA,ALAM,SIG1,SIGEL1,SIGQE1,SIGSD1,SIGQSD1)
+      CALL GLAUBER2
+     +  (16,SSIG,SLOPE,ALPHA,ALAM,SIG2,SIGEL2,SIGQE2,SIGSD2,SIGQSD2)
+
+      SIGT  = (1.D0-FOX)*SIG1   + FOX*SIG2
+      SIGEL = (1.D0-FOX)*SIGEL1 + FOX*SIGEL2
+      SIGQE = (1.D0-FOX)*SIGQE1 + FOX*SIGQE2
+      SIGSD = (1.D0-FOX)*SIGSD1 + FOX*SIGSD2
+      SIGQSD = (1.D0-FOX)*SIGQSD1 + FOX*SIGQSD2
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIG_H_NUC
+     +     (IAT,SSIG,SLOPE,ALPHA,ALAM,SIGT,SIGEL,SIGQE,SIGSD,SIGQSD)
+
+C-----------------------------------------------------------------------
+C**********************************************************************
+C...Subroutine to compute hadron-nucleus cross sections
+C.  according to:
+C.  R.J. Glauber and G.Matthiae  Nucl.Phys. B21, 135, (1970)
+C.
+C.  INPUT :  IAT   nucleon number in target nucleus
+C.           SSIG  (mbarn) total pp cross section
+C.           SLOPE (GeV**-2)  elastic scattering slope for pp
+C.           ALPHA    real/imaginary part of the forward pp elastic
+C.                                               scattering amplitude
+C.  OUTPUT : SIGT  = Total cross section
+C.           SIGEL = Elastic cross section
+C.           SIGQEL  = Elastic + Quasi elastic cross section
+C.           SIGSD   = single diff. cross section (beam) 
+C.           SIGQSD  = Elastic + Quasi elastic SD cross section (beam)
+C.
+C......................................................................
+      IMPLICIT NONE
+      INTEGER IAT
+      DOUBLE PRECISION SSIG,SLOPE,ALPHA,ALAM      
+      DOUBLE PRECISION SIG1,SIGEL1,SIGQE1,SIGSD1,SIGQSD1
+      DOUBLE PRECISION SIGT,SIGEL,SIGQE,SIGSD,SIGQSD
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      SAVE
+      IF(IAT.eq.0.or.IAT.gt.18) THEN
+         WRITE(LUN,'(//,1X,A)') 
+     &        ' SIG_H_NUC: number of target nucleons too large!',
+     &        ' (1<=IAT<=18)'
+         SIGT = -1.D0
+         STOP
+      ENDIF
+
+      CALL GLAUBER2
+     +  (IAT,SSIG,SLOPE,ALPHA,ALAM,SIG1,SIGEL1,SIGQE1,SIGSD1,SIGQSD1)
+      SIGT  = SIG1   
+      SIGEL = SIGEL1 
+      SIGQE = SIGQE1 
+      SIGSD = SIGSD1 
+      SIGQSD = SIGQSD1
+      RETURN
+      END
+
+C=======================================================================
+      
+      SUBROUTINE GLAUBER2
+     +     (JA,SSIG,SLOPE,ALPHA,ALAM,SIGT,SIGEL,SIGQEL,SIGSD,SIGQSD)
+
+C-----------------------------------------------------------------------
+C...Subroutine to compute hadron-Nucleus cross sections
+C.  according to:
+C.  R.J. Glauber and G.Matthiae  Nucl.Phys. B21, 135, (1970)
+C.
+C.  This formulas assume that the target nucleus  density is
+C.  modeled by a shell-model form.  A reasonable range of models
+C.  is  4 < JA < 18
+C.
+C.  This is a modified version with a two-channel model for inelastic
+C.  intermediate states of low mass (R. Engel 2012/03/26)
+C.
+C.  INPUT :  A = mass number of the nucleus
+C.           SSIG  (mbarn) total pp cross section
+C.           SLOPE (GeV**-2)  elastic scattering slope for pp
+C.           ALAM  enhancement factor (sqrt of sigma_sd1/sigma_ela)
+C.           ALPHA    real/imaginary part of the forward pp elastic
+C.                                               scattering amplitude
+C.  OUTPUT : SIGT  = Total cross section
+C.           SIGEL = Elastic cross section
+C.           SIGQEL  = Elastic + Quasi elastic cross section
+C.           SIGSD = single diff. cross section
+C.           SIGQSD = Quasi single diff. cross section
+C.
+C. Internally  everything is computed in GeV (length = GeV**-1)
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CA0SH/ R0, R02
+      COMPLEX*16  ZS1, ZS2, ZP1, ZP2, Z1, Z2, OM12
+      DIMENSION RR(18)
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+      DATA BMAX /100.D0/            ! GeV**-1
+      DATA NB /500/
+C...data on Sqrt[<r**2>] (fm). (A=5,8 are not correct).
+C   From Barett and Jackson
+      DATA RR /0.81,2.095,1.88,1.674, 2.56,2.56,2.41,2.5,2.519,2.45
+     +          ,2.37, 2.460, 2.440, 2.54, 2.58, 2.718, 2.662,2.789 /
+
+      A = DBLE(JA)
+C...Parameter of shell model density
+      R0 = RR(JA)/0.197D0/dSQRT(5.D0/2.D0 - 4.D0/A)    ! GeV**-1
+      R02 = R0*R0
+
+      SIG1 = (1.D0+ALAM) * SSIG/CMBARN            ! GeV**-2
+      SIG2 = (1.D0-ALAM) * SSIG/CMBARN
+      SIG12 = dSQRT((1.D0+ALAM)*(1.D0-ALAM)) * SSIG/CMBARN
+      DB = BMAX/DBLE(NB)
+      SUM0 = 0.D0
+      SUM1 = 0.D0
+      SUM2 = 0.D0
+      SUM3 = 0.D0
+      SUM4 = 0.D0
+      DO JB=1,NB
+
+        B = DB*(DBLE(JB)-0.5D0)
+
+        GS1 = GLAUBGS_D (B,SLOPE, SIG1)
+        XS1 = (1.D0- GS1)
+        YS1 = GS1*ALPHA
+        ZS1 = DCMPLX(XS1,YS1)
+
+        GP1 = GLAUBGP_D (B,SLOPE, SIG1)
+        XP1 = (1.D0- GP1)
+        YP1 = GP1*ALPHA
+        ZP1 = DCMPLX(XP1,YP1)
+
+        Z1 = ZS1**4 * ZP1**(A-4.D0)
+
+        GS2 = GLAUBGS_D (B,SLOPE, SIG2)
+        XS2 = (1.D0- GS2)
+        YS2 = GS2*ALPHA
+        ZS2 = DCMPLX(XS2,YS2)
+
+        GP2 = GLAUBGP_D (B,SLOPE, SIG2)
+        XP2 = (1.D0- GP2)
+        YP2 = GP2*ALPHA
+        ZP2 = DCMPLX(XP2,YP2)
+
+        Z2 = ZS2**4 * ZP2**(A-4.D0)
+
+        XZ = 0.5D0 * DREAL(Z1+Z2)
+        YZ = 0.5D0 * DIMAG(Z1+Z2)
+
+        XZ2 = 0.5D0 * DREAL(Z2-Z1)
+        YZ2 = 0.5D0 * DIMAG(Z2-Z1)
+
+        SUM0 = SUM0 + (1.D0-XZ)*B
+
+        SUM1 = SUM1 + ((1.D0-XZ)**2 + YZ**2)*B
+
+        SUM3 = SUM3 + (XZ2**2 + YZ2**2)*B
+
+        OMS1 = OMEGAS_D(B,SIG1,SLOPE,ALPHA)
+        OMS2 = OMEGAS_D(B,SIG2,SLOPE,ALPHA)
+        OMS12 = OMEGAS_D(B,SIG12,SLOPE,ALPHA)
+
+        OMP1 = OMEGAP_D(B,SIG1,SLOPE,ALPHA)
+        OMP2 = OMEGAP_D(B,SIG2,SLOPE,ALPHA)
+        OMP12 = OMEGAP_D(B,SIG12,SLOPE,ALPHA)
+
+        OM1 = (1.D0 - 2.D0*GS1 + OMS1)**4
+     &      * (1.D0 - 2.D0*GP1 + OMP1)**(A-4.D0)
+        OM2 = (1.D0 - 2.D0*GS2 + OMS2)**4
+     &      * (1.D0 - 2.D0*GP2 + OMP2)**(A-4.D0)
+        OM12 = (1.D0 - GS1*DCMPLX(1.D0,ALPHA)-GS2*DCMPLX(1.D0,-ALPHA)
+     &               + OMS12)**4
+     &       * (1.D0 - GP1*DCMPLX(1.D0,ALPHA)-GP2*DCMPLX(1.D0,-ALPHA)
+     &               + OMP12)**(A-4.D0)
+        SUM2 = SUM2 + (1.D0-2.D0*XZ + (OM1+OM2)/4.D0
+     &                 + DREAL(OM12)/2.D0)*B
+        SUM4 = SUM4 + ((OM1+OM2)/4.D0
+     &                 - DREAL(OM12)/2.D0)*B
+
+      ENDDO
+
+      SIGT =   SUM0 * DB * 4.D0*PI * CMBARN
+      SIGEL =  SUM1 * DB * TWOPI * CMBARN
+      SIGQEL = SUM2 * DB * TWOPI * CMBARN
+      SIGSD =  SUM3 * DB * TWOPI * CMBARN
+      SIGQSD = SUM4 * DB * TWOPI * CMBARN
+      END
+
+C=======================================================================
+
+      FUNCTION GLAUBGS_D (B,SLOPE, SIG)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CA0SH/ A0, A02
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      GAMMA2 = A02/4.D0 + 0.5D0*SLOPE
+      ARG = B**2/(4.D0*GAMMA2)
+      GLAUBGS_D = SIG/(8.D0*PI*GAMMA2) * EXP(-ARG)
+      RETURN
+      END
+
+C=======================================================================
+
+      FUNCTION GLAUBGP_D (B,SLOPE, SIG)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CA0SH/ A0, A02
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      GAMMA2 = A02/4.D0 + 0.5D0*SLOPE
+      ARG = B**2/(4.D0*GAMMA2)
+      C1 = 1.D0- A02/(6.D0*GAMMA2)*(1.D0-ARG)
+      GLAUBGP_D = SIG/(8.D0*PI*GAMMA2) *  C1 * EXP(-ARG)
+      RETURN
+      END
+
+C=======================================================================
+
+      FUNCTION OMEGAS_D (B, SIG, SLOPE, RHO)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CA0SH/ A0, A02
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      ETA2 = 0.25D0*(A02 + SLOPE)
+      F02 = SIG*SIG*(1.D0+RHO*RHO)/(16.D0*PI**2)
+      ARG = -B*B/(4.D0*ETA2)
+      OMEGAS_D = F02/(4.D0*ETA2*SLOPE) *EXP(ARG)
+      RETURN
+      END
+
+C=======================================================================
+
+      FUNCTION OMEGAP_D (B, SIG, SLOPE, RHO)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /CA0SH/ A0, A02
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+      ETA2 = 0.25D0*(A02 + SLOPE)
+      F02 = SIG*SIG*(1.D0+RHO*RHO)/(16.D0*PI**2)
+      ARG = -B*B/(4.D0*ETA2)
+      OMEGAP_D=F02/(4.D0*ETA2*SLOPE)*(1.D0-A02/(6.D0*ETA2)*(1.D0+ARG))
+     $                                         *EXP(ARG)
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE REMOVE_PI0(XRATE,N1,N2)
+
+C-----------------------------------------------------------------------
+C     routine to exchange pi0 on stack with charged pions
+C     violating charge conservation.
+C     final pions will be off-shell
+C      
+C     Input: exchange rate and stack positions inbetween
+C     which pions shall be exchanged.
+C     
+C---------------------------------------------------------     
+      IMPLICIT NONE
+c     Commons
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+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
+C     external types
+      DOUBLE PRECISION XRATE
+      INTEGER N1,N2
+C     internals
+      INTEGER I,LL,LA,IFPI0
+      DOUBLE PRECISION S_RNDM
+      SAVE
+
+      IF(NDEBUG.gt.0)write(lun,*)
+     &               ' REMOVE_PI0: Rate,Mode:',xrate,IPAR(50)
+C     select exchange model      
+      IF(IPAR(50).eq.1)THEN
+C     stack loop     
+         DO I=N1,N2
+            LL = MOD(LLIST(I),10000)
+            LA = IABS(LL)
+c     IF(LA.eq.6)THEN
+            IFPI0=(1-MIN(IABS(1-LA/6),1))*MAX(1-MOD(LA,6),0)
+c     replace with pi+ or pi-
+            LL=LL+IFPI0*(2-INT(MIN((2.D0+XRATE)*S_RNDM(LA),
+     &                                                 3.D0-EPS10)))
+            LLIST(I) = LL
+            IF(NDEBUG.gt.1)
+     &           WRITE(LUN,*) ' REMOVE_PI0: LA,IFPI0,LNEW:',LA,IFPI0,LL
+         ENDDO
+      ENDIF         
+      END
+C=======================================================================
+
+      SUBROUTINE SAMPLE_SEA_INDV(KRMNT,XMINA,XMINA_SEA,NSEA,
+     &     XREM0,ALPHA,ASUP,XQMASS,XMAX,XX,IREJ)
+
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+
+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
+      INTEGER ITRY, NREJ
+      COMMON /S_CNT/ ITRY(20), NREJ(20)
+
+      DOUBLE PRECISION XMINA,XMINA_SEA,XREM0,ALPHA,ASUP,XQMASS,XMAX
+      INTEGER NSEA,KRMNT
+      DOUBLE PRECISION XX
+      DIMENSION XX(2*NW_max+2)
+      INTEGER IREJ
+
+      DOUBLE PRECISION XREM,XKIN,X1,X2,pt,S_RNDM,XQM
+      INTEGER ICNT2,J,jj1,jj2
+      SAVE
+      DATA ICNT2 /0/
+      
+      IF(ndebug.gt.2)
+     &    write(lun,*)' SAMPLE_SEA_INDV: called with ',
+     &     '(KRMNT,XMINA,XMINA_SEA,NSEA,XREM0,ALPHA,ASUP,XQMASS,XMAX):',
+     &     KRMNT,XMINA,XMINA_SEA,NSEA,XREM0,ALPHA,ASUP,XQMASS,XMAX
+      XREM = 0.D0
+      XKIN = 0.1D0
+      XQM = XQMASS
+      ITRY(4) = 0
+      DO WHILE ( XREM .lt. XMINA )
+         XREM = XREM0
+         IF ( XREM .LT. 2.D0*XMINA + Nsea*XMINA_SEA
+     &        +XKIN*(1.5D0-S_RNDM(ICNT2)) ) THEN
+            IREJ = 2            ! resample event
+            RETURN
+         ENDIF
+         IF(ITRY(4).gt.Nsea/2*NREJ(4))THEN
+            ICNT2 = ICNT2 + 1
+            IF(ndebug.gt.2)THEN
+               IF(ICNT2.le.5)THEN
+                  write(lun,*)' SAMPLE_SEA_INDV: rejection!' 
+                  write(lun,*)' reached max. no. of trials!', NREJ(4)
+                  write(lun,*)' XREM0,N,XMIN:' ,XREM0,Nsea,XMINA_SEA
+               ENDIF
+               IF(ICNT2.eq.5) 
+     &              write(lun,*)' last warning of this type..'
+            ENDIF
+            IREJ = IPAR(51)
+            RETURN
+         ENDIF
+         DO j=1,Nsea/2
+c     scale for interactions other than first if Nw>1
+            IF(IPAR(75).eq.1.and.J.gt.1) XQM = XQM*PAR(118)
+            CALL SAMPLE_SEA(ALPHA,ASUP,XQM,XMAX,x1,x2,pt)
+            jj1 = 2 + 2*(j-1) + 1
+            IF(KRMNT.eq.0) jj1 = 4+2*(j-1) + 1
+            jj2 = jj1 + 1
+            XX(jj1) = x1
+            XX(jj2) = x2
+            XREM = XREM - XX(jj1) - XX(jj2)
+            IF(NDEBUG.gt.2) 
+     &           WRITE(LUN,*) '  x-frac: JW,X3,X4,XREM',
+     &           J,XX(jj1),XX(jj2),XREM
+         ENDDO
+         ITRY(4) = ITRY(4) + 1
+         IF(NDEBUG.gt.1) WRITE(LUN,*) 
+     &        ' SAMPLE_SEA_INDV: ISMPL,XREM0,XREM,XMINA,XMINSEA',
+     &        ITRY(4),XREM0,XREM,XMINA,XMINA_SEA
+      ENDDO
+      XREM0 = XREM
+      IREJ = 0
+      END
+C=======================================================================
+
+      SUBROUTINE FORCE_VECTORS(XRATE,N1,N2)
+
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+
+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
+
+c     external types
+      double precision xrate
+      integer n1,n2
+
+c     internal types
+      integer ipi2vec,lcon,lreschex,ll,la,la_new,i,j,kba
+      DIMENSION IPI2VEC(99)
+      double precision pz2,xmts,xf,xfs,S_RNDM!,pts
+      
+      DIMENSION LCON(6:43),LRESCHEX(6:39)
+      INTEGER IFIRST
+      SAVE
+c     charge exchange map, i.e. pip -> pi0 ...
+      DATA LCON /7,6,6,22,21,9,9,14,13,4*0,20,19,10,9,23,24,27,27,25,
+     &     31,30,29,28,32,33,35,34,35,38,37,39,41,42,41,42/
+c     charge and spin exchange map, i.e. pip -> rho0
+c     approximate, proton and neutron should go to N(1520) not Delta
+      DATA LRESCHEX /26,27,27,31,30,9,9,42,41,19*0,45,44,45,48,47,39/ 
+      DATA IFIRST /0/
+
+      if(ifirst.eq.0)then
+         print *,'initializing..'
+         do j=1,99
+            IPI2VEC(J) = J
+         enddo
+         IPI2VEC(6) = 27      ! pi(0) ---> rho(0)
+         IPI2VEC(7) = 25      ! pi+   ---> rho+
+         IPI2VEC(8) = 26      ! pi-   ---> rho-
+         ifirst = 1
+      endif
+
+      KBA = IABS(KB)
+      
+      IF(IPAR(45).eq.1)THEN
+c     trivial exchange model      
+         do I=N1,N2
+c     replace pions with vector mesons
+            LL = mod(llist(I),10000)
+            LA = abs(LL)
+            IF(S_RNDM(I).lt.xrate)then
+c     put back on mass shell
+               la_new = IPI2VEC(LA)
+               xmts = p(i,1)**2 + p(i,2)**2 + am2(la_new)
+               pz2 = p(i,4)**2 - xmts
+               if(pz2.gt.EPS8)then
+                  p(i,3) = sign(sqrt(pz2),p(i,3))
+                  p(i,5) = am(la_new)
+                  LLIST(I) = ISIGN(la_new,ll)
+               endif
+            endif
+         enddo
+
+      ELSEIF(IPAR(45).eq.2)THEN
+c     large xf only, neutral pions only
+         do I=N1,N2
+            LL = mod(llist(I),10000)
+            LA = abs(LL)
+            IF(LA.eq.6)then
+               xf = 2.D0*p(i,3)/SQS
+               IF(S_RNDM(I).lt.xrate*xf)then
+c     exhcange and put back on mass shell
+                  la_new = IPI2VEC(la)
+                  xmts = p(i,1)**2 + p(i,2)**2 + am2(la_new)
+                  pz2 = p(i,4)**2 - xmts
+                  if(pz2.gt.EPS8)then
+                     p(i,3) = sign(dsqrt(pz2),p(i,3))
+                     p(i,5) = am(la_new)
+                     LLIST(I) = ISIGN(la_new,ll)
+                  endif
+               endif
+            endif
+         enddo
+
+      ELSEIF(IPAR(45).eq.3)THEN
+c     large xf only, charge and spin exchange
+         do I=N1,N2
+            LL = mod(llist(I),10000)
+            LA = abs(LL)
+            IF(ll.eq.LCON(KBA))then
+               xf = 2.D0*p(i,3)/sqs
+               IF(S_RNDM(I).lt.xrate*xf)then
+c     replace charge exchange product of beam with
+c     charge and spin exchange product, i.e.
+c     pip-beam -> rho0 instead of pip-beam -> pi0
+c     so replace pi0 with rho0 in final state
+                  la_new = LRESCHEX(KBA)
+c     put back on mass shell
+                  xmts = p(i,1)**2 + p(i,2)**2 + am2(la_new)
+                  pz2 = p(i,4)**2 - xmts
+                  if(pz2.gt.EPS8)then
+                     p(i,3) = sign(dsqrt(pz2),p(i,3))
+                     p(i,5) = am(la_new)
+                     LLIST(I) = ISIGN(la_new,ll)
+                  endif
+               endif
+            endif
+         enddo
+         
+      ELSEIF(IPAR(45).eq.4)THEN
+c     large xf only, charge and spin exchange
+         do I=N1,N2
+            LL = mod(llist(I),10000)
+            LA = abs(ll)
+            IF(LL.eq.LCON(KBA))then
+               xf = 2.D0*p(i,3)/sqs
+               xfs = xf ** 2
+               IF(S_RNDM(I).lt.xrate*xfs)then
+c     replace charge exchange product of beam with
+c     charge and spin exchange product, i.e.
+c     pip-beam -> rho0 instead of pip-beam -> pi0
+c     so replace pi0 with rho0 in final state
+                  la_new = LRESCHEX(KBA)
+c     put back on mass shell
+                  xmts = p(i,1)**2 + p(i,2)**2 + am2(la_new)
+                  pz2 = p(i,4)**2 - xmts
+                  if(pz2.gt.EPS8)then
+                     p(i,3) = sign(dsqrt(pz2),p(i,3))
+                     p(i,5) = am(la_new)
+                     LLIST(I) = ISIGN(la_new,ll)
+                  endif
+               endif
+            endif
+         enddo
+      ENDIF
+      if(ndebug.ge.5) CALL SIB_LIST(6)
+      END
+C=======================================================================
+
+      SUBROUTINE SAMPLE_BEAM(KID,NW,XCHG,KRMNT,XJET,IREJ)
+
+C-----------------------------------------------------------------------
+C...Subroutine to sample valence and sea quark kinematics
+C.    fills IFL?,X? and PX?,PY?
+C.    1,2 are valence quarks, 3,4 are additional sea quarks
+C.    transverse momentum is shared between the val. and sea pairs
+C.    X and flv are exchanged occasionally
+C-------------------------------------------------------------------      
+      IMPLICIT NONE
+
+      DOUBLE PRECISION XCHG,XJET
+      INTEGER KID,NW,KRMNT,IREJ
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+
+      INTEGER IBMRDX,ITGRDX,IHMJDX,ISMJDX,ICSTDX,IINTDX
+      COMMON /S_INDX/ IBMRDX(3),ITGRDX(NW_max,3),
+     &     IHMJDX(NW_max*NH_max),IINTDX(NW_max),
+     &     ISMJDX(NW_max*NS_max),ICSTDX(2*NW_max,3)
+
+      INTEGER IRMNT,KRB,KRT
+      DOUBLE PRECISION XRMASS,XRMEX
+      COMMON /S_RMNT/ XRMASS(2),XRMEX(2),IRMNT(NW_max),KRB,KRT(NW_max)
+
+      DOUBLE PRECISION X1,PXB,PYB
+      DIMENSION X1(2*NW_max+2),PXB(2*NW_max+2),PYB(2*NW_max+2)
+      INTEGER IFLB,KID1,J,J1,J2,J3,J4,Iref1,Iref,Idm
+      DIMENSION IFLB(2*NW_max+2)
+
+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
+
+c     default rejection
+c     options are: 1: resample minijets (Xjet)..
+c                  2: resample non-diff event (Ns,Nh)..
+c                  3: resample event (Nw,diff,ndiff)..
+      IREJ = 1
+
+      IF(ndebug.gt.2) 
+     +     WRITE(LUN,*)
+     +     ' SAMPLE_BEAM: KID,NW,XCHG,KRMNT,XJET,IREJ',
+     +     KID,NW,XCHG,KRMNT,XJET,IREJ
+
+      CALL SAMPLE_PROJECTILE
+     +     (KID,NW,KRMNT,XCHG,XJET,X1,PXB,PYB,IFLB,KID1,IREJ)    
+      IF(IREJ.ne.0) RETURN
+
+c     set remnant id to beam
+c     will be changed if flavor is exchanged between central strings and remnant
+      KRB = KID1        
+
+C..   write beam partons to stack
+c     order is: val1, val2, q, qbar etc
+      IF(KRMNT.ne.0)THEN
+         j1 = 1
+         j2 = 2
+c     add proto-remnant (still massless)
+         CALL ADD_PRTN(PXB(J1)+PXB(J2),PYB(J1)+PYB(J2),
+     &        0.5D0*SQS*(X1(J1)+X1(J2)),
+     &        0.5D0*SQS*(X1(J1)+X1(J2)),0.D0,2,0,0,Iref1)
+         IBMRDX(1) = Iref1
+c     beam remnant always associated with first interaction
+         CALL ADD_INT_REF(Iref1,IINTDX(1))
+c     add quarks designated for remnant
+         IF(KID.lt.0)THEN
+c     if beam is antibaryon then hspli puts diq into 1st flv
+c     need to switch to fit call to string frag routine 
+c     such that diq is along +z
+            CALL ISWTCH_LMNTS(IFLB(j1),IFLB(j2))
+         ENDIF
+         CALL ADD_PRTN(PXB(J1),PYB(J1),0.5D0*SQS*X1(J1),
+     &        0.5D0*SQS*X1(J1),0.D0,IFLB(J1),1,Iref1,Iref)
+         IBMRDX(2) = Iref
+         CALL ADD_PRTN(PXB(J2),PYB(J2),0.5D0*SQS*X1(J2),
+     &        0.5D0*SQS*X1(J2),0.D0,IFLB(J2),1,Idm,Iref)
+         IBMRDX(3) = Iref
+      ENDIF
+      DO j=1,NW
+         j3 = 3+(j-1)*2
+         j4 = j3+1
+c     add sea quarks
+         CALL ADD_PRTN(PXB(J3),PYB(J3),0.5D0*SQS*X1(J3),
+     &        0.5D0*SQS*X1(J3),0.D0,IFLB(J3),1,0,Iref)
+         ICSTDX(2*(J-1)+1,2) = Iref
+         CALL ADD_PRTN(PXB(J4),PYB(J4),0.5D0*SQS*X1(J4),
+     &        0.5D0*SQS*X1(J4),0.D0,IFLB(J4),1,0,Iref)
+         ICSTDX(2*(J-1)+2,2) = Iref
+c     add parton index to cache
+      ENDDO
+      IF(NDEBUG.GT.3) CALL PRNT_PRTN_STCK
+
+      IREJ = 0
+
+      END
+C=======================================================================
+
+      SUBROUTINE FRAG_INCHRNT_DIFF(IDX,LBAD)
+
+C-----------------------------------------------------------------------
+C     routine that fragments a diffractive system               \FR'15
+C
+C     INPUT: IDX : parton stack index of 4momentum
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+      INTEGER IDX,LBAD
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+
+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
+
+      DOUBLE PRECISION PST,PDIFF,GABE,P2,EE,P1TOT
+      DIMENSION PST(5),PDIFF(5),GABE(4),P2(4)
+      INTEGER IDIFF1,IDIFF,IPID,L0,JDIFF,NOLD,LXBAD,K,II
+      SAVE
+
+      LBAD = 2
+
+c     references are diff --> diff.hadron --> bm-partons --> tg-partons
+c     only diff and diff. hadron are read out
+c     read diff 4momentum from stack
+      CALL RD_PRTN_4VEC(IDX,PST,IPID,IDIFF1)
+      CALL RD_PRTN_4VEC(IDIFF1,PDIFF,L0,IDIFF)
+      
+C     kinematic variables
+      EE = PDIFF(5)             ! center of mass energy in diff. system
+      
+c     set diffraction code of system (1:beam,2:target,3:double)
+      JDIFF = ABS(IPID)/10
+
+      IF(NDEBUG.gt.1) WRITE(LUN,*)' FRAG_INCHRNT_DIFF: IDX,EE,L0',
+     &     IDX,EE,L0
+
+      IPFLAG = -1
+
+      NOLD = NP
+
+c     diffractive interaction in center-of-mass system of (sea,rmnt)-nuc
+      CALL SIB_DIFF(L0,JDIFF,EE,0,LXBAD)
+      IF(LXBAD.ne.0) THEN
+         IF(NDEBUG.gt.1) 
+     &        WRITE(LUN,*)' FRAG_INCHRNT_DIFF: fragmentation rejection' 
+         RETURN
+      ENDIF
+      IF(NDEBUG.gt.1) 
+     &     WRITE(LUN,*)' FRAG_INCHRNT_DIFF: particles before/after :',
+     &     NOLD,NP
+
+c     boost to hadron - hadron center-of-mass
+      do ii=1,4
+         gabe(ii) = PDIFF(ii)/PDIFF(5)
+      enddo
+      DO K=NOLD+1,NP
+         CALL SIB_ALTRA(gabe(4),gabe(1),gabe(2),
+     &        gabe(3),P(k,1),p(k,2),p(k,3),p(k,4),
+     &        P1TOT,p2(1),p2(2),p2(3),p2(4))
+         do ii=1,4
+            P(K,ii)=P2(ii)
+         enddo
+      ENDDO
+
+      LBAD = 0
+      END
+C=======================================================================
+
+      SUBROUTINE SAMPLE_MINIJET
+     &     (L,NW,NNJET,NNSOF,NJET,NSOF,X1JET,X2JET,LBAD)
+
+C-----------------------------------------------------------------------
+C     routine to sample minijets
+C     INPUT: L - hadron type (1:nucleon,2:pion or 3:kaon)
+C            NW - number of hadron-nucleon interactions
+C            NNJET(1:NW) - number of hard interactions per nucleon
+C            NNSOF(1:NW) - number of soft interactions per nucleon
+C     OUTPUT: X1JET - momentum fraction of beam in minijets
+C             X2JET(1:NW) - momentum fraction of target in minijets
+C     
+C     in addition minijets are added to parton stack
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+      
+c     external types
+      INTEGER L,NW,NNJET,NNSOF,NJET,NSOF,LBAD
+      DOUBLE PRECISION X1JET,X2JET
+      
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      INTEGER IBMRDX,ITGRDX,IHMJDX,ISMJDX,ICSTDX,IINTDX
+      COMMON /S_INDX/ IBMRDX(3),ITGRDX(NW_max,3),
+     &     IHMJDX(NW_max*NH_max),IINTDX(NW_max),
+     &     ISMJDX(NW_max*NS_max),ICSTDX(2*NW_max,3)
+      DIMENSION NNSOF(NW_max),NNJET(NW_max),X2JET(NW_max)
+
+c     internal types
+      INTEGER NALL,JW,JJ,IREF,IREFG1,IREFG2,NSOF_JW,II
+      DOUBLE PRECISION X1JJ,X2JJ,PTJET,FI,S_RNDM,SQSHALF,XM,
+     &     X1S,X2S,PTSOF,PZ,EN     
+
+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
+
+      if(Ndebug.gt.1) WRITE(LUN,*)
+     &     ' SAMPLE_MINIJETS: (L,NW,NNJET,NNSOF):',
+     &     L,NW,(NNJET(ii),ii=1,nw),(NNSOF(ii),ii=1,nw)
+
+      IF(L.eq.0) THEN
+         WRITE(LUN,*) 'SAMPLE_minijets: unknown particle? L=',L
+         CALL SIB_REJECT('SAMPLE_minijets ')
+      ENDIF
+      
+      NJET = 0
+      NSOF = 0
+      Nall = 0
+      X1JET = 0.D0
+      DO JW=1,NW
+C...hard sea-sea interactions
+         X2JET(JW) = 0.D0
+         DO JJ=1,NNJET(JW)
+           Nall = Nall+1
+           NJET = NJET+1
+           CALL SAMPLE_HARD (L,X1Jj,X2Jj,PTJET)
+           X1JET = X1JET + X1Jj           
+           X2JET(JW) = X2JET(JW)+X2Jj
+           if(Ndebug.gt.2) THEN
+              WRITE(LUN,*)
+     &             ' SAMPLE_MINIJETS: hard JJ,JW,X1JET,X2JET(JW):',
+     &             JJ,JW,X1JET,X2JET(JW)
+              WRITE(LUN,*)
+     &             '  X1,X2,PT:',X1JJ,X2JJ,PTJET
+           ENDIF
+           IF ((X2JET(JW).GT.0.9D0).OR.(X1JET.GT.0.9D0)) then
+              if(Ndebug.gt.2) WRITE(LUN,*)
+     &        ' SAMPLE_MINIJETS: not enough phase space',
+     &             ' (Ncall,Njet,lbad):',Ncall,Njet,lBAD
+              return
+           ENDIF
+           FI = TWOPI*S_RNDM(JJ)
+           XM = SQS*sqrt(X1jj*X2jj)
+           SQSHALF = 0.5D0*SQS
+c           TH = ASIN(MIN((1.D0-EPS8),2.D0*PTJET/XM))
+c     add gluon-gluon string to stack
+           CALL ADD_PRTN
+     &          (0.D0,0.D0,SQSHALF*(X1jj-X2jj),SQSHALF*(X1jj+X2jj),
+     &          XM,100,0,0,Iref)
+           CALL ADD_INT_REF(Iref,IINTDX(JW))
+c     add gluon-gluon system to hard minijet index
+           IHMJDX(NJET) = Iref
+c     add gluons to stack
+           CALL ADD_PRTN(PTJET*COS(FI),PTJET*SIN(FI),
+     &          SQSHALF*X1jj,SQSHALF*X1jj,0.D0,0,1,0,Irefg1)
+           CALL ADD_PRTN(-PTJET*COS(FI),-PTJET*SIN(FI),
+     &          -SQSHALF*X2jj,SQSHALF*X2jj,0.D0,0,1,Iref,Irefg2)
+c     set up references
+c     minijet --> gluon1 --> gluon2 --> minijet
+           CALL ADD_REF(Irefg1,Irefg2)
+           CALL ADD_REF(Iref,Irefg1)
+
+         ENDDO
+
+C...soft sea-sea interactions 
+         NSOF_JW = 0
+         DO JJ=1,NNSOF(JW)-1
+c     different soft distributions
+            CALL SAMPLE_SOFT6 (STR_mass_sea,X1S,X2S,PTSOF)
+            IF ((X2JET(JW)+X2S.LT.0.9D0).AND.(X1JET+X1S.LT.0.9D0)) THEN
+               NSOF = NSOF+1
+               Nall = Nall+1
+               NSOF_JW = NSOF_JW+1
+               X1JET = X1JET + X1S
+               X2JET(JW) = X2JET(JW)+X2S
+c     add to stack
+c     add gluon-gluon string to stack
+               XM = SQS*SQRT(X1S*X2S)
+               SQSHALF = 0.5D0*SQS
+               PZ = SQSHALF*(X1S-X2S)
+               EN = SQSHALF*(X1S+X2S)
+               FI = TWOPI*S_RNDM(JJ)
+               CALL ADD_PRTN(0.D0,0.D0,PZ,EN,XM,10,0,0,Iref)
+               CALL ADD_INT_REF(Iref,IINTDX(JW))
+c     add gluons to stack
+c     add gluon-gluon system to soft minijet index
+               ISMJDX(NSOF) = Iref                              
+               CALL ADD_PRTN(PTSOF*COS(FI),PTSOF*SIN(FI),
+     &              SQSHALF*X1S,SQSHALF*X1S,0.D0,0,1,0,Irefg1)
+               CALL ADD_PRTN(-PTSOF*COS(FI),-PTSOF*SIN(FI),
+     &              -SQSHALF*X2S,SQSHALF*X2S,0.D0,0,1,Iref,Irefg2)
+c     set up references
+c     minijet --> gluon1 --> gluon2 --> minijet
+               CALL ADD_REF(Irefg1,Irefg2)
+               CALL ADD_REF(Iref,Irefg1)
+               IF(Ndebug.gt.2)THEN
+                  WRITE(LUN,*)
+     &                 ' SAMPLE_MINIJETS: soft JJ,JW,X1JET,X2JET(JW):',
+     &                 JJ,JW,X1JET,X2JET(JW)
+                  WRITE(LUN,*)
+     &                 '  X1,X2,PT:',X1s,X2s,PTSOF
+               ENDIF
+            ELSE
+               IF(Ndebug.gt.1) WRITE(LUN,*)
+     &        ' SAMPLE_MINIJETS: not enough phase space',
+     &             ' (Ncall,Nsof,lbad):',Ncall,Njet,lBAD
+               RETURN
+            ENDIF
+         ENDDO
+         NNSOF(JW) = NSOF_JW+1
+      ENDDO
+      lbad = 0
+
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_SIGMA_EXT
+     &     (L0,SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO)
+
+C-----------------------------------------------------------------------
+C     Hadron-proton cross sections
+C     taken from EXTERNAL(!) interpolation table (calculated elsewhere)
+C     can be used to run NUCLIB with alternative cross section/int.length
+C
+C     input:       L     1,2,3      proton-,pion-,kaon-proton
+C                  SQS   sqrt(s)
+C
+C     output:      SIGT       total cross section (mb)
+C                  SIGEL      elastic cross section (mb)
+C                  SIGINEL    inelastic cross section (mb)
+C                  SLOPE      elastic slope parameter (GeV^-2)
+C                  RHO        real/imaginary part of forward amplitude
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+c     external types
+      DOUBLE PRECISION SQS,SIGT,SIGEL,SIGINEL,SLOPE,RHO
+      INTEGER L0
+
+      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
+
+c     external cross section tables
+C     cross sections in model: 23rc1_sib23
+      INTEGER K
+      DOUBLE PRECISION SSIG_TOT(61,3)
+      DOUBLE PRECISION SSIG(61,3)
+      DOUBLE PRECISION SSIG_B(61,3)
+      DOUBLE PRECISION SSIG_RHO(61,3)
+c     internal type declarations
+      DOUBLE PRECISION T,AL,ASQSMIN,ASQSMAX,DASQS
+      INTEGER LL,L,J1,NSQS
+      DIMENSION LL(39)
+      SAVE
+C     proton-proton:
+C     total cross section
+      DATA (SSIG_TOT(K,1),K=    1,   61) /
+     &3.8328D+01,3.8267D+01,3.8435D+01,3.8838D+01,3.9463D+01,
+     &4.0288D+01,4.1277D+01,4.2391D+01,4.3586D+01,4.4918D+01,
+     &4.6354D+01,4.7836D+01,4.9394D+01,5.1050D+01,5.2835D+01,
+     &5.4789D+01,5.6957D+01,5.9392D+01,6.2151D+01,6.5294D+01,
+     &6.8883D+01,7.2529D+01,7.6458D+01,8.0673D+01,8.5172D+01,
+     &8.9955D+01,9.5017D+01,1.0035D+02,1.0595D+02,1.1181D+02,
+     &1.1790D+02,1.2423D+02,1.3077D+02,1.3751D+02,1.4444D+02,
+     &1.5156D+02,1.5885D+02,1.6631D+02,1.7392D+02,1.8169D+02,
+     &1.8960D+02,1.9766D+02,2.0584D+02,2.1416D+02,2.2260D+02,
+     &2.3115D+02,2.3982D+02,2.4860D+02,2.5749D+02,2.6648D+02,
+     &2.7556D+02,2.8475D+02,2.9403D+02,3.0340D+02,3.1287D+02,
+     &3.2242D+02,3.3206D+02,3.4179D+02,3.5159D+02,3.6149D+02,
+     &3.7146D+02/
+C     inel. cross section
+      DATA (SSIG(K,1),K=    1,   61) /
+     &3.0881D+01,3.1156D+01,3.1540D+01,3.2046D+01,3.2673D+01,
+     &3.3410D+01,3.4236D+01,3.5126D+01,3.6050D+01,3.7062D+01,
+     &3.8139D+01,3.9280D+01,4.0476D+01,4.1740D+01,4.3092D+01,
+     &4.4556D+01,4.6161D+01,4.7937D+01,4.9918D+01,5.2137D+01,
+     &5.4629D+01,5.7057D+01,5.9635D+01,6.2361D+01,6.5230D+01,
+     &6.8236D+01,7.1376D+01,7.4643D+01,7.8029D+01,8.1529D+01,
+     &8.5138D+01,8.8847D+01,9.2654D+01,9.6552D+01,1.0054D+02,
+     &1.0461D+02,1.0875D+02,1.1298D+02,1.1727D+02,1.2164D+02,
+     &1.2607D+02,1.3057D+02,1.3512D+02,1.3974D+02,1.4441D+02,
+     &1.4914D+02,1.5393D+02,1.5877D+02,1.6365D+02,1.6859D+02,
+     &1.7357D+02,1.7860D+02,1.8368D+02,1.8880D+02,1.9397D+02,
+     &1.9918D+02,2.0443D+02,2.0972D+02,2.1505D+02,2.2042D+02,
+     &2.2583D+02/
+C     slope parameter
+      DATA (SSIG_B(K,1),K=    1,   61) /
+     &1.0828D+01,1.1096D+01,1.1363D+01,1.1629D+01,1.1894D+01,
+     &1.2159D+01,1.2424D+01,1.2688D+01,1.2953D+01,1.3217D+01,
+     &1.3482D+01,1.3728D+01,1.3980D+01,1.4237D+01,1.4500D+01,
+     &1.4770D+01,1.5047D+01,1.5333D+01,1.5632D+01,1.5945D+01,
+     &1.6278D+01,1.6613D+01,1.6961D+01,1.7324D+01,1.7703D+01,
+     &1.8100D+01,1.8515D+01,1.8949D+01,1.9404D+01,1.9880D+01,
+     &2.0378D+01,2.0899D+01,2.1443D+01,2.2010D+01,2.2600D+01,
+     &2.3212D+01,2.3845D+01,2.4499D+01,2.5173D+01,2.5867D+01,
+     &2.6579D+01,2.7309D+01,2.8055D+01,2.8819D+01,2.9599D+01,
+     &3.0394D+01,3.1205D+01,3.2031D+01,3.2870D+01,3.3724D+01,
+     &3.4590D+01,3.5470D+01,3.6362D+01,3.7266D+01,3.8181D+01,
+     &3.9109D+01,4.0047D+01,4.0995D+01,4.1955D+01,4.2924D+01,
+     &4.3903D+01/
+C     
+      DATA (SSIG_RHO(K,1),K=    1,   61) /
+     &-1.8490D-01,-1.2654D-01,-7.7648D-02,-3.7250D-02,-4.2495D-03,
+     &2.2457D-02,4.3908D-02,6.1032D-02,7.4637D-02,8.5403D-02,
+     &9.3897D-02,1.0058D-01,1.0583D-01,1.0995D-01,1.1318D-01,
+     &1.1571D-01,1.1768D-01,1.1923D-01,1.2044D-01,1.2138D-01,
+     &1.2212D-01,1.2269D-01,1.2314D-01,1.2349D-01,1.2376D-01,
+     &1.2398D-01,1.2414D-01,1.2427D-01,1.2437D-01,1.2445D-01,
+     &1.2451D-01,1.2456D-01,1.2460D-01,1.2463D-01,1.2465D-01,
+     &1.2467D-01,1.2468D-01,1.2470D-01,1.2470D-01,1.2471D-01,
+     &1.2472D-01,1.2472D-01,1.2472D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01/
+C     pion-proton:
+C     total cross section
+      DATA (SSIG_TOT(K,2),K=    1,   61) /
+     &2.3119D+01,2.3225D+01,2.3487D+01,2.3867D+01,2.4328D+01,
+     &2.4886D+01,2.5529D+01,2.6249D+01,2.7038D+01,2.7890D+01,
+     &2.8802D+01,2.9725D+01,3.0766D+01,3.1961D+01,3.3355D+01,
+     &3.4994D+01,3.6931D+01,3.9223D+01,4.1928D+01,4.5104D+01,
+     &4.8811D+01,5.2129D+01,5.5692D+01,5.9498D+01,6.3545D+01,
+     &6.7832D+01,7.2350D+01,7.7094D+01,8.2059D+01,8.7235D+01,
+     &9.2612D+01,9.8183D+01,1.0394D+02,1.0987D+02,1.1596D+02,
+     &1.2221D+02,1.2862D+02,1.3518D+02,1.4188D+02,1.4871D+02,
+     &1.5568D+02,1.6278D+02,1.7001D+02,1.7735D+02,1.8481D+02,
+     &1.9239D+02,2.0008D+02,2.0788D+02,2.1578D+02,2.2378D+02,
+     &2.3189D+02,2.4009D+02,2.4839D+02,2.5679D+02,2.6528D+02,
+     &2.7386D+02,2.8253D+02,2.9129D+02,3.0014D+02,3.0908D+02,
+     &3.1810D+02/
+C     inel. cross section
+      DATA (SSIG(K,2),K=    1,   61) /
+     &1.9941D+01,2.0212D+01,2.0566D+01,2.0995D+01,2.1492D+01,
+     &2.1955D+01,2.2477D+01,2.3056D+01,2.3685D+01,2.4360D+01,
+     &2.5076D+01,2.5721D+01,2.6455D+01,2.7304D+01,2.8298D+01,
+     &2.9466D+01,3.0844D+01,3.2465D+01,3.4364D+01,3.6574D+01,
+     &3.9128D+01,4.1429D+01,4.3864D+01,4.6428D+01,4.9117D+01,
+     &5.1926D+01,5.4847D+01,5.7875D+01,6.1006D+01,6.4233D+01,
+     &6.7551D+01,7.0956D+01,7.4444D+01,7.8010D+01,8.1651D+01,
+     &8.5363D+01,8.9145D+01,9.2994D+01,9.6906D+01,1.0088D+02,
+     &1.0491D+02,1.0901D+02,1.1315D+02,1.1736D+02,1.2161D+02,
+     &1.2592D+02,1.3028D+02,1.3469D+02,1.3915D+02,1.4366D+02,
+     &1.4821D+02,1.5281D+02,1.5746D+02,1.6215D+02,1.6688D+02,
+     &1.7166D+02,1.7648D+02,1.8134D+02,1.8625D+02,1.9119D+02,
+     &1.9618D+02/
+C     slope parameter
+      DATA (SSIG_B(K,2),K=    1,   61) /
+     &1.0120D+01,1.0270D+01,1.0416D+01,1.0559D+01,1.0698D+01,
+     &1.0836D+01,1.0971D+01,1.1105D+01,1.1238D+01,1.1371D+01,
+     &1.1502D+01,1.1435D+01,1.1392D+01,1.1377D+01,1.1395D+01,
+     &1.1452D+01,1.1549D+01,1.1690D+01,1.1878D+01,1.2118D+01,
+     &1.2413D+01,1.2781D+01,1.3163D+01,1.3558D+01,1.3967D+01,
+     &1.4391D+01,1.4829D+01,1.5282D+01,1.5751D+01,1.6236D+01,
+     &1.6738D+01,1.7256D+01,1.7791D+01,1.8343D+01,1.8912D+01,
+     &1.9498D+01,2.0100D+01,2.0718D+01,2.1351D+01,2.1999D+01,
+     &2.2661D+01,2.3338D+01,2.4029D+01,2.4733D+01,2.5451D+01,
+     &2.6182D+01,2.6926D+01,2.7682D+01,2.8450D+01,2.9231D+01,
+     &3.0023D+01,3.0827D+01,3.1642D+01,3.2468D+01,3.3305D+01,
+     &3.4152D+01,3.5010D+01,3.5878D+01,3.6757D+01,3.7645D+01,
+     &3.8543D+01/
+C     
+      DATA (SSIG_RHO(K,2),K=    1,   61) /
+     &-6.7332D-02,-3.0879D-02,-5.4256D-04,2.4410D-02,4.4739D-02,
+     &6.1172D-02,7.4371D-02,8.4920D-02,9.3315D-02,9.9976D-02,
+     &1.0525D-01,1.0941D-01,1.1269D-01,1.1528D-01,1.1731D-01,
+     &1.1891D-01,1.2016D-01,1.2115D-01,1.2192D-01,1.2253D-01,
+     &1.2300D-01,1.2338D-01,1.2367D-01,1.2390D-01,1.2408D-01,
+     &1.2422D-01,1.2433D-01,1.2442D-01,1.2449D-01,1.2454D-01,
+     &1.2458D-01,1.2462D-01,1.2464D-01,1.2466D-01,1.2468D-01,
+     &1.2469D-01,1.2470D-01,1.2471D-01,1.2471D-01,1.2472D-01,
+     &1.2472D-01,1.2472D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01/
+C     kaon-proton:
+C     total cross section
+      DATA (SSIG_TOT(K,3),K=    1,   61) /
+     &1.8299D+01,1.8827D+01,1.9408D+01,2.0016D+01,2.0633D+01,
+     &2.1318D+01,2.2044D+01,2.2810D+01,2.3615D+01,2.4458D+01,
+     &2.5339D+01,2.6253D+01,2.7209D+01,2.8235D+01,2.9372D+01,
+     &3.0683D+01,3.2250D+01,3.4173D+01,3.6576D+01,3.9602D+01,
+     &4.3417D+01,4.6380D+01,4.9560D+01,5.2954D+01,5.6563D+01,
+     &6.0384D+01,6.4411D+01,6.8639D+01,7.3062D+01,7.7674D+01,
+     &8.2464D+01,8.7426D+01,9.2551D+01,9.7831D+01,1.0326D+02,
+     &1.0883D+02,1.1454D+02,1.2037D+02,1.2634D+02,1.3243D+02,
+     &1.3864D+02,1.4496D+02,1.5139D+02,1.5793D+02,1.6458D+02,
+     &1.7133D+02,1.7817D+02,1.8512D+02,1.9215D+02,1.9928D+02,
+     &2.0650D+02,2.1380D+02,2.2119D+02,2.2867D+02,2.3623D+02,
+     &2.4387D+02,2.5160D+02,2.5940D+02,2.6728D+02,2.7524D+02,
+     &2.8328D+02/
+C     inel. cross section
+      DATA (SSIG(K,3),K=    1,   61) /
+     &1.6131D+01,1.6687D+01,1.7256D+01,1.7835D+01,1.8414D+01,
+     &1.8990D+01,1.9596D+01,2.0228D+01,2.0887D+01,2.1572D+01,
+     &2.2282D+01,2.3007D+01,2.3748D+01,2.4525D+01,2.5373D+01,
+     &2.6337D+01,2.7475D+01,2.8859D+01,3.0574D+01,3.2718D+01,
+     &3.5399D+01,3.7521D+01,3.9768D+01,4.2138D+01,4.4626D+01,
+     &4.7228D+01,4.9939D+01,5.2752D+01,5.5666D+01,5.8673D+01,
+     &6.1770D+01,6.4952D+01,6.8215D+01,7.1555D+01,7.4969D+01,
+     &7.8453D+01,8.2007D+01,8.5626D+01,8.9308D+01,9.3052D+01,
+     &9.6855D+01,1.0072D+02,1.0463D+02,1.0861D+02,1.1263D+02,
+     &1.1671D+02,1.2084D+02,1.2501D+02,1.2924D+02,1.3352D+02,
+     &1.3784D+02,1.4220D+02,1.4662D+02,1.5107D+02,1.5558D+02,
+     &1.6012D+02,1.6471D+02,1.6934D+02,1.7401D+02,1.7872D+02,
+     &1.8348D+02/
+C     slope parameter
+      DATA (SSIG_B(K,3),K=    1,   61) /
+     &8.8352D+00,9.1363D+00,9.4011D+00,9.6374D+00,9.8515D+00,
+     &1.0048D+01,1.0230D+01,1.0402D+01,1.0564D+01,1.0720D+01,
+     &1.0870D+01,1.1058D+01,1.1205D+01,1.1322D+01,1.1419D+01,
+     &1.1511D+01,1.1611D+01,1.1734D+01,1.1897D+01,1.2116D+01,
+     &1.2413D+01,1.2781D+01,1.3163D+01,1.3558D+01,1.3967D+01,
+     &1.4391D+01,1.4829D+01,1.5282D+01,1.5751D+01,1.6236D+01,
+     &1.6738D+01,1.7256D+01,1.7791D+01,1.8343D+01,1.8912D+01,
+     &1.9498D+01,2.0100D+01,2.0718D+01,2.1351D+01,2.1999D+01,
+     &2.2661D+01,2.3338D+01,2.4029D+01,2.4733D+01,2.5451D+01,
+     &2.6182D+01,2.6926D+01,2.7682D+01,2.8450D+01,2.9231D+01,
+     &3.0023D+01,3.0827D+01,3.1642D+01,3.2468D+01,3.3305D+01,
+     &3.4152D+01,3.5010D+01,3.5878D+01,3.6757D+01,3.7645D+01,
+     &3.8543D+01/
+C     
+      DATA (SSIG_RHO(K,3),K=    1,   61) /
+     &-2.4506D-02,9.2028D-03,3.5513D-02,5.5961D-02,7.1799D-02,
+     &8.4036D-02,9.3471D-02,1.0074D-01,1.0632D-01,1.1061D-01,
+     &1.1391D-01,1.1643D-01,1.1837D-01,1.1986D-01,1.2100D-01,
+     &1.2187D-01,1.2254D-01,1.2305D-01,1.2345D-01,1.2375D-01,
+     &1.2398D-01,1.2416D-01,1.2429D-01,1.2439D-01,1.2447D-01,
+     &1.2453D-01,1.2458D-01,1.2462D-01,1.2464D-01,1.2467D-01,
+     &1.2468D-01,1.2469D-01,1.2470D-01,1.2471D-01,1.2472D-01,
+     &1.2472D-01,1.2472D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,1.2473D-01,
+     &1.2473D-01/
+      
+      DATA LL /5*0,3*2,4*3,2*1,19*0,6*1/
+
+
+      L = L0
+      NSQS = 61
+      ASQSMIN = 1.D0
+      ASQSMAX = 7.D0
+      DASQS = (ASQSMAX-ASQSMIN)/DBLE(NSQS-1)
+
+      IF(NSQS.LE.0) THEN
+        WRITE(LUN,'(//,1X,A)') 
+     &    'SIB_SIGMA_EXT: interpolation table not initialized.'
+        STOP
+      ENDIF
+      IF(IABS(L).gt.39)THEN
+         WRITE(LUN,*)     
+     &        ' SIB_SIGMA_EXT: unknown beam particle!',L
+         STOP
+      ENDIF
+      IF(L.GT.3) L=LL(IABS(L))
+      IF(L.EQ.0)THEN
+         WRITE(LUN,*)     
+     &        ' SIB_SIGMA_EXT: unknown beam particle!', L
+         STOP
+      ENDIF
+        
+      AL = LOG10(SQS)
+      J1 = INT((AL-1.D0)*10.D0 + 1)
+      if((j1.lt.1).or.(j1.gt.NSQS)) then
+        if (ndebug .gt. 0) 
+     *    write (LUN,'(1x,a,i3,1p,e12.3)') 
+     &      ' SIB_SIGMA_EXT: energy out of range ',L,sqs
+      endif
+      if((j1.lt.1).or.(j1.ge.NSQS)) then
+        J1 = min(J1,NSQS-1)
+        J1 = max(J1,1)
+      endif
+      T = (AL-1.D0)*10.D0 - DBLE(J1-1)
+      SIGT    = SSIG_TOT(J1,L)*(1.D0-T) + SSIG_TOT(J1+1,L)*T
+      SIGINEL = SSIG(J1,L)*(1.D0-T) + SSIG(J1+1,L)*T
+      SIGEL   = SIGT-SIGINEL
+      SLOPE   = SSIG_B(J1,L) *(1.D0-T) + SSIG_B(J1+1,L)*T
+      RHO     = SSIG_RHO(J1,L) *(1.D0-T) + SSIG_RHO(J1+1,L)*T
+
+      END
+C=======================================================================
+
+      SUBROUTINE SAMPLE_PROJECTILE
+     +     (KID,KINT,LRMNT,XCHG,XJET,XX,PX,PY,IFL,KID1,IREJ)
+
+C-----------------------------------------------------------------------
+C...  Subroutine to sample sea and valence quarks in a hadron.
+C.    variables are stored in xx,px,py and ifl arrays.
+C.    for each interaction the hadron undergoes there is one 
+C.    pair of partons attached to the ends of two strings
+C.    (one cut pomeron)
+C.    In addition flavor and momentum may be set aside for the remnant
+C.    arrays are filled: rmnt1,rmnt2, c.str1,c.str2, etc..
+C.    i.e. positions 1 and 2 are reserved for remnant.
+C.
+C.    Input: KINT  : number of interactions the hadron takes part in
+C.           KID   : particle id of hadron
+C.           LRMNT : remnant excitation flag,
+C.                   defines if valence quarks need to be sampled
+C.           XCHG  : flavor exchange prob. between remnant and 
+C.                   central strings
+C.           XJET  : momentum fraction already asigned to minijets
+C.           IREJ  : rejection flag, default set in calling routine
+C.
+C.    Output: XX,IFL,PX,PY  : arrays of momentum fractions, flavor 
+C.                            and transverse momentum
+C.            KID1 : new hadron id (in case of flavor exchange)
+C-------------------------------------------------------------------      
+      IMPLICIT NONE
+
+C     include COMMONs
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+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
+      INTEGER ITRY, NREJ
+      COMMON /S_CNT/ ITRY(20), NREJ(20)
+
+C     input type declarations
+      INTEGER KID,KINT,LRMNT
+      DOUBLE PRECISION XCHG,XJET
+      
+C     output type declarations
+      DOUBLE PRECISION XX,PX,PY
+      INTEGER IFL,KID1,IREJ
+      DIMENSION XX(2*NW_max+2),PX(2*NW_max+2),PY(2*NW_max+2),
+     &     IFL(2*NW_max+2)
+
+c     local type declarations
+      INTEGER ICNT1,ICNT2,J,JJ,j1,j2,j3,j4,KRMNT,IRNK,
+     &     IDXVAL,IDX,ISWTD,i,IFLS,NVAL,NSEA,IR,IDUM,IDUM2,KIDA,IMRG2HAD
+      DOUBLE PRECISION XSEAJET,XVAL,XMINA,XMINA_SEA,GAMMA,XREM,XMINA2,
+     &     XMAX2,ALPHA,XM2DIS,ASUP,XMAX,XQM,S_RNDM,
+     &     CHIDIS,CHI,GAMDIQ,XSUPP,XSUPP1,PAR53_def,PAR5_def,PAR6_def,
+     &     PAR7_def,PAR143_def,XSUM,STR_mass,PTS,XSCL
+      SAVE
+      DATA ICNT1,ICNT2 /0,0/
+      
+C..   initialization
+      ITRY(3) = 0
+      XVAL = 0.D0
+      XSCL = 1.D0
+      XSEAJET = 0.D0
+      XSUM = 0.D0
+      DO J=1,KINT               ! zero arrays
+         j1 = 1+2*(j-1)
+         j2 = j1 + 1
+         j3 = 3+2*(j-1)
+         j4 = j3 + 1
+         XX(j1) = 0.D0
+         XX(j2) = 0.D0
+         XX(j3) = 0.D0
+         XX(j4) = 0.D0
+         PX(j1) = 0.D0
+         PX(j2) = 0.D0
+         PX(j3) = 0.D0
+         PX(j4) = 0.D0
+      ENDDO
+
+      KRMNT = MIN(LRMNT,1)
+
+      IF(ndebug.gt.3) 
+     +     WRITE(LUN,*)
+     +     ' SAMPLE_PROJECTILE: KID,KINT,KRMNT,XCHG,XJET,IREJ',
+     +     KID,KINT,KRMNT,XCHG,XJET,IREJ
+
+      KID1 = KID
+      KIDA = IABS(KID)
+      
+c     number of valence quarks to sample
+c     if remnant is resolved (krmnt=1) no valence pair needed
+      Nval = 2*(1-KRMNT)
+
+c     number of sea quarks to sample (one pair per interaction)
+c     if remnant is not resolved then on pair less is needed 
+c     (valence pair takes role of one sea pair)
+      Nsea = 2*(KINT-(1-KRMNT))
+
+      IF(ndebug.gt.3) 
+     +     WRITE(LUN,*)
+     +     ' SAMPLE_PROJECTILE: number of partons to sample ',
+     +     '(tot,val,sea):',Nval+Nsea,Nval,Nsea
+
+c     change proton splitting to enhance charge exchange by allowing
+c     ud more often than uu, default scenario is ud,du,uu: 3:1:2
+      PAR53_def = PAR(53)
+      PAR(53) = PAR(84)
+c     change proton splitting in case no remnant is present
+      IF(LRMNT.eq.0) PAR(53) = PAR(127)
+
+ 20   ITRY(3) = ITRY(3) + 1
+      IF(ITRY(3).gt.NREJ(3)) THEN
+         ICNT1 = ICNT1 + 1
+         IF(ICNT1.lt.10)THEN
+          if (NDEBUG.gt.0) then
+            WRITE(LUN,*)' SAMPLE_PROJECTILE: trials exceeded! return..'
+            WRITE(LUN,*)
+     +           '  KID,KINT,KRMNT,XCHG,XJET,XVAL,IREJ,NCALL',
+     +           KID,KINT,KRMNT,XCHG,XJET,XVAL,IREJ,NCALL           
+          endif
+         ENDIF
+         PAR(53) = PAR53_def
+         RETURN 
+      ENDIF
+
+C...  kinematic limits
+ 22   XSEAJET = XJET
+      IF(KRMNT.eq.0)THEN
+c     minimal momentum fraction for valences
+         XMINA = 2.D0*STR_mass_val/SQS
+c     default for valence quarks: 0.35 , xmin@10GeV = 0.07
+c     taken from COMMON s_cutoff
+         IF(ISTR(KIDA)*IBAR(KIDA).ne.0)
+     &        XMINA = 2.D0*STR_mass_val_hyp/SQS
+      ELSE
+         IF(IPAR(47).eq.4.or.IPAR(47).eq.4.or.IPAR(47).eq.6)then
+c     no valence sampling model
+c     if remnant present then the minimal remnant mass has to be provided
+            XMINA = PAR(96)*AM(IABS(KID))/SQS            
+         ELSEIF(IPAR(47).lt.4)THEN
+c     valences sampled, even if combined again in remnant
+            XMINA = 2.D0*STR_mass_val/SQS
+         ELSEIF(IPAR(47).eq.7)THEN
+c     minimal remnant mass not requiered,
+c     mass is taken from central strings anyway..
+            XMINA = AM(IABS(KID))/SQS
+         ENDIF
+      ENDIF
+         
+c     minimal momentum fraction for sea partons
+      IF(IPAR(47).eq.0.or.IPAR(47).eq.3)THEN
+c     same as valence quarks
+         STR_mass = STR_mass_val
+      ELSEIF(IPAR(47).eq.1.or.IPAR(47).eq.2.or.IPAR(47).gt.4)THEN
+c     set by parameter
+         STR_mass = PAR(87)
+      ELSEIF(IPAR(47).eq.4)THEN
+c     same as soft minijets
+         STR_mass = STR_mass_sea
+      ENDIF
+      IF(IPAR(72).eq.2.and.KINT.gt.1)THEN
+         STR_mass = STR_mass * PAR(118)
+      ENDIF
+      XMINA_SEA = 2.D0*STR_mass/SQS
+c     default for sea quarks: 1.0 , xmin@10GeV = 0.2
+c     taken from COMMON s_cutoff or s_cflafr
+c     should be the same as min. string mass in SAMPLE_SOFT !
+
+c     dependence on number of interactions
+      IF(IPAR(72).eq.1.and.KINT.gt.1)THEN
+         XMINA_SEA = XMINA_SEA * PAR(118)
+      ENDIF
+
+C..   check if enough energy left to sample all partons
+      IF (1.D0-XJET.LT.(Nsea*XMINA_SEA+2.D0*XMINA))THEN
+         ICNT2 = ICNT2 + 1
+         IF(ICNT2.le.10)THEN
+            IF(NDEBUG.gt.3)THEN
+               write(lun,*)' SAMPLE_PROJECTILE: rejection!' 
+               write(lun,*)'  too little energy to sample all partons!'
+               write(lun,*)'  (NW,Ntot,Nval,Nsea,XMIN,XMIN*N',
+     &              'XREM,XALL,NCALL,ICNT:)',KINT,nval+nsea,Nval,nsea,
+     &              2*xmina,nsea*xmina_sea,1.D0-xjet,
+     &              Nsea*XMINA_SEA+2*XMINA,NCALL,ICNT2
+               IF(ICNT2.eq.10) write(lun,*)' last warning ! good luck..'
+            ENDIF
+         ENDIF
+
+         IREJ = 2
+         PAR(53) = PAR53_def
+         RETURN
+      ENDIF
+
+
+C...  sample sea partons
+c     if no additional partons need to be sampled 
+C     jump straight to valence quarks
+      IF(Nsea.EQ.0) GOTO 100
+
+C     select sea quark model
+      IF(IPAR(47).eq.0.or.IPAR(47).eq.3.or.IPAR(47).eq.4.or.
+     &     IPAR(47).eq.5.or.IPAR(47).eq.7)THEN
+         GAMMA = PAR(103)
+         IF(IPAR(73).eq.1.and.KINT.gt.1) GAMMA = PAR(119)
+         CALL SAMPLE_SEA_TOT
+     &        (KRMNT,KINT,NSEA,GAMMA,XJET,STR_MASS,XSEAJET,XX)
+
+      ELSEIF(IPAR(47).eq.1)THEN
+c     sample from 1/x individually then reject if too large
+         XREM = 0.D0
+         XMINA2 = XMINA_SEA ** 2
+         XMAX2 = 0.8D0**2
+         ALPHA = 1.D0
+         DO WHILE ( XREM .lt. 2*XMINA )
+            XREM = 1.D0-XJET
+            IF(NDEBUG.gt.3)
+     &           WRITE(LUN,*) '  N,XREM,XMINA,XMIN2,XMAX2,ALPHA',
+     &           Nsea,XREM,XMINA_SEA,XMINA2,XMAX2,ALPHA
+            DO j=1,Nsea
+               jj = 2 + j
+               IF(KRMNT.eq.0) jj = 4+j
+               XX(jj) = XM2DIS(XMINA2,XMAX2,ALPHA)
+               IF(NDEBUG.gt.3) 
+     &           WRITE(LUN,*) ' J,X,XREM',JJ,XX(JJ),XREM
+               XREM = XREM - XX(jj)
+            ENDDO
+         ENDDO
+         XSEAJET = 1.D0-XREM
+
+      ELSEIF(IPAR(47).eq.2.or.IPAR(47).eq.6)THEN
+c     sample from (1-x)**b / x with common mass constraint
+         XREM = 1.D0-XJET
+         XMAX = PAR(88)
+         ALPHA = PAR(85)
+         ASUP = PAR(86)
+         XQM = STR_mass
+         CALL SAMPLE_SEA_INDV(KRMNT,XMINA,XMINA_SEA,NSEA,
+     &        XREM,ALPHA,ASUP,XQM,XMAX,XX,IR)
+         IF(IR.ne.0)THEN
+            IREJ = IR
+            PAR(53) = PAR53_def
+            RETURN
+         ENDIF
+
+         XSEAJET = 1.D0-XREM
+      ENDIF
+
+C...  sample sea flavor: u,d,s,c
+c     write to ifl after valences..
+      DO J=1+Nval/2,KINT
+         j3 = 3+2*(j-1)
+         j4 = j3 + 1
+c     turn on strange sea..
+         IF(IPAR(29).eq.1)THEN
+            IF(IPAR(69).ne.0)THEN
+c     sample asymmetric u,d
+               IFL(j3) = MIN(2,1+INT((2.D0+PAR(114))*S_RNDM(KID)))
+c     sample strange
+               IFLS = 3*(INT((2+PAR(43))*S_RNDM(j3))/2)
+               IFL(j3) = MAX(IFL(j3),IFLS)
+            else
+               IFL(j3) = 1+INT((2.D0+PAR(43))*S_RNDM(j4))
+            endif
+c     sample charm
+c     scale up for mesons
+            IF(IPAR(76).eq.1) XSCL=XSCL+(1-IABS(IBAR(KIDA)))*PAR(126)
+            IF(IFL(j3).eq.3.and.S_RNDM(kid).lt.PAR(97)*PAR(125)*XSCL)
+     &           IFL(j3) = 4
+         ELSE
+            IFL(j3) = INT(1.5D0+S_RNDM(KID))
+         ENDIF
+         IFL(j4) = -IFL(j3)
+         IF(NDEBUG.gt.3) 
+     &        WRITE(LUN,*) '  flavor: JW,FLV1,FLV2',J,IFL(j3),IFL(j4)
+
+C...  sample sea pt
+ 33      IF(IPAR(49).eq.1)THEN
+c     in-string pt for sea partons
+c     flavor and cm energy dependent avg, exponential dist.
+c     avg pt (defined in subroutine ptsetup ):
+c     u,d : PAR(46)+PAR(68)*log10(sqs/20.D0)**2
+c     s:    PAR(47)+PAR(70)*log10(sqs/20.D0)**2
+c     diq:  PAR(48)+PAR(69)*log10(sqs/20.D0)**2
+            CALL PTDIS_4FLV (IFL(j3),PX(j3),PY(j3))
+            PX(j4) = -PX(j3)
+            PY(j4) = -PY(j3)
+
+         ELSEIF(IPAR(49).eq.2)THEN
+c     'primordial' pt
+c     c.m. energy dependent avg, exponential
+c     same for all flavors
+c     avg: PAR(49)+PAR(69)*log10(sqs/20.)**2
+            CALL PTDIS_4FLV (10,PX(j3),PY(j3))
+            PX(j4) = -PX(j3)
+            PY(j4) = -PY(j3)
+
+         ELSEIF(IPAR(49).eq.3)THEN
+c     constant pt
+            PX(j3) = EPS5
+            PY(j3) = EPS5
+            PX(j4) = -PX(j3)
+            PY(j4) = -PY(j3)
+
+         ELSEIF(IPAR(49).eq.4)THEN
+c     sea pt, same as primordial but different params..
+c     c.m. energy dependent avg, exponential
+c     same for all flavors
+c     avg: PAR(132)
+            CALL PTDIS_4FLV (30,PX(j3),PY(j3))
+            PX(j4) = -PX(j3)
+            PY(j4) = -PY(j3)
+         ENDIF
+c     limit parton virtuality         
+         PTS = MAX(PX(j3)**2+PY(j3)**2,EPS10)
+         IF((XX(j3)**2+XX(J4)**2)/PTS.lt.8.D0*PAR(122)/S) GOTO 33
+         IF(NDEBUG.gt.3) 
+     &        WRITE(LUN,*)'  pt: JW,PX,PY,pt',J,Px(j3),Py(j3),sqrt(pts)
+      ENDDO     
+
+C...  Prepare the valence partons
+ 100  XVAL=1.D0-XSEAJET
+      IF(ndebug.gt.3)
+     &     write(lun,*) ' SAMPLE_PROJECTILE: val. fraction remaining:',
+     &     XVAL
+
+      IF(IPAR(47).eq.7)THEN
+c     no remnant, sample valence quarks
+         IF(KRMNT.eq.0) THEN
+c     enough momentum left?
+            IF (XVAL.LT.XMINA) goto 20 ! reject sea kinematics
+         ELSE
+c     sample remnant
+            IF(IPAR(53).eq.1)THEN
+c     momentum dis: x**alpha
+               IF(S_RNDM(KID).gt.XVAL**(PAR(100)+1)) GOTO 22
+            ENDIF
+c     split remnant momentum into partons, just to fill slots
+            
+         ENDIF            
+      ELSE
+         IF(KRMNT.eq.0.or.IPAR(47).lt.4)THEN
+            IF (XVAL.LT.XMINA) goto 20 ! reject sea kinematics
+         ENDIF
+c     remnant momentum fraction
+         IF(KRMNT.ne.0.and.IPAR(53).eq.1)THEN
+            IF(S_RNDM(KID).gt.XVAL**(PAR(100)+1)) GOTO 22
+         ENDIF
+      ENDIF
+c     valence quarks are in 1,2 of IFL,XX etc.
+      IDXVAL = 3
+      IF(KRMNT.ne.0) IDXVAL = 1
+      CALL HSPLI (KID,IFL(IDXVAL),IFL(IDXVAL+1))
+ 110  CHI = CHIDIS(KID,IFL(IDXVAL),IFL(IDXVAL+1))
+      XX(IDXVAL) = MAX(CHI*XVAL,XMINA)
+      XX(IDXVAL) = MIN(XX(IDXVAL),XVAL-XMINA)
+C     FOR MESONS, SPLIT ENERGY SYMMETRICALLY.
+      IF (IABS(KID).LT.13.AND.S_RNDM(0).LE.0.5D0) 
+     &     XX(IDXVAL)=XVAL-XX(IDXVAL)
+      XX(IDXVAL+1)=XVAL-XX(IDXVAL)
+      IF(ndebug.gt.3)
+     &     write(lun,*) ' SAMPLE_PROJECTILE: val. sampled (x1,x2):',
+     &     XX(IDXVAL),XX(IDXVAL+1)
+c     for baryons force diq distribution
+      IF(IBAR(IABS(KID)).ne.0.and.IPAR(47).ne.7)THEN
+         IF(IPAR(52).eq.1)THEN
+            GAMDIQ=PAR(95)
+            IF(S_RNDM(KID).gt.XX(IDXVAL+1)**(GAMDIQ+1)) GOTO 110
+         ELSE
+            IF(KRMNT.eq.0.or.IPAR(47).lt.4.and.IPAR(53).eq.0)THEN
+c     force diquark distribution
+               GAMDIQ=PAR(95)
+               IF(S_RNDM(KID).gt.XX(IDXVAL+1)**(GAMDIQ+1)) GOTO 20
+            ENDIF
+         ENDIF
+      ENDIF
+C...  val. quark transverse momentum
+      CALL PTDIS_4FLV (10,PX(IDXVAL),PY(IDXVAL))
+      PX(IDXVAL+1) = -PX(IDXVAL)
+      PY(IDXVAL+1) = -PY(IDXVAL)     
+      IF(ndebug.gt.3)
+     &     write(lun,*) ' SAMPLE_PROJECTILE: val. pt (px,py):',
+     &     PX(IDXVAL),PY(IDXVAL)
+
+C...  exchange flavor between central strings and remnant
+c     there is one pair of strings for each interaction with another hadron
+c     in general allowed for both flavors but diquarks usually strongly suppressed
+c     Xchg : prob. of flv exchange between strgs and rmnt
+      IF(KRMNT.ne.0)THEN
+         do idx=1,2
+            iswtd = 0
+            i = 1
+            XSUPP = 1.D0
+            IF(iabs(ifl(idx)).gt.10)THEN
+c     suppress exchange of diq: prob_exchange = prob0 * xsupp
+               XSUPP = PAR(83)
+            ELSEIF(IPAR(46).eq.2)THEN
+c     suppress exchange for fast quark ( usually in mesons )
+               IF(xx(idx).gt.xx(3-idx)) XSUPP = PAR(139)
+            ENDIF
+            DO WHILE (ISWTD.eq.0.and.i.le.KINT)
+c     sea flavor index
+               jj = idx+2*i
+c     forbid exchange for charmed hadrons if sea pair is charmed too
+c     needed to avoid double charmed particles
+               XSUPP1 = XSUPP
+               IF(IABS(KID).gt.50.and.IABS(IFL(JJ)).eq.4) XSUPP1 = 0.D0
+               if(S_RNDM(I).lt.XCHG*XSUPP1) THEN               
+c     exchange flavor between remnant and sea
+                  CALL ISWTCH_LMNTS(ifl(jj),ifl(idx))
+c     also exchange momentum fraction
+                  IF(IPAR(46).ne.0) CALL SWTCH_LMNTS(xx(jj),xx(idx))
+c     change flavor id accordingly, i.e. reassamble remnant from new flavor
+                  IF(IPAR(58).eq.0)THEN
+c     combine to any hadron that matches flavor wise, ignoring (iso)spin
+                     CALL SIB_I4FLAV(ifl(1),ifl(2),idum,idum2,KID1)
+                  ELSEIF(IPAR(58).eq.1)THEN
+c     combine to lightest hadron
+                     KID1 = IMRG2HAD(IFL(1),IFL(2))
+                  ELSEIF(IPAR(58).eq.2.or.IPAR(58).eq.3)THEN
+c     combine to any hadron that matches flavor wise, ignoring (iso)spin
+c     set vector meson rate
+                     PAR5_def = PAR(5)
+                     PAR(5) = PAR(104)
+c     set strange vector rate
+                     PAR6_def = PAR(6)
+                     PAR(6) = PAR(121)
+c     set spin3/2 vs spin1/2 rate
+                     PAR7_def = PAR(7)
+                     PAR(7) = PAR(105)
+c     set rho / omega-phi rate
+                     PAR143_def = PAR(143)
+                     if(ibar(iabs(kb)).eq.0.and.IPAR(85).eq.1)
+     &                    PAR(143) = PAR(145)
+                     irnk = 0                     
+                     IF(IPAR(58).eq.3) irnk = 1                     
+                     CALL SIB_I4FLAV(ifl(1),ifl(2),irnk,idum2,KID1)
+                     PAR(5) = PAR5_def
+                     PAR(6) = PAR6_def
+                     PAR(7) = PAR7_def
+                     PAR(143) = PAR143_def
+
+c     reject spin1,isospin singlett
+                     IF(KID1.eq.32.and.PAR(111).gt.S_RNDM(KID1))
+     &                    KID1 = 27
+                  ENDIF
+                  iswtd = 1
+               endif
+               i = i + 1
+            ENDDO
+         enddo
+      ENDIF
+      IF(ndebug.gt.3)THEN        
+         WRITE(LUN,*)' SAMPLE_PROJECTILE: rmnt PID,NTRY: ',KID1,ITRY(3)
+         WRITE(LUN,*)' SAMPLE_PROJECTILE: output: I,FLV,PX,PY,X,XSUM'
+      ENDIF
+      XSUM = XJET
+      DO j=IDXVAL,2*(KINT+Krmnt)+2*(1-Krmnt)
+         XSUM = XSUM + XX(j)
+         IF(NDEBUG.gt.3) WRITE(LUN,*) j,IFL(j),PX(J),PY(J),XX(j),XSUM
+      ENDDO
+      IF(ABS(XSUM-1.D0).gt.EPS3) THEN
+         WRITE(LUN,*)' SAMPLE_PROJECTILE: parton sum incomplete!',
+     &        '(ID,XSUM,NCALL):' , KID1,XSUM, NCALL,' aborting..'
+         CALL SIB_REJECT('SAMPLE_PROJECTIL')
+      ENDIF
+      IREJ = 0
+
+      END
+C=======================================================================
+
+      SUBROUTINE DECSIB 
+
+C-----------------------------------------------------------------------
+C...Decay all unstable particle in Sibyll
+C.  decayed particle have the code increased by 10000
+C
+C   changed to allow for multiple calls to DECSIB in one event
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DOUBLE PRECISION CBR
+      INTEGER KDEC,LBARP,IDB
+      COMMON /S_CSYDEC/ CBR(223+16+12+8), KDEC(1338+6*(16+12+8)),
+     &     LBARP(99), IDB(99)
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+      INTEGER LLIST1
+      COMMON /S_PLIST1/ LLIST1(8000)
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      INTEGER LRNK
+      COMMON /SIB_RNK/ LRNK(8000)
+      DIMENSION P0(5), LL(10), PD(10,5)
+      SAVE
+
+c     call pythia decay routine      
+c      IF(IPAR(44).eq.1) CALL PYDEC
+
+c     decay with sibyll
+      NN = 1
+      IF(IPAR(44).ne.1)THEN
+         DO J=1,NP
+            LLIST1(J) = 0
+         ENDDO
+      ENDIF
+      DO WHILE (NN .LE. NP)
+         L= LLIST(NN)
+         LA = IABS(L)
+         if(LA.lt.100) then
+           IF (IDB(LA) .GT. 0)  THEN
+              DO K=1,5
+                P0(K) = P(NN,K)
+              ENDDO
+              CALL DECPAR (L,P0,ND,LL,PD)
+              LLIST(NN) = LLIST(NN)+ISIGN(10000,LLIST(NN))
+              DO J=1,ND
+                NP = NP+1
+                if(NP.gt.8000) then
+                  write(LUN,'(1x,a,2i8)') 
+     &              ' DECSIB: no space left in S_PLIST (NP,ND):',NP,ND
+                  NP = NP-1
+                  return
+                endif
+                DO K=1,5
+                  P(NP,K) = PD(J,K)
+                ENDDO
+                LLIST(NP)=LL(J)
+                LLIST1(NP)=NN
+                LRNK(NP)=LRNK(NN)
+                NPORIG(NP)= NPORIG(NN)
+                niorig(NP)= NIORIG(NN)
+                NFORIG(NP) = L
+              ENDDO
+           ENDIF
+         endif
+         NN = NN+1
+      ENDDO
+
+c      CALL SIB_LIST(20)
+
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_SIGMA_HP
+     &     (L0,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+
+C-----------------------------------------------------------------------
+C     Hadron-proton cross sections, taken from interpolation table
+C     calculated by SIBYLL_INI
+C
+C     input:       L     1      proton-proton
+C                        2      pi-proton
+C                        3      K-proton
+C                  SQS   sqrt(s)
+C
+C     output:      SIGT       total cross section (mb)
+C                  SIGEL      elastic cross section (mb)
+C                  SIGINEL    inelastic cross section (mb)
+C                  SIGDIF     diffraction dissociation CS (mb)
+C                  SLOPE      elastic slope parameter (GeV^-2)
+C                  RHO        real/imaginary part of forward amplitude
+C-----------------------------------------------------------------------
+Cf2py integer, intent(in) :: L0
+Cf2py double precision, intent(in) :: SQS
+Cf2py double precision, intent(out) :: SIGT,SIGEL,SIGINEL,SLOPE,RHO
+Cf2py double precision(3), intent(out) :: SIGDIF
+      IMPLICIT NONE
+
+c     external types
+      DOUBLE PRECISION SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO      
+      DIMENSION SIGDIF(3)
+      INTEGER L0
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      
+      DOUBLE PRECISION SSIG,PJETC,SSIGN,SSIGNSD,SSIGNEL,ALINT,ASQSMIN,
+     &     ASQSMAX,DASQS
+      INTEGER NSQS
+      COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+     &     SSIGN(61,3,3), SSIGNSD(61,3,3), SSIGNEL(61,3,3), 
+     &     ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+      DOUBLE PRECISION SSIG_TOT,SSIG_SD1,SSIG_SD2,SSIG_DD,SSIG_B,
+     &     SSIG_RHO
+      COMMON /S_CCSIG2/ SSIG_TOT(61,3),SSIG_SD1(61,3),SSIG_SD2(61,3),
+     &    SSIG_DD(61,3),SSIG_B(61,3),SSIG_RHO(61,3)
+
+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
+
+c     internal type declarations
+      DOUBLE PRECISION T,AL
+      INTEGER LL,L,J1
+      DIMENSION LL(39)
+      SAVE
+      DATA LL /5*0,3*2,4*3,2*1,19*0,6*1/
+
+
+      L = L0
+      IF(NSQS.LE.0) THEN
+        WRITE(LUN,'(//,1X,A)') 
+     &    ' SIB_SIGMA_HP: interpolation table not initialized.'
+        STOP
+      ENDIF
+      IF(IABS(L).gt.39)THEN
+         WRITE(LUN,*)     
+     &        ' SIB_SIGMA_HP: unknown beam particle!',L
+         STOP
+      ENDIF
+      IF(L.GT.3) L=LL(IABS(L))
+      IF(L.EQ.0)THEN
+         WRITE(LUN,*)     
+     &        ' SIB_SIGMA_HP: unknown beam particle!', L
+         STOP
+      ENDIF
+        
+      AL = LOG10(SQS)
+      J1 = INT((AL-1.D0)*10.D0 + 1)
+      if((j1.lt.1).or.(j1.gt.NSQS)) then
+        if(ndebug.gt.0)
+     &         write (LUN,'(1x,a,i3,1p,e12.3)') 
+     &         ' SIB_SIGMA_HP: energy out of range ',L,sqs
+      endif
+      if((j1.lt.1).or.(j1.ge.NSQS)) then
+        J1 = min(J1,NSQS-1)
+        J1 = max(J1,1)
+      endif
+      T = (AL-1.D0)*10.D0 - DBLE(J1-1)
+      SIGT    = SSIG_TOT(J1,L)*(1.D0-T) + SSIG_TOT(J1+1,L)*T
+      SIGINEL = SSIG(J1,L)*(1.D0-T) + SSIG(J1+1,L)*T
+      SIGEL   = SIGT-SIGINEL
+      SIGDIF(1) = SSIG_SD1(J1,L)*(1.D0-T) + SSIG_SD1(J1+1,L)*T
+      SIGDIF(2) = SSIG_SD2(J1,L)*(1.D0-T) + SSIG_SD2(J1+1,L)*T
+      SIGDIF(3) = SSIG_DD(J1,L)*(1.D0-T) + SSIG_DD(J1+1,L)*T
+      SLOPE   = SSIG_B(J1,L) *(1.D0-T) + SSIG_B(J1+1,L)*T
+      RHO     = SSIG_RHO(J1,L) *(1.D0-T) + SSIG_RHO(J1+1,L)*T
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIB_SIGMA_HP2
+     +     (L,SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+
+C-----------------------------------------------------------------------
+C     Hadron-proton cross sections, taken from interpolation table
+C     calculated by SIBYLL_INI
+C
+C     input:       L     1      proton-proton
+C                        2      pi-proton
+C                        3      K-proton
+C                  SQS   sqrt(s)
+C
+C     output:      SIGT       total cross section (mb)
+C                  SIGEL      elastic cross section (mb)
+C                  SIGINEL    inelastic cross section (mb)
+C                  SIGDIF     diffraction dissociation CS (mb)
+C                             split in high and low mass !!
+C                             ( taken from S_CCSIG3 )
+C                  SLOPE      elastic slope parameter (GeV^-2)
+C                  RHO        real/imaginary part of forward amplitude
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+c     external types      
+      DOUBLE PRECISION SQS,SIGT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO
+      DIMENSION SIGDIF(3,2)
+      INTEGER L
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      
+      DOUBLE PRECISION SSIG,PJETC,SSIGN,SSIGNSD,SSIGNEL,ALINT,ASQSMIN,
+     &     ASQSMAX,DASQS
+      INTEGER NSQS
+      COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+     &     SSIGN(61,3,3), SSIGNSD(61,3,3), SSIGNEL(61,3,3), 
+     &     ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+      DOUBLE PRECISION SSIG_TOT,SSIG_SD1,SSIG_SD2,SSIG_DD,SSIG_B,
+     &     SSIG_RHO
+      COMMON /S_CCSIG2/ SSIG_TOT(61,3),SSIG_SD1(61,3),SSIG_SD2(61,3),
+     &    SSIG_DD(61,3),SSIG_B(61,3),SSIG_RHO(61,3)
+      DOUBLE PRECISION SSIG_SD1LM,SSIG_SD1HM,SSIG_SD2LM,SSIG_SD2HM,
+     &     SSIG_DDLM,SSIG_DDHM
+      COMMON /S_CCSIG3/ SSIG_SD1LM(61,3),SSIG_SD1HM(61,3),
+     &     SSIG_SD2LM(61,3),SSIG_SD2HM(61,3),
+     &     SSIG_DDLM(61,3),SSIG_DDHM(61,3)
+
+c     internal types
+      INTEGER J1
+      DOUBLE PRECISION T,AL
+      SAVE
+
+      IF(NSQS.LE.0) THEN
+        WRITE(LUN,'(//,1X,A)') 
+     &    ' SIB_SIGMA_HP2: interpolation table not initialized.'
+        STOP
+      ENDIF
+        
+      AL = dLOG10(SQS)
+      J1 = INT((AL - 1.D0)*10.D0 + 1)
+      if((j1.lt.1).or.(j1.gt.NSQS)) then
+        if(ndebug.gt.0)write(LUN,'(1x,a,i3,1p,e12.3)') 
+     &    ' SIB_SIGMA_HP2: energy out of range ',L,sqs
+      endif
+      if((j1.lt.1).or.(j1.ge.NSQS)) then
+        J1 = min(J1,NSQS-1)
+        J1 = max(J1,1)
+      endif
+      T = (AL-1.D0)*10.D0 - DBLE(J1-1)
+      SIGT    = SSIG_TOT(J1,L)*(1.D0-T) + SSIG_TOT(J1+1,L)*T
+      SIGINEL = SSIG(J1,L)*(1.D0-T) + SSIG(J1+1,L)*T
+      SIGEL   = SIGT-SIGINEL
+      SIGDIF(1,1) = SSIG_SD1LM(J1,L)*(1.D0-T) + SSIG_SD1LM(J1+1,L)*T
+      SIGDIF(1,2) = SSIG_SD1HM(J1,L)*(1.D0-T) + SSIG_SD1HM(J1+1,L)*T
+      SIGDIF(2,1) = SSIG_SD2LM(J1,L)*(1.D0-T) + SSIG_SD2LM(J1+1,L)*T
+      SIGDIF(2,2) = SSIG_SD2HM(J1,L)*(1.D0-T) + SSIG_SD2HM(J1+1,L)*T
+      SIGDIF(3,1) = SSIG_DDLM(J1,L)*(1.D0-T) + SSIG_DDLM(J1+1,L)*T
+      SIGDIF(3,2) = SSIG_DDHM(J1,L)*(1.D0-T) + SSIG_DDHM(J1+1,L)*T
+      SLOPE   = SSIG_B(J1,L) *(1.D0-T) + SSIG_B(J1+1,L)*T
+      RHO     = SSIG_RHO(J1,L) *(1.D0-T) + SSIG_RHO(J1+1,L)*T
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIB_SIGMA_HAIR (L,SQS,SIGprod,SIGbdif) 
+
+C-----------------------------------------------------------------------
+C     Hadron-air cross sections, taken from interpolation table
+C     calculated by SIBYLL_INI
+C
+C     input:       L     1      proton-air
+C                        2      pi-air
+C                        3      K-air
+C                  SQS   sqrt(s)
+C
+C     output:      SIGprod    particle production cross section (mb)
+C                  SIGbdif    q.ela and ela beam diff. cross section
+C-----------------------------------------------------------------------
+Cf2py integer, intent(in) :: L
+Cf2py double precision, intent(in) :: SQS
+Cf2py double precision, intent(out) :: SIGprod,SIGbdif
+      IMPLICIT NONE
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      
+      DOUBLE PRECISION SSIG,PJETC,SSIGN,SSIGNSD,SSIGNEL,ALINT,ASQSMIN,
+     &     ASQSMAX,DASQS
+      INTEGER NSQS
+      COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+     &     SSIGN(61,3,3), SSIGNSD(61,3,3), SSIGNEL(61,3,3), 
+     &     ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+
+c     external
+      DOUBLE PRECISION SQS,SIGPROD,SIGBDIF
+      INTEGER L
+
+c     internal
+      DOUBLE PRECISION AL,T
+      INTEGER J1
+      SAVE
+
+      IF(NSQS.LE.0) THEN
+        WRITE(LUN,'(//,1X,A)') 
+     &    ' SIB_SIGMA_HAIR: interpolation table not initialized.'
+        STOP
+      ENDIF
+        
+      AL = LOG10(SQS)
+      J1 = INT((AL - 1.D0)*10.D0 + 1)
+      if((j1.lt.1).or.(j1.gt.NSQS)) then
+        if (ndebug .gt. 0) 
+     &          write (LUN,'(1x,a,i3,1p,e12.3)') 
+     &          ' SIB_SIGMA_HAIR: energy out of range ',L,sqs
+      endif
+      if((j1.lt.1).or.(j1.ge.NSQS)) then
+        J1 = min(J1,NSQS-1)
+        J1 = max(J1,1)
+      endif
+      T = (AL-1.D0)*10.D0 - DBLE(J1-1)
+      SIGprod = SSIGN(J1,L,1)*(1.D0-T) + SSIGN(J1+1,L,1)*T
+      SIGbdif = SSIGNSD(J1,L,1)*(1.D0-T) + SSIGNSD(J1+1,L,1)*T
+
+      END
+C=======================================================================
+      SUBROUTINE SIB_SIGMA_HNUC (L,IAT,SQS,SIGprod,SIGbdif,SIGela) 
+
+C-----------------------------------------------------------------------
+C     calculate Hadron-nucleus cross sections
+C
+C     input:       L     1      proton-nuc
+C                        2      pi-nuc
+C                        3      K-nuc
+C                  IAT   0-18   mass number of target nucleus
+C                        (beyond A=18 nuclear profiles are inaccurate)
+C                  SQS   sqrt(s)
+C
+C     output:      SIGprod    particle production cross section (mb)
+C                  SIGbdif    q.ela and ela beam diff. cross section
+C                  SIGela     elastic cross section
+C-----------------------------------------------------------------------
+Cf2py integer, intent(in) :: L,IAT
+Cf2py double precision, intent(in) :: SQS
+Cf2py double precision, intent(out) :: SIGprod,SIGbdif,SIGela
+      IMPLICIT NONE
+
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+      
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DOUBLE PRECISION SSIG,PJETC,SSIGN,SSIGNSD,SSIGNEL,ALINT,ASQSMIN,
+     &     ASQSMAX,DASQS
+      INTEGER NSQS
+      COMMON /S_CCSIG/ SSIG(61,3), PJETC(0:NS_max,0:NH_max,61,2),
+     &     SSIGN(61,3,3), SSIGNSD(61,3,3), SSIGNEL(61,3,3), 
+     &     ALINT(61,3,3), ASQSMIN, ASQSMAX, DASQS, NSQS
+
+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
+      DOUBLE PRECISION SIGT,SIGEL,SIGINEL,SIGQE,SIGSD,SIGQSD,SIGPPT,
+     &     SIGPPEL,SIGPPSD
+      INTEGER ITG
+      COMMON /NUCSIG/ SIGT,SIGEL,SIGINEL,SIGQE,SIGSD,
+     +     SIGQSD,SIGPPT,SIGPPEL,SIGPPSD,ITG
+
+c     external
+      DOUBLE PRECISION SQS,SIGPROD,SIGBDIF,SIGELA
+      INTEGER L,IAT
+
+c     internal
+      DOUBLE PRECISION ALAM,T,AL
+      INTEGER IPARM,ICSMOD,IK,J1
+      SAVE
+      IF(NSQS.LE.0) THEN
+        WRITE(LUN,'(//,1X,A)') 
+     &    ' SIB_SIGMA_HNUC: interpolation table not initialized.'
+        STOP
+      ENDIF
+      IF(IAT.eq.0.or.IAT.eq.14.or.IAT.eq.16)THEN
+c     read cross section from table
+         IF(IAT.eq.0) THEN
+            IK=1
+         ELSEIF(IAT.eq.14)THEN
+            IK=2
+         ELSE
+            IK=3
+         ENDIF            
+         AL = LOG10(SQS)
+         J1 = INT((AL - 1.D0)*10.D0 + 1)
+         if((j1.lt.1).or.(j1.gt.NSQS)) then
+            if (ndebug .gt. 0) 
+     &           write (LUN,'(1x,a,i3,1p,e12.3)') 
+     &           ' SIB_SIGMA_HNUC: energy out of range ',L,sqs
+         endif
+         if((j1.lt.1).or.(j1.ge.NSQS)) then
+            J1 = min(J1,NSQS-1)
+            J1 = max(J1,1)
+         endif
+         T = (AL-1.D0)*10.D0 - DBLE(J1-1)
+         SIGprod = SSIGN(J1,L,IK)*(1.D0-T) + SSIGN(J1+1,L,IK)*T
+         SIGbdif = SSIGNSD(J1,L,IK)*(1.D0-T) + SSIGNSD(J1+1,L,IK)*T
+         SIGela  = SSIGNEL(J1,L,IK)*(1.D0-T) + SSIGNEL(J1+1,L,IK)*T
+      ELSEIF(IAT.lt.19)THEN
+c     calculate cross section         
+         IF(ndebug.gt.0)THEN
+            WRITE(LUN,'(1X,A,2I4,F8.2)')
+     &           'SIB_SIGMA_HNUC: L,IAT,SQS:',L,IAT,SQS
+         ENDIF
+c     calculate hadron - nucleus cross section
+c     dummy arg, coupling derived from dif xsctn
+         ALAM = 1.D0              
+c     use Sibyll p-p cross section as input
+         ICSMOD = 1             
+c     use Goulianos param. for inel. coupling param.
+         IPARM = 2 
+         CALL SIG_HAD_NUC(L,IAT,SQS,ALAM,ICSMOD,IPARM)
+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:',
+     &           SIGprod, SIGbdif, ALAM
+         ENDIF
+      ELSE
+         WRITE(LUN,'(//,1X,A)') 
+     &     ' SIB_SIGMA_HNUC: number of target nucleons too large!',
+     &     ' (0<=IAT<=18)'
+         SIGprod = -1.D0
+      ENDIF
+      RETURN
+      END
+
+C----------------------------------------------------------------------
+C     sampling routines for hard partons in SIBYLL
+C     includes GRV98 pdf table and initialization routines
+C----------------------------------------------------------------------
+C=======================================================================
+
+      SUBROUTINE SAMPLE_HARD (L,X1,X2,PT)
+
+C-----------------------------------------------------------------------
+C...Routine for sampling the kinematical variables 
+C.  that determine a jet-jet (gluon - gluon) system (x1,x2, pT) 
+C.  from the differential cross section:
+C.     d3sigma/(dx1 dx2 dpT)
+C.  This version assumes the `single parton approximation'
+C.  INPUT:  L=1 incident proton, L=2  incident pi
+C.          NPLD: position on parton stack
+C.  OUTPUT:  gluon 4momenta
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+c     external types
+      INTEGER L
+      DOUBLE PRECISION X1,X2,PT
+      
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+      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
+c     internal types
+      DOUBLE PRECISION Z1,Z2,SIG,S_RNDM,Q2,ZSAMPLE      
+      SAVE
+ 
+      IF(ndebug.gt.2)then
+         write(lun,*) ' SAMPLE_HARD: (SQS,S,PTmin,Xmin,Zmin)',
+     &        SQS,S,PTmin,Xmin,Zmin
+      endif
+
+ 100  Z1=ZSAMPLE (ZMIN,L)       ! beam L=1,2 for proton or pion
+      Z2=ZSAMPLE (ZMIN,1)       ! target always a nucleon
+      SIG=1.D0-XMIN*dEXP(-Z1-Z2)
+      IF (SIG .LT. S_RNDM(0))  GOTO 100      
+      X1=dEXP(Z1)
+      X2=dEXP(Z2)
+      IF (X1.gt.0.9D0.or.X2.gt.0.9D0) GOTO 100
+      Q2=PTmin**2/(1.D0-S_RNDM(L)*SIG)
+      IF(Q2.gt.S*X1*X2) goto 100
+      PT=dSQRT(Q2*(1.D0-Q2/(S*X1*X2)))
+
+      IF(ndebug.gt.2)then
+         write(lun,*) ' SAMPLE_HARD: (X1,X2,PT)',
+     &        X1,X2,PT
+      endif
+
+      RETURN
+      END
+
+C=======================================================================
+
+      FUNCTION ZSAMPLE (ZMIN,L)
+
+C-----------------------------------------------------------------------
+C...This function returns as output a value z=log(x)
+C.  distributed as f(x) = g(x) + 4/9 *(q(x) + qbar(x))
+C.  from a minimum value ZMIN to 0,
+C.  for a proton (L=1) or a pi (L=2)
+C.  needs to be initialised with: CALL ZSAMPLE_INI
+C.....................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      COMMON /S_CZGEN/ XA(2),XB(2),XMAX,ZA(2),ZB(2),ZMAX,
+     +     DX(2),DZ(2),APART(2),FFA(2),FFB(2),
+     +     DFX(2),DFZ(2),XX(200,2),ZZ(200,2),FFX(200,2),FFZ(200,2),
+     +     NX,NZ
+      PARAMETER (b=0.268D0)
+      PARAMETER (bpi=3.7D0)
+      PARAMETER (cpi=0.698D0)
+      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+      SAVE
+
+      F = PART_INT(ZMIN,L)*S_RNDM(0)
+      IF (F .GE. FFA(L))  THEN
+         IF(IPAR(8).EQ.0)THEN
+            ZSAMPLE = ZA(L) - (F-FFA(L))/APART(L)
+         ELSE
+            if(L.eq.1) then
+               ZSAMPLE = -1.D0/b * dLOG( 1.D0 - F / APART(L) ) 
+            else
+               ZSAMPLE = -1.D0 * ( (F - cpi)/APART(L) )**(1.D0/bpi)
+            endif
+         ENDIF
+      ELSE IF (F .GE. FFB(L))  THEN
+         JF = INT((F-FFB(L))/DFZ(L) + 1.D0)
+         JF = min(JF,199)
+         F0 = FFB(L) + DFZ(L)*DBLE(JF-1)
+         T = (F-F0)/DFZ(L)
+         ZSAMPLE = ZZ(JF,L)*(1.D0-T)+ZZ(JF+1,L)*T
+      ELSE
+         JF = INT(F/DFX(L)+1.D0)
+         JF = min(JF,199)
+         F0 = DFX(L)*DBLE(JF-1)
+         T = (F-F0)/DFX(L)
+         X = XX(JF,L)*(1.D0-T)+XX(JF+1,L)*T
+         ZSAMPLE = dLOG(X)
+      ENDIF
+
+      RETURN
+      END
+
+C=======================================================================
+
+      FUNCTION PART_INT (ZMIN,L)
+
+C-----------------------------------------------------------------------
+C...This function returns as output the integral of
+C.  the parton structure function:
+C.     f(x) = g(x) + 4/9 *(q(x) + qbar(x))
+C.  from xmin = exp(zmin) to 1 
+C.  for a proton (L=1) or a pi (L=2)
+C.  needs to be initialised with: CALL ZSAMPLE_INI
+C.....................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      COMMON /S_CZGEN/ XA(2),XB(2),XMAX,ZA(2),ZB(2),ZMAX,
+     +     DX(2),DZ(2),APART(2),FFA(2),FFB(2),
+     +     DFX(2),DFZ(2),XX(200,2),ZZ(200,2),FFX(200,2),FFZ(200,2),
+     +     NX,NZ
+      DOUBLE PRECISION b,bpi,cpi
+      PARAMETER (b=0.268D0)
+      PARAMETER (bpi=3.7D0)
+      PARAMETER (cpi=0.698D0)
+      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+      SAVE
+
+      IF (ZMIN .LT. ZA(L))  THEN
+         IF(IPAR(8).EQ.0)THEN
+            PART_INT = FFA(L) + APART(L) * (ZA(L) - ZMIN)
+         ELSE
+            if(L.eq.1) then
+               PART_INT = APART(L) * ( 1.D0 - dEXP(-b*ZMIN) ) 
+            else
+               PART_INT = APART(L) * ( -ZMIN )**bpi + cpi
+            endif
+         ENDIF
+      ELSE IF (ZMIN .LT. ZB(L)) THEN
+         JZ = INT((ZB(L)-ZMIN)/DZ(L)+1.D0)
+         JZ = min(JZ,199)
+         Z0 = ZB(L)-DZ(L)*DBLE(JZ-1)
+         T = (Z0-ZMIN)/DZ(L)
+         PART_INT = FFZ(JZ,L)*(1.D0-T) + FFZ(JZ+1,L)*T
+
+      ELSE
+         X = EXP(ZMIN)
+         JX = INT((XMAX-X)/DX(L)+1.D0)
+         JX = min(JX,199)
+         X0 = XMAX-DX(L)*DBLE(JX-1)
+         T = (X0-X)/DX(L)
+         PART_INT = FFX(JX,L)*(1.D0-T) + FFX(JX+1,L)*T
+      
+      ENDIF
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE GRV_INI
+
+C-----------------------------------------------------------------------
+C...This subroutine initializes the COMMON block
+C   used for sampling z, according to the GRV98LO
+C   pdf set
+C..................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      COMMON /S_CZGEN/ XA(2),XB(2),XMAX,ZA(2),ZB(2),ZMAX,
+     +     DX(2),DZ(2),APART(2),FFA(2),FFB(2),
+     +     DFX(2),DFZ(2),XX(200,2),ZZ(200,2),FFX(200,2),FFZ(200,2),
+     +     NX,NZ
+      DOUBLE PRECISION b,bpi,cpi
+      PARAMETER (b=0.268D0)
+      PARAMETER (bpi=3.7D0)
+      PARAMETER (cpi=0.698D0)
+      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+      SAVE
+
+      IPAR(8) = 1
+
+      XA(1) = 1.D-06
+      XB(1) = 1.D-01
+
+      XA(2) = 1.D-04
+      XB(2) = 1.D-01
+
+      XMAX = 0.8D0
+      ZMAX = dLOG(XMAX)
+      NX = 200
+      NZ = 200
+
+      DO L=1,2
+
+         ZA(L) = dLOG(XA(L))
+         ZB(L) = dLOG(XB(L))
+         DX(L) = (XMAX-XB(L))/DBLE(NX)
+         DZ(L) = (ZB(L)-ZA(L))/DBLE(NZ)
+
+C     large x: interpolation in x
+         FFX(1,L) = 0.D0
+         DO J=2,NX
+            X = XMAX - DX(L)*(DBLE(J)-1.D0)
+            G = PARTON(X,L)/X
+            FFX(J,L) = FFX(J-1,L)+G*DX(L)
+         ENDDO
+         CALL INVERT_ARRAY (FFX(1,L),XMAX,-DX(L),NX,XX(1,L),FMIN,DFX(L))
+
+C     small x: interpolation in log(x)
+         FFZ(1,L) = FFX(NX,L)
+         DO J=2,NZ
+            Z = ZB(L) - DZ(L)*(DBLE(J)-1.D0)
+            X = dEXP(Z)
+            G = PARTON(X,L)
+            FFZ(J,L) = FFZ(J-1,L)+G*DZ(L)
+         ENDDO
+         CALL INVERT_ARRAY(FFZ(1,L),ZB(L),-DZ(L),NZ,ZZ(1,L),FMIN,DFZ(L))
+         FFA(L) = FFZ(NZ,L)
+         FFB(L) = FFX(NX,L)
+         
+C     very small x:  f(x) = A/x**b b=1.268
+         IF(L.eq.1) THEN
+            APART(L) = FFA(L) / ( 1.D0 - dEXP(-b*ZA(L)) )
+         ELSE
+            APART(L) = ( FFA(L) - cpi ) / ( -ZA(L) )**bpi
+         ENDIF
+      ENDDO
+
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE ZSAMPLE_INI
+
+C-----------------------------------------------------------------------
+C...This subroutine initialise the generation of
+C.  z = log(x)  for the generation  of z according
+C.  to the structure functions
+C..................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      COMMON /S_CZGEN/ XA(2),XB(2),XMAX,ZA(2),ZB(2),ZMAX,
+     +     DX(2),DZ(2),APART(2),FFA(2),FFB(2),
+     +     DFX(2),DFZ(2),XX(200,2),ZZ(200,2),FFX(200,2),FFZ(200,2),
+     +     NX,NZ
+      SAVE
+
+      IPAR(8) = 0
+
+      XA(1) = 1.D-04
+      XB(1) = 1.D-01
+      XMAX = 0.8D0
+      ZA(1) = dLOG(XA(1))
+      ZB(1) = dLOG(XB(1))
+      ZMAX = dLOG(XMAX)
+      NX = 200
+      NZ = 200
+      DX(1) = (XMAX-XB(1))/DBLE(NX-1)
+      DZ(1) = (ZB(1)-ZA(1))/DBLE(NZ-1)
+
+      XA(2) = 1.D-04
+      XB(2) = 1.D-01
+      XMAX = 0.8D0
+      ZA(2) = dLOG(XA(2))
+      ZB(2) = dLOG(XB(2))
+      ZMAX = dLOG(XMAX)
+      NX = 200
+      NZ = 200
+      DX(2) = (XMAX-XB(2))/DBLE(NX-1)
+      DZ(2) = (ZB(2)-ZA(2))/DBLE(NZ-1)
+
+      DO L=1,2
+            
+C     very small x:  f(x) = A/x
+         APART(L) = PARTON(0.D0,L)
+            
+C         large x: interpolation in x
+         FFX(1,L) = 0.D0
+         DO J=2,NX
+            X = XMAX - DX(L)*(DBLE(J)-0.5D0)
+            G = PARTON(X,L)/X
+            FFX(J,L) = FFX(J-1,L)+G*DX(L)
+         ENDDO
+         CALL INVERT_ARRAY (FFX(1,L),XMAX,-DX(L),NX,XX(1,L),FMIN,DFX(L))
+            
+C     small x: interpolation in log(x)
+         FFZ(1,L) = FFX(NX,L)
+         DO J=2,NZ
+            Z = ZB(L) - DZ(L)*(DBLE(J)-0.5D0)
+            X = dEXP(Z)
+            G = PARTON(X,L)
+            FFZ(J,L) = FFZ(J-1,L)+G*DZ(L)
+         ENDDO
+         CALL INVERT_ARRAY(FFZ(1,L),ZB(L),-DZ(L),NZ,ZZ(1,L),FMIN,DFZ(L))
+         FFA(L) = FFZ(NZ,L)
+         FFB(L) = FFX(NX,L)
+         
+      ENDDO
+      RETURN
+      END
+
+C=======================================================================
+
+      FUNCTION PARTON(X,L)
+
+C-----------------------------------------------------------------------
+C...This function returns the structure function
+C.   f(x) = x * [ g(x) + 4/9 *(q(x) + qbar(x)) ]
+C.  for a proton. 
+C................................................
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      PARAMETER (beta=1.925978D0)
+      SAVE
+      DATA NOUTP /0/
+
+c     effective scale
+      Q2inp = PAR(22)
+      IF (L .EQ. 2)  GOTO 1000
+
+      IF(IPAR(8).eq.0) THEN
+C...  Eichten et al.  (set 1)
+c     tp060203 100      uv = 1.78 * x**0.5 * (1.-x**1.51)**3.5
+         uv = 1.78D0 * x**0.5D0 * (1.D0-x**1.51D0)**3.5D0
+         dv = 0.67D0 * x**0.4D0 * (1.D0-x**1.51D0)**4.5D0
+         us = 0.182D0 * (1.D0-x)**8.54D0
+         ss = 0.081D0 * (1.D0-x)**8.54D0
+         qq0 = uv + dv + 4.D0*us + 2.D0*ss
+         glu0 = (2.62D0 + 9.17D0*x)* (1.D0-x)**5.9D0
+      ELSE
+         IF( NOUTP.eq.0 ) print *,' using GRV pdf set'
+         IF( NOUTP.eq.0 ) print *,' Q2 scale in pdf:',Q2INP
+         NOUTP = 1
+
+         CALL SIB_DOR98LO (X, Q2inp, UV, DV, US, DS, SS, GL)
+         qq0 = uv + dv + 4.D0* (us + ds) + 2.D0*ss
+         glu0 = gl
+      ENDIF
+      parton = glu0 + 4.D0/9.D0*qq0
+      RETURN
+
+ 1000 CONTINUE
+      IF(IPAR(8).eq.0) THEN
+C...Owens set 1   from STRF from Wisc. Pheno. group. for q2=q2_min
+         AV=0.4D0
+         BV=0.7D0
+c      BETA=GGAMMA(AV)*GGAMMA(BV+1.)/GGAMMA(AV+BV+1.)  =1.925978
+         uv=X**(AV)*(1.D0-X)**BV/BETA
+         dv=uv
+
+         A=0.9D0
+         BET=5.D0
+         us=(A*(1.D0-X)**BET)/6.D0
+         
+         A=0.888D0
+         BET=3.11D0
+         GA1=6.D0
+         glu0=A*(1.D0-X)**BET*(1.D0+GA1*X)
+c   Bug Fix thanks to Sue Kashahara- correct factor in front of 
+c   sea quarks for Owens S.F.  5-94
+         qq0 = uv + dv + 6.D0*us
+         parton = (glu0 + 4.D0/9.D0*qq0)
+         RETURN
+      ELSE
+
+c     duv = valence quark distribution
+c     dgl = gluon distribution
+c     dus = sea quark distribution (u,d,s)
+c     dds = sea charm quark ( neglected )
+c     dss = sea bottom quark ( neglected )
+         CALL DORPLO (X, Q2inp, uv, gl, us, ds, ss)
+         qq0 = uv + dv + 4.D0*us
+         glu0 = gl
+         parton = (glu0 + 4.D0/9.D0*qq0)
+         RETURN
+      ENDIF
+      END
+C=======================================================================
+
+      SUBROUTINE PDF_INI
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      COMMON /S_CZGEN/ XA(2),XB(2),XMAX,ZA(2),ZB(2),ZMAX,
+     +     DX(2),DZ(2),APART(2),FFA(2),FFB(2),
+     +     DFX(2),DFZ(2),XX(200,2),ZZ(200,2),FFX(200,2),FFZ(200,2),
+     +     NX,NZ
+      SAVE
+
+      IF(IPAR(8).eq.0) THEN
+         if (ndebug .gt. 0 ) WRITE(LUN,*)
+     *       ' PDF_INI: calcuLating pdf table using Eichten param..'
+         CALL ZSAMPLE_INI
+      ELSEIF(IPAR(8).eq.2) THEN
+         if (ndebug .gt. 0 ) then
+           WRITE(LUN,*)' PDF_INI: calculating pdf table using GRV',
+     *                  '  param..'
+           WRITE(LUN,*)' does not work with -fbounds-check !!'
+         endif
+         CALL GRV_INI
+      ELSE
+         if (ndebug .gt. 0 ) WRITE(LUN,*)
+     *        ' PDF_INI: using common table of GRV parametrization..'
+      ENDIF
+      if (ndebug .gt. 0 )  THEN
+           WRITE(LUN,*)APART(1),FFA(1),FFB(1),DX(1),DZ(1)
+           WRITE(LUN,*)APART(2),FFA(2),FFB(2),DX(2),DZ(2)
+      ENDIF
+      END
+
+C=======================================================================
+
+      BLOCK DATA PDFINI
+
+C-----------------------------------------------------------------------
+C..   tabled parton distribution function
+c     Proton: GRV98LO , Eur.Phys.J. C5(1998) 461-470
+c     Pion:   GRV91 , Z. Phys. C53, 651-655 (1992)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)      
+      IMPLICIT INTEGER(I-N)
+      COMMON /S_CZGEN/ XA(2),XB(2),XMAX,ZA(2),ZB(2),ZMAX,
+     +     DX(2),DZ(2),APART(2),FFA(2),FFB(2),
+     +     DFX(2),DFZ(2),XX(200,2),ZZ(200,2),FFX(200,2),FFZ(200,2),
+     +     NX,NZ
+      SAVE
+      DATA XA /1.D-06,0.0001D0/
+      DATA XB /0.1D0,0.1D0/
+      DATA XMAX /0.800000011921D0/
+      DATA ZMAX /-0.223143532872D0/
+      DATA NX /200/
+      DATA NZ /200/
+      DATA ZA /-13.8155D0,-9.21034D0/
+      DATA ZB /-2.30259D0,-2.30259D0/
+      DATA DX /0.00351759D0,0.00351759D0/
+      DATA DZ /0.0578539D0,0.0347123D0/
+      DATA DFX /0.00952501D0,0.00847474D0/
+      DATA DFZ /1.93863D0,0.326082D0/
+      DATA APART /-9.80215D0,0.0178207D0/
+      DATA FFA /387.684D0,66.5767D0/
+      DATA FFB /1.89548D0,1.68647D0/
+      
+      DATA (FFX(K,1),K=1,200 ) /
+     &0.000D+00,6.380D-05,1.315D-04,2.034D-04,2.795D-04,
+     &3.601D-04,4.454D-04,5.356D-04,6.309D-04,7.315D-04,
+     &8.377D-04,9.497D-04,1.068D-03,1.192D-03,1.323D-03,
+     &1.460D-03,1.605D-03,1.756D-03,1.916D-03,2.083D-03,
+     &2.258D-03,2.441D-03,2.633D-03,2.835D-03,3.045D-03,
+     &3.265D-03,3.496D-03,3.736D-03,3.988D-03,4.250D-03,
+     &4.524D-03,4.810D-03,5.108D-03,5.418D-03,5.742D-03,
+     &6.078D-03,6.429D-03,6.794D-03,7.174D-03,7.570D-03,
+     &7.981D-03,8.408D-03,8.852D-03,9.313D-03,9.793D-03,
+     &1.029D-02,1.081D-02,1.134D-02,1.190D-02,1.247D-02,
+     &1.307D-02,1.369D-02,1.433D-02,1.500D-02,1.568D-02,
+     &1.640D-02,1.714D-02,1.790D-02,1.869D-02,1.951D-02,
+     &2.035D-02,2.123D-02,2.213D-02,2.307D-02,2.403D-02,
+     &2.503D-02,2.607D-02,2.713D-02,2.823D-02,2.937D-02,
+     &3.054D-02,3.176D-02,3.301D-02,3.430D-02,3.563D-02,
+     &3.701D-02,3.842D-02,3.989D-02,4.139D-02,4.295D-02,
+     &4.455D-02,4.620D-02,4.791D-02,4.966D-02,5.147D-02,
+     &5.334D-02,5.526D-02,5.724D-02,5.927D-02,6.137D-02,
+     &6.353D-02,6.576D-02,6.805D-02,7.041D-02,7.284D-02,
+     &7.534D-02,7.791D-02,8.056D-02,8.329D-02,8.609D-02,
+     &8.898D-02,9.195D-02,9.500D-02,9.814D-02,1.014D-01,
+     &1.047D-01,1.081D-01,1.116D-01,1.153D-01,1.190D-01,
+     &1.228D-01,1.267D-01,1.308D-01,1.350D-01,1.392D-01,
+     &1.436D-01,1.481D-01,1.528D-01,1.575D-01,1.624D-01,
+     &1.674D-01,1.725D-01,1.778D-01,1.832D-01,1.888D-01,
+     &1.946D-01,2.005D-01,2.066D-01,2.128D-01,2.193D-01,
+     &2.259D-01,2.327D-01,2.397D-01,2.469D-01,2.543D-01,
+     &2.619D-01,2.698D-01,2.778D-01,2.862D-01,2.947D-01,
+     &3.035D-01,3.125D-01,3.218D-01,3.314D-01,3.413D-01,
+     &3.514D-01,3.618D-01,3.726D-01,3.836D-01,3.950D-01,
+     &4.067D-01,4.188D-01,4.312D-01,4.440D-01,4.572D-01,
+     &4.708D-01,4.848D-01,4.992D-01,5.141D-01,5.294D-01,
+     &5.452D-01,5.615D-01,5.783D-01,5.956D-01,6.134D-01,
+     &6.319D-01,6.509D-01,6.706D-01,6.909D-01,7.118D-01,
+     &7.334D-01,7.558D-01,7.789D-01,8.029D-01,8.276D-01,
+     &8.532D-01,8.797D-01,9.072D-01,9.356D-01,9.650D-01,
+     &9.956D-01,1.027D+00,1.060D+00,1.094D+00,1.130D+00,
+     &1.167D+00,1.205D+00,1.245D+00,1.287D+00,1.331D+00,
+     &1.376D+00,1.423D+00,1.473D+00,1.525D+00,1.579D+00,
+     &1.636D+00,1.696D+00,1.759D+00,1.826D+00,1.895D+00/
+      
+      DATA (FFX(K,2),K=1,200 ) /
+     &0.000D+00,7.266D-04,1.470D-03,2.231D-03,3.009D-03,
+     &3.805D-03,4.619D-03,5.450D-03,6.300D-03,7.168D-03,
+     &8.055D-03,8.961D-03,9.886D-03,1.083D-02,1.179D-02,
+     &1.278D-02,1.378D-02,1.481D-02,1.585D-02,1.692D-02,
+     &1.800D-02,1.911D-02,2.024D-02,2.139D-02,2.256D-02,
+     &2.376D-02,2.498D-02,2.622D-02,2.748D-02,2.877D-02,
+     &3.008D-02,3.142D-02,3.278D-02,3.416D-02,3.557D-02,
+     &3.701D-02,3.847D-02,3.996D-02,4.147D-02,4.301D-02,
+     &4.458D-02,4.617D-02,4.779D-02,4.945D-02,5.112D-02,
+     &5.283D-02,5.457D-02,5.634D-02,5.813D-02,5.996D-02,
+     &6.182D-02,6.371D-02,6.563D-02,6.759D-02,6.957D-02,
+     &7.159D-02,7.365D-02,7.573D-02,7.786D-02,8.001D-02,
+     &8.221D-02,8.443D-02,8.670D-02,8.900D-02,9.134D-02,
+     &9.372D-02,9.614D-02,9.860D-02,1.011D-01,1.036D-01,
+     &1.062D-01,1.088D-01,1.115D-01,1.142D-01,1.170D-01,
+     &1.197D-01,1.226D-01,1.255D-01,1.284D-01,1.314D-01,
+     &1.344D-01,1.375D-01,1.406D-01,1.438D-01,1.470D-01,
+     &1.503D-01,1.536D-01,1.570D-01,1.605D-01,1.640D-01,
+     &1.675D-01,1.712D-01,1.748D-01,1.786D-01,1.824D-01,
+     &1.862D-01,1.901D-01,1.941D-01,1.982D-01,2.023D-01,
+     &2.065D-01,2.107D-01,2.151D-01,2.195D-01,2.239D-01,
+     &2.285D-01,2.331D-01,2.378D-01,2.426D-01,2.474D-01,
+     &2.524D-01,2.574D-01,2.625D-01,2.677D-01,2.730D-01,
+     &2.784D-01,2.839D-01,2.895D-01,2.951D-01,3.009D-01,
+     &3.068D-01,3.128D-01,3.189D-01,3.251D-01,3.314D-01,
+     &3.378D-01,3.443D-01,3.510D-01,3.578D-01,3.647D-01,
+     &3.717D-01,3.789D-01,3.862D-01,3.937D-01,4.012D-01,
+     &4.090D-01,4.169D-01,4.249D-01,4.331D-01,4.415D-01,
+     &4.500D-01,4.587D-01,4.676D-01,4.767D-01,4.859D-01,
+     &4.954D-01,5.050D-01,5.148D-01,5.249D-01,5.352D-01,
+     &5.457D-01,5.564D-01,5.674D-01,5.786D-01,5.901D-01,
+     &6.019D-01,6.139D-01,6.262D-01,6.388D-01,6.517D-01,
+     &6.649D-01,6.785D-01,6.923D-01,7.066D-01,7.212D-01,
+     &7.362D-01,7.516D-01,7.673D-01,7.836D-01,8.002D-01,
+     &8.174D-01,8.350D-01,8.532D-01,8.718D-01,8.911D-01,
+     &9.109D-01,9.313D-01,9.524D-01,9.742D-01,9.966D-01,
+     &1.020D+00,1.044D+00,1.069D+00,1.094D+00,1.121D+00,
+     &1.149D+00,1.177D+00,1.207D+00,1.238D+00,1.271D+00,
+     &1.304D+00,1.339D+00,1.376D+00,1.414D+00,1.454D+00,
+     &1.496D+00,1.540D+00,1.586D+00,1.635D+00,1.686D+00/
+      
+      DATA (FFZ(K,1),K=1,200 ) /
+     &1.895D+00,2.014D+00,2.137D+00,2.263D+00,2.393D+00,
+     &2.527D+00,2.665D+00,2.807D+00,2.953D+00,3.103D+00,
+     &3.257D+00,3.417D+00,3.580D+00,3.748D+00,3.921D+00,
+     &4.098D+00,4.281D+00,4.469D+00,4.663D+00,4.861D+00,
+     &5.065D+00,5.274D+00,5.489D+00,5.710D+00,5.937D+00,
+     &6.170D+00,6.409D+00,6.654D+00,6.906D+00,7.164D+00,
+     &7.430D+00,7.702D+00,7.981D+00,8.267D+00,8.561D+00,
+     &8.862D+00,9.171D+00,9.487D+00,9.811D+00,1.014D+01,
+     &1.048D+01,1.083D+01,1.119D+01,1.156D+01,1.193D+01,
+     &1.232D+01,1.271D+01,1.311D+01,1.352D+01,1.395D+01,
+     &1.438D+01,1.482D+01,1.527D+01,1.573D+01,1.621D+01,
+     &1.669D+01,1.718D+01,1.769D+01,1.821D+01,1.874D+01,
+     &1.928D+01,1.983D+01,2.040D+01,2.097D+01,2.156D+01,
+     &2.217D+01,2.278D+01,2.341D+01,2.406D+01,2.471D+01,
+     &2.539D+01,2.607D+01,2.677D+01,2.749D+01,2.822D+01,
+     &2.896D+01,2.973D+01,3.050D+01,3.130D+01,3.211D+01,
+     &3.293D+01,3.378D+01,3.464D+01,3.552D+01,3.642D+01,
+     &3.733D+01,3.827D+01,3.922D+01,4.020D+01,4.119D+01,
+     &4.220D+01,4.323D+01,4.429D+01,4.536D+01,4.646D+01,
+     &4.758D+01,4.872D+01,4.988D+01,5.106D+01,5.227D+01,
+     &5.350D+01,5.476D+01,5.604D+01,5.735D+01,5.868D+01,
+     &6.003D+01,6.142D+01,6.282D+01,6.426D+01,6.572D+01,
+     &6.721D+01,6.873D+01,7.028D+01,7.186D+01,7.346D+01,
+     &7.510D+01,7.677D+01,7.847D+01,8.020D+01,8.196D+01,
+     &8.375D+01,8.558D+01,8.744D+01,8.934D+01,9.127D+01,
+     &9.324D+01,9.524D+01,9.728D+01,9.936D+01,1.015D+02,
+     &1.036D+02,1.058D+02,1.080D+02,1.103D+02,1.126D+02,
+     &1.150D+02,1.174D+02,1.198D+02,1.223D+02,1.248D+02,
+     &1.274D+02,1.300D+02,1.327D+02,1.354D+02,1.381D+02,
+     &1.409D+02,1.438D+02,1.467D+02,1.496D+02,1.526D+02,
+     &1.557D+02,1.588D+02,1.619D+02,1.652D+02,1.684D+02,
+     &1.718D+02,1.751D+02,1.786D+02,1.821D+02,1.856D+02,
+     &1.892D+02,1.929D+02,1.967D+02,2.005D+02,2.043D+02,
+     &2.083D+02,2.122D+02,2.163D+02,2.204D+02,2.246D+02,
+     &2.289D+02,2.332D+02,2.376D+02,2.421D+02,2.467D+02,
+     &2.513D+02,2.560D+02,2.608D+02,2.656D+02,2.706D+02,
+     &2.756D+02,2.807D+02,2.859D+02,2.911D+02,2.965D+02,
+     &3.019D+02,3.074D+02,3.130D+02,3.187D+02,3.245D+02,
+     &3.304D+02,3.364D+02,3.425D+02,3.486D+02,3.549D+02,
+     &3.612D+02,3.677D+02,3.743D+02,3.809D+02,3.877D+02/
+      
+      DATA (FFZ(K,2),K=1,200 ) /
+     &1.686D+00,1.738D+00,1.791D+00,1.844D+00,1.899D+00,
+     &1.955D+00,2.011D+00,2.069D+00,2.128D+00,2.188D+00,
+     &2.249D+00,2.311D+00,2.374D+00,2.438D+00,2.504D+00,
+     &2.570D+00,2.638D+00,2.708D+00,2.778D+00,2.850D+00,
+     &2.923D+00,2.997D+00,3.072D+00,3.149D+00,3.228D+00,
+     &3.307D+00,3.388D+00,3.471D+00,3.555D+00,3.640D+00,
+     &3.727D+00,3.815D+00,3.905D+00,3.997D+00,4.090D+00,
+     &4.184D+00,4.281D+00,4.378D+00,4.478D+00,4.579D+00,
+     &4.682D+00,4.787D+00,4.893D+00,5.002D+00,5.112D+00,
+     &5.224D+00,5.337D+00,5.453D+00,5.571D+00,5.690D+00,
+     &5.811D+00,5.935D+00,6.060D+00,6.188D+00,6.317D+00,
+     &6.449D+00,6.583D+00,6.719D+00,6.857D+00,6.997D+00,
+     &7.139D+00,7.284D+00,7.431D+00,7.580D+00,7.732D+00,
+     &7.886D+00,8.042D+00,8.201D+00,8.363D+00,8.526D+00,
+     &8.693D+00,8.862D+00,9.033D+00,9.207D+00,9.384D+00,
+     &9.563D+00,9.746D+00,9.930D+00,1.012D+01,1.031D+01,
+     &1.050D+01,1.070D+01,1.090D+01,1.110D+01,1.130D+01,
+     &1.151D+01,1.172D+01,1.194D+01,1.215D+01,1.237D+01,
+     &1.260D+01,1.283D+01,1.306D+01,1.329D+01,1.353D+01,
+     &1.377D+01,1.401D+01,1.426D+01,1.451D+01,1.476D+01,
+     &1.502D+01,1.528D+01,1.554D+01,1.581D+01,1.608D+01,
+     &1.636D+01,1.664D+01,1.692D+01,1.721D+01,1.750D+01,
+     &1.780D+01,1.810D+01,1.840D+01,1.871D+01,1.902D+01,
+     &1.934D+01,1.966D+01,1.998D+01,2.031D+01,2.065D+01,
+     &2.098D+01,2.133D+01,2.167D+01,2.203D+01,2.238D+01,
+     &2.274D+01,2.311D+01,2.348D+01,2.385D+01,2.423D+01,
+     &2.462D+01,2.501D+01,2.541D+01,2.581D+01,2.621D+01,
+     &2.662D+01,2.704D+01,2.746D+01,2.789D+01,2.832D+01,
+     &2.875D+01,2.920D+01,2.965D+01,3.010D+01,3.056D+01,
+     &3.103D+01,3.150D+01,3.198D+01,3.246D+01,3.295D+01,
+     &3.344D+01,3.395D+01,3.445D+01,3.497D+01,3.549D+01,
+     &3.601D+01,3.655D+01,3.709D+01,3.763D+01,3.819D+01,
+     &3.875D+01,3.931D+01,3.989D+01,4.047D+01,4.105D+01,
+     &4.165D+01,4.225D+01,4.286D+01,4.347D+01,4.410D+01,
+     &4.473D+01,4.537D+01,4.601D+01,4.666D+01,4.732D+01,
+     &4.799D+01,4.867D+01,4.935D+01,5.005D+01,5.075D+01,
+     &5.146D+01,5.217D+01,5.290D+01,5.363D+01,5.437D+01,
+     &5.512D+01,5.588D+01,5.665D+01,5.743D+01,5.821D+01,
+     &5.901D+01,5.981D+01,6.062D+01,6.145D+01,6.228D+01,
+     &6.312D+01,6.397D+01,6.483D+01,6.570D+01,6.658D+01/
+      
+      DATA (XX(K,1),K=1,200 ) /
+     &8.000D-01,6.472D-01,5.944D-01,5.597D-01,5.335D-01,
+     &5.121D-01,4.941D-01,4.785D-01,4.647D-01,4.522D-01,
+     &4.409D-01,4.306D-01,4.210D-01,4.122D-01,4.039D-01,
+     &3.961D-01,3.887D-01,3.817D-01,3.751D-01,3.688D-01,
+     &3.628D-01,3.571D-01,3.516D-01,3.463D-01,3.413D-01,
+     &3.365D-01,3.318D-01,3.273D-01,3.230D-01,3.188D-01,
+     &3.147D-01,3.108D-01,3.070D-01,3.033D-01,2.998D-01,
+     &2.963D-01,2.929D-01,2.896D-01,2.864D-01,2.833D-01,
+     &2.802D-01,2.773D-01,2.744D-01,2.715D-01,2.688D-01,
+     &2.661D-01,2.634D-01,2.608D-01,2.583D-01,2.558D-01,
+     &2.534D-01,2.510D-01,2.487D-01,2.464D-01,2.442D-01,
+     &2.420D-01,2.398D-01,2.377D-01,2.356D-01,2.336D-01,
+     &2.316D-01,2.296D-01,2.277D-01,2.257D-01,2.239D-01,
+     &2.220D-01,2.202D-01,2.184D-01,2.167D-01,2.150D-01,
+     &2.132D-01,2.116D-01,2.099D-01,2.083D-01,2.067D-01,
+     &2.051D-01,2.036D-01,2.020D-01,2.005D-01,1.990D-01,
+     &1.976D-01,1.961D-01,1.947D-01,1.933D-01,1.919D-01,
+     &1.905D-01,1.891D-01,1.878D-01,1.865D-01,1.852D-01,
+     &1.839D-01,1.826D-01,1.814D-01,1.801D-01,1.789D-01,
+     &1.777D-01,1.765D-01,1.753D-01,1.741D-01,1.730D-01,
+     &1.718D-01,1.707D-01,1.696D-01,1.685D-01,1.674D-01,
+     &1.663D-01,1.653D-01,1.642D-01,1.632D-01,1.622D-01,
+     &1.611D-01,1.601D-01,1.591D-01,1.581D-01,1.572D-01,
+     &1.562D-01,1.552D-01,1.543D-01,1.534D-01,1.524D-01,
+     &1.515D-01,1.506D-01,1.497D-01,1.488D-01,1.479D-01,
+     &1.471D-01,1.462D-01,1.453D-01,1.445D-01,1.437D-01,
+     &1.428D-01,1.420D-01,1.412D-01,1.404D-01,1.396D-01,
+     &1.388D-01,1.380D-01,1.372D-01,1.365D-01,1.357D-01,
+     &1.349D-01,1.342D-01,1.335D-01,1.327D-01,1.320D-01,
+     &1.313D-01,1.306D-01,1.299D-01,1.292D-01,1.284D-01,
+     &1.278D-01,1.271D-01,1.264D-01,1.257D-01,1.251D-01,
+     &1.244D-01,1.237D-01,1.231D-01,1.224D-01,1.218D-01,
+     &1.212D-01,1.205D-01,1.199D-01,1.193D-01,1.187D-01,
+     &1.181D-01,1.175D-01,1.169D-01,1.163D-01,1.157D-01,
+     &1.151D-01,1.145D-01,1.139D-01,1.134D-01,1.128D-01,
+     &1.123D-01,1.117D-01,1.112D-01,1.106D-01,1.101D-01,
+     &1.095D-01,1.090D-01,1.085D-01,1.079D-01,1.074D-01,
+     &1.069D-01,1.064D-01,1.059D-01,1.054D-01,1.049D-01,
+     &1.044D-01,1.039D-01,1.034D-01,1.029D-01,1.024D-01,
+     &1.019D-01,1.014D-01,1.010D-01,1.005D-01,1.000D-01/
+      
+      DATA (XX(K,2),K=1,200 ) /
+     &8.000D-01,7.632D-01,7.331D-01,7.073D-01,6.846D-01,
+     &6.643D-01,6.458D-01,6.289D-01,6.132D-01,5.986D-01,
+     &5.849D-01,5.721D-01,5.600D-01,5.485D-01,5.376D-01,
+     &5.272D-01,5.172D-01,5.077D-01,4.986D-01,4.899D-01,
+     &4.815D-01,4.734D-01,4.656D-01,4.581D-01,4.508D-01,
+     &4.438D-01,4.370D-01,4.304D-01,4.240D-01,4.178D-01,
+     &4.118D-01,4.059D-01,4.002D-01,3.947D-01,3.893D-01,
+     &3.840D-01,3.789D-01,3.739D-01,3.690D-01,3.643D-01,
+     &3.597D-01,3.551D-01,3.507D-01,3.464D-01,3.421D-01,
+     &3.380D-01,3.340D-01,3.300D-01,3.261D-01,3.223D-01,
+     &3.186D-01,3.150D-01,3.114D-01,3.079D-01,3.045D-01,
+     &3.011D-01,2.978D-01,2.945D-01,2.914D-01,2.883D-01,
+     &2.852D-01,2.822D-01,2.792D-01,2.763D-01,2.735D-01,
+     &2.707D-01,2.679D-01,2.652D-01,2.625D-01,2.599D-01,
+     &2.574D-01,2.548D-01,2.523D-01,2.499D-01,2.475D-01,
+     &2.451D-01,2.428D-01,2.405D-01,2.382D-01,2.360D-01,
+     &2.338D-01,2.316D-01,2.295D-01,2.274D-01,2.254D-01,
+     &2.233D-01,2.213D-01,2.193D-01,2.174D-01,2.155D-01,
+     &2.136D-01,2.117D-01,2.099D-01,2.081D-01,2.063D-01,
+     &2.045D-01,2.028D-01,2.011D-01,1.994D-01,1.977D-01,
+     &1.961D-01,1.944D-01,1.929D-01,1.913D-01,1.897D-01,
+     &1.882D-01,1.867D-01,1.851D-01,1.837D-01,1.822D-01,
+     &1.808D-01,1.793D-01,1.779D-01,1.765D-01,1.752D-01,
+     &1.738D-01,1.725D-01,1.711D-01,1.698D-01,1.686D-01,
+     &1.673D-01,1.660D-01,1.648D-01,1.635D-01,1.623D-01,
+     &1.611D-01,1.599D-01,1.588D-01,1.576D-01,1.564D-01,
+     &1.553D-01,1.542D-01,1.531D-01,1.520D-01,1.509D-01,
+     &1.498D-01,1.488D-01,1.477D-01,1.467D-01,1.457D-01,
+     &1.447D-01,1.437D-01,1.427D-01,1.417D-01,1.407D-01,
+     &1.398D-01,1.388D-01,1.379D-01,1.369D-01,1.360D-01,
+     &1.351D-01,1.342D-01,1.333D-01,1.324D-01,1.316D-01,
+     &1.307D-01,1.299D-01,1.290D-01,1.282D-01,1.273D-01,
+     &1.265D-01,1.257D-01,1.249D-01,1.241D-01,1.233D-01,
+     &1.225D-01,1.218D-01,1.210D-01,1.203D-01,1.195D-01,
+     &1.188D-01,1.180D-01,1.173D-01,1.166D-01,1.159D-01,
+     &1.152D-01,1.144D-01,1.138D-01,1.131D-01,1.124D-01,
+     &1.117D-01,1.110D-01,1.104D-01,1.097D-01,1.091D-01,
+     &1.084D-01,1.078D-01,1.072D-01,1.065D-01,1.059D-01,
+     &1.053D-01,1.047D-01,1.041D-01,1.035D-01,1.029D-01,
+     &1.023D-01,1.017D-01,1.012D-01,1.006D-01,1.000D-01/
+      
+      DATA (ZZ(K,1),K=1,200 ) /
+     &-2.303D+00,-3.084D+00,-3.649D+00,-4.098D+00,
+     &-4.472D+00,-4.795D+00,-5.080D+00,-5.335D+00,
+     &-5.568D+00,-5.781D+00,-5.978D+00,-6.161D+00,
+     &-6.333D+00,-6.494D+00,-6.647D+00,-6.792D+00,
+     &-6.929D+00,-7.060D+00,-7.186D+00,-7.306D+00,
+     &-7.421D+00,-7.532D+00,-7.639D+00,-7.742D+00,
+     &-7.842D+00,-7.938D+00,-8.031D+00,-8.122D+00,
+     &-8.210D+00,-8.295D+00,-8.378D+00,-8.459D+00,
+     &-8.538D+00,-8.614D+00,-8.689D+00,-8.762D+00,
+     &-8.834D+00,-8.904D+00,-8.972D+00,-9.039D+00,
+     &-9.104D+00,-9.168D+00,-9.231D+00,-9.293D+00,
+     &-9.353D+00,-9.412D+00,-9.470D+00,-9.528D+00,
+     &-9.584D+00,-9.639D+00,-9.693D+00,-9.746D+00,
+     &-9.799D+00,-9.851D+00,-9.901D+00,-9.951D+00,
+     &-1.000D+01,-1.005D+01,-1.010D+01,-1.014D+01,
+     &-1.019D+01,-1.024D+01,-1.028D+01,-1.033D+01,
+     &-1.037D+01,-1.041D+01,-1.046D+01,-1.050D+01,
+     &-1.054D+01,-1.058D+01,-1.062D+01,-1.066D+01,
+     &-1.070D+01,-1.074D+01,-1.078D+01,-1.082D+01,
+     &-1.086D+01,-1.089D+01,-1.093D+01,-1.097D+01,
+     &-1.101D+01,-1.104D+01,-1.108D+01,-1.111D+01,
+     &-1.115D+01,-1.118D+01,-1.122D+01,-1.125D+01,
+     &-1.128D+01,-1.132D+01,-1.135D+01,-1.138D+01,
+     &-1.141D+01,-1.145D+01,-1.148D+01,-1.151D+01,
+     &-1.154D+01,-1.157D+01,-1.160D+01,-1.163D+01,
+     &-1.166D+01,-1.169D+01,-1.172D+01,-1.175D+01,
+     &-1.178D+01,-1.181D+01,-1.184D+01,-1.186D+01,
+     &-1.189D+01,-1.192D+01,-1.195D+01,-1.198D+01,
+     &-1.200D+01,-1.203D+01,-1.206D+01,-1.208D+01,
+     &-1.211D+01,-1.214D+01,-1.216D+01,-1.219D+01,
+     &-1.221D+01,-1.224D+01,-1.226D+01,-1.229D+01,
+     &-1.231D+01,-1.234D+01,-1.236D+01,-1.239D+01,
+     &-1.241D+01,-1.244D+01,-1.246D+01,-1.248D+01,
+     &-1.251D+01,-1.253D+01,-1.255D+01,-1.258D+01,
+     &-1.260D+01,-1.262D+01,-1.264D+01,-1.267D+01,
+     &-1.269D+01,-1.271D+01,-1.273D+01,-1.276D+01,
+     &-1.278D+01,-1.280D+01,-1.282D+01,-1.284D+01,
+     &-1.286D+01,-1.289D+01,-1.291D+01,-1.293D+01,
+     &-1.295D+01,-1.297D+01,-1.299D+01,-1.301D+01,
+     &-1.303D+01,-1.305D+01,-1.307D+01,-1.309D+01,
+     &-1.311D+01,-1.313D+01,-1.315D+01,-1.317D+01,
+     &-1.319D+01,-1.321D+01,-1.323D+01,-1.325D+01,
+     &-1.327D+01,-1.329D+01,-1.330D+01,-1.332D+01,
+     &-1.334D+01,-1.336D+01,-1.338D+01,-1.340D+01,
+     &-1.342D+01,-1.343D+01,-1.345D+01,-1.347D+01,
+     &-1.349D+01,-1.351D+01,-1.352D+01,-1.354D+01,
+     &-1.356D+01,-1.358D+01,-1.360D+01,-1.361D+01,
+     &-1.363D+01,-1.365D+01,-1.366D+01,-1.368D+01,
+     &-1.370D+01,-1.372D+01,-1.373D+01,-1.375D+01,
+     &-1.377D+01,-1.378D+01,-1.380D+01,-1.382D+01/
+      
+      DATA (ZZ(K,2),K=1,200 ) /
+     &-2.303D+00,-2.512D+00,-2.700D+00,-2.871D+00,
+     &-3.029D+00,-3.175D+00,-3.310D+00,-3.438D+00,
+     &-3.557D+00,-3.670D+00,-3.778D+00,-3.880D+00,
+     &-3.977D+00,-4.070D+00,-4.159D+00,-4.245D+00,
+     &-4.328D+00,-4.407D+00,-4.484D+00,-4.558D+00,
+     &-4.630D+00,-4.699D+00,-4.767D+00,-4.832D+00,
+     &-4.896D+00,-4.958D+00,-5.019D+00,-5.078D+00,
+     &-5.135D+00,-5.191D+00,-5.246D+00,-5.300D+00,
+     &-5.352D+00,-5.403D+00,-5.453D+00,-5.503D+00,
+     &-5.551D+00,-5.598D+00,-5.645D+00,-5.690D+00,
+     &-5.735D+00,-5.779D+00,-5.822D+00,-5.864D+00,
+     &-5.906D+00,-5.947D+00,-5.988D+00,-6.027D+00,
+     &-6.067D+00,-6.105D+00,-6.143D+00,-6.181D+00,
+     &-6.217D+00,-6.254D+00,-6.290D+00,-6.325D+00,
+     &-6.360D+00,-6.394D+00,-6.428D+00,-6.462D+00,
+     &-6.495D+00,-6.528D+00,-6.560D+00,-6.592D+00,
+     &-6.624D+00,-6.655D+00,-6.686D+00,-6.716D+00,
+     &-6.746D+00,-6.776D+00,-6.805D+00,-6.835D+00,
+     &-6.863D+00,-6.892D+00,-6.920D+00,-6.948D+00,
+     &-6.976D+00,-7.003D+00,-7.030D+00,-7.057D+00,
+     &-7.084D+00,-7.110D+00,-7.136D+00,-7.162D+00,
+     &-7.188D+00,-7.213D+00,-7.238D+00,-7.263D+00,
+     &-7.288D+00,-7.312D+00,-7.336D+00,-7.360D+00,
+     &-7.384D+00,-7.408D+00,-7.431D+00,-7.455D+00,
+     &-7.478D+00,-7.501D+00,-7.523D+00,-7.546D+00,
+     &-7.568D+00,-7.590D+00,-7.612D+00,-7.634D+00,
+     &-7.656D+00,-7.677D+00,-7.698D+00,-7.720D+00,
+     &-7.741D+00,-7.761D+00,-7.782D+00,-7.803D+00,
+     &-7.823D+00,-7.843D+00,-7.863D+00,-7.883D+00,
+     &-7.903D+00,-7.923D+00,-7.943D+00,-7.962D+00,
+     &-7.981D+00,-8.001D+00,-8.020D+00,-8.039D+00,
+     &-8.057D+00,-8.076D+00,-8.095D+00,-8.113D+00,
+     &-8.132D+00,-8.150D+00,-8.168D+00,-8.186D+00,
+     &-8.204D+00,-8.222D+00,-8.239D+00,-8.257D+00,
+     &-8.274D+00,-8.292D+00,-8.309D+00,-8.326D+00,
+     &-8.343D+00,-8.360D+00,-8.377D+00,-8.394D+00,
+     &-8.411D+00,-8.427D+00,-8.444D+00,-8.460D+00,
+     &-8.476D+00,-8.493D+00,-8.509D+00,-8.525D+00,
+     &-8.541D+00,-8.557D+00,-8.572D+00,-8.588D+00,
+     &-8.604D+00,-8.619D+00,-8.635D+00,-8.650D+00,
+     &-8.666D+00,-8.681D+00,-8.696D+00,-8.711D+00,
+     &-8.726D+00,-8.741D+00,-8.756D+00,-8.771D+00,
+     &-8.786D+00,-8.800D+00,-8.815D+00,-8.829D+00,
+     &-8.844D+00,-8.858D+00,-8.872D+00,-8.887D+00,
+     &-8.901D+00,-8.915D+00,-8.929D+00,-8.943D+00,
+     &-8.957D+00,-8.971D+00,-8.985D+00,-8.998D+00,
+     &-9.012D+00,-9.026D+00,-9.039D+00,-9.053D+00,
+     &-9.066D+00,-9.080D+00,-9.093D+00,-9.106D+00,
+     &-9.119D+00,-9.133D+00,-9.146D+00,-9.159D+00,
+     &-9.172D+00,-9.185D+00,-9.197D+00,-9.210D+00/
+      END
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION CHIDIS (KPARTin, IFL1, IFL2)
+
+C-----------------------------------------------------------------------
+C...Generate CHI (fraction of energy of a hadron carried by 
+C.                the valence quark, or diquark, as specified by IFL1)
+C.  INPUT KPART = code of particle
+C.        IFL1, IFL2 = codes of partons (3, 3bar of color)
+C.........................................................
+      IMPLICIT NONE
+c     external types
+      INTEGER KPARTIN,IFL1,IFL2
+c     COMMONs
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DOUBLE PRECISION CCHIK
+      COMMON /S_CPSPL/ CCHIK(4,99)
+      
+      DOUBLE PRECISION STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+      COMMON /S_CUTOFF/ STR_mass_val, STR_mass_val_hyp, STR_mass_sea
+c     internal types
+      DOUBLE PRECISION CUT,S_RNDM
+      INTEGER KPART,IFQ
+      SAVE
+
+      kpart=IABS(kpartin)
+      IFQ=IABS(IFL1)
+      IF (IFQ.GT.10) IFQ=IABS(IFL2)
+      CUT=2.D0*STR_mass_val/SQS
+c     hyperon beam cut
+      IF(kpart.gt.14) CUT=2.D0*STR_mass_val_hyp/SQS
+100   CHIDIS=S_RNDM(0)**2
+      if (chidis.lt.cut) goto 100
+      if (chidis.gt.(1.D0-cut)) goto 100
+      IF((CHIDIS**2/(CHIDIS**2+CUT**2))**0.5D0
+     +   *(1.D0-CHIDIS)**CCHIK(IFQ,KPART).LT.S_RNDM(1)) GOTO 100
+      CHIDIS = MAX(0.5D0*CUT,CHIDIS)
+      CHIDIS = MIN(1.D0-CUT,CHIDIS)
+c     diquarks or charm quarks      
+      IF (IABS(IFL1).GT.3)  CHIDIS=1.D0-CHIDIS
+      RETURN
+      END
+C=======================================================================
+
+      FUNCTION QMASS(IFL)
+
+C-----------------------------------------------------------------------
+C...Return quark or diquark constituent masses
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION QMAS(4)
+      SAVE
+      DATA QMAS /0.325D0,0.325D0,0.5D0,1.5D0/
+
+      IFLA = IABS(IFL)
+      IFLA = MOD(IFLA,100)
+      IF (IFLA .LE. 4)       THEN
+         QMASS = QMAS(IFLA)
+      ELSE
+         QMA = QMAS(IFLA/10)
+         QMB = QMAS(MOD(IFLA,10))
+         QMASS = QMA+QMB
+      ENDIF
+      RETURN
+      END
+C=======================================================================
+
+      FUNCTION XM2DIS(XM2MIN,XM2MAX,ALPHA)
+
+C-----------------------------------------------------------------------
+C     function that samples mass**2 from (1/M**2)**alpha
+C     with alpha <= 1                                             
+C     INPUT: Mmin**2 : minimal mass
+C            Mmax**2 : maximal mass
+C            alpha   : slope                                      \FR'14
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+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
+      
+c     reduced alpha
+      ALPHArdc = 2.d0*(ALPHA-1.d0)
+      AMIN = LOG(XM2MIN)
+      AMAX = LOG(XM2MAX)
+      ADLT = AMAX-AMIN
+      IF(ABS(ALPHArdc).LT.1.d-3)THEN
+c     alpha = 1
+         XRNDM = MAX(S_RNDM(0),1.D-10)
+         AX = AMIN+ADLT*XRNDM
+         XM2DIS = EXP(AX)
+      ELSEIF(ALPHArdc.LT.0.D0.and.ALPHA.gt.0.D0)THEN
+c     0 < alpha < 1
+         XRNDM = MAX(S_RNDM(0),1.D-10)
+c     AX = AMAX-LOG(XRNDM)*ALPHArdc
+         DX = XM2MAX**(1.D0-ALPHA)*XRNDM +
+     +        XM2MIN**(1.D0-ALPHA)*(1.D0-XRNDM)
+         AX = LOG(DX)/(1.D0-ALPHA)
+         XM2DIS = EXP(AX)
+      ELSEIF(ALPHArdc.GE.1.D0)THEN
+c     alpha >= 1
+         ALPHAr = 1.D0-ALPHA
+         XMINA = XM2MIN**ALPHAr
+         XMAXA = XM2MAX**ALPHAr
+         XDLT = XMAXA-XMINA
+         XRNDM = MAX(S_RNDM(0),1.D-10)
+         Z = LOG(XMINA+XDLT*XRNDM)/ALPHAR
+         XM2DIS = EXP(Z)
+      ELSE
+         WRITE(6,*) 'M2DIS: undefined exponent in mass distribution!',
+     &        ALPHA
+         XM2DIS = 0.D0
+         CALL SIB_REJECT('M2DIS           ')
+      ENDIF
+      END
+C=======================================================================
+
+      SUBROUTINE EXCTDEC( IDX, LBAD)
+
+C-----------------------------------------------------------------------
+C     routine to fragment an excited system with known flavor via
+C     resonance decay
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+c     external variables
+      INTEGER IDX,LBAD
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+
+      INTEGER LRNK
+      COMMON /SIB_RNK/ LRNK(8000)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+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
+
+c     local variables
+      DOUBLE PRECISION P0,BE,PR1,PR2,PRH,GABE,P2,
+     &     PAR2_def,PAR8_def,PAR24_def,DELTAE,PCXG,
+     &     EMIN1,EMIN2,EMIN3,EMIN4,S_RNDM,GA,PTR,PTOT,P1TOT,PX,PY,
+     &     COD,SID,COF,SIF,ANORF,BEP
+      DIMENSION P0(5),BE(3),PR1(5),PR2(5),PRH(5),GABE(4),
+     &     P2(5)
+      INTEGER IPID,IR1DX,IFLR1,IR2DX,IFLR2,IRH,IRHPID,IR,
+     &     KK,KD,IFAIL,N1,IFBAD,J,K,I
+      SAVE
+      
+c      LBAD = 1
+
+c     initial parameters
+      PAR2_def = PAR(2)         ! ud/s rate
+      PAR8_def = PAR(8)         ! popcorn rate
+      PAR24_def = PAR(24)       ! c/s rate
+      if(ndebug.gt.1)
+     &     WRITE(LUN,*) ' EXCTDEC: IDX,IREJ',IDX,LBAD
+      
+c     read remnant 4momentum from stack
+      CALL RD_PRTN_4VEC(IDX,P0,IPID,IR1DX)
+      CALL RD_PRTN_4VEC(IR1DX,PR1,IFLR1,IR2DX)
+      CALL RD_PRTN_4VEC(IR2DX,PR2,IFLR2,IRH)
+      CALL RD_PRTN_4VEC(IRH,PRH,IRHPID,IR)
+      IPFLAG = IPID
+      IF(IDX.ne.IR)then
+         write(lun,*) ' EXCTDEC: reference loop broken!',IDX,IR
+         CALL SIB_REJECT('EXCTDEC         ')
+      endif
+      IF(NDEBUG.GT.2)THEN
+         WRITE(LUN,*) ' EXCTDEC: P0:' , (P0(kk),kk=1,5)
+         WRITE(LUN,*) ' EXCTDEC: PR1:' , (PR1(kk),kk=1,5)
+         WRITE(LUN,*) ' EXCTDEC: PR2:' , (PR2(kk),kk=1,5)
+         WRITE(LUN,*) ' EXCTDEC: PH:' , (PRH(kk),kk=1,5)
+      ENDIF
+      
+C     identity of remnant
+c     form hadron from flavors in remnant
+c     (not preserving spin or isospin!)
+c      CALL SIB_I4FLAV(iflr1,iflr2,Idm, KD )
+      KD = IRHPID
+
+c     available kinetic energy
+      DELTAE = P0(5)-AM(ABS(KD))
+c     fallback region: 0 < DELTAE < EMIN1
+      EMIN1 = PAR(76)
+c     resonance region: EMIN1 < DELTAE < EMIN2
+      EMIN2 = PAR(77)
+c     phasespace decay region: EMIN2 < DELTAE < EMIN3
+      EMIN3 = PAR(78)
+c     string decay region: EMIN3 < DELTAE < EMIN4
+      EMIN4 = PAR(79)
+
+      IF(NDEBUG.gt.2)THEN
+         WRITE(LUN,*) 
+     &        ' EXCTDEC: MASS,IFL1,IFL2,PID',P0(5),IFLR1,IFLR2,KD
+         WRITE(LUN,*) ' EXCTDEC: DELTAE,EMIN1,EMIN2,EMIN3',
+     &        DELTAE,EMIN1,EMIN2,EMIN3
+      ENDIF
+      
+c     strange quark rate
+      IF(IPAR(48).eq.1)THEN
+         PAR(2) = PAR(89)
+      ENDIF
+
+c     charm quark rate
+      IF(IPAR(62).eq.1)THEN
+         PAR(24) = PAR(107)
+      ENDIF
+     
+c     popcorn rate in remnant
+      IF(IPAR(56).eq.1)THEN
+         PAR(8) = PAR(102)
+      ENDIF     
+
+      IF(DELTAE.lt.EMIN2)THEN
+c     beam or resonance region
+         IF(NDEBUG.gt.1) then 
+            if(DELTAE.lt.EMIN1)then
+               WRITE(LUN,*)' EXCTDEC: fallback to beam..'
+            else
+               WRITE(LUN,*)' EXCTDEC: forming resonance..'
+            endif
+         endif
+         NP = NP + 1
+         LLIST(NP) = KD
+         NPORIG(NP) = IPFLAG
+         LRNK(NP) = 0
+         niorig(NP) = iiflag
+         DO kk=1,5
+            P(NP,KK) = P0(KK)
+         ENDDO
+         LBAD = 0
+         PAR(2) = PAR2_def
+         PAR(8) = PAR8_def
+         PAR(24) = PAR24_def
+         RETURN         
+
+      ELSEIF(DELTAE.lt.EMIN3)THEN
+c     phasespace decay region
+         IF(NDEBUG.gt.1) WRITE(LUN,*)' EXCTDEC: phasespace decay ..'
+         IPFLAG = IPID/iabs(IPID) + ISIGN(1000,IPID)
+c     set charge exchange probability, 
+c     i.e. prob for p* -> n + pip
+         PCXG = PAR(99)
+         CALL FIREBALL_4FLV(KD,P0,PCXG,IFAIL)
+         PAR(2) = PAR2_def
+         PAR(8) = PAR8_def
+         PAR(24) = PAR24_def
+         IF(IFAIL.eq.1) THEN
+            IF(ndebug.gt.0)
+     &           WRITE(LUN,*) ' EXCTDEC: remnant frag. rejection!'
+            LBAD = 1
+            RETURN
+         ENDIF
+         LBAD = 0
+         RETURN
+
+c      ELSEIF(DELTAE.lt.EMIN4)THEN
+      ELSE
+C     string fragmentation region
+         IF(NDEBUG.gt.1) WRITE(LUN,*)' EXCTDEC: string decay ..'
+         N1 = NP+1
+         IPFLAG = IPFLAG + ISIGN(3000,IPID)
+c     for meson remnant quark and anti-quark should be treated equally
+c     therefor switch randomly
+         IF(IBAR(ABS(KD)).eq.0.and.S_RNDM(KD).lt.0.5D0)
+     &        CALL ISWTCH_LMNTS(IFLR1,IFLR2)
+
+c     turn remnant string around
+         IF(IPAR(23).eq.1)THEN
+            IF(S_RNDM(0).gt.PAR(39))
+     &           CALL ISWTCH_LMNTS(IFLR1,IFLR2)
+         ENDIF
+
+         CALL STRING_FRAG_4FLV 
+     +        (P0(5), IFLR2, IFLR1, 0.D0,0.D0,0.D0,0.D0,IFBAD,1)
+         IF (IFBAD .EQ. 1)THEN
+            IF(ndebug.gt.0)
+     &           WRITE(LUN,*) ' EXCTDEC: remnant frag. rejection!'
+            LBAD = 1
+            PAR(2) = PAR2_def
+            PAR(8) = PAR8_def
+            PAR(24) = PAR24_def
+            RETURN
+         ENDIF
+         DO J=1,3
+            BE(J)=P0(J)/P0(4)
+            GABE(J)=P0(J)/P0(5)
+         ENDDO
+         GA=P0(4)/P0(5)
+         GABE(4)=P0(4)/P0(5)
+C...  rotate and boost string
+         IF(IPAR(38).eq.1.or.IPAR(38).eq.3)THEN
+c     sample additional soft pt for remnant partons
+            CALL PTDIS_4FLV(0,PX,PY)
+            PTR = SQRT(PX**2+PY**2)
+            PTOT = SQRT(4.D0*PTR**2+P0(5)**2)*0.5D0
+c     rotation factors
+            COD = 0.5D0*P0(5)/PTOT
+            SID = PTR/PTOT
+c            COD= 1.D0/SQRT(1.D0+4.D0*PTR**2/P0(5))
+c            SID= 2.D0*PTR/P0(5)*COD
+            COF=1.D0
+            SIF=0.D0
+            IF(PTOT*SID.GT.EPS5) THEN
+               COF=PX/(SID*PTOT)
+               SIF=PY/(SID*PTOT)
+               ANORF=DSQRT(COF*COF+SIF*SIF)
+               COF=COF/ANORF
+               SIF=SIF/ANORF
+            ENDIF
+            IF(ndebug.gt.3)THEN
+            write(lun,*)' EXCTDEC: rotation factors (cod,sid,cof,sif):',
+     &           cod,sid,cof,sif
+            write(lun,*)' EXCTDEC: rotation angles (theta,phi):',
+     &           ACOS(cod),ACOS(cof)
+            ENDIF
+c     rotate string final state
+            DO K=N1,NP
+               CALL SIB_TRANI(P(K,1),P(k,2),P(k,3),cod,sid,cof,sif
+     &              ,P2(1),P2(2),P2(3))
+               do j=1,3
+                  P(K,j)=P2(j)
+               enddo
+            ENDDO
+c     boost to hadron-hadron center-of-mass
+            IF(ndebug.gt.3)
+     &        write(lun,*) ' EXCTDEC: boost to had-had (gabe,gam):',
+     &           (gabe(j),j=1,4)
+            DO K=N1,NP
+               NPORIG(K) = IPFLAG
+               niorig(K) = iiflag
+               CALL SIB_ALTRA(gabe(4),gabe(1),gabe(2),
+     &              gabe(3),P(k,1),p(k,2),p(k,3),p(k,4),
+     &              P1TOT,p2(1),p2(2),p2(3),p2(4))
+               do j=1,4
+                  P(K,j)=P2(j)
+               enddo
+            ENDDO
+         ELSEIF(IPAR(38).eq.2.or.IPAR(38).eq.0)THEN            
+C...  boost string
+            DO I=N1,NP
+               NPORIG(I) = IPFLAG
+               niorig(I) = iiflag
+               BEP=BE(1)*P(I,1)+BE(2)*P(I,2)+BE(3)*P(I,3)
+               DO J=1,3
+                  P(I,J)=P(I,J)+GA*(GA*BEP/(1.D0+GA)+P(I,4))*BE(J)
+               ENDDO
+               P(I,4)=GA*(P(I,4)+BEP)
+            ENDDO
+         ENDIF
+      ENDIF
+      LBAD = 0
+      PAR(2) = PAR2_def
+      PAR(8) = PAR8_def
+      PAR(24) = PAR24_def
+      return
+      END
+C=======================================================================
+
+      SUBROUTINE PTDIS_4FLV (IFL,PX,PY)
+
+C-----------------------------------------------------------------------
+C...Generate pT
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      DOUBLE PRECISION PPT02
+      COMMON /S_CQDIS2/ PPT02(44)
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+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
+
+      IF(IFL.eq.0)THEN
+c     quark confinement pt
+         PPTT = PAR(110)
+         XM = 0.325D0
+         XM2 = XM**2
+         RNDM = MAX(EPS10,S_RNDM(IFL))
+         XMT = PPTT * LOG(RNDM) - XM
+         XMT2 = XMT**2
+         PT = SQRT(XMT2-XM2)         
+      ELSE
+         IFLA = IABS(IFL)
+         IFLA = MOD(IFLA,100)
+         PPTT = PPT02(IFLA)
+c     Gaussian distribution
+         PT = PPTT*SQRT(-LOG(MAX(EPS10,S_RNDM(IFL))))
+         IF (IPAR(3).GE.1) THEN
+            IF(MOD(IFLA,10).NE.0) THEN
+               XM = QMASS(IFL)
+            ELSE
+               XM = 0.5D0        ! pomeron mass
+               IF(IPAR(3).ge.6) XM = 0.D0
+            ENDIF
+c     exponential transverse mass
+            XM2 = XM**2
+            RNDM = MAX(EPS10,S_RNDM(IFL))
+            XMT = PPTT * LOG(RNDM) - XM
+            XMT2 = XMT**2
+            PT = SQRT(XMT2-XM2)
+         ENDIF      
+      ENDIF
+      PHI= TWOPI*S_RNDM(IFL)
+      PX=PT*COS(PHI)
+      PY=PT*SIN(PHI)
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE PTSETUP_4FLV(ECM)
+
+C-----------------------------------------------------------------------
+C     moved from sib_ndiff to seperate subroutine 
+c     so that changes will affect diff. /FR'13
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      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
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+      DOUBLE PRECISION PPT02
+      COMMON /S_CQDIS2/ PPT02(44)
+      SAVE
+
+      SQS = ECM
+
+c     NA22 piC retune
+      PTU=.3D0+.08D0*dlog10(sqs/30.D0)
+      PTS=.45D0+.08D0*dlog10(sqs/30.D0)
+      PTQQ=.6D0+.08D0*dlog10(sqs/30.D0)
+      PTPOM= .6D0+.08D0*dlog10(sqs/30.D0)
+      if ( IPAR(3).eq.1 ) then 
+c     pt0
+         ptu=.15D0+.007D0*dlog10(sqs/20.D0)**2
+         pts=.3D0+.007D0*dlog10(sqs/20.D0)**2
+         ptqq=.3D0+.03D0*dlog10(sqs/20.D0)**2
+         ptpom= .6D0+.08D0*dlog10(sqs/30.D0)
+      elseif ( IPAR(3).eq.2 ) then
+C     pt1
+         ptu=.15D0+.007D0*dlog10(sqs/20.D0)**2
+         pts=.32D0+.007D0*dlog10(sqs/20.D0)**2
+         ptqq=.4D0+.007D0*dlog10(sqs/20.D0)**2
+         ptpom= .6D0+.08D0*dlog10(sqs/30.D0)
+c     pt2
+      elseif ( IPAR(3).eq.3 ) then
+         ptu=.17D0+.007D0*dlog10(sqs/20.D0)**2
+         pts=.3D0+.007D0*dlog10(sqs/20.D0)**2
+         ptqq=.3D0+.03D0*dlog10(sqs/20.D0)**2
+         ptpom = .6D0+.08D0*dlog10(sqs/30.D0)
+      elseif ( IPAR(3).eq.5 ) then
+         PTU=.16D0+.007D0*dlog10(sqs/20.D0)**2
+         PTS=.28D0+.007D0*dlog10(sqs/20.D0)**2
+         PTQQ= .3D0+.03D0*dlog10(sqs/20.D0)**2
+         PTPOM = .23D0+.03D0*dlog10(sqs/20.D0)**2
+      elseif ( IPAR(3).eq.6 ) then
+         PTU=.16D0+.007D0*dlog10(sqs/20.D0)**2
+         PTS=.28D0+.007D0*dlog10(sqs/20.D0)**2
+         PTQQ= .3D0+.03D0*dlog10(sqs/20.D0)**2
+         PTPOM = .23D0+.03D0*dlog10(sqs/20.D0)**2
+      elseif ( IPAR(3).eq.7 ) then
+         PTU= PAR(46) + .007D0*dlog10(sqs/20.D0)**2
+         PTS= PAR(47) + .007D0*dlog10(sqs/20.D0)**2
+         PTQQ= PAR(48) + .03D0*dlog10(sqs/20.D0)**2
+         PTPOM = PAR(49) + .03D0*dlog10(sqs/20.D0)**2
+      elseif ( IPAR(3).eq.8 ) then
+         ASQS = MAX(log10(SQS/PAR(109)),0.D0)
+         PTU= PAR(46) + PAR(68)*ASQS**2
+         PTS= PAR(47) + PAR(70)*ASQS**2
+         PTQQ= PAR(48) + PAR(69)*ASQS**2
+         PTPOM = PAR(49) + PAR(51)*ASQS**2
+         PTSEA = PAR(67) + PAR(52)*ASQS**2
+      endif
+      PPT02 (1) = PTU
+      PPT02 (2) = PTU
+      PPT02 (3) = PTS
+c     valence pt
+      PPT02 (10) = PTPOM
+      DO J=11,33
+         PPT02(J) = PTQQ
+      ENDDO
+c     soft minijet pt
+      PPT02 (20) = PTSEA
+c     sea quark pt
+      PPT02 (30) = PAR(132)
+c     charm pt
+      ASQS = MAX(log10(SQS/30.D0),0.D0)
+      IF(IPAR(16).eq.8)THEN
+         PTCHM= PAR(147) + PAR(149)*ASQS
+         PTCHB= PAR(148) + PAR(149)*ASQS         
+      ELSE
+c     rc4a charm pt
+         PTCHM=0.308D0 + .165D0*ASQS
+         PTCHB=0.5D0 + .165D0*ASQS         
+      ENDIF
+      PPT02(4) = PTCHM
+      PPT02(14) = PTCHB
+      PPT02(24) = PTCHB
+      DO J=34,44
+         PPT02(J) = PTCHB
+      ENDDO
+     
+      IF(ndebug.gt.2)THEN
+         WRITE(LUN,*)' PTSETUP_4FLV: (sqs,(u,d),s,diq,pom,cm,cb)',sqs
+     +      ,ppt02(1),ppt02(3),ppt02(11), ppt02(10),ppt02(4),ppt02(34)
+      ENDIF
+
+      RETURN
+      END
+C=======================================================================
+
+      INTEGER FUNCTION IMRG2HAD(IFLB1,IFLB2)
+
+C-----------------------------------------------------------------------
+C     -----------------------------------------------------
+C     function that merges two flavors into lightest hadron
+C     -----------------------------------------------------
+      IMPLICIT NONE
+c     flavor merging array
+      INTEGER KFLV
+      COMMON /S_KFLV/ KFLV(4,43)
+      INTEGER IFLB1,IFLB2,IFLA,IFLB,IFL1,IFL2
+      SAVE
+
+      IFLA = IFLB1
+      IFLB = IFLB2
+c     order by flavor, meson: antiquark-quark, baryon: quark-diquark
+      IF(IFLB.lt.IFLA) CALL ISWTCH_LMNTS(ifla,iflb)
+c     if antibaryon switch again..
+      IF(IFLB.lt.0) CALL ISWTCH_LMNTS(ifla,iflb)
+      IFL1 = IABS(IFLA)
+      IFL2 = IABS(IFLB)
+      IMRG2HAD = ISIGN(KFLV(IFL1,IFL2),IFLB)
+      END
+
+C=======================================================================
+
+      SUBROUTINE SAMPLE_SEA_TOT
+     &     (KRMNT,KINT,NSEA,XGAM,XJET,STR_MASS,XSJ,XX)
+
+C-----------------------------------------------------------------------
+C   input parameter: xgam,xjet,str_mass,  Nsea,KINT,krmnt
+c   outpt parameter: xsj,xx
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+c     include COMMON blocks
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+
+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
+      
+c     input/output type definitions
+      DOUBLE PRECISION XGAM,XJET,STR_MASS,XSEA,XX,XSJ
+      DIMENSION XX(2*NW_max+2)
+
+      INTEGER NSEA,KINT,KRMNT
+
+c     local type definitions
+      DOUBLE PRECISION AC,GAMMAX,S_RNDM,XA,XREM,R,Z,Z1,Z2,XMINA
+      INTEGER j,jj,ilast
+      SAVE
+      DATA AC /-0.2761856692D0/ ! log(2) - gamma(Eulero)
+
+      GAMMAX = xgam
+      XMINA = 2.D0*STR_mass/SQS
+      IF(IPAR(73).eq.1.and.KINT.gt.1) GAMMAX = PAR(119)
+      IF(ndebug.gt.3) THEN
+         WRITE(LUN,*)' IMRG2HAD: called with ',
+     &        '(KRMNT,KINT,NSEA,XGAM,XJET,STR_MASS):', 
+     &        KRMNT,KINT,NSEA,XGAM,XJET,STR_MASS
+         
+         WRITE(LUN,*)' IMRG2HAD: XMIN,XMIN*N,XREM:',
+     &        XMINA,NSEA*XMINA,1.D0-XJET
+      ENDIF
+c     sample total fraction for sea partons..
+      Z1 = LOG(DBLE(NSEA))
+ 50   Z2 = LOG(0.5D0*SQS*(1.D0-XJET)/STR_MASS-2.D0)
+      R = S_RNDM(0)
+      Z=(Z1+AC)*(1.D0+R*(((Z2+AC)/(Z1+AC))**NSEA-1.D0))
+     &     **(1.D0/DBLE(NSEA))-AC
+      XSEA = XMINA*EXP(Z)
+      IF(ndebug.gt.3) WRITE(LUN,*) '  total SEA fraction:' , xsea
+      IF ( (1.D0-XSEA)**GAMMAX .LT. S_RNDM(1)) GOTO 50
+c     maximal fraction remaining for valence..
+ 60   XREM = XSEA - DBLE(Nsea)*XMINA
+      IF(ndebug.gt.3) 
+     &     WRITE(LUN,*) '  Xsea,xval,xjet:',
+     &     xsea,1.D0-XSEA-XJET,xjet
+      
+C...  Split the energy of sea partons among the different partons
+      DO j=1,Nsea-1
+         jj = 2+j
+         IF(KRMNT.eq.0) jj = 4+j
+c     fraction for first parton
+         XA = XREM*S_RNDM(J)
+c     for interactions other than first decrease energy fraction
+c     (beam side hadron can participate in multiple binary collisions)
+c     IF(KINT.gt.1.and.j.gt.2*KRMNT) XA=SIGN(ABS(XA)**PAR(116),XA)
+         XX(jj) = XMINA + XA
+c     new remainder
+         XREM = XREM - XA
+         IF(ndebug.gt.3) write(lun,*)'  x1,j,rem,xa',xX(jj),jj,xrem,xa
+      ENDDO
+c     last parton..
+      ilast = 2+Nsea
+      IF(KRMNT.eq.0) ilast = 4+Nsea
+      XX(ILAST) = XMINA + XREM
+
+c     break symmetry between nucleon interactions
+c     first interaction takes most energy
+      IF(KINT.gt.1.and.IPAR(71).eq.1)THEN
+         JJ = 3
+         IF(KRMNT.eq.0) JJ = 5
+         if(ndebug.gt.4) write(lun,*) '  x1+x2,p*xeq:',
+     &        XX(JJ)+XX(JJ+1),PAR(117)*XSEA/KINT
+         IF(XX(JJ)+XX(JJ+1).lt.PAR(117)*XSEA/KINT) GOTO 60
+      ENDIF
+
+      XSJ = XSJ + XSEA
+      IF(ndebug.gt.3)THEN  
+         write(lun,*)'  x1,N,rem',xx(ilast),ilast,xrem
+         write(lun,*) '  xseajet',xsj
+      endif
+
+      END
+C-----------------------------------------------------------------------
+C
+C     dummy subroutines, remove to link PDFLIB
+C
+C=======================================================================
+c
+c     SUBROUTINE PDFSET(PARAM,VALUE)
+c
+c-----------------------------------------------------------------------
+c     IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+c     IMPLICIT INTEGER(I-N)
+c     DIMENSION PARAM(20),VALUE(20)
+c     CHARACTER*20 PARAM
+c     END
+c
+c=======================================================================
+c
+c     SUBROUTINE STRUCTM(XI,SCALE2,UV,DV,US,DS,SS,CS,BS,TS,GL)
+c
+c-----------------------------------------------------------------------
+c     IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+c     IMPLICIT INTEGER(I-N)
+c     END
+c
+c=======================================================================
+c
+c     SUBROUTINE STRUCTP(XI,SCALE2,P2,IP2,UV,DV,US,DS,SS,CS,BS,TS,GL)
+c
+c-----------------------------------------------------------------------
+c     IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+c     IMPLICIT INTEGER(I-N)
+c     END
+c
+C-----------------------------------------------------------------------
+C
+C=======================================================================
+
+      SUBROUTINE SIB_NDIFF(K_beam, NW, Ecm, Irec, IREJ)
+
+C-----------------------------------------------------------------------
+C     routine that samples and fragments a non-diffractive interaction
+C
+C     3 stages: 0: setup
+C               1: sampling of event structure (number of parton interactions)
+C                  (labeled as 2000)
+C               2: sampling of kinematics
+C                  (labeled as 3000)
+C               3: fragmentation
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+
+c     external types
+      DOUBLE PRECISION ECM
+      INTEGER K_beam, NW, Irec, IREJ
+
+c     COMMONs
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+C     The final particle output is contained in COMMON /S_PLIST/    
+C     NP           : number of final particles
+C     P(1:NP, 1:5) : 4-momenta + masses of the final particles 
+C     LLIST (1:NP) : codes of final particles
+      DOUBLE PRECISION P
+      INTEGER NP,LLIST,NP_max
+      PARAMETER (NP_max=8000)
+      COMMON /S_PLIST/ P(NP_max,5), LLIST(NP_max), NP
+
+      INTEGER NFORIG,NPORIG,NIORIG,IPFLAG,IIFLAG,KINT
+      COMMON /S_PARTO/ NFORIG(NP_max),NPORIG(NP_max),NIORIG(NP_max),
+     &IPFLAG,IIFLAG,KINT
+C     parameters that represent: NW: max. number of wounded nucleons,
+C     NS,NH: max. number of soft and hard interactions
+c      PARAMETER (NW_max = 20)
+C     The COMMON block /S_CHIST/ contains information about the
+C     the structure of the  generated event:
+C     NWD   = number of wounded nucleons
+C     NJET = total number of hard interactions
+C     NSOF = total number of soft interactions
+C     NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C     NNJET (1:NW) = number of minijets produced in each interaction 
+C     JDIF(1:NW) = diffraction code 
+C                  0 : non-diff,
+C                  1 : beam-diff
+C                  2 : target-diff
+C                  3 : double-diff
+      INTEGER NNSOF,NNJET,JDIF,NWD,NJET,NSOF
+      COMMON /S_CHIST/ NNSOF(NW_max),NNJET(NW_max),
+     &     JDIF(NW_max),NWD,NJET,NSOF
+      INTEGER NS_max, NH_max
+      PARAMETER (NS_max = 20, NH_max = 80)
+
+      INTEGER IBMRDX,ITGRDX,IHMJDX,ISMJDX,ICSTDX,IINTDX
+      COMMON /S_INDX/ IBMRDX(3),ITGRDX(NW_max,3),
+     &     IHMJDX(NW_max*NH_max),IINTDX(NW_max),
+     &     ISMJDX(NW_max*NS_max),ICSTDX(2*NW_max,3)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      INTEGER ITRY, NREJ
+      COMMON /S_CNT/ ITRY(20), NREJ(20)
+
+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
+
+c     internal type declarations
+      DOUBLE PRECISION X2JET,SQS_0,PZ,E2,PAWT,xnsof,xnjet,xjdif,x1jet,
+     &     Esum,PXsum,PYsum,PZsum
+      DIMENSION X2JET(NW_max)
+      INTEGER LL,LXBAD,NP_0,NPP_0,NPP0_0,J,JJ,I,KBA,L,NPP_1,NPP0_1,
+     &     IREFout,IREF,nj,ns,nv,II,Idm,LPID,NF,NPP,NPP0
+      DIMENSION LL(99)      
+      SAVE
+      DATA LL /5*0,7*2,2*1,12*0,2,6*0,6*1,19*0,2,2,10*0,
+     &     2,2,0,2,2,11*0,1,1,1,9*0,1/
+
+
+C..   setup stage
+      IREJ = 1
+c     default return point is kinematic sampling stage
+      LXBAD = 3
+
+c     remember initial setup
+      NP_0    = NP
+      SQS_0   = SQS
+c     remember position on parton stack
+      CALL GET_NPP(NPP_0,NPP0_0)
+
+c     set interaction properties
+c      IF(Irec.ne.1) CALL INI_EVENT(ECM,K_beam,Idm,Irec)
+
+      IF(ndebug.gt.0)then
+         IF(Irec.eq.0)THEN
+            WRITE(LUN,*) 
+     &           ' SIB_NDIFF: recursive call with (ecm,kb,kt,np,jdif):',
+     &           ecm,k_beam,kt(1),(jdif(j),j=1,NW),NP
+         ELSE
+            WRITE(LUN,*)' SIB_NDIFF: regular call with (ECM,KB,NW,KT,',
+     &           'JDIF,NP):',ecm,k_beam,NW,(kt(ii),ii=1,NW),
+     &           (jdif(j),j=1,NW),NP
+         ENDIF
+      ENDIF
+      
+ 2000 CONTINUE
+
+c     reset parton stack
+      CALL INI_PRTN_STCK(NPP_0,NPP0_0)
+
+C...  sample multiple interaction configuration
+      KBA = IABS(K_beam)
+      L = LL(KBA)
+      DO I=1,NW
+        if(JDIF(I).eq.0) then
+           CALL CUT_PRO(L, SQS, PTmin, NNSOF(I), NNJET(I))
+        else
+          NNSOF(I) = 1
+          NNJET(I) = 0
+        endif
+c     add incoming target particles
+        PZ = PAWT(SQS,AM(KBA),AM(KT(I)))
+        E2 = SQRT(PZ**2+AM2(KT(I)))
+        CALL ADD_PRTN(0.D0,0.D0,-PZ,E2,AM(KT(I)),KT(I),-2,0,IREFout)
+
+c     add interactions
+        xjdif = dble(jdif(I))
+        xnjet = dble(nnjet(I))
+        xnsof = dble(nnsof(I))
+        CALL ADD_PRTN(xnsof,xnjet,xjdif,sqs,0.D0,I,-1,IREFout,IREF)
+c     write parton stack index to interaction index
+        IINTDX(I) = IREF
+      ENDDO
+c     remember state of parton stack
+      CALL GET_NPP(NPP_1,NPP0_1)
+
+C...  kinematic sampling stage
+
+C...  sample x values
+      ITRY(1) = 0
+ 3000 CONTINUE
+      ITRY(1) = ITRY(1)+1
+      IF(ITRY(1).GT.NREJ(1)) THEN 
+c         NCALL = NCALL + 1
+         GOTO 2000
+      ENDIF
+      NP = NP_0
+      CALL INI_PRTN_STCK(NPP_1,NPP0_1)
+
+      CALL SAMPLE_MINIJET(L,NW,NNJET,NNSOF,NJET,NSOF,x1jet,x2jet,lxbad)
+      IF(LXBAD.eq.3)THEN
+c     reject kinematics
+         GOTO 3000
+      ELSEIF(LXBAD.eq.2)THEN
+c     reject kinematics and event structure
+c         NCALL = NCALL + 1
+         GOTO 2000
+      ELSEIF(LXBAD.eq.1)THEN
+c     reject entire event
+         if(Ndebug.gt.0) 
+     &        WRITE(LUN,*)' SIB_NDIFF: minijet rejection (Ncall):',Ncall
+c     restore initial state
+         NP    = NP_0
+         CALL INI_PRTN_STCK(NPP_0,NPP0_0)
+         SQS   = SQS_0
+         S     = SQS*SQS
+         RETURN
+      ENDIF
+
+C...  Prepare 2*NW valence/sea color strings and/or remnant.
+
+c     default return point, jump back to sampling interaction structure
+c      LXBAD = 2
+      CALl SAMPLE_RMNT(K_beam,NW,X1Jet,X2JET,Irec,LXBAD)
+      IF(LXBAD.eq.3)THEN
+c     reject kinematics
+         GOTO 3000
+      ELSEIF(LXBAD.eq.2)THEN         
+c     reject kinematics and event structure
+c         NCALL = NCALL + 1
+         GOTO 2000
+      ELSEIF(LXBAD.eq.1)THEN         
+c     reject entire event
+         if(Ndebug.gt.0) 
+     &   WRITE(LUN,*)' SIB_NDIFF: rmnt rejection (Ncall,NW):',Ncall,NW
+c     restore initial state
+         NP    = NP_0
+         CALL INI_PRTN_STCK(NPP_0,NPP0_0)
+         SQS   = SQS_0
+         S     = SQS*SQS
+         RETURN
+      ENDIF
+
+C     Check parton final state..
+      CALL GET_NPP(NPP,NPP0)
+      CALL PPSUM(1,NPP,Esum,PXsum,PYsum,PZsum,NF)
+      IF(ABS(Esum/(0.5D0*Ecm*DBLE(NW+1))-1.D0).GT.EPS3)THEN
+         WRITE(LUN,*) ' SIB_NDIFF: energy not conserved! : ',Ncall
+         WRITE(LUN,*) '  sqs_inp = ', Ecm, ' sqs_out = ', Esum
+         CALL PRNT_PRTN_STCK
+         WRITE(LUN,*) ' SIB_NDIFF: event rejected! ',
+     &        'partons do not conserve energy'
+         WRITE(LUN,*)' (Ncall,NW,NPP,NJET,NSOF):',Ncall,NW,NPP,NJET,NSOF
+c     CALL SIB_REJECT('SIB_NDIFF       ')
+c     restore initial state
+         NP    = NP_0
+         CALL INI_PRTN_STCK(NPP_0,NPP0_0)
+         SQS   = SQS_0
+         S     = SQS*SQS
+         RETURN
+      ENDIF
+      IF(NDEBUG.gt.0) THEN
+         IF(NDEBUG.gt.1) CALL PRNT_PRTN_STCK
+         WRITE(LUN,*) ' SIB_NDIFF: entering fragmentation stage...'
+      ENDIF
+
+C...  Fragmentation stage
+      nj = 0
+      ns = 0
+      nv = 0
+      II = NPP0_0+1
+      DO WHILE (II.gt.0)
+c     default return point: reject event if fragmentation fails
+         LXBAD = 1         
+c     loop over level0 partons
+         CALL ITR_LVL0_PRTN(II,JJ,LPID)
+c     read interaction
+         CALL RD_INT(jj,Idm,iiflag)
+
+C...  Fragmentation of soft/hard sea color strings
+         IF(LPID.eq.100)THEN
+            nj = nj + 1
+            ipflag = 100
+            KINT = nj
+            CALL FRAG_MINIJET(jj,LXBAD)
+            IF(LXBAD.ne.0) RETURN
+
+         ELSEIF(LPID.eq.10)THEN
+            ns = ns + 1
+            ipflag = 10
+            KINT = ns
+            CALL FRAG_MINIJET(jj,LXBAD)
+            IF(LXBAD.ne.0) RETURN
+
+C...  fragment 'valence' strings
+         ELSEIF(LPID.eq.1)THEN
+            nv = nv + 1
+            KINT = nv
+            ipflag = 1
+            CALL FRAG_VLNCE(jj,LXBAD)
+            IF(LXBAD.ne.0) RETURN
+
+C...  fragment remnants
+         ELSEIF(IABS(LPID).eq.2)THEN
+            CALL EXCTDEC(JJ,LXBAD)
+            IF(LXBAD.ne.0) RETURN
+
+C...  fragment incoherent diffraction
+         ELSEIF(LPID.eq.-10.or.LPID.eq.-20.or.LPID.eq.-30)THEN
+            CALL FRAG_INCHRNT_DIFF(jj,lxbad)
+            IF(LXBAD.ne.0) RETURN
+
+         ENDIF
+      ENDDO
+      IREJ = 0
+      
+      END
+C=======================================================================
+
+      SUBROUTINE SAMPLE_RMNT(Kbeam,NW,X1JET,X2JET,Irec,LBAD)
+
+C-----------------------------------------------------------------------
+C     routine to sample remnants
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+      INTEGER ITRY, NREJ
+      COMMON /S_CNT/ ITRY(20), NREJ(20)
+      
+c     external type declarations
+      DOUBLE PRECISION X1JET,X2JET
+      DIMENSION X2JET(NW_max)
+      INTEGER KBEAM,NW,IREC,LBAD
+
+C     COMMONs
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+C     parameters that represent: NW: max. number of wounded nucleons,
+C     NS,NH: max. number of soft and hard interactions
+c      PARAMETER (NW_max = 20)
+C     The COMMON block /S_CHIST/ contains information about the
+C     the structure of the  generated event:
+C     NWD   = number of wounded nucleons
+C     NJET = total number of hard interactions
+C     NSOF = total number of soft interactions
+C     NNSOF (1:NW) = number of soft pomeron cuts in each interaction
+C     NNJET (1:NW) = number of minijets produced in each interaction 
+C     JDIF(1:NW) = diffraction code 
+C                  0 : non-diff,
+C                  1 : beam-diff
+C                  2 : target-diff
+C                  3 : double-diff
+      INTEGER NNSOF,NNJET,JDIF,NWD,NJET,NSOF
+      COMMON /S_CHIST/ NNSOF(NW_max),NNJET(NW_max),
+     &     JDIF(NW_max),NWD,NJET,NSOF
+
+      INTEGER IRMNT,KRB,KRT
+      DOUBLE PRECISION XRMASS,XRMEX
+      COMMON /S_RMNT/ XRMASS(2),XRMEX(2),IRMNT(NW_max),KRB,KRT(NW_max)
+
+      INTEGER ICHP,ISTR,IBAR
+      COMMON /S_CHP/ ICHP(99), ISTR(99), IBAR(99)
+
+      INTEGER IISO,ISPN
+      COMMON /S_SPN/ IISO(99), ISPN(99)
+
+      INTEGER ICHM
+      COMMON /S_CHM/ ICHM(99)
+
+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
+
+c     internals
+      DOUBLE PRECISION PREM,PREM_NUC,R,R2,S_RNDM,FLVXCHG,ALPH
+      INTEGER ITGRMNT,IBMRMNT,I,j,jj,K,NPPLD,NPP0LD,IBMRMNT_OLD,
+     &     IBAD,IKBAD,KBM
+      DIMENSION ITGRMNT(NW_max)
+      SAVE
+      DATA PREM /0.D0/ , PREM_NUC /0.D0/
+
+      IF(Ndebug.gt.1) 
+     &  WRITE(LUN,*)' SAMPLE_RMNT: called with (Kbeam,NW,X1JET,',
+     &     'X2JET,JDIF,Irec):',Kbeam,NW,X1JET,(X2JET(JJ),JJ=1,NW),
+     &     (JDIF(JJ),JJ=1,NW),Irec
+
+      IF(Irec.eq.0.and.NW.ne.1)then
+         WRITE(LUN,*)' SAMPLE_RMNT: recursive call inconsistent!'
+         CALL SIB_REJECT('SAMPLE_RMNT     ')
+      endif
+
+c     default return point for remnant excitation routine:
+c     beam and target sampling
+      IBAD = 1
+
+c     set trial counter
+      ITRY(2) = 0
+c     remember position on parton stack
+      CALL GET_NPP(NPPLD,NPP0LD)
+
+C...  sample no. of remnants
+c     ibmrmnt: 0,1..NW : number of excitations on beamside
+C     itgrmnt: 0,1 : target side excitation
+
+c     prob. of remnant excitation
+      IF(IPAR(78).ne.0)THEN
+         PREM = PAR(23)
+         PREM_NUC = PAR(23)
+         IF(IPAR(84).eq.2.and.IBAR(IABS(KBeam)).eq.0)
+     &        PREM = PAR(140)
+      ENDIF           
+
+c     define Prem as probablility for remnant survival
+c     switch to sampling of remnant de-excitation
+      IF(IPAR(79).ne.0) PREM = 1.D0-PREM     
+
+c     prob. of remnant excitation target side
+      IF(IPAR(79).ne.0) PREM_NUC = 1.D0-PAR(23)
+      IF(IPAR(63).eq.1) PREM_NUC = PREM_NUC/dble(NW)
+
+c     turn of remnant for Nw>1
+      IF(IPAR(77).eq.1)THEN
+c     only beamside
+         IF(NW.gt.1) PREM = 0
+      ELSEIF(IPAR(77).eq.2)THEN
+c     target and beam-side
+         IF(NW.gt.1) then
+            PREM = 0.D0
+            PREM_NUC = 0.D0
+         endif
+      ELSE
+         CONTINUE
+      ENDIF
+
+C...  remnant mass dis. exponents
+      XRMEX(1) = PAR(98)        ! baryons
+      IF(IPAR(84).gt.0)THEN
+         XRMEX(2) = PAR(141)    ! mesons
+      else
+         XRMEX(2) = PAR(98)     ! mesons same as baryons
+      endif
+      
+      IBMRMNT = 0
+      DO K=1, NW
+c     additionally penalize remnant survival for multiple nucleon interactions
+         IF(IPAR(79).eq.2.and.K.gt.1) PREM=1.D0-PAR(23)*PAR(128)
+c     penalize remnant survival for multiple parton interactions
+         IF(IPAR(80).ne.0) THEN
+c     multiple interaction penalty for remnant survival, individual interaction
+            ALPH = 1.D0+PAR(129)*DBLE(NNSOF(K)+NNJET(K)-1)
+            PREM = 1.D0-(1.D0-PREM)**ALPH
+            PREM_NUC = 1.D0-(1.D0-PREM_NUC)**ALPH
+         ENDIF
+         IF(JDIF(K).eq.0)THEN
+            R = S_RNDM(k)
+            R2 = S_RNDM(0)
+            IF(R.LT.PREM) IBMRMNT = IBMRMNT + 1
+c     no target side excitation if recursive call (irec=0)!
+            IF(R2.LT.PREM_NUC*Irec) THEN
+               ITGRMNT(K) = 1
+            ELSE
+               ITGRMNT(K) = 0
+            ENDIF
+         ELSE
+            ITGRMNT(K) = 0
+         ENDIF
+         IF(Ndebug.gt.1) 
+     &        WRITE(LUN,'(2X,A,1X,I2,1X,F5.3,1X,I2,1X,I2,1X,I2,1X,I2)')
+     &        'SAMPLE_RMNT: (JW,PREM,NS,NH,IBMRMNT,LTGRMNT):',
+     &        K,PREM,NNSOF(k),NNJET(k),IBMRMNT,ITGRMNT(k)
+      ENDDO
+      IF(IPAR(79).ne.0)THEN
+c     Prem was redefined as probablility for remnant destruction
+c     therefore invert configuration..
+         DO K=1, NW
+            IF(JDIF(K).eq.0)THEN
+               ITGRMNT(K)=IABS(ITGRMNT(K)-1)
+            ENDIF
+         ENDDO
+c     multiple de-excitations not possible..
+         IBMRMNT=MIN(IBMRMNT,1)
+         IBMRMNT=IABS(IBMRMNT-1)*Irec
+      ENDIF
+      IF(Ndebug.gt.1) 
+     &     WRITE(LUN,*)
+     &     ' SAMPLE_RMNT: remnant sampling (PREM,NW,LBMRMNT,LTGRMNT): ',
+     &     PREM,NW,IBMRMNT,(ITGRMNT(j),j=1,NW)
+
+      IBMRMNT_OLD = IBMRMNT
+
+C...  Sample flavor and momentum fractions
+ 20   ITRY(2) = ITRY(2) + 1
+c     reset parton stack
+      CALL INI_PRTN_STCK(NPPLD,NPP0LD)
+      IBMRMNT = IBMRMNT_OLD
+
+c     retry without counting
+c 22   CONTINUE
+      IF(ITRY(2).gt.NREJ(2))THEN
+         LBAD = 2
+         IF(ndebug.gt.1)then 
+            WRITE(LUN,*)' SAMPLE_RMNT: number of trials exceeded'
+            WRITE(LUN,*)' resample minijets...(IREJ,NW,NCALL)',
+     &           LBAD, NW, NCALL
+         endif
+c     raise event call counter
+c         NCALL = NCALL + 1
+         RETURN
+      ENDIF
+
+      Kbm = Kbeam
+
+C..   sample central strings and remnant flavor
+      flvXchg = PAR(80)     ! prob. of flv exchange between strgs and rmnt
+c     remnant and sea on beam side
+      CALL SAMPLE_BEAM(Kbm,NW,flvXchg,IBMRMNT,X1JET,IKBAD)
+      IF(IKBAD.eq.1)THEN
+c     resample minijets event
+         LBAD = 3
+         RETURN
+      ELSEIF(IKBAD.eq.2)THEN
+c     too many partons, reject NW, i.e. entire event
+         LBAD = 1
+         RETURN
+      ENDIF
+
+c     remnants and sea on target side
+      CALL SAMPLE_TARGET(NW,flvXchg,ITGRMNT,X2JET,Irec,IKBAD)
+      IF(IKBAD.eq.1)THEN
+c     resample minijets event
+         LBAD = 3
+         RETURN
+      ELSEIF(IKBAD.eq.2)THEN
+c     too many partons, reject NW, i.e. entire event
+         LBAD = 1
+         RETURN
+      ENDIF
+
+C...  sample remnant excitation masses and add to parton stack
+c     beam-side (one remnant, formed by several interactions)
+c     target-side (possibly NW remnants)
+
+      DO I=1,NW
+c     default return point
+         IBAD = 1
+         IF(IPAR(78).EQ.1)THEN
+c$$$            write(lun,*) 
+c$$$     &           ' SIB_RMNT: multiple excitation model',
+c$$$     &           ' not implemented yet!'
+c$$$            stop
+c     model where beam side remnant can receive mass from multiple target nucleons
+            IF(IBMRMNT.gt.0)THEN
+c     beam side remnant excited               
+               if(ITGRMNT(I).eq.0)then
+                  CALL EXCT_RMNT(I,1,IBAD)
+               else
+                  CALL EXCT_RMNT(I,3,IBAD)
+               endif
+               IBMRMNT = IBMRMNT - 1
+            ELSE
+c     beam side remnant not excited
+               if(ITGRMNT(I).ne.0)then
+                  CALL EXCT_RMNT(I,2,IBAD)
+               else
+                  CALL EXCT_RMNT(I,0,IBAD)
+               endif
+            ENDIF
+
+         ELSEIF(IPAR(78).eq.2)then
+            IF(IBMRMNT.gt.0)then
+c     beam side remnant excited, only once!
+               IF(ITGRMNT(I).eq.0)then
+                  CALL EXCT_RMNT(I,1,IBAD)
+               else
+                  CALL EXCT_RMNT(I,3,IBAD)
+               endif
+               IBMRMNT = 0
+            ELSE
+c     beam side remnant not excited
+               IF(ITGRMNT(I).ne.0)then
+                  CALL EXCT_RMNT(I,2,IBAD)
+               else
+                  CALL EXCT_RMNT(I,0,IBAD)
+               endif
+            ENDIF
+         ELSE
+c     no remnant model
+            CALL EXCT_RMNT(I,0,IBAD)
+         ENDIF
+c     catch remant excitation exception, redo sea kinematics..
+         IF(IBAD.eq.1) GOTO 20
+c     catch severe exception, resample minijet kinematics..
+         IF(IBAD.eq.2) THEN
+            LBAD = 3
+            RETURN              ! resample event
+         ENDIF
+      ENDDO
+      LBAD = 0
+      
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_HADCSL(L,ECM,SIGTOT,SIGEL,SIGINEL,SIGDIF,SLOPE,RHO)
+
+C-----------------------------------------------------------------------
+C     low-energy cross section parametrizations (target always proton)
+C
+C     input:   L           beam particle: (1 - proton,
+C                                          2 - pion,
+C                                          3 - kaon)
+C                          target is always proton
+C              ECM         c.m. energy (GeV)
+C
+C     output:  SIGTOT      total cross section (mb)
+C              SIGEL       elastic cross section (mb)
+C              SIGDIF      diffractive cross section (sd-1,sd-2,dd, mb)
+C              SLOPE       forward elastic slope (GeV**-2)
+C              RHO         real/imaginary part of elastic amplitude
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DIMENSION SIGDIF(3)
+
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      SAVE
+
+C  proton-proton cross section as reference
+      CALL SIB_HADCS1(1,ECM,SIGTOT,SIGEL,SIGINEL,SLOPE,RHO)
+
+C  parametrization for diffraction
+      Xi_min = 1.5D0/(ECM*ECM)
+      Xi_max = PAR(13)
+      SIGeff = SIGEL
+      CALL SIB_HADCS2(ECM,Xi_min,Xi_max,SIGeff,SIGDIF)
+
+      if(L.eq.1) return
+
+C  regge motivated rescaling of diffraction dissociation
+      sigtot_pp = SIGTOT
+      sigel_pp  = SIGEL
+      slope_pp  = SLOPE
+      CALL SIB_HADCS1(L,ECM,SIGTOT,SIGEL,SIGINEL,SLOPE,RHO)
+      SIGDIF(1) = slope_pp/SLOPE*SIGTOT/sigtot_pp*SIGDIF(1)
+      SIGDIF(2) = slope_pp/SLOPE*SIGEL/sigel_pp*SIGDIF(2)
+      SIGDIF(3) = SIGTOT/sigtot_pp*SIGDIF(3)
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIB_HADCS1(L,ECM,SIGTOT,SIGEL,SIGINEL,SLOPE,RHO)
+
+C-----------------------------------------------------------------------
+C     low-energy cross section parametrizations
+C
+C     input:   L           beam particle: (1 - proton,
+C                                          2 - pion,
+C                                          3 - kaon)
+C                          target is always proton
+C              ECM         c.m. energy (GeV)
+C
+C     output:  SIGTOT      total cross section (mb)
+C              SIGEL       elastic cross section (mb)
+C              SIGDIF      diffractive cross section (sd-1,sd-2,dd, mb)
+C              SLOPE       forward elastic slope (GeV**-2)
+C              RHO         real/imaginary part of elastic amplitude
+C
+C     comments:
+C     - low-energy data interpolation uses PDG fits from 1992
+C     - slopes from ???, new fit to pp data
+C     - high-energy extrapolation by Donnachie-Landshoff like fit made
+C       by PDG 1996
+C     - analytic extension of amplitude to calculate rho
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+      DIMENSION TPDG92(7,2,6),TPDG96(9,6),BURQ83(3,6),XMA(6)
+      SAVE
+
+      DATA TPDG92  /
+     &  3.D0, 2100.D0, 48.D0, 0.D0, 1.D0, 0.522D0, -4.51D0,
+     &  3.D0, 2100.D0, 11.9D0, 26.9D0, -1.21D0, 0.169D0, -1.85D0,
+     &  5.D0, 2100.D0, 38.4D0, 77.6D0, -0.64D0, 0.26D0, -1.2D0,
+     &  5.D0, 2100.D0, 10.2D0, 52.7D0, -1.16D0, 0.125D0, -1.28D0,
+     &  4.D0, 340.D0,  16.4D0, 19.3D0, -0.42D0, 0.19D0, 0.D0,
+     &  4.D0, 340.D0,  0.D0, 11.4D0, -0.4D0, 0.079D0, 0.D0,
+     &  2.5D0, 370.D0, 33.D0, 14.D0, -1.36D0, 0.456D0, -4.03D0,
+     &  2.5D0, 370.D0, 1.76D0, 11.2D0, -0.64D0, 0.043D0, 0.D0,
+     &  2.D0, 310.D0,  18.1D0, 0.D0, 1.D0, 0.26D0, -1.D0,
+     &  2.D0, 310.D0,  5.D0, 8.1D0, -1.8D0, 0.16D0, -1.3D0,
+     &  3.D0, 310.D0,  32.1D0, 0.D0, 1.D0, 0.66D0, -5.6D0,
+     &  3.D0, 310.D0,  7.3D0, 0.D0, 1.D0, 0.29D0, -2.4D0  /
+
+      DATA TPDG96  /
+     &  50.D0, 22.D0,0.079D0,0.25D0,0.D0,
+     &         77.15D0,-21.05D0,0.46D0,0.9D0,
+     &  50.D0, 22.D0,0.079D0,0.25D0,0.D0,
+     &         77.15D0,21.05D0,0.46D0,0.9D0,
+     &  10.D0, 13.70D0,0.079D0,0.25D0,0.D0,
+     &         31.85D0,-4.05D0,0.45D0,0.9D0,
+     &  10.D0, 13.70D0,0.079D0,0.25D0,0.D0,
+     &         31.85D0,4.05D0,0.45D0,0.9D0,
+     &  10.D0, 12.20D0,0.079D0,0.25D0,0.D0,
+     &         17.35D0,-9.05D0,0.50D0,0.9D0,
+     &  10.D0, 12.20D0,0.079D0,0.25D0,0.D0,
+     &         17.35D0,9.05D0,0.50D0,0.9D0  /
+
+      DATA BURQ83 /
+     &  8.557D0,  0.00D0, 0.574D0,
+     &  11.13D0,  7.23D0, 0.30D0,
+     &  9.11D0,  -0.73D0, 0.28D0,
+     &  9.11D0,   0.65D0, 0.28D0,
+     &  8.55D0,  -5.98D0, 0.28D0,
+     &  8.55D0,   1.60D0, 0.28D0  /
+
+c     DATA XMA / 2*0.93956563D0, 2*0.13956995D0, 2*0.493677D0 /
+      DATA GEV2MB /0.389365D0/
+      DATA INIT/0/
+
+      IF(INIT.EQ.0) THEN
+c  use the internal masses 
+        XMA(1) =  AM(13)   ! proton
+        XMA(2) =  AM(14)   ! neutron
+        XMA(3) =  AM(7)    ! pi+
+        XMA(4) =  AM(8)    ! pi-
+        XMA(5) =  AM(9)    ! K+
+        XMA(6) =  AM(10)   ! K-
+        INIT = 1
+      ENDIF
+
+C  find index
+      IF    (L.eq.1) THEN
+        K = 1                            ! p p
+      ELSEIF(L.eq.2) THEN
+        K = 3                            ! pi+ p
+*       K = 4                            ! pi- p
+      ELSEIF(L.eq.3) THEN
+        K = 5                            ! K+ p
+*       K = 6                            ! K- p
+      ELSE
+        GOTO 100
+      ENDIF
+
+C  calculate lab momentum
+      SS = ECM**2
+      E1 = (SS-XMA(1)**2-XMA(K)**2)/(2.D0*XMA(1))
+      PL = dSQRT((E1-XMA(K))*(E1+XMA(K)))
+      PLL = dLOG(PL)
+
+C  check against lower limit
+      IF(ECM.LE.XMA(1)+XMA(K)) GOTO 200
+
+      XP  = TPDG96(2,K)*SS**TPDG96(3,K)
+      YP  = TPDG96(6,K)/SS**TPDG96(8,K)
+      YM  = TPDG96(7,K)/SS**TPDG96(8,K)
+
+      PHR = dTAN(PI/2.D0*(1.D0-TPDG96(8,K)))
+      PHP = dTAN(PI/2.D0*(1.D0+TPDG96(3,K)))
+      RHO = (-YP/PHR + YM*PHR - XP/PHP)/(YP+YM+XP)
+
+      SLOPE = BURQ83(1,K)+BURQ83(2,K)/dSQRT(PL)+BURQ83(3,K)*PLL
+
+C  select energy range and interpolation method
+      IF(PL.LT.TPDG96(1,K)) THEN
+        SIGTOT = TPDG92(3,1,K)+TPDG92(4,1,K)*PL**TPDG92(5,1,K)
+     &          + TPDG92(6,1,K)*PLL**2+TPDG92(7,1,K)*PLL
+        SIGEL  = TPDG92(3,2,K)+TPDG92(4,2,K)*PL**TPDG92(5,2,K)
+     &          + TPDG92(6,2,K)*PLL**2+TPDG92(7,2,K)*PLL
+      ELSE IF(PL.LT.TPDG92(2,1,K)) THEN
+        SIGTO1 = TPDG92(3,1,K)+TPDG92(4,1,K)*PL**TPDG92(5,1,K)
+     &          + TPDG92(6,1,K)*PLL**2+TPDG92(7,1,K)*PLL
+        SIGEL1 = TPDG92(3,2,K)+TPDG92(4,2,K)*PL**TPDG92(5,2,K)
+     &          + TPDG92(6,2,K)*PLL**2+TPDG92(7,2,K)*PLL
+        SIGTO2 = YP+YM+XP
+        SIGEL2 = SIGTO2**2/(16.D0*PI*SLOPE*GEV2MB)*(1.D0+RHO**2)
+        X2 = dLOG(PL/TPDG96(1,K))/dLOG(TPDG92(2,1,K)/TPDG96(1,K))
+        X1 = 1.D0 - X2
+        SIGTOT = SIGTO2*X2 + SIGTO1*X1
+        SIGEL  = SIGEL2*X2 + SIGEL1*X1
+      ELSE
+        SIGTOT = YP+YM+XP
+        SIGEL  = SIGTOT**2/(16.D0*PI*SLOPE*GEV2MB)*(1.D0+RHO**2)
+      ENDIF
+      SIGINEL = SIGTOT-SIGEL
+
+      RETURN
+
+ 100  CONTINUE
+        WRITE(LUN,'(1X,2A,2I7)') ' SIB_HADCS1: ',
+     &    'invalid beam particle: ',L
+        RETURN
+
+ 200  CONTINUE
+        WRITE(LUN,'(1X,2A,1P,E12.4)') ' SIB_HADCS1: ',
+     &    'energy too small (Ecm): ',ECM
+
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_HADCS2(SQS,Xi_min,Xi_max,SIGeff,SIGDIF)
+
+C-----------------------------------------------------------------------
+C   cross section for diffraction dissociation 
+C
+C   - single diffraction dissociation:
+C     Goulianos' parametrization (Ref: PL B358 (1995) 379)
+C   - double diffration dissociation: simple scaling model using 
+C     single diff. cross section
+C
+C     in addition rescaling for different particles is applied using
+C     internal rescaling tables (not implemented yet)
+C
+C     input:     SQS         c.m. energy (GeV)
+C                Xi_min      min. diff mass (squared) = Xi_min*SQS**2
+C                Xi_max      max. diff mass (squared) = Xi_max*SQS**2
+C                SIGeff      effective cross section for DD scaling
+C
+C     output:    sig_sd1     cross section for diss. of particle 1 (mb)
+C                sig_sd2     cross section for diss. of particle 2 (mb)
+C                sig_dd      cross section for diss. of both particles
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DIMENSION SIGDIF(3)
+      DIMENSION Xpos1(96),Xwgh1(96),Xpos2(96),Xwgh2(96)
+      DOUBLE PRECISION xil,xiu,tl,tu
+      DOUBLE PRECISION PI,TWOPI,CMBARN
+      COMMON /SIB_CST/ PI,TWOPI,CMBARN
+      SAVE
+
+C  model parameters
+      DATA delta    / 0.104D0 /
+      DATA alphap   / 0.25D0 /
+      DATA beta0    / 6.56D0 /
+      DATA gpom0    / 1.21D0 /
+      DATA xm_p     / 0.938D0 /
+      DATA x_rad2   / 0.71D0 /
+
+C  integration precision
+      DATA Ngau1    / 32 /
+      DATA Ngau2    / 32 /
+
+      DATA GEV2MB /0.389365D0/
+
+      SIGDIF(1) = 0.D0
+      SIGDIF(2) = 0.D0
+      SIGDIF(3) = 0.D0
+
+      XIL = dLOG(Xi_min)
+      XIU = dLOG(Xi_max)
+
+      if(XIL.ge.XIU) return
+
+      SS = SQS*SQS
+      xm4_p2 = 4.D0*xm_p**2
+      fac = beta0**2/(16.D0*PI)
+
+      t1 = -5.D0
+      t2 = 0.D0
+      tl = x_rad2/3.D0/(1.D0-t1/x_rad2)**3
+      tu = x_rad2/3.D0/(1.D0-t2/x_rad2)**3
+
+C  flux renormalization and cross section for pp/ppbar case
+
+      Xnorm  = 0.D0
+
+      xil = dlog(1.5D0/SS)
+      xiu = dlog(0.1D0)
+
+      IF(xiu.LE.xil) goto 1000
+
+      CALL SIB_GAUSET(xil,xiu,Ngau1,xpos1,xwgh1)
+      CALL SIB_GAUSET(tl,tu,Ngau2,xpos2,xwgh2)
+
+      do i1=1,Ngau1
+
+        xi = dexp(xpos1(i1))
+        w_xi = Xwgh1(i1)
+
+        do i2=1,Ngau2
+
+          tt = x_rad2-x_rad2*(x_rad2/(3.D0*xpos2(i2)))**(1.D0/3.D0)
+
+          alpha_t =  1.D0+delta+alphap*tt
+          f2_t = ((xm4_p2-2.8D0*tt)/(xm4_p2-tt))**2
+            
+          Xnorm = Xnorm
+     &      + f2_t*xi**(2.D0-2.D0*alpha_t)*Xwgh2(i2)*w_xi
+
+        enddo
+      enddo   
+
+      Xnorm = Xnorm*fac
+
+ 1000 continue
+
+      XIL = dLOG(Xi_min)
+      XIU = dLOG(Xi_max)
+
+      T1 = -5.D0
+      T2 = 0.D0
+
+      TL = x_rad2/3.D0/(1.D0-t1/x_rad2)**3
+      TU = x_rad2/3.D0/(1.D0-t2/x_rad2)**3
+
+C  single diffraction diss. cross section 
+
+      CSdiff = 0.D0
+
+      CALL SIB_GAUSET(XIL,XIU,NGAU1,XPOS1,XWGH1)
+      CALL SIB_GAUSET(TL,TU,NGAU2,XPOS2,XWGH2)
+
+      do i1=1,Ngau1
+
+        xi = dexp(xpos1(i1))
+        w_xi = Xwgh1(i1)*beta0*gpom0*(xi*ss)**delta
+
+        do i2=1,Ngau2
+
+          tt = x_rad2-x_rad2*(x_rad2/(3.D0*xpos2(i2)))**(1.D0/3.D0)
+
+          alpha_t =  1.D0+delta+alphap*tt
+          f2_t = ((xm4_p2-2.8D0*tt)/(xm4_p2-tt))**2
+
+          CSdiff = CSdiff 
+     &      + f2_t*xi**(2.D0-2.D0*alpha_t)*Xwgh2(i2)*w_xi
+
+        enddo
+      enddo
+
+      CSdiff = CSdiff*fac*GEV2MB/MAX(1.D0,Xnorm)
+
+*     write(LUN,'(1x,1p,4e14.3)') 
+*    &  sqrt(SS),Xnorm,2.d0*CSdiff*MAX(1.d0,Xnorm),2.d0*CSdiff
+
+      SIGDIF(1) = CSdiff
+      SIGDIF(2) = CSdiff
+
+C  double diff. dissociation from simple probability consideration
+*     Pdiff = 0.5d0-sqrt(0.25d0-CSdiff/SIGeff)
+      Pdiff = CSdiff/SIGeff
+      SIGDIF(3) = Pdiff*Pdiff*SIGeff
+
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_GAUSET(AX,BX,NX,Z,W)
+
+C-----------------------------------------------------------------------
+C
+C     N-point gauss zeros and weights for the interval (AX,BX) are
+C           stored in  arrays Z and W respectively.
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C
+      COMMON /GQCOM/A(273),X(273),KTAB(96)
+      DIMENSION Z(NX),W(NX)
+      SAVE
+      DATA INIT/0/
+C
+      ALPHA=0.5D0*(BX+AX)
+      BETA=0.5D0*(BX-AX)
+      N=NX
+*
+*  the N=1 case:
+      IF(N.NE.1) GO TO 1
+      Z(1)=ALPHA
+      W(1)=BX-AX
+      RETURN
+*
+*  the Gauss cases:
+    1 IF((N.LE.16).AND.(N.GT.1)) GO TO 2
+      IF(N.EQ.20) GO TO 2
+      IF(N.EQ.24) GO TO 2
+      IF(N.EQ.32) GO TO 2
+      IF(N.EQ.40) GO TO 2
+      IF(N.EQ.48) GO TO 2
+      IF(N.EQ.64) GO TO 2
+      IF(N.EQ.80) GO TO 2
+      IF(N.EQ.96) GO TO 2
+*
+*  the extended Gauss cases:
+      IF((N/96)*96.EQ.N) GO TO 3
+*
+C  jump to center of intervall intrgration:
+      GO TO 100
+*
+C  get Gauss point array
+*
+    2 CALL PO106BD
+C     -print out message
+*     IF(INIT.LE.20)THEN
+*       INIT=init+1
+*       WRITE (6,*) ' initialization of Gauss int. N=',N
+*     ENDIF
+C  extract real points
+      K=KTAB(N)
+      M=N/2
+      DO 21 J=1,M
+C       extract values from big array
+        JTAB=K-1+J
+        WTEMP=BETA*A(JTAB)
+        DELTA=BETA*X(JTAB)
+C       store them backward
+        Z(J)=ALPHA-DELTA
+        W(J)=WTEMP
+C       store them forward
+        JP=N+1-J
+        Z(JP)=ALPHA+DELTA
+        W(JP)=WTEMP
+   21 CONTINUE
+C     store central point (odd N)
+      IF((N-M-M).EQ.0) RETURN
+      Z(M+1)=ALPHA
+      JMID=K+M
+      W(M+1)=BETA*A(JMID)
+      RETURN
+C
+C  get ND96 times chained 96 Gauss point array
+C
+    3 CALL PO106BD
+C  print out message
+      IF(INIT.LE.20)THEN
+        INIT=init+1
+        WRITE (6,*) ' initialization of extended Gauss int. N=',N
+      ENDIF
+C     -extract real points
+      K=KTAB(96)
+      ND96=N/96
+      DO 31 J=1,48
+C       extract values from big array
+        JTAB=K-1+J
+        WTEMP=BETA*A(JTAB)
+        DELTA=BETA*X(JTAB)
+        WTeMP=WTEMP/ND96
+        DeLTA=DELTA/ND96
+        DO 32 JD96=0,ND96-1
+          ZCNTR= (ALPHA-BETA)+ BETA*DBLE(2*JD96+1)/DBLE(ND96)
+C         store them backward
+          Z(J+JD96*96)=ZCNTR-DELTA
+          W(J+JD96*96)=WTEMP
+C         store them forward
+          JP=96+1-J
+          Z(JP+JD96*96)=ZCNTR+DELTA
+          W(JP+JD96*96)=WTEMP
+   32   CONTINUE
+   31 CONTINUE
+      RETURN
+*
+C  the center of intervall cases:
+  100 CONTINUE
+C  print out message
+      IF(INIT.LE.20)THEN
+        INIT=init+1
+        WRITE (6,*) ' init. of center of intervall int. N=',N
+      ENDIF
+C  put in constant weight and equally spaced central points
+      N=IABS(N)
+      DO 111 IN=1,N
+        WIN=(BX-AX)/DBLE(N)
+        Z(IN)=AX  + (DBLE(IN)-.5D0)*WIN
+  111 W(IN)=WIN
+      RETURN
+      END
+
+C=======================================================================
+
+      SUBROUTINE PO106BD
+
+C-----------------------------------------------------------------------
+C
+C     store big arrays needed for Gauss integral, CERNLIB D106BD
+C     (arrays A,X,ITAB copied on B,Y,LTAB)
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+C
+      COMMON /GQCOM/ B(273),Y(273),LTAB(96)
+      DIMENSION      A(273),X(273),KTAB(96)
+      SAVE
+C
+C-----TABLE OF INITIAL SUBSCRIPTS FOR N=2(1)16(4)96
+      DATA KTAB(2)/1/
+      DATA KTAB(3)/2/
+      DATA KTAB(4)/4/
+      DATA KTAB(5)/6/
+      DATA KTAB(6)/9/
+      DATA KTAB(7)/12/
+      DATA KTAB(8)/16/
+      DATA KTAB(9)/20/
+      DATA KTAB(10)/25/
+      DATA KTAB(11)/30/
+      DATA KTAB(12)/36/
+      DATA KTAB(13)/42/
+      DATA KTAB(14)/49/
+      DATA KTAB(15)/56/
+      DATA KTAB(16)/64/
+      DATA KTAB(20)/72/
+      DATA KTAB(24)/82/
+      DATA KTAB(28)/82/
+      DATA KTAB(32)/94/
+      DATA KTAB(36)/94/
+      DATA KTAB(40)/110/
+      DATA KTAB(44)/110/
+      DATA KTAB(48)/130/
+      DATA KTAB(52)/130/
+      DATA KTAB(56)/130/
+      DATA KTAB(60)/130/
+      DATA KTAB(64)/154/
+      DATA KTAB(68)/154/
+      DATA KTAB(72)/154/
+      DATA KTAB(76)/154/
+      DATA KTAB(80)/186/
+      DATA KTAB(84)/186/
+      DATA KTAB(88)/186/
+      DATA KTAB(92)/186/
+      DATA KTAB(96)/226/
+C
+C-----TABLE OF ABSCISSAE (X) AND WEIGHTS (A) FOR INTERVAL (-1,+1).
+C
+C-----N=2
+      DATA X(1)/0.577350269189626D0  /, A(1)/1.000000000000000D0  /
+C-----N=3
+      DATA X(2)/0.774596669241483D0  /, A(2)/0.555555555555556D0  /
+      DATA X(3)/0.000000000000000D0  /, A(3)/0.888888888888889D0  /
+C-----N=4
+      DATA X(4)/0.861136311594053D0  /, A(4)/0.347854845137454D0  /
+      DATA X(5)/0.339981043584856D0  /, A(5)/0.652145154862546D0  /
+C-----N=5
+      DATA X(6)/0.906179845938664D0  /, A(6)/0.236926885056189D0  /
+      DATA X(7)/0.538469310105683D0  /, A(7)/0.478628670499366D0  /
+      DATA X(8)/0.000000000000000D0  /, A(8)/0.568888888888889D0  /
+C-----N=6
+      DATA X(9)/0.932469514203152D0  /, A(9)/0.171324492379170D0  /
+      DATA X(10)/0.661209386466265D0 /, A(10)/0.360761573048139D0 /
+      DATA X(11)/0.238619186083197D0 /, A(11)/0.467913934572691D0 /
+C-----N=7
+      DATA X(12)/0.949107912342759D0 /, A(12)/0.129484966168870D0 /
+      DATA X(13)/0.741531185599394D0 /, A(13)/0.279705391489277D0 /
+      DATA X(14)/0.405845151377397D0 /, A(14)/0.381830050505119D0 /
+      DATA X(15)/0.000000000000000D0 /, A(15)/0.417959183673469D0 /
+C-----N=8
+      DATA X(16)/0.960289856497536D0 /, A(16)/0.101228536290376D0 /
+      DATA X(17)/0.796666477413627D0 /, A(17)/0.222381034453374D0 /
+      DATA X(18)/0.525532409916329D0 /, A(18)/0.313706645877887D0 /
+      DATA X(19)/0.183434642495650D0 /, A(19)/0.362683783378362D0 /
+C-----N=9
+      DATA X(20)/0.968160239507626D0 /, A(20)/0.081274388361574D0 /
+      DATA X(21)/0.836031107326636D0 /, A(21)/0.180648160694857D0 /
+      DATA X(22)/0.613371432700590D0 /, A(22)/0.260610696402935D0 /
+      DATA X(23)/0.324253423403809D0 /, A(23)/0.312347077040003D0 /
+      DATA X(24)/0.000000000000000D0 /, A(24)/0.330239355001260D0 /
+C-----N=10
+      DATA X(25)/0.973906528517172D0 /, A(25)/0.066671344308688D0 /
+      DATA X(26)/0.865063366688985D0 /, A(26)/0.149451349150581D0 /
+      DATA X(27)/0.679409568299024D0 /, A(27)/0.219086362515982D0 /
+      DATA X(28)/0.433395394129247D0 /, A(28)/0.269266719309996D0 /
+      DATA X(29)/0.148874338981631D0 /, A(29)/0.295524224714753D0 /
+C-----N=11
+      DATA X(30)/0.978228658146057D0 /, A(30)/0.055668567116174D0 /
+      DATA X(31)/0.887062599768095D0 /, A(31)/0.125580369464905D0 /
+      DATA X(32)/0.730152005574049D0 /, A(32)/0.186290210927734D0 /
+      DATA X(33)/0.519096129206812D0 /, A(33)/0.233193764591990D0 /
+      DATA X(34)/0.269543155952345D0 /, A(34)/0.262804544510247D0 /
+      DATA X(35)/0.000000000000000D0 /, A(35)/0.272925086777901D0 /
+C-----N=12
+      DATA X(36)/0.981560634246719D0 /, A(36)/0.047175336386512D0 /
+      DATA X(37)/0.904117256370475D0 /, A(37)/0.106939325995318D0 /
+      DATA X(38)/0.769902674194305D0 /, A(38)/0.160078328543346D0 /
+      DATA X(39)/0.587317954286617D0 /, A(39)/0.203167426723066D0 /
+      DATA X(40)/0.367831498998180D0 /, A(40)/0.233492536538355D0 /
+      DATA X(41)/0.125233408511469D0 /, A(41)/0.249147045813403D0 /
+C-----N=13
+      DATA X(42)/0.984183054718588D0 /, A(42)/0.040484004765316D0 /
+      DATA X(43)/0.917598399222978D0 /, A(43)/0.092121499837728D0 /
+      DATA X(44)/0.801578090733310D0 /, A(44)/0.138873510219787D0 /
+      DATA X(45)/0.642349339440340D0 /, A(45)/0.178145980761946D0 /
+      DATA X(46)/0.448492751036447D0 /, A(46)/0.207816047536889D0 /
+      DATA X(47)/0.230458315955135D0 /, A(47)/0.226283180262897D0 /
+      DATA X(48)/0.000000000000000D0 /, A(48)/0.232551553230874D0 /
+C-----N=14
+      DATA X(49)/0.986283808696812D0 /, A(49)/0.035119460331752D0 /
+      DATA X(50)/0.928434883663574D0 /, A(50)/0.080158087159760D0 /
+      DATA X(51)/0.827201315069765D0 /, A(51)/0.121518570687903D0 /
+      DATA X(52)/0.687292904811685D0 /, A(52)/0.157203167158194D0 /
+      DATA X(53)/0.515248636358154D0 /, A(53)/0.185538397477938D0 /
+      DATA X(54)/0.319112368927890D0 /, A(54)/0.205198463721296D0 /
+      DATA X(55)/0.108054948707344D0 /, A(55)/0.215263853463158D0 /
+C-----N=15
+      DATA X(56)/0.987992518020485D0 /, A(56)/0.030753241996117D0 /
+      DATA X(57)/0.937273392400706D0 /, A(57)/0.070366047488108D0 /
+      DATA X(58)/0.848206583410427D0 /, A(58)/0.107159220467172D0 /
+      DATA X(59)/0.724417731360170D0 /, A(59)/0.139570677926154D0 /
+      DATA X(60)/0.570972172608539D0 /, A(60)/0.166269205816994D0 /
+      DATA X(61)/0.394151347077563D0 /, A(61)/0.186161000015562D0 /
+      DATA X(62)/0.201194093997435D0 /, A(62)/0.198431485327111D0 /
+      DATA X(63)/0.000000000000000D0 /, A(63)/0.202578241925561D0 /
+C-----N=16
+      DATA X(64)/0.989400934991650D0 /, A(64)/0.027152459411754D0 /
+      DATA X(65)/0.944575023073233D0 /, A(65)/0.062253523938648D0 /
+      DATA X(66)/0.865631202387832D0 /, A(66)/0.095158511682493D0 /
+      DATA X(67)/0.755404408355003D0 /, A(67)/0.124628971255534D0 /
+      DATA X(68)/0.617876244402644D0 /, A(68)/0.149595988816577D0 /
+      DATA X(69)/0.458016777657227D0 /, A(69)/0.169156519395003D0 /
+      DATA X(70)/0.281603550779259D0 /, A(70)/0.182603415044924D0 /
+      DATA X(71)/0.095012509837637D0 /, A(71)/0.189450610455069D0 /
+C-----N=20
+      DATA X(72)/0.993128599185094D0 /, A(72)/0.017614007139152D0 /
+      DATA X(73)/0.963971927277913D0 /, A(73)/0.040601429800386D0 /
+      DATA X(74)/0.912234428251325D0 /, A(74)/0.062672048334109D0 /
+      DATA X(75)/0.839116971822218D0 /, A(75)/0.083276741576704D0 /
+      DATA X(76)/0.746331906460150D0 /, A(76)/0.101930119817240D0 /
+      DATA X(77)/0.636053680726515D0 /, A(77)/0.118194531961518D0 /
+      DATA X(78)/0.510867001950827D0 /, A(78)/0.131688638449176D0 /
+      DATA X(79)/0.373706088715419D0 /, A(79)/0.142096109318382D0 /
+      DATA X(80)/0.227785851141645D0 /, A(80)/0.149172986472603D0 /
+      DATA X(81)/0.076526521133497D0 /, A(81)/0.152753387130725D0 /
+C-----N=24
+      DATA X(82)/0.995187219997021D0 /, A(82)/0.012341229799987D0 /
+      DATA X(83)/0.974728555971309D0 /, A(83)/0.028531388628933D0 /
+      DATA X(84)/0.938274552002732D0 /, A(84)/0.044277438817419D0 /
+      DATA X(85)/0.886415527004401D0 /, A(85)/0.059298584915436D0 /
+      DATA X(86)/0.820001985973902D0 /, A(86)/0.073346481411080D0 /
+      DATA X(87)/0.740124191578554D0 /, A(87)/0.086190161531953D0 /
+      DATA X(88)/0.648093651936975D0 /, A(88)/0.097618652104113D0 /
+      DATA X(89)/0.545421471388839D0 /, A(89)/0.107444270115965D0 /
+      DATA X(90)/0.433793507626045D0 /, A(90)/0.115505668053725D0 /
+      DATA X(91)/0.315042679696163D0 /, A(91)/0.121670472927803D0 /
+      DATA X(92)/0.191118867473616D0 /, A(92)/0.125837456346828D0 /
+      DATA X(93)/0.064056892862605D0 /, A(93)/0.127938195346752D0 /
+C-----N=32
+      DATA X(94)/0.997263861849481D0 /, A(94)/0.007018610009470D0 /
+      DATA X(95)/0.985611511545268D0 /, A(95)/0.016274394730905D0 /
+      DATA X(96)/0.964762255587506D0 /, A(96)/0.025392065309262D0 /
+      DATA X(97)/0.934906075937739D0 /, A(97)/0.034273862913021D0 /
+      DATA X(98)/0.896321155766052D0 /, A(98)/0.042835898022226D0 /
+      DATA X(99)/0.849367613732569D0 /, A(99)/0.050998059262376D0 /
+      DATA X(100)/0.794483795967942D0/, A(100)/0.058684093478535D0/
+      DATA X(101)/0.732182118740289D0/, A(101)/0.065822222776361D0/
+      DATA X(102)/0.663044266930215D0/, A(102)/0.072345794108848D0/
+      DATA X(103)/0.587715757240762D0/, A(103)/0.078193895787070D0/
+      DATA X(104)/0.506899908932229D0/, A(104)/0.083311924226946D0/
+      DATA X(105)/0.421351276130635D0/, A(105)/0.087652093004403D0/
+      DATA X(106)/0.331868602282127D0/, A(106)/0.091173878695763D0/
+      DATA X(107)/0.239287362252137D0/, A(107)/0.093844399080804D0/
+      DATA X(108)/0.144471961582796D0/, A(108)/0.095638720079274D0/
+      DATA X(109)/0.048307665687738D0/, A(109)/0.096540088514727D0/
+C-----N=40
+      DATA X(110)/0.998237709710559D0/, A(110)/0.004521277098533D0/
+      DATA X(111)/0.990726238699457D0/, A(111)/0.010498284531152D0/
+      DATA X(112)/0.977259949983774D0/, A(112)/0.016421058381907D0/
+      DATA X(113)/0.957916819213791D0/, A(113)/0.022245849194166D0/
+      DATA X(114)/0.932812808278676D0/, A(114)/0.027937006980023D0/
+      DATA X(115)/0.902098806968874D0/, A(115)/0.033460195282547D0/
+      DATA X(116)/0.865959503212259D0/, A(116)/0.038782167974472D0/
+      DATA X(117)/0.824612230833311D0/, A(117)/0.043870908185673D0/
+      DATA X(118)/0.778305651426519D0/, A(118)/0.048695807635072D0/
+      DATA X(119)/0.727318255189927D0/, A(119)/0.053227846983936D0/
+      DATA X(120)/0.671956684614179D0/, A(120)/0.057439769099391D0/
+      DATA X(121)/0.612553889667980D0/, A(121)/0.061306242492928D0/
+      DATA X(122)/0.549467125095128D0/, A(122)/0.064804013456601D0/
+      DATA X(123)/0.483075801686178D0/, A(123)/0.067912045815233D0/
+      DATA X(124)/0.413779204371605D0/, A(124)/0.070611647391286D0/
+      DATA X(125)/0.341994090825758D0/, A(125)/0.072886582395804D0/
+      DATA X(126)/0.268152185007253D0/, A(126)/0.074723169057968D0/
+      DATA X(127)/0.192697580701371D0/, A(127)/0.076110361900626D0/
+      DATA X(128)/0.116084070675255D0/, A(128)/0.077039818164247D0/
+      DATA X(129)/0.038772417506050D0/, A(129)/0.077505947978424D0/
+C-----N=48
+      DATA X(130)/0.998771007252426D0/, A(130)/0.003153346052305D0/
+      DATA X(131)/0.993530172266350D0/, A(131)/0.007327553901276D0/
+      DATA X(132)/0.984124583722826D0/, A(132)/0.011477234579234D0/
+      DATA X(133)/0.970591592546247D0/, A(133)/0.015579315722943D0/
+      DATA X(134)/0.952987703160430D0/, A(134)/0.019616160457355D0/
+      DATA X(135)/0.931386690706554D0/, A(135)/0.023570760839324D0/
+      DATA X(136)/0.905879136715569D0/, A(136)/0.027426509708356D0/
+      DATA X(137)/0.876572020274247D0/, A(137)/0.031167227832798D0/
+      DATA X(138)/0.843588261624393D0/, A(138)/0.034777222564770D0/
+      DATA X(139)/0.807066204029442D0/, A(139)/0.038241351065830D0/
+      DATA X(140)/0.767159032515740D0/, A(140)/0.041545082943464D0/
+      DATA X(141)/0.724034130923814D0/, A(141)/0.044674560856694D0/
+      DATA X(142)/0.677872379632663D0/, A(142)/0.047616658492490D0/
+      DATA X(143)/0.628867396776513D0/, A(143)/0.050359035553854D0/
+      DATA X(144)/0.577224726083972D0/, A(144)/0.052890189485193D0/
+      DATA X(145)/0.523160974722233D0/, A(145)/0.055199503699984D0/
+      DATA X(146)/0.466902904750958D0/, A(146)/0.057277292100403D0/
+      DATA X(147)/0.408686481990716D0/, A(147)/0.059114839698395D0/
+      DATA X(148)/0.348755886292160D0/, A(148)/0.060704439165893D0/
+      DATA X(149)/0.287362487355455D0/, A(149)/0.062039423159892D0/
+      DATA X(150)/0.224763790394689D0/, A(150)/0.063114192286254D0/
+      DATA X(151)/0.161222356068891D0/, A(151)/0.063924238584648D0/
+      DATA X(152)/0.097004699209462D0/, A(152)/0.064466164435950D0/
+      DATA X(153)/0.032380170962869D0/, A(153)/0.064737696812683D0/
+C-----N=64
+      DATA X(154)/0.999305041735772D0/, A(154)/0.001783280721696D0/
+      DATA X(155)/0.996340116771955D0/, A(155)/0.004147033260562D0/
+      DATA X(156)/0.991013371476744D0/, A(156)/0.006504457968978D0/
+      DATA X(157)/0.983336253884625D0/, A(157)/0.008846759826363D0/
+      DATA X(158)/0.973326827789910D0/, A(158)/0.011168139460131D0/
+      DATA X(159)/0.961008799652053D0/, A(159)/0.013463047896718D0/
+      DATA X(160)/0.946411374858402D0/, A(160)/0.015726030476024D0/
+      DATA X(161)/0.929569172131939D0/, A(161)/0.017951715775697D0/
+      DATA X(162)/0.910522137078502D0/, A(162)/0.020134823153530D0/
+      DATA X(163)/0.889315445995114D0/, A(163)/0.022270173808383D0/
+      DATA X(164)/0.865999398154092D0/, A(164)/0.024352702568710D0/
+      DATA X(165)/0.840629296252580D0/, A(165)/0.026377469715054D0/
+      DATA X(166)/0.813265315122797D0/, A(166)/0.028339672614259D0/
+      DATA X(167)/0.783972358943341D0/, A(167)/0.030234657072402D0/
+      DATA X(168)/0.752819907260531D0/, A(168)/0.032057928354851D0/
+      DATA X(169)/0.719881850171610D0/, A(169)/0.033805161837141D0/
+      DATA X(170)/0.685236313054233D0/, A(170)/0.035472213256882D0/
+      DATA X(171)/0.648965471254657D0/, A(171)/0.037055128540240D0/
+      DATA X(172)/0.611155355172393D0/, A(172)/0.038550153178615D0/
+      DATA X(173)/0.571895646202634D0/, A(173)/0.039953741132720D0/
+      DATA X(174)/0.531279464019894D0/, A(174)/0.041262563242623D0/
+      DATA X(175)/0.489403145707052D0/, A(175)/0.042473515123653D0/
+      DATA X(176)/0.446366017253464D0/, A(176)/0.043583724529323D0/
+      DATA X(177)/0.402270157963991D0/, A(177)/0.044590558163756D0/
+      DATA X(178)/0.357220158337668D0/, A(178)/0.045491627927418D0/
+      DATA X(179)/0.311322871990210D0/, A(179)/0.046284796581314D0/
+      DATA X(180)/0.264687162208767D0/, A(180)/0.046968182816210D0/
+      DATA X(181)/0.217423643740007D0/, A(181)/0.047540165714830D0/
+      DATA X(182)/0.169644420423992D0/, A(182)/0.047999388596458D0/
+      DATA X(183)/0.121462819296120D0/, A(183)/0.048344762234802D0/
+      DATA X(184)/0.072993121787799D0/, A(184)/0.048575467441503D0/
+      DATA X(185)/0.024350292663424D0/, A(185)/0.048690957009139D0/
+C-----N=80
+      DATA X(186)/0.999553822651630D0/, A(186)/0.001144950003186D0/
+      DATA X(187)/0.997649864398237D0/, A(187)/0.002663533589512D0/
+      DATA X(188)/0.994227540965688D0/, A(188)/0.004180313124694D0/
+      DATA X(189)/0.989291302499755D0/, A(189)/0.005690922451403D0/
+      DATA X(190)/0.982848572738629D0/, A(190)/0.007192904768117D0/
+      DATA X(191)/0.974909140585727D0/, A(191)/0.008683945269260D0/
+      DATA X(192)/0.965485089043799D0/, A(192)/0.010161766041103D0/
+      DATA X(193)/0.954590766343634D0/, A(193)/0.011624114120797D0/
+      DATA X(194)/0.942242761309872D0/, A(194)/0.013068761592401D0/
+      DATA X(195)/0.928459877172445D0/, A(195)/0.014493508040509D0/
+      DATA X(196)/0.913263102571757D0/, A(196)/0.015896183583725D0/
+      DATA X(197)/0.896675579438770D0/, A(197)/0.017274652056269D0/
+      DATA X(198)/0.878722567678213D0/, A(198)/0.018626814208299D0/
+      DATA X(199)/0.859431406663111D0/, A(199)/0.019950610878141D0/
+      DATA X(200)/0.838831473580255D0/, A(200)/0.021244026115782D0/
+      DATA X(201)/0.816954138681463D0/, A(201)/0.022505090246332D0/
+      DATA X(202)/0.793832717504605D0/, A(202)/0.023731882865930D0/
+      DATA X(203)/0.769502420135041D0/, A(203)/0.024922535764115D0/
+      DATA X(204)/0.744000297583597D0/, A(204)/0.026075235767565D0/
+      DATA X(205)/0.717365185362099D0/, A(205)/0.027188227500486D0/
+      DATA X(206)/0.689637644342027D0/, A(206)/0.028259816057276D0/
+      DATA X(207)/0.660859898986119D0/, A(207)/0.029288369583267D0/
+      DATA X(208)/0.631075773046871D0/, A(208)/0.030272321759557D0/
+      DATA X(209)/0.600330622829751D0/, A(209)/0.031210174188114D0/
+      DATA X(210)/0.568671268122709D0/, A(210)/0.032100498673487D0/
+      DATA X(211)/0.536145920897131D0/, A(211)/0.032941939397645D0/
+      DATA X(212)/0.502804111888784D0/, A(212)/0.033733214984611D0/
+      DATA X(213)/0.468696615170544D0/, A(213)/0.034473120451753D0/
+      DATA X(214)/0.433875370831756D0/, A(214)/0.035160529044747D0/
+      DATA X(215)/0.398393405881969D0/, A(215)/0.035794393953416D0/
+      DATA X(216)/0.362304753499487D0/, A(216)/0.036373749905835D0/
+      DATA X(217)/0.325664370747701D0/, A(217)/0.036897714638276D0/
+      DATA X(218)/0.288528054884511D0/, A(218)/0.037365490238730D0/
+      DATA X(219)/0.250952358392272D0/, A(219)/0.037776364362001D0/
+      DATA X(220)/0.212994502857666D0/, A(220)/0.038129711314477D0/
+      DATA X(221)/0.174712291832646D0/, A(221)/0.038424993006959D0/
+      DATA X(222)/0.136164022809143D0/, A(222)/0.038661759774076D0/
+      DATA X(223)/0.097408398441584D0/, A(223)/0.038839651059051D0/
+      DATA X(224)/0.058504437152420D0/, A(224)/0.038958395962769D0/
+      DATA X(225)/0.019511383256793D0/, A(225)/0.039017813656306D0/
+C-----N=96
+      DATA X(226)/0.999689503883230D0/, A(226)/0.000796792065552D0/
+      DATA X(227)/0.998364375863181D0/, A(227)/0.001853960788946D0/
+      DATA X(228)/0.995981842987209D0/, A(228)/0.002910731817934D0/
+      DATA X(229)/0.992543900323762D0/, A(229)/0.003964554338444D0/
+      DATA X(230)/0.988054126329623D0/, A(230)/0.005014202742927D0/
+      DATA X(231)/0.982517263563014D0/, A(231)/0.006058545504235D0/
+      DATA X(232)/0.975939174585136D0/, A(232)/0.007096470791153D0/
+      DATA X(233)/0.968326828463264D0/, A(233)/0.008126876925698D0/
+      DATA X(234)/0.959688291448742D0/, A(234)/0.009148671230783D0/
+      DATA X(235)/0.950032717784437D0/, A(235)/0.010160770535008D0/
+      DATA X(236)/0.939370339752755D0/, A(236)/0.011162102099838D0/
+      DATA X(237)/0.927712456722308D0/, A(237)/0.012151604671088D0/
+      DATA X(238)/0.915071423120898D0/, A(238)/0.013128229566961D0/
+      DATA X(239)/0.901460635315852D0/, A(239)/0.014090941772314D0/
+      DATA X(240)/0.886894517402420D0/, A(240)/0.015038721026994D0/
+      DATA X(241)/0.871388505909296D0/, A(241)/0.015970562902562D0/
+      DATA X(242)/0.854959033434601D0/, A(242)/0.016885479864245D0/
+      DATA X(243)/0.837623511228187D0/, A(243)/0.017782502316045D0/
+      DATA X(244)/0.819400310737931D0/, A(244)/0.018660679627411D0/
+      DATA X(245)/0.800308744139140D0/, A(245)/0.019519081140145D0/
+      DATA X(246)/0.780369043867433D0/, A(246)/0.020356797154333D0/
+      DATA X(247)/0.759602341176647D0/, A(247)/0.021172939892191D0/
+      DATA X(248)/0.738030643744400D0/, A(248)/0.021966644438744D0/
+      DATA X(249)/0.715676812348967D0/, A(249)/0.022737069658329D0/
+      DATA X(250)/0.692564536642171D0/, A(250)/0.023483399085926D0/
+      DATA X(251)/0.668718310043916D0/, A(251)/0.024204841792364D0/
+      DATA X(252)/0.644163403784967D0/, A(252)/0.024900633222483D0/
+      DATA X(253)/0.618925840125468D0/, A(253)/0.025570036005349D0/
+      DATA X(254)/0.593032364777572D0/, A(254)/0.026212340735672D0/
+      DATA X(255)/0.566510418561397D0/, A(255)/0.026826866725591D0/
+      DATA X(256)/0.539388108324357D0/, A(256)/0.027412962726029D0/
+      DATA X(257)/0.511694177154667D0/, A(257)/0.027970007616848D0/
+      DATA X(258)/0.483457973920596D0/, A(258)/0.028497411065085D0/
+      DATA X(259)/0.454709422167743D0/, A(259)/0.028994614150555D0/
+      DATA X(260)/0.425478988407300D0/, A(260)/0.029461089958167D0/
+      DATA X(261)/0.395797649828908D0/, A(261)/0.029896344136328D0/
+      DATA X(262)/0.365696861472313D0/, A(262)/0.030299915420827D0/
+      DATA X(263)/0.335208522892625D0/, A(263)/0.030671376123669D0/
+      DATA X(264)/0.304364944354496D0/, A(264)/0.031010332586313D0/
+      DATA X(265)/0.273198812591049D0/, A(265)/0.031316425596861D0/
+      DATA X(266)/0.241743156163840D0/, A(266)/0.031589330770727D0/
+      DATA X(267)/0.210031310460567D0/, A(267)/0.031828758894411D0/
+      DATA X(268)/0.178096882367618D0/, A(268)/0.032034456231992D0/
+      DATA X(269)/0.145973714654896D0/, A(269)/0.032206204794030D0/
+      DATA X(270)/0.113695850110665D0/, A(270)/0.032343822568575D0/
+      DATA X(271)/0.081297495464425D0/, A(271)/0.032447163714064D0/
+      DATA X(272)/0.048812985136049D0/, A(272)/0.032516118713868D0/
+      DATA X(273)/0.016276744849602D0/, A(273)/0.032550614492363D0/
+      DATA IBD/0/
+
+      IF(IBD.NE.0) RETURN
+      IBD=1
+      DO 10 I=1,273
+        B(I) = A(I)
+10      Y(I) = X(I)
+      DO 20 I=1,96
+20      LTAB(I) = KTAB(I)
+      RETURN
+      END
+C=======================================================================
+
+      SUBROUTINE SIB_ALTRA(GA,BGX,BGY,BGZ,PCX,PCY,PCZ,EC,P,PX,PY,PZ,E)
+
+C-----------------------------------------------------------------------
+C
+C    arbitrary Lorentz transformation
+C
+C     Input: GA : gamma factor
+C            BG? : components of gamma * beta
+C            PC?,EC : components of initial 4 vector
+C
+C     Output: P?,E : components of 4vector in final frame
+C             P : 3-norm in final frame, a.k.a momentum
+C
+C     PHO_ALTRA taken from PHOJET /FR'14
+C*********************************************************************
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      DOUBLE PRECISION P,E
+      SAVE
+
+c     consistency check: (gamma*beta)**2 = gamma**2 - 1
+      BETGAM2 = BGX**2+BGY**2+BGZ**2
+      xtst = 1.D0-BETGAM2/GA**2 - 1.D0/GA**2
+      IF(abs(xtst).gt.1.D-5) THEN
+         WRITE(LUN,*) ' SIB_ALTRA: transf. inconsistent!'
+         WRITE(LUN,*) ' SIB_ALTRA: input (GA,GABE):',GA,BGX,BGY,BGZ
+      ENDIF
+      IF(GA.LT.1.D0) THEN
+         WRITE(LUN,*) ' SIB_ALTRA: you are joking right? GAMMA=',GA
+         CALL SIB_REJECT('SIB_ALTRA       ')
+      ENDIF
+      EP=PCX*BGX+PCY*BGY+PCZ*BGZ
+      PE=EP/(GA+1.D0)+EC
+      PX=PCX+BGX*PE
+      PY=PCY+BGY*PE
+      PZ=PCZ+BGZ*PE
+      P=DSQRT(PX*PX+PY*PY+PZ*PZ)
+      E=GA*EC+EP
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIB_TRANS(XO,YO,ZO,CDE,SDE,CFE,SFE,X,Y,Z)
+
+C-----------------------------------------------------------------------
+C
+C  rotation of coordinate frame (1) de rotation around y axis
+C                               (2) fe rotation around z axis
+C  (inverse rotation to SIB_TRANI)
+C
+C     Input: ?0 : vector components in initial frame
+C            C? : cosine of rotation angle
+C            S? : sine of rotation angle
+C            DE : angle of rotation around y axis 
+C                 (polar angle in spherical coord.)
+C            FE : angle of rotation around z axis 
+C                 (azimuthal angle in spherical coord.)
+C
+C     Output: X,Y,Z: components of vector in rotated frame
+C
+C     PHO_TRANS taken from PHOJET \FR'14
+C**********************************************************************
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+ 
+      X= CDE*CFE*XO-SFE*YO+SDE*CFE*ZO
+      Y= CDE*SFE*XO+CFE*YO+SDE*SFE*ZO
+      Z=-SDE    *XO       +CDE    *ZO
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIB_TRANI(XO,YO,ZO,CDE,SDE,CFE,SFE,X,Y,Z)
+
+C-----------------------------------------------------------------------
+C
+C  rotation of coordinate frame (1) -fe rotation around z axis
+C                               (2) -de rotation around y axis
+C  (inverse rotation to SIB_TRANS)
+C
+C     Input: ?0 : vector components in initial frame
+C            C? : cosine of rotation angle
+C            S? : sine of rotation angle
+C            DE : angle of rotation around y axis 
+C                 (polar angle in spherical coord.)
+C            FE : angle of rotation around z axis 
+C                 (azimuthal angle in spherical coord.)
+C
+C     Output: X,Y,Z: components of vector in rotated frame
+C
+C     PHO_TRANS taken from PHOJET \FR'14
+C**********************************************************************
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+      X= CDE*CFE*XO+CDE*SFE*YO-SDE*ZO
+      Y=-SFE    *XO+CFE*    YO
+      Z= SDE*CFE*XO+SDE*SFE*YO+CDE*ZO
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIROBO( NBEG, NEND, THE, PHI, DBEX, DBEY, DBEZ)
+
+C-----------------------------------------------------------------------
+C   THIS IS A SLIGHTLY ALTERED VERSION OF "LUROBO" [JETSET63.PYTHIA]   *
+C SET TO WORK IN THE SIBYL ENVIROMENT. THE TRANSFORMATION IS PERFORMED *
+C ON PARTICLES NUMBER FROM NBEG TO NEND. COMMON BLOCKS CHANGED.        *
+C                                      TSS,   Oct '87                  *
+C  modification  use directly BETA in double precision in input (PL)   *
+C **********************************************************************
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      COMMON /S_PLIST/ P(8000,5), LLIST(8000), NP
+      DIMENSION ROT(3,3),PV(3),DP(4)
+      SAVE
+
+      IF(THE**2+PHI**2 .LE. 1.D-20) GO TO 131
+C...ROTATE (TYPICALLY FROM Z AXIS TO DIRECTION THETA,PHI)
+       ROT(1,1)=dCOS(THE)*dCOS(PHI)
+       ROT(1,2)=-dSIN(PHI)
+       ROT(1,3)=dSIN(THE)*dCOS(PHI)
+       ROT(2,1)=dCOS(THE)*dSIN(PHI)
+       ROT(2,2)=dCOS(PHI)
+       ROT(2,3)=dSIN(THE)*dSIN(PHI)
+       ROT(3,1)=-dSIN(THE)
+       ROT(3,2)=0.D0
+       ROT(3,3)=dCOS(THE)
+       DO 120 I=NBEG,NEND
+       DO 100 J=1,3
+ 100   PV(J)=P(I,J)
+       DO 110 J=1,3
+ 110   P(I,J)=ROT(J,1)*PV(1)+ROT(J,2)*PV(2)+ROT(J,3)*PV(3)
+ 120   CONTINUE
+ 131    IF(DBEX**2+DBEY**2+DBEZ**2 .LE. 1.D-20) GO TO 151
+C...LORENTZ BOOST (TYPICALLY FROM REST TO MOMENTUM/ENERGY=BETA)
+       DGA=1.D0/DSQRT(1D0-DBEX**2-DBEY**2-DBEZ**2)
+       DO 140 I=NBEG, NEND
+       DO 130 J=1,4
+ 130   DP(J)=P(I,J)
+       DBEP=DBEX*DP(1)+DBEY*DP(2)+DBEZ*DP(3)
+       DGABEP=DGA*(DGA*DBEP/(1.D0+DGA)+DP(4))
+       P(I,1)=DP(1)+DGABEP*DBEX
+       P(I,2)=DP(2)+DGABEP*DBEY
+       P(I,3)=DP(3)+DGABEP*DBEZ
+       P(I,4)=DGA*(DP(4)+DBEP)
+ 140   CONTINUE
+ 151   RETURN
+      END
+
+
+C=======================================================================
+
+      SUBROUTINE ISWTCH_LMNTS(ia,ib)
+
+C-----------------------------------------------------------------------
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+      itmp = ia
+      ia = ib
+      ib = itmp
+      end
+C=======================================================================
+
+      SUBROUTINE SWTCH_LMNTS(a,b)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      SAVE
+
+      tmp = a
+      a = b
+      b = tmp
+      end
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION PAWT(A,B,C)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+      DOUBLE PRECISION EPS3,EPS5,EPS8,EPS10
+      COMMON /SIB_EPS/ EPS3,EPS5,EPS8,EPS10
+      SAVE
+
+C...  c.m.s. Momentum in two particle decays
+      PAWT = SQRT((A**2-(B+C)**2+EPS10)*(A**2-(B-C)**2))/(2.D0*A)
+      END
+
+C=======================================================================
+
+      SUBROUTINE HSPLI (KF,KP1,KP2)
+
+C-----------------------------------------------------------------------
+C...This subroutine splits one hadron of code KF
+C.  into 2 partons of code KP1 and KP2
+C.  KP1 refers to a color triplet [q or (qq)bar]         
+C.  KP2 to a a color anti-triplet [qbar or (qq)]         
+C.  allowed inputs:
+C.  KF = 6:14 pi0,pi+-,k+-,k0L,k0s, p,n
+C.     = -13,-14  pbar,nbar
+C.     = 34:39 Sig+, Sig0, Sig-, Xi0, Xi-, Lam0 
+C.     = 49: Omega-
+C.   \FR'16
+C------------------------------------------------
+      IMPLICIT NONE
+
+c     external types
+      INTEGER KF,KP1,KP2
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+
+c     internal types
+      INTEGER KPP
+      DOUBLE PRECISION R,XBUG,S_RNDM
+      SAVE
+
+      IF(IABS(KF).eq.6.or.IABS(KF).eq.27)THEN     ! pi0, rho0
+         R = S_RNDM(0)              
+         XBUG = 0.D0
+         IF(IPAR(19).eq.1) XBUG = 0.5D0
+         IF (R.LE.XBUG)  THEN
+            KP1 = 1                  
+            KP2 = -1
+         ELSE
+            KP1 = 2
+            KP2 = -2
+         ENDIF
+
+      ELSEIF(IABS(KF).eq.7)THEN ! pi+
+         KP1 = 1                  
+         KP2 = -2
+
+      ELSEIF(IABS(KF).eq.8)THEN ! pi-
+         KP1 = 2                  
+         KP2 = -1
+
+      ELSEIF(IABS(KF).eq.9)THEN                 ! K+
+         KP1 = 1                  
+         KP2 = -3
+      ELSEIF(IABS(KF).eq.10)THEN                ! K-
+         KP1 = 3                  
+         KP2 = -1
+      ELSEIF(IABS(KF).eq.11.or.IABS(KF).eq.12)THEN             ! K0S/K0L
+         KP1 = 2
+         KP2 = -3
+         IF (S_RNDM(1).GT. 0.5D0)  THEN
+            KP1 = 3
+            KP2 = -2
+         ENDIF
+      ELSEIF(IABS(KF).eq.21)THEN                ! K0
+         KP1 = 2
+         KP2 = -3
+      ELSEIF(IABS(KF).eq.22)THEN                ! K0bar
+         KP1 = 3
+         KP2 = -2
+      ELSEIF(IABS(KF).eq.33)THEN                 ! phi
+         KP1 = 3
+         KP2 = -3
+      ELSEIF(IABS(KF).eq.13.or.IABS(KF).eq.41)THEN             ! p/pbar,delta+
+         R = PAR(53)*S_RNDM(KF)
+         IF (R .LT.3.D0)       THEN
+            KP1 = 1
+            KP2 = 12
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 1
+            KP2 = 21
+         ELSE
+            KP1 = 2
+            KP2 = 11
+         ENDIF
+      ELSEIF(IABS(KF).eq.14.or.IABS(KF).eq.42)THEN             ! n/nbar,delta0
+         R = 6.D0*S_RNDM(0)                  
+         IF (R .LT.3.D0)       THEN
+            KP1 = 2
+            KP2 = 12
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 2
+            KP2 = 21
+         ELSE
+            KP1 = 1
+            KP2 = 22
+         ENDIF
+      ELSEIF(IABS(KF).eq.40)THEN                ! delta++
+         KP1 = 1
+         KP2 = 11
+      ELSEIF(IABS(KF).eq.43)THEN                ! delta-
+         KP1 = 2
+         KP2 = 22
+      ELSEIF(IABS(KF).eq.34)THEN                !Sigma+
+         R = 6.D0*S_RNDM(0)                  
+         IF (R .LT.3.D0)       THEN
+            KP1 = 3
+            KP2 = 11
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 1
+            KP2 = 31
+         ELSE
+            KP1 = 1
+            KP2 = 13
+         ENDIF
+      ELSEIF(IABS(KF).eq.35.or.IABS(KF).eq.39)THEN             !Sigma0/Lambda0     
+c     all configurations equally likely --> Knuth shuffle
+c     setup quarks: u,d,s
+         CALL SHFFL_QRKS(1,2,3,KP1,KP2)
+         
+      ELSEIF(IABS(KF).eq.36)THEN                !Sigma-
+         R = 6.D0*S_RNDM(0)                  
+         IF (R .LT.3.D0)       THEN
+            KP1 = 3
+            KP2 = 22
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 2
+            KP2 = 32
+         ELSE
+            KP1 = 2
+            KP2 = 23
+         ENDIF
+      ELSEIF(IABS(KF).eq.37)THEN                !Xi0
+         R = 6.D0*S_RNDM(0)                  
+         IF (R .LT.3.D0)       THEN
+            KP1 = 1
+            KP2 = 33
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 3
+            KP2 = 13
+         ELSE
+            KP1 = 1
+            KP2 = 33
+         ENDIF
+      ELSEIF(IABS(KF).eq.38)THEN                !Xi-
+         R = 6.D0*S_RNDM(0)                  
+         IF (R .LT.3.D0)       THEN
+            KP1 = 2
+            KP2 = 33
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 3
+            KP2 = 23
+         ELSE
+            KP1 = 2
+            KP2 = 33
+         ENDIF
+      ELSEIF(IABS(KF).eq.49)THEN                 ! Omega-
+         KP1 = 3
+         KP2 = 33
+
+      ELSEIF(IABS(KF).eq.59)THEN                 ! D+
+         KP1 = 4
+         KP2 = -2
+
+      ELSEIF(IABS(KF).eq.60)THEN                 ! D-
+         KP1 = 2
+         KP2 = -4
+
+      ELSEIF(IABS(KF).eq.71)THEN                 ! D0
+         KP1 = 4
+         KP2 = -1
+
+      ELSEIF(IABS(KF).eq.72)THEN                 ! D0bar
+         KP1 = 1
+         KP2 = -4
+
+      ELSEIF(IABS(KF).eq.73)THEN                 ! eta_c
+         KP1 = 4
+         KP2 = -4
+
+      ELSEIF(IABS(KF).eq.74)THEN                 ! Ds+
+         KP1 = 4
+         KP2 = -3
+
+      ELSEIF(IABS(KF).eq.75)THEN                 ! Ds-
+         KP1 = 3
+         KP2 = -4
+
+      ELSEIF(IABS(KF).eq.76)THEN                 ! Ds*+
+         KP1 = 4
+         KP2 = -3
+
+      ELSEIF(IABS(KF).eq.77)THEN                 ! Ds*-
+         KP1 = 3
+         KP2 = -4
+
+      ELSEIF(IABS(KF).eq.78)THEN                 ! D*+
+         KP1 = 4
+         KP2 = -2
+
+      ELSEIF(IABS(KF).eq.79)THEN                 ! D*-
+         KP1 = 2
+         KP2 = -4
+
+      ELSEIF(IABS(KF).eq.80)THEN                 ! D*0
+         KP1 = 4
+         KP2 = -1
+
+      ELSEIF(IABS(KF).eq.81)THEN                 ! D*0bar
+         KP1 = 1
+         KP2 = -4
+
+      ELSEIF(IABS(KF).eq.83)THEN                 ! J/psi
+         KP1 = 4
+         KP2 = -4
+         
+      ELSEIF(IABS(KF).eq.84)THEN                  ! Sigma_c++
+         R = 6.D0*S_RNDM(0)                  
+         IF (R .LT.3.D0)       THEN
+            KP1 = 4
+            KP2 = 11
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 1
+            KP2 = 41
+         ELSE
+            KP1 = 1
+            KP2 = 14
+         ENDIF
+
+      ELSEIF(IABS(KF).eq.85.or.IABS(KF).eq.89)THEN               ! Sigma_c+ / Lambda_c+
+c     setup quarks: u,d,c
+         CALL SHFFL_QRKS(1,2,4,KP1,KP2)
+
+      ELSEIF(IABS(KF).eq.86)THEN                  ! Sigma_c0
+         R = 6.D0*S_RNDM(0)                  
+         IF (R .LT.3.D0)       THEN
+            KP1 = 4
+            KP2 = 22
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 2
+            KP2 = 42
+         ELSE
+            KP1 = 2
+            KP2 = 24
+         ENDIF
+
+      ELSEIF(IABS(KF).eq.87)THEN               ! Xi_c+
+c     setup quarks: u,s,c
+         CALL SHFFL_QRKS(1,3,4,KP1,KP2)
+
+      ELSEIF(IABS(KF).eq.88)THEN                  ! Xi_c0
+         CALL SHFFL_QRKS(2,3,4,KP1,KP2)
+
+      ELSEIF(IABS(KF).eq.99)THEN                  ! Omega_c0
+         R = 6.D0*S_RNDM(0)                  
+         IF (R .LT.3.D0)       THEN
+            KP1 = 4
+            KP2 = 33
+         ELSEIF (R .LT. 4.D0)  THEN
+            KP1 = 3
+            KP2 = 43
+         ELSE
+            KP1 = 3
+            KP2 = 34
+         ENDIF         
+
+      ELSE
+C...  Test for good input
+         WRITE(LUN,*)
+     &        ' HSPLI : Routine entered with illegal particle code ',KF
+         CALL SIB_REJECT('HSPLI           ')
+      ENDIF
+
+C     if anti-baryon, invert valences
+      IF (KF .LT. 0) THEN
+         KPP = KP1
+         KP1 = -KP2
+         KP2 = -KPP
+      ENDIF
+      RETURN
+      END
+
+C=======================================================================      
+
+      SUBROUTINE SHFFL_QRKS(IQF1,IQF2,IQF3,KF1,KF2)
+
+C-----------------------------------------------------------------------
+c     routine to shuffle 3 quark flavors
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+      INTEGER IQF1,IQF2,IQF3,KF1,KF2
+      INTEGER KPL,JJ,II,IFL
+      DOUBLE PRECISION S_RNDM
+      DIMENSION KPL(3)
+c     quark flavors to shuffle
+      KPL(1) = IQF1
+      KPL(2) = IQF2
+      KPL(3) = IQF3
+c     Knuth shuffle..
+      DO II=3,2,-1
+         JJ=1+INT(II*S_RNDM(II))
+         IFL=KPL(jj)
+         KPL(jj)=KPL(ii)
+         KPL(ii)=IFL
+      ENDDO
+      KF1=KPL(1)
+      KF2=KPL(2)*10+KPL(3)     
+      END
+            
+
+      SUBROUTINE TRANSFONSHELL(ECM,XM1in,XM2in,XMAX,IMOD,P1,P2,LBAD)
+
+C-----------------------------------------------------------------------
+C     samples 2 --> 2 scattering that puts a particle on its mass shell
+C
+C     particle1 is along +z, always receives mass
+C     particle2 is along -z, mass only sampled if both aquire mass
+C
+C     DEPENDS: slope-parameter in s_difmass
+C
+C     INPUT: ECM : center-of-mass energy of scattering particles
+C            M1in  : mass of first particle
+C            M2in  : mass of second particle
+C            XMAX  : maximal mass that can be obtained
+C            IMOD  : remnant or diffraction mode
+C     
+C     OUTPUT: P1,P2 : final state 4vectors in two-particle c.m.   \FR'14
+C-----------------------------------------------------------------------
+      IMPLICIT NONE
+      
+c     external types
+      DOUBLE PRECISION ECM,XM1in,XM2in,XMAX,P1,P2
+      DIMENSION P1(5),P2(5)
+      INTEGER IMOD,LBAD
+
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NIPAR_max,NPAR_max
+      PARAMETER (NPAR_max=200,NIPAR_max=100)
+      DOUBLE PRECISION PAR
+      INTEGER IPAR
+      COMMON /S_CFLAFR/ PAR(NPAR_max), IPAR(NIPAR_max)
+      INTEGER ITRY, NREJ
+      COMMON /S_CNT/ ITRY(20), NREJ(20)
+      DOUBLE PRECISION AM,AM2
+      COMMON /S_MASS1/ AM(99), AM2(99)
+
+c     internal types
+      DOUBLE PRECISION XMB2,XMT2,AXMX,S,X1,X2,ALX,SLOP0,SLOPE,DB,
+     &     T,PTS,PZB2,PZT2,PT,PHI,XMB,XMT,S_RNDM,PTSWTCH
+
+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
+      DOUBLE PRECISION SLOP0_0,ASLOP,BSLOP
+      INTEGER II
+      SAVE
+      DATA SLOP0_0 /6.5D0/        ! b (slope_ for Mx**2 > 5 GeV**2
+      DATA ASLOP /31.10362D0/     ! fit to the slope parameter.
+      DATA BSLOP /-15.29012D0/
+
+      IF(NDEBUG.gt.3)
+     &     WRITE(LUN,*) ' TRANSFONSHELL: called with (Ecm,M1,M2,XMAX):',
+     &     ECM,XM1in,XM2in,XMAX
+      
+      XMB2 = XM1in**2
+      XMT2 = XM2in**2     
+
+      AXMX = LOG(XMAX)
+      
+      ITRY(6) = 0
+      LBAD = 1
+
+C     remnant pt parameters
+c     distribution is: exp(-slope*t)
+c     slope = aslop + bslop * log(Mx**2)
+c     (by default same as in diff.
+c      scale with paramterers 90 and 91)
+
+c     diff. pt paramters
+      ASLOP = PAR(133)
+      BSLOP = PAR(134)
+      SLOP0_0 = PAR(135)
+      
+      S = ECM*ECM
+      X1 = 1.D0-(XMT2-XMB2)/S
+      X2 = 2.D0-X1
+      IF(X2.LT.EPS5) RETURN
+
+ 60   ITRY(6) = ITRY(6) + 1
+      IF(ITRY(6).GT.NREJ(6)) RETURN
+c     sample transverse momentum
+      ALX = LOG(MAX(XMT2,XMB2))
+c     set slope of pt distribution
+      IF(IMOD.eq.0)THEN
+c     diffraction dissociation
+         SLOP0 = SLOP0_0*PAR(93)
+         SLOPE = MAX(SLOP0,ASLOP+BSLOP*ALX)
+         PTSWTCH = 1.D0
+
+      ELSEIF(IMOD.eq.1)THEN
+c     remnant excitation
+         IF(IPAR(57).eq.0)THEN
+            ALX = ALX-LOG(AM2(13))
+            SLOP0 = PAR(92)
+            DB = (SLOP0-PAR(90))/AXMX
+            SLOPE = MAX(SLOP0,PAR(90)+DB*PAR(91)*ALX)
+         ELSE
+            ALX = ALX-LOG(AM2(13))
+            SLOP0 = PAR(92)
+            SLOPE = MAX(SLOP0,PAR(90)+PAR(91)*ALX)
+         ENDIF
+         PTSWTCH = 1.D0
+
+      ELSEIF(IMOD.eq.3)THEN
+c     no pt
+         PTSWTCH = 0.D0
+         SLOPE = 1.D0
+      ENDIF
+      IF(ndebug.gt.3)
+     &     WRITE(LUN,*) ' TRANSFONSHELL: (SLOP0,SLOPE,log(M**2)):',
+     &     SLOP0,SLOPE,ALX
+      T = -DLOG(MAX(EPS10,S_RNDM(0)))/SLOPE
+      PTS = T*X1*PTSWTCH
+      PZB2 = S*0.5D0*0.5D0*X1*X1-XMB2-PTS
+      PZT2 = S*0.5D0*0.5D0*X2*X2-XMT2-PTS
+      IF(NDEBUG.gt.3) 
+     &     WRITE(LUN,*) ' TRANSFONSHELL: (PTS,PZB2,PZT2):',PTS,PZB2,PZT2
+c      IF (ABS(PZB2)-PZT2.GT.EPS10) GOTO 60
+      IF (PZB2.lt.0.D0.or.PZT2.LT.0.D0) GOTO 60
+      PT = DSQRT(PTS)
+      PHI = TWOPI*S_RNDM(1)
+      XMB = sqrt(XMB2)
+      XMT = sqrt(XMT2)
+      P2(4) = 0.5D0*ECM*X2
+      P2(3) = -DSQRT(PZT2)
+      P2(1) = PT*dCOS(PHI)
+      P2(2) = PT*dSIN(PHI)
+      P2(5) = XMT
+
+      P1(4) = 0.5D0*ECM*X1
+      P1(3) = DSQRT(PZB2)
+      do ii = 1,2
+         P1(ii) = -P2(ii)
+      enddo
+      P1(5) = XMB
+      IF(NDEBUG.gt.3) THEN
+          WRITE(LUN,*) ' TRANSFONSHELL: (P1):',(p1(ii),ii=1,5)
+          WRITE(LUN,*) ' TRANSFONSHELL: (P2):',(p2(ii),ii=1,5)
+       ENDIF
+      LBAD = 0
+      END
+C=======================================================================
+
+      SUBROUTINE SAMPLE_SEA (ALPHA,ASUP,XMASS,XMAX,X1,X2,PT)
+
+C-----------------------------------------------------------------------
+C.    Routine that samples the kinematical variables of a sea quark pair.
+C.  INPUT:  STR_mass_min : minimal string mass ** 2 = x1 * x2 * s
+C.          ASUP : large x suppression exponent
+C.  OUTPUT:  X1, X2, PT (GeV)                                   /FR'14
+C-----------------------------------------------------------------------
+Cf2py double precision, intent(in) :: ALPHA,ASUP,XMASS,XMAX
+Cf2py double precision, intent(out) :: X1,X2,PT
+      IMPLICIT NONE
+
+c     include COMMONs
+      INTEGER NCALL, NDEBUG, LUN
+      COMMON /S_DEBUG/ NCALL, NDEBUG, LUN
+      INTEGER NW_max
+      PARAMETER (NW_max = 20)
+C--------------------------------------------------------------------
+C     SIBYLL common blocks containing event information       \FR'14
+C--------------------------------------------------------------------
+
+C     EVENT INFO COMMON
+C     contains overall interaction properties, like
+C     SQS : center-of-mass energy
+C     S   :         "       "     squared
+C     PTmin : low pt cut of QCD cross section, 
+C             i.e. minimal pt of hard minijets
+C     Xmin : low-x bound for PDFs, 
+C            i.e. minimal momentum fraction of hard partons
+C     Zmin : logarithm of that
+C     KB : PID of beam hadron
+C     KT() : PID of target
+C     IAT : mass number of target
+      DOUBLE PRECISION SQS,S,PTmin,XMIN,ZMIN
+      INTEGER KB,IAT,KT
+      COMMON /S_RUN/ SQS, S, PTmin, XMIN, ZMIN, KB, KT(NW_max), IAT
+
+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
+
+c     external type declarations
+      DOUBLE PRECISION ALPHA,ASUP,XMASS,XMAX,X1,X2,PT
+
+c     internal types
+      DOUBLE PRECISION XMINA,XM2DIS,XR,SLOPE,S_RNDM,XRNDM
+      SAVE
+      
+      IF(ndebug.gt.3)
+     &    write(lun,*) ' SAMPLE_SEA: alpha,asup,qmass,xmax',
+     &    ALPHA,ASUP,XMASS,XMAX
+
+c     min. momentum fraction for massive quarks
+c     i.e. sample from 1/(x+x_min)
+      XMINA = 2.D0*XMASS/SQS
+      IF(ndebug.gt.3)
+     &     write(lun,*) ' SAMPLE_SEA: xmina:',XMINA
+c     exponent of large x suppression: (1-x)**b, b=0 or b>1
+      IF(ABS(ASUP).lt.EPS3)THEN
+c     b = 0 , no suppression, sample bare 1/(x+xmin)       
+         X1 = XM2DIS(XMINA,XMAX,ALPHA) ! ~(1/x)**alpha
+         X2 = XM2DIS(XMINA,XMAX,ALPHA) ! ~(1/x)**alpha
+         
+      ELSEIF(ASUP.ge.EPS3)THEN
+c     b >= 1 , sample bare (1-x)**b/(x+xmin)
+         SLOPE = MAX(ASUP,EPS3)
+c     quark
+ 100     X1 = XM2DIS(XMINA,XMAX,ALPHA) ! ~(1/x)**alpha
+         XR = LOG(1.D0-X1)-LOG(1.D0-XMINA)
+         XRNDM = S_RNDM(1)
+         IF(ndebug.gt.4)
+     &        write(lun,*) '  X1,XR,SLOPE*XR:',X1,XR,SLOPE*XR
+         if(SLOPE*XR.le.LOG(max(XRNDM,eps10))) goto 100
+
+c     anti-quark
+ 200     X2 = XM2DIS(XMINA,XMAX,ALPHA) ! ~(1/x)**alpha
+         XR = log(1.D0-X2)-log(1.D0-XMINA)
+         XRNDM = S_RNDM(2)
+         IF(ndebug.gt.4)
+     &        write(lun,*) '  X2,XR,SLOPE*XR,XRNDM:',
+     &    X2,XR,SLOPE*XR,XRNDM
+         if(SLOPE*XR.le.log(max(XRNDM,eps10))) goto 200     
+      ELSE
+         WRITE(LUN,*) ' SAMPLE_SEA: suppression exponent out of range.'
+         WRITE(LUN,*) ' SAMPLE_SEA: ASUP:',ASUP
+         STOP
+      ENDIF
+
+c     sample pt
+c     not yet implemented... to avoid problem with virtual partons
+      pt = 0.D0
+      IF(ndebug.gt.3)
+     &     write(lun,*) ' SAMPLE_SEA: X1,X2,PT:',X1,X2,PT
+
+      END
+C**********************************************
+C
+C     contains the src for pion and proton pdf
+C     parametrizations according to GRV
+C     ( see function head for refs. )
+C
+C     1 pion pdf
+C     2 proton pdf GRV98LO
+C
+C**********************************************
+
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+*                                                                 *
+*         G R V - P I O N - P A R A M E T R I Z A T I O N S       *
+*                                                                 *
+*                 FOR A DETAILED EXPLANATION SEE :                *
+*              M. GLUECK, E.REYA, A.VOGT: DO-TH 91/16             *
+*                                                                 *
+*   THE PARAMETRIZATIONS ARE FITTED TO THE PARTON DISTRIBUTIONS   *
+*   FOR Q ** 2 BETWEEN MU ** 2 (=  0.25 / 0.30  GEV ** 2  IN LO   *
+*   / HO) AND  1.E8 GEV ** 2  AND FOR X BETWEEN  1.E-5  AND  1.   *
+*   REGIONS, WHERE THE DISTRIBUTION UNDER CONSIDERATION IS NEG-   *
+*   LIGIBLE, I.E. BELOW ABOUT 1.E-4, WERE EXCLUDED FROM THE FIT.  *
+*                                                                 *
+*              HEAVY QUARK THRESHOLDS  Q(H) = M(H) :              *
+*         M(C)  =  1.5,  M(B)  =  4.5,  M(T)  =  100  GEV         *
+*                                                                 *
+*      CORRESPONDING LAMBDA(F) VALUES FOR F ACTIVE FLAVOURS :     *
+*      LO :   LAMBDA(3)  =  0.232,   LAMBDA(4)  =  0.200,         *
+*             LAMBDA(5)  =  0.153,   LAMBDA(6)  =  0.082  GEV     *
+*      HO :   LAMBDA(3)  =  0.248,   LAMBDA(4)  =  0.200,         *
+*             LAMBDA(5)  =  0.131,   LAMBDA(6)  =  0.053  GEV     *
+*                                                                 *
+*   HO DISTRIBUTION REFER TO THE MS-BAR SCHEME OF BARDEEN ET AL.  *
+*                                                                 *
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C=======================================================================
+
+       SUBROUTINE DORPLO (X, Q2, VAP, GLP, QBP, CBP, BBP)
+
+C-----------------------------------------------------------------------
+       IMPLICIT DOUBLE PRECISION (A - Z)
+       SAVE
+
+       MU2  = 0.25D0
+       LAM2 = 0.232D0 * 0.232D0
+       S  = LOG (LOG(Q2/LAM2) / LOG(MU2/LAM2))
+       DS = SQRT (S)
+       S2 = S * S
+C...X * VALENCE :
+       NV  =  0.519D0 + 0.180D0 * S - 0.011D0 * S2
+       AKV =  0.499D0 - 0.027D0 * S
+       AGV =  0.381D0 - 0.419D0 * S
+       DV  =  0.367D0 + 0.563D0 * S
+       VAP =  DORFVP (X, NV, AKV, AGV, DV)
+C...X * GLUON :
+       ALG =  0.599D0
+       BEG =  1.263D0
+       AKG =  0.482D0 + 0.341D0 * DS
+       BKG =   0.0D0
+       AGG =  0.678D0 + 0.877D0 * S  - 0.175D0 * S2
+       BGG =  0.338D0 - 1.597D0 * S
+       CG  =   0.0D0  - 0.233D0 * S  + 0.406D0 * S2
+       DG  =  0.390D0 + 1.053D0 * S
+       EG  =  0.618D0 + 2.070D0 * S
+       ESG =  3.676D0
+       GLP =DORFGP(X, S, ALG, BEG, AKG, BKG, AGG, BGG, CG, DG, EG, ESG)
+C...X * QBAR (SU(3)-SYMMETRIC SEA) :
+       SL  =   0.0D0
+       ALS =   0.55D0
+       BES =   0.56D0
+       AKS =  2.538D0 - 0.763D0 * S
+       AGS = -0.748D0
+       BS  =  0.313D0 + 0.935D0 * S
+       DS  =  3.359D0
+       EST =  4.433D0 + 1.301D0 * S
+       ESS =   9.30D0 - 0.887D0 * S
+       QBP =  DORFQP (X, S, SL, ALS, BES, AKS, AGS, BS, DS, EST, ESS)
+C...X * CBAR = X * C :
+       SC  =  0.888D0
+       ALC =   1.02D0
+       BEC =   0.39D0
+       AKC =   0.0D0
+       AGC =   0.0D0
+       BC  =  1.008D0
+       DC  =  1.208D0 + 0.771D0 * S
+       EC  =   4.40D0 + 1.493D0 * S
+       ESC =  2.032D0 + 1.901D0 * S
+       CBP =  DORFQP (X, S, SC, ALC, BEC, AKC, AGC, BC, DC, EC, ESC)
+C...X * BBAR = X * B :
+       SBO =  1.351D0
+       ALB =   1.03D0
+       BEB =   0.39D0
+       AKB =   0.0D0
+       AGB =   0.0D0
+       BBO =   0.0D0
+       DB  =  0.697D0 + 0.855D0 * S
+       EB  =   4.51D0 + 1.490D0 * S
+       ESB =  3.056D0 + 1.694D0 * S
+       BBP =  DORFQP (X, S, SBO, ALB, BEB, AKB, AGB, BBO, DB, EB, ESB)
+       RETURN
+       END
+C
+C=======================================================================
+
+       SUBROUTINE DORPHO (X, Q2, VAP, GLP, QBP, CBP, BBP)
+
+C-----------------------------------------------------------------------
+       IMPLICIT DOUBLE PRECISION (A - Z)
+       SAVE
+
+       MU2  = 0.3D0
+       LAM2 = 0.248D0 * 0.248D0
+       S  = LOG (LOG(Q2/LAM2) / LOG(MU2/LAM2))
+       DS = SQRT (S)
+       S2 = S * S
+C...X * VALENCE :
+       NV  =  0.456D0 + 0.150D0 * DS + 0.112D0 * S - 0.019D0 * S2
+       AKV =  0.505D0 - 0.033D0 * S
+       AGV =  0.748D0 - 0.669D0 * DS - 0.133D0 * S
+       DV  =  0.365D0 + 0.197D0 * DS + 0.394D0 * S
+       VAP =  DORFVP (X, NV, AKV, AGV, DV)
+C...X * GLUON :
+       ALG =  1.096D0
+       BEG =  1.371D0
+       AKG =  0.437D0 - 0.689D0 * DS
+       BKG = -0.631D0
+       AGG =  1.324D0 - 0.441D0 * DS - 0.130D0 * S
+       BGG = -0.955D0 + 0.259D0 * S
+       CG  =  1.075D0 - 0.302D0 * S
+       DG  =  1.158D0 + 1.229D0 * S
+       EG  =   0.0D0  + 2.510D0 * S
+       ESG =  2.604D0 + 0.165D0 * S
+       GLP =DORFGP(X, S, ALG, BEG, AKG, BKG, AGG, BGG, CG, DG, EG, ESG)
+C...X * QBAR (SU(3)-SYMMETRIC SEA) :
+       SL  =   0.0D0
+       ALS =   0.85D0
+       BES =   0.96D0
+       AKS = -0.350D0 + 0.806D0 * S
+       AGS = -1.663D0
+       BS  =  3.148D0
+       DS  =  2.273D0 + 1.438D0 * S
+       EST =  3.214D0 + 1.545D0 * S
+       ESS =  1.341D0 + 1.938D0 * S
+       QBP =  DORFQP (X, S, SL, ALS, BES, AKS, AGS, BS, DS, EST, ESS)
+C...X * CBAR = X * C :
+       SC  =  0.820D0
+       ALC =   0.98D0
+       BEC =   0.0D0
+       AKC =   0.0D0  - 0.457D0 * S
+       AGC =   0.0D0
+       BC  =  -1.00D0 +  1.40 D0* S
+       DC  =  1.318D0 + 0.584D0 * S
+       EC  =   4.45D0 + 1.235D0 * S
+       ESC =  1.496D0 + 1.010D0 * S
+       CBP =  DORFQP (X, S, SC, ALC, BEC, AKC, AGC, BC, DC, EC, ESC)
+C...X * BBAR = X * B :
+       SBO =  1.297D0
+       ALB =   0.99D0
+       BEB =   0.0D0
+       AKB =   0.0D0  - 0.172D0 * S
+       AGB =   0.0D0
+       BBO =   0.0D0
+       DB  =  1.447D0 + 0.485D0 * S
+       EB  =   4.79D0 + 1.164D0 * S
+       ESB =  1.724D0 + 2.121D0 * S
+       BBP =  DORFQP (X, S, SBO, ALB, BEB, AKB, AGB, BBO, DB, EB, ESB)
+       RETURN
+       END
+C
+C=======================================================================
+
+       FUNCTION DORFVP (X, N, AK, AG, D)
+
+C-----------------------------------------------------------------------
+       IMPLICIT DOUBLE PRECISION (A - Z)
+       SAVE
+
+       DX = SQRT (X)
+       DORFVP = N * X**AK * (1.D0+ AG*DX) * (1.D0- X)**D
+       RETURN
+       END
+C
+C=======================================================================
+
+       FUNCTION DORFGP (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
+
+C-----------------------------------------------------------------------
+       IMPLICIT DOUBLE PRECISION (A - Z)
+       SAVE
+
+       DX = SQRT (X)
+       LX = LOG (1.D0/X)
+       DORFGP = (X**AK * (AG + BG*DX + C*X) * LX**BK + S**AL
+     1       * EXP (-E + SQRT (ES * S**BE * LX))) * (1.D0- X)**D
+       RETURN
+       END
+C
+C=======================================================================
+
+       FUNCTION DORFQP (X, S, ST, AL, BE, AK, AG, B, D, E, ES)
+
+C-----------------------------------------------------------------------
+       IMPLICIT DOUBLE PRECISION (A - Z)
+       SAVE
+
+       DX = SQRT (X)
+       LX = LOG (1./X)
+       IF (S .LE. ST) THEN
+          DORFQP = 0.0D0
+       ELSE
+          DORFQP = (S-ST)**AL / LX**AK * (1.D0+AG*DX+B*X) * (1.D0- X)**D
+     1           * EXP(-E + SQRT(ES * S**BE * LX))
+       END IF
+       RETURN
+       END
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIB_DOR92FS(X,S,ST,AL,BE,AK,AG,B,D,E,ES)
+
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A - Z)
+      SAVE
+
+       DX = SQRT (X)
+       LX = LOG (1.D0/X)
+       IF (S .LE. ST) THEN
+         SIB_DOR92FS = 0.D0
+       ELSE
+         SIB_DOR92FS = (S-ST)**AL/LX**AK*(1.D0+AG*DX+B*X)*(1.D0-X)**D
+     1          * EXP (-E + SQRT (ES * S**BE * LX))
+       END IF
+
+      END
+
+C=======================================================================
+
+      DOUBLE PRECISION FUNCTION SIB_DBFINT(NARG,ARG,NA,ENT,TABLE)
+
+C-----------------------------------------------------------------------
+C
+C     routine based on CERN library E104
+C
+C     multi-dimensional interpolation routine, needed for PHOJET
+C     internal cross section tables and several PDF sets (GRV98 and AGL)
+C
+C     changed to avoid recursive function calls (R.Engel, 09/98)
+C
+C***********************************************************************
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      INTEGER NA(NARG), INDE(32)
+      DOUBLE PRECISION ARG(NARG),ENT(NARG),TABLE(*),WEIGHT(32)
+      SAVE
+
+
+      DBFINT     =  0.D0
+      SIB_DBFINT =  0.D0
+      IF(NARG .LT. 1  .OR.  NARG .GT. 5)  RETURN
+
+           LMAX      =  0
+           ISTEP     =  1
+           KNOTS     =  1
+           INDE(1)   =  1
+           WEIGHT(1) =  1.D0
+           DO 100    N  =  1, NARG
+              X     =  ARG(N)
+              NDIM  =  NA(N)
+              LOCA  =  LMAX
+              LMIN  =  LMAX + 1
+              LMAX  =  LMAX + NDIM
+              IF(NDIM .GT. 2)  GOTO 10
+              IF(NDIM .EQ. 1)  GOTO 100
+              H  =  X - ENT(LMIN)
+              IF(ABS(H) .LT. 0.D-8)  GOTO 90
+              ISHIFT  =  ISTEP
+              IF(ABS(X-ENT(LMIN+1)) .LT. 0.D-8)  GOTO 21
+              ISHIFT  =  0
+              ETA     =  H / (ENT(LMIN+1) - ENT(LMIN))
+              GOTO 30
+   10         LOCB  =  LMAX + 1
+   11         LOCC  =  (LOCA+LOCB) / 2
+              IF(X-ENT(LOCC))  12, 20, 13
+   12         LOCB  =  LOCC
+              GOTO 14
+   13         LOCA  =  LOCC
+   14         IF(LOCB-LOCA .GT. 1)  GOTO 11
+              LOCA    =  MIN ( MAX (LOCA,LMIN), LMAX-1 )
+              ISHIFT  =  (LOCA - LMIN) * ISTEP
+              ETA     =  (X - ENT(LOCA)) / (ENT(LOCA+1) - ENT(LOCA))
+              GOTO 30
+   20         ISHIFT  =  (LOCC - LMIN) * ISTEP
+   21         DO 22  K  =  1, KNOTS
+                 INDE(K)  =  INDE(K) + ISHIFT
+   22         CONTINUE
+              GOTO 90
+   30         DO 31  K  =  1, KNOTS
+                 INDE(K)         =  INDE(K) + ISHIFT
+                 INDE(K+KNOTS)   =  INDE(K) + ISTEP
+                 WEIGHT(K+KNOTS) =  WEIGHT(K) * ETA
+                 WEIGHT(K)       =  WEIGHT(K) - WEIGHT(K+KNOTS)
+   31         CONTINUE
+              KNOTS  =  2*KNOTS
+   90         ISTEP  =  ISTEP * NDIM
+  100      CONTINUE
+           DO 200    K  =  1, KNOTS
+              I  =  INDE(K)
+              DBFINT =  DBFINT + WEIGHT(K) * TABLE(I)
+  200      CONTINUE
+
+      SIB_DBFINT = DBFINT
+
+      END
+
+C=======================================================================
+
+      SUBROUTINE SIB_DOR98LO (Xinp, Q2inp, UV, DV, US, DS, SS, GL)
+
+C-----------------------------------------------------------------------
+C***********************************************************************
+C
+C   GRV98 parton densities, leading order set
+C
+C                  For a detailed explanation see
+C                   M. Glueck, E. Reya, A. Vogt :
+C        hep-ph/9806404  =  DO-TH 98/07  =  WUE-ITP-98-019
+C                  (To appear in Eur. Phys. J. C)
+C
+C   interpolation routine based on the original GRV98PA routine,
+C   adapted to define interpolation table as DATA statements
+C
+C                                                   (R.Engel, 09/98)
+C
+C
+C   INPUT:   X  =  Bjorken-x        (between  1.E-9 and 1.)
+C            Q2 =  scale in GeV**2  (between  0.8 and 1.E6)
+C
+C   OUTPUT:  UV = u - u(bar),  DV = d - d(bar),  US = u(bar),
+C            DS = d(bar),  SS = s = s(bar),  GL = gluon.
+C            Always x times the distribution is returned.
+C
+C******************************************************i****************
+      IMPLICIT DOUBLE PRECISION (A-H, O-Z)
+      IMPLICIT INTEGER(I-N)
+
+      PARAMETER (NX=68, NQ=27, NARG=2)
+      DIMENSION XUVF(NX,NQ), XDVF(NX,NQ), XDEF(NX,NQ), XUDF(NX,NQ),
+     1          XSF(NX,NQ), XGF(NX,NQ),
+     2          XT(NARG), NA(NARG), ARRF(NX+NQ)
+
+      DIMENSION XUVF_L(NX*NQ), XDVF_L(NX*NQ), XDEF_L(NX*NQ),
+     &  XUDF_L(NX*NQ), XSF_L(NX*NQ), XGF_L(NX*NQ)
+
+      EQUIVALENCE (XUVF(1,1),XUVF_L(1))
+      EQUIVALENCE (XDVF(1,1),XDVF_L(1))
+      EQUIVALENCE (XDEF(1,1),XDEF_L(1))
+      EQUIVALENCE (XUDF(1,1),XUDF_L(1))
+      EQUIVALENCE (XSF(1,1),XSF_L(1))
+      EQUIVALENCE (XGF(1,1),XGF_L(1))
+      SAVE
+
+      DATA (ARRF(K),K=    1,   95) /
+     &  -2.0723D+01,-2.0135D+01,-1.9560D+01,-1.8983D+01,-1.8421D+01,
+     &  -1.7833D+01,-1.7258D+01,-1.6680D+01,-1.6118D+01,-1.5530D+01,
+     &  -1.4955D+01,-1.4378D+01,-1.3816D+01,-1.3479D+01,-1.3122D+01,
+     &  -1.2717D+01,-1.2311D+01,-1.1913D+01,-1.1513D+01,-1.1176D+01,
+     &  -1.0820D+01,-1.0414D+01,-1.0009D+01,-9.6108D+00,-9.2103D+00,
+     &  -8.8739D+00,-8.5172D+00,-8.1117D+00,-7.7063D+00,-7.3082D+00,
+     &  -6.9078D+00,-6.5713D+00,-6.2146D+00,-5.8091D+00,-5.4037D+00,
+     &  -5.0056D+00,-4.6052D+00,-4.2687D+00,-3.9120D+00,-3.5066D+00,
+     &  -3.1011D+00,-2.8134D+00,-2.5257D+00,-2.3026D+00,-2.0794D+00,
+     &  -1.8971D+00,-1.7430D+00,-1.6094D+00,-1.4917D+00,-1.3863D+00,
+     &  -1.2910D+00,-1.2040D+00,-1.1239D+00,-1.0498D+00,-9.8083D-01,
+     &  -9.1629D-01,-7.9851D-01,-6.9315D-01,-5.9784D-01,-5.1083D-01,
+     &  -4.3078D-01,-3.5667D-01,-2.8768D-01,-2.2314D-01,-1.6252D-01,
+     &  -1.0536D-01,-5.1293D-02, 0.0000D+00,-2.2314D-01, 0.0000D+00,
+     &   2.6236D-01, 5.8779D-01, 9.9325D-01, 1.3863D+00, 1.8563D+00,
+     &   2.3026D+00, 2.7726D+00, 3.2189D+00, 3.6889D+00, 4.1589D+00,
+     &   4.6052D+00, 5.1930D+00, 5.7683D+00, 6.3456D+00, 6.9078D+00,
+     &   7.4955D+00, 8.0709D+00, 8.6482D+00, 9.2103D+00, 9.9988D+00,
+     &   1.0736D+01, 1.1513D+01, 1.2301D+01, 1.3039D+01, 1.3816D+01/
+      DATA (XUVF_L(K),K=    1,  114) /
+     &2.3186D+00,2.2915D+00,2.2645D+00,2.2385D+00,2.2140D+00,2.1876D+00,
+     &2.1623D+00,2.1366D+00,2.1121D+00,2.0862D+00,2.0612D+00,2.0358D+00,
+     &2.0110D+00,1.9963D+00,1.9806D+00,1.9624D+00,1.9446D+00,1.9263D+00,
+     &1.9072D+00,1.8904D+00,1.8724D+00,1.8515D+00,1.8294D+00,1.8085D+00,
+     &1.7865D+00,1.7680D+00,1.7483D+00,1.7249D+00,1.6993D+00,1.6715D+00,
+     &1.6385D+00,1.6141D+00,1.5884D+00,1.5597D+00,1.5337D+00,1.5121D+00,
+     &1.4985D+00,1.4980D+00,1.5116D+00,1.5555D+00,1.6432D+00,1.7434D+00,
+     &1.8861D+00,2.0327D+00,2.2174D+00,2.4015D+00,2.5849D+00,2.7671D+00,
+     &2.9488D+00,3.1308D+00,3.3142D+00,3.4998D+00,3.6885D+00,3.8826D+00,
+     &4.0815D+00,4.2069D+00,4.5481D+00,4.8830D+00,5.2116D+00,5.5351D+00,
+     &5.8553D+00,6.1665D+00,6.4745D+00,6.7767D+00,7.0735D+00,7.3628D+00,
+     &7.6283D+00,0.0000D+00,2.3948D+00,2.3665D+00,2.3388D+00,2.3126D+00,
+     &2.2860D+00,2.2592D+00,2.2327D+00,2.2065D+00,2.1810D+00,2.1541D+00,
+     &2.1284D+00,2.1020D+00,2.0760D+00,2.0605D+00,2.0443D+00,2.0259D+00,
+     &2.0068D+00,1.9873D+00,1.9676D+00,1.9500D+00,1.9312D+00,1.9081D+00,
+     &1.8860D+00,1.8635D+00,1.8406D+00,1.8221D+00,1.8007D+00,1.7764D+00,
+     &1.7489D+00,1.7195D+00,1.6855D+00,1.6600D+00,1.6332D+00,1.6031D+00,
+     &1.5760D+00,1.5532D+00,1.5397D+00,1.5376D+00,1.5507D+00,1.5929D+00,
+     &1.6784D+00,1.7759D+00,1.9129D+00,2.0531D+00,2.2292D+00,2.4032D+00/
+      DATA (XUVF_L(K),K=  115,  228) /
+     &2.5752D+00,2.7449D+00,2.9135D+00,3.0810D+00,3.2491D+00,3.4183D+00,
+     &3.5898D+00,3.7650D+00,3.9437D+00,4.0443D+00,4.3402D+00,4.6262D+00,
+     &4.9009D+00,5.1640D+00,5.4156D+00,5.6530D+00,5.8759D+00,6.0779D+00,
+     &6.2540D+00,6.3836D+00,6.4062D+00,0.0000D+00,2.4808D+00,2.4513D+00,
+     &2.4236D+00,2.3948D+00,2.3680D+00,2.3397D+00,2.3127D+00,2.2853D+00,
+     &2.2585D+00,2.2307D+00,2.2026D+00,2.1762D+00,2.1490D+00,2.1332D+00,
+     &2.1164D+00,2.0964D+00,2.0766D+00,2.0565D+00,2.0353D+00,2.0171D+00,
+     &1.9969D+00,1.9738D+00,1.9501D+00,1.9258D+00,1.9026D+00,1.8821D+00,
+     &1.8594D+00,1.8330D+00,1.8046D+00,1.7734D+00,1.7378D+00,1.7112D+00,
+     &1.6829D+00,1.6514D+00,1.6228D+00,1.5994D+00,1.5840D+00,1.5808D+00,
+     &1.5927D+00,1.6334D+00,1.7157D+00,1.8093D+00,1.9406D+00,2.0735D+00,
+     &2.2394D+00,2.4019D+00,2.5615D+00,2.7178D+00,2.8718D+00,3.0246D+00,
+     &3.1766D+00,3.3284D+00,3.4820D+00,3.6370D+00,3.7952D+00,3.8716D+00,
+     &4.1225D+00,4.3580D+00,4.5798D+00,4.7847D+00,4.9730D+00,5.1395D+00,
+     &5.2832D+00,5.3945D+00,5.4634D+00,5.4612D+00,5.2940D+00,0.0000D+00,
+     &2.5823D+00,2.5527D+00,2.5226D+00,2.4928D+00,2.4650D+00,2.4358D+00,
+     &2.4071D+00,2.3783D+00,2.3505D+00,2.3212D+00,2.2928D+00,2.2636D+00,
+     &2.2360D+00,2.2185D+00,2.2005D+00,2.1801D+00,2.1591D+00,2.1376D+00,
+     &2.1153D+00,2.0960D+00,2.0747D+00,2.0505D+00,2.0247D+00,1.9991D+00/
+      DATA (XUVF_L(K),K=  229,  342) /
+     &1.9746D+00,1.9523D+00,1.9287D+00,1.9000D+00,1.8693D+00,1.8361D+00,
+     &1.7994D+00,1.7711D+00,1.7409D+00,1.7076D+00,1.6772D+00,1.6517D+00,
+     &1.6345D+00,1.6302D+00,1.6408D+00,1.6789D+00,1.7574D+00,1.8457D+00,
+     &1.9692D+00,2.0939D+00,2.2474D+00,2.3969D+00,2.5419D+00,2.6837D+00,
+     &2.8216D+00,2.9573D+00,3.0915D+00,3.2246D+00,3.3583D+00,3.4917D+00,
+     &3.6273D+00,3.6791D+00,3.8823D+00,4.0673D+00,4.2350D+00,4.3813D+00,
+     &4.5072D+00,4.6083D+00,4.6757D+00,4.7055D+00,4.6825D+00,4.5674D+00,
+     &4.2566D+00,0.0000D+00,2.7025D+00,2.6705D+00,2.6393D+00,2.6093D+00,
+     &2.5790D+00,2.5484D+00,2.5184D+00,2.4880D+00,2.4590D+00,2.4277D+00,
+     &2.3971D+00,2.3669D+00,2.3380D+00,2.3200D+00,2.3002D+00,2.2782D+00,
+     &2.2557D+00,2.2331D+00,2.2092D+00,2.1887D+00,2.1660D+00,2.1400D+00,
+     &2.1126D+00,2.0859D+00,2.0586D+00,2.0351D+00,2.0094D+00,1.9786D+00,
+     &1.9453D+00,1.9096D+00,1.8707D+00,1.8406D+00,1.8084D+00,1.7728D+00,
+     &1.7392D+00,1.7128D+00,1.6933D+00,1.6875D+00,1.6949D+00,1.7295D+00,
+     &1.8023D+00,1.8845D+00,1.9991D+00,2.1134D+00,2.2525D+00,2.3868D+00,
+     &2.5160D+00,2.6405D+00,2.7609D+00,2.8781D+00,2.9929D+00,3.1059D+00,
+     &3.2180D+00,3.3292D+00,3.4407D+00,3.4675D+00,3.6225D+00,3.7573D+00,
+     &3.8710D+00,3.9617D+00,4.0270D+00,4.0642D+00,4.0675D+00,4.0263D+00,
+     &3.9240D+00,3.7262D+00,3.3217D+00,0.0000D+00,2.8135D+00,2.7813D+00/
+      DATA (XUVF_L(K),K=  343,  456) /
+     &2.7489D+00,2.7166D+00,2.6850D+00,2.6527D+00,2.6212D+00,2.5898D+00,
+     &2.5592D+00,2.5267D+00,2.4943D+00,2.4636D+00,2.4320D+00,2.4129D+00,
+     &2.3929D+00,2.3695D+00,2.3453D+00,2.3211D+00,2.2959D+00,2.2740D+00,
+     &2.2496D+00,2.2221D+00,2.1931D+00,2.1653D+00,2.1356D+00,2.1112D+00,
+     &2.0830D+00,2.0503D+00,2.0147D+00,1.9766D+00,1.9361D+00,1.9037D+00,
+     &1.8696D+00,1.8318D+00,1.7966D+00,1.7677D+00,1.7459D+00,1.7378D+00,
+     &1.7430D+00,1.7738D+00,1.8407D+00,1.9169D+00,2.0223D+00,2.1273D+00,
+     &2.2537D+00,2.3742D+00,2.4892D+00,2.5990D+00,2.7043D+00,2.8056D+00,
+     &2.9038D+00,3.0000D+00,3.0936D+00,3.1864D+00,3.2782D+00,3.2867D+00,
+     &3.4021D+00,3.4971D+00,3.5691D+00,3.6188D+00,3.6422D+00,3.6335D+00,
+     &3.5908D+00,3.5036D+00,3.3552D+00,3.1085D+00,2.6634D+00,0.0000D+00,
+     &2.9406D+00,2.9062D+00,2.8726D+00,2.8385D+00,2.8060D+00,2.7720D+00,
+     &2.7392D+00,2.7058D+00,2.6734D+00,2.6399D+00,2.6057D+00,2.5722D+00,
+     &2.5390D+00,2.5194D+00,2.4975D+00,2.4728D+00,2.4471D+00,2.4216D+00,
+     &2.3945D+00,2.3712D+00,2.3458D+00,2.3152D+00,2.2856D+00,2.2545D+00,
+     &2.2237D+00,2.1966D+00,2.1672D+00,2.1312D+00,2.0926D+00,2.0521D+00,
+     &2.0093D+00,1.9748D+00,1.9384D+00,1.8975D+00,1.8601D+00,1.8275D+00,
+     &1.8036D+00,1.7924D+00,1.7948D+00,1.8206D+00,1.8808D+00,1.9499D+00,
+     &2.0450D+00,2.1390D+00,2.2512D+00,2.3570D+00,2.4564D+00,2.5501D+00/
+      DATA (XUVF_L(K),K=  457,  570) /
+     &2.6391D+00,2.7240D+00,2.8053D+00,2.8834D+00,2.9590D+00,3.0326D+00,
+     &3.1042D+00,3.0942D+00,3.1727D+00,3.2289D+00,3.2628D+00,3.2739D+00,
+     &3.2574D+00,3.2103D+00,3.1297D+00,3.0047D+00,2.8211D+00,2.5467D+00,
+     &2.0897D+00,0.0000D+00,3.0557D+00,3.0193D+00,2.9840D+00,2.9497D+00,
+     &2.9150D+00,2.8801D+00,2.8454D+00,2.8109D+00,2.7771D+00,2.7412D+00,
+     &2.7065D+00,2.6716D+00,2.6360D+00,2.6149D+00,2.5923D+00,2.5663D+00,
+     &2.5395D+00,2.5120D+00,2.4834D+00,2.4589D+00,2.4330D+00,2.4011D+00,
+     &2.3676D+00,2.3363D+00,2.3027D+00,2.2736D+00,2.2422D+00,2.2040D+00,
+     &2.1629D+00,2.1194D+00,2.0750D+00,2.0384D+00,1.9996D+00,1.9565D+00,
+     &1.9160D+00,1.8811D+00,1.8541D+00,1.8409D+00,1.8399D+00,1.8611D+00,
+     &1.9143D+00,1.9764D+00,2.0622D+00,2.1459D+00,2.2457D+00,2.3385D+00,
+     &2.4249D+00,2.5051D+00,2.5806D+00,2.6515D+00,2.7182D+00,2.7823D+00,
+     &2.8427D+00,2.9008D+00,2.9564D+00,2.9332D+00,2.9828D+00,3.0094D+00,
+     &3.0142D+00,2.9955D+00,2.9537D+00,2.8796D+00,2.7735D+00,2.6260D+00,
+     &2.4242D+00,2.1388D+00,1.6900D+00,0.0000D+00,3.1718D+00,3.1348D+00,
+     &3.0971D+00,3.0610D+00,3.0260D+00,2.9896D+00,2.9533D+00,2.9173D+00,
+     &2.8818D+00,2.8449D+00,2.8072D+00,2.7709D+00,2.7340D+00,2.7121D+00,
+     &2.6877D+00,2.6605D+00,2.6319D+00,2.6032D+00,2.5732D+00,2.5471D+00,
+     &2.5180D+00,2.4851D+00,2.4511D+00,2.4170D+00,2.3817D+00,2.3505D+00/
+      DATA (XUVF_L(K),K=  571,  684) /
+     &2.3172D+00,2.2762D+00,2.2328D+00,2.1868D+00,2.1400D+00,2.1012D+00,
+     &2.0601D+00,2.0136D+00,1.9704D+00,1.9335D+00,1.9035D+00,1.8868D+00,
+     &1.8827D+00,1.8990D+00,1.9452D+00,2.0005D+00,2.0763D+00,2.1507D+00,
+     &2.2377D+00,2.3179D+00,2.3917D+00,2.4592D+00,2.5218D+00,2.5799D+00,
+     &2.6336D+00,2.6843D+00,2.7314D+00,2.7753D+00,2.8166D+00,2.7824D+00,
+     &2.8054D+00,2.8081D+00,2.7893D+00,2.7474D+00,2.6818D+00,2.5888D+00,
+     &2.4646D+00,2.3032D+00,2.0902D+00,1.8025D+00,1.3740D+00,0.0000D+00,
+     &3.2793D+00,3.2385D+00,3.2014D+00,3.1643D+00,3.1270D+00,3.0888D+00,
+     &3.0517D+00,3.0141D+00,2.9773D+00,2.9392D+00,2.9009D+00,2.8610D+00,
+     &2.8230D+00,2.8000D+00,2.7754D+00,2.7459D+00,2.7163D+00,2.6858D+00,
+     &2.6545D+00,2.6270D+00,2.5962D+00,2.5617D+00,2.5271D+00,2.4903D+00,
+     &2.4527D+00,2.4207D+00,2.3851D+00,2.3421D+00,2.2960D+00,2.2476D+00,
+     &2.1987D+00,2.1578D+00,2.1146D+00,2.0670D+00,2.0202D+00,1.9796D+00,
+     &1.9468D+00,1.9282D+00,1.9203D+00,1.9319D+00,1.9712D+00,2.0197D+00,
+     &2.0872D+00,2.1524D+00,2.2288D+00,2.2981D+00,2.3606D+00,2.4177D+00,
+     &2.4692D+00,2.5159D+00,2.5591D+00,2.5981D+00,2.6339D+00,2.6669D+00,
+     &2.6962D+00,2.6528D+00,2.6566D+00,2.6395D+00,2.6028D+00,2.5437D+00,
+     &2.4622D+00,2.3555D+00,2.2200D+00,2.0488D+00,1.8335D+00,1.5506D+00,
+     &1.1442D+00,0.0000D+00,3.3868D+00,3.3470D+00,3.3075D+00,3.2689D+00/
+      DATA (XUVF_L(K),K=  685,  798) /
+     &3.2300D+00,3.1909D+00,3.1517D+00,3.1129D+00,3.0747D+00,3.0335D+00,
+     &2.9946D+00,2.9537D+00,2.9140D+00,2.8896D+00,2.8638D+00,2.8337D+00,
+     &2.8021D+00,2.7705D+00,2.7373D+00,2.7075D+00,2.6767D+00,2.6403D+00,
+     &2.6031D+00,2.5649D+00,2.5258D+00,2.4917D+00,2.4537D+00,2.4080D+00,
+     &2.3597D+00,2.3091D+00,2.2580D+00,2.2150D+00,2.1692D+00,2.1186D+00,
+     &2.0701D+00,2.0257D+00,1.9901D+00,1.9679D+00,1.9571D+00,1.9629D+00,
+     &1.9955D+00,2.0378D+00,2.0963D+00,2.1529D+00,2.2178D+00,2.2766D+00,
+     &2.3287D+00,2.3749D+00,2.4162D+00,2.4529D+00,2.4850D+00,2.5140D+00,
+     &2.5392D+00,2.5617D+00,2.5798D+00,2.5298D+00,2.5151D+00,2.4811D+00,
+     &2.4282D+00,2.3561D+00,2.2611D+00,2.1439D+00,2.0005D+00,1.8252D+00,
+     &1.6091D+00,1.3345D+00,9.5375D-01,0.0000D+00,3.4912D+00,3.4507D+00,
+     &3.4100D+00,3.3696D+00,3.3310D+00,3.2893D+00,3.2496D+00,3.2088D+00,
+     &3.1686D+00,3.1278D+00,3.0865D+00,3.0438D+00,3.0020D+00,2.9766D+00,
+     &2.9494D+00,2.9180D+00,2.8850D+00,2.8520D+00,2.8174D+00,2.7877D+00,
+     &2.7550D+00,2.7169D+00,2.6762D+00,2.6369D+00,2.5958D+00,2.5594D+00,
+     &2.5195D+00,2.4721D+00,2.4211D+00,2.3680D+00,2.3145D+00,2.2695D+00,
+     &2.2214D+00,2.1684D+00,2.1154D+00,2.0706D+00,2.0303D+00,2.0058D+00,
+     &1.9909D+00,1.9920D+00,2.0177D+00,2.0531D+00,2.1031D+00,2.1511D+00,
+     &2.2060D+00,2.2548D+00,2.2972D+00,2.3339D+00,2.3655D+00,2.3927D+00/
+      DATA (XUVF_L(K),K=  799,  912) /
+     &2.4159D+00,2.4357D+00,2.4520D+00,2.4644D+00,2.4735D+00,2.4171D+00,
+     &2.3878D+00,2.3397D+00,2.2743D+00,2.1907D+00,2.0861D+00,1.9611D+00,
+     &1.8128D+00,1.6351D+00,1.4227D+00,1.1584D+00,8.0371D-01,0.0000D+00,
+     &3.5892D+00,3.5473D+00,3.5055D+00,3.4637D+00,3.4230D+00,3.3809D+00,
+     &3.3396D+00,3.2976D+00,3.2571D+00,3.2126D+00,3.1696D+00,3.1272D+00,
+     &3.0840D+00,3.0569D+00,3.0286D+00,2.9959D+00,2.9619D+00,2.9273D+00,
+     &2.8910D+00,2.8598D+00,2.8266D+00,2.7863D+00,2.7448D+00,2.7029D+00,
+     &2.6598D+00,2.6219D+00,2.5804D+00,2.5305D+00,2.4773D+00,2.4214D+00,
+     &2.3662D+00,2.3191D+00,2.2698D+00,2.2126D+00,2.1577D+00,2.1092D+00,
+     &2.0674D+00,2.0393D+00,2.0210D+00,2.0173D+00,2.0367D+00,2.0654D+00,
+     &2.1076D+00,2.1485D+00,2.1942D+00,2.2338D+00,2.2678D+00,2.2959D+00,
+     &2.3193D+00,2.3386D+00,2.3539D+00,2.3660D+00,2.3738D+00,2.3789D+00,
+     &2.3799D+00,2.3197D+00,2.2776D+00,2.2186D+00,2.1426D+00,2.0495D+00,
+     &1.9397D+00,1.8097D+00,1.6583D+00,1.4814D+00,1.2736D+00,1.0200D+00,
+     &6.8880D-01,0.0000D+00,3.7157D+00,3.6699D+00,3.6275D+00,3.5842D+00,
+     &3.5420D+00,3.4972D+00,3.4542D+00,3.4107D+00,3.3678D+00,3.3234D+00,
+     &3.2774D+00,3.2332D+00,3.1870D+00,3.1600D+00,3.1297D+00,3.0952D+00,
+     &3.0595D+00,3.0231D+00,2.9850D+00,2.9534D+00,2.9160D+00,2.8740D+00,
+     &2.8312D+00,2.7872D+00,2.7408D+00,2.7014D+00,2.6568D+00,2.6045D+00/
+      DATA (XUVF_L(K),K=  913, 1026) /
+     &2.5481D+00,2.4895D+00,2.4315D+00,2.3817D+00,2.3283D+00,2.2697D+00,
+     &2.2106D+00,2.1591D+00,2.1128D+00,2.0807D+00,2.0578D+00,2.0477D+00,
+     &2.0583D+00,2.0796D+00,2.1122D+00,2.1433D+00,2.1777D+00,2.2069D+00,
+     &2.2299D+00,2.2483D+00,2.2618D+00,2.2718D+00,2.2778D+00,2.2803D+00,
+     &2.2797D+00,2.2749D+00,2.2668D+00,2.2019D+00,2.1468D+00,2.0761D+00,
+     &1.9902D+00,1.8883D+00,1.7711D+00,1.6370D+00,1.4847D+00,1.3103D+00,
+     &1.1091D+00,8.7047D-01,5.6856D-01,0.0000D+00,3.8327D+00,3.7877D+00,
+     &3.7424D+00,3.6981D+00,3.6540D+00,3.6083D+00,3.5637D+00,3.5184D+00,
+     &3.4753D+00,3.4271D+00,3.3800D+00,3.3325D+00,3.2860D+00,3.2564D+00,
+     &3.2258D+00,3.1893D+00,3.1519D+00,3.1135D+00,3.0738D+00,3.0389D+00,
+     &3.0010D+00,2.9580D+00,2.9118D+00,2.8654D+00,2.8178D+00,2.7758D+00,
+     &2.7289D+00,2.6738D+00,2.6146D+00,2.5530D+00,2.4924D+00,2.4399D+00,
+     &2.3845D+00,2.3213D+00,2.2605D+00,2.2040D+00,2.1540D+00,2.1186D+00,
+     &2.0908D+00,2.0749D+00,2.0772D+00,2.0914D+00,2.1145D+00,2.1368D+00,
+     &2.1613D+00,2.1804D+00,2.1941D+00,2.2037D+00,2.2088D+00,2.2101D+00,
+     &2.2083D+00,2.2031D+00,2.1942D+00,2.1826D+00,2.1665D+00,2.0987D+00,
+     &2.0321D+00,1.9516D+00,1.8571D+00,1.7497D+00,1.6281D+00,1.4923D+00,
+     &1.3406D+00,1.1697D+00,9.7635D-01,7.5209D-01,4.7638D-01,0.0000D+00,
+     &3.9497D+00,3.9009D+00,3.8555D+00,3.8080D+00,3.7630D+00,3.7163D+00/
+      DATA (XUVF_L(K),K= 1027, 1140) /
+     &3.6699D+00,3.6231D+00,3.5765D+00,3.5285D+00,3.4807D+00,3.4305D+00,
+     &3.3810D+00,3.3511D+00,3.3185D+00,3.2805D+00,3.2414D+00,3.2016D+00,
+     &3.1598D+00,3.1244D+00,3.0837D+00,3.0383D+00,2.9908D+00,2.9424D+00,
+     &2.8919D+00,2.8477D+00,2.7990D+00,2.7403D+00,2.6784D+00,2.6142D+00,
+     &2.5507D+00,2.4960D+00,2.4362D+00,2.3710D+00,2.3058D+00,2.2463D+00,
+     &2.1931D+00,2.1539D+00,2.1216D+00,2.0996D+00,2.0940D+00,2.1012D+00,
+     &2.1154D+00,2.1294D+00,2.1444D+00,2.1543D+00,2.1597D+00,2.1610D+00,
+     &2.1585D+00,2.1523D+00,2.1432D+00,2.1307D+00,2.1155D+00,2.0964D+00,
+     &2.0742D+00,2.0035D+00,1.9273D+00,1.8396D+00,1.7387D+00,1.6273D+00,
+     &1.5032D+00,1.3665D+00,1.2164D+00,1.0501D+00,8.6515D-01,6.5470D-01,
+     &4.0284D-01,0.0000D+00,4.0572D+00,4.0093D+00,3.9616D+00,3.9140D+00,
+     &3.8670D+00,3.8185D+00,3.7706D+00,3.7224D+00,3.6746D+00,3.6251D+00,
+     &3.5744D+00,3.5233D+00,3.4720D+00,3.4406D+00,3.4062D+00,3.3671D+00,
+     &3.3263D+00,3.2847D+00,3.2414D+00,3.2046D+00,3.1620D+00,3.1150D+00,
+     &3.0653D+00,3.0145D+00,2.9619D+00,2.9153D+00,2.8641D+00,2.8032D+00,
+     &2.7388D+00,2.6715D+00,2.6056D+00,2.5481D+00,2.4880D+00,2.4171D+00,
+     &2.3496D+00,2.2862D+00,2.2282D+00,2.1865D+00,2.1502D+00,2.1217D+00,
+     &2.1086D+00,2.1086D+00,2.1149D+00,2.1216D+00,2.1275D+00,2.1295D+00,
+     &2.1273D+00,2.1212D+00,2.1119D+00,2.0992D+00,2.0837D+00,2.0653D+00/
+      DATA (XUVF_L(K),K= 1141, 1254) /
+     &2.0442D+00,2.0194D+00,1.9912D+00,1.9193D+00,1.8359D+00,1.7412D+00,
+     &1.6366D+00,1.5214D+00,1.3956D+00,1.2594D+00,1.1115D+00,9.5033D-01,
+     &7.7356D-01,5.7585D-01,3.4506D-01,0.0000D+00,4.1710D+00,4.1201D+00,
+     &4.0712D+00,4.0213D+00,3.9730D+00,3.9228D+00,3.8734D+00,3.8233D+00,
+     &3.7726D+00,3.7217D+00,3.6699D+00,3.6160D+00,3.5640D+00,3.5311D+00,
+     &3.4960D+00,3.4549D+00,3.4121D+00,3.3689D+00,3.3237D+00,3.2848D+00,
+     &3.2425D+00,3.1917D+00,3.1399D+00,3.0866D+00,3.0319D+00,2.9838D+00,
+     &2.9306D+00,2.8668D+00,2.7992D+00,2.7291D+00,2.6605D+00,2.6007D+00,
+     &2.5375D+00,2.4631D+00,2.3919D+00,2.3261D+00,2.2643D+00,2.2183D+00,
+     &2.1772D+00,2.1426D+00,2.1222D+00,2.1155D+00,2.1135D+00,2.1130D+00,
+     &2.1102D+00,2.1039D+00,2.0941D+00,2.0815D+00,2.0652D+00,2.0466D+00,
+     &2.0251D+00,2.0014D+00,1.9746D+00,1.9450D+00,1.9116D+00,1.8381D+00,
+     &1.7481D+00,1.6484D+00,1.5404D+00,1.4225D+00,1.2963D+00,1.1611D+00,
+     &1.0161D+00,8.6047D-01,6.9193D-01,5.0691D-01,2.9581D-01,0.0000D+00,
+     &4.2754D+00,4.2238D+00,4.1737D+00,4.1233D+00,4.0740D+00,4.0219D+00,
+     &3.9713D+00,3.9196D+00,3.8675D+00,3.8160D+00,3.7618D+00,3.7060D+00,
+     &3.6510D+00,3.6173D+00,3.5808D+00,3.5380D+00,3.4941D+00,3.4493D+00,
+     &3.4027D+00,3.3623D+00,3.3163D+00,3.2647D+00,3.2114D+00,3.1563D+00,
+     &3.0989D+00,3.0489D+00,2.9929D+00,2.9263D+00,2.8563D+00,2.7837D+00/
+      DATA (XUVF_L(K),K= 1255, 1368) /
+     &2.7122D+00,2.6501D+00,2.5825D+00,2.5073D+00,2.4327D+00,2.3623D+00,
+     &2.2962D+00,2.2474D+00,2.2020D+00,2.1616D+00,2.1335D+00,2.1209D+00,
+     &2.1113D+00,2.1034D+00,2.0929D+00,2.0795D+00,2.0634D+00,2.0439D+00,
+     &2.0222D+00,1.9982D+00,1.9716D+00,1.9428D+00,1.9113D+00,1.8773D+00,
+     &1.8394D+00,1.7649D+00,1.6692D+00,1.5658D+00,1.4547D+00,1.3360D+00,
+     &1.2095D+00,1.0761D+00,9.3485D-01,7.8430D-01,6.2380D-01,4.5010D-01,
+     &2.5625D-01,0.0000D+00,4.3798D+00,4.3275D+00,4.2762D+00,4.2239D+00,
+     &4.1730D+00,4.1196D+00,4.0674D+00,4.0143D+00,3.9623D+00,3.9056D+00,
+     &3.8502D+00,3.7935D+00,3.7370D+00,3.7018D+00,3.6642D+00,3.6200D+00,
+     &3.5742D+00,3.5277D+00,3.4786D+00,3.4371D+00,3.3901D+00,3.3359D+00,
+     &3.2800D+00,3.2235D+00,3.1639D+00,3.1115D+00,3.0537D+00,2.9847D+00,
+     &2.9116D+00,2.8364D+00,2.7623D+00,2.6973D+00,2.6275D+00,2.5497D+00,
+     &2.4705D+00,2.3972D+00,2.3281D+00,2.2747D+00,2.2253D+00,2.1793D+00,
+     &2.1444D+00,2.1253D+00,2.1081D+00,2.0939D+00,2.0755D+00,2.0555D+00,
+     &2.0332D+00,2.0081D+00,1.9814D+00,1.9522D+00,1.9205D+00,1.8875D+00,
+     &1.8520D+00,1.8139D+00,1.7725D+00,1.6968D+00,1.5976D+00,1.4911D+00,
+     &1.3772D+00,1.2577D+00,1.1320D+00,1.0005D+00,8.6242D-01,7.1750D-01,
+     &5.6466D-01,4.0150D-01,2.2333D-01,0.0000D+00,4.4809D+00,4.4265D+00,
+     &4.3735D+00,4.3193D+00,4.2670D+00,4.2128D+00,4.1585D+00,4.1039D+00/
+      DATA (XUVF_L(K),K= 1369, 1482) /
+     &4.0509D+00,3.9928D+00,3.9351D+00,3.8769D+00,3.8180D+00,3.7821D+00,
+     &3.7434D+00,3.6974D+00,3.6501D+00,3.6019D+00,3.5513D+00,3.5093D+00,
+     &3.4594D+00,3.4035D+00,3.3456D+00,3.2870D+00,3.2250D+00,3.1715D+00,
+     &3.1110D+00,3.0396D+00,2.9639D+00,2.8863D+00,2.8096D+00,2.7429D+00,
+     &2.6702D+00,2.5884D+00,2.5068D+00,2.4296D+00,2.3560D+00,2.3003D+00,
+     &2.2464D+00,2.1951D+00,2.1530D+00,2.1283D+00,2.1045D+00,2.0843D+00,
+     &2.0591D+00,2.0328D+00,2.0047D+00,1.9749D+00,1.9429D+00,1.9096D+00,
+     &1.8740D+00,1.8369D+00,1.7978D+00,1.7560D+00,1.7116D+00,1.6360D+00,
+     &1.5322D+00,1.4233D+00,1.3084D+00,1.1885D+00,1.0637D+00,9.3449D-01,
+     &7.9961D-01,6.6020D-01,5.1453D-01,3.6103D-01,1.9641D-01,0.0000D+00,
+     &4.6169D+00,4.5608D+00,4.5060D+00,4.4504D+00,4.3960D+00,4.3395D+00,
+     &4.2837D+00,4.2262D+00,4.1710D+00,4.1106D+00,4.0517D+00,3.9908D+00,
+     &3.9300D+00,3.8920D+00,3.8509D+00,3.8030D+00,3.7538D+00,3.7035D+00,
+     &3.6494D+00,3.6055D+00,3.5556D+00,3.4966D+00,3.4351D+00,3.3738D+00,
+     &3.3090D+00,3.2518D+00,3.1888D+00,3.1141D+00,3.0348D+00,2.9533D+00,
+     &2.8730D+00,2.8020D+00,2.7264D+00,2.6400D+00,2.5551D+00,2.4732D+00,
+     &2.3941D+00,2.3329D+00,2.2742D+00,2.2147D+00,2.1644D+00,2.1317D+00,
+     &2.0986D+00,2.0700D+00,2.0363D+00,2.0021D+00,1.9668D+00,1.9299D+00,
+     &1.8922D+00,1.8532D+00,1.8125D+00,1.7704D+00,1.7270D+00,1.6809D+00/
+      DATA (XUVF_L(K),K= 1483, 1596) /
+     &1.6327D+00,1.5570D+00,1.4497D+00,1.3373D+00,1.2215D+00,1.1020D+00,
+     &9.7897D-01,8.5304D-01,7.2349D-01,5.9074D-01,4.5411D-01,3.1307D-01,
+     &1.6547D-01,0.0000D+00,4.7403D+00,4.6834D+00,4.6262D+00,4.5696D+00,
+     &4.5140D+00,4.4557D+00,4.3978D+00,4.3393D+00,4.2817D+00,4.2191D+00,
+     &4.1578D+00,4.0941D+00,4.0310D+00,3.9917D+00,3.9492D+00,3.8995D+00,
+     &3.8481D+00,3.7958D+00,3.7411D+00,3.6937D+00,3.6405D+00,3.5806D+00,
+     &3.5171D+00,3.4520D+00,3.3840D+00,3.3254D+00,3.2596D+00,3.1812D+00,
+     &3.0985D+00,3.0137D+00,2.9301D+00,2.8556D+00,2.7782D+00,2.6879D+00,
+     &2.5974D+00,2.5119D+00,2.4281D+00,2.3629D+00,2.2982D+00,2.2324D+00,
+     &2.1730D+00,2.1332D+00,2.0922D+00,2.0570D+00,2.0152D+00,1.9739D+00,
+     &1.9323D+00,1.8902D+00,1.8474D+00,1.8039D+00,1.7589D+00,1.7129D+00,
+     &1.6654D+00,1.6163D+00,1.5652D+00,1.4896D+00,1.3789D+00,1.2649D+00,
+     &1.1487D+00,1.0300D+00,9.0896D-01,7.8619D-01,6.6149D-01,5.3498D-01,
+     &4.0654D-01,2.7586D-01,1.4208D-01,0.0000D+00,4.8699D+00,4.8107D+00,
+     &4.7518D+00,4.6928D+00,4.6350D+00,4.5750D+00,4.5152D+00,4.4524D+00,
+     &4.3956D+00,4.3299D+00,4.2674D+00,4.2014D+00,4.1350D+00,4.0939D+00,
+     &4.0503D+00,3.9982D+00,3.9448D+00,3.8905D+00,3.8328D+00,3.7846D+00,
+     &3.7300D+00,3.6664D+00,3.5991D+00,3.5326D+00,3.4620D+00,3.3998D+00,
+     &3.3311D+00,3.2494D+00,3.1632D+00,3.0752D+00,2.9881D+00,2.9120D+00/
+      DATA (XUVF_L(K),K= 1597, 1710) /
+     &2.8299D+00,2.7339D+00,2.6398D+00,2.5493D+00,2.4611D+00,2.3911D+00,
+     &2.3215D+00,2.2482D+00,2.1812D+00,2.1342D+00,2.0854D+00,2.0427D+00,
+     &1.9932D+00,1.9453D+00,1.8978D+00,1.8504D+00,1.8030D+00,1.7545D+00,
+     &1.7059D+00,1.6565D+00,1.6056D+00,1.5535D+00,1.4989D+00,1.4245D+00,
+     &1.3108D+00,1.1959D+00,1.0798D+00,9.6219D-01,8.4358D-01,7.2422D-01,
+     &6.0451D-01,4.8425D-01,3.6380D-01,2.4286D-01,1.2189D-01,0.0000D+00,
+     &4.9964D+00,4.9356D+00,4.8755D+00,4.8147D+00,4.7550D+00,4.6935D+00,
+     &4.6315D+00,4.5697D+00,4.5062D+00,4.4406D+00,4.3752D+00,4.3061D+00,
+     &4.2380D+00,4.1962D+00,4.1500D+00,4.0963D+00,4.0405D+00,3.9832D+00,
+     &3.9245D+00,3.8728D+00,3.8172D+00,3.7504D+00,3.6811D+00,3.6108D+00,
+     &3.5381D+00,3.4734D+00,3.4018D+00,3.3164D+00,3.2269D+00,3.1352D+00,
+     &3.0446D+00,2.9657D+00,2.8794D+00,2.7800D+00,2.6821D+00,2.5867D+00,
+     &2.4930D+00,2.4184D+00,2.3433D+00,2.2634D+00,2.1877D+00,2.1342D+00,
+     &2.0772D+00,2.0279D+00,1.9713D+00,1.9172D+00,1.8642D+00,1.8120D+00,
+     &1.7600D+00,1.7076D+00,1.6553D+00,1.6027D+00,1.5491D+00,1.4938D+00,
+     &1.4374D+00,1.3637D+00,1.2481D+00,1.1325D+00,1.0166D+00,9.0047D-01,
+     &7.8428D-01,6.6889D-01,5.5381D-01,4.3953D-01,3.2652D-01,2.1461D-01,
+     &1.0498D-01,0.0000D+00,5.1134D+00,5.0511D+00,4.9886D+00,4.9273D+00,
+     &4.8660D+00,4.8016D+00,4.7382D+00,4.6744D+00,4.6106D+00,4.5420D+00/
+      DATA (XUVF_L(K),K= 1711, 1824) /
+     &4.4742D+00,4.4028D+00,4.3320D+00,4.2892D+00,4.2413D+00,4.1858D+00,
+     &4.1281D+00,4.0682D+00,4.0067D+00,3.9556D+00,3.8955D+00,3.8271D+00,
+     &3.7556D+00,3.6829D+00,3.6071D+00,3.5401D+00,3.4662D+00,3.3777D+00,
+     &3.2849D+00,3.1898D+00,3.0960D+00,3.0140D+00,2.9244D+00,2.8224D+00,
+     &2.7183D+00,2.6191D+00,2.5219D+00,2.4431D+00,2.3628D+00,2.2767D+00,
+     &2.1931D+00,2.1332D+00,2.0695D+00,2.0145D+00,1.9514D+00,1.8920D+00,
+     &1.8340D+00,1.7775D+00,1.7215D+00,1.6664D+00,1.6108D+00,1.5553D+00,
+     &1.4995D+00,1.4421D+00,1.3839D+00,1.3103D+00,1.1944D+00,1.0782D+00,
+     &9.6271D-01,8.4822D-01,7.3481D-01,6.2240D-01,5.1184D-01,4.0291D-01,
+     &2.9618D-01,1.9206D-01,9.1846D-02,0.0000D+00,5.2367D+00,5.1713D+00,
+     &5.1071D+00,5.0425D+00,4.9800D+00,4.9141D+00,4.8489D+00,4.7833D+00,
+     &4.7181D+00,4.6457D+00,4.5768D+00,4.5034D+00,4.4300D+00,4.3847D+00,
+     &4.3353D+00,4.2782D+00,4.2182D+00,4.1570D+00,4.0921D+00,4.0385D+00,
+     &3.9782D+00,3.9074D+00,3.8331D+00,3.7575D+00,3.6781D+00,3.6086D+00,
+     &3.5313D+00,3.4401D+00,3.3439D+00,3.2455D+00,3.1483D+00,3.0623D+00,
+     &2.9694D+00,2.8629D+00,2.7561D+00,2.6527D+00,2.5508D+00,2.4669D+00,
+     &2.3816D+00,2.2887D+00,2.1979D+00,2.1317D+00,2.0613D+00,2.0002D+00,
+     &1.9307D+00,1.8659D+00,1.8033D+00,1.7426D+00,1.6834D+00,1.6247D+00,
+     &1.5668D+00,1.5085D+00,1.4504D+00,1.3916D+00,1.3311D+00,1.2591D+00/
+      DATA (XUVF_L(K),K= 1825, 1836) /
+     &1.1415D+00,1.0256D+00,9.1107D-01,7.9840D-01,6.8736D-01,5.7902D-01,
+     &4.7260D-01,3.6895D-01,2.6838D-01,1.7161D-01,8.0264D-02,0.0000D+00/
+      DATA (XDVF_L(K),K=    1,  114) /
+     &1.4230D+00,1.4064D+00,1.3903D+00,1.3749D+00,1.3590D+00,1.3424D+00,
+     &1.3271D+00,1.3114D+00,1.2962D+00,1.2803D+00,1.2647D+00,1.2492D+00,
+     &1.2340D+00,1.2246D+00,1.2155D+00,1.2044D+00,1.1927D+00,1.1814D+00,
+     &1.1695D+00,1.1589D+00,1.1479D+00,1.1347D+00,1.1214D+00,1.1080D+00,
+     &1.0944D+00,1.0824D+00,1.0700D+00,1.0544D+00,1.0371D+00,1.0188D+00,
+     &9.9884D-01,9.8287D-01,9.6563D-01,9.4645D-01,9.2847D-01,9.1313D-01,
+     &9.0246D-01,8.9955D-01,9.0461D-01,9.2737D-01,9.7648D-01,1.0343D+00,
+     &1.1168D+00,1.2030D+00,1.3129D+00,1.4240D+00,1.5357D+00,1.6492D+00,
+     &1.7643D+00,1.8818D+00,2.0016D+00,2.1253D+00,2.2535D+00,2.3853D+00,
+     &2.5225D+00,2.5620D+00,2.7906D+00,3.0230D+00,3.2574D+00,3.4983D+00,
+     &3.7459D+00,4.0062D+00,4.2803D+00,4.5790D+00,4.9150D+00,5.3263D+00,
+     &5.9228D+00,0.0000D+00,1.4698D+00,1.4526D+00,1.4360D+00,1.4199D+00,
+     &1.4030D+00,1.3864D+00,1.3702D+00,1.3542D+00,1.3386D+00,1.3221D+00,
+     &1.3059D+00,1.2896D+00,1.2740D+00,1.2644D+00,1.2544D+00,1.2425D+00,
+     &1.2309D+00,1.2185D+00,1.2061D+00,1.1953D+00,1.1836D+00,1.1697D+00,
+     &1.1558D+00,1.1417D+00,1.1275D+00,1.1154D+00,1.1011D+00,1.0844D+00,
+     &1.0663D+00,1.0471D+00,1.0261D+00,1.0092D+00,9.9133D-01,9.7103D-01,
+     &9.5184D-01,9.3560D-01,9.2380D-01,9.1922D-01,9.2378D-01,9.4563D-01,
+     &9.9235D-01,1.0474D+00,1.1262D+00,1.2078D+00,1.3110D+00,1.4146D+00/
+      DATA (XDVF_L(K),K=  115,  228) /
+     &1.5192D+00,1.6241D+00,1.7298D+00,1.8375D+00,1.9471D+00,2.0592D+00,
+     &2.1741D+00,2.2925D+00,2.4144D+00,2.4425D+00,2.6407D+00,2.8375D+00,
+     &3.0361D+00,3.2345D+00,3.4343D+00,3.6388D+00,3.8488D+00,4.0682D+00,
+     &4.3043D+00,4.5737D+00,4.9280D+00,0.0000D+00,1.5226D+00,1.5047D+00,
+     &1.4874D+00,1.4702D+00,1.4530D+00,1.4363D+00,1.4193D+00,1.4023D+00,
+     &1.3860D+00,1.3690D+00,1.3520D+00,1.3351D+00,1.3190D+00,1.3083D+00,
+     &1.2983D+00,1.2858D+00,1.2733D+00,1.2606D+00,1.2476D+00,1.2362D+00,
+     &1.2237D+00,1.2092D+00,1.1943D+00,1.1795D+00,1.1645D+00,1.1509D+00,
+     &1.1365D+00,1.1185D+00,1.0994D+00,1.0784D+00,1.0566D+00,1.0388D+00,
+     &1.0195D+00,9.9801D-01,9.7765D-01,9.6019D-01,9.4712D-01,9.4158D-01,
+     &9.4524D-01,9.6454D-01,1.0088D+00,1.0604D+00,1.1346D+00,1.2112D+00,
+     &1.3076D+00,1.4038D+00,1.4995D+00,1.5957D+00,1.6918D+00,1.7888D+00,
+     &1.8877D+00,1.9877D+00,2.0896D+00,2.1940D+00,2.2999D+00,2.3168D+00,
+     &2.4844D+00,2.6497D+00,2.8098D+00,2.9678D+00,3.1219D+00,3.2743D+00,
+     &3.4260D+00,3.5742D+00,3.7237D+00,3.8717D+00,4.0300D+00,0.0000D+00,
+     &1.5849D+00,1.5662D+00,1.5482D+00,1.5298D+00,1.5130D+00,1.4944D+00,
+     &1.4769D+00,1.4593D+00,1.4423D+00,1.4243D+00,1.4066D+00,1.3894D+00,
+     &1.3720D+00,1.3607D+00,1.3499D+00,1.3366D+00,1.3237D+00,1.3101D+00,
+     &1.2963D+00,1.2840D+00,1.2709D+00,1.2553D+00,1.2396D+00,1.2232D+00/
+      DATA (XDVF_L(K),K=  229,  342) /
+     &1.2075D+00,1.1932D+00,1.1776D+00,1.1584D+00,1.1377D+00,1.1152D+00,
+     &1.0922D+00,1.0729D+00,1.0524D+00,1.0294D+00,1.0074D+00,9.8843D-01,
+     &9.7377D-01,9.6751D-01,9.6901D-01,9.8606D-01,1.0264D+00,1.0745D+00,
+     &1.1435D+00,1.2136D+00,1.3018D+00,1.3894D+00,1.4758D+00,1.5619D+00,
+     &1.6474D+00,1.7332D+00,1.8194D+00,1.9063D+00,1.9941D+00,2.0832D+00,
+     &2.1725D+00,2.1789D+00,2.3166D+00,2.4460D+00,2.5708D+00,2.6884D+00,
+     &2.7987D+00,2.9025D+00,2.9974D+00,3.0823D+00,3.1538D+00,3.2013D+00,
+     &3.2043D+00,0.0000D+00,1.6586D+00,1.6391D+00,1.6202D+00,1.6014D+00,
+     &1.5830D+00,1.5638D+00,1.5457D+00,1.5267D+00,1.5087D+00,1.4899D+00,
+     &1.4711D+00,1.4517D+00,1.4340D+00,1.4224D+00,1.4107D+00,1.3972D+00,
+     &1.3827D+00,1.3684D+00,1.3535D+00,1.3404D+00,1.3263D+00,1.3096D+00,
+     &1.2927D+00,1.2758D+00,1.2575D+00,1.2422D+00,1.2250D+00,1.2046D+00,
+     &1.1821D+00,1.1579D+00,1.1331D+00,1.1127D+00,1.0905D+00,1.0655D+00,
+     &1.0415D+00,1.0207D+00,1.0042D+00,9.9612D-01,9.9507D-01,1.0089D+00,
+     &1.0451D+00,1.0887D+00,1.1514D+00,1.2146D+00,1.2936D+00,1.3711D+00,
+     &1.4469D+00,1.5220D+00,1.5960D+00,1.6694D+00,1.7428D+00,1.8159D+00,
+     &1.8894D+00,1.9620D+00,2.0344D+00,2.0313D+00,2.1357D+00,2.2333D+00,
+     &2.3215D+00,2.4009D+00,2.4706D+00,2.5292D+00,2.5750D+00,2.6036D+00,
+     &2.6096D+00,2.5783D+00,2.4673D+00,0.0000D+00,1.7269D+00,1.7065D+00/
+      DATA (XDVF_L(K),K=  343,  456) /
+     &1.6866D+00,1.6676D+00,1.6480D+00,1.6279D+00,1.6089D+00,1.5891D+00,
+     &1.5701D+00,1.5502D+00,1.5307D+00,1.5113D+00,1.4910D+00,1.4799D+00,
+     &1.4673D+00,1.4526D+00,1.4373D+00,1.4221D+00,1.4060D+00,1.3922D+00,
+     &1.3771D+00,1.3596D+00,1.3414D+00,1.3234D+00,1.3045D+00,1.2879D+00,
+     &1.2689D+00,1.2468D+00,1.2227D+00,1.1966D+00,1.1706D+00,1.1487D+00,
+     &1.1248D+00,1.0980D+00,1.0724D+00,1.0495D+00,1.0310D+00,1.0212D+00,
+     &1.0181D+00,1.0291D+00,1.0609D+00,1.1002D+00,1.1563D+00,1.2136D+00,
+     &1.2840D+00,1.3528D+00,1.4201D+00,1.4854D+00,1.5492D+00,1.6125D+00,
+     &1.6751D+00,1.7368D+00,1.7981D+00,1.8579D+00,1.9157D+00,1.9057D+00,
+     &1.9875D+00,2.0577D+00,2.1190D+00,2.1700D+00,2.2094D+00,2.2370D+00,
+     &2.2484D+00,2.2403D+00,2.2047D+00,2.1261D+00,1.9567D+00,0.0000D+00,
+     &1.8047D+00,1.7833D+00,1.7626D+00,1.7418D+00,1.7220D+00,1.7009D+00,
+     &1.6810D+00,1.6603D+00,1.6403D+00,1.6193D+00,1.5986D+00,1.5775D+00,
+     &1.5570D+00,1.5441D+00,1.5309D+00,1.5156D+00,1.4991D+00,1.4828D+00,
+     &1.4658D+00,1.4510D+00,1.4350D+00,1.4160D+00,1.3966D+00,1.3772D+00,
+     &1.3565D+00,1.3386D+00,1.3184D+00,1.2942D+00,1.2680D+00,1.2404D+00,
+     &1.2125D+00,1.1887D+00,1.1631D+00,1.1342D+00,1.1064D+00,1.0813D+00,
+     &1.0608D+00,1.0480D+00,1.0426D+00,1.0500D+00,1.0774D+00,1.1111D+00,
+     &1.1608D+00,1.2107D+00,1.2719D+00,1.3315D+00,1.3886D+00,1.4445D+00/
+      DATA (XDVF_L(K),K=  457,  570) /
+     &1.4984D+00,1.5505D+00,1.6020D+00,1.6524D+00,1.7009D+00,1.7480D+00,
+     &1.7926D+00,1.7763D+00,1.8327D+00,1.8794D+00,1.9154D+00,1.9405D+00,
+     &1.9531D+00,1.9537D+00,1.9362D+00,1.8986D+00,1.8325D+00,1.7203D+00,
+     &1.5163D+00,0.0000D+00,1.8755D+00,1.8533D+00,1.8314D+00,1.8106D+00,
+     &1.7890D+00,1.7672D+00,1.7464D+00,1.7248D+00,1.7038D+00,1.6817D+00,
+     &1.6601D+00,1.6385D+00,1.6160D+00,1.6033D+00,1.5889D+00,1.5721D+00,
+     &1.5552D+00,1.5380D+00,1.5199D+00,1.5042D+00,1.4871D+00,1.4670D+00,
+     &1.4463D+00,1.4249D+00,1.4036D+00,1.3843D+00,1.3630D+00,1.3364D+00,
+     &1.3086D+00,1.2791D+00,1.2500D+00,1.2245D+00,1.1971D+00,1.1662D+00,
+     &1.1361D+00,1.1090D+00,1.0858D+00,1.0721D+00,1.0641D+00,1.0676D+00,
+     &1.0898D+00,1.1195D+00,1.1627D+00,1.2069D+00,1.2603D+00,1.3118D+00,
+     &1.3607D+00,1.4079D+00,1.4534D+00,1.4968D+00,1.5392D+00,1.5794D+00,
+     &1.6181D+00,1.6552D+00,1.6888D+00,1.6690D+00,1.7073D+00,1.7353D+00,
+     &1.7530D+00,1.7595D+00,1.7531D+00,1.7338D+00,1.6988D+00,1.6428D+00,
+     &1.5583D+00,1.4293D+00,1.2136D+00,0.0000D+00,1.9470D+00,1.9238D+00,
+     &1.9021D+00,1.8782D+00,1.8570D+00,1.8343D+00,1.8123D+00,1.7898D+00,
+     &1.7680D+00,1.7449D+00,1.7222D+00,1.6994D+00,1.6760D+00,1.6624D+00,
+     &1.6469D+00,1.6299D+00,1.6118D+00,1.5933D+00,1.5742D+00,1.5574D+00,
+     &1.5392D+00,1.5179D+00,1.4955D+00,1.4738D+00,1.4506D+00,1.4300D+00/
+      DATA (XDVF_L(K),K=  571,  684) /
+     &1.4069D+00,1.3792D+00,1.3492D+00,1.3178D+00,1.2868D+00,1.2597D+00,
+     &1.2307D+00,1.1976D+00,1.1654D+00,1.1363D+00,1.1108D+00,1.0945D+00,
+     &1.0840D+00,1.0845D+00,1.1017D+00,1.1268D+00,1.1637D+00,1.2016D+00,
+     &1.2473D+00,1.2910D+00,1.3324D+00,1.3719D+00,1.4090D+00,1.4450D+00,
+     &1.4784D+00,1.5109D+00,1.5404D+00,1.5681D+00,1.5925D+00,1.5689D+00,
+     &1.5916D+00,1.6043D+00,1.6067D+00,1.5981D+00,1.5779D+00,1.5449D+00,
+     &1.4949D+00,1.4262D+00,1.3303D+00,1.1932D+00,9.7657D-01,0.0000D+00,
+     &2.0122D+00,1.9881D+00,1.9640D+00,1.9418D+00,1.9190D+00,1.8954D+00,
+     &1.8721D+00,1.8492D+00,1.8262D+00,1.8024D+00,1.7784D+00,1.7550D+00,
+     &1.7300D+00,1.7157D+00,1.6999D+00,1.6818D+00,1.6627D+00,1.6435D+00,
+     &1.6233D+00,1.6058D+00,1.5866D+00,1.5643D+00,1.5417D+00,1.5178D+00,
+     &1.4926D+00,1.4705D+00,1.4465D+00,1.4174D+00,1.3856D+00,1.3527D+00,
+     &1.3198D+00,1.2914D+00,1.2605D+00,1.2257D+00,1.1915D+00,1.1601D+00,
+     &1.1326D+00,1.1142D+00,1.1016D+00,1.0982D+00,1.1114D+00,1.1321D+00,
+     &1.1637D+00,1.1958D+00,1.2352D+00,1.2722D+00,1.3071D+00,1.3397D+00,
+     &1.3704D+00,1.3995D+00,1.4267D+00,1.4516D+00,1.4736D+00,1.4942D+00,
+     &1.5100D+00,1.4848D+00,1.4955D+00,1.4964D+00,1.4873D+00,1.4675D+00,
+     &1.4366D+00,1.3933D+00,1.3349D+00,1.2585D+00,1.1565D+00,1.0171D+00,
+     &8.0601D-01,0.0000D+00,2.0789D+00,2.0539D+00,2.0294D+00,2.0053D+00/
+      DATA (XDVF_L(K),K=  685,  798) /
+     &1.9820D+00,1.9581D+00,1.9336D+00,1.9096D+00,1.8860D+00,1.8609D+00,
+     &1.8367D+00,1.8106D+00,1.7860D+00,1.7706D+00,1.7543D+00,1.7350D+00,
+     &1.7150D+00,1.6945D+00,1.6735D+00,1.6550D+00,1.6349D+00,1.6112D+00,
+     &1.5864D+00,1.5617D+00,1.5356D+00,1.5128D+00,1.4868D+00,1.4555D+00,
+     &1.4224D+00,1.3876D+00,1.3532D+00,1.3231D+00,1.2904D+00,1.2536D+00,
+     &1.2173D+00,1.1838D+00,1.1545D+00,1.1338D+00,1.1185D+00,1.1113D+00,
+     &1.1199D+00,1.1362D+00,1.1627D+00,1.1895D+00,1.2222D+00,1.2529D+00,
+     &1.2813D+00,1.3080D+00,1.3324D+00,1.3546D+00,1.3756D+00,1.3938D+00,
+     &1.4103D+00,1.4232D+00,1.4319D+00,1.4055D+00,1.4052D+00,1.3959D+00,
+     &1.3768D+00,1.3480D+00,1.3084D+00,1.2576D+00,1.1928D+00,1.1110D+00,
+     &1.0066D+00,8.6804D-01,6.6615D-01,0.0000D+00,2.1434D+00,2.1178D+00,
+     &2.0930D+00,2.0676D+00,2.0440D+00,2.0184D+00,1.9935D+00,1.9686D+00,
+     &1.9439D+00,1.9179D+00,1.8915D+00,1.8663D+00,1.8400D+00,1.8239D+00,
+     &1.8067D+00,1.7863D+00,1.7654D+00,1.7440D+00,1.7219D+00,1.7025D+00,
+     &1.6814D+00,1.6565D+00,1.6311D+00,1.6045D+00,1.5766D+00,1.5526D+00,
+     &1.5250D+00,1.4925D+00,1.4574D+00,1.4213D+00,1.3849D+00,1.3532D+00,
+     &1.3191D+00,1.2800D+00,1.2418D+00,1.2062D+00,1.1743D+00,1.1517D+00,
+     &1.1338D+00,1.1237D+00,1.1272D+00,1.1399D+00,1.1608D+00,1.1828D+00,
+     &1.2092D+00,1.2341D+00,1.2570D+00,1.2774D+00,1.2962D+00,1.3135D+00/
+      DATA (XDVF_L(K),K=  799,  912) /
+     &1.3280D+00,1.3406D+00,1.3511D+00,1.3588D+00,1.3613D+00,1.3335D+00,
+     &1.3246D+00,1.3067D+00,1.2801D+00,1.2441D+00,1.1985D+00,1.1418D+00,
+     &1.0724D+00,9.8806D-01,8.8293D-01,7.4746D-01,5.5665D-01,0.0000D+00,
+     &2.2035D+00,2.1769D+00,2.1514D+00,2.1259D+00,2.1000D+00,2.0743D+00,
+     &2.0488D+00,2.0226D+00,1.9973D+00,1.9702D+00,1.9428D+00,1.9166D+00,
+     &1.8890D+00,1.8729D+00,1.8548D+00,1.8337D+00,1.8116D+00,1.7895D+00,
+     &1.7662D+00,1.7461D+00,1.7239D+00,1.6980D+00,1.6714D+00,1.6436D+00,
+     &1.6146D+00,1.5889D+00,1.5604D+00,1.5266D+00,1.4895D+00,1.4515D+00,
+     &1.4138D+00,1.3806D+00,1.3448D+00,1.3040D+00,1.2638D+00,1.2261D+00,
+     &1.1920D+00,1.1669D+00,1.1469D+00,1.1341D+00,1.1335D+00,1.1420D+00,
+     &1.1583D+00,1.1760D+00,1.1971D+00,1.2168D+00,1.2343D+00,1.2501D+00,
+     &1.2640D+00,1.2762D+00,1.2866D+00,1.2942D+00,1.2996D+00,1.3020D+00,
+     &1.3003D+00,1.2725D+00,1.2557D+00,1.2312D+00,1.1982D+00,1.1569D+00,
+     &1.1068D+00,1.0465D+00,9.7460D-01,8.8884D-01,7.8459D-01,6.5333D-01,
+     &4.7359D-01,0.0000D+00,2.2800D+00,2.2524D+00,2.2256D+00,2.1987D+00,
+     &2.1730D+00,2.1459D+00,2.1192D+00,2.0922D+00,2.0656D+00,2.0374D+00,
+     &2.0100D+00,1.9802D+00,1.9520D+00,1.9346D+00,1.9156D+00,1.8937D+00,
+     &1.8706D+00,1.8475D+00,1.8228D+00,1.8017D+00,1.7783D+00,1.7509D+00,
+     &1.7221D+00,1.6937D+00,1.6627D+00,1.6354D+00,1.6050D+00,1.5688D+00/
+      DATA (XDVF_L(K),K=  913, 1026) /
+     &1.5301D+00,1.4898D+00,1.4503D+00,1.4150D+00,1.3772D+00,1.3339D+00,
+     &1.2911D+00,1.2510D+00,1.2138D+00,1.1866D+00,1.1637D+00,1.1458D+00,
+     &1.1403D+00,1.1441D+00,1.1548D+00,1.1669D+00,1.1817D+00,1.1950D+00,
+     &1.2065D+00,1.2163D+00,1.2249D+00,1.2313D+00,1.2355D+00,1.2379D+00,
+     &1.2379D+00,1.2348D+00,1.2275D+00,1.1987D+00,1.1744D+00,1.1427D+00,
+     &1.1035D+00,1.0570D+00,1.0018D+00,9.3862D-01,8.6494D-01,7.7913D-01,
+     &6.7747D-01,5.5266D-01,3.8741D-01,0.0000D+00,2.3524D+00,2.3243D+00,
+     &2.2963D+00,2.2689D+00,2.2420D+00,2.2137D+00,2.1858D+00,2.1579D+00,
+     &2.1301D+00,2.1011D+00,2.0718D+00,2.0424D+00,2.0120D+00,1.9937D+00,
+     &1.9743D+00,1.9509D+00,1.9267D+00,1.9020D+00,1.8763D+00,1.8541D+00,
+     &1.8295D+00,1.8006D+00,1.7713D+00,1.7402D+00,1.7077D+00,1.6794D+00,
+     &1.6475D+00,1.6087D+00,1.5679D+00,1.5259D+00,1.4840D+00,1.4470D+00,
+     &1.4072D+00,1.3615D+00,1.3163D+00,1.2738D+00,1.2336D+00,1.2045D+00,
+     &1.1783D+00,1.1563D+00,1.1459D+00,1.1457D+00,1.1504D+00,1.1577D+00,
+     &1.1662D+00,1.1742D+00,1.1807D+00,1.1857D+00,1.1886D+00,1.1902D+00,
+     &1.1899D+00,1.1878D+00,1.1830D+00,1.1751D+00,1.1633D+00,1.1345D+00,
+     &1.1039D+00,1.0667D+00,1.0230D+00,9.7228D-01,9.1417D-01,8.4905D-01,
+     &7.7478D-01,6.9004D-01,5.9155D-01,4.7371D-01,3.2191D-01,0.0000D+00,
+     &2.4233D+00,2.3947D+00,2.3653D+00,2.3365D+00,2.3090D+00,2.2800D+00/
+      DATA (XDVF_L(K),K= 1027, 1140) /
+     &2.2512D+00,2.2220D+00,2.1934D+00,2.1628D+00,2.1319D+00,2.1007D+00,
+     &2.0700D+00,2.0512D+00,2.0301D+00,2.0057D+00,1.9809D+00,1.9549D+00,
+     &1.9281D+00,1.9049D+00,1.8791D+00,1.8497D+00,1.8175D+00,1.7854D+00,
+     &1.7507D+00,1.7209D+00,1.6878D+00,1.6474D+00,1.6047D+00,1.5603D+00,
+     &1.5164D+00,1.4777D+00,1.4358D+00,1.3879D+00,1.3403D+00,1.2952D+00,
+     &1.2523D+00,1.2206D+00,1.1913D+00,1.1661D+00,1.1505D+00,1.1462D+00,
+     &1.1460D+00,1.1481D+00,1.1518D+00,1.1545D+00,1.1559D+00,1.1562D+00,
+     &1.1548D+00,1.1523D+00,1.1478D+00,1.1414D+00,1.1331D+00,1.1212D+00,
+     &1.1055D+00,1.0763D+00,1.0405D+00,9.9877D-01,9.5130D-01,8.9815D-01,
+     &8.3813D-01,7.7188D-01,6.9792D-01,6.1492D-01,5.2020D-01,4.0920D-01,
+     &2.7020D-01,0.0000D+00,2.4906D+00,2.4607D+00,2.4307D+00,2.4014D+00,
+     &2.3730D+00,2.3427D+00,2.3127D+00,2.2828D+00,2.2528D+00,2.2213D+00,
+     &2.1903D+00,2.1577D+00,2.1250D+00,2.1053D+00,2.0839D+00,2.0583D+00,
+     &2.0318D+00,2.0051D+00,1.9771D+00,1.9527D+00,1.9259D+00,1.8935D+00,
+     &1.8607D+00,1.8269D+00,1.7917D+00,1.7606D+00,1.7253D+00,1.6833D+00,
+     &1.6387D+00,1.5925D+00,1.5465D+00,1.5061D+00,1.4624D+00,1.4121D+00,
+     &1.3623D+00,1.3152D+00,1.2700D+00,1.2349D+00,1.2036D+00,1.1745D+00,
+     &1.1544D+00,1.1457D+00,1.1410D+00,1.1389D+00,1.1378D+00,1.1357D+00,
+     &1.1332D+00,1.1290D+00,1.1244D+00,1.1176D+00,1.1099D+00,1.0996D+00/
+      DATA (XDVF_L(K),K= 1141, 1254) /
+     &1.0875D+00,1.0729D+00,1.0538D+00,1.0249D+00,9.8511D-01,9.3994D-01,
+     &8.8948D-01,8.3410D-01,7.7332D-01,7.0681D-01,6.3377D-01,5.5280D-01,
+     &4.6214D-01,3.5755D-01,2.2965D-01,0.0000D+00,2.5589D+00,2.5291D+00,
+     &2.4979D+00,2.4676D+00,2.4370D+00,2.4060D+00,2.3753D+00,2.3443D+00,
+     &2.3135D+00,2.2809D+00,2.2486D+00,2.2146D+00,2.1810D+00,2.1602D+00,
+     &2.1376D+00,2.1114D+00,2.0841D+00,2.0557D+00,2.0265D+00,2.0011D+00,
+     &1.9730D+00,1.9392D+00,1.9055D+00,1.8697D+00,1.8327D+00,1.8003D+00,
+     &1.7635D+00,1.7197D+00,1.6727D+00,1.6246D+00,1.5770D+00,1.5346D+00,
+     &1.4890D+00,1.4363D+00,1.3841D+00,1.3341D+00,1.2867D+00,1.2492D+00,
+     &1.2151D+00,1.1824D+00,1.1578D+00,1.1451D+00,1.1356D+00,1.1298D+00,
+     &1.1233D+00,1.1169D+00,1.1105D+00,1.1027D+00,1.0940D+00,1.0840D+00,
+     &1.0726D+00,1.0592D+00,1.0444D+00,1.0265D+00,1.0045D+00,9.7613D-01,
+     &9.3249D-01,8.8451D-01,8.3193D-01,7.7510D-01,7.1373D-01,6.4749D-01,
+     &5.7554D-01,4.9725D-01,4.1072D-01,3.1254D-01,1.9551D-01,0.0000D+00,
+     &2.6244D+00,2.5927D+00,2.5615D+00,2.5299D+00,2.4990D+00,2.4671D+00,
+     &2.4356D+00,2.4034D+00,2.3717D+00,2.3377D+00,2.3034D+00,2.2689D+00,
+     &2.2340D+00,2.2126D+00,2.1892D+00,2.1616D+00,2.1331D+00,2.1040D+00,
+     &2.0736D+00,2.0471D+00,2.0180D+00,1.9830D+00,1.9472D+00,1.9112D+00,
+     &1.8717D+00,1.8375D+00,1.7996D+00,1.7538D+00,1.7053D+00,1.6548D+00/
+      DATA (XDVF_L(K),K= 1255, 1368) /
+     &1.6053D+00,1.5612D+00,1.5138D+00,1.4590D+00,1.4045D+00,1.3516D+00,
+     &1.3023D+00,1.2626D+00,1.2251D+00,1.1889D+00,1.1601D+00,1.1441D+00,
+     &1.1302D+00,1.1201D+00,1.1098D+00,1.0996D+00,1.0888D+00,1.0782D+00,
+     &1.0659D+00,1.0531D+00,1.0388D+00,1.0228D+00,1.0047D+00,9.8480D-01,
+     &9.6040D-01,9.3234D-01,8.8589D-01,8.3563D-01,7.8162D-01,7.2366D-01,
+     &6.6215D-01,5.9658D-01,5.2617D-01,4.5043D-01,3.6787D-01,2.7575D-01,
+     &1.6826D-01,0.0000D+00,2.6886D+00,2.6564D+00,2.6234D+00,2.5908D+00,
+     &2.5600D+00,2.5268D+00,2.4943D+00,2.4612D+00,2.4283D+00,2.3924D+00,
+     &2.3582D+00,2.3219D+00,2.2860D+00,2.2642D+00,2.2394D+00,2.2113D+00,
+     &2.1817D+00,2.1512D+00,2.1198D+00,2.0920D+00,2.0618D+00,2.0268D+00,
+     &1.9890D+00,1.9503D+00,1.9098D+00,1.8739D+00,1.8343D+00,1.7867D+00,
+     &1.7365D+00,1.6843D+00,1.6329D+00,1.5870D+00,1.5377D+00,1.4807D+00,
+     &1.4239D+00,1.3692D+00,1.3169D+00,1.2751D+00,1.2350D+00,1.1954D+00,
+     &1.1624D+00,1.1425D+00,1.1247D+00,1.1110D+00,1.0963D+00,1.0827D+00,
+     &1.0687D+00,1.0547D+00,1.0396D+00,1.0240D+00,1.0070D+00,9.8853D-01,
+     &9.6834D-01,9.4569D-01,9.1962D-01,8.9220D-01,8.4321D-01,7.9105D-01,
+     &7.3592D-01,6.7777D-01,6.1620D-01,5.5143D-01,4.8272D-01,4.0962D-01,
+     &3.3102D-01,2.4455D-01,1.4574D-01,0.0000D+00,2.7496D+00,2.7153D+00,
+     &2.6835D+00,2.6504D+00,2.6180D+00,2.5834D+00,2.5502D+00,2.5161D+00/
+      DATA (XDVF_L(K),K= 1369, 1482) /
+     &2.4824D+00,2.4466D+00,2.4095D+00,2.3736D+00,2.3360D+00,2.3124D+00,
+     &2.2875D+00,2.2580D+00,2.2274D+00,2.1960D+00,2.1631D+00,2.1347D+00,
+     &2.1032D+00,2.0670D+00,2.0277D+00,1.9882D+00,1.9458D+00,1.9086D+00,
+     &1.8675D+00,1.8179D+00,1.7658D+00,1.7122D+00,1.6586D+00,1.6112D+00,
+     &1.5600D+00,1.5010D+00,1.4420D+00,1.3855D+00,1.3294D+00,1.2858D+00,
+     &1.2435D+00,1.2006D+00,1.1641D+00,1.1410D+00,1.1193D+00,1.1023D+00,
+     &1.0837D+00,1.0664D+00,1.0496D+00,1.0329D+00,1.0157D+00,9.9745D-01,
+     &9.7803D-01,9.5735D-01,9.3539D-01,9.1075D-01,8.8302D-01,8.5608D-01,
+     &8.0509D-01,7.5168D-01,6.9580D-01,6.3743D-01,5.7619D-01,5.1233D-01,
+     &4.4547D-01,3.7496D-01,2.9995D-01,2.1862D-01,1.2745D-01,0.0000D+00,
+     &2.8331D+00,2.7978D+00,2.7648D+00,2.7299D+00,2.6960D+00,2.6609D+00,
+     &2.6263D+00,2.5910D+00,2.5561D+00,2.5197D+00,2.4802D+00,2.4424D+00,
+     &2.4030D+00,2.3791D+00,2.3526D+00,2.3216D+00,2.2897D+00,2.2570D+00,
+     &2.2225D+00,2.1925D+00,2.1595D+00,2.1199D+00,2.0799D+00,2.0383D+00,
+     &1.9938D+00,1.9551D+00,1.9121D+00,1.8601D+00,1.8054D+00,1.7494D+00,
+     &1.6932D+00,1.6435D+00,1.5898D+00,1.5280D+00,1.4659D+00,1.4056D+00,
+     &1.3471D+00,1.3010D+00,1.2550D+00,1.2078D+00,1.1652D+00,1.1383D+00,
+     &1.1114D+00,1.0902D+00,1.0668D+00,1.0451D+00,1.0248D+00,1.0039D+00,
+     &9.8353D-01,9.6205D-01,9.4076D-01,9.1705D-01,8.9229D-01,8.6577D-01/
+      DATA (XDVF_L(K),K= 1483, 1596) /
+     &8.3604D-01,8.0985D-01,7.5687D-01,7.0190D-01,6.4516D-01,5.8700D-01,
+     &5.2660D-01,4.6452D-01,3.9995D-01,3.3310D-01,2.6289D-01,1.8826D-01,
+     &1.0655D-01,0.0000D+00,2.9096D+00,2.8732D+00,2.8390D+00,2.8027D+00,
+     &2.7690D+00,2.7325D+00,2.6961D+00,2.6597D+00,2.6231D+00,2.5833D+00,
+     &2.5456D+00,2.5047D+00,2.4650D+00,2.4391D+00,2.4120D+00,2.3799D+00,
+     &2.3462D+00,2.3123D+00,2.2763D+00,2.2451D+00,2.2108D+00,2.1692D+00,
+     &2.1276D+00,2.0835D+00,2.0378D+00,1.9974D+00,1.9525D+00,1.8983D+00,
+     &1.8413D+00,1.7827D+00,1.7243D+00,1.6725D+00,1.6166D+00,1.5520D+00,
+     &1.4872D+00,1.4244D+00,1.3627D+00,1.3136D+00,1.2649D+00,1.2130D+00,
+     &1.1663D+00,1.1352D+00,1.1040D+00,1.0787D+00,1.0514D+00,1.0264D+00,
+     &1.0021D+00,9.7883D-01,9.5548D-01,9.3171D-01,9.0763D-01,8.8283D-01,
+     &8.5596D-01,8.2732D-01,7.9601D-01,7.7056D-01,7.1598D-01,6.6027D-01,
+     &6.0340D-01,5.4514D-01,4.8601D-01,4.2556D-01,3.6359D-01,2.9984D-01,
+     &2.3396D-01,1.6486D-01,9.0844D-02,0.0000D+00,2.9880D+00,2.9510D+00,
+     &2.9150D+00,2.8782D+00,2.8430D+00,2.8048D+00,2.7677D+00,2.7301D+00,
+     &2.6924D+00,2.6517D+00,2.6110D+00,2.5696D+00,2.5280D+00,2.5017D+00,
+     &2.4728D+00,2.4393D+00,2.4042D+00,2.3687D+00,2.3313D+00,2.2988D+00,
+     &2.2631D+00,2.2204D+00,2.1768D+00,2.1312D+00,2.0828D+00,2.0405D+00,
+     &1.9928D+00,1.9364D+00,1.8772D+00,1.8164D+00,1.7558D+00,1.7018D+00/
+      DATA (XDVF_L(K),K= 1597, 1710) /
+     &1.6434D+00,1.5762D+00,1.5084D+00,1.4432D+00,1.3783D+00,1.3261D+00,
+     &1.2741D+00,1.2182D+00,1.1669D+00,1.1315D+00,1.0961D+00,1.0671D+00,
+     &1.0360D+00,1.0071D+00,9.7992D-01,9.5371D-01,9.2801D-01,9.0200D-01,
+     &8.7588D-01,8.4862D-01,8.2038D-01,7.9020D-01,7.5770D-01,7.3298D-01,
+     &6.7721D-01,6.2090D-01,5.6394D-01,5.0631D-01,4.4841D-01,3.8970D-01,
+     &3.3019D-01,2.6973D-01,2.0791D-01,1.4420D-01,7.7416D-02,0.0000D+00,
+     &3.0661D+00,3.0288D+00,2.9911D+00,2.9537D+00,2.9160D+00,2.8778D+00,
+     &2.8392D+00,2.8000D+00,2.7610D+00,2.7200D+00,2.6782D+00,2.6345D+00,
+     &2.5900D+00,2.5625D+00,2.5329D+00,2.4982D+00,2.4617D+00,2.4247D+00,
+     &2.3857D+00,2.3518D+00,2.3145D+00,2.2697D+00,2.2245D+00,2.1764D+00,
+     &2.1269D+00,2.0819D+00,2.0331D+00,1.9746D+00,1.9126D+00,1.8497D+00,
+     &1.7862D+00,1.7303D+00,1.6696D+00,1.5995D+00,1.5285D+00,1.4608D+00,
+     &1.3929D+00,1.3377D+00,1.2826D+00,1.2228D+00,1.1669D+00,1.1279D+00,
+     &1.0882D+00,1.0555D+00,1.0205D+00,9.8876D-01,9.5876D-01,9.2969D-01,
+     &9.0171D-01,8.7356D-01,8.4551D-01,8.1668D-01,7.8701D-01,7.5564D-01,
+     &7.2196D-01,6.9797D-01,6.4121D-01,5.8469D-01,5.2810D-01,4.7131D-01,
+     &4.1460D-01,3.5783D-01,3.0063D-01,2.4338D-01,1.8544D-01,1.2660D-01,
+     &6.6270D-02,0.0000D+00,3.1379D+00,3.0995D+00,3.0600D+00,3.0213D+00,
+     &2.9840D+00,2.9442D+00,2.9047D+00,2.8641D+00,2.8239D+00,2.7813D+00/
+      DATA (XDVF_L(K),K= 1711, 1824) /
+     &2.7383D+00,2.6928D+00,2.6470D+00,2.6191D+00,2.5880D+00,2.5519D+00,
+     &2.5145D+00,2.4761D+00,2.4357D+00,2.4004D+00,2.3615D+00,2.3153D+00,
+     &2.2678D+00,2.2180D+00,2.1669D+00,2.1208D+00,2.0699D+00,2.0087D+00,
+     &1.9447D+00,1.8795D+00,1.8139D+00,1.7558D+00,1.6930D+00,1.6205D+00,
+     &1.5467D+00,1.4759D+00,1.4054D+00,1.3484D+00,1.2895D+00,1.2267D+00,
+     &1.1663D+00,1.1242D+00,1.0808D+00,1.0449D+00,1.0065D+00,9.7194D-01,
+     &9.3967D-01,9.0840D-01,8.7834D-01,8.4891D-01,8.1928D-01,7.8930D-01,
+     &7.5803D-01,7.2562D-01,6.9124D-01,6.6796D-01,6.1058D-01,5.5392D-01,
+     &4.9752D-01,4.4176D-01,3.8633D-01,3.3127D-01,2.7648D-01,2.2186D-01,
+     &1.6735D-01,1.1268D-01,5.7652D-02,0.0000D+00,3.2129D+00,3.1726D+00,
+     &3.1325D+00,3.0928D+00,3.0540D+00,3.0127D+00,2.9717D+00,2.9303D+00,
+     &2.8887D+00,2.8449D+00,2.8001D+00,2.7537D+00,2.7060D+00,2.6766D+00,
+     &2.6453D+00,2.6073D+00,2.5683D+00,2.5286D+00,2.4866D+00,2.4501D+00,
+     &2.4107D+00,2.3628D+00,2.3125D+00,2.2620D+00,2.2079D+00,2.1597D+00,
+     &2.1067D+00,2.0440D+00,1.9778D+00,1.9097D+00,1.8421D+00,1.7819D+00,
+     &1.7169D+00,1.6416D+00,1.5664D+00,1.4922D+00,1.4189D+00,1.3583D+00,
+     &1.2971D+00,1.2300D+00,1.1652D+00,1.1200D+00,1.0729D+00,1.0343D+00,
+     &9.9254D-01,9.5513D-01,9.2006D-01,8.8711D-01,8.5555D-01,8.2426D-01,
+     &7.9305D-01,7.6193D-01,7.2963D-01,6.9636D-01,6.6128D-01,6.3868D-01/
+      DATA (XDVF_L(K),K= 1825, 1836) /
+     &5.8093D-01,5.2428D-01,4.6858D-01,4.1372D-01,3.5972D-01,3.0648D-01,
+     &2.5392D-01,2.0208D-01,1.5083D-01,1.0018D-01,5.0068D-02,0.0000D+00/
+      DATA (XDEF_L(K),K=    1,  114) /
+     &4.3007D-01,4.2474D-01,4.1967D-01,4.1458D-01,4.0970D-01,4.0443D-01,
+     &3.9925D-01,3.9397D-01,3.8864D-01,3.8302D-01,3.7707D-01,3.7100D-01,
+     &3.6470D-01,3.6080D-01,3.5639D-01,3.5109D-01,3.4531D-01,3.3914D-01,
+     &3.3238D-01,3.2609D-01,3.1913D-01,3.1062D-01,3.0152D-01,2.9176D-01,
+     &2.8100D-01,2.7114D-01,2.5952D-01,2.4467D-01,2.2784D-01,2.0937D-01,
+     &1.9117D-01,1.7470D-01,1.5685D-01,1.3678D-01,1.1825D-01,1.0349D-01,
+     &9.4854D-02,9.5054D-02,1.0589D-01,1.3527D-01,1.8584D-01,2.3426D-01,
+     &2.9021D-01,3.3527D-01,3.7670D-01,4.0255D-01,4.1326D-01,4.0880D-01,
+     &3.8831D-01,3.5045D-01,2.9287D-01,2.1298D-01,1.0773D-01,0.0000D+00,
+     &0.0000D+00,2.0644D-01,1.5422D-01,1.0950D-01,7.3614D-02,4.6726D-02,
+     &2.7433D-02,1.4144D-02,6.5080D-03,2.4719D-03,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,4.4398D-01,4.3864D-01,4.3346D-01,4.2809D-01,
+     &4.2290D-01,4.1747D-01,4.1205D-01,4.0650D-01,4.0098D-01,3.9480D-01,
+     &3.8873D-01,3.8226D-01,3.7560D-01,3.7145D-01,3.6678D-01,3.6108D-01,
+     &3.5488D-01,3.4833D-01,3.4123D-01,3.3464D-01,3.2718D-01,3.1811D-01,
+     &3.0838D-01,2.9811D-01,2.8670D-01,2.7630D-01,2.6412D-01,2.4861D-01,
+     &2.3110D-01,2.1209D-01,1.9355D-01,1.7681D-01,1.5878D-01,1.3870D-01,
+     &1.2044D-01,1.0620D-01,9.8341D-02,9.9345D-02,1.1086D-01,1.4055D-01,
+     &1.9033D-01,2.3696D-01,2.8983D-01,3.3137D-01,3.6834D-01,3.8982D-01/
+      DATA (XDEF_L(K),K=  115,  228) /
+     &3.9672D-01,3.8896D-01,3.6609D-01,3.2678D-01,2.6933D-01,1.9181D-01,
+     &9.1683D-02,0.0000D+00,0.0000D+00,1.8955D-01,1.4041D-01,9.8873D-02,
+     &6.5928D-02,4.1462D-02,2.3905D-02,1.2324D-02,5.6113D-03,2.1050D-03,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,4.5980D-01,4.5420D-01,
+     &4.4884D-01,4.4319D-01,4.3780D-01,4.3208D-01,4.2642D-01,4.2053D-01,
+     &4.1457D-01,4.0824D-01,4.0181D-01,3.9484D-01,3.8780D-01,3.8328D-01,
+     &3.7831D-01,3.7223D-01,3.6559D-01,3.5853D-01,3.5072D-01,3.4400D-01,
+     &3.3590D-01,3.2633D-01,3.1598D-01,3.0508D-01,2.9301D-01,2.8197D-01,
+     &2.6915D-01,2.5289D-01,2.3470D-01,2.1511D-01,1.9623D-01,1.7918D-01,
+     &1.6098D-01,1.4092D-01,1.2294D-01,1.0928D-01,1.0224D-01,1.0401D-01,
+     &1.1623D-01,1.4620D-01,1.9488D-01,2.3948D-01,2.8894D-01,3.2681D-01,
+     &3.5905D-01,3.7613D-01,3.7908D-01,3.6817D-01,3.4299D-01,3.0266D-01,
+     &2.4596D-01,1.7115D-01,7.6792D-02,0.0000D+00,0.0000D+00,1.7267D-01,
+     &1.2670D-01,8.8446D-02,5.8458D-02,3.6380D-02,2.0551D-02,1.0608D-02,
+     &4.7732D-03,1.7670D-03,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &4.7845D-01,4.7258D-01,4.6687D-01,4.6107D-01,4.5540D-01,4.4938D-01,
+     &4.4336D-01,4.3728D-01,4.3070D-01,4.2403D-01,4.1702D-01,4.0968D-01,
+     &4.0210D-01,3.9723D-01,3.9181D-01,3.8522D-01,3.7808D-01,3.7047D-01,
+     &3.6211D-01,3.5469D-01,3.4619D-01,3.3582D-01,3.2478D-01,3.1314D-01/
+      DATA (XDEF_L(K),K=  229,  342) /
+     &3.0021D-01,2.8848D-01,2.7488D-01,2.5781D-01,2.3886D-01,2.1865D-01,
+     &1.9932D-01,1.8196D-01,1.6359D-01,1.4359D-01,1.2596D-01,1.1295D-01,
+     &1.0678D-01,1.0933D-01,1.2234D-01,1.5242D-01,1.9969D-01,2.4187D-01,
+     &2.8742D-01,3.2112D-01,3.4825D-01,3.6067D-01,3.5959D-01,3.4546D-01,
+     &3.1813D-01,2.7719D-01,2.2151D-01,1.5037D-01,6.2862D-02,0.0000D+00,
+     &0.0000D+00,1.5516D-01,1.1270D-01,7.7856D-02,5.0916D-02,3.1337D-02,
+     &1.7279D-02,8.9355D-03,3.9672D-03,1.4465D-03,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,5.0059D-01,4.9450D-01,4.8826D-01,4.8213D-01,
+     &4.7610D-01,4.6972D-01,4.6326D-01,4.5655D-01,4.4999D-01,4.4265D-01,
+     &4.3505D-01,4.2703D-01,4.1870D-01,4.1345D-01,4.0758D-01,4.0034D-01,
+     &3.9260D-01,3.8434D-01,3.7539D-01,3.6725D-01,3.5804D-01,3.4696D-01,
+     &3.3492D-01,3.2231D-01,3.0852D-01,2.9601D-01,2.8154D-01,2.6348D-01,
+     &2.4363D-01,2.2272D-01,2.0295D-01,1.8526D-01,1.6669D-01,1.4678D-01,
+     &1.2956D-01,1.1726D-01,1.1212D-01,1.1548D-01,1.2910D-01,1.5906D-01,
+     &2.0458D-01,2.4395D-01,2.8508D-01,3.1418D-01,3.3593D-01,3.4343D-01,
+     &3.3827D-01,3.2104D-01,2.9189D-01,2.5067D-01,1.9688D-01,1.3016D-01,
+     &5.0498D-02,0.0000D+00,0.0000D+00,1.3742D-01,9.8602D-02,6.7357D-02,
+     &4.3555D-02,2.6444D-02,1.4175D-02,7.3561D-03,3.2181D-03,1.1530D-03,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,5.2114D-01,5.1454D-01/
+      DATA (XDEF_L(K),K=  343,  456) /
+     &5.0806D-01,5.0160D-01,4.9520D-01,4.8843D-01,4.8165D-01,4.7456D-01,
+     &4.6738D-01,4.5962D-01,4.5149D-01,4.4293D-01,4.3400D-01,4.2833D-01,
+     &4.2194D-01,4.1420D-01,4.0580D-01,3.9678D-01,3.8741D-01,3.7848D-01,
+     &3.6878D-01,3.5682D-01,3.4416D-01,3.3062D-01,3.1602D-01,3.0269D-01,
+     &2.8749D-01,2.6857D-01,2.4798D-01,2.2641D-01,2.0626D-01,1.8828D-01,
+     &1.6960D-01,1.4976D-01,1.3293D-01,1.2126D-01,1.1684D-01,1.2099D-01,
+     &1.3505D-01,1.6471D-01,2.0841D-01,2.4521D-01,2.8248D-01,3.0770D-01,
+     &3.2484D-01,3.2845D-01,3.1999D-01,3.0047D-01,2.7030D-01,2.2924D-01,
+     &1.7739D-01,1.1482D-01,4.2174D-02,0.0000D+00,0.0000D+00,1.2330D-01,
+     &8.7586D-02,5.9211D-02,3.7890D-02,2.2733D-02,1.1877D-02,6.1865D-03,
+     &2.6713D-03,9.4247D-04,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &5.4423D-01,5.3740D-01,5.3068D-01,5.2385D-01,5.1700D-01,5.0982D-01,
+     &5.0256D-01,4.9509D-01,4.8731D-01,4.7895D-01,4.7023D-01,4.6094D-01,
+     &4.5130D-01,4.4506D-01,4.3820D-01,4.2973D-01,4.2069D-01,4.1108D-01,
+     &4.0069D-01,3.9131D-01,3.8063D-01,3.6796D-01,3.5430D-01,3.3991D-01,
+     &3.2433D-01,3.1014D-01,2.9407D-01,2.7418D-01,2.5281D-01,2.3056D-01,
+     &2.0999D-01,1.9171D-01,1.7291D-01,1.5321D-01,1.3677D-01,1.2578D-01,
+     &1.2220D-01,1.2696D-01,1.4132D-01,1.7056D-01,2.1212D-01,2.4603D-01,
+     &2.7912D-01,3.0023D-01,3.1274D-01,3.1234D-01,3.0087D-01,2.7925D-01/
+      DATA (XDEF_L(K),K=  457,  570) /
+     &2.4820D-01,2.0782D-01,1.5841D-01,1.0056D-01,3.5470D-02,0.0000D+00,
+     &0.0000D+00,1.0941D-01,7.6864D-02,5.1391D-02,3.2506D-02,1.9250D-02,
+     &9.7741D-03,5.1192D-03,2.1775D-03,0.0000D+00,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,5.6542D-01,5.5814D-01,5.5101D-01,5.4385D-01,
+     &5.3670D-01,5.2913D-01,5.2140D-01,5.1352D-01,5.0533D-01,4.9639D-01,
+     &4.8702D-01,4.7710D-01,4.6670D-01,4.6011D-01,4.5270D-01,4.4365D-01,
+     &4.3394D-01,4.2383D-01,4.1271D-01,4.0253D-01,3.9137D-01,3.7783D-01,
+     &3.6325D-01,3.4810D-01,3.3163D-01,3.1674D-01,2.9988D-01,2.7922D-01,
+     &2.5706D-01,2.3429D-01,2.1333D-01,1.9484D-01,1.7592D-01,1.5634D-01,
+     &1.4028D-01,1.2985D-01,1.2692D-01,1.3218D-01,1.4678D-01,1.7535D-01,
+     &2.1492D-01,2.4628D-01,2.7582D-01,2.9349D-01,3.0215D-01,2.9865D-01,
+     &2.8479D-01,2.6176D-01,2.3025D-01,1.9073D-01,1.4372D-01,9.0030D-02,
+     &3.1431D-02,0.0000D+00,0.0000D+00,9.8561D-02,6.8571D-02,4.5400D-02,
+     &2.8439D-02,1.6650D-02,8.2414D-03,4.3377D-03,1.8226D-03,0.0000D+00,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,5.8660D-01,5.7912D-01,
+     &5.7170D-01,5.6412D-01,5.5660D-01,5.4858D-01,5.4040D-01,5.3194D-01,
+     &5.2336D-01,5.1383D-01,5.0381D-01,4.9326D-01,4.8220D-01,4.7515D-01,
+     &4.6719D-01,4.5756D-01,4.4719D-01,4.3619D-01,4.2441D-01,4.1376D-01,
+     &4.0188D-01,3.8750D-01,3.7220D-01,3.5617D-01,3.3884D-01,3.2317D-01/
+      DATA (XDEF_L(K),K=  571,  684) /
+     &3.0561D-01,2.8413D-01,2.6132D-01,2.3801D-01,2.1667D-01,1.9794D-01,
+     &1.7898D-01,1.5951D-01,1.4381D-01,1.3395D-01,1.3154D-01,1.3722D-01,
+     &1.5183D-01,1.7978D-01,2.1726D-01,2.4615D-01,2.7227D-01,2.8668D-01,
+     &2.9185D-01,2.8560D-01,2.6981D-01,2.4566D-01,2.1405D-01,1.7560D-01,
+     &1.3093D-01,8.1317D-02,2.8821D-02,0.0000D+00,0.0000D+00,8.9016D-02,
+     &6.1335D-02,4.0241D-02,2.4960D-02,1.4451D-02,6.9787D-03,3.6912D-03,
+     &1.5320D-03,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &6.0621D-01,5.9821D-01,5.9043D-01,5.8253D-01,5.7470D-01,5.6625D-01,
+     &5.5768D-01,5.4870D-01,5.3948D-01,5.2962D-01,5.1919D-01,5.0796D-01,
+     &4.9620D-01,4.8867D-01,4.8027D-01,4.7003D-01,4.5907D-01,4.4740D-01,
+     &4.3484D-01,4.2392D-01,4.1127D-01,3.9627D-01,3.8010D-01,3.6326D-01,
+     &3.4524D-01,3.2900D-01,3.1064D-01,2.8853D-01,2.6510D-01,2.4135D-01,
+     &2.1970D-01,2.0080D-01,1.8175D-01,1.6242D-01,1.4701D-01,1.3753D-01,
+     &1.3572D-01,1.4160D-01,1.5623D-01,1.8343D-01,2.1902D-01,2.4571D-01,
+     &2.6885D-01,2.8059D-01,2.8292D-01,2.7441D-01,2.5704D-01,2.3223D-01,
+     &2.0062D-01,1.6317D-01,1.2079D-01,7.4733D-02,2.7461D-02,0.0000D+00,
+     &0.0000D+00,8.1334D-02,5.5577D-02,3.6150D-02,2.2243D-02,1.2749D-02,
+     &6.0264D-03,3.2009D-03,1.3143D-03,0.0000D+00,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,6.2581D-01,6.1778D-01,6.0953D-01,6.0134D-01/
+      DATA (XDEF_L(K),K=  685,  798) /
+     &5.9310D-01,5.8428D-01,5.7523D-01,5.6587D-01,5.5625D-01,5.4565D-01,
+     &5.3457D-01,5.2280D-01,5.1030D-01,5.0236D-01,4.9350D-01,4.8267D-01,
+     &4.7104D-01,4.5899D-01,4.4560D-01,4.3381D-01,4.2066D-01,4.0485D-01,
+     &3.8801D-01,3.7047D-01,3.5165D-01,3.3476D-01,3.1574D-01,2.9293D-01,
+     &2.6889D-01,2.4469D-01,2.2279D-01,2.0369D-01,1.8458D-01,1.6537D-01,
+     &1.5025D-01,1.4125D-01,1.3980D-01,1.4589D-01,1.6046D-01,1.8686D-01,
+     &2.2052D-01,2.4502D-01,2.6530D-01,2.7444D-01,2.7406D-01,2.6361D-01,
+     &2.4491D-01,2.1954D-01,1.8819D-01,1.5193D-01,1.1170D-01,6.9146D-02,
+     &2.6829D-02,0.0000D+00,0.0000D+00,7.4387D-02,5.0398D-02,3.2529D-02,
+     &1.9840D-02,1.1260D-02,5.2109D-03,2.7796D-03,1.1291D-03,0.0000D+00,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,6.4510D-01,6.3663D-01,
+     &6.2809D-01,6.1948D-01,6.1090D-01,6.0165D-01,5.9256D-01,5.8263D-01,
+     &5.7237D-01,5.6121D-01,5.4960D-01,5.3710D-01,5.2390D-01,5.1555D-01,
+     &5.0615D-01,4.9474D-01,4.8273D-01,4.6980D-01,4.5603D-01,4.4343D-01,
+     &4.2983D-01,4.1325D-01,3.9561D-01,3.7731D-01,3.5765D-01,3.4017D-01,
+     &3.2063D-01,2.9709D-01,2.7258D-01,2.4795D-01,2.2572D-01,2.0647D-01,
+     &1.8735D-01,1.6824D-01,1.5339D-01,1.4470D-01,1.4366D-01,1.4990D-01,
+     &1.6437D-01,1.8986D-01,2.2169D-01,2.4408D-01,2.6175D-01,2.6863D-01,
+     &2.6585D-01,2.5363D-01,2.3397D-01,2.0813D-01,1.7714D-01,1.4205D-01/
+      DATA (XDEF_L(K),K=  799,  912) /
+     &1.0396D-01,6.4602D-02,2.6785D-02,0.0000D+00,0.0000D+00,6.8343D-02,
+     &4.5962D-02,2.9434D-02,1.7812D-02,1.0015D-02,4.5458D-03,2.4331D-03,
+     &9.7866D-04,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &6.6281D-01,6.5407D-01,6.4523D-01,6.3631D-01,6.2740D-01,6.1775D-01,
+     &6.0821D-01,5.9770D-01,5.8724D-01,5.7535D-01,5.6321D-01,5.5021D-01,
+     &5.3640D-01,5.2763D-01,5.1775D-01,5.0583D-01,4.9310D-01,4.7946D-01,
+     &4.6520D-01,4.5225D-01,4.3811D-01,4.2074D-01,4.0247D-01,3.8355D-01,
+     &3.6315D-01,3.4516D-01,3.2502D-01,3.0091D-01,2.7589D-01,2.5090D-01,
+     &2.2842D-01,2.0903D-01,1.8987D-01,1.7087D-01,1.5631D-01,1.4790D-01,
+     &1.4709D-01,1.5345D-01,1.6771D-01,1.9243D-01,2.2253D-01,2.4307D-01,
+     &2.5846D-01,2.6327D-01,2.5857D-01,2.4493D-01,2.2441D-01,1.9832D-01,
+     &1.6773D-01,1.3380D-01,9.7606D-02,6.1077D-02,2.7123D-02,4.1687D-04,
+     &0.0000D+00,6.3316D-02,4.2290D-02,2.6899D-02,1.6166D-02,9.0143D-03,
+     &4.0214D-03,2.1587D-03,8.6042D-04,0.0000D+00,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,6.8558D-01,6.7623D-01,6.6716D-01,6.5776D-01,
+     &6.4840D-01,6.3825D-01,6.2778D-01,6.1697D-01,6.0589D-01,5.9350D-01,
+     &5.8071D-01,5.6677D-01,5.5220D-01,5.4293D-01,5.3246D-01,5.1980D-01,
+     &5.0630D-01,4.9221D-01,4.7690D-01,4.6348D-01,4.4839D-01,4.3024D-01,
+     &4.1112D-01,3.9125D-01,3.7016D-01,3.5134D-01,3.3054D-01,3.0571D-01/
+      DATA (XDEF_L(K),K=  913, 1026) /
+     &2.8005D-01,2.5463D-01,2.3186D-01,2.1230D-01,1.9311D-01,1.7422D-01,
+     &1.5985D-01,1.5187D-01,1.5138D-01,1.5783D-01,1.7178D-01,1.9543D-01,
+     &2.2331D-01,2.4162D-01,2.5415D-01,2.5666D-01,2.4964D-01,2.3438D-01,
+     &2.1293D-01,1.8681D-01,1.5680D-01,1.2430D-01,9.0488D-02,5.7352D-02,
+     &2.7942D-02,7.0995D-03,2.4780D-03,5.7612D-02,3.8138D-02,2.4057D-02,
+     &1.4329D-02,7.9111D-03,3.4566D-03,1.8603D-03,7.3347D-04,0.0000D+00,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,7.0709D-01,6.9744D-01,
+     &6.8784D-01,6.7803D-01,6.6830D-01,6.5763D-01,6.4678D-01,6.3540D-01,
+     &6.2360D-01,6.1071D-01,5.9715D-01,5.8240D-01,5.6710D-01,5.5722D-01,
+     &5.4625D-01,5.3291D-01,5.1856D-01,5.0380D-01,4.8797D-01,4.7363D-01,
+     &4.5801D-01,4.3900D-01,4.1917D-01,3.9846D-01,3.7656D-01,3.5717D-01,
+     &3.3564D-01,3.1017D-01,2.8397D-01,2.5816D-01,2.3508D-01,2.1538D-01,
+     &1.9615D-01,1.7737D-01,1.6324D-01,1.5559D-01,1.5535D-01,1.6175D-01,
+     &1.7537D-01,1.9793D-01,2.2384D-01,2.4005D-01,2.5009D-01,2.5051D-01,
+     &2.4150D-01,2.2495D-01,2.0291D-01,1.7668D-01,1.4739D-01,1.1625D-01,
+     &8.4583D-02,5.4470D-02,2.9013D-02,1.3147D-02,1.4553D-02,5.2777D-02,
+     &3.4672D-02,2.1686D-02,1.2821D-02,7.0105D-03,3.0093D-03,1.6226D-03,
+     &6.3321D-04,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &7.2796D-01,7.1795D-01,7.0799D-01,6.9776D-01,6.8760D-01,6.7649D-01/
+      DATA (XDEF_L(K),K= 1027, 1140) /
+     &6.6523D-01,6.5299D-01,6.4099D-01,6.2720D-01,6.1289D-01,5.9763D-01,
+     &5.8140D-01,5.7108D-01,5.5954D-01,5.4555D-01,5.3082D-01,5.1501D-01,
+     &4.9841D-01,4.8352D-01,4.6718D-01,4.4758D-01,4.2678D-01,4.0543D-01,
+     &3.8267D-01,3.6267D-01,3.4052D-01,3.1445D-01,2.8771D-01,2.6154D-01,
+     &2.3817D-01,2.1835D-01,1.9910D-01,1.8043D-01,1.6662D-01,1.5905D-01,
+     &1.5900D-01,1.6548D-01,1.7871D-01,2.0015D-01,2.2403D-01,2.3835D-01,
+     &2.4610D-01,2.4469D-01,2.3394D-01,2.1634D-01,1.9372D-01,1.6761D-01,
+     &1.3910D-01,1.0920D-01,7.9530D-02,5.2165D-02,3.0250D-02,1.8723D-02,
+     &2.5275D-02,4.8575D-02,3.1676D-02,1.9677D-02,1.1540D-02,6.2533D-03,
+     &2.6411D-03,1.4253D-03,5.5072D-04,0.0000D+00,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,7.4788D-01,7.3751D-01,7.2708D-01,7.1644D-01,
+     &7.0580D-01,6.9430D-01,6.8256D-01,6.6975D-01,6.5712D-01,6.4276D-01,
+     &6.2791D-01,6.1180D-01,5.9490D-01,5.8409D-01,5.7199D-01,5.5739D-01,
+     &5.4166D-01,5.2544D-01,5.0821D-01,4.9288D-01,4.7590D-01,4.5544D-01,
+     &4.3393D-01,4.1178D-01,3.8837D-01,3.6775D-01,3.4513D-01,3.1844D-01,
+     &2.9125D-01,2.6472D-01,2.4110D-01,2.2115D-01,2.0189D-01,1.8330D-01,
+     &1.6955D-01,1.6237D-01,1.6243D-01,1.6875D-01,1.8164D-01,2.0201D-01,
+     &2.2410D-01,2.3665D-01,2.4236D-01,2.3927D-01,2.2710D-01,2.0852D-01,
+     &1.8563D-01,1.5962D-01,1.3170D-01,1.0314D-01,7.5292D-02,5.0347D-02/
+      DATA (XDEF_L(K),K= 1141, 1254) /
+     &3.1513D-02,2.3688D-02,3.4520D-02,4.4988D-02,2.9140D-02,1.7975D-02,
+     &1.0472D-02,5.6268D-03,2.3442D-03,1.2646D-03,4.8432D-04,0.0000D+00,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,7.6812D-01,7.5731D-01,
+     &7.4653D-01,7.3551D-01,7.2440D-01,7.1234D-01,6.9989D-01,6.8692D-01,
+     &6.7357D-01,6.5855D-01,6.4312D-01,6.2624D-01,6.0850D-01,5.9719D-01,
+     &5.8457D-01,5.6934D-01,5.5297D-01,5.3626D-01,5.1802D-01,5.0223D-01,
+     &4.8440D-01,4.6329D-01,4.4109D-01,4.1826D-01,3.9408D-01,3.7291D-01,
+     &3.4966D-01,3.2243D-01,2.9475D-01,2.6790D-01,2.4406D-01,2.2399D-01,
+     &2.0470D-01,1.8621D-01,1.7262D-01,1.6558D-01,1.6576D-01,1.7201D-01,
+     &1.8441D-01,2.0372D-01,2.2403D-01,2.3482D-01,2.3856D-01,2.3398D-01,
+     &2.2040D-01,2.0103D-01,1.7782D-01,1.5205D-01,1.2492D-01,9.7540D-02,
+     &7.1452D-02,4.8817D-02,3.2832D-02,2.8412D-02,4.3068D-02,4.1684D-02,
+     &2.6819D-02,1.6431D-02,9.5049D-03,5.0674D-03,2.0840D-03,1.1231D-03,
+     &4.2643D-04,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &7.8709D-01,7.7617D-01,7.6509D-01,7.5353D-01,7.4210D-01,7.2955D-01,
+     &7.1666D-01,7.0326D-01,6.8906D-01,6.7364D-01,6.5743D-01,6.3988D-01,
+     &6.2140D-01,6.0962D-01,5.9645D-01,5.8083D-01,5.6382D-01,5.4630D-01,
+     &5.2750D-01,5.1079D-01,4.9267D-01,4.7078D-01,4.4780D-01,4.2425D-01,
+     &3.9948D-01,3.7773D-01,3.5398D-01,3.2619D-01,2.9811D-01,2.7093D-01/
+      DATA (XDEF_L(K),K= 1255, 1368) /
+     &2.4686D-01,2.2668D-01,2.0735D-01,1.8888D-01,1.7555D-01,1.6865D-01,
+     &1.6887D-01,1.7500D-01,1.8693D-01,2.0522D-01,2.2377D-01,2.3300D-01,
+     &2.3501D-01,2.2902D-01,2.1428D-01,1.9427D-01,1.7084D-01,1.4533D-01,
+     &1.1889D-01,9.2655D-02,6.8174D-02,4.7575D-02,3.4123D-02,3.2605D-02,
+     &5.0454D-02,3.8820D-02,2.4822D-02,1.5113D-02,8.6857D-03,4.5962D-03,
+     &1.8704D-03,1.0050D-03,3.7856D-04,0.0000D+00,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,8.0606D-01,7.9455D-01,7.8312D-01,7.7128D-01,
+     &7.5940D-01,7.4610D-01,7.3287D-01,7.1917D-01,7.0456D-01,6.8825D-01,
+     &6.7140D-01,6.5313D-01,6.3390D-01,6.2170D-01,6.0798D-01,5.9180D-01,
+     &5.7419D-01,5.5596D-01,5.3636D-01,5.1934D-01,5.0050D-01,4.7790D-01,
+     &4.5436D-01,4.3012D-01,4.0458D-01,3.8238D-01,3.5808D-01,3.2984D-01,
+     &3.0133D-01,2.7388D-01,2.4957D-01,2.2930D-01,2.0996D-01,1.9168D-01,
+     &1.7832D-01,1.7159D-01,1.7177D-01,1.7770D-01,1.8921D-01,2.0651D-01,
+     &2.2344D-01,2.3117D-01,2.3152D-01,2.2426D-01,2.0844D-01,1.8790D-01,
+     &1.6440D-01,1.3914D-01,1.1342D-01,8.8280D-02,6.5276D-02,4.6578D-02,
+     &3.5360D-02,3.6411D-02,5.6986D-02,3.6256D-02,2.3040D-02,1.3948D-02,
+     &7.9676D-03,4.1856D-03,1.6876D-03,9.0394D-04,3.3789D-04,0.0000D+00,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,8.2409D-01,8.1223D-01,
+     &8.0027D-01,7.8810D-01,7.7580D-01,7.6250D-01,7.4852D-01,7.3383D-01/
+      DATA (XDEF_L(K),K= 1369, 1482) /
+     &7.1879D-01,7.0216D-01,6.8466D-01,6.6571D-01,6.4580D-01,6.3303D-01,
+     &6.1887D-01,6.0161D-01,5.8362D-01,5.6485D-01,5.4490D-01,5.2736D-01,
+     &5.0788D-01,4.8465D-01,4.6048D-01,4.3549D-01,4.0949D-01,3.8678D-01,
+     &3.6198D-01,3.3325D-01,3.0435D-01,2.7667D-01,2.5212D-01,2.3179D-01,
+     &2.1241D-01,1.9410D-01,1.8093D-01,1.7428D-01,1.7445D-01,1.8022D-01,
+     &1.9133D-01,2.0758D-01,2.2299D-01,2.2941D-01,2.2823D-01,2.1990D-01,
+     &2.0319D-01,1.8211D-01,1.5852D-01,1.3371D-01,1.0856D-01,8.4430D-02,
+     &6.2776D-02,4.5758D-02,3.6514D-02,3.9756D-02,6.2597D-02,3.4019D-02,
+     &2.1502D-02,1.2943D-02,7.3506D-03,3.8366D-03,1.5351D-03,8.1923D-04,
+     &3.0383D-04,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &8.4844D-01,8.3627D-01,8.2378D-01,8.1114D-01,7.9820D-01,7.8411D-01,
+     &7.6977D-01,7.5436D-01,7.3871D-01,7.2101D-01,7.0269D-01,6.8280D-01,
+     &6.6180D-01,6.4849D-01,6.3365D-01,6.1605D-01,5.9682D-01,5.7721D-01,
+     &5.5628D-01,5.3805D-01,5.1772D-01,4.9378D-01,4.6868D-01,4.4295D-01,
+     &4.1599D-01,3.9262D-01,3.6722D-01,3.3788D-01,3.0847D-01,2.8040D-01,
+     &2.5562D-01,2.3513D-01,2.1572D-01,1.9746D-01,1.8447D-01,1.7787D-01,
+     &1.7810D-01,1.8358D-01,1.9394D-01,2.0894D-01,2.2227D-01,2.2689D-01,
+     &2.2385D-01,2.1408D-01,1.9620D-01,1.7461D-01,1.5108D-01,1.2667D-01,
+     &1.0243D-01,7.9635D-02,5.9715D-02,4.4804D-02,3.7997D-02,4.3894D-02/
+      DATA (XDEF_L(K),K= 1483, 1596) /
+     &6.9391D-02,3.1240D-02,1.9603D-02,1.1712D-02,6.6036D-03,3.4150D-03,
+     &1.3549D-03,7.1812D-04,2.6373D-04,0.0000D+00,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,8.7089D-01,8.5819D-01,8.4535D-01,8.3207D-01,
+     &8.1860D-01,8.0424D-01,7.8877D-01,7.7320D-01,7.5642D-01,7.3822D-01,
+     &7.1895D-01,6.9816D-01,6.7640D-01,6.6244D-01,6.4701D-01,6.2817D-01,
+     &6.0860D-01,5.8841D-01,5.6672D-01,5.4767D-01,5.2667D-01,5.0182D-01,
+     &4.7599D-01,4.4955D-01,4.2190D-01,3.9787D-01,3.7196D-01,3.4199D-01,
+     &3.1220D-01,2.8382D-01,2.5874D-01,2.3816D-01,2.1874D-01,2.0063D-01,
+     &1.8770D-01,1.8107D-01,1.8121D-01,1.8638D-01,1.9622D-01,2.0994D-01,
+     &2.2156D-01,2.2456D-01,2.1986D-01,2.0892D-01,1.9015D-01,1.6817D-01,
+     &1.4465D-01,1.2070D-01,9.7309D-02,7.5665D-02,5.7234D-02,4.4095D-02,
+     &3.9289D-02,4.7307D-02,7.4739D-02,2.8958D-02,1.8046D-02,1.0716D-02,
+     &6.0010D-03,3.0801D-03,1.2145D-03,6.3833D-04,2.3251D-04,0.0000D+00,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,8.9366D-01,8.8058D-01,
+     &8.6727D-01,8.5353D-01,8.3950D-01,8.2436D-01,8.0890D-01,7.9205D-01,
+     &7.7476D-01,7.5566D-01,7.3557D-01,7.1393D-01,6.9120D-01,6.7672D-01,
+     &6.6059D-01,6.4145D-01,6.2086D-01,5.9962D-01,5.7716D-01,5.5756D-01,
+     &5.3584D-01,5.1022D-01,4.8344D-01,4.5615D-01,4.2780D-01,4.0320D-01,
+     &3.7671D-01,3.4621D-01,3.1594D-01,2.8727D-01,2.6196D-01,2.4126D-01/
+      DATA (XDEF_L(K),K= 1597, 1710) /
+     &2.2177D-01,2.0361D-01,1.9078D-01,1.8427D-01,1.8432D-01,1.8918D-01,
+     &1.9834D-01,2.1079D-01,2.2065D-01,2.2210D-01,2.1587D-01,2.0383D-01,
+     &1.8424D-01,1.6197D-01,1.3849D-01,1.1505D-01,9.2463D-02,7.1949D-02,
+     &5.4952D-02,4.3474D-02,4.0525D-02,5.0376D-02,7.9517D-02,2.6835D-02,
+     &1.6616D-02,9.8004D-03,5.4489D-03,2.7768D-03,1.0900D-03,5.6728D-04,
+     &2.0489D-04,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &9.1643D-01,9.0298D-01,8.8901D-01,8.7472D-01,8.6030D-01,8.4449D-01,
+     &8.2790D-01,8.1090D-01,7.9278D-01,7.7287D-01,7.5201D-01,7.2942D-01,
+     &7.0580D-01,6.9067D-01,6.7395D-01,6.5357D-01,6.3264D-01,6.1082D-01,
+     &5.8728D-01,5.6718D-01,5.4478D-01,5.1825D-01,4.9075D-01,4.6263D-01,
+     &4.3360D-01,4.0844D-01,3.8138D-01,3.5032D-01,3.1963D-01,2.9065D-01,
+     &2.6511D-01,2.4428D-01,2.2479D-01,2.0678D-01,1.9385D-01,1.8735D-01,
+     &1.8722D-01,1.9179D-01,2.0029D-01,2.1158D-01,2.1961D-01,2.1971D-01,
+     &2.1194D-01,1.9894D-01,1.7862D-01,1.5609D-01,1.3279D-01,1.0972D-01,
+     &8.8007D-02,6.8578D-02,5.2905D-02,4.2942D-02,4.1624D-02,5.3065D-02,
+     &8.3506D-02,2.4920D-02,1.5334D-02,8.9876D-03,4.9653D-03,2.5112D-03,
+     &9.8300D-04,5.0629D-04,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,9.3762D-01,9.2325D-01,9.0916D-01,8.9432D-01,
+     &8.7930D-01,8.6312D-01,8.4579D-01,8.2807D-01,8.0954D-01,7.8866D-01/
+      DATA (XDEF_L(K),K= 1711, 1824) /
+     &7.6704D-01,7.4360D-01,7.1911D-01,7.0343D-01,6.8612D-01,6.6512D-01,
+     &6.4349D-01,6.2048D-01,5.9676D-01,5.7574D-01,5.5261D-01,5.2556D-01,
+     &4.9731D-01,4.6862D-01,4.3881D-01,4.1318D-01,3.8556D-01,3.5408D-01,
+     &3.2299D-01,2.9375D-01,2.6794D-01,2.4706D-01,2.2744D-01,2.0939D-01,
+     &1.9662D-01,1.9016D-01,1.8990D-01,1.9412D-01,2.0192D-01,2.1208D-01,
+     &2.1863D-01,2.1745D-01,2.0845D-01,1.9458D-01,1.7365D-01,1.5094D-01,
+     &1.2783D-01,1.0526D-01,8.4228D-02,6.5746D-02,5.1203D-02,4.2521D-02,
+     &4.2531D-02,5.5238D-02,8.6619D-02,2.3321D-02,1.4266D-02,8.3142D-03,
+     &4.5684D-03,2.2945D-03,8.9721D-04,4.5700D-04,0.0000D+00,0.0000D+00,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,9.5912D-01,9.4446D-01,
+     &9.2967D-01,9.1446D-01,8.9890D-01,8.8176D-01,8.6424D-01,8.4567D-01,
+     &8.2630D-01,8.0492D-01,7.8242D-01,7.5817D-01,7.3271D-01,7.1653D-01,
+     &6.9849D-01,6.7725D-01,6.5433D-01,6.3091D-01,6.0625D-01,5.8456D-01,
+     &5.6088D-01,5.3305D-01,5.0402D-01,4.7461D-01,4.4411D-01,4.1800D-01,
+     &3.8988D-01,3.5790D-01,3.2644D-01,2.9690D-01,2.7087D-01,2.4987D-01,
+     &2.3039D-01,2.1219D-01,1.9955D-01,1.9298D-01,1.9248D-01,1.9636D-01,
+     &2.0355D-01,2.1258D-01,2.1752D-01,2.1512D-01,2.0490D-01,1.9021D-01,
+     &1.6876D-01,1.4586D-01,1.2296D-01,1.0090D-01,8.0587D-02,6.3034D-02,
+     &4.9591D-02,4.2122D-02,4.3355D-02,5.7203D-02,8.9336D-02,2.1802D-02/
+      DATA (XDEF_L(K),K= 1825, 1836) /
+     &1.3258D-02,7.6843D-03,4.1967D-03,2.0952D-03,8.1932D-04,4.1202D-04,
+     &0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00,0.0000D+00/
+      DATA (XUDF_L(K),K=    1,  114) /
+     &1.8987D-02,1.9947D-02,2.0980D-02,2.2068D-02,2.3225D-02,2.4540D-02,
+     &2.5957D-02,2.7526D-02,2.9229D-02,3.1232D-02,3.3453D-02,3.6003D-02,
+     &3.8855D-02,4.0763D-02,4.2980D-02,4.5778D-02,4.8895D-02,5.2320D-02,
+     &5.6174D-02,5.9765D-02,6.3980D-02,6.9315D-02,7.5299D-02,8.1888D-02,
+     &8.9292D-02,9.6162D-02,1.0414D-01,1.1410D-01,1.2505D-01,1.3674D-01,
+     &1.4937D-01,1.6060D-01,1.7296D-01,1.8730D-01,2.0166D-01,2.1531D-01,
+     &2.2821D-01,2.3833D-01,2.4848D-01,2.6049D-01,2.7586D-01,2.9166D-01,
+     &3.1456D-01,3.3942D-01,3.7230D-01,4.0597D-01,4.3921D-01,4.7071D-01,
+     &4.9846D-01,5.2057D-01,5.3433D-01,5.3610D-01,5.2141D-01,4.8433D-01,
+     &4.1719D-01,6.3794D-01,6.7411D-01,7.2040D-01,7.8812D-01,8.9495D-01,
+     &1.0702D+00,1.3629D+00,1.8763D+00,2.8399D+00,4.8968D+00,1.0506D+01,
+     &3.7793D+01,0.0000D+00,3.1111D-02,3.2336D-02,3.3580D-02,3.4906D-02,
+     &3.6247D-02,3.7773D-02,3.9337D-02,4.1056D-02,4.2876D-02,4.5001D-02,
+     &4.7299D-02,4.9897D-02,5.2761D-02,5.4666D-02,5.6867D-02,5.9620D-02,
+     &6.2679D-02,6.6018D-02,6.9775D-02,7.3275D-02,7.7353D-02,8.2522D-02,
+     &8.8327D-02,9.4694D-02,1.0184D-01,1.0846D-01,1.1615D-01,1.2575D-01,
+     &1.3628D-01,1.4752D-01,1.5964D-01,1.7036D-01,1.8215D-01,1.9580D-01,
+     &2.0933D-01,2.2213D-01,2.3411D-01,2.4341D-01,2.5275D-01,2.6387D-01,
+     &2.7831D-01,2.9333D-01,3.1510D-01,3.3876D-01,3.6995D-01,4.0170D-01/
+      DATA (XUDF_L(K),K=  115,  228) /
+     &4.3298D-01,4.6172D-01,4.8742D-01,5.0700D-01,5.1856D-01,5.1873D-01,
+     &5.0352D-01,4.6746D-01,4.0418D-01,6.1801D-01,6.5339D-01,6.9923D-01,
+     &7.6627D-01,8.7125D-01,1.0408D+00,1.3199D+00,1.8020D+00,2.6920D+00,
+     &4.5574D+00,9.5310D+00,3.2877D+01,0.0000D+00,5.1176D-02,5.2640D-02,
+     &5.4100D-02,5.5603D-02,5.7095D-02,5.8737D-02,6.0416D-02,6.2154D-02,
+     &6.4016D-02,6.6046D-02,6.8273D-02,7.0765D-02,7.3444D-02,7.5182D-02,
+     &7.7263D-02,7.9781D-02,8.2626D-02,8.5707D-02,8.9176D-02,9.2402D-02,
+     &9.6182D-02,1.0098D-01,1.0635D-01,1.1227D-01,1.1893D-01,1.2513D-01,
+     &1.3230D-01,1.4128D-01,1.5115D-01,1.6164D-01,1.7300D-01,1.8301D-01,
+     &1.9397D-01,2.0660D-01,2.1907D-01,2.3072D-01,2.4154D-01,2.4985D-01,
+     &2.5817D-01,2.6810D-01,2.8136D-01,2.9535D-01,3.1585D-01,3.3824D-01,
+     &3.6743D-01,3.9701D-01,4.2565D-01,4.5205D-01,4.7460D-01,4.9184D-01,
+     &5.0110D-01,4.9954D-01,4.8363D-01,4.4878D-01,3.8940D-01,5.9452D-01,
+     &6.2820D-01,6.7181D-01,7.3612D-01,8.3598D-01,9.9560D-01,1.2543D+00,
+     &1.6953D+00,2.4947D+00,4.1415D+00,8.4275D+00,2.7797D+01,0.0000D+00,
+     &8.6266D-02,8.7847D-02,8.9380D-02,9.0869D-02,9.2337D-02,9.3826D-02,
+     &9.5315D-02,9.6842D-02,9.8333D-02,1.0003D-01,1.0178D-01,1.0370D-01,
+     &1.0575D-01,1.0710D-01,1.0872D-01,1.1075D-01,1.1295D-01,1.1538D-01,
+     &1.1821D-01,1.2088D-01,1.2396D-01,1.2796D-01,1.3252D-01,1.3756D-01/
+      DATA (XUDF_L(K),K=  229,  342) /
+     &1.4331D-01,1.4870D-01,1.5500D-01,1.6291D-01,1.7166D-01,1.8100D-01,
+     &1.9111D-01,2.0002D-01,2.0977D-01,2.2095D-01,2.3189D-01,2.4200D-01,
+     &2.5123D-01,2.5821D-01,2.6512D-01,2.7351D-01,2.8514D-01,2.9789D-01,
+     &3.1683D-01,3.3731D-01,3.6424D-01,3.9124D-01,4.1697D-01,4.4030D-01,
+     &4.6002D-01,4.7419D-01,4.8085D-01,4.7740D-01,4.6086D-01,4.2728D-01,
+     &3.7241D-01,5.6656D-01,5.9684D-01,6.3694D-01,6.9622D-01,7.8804D-01,
+     &9.3343D-01,1.1653D+00,1.5545D+00,2.2504D+00,3.6537D+00,7.2124D+00,
+     &2.2653D+01,0.0000D+00,1.4838D-01,1.4960D-01,1.5068D-01,1.5161D-01,
+     &1.5242D-01,1.5316D-01,1.5373D-01,1.5426D-01,1.5470D-01,1.5511D-01,
+     &1.5554D-01,1.5602D-01,1.5660D-01,1.5698D-01,1.5750D-01,1.5830D-01,
+     &1.5923D-01,1.6034D-01,1.6181D-01,1.6324D-01,1.6509D-01,1.6746D-01,
+     &1.7054D-01,1.7402D-01,1.7811D-01,1.8208D-01,1.8687D-01,1.9296D-01,
+     &1.9986D-01,2.0734D-01,2.1554D-01,2.2281D-01,2.3075D-01,2.3983D-01,
+     &2.4863D-01,2.5660D-01,2.6366D-01,2.6883D-01,2.7387D-01,2.8026D-01,
+     &2.8982D-01,3.0088D-01,3.1780D-01,3.3626D-01,3.6021D-01,3.8399D-01,
+     &4.0666D-01,4.2682D-01,4.4278D-01,4.5386D-01,4.5774D-01,4.5230D-01,
+     &4.3509D-01,4.0314D-01,3.5321D-01,5.3325D-01,5.5916D-01,5.9448D-01,
+     &6.4707D-01,7.2797D-01,8.5557D-01,1.0563D+00,1.3882D+00,1.9717D+00,
+     &3.1223D+00,5.9601D+00,1.7750D+01,0.0000D+00,2.3139D-01,2.3138D-01/
+      DATA (XUDF_L(K),K=  343,  456) /
+     &2.3120D-01,2.3076D-01,2.3006D-01,2.2907D-01,2.2788D-01,2.2645D-01,
+     &2.2489D-01,2.2308D-01,2.2120D-01,2.1929D-01,2.1743D-01,2.1630D-01,
+     &2.1526D-01,2.1411D-01,2.1311D-01,2.1231D-01,2.1171D-01,2.1148D-01,
+     &2.1150D-01,2.1182D-01,2.1271D-01,2.1412D-01,2.1601D-01,2.1822D-01,
+     &2.2096D-01,2.2496D-01,2.2961D-01,2.3481D-01,2.4086D-01,2.4622D-01,
+     &2.5214D-01,2.5891D-01,2.6537D-01,2.7104D-01,2.7588D-01,2.7922D-01,
+     &2.8235D-01,2.8664D-01,2.9413D-01,3.0352D-01,3.1845D-01,3.3481D-01,
+     &3.5617D-01,3.7737D-01,3.9689D-01,4.1403D-01,4.2736D-01,4.3558D-01,
+     &4.3712D-01,4.3016D-01,4.1245D-01,3.8197D-01,3.3645D-01,5.0322D-01,
+     &5.2507D-01,5.5559D-01,6.0172D-01,6.7286D-01,7.8413D-01,9.5797D-01,
+     &1.2422D+00,1.7341D+00,2.6883D+00,4.9868D+00,1.4177D+01,0.0000D+00,
+     &3.6389D-01,3.6098D-01,3.5780D-01,3.5400D-01,3.5016D-01,3.4553D-01,
+     &3.4044D-01,3.3521D-01,3.2971D-01,3.2369D-01,3.1755D-01,3.1120D-01,
+     &3.0494D-01,3.0120D-01,2.9724D-01,2.9287D-01,2.8855D-01,2.8449D-01,
+     &2.8072D-01,2.7770D-01,2.7469D-01,2.7175D-01,2.6933D-01,2.6740D-01,
+     &2.6613D-01,2.6556D-01,2.6563D-01,2.6631D-01,2.6763D-01,2.6975D-01,
+     &2.7268D-01,2.7539D-01,2.7857D-01,2.8224D-01,2.8565D-01,2.8841D-01,
+     &2.9040D-01,2.9139D-01,2.9220D-01,2.9395D-01,2.9888D-01,3.0633D-01,
+     &3.1877D-01,3.3296D-01,3.5147D-01,3.6947D-01,3.8604D-01,3.9986D-01/
+      DATA (XUDF_L(K),K=  457,  570) /
+     &4.1008D-01,4.1548D-01,4.1467D-01,4.0620D-01,3.8830D-01,3.5965D-01,
+     &3.1902D-01,4.7020D-01,4.8772D-01,5.1303D-01,5.5185D-01,6.1224D-01,
+     &7.0699D-01,8.5323D-01,1.0903D+00,1.4950D+00,2.2640D+00,4.0723D+00,
+     &0.0000D+00,0.0000D+00,5.2666D-01,5.1909D-01,5.1100D-01,5.0238D-01,
+     &4.9333D-01,4.8312D-01,4.7293D-01,4.6180D-01,4.5066D-01,4.3890D-01,
+     &4.2692D-01,4.1467D-01,4.0262D-01,3.9542D-01,3.8784D-01,3.7925D-01,
+     &3.7080D-01,3.6267D-01,3.5482D-01,3.4841D-01,3.4190D-01,3.3492D-01,
+     &3.2852D-01,3.2287D-01,3.1768D-01,3.1409D-01,3.1066D-01,3.0785D-01,
+     &3.0564D-01,3.0446D-01,3.0380D-01,3.0388D-01,3.0402D-01,3.0458D-01,
+     &3.0488D-01,3.0475D-01,3.0386D-01,3.0263D-01,3.0116D-01,3.0045D-01,
+     &3.0296D-01,3.0852D-01,3.1888D-01,3.3085D-01,3.4677D-01,3.6222D-01,
+     &3.7600D-01,3.8707D-01,3.9488D-01,3.9799D-01,3.9530D-01,3.8568D-01,
+     &3.6791D-01,3.4080D-01,3.0424D-01,4.4195D-01,4.5570D-01,4.7648D-01,
+     &5.0935D-01,5.6099D-01,6.4225D-01,7.6680D-01,9.6736D-01,1.3053D+00,
+     &1.9393D+00,3.3976D+00,0.0000D+00,0.0000D+00,7.4015D-01,7.2498D-01,
+     &7.0940D-01,6.9297D-01,6.7620D-01,6.5800D-01,6.3935D-01,6.2047D-01,
+     &6.0114D-01,5.8076D-01,5.6065D-01,5.4030D-01,5.2035D-01,5.0839D-01,
+     &4.9583D-01,4.8167D-01,4.6773D-01,4.5434D-01,4.4113D-01,4.3035D-01,
+     &4.1922D-01,4.0719D-01,3.9582D-01,3.8536D-01,3.7557D-01,3.6805D-01/
+      DATA (XUDF_L(K),K=  571,  684) /
+     &3.6079D-01,3.5336D-01,3.4710D-01,3.4173D-01,3.3719D-01,3.3400D-01,
+     &3.3124D-01,3.2819D-01,3.2494D-01,3.2158D-01,3.1765D-01,3.1400D-01,
+     &3.1011D-01,3.0684D-01,3.0682D-01,3.1046D-01,3.1856D-01,3.2861D-01,
+     &3.4189D-01,3.5475D-01,3.6597D-01,3.7463D-01,3.8003D-01,3.8108D-01,
+     &3.7681D-01,3.6631D-01,3.4865D-01,3.2327D-01,2.9078D-01,4.1488D-01,
+     &4.2529D-01,4.4193D-01,4.6945D-01,5.1322D-01,5.8236D-01,6.8846D-01,
+     &8.5739D-01,1.1394D+00,1.6617D+00,2.8395D+00,0.0000D+00,0.0000D+00,
+     &9.8501D-01,9.5975D-01,9.3420D-01,9.0757D-01,8.8092D-01,8.5237D-01,
+     &8.2383D-01,7.9445D-01,7.6556D-01,7.3524D-01,7.0484D-01,6.7495D-01,
+     &6.4547D-01,6.2798D-01,6.0969D-01,5.8904D-01,5.6882D-01,5.4932D-01,
+     &5.3014D-01,5.1443D-01,4.9826D-01,4.8058D-01,4.6380D-01,4.4815D-01,
+     &4.3330D-01,4.2167D-01,4.1020D-01,3.9827D-01,3.8748D-01,3.7784D-01,
+     &3.6931D-01,3.6303D-01,3.5669D-01,3.4992D-01,3.4358D-01,3.3710D-01,
+     &3.3025D-01,3.2429D-01,3.1817D-01,3.1242D-01,3.1001D-01,3.1195D-01,
+     &3.1802D-01,3.2610D-01,3.3719D-01,3.4770D-01,3.5674D-01,3.6357D-01,
+     &3.6695D-01,3.6631D-01,3.6075D-01,3.4960D-01,3.3214D-01,3.0855D-01,
+     &2.7931D-01,3.9198D-01,3.9931D-01,4.1263D-01,4.3550D-01,4.7310D-01,
+     &5.3259D-01,6.2375D-01,7.6876D-01,1.0087D+00,1.4464D+00,2.4185D+00,
+     &0.0000D+00,0.0000D+00,1.2917D+00,1.2523D+00,1.2128D+00,1.1722D+00/
+      DATA (XUDF_L(K),K=  685,  798) /
+     &1.1321D+00,1.0894D+00,1.0473D+00,1.0044D+00,9.6262D-01,9.1838D-01,
+     &8.7565D-01,8.3283D-01,7.9186D-01,7.6734D-01,7.4146D-01,7.1300D-01,
+     &6.8484D-01,6.5787D-01,6.3134D-01,6.0963D-01,5.8730D-01,5.6294D-01,
+     &5.3947D-01,5.1767D-01,4.9689D-01,4.8039D-01,4.6398D-01,4.4675D-01,
+     &4.3087D-01,4.1650D-01,4.0371D-01,3.9342D-01,3.8361D-01,3.7293D-01,
+     &3.6284D-01,3.5305D-01,3.4307D-01,3.3468D-01,3.2613D-01,3.1788D-01,
+     &3.1306D-01,3.1309D-01,3.1715D-01,3.2346D-01,3.3232D-01,3.4066D-01,
+     &3.4779D-01,3.5251D-01,3.5401D-01,3.5184D-01,3.4519D-01,3.3347D-01,
+     &3.1650D-01,2.9433D-01,2.6872D-01,3.6968D-01,3.7446D-01,3.8477D-01,
+     &4.0368D-01,4.3551D-01,4.8654D-01,5.6457D-01,6.8832D-01,8.9135D-01,
+     &1.2583D+00,2.0601D+00,0.0000D+00,0.0000D+00,1.6499D+00,1.5928D+00,
+     &1.5356D+00,1.4773D+00,1.4202D+00,1.3601D+00,1.3009D+00,1.2413D+00,
+     &1.1836D+00,1.1235D+00,1.0650D+00,1.0076D+00,9.5212D-01,9.1919D-01,
+     &8.8569D-01,8.4733D-01,8.1006D-01,7.7436D-01,7.3955D-01,7.1104D-01,
+     &6.8173D-01,6.4966D-01,6.1893D-01,5.9026D-01,5.6287D-01,5.4114D-01,
+     &5.1941D-01,4.9621D-01,4.7490D-01,4.5564D-01,4.3786D-01,4.2408D-01,
+     &4.1024D-01,3.9562D-01,3.8175D-01,3.6853D-01,3.5541D-01,3.4455D-01,
+     &3.3366D-01,3.2286D-01,3.1565D-01,3.1397D-01,3.1618D-01,3.2069D-01,
+     &3.2744D-01,3.3383D-01,3.3911D-01,3.4194D-01,3.4194D-01,3.3844D-01/
+      DATA (XUDF_L(K),K=  799,  912) /
+     &3.3088D-01,3.1887D-01,3.0224D-01,2.8177D-01,2.5901D-01,3.4945D-01,
+     &3.5200D-01,3.5959D-01,3.7518D-01,4.0212D-01,4.4590D-01,5.1305D-01,
+     &6.1934D-01,7.9273D-01,1.1025D+00,1.7693D+00,0.0000D+00,0.0000D+00,
+     &2.0413D+00,1.9626D+00,1.8840D+00,1.8053D+00,1.7284D+00,1.6480D+00,
+     &1.5697D+00,1.4911D+00,1.4157D+00,1.3375D+00,1.2620D+00,1.1875D+00,
+     &1.1168D+00,1.0751D+00,1.0321D+00,9.8410D-01,9.3682D-01,8.9196D-01,
+     &8.4816D-01,8.1245D-01,7.7582D-01,7.3576D-01,6.9745D-01,6.6154D-01,
+     &6.2742D-01,6.0036D-01,5.7319D-01,5.4409D-01,5.1721D-01,4.9291D-01,
+     &4.7049D-01,4.5284D-01,4.3541D-01,4.1671D-01,3.9926D-01,3.8274D-01,
+     &3.6660D-01,3.5348D-01,3.4035D-01,3.2727D-01,3.1788D-01,3.1459D-01,
+     &3.1499D-01,3.1792D-01,3.2291D-01,3.2764D-01,3.3124D-01,3.3250D-01,
+     &3.3120D-01,3.2663D-01,3.1834D-01,3.0608D-01,2.8998D-01,2.7085D-01,
+     &2.5085D-01,3.3191D-01,3.3258D-01,3.3808D-01,3.5072D-01,3.7379D-01,
+     &4.1182D-01,4.7005D-01,5.6257D-01,7.1233D-01,9.7788D-01,1.5412D+00,
+     &0.0000D+00,0.0000D+00,2.6325D+00,2.5188D+00,2.4060D+00,2.2942D+00,
+     &2.1863D+00,2.0740D+00,1.9650D+00,1.8571D+00,1.7537D+00,1.6473D+00,
+     &1.5453D+00,1.4458D+00,1.3515D+00,1.2965D+00,1.2394D+00,1.1767D+00,
+     &1.1150D+00,1.0560D+00,9.9927D-01,9.5301D-01,9.0565D-01,8.5400D-01,
+     &8.0462D-01,7.5858D-01,7.1481D-01,6.7994D-01,6.4502D-01,6.0799D-01/
+      DATA (XUDF_L(K),K=  913, 1026) /
+     &5.7349D-01,5.4206D-01,5.1299D-01,4.9028D-01,4.6789D-01,4.4387D-01,
+     &4.2168D-01,4.0096D-01,3.8070D-01,3.6457D-01,3.4857D-01,3.3249D-01,
+     &3.2026D-01,3.1503D-01,3.1326D-01,3.1423D-01,3.1703D-01,3.1974D-01,
+     &3.2120D-01,3.2086D-01,3.1799D-01,3.1221D-01,3.0315D-01,2.9072D-01,
+     &2.7522D-01,2.5796D-01,2.4114D-01,3.1079D-01,3.0956D-01,3.1267D-01,
+     &3.2223D-01,3.4089D-01,3.7246D-01,4.2134D-01,4.9853D-01,6.2305D-01,
+     &8.4191D-01,1.2983D+00,0.0000D+00,0.0000D+00,3.2997D+00,3.1427D+00,
+     &2.9900D+00,2.8374D+00,2.6927D+00,2.5421D+00,2.3973D+00,2.2549D+00,
+     &2.1191D+00,1.9809D+00,1.8488D+00,1.7209D+00,1.6001D+00,1.5300D+00,
+     &1.4576D+00,1.3771D+00,1.2999D+00,1.2268D+00,1.1551D+00,1.0975D+00,
+     &1.0385D+00,9.7437D-01,9.1327D-01,8.5649D-01,8.0236D-01,7.5952D-01,
+     &7.1667D-01,6.7091D-01,6.2847D-01,5.9005D-01,5.5422D-01,5.2636D-01,
+     &4.9890D-01,4.6976D-01,4.4269D-01,4.1752D-01,3.9377D-01,3.7477D-01,
+     &3.5594D-01,3.3710D-01,3.2226D-01,3.1511D-01,3.1131D-01,3.1067D-01,
+     &3.1132D-01,3.1227D-01,3.1198D-01,3.1021D-01,3.0606D-01,2.9926D-01,
+     &2.8958D-01,2.7716D-01,2.6233D-01,2.4655D-01,2.3275D-01,2.9229D-01,
+     &2.8941D-01,2.9061D-01,2.9753D-01,3.1273D-01,3.3909D-01,3.8034D-01,
+     &4.4548D-01,5.5028D-01,7.3256D-01,1.1074D+00,0.0000D+00,0.0000D+00,
+     &4.0557D+00,3.8486D+00,3.6460D+00,3.4480D+00,3.2579D+00,3.0626D+00/
+      DATA (XUDF_L(K),K= 1027, 1140) /
+     &2.8756D+00,2.6929D+00,2.5196D+00,2.3441D+00,2.1778D+00,2.0170D+00,
+     &1.8670D+00,1.7797D+00,1.6902D+00,1.5909D+00,1.4960D+00,1.4058D+00,
+     &1.3191D+00,1.2484D+00,1.1764D+00,1.0991D+00,1.0253D+00,9.5689D-01,
+     &8.9197D-01,8.4046D-01,7.8904D-01,7.3442D-01,6.8367D-01,6.3780D-01,
+     &5.9520D-01,5.6218D-01,5.2934D-01,4.9500D-01,4.6300D-01,4.3370D-01,
+     &4.0611D-01,3.8431D-01,3.6284D-01,3.4121D-01,3.2389D-01,3.1494D-01,
+     &3.0926D-01,3.0697D-01,3.0594D-01,3.0501D-01,3.0330D-01,3.0019D-01,
+     &2.9492D-01,2.8734D-01,2.7718D-01,2.6476D-01,2.5057D-01,2.3646D-01,
+     &2.2503D-01,2.7558D-01,2.7132D-01,2.7089D-01,2.7569D-01,2.8794D-01,
+     &3.1000D-01,3.4491D-01,4.0016D-01,4.8886D-01,6.4191D-01,9.5232D-01,
+     &0.0000D+00,0.0000D+00,4.8799D+00,4.6116D+00,4.3560D+00,4.1035D+00,
+     &3.8608D+00,3.6163D+00,3.3822D+00,3.1557D+00,2.9412D+00,2.7247D+00,
+     &2.5209D+00,2.3248D+00,2.1421D+00,2.0368D+00,1.9287D+00,1.8094D+00,
+     &1.6955D+00,1.5877D+00,1.4841D+00,1.4003D+00,1.3154D+00,1.2237D+00,
+     &1.1368D+00,1.0563D+00,9.8015D-01,9.2005D-01,8.5978D-01,7.9615D-01,
+     &7.3715D-01,6.8369D-01,6.3441D-01,5.9609D-01,5.5830D-01,5.1865D-01,
+     &4.8192D-01,4.4872D-01,4.1747D-01,3.9300D-01,3.6895D-01,3.4483D-01,
+     &3.2508D-01,3.1459D-01,3.0709D-01,3.0328D-01,3.0056D-01,2.9840D-01,
+     &2.9543D-01,2.9107D-01,2.8485D-01,2.7655D-01,2.6610D-01,2.5368D-01/
+      DATA (XUDF_L(K),K= 1141, 1254) /
+     &2.4019D-01,2.2736D-01,2.1837D-01,2.6080D-01,2.5542D-01,2.5362D-01,
+     &2.5693D-01,2.6661D-01,2.8505D-01,3.1490D-01,3.6226D-01,4.3798D-01,
+     &5.6769D-01,8.2836D-01,0.0000D+00,0.0000D+00,5.8340D+00,5.4940D+00,
+     &5.1700D+00,4.8532D+00,4.5515D+00,4.2463D+00,3.9559D+00,3.6752D+00,
+     &3.4138D+00,3.1496D+00,2.9022D+00,2.6648D+00,2.4450D+00,2.3189D+00,
+     &2.1896D+00,2.0476D+00,1.9120D+00,1.7843D+00,1.6621D+00,1.5639D+00,
+     &1.4648D+00,1.3569D+00,1.2556D+00,1.1618D+00,1.0734D+00,1.0037D+00,
+     &9.3416D-01,8.6065D-01,7.9257D-01,7.3145D-01,6.7463D-01,6.3082D-01,
+     &5.8786D-01,5.4262D-01,5.0118D-01,4.6374D-01,4.2883D-01,4.0146D-01,
+     &3.7490D-01,3.4814D-01,3.2612D-01,3.1397D-01,3.0482D-01,2.9958D-01,
+     &2.9536D-01,2.9178D-01,2.8756D-01,2.8208D-01,2.7504D-01,2.6611D-01,
+     &2.5539D-01,2.4319D-01,2.3031D-01,2.1877D-01,2.1195D-01,2.4673D-01,
+     &2.4036D-01,2.3746D-01,2.3912D-01,2.4677D-01,2.6223D-01,2.8748D-01,
+     &3.2792D-01,3.9255D-01,5.0271D-01,7.2095D-01,0.0000D+00,0.0000D+00,
+     &6.8578D+00,6.4388D+00,6.0380D+00,5.6501D+00,5.2825D+00,4.9103D+00,
+     &4.5613D+00,4.2230D+00,3.9070D+00,3.5911D+00,3.2966D+00,3.0156D+00,
+     &2.7567D+00,2.6078D+00,2.4563D+00,2.2905D+00,2.1319D+00,1.9837D+00,
+     &1.8421D+00,1.7287D+00,1.6141D+00,1.4902D+00,1.3730D+00,1.2663D+00,
+     &1.1652D+00,1.0858D+00,1.0067D+00,9.2337D-01,8.4648D-01,7.7710D-01/
+      DATA (XUDF_L(K),K= 1255, 1368) /
+     &7.1333D-01,6.6392D-01,6.1566D-01,5.6531D-01,5.1904D-01,4.7761D-01,
+     &4.3908D-01,4.0927D-01,3.8022D-01,3.5109D-01,3.2686D-01,3.1318D-01,
+     &3.0244D-01,2.9602D-01,2.9031D-01,2.8538D-01,2.8024D-01,2.7382D-01,
+     &2.6607D-01,2.5668D-01,2.4571D-01,2.3364D-01,2.2155D-01,2.1116D-01,
+     &2.0617D-01,2.3421D-01,2.2704D-01,2.2320D-01,2.2366D-01,2.2952D-01,
+     &2.4241D-01,2.6402D-01,2.9884D-01,3.5437D-01,4.4860D-01,6.3331D-01,
+     &0.0000D+00,0.0000D+00,7.9784D+00,7.4673D+00,6.9820D+00,6.5121D+00,
+     &6.0712D+00,5.6250D+00,5.2080D+00,4.8065D+00,4.4309D+00,4.0590D+00,
+     &3.7131D+00,3.3843D+00,3.0816D+00,2.9094D+00,2.7332D+00,2.5420D+00,
+     &2.3595D+00,2.1895D+00,2.0271D+00,1.8966D+00,1.7658D+00,1.6248D+00,
+     &1.4933D+00,1.3718D+00,1.2579D+00,1.1683D+00,1.0795D+00,9.8589D-01,
+     &8.9996D-01,8.2253D-01,7.5153D-01,6.9648D-01,6.4287D-01,5.8736D-01,
+     &5.3655D-01,4.9109D-01,4.4891D-01,4.1655D-01,3.8518D-01,3.5367D-01,
+     &3.2738D-01,3.1221D-01,3.0006D-01,2.9246D-01,2.8544D-01,2.7940D-01,
+     &2.7319D-01,2.6601D-01,2.5763D-01,2.4782D-01,2.3676D-01,2.2486D-01,
+     &2.1329D-01,2.0405D-01,2.0083D-01,2.2267D-01,2.1489D-01,2.1027D-01,
+     &2.0967D-01,2.1409D-01,2.2473D-01,2.4320D-01,2.7316D-01,3.2113D-01,
+     &4.0209D-01,5.5899D-01,0.0000D+00,0.0000D+00,9.1575D+00,8.5458D+00,
+     &7.9700D+00,7.4123D+00,6.8876D+00,6.3653D+00,5.8736D+00,5.4042D+00/
+      DATA (XUDF_L(K),K= 1369, 1482) /
+     &4.9684D+00,4.5359D+00,4.1366D+00,3.7576D+00,3.4110D+00,3.2138D+00,
+     &3.0122D+00,2.7943D+00,2.5871D+00,2.3944D+00,2.2102D+00,2.0646D+00,
+     &1.9163D+00,1.7581D+00,1.6109D+00,1.4753D+00,1.3483D+00,1.2486D+00,
+     &1.1500D+00,1.0462D+00,9.5130D-01,8.6585D-01,7.8770D-01,7.2741D-01,
+     &6.6891D-01,6.0781D-01,5.5266D-01,5.0342D-01,4.5788D-01,4.2322D-01,
+     &3.8960D-01,3.5594D-01,3.2768D-01,3.1125D-01,2.9779D-01,2.8890D-01,
+     &2.8091D-01,2.7385D-01,2.6670D-01,2.5886D-01,2.4989D-01,2.3976D-01,
+     &2.2861D-01,2.1703D-01,2.0604D-01,1.9777D-01,1.9598D-01,2.1238D-01,
+     &2.0408D-01,1.9879D-01,1.9735D-01,2.0048D-01,2.0933D-01,2.2523D-01,
+     &2.5120D-01,2.9296D-01,3.6305D-01,4.9711D-01,0.0000D+00,0.0000D+00,
+     &1.0956D+01,1.0188D+01,9.4660D+00,8.7704D+00,8.1209D+00,7.4727D+00,
+     &6.8721D+00,6.2972D+00,5.7646D+00,5.2434D+00,4.7595D+00,4.3051D+00,
+     &3.8911D+00,3.6559D+00,3.4174D+00,3.1598D+00,2.9153D+00,2.6889D+00,
+     &2.4732D+00,2.3031D+00,2.1311D+00,1.9475D+00,1.7771D+00,1.6202D+00,
+     &1.4748D+00,1.3609D+00,1.2481D+00,1.1301D+00,1.0222D+00,9.2549D-01,
+     &8.3728D-01,7.6947D-01,7.0373D-01,6.3561D-01,5.7438D-01,5.1959D-01,
+     &4.6984D-01,4.3187D-01,3.9529D-01,3.5864D-01,3.2783D-01,3.0967D-01,
+     &2.9444D-01,2.8428D-01,2.7469D-01,2.6638D-01,2.5813D-01,2.4942D-01,
+     &2.3986D-01,2.2937D-01,2.1819D-01,2.0682D-01,1.9665D-01,1.8966D-01/
+      DATA (XUDF_L(K),K= 1483, 1596) /
+     &1.8971D-01,1.9926D-01,1.9036D-01,1.8442D-01,1.8192D-01,1.8362D-01,
+     &1.9037D-01,2.0318D-01,2.2459D-01,2.5904D-01,3.1665D-01,4.2407D-01,
+     &0.0000D+00,0.0000D+00,1.2798D+01,1.1861D+01,1.0986D+01,1.0144D+01,
+     &9.3643D+00,8.5887D+00,7.8706D+00,7.1866D+00,6.5568D+00,5.9419D+00,
+     &5.3754D+00,4.8419D+00,4.3593D+00,4.0864D+00,3.8109D+00,3.5127D+00,
+     &3.2315D+00,2.9714D+00,2.7252D+00,2.5309D+00,2.3356D+00,2.1269D+00,
+     &1.9338D+00,1.7578D+00,1.5939D+00,1.4656D+00,1.3394D+00,1.2075D+00,
+     &1.0875D+00,9.8023D-01,8.8256D-01,8.0772D-01,7.3533D-01,6.6054D-01,
+     &5.9364D-01,5.3423D-01,4.8009D-01,4.3930D-01,4.0003D-01,3.6079D-01,
+     &3.2768D-01,3.0809D-01,2.9130D-01,2.7993D-01,2.6898D-01,2.5976D-01,
+     &2.5062D-01,2.4123D-01,2.3116D-01,2.2040D-01,2.0917D-01,1.9814D-01,
+     &1.8865D-01,1.8272D-01,1.8428D-01,1.8820D-01,1.7883D-01,1.7238D-01,
+     &1.6914D-01,1.6979D-01,1.7482D-01,1.8534D-01,2.0325D-01,2.3214D-01,
+     &2.8022D-01,3.6659D-01,0.0000D+00,0.0000D+00,1.4900D+01,1.3767D+01,
+     &1.2708D+01,1.1700D+01,1.0766D+01,9.8403D+00,8.9832D+00,8.1757D+00,
+     &7.4366D+00,6.7121D+00,6.0486D+00,5.4300D+00,4.8704D+00,4.5555D+00,
+     &4.2371D+00,3.8955D+00,3.5734D+00,3.2760D+00,2.9952D+00,2.7738D+00,
+     &2.5528D+00,2.3175D+00,2.1001D+00,1.9012D+00,1.7176D+00,1.5750D+00,
+     &1.4344D+00,1.2880D+00,1.1547D+00,1.0364D+00,9.2859D-01,8.4652D-01/
+      DATA (XUDF_L(K),K= 1597, 1710) /
+     &7.6723D-01,6.8578D-01,6.1255D-01,5.4848D-01,4.9034D-01,4.4649D-01,
+     &4.0456D-01,3.6275D-01,3.2738D-01,3.0624D-01,2.8805D-01,2.7544D-01,
+     &2.6343D-01,2.5315D-01,2.4318D-01,2.3314D-01,2.2263D-01,2.1166D-01,
+     &2.0051D-01,1.8983D-01,1.8102D-01,1.7610D-01,1.7901D-01,1.7764D-01,
+     &1.6791D-01,1.6102D-01,1.5715D-01,1.5684D-01,1.6056D-01,1.6899D-01,
+     &1.8376D-01,2.0786D-01,2.4776D-01,3.1470D-01,0.0000D+00,0.0000D+00,
+     &1.7212D+01,1.5853D+01,1.4590D+01,1.3390D+01,1.2283D+01,1.1191D+01,
+     &1.0185D+01,9.2395D+00,8.3762D+00,7.5315D+00,6.7670D+00,6.0503D+00,
+     &5.4086D+00,5.0481D+00,4.6843D+00,4.2940D+00,3.9280D+00,3.5917D+00,
+     &3.2752D+00,3.0252D+00,2.7768D+00,2.5132D+00,2.2690D+00,2.0490D+00,
+     &1.8445D+00,1.6857D+00,1.5301D+00,1.3685D+00,1.2219D+00,1.0920D+00,
+     &9.7438D-01,8.8478D-01,7.9825D-01,7.1007D-01,6.3111D-01,5.6196D-01,
+     &5.0016D-01,4.5321D-01,4.0867D-01,3.6435D-01,3.2686D-01,3.0431D-01,
+     &2.8470D-01,2.7109D-01,2.5789D-01,2.4674D-01,2.3605D-01,2.2547D-01,
+     &2.1459D-01,2.0348D-01,1.9237D-01,1.8201D-01,1.7376D-01,1.6982D-01,
+     &1.7398D-01,1.6789D-01,1.5795D-01,1.5065D-01,1.4630D-01,1.4521D-01,
+     &1.4773D-01,1.5443D-01,1.6659D-01,1.8664D-01,2.1966D-01,2.6878D-01,
+     &0.0000D+00,0.0000D+00,1.9526D+01,1.7951D+01,1.6470D+01,1.5074D+01,
+     &1.3790D+01,1.2527D+01,1.1370D+01,1.0282D+01,9.2958D+00,8.3330D+00/
+      DATA (XUDF_L(K),K= 1711, 1824) /
+     &7.4603D+00,6.6536D+00,5.9285D+00,5.5219D+00,5.1141D+00,4.6768D+00,
+     &4.2681D+00,3.8926D+00,3.5402D+00,3.2626D+00,2.9882D+00,2.6963D+00,
+     &2.4284D+00,2.1851D+00,1.9619D+00,1.7885D+00,1.6187D+00,1.4429D+00,
+     &1.2838D+00,1.1431D+00,1.0159D+00,9.1924D-01,8.2663D-01,7.3180D-01,
+     &6.4793D-01,5.7429D-01,5.0828D-01,4.5904D-01,4.1215D-01,3.6558D-01,
+     &3.2620D-01,3.0238D-01,2.8167D-01,2.6700D-01,2.5302D-01,2.4098D-01,
+     &2.2975D-01,2.1873D-01,2.0756D-01,1.9633D-01,1.8532D-01,1.7533D-01,
+     &1.6763D-01,1.6450D-01,1.6959D-01,1.5953D-01,1.4943D-01,1.4185D-01,
+     &1.3716D-01,1.3545D-01,1.3705D-01,1.4238D-01,1.5258D-01,1.6945D-01,
+     &1.9705D-01,2.3049D-01,0.0000D+00,0.0000D+00,2.2141D+01,2.0286D+01,
+     &1.8570D+01,1.6948D+01,1.5466D+01,1.4010D+01,1.2679D+01,1.1431D+01,
+     &1.0303D+01,9.2106D+00,8.2239D+00,7.3077D+00,6.4926D+00,6.0348D+00,
+     &5.5765D+00,5.0879D+00,4.6321D+00,4.2138D+00,3.8233D+00,3.5162D+00,
+     &3.2122D+00,2.8907D+00,2.5960D+00,2.3300D+00,2.0856D+00,1.8954D+00,
+     &1.7110D+00,1.5199D+00,1.3476D+00,1.1955D+00,1.0584D+00,9.5478D-01,
+     &8.5531D-01,7.5417D-01,6.6439D-01,5.8623D-01,5.1682D-01,4.6468D-01,
+     &4.1541D-01,3.6662D-01,3.2538D-01,3.0035D-01,2.7843D-01,2.6291D-01,
+     &2.4798D-01,2.3522D-01,2.2346D-01,2.1203D-01,2.0062D-01,1.8935D-01,
+     &1.7843D-01,1.6874D-01,1.6163D-01,1.5920D-01,1.6520D-01,1.5147D-01/
+      DATA (XUDF_L(K),K= 1825, 1836) /
+     &1.4120D-01,1.3349D-01,1.2844D-01,1.2620D-01,1.2701D-01,1.3118D-01,
+     &1.3954D-01,1.5369D-01,1.7631D-01,1.9416D-01,0.0000D+00,0.0000D+00/
+      DATA (XSF_L(K),K=    1,  114) /
+     &8.9277D-03,9.2838D-03,9.6380D-03,9.9960D-03,1.0349D-02,1.0719D-02,
+     &1.1082D-02,1.1442D-02,1.1792D-02,1.2148D-02,1.2489D-02,1.2817D-02,
+     &1.3124D-02,1.3295D-02,1.3474D-02,1.3661D-02,1.3835D-02,1.3985D-02,
+     &1.4121D-02,1.4217D-02,1.4303D-02,1.4379D-02,1.4419D-02,1.4434D-02,
+     &1.4412D-02,1.4366D-02,1.4286D-02,1.4158D-02,1.3991D-02,1.3790D-02,
+     &1.3553D-02,1.3335D-02,1.3094D-02,1.2821D-02,1.2580D-02,1.2410D-02,
+     &1.2357D-02,1.2459D-02,1.2790D-02,1.3571D-02,1.5018D-02,1.6665D-02,
+     &1.9113D-02,2.1832D-02,2.5587D-02,2.9818D-02,3.4535D-02,3.9813D-02,
+     &4.5737D-02,5.2358D-02,5.9765D-02,6.8021D-02,7.7185D-02,8.7258D-02,
+     &9.8198D-02,1.1073D-01,1.4216D-01,1.8364D-01,2.3959D-01,3.1758D-01,
+     &4.3050D-01,6.0203D-01,8.8214D-01,1.3845D+00,2.4294D+00,5.2463D+00,
+     &1.8903D+01,0.0000D+00,1.4987D-02,1.5468D-02,1.5936D-02,1.6403D-02,
+     &1.6855D-02,1.7319D-02,1.7760D-02,1.8194D-02,1.8600D-02,1.9008D-02,
+     &1.9382D-02,1.9730D-02,2.0033D-02,2.0199D-02,2.0359D-02,2.0523D-02,
+     &2.0654D-02,2.0760D-02,2.0831D-02,2.0870D-02,2.0886D-02,2.0858D-02,
+     &2.0798D-02,2.0680D-02,2.0523D-02,2.0363D-02,2.0127D-02,1.9825D-02,
+     &1.9464D-02,1.9060D-02,1.8607D-02,1.8200D-02,1.7750D-02,1.7240D-02,
+     &1.6759D-02,1.6362D-02,1.6103D-02,1.6050D-02,1.6240D-02,1.6916D-02,
+     &1.8336D-02,2.0030D-02,2.2586D-02,2.5447D-02,2.9418D-02,3.3874D-02/
+      DATA (XSF_L(K),K=  115,  228) /
+     &3.8821D-02,4.4375D-02,5.0509D-02,5.7343D-02,6.4974D-02,7.3385D-02,
+     &8.2640D-02,9.2732D-02,1.0354D-01,1.1667D-01,1.4809D-01,1.8910D-01,
+     &2.4387D-01,3.1940D-01,4.2764D-01,5.9054D-01,8.5228D-01,1.3150D+00,
+     &2.2623D+00,4.7596D+00,1.6445D+01,0.0000D+00,2.5010D-02,2.5616D-02,
+     &2.6180D-02,2.6758D-02,2.7279D-02,2.7792D-02,2.8274D-02,2.8729D-02,
+     &2.9134D-02,2.9513D-02,2.9836D-02,3.0110D-02,3.0324D-02,3.0417D-02,
+     &3.0492D-02,3.0537D-02,3.0551D-02,3.0517D-02,3.0432D-02,3.0326D-02,
+     &3.0181D-02,2.9954D-02,2.9663D-02,2.9316D-02,2.8913D-02,2.8508D-02,
+     &2.8021D-02,2.7422D-02,2.6741D-02,2.5997D-02,2.5204D-02,2.4500D-02,
+     &2.3734D-02,2.2858D-02,2.2019D-02,2.1281D-02,2.0698D-02,2.0402D-02,
+     &2.0365D-02,2.0844D-02,2.2137D-02,2.3807D-02,2.6404D-02,2.9338D-02,
+     &3.3433D-02,3.8036D-02,4.3135D-02,4.8799D-02,5.5061D-02,6.1999D-02,
+     &6.9633D-02,7.8024D-02,8.7156D-02,9.6998D-02,1.0742D-01,1.2099D-01,
+     &1.5162D-01,1.9121D-01,2.4363D-01,3.1510D-01,4.1638D-01,5.6669D-01,
+     &8.0557D-01,1.2216D+00,2.0572D+00,4.2084D+00,1.3911D+01,0.0000D+00,
+     &4.2554D-02,4.3210D-02,4.3820D-02,4.4379D-02,4.4862D-02,4.5317D-02,
+     &4.5708D-02,4.6037D-02,4.6300D-02,4.6434D-02,4.6540D-02,4.6530D-02,
+     &4.6426D-02,4.6317D-02,4.6155D-02,4.5919D-02,4.5622D-02,4.5267D-02,
+     &4.4833D-02,4.4425D-02,4.3932D-02,4.3298D-02,4.2582D-02,4.1785D-02/
+      DATA (XSF_L(K),K=  229,  342) /
+     &4.0903D-02,4.0097D-02,3.9179D-02,3.8047D-02,3.6815D-02,3.5547D-02,
+     &3.4199D-02,3.3020D-02,3.1748D-02,3.0298D-02,2.8905D-02,2.7644D-02,
+     &2.6563D-02,2.5882D-02,2.5485D-02,2.5614D-02,2.6651D-02,2.8199D-02,
+     &3.0731D-02,3.3652D-02,3.7768D-02,4.2390D-02,4.7530D-02,5.3188D-02,
+     &5.9436D-02,6.6257D-02,7.3734D-02,8.1918D-02,9.0696D-02,1.0004D-01,
+     &1.0978D-01,1.2357D-01,1.5274D-01,1.8999D-01,2.3888D-01,3.0452D-01,
+     &3.9656D-01,5.3136D-01,7.4246D-01,1.1043D+00,1.8158D+00,3.6023D+00,
+     &0.0000D+00,0.0000D+00,7.3602D-02,7.4085D-02,7.4460D-02,7.4729D-02,
+     &7.4904D-02,7.4982D-02,7.4902D-02,7.4713D-02,7.4446D-02,7.3972D-02,
+     &7.3397D-02,7.2626D-02,7.1803D-02,7.1200D-02,7.0479D-02,6.9610D-02,
+     &6.8654D-02,6.7624D-02,6.6495D-02,6.5467D-02,6.4313D-02,6.2898D-02,
+     &6.1380D-02,5.9788D-02,5.8079D-02,5.6557D-02,5.4876D-02,5.2866D-02,
+     &5.0733D-02,4.8592D-02,4.6341D-02,4.4415D-02,4.2370D-02,4.0073D-02,
+     &3.7825D-02,3.5778D-02,3.3956D-02,3.2702D-02,3.1749D-02,3.1334D-02,
+     &3.1922D-02,3.3216D-02,3.5534D-02,3.8322D-02,4.2321D-02,4.6830D-02,
+     &5.1816D-02,5.7335D-02,6.3369D-02,6.9947D-02,7.7109D-02,8.4752D-02,
+     &9.2948D-02,1.0153D-01,1.1031D-01,1.2405D-01,1.5100D-01,1.8509D-01,
+     &2.2905D-01,2.8761D-01,3.6847D-01,4.8537D-01,6.6543D-01,9.6831D-01,
+     &1.5524D+00,2.9766D+00,0.0000D+00,0.0000D+00,1.1509D-01,1.1500D-01/
+      DATA (XSF_L(K),K=  343,  456) /
+     &1.1474D-01,1.1430D-01,1.1371D-01,1.1292D-01,1.1196D-01,1.1079D-01,
+     &1.0948D-01,1.0791D-01,1.0620D-01,1.0426D-01,1.0215D-01,1.0076D-01,
+     &9.9224D-02,9.7466D-02,9.5472D-02,9.3507D-02,9.1346D-02,8.9460D-02,
+     &8.7382D-02,8.4914D-02,8.2326D-02,7.9663D-02,7.6874D-02,7.4459D-02,
+     &7.1794D-02,6.8694D-02,6.5489D-02,6.2266D-02,5.8964D-02,5.6164D-02,
+     &5.3226D-02,4.9916D-02,4.6721D-02,4.3794D-02,4.1128D-02,3.9225D-02,
+     &3.7654D-02,3.6613D-02,3.6666D-02,3.7626D-02,3.9655D-02,4.2227D-02,
+     &4.6000D-02,5.0288D-02,5.5044D-02,6.0308D-02,6.6020D-02,7.2218D-02,
+     &7.8943D-02,8.6079D-02,9.3611D-02,1.0141D-01,1.0925D-01,1.2274D-01,
+     &1.4748D-01,1.7840D-01,2.1791D-01,2.6997D-01,3.4109D-01,4.4280D-01,
+     &5.9706D-01,8.5325D-01,1.3371D+00,2.4909D+00,0.0000D+00,0.0000D+00,
+     &1.8131D-01,1.7986D-01,1.7802D-01,1.7597D-01,1.7372D-01,1.7110D-01,
+     &1.6825D-01,1.6515D-01,1.6187D-01,1.5820D-01,1.5428D-01,1.5016D-01,
+     &1.4582D-01,1.4314D-01,1.4017D-01,1.3677D-01,1.3315D-01,1.2951D-01,
+     &1.2571D-01,1.2248D-01,1.1891D-01,1.1472D-01,1.1045D-01,1.0615D-01,
+     &1.0173D-01,9.7944D-02,9.3854D-02,8.9131D-02,8.4347D-02,7.9597D-02,
+     &7.4799D-02,7.0788D-02,6.6599D-02,6.1932D-02,5.7438D-02,5.3307D-02,
+     &4.9546D-02,4.6816D-02,4.4417D-02,4.2536D-02,4.1862D-02,4.2361D-02,
+     &4.3960D-02,4.6198D-02,4.9612D-02,5.3553D-02,5.7974D-02,6.2830D-02/
+      DATA (XSF_L(K),K=  457,  570) /
+     &6.8141D-02,7.3865D-02,7.9970D-02,8.6422D-02,9.3160D-02,1.0006D-01,
+     &1.0685D-01,1.1989D-01,1.4199D-01,1.6937D-01,2.0407D-01,2.4925D-01,
+     &3.1029D-01,3.9635D-01,5.2529D-01,7.3579D-01,1.1263D+00,2.0347D+00,
+     &0.0000D+00,0.0000D+00,2.6278D-01,2.5883D-01,2.5460D-01,2.5007D-01,
+     &2.4526D-01,2.3995D-01,2.3437D-01,2.2848D-01,2.2242D-01,2.1578D-01,
+     &2.0894D-01,2.0181D-01,1.9465D-01,1.9018D-01,1.8540D-01,1.7984D-01,
+     &1.7415D-01,1.6846D-01,1.6261D-01,1.5768D-01,1.5234D-01,1.4615D-01,
+     &1.3987D-01,1.3368D-01,1.2736D-01,1.2199D-01,1.1628D-01,1.0975D-01,
+     &1.0321D-01,9.6788D-02,9.0380D-02,8.5059D-02,7.9532D-02,7.3436D-02,
+     &6.7594D-02,6.2243D-02,5.7363D-02,5.3720D-02,5.0502D-02,4.7772D-02,
+     &4.6346D-02,4.6358D-02,4.7497D-02,4.9377D-02,5.2401D-02,5.5965D-02,
+     &6.0009D-02,6.4489D-02,6.9334D-02,7.4546D-02,8.0117D-02,8.5936D-02,
+     &9.1972D-02,9.8056D-02,1.0398D-01,1.1644D-01,1.3628D-01,1.6068D-01,
+     &1.9127D-01,2.3085D-01,2.8377D-01,3.5756D-01,4.6698D-01,6.4315D-01,
+     &9.6485D-01,1.6969D+00,0.0000D+00,0.0000D+00,3.6944D-01,3.6187D-01,
+     &3.5380D-01,3.4525D-01,3.3659D-01,3.2716D-01,3.1761D-01,3.0767D-01,
+     &2.9759D-01,2.8675D-01,2.7586D-01,2.6462D-01,2.5339D-01,2.4660D-01,
+     &2.3933D-01,2.3101D-01,2.2257D-01,2.1415D-01,2.0571D-01,1.9854D-01,
+     &1.9083D-01,1.8216D-01,1.7338D-01,1.6480D-01,1.5613D-01,1.4885D-01/
+      DATA (XSF_L(K),K=  571,  684) /
+     &1.4115D-01,1.3244D-01,1.2380D-01,1.1542D-01,1.0713D-01,1.0031D-01,
+     &9.3226D-02,8.5515D-02,7.8171D-02,7.1449D-02,6.5307D-02,6.0723D-02,
+     &5.6523D-02,5.2878D-02,5.0622D-02,5.0109D-02,5.0720D-02,5.2187D-02,
+     &5.4770D-02,5.7950D-02,6.1582D-02,6.5595D-02,6.9997D-02,7.4716D-02,
+     &7.9677D-02,8.4886D-02,9.0221D-02,9.5543D-02,1.0065D-01,1.1245D-01,
+     &1.3012D-01,1.5166D-01,1.7859D-01,2.1305D-01,2.5881D-01,3.2188D-01,
+     &4.1454D-01,5.6186D-01,8.2718D-01,1.4188D+00,0.0000D+00,0.0000D+00,
+     &4.9195D-01,4.7916D-01,4.6620D-01,4.5277D-01,4.3908D-01,4.2463D-01,
+     &4.0985D-01,3.9491D-01,3.7975D-01,3.6377D-01,3.4790D-01,3.3178D-01,
+     &3.1592D-01,3.0640D-01,2.9622D-01,2.8462D-01,2.7303D-01,2.6160D-01,
+     &2.5012D-01,2.4047D-01,2.3023D-01,2.1867D-01,2.0717D-01,1.9597D-01,
+     &1.8477D-01,1.7546D-01,1.6568D-01,1.5468D-01,1.4387D-01,1.3343D-01,
+     &1.2319D-01,1.1482D-01,1.0622D-01,9.6828D-02,8.7978D-02,7.9884D-02,
+     &7.2526D-02,6.6973D-02,6.1948D-02,5.7359D-02,5.4304D-02,5.3263D-02,
+     &5.3381D-02,5.4456D-02,5.6601D-02,5.9380D-02,6.2613D-02,6.6252D-02,
+     &7.0174D-02,7.4432D-02,7.8943D-02,8.3559D-02,8.8282D-02,9.2963D-02,
+     &9.7382D-02,1.0858D-01,1.2441D-01,1.4363D-01,1.6745D-01,1.9778D-01,
+     &2.3771D-01,2.9246D-01,3.7200D-01,4.9738D-01,7.2010D-01,1.2083D+00,
+     &0.0000D+00,0.0000D+00,6.4521D-01,6.2534D-01,6.0540D-01,5.8499D-01/
+      DATA (XSF_L(K),K=  685,  798) /
+     &5.6467D-01,5.4301D-01,5.2143D-01,4.9951D-01,4.7813D-01,4.5538D-01,
+     &4.3325D-01,4.1083D-01,3.8899D-01,3.7591D-01,3.6210D-01,3.4648D-01,
+     &3.3091D-01,3.1578D-01,3.0062D-01,2.8797D-01,2.7469D-01,2.5979D-01,
+     &2.4501D-01,2.3066D-01,2.1649D-01,2.0481D-01,1.9252D-01,1.7884D-01,
+     &1.6549D-01,1.5274D-01,1.4029D-01,1.3018D-01,1.1985D-01,1.0865D-01,
+     &9.8135D-02,8.8550D-02,7.9829D-02,7.3318D-02,6.7269D-02,6.1748D-02,
+     &5.7838D-02,5.6250D-02,5.5826D-02,5.6474D-02,5.8181D-02,6.0533D-02,
+     &6.3373D-02,6.6563D-02,7.0085D-02,7.3865D-02,7.7842D-02,8.1937D-02,
+     &8.6092D-02,9.0169D-02,9.3962D-02,1.0448D-01,1.1858D-01,1.3561D-01,
+     &1.5663D-01,1.8318D-01,2.1803D-01,2.6529D-01,3.3349D-01,4.3985D-01,
+     &6.2661D-01,1.0291D+00,0.0000D+00,0.0000D+00,8.2462D-01,7.9558D-01,
+     &7.6680D-01,7.3764D-01,7.0860D-01,6.7834D-01,6.4822D-01,6.1798D-01,
+     &5.8880D-01,5.5792D-01,5.2800D-01,4.9801D-01,4.6912D-01,4.5197D-01,
+     &4.3393D-01,4.1360D-01,3.9348D-01,3.7394D-01,3.5462D-01,3.3856D-01,
+     &3.2180D-01,3.0303D-01,2.8460D-01,2.6681D-01,2.4932D-01,2.3502D-01,
+     &2.2005D-01,2.0359D-01,1.8747D-01,1.7224D-01,1.5746D-01,1.4551D-01,
+     &1.3337D-01,1.2028D-01,1.0805D-01,9.6986D-02,8.6877D-02,7.9334D-02,
+     &7.2326D-02,6.5799D-02,6.1060D-02,5.8911D-02,5.7957D-02,5.8189D-02,
+     &5.9441D-02,6.1387D-02,6.3834D-02,6.6632D-02,6.9732D-02,7.3070D-02/
+      DATA (XSF_L(K),K=  799,  912) /
+     &7.6595D-02,8.0190D-02,8.3816D-02,8.7358D-02,9.0631D-02,1.0046D-01,
+     &1.1304D-01,1.2815D-01,1.4670D-01,1.7006D-01,2.0049D-01,2.4154D-01,
+     &3.0039D-01,3.9121D-01,5.4894D-01,8.8378D-01,0.0000D+00,0.0000D+00,
+     &1.0199D+00,9.8025D-01,9.4100D-01,9.0151D-01,8.6283D-01,8.2243D-01,
+     &7.8262D-01,7.4321D-01,7.0465D-01,6.6494D-01,6.2647D-01,5.8811D-01,
+     &5.5152D-01,5.2985D-01,5.0721D-01,4.8183D-01,4.5681D-01,4.3274D-01,
+     &4.0883D-01,3.8916D-01,3.6878D-01,3.4589D-01,3.2366D-01,3.0238D-01,
+     &2.8152D-01,2.6437D-01,2.4685D-01,2.2733D-01,2.0858D-01,1.9085D-01,
+     &1.7375D-01,1.6000D-01,1.4607D-01,1.3115D-01,1.1722D-01,1.0469D-01,
+     &9.3284D-02,8.4739D-02,7.6803D-02,6.9420D-02,6.3844D-02,6.1178D-02,
+     &5.9720D-02,5.9561D-02,6.0398D-02,6.1984D-02,6.4051D-02,6.6494D-02,
+     &6.9202D-02,7.2161D-02,7.5274D-02,7.8453D-02,8.1651D-02,8.4728D-02,
+     &8.7564D-02,9.6777D-02,1.0806D-01,1.2157D-01,1.3806D-01,1.5882D-01,
+     &1.8566D-01,2.2170D-01,2.7301D-01,3.5168D-01,4.8696D-01,7.7010D-01,
+     &0.0000D+00,0.0000D+00,1.3158D+00,1.2585D+00,1.2024D+00,1.1462D+00,
+     &1.0919D+00,1.0352D+00,9.8042D-01,9.2608D-01,8.7345D-01,8.1987D-01,
+     &7.6814D-01,7.1724D-01,6.6882D-01,6.4053D-01,6.1093D-01,5.7796D-01,
+     &5.4572D-01,5.1470D-01,4.8433D-01,4.5934D-01,4.3358D-01,4.0495D-01,
+     &3.7717D-01,3.5082D-01,3.2513D-01,3.0408D-01,2.8258D-01,2.5918D-01/
+      DATA (XSF_L(K),K=  913, 1026) /
+     &2.3648D-01,2.1538D-01,1.9510D-01,1.7888D-01,1.6255D-01,1.4508D-01,
+     &1.2895D-01,1.1443D-01,1.0131D-01,9.1507D-02,8.2387D-02,7.3778D-02,
+     &6.7147D-02,6.3813D-02,6.1721D-02,6.1065D-02,6.1373D-02,6.2475D-02,
+     &6.4105D-02,6.6079D-02,6.8362D-02,7.0856D-02,7.3440D-02,7.6143D-02,
+     &7.8812D-02,8.1388D-02,8.3726D-02,9.2167D-02,1.0190D-01,1.1355D-01,
+     &1.2780D-01,1.4554D-01,1.6841D-01,1.9900D-01,2.4223D-01,3.0775D-01,
+     &4.1920D-01,6.4849D-01,0.0000D+00,0.0000D+00,1.6483D+00,1.5703D+00,
+     &1.4940D+00,1.4180D+00,1.3449D+00,1.2694D+00,1.1966D+00,1.1250D+00,
+     &1.0566D+00,9.8644D-01,9.1985D-01,8.5482D-01,7.9312D-01,7.5722D-01,
+     &7.1986D-01,6.7849D-01,6.3821D-01,5.9972D-01,5.6214D-01,5.3143D-01,
+     &4.9987D-01,4.6500D-01,4.3136D-01,3.9956D-01,3.6875D-01,3.4379D-01,
+     &3.1832D-01,2.9044D-01,2.6397D-01,2.3923D-01,2.1580D-01,1.9706D-01,
+     &1.7829D-01,1.5838D-01,1.3999D-01,1.2356D-01,1.0875D-01,9.7664D-02,
+     &8.7392D-02,7.7645D-02,7.0035D-02,6.6062D-02,6.3365D-02,6.2239D-02,
+     &6.2062D-02,6.2731D-02,6.3942D-02,6.5526D-02,6.7390D-02,6.9436D-02,
+     &7.1635D-02,7.3891D-02,7.6122D-02,7.8246D-02,8.0196D-02,8.7884D-02,
+     &9.6357D-02,1.0648D-01,1.1880D-01,1.3413D-01,1.5386D-01,1.7993D-01,
+     &2.1655D-01,2.7189D-01,3.6486D-01,5.5332D-01,0.0000D+00,0.0000D+00,
+     &2.0271D+00,1.9234D+00,1.8224D+00,1.7226D+00,1.6272D+00,1.5293D+00/
+      DATA (XSF_L(K),K= 1027, 1140) /
+     &1.4356D+00,1.3438D+00,1.2568D+00,1.1682D+00,1.0841D+00,1.0026D+00,
+     &9.2625D-01,8.8207D-01,8.3568D-01,7.8523D-01,7.3607D-01,6.8926D-01,
+     &6.4385D-01,6.0685D-01,5.6892D-01,5.2730D-01,4.8731D-01,4.4961D-01,
+     &4.1331D-01,3.8417D-01,3.5441D-01,3.2210D-01,2.9168D-01,2.6323D-01,
+     &2.3631D-01,2.1500D-01,1.9374D-01,1.7129D-01,1.5067D-01,1.3231D-01,
+     &1.1579D-01,1.0349D-01,9.2080D-02,8.1205D-02,7.2626D-02,6.8039D-02,
+     &6.4761D-02,6.3188D-02,6.2549D-02,6.2795D-02,6.3617D-02,6.4835D-02,
+     &6.6329D-02,6.8017D-02,6.9809D-02,7.1667D-02,7.3520D-02,7.5270D-02,
+     &7.6864D-02,8.3899D-02,9.1206D-02,1.0002D-01,1.1070D-01,1.2399D-01,
+     &1.4094D-01,1.6341D-01,1.9474D-01,2.4163D-01,3.1971D-01,4.7587D-01,
+     &0.0000D+00,0.0000D+00,2.4392D+00,2.3049D+00,2.1760D+00,2.0502D+00,
+     &1.9296D+00,1.8065D+00,1.6895D+00,1.5750D+00,1.4674D+00,1.3585D+00,
+     &1.2554D+00,1.1565D+00,1.0638D+00,1.0103D+00,9.5527D-01,8.9449D-01,
+     &8.3572D-01,7.8018D-01,7.2635D-01,6.8280D-01,6.3819D-01,5.8948D-01,
+     &5.4299D-01,4.9923D-01,4.5740D-01,4.2371D-01,3.8978D-01,3.5296D-01,
+     &3.1832D-01,2.8629D-01,2.5599D-01,2.3212D-01,2.0840D-01,1.8346D-01,
+     &1.6065D-01,1.4043D-01,1.2229D-01,1.0880D-01,9.6294D-02,8.4335D-02,
+     &7.4905D-02,6.9717D-02,6.5897D-02,6.3914D-02,6.2851D-02,6.2731D-02,
+     &6.3183D-02,6.4075D-02,6.5225D-02,6.6597D-02,6.8048D-02,6.9577D-02/
+      DATA (XSF_L(K),K= 1141, 1254) /
+     &7.1093D-02,7.2525D-02,7.3842D-02,8.0241D-02,8.6615D-02,9.4292D-02,
+     &1.0360D-01,1.1517D-01,1.2992D-01,1.4936D-01,1.7633D-01,2.1652D-01,
+     &2.8294D-01,4.1389D-01,0.0000D+00,0.0000D+00,2.9162D+00,2.7470D+00,
+     &2.5840D+00,2.4244D+00,2.2743D+00,2.1215D+00,1.9764D+00,1.8358D+00,
+     &1.7035D+00,1.5708D+00,1.4463D+00,1.3268D+00,1.2152D+00,1.1514D+00,
+     &1.0857D+00,1.0132D+00,9.4449D-01,8.7867D-01,8.1556D-01,7.6453D-01,
+     &7.1252D-01,6.5602D-01,6.0218D-01,5.5192D-01,5.0387D-01,4.6545D-01,
+     &4.2679D-01,3.8521D-01,3.4602D-01,3.1005D-01,2.7623D-01,2.4962D-01,
+     &2.2332D-01,1.9577D-01,1.7070D-01,1.4856D-01,1.2874D-01,1.1402D-01,
+     &1.0040D-01,8.7343D-02,7.6984D-02,7.1254D-02,6.6892D-02,6.4508D-02,
+     &6.3019D-02,6.2518D-02,6.2667D-02,6.3211D-02,6.4031D-02,6.5064D-02,
+     &6.6243D-02,6.7458D-02,6.8679D-02,6.9830D-02,7.0885D-02,7.6672D-02,
+     &8.2192D-02,8.8844D-02,9.6930D-02,1.0696D-01,1.1972D-01,1.3654D-01,
+     &1.5978D-01,1.9411D-01,2.5048D-01,3.6023D-01,0.0000D+00,0.0000D+00,
+     &3.4281D+00,3.2194D+00,3.0180D+00,2.8239D+00,2.6400D+00,2.4537D+00,
+     &2.2781D+00,2.1087D+00,1.9503D+00,1.7915D+00,1.6433D+00,1.5021D+00,
+     &1.3711D+00,1.2958D+00,1.2191D+00,1.1350D+00,1.0536D+00,9.7846D-01,
+     &9.0526D-01,8.4668D-01,7.8697D-01,7.2243D-01,6.6110D-01,6.0402D-01,
+     &5.4971D-01,5.0652D-01,4.6307D-01,4.1647D-01,3.7287D-01,3.3288D-01/
+      DATA (XSF_L(K),K= 1255, 1368) /
+     &2.9545D-01,2.6636D-01,2.3751D-01,2.0740D-01,1.8012D-01,1.5611D-01,
+     &1.3467D-01,1.1881D-01,1.0414D-01,9.0105D-02,7.8839D-02,7.2563D-02,
+     &6.7703D-02,6.4930D-02,6.3070D-02,6.2241D-02,6.2071D-02,6.2347D-02,
+     &6.2882D-02,6.3645D-02,6.4526D-02,6.5473D-02,6.6427D-02,6.7333D-02,
+     &6.8194D-02,7.3430D-02,7.8217D-02,8.3974D-02,9.1017D-02,9.9745D-02,
+     &1.1088D-01,1.2552D-01,1.4563D-01,1.7528D-01,2.2351D-01,3.1636D-01,
+     &0.0000D+00,0.0000D+00,3.9892D+00,3.7328D+00,3.4900D+00,3.2549D+00,
+     &3.0344D+00,2.8108D+00,2.6014D+00,2.4001D+00,2.2123D+00,2.0253D+00,
+     &1.8518D+00,1.6860D+00,1.5339D+00,1.4463D+00,1.3575D+00,1.2608D+00,
+     &1.1678D+00,1.0809D+00,9.9767D-01,9.3087D-01,8.6314D-01,7.8996D-01,
+     &7.2083D-01,6.5671D-01,5.9602D-01,5.4775D-01,4.9935D-01,4.4773D-01,
+     &3.9951D-01,3.5571D-01,3.1467D-01,2.8272D-01,2.5135D-01,2.1871D-01,
+     &1.8923D-01,1.6331D-01,1.4031D-01,1.2332D-01,1.0762D-01,9.2560D-02,
+     &8.0473D-02,7.3714D-02,6.8385D-02,6.5246D-02,6.3019D-02,6.1878D-02,
+     &6.1420D-02,6.1413D-02,6.1734D-02,6.2226D-02,6.2861D-02,6.3564D-02,
+     &6.4288D-02,6.4985D-02,6.5657D-02,7.0367D-02,7.4522D-02,7.9506D-02,
+     &8.5651D-02,9.3297D-02,1.0298D-01,1.1572D-01,1.3323D-01,1.5884D-01,
+     &2.0039D-01,2.7925D-01,0.0000D+00,0.0000D+00,4.5788D+00,4.2729D+00,
+     &3.9840D+00,3.7039D+00,3.4438D+00,3.1812D+00,2.9349D+00,2.6996D+00/
+      DATA (XSF_L(K),K= 1369, 1482) /
+     &2.4810D+00,2.2644D+00,2.0633D+00,1.8732D+00,1.6979D+00,1.5988D+00,
+     &1.4974D+00,1.3865D+00,1.2812D+00,1.1834D+00,1.0891D+00,1.0143D+00,
+     &9.3839D-01,8.5662D-01,7.7948D-01,7.0838D-01,6.4106D-01,5.8780D-01,
+     &5.3454D-01,4.7781D-01,4.2528D-01,3.7737D-01,3.3289D-01,2.9818D-01,
+     &2.6446D-01,2.2932D-01,1.9770D-01,1.7005D-01,1.4552D-01,1.2746D-01,
+     &1.1078D-01,9.4770D-02,8.1957D-02,7.4689D-02,6.8915D-02,6.5457D-02,
+     &6.2902D-02,6.1493D-02,6.0768D-02,6.0515D-02,6.0585D-02,6.0863D-02,
+     &6.1298D-02,6.1789D-02,6.2311D-02,6.2835D-02,6.3340D-02,6.7601D-02,
+     &7.1162D-02,7.5516D-02,8.0878D-02,8.7566D-02,9.6095D-02,1.0725D-01,
+     &1.2258D-01,1.4495D-01,1.8090D-01,2.4841D-01,0.0000D+00,0.0000D+00,
+     &5.4774D+00,5.0929D+00,4.7320D+00,4.3841D+00,4.0592D+00,3.7350D+00,
+     &3.4329D+00,3.1454D+00,2.8799D+00,2.6172D+00,2.3747D+00,2.1466D+00,
+     &1.9383D+00,1.8195D+00,1.6996D+00,1.5689D+00,1.4457D+00,1.3301D+00,
+     &1.2211D+00,1.1339D+00,1.0456D+00,9.5119D-01,8.6259D-01,7.8097D-01,
+     &7.0419D-01,6.4380D-01,5.8358D-01,5.1955D-01,4.6051D-01,4.0719D-01,
+     &3.5768D-01,3.1962D-01,2.8220D-01,2.4360D-01,2.0909D-01,1.7895D-01,
+     &1.5240D-01,1.3282D-01,1.1484D-01,9.7655D-02,8.3739D-02,7.5857D-02,
+     &6.9509D-02,6.5616D-02,6.2633D-02,6.0853D-02,5.9819D-02,5.9271D-02,
+     &5.9038D-02,5.9046D-02,5.9192D-02,5.9432D-02,5.9709D-02,6.0008D-02/
+      DATA (XSF_L(K),K= 1483, 1596) /
+     &6.0340D-02,6.4032D-02,6.6851D-02,7.0446D-02,7.4870D-02,8.0457D-02,
+     &8.7554D-02,9.6862D-02,1.0964D-01,1.2821D-01,1.5779D-01,2.1189D-01,
+     &0.0000D+00,0.0000D+00,6.3982D+00,5.9307D+00,5.4920D+00,5.0710D+00,
+     &4.6822D+00,4.2915D+00,3.9337D+00,3.5898D+00,3.2756D+00,2.9660D+00,
+     &2.6817D+00,2.4150D+00,2.1724D+00,2.0348D+00,1.8961D+00,1.7457D+00,
+     &1.6034D+00,1.4714D+00,1.3471D+00,1.2473D+00,1.1476D+00,1.0408D+00,
+     &9.4083D-01,8.4932D-01,7.6350D-01,6.9606D-01,6.2897D-01,5.5833D-01,
+     &4.9315D-01,4.3444D-01,3.8044D-01,3.3861D-01,2.9817D-01,2.5642D-01,
+     &2.1917D-01,1.8685D-01,1.5838D-01,1.3752D-01,1.1831D-01,9.9987D-02,
+     &8.5224D-02,7.6762D-02,6.9910D-02,6.5655D-02,6.2297D-02,6.0213D-02,
+     &5.8897D-02,5.8096D-02,5.7624D-02,5.7400D-02,5.7322D-02,5.7351D-02,
+     &5.7432D-02,5.7560D-02,5.7758D-02,6.0939D-02,6.3212D-02,6.6167D-02,
+     &6.9884D-02,7.4560D-02,8.0552D-02,8.8432D-02,9.9242D-02,1.1491D-01,
+     &1.3966D-01,1.8320D-01,0.0000D+00,0.0000D+00,7.4490D+00,6.8826D+00,
+     &6.3540D+00,5.8477D+00,5.3805D+00,4.9187D+00,4.4884D+00,4.0843D+00,
+     &3.7147D+00,3.3516D+00,3.0193D+00,2.7088D+00,2.4279D+00,2.2696D+00,
+     &2.1091D+00,1.9368D+00,1.7739D+00,1.6237D+00,1.4821D+00,1.3692D+00,
+     &1.2557D+00,1.1358D+00,1.0238D+00,9.2133D-01,8.2567D-01,7.5070D-01,
+     &6.7656D-01,5.9850D-01,5.2688D-01,4.6263D-01,4.0371D-01,3.5842D-01/
+      DATA (XSF_L(K),K= 1597, 1710) /
+     &3.1427D-01,2.6933D-01,2.2930D-01,1.9466D-01,1.6427D-01,1.4208D-01,
+     &1.2168D-01,1.0226D-01,8.6560D-02,7.7553D-02,7.0202D-02,6.5576D-02,
+     &6.1860D-02,5.9487D-02,5.7920D-02,5.6852D-02,5.6166D-02,5.5736D-02,
+     &5.5458D-02,5.5289D-02,5.5193D-02,5.5163D-02,5.5243D-02,5.7935D-02,
+     &5.9740D-02,6.2111D-02,6.5158D-02,6.9050D-02,7.4078D-02,8.0683D-02,
+     &8.9776D-02,1.0288D-01,1.2351D-01,1.5725D-01,0.0000D+00,0.0000D+00,
+     &8.6044D+00,7.9255D+00,7.2940D+00,6.6940D+00,6.1391D+00,5.5940D+00,
+     &5.0907D+00,4.6180D+00,4.1841D+00,3.7622D+00,3.3775D+00,3.0195D+00,
+     &2.6967D+00,2.5153D+00,2.3331D+00,2.1364D+00,1.9521D+00,1.7815D+00,
+     &1.6211D+00,1.4944D+00,1.3683D+00,1.2334D+00,1.1084D+00,9.9465D-01,
+     &8.8864D-01,8.0585D-01,7.2432D-01,6.3866D-01,5.6038D-01,4.9058D-01,
+     &4.2648D-01,3.7768D-01,3.3036D-01,2.8189D-01,2.3907D-01,2.0214D-01,
+     &1.6987D-01,1.4635D-01,1.2479D-01,1.0428D-01,8.7748D-02,7.8203D-02,
+     &7.0386D-02,6.5431D-02,6.1373D-02,5.8719D-02,5.6916D-02,5.5642D-02,
+     &5.4751D-02,5.4118D-02,5.3653D-02,5.3314D-02,5.3067D-02,5.2897D-02,
+     &5.2861D-02,5.5140D-02,5.6493D-02,5.8378D-02,6.0860D-02,6.4090D-02,
+     &6.8261D-02,7.3828D-02,8.1439D-02,9.2423D-02,1.0952D-01,1.3424D-01,
+     &0.0000D+00,0.0000D+00,9.7645D+00,8.9701D+00,8.2340D+00,7.5357D+00,
+     &6.8926D+00,6.2607D+00,5.6834D+00,5.1374D+00,4.6459D+00,4.1625D+00/
+      DATA (XSF_L(K),K= 1711, 1824) /
+     &3.7261D+00,3.3206D+00,2.9567D+00,2.7529D+00,2.5476D+00,2.3274D+00,
+     &2.1217D+00,1.9320D+00,1.7541D+00,1.6131D+00,1.4740D+00,1.3257D+00,
+     &1.1879D+00,1.0631D+00,9.4732D-01,8.5726D-01,7.6844D-01,6.7586D-01,
+     &5.9131D-01,5.1597D-01,4.4748D-01,3.9504D-01,3.4470D-01,2.9317D-01,
+     &2.4779D-01,2.0880D-01,1.7478D-01,1.5007D-01,1.2748D-01,1.0600D-01,
+     &8.8713D-02,7.8704D-02,7.0472D-02,6.5220D-02,6.0885D-02,5.7993D-02,
+     &5.5967D-02,5.4536D-02,5.3470D-02,5.2665D-02,5.2054D-02,5.1577D-02,
+     &5.1203D-02,5.0930D-02,5.0809D-02,5.2731D-02,5.3716D-02,5.5192D-02,
+     &5.7203D-02,5.9902D-02,6.3412D-02,6.8123D-02,7.4602D-02,8.3905D-02,
+     &9.8185D-02,1.1515D-01,0.0000D+00,0.0000D+00,1.1069D+01,1.0141D+01,
+     &9.2840D+00,8.4741D+00,7.7316D+00,7.0038D+00,6.3364D+00,5.7137D+00,
+     &5.1475D+00,4.6031D+00,4.1059D+00,3.6477D+00,3.2381D+00,3.0086D+00,
+     &2.7788D+00,2.5333D+00,2.3033D+00,2.0926D+00,1.8951D+00,1.7404D+00,
+     &1.5854D+00,1.4229D+00,1.2715D+00,1.1352D+00,1.0089D+00,9.1089D-01,
+     &8.1457D-01,7.1424D-01,6.2332D-01,5.4229D-01,4.6872D-01,4.1295D-01,
+     &3.5903D-01,3.0454D-01,2.5654D-01,2.1539D-01,1.7965D-01,1.5373D-01,
+     &1.3011D-01,1.0766D-01,8.9530D-02,7.9108D-02,7.0483D-02,6.4943D-02,
+     &6.0331D-02,5.7203D-02,5.4990D-02,5.3395D-02,5.2144D-02,5.1206D-02,
+     &5.0454D-02,4.9840D-02,4.9351D-02,4.8978D-02,4.8801D-02,5.0351D-02/
+      DATA (XSF_L(K),K= 1825, 1836) /
+     &5.1017D-02,5.2127D-02,5.3737D-02,5.5934D-02,5.8835D-02,6.2800D-02,
+     &6.8260D-02,7.6135D-02,8.7873D-02,0.0000D+00,0.0000D+00,0.0000D+00/
+      DATA (XGF_L(K),K=    1,  114) /
+     &1.0646D+00,1.0934D+00,1.1214D+00,1.1484D+00,1.1741D+00,1.1999D+00,
+     &1.2242D+00,1.2466D+00,1.2676D+00,1.2873D+00,1.3042D+00,1.3194D+00,
+     &1.3313D+00,1.3376D+00,1.3430D+00,1.3472D+00,1.3502D+00,1.3504D+00,
+     &1.3501D+00,1.3478D+00,1.3430D+00,1.3356D+00,1.3267D+00,1.3149D+00,
+     &1.3003D+00,1.2857D+00,1.2680D+00,1.2451D+00,1.2189D+00,1.1899D+00,
+     &1.1575D+00,1.1282D+00,1.0947D+00,1.0543D+00,1.0121D+00,9.6983D-01,
+     &9.2809D-01,8.9556D-01,8.6663D-01,8.4606D-01,8.4971D-01,8.7714D-01,
+     &9.3569D-01,1.0140D+00,1.1325D+00,1.2706D+00,1.4268D+00,1.6005D+00,
+     &1.7918D+00,2.0014D+00,2.2301D+00,2.4791D+00,2.7490D+00,3.0404D+00,
+     &3.3541D+00,3.5718D+00,4.2579D+00,5.0478D+00,5.9674D+00,7.0458D+00,
+     &8.3375D+00,9.9284D+00,1.1949D+01,1.4650D+01,1.8560D+01,2.5096D+01,
+     &4.0067D+01,0.0000D+00,1.6404D+00,1.6723D+00,1.7014D+00,1.7287D+00,
+     &1.7533D+00,1.7768D+00,1.7973D+00,1.8152D+00,1.8297D+00,1.8417D+00,
+     &1.8498D+00,1.8540D+00,1.8544D+00,1.8526D+00,1.8489D+00,1.8424D+00,
+     &1.8335D+00,1.8221D+00,1.8091D+00,1.7949D+00,1.7784D+00,1.7555D+00,
+     &1.7310D+00,1.7034D+00,1.6713D+00,1.6428D+00,1.6093D+00,1.5680D+00,
+     &1.5230D+00,1.4754D+00,1.4241D+00,1.3785D+00,1.3278D+00,1.2681D+00,
+     &1.2068D+00,1.1462D+00,1.0867D+00,1.0400D+00,9.9665D-01,9.6041D-01,
+     &9.4923D-01,9.6563D-01,1.0117D+00,1.0781D+00,1.1816D+00,1.3028D+00/
+      DATA (XGF_L(K),K=  115,  228) /
+     &1.4397D+00,1.5912D+00,1.7573D+00,1.9376D+00,2.1326D+00,2.3425D+00,
+     &2.5677D+00,2.8078D+00,3.0611D+00,3.2398D+00,3.7904D+00,4.4126D+00,
+     &5.1162D+00,5.9322D+00,6.8841D+00,8.0278D+00,9.4403D+00,1.1276D+01,
+     &1.3844D+01,1.7948D+01,2.6821D+01,0.0000D+00,2.5295D+00,2.5563D+00,
+     &2.5800D+00,2.5995D+00,2.6174D+00,2.6286D+00,2.6363D+00,2.6395D+00,
+     &2.6379D+00,2.6306D+00,2.6184D+00,2.6000D+00,2.5768D+00,2.5598D+00,
+     &2.5397D+00,2.5137D+00,2.4839D+00,2.4516D+00,2.4161D+00,2.3833D+00,
+     &2.3459D+00,2.3000D+00,2.2499D+00,2.1966D+00,2.1407D+00,2.0900D+00,
+     &2.0320D+00,1.9647D+00,1.8929D+00,1.8190D+00,1.7411D+00,1.6734D+00,
+     &1.5997D+00,1.5142D+00,1.4279D+00,1.3438D+00,1.2617D+00,1.1967D+00,
+     &1.1353D+00,1.0800D+00,1.0501D+00,1.0526D+00,1.0849D+00,1.1369D+00,
+     &1.2228D+00,1.3250D+00,1.4410D+00,1.5691D+00,1.7085D+00,1.8587D+00,
+     &2.0200D+00,2.1915D+00,2.3728D+00,2.5633D+00,2.7603D+00,2.9047D+00,
+     &3.3315D+00,3.8026D+00,4.3243D+00,4.9121D+00,5.5828D+00,6.3648D+00,
+     &7.3038D+00,8.4817D+00,1.0068D+01,1.2484D+01,1.7398D+01,0.0000D+00,
+     &3.9781D+00,3.9859D+00,3.9880D+00,3.9845D+00,3.9763D+00,3.9582D+00,
+     &3.9337D+00,3.9028D+00,3.8636D+00,3.8159D+00,3.7613D+00,3.6984D+00,
+     &3.6287D+00,3.5836D+00,3.5326D+00,3.4703D+00,3.4046D+00,3.3350D+00,
+     &3.2612D+00,3.1962D+00,3.1248D+00,3.0388D+00,2.9485D+00,2.8565D+00/
+      DATA (XGF_L(K),K=  229,  342) /
+     &2.7591D+00,2.6752D+00,2.5823D+00,2.4756D+00,2.3627D+00,2.2510D+00,
+     &2.1352D+00,2.0365D+00,1.9308D+00,1.8097D+00,1.6896D+00,1.5737D+00,
+     &1.4618D+00,1.3735D+00,1.2886D+00,1.2087D+00,1.1551D+00,1.1411D+00,
+     &1.1545D+00,1.1903D+00,1.2550D+00,1.3356D+00,1.4282D+00,1.5306D+00,
+     &1.6419D+00,1.7606D+00,1.8869D+00,2.0194D+00,2.1574D+00,2.2992D+00,
+     &2.4432D+00,2.5568D+00,2.8674D+00,3.2008D+00,3.5626D+00,3.9572D+00,
+     &4.3932D+00,4.8857D+00,5.4544D+00,6.1386D+00,7.0188D+00,8.2895D+00,
+     &1.0709D+01,0.0000D+00,6.3697D+00,6.3265D+00,6.2740D+00,6.2091D+00,
+     &6.1391D+00,6.0517D+00,5.9560D+00,5.8525D+00,5.7367D+00,5.6106D+00,
+     &5.4709D+00,5.3235D+00,5.1695D+00,5.0724D+00,4.9662D+00,4.8411D+00,
+     &4.7105D+00,4.5784D+00,4.4412D+00,4.3226D+00,4.1943D+00,4.0442D+00,
+     &3.8903D+00,3.7360D+00,3.5773D+00,3.4420D+00,3.2967D+00,3.1301D+00,
+     &2.9593D+00,2.7916D+00,2.6229D+00,2.4802D+00,2.3301D+00,2.1613D+00,
+     &1.9957D+00,1.8382D+00,1.6875D+00,1.5691D+00,1.4545D+00,1.3433D+00,
+     &1.2614D+00,1.2264D+00,1.2177D+00,1.2342D+00,1.2749D+00,1.3313D+00,
+     &1.3987D+00,1.4740D+00,1.5559D+00,1.6431D+00,1.7346D+00,1.8295D+00,
+     &1.9260D+00,2.0232D+00,2.1174D+00,2.2034D+00,2.4118D+00,2.6289D+00,
+     &2.8563D+00,3.0948D+00,3.3486D+00,3.6231D+00,3.9250D+00,4.2677D+00,
+     &4.6847D+00,5.2492D+00,6.2650D+00,0.0000D+00,9.3778D+00,9.2428D+00/
+      DATA (XGF_L(K),K=  343,  456) /
+     &9.0960D+00,8.9365D+00,8.7665D+00,8.5746D+00,8.3714D+00,8.1544D+00,
+     &7.9343D+00,7.6882D+00,7.4352D+00,7.1724D+00,6.9027D+00,6.7360D+00,
+     &6.5571D+00,6.3494D+00,6.1374D+00,5.9260D+00,5.7093D+00,5.5249D+00,
+     &5.3270D+00,5.0995D+00,4.8700D+00,4.6419D+00,4.4114D+00,4.2173D+00,
+     &4.0129D+00,3.7786D+00,3.5451D+00,3.3173D+00,3.0900D+00,2.9004D+00,
+     &2.7040D+00,2.4853D+00,2.2734D+00,2.0742D+00,1.8851D+00,1.7372D+00,
+     &1.5941D+00,1.4536D+00,1.3433D+00,1.2893D+00,1.2607D+00,1.2587D+00,
+     &1.2792D+00,1.3153D+00,1.3616D+00,1.4149D+00,1.4736D+00,1.5361D+00,
+     &1.6012D+00,1.6677D+00,1.7344D+00,1.7990D+00,1.8589D+00,1.9261D+00,
+     &2.0646D+00,2.2044D+00,2.3456D+00,2.4882D+00,2.6342D+00,2.7823D+00,
+     &2.9370D+00,3.1022D+00,3.2902D+00,3.5288D+00,3.9528D+00,0.0000D+00,
+     &1.3926D+01,1.3617D+01,1.3298D+01,1.2959D+01,1.2612D+01,1.2230D+01,
+     &1.1845D+01,1.1442D+01,1.1036D+01,1.0599D+01,1.0158D+01,9.7041D+00,
+     &9.2562D+00,8.9827D+00,8.6974D+00,8.3632D+00,8.0255D+00,7.6946D+00,
+     &7.3614D+00,7.0802D+00,6.7814D+00,6.4439D+00,6.1064D+00,5.7775D+00,
+     &5.4468D+00,5.1723D+00,4.8858D+00,4.5617D+00,4.2425D+00,3.9361D+00,
+     &3.6353D+00,3.3874D+00,3.1301D+00,2.8506D+00,2.5816D+00,2.3318D+00,
+     &2.0965D+00,1.9136D+00,1.7368D+00,1.5622D+00,1.4211D+00,1.3452D+00,
+     &1.2937D+00,1.2737D+00,1.2719D+00,1.2868D+00,1.3119D+00,1.3437D+00/
+      DATA (XGF_L(K),K=  457,  570) /
+     &1.3799D+00,1.4189D+00,1.4596D+00,1.5003D+00,1.5401D+00,1.5761D+00,
+     &1.6073D+00,1.6574D+00,1.7377D+00,1.8158D+00,1.8902D+00,1.9601D+00,
+     &2.0263D+00,2.0884D+00,2.1452D+00,2.1990D+00,2.2512D+00,2.3118D+00,
+     &2.4354D+00,0.0000D+00,1.9256D+01,1.8699D+01,1.8142D+01,1.7563D+01,
+     &1.6980D+01,1.6355D+01,1.5725D+01,1.5081D+01,1.4443D+01,1.3769D+01,
+     &1.3097D+01,1.2422D+01,1.1755D+01,1.1358D+01,1.0937D+01,1.0454D+01,
+     &9.9818D+00,9.5167D+00,9.0465D+00,8.6570D+00,8.2473D+00,7.7870D+00,
+     &7.3320D+00,6.8911D+00,6.4569D+00,6.0969D+00,5.7223D+00,5.3051D+00,
+     &4.8992D+00,4.5131D+00,4.1351D+00,3.8285D+00,3.5148D+00,3.1749D+00,
+     &2.8517D+00,2.5534D+00,2.2748D+00,2.0598D+00,1.8527D+00,1.6465D+00,
+     &1.4780D+00,1.3832D+00,1.3129D+00,1.2758D+00,1.2566D+00,1.2544D+00,
+     &1.2628D+00,1.2778D+00,1.2971D+00,1.3186D+00,1.3412D+00,1.3637D+00,
+     &1.3845D+00,1.4021D+00,1.4142D+00,1.4518D+00,1.4945D+00,1.5327D+00,
+     &1.5661D+00,1.5941D+00,1.6160D+00,1.6309D+00,1.6386D+00,1.6381D+00,
+     &1.6291D+00,1.6176D+00,1.6271D+00,0.0000D+00,2.5945D+01,2.5063D+01,
+     &2.4160D+01,2.3234D+01,2.2336D+01,2.1370D+01,2.0417D+01,1.9450D+01,
+     &1.8508D+01,1.7517D+01,1.6548D+01,1.5580D+01,1.4645D+01,1.4085D+01,
+     &1.3496D+01,1.2836D+01,1.2181D+01,1.1547D+01,1.0921D+01,1.0404D+01,
+     &9.8614D+00,9.2547D+00,8.6616D+00,8.0926D+00,7.5352D+00,7.0774D+00/
+      DATA (XGF_L(K),K=  571,  684) /
+     &6.6043D+00,6.0842D+00,5.5816D+00,5.1040D+00,4.6450D+00,4.2749D+00,
+     &3.8995D+00,3.4941D+00,3.1134D+00,2.7651D+00,2.4423D+00,2.1941D+00,
+     &1.9564D+00,1.7198D+00,1.5241D+00,1.4112D+00,1.3220D+00,1.2705D+00,
+     &1.2348D+00,1.2175D+00,1.2113D+00,1.2119D+00,1.2167D+00,1.2238D+00,
+     &1.2321D+00,1.2398D+00,1.2460D+00,1.2491D+00,1.2470D+00,1.2752D+00,
+     &1.2894D+00,1.2998D+00,1.3055D+00,1.3049D+00,1.2991D+00,1.2860D+00,
+     &1.2655D+00,1.2370D+00,1.1998D+00,1.1564D+00,1.1181D+00,0.0000D+00,
+     &3.3362D+01,3.2051D+01,3.0740D+01,2.9429D+01,2.8133D+01,2.6758D+01,
+     &2.5422D+01,2.4082D+01,2.2784D+01,2.1435D+01,2.0130D+01,1.8839D+01,
+     &1.7597D+01,1.6865D+01,1.6098D+01,1.5241D+01,1.4397D+01,1.3587D+01,
+     &1.2791D+01,1.2130D+01,1.1444D+01,1.0687D+01,9.9507D+00,9.2501D+00,
+     &8.5659D+00,8.0104D+00,7.4390D+00,6.8118D+00,6.2125D+00,5.6506D+00,
+     &5.1096D+00,4.6780D+00,4.2434D+00,3.7769D+00,3.3424D+00,2.9475D+00,
+     &2.5842D+00,2.3061D+00,2.0409D+00,1.7770D+00,1.5572D+00,1.4290D+00,
+     &1.3248D+00,1.2609D+00,1.2112D+00,1.1814D+00,1.1636D+00,1.1530D+00,
+     &1.1469D+00,1.1433D+00,1.1407D+00,1.1378D+00,1.1337D+00,1.1269D+00,
+     &1.1152D+00,1.1360D+00,1.1320D+00,1.1243D+00,1.1127D+00,1.0960D+00,
+     &1.0739D+00,1.0461D+00,1.0122D+00,9.7100D-01,9.2292D-01,8.6909D-01,
+     &8.1432D-01,0.0000D+00,4.2364D+01,4.0483D+01,3.8640D+01,3.6792D+01/
+      DATA (XGF_L(K),K=  685,  798) /
+     &3.4991D+01,3.3112D+01,3.1295D+01,2.9487D+01,2.7748D+01,2.5953D+01,
+     &2.4235D+01,2.2543D+01,2.0935D+01,1.9990D+01,1.9011D+01,1.7921D+01,
+     &1.6852D+01,1.5830D+01,1.4831D+01,1.4013D+01,1.3165D+01,1.2236D+01,
+     &1.1337D+01,1.0485D+01,9.6616D+00,8.9943D+00,8.3137D+00,7.5711D+00,
+     &6.8670D+00,6.2090D+00,5.5842D+00,5.0866D+00,4.5873D+00,4.0564D+00,
+     &3.5646D+00,3.1234D+00,2.7185D+00,2.4107D+00,2.1172D+00,1.8273D+00,
+     &1.5836D+00,1.4407D+00,1.3211D+00,1.2459D+00,1.1839D+00,1.1433D+00,
+     &1.1153D+00,1.0949D+00,1.0794D+00,1.0667D+00,1.0555D+00,1.0443D+00,
+     &1.0317D+00,1.0172D+00,9.9883D-01,1.0131D+00,9.9503D-01,9.7446D-01,
+     &9.5064D-01,9.2316D-01,8.9156D-01,8.5528D-01,8.1439D-01,7.6837D-01,
+     &7.1718D-01,6.6210D-01,6.0243D-01,0.0000D+00,5.2603D+01,5.0038D+01,
+     &4.7540D+01,4.5053D+01,4.2652D+01,4.0175D+01,3.7784D+01,3.5407D+01,
+     &3.3154D+01,3.0851D+01,2.8651D+01,2.6507D+01,2.4488D+01,2.3310D+01,
+     &2.2084D+01,2.0735D+01,1.9418D+01,1.8166D+01,1.6951D+01,1.5960D+01,
+     &1.4935D+01,1.3817D+01,1.2742D+01,1.1732D+01,1.0759D+01,9.9749D+00,
+     &9.1794D+00,8.3186D+00,7.5044D+00,6.7510D+00,6.0386D+00,5.4762D+00,
+     &4.9137D+00,4.3200D+00,3.7728D+00,3.2842D+00,2.8391D+00,2.5026D+00,
+     &2.1835D+00,1.8677D+00,1.6033D+00,1.4461D+00,1.3138D+00,1.2277D+00,
+     &1.1557D+00,1.1057D+00,1.0689D+00,1.0407D+00,1.0176D+00,9.9768D-01/
+      DATA (XGF_L(K),K=  799,  912) /
+     &9.7951D-01,9.6199D-01,9.4331D-01,9.2359D-01,9.0058D-01,9.0921D-01,
+     &8.8156D-01,8.5244D-01,8.2081D-01,7.8702D-01,7.5025D-01,7.1005D-01,
+     &6.6667D-01,6.1984D-01,5.6969D-01,5.1748D-01,4.5895D-01,0.0000D+00,
+     &6.3459D+01,6.0127D+01,5.6900D+01,5.3695D+01,5.0615D+01,4.7464D+01,
+     &4.4440D+01,4.1483D+01,3.8684D+01,3.5826D+01,3.3122D+01,3.0500D+01,
+     &2.8040D+01,2.6617D+01,2.5143D+01,2.3518D+01,2.1950D+01,2.0455D+01,
+     &1.9011D+01,1.7842D+01,1.6646D+01,1.5337D+01,1.4094D+01,1.2920D+01,
+     &1.1799D+01,1.0903D+01,9.9940D+00,9.0166D+00,8.0967D+00,7.2512D+00,
+     &6.4551D+00,5.8279D+00,5.2081D+00,4.5519D+00,3.9568D+00,3.4237D+00,
+     &2.9425D+00,2.5798D+00,2.2371D+00,1.8995D+00,1.6161D+00,1.4477D+00,
+     &1.3046D+00,1.2096D+00,1.1285D+00,1.0709D+00,1.0274D+00,9.9290D-01,
+     &9.6399D-01,9.3860D-01,9.1550D-01,8.9324D-01,8.7036D-01,8.4674D-01,
+     &8.2129D-01,8.2506D-01,7.9094D-01,7.5633D-01,7.2031D-01,6.8307D-01,
+     &6.4387D-01,6.0237D-01,5.5907D-01,5.1344D-01,4.6618D-01,4.1810D-01,
+     &3.6329D-01,0.0000D+00,7.9498D+01,7.4941D+01,7.0580D+01,6.6266D+01,
+     &6.2169D+01,5.8002D+01,5.4045D+01,5.0164D+01,4.6539D+01,4.2847D+01,
+     &3.9386D+01,3.6065D+01,3.2968D+01,3.1180D+01,2.9347D+01,2.7330D+01,
+     &2.5394D+01,2.3566D+01,2.1811D+01,2.0388D+01,1.8944D+01,1.7368D+01,
+     &1.5877D+01,1.4488D+01,1.3164D+01,1.2111D+01,1.1051D+01,9.9162D+00/
+      DATA (XGF_L(K),K=  913, 1026) /
+     &8.8542D+00,7.8839D+00,6.9777D+00,6.2689D+00,5.5695D+00,4.8410D+00,
+     &4.1789D+00,3.5909D+00,3.0635D+00,2.6689D+00,2.2973D+00,1.9324D+00,
+     &1.6270D+00,1.4446D+00,1.2882D+00,1.1839D+00,1.0926D+00,1.0266D+00,
+     &9.7585D-01,9.3473D-01,8.9976D-01,8.6898D-01,8.4068D-01,8.1374D-01,
+     &7.8714D-01,7.6011D-01,7.3262D-01,7.3148D-01,6.9170D-01,6.5270D-01,
+     &6.1357D-01,5.7426D-01,5.3417D-01,4.9316D-01,4.5166D-01,4.0914D-01,
+     &3.6649D-01,3.2429D-01,2.7651D-01,0.0000D+00,9.7091D+01,9.1127D+01,
+     &8.5440D+01,7.9869D+01,7.4603D+01,6.9275D+01,6.4220D+01,5.9343D+01,
+     &5.4780D+01,5.0195D+01,4.5912D+01,4.1816D+01,3.8028D+01,3.5857D+01,
+     &3.3637D+01,3.1205D+01,2.8880D+01,2.6695D+01,2.4601D+01,2.2923D+01,
+     &2.1219D+01,1.9374D+01,1.7634D+01,1.6009D+01,1.4488D+01,1.3276D+01,
+     &1.2064D+01,1.0772D+01,9.5709D+00,8.4795D+00,7.4649D+00,6.6775D+00,
+     &5.9046D+00,5.1015D+00,4.3733D+00,3.7372D+00,3.1677D+00,2.7434D+00,
+     &2.3459D+00,1.9566D+00,1.6317D+00,1.4368D+00,1.2699D+00,1.1572D+00,
+     &1.0581D+00,9.8558D-01,9.2913D-01,8.8297D-01,8.4349D-01,8.0862D-01,
+     &7.7667D-01,7.4686D-01,7.1760D-01,6.8906D-01,6.6005D-01,6.5493D-01,
+     &6.1209D-01,5.7080D-01,5.3038D-01,4.9085D-01,4.5137D-01,4.1231D-01,
+     &3.7316D-01,3.3442D-01,2.9613D-01,2.5928D-01,2.1912D-01,0.0000D+00,
+     &1.1660D+02,1.0899D+02,1.0178D+02,9.4752D+01,8.8142D+01,8.1480D+01/
+      DATA (XGF_L(K),K= 1027, 1140) /
+     &7.5219D+01,6.9198D+01,6.3578D+01,5.7986D+01,5.2800D+01,4.7867D+01,
+     &4.3328D+01,4.0736D+01,3.8088D+01,3.5213D+01,3.2469D+01,2.9907D+01,
+     &2.7451D+01,2.5501D+01,2.3516D+01,2.1392D+01,1.9391D+01,1.7546D+01,
+     &1.5800D+01,1.4426D+01,1.3057D+01,1.1607D+01,1.0266D+01,9.0517D+00,
+     &7.9294D+00,7.0617D+00,6.2165D+00,5.3397D+00,4.5572D+00,3.8687D+00,
+     &3.2598D+00,2.8078D+00,2.3859D+00,1.9745D+00,1.6317D+00,1.4267D+00,
+     &1.2497D+00,1.1305D+00,1.0247D+00,9.4657D-01,8.8556D-01,8.3542D-01,
+     &7.9253D-01,7.5465D-01,7.2037D-01,6.8840D-01,6.5775D-01,6.2793D-01,
+     &5.9852D-01,5.9015D-01,5.4553D-01,5.0339D-01,4.6306D-01,4.2411D-01,
+     &3.8622D-01,3.4909D-01,3.1294D-01,2.7773D-01,2.4373D-01,2.1150D-01,
+     &1.7848D-01,0.0000D+00,1.3738D+02,1.2796D+02,1.1904D+02,1.1042D+02,
+     &1.0233D+02,9.4222D+01,8.6662D+01,7.9409D+01,7.2655D+01,6.6001D+01,
+     &5.9833D+01,5.4007D+01,4.8672D+01,4.5642D+01,4.2552D+01,3.9214D+01,
+     &3.6040D+01,3.3082D+01,3.0272D+01,2.8026D+01,2.5779D+01,2.3361D+01,
+     &2.1093D+01,1.9009D+01,1.7062D+01,1.5526D+01,1.4003D+01,1.2396D+01,
+     &1.0916D+01,9.5845D+00,8.3611D+00,7.4188D+00,6.5021D+00,5.5589D+00,
+     &4.7169D+00,3.9865D+00,3.3389D+00,2.8617D+00,2.4178D+00,1.9872D+00,
+     &1.6283D+00,1.4143D+00,1.2296D+00,1.1049D+00,9.9315D-01,9.1079D-01,
+     &8.4623D-01,7.9317D-01,7.4768D-01,7.0802D-01,6.7178D-01,6.3836D-01/
+      DATA (XGF_L(K),K= 1141, 1254) /
+     &6.0703D-01,5.7658D-01,5.4733D-01,5.3630D-01,4.9100D-01,4.4879D-01,
+     &4.0920D-01,3.7138D-01,3.3521D-01,3.0054D-01,2.6721D-01,2.3523D-01,
+     &2.0485D-01,1.7634D-01,1.4852D-01,0.0000D+00,1.6103D+02,1.4938D+02,
+     &1.3848D+02,1.2798D+02,1.1818D+02,1.0840D+02,9.9309D+01,9.0651D+01,
+     &8.2647D+01,7.4733D+01,6.7469D+01,6.0672D+01,5.4433D+01,5.0913D+01,
+     &4.7343D+01,4.3482D+01,3.9833D+01,3.6452D+01,3.3242D+01,3.0689D+01,
+     &2.8134D+01,2.5404D+01,2.2863D+01,2.0531D+01,1.8362D+01,1.6652D+01,
+     &1.4967D+01,1.3197D+01,1.1573D+01,1.0120D+01,8.7877D+00,7.7679D+00,
+     &6.7819D+00,5.7685D+00,4.8731D+00,4.0967D+00,3.4122D+00,2.9097D+00,
+     &2.4451D+00,1.9953D+00,1.6222D+00,1.3995D+00,1.2076D+00,1.0771D+00,
+     &9.6151D-01,8.7563D-01,8.0819D-01,7.5269D-01,7.0548D-01,6.6395D-01,
+     &6.2666D-01,5.9253D-01,5.6034D-01,5.3005D-01,5.0122D-01,4.8790D-01,
+     &4.4273D-01,4.0115D-01,3.6251D-01,3.2632D-01,2.9224D-01,2.5988D-01,
+     &2.2931D-01,2.0039D-01,1.7324D-01,1.4805D-01,1.2201D-01,0.0000D+00,
+     &1.8591D+02,1.7193D+02,1.5886D+02,1.4632D+02,1.3469D+02,1.2310D+02,
+     &1.1237D+02,1.0218D+02,9.2839D+01,8.3643D+01,7.5256D+01,6.7382D+01,
+     &6.0231D+01,5.6204D+01,5.2127D+01,4.7743D+01,4.3601D+01,3.9784D+01,
+     &3.6172D+01,3.3310D+01,3.0455D+01,2.7410D+01,2.4579D+01,2.2009D+01,
+     &1.9599D+01,1.7727D+01,1.5886D+01,1.3956D+01,1.2193D+01,1.0620D+01/
+      DATA (XGF_L(K),K= 1255, 1368) /
+     &9.1866D+00,8.0925D+00,7.0383D+00,5.9623D+00,5.0119D+00,4.1917D+00,
+     &3.4750D+00,2.9503D+00,2.4663D+00,1.9999D+00,1.6141D+00,1.3840D+00,
+     &1.1856D+00,1.0518D+00,9.3192D-01,8.4324D-01,7.7348D-01,7.1642D-01,
+     &6.6779D-01,6.2531D-01,5.8732D-01,5.5231D-01,5.2039D-01,4.9037D-01,
+     &4.6218D-01,4.4711D-01,4.0225D-01,3.6159D-01,3.2438D-01,2.8982D-01,
+     &2.5765D-01,2.2765D-01,1.9954D-01,1.7331D-01,1.4889D-01,1.2621D-01,
+     &9.6984D-02,0.0000D+00,2.1269D+02,1.9609D+02,1.8060D+02,1.6582D+02,
+     &1.5214D+02,1.3863D+02,1.2613D+02,1.1431D+02,1.0351D+02,9.2957D+01,
+     &8.3294D+01,7.4318D+01,6.6188D+01,6.1617D+01,5.7019D+01,5.2073D+01,
+     &4.7428D+01,4.3153D+01,3.9122D+01,3.5941D+01,3.2764D+01,2.9404D+01,
+     &2.6282D+01,2.3458D+01,2.0836D+01,1.8796D+01,1.6786D+01,1.4693D+01,
+     &1.2792D+01,1.1101D+01,9.5678D+00,8.4010D+00,7.2773D+00,6.1402D+00,
+     &5.1403D+00,4.2791D+00,3.5311D+00,2.9851D+00,2.4835D+00,2.0017D+00,
+     &1.6039D+00,1.3677D+00,1.1646D+00,1.0265D+00,9.0375D-01,8.1271D-01,
+     &7.4135D-01,6.8280D-01,6.3328D-01,5.9018D-01,5.5184D-01,5.1677D-01,
+     &4.8494D-01,4.5537D-01,4.2797D-01,4.1146D-01,3.6736D-01,3.2788D-01,
+     &2.9207D-01,2.5923D-01,2.2901D-01,2.0110D-01,1.7527D-01,1.5131D-01,
+     &1.2926D-01,1.0839D-01,6.9776D-02,0.0000D+00,2.4043D+02,2.2104D+02,
+     &2.0300D+02,1.8582D+02,1.7003D+02,1.5443D+02,1.4007D+02,1.2658D+02/
+      DATA (XGF_L(K),K= 1369, 1482) /
+     &1.1426D+02,1.0227D+02,9.1332D+01,8.1197D+01,7.2119D+01,6.6989D+01,
+     &6.1846D+01,5.6342D+01,5.1188D+01,4.6448D+01,4.2002D+01,3.8498D+01,
+     &3.5016D+01,3.1335D+01,2.7931D+01,2.4848D+01,2.2009D+01,1.9797D+01,
+     &1.7637D+01,1.5389D+01,1.3354D+01,1.1550D+01,9.9187D+00,8.6824D+00,
+     &7.4988D+00,6.3022D+00,5.2549D+00,4.3589D+00,3.5788D+00,3.0139D+00,
+     &2.4962D+00,2.0005D+00,1.5931D+00,1.3514D+00,1.1435D+00,1.0028D+00,
+     &8.7751D-01,7.8479D-01,7.1218D-01,6.5272D-01,6.0250D-01,5.5920D-01,
+     &5.2061D-01,4.8590D-01,4.5422D-01,4.2519D-01,3.9858D-01,3.8094D-01,
+     &3.3789D-01,2.9975D-01,2.6524D-01,2.3401D-01,2.0560D-01,1.7956D-01,
+     &1.5565D-01,1.3374D-01,1.1354D-01,9.4096D-02,3.9275D-02,0.0000D+00,
+     &2.8195D+02,2.5830D+02,2.3640D+02,2.1554D+02,1.9645D+02,1.7774D+02,
+     &1.6058D+02,1.4448D+02,1.2990D+02,1.1575D+02,1.0299D+02,9.1121D+01,
+     &8.0574D+01,7.4642D+01,6.8724D+01,6.2402D+01,5.6498D+01,5.1101D+01,
+     &4.6042D+01,4.2081D+01,3.8152D+01,3.4014D+01,3.0201D+01,2.6780D+01,
+     &2.3611D+01,2.1171D+01,1.8789D+01,1.6329D+01,1.4107D+01,1.2148D+01,
+     &1.0386D+01,9.0557D+00,7.7874D+00,6.5118D+00,5.4006D+00,4.4539D+00,
+     &3.6370D+00,3.0467D+00,2.5088D+00,1.9959D+00,1.5762D+00,1.3274D+00,
+     &1.1142D+00,9.7065D-01,8.4265D-01,7.4825D-01,6.7451D-01,6.1445D-01,
+     &5.6374D-01,5.2024D-01,4.8166D-01,4.4741D-01,4.1643D-01,3.8830D-01/
+      DATA (XGF_L(K),K= 1483, 1596) /
+     &3.6282D-01,3.4411D-01,3.0249D-01,2.6607D-01,2.3369D-01,2.0474D-01,
+     &1.7852D-01,1.5489D-01,1.3341D-01,1.1384D-01,9.5862D-02,7.7509D-02,
+     &0.0000D+00,0.0000D+00,3.2379D+02,2.9556D+02,2.6960D+02,2.4513D+02,
+     &2.2265D+02,2.0073D+02,1.8071D+02,1.6202D+02,1.4515D+02,1.2887D+02,
+     &1.1419D+02,1.0071D+02,8.8650D+01,8.1931D+01,7.5233D+01,6.8140D+01,
+     &6.1510D+01,5.5467D+01,4.9832D+01,4.5419D+01,4.1070D+01,3.6493D+01,
+     &3.2295D+01,2.8536D+01,2.5086D+01,2.2426D+01,1.9846D+01,1.7175D+01,
+     &1.4781D+01,1.2681D+01,1.0797D+01,9.3831D+00,8.0380D+00,6.6897D+00,
+     &5.5221D+00,4.5337D+00,3.6831D+00,3.0714D+00,2.5159D+00,1.9884D+00,
+     &1.5586D+00,1.3048D+00,1.0886D+00,9.4191D-01,8.1217D-01,7.1679D-01,
+     &6.4238D-01,5.8194D-01,5.3136D-01,4.8766D-01,4.4965D-01,4.1594D-01,
+     &3.8570D-01,3.5847D-01,3.3403D-01,3.1456D-01,2.7454D-01,2.3977D-01,
+     &2.0922D-01,1.8216D-01,1.5795D-01,1.3622D-01,1.1669D-01,9.9012D-02,
+     &8.2668D-02,6.4604D-02,0.0000D+00,0.0000D+00,3.7071D+02,3.3727D+02,
+     &3.0660D+02,2.7790D+02,2.5169D+02,2.2608D+02,2.0283D+02,1.8123D+02,
+     &1.6179D+02,1.4311D+02,1.2635D+02,1.1097D+02,9.7357D+01,8.9759D+01,
+     &8.2263D+01,7.4239D+01,6.6821D+01,6.0073D+01,5.3813D+01,4.8927D+01,
+     &4.4114D+01,3.9072D+01,3.4471D+01,3.0351D+01,2.6592D+01,2.3699D+01,
+     &2.0903D+01,1.8031D+01,1.5459D+01,1.3211D+01,1.1204D+01,9.7024D+00/
+      DATA (XGF_L(K),K= 1597, 1710) /
+     &8.2828D+00,6.8644D+00,5.6367D+00,4.6059D+00,3.7241D+00,3.0915D+00,
+     &2.5189D+00,1.9786D+00,1.5396D+00,1.2816D+00,1.0611D+00,9.1306D-01,
+     &7.8207D-01,6.8594D-01,6.1118D-01,5.5075D-01,5.0031D-01,4.5732D-01,
+     &4.1996D-01,3.8671D-01,3.5732D-01,3.3101D-01,3.0775D-01,2.8769D-01,
+     &2.4931D-01,2.1637D-01,1.8763D-01,1.6241D-01,1.4002D-01,1.2013D-01,
+     &1.0238D-01,8.6311D-02,7.1348D-02,5.2982D-02,0.0000D+00,0.0000D+00,
+     &4.2142D+02,3.8237D+02,3.4660D+02,3.1292D+02,2.8259D+02,2.5300D+02,
+     &2.2626D+02,2.0148D+02,1.7927D+02,1.5797D+02,1.3896D+02,1.2163D+02,
+     &1.0632D+02,9.7858D+01,8.9366D+01,8.0488D+01,7.2234D+01,6.4771D+01,
+     &5.7843D+01,5.2468D+01,4.7182D+01,4.1663D+01,3.6633D+01,3.2165D+01,
+     &2.8082D+01,2.4971D+01,2.1960D+01,1.8866D+01,1.6118D+01,1.3723D+01,
+     &1.1595D+01,1.0008D+01,8.5101D+00,7.0232D+00,5.7443D+00,4.6705D+00,
+     &3.7584D+00,3.1066D+00,2.5189D+00,1.9659D+00,1.5193D+00,1.2575D+00,
+     &1.0346D+00,8.8517D-01,7.5338D-01,6.5695D-01,5.8219D-01,5.2200D-01,
+     &4.7218D-01,4.2954D-01,3.9258D-01,3.6043D-01,3.3190D-01,3.0663D-01,
+     &2.8431D-01,2.6413D-01,2.2746D-01,1.9612D-01,1.6912D-01,1.4557D-01,
+     &1.2488D-01,1.0660D-01,9.0362D-02,7.5731D-02,6.1890D-02,4.2720D-02,
+     &0.0000D+00,0.0000D+00,4.7166D+02,4.2676D+02,3.8580D+02,3.4749D+02,
+     &3.1273D+02,2.7927D+02,2.4899D+02,2.2108D+02,1.9611D+02,1.7230D+02/
+      DATA (XGF_L(K),K= 1711, 1824) /
+     &1.5107D+02,1.3178D+02,1.1483D+02,1.0548D+02,9.6179D+01,8.6383D+01,
+     &7.7331D+01,6.9156D+01,6.1613D+01,5.5763D+01,5.0019D+01,4.4056D+01,
+     &3.8633D+01,3.3819D+01,2.9446D+01,2.6108D+01,2.2889D+01,1.9617D+01,
+     &1.6706D+01,1.4179D+01,1.1938D+01,1.0276D+01,8.7112D+00,7.1630D+00,
+     &5.8345D+00,4.7275D+00,3.7856D+00,3.1171D+00,2.5164D+00,1.9532D+00,
+     &1.4997D+00,1.2350D+00,1.0108D+00,8.6027D-01,7.2804D-01,6.3166D-01,
+     &5.5726D-01,4.9745D-01,4.4802D-01,4.0623D-01,3.7002D-01,3.3850D-01,
+     &3.1081D-01,2.8644D-01,2.6509D-01,2.4476D-01,2.0951D-01,1.7979D-01,
+     &1.5426D-01,1.3217D-01,1.1290D-01,9.5951D-02,8.0975D-02,6.7483D-02,
+     &5.4483D-02,3.4309D-02,0.0000D+00,0.0000D+00,5.2745D+02,4.7595D+02,
+     &4.2900D+02,3.8543D+02,3.4589D+02,3.0795D+02,2.7377D+02,2.4235D+02,
+     &2.1434D+02,1.8771D+02,1.6408D+02,1.4266D+02,1.2392D+02,1.1358D+02,
+     &1.0335D+02,9.2593D+01,8.2702D+01,7.3780D+01,6.5553D+01,5.9207D+01,
+     &5.2983D+01,4.6535D+01,4.0700D+01,3.5531D+01,3.0842D+01,2.7278D+01,
+     &2.3855D+01,2.0386D+01,1.7301D+01,1.4635D+01,1.2282D+01,1.0538D+01,
+     &8.9065D+00,7.2932D+00,5.9178D+00,4.7769D+00,3.8086D+00,3.1240D+00,
+     &2.5114D+00,1.9387D+00,1.4794D+00,1.2125D+00,9.8604D-01,8.3538D-01,
+     &7.0309D-01,6.0683D-01,5.3289D-01,4.7378D-01,4.2493D-01,3.8387D-01,
+     &3.4846D-01,3.1778D-01,2.9097D-01,2.6744D-01,2.4699D-01,2.2688D-01/
+      DATA (XGF_L(K),K= 1825, 1836) /
+     &1.9308D-01,1.6489D-01,1.4079D-01,1.2009D-01,1.0214D-01,8.6447D-02,
+     &7.2603D-02,6.0131D-02,4.7893D-02,2.6613D-02,0.0000D+00,0.0000D+00/
+
+*
+      X = Xinp
+*...CHECK OF X AND Q2 VALUES :
+      IF ( (X.LT.0.99D-9) .OR. (X.GT.1.D0) ) THEN
+*        WRITE(6,91) X
+*  91     FORMAT (2X,'PHO_DOR98LO: x out of range',1p,E12.4)
+         X = 0.99D-9
+*        STOP
+      ENDIF
+
+      Q2 = Q2inp
+      IF ( (Q2.LT.0.799D0) .OR. (Q2.GT.1.E6) ) THEN
+*        WRITE(6,92) Q2
+*  92     FORMAT (2X,'PHO_DOR98LO: Q2 out of range',1p,E12.4)
+         Q2 = 0.99D6
+*        STOP
+      ENDIF
+
+*
+*...INTERPOLATION :
+      NA(1) = NX
+      NA(2) = NQ
+      XT(1) = DLOG(X)
+      XT(2) = DLOG(Q2)
+      X1 = 1.D0- X
+      XV = X**0.5D0
+      XS = X**(-0.2D0)
+      UV = SIB_DBFINT(NARG,XT,NA,ARRF,XUVF) * X1**3 * XV
+      DV = SIB_DBFINT(NARG,XT,NA,ARRF,XDVF) * X1**4 * XV
+      DE = SIB_DBFINT(NARG,XT,NA,ARRF,XDEF) * X1**7 * XV
+      UD = SIB_DBFINT(NARG,XT,NA,ARRF,XUDF) * X1**7 * XS
+      US = 0.5D0 * (UD - DE)
+      DS = 0.5D0 * (UD + DE)
+      SS = SIB_DBFINT(NARG,XT,NA,ARRF,XSF)  * X1**7 * XS
+      GL = SIB_DBFINT(NARG,XT,NA,ARRF,XGF)  * X1**5 * XS
+
+      END
diff --git a/dependencies/sibyll/sibyll2.3d.hpp b/dependencies/sibyll/sibyll2.3d.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..9d6b1942c97d39a6121f6c23e52335987d718332
--- /dev/null
+++ b/dependencies/sibyll/sibyll2.3d.hpp
@@ -0,0 +1,120 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+/**
+ * \function sibyll::rndm_interface
+ *
+ * this is the random number hook to external packages.
+ *
+ * CORSIKA8, for example, has to provide an implementation of this.
+ **/
+namespace sibyll {
+  extern double rndm_interface();
+}
+
+//----------------------------------------------
+//  C++ interface for the SIBYLL event generator
+//----------------------------------------------
+// wrapper
+
+extern "C" {
+
+typedef char s_name[6];
+
+  /**
+     \struct s_plist_
+
+    SIBYLL particle stack (FORTRAN COMMON)
+    variables are: np : numer of particles on stack
+                    p : 4momentum + mass of particles on stack
+                llist : id of particles on stack
+   **/
+extern struct {
+  double p[5][8000];
+  int llist[8000];
+  int np;
+} s_plist_;
+
+// additional information about interactions.
+// number of wounded nucleons, number of hard and soft scatterings etc.
+extern struct { int nnsof[20], nnjet[20], jdif[20], nwd, njet, nsof; } s_chist_;
+
+extern struct {
+  double cbr[223 + 16 + 12 + 8];
+  int kdec[1338 + 6 * (16 + 12 + 8)];
+  int lbarp[99];
+  int idb[99];
+} s_csydec_;
+
+// additional particle stack for the mother particles of unstable particles
+// stable particles have entry zero
+extern struct { int llist1[8000]; } s_plist1_;
+
+// tables with particle properties
+// charge, strangeness and baryon number
+extern struct {
+  int ichp[99];
+  int istr[99];
+  int ibar[99];
+} s_chp_;
+
+// tables with particle properties
+// mass and mass squared
+extern struct {
+  double am[99];
+  double am2[99];
+} s_mass1_;
+
+// table with particle names
+extern struct { char namp[6][99]; } s_cnam_;
+
+// debug info
+extern struct {
+  int ncall;
+  int ndebug;
+  int lun;
+} s_debug_;
+
+// lund random generator setup
+// extern struct {int mrlu[6]; float rrlu[100]; }ludatr_;
+
+// sibyll main subroutine
+void sibyll_(const int&, const int&, const double&);
+
+// subroutine to initiate sibyll
+void sibyll_ini_();
+
+// subroutine to SET DECAYS
+void dec_ini_();
+
+// subroutine to initiate random number generator
+// void rnd_ini_();
+
+// print event
+void sib_list_(int&);
+
+// decay routine
+void decsib_();
+
+// interaction length
+// double fpni_(double&, int&);
+
+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&);
+
+double s_rndm_(int&);
+
+int get_nwounded();
+double get_sibyll_mass2(int&);
+
+// phojet random generator setup
+void pho_rndin_(int&, int&, int&, int&);
+}
diff --git a/Processes/Sibyll/signuc.f b/dependencies/sibyll/signuc.f
similarity index 100%
rename from Processes/Sibyll/signuc.f
rename to dependencies/sibyll/signuc.f
diff --git a/do-copyright.py b/do-copyright.py
index adc278d1124eafdc943d65937ecdb9f552933a40..ec10db429fa32692688f43208b78e4403c6afaf7 100755
--- a/do-copyright.py
+++ b/do-copyright.py
@@ -21,8 +21,8 @@ Debug settings are 0: nothing, 1: checking, 2: filesystem
 """
 Debug = 0 
 
-excludeDirs = ["modules", "git", "build", "install", "externals"]
-excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc', 'sgn.h', 'quartic.h']
+excludeDirs = ["ThirdParty", "externals", "dependencies", "git"]
+excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc', 'sgn.h']
 
 extensions = [".cpp", ".hpp"]
 
diff --git a/Documentation/Doxygen/Doxyfile.in b/documentation/Doxyfile.in
similarity index 96%
rename from Documentation/Doxygen/Doxyfile.in
rename to documentation/Doxyfile.in
index b733d09258adfa7e7200033acda18823a8c8ca9d..355d1903b7026de5b1e3e6812507ec6fc7fe7c26 100644
--- a/Documentation/Doxygen/Doxyfile.in
+++ b/documentation/Doxyfile.in
@@ -1,4 +1,4 @@
-PROJECT_NAME           = CORSIKA 8
+ePROJECT_NAME           = CORSIKA 8
 PROJECT_NUMBER         = 0.0.0
 
 GENERATE_HTML          = YES
diff --git a/Documentation/Examples/CMakeLists.txt b/examples/CMakeLists.txt
similarity index 100%
rename from Documentation/Examples/CMakeLists.txt
rename to examples/CMakeLists.txt
diff --git a/Documentation/Examples/boundary_example.cc b/examples/boundary_example.cc
similarity index 81%
rename from Documentation/Examples/boundary_example.cc
rename to examples/boundary_example.cc
index ed9d7bd43cc24c03df3642315cd484afde1fb99b..addd6f4a9f5a00b4ea3e33e22f61b6be321c7e43 100644
--- a/Documentation/Examples/boundary_example.cc
+++ b/examples/boundary_example.cc
@@ -6,18 +6,15 @@
  * the license.
  */
 
-#include <corsika/cascade/Cascade.h>
-#include <corsika/process/ProcessSequence.h>
+#include <corsika/framework/core/Cascade.hpp>
+#include <corsika/framework/sequence/ProcessSequence.hpp>
+#include <corsika/process/tracking_line/TrackingLine.hpp>
 
-#include <corsika/setup/SetupEnvironment.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/NuclearComposition.hpp>
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/NuclearComposition.h>
-
-#include <corsika/geometry/Sphere.h>
+#include <corsika/framework/geometry/Sphere.hpp>
 
 #include <corsika/process/sibyll/Decay.h>
 #include <corsika/process/sibyll/Interaction.h>
@@ -25,13 +22,13 @@
 
 #include <corsika/process/track_writer/TrackWriter.h>
 
-#include <corsika/process/particle_cut/ParticleCut.h>
+#include <corsika/process/particle_cut/ParticleCut.hpp>
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/random/RNGManager.hpp>
 
-#include <corsika/utl/CorsikaFenv.h>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 
 #include <corsika/logging/Logging.h>
 
@@ -39,12 +36,17 @@
 #include <limits>
 #include <typeinfo>
 
+#include "../../corsika/setup/SetupEnvironment.hpp"
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
+
+using namespace corsika;
 using namespace corsika;
-using namespace corsika::process;
 using namespace corsika::units;
-using namespace corsika::particles;
-using namespace corsika::random;
-using namespace corsika::geometry;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
 using namespace corsika::environment;
 
 using namespace std;
@@ -161,17 +163,14 @@ int main() {
     };
     auto const [px, py, pz] =
         momentumComponents(theta / 180. * M_PI, phi / 180. * M_PI, P0);
-    auto plab = corsika::stack::MomentumVector(rootCS, {px, py, pz});
-    C8LOG_INFO(
-        "input particle: {} "
-        "input angles: theta={} phi={}"
-        "input momentum: {} GeV",
-        beamCode, theta, phi, plab.GetComponents() / 1_GeV);
-    // shoot particles from inside target out
+    auto plab = corsika::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;
     Point pos(rootCS, 0_m, 0_m, 0_m);
     stack.AddParticle(
         std::tuple<particles::Code, units::si::HEPEnergyType,
-                   corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{
+                   corsika::MomentumVector, geometry::Point, units::si::TimeType>{
             beamCode, E0, plab, pos, 0_ns});
   }
 
diff --git a/Documentation/Examples/cascade_example.cc b/examples/cascade_example.cc
similarity index 82%
rename from Documentation/Examples/cascade_example.cc
rename to examples/cascade_example.cc
index 8b9b5b8ad0b0c50830b01ec21fd7dc6163c91d20..1915125f1ef422f5ff13811430a7aa214d15fea7 100644
--- a/Documentation/Examples/cascade_example.cc
+++ b/examples/cascade_example.cc
@@ -6,45 +6,46 @@
  * the license.
  */
 
-#include <corsika/cascade/Cascade.h>
-#include <corsika/process/ProcessSequence.h>
-#include <corsika/process/energy_loss/EnergyLoss.h>
-#include <corsika/process/stack_inspector/StackInspector.h>
 
-#include <corsika/setup/SetupEnvironment.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/framework/core/Cascade.hpp>
+#include <corsika/framework/sequence/ProcessSequence.hpp>
+#include <corsika/process/energy_loss/EnergyLoss.h>
+#include <corsika/process/stack_inspector/StackInspector.hpp>
+#include <corsika/process/tracking_line/TrackingLine.hpp>
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/environment/ShowerAxis.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/NuclearComposition.hpp>
 
-#include <corsika/geometry/Sphere.h>
+#include <corsika/framework/geometry/Sphere.hpp>
 
 #include <corsika/process/sibyll/Decay.h>
 #include <corsika/process/sibyll/Interaction.h>
 #include <corsika/process/sibyll/NuclearInteraction.h>
 
-#include <corsika/process/particle_cut/ParticleCut.h>
+#include <corsika/process/particle_cut/ParticleCut.hpp>
 #include <corsika/process/track_writer/TrackWriter.h>
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/random/RNGManager.hpp>
 
-#include <corsika/utl/CorsikaFenv.h>
-#include <corsika/logging/Logging.h>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 
 #include <iostream>
 #include <limits>
 
+#include "../../corsika/setup/SetupEnvironment.hpp"
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
+
+using namespace corsika;
 using namespace corsika;
-using namespace corsika::process;
 using namespace corsika::units;
-using namespace corsika::particles;
-using namespace corsika::random;
-using namespace corsika::geometry;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
 using namespace corsika::environment;
 
 using namespace std;
@@ -125,13 +126,13 @@ int main() {
     };
     auto const [px, py, pz] =
         momentumComponents(theta / 180. * M_PI, phi / 180. * M_PI, P0);
-    auto plab = corsika::stack::MomentumVector(rootCS, {px, py, pz});
+    auto plab = corsika::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;
     stack.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType,
-                                 corsika::stack::MomentumVector, geometry::Point,
-                                 units::si::TimeType, unsigned short, unsigned short>{
+                                 corsika::MomentumVector, geometry::Point,
+		      units::si::TimeType, unsigned short, unsigned short>{
         beamCode, E0, plab, injectionPos, 0_ns, nuclA, nuclZ});
   }
 
diff --git a/Documentation/Examples/cascade_proton_example.cc b/examples/cascade_proton_example.cc
similarity index 80%
rename from Documentation/Examples/cascade_proton_example.cc
rename to examples/cascade_proton_example.cc
index b36239219320f05e006fe078404f5e0d51eef117..3512cac6a14256bb9d5352d16eb9f3f57ceeba52 100644
--- a/Documentation/Examples/cascade_proton_example.cc
+++ b/examples/cascade_proton_example.cc
@@ -6,21 +6,17 @@
  * the license.
  */
 
-#include <corsika/cascade/Cascade.h>
-#include <corsika/process/ProcessSequence.h>
+#include <corsika/framework/core/Cascade.hpp>
+#include <corsika/framework/sequence/ProcessSequence.hpp>
 #include <corsika/process/hadronic_elastic_model/HadronicElasticModel.h>
-#include <corsika/process/stack_inspector/StackInspector.h>
-#include <corsika/process/energy_loss/EnergyLoss.h>
+#include <corsika/process/stack_inspector/StackInspector.hpp>
+#include <corsika/process/tracking_line/TrackingLine.hpp>
 
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/NuclearComposition.hpp>
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/environment/ShowerAxis.h>
-
-#include <corsika/geometry/Sphere.h>
+#include <corsika/framework/geometry/Sphere.hpp>
 
 #include <corsika/process/sibyll/Decay.h>
 #include <corsika/process/sibyll/Interaction.h>
@@ -31,26 +27,31 @@
 
 #include <corsika/process/track_writer/TrackWriter.h>
 
-#include <corsika/process/particle_cut/ParticleCut.h>
+#include <corsika/process/particle_cut/ParticleCut.hpp>
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/random/RNGManager.hpp>
 
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 
-#include <corsika/utl/CorsikaFenv.h>
+#include <boost/type_index.hpp>
 
-#include <corsika/logging/Logging.h>
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
+using boost::typeindex::type_id_with_cvr;
 
 #include <iostream>
 #include <limits>
 #include <typeinfo>
 
 using namespace corsika;
-using namespace corsika::process;
+using namespace corsika;
 using namespace corsika::units;
-using namespace corsika::particles;
-using namespace corsika::random;
-using namespace corsika::geometry;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
 using namespace corsika::environment;
 
 using namespace std;
@@ -111,14 +112,14 @@ int main() {
     };
     auto const [px, py, pz] =
         momentumComponents(theta / 180. * M_PI, phi / 180. * M_PI, P0);
-    auto plab = corsika::stack::MomentumVector(rootCS, {px, py, pz});
+    auto plab = corsika::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;
     stack.AddParticle(
         std::tuple<particles::Code, units::si::HEPEnergyType,
-                   corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{
-            beamCode, E0, plab, injectionPos, 0_ns});
+                   corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+            beamCode, E0, plab, pos, 0_ns});
   }
 
   // setup processes, decays and interactions
diff --git a/Documentation/Examples/geometry_example.cc b/examples/geometry_example.cpp
similarity index 90%
rename from Documentation/Examples/geometry_example.cc
rename to examples/geometry_example.cpp
index da23d81e02baae5381358ff13b12f93d071c5dfe..751ac316ea6901aee247e24ad93a379051d959ad 100644
--- a/Documentation/Examples/geometry_example.cc
+++ b/examples/geometry_example.cpp
@@ -6,18 +6,18 @@
  * the license.
  */
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Sphere.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Sphere.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
 #include <cstdlib>
 #include <iostream>
 #include <typeinfo>
 
 using namespace corsika;
-using namespace corsika::geometry;
+using namespace corsika;
 using namespace corsika::units::si;
 
 int main() {
diff --git a/Documentation/Examples/helix_example.cc b/examples/helix_example.cpp
similarity index 83%
rename from Documentation/Examples/helix_example.cc
rename to examples/helix_example.cpp
index 9f3eba67e610c87f63f193b3db3aad5978eda4fc..b4525257407c17e2ff9e4cb35e1487053e2ab60c 100644
--- a/Documentation/Examples/helix_example.cc
+++ b/examples/helix_example.cpp
@@ -6,17 +6,17 @@
  * the license.
  */
 
-#include <corsika/geometry/Helix.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
 #include <array>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Helix.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 #include <cstdlib>
 #include <iostream>
 
 using namespace corsika;
-using namespace corsika::geometry;
+using namespace corsika;
 using namespace corsika::units::si;
 
 int main() {
diff --git a/examples/stack_example.cpp b/examples/stack_example.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f4966c283c7f600e3c6b3c8ea0c6f85af7ee91d0
--- /dev/null
+++ b/examples/stack_example.cpp
@@ -0,0 +1,55 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/super_stupid/SuperStupidStack.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+
+#include <cassert>
+#include <iomanip>
+#include <iostream>
+
+using namespace corsika;
+using namespace corsika::units::si;
+using namespace corsika;
+using namespace corsika;
+using namespace std;
+
+void fill(corsika::super_stupid::SuperStupidStack& s) {
+  const geometry::CoordinateSystem& rootCS =
+      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+  for (int i = 0; i < 11; ++i) {
+    s.AddParticle(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                             geometry::Point, units::si::TimeType>{
+        Code::Electron, 1.5_GeV * i,
+        corsika::MomentumVector(rootCS, {0_GeV, 0_GeV, 1_GeV}),
+        geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns});
+  }
+}
+
+void read(corsika::super_stupid::SuperStupidStack& s) {
+  assert(s.GetSize() == 11); // stack has 11 particles
+
+  HEPEnergyType total_energy;
+  int i = 0;
+  for (auto& p : s) {
+    total_energy += p.GetEnergy();
+    // particles are electrons with 1.5 GeV energy times i
+    assert(p.GetPID() == Code::Electron);
+    assert(p.GetEnergy() == 1.5_GeV * (i++));
+  }
+}
+
+int main() {
+  corsika::super_stupid::SuperStupidStack s;
+  fill(s);
+  read(s);
+  return 0;
+}
diff --git a/Documentation/Examples/staticsequence_example.cc b/examples/staticsequence_example.cpp
similarity index 90%
rename from Documentation/Examples/staticsequence_example.cc
rename to examples/staticsequence_example.cpp
index 659a3d6c2d13e9f3840f80d162cb8dff3feadfac..ffeed210c8a1a0a63e5d0c435cbe6c22ba616687 100644
--- a/Documentation/Examples/staticsequence_example.cc
+++ b/examples/staticsequence_example.cpp
@@ -10,15 +10,15 @@
 #include <iomanip>
 #include <iostream>
 
-#include <corsika/process/ProcessSequence.h>
+#include <corsika/framework/sequence/ProcessSequence.hpp>
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
 using namespace corsika;
 using namespace corsika::units::si;
-using namespace corsika::process;
+using namespace corsika;
 using namespace std;
 
 const int nData = 10;
diff --git a/Documentation/Examples/stopping_power.cc b/examples/stopping_power.cc
similarity index 81%
rename from Documentation/Examples/stopping_power.cc
rename to examples/stopping_power.cc
index 100594f6a0060a5b58ea5561586a0ee13af4d678..d6d5bb89ef7d8ce9a33752d3e78fb6d44bb2dc8d 100644
--- a/Documentation/Examples/stopping_power.cc
+++ b/examples/stopping_power.cc
@@ -6,24 +6,21 @@
  * the license.
  */
 
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/IMediumModel.h>
-#include <corsika/environment/ShowerAxis.h>
-#include <corsika/geometry/Sphere.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/framework/geometry/Sphere.hpp>
 #include <corsika/process/energy_loss/EnergyLoss.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/utl/CorsikaFenv.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 
 #include <fstream>
 #include <iostream>
 #include <limits>
+#include "../../corsika/setup/SetupStack.hpp"
 
 using namespace corsika;
-using namespace corsika::process;
-using namespace corsika::particles;
-using namespace corsika::geometry;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
 using namespace corsika::environment;
 
 using namespace std;
@@ -76,14 +73,14 @@ int main() {
     };
     auto const [px, py, pz] =
         momentumComponents(theta / 180. * M_PI, phi / 180. * M_PI, P0);
-    auto plab = corsika::stack::MomentumVector(rootCS, {px, py, pz});
+    auto plab = corsika::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;
 
     stack.AddParticle(
         std::tuple<particles::Code, units::si::HEPEnergyType,
-                   corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{
+                   corsika::MomentumVector, geometry::Point, units::si::TimeType>{
             beamCode, E0, plab, injectionPos, 0_ns});
 
     auto const p = stack.GetNextParticle();
diff --git a/Documentation/Examples/vertical_EAS.cc b/examples/vertical_EAS.cc
similarity index 81%
rename from Documentation/Examples/vertical_EAS.cc
rename to examples/vertical_EAS.cc
index 6fbed4a73ecfd8e99db28d11754037e094033dc7..50071a8f8729d2ec202a46f4b65524aa568747b6 100644
--- a/Documentation/Examples/vertical_EAS.cc
+++ b/examples/vertical_EAS.cc
@@ -6,59 +6,53 @@
  * the license.
  */
 
-/* clang-format off */
-// InteractionCounter used boost/histogram, which
-// fails if boost/type_traits have been included before. Thus, we have
-// to include it first...
-#include <corsika/process/interaction_counter/InteractionCounter.hpp>
-/* clang-format on */
-#include <corsika/cascade/Cascade.h>
-#include <corsika/environment/Environment.h>
-#include <corsika/environment/FlatExponential.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/IMagneticFieldModel.h>
-#include <corsika/environment/LayeredSphericalAtmosphereBuilder.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/environment/ShowerAxis.h>
-#include <corsika/environment/SlidingPlanarExponential.h>
-#include <corsika/environment/UniformMagneticField.h>
-#include <corsika/geometry/Plane.h>
-#include <corsika/geometry/Sphere.h>
-#include <corsika/logging/Logging.h>
-#include <corsika/process/ProcessSequence.h>
-#include <corsika/process/SwitchProcessSequence.h>
+#include <corsika/framework/core/Cascade.hpp>
+#include <corsika/framework/sequence/ProcessSequence.hpp>
 #include <corsika/process/StackProcess.h>
 #include <corsika/process/energy_loss/EnergyLoss.h>
-#include <corsika/process/longitudinal_profile/LongitudinalProfile.h>
-#include <corsika/process/observation_plane/ObservationPlane.h>
-#include <corsika/process/on_shell_check/OnShellCheck.h>
-#include <corsika/process/particle_cut/ParticleCut.h>
-#include <corsika/process/track_writer/TrackWriter.h>
-#include <corsika/process/proposal/ContinuousProcess.h>
-#include <corsika/process/proposal/Interaction.h>
-#include <corsika/process/pythia/Decay.h>
+#include <corsika/process/observation_plane/ObservationPlane.hpp>
+#include <corsika/process/particle_cut/ParticleCut.hpp>
+#include <corsika/process/switch_process/SwitchProcess.hpp>
+#include <corsika/process/tracking_line/TrackingLine.hpp>
+
+#include <corsika/media/LayeredSphericalAtmosphereBuilder.hpp>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/FlatExponential.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+
+#include <corsika/framework/geometry/Plane.hpp>
+#include <corsika/framework/geometry/Sphere.hpp>
+
 #include <corsika/process/sibyll/Decay.h>
 #include <corsika/process/stack_inspector/StackInspector.h>
 #include <corsika/process/sibyll/Interaction.h>
 #include <corsika/process/sibyll/NuclearInteraction.h>
 #include <corsika/process/urqmd/UrQMD.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/utl/CorsikaFenv.h>
+
+#include <corsika/process/particle_cut/ParticleCut.hpp>
+#include <corsika/process/track_writer/TrackWriter.h>
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <corsika/framework/random/RNGManager.hpp>
+
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 
 #include <iomanip>
 #include <iostream>
 #include <limits>
 #include <string>
 
+#include "../../corsika/setup/SetupStack.hpp"
+#include "../../corsika/setup/SetupTrajectory.hpp"
+
+using namespace corsika;
 using namespace corsika;
-using namespace corsika::process;
 using namespace corsika::units;
-using namespace corsika::particles;
-using namespace corsika::random;
-using namespace corsika::geometry;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
+using namespace corsika;
 using namespace corsika::environment;
 
 using namespace std;
@@ -140,9 +134,9 @@ int main(int argc, char** argv) {
   auto momentumComponents = [](double thetaRad, HEPMomentumType ptot) {
     return std::make_tuple(ptot * sin(thetaRad), 0_eV, -ptot * cos(thetaRad));
   };
-
-  auto const [px, py, pz] = momentumComponents(thetaRad, P0);
-  auto plab = corsika::stack::MomentumVector(rootCS, {px, py, pz});
+  auto const [px, py, pz] =
+      momentumComponents(theta / 180. * M_PI, phi / 180. * M_PI, P0);
+  auto plab = corsika::MomentumVector(rootCS, {px, py, pz});
   cout << "input particle: " << beamCode << endl;
   cout << "input angles: theta=" << theta << endl;
   cout << "input momentum: " << plab.GetComponents() / 1_GeV << ", norm = " << plab.norm()
@@ -191,10 +185,11 @@ int main(int argc, char** argv) {
 
   // setup processes, decays and interactions
 
-  process::particle_cut::ParticleCut cut{60_GeV, false, true};
-  process::proposal::Interaction proposal(env, cut.GetECut());
-  process::proposal::ContinuousProcess em_continuous(env, cut.GetECut());
-  process::interaction_counter::InteractionCounter proposalCounted(proposal);
+  stack.AddParticle(
+      std::tuple<particles::Code, units::si::HEPEnergyType,
+                 corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+          beamCode, E0, plab, injectionPos, 0_ns});
+  //  }
 
   process::sibyll::Interaction sibyll;
   process::interaction_counter::InteractionCounter sibyllCounted(sibyll);
diff --git a/ThirdParty/catch2/catch.hpp b/externals/catch2/catch2/catch.hpp
similarity index 78%
rename from ThirdParty/catch2/catch.hpp
rename to externals/catch2/catch2/catch.hpp
index 02302b8d3e97f3623ef075382a30ef72b7256b98..506cfe44de79462eba77dfb970d059c443f1d820 100644
--- a/ThirdParty/catch2/catch.hpp
+++ b/externals/catch2/catch2/catch.hpp
@@ -1,9 +1,9 @@
 /*
- *  Catch v2.8.0
- *  Generated: 2019-05-26 21:29:22.235281
+ *  Catch v2.13.2
+ *  Generated: 2020-10-07 11:32:53.302017
  *  ----------------------------------------------------------
  *  This file has been merged from multiple headers. Please don't edit it directly
- *  Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved.
+ *  Copyright (c) 2020 Two Blue Cubes Ltd. All rights reserved.
  *
  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -14,8 +14,8 @@
 
 
 #define CATCH_VERSION_MAJOR 2
-#define CATCH_VERSION_MINOR 8
-#define CATCH_VERSION_PATCH 0
+#define CATCH_VERSION_MINOR 13
+#define CATCH_VERSION_PATCH 2
 
 #ifdef __clang__
 #    pragma clang system_header
@@ -132,36 +132,51 @@ namespace Catch {
 
 #endif
 
-#if defined(CATCH_CPP17_OR_GREATER)
-#  define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
+// We have to avoid both ICC and Clang, because they try to mask themselves
+// as gcc, and we want only GCC in this block
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__)
+#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" )
+#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( "GCC diagnostic pop" )
+
+#    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__)
+
 #endif
 
-#ifdef __clang__
+#if defined(__clang__)
+
+#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" )
+#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( "clang diagnostic pop" )
+
+// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug
+// which results in calls to destructors being emitted for each temporary,
+// without a matching initialization. In practice, this can result in something
+// like `std::string::~string` being called on an uninitialized value.
+//
+// For example, this code will likely segfault under IBM XL:
+// ```
+// REQUIRE(std::string("12") + "34" == "1234")
+// ```
+//
+// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
+#  if !defined(__ibmxl__) && !defined(__CUDACC__)
+#    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */
+#  endif
+
+#    define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+         _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \
+         _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"")
+
+#    define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
+         _Pragma( "clang diagnostic ignored \"-Wparentheses\"" )
 
-#       define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
-            _Pragma( "clang diagnostic push" ) \
-            _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \
-            _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"")
-#       define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
-            _Pragma( "clang diagnostic pop" )
-
-#       define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
-            _Pragma( "clang diagnostic push" ) \
-            _Pragma( "clang diagnostic ignored \"-Wparentheses\"" )
-#       define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \
-            _Pragma( "clang diagnostic pop" )
-
-#       define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
-            _Pragma( "clang diagnostic push" ) \
-            _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" )
-#       define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS \
-            _Pragma( "clang diagnostic pop" )
-
-#       define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
-            _Pragma( "clang diagnostic push" ) \
-            _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
-#       define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
-            _Pragma( "clang diagnostic pop" )
+#    define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
+         _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" )
+
+#    define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+         _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
+
+#    define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+         _Pragma( "clang diagnostic ignored \"-Wunused-template\"" )
 
 #endif // __clang__
 
@@ -186,6 +201,7 @@ namespace Catch {
 // Android somehow still does not support std::to_string
 #if defined(__ANDROID__)
 #    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
+#    define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE
 #endif
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -210,20 +226,19 @@ namespace Catch {
 // some versions of cygwin (most) do not support std::to_string. Use the libstd check.
 // https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813
 # if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
-	       && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
+           && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
 
-#	define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
+#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
 
 # endif
 #endif // __CYGWIN__
 
 ////////////////////////////////////////////////////////////////////////////////
 // Visual C++
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
 
-#  if _MSC_VER >= 1900 // Visual Studio 2015 or newer
-#    define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
-#  endif
+#  define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) )
+#  define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  __pragma( warning(pop) )
 
 // Universal Windows platform does not support SEH
 // Or console colours (or console at all...)
@@ -236,10 +251,17 @@ namespace Catch {
 // MSVC traditional preprocessor needs some workaround for __VA_ARGS__
 // _MSVC_TRADITIONAL == 0 means new conformant preprocessor
 // _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor
-#  if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL)
-#    define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
-#  endif
+#  if !defined(__clang__) // Handle Clang masquerading for msvc
+#    if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL)
+#      define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+#    endif // MSVC_TRADITIONAL
+#  endif // __clang__
+
+#endif // _MSC_VER
 
+#if defined(_REENTRANT) || defined(_MSC_VER)
+// Enable async processing, as -pthread is specified or no additional linking is required
+# define CATCH_INTERNAL_CONFIG_USE_ASYNC
 #endif // _MSC_VER
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -272,40 +294,56 @@ namespace Catch {
 #endif
 
 ////////////////////////////////////////////////////////////////////////////////
-// Check if string_view is available and usable
-// The check is split apart to work around v140 (VS2015) preprocessor issue...
-#if defined(__has_include)
-#if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)
-#    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW
-#endif
+
+// RTX is a special version of Windows that is real time.
+// This means that it is detected as Windows, but does not provide
+// the same set of capabilities as real Windows does.
+#if defined(UNDER_RTSS) || defined(RTX64_BUILD)
+    #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH
+    #define CATCH_INTERNAL_CONFIG_NO_ASYNC
+    #define CATCH_CONFIG_COLOUR_NONE
 #endif
 
-////////////////////////////////////////////////////////////////////////////////
-// Check if optional is available and usable
-#if defined(__has_include)
-#  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
-#    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL
-#  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
-#endif // __has_include
+#if !defined(_GLIBCXX_USE_C99_MATH_TR1)
+#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER
+#endif
 
-////////////////////////////////////////////////////////////////////////////////
-// Check if variant is available and usable
+// Various stdlib support checks that require __has_include
 #if defined(__has_include)
-#  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
-#    if defined(__clang__) && (__clang_major__ < 8)
-       // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852
-       // fix should be in clang 8, workaround in libstdc++ 8.2
-#      include <ciso646>
-#      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
-#        define CATCH_CONFIG_NO_CPP17_VARIANT
-#      else
-#        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
-#      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
-#    else
-#      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
-#    endif // defined(__clang__) && (__clang_major__ < 8)
-#  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
-#endif // __has_include
+  // Check if string_view is available and usable
+  #if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)
+  #    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW
+  #endif
+
+  // Check if optional is available and usable
+  #  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
+  #    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL
+  #  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
+
+  // Check if byte is available and usable
+  #  if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
+  #    include <cstddef>
+  #    if __cpp_lib_byte > 0
+  #      define CATCH_INTERNAL_CONFIG_CPP17_BYTE
+  #    endif
+  #  endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
+
+  // Check if variant is available and usable
+  #  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
+  #    if defined(__clang__) && (__clang_major__ < 8)
+         // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852
+         // fix should be in clang 8, workaround in libstdc++ 8.2
+  #      include <ciso646>
+  #      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
+  #        define CATCH_CONFIG_NO_CPP17_VARIANT
+  #      else
+  #        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
+  #      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
+  #    else
+  #      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
+  #    endif // defined(__clang__) && (__clang_major__ < 8)
+  #  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
+#endif // defined(__has_include)
 
 #if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER)
 #   define CATCH_CONFIG_COUNTER
@@ -330,10 +368,6 @@ namespace Catch {
 #  define CATCH_CONFIG_CPP17_OPTIONAL
 #endif
 
-#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
-#  define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
-#endif
-
 #if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW)
 #  define CATCH_CONFIG_CPP17_STRING_VIEW
 #endif
@@ -342,6 +376,10 @@ namespace Catch {
 #  define CATCH_CONFIG_CPP17_VARIANT
 #endif
 
+#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE)
+#  define CATCH_CONFIG_CPP17_BYTE
+#endif
+
 #if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
 #  define CATCH_INTERNAL_CONFIG_NEW_CAPTURE
 #endif
@@ -358,21 +396,53 @@ namespace Catch {
 #  define CATCH_CONFIG_POLYFILL_ISNAN
 #endif
 
+#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC)  && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC)
+#  define CATCH_CONFIG_USE_ASYNC
+#endif
+
+#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE)
+#  define CATCH_CONFIG_ANDROID_LOGWRITE
+#endif
+
+#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+#  define CATCH_CONFIG_GLOBAL_NEXTAFTER
+#endif
+
+// Even if we do not think the compiler has that warning, we still have
+// to provide a macro that can be used by the code.
+#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION)
+#   define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
+#endif
+#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION)
+#   define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
+#endif
 #if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)
 #   define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
-#   define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
 #endif
 #if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS)
 #   define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
-#   define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
 #endif
 #if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS)
 #   define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS
-#   define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
 #endif
 #if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS)
 #   define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS
-#   define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS
+#endif
+
+// The goal of this macro is to avoid evaluation of the arguments, but
+// still have the compiler warn on problems inside...
+#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN)
+#   define CATCH_INTERNAL_IGNORE_BUT_WARN(...)
+#endif
+
+#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10)
+#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
+#elif defined(__clang__) && (__clang_major__ < 5)
+#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
+#endif
+
+#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS)
+#   define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
 #endif
 
 #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
@@ -437,7 +507,7 @@ namespace Catch {
         SourceLineInfo( SourceLineInfo&& )              noexcept = default;
         SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default;
 
-        bool empty() const noexcept;
+        bool empty() const noexcept { return file[0] == '\0'; }
         bool operator == ( SourceLineInfo const& other ) const noexcept;
         bool operator < ( SourceLineInfo const& other ) const noexcept;
 
@@ -478,9 +548,10 @@ namespace Catch {
 } // end namespace Catch
 
 #define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \
+    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
     CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
     namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \
-    CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
+    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
 
 // end catch_tag_alias_autoregistrar.h
 // start catch_test_registry.h
@@ -507,6 +578,7 @@ namespace Catch {
         virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0;
     };
 
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config );
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );
     std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );
     std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );
@@ -519,53 +591,30 @@ namespace Catch {
 #include <cstddef>
 #include <string>
 #include <iosfwd>
+#include <cassert>
 
 namespace Catch {
 
     /// A non-owning string class (similar to the forthcoming std::string_view)
     /// Note that, because a StringRef may be a substring of another string,
-    /// it may not be null terminated. c_str() must return a null terminated
-    /// string, however, and so the StringRef will internally take ownership
-    /// (taking a copy), if necessary. In theory this ownership is not externally
-    /// visible - but it does mean (substring) StringRefs should not be shared between
-    /// threads.
+    /// it may not be null terminated.
     class StringRef {
     public:
         using size_type = std::size_t;
+        using const_iterator = const char*;
 
     private:
-        friend struct StringRefTestAccess;
-
-        char const* m_start;
-        size_type m_size;
-
-        char* m_data = nullptr;
-
-        void takeOwnership();
-
         static constexpr char const* const s_empty = "";
 
-    public: // construction/ assignment
-        StringRef() noexcept
-        :   StringRef( s_empty, 0 )
-        {}
-
-        StringRef( StringRef const& other ) noexcept
-        :   m_start( other.m_start ),
-            m_size( other.m_size )
-        {}
+        char const* m_start = s_empty;
+        size_type m_size = 0;
 
-        StringRef( StringRef&& other ) noexcept
-        :   m_start( other.m_start ),
-            m_size( other.m_size ),
-            m_data( other.m_data )
-        {
-            other.m_data = nullptr;
-        }
+    public: // construction
+        constexpr StringRef() noexcept = default;
 
         StringRef( char const* rawChars ) noexcept;
 
-        StringRef( char const* rawChars, size_type size ) noexcept
+        constexpr StringRef( char const* rawChars, size_type size ) noexcept
         :   m_start( rawChars ),
             m_size( size )
         {}
@@ -575,101 +624,64 @@ namespace Catch {
             m_size( stdString.size() )
         {}
 
-        ~StringRef() noexcept {
-            delete[] m_data;
+        explicit operator std::string() const {
+            return std::string(m_start, m_size);
         }
 
-        auto operator = ( StringRef const &other ) noexcept -> StringRef& {
-            delete[] m_data;
-            m_data = nullptr;
-            m_start = other.m_start;
-            m_size = other.m_size;
-            return *this;
-        }
-
-        operator std::string() const;
-
-        void swap( StringRef& other ) noexcept;
-
     public: // operators
         auto operator == ( StringRef const& other ) const noexcept -> bool;
-        auto operator != ( StringRef const& other ) const noexcept -> bool;
+        auto operator != (StringRef const& other) const noexcept -> bool {
+            return !(*this == other);
+        }
 
-        auto operator[] ( size_type index ) const noexcept -> char;
+        auto operator[] ( size_type index ) const noexcept -> char {
+            assert(index < m_size);
+            return m_start[index];
+        }
 
     public: // named queries
-        auto empty() const noexcept -> bool {
+        constexpr auto empty() const noexcept -> bool {
             return m_size == 0;
         }
-        auto size() const noexcept -> size_type {
+        constexpr auto size() const noexcept -> size_type {
             return m_size;
         }
 
-        auto numberOfCharacters() const noexcept -> size_type;
+        // Returns the current start pointer. If the StringRef is not
+        // null-terminated, throws std::domain_exception
         auto c_str() const -> char const*;
 
     public: // substrings and searches
-        auto substr( size_type start, size_type size ) const noexcept -> StringRef;
+        // Returns a substring of [start, start + length).
+        // If start + length > size(), then the substring is [start, size()).
+        // If start > size(), then the substring is empty.
+        auto substr( size_type start, size_type length ) const noexcept -> StringRef;
 
-        // Returns the current start pointer.
-        // Note that the pointer can change when if the StringRef is a substring
-        auto currentData() const noexcept -> char const*;
+        // Returns the current start pointer. May not be null-terminated.
+        auto data() const noexcept -> char const*;
 
-    private: // ownership queries - may not be consistent between calls
-        auto isOwned() const noexcept -> bool;
-        auto isSubstring() const noexcept -> bool;
-    };
+        constexpr auto isNullTerminated() const noexcept -> bool {
+            return m_start[m_size] == '\0';
+        }
 
-    auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string;
-    auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string;
-    auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string;
+    public: // iterators
+        constexpr const_iterator begin() const { return m_start; }
+        constexpr const_iterator end() const { return m_start + m_size; }
+    };
 
     auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&;
     auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&;
 
-    inline auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef {
+    constexpr auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef {
         return StringRef( rawChars, size );
     }
-
 } // namespace Catch
 
-inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef {
+constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef {
     return Catch::StringRef( rawChars, size );
 }
 
 // end catch_stringref.h
-// start catch_type_traits.hpp
-
-
-#include <type_traits>
-
-namespace Catch{
-
-#ifdef CATCH_CPP17_OR_GREATER
-	template <typename...>
-	inline constexpr auto is_unique = std::true_type{};
-
-	template <typename T, typename... Rest>
-	inline constexpr auto is_unique<T, Rest...> = std::bool_constant<
-		(!std::is_same_v<T, Rest> && ...) && is_unique<Rest...>
-	>{};
-#else
-
-template <typename...>
-struct is_unique : std::true_type{};
-
-template <typename T0, typename T1, typename... Rest>
-struct is_unique<T0, T1, Rest...> : std::integral_constant
-<bool,
-     !std::is_same<T0, T1>::value
-     && is_unique<T0, Rest...>::value
-     && is_unique<T1, Rest...>::value
->{};
-
-#endif
-}
-
-// end catch_type_traits.hpp
 // start catch_preprocessor.hpp
 
 
@@ -754,7 +766,7 @@ struct is_unique<T0, T1, Rest...> : std::integral_constant
 #define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3)
 #define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4)
 #define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5)
-#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6)
+#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6)
 #define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7)
 #define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8)
 #define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9)
@@ -766,31 +778,49 @@ struct is_unique<T0, T1, Rest...> : std::integral_constant
     template<typename...> struct TypeList {};\
     template<typename...Ts>\
     constexpr auto get_wrapper() noexcept -> TypeList<Ts...> { return {}; }\
+    template<template<typename...> class...> struct TemplateTypeList{};\
+    template<template<typename...> class...Cs>\
+    constexpr auto get_wrapper() noexcept -> TemplateTypeList<Cs...> { return {}; }\
+    template<typename...>\
+    struct append;\
+    template<typename...>\
+    struct rewrap;\
+    template<template<typename...> class, typename...>\
+    struct create;\
+    template<template<typename...> class, typename>\
+    struct convert;\
     \
-    template<template<typename...> class L1, typename...E1, template<typename...> class L2, typename...E2> \
-    constexpr auto append(L1<E1...>, L2<E2...>) noexcept -> L1<E1...,E2...> { return {}; }\
+    template<typename T> \
+    struct append<T> { using type = T; };\
     template< template<typename...> class L1, typename...E1, template<typename...> class L2, typename...E2, typename...Rest>\
-    constexpr auto append(L1<E1...>, L2<E2...>, Rest...) noexcept -> decltype(append(L1<E1...,E2...>{}, Rest{}...)) { return {}; }\
+    struct append<L1<E1...>, L2<E2...>, Rest...> { using type = typename append<L1<E1...,E2...>, Rest...>::type; };\
+    template< template<typename...> class L1, typename...E1, typename...Rest>\
+    struct append<L1<E1...>, TypeList<mpl_::na>, Rest...> { using type = L1<E1...>; };\
     \
     template< template<typename...> class Container, template<typename...> class List, typename...elems>\
-    constexpr auto rewrap(List<elems...>) noexcept -> TypeList<Container<elems...>> { return {}; }\
+    struct rewrap<TemplateTypeList<Container>, List<elems...>> { using type = TypeList<Container<elems...>>; };\
     template< template<typename...> class Container, template<typename...> class List, class...Elems, typename...Elements>\
-    constexpr auto rewrap(List<Elems...>,Elements...) noexcept -> decltype(append(TypeList<Container<Elems...>>{}, rewrap<Container>(Elements{}...))) { return {}; }\
+    struct rewrap<TemplateTypeList<Container>, List<Elems...>, Elements...> { using type = typename append<TypeList<Container<Elems...>>, typename rewrap<TemplateTypeList<Container>, Elements...>::type>::type; };\
     \
     template<template <typename...> class Final, template< typename...> class...Containers, typename...Types>\
-    constexpr auto create(TypeList<Types...>) noexcept -> decltype(append(Final<>{}, rewrap<Containers>(Types{}...)...)) { return {}; }
+    struct create<Final, TemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<TemplateTypeList<Containers>, Types...>::type...>::type; };\
+    template<template <typename...> class Final, template <typename...> class List, typename...Ts>\
+    struct convert<Final, List<Ts...>> { using type = typename append<Final<>,TypeList<Ts>...>::type; };
 
 #define INTERNAL_CATCH_NTTP_1(signature, ...)\
     template<INTERNAL_CATCH_REMOVE_PARENS(signature)> struct Nttp{};\
     template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
     constexpr auto get_wrapper() noexcept -> Nttp<__VA_ARGS__> { return {}; } \
+    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...> struct NttpTemplateTypeList{};\
+    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Cs>\
+    constexpr auto get_wrapper() noexcept -> NttpTemplateTypeList<Cs...> { return {}; } \
     \
     template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature)>\
-    constexpr auto rewrap(List<__VA_ARGS__>) noexcept -> TypeList<Container<__VA_ARGS__>> { return {}; }\
+    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>> { using type = TypeList<Container<__VA_ARGS__>>; };\
     template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature), typename...Elements>\
-    constexpr auto rewrap(List<__VA_ARGS__>,Elements...elems) noexcept -> decltype(append(TypeList<Container<__VA_ARGS__>>{}, rewrap<Container>(elems...))) { return {}; }\
+    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>, Elements...> { using type = typename append<TypeList<Container<__VA_ARGS__>>, typename rewrap<NttpTemplateTypeList<Container>, Elements...>::type>::type; };\
     template<template <typename...> class Final, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Containers, typename...Types>\
-    constexpr auto create(TypeList<Types...>) noexcept -> decltype(append(Final<>{}, rewrap<Containers>(Types{}...)...)) { return {}; }
+    struct create<Final, NttpTemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<NttpTemplateTypeList<Containers>, Types...>::type...>::type; };
 
 #define INTERNAL_CATCH_DECLARE_SIG_TEST0(TestName)
 #define INTERNAL_CATCH_DECLARE_SIG_TEST1(TestName, signature)\
@@ -888,8 +918,38 @@ struct is_unique<T0, T1, Rest...> : std::integral_constant
 namespace Catch {
     template<typename T>
     struct always_false : std::false_type {};
+
+    template <typename> struct true_given : std::true_type {};
+    struct is_callable_tester {
+        template <typename Fun, typename... Args>
+        true_given<decltype(std::declval<Fun>()(std::declval<Args>()...))> static test(int);
+        template <typename...>
+        std::false_type static test(...);
+    };
+
+    template <typename T>
+    struct is_callable;
+
+    template <typename Fun, typename... Args>
+    struct is_callable<Fun(Args...)> : decltype(is_callable_tester::test<Fun, Args...>(0)) {};
+
+#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703
+    // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is
+    // replaced with std::invoke_result here.
+    template <typename Func, typename... U>
+    using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U...>>>;
+#else
+    // Keep ::type here because we still support C++11
+    template <typename Func, typename... U>
+    using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U...)>::type>::type>::type;
+#endif
+
 } // namespace Catch
 
+namespace mpl_{
+    struct na;
+}
+
 // end catch_meta.hpp
 namespace Catch {
 
@@ -981,21 +1041,24 @@ struct AutoReg : NonCopyable {
     ///////////////////////////////////////////////////////////////////////////////
     #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \
         static void TestName(); \
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
         namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
-        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
         static void TestName()
     #define INTERNAL_CATCH_TESTCASE( ... ) \
         INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ )
 
     ///////////////////////////////////////////////////////////////////////////////
     #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
         namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
-        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
 
     ///////////////////////////////////////////////////////////////////////////////
     #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
         namespace{ \
             struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
@@ -1003,21 +1066,24 @@ struct AutoReg : NonCopyable {
             }; \
             Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
         } \
-        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
         void TestName::test()
     #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \
         INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ )
 
     ///////////////////////////////////////////////////////////////////////////////
     #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
         Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
-        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
 
     ///////////////////////////////////////////////////////////////////////////////
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, Signature, ... )\
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
         CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
         INTERNAL_CATCH_DECLARE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature));\
         namespace {\
         namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\
@@ -1030,7 +1096,7 @@ struct AutoReg : NonCopyable {
                     int index = 0;                                    \
                     constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\
                     using expander = int[];\
-                    (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++, 0)... };/* NOLINT */ \
+                    (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
                 }\
             };\
             static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
@@ -1039,8 +1105,7 @@ struct AutoReg : NonCopyable {
         }();\
         }\
         }\
-        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
-        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
         INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
@@ -1060,8 +1125,10 @@ struct AutoReg : NonCopyable {
 #endif
 
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList) \
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION                      \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS                      \
         CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS                \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS              \
         template<typename TestType> static void TestFuncName();       \
         namespace {\
         namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                     \
@@ -1075,19 +1142,18 @@ struct AutoReg : NonCopyable {
                     constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
                     constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
                     constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
-                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */\
+                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++)... };/* NOLINT */\
                 }                                                     \
             };                                                        \
             static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
-                using TestInit = decltype(create<TestName, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>(TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>{})); \
+                using TestInit = typename create<TestName, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \
                 TestInit t;                                           \
                 t.reg_tests();                                        \
                 return 0;                                             \
             }();                                                      \
         }                                                             \
         }                                                             \
-        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS                    \
-        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS              \
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION                       \
         template<typename TestType>                                   \
         static void TestFuncName()
 
@@ -1107,9 +1173,41 @@ struct AutoReg : NonCopyable {
         INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) )
 #endif
 
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)\
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
+        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        template<typename TestType> static void TestFunc();       \
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\
+        INTERNAL_CATCH_TYPE_GEN\
+        template<typename... Types>                               \
+        struct TestName {                                         \
+            void reg_tests() {                                          \
+                int index = 0;                                    \
+                using expander = int[];                           \
+                (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\
+            }                                                     \
+        };\
+        static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
+                using TestInit = typename convert<TestName, TmplList>::type; \
+                TestInit t;                                           \
+                t.reg_tests();                                        \
+                return 0;                                             \
+            }();                                                      \
+        }}\
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION                       \
+        template<typename TestType>                                   \
+        static void TestFunc()
+
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList) \
+        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, TmplList )
+
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... ) \
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
         CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
         namespace {\
         namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \
             INTERNAL_CATCH_TYPE_GEN\
@@ -1122,7 +1220,7 @@ struct AutoReg : NonCopyable {
                     int index = 0;                                    \
                     constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\
                     using expander = int[];\
-                    (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++, 0)... };/* NOLINT */ \
+                    (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
                 }\
             };\
             static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
@@ -1131,8 +1229,7 @@ struct AutoReg : NonCopyable {
         }();\
         }\
         }\
-        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS\
-        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS\
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
         INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
@@ -1152,8 +1249,10 @@ struct AutoReg : NonCopyable {
 #endif
 
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)\
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
         CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
         template<typename TestType> \
             struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
                 void test();\
@@ -1170,19 +1269,18 @@ struct AutoReg : NonCopyable {
                     constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
                     constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
                     constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
-                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */ \
+                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++)... };/* NOLINT */ \
                 }\
             };\
             static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
-                using TestInit = decltype(create<TestNameClass, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>(TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>{}));\
+                using TestInit = typename create<TestNameClass, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type;\
                 TestInit t;\
                 t.reg_tests();\
                 return 0;\
             }(); \
         }\
         }\
-        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
-        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
         template<typename TestType> \
         void TestName<TestType>::test()
 
@@ -1202,6 +1300,39 @@ struct AutoReg : NonCopyable {
         INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) )
 #endif
 
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, TmplList) \
+        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
+        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        template<typename TestType> \
+        struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
+            void test();\
+        };\
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \
+            INTERNAL_CATCH_TYPE_GEN\
+            template<typename...Types>\
+            struct TestNameClass{\
+                void reg_tests(){\
+                    int index = 0;\
+                    using expander = int[];\
+                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \
+                }\
+            };\
+            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
+                using TestInit = typename convert<TestNameClass, TmplList>::type;\
+                TestInit t;\
+                t.reg_tests();\
+                return 0;\
+            }(); \
+        }}\
+        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
+        template<typename TestType> \
+        void TestName<TestType>::test()
+
+#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \
+        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, TmplList )
+
 // end catch_test_registry.h
 // start catch_capture.hpp
 
@@ -1301,7 +1432,7 @@ namespace Catch {
 
     auto makeStream( StringRef const &filename ) -> IStream const*;
 
-    class ReusableStringStream {
+    class ReusableStringStream : NonCopyable {
         std::size_t m_index;
         std::ostream* m_oss;
     public:
@@ -1329,7 +1460,7 @@ namespace Catch {
     namespace Detail {
         struct EnumInfo {
             StringRef m_name;
-            std::vector<std::pair<int, std::string>> m_values;
+            std::vector<std::pair<int, StringRef>> m_values;
 
             ~EnumInfo();
 
@@ -1344,6 +1475,7 @@ namespace Catch {
 
         template<typename E>
         Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::initializer_list<E> values ) {
+            static_assert(sizeof(int) >= sizeof(E), "Cannot serialize enum to int");
             std::vector<int> intValues;
             intValues.reserve( values.size() );
             for( auto enumValue : values )
@@ -1425,9 +1557,9 @@ namespace Catch {
 
         template<typename T>
         class IsStreamInsertable {
-            template<typename SS, typename TT>
+            template<typename Stream, typename U>
             static auto test(int)
-                -> decltype(std::declval<SS&>() << std::declval<TT>(), std::true_type());
+                -> decltype(std::declval<Stream&>() << std::declval<U>(), std::true_type());
 
             template<typename, typename>
             static auto test(...)->std::false_type;
@@ -1589,6 +1721,12 @@ namespace Catch {
         }
     };
 
+#if defined(CATCH_CONFIG_CPP17_BYTE)
+    template<>
+    struct StringMaker<std::byte> {
+        static std::string convert(std::byte value);
+    };
+#endif // defined(CATCH_CONFIG_CPP17_BYTE)
     template<>
     struct StringMaker<int> {
         static std::string convert(int value);
@@ -1682,8 +1820,8 @@ namespace Catch {
 #endif
 
     namespace Detail {
-        template<typename InputIterator>
-        std::string rangeToString(InputIterator first, InputIterator last) {
+        template<typename InputIterator, typename Sentinel = InputIterator>
+        std::string rangeToString(InputIterator first, Sentinel last) {
             ReusableStringStream rss;
             rss << "{ ";
             if (first != last) {
@@ -1841,20 +1979,27 @@ namespace Catch {
 #endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER
 
 namespace Catch {
-    struct not_this_one {}; // Tag type for detecting which begin/ end are being selected
-
-    // Import begin/ end from std here so they are considered alongside the fallback (...) overloads in this namespace
+    // Import begin/ end from std here
     using std::begin;
     using std::end;
 
-    not_this_one begin( ... );
-    not_this_one end( ... );
+    namespace detail {
+        template <typename...>
+        struct void_type {
+            using type = void;
+        };
+
+        template <typename T, typename = void>
+        struct is_range_impl : std::false_type {
+        };
+
+        template <typename T>
+        struct is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> : std::true_type {
+        };
+    } // namespace detail
 
     template <typename T>
-    struct is_range {
-        static const bool value =
-            !std::is_same<decltype(begin(std::declval<T>())), not_this_one>::value &&
-            !std::is_same<decltype(end(std::declval<T>())), not_this_one>::value;
+    struct is_range : detail::is_range_impl<T> {
     };
 
 #if defined(_MANAGED) // Managed types are never ranges
@@ -2024,7 +2169,7 @@ namespace Catch { \
     template<> struct StringMaker<enumName> { \
         static std::string convert( enumName value ) { \
             static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \
-            return enumInfo.lookup( static_cast<int>( value ) ); \
+            return static_cast<std::string>(enumInfo.lookup( static_cast<int>( value ) )); \
         } \
     }; \
 }
@@ -2222,6 +2367,18 @@ namespace Catch {
         auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {
             return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<=", rhs };
         }
+        template <typename RhsT>
+        auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
+            return { static_cast<bool>(m_lhs | rhs), m_lhs, "|", rhs };
+        }
+        template <typename RhsT>
+        auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
+            return { static_cast<bool>(m_lhs & rhs), m_lhs, "&", rhs };
+        }
+        template <typename RhsT>
+        auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
+            return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^", rhs };
+        }
 
         template<typename RhsT>
         auto operator && ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const {
@@ -2270,6 +2427,7 @@ namespace Catch {
 // start catch_interfaces_capture.h
 
 #include <string>
+#include <chrono>
 
 namespace Catch {
 
@@ -2280,14 +2438,18 @@ namespace Catch {
     struct MessageInfo;
     struct MessageBuilder;
     struct Counts;
-    struct BenchmarkInfo;
-    struct BenchmarkStats;
     struct AssertionReaction;
     struct SourceLineInfo;
 
     struct ITransientExpression;
     struct IGeneratorTracker;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    struct BenchmarkInfo;
+    template <typename Duration = std::chrono::duration<double, std::nano>>
+    struct BenchmarkStats;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     struct IResultCapture {
 
         virtual ~IResultCapture();
@@ -2297,10 +2459,14 @@ namespace Catch {
         virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0;
         virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0;
 
-        virtual auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0;
+        virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        virtual void benchmarkPreparing( std::string const& name ) = 0;
         virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0;
-        virtual void benchmarkEnded( BenchmarkStats const& stats ) = 0;
+        virtual void benchmarkEnded( BenchmarkStats<> const& stats ) = 0;
+        virtual void benchmarkFailed( std::string const& error ) = 0;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         virtual void pushScopedMessage( MessageInfo const& message ) = 0;
         virtual void popScopedMessage( MessageInfo const& message ) = 0;
@@ -2531,15 +2697,16 @@ namespace Catch {
 ///////////////////////////////////////////////////////////////////////////////
 #define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \
     do { \
+        CATCH_INTERNAL_IGNORE_BUT_WARN(__VA_ARGS__); \
         Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \
         INTERNAL_CATCH_TRY { \
+            CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
             CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
             catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \
-            CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \
+            CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
         } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
         INTERNAL_CATCH_REACT( catchAssertionHandler ) \
-    } while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look
-    // The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&.
+    } while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) )
 
 ///////////////////////////////////////////////////////////////////////////////
 #define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \
@@ -2756,62 +2923,18 @@ namespace Catch {
 } // end namespace Catch
 
 #define INTERNAL_CATCH_SECTION( ... ) \
+    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
     CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
     if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \
-    CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
+    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
 
 #define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \
+    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
     CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
     if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \
-    CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
+    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
 
 // end catch_section.h
-// start catch_benchmark.h
-
-#include <cstdint>
-#include <string>
-
-namespace Catch {
-
-    class BenchmarkLooper {
-
-        std::string m_name;
-        std::size_t m_count = 0;
-        std::size_t m_iterationsToRun = 1;
-        uint64_t m_resolution;
-        Timer m_timer;
-
-        static auto getResolution() -> uint64_t;
-    public:
-        // Keep most of this inline as it's on the code path that is being timed
-        BenchmarkLooper( StringRef name )
-        :   m_name( name ),
-            m_resolution( getResolution() )
-        {
-            reportStart();
-            m_timer.start();
-        }
-
-        explicit operator bool() {
-            if( m_count < m_iterationsToRun )
-                return true;
-            return needsMoreIterations();
-        }
-
-        void increment() {
-            ++m_count;
-        }
-
-        void reportStart();
-        auto needsMoreIterations() -> bool;
-    };
-
-} // end namespace Catch
-
-#define BENCHMARK( name ) \
-    for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() )
-
-// end catch_benchmark.h
 // start catch_interfaces_exception.h
 
 // start catch_interfaces_registry_hub.h
@@ -2900,6 +3023,9 @@ namespace Catch {
             {}
 
             std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {
+#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
+                return "";
+#else
                 try {
                     if( it == itEnd )
                         std::rethrow_exception(std::current_exception());
@@ -2909,6 +3035,7 @@ namespace Catch {
                 catch( T& ex ) {
                     return m_translateFunction( ex );
                 }
+#endif
             }
 
         protected:
@@ -2927,9 +3054,10 @@ namespace Catch {
 ///////////////////////////////////////////////////////////////////////////////
 #define INTERNAL_CATCH_TRANSLATE_EXCEPTION2( translatorName, signature ) \
     static std::string translatorName( signature ); \
+    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
     CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
     namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \
-    CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
+    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
     static std::string translatorName( signature )
 
 #define INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )
@@ -3071,7 +3199,10 @@ namespace Catch {
     bool contains( std::string const& s, std::string const& infix );
     void toLowerInPlace( std::string& s );
     std::string toLower( std::string const& s );
+    //! Returns a new string without whitespace at the start/end
     std::string trim( std::string const& str );
+    //! Returns a substring of the original ref without whitespace. Beware lifetimes!
+    StringRef trim(StringRef ref);
 
     // !!! Be aware, returns refs into original string - make sure original string outlives them
     std::vector<StringRef> splitStringRef( StringRef str, char delimiter );
@@ -3127,6 +3258,15 @@ namespace Matchers {
             virtual bool match( ObjectT const& arg ) const = 0;
         };
 
+#if defined(__OBJC__)
+        // Hack to fix Catch GH issue #1661. Could use id for generic Object support.
+        // use of const for Object pointers is very uncommon and under ARC it causes some kind of signature mismatch that breaks compilation
+        template<>
+        struct MatcherMethod<NSString*> {
+            virtual bool match( NSString* arg ) const = 0;
+        };
+#endif
+
 #ifdef __clang__
 #    pragma clang diagnostic pop
 #endif
@@ -3164,9 +3304,10 @@ namespace Matchers {
                 return description;
             }
 
-            MatchAllOf<ArgT>& operator && ( MatcherBase<ArgT> const& other ) {
-                m_matchers.push_back( &other );
-                return *this;
+            MatchAllOf<ArgT> operator && ( MatcherBase<ArgT> const& other ) {
+                auto copy(*this);
+                copy.m_matchers.push_back( &other );
+                return copy;
             }
 
             std::vector<MatcherBase<ArgT> const*> m_matchers;
@@ -3197,9 +3338,10 @@ namespace Matchers {
                 return description;
             }
 
-            MatchAnyOf<ArgT>& operator || ( MatcherBase<ArgT> const& other ) {
-                m_matchers.push_back( &other );
-                return *this;
+            MatchAnyOf<ArgT> operator || ( MatcherBase<ArgT> const& other ) {
+                auto copy(*this);
+                copy.m_matchers.push_back( &other );
+                return copy;
             }
 
             std::vector<MatcherBase<ArgT> const*> m_matchers;
@@ -3243,10 +3385,34 @@ using Matchers::Impl::MatcherBase;
 } // namespace Catch
 
 // end catch_matchers.h
-// start catch_matchers_floating.h
+// start catch_matchers_exception.hpp
 
-#include <type_traits>
-#include <cmath>
+namespace Catch {
+namespace Matchers {
+namespace Exception {
+
+class ExceptionMessageMatcher : public MatcherBase<std::exception> {
+    std::string m_message;
+public:
+
+    ExceptionMessageMatcher(std::string const& message):
+        m_message(message)
+    {}
+
+    bool match(std::exception const& ex) const override;
+
+    std::string describe() const override;
+};
+
+} // namespace Exception
+
+Exception::ExceptionMessageMatcher Message(std::string const& message);
+
+} // namespace Matchers
+} // namespace Catch
+
+// end catch_matchers_exception.hpp
+// start catch_matchers_floating.h
 
 namespace Catch {
 namespace Matchers {
@@ -3265,22 +3431,43 @@ namespace Matchers {
         };
 
         struct WithinUlpsMatcher : MatcherBase<double> {
-            WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType);
+            WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType);
             bool match(double const& matchee) const override;
             std::string describe() const override;
         private:
             double m_target;
-            int m_ulps;
+            uint64_t m_ulps;
             FloatingPointKind m_type;
         };
 
+        // Given IEEE-754 format for floats and doubles, we can assume
+        // that float -> double promotion is lossless. Given this, we can
+        // assume that if we do the standard relative comparison of
+        // |lhs - rhs| <= epsilon * max(fabs(lhs), fabs(rhs)), then we get
+        // the same result if we do this for floats, as if we do this for
+        // doubles that were promoted from floats.
+        struct WithinRelMatcher : MatcherBase<double> {
+            WithinRelMatcher(double target, double epsilon);
+            bool match(double const& matchee) const override;
+            std::string describe() const override;
+        private:
+            double m_target;
+            double m_epsilon;
+        };
+
     } // namespace Floating
 
     // The following functions create the actual matcher objects.
     // This allows the types to be inferred
-    Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff);
-    Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff);
+    Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff);
+    Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff);
     Floating::WithinAbsMatcher WithinAbs(double target, double margin);
+    Floating::WithinRelMatcher WithinRel(double target, double eps);
+    // defaults epsilon to 100*numeric_limits<double>::epsilon()
+    Floating::WithinRelMatcher WithinRel(double target);
+    Floating::WithinRelMatcher WithinRel(float target, float eps);
+    // defaults epsilon to 100*numeric_limits<float>::epsilon()
+    Floating::WithinRelMatcher WithinRel(float target);
 
 } // namespace Matchers
 } // namespace Catch
@@ -3411,12 +3598,12 @@ namespace Catch {
 namespace Matchers {
 
     namespace Vector {
-        template<typename T>
-        struct ContainsElementMatcher : MatcherBase<std::vector<T>> {
+        template<typename T, typename Alloc>
+        struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> {
 
             ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {}
 
-            bool match(std::vector<T> const &v) const override {
+            bool match(std::vector<T, Alloc> const &v) const override {
                 for (auto const& el : v) {
                     if (el == m_comparator) {
                         return true;
@@ -3432,12 +3619,12 @@ namespace Matchers {
             T const& m_comparator;
         };
 
-        template<typename T>
-        struct ContainsMatcher : MatcherBase<std::vector<T>> {
+        template<typename T, typename AllocComp, typename AllocMatch>
+        struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
 
-            ContainsMatcher(std::vector<T> const &comparator) : m_comparator( comparator ) {}
+            ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {}
 
-            bool match(std::vector<T> const &v) const override {
+            bool match(std::vector<T, AllocMatch> const &v) const override {
                 // !TBD: see note in EqualsMatcher
                 if (m_comparator.size() > v.size())
                     return false;
@@ -3459,18 +3646,18 @@ namespace Matchers {
                 return "Contains: " + ::Catch::Detail::stringify( m_comparator );
             }
 
-            std::vector<T> const& m_comparator;
+            std::vector<T, AllocComp> const& m_comparator;
         };
 
-        template<typename T>
-        struct EqualsMatcher : MatcherBase<std::vector<T>> {
+        template<typename T, typename AllocComp, typename AllocMatch>
+        struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
 
-            EqualsMatcher(std::vector<T> const &comparator) : m_comparator( comparator ) {}
+            EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {}
 
-            bool match(std::vector<T> const &v) const override {
+            bool match(std::vector<T, AllocMatch> const &v) const override {
                 // !TBD: This currently works if all elements can be compared using !=
                 // - a more general approach would be via a compare template that defaults
-                // to using !=. but could be specialised for, e.g. std::vector<T> etc
+                // to using !=. but could be specialised for, e.g. std::vector<T, Alloc> etc
                 // - then just call that directly
                 if (m_comparator.size() != v.size())
                     return false;
@@ -3482,15 +3669,15 @@ namespace Matchers {
             std::string describe() const override {
                 return "Equals: " + ::Catch::Detail::stringify( m_comparator );
             }
-            std::vector<T> const& m_comparator;
+            std::vector<T, AllocComp> const& m_comparator;
         };
 
-        template<typename T>
-        struct ApproxMatcher : MatcherBase<std::vector<T>> {
+        template<typename T, typename AllocComp, typename AllocMatch>
+        struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> {
 
-            ApproxMatcher(std::vector<T> const& comparator) : m_comparator( comparator ) {}
+            ApproxMatcher(std::vector<T, AllocComp> const& comparator) : m_comparator( comparator ) {}
 
-            bool match(std::vector<T> const &v) const override {
+            bool match(std::vector<T, AllocMatch> const &v) const override {
                 if (m_comparator.size() != v.size())
                     return false;
                 for (std::size_t i = 0; i < v.size(); ++i)
@@ -3517,16 +3704,14 @@ namespace Matchers {
                 return *this;
             }
 
-            std::vector<T> const& m_comparator;
+            std::vector<T, AllocComp> const& m_comparator;
             mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom();
         };
 
-        template<typename T>
-        struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>> {
-            UnorderedEqualsMatcher(std::vector<T> const& target) : m_target(target) {}
-            bool match(std::vector<T> const& vec) const override {
-                // Note: This is a reimplementation of std::is_permutation,
-                //       because I don't want to include <algorithm> inside the common path
+        template<typename T, typename AllocComp, typename AllocMatch>
+        struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
+            UnorderedEqualsMatcher(std::vector<T, AllocComp> const& target) : m_target(target) {}
+            bool match(std::vector<T, AllocMatch> const& vec) const override {
                 if (m_target.size() != vec.size()) {
                     return false;
                 }
@@ -3537,7 +3722,7 @@ namespace Matchers {
                 return "UnorderedEquals: " + ::Catch::Detail::stringify(m_target);
             }
         private:
-            std::vector<T> const& m_target;
+            std::vector<T, AllocComp> const& m_target;
         };
 
     } // namespace Vector
@@ -3545,29 +3730,29 @@ namespace Matchers {
     // The following functions create the actual matcher objects.
     // This allows the types to be inferred
 
-    template<typename T>
-    Vector::ContainsMatcher<T> Contains( std::vector<T> const& comparator ) {
-        return Vector::ContainsMatcher<T>( comparator );
+    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>
+    Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains( std::vector<T, AllocComp> const& comparator ) {
+        return Vector::ContainsMatcher<T, AllocComp, AllocMatch>( comparator );
     }
 
-    template<typename T>
-    Vector::ContainsElementMatcher<T> VectorContains( T const& comparator ) {
-        return Vector::ContainsElementMatcher<T>( comparator );
+    template<typename T, typename Alloc = std::allocator<T>>
+    Vector::ContainsElementMatcher<T, Alloc> VectorContains( T const& comparator ) {
+        return Vector::ContainsElementMatcher<T, Alloc>( comparator );
     }
 
-    template<typename T>
-    Vector::EqualsMatcher<T> Equals( std::vector<T> const& comparator ) {
-        return Vector::EqualsMatcher<T>( comparator );
+    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>
+    Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals( std::vector<T, AllocComp> const& comparator ) {
+        return Vector::EqualsMatcher<T, AllocComp, AllocMatch>( comparator );
     }
 
-    template<typename T>
-    Vector::ApproxMatcher<T> Approx( std::vector<T> const& comparator ) {
-        return Vector::ApproxMatcher<T>( comparator );
+    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>
+    Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx( std::vector<T, AllocComp> const& comparator ) {
+        return Vector::ApproxMatcher<T, AllocComp, AllocMatch>( comparator );
     }
 
-    template<typename T>
-    Vector::UnorderedEqualsMatcher<T> UnorderedEquals(std::vector<T> const& target) {
-        return Vector::UnorderedEqualsMatcher<T>(target);
+    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>
+    Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEquals(std::vector<T, AllocComp> const& target) {
+        return Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch>( target );
     }
 
 } // namespace Matchers
@@ -3678,7 +3863,7 @@ namespace Catch {
 // end catch_interfaces_generatortracker.h
 // start catch_enforce.h
 
-#include <stdexcept>
+#include <exception>
 
 namespace Catch {
 #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
@@ -3691,18 +3876,30 @@ namespace Catch {
     [[noreturn]]
     void throw_exception(std::exception const& e);
 #endif
+
+    [[noreturn]]
+    void throw_logic_error(std::string const& msg);
+    [[noreturn]]
+    void throw_domain_error(std::string const& msg);
+    [[noreturn]]
+    void throw_runtime_error(std::string const& msg);
+
 } // namespace Catch;
 
-#define CATCH_PREPARE_EXCEPTION( type, msg ) \
-    type( ( Catch::ReusableStringStream() << msg ).str() )
-#define CATCH_INTERNAL_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg))
-#define CATCH_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::domain_error, msg ))
-#define CATCH_RUNTIME_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg ))
-#define CATCH_ENFORCE( condition, msg ) \
-    do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false)
+#define CATCH_MAKE_MSG(...) \
+    (Catch::ReusableStringStream() << __VA_ARGS__).str()
+
+#define CATCH_INTERNAL_ERROR(...) \
+    Catch::throw_logic_error(CATCH_MAKE_MSG( CATCH_INTERNAL_LINEINFO << ": Internal Catch2 error: " << __VA_ARGS__))
+
+#define CATCH_ERROR(...) \
+    Catch::throw_domain_error(CATCH_MAKE_MSG( __VA_ARGS__ ))
+
+#define CATCH_RUNTIME_ERROR(...) \
+    Catch::throw_runtime_error(CATCH_MAKE_MSG( __VA_ARGS__ ))
+
+#define CATCH_ENFORCE( condition, ... ) \
+    do{ if( !(condition) ) CATCH_ERROR( __VA_ARGS__ ); } while(false)
 
 // end catch_enforce.h
 #include <memory>
@@ -3751,7 +3948,6 @@ namespace Generators {
     class SingleValueGenerator final : public IGenerator<T> {
         T m_value;
     public:
-        SingleValueGenerator(T const& value) : m_value( value ) {}
         SingleValueGenerator(T&& value) : m_value(std::move(value)) {}
 
         T const& get() const override {
@@ -3764,6 +3960,9 @@ namespace Generators {
 
     template<typename T>
     class FixedValuesGenerator final : public IGenerator<T> {
+        static_assert(!std::is_same<T, bool>::value,
+            "FixedValuesGenerator does not support bools because of std::vector<bool>"
+            "specialization, use SingleValue Generator instead.");
         std::vector<T> m_values;
         size_t m_idx = 0;
     public:
@@ -3811,21 +4010,21 @@ namespace Generators {
             m_generators.emplace_back(std::move(generator));
         }
         void populate(T&& val) {
-            m_generators.emplace_back(value(std::move(val)));
+            m_generators.emplace_back(value(std::forward<T>(val)));
         }
         template<typename U>
         void populate(U&& val) {
-            populate(T(std::move(val)));
+            populate(T(std::forward<U>(val)));
         }
         template<typename U, typename... Gs>
-        void populate(U&& valueOrGenerator, Gs... moreGenerators) {
+        void populate(U&& valueOrGenerator, Gs &&... moreGenerators) {
             populate(std::forward<U>(valueOrGenerator));
             populate(std::forward<Gs>(moreGenerators)...);
         }
 
     public:
         template <typename... Gs>
-        Generators(Gs... moreGenerators) {
+        Generators(Gs &&... moreGenerators) {
             m_generators.reserve(sizeof...(Gs));
             populate(std::forward<Gs>(moreGenerators)...);
         }
@@ -3856,7 +4055,7 @@ namespace Generators {
     struct as {};
 
     template<typename T, typename... Gs>
-    auto makeGenerators( GeneratorWrapper<T>&& generator, Gs... moreGenerators ) -> Generators<T> {
+    auto makeGenerators( GeneratorWrapper<T>&& generator, Gs &&... moreGenerators ) -> Generators<T> {
         return Generators<T>(std::move(generator), std::forward<Gs>(moreGenerators)...);
     }
     template<typename T>
@@ -3864,24 +4063,24 @@ namespace Generators {
         return Generators<T>(std::move(generator));
     }
     template<typename T, typename... Gs>
-    auto makeGenerators( T&& val, Gs... moreGenerators ) -> Generators<T> {
+    auto makeGenerators( T&& val, Gs &&... moreGenerators ) -> Generators<T> {
         return makeGenerators( value( std::forward<T>( val ) ), std::forward<Gs>( moreGenerators )... );
     }
     template<typename T, typename U, typename... Gs>
-    auto makeGenerators( as<T>, U&& val, Gs... moreGenerators ) -> Generators<T> {
+    auto makeGenerators( as<T>, U&& val, Gs &&... moreGenerators ) -> Generators<T> {
         return makeGenerators( value( T( std::forward<U>( val ) ) ), std::forward<Gs>( moreGenerators )... );
     }
 
-    auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker&;
+    auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&;
 
     template<typename L>
     // Note: The type after -> is weird, because VS2015 cannot parse
     //       the expression used in the typedef inside, when it is in
     //       return type. Yeah.
-    auto generate( SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) {
+    auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) {
         using UnderlyingType = typename decltype(generatorExpression())::type;
 
-        IGeneratorTracker& tracker = acquireGeneratorTracker( lineInfo );
+        IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo );
         if (!tracker.hasGenerator()) {
             tracker.setGenerator(pf::make_unique<Generators<UnderlyingType>>(generatorExpression()));
         }
@@ -3894,11 +4093,17 @@ namespace Generators {
 } // namespace Catch
 
 #define GENERATE( ... ) \
-    Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )
+    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
+                                 CATCH_INTERNAL_LINEINFO, \
+                                 [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)
 #define GENERATE_COPY( ... ) \
-    Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )
+    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
+                                 CATCH_INTERNAL_LINEINFO, \
+                                 [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)
 #define GENERATE_REF( ... ) \
-    Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )
+    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
+                                 CATCH_INTERNAL_LINEINFO, \
+                                 [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)
 
 // end catch_generators.hpp
 // start catch_generators_generic.hpp
@@ -3983,6 +4188,9 @@ namespace Generators {
 
     template <typename T>
     class RepeatGenerator : public IGenerator<T> {
+        static_assert(!std::is_same<T, bool>::value,
+            "RepeatGenerator currently does not support bools"
+            "because of std::vector<bool> specialization");
         GeneratorWrapper<T> m_generator;
         mutable std::vector<T> m_returned;
         size_t m_target_repeats;
@@ -4061,18 +4269,7 @@ namespace Generators {
         }
     };
 
-#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703
-    // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is
-    // replaced with std::invoke_result here. Also *_t format is preferred over
-    // typename *::type format.
-    template <typename Func, typename U>
-    using MapFunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U>>>;
-#else
-    template <typename Func, typename U>
-    using MapFunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U)>::type>::type>::type;
-#endif
-
-    template <typename Func, typename U, typename T = MapFunctionReturnType<Func, U>>
+    template <typename Func, typename U, typename T = FunctionReturnType<Func, U>>
     GeneratorWrapper<T> map(Func&& function, GeneratorWrapper<U>&& generator) {
         return GeneratorWrapper<T>(
             pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))
@@ -4097,12 +4294,14 @@ namespace Generators {
             m_chunk_size(size), m_generator(std::move(generator))
         {
             m_chunk.reserve(m_chunk_size);
-            m_chunk.push_back(m_generator.get());
-            for (size_t i = 1; i < m_chunk_size; ++i) {
-                if (!m_generator.next()) {
-                    Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
-                }
+            if (m_chunk_size != 0) {
                 m_chunk.push_back(m_generator.get());
+                for (size_t i = 1; i < m_chunk_size; ++i) {
+                    if (!m_generator.next()) {
+                        Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
+                    }
+                    m_chunk.push_back(m_generator.get());
+                }
             }
         }
         std::vector<T> const& get() const override {
@@ -4173,6 +4372,7 @@ namespace Catch {
     {
         if( !IMutableContext::currentContext )
             IMutableContext::createContext();
+        // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn)
         return *IMutableContext::currentContext;
     }
 
@@ -4182,25 +4382,94 @@ namespace Catch {
     }
 
     void cleanUpContext();
+
+    class SimplePcg32;
+    SimplePcg32& rng();
 }
 
 // end catch_context.h
 // start catch_interfaces_config.h
 
-#include <iosfwd>
-#include <string>
-#include <vector>
-#include <memory>
+// start catch_option.hpp
 
 namespace Catch {
 
-    enum class Verbosity {
-        Quiet = 0,
-        Normal,
-        High
-    };
+    // An optional type
+    template<typename T>
+    class Option {
+    public:
+        Option() : nullableValue( nullptr ) {}
+        Option( T const& _value )
+        : nullableValue( new( storage ) T( _value ) )
+        {}
+        Option( Option const& _other )
+        : nullableValue( _other ? new( storage ) T( *_other ) : nullptr )
+        {}
 
-    struct WarnAbout { enum What {
+        ~Option() {
+            reset();
+        }
+
+        Option& operator= ( Option const& _other ) {
+            if( &_other != this ) {
+                reset();
+                if( _other )
+                    nullableValue = new( storage ) T( *_other );
+            }
+            return *this;
+        }
+        Option& operator = ( T const& _value ) {
+            reset();
+            nullableValue = new( storage ) T( _value );
+            return *this;
+        }
+
+        void reset() {
+            if( nullableValue )
+                nullableValue->~T();
+            nullableValue = nullptr;
+        }
+
+        T& operator*() { return *nullableValue; }
+        T const& operator*() const { return *nullableValue; }
+        T* operator->() { return nullableValue; }
+        const T* operator->() const { return nullableValue; }
+
+        T valueOr( T const& defaultValue ) const {
+            return nullableValue ? *nullableValue : defaultValue;
+        }
+
+        bool some() const { return nullableValue != nullptr; }
+        bool none() const { return nullableValue == nullptr; }
+
+        bool operator !() const { return nullableValue == nullptr; }
+        explicit operator bool() const {
+            return some();
+        }
+
+    private:
+        T *nullableValue;
+        alignas(alignof(T)) char storage[sizeof(T)];
+    };
+
+} // end namespace Catch
+
+// end catch_option.hpp
+#include <chrono>
+#include <iosfwd>
+#include <string>
+#include <vector>
+#include <memory>
+
+namespace Catch {
+
+    enum class Verbosity {
+        Quiet = 0,
+        Normal,
+        High
+    };
+
+    struct WarnAbout { enum What {
         Nothing = 0x00,
         NoAssertions = 0x01,
         NoTests = 0x02
@@ -4244,21 +4513,77 @@ namespace Catch {
         virtual int abortAfter() const = 0;
         virtual bool showInvisibles() const = 0;
         virtual ShowDurations::OrNot showDurations() const = 0;
+        virtual double minDuration() const = 0;
         virtual TestSpec const& testSpec() const = 0;
         virtual bool hasTestFilters() const = 0;
         virtual std::vector<std::string> const& getTestsOrTags() const = 0;
         virtual RunTests::InWhatOrder runOrder() const = 0;
         virtual unsigned int rngSeed() const = 0;
-        virtual int benchmarkResolutionMultiple() const = 0;
         virtual UseColour::YesOrNo useColour() const = 0;
         virtual std::vector<std::string> const& getSectionsToRun() const = 0;
         virtual Verbosity verbosity() const = 0;
+
+        virtual bool benchmarkNoAnalysis() const = 0;
+        virtual int benchmarkSamples() const = 0;
+        virtual double benchmarkConfidenceInterval() const = 0;
+        virtual unsigned int benchmarkResamples() const = 0;
+        virtual std::chrono::milliseconds benchmarkWarmupTime() const = 0;
     };
 
     using IConfigPtr = std::shared_ptr<IConfig const>;
 }
 
 // end catch_interfaces_config.h
+// start catch_random_number_generator.h
+
+#include <cstdint>
+
+namespace Catch {
+
+    // This is a simple implementation of C++11 Uniform Random Number
+    // Generator. It does not provide all operators, because Catch2
+    // does not use it, but it should behave as expected inside stdlib's
+    // distributions.
+    // The implementation is based on the PCG family (http://pcg-random.org)
+    class SimplePcg32 {
+        using state_type = std::uint64_t;
+    public:
+        using result_type = std::uint32_t;
+        static constexpr result_type (min)() {
+            return 0;
+        }
+        static constexpr result_type (max)() {
+            return static_cast<result_type>(-1);
+        }
+
+        // Provide some default initial state for the default constructor
+        SimplePcg32():SimplePcg32(0xed743cc4U) {}
+
+        explicit SimplePcg32(result_type seed_);
+
+        void seed(result_type seed_);
+        void discard(uint64_t skip);
+
+        result_type operator()();
+
+    private:
+        friend bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs);
+        friend bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs);
+
+        // In theory we also need operator<< and operator>>
+        // In practice we do not use them, so we will skip them for now
+
+        std::uint64_t m_state;
+        // This part of the state determines which "stream" of the numbers
+        // is chosen -- we take it as a constant for Catch2, so we only
+        // need to deal with seeding the main state.
+        // Picked by reading 8 bytes from `/dev/random` :-)
+        static const std::uint64_t s_inc = (0x13ed0cc53f939476ULL << 1ULL) | 1ULL;
+    };
+
+} // end namespace Catch
+
+// end catch_random_number_generator.h
 #include <random>
 
 namespace Catch {
@@ -4266,14 +4591,13 @@ namespace Generators {
 
 template <typename Float>
 class RandomFloatingGenerator final : public IGenerator<Float> {
-    // FIXME: What is the right seed?
-    std::minstd_rand m_rand;
+    Catch::SimplePcg32& m_rng;
     std::uniform_real_distribution<Float> m_dist;
     Float m_current_number;
 public:
 
     RandomFloatingGenerator(Float a, Float b):
-        m_rand(getCurrentContext().getConfig()->rngSeed()),
+        m_rng(rng()),
         m_dist(a, b) {
         static_cast<void>(next());
     }
@@ -4282,20 +4606,20 @@ public:
         return m_current_number;
     }
     bool next() override {
-        m_current_number = m_dist(m_rand);
+        m_current_number = m_dist(m_rng);
         return true;
     }
 };
 
 template <typename Integer>
 class RandomIntegerGenerator final : public IGenerator<Integer> {
-    std::minstd_rand m_rand;
+    Catch::SimplePcg32& m_rng;
     std::uniform_int_distribution<Integer> m_dist;
     Integer m_current_number;
 public:
 
     RandomIntegerGenerator(Integer a, Integer b):
-        m_rand(getCurrentContext().getConfig()->rngSeed()),
+        m_rng(rng()),
         m_dist(a, b) {
         static_cast<void>(next());
     }
@@ -4304,7 +4628,7 @@ public:
         return m_current_number;
     }
     bool next() override {
-        m_current_number = m_dist(m_rand);
+        m_current_number = m_dist(m_rng);
         return true;
     }
 };
@@ -4364,7 +4688,7 @@ public:
 
 template <typename T>
 GeneratorWrapper<T> range(T const& start, T const& end, T const& step) {
-    static_assert(std::is_integral<T>::value && !std::is_same<T, bool>::value, "Type must be an integer");
+    static_assert(std::is_arithmetic<T>::value && !std::is_same<T, bool>::value, "Type must be numeric");
     return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end, step));
 }
 
@@ -4374,6 +4698,45 @@ GeneratorWrapper<T> range(T const& start, T const& end) {
     return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end));
 }
 
+template <typename T>
+class IteratorGenerator final : public IGenerator<T> {
+    static_assert(!std::is_same<T, bool>::value,
+        "IteratorGenerator currently does not support bools"
+        "because of std::vector<bool> specialization");
+
+    std::vector<T> m_elems;
+    size_t m_current = 0;
+public:
+    template <typename InputIterator, typename InputSentinel>
+    IteratorGenerator(InputIterator first, InputSentinel last):m_elems(first, last) {
+        if (m_elems.empty()) {
+            Catch::throw_exception(GeneratorException("IteratorGenerator received no valid values"));
+        }
+    }
+
+    T const& get() const override {
+        return m_elems[m_current];
+    }
+
+    bool next() override {
+        ++m_current;
+        return m_current != m_elems.size();
+    }
+};
+
+template <typename InputIterator,
+          typename InputSentinel,
+          typename ResultType = typename std::iterator_traits<InputIterator>::value_type>
+GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) {
+    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(from, to));
+}
+
+template <typename Container,
+          typename ResultType = typename Container::value_type>
+GeneratorWrapper<ResultType> from_range(Container const& cnt) {
+    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end()));
+}
+
 } // namespace Generators
 } // namespace Catch
 
@@ -4577,7 +4940,7 @@ namespace Catch {
                     arcSafeRelease( m_substr );
                 }
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return false;
                 }
 
@@ -4587,7 +4950,7 @@ namespace Catch {
             struct Equals : StringHolder {
                 Equals( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str isEqualToString:m_substr];
                 }
@@ -4600,7 +4963,7 @@ namespace Catch {
             struct Contains : StringHolder {
                 Contains( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location != NSNotFound;
                 }
@@ -4613,7 +4976,7 @@ namespace Catch {
             struct StartsWith : StringHolder {
                 StartsWith( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location == 0;
                 }
@@ -4625,7 +4988,7 @@ namespace Catch {
             struct EndsWith : StringHolder {
                 EndsWith( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location == [str length] - [m_substr length];
                 }
@@ -4676,7 +5039,8 @@ return @ desc; \
 // end catch_objc.hpp
 #endif
 
-#ifdef CATCH_CONFIG_EXTERNAL_INTERFACES
+// Benchmarking needs the externally-facing parts of reporters to work
+#if defined(CATCH_CONFIG_EXTERNAL_INTERFACES) || defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
 // start catch_external_interfaces.h
 
 // start catch_reporter_bases.hpp
@@ -4718,7 +5082,7 @@ namespace Catch
         virtual bool matches( std::string const& str ) const;
 
     private:
-        std::string adjustCase( std::string const& str ) const;
+        std::string normaliseString( std::string const& str ) const;
         CaseSensitive::Choice m_caseSensitivity;
         WildcardPosition m_wildcard = NoWildcard;
         std::string m_pattern;
@@ -4732,17 +5096,23 @@ namespace Catch
 
 namespace Catch {
 
+    struct IConfig;
+
     class TestSpec {
-        struct Pattern {
+        class Pattern {
+        public:
+            explicit Pattern( std::string const& name );
             virtual ~Pattern();
             virtual bool matches( TestCaseInfo const& testCase ) const = 0;
+            std::string const& name() const;
+        private:
+            std::string const m_name;
         };
         using PatternPtr = std::shared_ptr<Pattern>;
 
         class NamePattern : public Pattern {
         public:
-            NamePattern( std::string const& name );
-            virtual ~NamePattern();
+            explicit NamePattern( std::string const& name, std::string const& filterString );
             bool matches( TestCaseInfo const& testCase ) const override;
         private:
             WildcardPattern m_wildcardPattern;
@@ -4750,8 +5120,7 @@ namespace Catch {
 
         class TagPattern : public Pattern {
         public:
-            TagPattern( std::string const& tag );
-            virtual ~TagPattern();
+            explicit TagPattern( std::string const& tag, std::string const& filterString );
             bool matches( TestCaseInfo const& testCase ) const override;
         private:
             std::string m_tag;
@@ -4759,8 +5128,7 @@ namespace Catch {
 
         class ExcludedPattern : public Pattern {
         public:
-            ExcludedPattern( PatternPtr const& underlyingPattern );
-            virtual ~ExcludedPattern();
+            explicit ExcludedPattern( PatternPtr const& underlyingPattern );
             bool matches( TestCaseInfo const& testCase ) const override;
         private:
             PatternPtr m_underlyingPattern;
@@ -4770,15 +5138,25 @@ namespace Catch {
             std::vector<PatternPtr> m_patterns;
 
             bool matches( TestCaseInfo const& testCase ) const;
+            std::string name() const;
         };
 
     public:
+        struct FilterMatch {
+            std::string name;
+            std::vector<TestCase const*> tests;
+        };
+        using Matches = std::vector<FilterMatch>;
+        using vectorStrings = std::vector<std::string>;
+
         bool hasFilters() const;
         bool matches( TestCaseInfo const& testCase ) const;
+        Matches matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const;
+        const vectorStrings & getInvalidArgs() const;
 
     private:
         std::vector<Filter> m_filters;
-
+        std::vector<std::string> m_invalidArgs;
         friend class TestSpecParser;
     };
 }
@@ -4813,9 +5191,13 @@ namespace Catch {
     class TestSpecParser {
         enum Mode{ None, Name, QuotedName, Tag, EscapedName };
         Mode m_mode = None;
+        Mode lastMode = None;
         bool m_exclusion = false;
-        std::size_t m_start = std::string::npos, m_pos = 0;
+        std::size_t m_pos = 0;
+        std::size_t m_realPatternPos = 0;
         std::string m_arg;
+        std::string m_substring;
+        std::string m_patternName;
         std::vector<std::size_t> m_escapeChars;
         TestSpec::Filter m_currentFilter;
         TestSpec m_testSpec;
@@ -4828,32 +5210,32 @@ namespace Catch {
         TestSpec testSpec();
 
     private:
-        void visitChar( char c );
-        void startNewMode( Mode mode, std::size_t start );
+        bool visitChar( char c );
+        void startNewMode( Mode mode );
+        bool processNoneChar( char c );
+        void processNameChar( char c );
+        bool processOtherChar( char c );
+        void endMode();
         void escape();
-        std::string subString() const;
+        bool isControlChar( char c ) const;
+        void saveLastMode();
+        void revertBackToLastMode();
+        void addFilter();
+        bool separate();
 
-        template<typename T>
-        void addPattern() {
-            std::string token = subString();
-            for( std::size_t i = 0; i < m_escapeChars.size(); ++i )
-                token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 );
-            m_escapeChars.clear();
-            if( startsWith( token, "exclude:" ) ) {
-                m_exclusion = true;
-                token = token.substr( 8 );
-            }
-            if( !token.empty() ) {
-                TestSpec::PatternPtr pattern = std::make_shared<T>( token );
-                if( m_exclusion )
-                    pattern = std::make_shared<TestSpec::ExcludedPattern>( pattern );
-                m_currentFilter.m_patterns.push_back( pattern );
-            }
-            m_exclusion = false;
-            m_mode = None;
+        // Handles common preprocessing of the pattern for name/tag patterns
+        std::string preprocessPattern();
+        // Adds the current pattern as a test name
+        void addNamePattern();
+        // Adds the current pattern as a tag
+        void addTagPattern();
+
+        inline void addCharToPattern(char c) {
+            m_substring += c;
+            m_patternName += c;
+            m_realPatternPos++;
         }
 
-        void addFilter();
     };
     TestSpec parseTestSpec( std::string const& arg );
 
@@ -4894,11 +5276,17 @@ namespace Catch {
 
         int abortAfter = -1;
         unsigned int rngSeed = 0;
-        int benchmarkResolutionMultiple = 100;
+
+        bool benchmarkNoAnalysis = false;
+        unsigned int benchmarkSamples = 100;
+        double benchmarkConfidenceInterval = 0.95;
+        unsigned int benchmarkResamples = 100000;
+        std::chrono::milliseconds::rep benchmarkWarmupTime = 100;
 
         Verbosity verbosity = Verbosity::Normal;
         WarnAbout::What warnings = WarnAbout::Nothing;
         ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter;
+        double minDuration = -1;
         RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder;
         UseColour::YesOrNo useColour = UseColour::Auto;
         WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;
@@ -4949,14 +5337,19 @@ namespace Catch {
         bool warnAboutMissingAssertions() const override;
         bool warnAboutNoTests() const override;
         ShowDurations::OrNot showDurations() const override;
+        double minDuration() const override;
         RunTests::InWhatOrder runOrder() const override;
         unsigned int rngSeed() const override;
-        int benchmarkResolutionMultiple() const override;
         UseColour::YesOrNo useColour() const override;
         bool shouldDebugBreak() const override;
         int abortAfter() const override;
         bool showInvisibles() const override;
         Verbosity verbosity() const override;
+        bool benchmarkNoAnalysis() const override;
+        int benchmarkSamples() const override;
+        double benchmarkConfidenceInterval() const override;
+        unsigned int benchmarkResamples() const override;
+        std::chrono::milliseconds benchmarkWarmupTime() const override;
 
     private:
 
@@ -5017,76 +5410,59 @@ namespace Catch {
 } // end namespace Catch
 
 // end catch_assertionresult.h
-// start catch_option.hpp
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+// start catch_estimate.hpp
 
-namespace Catch {
-
-    // An optional type
-    template<typename T>
-    class Option {
-    public:
-        Option() : nullableValue( nullptr ) {}
-        Option( T const& _value )
-        : nullableValue( new( storage ) T( _value ) )
-        {}
-        Option( Option const& _other )
-        : nullableValue( _other ? new( storage ) T( *_other ) : nullptr )
-        {}
+ // Statistics estimates
 
-        ~Option() {
-            reset();
-        }
 
-        Option& operator= ( Option const& _other ) {
-            if( &_other != this ) {
-                reset();
-                if( _other )
-                    nullableValue = new( storage ) T( *_other );
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct Estimate {
+            Duration point;
+            Duration lower_bound;
+            Duration upper_bound;
+            double confidence_interval;
+
+            template <typename Duration2>
+            operator Estimate<Duration2>() const {
+                return { point, lower_bound, upper_bound, confidence_interval };
             }
-            return *this;
-        }
-        Option& operator = ( T const& _value ) {
-            reset();
-            nullableValue = new( storage ) T( _value );
-            return *this;
-        }
-
-        void reset() {
-            if( nullableValue )
-                nullableValue->~T();
-            nullableValue = nullptr;
-        }
-
-        T& operator*() { return *nullableValue; }
-        T const& operator*() const { return *nullableValue; }
-        T* operator->() { return nullableValue; }
-        const T* operator->() const { return nullableValue; }
-
-        T valueOr( T const& defaultValue ) const {
-            return nullableValue ? *nullableValue : defaultValue;
-        }
+        };
+    } // namespace Benchmark
+} // namespace Catch
 
-        bool some() const { return nullableValue != nullptr; }
-        bool none() const { return nullableValue == nullptr; }
+// end catch_estimate.hpp
+// start catch_outlier_classification.hpp
 
-        bool operator !() const { return nullableValue == nullptr; }
-        explicit operator bool() const {
-            return some();
-        }
+// Outlier information
 
-    private:
-        T *nullableValue;
-        alignas(alignof(T)) char storage[sizeof(T)];
-    };
+namespace Catch {
+    namespace Benchmark {
+        struct OutlierClassification {
+            int samples_seen = 0;
+            int low_severe = 0;     // more than 3 times IQR below Q1
+            int low_mild = 0;       // 1.5 to 3 times IQR below Q1
+            int high_mild = 0;      // 1.5 to 3 times IQR above Q3
+            int high_severe = 0;    // more than 3 times IQR above Q3
+
+            int total() const {
+                return low_severe + low_mild + high_mild + high_severe;
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
 
-} // end namespace Catch
+// end catch_outlier_classification.hpp
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
-// end catch_option.hpp
 #include <string>
 #include <iosfwd>
 #include <map>
 #include <set>
 #include <memory>
+#include <algorithm>
 
 namespace Catch {
 
@@ -5222,14 +5598,43 @@ namespace Catch {
         bool aborting;
     };
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
     struct BenchmarkInfo {
         std::string name;
+        double estimatedDuration;
+        int iterations;
+        int samples;
+        unsigned int resamples;
+        double clockResolution;
+        double clockCost;
     };
+
+    template <class Duration>
     struct BenchmarkStats {
         BenchmarkInfo info;
-        std::size_t iterations;
-        uint64_t elapsedTimeInNanoseconds;
+
+        std::vector<Duration> samples;
+        Benchmark::Estimate<Duration> mean;
+        Benchmark::Estimate<Duration> standardDeviation;
+        Benchmark::OutlierClassification outliers;
+        double outlierVariance;
+
+        template <typename Duration2>
+        operator BenchmarkStats<Duration2>() const {
+            std::vector<Duration2> samples2;
+            samples2.reserve(samples.size());
+            std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });
+            return {
+                info,
+                std::move(samples2),
+                mean,
+                standardDeviation,
+                outliers,
+                outlierVariance,
+            };
+        }
     };
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
     struct IStreamingReporter {
         virtual ~IStreamingReporter() = default;
@@ -5242,23 +5647,26 @@ namespace Catch {
 
         virtual void noMatchingTestCases( std::string const& spec ) = 0;
 
+        virtual void reportInvalidArguments(std::string const&) {}
+
         virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0;
         virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0;
 
         virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;
         virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;
 
-        // *** experimental ***
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        virtual void benchmarkPreparing( std::string const& ) {}
         virtual void benchmarkStarting( BenchmarkInfo const& ) {}
+        virtual void benchmarkEnded( BenchmarkStats<> const& ) {}
+        virtual void benchmarkFailed( std::string const& ) {}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;
 
         // The return value indicates if the messages buffer should be cleared:
         virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;
 
-        // *** experimental ***
-        virtual void benchmarkEnded( BenchmarkStats const& ) {}
-
         virtual void sectionEnded( SectionStats const& sectionStats ) = 0;
         virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;
         virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;
@@ -5307,6 +5715,9 @@ namespace Catch {
     // Returns double formatted as %.3f (format expected on output)
     std::string getFormattedDuration( double duration );
 
+    //! Should the reporter show
+    bool shouldShowDuration( IConfig const& config, double duration );
+
     std::string serializeFilters( std::vector<std::string> const& container );
 
     template<typename DerivedT>
@@ -5333,6 +5744,8 @@ namespace Catch {
 
         void noMatchingTestCases(std::string const&) override {}
 
+        void reportInvalidArguments(std::string const&) override {}
+
         void testRunStarting(TestRunInfo const& _testRunInfo) override {
             currentTestRunInfo = _testRunInfo;
         }
@@ -5667,14 +6080,16 @@ namespace Catch {
 #if !defined(CATCH_CONFIG_DISABLE)
 
 #define CATCH_REGISTER_REPORTER( name, reporterType ) \
+    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION         \
     CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS          \
     namespace{ Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); } \
-    CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
+    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
 
 #define CATCH_REGISTER_LISTENER( listenerType ) \
-     CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS   \
-     namespace{ Catch::ListenerRegistrar<listenerType> catch_internal_RegistrarFor##listenerType; } \
-     CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
+    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION   \
+    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS    \
+    namespace{ Catch::ListenerRegistrar<listenerType> catch_internal_RegistrarFor##listenerType; } \
+    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
 #else // CATCH_CONFIG_DISABLE
 
 #define CATCH_REGISTER_REPORTER(name, reporterType)
@@ -5696,8 +6111,6 @@ namespace Catch {
 
         static std::string getDescription();
 
-        ReporterPreferences getPreferences() const override;
-
         void noMatchingTestCases(std::string const& spec) override;
 
         void assertionStarting(AssertionInfo const&) override;
@@ -5736,6 +6149,8 @@ namespace Catch {
 
         void noMatchingTestCases(std::string const& spec) override;
 
+        void reportInvalidArguments(std::string const&arg) override;
+
         void assertionStarting(AssertionInfo const&) override;
 
         bool assertionEnded(AssertionStats const& _assertionStats) override;
@@ -5743,8 +6158,12 @@ namespace Catch {
         void sectionStarting(SectionInfo const& _sectionInfo) override;
         void sectionEnded(SectionStats const& _sectionStats) override;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
         void benchmarkStarting(BenchmarkInfo const& info) override;
-        void benchmarkEnded(BenchmarkStats const& stats) override;
+        void benchmarkEnded(BenchmarkStats<> const& stats) override;
+        void benchmarkFailed(std::string const& error) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void testCaseEnded(TestCaseStats const& _testCaseStats) override;
         void testGroupEnded(TestGroupStats const& _testGroupStats) override;
@@ -5791,6 +6210,14 @@ namespace Catch {
 #include <vector>
 
 namespace Catch {
+    enum class XmlFormatting {
+        None = 0x00,
+        Indent = 0x01,
+        Newline = 0x02,
+    };
+
+    XmlFormatting operator | (XmlFormatting lhs, XmlFormatting rhs);
+    XmlFormatting operator & (XmlFormatting lhs, XmlFormatting rhs);
 
     class XmlEncode {
     public:
@@ -5812,14 +6239,14 @@ namespace Catch {
 
         class ScopedElement {
         public:
-            ScopedElement( XmlWriter* writer );
+            ScopedElement( XmlWriter* writer, XmlFormatting fmt );
 
             ScopedElement( ScopedElement&& other ) noexcept;
             ScopedElement& operator=( ScopedElement&& other ) noexcept;
 
             ~ScopedElement();
 
-            ScopedElement& writeText( std::string const& text, bool indent = true );
+            ScopedElement& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent );
 
             template<typename T>
             ScopedElement& writeAttribute( std::string const& name, T const& attribute ) {
@@ -5827,156 +6254,1189 @@ namespace Catch {
                 return *this;
             }
 
-        private:
-            mutable XmlWriter* m_writer = nullptr;
-        };
+        private:
+            mutable XmlWriter* m_writer = nullptr;
+            XmlFormatting m_fmt;
+        };
+
+        XmlWriter( std::ostream& os = Catch::cout() );
+        ~XmlWriter();
+
+        XmlWriter( XmlWriter const& ) = delete;
+        XmlWriter& operator=( XmlWriter const& ) = delete;
+
+        XmlWriter& startElement( std::string const& name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);
+
+        ScopedElement scopedElement( std::string const& name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);
+
+        XmlWriter& endElement(XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);
+
+        XmlWriter& writeAttribute( std::string const& name, std::string const& attribute );
+
+        XmlWriter& writeAttribute( std::string const& name, bool attribute );
+
+        template<typename T>
+        XmlWriter& writeAttribute( std::string const& name, T const& attribute ) {
+            ReusableStringStream rss;
+            rss << attribute;
+            return writeAttribute( name, rss.str() );
+        }
+
+        XmlWriter& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);
+
+        XmlWriter& writeComment(std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);
+
+        void writeStylesheetRef( std::string const& url );
+
+        XmlWriter& writeBlankLine();
+
+        void ensureTagClosed();
+
+    private:
+
+        void applyFormatting(XmlFormatting fmt);
+
+        void writeDeclaration();
+
+        void newlineIfNecessary();
+
+        bool m_tagIsOpen = false;
+        bool m_needsNewline = false;
+        std::vector<std::string> m_tags;
+        std::string m_indent;
+        std::ostream& m_os;
+    };
+
+}
+
+// end catch_xmlwriter.h
+namespace Catch {
+
+    class JunitReporter : public CumulativeReporterBase<JunitReporter> {
+    public:
+        JunitReporter(ReporterConfig const& _config);
+
+        ~JunitReporter() override;
+
+        static std::string getDescription();
+
+        void noMatchingTestCases(std::string const& /*spec*/) override;
+
+        void testRunStarting(TestRunInfo const& runInfo) override;
+
+        void testGroupStarting(GroupInfo const& groupInfo) override;
+
+        void testCaseStarting(TestCaseInfo const& testCaseInfo) override;
+        bool assertionEnded(AssertionStats const& assertionStats) override;
+
+        void testCaseEnded(TestCaseStats const& testCaseStats) override;
+
+        void testGroupEnded(TestGroupStats const& testGroupStats) override;
+
+        void testRunEndedCumulative() override;
+
+        void writeGroup(TestGroupNode const& groupNode, double suiteTime);
+
+        void writeTestCase(TestCaseNode const& testCaseNode);
+
+        void writeSection(std::string const& className,
+                          std::string const& rootName,
+                          SectionNode const& sectionNode);
+
+        void writeAssertions(SectionNode const& sectionNode);
+        void writeAssertion(AssertionStats const& stats);
+
+        XmlWriter xml;
+        Timer suiteTimer;
+        std::string stdOutForSuite;
+        std::string stdErrForSuite;
+        unsigned int unexpectedExceptions = 0;
+        bool m_okToFail = false;
+    };
+
+} // end namespace Catch
+
+// end catch_reporter_junit.h
+// start catch_reporter_xml.h
+
+namespace Catch {
+    class XmlReporter : public StreamingReporterBase<XmlReporter> {
+    public:
+        XmlReporter(ReporterConfig const& _config);
+
+        ~XmlReporter() override;
+
+        static std::string getDescription();
+
+        virtual std::string getStylesheetRef() const;
+
+        void writeSourceInfo(SourceLineInfo const& sourceInfo);
+
+    public: // StreamingReporterBase
+
+        void noMatchingTestCases(std::string const& s) override;
+
+        void testRunStarting(TestRunInfo const& testInfo) override;
+
+        void testGroupStarting(GroupInfo const& groupInfo) override;
+
+        void testCaseStarting(TestCaseInfo const& testInfo) override;
+
+        void sectionStarting(SectionInfo const& sectionInfo) override;
+
+        void assertionStarting(AssertionInfo const&) override;
+
+        bool assertionEnded(AssertionStats const& assertionStats) override;
+
+        void sectionEnded(SectionStats const& sectionStats) override;
+
+        void testCaseEnded(TestCaseStats const& testCaseStats) override;
+
+        void testGroupEnded(TestGroupStats const& testGroupStats) override;
+
+        void testRunEnded(TestRunStats const& testRunStats) override;
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
+        void benchmarkStarting(BenchmarkInfo const&) override;
+        void benchmarkEnded(BenchmarkStats<> const&) override;
+        void benchmarkFailed(std::string const&) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
+    private:
+        Timer m_testCaseTimer;
+        XmlWriter m_xml;
+        int m_sectionDepth = 0;
+    };
+
+} // end namespace Catch
+
+// end catch_reporter_xml.h
+
+// end catch_external_interfaces.h
+#endif
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+// start catch_benchmarking_all.hpp
+
+// A proxy header that includes all of the benchmarking headers to allow
+// concise include of the benchmarking features. You should prefer the
+// individual includes in standard use.
+
+// start catch_benchmark.hpp
+
+ // Benchmark
+
+// start catch_chronometer.hpp
+
+// User-facing chronometer
+
+
+// start catch_clock.hpp
+
+// Clocks
+
+
+#include <chrono>
+#include <ratio>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Clock>
+        using ClockDuration = typename Clock::duration;
+        template <typename Clock>
+        using FloatDuration = std::chrono::duration<double, typename Clock::period>;
+
+        template <typename Clock>
+        using TimePoint = typename Clock::time_point;
+
+        using default_clock = std::chrono::steady_clock;
+
+        template <typename Clock>
+        struct now {
+            TimePoint<Clock> operator()() const {
+                return Clock::now();
+            }
+        };
+
+        using fp_seconds = std::chrono::duration<double, std::ratio<1>>;
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_clock.hpp
+// start catch_optimizer.hpp
+
+ // Hinting the optimizer
+
+
+#if defined(_MSC_VER)
+#   include <atomic> // atomic_thread_fence
+#endif
+
+namespace Catch {
+    namespace Benchmark {
+#if defined(__GNUC__) || defined(__clang__)
+        template <typename T>
+        inline void keep_memory(T* p) {
+            asm volatile("" : : "g"(p) : "memory");
+        }
+        inline void keep_memory() {
+            asm volatile("" : : : "memory");
+        }
+
+        namespace Detail {
+            inline void optimizer_barrier() { keep_memory(); }
+        } // namespace Detail
+#elif defined(_MSC_VER)
+
+#pragma optimize("", off)
+        template <typename T>
+        inline void keep_memory(T* p) {
+            // thanks @milleniumbug
+            *reinterpret_cast<char volatile*>(p) = *reinterpret_cast<char const volatile*>(p);
+        }
+        // TODO equivalent keep_memory()
+#pragma optimize("", on)
+
+        namespace Detail {
+            inline void optimizer_barrier() {
+                std::atomic_thread_fence(std::memory_order_seq_cst);
+            }
+        } // namespace Detail
+
+#endif
+
+        template <typename T>
+        inline void deoptimize_value(T&& x) {
+            keep_memory(&x);
+        }
+
+        template <typename Fn, typename... Args>
+        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<!std::is_same<void, decltype(fn(args...))>::value>::type {
+            deoptimize_value(std::forward<Fn>(fn) (std::forward<Args...>(args...)));
+        }
+
+        template <typename Fn, typename... Args>
+        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<std::is_same<void, decltype(fn(args...))>::value>::type {
+            std::forward<Fn>(fn) (std::forward<Args...>(args...));
+        }
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_optimizer.hpp
+// start catch_complete_invoke.hpp
+
+// Invoke with a special case for void
+
+
+#include <type_traits>
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename T>
+            struct CompleteType { using type = T; };
+            template <>
+            struct CompleteType<void> { struct type {}; };
+
+            template <typename T>
+            using CompleteType_t = typename CompleteType<T>::type;
+
+            template <typename Result>
+            struct CompleteInvoker {
+                template <typename Fun, typename... Args>
+                static Result invoke(Fun&& fun, Args&&... args) {
+                    return std::forward<Fun>(fun)(std::forward<Args>(args)...);
+                }
+            };
+            template <>
+            struct CompleteInvoker<void> {
+                template <typename Fun, typename... Args>
+                static CompleteType_t<void> invoke(Fun&& fun, Args&&... args) {
+                    std::forward<Fun>(fun)(std::forward<Args>(args)...);
+                    return {};
+                }
+            };
+
+            // invoke and not return void :(
+            template <typename Fun, typename... Args>
+            CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) {
+                return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...);
+            }
+
+            const std::string benchmarkErrorMsg = "a benchmark failed to run successfully";
+        } // namespace Detail
+
+        template <typename Fun>
+        Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) {
+            CATCH_TRY{
+                return Detail::complete_invoke(std::forward<Fun>(fun));
+            } CATCH_CATCH_ALL{
+                getResultCapture().benchmarkFailed(translateActiveException());
+                CATCH_RUNTIME_ERROR(Detail::benchmarkErrorMsg);
+            }
+        }
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_complete_invoke.hpp
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            struct ChronometerConcept {
+                virtual void start() = 0;
+                virtual void finish() = 0;
+                virtual ~ChronometerConcept() = default;
+            };
+            template <typename Clock>
+            struct ChronometerModel final : public ChronometerConcept {
+                void start() override { started = Clock::now(); }
+                void finish() override { finished = Clock::now(); }
+
+                ClockDuration<Clock> elapsed() const { return finished - started; }
+
+                TimePoint<Clock> started;
+                TimePoint<Clock> finished;
+            };
+        } // namespace Detail
+
+        struct Chronometer {
+        public:
+            template <typename Fun>
+            void measure(Fun&& fun) { measure(std::forward<Fun>(fun), is_callable<Fun(int)>()); }
+
+            int runs() const { return k; }
+
+            Chronometer(Detail::ChronometerConcept& meter, int k)
+                : impl(&meter)
+                , k(k) {}
+
+        private:
+            template <typename Fun>
+            void measure(Fun&& fun, std::false_type) {
+                measure([&fun](int) { return fun(); }, std::true_type());
+            }
+
+            template <typename Fun>
+            void measure(Fun&& fun, std::true_type) {
+                Detail::optimizer_barrier();
+                impl->start();
+                for (int i = 0; i < k; ++i) invoke_deoptimized(fun, i);
+                impl->finish();
+                Detail::optimizer_barrier();
+            }
+
+            Detail::ChronometerConcept* impl;
+            int k;
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_chronometer.hpp
+// start catch_environment.hpp
+
+// Environment information
+
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct EnvironmentEstimate {
+            Duration mean;
+            OutlierClassification outliers;
+
+            template <typename Duration2>
+            operator EnvironmentEstimate<Duration2>() const {
+                return { mean, outliers };
+            }
+        };
+        template <typename Clock>
+        struct Environment {
+            using clock_type = Clock;
+            EnvironmentEstimate<FloatDuration<Clock>> clock_resolution;
+            EnvironmentEstimate<FloatDuration<Clock>> clock_cost;
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_environment.hpp
+// start catch_execution_plan.hpp
+
+ // Execution plan
+
+
+// start catch_benchmark_function.hpp
+
+ // Dumb std::function implementation for consistent call overhead
+
+
+#include <cassert>
+#include <type_traits>
+#include <utility>
+#include <memory>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename T>
+            using Decay = typename std::decay<T>::type;
+            template <typename T, typename U>
+            struct is_related
+                : std::is_same<Decay<T>, Decay<U>> {};
+
+            /// We need to reinvent std::function because every piece of code that might add overhead
+            /// in a measurement context needs to have consistent performance characteristics so that we
+            /// can account for it in the measurement.
+            /// Implementations of std::function with optimizations that aren't always applicable, like
+            /// small buffer optimizations, are not uncommon.
+            /// This is effectively an implementation of std::function without any such optimizations;
+            /// it may be slow, but it is consistently slow.
+            struct BenchmarkFunction {
+            private:
+                struct callable {
+                    virtual void call(Chronometer meter) const = 0;
+                    virtual callable* clone() const = 0;
+                    virtual ~callable() = default;
+                };
+                template <typename Fun>
+                struct model : public callable {
+                    model(Fun&& fun) : fun(std::move(fun)) {}
+                    model(Fun const& fun) : fun(fun) {}
+
+                    model<Fun>* clone() const override { return new model<Fun>(*this); }
+
+                    void call(Chronometer meter) const override {
+                        call(meter, is_callable<Fun(Chronometer)>());
+                    }
+                    void call(Chronometer meter, std::true_type) const {
+                        fun(meter);
+                    }
+                    void call(Chronometer meter, std::false_type) const {
+                        meter.measure(fun);
+                    }
+
+                    Fun fun;
+                };
+
+                struct do_nothing { void operator()() const {} };
+
+                template <typename T>
+                BenchmarkFunction(model<T>* c) : f(c) {}
+
+            public:
+                BenchmarkFunction()
+                    : f(new model<do_nothing>{ {} }) {}
+
+                template <typename Fun,
+                    typename std::enable_if<!is_related<Fun, BenchmarkFunction>::value, int>::type = 0>
+                    BenchmarkFunction(Fun&& fun)
+                    : f(new model<typename std::decay<Fun>::type>(std::forward<Fun>(fun))) {}
+
+                BenchmarkFunction(BenchmarkFunction&& that)
+                    : f(std::move(that.f)) {}
+
+                BenchmarkFunction(BenchmarkFunction const& that)
+                    : f(that.f->clone()) {}
+
+                BenchmarkFunction& operator=(BenchmarkFunction&& that) {
+                    f = std::move(that.f);
+                    return *this;
+                }
+
+                BenchmarkFunction& operator=(BenchmarkFunction const& that) {
+                    f.reset(that.f->clone());
+                    return *this;
+                }
+
+                void operator()(Chronometer meter) const { f->call(meter); }
+
+            private:
+                std::unique_ptr<callable> f;
+            };
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_benchmark_function.hpp
+// start catch_repeat.hpp
+
+// repeat algorithm
+
+
+#include <type_traits>
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Fun>
+            struct repeater {
+                void operator()(int k) const {
+                    for (int i = 0; i < k; ++i) {
+                        fun();
+                    }
+                }
+                Fun fun;
+            };
+            template <typename Fun>
+            repeater<typename std::decay<Fun>::type> repeat(Fun&& fun) {
+                return { std::forward<Fun>(fun) };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_repeat.hpp
+// start catch_run_for_at_least.hpp
+
+// Run a function for a minimum amount of time
+
+
+// start catch_measure.hpp
+
+// Measure
+
+
+// start catch_timing.hpp
+
+// Timing
+
+
+#include <tuple>
+#include <type_traits>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration, typename Result>
+        struct Timing {
+            Duration elapsed;
+            Result result;
+            int iterations;
+        };
+        template <typename Clock, typename Func, typename... Args>
+        using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>;
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_timing.hpp
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock, typename Fun, typename... Args>
+            TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) {
+                auto start = Clock::now();
+                auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...);
+                auto end = Clock::now();
+                auto delta = end - start;
+                return { delta, std::forward<decltype(r)>(r), 1 };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_measure.hpp
+#include <utility>
+#include <type_traits>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun, int> measure_one(Fun&& fun, int iters, std::false_type) {
+                return Detail::measure<Clock>(fun, iters);
+            }
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) {
+                Detail::ChronometerModel<Clock> meter;
+                auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters));
+
+                return { meter.elapsed(), std::move(result), iters };
+            }
+
+            template <typename Clock, typename Fun>
+            using run_for_at_least_argument_t = typename std::conditional<is_callable<Fun(Chronometer)>::value, Chronometer, int>::type;
+
+            struct optimized_away_error : std::exception {
+                const char* what() const noexcept override {
+                    return "could not measure benchmark, maybe it was optimized away";
+                }
+            };
+
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) {
+                auto iters = seed;
+                while (iters < (1 << 30)) {
+                    auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
+
+                    if (Timing.elapsed >= how_long) {
+                        return { Timing.elapsed, std::move(Timing.result), iters };
+                    }
+                    iters *= 2;
+                }
+                throw optimized_away_error{};
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_run_for_at_least.hpp
+#include <algorithm>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct ExecutionPlan {
+            int iterations_per_sample;
+            Duration estimated_duration;
+            Detail::BenchmarkFunction benchmark;
+            Duration warmup_time;
+            int warmup_iterations;
+
+            template <typename Duration2>
+            operator ExecutionPlan<Duration2>() const {
+                return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations };
+            }
+
+            template <typename Clock>
+            std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {
+                // warmup a bit
+                Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_iterations, Detail::repeat(now<Clock>{}));
+
+                std::vector<FloatDuration<Clock>> times;
+                times.reserve(cfg.benchmarkSamples());
+                std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] {
+                    Detail::ChronometerModel<Clock> model;
+                    this->benchmark(Chronometer(model, iterations_per_sample));
+                    auto sample_time = model.elapsed() - env.clock_cost.mean;
+                    if (sample_time < FloatDuration<Clock>::zero()) sample_time = FloatDuration<Clock>::zero();
+                    return sample_time / iterations_per_sample;
+                });
+                return times;
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_execution_plan.hpp
+// start catch_estimate_clock.hpp
+
+ // Environment measurement
+
+
+// start catch_stats.hpp
+
+// Statistical analysis tools
+
+
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <iterator>
+#include <numeric>
+#include <tuple>
+#include <cmath>
+#include <utility>
+#include <cstddef>
+#include <random>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            using sample = std::vector<double>;
+
+            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last);
+
+            template <typename Iterator>
+            OutlierClassification classify_outliers(Iterator first, Iterator last) {
+                std::vector<double> copy(first, last);
+
+                auto q1 = weighted_average_quantile(1, 4, copy.begin(), copy.end());
+                auto q3 = weighted_average_quantile(3, 4, copy.begin(), copy.end());
+                auto iqr = q3 - q1;
+                auto los = q1 - (iqr * 3.);
+                auto lom = q1 - (iqr * 1.5);
+                auto him = q3 + (iqr * 1.5);
+                auto his = q3 + (iqr * 3.);
+
+                OutlierClassification o;
+                for (; first != last; ++first) {
+                    auto&& t = *first;
+                    if (t < los) ++o.low_severe;
+                    else if (t < lom) ++o.low_mild;
+                    else if (t > his) ++o.high_severe;
+                    else if (t > him) ++o.high_mild;
+                    ++o.samples_seen;
+                }
+                return o;
+            }
+
+            template <typename Iterator>
+            double mean(Iterator first, Iterator last) {
+                auto count = last - first;
+                double sum = std::accumulate(first, last, 0.);
+                return sum / count;
+            }
+
+            template <typename URng, typename Iterator, typename Estimator>
+            sample resample(URng& rng, int resamples, Iterator first, Iterator last, Estimator& estimator) {
+                auto n = last - first;
+                std::uniform_int_distribution<decltype(n)> dist(0, n - 1);
+
+                sample out;
+                out.reserve(resamples);
+                std::generate_n(std::back_inserter(out), resamples, [n, first, &estimator, &dist, &rng] {
+                    std::vector<double> resampled;
+                    resampled.reserve(n);
+                    std::generate_n(std::back_inserter(resampled), n, [first, &dist, &rng] { return first[dist(rng)]; });
+                    return estimator(resampled.begin(), resampled.end());
+                });
+                std::sort(out.begin(), out.end());
+                return out;
+            }
+
+            template <typename Estimator, typename Iterator>
+            sample jackknife(Estimator&& estimator, Iterator first, Iterator last) {
+                auto n = last - first;
+                auto second = std::next(first);
+                sample results;
+                results.reserve(n);
 
-        XmlWriter( std::ostream& os = Catch::cout() );
-        ~XmlWriter();
+                for (auto it = first; it != last; ++it) {
+                    std::iter_swap(it, first);
+                    results.push_back(estimator(second, last));
+                }
 
-        XmlWriter( XmlWriter const& ) = delete;
-        XmlWriter& operator=( XmlWriter const& ) = delete;
+                return results;
+            }
 
-        XmlWriter& startElement( std::string const& name );
+            inline double normal_cdf(double x) {
+                return std::erfc(-x / std::sqrt(2.0)) / 2.0;
+            }
 
-        ScopedElement scopedElement( std::string const& name );
+            double erfc_inv(double x);
+
+            double normal_quantile(double p);
+
+            template <typename Iterator, typename Estimator>
+            Estimate<double> bootstrap(double confidence_level, Iterator first, Iterator last, sample const& resample, Estimator&& estimator) {
+                auto n_samples = last - first;
+
+                double point = estimator(first, last);
+                // Degenerate case with a single sample
+                if (n_samples == 1) return { point, point, point, confidence_level };
+
+                sample jack = jackknife(estimator, first, last);
+                double jack_mean = mean(jack.begin(), jack.end());
+                double sum_squares, sum_cubes;
+                std::tie(sum_squares, sum_cubes) = std::accumulate(jack.begin(), jack.end(), std::make_pair(0., 0.), [jack_mean](std::pair<double, double> sqcb, double x) -> std::pair<double, double> {
+                    auto d = jack_mean - x;
+                    auto d2 = d * d;
+                    auto d3 = d2 * d;
+                    return { sqcb.first + d2, sqcb.second + d3 };
+                });
+
+                double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5));
+                int n = static_cast<int>(resample.size());
+                double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / (double)n;
+                // degenerate case with uniform samples
+                if (prob_n == 0) return { point, point, point, confidence_level };
+
+                double bias = normal_quantile(prob_n);
+                double z1 = normal_quantile((1. - confidence_level) / 2.);
+
+                auto cumn = [n](double x) -> int {
+                    return std::lround(normal_cdf(x) * n); };
+                auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); };
+                double b1 = bias + z1;
+                double b2 = bias - z1;
+                double a1 = a(b1);
+                double a2 = a(b2);
+                auto lo = std::max(cumn(a1), 0);
+                auto hi = std::min(cumn(a2), n - 1);
+
+                return { point, resample[lo], resample[hi], confidence_level };
+            }
 
-        XmlWriter& endElement();
+            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n);
 
-        XmlWriter& writeAttribute( std::string const& name, std::string const& attribute );
+            struct bootstrap_analysis {
+                Estimate<double> mean;
+                Estimate<double> standard_deviation;
+                double outlier_variance;
+            };
 
-        XmlWriter& writeAttribute( std::string const& name, bool attribute );
+            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last);
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
 
-        template<typename T>
-        XmlWriter& writeAttribute( std::string const& name, T const& attribute ) {
-            ReusableStringStream rss;
-            rss << attribute;
-            return writeAttribute( name, rss.str() );
-        }
+// end catch_stats.hpp
+#include <algorithm>
+#include <iterator>
+#include <tuple>
+#include <vector>
+#include <cmath>
 
-        XmlWriter& writeText( std::string const& text, bool indent = true );
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock>
+            std::vector<double> resolution(int k) {
+                std::vector<TimePoint<Clock>> times;
+                times.reserve(k + 1);
+                std::generate_n(std::back_inserter(times), k + 1, now<Clock>{});
+
+                std::vector<double> deltas;
+                deltas.reserve(k);
+                std::transform(std::next(times.begin()), times.end(), times.begin(),
+                    std::back_inserter(deltas),
+                    [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); });
+
+                return deltas;
+            }
 
-        XmlWriter& writeComment( std::string const& text );
+            const auto warmup_iterations = 10000;
+            const auto warmup_time = std::chrono::milliseconds(100);
+            const auto minimum_ticks = 1000;
+            const auto warmup_seed = 10000;
+            const auto clock_resolution_estimation_time = std::chrono::milliseconds(500);
+            const auto clock_cost_estimation_time_limit = std::chrono::seconds(1);
+            const auto clock_cost_estimation_tick_limit = 100000;
+            const auto clock_cost_estimation_time = std::chrono::milliseconds(10);
+            const auto clock_cost_estimation_iterations = 10000;
+
+            template <typename Clock>
+            int warmup() {
+                return run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_seed, &resolution<Clock>)
+                    .iterations;
+            }
+            template <typename Clock>
+            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) {
+                auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>)
+                    .result;
+                return {
+                    FloatDuration<Clock>(mean(r.begin(), r.end())),
+                    classify_outliers(r.begin(), r.end()),
+                };
+            }
+            template <typename Clock>
+            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) {
+                auto time_limit = std::min(resolution * clock_cost_estimation_tick_limit, FloatDuration<Clock>(clock_cost_estimation_time_limit));
+                auto time_clock = [](int k) {
+                    return Detail::measure<Clock>([k] {
+                        for (int i = 0; i < k; ++i) {
+                            volatile auto ignored = Clock::now();
+                            (void)ignored;
+                        }
+                    }).elapsed;
+                };
+                time_clock(1);
+                int iters = clock_cost_estimation_iterations;
+                auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_cost_estimation_time), iters, time_clock);
+                std::vector<double> times;
+                int nsamples = static_cast<int>(std::ceil(time_limit / r.elapsed));
+                times.reserve(nsamples);
+                std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] {
+                    return static_cast<double>((time_clock(r.iterations) / r.iterations).count());
+                });
+                return {
+                    FloatDuration<Clock>(mean(times.begin(), times.end())),
+                    classify_outliers(times.begin(), times.end()),
+                };
+            }
 
-        void writeStylesheetRef( std::string const& url );
+            template <typename Clock>
+            Environment<FloatDuration<Clock>> measure_environment() {
+                static Environment<FloatDuration<Clock>>* env = nullptr;
+                if (env) {
+                    return *env;
+                }
 
-        XmlWriter& writeBlankLine();
+                auto iters = Detail::warmup<Clock>();
+                auto resolution = Detail::estimate_clock_resolution<Clock>(iters);
+                auto cost = Detail::estimate_clock_cost<Clock>(resolution.mean);
 
-        void ensureTagClosed();
+                env = new Environment<FloatDuration<Clock>>{ resolution, cost };
+                return *env;
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
 
-    private:
+// end catch_estimate_clock.hpp
+// start catch_analyse.hpp
 
-        void writeDeclaration();
+ // Run and analyse one benchmark
 
-        void newlineIfNecessary();
 
-        bool m_tagIsOpen = false;
-        bool m_needsNewline = false;
-        std::vector<std::string> m_tags;
-        std::string m_indent;
-        std::ostream& m_os;
-    };
+// start catch_sample_analysis.hpp
 
-}
+// Benchmark results
 
-// end catch_xmlwriter.h
-namespace Catch {
 
-    class JunitReporter : public CumulativeReporterBase<JunitReporter> {
-    public:
-        JunitReporter(ReporterConfig const& _config);
+#include <algorithm>
+#include <vector>
+#include <string>
+#include <iterator>
 
-        ~JunitReporter() override;
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct SampleAnalysis {
+            std::vector<Duration> samples;
+            Estimate<Duration> mean;
+            Estimate<Duration> standard_deviation;
+            OutlierClassification outliers;
+            double outlier_variance;
+
+            template <typename Duration2>
+            operator SampleAnalysis<Duration2>() const {
+                std::vector<Duration2> samples2;
+                samples2.reserve(samples.size());
+                std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });
+                return {
+                    std::move(samples2),
+                    mean,
+                    standard_deviation,
+                    outliers,
+                    outlier_variance,
+                };
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
 
-        static std::string getDescription();
+// end catch_sample_analysis.hpp
+#include <algorithm>
+#include <iterator>
+#include <vector>
 
-        void noMatchingTestCases(std::string const& /*spec*/) override;
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Duration, typename Iterator>
+            SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last) {
+                if (!cfg.benchmarkNoAnalysis()) {
+                    std::vector<double> samples;
+                    samples.reserve(last - first);
+                    std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); });
+
+                    auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end());
+                    auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end());
+
+                    auto wrap_estimate = [](Estimate<double> e) {
+                        return Estimate<Duration> {
+                            Duration(e.point),
+                                Duration(e.lower_bound),
+                                Duration(e.upper_bound),
+                                e.confidence_interval,
+                        };
+                    };
+                    std::vector<Duration> samples2;
+                    samples2.reserve(samples.size());
+                    std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); });
+                    return {
+                        std::move(samples2),
+                        wrap_estimate(analysis.mean),
+                        wrap_estimate(analysis.standard_deviation),
+                        outliers,
+                        analysis.outlier_variance,
+                    };
+                } else {
+                    std::vector<Duration> samples;
+                    samples.reserve(last - first);
+
+                    Duration mean = Duration(0);
+                    int i = 0;
+                    for (auto it = first; it < last; ++it, ++i) {
+                        samples.push_back(Duration(*it));
+                        mean += Duration(*it);
+                    }
+                    mean /= i;
+
+                    return {
+                        std::move(samples),
+                        Estimate<Duration>{mean, mean, mean, 0.0},
+                        Estimate<Duration>{Duration(0), Duration(0), Duration(0), 0.0},
+                        OutlierClassification{},
+                        0.0
+                    };
+                }
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
 
-        void testRunStarting(TestRunInfo const& runInfo) override;
+// end catch_analyse.hpp
+#include <algorithm>
+#include <functional>
+#include <string>
+#include <vector>
+#include <cmath>
 
-        void testGroupStarting(GroupInfo const& groupInfo) override;
+namespace Catch {
+    namespace Benchmark {
+        struct Benchmark {
+            Benchmark(std::string &&name)
+                : name(std::move(name)) {}
+
+            template <class FUN>
+            Benchmark(std::string &&name, FUN &&func)
+                : fun(std::move(func)), name(std::move(name)) {}
+
+            template <typename Clock>
+            ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {
+                auto min_time = env.clock_resolution.mean * Detail::minimum_ticks;
+                auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(cfg.benchmarkWarmupTime()));
+                auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun);
+                int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed));
+                return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations };
+            }
 
-        void testCaseStarting(TestCaseInfo const& testCaseInfo) override;
-        bool assertionEnded(AssertionStats const& assertionStats) override;
+            template <typename Clock = default_clock>
+            void run() {
+                IConfigPtr cfg = getCurrentContext().getConfig();
 
-        void testCaseEnded(TestCaseStats const& testCaseStats) override;
+                auto env = Detail::measure_environment<Clock>();
 
-        void testGroupEnded(TestGroupStats const& testGroupStats) override;
+                getResultCapture().benchmarkPreparing(name);
+                CATCH_TRY{
+                    auto plan = user_code([&] {
+                        return prepare<Clock>(*cfg, env);
+                    });
 
-        void testRunEndedCumulative() override;
+                    BenchmarkInfo info {
+                        name,
+                        plan.estimated_duration.count(),
+                        plan.iterations_per_sample,
+                        cfg->benchmarkSamples(),
+                        cfg->benchmarkResamples(),
+                        env.clock_resolution.mean.count(),
+                        env.clock_cost.mean.count()
+                    };
 
-        void writeGroup(TestGroupNode const& groupNode, double suiteTime);
+                    getResultCapture().benchmarkStarting(info);
 
-        void writeTestCase(TestCaseNode const& testCaseNode);
+                    auto samples = user_code([&] {
+                        return plan.template run<Clock>(*cfg, env);
+                    });
 
-        void writeSection(std::string const& className,
-                          std::string const& rootName,
-                          SectionNode const& sectionNode);
+                    auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());
+                    BenchmarkStats<FloatDuration<Clock>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
+                    getResultCapture().benchmarkEnded(stats);
 
-        void writeAssertions(SectionNode const& sectionNode);
-        void writeAssertion(AssertionStats const& stats);
+                } CATCH_CATCH_ALL{
+                    if (translateActiveException() != Detail::benchmarkErrorMsg) // benchmark errors have been reported, otherwise rethrow.
+                        std::rethrow_exception(std::current_exception());
+                }
+            }
 
-        XmlWriter xml;
-        Timer suiteTimer;
-        std::string stdOutForSuite;
-        std::string stdErrForSuite;
-        unsigned int unexpectedExceptions = 0;
-        bool m_okToFail = false;
-    };
+            // sets lambda to be used in fun *and* executes benchmark!
+            template <typename Fun,
+                typename std::enable_if<!Detail::is_related<Fun, Benchmark>::value, int>::type = 0>
+                Benchmark & operator=(Fun func) {
+                fun = Detail::BenchmarkFunction(func);
+                run();
+                return *this;
+            }
 
-} // end namespace Catch
+            explicit operator bool() {
+                return true;
+            }
 
-// end catch_reporter_junit.h
-// start catch_reporter_xml.h
+        private:
+            Detail::BenchmarkFunction fun;
+            std::string name;
+        };
+    }
+} // namespace Catch
 
-namespace Catch {
-    class XmlReporter : public StreamingReporterBase<XmlReporter> {
-    public:
-        XmlReporter(ReporterConfig const& _config);
+#define INTERNAL_CATCH_GET_1_ARG(arg1, arg2, ...) arg1
+#define INTERNAL_CATCH_GET_2_ARG(arg1, arg2, ...) arg2
 
-        ~XmlReporter() override;
+#define INTERNAL_CATCH_BENCHMARK(BenchmarkName, name, benchmarkIndex)\
+    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
+        BenchmarkName = [&](int benchmarkIndex)
 
-        static std::string getDescription();
+#define INTERNAL_CATCH_BENCHMARK_ADVANCED(BenchmarkName, name)\
+    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
+        BenchmarkName = [&]
 
-        virtual std::string getStylesheetRef() const;
+// end catch_benchmark.hpp
+// start catch_constructor.hpp
 
-        void writeSourceInfo(SourceLineInfo const& sourceInfo);
+// Constructor and destructor helpers
 
-    public: // StreamingReporterBase
 
-        void noMatchingTestCases(std::string const& s) override;
+#include <type_traits>
 
-        void testRunStarting(TestRunInfo const& testInfo) override;
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename T, bool Destruct>
+            struct ObjectStorage
+            {
+                using TStorage = typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type;
 
-        void testGroupStarting(GroupInfo const& groupInfo) override;
+                ObjectStorage() : data() {}
 
-        void testCaseStarting(TestCaseInfo const& testInfo) override;
+                ObjectStorage(const ObjectStorage& other)
+                {
+                    new(&data) T(other.stored_object());
+                }
 
-        void sectionStarting(SectionInfo const& sectionInfo) override;
+                ObjectStorage(ObjectStorage&& other)
+                {
+                    new(&data) T(std::move(other.stored_object()));
+                }
 
-        void assertionStarting(AssertionInfo const&) override;
+                ~ObjectStorage() { destruct_on_exit<T>(); }
 
-        bool assertionEnded(AssertionStats const& assertionStats) override;
+                template <typename... Args>
+                void construct(Args&&... args)
+                {
+                    new (&data) T(std::forward<Args>(args)...);
+                }
 
-        void sectionEnded(SectionStats const& sectionStats) override;
+                template <bool AllowManualDestruction = !Destruct>
+                typename std::enable_if<AllowManualDestruction>::type destruct()
+                {
+                    stored_object().~T();
+                }
 
-        void testCaseEnded(TestCaseStats const& testCaseStats) override;
+            private:
+                // If this is a constructor benchmark, destruct the underlying object
+                template <typename U>
+                void destruct_on_exit(typename std::enable_if<Destruct, U>::type* = 0) { destruct<true>(); }
+                // Otherwise, don't
+                template <typename U>
+                void destruct_on_exit(typename std::enable_if<!Destruct, U>::type* = 0) { }
 
-        void testGroupEnded(TestGroupStats const& testGroupStats) override;
+                T& stored_object() {
+                    return *static_cast<T*>(static_cast<void*>(&data));
+                }
 
-        void testRunEnded(TestRunStats const& testRunStats) override;
+                T const& stored_object() const {
+                    return *static_cast<T*>(static_cast<void*>(&data));
+                }
 
-    private:
-        Timer m_testCaseTimer;
-        XmlWriter m_xml;
-        int m_sectionDepth = 0;
-    };
+                TStorage data;
+            };
+        }
 
-} // end namespace Catch
+        template <typename T>
+        using storage_for = Detail::ObjectStorage<T, true>;
 
-// end catch_reporter_xml.h
+        template <typename T>
+        using destructable_object = Detail::ObjectStorage<T, false>;
+    }
+}
 
-// end catch_external_interfaces.h
+// end catch_constructor.hpp
+// end catch_benchmarking_all.hpp
 #endif
 
 #endif // ! CATCH_CONFIG_IMPL_ONLY
@@ -6004,23 +7464,37 @@ namespace TestCaseTracking {
         SourceLineInfo location;
 
         NameAndLocation( std::string const& _name, SourceLineInfo const& _location );
+        friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) {
+            return lhs.name == rhs.name
+                && lhs.location == rhs.location;
+        }
     };
 
-    struct ITracker;
+    class ITracker;
 
     using ITrackerPtr = std::shared_ptr<ITracker>;
 
-    struct ITracker {
-        virtual ~ITracker();
+    class  ITracker {
+        NameAndLocation m_nameAndLocation;
+
+    public:
+        ITracker(NameAndLocation const& nameAndLoc) :
+            m_nameAndLocation(nameAndLoc)
+        {}
 
         // static queries
-        virtual NameAndLocation const& nameAndLocation() const = 0;
+        NameAndLocation const& nameAndLocation() const {
+            return m_nameAndLocation;
+        }
+
+        virtual ~ITracker();
 
         // dynamic queries
         virtual bool isComplete() const = 0; // Successfully completed or failed
         virtual bool isSuccessfullyCompleted() const = 0;
         virtual bool isOpen() const = 0; // Started but not complete
         virtual bool hasChildren() const = 0;
+        virtual bool hasStarted() const = 0;
 
         virtual ITracker& parent() = 0;
 
@@ -6075,7 +7549,6 @@ namespace TestCaseTracking {
         };
 
         using Children = std::vector<ITrackerPtr>;
-        NameAndLocation m_nameAndLocation;
         TrackerContext& m_ctx;
         ITracker* m_parent;
         Children m_children;
@@ -6084,11 +7557,13 @@ namespace TestCaseTracking {
     public:
         TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );
 
-        NameAndLocation const& nameAndLocation() const override;
         bool isComplete() const override;
         bool isSuccessfullyCompleted() const override;
         bool isOpen() const override;
         bool hasChildren() const override;
+        bool hasStarted() const override {
+            return m_runState != NotStarted;
+        }
 
         void addChild( ITrackerPtr const& child ) override;
 
@@ -6113,6 +7588,7 @@ namespace TestCaseTracking {
 
     class SectionTracker : public TrackerBase {
         std::vector<std::string> m_filters;
+        std::string m_trimmed_name;
     public:
         SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );
 
@@ -6150,6 +7626,217 @@ namespace Catch {
 }
 // end catch_leak_detector.h
 // Cpp files will be included in the single-header file here
+// start catch_stats.cpp
+
+// Statistical analysis tools
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+
+#include <cassert>
+#include <random>
+
+#if defined(CATCH_CONFIG_USE_ASYNC)
+#include <future>
+#endif
+
+namespace {
+    double erf_inv(double x) {
+        // Code accompanying the article "Approximating the erfinv function" in GPU Computing Gems, Volume 2
+        double w, p;
+
+        w = -log((1.0 - x) * (1.0 + x));
+
+        if (w < 6.250000) {
+            w = w - 3.125000;
+            p = -3.6444120640178196996e-21;
+            p = -1.685059138182016589e-19 + p * w;
+            p = 1.2858480715256400167e-18 + p * w;
+            p = 1.115787767802518096e-17 + p * w;
+            p = -1.333171662854620906e-16 + p * w;
+            p = 2.0972767875968561637e-17 + p * w;
+            p = 6.6376381343583238325e-15 + p * w;
+            p = -4.0545662729752068639e-14 + p * w;
+            p = -8.1519341976054721522e-14 + p * w;
+            p = 2.6335093153082322977e-12 + p * w;
+            p = -1.2975133253453532498e-11 + p * w;
+            p = -5.4154120542946279317e-11 + p * w;
+            p = 1.051212273321532285e-09 + p * w;
+            p = -4.1126339803469836976e-09 + p * w;
+            p = -2.9070369957882005086e-08 + p * w;
+            p = 4.2347877827932403518e-07 + p * w;
+            p = -1.3654692000834678645e-06 + p * w;
+            p = -1.3882523362786468719e-05 + p * w;
+            p = 0.0001867342080340571352 + p * w;
+            p = -0.00074070253416626697512 + p * w;
+            p = -0.0060336708714301490533 + p * w;
+            p = 0.24015818242558961693 + p * w;
+            p = 1.6536545626831027356 + p * w;
+        } else if (w < 16.000000) {
+            w = sqrt(w) - 3.250000;
+            p = 2.2137376921775787049e-09;
+            p = 9.0756561938885390979e-08 + p * w;
+            p = -2.7517406297064545428e-07 + p * w;
+            p = 1.8239629214389227755e-08 + p * w;
+            p = 1.5027403968909827627e-06 + p * w;
+            p = -4.013867526981545969e-06 + p * w;
+            p = 2.9234449089955446044e-06 + p * w;
+            p = 1.2475304481671778723e-05 + p * w;
+            p = -4.7318229009055733981e-05 + p * w;
+            p = 6.8284851459573175448e-05 + p * w;
+            p = 2.4031110387097893999e-05 + p * w;
+            p = -0.0003550375203628474796 + p * w;
+            p = 0.00095328937973738049703 + p * w;
+            p = -0.0016882755560235047313 + p * w;
+            p = 0.0024914420961078508066 + p * w;
+            p = -0.0037512085075692412107 + p * w;
+            p = 0.005370914553590063617 + p * w;
+            p = 1.0052589676941592334 + p * w;
+            p = 3.0838856104922207635 + p * w;
+        } else {
+            w = sqrt(w) - 5.000000;
+            p = -2.7109920616438573243e-11;
+            p = -2.5556418169965252055e-10 + p * w;
+            p = 1.5076572693500548083e-09 + p * w;
+            p = -3.7894654401267369937e-09 + p * w;
+            p = 7.6157012080783393804e-09 + p * w;
+            p = -1.4960026627149240478e-08 + p * w;
+            p = 2.9147953450901080826e-08 + p * w;
+            p = -6.7711997758452339498e-08 + p * w;
+            p = 2.2900482228026654717e-07 + p * w;
+            p = -9.9298272942317002539e-07 + p * w;
+            p = 4.5260625972231537039e-06 + p * w;
+            p = -1.9681778105531670567e-05 + p * w;
+            p = 7.5995277030017761139e-05 + p * w;
+            p = -0.00021503011930044477347 + p * w;
+            p = -0.00013871931833623122026 + p * w;
+            p = 1.0103004648645343977 + p * w;
+            p = 4.8499064014085844221 + p * w;
+        }
+        return p * x;
+    }
+
+    double standard_deviation(std::vector<double>::iterator first, std::vector<double>::iterator last) {
+        auto m = Catch::Benchmark::Detail::mean(first, last);
+        double variance = std::accumulate(first, last, 0., [m](double a, double b) {
+            double diff = b - m;
+            return a + diff * diff;
+            }) / (last - first);
+            return std::sqrt(variance);
+    }
+
+}
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+
+            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) {
+                auto count = last - first;
+                double idx = (count - 1) * k / static_cast<double>(q);
+                int j = static_cast<int>(idx);
+                double g = idx - j;
+                std::nth_element(first, first + j, last);
+                auto xj = first[j];
+                if (g == 0) return xj;
+
+                auto xj1 = *std::min_element(first + (j + 1), last);
+                return xj + g * (xj1 - xj);
+            }
+
+            double erfc_inv(double x) {
+                return erf_inv(1.0 - x);
+            }
+
+            double normal_quantile(double p) {
+                static const double ROOT_TWO = std::sqrt(2.0);
+
+                double result = 0.0;
+                assert(p >= 0 && p <= 1);
+                if (p < 0 || p > 1) {
+                    return result;
+                }
+
+                result = -erfc_inv(2.0 * p);
+                // result *= normal distribution standard deviation (1.0) * sqrt(2)
+                result *= /*sd * */ ROOT_TWO;
+                // result += normal disttribution mean (0)
+                return result;
+            }
+
+            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) {
+                double sb = stddev.point;
+                double mn = mean.point / n;
+                double mg_min = mn / 2.;
+                double sg = std::min(mg_min / 4., sb / std::sqrt(n));
+                double sg2 = sg * sg;
+                double sb2 = sb * sb;
+
+                auto c_max = [n, mn, sb2, sg2](double x) -> double {
+                    double k = mn - x;
+                    double d = k * k;
+                    double nd = n * d;
+                    double k0 = -n * nd;
+                    double k1 = sb2 - n * sg2 + nd;
+                    double det = k1 * k1 - 4 * sg2 * k0;
+                    return (int)(-2. * k0 / (k1 + std::sqrt(det)));
+                };
+
+                auto var_out = [n, sb2, sg2](double c) {
+                    double nc = n - c;
+                    return (nc / n) * (sb2 - nc * sg2);
+                };
+
+                return std::min(var_out(1), var_out(std::min(c_max(0.), c_max(mg_min)))) / sb2;
+            }
+
+            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) {
+                CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
+                CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
+                static std::random_device entropy;
+                CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
+
+                auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++
+
+                auto mean = &Detail::mean<std::vector<double>::iterator>;
+                auto stddev = &standard_deviation;
+
+#if defined(CATCH_CONFIG_USE_ASYNC)
+                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {
+                    auto seed = entropy();
+                    return std::async(std::launch::async, [=] {
+                        std::mt19937 rng(seed);
+                        auto resampled = resample(rng, n_resamples, first, last, f);
+                        return bootstrap(confidence_level, first, last, resampled, f);
+                    });
+                };
+
+                auto mean_future = Estimate(mean);
+                auto stddev_future = Estimate(stddev);
+
+                auto mean_estimate = mean_future.get();
+                auto stddev_estimate = stddev_future.get();
+#else
+                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {
+                    auto seed = entropy();
+                    std::mt19937 rng(seed);
+                    auto resampled = resample(rng, n_resamples, first, last, f);
+                    return bootstrap(confidence_level, first, last, resampled, f);
+                };
+
+                auto mean_estimate = Estimate(mean);
+                auto stddev_estimate = Estimate(stddev);
+#endif // CATCH_USE_ASYNC
+
+                double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n);
+
+                return { mean_estimate, stddev_estimate, outlier_variance };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+// end catch_stats.cpp
 // start catch_approx.cpp
 
 #include <cmath>
@@ -6194,7 +7881,8 @@ namespace Detail {
     bool Approx::equalityComparisonImpl(const double other) const {
         // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value
         // Thanks to Richard Harris for his help refining the scaled margin value
-        return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value)));
+        return marginComparison(m_value, other, m_margin)
+            || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(std::isinf(m_value)? 0 : m_value)));
     }
 
     void Approx::setMargin(double newMargin) {
@@ -6238,7 +7926,24 @@ namespace Catch {
 
 #ifdef CATCH_PLATFORM_MAC
 
-    #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
+    #if defined(__i386__) || defined(__x86_64__)
+        #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
+    #elif defined(__aarch64__)
+        #define CATCH_TRAP()  __asm__(".inst 0xd4200000")
+    #endif
+
+#elif defined(CATCH_PLATFORM_IPHONE)
+
+    // use inline assembler
+    #if defined(__i386__) || defined(__x86_64__)
+        #define CATCH_TRAP()  __asm__("int $3")
+    #elif defined(__aarch64__)
+        #define CATCH_TRAP()  __asm__(".inst 0xd4200000")
+    #elif defined(__arm__) && !defined(__thumb__)
+        #define CATCH_TRAP()  __asm__(".inst 0xe7f001f0")
+    #elif defined(__arm__) &&  defined(__thumb__)
+        #define CATCH_TRAP()  __asm__(".inst 0xde01")
+    #endif
 
 #elif defined(CATCH_PLATFORM_LINUX)
     // If we can use inline assembler, do it because this allows us to break
@@ -6258,10 +7963,12 @@ namespace Catch {
     #define CATCH_TRAP() DebugBreak()
 #endif
 
-#ifdef CATCH_TRAP
-    #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()
-#else
-    #define CATCH_BREAK_INTO_DEBUGGER() []{}()
+#ifndef CATCH_BREAK_INTO_DEBUGGER
+    #ifdef CATCH_TRAP
+        #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()
+    #else
+        #define CATCH_BREAK_INTO_DEBUGGER() []{}()
+    #endif
 #endif
 
 // end catch_debugger.h
@@ -6408,10 +8115,14 @@ namespace Catch {
         void sectionEnded( SectionEndInfo const& endInfo ) override;
         void sectionEndedEarly( SectionEndInfo const& endInfo ) override;
 
-        auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override;
+        auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing( std::string const& name ) override;
         void benchmarkStarting( BenchmarkInfo const& info ) override;
-        void benchmarkEnded( BenchmarkStats const& stats ) override;
+        void benchmarkEnded( BenchmarkStats<> const& stats ) override;
+        void benchmarkFailed( std::string const& error ) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void pushScopedMessage( MessageInfo const& message ) override;
         void popScopedMessage( MessageInfo const& message ) override;
@@ -6475,6 +8186,8 @@ namespace Catch {
         bool m_includeSuccessfulResults;
     };
 
+    void seedRng(IConfig const& config);
+    unsigned int rngSeed();
 } // end namespace Catch
 
 // end catch_run_context.h
@@ -6621,7 +8334,7 @@ namespace Catch {
     }
 
     bool AssertionResult::hasExpression() const {
-        return m_info.capturedExpression[0] != 0;
+        return !m_info.capturedExpression.empty();
     }
 
     bool AssertionResult::hasMessage() const {
@@ -6629,16 +8342,22 @@ namespace Catch {
     }
 
     std::string AssertionResult::getExpression() const {
-        if( isFalseTest( m_info.resultDisposition ) )
-            return "!(" + m_info.capturedExpression + ")";
-        else
-            return m_info.capturedExpression;
+        // Possibly overallocating by 3 characters should be basically free
+        std::string expr; expr.reserve(m_info.capturedExpression.size() + 3);
+        if (isFalseTest(m_info.resultDisposition)) {
+            expr += "!(";
+        }
+        expr += m_info.capturedExpression;
+        if (isFalseTest(m_info.resultDisposition)) {
+            expr += ')';
+        }
+        return expr;
     }
 
     std::string AssertionResult::getExpressionInMacro() const {
         std::string expr;
-        if( m_info.macroName[0] == 0 )
-            expr = m_info.capturedExpression;
+        if( m_info.macroName.empty() )
+            expr = static_cast<std::string>(m_info.capturedExpression);
         else {
             expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );
             expr += m_info.macroName;
@@ -6673,32 +8392,6 @@ namespace Catch {
 
 } // end namespace Catch
 // end catch_assertionresult.cpp
-// start catch_benchmark.cpp
-
-namespace Catch {
-
-    auto BenchmarkLooper::getResolution() -> uint64_t {
-        return getEstimatedClockResolution() * getCurrentContext().getConfig()->benchmarkResolutionMultiple();
-    }
-
-    void BenchmarkLooper::reportStart() {
-        getResultCapture().benchmarkStarting( { m_name } );
-    }
-    auto BenchmarkLooper::needsMoreIterations() -> bool {
-        auto elapsed = m_timer.getElapsedNanoseconds();
-
-        // Exponentially increasing iterations until we're confident in our timer resolution
-        if( elapsed < m_resolution ) {
-            m_iterationsToRun *= 10;
-            return true;
-        }
-
-        getResultCapture().benchmarkEnded( { { m_name }, m_count, elapsed } );
-        return false;
-    }
-
-} // end namespace Catch
-// end catch_benchmark.cpp
 // start catch_capture_matchers.cpp
 
 namespace Catch {
@@ -7398,7 +9091,7 @@ namespace detail {
     }
     inline auto convertInto( std::string const &source, bool &target ) -> ParserResult {
         std::string srcLC = source;
-        std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( char c ) { return static_cast<char>( std::tolower(c) ); } );
+        std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( std::tolower(c) ); } );
         if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on")
             target = true;
         else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off")
@@ -8046,9 +9739,14 @@ namespace Catch {
                     if( !line.empty() && !startsWith( line, '#' ) ) {
                         if( !startsWith( line, '"' ) )
                             line = '"' + line + '"';
-                        config.testsOrTags.push_back( line + ',' );
+                        config.testsOrTags.push_back( line );
+                        config.testsOrTags.emplace_back( "," );
                     }
                 }
+                //Remove comma in the end
+                if(!config.testsOrTags.empty())
+                    config.testsOrTags.erase( config.testsOrTags.end()-1 );
+
                 return ParserResult::ok( ParseResultType::Matched );
             };
         auto const setTestOrder = [&]( std::string const& order ) {
@@ -8083,14 +9781,16 @@ namespace Catch {
             };
         auto const setWaitForKeypress = [&]( std::string const& keypress ) {
                 auto keypressLc = toLower( keypress );
-                if( keypressLc == "start" )
+                if (keypressLc == "never")
+                    config.waitForKeypress = WaitForKeypress::Never;
+                else if( keypressLc == "start" )
                     config.waitForKeypress = WaitForKeypress::BeforeStart;
                 else if( keypressLc == "exit" )
                     config.waitForKeypress = WaitForKeypress::BeforeExit;
                 else if( keypressLc == "both" )
                     config.waitForKeypress = WaitForKeypress::BeforeStartAndExit;
                 else
-                    return ParserResult::runtimeError( "keypress argument must be one of: start, exit or both. '" + keypress + "' not recognised" );
+                    return ParserResult::runtimeError( "keypress argument must be one of: never, start, exit or both. '" + keypress + "' not recognised" );
             return ParserResult::ok( ParseResultType::Matched );
             };
         auto const setVerbosity = [&]( std::string const& verbosity ) {
@@ -8160,6 +9860,9 @@ namespace Catch {
             | Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, "yes|no" )
                 ["-d"]["--durations"]
                 ( "show test durations" )
+            | Opt( config.minDuration, "seconds" )
+                ["-D"]["--min-duration"]
+                ( "show test durations for tests taking at least the given number of seconds" )
             | Opt( loadTestNamesFromFile, "filename" )
                 ["-f"]["--input-file"]
                 ( "load test names to run from a file" )
@@ -8190,13 +9893,24 @@ namespace Catch {
             | Opt( config.libIdentify )
                 ["--libidentify"]
                 ( "report name and version according to libidentify standard" )
-            | Opt( setWaitForKeypress, "start|exit|both" )
+            | Opt( setWaitForKeypress, "never|start|exit|both" )
                 ["--wait-for-keypress"]
                 ( "waits for a keypress before exiting" )
-            | Opt( config.benchmarkResolutionMultiple, "multiplier" )
-                ["--benchmark-resolution-multiple"]
-                ( "multiple of clock resolution to run benchmarks" )
-
+            | Opt( config.benchmarkSamples, "samples" )
+                ["--benchmark-samples"]
+                ( "number of samples to collect (default: 100)" )
+            | Opt( config.benchmarkResamples, "resamples" )
+                ["--benchmark-resamples"]
+                ( "number of resamples for the bootstrap (default: 100000)" )
+            | Opt( config.benchmarkConfidenceInterval, "confidence interval" )
+                ["--benchmark-confidence-interval"]
+                ( "confidence interval for the bootstrap (between 0 and 1, default: 0.95)" )
+            | Opt( config.benchmarkNoAnalysis )
+                ["--benchmark-no-analysis"]
+                ( "perform only measurements; do not perform any analysis" )
+            | Opt( config.benchmarkWarmupTime, "benchmarkWarmupTime" )
+                ["--benchmark-warmup-time"]
+                ( "amount of time in milliseconds spent on warming up each test (default: 100)" )
             | Arg( config.testsOrTags, "test name|pattern|tags" )
                 ( "which test or tests to use" );
 
@@ -8212,9 +9926,6 @@ namespace Catch {
 
 namespace Catch {
 
-    bool SourceLineInfo::empty() const noexcept {
-        return file[0] == '\0';
-    }
     bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {
         return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);
     }
@@ -8250,11 +9961,23 @@ namespace Catch {
     :   m_data( data ),
         m_stream( openStream() )
     {
+        // We need to trim filter specs to avoid trouble with superfluous
+        // whitespace (esp. important for bdd macros, as those are manually
+        // aligned with whitespace).
+
+        for (auto& elem : m_data.testsOrTags) {
+            elem = trim(elem);
+        }
+        for (auto& elem : m_data.sectionsToRun) {
+            elem = trim(elem);
+        }
+
         TestSpecParser parser(ITagAliasRegistry::get());
-        if (!data.testsOrTags.empty()) {
+        if (!m_data.testsOrTags.empty()) {
             m_hasTestFilters = true;
-            for( auto const& testOrTags : data.testsOrTags )
-                parser.parse( testOrTags );
+            for (auto const& testOrTags : m_data.testsOrTags) {
+                parser.parse(testOrTags);
+            }
         }
         m_testSpec = parser.testSpec();
     }
@@ -8287,15 +10010,21 @@ namespace Catch {
     bool Config::warnAboutMissingAssertions() const    { return !!(m_data.warnings & WarnAbout::NoAssertions); }
     bool Config::warnAboutNoTests() const              { return !!(m_data.warnings & WarnAbout::NoTests); }
     ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; }
+    double Config::minDuration() const                 { return m_data.minDuration; }
     RunTests::InWhatOrder Config::runOrder() const     { return m_data.runOrder; }
     unsigned int Config::rngSeed() const               { return m_data.rngSeed; }
-    int Config::benchmarkResolutionMultiple() const    { return m_data.benchmarkResolutionMultiple; }
     UseColour::YesOrNo Config::useColour() const       { return m_data.useColour; }
     bool Config::shouldDebugBreak() const              { return m_data.shouldDebugBreak; }
     int Config::abortAfter() const                     { return m_data.abortAfter; }
     bool Config::showInvisibles() const                { return m_data.showInvisibles; }
     Verbosity Config::verbosity() const                { return m_data.verbosity; }
 
+    bool Config::benchmarkNoAnalysis() const                      { return m_data.benchmarkNoAnalysis; }
+    int Config::benchmarkSamples() const                          { return m_data.benchmarkSamples; }
+    double Config::benchmarkConfidenceInterval() const            { return m_data.benchmarkConfidenceInterval; }
+    unsigned int Config::benchmarkResamples() const               { return m_data.benchmarkResamples; }
+    std::chrono::milliseconds Config::benchmarkWarmupTime() const { return std::chrono::milliseconds(m_data.benchmarkWarmupTime); }
+
     IStream const* Config::openStream() {
         return Catch::makeStream(m_data.outputFilename);
     }
@@ -8335,7 +10064,7 @@ namespace Catch {
         };
 
         struct NoColourImpl : IColourImpl {
-            void use( Colour::Code ) {}
+            void use( Colour::Code ) override {}
 
             static IColourImpl* instance() {
                 static NoColourImpl s_instance;
@@ -8467,7 +10196,7 @@ namespace {
 
     bool useColourOnPlatform() {
         return
-#ifdef CATCH_PLATFORM_MAC
+#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)
             !isDebuggerActive() &&
 #endif
 #if !(defined(__DJGPP__) && defined(__STRICT_ANSI__))
@@ -8508,13 +10237,13 @@ namespace Catch {
 namespace Catch {
 
     Colour::Colour( Code _colourCode ) { use( _colourCode ); }
-    Colour::Colour( Colour&& rhs ) noexcept {
-        m_moved = rhs.m_moved;
-        rhs.m_moved = true;
+    Colour::Colour( Colour&& other ) noexcept {
+        m_moved = other.m_moved;
+        other.m_moved = true;
     }
-    Colour& Colour::operator=( Colour&& rhs ) noexcept {
-        m_moved = rhs.m_moved;
-        rhs.m_moved  = true;
+    Colour& Colour::operator=( Colour&& other ) noexcept {
+        m_moved = other.m_moved;
+        other.m_moved  = true;
         return *this;
     }
 
@@ -8522,7 +10251,13 @@ namespace Catch {
 
     void Colour::use( Code _colourCode ) {
         static IColourImpl* impl = platformColourInstance();
-        impl->use( _colourCode );
+        // Strictly speaking, this cannot possibly happen.
+        // However, under some conditions it does happen (see #1626),
+        // and this change is small enough that we can let practicality
+        // triumph over purity in this case.
+        if (impl != nullptr) {
+            impl->use( _colourCode );
+        }
     }
 
     std::ostream& operator << ( std::ostream& os, Colour const& ) {
@@ -8589,6 +10324,12 @@ namespace Catch {
     IContext::~IContext() = default;
     IMutableContext::~IMutableContext() = default;
     Context::~Context() = default;
+
+    SimplePcg32& rng() {
+        static SimplePcg32 s_rng;
+        return s_rng;
+    }
+
 }
 // end catch_context.cpp
 // start catch_debug_console.cpp
@@ -8602,7 +10343,16 @@ namespace Catch {
 }
 
 // end catch_debug_console.h
-#ifdef CATCH_PLATFORM_WINDOWS
+#if defined(CATCH_CONFIG_ANDROID_LOGWRITE)
+#include <android/log.h>
+
+    namespace Catch {
+        void writeToDebugConsole( std::string const& text ) {
+            __android_log_write( ANDROID_LOG_DEBUG, "Catch", text.c_str() );
+        }
+    }
+
+#elif defined(CATCH_PLATFORM_WINDOWS)
 
     namespace Catch {
         void writeToDebugConsole( std::string const& text ) {
@@ -8623,10 +10373,9 @@ namespace Catch {
 // end catch_debug_console.cpp
 // start catch_debugger.cpp
 
-#ifdef CATCH_PLATFORM_MAC
+#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)
 
-#  include <assert.h>
-#  include <stdbool.h>
+#  include <cassert>
 #  include <sys/types.h>
 #  include <unistd.h>
 #  include <cstddef>
@@ -8751,6 +10500,8 @@ namespace Catch {
 // end catch_decomposer.cpp
 // start catch_enforce.cpp
 
+#include <stdexcept>
+
 namespace Catch {
 #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER)
     [[noreturn]]
@@ -8760,6 +10511,22 @@ namespace Catch {
         std::terminate();
     }
 #endif
+
+    [[noreturn]]
+    void throw_logic_error(std::string const& msg) {
+        throw_exception(std::logic_error(msg));
+    }
+
+    [[noreturn]]
+    void throw_domain_error(std::string const& msg) {
+        throw_exception(std::domain_error(msg));
+    }
+
+    [[noreturn]]
+    void throw_runtime_error(std::string const& msg) {
+        throw_exception(std::runtime_error(msg));
+    }
+
 } // namespace Catch;
 // end catch_enforce.cpp
 // start catch_enum_values_registry.cpp
@@ -8781,7 +10548,7 @@ namespace Catch {
             EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;
         };
 
-        std::vector<std::string> parseEnums( StringRef enums );
+        std::vector<StringRef> parseEnums( StringRef enums );
 
     } // Detail
 
@@ -8798,13 +10565,25 @@ namespace Catch {
 
     namespace Detail {
 
-        std::vector<std::string> parseEnums( StringRef enums ) {
+        namespace {
+            // Extracts the actual name part of an enum instance
+            // In other words, it returns the Blue part of Bikeshed::Colour::Blue
+            StringRef extractInstanceName(StringRef enumInstance) {
+                // Find last occurence of ":"
+                size_t name_start = enumInstance.size();
+                while (name_start > 0 && enumInstance[name_start - 1] != ':') {
+                    --name_start;
+                }
+                return enumInstance.substr(name_start, enumInstance.size() - name_start);
+            }
+        }
+
+        std::vector<StringRef> parseEnums( StringRef enums ) {
             auto enumValues = splitStringRef( enums, ',' );
-            std::vector<std::string> parsed;
+            std::vector<StringRef> parsed;
             parsed.reserve( enumValues.size() );
             for( auto const& enumValue : enumValues ) {
-                auto identifiers = splitStringRef( enumValue, ':' );
-                parsed.push_back( Catch::trim( identifiers.back() ) );
+                parsed.push_back(trim(extractInstanceName(enumValue)));
             }
             return parsed;
         }
@@ -8816,7 +10595,7 @@ namespace Catch {
                 if( valueToName.first == value )
                     return valueToName.second;
             }
-            return "{** unexpected enum value **}";
+            return "{** unexpected enum value **}"_sr;
         }
 
         std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {
@@ -8828,16 +10607,14 @@ namespace Catch {
             assert( valueNames.size() == values.size() );
             std::size_t i = 0;
             for( auto value : values )
-                enumInfo->m_values.push_back({ value, valueNames[i++] });
+                enumInfo->m_values.emplace_back(value, valueNames[i++]);
 
             return enumInfo;
         }
 
         EnumInfo const& EnumValuesRegistry::registerEnum( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {
-            auto enumInfo = makeEnumInfo( enumName, allValueNames, values );
-            EnumInfo* raw = enumInfo.get();
-            m_enumInfos.push_back( std::move( enumInfo ) );
-            return *raw;
+            m_enumInfos.push_back(makeEnumInfo(enumName, allValueNames, values));
+            return *m_enumInfos.back();
         }
 
     } // Detail
@@ -9038,7 +10815,7 @@ namespace Catch {
 
     // 32kb for the alternate stack seems to be sufficient. However, this value
     // is experimentally determined, so that's not guaranteed.
-    constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
+    static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
 
     static SignalDefs signalDefs[] = {
         { SIGINT,  "SIGINT - Terminal interrupt signal" },
@@ -9115,22 +10892,6 @@ namespace Catch {
 // end catch_fatal_condition.cpp
 // start catch_generators.cpp
 
-// start catch_random_number_generator.h
-
-#include <algorithm>
-#include <random>
-
-namespace Catch {
-
-    struct IConfig;
-
-    std::mt19937& rng();
-    void seedRng( IConfig const& config );
-    unsigned int rngSeed();
-
-}
-
-// end catch_random_number_generator.h
 #include <limits>
 #include <set>
 
@@ -9146,8 +10907,8 @@ namespace Generators {
 
     GeneratorUntypedBase::~GeneratorUntypedBase() {}
 
-    auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {
-        return getResultCapture().acquireGeneratorTracker( lineInfo );
+    auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {
+        return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo );
     }
 
 } // namespace Generators
@@ -9203,10 +10964,16 @@ namespace Catch {
 
         void noMatchingTestCases( std::string const& spec ) override;
 
+        void reportInvalidArguments(std::string const&arg) override;
+
         static std::set<Verbosity> getSupportedVerbosities();
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
         void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;
-        void benchmarkEnded( BenchmarkStats const& benchmarkStats ) override;
+        void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) override;
+        void benchmarkFailed(std::string const&) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void testRunStarting( TestRunInfo const& testRunInfo ) override;
         void testGroupStarting( GroupInfo const& groupInfo ) override;
@@ -9416,7 +11183,7 @@ namespace Catch {
 namespace Catch {
 
     std::size_t listTests( Config const& config ) {
-        TestSpec testSpec = config.testSpec();
+        TestSpec const& testSpec = config.testSpec();
         if( config.hasTestFilters() )
             Catch::cout() << "Matching test cases:\n";
         else {
@@ -9450,7 +11217,7 @@ namespace Catch {
     }
 
     std::size_t listTestsNamesOnly( Config const& config ) {
-        TestSpec testSpec = config.testSpec();
+        TestSpec const& testSpec = config.testSpec();
         std::size_t matchedTests = 0;
         std::vector<TestCase> matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );
         for( auto const& testCaseInfo : matchedTestCases ) {
@@ -9472,14 +11239,23 @@ namespace Catch {
     }
 
     std::string TagInfo::all() const {
-        std::string out;
-        for( auto const& spelling : spellings )
-            out += "[" + spelling + "]";
+        size_t size = 0;
+        for (auto const& spelling : spellings) {
+            // Add 2 for the brackes
+            size += spelling.size() + 2;
+        }
+
+        std::string out; out.reserve(size);
+        for (auto const& spelling : spellings) {
+            out += '[';
+            out += spelling;
+            out += ']';
+        }
         return out;
     }
 
     std::size_t listTags( Config const& config ) {
-        TestSpec testSpec = config.testSpec();
+        TestSpec const& testSpec = config.testSpec();
         if( config.hasTestFilters() )
             Catch::cout() << "Tags for matching test cases:\n";
         else {
@@ -9573,6 +11349,29 @@ using Matchers::Impl::MatcherBase;
 
 } // namespace Catch
 // end catch_matchers.cpp
+// start catch_matchers_exception.cpp
+
+namespace Catch {
+namespace Matchers {
+namespace Exception {
+
+bool ExceptionMessageMatcher::match(std::exception const& ex) const {
+    return ex.what() == m_message;
+}
+
+std::string ExceptionMessageMatcher::describe() const {
+    return "exception message matches \"" + m_message + "\"";
+}
+
+}
+Exception::ExceptionMessageMatcher Message(std::string const& message) {
+    return Exception::ExceptionMessageMatcher(message);
+}
+
+// namespace Exception
+} // namespace Matchers
+} // namespace Catch
+// end catch_matchers_exception.cpp
 // start catch_matchers_floating.cpp
 
 // start catch_polyfills.hpp
@@ -9601,74 +11400,100 @@ namespace Catch {
 } // end namespace Catch
 
 // end catch_to_string.hpp
+#include <algorithm>
+#include <cmath>
 #include <cstdlib>
 #include <cstdint>
 #include <cstring>
+#include <sstream>
+#include <type_traits>
+#include <iomanip>
+#include <limits>
 
 namespace Catch {
-namespace Matchers {
-namespace Floating {
-enum class FloatingPointKind : uint8_t {
-    Float,
-    Double
-};
-}
-}
-}
-
 namespace {
 
-template <typename T>
-struct Converter;
-
-template <>
-struct Converter<float> {
-    static_assert(sizeof(float) == sizeof(int32_t), "Important ULP matcher assumption violated");
-    Converter(float f) {
+    int32_t convert(float f) {
+        static_assert(sizeof(float) == sizeof(int32_t), "Important ULP matcher assumption violated");
+        int32_t i;
         std::memcpy(&i, &f, sizeof(f));
+        return i;
     }
-    int32_t i;
-};
 
-template <>
-struct Converter<double> {
-    static_assert(sizeof(double) == sizeof(int64_t), "Important ULP matcher assumption violated");
-    Converter(double d) {
+    int64_t convert(double d) {
+        static_assert(sizeof(double) == sizeof(int64_t), "Important ULP matcher assumption violated");
+        int64_t i;
         std::memcpy(&i, &d, sizeof(d));
+        return i;
     }
-    int64_t i;
-};
 
-template <typename T>
-auto convert(T t) -> Converter<T> {
-    return Converter<T>(t);
-}
+    template <typename FP>
+    bool almostEqualUlps(FP lhs, FP rhs, uint64_t maxUlpDiff) {
+        // Comparison with NaN should always be false.
+        // This way we can rule it out before getting into the ugly details
+        if (Catch::isnan(lhs) || Catch::isnan(rhs)) {
+            return false;
+        }
 
-template <typename FP>
-bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) {
-    // Comparison with NaN should always be false.
-    // This way we can rule it out before getting into the ugly details
-    if (Catch::isnan(lhs) || Catch::isnan(rhs)) {
-        return false;
+        auto lc = convert(lhs);
+        auto rc = convert(rhs);
+
+        if ((lc < 0) != (rc < 0)) {
+            // Potentially we can have +0 and -0
+            return lhs == rhs;
+        }
+
+        auto ulpDiff = std::abs(lc - rc);
+        return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;
+    }
+
+#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+
+    float nextafter(float x, float y) {
+        return ::nextafterf(x, y);
+    }
+
+    double nextafter(double x, double y) {
+        return ::nextafter(x, y);
     }
 
-    auto lc = convert(lhs);
-    auto rc = convert(rhs);
+#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^
 
-    if ((lc.i < 0) != (rc.i < 0)) {
-        // Potentially we can have +0 and -0
-        return lhs == rhs;
+template <typename FP>
+FP step(FP start, FP direction, uint64_t steps) {
+    for (uint64_t i = 0; i < steps; ++i) {
+#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+        start = Catch::nextafter(start, direction);
+#else
+        start = std::nextafter(start, direction);
+#endif
     }
+    return start;
+}
 
-    auto ulpDiff = std::abs(lc.i - rc.i);
-    return ulpDiff <= maxUlpDiff;
+// Performs equivalent check of std::fabs(lhs - rhs) <= margin
+// But without the subtraction to allow for INFINITY in comparison
+bool marginComparison(double lhs, double rhs, double margin) {
+    return (lhs + margin >= rhs) && (rhs + margin >= lhs);
 }
 
+template <typename FloatingPoint>
+void write(std::ostream& out, FloatingPoint num) {
+    out << std::scientific
+        << std::setprecision(std::numeric_limits<FloatingPoint>::max_digits10 - 1)
+        << num;
 }
 
-namespace Catch {
+} // end anonymous namespace
+
 namespace Matchers {
 namespace Floating {
+
+    enum class FloatingPointKind : uint8_t {
+        Float,
+        Double
+    };
+
     WithinAbsMatcher::WithinAbsMatcher(double target, double margin)
         :m_target{ target }, m_margin{ margin } {
         CATCH_ENFORCE(margin >= 0, "Invalid margin: " << margin << '.'
@@ -9685,10 +11510,11 @@ namespace Floating {
         return "is within " + ::Catch::Detail::stringify(m_margin) + " of " + ::Catch::Detail::stringify(m_target);
     }
 
-    WithinUlpsMatcher::WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType)
+    WithinUlpsMatcher::WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType)
         :m_target{ target }, m_ulps{ ulps }, m_type{ baseType } {
-        CATCH_ENFORCE(ulps >= 0, "Invalid ULP setting: " << ulps << '.'
-            << " ULPs have to be non-negative.");
+        CATCH_ENFORCE(m_type == FloatingPointKind::Double
+                   || m_ulps < (std::numeric_limits<uint32_t>::max)(),
+            "Provided ULP is impossibly large for a float comparison.");
     }
 
 #if defined(__clang__)
@@ -9713,16 +11539,59 @@ namespace Floating {
 #endif
 
     std::string WithinUlpsMatcher::describe() const {
-        return "is within " + Catch::to_string(m_ulps) + " ULPs of " + ::Catch::Detail::stringify(m_target) + ((m_type == FloatingPointKind::Float)? "f" : "");
+        std::stringstream ret;
+
+        ret << "is within " << m_ulps << " ULPs of ";
+
+        if (m_type == FloatingPointKind::Float) {
+            write(ret, static_cast<float>(m_target));
+            ret << 'f';
+        } else {
+            write(ret, m_target);
+        }
+
+        ret << " ([";
+        if (m_type == FloatingPointKind::Double) {
+            write(ret, step(m_target, static_cast<double>(-INFINITY), m_ulps));
+            ret << ", ";
+            write(ret, step(m_target, static_cast<double>( INFINITY), m_ulps));
+        } else {
+            // We have to cast INFINITY to float because of MinGW, see #1782
+            write(ret, step(static_cast<float>(m_target), static_cast<float>(-INFINITY), m_ulps));
+            ret << ", ";
+            write(ret, step(static_cast<float>(m_target), static_cast<float>( INFINITY), m_ulps));
+        }
+        ret << "])";
+
+        return ret.str();
+    }
+
+    WithinRelMatcher::WithinRelMatcher(double target, double epsilon):
+        m_target(target),
+        m_epsilon(epsilon){
+        CATCH_ENFORCE(m_epsilon >= 0., "Relative comparison with epsilon <  0 does not make sense.");
+        CATCH_ENFORCE(m_epsilon  < 1., "Relative comparison with epsilon >= 1 does not make sense.");
+    }
+
+    bool WithinRelMatcher::match(double const& matchee) const {
+        const auto relMargin = m_epsilon * (std::max)(std::fabs(matchee), std::fabs(m_target));
+        return marginComparison(matchee, m_target,
+                                std::isinf(relMargin)? 0 : relMargin);
+    }
+
+    std::string WithinRelMatcher::describe() const {
+        Catch::ReusableStringStream sstr;
+        sstr << "and " << m_target << " are within " << m_epsilon * 100. << "% of each other";
+        return sstr.str();
     }
 
 }// namespace Floating
 
-Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff) {
+Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff) {
     return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Double);
 }
 
-Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff) {
+Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff) {
     return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Float);
 }
 
@@ -9730,6 +11599,22 @@ Floating::WithinAbsMatcher WithinAbs(double target, double margin) {
     return Floating::WithinAbsMatcher(target, margin);
 }
 
+Floating::WithinRelMatcher WithinRel(double target, double eps) {
+    return Floating::WithinRelMatcher(target, eps);
+}
+
+Floating::WithinRelMatcher WithinRel(double target) {
+    return Floating::WithinRelMatcher(target, std::numeric_limits<double>::epsilon() * 100);
+}
+
+Floating::WithinRelMatcher WithinRel(float target, float eps) {
+    return Floating::WithinRelMatcher(target, eps);
+}
+
+Floating::WithinRelMatcher WithinRel(float target) {
+    return Floating::WithinRelMatcher(target, std::numeric_limits<float>::epsilon() * 100);
+}
+
 } // namespace Matchers
 } // namespace Catch
 
@@ -9910,10 +11795,10 @@ namespace Catch {
 
     Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) {
         auto trimmed = [&] (size_t start, size_t end) {
-            while (names[start] == ',' || isspace(names[start])) {
+            while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) {
                 ++start;
             }
-            while (names[end] == ',' || isspace(names[end])) {
+            while (names[end] == ',' || isspace(static_cast<unsigned char>(names[end]))) {
                 --end;
             }
             return names.substr(start, end - start + 1);
@@ -9952,17 +11837,17 @@ namespace Catch {
                 pos = skipq(pos, c);
                 break;
             case ',':
-                if (start != pos && openings.size() == 0) {
+                if (start != pos && openings.empty()) {
                     m_messages.emplace_back(macroName, lineInfo, resultType);
-                    m_messages.back().message = trimmed(start, pos);
+                    m_messages.back().message = static_cast<std::string>(trimmed(start, pos));
                     m_messages.back().message += " := ";
                     start = pos;
                 }
             }
         }
-        assert(openings.size() == 0 && "Mismatched openings");
+        assert(openings.empty() && "Mismatched openings");
         m_messages.emplace_back(macroName, lineInfo, resultType);
-        m_messages.back().message = trimmed(start, names.size() - 1);
+        m_messages.back().message = static_cast<std::string>(trimmed(start, names.size() - 1));
         m_messages.back().message += " := ";
     }
     Capturer::~Capturer() {
@@ -10148,7 +12033,7 @@ namespace Catch {
         if (tmpnam_s(m_buffer)) {
             CATCH_RUNTIME_ERROR("Could not get a temp filename");
         }
-        if (fopen_s(&m_file, m_buffer, "w")) {
+        if (fopen_s(&m_file, m_buffer, "w+")) {
             char buffer[100];
             if (strerror_s(buffer, errno)) {
                 CATCH_RUNTIME_ERROR("Could not translate errno to a string");
@@ -10256,20 +12141,61 @@ namespace Catch {
 
 namespace Catch {
 
-    std::mt19937& rng() {
-        static std::mt19937 s_rng;
-        return s_rng;
+namespace {
+
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4146) // we negate uint32 during the rotate
+#endif
+        // Safe rotr implementation thanks to John Regehr
+        uint32_t rotate_right(uint32_t val, uint32_t count) {
+            const uint32_t mask = 31;
+            count &= mask;
+            return (val >> count) | (val << (-count & mask));
+        }
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
+}
+
+    SimplePcg32::SimplePcg32(result_type seed_) {
+        seed(seed_);
+    }
+
+    void SimplePcg32::seed(result_type seed_) {
+        m_state = 0;
+        (*this)();
+        m_state += seed_;
+        (*this)();
     }
 
-    void seedRng( IConfig const& config ) {
-        if( config.rngSeed() != 0 ) {
-            std::srand( config.rngSeed() );
-            rng().seed( config.rngSeed() );
+    void SimplePcg32::discard(uint64_t skip) {
+        // We could implement this to run in O(log n) steps, but this
+        // should suffice for our use case.
+        for (uint64_t s = 0; s < skip; ++s) {
+            static_cast<void>((*this)());
         }
     }
 
-    unsigned int rngSeed() {
-        return getCurrentContext().getConfig()->rngSeed();
+    SimplePcg32::result_type SimplePcg32::operator()() {
+        // prepare the output value
+        const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);
+        const auto output = rotate_right(xorshifted, m_state >> 59u);
+
+        // advance state
+        m_state = m_state * 6364136223846793005ULL + s_inc;
+
+        return output;
+    }
+
+    bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {
+        return lhs.m_state == rhs.m_state;
+    }
+
+    bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {
+        return lhs.m_state != rhs.m_state;
     }
 }
 // end catch_random_number_generator.cpp
@@ -10288,6 +12214,8 @@ namespace Catch {
     struct IConfig;
 
     std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases );
+
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config );
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );
 
     void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions );
@@ -10400,11 +12328,13 @@ namespace Catch {
 namespace Catch {
 
     class StartupExceptionRegistry {
+#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
     public:
         void add(std::exception_ptr const& exception) noexcept;
         std::vector<std::exception_ptr> const& getExceptions() const noexcept;
     private:
         std::vector<std::exception_ptr> m_exceptions;
+#endif
     };
 
 } // end namespace Catch
@@ -10487,7 +12417,11 @@ namespace Catch {
                 m_tagAliasRegistry.add( alias, tag, lineInfo );
             }
             void registerStartupException() noexcept override {
+#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
                 m_exceptionRegistry.add(std::current_exception());
+#else
+                CATCH_INTERNAL_ERROR("Attempted to register active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!");
+#endif
             }
             IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override {
                 return m_enumValuesRegistry;
@@ -10591,17 +12525,32 @@ namespace Catch {
                 std::shared_ptr<GeneratorTracker> tracker;
 
                 ITracker& currentTracker = ctx.currentTracker();
-                if( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {
+                // Under specific circumstances, the generator we want
+                // to acquire is also the current tracker. If this is
+                // the case, we have to avoid looking through current
+                // tracker's children, and instead return the current
+                // tracker.
+                // A case where this check is important is e.g.
+                //     for (int i = 0; i < 5; ++i) {
+                //         int n = GENERATE(1, 2);
+                //     }
+                //
+                // without it, the code above creates 5 nested generators.
+                if (currentTracker.nameAndLocation() == nameAndLocation) {
+                    auto thisTracker = currentTracker.parent().findChild(nameAndLocation);
+                    assert(thisTracker);
+                    assert(thisTracker->isGeneratorTracker());
+                    tracker = std::static_pointer_cast<GeneratorTracker>(thisTracker);
+                } else if ( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {
                     assert( childTracker );
                     assert( childTracker->isGeneratorTracker() );
                     tracker = std::static_pointer_cast<GeneratorTracker>( childTracker );
-                }
-                else {
+                } else {
                     tracker = std::make_shared<GeneratorTracker>( nameAndLocation, ctx, &currentTracker );
                     currentTracker.addChild( tracker );
                 }
 
-                if( !ctx.completedCycle() && !tracker->isComplete() ) {
+                if( !tracker->isComplete() ) {
                     tracker->open();
                 }
 
@@ -10615,8 +12564,28 @@ namespace Catch {
             }
             void close() override {
                 TrackerBase::close();
-                // Generator interface only finds out if it has another item on atual move
-                if (m_runState == CompletedSuccessfully && m_generator->next()) {
+                // If a generator has a child (it is followed by a section)
+                // and none of its children have started, then we must wait
+                // until later to start consuming its values.
+                // This catches cases where `GENERATE` is placed between two
+                // `SECTION`s.
+                // **The check for m_children.empty cannot be removed**.
+                // doing so would break `GENERATE` _not_ followed by `SECTION`s.
+                const bool should_wait_for_child =
+                    !m_children.empty() &&
+                    std::find_if( m_children.begin(),
+                                  m_children.end(),
+                                  []( TestCaseTracking::ITrackerPtr tracker ) {
+                                      return tracker->hasStarted();
+                                  } ) == m_children.end();
+
+                // This check is a bit tricky, because m_generator->next()
+                // has a side-effect, where it consumes generator's current
+                // value, but we do not want to invoke the side-effect if
+                // this generator is still waiting for any child to start.
+                if ( should_wait_for_child ||
+                     ( m_runState == CompletedSuccessfully &&
+                       m_generator->next() ) ) {
                     m_children.clear();
                     m_runState = Executing;
                 }
@@ -10752,10 +12721,10 @@ namespace Catch {
 
         return true;
     }
-    auto RunContext::acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {
+    auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {
         using namespace Generators;
-        GeneratorTracker& tracker = GeneratorTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( "generator", lineInfo ) );
-        assert( tracker.isOpen() );
+        GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext,
+                                                              TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) );
         m_lastAssertionInfo.lineInfo = lineInfo;
         return tracker;
     }
@@ -10795,12 +12764,21 @@ namespace Catch {
 
         m_unfinishedSections.push_back(endInfo);
     }
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void RunContext::benchmarkPreparing(std::string const& name) {
+        m_reporter->benchmarkPreparing(name);
+    }
     void RunContext::benchmarkStarting( BenchmarkInfo const& info ) {
         m_reporter->benchmarkStarting( info );
     }
-    void RunContext::benchmarkEnded( BenchmarkStats const& stats ) {
+    void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) {
         m_reporter->benchmarkEnded( stats );
     }
+    void RunContext::benchmarkFailed(std::string const & error) {
+        m_reporter->benchmarkFailed(error);
+    }
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
     void RunContext::pushScopedMessage(MessageInfo const & message) {
         m_messages.push_back(message);
@@ -10835,7 +12813,7 @@ namespace Catch {
         // Don't rebuild the result -- the stringification itself can cause more fatal errors
         // Instead, fake a result data.
         AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } );
-        tempResult.message = message;
+        tempResult.message = static_cast<std::string>(message);
         AssertionResult result(m_lastAssertionInfo, tempResult);
 
         assertionEnded(result);
@@ -10998,7 +12976,7 @@ namespace Catch {
         m_lastAssertionInfo = info;
 
         AssertionResultData data( resultType, LazyExpression( false ) );
-        data.message = message;
+        data.message = static_cast<std::string>(message);
         AssertionResult assertionResult{ m_lastAssertionInfo, data };
         assertionEnded( assertionResult );
         if( !assertionResult.isOk() )
@@ -11061,6 +13039,18 @@ namespace Catch {
         else
             CATCH_INTERNAL_ERROR("No result capture instance");
     }
+
+    void seedRng(IConfig const& config) {
+        if (config.rngSeed() != 0) {
+            std::srand(config.rngSeed());
+            rng().seed(config.rngSeed());
+        }
+    }
+
+    unsigned int rngSeed() {
+        return getCurrentContext().getConfig()->rngSeed();
+    }
+
 }
 // end catch_run_context.cpp
 // start catch_section.cpp
@@ -11122,7 +13112,7 @@ namespace Catch {
         void libIdentify();
 
         int applyCommandLine( int argc, char const * const * argv );
-    #if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
+    #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
         int applyCommandLine( int argc, wchar_t const * const * argv );
     #endif
 
@@ -11189,6 +13179,8 @@ namespace Catch {
 // end catch_version.h
 #include <cstdlib>
 #include <iomanip>
+#include <set>
+#include <iterator>
 
 namespace Catch {
 
@@ -11222,45 +13214,61 @@ namespace Catch {
             return ret;
         }
 
-        Catch::Totals runTests(std::shared_ptr<Config> const& config) {
-            auto reporter = makeReporter(config);
-
-            RunContext context(config, std::move(reporter));
-
-            Totals totals;
-
-            context.testGroupStarting(config->name(), 1, 1);
-
-            TestSpec testSpec = config->testSpec();
-
-            auto const& allTestCases = getAllTestCasesSorted(*config);
-            for (auto const& testCase : allTestCases) {
-                bool matching = (!testSpec.hasFilters() && !testCase.isHidden()) ||
-                                 (testSpec.hasFilters() && matchTest(testCase, testSpec, *config));
-
-                if (!context.aborting() && matching)
-                    totals += context.runTest(testCase);
-                else
-                    context.reporter().skipTest(testCase);
+        class TestGroup {
+        public:
+            explicit TestGroup(std::shared_ptr<Config> const& config)
+            : m_config{config}
+            , m_context{config, makeReporter(config)}
+            {
+                auto const& allTestCases = getAllTestCasesSorted(*m_config);
+                m_matches = m_config->testSpec().matchesByFilter(allTestCases, *m_config);
+                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();
+
+                if (m_matches.empty() && invalidArgs.empty()) {
+                    for (auto const& test : allTestCases)
+                        if (!test.isHidden())
+                            m_tests.emplace(&test);
+                } else {
+                    for (auto const& match : m_matches)
+                        m_tests.insert(match.tests.begin(), match.tests.end());
+                }
             }
 
-            if (config->warnAboutNoTests() && totals.testCases.total() == 0) {
-                ReusableStringStream testConfig;
+            Totals execute() {
+                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();
+                Totals totals;
+                m_context.testGroupStarting(m_config->name(), 1, 1);
+                for (auto const& testCase : m_tests) {
+                    if (!m_context.aborting())
+                        totals += m_context.runTest(*testCase);
+                    else
+                        m_context.reporter().skipTest(*testCase);
+                }
 
-                bool first = true;
-                for (const auto& input : config->getTestsOrTags()) {
-                    if (!first) { testConfig << ' '; }
-                    first = false;
-                    testConfig << input;
+                for (auto const& match : m_matches) {
+                    if (match.tests.empty()) {
+                        m_context.reporter().noMatchingTestCases(match.name);
+                        totals.error = -1;
+                    }
+                }
+
+                if (!invalidArgs.empty()) {
+                    for (auto const& invalidArg: invalidArgs)
+                         m_context.reporter().reportInvalidArguments(invalidArg);
                 }
 
-                context.reporter().noMatchingTestCases(testConfig.str());
-                totals.error = -1;
+                m_context.testGroupEnded(m_config->name(), totals, 1, 1);
+                return totals;
             }
 
-            context.testGroupEnded(config->name(), totals, 1, 1);
-            return totals;
-        }
+        private:
+            using Tests = std::set<TestCase const*>;
+
+            std::shared_ptr<Config> m_config;
+            RunContext m_context;
+            Tests m_tests;
+            TestSpec::Matches m_matches;
+        };
 
         void applyFilenamesAsTags(Catch::IConfig const& config) {
             auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));
@@ -11329,7 +13337,7 @@ namespace Catch {
     }
     void Session::libIdentify() {
         Catch::cout()
-                << std::left << std::setw(16) << "description: " << "A Catch test executable\n"
+                << std::left << std::setw(16) << "description: " << "A Catch2 test executable\n"
                 << std::left << std::setw(16) << "category: " << "testframework\n"
                 << std::left << std::setw(16) << "framework: " << "Catch Test\n"
                 << std::left << std::setw(16) << "version: " << libraryVersion() << std::endl;
@@ -11360,17 +13368,17 @@ namespace Catch {
         return 0;
     }
 
-#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
+#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
     int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {
 
         char **utf8Argv = new char *[ argc ];
 
         for ( int i = 0; i < argc; ++i ) {
-            int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, NULL, 0, NULL, NULL );
+            int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, nullptr, 0, nullptr, nullptr );
 
             utf8Argv[ i ] = new char[ bufSize ];
 
-            WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, NULL, NULL );
+            WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, nullptr, nullptr );
         }
 
         int returnCode = applyCommandLine( argc, utf8Argv );
@@ -11437,7 +13445,12 @@ namespace Catch {
             if( Option<std::size_t> listed = list( m_config ) )
                 return static_cast<int>( *listed );
 
-            auto totals = runTests( m_config );
+            TestGroup tests { m_config };
+            auto const totals = tests.execute();
+
+            if( m_config->warnAboutNoTests() && totals.error == -1 )
+                return 2;
+
             // Note that on unices only the lower 8 bits are usually used, clamping
             // the return value to 255 prevents false negative when some multiple
             // of 256 tests has failed
@@ -11485,6 +13498,7 @@ namespace Catch {
 // end catch_singletons.cpp
 // start catch_startup_exception_registry.cpp
 
+#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
 namespace Catch {
 void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept {
         CATCH_TRY {
@@ -11500,6 +13514,7 @@ void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexce
     }
 
 } // end namespace Catch
+#endif
 // end catch_startup_exception_registry.cpp
 // start catch_stream.cpp
 
@@ -11514,7 +13529,7 @@ namespace Catch {
 
     Catch::IStream::~IStream() = default;
 
-    namespace detail { namespace {
+    namespace Detail { namespace {
         template<typename WriterF, std::size_t bufferSize=256>
         class StreamBufImpl : public std::streambuf {
             char data[bufferSize];
@@ -11613,15 +13628,15 @@ namespace Catch {
 
     auto makeStream( StringRef const &filename ) -> IStream const* {
         if( filename.empty() )
-            return new detail::CoutStream();
+            return new Detail::CoutStream();
         else if( filename[0] == '%' ) {
             if( filename == "%debug" )
-                return new detail::DebugOutStream();
+                return new Detail::DebugOutStream();
             else
                 CATCH_ERROR( "Unrecognised stream: '" << filename << "'" );
         }
         else
-            return new detail::FileStream( filename );
+            return new Detail::FileStream( filename );
     }
 
     // This class encapsulates the idea of a pool of ostringstreams that can be reused.
@@ -11684,7 +13699,7 @@ namespace Catch {
 
     namespace {
         char toLowerCh(char c) {
-            return static_cast<char>( std::tolower( c ) );
+            return static_cast<char>( std::tolower( static_cast<unsigned char>(c) ) );
         }
     }
 
@@ -11719,6 +13734,18 @@ namespace Catch {
         return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string();
     }
 
+    StringRef trim(StringRef ref) {
+        const auto is_ws = [](char c) {
+            return c == ' ' || c == '\t' || c == '\n' || c == '\r';
+        };
+        size_t real_begin = 0;
+        while (real_begin < ref.size() && is_ws(ref[real_begin])) { ++real_begin; }
+        size_t real_end = ref.size();
+        while (real_end > real_begin && is_ws(ref[real_end - 1])) { --real_end; }
+
+        return ref.substr(real_begin, real_end - real_begin);
+    }
+
     bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {
         bool replaced = false;
         std::size_t i = str.find( replaceThis );
@@ -11764,124 +13791,46 @@ namespace Catch {
 // end catch_string_manip.cpp
 // start catch_stringref.cpp
 
-#if defined(__clang__)
-#    pragma clang diagnostic push
-#    pragma clang diagnostic ignored "-Wexit-time-destructors"
-#endif
-
+#include <algorithm>
 #include <ostream>
 #include <cstring>
 #include <cstdint>
 
-namespace {
-    const uint32_t byte_2_lead = 0xC0;
-    const uint32_t byte_3_lead = 0xE0;
-    const uint32_t byte_4_lead = 0xF0;
-}
-
 namespace Catch {
     StringRef::StringRef( char const* rawChars ) noexcept
     : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
     {}
 
-    StringRef::operator std::string() const {
-        return std::string( m_start, m_size );
-    }
-
-    void StringRef::swap( StringRef& other ) noexcept {
-        std::swap( m_start, other.m_start );
-        std::swap( m_size, other.m_size );
-        std::swap( m_data, other.m_data );
-    }
-
     auto StringRef::c_str() const -> char const* {
-        if( !isSubstring() )
-            return m_start;
-
-        const_cast<StringRef *>( this )->takeOwnership();
-        return m_data;
-    }
-    auto StringRef::currentData() const noexcept -> char const* {
+        CATCH_ENFORCE(isNullTerminated(), "Called StringRef::c_str() on a non-null-terminated instance");
         return m_start;
     }
-
-    auto StringRef::isOwned() const noexcept -> bool {
-        return m_data != nullptr;
-    }
-    auto StringRef::isSubstring() const noexcept -> bool {
-        return m_start[m_size] != '\0';
+    auto StringRef::data() const noexcept -> char const* {
+        return m_start;
     }
 
-    void StringRef::takeOwnership() {
-        if( !isOwned() ) {
-            m_data = new char[m_size+1];
-            memcpy( m_data, m_start, m_size );
-            m_data[m_size] = '\0';
-        }
-    }
     auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef {
-        if( start < m_size )
-            return StringRef( m_start+start, size );
-        else
+        if (start < m_size) {
+            return StringRef(m_start + start, (std::min)(m_size - start, size));
+        } else {
             return StringRef();
-    }
-    auto StringRef::operator == ( StringRef const& other ) const noexcept -> bool {
-        return
-            size() == other.size() &&
-            (std::strncmp( m_start, other.m_start, size() ) == 0);
-    }
-    auto StringRef::operator != ( StringRef const& other ) const noexcept -> bool {
-        return !operator==( other );
-    }
-
-    auto StringRef::operator[](size_type index) const noexcept -> char {
-        return m_start[index];
-    }
-
-    auto StringRef::numberOfCharacters() const noexcept -> size_type {
-        size_type noChars = m_size;
-        // Make adjustments for uft encodings
-        for( size_type i=0; i < m_size; ++i ) {
-            char c = m_start[i];
-            if( ( c & byte_2_lead ) == byte_2_lead ) {
-                noChars--;
-                if (( c & byte_3_lead ) == byte_3_lead )
-                    noChars--;
-                if( ( c & byte_4_lead ) == byte_4_lead )
-                    noChars--;
-            }
         }
-        return noChars;
-    }
-
-    auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string {
-        std::string str;
-        str.reserve( lhs.size() + rhs.size() );
-        str += lhs;
-        str += rhs;
-        return str;
     }
-    auto operator + ( StringRef const& lhs, const char* rhs ) -> std::string {
-        return std::string( lhs ) + std::string( rhs );
-    }
-    auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string {
-        return std::string( lhs ) + std::string( rhs );
+    auto StringRef::operator == ( StringRef const& other ) const noexcept -> bool {
+        return m_size == other.m_size
+            && (std::memcmp( m_start, other.m_start, m_size ) == 0);
     }
 
     auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& {
-        return os.write(str.currentData(), str.size());
+        return os.write(str.data(), str.size());
     }
 
     auto operator+=( std::string& lhs, StringRef const& rhs ) -> std::string& {
-        lhs.append(rhs.currentData(), rhs.size());
+        lhs.append(rhs.data(), rhs.size());
         return lhs;
     }
 
 } // namespace Catch
-
-#if defined(__clang__)
-#    pragma clang diagnostic pop
-#endif
 // end catch_stringref.cpp
 // start catch_tag_alias.cpp
 
@@ -12000,8 +13949,7 @@ namespace Catch {
         std::vector<std::string> tags;
         std::string desc, tag;
         bool inTag = false;
-        std::string _descOrTags = nameAndTags.tags;
-        for (char c : _descOrTags) {
+        for (char c : nameAndTags.tags) {
             if( !inTag ) {
                 if( c == '[' )
                     inTag = true;
@@ -12031,10 +13979,11 @@ namespace Catch {
             }
         }
         if( isHidden ) {
-            tags.push_back( "." );
+            // Add all "hidden" tags to make them behave identically
+            tags.insert( tags.end(), { ".", "!hide" } );
         }
 
-        TestCaseInfo info( nameAndTags.name, _className, desc, tags, _lineInfo );
+        TestCaseInfo info( static_cast<std::string>(nameAndTags.name), _className, desc, tags, _lineInfo );
         return TestCase( _testCase, std::move(info) );
     }
 
@@ -12122,34 +14071,89 @@ namespace Catch {
         return *this;
     }
 
-} // end namespace Catch
-// end catch_test_case_info.cpp
-// start catch_test_case_registry_impl.cpp
+} // end namespace Catch
+// end catch_test_case_info.cpp
+// start catch_test_case_registry_impl.cpp
+
+#include <algorithm>
+#include <sstream>
+
+namespace Catch {
+
+    namespace {
+        struct TestHasher {
+            explicit TestHasher(Catch::SimplePcg32& rng_instance) {
+                basis = rng_instance();
+                basis <<= 32;
+                basis |= rng_instance();
+            }
+
+            uint64_t basis;
+
+            uint64_t operator()(TestCase const& t) const {
+                // Modified FNV-1a hash
+                static constexpr uint64_t prime = 1099511628211;
+                uint64_t hash = basis;
+                for (const char c : t.name) {
+                    hash ^= c;
+                    hash *= prime;
+                }
+                return hash;
+            }
+        };
+    } // end unnamed namespace
+
+    std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) {
+        switch( config.runOrder() ) {
+            case RunTests::InDeclarationOrder:
+                // already in declaration order
+                break;
+
+            case RunTests::InLexicographicalOrder: {
+                std::vector<TestCase> sorted = unsortedTestCases;
+                std::sort( sorted.begin(), sorted.end() );
+                return sorted;
+            }
+
+            case RunTests::InRandomOrder: {
+                seedRng( config );
+                TestHasher h( rng() );
 
-#include <sstream>
+                using hashedTest = std::pair<uint64_t, TestCase const*>;
+                std::vector<hashedTest> indexed_tests;
+                indexed_tests.reserve( unsortedTestCases.size() );
 
-namespace Catch {
+                for (auto const& testCase : unsortedTestCases) {
+                    indexed_tests.emplace_back(h(testCase), &testCase);
+                }
 
-    std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) {
+                std::sort(indexed_tests.begin(), indexed_tests.end(),
+                          [](hashedTest const& lhs, hashedTest const& rhs) {
+                          if (lhs.first == rhs.first) {
+                              return lhs.second->name < rhs.second->name;
+                          }
+                          return lhs.first < rhs.first;
+                });
 
-        std::vector<TestCase> sorted = unsortedTestCases;
+                std::vector<TestCase> sorted;
+                sorted.reserve( indexed_tests.size() );
 
-        switch( config.runOrder() ) {
-            case RunTests::InLexicographicalOrder:
-                std::sort( sorted.begin(), sorted.end() );
-                break;
-            case RunTests::InRandomOrder:
-                seedRng( config );
-                std::shuffle( sorted.begin(), sorted.end(), rng() );
-                break;
-            case RunTests::InDeclarationOrder:
-                // already in declaration order
-                break;
+                for (auto const& hashed : indexed_tests) {
+                    sorted.emplace_back(*hashed.second);
+                }
+
+                return sorted;
+            }
         }
-        return sorted;
+        return unsortedTestCases;
+    }
+
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config ) {
+        return !testCase.throws() || config.allowThrows();
     }
+
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) {
-        return testSpec.matches( testCase ) && ( config.allowThrows() || !testCase.throws() );
+        return testSpec.matches( testCase ) && isThrowSafe( testCase, config );
     }
 
     void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions ) {
@@ -12210,7 +14214,7 @@ namespace Catch {
     }
 
     std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {
-        std::string className = classOrQualifiedMethodName;
+        std::string className(classOrQualifiedMethodName);
         if( startsWith( className, '&' ) )
         {
             std::size_t lastColons = className.rfind( "::" );
@@ -12278,15 +14282,12 @@ namespace TestCaseTracking {
         m_currentTracker = tracker;
     }
 
-    TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )
-    :   m_nameAndLocation( nameAndLocation ),
+    TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ):
+        ITracker(nameAndLocation),
         m_ctx( ctx ),
         m_parent( parent )
     {}
 
-    NameAndLocation const& TrackerBase::nameAndLocation() const {
-        return m_nameAndLocation;
-    }
     bool TrackerBase::isComplete() const {
         return m_runState == CompletedSuccessfully || m_runState == Failed;
     }
@@ -12352,7 +14353,7 @@ namespace TestCaseTracking {
                 m_runState = CompletedSuccessfully;
                 break;
             case ExecutingChildren:
-                if( m_children.empty() || m_children.back()->isComplete() )
+                if( std::all_of(m_children.begin(), m_children.end(), [](ITrackerPtr const& t){ return t->isComplete(); }) )
                     m_runState = CompletedSuccessfully;
                 break;
 
@@ -12387,7 +14388,8 @@ namespace TestCaseTracking {
     }
 
     SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )
-    :   TrackerBase( nameAndLocation, ctx, parent )
+    :   TrackerBase( nameAndLocation, ctx, parent ),
+        m_trimmed_name(trim(nameAndLocation.name))
     {
         if( parent ) {
             while( !parent->isSectionTracker() )
@@ -12401,12 +14403,12 @@ namespace TestCaseTracking {
     bool SectionTracker::isComplete() const {
         bool complete = true;
 
-        if ((m_filters.empty() || m_filters[0] == "") ||
-             std::find(m_filters.begin(), m_filters.end(),
-                       m_nameAndLocation.name) != m_filters.end())
+        if (m_filters.empty()
+            || m_filters[0] == ""
+            || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) {
             complete = TrackerBase::isComplete();
+        }
         return complete;
-
     }
 
     bool SectionTracker::isSectionTracker() const { return true; }
@@ -12430,20 +14432,21 @@ namespace TestCaseTracking {
     }
 
     void SectionTracker::tryOpen() {
-        if( !isComplete() && (m_filters.empty() || m_filters[0].empty() ||  m_filters[0] == m_nameAndLocation.name ) )
+        if( !isComplete() )
             open();
     }
 
     void SectionTracker::addInitialFilters( std::vector<std::string> const& filters ) {
         if( !filters.empty() ) {
-            m_filters.push_back(""); // Root - should never be consulted
-            m_filters.push_back(""); // Test Case - not a section filter
+            m_filters.reserve( m_filters.size() + filters.size() + 2 );
+            m_filters.emplace_back(""); // Root - should never be consulted
+            m_filters.emplace_back(""); // Test Case - not a section filter
             m_filters.insert( m_filters.end(), filters.begin(), filters.end() );
         }
     }
     void SectionTracker::addNextFilters( std::vector<std::string> const& filters ) {
         if( filters.size() > 1 )
-            m_filters.insert( m_filters.end(), ++filters.begin(), filters.end() );
+            m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() );
     }
 
 } // namespace TestCaseTracking
@@ -12495,47 +14498,81 @@ namespace Catch {
 
 namespace Catch {
 
+    TestSpec::Pattern::Pattern( std::string const& name )
+    : m_name( name )
+    {}
+
     TestSpec::Pattern::~Pattern() = default;
-    TestSpec::NamePattern::~NamePattern() = default;
-    TestSpec::TagPattern::~TagPattern() = default;
-    TestSpec::ExcludedPattern::~ExcludedPattern() = default;
 
-    TestSpec::NamePattern::NamePattern( std::string const& name )
-    : m_wildcardPattern( toLower( name ), CaseSensitive::No )
+    std::string const& TestSpec::Pattern::name() const {
+        return m_name;
+    }
+
+    TestSpec::NamePattern::NamePattern( std::string const& name, std::string const& filterString )
+    : Pattern( filterString )
+    , m_wildcardPattern( toLower( name ), CaseSensitive::No )
     {}
+
     bool TestSpec::NamePattern::matches( TestCaseInfo const& testCase ) const {
-        return m_wildcardPattern.matches( toLower( testCase.name ) );
+        return m_wildcardPattern.matches( testCase.name );
     }
 
-    TestSpec::TagPattern::TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
+    TestSpec::TagPattern::TagPattern( std::string const& tag, std::string const& filterString )
+    : Pattern( filterString )
+    , m_tag( toLower( tag ) )
+    {}
+
     bool TestSpec::TagPattern::matches( TestCaseInfo const& testCase ) const {
         return std::find(begin(testCase.lcaseTags),
                          end(testCase.lcaseTags),
                          m_tag) != end(testCase.lcaseTags);
     }
 
-    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern ) : m_underlyingPattern( underlyingPattern ) {}
-    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const { return !m_underlyingPattern->matches( testCase ); }
+    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern )
+    : Pattern( underlyingPattern->name() )
+    , m_underlyingPattern( underlyingPattern )
+    {}
+
+    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const {
+        return !m_underlyingPattern->matches( testCase );
+    }
 
     bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const {
-        // All patterns in a filter must match for the filter to be a match
-        for( auto const& pattern : m_patterns ) {
-            if( !pattern->matches( testCase ) )
-                return false;
-        }
-        return true;
+        return std::all_of( m_patterns.begin(), m_patterns.end(), [&]( PatternPtr const& p ){ return p->matches( testCase ); } );
+    }
+
+    std::string TestSpec::Filter::name() const {
+        std::string name;
+        for( auto const& p : m_patterns )
+            name += p->name();
+        return name;
     }
 
     bool TestSpec::hasFilters() const {
         return !m_filters.empty();
     }
+
     bool TestSpec::matches( TestCaseInfo const& testCase ) const {
-        // A TestSpec matches if any filter matches
-        for( auto const& filter : m_filters )
-            if( filter.matches( testCase ) )
-                return true;
-        return false;
+        return std::any_of( m_filters.begin(), m_filters.end(), [&]( Filter const& f ){ return f.matches( testCase ); } );
+    }
+
+    TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const
+    {
+        Matches matches( m_filters.size() );
+        std::transform( m_filters.begin(), m_filters.end(), matches.begin(), [&]( Filter const& filter ){
+            std::vector<TestCase const*> currentMatches;
+            for( auto const& test : testCases )
+                if( isThrowSafe( test, config ) && filter.matches( test ) )
+                    currentMatches.emplace_back( &test );
+            return FilterMatch{ filter.name(), currentMatches };
+        } );
+        return matches;
+    }
+
+    const TestSpec::vectorStrings& TestSpec::getInvalidArgs() const{
+        return  (m_invalidArgs);
     }
+
 }
 // end catch_test_spec.cpp
 // start catch_test_spec_parser.cpp
@@ -12547,64 +14584,136 @@ namespace Catch {
     TestSpecParser& TestSpecParser::parse( std::string const& arg ) {
         m_mode = None;
         m_exclusion = false;
-        m_start = std::string::npos;
         m_arg = m_tagAliases->expandAliases( arg );
         m_escapeChars.clear();
+        m_substring.reserve(m_arg.size());
+        m_patternName.reserve(m_arg.size());
+        m_realPatternPos = 0;
+
         for( m_pos = 0; m_pos < m_arg.size(); ++m_pos )
-            visitChar( m_arg[m_pos] );
-        if( m_mode == Name )
-            addPattern<TestSpec::NamePattern>();
+          //if visitChar fails
+           if( !visitChar( m_arg[m_pos] ) ){
+               m_testSpec.m_invalidArgs.push_back(arg);
+               break;
+           }
+        endMode();
         return *this;
     }
     TestSpec TestSpecParser::testSpec() {
         addFilter();
         return m_testSpec;
     }
+    bool TestSpecParser::visitChar( char c ) {
+        if( (m_mode != EscapedName) && (c == '\\') ) {
+            escape();
+            addCharToPattern(c);
+            return true;
+        }else if((m_mode != EscapedName) && (c == ',') )  {
+            return separate();
+        }
 
-    void TestSpecParser::visitChar( char c ) {
-        if( m_mode == None ) {
-            switch( c ) {
-            case ' ': return;
-            case '~': m_exclusion = true; return;
-            case '[': return startNewMode( Tag, ++m_pos );
-            case '"': return startNewMode( QuotedName, ++m_pos );
-            case '\\': return escape();
-            default: startNewMode( Name, m_pos ); break;
-            }
+        switch( m_mode ) {
+        case None:
+            if( processNoneChar( c ) )
+                return true;
+            break;
+        case Name:
+            processNameChar( c );
+            break;
+        case EscapedName:
+            endMode();
+            addCharToPattern(c);
+            return true;
+        default:
+        case Tag:
+        case QuotedName:
+            if( processOtherChar( c ) )
+                return true;
+            break;
         }
-        if( m_mode == Name ) {
-            if( c == ',' ) {
-                addPattern<TestSpec::NamePattern>();
-                addFilter();
-            }
-            else if( c == '[' ) {
-                if( subString() == "exclude:" )
-                    m_exclusion = true;
-                else
-                    addPattern<TestSpec::NamePattern>();
-                startNewMode( Tag, ++m_pos );
-            }
-            else if( c == '\\' )
-                escape();
+
+        m_substring += c;
+        if( !isControlChar( c ) ) {
+            m_patternName += c;
+            m_realPatternPos++;
+        }
+        return true;
+    }
+    // Two of the processing methods return true to signal the caller to return
+    // without adding the given character to the current pattern strings
+    bool TestSpecParser::processNoneChar( char c ) {
+        switch( c ) {
+        case ' ':
+            return true;
+        case '~':
+            m_exclusion = true;
+            return false;
+        case '[':
+            startNewMode( Tag );
+            return false;
+        case '"':
+            startNewMode( QuotedName );
+            return false;
+        default:
+            startNewMode( Name );
+            return false;
+        }
+    }
+    void TestSpecParser::processNameChar( char c ) {
+        if( c == '[' ) {
+            if( m_substring == "exclude:" )
+                m_exclusion = true;
+            else
+                endMode();
+            startNewMode( Tag );
         }
-        else if( m_mode == EscapedName )
-            m_mode = Name;
-        else if( m_mode == QuotedName && c == '"' )
-            addPattern<TestSpec::NamePattern>();
-        else if( m_mode == Tag && c == ']' )
-            addPattern<TestSpec::TagPattern>();
     }
-    void TestSpecParser::startNewMode( Mode mode, std::size_t start ) {
+    bool TestSpecParser::processOtherChar( char c ) {
+        if( !isControlChar( c ) )
+            return false;
+        m_substring += c;
+        endMode();
+        return true;
+    }
+    void TestSpecParser::startNewMode( Mode mode ) {
         m_mode = mode;
-        m_start = start;
+    }
+    void TestSpecParser::endMode() {
+        switch( m_mode ) {
+        case Name:
+        case QuotedName:
+            return addNamePattern();
+        case Tag:
+            return addTagPattern();
+        case EscapedName:
+            revertBackToLastMode();
+            return;
+        case None:
+        default:
+            return startNewMode( None );
+        }
     }
     void TestSpecParser::escape() {
-        if( m_mode == None )
-            m_start = m_pos;
+        saveLastMode();
         m_mode = EscapedName;
-        m_escapeChars.push_back( m_pos );
+        m_escapeChars.push_back(m_realPatternPos);
+    }
+    bool TestSpecParser::isControlChar( char c ) const {
+        switch( m_mode ) {
+            default:
+                return false;
+            case None:
+                return c == '~';
+            case Name:
+                return c == '[';
+            case EscapedName:
+                return true;
+            case QuotedName:
+                return c == '"';
+            case Tag:
+                return c == '[' || c == ']';
+        }
     }
-    std::string TestSpecParser::subString() const { return m_arg.substr( m_start, m_pos - m_start ); }
 
     void TestSpecParser::addFilter() {
         if( !m_currentFilter.m_patterns.empty() ) {
@@ -12613,6 +14722,86 @@ namespace Catch {
         }
     }
 
+    void TestSpecParser::saveLastMode() {
+      lastMode = m_mode;
+    }
+
+    void TestSpecParser::revertBackToLastMode() {
+      m_mode = lastMode;
+    }
+
+    bool TestSpecParser::separate() {
+      if( (m_mode==QuotedName) || (m_mode==Tag) ){
+         //invalid argument, signal failure to previous scope.
+         m_mode = None;
+         m_pos = m_arg.size();
+         m_substring.clear();
+         m_patternName.clear();
+         m_realPatternPos = 0;
+         return false;
+      }
+      endMode();
+      addFilter();
+      return true; //success
+    }
+
+    std::string TestSpecParser::preprocessPattern() {
+        std::string token = m_patternName;
+        for (std::size_t i = 0; i < m_escapeChars.size(); ++i)
+            token = token.substr(0, m_escapeChars[i] - i) + token.substr(m_escapeChars[i] - i + 1);
+        m_escapeChars.clear();
+        if (startsWith(token, "exclude:")) {
+            m_exclusion = true;
+            token = token.substr(8);
+        }
+
+        m_patternName.clear();
+        m_realPatternPos = 0;
+
+        return token;
+    }
+
+    void TestSpecParser::addNamePattern() {
+        auto token = preprocessPattern();
+
+        if (!token.empty()) {
+            TestSpec::PatternPtr pattern = std::make_shared<TestSpec::NamePattern>(token, m_substring);
+            if (m_exclusion)
+                pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);
+            m_currentFilter.m_patterns.push_back(pattern);
+        }
+        m_substring.clear();
+        m_exclusion = false;
+        m_mode = None;
+    }
+
+    void TestSpecParser::addTagPattern() {
+        auto token = preprocessPattern();
+
+        if (!token.empty()) {
+            // If the tag pattern is the "hide and tag" shorthand (e.g. [.foo])
+            // we have to create a separate hide tag and shorten the real one
+            if (token.size() > 1 && token[0] == '.') {
+                token.erase(token.begin());
+                TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(".", m_substring);
+                if (m_exclusion) {
+                    pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);
+                }
+                m_currentFilter.m_patterns.push_back(pattern);
+            }
+
+            TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(token, m_substring);
+
+            if (m_exclusion) {
+                pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);
+            }
+            m_currentFilter.m_patterns.push_back(pattern);
+        }
+        m_substring.clear();
+        m_exclusion = false;
+        m_mode = None;
+    }
+
     TestSpec parseTestSpec( std::string const& arg ) {
         return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();
     }
@@ -12714,13 +14903,11 @@ namespace Detail {
             enum Arch { Big, Little };
 
             static Arch which() {
-                union _{
-                    int asInt;
-                    char asChar[sizeof (int)];
-                } u;
-
-                u.asInt = 1;
-                return ( u.asChar[sizeof(int)-1] == 1 ) ? Big : Little;
+                int one = 1;
+                // If the lowest byte we read is non-zero, we can assume
+                // that little endian format is used.
+                auto value = *reinterpret_cast<char*>(&one);
+                return value ? Little : Big;
             }
         };
     }
@@ -12844,6 +15031,13 @@ std::string StringMaker<wchar_t *>::convert(wchar_t * str) {
 }
 #endif
 
+#if defined(CATCH_CONFIG_CPP17_BYTE)
+#include <cstddef>
+std::string StringMaker<std::byte>::convert(std::byte value) {
+    return ::Catch::Detail::stringify(std::to_integer<unsigned long long>(value));
+}
+#endif // defined(CATCH_CONFIG_CPP17_BYTE)
+
 std::string StringMaker<int>::convert(int value) {
     return ::Catch::Detail::stringify(static_cast<long long>(value));
 }
@@ -12989,11 +15183,48 @@ namespace Catch {
 // end catch_totals.cpp
 // start catch_uncaught_exceptions.cpp
 
+// start catch_config_uncaught_exceptions.hpp
+
+//              Copyright Catch2 Authors
+// Distributed under the Boost Software License, Version 1.0.
+//   (See accompanying file LICENSE_1_0.txt or copy at
+//        https://www.boost.org/LICENSE_1_0.txt)
+
+// SPDX-License-Identifier: BSL-1.0
+
+#ifndef CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP
+#define CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP
+
+#if defined(_MSC_VER)
+#  if _MSC_VER >= 1900 // Visual Studio 2015 or newer
+#    define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
+#  endif
+#endif
+
+#include <exception>
+
+#if defined(__cpp_lib_uncaught_exceptions) \
+    && !defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
+
+#  define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
+#endif // __cpp_lib_uncaught_exceptions
+
+#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) \
+    && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) \
+    && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
+
+#  define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
+#endif
+
+#endif // CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP
+// end catch_config_uncaught_exceptions.hpp
 #include <exception>
 
 namespace Catch {
     bool uncaught_exceptions() {
-#if defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
+#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
+        return false;
+#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
         return std::uncaught_exceptions() > 0;
 #else
         return std::uncaught_exception();
@@ -13033,7 +15264,7 @@ namespace Catch {
     }
 
     Version const& libraryVersion() {
-        static Version version( 2, 8, 0, "", 0 );
+        static Version version( 2, 13, 2, "", 0 );
         return version;
     }
 
@@ -13041,14 +15272,12 @@ namespace Catch {
 // end catch_version.cpp
 // start catch_wildcard_pattern.cpp
 
-#include <sstream>
-
 namespace Catch {
 
     WildcardPattern::WildcardPattern( std::string const& pattern,
                                       CaseSensitive::Choice caseSensitivity )
     :   m_caseSensitivity( caseSensitivity ),
-        m_pattern( adjustCase( pattern ) )
+        m_pattern( normaliseString( pattern ) )
     {
         if( startsWith( m_pattern, '*' ) ) {
             m_pattern = m_pattern.substr( 1 );
@@ -13063,28 +15292,27 @@ namespace Catch {
     bool WildcardPattern::matches( std::string const& str ) const {
         switch( m_wildcard ) {
             case NoWildcard:
-                return m_pattern == adjustCase( str );
+                return m_pattern == normaliseString( str );
             case WildcardAtStart:
-                return endsWith( adjustCase( str ), m_pattern );
+                return endsWith( normaliseString( str ), m_pattern );
             case WildcardAtEnd:
-                return startsWith( adjustCase( str ), m_pattern );
+                return startsWith( normaliseString( str ), m_pattern );
             case WildcardAtBothEnds:
-                return contains( adjustCase( str ), m_pattern );
+                return contains( normaliseString( str ), m_pattern );
             default:
                 CATCH_INTERNAL_ERROR( "Unknown enum" );
         }
     }
 
-    std::string WildcardPattern::adjustCase( std::string const& str ) const {
-        return m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str;
+    std::string WildcardPattern::normaliseString( std::string const& str ) const {
+        return trim( m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str );
     }
 }
 // end catch_wildcard_pattern.cpp
 // start catch_xmlwriter.cpp
 
 #include <iomanip>
-
-using uchar = unsigned char;
+#include <type_traits>
 
 namespace Catch {
 
@@ -13124,8 +15352,30 @@ namespace {
         os.flags(f);
     }
 
+    bool shouldNewline(XmlFormatting fmt) {
+        return !!(static_cast<std::underlying_type<XmlFormatting>::type>(fmt & XmlFormatting::Newline));
+    }
+
+    bool shouldIndent(XmlFormatting fmt) {
+        return !!(static_cast<std::underlying_type<XmlFormatting>::type>(fmt & XmlFormatting::Indent));
+    }
+
 } // anonymous namespace
 
+    XmlFormatting operator | (XmlFormatting lhs, XmlFormatting rhs) {
+        return static_cast<XmlFormatting>(
+            static_cast<std::underlying_type<XmlFormatting>::type>(lhs) |
+            static_cast<std::underlying_type<XmlFormatting>::type>(rhs)
+        );
+    }
+
+    XmlFormatting operator & (XmlFormatting lhs, XmlFormatting rhs) {
+        return static_cast<XmlFormatting>(
+            static_cast<std::underlying_type<XmlFormatting>::type>(lhs) &
+            static_cast<std::underlying_type<XmlFormatting>::type>(rhs)
+        );
+    }
+
     XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat )
     :   m_str( str ),
         m_forWhat( forWhat )
@@ -13136,7 +15386,7 @@ namespace {
         // (see: http://www.w3.org/TR/xml/#syntax)
 
         for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) {
-            uchar c = m_str[idx];
+            unsigned char c = m_str[idx];
             switch (c) {
             case '<':   os << "&lt;"; break;
             case '&':   os << "&amp;"; break;
@@ -13196,7 +15446,7 @@ namespace {
                 bool valid = true;
                 uint32_t value = headerValue(c);
                 for (std::size_t n = 1; n < encBytes; ++n) {
-                    uchar nc = m_str[idx + n];
+                    unsigned char nc = m_str[idx + n];
                     valid &= ((nc & 0xC0) == 0x80);
                     value = (value << 6) | (nc & 0x3F);
                 }
@@ -13230,13 +15480,17 @@ namespace {
         return os;
     }
 
-    XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer )
-    :   m_writer( writer )
+    XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer, XmlFormatting fmt )
+    :   m_writer( writer ),
+        m_fmt(fmt)
     {}
 
     XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) noexcept
-    :   m_writer( other.m_writer ){
+    :   m_writer( other.m_writer ),
+        m_fmt(other.m_fmt)
+    {
         other.m_writer = nullptr;
+        other.m_fmt = XmlFormatting::None;
     }
     XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) noexcept {
         if ( m_writer ) {
@@ -13244,16 +15498,19 @@ namespace {
         }
         m_writer = other.m_writer;
         other.m_writer = nullptr;
+        m_fmt = other.m_fmt;
+        other.m_fmt = XmlFormatting::None;
         return *this;
     }
 
     XmlWriter::ScopedElement::~ScopedElement() {
-        if( m_writer )
-            m_writer->endElement();
+        if (m_writer) {
+            m_writer->endElement(m_fmt);
+        }
     }
 
-    XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, bool indent ) {
-        m_writer->writeText( text, indent );
+    XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, XmlFormatting fmt ) {
+        m_writer->writeText( text, fmt );
         return *this;
     }
 
@@ -13263,37 +15520,47 @@ namespace {
     }
 
     XmlWriter::~XmlWriter() {
-        while( !m_tags.empty() )
+        while (!m_tags.empty()) {
             endElement();
+        }
+        newlineIfNecessary();
     }
 
-    XmlWriter& XmlWriter::startElement( std::string const& name ) {
+    XmlWriter& XmlWriter::startElement( std::string const& name, XmlFormatting fmt ) {
         ensureTagClosed();
         newlineIfNecessary();
-        m_os << m_indent << '<' << name;
+        if (shouldIndent(fmt)) {
+            m_os << m_indent;
+            m_indent += "  ";
+        }
+        m_os << '<' << name;
         m_tags.push_back( name );
-        m_indent += "  ";
         m_tagIsOpen = true;
+        applyFormatting(fmt);
         return *this;
     }
 
-    XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name ) {
-        ScopedElement scoped( this );
-        startElement( name );
+    XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name, XmlFormatting fmt ) {
+        ScopedElement scoped( this, fmt );
+        startElement( name, fmt );
         return scoped;
     }
 
-    XmlWriter& XmlWriter::endElement() {
-        newlineIfNecessary();
-        m_indent = m_indent.substr( 0, m_indent.size()-2 );
+    XmlWriter& XmlWriter::endElement(XmlFormatting fmt) {
+        m_indent = m_indent.substr(0, m_indent.size() - 2);
+
         if( m_tagIsOpen ) {
             m_os << "/>";
             m_tagIsOpen = false;
+        } else {
+            newlineIfNecessary();
+            if (shouldIndent(fmt)) {
+                m_os << m_indent;
+            }
+            m_os << "</" << m_tags.back() << ">";
         }
-        else {
-            m_os << m_indent << "</" << m_tags.back() << ">";
-        }
-        m_os << std::endl;
+        m_os << std::flush;
+        applyFormatting(fmt);
         m_tags.pop_back();
         return *this;
     }
@@ -13309,22 +15576,26 @@ namespace {
         return *this;
     }
 
-    XmlWriter& XmlWriter::writeText( std::string const& text, bool indent ) {
+    XmlWriter& XmlWriter::writeText( std::string const& text, XmlFormatting fmt) {
         if( !text.empty() ){
             bool tagWasOpen = m_tagIsOpen;
             ensureTagClosed();
-            if( tagWasOpen && indent )
+            if (tagWasOpen && shouldIndent(fmt)) {
                 m_os << m_indent;
+            }
             m_os << XmlEncode( text );
-            m_needsNewline = true;
+            applyFormatting(fmt);
         }
         return *this;
     }
 
-    XmlWriter& XmlWriter::writeComment( std::string const& text ) {
+    XmlWriter& XmlWriter::writeComment( std::string const& text, XmlFormatting fmt) {
         ensureTagClosed();
-        m_os << m_indent << "<!--" << text << "-->";
-        m_needsNewline = true;
+        if (shouldIndent(fmt)) {
+            m_os << m_indent;
+        }
+        m_os << "<!--" << text << "-->";
+        applyFormatting(fmt);
         return *this;
     }
 
@@ -13340,11 +15611,16 @@ namespace {
 
     void XmlWriter::ensureTagClosed() {
         if( m_tagIsOpen ) {
-            m_os << ">" << std::endl;
+            m_os << '>' << std::flush;
+            newlineIfNecessary();
             m_tagIsOpen = false;
         }
     }
 
+    void XmlWriter::applyFormatting(XmlFormatting fmt) {
+        m_needsNewline = shouldNewline(fmt);
+    }
+
     void XmlWriter::writeDeclaration() {
         m_os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
     }
@@ -13390,6 +15666,17 @@ namespace Catch {
         return std::string(buffer);
     }
 
+    bool shouldShowDuration( IConfig const& config, double duration ) {
+        if ( config.showDurations() == ShowDurations::Always ) {
+            return true;
+        }
+        if ( config.showDurations() == ShowDurations::Never ) {
+            return false;
+        }
+        const double min = config.minDuration();
+        return min >= 0 && duration >= min;
+    }
+
     std::string serializeFilters( std::vector<std::string> const& container ) {
         ReusableStringStream oss;
         bool first = true;
@@ -13620,24 +15907,25 @@ private:
         if (itMessage == messages.end())
             return;
 
-        // using messages.end() directly yields (or auto) compilation error:
-        std::vector<MessageInfo>::const_iterator itEnd = messages.end();
-        const std::size_t N = static_cast<std::size_t>(std::distance(itMessage, itEnd));
+        const auto itEnd = messages.cend();
+        const auto N = static_cast<std::size_t>(std::distance(itMessage, itEnd));
 
         {
             Colour colourGuard(colour);
             stream << " with " << pluralise(N, "message") << ':';
         }
 
-        for (; itMessage != itEnd; ) {
+        while (itMessage != itEnd) {
             // If this assertion is a warning ignore any INFO messages
             if (printInfoMessages || itMessage->type != ResultWas::Info) {
-                stream << " '" << itMessage->message << '\'';
-                if (++itMessage != itEnd) {
+                printMessage();
+                if (itMessage != itEnd) {
                     Colour colourGuard(dimColour());
                     stream << " and";
                 }
+                continue;
             }
+            ++itMessage;
         }
     }
 
@@ -13655,10 +15943,6 @@ private:
             return "Reports test results on a single line, suitable for IDEs";
         }
 
-        ReporterPreferences CompactReporter::getPreferences() const {
-            return m_reporterPrefs;
-        }
-
         void CompactReporter::noMatchingTestCases( std::string const& spec ) {
             stream << "No test cases matched '" << spec << '\'' << std::endl;
         }
@@ -13685,8 +15969,9 @@ private:
         }
 
         void CompactReporter::sectionEnded(SectionStats const& _sectionStats) {
-            if (m_config->showDurations() == ShowDurations::Always) {
-                stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl;
+            double dur = _sectionStats.durationInSeconds;
+            if ( shouldShowDuration( *m_config, dur ) ) {
+                stream << getFormattedDuration( dur ) << " s: " << _sectionStats.sectionInfo.name << std::endl;
             }
         }
 
@@ -13710,8 +15995,13 @@ private:
 #if defined(_MSC_VER)
 #pragma warning(push)
 #pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch
- // Note that 4062 (not all labels are handled
- // and default is missing) is enabled
+ // Note that 4062 (not all labels are handled and default is missing) is enabled
+#endif
+
+#if defined(__clang__)
+#  pragma clang diagnostic push
+// For simplicity, benchmarking-only helpers are always enabled
+#  pragma clang diagnostic ignored "-Wunused-function"
 #endif
 
 namespace Catch {
@@ -13893,11 +16183,11 @@ class Duration {
     static const uint64_t s_nanosecondsInASecond = 1000 * s_nanosecondsInAMillisecond;
     static const uint64_t s_nanosecondsInAMinute = 60 * s_nanosecondsInASecond;
 
-    uint64_t m_inNanoseconds;
+    double m_inNanoseconds;
     Unit m_units;
 
 public:
-    explicit Duration(uint64_t inNanoseconds, Unit units = Unit::Auto)
+    explicit Duration(double inNanoseconds, Unit units = Unit::Auto)
         : m_inNanoseconds(inNanoseconds),
         m_units(units) {
         if (m_units == Unit::Auto) {
@@ -13926,7 +16216,7 @@ public:
         case Unit::Minutes:
             return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMinute);
         default:
-            return static_cast<double>(m_inNanoseconds);
+            return m_inNanoseconds;
         }
     }
     auto unitsAsString() const -> std::string {
@@ -13947,7 +16237,7 @@ public:
 
     }
     friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {
-        return os << duration.value() << " " << duration.unitsAsString();
+        return os << duration.value() << ' ' << duration.unitsAsString();
     }
 };
 } // end anon namespace
@@ -13972,10 +16262,16 @@ public:
         if (!m_isOpen) {
             m_isOpen = true;
             *this << RowBreak();
-            for (auto const& info : m_columnInfos)
-                *this << info.name << ColumnBreak();
-            *this << RowBreak();
-            m_os << Catch::getLineOfChars<'-'>() << "\n";
+
+			Columns headerCols;
+			Spacer spacer(2);
+			for (auto const& info : m_columnInfos) {
+				headerCols += Column(info.name).width(static_cast<std::size_t>(info.width - 2));
+				headerCols += spacer;
+			}
+			m_os << headerCols << '\n';
+
+            m_os << Catch::getLineOfChars<'-'>() << '\n';
         }
     }
     void close() {
@@ -13994,30 +16290,29 @@ public:
 
     friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) {
         auto colStr = tp.m_oss.str();
-        // This takes account of utf8 encodings
-        auto strSize = Catch::StringRef(colStr).numberOfCharacters();
+        const auto strSize = colStr.size();
         tp.m_oss.str("");
         tp.open();
         if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {
             tp.m_currentColumn = -1;
-            tp.m_os << "\n";
+            tp.m_os << '\n';
         }
         tp.m_currentColumn++;
 
         auto colInfo = tp.m_columnInfos[tp.m_currentColumn];
-        auto padding = (strSize + 2 < static_cast<std::size_t>(colInfo.width))
-            ? std::string(colInfo.width - (strSize + 2), ' ')
+        auto padding = (strSize + 1 < static_cast<std::size_t>(colInfo.width))
+            ? std::string(colInfo.width - (strSize + 1), ' ')
             : std::string();
         if (colInfo.justification == ColumnInfo::Left)
-            tp.m_os << colStr << padding << " ";
+            tp.m_os << colStr << padding << ' ';
         else
-            tp.m_os << padding << colStr << " ";
+            tp.m_os << padding << colStr << ' ';
         return tp;
     }
 
     friend TablePrinter& operator << (TablePrinter& tp, RowBreak) {
         if (tp.m_currentColumn > 0) {
-            tp.m_os << "\n";
+            tp.m_os << '\n';
             tp.m_currentColumn = -1;
         }
         return tp;
@@ -14027,12 +16322,26 @@ public:
 ConsoleReporter::ConsoleReporter(ReporterConfig const& config)
     : StreamingReporterBase(config),
     m_tablePrinter(new TablePrinter(config.stream(),
-    {
-        { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left },
-        { "iters", 8, ColumnInfo::Right },
-        { "elapsed ns", 14, ColumnInfo::Right },
-        { "average", 14, ColumnInfo::Right }
-    })) {}
+        [&config]() -> std::vector<ColumnInfo> {
+        if (config.fullConfig()->benchmarkNoAnalysis())
+        {
+            return{
+                { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },
+                { "     samples", 14, ColumnInfo::Right },
+                { "  iterations", 14, ColumnInfo::Right },
+                { "        mean", 14, ColumnInfo::Right }
+            };
+        }
+        else
+        {
+            return{
+                { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },
+                { "samples      mean       std dev", 14, ColumnInfo::Right },
+                { "iterations   low mean   low std dev", 14, ColumnInfo::Right },
+                { "estimated    high mean  high std dev", 14, ColumnInfo::Right }
+            };
+        }
+    }())) {}
 ConsoleReporter::~ConsoleReporter() = default;
 
 std::string ConsoleReporter::getDescription() {
@@ -14043,6 +16352,10 @@ void ConsoleReporter::noMatchingTestCases(std::string const& spec) {
     stream << "No test cases matched '" << spec << '\'' << std::endl;
 }
 
+void ConsoleReporter::reportInvalidArguments(std::string const&arg){
+    stream << "Invalid Filter: " << arg << std::endl;
+}
+
 void ConsoleReporter::assertionStarting(AssertionInfo const&) {}
 
 bool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) {
@@ -14063,6 +16376,7 @@ bool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) {
 }
 
 void ConsoleReporter::sectionStarting(SectionInfo const& _sectionInfo) {
+    m_tablePrinter->close();
     m_headerPrinted = false;
     StreamingReporterBase::sectionStarting(_sectionInfo);
 }
@@ -14077,8 +16391,9 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {
             stream << "\nNo assertions in test case";
         stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl;
     }
-    if (m_config->showDurations() == ShowDurations::Always) {
-        stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl;
+    double dur = _sectionStats.durationInSeconds;
+    if (shouldShowDuration(*m_config, dur)) {
+        stream << getFormattedDuration(dur) << " s: " << _sectionStats.sectionInfo.name << std::endl;
     }
     if (m_headerPrinted) {
         m_headerPrinted = false;
@@ -14086,28 +16401,53 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {
     StreamingReporterBase::sectionEnded(_sectionStats);
 }
 
-void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {
-    lazyPrintWithoutClosingBenchmarkTable();
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+void ConsoleReporter::benchmarkPreparing(std::string const& name) {
+	lazyPrintWithoutClosingBenchmarkTable();
 
-    auto nameCol = Column( info.name ).width( static_cast<std::size_t>( m_tablePrinter->columnInfos()[0].width - 2 ) );
+	auto nameCol = Column(name).width(static_cast<std::size_t>(m_tablePrinter->columnInfos()[0].width - 2));
 
-    bool firstLine = true;
-    for (auto line : nameCol) {
-        if (!firstLine)
-            (*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();
-        else
-            firstLine = false;
+	bool firstLine = true;
+	for (auto line : nameCol) {
+		if (!firstLine)
+			(*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();
+		else
+			firstLine = false;
+
+		(*m_tablePrinter) << line << ColumnBreak();
+	}
+}
 
-        (*m_tablePrinter) << line << ColumnBreak();
+void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {
+    (*m_tablePrinter) << info.samples << ColumnBreak()
+        << info.iterations << ColumnBreak();
+    if (!m_config->benchmarkNoAnalysis())
+        (*m_tablePrinter) << Duration(info.estimatedDuration) << ColumnBreak();
+}
+void ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) {
+    if (m_config->benchmarkNoAnalysis())
+    {
+        (*m_tablePrinter) << Duration(stats.mean.point.count()) << ColumnBreak();
+    }
+    else
+    {
+        (*m_tablePrinter) << ColumnBreak()
+            << Duration(stats.mean.point.count()) << ColumnBreak()
+            << Duration(stats.mean.lower_bound.count()) << ColumnBreak()
+            << Duration(stats.mean.upper_bound.count()) << ColumnBreak() << ColumnBreak()
+            << Duration(stats.standardDeviation.point.count()) << ColumnBreak()
+            << Duration(stats.standardDeviation.lower_bound.count()) << ColumnBreak()
+            << Duration(stats.standardDeviation.upper_bound.count()) << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak();
     }
 }
-void ConsoleReporter::benchmarkEnded(BenchmarkStats const& stats) {
-    Duration average(stats.elapsedTimeInNanoseconds / stats.iterations);
+
+void ConsoleReporter::benchmarkFailed(std::string const& error) {
+	Colour colour(Colour::Red);
     (*m_tablePrinter)
-        << stats.iterations << ColumnBreak()
-        << stats.elapsedTimeInNanoseconds << ColumnBreak()
-        << average << ColumnBreak();
+        << "Benchmark failed (" << error << ')'
+        << ColumnBreak() << RowBreak();
 }
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
 void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) {
     m_tablePrinter->close();
@@ -14186,11 +16526,9 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
 
     SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;
 
-    if (!lineInfo.empty()) {
-        stream << getLineOfChars<'-'>() << '\n';
-        Colour colourGuard(Colour::FileName);
-        stream << lineInfo << '\n';
-    }
+    stream << getLineOfChars<'-'>() << '\n';
+    Colour colourGuard(Colour::FileName);
+    stream << lineInfo << '\n';
     stream << getLineOfChars<'.'>() << '\n' << std::endl;
 }
 
@@ -14315,8 +16653,10 @@ void ConsoleReporter::printSummaryDivider() {
 }
 
 void ConsoleReporter::printTestFilters() {
-    if (m_config->testSpec().hasFilters())
-        stream << Colour(Colour::BrightYellow) << "Filters: " << serializeFilters( m_config->getTestsOrTags() ) << '\n';
+    if (m_config->testSpec().hasFilters()) {
+        Colour guard(Colour::BrightYellow);
+        stream << "Filters: " << serializeFilters(m_config->getTestsOrTags()) << '\n';
+    }
 }
 
 CATCH_REGISTER_REPORTER("console", ConsoleReporter)
@@ -14326,6 +16666,10 @@ CATCH_REGISTER_REPORTER("console", ConsoleReporter)
 #if defined(_MSC_VER)
 #pragma warning(pop)
 #endif
+
+#if defined(__clang__)
+#  pragma clang diagnostic pop
+#endif
 // end catch_reporter_console.cpp
 // start catch_reporter_junit.cpp
 
@@ -14462,8 +16806,8 @@ namespace Catch {
         for( auto const& child : groupNode.children )
             writeTestCase( *child );
 
-        xml.scopedElement( "system-out" ).writeText( trim( stdOutForSuite ), false );
-        xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite ), false );
+        xml.scopedElement( "system-out" ).writeText( trim( stdOutForSuite ), XmlFormatting::Newline );
+        xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite ), XmlFormatting::Newline );
     }
 
     void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) {
@@ -14508,13 +16852,18 @@ namespace Catch {
                 xml.writeAttribute( "name", name );
             }
             xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) );
+            // This is not ideal, but it should be enough to mimic gtest's
+            // junit output.
+            // Ideally the JUnit reporter would also handle `skipTest`
+            // events and write those out appropriately.
+            xml.writeAttribute( "status", "run" );
 
             writeAssertions( sectionNode );
 
             if( !sectionNode.stdOut.empty() )
-                xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), false );
+                xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), XmlFormatting::Newline );
             if( !sectionNode.stdErr.empty() )
-                xml.scopedElement( "system-err" ).writeText( trim( sectionNode.stdErr ), false );
+                xml.scopedElement( "system-err" ).writeText( trim( sectionNode.stdErr ), XmlFormatting::Newline );
         }
         for( auto const& childNode : sectionNode.childSections )
             if( className.empty() )
@@ -14538,11 +16887,7 @@ namespace Catch {
                     elementName = "error";
                     break;
                 case ResultWas::ExplicitFailure:
-                    elementName = "failure";
-                    break;
                 case ResultWas::ExpressionFailed:
-                    elementName = "failure";
-                    break;
                 case ResultWas::DidntThrowException:
                     elementName = "failure";
                     break;
@@ -14560,10 +16905,25 @@ namespace Catch {
 
             XmlWriter::ScopedElement e = xml.scopedElement( elementName );
 
-            xml.writeAttribute( "message", result.getExpandedExpression() );
+            xml.writeAttribute( "message", result.getExpression() );
             xml.writeAttribute( "type", result.getTestMacroName() );
 
             ReusableStringStream rss;
+            if (stats.totals.assertions.total() > 0) {
+                rss << "FAILED" << ":\n";
+                if (result.hasExpression()) {
+                    rss << "  ";
+                    rss << result.getExpressionInMacro();
+                    rss << '\n';
+                }
+                if (result.hasExpandedExpression()) {
+                    rss << "with expansion:\n";
+                    rss << Column(result.getExpandedExpression()).indent(2) << '\n';
+                }
+            } else {
+                rss << '\n';
+            }
+
             if( !result.getMessage().empty() )
                 rss << result.getMessage() << '\n';
             for( auto const& msg : stats.infoMessages )
@@ -14571,7 +16931,7 @@ namespace Catch {
                     rss << msg.message << '\n';
 
             rss << "at " << result.getSourceInfo();
-            xml.writeText( rss.str(), false );
+            xml.writeText( rss.str(), XmlFormatting::Newline );
         }
     }
 
@@ -14615,19 +16975,41 @@ namespace Catch {
         m_reporter->noMatchingTestCases( spec );
     }
 
+    void ListeningReporter::reportInvalidArguments(std::string const&arg){
+        for ( auto const& listener : m_listeners ) {
+            listener->reportInvalidArguments( arg );
+        }
+        m_reporter->reportInvalidArguments( arg );
+    }
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void ListeningReporter::benchmarkPreparing( std::string const& name ) {
+		for (auto const& listener : m_listeners) {
+			listener->benchmarkPreparing(name);
+		}
+		m_reporter->benchmarkPreparing(name);
+	}
     void ListeningReporter::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) {
         for ( auto const& listener : m_listeners ) {
             listener->benchmarkStarting( benchmarkInfo );
         }
         m_reporter->benchmarkStarting( benchmarkInfo );
     }
-    void ListeningReporter::benchmarkEnded( BenchmarkStats const& benchmarkStats ) {
+    void ListeningReporter::benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) {
         for ( auto const& listener : m_listeners ) {
             listener->benchmarkEnded( benchmarkStats );
         }
         m_reporter->benchmarkEnded( benchmarkStats );
     }
 
+	void ListeningReporter::benchmarkFailed( std::string const& error ) {
+		for (auto const& listener : m_listeners) {
+			listener->benchmarkFailed(error);
+		}
+		m_reporter->benchmarkFailed(error);
+	}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     void ListeningReporter::testRunStarting( TestRunInfo const& testRunInfo ) {
         for ( auto const& listener : m_listeners ) {
             listener->testRunStarting( testRunInfo );
@@ -14895,9 +17277,9 @@ namespace Catch {
             e.writeAttribute( "durationInSeconds", m_testCaseTimer.getElapsedSeconds() );
 
         if( !testCaseStats.stdOut.empty() )
-            m_xml.scopedElement( "StdOut" ).writeText( trim( testCaseStats.stdOut ), false );
+            m_xml.scopedElement( "StdOut" ).writeText( trim( testCaseStats.stdOut ), XmlFormatting::Newline );
         if( !testCaseStats.stdErr.empty() )
-            m_xml.scopedElement( "StdErr" ).writeText( trim( testCaseStats.stdErr ), false );
+            m_xml.scopedElement( "StdErr" ).writeText( trim( testCaseStats.stdErr ), XmlFormatting::Newline );
 
         m_xml.endElement();
     }
@@ -14909,6 +17291,10 @@ namespace Catch {
             .writeAttribute( "successes", testGroupStats.totals.assertions.passed )
             .writeAttribute( "failures", testGroupStats.totals.assertions.failed )
             .writeAttribute( "expectedFailures", testGroupStats.totals.assertions.failedButOk );
+        m_xml.scopedElement( "OverallResultsCases")
+            .writeAttribute( "successes", testGroupStats.totals.testCases.passed )
+            .writeAttribute( "failures", testGroupStats.totals.testCases.failed )
+            .writeAttribute( "expectedFailures", testGroupStats.totals.testCases.failedButOk );
         m_xml.endElement();
     }
 
@@ -14918,8 +17304,57 @@ namespace Catch {
             .writeAttribute( "successes", testRunStats.totals.assertions.passed )
             .writeAttribute( "failures", testRunStats.totals.assertions.failed )
             .writeAttribute( "expectedFailures", testRunStats.totals.assertions.failedButOk );
+        m_xml.scopedElement( "OverallResultsCases")
+            .writeAttribute( "successes", testRunStats.totals.testCases.passed )
+            .writeAttribute( "failures", testRunStats.totals.testCases.failed )
+            .writeAttribute( "expectedFailures", testRunStats.totals.testCases.failedButOk );
+        m_xml.endElement();
+    }
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void XmlReporter::benchmarkPreparing(std::string const& name) {
+        m_xml.startElement("BenchmarkResults")
+            .writeAttribute("name", name);
+    }
+
+    void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {
+        m_xml.writeAttribute("samples", info.samples)
+            .writeAttribute("resamples", info.resamples)
+            .writeAttribute("iterations", info.iterations)
+            .writeAttribute("clockResolution", info.clockResolution)
+            .writeAttribute("estimatedDuration", info.estimatedDuration)
+            .writeComment("All values in nano seconds");
+    }
+
+    void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) {
+        m_xml.startElement("mean")
+            .writeAttribute("value", benchmarkStats.mean.point.count())
+            .writeAttribute("lowerBound", benchmarkStats.mean.lower_bound.count())
+            .writeAttribute("upperBound", benchmarkStats.mean.upper_bound.count())
+            .writeAttribute("ci", benchmarkStats.mean.confidence_interval);
+        m_xml.endElement();
+        m_xml.startElement("standardDeviation")
+            .writeAttribute("value", benchmarkStats.standardDeviation.point.count())
+            .writeAttribute("lowerBound", benchmarkStats.standardDeviation.lower_bound.count())
+            .writeAttribute("upperBound", benchmarkStats.standardDeviation.upper_bound.count())
+            .writeAttribute("ci", benchmarkStats.standardDeviation.confidence_interval);
+        m_xml.endElement();
+        m_xml.startElement("outliers")
+            .writeAttribute("variance", benchmarkStats.outlierVariance)
+            .writeAttribute("lowMild", benchmarkStats.outliers.low_mild)
+            .writeAttribute("lowSevere", benchmarkStats.outliers.low_severe)
+            .writeAttribute("highMild", benchmarkStats.outliers.high_mild)
+            .writeAttribute("highSevere", benchmarkStats.outliers.high_severe);
+        m_xml.endElement();
+        m_xml.endElement();
+    }
+
+    void XmlReporter::benchmarkFailed(std::string const &error) {
+        m_xml.scopedElement("failed").
+            writeAttribute("message", error);
         m_xml.endElement();
     }
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
     CATCH_REGISTER_REPORTER( "xml", XmlReporter )
 
@@ -14946,7 +17381,7 @@ namespace Catch {
 
 #ifndef __OBJC__
 
-#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)
+#if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)
 // Standard C/C++ Win32 Unicode wmain entry point
 extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) {
 #else
@@ -15077,6 +17512,13 @@ int main (int argc, char * const argv[]) {
 #define CATCH_THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( "     Then: " << desc )
 #define CATCH_AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( "      And: " << desc )
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+#define CATCH_BENCHMARK(...) \
+    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))
+#define CATCH_BENCHMARK_ADVANCED(name) \
+    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name)
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
 // If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required
 #else
 
@@ -15136,6 +17578,8 @@ int main (int argc, char * const argv[]) {
 #define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
+#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(__VA_ARGS__)
+#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #else
 #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )
 #define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )
@@ -15145,6 +17589,8 @@ int main (int argc, char * const argv[]) {
 #define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
+#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE( __VA_ARGS__ ) )
+#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
 #endif
 
 #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)
@@ -15170,6 +17616,13 @@ int main (int argc, char * const argv[]) {
 #define THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( "     Then: " << desc )
 #define AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( "      And: " << desc )
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+#define BENCHMARK(...) \
+    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))
+#define BENCHMARK_ADVANCED(name) \
+    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name)
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
 using Catch::Detail::Approx;
 
 #else // CATCH_CONFIG_DISABLE
diff --git a/externals/catch2/catch2/catch_reporter_automake.hpp b/externals/catch2/catch2/catch_reporter_automake.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..dbebe975163c98ff9328a495c18b9e9858033132
--- /dev/null
+++ b/externals/catch2/catch2/catch_reporter_automake.hpp
@@ -0,0 +1,62 @@
+/*
+ *  Created by Justin R. Wilson on 2/19/2017.
+ *  Copyright 2017 Justin R. Wilson. All rights reserved.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef TWOBLUECUBES_CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED
+
+// Don't #include any Catch headers here - we can assume they are already
+// included before this header.
+// This is not good practice in general but is necessary in this case so this
+// file can be distributed as a single header that works with the main
+// Catch single header.
+
+namespace Catch {
+
+    struct AutomakeReporter : StreamingReporterBase<AutomakeReporter> {
+        AutomakeReporter( ReporterConfig const& _config )
+          :   StreamingReporterBase( _config )
+        {}
+
+        ~AutomakeReporter() override;
+
+        static std::string getDescription() {
+            return "Reports test results in the format of Automake .trs files";
+        }
+
+        void assertionStarting( AssertionInfo const& ) override {}
+
+        bool assertionEnded( AssertionStats const& /*_assertionStats*/ ) override { return true; }
+
+        void testCaseEnded( TestCaseStats const& _testCaseStats ) override {
+            // Possible values to emit are PASS, XFAIL, SKIP, FAIL, XPASS and ERROR.
+            stream << ":test-result: ";
+            if (_testCaseStats.totals.assertions.allPassed()) {
+                stream << "PASS";
+            } else if (_testCaseStats.totals.assertions.allOk()) {
+                stream << "XFAIL";
+            } else {
+                stream << "FAIL";
+            }
+            stream << ' ' << _testCaseStats.testInfo.name << '\n';
+            StreamingReporterBase::testCaseEnded( _testCaseStats );
+        }
+
+        void skipTest( TestCaseInfo const& testInfo ) override {
+            stream << ":test-result: SKIP " << testInfo.name << '\n';
+        }
+
+    };
+
+#ifdef CATCH_IMPL
+    AutomakeReporter::~AutomakeReporter() {}
+#endif
+
+    CATCH_REGISTER_REPORTER( "automake", AutomakeReporter)
+
+} // end namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED
diff --git a/externals/catch2/catch2/catch_reporter_sonarqube.hpp b/externals/catch2/catch2/catch_reporter_sonarqube.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bf7d9299a50ab6651633b8f5b7a369618f45aece
--- /dev/null
+++ b/externals/catch2/catch2/catch_reporter_sonarqube.hpp
@@ -0,0 +1,181 @@
+/*
+ *  Created by Daniel Garcia on 2018-12-04.
+ *  Copyright Social Point SL. All rights reserved.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef CATCH_REPORTER_SONARQUBE_HPP_INCLUDED
+#define CATCH_REPORTER_SONARQUBE_HPP_INCLUDED
+
+
+// Don't #include any Catch headers here - we can assume they are already
+// included before this header.
+// This is not good practice in general but is necessary in this case so this
+// file can be distributed as a single header that works with the main
+// Catch single header.
+
+#include <map>
+
+namespace Catch {
+
+    struct SonarQubeReporter : CumulativeReporterBase<SonarQubeReporter> {
+
+        SonarQubeReporter(ReporterConfig const& config)
+        : CumulativeReporterBase(config)
+        , xml(config.stream()) {
+            m_reporterPrefs.shouldRedirectStdOut = true;
+            m_reporterPrefs.shouldReportAllAssertions = true;
+        }
+
+        ~SonarQubeReporter() override;
+
+        static std::string getDescription() {
+            return "Reports test results in the Generic Test Data SonarQube XML format";
+        }
+
+        static std::set<Verbosity> getSupportedVerbosities() {
+            return { Verbosity::Normal };
+        }
+
+        void noMatchingTestCases(std::string const& /*spec*/) override {}
+
+        void testRunStarting(TestRunInfo const& testRunInfo) override {
+            CumulativeReporterBase::testRunStarting(testRunInfo);
+            xml.startElement("testExecutions");
+            xml.writeAttribute("version", "1");
+        }
+
+        void testGroupEnded(TestGroupStats const& testGroupStats) override {
+            CumulativeReporterBase::testGroupEnded(testGroupStats);
+            writeGroup(*m_testGroups.back());
+        }
+
+        void testRunEndedCumulative() override {
+            xml.endElement();
+        }
+
+        void writeGroup(TestGroupNode const& groupNode) {
+            std::map<std::string, TestGroupNode::ChildNodes> testsPerFile;
+            for(auto const& child : groupNode.children)
+                testsPerFile[child->value.testInfo.lineInfo.file].push_back(child);
+
+            for(auto const& kv : testsPerFile)
+                writeTestFile(kv.first.c_str(), kv.second);
+        }
+
+        void writeTestFile(const char* filename, TestGroupNode::ChildNodes const& testCaseNodes) {
+            XmlWriter::ScopedElement e = xml.scopedElement("file");
+            xml.writeAttribute("path", filename);
+
+            for(auto const& child : testCaseNodes)
+                writeTestCase(*child);
+        }
+
+        void writeTestCase(TestCaseNode const& testCaseNode) {
+            // All test cases have exactly one section - which represents the
+            // test case itself. That section may have 0-n nested sections
+            assert(testCaseNode.children.size() == 1);
+            SectionNode const& rootSection = *testCaseNode.children.front();
+            writeSection("", rootSection, testCaseNode.value.testInfo.okToFail());
+        }
+
+        void writeSection(std::string const& rootName, SectionNode const& sectionNode, bool okToFail) {
+            std::string name = trim(sectionNode.stats.sectionInfo.name);
+            if(!rootName.empty())
+                name = rootName + '/' + name;
+
+            if(!sectionNode.assertions.empty() || !sectionNode.stdOut.empty() || !sectionNode.stdErr.empty()) {
+                XmlWriter::ScopedElement e = xml.scopedElement("testCase");
+                xml.writeAttribute("name", name);
+                xml.writeAttribute("duration", static_cast<long>(sectionNode.stats.durationInSeconds * 1000));
+
+                writeAssertions(sectionNode, okToFail);
+            }
+
+            for(auto const& childNode : sectionNode.childSections)
+                writeSection(name, *childNode, okToFail);
+        }
+
+        void writeAssertions(SectionNode const& sectionNode, bool okToFail) {
+            for(auto const& assertion : sectionNode.assertions)
+                writeAssertion( assertion, okToFail);
+        }
+
+        void writeAssertion(AssertionStats const& stats, bool okToFail) {
+            AssertionResult const& result = stats.assertionResult;
+            if(!result.isOk()) {
+                std::string elementName;
+                if(okToFail) {
+                    elementName = "skipped";
+                }
+                else {
+                    switch(result.getResultType()) {
+                        case ResultWas::ThrewException:
+                        case ResultWas::FatalErrorCondition:
+                            elementName = "error";
+                            break;
+                        case ResultWas::ExplicitFailure:
+                            elementName = "failure";
+                            break;
+                        case ResultWas::ExpressionFailed:
+                            elementName = "failure";
+                            break;
+                        case ResultWas::DidntThrowException:
+                            elementName = "failure";
+                            break;
+
+                            // We should never see these here:
+                        case ResultWas::Info:
+                        case ResultWas::Warning:
+                        case ResultWas::Ok:
+                        case ResultWas::Unknown:
+                        case ResultWas::FailureBit:
+                        case ResultWas::Exception:
+                            elementName = "internalError";
+                            break;
+                    }
+                }
+
+                XmlWriter::ScopedElement e = xml.scopedElement(elementName);
+
+                ReusableStringStream messageRss;
+                messageRss << result.getTestMacroName() << "(" << result.getExpression() << ")";
+                xml.writeAttribute("message", messageRss.str());
+
+                ReusableStringStream textRss;
+                if (stats.totals.assertions.total() > 0) {
+                    textRss << "FAILED:\n";
+                    if (result.hasExpression()) {
+                        textRss << "\t" << result.getExpressionInMacro() << "\n";
+                    }
+                    if (result.hasExpandedExpression()) {
+                        textRss << "with expansion:\n\t" << result.getExpandedExpression() << "\n";
+                    }
+                }
+
+                if(!result.getMessage().empty())
+                    textRss << result.getMessage() << "\n";
+
+                for(auto const& msg : stats.infoMessages)
+                    if(msg.type == ResultWas::Info)
+                        textRss << msg.message << "\n";
+
+                textRss << "at " << result.getSourceInfo();
+                xml.writeText(textRss.str(), XmlFormatting::Newline);
+            }
+        }
+
+    private:
+        XmlWriter xml;
+    };
+
+#ifdef CATCH_IMPL
+    SonarQubeReporter::~SonarQubeReporter() {}
+#endif
+
+    CATCH_REGISTER_REPORTER( "sonarqube", SonarQubeReporter )
+
+} // end namespace Catch
+
+#endif // CATCH_REPORTER_SONARQUBE_HPP_INCLUDED
\ No newline at end of file
diff --git a/externals/catch2/catch2/catch_reporter_tap.hpp b/externals/catch2/catch2/catch_reporter_tap.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..5ac8524ce7abebdf264a5584c509c71c2a1df2da
--- /dev/null
+++ b/externals/catch2/catch2/catch_reporter_tap.hpp
@@ -0,0 +1,254 @@
+/*
+ *  Created by Colton Wolkins on 2015-08-15.
+ *  Copyright 2015 Martin Moene. All rights reserved.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef TWOBLUECUBES_CATCH_REPORTER_TAP_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_REPORTER_TAP_HPP_INCLUDED
+
+
+// Don't #include any Catch headers here - we can assume they are already
+// included before this header.
+// This is not good practice in general but is necessary in this case so this
+// file can be distributed as a single header that works with the main
+// Catch single header.
+
+#include <algorithm>
+
+namespace Catch {
+
+    struct TAPReporter : StreamingReporterBase<TAPReporter> {
+
+        using StreamingReporterBase::StreamingReporterBase;
+
+        TAPReporter( ReporterConfig const& config ):
+            StreamingReporterBase( config ) {
+            m_reporterPrefs.shouldReportAllAssertions = true;
+        }
+
+        ~TAPReporter() override;
+
+        static std::string getDescription() {
+            return "Reports test results in TAP format, suitable for test harnesses";
+        }
+
+        void noMatchingTestCases( std::string const& spec ) override {
+            stream << "# No test cases matched '" << spec << "'" << std::endl;
+        }
+
+        void assertionStarting( AssertionInfo const& ) override {}
+
+        bool assertionEnded( AssertionStats const& _assertionStats ) override {
+            ++counter;
+
+            stream << "# " << currentTestCaseInfo->name << std::endl;
+            AssertionPrinter printer( stream, _assertionStats, counter );
+            printer.print();
+
+            stream << std::endl;
+            return true;
+        }
+
+        void testRunEnded( TestRunStats const& _testRunStats ) override {
+            printTotals( _testRunStats.totals );
+            stream << "\n" << std::endl;
+            StreamingReporterBase::testRunEnded( _testRunStats );
+        }
+
+    private:
+        std::size_t counter = 0;
+        class AssertionPrinter {
+        public:
+            AssertionPrinter& operator= ( AssertionPrinter const& ) = delete;
+            AssertionPrinter( AssertionPrinter const& ) = delete;
+            AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats, std::size_t _counter )
+            : stream( _stream )
+            , result( _stats.assertionResult )
+            , messages( _stats.infoMessages )
+            , itMessage( _stats.infoMessages.begin() )
+            , printInfoMessages( true )
+            , counter(_counter)
+            {}
+
+            void print() {
+                itMessage = messages.begin();
+
+                switch( result.getResultType() ) {
+                    case ResultWas::Ok:
+                        printResultType( passedString() );
+                        printOriginalExpression();
+                        printReconstructedExpression();
+                        if ( ! result.hasExpression() )
+                            printRemainingMessages( Colour::None );
+                        else
+                            printRemainingMessages();
+                        break;
+                    case ResultWas::ExpressionFailed:
+                        if (result.isOk()) {
+                            printResultType(passedString());
+                        } else {
+                            printResultType(failedString());
+                        }
+                        printOriginalExpression();
+                        printReconstructedExpression();
+                        if (result.isOk()) {
+                            printIssue(" # TODO");
+                        }
+                        printRemainingMessages();
+                        break;
+                    case ResultWas::ThrewException:
+                        printResultType( failedString() );
+                        printIssue( "unexpected exception with message:" );
+                        printMessage();
+                        printExpressionWas();
+                        printRemainingMessages();
+                        break;
+                    case ResultWas::FatalErrorCondition:
+                        printResultType( failedString() );
+                        printIssue( "fatal error condition with message:" );
+                        printMessage();
+                        printExpressionWas();
+                        printRemainingMessages();
+                        break;
+                    case ResultWas::DidntThrowException:
+                        printResultType( failedString() );
+                        printIssue( "expected exception, got none" );
+                        printExpressionWas();
+                        printRemainingMessages();
+                        break;
+                    case ResultWas::Info:
+                        printResultType( "info" );
+                        printMessage();
+                        printRemainingMessages();
+                        break;
+                    case ResultWas::Warning:
+                        printResultType( "warning" );
+                        printMessage();
+                        printRemainingMessages();
+                        break;
+                    case ResultWas::ExplicitFailure:
+                        printResultType( failedString() );
+                        printIssue( "explicitly" );
+                        printRemainingMessages( Colour::None );
+                        break;
+                    // These cases are here to prevent compiler warnings
+                    case ResultWas::Unknown:
+                    case ResultWas::FailureBit:
+                    case ResultWas::Exception:
+                        printResultType( "** internal error **" );
+                        break;
+                }
+            }
+
+        private:
+            static Colour::Code dimColour() { return Colour::FileName; }
+
+            static const char* failedString() { return "not ok"; }
+            static const char* passedString() { return "ok"; }
+
+            void printSourceInfo() const {
+                Colour colourGuard( dimColour() );
+                stream << result.getSourceInfo() << ":";
+            }
+
+            void printResultType( std::string const& passOrFail ) const {
+                if( !passOrFail.empty() ) {
+                    stream << passOrFail << ' ' << counter << " -";
+                }
+            }
+
+            void printIssue( std::string const& issue ) const {
+                stream << " " << issue;
+            }
+
+            void printExpressionWas() {
+                if( result.hasExpression() ) {
+                    stream << ";";
+                    {
+                        Colour colour( dimColour() );
+                        stream << " expression was:";
+                    }
+                    printOriginalExpression();
+                }
+            }
+
+            void printOriginalExpression() const {
+                if( result.hasExpression() ) {
+                    stream << " " << result.getExpression();
+                }
+            }
+
+            void printReconstructedExpression() const {
+                if( result.hasExpandedExpression() ) {
+                    {
+                        Colour colour( dimColour() );
+                        stream << " for: ";
+                    }
+                    std::string expr = result.getExpandedExpression();
+                    std::replace( expr.begin(), expr.end(), '\n', ' ');
+                    stream << expr;
+                }
+            }
+
+            void printMessage() {
+                if ( itMessage != messages.end() ) {
+                    stream << " '" << itMessage->message << "'";
+                    ++itMessage;
+                }
+            }
+
+            void printRemainingMessages( Colour::Code colour = dimColour() ) {
+                if (itMessage == messages.end()) {
+                    return;
+                }
+
+                const auto itEnd = messages.cend();
+                const auto N = static_cast<std::size_t>( std::distance( itMessage, itEnd ) );
+
+                {
+                    Colour colourGuard( colour );
+                    stream << " with " << pluralise( N, "message" ) << ":";
+                }
+
+                while( itMessage != itEnd ) {
+                    // If this assertion is a warning ignore any INFO messages
+                    if( printInfoMessages || itMessage->type != ResultWas::Info ) {
+                        stream << " '" << itMessage->message << "'";
+                        if ( ++itMessage != itEnd ) {
+                            Colour colourGuard( dimColour() );
+                            stream << " and";
+                        }
+                        continue;
+                    }
+                    ++itMessage;
+                }
+            }
+
+        private:
+            std::ostream& stream;
+            AssertionResult const& result;
+            std::vector<MessageInfo> messages;
+            std::vector<MessageInfo>::const_iterator itMessage;
+            bool printInfoMessages;
+            std::size_t counter;
+        };
+
+        void printTotals( const Totals& totals ) const {
+            stream << "1.." << totals.assertions.total();
+            if( totals.testCases.total() == 0 ) {
+                stream << " # Skipped: No tests ran.";
+            }
+        }
+    };
+
+#ifdef CATCH_IMPL
+    TAPReporter::~TAPReporter() {}
+#endif
+
+    CATCH_REGISTER_REPORTER( "tap", TAPReporter )
+
+} // end namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_REPORTER_TAP_HPP_INCLUDED
diff --git a/externals/catch2/catch2/catch_reporter_teamcity.hpp b/externals/catch2/catch2/catch_reporter_teamcity.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..47b7e4aac30f94370156d7be8b5424e9c51eeadb
--- /dev/null
+++ b/externals/catch2/catch2/catch_reporter_teamcity.hpp
@@ -0,0 +1,219 @@
+/*
+ *  Created by Phil Nash on 19th December 2014
+ *  Copyright 2014 Two Blue Cubes Ltd. All rights reserved.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef TWOBLUECUBES_CATCH_REPORTER_TEAMCITY_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_REPORTER_TEAMCITY_HPP_INCLUDED
+
+// Don't #include any Catch headers here - we can assume they are already
+// included before this header.
+// This is not good practice in general but is necessary in this case so this
+// file can be distributed as a single header that works with the main
+// Catch single header.
+
+#include <cstring>
+
+#ifdef __clang__
+#   pragma clang diagnostic push
+#   pragma clang diagnostic ignored "-Wpadded"
+#endif
+
+namespace Catch {
+
+    struct TeamCityReporter : StreamingReporterBase<TeamCityReporter> {
+        TeamCityReporter( ReporterConfig const& _config )
+        :   StreamingReporterBase( _config )
+        {
+            m_reporterPrefs.shouldRedirectStdOut = true;
+        }
+
+        static std::string escape( std::string const& str ) {
+            std::string escaped = str;
+            replaceInPlace( escaped, "|", "||" );
+            replaceInPlace( escaped, "'", "|'" );
+            replaceInPlace( escaped, "\n", "|n" );
+            replaceInPlace( escaped, "\r", "|r" );
+            replaceInPlace( escaped, "[", "|[" );
+            replaceInPlace( escaped, "]", "|]" );
+            return escaped;
+        }
+        ~TeamCityReporter() override;
+
+        static std::string getDescription() {
+            return "Reports test results as TeamCity service messages";
+        }
+
+        void skipTest( TestCaseInfo const& /* testInfo */ ) override {
+        }
+
+        void noMatchingTestCases( std::string const& /* spec */ ) override {}
+
+        void testGroupStarting( GroupInfo const& groupInfo ) override {
+            StreamingReporterBase::testGroupStarting( groupInfo );
+            stream << "##teamcity[testSuiteStarted name='"
+                << escape( groupInfo.name ) << "']\n";
+        }
+        void testGroupEnded( TestGroupStats const& testGroupStats ) override {
+            StreamingReporterBase::testGroupEnded( testGroupStats );
+            stream << "##teamcity[testSuiteFinished name='"
+                << escape( testGroupStats.groupInfo.name ) << "']\n";
+        }
+
+
+        void assertionStarting( AssertionInfo const& ) override {}
+
+        bool assertionEnded( AssertionStats const& assertionStats ) override {
+            AssertionResult const& result = assertionStats.assertionResult;
+            if( !result.isOk() ) {
+
+                ReusableStringStream msg;
+                if( !m_headerPrintedForThisSection )
+                    printSectionHeader( msg.get() );
+                m_headerPrintedForThisSection = true;
+
+                msg << result.getSourceInfo() << "\n";
+
+                switch( result.getResultType() ) {
+                    case ResultWas::ExpressionFailed:
+                        msg << "expression failed";
+                        break;
+                    case ResultWas::ThrewException:
+                        msg << "unexpected exception";
+                        break;
+                    case ResultWas::FatalErrorCondition:
+                        msg << "fatal error condition";
+                        break;
+                    case ResultWas::DidntThrowException:
+                        msg << "no exception was thrown where one was expected";
+                        break;
+                    case ResultWas::ExplicitFailure:
+                        msg << "explicit failure";
+                        break;
+
+                    // We shouldn't get here because of the isOk() test
+                    case ResultWas::Ok:
+                    case ResultWas::Info:
+                    case ResultWas::Warning:
+                        CATCH_ERROR( "Internal error in TeamCity reporter" );
+                    // These cases are here to prevent compiler warnings
+                    case ResultWas::Unknown:
+                    case ResultWas::FailureBit:
+                    case ResultWas::Exception:
+                        CATCH_ERROR( "Not implemented" );
+                }
+                if( assertionStats.infoMessages.size() == 1 )
+                    msg << " with message:";
+                if( assertionStats.infoMessages.size() > 1 )
+                    msg << " with messages:";
+                for( auto const& messageInfo : assertionStats.infoMessages )
+                    msg << "\n  \"" << messageInfo.message << "\"";
+
+
+                if( result.hasExpression() ) {
+                    msg <<
+                        "\n  " << result.getExpressionInMacro() << "\n"
+                        "with expansion:\n" <<
+                        "  " << result.getExpandedExpression() << "\n";
+                }
+
+                if( currentTestCaseInfo->okToFail() ) {
+                    msg << "- failure ignore as test marked as 'ok to fail'\n";
+                    stream << "##teamcity[testIgnored"
+                           << " name='" << escape( currentTestCaseInfo->name )<< "'"
+                           << " message='" << escape( msg.str() ) << "'"
+                           << "]\n";
+                }
+                else {
+                    stream << "##teamcity[testFailed"
+                           << " name='" << escape( currentTestCaseInfo->name )<< "'"
+                           << " message='" << escape( msg.str() ) << "'"
+                           << "]\n";
+                }
+            }
+            stream.flush();
+            return true;
+        }
+
+        void sectionStarting( SectionInfo const& sectionInfo ) override {
+            m_headerPrintedForThisSection = false;
+            StreamingReporterBase::sectionStarting( sectionInfo );
+        }
+
+        void testCaseStarting( TestCaseInfo const& testInfo ) override {
+            m_testTimer.start();
+            StreamingReporterBase::testCaseStarting( testInfo );
+            stream << "##teamcity[testStarted name='"
+                << escape( testInfo.name ) << "']\n";
+            stream.flush();
+        }
+
+        void testCaseEnded( TestCaseStats const& testCaseStats ) override {
+            StreamingReporterBase::testCaseEnded( testCaseStats );
+            if( !testCaseStats.stdOut.empty() )
+                stream << "##teamcity[testStdOut name='"
+                    << escape( testCaseStats.testInfo.name )
+                    << "' out='" << escape( testCaseStats.stdOut ) << "']\n";
+            if( !testCaseStats.stdErr.empty() )
+                stream << "##teamcity[testStdErr name='"
+                    << escape( testCaseStats.testInfo.name )
+                    << "' out='" << escape( testCaseStats.stdErr ) << "']\n";
+            stream << "##teamcity[testFinished name='"
+                    << escape( testCaseStats.testInfo.name ) << "' duration='"
+                    << m_testTimer.getElapsedMilliseconds() << "']\n";
+            stream.flush();
+        }
+
+    private:
+        void printSectionHeader( std::ostream& os ) {
+            assert( !m_sectionStack.empty() );
+
+            if( m_sectionStack.size() > 1 ) {
+                os << getLineOfChars<'-'>() << "\n";
+
+                std::vector<SectionInfo>::const_iterator
+                it = m_sectionStack.begin()+1, // Skip first section (test case)
+                itEnd = m_sectionStack.end();
+                for( ; it != itEnd; ++it )
+                    printHeaderString( os, it->name );
+                os << getLineOfChars<'-'>() << "\n";
+            }
+
+            SourceLineInfo lineInfo = m_sectionStack.front().lineInfo;
+
+            os << lineInfo << "\n";
+            os << getLineOfChars<'.'>() << "\n\n";
+        }
+
+        // if string has a : in first line will set indent to follow it on
+        // subsequent lines
+        static void printHeaderString( std::ostream& os, std::string const& _string, std::size_t indent = 0 ) {
+            std::size_t i = _string.find( ": " );
+            if( i != std::string::npos )
+                i+=2;
+            else
+                i = 0;
+            os << Column( _string )
+                           .indent( indent+i)
+                           .initialIndent( indent ) << "\n";
+        }
+    private:
+        bool m_headerPrintedForThisSection = false;
+        Timer m_testTimer;
+    };
+
+#ifdef CATCH_IMPL
+    TeamCityReporter::~TeamCityReporter() {}
+#endif
+
+    CATCH_REGISTER_REPORTER( "teamcity", TeamCityReporter )
+
+} // end namespace Catch
+
+#ifdef __clang__
+#   pragma clang diagnostic pop
+#endif
+
+#endif // TWOBLUECUBES_CATCH_REPORTER_TEAMCITY_HPP_INCLUDED
diff --git a/ThirdParty/phys/units/io.hpp b/externals/phys_units/phys/units/io.hpp
similarity index 100%
rename from ThirdParty/phys/units/io.hpp
rename to externals/phys_units/phys/units/io.hpp
diff --git a/ThirdParty/phys/units/io_output.hpp b/externals/phys_units/phys/units/io_output.hpp
similarity index 100%
rename from ThirdParty/phys/units/io_output.hpp
rename to externals/phys_units/phys/units/io_output.hpp
diff --git a/ThirdParty/phys/units/io_output_eng.hpp b/externals/phys_units/phys/units/io_output_eng.hpp
similarity index 100%
rename from ThirdParty/phys/units/io_output_eng.hpp
rename to externals/phys_units/phys/units/io_output_eng.hpp
diff --git a/ThirdParty/phys/units/io_symbols.hpp b/externals/phys_units/phys/units/io_symbols.hpp
similarity index 100%
rename from ThirdParty/phys/units/io_symbols.hpp
rename to externals/phys_units/phys/units/io_symbols.hpp
diff --git a/ThirdParty/phys/units/other_units.hpp b/externals/phys_units/phys/units/other_units.hpp
similarity index 100%
rename from ThirdParty/phys/units/other_units.hpp
rename to externals/phys_units/phys/units/other_units.hpp
diff --git a/ThirdParty/phys/units/physical_constants.hpp b/externals/phys_units/phys/units/physical_constants.hpp
similarity index 100%
rename from ThirdParty/phys/units/physical_constants.hpp
rename to externals/phys_units/phys/units/physical_constants.hpp
diff --git a/ThirdParty/phys/units/quantity.hpp b/externals/phys_units/phys/units/quantity.hpp
similarity index 99%
rename from ThirdParty/phys/units/quantity.hpp
rename to externals/phys_units/phys/units/quantity.hpp
index 0751923b0ca4eb07a75a0d712523bb69b569b904..970773d598ec4e076467fb990c9fdb610b9c936f 100644
--- a/ThirdParty/phys/units/quantity.hpp
+++ b/externals/phys_units/phys/units/quantity.hpp
@@ -31,7 +31,6 @@
 #include <cmath>
 #include <cstdlib>
 #include <utility> // std::declval
-#include <type_traits> // std::enable_if
 
 /// namespace phys.
 
@@ -359,10 +358,6 @@ namespace phys {
       static constexpr quantity zero() { return quantity{value_type(0.0)}; }
       //    static constexpr quantity zero = quantity{ value_type( 0.0 ) };
 
-      // RU, added conversion to T (often: double) for dimensionless_d
-      template <typename DIM=Dims, std::enable_if_t<std::is_same_v<DIM, dimensionless_d>, int> = 0>
-      operator T() { return m_value; }
-      
     private:
       /**
        * private initializing constructor.
diff --git a/ThirdParty/phys/units/quantity_io.hpp b/externals/phys_units/phys/units/quantity_io.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io.hpp
rename to externals/phys_units/phys/units/quantity_io.hpp
diff --git a/ThirdParty/phys/units/quantity_io_ampere.hpp b/externals/phys_units/phys/units/quantity_io_ampere.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_ampere.hpp
rename to externals/phys_units/phys/units/quantity_io_ampere.hpp
diff --git a/ThirdParty/phys/units/quantity_io_becquerel.hpp b/externals/phys_units/phys/units/quantity_io_becquerel.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_becquerel.hpp
rename to externals/phys_units/phys/units/quantity_io_becquerel.hpp
diff --git a/ThirdParty/phys/units/quantity_io_candela.hpp b/externals/phys_units/phys/units/quantity_io_candela.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_candela.hpp
rename to externals/phys_units/phys/units/quantity_io_candela.hpp
diff --git a/ThirdParty/phys/units/quantity_io_celsius.hpp b/externals/phys_units/phys/units/quantity_io_celsius.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_celsius.hpp
rename to externals/phys_units/phys/units/quantity_io_celsius.hpp
diff --git a/ThirdParty/phys/units/quantity_io_coulomb.hpp b/externals/phys_units/phys/units/quantity_io_coulomb.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_coulomb.hpp
rename to externals/phys_units/phys/units/quantity_io_coulomb.hpp
diff --git a/ThirdParty/phys/units/quantity_io_dimensionless.hpp b/externals/phys_units/phys/units/quantity_io_dimensionless.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_dimensionless.hpp
rename to externals/phys_units/phys/units/quantity_io_dimensionless.hpp
diff --git a/ThirdParty/phys/units/quantity_io_engineering.hpp b/externals/phys_units/phys/units/quantity_io_engineering.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_engineering.hpp
rename to externals/phys_units/phys/units/quantity_io_engineering.hpp
diff --git a/ThirdParty/phys/units/quantity_io_farad.hpp b/externals/phys_units/phys/units/quantity_io_farad.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_farad.hpp
rename to externals/phys_units/phys/units/quantity_io_farad.hpp
diff --git a/ThirdParty/phys/units/quantity_io_gray.hpp b/externals/phys_units/phys/units/quantity_io_gray.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_gray.hpp
rename to externals/phys_units/phys/units/quantity_io_gray.hpp
diff --git a/ThirdParty/phys/units/quantity_io_henry.hpp b/externals/phys_units/phys/units/quantity_io_henry.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_henry.hpp
rename to externals/phys_units/phys/units/quantity_io_henry.hpp
diff --git a/ThirdParty/phys/units/quantity_io_hertz.hpp b/externals/phys_units/phys/units/quantity_io_hertz.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_hertz.hpp
rename to externals/phys_units/phys/units/quantity_io_hertz.hpp
diff --git a/ThirdParty/phys/units/quantity_io_joule.hpp b/externals/phys_units/phys/units/quantity_io_joule.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_joule.hpp
rename to externals/phys_units/phys/units/quantity_io_joule.hpp
diff --git a/ThirdParty/phys/units/quantity_io_kelvin.hpp b/externals/phys_units/phys/units/quantity_io_kelvin.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_kelvin.hpp
rename to externals/phys_units/phys/units/quantity_io_kelvin.hpp
diff --git a/ThirdParty/phys/units/quantity_io_kilogram.hpp b/externals/phys_units/phys/units/quantity_io_kilogram.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_kilogram.hpp
rename to externals/phys_units/phys/units/quantity_io_kilogram.hpp
diff --git a/ThirdParty/phys/units/quantity_io_lumen.hpp b/externals/phys_units/phys/units/quantity_io_lumen.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_lumen.hpp
rename to externals/phys_units/phys/units/quantity_io_lumen.hpp
diff --git a/ThirdParty/phys/units/quantity_io_lux.hpp b/externals/phys_units/phys/units/quantity_io_lux.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_lux.hpp
rename to externals/phys_units/phys/units/quantity_io_lux.hpp
diff --git a/ThirdParty/phys/units/quantity_io_meter.hpp b/externals/phys_units/phys/units/quantity_io_meter.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_meter.hpp
rename to externals/phys_units/phys/units/quantity_io_meter.hpp
diff --git a/ThirdParty/phys/units/quantity_io_mole.hpp b/externals/phys_units/phys/units/quantity_io_mole.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_mole.hpp
rename to externals/phys_units/phys/units/quantity_io_mole.hpp
diff --git a/ThirdParty/phys/units/quantity_io_newton.hpp b/externals/phys_units/phys/units/quantity_io_newton.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_newton.hpp
rename to externals/phys_units/phys/units/quantity_io_newton.hpp
diff --git a/ThirdParty/phys/units/quantity_io_ohm.hpp b/externals/phys_units/phys/units/quantity_io_ohm.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_ohm.hpp
rename to externals/phys_units/phys/units/quantity_io_ohm.hpp
diff --git a/ThirdParty/phys/units/quantity_io_pascal.hpp b/externals/phys_units/phys/units/quantity_io_pascal.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_pascal.hpp
rename to externals/phys_units/phys/units/quantity_io_pascal.hpp
diff --git a/ThirdParty/phys/units/quantity_io_radian.hpp b/externals/phys_units/phys/units/quantity_io_radian.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_radian.hpp
rename to externals/phys_units/phys/units/quantity_io_radian.hpp
diff --git a/ThirdParty/phys/units/quantity_io_second.hpp b/externals/phys_units/phys/units/quantity_io_second.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_second.hpp
rename to externals/phys_units/phys/units/quantity_io_second.hpp
diff --git a/ThirdParty/phys/units/quantity_io_siemens.hpp b/externals/phys_units/phys/units/quantity_io_siemens.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_siemens.hpp
rename to externals/phys_units/phys/units/quantity_io_siemens.hpp
diff --git a/ThirdParty/phys/units/quantity_io_sievert.hpp b/externals/phys_units/phys/units/quantity_io_sievert.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_sievert.hpp
rename to externals/phys_units/phys/units/quantity_io_sievert.hpp
diff --git a/ThirdParty/phys/units/quantity_io_speed.hpp b/externals/phys_units/phys/units/quantity_io_speed.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_speed.hpp
rename to externals/phys_units/phys/units/quantity_io_speed.hpp
diff --git a/ThirdParty/phys/units/quantity_io_steradian.hpp b/externals/phys_units/phys/units/quantity_io_steradian.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_steradian.hpp
rename to externals/phys_units/phys/units/quantity_io_steradian.hpp
diff --git a/ThirdParty/phys/units/quantity_io_symbols.hpp b/externals/phys_units/phys/units/quantity_io_symbols.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_symbols.hpp
rename to externals/phys_units/phys/units/quantity_io_symbols.hpp
diff --git a/ThirdParty/phys/units/quantity_io_tesla.hpp b/externals/phys_units/phys/units/quantity_io_tesla.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_tesla.hpp
rename to externals/phys_units/phys/units/quantity_io_tesla.hpp
diff --git a/ThirdParty/phys/units/quantity_io_volt.hpp b/externals/phys_units/phys/units/quantity_io_volt.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_volt.hpp
rename to externals/phys_units/phys/units/quantity_io_volt.hpp
diff --git a/ThirdParty/phys/units/quantity_io_watt.hpp b/externals/phys_units/phys/units/quantity_io_watt.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_watt.hpp
rename to externals/phys_units/phys/units/quantity_io_watt.hpp
diff --git a/ThirdParty/phys/units/quantity_io_weber.hpp b/externals/phys_units/phys/units/quantity_io_weber.hpp
similarity index 100%
rename from ThirdParty/phys/units/quantity_io_weber.hpp
rename to externals/phys_units/phys/units/quantity_io_weber.hpp
diff --git a/Main/CMakeLists.txt b/src/Main/CMakeLists.txt
similarity index 100%
rename from Main/CMakeLists.txt
rename to src/Main/CMakeLists.txt
diff --git a/Main/shower.cc b/src/Main/shower.cpp
similarity index 100%
rename from Main/shower.cc
rename to src/Main/shower.cpp
diff --git a/tests/framework/CMakeLists.txt b/tests/framework/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d62ee295f8c4c55e2846f55cac86c65c602a5814
--- /dev/null
+++ b/tests/framework/CMakeLists.txt
@@ -0,0 +1,38 @@
+
+set (sources
+  # testCascade.cpp this is most important, but whole content of former Processes folder missing yet
+  testCombinedStack.cpp
+  testCOMBoost.cpp
+  #testCorsikaFenv.cpp # does not work because of use of exceptions in catch2
+  testFourVector.cpp
+  testGeometry.cpp
+  #testLogging.cpp # irrelevant -> not used back in March
+  TestMain.cpp
+  testParticles.cpp
+  testProcessSequence.cpp
+  testRandom.cpp
+  testSecondaryView.cpp
+  testStackInterface.cpp
+  testUnits.cpp
+  )
+
+
+add_executable (testFramework ${sources})
+
+target_link_libraries (testFramework CORSIKA8 Catch2)
+
+target_compile_options (testFramework PRIVATE -g) # do not skip asserts
+
+target_include_directories (testFramework PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+
+file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test_outputs/)
+
+if (CORSIKA_SANITIZERS_ENABLED)
+  # -O1 is suggested in clang docs to get reasonable performance
+  target_compile_options (${name} PRIVATE -O1 -fno-omit-frame-pointer -fsanitize=${sanitize} -fno-sanitize-recover=all)
+  set_target_properties (${name} PROPERTIES LINK_FLAGS "-fsanitize=${sanitize}")
+endif ()
+
+add_test (
+  NAME testFramework
+  COMMAND testFramework -o ${PROJECT_BINARY_DIR}/test_outputs/junit-${name}.xml -s -r junit)
diff --git a/Framework/Testing/TestMain.cc b/tests/framework/TestMain.cpp
similarity index 100%
rename from Framework/Testing/TestMain.cc
rename to tests/framework/TestMain.cpp
diff --git a/Framework/Utilities/testCOMBoost.cc b/tests/framework/testCOMBoost.cpp
similarity index 96%
rename from Framework/Utilities/testCOMBoost.cc
rename to tests/framework/testCOMBoost.cpp
index b6b677d23b62d21c01a1783be81d6f76cdce76b7..58beafd5255babfe8cca016566ed1128779e5c4e 100644
--- a/Framework/Utilities/testCOMBoost.cc
+++ b/tests/framework/testCOMBoost.cpp
@@ -8,16 +8,16 @@
 
 #include <catch2/catch.hpp>
 
-#include <corsika/geometry/FourVector.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/utl/COMBoost.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/framework/utility/COMBoost.hpp>
 
 #include <iostream>
 
-using namespace corsika::geometry;
-using namespace corsika::utl;
+using namespace corsika;
+using namespace corsika;
 using namespace corsika::units::si;
 using corsika::units::constants::c;
 using corsika::units::constants::cSquared;
diff --git a/Framework/Cascade/testCascade.cc b/tests/framework/testCascade.cpp
similarity index 68%
rename from Framework/Cascade/testCascade.cc
rename to tests/framework/testCascade.cpp
index a4863d65e68161607b460b87a943382bff677537..3caaf74842d763673030be9be93c8e5221bca5c9 100644
--- a/Framework/Cascade/testCascade.cc
+++ b/tests/framework/testCascade.cpp
@@ -6,30 +6,31 @@
  * the license.
  */
 
-#include <corsika/cascade/testCascade.h>
+#include <testCascade.h>
 
-#include <corsika/cascade/Cascade.h>
+#include <corsika/framework/core/Cascade.hpp>
 
-#include <corsika/process/ProcessSequence.h>
-#include <corsika/process/NullModel.h>
-#include <corsika/process/stack_inspector/StackInspector.h>
+#include <corsika/framework/sequence/ProcessSequence.hpp>
+#include <corsika/process/NullModel.hpp>
+#include <corsika/process/StackInspector.hpp>
+#include <corsika/process/TrackingLine.hpp>
 
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/NuclearComposition.h>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/NuclearComposition.hpp>
 
 #include <catch2/catch.hpp>
 
 using namespace corsika;
-using namespace corsika::process;
+using namespace corsika;
 using namespace corsika::units;
 using namespace corsika::units::si;
-using namespace corsika::geometry;
+using namespace corsika;
 
 #include <limits>
 using namespace std;
@@ -52,8 +53,11 @@ auto MakeDummyEnv() {
       Point{env.GetCoordinateSystem(), 0_m, 0_m, 0_m},
       1_m * std::numeric_limits<double>::infinity());
 
-  using MyEmptyModel = environment::Empty<environment::IEmpty>;
-  world->SetModelProperties<MyEmptyModel>();
+  using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>;
+  theMedium->SetModelProperties<MyHomogeneousModel>(
+      1_g / (1_cm * 1_cm * 1_cm),
+      environment::NuclearComposition(std::vector<Code>{Code::Proton},
+                                      std::vector<float>{1.}));
 
   universe.AddChild(std::move(world));
 
@@ -96,17 +100,16 @@ public:
     return 0_g / square(1_cm);
   }
 
-  template <typename TSecondaryView>
-  corsika::process::EProcessReturn DoInteraction(TSecondaryView& view) {
+  template <typename TProjectile>
+  corsika::EProcessReturn DoInteraction(TProjectile& vP) {
     fCalls++;
-    auto const projectile = view.GetProjectile();
-    const HEPEnergyType E = projectile.GetEnergy();
-    view.AddSecondary(std::make_tuple(projectile.GetPID(), E / 2,
-                                      projectile.GetMomentum(), projectile.GetPosition(),
-                                      projectile.GetTime()));
-    view.AddSecondary(std::make_tuple(projectile.GetPID(), E / 2,
-                                      projectile.GetMomentum(), projectile.GetPosition(),
-                                      projectile.GetTime()));
+    const HEPEnergyType E = vP.GetEnergy();
+    vP.AddSecondary(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                               geometry::Point, units::si::TimeType>{
+        vP.GetPID(), E / 2, vP.GetMomentum(), vP.GetPosition(), vP.GetTime()});
+    vP.AddSecondary(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                               geometry::Point, units::si::TimeType>{
+        vP.GetPID(), E / 2, vP.GetMomentum(), vP.GetPosition(), vP.GetTime()});
     return EProcessReturn::eInteracted;
   }
 
@@ -165,16 +168,12 @@ TEST_CASE("Cascade", "[Cascade]") {
   auto sequence = process::sequence(nullModel, stackInspect, split, cut);
   TestCascadeStack stack;
   stack.Clear();
-  stack.AddParticle(std::make_tuple(
-      particles::Code::Electron, E0,
-      corsika::stack::MomentumVector(
-          rootCS, {0_GeV, 0_GeV,
-                   -sqrt(E0 * E0 - units::static_pow<2>(
-                                       particles::GetMass(particles::Code::Electron)))}),
-      Point(rootCS, {0_m, 0_m, 10_km}), 0_ns));
-
-  DummyTracking tracking;
-  cascade::Cascade<DummyTracking, decltype(sequence), TestCascadeStack,
+  stack.AddParticle(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                               geometry::Point, units::si::TimeType>{
+      Code::Electron, E0, corsika::MomentumVector(rootCS, {0_GeV, 0_GeV, -1_GeV}),
+      Point(rootCS, {0_m, 0_m, 10_km}), 0_ns});
+
+  cascade::Cascade<tracking_line::TrackingLine, decltype(sequence), TestCascadeStack,
                    TestCascadeStackView>
       EAS(env, tracking, sequence, stack);
 
diff --git a/tests/framework/testCascade.h b/tests/framework/testCascade.h
new file mode 100644
index 0000000000000000000000000000000000000000..715012b9baa4e2046eb1b74c7fa5766b8668c26b
--- /dev/null
+++ b/tests/framework/testCascade.h
@@ -0,0 +1,40 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/media/Environment.hpp>
+
+#include <corsika/setup/SetupStack.hpp>
+
+using TestEnvironmentInterface = corsika::environment::IEmpty;
+using TestEnvironmentType = corsika::environment::Environment<TestEnvironmentInterface>;
+
+template <typename T>
+using SetupGeometryDataInterface =
+    corsika::stack::node::GeometryDataInterface<T, TestEnvironmentType>;
+
+// combine particle data stack with geometry information for tracking
+template <typename StackIter>
+using StackWithGeometryInterface =
+    corsika::CombinedParticleInterface<corsika::detail::ParticleDataStack::PIType,
+                                       SetupGeometryDataInterface, StackIter>;
+
+using TestCascadeStack =
+    corsika::CombinedStack<typename corsika::detail::ParticleDataStack::StackImpl,
+                           GeometryData<TestEnvironmentType>, StackWithGeometryInterface>;
+
+/*
+  See also Issue 161
+*/
+#if defined(__clang__)
+using TestCascadeStackView = corsika::SecondaryView<typename TestCascadeStack::StackImpl,
+                                                    StackWithGeometryInterface>;
+#elif defined(__GNUC__) || defined(__GNUG__)
+using TestCascadeStackView = corsika::MakeView<TestCascadeStack>::type;
+#endif
diff --git a/Framework/StackInterface/testCombinedStack.cc b/tests/framework/testCombinedStack.cpp
similarity index 92%
rename from Framework/StackInterface/testCombinedStack.cc
rename to tests/framework/testCombinedStack.cpp
index 9e4d9274f256544a8ea12e0541a2f87b3d130955..43da9a9e78831249ca597c1ae1012c967b211016 100644
--- a/Framework/StackInterface/testCombinedStack.cc
+++ b/tests/framework/testCombinedStack.cpp
@@ -6,14 +6,15 @@
  * the license.
  */
 
-#define protected public // to also test the internal state of objects
+#include <corsika/framework/stack/CombinedStack.hpp>
+#include <corsika/framework/stack/SecondaryView.hpp>
+#include <corsika/framework/stack/Stack.hpp>
 
-#include <corsika/stack/CombinedStack.h>
-#include <corsika/stack/SecondaryView.h>
-#include <corsika/stack/Stack.h>
+#include <boost/type_index.hpp>
+#include <type_traits>
 
-#include <testTestStack.h> // for testing: simple stack. This is a
-// test-build, and inluce file is obtained from CMAKE_CURRENT_SOURCE_DIR
+#include <tests/framework/testTestStack.h> // for testing: simple stack. This is a
+using boost::typeindex::type_id_with_cvr;
 
 #include <iomanip>
 #include <vector>
@@ -21,7 +22,7 @@
 #include <catch2/catch.hpp>
 
 using namespace corsika;
-using namespace corsika::stack;
+using namespace corsika;
 using namespace std;
 
 ////////////////////////////////////////////////////////////
@@ -81,8 +82,8 @@ public:
 // combined stack: StackTest = (TestStackData + TestStackData2)
 template <typename StackIter>
 using CombinedTestInterfaceType =
-    corsika::stack::CombinedParticleInterface<TestParticleInterface,
-                                              TestParticleInterface2, StackIter>;
+    corsika::CombinedParticleInterface<TestParticleInterface, TestParticleInterface2,
+                                       StackIter>;
 
 using StackTest = CombinedStack<TestStackData, TestStackData2, CombinedTestInterfaceType>;
 
@@ -276,8 +277,8 @@ public:
 // combined stack
 template <typename StackIter>
 using CombinedTestInterfaceType2 =
-    corsika::stack::CombinedParticleInterface<StackTest::MPIType, TestParticleInterface3,
-                                              StackIter>;
+    corsika::CombinedParticleInterface<StackTest::PIType, TestParticleInterface3,
+                                       StackIter>;
 
 using StackTest2 = CombinedStack<typename StackTest::StackImpl, TestStackData3,
                                  CombinedTestInterfaceType2>;
@@ -362,8 +363,8 @@ TEST_CASE("Combined Stack - multi", "[stack]") {
  */
 template <typename StackIter>
 using CombinedTestInterfaceType2 =
-    corsika::stack::CombinedParticleInterface<StackTest::MPIType, TestParticleInterface3,
-                                              StackIter>;
+    corsika::CombinedParticleInterface<StackTest::PIType, TestParticleInterface3,
+                                       StackIter>;
 
 using StackTest2 = CombinedStack<typename StackTest::StackImpl, TestStackData3,
                                  CombinedTestInterfaceType2>;
@@ -372,7 +373,7 @@ using StackTest2 = CombinedStack<typename StackTest::StackImpl, TestStackData3,
 using StackTestView =
     SecondaryView<typename StackTest2::StackImpl, CombinedTestInterfaceType2>;
 #elif defined(__GNUC__) || defined(__GNUG__)
-using StackTestView = corsika::stack::MakeView<StackTest2>::type;
+using StackTestView = corsika::MakeView<StackTest2>::type;
 #endif
 
 using Particle2 = typename StackTest2::ParticleType;
diff --git a/Framework/Utilities/testCorsikaFenv.cc b/tests/framework/testCorsikaFenv.cpp
similarity index 52%
rename from Framework/Utilities/testCorsikaFenv.cc
rename to tests/framework/testCorsikaFenv.cpp
index ebfde1043070e84f9bf79b6f5c227b6f66686a6d..323c0fa18c02cff33f7fdfdc9aedfbf67c5345e1 100644
--- a/Framework/Utilities/testCorsikaFenv.cc
+++ b/tests/framework/testCorsikaFenv.cpp
@@ -6,21 +6,28 @@
  * the license.
  */
 
-#include <corsika/utl/CorsikaFenv.h>
+#include <catch2/catch.hpp>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 
 #include <cmath>
 #include <csignal>
 #include <iostream>
 
+int gRESULT = 1;
+
 extern "C" {
-static void handle_fpe(int /*signo*/) { exit(0); }
+static void handle_fpe(int /*signo*/) { gRESULT = 0; }
 }
 
-int main() {
+TEST_CASE("CorsikaFenv", "[fenv]") {
+
   feenableexcept(FE_ALL_EXCEPT);
   signal(SIGFPE, handle_fpe);
 
-  std::cout << std::log(0.) << std::endl;
+  SECTION("exception") {
 
-  exit(1);
-}
\ No newline at end of file
+    [[maybe_unused]] auto trigger = std::log(0.);
+    std::cout << "trigger: " << trigger << std::endl;
+    CHECK(gRESULT == 0);
+  }
+}
diff --git a/Framework/Geometry/testFourVector.cc b/tests/framework/testFourVector.cpp
similarity index 93%
rename from Framework/Geometry/testFourVector.cc
rename to tests/framework/testFourVector.cpp
index 4c169258290efe3220829027535ff329b6b4142b..6623eb7ca72434d7f32407231fb954dfb0b39036 100644
--- a/Framework/Geometry/testFourVector.cc
+++ b/tests/framework/testFourVector.cpp
@@ -8,14 +8,17 @@
 
 #include <catch2/catch.hpp>
 
-#include <corsika/geometry/CoordinateSystem.h>
-#include <corsika/geometry/FourVector.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
 #include <cmath>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
+#include <corsika/framework/geometry/FourVector.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
-using namespace corsika::geometry;
+#include <boost/type_index.hpp>
+using boost::typeindex::type_id_with_cvr;
+
+using namespace corsika;
 using namespace corsika::units::si;
 
 TEST_CASE("four vectors") {
diff --git a/Framework/Geometry/testGeometry.cc b/tests/framework/testGeometry.cpp
similarity index 93%
rename from Framework/Geometry/testGeometry.cc
rename to tests/framework/testGeometry.cpp
index b528bf1bf3d4d922092a0e517ba8dd1208184749..c6b0b68e3d8ab268cf32792f76d1a1cf236cf7b8 100644
--- a/Framework/Geometry/testGeometry.cc
+++ b/tests/framework/testGeometry.cpp
@@ -8,17 +8,17 @@
 
 #include <catch2/catch.hpp>
 
-#include <corsika/geometry/CoordinateSystem.h>
-#include <corsika/geometry/Helix.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Sphere.h>
-#include <corsika/geometry/Trajectory.h>
-#include <corsika/units/PhysicalUnits.h>
 #include <cmath>
-
-using namespace corsika::geometry;
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/CoordinateSystem.hpp>
+#include <corsika/framework/geometry/Helix.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Sphere.hpp>
+#include <corsika/framework/geometry/Trajectory.hpp>
+
+using namespace corsika;
 using namespace corsika::units::si;
 
 double constexpr absMargin = 1.0e-8;
@@ -27,8 +27,7 @@ TEST_CASE("transformations between CoordinateSystems") {
   CoordinateSystem& rootCS =
       RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
 
-  REQUIRE(CoordinateSystem::GetTransformation(rootCS, rootCS)
-              .isApprox(EigenTransform::Identity()));
+  REQUIRE(getTransformation(rootCS, rootCS).isApprox(EigenTransform::Identity()));
 
   QuantityVector<length_d> const coordinates{0_m, 0_m, 0_m};
   Point p1(rootCS, coordinates);
@@ -79,9 +78,9 @@ TEST_CASE("transformations between CoordinateSystems") {
 
     REQUIRE(cs4.GetReference()->GetReference() == &rootCS);
 
-    REQUIRE(CoordinateSystem::GetTransformation(cs3, cs2).isApprox(
+    REQUIRE(getTransformation(cs3, cs2).isApprox(
         rootCS.translate({3_m, -5_m, 0_m}).GetTransform()));
-    REQUIRE(CoordinateSystem::GetTransformation(cs2, cs3).isApprox(
+    REQUIRE(getTransformation(cs2, cs3).isApprox(
         rootCS.translate({-3_m, +5_m, 0_m}).GetTransform()));
   }
 
diff --git a/Framework/Logging/testLogging.cc b/tests/framework/testLogging.cpp
similarity index 98%
rename from Framework/Logging/testLogging.cc
rename to tests/framework/testLogging.cpp
index bf919058053a662873ec472c76330e5f16b6a1d2..505c96c240b07f2c76f4f0b563e8bbae1c96b2fa 100644
--- a/Framework/Logging/testLogging.cc
+++ b/tests/framework/testLogging.cpp
@@ -6,7 +6,7 @@
  * the license.
  */
 
-#include <corsika/logging/Logging.h>
+#include <corsika/framework/logging/Logger.h>
 
 #include <catch2/catch.hpp>
 
diff --git a/Framework/Particles/testParticles.cc b/tests/framework/testParticles.cpp
similarity index 97%
rename from Framework/Particles/testParticles.cc
rename to tests/framework/testParticles.cpp
index 8b3f7184c6b31d5b447dbdb173847cdfc0d080ae..9d13c2cac3bf0c130f94ef8ff7f70beef868d2ee 100644
--- a/Framework/Particles/testParticles.cc
+++ b/tests/framework/testParticles.cpp
@@ -6,14 +6,14 @@
  * the license.
  */
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <catch2/catch.hpp>
 
 using namespace corsika::units;
 using namespace corsika::units::si;
-using namespace corsika::particles;
+using namespace corsika;
 
 TEST_CASE("ParticleProperties", "[Particles]") {
 
diff --git a/Framework/ProcessSequence/testProcessSequence.cc b/tests/framework/testProcessSequence.cpp
similarity index 72%
rename from Framework/ProcessSequence/testProcessSequence.cc
rename to tests/framework/testProcessSequence.cpp
index 875cbc5821fe5e67da0ece3977f13446f2a0659a..f506d57014130a1ac37e99ec3cc99faeb1004923 100644
--- a/Framework/ProcessSequence/testProcessSequence.cc
+++ b/tests/framework/testProcessSequence.cpp
@@ -13,13 +13,12 @@
 #include <iostream>
 #include <typeinfo>
 
-#include <corsika/process/ProcessSequence.h>
-#include <corsika/process/SwitchProcessSequence.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/sequence/ProcessSequence.hpp>
+//#include <corsika/process/SwitchProcess.hpp>
 
 using namespace corsika;
 using namespace corsika::units::si;
-using namespace corsika::process;
+using namespace corsika;
 using namespace std;
 
 static const int nData = 10;
@@ -373,107 +372,14 @@ TEST_CASE("Process Sequence", "[Process Sequence]") {
   }
 }
 
-TEST_CASE("Switch Process Sequence", "[Process Sequence]") {
-
-  SECTION("Check construction") {
-
-    struct TestSelect {
-      corsika::process::SwitchResult operator()(const DummyData& p) const {
-        std::cout << "TestSelect data=" << p.data_[0] << std::endl;
-        if (p.data_[0] > 0) return corsika::process::SwitchResult::First;
-        return corsika::process::SwitchResult::Second;
-      }
-    };
-    TestSelect select;
-
-    auto sequence1 = process::sequence(Process1(0), ContinuousProcess2(0), Decay1(0));
-    auto sequence2 = process::sequence(ContinuousProcess3(0), Process2(0), Decay2(0));
-
-    auto sequence =
-        process::sequence(ContinuousProcess1(0), Process3(0),
-                          SwitchProcessSequence(sequence1, sequence2, select));
-
-    auto sequence_alt = process::sequence(
-        ContinuousProcess1(0), Process3(0),
-        process::select(process::sequence(Process1(0), ContinuousProcess2(0), Decay1(0)),
-                        process::sequence(ContinuousProcess3(0), Process2(0), Decay2(0)),
-                        select));
-
-    // check that same process sequence can be build in different ways
-    CHECK(typeid(sequence) == typeid(sequence_alt));
-    CHECK(is_process_sequence_v<decltype(sequence)> == true);
-    CHECK(is_process_sequence_v<decltype(
-              SwitchProcessSequence(sequence1, sequence2, select))> == true);
-
-    DummyData particle;
-    DummyTrajectory track;
-    DummyView view(particle);
-
-    checkDecay = 0;
-    checkInteract = 0;
-    checkSec = 0;
-    checkCont = 0;
-    particle.data_[0] = 100; // data positive
-    sequence.DoContinuous(particle, track);
-    CHECK(checkInteract == 0);
-    CHECK(checkDecay == 0);
-    CHECK(checkCont == 0b011);
-    CHECK(checkSec == 0);
-
-    checkDecay = 0;
-    checkInteract = 0;
-    checkSec = 0;
-    checkCont = 0;
-    particle.data_[0] = -100; // data negative
-    sequence_alt.DoContinuous(particle, track);
-    CHECK(checkInteract == 0);
-    CHECK(checkDecay == 0);
-    CHECK(checkCont == 0b101);
-    CHECK(checkSec == 0);
-
-    // 1/(30g/cm2) is Process3
-    corsika::units::si::InverseGrammageType lambda_select = .9 / 30. * square(1_cm) / 1_g;
-    corsika::units::si::InverseTimeType time_select = 0.1 / second;
-
-    checkDecay = 0;
-    checkInteract = 0;
-    checkSec = 0;
-    checkCont = 0;
-    particle.data_[0] = 100; // data positive
-    sequence.SelectInteraction(view, lambda_select);
-    sequence.SelectDecay(view, time_select);
-    CHECK(checkInteract == 0b100); // this is Process3
-    CHECK(checkDecay == 0b001);    // this is Decay1
-    CHECK(checkCont == 0);
-    CHECK(checkSec == 0);
-    lambda_select = 1.01 / 30. * square(1_cm) / 1_g;
-    checkInteract = 0;
-    sequence.SelectInteraction(view, lambda_select);
-    CHECK(checkInteract == 0b001); // this is Process1
-
-    checkDecay = 0;
-    checkInteract = 0;
-    checkSec = 0;
-    checkCont = 0;
-    particle.data_[0] = -100; // data negative
-    sequence.SelectInteraction(view, lambda_select);
-    sequence.SelectDecay(view, time_select);
-    CHECK(checkInteract == 0b010); // this is Process2
-    CHECK(checkDecay == 0b010);    // this is Decay2
-    CHECK(checkCont == 0);
-    CHECK(checkSec == 0);
-
-    checkDecay = 0;
-    checkInteract = 0;
-    checkSec = 0;
-    checkCont = 0;
-    particle.data_[0] = -100; // data negative
-    sequence.DoSecondaries(view);
-    Stack1 stack(0);
-    sequence.DoStack(stack);
-    CHECK(checkInteract == 0);
-    CHECK(checkDecay == 0);
-    CHECK(checkCont == 0);
-    CHECK(checkSec == 0);
-  }
-}
+/*
+  Note: there is a fine-grained dedicated test-suite for SwitchProcess
+  in Processes/SwitchProcess/testSwtichProcess
+ */
+/*
+TEST_CASE("SwitchProcess") {
+  Process1 p1(0);
+  Process2 p2(0);
+  switch_process::SwitchProcess s(p1, p2, 10_GeV);
+  REQUIRE(is_switch_process_v<decltype(s)>);
+  }*/
diff --git a/Framework/Random/testRandom.cc b/tests/framework/testRandom.cpp
similarity index 57%
rename from Framework/Random/testRandom.cc
rename to tests/framework/testRandom.cpp
index d9053f74d63b49a39e24470c052b97970f573b02..5a8bcb0f52b678c23974c919a671a6cdf594849a 100644
--- a/Framework/Random/testRandom.cc
+++ b/tests/framework/testRandom.cpp
@@ -1,6 +1,8 @@
 /*
  * (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.
@@ -8,46 +10,33 @@
 
 #include <catch2/catch.hpp>
 
-#include <corsika/random/ExponentialDistribution.h>
-#include <corsika/random/RNGManager.h>
-#include <corsika/random/UniformRealDistribution.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/random/ExponentialDistribution.hpp>
+#include <corsika/framework/random/RNGManager.hpp>
+#include <corsika/framework/random/UniformRealDistribution.hpp>
 #include <iostream>
 #include <limits>
 #include <random>
+#include <type_traits>
 
-using namespace corsika::random;
+using namespace corsika;
 
 SCENARIO("random-number streams can be registered and retrieved") {
   GIVEN("a RNGManager") {
     RNGManager& rngManager = RNGManager::GetInstance();
 
-    WHEN("the sequence name is not registered") {
-      REQUIRE(rngManager.IsRegistered("stream_A") == false);
-
-      THEN("a sequence is registered by name") {
-        rngManager.RegisterRandomStream("stream_A");
-
-        THEN("the sequence can be retrieved") {
-          REQUIRE_NOTHROW(rngManager.GetRandomStream("stream_A"));
-
-          THEN("we can check that the sequence exists") {
-            REQUIRE_NOTHROW(rngManager.GetRandomStream("stream_A"));
+    WHEN("a sequence is registered by name") {
+      rngManager.RegisterRandomStream("stream_A");
 
-            THEN("an unknown sequence cannot be retrieved") {
-              REQUIRE(rngManager.IsRegistered("stream_A") == true);
-
-              THEN("an unknown sequence cannot be retrieved") {
-                REQUIRE_THROWS(rngManager.GetRandomStream("stream_UNKNOWN"));
+      THEN("the sequence can be retrieved") {
+        REQUIRE_NOTHROW(rngManager.GetRandomStream("stream_A"));
+      }
 
-                THEN("an unknown sequence is not registered") {
-                  REQUIRE(rngManager.IsRegistered("stream_UNKNOWN") == false);
-                }
-              }
-            }
-          }
-        }
+      THEN("an unknown sequence cannot be retrieved") {
+        REQUIRE_THROWS(rngManager.GetRandomStream("stream_UNKNOWN"));
       }
+
+      // seeding not covered yet
     }
   }
 }
@@ -56,10 +45,10 @@ TEST_CASE("UniformRealDistribution") {
   using namespace corsika::units::si;
   std::mt19937 rng;
 
-  corsika::random::UniformRealDistribution<LengthType> dist(1_m, 2_m);
+  corsika::UniformRealDistribution<LengthType> dist(1_m, 2_m);
 
   SECTION("range") {
-    corsika::random::UniformRealDistribution<LengthType> dist(1_m, 2_m);
+    corsika::UniformRealDistribution<LengthType> dist(1_m, 2_m);
 
     LengthType min =
         +1_m * std::numeric_limits<typename LengthType::value_type>::infinity();
@@ -77,7 +66,7 @@ TEST_CASE("UniformRealDistribution") {
   }
 
   SECTION("range") {
-    corsika::random::UniformRealDistribution<LengthType> dist(18_cm);
+    corsika::UniformRealDistribution<LengthType> dist(18_cm);
 
     LengthType min =
         +1_m * std::numeric_limits<typename LengthType::value_type>::infinity();
@@ -101,7 +90,7 @@ TEST_CASE("ExponentialDistribution") {
 
   auto const beta = 15_m;
 
-  corsika::random::ExponentialDistribution dist(beta);
+  corsika::ExponentialDistribution dist(beta);
 
   SECTION("mean") {
     std::remove_const<decltype(beta)>::type mean = beta * 0;
diff --git a/Framework/StackInterface/testSecondaryView.cc b/tests/framework/testSecondaryView.cpp
similarity index 95%
rename from Framework/StackInterface/testSecondaryView.cc
rename to tests/framework/testSecondaryView.cpp
index 9cd1e46667e08696e81bc44d25d79b6a634500d3..ab8f1a85dc3c5dd62c4f6349668d3e247627d5df 100644
--- a/Framework/StackInterface/testSecondaryView.cc
+++ b/tests/framework/testSecondaryView.cpp
@@ -6,13 +6,14 @@
  * the license.
  */
 
-#define protected public // to also test the internal state of objects
+#include <corsika/framework/stack/SecondaryView.hpp>
+#include <corsika/framework/stack/Stack.hpp>
 
-#include <corsika/stack/SecondaryView.h>
-#include <corsika/stack/Stack.h>
+#include <boost/type_index.hpp>
+#include <type_traits>
 
-#include <testTestStack.h> // for testing: simple stack. This is a
-// test-build, and inluce file is obtained from CMAKE_CURRENT_SOURCE_DIR
+#include <tests/framework/testTestStack.h> // for testing: simple stack. This is a
+using boost::typeindex::type_id_with_cvr;
 
 #include <iomanip>
 #include <vector>
@@ -20,7 +21,7 @@
 #include <catch2/catch.hpp>
 
 using namespace corsika;
-using namespace corsika::stack;
+using namespace corsika;
 using namespace std;
 
 typedef Stack<TestStackData, TestParticleInterface> StackTest;
diff --git a/Framework/StackInterface/testStackInterface.cc b/tests/framework/testStackInterface.cpp
similarity index 94%
rename from Framework/StackInterface/testStackInterface.cc
rename to tests/framework/testStackInterface.cpp
index af1f217ad361f8b4fa41c62da12b156a205e1c76..5e34a0560d813e8f35f7fa4dfa74e61e313f0f64 100644
--- a/Framework/StackInterface/testStackInterface.cc
+++ b/tests/framework/testStackInterface.cpp
@@ -6,13 +6,13 @@
  * the license.
  */
 
-#define protected public // to also test the internal state of objects
+#include <corsika/framework/stack/Stack.hpp>
 
-#include <corsika/stack/Stack.h>
+#include <boost/type_index.hpp>
+#include <type_traits>
 
-#include <testTestStack.h> // simple test-stack for testing. This is
-                           // for testing only: include from
-                           // CMAKE_CURRENT_SOURCE_DIR
+#include <tests/framework/testTestStack.h> // simple test-stack for testing. This is
+using boost::typeindex::type_id_with_cvr;
 
 #include <iomanip>
 #include <tuple>
@@ -21,7 +21,7 @@
 #include <catch2/catch.hpp>
 
 using namespace corsika;
-using namespace corsika::stack;
+using namespace corsika;
 using namespace std;
 
 typedef Stack<TestStackData, TestParticleInterface> StackTest;
diff --git a/Framework/StackInterface/testTestStack.h b/tests/framework/testTestStack.h
similarity index 89%
rename from Framework/StackInterface/testTestStack.h
rename to tests/framework/testTestStack.h
index 9765dda8b5cf449844ff0e44a6b922007d8f0cb2..9aaa63320bace8b506969df71b90e3a41873b230 100644
--- a/Framework/StackInterface/testTestStack.h
+++ b/tests/framework/testTestStack.h
@@ -1,4 +1,4 @@
-/*
+n/*
  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
  *
  * This software is distributed under the terms of the GNU General Public
@@ -8,7 +8,7 @@
 
 #pragma once
 
-#include <corsika/stack/Stack.h>
+#include <corsika/framework/stack/Stack.hpp>
 #include <tuple>
 #include <vector>
 
@@ -59,12 +59,11 @@ private:
  *
  */
 template <typename StackIteratorInterface>
-class TestParticleInterface
-    : public corsika::stack::ParticleBase<StackIteratorInterface> {
+class TestParticleInterface : public corsika::ParticleBase<StackIteratorInterface> {
 
 public:
-  using corsika::stack::ParticleBase<StackIteratorInterface>::GetStackData;
-  using corsika::stack::ParticleBase<StackIteratorInterface>::GetIndex;
+  using corsika::ParticleBase<StackIteratorInterface>::GetStackData;
+  using corsika::ParticleBase<StackIteratorInterface>::GetIndex;
 
   /*
      The SetParticleData methods are called for creating new entries
diff --git a/Framework/Units/testUnits.cc b/tests/framework/testUnits.cpp
similarity index 98%
rename from Framework/Units/testUnits.cc
rename to tests/framework/testUnits.cpp
index bae1ce1d7123d82c9878bc4a4bbd319f33ce9912..1bd307bde802beb52aa3f207f0975a12f2573b66 100644
--- a/Framework/Units/testUnits.cc
+++ b/tests/framework/testUnits.cpp
@@ -8,7 +8,7 @@
 
 #include <catch2/catch.hpp>
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <array>
 #include <sstream>
diff --git a/tests/media/CMakeLists.txt b/tests/media/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..25e0d35d356bdbd2dec49bcb273871cb9053d8a3
--- /dev/null
+++ b/tests/media/CMakeLists.txt
@@ -0,0 +1,26 @@
+
+set (sources
+  TestMain.cpp
+  testEnvironment.cpp
+  )
+
+
+add_executable (testEnvironment ${sources})
+
+target_link_libraries (testEnvironment CORSIKA8 Catch2)
+
+target_compile_options (testEnvironment PRIVATE -g) # do not skip asserts
+
+target_include_directories (testEnvironment PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+
+file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test_outputs/)
+
+if (CORSIKA_SANITIZERS_ENABLED)
+  # -O1 is suggested in clang docs to get reasonable performance
+  target_compile_options (${name} PRIVATE -O1 -fno-omit-frame-pointer -fsanitize=${sanitize} -fno-sanitize-recover=all)
+  set_target_properties (${name} PROPERTIES LINK_FLAGS "-fsanitize=${sanitize}")
+endif ()
+
+add_test (
+  NAME testEnvironment
+  COMMAND testEnvironment -o ${PROJECT_BINARY_DIR}/test_outputs/junit-media.xml -s -r junit)
diff --git a/tests/media/TestMain.cpp b/tests/media/TestMain.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..da6f2c3f1a0f72b5af0d49771b908c57e6b51d3b
--- /dev/null
+++ b/tests/media/TestMain.cpp
@@ -0,0 +1,13 @@
+/*
+ * (c) Copyright 2019 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.
+ */
+
+#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
+                          // cpp file
+#include <catch2/catch.hpp>
diff --git a/Environment/testEnvironment.cc b/tests/media/testEnvironment.cpp
similarity index 91%
rename from Environment/testEnvironment.cc
rename to tests/media/testEnvironment.cpp
index eecae62928a54b4876a164389c5d84626c93cef0..bce84c8811aebe247bbaa90ce1abc5d8f86aa309 100644
--- a/Environment/testEnvironment.cc
+++ b/tests/media/testEnvironment.cpp
@@ -6,37 +6,28 @@
  * the license.
  */
 
-#include <corsika/environment/DensityFunction.h>
-#include <corsika/environment/FlatExponential.h>
-#include <corsika/environment/HomogeneousMedium.h>
-#include <corsika/environment/IMagneticFieldModel.h>
-#include <corsika/environment/IMediumModel.h>
-#include <corsika/environment/IMediumPropertyModel.h>
-#include <corsika/environment/IRefractiveIndexModel.h>
-#include <corsika/environment/InhomogeneousMedium.h>
-#include <corsika/environment/LayeredSphericalAtmosphereBuilder.h>
-#include <corsika/environment/LinearApproximationIntegrator.h>
-#include <corsika/environment/MediumPropertyModel.h>
-#include <corsika/environment/NuclearComposition.h>
-#include <corsika/environment/SlidingPlanarExponential.h>
-#include <corsika/environment/UniformMagneticField.h>
-#include <corsika/environment/UniformRefractiveIndex.h>
-#include <corsika/environment/VolumeTreeNode.h>
-#include <corsika/geometry/Line.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Line.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/media/DensityFunction.hpp>
+#include <corsika/media/FlatExponential.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/IMediumModel.hpp>
+#include <corsika/media/InhomogeneousMedium.hpp>
+#include <corsika/media/LayeredSphericalAtmosphereBuilder.hpp>
+#include <corsika/media/LinearApproximationIntegrator.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+#include <corsika/media/SlidingPlanarExponential.hpp>
+#include <corsika/media/VolumeTreeNode.hpp>
 
 #include <corsika/setup/SetupTrajectory.h>
 
 #include <catch2/catch.hpp>
 
-using namespace corsika::geometry;
-using namespace corsika::environment;
-using namespace corsika::particles;
-using namespace corsika::units::si;
 using namespace corsika;
+using namespace corsika::units::si;
 
 CoordinateSystem const& gCS =
     RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
@@ -142,7 +133,7 @@ TEST_CASE("SlidingPlanarExponential") {
 auto constexpr rho0 = 1_kg / 1_m / 1_m / 1_m;
 
 struct Exponential {
-  auto operator()(corsika::geometry::Point const& p) const {
+  auto operator()(corsika::Point const& p) const {
     return exp(p.GetCoordinates()[0] / 1_m) * rho0;
   }
 
@@ -203,13 +194,8 @@ TEST_CASE("InhomogeneousMedium") {
 }
 
 TEST_CASE("LayeredSphericalAtmosphereBuilder") {
-
-  LayeredSphericalAtmosphereBuilder builder =
-      environment::make_layered_spherical_atmosphere_builder<>::create(
-          gOrigin, units::constants::EarthRadius::Mean);
-
-  builder.setNuclearComposition(
-      {{{particles::Code::Nitrogen, particles::Code::Oxygen}}, {{.6, .4}}});
+  LayeredSphericalAtmosphereBuilder builder(gOrigin);
+  builder.setNuclearComposition({{{Code::Nitrogen, Code::Oxygen}}, {{.6, .4}}});
 
   builder.addLinearLayer(1_km, 10_km);
   builder.addLinearLayer(2_km, 20_km);
diff --git a/tests/modules/CMakeLists.txt b/tests/modules/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f4c2fea50aeeea3e3e8d54bcb295f89a2287a19e
--- /dev/null
+++ b/tests/modules/CMakeLists.txt
@@ -0,0 +1,26 @@
+
+set (test_modules_sources
+  TestMain.cpp
+  testSibyll.cpp
+  )
+
+
+add_executable (testModules ${test_modules_sources})
+
+target_link_libraries (testModules CORSIKA8 Sibyll_static Catch2)
+
+target_compile_options (testModules PRIVATE -g) # do not skip asserts
+
+target_include_directories (testModules PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+
+file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test_outputs/)
+
+if (CORSIKA_SANITIZERS_ENABLED)
+  # -O1 is suggested in clang docs to get reasonable performance
+  target_compile_options (${name} PRIVATE -O1 -fno-omit-frame-pointer -fsanitize=${sanitize} -fno-sanitize-recover=all)
+  set_target_properties (${name} PROPERTIES LINK_FLAGS "-fsanitize=${sanitize}")
+endif ()
+
+add_test (
+  NAME testModules
+  COMMAND testModules -o ${PROJECT_BINARY_DIR}/test_outputs/junit-modules.xml -s -r junit)
diff --git a/tests/modules/TestMain.cpp b/tests/modules/TestMain.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..da6f2c3f1a0f72b5af0d49771b908c57e6b51d3b
--- /dev/null
+++ b/tests/modules/TestMain.cpp
@@ -0,0 +1,13 @@
+/*
+ * (c) Copyright 2019 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.
+ */
+
+#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
+                          // cpp file
+#include <catch2/catch.hpp>
diff --git a/tests/modules/testSibyll.cpp b/tests/modules/testSibyll.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0fbb7dffd71518633810d47ba381dcc9bd1610ea
--- /dev/null
+++ b/tests/modules/testSibyll.cpp
@@ -0,0 +1,191 @@
+/*
+ * (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/modules/sibyll/Decay.hpp>
+#include <corsika/modules/sibyll/Interaction.hpp>
+#include <corsika/modules/sibyll/NuclearInteraction.hpp>
+#include <corsika/modules/sibyll/ParticleConversion.hpp>
+#include <corsika/modules/sibyll/Random.hpp>
+
+#include <corsika/framework/random/RNGManager.hpp>
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+
+#include <catch2/catch.hpp>
+#include <tuple>
+
+using namespace corsika;
+using namespace corsika::sibyll;
+
+TEST_CASE("Sibyll", "[processes]") {
+
+  SECTION("Sibyll -> Corsika") {
+    REQUIRE(Electron::GetCode() ==
+            corsika::sibyll::ConvertFromSibyll(corsika::sibyll::SibyllCode::Electron));
+  }
+
+  SECTION("Corsika -> Sibyll") {
+    REQUIRE(corsika::sibyll::ConvertToSibyll(Electron::GetCode()) ==
+            corsika::sibyll::SibyllCode::Electron);
+    REQUIRE(corsika::sibyll::ConvertToSibyllRaw(Proton::GetCode()) == 13);
+  }
+
+  SECTION("canInteractInSibyll") {
+
+    REQUIRE(corsika::sibyll::CanInteract(Proton::GetCode()));
+    REQUIRE(corsika::sibyll::CanInteract(Code::XiCPlus));
+
+    REQUIRE_FALSE(corsika::sibyll::CanInteract(Electron::GetCode()));
+    REQUIRE_FALSE(corsika::sibyll::CanInteract(SigmaC0::GetCode()));
+
+    REQUIRE_FALSE(corsika::sibyll::CanInteract(Nucleus::GetCode()));
+    REQUIRE_FALSE(corsika::sibyll::CanInteract(Helium::GetCode()));
+  }
+
+  SECTION("cross-section type") {
+
+    REQUIRE(corsika::sibyll::GetSibyllXSCode(Code::Electron) == 0);
+    REQUIRE(corsika::sibyll::GetSibyllXSCode(Code::K0Long) == 3);
+    REQUIRE(corsika::sibyll::GetSibyllXSCode(Code::SigmaPlus) == 1);
+    REQUIRE(corsika::sibyll::GetSibyllXSCode(Code::PiMinus) == 2);
+  }
+}
+
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
+
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/NuclearComposition.hpp>
+
+#include <sibyll2.3d.hpp>
+
+using namespace corsika::units::si;
+using namespace corsika::units;
+
+TEST_CASE("SibyllInterface", "[processes]") {
+
+  // setup environment, geometry
+  corsika::Environment<corsika::IMediumModel> env;
+  auto& universe = *(env.GetUniverse());
+
+  auto theMedium =
+      corsika::Environment<corsika::IMediumModel>::CreateNode<corsika::Sphere>(
+          corsika::Point{env.GetCoordinateSystem(), 0_m, 0_m, 0_m},
+          1_km * std::numeric_limits<double>::infinity());
+
+  using MyHomogeneousModel = corsika::HomogeneousMedium<corsika::IMediumModel>;
+  theMedium->SetModelProperties<MyHomogeneousModel>(
+      1_kg / (1_m * 1_m * 1_m),
+      corsika::NuclearComposition(std::vector<Code>{Code::Oxygen},
+                                  std::vector<float>{1.}));
+
+  auto const* nodePtr = theMedium.get();
+  universe.AddChild(std::move(theMedium));
+
+  const corsika::CoordinateSystem& cs = env.GetCoordinateSystem();
+
+  corsika::RNGManager::GetInstance().RegisterRandomStream("s_rndm");
+
+  SECTION("InteractionInterface") {
+
+    corsika::setup::Stack stack;
+    const HEPEnergyType E0 = 100_GeV;
+    HEPMomentumType P0 = sqrt(E0 * E0 - Proton::GetMass() * Proton::GetMass());
+    auto plab = corsika::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    corsika::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(
+        std::tuple<Code, corsika::units::si::HEPEnergyType, corsika::MomentumVector,
+                   corsika::Point, corsika::units::si::TimeType>{Code::Proton, E0, plab,
+                                                                 pos, 0_ns});
+    particle.SetNode(nodePtr);
+    corsika::SecondaryView view(particle);
+    auto projectile = view.GetProjectile();
+
+    Interaction model;
+
+    model.Init();
+    [[maybe_unused]] const corsika::EProcessReturn ret = model.DoInteraction(projectile);
+    [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle);
+  }
+
+  SECTION("NuclearInteractionInterface") {
+
+    setup::Stack stack;
+    const HEPEnergyType E0 = 400_GeV;
+    HEPMomentumType P0 = sqrt(E0 * E0 - Proton::GetMass() * Proton::GetMass());
+    auto plab = corsika::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    corsika::Point pos(cs, 0_m, 0_m, 0_m);
+
+    auto particle = stack.AddParticle(
+        std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                   corsika::Point, units::si::TimeType, unsigned short, unsigned short>{
+            Code::Nucleus, E0, plab, pos, 0_ns, 4, 2});
+    particle.SetNode(nodePtr);
+    corsika::SecondaryView view(particle);
+    auto projectile = view.GetProjectile();
+
+    Interaction hmodel;
+    NuclearInteraction model(hmodel, env);
+
+    model.Init();
+    [[maybe_unused]] const corsika::EProcessReturn ret = model.DoInteraction(projectile);
+    [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle);
+  }
+
+  SECTION("DecayInterface") {
+
+    setup::Stack stack;
+    const HEPEnergyType E0 = 10_GeV;
+    HEPMomentumType P0 = sqrt(E0 * E0 - Proton::GetMass() * Proton::GetMass());
+    auto plab = corsika::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    corsika::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle = stack.AddParticle(
+        std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                   corsika::Point, units::si::TimeType>{Code::Lambda0, E0, plab, pos,
+                                                        0_ns});
+    corsika::SecondaryView view(particle);
+    auto projectile = view.GetProjectile();
+
+    Decay model;
+
+    model.Init();
+    /*[[maybe_unused]] const corsika::EProcessReturn ret =*/model.DoDecay(projectile);
+    // run checks
+    [[maybe_unused]] const TimeType time = model.GetLifetime(particle);
+  }
+
+  SECTION("DecayConfiguration") {
+
+    Decay model;
+
+    const std::vector<Code> particleTestList = {Code::PiPlus, Code::PiMinus,
+                                                Code::KPlus,  Code::Lambda0Bar,
+                                                Code::NuE,    Code::D0Bar};
+
+    for (auto& pCode : particleTestList) {
+      model.SetUnstable(pCode);
+      // get state of sibyll internal config
+      REQUIRE(0 <= s_csydec_.idb[abs(corsika::sibyll::ConvertToSibyllRaw(pCode)) - 1]);
+
+      model.SetStable(pCode);
+      // get state of sibyll internal config
+      REQUIRE(0 >= s_csydec_.idb[abs(corsika::sibyll::ConvertToSibyllRaw(pCode)) - 1]);
+    }
+  }
+}
diff --git a/tests/processes/TrackingLine/testTrackingLineStack.h b/tests/processes/TrackingLine/testTrackingLineStack.h
new file mode 100644
index 0000000000000000000000000000000000000000..96998fe6ec0e5183729bcd09796ff9b4f7ba1677
--- /dev/null
+++ b/tests/processes/TrackingLine/testTrackingLineStack.h
@@ -0,0 +1,34 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <corsika/media/Environment.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/setup/SetupStack.hpp>
+
+using TestEnvironmentType =
+    corsika::environment::Environment<corsika::environment::Empty>;
+
+template <typename T>
+using SetupGeometryDataInterface =
+    corsika::stack::node::GeometryDataInterface<T, TestEnvironmentType>;
+
+// combine particle data stack with geometry information for tracking
+template <typename StackIter>
+using StackWithGeometryInterface = corsika::CombinedParticleInterface<
+    corsika::detail::ParticleDataStack::PIType, SetupGeometryDataInterface,
+    StackIter>;
+using TestTrackingLineStack = corsika::CombinedStack<
+    typename corsika::detail::ParticleDataStack::StackImpl,
+    GeometryData<TestEnvironmentType>, StackWithGeometryInterface>;
+
+
diff --git a/Processes/NullModel/testNullModel.cc b/tests/processes/testNullModel.cc
similarity index 64%
rename from Processes/NullModel/testNullModel.cc
rename to tests/processes/testNullModel.cc
index cc142637f1a6517873cf9207107192117e35e2f0..853361352819cb59506562578b0ea0c434974770 100644
--- a/Processes/NullModel/testNullModel.cc
+++ b/tests/processes/testNullModel.cc
@@ -8,19 +8,19 @@
 
 #include <catch2/catch.hpp>
 
-#include <corsika/process/null_model/NullModel.h>
+#include <corsika/process/NullModel.hpp>
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
 
 using namespace corsika::units::si;
-using namespace corsika::process::null_model;
+using namespace corsika::null_model;
 using namespace corsika;
 
 TEST_CASE("NullModel", "[processes]") {
@@ -41,6 +41,13 @@ TEST_CASE("NullModel", "[processes]") {
   geometry::Line line(origin, v);
   geometry::Trajectory<geometry::Line> track(line, 10_s);
 
+  setup::Stack stack;
+  setup::Stack::ParticleType particle = stack.AddParticle(
+      std::tuple<particles::Code, units::si::HEPEnergyType,
+                 corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+          particles::Code::Electron, 100_GeV,
+          corsika::MomentumVector(dummyCS, {0_GeV, 0_GeV, -1_GeV}),
+          geometry::Point(dummyCS, {0_m, 0_m, 10_km}), 0_ns});
   SECTION("interface") {
 
     NullModel model(10_m);
diff --git a/Processes/ObservationPlane/testObservationPlane.cc b/tests/processes/testObservationPlane.cc
similarity index 70%
rename from Processes/ObservationPlane/testObservationPlane.cc
rename to tests/processes/testObservationPlane.cc
index ddaaaad96e4795df9cb2695fde09a3de24e0c069..243d091ce1165fcc060a07bf30de9d1f0f273bb8 100644
--- a/Processes/ObservationPlane/testObservationPlane.cc
+++ b/tests/processes/testObservationPlane.cc
@@ -10,23 +10,23 @@
                           // cpp file
 #include <catch2/catch.hpp>
 
-#include <corsika/process/observation_plane/ObservationPlane.h>
+#include <corsika/process/ObservationPlane.hpp>
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <corsika/setup/SetupStack.h>
 #include <corsika/setup/SetupTrajectory.h>
 
 using namespace corsika::units::si;
-using namespace corsika::process::observation_plane;
+using namespace corsika::observation_plane;
+using namespace corsika;
+using namespace corsika;
 using namespace corsika;
-using namespace corsika::geometry;
-using namespace corsika::particles;
 
 TEST_CASE("ContinuousProcess interface", "[proccesses][observation_plane]") {
 
@@ -50,10 +50,24 @@ TEST_CASE("ContinuousProcess interface", "[proccesses][observation_plane]") {
   Vector<units::si::SpeedType::dimension_type> vec(cs, 0_m / second, 0_m / second,
                                                    -units::constants::c);
   Line line(start, vec);
-  setup::Trajectory track =
-      setup::testing::make_track<setup::Trajectory>(line, 12_m / units::constants::c);
-
-  particle.SetPosition(Point(cs, {1_m, 1_m, 10_m})); // moving already along -z
+  Trajectory<Line> track(line, 12_m / units::constants::c);
+
+  // setup particle stack, and add primary particle
+  setup::Stack stack;
+  stack.Clear();
+  {
+    auto elab2plab = [](HEPEnergyType Elab, HEPMassType m) {
+      return sqrt((Elab - m) * (Elab + m));
+    };
+    stack.AddParticle(
+        std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector, Point,
+                   units::si::TimeType>{
+            Code::NuMu, 1_GeV,
+            corsika::MomentumVector(
+                rootCS, {0_GeV, 0_GeV, -elab2plab(1_GeV, NuMu::GetMass())}),
+            Point(rootCS, {1_m, 1_m, 10_m}), 0_ns});
+  }
+  auto particle = stack.GetNextParticle();
 
   SECTION("horizontal plane") {
 
diff --git a/Processes/ParticleCut/testParticleCut.cc b/tests/processes/testParticleCut.cc
similarity index 75%
rename from Processes/ParticleCut/testParticleCut.cc
rename to tests/processes/testParticleCut.cc
index c2343f76373acc2712f553e2803dd4ea10e02644..7385a82b55973c026872aadc217439c5433fe3aa 100644
--- a/Processes/ParticleCut/testParticleCut.cc
+++ b/tests/processes/testParticleCut.cc
@@ -6,22 +6,20 @@
  * the license.
  */
 
-#include <corsika/process/particle_cut/ParticleCut.h>
+#include <corsika/process/ParticleCut.hpp>
 
-#include <corsika/environment/Environment.h>
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
-#include <corsika/units/PhysicalUnits.h>
-#include <corsika/utl/CorsikaFenv.h>
-
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/utility/CorsikaFenv.hpp>
 
 #include <catch2/catch.hpp>
+#include <corsika/setup/SetupStack.hpp>
 
 using namespace corsika;
-using namespace corsika::process::particle_cut;
+using namespace corsika::particle_cut;
 using namespace corsika::units;
 using namespace corsika::units::si;
 
@@ -56,24 +54,23 @@ TEST_CASE("ParticleCut", "[processes]") {
     // add primary particle to stack
     auto particle = stack.AddParticle(
         std::tuple<particles::Code, units::si::HEPEnergyType,
-                   corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{
+                   corsika::MomentumVector, geometry::Point, units::si::TimeType>{
             particles::Code::Proton, Eabove,
-            corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), point0, 0_ns});
+            corsika::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}),
+            geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns});
     // view on secondary particles
-    setup::StackView view(particle);
+    corsika::SecondaryView view(particle);
     // ref. to primary particle through the secondary view.
     // only this way the secondary view is populated
     auto projectile = view.GetProjectile();
     // add secondaries, all with energies above the threshold
     // only cut is by species
     for (auto proType : particleList)
-      projectile.AddSecondary(std::make_tuple(
-          proType, Eabove, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}),
-          point0, 0_ns));
-    CHECK(view.getEntries() == 11);
-    CHECK(stack.getEntries() == 12);
-
-    cut.DoSecondaries(view);
+      projectile.AddSecondary(std::tuple<particles::Code, units::si::HEPEnergyType,
+                                         corsika::MomentumVector, geometry::Point,
+                                         units::si::TimeType>{
+          proType, Eabove, corsika::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}),
+          geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns});
 
     CHECK(view.getEntries() == 9);
     CHECK(cut.GetNumberInvParticles() == 2);
@@ -111,30 +108,25 @@ TEST_CASE("ParticleCut", "[processes]") {
     ParticleCut cut(20_GeV, true, true);
 
     // add primary particle to stack
-    auto particle = stack.AddParticle(std::make_tuple(
-        particles::Code::Proton, Eabove,
-        corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), point0, 0_ns));
+    auto particle = stack.AddParticle(
+        std::tuple<particles::Code, units::si::HEPEnergyType,
+                   corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+            particles::Code::Proton, Eabove,
+            corsika::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}),
+            geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns});
     // view on secondary particles
-    setup::StackView view{particle};
+    corsika::SecondaryView view(particle);
     // ref. to primary particle through the secondary view.
     // only this way the secondary view is populated
     auto projectile = view.GetProjectile();
     // add secondaries, all with energies below the threshold
     // only cut is by species
     for (auto proType : particleList)
-      projectile.AddSecondary(std::make_tuple(
-          proType, Ebelow, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}),
-          point0, 0_ns));
-    unsigned short A = 18;
-    unsigned short Z = 8;
-    projectile.AddSecondary(
-        std::make_tuple(particles::Code::Nucleus, Eabove * A,
-                        corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}),
-                        point0, 0_ns, A, Z));
-    projectile.AddSecondary(
-        std::make_tuple(particles::Code::Nucleus, Ebelow * A,
-                        corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}),
-                        point0, 0_ns, A, Z));
+      projectile.AddSecondary(std::tuple<particles::Code, units::si::HEPEnergyType,
+                                         corsika::MomentumVector, geometry::Point,
+                                         units::si::TimeType>{
+          proType, Ebelow, corsika::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}),
+          geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns});
 
     cut.DoSecondaries(view);
 
diff --git a/Processes/QGSJetII/testQGSJetII.cc b/tests/processes/testQGSJetII.cc
similarity index 63%
rename from Processes/QGSJetII/testQGSJetII.cc
rename to tests/processes/testQGSJetII.cc
index 84dad94cfea6e61825e98cedcf4bc9081cc62f38..ca203d3f9c555591d7846e0378b7c8a4b67a71a3 100644
--- a/Processes/QGSJetII/testQGSJetII.cc
+++ b/tests/processes/testQGSJetII.cc
@@ -6,15 +6,14 @@
  * the license.
  */
 
-#include <corsika/process/qgsjetII/Interaction.h>
-#include <corsika/process/qgsjetII/ParticleConversion.h>
+#include <corsika/process/QGSJetII.hpp>
 
-#include <corsika/random/RNGManager.h>
+#include <corsika/framework/random/RNGManager.hpp>
 
-#include <corsika/particles/ParticleProperties.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
 
-#include <corsika/geometry/Point.h>
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
 #include <catch2/catch.hpp>
 
@@ -23,42 +22,7 @@
 #include <iostream>
 
 using namespace corsika;
-using namespace corsika::process::qgsjetII;
-using namespace corsika::units::si;
-
-template <typename TStackView>
-auto sumCharge(TStackView const& view) {
-  int totalCharge = 0;
-
-  for (auto const& p : view) { totalCharge += particles::GetChargeNumber(p.GetPID()); }
-
-  return totalCharge;
-}
-
-template <typename TStackView>
-auto sumMomentum(TStackView const& view, geometry::CoordinateSystem const& vCS) {
-  geometry::Vector<hepenergy_d> sum{vCS, 0_eV, 0_eV, 0_eV};
-
-  for (auto const& p : view) { sum += p.GetMomentum(); }
-
-  return sum;
-}
-
-TEST_CASE("CORSIKA_DATA", "[processes]") {
-
-  SECTION("check CORSIKA_DATA") {
-
-    const char* data = std::getenv("CORSIKA_DATA");
-    // these REQUIRES are needed:
-    REQUIRE(data != 0);
-    REQUIRE(std::experimental::filesystem::is_directory(
-        std::experimental::filesystem::path(std::string(data) + "/QGSJetII")));
-    std::cout << "data: " << data << " isDir: "
-              << std::experimental::filesystem::is_directory(std::string(data) +
-                                                             "/QGSJetII")
-              << std::endl;
-  }
-}
+using namespace corsika::qgsjetII;
 
 TEST_CASE("QgsjetII", "[processes]") {
 
@@ -103,16 +67,19 @@ TEST_CASE("QgsjetII", "[processes]") {
   }
 }
 
-#include <corsika/geometry/Point.h>
-#include <corsika/geometry/RootCoordinateSystem.h>
-#include <corsika/geometry/Vector.h>
+#include <corsika/framework/geometry/Point.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+#include <corsika/framework/geometry/Vector.hpp>
+
+#include <corsika/framework/core/PhysicalUnits.hpp>
 
-#include <corsika/units/PhysicalUnits.h>
+#include <corsika/framework/core/ParticleProperties.hpp>
+#include <corsika/setup/SetupStack.hpp>
+#include <corsika/setup/SetupTrajectory.hpp>
 
-#include <corsika/particles/ParticleProperties.h>
-#include <corsika/setup/SetupEnvironment.h>
-#include <corsika/setup/SetupStack.h>
-#include <corsika/setup/SetupTrajectory.h>
+#include <corsika/media/Environment.hpp>
+#include <corsika/media/HomogeneousMedium.hpp>
+#include <corsika/media/NuclearComposition.hpp>
 
 using namespace corsika::units::si;
 using namespace corsika::units;
@@ -128,12 +95,23 @@ TEST_CASE("QgsjetIIInterface", "[processes]") {
 
   SECTION("InteractionInterface") {
 
-    auto [stackPtr, secViewPtr] = setup::testing::setupStack(particles::Code::Proton, 0,
-                                                             0, 110_GeV, nodePtr, *csPtr);
-    setup::StackView& view = *(secViewPtr.get());
-    auto particle = stackPtr->first();
-    auto projectile = secViewPtr->GetProjectile();
-    auto const projectileMomentum = projectile.GetMomentum();
+    setup::Stack stack;
+    const HEPEnergyType E0 = 100_GeV;
+    HEPMomentumType P0 =
+        sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass());
+    auto plab = corsika::MomentumVector(cs, {0_GeV, 0_GeV, -P0});
+    geometry::Point pos(cs, 0_m, 0_m, 0_m);
+    auto particle =
+        stack.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType,
+                                     corsika::MomentumVector, geometry::Point,
+                                     units::si::TimeType, unsigned int, unsigned int>{
+            particles::Code::Nucleus, E0, plab, pos, 0_ns, 16, 8});
+    // corsika::MomentumVector, geometry::Point, units::si::TimeType>{
+    //	  particles::Code::PiPlus, E0, plab, pos, 0_ns});
+
+    particle.SetNode(nodePtr);
+    corsika::SecondaryView view(particle);
+    auto projectile = view.GetProjectile();
 
     Interaction model;
 
diff --git a/tests/stack/CMakeLists.txt b/tests/stack/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..70045765c7e2cfdca38aca805c472e8363a465e0
--- /dev/null
+++ b/tests/stack/CMakeLists.txt
@@ -0,0 +1,28 @@
+
+set (sources
+  TestMain.cpp
+  testSuperStupidStack.cpp
+  testNuclearStackExtension.cpp
+  )
+
+
+add_executable (testStack ${sources})
+
+target_link_libraries (testStack CORSIKA8 Catch2)
+
+target_compile_options (testStack PRIVATE -g) # do not skip asserts
+
+target_include_directories (testStack PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+
+file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test_outputs/)
+
+if (CORSIKA_SANITIZERS_ENABLED)
+  # -O1 is suggested in clang docs to get reasonable performance
+  target_compile_options (${name} PRIVATE -O1 -fno-omit-frame-pointer -fsanitize=${sanitize} -fno-sanitize-recover=all)
+  set_target_properties (${name} PROPERTIES LINK_FLAGS "-fsanitize=${sanitize}")
+endif ()
+
+add_test (
+  NAME testStack
+  COMMAND testStack -o ${PROJECT_BINARY_DIR}/test_outputs/junit-${name}.xml -s -r junit
+  )
diff --git a/tests/stack/TestMain.cpp b/tests/stack/TestMain.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..da6f2c3f1a0f72b5af0d49771b908c57e6b51d3b
--- /dev/null
+++ b/tests/stack/TestMain.cpp
@@ -0,0 +1,13 @@
+/*
+ * (c) Copyright 2019 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.
+ */
+
+#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
+                          // cpp file
+#include <catch2/catch.hpp>
diff --git a/tests/stack/testNuclearStackExtension.cpp b/tests/stack/testNuclearStackExtension.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ba09fded063f29fae5126e9d8add29724ef0b0c5
--- /dev/null
+++ b/tests/stack/testNuclearStackExtension.cpp
@@ -0,0 +1,262 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/NuclearStackExtension.h>
+#include <corsika/stack/SuperStupidStack.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+
+using namespace corsika;
+using namespace corsika::nuclear_extension;
+using namespace corsika;
+using namespace corsika::units::si;
+
+#include <catch2/catch.hpp>
+
+// 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::nuclear_extension::NuclearParticleInterface<
+        corsika::super_stupid::SuperStupidStack::template PIType, StackIter>;
+
+using ExtStack = NuclearStackExtension<corsika::super_stupid::SuperStupidStack,
+                                       ExtendedParticleInterfaceType>;
+
+#include <iostream>
+using namespace std;
+
+TEST_CASE("NuclearStackExtension", "[stack]") {
+
+  CoordinateSystem& dummyCS =
+      RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+  SECTION("write non nucleus") {
+    NuclearStackExtension<corsika::super_stupid::SuperStupidStack,
+                          ExtendedParticleInterfaceType>
+        s;
+    s.AddParticle(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                             Point, units::si::TimeType>{
+        Code::Electron, 1.5_GeV, corsika::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::super_stupid::SuperStupidStack,
+                          ExtendedParticleInterfaceType>
+        s;
+    s.AddParticle(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                             Point, units::si::TimeType, unsigned short, unsigned short>{
+        Code::Nucleus, 1.5_GeV, corsika::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(
+        std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector, Point,
+                   units::si::TimeType, unsigned short, unsigned short>{
+            Code::Nucleus, 1.5_GeV,
+            corsika::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(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                             Point, units::si::TimeType>{
+        Code::Electron, 1.5_GeV, corsika::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() == Code::Electron);
+    REQUIRE(pout.GetEnergy() == 1.5_GeV);
+    REQUIRE(pout.GetTime() == 100_s);
+  }
+
+  SECTION("read nucleus") {
+    ExtStack s;
+    s.AddParticle(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                             Point, units::si::TimeType, unsigned short, unsigned short>{
+        Code::Nucleus, 1.5_GeV, corsika::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() == 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(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                             Point, units::si::TimeType>{
+        Code::Electron, 1.5_GeV, corsika::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s});
+    const auto pout = s.GetNextParticle();
+    CHECK_THROWS(pout.GetNuclearA());
+    CHECK_THROWS(pout.GetNuclearZ());
+  }
+
+  SECTION("stack fill and cleanup") {
+
+    ParticleDataStack 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(
+            std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector, Point,
+                       units::si::TimeType, unsigned short, unsigned short>{
+                Code::Nucleus, 1.5_GeV,
+                corsika::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2});
+      } else {
+        s.AddParticle(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                                 Point, units::si::TimeType>{
+            Code::Electron, 1.5_GeV,
+            corsika::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+            Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s});
+      }
+    }
+
+    CHECK(s.getEntries() == 99);
+    for (int i = 0; i < 99; ++i) s.GetNextParticle().Delete();
+    CHECK(s.getEntries() == 0);
+  }
+
+  SECTION("stack operations") {
+
+    ParticleDataStack s;
+    // add 99 particles, each 10th particle is a nucleus with A=i and Z=A/2!
+    // i=9, 19, 29, etc. are nuclei
+    for (int i = 0; i < 99; ++i) {
+      if ((i + 1) % 10 == 0) {
+        s.AddParticle(
+            std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector, Point,
+                       units::si::TimeType, unsigned short, unsigned short>{
+                Code::Nucleus, i * 15_GeV,
+                corsika::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2});
+      } else {
+        s.AddParticle(std::tuple<Code, units::si::HEPEnergyType, corsika::MomentumVector,
+                                 Point, units::si::TimeType>{
+            Code::Electron, i * 1.5_GeV,
+            corsika::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() == 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() == 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() == Code::Electron);
+      REQUIRE(p9.GetEnergy() == 93 * 1.5_GeV);
+      REQUIRE(p9.GetTime() == 100_s);
+
+      REQUIRE(p93.GetPID() == 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() == 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() == 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() == 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() == 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.last().Delete();
+    CHECK(s.getEntries() == 0);
+  }
+
+  SECTION("not allowed") {
+    NuclearStackExtension<corsika::stack::super_stupid::SuperStupidStack,
+                          ExtendedParticleInterfaceType>
+        s;
+
+    // not valid:
+    CHECK_THROWS(s.AddParticle(std::make_tuple(
+        particles::Code::Oxygen, 1.5_GeV,
+        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 16, 8)));
+
+    // valid
+    auto particle = s.AddParticle(
+        std::make_tuple(particles::Code::Nucleus, 1.5_GeV,
+                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 9));
+
+    // not valid
+    CHECK_THROWS(particle.AddSecondary(std::make_tuple(
+        particles::Code::Oxygen, 1.5_GeV,
+        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 16, 8)));
+
+    // add a another nucleus, so there are two now
+    s.AddParticle(
+        std::make_tuple(particles::Code::Nucleus, 1.5_GeV,
+                        corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+                        Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 9));
+
+    // not valid, since end() is not a valid entry
+    CHECK_THROWS(s.Swap(s.begin(), s.end()));
+  }
+}
diff --git a/tests/stack/testSuperStupidStack.cpp b/tests/stack/testSuperStupidStack.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b566d952ec56cfb0a3c9fbf89daad02f67d75a4a
--- /dev/null
+++ b/tests/stack/testSuperStupidStack.cpp
@@ -0,0 +1,68 @@
+/*
+ * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * 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/SuperStupidStack.h>
+#include <corsika/framework/core/PhysicalUnits.hpp>
+#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
+
+using namespace corsika;
+using namespace corsika::units::si;
+
+#include <catch2/catch.hpp>
+
+using namespace corsika;
+using namespace corsika::super_stupid;
+
+using namespace std;
+
+TEST_CASE("SuperStupidStack", "[stack]") {
+
+  CoordinateSystem& dummyCS =
+      RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+
+  SECTION("read+write") {
+
+    SuperStupidStack s;
+    s.AddParticle(
+        std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                   corsika::MomentumVector, corsika::Point, corsika::units::si::TimeType>{
+            Code::Electron, 1.5_GeV,
+            corsika::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+            Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s});
+
+    // read
+    CHECK(s.getEntries() == 1);
+    CHECK(s.getSize() == 1);
+    auto pout = s.GetNextParticle();
+    REQUIRE(pout.GetPID() == Code::Electron);
+    REQUIRE(pout.GetEnergy() == 1.5_GeV);
+    // REQUIRE(pout.GetMomentum() == stack::MomentumVector(dummyCS, {1_GeV,
+    // 1_GeV, 1_GeV})); REQUIRE(pout.GetPosition() == Point(dummyCS, {1 * meter, 1 *
+    // meter, 1 * meter}));
+    REQUIRE(pout.GetTime() == 100_s);
+  }
+
+  SECTION("write+delete") {
+
+    SuperStupidStack s;
+    for (int i = 0; i < 99; ++i)
+      s.AddParticle(std::tuple<corsika::Code, corsika::units::si::HEPEnergyType,
+                               corsika::MomentumVector, corsika::Point,
+                               corsika::units::si::TimeType>{
+          Code::Electron, 1.5_GeV,
+          corsika::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}),
+          Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s});
+
+    CHECK(s.getSize() == 99);
+
+    for (int i = 0; i < 99; ++i) s.GetNextParticle().Delete();
+
+    CHECK(s.getEntries() == 0);
+    CHECK(s.getSize() == 1);
+  }
+}
diff --git a/Tools/plot_crossings.sh b/tools/plot_crossings.sh
similarity index 100%
rename from Tools/plot_crossings.sh
rename to tools/plot_crossings.sh
diff --git a/Tools/plot_tracks.sh b/tools/plot_tracks.sh
similarity index 100%
rename from Tools/plot_tracks.sh
rename to tools/plot_tracks.sh