diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt
index 310f08b6dd7ea0703ffb6bd902d961fe9788fa1c..495fc32db4da0997b4bf8c2a760ba5b0e74c3028 100644
--- a/DDG4/CMakeLists.txt
+++ b/DDG4/CMakeLists.txt
@@ -16,7 +16,7 @@ include_directories(${CMAKE_SOURCE_DIR}/DDCore/include
                     ${CMAKE_CURRENT_SOURCE_DIR}/include 
                     ${ROOT_INCLUDE_DIR}
                     ${CLHEP_INCLUDE_DIR}
-                    ${Geant4_INCLUDE_DIRS})
+                    ${Geant4_INCLUDE_DIRS} ${LCIO_DIR}/include )
 
 #---Add Library-------------------------------------------------------------------
 if(DD4HEP_USE_BOOST)
@@ -31,14 +31,44 @@ if(NOT DD4HEP_USE_XERCESC)
   list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/src/Geant4XML.cpp)
 endif()
 
+#---------------------------  Main geant4 interface library (no plugins!)-----------
 add_library(DD4hepG4 SHARED ${sources})
 target_link_libraries(DD4hepG4 DD4hepCore ${ROOT_LIBRARIES} Reflex ${Geant4_LIBRARIES})
-
 SET_TARGET_PROPERTIES( DD4hepG4 PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
+# No rootmap for link libraries!
+
+#---------------------------  Legacy libraries (for Frank) -------------------------
+file(GLOB legacy_sources legacy/*.cpp)
+add_library(DD4hepG4Legacy SHARED ${legacy_sources})
+target_link_libraries(DD4hepG4Legacy DD4hepCore DD4hepG4 ${ROOT_LIBRARIES} Reflex ${Geant4_LIBRARIES})
+
+SET_TARGET_PROPERTIES(DD4hepG4Legacy PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
+if(APPLE)
+  dd4hep_generate_rootmap_apple(DD4hepG4Legacy)
+else()
+  dd4hep_generate_rootmap(DD4hepG4Legacy)
+endif()
+
+#---------------------------  New Plugin library for new simulation framework  -----
+file(GLOB plugins_sources plugins/*.cpp)
+add_library(DD4hepG4Plugins SHARED ${plugins_sources})
+target_link_libraries(DD4hepG4Plugins DD4hepCore DD4hepG4 ${ROOT_LIBRARIES} Reflex ${Geant4_LIBRARIES})
+
+SET_TARGET_PROPERTIES(DD4hepG4Plugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
 if(APPLE)
-  dd4hep_generate_rootmap_apple(DD4hepG4)
+  dd4hep_generate_rootmap_apple(DD4hepG4Plugins)
 else()
-  dd4hep_generate_rootmap(DD4hepG4)
+  dd4hep_generate_rootmap(DD4hepG4Plugins)
+endif()
+
+#---------------------------  LCIO Plugins for new simulation framework  -----------
+if(LCIO_DIR)
+  list(APPEND include_directories ${LCIO_DIR}/include)
+  file(GLOB lcio_sources lcio/*.cpp)
+  add_library(DD4hepG4LCIO SHARED ${lcio_sources})
+  target_link_libraries(DD4hepG4LCIO DD4hepCore DD4hepG4 ${Geant4_LIBRARIES} -L${LCIO_DIR}/lib -llcio ${ROOT_LIBRARIES} Reflex)
+  SET_TARGET_PROPERTIES(DD4hepG4LCIO PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
+  dd4hep_generate_rootmap(DD4hepG4LCIO)
 endif()
 
 #-----------------------------------------------------------------------------------
diff --git a/DDG4/examples/dictionaries.C b/DDG4/examples/dictionaries.C
new file mode 100644
index 0000000000000000000000000000000000000000..8be7edf5a70d2c3727c0e4db04ac1845e6a23dae
--- /dev/null
+++ b/DDG4/examples/dictionaries.C
@@ -0,0 +1,42 @@
+// $Id: Geant4Data.h 513 2013-04-05 14:31:53Z gaede $
+//====================================================================
+//  AIDA Detector description implementation
+//--------------------------------------------------------------------
+//
+//  Define the ROOT dictionaries for all data classes to be saved 
+//  which are created by the DDG4 examples.
+//
+//  Author     : M.Frank
+//
+//====================================================================
+// FRamework include files
+#include "DDG4/Geant4Data.h"
+#include <vector>
+
+using namespace std;
+using namespace DD4hep;
+using namespace DD4hep::Simulation;
+
+// CINT configuration
+#if defined(__MAKECINT__)
+//#pragma link C++ class Position+;
+//#pragma link C++ class Direction+;
+#pragma link C++ class SimpleRun+;
+#pragma link C++ class SimpleEvent+;
+//#pragma link C++ class SimpleEvent::Seeds+;
+#pragma link C++ class SimpleHit+;
+#pragma link C++ class std::vector<SimpleHit*>+;
+#pragma link C++ class SimpleHit::Contribution+;
+#pragma link C++ class SimpleHit::Contributions+;
+#pragma link C++ class SimpleTracker+;
+#pragma link C++ class SimpleTracker::Hit+;
+#pragma link C++ class std::vector<SimpleTracker::Hit*>+;
+#pragma link C++ class SimpleCalorimeter+;
+#pragma link C++ class SimpleCalorimeter::Hit+;
+#pragma link C++ class std::vector<SimpleCalorimeter::Hit*>+;
+//#pragma link C++ class ;
+#endif
+
+int dictionaries()  {
+  return 0;
+}
diff --git a/DDG4/examples/initAClick.C b/DDG4/examples/initAClick.C
index 44fb3ed015493b020331360dbb603b71f4d24d88..2226c8463945f8c693094f9af2a8adc4d06f60ec 100644
--- a/DDG4/examples/initAClick.C
+++ b/DDG4/examples/initAClick.C
@@ -3,17 +3,23 @@
 #include <string>
 
 using namespace std;
+string make_str(const char* data)  {
+  cout << "make_str:  '" << (data ? data : "Bad-Pointer") << "'" << endl;
+  return string(data);
+}
 
 void init()  {
-  string base = gSystem->Getenv("SW");
-  string inc = " -I"+base+"/DD4hep/DD4hep.trunk/";
+  string g4_base = make_str(gSystem->Getenv("Geant4_DIR"));
+  string base    = make_str(gSystem->Getenv("SW"));
+  string inc     = " -I"+make_str(gSystem->Getenv("DD4hep_DIR"))+"/../DD4hep.trunk/";
   gSystem->AddIncludePath((inc + "DDSegmentation/include ").c_str());
   gSystem->AddIncludePath((inc + "DDCore/include ").c_str());
   gSystem->AddIncludePath((inc + "DDG4/include ").c_str());
-  gSystem->AddIncludePath((" -I" + base + "/geant4/include/Geant4 -Wno-shadow -g -O0 ").c_str());
-  string lib = " -L"+base+"/";
-  gSystem->AddLinkedLibs((lib+"geant4/lib -lG4event -lG4tracking -lG4particles ").c_str());
-  gSystem->AddLinkedLibs((lib+"DD4hep/build/lib -lDD4hepCore -lDD4hepG4 -lDDSegmentation ").c_str());
+  gSystem->AddIncludePath((" -I" + g4_base + "/include/Geant4 -Wno-shadow -g -O0 ").c_str());
+  string g4_libs = " -L"+g4_base+"/lib -L"+g4_base+"/lib64";
+  string libs = " -L"+make_str(gSystem->Getenv("DD4hep_DIR"))+"/lib";
+  gSystem->AddLinkedLibs((libs+" -lDD4hepCore -lDD4hepG4 -lDDSegmentation ").c_str());
+  gSystem->AddLinkedLibs((g4_libs+" -lG4event -lG4tracking -lG4particles ").c_str());
   cout << "Includes:   " << gSystem->GetIncludePath() << endl;
   cout << "Linked libs:" << gSystem->GetLinkedLibs()  << endl;
 }
diff --git a/DDG4/examples/physics.xml b/DDG4/examples/physics.xml
index 098ba7340d6d993250f5ec1883eaf5b69bbedf4f..0aa910f4dc73feb8099a78ad44bbb37587805075 100644
--- a/DDG4/examples/physics.xml
+++ b/DDG4/examples/physics.xml
@@ -8,12 +8,13 @@
   --   	ordDefault = 1000,	// default ordering parameter
   --   	ordLast    = 9999 	// ordering parameter to indicate the last DoIt
   -->
-  <!--
+
   <sequences>
-    <sequence name="Geant4PhysicsListSequence/PhysicsList" transportation="true" decays="true"/>
+    <sequence name="Geant4PhysicsListSequence/PhysicsList"/>
   </sequences>
 
   <physicslist name="Geant4PhysicsList/MyPhysics.0">
+    <extends name="QGSP_BERT"/>
     <particles>
       <construct name="G4Geantino"/>
       <construct name="G4ChargedGeantino"/>
@@ -24,6 +25,18 @@
       <construct name="G4MesonConstructor"/>
       <construct name="G4BaryonConstructor"/>
     </particles>
+  </physicslist>
+<!--
+  <sequences>
+  // No transportation nor decays if you are already extending an existing physics list!
+    <sequence name="Geant4PhysicsListSequence/PhysicsList" transportation="true" decays="true" extends="QGSP_BERT"/>
+  </sequences>
+-->
+  <!--
+
+
+  <physicslist name="Geant4PhysicsList/MyPhysics.0">
+
 
     <physics>
       <construct name="G4EmStandardPhysics"/>
diff --git a/DDG4/examples/run.C b/DDG4/examples/run.C
new file mode 100644
index 0000000000000000000000000000000000000000..d32535fc4174a45e51450b2b8aed6b5013259bdb
--- /dev/null
+++ b/DDG4/examples/run.C
@@ -0,0 +1,7 @@
+#include "TInterpreter.h"
+void run()  {
+  gInterpreter->ProcessLine(".X initAClick.C");
+  gInterpreter->ProcessLine(".L dictionaries.C+");
+  gInterpreter->ProcessLine(".L xmlAClick.C+");
+}
+
diff --git a/DDG4/examples/sequences.xml b/DDG4/examples/sequences.xml
index 868360e00ae8b625ce3248841f8dd9238d008bd6..d5b003dc8ff3e3e68369c122f7524b2a2957c4d8 100644
--- a/DDG4/examples/sequences.xml
+++ b/DDG4/examples/sequences.xml
@@ -83,6 +83,12 @@
 		    Property_string="'Hello_1'"/>
       </action>
       <action name="UserEvent_2"/>
+      <action name="Geant4Output2ROOT/RootOutput">
+	<properties Output="simple.root"/>
+      </action>
+      <action name="Geant4Output2LCIO/LCIOOutput">
+	<properties Output="simple_lcio"/>
+      </action>
     </sequence>
     <sequence name="Geant4GeneratorActionSequence/GeneratorAction">
       <action name="Geant4ParticleGun/Gun">
diff --git a/DDG4/examples/xmlAClick.C b/DDG4/examples/xmlAClick.C
index 9ed4153de34c27e30083be531f4ab5268a48c8c1..f5f9b9398c678918d8b14affc6ae7fa6cb1cc5ea 100644
--- a/DDG4/examples/xmlAClick.C
+++ b/DDG4/examples/xmlAClick.C
@@ -6,9 +6,9 @@ void setupG4_XML()  {
   DD4hep::Geometry::LCDD& lcdd = DD4hep::Geometry::LCDD::getInstance();
   Kernel& kernel = Kernel::instance(lcdd);
   kernel.loadGeometry("file:../DD4hep.trunk/DDExamples/CLICSiD/compact/compact.xml");
-  kernel.loadXML("../geant4/sensitive_detectors.xml");
-  kernel.loadXML("../geant4/sequences.xml");
-  kernel.loadXML("../geant4/physics.xml");
+  kernel.loadXML("sensitive_detectors.xml");
+  kernel.loadXML("sequences.xml");
+  kernel.loadXML("physics.xml");
   kernel.configure();
   kernel.initialize();
   kernel.run();
diff --git a/DDG4/include/DDG4/ComponentProperties.h b/DDG4/include/DDG4/ComponentProperties.h
new file mode 100644
index 0000000000000000000000000000000000000000..2635475752e094ddcd127b2cb3f3916709a2eb9e
--- /dev/null
+++ b/DDG4/include/DDG4/ComponentProperties.h
@@ -0,0 +1,213 @@
+// $Id: Geant4Hits.h 513 2013-04-05 14:31:53Z gaede $
+//====================================================================
+//  AIDA Detector description implementation
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#ifndef DD4HEP_DDG4_COMPONENTPROPERTIES_H
+#define DD4HEP_DDG4_COMPONENTPROPERTIES_H
+
+// Framework include files
+#include "DDG4/ComponentUtils.h"
+
+// C/C++ include files
+#include <algorithm>
+#include <stdexcept>
+#include <typeinfo>
+#include <string>
+#include <map>
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  struct Property;
+  struct PropertyGrammar;
+  struct PropertyConfigurator {
+  protected:
+    virtual ~PropertyConfigurator();
+  public:
+    virtual void set(const PropertyGrammar& setter, const std::string&, const std::string&, void* ptr) const = 0;
+  };
+
+  /** @class PropertyGrammar
+   *
+   *   @author  M.Frank
+   *   @date    13.08.2013
+   */
+  struct PropertyGrammar {
+  protected:
+    friend class Property;
+
+    /// Default constructor
+    PropertyGrammar();
+    /// Default destructor
+    virtual ~PropertyGrammar();
+    /// Error callback on invalid conversion
+    static void invalidConversion(const std::type_info& from, const std::type_info& to);
+    /// Access to the type information
+    virtual const std::type_info& type() const = 0;
+    /// Serialize an opaque value to a string
+    virtual std::string str(const void* ptr) const = 0;
+    /// Set value from serialized string. On successful data conversion TRUE is returned.
+    virtual bool fromString(void* ptr, const std::string& value) const = 0;
+  };
+
+  /** @class Property
+   *
+   *   Standard implementation of a property mechanism.
+   *   The data conversion mechanism between various properties
+   *   uses internally boost::spirit to allow also conversions
+   *   between types, which are initially unrelated such as
+   *   e.g. vector<int> and list<short>.
+   *
+   *   @author  M.Frank
+   *   @date    13.08.2013
+   */
+  class Property {
+  protected:
+    /// Pointer to the data location
+    void* m_par;
+    const PropertyGrammar* m_hdl;
+
+    /// Setup property
+    template <typename TYPE> void make(TYPE& value);
+  public:
+    /// Default constructor
+    Property();
+    /// Copy constructor
+    Property(const Property& p);
+    /// User constructor
+    template <typename TYPE> Property(TYPE& val)
+        : m_par(0), m_hdl(0) {
+      make(val);
+    }
+    /// Property type name
+    static std::string type(const Property& proptery);
+    /// Property type name
+    static std::string type(const std::type_info& proptery);
+    /// Property type name
+    std::string type() const;
+    /// Access void data pointer
+    void* ptr() const {
+      return m_par;
+    }
+    /// Access grammar object
+    const PropertyGrammar& grammar() const;
+    /// Conversion to string value
+    std::string str() const;
+    /// Conversion from string value
+    Property& str(const std::string& input);
+    /// Assignment operator
+    Property& operator=(const Property& p);
+    /// Assignment operator / set new balue
+    Property& operator=(const char* val);
+    /// Assignment operator / set new balue
+    //Property& operator=(const std::string& val);
+    /// Assignment operator / set new balue
+    template <typename TYPE> Property& operator=(const TYPE& val);
+    /// Retrieve value
+    template <typename TYPE> TYPE value() const;
+    /// Retrieve value from stack (large values e.g. vectors etc.)
+    template <typename TYPE> void value(TYPE& value) const;
+    /// Set value of this property
+    template <typename TYPE> void set(const TYPE& value);
+  };
+
+  /** @class PropertyValue
+   *
+   *   @author  M.Frank
+   *   @date    13.08.2013
+   */
+  template <class TYPE> class PropertyValue : private Property {
+  public:
+    TYPE data;
+    PropertyValue()
+        : Property(data) {
+    }
+    /// Assignment operator
+    PropertyValue& operator=(const TYPE& val) {
+      data = val;
+      return *this;
+    }
+    // Equality operator
+    bool operator==(const TYPE& val) const {
+      return val == data;
+    }
+    /// Access grammar object
+    const PropertyGrammar& grammar() const {
+      return this->Property::grammar();
+    }
+    /// Conversion to string value
+    std::string str() const {
+      return this->Property::str();
+    }
+    /// Retrieve value with data conversion
+    template <typename T> T value() const {
+      return this->Property::value<T>();
+    }
+    /// Retrieve value from stack with data conversion (large values e.g. vectors etc.)
+    template <typename T> void value(TYPE& val) const {
+      this->Property::value(val);
+    }
+    /// Set value of this property with data conversion
+    template <typename T> void set(const T& val) {
+      this->Property::set(val);
+    }
+  };
+
+  /** @class PropertyManager
+   *
+   *   @author  M.Frank
+   *   @date    13.08.2013
+   */
+  class PropertyManager {
+  public:
+    /// Property array definition
+    typedef std::map<std::string, Property> Properties;
+  protected:
+    /// Property array/map
+    Properties m_properties;
+
+    /// Verify that this property does not exist (throw exception if the name was found)
+    void verifyNonExistence(const std::string& name) const;
+    /// Verify that this property exists (throw exception if the name was not found)
+    Properties::iterator verifyExistence(const std::string& name);
+    /// Verify that this property exists (throw exception if the name was not found)
+    Properties::const_iterator verifyExistence(const std::string& name) const;
+
+  public:
+    /// Default constructor
+    PropertyManager();
+    /// Default destructor
+    virtual ~PropertyManager();
+    /// Access property by name (CONST)
+    const Property& property(const std::string& name) const;
+    /// Access property by name
+    Property& property(const std::string& name);
+    /// Access property by name
+    Property& operator[](const std::string& name);
+    /// Access property by name
+    const Property& operator[](const std::string& name) const;
+    /// Add a new property
+    void add(const std::string& name, const Property& property);
+    /// Add a new property
+    template <typename T> void add(const std::string& name, T& value) {
+      add(name, Property(value));
+    }
+    /// Bulk set of all properties
+    void set(const std::string& component_name, PropertyConfigurator& setup);
+    /// Apply functor on properties
+    template <typename FUNCTOR> void for_each(FUNCTOR& func) {
+      std::for_each(m_properties.begin(), m_properties.end(), func);
+    }
+    /// Dump string values
+    void dump() const;
+  };
+
+}      // End namespace DD4hep
+
+#endif // DD4HEP_DDG4_COMPONENTPROPERTIES_H
diff --git a/DDG4/include/DDG4/ComponentUtils_inl.h b/DDG4/include/DDG4/ComponentProperties_inl.h
similarity index 71%
rename from DDG4/include/DDG4/ComponentUtils_inl.h
rename to DDG4/include/DDG4/ComponentProperties_inl.h
index 93f36cbf63c11ff31faefc680184f383de252176..be54521fd90de9de113a4f950badf34ef39503c8 100644
--- a/DDG4/include/DDG4/ComponentUtils_inl.h
+++ b/DDG4/include/DDG4/ComponentProperties_inl.h
@@ -6,11 +6,11 @@
 //  Author     : M.Frank
 //
 //====================================================================
-#ifndef DD4HEP_DDG4_COMPONENTTUILS_INL_H
-#define DD4HEP_DDG4_COMPONENTTUILS_INL_H
+#ifndef DD4HEP_DDG4_COMPONENTPROPERTIES_INL_H
+#define DD4HEP_DDG4_COMPONENTPROPERTIES_INL_H
 
 // Framework include files
-#include "DDG4/ComponentUtils.h"
+#include "DDG4/ComponentProperties.h"
 
 #ifdef DD4HEP_USE_BOOST
 #include "DDG4/Parsers.h"
@@ -52,21 +52,21 @@ namespace DD4hep {
   };
 
   /// Standarsd constructor
-  template <typename TYPE> Grammar<TYPE>::Grammar()  {
+  template <typename TYPE> Grammar<TYPE>::Grammar() {
   }
 
   /// Default destructor
-  template <typename TYPE> Grammar<TYPE>::~Grammar()  {
+  template <typename TYPE> Grammar<TYPE>::~Grammar() {
   }
 
   /// Access concrete Grammar object
-  template <class TYPE> const Grammar<TYPE>& Grammar<TYPE>::instance()  {
+  template <class TYPE> const Grammar<TYPE>& Grammar<TYPE>::instance() {
     static Grammar<TYPE> s;
     return s;
   }
 
   /// PropertyGrammar overload: Access to the type information
-  template <typename TYPE> const std::type_info& Grammar<TYPE>::type() const { 
+  template <typename TYPE> const std::type_info& Grammar<TYPE>::type() const {
     return typeid(TYPE);
   }
   /// PropertyGrammar overload: Retrieve value from string
@@ -74,66 +74,68 @@ namespace DD4hep {
 #ifdef DD4HEP_USE_BOOST
     TYPE temp;
     int sc = Parsers::parse(temp,str);
-    std::cout << "Converting value: " << str << " to type " << typeid(TYPE).name() << std::endl;
-    if ( sc )  {
+    //std::cout << "Converting value: " << str << " to type " << typeid(TYPE).name() << std::endl;
+    if ( sc ) {
       *(TYPE*)ptr = temp;
       return true;
     }
     return false;
 #else
-    if ( !ptr || str.length() == 0 )  {}
+    if (!ptr || str.length() == 0) {
+    }
     throw std::runtime_error("This version of DD4HEP is not compiled to use boost::spirit.\n"
-			     "To enable elaborated property handling set DD4HEP_USE_BOOST=ON\n"
-			     "and BOOST_INCLUDE_DIR=<boost include path>");
+        "To enable elaborated property handling set DD4HEP_USE_BOOST=ON\n"
+        "and BOOST_INCLUDE_DIR=<boost include path>");
 #endif
   }
 
   /// Serialize a property to a string
-  template <typename TYPE> std::string Grammar<TYPE>::str(const void* ptr) const   {
+  template <typename TYPE> std::string Grammar<TYPE>::str(const void* ptr) const {
 #ifdef DD4HEP_USE_BOOST
     std::stringstream string_rep;
     Utils::toStream(*(TYPE*)ptr,string_rep);
     return string_rep.str();
 #else
-    if ( ptr ) {}
+    if (ptr) {
+    }
     throw std::runtime_error("This version of DD4HEP is not compiled to use boost::spirit.\n"
-			     "To enable elaborated property handling set DD4HEP_USE_BOOST=ON\n"
-			     "and BOOST_INCLUDE_DIR=<boost include path>");
+        "To enable elaborated property handling set DD4HEP_USE_BOOST=ON\n"
+        "and BOOST_INCLUDE_DIR=<boost include path>");
 #endif
   }
 
   /// Setup property
-  template <typename TYPE> void Property::make(TYPE& val)  {
-    m_hdl = &Grammar<TYPE>::instance();
+  template <typename TYPE> void Property::make(TYPE& val) {
+    m_hdl = &Grammar < TYPE > ::instance();
     m_par = &val;
   }
-  
+
   /// Set value of this property
-  template <typename TYPE> void Property::set(const TYPE& value)  {
+  template <typename TYPE> void Property::set(const TYPE& value) {
     const PropertyGrammar& g = grammar();
-    if ( g.type() == typeid(TYPE) )
-      *(TYPE*)m_par = value;
-    else if ( !g.fromString(m_par,Grammar<TYPE>::instance().str(&value)) )
-      PropertyGrammar::invalidConversion(typeid(TYPE),g.type());
+    if (g.type() == typeid(TYPE))
+      *(TYPE*) m_par = value;
+    else if (!g.fromString(m_par, Grammar < TYPE > ::instance().str(&value)))
+      PropertyGrammar::invalidConversion(typeid(TYPE), g.type());
   }
 
   /// Assignment operator / set new balue
-  template <typename TYPE> Property& Property::operator=(const TYPE& val)   {
+  template <typename TYPE> Property& Property::operator=(const TYPE& val) {
     this->set(val);
     return *this;
   }
 
   /// Retrieve value from stack (large values e.g. vectors etc.)
-  template <typename TYPE> void Property::value(TYPE& value)  const   {
+  template <typename TYPE> void Property::value(TYPE& value) const {
     const PropertyGrammar& g = grammar();
-    if ( g.type() == typeid(TYPE) )
-      value = *(TYPE*)m_par;
-    else if ( !Grammar<TYPE>::instance().fromString(&value,this->str()) )
-      PropertyGrammar::invalidConversion(g.type(),typeid(TYPE));
+    if (g.type() == typeid(TYPE))
+      value = *(TYPE*) m_par;
+    else if (!Grammar < TYPE > ::instance().fromString(&value, this->str()))
+      PropertyGrammar::invalidConversion(g.type(), typeid(TYPE));
   }
 
   /// Retrieve value
-  template <typename TYPE> TYPE Property::value() const  {
+  template <typename TYPE> TYPE Property::value() const {
     TYPE temp;
     this->value(temp);
     return temp;
@@ -148,4 +150,4 @@ namespace DD4hep {
 
 }      // End namespace DD4hep
 
-#endif // DD4HEP_DDG4_COMPONENTTUILS_INL_H
+#endif // DD4HEP_DDG4_COMPONENTPROPERTIES_INL_H
diff --git a/DDG4/include/DDG4/ComponentUtils.h b/DDG4/include/DDG4/ComponentUtils.h
index a82fffc859b8d28c7faadeeabecf6dc26b96cbe3..88b4b660409629950cbcd9f092d2617d35b8b8aa 100644
--- a/DDG4/include/DDG4/ComponentUtils.h
+++ b/DDG4/include/DDG4/ComponentUtils.h
@@ -13,7 +13,6 @@
 #include <stdexcept>
 #include <typeinfo>
 #include <string>
-#include <map>
 
 /*
  *   DD4hep namespace declaration
@@ -22,194 +21,48 @@ namespace DD4hep {
 
   /// ABI information about type names
   std::string typeinfoName(const std::type_info& type);
-  void typeinfoCheck(const std::type_info& typ1, const std::type_info& typ2, const std::string& text="");
+  void typeinfoCheck(const std::type_info& typ1, const std::type_info& typ2, const std::string& text = "");
 
   /** @class unrelated_type_error
    *
    *   @author  M.Frank
    *   @date    13.08.2013
    */
-  struct unrelated_type_error : public std::runtime_error  {
+  struct unrelated_type_error : public std::runtime_error {
     static std::string msg(const std::type_info& typ1, const std::type_info& typ2, const std::string& text);
-    unrelated_type_error(const std::type_info& typ1, const std::type_info& typ2,const std::string& text="")
-      : std::runtime_error(msg(typ1,typ2,text))  {}
-  };
-
-  struct Property;
-  struct PropertyGrammar;
-  struct PropertyConfigurator  {
-  protected:
-    virtual ~PropertyConfigurator();
-  public:
-    virtual void set(const PropertyGrammar& setter,const std::string&,const std::string&,void* ptr) const = 0;
-  };
-
-  /** @class PropertyGrammar
-   *
-   *   @author  M.Frank
-   *   @date    13.08.2013
-   */
-  struct PropertyGrammar    {
-  protected:
-    friend class Property;
-
-    /// Default constructor
-    PropertyGrammar();
-    /// Default destructor
-    virtual ~PropertyGrammar();
-    /// Error callback on invalid conversion
-    static void invalidConversion(const std::type_info& from, const std::type_info& to);
-    /// Access to the type information
-    virtual const std::type_info& type() const = 0;
-    /// Serialize an opaque value to a string
-    virtual std::string str(const void* ptr) const = 0;
-    /// Set value from serialized string. On successful data conversion TRUE is returned.
-    virtual bool fromString(void* ptr, const std::string& value) const = 0;
-  };
-
-  /** @class Property
-   *
-   *   Standard implementation of a property mechanism.
-   *   The data conversion mechanism between various properties
-   *   uses internally boost::spirit to allow also conversions
-   *   between types, which are initially unrelated such as
-   *   e.g. vector<int> and list<short>.
-   *
-   *   @author  M.Frank
-   *   @date    13.08.2013
-   */
-  class Property  {
-  protected:
-    /// Pointer to the data location
-    void*                  m_par;
-    const PropertyGrammar* m_hdl;
-
-    /// Setup property
-    template <typename TYPE> void make(TYPE& value);
-  public:
-    /// Default constructor
-    Property();
-    /// Copy constructor  
-    Property(const Property& p);
-    /// User constructor
-    template <typename TYPE> Property(TYPE& val)
-    : m_par(0), m_hdl(0)
-    {
-      make(val); 
+    unrelated_type_error(const std::type_info& typ1, const std::type_info& typ2, const std::string& text = "")
+        : std::runtime_error(msg(typ1, typ2, text)) {
     }
-    /// Property type name
-    static std::string type(const Property& proptery);
-    /// Property type name
-    static std::string type(const std::type_info& proptery);
-    /// Property type name
-    std::string type()  const;
-    /// Access void data pointer
-    void* ptr() const   {  return m_par;  }
-    /// Access grammar object
-    const PropertyGrammar& grammar()  const;
-    /// Conversion to string value
-    std::string str() const;
-    /// Conversion from string value
-    Property& str(const std::string& input);
-    /// Assignment operator
-    Property& operator=(const Property& p);
-    /// Assignment operator / set new balue
-    Property& operator=(const char* val);
-    /// Assignment operator / set new balue
-    //Property& operator=(const std::string& val);
-    /// Assignment operator / set new balue
-    template <typename TYPE> Property& operator=(const TYPE& val);
-    /// Retrieve value
-    template <typename TYPE> TYPE value()  const;
-    /// Retrieve value from stack (large values e.g. vectors etc.)
-    template <typename TYPE> void value(TYPE& value)  const;
-    /// Set value of this property
-    template <typename TYPE> void set(const TYPE& value);
   };
 
-  /** @class PropertyValue
+  /** @class
    *
    *   @author  M.Frank
    *   @date    13.08.2013
    */
-  template <class TYPE> class PropertyValue : private Property {
-  public:
-    TYPE data;
-    PropertyValue() : Property(data) {}
-    /// Assignment operator
-    PropertyValue& operator=(const TYPE& val)  { 
-      data = val; 
-      return *this;
-    }
-    // Equality operator
-    bool operator==(const TYPE& val)  const  {
-      return val == data;
-    }
-    /// Access grammar object
-    const PropertyGrammar& grammar()  const  {
-      return this->Property::grammar();
-    }
-    /// Conversion to string value
-    std::string str() const   {
-      return this->Property::str();
-    }
-    /// Retrieve value with data conversion
-    template <typename T> T value()  const   {
-      return this->Property::value<T>();
-    }
-    /// Retrieve value from stack with data conversion (large values e.g. vectors etc.)
-    template <typename T> void value(TYPE& val)  const  {
-      this->Property::value(val);
-    }
-    /// Set value of this property with data conversion
-    template <typename T> void set(const T& val)  {
-      this->Property::set(val);
-    }
-  };
+  class ComponentCast {
+  private:
+    /// Initializing Constructor
+    ComponentCast(const std::type_info& t);
+    /// Defautl destructor
+    virtual ~ComponentCast();
 
-  /** @class PropertyManager
-   *
-   *   @author  M.Frank
-   *   @date    13.08.2013
-   */
-  class PropertyManager  {
   public:
-    /// Property array definition
-    typedef std::map<std::string,Property> Properties;
-  protected:
-    /// Property array/map
-    Properties m_properties;
-
-    /// Verify that this property does not exist (throw exception if the name was found)
-    void verifyNonExistence(const std::string& name) const;
-    /// Verify that this property exists (throw exception if the name was not found)
-    Properties::iterator verifyExistence(const std::string& name);
-    /// Verify that this property exists (throw exception if the name was not found)
-    Properties::const_iterator verifyExistence(const std::string& name) const;
+    const std::type_info& type;
+    const void* abi_class;
 
   public:
-    /// Default constructor
-    PropertyManager();
-    /// Default destructor
-    virtual ~PropertyManager();
-    /// Access property by name (CONST)
-    const Property& property(const std::string& name) const;
-    /// Access property by name
-    Property& property(const std::string& name);
-    /// Access property by name
-    Property& operator[](const std::string& name);
-    /// Access property by name
-    const Property& operator[](const std::string& name) const;
-    /// Add a new property
-    void add(const std::string& name, const Property& property);
-    /// Add a new property
-    template <typename T> void add(const std::string& name, T& value)  {
-      add(name,Property(value));
+    template <typename TYPE> static ComponentCast& instance() {
+      static ComponentCast c(typeid(TYPE));
+      return c;
     }
-    /// Bulk set of all properties
-    void set(const std::string& component_name, PropertyConfigurator& setup);
-    /// Dump string values
-    void dump()  const;
+
+    /// Apply cast using typeinfo instead of dynamic_cast
+    void* apply_dynCast(const std::type_info& to, const void* ptr) const;
+    /// Apply cast using typeinfo instead of dynamic_cast
+    void* apply_upCast(const std::type_info& to, const void* ptr) const;
+    /// Apply cast using typeinfo instead of dynamic_cast
+    void* apply_downCast(const std::type_info& to, const void* ptr) const;
   };
 
 }      // End namespace DD4hep
diff --git a/DDG4/include/DDG4/Defs.h b/DDG4/include/DDG4/Defs.h
index 72866d8be40903767178408a97b76f313c5f5a32..0f96f99bcddbe3c9b47ff22d0517aad06b54cb22 100644
--- a/DDG4/include/DDG4/Defs.h
+++ b/DDG4/include/DDG4/Defs.h
@@ -20,18 +20,18 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     // Forward declarations;
-    typedef Geometry::Position             Position;
-    typedef Geometry::Position             Direction;
-    typedef Geometry::Position             Momentum;
-    typedef Geometry::LCDD                 LCDD;
-    typedef Geometry::Readout              Readout;
-    typedef Geometry::DetElement           DetElement;
+    typedef Geometry::Position Position;
+    typedef Geometry::Position Direction;
+    typedef Geometry::Position Momentum;
+    typedef Geometry::LCDD LCDD;
+    typedef Geometry::Readout Readout;
+    typedef Geometry::DetElement DetElement;
 
-    template<class HIT> struct HitCompare;
-    template<class HIT> struct HitPositionCompare;
+    template <class HIT> struct HitCompare;
+    template <class HIT> struct HitPositionCompare;
     class Geant4StepHandler;
     class Geant4Hit;
     class Geant4TrackerHit;
diff --git a/DDG4/include/DDG4/Factories.h b/DDG4/include/DDG4/Factories.h
index d6ed3ca4213275a8cd7376c1e463838860b5afb0..fc70eea44e05bec23ecdb1c0015fe3534f02524b 100644
--- a/DDG4/include/DDG4/Factories.h
+++ b/DDG4/include/DDG4/Factories.h
@@ -21,31 +21,33 @@
 
 // Forward declarations
 class G4ParticleDefinition;
-class G4VSensitiveDetector; 
+class G4VSensitiveDetector;
 class G4MagIntegratorStepper;
 class G4EquationOfMotion;
 class G4MagneticField;
 class G4Mag_EqRhs;
 class G4VPhysicsConstructor;
+class G4VUserPhysicsList;
 class G4VProcess;
 
-namespace DD4hep { 
-  namespace Geometry   {
+namespace DD4hep {
+  namespace Geometry {
     class DetElement;
-    class LCDD; 
+    class LCDD;
   }
   namespace Simulation {
     class Geant4Context;
     class Geant4Action;
     class Geant4Converter;
     class Geant4Sensitive;
+    class Geant4UserPhysics;
+    class Geant4PhysicsListActionSequence;
 
-    class G4SDFactory; 
-    template <typename T> class Geant4SetupAction  {
+    template <typename T> class Geant4SetupAction {
     public:
-      static long create(Geometry::LCDD& lcdd, const Geant4Converter& cnv, const std::map<std::string,std::string>& attrs);
+      static long create(Geometry::LCDD& lcdd, const Geant4Converter& cnv, const std::map<std::string, std::string>& attrs);
     };
-    template <typename T> class Geant4SensitiveDetectorFactory  {
+    template <typename T> class Geant4SensitiveDetectorFactory {
     public:
       static G4VSensitiveDetector* create(const std::string& name, DD4hep::Geometry::LCDD& lcdd);
     };
@@ -53,77 +55,105 @@ namespace DD4hep {
 }
 
 namespace {
+  namespace DS = DD4hep::Simulation;
 
-  template < typename P > class Factory<P, long(DD4hep::Geometry::LCDD*,const DD4hep::Simulation::Geant4Converter*,const std::map<std::string,std::string>*)> {
+  typedef DD4hep::Geometry::LCDD LCDD;
+  typedef DD4hep::Geometry::DetElement DE;
+  typedef DS::Geant4Action GA;
+  typedef DS::Geant4Context CT;
+  typedef std::string STR;
+  typedef const std::vector<void*>& ARGS;
+
+  template <typename P> class Factory<P, long(LCDD*, const DS::Geant4Converter*, const std::map<STR, STR>*)> {
   public:
-    typedef DD4hep::Geometry::LCDD              LCDD;
-    typedef DD4hep::Simulation::Geant4Converter cnv_t;
-    typedef std::map<std::string,std::string>   attrs_t;
-    static void Func(void *retaddr, void*, const std::vector<void*>& arg, void*) {
-      LCDD*    lcdd = (LCDD* )arg[0];
-      cnv_t*   cnv  = (cnv_t*)arg[1];
-      attrs_t* attr = (attrs_t*)arg[2];
-      long ret = DD4hep::Simulation::Geant4SetupAction<P>::create(*lcdd,*cnv,*attr);
-      new(retaddr) (long)(ret);
+    typedef DS::Geant4Converter cnv_t;
+    typedef std::map<STR, STR> attrs_t;
+    static void Func(void *ret, void*, ARGS arg, void*) {
+      long r = DS::Geant4SetupAction<P>::create(*(LCDD*) arg[0], *(cnv_t*) arg[1], *(attrs_t*) arg[2]);
+      new (ret) (long)(r);
     }
   };
 
   /// Factory to create Geant4 sensitive detectors
-  template <typename P> class Factory<P, G4VSensitiveDetector*(std::string,DD4hep::Geometry::LCDD*)> {
-  public:  typedef G4VSensitiveDetector SD;
-    static void Func(void *retaddr, void*, const std::vector<void*>& arg, void*) 
-    { *(void**)retaddr = DD4hep::Simulation::Geant4SensitiveDetectorFactory<P>::create(*(std::string*)arg[0],*(DD4hep::Geometry::LCDD*)arg[1]); }
-    //{  *(SD**)retaddr = (SD*)new P(*(std::string*)arg[0], *(DD4hep::Geometry::LCDD*)arg[1]);           }
-  };
-
-  template <typename P> class Factory<P, DD4hep::Simulation::G4SDFactory*()> {
-  public:  typedef DD4hep::Simulation::G4SDFactory SD;
-    static void Func(void *retaddr, void*, const std::vector<void*>& arg, void*) 
-      {  *(SD**)retaddr = (SD*)new P();           }
+  template <typename P> class Factory<P, G4VSensitiveDetector*(STR, LCDD*)> {
+  public:
+    typedef G4VSensitiveDetector SD;
+    static void Func(void *ret, void*, ARGS arg, void*) {
+      *(void**) ret = DS::Geant4SensitiveDetectorFactory<P>::create(*(STR*) arg[0], *(LCDD*) arg[1]);
+    }
+    //{  *(SD**)ret = (SD*)new P(*(STR*)arg[0], *(LCDD*)arg[1]);           }
   };
 
   /// Factory to create Geant4 sensitive detectors
-  template <typename P> class Factory<P, DD4hep::Simulation::Geant4Sensitive*(DD4hep::Simulation::Geant4Context*,std::string,DD4hep::Geometry::DetElement*,DD4hep::Geometry::LCDD*)> {
-  public:  typedef DD4hep::Simulation::Geant4Sensitive _S;
-    static void Func(void *retaddr, void*, const std::vector<void*>& arg, void*)     {
-      *(_S**)retaddr = (_S*)new P((DD4hep::Simulation::Geant4Context*)arg[0],*(std::string*)arg[1],*(DD4hep::Geometry::DetElement*)arg[2],*(DD4hep::Geometry::LCDD*)arg[3]);
+  template <typename P> class Factory<P, DS::Geant4Sensitive*(CT*, STR, DE*, LCDD*)> {
+  public:
+    typedef DS::Geant4Sensitive _S;
+    static void Func(void *ret, void*, ARGS arg, void*) {
+      *(_S**) ret = (_S*) new P((CT*) arg[0], *(STR*) arg[1], *(DE*) arg[2], *(LCDD*) arg[3]);
     }
   };
 
   /// Factory to create Geant4 sensitive detectors
-  template <typename P> class Factory<P, DD4hep::Simulation::Geant4Action*(DD4hep::Simulation::Geant4Context*,std::string)> {
-  public:  typedef DD4hep::Simulation::Geant4Action ACT;
-    static void Func(void *retaddr, void*, const std::vector<void*>& arg, void*) 
-    { *(ACT**)retaddr = (ACT*)new P((DD4hep::Simulation::Geant4Context*)arg[0], *(std::string*)arg[1]); }
+  template <typename P> class Factory<P, DS::Geant4Action*(CT*, STR)> {
+  public:
+    static void Func(void *ret, void*, ARGS arg, void*) {
+      *(GA**) ret = (GA*) new P((CT*) arg[0], *(STR*) arg[1]);
+    }
   };
 
   /// Templated Factory for constructors without argument
-  template <typename P,typename R> struct FF0 {
-    static void Func(void *ret, void*, const std::vector<void*>&, void*) { *(R*)ret = (R)(new P()); }
+  template <typename P, typename R> struct FF0 {
+    static void Func(void *ret, void*, ARGS, void*) {
+      *(R*) ret = (R) (new P());
+    }
   };
   /// Templated Factory for constructors with exactly 1 argument
-  template <typename P,typename R,typename A0> struct FF1 {
-    static void Func(void *ret, void*, const std::vector<void*>& arg, void*) { *(R*)ret = (R)(new P((A0)arg[0])); }
+  template <typename P, typename R, typename A0> struct FF1 {
+    static void Func(void *ret, void*, ARGS arg, void*) {
+      *(R*) ret = (R) (new P((A0) arg[0]));
+    }
   };
 
   /// Factory to create Geant4 steppers
-  template <typename P> class Factory<P, G4MagIntegratorStepper*(G4EquationOfMotion*)>  : public FF1<P,G4MagIntegratorStepper*,G4EquationOfMotion*>{};
+  template <typename P> class Factory<P, G4MagIntegratorStepper*(G4EquationOfMotion*)> : public FF1<P, G4MagIntegratorStepper*,
+      G4EquationOfMotion*> {
+  };
   /// Factory to create Geant4 steppers
-  template <typename P> class Factory<P, G4MagIntegratorStepper*(G4Mag_EqRhs*)> : public FF1<P,G4MagIntegratorStepper*,G4Mag_EqRhs*> {};
+  template <typename P> class Factory<P, G4MagIntegratorStepper*(G4Mag_EqRhs*)> : public FF1<P, G4MagIntegratorStepper*,
+      G4Mag_EqRhs*> {
+  };
   /// Factory to create Geant4 equations of motion for magnetic fields
-  template <typename P> class Factory<P, G4Mag_EqRhs*(G4MagneticField*)> : public FF1<P,G4Mag_EqRhs*,G4MagneticField*> {};
+  template <typename P> class Factory<P, G4Mag_EqRhs*(G4MagneticField*)> : public FF1<P, G4Mag_EqRhs*, G4MagneticField*> {
+  };
 
   /// Factory to create Geant4 Processes
-  template <typename P> class Factory<P, G4VProcess*()> : public FF0<P,G4VProcess*> {};
+  template <typename P> class Factory<P, G4VProcess*()> : public FF0<P, G4VProcess*> {
+  };
   /// Factory to create Geant4 Processes
-  template <typename P> class Factory<P, G4VPhysicsConstructor*()> : public FF0<P,G4VPhysicsConstructor*> {};
+  template <typename P> class Factory<P, G4VPhysicsConstructor*()> : public FF0<P, G4VPhysicsConstructor*> {
+  };
 
-  template <typename P> class Factory<P, G4ParticleDefinition*()>  { public:
-    static void Func(void *ret, void*, const std::vector<void*>&, void*) { *(G4ParticleDefinition**)ret = P::Definition(); }
+  template <typename P> class Factory<P, G4ParticleDefinition*()> {
+  public:
+    static void Func(void *ret, void*, ARGS, void*) {
+      *(G4ParticleDefinition**) ret = P::Definition();
+    }
+  };
+  template <typename P> class Factory<P, long()> {
+  public:
+    static void Func(void *ret, void*, ARGS, void*) {
+      P::ConstructParticle();
+      *(long*) ret = 1L;
+    }
   };
-  template <typename P> class Factory<P, long()>  { public:
-    static void Func(void *ret, void*, const std::vector<void*>&, void*) { P::ConstructParticle(); *(long*)ret = 1L; }
+  /// Factory to create Geant4 physics constructions
+  template <typename P> class Factory<P, G4VUserPhysicsList*(DS::Geant4PhysicsListActionSequence*, int)> {
+  public:
+    static void Func(void *ret, void*, ARGS a, void*) {
+      *(G4VUserPhysicsList**) ret = (G4VUserPhysicsList*) new P((DS::Geant4PhysicsListActionSequence*) a[0], *(int*) a[1]);
+    }
   };
+
 }
 
 #define DECLARE_EXTERNAL_GEANT4SENSITIVEDETECTOR(name,func) \
@@ -162,9 +192,13 @@ namespace {
 #define DECLARE_GEANT4_PARTICLE(name) PLUGINSVC_FACTORY_WITH_ID(name,std::string(#name),G4ParticleDefinition*())
 /// Plugin definition to force particle constructors for GEANT4 (G4XXXXConstructor)
 #define DECLARE_GEANT4_PARTICLEGROUP(name) PLUGINSVC_FACTORY_WITH_ID(name,std::string(#name),long())
+/// Plugin definition to force geant4 physics constructs such as FTFP_BERT (from source/physics_lists/) etc
+#define DECLARE_GEANT4_PHYSICS_LIST(name)  typedef DD4hep::Simulation::Geant4UserPhysicsList< name > G4_physics_list_##name; \
+  PLUGINSVC_FACTORY_WITH_ID(G4_physics_list_##name,std::string(#name),G4VUserPhysicsList*(DD4hep::Simulation::Geant4PhysicsListActionSequence*,int))
 
 #define DECLARE_GEANT4_SETUP(name,func) \
   namespace DD4hep { namespace Simulation { struct xml_g4_setup_##name {};  \
   template <> long Geant4SetupAction<DD4hep::Simulation::xml_g4_setup_##name>::create(LCDD& l,const DD4hep::Simulation::Geant4Converter& e, const std::map<std::string,std::string>& a) {return func(l,e,a);} }} \
   PLUGINSVC_FACTORY_WITH_ID(xml_g4_setup_##name,std::string(#name "_Geant4_action"),long(DD4hep::Geometry::LCDD*,const DD4hep::Simulation::Geant4Converter*,const std::map<std::string,std::string>*))
+
 #endif // DDG4_FACTORIES_H
diff --git a/DDG4/include/DDG4/Geant4Action.h b/DDG4/include/DDG4/Geant4Action.h
index 95f04fcf3cdf6eee43a7cb59815888471aa79535..d25b4fead2b4286650d0ba0015a7e45eec18abba 100644
--- a/DDG4/include/DDG4/Geant4Action.h
+++ b/DDG4/include/DDG4/Geant4Action.h
@@ -11,10 +11,11 @@
 
 // Framework include files
 #include "DDG4/Geant4Context.h"
-#include "DDG4/ComponentUtils.h"
 #include "DDG4/Geant4Callback.h"
+#include "DDG4/ComponentProperties.h"
 
 #include "G4VUserTrackInformation.hh"
+
 // Geant4 forward declarations
 class G4Run;
 class G4Event;
@@ -24,6 +25,7 @@ class G4TrackStack;
 class G4EventGenerator;
 class G4VTrajectory;
 class G4TrackingManager;
+class G4UIdirectory;
 
 // C/C++ include files
 #include <string>
@@ -37,9 +39,12 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
+
+    // Forward declarations
+    class Geant4UIMessenger;
 
-    template <typename TO,typename FROM> TO fast_cast(FROM from)  {
+    template <typename TO, typename FROM> TO fast_cast(FROM from) {
 #ifdef USE_FASTCAST
       return static_cast<TO>(from);
 #else
@@ -47,24 +52,27 @@ namespace DD4hep {
 #endif
     }
 
-    struct TypeName : public std::pair<std::string,std::string>  {
-    TypeName() : std::pair<std::string,std::string>() {}
-    TypeName(const std::pair<std::string,std::string>& c) 
-      : std::pair<std::string,std::string>(c) {}
-    TypeName(const std::string& typ,const std::string& nam) 
-      : std::pair<std::string,std::string>(typ,nam) {}
+    struct TypeName : public std::pair<std::string, std::string> {
+      TypeName()
+          : std::pair<std::string, std::string>() {
+      }
+      TypeName(const std::pair<std::string, std::string>& c)
+          : std::pair<std::string, std::string>(c) {
+      }
+      TypeName(const std::string& typ, const std::string& nam)
+          : std::pair<std::string, std::string>(typ, nam) {
+      }
       static TypeName split(const std::string& type_name);
     };
 
     /** @class Geant4TrackInformation Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * @author  M.Frank
      * @version 1.0
      */
     struct Geant4TrackInformation : public G4VUserTrackInformation {
       enum {
-	STORE    = 1<<0,
-	LAST     = 1<<31
+        STORE = 1 << 0, LAST = 1 << 31
       };
       int m_flags;
       /// Default constructor
@@ -72,141 +80,177 @@ namespace DD4hep {
       /// Standard destructor
       virtual ~Geant4TrackInformation();
       /// Access flag if track should be stored
-      bool storeTrack() const      { return (m_flags&STORE) != 0; }
+      bool storeTrack() const {
+        return (m_flags & STORE) != 0;
+      }
       /// Access flag if track should be stored
       Geant4TrackInformation& storeTrack(bool value);
     };
 
 #if 0
     /** @class Geant4UserTrajectory Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4UserTrajectory  {
+    struct Geant4UserTrajectory {
       /// Default constructor
       Geant4UserTrajectory();
       /// Standard destructor
       virtual ~Geant4UserTrajectory();
       /// accessors
-      virtual int                 trackID()       const = 0;
-      virtual int                 parentID()      const = 0;
-      virtual std::string         particleName()  const = 0;
-      virtual double              charge()        const = 0;
-      virtual int                 pdgID()         const = 0;
-      virtual G4ThreeVector       momentum()      const = 0;
-      virtual int                 numPoints()     const = 0;
-      virtual G4VTrajectoryPoint* point(int i)    const = 0;
+      virtual int trackID() const = 0;
+      virtual int parentID() const = 0;
+      virtual std::string particleName() const = 0;
+      virtual double charge() const = 0;
+      virtual int pdgID() const = 0;
+      virtual G4ThreeVector momentum() const = 0;
+      virtual int numPoints() const = 0;
+      virtual G4VTrajectoryPoint* point(int i) const = 0;
     };
 
     /** @class Geant4Trajectory Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4Trajectory : public G4VTrajectory  {
+    struct Geant4Trajectory : public G4VTrajectory {
       std::auto_ptr<Geant4UserTrajectory> trajectory;
       /// Default constructor
       Geant4Trajectory(Geant4UserTrajectory* traj);
       /// Standard destructor
       virtual ~Geant4Trajectory();
-      /// Mandatory G4 overloads: Get/Set functions 
-      virtual G4int GetTrackID() const                     {  return trajectory->trackID;       }
-      virtual G4int GetParentID() const                    {  return trajectory->parentID();      }
-      virtual G4String GetParticleName() const             {  return trajectory->particleName();  }
+      /// Mandatory G4 overloads: Get/Set functions
+      virtual G4int GetTrackID() const {return trajectory->trackID;}
+      virtual G4int GetParentID() const {return trajectory->parentID();}
+      virtual G4String GetParticleName() const {return trajectory->particleName();}
       /// Mandatory G4 overloads:  Charge is that of G4DynamicParticle
-      virtual G4double GetCharge() const                   {  return trajectory->charge();        }
+      virtual G4double GetCharge() const {return trajectory->charge();}
       /// Mandatory G4 overloads:  Zero will be returned if the particle does not have PDG code.
-      virtual G4int GetPDGEncoding() const                 {  return trajectory->pdgID();         }
+      virtual G4int GetPDGEncoding() const {return trajectory->pdgID();}
       /// Mandatory G4 overloads:  Momentum at the origin of the track in global coordinate system.
-      virtual G4ThreeVector GetInitialMomentum() const     {  return trajectory->momentum();      }
-      
+      virtual G4ThreeVector GetInitialMomentum() const {return trajectory->momentum();}
+
       /// Mandatory G4 overloads:  Returns the number of trajectory points
-      virtual int GetPointEntries() const                  {  return trajectory->numPoints();     }
-      virtual G4VTrajectoryPoint* GetPoint(G4int i) const  {  return trajectory->point(i);        }
+      virtual int GetPointEntries() const {return trajectory->numPoints();}
+      virtual G4VTrajectoryPoint* GetPoint(G4int i) const {return trajectory->point(i);}
     };
 #endif
 
     /** @class Invoke Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Default base class for all geant 4 actions and derivates thereof.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4Action   {
+    class Geant4Action {
     protected:
       /// Reference to the Geant4 context
-      Geant4Context*  m_context;
+      Geant4Context* m_context;
+      /// Control directory of this action
+      Geant4UIMessenger* m_control;
+
+      /// Default property: Output level
+      int m_outputLevel;
+      /// Default property: Flag to create control instance
+      bool m_needsControl;
       /// Action name
-      std::string     m_name;
+      std::string m_name;
       /// Property pool
       PropertyManager m_properties;
       /// Reference count. Initial value: 1
-      long            m_refCount;
+      long m_refCount;
 
       template <typename T> struct Actors {
-	typedef std::vector<T*> _V;
-	_V m_v;
-	Actors()                         {                        }
-	~Actors()                        {                        }
-	void clear()                     { m_v.clear();           }
-	void add(T* obj)                 { m_v.push_back(obj);    }
-	operator const _V&() const       { return m_v;            }
-	operator       _V&()             { return m_v;            }
-	const _V* operator->() const     { return &m_v;           }
-	_V*       operator->()           { return &m_v;           }
-	/// NON-CONST actions
-	template <typename R, typename Q> void operator()(R (Q::*pmf)() )  {
-	  if ( m_v.empty() ) return;
-	  for(typename _V::iterator i=m_v.begin(); i!=m_v.end(); ++i)
-	    ((*i)->*pmf)();
-	}
-	template <typename R, typename Q, typename A0> void operator()(R (Q::*pmf)(A0), A0 a0)  {
-	  if ( m_v.empty() ) return;
-	  for(typename _V::iterator i=m_v.begin(); i!=m_v.end();++i)
-	    ((*i)->*pmf)(a0);
-	}
-	template <typename R, typename Q, typename A0, typename A1> void operator()(R (Q::*pmf)(A0,A1), A0 a0, A1 a1)  {
-	  if ( m_v.empty() ) return;
-	  for(typename _V::iterator i=m_v.begin(); i!=m_v.end();++i)
-	    ((*i)->*pmf)(a0,a1);
-	}
-	/// CONST actions
-	template <typename R, typename Q> void operator()(R (Q::*pmf)() const ) const {
-	  if ( m_v.empty() ) return;
-	  for(typename _V::const_iterator i=m_v.begin(); i!=m_v.end(); ++i)
-	    ((*i)->*pmf)();
-	}
-	template <typename R, typename Q, typename A0> void operator()(R (Q::*pmf)(A0) const, A0 a0) const {
-	  if ( m_v.empty() ) return;
-	  for(typename _V::const_iterator i=m_v.begin(); i!=m_v.end();++i)
-	    ((*i)->*pmf)(a0);
-	}
-	template <typename R, typename Q, typename A0, typename A1> void operator()(R (Q::*pmf)(A0,A1)const, A0 a0, A1 a1) const {
-	  if ( m_v.empty() ) return;
-	  for(typename _V::const_iterator i=m_v.begin(); i!=m_v.end();++i)
-	    ((*i)->*pmf)(a0,a1);
-	}
-	/// CONST filters
-	template <typename Q> bool filter(bool (Q::*pmf)() const ) const {
-	  if ( !m_v.empty() )  return true;
-	  for(typename _V::const_iterator i=m_v.begin(); i!=m_v.end(); ++i)
-	    if ( !((*i)->*pmf)() ) return false;
-	  return true;
-	}
-	template <typename Q, typename A0> bool filter(bool (Q::*pmf)(A0) const, A0 a0) const {
-	  if ( m_v.empty() ) return true;
-	  for(typename _V::const_iterator i=m_v.begin(); i!=m_v.end();++i)
-	    if ( !((*i)->*pmf)(a0) ) return false;
-	  return true;
-	}
-	template <typename Q, typename A0, typename A1> bool filter(bool (Q::*pmf)(A0,A1) const, A0 a0, A1 a1) const {
-	  if ( m_v.empty() ) return true;
-	  for(typename _V::const_iterator i=m_v.begin(); i!=m_v.end();++i)
-	    if ( !((*i)->*pmf)(a0,a1) ) return false;
-	  return true;
-	}
+        typedef std::vector<T*> _V;
+        _V m_v;
+        Actors() {
+        }
+        ~Actors() {
+        }
+        void clear() {
+          m_v.clear();
+        }
+        void add(T* obj) {
+          m_v.push_back(obj);
+        }
+        operator const _V&() const {
+          return m_v;
+        }
+        operator _V&() {
+          return m_v;
+        }
+        const _V* operator->() const {
+          return &m_v;
+        }
+        _V* operator->() {
+          return &m_v;
+        }
+        /// NON-CONST actions
+        template <typename R, typename Q> void operator()(R (Q::*pmf)()) {
+          if (m_v.empty())
+            return;
+          for (typename _V::iterator i = m_v.begin(); i != m_v.end(); ++i)
+            ((*i)->*pmf)();
+        }
+        template <typename R, typename Q, typename A0> void operator()(R (Q::*pmf)(A0), A0 a0) {
+          if (m_v.empty())
+            return;
+          for (typename _V::iterator i = m_v.begin(); i != m_v.end(); ++i)
+            ((*i)->*pmf)(a0);
+        }
+        template <typename R, typename Q, typename A0, typename A1> void operator()(R (Q::*pmf)(A0, A1), A0 a0, A1 a1) {
+          if (m_v.empty())
+            return;
+          for (typename _V::iterator i = m_v.begin(); i != m_v.end(); ++i)
+            ((*i)->*pmf)(a0, a1);
+        }
+        /// CONST actions
+        template <typename R, typename Q> void operator()(R (Q::*pmf)() const) const {
+          if (m_v.empty())
+            return;
+          for (typename _V::const_iterator i = m_v.begin(); i != m_v.end(); ++i)
+            ((*i)->*pmf)();
+        }
+        template <typename R, typename Q, typename A0> void operator()(R (Q::*pmf)(A0) const, A0 a0) const {
+          if (m_v.empty())
+            return;
+          for (typename _V::const_iterator i = m_v.begin(); i != m_v.end(); ++i)
+            ((*i)->*pmf)(a0);
+        }
+        template <typename R, typename Q, typename A0, typename A1> void operator()(R (Q::*pmf)(A0, A1) const, A0 a0,
+            A1 a1) const {
+          if (m_v.empty())
+            return;
+          for (typename _V::const_iterator i = m_v.begin(); i != m_v.end(); ++i)
+            ((*i)->*pmf)(a0, a1);
+        }
+        /// CONST filters
+        template <typename Q> bool filter(bool (Q::*pmf)() const) const {
+          if (!m_v.empty())
+            return true;
+          for (typename _V::const_iterator i = m_v.begin(); i != m_v.end(); ++i)
+            if (!((*i)->*pmf)())
+              return false;
+          return true;
+        }
+        template <typename Q, typename A0> bool filter(bool (Q::*pmf)(A0) const, A0 a0) const {
+          if (m_v.empty())
+            return true;
+          for (typename _V::const_iterator i = m_v.begin(); i != m_v.end(); ++i)
+            if (!((*i)->*pmf)(a0))
+              return false;
+          return true;
+        }
+        template <typename Q, typename A0, typename A1> bool filter(bool (Q::*pmf)(A0, A1) const, A0 a0, A1 a1) const {
+          if (m_v.empty())
+            return true;
+          for (typename _V::const_iterator i = m_v.begin(); i != m_v.end(); ++i)
+            if (!((*i)->*pmf)(a0, a1))
+              return false;
+          return true;
+        }
       };
 
       /// Default destructor
@@ -222,35 +266,51 @@ namespace DD4hep {
       /// Set the context pointer
       void setContext(Geant4Context* context);
       /// Access the context
-      Geant4Context* context() const             { return m_context;      }
+      Geant4Context* context() const {
+        return m_context;
+      }
       /// Access name of the action
-      const std::string& name() const            { return m_name;         }
+      const std::string& name() const {
+        return m_name;
+      }
       /// Access name of the action
-      const char* c_name() const                 { return m_name.c_str(); }
+      const char* c_name() const {
+        return m_name.c_str();
+      }
       /// Set the object name.
-      void setName(const std::string& new_name)  { m_name = new_name;     }
+      void setName(const std::string& new_name) {
+        m_name = new_name;
+      }
       /// Access to the properties of the object
-      PropertyManager& properties()              { return m_properties;   }
-      /// Declare property 
+      PropertyManager& properties() {
+        return m_properties;
+      }
+      /// Declare property
       template <typename T> Geant4Action& declareProperty(const std::string& nam, T& val);
-      /// Declare property 
+      /// Declare property
       template <typename T> Geant4Action& declareProperty(const char* nam, T& val);
       /// Set object properties
       Geant4Action& setProperties(PropertyConfigurator& setup);
+
+      /// Install property control messenger if wanted
+      virtual void installMessengers();
+      /// Install property control messenger if wanted
+      void installPropertyMessenger();
+
       /// Support of debug messages.
-      void debug(const std::string& fmt, ...)  const;
+      void debug(const std::string& fmt, ...) const;
       /// Support of info messages.
-      void info(const std::string& fmt, ...)  const;
+      void info(const std::string& fmt, ...) const;
       /// Support of warning messages.
-      void warning(const std::string& fmt, ...)  const;
+      void warning(const std::string& fmt, ...) const;
       /// Support of error messages.
-      void error(const std::string& fmt, ...)  const;
+      void error(const std::string& fmt, ...) const;
       /// Action to support error messages.
-      bool error(bool return_value, const std::string& fmt, ...)  const;
+      bool error(bool return_value, const std::string& fmt, ...) const;
       /// Support of fatal messages. Throws exception
-      void fatal(const std::string& fmt, ...)  const;
+      void fatal(const std::string& fmt, ...) const;
       /// Support of exceptions: Print fatal message and throw runtime_error.
-      void except(const std::string& fmt, ...)  const;
+      void except(const std::string& fmt, ...) const;
 
       /// Access to the main run action sequence from the kernel object
       Geant4RunActionSequence& runAction() const;
@@ -267,14 +327,14 @@ namespace DD4hep {
     };
 
     /// Declare property
-    template <typename T> Geant4Action& Geant4Action::declareProperty(const std::string& nam, T& val)  {
-      m_properties.add(nam,val);
+    template <typename T> Geant4Action& Geant4Action::declareProperty(const std::string& nam, T& val) {
+      m_properties.add(nam, val);
       return *this;
     }
 
-    /// Declare property 
-    template <typename T> Geant4Action& Geant4Action::declareProperty(const char* nam, T& val)  {
-      m_properties.add(nam,val);
+    /// Declare property
+    template <typename T> Geant4Action& Geant4Action::declareProperty(const char* nam, T& val) {
+      m_properties.add(nam, val);
       return *this;
     }
   }    // End namespace Simulation
diff --git a/DDG4/include/DDG4/Geant4ActionPhase.h b/DDG4/include/DDG4/Geant4ActionPhase.h
index 96a7f1604912a66d0981e7bf0801452670130a72..41f65e1d9c66898b9bc498e7c7d748677ebf803d 100644
--- a/DDG4/include/DDG4/Geant4ActionPhase.h
+++ b/DDG4/include/DDG4/Geant4ActionPhase.h
@@ -23,49 +23,53 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /*
 
-       Geant4Phase,  G4EventGenerator    --> G4VUserPrimaryGeneratorAction::GeneratePrimaries
-       Geant4Begin,  G4Run               --> G4UserRunAction::BeginOfRunAction
-       Geant4End,    G4Run               --> G4UserRunAction::EndOfRunAction
-       Geant4Begin,  G4Event             --> G4UserEventAction::BeginOfEventAction
-       Geant4End,    G4Event             --> G4UserEventAction::EndOfEventAction
-       Geant4Begin,  G4Track             --> G4UserTrackingAction::PreUserTrackingAction
-       Geant4End,    G4Track             --> G4UserTrackingAction::PostUserTrackingAction
-       Geant4Phase,  G4Step              --> G4UserSteppingAction::UserSteppingAction
-       Geant4Begin,  G4TrackStack        --> G4UserStackingAction::NewStage
-       Geant4End,    G4TrackStack        --> G4UserStackingAction::PrepareNewEvent
-       
-    */
+     Geant4Phase,  G4EventGenerator    --> G4VUserPrimaryGeneratorAction::GeneratePrimaries
+     Geant4Begin,  G4Run               --> G4UserRunAction::BeginOfRunAction
+     Geant4End,    G4Run               --> G4UserRunAction::EndOfRunAction
+     Geant4Begin,  G4Event             --> G4UserEventAction::BeginOfEventAction
+     Geant4End,    G4Event             --> G4UserEventAction::EndOfEventAction
+     Geant4Begin,  G4Track             --> G4UserTrackingAction::PreUserTrackingAction
+     Geant4End,    G4Track             --> G4UserTrackingAction::PostUserTrackingAction
+     Geant4Phase,  G4Step              --> G4UserSteppingAction::UserSteppingAction
+     Geant4Begin,  G4TrackStack        --> G4UserStackingAction::NewStage
+     Geant4End,    G4TrackStack        --> G4UserStackingAction::PrepareNewEvent
+
+     */
 
     /** @class Invoke Geant4ActionPhase.h DDG4/Geant4ActionPhase.h
-     * 
+     *
      * Default base class for all geant 4 actions and derivates thereof.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4ActionPhase : public Geant4Action  {
+    class Geant4ActionPhase : public Geant4Action {
     public:
       typedef std::vector<Callback> Members;
     protected:
       /// Phase members (actions) being called for a particular phase
-      Members               m_members;
+      Members m_members;
       /// Type information of the argument type of the callback
       const std::type_info* m_argTypes[3];
 
     public:
       /// Standard constructor
       Geant4ActionPhase(Geant4Context* context, const std::string& name, const std::type_info& arg_type0,
-			const std::type_info& arg_type1, const std::type_info& arg_type2);
+          const std::type_info& arg_type1, const std::type_info& arg_type2);
       /// Default destructor
       virtual ~Geant4ActionPhase();
       /// Access phase members
-      const Members& members() const                 {  return m_members;      }
+      const Members& members() const {
+        return m_members;
+      }
       /// Type of the first phase callback-argument
-      const std::type_info* const * argTypes() const {  return m_argTypes;     }
+      const std::type_info* const * argTypes() const {
+        return m_argTypes;
+      }
       /// Execute all members in the phase context
       void execute(void* argument);
       /// Add a new member to the phase
@@ -73,46 +77,46 @@ namespace DD4hep {
       /// Remove an existing member from the phase. If not existing returns false
       virtual bool remove(Callback callback);
       /// Add a new member to the phase
-      template <typename TYPE, typename IF_TYPE, typename A0, typename R> 
-	bool add(TYPE* member, R (IF_TYPE::*callback)(A0 arg))  {
-	typeinfoCheck(typeid(A0),*m_argTypes[0],"Invalid ARG0 type. Failed to add phase callback.");
-	if ( dynamic_cast<IF_TYPE*>(member) )  {
-	  //member->addRef();
-	  return add(Callback(member).make(callback));
-	}
-	throw unrelated_type_error(typeid(TYPE),typeid(IF_TYPE),"Failed to add phase callback.");
+      template <typename TYPE, typename IF_TYPE, typename A0, typename R>
+      bool add(TYPE* member, R (IF_TYPE::*callback)(A0 arg)) {
+        typeinfoCheck(typeid(A0), *m_argTypes[0], "Invalid ARG0 type. Failed to add phase callback.");
+        if (dynamic_cast<IF_TYPE*>(member)) {
+          //member->addRef();
+          return add(Callback(member).make(callback));
+        }
+        throw unrelated_type_error(typeid(TYPE), typeid(IF_TYPE), "Failed to add phase callback.");
       }
       /// Add a new member to the phase
-      template <typename TYPE, typename IF_TYPE, typename A0, typename A1, typename R> 
-	bool add(TYPE* member, R (IF_TYPE::*callback)(A0 arg0, A1 arg1))  {
-	typeinfoCheck(typeid(A0),*m_argTypes[0],"Invalid ARG0 type. Failed to add phase callback.");
-	typeinfoCheck(typeid(A1),*m_argTypes[1],"Invalid ARG1 type. Failed to add phase callback.");
-	if ( dynamic_cast<IF_TYPE*>(member) )  {
-	  //member->addRef();
-	  return add(Callback(member).make(callback));
-	}
-	throw unrelated_type_error(typeid(TYPE),typeid(IF_TYPE),"Failed to add phase callback.");
+      template <typename TYPE, typename IF_TYPE, typename A0, typename A1, typename R>
+      bool add(TYPE* member, R (IF_TYPE::*callback)(A0 arg0, A1 arg1)) {
+        typeinfoCheck(typeid(A0), *m_argTypes[0], "Invalid ARG0 type. Failed to add phase callback.");
+        typeinfoCheck(typeid(A1), *m_argTypes[1], "Invalid ARG1 type. Failed to add phase callback.");
+        if (dynamic_cast<IF_TYPE*>(member)) {
+          //member->addRef();
+          return add(Callback(member).make(callback));
+        }
+        throw unrelated_type_error(typeid(TYPE), typeid(IF_TYPE), "Failed to add phase callback.");
       }
       /// Add a new member to the phase
-      template <typename TYPE, typename IF_TYPE, typename A0, typename A1, typename A2, typename R> 
-	bool add(TYPE* member, R (IF_TYPE::*callback)(A0 arg0, A1 arg1))  {
-	typeinfoCheck(typeid(A0),*m_argTypes[0],"Invalid ARG0 type. Failed to add phase callback.");
-	typeinfoCheck(typeid(A1),*m_argTypes[1],"Invalid ARG1 type. Failed to add phase callback.");
-	typeinfoCheck(typeid(A2),*m_argTypes[2],"Invalid ARG2 type. Failed to add phase callback.");
-	if ( dynamic_cast<IF_TYPE*>(member) )  {
-	  //member->addRef();
-	  return add(Callback(member).make(callback));
-	}
-	throw unrelated_type_error(typeid(TYPE),typeid(IF_TYPE),"Failed to add phase callback.");
+      template <typename TYPE, typename IF_TYPE, typename A0, typename A1, typename A2, typename R>
+      bool add(TYPE* member, R (IF_TYPE::*callback)(A0 arg0, A1 arg1)) {
+        typeinfoCheck(typeid(A0), *m_argTypes[0], "Invalid ARG0 type. Failed to add phase callback.");
+        typeinfoCheck(typeid(A1), *m_argTypes[1], "Invalid ARG1 type. Failed to add phase callback.");
+        typeinfoCheck(typeid(A2), *m_argTypes[2], "Invalid ARG2 type. Failed to add phase callback.");
+        if (dynamic_cast<IF_TYPE*>(member)) {
+          //member->addRef();
+          return add(Callback(member).make(callback));
+        }
+        throw unrelated_type_error(typeid(TYPE), typeid(IF_TYPE), "Failed to add phase callback.");
       }
       /// Remove all member callbacks from the phase. If not existing returns false
-      template <typename TYPE, typename PMF> bool remove(TYPE* member)  {
-	return remove(Callback(member));
+      template <typename TYPE, typename PMF> bool remove(TYPE* member) {
+        return remove(Callback(member));
       }
       /// Remove an existing member callback from the phase. If not existing returns false
-      template <typename TYPE, typename PMF> bool remove(TYPE* member, PMF callback)  {
-	Callback cb(member);
-	return remove(cb.make(callback));
+      template <typename TYPE, typename PMF> bool remove(TYPE* member, PMF callback) {
+        Callback cb(member);
+        return remove(cb.make(callback));
       }
       /// Create action to execute phase members
       void call();
diff --git a/DDG4/include/DDG4/Geant4Callback.h b/DDG4/include/DDG4/Geant4Callback.h
index a443eb4182f10849b2ef0b9986aa3c4f7b5bedce..d8d0af242fb35b3942e429a1ff4f78cee6ccc2f0 100644
--- a/DDG4/include/DDG4/Geant4Callback.h
+++ b/DDG4/include/DDG4/Geant4Callback.h
@@ -19,7 +19,6 @@
  */
 namespace DD4hep {
 
-
   /**@class Callback  Callback.h CPP/Callback.h
    *
    *  Definition of the generic callback structure for member functions
@@ -28,39 +27,58 @@ namespace DD4hep {
    * @date    01/03/2013
    * @version 0.1
    */
-  struct Callback  {
-    typedef unsigned long (*func_t)(void* obj,const void* fun,const void* args[]);
+  struct Callback {
+    typedef unsigned long (*func_t)(void* obj, const void* fun, const void* args[]);
     typedef struct {
-      void *first, *second; 
+      void *first, *second;
     } mfunc_t;
     typedef unsigned long ulong;
 
-    void*   par;
-    func_t  call;
+    void* par;
+    func_t call;
     mfunc_t func;
-  Callback() : par(0), call(0) { func.first=func.second=0; }
-  Callback(void* p) : par(p), call(0) { func.first=func.second=0; }
-  Callback(void* p, void* mf, func_t c) : par(p), call(c) { func = *(mfunc_t*)mf; }
+    Callback()
+        : par(0), call(0) {
+      func.first = func.second = 0;
+    }
+    Callback(void* p)
+        : par(p), call(0) {
+      func.first = func.second = 0;
+    }
+    Callback(void* p, void* mf, func_t c)
+        : par(p), call(c) {
+      func = *(mfunc_t*) mf;
+    }
 
-    operator bool() const { return (call && par && func.first); }
+    operator bool() const {
+      return (call && par && func.first);
+    }
     unsigned long execute(const void* user_param[]) const {
-      return (*this) ? call(par,&func,user_param) : 0;
+      return (*this) ? call(par, &func, user_param) : 0;
     }
 
-    template <typename T> static T*         cast(void* p)        { return (T*)p;        }
-    template <typename T> static const T* c_cast(const void* p)  { return (const T*)p;  }
-    template <typename T> struct Wrapper { 
+    template <typename T> static T* cast(void* p) {
+      return (T*) p;
+    }
+    template <typename T> static const T* c_cast(const void* p) {
+      return (const T*) p;
+    }
+    template <typename T> struct Wrapper {
     public:
       typedef T pmf_t;
       union Functor {
-	mfunc_t  ptr;
-	pmf_t    pmf;
-	Functor(const void* f)  { ptr = *(mfunc_t*)f; }
-	Functor(pmf_t f)        { pmf = f;            }
+        mfunc_t ptr;
+        pmf_t pmf;
+        Functor(const void* f) {
+          ptr = *(mfunc_t*) f;
+        }
+        Functor(pmf_t f) {
+          pmf = f;
+        }
       };
-      static mfunc_t pmf(pmf_t f)  {
-	const Functor func(f); 
-	return func.ptr;
+      static mfunc_t pmf(pmf_t f) {
+        const Functor func(f);
+        return func.ptr;
       }
     };
     //
@@ -74,37 +92,39 @@ namespace DD4hep {
     }
     template <typename R, typename T> const Callback& make(R (T::*pmf)()) {
       typedef R (T::*pfunc_t)();
-      struct _Wrapper : public Wrapper<pfunc_t>  { 
-	static ulong  call(void* o, const void* f, const void*[]) 
-	{ return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();  }
+      struct _Wrapper : public Wrapper<pfunc_t> {
+        static ulong call(void* o, const void* f, const void*[]) {
+          return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename R, typename T> const Callback& make(R (T::*pmf)() const) {
       typedef R (T::*pfunc_t)() const;
-      struct _Wrapper : public Wrapper<pfunc_t>  { 
-	static ulong  call(void* o, const void* f, const void*[])
-	{ return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();  }
+      struct _Wrapper : public Wrapper<pfunc_t> {
+        static ulong call(void* o, const void* f, const void*[]) {
+          return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
-    template <typename T> const Callback& make(void (T::*pmf)() ) {
+    template <typename T> const Callback& make(void (T::*pmf)()) {
       typedef void (T::*pfunc_t)() const;
-      struct _Wrapper : public Wrapper<pfunc_t>  { 
-	static ulong  call(void* o, const void* f, const void*[])	  {
-	  (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
-	  return 1;
-	}
+      struct _Wrapper : public Wrapper<pfunc_t> {
+        static ulong call(void* o, const void* f, const void*[]) {
+          (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
+          return 1;
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename T> const Callback& make(void (T::*pmf)() const) {
       typedef void (T::*pfunc_t)() const;
-      struct _Wrapper : public Wrapper<pfunc_t>  { 
-	static ulong  call(void* o, const void* f, const void*[])	  {
-	  (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
-	  return 1;
-	}
+      struct _Wrapper : public Wrapper<pfunc_t> {
+        static ulong call(void* o, const void* f, const void*[]) {
+          (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
+          return 1;
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
@@ -113,33 +133,39 @@ namespace DD4hep {
     //
     template <typename R, typename T, typename A> const Callback& make(R (T::*pmf)(A)) {
       typedef R (T::*pfunc_t)(A);
-      struct _Wrapper : public Wrapper<pfunc_t>  {
-	static ulong call(void* o, const void* f, const void* u[]) 
-	{ return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A)u[0]); }
+      struct _Wrapper : public Wrapper<pfunc_t> {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A) u[0]);
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename R, typename T, typename A> const Callback& make(R (T::*pmf)(A) const) {
       typedef R (T::*pfunc_t)(A) const;
-      struct _Wrapper : public Wrapper<pfunc_t>  { 
-	static ulong  call(void* o, const void* f, const void* u[]) 
-	{ return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A)u[0]); }
+      struct _Wrapper : public Wrapper<pfunc_t> {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A) u[0]);
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename T, typename A> const Callback& make(void (T::*pmf)(A)) {
       typedef void (T::*pfunc_t)(const A);
-      struct _Wrapper : public Wrapper<pfunc_t>  {
-	static ulong call(void* o, const void* f, const void* u[]) 
-	{ (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A)u[0]); return 1; }
+      struct _Wrapper : public Wrapper<pfunc_t> {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A) u[0]);
+          return 1;
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename T, typename A> const Callback& make(void (T::*pmf)(A) const) {
       typedef void (T::*pfunc_t)(const A) const;
-      struct _Wrapper : public Wrapper<pfunc_t>  {
-	static ulong call(void* o, const void* f, const void* u[]) 
-	{ (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A)u[0]); return 1; }
+      struct _Wrapper : public Wrapper<pfunc_t> {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A) u[0]);
+          return 1;
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
@@ -147,44 +173,44 @@ namespace DD4hep {
     // Callback with 3 arguments
     //
     template <typename R, typename T, typename A0, typename A1> const Callback& make(R (T::*pmf)(A0, A1)) {
-      typedef R (T::*pfunc_t)(A0,A1);
+      typedef R (T::*pfunc_t)(A0, A1);
       typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W  {
-	static ulong call(void* o, const void* f, const void* u[])  {
-	  return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0)u[0],(A1)u[1]); 
-	}
+      struct _Wrapper : public _W {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1]);
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename R, typename T, typename A0, typename A1> const Callback& make(R (T::*pmf)(A0, A1) const) {
-      typedef R (T::*pfunc_t)(A0,A1);
+      typedef R (T::*pfunc_t)(A0, A1);
       typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W  {
-	static ulong call(void* o, const void* f, const void* u[])  {
-	  return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0)u[0],(A1)u[1]); 
-	}
+      struct _Wrapper : public _W {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1]);
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename T, typename A0, typename A1> const Callback& make(void (T::*pmf)(A0, A1)) {
-      typedef void (T::*pfunc_t)(A0,A1);
+      typedef void (T::*pfunc_t)(A0, A1);
       typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W  {
-	static ulong call(void* o, const void* f, const void* u[])  {
-	  (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0)u[0],(A1)u[1]); 
-	  return 1;
-	}
+      struct _Wrapper : public _W {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1]);
+          return 1;
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
-    template <typename T, typename A0, typename A1> const Callback& make(void (T::*pmf)(A0, A1)  const) {
-      typedef void (T::*pfunc_t)(A0,A1);
+    template <typename T, typename A0, typename A1> const Callback& make(void (T::*pmf)(A0, A1) const) {
+      typedef void (T::*pfunc_t)(A0, A1);
       typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W  {
-	static ulong call(void* o, const void* f, const void* u[])  {
-	  (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0)u[0],(A1)u[1]); 
-	  return 1;
-	}
+      struct _Wrapper : public _W {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1]);
+          return 1;
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
@@ -192,125 +218,141 @@ namespace DD4hep {
     // Callback with 3 arguments
     //
     template <typename R, typename T, typename A0, typename A1, typename A2> const Callback& make(R (T::*pmf)(A0, A1, A2)) {
-      typedef R (T::*pfunc_t)(A0,A1);
+      typedef R (T::*pfunc_t)(A0, A1);
       typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W  {
-	static ulong call(void* o, const void* f, const void* u[])  {
-	  return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0)u[0],(A1)u[1],(A2)u[2]); 
-	}
+      struct _Wrapper : public _W {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1], (A2) u[2]);
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
-    template <typename R, typename T, typename A0, typename A1, typename A2> const Callback& make(R (T::*pmf)(A0, A1, A2) const) {
-      typedef R (T::*pfunc_t)(A0,A1);
+    template <typename R, typename T, typename A0, typename A1, typename A2> const Callback& make(
+        R (T::*pmf)(A0, A1, A2) const) {
+      typedef R (T::*pfunc_t)(A0, A1);
       typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W  {
-	static ulong call(void* o, const void* f, const void* u[])  {
-	  return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0)u[0],(A1)u[1],(A2)u[2]); 
-	}
+      struct _Wrapper : public _W {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1], (A2) u[2]);
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename T, typename A0, typename A1, typename A2> const Callback& make(void (T::*pmf)(A0, A1, A2)) {
-      typedef void (T::*pfunc_t)(A0,A1);
+      typedef void (T::*pfunc_t)(A0, A1);
       typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W  {
-	static ulong call(void* o, const void* f, const void* u[])  {
-	  (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0)u[0],(A1)u[1],(A2)u[2]); 
-	  return 1;
-	}
+      struct _Wrapper : public _W {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1], (A2) u[2]);
+          return 1;
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
     template <typename T, typename A0, typename A1, typename A2> const Callback& make(void (T::*pmf)(A0, A1, A2) const) {
-      typedef void (T::*pfunc_t)(A0,A1);
+      typedef void (T::*pfunc_t)(A0, A1);
       typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W  {
-	static ulong call(void* o, const void* f, const void* u[])  {
-	  (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0)u[0],(A1)u[1],(A2)u[2]); 
-	  return 1;
-	}
+      struct _Wrapper : public _W {
+        static ulong call(void* o, const void* f, const void* u[]) {
+          (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1], (A2) u[2]);
+          return 1;
+        }
       };
       return _make(_Wrapper::call, pmf);
     }
 
-    template <typename T> static Callback make(void* p, T pmf) { return Callback(p).make(pmf); }
+    template <typename T> static Callback make(void* p, T pmf) {
+      return Callback(p).make(pmf);
+    }
 
-    template <typename P, typename R, typename T> static
-      T* dyn_cast(P* p, R (T::*)())                     {  return dynamic_cast<T*>(p);       }
-    template <typename P, typename R, typename T> static
-      const T* dyn_cast(const P* p, R (T::*)() const)   {  return dynamic_cast<const T*>(p); }
+    template <typename P, typename R, typename T> static T* dyn_cast(P* p, R (T::*)()) {
+      return dynamic_cast<T*>(p);
+    }
+    template <typename P, typename R, typename T> static const T* dyn_cast(const P* p, R (T::*)() const) {
+      return dynamic_cast<const T*>(p);
+    }
 
-    template <typename P, typename R, typename T, typename A> static
-      T* dyn_cast(P* p, R (T::*)(A))                    {  return dynamic_cast<T*>(p);       }
-    template <typename P, typename R, typename T, typename A> static
-      const T* dyn_cast(const P* p, R (T::*)(A) const)  {  return dynamic_cast<const T*>(p); }
+    template <typename P, typename R, typename T, typename A> static T* dyn_cast(P* p, R (T::*)(A)) {
+      return dynamic_cast<T*>(p);
+    }
+    template <typename P, typename R, typename T, typename A> static const T* dyn_cast(const P* p, R (T::*)(A) const) {
+      return dynamic_cast<const T*>(p);
+    }
   };
 
-  struct CallbackSequence  {
+  struct CallbackSequence {
     typedef std::vector<Callback> Callbacks;
     Callbacks callbacks;
-    CallbackSequence() {}
-    CallbackSequence(const CallbackSequence& c) : callbacks(c.callbacks) {}
-    //template <typename TYPE, typename R, typename OBJECT> 
+    CallbackSequence() {
+    }
+    CallbackSequence(const CallbackSequence& c)
+        : callbacks(c.callbacks) {
+    }
+    //template <typename TYPE, typename R, typename OBJECT>
     //  CallbackSequence(const std::vector<TYPE*>& objects, R (TYPE::value_type::*pmf)())  {
     //}
-    bool empty() const            {  return callbacks.empty();}
-    void clear()                  {  callbacks.clear();       }
-    void add(const Callback& cb)  {  callbacks.push_back(cb); }
-    void operator()()  const;
-    template <typename A0> void operator()(A0 a0)  const;
-    template <typename A0, typename A1> void operator()(A0 a0, A1 a1)  const;
-    template <typename A0, typename A1, typename A2> void operator()(A0 a0, A1 a1, A2 a2)  const;
+    bool empty() const {
+      return callbacks.empty();
+    }
+    void clear() {
+      callbacks.clear();
+    }
+    void add(const Callback& cb) {
+      callbacks.push_back(cb);
+    }
+    void operator()() const;
+    template <typename A0> void operator()(A0 a0) const;
+    template <typename A0, typename A1> void operator()(A0 a0, A1 a1) const;
+    template <typename A0, typename A1, typename A2> void operator()(A0 a0, A1 a1, A2 a2) const;
     /// Check the compatibility of two typed objects. The test is the result of a dynamic_cast
     static void checkTypes(const std::type_info& typ1, const std::type_info& typ2, void* test);
 
-    template <typename TYPE, typename R, typename OBJECT> 
-      void add(TYPE* pointer, R (OBJECT::*pmf)())   {
-      checkTypes(typeid(TYPE),typeid(OBJECT),dynamic_cast<OBJECT*>(pointer));
+    template <typename TYPE, typename R, typename OBJECT>
+    void add(TYPE* pointer, R (OBJECT::*pmf)()) {
+      checkTypes(typeid(TYPE), typeid(OBJECT), dynamic_cast<OBJECT*>(pointer));
       add(Callback(pointer).make(pmf));
     }
-    template <typename TYPE, typename R, typename OBJECT, typename A> 
-      void add(TYPE* pointer, R (OBJECT::*pmf)(A))   {
-      checkTypes(typeid(TYPE),typeid(OBJECT),dynamic_cast<OBJECT*>(pointer));
+    template <typename TYPE, typename R, typename OBJECT, typename A>
+    void add(TYPE* pointer, R (OBJECT::*pmf)(A)) {
+      checkTypes(typeid(TYPE), typeid(OBJECT), dynamic_cast<OBJECT*>(pointer));
       add(Callback(pointer).make(pmf));
     }
-    template <typename TYPE, typename R, typename OBJECT, typename A1, typename A2> 
-      void add(TYPE* pointer, R (OBJECT::*pmf)(A1,A2))   {
-      checkTypes(typeid(TYPE),typeid(OBJECT),dynamic_cast<OBJECT*>(pointer));
+    template <typename TYPE, typename R, typename OBJECT, typename A1, typename A2>
+    void add(TYPE* pointer, R (OBJECT::*pmf)(A1, A2)) {
+      checkTypes(typeid(TYPE), typeid(OBJECT), dynamic_cast<OBJECT*>(pointer));
       add(Callback(pointer).make(pmf));
     }
   };
 
-  inline void CallbackSequence::operator()()   const  {
-    if ( !callbacks.empty() )  {
+  inline void CallbackSequence::operator()() const {
+    if (!callbacks.empty()) {
       const void* args[1] = { 0 };
-      for(Callbacks::const_iterator i=callbacks.begin(); i != callbacks.end(); ++i)
-	(*i).execute(args);
+      for (Callbacks::const_iterator i = callbacks.begin(); i != callbacks.end(); ++i)
+        (*i).execute(args);
     }
   }
-  template <typename A0> inline 
-    void CallbackSequence::operator()(A0 a0)   const  {
-    if ( !callbacks.empty() )  {
+  template <typename A0> inline
+  void CallbackSequence::operator()(A0 a0) const {
+    if (!callbacks.empty()) {
       const void* args[1] = { a0 };
-      for(Callbacks::const_iterator i=callbacks.begin(); i != callbacks.end(); ++i)
-	(*i).execute(args);
+      for (Callbacks::const_iterator i = callbacks.begin(); i != callbacks.end(); ++i)
+        (*i).execute(args);
     }
   }
-  template <typename A0, typename A1> inline 
-    void CallbackSequence::operator()(A0 a0,A1 a1)   const  {
-    if ( !callbacks.empty() )  {
+  template <typename A0, typename A1> inline
+  void CallbackSequence::operator()(A0 a0, A1 a1) const {
+    if (!callbacks.empty()) {
       const void* args[2] = { a0, a1 };
-      for(Callbacks::const_iterator i=callbacks.begin(); i != callbacks.end(); ++i)
-	(*i).execute(args);
+      for (Callbacks::const_iterator i = callbacks.begin(); i != callbacks.end(); ++i)
+        (*i).execute(args);
     }
   }
-  template <typename A0, typename A1, typename A2> inline 
-    void CallbackSequence::operator()(A0 a0,A1 a1,A2 a2)   const  {
-    if ( !callbacks.empty() )  {
+  template <typename A0, typename A1, typename A2> inline
+  void CallbackSequence::operator()(A0 a0, A1 a1, A2 a2) const {
+    if (!callbacks.empty()) {
       const void* args[3] = { a0, a1, a2 };
-      for(Callbacks::const_iterator i=callbacks.begin(); i != callbacks.end(); ++i)
-	(*i).execute(args);
+      for (Callbacks::const_iterator i = callbacks.begin(); i != callbacks.end(); ++i)
+        (*i).execute(args);
     }
   }
 
diff --git a/DDG4/include/DDG4/Geant4Config.h b/DDG4/include/DDG4/Geant4Config.h
index 058c1815fbee1c152cec768e0034ff00ad235c4d..82dc24b04ca7aa2993d5b64150d5845301ca8a9c 100644
--- a/DDG4/include/DDG4/Geant4Config.h
+++ b/DDG4/include/DDG4/Geant4Config.h
@@ -20,8 +20,7 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
-
+  namespace Simulation {
 
     template <typename TYPE> class Geant4Handle;
     class Geant4Kernel;
@@ -49,30 +48,30 @@ namespace DD4hep {
     /*
      *   Simulation setup namespace declaration
      */
-    namespace Setup  {
+    namespace Setup {
       // Basics
-      typedef Geant4Kernel                                  Kernel;
+      typedef Geant4Kernel Kernel;
       // Actions
-      typedef Geant4Handle<Geant4Action>                    Action;
-      typedef Geant4Handle<Geant4Filter>                    Filter;
-      typedef Geant4Handle<Geant4GeneratorAction>           GenAction;
-      typedef Geant4Handle<Geant4RunAction>                 RunAction;
-      typedef Geant4Handle<Geant4EventAction>               EventAction;
-      typedef Geant4Handle<Geant4TrackingAction>            TrackAction;
-      typedef Geant4Handle<Geant4StackingAction>            StackAction;
-      typedef Geant4Handle<Geant4SteppingAction>            StepAction;
-      typedef Geant4Handle<Geant4PhysicsList>               PhysicsList;
-      typedef Geant4Handle<Geant4ActionPhase>               Phase;
-      typedef Geant4Handle<Geant4Sensitive>                 Sensitive;
+      typedef Geant4Handle<Geant4Action> Action;
+      typedef Geant4Handle<Geant4Filter> Filter;
+      typedef Geant4Handle<Geant4GeneratorAction> GenAction;
+      typedef Geant4Handle<Geant4RunAction> RunAction;
+      typedef Geant4Handle<Geant4EventAction> EventAction;
+      typedef Geant4Handle<Geant4TrackingAction> TrackAction;
+      typedef Geant4Handle<Geant4StackingAction> StackAction;
+      typedef Geant4Handle<Geant4SteppingAction> StepAction;
+      typedef Geant4Handle<Geant4PhysicsList> PhysicsList;
+      typedef Geant4Handle<Geant4ActionPhase> Phase;
+      typedef Geant4Handle<Geant4Sensitive> Sensitive;
       // Sequences
-      typedef Geant4Handle<Geant4SensDetActionSequence>     SensitiveSeq;
-      typedef Geant4Handle<Geant4GeneratorActionSequence>   GeneratorSeq;
-      typedef Geant4Handle<Geant4RunActionSequence>         RunActionSeq;
-      typedef Geant4Handle<Geant4EventActionSequence>       EventActionSeq;
-      typedef Geant4Handle<Geant4TrackingActionSequence>    TrackActionSeq;
-      typedef Geant4Handle<Geant4SteppingActionSequence>    StepActionSeq;
-      typedef Geant4Handle<Geant4StackingActionSequence>    StackActionSeq;
-      typedef Geant4Handle<Geant4PhysicsListActionSequence> PhysicsActionSeq; 
+      typedef Geant4Handle<Geant4SensDetActionSequence> SensitiveSeq;
+      typedef Geant4Handle<Geant4GeneratorActionSequence> GeneratorSeq;
+      typedef Geant4Handle<Geant4RunActionSequence> RunActionSeq;
+      typedef Geant4Handle<Geant4EventActionSequence> EventActionSeq;
+      typedef Geant4Handle<Geant4TrackingActionSequence> TrackActionSeq;
+      typedef Geant4Handle<Geant4SteppingActionSequence> StepActionSeq;
+      typedef Geant4Handle<Geant4StackingActionSequence> StackActionSeq;
+      typedef Geant4Handle<Geant4PhysicsListActionSequence> PhysicsActionSeq;
     }
 
   }    // End namespace Simulation
diff --git a/DDG4/include/DDG4/Geant4Context.h b/DDG4/include/DDG4/Geant4Context.h
index 4be082f38b8a33a5cc36ea5fbeef7af5b72b4808..47f3291149df166e3c0ee2287e48f118aa9817d6 100644
--- a/DDG4/include/DDG4/Geant4Context.h
+++ b/DDG4/include/DDG4/Geant4Context.h
@@ -20,7 +20,7 @@ class G4TrackingManager;
 namespace DD4hep {
 
   // Forward declarations
-  namespace Geometry  {
+  namespace Geometry {
     class LCDD;
     class DetElement;
   }
@@ -28,7 +28,7 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     class Geant4Kernel;
     class Geant4RunActionSequence;
@@ -39,26 +39,29 @@ namespace DD4hep {
     class Geant4GeneratorActionSequence;
     class Geant4SensDetSequences;
 
-
     /** @class Geant4Context  Geant4Context.h DDG4/Geant4Context.h
-     * 
+     *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4Context    {
+    struct Geant4Context {
       typedef Geometry::LCDD LCDD;
 
-      Geant4Kernel*       m_kernel;
+      Geant4Kernel* m_kernel;
       /// Reference to Geant4 track manager
-      G4TrackingManager*  m_trackMgr;
+      G4TrackingManager* m_trackMgr;
       /// Default constructor
       Geant4Context(Geant4Kernel* kernel);
       /// Default destructor
       virtual ~Geant4Context();
       /// Access the tracking manager
-      G4TrackingManager* trackMgr() const  { return m_trackMgr; }
+      G4TrackingManager* trackMgr() const {
+        return m_trackMgr;
+      }
       /// Access to the kernel object
-      Geant4Kernel& kernel()               { return *m_kernel;  }
+      Geant4Kernel& kernel() {
+        return *m_kernel;
+      }
       /// Access to detector description
       LCDD& lcdd() const;
       /// Create a user trajectory
diff --git a/DDG4/include/DDG4/Geant4Converter.h b/DDG4/include/DDG4/Geant4Converter.h
index f9dadc625dd15ffef266b5fc9bab0768eebd4461..85ef8c37b408af6001318227158d967eaa91c778 100644
--- a/DDG4/include/DDG4/Geant4Converter.h
+++ b/DDG4/include/DDG4/Geant4Converter.h
@@ -20,20 +20,21 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4Converter Geant4Converter.h DDG4/Geant4Converter.h
-     * 
+     *
      * Geometry converter from DD4hep to Geant 4.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4Converter : public Geometry::GeoHandler, public Geant4Mapping  {
-      bool            m_checkOverlaps;
+    class Geant4Converter : public Geometry::GeoHandler, public Geant4Mapping {
+    public:
+      bool m_checkOverlaps;
 
       /// Initializing Constructor
-      Geant4Converter( LCDD& lcdd );
+      Geant4Converter(LCDD& lcdd);
 
       /// Standard destructor
       virtual ~Geant4Converter();
diff --git a/DDG4/include/DDG4/Geant4Data.h b/DDG4/include/DDG4/Geant4Data.h
index ca21546d861ffdda030820a81dd0a20286b30aa5..893b4cc553fe43c3bbc38cbe4d92f1856cdbc867 100644
--- a/DDG4/include/DDG4/Geant4Data.h
+++ b/DDG4/include/DDG4/Geant4Data.h
@@ -13,7 +13,6 @@
 #include "DD4hep/Objects.h"
 #include "G4Step.hh"
 
-
 /*
  *   DD4hep namespace declaration
  */
@@ -22,119 +21,174 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
-    typedef Geometry::Position  Position;
-    typedef Geometry::Position  Direction;
+  namespace Simulation {
+    typedef Geometry::Position Position;
+    typedef Geometry::Position Direction;
 
     /** @class HitCompare Geant4Data.h DDG4/Geant4Data.h
-     * 
+     *
      *  Base class for hit comparisons.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    template<class HIT> struct HitCompare {
+    template <class HIT> struct HitCompare {
       /// Comparison function
       virtual bool operator()(const HIT* h) const = 0;
     };
 
     /** @class HitPositionCompare Geant4Data.h DDG4/Geant4Data.h
-     * 
+     *
      * Seek the hits of an arbitrary collection for the same position.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    template<class HIT> struct HitPositionCompare : public HitCompare<HIT> {
+    template <class HIT> struct HitPositionCompare : public HitCompare<HIT> {
       const Position& pos;
       /// Constructor
-      HitPositionCompare(const Position& p) : pos(p) {      }
+      HitPositionCompare(const Position& p)
+          : pos(p) {
+      }
       /// Comparison function
-      virtual bool operator()(const HIT* h) const { return pos == h->position; }
+      virtual bool operator()(const HIT* h) const {
+        return pos == h->position;
+      }
+    };
+
+    /** @class SimpleRun Geant4Data.h DDG4/Geant4Data.h
+     *
+     * Example class to store the run related information.
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    struct SimpleRun {
+      /// Run identifiers
+      int runID;
+      /// Number of events in this run
+      int numEvents;
+      /// Default constructor
+      SimpleRun();
+      /// Default destructor
+      virtual ~SimpleRun();
     };
 
+    /** @class SimpleEvent Geant4Data.h DDG4/Geant4Data.h
+     *
+     * Example class to store the event related information.
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    struct SimpleEvent {
+      typedef std::vector<long> Seeds;
+      /// Run identifiers
+      int runID;
+      /// Event identifier
+      int eventID;
+      /// Random number generator seeds
+      Seeds seeds;
+      /// Default constructor
+      SimpleEvent();
+      /// Default destructor
+      virtual ~SimpleEvent();
+    };
 
-    struct SimpleHit  {
+    /** @class SimpleHit Geant4Data.h DDG4/Geant4Data.h
+     *
+     * Base class for geant4 hit structures created by the
+     * example sensitive detectors.
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    struct SimpleHit {
       // cellID
-      long long int      cellID ;
+      long long int cellID;
 
       /** @class MonteCarloContrib
        */
       struct MonteCarloContrib {
-	/// Geant 4 Track identifier
-	int    trackID;
-	/// Particle ID from the PDG table
-	int    pdgID;
-	/// Total energy deposit in this hit
-	double deposit;
-	/// Timestamp when this energy was deposited
-	double time;
-	/// Default constructor
-      MonteCarloContrib() : trackID(-1), pdgID(-1), deposit(0.0), time(0.0) {}
-	/// Initializing constructor
-      MonteCarloContrib(int track_id, double dep, double time_stamp)
-      : trackID(track_id), pdgID(-1), deposit(dep), time(time_stamp) {}
-	/// Initializing constructor
-      MonteCarloContrib(int track_id, int pdg, double dep, double time_stamp)
-      : trackID(track_id), pdgID(pdg), deposit(dep), time(time_stamp) {}
- 	/// Copy constructor
-      MonteCarloContrib(const MonteCarloContrib& c)
-      : trackID(c.trackID), pdgID(c.pdgID), deposit(c.deposit), time(c.time) {}
-	// Clear data content
-	void clear() {
-	  time = deposit = 0.0;
-	  pdgID = trackID = -1;
-	}
+        /// Geant 4 Track identifier
+        int trackID;
+        /// Particle ID from the PDG table
+        int pdgID;
+        /// Total energy deposit in this hit
+        double deposit;
+        /// Timestamp when this energy was deposited
+        double time;
+        /// Default constructor
+        MonteCarloContrib()
+            : trackID(-1), pdgID(-1), deposit(0.0), time(0.0) {
+        }
+        /// Initializing constructor
+        MonteCarloContrib(int track_id, double dep, double time_stamp)
+            : trackID(track_id), pdgID(-1), deposit(dep), time(time_stamp) {
+        }
+        /// Initializing constructor
+        MonteCarloContrib(int track_id, int pdg, double dep, double time_stamp)
+            : trackID(track_id), pdgID(pdg), deposit(dep), time(time_stamp) {
+        }
+        /// Copy constructor
+        MonteCarloContrib(const MonteCarloContrib& c)
+            : trackID(c.trackID), pdgID(c.pdgID), deposit(c.deposit), time(c.time) {
+        }
+        // Clear data content
+        void clear() {
+          time = deposit = 0.0;
+          pdgID = trackID = -1;
+        }
       };
-      typedef MonteCarloContrib              Contribution;
+      typedef MonteCarloContrib Contribution;
       typedef std::vector<MonteCarloContrib> Contributions;
     public:
       /// Default constructor
-    SimpleHit() : cellID(0) {}
+      SimpleHit();
       /// Default destructor
       virtual ~SimpleHit();
       /// Extract the MC contribution for a given hit from the step information
       static Contribution extractContribution(G4Step* step);
     };
 
-    struct SimpleTracker  {
+    struct SimpleTracker {
       /** @class SimpleTracker::Hit Geant4Data.h DDG4/Geant4Data.h
-       * 
+       *
        * Geant4 tracker hit class. Tracker hits contain the momentum
        * direction as well as the hit position.
        *
        * @author  M.Frank
        * @version 1.0
        */
-      struct Hit : public SimpleHit  {
-	/// Hit position
-	Position           position;
-	/// Hit direction
-	Direction          momentum;
-	/// Length of the track segment contributing to this hit
-	double             length;
-	/// Monte Carlo / Geant4 information 
-	Contribution       truth;
-	/// Energy deposit in the tracker hit
-	double             energyDeposit;
-	/// Default constructor
-	Hit();
-	/// Initializing constructor
-	Hit(int track_id, int pdg_id, double deposit, double time_stamp);
-	/// Default destructor
-	virtual ~Hit();
-	/// Assignment operator
-	Hit& operator=(const Hit& c);
-	/// Clear hit content
-	Hit& clear();
-	/// Store Geant4 point and step information into tracker hit structure.
-	Hit& storePoint(G4Step* step, G4StepPoint* point);
+      struct Hit : public SimpleHit {
+        /// Hit position
+        Position position;
+        /// Hit direction
+        Direction momentum;
+        /// Length of the track segment contributing to this hit
+        double length;
+        /// Monte Carlo / Geant4 information
+        Contribution truth;
+        /// Energy deposit in the tracker hit
+        double energyDeposit;
+        /// Default constructor
+        Hit();
+        /// Initializing constructor
+        Hit(int track_id, int pdg_id, double deposit, double time_stamp);
+        /// Default destructor
+        virtual ~Hit();
+        /// Assignment operator
+        Hit& operator=(const Hit& c);
+        /// Clear hit content
+        Hit& clear();
+        /// Store Geant4 point and step information into tracker hit structure.
+        Hit& storePoint(G4Step* step, G4StepPoint* point);
       };
     };
 
-    struct SimpleCalorimeter  {
+    struct SimpleCalorimeter {
       /** @class SimpleCalorimeter::Hit Geant4Data.h DDG4/Geant4Data.h
-       * 
+       *
        * Geant4 tracker hit class. Calorimeter hits contain the momentum
        * direction as well as the hit position.
        *
@@ -143,17 +197,19 @@ namespace DD4hep {
        */
       struct Hit : public SimpleHit {
       public:
-	/// Hit position
-	Position      position;
-	/// Hit contributions by individual particles
-	Contributions truth;
-	/// Total energy deposit
-	double        energyDeposit;
+        /// Hit position
+        Position position;
+        /// Hit contributions by individual particles
+        Contributions truth;
+        /// Total energy deposit
+        double energyDeposit;
       public:
-	/// Standard constructor
-	Hit(const Position& cell_pos);
-	/// Default destructor
-	virtual ~Hit();
+        /// Default constructor (for ROOT)
+        Hit();
+        /// Standard constructor
+        Hit(const Position& cell_pos);
+        /// Default destructor
+        virtual ~Hit();
       };
     };
   }    // End namespace Simulation
diff --git a/DDG4/include/DDG4/Geant4DataConversion.h b/DDG4/include/DDG4/Geant4DataConversion.h
new file mode 100644
index 0000000000000000000000000000000000000000..7a65cf4df08fa847e951f5cede1594d810effafb
--- /dev/null
+++ b/DDG4/include/DDG4/Geant4DataConversion.h
@@ -0,0 +1,136 @@
+// $Id: Geant4Field.cpp 875 2013-11-04 16:15:14Z markus.frank@cern.ch $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#ifndef DD4HEP_DDG4_GEANT4CONVERSION_H
+#define DD4HEP_DDG4_GEANT4CONVERSION_H
+
+// Framework include files
+#include "DD4hep/VolumeManager.h"
+#include <typeinfo>
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation {
+
+    /** @class Geant4ConversionHelper Geant4DataConversion.h DDG4/Geant4DataConversion.h
+     *
+     *   @author  M.Frank
+     *   @date    13.08.2013
+     */
+    struct Geant4ConversionHelper {
+      /// Default constructor
+      Geant4ConversionHelper();
+      /// Default destructor
+      virtual ~Geant4ConversionHelper();
+      static std::string encoding(Geometry::VolumeManager vm, Geometry::VolumeManager::VolumeID vid);
+    };
+
+    /** @class Geant4Conversion Geant4DataConversion.h DDG4/Geant4DataConversion.h
+     *
+     *   @author  M.Frank
+     *   @date    13.08.2013
+     */
+    template <typename OUTPUT, typename ARGS> struct Geant4Conversion : public Geant4ConversionHelper {
+      typedef ARGS arg_t;
+      typedef OUTPUT output_t;
+      typedef Geant4Conversion<output_t, arg_t> self_t;
+      typedef std::map<const std::type_info*, Geant4Conversion*> Converters;
+      static Converters& conversions();
+      static const Geant4Conversion& converter(const std::type_info& typ);
+      /// Default constructor
+      Geant4Conversion();
+      /// Default destructor
+      virtual ~Geant4Conversion();
+      virtual OUTPUT* operator()(const ARGS& args) const = 0;
+    };
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+
+#if defined(DDG4_MAKE_INSTANTIATIONS)
+#include <stdexcept>
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation {
+
+    template <typename OUTPUT,typename ARGS>
+    Geant4Conversion<OUTPUT,ARGS>::Geant4Conversion()
+    : Geant4ConversionHelper()
+    {
+    }
+
+    template <typename OUTPUT,typename ARGS>
+    Geant4Conversion<OUTPUT,ARGS>::~Geant4Conversion()
+    {
+    }
+
+    template <typename OUTPUT,typename ARGS>
+    typename Geant4Conversion<OUTPUT,ARGS>::Converters&
+    Geant4Conversion<OUTPUT,ARGS>::conversions()
+    {
+      static Converters m;
+      return m;
+    }
+
+    template <typename OUTPUT, typename ARGS>
+    const Geant4Conversion<OUTPUT,ARGS>&
+    Geant4Conversion<OUTPUT,ARGS>::converter(const std::type_info& typ)
+    {
+      typename Converters::const_iterator i = conversions().find(&typ);
+      if ( i != conversions().end() ) {
+        return *((*i).second);
+      }
+      throw std::runtime_error(typeinfoName(typeid(self_t))+
+          ": No appropriate LCIO_OUTPUT conversion "
+          "mechanism known for tag:"+
+          typeinfoName(typ));
+    }
+
+    /** @class Geant4DataConversion Geant4DataConversion.h DDG4/Geant4DataConversion.h
+     *
+     *   @author  M.Frank
+     *   @date    13.08.2013
+     */
+    template <typename OUTPUT, typename ARGS, typename TAG>
+    struct Geant4DataConversion : public Geant4Conversion<OUTPUT,ARGS> {
+      typedef TAG tag_t;
+      typedef ARGS arg_t;
+      typedef OUTPUT output_t;
+      typedef Geant4Conversion<output_t,arg_t> self_t;
+      Geant4DataConversion(void*) : Geant4Conversion<OUTPUT,ARGS>()
+      {
+        this->self_t::conversions().insert(make_pair(&typeid(TAG),this));
+        //std::cout << "Registered " << typeinfoName(typeid(*this)) << std::endl;
+      }
+      virtual OUTPUT* operator()(const ARGS& args) const;
+    };
+
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+
+#define GEANT4_CNAME(a,b) a ## _instance_ ## b
+#define DECLARE_GEANT4_DATACONVERTER(output_type,args_type,tag,serial)	\
+  DD4hep::Simulation::Geant4DataConversion<output_type,args_type,tag> GEANT4_CNAME(s_g4_data_cnv,serial) (0);
+
+#define DECLARE_GEANT4_HITCONVERTER(output_type,args_type,tag) DECLARE_GEANT4_DATACONVERTER(output_type,args_type,tag,__LINE__)
+
+#endif
+
+#endif // DD4HEP_DDG4_GEANT4CONVERSION_H
diff --git a/DDG4/include/DDG4/Geant4DetectorConstruction.h b/DDG4/include/DDG4/Geant4DetectorConstruction.h
index 35ba2cbe4595f7b7f3d0b105c90ca02a70af2766..f4a7137edcf41a5e6085cbb32b6b18d4b2e76bee 100644
--- a/DDG4/include/DDG4/Geant4DetectorConstruction.h
+++ b/DDG4/include/DDG4/Geant4DetectorConstruction.h
@@ -10,28 +10,30 @@
 
 #include "G4VUserDetectorConstruction.hh"
 
-
 /*
  *   DD4hep namespace declaration
  */
 namespace DD4hep {
 
   // Forward declarations
-  namespace Geometry { class LCDD; }
+  namespace Geometry {
+    class LCDD;
+  }
 
   /*
    *   Simulation namespace declaration
    */
   namespace Simulation {
-    
-    class Geant4DetectorConstruction : public G4VUserDetectorConstruction  {
+
+    class Geant4DetectorConstruction : public G4VUserDetectorConstruction {
     public:
-      
+
       Geant4DetectorConstruction(Geometry::LCDD& lcdd);
-      virtual ~Geant4DetectorConstruction() {}
+      virtual ~Geant4DetectorConstruction() {
+      }
       G4VPhysicalVolume* Construct();
     private:
-      Geometry::LCDD&    m_lcdd;
+      Geometry::LCDD& m_lcdd;
       G4VPhysicalVolume* m_world;
     };
   }
diff --git a/DDG4/include/DDG4/Geant4EventAction.h b/DDG4/include/DDG4/Geant4EventAction.h
index 08f61cbf279ecdaa6652518c416b26ba48def56b..848bc44a02561555a51a8579724c87828915c3a4 100644
--- a/DDG4/include/DDG4/Geant4EventAction.h
+++ b/DDG4/include/DDG4/Geant4EventAction.h
@@ -22,16 +22,16 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4EventAction Geant4Action.h DDG4/Geant4Action.h
-     * 
-     * Concrete basic implementation of the Geant4 event action 
+     *
+     * Concrete basic implementation of the Geant4 event action
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4EventAction : public Geant4Action   {
+    class Geant4EventAction : public Geant4Action {
     public:
       /// Standard constructor
       Geant4EventAction(Geant4Context* context, const std::string& nam);
@@ -44,13 +44,13 @@ namespace DD4hep {
     };
 
     /** @class Geant4EventActionSequence Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Concrete implementation of the Geant4 event action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4EventActionSequence : public Geant4Action    {
+    class Geant4EventActionSequence : public Geant4Action {
     protected:
       /// Callback sequence for event initialization action
       CallbackSequence m_begin;
@@ -64,11 +64,15 @@ namespace DD4hep {
       /// Default destructor
       virtual ~Geant4EventActionSequence();
       /// Register begin-of-event callback
-      template <typename Q, typename T> 
-	void callAtBegin(Q* p, void (T::*f)(const G4Event*)) { m_begin.add(p,f);}
+      template <typename Q, typename T>
+      void callAtBegin(Q* p, void (T::*f)(const G4Event*)) {
+        m_begin.add(p, f);
+      }
       /// Register end-of-event callback
-      template <typename Q, typename T> 
-	void callAtEnd(Q* p, void (T::*f)(const G4Event*))   { m_end.add(p,f);  }
+      template <typename Q, typename T>
+      void callAtEnd(Q* p, void (T::*f)(const G4Event*)) {
+        m_end.add(p, f);
+      }
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4EventAction* action);
       /// begin-of-event callback
diff --git a/DDG4/include/DDG4/Geant4Field.h b/DDG4/include/DDG4/Geant4Field.h
index ebf2c66051ab4f07ae4254198f3c8a78c49752d0..805beb2ebd254ba202944c86d1c7de882ca947a6 100644
--- a/DDG4/include/DDG4/Geant4Field.h
+++ b/DDG4/include/DDG4/Geant4Field.h
@@ -34,15 +34,18 @@ namespace DD4hep {
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4Field : public G4MagneticField   {
+    struct Geant4Field : public G4MagneticField {
       /// Reference to the detector description field
-      Geometry::OverlayedField  m_field;
+      Geometry::OverlayedField m_field;
 
-      public:
+    public:
       /// Constructor. The sensitive detector element is identified by the detector name
-      Geant4Field(Geometry::OverlayedField field) : m_field(field) {}
+      Geant4Field(Geometry::OverlayedField field)
+          : m_field(field) {
+      }
       /// Standard destructor
-      virtual ~Geant4Field() {}
+      virtual ~Geant4Field() {
+      }
       /// Access field values at a given point
       virtual void GetFieldValue(const double pos[4], double *arr) const;
       /// Does field change energy ?
diff --git a/DDG4/include/DDG4/Geant4GDMLDetector.h b/DDG4/include/DDG4/Geant4GDMLDetector.h
index 6497069cef5b2d827d454a14b66218652027a63b..6b8eae0c72068f229c87a47be912782d527b5b7b 100644
--- a/DDG4/include/DDG4/Geant4GDMLDetector.h
+++ b/DDG4/include/DDG4/Geant4GDMLDetector.h
@@ -15,20 +15,21 @@
  *   DD4hep namespace declaration
  */
 namespace DD4hep {
-  
+
   /*
    *   Simulation namespace declaration
    */
   namespace Simulation {
-    
-    class Geant4GDMLDetector : public G4VUserDetectorConstruction  {
+
+    class Geant4GDMLDetector : public G4VUserDetectorConstruction {
     public:
-      
-      Geant4GDMLDetector(const std::string& gdmlFile );
-      virtual ~Geant4GDMLDetector() {}
+
+      Geant4GDMLDetector(const std::string& gdmlFile);
+      virtual ~Geant4GDMLDetector() {
+      }
       G4VPhysicalVolume* Construct();
     private:
-      std::string m_fileName ; 
+      std::string m_fileName;
       G4VPhysicalVolume* m_world;
     };
   }
diff --git a/DDG4/include/DDG4/Geant4GeneratorAction.h b/DDG4/include/DDG4/Geant4GeneratorAction.h
index a5412ec2e5fce7df35bb8045294250b458307afd..b4ac382871cf71bd649bdd0709bb066652f130a0 100644
--- a/DDG4/include/DDG4/Geant4GeneratorAction.h
+++ b/DDG4/include/DDG4/Geant4GeneratorAction.h
@@ -22,16 +22,16 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4GeneratorAction Geant4GeneratorAction.h DDG4/Geant4GeneratorAction.h
-     * 
+     *
      * Concrete implementation of the Geant4 generator action base class
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4GeneratorAction : public Geant4Action    {
+    class Geant4GeneratorAction : public Geant4Action {
     protected:
       Callback m_calls;
     public:
@@ -40,17 +40,18 @@ namespace DD4hep {
       /// Default destructor
       virtual ~Geant4GeneratorAction();
       /// Callback to generate primary particles
-      virtual void operator()(G4Event* ) {}
+      virtual void operator()(G4Event*) {
+      }
     };
 
     /** @class Geant4GeneratorActionSequence Geant4GeneratorAction.h DDG4/Geant4GeneratorAction.h
-     * 
+     *
      * Concrete implementation of the Geant4 generator action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4GeneratorActionSequence : public Geant4Action    {
+    class Geant4GeneratorActionSequence : public Geant4Action {
     protected:
       /// Callback sequence to generate primary particles
       CallbackSequence m_calls;
@@ -62,8 +63,10 @@ namespace DD4hep {
       /// Default destructor
       virtual ~Geant4GeneratorActionSequence();
       /// Register begin-of-run callback. Types Q and T must be polymorph!
-      template <typename Q, typename T> 
-	void call(Q* p, void (T::*f)(G4Event*))  { m_calls.add(p,f); }
+      template <typename Q, typename T>
+      void call(Q* p, void (T::*f)(G4Event*)) {
+        m_calls.add(p, f);
+      }
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4GeneratorAction* action);
       /// Callback to generate primary particles
diff --git a/DDG4/include/DDG4/Geant4GeometryInfo.h b/DDG4/include/DDG4/Geant4GeometryInfo.h
index b842d27b085b01e74aae4f5ec1f7b59cc93e0ed7..d56dcb41c5330a7458499eb1c66328110dded408 100644
--- a/DDG4/include/DDG4/Geant4GeometryInfo.h
+++ b/DDG4/include/DDG4/Geant4GeometryInfo.h
@@ -43,47 +43,47 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     // Forward declarations
     class Geant4Mapping;
-    
-    struct Geant4GeometryInfo : public TNamed, public Geometry::GeoHandlerTypes::GeometryInfo   {
+
+    struct Geant4GeometryInfo : public TNamed, public Geometry::GeoHandlerTypes::GeometryInfo {
     public:
-      typedef std::vector<const G4VPhysicalVolume*>                      PlacementPath;
-      typedef std::vector<std::pair<size_t,const TGeoNode*> >            AssemblyChildren;
-      typedef std::map<const TGeoElement*,     G4Element*>               ElementMap;
-      typedef std::map<const TGeoMedium*,      G4Material*>              MaterialMap;
-      typedef std::map<const TNamed*,          G4UserLimits*>            LimitMap;
-      typedef std::map<const TGeoNode*,        G4VPhysicalVolume*>       PlacementMap;
-      typedef std::map<const G4AssemblyVolume*,AssemblyChildren>         AssemblyChildMap;
-      typedef std::map<const TNamed*,          G4Region*>                RegionMap;
-      typedef std::map<const TNamed*,          G4VSensitiveDetector*>    SensDetMap;
-      typedef std::map<const TGeoVolume*,      G4LogicalVolume*>         VolumeMap;
-      typedef std::map<const TGeoShape*,       G4VSolid*>                SolidMap;
-      typedef std::map<const TNamed*,          G4VisAttributes*>         VisMap;
-      typedef std::map<PlacementPath,          VolumeID>                 PathMap;
+      typedef std::vector<const G4VPhysicalVolume*> PlacementPath;
+      typedef std::vector<std::pair<size_t, const TGeoNode*> > AssemblyChildren;
+      typedef std::map<const TGeoElement*, G4Element*> ElementMap;
+      typedef std::map<const TGeoMedium*, G4Material*> MaterialMap;
+      typedef std::map<const TNamed*, G4UserLimits*> LimitMap;
+      typedef std::map<const TGeoNode*, G4VPhysicalVolume*> PlacementMap;
+      typedef std::map<const G4AssemblyVolume*, AssemblyChildren> AssemblyChildMap;
+      typedef std::map<const TNamed*, G4Region*> RegionMap;
+      typedef std::map<const TNamed*, G4VSensitiveDetector*> SensDetMap;
+      typedef std::map<const TGeoVolume*, G4LogicalVolume*> VolumeMap;
+      typedef std::map<const TGeoShape*, G4VSolid*> SolidMap;
+      typedef std::map<const TNamed*, G4VisAttributes*> VisMap;
+      typedef std::map<PlacementPath, VolumeID> PathMap;
 
-      typedef Geometry::GeoHandlerTypes::SensitiveVolumes                SensitiveVolumes;
-      typedef Geometry::GeoHandlerTypes::RegionVolumes                   RegionVolumes;
-      typedef Geometry::GeoHandlerTypes::LimitVolumes                    LimitVolumes;
+      typedef Geometry::GeoHandlerTypes::SensitiveVolumes SensitiveVolumes;
+      typedef Geometry::GeoHandlerTypes::RegionVolumes RegionVolumes;
+      typedef Geometry::GeoHandlerTypes::LimitVolumes LimitVolumes;
 
-      ElementMap              g4Elements;
-      MaterialMap             g4Materials;
-      SolidMap                g4Solids;
-      VolumeMap               g4Volumes;
-      PlacementMap            g4Placements;
-      AssemblyChildMap        g4AssemblyChildren;
-      RegionMap               g4Regions;
-      VisMap                  g4Vis;
-      LimitMap                g4Limits;
-      SensDetMap              g4SensDets;
-      PathMap                 g4Paths;
+      ElementMap g4Elements;
+      MaterialMap g4Materials;
+      SolidMap g4Solids;
+      VolumeMap g4Volumes;
+      PlacementMap g4Placements;
+      AssemblyChildMap g4AssemblyChildren;
+      RegionMap g4Regions;
+      VisMap g4Vis;
+      LimitMap g4Limits;
+      SensDetMap g4SensDets;
+      PathMap g4Paths;
 
-      SensitiveVolumes        sensitives;
-      RegionVolumes           regions;
-      LimitVolumes            limits;
-      bool                    valid;
+      SensitiveVolumes sensitives;
+      RegionVolumes regions;
+      LimitVolumes limits;
+      bool valid;
     private:
       friend class Geant4Mapping;
       /// Default constructor
diff --git a/DDG4/include/DDG4/Geant4Handle.h b/DDG4/include/DDG4/Geant4Handle.h
index bd6f7869c8f75f1f32b68735b6e4999258a50c67..30f15403004c7043edf72decb9a68e1699c62053 100644
--- a/DDG4/include/DDG4/Geant4Handle.h
+++ b/DDG4/include/DDG4/Geant4Handle.h
@@ -10,7 +10,7 @@
 #define DD4HEP_DDG4_GEANT4SETUP_H
 
 // Framework include files
-#include "DDG4/ComponentUtils.h"
+#include "DDG4/ComponentProperties.h"
 #include "DD4hep/LCDD.h"
 
 // C/C++ include files
@@ -25,20 +25,20 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /// Forward declarations
     class Geant4Kernel;
     class Geant4Action;
 
     /** @class Geant4Handle Geant4Handle.h DDG4/Geant4Handle.h
-     * 
+     *
      * Handle to Geant4 actions with built-in creation mechanism
      *
      * @author  M.Frank
      * @version 1.0
      */
-    template <typename TYPE> struct Geant4Handle  {
+    template <typename TYPE> struct Geant4Handle {
     protected:
       void checked_assign(TYPE* p);
     public:
@@ -46,14 +46,14 @@ namespace DD4hep {
       mutable handled_type* value;
       Geant4Handle();
       Geant4Handle(handled_type* typ);
-      template <typename T> Geant4Handle(T* typ) : value(0)
-      { checked_assign(dynamic_cast<TYPE*>(typ));  }
+      template <typename T> Geant4Handle(T* typ)
+          : value(0) {
+        checked_assign(dynamic_cast<TYPE*>(typ));
+      }
       Geant4Handle(Geant4Handle& handle);
-      Geant4Handle(const Geant4Kernel&,const std::string& type_name);
+      Geant4Handle(const Geant4Kernel&, const std::string& type_name);
       /// Constructor only implemented for sensitive objects
-      Geant4Handle(const Geant4Kernel& ctxt,
-		   const std::string& type_name,
-		   const std::string& detector);
+      Geant4Handle(const Geant4Kernel& ctxt, const std::string& type_name, const std::string& detector);
       ~Geant4Handle();
       Property& operator[](const std::string& property_name) const;
       Geant4Handle& operator=(Geant4Handle& handle);
diff --git a/DDG4/include/DDG4/Geant4HierarchyDump.h b/DDG4/include/DDG4/Geant4HierarchyDump.h
index 5c9b48cfecfb3a9991532b98df795ccc0a4c5e35..0ae0a8d7f95e5c89943529cb5a8663e8fd651681 100644
--- a/DDG4/include/DDG4/Geant4HierarchyDump.h
+++ b/DDG4/include/DDG4/Geant4HierarchyDump.h
@@ -17,16 +17,18 @@
 namespace DD4hep {
 
   // Forward declarations
-  namespace Geometry { class LCDD; }
+  namespace Geometry {
+    class LCDD;
+  }
 
   /*
    *   Simulation namespace declaration
    */
   namespace Simulation {
 
-    struct Geant4HierarchyDump  {
-      typedef Geometry::LCDD   LCDD;
-      LCDD&                    m_lcdd;
+    struct Geant4HierarchyDump {
+      typedef Geometry::LCDD LCDD;
+      LCDD& m_lcdd;
 
     public:
       /// Initializing Constructor
diff --git a/DDG4/include/DDG4/Geant4HitCollection.h b/DDG4/include/DDG4/Geant4HitCollection.h
index 06e9566885842566aa2c486b78f16d1572b34158..65a17d9a260f2735c5903de2462d14ab39c2815a 100644
--- a/DDG4/include/DDG4/Geant4HitCollection.h
+++ b/DDG4/include/DDG4/Geant4HitCollection.h
@@ -10,6 +10,7 @@
 #define DD4HEP_DDG4_GEANT4HITCOLLECTION_H
 
 // Framework include files
+#include "DDG4/ComponentUtils.h"
 #include "G4VHitsCollection.hh"
 #include "G4VHit.hh"
 
@@ -27,14 +28,14 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
-    
+  namespace Simulation {
+
     // Forward declarations
     class Geant4HitCollection;
     class Geant4HitWrapper;
 
     /** @class Geant4HitWrapper Geant4HitCollection.h DDG4/Geant4HitCollection.h
-     * 
+     *
      *  Default base class for all geant 4 created hits.
      *  The hit is stored in an opaque way and can be accessed by the
      *  collection.
@@ -42,104 +43,73 @@ namespace DD4hep {
      *  @author  M.Frank
      *  @version 1.0
      */
-    class Geant4HitWrapper : public G4VHit  {
+    class Geant4HitWrapper: public G4VHit {
     private:
     public:
-      struct InvalidHit { virtual ~InvalidHit();  };
+      struct InvalidHit {
+        virtual ~InvalidHit();
+      };
 
       struct HitManipulator {
       public:
-	typedef std::pair<void*,HitManipulator*> Wrapper;
-	typedef void  (*destroy_t)(Wrapper& data);
-	typedef void* (*cast_t)(const Wrapper& data);
-	const std::type_info& type;
-	destroy_t             destroy;
-	cast_t                cast;
-
-	/// Initializing Constructor
-	HitManipulator(const std::type_info& t, destroy_t d, cast_t c);
-	/// Check to collection type against the argument (used during insertion)
-	void checkHitType(const std::type_info& type) const;
-	/// Check pointer to be of proper type
-	template <typename TYPE> Wrapper checkHit(TYPE* obj)   {
-	  if ( obj )  {
-	    Wrapper wrap(obj,this);
-	    HitManipulator* obj_type = HitManipulator::instance<TYPE>();
-	    if ( obj_type == this )   {
-	      return wrap;
-	    }
-	    wrap.first = (obj_type->cast)(wrap);
-	    if ( wrap.first )  {
-	      return wrap;
-	    }
-	    checkHitType(obj_type->type);
-	  }
-	  throw std::runtime_error("Invalid hit pointer passed to collection!");
-	}
-	/// Static function to delete contained hits
-	template <typename TYPE> static void deleteHit(Wrapper& obj) {
-	  TYPE* p = (TYPE*)obj.first;
-	  if ( p ) delete p;
-	  obj.first = 0;
-	}
-	/// Static function to cast to the desired type
-	template <typename TYPE> static void* castHit(const Wrapper& obj) {
-	  HitManipulator* me = HitManipulator::instance<TYPE>();
-	  if ( me == obj.second )   {
-	    return (TYPE*)obj.first;
-	  }
-	  G4VHit* hit = (G4VHit*)obj.first;
-	  TYPE* p = dynamic_cast<TYPE*>(hit);
-	  if ( p )  {
-	    return p;
-	  }
-	  if ( obj.first )  {
-	    obj.second->checkHitType(me->type);
-	  }
-	  return 0;
-	}
-	/// Static function to cast to the desired type
-	template <typename TYPE> static const void* castHit(const Wrapper& obj) {
-	  HitManipulator* me = HitManipulator::instance<TYPE>();
-	  if ( me == obj.second )   {
-	    return (const TYPE*)obj.first;
-	  }
-	  G4VHit* hit = (G4VHit*)obj.first;
-	  const TYPE* p = dynamic_cast<const TYPE*>(hit);
-	  if ( p )  {
-	    return p;
-	  }
-	  if ( obj.first )  {
-	    obj.second->checkHitType(me->type);
-	  }
-	  return 0;
-	}
-	template <typename TYPE> static HitManipulator* instance()  {
-	  static HitManipulator m(typeid(TYPE),deleteHit<TYPE>,castHit<TYPE>);
-	  return &m;
-	}
+        typedef std::pair<void*, HitManipulator*> Wrapper;
+        typedef void (*destroy_t)(Wrapper& data);
+        const ComponentCast& cast;
+        const ComponentCast& vec_type;
+        destroy_t destroy;
+
+        /// Initializing Constructor
+        HitManipulator(const ComponentCast& c, const ComponentCast& v, destroy_t d);
+        /// Default destructor
+        ~HitManipulator();
+        /// Check pointer to be of proper type
+        template <typename TYPE> Wrapper castHit(TYPE* obj) {
+          if (obj) {
+            ComponentCast& me = ComponentCast::instance<TYPE>();
+            Wrapper wrap(obj, this);
+            if (&cast == &me) {
+              return wrap;
+            }
+            // Need to ensure that the container types are the same!
+            wrap.first = me.apply_dynCast(cast.type, obj);
+            return wrap;
+          }
+          throw std::runtime_error("Invalid hit pointer passed to collection!");
+        }
+        /// Static function to delete contained hits
+        template <typename TYPE> static void deleteHit(Wrapper& obj) {
+          TYPE* p = (TYPE*) obj.first;
+          if (p)
+            delete p;
+          obj.first = 0;
+        }
+        template <typename TYPE> static HitManipulator* instance() {
+          static HitManipulator m(ComponentCast::instance<TYPE>(), ComponentCast::instance<std::vector<TYPE*> >(),
+              deleteHit<TYPE>);
+          return &m;
+        }
       };
 
-    protected:
       typedef HitManipulator::Wrapper Wrapper;
+    protected:
       mutable Wrapper m_data;
 
     public:
-      
+
       /// Default constructor
-      Geant4HitWrapper()  {
+      Geant4HitWrapper() {
         m_data.second = manipulator<InvalidHit>();
-	m_data.first = 0;
+        m_data.first = 0;
       }
       /// Copy constructor
-      Geant4HitWrapper(const Geant4HitWrapper& v)  {	
-	m_data = v.m_data;
-	v.m_data.first = 0;
-	//v.release();
+      Geant4HitWrapper(const Geant4HitWrapper& v) {
+        m_data = v.m_data;
+        v.m_data.first = 0;
+        //v.release();
       }
       /// Copy constructor
-      Geant4HitWrapper(const Wrapper& v)  {	
-	m_data = v;
+      Geant4HitWrapper(const Wrapper& v) {
+        m_data = v;
       }
       /// Default destructor
       virtual ~Geant4HitWrapper();
@@ -151,25 +121,37 @@ namespace DD4hep {
       void* release();
       /// Release data for copy
       Wrapper releaseData();
+      /// Access to cast grammar
+      HitManipulator* manip() const {
+        return m_data.second;
+      }
+      /// Pointer/Object access
+      void* data() {
+        return m_data.first;
+      }
+      /// Pointer/Object access (CONST)
+      void* data() const {
+        return m_data.first;
+      }
       /// Generate manipulator object
-      template <typename TYPE> static HitManipulator* manipulator()  {
-	return HitManipulator::instance<TYPE>();
+      template <typename TYPE> static HitManipulator* manipulator() {
+        return HitManipulator::instance<TYPE>();
       }
       /// Assignment transfers the pointer ownership
-      Geant4HitWrapper& operator=(const Geant4HitWrapper& v)  {
-	m_data = v.m_data;
-	v.m_data.first = 0;
-	//v.release();
-	return *this;
+      Geant4HitWrapper& operator=(const Geant4HitWrapper& v) {
+        m_data = v.m_data;
+        v.m_data.first = 0;
+        //v.release();
+        return *this;
       }
       /// Automatic conversion to the desired type
-      template <typename TYPE> operator TYPE*() const   {
-	return (TYPE*)(m_data.second->cast(m_data));
+      template <typename TYPE> operator TYPE*() const {
+        return (TYPE*) m_data.second->cast.apply_downCast(typeid(TYPE), m_data.first);
       }
     };
 
     /** @class Geant4HitCollection Geant4HitCollection.h DDG4/Geant4HitCollection.h
-     * 
+     *
      * Opaque hit collection.
      * This hit collection is for good reasons homomorph,
      * Polymorphism without an explicit type would only
@@ -178,64 +160,106 @@ namespace DD4hep {
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4HitCollection  : public G4VHitsCollection  {
+    class Geant4HitCollection: public G4VHitsCollection {
     public:
-      typedef std::vector<Geant4HitWrapper>    WrappedHits;
+      typedef std::vector<Geant4HitWrapper> WrappedHits;
       typedef Geant4HitWrapper::HitManipulator Manip;
 
       /** @class Compare Geant4HitCollection.h DDG4/Geant4HitCollection.h
-       * 
+       *
        *  Base class for hit comparisons.
        *
        * @author  M.Frank
        * @version 1.0
        */
       struct Compare {
-	/// Comparison function
-	virtual void* operator()(const Geant4HitWrapper& w) const = 0;
+        /// Comparison function
+        virtual void* operator()(const Geant4HitWrapper& w) const = 0;
       };
 
     protected:
       /// The collection of hit pointers in the wrapped format
       WrappedHits m_hits;
       /// The type of the objects in this collection. Set by the constructor
-      Manip*      m_manipulator;
+      Manip* m_manipulator;
 
     protected:
       /// Notification to increase the instance counter
       void newInstance();
       /// Find hit in a collection by comparison of attributes
-      void* findHit(const Compare& cmp)  const;
+      void* findHit(const Compare& cmp) const;
+      /// Release all hits from the Geant4 container and pass ownership to the caller
+      void releaseData(const ComponentCast& cast, std::vector<void*>* result);
+      /// Release all hits from the Geant4 container. Ownership stays with the container
+      void getData(const ComponentCast& cast, std::vector<void*>* result);
 
     public:
+      /// Initializing constructor (C++ version)
+      template <typename TYPE>
+      Geant4HitCollection(const std::string& det, const std::string& coll)
+          : G4VHitsCollection(det, coll), m_manipulator(Geant4HitWrapper::manipulator<TYPE>()) {
+        newInstance();
+        m_hits.reserve(200);
+      }
       /// Initializing constructor
       template <typename TYPE>
-	Geant4HitCollection(const std::string& det, const std::string& coll, const TYPE*)
-	: G4VHitsCollection(det,coll), m_manipulator(Geant4HitWrapper::manipulator<TYPE>())
-	{
-	  newInstance();
-	  m_hits.reserve(200);
-	}
+      Geant4HitCollection(const std::string& det, const std::string& coll, const TYPE*)
+          : G4VHitsCollection(det, coll), m_manipulator(Geant4HitWrapper::manipulator<TYPE>()) {
+        newInstance();
+        m_hits.reserve(200);
+      }
       /// Default destructor
       virtual ~Geant4HitCollection();
+      /// Type information of the object stored
+      const ComponentCast& type() const;
+      /// Type information of the vector type for extracting data
+      const ComponentCast& vector_type() const;
       /// Access individual hits
-      virtual G4VHit* GetHit(size_t which) const      {  return (G4VHit*)&m_hits.at(which); } 
+      virtual G4VHit* GetHit(size_t which) const {
+        return (G4VHit*) &m_hits.at(which);
+      }
       /// Access the collection size
-      virtual size_t  GetSize() const                 {  return m_hits.size();              }
+      virtual size_t GetSize() const {
+        return m_hits.size();
+      }
       /// Access the hit wrapper
-      Geant4HitWrapper& hit(size_t which)             {  return m_hits.at(which);           }
+      Geant4HitWrapper& hit(size_t which) {
+        return m_hits.at(which);
+      }
       /// Access the hit wrapper (CONST)
-      const Geant4HitWrapper& hit(size_t which) const {  return m_hits.at(which);           }
+      const Geant4HitWrapper& hit(size_t which) const {
+        return m_hits.at(which);
+      }
       /// Add a new hit with a check, that the hit is of the same type
-      template <typename TYPE> void add(TYPE* hit)   {
-	Geant4HitWrapper w(m_manipulator->checkHit(hit));
-	m_hits.push_back(w);
+      template <typename TYPE> void add(TYPE* hit) {
+        Geant4HitWrapper w(m_manipulator->castHit(hit));
+        m_hits.push_back(w);
       }
       /// Find hits in a collection by comparison of attributes
-      template <typename TYPE> TYPE* find(const Compare& cmp)  const  {
-	return (TYPE*)findHit(cmp);
+      template <typename TYPE> TYPE* find(const Compare& cmp) const {
+        return (TYPE*) findHit(cmp);
       }
+      /// Release all hits from the Geant4 container and pass ownership to the caller
+      template <typename TYPE> std::vector<TYPE*> releaseHits() {
+        std::vector<TYPE*> vec;
+        if (m_hits.size() != 0) {
+          releaseData(ComponentCast::instance<TYPE>(), (std::vector<void*>*) &vec);
+        }
+        return vec;
+      }
+      /// Release all hits from the Geant4 container and pass ownership to the caller
+      void releaseHitsUnchecked(std::vector<void*>& result);
 
+      /// Release all hits from the Geant4 container. Ownership stays with the container
+      template <typename TYPE> std::vector<TYPE*> getHits() {
+        std::vector<TYPE*> vec;
+        if (m_hits.size() != 0) {
+          getData(ComponentCast::instance<TYPE>(), (std::vector<void*>*) &vec);
+        }
+        return vec;
+      }
+      /// Release all hits from the Geant4 container. Ownership stays with the container
+      void getHitsUnchecked(std::vector<void*>& result);
     };
 
   }    // End namespace Simulation
diff --git a/DDG4/include/DDG4/Geant4Hits.h b/DDG4/include/DDG4/Geant4Hits.h
index c185fc66a4f460e797c6fd1dba96025c436dd403..7a0c9f8833daf60204421182e36f4178dbaeec29 100644
--- a/DDG4/include/DDG4/Geant4Hits.h
+++ b/DDG4/include/DDG4/Geant4Hits.h
@@ -18,7 +18,6 @@
 #include "G4Step.hh"
 #include "G4StepPoint.hh"
 
-
 /*
  *   DD4hep namespace declaration
  */
@@ -27,122 +26,132 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     // Forward declarations;
-    template<class HIT> struct HitCompare;
-    template<class HIT> struct HitPositionCompare;
+    template <class HIT> struct HitCompare;
+    template <class HIT> struct HitPositionCompare;
     class Geant4Hit;
     class Geant4TrackerHit;
     class Geant4CalorimeterHit;
 
-
     /** @class HitCompare Geant4Hits.h DDG4/Geant4Hits.h
-     * 
+     *
      *  Base class for hit comparisons.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    template<class HIT> struct HitCompare {
+    template <class HIT> struct HitCompare {
       /// Comparison function
       virtual bool operator()(const HIT* h) const = 0;
     };
 
     /** @class HitPositionCompare Geant4Hits.h DDG4/Geant4Hits.h
-     * 
+     *
      * Seek the hits of an arbitrary collection for the same position.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    template<class HIT> struct HitPositionCompare : public HitCompare<HIT> {
+    template <class HIT> struct HitPositionCompare: public HitCompare<HIT> {
       const Position& pos;
       /// Constructor
-      HitPositionCompare(const Position& p) : pos(p) {      }
+      HitPositionCompare(const Position& p)
+          : pos(p) {
+      }
       /// Comparison function
-      virtual bool operator()(const HIT* h) const { return pos == h->position; }
+      virtual bool operator()(const HIT* h) const {
+        return pos == h->position;
+      }
     };
 
     /** @class Geant4Hit Geant4Hits.h DDG4/Geant4Hits.h
-     * 
-     * Geant4 hit base class. Here only the basic 
+     *
+     * Geant4 hit base class. Here only the basic
      * quantites are stored such as the energy deposit and
      * the time stamp.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4Hit : public G4VHit {
+    class Geant4Hit: public G4VHit {
     public:
 
       // cellID
-      unsigned long     cellID ;
-      
+      unsigned long cellID;
+
       struct MonteCarloContrib {
-	/// Geant 4 Track identifier
-	int    trackID;
-	/// Particle ID from the PDG table
-	int    pdgID;
-	/// Total energy deposit in this hit
-	double deposit;
-	/// Timestamp when this energy was deposited
-	double time;
-	MonteCarloContrib() : trackID(-1), pdgID(-1), deposit(0.0), time(0.0) {}
-	MonteCarloContrib(int track_id, double dep, double time_stamp)
-	  : trackID(track_id), pdgID(-1), deposit(dep), time(time_stamp) {}
-	MonteCarloContrib(int track_id, int pdg, double dep, double time_stamp)
-	  : trackID(track_id), pdgID(pdg), deposit(dep), time(time_stamp) {}
- 	MonteCarloContrib(const MonteCarloContrib& c)
-	  : trackID(c.trackID), pdgID(c.pdgID), deposit(c.deposit), time(c.time) {}
-	void clear() {
-	  time = deposit = 0.0;
-	  pdgID = trackID = -1;
-	}
-     };
-      typedef MonteCarloContrib              Contribution;
+        /// Geant 4 Track identifier
+        int trackID;
+        /// Particle ID from the PDG table
+        int pdgID;
+        /// Total energy deposit in this hit
+        double deposit;
+        /// Timestamp when this energy was deposited
+        double time;
+        MonteCarloContrib()
+            : trackID(-1), pdgID(-1), deposit(0.0), time(0.0) {
+        }
+        MonteCarloContrib(int track_id, double dep, double time_stamp)
+            : trackID(track_id), pdgID(-1), deposit(dep), time(time_stamp) {
+        }
+        MonteCarloContrib(int track_id, int pdg, double dep, double time_stamp)
+            : trackID(track_id), pdgID(pdg), deposit(dep), time(time_stamp) {
+        }
+        MonteCarloContrib(const MonteCarloContrib& c)
+            : trackID(c.trackID), pdgID(c.pdgID), deposit(c.deposit), time(c.time) {
+        }
+        void clear() {
+          time = deposit = 0.0;
+          pdgID = trackID = -1;
+        }
+      };
+      typedef MonteCarloContrib Contribution;
       typedef std::vector<MonteCarloContrib> Contributions;
 
     public:
       /// Standard constructor
-      Geant4Hit()          {}
+      Geant4Hit() {
+      }
       /// Default destructor
-      virtual ~Geant4Hit() {}
+      virtual ~Geant4Hit() {
+      }
       /// Check if the Geant4 track is a Geantino
       static bool isGeantino(G4Track* track);
       /// Extract the MC contribution for a given hit from the step information
       static Contribution extractContribution(G4Step* step);
     };
 
-
     /** @class Geant4TrackerHit Geant4Hits.h DDG4/Geant4Hits.h
-     * 
+     *
      * Geant4 tracker hit class. Tracker hits contain the momentum
      * direction as well as the hit position.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4TrackerHit : public Geant4Hit {
+    class Geant4TrackerHit: public Geant4Hit {
     public:
       /// Hit position
-      Position           position;
+      Position position;
       /// Hit direction
-      Direction          momentum;
+      Direction momentum;
       /// Length of the track segment contributing to this hit
-      double             length;
-      /// Monte Carlo / Geant4 information 
-      Contribution       truth;
+      double length;
+      /// Monte Carlo / Geant4 information
+      Contribution truth;
+
+      double energyDeposit;
 
-      double      energyDeposit;
-               
     public:
       /// Default constructor
       Geant4TrackerHit();
       /// Standard initializing constructor
       Geant4TrackerHit(int track_id, int pdg_id, double deposit, double time_stamp);
       /// Default destructor
-      virtual ~Geant4TrackerHit() {}
+      virtual ~Geant4TrackerHit() {
+      }
       /// Clear hit content
       Geant4TrackerHit& clear();
       /// Store Geant4 point and step information into tracker hit structure.
@@ -157,26 +166,27 @@ namespace DD4hep {
     };
 
     /** @class Geant4CalorimeterHit Geant4Hits.h DDG4/Geant4Hits.h
-     * 
+     *
      * Geant4 tracker hit class. Calorimeter hits contain the momentum
      * direction as well as the hit position.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4CalorimeterHit : public Geant4Hit {
+    class Geant4CalorimeterHit: public Geant4Hit {
     public:
       /// Hit position
-      Position      position;
+      Position position;
       /// Hit contributions by individual particles
       Contributions truth;
       /// Total energy deposit
-      double        energyDeposit;
+      double energyDeposit;
     public:
       /// Standard constructor
       Geant4CalorimeterHit(const Position& cell_pos);
       /// Default destructor
-      virtual ~Geant4CalorimeterHit() {}
+      virtual ~Geant4CalorimeterHit() {
+      }
       /// Geant4 required object allocator
       void *operator new(size_t);
       /// Geat4 required object destroyer
diff --git a/DDG4/include/DDG4/Geant4Kernel.h b/DDG4/include/DDG4/Geant4Kernel.h
index c7352a0309440a4490d8c31f9b36ff77d9e34b07..390f1654595c0be8baff5e0f22aca575f83ff002 100644
--- a/DDG4/include/DDG4/Geant4Kernel.h
+++ b/DDG4/include/DDG4/Geant4Kernel.h
@@ -18,7 +18,10 @@
 #include <string>
 #include <typeinfo>
 
+// Forward declarations
 class G4RunManager;
+class G4UIdirectory;
+
 /*
  *   DD4hep namespace declaration
  */
@@ -27,7 +30,7 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     // Forward declarations
     class Geant4ActionPhase;
@@ -50,80 +53,81 @@ namespace DD4hep {
     class Geant4SensDetActionSequence;
     class Geant4SensDetSequences;
 
-
     /** @class Invoke Geant4Kernel.h DDG4/Geant4Kernel.h
-     * 
+     *
      * Default base class for all geant 4 actions and derivates thereof.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4Kernel   {
+    class Geant4Kernel {
     public:
       typedef DD4hep::Geometry::LCDD LCDD;
-      typedef std::map<std::string,Geant4ActionPhase*> Phases;
-      typedef std::map<std::string,Geant4Action*>      GlobalActions;
-      
+      typedef std::map<std::string, Geant4ActionPhase*> Phases;
+      typedef std::map<std::string, Geant4Action*> GlobalActions;
+
     protected:
       /// Reference to execution context
-      Geant4Context*                   m_context;
+      Geant4Context* m_context;
       /// Reference to the run manager
-      G4RunManager*                    m_runManager;
+      G4RunManager* m_runManager;
+      /// Top level control directory
+      G4UIdirectory* m_control;
       /// Property pool
-      PropertyManager                  m_properties;
+      PropertyManager m_properties;
       /// Reference to the Geant4 primary generator action
-      Geant4GeneratorActionSequence*   m_generatorAction;
+      Geant4GeneratorActionSequence* m_generatorAction;
       /// Reference to the Geant4 run action
-      Geant4RunActionSequence*         m_runAction;
+      Geant4RunActionSequence* m_runAction;
       /// Reference to the Geant4 event action
-      Geant4EventActionSequence*       m_eventAction;
+      Geant4EventActionSequence* m_eventAction;
       /// Reference to the Geant4 track action
-      Geant4TrackingActionSequence*    m_trackingAction;
+      Geant4TrackingActionSequence* m_trackingAction;
       /// Reference to the Geant4 step action
-      Geant4SteppingActionSequence*    m_steppingAction;
+      Geant4SteppingActionSequence* m_steppingAction;
       /// Reference to the Geant4 stacking action
-      Geant4StackingActionSequence*    m_stackingAction;
+      Geant4StackingActionSequence* m_stackingAction;
       /// Reference to the Geant4 sensitive action sequences
-      Geant4SensDetSequences*          m_sensDetActions;
+      Geant4SensDetSequences* m_sensDetActions;
       /// Reference to the geant4 physics list
       Geant4PhysicsListActionSequence* m_physicsList;
       /// Action phases
-      Phases                           m_phases;
+      Phases m_phases;
       /// Globally registered actions
-      GlobalActions                    m_globalActions;
+      GlobalActions m_globalActions;
       /// Globally registered filters of sensitive detectors
-      GlobalActions                    m_globalFilters;
+      GlobalActions m_globalFilters;
       /// Detector description object
-      LCDD&                            m_lcdd;
+      LCDD& m_lcdd;
+      /// Name of the G4UI command tree
+      std::string m_controlName;
       /// Helper to register an action sequence
-      template <typename C> bool registerSequence(C*& seq,const std::string& name);
+      template <typename C> bool registerSequence(C*& seq, const std::string& name);
 
       /// Standard constructor
       Geant4Kernel(LCDD& lcdd);
-   public:
+    public:
 
       /** @class PhaseSelector Geant4Kernel.h DDG4/Geant4Kernel.h
-       * 
+       *
        * Embedded helper class to facilitate map access to the phases.
        *
        * @author  M.Frank
        * @version 1.0
-       */     
-      struct PhaseSelector  {
-	/// Reference to embedding object
-	Geant4Kernel* m_kernel;
-	/// Standard constructor
-	PhaseSelector(Geant4Kernel* kernel);
-	/// Copy constructor
+       */
+      struct PhaseSelector {
+        /// Reference to embedding object
+        Geant4Kernel* m_kernel;
+        /// Standard constructor
+        PhaseSelector(Geant4Kernel* kernel);
+        /// Copy constructor
         PhaseSelector(const PhaseSelector& c);
-	/// Phase access to the map
-	Geant4ActionPhase& operator[](const std::string& name)  const;
+        /// Phase access to the map
+        Geant4ActionPhase& operator[](const std::string& name) const;
       } phase;
 
-      
-      enum State  {
-	SETTING_UP,
-	INITIALIZED
+      enum State {
+        SETTING_UP, INITIALIZED
       };
       /// Default destructor
       virtual ~Geant4Kernel();
@@ -132,17 +136,32 @@ namespace DD4hep {
       /// Accessof the Geant4Kernel object from the LCDD reference extension (if present and registered)
       static Geant4Kernel& access(LCDD& lcdd);
       /// Access the context
-      Geant4Context* context()   const     {  return m_context;    }
+      Geant4Context* context() const {
+        return m_context;
+      }
       /// Automatic conversion to the context
-      operator Geant4Context* () const     {  return m_context;    }
+      operator Geant4Context*() const {
+        return m_context;
+      }
       /// Access to the properties of the object
-      PropertyManager& properties()        {  return m_properties; }
+      PropertyManager& properties() {
+        return m_properties;
+      }
       /// Access phase phases
-      const Phases& phases() const         {  return m_phases;     }
+      const Phases& phases() const {
+        return m_phases;
+      }
       /// Access to detector description
-      LCDD& lcdd() const                   {  return m_lcdd;       }
+      LCDD& lcdd() const {
+        return m_lcdd;
+      }
       /// Access to the Geant4 run manager
       G4RunManager& runManager();
+      /// Access the command directory
+      const std::string& directoryName() const {
+        return m_controlName;
+      }
+
       /// Register action by name to be retrieved when setting up and connecting action objects
       /** Note: registered actions MUST be unique.
        *  However, not all actions need to registered....
@@ -150,7 +169,7 @@ namespace DD4hep {
        */
       Geant4Kernel& registerGlobalAction(Geant4Action* action);
       /// Retrieve action from repository
-      Geant4Action* globalAction(const std::string& action_name, bool throw_if_not_present=true);
+      Geant4Action* globalAction(const std::string& action_name, bool throw_if_not_present = true);
       /// Register filter by name to be retrieved when setting up and connecting filter objects
       /** Note: registered filters MUST be unique.
        *  However, not all filters need to registered....
@@ -158,26 +177,26 @@ namespace DD4hep {
        */
       Geant4Kernel& registerGlobalFilter(Geant4Action* filter);
       /// Retrieve filter from repository
-      Geant4Action* globalFilter(const std::string& filter_name, bool throw_if_not_present=true);
+      Geant4Action* globalFilter(const std::string& filter_name, bool throw_if_not_present = true);
 
       /// Access phase by name
       Geant4ActionPhase* getPhase(const std::string& name);
       /// Add a new phase to the phase
-      virtual Geant4ActionPhase* addPhase(const std::string& name, const std::type_info& arg1, 
-					  const std::type_info& arg2, const std::type_info& arg3, bool throw_on_exist);
+      virtual Geant4ActionPhase* addPhase(const std::string& name, const std::type_info& arg1, const std::type_info& arg2,
+          const std::type_info& arg3, bool throw_on_exist);
       /// Add a new phase to the phase
-      template <typename A0> Geant4ActionPhase* addPhase(const std::string& name, bool throw_on_exist=true)  {
-	return addPhase(name,typeid(A0),typeid(void),typeid(void),throw_on_exist);
+      template <typename A0> Geant4ActionPhase* addPhase(const std::string& name, bool throw_on_exist = true) {
+        return addPhase(name, typeid(A0), typeid(void), typeid(void), throw_on_exist);
       }
       /// Add a new phase to the phase
-      template <typename A0, typename A1> 
-	Geant4ActionPhase* addPhase(const std::string& name, bool throw_on_exist=true)  {
-	return addPhase(name,typeid(A0),typeid(A1),typeid(void),throw_on_exist);
+      template <typename A0, typename A1>
+      Geant4ActionPhase* addPhase(const std::string& name, bool throw_on_exist = true) {
+        return addPhase(name, typeid(A0), typeid(A1), typeid(void), throw_on_exist);
       }
       /// Add a new phase to the phase
-      template <typename A0, typename A1, typename A2> 
-	Geant4ActionPhase* addPhase(const std::string& name, bool throw_on_exist=true)  {
-	return addPhase(name,typeid(A0),typeid(A1),typeid(A2),throw_on_exist);
+      template <typename A0, typename A1, typename A2>
+      Geant4ActionPhase* addPhase(const std::string& name, bool throw_on_exist = true) {
+        return addPhase(name, typeid(A0), typeid(A1), typeid(A2), throw_on_exist);
       }
       /// Remove an existing phase from the phase. If not existing returns false
       virtual bool removePhase(const std::string& name);
@@ -187,32 +206,44 @@ namespace DD4hep {
       /// Access generator action sequence
       Geant4GeneratorActionSequence* generatorAction(bool create);
       /// Access generator action sequence
-      Geant4GeneratorActionSequence& generatorAction()  {  return *generatorAction(true); }
+      Geant4GeneratorActionSequence& generatorAction() {
+        return *generatorAction(true);
+      }
 
       /// Access run action sequence
       Geant4RunActionSequence* runAction(bool create);
       /// Access run action sequence
-      Geant4RunActionSequence& runAction() {  return *runAction(true); }
+      Geant4RunActionSequence& runAction() {
+        return *runAction(true);
+      }
 
       /// Access run action sequence
       Geant4EventActionSequence* eventAction(bool create);
       /// Access run action sequence
-      Geant4EventActionSequence& eventAction()  { return *eventAction(true); }
+      Geant4EventActionSequence& eventAction() {
+        return *eventAction(true);
+      }
 
       /// Access stepping action sequence
       Geant4SteppingActionSequence* steppingAction(bool create);
       /// Access stepping action sequence
-      Geant4SteppingActionSequence& steppingAction()  { return *steppingAction(true); }
+      Geant4SteppingActionSequence& steppingAction() {
+        return *steppingAction(true);
+      }
 
       /// Access tracking action sequence
       Geant4TrackingActionSequence* trackingAction(bool create);
       /// Access tracking action sequence
-      Geant4TrackingActionSequence& trackingAction() { return *trackingAction(true); }
+      Geant4TrackingActionSequence& trackingAction() {
+        return *trackingAction(true);
+      }
 
       /// Access stacking action sequence
       Geant4StackingActionSequence* stackingAction(bool create);
       /// Access stacking action sequence
-      Geant4StackingActionSequence& stackingAction() {  return *stackingAction(true); }
+      Geant4StackingActionSequence& stackingAction() {
+        return *stackingAction(true);
+      }
 
       /// Access to the sensitive detector sequences from the kernel object
       Geant4SensDetSequences& sensitiveActions() const;
@@ -222,7 +253,9 @@ namespace DD4hep {
       /// Access to the physics list
       Geant4PhysicsListActionSequence* physicsList(bool create);
       /// Access to the physics list
-      Geant4PhysicsListActionSequence& physicsList() {  return *physicsList(true);   }
+      Geant4PhysicsListActionSequence& physicsList() {
+        return *physicsList(true);
+      }
 
       /// Construct detector geometry using lcdd plugin
       void loadGeometry(const std::string& compact_file);
@@ -234,7 +267,7 @@ namespace DD4hep {
       void loadXML(const char* fname);
     };
 
-    struct Geant4Exec  {
+    struct Geant4Exec {
       static int configure(Geant4Kernel& kernel);
       static int initialize(Geant4Kernel& kernel);
       static int run(Geant4Kernel& kernel);
diff --git a/DDG4/include/DDG4/Geant4Mapping.h b/DDG4/include/DDG4/Geant4Mapping.h
index 060b31d10bfd5682a68c28ba661058c22bbaae43..84b4453320fae1db7b507d4c1a7adeeb3d295252 100644
--- a/DDG4/include/DDG4/Geant4Mapping.h
+++ b/DDG4/include/DDG4/Geant4Mapping.h
@@ -23,42 +23,42 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4Mapping Geant4Mapping.h DDG4/Geant4Mapping.h
-     * 
+     *
      * Geometry mapping from DD4hep to Geant 4.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4Mapping : public Geometry::GeoHandlerTypes   {
+    struct Geant4Mapping: public Geometry::GeoHandlerTypes {
     public:
-      typedef Geometry::LCDD              LCDD;
-      typedef Geometry::DetElement        DetElement;
+      typedef Geometry::LCDD LCDD;
+      typedef Geometry::DetElement DetElement;
       typedef Geometry::SensitiveDetector SensitiveDetector;
-      typedef Geometry::Solid             Solid;
-      typedef Geometry::Volume            Volume;
-      typedef Geometry::PlacedVolume      PlacedVolume;
-      typedef Geometry::Material          Material;
-      typedef Geometry::Region            Region;
-
-      typedef Geant4GeometryInfo::PlacementPath      PlacementPath;
-      typedef Geant4GeometryInfo::AssemblyChildren   AssemblyChildren;
-      typedef Geant4GeometryInfo::ElementMap         ElementMap;
-      typedef Geant4GeometryInfo::MaterialMap        MaterialMap;
-      typedef Geant4GeometryInfo::LimitMap           LimitMap;
-      typedef Geant4GeometryInfo::PlacementMap       PlacementMap;
-      typedef Geant4GeometryInfo::AssemblyChildMap   AssemblyChildMap;
-      typedef Geant4GeometryInfo::RegionMap          RegionMap;
-      typedef Geant4GeometryInfo::SensDetMap         SensDetMap;
-      typedef Geant4GeometryInfo::VolumeMap          VolumeMap;
-      typedef Geant4GeometryInfo::SolidMap           SolidMap;
-      typedef Geant4GeometryInfo::VisMap             VisMap;
-      typedef Geant4GeometryInfo::PathMap            PathMap;
+      typedef Geometry::Solid Solid;
+      typedef Geometry::Volume Volume;
+      typedef Geometry::PlacedVolume PlacedVolume;
+      typedef Geometry::Material Material;
+      typedef Geometry::Region Region;
+
+      typedef Geant4GeometryInfo::PlacementPath PlacementPath;
+      typedef Geant4GeometryInfo::AssemblyChildren AssemblyChildren;
+      typedef Geant4GeometryInfo::ElementMap ElementMap;
+      typedef Geant4GeometryInfo::MaterialMap MaterialMap;
+      typedef Geant4GeometryInfo::LimitMap LimitMap;
+      typedef Geant4GeometryInfo::PlacementMap PlacementMap;
+      typedef Geant4GeometryInfo::AssemblyChildMap AssemblyChildMap;
+      typedef Geant4GeometryInfo::RegionMap RegionMap;
+      typedef Geant4GeometryInfo::SensDetMap SensDetMap;
+      typedef Geant4GeometryInfo::VolumeMap VolumeMap;
+      typedef Geant4GeometryInfo::SolidMap SolidMap;
+      typedef Geant4GeometryInfo::VisMap VisMap;
+      typedef Geant4GeometryInfo::PathMap PathMap;
 
     protected:
-      LCDD&               m_lcdd;
+      LCDD& m_lcdd;
       Geant4GeometryInfo* m_dataPtr;
 
       /// When resolving pointers, we must check for the validity of the data block
@@ -74,10 +74,14 @@ namespace DD4hep {
       static Geant4Mapping& instance();
 
       /// Accesor to the LCDD instance
-      LCDD& lcdd() const {  return m_lcdd; }
+      LCDD& lcdd() const {
+        return m_lcdd;
+      }
 
       /// Access to the data pointer
-      Geant4GeometryInfo& data() const { return *m_dataPtr; }
+      Geant4GeometryInfo& data() const {
+        return *m_dataPtr;
+      }
 
       /// Create and attach new data block. Delete old data block if present.
       Geant4GeometryInfo& init();
@@ -92,7 +96,7 @@ namespace DD4hep {
       Geant4VolumeManager volumeManager() const;
 
       /// Accessor to resolve geometry placements
-      PlacedVolume placement(const G4VPhysicalVolume* node)  const;
+      PlacedVolume placement(const G4VPhysicalVolume* node) const;
     };
   }    // End namespace Simulation
 }      // End namespace DD4hep
diff --git a/DDG4/include/DDG4/Geant4Output2ROOT.h b/DDG4/include/DDG4/Geant4Output2ROOT.h
new file mode 100644
index 0000000000000000000000000000000000000000..de2683d34869635b77352e84f9b3c36c357b48d4
--- /dev/null
+++ b/DDG4/include/DDG4/Geant4Output2ROOT.h
@@ -0,0 +1,72 @@
+// $Id: Geant4Field.cpp 875 2013-11-04 16:15:14Z markus.frank@cern.ch $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#ifndef DD4HEP_DDG4_GEANT4OUTPUT2ROOT_H
+#define DD4HEP_DDG4_GEANT4OUTPUT2ROOT_H
+
+// Framework include files
+#include "DDG4/Geant4OutputAction.h"
+
+class TFile;
+class TTree;
+class TBranch;
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  class ComponentCast;
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation {
+
+    /** @class Geant4Output2ROOT Geant4Output2ROOT.h DDG4/Geant4Output2ROOT.h
+     *
+     * Base class to output Geant4 event data to media
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    class Geant4Output2ROOT: public Geant4OutputAction {
+    protected:
+      typedef std::map<std::string, TBranch*> Branches;
+      typedef std::map<std::string, TTree*> Sections;
+      /// Known file sections
+      Sections m_sections;
+      /// Branches in the event tree
+      Branches m_branches;
+      /// name of the event tree
+      std::string m_section;
+      /// Reference to the ROOT file to open
+      TFile* m_file;
+      /// Reference to the event data tree
+      TTree* m_tree;
+    public:
+      /// Standard constructor
+      Geant4Output2ROOT(Geant4Context* context, const std::string& nam);
+      /// Default destructor
+      virtual ~Geant4Output2ROOT();
+      /// Create/access tree by name for non collection user data
+      TTree* section(const std::string& nam);
+      /// Fill single EVENT branch entry (Geant4 collection data)
+      int fill(const std::string& nam, const ComponentCast& type, void* ptr);
+
+      /// Callback to store the Geant4 run information
+      virtual void beginRun(const G4Run* run);
+      /// Callback to store each Geant4 hit collection
+      virtual void saveCollection(OutputContext<G4Event>& ctxt, G4VHitsCollection* collection);
+      /// Commit data at end of filling procedure
+      virtual void commit(OutputContext<G4Event>& ctxt);
+    };
+
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+#endif // DD4HEP_DDG4_GEANT4OUTPUT2ROOT_H
diff --git a/DDG4/include/DDG4/Geant4OutputAction.h b/DDG4/include/DDG4/Geant4OutputAction.h
new file mode 100644
index 0000000000000000000000000000000000000000..b52f0a510db65cdc96fa1a2eddef092ee4179cdd
--- /dev/null
+++ b/DDG4/include/DDG4/Geant4OutputAction.h
@@ -0,0 +1,81 @@
+// $Id: Geant4Field.cpp 875 2013-11-04 16:15:14Z markus.frank@cern.ch $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#ifndef DD4HEP_DDG4_GEANT4OUTPUTACTION_H
+#define DD4HEP_DDG4_GEANT4OUTPUTACTION_H
+
+// Framework include files
+#include "DDG4/Geant4EventAction.h"
+
+// Forward declarations
+class G4Run;
+class G4Event;
+class G4VHitsCollection;
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation {
+
+    /** @class Geant4OutputAction Geant4OutputAction.h DDG4/Geant4OutputAction.h
+     *
+     * Base class to output Geant4 event data to media
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    class Geant4OutputAction: public Geant4EventAction {
+    protected:
+      /// Helper class for thread savety
+      template <typename T> struct OutputContext {
+      public:
+        const T* context;
+        void* userData;
+        OutputContext(const T* c)
+            : context(c), userData(0) {
+        }
+        template <typename U> U* data() const {
+          return (U*) userData;
+        }
+      };
+
+      /// Property: output destination
+      std::string m_output;
+
+    public:
+      /// Standard constructor
+      Geant4OutputAction(Geant4Context* c, const std::string& nam);
+      /// Default destructor
+      virtual ~Geant4OutputAction();
+
+      /// begin-of-event callback
+      virtual void begin(const G4Event* event);
+      /// End-of-event callback
+      virtual void end(const G4Event* event);
+      /// Callback to initialize storing the Geant4 information
+      virtual void beginRun(const G4Run* run);
+      /// Callback to store the Geant4 run information
+      virtual void endRun(const G4Run* run);
+
+      /// Callback to store the Geant4 event
+      virtual void saveRun(const G4Run* run);
+      /// Callback to store the Geant4 event
+      virtual void saveEvent(OutputContext<G4Event>& ctxt);
+      /// Callback to store each Geant4 hit collection
+      virtual void saveCollection(OutputContext<G4Event>& ctxt, G4VHitsCollection* collection);
+      /// Commit data at end of filling procedure
+      virtual void commit(OutputContext<G4Event>& ctxt);
+    };
+
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+#endif // DD4HEP_DDG4_GEANT4OUTPUTACTION_H
diff --git a/DDG4/include/DDG4/Geant4ParticleGun.h b/DDG4/include/DDG4/Geant4ParticleGun.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d6fa51fd991c745c820492f3eeaa68fc5e06b1f
--- /dev/null
+++ b/DDG4/include/DDG4/Geant4ParticleGun.h
@@ -0,0 +1,62 @@
+// $Id: Geant4Hits.h 513 2013-04-05 14:31:53Z gaede $
+//====================================================================
+//  AIDA Detector description implementation
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#ifndef DD4HEP_DDG4_GEANT4PARTICLEGUN_H
+#define DD4HEP_DDG4_GEANT4PARTICLEGUN_H
+
+// Framework include files
+#include "DDG4/Geant4GeneratorAction.h"
+
+// Forward declarations
+class G4ParticleDefinition;
+class G4ParticleGun;
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation {
+    /** @class Geant4ParticleGun Geant4ParticleGun.h DDG4/Geant4ParticleGun.h
+     *
+     * Implementation wrapper of the Geant4 particle gun
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    class Geant4ParticleGun: public Geant4GeneratorAction {
+    protected:
+      /// Position and shooting direction of the gun
+      struct {
+        double x, y, z;
+      } m_position, m_direction;
+      /// Particle energy
+      double m_energy;
+      /// Desired multiplicity of the particles to be shot
+      int m_multiplicity;
+      /// Particle name
+      std::string m_particleName;
+      /// Pointer to geant4 particle definition
+      G4ParticleDefinition* m_particle;
+      /// Pointer to the particle gun itself
+      G4ParticleGun* m_gun;
+    public:
+      /// Standard constructor
+      Geant4ParticleGun(Geant4Context* context, const std::string& name);
+      /// Default destructor
+      virtual ~Geant4ParticleGun();
+      /// Callback to generate primary particles
+      virtual void operator()(G4Event* event);
+    };
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+#endif /* DD4HEP_DDG4_GEANT4PARTICLEGUN_H  */
+
diff --git a/DDG4/include/DDG4/Geant4PhysicsList.h b/DDG4/include/DDG4/Geant4PhysicsList.h
index d9e9e03767b6a6c4817e5737a16806b9ed23dfc6..a773fa88334dc214e98a1961bf070d3ab6f14f10 100644
--- a/DDG4/include/DDG4/Geant4PhysicsList.h
+++ b/DDG4/include/DDG4/Geant4PhysicsList.h
@@ -27,16 +27,16 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4UserPhysics Geant4PhysicsList.h DDG4/Geant4PhysicsList.h
-     * 
+     *
      * Interface class exposing some of the G4VUserPhysicsList class.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4UserPhysics  {
+    class Geant4UserPhysics {
     protected:
       /// Standard constructor with initailization parameters
       Geant4UserPhysics();
@@ -50,80 +50,102 @@ namespace DD4hep {
     };
 
     /** @class Geant4PhysicsList Geant4PhysicsList.h DDG4/Geant4PhysicsList.h
-     * 
-     * Concrete basic implementation of the Geant4 event action 
+     *
+     * Concrete basic implementation of the Geant4 event action
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4PhysicsList : public Geant4Action  {
+    class Geant4PhysicsList: public Geant4Action {
     public:
 
       /** @class PhysicsConstructor Geant4PhysicsList.h DDG4/Geant4PhysicsList.h
-       * 
+       *
        * Image of a physics constructor holding all stub information to attach
        * the concrete process contributing to the user physics list.
        *
        * @author  M.Frank
        * @version 1.0
        */
-      struct Process  {
-	std::string name;
-	int         ordAtRestDoIt, ordAlongSteptDoIt, ordPostStepDoIt;
-	/// Default constructor
-	Process();
-	/// Copy constructor
-	Process(const Process& p);
-	/// Assignment operator
-	Process& operator=(const Process& p);
+      struct Process {
+        std::string name;
+        int ordAtRestDoIt, ordAlongSteptDoIt, ordPostStepDoIt;
+        /// Default constructor
+        Process();
+        /// Copy constructor
+        Process(const Process& p);
+        /// Assignment operator
+        Process& operator=(const Process& p);
       };
-      struct ParticleConstructor : public std::string  {
-      ParticleConstructor() : std::string() {}
-      ParticleConstructor(const std::string& s) : std::string(s) {}
-	~ParticleConstructor() {}
+      typedef std::vector<Process> ParticleProcesses;
+      typedef std::map<std::string, ParticleProcesses> PhysicsProcesses;
+
+      struct ParticleConstructor: public std::string {
+        ParticleConstructor()
+            : std::string() {
+        }
+        ParticleConstructor(const std::string& s)
+            : std::string(s) {
+        }
+        ~ParticleConstructor() {
+        }
       };
-      struct PhysicsConstructor : public std::string {
-      PhysicsConstructor() : std::string() {}
-      PhysicsConstructor(const std::string& s) : std::string(s) {}
-	~PhysicsConstructor() {}
-      };
-
-      typedef std::vector<Process>  ParticleProcesses;
-      typedef std::map<std::string, ParticleProcesses > PhysicsProcesses;
-
-      PhysicsProcesses       m_processes;
-
       typedef std::vector<ParticleConstructor> ParticleConstructors;
-      ParticleConstructors   m_particles;
 
+      struct PhysicsConstructor: public std::string {
+        PhysicsConstructor()
+            : std::string() {
+        }
+        PhysicsConstructor(const std::string& s)
+            : std::string(s) {
+        }
+        ~PhysicsConstructor() {
+        }
+      };
       typedef std::vector<PhysicsConstructor> PhysicsConstructors;
-      PhysicsConstructors    m_physics;
+
+      PhysicsProcesses m_processes;
+      ParticleConstructors m_particles;
+      PhysicsConstructors m_physics;
 
     public:
       /// Standard constructor with initailization parameters
       Geant4PhysicsList(Geant4Context* context, const std::string& nam);
       /// Default destructor
       virtual ~Geant4PhysicsList();
-      
+
       /// Access all physics processes
-      PhysicsProcesses& processes()                   {  return m_processes;       }
+      PhysicsProcesses& processes() {
+        return m_processes;
+      }
       /// Access all physics processes
-      const PhysicsProcesses& processes() const       {  return m_processes;       }
+      const PhysicsProcesses& processes() const {
+        return m_processes;
+      }
       /// Access processes for one particle type
       ParticleProcesses& processes(const std::string& part_name);
       /// Access processes for one particle type (CONST)
       const ParticleProcesses& processes(const std::string& part_name) const;
       /// Access all physics particles
-      ParticleConstructors& particles()               {  return m_particles;       }
+      ParticleConstructors& particles() {
+        return m_particles;
+      }
       /// Access all physics particles
-      const ParticleConstructors& particles() const   {  return m_particles;       }
+      const ParticleConstructors& particles() const {
+        return m_particles;
+      }
       /// Access all physics constructors
-      PhysicsConstructors& physics()                  {  return m_physics;         }
+      PhysicsConstructors& physics() {
+        return m_physics;
+      }
       /// Access all physics constructors
-      const PhysicsConstructors& physics() const      {  return m_physics;         }
+      const PhysicsConstructors& physics() const {
+        return m_physics;
+      }
 
-      /// Callback to construct the physics list
+      /// Callback to construct the physics constructors
       virtual void constructProcess(Geant4UserPhysics* interface);
+
       /// constructParticle callback
       virtual void constructParticles(Geant4UserPhysics* particle);
       /// constructPhysics callback
@@ -132,16 +154,17 @@ namespace DD4hep {
       virtual void constructProcesses(Geant4UserPhysics* physics);
     };
 
- 
     /** @class Geant4PhysicsListActionSequence Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Concrete implementation of the Geant4 physics list sequence.
      * A list to setup the physics content in a modular form
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4PhysicsListActionSequence : public Geant4Action    {
+    class Geant4PhysicsListActionSequence: public Geant4Action {
+    public:
+
     protected:
       /// Callback sequence for event finalization action
       CallbackSequence m_process;
@@ -149,34 +172,47 @@ namespace DD4hep {
       CallbackSequence m_particle;
       /// The list of action objects to be called
       Actors<Geant4PhysicsList> m_actors;
+
       /// Callback to construct particle decays
       virtual void constructDecays(Geant4UserPhysics* physics);
     public:
       /// Flag if particle transportation is to be added
-      bool             m_transportation;
+      bool m_transportation;
       /// Flag if particle decays are to be added
-      bool             m_decays;
+      bool m_decays;
+      /// Property: Store name of basic predefined Geant4 physics list
+      std::string m_extends;
+
     public:
       /// Standard constructor
       Geant4PhysicsListActionSequence(Geant4Context* context, const std::string& nam);
       /// Default destructor
       virtual ~Geant4PhysicsListActionSequence();
       /// Update transportation flag
-      void setTransportation(bool value)              {  m_transportation = value; }
+      void setTransportation(bool value) {
+        m_transportation = value;
+      }
       /// Access the transportation flag
-      bool transportation() const                     {  return m_transportation;  }
+      bool transportation() const {
+        return m_transportation;
+      }
       /// Register process construction callback
-      template <typename Q, typename T> 
-	void constructProcess(Q* p, void (T::*f)(Geant4UserPhysics*)) { m_process.add(p,f);}
+      template <typename Q, typename T>
+      void constructProcess(Q* p, void (T::*f)(Geant4UserPhysics*)) {
+        m_process.add(p, f);
+      }
       /// Register particle construction callback
-      template <typename Q, typename T> 
-	void constructParticle(Q* p, void (T::*f)(Geant4UserPhysics*)) { m_particle.add(p,f);}
+      template <typename Q, typename T>
+      void constructParticle(Q* p, void (T::*f)(Geant4UserPhysics*)) {
+        m_particle.add(p, f);
+      }
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4PhysicsList* action);
+
       /// begin-of-event callback
-      void constructProcess(Geant4UserPhysics* physics);
+      virtual void constructProcess(Geant4UserPhysics* physics);
       /// begin-of-event callback
-      void constructParticles(Geant4UserPhysics* physics);
+      virtual void constructParticles(Geant4UserPhysics* physics);
     };
 
   }    // End namespace Simulation
diff --git a/DDG4/include/DDG4/Geant4RunAction.h b/DDG4/include/DDG4/Geant4RunAction.h
index 5f48ef0f703ec058c704d5b3c43375a5b4dd13a4..42b4f0b50059937a5bc805ac8a6aacf1d8a9b110 100644
--- a/DDG4/include/DDG4/Geant4RunAction.h
+++ b/DDG4/include/DDG4/Geant4RunAction.h
@@ -21,16 +21,16 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
-    
-    /** @class Geant4RunAction Geant4Action.h DDG4/Geant4Action.h
-     * 
-     * Concrete basic implementation of the Geant4 run action 
+  namespace Simulation {
+
+    /** @class Geant4RunAction Geant4RunAction.h DDG4/Geant4RunAction.h
+     *
+     * Concrete basic implementation of the Geant4 run action
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4RunAction : public Geant4Action   {
+    class Geant4RunAction: public Geant4Action {
     public:
       /// Standard constructor
       Geant4RunAction(Geant4Context* context, const std::string& nam);
@@ -42,14 +42,14 @@ namespace DD4hep {
       virtual void end(const G4Run* run);
     };
 
-    /** @class Geant4RunActionSequence Geant4Action.h DDG4/Geant4Action.h
-     * 
+    /** @class Geant4RunActionSequence Geant4RunAction.h DDG4/Geant4RunAction.h
+     *
      * Concrete implementation of the Geant4 run action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4RunActionSequence : public Geant4Action   {
+    class Geant4RunActionSequence: public Geant4Action {
     protected:
       /// Callback sequence for begin-run action
       CallbackSequence m_begin;
@@ -63,11 +63,15 @@ namespace DD4hep {
       /// Default destructor
       virtual ~Geant4RunActionSequence();
       /// Register begin-of-run callback. Types Q and T must be polymorph!
-      template <typename Q, typename T> 
-	void callAtBegin(Q* p, void (T::*f)(const G4Run*))  { m_begin.add(p,f);  }
+      template <typename Q, typename T>
+      void callAtBegin(Q* p, void (T::*f)(const G4Run*)) {
+        m_begin.add(p, f);
+      }
       /// Register end-of-run callback. Types Q and T must be polymorph!
-      template <typename Q,typename T> 
-	void callAtEnd  (Q* p, void (T::*f)(const G4Run*))  { m_end.add(p,f);    }
+      template <typename Q, typename T>
+      void callAtEnd(Q* p, void (T::*f)(const G4Run*)) {
+        m_end.add(p, f);
+      }
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4RunAction* action);
       /// begin-of-run callback
diff --git a/DDG4/include/DDG4/Geant4SensDetAction.h b/DDG4/include/DDG4/Geant4SensDetAction.h
index 10c1496c8566d4167139924a12530123a31ebd61..80b6557c5a8deace2a7bb3e5e7822daf96a8e38d 100644
--- a/DDG4/include/DDG4/Geant4SensDetAction.h
+++ b/DDG4/include/DDG4/Geant4SensDetAction.h
@@ -33,7 +33,7 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     // Forward declarations
     class Geant4StepHandler;
@@ -47,7 +47,7 @@ namespace DD4hep {
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4ActionSD : virtual public Geant4Action  {
+    struct Geant4ActionSD: virtual public Geant4Action {
     protected:
       /// Standard action constructor
       Geant4ActionSD(const std::string& name);
@@ -58,14 +58,14 @@ namespace DD4hep {
       virtual size_t defineCollection(const std::string& name) = 0;
       /// Access to the readout geometry of the sensitive detector
       virtual G4VReadOutGeometry* readoutGeometry() const = 0;
-      /// This is a utility method which returns the hits collection ID 
+      /// This is a utility method which returns the hits collection ID
       virtual G4int GetCollectionID(G4int i) = 0;
       /// Is the detector active?
       virtual bool isActive() const = 0;
       /// G4VSensitiveDetector internals: Access to the detector path name
-      virtual std::string path()  const = 0;
+      virtual std::string path() const = 0;
       /// G4VSensitiveDetector internals: Access to the detector path name
-      virtual std::string fullPath()  const = 0;
+      virtual std::string fullPath() const = 0;
     };
 
     /** @class Geant4Filter Geant4SensDetAction.h DDG4/Geant4SensDetAction.h
@@ -73,7 +73,7 @@ namespace DD4hep {
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4Filter : public Geant4Action {
+    struct Geant4Filter: public Geant4Action {
       /// Standard constructor
       Geant4Filter(Geant4Context* context, const std::string& name);
       /// Standard destructor
@@ -87,31 +87,31 @@ namespace DD4hep {
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4Sensitive : public Geant4Action {
-      typedef Geometry::LCDD               LCDD;
-      typedef Geometry::Readout            Readout;   
-      typedef Geometry::DetElement         DetElement;
-      typedef Geometry::SensitiveDetector  SensitiveDetector;
-      typedef Geant4StepHandler            StepHandler;
-      typedef Geant4HitCollection          HitCollection;
+    struct Geant4Sensitive: public Geant4Action {
+      typedef Geometry::LCDD LCDD;
+      typedef Geometry::Readout Readout;
+      typedef Geometry::DetElement DetElement;
+      typedef Geometry::SensitiveDetector SensitiveDetector;
+      typedef Geant4StepHandler StepHandler;
+      typedef Geant4HitCollection HitCollection;
 
     private:
       /// Reference to G4 sensitive detector
-      Geant4ActionSD*              m_sensitiveDetector;
+      Geant4ActionSD* m_sensitiveDetector;
       /// Reference to the containing action sequence
       Geant4SensDetActionSequence* m_sequence;
 
     protected:
       /// Reference to the detector description object
-      LCDD&                 m_lcdd;
+      LCDD& m_lcdd;
       /// Reference to the detector element describing this sensitive element
-      DetElement            m_detector;
+      DetElement m_detector;
       /// Reference to the sensitive detector element
-      SensitiveDetector     m_sensitive;
+      SensitiveDetector m_sensitive;
       /// Reference to the readout structure
-      Readout               m_readout;
+      Readout m_readout;
       /// The list of sensitive detector filter objects
-      Actors<Geant4Filter>  m_filters;
+      Actors<Geant4Filter> m_filters;
 
     public:
       /// Constructor. The sensitive detector element is identified by the detector name
@@ -121,44 +121,49 @@ namespace DD4hep {
       virtual ~Geant4Sensitive();
 
       /// Access to the sensitive detector object
-      Geant4ActionSD& detector()  const;
+      Geant4ActionSD& detector() const;
 
       /// Access to the sensitive detector object
       void setDetector(Geant4ActionSD* sens_det);
-      
+
       /// G4VSensitiveDetector internals: Access to the detector name
-      std::string detectorName()  const
-	{  return detector().name();           }
-      
+      std::string detectorName() const {
+        return detector().name();
+      }
+
       /// G4VSensitiveDetector internals: Access to the detector path name
-      std::string path()  const
-	{  return detector().path();           }
-      
+      std::string path() const {
+        return detector().path();
+      }
+
       /// G4VSensitiveDetector internals: Access to the detector path name
-      std::string fullPath()  const
-	{  return detector().fullPath();       }
+      std::string fullPath() const {
+        return detector().fullPath();
+      }
 
       /// G4VSensitiveDetector internals: Is the detector active?
-      bool isActive() const
-      {   return detector().isActive();        }
+      bool isActive() const {
+        return detector().isActive();
+      }
 
       /// Access to the readout geometry of the sensitive detector
-      G4VReadOutGeometry* readoutGeometry() const
-      {  return detector().readoutGeometry();  }
+      G4VReadOutGeometry* readoutGeometry() const {
+        return detector().readoutGeometry();
+      }
 
       /// Access to the hosting sequence
-      Geant4SensDetActionSequence& sequence()  const;
-      
+      Geant4SensDetActionSequence& sequence() const;
+
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4Filter* filter);
 
-      /// Callback before hit processing starts. Invoke all filters. 
+      /// Callback before hit processing starts. Invoke all filters.
       /** Return fals if any filter returns false
        */
       bool accept(const G4Step* step) const;
 
       /// Initialize the usage of a single hit collection. Returns the collection ID
-      template<typename TYPE> size_t defineCollection(const std::string& coll_name);
+      template <typename TYPE> size_t defineCollection(const std::string& coll_name);
 
       /// Access HitCollection container names
       const std::string& hitCollectionName(size_t which) const;
@@ -169,22 +174,22 @@ namespace DD4hep {
       /// Retrieve the hits collection associated with this detector by its collection identifier
       HitCollection* collectionByID(size_t id);
 
-      /// G4VSensitiveDetector interface: Method invoked at the begining of each event. 
+      /// G4VSensitiveDetector interface: Method invoked at the begining of each event.
       /** The hits collection(s) created by this sensitive detector must
        *  be set to the G4HCofThisEvent object at one of these two methods.
        */
       virtual void begin(G4HCofThisEvent* hce);
 
-      /// G4VSensitiveDetector interface: Method invoked at the end of each event. 
+      /// G4VSensitiveDetector interface: Method invoked at the end of each event.
       virtual void end(G4HCofThisEvent* hce);
 
       /// G4VSensitiveDetector interface: Method for generating hit(s) using the information of G4Step object.
-      virtual bool process(G4Step* step,G4TouchableHistory* history);
+      virtual bool process(G4Step* step, G4TouchableHistory* history);
 
       /// G4VSensitiveDetector interface: Method invoked if the event was aborted.
-      /** Hits collections created but not being set to G4HCofThisEvent 
+      /** Hits collections created but not being set to G4HCofThisEvent
        *  at the event should be deleted.
-       *  Collection(s) which have already set to G4HCofThisEvent 
+       *  Collection(s) which have already set to G4HCofThisEvent
        *  will be deleted automatically.
        */
       virtual void clear(G4HCofThisEvent* hce);
@@ -198,40 +203,40 @@ namespace DD4hep {
     };
 
     /** @class Geant4SensDetActionSequence Geant4SensDetAction.h DDG4/Geant4SensDetAction.h
-     * 
+     *
      * Concrete implementation of the sensitive detector action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4SensDetActionSequence : public Geant4Action    {
+    class Geant4SensDetActionSequence: public Geant4Action {
     public:
-      typedef G4VHitsCollection* (*create_t)(const std::string&,const std::string&);
-      typedef std::vector<std::pair<std::string,create_t> > HitCollections;
+      typedef G4VHitsCollection* (*create_t)(const std::string&, const std::string&);
+      typedef std::vector<std::pair<std::string, create_t> > HitCollections;
 
     protected:
       /// Geant4 hit collection context
-      G4HCofThisEvent*         m_hce;
+      G4HCofThisEvent* m_hce;
       /// Callback sequence for event initialization action
-      CallbackSequence         m_begin;
+      CallbackSequence m_begin;
       /// Callback sequence for event finalization action
-      CallbackSequence         m_end;
+      CallbackSequence m_end;
       /// Callback sequence for step processing
-      CallbackSequence         m_process;
+      CallbackSequence m_process;
       /// Callback sequence to invoke the event deletion
-      CallbackSequence         m_clear;
+      CallbackSequence m_clear;
       /// The list of sensitive detector objects
-      Actors<Geant4Sensitive>  m_actors;
+      Actors<Geant4Sensitive> m_actors;
       /// The list of sensitive detector filter objects
-      Actors<Geant4Filter>     m_filters;
+      Actors<Geant4Filter> m_filters;
 
       /// Hit collection creators
-      HitCollections           m_collections;      
+      HitCollections m_collections;
       /// Reference to G4 sensitive detector
-      Geant4ActionSD*          m_detector;
+      Geant4ActionSD* m_detector;
       /// Create a new typed hit collection
-      template <typename TYPE> static G4VHitsCollection* _create(const std::string& det, const std::string& coll)  {
-	return new Geant4HitCollection(det,coll,(TYPE*)0);
+      template <typename TYPE> static G4VHitsCollection* _create(const std::string& det, const std::string& coll) {
+        return new Geant4HitCollection(det, coll, (TYPE*) 0);
       }
 
     public:
@@ -245,11 +250,11 @@ namespace DD4hep {
       size_t defineCollections(Geant4ActionSD* sens_det);
 
       /// Initialize the usage of a hit collection. Returns the collection identifier
-      size_t defineCollection(const std::string& name,create_t func);
+      size_t defineCollection(const std::string& name, create_t func);
 
       /// Define a named collection containing hist of a specified type
-      template <typename TYPE> size_t defineCollection(const std::string& coll_name)  {
-	return defineCollection(coll_name,Geant4SensDetActionSequence::_create<TYPE>);
+      template <typename TYPE> size_t defineCollection(const std::string& coll_name) {
+        return defineCollection(coll_name, Geant4SensDetActionSequence::_create<TYPE>);
       }
 
       /// Access HitCollection container names
@@ -259,28 +264,32 @@ namespace DD4hep {
       /// Retrieve the hits collection associated with this detector by its collection identifier
       Geant4HitCollection* collectionByID(size_t id) const;
       /// Register begin-of-event callback
-      template <typename T> void callAtBegin(T* p, void (T::*f)(G4HCofThisEvent*))
-	{ m_begin.add(p,f);}
-  
+      template <typename T> void callAtBegin(T* p, void (T::*f)(G4HCofThisEvent*)) {
+        m_begin.add(p, f);
+      }
+
       /// Register end-of-event callback
-      template <typename T> void callAtEnd(T* p, void (T::*f)(G4HCofThisEvent*)) 
-	{ m_end.add(p,f);}
-  
+      template <typename T> void callAtEnd(T* p, void (T::*f)(G4HCofThisEvent*)) {
+        m_end.add(p, f);
+      }
+
       /// Register process-hit callback
-      template <typename T> void callAtProcess(T* p, void (T::*f)(G4Step*,G4TouchableHistory*))
-	{ m_process.add(p,f);}
+      template <typename T> void callAtProcess(T* p, void (T::*f)(G4Step*, G4TouchableHistory*)) {
+        m_process.add(p, f);
+      }
 
       /// Register clear callback
-      template <typename T> void callAtClear(T* p, void (T::*f)(G4HCofThisEvent*))
-	{ m_clear.add(p,f);}
-  
+      template <typename T> void callAtClear(T* p, void (T::*f)(G4HCofThisEvent*)) {
+        m_clear.add(p, f);
+      }
+
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4Sensitive* sensitive);
 
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4Filter* filter);
 
-      /// Callback before hit processing starts. Invoke all filters. 
+      /// Callback before hit processing starts. Invoke all filters.
       /** Return fals if any filter returns false
        */
       bool accept(const G4Step* step) const;
@@ -288,40 +297,40 @@ namespace DD4hep {
       /// Function to process hits
       virtual bool process(G4Step* step, G4TouchableHistory* hist);
 
-      /// G4VSensitiveDetector interface: Method invoked at the begining of each event. 
+      /// G4VSensitiveDetector interface: Method invoked at the begining of each event.
       /** The hits collection(s) created by this sensitive detector must
        *  be set to the G4HCofThisEvent object at one of these two methods.
        */
       virtual void begin(G4HCofThisEvent* hce);
 
-      /// G4VSensitiveDetector interface: Method invoked at the end of each event. 
+      /// G4VSensitiveDetector interface: Method invoked at the end of each event.
 
       virtual void end(G4HCofThisEvent* hce);
       /// G4VSensitiveDetector interface: Method invoked if the event was aborted.
-      /** Hits collections created but not beibg set to G4HCofThisEvent 
+      /** Hits collections created but not beibg set to G4HCofThisEvent
        *  at the event should be deleted.
-       *  Collection(s) which have already set to G4HCofThisEvent 
+       *  Collection(s) which have already set to G4HCofThisEvent
        *  will be deleted automatically.
        */
       virtual void clear();
     };
 
     /** @class Geant4SensDetActionSequences Geant4SensDetAction.h DDG4/Geant4SensDetAction.h
-     * 
+     *
      * Concrete implementation of the sensitive detector action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4SensDetSequences   {
+    class Geant4SensDetSequences {
     public:
       friend class Geant4Kernel;
       friend class Geant4SensDetActionSequence;
-      typedef std::map<std::string,Geant4SensDetActionSequence*> Members;
+      typedef std::map<std::string, Geant4SensDetActionSequence*> Members;
     private:
       Members m_sequences;
       /// Insert sequence member
-      void insert(const std::string& name,Geant4SensDetActionSequence* seq);
+      void insert(const std::string& name, Geant4SensDetActionSequence* seq);
     public:
       /// Default constructor
       Geant4SensDetSequences();
@@ -332,15 +341,19 @@ namespace DD4hep {
       /// Access sequence member by name
       Geant4SensDetActionSequence* find(const std::string& name) const;
       /// Access to the members
-      Members& sequences()                { return m_sequences;       }
+      Members& sequences() {
+        return m_sequences;
+      }
       /// Access to the members CONST
-      const Members& sequences()  const   { return m_sequences;       }
+      const Members& sequences() const {
+        return m_sequences;
+      }
     };
 
     /// Initialize the usage of a single hit collection. Returns the collection ID
-    template<typename TYPE> inline size_t Geant4Sensitive::defineCollection(const std::string& coll_name)  
-      {   return sequence().defineCollection<TYPE>(coll_name);      }
-
+    template <typename TYPE> inline size_t Geant4Sensitive::defineCollection(const std::string& coll_name) {
+      return sequence().defineCollection<TYPE>(coll_name);
+    }
 
   }    // End namespace Simulation
 }      // End namespace DD4hep
diff --git a/DDG4/include/DDG4/Geant4SensitiveDetector_inline.h b/DDG4/include/DDG4/Geant4SensitiveDetector_inline.h
index 23f8ad580e3d5f22064398a1a298333ec5c81244..9a5940eefc2a4dfb1513743d7ca747fb4905c1a2 100644
--- a/DDG4/include/DDG4/Geant4SensitiveDetector_inline.h
+++ b/DDG4/include/DDG4/Geant4SensitiveDetector_inline.h
@@ -12,49 +12,43 @@
 // Framework include files
 #include "DDG4/Geant4SensitiveDetector.h"
 
-    
 /// Constructor. The sensitive detector element is identified by the detector name
-template<class SD> DD4hep::Simulation::Geant4GenericSD<SD>::Geant4GenericSD(const std::string& name, LCDD& lcdd) 
-  : Geant4SensitiveDetector(name,lcdd)
-{
+template <class SD> DD4hep::Simulation::Geant4GenericSD<SD>::Geant4GenericSD(const std::string& name, LCDD& lcdd)
+    : Geant4SensitiveDetector(name, lcdd) {
   defineCollection(m_sensitive.hitsCollection());
 }
 
 /// Initialize the sensitive detector for the usage of a single hit collection
-template<class SD> bool DD4hep::Simulation::Geant4GenericSD<SD>::defineCollection(const std::string& coll_name) {
+template <class SD> bool DD4hep::Simulation::Geant4GenericSD<SD>::defineCollection(const std::string& coll_name) {
   return Geant4SensitiveDetector::defineCollection(coll_name);
 }
 
-/** Method invoked at the begining of each event. 
+/** Method invoked at the begining of each event.
  *  The hits collection(s) created by this sensitive detector must
  *  be set to the G4HCofThisEvent object at one of these two methods.
  */
-template<class SD> void DD4hep::Simulation::Geant4GenericSD<SD>::Initialize(G4HCofThisEvent* HCE)
-{
+template <class SD> void DD4hep::Simulation::Geant4GenericSD<SD>::Initialize(G4HCofThisEvent* HCE) {
   this->Geant4SensitiveDetector::Initialize(HCE);
 }
-	
-/// Method invoked at the end of each event. 
-template<class SD> void DD4hep::Simulation::Geant4GenericSD<SD>::EndOfEvent(G4HCofThisEvent* HCE)
-{
+
+/// Method invoked at the end of each event.
+template <class SD> void DD4hep::Simulation::Geant4GenericSD<SD>::EndOfEvent(G4HCofThisEvent* HCE) {
   this->Geant4SensitiveDetector::EndOfEvent(HCE);
 }
 
 /// Method invoked if the event was aborted.
-template<class SD> void DD4hep::Simulation::Geant4GenericSD<SD>::clear()
-{
+template <class SD> void DD4hep::Simulation::Geant4GenericSD<SD>::clear() {
   this->Geant4SensitiveDetector::clear();
 }
 
 /// Method for generating hit(s) using the information of G4Step object.
-template<class SD> G4bool DD4hep::Simulation::Geant4GenericSD<SD>::ProcessHits(G4Step* step,G4TouchableHistory* history) {
-  return this->Geant4SensitiveDetector::ProcessHits(step,history);
+template <class SD> G4bool DD4hep::Simulation::Geant4GenericSD<SD>::ProcessHits(G4Step* step, G4TouchableHistory* history) {
+  return this->Geant4SensitiveDetector::ProcessHits(step, history);
 }
 
 /// Method for generating hit(s) using the information of G4Step object.
-template<class SD> bool DD4hep::Simulation::Geant4GenericSD<SD>::buildHits(G4Step*,G4TouchableHistory*) {
+template <class SD> bool DD4hep::Simulation::Geant4GenericSD<SD>::buildHits(G4Step*, G4TouchableHistory*) {
   return true;
 }
 
-
 #endif // DD4HEP_GEANT4SENSITIVEDETECTOR_INLINE_H
diff --git a/DDG4/include/DDG4/Geant4StackingAction.h b/DDG4/include/DDG4/Geant4StackingAction.h
index c96bb20ceb0ef78288dc56611198ed38421a1fe8..99fb35838a3500e3b1591f6927bdb03f7bbbe5bd 100644
--- a/DDG4/include/DDG4/Geant4StackingAction.h
+++ b/DDG4/include/DDG4/Geant4StackingAction.h
@@ -20,57 +20,63 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4StackingAction Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Concrete implementation of the Geant4 stacking action base class
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4StackingAction : public Geant4Action   {
+    class Geant4StackingAction: public Geant4Action {
     public:
       /// Standard constructor
       Geant4StackingAction(Geant4Context* context, const std::string& name);
       /// Default destructor
       virtual ~Geant4StackingAction();
       /// New-stage callback
-      virtual void  newStage()  {}
+      virtual void newStage() {
+      }
       /// Preparation callback
-      virtual void  prepare()  {}
+      virtual void prepare() {
+      }
     };
 
     /** @class Geant4StackingActionSequence Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Concrete implementation of the Geant4 stacking action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4StackingActionSequence : public Geant4Action   {
+    class Geant4StackingActionSequence: public Geant4Action {
     protected:
       /// Callback sequence for the newStage call
       CallbackSequence m_newStage;
       // Callback sequence for the prepare call
       CallbackSequence m_prepare;
-       /// The list of action objects to be called
+      /// The list of action objects to be called
       Actors<Geant4StackingAction> m_actors;
-   public:
+    public:
       /// Standard constructor
       Geant4StackingActionSequence(Geant4Context* context, const std::string& name);
       /// Default destructor
       virtual ~Geant4StackingActionSequence();
       /// Register begin-of-event callback. Types Q and T must be polymorph!
-      template <typename T> void callAtNewStage(T* p, void (T::*f)()) { m_newStage.add(p,f);}
+      template <typename T> void callAtNewStage(T* p, void (T::*f)()) {
+        m_newStage.add(p, f);
+      }
       /// Register end-of-event callback. Types Q and T must be polymorph!
-      template <typename T> void callAtPrepare(T* p, void (T::*f)())  { m_prepare.add(p,f); }
+      template <typename T> void callAtPrepare(T* p, void (T::*f)()) {
+        m_prepare.add(p, f);
+      }
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4StackingAction* action);
       /// New-stage callback
-      virtual void  newStage();
+      virtual void newStage();
       /// Preparation callback
-      virtual void  prepare();
+      virtual void prepare();
     };
 
   }    // End namespace Simulation
diff --git a/DDG4/include/DDG4/Geant4StepHandler.h b/DDG4/include/DDG4/Geant4StepHandler.h
index 739ce4c55a1ce52ce9a643a7fda55b2345079ad5..75c55ff5147612f3413cbff7a337103c2dc6bcbe 100644
--- a/DDG4/include/DDG4/Geant4StepHandler.h
+++ b/DDG4/include/DDG4/Geant4StepHandler.h
@@ -18,7 +18,6 @@
 #include "G4VTouchable.hh"
 #include "G4VSensitiveDetector.hh"
 
-
 /*
  *   DD4hep namespace declaration
  */
@@ -27,7 +26,7 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     // Forward declarations;
     class Geant4StepHandler;
@@ -41,79 +40,88 @@ namespace DD4hep {
      * @version 1.0
      */
     class Geant4StepHandler {
-      public:
+    public:
       const G4Step* step;
-      G4StepPoint*  pre;
-      G4StepPoint*  post;
-      G4Track*      track;
-      Geant4StepHandler(const G4Step* s) : step(s) {
-	pre = s->GetPreStepPoint();
-	post = s->GetPostStepPoint();
-	track = s->GetTrack();
-      }
-      G4ParticleDefinition* trackDef()  const {
-	return track->GetDefinition();
+      G4StepPoint* pre;
+      G4StepPoint* post;
+      G4Track* track;
+      Geant4StepHandler(const G4Step* s)
+          : step(s) {
+        pre = s->GetPreStepPoint();
+        post = s->GetPostStepPoint();
+        track = s->GetTrack();
+      }
+      G4ParticleDefinition* trackDef() const {
+        return track->GetDefinition();
       }
       static const char* stepStatus(G4StepStatus status);
       const char* preStepStatus() const;
       const char* postStepStatus() const;
       Position prePos() const {
-	const G4ThreeVector& p = pre->GetPosition();
-	return Position(p.x(),p.y(),p.z());
+        const G4ThreeVector& p = pre->GetPosition();
+        return Position(p.x(), p.y(), p.z());
       }
       Position postPos() const {
-	const G4ThreeVector& p = post->GetPosition();
-	return Position(p.x(),p.y(),p.z());
+        const G4ThreeVector& p = post->GetPosition();
+        return Position(p.x(), p.y(), p.z());
       }
       Momentum preMom() const {
-	const G4ThreeVector& p = pre->GetMomentum();
-	return Momentum(p.x(),p.y(),p.z());
+        const G4ThreeVector& p = pre->GetMomentum();
+        return Momentum(p.x(), p.y(), p.z());
       }
       Momentum postMom() const {
-	const G4ThreeVector& p = post->GetMomentum();
-	return Momentum(p.x(),p.y(),p.z());
+        const G4ThreeVector& p = post->GetMomentum();
+        return Momentum(p.x(), p.y(), p.z());
+      }
+      const G4VTouchable* preTouchable() const {
+        return pre->GetTouchable();
+      }
+      const G4VTouchable* postTouchable() const {
+        return post->GetTouchable();
+      }
+      const char* volName(const G4StepPoint* p, const char* undefined = "") const {
+        G4VPhysicalVolume* v = volume(p);
+        return v ? v->GetName().c_str() : undefined;
+      }
+      G4VPhysicalVolume* volume(const G4StepPoint* p) const {
+        return p->GetTouchableHandle()->GetVolume();
       }
-      const G4VTouchable* preTouchable()  const {
-	return pre->GetTouchable();
+      G4VPhysicalVolume* physvol(const G4StepPoint* p) const {
+        return p->GetPhysicalVolume();
       }
-      const G4VTouchable* postTouchable()  const {
-	return post->GetTouchable();
+      G4LogicalVolume* logvol(const G4StepPoint* p) const {
+        G4VPhysicalVolume* pv = physvol(p);
+        return pv ? pv->GetLogicalVolume() : 0;
       }
-      const char* volName(const G4StepPoint* p, const char* undefined="")  const {
-	G4VPhysicalVolume* v = volume(p);
-	return v ? v->GetName().c_str() : undefined;
+      G4VSensitiveDetector* sd(const G4StepPoint* p) const {
+        G4LogicalVolume* lv = logvol(p);
+        return lv ? lv->GetSensitiveDetector() : 0;
       }
-      G4VPhysicalVolume* volume(const G4StepPoint* p)  const {
-	return p->GetTouchableHandle()->GetVolume();
+      const char* sdName(const G4StepPoint* p, const char* undefined = "") const {
+        G4VSensitiveDetector* s = sd(p);
+        return s ? s->GetName().c_str() : undefined;
       }
-      G4VPhysicalVolume* physvol(const G4StepPoint* p)   const {
-	return p->GetPhysicalVolume();
+      bool isSensitive(const G4LogicalVolume* lv) const {
+        return lv ? (0 != lv->GetSensitiveDetector()) : false;
       }
-      G4LogicalVolume* logvol(const G4StepPoint* p)   const {
-	G4VPhysicalVolume* pv = physvol(p);
-	return pv ? pv->GetLogicalVolume() : 0;
+      bool isSensitive(const G4VPhysicalVolume* pv) const {
+        return pv ? isSensitive(pv->GetLogicalVolume()) : false;
       }
-      G4VSensitiveDetector* sd(const G4StepPoint* p)  const {
-	G4LogicalVolume* lv = logvol(p);
-	return lv ? lv->GetSensitiveDetector() : 0;
+      bool isSensitive(const G4StepPoint* point) const {
+        return point ? isSensitive(volume(point)) : false;
       }
-      const char* sdName(const G4StepPoint* p, const char* undefined="")  const {
-	G4VSensitiveDetector* s = sd(p);
-	return s ? s->GetName().c_str() : undefined;
+      G4VPhysicalVolume* preVolume() const {
+        return volume(pre);
       }
-      bool isSensitive(const G4LogicalVolume* lv) const  {
-	return lv ? (0 != lv->GetSensitiveDetector()) : false;
+      G4VSensitiveDetector* preSD() const {
+        return sd(pre);
       }
-      bool isSensitive(const G4VPhysicalVolume* pv) const  {
-	return pv ? isSensitive(pv->GetLogicalVolume()) : false;
+      G4VPhysicalVolume* postVolume() const {
+        return volume(post);
       }
-      bool isSensitive(const G4StepPoint* point) const  {
-	return point ? isSensitive(volume(point)) : false;
+      G4VSensitiveDetector* postSD() const {
+        return sd(post);
       }
-      G4VPhysicalVolume*    preVolume()   const  {	return volume(pre);       }
-      G4VSensitiveDetector* preSD()       const  {	return sd(pre);           }
-      G4VPhysicalVolume*    postVolume()  const  {	return volume(post);      }
-      G4VSensitiveDetector* postSD()      const  {	return sd(post);          }
     };
 
   }    // End namespace Simulation
diff --git a/DDG4/include/DDG4/Geant4SteppingAction.h b/DDG4/include/DDG4/Geant4SteppingAction.h
index 9c59c7eeb542f262a415d2ef2f1d2f534ab7e605..db470c0494aca16b92ebf7f7f7d30b5964b84983 100644
--- a/DDG4/include/DDG4/Geant4SteppingAction.h
+++ b/DDG4/include/DDG4/Geant4SteppingAction.h
@@ -24,16 +24,16 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4SteppingAction Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Concrete implementation of the Geant4 stepping action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4SteppingAction : public Geant4Action   {
+    class Geant4SteppingAction: public Geant4Action {
     public:
       /// Standard constructor
       Geant4SteppingAction(Geant4Context* context, const std::string& name);
@@ -44,13 +44,13 @@ namespace DD4hep {
     };
 
     /** @class Geant4SteppingActionSequence Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Concrete implementation of the Geant4 stepping action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4SteppingActionSequence : public Geant4Action   {
+    class Geant4SteppingActionSequence: public Geant4Action {
     protected:
       /// Callback sequence for user stepping action calls
       CallbackSequence m_calls;
@@ -63,8 +63,10 @@ namespace DD4hep {
       /// Default destructor
       virtual ~Geant4SteppingActionSequence();
       /// Register stepping action callback. Types Q and T must be polymorph!
-      template <typename Q, typename T> 
-	void call(Q* p, void (T::*f)(const G4Step*,G4SteppingManager*))  { m_calls.add(p,f); }
+      template <typename Q, typename T>
+      void call(Q* p, void (T::*f)(const G4Step*, G4SteppingManager*)) {
+        m_calls.add(p, f);
+      }
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4SteppingAction* action);
       /// User stepping callback
diff --git a/DDG4/include/DDG4/Geant4TestActions.h b/DDG4/include/DDG4/Geant4TestActions.h
index da7ae03c59230b234f4981c2402e602561001a93..fa4dd68494c380912a6daee2c0915725aec792e0 100644
--- a/DDG4/include/DDG4/Geant4TestActions.h
+++ b/DDG4/include/DDG4/Geant4TestActions.h
@@ -29,86 +29,86 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
-    namespace Test  {
+    namespace Test {
       /** @class Geant4TestRunAction
-       * 
+       *
        * @author  M.Frank
        * @version 1.0
        */
-      class Geant4TestBase  {
+      class Geant4TestBase {
       protected:
-	int         m_value1;
-	double      m_value2;
-	std::string m_value3;
-	std::string m_type;
+        int m_value1;
+        double m_value2;
+        std::string m_value3;
+        std::string m_type;
       public:
-	/// Standard constructor
-	Geant4TestBase(Geant4Action* action, const std::string& typ);
-	/// Default destructor
-	virtual ~Geant4TestBase();
+        /// Standard constructor
+        Geant4TestBase(Geant4Action* action, const std::string& typ);
+        /// Default destructor
+        virtual ~Geant4TestBase();
       };
-      struct Geant4TestRunAction : public Geant4RunAction, public Geant4TestBase  {
-	/// Standard constructor with initializing arguments
-	Geant4TestRunAction(Geant4Context* c, const std::string& n);
-	/// Default destructor
-	virtual ~Geant4TestRunAction();
-	/// begin-of-run callback
-	void  begin(const G4Run* );
-	/// End-of-run callback
-	void  end  (const G4Run* );
-	/// begin-of-event callback
-	void  beginEvent(const G4Event* );
-	/// End-of-event callback
-	void  endEvent  (const G4Event* );
+      struct Geant4TestRunAction: public Geant4RunAction, public Geant4TestBase {
+        /// Standard constructor with initializing arguments
+        Geant4TestRunAction(Geant4Context* c, const std::string& n);
+        /// Default destructor
+        virtual ~Geant4TestRunAction();
+        /// begin-of-run callback
+        void begin(const G4Run*);
+        /// End-of-run callback
+        void end(const G4Run*);
+        /// begin-of-event callback
+        void beginEvent(const G4Event*);
+        /// End-of-event callback
+        void endEvent(const G4Event*);
       };
-      struct Geant4TestEventAction : public Geant4EventAction, public Geant4TestBase  {
-	/// Standard constructor with initializing arguments
-	Geant4TestEventAction(Geant4Context* c, const std::string& n);
-	/// Default destructor
-	virtual ~Geant4TestEventAction();
-	/// begin-of-event callback
-	virtual void  begin(const G4Event* );
-	/// End-of-event callback
-	virtual void  end  (const G4Event* );
-	/// begin-of-run callback
-	void  beginRun(const G4Run* );
-	/// End-of-run callback
-	void  endRun  (const G4Run* );
+      struct Geant4TestEventAction: public Geant4EventAction, public Geant4TestBase {
+        /// Standard constructor with initializing arguments
+        Geant4TestEventAction(Geant4Context* c, const std::string& n);
+        /// Default destructor
+        virtual ~Geant4TestEventAction();
+        /// begin-of-event callback
+        virtual void begin(const G4Event*);
+        /// End-of-event callback
+        virtual void end(const G4Event*);
+        /// begin-of-run callback
+        void beginRun(const G4Run*);
+        /// End-of-run callback
+        void endRun(const G4Run*);
       };
-      struct Geant4TestTrackAction : public Geant4TrackingAction, public Geant4TestBase  {
-	/// Standard constructor with initializing arguments
-	Geant4TestTrackAction(Geant4Context* c, const std::string& n);
-	/// Default destructor
-	virtual ~Geant4TestTrackAction();
-	/// Begin-of-tracking callback
-	virtual void begin(const G4Track* );
-	/// End-of-tracking callback
-	virtual void end(const G4Track* );
+      struct Geant4TestTrackAction: public Geant4TrackingAction, public Geant4TestBase {
+        /// Standard constructor with initializing arguments
+        Geant4TestTrackAction(Geant4Context* c, const std::string& n);
+        /// Default destructor
+        virtual ~Geant4TestTrackAction();
+        /// Begin-of-tracking callback
+        virtual void begin(const G4Track*);
+        /// End-of-tracking callback
+        virtual void end(const G4Track*);
       };
-      struct Geant4TestStepAction : public Geant4SteppingAction, public Geant4TestBase  {
-	/// Standard constructor with initializing arguments
-	Geant4TestStepAction(Geant4Context* c, const std::string& n);
-	/// Default destructor
-	virtual ~Geant4TestStepAction();
-	/// User stepping callback
-	void operator()(const G4Step* , G4SteppingManager* );
+      struct Geant4TestStepAction: public Geant4SteppingAction, public Geant4TestBase {
+        /// Standard constructor with initializing arguments
+        Geant4TestStepAction(Geant4Context* c, const std::string& n);
+        /// Default destructor
+        virtual ~Geant4TestStepAction();
+        /// User stepping callback
+        void operator()(const G4Step*, G4SteppingManager*);
       };
-      struct Geant4TestSensitive : public Geant4Sensitive, public Geant4TestBase  {
-	size_t m_collectionID;
-	/// Standard constructor with initializing arguments
-	Geant4TestSensitive(Geant4Context* c, const std::string& n, DetElement det, LCDD& lcdd);
-	/// Default destructor
-	virtual ~Geant4TestSensitive();
-	/// Begin-of-tracking callback
-	virtual void begin(G4HCofThisEvent* );
-	/// End-of-tracking callback
-	virtual void end(G4HCofThisEvent* );
-	/// Method for generating hit(s) using the information of G4Step object.
-	virtual bool process(G4Step* ,G4TouchableHistory* );
+      struct Geant4TestSensitive: public Geant4Sensitive, public Geant4TestBase {
+        size_t m_collectionID;
+        /// Standard constructor with initializing arguments
+        Geant4TestSensitive(Geant4Context* c, const std::string& n, DetElement det, LCDD& lcdd);
+        /// Default destructor
+        virtual ~Geant4TestSensitive();
+        /// Begin-of-tracking callback
+        virtual void begin(G4HCofThisEvent*);
+        /// End-of-tracking callback
+        virtual void end(G4HCofThisEvent*);
+        /// Method for generating hit(s) using the information of G4Step object.
+        virtual bool process(G4Step*, G4TouchableHistory*);
       };
-    }  // End namespace Test
+    }   // End namespace Test
   }    // End namespace Simulation
 }      // End namespace DD4hep
 
diff --git a/DDG4/include/DDG4/Geant4TrackHandler.h b/DDG4/include/DDG4/Geant4TrackHandler.h
index f56428bb968808fb77bec81e953946eb8c4275c5..6a19d5b944c2c9bb9cd2fa681ac44a0db54a3734 100644
--- a/DDG4/include/DDG4/Geant4TrackHandler.h
+++ b/DDG4/include/DDG4/Geant4TrackHandler.h
@@ -30,7 +30,7 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     // Forward declarations;
     class Geant4TrackHandler;
@@ -44,55 +44,91 @@ namespace DD4hep {
      * @version 1.0
      */
     class Geant4TrackHandler {
-      public:
+    public:
       typedef G4VUserTrackInformation Info;
       typedef G4ReferenceCountedHandle<G4VTouchable> Touchable;
       /// Reference to the track object
       const G4Track* track;
       /// Initializing constructor
-      Geant4TrackHandler(const G4Track* t) : track(t) {                                      }
+      Geant4TrackHandler(const G4Track* t)
+          : track(t) {
+      }
       /// Conversion to G4Track
-      operator const G4Track* () const          { return track;                              }
+      operator const G4Track*() const {
+        return track;
+      }
       /// Track's particle definition
-      G4ParticleDefinition* trackDef()  const   { return track->GetDefinition();             }
+      G4ParticleDefinition* trackDef() const {
+        return track->GetDefinition();
+      }
       /// Track position
-      const G4ThreeVector& position()  const    { return track->GetPosition();               }
+      const G4ThreeVector& position() const {
+        return track->GetPosition();
+      }
       /// Track energy
-      double energy() const                     { return track->GetTotalEnergy();            }
+      double energy() const {
+        return track->GetTotalEnergy();
+      }
       /// Track velocity
-      double velocity() const                   { return track->GetVelocity();               }
+      double velocity() const {
+        return track->GetVelocity();
+      }
       /// Track length
-      double length() const                     { return track->GetTrackLength();            }
+      double length() const {
+        return track->GetTrackLength();
+      }
       /// Track time
-      double time()  const                      { return track->GetGlobalTime();             }
+      double time() const {
+        return track->GetGlobalTime();
+      }
       /// Physical (original) volume of the track
-      G4VPhysicalVolume* vol() const            { return track->GetVolume();                 }
+      G4VPhysicalVolume* vol() const {
+        return track->GetVolume();
+      }
       /// Next physical volume of the track
-      G4VPhysicalVolume* nextVol() const        { return track->GetNextVolume();             }
+      G4VPhysicalVolume* nextVol() const {
+        return track->GetNextVolume();
+      }
       /// Logical volume of the origine vertex
-      const G4LogicalVolume* vertexVol() const  { return track->GetLogicalVolumeAtVertex();  }
+      const G4LogicalVolume* vertexVol() const {
+        return track->GetLogicalVolumeAtVertex();
+      }
 
       /// Touchable of the track
-      const Touchable& touchable() const        { return track->GetTouchableHandle();        }
+      const Touchable& touchable() const {
+        return track->GetTouchableHandle();
+      }
       /// Next touchable of the track
-      const Touchable& nextTouchable() const    { return track->GetNextTouchableHandle();    }
+      const Touchable& nextTouchable() const {
+        return track->GetNextTouchableHandle();
+      }
 
       /// Physical process of the track generation
-      const G4VProcess* creatorProcess() const  { return track->GetCreatorProcess();         }
+      const G4VProcess* creatorProcess() const {
+        return track->GetCreatorProcess();
+      }
       /// User information block
-      Info* userInfo() const                    { return track->GetUserInformation();        }
+      Info* userInfo() const {
+        return track->GetUserInformation();
+      }
       /// Set user information block (const mis-match)
       //void setUserInfo(Info* info)              { track->SetUserInformation(info);           }
       /// Specific user information block
-      template <typename T> T* info() const     { return (T*)userInfo();                     }
+      template <typename T> T* info() const {
+        return (T*) userInfo();
+      }
       /// Step information
-      const G4Step* step()  const               { return track->GetStep();                   }
-      /// Step number 
-      G4int stepNumber() const                  { return track->GetCurrentStepNumber();      }
+      const G4Step* step() const {
+        return track->GetStep();
+      }
+      /// Step number
+      G4int stepNumber() const {
+        return track->GetCurrentStepNumber();
+      }
 
-      int pdgID() const  {
-	G4ParticleDefinition* def = trackDef();
-	return def ? def->GetPDGEncoding() : 0;
+      int pdgID() const {
+        G4ParticleDefinition* def = trackDef();
+        return def ? def->GetPDGEncoding() : 0;
       }
     };
 
diff --git a/DDG4/include/DDG4/Geant4TrackingAction.h b/DDG4/include/DDG4/Geant4TrackingAction.h
index c695714af50f67e14f27a3ca226373047b59c8f0..95ccfeb0ec7a5f25f2852c4f5285a7495252447c 100644
--- a/DDG4/include/DDG4/Geant4TrackingAction.h
+++ b/DDG4/include/DDG4/Geant4TrackingAction.h
@@ -24,32 +24,34 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     // Forward declarations
     class Geant4TrackInformation;
 
     /** @class Geant4TrackingAction Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Default base class for all geant 4 tracking actions.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4TrackingAction : public Geant4Action   {
+    class Geant4TrackingAction: public Geant4Action {
     public:
       /// Standard constructor
-      Geant4TrackingAction(Geant4Context* context, const std::string& name="");
+      Geant4TrackingAction(Geant4Context* context, const std::string& name = "");
       /// Default destructor
       virtual ~Geant4TrackingAction();
       /// Access the tracking manager
-      G4TrackingManager* trackMgr() const  { return m_context->trackMgr(); }
-      /// Get the valid Geant4 tarck information 
+      G4TrackingManager* trackMgr() const {
+        return m_context->trackMgr();
+      }
+      /// Get the valid Geant4 tarck information
       Geant4TrackInformation* trackInfo(G4Track* track) const;
       /// Mark all children of the track to be stored
-      bool storeChildren()  const;
+      bool storeChildren() const;
       /// Mark a single child of the track to be stored
-      bool storeChild(Geant4TrackInformation* info)  const;
+      bool storeChild(Geant4TrackInformation* info) const;
       /// Pre-track action callback
       virtual void begin(const G4Track* trk);
       /// Post-track action callback
@@ -57,13 +59,13 @@ namespace DD4hep {
     };
 
     /** @class Geant4EventActionSequence Geant4Action.h DDG4/Geant4Action.h
-     * 
+     *
      * Concrete implementation of the Geant4 tracking action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4TrackingActionSequence : public Geant4Action   {
+    class Geant4TrackingActionSequence: public Geant4Action {
     protected:
       /// Callback sequence for pre tracking action
       CallbackSequence m_begin;
@@ -77,9 +79,13 @@ namespace DD4hep {
       /// Default destructor
       virtual ~Geant4TrackingActionSequence();
       /// Register Pre-track action callback
-      template <typename Q, typename T> void callAtBegin(Q* p, void (T::*f)(const G4Track*)) { m_begin.add(p,f);}
+      template <typename Q, typename T> void callAtBegin(Q* p, void (T::*f)(const G4Track*)) {
+        m_begin.add(p, f);
+      }
       /// Register Post-track action callback
-      template <typename Q, typename T> void callAtEnd(Q* p, void (T::*f)(const G4Track*))   { m_end.add(p,f); }
+      template <typename Q, typename T> void callAtEnd(Q* p, void (T::*f)(const G4Track*)) {
+        m_end.add(p, f);
+      }
       /// Add an actor responding to all callbacks. Sequence takes ownership.
       void adopt(Geant4TrackingAction* action);
       /// Pre-track action callback
diff --git a/DDG4/include/DDG4/Geant4TrackingPostAction.h b/DDG4/include/DDG4/Geant4TrackingPostAction.h
index f7bcc8a5d7b596f29f8e2ff665f546f897a02215..24868d4a2265059e14b33a9cc77cd6ffeed55aaa 100644
--- a/DDG4/include/DDG4/Geant4TrackingPostAction.h
+++ b/DDG4/include/DDG4/Geant4TrackingPostAction.h
@@ -21,24 +21,24 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4TrackingPostAction Geant4TrackingPostAction.h DDG4/Geant4TrackingPostAction.h
-     * 
+     *
      * Default base class for all geant 4 tracking actions.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4TrackingPostAction : public Geant4TrackingAction   {
+    class Geant4TrackingPostAction: public Geant4TrackingAction {
     protected:
       typedef std::vector<std::string> StringV;
       StringV m_requiredProcs;
       StringV m_ignoredProcs;
-      bool    m_storeMarkedTracks;
+      bool m_storeMarkedTracks;
     public:
       /// Standard constructor
-      Geant4TrackingPostAction(Geant4Context* context, const std::string& name="");
+      Geant4TrackingPostAction(Geant4Context* context, const std::string& name = "");
       /// Default destructor
       virtual ~Geant4TrackingPostAction();
 
diff --git a/DDG4/include/DDG4/Geant4TrackingPreAction.h b/DDG4/include/DDG4/Geant4TrackingPreAction.h
index b3b75c4d097f6454b6cfebc4439a981ce7f9455a..4c9cc244f52e4035a0506f53a5216049c6aa2c7d 100644
--- a/DDG4/include/DDG4/Geant4TrackingPreAction.h
+++ b/DDG4/include/DDG4/Geant4TrackingPreAction.h
@@ -20,19 +20,19 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
+  namespace Simulation {
 
     /** @class Geant4TrackingPreAction Geant4TrackingPreAction.h DDG4/Geant4TrackingPreAction.h
-     * 
+     *
      * Default base class for all geant 4 tracking actions.
      *
      * @author  M.Frank
      * @version 1.0
      */
-    class Geant4TrackingPreAction : public Geant4TrackingAction   {
+    class Geant4TrackingPreAction: public Geant4TrackingAction {
     public:
       /// Standard constructor
-      Geant4TrackingPreAction(Geant4Context* context, const std::string& name="");
+      Geant4TrackingPreAction(Geant4Context* context, const std::string& name = "");
       /// Default destructor
       virtual ~Geant4TrackingPreAction();
       /// Begin-of-tracking callback
diff --git a/DDG4/include/DDG4/Geant4UIMessenger.h b/DDG4/include/DDG4/Geant4UIMessenger.h
new file mode 100644
index 0000000000000000000000000000000000000000..229e92109645207322c7d9ece27abb7b51073b8f
--- /dev/null
+++ b/DDG4/include/DDG4/Geant4UIMessenger.h
@@ -0,0 +1,74 @@
+// $Id: Geant4Hits.h 513 2013-04-05 14:31:53Z gaede $
+//====================================================================
+//  AIDA Detector description implementation
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#ifndef DD4HEP_DDG4_GEANT4UIMESSENGER_H
+#define DD4HEP_DDG4_GEANT4UIMESSENGER_H
+
+// Framework include files
+#include "DDG4/ComponentProperties.h"
+#include "DDG4/Geant4Callback.h"
+#include "G4UImessenger.hh"
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation {
+
+    /** @class Geant4UIMessenger Geant4UIMessenger.h DDG4/Geant4UIMessenger.h
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    class Geant4UIMessenger: public G4UImessenger {
+    public:
+      typedef std::map<G4UIcommand*, std::string> Commands;
+      typedef std::map<G4UIcommand*, Callback> Actions;
+    protected:
+      /// The UI directory of this component
+      G4UIdirectory* m_directory;
+      /// Reference to the property manager corresponding to the component
+      PropertyManager* m_properties;
+      /// Component name
+      std::string m_name;
+      /// Path in the UI hierarchy of this component
+      std::string m_path;
+      /// Property update command map
+      Commands m_propertyCmd;
+      /// Action map
+      Actions m_actionCmd;
+
+    public:
+      /// Initializing constructor
+      Geant4UIMessenger(const std::string& name, const std::string& path);
+      /// Default destructor
+      virtual ~Geant4UIMessenger();
+      /// Add a new callback structure
+      void addCall(const std::string& name, const std::string& description, const Callback& cb);
+      /// Add any callback (without parameters to the messenger
+      template <typename Q, typename R, typename T>
+      void addCall(const std::string& name, const std::string& description, Q* p, R (T::*f)()) {
+        CallbackSequence::checkTypes(typeid(Q), typeid(T), dynamic_cast<T*>(p));
+        addCall(Callback(p).make(f));
+      }
+      /// Export all properties to the Geant4 UI
+      void exportProperties(PropertyManager& mgr);
+      /// Accept ne property value from Geant4 UI
+      void SetNewValue(G4UIcommand *c, G4String val);
+      /// Pass current property value to Geant4 UI
+      G4String GetCurrentValue(G4UIcommand *c);
+    };
+
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+
+#endif // DD4HEP_DDG4_GEANT4UIMESSENGER_H
diff --git a/DDG4/include/DDG4/Geant4UserPhysicsList.h b/DDG4/include/DDG4/Geant4UserPhysicsList.h
new file mode 100644
index 0000000000000000000000000000000000000000..28ea21513bcd9865d185314d9846913f47aba8f8
--- /dev/null
+++ b/DDG4/include/DDG4/Geant4UserPhysicsList.h
@@ -0,0 +1,80 @@
+// $Id: Geant4config.h 615 2013-06-18 11:13:35Z markus.frank $
+//====================================================================
+//  AIDA Detector description implementation
+//--------------------------------------------------------------------
+//
+//  Small helper file with abbreviations to write configurations
+//  for CINT; also used when writing the XML configuration.
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#ifndef DDG4_GEANT4USERPHYSICSLIST_H
+#define DDG4_GEANT4USERPHYSICSLIST_H
+
+#include "DD4hep/InstanceCount.h"
+#include "DDG4/Geant4PhysicsList.h"
+#include "G4VModularPhysicsList.hh"
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation {
+
+    /** @class Geant4UserPhysicsList
+     *
+     * Concrete implementation of the Geant4 user physics list
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    template <typename BASE_IMP> struct Geant4UserPhysicsList: virtual public Geant4UserPhysics, virtual public BASE_IMP {
+    protected:
+      /// Action container
+      Geant4PhysicsListActionSequence* m_sequence;
+    public:
+      /// Standard constructor
+      Geant4UserPhysicsList(Geant4PhysicsListActionSequence* seq, int verbose)
+          : Geant4UserPhysics(), BASE_IMP(verbose), m_sequence(seq) {
+        if (m_sequence)
+          m_sequence->addRef();
+        InstanceCount::increment(this);
+      }
+      /// Default destructor
+      virtual ~Geant4UserPhysicsList() {
+        if (m_sequence)
+          m_sequence->release();
+        m_sequence = 0;
+        InstanceCount::decrement(this);
+      }
+      /// User construction callback
+      virtual void ConstructProcess() {
+        this->BASE_IMP::ConstructProcess();
+        if (m_sequence)
+          m_sequence->constructProcess(this);
+      }
+      /// User construction callback
+      virtual void ConstructParticle() {
+        this->BASE_IMP::ConstructParticle();
+        if (m_sequence)
+          m_sequence->constructParticles(this);
+      }
+      /// Enable transportation
+      virtual void AddTransportation() {
+        this->G4VUserPhysicsList::AddTransportation();
+      }
+      // Register Physics Constructor
+      virtual void RegisterPhysics(G4VPhysicsConstructor* physics) {
+        this->G4VModularPhysicsList::RegisterPhysics(physics);
+      }
+    };
+
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+
+#endif // DDG4_GEANT4USERPHYSICSLIST_H
diff --git a/DDG4/include/DDG4/Geant4VolumeManager.h b/DDG4/include/DDG4/Geant4VolumeManager.h
index 028288da65b89382f62b720374a3677ac4d15ed6..ed6a89d0335537dd37d0ba33a4e7f13f15af35b2 100644
--- a/DDG4/include/DDG4/Geant4VolumeManager.h
+++ b/DDG4/include/DDG4/Geant4VolumeManager.h
@@ -37,16 +37,16 @@ namespace DD4hep {
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4VolumeManager : public Geometry::Handle<Geant4GeometryInfo>  {
+    struct Geant4VolumeManager: public Geometry::Handle<Geant4GeometryInfo> {
     public:
       // Forward declarations
-      typedef Geometry::Handle<Geant4GeometryInfo>  Base;
-      typedef Geometry::PlacedVolume                PlacedVolume;
-      typedef Geometry::IDDescriptor                IDDescriptor;
-      typedef IDDescriptor::VolIDFields             VolIDFields;
-      typedef std::pair<VolumeID, VolIDFields>      VolIDDescriptor;
-      typedef Geant4GeometryInfo::PlacementPath     PlacementPath;
-      typedef Geant4GeometryInfo                    Object;
+      typedef Geometry::Handle<Geant4GeometryInfo> Base;
+      typedef Geometry::PlacedVolume PlacedVolume;
+      typedef Geometry::IDDescriptor IDDescriptor;
+      typedef IDDescriptor::VolIDFields VolIDFields;
+      typedef std::pair<VolumeID, VolIDFields> VolIDDescriptor;
+      typedef Geant4GeometryInfo::PlacementPath PlacementPath;
+      typedef Geant4GeometryInfo Object;
 
     protected:
       /// Optimization flag to shortcut object checks
@@ -63,24 +63,33 @@ namespace DD4hep {
       /// Initializing constructor. The tree will automatically be built if possible
       Geant4VolumeManager(Geometry::LCDD& lcdd, Geant4GeometryInfo* info);
       /// Default constructor
-      Geant4VolumeManager() : Base(), m_isValid(false) {}
+      Geant4VolumeManager()
+          : Base(), m_isValid(false) {
+      }
       /// Constructor to be used when reading the already parsed object
-      Geant4VolumeManager(const Base& e) : Base(e), m_isValid(false) {}
+      Geant4VolumeManager(const Base& e)
+          : Base(e), m_isValid(false) {
+      }
       /// Constructor to be used when reading the already parsed object
-      Geant4VolumeManager(const Geant4VolumeManager& e) : Base(e), m_isValid(false) {}
+      Geant4VolumeManager(const Geant4VolumeManager& e)
+          : Base(e), m_isValid(false) {
+      }
       /// Constructor to be used when reading the already parsed object
-      template <typename Q> Geant4VolumeManager(const Geometry::Handle<Q>& e) : Base(e), m_isValid(false) {}
+      template <typename Q> Geant4VolumeManager(const Geometry::Handle<Q>& e)
+          : Base(e), m_isValid(false) {
+      }
 
       /// Helper: Generate placement path from touchable object
-      PlacementPath placementPath(const G4VTouchable* touchable, bool exception=true) const;
+      PlacementPath placementPath(const G4VTouchable* touchable, bool exception = true) const;
 
       /// Accessor to resolve TGeo geometry placements from Geant4 placements
-      PlacedVolume placement(const G4VPhysicalVolume* node)  const;
+      PlacedVolume placement(const G4VPhysicalVolume* node) const;
       /// Accessor to resolve Geant4 geometry placements from TGeo placements
-      G4VPhysicalVolume* placement(const TGeoNode* node)  const;
+      G4VPhysicalVolume* placement(const TGeoNode* node) const;
       /// Accessor to resolve Geant4 geometry placements from TGeo placements
-      G4VPhysicalVolume* placement(const PlacedVolume& node)  const   
-      {  	return placement(node.ptr());      }
+      G4VPhysicalVolume* placement(const PlacedVolume& node) const {
+        return placement(node.ptr());
+      }
       /// Access CELLID by placement path
       VolumeID volumeID(const PlacementPath& path) const;
       /// Access CELLID by Geant4 touchable object
diff --git a/DDG4/include/DDG4/Parsers.h b/DDG4/include/DDG4/Parsers.h
index 0634e77fa560dfbcd9012bb276bc919c4792be6e..ec5c5b459ff723e9b105c04677c82393843290f3 100644
--- a/DDG4/include/DDG4/Parsers.h
+++ b/DDG4/include/DDG4/Parsers.h
@@ -56,8 +56,8 @@
  *  @date 2006-05-12
  */
 // ============================================================================
-namespace DD4hep  {
-  namespace Parsers  {
+namespace DD4hep {
+  namespace Parsers {
     // ========================================================================
     /** parse the <c>bool</c> value
      *  @see DD4hep::Parsers::BoolGrammar
@@ -70,146 +70,146 @@ namespace DD4hep  {
      *  @date 2006-05-12
      */
     PARSERS_DECL_FOR_SINGLE(bool)
-      // ========================================================================
-      /** parse the <c>char</c> value
-       *
-       *  @see DD4hep::Parsers::CharGrammar
-       *  @param result (output) boolean result
-       *  @param input  (input) the string to be parsed
-       *  @return status code
-       *
-       *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-       *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-       *  @date 2006-05-12
-       */
-      PARSERS_DECL_FOR_SINGLE(char)
-      /// @see DD4hep::Parsers::parser(char&,std::string&)
-      PARSERS_DECL_FOR_SINGLE(unsigned char)
-      /// @see DD4hep::Parsers::parser(char&,std::string&)
-      PARSERS_DECL_FOR_SINGLE(signed char)
-      // ========================================================================
-      /** parse the <c>int</c> value
-       *
-       *  @see DD4hep::Parsers::IntGrammar
-       *  @param result (output) integer result
-       *  @param input  (input) the string to be parsed
-       *  @return status code
-       *
-       *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-       *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-       *  @date 2006-05-14
-       */
-      PARSERS_DECL_FOR_SINGLE(int)
-      /// @see DD4hep::Parsers::parser( int&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(short)
-      /// @see DD4hep::Parsers::parser( int&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(unsigned short)
-      /// @see DD4hep::Parsers::parser( int&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(unsigned int)
-      /// @see DD4hep::Parsers::parser( int&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(long)
-      /// @see DD4hep::Parsers::parser( int&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(unsigned long)
-      /// @see DD4hep::Parsers::parser( int&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(long long)
-      /// @see DD4hep::Parsers::parser( int&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(unsigned long long)
-      // ========================================================================
-      /** parse the <c>double</c> value
-       *
-       *  @see DD4hep::Parsers::RealGrammar
-       *  @param result (output) double result
-       *  @param input  (input) the string to be parsed
-       *  @return status code
-       *
-       *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-       *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-       *  @date 2006-05-14
-       */
-      PARSERS_DECL_FOR_SINGLE(double)
-      /// @see DD4hep::Parsers::parser( double&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(float)
-      /// @see DD4hep::Parsers::parser( double&, const std::string& )
-      PARSERS_DECL_FOR_SINGLE(long double)
-      // ========================================================================
-      /** parse the <c>std::string</c> value
-       *
-       *  @see DD4hep::Parsers::StringGrammar
-       *  @param result (output) string result
-       *  @param input  (input) the string to be parsed
-       *  @return status code
-       *
-       *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-       *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-       *  @date 2006-05-14
-       */
-      PARSERS_DECL_FOR_SINGLE(std::string)
-      // ========================================================================
+    // ========================================================================
+    /** parse the <c>char</c> value
+     *
+     *  @see DD4hep::Parsers::CharGrammar
+     *  @param result (output) boolean result
+     *  @param input  (input) the string to be parsed
+     *  @return status code
+     *
+     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
+     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
+     *  @date 2006-05-12
+     */
+    PARSERS_DECL_FOR_SINGLE(char)
+    /// @see DD4hep::Parsers::parser(char&,std::string&)
+    PARSERS_DECL_FOR_SINGLE(unsigned char)
+    /// @see DD4hep::Parsers::parser(char&,std::string&)
+    PARSERS_DECL_FOR_SINGLE(signed char)
+    // ========================================================================
+    /** parse the <c>int</c> value
+     *
+     *  @see DD4hep::Parsers::IntGrammar
+     *  @param result (output) integer result
+     *  @param input  (input) the string to be parsed
+     *  @return status code
+     *
+     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
+     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
+     *  @date 2006-05-14
+     */
+    PARSERS_DECL_FOR_SINGLE(int)
+    /// @see DD4hep::Parsers::parser( int&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(short)
+    /// @see DD4hep::Parsers::parser( int&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(unsigned short)
+    /// @see DD4hep::Parsers::parser( int&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(unsigned int)
+    /// @see DD4hep::Parsers::parser( int&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(long)
+    /// @see DD4hep::Parsers::parser( int&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(unsigned long)
+    /// @see DD4hep::Parsers::parser( int&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(long long)
+    /// @see DD4hep::Parsers::parser( int&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(unsigned long long)
+    // ========================================================================
+    /** parse the <c>double</c> value
+     *
+     *  @see DD4hep::Parsers::RealGrammar
+     *  @param result (output) double result
+     *  @param input  (input) the string to be parsed
+     *  @return status code
+     *
+     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
+     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
+     *  @date 2006-05-14
+     */
+    PARSERS_DECL_FOR_SINGLE(double)
+    /// @see DD4hep::Parsers::parser( double&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(float)
+    /// @see DD4hep::Parsers::parser( double&, const std::string& )
+    PARSERS_DECL_FOR_SINGLE(long double)
+    // ========================================================================
+    /** parse the <c>std::string</c> value
+     *
+     *  @see DD4hep::Parsers::StringGrammar
+     *  @param result (output) string result
+     *  @param input  (input) the string to be parsed
+     *  @return status code
+     *
+     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
+     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
+     *  @date 2006-05-14
+     */
+    PARSERS_DECL_FOR_SINGLE(std::string)
+    // ========================================================================
 
-      PARSERS_DECL_FOR_LIST(bool)
-      PARSERS_DECL_FOR_LIST(char)
-      PARSERS_DECL_FOR_LIST(unsigned char)
-      PARSERS_DECL_FOR_LIST(signed char)
+    PARSERS_DECL_FOR_LIST(bool)
+    PARSERS_DECL_FOR_LIST(char)
+    PARSERS_DECL_FOR_LIST(unsigned char)
+    PARSERS_DECL_FOR_LIST(signed char)
 
-      PARSERS_DECL_FOR_LIST(int)
-      PARSERS_DECL_FOR_LIST(short)
-      PARSERS_DECL_FOR_LIST(unsigned short)
-      PARSERS_DECL_FOR_LIST(unsigned int)
-      PARSERS_DECL_FOR_LIST(long)
-      PARSERS_DECL_FOR_LIST(unsigned long)
-      PARSERS_DECL_FOR_LIST(long long)
-      PARSERS_DECL_FOR_LIST(unsigned long long)
+    PARSERS_DECL_FOR_LIST(int)
+    PARSERS_DECL_FOR_LIST(short)
+    PARSERS_DECL_FOR_LIST(unsigned short)
+    PARSERS_DECL_FOR_LIST(unsigned int)
+    PARSERS_DECL_FOR_LIST(long)
+    PARSERS_DECL_FOR_LIST(unsigned long)
+    PARSERS_DECL_FOR_LIST(long long)
+    PARSERS_DECL_FOR_LIST(unsigned long long)
 
-      PARSERS_DECL_FOR_LIST(double)
-      PARSERS_DECL_FOR_LIST(float)
-      PARSERS_DECL_FOR_LIST(long double)
+    PARSERS_DECL_FOR_LIST(double)
+    PARSERS_DECL_FOR_LIST(float)
+    PARSERS_DECL_FOR_LIST(long double)
 
-      PARSERS_DECL_FOR_LIST(std::string)
-      // ========================================================================
-      // Advanced parses
-      // ========================================================================
-      /** parse the <c>std::pair\<double,double\></c> value
-       *
-       *  @see DD4hep::Parsers::PairGrammar
-       *  @see DD4hep::Parsers::RealGrammar
-       *  @param result (output) pair of doubles
-       *  @param input  (input) the string to be parsed
-       *  @return status code
-       *
-       *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-       *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-       *  @date 2006-05-14
-       */
-      PARSERS_DECL_FOR_PAIR(double,double)
-      // ========================================================================
-      /** parse the <c>std::pair\<int,int\></c> value
-       *
-       *  @see DD4hep::Parsers::PairGrammar
-       *  @see DD4hep::Parsers::IntGrammar
-       *  @param result (output) pair of integers
-       *  @param input  (input) the string to be parsed
-       *  @return status code
-       *
-       *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-       *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-       *  @date 2006-05-14
-       */
-      PARSERS_DECL_FOR_PAIR(int, int)
-      // ========================================================================
-      /** parse the <c>std::vector\<std::pair\<double,double\> \></c> value
-       *
-       *  @see DD4hep::Parsers::VectorGrammar
-       *  @see DD4hep::Parsers::PairGrammar
-       *  @see DD4hep::Parsers::RealGrammar
-       *  @param result (output) vector with pairs of doubles
-       *  @param input  (input) the string to be parsed
-       *  @return status code
-       *
-       *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-       *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-       *  @date 2006-05-14
-       */
-      int parse(std::vector< std::pair<double,double> >& result,const std::string& input);
+    PARSERS_DECL_FOR_LIST(std::string)
+    // ========================================================================
+    // Advanced parses
+    // ========================================================================
+    /** parse the <c>std::pair\<double,double\></c> value
+     *
+     *  @see DD4hep::Parsers::PairGrammar
+     *  @see DD4hep::Parsers::RealGrammar
+     *  @param result (output) pair of doubles
+     *  @param input  (input) the string to be parsed
+     *  @return status code
+     *
+     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
+     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
+     *  @date 2006-05-14
+     */
+    PARSERS_DECL_FOR_PAIR(double, double)
+    // ========================================================================
+    /** parse the <c>std::pair\<int,int\></c> value
+     *
+     *  @see DD4hep::Parsers::PairGrammar
+     *  @see DD4hep::Parsers::IntGrammar
+     *  @param result (output) pair of integers
+     *  @param input  (input) the string to be parsed
+     *  @return status code
+     *
+     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
+     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
+     *  @date 2006-05-14
+     */
+    PARSERS_DECL_FOR_PAIR(int, int)
+    // ========================================================================
+    /** parse the <c>std::vector\<std::pair\<double,double\> \></c> value
+     *
+     *  @see DD4hep::Parsers::VectorGrammar
+     *  @see DD4hep::Parsers::PairGrammar
+     *  @see DD4hep::Parsers::RealGrammar
+     *  @param result (output) vector with pairs of doubles
+     *  @param input  (input) the string to be parsed
+     *  @return status code
+     *
+     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
+     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
+     *  @date 2006-05-14
+     */
+    int parse(std::vector<std::pair<double, double> >& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::vector\<std::pair\<int,int\> \></c> value
      *
@@ -224,9 +224,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::vector< std::pair<int,int> >& result ,
-	const std::string&                 input  ) ;
+    int parse(std::vector<std::pair<int, int> >& result, const std::string& input);
     // ========================================================================
     // vector< vector< TYPE > >
     // ========================================================================
@@ -242,7 +240,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse(std::vector< std::vector<std::string> >& result,const std::string& input);
+    int parse(std::vector<std::vector<std::string> >& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::vector\<std::vector\<double\> \></c> value
      *
@@ -256,7 +254,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse(std::vector< std::vector<double> >& result,const std::string& input);
+    int parse(std::vector<std::vector<double> >& result, const std::string& input);
     // ========================================================================
     // map< TYPE, TYPE >
     // ========================================================================
@@ -272,9 +270,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::map< int , int >& result ,
-	const std::string&     input  ) ;
+    int parse(std::map<int, int>& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<int , double\></c> value
      *
@@ -289,9 +285,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::map< int , double >& result ,
-	const std::string&        input  ) ;
+    int parse(std::map<int, double>& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<std::string , std::string\></c> value
      *
@@ -305,9 +299,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::map< std::string , std::string >& result ,
-	const std::string&                     input  ) ;
+    int parse(std::map<std::string, std::string>& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<std::string , int\></c> value
      *
@@ -322,9 +314,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::map< std::string , int >& result ,
-	const std::string&             input  ) ;
+    int parse(std::map<std::string, int>& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<std::string , double\></c> value
      *
@@ -339,9 +329,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::map< std::string , double >& result ,
-	const std::string&                input  ) ;
+    int parse(std::map<std::string, double>& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<std::string , std::vector\<std::string\> \></c>
      *  value
@@ -358,9 +346,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::map< std::string , std::vector< std::string> >& result ,
-	const std::string&                                   input  ) ;
+    int parse(std::map<std::string, std::vector<std::string> >& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<std::string , std::vector\<int\> \></c> value
      *
@@ -377,9 +363,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::map< std::string , std::vector< int > >& result ,
-	const std::string&                            input  ) ;
+    int parse(std::map<std::string, std::vector<int> >& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<std::string , std::vector\<double\> \></c> value
      *
@@ -396,9 +380,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-14
      */
-    int parse
-      ( std::map< std::string , std::vector< double > >& result ,
-	const std::string&                               input  ) ;
+    int parse(std::map<std::string, std::vector<double> >& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<int,std::string\> \></c> objects
      *
@@ -407,9 +389,7 @@ namespace DD4hep  {
      *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
      *  @date 2007-12-06
      */
-    int parse
-      ( std::map<int, std::string>& result ,
-	const std::string&          input  ) ;
+    int parse(std::map<int, std::string>& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<unsigned int,std::string\> \></c> objects
      *
@@ -418,7 +398,7 @@ namespace DD4hep  {
      *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
      *  @date 2007-12-06
      */
-    int parse(std::map<unsigned int, std::string>& result,const std::string& input);
+    int parse(std::map<unsigned int, std::string>& result, const std::string& input);
     // ========================================================================
     /** parse the <c>std::map\<unsigned int,std::string\> \></c> objects
      *
@@ -453,10 +433,7 @@ namespace DD4hep  {
      *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
      *  @date 2006-05-12
      */
-    int parse
-      ( std::string&       name  ,
-	std::string&       value ,
-	const std::string& input ) ;
+    int parse(std::string& name, std::string& value, const std::string& input);
 
     // ========================================================================
     /** helper function, needed for implementation of map of pairs
@@ -470,9 +447,7 @@ namespace DD4hep  {
      *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
      *  @date 2009-05-19
      */
-    int parse
-      ( std::map<std::string,std::pair<double,double> >& params ,
-	const std::string&                               input  ) ;
+    int parse(std::map<std::string, std::pair<double, double> >& params, const std::string& input);
     // ========================================================================
     /** parser function for C-arrays
      *  @param params C-array
@@ -482,16 +457,19 @@ namespace DD4hep  {
      *  @date 2009-09-15
      */
     template <class T, unsigned int N>
-      int parse ( T(&result)[N] , const std::string& input )
-    {
-      typedef std::vector<T> _Vct ;
+    int parse(T (&result)[N], const std::string& input) {
+      typedef std::vector<T> _Vct;
       // create the temporary vector
-      _Vct tmp ;
-      int sc = parse ( tmp , input ) ;
-      if ( !sc  ) { return sc; }  //  RETURN
-      if ( N != tmp.size() ) { return 0;  }  //  RETURN
+      _Vct tmp;
+      int sc = parse(tmp, input);
+      if (!sc) {
+        return sc;
+      }   //  RETURN
+      if (N != tmp.size()) {
+        return 0;
+      }   //  RETURN
       //
-      std::copy ( tmp.begin() , tmp.end() , result ) ;
+      std::copy(tmp.begin(), tmp.end(), result);
       //
       return 1;                            //  RETURN
     }
@@ -504,28 +482,31 @@ namespace DD4hep  {
      *  @date 2009-09-15
      */
     template <unsigned int N>
-      int parse ( char(&result)[N] , const std::string& input )
-      {
-	// clear the string
-	std::fill_n ( result , N , ' ' ) ;
-	// create the temporary string
-	std::string tmp ;
-	int sc = parse ( tmp , input ) ;
-	if ( !sc ) { return sc                 ; }  //  RETURN
-	if       ( N     == tmp.size() )
-	  { std::copy ( tmp.begin() , tmp.end() , result ) ; }
-	else if  ( N + 2    == tmp.size()                 &&
-		   ( '\''   == tmp[0] || '\"' == tmp[0] ) &&
-		   ( tmp[0] == tmp[tmp.size()-1]          ))
-	  { std::copy ( tmp.begin() + 1 , tmp.end() -1 , result ) ; }
-	else { return 0; }
-	//
-	return 1;                            //  RETURN
+    int parse(char (&result)[N], const std::string& input) {
+      // clear the string
+      std::fill_n(result, N, ' ');
+      // create the temporary string
+      std::string tmp;
+      int sc = parse(tmp, input);
+      if (!sc) {
+        return sc;
+      }   //  RETURN
+      if (N == tmp.size()) {
+        std::copy(tmp.begin(), tmp.end(), result);
       }
-    // ========================================================================
-  } //                                          end of namespace Parsers
-  // ==========================================================================
-} //                                                     end of namespace DD4hep
+      else if (N + 2 == tmp.size() && ('\'' == tmp[0] || '\"' == tmp[0]) && (tmp[0] == tmp[tmp.size() - 1])) {
+        std::copy(tmp.begin() + 1, tmp.end() - 1, result);
+      }
+      else {
+        return 0;
+      }
+      //
+      return 1;                            //  RETURN
+    }
+  // ========================================================================
+  }//                                          end of namespace Parsers
+// ==========================================================================
+}//                                                     end of namespace DD4hep
 // ============================================================================
 // The END
 // ============================================================================
diff --git a/DDG4/include/DDG4/ToStream.h b/DDG4/include/DDG4/ToStream.h
index 3297598170300116145049af0350a0b7b8af13b9..2cbe3cef8a28a499af8c1e15dd77b7906536c690 100644
--- a/DDG4/include/DDG4/ToStream.h
+++ b/DDG4/include/DDG4/ToStream.h
@@ -29,19 +29,17 @@
  *                     easier especializations
  */
 // ============================================================================
-namespace DD4hep
-{
+namespace DD4hep {
   // ==========================================================================
-  namespace Utils
-  {
+  namespace Utils {
     // ========================================================================
     /** the generic implementation of the printout to the std::ostream
      *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-05-12
      */
-    template<class TYPE>
-    std::ostream& toStream ( const TYPE& obj, std::ostream& s ) ;
+    template <class TYPE>
+    std::ostream& toStream(const TYPE& obj, std::ostream& s);
     // ========================================================================
     /** the helper function to print the sequence
      *  @param first (INPUT)  begin-iterator for the sequence
@@ -55,13 +53,12 @@ namespace DD4hep
      *  @date 2009-09-15
      */
     template <class ITERATOR>
-    inline std::ostream& toStream
-    ( ITERATOR           first ,                       // begin of the sequence
-      ITERATOR           last  ,                       //   end of the sequence
-      std::ostream&      s     ,                       //            the stream
-      const std::string& open  ,                       //               opening
-      const std::string& close ,                       //               closing
-      const std::string& delim ) ;                     //             delimiter
+    inline std::ostream& toStream(ITERATOR first,                       // begin of the sequence
+        ITERATOR last,                       //   end of the sequence
+        std::ostream& s,                       //            the stream
+        const std::string& open,                       //               opening
+        const std::string& close,                       //               closing
+        const std::string& delim);                     //             delimiter
     // ========================================================================
     /** the printtout of the strings.
      *  the string is printed a'la Python using the quotes
@@ -69,51 +66,45 @@ namespace DD4hep
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-05-12
      */
-    inline std::ostream& toStream
-    ( const std::string& obj , std::ostream& s )
-    {
-      if ( std::string::npos == obj.find('\'') )
-      { s << "\'" << obj << "\'" ; }
-      else
-      { s << "\"" << obj << "\"" ; }
-      return s ;
+    inline std::ostream& toStream(const std::string& obj, std::ostream& s) {
+      if (std::string::npos == obj.find('\'')) {
+        s << "\'" << obj << "\'";
+      }
+      else {
+        s << "\"" << obj << "\"";
+      }
+      return s;
     }
     /** the printout of boolean values "a'la Python"
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-09-09
      */
-    inline std::ostream& toStream
-    ( const bool         obj , std::ostream& s )
-    { return s << ( obj ? "True" : "False" ) ; }
+    inline std::ostream& toStream(const bool obj, std::ostream& s) {
+      return s << (obj ? "True" : "False");
+    }
     /** the printout of float values with the reasonable precision
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-09-09
      */
-    inline std::ostream& toStream
-    ( const float        obj , std::ostream& s , const int prec = 6 )
-    {
-      const int  p = s.precision() ;
-      return s << std::setprecision (  prec ) << obj << std::setprecision ( p ) ;
+    inline std::ostream& toStream(const float obj, std::ostream& s, const int prec = 6) {
+      const int p = s.precision();
+      return s << std::setprecision(prec) << obj << std::setprecision(p);
     }
     /** the printout of double values with the reasonable precision
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-09-09
      */
-    inline std::ostream& toStream
-    ( const double       obj , std::ostream& s , const int prec = 8 )
-    {
-      const int p = s.precision() ;
-      return s << std::setprecision ( prec ) << obj << std::setprecision ( p ) ;
+    inline std::ostream& toStream(const double obj, std::ostream& s, const int prec = 8) {
+      const int p = s.precision();
+      return s << std::setprecision(prec) << obj << std::setprecision(p);
     }
     /** the printout of long double values with the reasonable precision
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-09-09
      */
-    inline std::ostream& toStream
-    ( const long double  obj , std::ostream& s , const int prec = 10 )
-    {
-      const int p = s.precision() ;
-      return s << std::setprecision ( prec ) << obj << std::setprecision ( p ) ;
+    inline std::ostream& toStream(const long double obj, std::ostream& s, const int prec = 10) {
+      const int p = s.precision();
+      return s << std::setprecision(prec) << obj << std::setprecision(p);
     }
     // ========================================================================
     /** the partial template specialization of
@@ -123,15 +114,13 @@ namespace DD4hep
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-05-12
      */
-    template<class KTYPE, class VTYPE>
-    inline std::ostream& toStream
-    ( const std::pair<KTYPE,VTYPE>& obj, std::ostream& s)
-    {
-      s << "( "  ;
-      toStream ( obj.first  , s ) ;
-      s << " , " ;
-      toStream ( obj.second , s ) ;
-      return s << " )" ;
+    template <class KTYPE, class VTYPE>
+    inline std::ostream& toStream(const std::pair<KTYPE, VTYPE>& obj, std::ostream& s) {
+      s << "( ";
+      toStream(obj.first, s);
+      s << " , ";
+      toStream(obj.second, s);
+      return s << " )";
     }
     // ========================================================================
     /** the partial template specialization of <c>std::vector<TYPE,ALLOCATOR></c>
@@ -140,11 +129,9 @@ namespace DD4hep
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-05-12
      */
-    template<class TYPE,class ALLOCATOR>
-    inline std::ostream& toStream
-    ( const std::vector<TYPE,ALLOCATOR>& obj, std::ostream& s)
-    {
-      return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
+    template <class TYPE, class ALLOCATOR>
+    inline std::ostream& toStream(const std::vector<TYPE, ALLOCATOR>& obj, std::ostream& s) {
+      return toStream(obj.begin(), obj.end(), s, "[ ", " ]", " , ");
     }
     // ========================================================================
     /** the partial template specialization of <c>std::list<TYPE,ALLOCATOR></c>
@@ -153,11 +140,9 @@ namespace DD4hep
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2007-04-08
      */
-    template<class TYPE,class ALLOCATOR>
-    inline std::ostream& toStream
-    ( const std::list<TYPE,ALLOCATOR>& obj, std::ostream& s)
-    {
-      return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
+    template <class TYPE, class ALLOCATOR>
+    inline std::ostream& toStream(const std::list<TYPE, ALLOCATOR>& obj, std::ostream& s) {
+      return toStream(obj.begin(), obj.end(), s, "[ ", " ]", " , ");
     }
     // ========================================================================
     /** the partial template specialization of <c>std::set<TYPE,CMP,ALLOCATOR></c>
@@ -166,11 +151,9 @@ namespace DD4hep
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-05-12
      */
-    template<class TYPE,class CMP,class ALLOCATOR>
-    inline std::ostream& toStream
-    ( const std::set<TYPE,CMP,ALLOCATOR>& obj, std::ostream& s)
-    {
-      return toStream ( obj.begin() , obj.end () , s , "[ " , " ]" , " , " ) ;
+    template <class TYPE, class CMP, class ALLOCATOR>
+    inline std::ostream& toStream(const std::set<TYPE, CMP, ALLOCATOR>& obj, std::ostream& s) {
+      return toStream(obj.begin(), obj.end(), s, "[ ", " ]", " , ");
     }
     // ========================================================================
     /** the partial template specialization of
@@ -180,18 +163,16 @@ namespace DD4hep
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-05-12
      */
-    template<class KTYPE, class VTYPE,class CMP,class ALLOCATOR>
-    inline std::ostream& toStream
-    ( const std::map<KTYPE,VTYPE,CMP,ALLOCATOR>& obj, std::ostream& s )
-    {
+    template <class KTYPE, class VTYPE, class CMP, class ALLOCATOR>
+    inline std::ostream& toStream(const std::map<KTYPE, VTYPE, CMP, ALLOCATOR>& obj, std::ostream& s) {
       s << "{ ";
-      for ( typename std::map<KTYPE,VTYPE,CMP,ALLOCATOR>::const_iterator cur =
-              obj.begin() ; obj.end() != cur ; ++cur )
-      {
-        if ( obj.begin() != cur ) { s << " , " ; }
-        toStream ( cur -> first  , s ) ;
-        s << " : " ;
-        toStream ( cur -> second , s ) ;
+      for (typename std::map<KTYPE, VTYPE, CMP, ALLOCATOR>::const_iterator cur = obj.begin(); obj.end() != cur; ++cur) {
+        if (obj.begin() != cur) {
+          s << " , ";
+        }
+        toStream(cur->first, s);
+        s << " : ";
+        toStream(cur->second, s);
       }
       return s << " }";
     }
@@ -202,9 +183,8 @@ namespace DD4hep
      *  @date 2009-10-05
      */
     template <class TYPE, unsigned int N>
-    std::ostream& toStream (       TYPE(&obj)[N] , std::ostream& s )
-    {
-      return toStream ( obj , obj + N , s , "( " , " )" , " , " ) ;
+    std::ostream& toStream(TYPE (&obj)[N], std::ostream& s) {
+      return toStream(obj, obj + N, s, "( ", " )", " , ");
     }
     // ========================================================================
     /** the specialization for C-arrays, a'la python tuple
@@ -212,9 +192,8 @@ namespace DD4hep
      *  @date 2009-10-05
      */
     template <class TYPE, unsigned int N>
-    std::ostream& toStream ( const TYPE(&obj)[N] , std::ostream& s )
-    {
-      return toStream ( obj , obj + N , s , "( " , " )" , " , " ) ;
+    std::ostream& toStream(const TYPE (&obj)[N], std::ostream& s) {
+      return toStream(obj, obj + N, s, "( ", " )", " , ");
     }
     // ========================================================================
     /** the specialization for C-string, a'la python tuple
@@ -222,32 +201,36 @@ namespace DD4hep
      *  @date 2009-10-05
      */
     template <unsigned int N>
-    std::ostream& toStream (       char (&obj)[N] , std::ostream& s )
-    { return toStream ( std::string ( obj , obj+N ) , s ) ; }
+    std::ostream& toStream(char (&obj)[N], std::ostream& s) {
+      return toStream(std::string(obj, obj + N), s);
+    }
     // ========================================================================
     /** the specialization for C-string, a'la python tuple
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhenf.nl
      *  @date 2009-10-05
      */
     template <unsigned int N>
-    std::ostream& toStream ( const char (&obj)[N] , std::ostream& s )
-    { return toStream ( std::string ( obj , obj+N ) , s ) ; }
+    std::ostream& toStream(const char (&obj)[N], std::ostream& s) {
+      return toStream(std::string(obj, obj + N), s);
+    }
     // ========================================================================
     /** the specialization for C-string, a'la python tuple
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhenf.nl
      *  @date 2009-10-05
      */
-    inline std::ostream& toStream ( const char* obj , std::ostream& s )
-    { return toStream ( std::string ( obj ) , s ) ; }
+    inline std::ostream& toStream(const char* obj, std::ostream& s) {
+      return toStream(std::string(obj), s);
+    }
     // ========================================================================
     /** the generic implementation of the printout to the std::ostream
      *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-05-12
      */
-    template<class TYPE>
-    inline std::ostream& toStream ( const TYPE& obj, std::ostream& s )
-    { return s << obj ; }
+    template <class TYPE>
+    inline std::ostream& toStream(const TYPE& obj, std::ostream& s) {
+      return s << obj;
+    }
     // ========================================================================
     /** the helper function to print the sequence
      *  @param first (INPUT)  begin-iterator for the sequence
@@ -261,23 +244,23 @@ namespace DD4hep
      *  @date 2009-09-15
      */
     template <class ITERATOR>
-    inline std::ostream& toStream
-    ( ITERATOR           first ,                       // begin of the sequence
-      ITERATOR           last  ,                       //   end of the sequence
-      std::ostream&      s     ,                       //            the stream
-      const std::string& open  ,                       //               opening
-      const std::string& close ,                       //               closing
-      const std::string& delim )                       //             delimiter
-    {
-      s << open ;
-      for ( ITERATOR curr = first ; curr != last ; ++curr )
-      {
-        if ( first != curr ) { s << delim ; }
-        toStream ( *curr , s ) ;
+    inline std::ostream& toStream(ITERATOR first,                       // begin of the sequence
+        ITERATOR last,                       //   end of the sequence
+        std::ostream& s,                       //            the stream
+        const std::string& open,                       //               opening
+        const std::string& close,                       //               closing
+        const std::string& delim)                       //             delimiter
+        {
+      s << open;
+      for (ITERATOR curr = first; curr != last; ++curr) {
+        if (first != curr) {
+          s << delim;
+        }
+        toStream(*curr, s);
       }
-      s << close ;
+      s << close;
       //
-      return s ;
+      return s;
     }
     // ========================================================================
     /** the generic implementation of the type conversion to the string
@@ -288,19 +271,18 @@ namespace DD4hep
      *  @todo need to be compared with boost::lexical_cast
      */
     template <class TYPE>
-    inline std::string   toString ( const TYPE& obj )
-    {
+    inline std::string toString(const TYPE& obj) {
       std::ostringstream s;
       std::ios::fmtflags orig_flags = s.flags();
-      s.setf(std::ios::showpoint); // to display correctly floats
-      toStream ( obj , s);
+      s.setf(std::ios::showpoint);   // to display correctly floats
+      toStream(obj, s);
       s.flags(orig_flags);
       return s.str();
     }
-    // ========================================================================
-  } //                                            end of namespace DD4hep::Utils
-  // ==========================================================================
-} //                                                     end of namespace DD4hep
+  // ========================================================================
+  }//                                            end of namespace DD4hep::Utils
+// ==========================================================================
+}//                                                     end of namespace DD4hep
 // ============================================================================
 // The END
 // ============================================================================
diff --git a/DDG4/lcio/Geant4Output2LCIO.cpp b/DDG4/lcio/Geant4Output2LCIO.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..18aa32cf9678a59d4487fe25f5d205b1e22d7a3d
--- /dev/null
+++ b/DDG4/lcio/Geant4Output2LCIO.cpp
@@ -0,0 +1,170 @@
+// $Id: Geant4Field.cpp 875 2013-11-04 16:15:14Z markus.frank@cern.ch $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#ifndef DD4HEP_DDG4_GEANT4OUTPUT2LCIO_H
+#define DD4HEP_DDG4_GEANT4OUTPUT2LCIO_H
+
+// Framework include files
+#include "DD4hep/VolumeManager.h"
+#include "DDG4/Geant4OutputAction.h"
+
+// lcio include files
+#include "lcio.h"
+#include "IO/LCWriter.h"
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  class ComponentCast;
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation   {
+    
+    /** @class Geant4Output2LCIO Geant4Output2LCIO.h DDG4/Geant4Output2LCIO.h
+     * 
+     * Base class to output Geant4 event data to media
+     *
+     * @author  M.Frank
+     * @version 1.0
+     */
+    class Geant4Output2LCIO : public Geant4OutputAction  {
+    protected:
+      Geometry::VolumeManager m_volMgr;
+      lcio::LCWriter*  m_file;
+      int              m_runNo;
+      
+    public:
+      /// Standard constructor
+      Geant4Output2LCIO(Geant4Context* context, const std::string& nam);
+      /// Default destructor
+      virtual ~Geant4Output2LCIO();
+      /// Callback to store the Geant4 run information
+      virtual void beginRun(const G4Run* run);
+      /// Callback to store the Geant4 run information
+      virtual void endRun(const G4Run* run);
+
+      /// Callback to store the Geant4 run information
+      virtual void saveRun(const G4Run* run);
+      /// Callback to store the Geant4 event
+      virtual void saveEvent( OutputContext<G4Event>& ctxt);
+      /// Callback to store each Geant4 hit collection
+      virtual void saveCollection( OutputContext<G4Event>& ctxt, G4VHitsCollection* collection);
+      /// Commit data at end of filling procedure
+      virtual void commit( OutputContext<G4Event>& ctxt);
+    };
+
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+#endif // DD4HEP_DDG4_GEANT4OUTPUT2LCIO_H
+
+// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+
+// Framework include files
+#include "DD4hep/InstanceCount.h"
+#include "DDG4/Geant4HitCollection.h"
+#include "DDG4/Geant4DataConversion.h"
+
+//#include "DDG4/Geant4Output2LCIO.h"
+#include "G4Event.hh"
+#include "G4Run.hh"
+
+// LCIO include files
+#include "IMPL/LCEventImpl.h"
+#include "IMPL/LCRunHeaderImpl.h"
+#include "IMPL/LCCollectionVec.h"
+
+
+using namespace DD4hep::Simulation;
+using namespace DD4hep;
+using namespace std;
+
+
+#include "DDG4/Factories.h"
+DECLARE_GEANT4ACTION(Geant4Output2LCIO)
+
+
+/// Standard constructor
+Geant4Output2LCIO::Geant4Output2LCIO(Geant4Context* ctxt, const string& nam)
+: Geant4OutputAction(ctxt,nam), m_volMgr(), m_file(0), m_runNo(0)
+{
+  InstanceCount::increment(this);
+}
+
+/// Default destructor
+Geant4Output2LCIO::~Geant4Output2LCIO()  {
+  InstanceCount::decrement(this);
+  if ( m_file )  {
+    m_file->close();
+    deletePtr(m_file);
+  }
+}
+
+// Callback to store the Geant4 run information
+void Geant4Output2LCIO::beginRun(const G4Run* )  {
+  if ( 0 == m_file && !m_output.empty() )   {
+    m_file = lcio::LCFactory::getInstance()->createLCWriter();
+    m_file->open(m_output,lcio::LCIO::WRITE_NEW);
+    // Get the volume manager here: 
+    // in the constructor the geometry may not yet be built!
+    m_volMgr = context()->lcdd().volumeManager();
+  }
+}
+
+/// Callback to store the Geant4 run information
+void Geant4Output2LCIO::endRun(const G4Run* )  {
+}
+
+/// Commit data at end of filling procedure
+void Geant4Output2LCIO::commit( OutputContext<G4Event>& ctxt)   {
+  lcio::LCEventImpl* e = ctxt.data<lcio::LCEventImpl>();
+  m_file->writeEvent(e);
+}
+
+/// Callback to store the Geant4 run information
+void Geant4Output2LCIO::saveRun(const G4Run* run)  {
+  // --- write an lcio::RunHeader ---------
+  lcio::LCRunHeaderImpl* rh =  new lcio::LCRunHeaderImpl;
+  rh->setRunNumber(m_runNo=run->GetRunID());
+  rh->setDetectorName(context()->lcdd().header().name());
+  m_file->writeRunHeader(rh);
+}
+
+/// Callback to store the Geant4 event
+void Geant4Output2LCIO::saveEvent(OutputContext<G4Event>& ctxt)  {
+  lcio::LCEventImpl* e  = new lcio::LCEventImpl;
+  ctxt.userData = e;
+  e->setRunNumber(m_runNo);
+  e->setEventNumber(ctxt.context->GetEventID());
+  e->setDetectorName(context()->lcdd().header().name());
+  e->setRunNumber(m_runNo);
+}
+
+/// Callback to store each Geant4 hit collection
+void Geant4Output2LCIO::saveCollection(OutputContext<G4Event>& ctxt, G4VHitsCollection* collection)  {
+  size_t nhits = collection->GetSize();
+  std::string hc_nam = collection->GetName();
+  if ( nhits > 0 )   {
+    typedef pair<Geometry::VolumeManager,G4VHitsCollection*> _A;
+    typedef Geant4Conversion<lcio::LCCollectionVec,_A> _C;
+    const _C& cnv = _C::converter(typeid(Geant4HitCollection));
+    lcio::LCEventImpl* evt = ctxt.data<lcio::LCEventImpl>();
+    lcio::LCCollectionVec* col = cnv(_A(m_volMgr,collection));
+    evt->addCollection(col,hc_nam);
+  }
+}
diff --git a/DDG4/lcio/LCIOConversions.cpp b/DDG4/lcio/LCIOConversions.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fefaf5f34ea1352ab9fa763b1eab4ed97d29068a
--- /dev/null
+++ b/DDG4/lcio/LCIOConversions.cpp
@@ -0,0 +1,112 @@
+// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+
+// Framework include files
+#define DDG4_MAKE_INSTANTIATIONS
+#include "DD4hep/LCDD.h"
+#include "DDG4/Geant4HitCollection.h"
+#include "DDG4/Geant4DataConversion.h"
+#include "DDG4/Geant4Data.h"
+
+// LCIO includes
+#include "IMPL/LCCollectionVec.h"
+#include "IMPL/SimTrackerHitImpl.h"
+#include "IMPL/SimCalorimeterHitImpl.h"
+#include "UTIL/Operators.h"
+#include "UTIL/ILDConf.h"
+using namespace std;
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation   {
+
+    typedef Geometry::VolumeManager VolMgr;
+
+    template <> lcio::LCCollectionVec*
+    Geant4DataConversion<lcio::LCCollectionVec,pair<VolMgr,G4VHitsCollection*>,Geant4HitCollection>::
+    operator()(const arg_t& args)  const {
+      G4VHitsCollection* c = args.second;
+      Geant4HitCollection* coll = dynamic_cast<Geant4HitCollection*>(c);
+      if ( coll )  {
+	typedef pair<arg_t::first_type,Geant4HitCollection*> _A;
+	typedef Geant4Conversion<output_t,_A> _C;
+	const _C& cnv= _C::converter(coll->type().type);
+	return cnv(_A(args.first,coll));
+      }
+      throw unrelated_type_error(typeid(Geant4HitCollection),typeid(*c),
+				 "Cannot save the collection entries of:"+c->GetName());
+    }
+
+    template <> lcio::LCCollectionVec* 
+    Geant4DataConversion<lcio::LCCollectionVec,pair<VolMgr,Geant4HitCollection*>,SimpleTracker::Hit>::operator()(const arg_t& args)  const 
+    {
+      Geant4HitCollection* coll = args.second;
+      size_t     nhits = coll->GetSize();
+      SimpleHit* hit   = coll->hit(0);
+      string     dsc   = encoding(args.first, hit->cellID);
+      lcio::LCCollectionVec* col = new lcio::LCCollectionVec(lcio::LCIO::SIMTRACKERHIT);
+      UTIL::CellIDEncoder<SimTrackerHit> decoder(dsc,col);  
+      for(size_t i=0; i<nhits; ++i)   {
+	const SimpleTracker::Hit* g4_hit = coll->hit(i);
+	double pos[3] = {g4_hit->position.x(), g4_hit->position.y(), g4_hit->position.z()};
+	lcio::SimTrackerHitImpl* lc_hit = new lcio::SimTrackerHitImpl;  
+	lc_hit->setCellID0( (g4_hit->cellID >>    0          ) & 0xFFFFFFFF); 
+	lc_hit->setCellID1( (g4_hit->cellID >> sizeof( int ) ) & 0xFFFFFFFF);
+	lc_hit->setPosition(pos);
+	lc_hit->setEDep(g4_hit->energyDeposit);
+	lc_hit->setTime(g4_hit->truth.time);
+	lc_hit->setMomentum( g4_hit->momentum.x(), g4_hit->momentum.y() , g4_hit->momentum.z() );
+	lc_hit->setPathLength( g4_hit->length);
+	col->addElement(lc_hit);
+      }
+      return col;
+    }
+
+    template <> lcio::LCCollectionVec* 
+    Geant4DataConversion<lcio::LCCollectionVec,pair<VolMgr,Geant4HitCollection*>,SimpleCalorimeter::Hit>::operator()(const arg_t& args)  const 
+    {
+      Geant4HitCollection* coll = args.second;
+      size_t     nhits = coll->GetSize();
+      SimpleHit* hit   = coll->hit(0);
+      string     dsc   = encoding(args.first, hit->cellID);
+      lcio::LCCollectionVec* col = new lcio::LCCollectionVec(lcio::LCIO::SIMCALORIMETERHIT);	
+      UTIL::CellIDEncoder<SimCalorimeterHit> decoder(dsc,col);  
+      col->setFlag(UTIL::make_bitset32(LCIO::CHBIT_LONG,LCIO::CHBIT_STEP)); 
+      for(size_t i=0; i<nhits; ++i)   {
+	const SimpleCalorimeter::Hit* g4_hit = coll->hit(i);
+	float pos[3] = {g4_hit->position.x(), g4_hit->position.y(), g4_hit->position.z()};
+	lcio::SimCalorimeterHitImpl*  lc_hit = new lcio::SimCalorimeterHitImpl;
+	lc_hit->setCellID0( ( g4_hit->cellID >>    0          ) & 0xFFFFFFFF ); 
+	lc_hit->setCellID1( ( g4_hit->cellID >> sizeof( int ) ) & 0xFFFFFFFF );
+	lc_hit->setPosition(pos);
+	lc_hit->setEnergy( g4_hit->energyDeposit );
+	col->addElement(lc_hit);
+      }
+      return col;
+    }
+
+    typedef pair<VolMgr,G4VHitsCollection*> _AA1;
+    template class Geant4Conversion<lcio::LCCollectionVec,_AA1>;
+    DECLARE_GEANT4_HITCONVERTER(lcio::LCCollectionVec,_AA1,Geant4HitCollection)
+    typedef pair<VolMgr,Geant4HitCollection*> _AA2;
+    template class Geant4Conversion<lcio::LCCollectionVec,_AA2>;
+    DECLARE_GEANT4_HITCONVERTER(lcio::LCCollectionVec,_AA2,SimpleTracker::Hit)
+    typedef pair<VolMgr,Geant4HitCollection*> _AA3;
+    DECLARE_GEANT4_HITCONVERTER(lcio::LCCollectionVec,_AA3,SimpleCalorimeter::Hit)
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+
+
+
diff --git a/DDG4/src/Geant4CalorimeterSD.cpp b/DDG4/legacy/Geant4CalorimeterSD.cpp
similarity index 98%
rename from DDG4/src/Geant4CalorimeterSD.cpp
rename to DDG4/legacy/Geant4CalorimeterSD.cpp
index a1da7a7bead01067a90811a0bf9da58bd91ba127..5d38f53f34c37e261152f253facc8f4bb259905c 100644
--- a/DDG4/src/Geant4CalorimeterSD.cpp
+++ b/DDG4/legacy/Geant4CalorimeterSD.cpp
@@ -1,4 +1,4 @@
-// $Id$
+// $Id: Geant4CalorimeterSD.cpp 796 2013-10-03 19:19:39Z markus.frank@cern.ch $
 //====================================================================
 //  AIDA Detector description implementation for LCD
 //--------------------------------------------------------------------
diff --git a/DDG4/src/Geant4TrackerCombineSD.cpp b/DDG4/legacy/Geant4TrackerCombineSD.cpp
similarity index 97%
rename from DDG4/src/Geant4TrackerCombineSD.cpp
rename to DDG4/legacy/Geant4TrackerCombineSD.cpp
index 573f1814b65df46c9e05513d6231847b252c74e3..38405a6bb227c2f63d6a7d286af2d0b8509c14be 100644
--- a/DDG4/src/Geant4TrackerCombineSD.cpp
+++ b/DDG4/legacy/Geant4TrackerCombineSD.cpp
@@ -1,4 +1,4 @@
-// $Id$
+// $Id: Geant4TrackerCombineSD.cpp 796 2013-10-03 19:19:39Z markus.frank@cern.ch $
 //====================================================================
 //  AIDA Detector description implementation for LCD
 //--------------------------------------------------------------------
diff --git a/DDG4/src/Geant4TrackerSD.cpp b/DDG4/legacy/Geant4TrackerSD.cpp
similarity index 96%
rename from DDG4/src/Geant4TrackerSD.cpp
rename to DDG4/legacy/Geant4TrackerSD.cpp
index 91b0de3ff96648d1c338664ef251e5c03d39f39d..81a1e1811e8d316bf4c4d79a8ae18cf1637610ca 100644
--- a/DDG4/src/Geant4TrackerSD.cpp
+++ b/DDG4/legacy/Geant4TrackerSD.cpp
@@ -1,4 +1,4 @@
-// $Id$
+// $Id: Geant4TrackerSD.cpp 796 2013-10-03 19:19:39Z markus.frank@cern.ch $
 //====================================================================
 //  AIDA Detector description implementation for LCD
 //--------------------------------------------------------------------
diff --git a/DDG4/src/Geant4Factories.cpp b/DDG4/plugins/Geant4Factories.cpp
similarity index 55%
rename from DDG4/src/Geant4Factories.cpp
rename to DDG4/plugins/Geant4Factories.cpp
index 77aa3fe0256ad713da0bfa8033fd31e772569f59..46fa29f499ced2b50dac297968ff7381a6217c8d 100644
--- a/DDG4/src/Geant4Factories.cpp
+++ b/DDG4/plugins/Geant4Factories.cpp
@@ -40,3 +40,36 @@ DECLARE_GEANT4ACTION(Geant4TrackingPreAction)
 
 #include "DDG4/Geant4TrackingPostAction.h"
 DECLARE_GEANT4ACTION(Geant4TrackingPostAction)
+
+//=============================
+#include "DDG4/Geant4OutputAction.h"
+DECLARE_GEANT4ACTION(Geant4OutputAction)
+
+#include "DDG4/Geant4Output2ROOT.h"
+DECLARE_GEANT4ACTION(Geant4Output2ROOT)
+
+//=============================
+#include "DDG4/Geant4ParticleGun.h"
+DECLARE_GEANT4ACTION(Geant4ParticleGun)
+
+//=============================
+
+//=============================
+#include "DDG4/Geant4TestActions.h"
+namespace DD4hep {  namespace Simulation   {
+    namespace Test {}
+    //using namespace Test;
+    using namespace DD4hep::Simulation::Test;
+    typedef Geant4TestSensitive Geant4TestSensitiveTracker;
+    typedef Geant4TestSensitive Geant4TestSensitiveCalorimeter;
+  }}
+
+DECLARE_GEANT4ACTION(Geant4TestRunAction)
+DECLARE_GEANT4ACTION(Geant4TestEventAction)
+DECLARE_GEANT4ACTION(Geant4TestStepAction)
+DECLARE_GEANT4ACTION(Geant4TestTrackAction)
+//DECLARE_GEANT4ACTION(Geant4TestStackingAction)
+//DECLARE_GEANT4ACTION(Geant4TestGeneratorAction)
+DECLARE_GEANT4SENSITIVE(Geant4TestSensitive)
+DECLARE_GEANT4SENSITIVE(Geant4TestSensitiveTracker)
+DECLARE_GEANT4SENSITIVE(Geant4TestSensitiveCalorimeter)
diff --git a/DDG4/src/Geant4FieldSetup.cpp b/DDG4/plugins/Geant4FieldSetup.cpp
similarity index 96%
rename from DDG4/src/Geant4FieldSetup.cpp
rename to DDG4/plugins/Geant4FieldSetup.cpp
index 75bd0dbb5e811c3f0a2a21eb8e27b5a3f53bcd53..de646a24a075e09dc70e895d37c9a05e20379084 100644
--- a/DDG4/src/Geant4FieldSetup.cpp
+++ b/DDG4/plugins/Geant4FieldSetup.cpp
@@ -44,7 +44,7 @@ namespace {
   }
 }
 
-static long setup_fields(lcdd_t& lcdd, const Simulation::Geant4Converter& /* cnv */, const map<string,string>& vals) {
+static long setup_fields(lcdd_t& lcdd, const DD4hep::Simulation::Geant4Converter& /* cnv */, const map<string,string>& vals) {
   Geant4SetupPropertyMap pm(vals);
   DD4hep::Geometry::OverlayedField fld  = lcdd.field();
   G4MagIntegratorStepper*  stepper = 0;
diff --git a/DDG4/src/Geant4Particles.cpp b/DDG4/plugins/Geant4Particles.cpp
similarity index 100%
rename from DDG4/src/Geant4Particles.cpp
rename to DDG4/plugins/Geant4Particles.cpp
diff --git a/DDG4/plugins/Geant4Processes.cpp b/DDG4/plugins/Geant4Processes.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ff7b06e92b751bd25b596164a6fd57959cd4c8eb
--- /dev/null
+++ b/DDG4/plugins/Geant4Processes.cpp
@@ -0,0 +1,385 @@
+// $Id: Factories.h 797 2013-10-03 19:20:32Z markus.frank@cern.ch $
+//====================================================================
+//  AIDA Detector description implementation
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+
+// Framework include files
+#include "DDG4/Factories.h"
+
+// Geant4 physics lists
+#include "G4DecayPhysics.hh"
+
+// ======================================================================
+// Predefined physics constructors
+//
+//  Usage:
+//
+//  <physicslist name="Geant4PhysicsList/MyPhysics.0">
+//    <physics>
+//      <construct name="G4EmStandardPhysics"/>
+//      <construct name="HadronPhysicsQGSP"/>
+//    </physics>
+//  </physicslist>
+//
+// ======================================================================
+
+// EM physics 
+#include "G4EmStandardPhysics_option1.hh"
+DECLARE_GEANT4_PHYSICS(G4EmStandardPhysics_option1)
+#include "G4EmStandardPhysics_option2.hh"
+DECLARE_GEANT4_PHYSICS(G4EmStandardPhysics_option2)
+#include "G4EmStandardPhysics_option3.hh"
+DECLARE_GEANT4_PHYSICS(G4EmStandardPhysics_option3)
+#include "G4EmStandardPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4EmStandardPhysics)
+#include "G4EmExtraPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4EmExtraPhysics)
+#include "G4EmLivermorePhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4EmLivermorePhysics)
+
+// Ion and hadrons
+#include "G4IonBinaryCascadePhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4IonBinaryCascadePhysics)
+#include "G4IonINCLXXPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4IonINCLXXPhysics)
+#include "G4IonLHEPPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4IonLHEPPhysics)
+#include "G4IonPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4IonPhysics)
+#include "G4IonQMDPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4IonQMDPhysics)
+#include "G4LHEPStoppingPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4LHEPStoppingPhysics)
+#include "G4QStoppingPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4QStoppingPhysics)
+#include "G4HadronElasticPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4HadronElasticPhysics)
+#include "G4HadronDElasticPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4HadronDElasticPhysics)
+#include "G4HadronElasticPhysicsHP.hh"
+DECLARE_GEANT4_PHYSICS(G4HadronElasticPhysicsHP)
+#include "G4HadronElasticPhysicsLEND.hh"
+DECLARE_GEANT4_PHYSICS(G4HadronElasticPhysicsLEND)
+#include "G4HadronElasticPhysicsLHEP.hh"
+DECLARE_GEANT4_PHYSICS(G4HadronElasticPhysicsLHEP)
+#include "G4HadronElasticPhysicsXS.hh"
+DECLARE_GEANT4_PHYSICS(G4HadronElasticPhysicsXS)
+#include "G4HadronHElasticPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4HadronHElasticPhysics)
+#include "G4HadronQElasticPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4HadronQElasticPhysics)
+#include "G4NeutronTrackingCut.hh"
+DECLARE_GEANT4_PHYSICS(G4NeutronTrackingCut)
+
+// Optical physics
+#include "G4OpticalPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4OpticalPhysics)
+
+#include "G4QAtomicPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4QAtomicPhysics)
+#include "G4QCaptureAtRestPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4QCaptureAtRestPhysics)
+#include "G4QElasticPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4QElasticPhysics)
+#include "G4QEmExtraPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4QEmExtraPhysics)
+#include "G4QNeutrinoPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4QNeutrinoPhysics)
+#include "G4QStoppingPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4QStoppingPhysics)
+#include "G4QIonPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4QIonPhysics)
+#include "G4RadioactiveDecayPhysics.hh"
+DECLARE_GEANT4_PHYSICS(G4RadioactiveDecayPhysics)
+
+// LHEP hadrons
+#include "HadronPhysicsLHEP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsLHEP)
+
+// QGSP hadrons
+#include "HadronPhysicsQGSP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP)
+#include "HadronPhysicsQGSP_BERT.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT)
+#include "HadronPhysicsQGSP_BERT_HP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_HP)
+#include "HadronPhysicsQGSP_BERT_CHIPS.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_CHIPS)
+#include "HadronPhysicsQGSP_FTFP_BERT.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_FTFP_BERT)
+
+// FTFP hadrons
+#include "HadronPhysicsFTFP_BERT.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsFTFP_BERT)
+
+// ======================================================================
+// Predefined physics processes to be attached to particles
+//
+//  Usage:
+//
+//  <physicslist name="Geant4PhysicsList/MyPhysics.0">
+//    <processes>
+//      <particle name="e[+-]" cut="1*mm">
+//	  <process name="G4eMultipleScattering" ordAtRestDoIt="-1" ordAlongSteptDoIt="1" ordPostStepDoIt="1"/>
+//	  <process name="G4eIonisation"         ordAtRestDoIt="-1" ordAlongSteptDoIt="2" ordPostStepDoIt="2"/>
+//      </particle>
+//    </processes>
+//  </physicslist>
+//
+//
+// ======================================================================
+
+// Photon Processes:
+#include "G4GammaConversion.hh"
+DECLARE_GEANT4_PROCESS(G4GammaConversion)
+#include "G4PhotoElectricEffect.hh"
+DECLARE_GEANT4_PROCESS(G4PhotoElectricEffect)
+#include "G4ComptonScattering.hh"
+DECLARE_GEANT4_PROCESS(G4ComptonScattering)
+#include "G4RayleighScattering.hh"
+DECLARE_GEANT4_PROCESS(G4RayleighScattering)
+#include "G4GammaConversionToMuons.hh"
+DECLARE_GEANT4_PROCESS(G4GammaConversionToMuons)
+
+// Electron/positron processes 
+#include "G4eIonisation.hh"
+DECLARE_GEANT4_PROCESS(G4eIonisation)
+#include "G4eBremsstrahlung.hh"
+DECLARE_GEANT4_PROCESS(G4eBremsstrahlung)
+#include "G4eMultipleScattering.hh"
+DECLARE_GEANT4_PROCESS(G4eMultipleScattering)
+#include "G4eplusAnnihilation.hh"
+DECLARE_GEANT4_PROCESS(G4eplusAnnihilation)
+#include "G4AnnihiToMuPair.hh"
+DECLARE_GEANT4_PROCESS(G4AnnihiToMuPair)
+#include "G4eeToHadrons.hh"
+DECLARE_GEANT4_PROCESS(G4eeToHadrons)
+
+// Muon processes 
+#include "G4MuIonisation.hh"
+DECLARE_GEANT4_PROCESS(G4MuIonisation)
+#include "G4MuBremsstrahlung.hh"
+DECLARE_GEANT4_PROCESS(G4MuBremsstrahlung)
+#include "G4MuPairProduction.hh"
+DECLARE_GEANT4_PROCESS(G4MuPairProduction)
+#include "G4MuMultipleScattering.hh"
+DECLARE_GEANT4_PROCESS(G4MuMultipleScattering)
+
+// Hadron/ion processes 
+#include "G4hIonisation.hh"
+DECLARE_GEANT4_PROCESS(G4hIonisation)
+#include "G4ionIonisation.hh"
+DECLARE_GEANT4_PROCESS(G4ionIonisation)
+#include "G4hhIonisation.hh"
+DECLARE_GEANT4_PROCESS(G4hhIonisation)
+#include "G4mplIonisation.hh"
+DECLARE_GEANT4_PROCESS(G4mplIonisation)
+#include "G4hMultipleScattering.hh"
+DECLARE_GEANT4_PROCESS(G4hMultipleScattering)
+#include "G4hBremsstrahlung.hh"
+DECLARE_GEANT4_PROCESS(G4hBremsstrahlung)
+#include "G4hPairProduction.hh"
+DECLARE_GEANT4_PROCESS(G4hPairProduction)
+
+// Coulomb scattering
+#include "G4CoulombScattering.hh"
+DECLARE_GEANT4_PROCESS(G4CoulombScattering)
+
+// Processes for simulation of polarized electron and gamma beams 
+#include "G4PolarizedCompton.hh"
+DECLARE_GEANT4_PROCESS(G4PolarizedCompton)
+#include "G4PolarizedGammaConversion.hh"
+DECLARE_GEANT4_PROCESS(G4PolarizedGammaConversion)
+#include "G4PolarizedPhotoElectricEffect.hh"
+DECLARE_GEANT4_PROCESS(G4PolarizedPhotoElectricEffect)
+#include "G4ePolarizedBremsstrahlung.hh"
+DECLARE_GEANT4_PROCESS(G4ePolarizedBremsstrahlung)
+#include "G4ePolarizedIonisation.hh"
+DECLARE_GEANT4_PROCESS(G4ePolarizedIonisation)
+#include "G4eplusPolarizedAnnihilation.hh"
+DECLARE_GEANT4_PROCESS(G4eplusPolarizedAnnihilation)
+
+// Processes for simulation of X-rays and optical protons production by charged particles 
+#include "G4SynchrotronRadiation.hh"
+DECLARE_GEANT4_PROCESS(G4SynchrotronRadiation)
+#include "G4TransitionRadiation.hh"
+//DECLARE_GEANT4_PROCESS(G4TransitionRadiation) !!virtual abstract!!
+#include "G4Cerenkov.hh"
+DECLARE_GEANT4_PROCESS(G4Cerenkov)
+#include "G4Scintillation.hh"
+DECLARE_GEANT4_PROCESS(G4Scintillation)
+
+// Others
+#include "G4PAIModel.hh"
+DECLARE_GEANT4_PROCESS(G4PAIModel)
+#include "G4BraggIonGasModel.hh"
+DECLARE_GEANT4_PROCESS(G4BraggIonGasModel)
+#include "G4BetheBlochIonGasModel.hh"
+DECLARE_GEANT4_PROCESS(G4BetheBlochIonGasModel)
+#include "G4WentzelVIModel.hh"
+DECLARE_GEANT4_PROCESS(G4WentzelVIModel)
+#include "G4UrbanMscModel93.hh"
+DECLARE_GEANT4_PROCESS(G4UrbanMscModel93)
+#include "G4hImpactIonisation.hh"
+DECLARE_GEANT4_PROCESS(G4hImpactIonisation)
+
+//#include "G4InversePEEffect.hh"
+//DECLARE_GEANT4_PROCESS(G4InversePEEffect)
+//#include "G4hInverseIonisation.hh"
+//DECLARE_GEANT4_PROCESS(G4hInverseIonisation)
+//#include "G4IonInverseIonisation.hh"
+//DECLARE_GEANT4_PROCESS(G4IonInverseIonisation)
+
+
+// ======================================================================
+// Predefined physics lists
+//
+//  Usage:
+//
+//  <physicslist name="Geant4PhysicsList/MyPhysics.0">
+//    <list name="TQGSP_FTFP_BERT_95"/>
+//  </physicslist>
+//
+//
+// ======================================================================
+#include "DDG4/Geant4UserPhysicsList.h"
+namespace {
+  struct EmptyPhysics : public G4VModularPhysicsList {
+    EmptyPhysics(int) {}
+    virtual ~EmptyPhysics() {}
+    virtual void ConstructProcess()      {}
+    virtual void ConstructParticle()      {}
+  };
+}
+DECLARE_GEANT4_PHYSICS_LIST(EmptyPhysics)
+
+// Physics constructors from source/physics_lists
+#include "CHIPS.hh"
+DECLARE_GEANT4_PHYSICS_LIST(CHIPS)
+#include "CHIPS_HP.hh"
+DECLARE_GEANT4_PHYSICS_LIST(CHIPS_HP)
+#include "FTF_BIC.hh"
+DECLARE_GEANT4_PHYSICS_LIST(FTF_BIC)
+#include "FTFP_BERT_EMV.hh"
+DECLARE_GEANT4_PHYSICS_LIST(FTFP_BERT_EMV)
+#include "FTFP_BERT_EMX.hh"
+DECLARE_GEANT4_PHYSICS_LIST(FTFP_BERT_EMX)
+#include "FTFP_BERT.hh"
+DECLARE_GEANT4_PHYSICS_LIST(FTFP_BERT)
+#include "FTFP_BERT_HP.hh"
+DECLARE_GEANT4_PHYSICS_LIST(FTFP_BERT_HP)
+#include "FTFP_BERT.hh"
+DECLARE_GEANT4_PHYSICS_LIST(FTFP_BERT)
+#include "FTFP_BERT_TRV.hh"
+DECLARE_GEANT4_PHYSICS_LIST(FTFP_BERT_TRV)
+#include "LBE.hh"
+//DECLARE_GEANT4_PHYSICS_LIST(LBE) takes no verbosity arg!
+#include "LHEP_EMV.hh"
+DECLARE_GEANT4_PHYSICS_LIST(LHEP_EMV)
+#include "LHEP.hh"
+DECLARE_GEANT4_PHYSICS_LIST(LHEP)
+
+#include "QBBC.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QBBC)
+#include "QGS_BIC.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGS_BIC)
+
+#include "QGSC_BERT.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSC_BERT)
+#include "QGSC_CHIPS.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSC_CHIPS)
+#include "QGSP_BERT_95.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BERT_95)
+#include "QGSP_BERT_95XS.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BERT_95XS)
+#include "QGSP_BERT_CHIPS.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BERT_CHIPS)
+#include "QGSP_BERT_EMV.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BERT_EMV)
+#include "QGSP_BERT_EMX.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BERT_EMX)
+#include "QGSP_BERT.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BERT)
+#include "QGSP_BERT_NOLEP.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BERT_NOLEP)
+#include "QGSP_BERT_TRV.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BERT_TRV)
+#include "QGSP_BIC_EMY.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BIC_EMY)
+#include "QGSP_BIC_HP.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BIC_HP)
+#include "QGSP_BIC.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_BIC)
+#include "QGSP_FTFP_BERT_95.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_FTFP_BERT_95)
+#include "QGSP_FTFP_BERT_95XS.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_FTFP_BERT_95XS)
+#include "QGSP_FTFP_BERT.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_FTFP_BERT)
+#include "QGSP.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP)
+#include "QGSP_INCLXX.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_INCLXX)
+#include "QGSP_QEL.hh"
+DECLARE_GEANT4_PHYSICS_LIST(QGSP_QEL)
+
+#include "HadronPhysicsCHIPS.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsCHIPS)
+#include "HadronPhysicsFTF_BIC.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsFTF_BIC)
+#include "HadronPhysicsFTFP_BERT.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsFTFP_BERT)
+#include "HadronPhysicsFTFP_BERT_HP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsFTFP_BERT_HP)
+#include "HadronPhysicsFTFP_BERT_TRV.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsFTFP_BERT_TRV)
+#include "HadronPhysicsLHEP_EMV.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsLHEP_EMV)
+#include "HadronPhysicsLHEP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsLHEP)
+#include "HadronPhysicsQGS_BIC.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGS_BIC)
+#include "HadronPhysicsQGSC_BERT.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSC_BERT)
+#include "HadronPhysicsQGSC_CHIPS.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSC_CHIPS)
+#include "HadronPhysicsQGSP_BERT_95.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_95)
+#include "HadronPhysicsQGSP_BERT_CHIPS.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_CHIPS)
+#include "HadronPhysicsQGSP_BERT.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT)
+#include "HadronPhysicsQGSP_BERT_HP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_HP)
+#include "HadronPhysicsQGSP_BERT_NOLEP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_NOLEP)
+#include "HadronPhysicsQGSP_BERT_TRV.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_TRV)
+#include "HadronPhysicsQGSP_BIC.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BIC)
+#include "HadronPhysicsQGSP_BIC_HP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BIC_HP)
+#include "HadronPhysicsQGSP_FTFP_BERT_95.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_FTFP_BERT_95)
+#include "HadronPhysicsQGSP_FTFP_BERT.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_FTFP_BERT)
+#include "HadronPhysicsQGSP.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP)
+#include "HadronPhysicsQGSP_INCLXX.hh"
+DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_INCLXX)
+
+#if 0
+
+#include ".hh"
+DECLARE_GEANT4_PHYSICS_LIST()
+
+#include ".hh"
+DECLARE_GEANT4_PHYSICS()
+
+#include ".hh"
+DECLARE_GEANT4_PROCESS()
+#endif
diff --git a/DDG4/src/Geant4SDActions.cpp b/DDG4/plugins/Geant4SDActions.cpp
similarity index 98%
rename from DDG4/src/Geant4SDActions.cpp
rename to DDG4/plugins/Geant4SDActions.cpp
index 11a97fb3022f547ab243700ffec5c5024e862adc..a7372d17a92b4c1562966b7e468b1e4937bb99f8 100644
--- a/DDG4/src/Geant4SDActions.cpp
+++ b/DDG4/plugins/Geant4SDActions.cpp
@@ -115,6 +115,7 @@ namespace DD4hep {
     /// Define collections created by this sensitivie action object
     template <> void Geant4SensitiveAction<SimpleTracker>::defineCollections() {
       m_collectionID = defineCollection<SimpleTracker::Hit>(name()+"Hits");
+      //m_collectionID = defineCollection<SimpleHit>(name()+"Hits");
     }
 
     /// Method for generating hit(s) using the information of G4Step object.
@@ -139,7 +140,7 @@ namespace DD4hep {
       
       HitContribution contrib = Hit::extractContribution(step);
       hit->cellID        = volumeID( step ) ;
-      hit->energyDeposit =  contrib.deposit ;
+      hit->energyDeposit = contrib.deposit ;
       hit->position      = position;
       hit->momentum      = direction;
       hit->length        = hit_len;
@@ -154,6 +155,7 @@ namespace DD4hep {
     /// Define collections created by this sensitivie action object
     template <> void Geant4SensitiveAction<SimpleCalorimeter>::defineCollections() {
       m_collectionID = defineCollection<SimpleCalorimeter::Hit>(name()+"Hits");
+      //m_collectionID = defineCollection<SimpleHit>(name()+"Hits");
     }
     /// Method for generating hit(s) using the information of G4Step object.
     template <> bool Geant4SensitiveAction<SimpleCalorimeter>::process(G4Step* step,G4TouchableHistory*) {
diff --git a/DDG4/plugins/Geant4SensDet.cpp b/DDG4/plugins/Geant4SensDet.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c73b0ee4bacc82ec69435a37a9eb0f9d94ca7651
--- /dev/null
+++ b/DDG4/plugins/Geant4SensDet.cpp
@@ -0,0 +1,122 @@
+// $Id: Geant4Hits.h 513 2013-04-05 14:31:53Z gaede $
+//====================================================================
+//  AIDA Detector description implementation
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+#include "DD4hep/Printout.h"
+#include "DD4hep/Primitives.h"
+#include "DD4hep/InstanceCount.h"
+
+#include "DDG4/Geant4Kernel.h"
+#include "DDG4/Geant4HitCollection.h"
+#include "DDG4/Geant4SensDetAction.h"
+#include "G4VSensitiveDetector.hh"
+
+/*
+ *   DD4hep namespace declaration
+ */
+namespace DD4hep {
+
+  /*
+   *   Simulation namespace declaration
+   */
+  namespace Simulation   {
+
+    namespace {
+      template <typename T> struct _Seq  {
+	typedef _Seq<T> Base;
+	T* m_sequence;
+	_Seq() : m_sequence(0) {                 }
+	_Seq(T* seq)           {   _aquire(seq); }
+	virtual ~_Seq()        { _release();     }
+	void _aquire(T* s)  {
+	  InstanceCount::increment(this);
+	  m_sequence = s;
+	  m_sequence->addRef();
+	}
+	void _release()  {
+	  releasePtr(m_sequence);
+	  InstanceCount::decrement(this);
+	}
+      };
+    }
+
+    struct Geant4SensDet : virtual public G4VSensitiveDetector, 
+			   virtual public G4VSDFilter,
+			   virtual public Geant4ActionSD,
+			   virtual public _Seq<Geant4SensDetActionSequence>
+    {
+      /// Constructor. The detector element is identified by the name
+      Geant4SensDet(const std::string& nam, Geometry::LCDD& lcdd)
+	: G4VSensitiveDetector(nam), G4VSDFilter(nam), 
+	  Geant4Action(0,nam), Geant4ActionSD(nam), Base()
+      {
+	Geant4Kernel& kernel = Geant4Kernel::access(lcdd);
+	setContext(kernel.context());
+	_aquire(kernel.sensitiveAction(nam));
+	m_sequence->defineCollections(this);
+	this->G4VSensitiveDetector::SetFilter(this);
+      }
+
+      /// Destructor
+      virtual ~Geant4SensDet()        {                                 }
+      /// Overload to avoid ambiguity between G4VSensitiveDetector and G4VSDFilter
+      inline G4String GetName() const
+      {  return this->G4VSensitiveDetector::SensitiveDetectorName;      }
+      /// G4VSensitiveDetector internals: Access to the detector path name
+      virtual std::string path()  const
+      {  return this->G4VSensitiveDetector::GetPathName();              }
+      /// G4VSensitiveDetector internals: Access to the detector path name
+      virtual std::string fullPath()  const
+      {  return this->G4VSensitiveDetector::GetFullPathName();          }
+      /// Is the detector active?
+      virtual bool isActive() const
+      {  return this->G4VSensitiveDetector::isActive();                 }
+      /// This is a utility method which returns the hits collection ID 
+      virtual G4int GetCollectionID(G4int i)
+      {  return this->G4VSensitiveDetector::GetCollectionID(i);         }
+      /// Access to the readout geometry of the sensitive detector
+      virtual G4VReadOutGeometry* readoutGeometry() const
+      {  return this->G4VSensitiveDetector::GetROgeometry();            }
+      /// Callback if the sequence should be accepted or filtered off
+      virtual G4bool Accept(const G4Step* step) const
+      {  return m_sequence->accept(step);                               }
+      /// Method invoked at the begining of each event. 
+      virtual void Initialize(G4HCofThisEvent* hce)
+      {  m_sequence->begin(hce);                                        }
+      /// Method invoked at the end of each event. 
+      virtual void EndOfEvent(G4HCofThisEvent* hce)
+      {  m_sequence->end(hce);                                          }
+      /// Method for generating hit(s) using the information of G4Step object.
+      virtual G4bool ProcessHits(G4Step* step,G4TouchableHistory* hist)
+      {  return m_sequence->process(step,hist);                         }
+      /// G4VSensitiveDetector interface: Method invoked if the event was aborted.
+      virtual void clear()
+      {  m_sequence->clear();                                           }
+      /// Initialize the usage of a hit collection. Returns the collection identifier
+      virtual size_t defineCollection(const std::string& coll)  {
+	if ( coll.empty() ) {
+	  except("Geant4Sensitive: No collection defined for %s [Invalid name]",c_name());
+	}
+	collectionName.push_back(coll);
+	return collectionName.size()-1;
+      }
+
+    };
+  }    // End namespace Simulation
+}      // End namespace DD4hep
+
+
+#include "DDG4/Factories.h"
+
+typedef DD4hep::Simulation::Geant4SensDet Geant4SensDet;
+typedef DD4hep::Simulation::Geant4SensDet Geant4tracker;
+typedef DD4hep::Simulation::Geant4SensDet Geant4calorimeter;
+
+DECLARE_GEANT4SENSITIVEDETECTOR(Geant4SensDet)
+DECLARE_GEANT4SENSITIVEDETECTOR(Geant4tracker)
+DECLARE_GEANT4SENSITIVEDETECTOR(Geant4calorimeter)
+
diff --git a/DDG4/src/Geant4SensDetFilters.cpp b/DDG4/plugins/Geant4SensDetFilters.cpp
similarity index 100%
rename from DDG4/src/Geant4SensDetFilters.cpp
rename to DDG4/plugins/Geant4SensDetFilters.cpp
diff --git a/DDG4/src/Geant4Steppers.cpp b/DDG4/plugins/Geant4Steppers.cpp
similarity index 96%
rename from DDG4/src/Geant4Steppers.cpp
rename to DDG4/plugins/Geant4Steppers.cpp
index 0a3c593fcdd4b4b1973c66c3ced1b5bc801226e7..2c7161847f860a23a9e0ee96c05f3e97340320ac 100644
--- a/DDG4/src/Geant4Steppers.cpp
+++ b/DDG4/plugins/Geant4Steppers.cpp
@@ -1,4 +1,4 @@
-// $Id$
+// $Id: Geant4Steppers.cpp 566 2013-05-15 08:30:34Z gaede $
 //====================================================================
 //  AIDA Detector description implementation for LCD
 //--------------------------------------------------------------------
diff --git a/DDG4/src/Geant4XMLSetup.cpp b/DDG4/plugins/Geant4XMLSetup.cpp
similarity index 88%
rename from DDG4/src/Geant4XMLSetup.cpp
rename to DDG4/plugins/Geant4XMLSetup.cpp
index df45afb10ed1485a92ecf4009ff4fd0cc7d3ba6d..f7a774dc3377af6550fb37935b413fb33d7cfc94 100644
--- a/DDG4/src/Geant4XMLSetup.cpp
+++ b/DDG4/plugins/Geant4XMLSetup.cpp
@@ -48,6 +48,7 @@ namespace DD4hep  {
       _setAttributes(handle, props);
     }
   }
+
   static Action _convertSensitive(LCDD& lcdd, xml_h e, const string& detector)  {
     xml_comp_t action(e);
     Kernel& kernel = Kernel::access(lcdd);
@@ -58,11 +59,15 @@ namespace DD4hep  {
     for(xml_coll_t f(e,_Unicode(filter)); f; ++f)  {
       string nam = f.attr<string>(_U(name));
       Filter filter(kernel.globalFilter(nam,false));
+      filter->installMessengers();
       handle->adopt(filter);
     }
-    cout << "Added Sensitive " << tn.second << " of type " << tn.first << endl;
+    handle->installMessengers();
+    printout(INFO,"Geant4Setup","+++ Added sensitive element %s of type %s",
+	     tn.second.c_str(),tn.first.c_str());
     return Action(handle);
   }
+
   static Action _convertAction(LCDD& lcdd, xml_h e)  {
     xml_comp_t action(e);
     Kernel& kernel = Kernel::access(lcdd);
@@ -70,7 +75,8 @@ namespace DD4hep  {
     // Create the object using the factory method
     Action handle(kernel,action.attr<string>(_U(name)));
     _setProperties(handle,e);
-    cout << "Added Action " << tn.second << " of type " << tn.first << endl;
+    printout(INFO,"Geant4Setup","+++ Added action %s of type %s",tn.second.c_str(),tn.first.c_str());
+    handle->installMessengers();
     return handle;
   }
   enum { SENSITIVE, ACTION, FILTER };
@@ -111,6 +117,9 @@ namespace DD4hep  {
   }
 
   /** Convert Sensitive detector filters
+   *
+   *  Note: Filters are Geant4Actions and - if global - may also receive properties!
+   *
    *  <filters>
    *    <filter name="GeantinoRejector"/>
    *    <filter name="EnergyDepositMinimumCut">
@@ -234,8 +243,8 @@ namespace DD4hep  {
       seqNam = seq.attr<string>(_U(name));
       seqType = TypeName::split(seqNam);
     }
-    cout << "Add Sequence " << seqType.second << " of type " 
-	 << seqType.first << endl;
+    printout(INFO,"Geant4Setup","+++ ActionSequence %s of type %s added.",
+	     seqType.second.c_str(),seqType.first.c_str());
 
     if ( seqType.second == "PhysicsList" )  {
       PhysicsActionSeq pl(&kernel.physicsList());
@@ -269,13 +278,16 @@ namespace DD4hep  {
 				   " cannot be attached to any sequence '%s'."
 				   " [Sequence-Missing]",nam.c_str(), seqNam.c_str()));	
       }
-      cout << "Sequence: " << seqType.second << " Added filter: " << action->name() << endl;
+      printout(INFO,"Geant4Setup","+++ ActionSequence %s added filter object:%s",
+	       seqType.second.c_str(),action->name().c_str());
     }
     if ( what == SENSITIVE )  {
       for(xml_coll_t a(seq,_Unicode(filter)); a; ++a)  {
 	string   nam = a.attr<string>(_U(name));
 	Action action(_createAction(lcdd,a,"",FILTER));
-	cout << "Sequence: " << seqType.second << " Added filter: " << action->name() << endl;
+	action->installMessengers();
+	printout(INFO,"Geant4Setup","+++ ActionSequence %s added filter object:%s",
+		 seqType.second.c_str(),action->name().c_str());
 	if ( sdSeq.get() )
 	  sdSeq->adopt(_action<Filter::handled_type>(action.get()));
 	else   {
@@ -310,7 +322,7 @@ namespace DD4hep  {
       p.ordAlongSteptDoIt = proc.attr<int>(_Unicode(ordAlongSteptDoIt));
       p.ordPostStepDoIt   = proc.attr<int>(_Unicode(ordPostStepDoIt));
       procs.push_back(p);
-      printout(INFO,"+++ Converter<ParticleProcesses>","+++ Particle:%s add process %s %d %d %d",
+      printout(INFO,"Geant4Setup","+++ Converter<ParticleProcesses: Particle:%s add process %s %d %d %d",
 	       part_name.c_str(),p.name.c_str(),p.ordAtRestDoIt,p.ordAlongSteptDoIt,p.ordPostStepDoIt);
     }
   }
@@ -331,7 +343,7 @@ namespace DD4hep  {
     xml_comp_t part(e);
     string n = part.nameStr();
     parts.push_back(n);
-    printout(INFO,"+++ Converter<ParticleConstructor>","Add particle constructor '%s'",n.c_str());
+    printout(INFO,"Geant4Setup","+++ ParticleConstructor: Add Geant4 particle constructor '%s'",n.c_str());
   }
 
   /** Convert PhysicsList objects: Physics constructors
@@ -347,7 +359,22 @@ namespace DD4hep  {
     xml_comp_t part(e);
     string n = part.nameStr();
     parts.push_back(n);
-    printout(INFO,"+++ Converter<PhysicsConstructor>","Add physics constructor '%s'",n.c_str());
+    printout(INFO,"Geant4Setup","+++ PhysicsConstructor: Add Geant4 physics constructor '%s'",n.c_str());
+  }
+
+
+  /** Convert PhysicsList objects: Predefined Geant4 Physics lists
+   *  <physicslist>
+   *    <list name="TQGSP_FTFP_BERT_95"/>
+   *  </physicslist>
+   *  Note: list items are Geant4Actions and - if global - may receive properties!
+   */
+  struct PhysicsListExtension;
+  template <> void Converter<PhysicsListExtension>::operator()(xml_h e) const {
+    Kernel& kernel = Kernel::access(lcdd);
+    string ext = xml_comp_t(e).nameStr();
+    kernel.physicsList().properties()["extends"].str(ext);
+    printout(INFO,"Geant4Setup","+++ PhysicsListExtension: Set predefined Geant4 physics list to '%s'",ext.c_str());
   }
 
   template <> void Converter<PhysicsList>::operator()(xml_h e)  const  {
@@ -358,6 +385,7 @@ namespace DD4hep  {
     xml_coll_t(e,_Unicode(particles)).for_each(_Unicode(construct),Converter<Geant4PhysicsList::ParticleConstructor>(lcdd,handle.get()));
     xml_coll_t(e,_Unicode(processes)).for_each(_Unicode(particle),Converter<Geant4PhysicsList::ParticleProcesses>(lcdd,handle.get()));
     xml_coll_t(e,_Unicode(physics)).for_each(_Unicode(construct),Converter<Geant4PhysicsList::PhysicsConstructor>(lcdd,handle.get()));
+    xml_coll_t(e,_Unicode(extends)).for_each(Converter<PhysicsListExtension>(lcdd,handle.get()));
     kernel.physicsList().adopt(handle);
   }
 
diff --git a/DDG4/src/ComponentProperties.cpp b/DDG4/src/ComponentProperties.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..240170a093506e72042337508b8b6a21a9877795
--- /dev/null
+++ b/DDG4/src/ComponentProperties.cpp
@@ -0,0 +1,205 @@
+// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+
+// Framework include files
+#include "DD4hep/Printout.h"
+#include "DDG4/ComponentProperties_inl.h"
+
+// C/C++ include files
+#include <stdexcept>
+#include <cstring>
+
+using namespace std;
+using namespace DD4hep;
+
+/// Default constructor
+PropertyGrammar::PropertyGrammar() {
+}
+
+/// Default destructor
+PropertyGrammar::~PropertyGrammar() {
+}
+
+/// Error callback on invalid conversion
+void PropertyGrammar::invalidConversion(const type_info& from, const type_info& to) {
+  string to_name = typeinfoName(to);
+  string from_name = typeinfoName(from);
+  throw unrelated_type_error(from, to,
+      "The Property data conversion from type " + from_name + " to " + to_name + " is not implemented.");
+}
+
+/// Default constructor
+Property::Property()
+    : m_par(0), m_hdl(0) {
+}
+
+/// Copy constructor
+Property::Property(const Property& property)
+    : m_par(property.m_par), m_hdl(property.m_hdl) {
+}
+
+/// Assignment operator
+Property& Property::operator=(const Property& property) {
+  m_par = property.m_par;
+  m_hdl = property.m_hdl;
+  return *this;
+}
+
+/// Property type name
+string Property::type(const Property& property) {
+  return type(property.grammar().type());
+}
+
+/// Property type name
+string Property::type(const type_info& typ) {
+  return typeinfoName(typ);
+}
+
+/// Property type name
+string Property::type() const {
+  return Property::type(grammar().type());
+}
+
+const PropertyGrammar& Property::grammar() const {
+  if (m_hdl)
+    return *m_hdl;
+  throw runtime_error("Attempt to access property grammar from invalid object.");
+}
+
+/// Conversion to string value
+string Property::str() const {
+  if (m_hdl && m_par ) {
+    return m_hdl->str(m_par);
+  }
+  throw runtime_error("Attempt to access property grammar from invalid object.");
+}
+
+/// Conversion from string value
+Property& Property::str(const std::string& input) {
+  if (m_hdl && m_par ) {
+    m_hdl->fromString(m_par,input);
+    return *this;
+  }
+  throw runtime_error("Attempt to access property grammar from invalid object.");
+}
+
+/// Assignment operator / set new balue
+//Property& Property::operator=(const string& val)  {
+//  this->set<string>(val);
+//  return *this;
+//}
+
+/// Assignment operator / set new balue
+Property& Property::operator=(const char* val) {
+  if (val) {
+    this->set < string > (val);
+    return *this;
+  }
+  throw runtime_error("Attempt to set invalid string to property!");
+}
+
+/// Default constructor
+PropertyManager::PropertyManager() {
+}
+
+/// Default destructor
+PropertyManager::~PropertyManager() {
+  m_properties.clear();
+}
+
+/// Verify that this property does not exist (throw exception if the name was found)
+void PropertyManager::verifyNonExistence(const string& name) const {
+  Properties::const_iterator i = m_properties.find(name);
+  if (i == m_properties.end())
+    return;
+  throw runtime_error("The property:" + name + " already exists for this component.");
+}
+
+/// Verify that this property exists (throw exception if the name was not found)
+PropertyManager::Properties::const_iterator PropertyManager::verifyExistence(const string& name) const {
+  Properties::const_iterator i = m_properties.find(name);
+  if (i != m_properties.end())
+    return i;
+  throw runtime_error("PropertyManager: Unknown property:" + name);
+}
+
+/// Verify that this property exists (throw exception if the name was not found)
+PropertyManager::Properties::iterator PropertyManager::verifyExistence(const string& name) {
+  Properties::iterator i = m_properties.find(name);
+  if (i != m_properties.end())
+    return i;
+  throw runtime_error("PropertyManager: Unknown property:" + name);
+}
+
+/// Access property by name (CONST)
+Property& PropertyManager::property(const string& name) {
+  return (*verifyExistence(name)).second;
+}
+
+/// Access property by name
+const Property& PropertyManager::property(const string& name) const {
+  return (*verifyExistence(name)).second;
+}
+
+/// Access property by name
+Property& PropertyManager::operator[](const string& name) {
+  return (*verifyExistence(name)).second;
+}
+
+/// Access property by name
+const Property& PropertyManager::operator[](const string& name) const {
+  return (*verifyExistence(name)).second;
+}
+
+/// Add a new property
+void PropertyManager::add(const string& name, const Property& property) {
+  verifyNonExistence(name);
+  m_properties.insert(make_pair(name, property));
+}
+
+/// Bulk set of all properties
+void PropertyManager::set(const string& component_name, PropertyConfigurator& cfg) {
+  for (Properties::iterator i = m_properties.begin(); i != m_properties.end(); ++i) {
+    Property& p = (*i).second;
+    cfg.set(p.grammar(), component_name, (*i).first, p.ptr());
+  }
+}
+
+/// Dump string values
+void PropertyManager::dump() const {
+  for (Properties::const_iterator i = m_properties.begin(); i != m_properties.end(); ++i) {
+    const Property& p = (*i).second;
+    printout(ALWAYS, "PropertyManager", "Property %s = %s", (*i).first.c_str(), p.str().c_str());
+  }
+}
+
+#define DD4HEP_INSTANTIATE_PROPERTY_TYPE1(x) DD4HEP_INSTANTIATE_PROPERTY_TYPE(x); \
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::vector<x>);			\
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::list<x>);			\
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::set<x>)
+
+#define DD4HEP_INSTANTIATE_PROPERTY_TYPE2(x)	\
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(x);		\
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(unsigned x)
+
+namespace DD4hep {
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE2(char);
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE2(short);
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE2(int);
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE2(long);
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE2(long long);
+
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(bool);
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(float);
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(double);
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(string);
+
+  typedef map<string, int> map_string_int;
+  DD4HEP_INSTANTIATE_PROPERTY_TYPE (map_string_int);
+}
diff --git a/DDG4/src/ComponentUtils.cpp b/DDG4/src/ComponentUtils.cpp
index 3ba567c9d0377a4947a05a6f1b6baea5db3a489b..98a7fc40e6aac82b5aba4cec15a491fd7daa29d7 100644
--- a/DDG4/src/ComponentUtils.cpp
+++ b/DDG4/src/ComponentUtils.cpp
@@ -9,7 +9,7 @@
 
 // Framework include files
 #include "DD4hep/Printout.h"
-#include "DDG4/ComponentUtils_inl.h"
+#include "DDG4/ComponentUtils.h"
 
 // C/C++ include files
 #include <stdexcept>
@@ -18,38 +18,39 @@
 
 #ifndef _WIN32
 #include <cxxabi.h>
+typedef abi::__class_type_info class_t;
 #endif
 
 using namespace std;
 using namespace DD4hep;
 
-namespace  {
+namespace {
 
-  const std::string __typename( const char* class_name) {
+  const std::string __typename(const char* class_name) {
     std::string result;
 #ifdef _WIN32
     long off = 0;
-    if ( ::strncmp(class_name, "class ", 6) == 0 )   {
+    if ( ::strncmp(class_name, "class ", 6) == 0 ) {
       // The returned name is prefixed with "class "
       off = 6;
     }
-    if ( ::strncmp(class_name, "struct ", 7) == 0 )   {
+    if ( ::strncmp(class_name, "struct ", 7) == 0 ) {
       // The returned name is prefixed with "struct "
       off = 7;
     }
-    if ( off > 0 )    {
+    if ( off > 0 ) {
       std::string tmp = class_name + off;
       long loc = 0;
-      while( (loc = tmp.find("class ")) > 0 )  {
-	tmp.erase(loc, 6);
+      while( (loc = tmp.find("class ")) > 0 ) {
+        tmp.erase(loc, 6);
       }
       loc = 0;
-      while( (loc = tmp.find("struct ")) > 0 )  {
-	tmp.erase(loc, 7);
+      while( (loc = tmp.find("struct ")) > 0 ) {
+        tmp.erase(loc, 7);
       }
       result = tmp;
     }
-    else  {
+    else {
       result = class_name;
     }
     // Change any " *" to "*"
@@ -62,10 +63,10 @@ namespace  {
     }
 
 #elif defined(__linux) || defined(__APPLE__)
-    if ( ::strlen(class_name) == 1 ) {
+    if (::strlen(class_name) == 1) {
       // See http://www.realitydiluted.com/mirrors/reality.sgi.com/dehnert_engr/cxx/abi.pdf
       // for details
-      switch(class_name[0]) {
+      switch (class_name[0]) {
       case 'v':
         result = "void";
         break;
@@ -131,17 +132,18 @@ namespace  {
         break;
       }
     }
-    else  {
-      int   status;
+    else {
+      int status;
       char* realname;
       realname = abi::__cxa_demangle(class_name, 0, 0, &status);
-      if (realname == 0) return class_name;
+      if (realname == 0)
+        return class_name;
       result = realname;
       free(realname);
       /// substitute ', ' with ','
       std::string::size_type pos = result.find(", ");
-      while( std::string::npos != pos ) {
-        result.replace( pos , 2 , "," ) ;
+      while (std::string::npos != pos) {
+        result.replace(pos, 2, ",");
         pos = result.find(", ");
       }
     }
@@ -151,205 +153,86 @@ namespace  {
 }
 
 /// ABI information about type names
-std::string DD4hep::typeinfoName(const std::type_info& type)   {
+std::string DD4hep::typeinfoName(const std::type_info& type) {
   return __typename(type.name());
 }
 
-void DD4hep::typeinfoCheck(const std::type_info& typ1, const std::type_info& typ2, const std::string& text)  {
-  if ( typ1 != typ2 )  {
-    throw unrelated_type_error(typ1,typ2,text);
+void DD4hep::typeinfoCheck(const std::type_info& typ1, const std::type_info& typ2, const std::string& text) {
+  if (typ1 != typ2) {
+    throw unrelated_type_error(typ1, typ2, text);
   }
 }
 
-string unrelated_type_error::msg(const std::type_info& typ1, const std::type_info& typ2,const string& text)   {
-  std::string m = "The types "+__typename(typ1.name())+" and "+__typename(typ2.name())+
-    " are not related. "+text;
+string unrelated_type_error::msg(const std::type_info& typ1, const std::type_info& typ2, const string& text) {
+  std::string m = "The types " + __typename(typ1.name()) + " and " + __typename(typ2.name()) + " are not related. " + text;
   return m;
 }
 
-/// Default constructor
-PropertyGrammar::PropertyGrammar()   {
-}
-
-/// Default destructor
-PropertyGrammar::~PropertyGrammar()  {
-}
-
-/// Error callback on invalid conversion
-void PropertyGrammar::invalidConversion(const type_info& from, const type_info& to)   {
-  string to_name   = __typename(to.name());
-  string from_name = __typename(from.name());
-  throw unrelated_type_error(from,to,
-			     "The Property data conversion from type "+from_name+
-			     " to "+to_name+" is not implemented.");
-}
-
-/// Default constructor
-Property::Property() 
-  : m_par(0), m_hdl(0)
-{
-}
-
-/// Copy constructor  
-Property::Property(const Property& property) 
-  : m_par(property.m_par), m_hdl(property.m_hdl)
-{
-}
-
-/// Assignment operator
-Property& Property::operator=(const Property& property) {
-  m_par  = property.m_par;
-  m_hdl  = property.m_hdl;
-  return *this;
-}
-
-/// Property type name
-string Property::type(const Property& property)    {
-  return type(property.grammar().type());
-}
-
-/// Property type name
-string Property::type(const type_info& typ)   {
-  return __typename(typ.name());
-}
-
-/// Property type name
-string Property::type()  const   {
-  return Property::type(grammar().type());
-}
-
-const PropertyGrammar& Property::grammar()  const   {
-  if ( m_hdl ) return *m_hdl;
-  throw runtime_error("Attempt to access property grammar from invalid object.");
-}
-
-/// Conversion to string value
-string Property::str() const    {
-  if ( m_hdl && m_par )   {
-    return m_hdl->str(m_par);
+/// Initializing Constructor
+ComponentCast::ComponentCast(const std::type_info& t)
+    : type(t) {
+  abi_class = dynamic_cast<const class_t*>(&type);
+  if (!abi_class) {
+    throw std::runtime_error("Class type " + typeinfoName(type) + " is not an abi object type!");
   }
-  throw runtime_error("Attempt to access property grammar from invalid object.");
 }
 
-/// Conversion from string value
-Property& Property::str(const std::string& input)   {
-  if ( m_hdl && m_par )   {
-    m_hdl->fromString(m_par,input);
-    return *this;
-  }
-  throw runtime_error("Attempt to access property grammar from invalid object.");
+/// Defautl destructor
+ComponentCast::~ComponentCast() {
 }
 
-/// Assignment operator / set new balue
-//Property& Property::operator=(const string& val)  {
-//  this->set<string>(val);
-//  return *this;
-//}
+#if 0
+// Dynamic cast runtime.
+// src2dst has the following possible values
+//  >-1: src_type is a unique public non-virtual base of dst_type
+//       dst_ptr + src2dst == src_ptr
+//   -1: unspecified relationship
+//   -2: src_type is not a public base of dst_type
+//   -3: src_type is a multiple public non-virtual base of dst_type
+extern "C" void*
+__dynamic_cast(const void* __src_ptr,// Starting object.
+    const __class_type_info* __src_type,// Static type of object.
+    const __class_type_info* __dst_type,// Desired target type.
+    ptrdiff_t __src2dst);// How src and dst are related.
+#endif
 
-/// Assignment operator / set new balue
-Property& Property::operator=(const char* val)  {
-  if ( val )  {
-    this->set<string>(val);
-    return *this;
+/// Apply cast using typeinfo instead of dynamic_cast
+void* ComponentCast::apply_dynCast(const std::type_info& to, const void* ptr) const {
+  if (&to == &type) {
+    return (void*) ptr;
   }
-  throw runtime_error("Attempt to set invalid string to property!");
-}
-
-/// Default constructor
-PropertyManager::PropertyManager()   {
-}
-
-/// Default destructor
-PropertyManager::~PropertyManager()  {
-  m_properties.clear();
-}
-
-/// Verify that this property does not exist (throw exception if the name was found)
-void PropertyManager::verifyNonExistence(const string& name) const   {
-  Properties::const_iterator i = m_properties.find(name);
-  if ( i == m_properties.end() ) return;
-  throw runtime_error("The property:"+name+" already exists for this component.");
-}
-
-/// Verify that this property exists (throw exception if the name was not found)
-PropertyManager::Properties::const_iterator
-PropertyManager::verifyExistence(const string& name) const  {
-  Properties::const_iterator i = m_properties.find(name);
-  if ( i != m_properties.end() ) return i;
-  throw runtime_error("PropertyManager: Unknown property:"+name);
-}
-
-/// Verify that this property exists (throw exception if the name was not found)
-PropertyManager::Properties::iterator
-PropertyManager::verifyExistence(const string& name)  {
-  Properties::iterator i = m_properties.find(name);
-  if ( i != m_properties.end() ) return i;
-  throw runtime_error("PropertyManager: Unknown property:"+name);
-}
-
-/// Access property by name (CONST)
-Property& PropertyManager::property(const string& name)  {
-  return (*verifyExistence(name)).second;
-}
-
-/// Access property by name
-const Property& PropertyManager::property(const string& name) const   {
-  return (*verifyExistence(name)).second;
-}
-
-/// Access property by name
-Property& PropertyManager::operator[](const string& name)  {
-  return (*verifyExistence(name)).second;
-}
-
-/// Access property by name
-const Property& PropertyManager::operator[](const string& name)  const {
-  return (*verifyExistence(name)).second;
+  const class_t* src_type = dynamic_cast<const class_t*>(&to);
+  if (src_type) {
+    // First try down cast
+    void *r = abi::__dynamic_cast(ptr, src_type, (const class_t*) abi_class, -1);
+    if (r)
+      return r;
+    // Now try the up-cast
+    r = abi::__dynamic_cast(ptr, (const class_t*) abi_class, src_type, -1);
+    if (r)
+      return r;
+    throw unrelated_type_error(type, to, "Failed to apply abi dynamic cast operation!");
+  }
+  throw unrelated_type_error(type, to, "Target type is not an abi class type!");
 }
 
-/// Add a new property 
-void PropertyManager::add(const string& name, const Property& property)  {
-  verifyNonExistence(name);
-  m_properties.insert(make_pair(name,property));
+/// Apply cast using typeinfo instead of dynamic_cast
+void* ComponentCast::apply_upCast(const std::type_info& to, const void* ptr) const {
+  return apply_dynCast(to, ptr);
 }
 
-/// Bulk set of all properties
-void PropertyManager::set(const string& component_name, PropertyConfigurator& cfg)   {
-  for(Properties::iterator i = m_properties.begin(); i!=m_properties.end(); ++i)  {
-    Property& p = (*i).second;
-    cfg.set(p.grammar(),component_name,(*i).first,p.ptr());
+/// Apply cast using typeinfo instead of dynamic_cast
+void* ComponentCast::apply_downCast(const std::type_info& to, const void* ptr) const {
+  if (&to == &type) {
+    return (void*) ptr;
   }
-}
-
-/// Dump string values
-void PropertyManager::dump()  const   {
-  for(Properties::const_iterator i = m_properties.begin(); i!=m_properties.end(); ++i)  {
-    const Property& p = (*i).second;
-    printout(ALWAYS,"PropertyManager","Property %s = %s",(*i).first.c_str(),p.str().c_str());
+  const class_t* src_type = dynamic_cast<const class_t*>(&to);
+  if (src_type) {
+    void *r = abi::__dynamic_cast(ptr, src_type, (const class_t*) abi_class, -1);
+    if (r)
+      return r;
+    throw unrelated_type_error(type, to, "Failed to apply abi dynamic cast operation!");
   }
+  throw unrelated_type_error(type, to, "Target type is not an abi class type!");
 }
 
-#define DD4HEP_INSTANTIATE_PROPERTY_TYPE1(x) DD4HEP_INSTANTIATE_PROPERTY_TYPE(x); \
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::vector<x>);			\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::list<x>);			\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::set<x>)
-
-#define DD4HEP_INSTANTIATE_PROPERTY_TYPE2(x)	\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(x);		\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(unsigned x)
-
-namespace DD4hep {
-DD4HEP_INSTANTIATE_PROPERTY_TYPE2(char);
-DD4HEP_INSTANTIATE_PROPERTY_TYPE2(short);
-DD4HEP_INSTANTIATE_PROPERTY_TYPE2(int);
-DD4HEP_INSTANTIATE_PROPERTY_TYPE2(long);
-DD4HEP_INSTANTIATE_PROPERTY_TYPE2(long long);
-
-DD4HEP_INSTANTIATE_PROPERTY_TYPE1(bool);
-DD4HEP_INSTANTIATE_PROPERTY_TYPE1(float);
-DD4HEP_INSTANTIATE_PROPERTY_TYPE1(double);
-DD4HEP_INSTANTIATE_PROPERTY_TYPE1(string);
-
-typedef map<string,int> map_string_int;
-DD4HEP_INSTANTIATE_PROPERTY_TYPE(map_string_int);
-}
diff --git a/DDG4/src/Geant4Action.cpp b/DDG4/src/Geant4Action.cpp
index bfe77565668a202d9b7ab52e4c77548b87912291..0f994289c48c21d25e145581baa59cd6d2fcf92a 100644
--- a/DDG4/src/Geant4Action.cpp
+++ b/DDG4/src/Geant4Action.cpp
@@ -12,164 +12,184 @@
 #include "DDG4/Geant4Context.h"
 #include "DDG4/Geant4Action.h"
 #include "DDG4/Geant4Kernel.h"
+#include "DDG4/Geant4UIMessenger.h"
+
+// Geant4 include files
+#include "G4UIdirectory.hh"
 
 using namespace std;
 using namespace DD4hep;
 using namespace DD4hep::Simulation;
 
-TypeName TypeName::split(const string& type_name)  {
+TypeName TypeName::split(const string& type_name) {
   size_t idx = type_name.find("/");
-  string typ=type_name, nam=type_name;
-  if ( idx != string::npos )  {
-    typ = type_name.substr(0,idx);
-    nam = type_name.substr(idx+1);
+  string typ = type_name, nam = type_name;
+  if (idx != string::npos) {
+    typ = type_name.substr(0, idx);
+    nam = type_name.substr(idx + 1);
   }
-  return TypeName(typ,nam);
+  return TypeName(typ, nam);
 }
 
 /// Default constructor
-Geant4TrackInformation::Geant4TrackInformation() 
-: G4VUserTrackInformation(), m_flags(0) 
-{
+Geant4TrackInformation::Geant4TrackInformation()
+    : G4VUserTrackInformation(), m_flags(0) {
 }
 
 /// Standard destructor
-Geant4TrackInformation::~Geant4TrackInformation()   {
+Geant4TrackInformation::~Geant4TrackInformation() {
 }
 
 /// Access flag if track should be stored
-Geant4TrackInformation& Geant4TrackInformation::storeTrack(bool value)  { 
+Geant4TrackInformation& Geant4TrackInformation::storeTrack(bool value) {
   value ? m_flags |= STORE : m_flags &= ~STORE;
   return *this;
 }
 
 /// Standard constructor
 Geant4Action::Geant4Action(Geant4Context* context, const string& nam)
-: m_context(context), m_name(nam), m_refCount(1)
-{
+    : m_context(context), m_control(0), m_outputLevel(INFO), m_needsControl(false), m_name(nam), m_refCount(1) {
   InstanceCount::increment(this);
-  declareProperty("name",m_name);
+  declareProperty("Name", m_name);
+  declareProperty("name", m_name);
+  declareProperty("OutputLevel", m_outputLevel);
+  declareProperty("Control", m_needsControl);
 }
 
 /// Default destructor
-Geant4Action::~Geant4Action()  {
+Geant4Action::~Geant4Action() {
   InstanceCount::decrement(this);
 }
 
 /// Implicit destruction
-long Geant4Action::addRef()   {
+long Geant4Action::addRef() {
   return ++m_refCount;
 }
 
 /// Decrease reference count. Implicit destruction
-long Geant4Action::release()   {
+long Geant4Action::release() {
   long count = --m_refCount;
-  if ( m_refCount <= 0 )  {
-    cout << "Geant4Action: Deleting object " << name() 
-	 << " of type " << typeinfoName(typeid(*this)) << endl;
+  if (m_refCount <= 0) {
+    cout << "Geant4Action: Deleting object " << name() << " of type " << typeinfoName(typeid(*this)) << endl;
     delete this;
   }
   return count;
 }
 
 /// Set the context pointer
-void Geant4Action::setContext(Geant4Context* context)  {
+void Geant4Action::setContext(Geant4Context* context) {
   m_context = context;
 }
 
 /// Set object properties
-Geant4Action& Geant4Action::setProperties(PropertyConfigurator& setup)   {
-  m_properties.set(m_name,setup);
+Geant4Action& Geant4Action::setProperties(PropertyConfigurator& setup) {
+  m_properties.set(m_name, setup);
   return *this;
 }
 
+/// Install all control messenger if wanted
+void Geant4Action::installMessengers() {
+  //m_needsControl = true;
+  if (m_needsControl && !m_control) {
+    string path = context()->kernel().directoryName();
+    path += name() + "/";
+    m_control = new Geant4UIMessenger(name(), path);
+    installPropertyMessenger();
+  }
+}
+
+/// Install property control messenger if wanted
+void Geant4Action::installPropertyMessenger() {
+  m_control->exportProperties(m_properties);
+}
+
 /// Support of debug messages.
-void Geant4Action::debug(const string& fmt, ...)  const   {
+void Geant4Action::debug(const string& fmt, ...) const {
   va_list args;
-  va_start(args,fmt);
-  DD4hep::printout(DD4hep::DEBUG,"Geant4Action",fmt,args);
+  va_start(args, fmt);
+  DD4hep::printout(DD4hep::DEBUG, "Geant4Action", fmt, args);
   va_end(args);
 }
 
 /// Support of info messages.
-void Geant4Action::info(const string& fmt, ...)  const   {
+void Geant4Action::info(const string& fmt, ...) const {
   va_list args;
-  va_start(args,fmt);
-  DD4hep::printout(DD4hep::INFO,"Geant4Action",fmt,args);
+  va_start(args, fmt);
+  DD4hep::printout(DD4hep::INFO, "Geant4Action", fmt, args);
   va_end(args);
 }
 
 /// Support of warning messages.
-void Geant4Action::warning(const string& fmt, ...)  const   {
+void Geant4Action::warning(const string& fmt, ...) const {
   va_list args;
-  va_start(args,fmt);
-  DD4hep::printout(DD4hep::WARNING,"Geant4Action",fmt,args);
+  va_start(args, fmt);
+  DD4hep::printout(DD4hep::WARNING, "Geant4Action", fmt, args);
   va_end(args);
 }
 
 /// Action to support error messages.
-void Geant4Action::error(const string& fmt, ...)  const   {
+void Geant4Action::error(const string& fmt, ...) const {
   va_list args;
-  va_start(args,fmt);
-  DD4hep::printout(DD4hep::ERROR,"Geant4Action",fmt,args);
+  va_start(args, fmt);
+  DD4hep::printout(DD4hep::ERROR, "Geant4Action", fmt, args);
   va_end(args);
 }
 
 /// Action to support error messages.
-bool Geant4Action::error(bool return_value, const string& fmt, ...)  const   {
+bool Geant4Action::error(bool return_value, const string& fmt, ...) const {
   va_list args;
-  va_start(args,fmt);
-  DD4hep::printout(DD4hep::ERROR,"Geant4Action",fmt,args);
+  va_start(args, fmt);
+  DD4hep::printout(DD4hep::ERROR, "Geant4Action", fmt, args);
   va_end(args);
   return return_value;
 }
 
 /// Support of fatal messages. Throws exception if required.
-void Geant4Action::fatal(const string& fmt, ...)  const   {
+void Geant4Action::fatal(const string& fmt, ...) const {
   string err;
   va_list args;
-  va_start(args,fmt);
-  DD4hep::printout(DD4hep::FATAL,"Geant4Action",fmt,args);
+  va_start(args, fmt);
+  DD4hep::printout(DD4hep::FATAL, "Geant4Action", fmt, args);
   va_end(args);
 }
 
 /// Support of exceptions: Print fatal message and throw runtime_error.
-void Geant4Action::except(const string& fmt, ...)  const   {
+void Geant4Action::except(const string& fmt, ...) const {
   string err;
   va_list args;
-  va_start(args,fmt);
-  DD4hep::printout(DD4hep::FATAL,"Geant4Action",fmt,args);
-  err = DD4hep::format("Geant4Action",fmt,args);
+  va_start(args, fmt);
+  DD4hep::printout(DD4hep::FATAL, "Geant4Action", fmt, args);
+  err = DD4hep::format("Geant4Action", fmt, args);
   va_end(args);
   throw runtime_error(err);
 }
 
 /// Access to the main run action sequence from the kernel object
-Geant4RunActionSequence& Geant4Action::runAction() const   {
+Geant4RunActionSequence& Geant4Action::runAction() const {
   return m_context->runAction();
 }
 
 /// Access to the main event action sequence from the kernel object
-Geant4EventActionSequence& Geant4Action::eventAction() const   {
+Geant4EventActionSequence& Geant4Action::eventAction() const {
   return m_context->eventAction();
 }
 
 /// Access to the main stepping action sequence from the kernel object
-Geant4SteppingActionSequence& Geant4Action::steppingAction() const   {
+Geant4SteppingActionSequence& Geant4Action::steppingAction() const {
   return m_context->steppingAction();
 }
 
 /// Access to the main tracking action sequence from the kernel object
-Geant4TrackingActionSequence& Geant4Action::trackingAction() const   {
+Geant4TrackingActionSequence& Geant4Action::trackingAction() const {
   return m_context->trackingAction();
 }
 
 /// Access to the main stacking action sequence from the kernel object
-Geant4StackingActionSequence& Geant4Action::stackingAction() const   {
+Geant4StackingActionSequence& Geant4Action::stackingAction() const {
   return m_context->stackingAction();
 }
 
 /// Access to the main generator action sequence from the kernel object
-Geant4GeneratorActionSequence& Geant4Action::generatorAction() const   {
+Geant4GeneratorActionSequence& Geant4Action::generatorAction() const {
   return m_context->generatorAction();
 }
diff --git a/DDG4/src/Geant4ActionPhase.cpp b/DDG4/src/Geant4ActionPhase.cpp
index 9c0f3366d96440d22422ca0e8cd36fdb98e444c4..6a10160a61a27a249e203179f7eac9eec271dc70 100644
--- a/DDG4/src/Geant4ActionPhase.cpp
+++ b/DDG4/src/Geant4ActionPhase.cpp
@@ -16,9 +16,8 @@ using namespace DD4hep::Simulation;
 
 /// Standard constructor
 Geant4ActionPhase::Geant4ActionPhase(Geant4Context* context, const string& nam, const type_info& arg_type0,
-				     const type_info& arg_type1, const type_info& arg_type2)
-: Geant4Action(context,nam)
-{
+    const type_info& arg_type1, const type_info& arg_type2)
+    : Geant4Action(context, nam) {
   m_argTypes[0] = &arg_type0;
   m_argTypes[1] = &arg_type1;
   m_argTypes[2] = &arg_type2;
@@ -26,30 +25,30 @@ Geant4ActionPhase::Geant4ActionPhase(Geant4Context* context, const string& nam,
 }
 
 /// Default destructor
-Geant4ActionPhase::~Geant4ActionPhase()   {
+Geant4ActionPhase::~Geant4ActionPhase() {
   m_members.clear();
   InstanceCount::decrement(this);
 }
 
 /// Add a new member to the phase
-bool Geant4ActionPhase::add(Callback callback)   {
+bool Geant4ActionPhase::add(Callback callback) {
   m_members.push_back(callback);
   return true;
 }
 
 /// Remove an existing member from the phase. If not existing returns false
-bool Geant4ActionPhase::remove(Callback callback)   {
-  if ( callback.func.first )  {
-    Members::iterator i = find(m_members.begin(),m_members.end(),callback);
-    if ( i != m_members.end() )  {
+bool Geant4ActionPhase::remove(Callback callback) {
+  if (callback.func.first) {
+    Members::iterator i = find(m_members.begin(), m_members.end(), callback);
+    if (i != m_members.end()) {
       m_members.erase(i);
       return true;
     }
     return false;
   }
   size_t len = m_members.size();
-  for(Members::iterator i = m_members.begin(); i != m_members.end(); ++i)  {
-    if ( (*i).par == callback.par )  {
+  for (Members::iterator i = m_members.begin(); i != m_members.end(); ++i) {
+    if ((*i).par == callback.par) {
       m_members.erase(i);
       i = m_members.begin();
     }
@@ -58,9 +57,9 @@ bool Geant4ActionPhase::remove(Callback callback)   {
 }
 
 /// Execute all members in the phase context
-void Geant4ActionPhase::execute(void* argument)   {
-  for(Members::iterator i=m_members.begin(); i!=m_members.end(); ++i)   {
-    (*i).execute((const void**)&argument);
+void Geant4ActionPhase::execute(void* argument) {
+  for (Members::iterator i = m_members.begin(); i != m_members.end(); ++i) {
+    (*i).execute((const void**) &argument);
   }
 }
 
@@ -71,43 +70,44 @@ class G4TouchableHistory;
 #include "DDG4/Geant4TrackingAction.h"
 #include "DDG4/Geant4SteppingAction.h"
 #include "DDG4/Geant4GeneratorAction.h"
-namespace DD4hep {  namespace Simulation   {
+namespace DD4hep {
+  namespace Simulation {
     /// Callback in Begin stacking action
-    void Geant4ActionPhase::call()  {
+    void Geant4ActionPhase::call() {
       this->execute(0);
     }
     /// Callback in BeginRun/EndRun
-    template <> void Geant4ActionPhase::call<const G4Run*>(const G4Run* run)  {
-      this->execute((const void**)&run);
+    template <> void Geant4ActionPhase::call<const G4Run*>(const G4Run* run) {
+      this->execute((const void**) &run);
     }
     /// Callback in prepare primaries
-    template <> void Geant4ActionPhase::call<G4Event*>(G4Event* event)  {
-      this->execute((const void**)&event);
+    template <> void Geant4ActionPhase::call<G4Event*>(G4Event* event) {
+      this->execute((const void**) &event);
     }
     /// Callback in BeginEvent/EndEvent
-    template <> void Geant4ActionPhase::call<const G4Event*>(const G4Event* event)  {
-      this->execute((const void**)&event);
+    template <> void Geant4ActionPhase::call<const G4Event*>(const G4Event* event) {
+      this->execute((const void**) &event);
     }
     /// Callback in Begin/End tracking action
-    template <> void Geant4ActionPhase::call<const G4Track*>(const G4Track* track)  {
-      this->execute((const void**)&track);
+    template <> void Geant4ActionPhase::call<const G4Track*>(const G4Track* track) {
+      this->execute((const void**) &track);
     }
     /// Callback in Begin/End stepping action
-    template <> void Geant4ActionPhase::call<const G4Step*>(const G4Step* step)  {
-      this->execute((const void**)&step);
+    template <> void Geant4ActionPhase::call<const G4Step*>(const G4Step* step) {
+      this->execute((const void**) &step);
     }
     /// Callback for user stepping action
-    template <> void Geant4ActionPhase::call<const G4Step*,G4SteppingManager*>(const G4Step* step,G4SteppingManager* mgr)  {
-      const void * args[] = {step,mgr};
+    template <> void Geant4ActionPhase::call<const G4Step*, G4SteppingManager*>(const G4Step* step, G4SteppingManager* mgr) {
+      const void * args[] = { step, mgr };
       this->execute(args);
     }
     /// Callback for sensitives begin/end/clear
-    template <> void Geant4ActionPhase::call<G4HCofThisEvent*>(G4HCofThisEvent* hce)  {
-      this->execute((const void**)&hce);
+    template <> void Geant4ActionPhase::call<G4HCofThisEvent*>(G4HCofThisEvent* hce) {
+      this->execute((const void**) &hce);
     }
     /// Callback for sensitives
-    template <> void Geant4ActionPhase::call<G4Step*,G4TouchableHistory*>(G4Step* step,G4TouchableHistory* history)  {
-      const void * args[] = {step,history};
+    template <> void Geant4ActionPhase::call<G4Step*, G4TouchableHistory*>(G4Step* step, G4TouchableHistory* history) {
+      const void * args[] = { step, history };
       this->execute(args);
     }
   }
diff --git a/DDG4/src/Geant4Callback.cpp b/DDG4/src/Geant4Callback.cpp
index 46b87a7c06d6782011b7439ddde23c73c759c10f..1ced20b1185ebe596b494d1f1415ab646641da49 100644
--- a/DDG4/src/Geant4Callback.cpp
+++ b/DDG4/src/Geant4Callback.cpp
@@ -13,9 +13,9 @@
 using namespace DD4hep;
 
 /// Check the compatibility of two typed objects. The test is the result of a dynamic_cast
-void CallbackSequence::checkTypes(const std::type_info& typ1, const std::type_info& typ2, void* test)  {
-  if ( !test )   {
-    throw unrelated_type_error(typ1,typ2,"Cannot install a callback for these 2 types.");
+void CallbackSequence::checkTypes(const std::type_info& typ1, const std::type_info& typ2, void* test) {
+  if (!test) {
+    throw unrelated_type_error(typ1, typ2, "Cannot install a callback for these 2 types.");
   }
 }
 
diff --git a/DDG4/src/Geant4Context.cpp b/DDG4/src/Geant4Context.cpp
index 31311a41575eb1b3fce04e71fd5161decdc73eae..876bfc8a00fb2e6c17f00a6fdc34c81ec7fb8e8c 100644
--- a/DDG4/src/Geant4Context.cpp
+++ b/DDG4/src/Geant4Context.cpp
@@ -17,58 +17,57 @@ using namespace DD4hep;
 using namespace DD4hep::Simulation;
 
 /// Default constructor
-Geant4Context::Geant4Context(Geant4Kernel* kernel) 
-: m_kernel(kernel), m_trackMgr(0)
-{
+Geant4Context::Geant4Context(Geant4Kernel* kernel)
+    : m_kernel(kernel), m_trackMgr(0) {
 }
 
 /// Default destructor
-Geant4Context::~Geant4Context()   {
+Geant4Context::~Geant4Context() {
 }
 
 /// Access to detector description
-Geometry::LCDD& Geant4Context::lcdd() const   {
+Geometry::LCDD& Geant4Context::lcdd() const {
   return m_kernel->lcdd();
 }
 
 /// Create a user trajectory
-G4VTrajectory* Geant4Context::createTrajectory(const G4Track* /* track */) const   {
-  string err    = DD4hep::format("Geant4Kernel","createTrajectory: Purely virtual method. requires overloading!");
-  DD4hep::printout(DD4hep::FATAL,"Geant4Kernel","createTrajectory: Purely virtual method. requires overloading!");
+G4VTrajectory* Geant4Context::createTrajectory(const G4Track* /* track */) const {
+  string err = DD4hep::format("Geant4Kernel", "createTrajectory: Purely virtual method. requires overloading!");
+  DD4hep::printout(DD4hep::FATAL, "Geant4Kernel", "createTrajectory: Purely virtual method. requires overloading!");
   throw runtime_error(err);
 }
 
 /// Access to the main run action sequence from the kernel object
-Geant4RunActionSequence& Geant4Context::runAction() const   {
+Geant4RunActionSequence& Geant4Context::runAction() const {
   return m_kernel->runAction();
 }
 
 /// Access to the main event action sequence from the kernel object
-Geant4EventActionSequence& Geant4Context::eventAction() const   {
+Geant4EventActionSequence& Geant4Context::eventAction() const {
   return m_kernel->eventAction();
 }
 
 /// Access to the main stepping action sequence from the kernel object
-Geant4SteppingActionSequence& Geant4Context::steppingAction() const   {
+Geant4SteppingActionSequence& Geant4Context::steppingAction() const {
   return m_kernel->steppingAction();
 }
 
 /// Access to the main tracking action sequence from the kernel object
-Geant4TrackingActionSequence& Geant4Context::trackingAction() const   {
+Geant4TrackingActionSequence& Geant4Context::trackingAction() const {
   return m_kernel->trackingAction();
 }
 
 /// Access to the main stacking action sequence from the kernel object
-Geant4StackingActionSequence& Geant4Context::stackingAction() const   {
+Geant4StackingActionSequence& Geant4Context::stackingAction() const {
   return m_kernel->stackingAction();
 }
 
 /// Access to the main generator action sequence from the kernel object
-Geant4GeneratorActionSequence& Geant4Context::generatorAction() const   {
+Geant4GeneratorActionSequence& Geant4Context::generatorAction() const {
   return m_kernel->generatorAction();
 }
 
 /// Access to the main generator action sequence from the kernel object
-Geant4SensDetSequences& Geant4Context::sensitiveActions() const   {
+Geant4SensDetSequences& Geant4Context::sensitiveActions() const {
   return m_kernel->sensitiveActions();
 }
diff --git a/DDG4/src/Geant4Converter.cpp b/DDG4/src/Geant4Converter.cpp
index 53ddf9748853f330ac4e9b9679b35f3dc5a9daf2..de6c5bbe2b1ac33cde977cef94a0618571ee28d8 100644
--- a/DDG4/src/Geant4Converter.cpp
+++ b/DDG4/src/Geant4Converter.cpp
@@ -85,50 +85,43 @@ using namespace std;
 #include "G4AssemblyVolume.hh"
 #undef private
 
-struct Geant4AssemblyVolume : public G4AssemblyVolume  {
-  Geant4AssemblyVolume() {}
-  size_t placeVolume(G4LogicalVolume* pPlacedVolume,
-		     G4Transform3D&   transformation)  {
+struct Geant4AssemblyVolume : public G4AssemblyVolume {
+  Geant4AssemblyVolume() {
+  }
+  size_t placeVolume(G4LogicalVolume* pPlacedVolume, G4Transform3D& transformation) {
     size_t id = fTriplets.size();
-    this->AddPlacedVolume(pPlacedVolume,transformation);
+    this->AddPlacedVolume(pPlacedVolume, transformation);
     return id;
   }
-  void imprint( std::vector<G4VPhysicalVolume*>& nodes,
-		G4LogicalVolume*  pMotherLV,
-		G4Transform3D&    transformation,
-		G4int copyNumBase,
-		G4bool surfCheck );
-  
+  void imprint(std::vector<G4VPhysicalVolume*>& nodes, G4LogicalVolume* pMotherLV, G4Transform3D& transformation,
+      G4int copyNumBase, G4bool surfCheck);
+
 };
 
-void Geant4AssemblyVolume::imprint( std::vector<G4VPhysicalVolume*>& nodes,
-                                    G4LogicalVolume*  pMotherLV,
-                                    G4Transform3D&    transformation,
-                                    G4int copyNumBase,
-                                    G4bool surfCheck )
-{
+void Geant4AssemblyVolume::imprint(std::vector<G4VPhysicalVolume*>& nodes, G4LogicalVolume* pMotherLV,
+    G4Transform3D& transformation, G4int copyNumBase, G4bool surfCheck) {
   G4AssemblyVolume* pAssembly = this;
-  unsigned int  numberOfDaughters;  
-  if( copyNumBase == 0 )  {
+  unsigned int numberOfDaughters;
+  if (copyNumBase == 0) {
     numberOfDaughters = pMotherLV->GetNoDaughters();
   }
-  else  {
+  else {
     numberOfDaughters = copyNumBase;
   }
   // We start from the first available index
   numberOfDaughters++;
   ImprintsCountPlus();
-  
-  std::vector<G4AssemblyTriplet> triplets = pAssembly->fTriplets;
-  for( unsigned int   i = 0; i < triplets.size(); i++ )  {
-    G4Transform3D Ta( *(triplets[i].GetRotation()),
-                      triplets[i].GetTranslation() );
-    if ( triplets[i].IsReflection() )  { Ta = Ta * G4ReflectZ3D(); }
+
+  std::vector < G4AssemblyTriplet > triplets = pAssembly->fTriplets;
+  for (unsigned int i = 0; i < triplets.size(); i++) {
+    G4Transform3D Ta(*(triplets[i].GetRotation()), triplets[i].GetTranslation());
+    if (triplets[i].IsReflection()) {
+      Ta = Ta * G4ReflectZ3D();
+    }
 
     G4Transform3D Tfinal = transformation * Ta;
-    
-    if ( triplets[i].GetVolume() )
-    {
+
+    if (triplets[i].GetVolume()) {
       // Generate the unique name for the next PV instance
       // The name has format:
       //
@@ -140,121 +133,106 @@ void Geant4AssemblyVolume::imprint( std::vector<G4VPhysicalVolume*>& nodes,
       // ZZZ - the log. volume index inside the assembly volume
       //
       std::stringstream pvName;
-      pvName << "av_"
-             << GetAssemblyID()
-             << "_impr_"
-             << GetImprintsCount()
-             << "_"
-             << triplets[i].GetVolume()->GetName().c_str()
-             << "_pv_"
-             << i
-             << std::ends;
+      pvName << "av_" << GetAssemblyID() << "_impr_" << GetImprintsCount() << "_" << triplets[i].GetVolume()->GetName().c_str()
+          << "_pv_" << i << std::ends;
 
       // Generate a new physical volume instance inside a mother
-      // (as we allow 3D transformation use G4ReflectionFactory to 
+      // (as we allow 3D transformation use G4ReflectionFactory to
       //  take into account eventual reflection)
       //
-      G4PhysicalVolumesPair pvPlaced
-        = G4ReflectionFactory::Instance()->Place( Tfinal,
-                                                  pvName.str().c_str(),
-                                                  triplets[i].GetVolume(),
-                                                  pMotherLV,
-                                                  false,
-                                                  numberOfDaughters + i,
-                                                  surfCheck );
+      G4PhysicalVolumesPair pvPlaced = G4ReflectionFactory::Instance()->Place(Tfinal, pvName.str().c_str(),
+          triplets[i].GetVolume(), pMotherLV, false, numberOfDaughters + i, surfCheck);
 
       // Register the physical volume created by us so we can delete it later
       //
-      fPVStore.push_back( pvPlaced.first );
+      fPVStore.push_back(pvPlaced.first);
       nodes.push_back(pvPlaced.first);
-      if ( pvPlaced.second )  { // Supported by G4, but not by TGeo!
-	fPVStore.push_back( pvPlaced.second ); 
-	G4Exception("G4AssemblyVolume::MakeImprint(..)",
-		    "GeomVol0003", FatalException,
-		    "Fancy construct popping new mother from the stack!");
+      if (pvPlaced.second) {   // Supported by G4, but not by TGeo!
+        fPVStore.push_back(pvPlaced.second);
+        G4Exception("G4AssemblyVolume::MakeImprint(..)", "GeomVol0003", FatalException,
+            "Fancy construct popping new mother from the stack!");
       }
     }
-    else if ( triplets[i].GetAssembly() )    {
+    else if (triplets[i].GetAssembly()) {
       // Place volumes in this assembly with composed transformation
-      G4Exception("G4AssemblyVolume::MakeImprint(..)",
-                  "GeomVol0003", FatalException,
-                  "Assemblies within assembliesare not supported.");
-    }
-    else    {
-      G4Exception("G4AssemblyVolume::MakeImprint(..)",
-                  "GeomVol0003", FatalException,
-                  "Triplet has no volume and no assembly");
-    }  
-  }  
-}    
+      G4Exception("G4AssemblyVolume::MakeImprint(..)", "GeomVol0003", FatalException,
+          "Assemblies within assembliesare not supported.");
+    }
+    else {
+      G4Exception("G4AssemblyVolume::MakeImprint(..)", "GeomVol0003", FatalException, "Triplet has no volume and no assembly");
+    }
+  }
+}
 
 namespace {
   static TGeoNode* s_topPtr;
   static string indent = "";
   struct MyTransform3D : public G4Transform3D {
-    MyTransform3D(double XX, double XY, double XZ, double DX,
-		  double YX, double YY, double YZ, double DY,
-		  double ZX, double ZY, double ZZ, double DZ) 
-      : G4Transform3D(XX,XY,XZ,DX,YX,YY,YZ,DY,ZX,ZY,ZZ,DZ) {}
+    MyTransform3D(double XX, double XY, double XZ, double DX, double YX, double YY, double YZ, double DY, double ZX, double ZY,
+        double ZZ, double DZ)
+        : G4Transform3D(XX, XY, XZ, DX, YX, YY, YZ, DY, ZX, ZY, ZZ, DZ) {
+    }
   };
 
-  void handleName(const TGeoNode* n)   {
+  void handleName(const TGeoNode* n) {
     TGeoVolume* v = n->GetVolume();
     TGeoMedium* m = v->GetMedium();
-    TGeoShape*  s = v->GetShape();
+    TGeoShape* s = v->GetShape();
     string nam;
-    printout(DEBUG,"G4","TGeoNode:'%s' Vol:'%s' Shape:'%s' Medium:'%s'",
-	     n->GetName(),v->GetName(),s->GetName(),m->GetName());
+    printout(DEBUG, "G4", "TGeoNode:'%s' Vol:'%s' Shape:'%s' Medium:'%s'", n->GetName(), v->GetName(), s->GetName(),
+        m->GetName());
   }
 
   class G4UserRegionInformation : public G4VUserRegionInformation {
   public:
-    Region  region;
-    double  threshold;
-    bool    storeSecondaries;
-    G4UserRegionInformation() : threshold(0.0), storeSecondaries(false) {}
-    virtual ~G4UserRegionInformation() {}
+    Region region;
+    double threshold;
+    bool storeSecondaries;
+    G4UserRegionInformation()
+        : threshold(0.0), storeSecondaries(false) {
+    }
+    virtual ~G4UserRegionInformation() {
+    }
     virtual void Print() const {
-      if ( region.isValid() )
-	printout(DEBUG,"Region","Name:%s",region.name());
+      if (region.isValid())
+        printout(DEBUG, "Region", "Name:%s", region.name());
     }
   };
 }
 
 /// Initializing Constructor
-Geant4Converter::Geant4Converter( LCDD& lcdd ) 
-  : Geant4Mapping(lcdd), m_checkOverlaps(true)
-{
+Geant4Converter::Geant4Converter(LCDD& lcdd)
+    : Geant4Mapping(lcdd), m_checkOverlaps(true) {
   this->Geant4Mapping::init();
 }
 
 /// Standard destructor
-Geant4Converter::~Geant4Converter()  {
+Geant4Converter::~Geant4Converter() {
 }
 
 /// Dump element in GDML format to output stream
 void* Geant4Converter::handleElement(const string& name, const TGeoElement* element) const {
   G4Element* g4e = data().g4Elements[element];
-  if ( !g4e ) {
-    g4e = G4Element::GetElement(name,false);
-    if ( !g4e ) {
-      if ( element->GetNisotopes() > 1 ) {
-	g4e = new G4Element(name,element->GetTitle(),element->GetNisotopes());
-	for(int i=0, n=element->GetNisotopes(); i<n; ++i) {
-	  TGeoIsotope*  iso = element->GetIsotope(i);
-	  G4Isotope*  g4iso = G4Isotope::GetIsotope(iso->GetName(),false);
-	  if ( !g4iso ) {
-	    g4iso = new G4Isotope(iso->GetName(),iso->GetZ(),iso->GetN(),iso->GetA());
-	  }
-	  g4e->AddIsotope(g4iso,element->GetRelativeAbundance(i));
-	}
+  if (!g4e) {
+    g4e = G4Element::GetElement(name, false);
+    if (!g4e) {
+      if (element->GetNisotopes() > 1) {
+        g4e = new G4Element(name, element->GetTitle(), element->GetNisotopes());
+        for (int i = 0, n = element->GetNisotopes(); i < n; ++i) {
+          TGeoIsotope* iso = element->GetIsotope(i);
+          G4Isotope* g4iso = G4Isotope::GetIsotope(iso->GetName(), false);
+          if (!g4iso) {
+            g4iso = new G4Isotope(iso->GetName(), iso->GetZ(), iso->GetN(), iso->GetA());
+          }
+          g4e->AddIsotope(g4iso, element->GetRelativeAbundance(i));
+        }
       }
       else {
-	g4e = new G4Element(element->GetTitle(),name,element->Z(),element->A()*(g/mole));
+        g4e = new G4Element(element->GetTitle(), name, element->Z(), element->A() * (g / mole));
       }
       stringstream str;
       str << (*g4e);
-      printout(DEBUG,"Geant4Converter","++ Created G4 %s",str.str().c_str());
+      printout(DEBUG, "Geant4Converter", "++ Created G4 %s", str.str().c_str());
     }
     data().g4Elements[element] = g4e;
   }
@@ -264,55 +242,51 @@ void* Geant4Converter::handleElement(const string& name, const TGeoElement* elem
 /// Dump material in GDML format to output stream
 void* Geant4Converter::handleMaterial(const string& name, const TGeoMedium* medium) const {
   G4Material* mat = data().g4Materials[medium];
-  if ( !mat ) {
-    mat = G4Material::GetMaterial(name,false);
-    if ( !mat ) {
+  if (!mat) {
+    mat = G4Material::GetMaterial(name, false);
+    if (!mat) {
       TGeoMaterial* m = medium->GetMaterial();
-      G4State       state   = kStateUndefined;
-      double        density = m->GetDensity()*(gram/cm3);
-      if ( density < 1e-25 ) density = 1e-25;
-      switch(m->GetState()) {
+      G4State state = kStateUndefined;
+      double density = m->GetDensity() * (gram / cm3);
+      if (density < 1e-25)
+        density = 1e-25;
+      switch (m->GetState()) {
       case TGeoMaterial::kMatStateSolid:
-	state = kStateSolid;
-	break;
+        state = kStateSolid;
+        break;
       case TGeoMaterial::kMatStateLiquid:
-	state = kStateLiquid;
-	break;
+        state = kStateLiquid;
+        break;
       case TGeoMaterial::kMatStateGas:
-	state = kStateGas;
-	break;
+        state = kStateGas;
+        break;
       default:
       case TGeoMaterial::kMatStateUndefined:
-	state = kStateUndefined;
-	break;
+        state = kStateUndefined;
+        break;
       }
-      if ( m->IsMixture() ) {
-	double A_total = 0.0;
-	TGeoMixture* mix = (TGeoMixture*)m;
-	int nElements = mix->GetNelements();
-	mat = new G4Material(name,density,nElements,
-			     state,
-			     m->GetTemperature(),
-			     m->GetPressure());
-	for(int i=0; i<nElements; ++i)
-	  A_total += (mix->GetAmixt())[i];
-	for(int i=0; i<nElements; ++i) {
-	  TGeoElement*  e = mix->GetElement(i);
-	  G4Element*  g4e = (G4Element*)handleElement(e->GetName(),e);
-	  if ( !g4e ) {
-	    printout(ERROR,"Material","Missing component %s for material %s.",
-		     e->GetName(), mix->GetName());
-	  }
-	  mat->AddElement(g4e,(mix->GetAmixt())[i]/A_total);
-	}
+      if (m->IsMixture()) {
+        double A_total = 0.0;
+        TGeoMixture* mix = (TGeoMixture*) m;
+        int nElements = mix->GetNelements();
+        mat = new G4Material(name, density, nElements, state, m->GetTemperature(), m->GetPressure());
+        for (int i = 0; i < nElements; ++i)
+          A_total += (mix->GetAmixt())[i];
+        for (int i = 0; i < nElements; ++i) {
+          TGeoElement* e = mix->GetElement(i);
+          G4Element* g4e = (G4Element*) handleElement(e->GetName(), e);
+          if (!g4e) {
+            printout(ERROR, "Material", "Missing component %s for material %s.", e->GetName(), mix->GetName());
+          }
+          mat->AddElement(g4e, (mix->GetAmixt())[i] / A_total);
+        }
       }
       else {
-	mat = new G4Material(name,m->GetZ(),m->GetA(),density,state,
-			     m->GetTemperature(),m->GetPressure());
+        mat = new G4Material(name, m->GetZ(), m->GetA(), density, state, m->GetTemperature(), m->GetPressure());
       }
       stringstream str;
       str << (*mat);
-      printout(DEBUG,"Geant4Converter","++ Created G4 %s",str.str().c_str());
+      printout(DEBUG, "Geant4Converter", "++ Created G4 %s", str.str().c_str());
     }
     data().g4Materials[medium] = mat;
   }
@@ -320,127 +294,121 @@ void* Geant4Converter::handleMaterial(const string& name, const TGeoMedium* medi
 }
 
 /// Dump solid in GDML format to output stream
-void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape)   const   {
+void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) const {
   G4VSolid* solid = 0;
-  if ( shape ) {
-    if ( 0 != (solid=data().g4Solids[shape]) ) {
+  if (shape) {
+    if (0 != (solid = data().g4Solids[shape])) {
       return solid;
     }
-    else if ( shape->IsA() == TGeoShapeAssembly::Class() )   {
-      solid = (G4VSolid*)new G4Assembly();
+    else if (shape->IsA() == TGeoShapeAssembly::Class()) {
+      solid = (G4VSolid*) new G4Assembly();
     }
-    else if ( shape->IsA() == TGeoBBox::Class() ) {
-      const TGeoBBox* s = (const TGeoBBox*)shape;
-      solid = new G4Box(name,s->GetDX()*CM_2_MM,s->GetDY()*CM_2_MM,s->GetDZ()*CM_2_MM);
+    else if (shape->IsA() == TGeoBBox::Class()) {
+      const TGeoBBox* s = (const TGeoBBox*) shape;
+      solid = new G4Box(name, s->GetDX() * CM_2_MM, s->GetDY() * CM_2_MM, s->GetDZ() * CM_2_MM);
     }
-    else if ( shape->IsA() == TGeoTube::Class() ) {
-      const TGeoTube* s = (const TGeoTube*)shape;
-      solid = new G4Tubs(name,s->GetRmin()*CM_2_MM,s->GetRmax()*CM_2_MM,s->GetDz()*CM_2_MM,0,2.*M_PI);
+    else if (shape->IsA() == TGeoTube::Class()) {
+      const TGeoTube* s = (const TGeoTube*) shape;
+      solid = new G4Tubs(name, s->GetRmin() * CM_2_MM, s->GetRmax() * CM_2_MM, s->GetDz() * CM_2_MM, 0, 2. * M_PI);
     }
-    else if ( shape->IsA() == TGeoTubeSeg::Class() ) {
-      const TGeoTubeSeg* s = (const TGeoTubeSeg*)shape;
-      solid = new G4Tubs(name,s->GetRmin()*CM_2_MM,s->GetRmax()*CM_2_MM,s->GetDz()*CM_2_MM,s->GetPhi1()*DEGREE_2_RAD,s->GetPhi2()*DEGREE_2_RAD);
+    else if (shape->IsA() == TGeoTubeSeg::Class()) {
+      const TGeoTubeSeg* s = (const TGeoTubeSeg*) shape;
+      solid = new G4Tubs(name, s->GetRmin() * CM_2_MM, s->GetRmax() * CM_2_MM, s->GetDz() * CM_2_MM,
+          s->GetPhi1() * DEGREE_2_RAD, s->GetPhi2() * DEGREE_2_RAD);
     }
-    else if ( shape->IsA() == TGeoTrd1::Class() ) {
-      const TGeoTrd1* s = (const TGeoTrd1*)shape;
-      solid = new G4Trd(name,s->GetDx1()*CM_2_MM,s->GetDx2()*CM_2_MM,s->GetDy()*CM_2_MM,s->GetDy()*CM_2_MM,s->GetDz()*CM_2_MM);
+    else if (shape->IsA() == TGeoTrd1::Class()) {
+      const TGeoTrd1* s = (const TGeoTrd1*) shape;
+      solid = new G4Trd(name, s->GetDx1() * CM_2_MM, s->GetDx2() * CM_2_MM, s->GetDy() * CM_2_MM, s->GetDy() * CM_2_MM,
+          s->GetDz() * CM_2_MM);
     }
-    else if ( shape->IsA() == TGeoTrd2::Class() ) {
-      const TGeoTrd2* s = (const TGeoTrd2*)shape;
-      solid = new G4Trd(name,s->GetDx1()*CM_2_MM,s->GetDx2()*CM_2_MM,s->GetDy1()*CM_2_MM,s->GetDy2()*CM_2_MM,s->GetDz()*CM_2_MM);
+    else if (shape->IsA() == TGeoTrd2::Class()) {
+      const TGeoTrd2* s = (const TGeoTrd2*) shape;
+      solid = new G4Trd(name, s->GetDx1() * CM_2_MM, s->GetDx2() * CM_2_MM, s->GetDy1() * CM_2_MM, s->GetDy2() * CM_2_MM,
+          s->GetDz() * CM_2_MM);
     }
-    else if ( shape->IsA() == TGeoPgon::Class() ) {
-      const TGeoPgon* s = (const TGeoPgon*)shape;
-      double phi_start = s->GetPhi1()*DEGREE_2_RAD;
-      double phi_total = (s->GetDphi()+s->GetPhi1())*DEGREE_2_RAD;
+    else if (shape->IsA() == TGeoPgon::Class()) {
+      const TGeoPgon* s = (const TGeoPgon*) shape;
+      double phi_start = s->GetPhi1() * DEGREE_2_RAD;
+      double phi_total = (s->GetDphi() + s->GetPhi1()) * DEGREE_2_RAD;
       vector<double> rmin, rmax, z;
-      for( Int_t i=0; i<s->GetNz(); ++i )  {
-	rmin.push_back(s->GetRmin(i)*CM_2_MM);
-	rmax.push_back(s->GetRmax(i)*CM_2_MM);
-	z.push_back(s->GetZ(i)*CM_2_MM);
+      for (Int_t i = 0; i < s->GetNz(); ++i) {
+        rmin.push_back(s->GetRmin(i) * CM_2_MM);
+        rmax.push_back(s->GetRmax(i) * CM_2_MM);
+        z.push_back(s->GetZ(i) * CM_2_MM);
       }
-      solid = new G4Polyhedra(name,phi_start,phi_total,s->GetNedges(),s->GetNz(),&z[0],&rmin[0],&rmax[0]);
+      solid = new G4Polyhedra(name, phi_start, phi_total, s->GetNedges(), s->GetNz(), &z[0], &rmin[0], &rmax[0]);
     }
-    else if ( shape->IsA() == TGeoPcon::Class() ) {
-      const TGeoPcon* s = (const TGeoPcon*)shape;
-      double phi_start = s->GetPhi1()*DEGREE_2_RAD;
-      double phi_total = (s->GetDphi()+s->GetPhi1())*DEGREE_2_RAD;
+    else if (shape->IsA() == TGeoPcon::Class()) {
+      const TGeoPcon* s = (const TGeoPcon*) shape;
+      double phi_start = s->GetPhi1() * DEGREE_2_RAD;
+      double phi_total = (s->GetDphi() + s->GetPhi1()) * DEGREE_2_RAD;
       vector<double> rmin, rmax, z;
-      for( Int_t i=0; i<s->GetNz(); ++i )  {
-	rmin.push_back(s->GetRmin(i)*CM_2_MM);
-	rmax.push_back(s->GetRmax(i)*CM_2_MM);
-	z.push_back(s->GetZ(i)*CM_2_MM);
+      for (Int_t i = 0; i < s->GetNz(); ++i) {
+        rmin.push_back(s->GetRmin(i) * CM_2_MM);
+        rmax.push_back(s->GetRmax(i) * CM_2_MM);
+        z.push_back(s->GetZ(i) * CM_2_MM);
       }
-      solid = new G4Polycone(name,phi_start,phi_total,s->GetNz(),&z[0],&rmin[0],&rmax[0]);
-    }
-    else if ( shape->IsA() == TGeoConeSeg::Class() ) {
-      const TGeoConeSeg* s = (const TGeoConeSeg*)shape;
-      solid = new G4Cons(name, 
-			 s->GetRmin1()*CM_2_MM,
-			 s->GetRmax1()*CM_2_MM,
-			 s->GetRmin2()*CM_2_MM,
-			 s->GetRmax2()*CM_2_MM,
-			 s->GetDz()*CM_2_MM,
-			 s->GetPhi1()*DEGREE_2_RAD, 
-			 s->GetPhi2()*DEGREE_2_RAD);
-    }
-    else if ( shape->IsA() == TGeoParaboloid::Class() ) {
-      const TGeoParaboloid* s = (const TGeoParaboloid*)shape;
-      solid = new G4Paraboloid(name,s->GetDz()*CM_2_MM,s->GetRlo()*CM_2_MM,s->GetRhi()*CM_2_MM);
-    }
-    else if ( shape->IsA() == TGeoSphere::Class() ) {
-      const TGeoSphere* s = (const TGeoSphere*)shape;
-      solid = new G4Sphere(name,s->GetRmin()*CM_2_MM,s->GetRmax()*CM_2_MM,
-			   s->GetPhi1()*DEGREE_2_RAD,s->GetPhi2()*DEGREE_2_RAD,
-			   s->GetTheta1()*DEGREE_2_RAD,s->GetTheta2()*DEGREE_2_RAD);
-    }
-    else if ( shape->IsA() == TGeoTorus::Class() ) {
-      const TGeoTorus* s = (const TGeoTorus*)shape;
-      solid = new G4Torus(name,s->GetRmin()*CM_2_MM,s->GetRmax()*CM_2_MM, s->GetR()*CM_2_MM,
-			  s->GetPhi1()*DEGREE_2_RAD,s->GetDphi()*DEGREE_2_RAD);
-    }
-    else if ( shape->IsA() == TGeoCompositeShape::Class() ) {
-      const TGeoCompositeShape* s = (const TGeoCompositeShape*)shape;
+      solid = new G4Polycone(name, phi_start, phi_total, s->GetNz(), &z[0], &rmin[0], &rmax[0]);
+    }
+    else if (shape->IsA() == TGeoConeSeg::Class()) {
+      const TGeoConeSeg* s = (const TGeoConeSeg*) shape;
+      solid = new G4Cons(name, s->GetRmin1() * CM_2_MM, s->GetRmax1() * CM_2_MM, s->GetRmin2() * CM_2_MM,
+          s->GetRmax2() * CM_2_MM, s->GetDz() * CM_2_MM, s->GetPhi1() * DEGREE_2_RAD, s->GetPhi2() * DEGREE_2_RAD);
+    }
+    else if (shape->IsA() == TGeoParaboloid::Class()) {
+      const TGeoParaboloid* s = (const TGeoParaboloid*) shape;
+      solid = new G4Paraboloid(name, s->GetDz() * CM_2_MM, s->GetRlo() * CM_2_MM, s->GetRhi() * CM_2_MM);
+    }
+    else if (shape->IsA() == TGeoSphere::Class()) {
+      const TGeoSphere* s = (const TGeoSphere*) shape;
+      solid = new G4Sphere(name, s->GetRmin() * CM_2_MM, s->GetRmax() * CM_2_MM, s->GetPhi1() * DEGREE_2_RAD,
+          s->GetPhi2() * DEGREE_2_RAD, s->GetTheta1() * DEGREE_2_RAD, s->GetTheta2() * DEGREE_2_RAD);
+    }
+    else if (shape->IsA() == TGeoTorus::Class()) {
+      const TGeoTorus* s = (const TGeoTorus*) shape;
+      solid = new G4Torus(name, s->GetRmin() * CM_2_MM, s->GetRmax() * CM_2_MM, s->GetR() * CM_2_MM,
+          s->GetPhi1() * DEGREE_2_RAD, s->GetDphi() * DEGREE_2_RAD);
+    }
+    else if (shape->IsA() == TGeoCompositeShape::Class()) {
+      const TGeoCompositeShape* s = (const TGeoCompositeShape*) shape;
       const TGeoBoolNode* boolean = s->GetBoolNode();
       TGeoBoolNode::EGeoBoolType oper = boolean->GetBooleanOperator();
-      TGeoMatrix* m     = boolean->GetRightMatrix();
-      G4VSolid* left    = (G4VSolid*)handleSolid(name+"_left", boolean->GetLeftShape());
-      G4VSolid* right   = (G4VSolid*)handleSolid(name+"_right",boolean->GetRightShape());
+      TGeoMatrix* m = boolean->GetRightMatrix();
+      G4VSolid* left = (G4VSolid*) handleSolid(name + "_left", boolean->GetLeftShape());
+      G4VSolid* right = (G4VSolid*) handleSolid(name + "_right", boolean->GetRightShape());
       const Double_t *t = m->GetTranslation();
       const Double_t *r = m->GetRotationMatrix();
-      
-      if ( !left )   {
-	throw runtime_error("G4Converter: No left Geant4 Solid present for composite shape:"+name);
+
+      if (!left) {
+        throw runtime_error("G4Converter: No left Geant4 Solid present for composite shape:" + name);
       }
-      if ( !right )   {
-	throw runtime_error("G4Converter: No right Geant4 Solid present for composite shape:"+name);
+      if (!right) {
+        throw runtime_error("G4Converter: No right Geant4 Solid present for composite shape:" + name);
       }
 
-      if ( m->IsRotation()    )   {
-	MyTransform3D transform(r[0],r[1],r[2],t[0]*CM_2_MM,
-				r[3],r[4],r[5],t[1]*CM_2_MM,
-				r[6],r[7],r[8],t[2]*CM_2_MM);
-	if (      oper == TGeoBoolNode::kGeoSubtraction )
-	  solid = new G4SubtractionSolid(name,left,right,transform);
-	else if ( oper == TGeoBoolNode::kGeoUnion )
-	  solid = new G4UnionSolid(name,left,right,transform);
-	else if ( oper == TGeoBoolNode::kGeoIntersection )
-	  solid = new G4IntersectionSolid(name,left,right,transform);
+      if (m->IsRotation()) {
+        MyTransform3D transform(r[0], r[1], r[2], t[0] * CM_2_MM, r[3], r[4], r[5], t[1] * CM_2_MM, r[6], r[7], r[8],
+            t[2] * CM_2_MM);
+        if (oper == TGeoBoolNode::kGeoSubtraction)
+          solid = new G4SubtractionSolid(name, left, right, transform);
+        else if (oper == TGeoBoolNode::kGeoUnion)
+          solid = new G4UnionSolid(name, left, right, transform);
+        else if (oper == TGeoBoolNode::kGeoIntersection)
+          solid = new G4IntersectionSolid(name, left, right, transform);
       }
       else {
-	G4ThreeVector transform(t[0]*CM_2_MM,t[1]*CM_2_MM,t[2]*CM_2_MM);
-	if (      oper == TGeoBoolNode::kGeoSubtraction )
-	  solid = new G4SubtractionSolid(name,left,right,0,transform);
-	else if ( oper == TGeoBoolNode::kGeoUnion )
-	  solid = new G4UnionSolid(name,left,right,0,transform);
-	else if ( oper == TGeoBoolNode::kGeoIntersection )
-	  solid = new G4IntersectionSolid(name,left,right,0,transform);
+        G4ThreeVector transform(t[0] * CM_2_MM, t[1] * CM_2_MM, t[2] * CM_2_MM);
+        if (oper == TGeoBoolNode::kGeoSubtraction)
+          solid = new G4SubtractionSolid(name, left, right, 0, transform);
+        else if (oper == TGeoBoolNode::kGeoUnion)
+          solid = new G4UnionSolid(name, left, right, 0, transform);
+        else if (oper == TGeoBoolNode::kGeoIntersection)
+          solid = new G4IntersectionSolid(name, left, right, 0, transform);
       }
     }
 
-    if ( !solid ) {
-      string err = "Failed to handle unknown solid shape:" + 
-	name + " of type " + string(shape->IsA()->GetName());
+    if (!solid) {
+      string err = "Failed to handle unknown solid shape:" + name + " of type " + string(shape->IsA()->GetName());
       throw runtime_error(err);
     }
     data().g4Solids[shape] = solid;
@@ -449,195 +417,191 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape)
 }
 
 /// Dump logical volume in GDML format to output stream
-void* Geant4Converter::handleVolume(const string& name, const TGeoVolume* volume)   const   {
+void* Geant4Converter::handleVolume(const string& name, const TGeoVolume* volume) const {
   Geant4GeometryInfo& info = data();
   G4LogicalVolume* vol = info.g4Volumes[volume];
-  if ( !vol ) {
-    const TGeoVolume*        v        = volume;
-    Volume                   _v       = Ref_t(v);
-    string                   n        = v->GetName();
-    TGeoMedium*              m        = v->GetMedium();
-    TGeoShape*               s        = v->GetShape();
-    G4VSolid*                solid    = (G4VSolid*)handleSolid(s->GetName(),s);
-    G4Material*              medium   = 0;
-    bool                     assembly = s->IsA() == TGeoShapeAssembly::Class();
-
-    SensitiveDetector        det = _v.sensitiveDetector();
-    G4VSensitiveDetector*    sd  = 0;
-
-    if ( det.isValid() )   {
+  if (!vol) {
+    const TGeoVolume* v = volume;
+    Volume _v = Ref_t(v);
+    string n = v->GetName();
+    TGeoMedium* m = v->GetMedium();
+    TGeoShape* s = v->GetShape();
+    G4VSolid* solid = (G4VSolid*) handleSolid(s->GetName(), s);
+    G4Material* medium = 0;
+    bool assembly = s->IsA() == TGeoShapeAssembly::Class();
+
+    SensitiveDetector det = _v.sensitiveDetector();
+    G4VSensitiveDetector* sd = 0;
+
+    if (det.isValid()) {
       sd = info.g4SensDets[det.ptr()];
-      if ( !sd ) {
-	throw runtime_error("G4Cnv::volume["+name+"]:    + FATAL Failed to "
-			    "access Geant4 sensitive detector.");
+      if (!sd) {
+        throw runtime_error("G4Cnv::volume[" + name + "]:    + FATAL Failed to "
+            "access Geant4 sensitive detector.");
       }
       sd->Activate(true);
     }
-    LimitSet      lim = _v.limitSet();
+    LimitSet lim = _v.limitSet();
     G4UserLimits* user_limits = 0;
-    if ( lim.isValid() )   {
+    if (lim.isValid()) {
       user_limits = info.g4Limits[lim.ptr()];
-      if ( !user_limits ) {
-	throw runtime_error("G4Cnv::volume["+name+"]:    + FATAL Failed to "
-			    "access Geant4 user limits.");
+      if (!user_limits) {
+        throw runtime_error("G4Cnv::volume[" + name + "]:    + FATAL Failed to "
+            "access Geant4 user limits.");
       }
     }
-    VisAttr          vis = _v.visAttributes();
+    VisAttr vis = _v.visAttributes();
     G4VisAttributes* vis_attr = 0;
-    if ( vis.isValid() ) {
-      vis_attr = (G4VisAttributes*)handleVis(vis.name(),vis.ptr());
+    if (vis.isValid()) {
+      vis_attr = (G4VisAttributes*) handleVis(vis.name(), vis.ptr());
     }
-    Region    reg = _v.region();
+    Region reg = _v.region();
     G4Region* region = 0;
-    if ( reg.isValid() )  {
-      region =  info.g4Regions[reg.ptr()];
-      if ( !region ) {
-	throw runtime_error("G4Cnv::volume["+name+"]:    + FATAL Failed to "
-			    "access Geant4 region.");
+    if (reg.isValid()) {
+      region = info.g4Regions[reg.ptr()];
+      if (!region) {
+        throw runtime_error("G4Cnv::volume[" + name + "]:    + FATAL Failed to "
+            "access Geant4 region.");
       }
     }
 
-    printout(DEBUG,"Geant4Converter","++ Convert Volume %-32s: %p %s/%s assembly:%s sensitive:%s",
-	     n.c_str(),v,s->IsA()->GetName(),v->IsA()->GetName(),(assembly ? "YES" : "NO"),
-	     (det.isValid() ? "YES" : "NO"));
+    printout(DEBUG, "Geant4Converter", "++ Convert Volume %-32s: %p %s/%s assembly:%s sensitive:%s", n.c_str(), v,
+        s->IsA()->GetName(), v->IsA()->GetName(), (assembly ? "YES" : "NO"), (det.isValid() ? "YES" : "NO"));
 
-
-    if ( assembly )  {
-      vol = (G4LogicalVolume*)new G4AssemblyVolume();
+    if (assembly) {
+      vol = (G4LogicalVolume*) new G4AssemblyVolume();
       info.g4Volumes[v] = vol;
       return vol;
     }
-    medium = (G4Material*)handleMaterial(m->GetName(),m);
-    if ( !solid )   {
-      throw runtime_error("G4Converter: No Geant4 Solid present for volume:"+n);
+    medium = (G4Material*) handleMaterial(m->GetName(), m);
+    if (!solid) {
+      throw runtime_error("G4Converter: No Geant4 Solid present for volume:" + n);
     }
-    if ( !medium )   {
-      throw runtime_error("G4Converter: No Geant4 material present for volume:"+n);
+    if (!medium) {
+      throw runtime_error("G4Converter: No Geant4 material present for volume:" + n);
     }
-    if ( user_limits )   {
-      printout(DEBUG,"++ Volume     + Apply LIMITS settings:%-24s to volume %s.",lim.name(),_v.name());
+    if (user_limits) {
+      printout(DEBUG, "++ Volume     + Apply LIMITS settings:%-24s to volume %s.", lim.name(), _v.name());
     }
-    vol = new G4LogicalVolume(solid,medium,n,0,sd,user_limits);
-    if ( region )   {
-      printout(DEBUG,"Geant4Converter","++ Volume     + Apply REGION settings: %s to volume %s.",reg.name(),_v.name());
+    vol = new G4LogicalVolume(solid, medium, n, 0, sd, user_limits);
+    if (region) {
+      printout(DEBUG, "Geant4Converter", "++ Volume     + Apply REGION settings: %s to volume %s.", reg.name(), _v.name());
       vol->SetRegion(region);
       region->AddRootLogicalVolume(vol);
     }
-    if ( vis_attr )   {
+    if (vis_attr) {
       vol->SetVisAttributes(vis_attr);
     }
-    if ( sd )   {
-      printout(DEBUG,"Geant4Converter","++ Volume:    + %s <> %s Solid:%s Mat:%s SD:%s",
-	       name.c_str(),vol->GetName().c_str(),solid->GetName().c_str(),
-	       medium->GetName().c_str(),sd->GetName().c_str());
+    if (sd) {
+      printout(DEBUG, "Geant4Converter", "++ Volume:    + %s <> %s Solid:%s Mat:%s SD:%s", name.c_str(), vol->GetName().c_str(),
+          solid->GetName().c_str(), medium->GetName().c_str(), sd->GetName().c_str());
     }
     info.g4Volumes[v] = vol;
-    printout(DEBUG,"Geant4Converter",  "++ Volume     + %s converted: %p ---> G4: %p",n.c_str(),v,vol);
+    printout(DEBUG, "Geant4Converter", "++ Volume     + %s converted: %p ---> G4: %p", n.c_str(), v, vol);
   }
   return vol;
 }
 
 /// Dump logical volume in GDML format to output stream
-void* Geant4Converter::collectVolume(const string& /* name */, const TGeoVolume* volume)   const   {
+void* Geant4Converter::collectVolume(const string& /* name */, const TGeoVolume* volume) const {
   Geant4GeometryInfo& info = data();
   const TGeoVolume* v = volume;
-  Volume            _v  = Ref_t(v);
-  Region            reg = _v.region();
-  LimitSet          lim = _v.limitSet();
+  Volume _v = Ref_t(v);
+  Region reg = _v.region();
+  LimitSet lim = _v.limitSet();
   SensitiveDetector det = _v.sensitiveDetector();
 
-  if ( lim.isValid() ) info.limits[lim.ptr()].insert(v);
-  if ( reg.isValid() ) info.regions[reg.ptr()].insert(v);
-  if ( det.isValid() ) info.sensitives[det.ptr()].insert(v);
-  return (void*)v;
+  if (lim.isValid())
+    info.limits[lim.ptr()].insert(v);
+  if (reg.isValid())
+    info.regions[reg.ptr()].insert(v);
+  if (det.isValid())
+    info.sensitives[det.ptr()].insert(v);
+  return (void*) v;
 }
 
 /// Dump volume placement in GDML format to output stream
 void* Geant4Converter::handlePlacement(const string& name, const TGeoNode* node) const {
   static Double_t identity_rot[] = { 1., 0., 0., 0., 1., 0., 0., 0., 1. };
-  Geant4GeometryInfo& info = data();  
+  Geant4GeometryInfo& info = data();
   PlacementMap::const_iterator g4it = info.g4Placements.find(node);
   G4VPhysicalVolume* g4 = (g4it == info.g4Placements.end()) ? 0 : (*g4it).second;
-  if ( !g4 )   {
-    TGeoVolume*      mot_vol = node->GetMotherVolume();
-    TGeoVolume*      vol     = node->GetVolume();
-    TGeoMatrix*      trafo   = node->GetMatrix();
-    if ( !trafo ) {
-      printout(FATAL,"Geant4Converter","++ Attempt to handle placement without transformation:%p %s of type %s vol:%p",
-	       node,node->GetName(),node->IsA()->GetName(),vol);
-    }
-    else if ( 0 == vol ) {
-      printout(FATAL,"Geant4Converter","++ Unknown G4 volume:%p %s of type %s vol:%s ptr:%p",
-	       node,node->GetName(),node->IsA()->GetName(),vol->IsA()->GetName(),vol);
-    }
-    else  {
-      int                   copy    = node->GetNumber();
-      G4LogicalVolume*      g4vol   = info.g4Volumes[vol];
-      G4LogicalVolume*      g4mot   = info.g4Volumes[mot_vol];
-      Geant4AssemblyVolume* ass_mot = (Geant4AssemblyVolume*)g4mot;
-      Geant4AssemblyVolume* ass_dau = (Geant4AssemblyVolume*)g4vol;
-      const Double_t*       trans   = trafo->GetTranslation();
-      const Double_t*       rot     = trafo->IsRotation() ? trafo->GetRotationMatrix() : identity_rot;
+  if (!g4) {
+    TGeoVolume* mot_vol = node->GetMotherVolume();
+    TGeoVolume* vol = node->GetVolume();
+    TGeoMatrix* trafo = node->GetMatrix();
+    if (!trafo) {
+      printout(FATAL, "Geant4Converter", "++ Attempt to handle placement without transformation:%p %s of type %s vol:%p", node,
+          node->GetName(), node->IsA()->GetName(), vol);
+    }
+    else if (0 == vol) {
+      printout(FATAL, "Geant4Converter", "++ Unknown G4 volume:%p %s of type %s vol:%s ptr:%p", node, node->GetName(),
+          node->IsA()->GetName(), vol->IsA()->GetName(), vol);
+    }
+    else {
+      int copy = node->GetNumber();
+      G4LogicalVolume* g4vol = info.g4Volumes[vol];
+      G4LogicalVolume* g4mot = info.g4Volumes[mot_vol];
+      Geant4AssemblyVolume* ass_mot = (Geant4AssemblyVolume*) g4mot;
+      Geant4AssemblyVolume* ass_dau = (Geant4AssemblyVolume*) g4vol;
+      const Double_t* trans = trafo->GetTranslation();
+      const Double_t* rot = trafo->IsRotation() ? trafo->GetRotationMatrix() : identity_rot;
       bool daughter_is_assembly = vol->IsA() == TGeoVolumeAssembly::Class();
-      bool mother_is_assembly   = mot_vol ? mot_vol->IsA() == TGeoVolumeAssembly::Class() : false;
-      MyTransform3D transform(rot[0],rot[1],rot[2],trans[0]*CM_2_MM,
-			      rot[3],rot[4],rot[5],trans[1]*CM_2_MM,
-			      rot[6],rot[7],rot[8],trans[2]*CM_2_MM);
-      CLHEP::HepRotation rotmat=transform.getRotation();
-
-      if ( mother_is_assembly )  {	  // Mother is an assembly:
-	printout(DEBUG,"Geant4Converter","++ Assembly: AddPlacedVolume: %16p dau:%s "
-		 "Tr:x=%8.3f y=%8.3f z=%8.3f  Rot:phi=%7.3f theta=%7.3f psi=%7.3f\n",
-		 ass_mot,g4vol ? g4vol->GetName().c_str() : "---",
-		 transform.dx(),transform.dy(),transform.dz(),
-		 rotmat.getPhi(),rotmat.getTheta(),rotmat.getPsi());
-	size_t id = ass_mot->placeVolume(g4vol,transform);
-	info.g4AssemblyChildren[ass_mot].push_back(make_pair(id,node));
-	return 0;
+      bool mother_is_assembly = mot_vol ? mot_vol->IsA() == TGeoVolumeAssembly::Class() : false;
+      MyTransform3D transform(rot[0], rot[1], rot[2], trans[0] * CM_2_MM, rot[3], rot[4], rot[5], trans[1] * CM_2_MM, rot[6],
+          rot[7], rot[8], trans[2] * CM_2_MM);
+      CLHEP::HepRotation rotmat = transform.getRotation();
+
+      if (mother_is_assembly) {	  // Mother is an assembly:
+        printout(DEBUG, "Geant4Converter", "++ Assembly: AddPlacedVolume: %16p dau:%s "
+            "Tr:x=%8.3f y=%8.3f z=%8.3f  Rot:phi=%7.3f theta=%7.3f psi=%7.3f\n", ass_mot,
+            g4vol ? g4vol->GetName().c_str() : "---", transform.dx(), transform.dy(), transform.dz(), rotmat.getPhi(),
+            rotmat.getTheta(), rotmat.getPsi());
+        size_t id = ass_mot->placeVolume(g4vol, transform);
+        info.g4AssemblyChildren[ass_mot].push_back(make_pair(id, node));
+        return 0;
       }
-      else if ( daughter_is_assembly )  {
-	printout(DEBUG,"Geant4Converter","++ Assembly: makeImprint: %16p dau:%s "
-		 "Tr:x=%8.3f y=%8.3f z=%8.3f  Rot:phi=%7.3f theta=%7.3f psi=%7.3f\n",
-		 ass_dau,g4mot ? g4mot->GetName().c_str() : "---",
-		 transform.dx(),transform.dy(),transform.dz(),
-		 rotmat.getPhi(),rotmat.getTheta(),rotmat.getPsi());
-	std::vector<G4VPhysicalVolume*> phys_volumes;
-	AssemblyChildMap::iterator i = info.g4AssemblyChildren.find(ass_dau);
-	if ( i == info.g4AssemblyChildren.end() )  {
-	  printout(ERROR, "Geant4Converter", "++ Non-existing assembly [%p]",ass_dau);
-	}
-	const AssemblyChildren& v = (*i).second;
-	ass_dau->imprint(phys_volumes,g4mot,transform,copy,m_checkOverlaps);
-	if ( v.size() != phys_volumes.size() )   {
-	  printout(ERROR, "Geant4Converter", "++ Unexpected number of placements in assembly: %ld <> %ld.",
-		   v.size(), phys_volumes.size());
-	}
-	for(size_t j=0; j<v.size(); ++j)  {
-	  info.g4Placements[v[j].second] = phys_volumes[j];
-	}
-	return 0;
+      else if (daughter_is_assembly) {
+        printout(DEBUG, "Geant4Converter", "++ Assembly: makeImprint: %16p dau:%s "
+            "Tr:x=%8.3f y=%8.3f z=%8.3f  Rot:phi=%7.3f theta=%7.3f psi=%7.3f\n", ass_dau,
+            g4mot ? g4mot->GetName().c_str() : "---", transform.dx(), transform.dy(), transform.dz(), rotmat.getPhi(),
+            rotmat.getTheta(), rotmat.getPsi());
+        std::vector<G4VPhysicalVolume*> phys_volumes;
+        AssemblyChildMap::iterator i = info.g4AssemblyChildren.find(ass_dau);
+        if (i == info.g4AssemblyChildren.end()) {
+          printout(ERROR, "Geant4Converter", "++ Non-existing assembly [%p]", ass_dau);
+        }
+        const AssemblyChildren& v = (*i).second;
+        ass_dau->imprint(phys_volumes, g4mot, transform, copy, m_checkOverlaps);
+        if (v.size() != phys_volumes.size()) {
+          printout(ERROR, "Geant4Converter", "++ Unexpected number of placements in assembly: %ld <> %ld.", v.size(),
+              phys_volumes.size());
+        }
+        for (size_t j = 0; j < v.size(); ++j) {
+          info.g4Placements[v[j].second] = phys_volumes[j];
+        }
+        return 0;
       }
-      g4 = new G4PVPlacement(transform, // no rotation
-			     g4vol,     // its logical volume
-			     name,      // its name
-			     g4mot,     // its mother (logical) volume
-			     false,     // no boolean operations
-			     copy,      // its copy number
-			     m_checkOverlaps);
+      g4 = new G4PVPlacement(transform,   // no rotation
+          g4vol,     // its logical volume
+          name,      // its name
+          g4mot,     // its mother (logical) volume
+          false,     // no boolean operations
+          copy,      // its copy number
+          m_checkOverlaps);
     }
     info.g4Placements[node] = g4;
   }
   else {
-   printout(ERROR, "Geant4Converter", "++ Attempt to DOUBLE-place physical volume: %s No:%d",
-	    name.c_str(),node->GetNumber());
+    printout(ERROR, "Geant4Converter", "++ Attempt to DOUBLE-place physical volume: %s No:%d", name.c_str(), node->GetNumber());
   }
   return g4;
 }
 
 /// Convert the geometry type region into the corresponding Geant4 object(s).
-void* Geant4Converter::handleRegion(const TNamed* region, const set<const TGeoVolume*>& /* volumes */) const  {
+void* Geant4Converter::handleRegion(const TNamed* region, const set<const TGeoVolume*>& /* volumes */) const {
   G4Region* g4 = data().g4Regions[region];
-  if ( !g4 )   {
+  if (!g4) {
     Region r = Ref_t(region);
     g4 = new G4Region(r.name());
     // set production cut
@@ -652,51 +616,52 @@ void* Geant4Converter::handleRegion(const TNamed* region, const set<const TGeoVo
     info->storeSecondaries = r.storeSecondaries();
     g4->SetUserInformation(info);
 
-    printout(INFO, "Geant4Converter", "++ Converted region settings of:%s.",r.name());
-    vector<string>& limits = r.limits();
-    for(vector<string>::const_iterator i=limits.begin(); i!=limits.end(); ++i) {
+    printout(INFO, "Geant4Converter", "++ Converted region settings of:%s.", r.name());
+    vector < string > &limits = r.limits();
+    for (vector<string>::const_iterator i = limits.begin(); i != limits.end(); ++i) {
       const string& nam = *i;
       LimitSet ls = m_lcdd.limitSet(nam);
-      if ( ls.isValid() ) {
-	bool found = false;
-	const LimitMap& lm = data().g4Limits;
-	for(LimitMap::const_iterator j=lm.begin(); j!=lm.end();++j) {
-	  if ( nam == (*j).first->GetName() ) {
-	    g4->SetUserLimits((*j).second);
-	    found = true;
-	    break;
-	  }
-	}
-	if ( found ) continue;
+      if (ls.isValid()) {
+        bool found = false;
+        const LimitMap& lm = data().g4Limits;
+        for (LimitMap::const_iterator j = lm.begin(); j != lm.end(); ++j) {
+          if (nam == (*j).first->GetName()) {
+            g4->SetUserLimits((*j).second);
+            found = true;
+            break;
+          }
+        }
+        if (found)
+          continue;
       }
-      throw runtime_error("G4Region: Failed to resolve user limitset:"+*i);
+      throw runtime_error("G4Region: Failed to resolve user limitset:" + *i);
     }
-    data().g4Regions[region] = g4;    
+    data().g4Regions[region] = g4;
   }
   return g4;
 }
 
 /// Convert the geometry type LimitSet into the corresponding Geant4 object(s).
-void* Geant4Converter::handleLimitSet(const TNamed* limitset, const set<const TGeoVolume*>& /* volumes */) const  {
-  G4UserLimits* g4   = data().g4Limits[limitset];
-  if ( !g4 )   {
+void* Geant4Converter::handleLimitSet(const TNamed* limitset, const set<const TGeoVolume*>& /* volumes */) const {
+  G4UserLimits* g4 = data().g4Limits[limitset];
+  if (!g4) {
     LimitSet ls = Ref_t(limitset);
     g4 = new G4UserLimits(limitset->GetName());
     const set<Limit>& limits = ls.limits();
-    for(LimitSet::Object::const_iterator i=limits.begin(); i!=limits.end(); ++i) {
+    for (LimitSet::Object::const_iterator i = limits.begin(); i != limits.end(); ++i) {
       const Limit& l = *i;
-      if ( l.name == "step_length_max" )
-	g4->SetMaxAllowedStep(l.value);
-      else if ( l.name == "track_length_max" )
-	g4->SetMaxAllowedStep(l.value);
-      else if ( l.name == "time_max" )
-	g4->SetUserMaxTime(l.value);
-      else if ( l.name == "ekin_min" )
-	g4->SetUserMinEkine(l.value);
-      else if ( l.name == "range_min" )
-	g4->SetUserMinRange(l.value);
+      if (l.name == "step_length_max")
+        g4->SetMaxAllowedStep(l.value);
+      else if (l.name == "track_length_max")
+        g4->SetMaxAllowedStep(l.value);
+      else if (l.name == "time_max")
+        g4->SetUserMaxTime(l.value);
+      else if (l.name == "ekin_min")
+        g4->SetUserMinEkine(l.value);
+      else if (l.name == "range_min")
+        g4->SetUserMinRange(l.value);
       else
-	throw runtime_error("Unknown Geant4 user limit: "+l.toString());
+        throw runtime_error("Unknown Geant4 user limit: " + l.toString());
     }
     data().g4Limits[limitset] = g4;
   }
@@ -704,23 +669,23 @@ void* Geant4Converter::handleLimitSet(const TNamed* limitset, const set<const TG
 }
 
 /// Convert the geometry type SensitiveDetector into the corresponding Geant4 object(s).
-void* Geant4Converter::handleSensitive(const TNamed* sens_det, const set<const TGeoVolume*>& /* volumes */) const  {
+void* Geant4Converter::handleSensitive(const TNamed* sens_det, const set<const TGeoVolume*>& /* volumes */) const {
   Geant4GeometryInfo& info = data();
   G4VSensitiveDetector* g4 = info.g4SensDets[sens_det];
-  if ( !g4 )   {
+  if (!g4) {
     SensitiveDetector sd = Ref_t(sens_det);
     string type = sd.type(), name = sd.name();
-    g4 = PluginService::Create<G4VSensitiveDetector*>(type,name,&m_lcdd);
-    if ( !g4 ) {
+    g4 = PluginService::Create<G4VSensitiveDetector*>(type, name, &m_lcdd);
+    if (!g4) {
       string tmp = type;
       tmp[0] = ::toupper(tmp[0]);
-      type = "Geant4"+tmp;
-      g4 = PluginService::Create<G4VSensitiveDetector*>(type,name,&m_lcdd);
-      if ( !g4 )  {
-	PluginDebug dbg;
-	g4 = ROOT::Reflex::PluginService::Create<G4VSensitiveDetector*>(type,name,&m_lcdd);
-	throw runtime_error("Geant4Converter<SensitiveDetector>: FATAL Failed to "
-			    "create Geant4 sensitive detector factory "+name+" of type "+type+".");
+      type = "Geant4" + tmp;
+      g4 = PluginService::Create<G4VSensitiveDetector*>(type, name, &m_lcdd);
+      if (!g4) {
+        PluginDebug dbg;
+        g4 = ROOT::Reflex::PluginService::Create<G4VSensitiveDetector*>(type, name, &m_lcdd);
+        throw runtime_error("Geant4Converter<SensitiveDetector>: FATAL Failed to "
+            "create Geant4 sensitive detector factory " + name + " of type " + type + ".");
       }
     }
     g4->Activate(true);
@@ -731,23 +696,23 @@ void* Geant4Converter::handleSensitive(const TNamed* sens_det, const set<const T
 }
 
 /// Convert the geometry visualisation attributes to the corresponding Geant4 object(s).
-void* Geant4Converter::handleVis(const string& /* name */, const TNamed* vis) const  {
+void* Geant4Converter::handleVis(const string& /* name */, const TNamed* vis) const {
   Geant4GeometryInfo& info = data();
   G4VisAttributes* g4 = info.g4Vis[vis];
-  if ( !g4 )   {
-    float   r=0, g=0, b=0;
-    VisAttr attr  = Ref_t(vis);
-    int     style = attr.lineStyle();
-    attr.rgb(r,g,b);
-    g4 = new G4VisAttributes(attr.visible(),G4Colour(r,g,b,attr.alpha()));
+  if (!g4) {
+    float r = 0, g = 0, b = 0;
+    VisAttr attr = Ref_t(vis);
+    int style = attr.lineStyle();
+    attr.rgb(r, g, b);
+    g4 = new G4VisAttributes(attr.visible(), G4Colour(r, g, b, attr.alpha()));
     //g4->SetLineWidth(attr->GetLineWidth());
     g4->SetDaughtersInvisible(!attr.showDaughters());
-    if ( style == VisAttr::SOLID ) {
+    if (style == VisAttr::SOLID) {
       g4->SetLineStyle(G4VisAttributes::unbroken);
       g4->SetForceWireframe(false);
       g4->SetForceSolid(true);
     }
-    else if ( style == VisAttr::WIREFRAME || style == VisAttr::DASHED ) {
+    else if (style == VisAttr::WIREFRAME || style == VisAttr::DASHED) {
       g4->SetLineStyle(G4VisAttributes::dashed);
       g4->SetForceSolid(false);
       g4->SetForceWireframe(true);
@@ -758,71 +723,70 @@ void* Geant4Converter::handleVis(const string& /* name */, const TNamed* vis) co
 }
 
 /// Handle the geant 4 specific properties
-void Geant4Converter::handleProperties(LCDD::Properties& prp)   const {
-  map<string,string> processors;
+void Geant4Converter::handleProperties(LCDD::Properties& prp) const {
+  map < string, string > processors;
   static int s_idd = 9999999;
   string id;
-  for(LCDD::Properties::const_iterator i=prp.begin(); i!=prp.end(); ++i) {
+  for (LCDD::Properties::const_iterator i = prp.begin(); i != prp.end(); ++i) {
     const string& nam = (*i).first;
     const LCDD::PropertyValues& vals = (*i).second;
-    if ( nam.substr(0,6) == "geant4" ) {
+    if (nam.substr(0, 6) == "geant4") {
       LCDD::PropertyValues::const_iterator id_it = vals.find("id");
-      if ( id_it != vals.end() )  {
-	id= (*id_it).second;
+      if (id_it != vals.end()) {
+        id = (*id_it).second;
       }
       else {
-	char txt[32];
-	::sprintf(txt,"%d",++s_idd);
-	id = txt;
+        char txt[32];
+        ::sprintf(txt, "%d", ++s_idd);
+        id = txt;
       }
-      processors.insert(make_pair(id,nam));
+      processors.insert(make_pair(id, nam));
     }
   }
-  for(map<string,string>::const_iterator i=processors.begin(); i!=processors.end(); ++i) {
+  for (map<string, string>::const_iterator i = processors.begin(); i != processors.end(); ++i) {
     const Geant4Converter* ptr = this;
     string nam = (*i).second;
     const LCDD::PropertyValues& vals = prp[nam];
     string type = vals.find("type")->second;
-    string tag  = type + "_Geant4_action";
-    long result = ROOT::Reflex::PluginService::Create<long>(tag,&m_lcdd,ptr,&vals);
-    if ( 0 == result ) {
+    string tag = type + "_Geant4_action";
+    long result = ROOT::Reflex::PluginService::Create<long>(tag, &m_lcdd, ptr, &vals);
+    if (0 == result) {
       throw runtime_error("Failed to locate plugin to interprete files of type"
-			  " \""+tag+"\" - no factory:"+type);
+          " \"" + tag + "\" - no factory:" + type);
     }
-    result = *(long*)result;
-    if ( result != 1 ) {
-      throw runtime_error("Failed to invoke the plugin "+tag+" of type "+type);
+    result = *(long*) result;
+    if (result != 1) {
+      throw runtime_error("Failed to invoke the plugin " + tag + " of type " + type);
     }
-    printout(INFO, "Geant4Converter", "+++++ Executed Successfully Geant4 setup module *%s*.",type.c_str());
+    printout(INFO, "Geant4Converter", "+++++ Executed Successfully Geant4 setup module *%s*.", type.c_str());
   }
 }
 
-
 /// Convert the geometry type SensitiveDetector into the corresponding Geant4 object(s).
-void* Geant4Converter::printSensitive(const TNamed* sens_det, const set<const TGeoVolume*>& /* volumes */) const  {
-  Geant4GeometryInfo&   info = data();
-  G4VSensitiveDetector* g4   = info.g4SensDets[sens_det];
+void* Geant4Converter::printSensitive(const TNamed* sens_det, const set<const TGeoVolume*>& /* volumes */) const {
+  Geant4GeometryInfo& info = data();
+  G4VSensitiveDetector* g4 = info.g4SensDets[sens_det];
   ConstVolumeSet& volset = info.sensitives[sens_det];
-  SensitiveDetector   sd = Ref_t(sens_det);
+  SensitiveDetector sd = Ref_t(sens_det);
   stringstream str;
 
-  printout(INFO, "Geant4Converter", "++ SensitiveDetector: %-18s %-20s Hits:%-16s",
-	   sd.name(), ("["+sd.type()+"]").c_str(),sd.hitsCollection().c_str());
-  str << "                    | "
-      << "Cutoff:" << setw(6) << left << sd.energyCutoff()
-      << setw(5) << right << volset.size() << " volumes ";
-  if ( sd.region().isValid() ) str << " Region:" << setw(12) << left << sd.region().name();
-  if ( sd.limits().isValid() ) str << " Limits:" << setw(12) << left << sd.limits().name();
+  printout(INFO, "Geant4Converter", "++ SensitiveDetector: %-18s %-20s Hits:%-16s", sd.name(), ("[" + sd.type() + "]").c_str(),
+      sd.hitsCollection().c_str());
+  str << "                    | " << "Cutoff:" << setw(6) << left << sd.energyCutoff() << setw(5) << right << volset.size()
+      << " volumes ";
+  if (sd.region().isValid())
+    str << " Region:" << setw(12) << left << sd.region().name();
+  if (sd.limits().isValid())
+    str << " Limits:" << setw(12) << left << sd.limits().name();
   str << ".";
   printout(INFO, "Geant4Converter", str.str().c_str());
 
-  for(ConstVolumeSet::iterator i=volset.begin(); i!=volset.end();++i)    {
+  for (ConstVolumeSet::iterator i = volset.begin(); i != volset.end(); ++i) {
     map<const TGeoVolume*, G4LogicalVolume*>::iterator v = info.g4Volumes.find(*i);
     G4LogicalVolume* vol = (*v).second;
     str.str("");
-    str << "                                   | "
-	<< "Volume:" << setw(24) << left << vol->GetName() 
-	<< " " << vol->GetNoDaughters() << " daughters.";
+    str << "                                   | " << "Volume:" << setw(24) << left << vol->GetName() << " "
+        << vol->GetNoDaughters() << " daughters.";
     printout(INFO, "Geant4Converter", str.str().c_str());
   }
   return g4;
@@ -830,66 +794,62 @@ void* Geant4Converter::printSensitive(const TNamed* sens_det, const set<const TG
 
 string printSolid(G4VSolid* sol) {
   stringstream str;
-  if ( typeid(*sol) == typeid(G4Box) ) {
-    const G4Box* b = (G4Box*)sol;
+  if (typeid(*sol) == typeid(G4Box)) {
+    const G4Box* b = (G4Box*) sol;
     str << "++ Box: x=" << b->GetXHalfLength() << " y=" << b->GetYHalfLength() << " z=" << b->GetZHalfLength();
   }
-  else if ( typeid(*sol) == typeid(G4Tubs) ) {
-    const G4Tubs* t = (const G4Tubs*)sol;
-    str << " Tubs: Ri=" << t->GetInnerRadius() << " Ra=" << t->GetOuterRadius() 
-	<< " z/2=" << t->GetZHalfLength() << " Phi=" << t->GetStartPhiAngle() 
-	<< "..." << t->GetDeltaPhiAngle ();
+  else if (typeid(*sol) == typeid(G4Tubs)) {
+    const G4Tubs* t = (const G4Tubs*) sol;
+    str << " Tubs: Ri=" << t->GetInnerRadius() << " Ra=" << t->GetOuterRadius() << " z/2=" << t->GetZHalfLength() << " Phi="
+        << t->GetStartPhiAngle() << "..." << t->GetDeltaPhiAngle();
   }
   return str.str();
 }
 
 /// Print G4 placement
 void* Geant4Converter::printPlacement(const string& name, const TGeoNode* node) const {
-  Geant4GeometryInfo&  info = data();  
+  Geant4GeometryInfo& info = data();
   G4VPhysicalVolume* g4 = info.g4Placements[node];
-  G4LogicalVolume*  vol = info.g4Volumes[node->GetVolume()];
-  G4LogicalVolume*  mot = info.g4Volumes[node->GetMotherVolume()];
-  G4VSolid*         sol = vol->GetSolid();
-  G4ThreeVector      tr = g4->GetObjectTranslation();
-  
+  G4LogicalVolume* vol = info.g4Volumes[node->GetVolume()];
+  G4LogicalVolume* mot = info.g4Volumes[node->GetMotherVolume()];
+  G4VSolid* sol = vol->GetSolid();
+  G4ThreeVector tr = g4->GetObjectTranslation();
+
   G4VSensitiveDetector* sd = vol->GetSensitiveDetector();
-  if ( !sd ) return g4;
+  if (!sd)
+    return g4;
 
   stringstream str;
-  str << "G4Cnv::placement: + " << name << " No:" << node->GetNumber()
-      << " Vol:" << vol->GetName() << " Solid:" << sol->GetName();
-  printout(DEBUG,"G4Placement",str.str().c_str());
+  str << "G4Cnv::placement: + " << name << " No:" << node->GetNumber() << " Vol:" << vol->GetName() << " Solid:"
+      << sol->GetName();
+  printout(DEBUG, "G4Placement", str.str().c_str());
   str.str("");
-  str << "                  |" 
-      << " Loc: x=" << tr.x() << " y=" << tr.y() << " z=" << tr.z();
-  printout(DEBUG,"G4Placement",str.str().c_str());
-  printout(DEBUG,"G4Placement",printSolid(sol).c_str());
+  str << "                  |" << " Loc: x=" << tr.x() << " y=" << tr.y() << " z=" << tr.z();
+  printout(DEBUG, "G4Placement", str.str().c_str());
+  printout(DEBUG, "G4Placement", printSolid(sol).c_str());
   str.str("");
-  str << "                  |" 
-      << " Ndau:" << vol->GetNoDaughters() << " physvols." 
-      << " Mat:" << vol->GetMaterial()->GetName()
-      << " Mother:" << (char*)(mot ? mot->GetName().c_str() : "---");
-  printout(DEBUG,"G4Placement",str.str().c_str());
+  str << "                  |" << " Ndau:" << vol->GetNoDaughters() << " physvols." << " Mat:" << vol->GetMaterial()->GetName()
+      << " Mother:" << (char*) (mot ? mot->GetName().c_str() : "---");
+  printout(DEBUG, "G4Placement", str.str().c_str());
   str.str("");
-  str << "                  |" 
-      << " SD:" << (char*)(sd ? sd->GetName().c_str() : "---");
-  printout(DEBUG,"G4Placement",str.str().c_str());
+  str << "                  |" << " SD:" << (char*) (sd ? sd->GetName().c_str() : "---");
+  printout(DEBUG, "G4Placement", str.str().c_str());
   return g4;
 }
 
-template <typename O, typename C, typename F> void handle(const O* o, const C& c, F pmf)  {
-  for(typename C::const_iterator i=c.begin(); i != c.end(); ++i) {
-    (o->*pmf)((*i)->GetName(),*i);
+template <typename O, typename C, typename F> void handle(const O* o, const C& c, F pmf) {
+  for (typename C::const_iterator i = c.begin(); i != c.end(); ++i) {
+    (o->*pmf)((*i)->GetName(), *i);
   }
 }
 
-template <typename O, typename C, typename F> void handleMap(const O* o, const C& c, F pmf)  {
-  for(typename C::const_iterator i=c.begin(); i != c.end(); ++i)
+template <typename O, typename C, typename F> void handleMap(const O* o, const C& c, F pmf) {
+  for (typename C::const_iterator i = c.begin(); i != c.end(); ++i)
     (o->*pmf)((*i).first, (*i).second);
 }
 
-template <typename O, typename C, typename F> void handleRMap(const O* o, const C& c, F pmf)  {
-  for(typename C::const_reverse_iterator i=c.rbegin(); i != c.rend(); ++i)
+template <typename O, typename C, typename F> void handleRMap(const O* o, const C& c, F pmf) {
+  for (typename C::const_reverse_iterator i = c.rbegin(); i != c.rend(); ++i)
     handle(o, (*i).second, pmf);
 }
 
@@ -905,23 +865,23 @@ Geant4Converter& Geant4Converter::create(DetElement top) {
   // All positions and the like are not really named.
   // Hence, start creating the G4 objects for materials, solids and log volumes.
   Material mat = m_lcdd.material("Argon");
-  handleMaterial(mat.name(),mat.ptr());
+  handleMaterial(mat.name(), mat.ptr());
   mat = m_lcdd.material("Silicon");
-  handleMaterial(mat.name(),mat.ptr());
+  handleMaterial(mat.name(), mat.ptr());
 
-  handle(this, geo.volumes,   &Geant4Converter::collectVolume);
-  handle(this, geo.solids,    &Geant4Converter::handleSolid);
-  printout(INFO,"Geant4Converter","++ Handled %ld solids.",geo.solids.size());
-  handle(this, geo.vis,       &Geant4Converter::handleVis);
-  printout(INFO,"Geant4Converter","++ Handled %ld visualization attributes.",geo.vis.size());
+  handle(this, geo.volumes, &Geant4Converter::collectVolume);
+  handle(this, geo.solids, &Geant4Converter::handleSolid);
+  printout(INFO, "Geant4Converter", "++ Handled %ld solids.", geo.solids.size());
+  handle(this, geo.vis, &Geant4Converter::handleVis);
+  printout(INFO, "Geant4Converter", "++ Handled %ld visualization attributes.", geo.vis.size());
   handleMap(this, geo.sensitives, &Geant4Converter::handleSensitive);
-  printout(INFO,"Geant4Converter","++ Handled %ld sensitive detectors.",geo.sensitives.size());
+  printout(INFO, "Geant4Converter", "++ Handled %ld sensitive detectors.", geo.sensitives.size());
   handleMap(this, geo.limits, &Geant4Converter::handleLimitSet);
-  printout(INFO,"Geant4Converter","++ Handled %ld limit sets.",geo.limits.size());
+  printout(INFO, "Geant4Converter", "++ Handled %ld limit sets.", geo.limits.size());
   handleMap(this, geo.regions, &Geant4Converter::handleRegion);
-  printout(INFO,"Geant4Converter","++ Handled %ld regions.",geo.regions.size());
-  handle(this, geo.volumes,   &Geant4Converter::handleVolume);
-  printout(INFO,"Geant4Converter","++ Handled %ld volumes.",geo.volumes.size());
+  printout(INFO, "Geant4Converter", "++ Handled %ld regions.", geo.regions.size());
+  handle(this, geo.volumes, &Geant4Converter::handleVolume);
+  printout(INFO, "Geant4Converter", "++ Handled %ld volumes.", geo.volumes.size());
   // Now place all this stuff appropriately
   handleRMap(this, *m_data, &Geant4Converter::handlePlacement);
   //==================== Fields
diff --git a/DDG4/src/Geant4Data.cpp b/DDG4/src/Geant4Data.cpp
index 3eee1e47931ca225daf2743b9f010ff29540dc15..e20c0a2b22cd82b421cb5e1c9866ea23d970b91e 100644
--- a/DDG4/src/Geant4Data.cpp
+++ b/DDG4/src/Geant4Data.cpp
@@ -19,83 +19,113 @@ using namespace std;
 using namespace DD4hep;
 using namespace DD4hep::Simulation;
 
+/// Default constructor
+SimpleRun::SimpleRun()
+    : runID(-1), numEvents(0) {
+  InstanceCount::increment(this);
+}
+
+/// Default destructor
+SimpleRun::~SimpleRun() {
+  InstanceCount::decrement(this);
+}
+
+/// Default constructor
+SimpleEvent::SimpleEvent()
+    : runID(-1), eventID(-1) {
+  InstanceCount::increment(this);
+}
+
+/// Default destructor
+SimpleEvent::~SimpleEvent() {
+  InstanceCount::decrement(this);
+}
+
+/// Default constructor
+SimpleHit::SimpleHit()
+    : cellID(0) {
+  InstanceCount::increment(this);
+}
 
 /// Default destructor
-SimpleHit::~SimpleHit()  {
+SimpleHit::~SimpleHit() {
+  InstanceCount::decrement(this);
 }
-    
+
 /// Extract the MC contribution for a given hit from the step information
 SimpleHit::Contribution SimpleHit::extractContribution(G4Step* step) {
-  G4Track* trk     = step->GetTrack();
-  double energy_deposit = (trk->GetDefinition() == G4OpticalPhoton::OpticalPhotonDefinition())
-    ? trk->GetTotalEnergy() : step->GetTotalEnergyDeposit();
-  Contribution  contrib(trk->GetTrackID(),
-			trk->GetDefinition()->GetPDGEncoding(),
-			energy_deposit,
-			trk->GetGlobalTime());
+  G4Track* trk = step->GetTrack();
+  double energy_deposit =
+      (trk->GetDefinition() == G4OpticalPhoton::OpticalPhotonDefinition()) ?
+          trk->GetTotalEnergy() : step->GetTotalEnergyDeposit();
+  Contribution contrib(trk->GetTrackID(), trk->GetDefinition()->GetPDGEncoding(), energy_deposit, trk->GetGlobalTime());
   return contrib;
 }
 
 /// Default constructor
-SimpleTracker::Hit::Hit() : SimpleHit(), position(), momentum(), length(0.0), truth()
-{
+SimpleTracker::Hit::Hit()
+    : SimpleHit(), position(), momentum(), length(0.0), truth() {
   InstanceCount::increment(this);
 }
 
 /// Standard initializing constructor
 SimpleTracker::Hit::Hit(int track_id, int pdg_id, double deposit, double time_stamp)
-  : SimpleHit(), position(), momentum(), length(0.0), truth(track_id, pdg_id, deposit, time_stamp)
-{
+    : SimpleHit(), position(), momentum(), length(0.0), truth(track_id, pdg_id, deposit, time_stamp) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-SimpleTracker::Hit::~Hit()   {
+SimpleTracker::Hit::~Hit() {
   InstanceCount::decrement(this);
 }
 
 /// Assignment operator
-SimpleTracker::Hit& SimpleTracker::Hit::operator=(const Hit& c)   {
+SimpleTracker::Hit& SimpleTracker::Hit::operator=(const Hit& c) {
   position = c.position;
   momentum = c.momentum;
-  length   = c.length;
-  truth    = c.truth;
+  length = c.length;
+  truth = c.truth;
   return *this;
 }
 
 /// Clear hit content
-SimpleTracker::Hit& SimpleTracker::Hit::clear()  {
-  position.SetXYZ(0,0,0);
-  momentum.SetXYZ(0,0,0);
+SimpleTracker::Hit& SimpleTracker::Hit::clear() {
+  position.SetXYZ(0, 0, 0);
+  momentum.SetXYZ(0, 0, 0);
   length = 0.0;
   truth.clear();
   return *this;
 }
 
 /// Store Geant4 point and step information into tracker hit structure.
-SimpleTracker::Hit& SimpleTracker::Hit::storePoint(G4Step* step, G4StepPoint* pnt)  {
-  G4Track*      trk = step->GetTrack();
+SimpleTracker::Hit& SimpleTracker::Hit::storePoint(G4Step* step, G4StepPoint* pnt) {
+  G4Track* trk = step->GetTrack();
   G4ThreeVector pos = pnt->GetPosition();
   G4ThreeVector mom = pnt->GetMomentum();
 
   truth.trackID = trk->GetTrackID();
-  truth.pdgID   = trk->GetDefinition()->GetPDGEncoding();
+  truth.pdgID = trk->GetDefinition()->GetPDGEncoding();
   truth.deposit = step->GetTotalEnergyDeposit();
-  truth.time    = trk->GetGlobalTime();
-  position.SetXYZ(pos.x(),pos.y(),pos.z());
-  momentum.SetXYZ(mom.x(),mom.y(),mom.z());
+  truth.time = trk->GetGlobalTime();
+  position.SetXYZ(pos.x(), pos.y(), pos.z());
+  momentum.SetXYZ(mom.x(), mom.y(), mom.z());
   length = 0;
   return *this;
 }
 
+/// Default constructor (for ROOT)
+SimpleCalorimeter::Hit::Hit()
+    : SimpleHit(), position(), truth(), energyDeposit(0) {
+  InstanceCount::increment(this);
+}
+
 /// Standard constructor
 SimpleCalorimeter::Hit::Hit(const Position& pos)
-  : SimpleHit(), position(pos), truth(), energyDeposit(0)
-{
+    : SimpleHit(), position(pos), truth(), energyDeposit(0) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-SimpleCalorimeter::Hit::~Hit()  {
+SimpleCalorimeter::Hit::~Hit() {
   InstanceCount::decrement(this);
 }
diff --git a/DDG4/src/Geant4DataConversion.cpp b/DDG4/src/Geant4DataConversion.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..99e68301c8af98ad88a562952921ed8745e9e42a
--- /dev/null
+++ b/DDG4/src/Geant4DataConversion.cpp
@@ -0,0 +1,28 @@
+// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+
+// Framework include files
+#include "DDG4/Geant4DataConversion.h"
+
+using namespace DD4hep::Simulation;
+
+/// Default constructor
+Geant4ConversionHelper::Geant4ConversionHelper() {
+}
+
+/// Default destructor
+Geant4ConversionHelper::~Geant4ConversionHelper() {
+}
+
+std::string Geant4ConversionHelper::encoding(Geometry::VolumeManager vm, Geometry::VolumeManager::VolumeID vid) {
+  Geometry::PlacedVolume pv = vm.lookupPlacement(vid);
+  Geometry::SensitiveDetector sd = pv.volume().sensitiveDetector();
+  Geometry::IDDescriptor id = sd.readout().idSpec();
+  return id.fieldDescription();
+}
diff --git a/DDG4/src/Geant4DetectorConstruction.cpp b/DDG4/src/Geant4DetectorConstruction.cpp
index b8945e6667e563ea5001eb87f002b74a6ff7c372..2ffb9f86b6ecd01bc317f21131b2d419a7b50cb3 100644
--- a/DDG4/src/Geant4DetectorConstruction.cpp
+++ b/DDG4/src/Geant4DetectorConstruction.cpp
@@ -14,23 +14,21 @@ using namespace std;
 using namespace DD4hep;
 using namespace DD4hep::Geometry;
 
-
 DD4hep::Simulation::Geant4DetectorConstruction::Geant4DetectorConstruction(Geometry::LCDD& lcdd)
-: m_lcdd(lcdd), m_world(0)
-{
+    : m_lcdd(lcdd), m_world(0) {
 }
 
 G4VPhysicalVolume* DD4hep::Simulation::Geant4DetectorConstruction::Construct() {
   typedef Simulation::Geant4Converter Geant4Converter;
-  TGeoNode*       top   = gGeoManager->GetTopNode();
-  Geant4Mapping&  g4map = Geant4Mapping::instance();
-  DetElement      world = m_lcdd.world();
+  TGeoNode* top = gGeoManager->GetTopNode();
+  Geant4Mapping& g4map = Geant4Mapping::instance();
+  DetElement world = m_lcdd.world();
   Geant4Converter conv(m_lcdd);
   Geant4GeometryInfo* info = conv.create(world).detach();
   g4map.attach(info);
   Geant4VolumeManager mgr = g4map.volumeManager();
   m_world = mgr.placement(top);
-  m_lcdd.apply("DD4hepVolumeManager",0,0);
+  m_lcdd.apply("DD4hepVolumeManager", 0, 0);
   //Geant4HierarchyDump dmp(m_lcdd);
   //dmp.dump("",m_world);
 #ifdef GEANT4_HAS_GDML
diff --git a/DDG4/src/Geant4EventAction.cpp b/DDG4/src/Geant4EventAction.cpp
index 3579bf25a8395591ba8d19e9da41a1b6a0870359..d5897a9fdd63eab562a9d10f202579b453a7a431 100644
--- a/DDG4/src/Geant4EventAction.cpp
+++ b/DDG4/src/Geant4EventAction.cpp
@@ -17,33 +17,32 @@ using namespace DD4hep::Simulation;
 
 /// Standard constructor
 Geant4EventAction::Geant4EventAction(Geant4Context* context, const std::string& nam)
-: Geant4Action(context,nam)  
-{
+    : Geant4Action(context, nam) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4EventAction::~Geant4EventAction()  {
+Geant4EventAction::~Geant4EventAction() {
   InstanceCount::decrement(this);
 }
 
 /// begin-of-event callback
-void Geant4EventAction::begin(const G4Event* )  {
+void Geant4EventAction::begin(const G4Event*) {
 }
 
 /// End-of-event callback
-void Geant4EventAction::end(const G4Event* )  {
+void Geant4EventAction::end(const G4Event*) {
 }
 
 /// Standard constructor
 Geant4EventActionSequence::Geant4EventActionSequence(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)
-{
+    : Geant4Action(context, name) {
+  m_needsControl = true;
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4EventActionSequence::~Geant4EventActionSequence()  {
+Geant4EventActionSequence::~Geant4EventActionSequence() {
   m_actors(&Geant4Action::release);
   m_actors.clear();
   m_begin.clear();
@@ -52,8 +51,8 @@ Geant4EventActionSequence::~Geant4EventActionSequence()  {
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4EventActionSequence::adopt(Geant4EventAction* action)  {
-  if ( action )  {
+void Geant4EventActionSequence::adopt(Geant4EventAction* action) {
+  if (action) {
     action->addRef();
     m_actors.add(action);
     return;
@@ -62,13 +61,13 @@ void Geant4EventActionSequence::adopt(Geant4EventAction* action)  {
 }
 
 /// Pre-track action callback
-void  Geant4EventActionSequence::begin(const G4Event* event)  { 
-  m_actors(&Geant4EventAction::begin,event);
+void Geant4EventActionSequence::begin(const G4Event* event) {
+  m_actors(&Geant4EventAction::begin, event);
   m_begin(event);
 }
 
 /// Post-track action callback
-void  Geant4EventActionSequence::end(const G4Event* event) { 
+void Geant4EventActionSequence::end(const G4Event* event) {
   m_end(event);
-  m_actors(&Geant4EventAction::end,event);
+  m_actors(&Geant4EventAction::end, event);
 }
diff --git a/DDG4/src/Geant4Exec.cpp b/DDG4/src/Geant4Exec.cpp
index ae9ac3edd7ee0df1114a9dbec04c9485a0a0d12c..d388b7b136a529691635cf7cf5754ec1b309a848 100644
--- a/DDG4/src/Geant4Exec.cpp
+++ b/DDG4/src/Geant4Exec.cpp
@@ -19,7 +19,6 @@
 #include "G4VUserPhysicsList.hh"
 #include "G4VModularPhysicsList.hh"
 #include "G4VUserPrimaryGeneratorAction.hh"
-#include "G4VSensitiveDetector.hh"
 
 #include "DD4hep/Handle.h"
 #include "DDG4/Geant4RunAction.h"
@@ -29,8 +28,6 @@
 #include "DDG4/Geant4StackingAction.h"
 #include "DDG4/Geant4GeneratorAction.h"
 #include "DDG4/Geant4PhysicsList.h"
-#include "DDG4/Geant4SensDetAction.h"
-#include "DDG4/Geant4HitCollection.h"
 #include "DDG4/Geant4Kernel.h"
 
 #include <memory>
@@ -42,45 +39,58 @@ namespace DD4hep {
   /*
    *   Simulation namespace declaration
    */
-  namespace Simulation   {
-
-    template <typename T> struct _Seq  {
-      typedef _Seq<T> Base;
-      T* m_sequence;
-      _Seq() : m_sequence(0) {                 }
-      _Seq(T* seq)           {   _aquire(seq); }
-      virtual ~_Seq()        { _release();     }
-      void _aquire(T* s)  {
-	InstanceCount::increment(this);
-	m_sequence = s;
-	m_sequence->addRef();
-      }
-      void _release()  {
-	releasePtr(m_sequence);
-	InstanceCount::decrement(this);
-      }
-    };
-
+  namespace Simulation {
+    namespace {
+      template <typename T> struct _Seq {
+        typedef _Seq<T> Base;
+        T* m_sequence;
+        _Seq()
+            : m_sequence(0) {
+        }
+        _Seq(T* seq) {
+          _aquire(seq);
+        }
+        virtual ~_Seq() {
+          _release();
+        }
+        void _aquire(T* s) {
+          InstanceCount::increment(this);
+          m_sequence = s;
+          m_sequence->addRef();
+        }
+        void _release() {
+          releasePtr(m_sequence);
+          InstanceCount::decrement(this);
+        }
+      };
+    }
     /** @class Geant4UserRunAction
-     * 
+     *
      * Concrete implementation of the Geant4 run action
      *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4UserRunAction : public G4UserRunAction, public _Seq<Geant4RunActionSequence>    {
+    struct Geant4UserRunAction : public G4UserRunAction, public _Seq<Geant4RunActionSequence> {
       /// Standard constructor
-      Geant4UserRunAction(Geant4RunActionSequence* seq) : Base(seq)  {                    }
+      Geant4UserRunAction(Geant4RunActionSequence* seq)
+          : Base(seq) {
+      }
       /// Default destructor
-      virtual ~Geant4UserRunAction()                           {                          }
+      virtual ~Geant4UserRunAction() {
+      }
       /// begin-of-run callback
-      virtual void  BeginOfRunAction(const G4Run* run)         { m_sequence->begin(run);  }
+      virtual void BeginOfRunAction(const G4Run* run) {
+        m_sequence->begin(run);
+      }
       /// End-of-run callback
-      virtual void  EndOfRunAction(const G4Run* run)           { m_sequence->end(run);    }
+      virtual void EndOfRunAction(const G4Run* run) {
+        m_sequence->end(run);
+      }
     };
 
     /** @class Geant4UserEventAction
-     * 
+     *
      * Concrete implementation of the Geant4 event action
      *
      * @author  M.Frank
@@ -88,192 +98,122 @@ namespace DD4hep {
      */
     struct Geant4UserEventAction : public G4UserEventAction, public _Seq<Geant4EventActionSequence> {
       /// Standard constructor
-      Geant4UserEventAction(Geant4EventActionSequence* seq) : Base(seq) {                 }
+      Geant4UserEventAction(Geant4EventActionSequence* seq)
+          : Base(seq) {
+      }
       /// Default destructor
-      virtual ~Geant4UserEventAction()                         {                          }
+      virtual ~Geant4UserEventAction() {
+      }
       /// begin-of-event callback
-      virtual void  BeginOfEventAction(const G4Event* evt)     { m_sequence->begin(evt);  }
+      virtual void BeginOfEventAction(const G4Event* evt) {
+        m_sequence->begin(evt);
+      }
       /// End-of-event callback
-      virtual void  EndOfEventAction(const G4Event* evt)       { m_sequence->end(evt);    }
+      virtual void EndOfEventAction(const G4Event* evt) {
+        m_sequence->end(evt);
+      }
     };
 
     /** @class Geant4UserTrackingAction
-     * 
+     *
      * Concrete implementation of the Geant4 tracking action
      *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4UserTrackingAction : public G4UserTrackingAction, public _Seq<Geant4TrackingActionSequence>  {
+    struct Geant4UserTrackingAction : public G4UserTrackingAction, public _Seq<Geant4TrackingActionSequence> {
       /// Standard constructor
-      Geant4UserTrackingAction(Geant4TrackingActionSequence* seq) : Base(seq)   {         }
+      Geant4UserTrackingAction(Geant4TrackingActionSequence* seq)
+          : Base(seq) {
+      }
       /// Default destructor
-      virtual ~Geant4UserTrackingAction()                      {                          }
+      virtual ~Geant4UserTrackingAction() {
+      }
       /// Pre-track action callback
-      virtual void  PreUserTrackingAction(const G4Track* trk)  { m_sequence->begin(trk);  }
+      virtual void PreUserTrackingAction(const G4Track* trk) {
+        m_sequence->begin(trk);
+      }
       /// Post-track action callback
-      virtual void  PostUserTrackingAction(const G4Track* trk) { m_sequence->end(trk);    }
+      virtual void PostUserTrackingAction(const G4Track* trk) {
+        m_sequence->end(trk);
+      }
     };
 
     /** @class Geant4UserStackingAction
-     * 
+     *
      * Concrete implementation of the Geant4 stacking action sequence
      *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4UserStackingAction : public G4UserStackingAction, public _Seq<Geant4StackingActionSequence>  {
+    struct Geant4UserStackingAction : public G4UserStackingAction, public _Seq<Geant4StackingActionSequence> {
       /// Standard constructor
-      Geant4UserStackingAction(Geant4StackingActionSequence* seq) : Base(seq)   {         }
+      Geant4UserStackingAction(Geant4StackingActionSequence* seq)
+          : Base(seq) {
+      }
       /// Default destructor
-      virtual ~Geant4UserStackingAction()                      {                          }
+      virtual ~Geant4UserStackingAction() {
+      }
       /// New-stage callback
-      virtual void  NewStage()                                 { m_sequence->newStage();  }
+      virtual void NewStage() {
+        m_sequence->newStage();
+      }
       /// Preparation callback
-      virtual void  PrepareNewEvent()                          { m_sequence->prepare();   }
+      virtual void PrepareNewEvent() {
+        m_sequence->prepare();
+      }
     };
 
     /** @class Geant4UserGeneratorAction
-     * 
+     *
      * Concrete implementation of the Geant4 generator action
      *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4UserGeneratorAction : public G4VUserPrimaryGeneratorAction, public _Seq<Geant4GeneratorActionSequence>    {
+    struct Geant4UserGeneratorAction : public G4VUserPrimaryGeneratorAction, public _Seq<Geant4GeneratorActionSequence> {
       /// Standard constructor
       Geant4UserGeneratorAction(Geant4GeneratorActionSequence* seq)
-	: G4VUserPrimaryGeneratorAction(), Base(seq)           {                         }
+          : G4VUserPrimaryGeneratorAction(), Base(seq) {
+      }
       /// Default destructor
-      virtual ~Geant4UserGeneratorAction()                     {                         }
+      virtual ~Geant4UserGeneratorAction() {
+      }
       /// Generate primary particles
-      virtual void GeneratePrimaries(G4Event* event)           { (*m_sequence)(event);   }
+      virtual void GeneratePrimaries(G4Event* event) {
+        (*m_sequence)(event);
+      }
     };
 
     /** @class Geant4UserSteppingAction
-     * 
-     * Concrete implementation of the Geant4 stepping action
      *
-     * @author  M.Frank
-     * @version 1.0
-     */
-    struct Geant4UserSteppingAction : public G4UserSteppingAction, public _Seq<Geant4SteppingActionSequence>  {
-      /// Standard constructor
-      Geant4UserSteppingAction(Geant4SteppingActionSequence* seq) : Base(seq)   {        }
-      /// Default destructor
-      virtual ~Geant4UserSteppingAction()                      {                         }
-      /// User stepping callback
-      virtual void UserSteppingAction(const G4Step* s) { (*m_sequence)(s,fpSteppingManager); }
-    };
-
-    /** @class Geant4UserPhysicsList
-     * 
-     * Concrete implementation of the Geant4 user physics list
+     * Concrete implementation of the Geant4 stepping action
      *
      * @author  M.Frank
      * @version 1.0
      */
-    struct Geant4UserPhysicsList : virtual public G4VModularPhysicsList,
-				   virtual public Geant4UserPhysics,
-				   virtual public _Seq<Geant4PhysicsListActionSequence>
-    {
+    struct Geant4UserSteppingAction : public G4UserSteppingAction, public _Seq<Geant4SteppingActionSequence> {
       /// Standard constructor
-      Geant4UserPhysicsList(Geant4PhysicsListActionSequence* seq)
-	: G4VModularPhysicsList(), Geant4UserPhysics(), Base(seq)   {                          }
+      Geant4UserSteppingAction(Geant4SteppingActionSequence* seq)
+          : Base(seq) {
+      }
       /// Default destructor
-      virtual ~Geant4UserPhysicsList()   {                                                  }
-      /// User construction callback
-      virtual void ConstructProcess()    {  m_sequence->constructProcess(this);             }
-      /// User construction callback
-      virtual void ConstructParticle()   {  m_sequence->constructParticles(this);            }
-      /// Enable transportation
-      virtual void AddTransportation()   {  this->G4VUserPhysicsList::AddTransportation();  }
-      // Register Physics Constructor 
-      virtual void RegisterPhysics(G4VPhysicsConstructor* physics)
-      { this->G4VModularPhysicsList::RegisterPhysics(physics);   }
-    };
-
-    struct Geant4SensDet : virtual public G4VSensitiveDetector, 
-			   virtual public G4VSDFilter,
-			   virtual public Geant4ActionSD,
-			   virtual public _Seq<Geant4SensDetActionSequence>
-    {
-      /// Constructor. The detector element is identified by the name
-      Geant4SensDet(const std::string& nam, Geometry::LCDD& lcdd)
-	: G4VSensitiveDetector(nam), G4VSDFilter(nam), 
-	  Geant4Action(0,nam), Geant4ActionSD(nam), Base()
-      {
-	Geant4Kernel& kernel = Geant4Kernel::access(lcdd);
-	setContext(kernel.context());
-	_aquire(kernel.sensitiveAction(nam));
-	m_sequence->defineCollections(this);
-	this->G4VSensitiveDetector::SetFilter(this);
+      virtual ~Geant4UserSteppingAction() {
       }
-
-      /// Destructor
-      virtual ~Geant4SensDet()        {                                 }
-      /// Overload to avoid ambiguity between G4VSensitiveDetector and G4VSDFilter
-      inline G4String GetName() const
-      {  return this->G4VSensitiveDetector::SensitiveDetectorName;      }
-      /// G4VSensitiveDetector internals: Access to the detector path name
-      virtual std::string path()  const
-      {  return this->G4VSensitiveDetector::GetPathName();              }
-      /// G4VSensitiveDetector internals: Access to the detector path name
-      virtual std::string fullPath()  const
-      {  return this->G4VSensitiveDetector::GetFullPathName();          }
-      /// Is the detector active?
-      virtual bool isActive() const
-      {  return this->G4VSensitiveDetector::isActive();                 }
-      /// This is a utility method which returns the hits collection ID 
-      virtual G4int GetCollectionID(G4int i)
-      {  return this->G4VSensitiveDetector::GetCollectionID(i);         }
-      /// Access to the readout geometry of the sensitive detector
-      virtual G4VReadOutGeometry* readoutGeometry() const
-      {  return this->G4VSensitiveDetector::GetROgeometry();            }
-      /// Callback if the sequence should be accepted or filtered off
-      virtual G4bool Accept(const G4Step* step) const
-      {  return m_sequence->accept(step);                               }
-      /// Method invoked at the begining of each event. 
-      virtual void Initialize(G4HCofThisEvent* hce)
-      {  m_sequence->begin(hce);                                        }
-      /// Method invoked at the end of each event. 
-      virtual void EndOfEvent(G4HCofThisEvent* hce)
-      {  m_sequence->end(hce);                                          }
-      /// Method for generating hit(s) using the information of G4Step object.
-      virtual G4bool ProcessHits(G4Step* step,G4TouchableHistory* hist)
-      {  return m_sequence->process(step,hist);                         }
-      /// G4VSensitiveDetector interface: Method invoked if the event was aborted.
-      virtual void clear()
-      {  m_sequence->clear();                                           }
-      /// Initialize the usage of a hit collection. Returns the collection identifier
-      virtual size_t defineCollection(const std::string& coll)  {
-	if ( coll.empty() ) {
-	  except("Geant4Sensitive: No collection defined for %s [Invalid name]",c_name());
-	}
-	collectionName.push_back(coll);
-	return collectionName.size()-1;
+      /// User stepping callback
+      virtual void UserSteppingAction(const G4Step* s) {
+        (*m_sequence)(s, fpSteppingManager);
       }
-
     };
-  }    // End namespace Simulation
-}      // End namespace DD4hep
-
-
-#include "DDG4/Factories.h"
-
-typedef DD4hep::Simulation::Geant4SensDet Geant4SensDet;
-typedef DD4hep::Simulation::Geant4SensDet Geant4tracker;
-typedef DD4hep::Simulation::Geant4SensDet Geant4calorimeter;
-
-DECLARE_GEANT4SENSITIVEDETECTOR(Geant4SensDet)
-DECLARE_GEANT4SENSITIVEDETECTOR(Geant4tracker)
-DECLARE_GEANT4SENSITIVEDETECTOR(Geant4calorimeter)
 
+  }
+}
 
 #include "DD4hep/LCDD.h"
+#include "DD4hep/Plugins.h"
 #include "DDG4/Geant4DetectorConstruction.h"
-
-#include "QGSP_BERT.hh"
+#include "DDG4/Geant4UserPhysicsList.h"
+#include "DDG4/Geant4Kernel.h"
 
 using namespace std;
 using namespace DD4hep;
@@ -294,9 +234,8 @@ using namespace DD4hep::Simulation;
 #include "G4VisExecutive.hh"
 #include "G4UIExecutive.hh"
 
-
 /// Configure the simulation
-int Geant4Exec::configure(Geant4Kernel& kernel)   {
+int Geant4Exec::configure(Geant4Kernel& kernel) {
   CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
   Geometry::LCDD& lcdd = kernel.lcdd();
 
@@ -304,7 +243,7 @@ int Geant4Exec::configure(Geant4Kernel& kernel)   {
   G4RunManager& runManager = kernel.runManager();
 
   // Check if the geometry was loaded
-  if ( lcdd.detectors().size() <= 2 )  {
+  if (lcdd.detectors().size() <= 2) {
     cout << "Error, no geometry." << endl;
   }
   // Get the detector constructed
@@ -312,36 +251,44 @@ int Geant4Exec::configure(Geant4Kernel& kernel)   {
 
   runManager.SetUserInitialization(detector);
   G4VUserPhysicsList* physics = 0;
-  if ( kernel.physicsList(false) )
-    physics = new Geant4UserPhysicsList(kernel.physicsList(false));
-  else  {
-    printout(INFO,"Geant4Exec","+++ Using Geant4 physics constructor QGSP_BERT");
-    physics = new QGSP_BERT(); // physics from N04
+  Geant4PhysicsListActionSequence* seq = kernel.physicsList(false);
+  if (seq) {
+    string nam = kernel.physicsList().properties()["extends"].value<string>();
+    if (nam.empty())
+      nam = "EmptyPhysics";
+    physics = PluginService::Create<G4VUserPhysicsList*>(nam, seq, int(1));
+  }
+  else {
+    printout(INFO, "Geant4Exec", "+++ Using Geant4 physics constructor QGSP_BERT");
+    physics = PluginService::Create<G4VUserPhysicsList*>(string("QGSP_BERT"), seq, int(1));
+  }
+  if (0 == physics) {
+    throw runtime_error("Panic! No valid user physics list present!");
   }
   runManager.SetUserInitialization(physics);
-  
+
   // Set user generator action sequence
-  if ( kernel.generatorAction(false) )  {
+  if (kernel.generatorAction(false)) {
     Geant4UserGeneratorAction* action = new Geant4UserGeneratorAction(kernel.generatorAction(false));
     runManager.SetUserAction(action);
   }
   // Set the run action sequence
-  if ( kernel.runAction(false) )  {
+  if (kernel.runAction(false)) {
     Geant4UserRunAction* action = new Geant4UserRunAction(kernel.runAction(false));
     runManager.SetUserAction(action);
   }
   // Set the event action sequence
-  if ( kernel.eventAction(false) )  {
+  if (kernel.eventAction(false)) {
     Geant4UserEventAction* action = new Geant4UserEventAction(kernel.eventAction(false));
     runManager.SetUserAction(action);
   }
   // Set the stepping action sequence
-  if ( kernel.steppingAction(false) )  {
+  if (kernel.steppingAction(false)) {
     Geant4UserSteppingAction* action = new Geant4UserSteppingAction(kernel.steppingAction(false));
     runManager.SetUserAction(action);
   }
   // Set the stacking action sequence
-  if ( kernel.stackingAction(false) )  {
+  if (kernel.stackingAction(false)) {
     Geant4UserStackingAction* action = new Geant4UserStackingAction(kernel.stackingAction(false));
     runManager.SetUserAction(action);
   }
@@ -349,7 +296,7 @@ int Geant4Exec::configure(Geant4Kernel& kernel)   {
 }
 
 /// Initialize the simulation
-int Geant4Exec::initialize(Geant4Kernel& kernel)   {
+int Geant4Exec::initialize(Geant4Kernel& kernel) {
   // Construct the default run manager
   G4RunManager& runManager = kernel.runManager();
   //
@@ -360,13 +307,13 @@ int Geant4Exec::initialize(Geant4Kernel& kernel)   {
 }
 
 /// Run the simulation
-int Geant4Exec::run(Geant4Kernel& )   {
+int Geant4Exec::run(Geant4Kernel&) {
   bool is_visual = false;
-  string gui_setup, vis_setup, gui_type="tcsh";
+  string gui_setup, vis_setup, gui_type = "tcsh";
 
   // Initialize visualization
   G4VisManager* visManager = 0;
-  if ( is_visual )  {
+  if (is_visual) {
     visManager = new G4VisExecutive();
 #ifdef G4VIS_USE_OPENGLX
     //visManager->RegisterGraphicsSystem (new G4OpenGLImmediateX());
@@ -375,24 +322,24 @@ int Geant4Exec::run(Geant4Kernel& )   {
     visManager->Initialize();
   }
 
-  // Get the pointer to the User Interface manager  
+  // Get the pointer to the User Interface manager
   G4UImanager* UImanager = G4UImanager::GetUIpointer();
   G4String command = "/control/execute run.mac";
   cout << "++++++++++++++++++++++++++++ executing command:" << command << endl;
   UImanager->ApplyCommand(command);
 
   G4UIExecutive* ui = 0;
-  if ( !gui_type.empty() ) {  // interactive mode : define UI session    
-    const char* args[] = {"cmd"};
-    ui = new G4UIExecutive(1,(char**)args);//,gui_type);
-    if ( is_visual && !vis_setup.empty() )   {
-      UImanager->ApplyCommand("/control/execute vis.mac"); 
+  if (!gui_type.empty()) {   // interactive mode : define UI session
+    const char* args[] = { "cmd" };
+    ui = new G4UIExecutive(1, (char**) args);   //,gui_type);
+    if (is_visual && !vis_setup.empty()) {
+      UImanager->ApplyCommand("/control/execute vis.mac");
       cout << "++++++++++++++++++++++++++++ executed vis.mac" << endl;
     }
     if (ui->IsGUI()) {
-      if ( !gui_setup.empty() )  {
-	UImanager->ApplyCommand("/control/execute "+gui_setup);
-	cout << "++++++++++++++++++++++++++++ executed gui.mac" << endl;
+      if (!gui_setup.empty()) {
+        UImanager->ApplyCommand("/control/execute " + gui_setup);
+        cout << "++++++++++++++++++++++++++++ executed gui.mac" << endl;
       }
     }
     ui->SessionStart();
@@ -401,12 +348,13 @@ int Geant4Exec::run(Geant4Kernel& )   {
   // Job termination
   // Free the store: user actions, physics_list and detector_description are
   //                 owned and deleted by the run manager, so they should not
-  //                 be deleted in the main() program !  
-  if ( visManager ) delete visManager;
+  //                 be deleted in the main() program !
+  if (visManager)
+    delete visManager;
   return 1;
 }
 
 /// Run the simulation
-int Geant4Exec::terminate(Geant4Kernel& )   {
+int Geant4Exec::terminate(Geant4Kernel&) {
   return 1;
 }
diff --git a/DDG4/src/Geant4Field.cpp b/DDG4/src/Geant4Field.cpp
index 7c82916716aa8ebb8ba26a87fc10cc3671c53883..6e114cf786661dce5805112aaf83b797ba4a6b42 100644
--- a/DDG4/src/Geant4Field.cpp
+++ b/DDG4/src/Geant4Field.cpp
@@ -10,9 +10,6 @@
 #include "DDG4/Geant4Field.h"
 
 using namespace DD4hep::Simulation;
-using namespace DD4hep::Geometry;
-using namespace DD4hep;
-using namespace std;
 
 G4bool Geant4Field::DoesFieldChangeEnergy() const {
   return m_field.changesEnergy();
@@ -20,6 +17,6 @@ G4bool Geant4Field::DoesFieldChangeEnergy() const {
 
 void Geant4Field::GetFieldValue(const double pos[4], double *field) const {
   field[0] = field[1] = field[2] = 0.0;
-  return m_field.magneticField(pos,field);
+  return m_field.magneticField(pos, field);
 }
 
diff --git a/DDG4/src/Geant4GDMLDetector.cpp b/DDG4/src/Geant4GDMLDetector.cpp
index 535e25e1a11f483ce3d92697f2aa075d4dbe2ce0..fca6718b31c5461511cca74cfa67e79fd2d95a7b 100644
--- a/DDG4/src/Geant4GDMLDetector.cpp
+++ b/DDG4/src/Geant4GDMLDetector.cpp
@@ -1,7 +1,7 @@
 #include "DDG4/Geant4GDMLDetector.h"
 #include <iostream>
 
-//#define GEANT4_HAS_GDML 
+//#define GEANT4_HAS_GDML
 
 #ifdef GEANT4_HAS_GDML
 #include "G4GDMLParser.hh"
@@ -10,9 +10,8 @@
 using namespace std;
 using namespace DD4hep;
 
-DD4hep::Simulation::Geant4GDMLDetector::Geant4GDMLDetector(const std::string& gdmlFile ) 
-: m_fileName(gdmlFile), m_world(0)
-{
+DD4hep::Simulation::Geant4GDMLDetector::Geant4GDMLDetector(const std::string& gdmlFile)
+    : m_fileName(gdmlFile), m_world(0) {
 }
 
 G4VPhysicalVolume* DD4hep::Simulation::Geant4GDMLDetector::Construct() {
diff --git a/DDG4/src/Geant4GeneratorAction.cpp b/DDG4/src/Geant4GeneratorAction.cpp
index 13c3b2856feaa45443c883d9dff0b0ee0635beb0..6394dfbf2e8a6670eca63abcd4242cc0543df664 100644
--- a/DDG4/src/Geant4GeneratorAction.cpp
+++ b/DDG4/src/Geant4GeneratorAction.cpp
@@ -17,25 +17,24 @@ using namespace DD4hep::Simulation;
 
 /// Standard constructor
 Geant4GeneratorAction::Geant4GeneratorAction(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)  
-{
+    : Geant4Action(context, name) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4GeneratorAction::~Geant4GeneratorAction()  {
+Geant4GeneratorAction::~Geant4GeneratorAction() {
   InstanceCount::decrement(this);
 }
 
 /// Standard constructor
 Geant4GeneratorActionSequence::Geant4GeneratorActionSequence(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)
-{
+    : Geant4Action(context, name) {
+  m_needsControl = true;
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4GeneratorActionSequence::~Geant4GeneratorActionSequence()  {
+Geant4GeneratorActionSequence::~Geant4GeneratorActionSequence() {
   m_actors(&Geant4GeneratorAction::release);
   m_actors.clear();
   m_calls.clear();
@@ -43,8 +42,8 @@ Geant4GeneratorActionSequence::~Geant4GeneratorActionSequence()  {
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4GeneratorActionSequence::adopt(Geant4GeneratorAction* action)  {
-  if ( action )  {
+void Geant4GeneratorActionSequence::adopt(Geant4GeneratorAction* action) {
+  if (action) {
     action->addRef();
     m_actors.add(action);
     return;
@@ -53,7 +52,7 @@ void Geant4GeneratorActionSequence::adopt(Geant4GeneratorAction* action)  {
 }
 
 /// Generator callback
-void  Geant4GeneratorActionSequence::operator()(G4Event* event) { 
-  m_actors(&Geant4GeneratorAction::operator(),event);
+void Geant4GeneratorActionSequence::operator()(G4Event* event) {
+  m_actors(&Geant4GeneratorAction::operator(), event);
   m_calls(event);
 }
diff --git a/DDG4/src/Geant4GeometryInfo.cpp b/DDG4/src/Geant4GeometryInfo.cpp
index 97d044c1eb56e343de8efe3124ecc4f1f0f2d3ef..0029d01ea8de948464527bbe0a480402e021518d 100644
--- a/DDG4/src/Geant4GeometryInfo.cpp
+++ b/DDG4/src/Geant4GeometryInfo.cpp
@@ -11,11 +11,10 @@
 using namespace DD4hep::Simulation;
 
 /// Default constructor
-Geant4GeometryInfo::Geant4GeometryInfo() 
-: TNamed("Geant4GeometryInfo","Geant4GeometryInfo"), valid(false)
-{
+Geant4GeometryInfo::Geant4GeometryInfo()
+    : TNamed("Geant4GeometryInfo", "Geant4GeometryInfo"), valid(false) {
 }
 
 /// Default destructor
-Geant4GeometryInfo::~Geant4GeometryInfo()   {
+Geant4GeometryInfo::~Geant4GeometryInfo() {
 }
diff --git a/DDG4/src/Geant4Handle.cpp b/DDG4/src/Geant4Handle.cpp
index 862da65305ccc687add3383b36dc755df184f326..874087e53196fd796ff9f9d25deffcc434e560a1 100644
--- a/DDG4/src/Geant4Handle.cpp
+++ b/DDG4/src/Geant4Handle.cpp
@@ -24,7 +24,6 @@
 #include "DDG4/Geant4PhysicsList.h"
 #include "DDG4/Geant4ActionPhase.h"
 
-
 // C/C++ include files
 #include <stdexcept>
 
@@ -32,153 +31,161 @@ using namespace std;
 using namespace DD4hep;
 using namespace DD4hep::Simulation;
 
-template <typename TYPE> static inline TYPE* checked_value(TYPE* p)    {
-  if ( p )  {
+template <typename TYPE> static inline TYPE* checked_value(TYPE* p) {
+  if (p) {
     return p;
   }
-  throw runtime_error(format("Geant4Handle","Attempt to access an invalid object of type:%s!",
-			     typeinfoName(typeid(TYPE)).c_str()));
+  throw runtime_error(
+      format("Geant4Handle", "Attempt to access an invalid object of type:%s!", typeinfoName(typeid(TYPE)).c_str()));
 }
 
-template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle() : value(0) 
-{
+template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle()
+    : value(0) {
 }
 
-template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(TYPE* typ) : value(typ) 
-{
-  if ( value ) value->addRef();
+template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(TYPE* typ)
+    : value(typ) {
+  if (value)
+    value->addRef();
 }
 
 template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(Geant4Handle<TYPE>& handle)
-: value(0) 
-{
+    : value(0) {
   value = handle.get();
-  if ( value ) value->addRef();
+  if (value)
+    value->addRef();
 }
 
-template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(const Geant4Kernel& kernel,const string& type_name)
-: value(0) 
-{
+template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(const Geant4Kernel& kernel, const string& type_name)
+    : value(0) {
   TypeName typ = TypeName::split(type_name);
   Geant4Context* ctxt = kernel.context();
-  Geant4Action* object = PluginService::Create<Geant4Action*>(typ.first,ctxt,typ.second);
-  if ( !object && typ.first == typ.second )  {
+  Geant4Action* object = PluginService::Create<Geant4Action*>(typ.first, ctxt, typ.second);
+  if (!object && typ.first == typ.second) {
     typ.first = typeinfoName(typeid(TYPE));
-    printout(DEBUG,"Geant4Handle<Geant4Sensitive>",
-	     "Object factory for %s not found. Try out %s",
-	     typ.second.c_str(),typ.first.c_str());
-    object = PluginService::Create<Geant4Action*>(typ.first,ctxt,typ.second);
-    if ( !object )  {
+    printout(DEBUG, "Geant4Handle<Geant4Sensitive>", "Object factory for %s not found. Try out %s", typ.second.c_str(),
+        typ.first.c_str());
+    object = PluginService::Create<Geant4Action*>(typ.first, ctxt, typ.second);
+    if (!object) {
       size_t idx = typ.first.rfind(':');
-      if ( idx != string::npos ) typ.first = string(typ.first.substr(idx+1));
-      printout(DEBUG,"Geant4Handle<Geant4Sensitive>",
-	       "Try out object factory for %s",typ.first.c_str());
-      object = PluginService::Create<Geant4Action*>(typ.first,ctxt,typ.second);
+      if (idx != string::npos)
+        typ.first = string(typ.first.substr(idx + 1));
+      printout(DEBUG, "Geant4Handle<Geant4Sensitive>", "Try out object factory for %s", typ.first.c_str());
+      object = PluginService::Create<Geant4Action*>(typ.first, ctxt, typ.second);
     }
   }
-  if ( object )  {
+  if (object) {
     TYPE* ptr = dynamic_cast<TYPE*>(object);
-    if ( ptr )  {
+    if (ptr) {
       value = ptr;
       return;
     }
-    throw runtime_error(format("Geant4Handle",
-			       "Failed to convert object of type %s to handle of type %s!",
-			       type_name.c_str(),typeinfoName(typeid(TYPE)).c_str()));
+    throw runtime_error(
+        format("Geant4Handle", "Failed to convert object of type %s to handle of type %s!", type_name.c_str(),
+            typeinfoName(typeid(TYPE)).c_str()));
   }
-  throw runtime_error(format("Geant4Handle","Failed to create object of type %s!",type_name.c_str()));
+  throw runtime_error(format("Geant4Handle", "Failed to create object of type %s!", type_name.c_str()));
 }
 
-template <typename TYPE> Geant4Handle<TYPE>::~Geant4Handle()  {
-  if ( value ) value->release();
+template <typename TYPE> Geant4Handle<TYPE>::~Geant4Handle() {
+  if (value)
+    value->release();
   value = 0;
 }
 
-template <typename TYPE> void Geant4Handle<TYPE>::checked_assign(TYPE* p)  {
-  if ( value ) value->release();
+template <typename TYPE> void Geant4Handle<TYPE>::checked_assign(TYPE* p) {
+  if (value)
+    value->release();
   value = checked_value(p);
-  if ( value ) value->addRef();
+  if (value)
+    value->addRef();
 }
 
-template <typename TYPE> Property& Geant4Handle<TYPE>::operator[](const string& property_name) const  {
+template <typename TYPE> Property& Geant4Handle<TYPE>::operator[](const string& property_name) const {
   PropertyManager& pm = checked_value(value)->properties();
   return pm[property_name];
 }
 
-template <typename TYPE> Geant4Handle<TYPE>::operator TYPE*() const   {
+template <typename TYPE> Geant4Handle<TYPE>::operator TYPE*() const {
   return checked_value(value);
 }
 
-template <typename TYPE> bool Geant4Handle<TYPE>::operator!() const   {
+template <typename TYPE> bool Geant4Handle<TYPE>::operator!() const {
   return 0 == value;
 }
 
-template <typename TYPE> TYPE* Geant4Handle<TYPE>::get() const   {
+template <typename TYPE> TYPE* Geant4Handle<TYPE>::get() const {
   return checked_value(value);
 }
 
-template <typename TYPE> TYPE* Geant4Handle<TYPE>::operator->() const   {
+template <typename TYPE> TYPE* Geant4Handle<TYPE>::operator->() const {
   return checked_value(value);
 }
 
-template <typename TYPE> Geant4Handle<TYPE>& Geant4Handle<TYPE>::operator=(Geant4Handle& handle)  {
-  if ( value ) value->release();
+template <typename TYPE> Geant4Handle<TYPE>& Geant4Handle<TYPE>::operator=(Geant4Handle& handle) {
+  if (value)
+    value->release();
   value = handle.get();
-  if ( value ) value->addRef();
+  if (value)
+    value->addRef();
   return *this;
 }
 
-template <typename TYPE> Geant4Handle<TYPE>& Geant4Handle<TYPE>::operator=(TYPE* typ)   {
-  if ( value ) value->release();
+template <typename TYPE> Geant4Handle<TYPE>& Geant4Handle<TYPE>::operator=(TYPE* typ) {
+  if (value)
+    value->release();
   value = typ;
-  if ( value ) value->addRef();
+  if (value)
+    value->addRef();
   return *this;
 }
 
-namespace DD4hep {  namespace Simulation   {
-
-    template <> Geant4Handle<Geant4Sensitive>::Geant4Handle(const Geant4Kernel& kernel, const string& type_name, const string& detector)  {
-      try  {
-	Geant4Context*       ctxt = kernel.context();
-	TypeName             typ  = TypeName::split(type_name);
-	Geometry::LCDD&      lcdd = kernel.lcdd();
-	Geometry::DetElement det  = lcdd.detector(detector);
-	Geant4Sensitive* object = PluginService::Create<Geant4Sensitive*>(typ.first,ctxt,typ.second,&det,&lcdd);
-	if ( object )  {
-	  value = object;
-	  return;
-	}
+namespace DD4hep {
+  namespace Simulation {
+
+    template <> Geant4Handle<Geant4Sensitive>::Geant4Handle(const Geant4Kernel& kernel, const string& type_name,
+        const string& detector) {
+      try {
+        Geant4Context* ctxt = kernel.context();
+        TypeName typ = TypeName::split(type_name);
+        Geometry::LCDD& lcdd = kernel.lcdd();
+        Geometry::DetElement det = lcdd.detector(detector);
+        Geant4Sensitive* object = PluginService::Create<Geant4Sensitive*>(typ.first, ctxt, typ.second, &det, &lcdd);
+        if (object) {
+          value = object;
+          return;
+        }
       }
-      catch(const exception& e)   {
-	printout(ERROR,"Geant4Handle<Geant4Sensitive>","Exception: %s",e.what());
+      catch (const exception& e) {
+        printout(ERROR, "Geant4Handle<Geant4Sensitive>", "Exception: %s", e.what());
       }
-      catch(...)   {
-	printout(ERROR,"Geant4Handle<Geant4Sensitive>","Exception: Unknown exception");
+      catch (...) {
+        printout(ERROR, "Geant4Handle<Geant4Sensitive>", "Exception: Unknown exception");
       }
-      throw runtime_error(format("Geant4Handle<Geant4Sensitive>",
-				 "Failed to create sensitive object of type %s for detector %s!",
-				 type_name.c_str(),detector.c_str()));
+      throw runtime_error(
+          format("Geant4Handle<Geant4Sensitive>", "Failed to create sensitive object of type %s for detector %s!",
+              type_name.c_str(), detector.c_str()));
     }
   }
 }
 
-template class Geant4Handle<Geant4Action>;
-template class Geant4Handle<Geant4Filter>;
-template class Geant4Handle<Geant4Sensitive>;
-template class Geant4Handle<Geant4ActionPhase>;
-template class Geant4Handle<Geant4GeneratorAction>;
-template class Geant4Handle<Geant4RunAction>;
-template class Geant4Handle<Geant4EventAction>;
-template class Geant4Handle<Geant4TrackingAction>;
-template class Geant4Handle<Geant4SteppingAction>;
-template class Geant4Handle<Geant4StackingAction>;
-template class Geant4Handle<Geant4PhysicsList>;
-
-template class Geant4Handle<Geant4GeneratorActionSequence>;
-template class Geant4Handle<Geant4PhysicsListActionSequence>;
-template class Geant4Handle<Geant4RunActionSequence>;
-template class Geant4Handle<Geant4EventActionSequence>;
-template class Geant4Handle<Geant4TrackingActionSequence>;
-template class Geant4Handle<Geant4SteppingActionSequence>;
-template class Geant4Handle<Geant4StackingActionSequence>;
-template class Geant4Handle<Geant4SensDetActionSequence>;
+template class Geant4Handle<Geant4Action> ;
+template class Geant4Handle<Geant4Filter> ;
+template class Geant4Handle<Geant4Sensitive> ;
+template class Geant4Handle<Geant4ActionPhase> ;
+template class Geant4Handle<Geant4GeneratorAction> ;
+template class Geant4Handle<Geant4RunAction> ;
+template class Geant4Handle<Geant4EventAction> ;
+template class Geant4Handle<Geant4TrackingAction> ;
+template class Geant4Handle<Geant4SteppingAction> ;
+template class Geant4Handle<Geant4StackingAction> ;
+template class Geant4Handle<Geant4PhysicsList> ;
+
+template class Geant4Handle<Geant4GeneratorActionSequence> ;
+template class Geant4Handle<Geant4PhysicsListActionSequence> ;
+template class Geant4Handle<Geant4RunActionSequence> ;
+template class Geant4Handle<Geant4EventActionSequence> ;
+template class Geant4Handle<Geant4TrackingActionSequence> ;
+template class Geant4Handle<Geant4SteppingActionSequence> ;
+template class Geant4Handle<Geant4StackingActionSequence> ;
+template class Geant4Handle<Geant4SensDetActionSequence> ;
diff --git a/DDG4/src/Geant4HierarchyDump.cpp b/DDG4/src/Geant4HierarchyDump.cpp
index 212e5ab6f9ce6ba12ab14e66093746b429c6f8a3..eaf7427dbaa083386935d207d253180fadf7eea9 100644
--- a/DDG4/src/Geant4HierarchyDump.cpp
+++ b/DDG4/src/Geant4HierarchyDump.cpp
@@ -12,7 +12,6 @@
 #include "DD4hep/Printout.h"
 #include "DDG4/Geant4HierarchyDump.h"
 
-
 #include "Reflex/PluginService.h"
 
 #include "G4VisAttributes.hh"
@@ -54,36 +53,37 @@
 #include <iomanip>
 #include <sstream>
 
-
 using namespace DD4hep::Simulation;
 using namespace DD4hep::Geometry;
 using namespace DD4hep;
 using namespace std;
 
-static const char* _T(const std::string& s)  {  return s.c_str(); }
+static const char* _T(const std::string& s) {
+  return s.c_str();
+}
 //static const char* _T(const char* s)  {  return s; }
 
-enum { G4DUMP_ALL = 0xFFFFFFFF,
-       G4DUMP_LOGVOL  = 1<<0,
-       G4DUMP_SOLID   = 1<<1,
-       G4DUMP_SENSDET = 1<<2,
-       G4DUMP_LIMITS  = 1<<3,
-       G4DUMP_REGION  = 1<<4,
-       G4DUMP_LAST
+enum {
+  G4DUMP_ALL = 0xFFFFFFFF,
+  G4DUMP_LOGVOL = 1 << 0,
+  G4DUMP_SOLID = 1 << 1,
+  G4DUMP_SENSDET = 1 << 2,
+  G4DUMP_LIMITS = 1 << 3,
+  G4DUMP_REGION = 1 << 4,
+  G4DUMP_LAST
 };
 static unsigned long m_flags = ~0x0UL;
 
 /// Initializing Constructor
-Geant4HierarchyDump::Geant4HierarchyDump( LCDD& lcdd) 
-: m_lcdd(lcdd)
-{
+Geant4HierarchyDump::Geant4HierarchyDump(LCDD& lcdd)
+    : m_lcdd(lcdd) {
 }
 
 /// Standard destructor
-Geant4HierarchyDump::~Geant4HierarchyDump()  {
+Geant4HierarchyDump::~Geant4HierarchyDump() {
 }
 
-void Geant4HierarchyDump::dump(const string& indent, const G4VPhysicalVolume* v)  const {
+void Geant4HierarchyDump::dump(const string& indent, const G4VPhysicalVolume* v) const {
   G4LogicalVolume* lv = v->GetLogicalVolume();
   G4VSensitiveDetector* sd = lv->GetSensitiveDetector();
   G4Material* mat = lv->GetMaterial();
@@ -95,32 +95,32 @@ void Geant4HierarchyDump::dump(const string& indent, const G4VPhysicalVolume* v)
   stringstream str;
 
   m_flags &= ~G4DUMP_SOLID;
-  printout(INFO,"Geant4Hierarchy","%s -> Placement:%s LV:%s Material:%s Solid:%s # of Daughters:%d",indent.c_str(),
-	   _T(v->GetName()), _T(lv->GetName()), _T(mat->GetName()), _T(sol->GetName()),ndau);
+  printout(INFO, "Geant4Hierarchy", "%s -> Placement:%s LV:%s Material:%s Solid:%s # of Daughters:%d", indent.c_str(),
+      _T(v->GetName()), _T(lv->GetName()), _T(mat->GetName()), _T(sol->GetName()), ndau);
 
-  if ( sd && (m_flags&G4DUMP_SOLID) )   {
+  if (sd && (m_flags & G4DUMP_SOLID)) {
     str.str("");
     sol->StreamInfo(str);
-    printout(INFO,"Geant4Hierarchy","%s    Solid:%s",indent.c_str(),str.str().c_str());
+    printout(INFO, "Geant4Hierarchy", "%s    Solid:%s", indent.c_str(), str.str().c_str());
   }
-  if ( rg && (m_flags&G4DUMP_LIMITS) )   {
+  if (rg && (m_flags & G4DUMP_LIMITS)) {
     G4UserLimits* rg_limits = rg->GetUserLimits();
     str.str("");
-    str << indent << "    Region:" << rg->GetName() << " #Materials:" << rg->GetNumberOfMaterials()
-	<< " #Volumes:" << rg->GetNumberOfRootVolumes();
-    if ( rg_limits ) str << " Limits:" << rg_limits->GetType();
-    printout(INFO,"Geant4Hierarchy",str.str().c_str());
+    str << indent << "    Region:" << rg->GetName() << " #Materials:" << rg->GetNumberOfMaterials() << " #Volumes:"
+        << rg->GetNumberOfRootVolumes();
+    if (rg_limits)
+      str << " Limits:" << rg_limits->GetType();
+    printout(INFO, "Geant4Hierarchy", str.str().c_str());
   }
-  if ( sd && (m_flags&G4DUMP_SENSDET) )   {
-    printout(INFO,"Geant4Hierarchy","%s    Sens.det:%p %s path:%s Active:%-3s #Coll:%d",indent.c_str(),
-	     sd, _T(sd->GetName()), _T(sd->GetFullPathName()), sd->isActive() ? "YES" : "NO",
-	     sd->GetNumberOfCollections());
+  if (sd && (m_flags & G4DUMP_SENSDET)) {
+    printout(INFO, "Geant4Hierarchy", "%s    Sens.det:%p %s path:%s Active:%-3s #Coll:%d", indent.c_str(), sd,
+        _T(sd->GetName()), _T(sd->GetFullPathName()), sd->isActive() ? "YES" : "NO", sd->GetNumberOfCollections());
   }
-  if ( ul && (m_flags&G4DUMP_LIMITS) )   {
-    printout(INFO,"Geant4Hierarchy","%s    Limits:%s ",indent.c_str(),_T(ul->GetType()));
+  if (ul && (m_flags & G4DUMP_LIMITS)) {
+    printout(INFO, "Geant4Hierarchy", "%s    Limits:%s ", indent.c_str(), _T(ul->GetType()));
   }
-  for(G4int idau = 0; idau < ndau; ++idau)   {
-    ::sprintf(text,"  %-3d",idau);
-    dump(indent+text,lv->GetDaughter(idau));
+  for (G4int idau = 0; idau < ndau; ++idau) {
+    ::sprintf(text, "  %-3d", idau);
+    dump(indent + text, lv->GetDaughter(idau));
   }
 }
diff --git a/DDG4/src/Geant4HitCollection.cpp b/DDG4/src/Geant4HitCollection.cpp
index cacc1471c4637538b3902863e5481bb395eea032..03869842c2024a69fbe250833e34f38fee092831 100644
--- a/DDG4/src/Geant4HitCollection.cpp
+++ b/DDG4/src/Geant4HitCollection.cpp
@@ -10,47 +10,46 @@
 // Framework include files
 #include "DD4hep/InstanceCount.h"
 #include "DDG4/Geant4HitCollection.h"
-#include "DDG4/ComponentUtils.h"
 #include "G4Allocator.hh"
 
+using namespace DD4hep;
 using namespace DD4hep::Simulation;
 
 static G4Allocator<Geant4HitWrapper> HitWrapperAllocator;
 
-Geant4HitWrapper::InvalidHit::~InvalidHit()  {
+Geant4HitWrapper::InvalidHit::~InvalidHit() {
 }
 
-Geant4HitWrapper::HitManipulator::HitManipulator(const std::type_info& t, destroy_t d, cast_t c) : type(t), destroy(d), cast(c) 
-{
+/// Initializing Constructor
+Geant4HitWrapper::HitManipulator::HitManipulator(const ComponentCast& c, const ComponentCast& v, destroy_t d)
+    : cast(c), vec_type(v), destroy(d) {
+  InstanceCount::increment(this);
 }
 
-void Geant4HitWrapper::HitManipulator::checkHitType(const std::type_info& test_type)  const  {
-  if ( test_type != type )   {
-    throw unrelated_type_error(test_type,type,
-			       "This hit cannot be passed to this hit collection!");
-  }
+/// Default destructor
+Geant4HitWrapper::HitManipulator::~HitManipulator() {
+  InstanceCount::decrement(this);
 }
 
 /// Default destructor
 Geant4HitWrapper::~Geant4HitWrapper() {
-  if ( m_data.first && m_data.second )  {
+  if (m_data.first && m_data.second) {
     (m_data.second->destroy)(m_data);
   }
 }
 
-
 /// Geant4 required object allocator
-void* Geant4HitWrapper::operator new(size_t)   { 
-  return HitWrapperAllocator.MallocSingle();    
+void* Geant4HitWrapper::operator new(size_t) {
+  return HitWrapperAllocator.MallocSingle();
 }
 
 /// Geat4 required object destroyer
-void Geant4HitWrapper::operator delete(void *p) { 
-  HitWrapperAllocator.FreeSingle((Geant4HitWrapper*)p); 
+void Geant4HitWrapper::operator delete(void *p) {
+  HitWrapperAllocator.FreeSingle((Geant4HitWrapper*) p);
 }
 
 /// Pointer/Object release
-void* Geant4HitWrapper::release()  {
+void* Geant4HitWrapper::release() {
   void* p = m_data.first;
   m_data.first = 0;
   m_data.second = manipulator<InvalidHit>();
@@ -58,7 +57,7 @@ void* Geant4HitWrapper::release()  {
 }
 
 /// Pointer/Object release
-Geant4HitWrapper::Wrapper Geant4HitWrapper::releaseData()  {
+Geant4HitWrapper::Wrapper Geant4HitWrapper::releaseData() {
   Wrapper w = m_data;
   m_data.first = 0;
   m_data.second = manipulator<InvalidHit>();
@@ -66,21 +65,71 @@ Geant4HitWrapper::Wrapper Geant4HitWrapper::releaseData()  {
 }
 
 /// Default destructor
-Geant4HitCollection::~Geant4HitCollection()  {
+Geant4HitCollection::~Geant4HitCollection() {
   m_hits.clear();
   InstanceCount::decrement(this);
 }
 
+/// Type information of the object stored
+const ComponentCast& Geant4HitCollection::type() const {
+  return m_manipulator->cast;
+}
+
+/// Type information of the vector type for extracting data
+const ComponentCast& Geant4HitCollection::vector_type() const {
+  return m_manipulator->vec_type;
+}
+
 /// Notification to increase the instance counter
-void Geant4HitCollection::newInstance()   {
+void Geant4HitCollection::newInstance() {
   InstanceCount::increment(this);
 }
 
 /// Find hit in a collection by comparison of attributes
-void* Geant4HitCollection::findHit(const Compare& cmp)  const  {
+void* Geant4HitCollection::findHit(const Compare& cmp) const {
   void* p = 0;
-  for(WrappedHits::const_iterator i=m_hits.begin(); i !=m_hits.end(); ++i) 
-    if ( (p=cmp(*i)) !=0 ) return p;
+  for (WrappedHits::const_iterator i = m_hits.begin(); i != m_hits.end(); ++i)
+    if ((p = cmp(*i)) != 0)
+      return p;
   return p;
 }
 
+/// Release all hits from the Geant4 container and pass ownership to the caller
+void Geant4HitCollection::releaseData(const ComponentCast& cast, std::vector<void*>* result) {
+  for (size_t j = 0, n = m_hits.size(); j < n; ++j) {
+    Geant4HitWrapper& w = m_hits.at(j);
+    Manip* m = w.manip();
+    if (&cast == &m->cast)
+      result->push_back(w.release());
+    else
+      result->push_back(m->cast.apply_downCast(cast.type, w.release()));
+  }
+}
+
+/// Release all hits from the Geant4 container. Ownership stays with the container
+void Geant4HitCollection::getData(const ComponentCast& cast, std::vector<void*>* result) {
+  for (size_t j = 0, n = m_hits.size(); j < n; ++j) {
+    Geant4HitWrapper& w = m_hits.at(j);
+    Manip* m = w.manip();
+    if (&cast == &m->cast)
+      result->push_back(w.data());
+    else
+      result->push_back(m->cast.apply_downCast(cast.type, w.data()));
+  }
+}
+
+/// Release all hits from the Geant4 container and pass ownership to the caller
+void Geant4HitCollection::releaseHitsUnchecked(std::vector<void*>& result) {
+  for (size_t j = 0, n = m_hits.size(); j < n; ++j) {
+    Geant4HitWrapper& w = m_hits.at(j);
+    result.push_back(w.release());
+  }
+}
+
+/// Release all hits from the Geant4 container. Ownership stays with the container
+void Geant4HitCollection::getHitsUnchecked(std::vector<void*>& result) {
+  for (size_t j = 0, n = m_hits.size(); j < n; ++j) {
+    Geant4HitWrapper& w = m_hits.at(j);
+    result.push_back(w.data());
+  }
+}
diff --git a/DDG4/src/Geant4Hits.cpp b/DDG4/src/Geant4Hits.cpp
index 0140ef8049e12a65d4887e912b2bd617ecfdd5d4..41526b79b0d362d19a486c123217e0c1af6df37c 100644
--- a/DDG4/src/Geant4Hits.cpp
+++ b/DDG4/src/Geant4Hits.cpp
@@ -24,12 +24,12 @@ using namespace std;
 using namespace DD4hep::Simulation;
 
 /// Check if the Geant4 track is a Geantino
-bool Geant4Hit::isGeantino(G4Track* track)  {
-  if ( track ) {
+bool Geant4Hit::isGeantino(G4Track* track) {
+  if (track) {
     G4ParticleDefinition* def = track->GetDefinition();
-    if ( def == G4ChargedGeantino::Definition() )
+    if (def == G4ChargedGeantino::Definition())
       return true;
-    if ( def == G4Geantino::Definition() ) {
+    if (def == G4Geantino::Definition()) {
       return true;
     }
   }
@@ -37,89 +37,84 @@ bool Geant4Hit::isGeantino(G4Track* track)  {
 }
 
 Geant4Hit::Contribution Geant4Hit::extractContribution(G4Step* step) {
-  G4Track* trk     = step->GetTrack();
-  double energy_deposit = (trk->GetDefinition() == G4OpticalPhoton::OpticalPhotonDefinition())
-    ? trk->GetTotalEnergy() : step->GetTotalEnergyDeposit();
-  Contribution  contrib(trk->GetTrackID(),
-			trk->GetDefinition()->GetPDGEncoding(),
-			energy_deposit,
-			trk->GetGlobalTime());
+  G4Track* trk = step->GetTrack();
+  double energy_deposit =
+      (trk->GetDefinition() == G4OpticalPhoton::OpticalPhotonDefinition()) ?
+          trk->GetTotalEnergy() : step->GetTotalEnergyDeposit();
+  Contribution contrib(trk->GetTrackID(), trk->GetDefinition()->GetPDGEncoding(), energy_deposit, trk->GetGlobalTime());
   return contrib;
 }
 
 static G4Allocator<Geant4TrackerHit> TrackerHitAllocator;
 
 /// Default constructor
-Geant4TrackerHit::Geant4TrackerHit() : Geant4Hit(), position(), momentum(), length(0.0), truth()
-{
+Geant4TrackerHit::Geant4TrackerHit()
+    : Geant4Hit(), position(), momentum(), length(0.0), truth() {
 }
 
 /// Standard initializing constructor
 Geant4TrackerHit::Geant4TrackerHit(int track_id, int pdg_id, double deposit, double time_stamp)
-  : Geant4Hit(), position(), momentum(), length(0.0), truth(track_id, pdg_id, deposit, time_stamp)
-{
+    : Geant4Hit(), position(), momentum(), length(0.0), truth(track_id, pdg_id, deposit, time_stamp) {
 }
 
 /// Assignment operator
-Geant4TrackerHit& Geant4TrackerHit::operator=(const Geant4TrackerHit& c)   {
+Geant4TrackerHit& Geant4TrackerHit::operator=(const Geant4TrackerHit& c) {
   position = c.position;
   momentum = c.momentum;
-  length   = c.length;
-  truth    = c.truth;
+  length = c.length;
+  truth = c.truth;
   return *this;
 }
 
 /// Clear hit content
-Geant4TrackerHit& Geant4TrackerHit::clear()  {
-  position.SetXYZ(0,0,0);
-  momentum.SetXYZ(0,0,0);
+Geant4TrackerHit& Geant4TrackerHit::clear() {
+  position.SetXYZ(0, 0, 0);
+  momentum.SetXYZ(0, 0, 0);
   length = 0.0;
   truth.clear();
   return *this;
 }
 
 /// Store Geant4 point and step information into tracker hit structure.
-Geant4TrackerHit& Geant4TrackerHit::storePoint(G4Step* step, G4StepPoint* pnt)  {
-  G4Track*      trk = step->GetTrack();
+Geant4TrackerHit& Geant4TrackerHit::storePoint(G4Step* step, G4StepPoint* pnt) {
+  G4Track* trk = step->GetTrack();
   G4ThreeVector pos = pnt->GetPosition();
   G4ThreeVector mom = pnt->GetMomentum();
 
   truth.trackID = trk->GetTrackID();
-  truth.pdgID   = trk->GetDefinition()->GetPDGEncoding();
+  truth.pdgID = trk->GetDefinition()->GetPDGEncoding();
   truth.deposit = step->GetTotalEnergyDeposit();
-  truth.time    = trk->GetGlobalTime();
-  position.SetXYZ(pos.x(),pos.y(),pos.z());
-  momentum.SetXYZ(mom.x(),mom.y(),mom.z());
+  truth.time = trk->GetGlobalTime();
+  position.SetXYZ(pos.x(), pos.y(), pos.z());
+  momentum.SetXYZ(mom.x(), mom.y(), mom.z());
   length = 0;
   return *this;
 }
 
 /// Geant4 required object allocator
-void* Geant4TrackerHit::operator new(size_t)   { 
-  return TrackerHitAllocator.MallocSingle();    
+void* Geant4TrackerHit::operator new(size_t) {
+  return TrackerHitAllocator.MallocSingle();
 }
 
 /// Geat4 required object destroyer
-void Geant4TrackerHit::operator delete(void *p) { 
-  TrackerHitAllocator.FreeSingle((Geant4TrackerHit*)p); 
+void Geant4TrackerHit::operator delete(void *p) {
+  TrackerHitAllocator.FreeSingle((Geant4TrackerHit*) p);
 }
 
-
 static G4Allocator<Geant4CalorimeterHit> CalorimeterHitAllocator;
 
 /// Standard constructor
 Geant4CalorimeterHit::Geant4CalorimeterHit(const Position& pos)
-  : Geant4Hit(), position(pos), truth(), energyDeposit(0)
-{
+    : Geant4Hit(), position(pos), truth(), energyDeposit(0) {
 }
 
 /// Geant4 required object allocator
-void* Geant4CalorimeterHit::operator new(size_t)   { 
-  return CalorimeterHitAllocator.MallocSingle();    
+void* Geant4CalorimeterHit::operator new(size_t) {
+  return CalorimeterHitAllocator.MallocSingle();
 }
 
 /// Geat4 required object destroyer
-void Geant4CalorimeterHit::operator delete(void *p) { 
-  CalorimeterHitAllocator.FreeSingle((Geant4CalorimeterHit*)p); 
+void Geant4CalorimeterHit::operator delete(void *p) {
+  CalorimeterHitAllocator.FreeSingle((Geant4CalorimeterHit*) p);
 }
 
diff --git a/DDG4/src/Geant4Kernel.cpp b/DDG4/src/Geant4Kernel.cpp
index b7200c8d73e4b57ba4aae1a1d2dfc8290c30affb..35fd0fffad551f34c95e9a781cea0687a853b20b 100644
--- a/DDG4/src/Geant4Kernel.cpp
+++ b/DDG4/src/Geant4Kernel.cpp
@@ -26,7 +26,9 @@
 #include "DDG4/Geant4SensDetAction.h"
 #include "DDG4/Geant4DetectorConstruction.h"
 
+// Geant4 include files
 #include "G4RunManager.hh"
+#include "G4UIdirectory.hh"
 
 // C/C++ include files
 #include <stdexcept>
@@ -35,140 +37,143 @@
 using namespace std;
 using namespace DD4hep::Simulation;
 
-
 /// Standard constructor
-Geant4Kernel::PhaseSelector::PhaseSelector(Geant4Kernel* kernel) : m_kernel(kernel)  {
+Geant4Kernel::PhaseSelector::PhaseSelector(Geant4Kernel* kernel)
+    : m_kernel(kernel) {
 }
 
 /// Copy constructor
-Geant4Kernel::PhaseSelector::PhaseSelector(const PhaseSelector& c) : m_kernel(c.m_kernel)  {
+Geant4Kernel::PhaseSelector::PhaseSelector(const PhaseSelector& c)
+    : m_kernel(c.m_kernel) {
 }
 
 /// Phase access to the map
-Geant4ActionPhase& Geant4Kernel::PhaseSelector::operator[](const std::string& name)  const   {
+Geant4ActionPhase& Geant4Kernel::PhaseSelector::operator[](const std::string& name) const {
   Geant4ActionPhase* phase = m_kernel->getPhase(name);
-  if ( phase ) {
+  if (phase) {
     return *phase;
   }
-  throw runtime_error(format("Geant4Kernel","Attempt to access the nonexisting phase '%s'",name.c_str()));
+  throw runtime_error(format("Geant4Kernel", "Attempt to access the nonexisting phase '%s'", name.c_str()));
 }
 
 /// Standard constructor
 Geant4Kernel::Geant4Kernel(LCDD& lcdd)
-: m_context(0), m_runManager(0), m_generatorAction(0), m_runAction(0), m_eventAction(0), 
-  m_trackingAction(0), m_steppingAction(0), m_stackingAction(0), m_sensDetActions(0),
-  m_physicsList(0), m_lcdd(lcdd), phase(this)
-{
+    : m_context(0), m_runManager(0), m_generatorAction(0), m_runAction(0), m_eventAction(0), m_trackingAction(0), m_steppingAction(
+        0), m_stackingAction(0), m_sensDetActions(0), m_physicsList(0), m_lcdd(lcdd), phase(this) {
 #if 0
-  registerSequence(m_runAction,      "RunAction");
-  registerSequence(m_eventAction,    "EventAction");
+  registerSequence(m_runAction, "RunAction");
+  registerSequence(m_eventAction, "EventAction");
   registerSequence(m_steppingAction, "SteppingAction");
   registerSequence(m_trackingAction, "TrackingAction");
   registerSequence(m_stackingAction, "StackingAction");
   registerSequence(m_generatorAction,"GeneratorAction");
 #endif
   m_sensDetActions = new Geant4SensDetSequences();
-  m_context = new Geant4Context(this); 
-  m_lcdd.addExtension<Geant4Kernel>(this);
+  m_context = new Geant4Context(this);
+  m_lcdd.addExtension < Geant4Kernel > (this);
+
+  m_controlName = "/properties/";
+  m_control = new G4UIdirectory(m_controlName.c_str());
+  m_control->SetGuidance("Property control for all Geant4 named actions");
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4Kernel::~Geant4Kernel()   {
+Geant4Kernel::~Geant4Kernel() {
   destroyPhases();
-  for_each(m_globalFilters.begin(),m_globalFilters.end(),releaseObjects(m_globalFilters));
-  for_each(m_globalActions.begin(),m_globalActions.end(),releaseObjects(m_globalActions));
-  deletePtr(m_runManager);
-  releasePtr(m_physicsList);
-  releasePtr(m_stackingAction);
-  releasePtr(m_steppingAction);
-  releasePtr(m_trackingAction);
-  releasePtr(m_eventAction);
-  releasePtr(m_generatorAction);
-  releasePtr(m_runAction);
-  deletePtr(m_sensDetActions);
-  deletePtr(m_context);
+  for_each(m_globalFilters.begin(), m_globalFilters.end(), releaseObjects(m_globalFilters));
+  for_each(m_globalActions.begin(), m_globalActions.end(), releaseObjects(m_globalActions));
+  deletePtr (m_runManager);
+  releasePtr (m_physicsList);
+  releasePtr (m_stackingAction);
+  releasePtr (m_steppingAction);
+  releasePtr (m_trackingAction);
+  releasePtr (m_eventAction);
+  releasePtr (m_generatorAction);
+  releasePtr (m_runAction);
+  deletePtr (m_sensDetActions);
+  deletePtr (m_context);
   m_lcdd.destroyInstance();
   InstanceCount::decrement(this);
 }
 
 /// Instance accessor
-Geant4Kernel& Geant4Kernel::instance(LCDD& lcdd)    {
+Geant4Kernel& Geant4Kernel::instance(LCDD& lcdd) {
   static Geant4Kernel obj(lcdd);
   return obj;
 }
 
 /// Accessof the Geant4Kernel object from the LCDD reference extension (if present and registered)
-Geant4Kernel& Geant4Kernel::access(LCDD& lcdd)   {
+Geant4Kernel& Geant4Kernel::access(LCDD& lcdd) {
   Geant4Kernel* kernel = lcdd.extension<Geant4Kernel>();
-  if ( !kernel )  {
-    throw runtime_error(format("Geant4Kernel","DDG4: The LCDD object has no registered "
-			       "extension of type Geant4Kernel [No-Extension]"));
+  if (!kernel) {
+    throw runtime_error(format("Geant4Kernel", "DDG4: The LCDD object has no registered "
+        "extension of type Geant4Kernel [No-Extension]"));
   }
   return *kernel;
 }
 
 /// Access to the Geant4 run manager
-G4RunManager& Geant4Kernel::runManager()  {
-  if ( m_runManager ) return *m_runManager;
+G4RunManager& Geant4Kernel::runManager() {
+  if (m_runManager)
+    return *m_runManager;
   return *(m_runManager = new G4RunManager);
 }
 
 /// Construct detector geometry using lcdd plugin
-void Geant4Kernel::loadGeometry(const std::string& compact_file)   {
-  char* arg = (char*)compact_file.c_str();
-  m_lcdd.apply("DD4hepXMLLoader",1,&arg);
+void Geant4Kernel::loadGeometry(const std::string& compact_file) {
+  char* arg = (char*) compact_file.c_str();
+  m_lcdd.apply("DD4hepXMLLoader", 1, &arg);
   //return *this;
 }
 
 // Utility function to load XML files
-void Geant4Kernel::loadXML(const char* fname)   {
-  const char* args[] = {fname,0};
-  m_lcdd.apply("DD4hepXMLLoader",1,(char**)args);
+void Geant4Kernel::loadXML(const char* fname) {
+  const char* args[] = { fname, 0 };
+  m_lcdd.apply("DD4hepXMLLoader", 1, (char**) args);
   //return *this;
 }
 
-void Geant4Kernel::configure()   {
+void Geant4Kernel::configure() {
   Geant4Exec::configure(*this);
   //return *this;
 }
 
-void Geant4Kernel::initialize()   {
+void Geant4Kernel::initialize() {
   Geant4Exec::initialize(*this);
   //return *this;
 }
 
-void Geant4Kernel::run()   {
+void Geant4Kernel::run() {
   Geant4Exec::run(*this);
   //return *this;
 }
 
-void Geant4Kernel::terminate()   {
+void Geant4Kernel::terminate() {
   Geant4Exec::terminate(*this);
   destroyPhases();
-  for_each(m_globalFilters.begin(),m_globalFilters.end(),releaseObjects(m_globalFilters));
-  for_each(m_globalActions.begin(),m_globalActions.end(),releaseObjects(m_globalActions));
-  deletePtr(m_runManager);
-  releasePtr(m_physicsList);
-  releasePtr(m_stackingAction);
-  releasePtr(m_steppingAction);
-  releasePtr(m_trackingAction);
-  releasePtr(m_eventAction);
-  releasePtr(m_generatorAction);
-  releasePtr(m_runAction);
-  deletePtr(m_sensDetActions);
-  deletePtr(m_context);
+  for_each(m_globalFilters.begin(), m_globalFilters.end(), releaseObjects(m_globalFilters));
+  for_each(m_globalActions.begin(), m_globalActions.end(), releaseObjects(m_globalActions));
+  deletePtr (m_runManager);
+  releasePtr (m_physicsList);
+  releasePtr (m_stackingAction);
+  releasePtr (m_steppingAction);
+  releasePtr (m_trackingAction);
+  releasePtr (m_eventAction);
+  releasePtr (m_generatorAction);
+  releasePtr (m_runAction);
+  deletePtr (m_sensDetActions);
+  deletePtr (m_context);
   //return *this;
 }
 
-
-template <class C> bool 
-Geant4Kernel::registerSequence(C*& seq,const std::string& name)  {
-  if ( !name.empty() )   {
-    seq = new C(m_context,name);
+template <class C> bool Geant4Kernel::registerSequence(C*& seq, const std::string& name) {
+  if (!name.empty()) {
+    seq = new C(m_context, name);
+    seq->installMessengers();
     return true;
   }
-  throw runtime_error(format("Geant4Kernel","DDG4: The action '%s' not found. [Action-NotFound]",name.c_str()));
+  throw runtime_error(format("Geant4Kernel", "DDG4: The action '%s' not found. [Action-NotFound]", name.c_str()));
 }
 
 /// Register action by name to be retrieved when setting up and connecting action objects
@@ -176,29 +181,29 @@ Geant4Kernel::registerSequence(C*& seq,const std::string& name)  {
  *  However, not all actions need to registered....
  *  Only register those, you later need to retrieve by name.
  */
-Geant4Kernel& Geant4Kernel::registerGlobalAction(Geant4Action* action)    {
-  if ( action )  {
+Geant4Kernel& Geant4Kernel::registerGlobalAction(Geant4Action* action) {
+  if (action) {
     string nam = action->name();
     GlobalActions::const_iterator i = m_globalActions.find(nam);
-    if ( i == m_globalActions.end() )  {
+    if (i == m_globalActions.end()) {
       action->addRef();
       m_globalActions[nam] = action;
       return *this;
     }
-    throw runtime_error(format("Geant4Kernel","DDG4: The action '%s' is already globally "
-			       "registered. [Action-Already-Registered]",nam.c_str()));
+    throw runtime_error(format("Geant4Kernel", "DDG4: The action '%s' is already globally "
+        "registered. [Action-Already-Registered]", nam.c_str()));
   }
-  throw runtime_error(format("Geant4Kernel","DDG4: Attempt to globally register an invalid "
-			     "action. [Action-Invalid]"));
+  throw runtime_error(format("Geant4Kernel", "DDG4: Attempt to globally register an invalid "
+      "action. [Action-Invalid]"));
 }
 
 /// Retrieve action from repository
-Geant4Action* Geant4Kernel::globalAction(const std::string& action_name, bool throw_if_not_present)   {
+Geant4Action* Geant4Kernel::globalAction(const std::string& action_name, bool throw_if_not_present) {
   GlobalActions::iterator i = m_globalActions.find(action_name);
-  if ( i == m_globalActions.end() )  {
-    if ( throw_if_not_present )  {
-      throw runtime_error(format("Geant4Kernel","DDG4: The action '%s' is not already globally "
-				 "registered. [Action-Missing]",action_name.c_str()));
+  if (i == m_globalActions.end()) {
+    if (throw_if_not_present) {
+      throw runtime_error(format("Geant4Kernel", "DDG4: The action '%s' is not already globally "
+          "registered. [Action-Missing]", action_name.c_str()));
     }
     return 0;
   }
@@ -210,29 +215,29 @@ Geant4Action* Geant4Kernel::globalAction(const std::string& action_name, bool th
  *  However, not all filters need to registered....
  *  Only register those, you later need to retrieve by name.
  */
-Geant4Kernel& Geant4Kernel::registerGlobalFilter(Geant4Action* filter)    {
-  if ( filter )  {
+Geant4Kernel& Geant4Kernel::registerGlobalFilter(Geant4Action* filter) {
+  if (filter) {
     string nam = filter->name();
     GlobalActions::const_iterator i = m_globalFilters.find(nam);
-    if ( i == m_globalFilters.end() )  {
+    if (i == m_globalFilters.end()) {
       filter->addRef();
       m_globalFilters[nam] = filter;
       return *this;
     }
-    throw runtime_error(format("Geant4Kernel","DDG4: The filter '%s' is already globally "
-			       "registered. [Filter-Already-Registered]",nam.c_str()));
+    throw runtime_error(format("Geant4Kernel", "DDG4: The filter '%s' is already globally "
+        "registered. [Filter-Already-Registered]", nam.c_str()));
   }
-  throw runtime_error(format("Geant4Kernel","DDG4: Attempt to globally register an invalid "
-			     "filter. [Filter-Invalid]"));
+  throw runtime_error(format("Geant4Kernel", "DDG4: Attempt to globally register an invalid "
+      "filter. [Filter-Invalid]"));
 }
 
 /// Retrieve filter from repository
-Geant4Action* Geant4Kernel::globalFilter(const std::string& filter_name, bool throw_if_not_present)   {
+Geant4Action* Geant4Kernel::globalFilter(const std::string& filter_name, bool throw_if_not_present) {
   GlobalActions::iterator i = m_globalFilters.find(filter_name);
-  if ( i == m_globalFilters.end() )  {
-    if ( throw_if_not_present )  {
-      throw runtime_error(format("Geant4Kernel","DDG4: The filter '%s' is not already globally "
-				 "registered. [Filter-Missing]",filter_name.c_str()));
+  if (i == m_globalFilters.end()) {
+    if (throw_if_not_present) {
+      throw runtime_error(format("Geant4Kernel", "DDG4: The filter '%s' is not already globally "
+          "registered. [Filter-Missing]", filter_name.c_str()));
     }
     return 0;
   }
@@ -240,35 +245,35 @@ Geant4Action* Geant4Kernel::globalFilter(const std::string& filter_name, bool th
 }
 
 /// Access phase by name
-Geant4ActionPhase* Geant4Kernel::getPhase(const std::string& nam)    {
-  Phases::const_iterator i=m_phases.find(nam);
-  if ( i != m_phases.end() )  {
+Geant4ActionPhase* Geant4Kernel::getPhase(const std::string& nam) {
+  Phases::const_iterator i = m_phases.find(nam);
+  if (i != m_phases.end()) {
     return (*i).second;
   }
-  throw runtime_error(format("Geant4Kernel","DDG4: The Geant4 action phase '%s' "
-			     "does not exist. [No-Entry]", nam.c_str()));
+  throw runtime_error(format("Geant4Kernel", "DDG4: The Geant4 action phase '%s' "
+      "does not exist. [No-Entry]", nam.c_str()));
 }
 
-/// Add a new phase 
-Geant4ActionPhase* Geant4Kernel::addPhase(const std::string& nam, const type_info& arg0, 
-					  const type_info& arg1, const type_info& arg2, bool throw_on_exist)  {
+/// Add a new phase
+Geant4ActionPhase* Geant4Kernel::addPhase(const std::string& nam, const type_info& arg0, const type_info& arg1,
+    const type_info& arg2, bool throw_on_exist) {
   Phases::const_iterator i = m_phases.find(nam);
-  if ( i == m_phases.end() )  {
-    Geant4ActionPhase* p = new Geant4ActionPhase(m_context,nam,arg0,arg1,arg2);
-    m_phases.insert(make_pair(nam,p));
+  if (i == m_phases.end()) {
+    Geant4ActionPhase* p = new Geant4ActionPhase(m_context, nam, arg0, arg1, arg2);
+    m_phases.insert(make_pair(nam, p));
     return p;
   }
-  else if ( throw_on_exist )  {
-    throw runtime_error(format("Geant4Kernel","DDG4: The Geant4 action phase %s "
-			       "already exists. [Already-Exists]", nam.c_str()));
+  else if (throw_on_exist) {
+    throw runtime_error(format("Geant4Kernel", "DDG4: The Geant4 action phase %s "
+        "already exists. [Already-Exists]", nam.c_str()));
   }
   return (*i).second;
 }
 
 /// Remove an existing phase from the phase. If not existing returns false
-bool Geant4Kernel::removePhase(const std::string& nam)  {
-  Phases::iterator i=m_phases.find(nam);
-  if ( i != m_phases.end() )  {
+bool Geant4Kernel::removePhase(const std::string& nam) {
+  Phases::iterator i = m_phases.find(nam);
+  if (i != m_phases.end()) {
     delete (*i).second;
     m_phases.erase(i);
     return true;
@@ -277,63 +282,71 @@ bool Geant4Kernel::removePhase(const std::string& nam)  {
 }
 
 /// Destroy all phases. To be called only at shutdown
-void Geant4Kernel::destroyPhases()   {
-  for_each(m_phases.begin(),m_phases.end(),destroyObjects(m_phases));
+void Geant4Kernel::destroyPhases() {
+  for_each(m_phases.begin(), m_phases.end(), destroyObjects(m_phases));
 }
 
 /// Access generator action sequence
-Geant4GeneratorActionSequence* Geant4Kernel::generatorAction(bool create)  {
-  if ( !m_generatorAction && create ) registerSequence(m_generatorAction,"GeneratorAction");
+Geant4GeneratorActionSequence* Geant4Kernel::generatorAction(bool create) {
+  if (!m_generatorAction && create)
+    registerSequence(m_generatorAction, "GeneratorAction");
   return m_generatorAction;
 }
 
 /// Access run action sequence
-Geant4RunActionSequence* Geant4Kernel::runAction(bool create)  {
-  if ( !m_runAction && create ) registerSequence(m_runAction,"RunAction");
+Geant4RunActionSequence* Geant4Kernel::runAction(bool create) {
+  if (!m_runAction && create)
+    registerSequence(m_runAction, "RunAction");
   return m_runAction;
 }
 
 /// Access event action sequence
-Geant4EventActionSequence* Geant4Kernel::eventAction(bool create)  {
-  if ( !m_eventAction && create ) registerSequence(m_eventAction,"EventAction");
+Geant4EventActionSequence* Geant4Kernel::eventAction(bool create) {
+  if (!m_eventAction && create)
+    registerSequence(m_eventAction, "EventAction");
   return m_eventAction;
 }
 
 /// Access stepping action sequence
-Geant4SteppingActionSequence* Geant4Kernel::steppingAction(bool create)  {
-  if ( !m_steppingAction && create ) registerSequence(m_steppingAction,"SteppingAction");
+Geant4SteppingActionSequence* Geant4Kernel::steppingAction(bool create) {
+  if (!m_steppingAction && create)
+    registerSequence(m_steppingAction, "SteppingAction");
   return m_steppingAction;
 }
 
 /// Access tracking action sequence
-Geant4TrackingActionSequence* Geant4Kernel::trackingAction(bool create)  {
-  if ( !m_trackingAction && create ) registerSequence(m_trackingAction,"TrackingAction");
+Geant4TrackingActionSequence* Geant4Kernel::trackingAction(bool create) {
+  if (!m_trackingAction && create)
+    registerSequence(m_trackingAction, "TrackingAction");
   return m_trackingAction;
 }
 
 /// Access stacking action sequence
-Geant4StackingActionSequence* Geant4Kernel::stackingAction(bool create)  {
-  if ( !m_stackingAction && create ) registerSequence(m_stackingAction,"StackingAction");
+Geant4StackingActionSequence* Geant4Kernel::stackingAction(bool create) {
+  if (!m_stackingAction && create)
+    registerSequence(m_stackingAction, "StackingAction");
   return m_stackingAction;
 }
 
 /// Access to the sensitive detector sequences from the kernel object
-Geant4SensDetSequences& Geant4Kernel::sensitiveActions() const   {
+Geant4SensDetSequences& Geant4Kernel::sensitiveActions() const {
   return *m_sensDetActions;
 }
 
 /// Access to the sensitive detector action from the kernel object
-Geant4SensDetActionSequence* Geant4Kernel::sensitiveAction(const string& nam) const   {
+Geant4SensDetActionSequence* Geant4Kernel::sensitiveAction(const string& nam) const {
   Geant4SensDetActionSequence* ptr = m_sensDetActions->find(nam);
-  if ( ptr ) return ptr;
-  ptr = new Geant4SensDetActionSequence(context(),nam);
-  m_sensDetActions->insert(nam,ptr);
+  if (ptr)
+    return ptr;
+  ptr = new Geant4SensDetActionSequence(context(), nam);
+  m_sensDetActions->insert(nam, ptr);
   return ptr;
 }
 
 /// Access to the physics list
-Geant4PhysicsListActionSequence* Geant4Kernel::physicsList(bool create)   {
-  if ( !m_physicsList && create ) registerSequence(m_physicsList,"PhysicsList");
+Geant4PhysicsListActionSequence* Geant4Kernel::physicsList(bool create) {
+  if (!m_physicsList && create)
+    registerSequence(m_physicsList, "PhysicsList");
   return m_physicsList;
 }
 
diff --git a/DDG4/src/Geant4Mapping.cpp b/DDG4/src/Geant4Mapping.cpp
index 18bfab246c3a140cb4943f242924e67a0a3439ef..183fb3bdc6e8bac8aba49383f3d8d5ac0a02f283 100644
--- a/DDG4/src/Geant4Mapping.cpp
+++ b/DDG4/src/Geant4Mapping.cpp
@@ -17,64 +17,68 @@ using namespace DD4hep::Geometry;
 using namespace std;
 
 /// Initializing Constructor
-Geant4Mapping::Geant4Mapping(LCDD& lcdd) : m_lcdd(lcdd), m_dataPtr(0)
-{
+Geant4Mapping::Geant4Mapping(LCDD& lcdd)
+    : m_lcdd(lcdd), m_dataPtr(0) {
 }
 
 /// Standard destructor
-Geant4Mapping::~Geant4Mapping()  {
-  if ( m_dataPtr ) delete m_dataPtr;
+Geant4Mapping::~Geant4Mapping() {
+  if (m_dataPtr)
+    delete m_dataPtr;
   m_dataPtr = 0;
 }
 
 /// Possibility to define a singleton instance
-Geant4Mapping& Geant4Mapping::instance()  {
+Geant4Mapping& Geant4Mapping::instance() {
   static Geant4Mapping inst(LCDD::getInstance());
   return inst;
 }
 
 /// When resolving pointers, we must check for the validity of the data block
-void Geant4Mapping::checkValidity() const   {
-  if ( m_dataPtr ) return;
+void Geant4Mapping::checkValidity() const {
+  if (m_dataPtr)
+    return;
   throw runtime_error("Geant4Mapping: Attempt to access an invalid data block!");
 }
 
 /// Create new data block. Delete old data block if present.
-Geant4GeometryInfo& Geant4Mapping::init()  {
+Geant4GeometryInfo& Geant4Mapping::init() {
   Geant4GeometryInfo* p = detach();
-  if ( p ) delete p;
+  if (p)
+    delete p;
   attach(new Geant4GeometryInfo());
   return data();
 }
 
 /// Release data and pass over the ownership
-Geant4GeometryInfo* Geant4Mapping::detach()   {
+Geant4GeometryInfo* Geant4Mapping::detach() {
   Geant4GeometryInfo* p = m_dataPtr;
   m_dataPtr = 0;
   return p;
 }
 
 /// Set a new data block
-void Geant4Mapping::attach(Geant4GeometryInfo* data)   {
+void Geant4Mapping::attach(Geant4GeometryInfo* data) {
   m_dataPtr = data;
 }
 
 /// Access the volume manager
-Geant4VolumeManager Geant4Mapping::volumeManager() const   {
-  if ( m_dataPtr )  {
-    if ( m_dataPtr->g4Paths.empty() )  {
-      return Geant4VolumeManager(m_lcdd,m_dataPtr);
+Geant4VolumeManager Geant4Mapping::volumeManager() const {
+  if (m_dataPtr) {
+    if (m_dataPtr->g4Paths.empty()) {
+      return Geant4VolumeManager(m_lcdd, m_dataPtr);
     }
-    return Geant4VolumeManager(Geometry::Handle<Geant4GeometryInfo>(m_dataPtr));
+    return Geant4VolumeManager(Geometry::Handle < Geant4GeometryInfo > (m_dataPtr));
   }
-  throw runtime_error(format("Geant4Mapping","Cannot create volume manager without Geant4 geometry info [Invalid-Info]"));
+  throw runtime_error(format("Geant4Mapping", "Cannot create volume manager without Geant4 geometry info [Invalid-Info]"));
 }
 
 /// Accessor to resolve geometry placements
-PlacedVolume Geant4Mapping::placement(const G4VPhysicalVolume* node)  const   {
+PlacedVolume Geant4Mapping::placement(const G4VPhysicalVolume* node) const {
   checkValidity();
   const PlacementMap& m = m_dataPtr->g4Placements;
-  for(PlacementMap::const_iterator i = m.begin(); i != m.end(); ++i)
-    if ( (*i).second == node ) return PlacedVolume((*i).first);
+  for (PlacementMap::const_iterator i = m.begin(); i != m.end(); ++i)
+    if ((*i).second == node)
+      return PlacedVolume((*i).first);
   return PlacedVolume(0);
 }
diff --git a/DDG4/src/Geant4Output2ROOT.cpp b/DDG4/src/Geant4Output2ROOT.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e4e180823794637898497f6fa38cee5496f23dba
--- /dev/null
+++ b/DDG4/src/Geant4Output2ROOT.cpp
@@ -0,0 +1,142 @@
+// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+
+// Framework include files
+#include "DD4hep/Primitives.h"
+#include "DD4hep/InstanceCount.h"
+#include "DDG4/Geant4HitCollection.h"
+#include "DDG4/Geant4Output2ROOT.h"
+// Geant4 include files
+#include "G4HCofThisEvent.hh"
+
+// ROOT include files
+#include "TFile.h"
+#include "TTree.h"
+#include "TBranch.h"
+
+using namespace DD4hep::Simulation;
+using namespace DD4hep;
+using namespace std;
+
+/// Standard constructor
+Geant4Output2ROOT::Geant4Output2ROOT(Geant4Context* context, const string& nam)
+    : Geant4OutputAction(context, nam), m_file(0), m_tree(0) {
+  declareProperty("Section", m_section = "EVENT");
+  InstanceCount::increment(this);
+}
+
+/// Default destructor
+Geant4Output2ROOT::~Geant4Output2ROOT() {
+  InstanceCount::decrement(this);
+  if (m_file) {
+    TDirectory::TContext context(m_file);
+    m_tree->Write();
+    m_file->Close();
+    m_tree = 0;
+    deletePtr (m_file);
+  }
+}
+
+/// Create/access tree by name
+TTree* Geant4Output2ROOT::section(const std::string& nam) {
+  Sections::const_iterator i = m_sections.find(nam);
+  if (i == m_sections.end()) {
+    TDirectory::TContext context(m_file);
+    TTree* t = new TTree(nam.c_str(), ("Geant4 " + nam + " information").c_str());
+    m_sections.insert(make_pair(nam, t));
+    return t;
+  }
+  return (*i).second;
+}
+
+/// Callback to store the Geant4 run information
+void Geant4Output2ROOT::beginRun(const G4Run* run) {
+  if (!m_file && !m_output.empty()) {
+    TDirectory::TContext context(TDirectory::CurrentDirectory());
+    m_file = TFile::Open(m_output.c_str(), "RECREATE", "DD4hep Simulation data");
+    if (m_file->IsZombie()) {
+      deletePtr (m_file);
+      throw runtime_error("Failed to open ROOT output file:'" + m_output + "'");
+    }
+    m_tree = section("EVENT");
+  }
+  Geant4OutputAction::beginRun(run);
+}
+
+/// Fill single EVENT branch entry (Geant4 collection data)
+int Geant4Output2ROOT::fill(const std::string& nam, const ComponentCast& type, void* ptr) {
+  if (m_file) {
+    TBranch* b = 0;
+    Branches::const_iterator i = m_branches.find(nam);
+    if (i == m_branches.end()) {
+      TClass* cl = TBuffer::GetClass(type.type);
+      if (cl) {
+        b = m_tree->Branch(nam.c_str(), cl->GetName(), (void*) 0);
+        b->SetAutoDelete(false);
+        m_branches.insert(make_pair(nam, b));
+      }
+      else {
+        throw runtime_error("No ROOT TClass object availible for object type:" + typeinfoName(type.type));
+      }
+    }
+    else {
+      b = (*i).second;
+    }
+    Long64_t evt = b->GetEntries(), nevt = b->GetTree()->GetEntries(), num = nevt - evt;
+    if (nevt > evt) {
+      b->SetAddress(0);
+      while (num > 0) {
+        b->Fill();
+        --num;
+      }
+    }
+    b->SetAddress(&ptr);
+    int nbytes = b->Fill();
+    if (nbytes < 0) {
+      throw runtime_error("Failed to write ROOT collection:" + nam + "!");
+    }
+    return nbytes;
+  }
+  return 0;
+}
+
+/// Commit data at end of filling procedure
+void Geant4Output2ROOT::commit(OutputContext<G4Event>& ctxt) {
+  if (m_file) {
+    TObjArray* a = m_tree->GetListOfBranches();
+    Long64_t evt = m_tree->GetEntries() + 1;
+    Int_t nb = a->GetEntriesFast();
+    /// Fill NULL pointers to all branches, which have less entries than the Event branch
+    for (Int_t i = 0; i < nb; ++i) {
+      TBranch* br_ptr = (TBranch*) a->UncheckedAt(i);
+      Long64_t br_evt = br_ptr->GetEntries();
+      if (br_evt < evt) {
+        Long64_t num = evt - br_evt;
+        br_ptr->SetAddress(0);
+        while (num > 0) {
+          br_ptr->Fill();
+          --num;
+        }
+      }
+    }
+    m_tree->SetEntries(evt);
+  }
+  Geant4OutputAction::commit(ctxt);
+}
+
+/// Callback to store each Geant4 hit collection
+void Geant4Output2ROOT::saveCollection(OutputContext<G4Event>& /* ctxt */, G4VHitsCollection* collection) {
+  Geant4HitCollection* coll = dynamic_cast<Geant4HitCollection*>(collection);
+  std::string hc_nam = collection->GetName();
+  std::vector<void*> hits;
+  if (coll) {
+    coll->getHitsUnchecked(hits);
+    fill(hc_nam, coll->vector_type(), &hits);
+  }
+}
diff --git a/DDG4/src/Geant4OutputAction.cpp b/DDG4/src/Geant4OutputAction.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d0c61b8395838817fec894c2aede6791a82777f2
--- /dev/null
+++ b/DDG4/src/Geant4OutputAction.cpp
@@ -0,0 +1,77 @@
+// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+
+// Framework include files
+#include "DD4hep/InstanceCount.h"
+#include "DDG4/Geant4RunAction.h"
+#include "DDG4/Geant4OutputAction.h"
+
+// Geant 4 includes
+#include "G4HCofThisEvent.hh"
+#include "G4Event.hh"
+
+using namespace DD4hep::Simulation;
+using namespace DD4hep;
+using namespace std;
+
+/// Standard constructor
+Geant4OutputAction::Geant4OutputAction(Geant4Context* ctxt, const string& nam)
+    : Geant4EventAction(ctxt, nam) {
+  InstanceCount::increment(this);
+  declareProperty("Output", m_output);
+  context()->runAction().callAtBegin(this, &Geant4OutputAction::beginRun);
+  context()->runAction().callAtEnd(this, &Geant4OutputAction::endRun);
+}
+
+/// Default destructor
+Geant4OutputAction::~Geant4OutputAction() {
+  InstanceCount::decrement(this);
+}
+
+/// begin-of-event callback
+void Geant4OutputAction::begin(const G4Event* /* event */) {
+}
+
+/// End-of-event callback
+void Geant4OutputAction::end(const G4Event* evt) {
+  OutputContext < G4Event > ctxt(evt);
+  G4HCofThisEvent* hce = evt->GetHCofThisEvent();
+  int nCol = hce->GetNumberOfCollections();
+  saveEvent(ctxt);
+  for (int i = 0; i < nCol; ++i) {
+    G4VHitsCollection* hc = hce->GetHC(i);
+    saveCollection(ctxt, hc);
+  }
+  commit(ctxt);
+}
+
+/// Commit data at end of filling procedure
+void Geant4OutputAction::commit(OutputContext<G4Event>& /* ctxt */) {
+}
+
+/// Callback to initialize the storing of the Geant4 information
+void Geant4OutputAction::beginRun(const G4Run* /* run */) {
+}
+
+/// Callback to store the Geant4 run information
+void Geant4OutputAction::endRun(const G4Run* /* run */) {
+}
+
+/// Callback to store the Geant4 run information
+void Geant4OutputAction::saveRun(const G4Run* /* run */) {
+}
+
+/// Callback to store the Geant4 event
+void Geant4OutputAction::saveEvent(OutputContext<G4Event>& /* ctxt */) {
+}
+
+/// Callback to store each Geant4 hit collection
+void Geant4OutputAction::saveCollection(OutputContext<G4Event>& /* ctxt */, G4VHitsCollection* /* collection */) {
+}
+
diff --git a/DDG4/src/Geant4ParticleGun.cpp b/DDG4/src/Geant4ParticleGun.cpp
index f502c87065b7a42a2a84f3a6de0ae5e4be326477..0dfd09317424fdd20aa64421f04eb83b7a3d91e2 100644
--- a/DDG4/src/Geant4ParticleGun.cpp
+++ b/DDG4/src/Geant4ParticleGun.cpp
@@ -1,63 +1,3 @@
-// $Id: Geant4Hits.h 513 2013-04-05 14:31:53Z gaede $
-//====================================================================
-//  AIDA Detector description implementation
-//--------------------------------------------------------------------
-//
-//  Author     : M.Frank
-//
-//====================================================================
-#ifndef DD4HEP_DDG4_GEANT4PARTICLEGUN_H
-#define DD4HEP_DDG4_GEANT4PARTICLEGUN_H
-
-// Framework include files
-#include "DDG4/Geant4GeneratorAction.h"
-
-// Forward declarations
-class G4ParticleDefinition;
-class G4ParticleGun;
-
-/*
- *   DD4hep namespace declaration
- */
-namespace DD4hep {
-
-  /*
-   *   Simulation namespace declaration
-   */
-  namespace Simulation   {
-    /** @class Geant4ParticleGun Geant4ParticleGun.h DDG4/Geant4ParticleGun.h
-     * 
-     * Implementation wrapper of the Geant4 particle gun
-     *
-     * @author  M.Frank
-     * @version 1.0
-     */
-    class Geant4ParticleGun : public Geant4GeneratorAction  {
-    protected:
-      /// Position and shooting direction of the gun
-      struct { double x,y,z; } m_position, m_direction;
-      /// Particle energy
-      double                   m_energy;
-      /// Desired multiplicity of the particles to be shot
-      int                      m_multiplicity;
-      /// Particle name
-      std::string              m_particleName;
-      /// Pointer to geant4 particle definition
-      G4ParticleDefinition*    m_particle;
-      /// Pointer to the particle gun itself
-      G4ParticleGun*           m_gun;
-    public:
-      /// Standard constructor
-      Geant4ParticleGun(Geant4Context* context, const std::string& name);
-      /// Default destructor
-      virtual ~Geant4ParticleGun();
-      /// Callback to generate primary particles
-      virtual void operator()(G4Event* event);
-    };
-  }    // End namespace Simulation
-}      // End namespace DD4hep
-#endif /* DD4HEP_DDG4_GEANT4PARTICLEGUN_H  */
-
 // $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
 //====================================================================
 //  AIDA Detector description implementation for LCD
@@ -69,8 +9,7 @@ namespace DD4hep {
 
 // Framework include files
 #include "DD4hep/InstanceCount.h"
-//#include "DDG4/Geant4ParticleGun.h"
-#include "DDG4/Factories.h"
+#include "DDG4/Geant4ParticleGun.h"
 
 #include "G4ParticleGun.hh"
 #include "G4ParticleTable.hh"
@@ -81,45 +20,44 @@ namespace DD4hep {
 
 using namespace DD4hep::Simulation;
 
-DECLARE_GEANT4ACTION(Geant4ParticleGun)
-
 /// Standard constructor
 Geant4ParticleGun::Geant4ParticleGun(Geant4Context* context, const std::string& name)
-: Geant4GeneratorAction(context,name), m_particle(0), m_gun(0)
-{
+    : Geant4GeneratorAction(context, name), m_particle(0), m_gun(0) {
   InstanceCount::increment(this);
-  declareProperty("energy",       m_energy=50*MeV);
-  declareProperty("multiplicity", m_multiplicity=1);
-  declareProperty("pos_x",        m_position.x = 0);
-  declareProperty("pos_y",        m_position.y = 0);
-  declareProperty("pos_z",        m_position.z = 0);
-  declareProperty("direction_x",  m_direction.x = 1);
-  declareProperty("direction_y",  m_direction.y = 1);
-  declareProperty("direction_z",  m_direction.z = 0.3);
-  declareProperty("particle",     m_particleName= "e-");
+  m_needsControl = true;
+  declareProperty("energy", m_energy = 50 * MeV);
+  declareProperty("multiplicity", m_multiplicity = 1);
+  declareProperty("pos_x", m_position.x = 0);
+  declareProperty("pos_y", m_position.y = 0);
+  declareProperty("pos_z", m_position.z = 0);
+  declareProperty("direction_x", m_direction.x = 1);
+  declareProperty("direction_y", m_direction.y = 1);
+  declareProperty("direction_z", m_direction.z = 0.3);
+  declareProperty("particle", m_particleName = "e-");
 }
 
 /// Default destructor
-Geant4ParticleGun::~Geant4ParticleGun()  {
-  if ( m_gun ) delete m_gun;
+Geant4ParticleGun::~Geant4ParticleGun() {
+  if (m_gun)
+    delete m_gun;
   InstanceCount::decrement(this);
 }
 
 /// Callback to generate primary particles
-void  Geant4ParticleGun::operator()(G4Event* event) { 
-  if ( 0 == m_gun ) {
+void Geant4ParticleGun::operator()(G4Event* event) {
+  if (0 == m_gun) {
     m_gun = new G4ParticleGun(m_multiplicity);
   }
-  if ( 0 == m_particle || m_particle->GetParticleName() != m_particleName.c_str() )  {
+  if (0 == m_particle || m_particle->GetParticleName() != m_particleName.c_str()) {
     G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
     m_particle = particleTable->FindParticle(m_particleName);
-    if ( 0 == m_particle )   {
+    if (0 == m_particle) {
       throw std::runtime_error("Bad particle type!");
     }
   }
   m_gun->SetParticleDefinition(m_particle);
   m_gun->SetParticleEnergy(m_energy);
-  m_gun->SetParticleMomentumDirection(G4ThreeVector(m_direction.x,m_direction.y,m_direction.z));
-  m_gun->SetParticlePosition(G4ThreeVector(m_position.x,m_position.y,m_position.z));
+  m_gun->SetParticleMomentumDirection(G4ThreeVector(m_direction.x, m_direction.y, m_direction.z));
+  m_gun->SetParticlePosition(G4ThreeVector(m_position.x, m_position.y, m_position.z));
   m_gun->GeneratePrimaryVertex(event);
 }
diff --git a/DDG4/src/Geant4PhysicsList.cpp b/DDG4/src/Geant4PhysicsList.cpp
index aa8c0290444a887c9e830014768f7ec5143d0d0d..410e65d146a89da88e00d85a3ecd60ce02a21985 100644
--- a/DDG4/src/Geant4PhysicsList.cpp
+++ b/DDG4/src/Geant4PhysicsList.cpp
@@ -28,32 +28,29 @@ using namespace DD4hep;
 using namespace DD4hep::Simulation;
 
 namespace {
-  void _findDef(const string& expression, vector<G4ParticleDefinition*>& results)  {
-    string exp = expression; //'^'+expression+"$";
+  void _findDef(const string& expression, vector<G4ParticleDefinition*>& results) {
+    string exp = expression;   //'^'+expression+"$";
     G4ParticleTable* pt = G4ParticleTable::GetParticleTable();
     G4ParticleTable::G4PTblDicIterator* iter = pt->GetIterator();
     char msgbuf[128];
     regex_t reg;
-    int ret = ::regcomp(&reg,exp.c_str(),0);
-    if ( ret )   {
-      throw runtime_error(format("Geant4PhysicsList",
-				 "REGEX: Failed to compile particle name %s",exp.c_str()));
+    int ret = ::regcomp(&reg, exp.c_str(), 0);
+    if (ret) {
+      throw runtime_error(format("Geant4PhysicsList", "REGEX: Failed to compile particle name %s", exp.c_str()));
     }
     results.clear();
     iter->reset();
-    while( (*iter)() ){
+    while ((*iter)()) {
       G4ParticleDefinition* p = iter->value();
-      ret = ::regexec(&reg,p->GetParticleName().c_str(), 0, NULL, 0);
-      if( !ret ) 
-	results.push_back(p);
-      else if( ret == REG_NOMATCH )
-	continue;
-      else  {
-	::regerror(ret, &reg, msgbuf, sizeof(msgbuf));
-	::regfree(&reg);
-	throw runtime_error(format("Geant4PhysicsList",
-				   "REGEX: Failed to match particle name %s err=%s",
-				   exp.c_str(),msgbuf));
+      ret = ::regexec(&reg, p->GetParticleName().c_str(), 0, NULL, 0);
+      if (!ret)
+        results.push_back(p);
+      else if (ret == REG_NOMATCH)
+        continue;
+      else {
+        ::regerror(ret, &reg, msgbuf, sizeof(msgbuf));
+        ::regfree(&reg);
+        throw runtime_error(format("Geant4PhysicsList", "REGEX: Failed to match particle name %s err=%s", exp.c_str(), msgbuf));
       }
     }
     ::regfree(&reg);
@@ -61,250 +58,128 @@ namespace {
 }
 
 /// Standard constructor with initailization parameters
-Geant4UserPhysics::Geant4UserPhysics()
-{
+Geant4UserPhysics::Geant4UserPhysics() {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4UserPhysics::~Geant4UserPhysics()   {
+Geant4UserPhysics::~Geant4UserPhysics() {
   InstanceCount::decrement(this);
 }
 
 /// Default constructor
-Geant4PhysicsList::Process::Process() : ordAtRestDoIt(-1), ordAlongSteptDoIt(-1), ordPostStepDoIt(-1) 
-{
+Geant4PhysicsList::Process::Process()
+    : ordAtRestDoIt(-1), ordAlongSteptDoIt(-1), ordPostStepDoIt(-1) {
 }
 /// Copy constructor
-Geant4PhysicsList::Process::Process(const Process& p) 
-: name(p.name), ordAtRestDoIt(p.ordAtRestDoIt), 
-  ordAlongSteptDoIt(p.ordAlongSteptDoIt), ordPostStepDoIt(p.ordPostStepDoIt) 
-{
+Geant4PhysicsList::Process::Process(const Process& p)
+    : name(p.name), ordAtRestDoIt(p.ordAtRestDoIt), ordAlongSteptDoIt(p.ordAlongSteptDoIt), ordPostStepDoIt(p.ordPostStepDoIt) {
 }
 
 /// Assignment operator
-Geant4PhysicsList::Process& Geant4PhysicsList::Process::operator=(const Process& p)  {
-  name              = p.name;
-  ordAtRestDoIt     = p.ordAtRestDoIt;
+Geant4PhysicsList::Process& Geant4PhysicsList::Process::operator=(const Process& p) {
+  name = p.name;
+  ordAtRestDoIt = p.ordAtRestDoIt;
   ordAlongSteptDoIt = p.ordAlongSteptDoIt;
-  ordPostStepDoIt   = p.ordPostStepDoIt;
+  ordPostStepDoIt = p.ordPostStepDoIt;
   return *this;
 }
 
 /// Standard constructor
 Geant4PhysicsList::Geant4PhysicsList(Geant4Context* context, const string& nam)
-: Geant4Action(context,nam)
-{
+    : Geant4Action(context, nam) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4PhysicsList::~Geant4PhysicsList()  {
+Geant4PhysicsList::~Geant4PhysicsList() {
   InstanceCount::decrement(this);
 }
 
 /// Access processes for one particle type
-Geant4PhysicsList::ParticleProcesses& Geant4PhysicsList::processes(const string& nam)
-{
+Geant4PhysicsList::ParticleProcesses& Geant4PhysicsList::processes(const string& nam) {
   PhysicsProcesses::iterator i = m_processes.find(nam);
-  if ( i != m_processes.end() )  {
+  if (i != m_processes.end()) {
     return (*i).second;
   }
-  pair<PhysicsProcesses::iterator,bool> ret = 
-    m_processes.insert(make_pair(nam,ParticleProcesses()));
+  pair<PhysicsProcesses::iterator, bool> ret = m_processes.insert(make_pair(nam, ParticleProcesses()));
   return (*(ret.first)).second;
 }
 
 /// Access processes for one particle type (CONST)
-const Geant4PhysicsList::ParticleProcesses& Geant4PhysicsList::processes(const string& nam) const
-{
+const Geant4PhysicsList::ParticleProcesses& Geant4PhysicsList::processes(const string& nam) const {
   PhysicsProcesses::const_iterator i = m_processes.find(nam);
-  if ( i != m_processes.end() )  {
+  if (i != m_processes.end()) {
     return (*i).second;
   }
-  throw runtime_error(format("Geant4PhysicsList",
-			     "Failed to access the physics process '%s' [Unknown-Process]",
-			     nam.c_str()));
+  throw runtime_error(format("Geant4PhysicsList", "Failed to access the physics process '%s' [Unknown-Process]", nam.c_str()));
+}
+
+/// Callback to construct the physics list
+void Geant4PhysicsList::constructProcess(Geant4UserPhysics* physics) {
+  printout(INFO, "Geant4PhysicsList", "%s> constructProcess %p", name().c_str(), physics);
+  constructPhysics(physics);
+  constructProcesses(physics);
 }
 
 /// Callback to construct particle decays
-void Geant4PhysicsList::constructPhysics(Geant4UserPhysics* physics)   {
-  for(PhysicsConstructors::const_iterator i=m_physics.begin(); i != m_physics.end(); ++i)   {
+void Geant4PhysicsList::constructPhysics(Geant4UserPhysics* physics) {
+  for (PhysicsConstructors::const_iterator i = m_physics.begin(); i != m_physics.end(); ++i) {
     const PhysicsConstructors::value_type& ctor = *i;
     G4VPhysicsConstructor* p = PluginService::Create<G4VPhysicsConstructor*>(ctor);
-    if ( !p )    {
-      throw runtime_error(format("Geant4PhysicsList","Failed to create the physics entities "
-				 "for the G4VPhysicsConstructor '%s'",ctor.c_str()));
+    if (!p) {
+      throw runtime_error(format("Geant4PhysicsList", "Failed to create the physics entities "
+          "for the G4VPhysicsConstructor '%s'", ctor.c_str()));
     }
     physics->RegisterPhysics(p);
-    printout(INFO,"Geant4PhysicsList","%s> registered Geant4 physics %s",name().c_str(),ctor.c_str());
+    printout(INFO, "Geant4PhysicsList", "%s> registered Geant4 physics %s", name().c_str(), ctor.c_str());
   }
 }
 
 /// constructParticle callback
-void Geant4PhysicsList::constructParticles(Geant4UserPhysics* physics)   {
-  printout(INFO,"Geant4PhysicsList","%s> constructParticles %p",name().c_str(),physics);
-  for(ParticleConstructors::const_iterator i=m_particles.begin(); i!=m_particles.end(); ++i)   {
+void Geant4PhysicsList::constructParticles(Geant4UserPhysics* physics) {
+  printout(INFO, "Geant4PhysicsList", "%s> constructParticles %p", name().c_str(), physics);
+  /// Now define all particles
+  for (ParticleConstructors::const_iterator i = m_particles.begin(); i != m_particles.end(); ++i) {
     const ParticleConstructors::value_type& ctor = *i;
     G4ParticleDefinition* def = PluginService::Create<G4ParticleDefinition*>(ctor);
-    if ( !def )    {
+    if (!def) {
       /// Check if we have here a particle group constructor
-      long* result =  (long*)PluginService::Create<long>(ctor);
-      if ( !result || *result != 1L )  { 
-	throw runtime_error(format("Geant4PhysicsList","Failed to create particle type '%s' result=%d",
-				   ctor.c_str(),result));
+      long* result = (long*) PluginService::Create<long>(ctor);
+      if (!result || *result != 1L) {
+        throw runtime_error(format("Geant4PhysicsList", "Failed to create particle type '%s' result=%d", ctor.c_str(), result));
       }
     }
-    printout(INFO,"Geant4PhysicsList","%s> constructed Geant4 particle %s",name().c_str(),ctor.c_str());
+    printout(INFO, "Geant4PhysicsList", "%s> constructed Geant4 particle %s", name().c_str(), ctor.c_str());
   }
 }
 
-#if 0
-#include "G4BosonConstructor.hh"
-#include "G4MesonConstructor.hh"
-#include "G4BaryonConstructor.hh"
-#include "G4LeptonConstructor.hh"
-#include "G4OpticalPhoton.hh"
-#include "G4DecayTable.hh"
-#include "G4PhaseSpaceDecayChannel.hh"
-
-  G4BosonConstructor::ConstructParticle();
-  G4LeptonConstructor::ConstructParticle();
-  G4BaryonConstructor::ConstructParticle();
-  G4MesonConstructor::ConstructParticle();
-  G4OpticalPhoton::Definition();
-
-  G4ParticleTable* pt = G4ParticleTable::GetParticleTable();
-  G4ParticleDefinition* d;
-  G4DecayTable* table;
-  G4VDecayChannel* mode;
-  // Bohr Magnetron
-  G4double muB =  0.5*eplus*hbar_Planck/(electron_mass_c2/c_squared) ;   
-  d=new G4ParticleDefinition(
-			   "gamma",        0.0*MeV,       0.0*MeV,         0.0, 
-			   2,              -1,            -1,          
-			   0,               0,             0,             
-			   "gamma",               0,             0,          22,
-			   true,                0.0,          NULL,
-			   false,           "photon",          22
-			   );
-  d=new G4ParticleDefinition(
-			   "geantino",           0.0*MeV,       0.0*MeV,         0.0, 
-			   0,                    0,             0,          
-			   0,                    0,             0,             
-			   "geantino",           0,             0,           0,
-			   true,               0.0,          NULL,
-			   false,        "geantino",            0
-			   );
-  //-----------------------------------------------------------------------------------
-  d=new G4ParticleDefinition(
-			   "e-",  electron_mass_c2,       0.0*MeV,    -1.*eplus, 
-			   1,                 0,             0,          
-			   0,                 0,             0,             
-			   "lepton",                 1,             0,          11,
-			   true,              -1.0,          NULL,
-			   false,                  "e"
-			   );
-  d->SetPDGMagneticMoment( muB * 2.* 1.0011596521859 );
-  //-----------------------------------------------------------------------------------
-  d=new G4ParticleDefinition(
-			   "e+", electron_mass_c2,       0.0*MeV,    +1.*eplus, 
-			   1,                0,             0,          
-			   0,                0,             0,             
-			   "lepton",               -1,             0,          -11,
-			   true,             -1.0,          NULL,
-			   false,              "e"
-			   );
-  d->SetPDGMagneticMoment( muB * 2.* 1.0011596521859 );
-  //-----------------------------------------------------------------------------------
-  d = new G4ParticleDefinition(
-			       "mu+", 0.105658367*GeV, 2.995912e-16*MeV,  +1.*eplus, 
-			       1,               0,                0,          
-			       0,               0,                0,             
-			       "lepton",              -1,                0,        -13,
-			       false,      2197.03*ns,             NULL,
-			       false,           "mu"
-			       );
-  d->SetPDGMagneticMoment( muB * 2.* 1.0011659208);
-  //-----------------------------------------------------------------------------------
-  d = new G4ParticleDefinition(
-			       "mu-", 0.105658367*GeV, 2.995912e-16*MeV,  -1.*eplus, 
-			       1,               0,                0,          
-			       0,               0,                0,             
-			       "lepton",               1,                0,          13,
-			       false,      2197.03*ns,             NULL,
-			       false,           "mu"
-			       );
-  d->SetPDGMagneticMoment( muB * 2. * 1.0011659208);
-  //-----------------------------------------------------------------------------------
-  d = new G4ParticleDefinition(
-			       "pi+",    0.1395701*GeV, 2.5284e-14*MeV,    +1.*eplus,
-			       0,              -1,             0,
-			       2,              +2,            -1,
-			       "meson",               0,             0,         211,
-			       false,       26.033*ns,          NULL,
-			       false,       "pi");
-  table = new G4DecayTable();
-  // create a decay channel
-  // pi+ -> mu+ + nu_mu
-  mode = new G4PhaseSpaceDecayChannel("pi+",1.00,2,"mu+","nu_mu");
-  table->Insert(mode);
-  d->SetDecayTable(table);
-  //-----------------------------------------------------------------------------------
-  d = new G4ParticleDefinition(
-			       "pi-",    0.1395701*GeV, 2.5284e-14*MeV,    -1.*eplus,
-			       0,              -1,             0,
-			       2,              -2,            -1,
-			       "meson",               0,             0,        -211,
-			       false,       26.033*ns,          NULL,
-			       false,       "pi");
-  table = new G4DecayTable();
-  // create a decay channel
-  // pi+ -> mu+ + nu_mu
-  mode = new G4PhaseSpaceDecayChannel("pi-",1.00,2,"mu-","anti_nu_mu");
-  table->Insert(mode);
-  d->SetDecayTable(table);
-  //-----------------------------------------------------------------------------------
-#endif
-
-/// Callback to construct the physics list
-void Geant4PhysicsList::constructProcess(Geant4UserPhysics* physics)   {
-  printout(INFO,"Geant4PhysicsList","%s> constructProcess %p",name().c_str(),physics);
-  constructPhysics(physics);
-  constructProcesses(physics);
-}
-
 /// Callback to construct processes (uses the G4 particle table)
-void Geant4PhysicsList::constructProcesses(Geant4UserPhysics* physics)   {
-  printout(INFO,"Geant4PhysicsList","%s> constructProcesses %p",name().c_str(),physics);
-  for(PhysicsProcesses::const_iterator i = m_processes.begin(); i!=m_processes.end(); ++i)  {
+void Geant4PhysicsList::constructProcesses(Geant4UserPhysics* physics) {
+  printout(INFO, "Geant4PhysicsList", "%s> constructProcesses %p", name().c_str(), physics);
+  for (PhysicsProcesses::const_iterator i = m_processes.begin(); i != m_processes.end(); ++i) {
     const string& part_name = (*i).first;
     const ParticleProcesses& procs = (*i).second;
     vector<G4ParticleDefinition*> defs;
     _findDef(part_name, defs);
-    if ( defs.empty() )   {
+    if (defs.empty()) {
       throw runtime_error(format("Geant4PhysicsList", "Particle:%s "
-				 "Cannot find the corresponding entry in the particle table.",
-				 part_name.c_str()));
+          "Cannot find the corresponding entry in the particle table.", part_name.c_str()));
     }
-    for(vector<G4ParticleDefinition*>::const_iterator id=defs.begin(); id!=defs.end(); ++id)  {
+    for (vector<G4ParticleDefinition*>::const_iterator id = defs.begin(); id != defs.end(); ++id) {
       G4ParticleDefinition* particle = *id;
       G4ProcessManager* mgr = particle->GetProcessManager();
-      for (ParticleProcesses::const_iterator ip=procs.begin(); ip != procs.end(); ++ip)  {
-	const Process& p = (*ip);
-	G4VProcess* g4 = PluginService::Create<G4VProcess*>(p.name);
-	if ( !g4 )  {  // Error no factory for this process
-	  throw runtime_error(format("Geant4PhysicsList","Particle:%s -> [%s] "
-				     "Cannot create physics process %s",
-				     part_name.c_str(),particle->GetParticleName().c_str(),
-				     p.name.c_str()));
-	}
-	mgr->AddProcess(g4,p.ordAtRestDoIt,p.ordAlongSteptDoIt,p.ordPostStepDoIt);
-	printout(INFO,"Geant4PhysicsList","Particle:%s -> [%s] "
-		 "added process %s with flags (%d,%d,%d)",
-		 part_name.c_str(),particle->GetParticleName().c_str(),
-		 p.name.c_str(),p.ordAtRestDoIt,p.ordAlongSteptDoIt,
-		 p.ordPostStepDoIt);
+      for (ParticleProcesses::const_iterator ip = procs.begin(); ip != procs.end(); ++ip) {
+        const Process& p = (*ip);
+        G4VProcess* g4 = PluginService::Create<G4VProcess*>(p.name);
+        if (!g4) {   // Error no factory for this process
+          throw runtime_error(format("Geant4PhysicsList", "Particle:%s -> [%s] "
+              "Cannot create physics process %s", part_name.c_str(), particle->GetParticleName().c_str(), p.name.c_str()));
+        }
+        mgr->AddProcess(g4, p.ordAtRestDoIt, p.ordAlongSteptDoIt, p.ordPostStepDoIt);
+        printout(INFO, "Geant4PhysicsList", "Particle:%s -> [%s] "
+            "added process %s with flags (%d,%d,%d)", part_name.c_str(), particle->GetParticleName().c_str(), p.name.c_str(),
+            p.ordAtRestDoIt, p.ordAlongSteptDoIt, p.ordPostStepDoIt);
       }
     }
   }
@@ -312,15 +187,16 @@ void Geant4PhysicsList::constructProcesses(Geant4UserPhysics* physics)   {
 
 /// Standard constructor
 Geant4PhysicsListActionSequence::Geant4PhysicsListActionSequence(Geant4Context* context, const string& nam)
-: Geant4Action(context,nam), m_transportation(false), m_decays(false) 
-{
+    : Geant4Action(context, nam), m_transportation(false), m_decays(false) {
+  declareProperty("transportation", m_transportation);
+  declareProperty("extends", m_extends);
+  declareProperty("decays", m_decays);
+  m_needsControl = true;
   InstanceCount::increment(this);
-  declareProperty("transportation",m_transportation);
-  declareProperty("decays",m_decays);
 }
 
 /// Default destructor
-Geant4PhysicsListActionSequence::~Geant4PhysicsListActionSequence()   {
+Geant4PhysicsListActionSequence::~Geant4PhysicsListActionSequence() {
   m_actors(&Geant4Action::release);
   m_actors.clear();
   m_process.clear();
@@ -328,8 +204,8 @@ Geant4PhysicsListActionSequence::~Geant4PhysicsListActionSequence()   {
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4PhysicsListActionSequence::adopt(Geant4PhysicsList* action)  {
-  if ( action )  {
+void Geant4PhysicsListActionSequence::adopt(Geant4PhysicsList* action) {
+  if (action) {
     action->addRef();
     m_actors.add(action);
     return;
@@ -338,35 +214,35 @@ void Geant4PhysicsListActionSequence::adopt(Geant4PhysicsList* action)  {
 }
 
 /// begin-of-event callback
-void Geant4PhysicsListActionSequence::constructParticles(Geant4UserPhysics* physics)  {
+void Geant4PhysicsListActionSequence::constructParticles(Geant4UserPhysics* physics) {
   m_particle(physics);
-  m_actors(&Geant4PhysicsList::constructParticles,physics);
+  m_actors(&Geant4PhysicsList::constructParticles, physics);
 }
 
 /// constructProcess callback
-void Geant4PhysicsListActionSequence::constructProcess(Geant4UserPhysics* physics)   {
-  m_actors(&Geant4PhysicsList::constructProcess,physics);
+void Geant4PhysicsListActionSequence::constructProcess(Geant4UserPhysics* physics) {
+  m_actors(&Geant4PhysicsList::constructProcess, physics);
   m_process(physics);
-  if ( m_decays )  {
+  if (m_decays) {
     constructDecays(physics);
   }
-  if ( m_transportation )  {
+  if (m_transportation) {
     physics->AddTransportation();
   }
 }
 
 /// Callback to construct particle decays
-void Geant4PhysicsListActionSequence::constructDecays(Geant4UserPhysics* physics)   {
+void Geant4PhysicsListActionSequence::constructDecays(Geant4UserPhysics* physics) {
   G4ParticleTable* pt = G4ParticleTable::GetParticleTable();
   G4ParticleTable::G4PTblDicIterator* iter = pt->GetIterator();
   // Add Decay Process
   G4Decay* decay = new G4Decay();
-  printout(INFO,"Geant4PhysicsList","%s> constructDecays %p",name().c_str(),physics);
+  printout(INFO, "Geant4PhysicsList", "%s> constructDecays %p", name().c_str(), physics);
   iter->reset();
-  while( (*iter)() )  {
+  while ((*iter)()) {
     G4ParticleDefinition* p = iter->value();
     G4ProcessManager* mgr = p->GetProcessManager();
-    if (decay->IsApplicable(*p)) { 
+    if (decay->IsApplicable(*p)) {
       mgr->AddProcess(decay);
       // set ordering for PostStepDoIt and AtRestDoIt
       mgr->SetProcessOrdering(decay, idxPostStep);
diff --git a/DDG4/src/Geant4Processes.cpp b/DDG4/src/Geant4Processes.cpp
deleted file mode 100644
index 09faecd3ed13737a792c5473f6fe13fa27b2a6a0..0000000000000000000000000000000000000000
--- a/DDG4/src/Geant4Processes.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-// $Id: Factories.h 797 2013-10-03 19:20:32Z markus.frank@cern.ch $
-//====================================================================
-//  AIDA Detector description implementation
-//--------------------------------------------------------------------
-//
-//  Author     : M.Frank
-//
-//====================================================================
-
-// Framework include files
-#include "DDG4/Factories.h"
-
-// Geant4 physics lists
-#include "G4DecayPhysics.hh"
-
-// EM physics 
-#include "G4EmStandardPhysics_option1.hh"
-DECLARE_GEANT4_PHYSICS(G4EmStandardPhysics_option1)
-#include "G4EmStandardPhysics_option2.hh"
-DECLARE_GEANT4_PHYSICS(G4EmStandardPhysics_option2)
-#include "G4EmStandardPhysics_option3.hh"
-DECLARE_GEANT4_PHYSICS(G4EmStandardPhysics_option3)
-#include "G4EmStandardPhysics.hh"
-DECLARE_GEANT4_PHYSICS(G4EmStandardPhysics)
-#include "G4EmExtraPhysics.hh"
-DECLARE_GEANT4_PHYSICS(G4EmExtraPhysics)
-
-
-// Ion and hadrons
-#include "G4IonPhysics.hh"
-DECLARE_GEANT4_PHYSICS(G4IonPhysics)
-#include "G4QStoppingPhysics.hh"
-DECLARE_GEANT4_PHYSICS(G4QStoppingPhysics)
-#include "G4HadronElasticPhysics.hh"
-DECLARE_GEANT4_PHYSICS(G4HadronElasticPhysics)
-#include "G4HadronElasticPhysicsLHEP.hh"
-DECLARE_GEANT4_PHYSICS(G4HadronElasticPhysicsLHEP)
-#include "G4HadronElasticPhysicsHP.hh"
-DECLARE_GEANT4_PHYSICS(G4HadronElasticPhysicsHP)
-#include "G4NeutronTrackingCut.hh"
-DECLARE_GEANT4_PHYSICS(G4NeutronTrackingCut)
-
-// LHEP hadrons
-#include "HadronPhysicsLHEP.hh"
-DECLARE_GEANT4_PHYSICS(HadronPhysicsLHEP)
-
-// QGSP hadrons
-#include "HadronPhysicsQGSP.hh"
-DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP)
-#include "HadronPhysicsQGSP_BERT.hh"
-DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT)
-#include "HadronPhysicsQGSP_BERT_HP.hh"
-DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_HP)
-#include "HadronPhysicsQGSP_BERT_CHIPS.hh"
-DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_BERT_CHIPS)
-#include "HadronPhysicsQGSP_FTFP_BERT.hh"
-DECLARE_GEANT4_PHYSICS(HadronPhysicsQGSP_FTFP_BERT)
-
-// FTFP hadrons
-#include "HadronPhysicsFTFP_BERT.hh"
-DECLARE_GEANT4_PHYSICS(HadronPhysicsFTFP_BERT)
-
-// Photon Processes:
-#include "G4GammaConversion.hh"
-DECLARE_GEANT4_PROCESS(G4GammaConversion)
-#include "G4PhotoElectricEffect.hh"
-DECLARE_GEANT4_PROCESS(G4PhotoElectricEffect)
-#include "G4ComptonScattering.hh"
-DECLARE_GEANT4_PROCESS(G4ComptonScattering)
-#include "G4RayleighScattering.hh"
-DECLARE_GEANT4_PROCESS(G4RayleighScattering)
-#include "G4GammaConversionToMuons.hh"
-DECLARE_GEANT4_PROCESS(G4GammaConversionToMuons)
-
-// Electron/positron processes 
-#include "G4eIonisation.hh"
-DECLARE_GEANT4_PROCESS(G4eIonisation)
-#include "G4eBremsstrahlung.hh"
-DECLARE_GEANT4_PROCESS(G4eBremsstrahlung)
-#include "G4eMultipleScattering.hh"
-DECLARE_GEANT4_PROCESS(G4eMultipleScattering)
-#include "G4eplusAnnihilation.hh"
-DECLARE_GEANT4_PROCESS(G4eplusAnnihilation)
-#include "G4AnnihiToMuPair.hh"
-DECLARE_GEANT4_PROCESS(G4AnnihiToMuPair)
-#include "G4eeToHadrons.hh"
-DECLARE_GEANT4_PROCESS(G4eeToHadrons)
-
-// Muon processes 
-#include "G4MuIonisation.hh"
-DECLARE_GEANT4_PROCESS(G4MuIonisation)
-#include "G4MuBremsstrahlung.hh"
-DECLARE_GEANT4_PROCESS(G4MuBremsstrahlung)
-#include "G4MuPairProduction.hh"
-DECLARE_GEANT4_PROCESS(G4MuPairProduction)
-#include "G4MuMultipleScattering.hh"
-DECLARE_GEANT4_PROCESS(G4MuMultipleScattering)
-
-// Hadron/ion processes 
-#include "G4hIonisation.hh"
-DECLARE_GEANT4_PROCESS(G4hIonisation)
-#include "G4ionIonisation.hh"
-DECLARE_GEANT4_PROCESS(G4ionIonisation)
-#include "G4hhIonisation.hh"
-DECLARE_GEANT4_PROCESS(G4hhIonisation)
-#include "G4mplIonisation.hh"
-DECLARE_GEANT4_PROCESS(G4mplIonisation)
-#include "G4hMultipleScattering.hh"
-DECLARE_GEANT4_PROCESS(G4hMultipleScattering)
-#include "G4hBremsstrahlung.hh"
-DECLARE_GEANT4_PROCESS(G4hBremsstrahlung)
-#include "G4hPairProduction.hh"
-DECLARE_GEANT4_PROCESS(G4hPairProduction)
-
-// Coulomb scattering
-#include "G4CoulombScattering.hh"
-DECLARE_GEANT4_PROCESS(G4CoulombScattering)
-
-// Processes for simulation of polarized electron and gamma beams 
-#include "G4PolarizedCompton.hh"
-DECLARE_GEANT4_PROCESS(G4PolarizedCompton)
-#include "G4PolarizedGammaConversion.hh"
-DECLARE_GEANT4_PROCESS(G4PolarizedGammaConversion)
-#include "G4PolarizedPhotoElectricEffect.hh"
-DECLARE_GEANT4_PROCESS(G4PolarizedPhotoElectricEffect)
-#include "G4ePolarizedBremsstrahlung.hh"
-DECLARE_GEANT4_PROCESS(G4ePolarizedBremsstrahlung)
-#include "G4ePolarizedIonisation.hh"
-DECLARE_GEANT4_PROCESS(G4ePolarizedIonisation)
-#include "G4eplusPolarizedAnnihilation.hh"
-DECLARE_GEANT4_PROCESS(G4eplusPolarizedAnnihilation)
-
-// Processes for simulation of X-rays and optical protons production by charged particles 
-#include "G4SynchrotronRadiation.hh"
-DECLARE_GEANT4_PROCESS(G4SynchrotronRadiation)
-#include "G4TransitionRadiation.hh"
-//DECLARE_GEANT4_PROCESS(G4TransitionRadiation) !!virtual abstract!!
-#include "G4Cerenkov.hh"
-DECLARE_GEANT4_PROCESS(G4Cerenkov)
-#include "G4Scintillation.hh"
-DECLARE_GEANT4_PROCESS(G4Scintillation)
-
-// Others
-#include "G4PAIModel.hh"
-DECLARE_GEANT4_PROCESS(G4PAIModel)
-#include "G4BraggIonGasModel.hh"
-DECLARE_GEANT4_PROCESS(G4BraggIonGasModel)
-#include "G4BetheBlochIonGasModel.hh"
-DECLARE_GEANT4_PROCESS(G4BetheBlochIonGasModel)
-#include "G4WentzelVIModel.hh"
-DECLARE_GEANT4_PROCESS(G4WentzelVIModel)
-#include "G4UrbanMscModel93.hh"
-DECLARE_GEANT4_PROCESS(G4UrbanMscModel93)
-#include "G4hImpactIonisation.hh"
-DECLARE_GEANT4_PROCESS(G4hImpactIonisation)
-
-//#include "G4InversePEEffect.hh"
-//DECLARE_GEANT4_PROCESS(G4InversePEEffect)
-//#include "G4hInverseIonisation.hh"
-//DECLARE_GEANT4_PROCESS(G4hInverseIonisation)
-//#include "G4IonInverseIonisation.hh"
-//DECLARE_GEANT4_PROCESS(G4IonInverseIonisation)
-
-#if 0
-#include ".hh"
-DECLARE_GEANT4_PROCESS()
-#endif
diff --git a/DDG4/src/Geant4RunAction.cpp b/DDG4/src/Geant4RunAction.cpp
index 3341c681f92dde4214668cf5540883490d005b00..638869a1d6dcb42e0a5b719749fb0d5d4d7ba32b 100644
--- a/DDG4/src/Geant4RunAction.cpp
+++ b/DDG4/src/Geant4RunAction.cpp
@@ -17,33 +17,32 @@ using namespace DD4hep::Simulation;
 
 /// Standard constructor
 Geant4RunAction::Geant4RunAction(Geant4Context* context, const std::string& nam)
-: Geant4Action(context,nam)  
-{
+    : Geant4Action(context, nam) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4RunAction::~Geant4RunAction()  {
+Geant4RunAction::~Geant4RunAction() {
   InstanceCount::decrement(this);
 }
 
 /// begin-of-run callback
-void Geant4RunAction::begin(const G4Run* )  {
+void Geant4RunAction::begin(const G4Run*) {
 }
 
 /// End-of-run callback
-void Geant4RunAction::end(const G4Run* )  {
+void Geant4RunAction::end(const G4Run*) {
 }
 
 /// Standard constructor
 Geant4RunActionSequence::Geant4RunActionSequence(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)
-{
+    : Geant4Action(context, name) {
+  m_needsControl = true;
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4RunActionSequence::~Geant4RunActionSequence()  {
+Geant4RunActionSequence::~Geant4RunActionSequence() {
   m_actors(&Geant4RunAction::release);
   m_actors.clear();
   m_begin.clear();
@@ -52,8 +51,8 @@ Geant4RunActionSequence::~Geant4RunActionSequence()  {
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4RunActionSequence::adopt(Geant4RunAction* action)  {
-  if ( action )  {
+void Geant4RunActionSequence::adopt(Geant4RunAction* action) {
+  if (action) {
     action->addRef();
     m_actors.add(action);
     return;
@@ -62,13 +61,13 @@ void Geant4RunActionSequence::adopt(Geant4RunAction* action)  {
 }
 
 /// Pre-track action callback
-void  Geant4RunActionSequence::begin(const G4Run* run)  { 
-  m_actors(&Geant4RunAction::begin,run);
+void Geant4RunActionSequence::begin(const G4Run* run) {
+  m_actors(&Geant4RunAction::begin, run);
   m_begin(run);
 }
 
 /// Post-track action callback
-void  Geant4RunActionSequence::end(const G4Run* run) { 
+void Geant4RunActionSequence::end(const G4Run* run) {
   m_end(run);
-  m_actors(&Geant4RunAction::end,run);
+  m_actors(&Geant4RunAction::end, run);
 }
diff --git a/DDG4/src/Geant4SensDetAction.cpp b/DDG4/src/Geant4SensDetAction.cpp
index 0031edaf71d8f76014ac0849572907188406b9c2..3f7311612dd5c933142e8e60d505eac3791009ed 100644
--- a/DDG4/src/Geant4SensDetAction.cpp
+++ b/DDG4/src/Geant4SensDetAction.cpp
@@ -28,20 +28,21 @@ using namespace DD4hep;
 using namespace DD4hep::Simulation;
 
 namespace {
-  Geant4ActionSD* _getSensitiveDetector(const string& name)   {
+  Geant4ActionSD* _getSensitiveDetector(const string& name) {
     G4SDManager* mgr = G4SDManager::GetSDMpointer();
     G4VSensitiveDetector* sd = mgr->FindSensitiveDetector(name);
-    if ( 0 == sd )   {
-      throw runtime_error(format("Geant4Sensitive","DDG4: You requested to configure actions "
-				 "for the sensitive detector %s,\nDDG4: which is not known to Geant4. "
-				 "Are you sure you already converted the geometry?",name.c_str()));
+    if (0 == sd) {
+      throw runtime_error(format("Geant4Sensitive", "DDG4: You requested to configure actions "
+          "for the sensitive detector %s,\nDDG4: which is not known to Geant4. "
+          "Are you sure you already converted the geometry?", name.c_str()));
     }
     Geant4ActionSD* action_sd = dynamic_cast<Geant4ActionSD*>(sd);
-    if ( 0 == action_sd )    {
-      throw runtime_error(format("Geant4Sensitive","DDG4: You may only configure actions "
-				 "for sensitive detectors of type Geant4ActionSD.\n"
-				 "DDG4: The sensitive detector of %s is of type %s, which is incompatible.",
-				 name.c_str(),typeinfoName(typeid(*sd)).c_str()));
+    if (0 == action_sd) {
+      throw runtime_error(
+          format("Geant4Sensitive", "DDG4: You may only configure actions "
+              "for sensitive detectors of type Geant4ActionSD.\n"
+              "DDG4: The sensitive detector of %s is of type %s, which is incompatible.", name.c_str(),
+              typeinfoName(typeid(*sd)).c_str()));
     }
     return action_sd;
   }
@@ -49,46 +50,41 @@ namespace {
 
 /// Standard action constructor
 Geant4ActionSD::Geant4ActionSD(const std::string& name)
-: Geant4Action(0,name)
-{
+    : Geant4Action(0, name) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4ActionSD::~Geant4ActionSD()
-{
+Geant4ActionSD::~Geant4ActionSD() {
   InstanceCount::decrement(this);
 }
 
 /// Standard constructor
 Geant4Filter::Geant4Filter(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)
-{
+    : Geant4Action(context, name) {
   InstanceCount::increment(this);
 }
 
 /// Standard destructor
-Geant4Filter::~Geant4Filter()   {
+Geant4Filter::~Geant4Filter() {
   InstanceCount::decrement(this);
 }
 
 /// Filter action. Return true if hits should be processed
-bool Geant4Filter::operator()(const G4Step*)  const  {
+bool Geant4Filter::operator()(const G4Step*) const {
   return true;
 }
 
 /// Constructor. The detector element is identified by the name
 Geant4Sensitive::Geant4Sensitive(Geant4Context* ctxt, const string& name, DetElement det, LCDD& lcdd)
-: Geant4Action(ctxt,name), m_sensitiveDetector(0), m_sequence(0), m_lcdd(lcdd), 
-  m_detector(det), m_sensitive(), m_readout()
-{
+    : Geant4Action(ctxt, name), m_sensitiveDetector(0), m_sequence(0), m_lcdd(lcdd), m_detector(det), m_sensitive(), m_readout() {
   InstanceCount::increment(this);
-  if ( !det.isValid() )   {
-    throw runtime_error(format("Geant4Sensitive","DDG4: Detector elemnt for %s is invalid.",name.c_str()));
+  if (!det.isValid()) {
+    throw runtime_error(format("Geant4Sensitive", "DDG4: Detector elemnt for %s is invalid.", name.c_str()));
   }
-  m_sequence  = ctxt->kernel().sensitiveAction(m_detector.name());
+  m_sequence = ctxt->kernel().sensitiveAction(m_detector.name());
   m_sensitive = lcdd.sensitiveDetector(det.name());
-  m_readout   = m_sensitive.readout();
+  m_readout = m_sensitive.readout();
 }
 
 /// Standard destructor
@@ -99,8 +95,8 @@ Geant4Sensitive::~Geant4Sensitive() {
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4Sensitive::adopt(Geant4Filter* filter)   {
-  if ( filter )  {
+void Geant4Sensitive::adopt(Geant4Filter* filter) {
+  if (filter) {
     filter->addRef();
     m_filters.add(filter);
     return;
@@ -108,28 +104,29 @@ void Geant4Sensitive::adopt(Geant4Filter* filter)   {
   throw runtime_error("Geant4SensDetActionSequence: Attempt to add invalid sensitive filter!");
 }
 
-/// Callback before hit processing starts. Invoke all filters. 
-bool Geant4Sensitive::accept(const G4Step* step)   const {
-  bool result = m_filters.filter(&Geant4Filter::operator(),step);
+/// Callback before hit processing starts. Invoke all filters.
+bool Geant4Sensitive::accept(const G4Step* step) const {
+  bool result = m_filters.filter(&Geant4Filter::operator(), step);
   return result;
 }
 
 /// Access to the sensitive detector object
-void Geant4Sensitive::setDetector(Geant4ActionSD* sens_det)   {
+void Geant4Sensitive::setDetector(Geant4ActionSD* sens_det) {
   m_sensitiveDetector = sens_det;
 }
 
 /// Access to the sensitive detector object
-Geant4ActionSD& Geant4Sensitive::detector()  const  {
-  if (  m_sensitiveDetector ) return *m_sensitiveDetector;
+Geant4ActionSD& Geant4Sensitive::detector() const {
+  if (m_sensitiveDetector)
+    return *m_sensitiveDetector;
   //m_sensitiveDetector = _getSensitiveDetector(m_detector.name());
   //if (  m_sensitiveDetector ) return *m_sensitiveDetector;
-  throw runtime_error(format("Geant4Sensitive","DDG4: The sensitive detector for action %s "
-			     "was not properly configured.",name().c_str()));
-}      
+  throw runtime_error(format("Geant4Sensitive", "DDG4: The sensitive detector for action %s "
+      "was not properly configured.", name().c_str()));
+}
 
 /// Access to the hosting sequence
-Geant4SensDetActionSequence& Geant4Sensitive::sequence()  const    {
+Geant4SensDetActionSequence& Geant4Sensitive::sequence() const {
   return *m_sequence;
 }
 
@@ -139,25 +136,25 @@ const string& Geant4Sensitive::hitCollectionName(size_t which) const {
 }
 
 /// Retrieve the hits collection associated with this detector by its serial number
-Geant4HitCollection* Geant4Sensitive::collection(size_t which)   {
+Geant4HitCollection* Geant4Sensitive::collection(size_t which) {
   return sequence().collection(which);
 }
 
 /// Retrieve the hits collection associated with this detector by its collection identifier
-Geant4HitCollection* Geant4Sensitive::collectionByID(size_t id)   {
+Geant4HitCollection* Geant4Sensitive::collectionByID(size_t id) {
   return sequence().collectionByID(id);
 }
 
-/// Method invoked at the begining of each event. 
+/// Method invoked at the begining of each event.
 void Geant4Sensitive::begin(G4HCofThisEvent* /* HCE */) {
 }
 
-/// Method invoked at the end of each event. 
+/// Method invoked at the end of each event.
 void Geant4Sensitive::end(G4HCofThisEvent* /* HCE */) {
 }
 
 /// Method for generating hit(s) using the information of G4Step object.
-bool Geant4Sensitive::process(G4Step* /* step */, G4TouchableHistory* /* history */)   {
+bool Geant4Sensitive::process(G4Step* /* step */, G4TouchableHistory* /* history */) {
   return false;
 }
 
@@ -166,23 +163,23 @@ void Geant4Sensitive::clear(G4HCofThisEvent* /* HCE */) {
 }
 
 /// Returns the volumeID of the sensitive volume corresponding to the step
-long long int Geant4Sensitive::volumeID(G4Step* s)   {
+long long int Geant4Sensitive::volumeID(G4Step* s) {
   Geant4StepHandler step(s);
-  Geant4VolumeManager volMgr = Geant4Mapping::instance().volumeManager();  
+  Geant4VolumeManager volMgr = Geant4Mapping::instance().volumeManager();
   VolumeID id = volMgr.volumeID(step.preTouchable());
   return id;
 }
 
 /// Standard constructor
-Geant4SensDetActionSequence::Geant4SensDetActionSequence(Geant4Context* context,const string& nam) 
-: Geant4Action(context,nam), m_hce(0)
-{
+Geant4SensDetActionSequence::Geant4SensDetActionSequence(Geant4Context* context, const string& nam)
+    : Geant4Action(context, nam), m_hce(0) {
+  m_needsControl = true;
+  context->sensitiveActions().insert(name(), this);
   InstanceCount::increment(this);
-  context->sensitiveActions().insert(name(),this);
 }
 
 /// Default destructor
-Geant4SensDetActionSequence::~Geant4SensDetActionSequence()  {
+Geant4SensDetActionSequence::~Geant4SensDetActionSequence() {
   m_filters(&Geant4Filter::release);
   m_actors(&Geant4Sensitive::release);
   m_filters.clear();
@@ -191,8 +188,8 @@ Geant4SensDetActionSequence::~Geant4SensDetActionSequence()  {
 }
 
 /// Add an actor responding to all callbacks
-void Geant4SensDetActionSequence::adopt(Geant4Sensitive* sensitive)   {
-  if ( sensitive )  {
+void Geant4SensDetActionSequence::adopt(Geant4Sensitive* sensitive) {
+  if (sensitive) {
     sensitive->addRef();
     m_actors.add(sensitive);
     return;
@@ -201,8 +198,8 @@ void Geant4SensDetActionSequence::adopt(Geant4Sensitive* sensitive)   {
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4SensDetActionSequence::adopt(Geant4Filter* filter)   {
-  if ( filter )  {
+void Geant4SensDetActionSequence::adopt(Geant4Filter* filter) {
+  if (filter) {
     filter->addRef();
     m_filters.add(filter);
     return;
@@ -211,17 +208,17 @@ void Geant4SensDetActionSequence::adopt(Geant4Filter* filter)   {
 }
 
 /// Initialize the usage of a hit collection. Returns the collection identifier
-size_t Geant4SensDetActionSequence::defineCollection(const std::string& name,create_t func)    {
-  m_collections.push_back(make_pair(name,func));
-  return m_collections.size()-1;
+size_t Geant4SensDetActionSequence::defineCollection(const std::string& name, create_t func) {
+  m_collections.push_back(make_pair(name, func));
+  return m_collections.size() - 1;
 }
 
 /// Called at construction time of the sensitive detector to declare all hit collections
-size_t Geant4SensDetActionSequence::Geant4SensDetActionSequence::defineCollections(Geant4ActionSD* sens_det)    {
+size_t Geant4SensDetActionSequence::Geant4SensDetActionSequence::defineCollections(Geant4ActionSD* sens_det) {
   size_t count = 0;
   m_detector = sens_det;
-  m_actors(&Geant4Sensitive::setDetector,sens_det);
-  for(HitCollections::const_iterator i=m_collections.begin(); i!=m_collections.end(); ++i)  {
+  m_actors(&Geant4Sensitive::setDetector, sens_det);
+  for (HitCollections::const_iterator i = m_collections.begin(); i != m_collections.end(); ++i) {
     sens_det->defineCollection((*i).first);
     ++count;
   }
@@ -229,123 +226,126 @@ size_t Geant4SensDetActionSequence::Geant4SensDetActionSequence::defineCollectio
 }
 
 /// Access HitCollection container names
-const std::string& Geant4SensDetActionSequence::hitCollectionName(size_t which) const   {
-  if ( which < m_collections.size() ) {
+const std::string& Geant4SensDetActionSequence::hitCollectionName(size_t which) const {
+  if (which < m_collections.size()) {
     return m_collections[which].first;
   }
-  static string blank="";
-  except("The collection name index for subdetector %s is out of range!",c_name());
+  static string blank = "";
+  except("The collection name index for subdetector %s is out of range!", c_name());
   return blank;
 }
 
 /// Retrieve the hits collection associated with this detector by its serial number
-Geant4HitCollection* Geant4SensDetActionSequence::collection(size_t which) const    {
-  if ( which < m_collections.size() ) {
+Geant4HitCollection* Geant4SensDetActionSequence::collection(size_t which) const {
+  if (which < m_collections.size()) {
     int hc_id = m_detector->GetCollectionID(which);
-    Geant4HitCollection* c = (Geant4HitCollection*)m_hce->GetHC(hc_id);
-    if ( c ) return c;
-    except("The collection index for subdetector %s is wrong!",c_name());
+    Geant4HitCollection* c = (Geant4HitCollection*) m_hce->GetHC(hc_id);
+    if (c)
+      return c;
+    except("The collection index for subdetector %s is wrong!", c_name());
   }
-  except("The collection name index for subdetector %s is out of range!",c_name());
+  except("The collection name index for subdetector %s is out of range!", c_name());
   return 0;
 }
 
 /// Retrieve the hits collection associated with this detector by its collection identifier
-Geant4HitCollection* Geant4SensDetActionSequence::collectionByID(size_t id) const   {
-  Geant4HitCollection* c = (Geant4HitCollection*)m_hce->GetHC(id);
-  if ( c ) return c;
-  except("The collection index for subdetector %s is wrong!",c_name());
+Geant4HitCollection* Geant4SensDetActionSequence::collectionByID(size_t id) const {
+  Geant4HitCollection* c = (Geant4HitCollection*) m_hce->GetHC(id);
+  if (c)
+    return c;
+  except("The collection index for subdetector %s is wrong!", c_name());
   return 0;
 }
 
-/// Callback before hit processing starts. Invoke all filters. 
-bool Geant4SensDetActionSequence::accept(const G4Step* step)   const {
-  bool result = m_filters.filter(&Geant4Filter::operator(),step);
+/// Callback before hit processing starts. Invoke all filters.
+bool Geant4SensDetActionSequence::accept(const G4Step* step) const {
+  bool result = m_filters.filter(&Geant4Filter::operator(), step);
   return result;
 }
 
 /// Function to process hits
-bool Geant4SensDetActionSequence::process(G4Step* step, G4TouchableHistory* hist) { 
+bool Geant4SensDetActionSequence::process(G4Step* step, G4TouchableHistory* hist) {
   bool result = false;
-  for(vector<Geant4Sensitive*>::iterator i=m_actors->begin(); i != m_actors->end(); ++i)  {
+  for (vector<Geant4Sensitive*>::iterator i = m_actors->begin(); i != m_actors->end(); ++i) {
     Geant4Sensitive* s = *i;
-    if ( s->accept(step) ) result |= s->process(step,hist);
+    if (s->accept(step))
+      result |= s->process(step, hist);
   }
-  m_process(step,hist);
+  m_process(step, hist);
   return result;
 }
 
-/** G4VSensitiveDetector interface: Method invoked at the begining of each event. 
+/** G4VSensitiveDetector interface: Method invoked at the begining of each event.
  *  The hits collection(s) created by this sensitive detector must
  *  be set to the G4HCofThisEvent object at one of these two methods.
  */
-void Geant4SensDetActionSequence::begin(G4HCofThisEvent* hce)   {
+void Geant4SensDetActionSequence::begin(G4HCofThisEvent* hce) {
   m_hce = hce;
-  for(size_t count = 0; count < m_collections.size(); ++count) {
-    const std::pair<string,create_t>& cr = m_collections[count];
+  for (size_t count = 0; count < m_collections.size(); ++count) {
+    const std::pair<string, create_t>& cr = m_collections[count];
     G4VHitsCollection* c = (*cr.second)(name(), cr.first);
     int id = m_detector->GetCollectionID(count);
-    m_hce->AddHitsCollection(id,c);
+    m_hce->AddHitsCollection(id, c);
   }
-  m_actors(&Geant4Sensitive::begin,m_hce);
-  m_begin(m_hce);
+  m_actors(&Geant4Sensitive::begin, m_hce);
+  m_begin (m_hce);
 }
 
-/// G4VSensitiveDetector interface: Method invoked at the end of each event. 
-void Geant4SensDetActionSequence::end(G4HCofThisEvent* hce)  {
+/// G4VSensitiveDetector interface: Method invoked at the end of each event.
+void Geant4SensDetActionSequence::end(G4HCofThisEvent* hce) {
   m_end(hce);
-  m_actors(&Geant4Sensitive::end,hce);
+  m_actors(&Geant4Sensitive::end, hce);
   m_hce = 0;
 }
 
 /// G4VSensitiveDetector interface: Method invoked if the event was aborted.
-/** Hits collections created but not beibg set to G4HCofThisEvent 
+/** Hits collections created but not beibg set to G4HCofThisEvent
  *  at the event should be deleted.
- *  Collection(s) which have already set to G4HCofThisEvent 
+ *  Collection(s) which have already set to G4HCofThisEvent
  *  will be deleted automatically.
  */
-void Geant4SensDetActionSequence::clear()  {
-  m_clear(m_hce);
-  m_actors(&Geant4Sensitive::clear,m_hce);
+void Geant4SensDetActionSequence::clear() {
+  m_clear (m_hce);
+  m_actors(&Geant4Sensitive::clear, m_hce);
 }
 
 /// Default constructor
-Geant4SensDetSequences::Geant4SensDetSequences()  {
+Geant4SensDetSequences::Geant4SensDetSequences() {
 }
 
 /// Default destructor
-Geant4SensDetSequences::~Geant4SensDetSequences()  {
-  for_each(m_sequences.begin(),m_sequences.end(),releaseObjects(m_sequences));
+Geant4SensDetSequences::~Geant4SensDetSequences() {
+  for_each(m_sequences.begin(), m_sequences.end(), releaseObjects(m_sequences));
   m_sequences.clear();
 }
 
 /// Access sequence member by name
-Geant4SensDetActionSequence* Geant4SensDetSequences::operator[](const string& name) const   {
-  string nam = "SD_Seq_"+name;
-  Members::const_iterator i=m_sequences.find(nam);
-  if ( i != m_sequences.end() )
+Geant4SensDetActionSequence* Geant4SensDetSequences::operator[](const string& name) const {
+  string nam = "SD_Seq_" + name;
+  Members::const_iterator i = m_sequences.find(nam);
+  if (i != m_sequences.end())
     return (*i).second;
   throw runtime_error("Attempt to access undefined SensDetActionSequence!");
 }
 
 /// Access sequence member by name
-Geant4SensDetActionSequence* Geant4SensDetSequences::find(const std::string& name) const   {
-  string nam = "SD_Seq_"+name;
-  Members::const_iterator i=m_sequences.find(nam);
-  if ( i != m_sequences.end() )
+Geant4SensDetActionSequence* Geant4SensDetSequences::find(const std::string& name) const {
+  string nam = "SD_Seq_" + name;
+  Members::const_iterator i = m_sequences.find(nam);
+  if (i != m_sequences.end())
     return (*i).second;
   return 0;
 }
 
 /// Insert sequence member
-void Geant4SensDetSequences::insert(const string& name,Geant4SensDetActionSequence* seq)   {
-  if ( seq )  {
-    string nam = "SD_Seq_"+name;
+void Geant4SensDetSequences::insert(const string& name, Geant4SensDetActionSequence* seq) {
+  if (seq) {
+    string nam = "SD_Seq_" + name;
     seq->addRef();
     m_sequences[nam] = seq;
     return;
   }
-  throw runtime_error(format("Geant4SensDetSequences","Attempt to add invalid sensitive "
-			     "sequence with name:%s",name.c_str()));
+  throw runtime_error(format("Geant4SensDetSequences", "Attempt to add invalid sensitive "
+      "sequence with name:%s", name.c_str()));
 }
 
diff --git a/DDG4/src/Geant4SensitiveDetector.cpp b/DDG4/src/Geant4SensitiveDetector.cpp
index fc669bffb9486f273567f07898d28420619cbdbe..15160bcafe53dfd3c0f39a67c1be8c6a0070db2b 100644
--- a/DDG4/src/Geant4SensitiveDetector.cpp
+++ b/DDG4/src/Geant4SensitiveDetector.cpp
@@ -21,7 +21,6 @@
 
 #define DEBUG 0
 
-
 // C/C++ include files
 #include <iostream>
 #include <stdexcept>
@@ -32,11 +31,10 @@ using namespace DD4hep::Simulation;
 
 /// Constructor. The detector element is identified by the name
 Geant4SensitiveDetector::Geant4SensitiveDetector(const string& name, LCDD& lcdd)
-  : G4VSensitiveDetector(name), m_lcdd(lcdd), m_detector(), m_sensitive(), m_readout(), m_hce(0)
-{
+    : G4VSensitiveDetector(name), m_lcdd(lcdd), m_detector(), m_sensitive(), m_readout(), m_hce(0) {
   m_sensitive = lcdd.sensitiveDetector(name);
-  m_detector  = lcdd.detector(name);
-  m_readout   = m_sensitive.readout();
+  m_detector = lcdd.detector(name);
+  m_readout = m_sensitive.readout();
 }
 
 /// Standard destructor
@@ -44,93 +42,98 @@ Geant4SensitiveDetector::~Geant4SensitiveDetector() {
 }
 
 /// Initialize the sensitive detector for the usage of a single hit collection
-bool Geant4SensitiveDetector::defineCollection(const string& coll_name)   {
-  if ( coll_name.empty() ) {
-    throw runtime_error("Geant4SensitiveDetector: No collection defined for "+name()+
-			" of type "+string(m_sensitive.type()));
+bool Geant4SensitiveDetector::defineCollection(const string& coll_name) {
+  if (coll_name.empty()) {
+    throw runtime_error(
+        "Geant4SensitiveDetector: No collection defined for " + name() + " of type " + string(m_sensitive.type()));
   }
   collectionName.insert(coll_name);
   return true;
 }
 
 /// Access HitCollection container names
-const string& Geant4SensitiveDetector::hitCollectionName(int which) const      { 
+const string& Geant4SensitiveDetector::hitCollectionName(int which) const {
   size_t w = which;
-  if ( w >= collectionName.size() ) {
-    throw runtime_error("The collection name index for subdetector "+name()+" is out of range!");
+  if (w >= collectionName.size()) {
+    throw runtime_error("The collection name index for subdetector " + name() + " is out of range!");
   }
   return collectionName[which];
 }
 
 /// Create single hits collection
-Geant4SensitiveDetector::HitCollection* Geant4SensitiveDetector::createCollection(const string& coll_name)  const  {
+Geant4SensitiveDetector::HitCollection* Geant4SensitiveDetector::createCollection(const string& coll_name) const {
   return new G4THitsCollection<Geant4Hit>(GetName(), coll_name);
 }
-namespace DD4hep { namespace Simulation {
-template <> Geant4CalorimeterHit* 
-Geant4SensitiveDetector::find<Geant4CalorimeterHit>(const HitCollection* c,const HitCompare<Geant4CalorimeterHit>& cmp)   {
-  typedef vector<Geant4CalorimeterHit*> _V;
-  const _V* v = (const _V*)c->GetVector();
-  for(_V::const_iterator i=v->begin(); i !=v->end(); ++i) 
-    if ( cmp(*i) ) return *i;
-  return 0;
+namespace DD4hep {
+  namespace Simulation {
+    template <> Geant4CalorimeterHit*
+    Geant4SensitiveDetector::find<Geant4CalorimeterHit>(const HitCollection* c, const HitCompare<Geant4CalorimeterHit>& cmp) {
+      typedef vector<Geant4CalorimeterHit*> _V;
+      const _V* v = (const _V*) c->GetVector();
+      for (_V::const_iterator i = v->begin(); i != v->end(); ++i)
+        if (cmp(*i))
+          return *i;
+      return 0;
+    }
+  }
 }
-}}
 
-/// Method invoked at the begining of each event. 
+/// Method invoked at the begining of each event.
 void Geant4SensitiveDetector::Initialize(G4HCofThisEvent* HCE) {
   int count = 0;
   m_hce = HCE;
-  for(G4CollectionNameVector::const_iterator i=collectionName.begin(); i!=collectionName.end();++i,++count) {
+  for (G4CollectionNameVector::const_iterator i = collectionName.begin(); i != collectionName.end(); ++i, ++count) {
     G4VHitsCollection* c = createCollection(*i);
-    m_hce->AddHitsCollection(GetCollectionID(count),c);
+    m_hce->AddHitsCollection(GetCollectionID(count), c);
   }
 }
 
-/// Method invoked at the end of each event. 
+/// Method invoked at the end of each event.
 void Geant4SensitiveDetector::EndOfEvent(G4HCofThisEvent* /* HCE */) {
   m_hce = 0;
   // Eventuall print event summary
 }
 
 /// Method for generating hit(s) using the information of G4Step object.
-G4bool Geant4SensitiveDetector::ProcessHits(G4Step* step,G4TouchableHistory* hist) {
-  return process(step,hist);
+G4bool Geant4SensitiveDetector::ProcessHits(G4Step* step, G4TouchableHistory* hist) {
+  return process(step, hist);
 }
 
 /// Method for generating hit(s) using the information of G4Step object.
-G4bool Geant4SensitiveDetector::process(G4Step* step,G4TouchableHistory* hist) {
+G4bool Geant4SensitiveDetector::process(G4Step* step, G4TouchableHistory* hist) {
   double ene_cut = m_sensitive.energyCutoff();
-  if ( step->GetTotalEnergyDeposit() > ene_cut ) {
-    if ( !Geant4Hit::isGeantino(step->GetTrack()) )   {
+  if (step->GetTotalEnergyDeposit() > ene_cut) {
+    if (!Geant4Hit::isGeantino(step->GetTrack())) {
 #if DEBUG
       dumpStep(step, hist);
 #endif
-      return buildHits(step,hist);
+      return buildHits(step, hist);
     }
   }
 #if DEBUG
-  std::cout << " *** too small energy deposit : " <<  step->GetTotalEnergyDeposit()  << " < " <<  ene_cut  << "    at " <<  step->GetPreStepPoint()->GetPosition() << std::endl ;
+  std::cout << " *** too small energy deposit : " << step->GetTotalEnergyDeposit() << " < " << ene_cut << "    at " << step->GetPreStepPoint()->GetPosition() << std::endl;
 #endif
   return false;
 }
 
 /// Retrieve the hits collection associated with this detector by its collection identifier
-Geant4SensitiveDetector::HitCollection* Geant4SensitiveDetector::collectionByID(int id)    {
-  HitCollection* hc = (HitCollection*)m_hce->GetHC(id);
-  if ( hc ) return hc;
-  throw runtime_error("The collection index for subdetector "+name()+" is wrong!");
+Geant4SensitiveDetector::HitCollection* Geant4SensitiveDetector::collectionByID(int id) {
+  HitCollection* hc = (HitCollection*) m_hce->GetHC(id);
+  if (hc)
+    return hc;
+  throw runtime_error("The collection index for subdetector " + name() + " is wrong!");
 }
 
 /// Retrieve the hits collection associated with this detector by its serial number
-Geant4SensitiveDetector::HitCollection* Geant4SensitiveDetector::collection(int which)    {
+Geant4SensitiveDetector::HitCollection* Geant4SensitiveDetector::collection(int which) {
   size_t w = which;
-  if ( w < collectionName.size() ) {
-    HitCollection* hc = (HitCollection*)m_hce->GetHC(GetCollectionID(which));
-    if ( hc ) return hc;
-    throw runtime_error("The collection index for subdetector "+name()+" is wrong!");
+  if (w < collectionName.size()) {
+    HitCollection* hc = (HitCollection*) m_hce->GetHC(GetCollectionID(which));
+    if (hc)
+      return hc;
+    throw runtime_error("The collection index for subdetector " + name() + " is wrong!");
   }
-  throw runtime_error("The collection name index for subdetector "+name()+" is out of range!");
+  throw runtime_error("The collection name index for subdetector " + name() + " is out of range!");
 }
 
 /// Method is invoked if the event abortion is occured.
@@ -147,118 +150,111 @@ void Geant4SensitiveDetector::dumpStep(G4Step* st, G4TouchableHistory* /* histor
   Position pos2 = step.postPos();
   Momentum mom = step.postMom();
 
-  printout(INFO,"G4Step","  Track:%08ld Pos:(%8f %8f %8f) -> (%f %f %f)  Mom:%7.0f %7.0f %7.0f",
-   	   long(step.track), pos1.X(), pos1.Y(), pos1.Z(), pos2.X(), pos2.Y(), pos2.Z(), mom.X(), mom.Y(), mom.Z());
-  printout(INFO,"G4Step","                pre-Vol: %s  Status:%s",
-   	   step.preVolume()->GetName().c_str(), step.preStepStatus());
-  printout(INFO,"G4Step","                post-Vol:%s  Status:%s",
-   	   step.postVolume()->GetName().c_str(), step.postStepStatus());
-  
+  printout(INFO, "G4Step", "  Track:%08ld Pos:(%8f %8f %8f) -> (%f %f %f)  Mom:%7.0f %7.0f %7.0f", long(step.track), pos1.X(),
+      pos1.Y(), pos1.Z(), pos2.X(), pos2.Y(), pos2.Z(), mom.X(), mom.Y(), mom.Z());
+  printout(INFO, "G4Step", "                pre-Vol: %s  Status:%s", step.preVolume()->GetName().c_str(), step.preStepStatus());
+  printout(INFO, "G4Step", "                post-Vol:%s  Status:%s", step.postVolume()->GetName().c_str(),
+      step.postStepStatus());
+
   const G4VPhysicalVolume* pv = step.volume(step.post);
-  
+
   typedef Geant4Converter::PlacementMap Places;
   const Places& places = cnv.data().g4Placements;
 
-  for(Places::const_iterator i=places.begin(); i!=places.end();++i) {
+  for (Places::const_iterator i = places.begin(); i != places.end(); ++i) {
     const G4VPhysicalVolume* pl = (*i).second;
     const G4VPhysicalVolume* qv = pl;
-    
-    if ( qv == pv ) {
+
+    if (qv == pv) {
       const TGeoNode* tpv = (*i).first;
-      printf("           Found TGeoNode:%s!\n",tpv->GetName());
+      printf("           Found TGeoNode:%s!\n", tpv->GetName());
     }
   }
 
 }
 
+long long Geant4SensitiveDetector::getVolumeID(G4Step* aStep) {
 
-long long Geant4SensitiveDetector::getVolumeID(G4Step* aStep ){
-  
   //Geant4Mapping&  mapping = Geant4Mapping::instance();
-  
+
   Geant4StepHandler step(aStep);
 
   Geant4VolumeManager volMgr = Geant4Mapping::instance().volumeManager();
-  
-  VolumeID id = volMgr.volumeID( step.preTouchable() );
 
+  VolumeID id = volMgr.volumeID(step.preTouchable());
 
 #if 0 //  additional checks ...
-   
   const G4VPhysicalVolume* g4v = step.volume( step.pre );
 
-  if ( id == Geant4VolumeManager::InvalidPath )  {
+  if ( id == Geant4VolumeManager::InvalidPath ) {
     ::printf("                 -->  Severe ERROR: Invalid placement path: touchable corrupted?\n");
   }
-  else if ( id == Geant4VolumeManager::Insensitive )  {
+  else if ( id == Geant4VolumeManager::Insensitive ) {
     ::printf("                 -->  WARNING: Only sensitive volumes may be decoded. %s\n" , g4v->GetName().c_str() );
   }
-  else if ( id == Geant4VolumeManager::NonExisting )  {
+  else if ( id == Geant4VolumeManager::NonExisting ) {
     ::printf("                 -->  WARNING: non existing placement path.\n");
   }
-  else  {
+  else {
 
     std::stringstream str;
     Geant4VolumeManager::VolIDDescriptor dsc;
     Geant4VolumeManager::VolIDFields& fields = dsc.second;
     volMgr.volumeDescriptor( step.preTouchable(), dsc );
-    for(Geant4VolumeManager::VolIDFields::iterator i=fields.begin(); i!=fields.end();++i){
+    for(Geant4VolumeManager::VolIDFields::iterator i=fields.begin(); i!=fields.end();++i) {
       str << (*i).first->name() << "=" << (*i).second << " ";
     }
     ::printf("                 -->  CellID: %X [%X] -> %s\n",id,dsc.first,str.str().c_str());
-    
+
   }
 
 #endif
-  
-  return id ;
-  
-
- //   // old way of lookup ----------- does not work for assemblies ....
-
- // //------------ get the cellID description string -----------------------------------
- 
- //  Geometry::PlacedVolume place  = mapping.placement( g4v ) ;
-      
- //  if( ! place.isValid() || ! place.volume().isSensitive() )  {
- //    G4cout << " **** Error in Geant4SensitiveDetector::getVolumeID:  invalid first sensitive volume in buildHits is not sensitive !!! " << std::endl ;
- //  }
- //  Geometry::Volume            vol    = place.volume();
- //  Geometry::SensitiveDetector sd     = vol.sensitiveDetector();
- //  Geometry::Readout           ro     = sd.readout();
-      
- //  std::string  idDescStr =  ro.idSpec().fieldDescription() ;
- //  BitField64 bf( idDescStr ) ; 
-
- //  //------------ now fill the cellID from the volIDs of the complete path -----------------------------------
-
- //  const G4NavigationHistory* hist = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory() ;
- //  int depth =  hist->GetDepth() ;
- //  //const G4VPhysicalVolume*  g4v = hist->GetVolume( depth ) ;
-      
- //  for(int i=depth ; i>0 ; --i ) {
-	
- //    g4v = hist->GetVolume(i) ;
- //    Geometry::PlacedVolume place  = mapping.placement( g4v ) ;
-
- //    if( ! place.isValid() ) {
- //      G4cout << " **** WARNING in Geant4SensitiveDetector::getVolumeID: ingnoring invalid PlacedVolume for : " <<  g4v->GetName() << std::endl ;
- //      continue ;
- //    }
-	
- //    // G4cout << "---  VolIDs : " << std::endl ;
- //    Geometry::PlacedVolume::VolIDs ids = place.volIDs() ;
-
- //    for( Geometry::PlacedVolume::VolIDs::const_iterator it = ids.begin() ; it != ids.end() ; ++it ){
-	  
- //      //  G4cout << "--- " << it->first << " -- " << it->second << std::
- //      bf[  it->first ] = it->second  ;
- //    }
- //  }
-
- //  return bf.getValue()  ;
 
-}
+  return id;
+
+  //   // old way of lookup ----------- does not work for assemblies ....
+
+  // //------------ get the cellID description string -----------------------------------
+
+  //  Geometry::PlacedVolume place  = mapping.placement( g4v ) ;
 
+  //  if( ! place.isValid() || ! place.volume().isSensitive() )  {
+  //    G4cout << " **** Error in Geant4SensitiveDetector::getVolumeID:  invalid first sensitive volume in buildHits is not sensitive !!! " << std::endl ;
+  //  }
+  //  Geometry::Volume            vol    = place.volume();
+  //  Geometry::SensitiveDetector sd     = vol.sensitiveDetector();
+  //  Geometry::Readout           ro     = sd.readout();
 
+  //  std::string  idDescStr =  ro.idSpec().fieldDescription() ;
+  //  BitField64 bf( idDescStr ) ;
+
+  //  //------------ now fill the cellID from the volIDs of the complete path -----------------------------------
+
+  //  const G4NavigationHistory* hist = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory() ;
+  //  int depth =  hist->GetDepth() ;
+  //  //const G4VPhysicalVolume*  g4v = hist->GetVolume( depth ) ;
+
+  //  for(int i=depth ; i>0 ; --i ) {
+
+  //    g4v = hist->GetVolume(i) ;
+  //    Geometry::PlacedVolume place  = mapping.placement( g4v ) ;
+
+  //    if( ! place.isValid() ) {
+  //      G4cout << " **** WARNING in Geant4SensitiveDetector::getVolumeID: ingnoring invalid PlacedVolume for : " <<  g4v->GetName() << std::endl ;
+  //      continue ;
+  //    }
+
+  //    // G4cout << "---  VolIDs : " << std::endl ;
+  //    Geometry::PlacedVolume::VolIDs ids = place.volIDs() ;
+
+  //    for( Geometry::PlacedVolume::VolIDs::const_iterator it = ids.begin() ; it != ids.end() ; ++it ){
+
+  //      //  G4cout << "--- " << it->first << " -- " << it->second << std::
+  //      bf[  it->first ] = it->second  ;
+  //    }
+  //  }
+
+  //  return bf.getValue()  ;
+
+}
 
diff --git a/DDG4/src/Geant4StackingAction.cpp b/DDG4/src/Geant4StackingAction.cpp
index 3f8cba61fdfe49a7af95015f5e3e5827a7c6d1ee..1fec7d5eb354ddc27ec0e4d057495abd3ba35417 100644
--- a/DDG4/src/Geant4StackingAction.cpp
+++ b/DDG4/src/Geant4StackingAction.cpp
@@ -15,28 +15,27 @@
 #include <stdexcept>
 
 using namespace DD4hep::Simulation;
-  
+
 /// Standard constructor
 Geant4StackingAction::Geant4StackingAction(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)
-{
+    : Geant4Action(context, name) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4StackingAction::~Geant4StackingAction()   {
+Geant4StackingAction::~Geant4StackingAction() {
   InstanceCount::decrement(this);
 }
- 
+
 /// Standard constructor
 Geant4StackingActionSequence::Geant4StackingActionSequence(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)
-{
+    : Geant4Action(context, name) {
+  m_needsControl = true;
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4StackingActionSequence::~Geant4StackingActionSequence()  {
+Geant4StackingActionSequence::~Geant4StackingActionSequence() {
   m_actors(&Geant4StackingAction::release);
   m_actors.clear();
   m_newStage.clear();
@@ -45,8 +44,8 @@ Geant4StackingActionSequence::~Geant4StackingActionSequence()  {
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4StackingActionSequence::adopt(Geant4StackingAction* action)  {
-  if ( action )  {
+void Geant4StackingActionSequence::adopt(Geant4StackingAction* action) {
+  if (action) {
     action->addRef();
     m_actors.add(action);
     return;
@@ -55,13 +54,13 @@ void Geant4StackingActionSequence::adopt(Geant4StackingAction* action)  {
 }
 
 /// Pre-track action callback
-void  Geant4StackingActionSequence::newStage()  {
+void Geant4StackingActionSequence::newStage() {
   m_actors(&Geant4StackingAction::newStage);
   m_newStage();
 }
 
 /// Post-track action callback
-void  Geant4StackingActionSequence::prepare()  {
+void Geant4StackingActionSequence::prepare() {
   m_actors(&Geant4StackingAction::prepare);
   m_prepare();
 }
diff --git a/DDG4/src/Geant4StepHandler.cpp b/DDG4/src/Geant4StepHandler.cpp
index d58a7dc6d5ec9ba248ba27157c65c2c8fd30ff9a..3577cf293995747257e8c5fa012913f3373645f6 100644
--- a/DDG4/src/Geant4StepHandler.cpp
+++ b/DDG4/src/Geant4StepHandler.cpp
@@ -12,28 +12,36 @@
 using namespace DD4hep::Simulation;
 
 const char* Geant4StepHandler::stepStatus(G4StepStatus status) {
-  switch(status) {
-    // Step reached the world boundary
-  case fWorldBoundary:          return "WorldBoundary";
+  switch (status) {
+  // Step reached the world boundary
+  case fWorldBoundary:
+    return "WorldBoundary";
     // Step defined by a geometry boundary
-  case fGeomBoundary:           return "GeomBoundary";
+  case fGeomBoundary:
+    return "GeomBoundary";
     // Step defined by a PreStepDoItVector
-  case fAtRestDoItProc:         return "AtRestDoItProc";
+  case fAtRestDoItProc:
+    return "AtRestDoItProc";
     // Step defined by a AlongStepDoItVector
-  case fAlongStepDoItProc:      return "AlongStepDoItProc";
+  case fAlongStepDoItProc:
+    return "AlongStepDoItProc";
     // Step defined by a PostStepDoItVector
-  case fPostStepDoItProc:       return "PostStepDoItProc";
+  case fPostStepDoItProc:
+    return "PostStepDoItProc";
     // Step defined by the user Step limit in the logical volume
-  case fUserDefinedLimit:       return "UserDefinedLimit";
-    // Step defined by an exclusively forced PostStepDoIt process 
-  case fExclusivelyForcedProc:  return "ExclusivelyForcedProc";
+  case fUserDefinedLimit:
+    return "UserDefinedLimit";
+    // Step defined by an exclusively forced PostStepDoIt process
+  case fExclusivelyForcedProc:
+    return "ExclusivelyForcedProc";
     // Step not defined yet
   case fUndefined:
-  default:                      return "Undefined";
+  default:
+    return "Undefined";
   };
 }
 
-const char* Geant4StepHandler::preStepStatus() const    {
+const char* Geant4StepHandler::preStepStatus() const {
   return stepStatus(pre ? pre->GetStepStatus() : fUndefined);
 }
 
diff --git a/DDG4/src/Geant4SteppingAction.cpp b/DDG4/src/Geant4SteppingAction.cpp
index 4536e8503ad3d0517e6c5428196e9c157f0d707b..edda141172efe22134b99557dfe6742b18e16cf6 100644
--- a/DDG4/src/Geant4SteppingAction.cpp
+++ b/DDG4/src/Geant4SteppingAction.cpp
@@ -14,29 +14,28 @@ using namespace DD4hep::Simulation;
 
 /// Standard constructor
 Geant4SteppingAction::Geant4SteppingAction(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)  
-{
+    : Geant4Action(context, name) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4SteppingAction::~Geant4SteppingAction()   {
+Geant4SteppingAction::~Geant4SteppingAction() {
   InstanceCount::decrement(this);
 }
 
 /// User stepping callback
-void Geant4SteppingAction::operator()(const G4Step*, G4SteppingManager*)  {
+void Geant4SteppingAction::operator()(const G4Step*, G4SteppingManager*) {
 }
 
 /// Standard constructor
 Geant4SteppingActionSequence::Geant4SteppingActionSequence(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)
-{
+    : Geant4Action(context, name) {
+  m_needsControl = true;
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4SteppingActionSequence::~Geant4SteppingActionSequence()  {
+Geant4SteppingActionSequence::~Geant4SteppingActionSequence() {
   m_actors(&Geant4SteppingAction::release);
   m_actors.clear();
   m_calls.clear();
@@ -44,14 +43,14 @@ Geant4SteppingActionSequence::~Geant4SteppingActionSequence()  {
 }
 
 /// Pre-track action callback
-void Geant4SteppingActionSequence::operator()(const G4Step* step, G4SteppingManager* mgr)  {
-  m_actors(&Geant4SteppingAction::operator(),step,mgr);
-  m_calls(step,mgr);
+void Geant4SteppingActionSequence::operator()(const G4Step* step, G4SteppingManager* mgr) {
+  m_actors(&Geant4SteppingAction::operator(), step, mgr);
+  m_calls(step, mgr);
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4SteppingActionSequence::adopt(Geant4SteppingAction* action)  {
-  if ( action )  {
+void Geant4SteppingActionSequence::adopt(Geant4SteppingAction* action) {
+  if (action) {
     action->addRef();
     m_actors.add(action);
     return;
diff --git a/DDG4/src/Geant4TestActions.cpp b/DDG4/src/Geant4TestActions.cpp
index 70115fa565f5d1e05e5d9248dbcbb8f6ca54ec58..fb8c2b77b34d7d05d2f5810e0a5f5d25a3cbd00c 100644
--- a/DDG4/src/Geant4TestActions.cpp
+++ b/DDG4/src/Geant4TestActions.cpp
@@ -11,7 +11,6 @@
 #include "DD4hep/Printout.h"
 #include "DD4hep/InstanceCount.h"
 #include "DDG4/Geant4TestActions.h"
-#include "DDG4/Factories.h"
 #include "G4Run.hh"
 #include "G4Event.hh"
 #include "G4Step.hh"
@@ -26,17 +25,19 @@ using namespace DD4hep::Simulation::Test;
 
 namespace {
   struct TestHit {
-    TestHit() {}
-    virtual ~TestHit() {}
+    TestHit() {
+    }
+    virtual ~TestHit() {
+    }
   };
 }
 
 /// Standard constructor
-Geant4TestBase::Geant4TestBase(Geant4Action* a,const std::string& typ)
-: m_type(typ)  {
-  a->declareProperty("Property_int",   m_value1=0);	
-  a->declareProperty("Property_double",m_value2=0e0);	
-  a->declareProperty("Property_string",m_value3);	
+Geant4TestBase::Geant4TestBase(Geant4Action* a, const std::string& typ)
+    : m_type(typ) {
+  a->declareProperty("Property_int", m_value1 = 0);
+  a->declareProperty("Property_double", m_value2 = 0e0);
+  a->declareProperty("Property_string", m_value3);
   InstanceCount::increment(this);
 }
 /// Default destructor
@@ -44,63 +45,62 @@ Geant4TestBase::~Geant4TestBase() {
   InstanceCount::decrement(this);
 }
 
-Geant4TestRunAction::Geant4TestRunAction(Geant4Context* c, const std::string& n) 
-: Geant4RunAction(c,n), Geant4TestBase(this,"Geant4TestRunAction") {
+Geant4TestRunAction::Geant4TestRunAction(Geant4Context* c, const std::string& n)
+    : Geant4RunAction(c, n), Geant4TestBase(this, "Geant4TestRunAction") {
   InstanceCount::increment(this);
 }
 Geant4TestRunAction::~Geant4TestRunAction() {
   InstanceCount::decrement(this);
 }
 /// begin-of-run callback
-void  Geant4TestRunAction::begin(const G4Run* run)  {
-  printout(INFO,name(),"%s> calling begin(run_id=%d,num_event=%d)",
-	   m_type.c_str(),run->GetRunID(),run->GetNumberOfEventToBeProcessed());
+void Geant4TestRunAction::begin(const G4Run* run) {
+  printout(INFO, name(), "%s> calling begin(run_id=%d,num_event=%d)", m_type.c_str(), run->GetRunID(),
+      run->GetNumberOfEventToBeProcessed());
 }
 /// End-of-run callback
-void  Geant4TestRunAction::end  (const G4Run* run) {
-  printout(INFO,name(),"%s> calling end(run_id=%d, num_event=%d)",
-	   m_type.c_str(),run->GetRunID(),run->GetNumberOfEvent());
+void Geant4TestRunAction::end(const G4Run* run) {
+  printout(INFO, name(), "%s> calling end(run_id=%d, num_event=%d)", m_type.c_str(), run->GetRunID(), run->GetNumberOfEvent());
 }
 /// begin-of-event callback
-void  Geant4TestRunAction::beginEvent(const G4Event* evt)  {
-  printout(INFO,name(),"%s> calling beginEvent(event_id=%d)",m_type.c_str(),evt->GetEventID());
+void Geant4TestRunAction::beginEvent(const G4Event* evt) {
+  printout(INFO, name(), "%s> calling beginEvent(event_id=%d)", m_type.c_str(), evt->GetEventID());
 }
 /// End-of-event callback
-void  Geant4TestRunAction::endEvent  (const G4Event* evt) {
-  printout(INFO,name(),"%s> calling endEvent(event_id=%d)",m_type.c_str(), evt->GetEventID());
+void Geant4TestRunAction::endEvent(const G4Event* evt) {
+  printout(INFO, name(), "%s> calling endEvent(event_id=%d)", m_type.c_str(), evt->GetEventID());
 }
 
-Geant4TestEventAction::Geant4TestEventAction(Geant4Context* c, const std::string& n) 
-: Geant4EventAction(c,n), Geant4TestBase(this,"Geant4TestEventAction") {
+Geant4TestEventAction::Geant4TestEventAction(Geant4Context* c, const std::string& n)
+    : Geant4EventAction(c, n), Geant4TestBase(this, "Geant4TestEventAction") {
   InstanceCount::increment(this);
 }
 Geant4TestEventAction::~Geant4TestEventAction() {
   InstanceCount::decrement(this);
 }
 /// begin-of-event callback
-void  Geant4TestEventAction::begin(const G4Event* evt) {
-  printout(INFO,name(),"%s> calling begin(event_id=%d)",m_type.c_str(),evt->GetEventID());
+void Geant4TestEventAction::begin(const G4Event* evt) {
+  printout(INFO, name(), "%s> calling begin(event_id=%d)", m_type.c_str(), evt->GetEventID());
 }
 
 /// End-of-event callback
-void  Geant4TestEventAction::end  (const G4Event* evt) {
-  printout(INFO,name(),"%s> calling end(event_id=%d)",m_type.c_str(),evt->GetEventID());
+void Geant4TestEventAction::end(const G4Event* evt) {
+  printout(INFO, name(), "%s> calling end(event_id=%d)", m_type.c_str(), evt->GetEventID());
 }
 
 /// begin-of-run callback
-void  Geant4TestEventAction::beginRun(const G4Run* run)  {
-  printout(INFO,name(),"%s> calling beginRun(run_id=%d,num_event=%d)",
-	   m_type.c_str(),run->GetRunID(),run->GetNumberOfEventToBeProcessed());
+void Geant4TestEventAction::beginRun(const G4Run* run) {
+  printout(INFO, name(), "%s> calling beginRun(run_id=%d,num_event=%d)", m_type.c_str(), run->GetRunID(),
+      run->GetNumberOfEventToBeProcessed());
 }
 
 /// End-of-run callback
-void  Geant4TestEventAction::endRun  (const G4Run* run) {
-  printout(INFO,name(),"%s> calling endRun(run_id=%d, num_event=%d)",
-	   m_type.c_str(),run->GetRunID(),run->GetNumberOfEvent());
+void Geant4TestEventAction::endRun(const G4Run* run) {
+  printout(INFO, name(), "%s> calling endRun(run_id=%d, num_event=%d)", m_type.c_str(), run->GetRunID(),
+      run->GetNumberOfEvent());
 }
 
-Geant4TestTrackAction::Geant4TestTrackAction(Geant4Context* c, const std::string& n) 
-: Geant4TrackingAction(c,n), Geant4TestBase(this,"Geant4TestTrackAction") {
+Geant4TestTrackAction::Geant4TestTrackAction(Geant4Context* c, const std::string& n)
+    : Geant4TrackingAction(c, n), Geant4TestBase(this, "Geant4TestTrackAction") {
   InstanceCount::increment(this);
 }
 Geant4TestTrackAction::~Geant4TestTrackAction() {
@@ -108,35 +108,33 @@ Geant4TestTrackAction::~Geant4TestTrackAction() {
 }
 /// Begin-of-tracking callback
 void Geant4TestTrackAction::begin(const G4Track* trk) {
-  printout(INFO,name(),"%s> calling begin(track=%d, parent=%d, position=(%f,%f,%f))",
-	   m_type.c_str(),trk->GetTrackID(),trk->GetParentID(),
-	   trk->GetPosition().x(),trk->GetPosition().y(),trk->GetPosition().z());
+  printout(INFO, name(), "%s> calling begin(track=%d, parent=%d, position=(%f,%f,%f))", m_type.c_str(), trk->GetTrackID(),
+      trk->GetParentID(), trk->GetPosition().x(), trk->GetPosition().y(), trk->GetPosition().z());
 }
 
 /// End-of-tracking callback
 void Geant4TestTrackAction::end(const G4Track* trk) {
-  printout(INFO,name(),"%s> calling end(track=%d, parent=%d, position=(%f,%f,%f))",
-	   m_type.c_str(),trk->GetTrackID(),trk->GetParentID(),
-	   trk->GetPosition().x(),trk->GetPosition().y(),trk->GetPosition().z());
+  printout(INFO, name(), "%s> calling end(track=%d, parent=%d, position=(%f,%f,%f))", m_type.c_str(), trk->GetTrackID(),
+      trk->GetParentID(), trk->GetPosition().x(), trk->GetPosition().y(), trk->GetPosition().z());
 }
 
-Geant4TestStepAction::Geant4TestStepAction(Geant4Context* c, const std::string& n) 
-: Geant4SteppingAction(c,n), Geant4TestBase(this,"Geant4TestStepAction") {
+Geant4TestStepAction::Geant4TestStepAction(Geant4Context* c, const std::string& n)
+    : Geant4SteppingAction(c, n), Geant4TestBase(this, "Geant4TestStepAction") {
   InstanceCount::increment(this);
 }
 Geant4TestStepAction::~Geant4TestStepAction() {
   InstanceCount::decrement(this);
 }
 /// User stepping callback
-void Geant4TestStepAction::operator()(const G4Step* , G4SteppingManager* ) {
-  printout(INFO,name(),"%s> calling operator()",m_type.c_str());
+void Geant4TestStepAction::operator()(const G4Step*, G4SteppingManager*) {
+  printout(INFO, name(), "%s> calling operator()", m_type.c_str());
 }
 
-Geant4TestSensitive::Geant4TestSensitive(Geant4Context* c, const std::string& n, DetElement det, LCDD& lcdd) 
-: Geant4Sensitive(c,n,det,lcdd), Geant4TestBase(this,"Geant4TestSensitive") {
+Geant4TestSensitive::Geant4TestSensitive(Geant4Context* c, const std::string& n, DetElement det, LCDD& lcdd)
+    : Geant4Sensitive(c, n, det, lcdd), Geant4TestBase(this, "Geant4TestSensitive") {
   InstanceCount::increment(this);
-  m_collectionID = defineCollection<TestHit>(n);
-  printout(INFO,name(),"%s> Collection ID is %d",m_type.c_str(),int(m_collectionID));
+  m_collectionID = defineCollection < TestHit > (n);
+  printout(INFO, name(), "%s> Collection ID is %d", m_type.c_str(), int(m_collectionID));
 }
 Geant4TestSensitive::~Geant4TestSensitive() {
   InstanceCount::decrement(this);
@@ -145,43 +143,23 @@ Geant4TestSensitive::~Geant4TestSensitive() {
 /// Begin-of-tracking callback
 void Geant4TestSensitive::begin(G4HCofThisEvent* hce) {
   Geant4HitCollection* c = collectionByID(m_collectionID);
-  printout(INFO,name(),"%s> calling begin(num_coll=%d, coll=%s)",
-	   m_type.c_str(),hce->GetNumberOfCollections(),
-	   c ? c->GetName().c_str() : "None");
+  printout(INFO, name(), "%s> calling begin(num_coll=%d, coll=%s)", m_type.c_str(), hce->GetNumberOfCollections(),
+      c ? c->GetName().c_str() : "None");
 }
 
 /// End-of-tracking callback
 void Geant4TestSensitive::end(G4HCofThisEvent* hce) {
   Geant4HitCollection* c = collection(m_collectionID);
-  printout(INFO,name(),"%s> calling end(num_coll=%d, coll=%s)",
-	   m_type.c_str(),hce->GetNumberOfCollections(),
-	   c ? c->GetName().c_str() : "None");
+  printout(INFO, name(), "%s> calling end(num_coll=%d, coll=%s)", m_type.c_str(), hce->GetNumberOfCollections(),
+      c ? c->GetName().c_str() : "None");
 }
 
 /// Method for generating hit(s) using the information of G4Step object.
-bool Geant4TestSensitive::process(G4Step* step,G4TouchableHistory* )   {
+bool Geant4TestSensitive::process(G4Step* step, G4TouchableHistory*) {
   Geant4HitCollection* c = collection(m_collectionID);
-  printout(INFO,name(),"%s> calling process(track=%d, dE=%f, dT=%f len=%f, First,last in Vol=(%c,%c), coll=%s)",
-	   m_type.c_str(),step->GetTrack()->GetTrackID(),
-	   step->GetTotalEnergyDeposit(), step->GetDeltaTime(), step->GetStepLength(),
-	   step->IsFirstStepInVolume() ? 'Y' : 'N',
-	   step->IsLastStepInVolume() ? 'Y' : 'N',
-	   c ? c->GetName().c_str() : "None");
+  printout(INFO, name(), "%s> calling process(track=%d, dE=%f, dT=%f len=%f, First,last in Vol=(%c,%c), coll=%s)",
+      m_type.c_str(), step->GetTrack()->GetTrackID(), step->GetTotalEnergyDeposit(), step->GetDeltaTime(),
+      step->GetStepLength(), step->IsFirstStepInVolume() ? 'Y' : 'N', step->IsLastStepInVolume() ? 'Y' : 'N',
+      c ? c->GetName().c_str() : "None");
   return true;
 }
-namespace DD4hep {  namespace Simulation   {
-    //using namespace Test;
-    using namespace DD4hep::Simulation::Test;
-    typedef Geant4TestSensitive Geant4TestSensitiveTracker;
-    typedef Geant4TestSensitive Geant4TestSensitiveCalorimeter;
-  }}
-
-DECLARE_GEANT4ACTION(Geant4TestRunAction)
-DECLARE_GEANT4ACTION(Geant4TestEventAction)
-DECLARE_GEANT4ACTION(Geant4TestStepAction)
-DECLARE_GEANT4ACTION(Geant4TestTrackAction)
-//DECLARE_GEANT4ACTION(Geant4TestStackingAction)
-//DECLARE_GEANT4ACTION(Geant4TestGeneratorAction)
-DECLARE_GEANT4SENSITIVE(Geant4TestSensitive)
-DECLARE_GEANT4SENSITIVE(Geant4TestSensitiveTracker)
-DECLARE_GEANT4SENSITIVE(Geant4TestSensitiveCalorimeter)
diff --git a/DDG4/src/Geant4TrackingAction.cpp b/DDG4/src/Geant4TrackingAction.cpp
index 023c95f6183f210fe231df415ba839c05378f098..df74d8657bd7e5bb1396073b38b32d938e61117f 100644
--- a/DDG4/src/Geant4TrackingAction.cpp
+++ b/DDG4/src/Geant4TrackingAction.cpp
@@ -27,13 +27,13 @@ class G4TouchableHistory;
 
 /// Standard constructor
 Geant4TrackingActionSequence::Geant4TrackingActionSequence(Geant4Context* context, const std::string& name)
-: Geant4Action(context,name)
-{
+    : Geant4Action(context, name) {
+  m_needsControl = true;
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4TrackingActionSequence::~Geant4TrackingActionSequence()  {
+Geant4TrackingActionSequence::~Geant4TrackingActionSequence() {
   m_actors(&Geant4TrackingAction::release);
   m_actors.clear();
   m_begin.clear();
@@ -42,8 +42,8 @@ Geant4TrackingActionSequence::~Geant4TrackingActionSequence()  {
 }
 
 /// Add an actor responding to all callbacks. Sequence takes ownership.
-void Geant4TrackingActionSequence::adopt(Geant4TrackingAction* action)  {
-  if ( action )  {
+void Geant4TrackingActionSequence::adopt(Geant4TrackingAction* action) {
+  if (action) {
     action->addRef();
     m_actors.add(action);
     return;
@@ -52,65 +52,64 @@ void Geant4TrackingActionSequence::adopt(Geant4TrackingAction* action)  {
 }
 
 /// Pre-track action callback
-void  Geant4TrackingActionSequence::begin(const G4Track* track)  { 
-  m_actors(&Geant4TrackingAction::begin,track);  
+void Geant4TrackingActionSequence::begin(const G4Track* track) {
+  m_actors(&Geant4TrackingAction::begin, track);
   m_begin(track);
 }
 
 /// Post-track action callback
-void  Geant4TrackingActionSequence::end(const G4Track* track) {
+void Geant4TrackingActionSequence::end(const G4Track* track) {
   m_end(track);
-  m_actors(&Geant4TrackingAction::end,track);  
+  m_actors(&Geant4TrackingAction::end, track);
 }
 
 /// Standard constructor
-Geant4TrackingAction::Geant4TrackingAction(Geant4Context* context, const std::string& name) 
-: Geant4Action(context,name) 
-{
+Geant4TrackingAction::Geant4TrackingAction(Geant4Context* context, const std::string& name)
+    : Geant4Action(context, name) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4TrackingAction::~Geant4TrackingAction()   {
+Geant4TrackingAction::~Geant4TrackingAction() {
   InstanceCount::decrement(this);
 }
 
 /// Pre-track action callback
-void Geant4TrackingAction::begin(const G4Track* )  {
+void Geant4TrackingAction::begin(const G4Track*) {
 }
 
 /// Post-track action callback
-void Geant4TrackingAction::end(const G4Track* )  {
+void Geant4TrackingAction::end(const G4Track*) {
 }
 
-/// Get the valid Geant4 tarck information 
-Geant4TrackInformation* Geant4TrackingAction::trackInfo(G4Track* track) const  {  
-  if ( track )   { 
-    Geant4TrackInformation*  gau = 0;
+/// Get the valid Geant4 tarck information
+Geant4TrackInformation* Geant4TrackingAction::trackInfo(G4Track* track) const {
+  if (track) {
+    Geant4TrackInformation* gau = 0;
     G4VUserTrackInformation* g4 = track->GetUserInformation();
-    if ( 0 == g4 )   {
+    if (0 == g4) {
       gau = new Geant4TrackInformation();
       track->SetUserInformation(gau);
-      return gau;                                                 // RETURN 
+      return gau;                                                 // RETURN
     }
     gau = fast_cast<Geant4TrackInformation*>(g4);
-    if( !gau )  {
+    if (!gau) {
       error("trackInfo: invalid cast to Geant4TrajckInformation");
     }
-    return gau ;
+    return gau;
   }
   error("trackInfo: [Invalid G4Track]");
   return 0;
 }
 
 /// Mark all children of the track to be stored
-bool Geant4TrackingAction::storeChildren()  const   {
+bool Geant4TrackingAction::storeChildren() const {
   G4TrackVector* v = trackMgr()->GimmeSecondaries();
-  if( v )   {  // loop over all children
-    for(G4TrackVector::const_iterator i = v->begin(); i != v->end(); ++i)  {
-      G4Track* t = *i ;
-      if ( t )   {
-	storeChild(trackInfo(t));
+  if (v) {   // loop over all children
+    for (G4TrackVector::const_iterator i = v->begin(); i != v->end(); ++i) {
+      G4Track* t = *i;
+      if (t) {
+        storeChild(trackInfo(t));
       }
     }
     return true;
@@ -119,12 +118,12 @@ bool Geant4TrackingAction::storeChildren()  const   {
 }
 
 /// Mark a single child of the track to be stored
-bool Geant4TrackingAction::storeChild(Geant4TrackInformation* info)  const   {
-  if ( 0 != info )  {
-    if ( !info->storeTrack() )  {
+bool Geant4TrackingAction::storeChild(Geant4TrackInformation* info) const {
+  if (0 != info) {
+    if (!info->storeTrack()) {
       info->storeTrack(true);
     }
     return true;
   }
-  return error(false,"storeChild: Geant4TrackInformation points to NULL!");
+  return error(false, "storeChild: Geant4TrackInformation points to NULL!");
 }
diff --git a/DDG4/src/Geant4TrackingPostAction.cpp b/DDG4/src/Geant4TrackingPostAction.cpp
index 26e0c71d1541baae8cbf6bc88e61409f2a681b50..1967542596b267391d97b2153c3de2375464a260 100644
--- a/DDG4/src/Geant4TrackingPostAction.cpp
+++ b/DDG4/src/Geant4TrackingPostAction.cpp
@@ -20,10 +20,14 @@
 using namespace std;
 using namespace DD4hep::Simulation;
 
-struct FindString  {
+struct FindString {
   const std::string& m_name;
-  FindString(const std::string& n) : m_name(n) {}
-  bool operator()(const std::string& n) const  {  return m_name == n; }
+  FindString(const std::string& n)
+      : m_name(n) {
+  }
+  bool operator()(const std::string& n) const {
+    return m_name == n;
+  }
   //template <class T> bool operator==(const std::pair<std::string,T>& cmp)  const
   //{  return cmp.first == m_name;  }
   //template <class T> bool operator==(const std::pair<T,std::string>& cmp)  const
@@ -31,61 +35,59 @@ struct FindString  {
 };
 
 /// Standard constructor
-Geant4TrackingPostAction::Geant4TrackingPostAction(Geant4Context* context, const std::string& name) 
-: Geant4TrackingAction(context,name) 
-{
+Geant4TrackingPostAction::Geant4TrackingPostAction(Geant4Context* context, const std::string& name)
+    : Geant4TrackingAction(context, name) {
   InstanceCount::increment(this);
-  declareProperty("IgnoredProcesses",m_ignoredProcs);
-  declareProperty("RequiredProcesses",m_requiredProcs);
+  declareProperty("IgnoredProcesses", m_ignoredProcs);
+  declareProperty("RequiredProcesses", m_requiredProcs);
 }
 
 /// Default destructor
-Geant4TrackingPostAction::~Geant4TrackingPostAction()  {
+Geant4TrackingPostAction::~Geant4TrackingPostAction() {
   InstanceCount::decrement(this);
 }
 
 /// Begin-of-tracking callback
-void Geant4TrackingPostAction::begin(const G4Track* track)  {
+void Geant4TrackingPostAction::begin(const G4Track* track) {
 
-  // Is the track valid? Is tracking manager valid? 
+  // Is the track valid? Is tracking manager valid?
   // Does trajectory already exist?
-  if( 0 == track || 0 == trackMgr() || 0 != trackMgr()->GimmeTrajectory()  ) 
+  if (0 == track || 0 == trackMgr() || 0 != trackMgr()->GimmeTrajectory())
     return;
   trackMgr()->SetStoreTrajectory(true);
-  // create GaussTrajectory and inform Tracking Manager 
+  // create GaussTrajectory and inform Tracking Manager
   G4VTrajectory* tr = m_context->createTrajectory(track);
   trackMgr()->SetTrajectory(tr);
 }
 
 /// End-of-tracking callback
-void Geant4TrackingPostAction::end(const G4Track* tr)  {
-  if ( 0 == tr )
+void Geant4TrackingPostAction::end(const G4Track* tr) {
+  if (0 == tr)
     return;
-  else if ( 0 == trackMgr() )
+  else if (0 == trackMgr())
     return;
 
   Geant4TrackHandler track(tr);
   //Geant4TrackInformation* info = track.info<Geant4TrackInformation>();
   const string& proc = track.creatorProcess()->GetProcessName();
-  StringV::const_iterator trIt = find_if(m_ignoredProcs.begin(),m_ignoredProcs.end(),FindString(proc));
-  if ( trIt != m_ignoredProcs.end() )  {
-    warning("Particles created by processes of type %s are not kept!",(*trIt).c_str());
+  StringV::const_iterator trIt = find_if(m_ignoredProcs.begin(), m_ignoredProcs.end(), FindString(proc));
+  if (trIt != m_ignoredProcs.end()) {
+    warning("Particles created by processes of type %s are not kept!", (*trIt).c_str());
     return;
   }
-  trIt = find_if(m_requiredProcs.begin(),m_requiredProcs.end(),FindString(proc));
-  if ( trIt != m_requiredProcs.end() )  {
+  trIt = find_if(m_requiredProcs.begin(), m_requiredProcs.end(), FindString(proc));
+  if (trIt != m_requiredProcs.end()) {
     saveTrack(track);
     return;
   }
 
-  if ( m_storeMarkedTracks )   {
+  if (m_storeMarkedTracks) {
   }
 
-
 }
 
-void Geant4TrackingPostAction::saveTrack(const G4Track* track)    {
-  if ( 0 != track )  {
+void Geant4TrackingPostAction::saveTrack(const G4Track* track) {
+  if (0 != track) {
   }
 }
 
diff --git a/DDG4/src/Geant4TrackingPreAction.cpp b/DDG4/src/Geant4TrackingPreAction.cpp
index 97cf644d4e5b4e1e5b3fe592c2f03b39a06f4bac..6c8db1aaf55a2005d3937ac659ac1cca77b98a4a 100644
--- a/DDG4/src/Geant4TrackingPreAction.cpp
+++ b/DDG4/src/Geant4TrackingPreAction.cpp
@@ -16,29 +16,28 @@
 using namespace DD4hep::Simulation;
 
 /// Standard constructor
-Geant4TrackingPreAction::Geant4TrackingPreAction(Geant4Context* context, const std::string& name) 
-: Geant4TrackingAction(context,name) 
-{
+Geant4TrackingPreAction::Geant4TrackingPreAction(Geant4Context* context, const std::string& name)
+    : Geant4TrackingAction(context, name) {
   InstanceCount::increment(this);
 }
 
 /// Default destructor
-Geant4TrackingPreAction::~Geant4TrackingPreAction()  {
+Geant4TrackingPreAction::~Geant4TrackingPreAction() {
   InstanceCount::decrement(this);
 }
 
 /// Begin-of-tracking callback
-void Geant4TrackingPreAction::begin(const G4Track* track)  {
-  // Is the track valid? Is tracking manager valid? 
+void Geant4TrackingPreAction::begin(const G4Track* track) {
+  // Is the track valid? Is tracking manager valid?
   // Does trajectory already exist?
-  if( 0 == track || 0 == trackMgr() || 0 != trackMgr()->GimmeTrajectory()  ) 
+  if (0 == track || 0 == trackMgr() || 0 != trackMgr()->GimmeTrajectory())
     return;
   trackMgr()->SetStoreTrajectory(true);
-  // create GaussTrajectory and inform Tracking Manager 
+  // create GaussTrajectory and inform Tracking Manager
   G4VTrajectory* tr = m_context->createTrajectory(track);
   trackMgr()->SetTrajectory(tr);
 }
 
 /// End-of-tracking callback
-void Geant4TrackingPreAction::end(const G4Track* /* track */)  {
+void Geant4TrackingPreAction::end(const G4Track* /* track */) {
 }
diff --git a/DDG4/src/Geant4UI.cpp b/DDG4/src/Geant4UI.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..85c2ba1bfb2ee9dae96d931092d354864330c4b5
--- /dev/null
+++ b/DDG4/src/Geant4UI.cpp
@@ -0,0 +1,65 @@
+// $Id: Geant4Field.cpp 875 2013-11-04 16:15:14Z markus.frank@cern.ch $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+// Framework include files
+#include "DDG4/Geant4Field.h"
+
+using namespace DD4hep::Simulation;
+using namespace DD4hep::Geometry;
+using namespace DD4hep;
+using namespace std;
+
+#if 0
+#ifdef G4VIS_USE_OPENGLX
+#include "G4OpenGLImmediateX.hh"
+#include "G4OpenGLStoredX.hh"
+#endif
+
+void startX() {
+  // Initialize visualization
+  G4VisManager* visManager = 0;
+  if ( is_visual ) {
+    visManager = new G4VisExecutive();
+#ifdef G4VIS_USE_OPENGLX
+    //visManager->RegisterGraphicsSystem (new G4OpenGLImmediateX());
+    //visManager->RegisterGraphicsSystem (new G4OpenGLStoredX());
+#endif
+    visManager->Initialize();
+  }
+}
+#endif
+
+#if 0
+Geant4UIManager::Geant4UIManager()
+{
+  declareProperty("");
+}
+
+Geant4UIManager::operator() {
+  // Get the pointer to the User Interface manager
+  G4UImanager* mgr = G4UImanager::GetUIpointer();
+
+  if ( !gui_type.empty() ) {   // interactive mode : define UI session
+    G4UIExecutive* ui = 0;
+    const char* args[] = {"cmd"};
+    ui = new G4UIExecutive(1,(char**)args);
+    if ( is_visual && !vis_setup.empty() ) {
+      mgr->ApplyCommand("/control/execute vis.mac");
+      cout << "++++++++++++++++++++++++++++ executed vis.mac" << endl;
+    }
+
+    if (ui->IsGUI()) {
+      if ( !gui_setup.empty() ) {
+        mgr->ApplyCommand("/control/execute "+gui_setup);
+        cout << "++++++++++++++++++++++++++++ executed gui.mac" << endl;
+      }
+    }
+    ui->SessionStart();
+    delete ui;
+  }
+#endif
diff --git a/DDG4/src/Geant4UIMessenger.cpp b/DDG4/src/Geant4UIMessenger.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..906ce22db7740a8d2dc153b2f1e043787200aca8
--- /dev/null
+++ b/DDG4/src/Geant4UIMessenger.cpp
@@ -0,0 +1,106 @@
+// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
+//====================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------
+//
+//  Author     : M.Frank
+//
+//====================================================================
+
+// Framework include files
+#include "DD4hep/Printout.h"
+#include "DD4hep/Primitives.h"
+#include "DDG4/Geant4UIMessenger.h"
+
+// Geant4 include files
+#include "G4UIcmdWithoutParameter.hh"
+#include "G4UIcmdWithAString.hh"
+
+// C/C++ include files
+#include <algorithm>
+
+using namespace std;
+using namespace DD4hep;
+using namespace DD4hep::Simulation;
+
+namespace {
+  struct InstallProperties {
+    Geant4UIMessenger::Commands& cmds;
+    const std::string& path;
+    G4UImessenger* msg;
+    InstallProperties(Geant4UIMessenger::Commands& c, const std::string& p, G4UImessenger* m)
+        : cmds(c), path(p), msg(m) {
+    }
+    void operator()(const pair<string, Property>& o) {
+      string n = path + o.first;
+      G4UIcmdWithAString* cmd = new G4UIcmdWithAString(n.c_str(), msg);
+      cmd->SetParameterName(o.first.c_str(), true);
+      cmd->SetGuidance(("Property item of type " + o.second.type()).c_str());
+      cmds[cmd] = o.first;
+    }
+  };
+}
+
+Geant4UIMessenger::Geant4UIMessenger(const string& name, const string& path)
+    : G4UImessenger(), m_directory(0), m_properties(0), m_name(name), m_path(path) {
+  m_directory = new G4UIdirectory(path.c_str());
+  printout(INFO, "Geant4UIMessenger", "+++ %s> Install Geant4 control directory:%s", name.c_str(), path.c_str());
+  m_directory->SetGuidance(("Control hierarchy for Geant4 action:" + name).c_str());
+}
+
+/// Default destructor
+Geant4UIMessenger::~Geant4UIMessenger() {
+  for_each(m_propertyCmd.begin(), m_propertyCmd.end(), destroyFirst(m_propertyCmd));
+  for_each(m_actionCmd.begin(), m_actionCmd.end(), destroyFirst(m_actionCmd));
+}
+
+/// Add a new callback structure
+void Geant4UIMessenger::addCall(const std::string& name, const std::string& description, const Callback& cb) {
+  G4UIcommand* cmd = new G4UIcmdWithoutParameter((m_path + name).c_str(), this);
+  cmd->SetGuidance(description.c_str());
+  m_actionCmd[cmd] = cb;
+}
+
+/// Export all properties to the Geant4 UI
+void Geant4UIMessenger::exportProperties(PropertyManager& mgr) {
+  InstallProperties installer(m_propertyCmd, m_path, this);
+  m_properties = &mgr;
+  addCall("show", "Show all properties of Geant4 component:" + m_name, Callback(m_properties).make(&PropertyManager::dump));
+  m_properties->for_each(installer);
+}
+
+/// Pass current property value to Geant4 UI
+G4String Geant4UIMessenger::GetCurrentValue(G4UIcommand * c) {
+  Commands::iterator i = m_propertyCmd.find(c);
+  if (m_properties && i != m_propertyCmd.end()) {
+    const string& n = (*i).second;
+    return (*m_properties)[n].str();
+  }
+  printout(INFO, "Geant4UIMessenger", "+++ %s> Failed to access property value.", m_name.c_str());
+  return "";
+}
+
+/// Accept ne property value from Geant4 UI
+void Geant4UIMessenger::SetNewValue(G4UIcommand *c, G4String v) {
+  Commands::iterator i = m_propertyCmd.find(c);
+  if (m_properties && i != m_propertyCmd.end()) {
+    const string& n = (*i).second;
+    if (!v.empty()) {
+      printout(INFO, "Geant4UIMessenger", "+++ %s> Setting new property value %s = %s.", m_name.c_str(), n.c_str(), v.c_str());
+      (*m_properties)[n].str(v);
+    }
+    else {
+      string value = (*m_properties)[n].str();
+      printout(INFO, "Geant4UIMessenger", "+++ %s> Unchanged property value %s = %s.", m_name.c_str(), n.c_str(),
+          value.c_str());
+    }
+    return;
+  }
+  Actions::iterator j = m_actionCmd.find(c);
+  if (j != m_actionCmd.end()) {
+    (*j).second.execute(0);
+    return;
+  }
+  printout(INFO, "Geant4UIMessenger", "+++ %s> Unknown command callback!", m_name.c_str());
+}
+
diff --git a/DDG4/src/Geant4VolumeManager.cpp b/DDG4/src/Geant4VolumeManager.cpp
index a473ef1087c44018eb8338d95bafd6b094cbcc5c..20f141854ff6cd82b88f8984198e652eb6730cbb 100644
--- a/DDG4/src/Geant4VolumeManager.cpp
+++ b/DDG4/src/Geant4VolumeManager.cpp
@@ -24,178 +24,178 @@ using namespace DD4hep::Geometry;
 using namespace DD4hep;
 using namespace std;
 
-typedef Geant4GeometryInfo::PathMap      PathMap;
+typedef Geant4GeometryInfo::PathMap PathMap;
 typedef Geant4GeometryInfo::PlacementMap PlacementMap;
 
 namespace {
 
-  struct Populator  {
-    typedef vector<const TGeoNode*>      Chain;
-    typedef DD4hep::Geometry::LCDD       LCDD;
-    typedef DD4hep::Geometry::Readout    Readout;
+  struct Populator {
+    typedef vector<const TGeoNode*> Chain;
+    typedef DD4hep::Geometry::LCDD LCDD;
+    typedef DD4hep::Geometry::Readout Readout;
     typedef DD4hep::Geometry::DetElement DetElement;
 
     /// Reference to the LCDD instance
-    LCDD&               m_lcdd;
+    LCDD& m_lcdd;
     /// Set of already added entries
-    set<VolumeID>       m_entries;
+    set<VolumeID> m_entries;
     /// Reference to Geant4 translation information
     Geant4GeometryInfo& m_geo;
 
     /// Default constructor
-    Populator(LCDD& lcdd, Geant4GeometryInfo& g) : m_lcdd(lcdd), m_geo(g) {
+    Populator(LCDD& lcdd, Geant4GeometryInfo& g)
+        : m_lcdd(lcdd), m_geo(g) {
     }
 
     /// Populate the Volume manager
-    void populate(DetElement e)   {
+    void populate(DetElement e) {
       const DetElement::Children& c = e.children();
-      for(DetElement::Children::const_iterator i=c.begin(); i!=c.end(); ++i)   {
-	DetElement   de = (*i).second;
-	PlacedVolume pv = de.placement();
-	if ( pv.isValid() )  {
-	  Chain                chain;
-	  SensitiveDetector    sd;
-	  PlacedVolume::VolIDs ids;
-	  m_entries.clear();
-	  scanPhysicalVolume(pv.ptr(), ids, sd, chain);
-	  continue;
-	}
-	printout(WARNING,"VolumeManager","++ Detector element %s of type %s has no placement.",
-		 de.name(),de.type().c_str());
+      for (DetElement::Children::const_iterator i = c.begin(); i != c.end(); ++i) {
+        DetElement de = (*i).second;
+        PlacedVolume pv = de.placement();
+        if (pv.isValid()) {
+          Chain chain;
+          SensitiveDetector sd;
+          PlacedVolume::VolIDs ids;
+          m_entries.clear();
+          scanPhysicalVolume(pv.ptr(), ids, sd, chain);
+          continue;
+        }
+        printout(WARNING, "VolumeManager", "++ Detector element %s of type %s has no placement.", de.name(), de.type().c_str());
       }
     }
 
     /// Scan a single physical volume and look for sensitive elements below
-    void scanPhysicalVolume(const TGeoNode* node, PlacedVolume::VolIDs ids, SensitiveDetector& sd, Chain& chain)    {
-      PlacedVolume pv  = Ref_t(node);
-      Volume       vol = pv.volume();
+    void scanPhysicalVolume(const TGeoNode* node, PlacedVolume::VolIDs ids, SensitiveDetector& sd, Chain& chain) {
+      PlacedVolume pv = Ref_t(node);
+      Volume vol = pv.volume();
       PlacedVolume::VolIDs pv_ids = pv.volIDs();
 
       chain.push_back(node);
-      ids.PlacedVolume::VolIDs::Base::insert(ids.end(),pv_ids.begin(),pv_ids.end());
-      if ( vol.isSensitive() )  {
-	sd = vol.sensitiveDetector();
-	if ( sd.readout().isValid() )  {
-	  add_entry(sd, node, ids, chain);
-	}
-	else  {
-	  printout(WARNING,"VolumeManager",
-		   "populate: Strange constellation volume %s is sensitive, but has no readout! sd:%p",
-		   pv.volume().name(), sd.ptr());
-	}
+      ids.PlacedVolume::VolIDs::Base::insert(ids.end(), pv_ids.begin(), pv_ids.end());
+      if (vol.isSensitive()) {
+        sd = vol.sensitiveDetector();
+        if (sd.readout().isValid()) {
+          add_entry(sd, node, ids, chain);
+        }
+        else {
+          printout(WARNING, "VolumeManager",
+              "populate: Strange constellation volume %s is sensitive, but has no readout! sd:%p", pv.volume().name(),
+              sd.ptr());
+        }
       }
-      for(Int_t idau=0, ndau=node->GetNdaughters(); idau<ndau; ++idau)  {
-	TGeoNode* daughter = node->GetDaughter(idau);
-	if ( dynamic_cast<const PlacedVolume::Object*>(daughter) ) {
-	  scanPhysicalVolume(daughter, ids, sd, chain);
-	}
+      for (Int_t idau = 0, ndau = node->GetNdaughters(); idau < ndau; ++idau) {
+        TGeoNode* daughter = node->GetDaughter(idau);
+        if (dynamic_cast<const PlacedVolume::Object*>(daughter)) {
+          scanPhysicalVolume(daughter, ids, sd, chain);
+        }
       }
       chain.pop_back();
     }
 
-    void add_entry(SensitiveDetector sd, const TGeoNode* /* n */, const PlacedVolume::VolIDs& ids, const Chain& nodes)  {
-      Readout      ro      = sd.readout();
-      IDDescriptor iddesc  = ro.idSpec();
-      VolumeID     code    = iddesc.encode(ids);
-      if ( m_entries.find(code) == m_entries.end() )  {
-	Geant4Mapping::PlacementPath path;
-	path.reserve(nodes.size());
-	for(Chain::const_reverse_iterator i=nodes.rbegin(); i != nodes.rend(); ++i)   {
-	  const TGeoNode* node = *i;
-	  PlacementMap::const_iterator g4pit = m_geo.g4Placements.find(node);
-	  if ( g4pit != m_geo.g4Placements.end() )  {
-	    path.push_back((*g4pit).second);
-	  }
-	}
-	if ( m_geo.g4Paths.find(path) != m_geo.g4Paths.end() )  {
-	  printout(ERROR,"VolumeManager","populate: Severe error: Duplicated Geant4 path!!!!");
-	}
-	m_geo.g4Paths[path] = code;
-	m_entries.insert(code);
+    void add_entry(SensitiveDetector sd, const TGeoNode* /* n */, const PlacedVolume::VolIDs& ids, const Chain& nodes) {
+      Readout ro = sd.readout();
+      IDDescriptor iddesc = ro.idSpec();
+      VolumeID code = iddesc.encode(ids);
+      if (m_entries.find(code) == m_entries.end()) {
+        Geant4Mapping::PlacementPath path;
+        path.reserve(nodes.size());
+        for (Chain::const_reverse_iterator i = nodes.rbegin(); i != nodes.rend(); ++i) {
+          const TGeoNode* node = *i;
+          PlacementMap::const_iterator g4pit = m_geo.g4Placements.find(node);
+          if (g4pit != m_geo.g4Placements.end()) {
+            path.push_back((*g4pit).second);
+          }
+        }
+        if (m_geo.g4Paths.find(path) != m_geo.g4Paths.end()) {
+          printout(ERROR, "VolumeManager", "populate: Severe error: Duplicated Geant4 path!!!!");
+        }
+        m_geo.g4Paths[path] = code;
+        m_entries.insert(code);
       }
-      else   {
-	printout(ERROR,"VolumeManager","populate: Severe error: Duplicated Volume entry: %X",code);
+      else {
+        printout(ERROR, "VolumeManager", "populate: Severe error: Duplicated Volume entry: %X", code);
       }
     }
   };
 }
 
 /// Initializing constructor. The tree will automatically be built if possible
-Geant4VolumeManager::Geant4VolumeManager(LCDD& lcdd, Geant4GeometryInfo* info) 
-: Base(info), m_isValid(false)
-{
-  if ( info && info->valid && info->g4Paths.empty() )   {
-    Populator p(lcdd,*info);
+Geant4VolumeManager::Geant4VolumeManager(LCDD& lcdd, Geant4GeometryInfo* info)
+    : Base(info), m_isValid(false) {
+  if (info && info->valid && info->g4Paths.empty()) {
+    Populator p(lcdd, *info);
     p.populate(lcdd.world());
     return;
   }
-  throw runtime_error(format("Geant4VolumeManager","Attempt populate from invalid Geant4 geometry info [Invalid-Info]"));
+  throw runtime_error(format("Geant4VolumeManager", "Attempt populate from invalid Geant4 geometry info [Invalid-Info]"));
 }
 
 /// Helper: Generate placement path from touchable object
-Geant4VolumeManager::PlacementPath 
-Geant4VolumeManager::placementPath(const G4VTouchable* touchable, bool exception) const   
-{
+Geant4VolumeManager::PlacementPath Geant4VolumeManager::placementPath(const G4VTouchable* touchable, bool exception) const {
   Geant4Mapping::PlacementPath path;
-  if ( touchable )   {
-    for(int i=0, n=touchable->GetHistoryDepth(); i<n; ++i)  {
+  if (touchable) {
+    for (int i = 0, n = touchable->GetHistoryDepth(); i < n; ++i) {
       G4VPhysicalVolume* pv = touchable->GetVolume(i);
       path.push_back(pv);
     }
   }
-  else if ( exception )  {
-    throw runtime_error(format("Geant4VolumeManager","Attempt to use invalid Geant4 touchable [Invalid-Touchable]"));
+  else if (exception) {
+    throw runtime_error(format("Geant4VolumeManager", "Attempt to use invalid Geant4 touchable [Invalid-Touchable]"));
   }
   return path;
 }
 
 /// Check the validity of the information before accessing it.
-bool Geant4VolumeManager::checkValidity() const   {
-  if ( m_isValid )  {
+bool Geant4VolumeManager::checkValidity() const {
+  if (m_isValid) {
     return true;
   }
-  else if ( !isValid() )   {
-    throw runtime_error(format("Geant4VolumeManager","Attempt to use invalid Geant4 volume manager [Invalid-Handle]"));
+  else if (!isValid()) {
+    throw runtime_error(format("Geant4VolumeManager", "Attempt to use invalid Geant4 volume manager [Invalid-Handle]"));
   }
-  else if ( !ptr()->valid )  {
-    throw runtime_error(format("Geant4VolumeManager","Attempt to use invalid Geant4 geometry info [Invalid-Info]"));
+  else if (!ptr()->valid) {
+    throw runtime_error(format("Geant4VolumeManager", "Attempt to use invalid Geant4 geometry info [Invalid-Info]"));
   }
   m_isValid = true;
   return m_isValid;
 }
 
 /// Accessor to resolve G4 placements
-G4VPhysicalVolume* Geant4VolumeManager::placement(const TGeoNode* node)  const   {
-  if ( node && checkValidity() )  {
+G4VPhysicalVolume* Geant4VolumeManager::placement(const TGeoNode* node) const {
+  if (node && checkValidity()) {
     const PlacementMap& m = ptr()->g4Placements;
     PlacementMap::const_iterator i = m.find(node);
-    if ( i !=  m.end() ) return (*i).second;
+    if (i != m.end())
+      return (*i).second;
     return 0;
   }
-  throw runtime_error(format("Geant4VolumeManager","Attempt to use invalid Geant4 volume manager [Invalid-Handle]"));
+  throw runtime_error(format("Geant4VolumeManager", "Attempt to use invalid Geant4 volume manager [Invalid-Handle]"));
 }
 
 /// Accessor to resolve geometry placements
-PlacedVolume Geant4VolumeManager::placement(const G4VPhysicalVolume* node)  const   {
-  if ( node && checkValidity() )  {
+PlacedVolume Geant4VolumeManager::placement(const G4VPhysicalVolume* node) const {
+  if (node && checkValidity()) {
     const PlacementMap& m = ptr()->g4Placements;
-    for(PlacementMap::const_iterator i = m.begin(); i != m.end(); ++i)   {
-      if ( (*i).second == node ) return PlacedVolume((*i).first);
+    for (PlacementMap::const_iterator i = m.begin(); i != m.end(); ++i) {
+      if ((*i).second == node)
+        return PlacedVolume((*i).first);
     }
     return PlacedVolume(0);
   }
-  throw runtime_error(format("Geant4VolumeManager","Attempt to lookup invalid TGeo placement [Null-Pointer]"));
+  throw runtime_error(format("Geant4VolumeManager", "Attempt to lookup invalid TGeo placement [Null-Pointer]"));
 }
 
 /// Access CELLID by placement path
-VolumeID Geant4VolumeManager::volumeID(const PlacementPath& path) const    {
-  if ( !path.empty() && checkValidity() )  {
+VolumeID Geant4VolumeManager::volumeID(const PlacementPath& path) const {
+  if (!path.empty() && checkValidity()) {
     const PathMap& m = ptr()->g4Paths;
-    PathMap::const_iterator i=m.find(path);
-    if ( i != m.end() ) return (*i).second;
-    if ( !path[0] )
+    PathMap::const_iterator i = m.find(path);
+    if (i != m.end())
+      return (*i).second;
+    if (!path[0])
       return InvalidPath;
-    else if ( !path[0]->GetLogicalVolume()->GetSensitiveDetector() )
+    else if (!path[0]->GetLogicalVolume()->GetSensitiveDetector())
       return Insensitive;
     return NonExisting;
   }
@@ -203,34 +203,34 @@ VolumeID Geant4VolumeManager::volumeID(const PlacementPath& path) const    {
 }
 
 /// Access CELLID by Geant4 touchable object
-VolumeID Geant4VolumeManager::volumeID(const G4VTouchable* touchable) const   {
+VolumeID Geant4VolumeManager::volumeID(const G4VTouchable* touchable) const {
   return volumeID(placementPath(touchable));
 }
 
 /// Accessfully decoded volume fields  by placement path
-void Geant4VolumeManager::volumeDescriptor(const PlacementPath& path, VolIDDescriptor& vol_desc) const    {
+void Geant4VolumeManager::volumeDescriptor(const PlacementPath& path, VolIDDescriptor& vol_desc) const {
   vol_desc.second.clear();
   vol_desc.first = NonExisting;
-  if ( !path.empty() && checkValidity() )  {
+  if (!path.empty() && checkValidity()) {
     const PathMap& m = ptr()->g4Paths;
-    PathMap::const_iterator i=m.find(path);
-    if ( i != m.end() )   {
+    PathMap::const_iterator i = m.find(path);
+    if (i != m.end()) {
       VolumeID vid = (*i).second;
       G4LogicalVolume* lvol = path[0]->GetLogicalVolume();
-      if ( lvol->GetSensitiveDetector() )  {
-	PlacedVolume pv = placement(path[0]);
-	Geometry::SensitiveDetector sd  = pv.volume().sensitiveDetector();
-	Geometry::IDDescriptor      dsc = sd.readout().idSpec();
-	vol_desc.first = vid;
-	dsc.decodeFields(vid,vol_desc.second);
-	return;
+      if (lvol->GetSensitiveDetector()) {
+        PlacedVolume pv = placement(path[0]);
+        Geometry::SensitiveDetector sd = pv.volume().sensitiveDetector();
+        Geometry::IDDescriptor dsc = sd.readout().idSpec();
+        vol_desc.first = vid;
+        dsc.decodeFields(vid, vol_desc.second);
+        return;
       }
       vol_desc.first = Insensitive;
       return;
     }
-    if ( !path[0] )
+    if (!path[0])
       vol_desc.first = InvalidPath;
-    else if ( !path[0]->GetLogicalVolume()->GetSensitiveDetector() )
+    else if (!path[0]->GetLogicalVolume()->GetSensitiveDetector())
       vol_desc.first = Insensitive;
     else
       vol_desc.first = NonExisting;
@@ -238,7 +238,7 @@ void Geant4VolumeManager::volumeDescriptor(const PlacementPath& path, VolIDDescr
 }
 
 /// Access fully decoded volume fields by Geant4 touchable object
-void Geant4VolumeManager::volumeDescriptor(const G4VTouchable* touchable, VolIDDescriptor& vol_desc) const    {
-  volumeDescriptor(placementPath(touchable),vol_desc);
+void Geant4VolumeManager::volumeDescriptor(const G4VTouchable* touchable, VolIDDescriptor& vol_desc) const {
+  volumeDescriptor(placementPath(touchable), vol_desc);
 }