From 75b5c255d34875fea95e7a9c779e410793cf7f0d Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Wed, 10 Jul 2019 12:08:00 +0200
Subject: [PATCH] Optimize containers replace insert/push with emplace

---
 DDAlign/src/GlobalAlignmentCache.cpp          |  4 +-
 DDAlign/src/GlobalAlignmentStack.cpp          |  3 +-
 DDAlign/src/GlobalDetectorAlignment.cpp       |  8 +-
 DDCond/include/DDCond/ConditionsSelectors.h   | 16 ++--
 DDCond/src/ConditionsDataLoader.cpp           |  4 +-
 DDCond/src/ConditionsDependencyHandler.cpp    | 14 ++--
 DDCond/src/ConditionsIOVPool.cpp              |  2 +-
 DDCond/src/ConditionsManager.cpp              |  5 +-
 DDCond/src/ConditionsOperators.cpp            |  4 +-
 DDCond/src/ConditionsRepository.cpp           |  4 +-
 DDCond/src/ConditionsRootPersistency.cpp      | 10 +--
 DDCond/src/ConditionsTextRepository.cpp       |  4 +-
 DDCond/src/ConditionsTreePersistency.cpp      | 10 +--
 DDCond/src/plugins/ConditionsLinearPool.cpp   | 22 +++--
 DDCond/src/plugins/ConditionsMappedPool.cpp   | 19 +++--
 DDCond/src/plugins/ConditionsParser.cpp       |  4 +-
 DDCond/src/plugins/ConditionsPlugins.cpp      |  4 +-
 .../plugins/ConditionsSnapshotRootLoader.cpp  |  2 +-
 DDCond/src/plugins/ConditionsUserPool.cpp     |  4 +-
 DDCond/src/plugins/ConditionsXmlLoader.cpp    | 10 +--
 DDCore/include/DD4hep/SurfaceInstaller.h      |  4 +-
 .../include/DD4hep/detail/BasicGrammar_inl.h  | 10 +--
 .../include/DD4hep/detail/ContainerHelpers.h  | 16 ++--
 DDCore/include/DDSegmentation/BitFieldCoder.h |  2 +-
 .../DDSegmentation/MegatileLayerGridXY.h      | 12 +--
 .../DDSegmentation/SegmentationParameter.h    |  4 +-
 .../include/DDSegmentation/TiledLayerGridXY.h |  8 +-
 DDCore/include/XML/Layering.h                 |  2 +-
 DDCore/src/AlignmentTools.cpp                 |  2 +-
 DDCore/src/ConditionDerived.cpp               |  2 +-
 DDCore/src/ConditionsMap.cpp                  |  2 +-
 DDCore/src/DetElement.cpp                     |  4 +-
 DDCore/src/DetectorImp.cpp                    | 15 ++--
 DDCore/src/DetectorSelector.cpp               |  2 +-
 DDCore/src/DetectorTools.cpp                  | 28 +++----
 DDCore/src/Fields.cpp                         |  4 +-
 DDCore/src/GeoHandler.cpp                     |  6 +-
 DDCore/src/IDDescriptor.cpp                   |  6 +-
 DDCore/src/JSON/Elements.cpp                  |  2 +-
 DDCore/src/Path.cpp                           |  2 +-
 DDCore/src/PluginCreators.cpp                 |  4 +-
 DDCore/src/Readout.cpp                        |  6 +-
 DDCore/src/Shapes.cpp                         | 80 +++++++++----------
 DDCore/src/VolumeManager.cpp                  |  2 +-
 DDCore/src/Volumes.cpp                        |  3 +-
 DDCore/src/XML/DocumentHandler.cpp            |  5 ++
 DDCore/src/XML/Layering.cpp                   |  5 +-
 DDCore/src/XML/XMLElements.cpp                |  4 +-
 DDCore/src/gdml/DetElementCreator.cpp         |  4 +-
 DDCore/src/plugins/CodeGenerator.cpp          |  6 +-
 DDCore/src/plugins/Compact2Objects.cpp        | 24 +++---
 DDCore/src/plugins/PluginInvoker.cpp          |  6 +-
 DDCore/src/plugins/ShapePlugins.cpp           | 24 +++---
 DDCore/src/plugins/StandardPlugins.cpp        | 10 +--
 DDCore/src/plugins/TGeoCodeGenerator.cpp      | 32 ++++----
 DDCore/src/plugins/VisProcessor.cpp           |  6 +-
 DDCore/src/plugins/VolumeMgrTest.cpp          |  4 +-
 DDCore/src/python/PythonPlugin.cpp            | 12 +--
 DDCore/src/segmentations/BitFieldCoder.cpp    |  3 +-
 .../src/segmentations/MultiSegmentation.cpp   |  2 +-
 DDCore/src/segmentations/Segmentation.cpp     |  2 +-
 .../src/segmentations/SegmentationFactory.cpp |  2 +-
 .../segmentations/TiledLayerSegmentation.cpp  |  6 +-
 DDDigi/include/DDDigi/DigiAction.h            |  2 +-
 DDG4/include/DDG4/Geant4Action.h              |  2 +-
 DDG4/include/DDG4/Geant4HitCollection.h       |  4 +-
 DDG4/plugins/Geant4EventReaderHepMC.cpp       | 33 ++++----
 DDG4/plugins/Geant4HitExtractor.cpp           |  4 +-
 DDG4/plugins/Geant4MaterialScanner.cpp        |  2 +-
 DDG4/plugins/Geant4SDActions.cpp              |  6 +-
 DDG4/plugins/Geant4SensDet.cpp                |  2 +-
 DDG4/plugins/Geant4XMLSetup.cpp               |  6 +-
 DDG4/src/Geant4ActionPhase.cpp                |  2 +-
 DDG4/src/Geant4Converter.cpp                  | 32 ++++----
 DDG4/src/Geant4HitCollection.cpp              | 16 ++--
 DDG4/src/Geant4InputAction.cpp                | 10 +--
 DDG4/src/Geant4InputHandling.cpp              | 10 +--
 DDG4/src/Geant4Output2ROOT.cpp                |  6 +-
 DDG4/src/Geant4Particle.cpp                   |  2 +-
 DDG4/src/Geant4ParticleGenerator.cpp          | 19 +++--
 DDG4/src/Geant4PhysicsList.cpp                | 12 +--
 DDG4/src/Geant4Primary.cpp                    | 40 ++++------
 DDG4/src/Geant4SensDetAction.cpp              |  2 +-
 DDG4/src/Geant4TouchableHandler.cpp           |  2 +-
 DDG4/src/Geant4VolumeManager.cpp              | 18 ++---
 UtilityApps/src/converter.cpp                 |  2 +-
 UtilityApps/src/display.cpp                   | 22 ++---
 UtilityApps/src/dumpdetector.cpp              |  4 +-
 UtilityApps/src/materialBudget.cpp            |  2 +-
 UtilityApps/src/run_plugin.h                  | 18 ++---
 90 files changed, 404 insertions(+), 414 deletions(-)

diff --git a/DDAlign/src/GlobalAlignmentCache.cpp b/DDAlign/src/GlobalAlignmentCache.cpp
index fd36e2101..c177f8c0f 100644
--- a/DDAlign/src/GlobalAlignmentCache.cpp
+++ b/DDAlign/src/GlobalAlignmentCache.cpp
@@ -157,7 +157,7 @@ vector<GlobalAlignment> GlobalAlignmentCache::matches(const string& match, bool
       const char* n = v.second->GetName();
       if ( 0 == ::strncmp(n,match.c_str(),len) )   {
         if ( exclude_exact && len == ::strlen(n) ) continue;
-        result.push_back(GlobalAlignment(v.second));
+        result.emplace_back(GlobalAlignment(v.second));
       }
     }
   }
@@ -194,7 +194,7 @@ void GlobalAlignmentCache::apply(GlobalAlignmentStack& stack)    {
   while(stack.size() > 0)    {
     Entry* e = stack.pop().release();
     DetElement det = _detector(e->detector);
-    all[det].push_back(e);
+    all[det].emplace_back(e);
     if ( stack.hasMatrix(*e) || stack.needsReset(*e) || stack.resetChildren(*e) )  {
       detelt_updates.insert(make_pair(e->detector.path(),e->detector));
     }
diff --git a/DDAlign/src/GlobalAlignmentStack.cpp b/DDAlign/src/GlobalAlignmentStack.cpp
index 789918cee..1a87663a7 100644
--- a/DDAlign/src/GlobalAlignmentStack.cpp
+++ b/DDAlign/src/GlobalAlignmentStack.cpp
@@ -171,8 +171,7 @@ dd4hep_ptr<GlobalAlignmentStack::StackEntry> GlobalAlignmentStack::pop()   {
 vector<const GlobalAlignmentStack::StackEntry*> GlobalAlignmentStack::entries() const    {
   vector<const StackEntry*> result;
   result.reserve(m_stack.size());
-  for(Stack::const_iterator i=m_stack.begin(); i != m_stack.end(); ++i)
-    result.push_back((*i).second);
+  transform(begin(m_stack),end(m_stack),back_inserter(result),detail::select2nd(m_stack));
   return result;
 }
 
diff --git a/DDAlign/src/GlobalDetectorAlignment.cpp b/DDAlign/src/GlobalDetectorAlignment.cpp
index 5d5316ae3..35b26fb4e 100644
--- a/DDAlign/src/GlobalDetectorAlignment.cpp
+++ b/DDAlign/src/GlobalDetectorAlignment.cpp
@@ -130,11 +130,11 @@ namespace {
       //           << " " << string((*j)->GetName()) << " ";
       if ( ::strcmp((*j).ptr()->GetName(),(*k).placement().ptr()->GetName()) )  {
         //cout << "[DE]";
-        elements.push_back(make_pair(level,*k));
+        elements.emplace_back(make_pair(level,*k));
         ++k;
       }
       else  {
-        //elements.push_back(make_pair(level,DetElement()));
+        //elements.emplace_back(make_pair(level,DetElement()));
       }
       //cout << " ";
     }
@@ -236,10 +236,10 @@ GlobalAlignment GlobalDetectorAlignment::align(const string& elt_path, TGeoHMatr
     return _align(_alignment(*this),matrix,chk,overlap);
   else if ( elt_path[0] == '/' )   {
     GlobalAlignment a(elt_path);
-    volumeAlignments().push_back(a);
+    volumeAlignments().emplace_back(a);
     return _align(a,matrix,chk,overlap);
   }
   GlobalAlignment a(placementPath()+'/'+elt_path);
-  volumeAlignments().push_back(a);
+  volumeAlignments().emplace_back(a);
   return _align(a,matrix,chk,overlap);
 }
diff --git a/DDCond/include/DDCond/ConditionsSelectors.h b/DDCond/include/DDCond/ConditionsSelectors.h
index b3a26f26c..cda688aab 100644
--- a/DDCond/include/DDCond/ConditionsSelectors.h
+++ b/DDCond/include/DDCond/ConditionsSelectors.h
@@ -50,7 +50,7 @@ namespace dd4hep {
         T& mapping;
         SequenceSelect(T& o) : mapping(o) {                                            }
         bool operator()(Condition::Object* o)  const
-        { mapping.insert(mapping.end(), o); return true;                               }
+        { mapping.emplace(mapping.end(), o); return true;                              }
       };
 
       /// Mapped container selection operator for conditions mappings
@@ -59,11 +59,11 @@ namespace dd4hep {
        *  \version 1.0
        *  \ingroup DD4HEP_CONDITIONS
        */
-     template <typename T> struct MapSelect : public Cond__Oper  {
+     template <typename T> struct MapSelect : public Cond__Oper   {
         T& mapping;
-        MapSelect(T& o) : mapping(o) {                                                 }
+        MapSelect(T& o) : mapping(o) {                                               }
         bool operator()(Condition::Object* o)  const
-        { return mapping.insert(std::make_pair(o->hash,o)).second;                     }
+        { return mapping.emplace(o->hash,o).second;                                  }
       };
 
       /// Helper to collect conditions using a ConditionsSelect base class
@@ -76,8 +76,8 @@ namespace dd4hep {
         T& mapping;
         MapConditionsSelect(T& o) : mapping(o) {                                     }
         virtual bool operator()(Condition::Object* o)  const
-        { return mapping.insert(std::make_pair(o->hash,o)).second;                     }
-        virtual size_t size() const  { return mapping.size();                          }
+        { return mapping.emplace(o->hash,o).second;                                  }
+        virtual size_t size() const  { return mapping.size();                        }
       };
       
       /// Helper to insert objects into a conditions pool
@@ -116,7 +116,7 @@ namespace dd4hep {
         ActiveSelect(T& p) : collection(p) {}
         bool operator()(object_t* o)  const   {
           if ( (o->flags & Condition::ACTIVE) )  {
-            collection.insert(collection.end(),o);
+            collection.emplace(collection.end(),o);
             return true;
           }
           return false;
@@ -136,7 +136,7 @@ namespace dd4hep {
         KeyedSelect(cond_t::key_type k, collection_type& p) : key(k), collection(p) {  }
         bool operator()(object_t* o) const {
           if ( o->hash == key )  {
-            collection.insert(collection.end(),o);
+            collection.emplace(collection.end(),o);
             return true;
           }
           return false;
diff --git a/DDCond/src/ConditionsDataLoader.cpp b/DDCond/src/ConditionsDataLoader.cpp
index b4c379d43..c9953cf1b 100644
--- a/DDCond/src/ConditionsDataLoader.cpp
+++ b/DDCond/src/ConditionsDataLoader.cpp
@@ -46,12 +46,12 @@ const dd4hep::Property& ConditionsDataLoader::operator[](const std::string& prop
 
 /// Add data source definition to loader
 void ConditionsDataLoader::addSource(const string& source, const IOV& iov)   {
-  m_sources.push_back(make_pair(source,iov));
+  m_sources.emplace_back(source,iov);
 }
 
 /// Add data source definition to loader
 void ConditionsDataLoader::addSource(const string& source)   {
-  m_sources.push_back(make_pair(source,IOV(0,0)));
+  m_sources.emplace_back(source,IOV(0,0));
 }
 
 /// Queue update to manager.
diff --git a/DDCond/src/ConditionsDependencyHandler.cpp b/DDCond/src/ConditionsDependencyHandler.cpp
index 01c93a25f..e34b758eb 100644
--- a/DDCond/src/ConditionsDependencyHandler.cpp
+++ b/DDCond/src/ConditionsDependencyHandler.cpp
@@ -66,11 +66,11 @@ ConditionsDependencyHandler::ConditionsDependencyHandler(ConditionsManager mgr,
 {
   const IOV& iov = m_pool.validity();
   unsigned char* p = new unsigned char[dependencies.size()*sizeof(Work)];
-  Dependencies::const_iterator idep = dependencies.begin();
   m_block = (Work*)p;
-  for(size_t i=0; i<dependencies.size(); ++i, ++idep, p+=sizeof(Work))  {
-    Work* w = new(p) Work(this,(*idep).second,user_param,iov);
-    m_todo.insert(std::make_pair((*idep).first,w));
+  for(const auto& d : dependencies)  {
+    Work* w = new(p) Work(this,d.second,user_param,iov);
+    m_todo.emplace(d.first,w);
+    p += sizeof(Work);
   }
   m_iovType = iov.iovType;
 }
@@ -117,7 +117,7 @@ void ConditionsDependencyHandler::resolve()    {
     }
     ++num_resolved;
     // Fill an empty map of condition vectors for the block inserts
-    auto ret = work_pools.insert(make_pair(w->iov->keyData,tmp));
+    auto ret = work_pools.emplace(w->iov->keyData,tmp);
     if ( ret.second )   {
       // There is sort of the hope that most conditions go into 1 pool...
       ret.first->second.reserve(m_todo.size());
@@ -127,7 +127,7 @@ void ConditionsDependencyHandler::resolve()    {
   for( const auto& c : m_todo )   {
     w = c.second;
     auto& section = work_pools[w->iov->keyData];
-    section.push_back(w->condition);
+    section.emplace_back(w->condition);
 #if 0
     printout(prt_lvl,"DependencyHandler","++ Register %s %s %s  [%s]",
              w->context.dependency->target.toString().c_str(),
@@ -177,7 +177,7 @@ std::vector<Condition> ConditionsDependencyHandler::getByItem(Condition::itemkey
       item_selector(Condition::itemkey_type k) : key(k) {}
       int operator()(Condition cond)   {
         ConditionKey::KeyMaker km(cond->hash);
-        if ( km.values.item_key == key ) conditions.push_back(cond);
+        if ( km.values.item_key == key ) conditions.emplace_back(cond);
         return 1;
       }
     };
diff --git a/DDCond/src/ConditionsIOVPool.cpp b/DDCond/src/ConditionsIOVPool.cpp
index 3385dec36..ecb555874 100644
--- a/DDCond/src/ConditionsIOVPool.cpp
+++ b/DDCond/src/ConditionsIOVPool.cpp
@@ -196,7 +196,7 @@ size_t ConditionsIOVPool::select(const IOV& req_validity, std::vector<Element>&
       if ( !IOV::key_contains_range(i.first, req_key) )  {
         continue;
       }
-      valid.push_back(i.second);
+      valid.emplace_back(i.second);
       ++num_selected;
     }
   }
diff --git a/DDCond/src/ConditionsManager.cpp b/DDCond/src/ConditionsManager.cpp
index 8ca9ca5a7..93ef6ee09 100644
--- a/DDCond/src/ConditionsManager.cpp
+++ b/DDCond/src/ConditionsManager.cpp
@@ -98,7 +98,7 @@ const vector<const IOVType*> ConditionsManagerObject::iovTypesUsed() const   {
   vector<const IOVType*> result;
   const auto& types = this->iovTypes();
   for ( const auto& i : types )  {
-    if ( int(i.type) != IOVType::UNKNOWN_IOV ) result.push_back(&i);
+    if ( int(i.type) != IOVType::UNKNOWN_IOV ) result.emplace_back(&i);
   }
   return result;
 }
@@ -208,8 +208,9 @@ const vector<const IOVType*> ConditionsManager::iovTypesUsed() const  {
   Object* obj = access();
   vector<const IOVType*> result;
   const auto& types = obj->iovTypes();
+  result.reserve(types.size());
   for(const auto& i : types )
-    if ( int(i.type) != IOVType::UNKNOWN_IOV ) result.push_back(&i);
+    if ( int(i.type) != IOVType::UNKNOWN_IOV ) result.emplace_back(&i);
   return result;
 }
 
diff --git a/DDCond/src/ConditionsOperators.cpp b/DDCond/src/ConditionsOperators.cpp
index 97afbc2d4..d1eeea0a2 100644
--- a/DDCond/src/ConditionsOperators.cpp
+++ b/DDCond/src/ConditionsOperators.cpp
@@ -44,7 +44,7 @@ size_t Operators::collectAllConditions(ConditionsManager manager, RangeCondition
           RangeConditions rc;
           cp.second->select_all(rc);
           for( auto c : rc )
-            conditions.push_back(c);
+            conditions.emplace_back(c);
           num_conditions += rc.size();
         }
       }
@@ -71,7 +71,7 @@ size_t Operators::collectAllConditions(ConditionsManager manager, std::map<int,C
           RangeConditions rc;
           cp.second->select_all(rc);
           for( auto c : rc )
-            conditions.insert(make_pair(c->hash,c));
+            conditions.emplace(c->hash,c);
           num_conditions += rc.size();
         }
       }
diff --git a/DDCond/src/ConditionsRepository.cpp b/DDCond/src/ConditionsRepository.cpp
index e55633d9d..9738e18e5 100644
--- a/DDCond/src/ConditionsRepository.cpp
+++ b/DDCond/src/ConditionsRepository.cpp
@@ -94,7 +94,7 @@ namespace {
         e.name = element.attr<string>(_U(name));
         e.address = element.attr<string>(_U(ref));
         if ( data.size() == cap ) data.reserve(cap+500);
-        data.push_back(e);
+        data.emplace_back(e);
       }
     };
     xml::DocumentHolder doc(xml::DocumentHandler().load(input));
@@ -187,7 +187,7 @@ namespace {
         size_t cap = data.capacity();
         ::sscanf(text,"%16llX",&e.key);
         if ( data.size() == cap ) data.reserve(cap+500);
-        data.push_back(e);
+        data.emplace_back(e);
       }
     } while(in.good() && !in.eof() );
     in.close();
diff --git a/DDCond/src/ConditionsRootPersistency.cpp b/DDCond/src/ConditionsRootPersistency.cpp
index f75c99c78..28ed62862 100644
--- a/DDCond/src/ConditionsRootPersistency.cpp
+++ b/DDCond/src/ConditionsRootPersistency.cpp
@@ -45,7 +45,7 @@ namespace  {
     Scanner(ConditionsRootPersistency::pool_type& p) : pool(p) {}
     /// Conditions callback for object processing
     virtual int process(Condition c)  const override  {
-      pool.push_back(c.ptr());
+      pool.emplace_back(c.ptr());
       return 1;
     }
   };
@@ -81,7 +81,7 @@ size_t ConditionsRootPersistency::add(const std::string& identifier,
                                       const IOV& iov,
                                       std::vector<Condition>& conditions)   {
   DurationStamp stamp(this);
-  conditionPools.push_back(pair<iov_key_type, pool_type>());
+  conditionPools.emplace_back(pair<iov_key_type, pool_type>());
   pool_type&    ent = conditionPools.back().second;
   iov_key_type& key = conditionPools.back().first;
   key.first         = identifier;
@@ -95,7 +95,7 @@ size_t ConditionsRootPersistency::add(const std::string& identifier,
 /// Add conditions content to the saved. Note, that dependent conditions shall not be saved!
 size_t ConditionsRootPersistency::add(const string& identifier, ConditionsPool& pool)    {
   DurationStamp stamp(this);
-  conditionPools.push_back(pair<iov_key_type, pool_type>());
+  conditionPools.emplace_back(pair<iov_key_type, pool_type>());
   pool_type&    ent = conditionPools.back().second;
   iov_key_type& key = conditionPools.back().first;
   const IOV*    iov = pool.iov;
@@ -112,7 +112,7 @@ size_t ConditionsRootPersistency::add(const string& identifier, const Conditions
   size_t count = 0;
   DurationStamp stamp(this);
   for( const auto& p : pool.elements )  {
-    iovPools.push_back(pair<iov_key_type, pool_type>());
+    iovPools.emplace_back(pair<iov_key_type, pool_type>());
     pool_type&    ent = iovPools.back().second;
     iov_key_type& key = iovPools.back().first;
     const IOV*    iov = p.second->iov;
@@ -129,7 +129,7 @@ size_t ConditionsRootPersistency::add(const string& identifier, const Conditions
 /// Add conditions content to the saved. Note, that dependent conditions shall not be saved!
 size_t ConditionsRootPersistency::add(const string& identifier, const UserPool& pool)    {
   DurationStamp stamp(this);
-  userPools.push_back(pair<iov_key_type, pool_type>());
+  userPools.emplace_back(pair<iov_key_type, pool_type>());
   pool_type&    ent = userPools.back().second;
   iov_key_type& key = userPools.back().first;
   const IOV&    iov = pool.validity();
diff --git a/DDCond/src/ConditionsTextRepository.cpp b/DDCond/src/ConditionsTextRepository.cpp
index 3be4589ea..d6b84bbe9 100644
--- a/DDCond/src/ConditionsTextRepository.cpp
+++ b/DDCond/src/ConditionsTextRepository.cpp
@@ -92,7 +92,7 @@ namespace {
         e.name = element.attr<string>(_U(name));
         e.address = element.attr<string>(_U(ref));
         if ( data.size() == cap ) data.reserve(cap+500);
-        data.push_back(e);
+        data.emplace_back(e);
       }
     };
     xml::DocumentHolder doc(xml::DocumentHandler().load(input));
@@ -188,7 +188,7 @@ namespace {
         size_t cap = data.capacity();
         ::sscanf(text,"%16llX",&e.key);
         if ( data.size() == cap ) data.reserve(cap+500);
-        data.push_back(e);
+        data.emplace_back(e);
       }
     } while(in.good() && !in.eof() );
     in.close();
diff --git a/DDCond/src/ConditionsTreePersistency.cpp b/DDCond/src/ConditionsTreePersistency.cpp
index cb0fff846..9d8311d1d 100644
--- a/DDCond/src/ConditionsTreePersistency.cpp
+++ b/DDCond/src/ConditionsTreePersistency.cpp
@@ -44,7 +44,7 @@ namespace  {
     Scanner(ConditionsTreePersistency::pool_type& p) : pool(p) {}
     /// Conditions callback for object processing
     virtual int process(Condition c)  const override  {
-      pool.push_back(c.ptr());
+      pool.emplace_back(c.ptr());
       return 1;
     }
   };
@@ -80,21 +80,21 @@ size_t ConditionsTreePersistency::add(const std::string& identifier,
                                       const IOV& iov,
                                       std::vector<Condition>& conditions)   {
   DurationStamp stamp(this);
-  conditionPools.push_back(pair<iov_key_type, pool_type>());
+  conditionPools.emplace_back(pair<iov_key_type, pool_type>());
   pool_type&    ent = conditionPools.back().second;
   iov_key_type& key = conditionPools.back().first;
   key.first         = identifier;
   key.second.first  = make_pair(iov.iovType->name,iov.type);
   key.second.second = iov.key();
   ent               = conditions;
-  for(auto c : ent) c.ptr()->addRef();
+  for(auto c : ent) c->addRef();
   return ent.size();
 }
 
 /// Add conditions content to the saved. Note, that dependent conditions shall not be saved!
 size_t ConditionsTreePersistency::add(const string& identifier, ConditionsPool& pool)    {
   DurationStamp stamp(this);
-  conditionPools.push_back(pair<iov_key_type, pool_type>());
+  conditionPools.emplace_back(pair<iov_key_type, pool_type>());
   pool_type&    ent = conditionPools.back().second;
   iov_key_type& key = conditionPools.back().first;
   const IOV*    iov = pool.iov;
@@ -111,7 +111,7 @@ size_t ConditionsTreePersistency::add(const string& identifier, const Conditions
   size_t count = 0;
   DurationStamp stamp(this);
   for( const auto& p : pool.elements )  {
-    iovPools.push_back(pair<iov_key_type, pool_type>());
+    iovPools.emplace_back(pair<iov_key_type, pool_type>());
     pool_type&    ent = iovPools.back().second;
     iov_key_type& key = iovPools.back().first;
     const IOV*    iov = p.second->iov;
diff --git a/DDCond/src/plugins/ConditionsLinearPool.cpp b/DDCond/src/plugins/ConditionsLinearPool.cpp
index 15aa9e927..3dbe032de 100644
--- a/DDCond/src/plugins/ConditionsLinearPool.cpp
+++ b/DDCond/src/plugins/ConditionsLinearPool.cpp
@@ -44,7 +44,7 @@ namespace dd4hep {
     template<typename MAPPING, typename BASE> 
     class ConditionsLinearPool : public BASE   {
     protected:
-      MAPPING           m_entries;
+      MAPPING m_entries;
 
       /// Helper function to loop over the conditions container and apply a functor
       template <typename R,typename T> size_t loop(R& result, T functor) {
@@ -78,7 +78,7 @@ namespace dd4hep {
 
       /// Register a new condition to this pool
       virtual bool insert(Condition condition)  final 
-      {  m_entries.insert(m_entries.end(),condition.access()); return true;     }
+      {  m_entries.emplace(m_entries.end(),condition.access()); return true;     }
 
       /// Register a new condition to this pool. May overload for performance reasons.
       virtual void insert(RangeConditions& rc)  final 
@@ -128,10 +128,8 @@ namespace dd4hep {
         MAPPING& m = this->ConditionsLinearPool<MAPPING,BASE>::m_entries;
         size_t len = entries.size();
         if ( !m.empty() )  {
-          for(typename MAPPING::iterator i=m.begin(); i!=m.end(); ++i)   {
-            Condition::Object* o = *i;
-            entries[o->iov].push_back(Condition(o));
-          }
+          for(auto* o : m)
+            entries[o->iov].emplace_back(o);
           m.clear();        
         }
         return entries.size()-len;
@@ -146,20 +144,20 @@ namespace dd4hep {
         if ( !m.empty() )   {
           unsigned int req_typ = req.iovType ? req.iovType->type : req.type;
           const IOV::Key& req_key = req.key();
-          for(typename MAPPING::const_iterator i=m.begin(); i != m.end(); ++i)  {
-            if ( key == (*i)->hash )  {
-              const IOV* _iov = (*i)->iov;
+          for(auto* e : m )  {
+            if ( key == e->hash )  {
+              const IOV* _iov = e->iov;
               unsigned int typ = _iov->iovType ? _iov->iovType->type : _iov->type;
               if ( req_typ == typ )   {
                 if ( IOV::key_is_contained(_iov->key(),req_key) )
                   // IOV test contained in key. Take it!
-                  result.push_back(*i);
+                  result.emplace_back(e);
                 else if ( IOV::key_overlaps_lower_end(_iov->key(),req_key) )
                   // IOV overlap on test on the lower end of key
-                  result.push_back(*i);
+                  result.emplace_back(e);
                 else if ( IOV::key_overlaps_higher_end(_iov->key(),req_key) )
                   // IOV overlap of test on the higher end of key
-                  result.push_back(*i);
+                  result.emplace_back(e);
               }
             }
           }
diff --git a/DDCond/src/plugins/ConditionsMappedPool.cpp b/DDCond/src/plugins/ConditionsMappedPool.cpp
index d09a3b211..d1d1a262a 100644
--- a/DDCond/src/plugins/ConditionsMappedPool.cpp
+++ b/DDCond/src/plugins/ConditionsMappedPool.cpp
@@ -74,7 +74,7 @@ namespace dd4hep {
       /// Register a new condition to this pool
       virtual bool insert(Condition condition)  final    {
         Condition::Object* c = condition.access();
-        bool result = m_entries.insert(std::make_pair(c->hash,c)).second;
+        bool result = m_entries.emplace(c->hash,c).second;
         if ( result ) return true;
         auto i = m_entries.find(c->hash);
         Condition present = (*i).second;
@@ -89,7 +89,7 @@ namespace dd4hep {
         Condition::Object* o;
         for( Condition c : new_entries )  {
           o = c.access();
-          m_entries.insert(std::make_pair(o->hash,o));
+          m_entries.emplace(o->hash,o);
         }
       }
 
@@ -146,7 +146,7 @@ namespace dd4hep {
       virtual size_t popEntries(UpdatePool::UpdateEntries& entries)  final   {
         detail::ClearOnReturn<MAPPING> clr(this->Self::m_entries);
         return this->Self::loop(entries, [&entries](const std::pair<Condition::key_type,Condition::Object*>& o) {
-            entries[o.second->iov].push_back(Condition(o.second));});
+            entries[o.second->iov].emplace_back(o.second);});
       }
 
       /// Select the conditions matching the DetElement and the conditions name
@@ -154,27 +154,26 @@ namespace dd4hep {
                                 const IOV& req, 
                                 RangeConditions& result)  final
       {
-        //return this->Self::loop(entries, [&entries](const std::pair<key_type,Condition::Object*>& o) {
-        //    entries[o.second->iov].push_back(Condition(o.second));});
         MAPPING& m = this->ConditionsMappedPool<MAPPING,BASE>::m_entries;
         if ( !m.empty() )   {
           unsigned int req_typ = req.iovType ? req.iovType->type : req.type;
           const IOV::Key& req_key = req.key();
-          for(typename MAPPING::const_iterator i=m.begin(); i != m.end(); ++i)  {
-            Condition::Object* o = (*i).second;
+          result.reserve(m.size());
+          for(const auto& e : m)  {
+            Condition::Object* o = e.second;
             if ( key == o->hash )  {
               const IOV* _iov = o->iov;
               unsigned int typ = _iov->iovType ? _iov->iovType->type : _iov->type;
               if ( req_typ == typ )   {
                 if ( IOV::key_is_contained(_iov->key(),req_key) )
                   // IOV test contained in key. Take it!
-                  result.push_back(o);
+                  result.emplace_back(o);
                 else if ( IOV::key_overlaps_lower_end(_iov->key(),req_key) )
                   // IOV overlap on test on the lower end of key
-                  result.push_back(o);
+                  result.emplace_back(o);
                 else if ( IOV::key_overlaps_higher_end(_iov->key(),req_key) )
                   // IOV overlap of test on the higher end of key
-                  result.push_back(o);
+                  result.emplace_back(o);
               }
             }
           }
diff --git a/DDCond/src/plugins/ConditionsParser.cpp b/DDCond/src/plugins/ConditionsParser.cpp
index 4cfd46ad1..223ed360b 100644
--- a/DDCond/src/plugins/ConditionsParser.cpp
+++ b/DDCond/src/plugins/ConditionsParser.cpp
@@ -157,7 +157,7 @@ namespace dd4hep {
       if ( !arg->stack )
         except("ConditionsParser","Non-existing Conditions stack:%s %d",__FILE__, __LINE__);
       else
-        arg->stack->push_back(val.release());
+        arg->stack->emplace_back(val.release());
     }
     else  {
       dd4hep_ptr<Entry> val(_createStackEntry(param,e));
@@ -165,7 +165,7 @@ namespace dd4hep {
       if ( !arg->stack )
         except("ConditionsParser","Non-existing Conditions stack:%s %d",__FILE__, __LINE__);
       else
-        arg->stack->push_back(val.release());
+        arg->stack->emplace_back(val.release());
     }
   }
 
diff --git a/DDCond/src/plugins/ConditionsPlugins.cpp b/DDCond/src/plugins/ConditionsPlugins.cpp
index 09af03258..afc76e70a 100644
--- a/DDCond/src/plugins/ConditionsPlugins.cpp
+++ b/DDCond/src/plugins/ConditionsPlugins.cpp
@@ -196,8 +196,8 @@ static int ddcond_conditions_pool_print(Detector& description, bool print_condit
       if ( argv[i] && 0 == ::strncmp(argv[i],"-processor",3) )  {
         vector<char*> args;
         for(int j=i; j<argc && argv[j] && 0 != ::strncmp(argv[i],"-end-processor",8); ++j)
-          args.push_back(argv[j]);
-        args.push_back(0);
+          args.emplace_back(argv[j]);
+        args.emplace_back(nullptr);
         return ddcond_conditions_pool_processor(description,true,print_conditions,int(args.size()-1),&args[0]);
       }
     }
diff --git a/DDCond/src/plugins/ConditionsSnapshotRootLoader.cpp b/DDCond/src/plugins/ConditionsSnapshotRootLoader.cpp
index 5b1c62853..4289fa20b 100644
--- a/DDCond/src/plugins/ConditionsSnapshotRootLoader.cpp
+++ b/DDCond/src/plugins/ConditionsSnapshotRootLoader.cpp
@@ -101,7 +101,7 @@ void ConditionsSnapshotRootLoader::load_source(const std::string& nam)  {
   TFile* f = TFile::Open(nam.c_str());
   std::unique_ptr<ConditionsRootPersistency> p =
     ConditionsRootPersistency::load(f,"Conditions");
-  buffers.push_back(p.release());
+  buffers.emplace_back(p.release());
 }
 
 size_t ConditionsSnapshotRootLoader::load_single(key_type   /* key */,
diff --git a/DDCond/src/plugins/ConditionsUserPool.cpp b/DDCond/src/plugins/ConditionsUserPool.cpp
index e38d5b330..878cbb111 100644
--- a/DDCond/src/plugins/ConditionsUserPool.cpp
+++ b/DDCond/src/plugins/ConditionsUserPool.cpp
@@ -388,7 +388,7 @@ ConditionsMappedUserPool<MAPPING>::get(Condition::key_type lower, Condition::key
     typename MAPPING::const_iterator first = m_conditions.lower_bound(lower);
     for(; first != m_conditions.end(); ++first )  {
       if ( (*first).first > upper ) break;
-      result.push_back((*first).second);
+      result.emplace_back((*first).second);
     }
   }
   return result;
@@ -802,7 +802,7 @@ namespace dd4hep {
       vector<Condition> result;
       for( const auto& e : m_conditions )  {
         if ( e.second->hash >= lower && e.second->hash <= upper )
-          result.push_back(e.second);
+          result.emplace_back(e.second);
       }
       return result;
     }
diff --git a/DDCond/src/plugins/ConditionsXmlLoader.cpp b/DDCond/src/plugins/ConditionsXmlLoader.cpp
index 58392103f..1967bb814 100644
--- a/DDCond/src/plugins/ConditionsXmlLoader.cpp
+++ b/DDCond/src/plugins/ConditionsXmlLoader.cpp
@@ -123,11 +123,11 @@ size_t ConditionsXmlLoader::load_source(const std::string& nam,
       if ( condition.isValid() )   {
         if ( key == condition->hash )  {
           if ( req_validity.contains(condition.iov()) )   {
-            conditions.push_back(condition);
+            conditions.emplace_back(condition);
             continue;
           }
         }
-        m_buffer.push_back(condition);
+        m_buffer.emplace_back(condition);
       }
     }
   }
@@ -149,7 +149,7 @@ size_t ConditionsXmlLoader::load_single(key_type key,
     const IOV* iov = condition->iov;
     if ( IOV::partial_match(req_validity,*iov) )  {
       if ( key == condition->hash )  {
-        conditions.push_back(condition);
+        conditions.emplace_back(condition);
         m_buffer.erase(j);
         return conditions.size()-len;
       }
@@ -172,10 +172,10 @@ size_t ConditionsXmlLoader::load_range(key_type key,
     const IOV* iov = condition->iov;
     if ( IOV::partial_match(req_validity,*iov) )  {
       if ( key == condition->hash )  {
-        conditions.push_back(condition);
+        conditions.emplace_back(condition);
       }
     }
-    keep.push_back(condition);
+    keep.emplace_back(condition);
   }
   m_buffer = keep;
   return conditions.size()-len;
diff --git a/DDCore/include/DD4hep/SurfaceInstaller.h b/DDCore/include/DD4hep/SurfaceInstaller.h
index dbf4182a1..99fc4ecc9 100644
--- a/DDCore/include/DD4hep/SurfaceInstaller.h
+++ b/DDCore/include/DD4hep/SurfaceInstaller.h
@@ -191,7 +191,7 @@ namespace {
     Surfaces::const_iterator is = m_surfaces.find(vol.ptr());
     if ( is != m_surfaces.end() )  {
       VolSurface surf((*is).second);
-      dd4hep::rec::volSurfaceList(comp)->push_back(surf);
+      dd4hep::rec::volSurfaceList(comp)->emplace_back(surf);
       return true;
     }
     return false;
@@ -201,7 +201,7 @@ namespace {
   template <typename UserData>
   void Installer<UserData>::addSurface(dd4hep::DetElement component, const dd4hep::rec::VolSurface& surf)   {
     m_surfaces.insert(std::make_pair(surf.volume().ptr(),surf.ptr()));
-    dd4hep::rec::volSurfaceList(component)->push_back(surf);
+    dd4hep::rec::volSurfaceList(component)->emplace_back(surf);
   }
 
   /// Default (empty argument handler
diff --git a/DDCore/include/DD4hep/detail/BasicGrammar_inl.h b/DDCore/include/DD4hep/detail/BasicGrammar_inl.h
index 485fa5a8d..993ff83ab 100644
--- a/DDCore/include/DD4hep/detail/BasicGrammar_inl.h
+++ b/DDCore/include/DD4hep/detail/BasicGrammar_inl.h
@@ -158,7 +158,7 @@ namespace dd4hep {
     for(auto i=std::begin(temp); i != std::end(temp); ++i)  {
       if ( !grammar.fromString(&val,*i) )
         return 0;
-      p->push_back(val);
+      p->emplace_back(val);
     }
     return 1;
   }
@@ -170,7 +170,7 @@ namespace dd4hep {
     for(auto i=std::begin(temp); i != std::end(temp); ++i)  {
       if ( !grammar.fromString(&val,*i) )
         return 0;
-      p->push_back(val);
+      p->emplace_back(val);
     }
     return 1;
   }
@@ -182,7 +182,7 @@ namespace dd4hep {
     for(auto i=std::begin(temp); i != std::end(temp); ++i)  {
       if ( !grammar.fromString(&val,*i) )
         return 0;
-      p->insert(val);
+      p->emplace(val);
     }
     return 1;
   }
@@ -194,7 +194,7 @@ namespace dd4hep {
     for(auto i=std::begin(temp); i != std::end(temp); ++i)  {
       if ( !grammar.fromString(&val,*i) )
         return 0;
-      p->push_back(val);
+      p->emplace_back(val);
     }
     return 1;
   }
@@ -206,7 +206,7 @@ namespace dd4hep {
     for(auto i=std::begin(temp); i != std::end(temp); ++i)  {
       if ( !grammar.fromString(&val,*i) )
         return 0;
-      p->insert(val);
+      p->emplace(val);
     }
     return 1;
   }
diff --git a/DDCore/include/DD4hep/detail/ContainerHelpers.h b/DDCore/include/DD4hep/detail/ContainerHelpers.h
index 148bb4747..2f3de195c 100644
--- a/DDCore/include/DD4hep/detail/ContainerHelpers.h
+++ b/DDCore/include/DD4hep/detail/ContainerHelpers.h
@@ -35,20 +35,20 @@ namespace dd4hep {
 
   template <typename Q, typename T>
   void insert_item(std::vector<T>& c, Q, const T& d)  {
-    c.push_back(d);
+    c.emplace_back(d);
   }
   template <typename Q, typename T>
   void insert_item(std::vector<Q>& c, Q de, const T&)  {
-    c.push_back(de);
+    c.emplace_back(de);
   }
 
   template <typename Q, typename T>
   void insert_item(std::list<T>&   c, Q, const T& d)  {
-    c.push_back(d);
+    c.emplace_back(d);
   }
   template <typename Q, typename T>
   void insert_item(std::list<Q>&   c, Q de, const T&)  {
-    c.push_back(de);
+    c.emplace_back(de);
   }
   
   template <typename Q, typename T>
@@ -71,20 +71,20 @@ namespace dd4hep {
     
   template <typename Q, typename T>
   void insert_item(std::vector<std::pair<Q,T> >& c, Q de, const T& d)  {
-    c.push_back(std::make_pair(de,d));
+    c.emplace_back(std::make_pair(de,d));
   }
   template <typename Q, typename T>
   void insert_item(std::vector<std::pair<std::string,T> >& c, Q de, const T& d)  {
-    c.push_back(std::make_pair(de.path(),d));
+    c.emplace_back(std::make_pair(de.path(),d));
   }
 
   template <typename Q, typename T>
   void insert_item(std::list<std::pair<Q,T> >& c, Q de, const T& d)  {
-    c.push_back(std::make_pair(de,d));
+    c.emplace_back(std::make_pair(de,d));
   }
   template <typename Q, typename T>
   void insert_item(std::list<std::pair<std::string,T> >& c, Q de, const T& d)  {
-    c.push_back(std::make_pair(de.path(),d));
+    c.emplace_back(std::make_pair(de.path(),d));
   }
 
   template <typename Q, typename T>
diff --git a/DDCore/include/DDSegmentation/BitFieldCoder.h b/DDCore/include/DDSegmentation/BitFieldCoder.h
index 6428191a8..9f1030168 100644
--- a/DDCore/include/DDSegmentation/BitFieldCoder.h
+++ b/DDCore/include/DDSegmentation/BitFieldCoder.h
@@ -292,7 +292,7 @@ namespace DDSegmentation {
       if( c != _del  ) {
 	
 	if( _last == _del  ) {
-	  _tokens.push_back("") ; 
+	  _tokens.emplace_back("") ; 
 	}
 	_tokens.back() += c ;
       }
diff --git a/DDCore/include/DDSegmentation/MegatileLayerGridXY.h b/DDCore/include/DDSegmentation/MegatileLayerGridXY.h
index 226d2bc53..dccdf338b 100644
--- a/DDCore/include/DDSegmentation/MegatileLayerGridXY.h
+++ b/DDCore/include/DDSegmentation/MegatileLayerGridXY.h
@@ -76,12 +76,12 @@ namespace dd4hep {
       }
 
       void setMegaTileCellsXY( unsigned int layer, int ix, int iy ) {
-	while ( _nCellsX.size()<=layer ) {
-	  _nCellsX.push_back(0);
-	  _nCellsY.push_back(0);
-	}
-	_nCellsX[layer] = ix;
-	_nCellsY[layer] = iy;
+        while ( _nCellsX.size()<=layer ) {
+          _nCellsX.emplace_back(0);
+          _nCellsY.emplace_back(0);
+        }
+        _nCellsX[layer] = ix;
+        _nCellsY[layer] = iy;
 
       }
 
diff --git a/DDCore/include/DDSegmentation/SegmentationParameter.h b/DDCore/include/DDSegmentation/SegmentationParameter.h
index ffe737863..98cd60bfd 100644
--- a/DDCore/include/DDSegmentation/SegmentationParameter.h
+++ b/DDCore/include/DDSegmentation/SegmentationParameter.h
@@ -36,7 +36,7 @@ namespace dd4hep {
       std::stringstream ss(s);
       std::string item;
       while (std::getline(ss, item, delimiter)) {
-        elements.push_back(item);
+        elements.emplace_back(item);
       }
       return elements;
     }
@@ -287,7 +287,7 @@ namespace dd4hep {
             std::stringstream s;
             s << *it;
             s >> entry;
-            _value->push_back(entry);
+            _value->emplace_back(entry);
           }
         }
       }
diff --git a/DDCore/include/DDSegmentation/TiledLayerGridXY.h b/DDCore/include/DDSegmentation/TiledLayerGridXY.h
index 51be74245..2ccb35733 100644
--- a/DDCore/include/DDSegmentation/TiledLayerGridXY.h
+++ b/DDCore/include/DDSegmentation/TiledLayerGridXY.h
@@ -104,11 +104,11 @@ namespace dd4hep {
       }
       /// set the coordinate layerOffset in X
       void setLayerOffsetX(double offset) {
-        _layerOffsetX.push_back(offset);
+        _layerOffsetX.emplace_back(offset);
       }
       /// set the coordinate layerOffset in Y
       void setLayerOffsetY(double offset) {
-        _layerOffsetY.push_back(offset);
+        _layerOffsetY.emplace_back(offset);
       }
       /// set the field name used for X
       void setFieldNameX(const std::string& fieldName) {
@@ -125,12 +125,12 @@ namespace dd4hep {
       /// set the layer boundary dimension for X
       void setBoundaryLayerX(double halfX)
       {
-        _layerDimX.push_back(halfX);
+        _layerDimX.emplace_back(halfX);
       };
       /// set the layer fraction cell size for X
       void setFractCellSizeXPerLayer(double newFractCellSizeX)
       {
-        _fractCellSizeXPerLayer.push_back(newFractCellSizeX);
+        _fractCellSizeXPerLayer.emplace_back(newFractCellSizeX);
       }
       /** \brief Returns a vector<double> of the cellDimensions of the given cell ID
           in natural order of dimensions, e.g., dx/dy/dz, or dr/r*dPhi
diff --git a/DDCore/include/XML/Layering.h b/DDCore/include/XML/Layering.h
index 54b9168f9..6d2a79707 100644
--- a/DDCore/include/XML/Layering.h
+++ b/DDCore/include/XML/Layering.h
@@ -74,7 +74,7 @@ namespace dd4hep {
       return _thickness + _preOffset;
     }
     void add(const LayerSlice& slice) {
-      _slices.push_back(slice);
+      _slices.emplace_back(slice);
     }
   };
 
diff --git a/DDCore/src/AlignmentTools.cpp b/DDCore/src/AlignmentTools.cpp
index 4d09c75dd..68628aef6 100644
--- a/DDCore/src/AlignmentTools.cpp
+++ b/DDCore/src/AlignmentTools.cpp
@@ -69,7 +69,7 @@ void dd4hep::detail::tools::computeIdeal(Alignment alignment)   {
     for (size_t i = 0, n=path.size(); n>0 && i < n-1; ++i)  {
       const PlacedVolume& p = path[i];
       a.detectorTrafo.MultiplyLeft(p->GetMatrix());
-      a.nodes.push_back(p);
+      a.nodes.emplace_back(p);
     }
     //a.worldTrafo = parent.nominal()->worldTrafo;
     //a.worldTrafo.MultiplyLeft(&a.detectorTrafo);
diff --git a/DDCore/src/ConditionDerived.cpp b/DDCore/src/ConditionDerived.cpp
index 75c522c54..a96c4daba 100644
--- a/DDCore/src/ConditionDerived.cpp
+++ b/DDCore/src/ConditionDerived.cpp
@@ -199,7 +199,7 @@ DependencyBuilder::~DependencyBuilder()   {
 /// Add a new dependency
 void DependencyBuilder::add(const ConditionKey& source)   {
   if ( m_dependency )   {
-    m_dependency->dependencies.push_back(source);
+    m_dependency->dependencies.emplace_back(source);
     return;
   }
   except("Dependency","++ Invalid object. No further source may be added!");
diff --git a/DDCore/src/ConditionsMap.cpp b/DDCore/src/ConditionsMap.cpp
index 5c7fc5789..fe2942ba0 100644
--- a/DDCore/src/ConditionsMap.cpp
+++ b/DDCore/src/ConditionsMap.cpp
@@ -74,7 +74,7 @@ std::vector<Condition> ConditionsMap::get(DetElement detector,
     virtual int process(Condition c)  const override  {
       Condition::key_type h = c->hash;
       if ( h >= lower && h <= upper )   {
-        result.push_back(c);
+        result.emplace_back(c);
         return 1;
       }
       return 0;
diff --git a/DDCore/src/DetElement.cpp b/DDCore/src/DetElement.cpp
index 5452d05cb..d42e136f5 100644
--- a/DDCore/src/DetElement.cpp
+++ b/DDCore/src/DetElement.cpp
@@ -75,7 +75,7 @@ void* DetElement::extension(unsigned long long int k, bool alert) const {
 
 /// Internal call to extend the detector element with an arbitrary structure accessible by the type
 void DetElement::i_addUpdateCall(unsigned int callback_type, const Callback& callback)  const  {
-  access()->updateCalls.push_back(make_pair(callback,callback_type));
+  access()->updateCalls.emplace_back(callback,callback_type);
 }
 
 /// Remove callback from object
@@ -241,7 +241,7 @@ void DetElement::check(bool cond, const string& msg) const {
 /// Add a new child subdetector element
 DetElement& DetElement::add(DetElement sdet) {
   if (isValid()) {
-    pair<Children::iterator, bool> r = object<Object>().children.insert(make_pair(sdet.name(), sdet));
+    pair<Children::iterator, bool> r = object<Object>().children.emplace(sdet.name(), sdet);
     if (r.second) {
       sdet.access()->parent = *this;
       return *this;
diff --git a/DDCore/src/DetectorImp.cpp b/DDCore/src/DetectorImp.cpp
index 76fd38087..14b28c64f 100644
--- a/DDCore/src/DetectorImp.cpp
+++ b/DDCore/src/DetectorImp.cpp
@@ -436,13 +436,13 @@ void DetectorImp::mapDetectorTypes()  {
       HandleMap::const_iterator j=m_sensitive.find(det.name());
       if ( j != m_sensitive.end() )  {
         SensitiveDetector sd((*j).second);
-        m_detectorTypes[sd.type()].push_back(det);
+        m_detectorTypes[sd.type()].emplace_back(det);
       }
       else if ( det.type() == "compound" )  {
-        m_detectorTypes[det.type()].push_back(det);      
+        m_detectorTypes[det.type()].emplace_back(det);      
       }
       else  {
-        m_detectorTypes["passive"].push_back(det);      
+        m_detectorTypes["passive"].emplace_back(det);      
       }
     }
   }
@@ -452,8 +452,9 @@ void DetectorImp::mapDetectorTypes()  {
 vector<string> DetectorImp::detectorTypes() const  {
   if ( m_manager->IsClosed() ) {
     vector<string> v;
-    for(DetectorTypeMap::const_iterator i=m_detectorTypes.begin(); i!=m_detectorTypes.end(); ++i)  
-      v.push_back((*i).first);
+    v.reserve(m_detectorTypes.size());
+    for(const auto& t : m_detectorTypes )
+      v.emplace_back(t.first);
     return v;
   }
   throw runtime_error("detectorTypes: Call only available once the geometry is closed!");
@@ -488,8 +489,8 @@ vector<DetElement> DetectorImp::detectors(unsigned int includeFlag, unsigned int
       // ...
 
       if( ( det.typeFlag() &  includeFlag ) == includeFlag &&
-	  ( det.typeFlag() &  excludeFlag ) ==  0 )
-	dets.push_back( det ) ;
+          ( det.typeFlag() &  excludeFlag ) ==  0 )
+        dets.emplace_back( det ) ;
     }
   }
   return dets ;
diff --git a/DDCore/src/DetectorSelector.cpp b/DDCore/src/DetectorSelector.cpp
index 3b57c84ec..40b2058cc 100644
--- a/DDCore/src/DetectorSelector.cpp
+++ b/DDCore/src/DetectorSelector.cpp
@@ -62,7 +62,7 @@ DetectorSelector::detectors(unsigned int includeFlag, unsigned int excludeFlag )
       // ...
       if( ( det.typeFlag() &  includeFlag ) == includeFlag &&
           ( det.typeFlag() &  excludeFlag ) ==  0 )
-        result.push_back( det ) ;
+        result.emplace_back( det ) ;
     }
   }
   return result;
diff --git a/DDCore/src/DetectorTools.cpp b/DDCore/src/DetectorTools.cpp
index 18db92695..0626e6a3f 100644
--- a/DDCore/src/DetectorTools.cpp
+++ b/DDCore/src/DetectorTools.cpp
@@ -70,14 +70,14 @@ bool detail::tools::findChild(PlacedVolume parent, PlacedVolume child, Placement
   if ( parent.isValid() && child.isValid() ) {
     // Check self
     if ( parent.ptr() == child.ptr() ) {
-      path.push_back(child);
+      path.emplace_back(child);
       return true;
     }
     TIter next(parent->GetVolume()->GetNodes());
     // Now check next layer children
     for (TGeoNode *daughter = (TGeoNode*) next(); daughter; daughter = (TGeoNode*) next()) {
       if ( daughter == child.ptr() ) {
-        path.push_back(daughter);
+        path.emplace_back(daughter);
         return true;
       }
     }
@@ -88,7 +88,7 @@ bool detail::tools::findChild(PlacedVolume parent, PlacedVolume child, Placement
       bool res = findChild(daughter, child, sub_path);
       if (res) {
         path.insert(path.end(), sub_path.begin(), sub_path.end());
-        path.push_back(daughter);
+        path.emplace_back(daughter);
         return res;
       }
     }
@@ -101,14 +101,14 @@ static bool findChildByName(PlacedVolume parent, PlacedVolume child, detail::too
   if ( parent.isValid() && child.isValid() ) {
     // Check self
     if ( 0 == ::strcmp(parent.ptr()->GetName(),child.ptr()->GetName()) ) {
-      path.push_back(child);
+      path.emplace_back(child);
       return true;
     }
     TIter next(parent->GetVolume()->GetNodes());
     // Now check next layer children
     for (TGeoNode *daughter = (TGeoNode*) next(); daughter; daughter = (TGeoNode*) next()) {
       if ( 0 == ::strcmp(daughter->GetName(),child.ptr()->GetName()) ) {
-        path.push_back(daughter);
+        path.emplace_back(daughter);
         return true;
       }
     }
@@ -119,7 +119,7 @@ static bool findChildByName(PlacedVolume parent, PlacedVolume child, detail::too
       bool res = findChildByName(daughter, child, sub_path);
       if (res) {
         path.insert(path.end(), sub_path.begin(), sub_path.end());
-        path.push_back(daughter);
+        path.emplace_back(daughter);
         return res;
       }
     }
@@ -130,7 +130,7 @@ static bool findChildByName(PlacedVolume parent, PlacedVolume child, detail::too
 /// Collect detector elements to the top detector element (world)
 void detail::tools::elementPath(DetElement element, ElementPath& detectors) {
   for(DetElement par = element; par.isValid(); par = par.parent())
-    detectors.push_back(par);
+    detectors.emplace_back(par);
 }
 
 /// Collect detector elements to any parent detector element
@@ -138,12 +138,12 @@ void detail::tools::elementPath(DetElement parent, DetElement child, ElementPath
   detectors.clear();
   if ( parent.isValid() && child.isValid() )  {
     if ( parent.ptr() == child.ptr() )  {
-      detectors.push_back(child);
+      detectors.emplace_back(child);
       return;
     }
     ElementPath elements;
     for(DetElement par = child; par.isValid(); par = par.parent())  {
-      elements.push_back(par);
+      elements.emplace_back(par);
       if ( par.ptr() == parent.ptr() )  {
         detectors = elements;
         return;
@@ -159,7 +159,7 @@ void detail::tools::elementPath(DetElement parent, DetElement element, Placement
   for(DetElement par = element; par.isValid(); par = par.parent())  {
     PlacedVolume pv = par.placement();
     if ( pv.isValid() )  {
-      det_nodes.push_back(pv);
+      det_nodes.emplace_back(pv);
     }
     if ( par.ptr() == parent.ptr() ) return;
   }
@@ -171,7 +171,7 @@ void detail::tools::elementPath(DetElement element, PlacementPath& det_nodes) {
   for(DetElement par = element; par.isValid(); par = par.parent())  {
     PlacedVolume pv = par.placement();
     if ( pv.isValid() )  {
-      det_nodes.push_back(pv);
+      det_nodes.emplace_back(pv);
     }
   }
 }
@@ -255,7 +255,7 @@ static void detail::tools::makePlacementPath(PlacementPath det_nodes, PlacementP
     }
   }
   if ( det_nodes.size() > 0 )   {
-    all_nodes.push_back(det_nodes.back());
+    all_nodes.emplace_back(det_nodes.back());
   }
 }
 
@@ -402,11 +402,11 @@ vector<string> detail::tools::pathElements(const string& path)   {
     string tmp = path[0]=='/' ? path.substr(1) : path;
     for(size_t idx=tmp.find('/'); idx != string::npos; idx=tmp.find('/'))  {
       string val = tmp.substr(0,idx);
-      result.push_back(val);
+      result.emplace_back(val);
       tmp = tmp.length()>idx ? tmp.substr(idx+1) : string();
     }
     if ( !tmp.empty() )  {
-      result.push_back(tmp);
+      result.emplace_back(tmp);
     }
   }
   return result;
diff --git a/DDCore/src/Fields.cpp b/DDCore/src/Fields.cpp
index fb079957d..b642da539 100644
--- a/DDCore/src/Fields.cpp
+++ b/DDCore/src/Fields.cpp
@@ -109,13 +109,13 @@ void OverlayedField::add(CartesianField field) {
       bool isMag = field.MAGNETIC == (typ & field.MAGNETIC);
       if (isEle) {
         vector < CartesianField > &v = o->electric_components;
-        v.push_back(field);
+        v.emplace_back(field);
         o->type |= field.ELECTRIC;
         o->electric = v.size() == 1 ? field : CartesianField();
       }
       if (isMag) {
         vector < CartesianField > &v = o->magnetic_components;
-        v.push_back(field);
+        v.emplace_back(field);
         o->type |= field.MAGNETIC;
         o->magnetic = v.size() == 1 ? field : CartesianField();
       }
diff --git a/DDCore/src/GeoHandler.cpp b/DDCore/src/GeoHandler.cpp
index 7f63f9cc2..faea76e28 100644
--- a/DDCore/src/GeoHandler.cpp
+++ b/DDCore/src/GeoHandler.cpp
@@ -41,8 +41,8 @@ namespace {
       collectSolid(geo, name + "_left", name + "_left", boolean->GetLeftShape(), boolean->GetLeftMatrix());
       collectSolid(geo, name + "_right", name + "_right", boolean->GetRightShape(), boolean->GetRightMatrix());
     }
-    geo.solids.insert(shape);
-    geo.trafos.push_back(make_pair(node, matrix));
+    geo.solids.emplace(shape);
+    geo.trafos.emplace_back(node, matrix);
   }
 }
 
@@ -94,7 +94,7 @@ GeoHandler& GeoHandler::collect(DetElement element, GeometryInfo& info) {
         // Note : assemblies and the world do not have a real volume nor a material
         if (info.volumeSet.find(vol) == info.volumeSet.end()) {
           info.volumeSet.insert(vol);
-          info.volumes.push_back(vol);
+          info.volumes.emplace_back(vol);
         }
         if (m.isValid())
           info.materials.insert(m);
diff --git a/DDCore/src/IDDescriptor.cpp b/DDCore/src/IDDescriptor.cpp
index 8fc8b70e0..981b3f4a8 100644
--- a/DDCore/src/IDDescriptor.cpp
+++ b/DDCore/src/IDDescriptor.cpp
@@ -32,8 +32,8 @@ namespace {
     o->description = dsc;
     for (size_t i = 0; i < bf.size(); ++i) {
       const BitFieldElement* f = &bf[i];
-      o->fieldIDs.push_back(make_pair(i, f->name()));
-      o->fieldMap.push_back(make_pair(f->name(), f));
+      o->fieldIDs.emplace_back(i, f->name());
+      o->fieldMap.emplace_back(f->name(), f);
     }
   }
 }
@@ -138,7 +138,7 @@ void IDDescriptor::decodeFields(VolumeID vid,
   const vector<BitFieldElement>& v = access()->decoder.fields();
   flds.clear();
   for (auto& f : v )
-    flds.push_back(make_pair(&f, f.value(vid)));
+    flds.emplace_back(&f, f.value(vid));
 }
 
 /// Decode volume IDs and return string reprensentation for debugging purposes
diff --git a/DDCore/src/JSON/Elements.cpp b/DDCore/src/JSON/Elements.cpp
index 94259b0aa..9a8c70586 100644
--- a/DDCore/src/JSON/Elements.cpp
+++ b/DDCore/src/JSON/Elements.cpp
@@ -358,7 +358,7 @@ vector<Attribute> Handle_t::attributes() const {
   if (m_node) {
     for(ptree::iterator i=m_node->second.begin(); i!=m_node->second.end(); ++i)  {
       Attribute a = &(*i);
-      attrs.push_back(a);
+      attrs.emplace_back(a);
     }
   }
   return attrs;
diff --git a/DDCore/src/Path.cpp b/DDCore/src/Path.cpp
index 6d72f1562..a3e314be4 100644
--- a/DDCore/src/Path.cpp
+++ b/DDCore/src/Path.cpp
@@ -120,7 +120,7 @@ Path Path::normalize()  const {
   char *token, *save=0;
   token = ::strtok_r(tmp,separators,&save);
   while(token)  {
-    pathes.push_back(token);
+    pathes.emplace_back(token);
     token = ::strtok_r(0,separators,&save);
   }
   Path temp;
diff --git a/DDCore/src/PluginCreators.cpp b/DDCore/src/PluginCreators.cpp
index 60d0e1066..262a986f7 100644
--- a/DDCore/src/PluginCreators.cpp
+++ b/DDCore/src/PluginCreators.cpp
@@ -38,9 +38,9 @@ namespace dd4hep {
         for(int j=++i; j<argc && argv[j] &&
               0 != ::strncmp(argv[j],"-processor",4) &&
               0 != ::strncmp(argv[j],"-end-processor",8); ++j)
-          args.push_back(argv[j]);
+          args.emplace_back(argv[j]);
         int num_arg = int(args.size());
-        args.push_back(0);
+        args.emplace_back(nullptr);
         processor = PluginService::Create<void*>(fac,&description,num_arg,&args[0]);
         if ( !processor ) {
           PluginDebug dbg;
diff --git a/DDCore/src/Readout.cpp b/DDCore/src/Readout.cpp
index b5a0506a4..ec3e86157 100644
--- a/DDCore/src/Readout.cpp
+++ b/DDCore/src/Readout.cpp
@@ -68,21 +68,21 @@ vector<string> Readout::collectionNames()  const   {
     Object& ro = object<Object>();
     if ( !ro.hits.empty() )  {
       for(const auto& hit : ro.hits )
-        colls.push_back(hit.name);
+        colls.emplace_back(hit.name);
     }
     return colls;
   }
   throw runtime_error("dd4hep: Readout::collectionsNames: Cannot access object data [Invalid Handle]");
 }
 
-/// Access hit collections
+/// Access hit collectionsy
 vector<const HitCollection*> Readout::collections()  const   {
   vector<const HitCollection*> colls;
   if ( isValid() ) {
     Object& ro = object<Object>();
     if ( !ro.hits.empty() )  {
       for(const auto& hit : ro.hits )
-        colls.push_back(&hit);
+        colls.emplace_back(&hit);
     }
     return colls;
   }
diff --git a/DDCore/src/Shapes.cpp b/DDCore/src/Shapes.cpp
index 4b412c199..e5b1ce41c 100644
--- a/DDCore/src/Shapes.cpp
+++ b/DDCore/src/Shapes.cpp
@@ -545,13 +545,13 @@ Polycone::Polycone(double startPhi, double deltaPhi,
   if((z.size()!=rmin.size()) || (z.size()!=rmax.size()) )    {
     throw runtime_error("dd4hep: Polycone: vectors z,rmin,rmax not of same length");
   }
-  params.push_back(startPhi/units::deg);
-  params.push_back(deltaPhi/units::deg);
-  params.push_back(rmin.size());
+  params.emplace_back(startPhi/units::deg);
+  params.emplace_back(deltaPhi/units::deg);
+  params.emplace_back(rmin.size());
   for (size_t i = 0; i < rmin.size(); ++i) {
-    params.push_back(z[i] );
-    params.push_back(rmin[i] );
-    params.push_back(rmax[i] );
+    params.emplace_back(z[i] );
+    params.emplace_back(rmin[i] );
+    params.emplace_back(rmax[i] );
   }
   _assign(new TGeoPcon(&params[0]), "", "Polycone", true);
 }
@@ -565,13 +565,13 @@ Polycone::Polycone(double startPhi, double deltaPhi, const vector<double>& r, co
   if((z.size()!=r.size()) )    {
     throw runtime_error("dd4hep: Polycone: vectors z,r not of same length");
   } 
-  params.push_back(startPhi/units::deg);
-  params.push_back(deltaPhi/units::deg);
-  params.push_back(r.size());
+  params.emplace_back(startPhi/units::deg);
+  params.emplace_back(deltaPhi/units::deg);
+  params.emplace_back(r.size());
   for (size_t i = 0; i < r.size(); ++i) {
-    params.push_back(z[i] );
-    params.push_back(0.0  );
-    params.push_back(r[i] );
+    params.emplace_back(z[i] );
+    params.emplace_back(0.0  );
+    params.emplace_back(r[i] );
   }
   _assign(new TGeoPcon(&params[0]), "", "Polycone", true);
 }
@@ -591,13 +591,13 @@ Polycone::Polycone(const std::string& nam, double startPhi, double deltaPhi,
   if((z.size()!=rmin.size()) || (z.size()!=rmax.size()) )    {
     throw runtime_error("dd4hep: Polycone: vectors z,rmin,rmax not of same length");
   }
-  params.push_back(startPhi/units::deg);
-  params.push_back(deltaPhi/units::deg);
-  params.push_back(rmin.size());
+  params.emplace_back(startPhi/units::deg);
+  params.emplace_back(deltaPhi/units::deg);
+  params.emplace_back(rmin.size());
   for (size_t i = 0; i < rmin.size(); ++i) {
-    params.push_back(z[i] );
-    params.push_back(rmin[i] );
-    params.push_back(rmax[i] );
+    params.emplace_back(z[i] );
+    params.emplace_back(rmin[i] );
+    params.emplace_back(rmax[i] );
   }
   _assign(new TGeoPcon(&params[0]), nam, "Polycone", true);
 }
@@ -611,13 +611,13 @@ Polycone::Polycone(const std::string& nam, double startPhi, double deltaPhi, con
   if((z.size()!=r.size()) )    {
     throw runtime_error("dd4hep: Polycone: vectors z,r not of same length");
   } 
-  params.push_back(startPhi/units::deg);
-  params.push_back(deltaPhi/units::deg);
-  params.push_back(r.size());
+  params.emplace_back(startPhi/units::deg);
+  params.emplace_back(deltaPhi/units::deg);
+  params.emplace_back(r.size());
   for (size_t i = 0; i < r.size(); ++i) {
-    params.push_back(z[i] );
-    params.push_back(0.0  );
-    params.push_back(r[i] );
+    params.emplace_back(z[i] );
+    params.emplace_back(0.0  );
+    params.emplace_back(r[i] );
   }
   _assign(new TGeoPcon(&params[0]), nam, "Polycone", true);
 }
@@ -630,18 +630,18 @@ void Polycone::addZPlanes(const vector<double>& rmin, const vector<double>& rmax
   if (rmin.size() < 2) {
     throw runtime_error("dd4hep: PolyCone::addZPlanes> Not enough Z planes. minimum is 2!");
   }
-  params.push_back(sh->GetPhi1());
-  params.push_back(sh->GetDphi());
-  params.push_back(num + rmin.size());
+  params.emplace_back(sh->GetPhi1());
+  params.emplace_back(sh->GetDphi());
+  params.emplace_back(num + rmin.size());
   for (size_t i = 0; i < num; ++i) {
-    params.push_back(sh->GetZ(i));
-    params.push_back(sh->GetRmin(i));
-    params.push_back(sh->GetRmax(i));
+    params.emplace_back(sh->GetZ(i));
+    params.emplace_back(sh->GetRmin(i));
+    params.emplace_back(sh->GetRmax(i));
   }
   for (size_t i = 0; i < rmin.size(); ++i) {
-    params.push_back(z[i] );
-    params.push_back(rmin[i] );
-    params.push_back(rmax[i] );
+    params.emplace_back(z[i] );
+    params.emplace_back(rmin[i] );
+    params.emplace_back(rmax[i] );
   }
   _setDimensions(&params[0]);
 }
@@ -1040,14 +1040,14 @@ void Polyhedra::make(const std::string& nam, int nsides, double start, double de
   }
   // No need to transform coordinates to cm. We are in the dd4hep world: all is already in cm.
   temp.reserve(4+z.size()*2);
-  temp.push_back(start);
-  temp.push_back(delta);
-  temp.push_back(double(nsides));
-  temp.push_back(double(z.size()));
+  temp.emplace_back(start);
+  temp.emplace_back(delta);
+  temp.emplace_back(double(nsides));
+  temp.emplace_back(double(z.size()));
   for(size_t i=0; i<z.size(); ++i)   {
-    temp.push_back(z[i]);
-    temp.push_back(rmin[i]);
-    temp.push_back(rmax[i]);
+    temp.emplace_back(z[i]);
+    temp.emplace_back(rmin[i]);
+    temp.emplace_back(rmax[i]);
   }
   _assign(new TGeoPgon(&temp[0]), nam, "Polyhedra", false);
 }
diff --git a/DDCore/src/VolumeManager.cpp b/DDCore/src/VolumeManager.cpp
index 162be4e01..d30073f25 100644
--- a/DDCore/src/VolumeManager.cpp
+++ b/DDCore/src/VolumeManager.cpp
@@ -134,7 +134,7 @@ namespace dd4hep {
             else if ( (e->flag&DetElement::Object::HAVE_SENSITIVE_DETECTOR) )
               sd = m_detDesc.sensitiveDetector(e.name());
           }
-          chain.push_back(node);
+          chain.emplace_back(node);
           if ( sd.isValid() && !pv_ids.empty() )   {
             Readout ro = sd.readout();
             if ( ro.isValid() )   {
diff --git a/DDCore/src/Volumes.cpp b/DDCore/src/Volumes.cpp
index fdd29381f..5e0502d50 100644
--- a/DDCore/src/Volumes.cpp
+++ b/DDCore/src/Volumes.cpp
@@ -461,8 +461,7 @@ const PlacedVolume::VolIDs& PlacedVolume::volIDs() const {
 
 /// Add identifier
 PlacedVolume& PlacedVolume::addPhysVolID(const string& nam, int value) {
-  Object* obj = _data(*this);
-  obj->volIDs.push_back(make_pair(nam, value));
+  _data(*this)->volIDs.emplace_back(nam, value);
   return *this;
 }
 
diff --git a/DDCore/src/XML/DocumentHandler.cpp b/DDCore/src/XML/DocumentHandler.cpp
index c28191b94..10aa758e6 100644
--- a/DDCore/src/XML/DocumentHandler.cpp
+++ b/DDCore/src/XML/DocumentHandler.cpp
@@ -198,6 +198,11 @@ namespace dd4hep {
         parser->setCreateEntityReferenceNodes(false);
         parser->setDoNamespaces(false);
         parser->setDoSchema(true);
+
+        ////parser->setDoNamespaces( true );
+        //domParser->setDoSchema( true );
+        ////parser->setHandleMultipleImports ( true );
+        //domParser->setValidationSchemaFullChecking( true );
         return parser;
       }
     }
diff --git a/DDCore/src/XML/Layering.cpp b/DDCore/src/XML/Layering.cpp
index 93dff1bc9..a3e6a285e 100644
--- a/DDCore/src/XML/Layering.cpp
+++ b/DDCore/src/XML/Layering.cpp
@@ -81,7 +81,7 @@ void LayeringCnv::fromCompact(Layering& layering) const {
     lay.compute();
     // Add layer to stack once for each repetition
     for (int k = 0; k < repeat; ++k)
-      layers.push_back(new Layer(lay));
+      layers.emplace_back(new Layer(lay));
   }
   if (0 == count) {
     throw runtime_error("LayeringCnv::fromCompact: No layer children to be build!");
@@ -115,10 +115,9 @@ void Layering::sensitivePositionsInLayer(xml::Element e, std::vector<double>& se
   for (Collection_t s(lay, _U(slice)); s; ++s) {
     Component slice = s;
     pos += slice.thickness();
-
     if (slice.isSensitive()){
         //store the position at the center of the slice
-        sens_pos.push_back(pos - slice.thickness()/2.);
+        sens_pos.emplace_back(pos - slice.thickness()/2.);
     }
   }
 }
diff --git a/DDCore/src/XML/XMLElements.cpp b/DDCore/src/XML/XMLElements.cpp
index 01579326a..8b4f2b4ed 100644
--- a/DDCore/src/XML/XMLElements.cpp
+++ b/DDCore/src/XML/XMLElements.cpp
@@ -714,12 +714,12 @@ vector<Attribute> Handle_t::attributes() const {
   if (m_node) {
 #ifdef DD4HEP_USE_TINYXML
     for(TiXmlAttribute* a=_E(m_node)->FirstAttribute(); a; a=a->Next())
-      attrs.push_back(Attribute(a));
+      attrs.emplace_back(Attribute(a));
 #else
     xercesc::DOMNamedNodeMap* l = _E(m_node)->getAttributes();
     for (XmlSize_t i = 0, n = l->getLength(); i < n; ++i) {
       xercesc::DOMNode* attr_node = l->item(i);
-      attrs.push_back(Attribute(attr_node));
+      attrs.emplace_back(Attribute(attr_node));
     }
 #endif
   }
diff --git a/DDCore/src/gdml/DetElementCreator.cpp b/DDCore/src/gdml/DetElementCreator.cpp
index 25148bb88..392b3c2b2 100644
--- a/DDCore/src/gdml/DetElementCreator.cpp
+++ b/DDCore/src/gdml/DetElementCreator.cpp
@@ -162,7 +162,7 @@ DetElementCreator::~DetElementCreator()   {
     printout(INFO,pref,"DetElementCreator: ++ Summary: SD: %-24s system:%04X Lvl:%3d Sensitives: %6d [Max: %6d].",
              (de.name()+string(":")).c_str(), de.id(),
              l.first.second, l.second.second, l.second.first);
-    fields[de].push_back(make_pair(l.first.second,l.second.first));
+    fields[de].emplace_back(l.first.second,l.second.first);
     total_depth += l.second.second;
     ++total_cnt;
   }
@@ -308,7 +308,7 @@ int DetElementCreator::process(PlacedVolume pv, int lvl, bool recursive)   {
          (detector_volume_veto.empty() ||
           pv_nam.find(detector_volume_veto)  == string::npos)  )  )
   {
-    stack.push_back(Data(pv));
+    stack.emplace_back(Data(pv));
     if ( 0 == detector_volume_level )   {
       detector_volume_level = stack.size();
       createTopLevelDetectors(pv);
diff --git a/DDCore/src/plugins/CodeGenerator.cpp b/DDCore/src/plugins/CodeGenerator.cpp
index b8d4674f8..68378147c 100644
--- a/DDCore/src/plugins/CodeGenerator.cpp
+++ b/DDCore/src/plugins/CodeGenerator.cpp
@@ -211,7 +211,7 @@ namespace {
       if ( !r->user_limits.empty() )   {
         log << " vector<string> user_limits = {";
         for(size_t i=0, n=r->user_limits.size(); i<n; ++i)
-          log << "r->user_limits.push_back(\"" << r->user_limits[i] << "\");" << newline;
+          log << "r->user_limits.emplace_back(\"" << r->user_limits[i] << "\");" << newline;
       }
     }
 
@@ -231,7 +231,7 @@ namespace {
       Segmentation s = r->segmentation;
       if ( s.isValid() )   {
         log << "{ Segmentation s(\"" << s.name() << "\");"
-            << " segs.push_back(s); }" << newline;
+            << " segs.emplace_back(s); }" << newline;
       }
     }
 
@@ -249,7 +249,7 @@ namespace {
         log << newline;
         log << "{ HitCollection c(\"" << c.name << "\",\"" << c.key << "\", "
             << c.key_min << sep << c.key_max << "); "
-            << "  r->hits.push_back(c); } ";
+            << "  r->hits.emplace_back(c); } ";
       }
       if ( !r->hits.empty() ) log << newline;
       log << " detector.add(r); }" << newline;
diff --git a/DDCore/src/plugins/Compact2Objects.cpp b/DDCore/src/plugins/Compact2Objects.cpp
index da641d197..80858ded8 100644
--- a/DDCore/src/plugins/Compact2Objects.cpp
+++ b/DDCore/src/plugins/Compact2Objects.cpp
@@ -212,7 +212,7 @@ static Ref_t create_DipoleField(Detector& /* description */, xml_h e) {
       val = coeff.coefficient() * mult;
     else
       val = _multiply<double>(coll.text(), mult);
-    ptr->coefficents.push_back(val);
+    ptr->coefficents.emplace_back(val);
   }
   obj.assign(ptr, c.nameStr(), c.typeStr());
   return obj;
@@ -248,9 +248,9 @@ static Ref_t create_MultipoleField(Detector& description, xml_h e) {
       val = coll.attr<double>(_U(value)) * mult;
     else
       val = coeff.coefficient(0.0) * mult;
-    ptr->coefficents.push_back(val);
+    ptr->coefficents.emplace_back(val);
     val = coeff.skew(0.0) * mult;
-    ptr->skews.push_back(val);
+    ptr->skews.emplace_back(val);
   }
   obj.assign(ptr, c.nameStr(), c.typeStr());
   return obj;
@@ -304,14 +304,14 @@ template <> void Converter<Plugin>::operator()(xml_h e) const {
   if ( type == "default" )  {
     for (xml_coll_t coll(e, _U(arg)); coll; ++coll) {
       string val = coll.attr<string>(_U(value));
-      arguments.push_back(val);
+      arguments.emplace_back(val);
     }
     for (xml_coll_t coll(e, _U(argument)); coll; ++coll) {
       string val = coll.attr<string>(_U(value));
-      arguments.push_back(val);
+      arguments.emplace_back(val);
     }
     for(vector<string>::iterator i=arguments.begin(); i!=arguments.end(); ++i)
-      argv.push_back(&((*i)[0]));
+      argv.emplace_back(&((*i)[0]));
     description.apply(name.c_str(),int(argv.size()), &argv[0]);
     return;
   }
@@ -438,7 +438,7 @@ template <> void Converter<Material>::operator()(xml_h e) const {
       else
         except("Compact2Objects","Converting material: %s Element missing: %s",mname.c_str(),nam.c_str());
       composite_fractions_total += fraction;
-      composite_fractions.push_back(fraction);
+      composite_fractions.emplace_back(fraction);
     }
     for (composites.reset(), ifrac=0; composites; ++composites, ++ifrac) {
       string nam = composites.attr<string>(_U(ref));
@@ -689,7 +689,7 @@ template <> void Converter<OpticalSurface>::operator()(xml_h element) const {
       val = "";
       str >> val;
       if ( val.empty() && !str.good() ) break;
-      values.push_back(_toDouble(val));
+      values.emplace_back(_toDouble(val));
     }
     /// Create table and register table
     TGDMLMatrix* table = new TGDMLMatrix("",values.size()/cols, cols);
@@ -737,7 +737,7 @@ template <> void Converter<PropertyTable>::operator()(xml_h e) const {
     val = "";
     str >> val;
     if ( val.empty() && !str.good() ) break;
-    values.push_back(_toDouble(val));
+    values.emplace_back(_toDouble(val));
     if ( s_debug.matrix )    {
       cout << " state:" << (str.good() ? "OK " : "BAD") << " '" << val << "'";
       if ( 0 == (values.size()%cols) ) cout << endl;
@@ -826,7 +826,7 @@ template <> void Converter<Region>::operator()(xml_h elt) const {
     region.setStoreSecondaries(elt.attr<bool>(store_secondaries));
   }
   for (xml_coll_t user_limits(e, _U(limitsetref)); user_limits; ++user_limits)
-    limits.push_back(user_limits.attr<string>(_U(name)));
+    limits.emplace_back(user_limits.attr<string>(_U(name)));
   description.addRegion(region);
 }
 
@@ -867,7 +867,7 @@ template <> void Converter<Segmentation>::operator()(xml_h seg) const {
           vector<string> elts = DDSegmentation::splitString(par);
           for (const string& spar : elts )  {
             if ( spar.empty() ) continue;
-            valueVector.push_back(_toDouble(spar));
+            valueVector.emplace_back(_toDouble(spar));
           }
           typedef DDSegmentation::TypedSegmentationParameter< vector<double> > ParDouVec;
           static_cast<ParDouVec*>(p)->setTypedValue(valueVector);
@@ -982,7 +982,7 @@ template <> void Converter<Readout>::operator()(xml_h e) const {
                "++ Readout[%s]: Add hit collection %s [%s]  %d-%d",
                ro.name(), coll_name.c_str(), coll_key.c_str(), key_min, key_max);
       HitCollection hits(coll_name, coll_key, key_min, key_max);
-      ro->hits.push_back(hits);
+      ro->hits.emplace_back(hits);
     }
   }
   description.addReadout(ro);
diff --git a/DDCore/src/plugins/PluginInvoker.cpp b/DDCore/src/plugins/PluginInvoker.cpp
index 792cfddc0..55de9ff08 100644
--- a/DDCore/src/plugins/PluginInvoker.cpp
+++ b/DDCore/src/plugins/PluginInvoker.cpp
@@ -60,7 +60,7 @@ template <> void Converter<arg>::operator()(xml_h e)  const  {
   xml_comp_t c(e);
   string val = c.valueStr();
   vector<string>* args = (vector<string>*)param;
-  args->push_back(val);
+  args->emplace_back(val);
 }
 
 /** Convert plugin objects
@@ -74,11 +74,11 @@ template <> void Converter<plugin>::operator()(xml_h e)  const  {
   string nam = c.nameStr();
   vector<string> args;
   vector<const char*> cargs;
-  //args.push_back("plugin:"+nam);
+  //args.emplace_back("plugin:"+nam);
 
   xml_coll_t(e,"arg").for_each(Converter<arg>(description,&args));
   for(vector<string>::const_iterator i=args.begin(); i!=args.end();++i)
-    cargs.push_back((*i).c_str());
+    cargs.emplace_back((*i).c_str());
   printout(INFO,"ConverterPlugin","+++ Now executing plugin:%s [%d args]",nam.c_str(),int(cargs.size()));
   description.apply(nam.c_str(),int(cargs.size()),(char**)&cargs[0]);
 }
diff --git a/DDCore/src/plugins/ShapePlugins.cpp b/DDCore/src/plugins/ShapePlugins.cpp
index 5410e1300..74d99e108 100644
--- a/DDCore/src/plugins/ShapePlugins.cpp
+++ b/DDCore/src/plugins/ShapePlugins.cpp
@@ -61,9 +61,9 @@ static Handle<TObject> create_Polycone(Detector&, xml_h element)   {
   double start = e.startphi(0e0), deltaphi = e.deltaphi(2*M_PI);
   for(xml_coll_t c(e,_U(zplane)); c; ++c, ++num)  {
     xml_comp_t plane(c);
-    rmin.push_back(plane.rmin());
-    rmax.push_back(plane.rmax());
-    z.push_back(plane.z());
+    rmin.emplace_back(plane.rmin());
+    rmax.emplace_back(plane.rmax());
+    z.emplace_back(plane.z());
   }
   if ( num < 2 )  {
     throw runtime_error("PolyCone Shape> Not enough Z planes. minimum is 2!");
@@ -237,9 +237,9 @@ static Handle<TObject> create_Polyhedra(Detector&, xml_h element)   {
   std::vector<double> z, rmin, rmax;
   for ( xml_coll_t c(e,_U(plane)); c; ++c )  {
     xml_comp_t plane(c);
-    rmin.push_back(plane.rmin());
-    rmax.push_back(plane.rmax());
-    z.push_back(plane.z());
+    rmin.emplace_back(plane.rmin());
+    rmax.emplace_back(plane.rmax());
+    z.emplace_back(plane.z());
   }
   Solid solid = Polyhedra(e.numsides(),e.startphi(),e.deltaphi(),z,rmin,rmax);
   if ( e.hasAttr(_U(name)) ) solid->SetName(e.attr<string>(_U(name)).c_str());
@@ -252,15 +252,15 @@ static Handle<TObject> create_ExtrudedPolygon(Detector&, xml_h element)   {
   std::vector<double> pt_x, pt_y, sec_z, sec_x, sec_y, sec_scale;
   for ( xml_coll_t sec(element, _U(section)); sec; ++sec )   {
     xml_dim_t section(sec);
-    sec_z.push_back(section.attr<double>(_U(z)));
-    sec_x.push_back(section.attr<double>(_U(x)));
-    sec_y.push_back(section.attr<double>(_U(y)));
-    sec_scale.push_back(section.attr<double>(_U(scale),1.0));
+    sec_z.emplace_back(section.attr<double>(_U(z)));
+    sec_x.emplace_back(section.attr<double>(_U(x)));
+    sec_y.emplace_back(section.attr<double>(_U(y)));
+    sec_scale.emplace_back(section.attr<double>(_U(scale),1.0));
   }
   for ( xml_coll_t pt(element, _U(point)); pt; ++pt )   {
     xml_dim_t point(pt);
-    pt_x.push_back(point.attr<double>(_U(x)));
-    pt_y.push_back(point.attr<double>(_U(y)));
+    pt_x.emplace_back(point.attr<double>(_U(x)));
+    pt_y.emplace_back(point.attr<double>(_U(y)));
   }
   Solid solid = ExtrudedPolygon(pt_x, pt_y, sec_z, sec_x, sec_y, sec_scale);
   if ( e.hasAttr(_U(name)) ) solid->SetName(e.attr<string>(_U(name)).c_str());
diff --git a/DDCore/src/plugins/StandardPlugins.cpp b/DDCore/src/plugins/StandardPlugins.cpp
index 6392ec7ab..eef86ca03 100644
--- a/DDCore/src/plugins/StandardPlugins.cpp
+++ b/DDCore/src/plugins/StandardPlugins.cpp
@@ -65,18 +65,18 @@ namespace  {
         if ( use )   {
           ++argc; ++count; end = i;
           if ( 0 == ::strncmp(av[i],"-end-processor",6) )  {
-            argv.push_back(av[i]);
+            argv.emplace_back(av[i]);
             return;
           }
           else if ( 0 == ::strncmp(av[i],"-end-plugin",4) )  { // End of current plugin
-            argv.push_back((char*)"-end-processor");
+            argv.emplace_back((char*)"-end-processor");
             return;
           }
           else if ( 0 == ::strncmp(av[i],"-plugin",4) )  {     // Start of next plugin
-            argv.push_back((char*)"-end-processor");
+            argv.emplace_back((char*)"-end-processor");
             return;
           }
-          argv.push_back(av[i]);
+          argv.emplace_back(av[i]);
         }
       }
     }
@@ -180,7 +180,7 @@ static long run_function(Detector&, int argc, char** argv) {
     else if ( 0 == ::strncmp("-function",argv[i],4) )
       func = argv[++i];
     else
-      args.push_back(argv[i]);
+      args.emplace_back(argv[i]);
   }
   if ( lib.empty() || func.empty() )  {
     cout <<
diff --git a/DDCore/src/plugins/TGeoCodeGenerator.cpp b/DDCore/src/plugins/TGeoCodeGenerator.cpp
index f7fc010c3..516f0ba55 100644
--- a/DDCore/src/plugins/TGeoCodeGenerator.cpp
+++ b/DDCore/src/plugins/TGeoCodeGenerator.cpp
@@ -400,14 +400,14 @@ namespace {
     else if (cl == TGeoPgon::Class()) {
       const TGeoPgon* sh = (const TGeoPgon*) shape;
       vector<double> params;
-      params.push_back(sh->GetPhi1());
-      params.push_back(sh->GetDphi());
-      params.push_back(double(sh->GetNedges()));
-      params.push_back(double(sh->GetNz()));
+      params.emplace_back(sh->GetPhi1());
+      params.emplace_back(sh->GetDphi());
+      params.emplace_back(double(sh->GetNedges()));
+      params.emplace_back(double(sh->GetNz()));
       for(int i=0, n=sh->GetNz(); i<n; ++i)  {
-        params.push_back(sh->GetZ(i));
-        params.push_back(sh->GetRmin(i));
-        params.push_back(sh->GetRmax(i));
+        params.emplace_back(sh->GetZ(i));
+        params.emplace_back(sh->GetRmin(i));
+        params.emplace_back(sh->GetRmax(i));
       }
       log << cl->GetName() << "* shape_" << pvoid << " = "
           << "new " << cl->GetName() << "(" << &params[0] << ");" << newline;
@@ -416,13 +416,13 @@ namespace {
     else if (cl == TGeoPcon::Class()) {
       const TGeoPcon* sh = (const TGeoPcon*) shape;
       vector<double> params;
-      params.push_back(sh->GetPhi1());
-      params.push_back(sh->GetDphi());
-      params.push_back(double(sh->GetNz()));
+      params.emplace_back(sh->GetPhi1());
+      params.emplace_back(sh->GetDphi());
+      params.emplace_back(double(sh->GetNz()));
       for(int i=0, n=sh->GetNz(); i<n; ++i)  {
-        params.push_back(sh->GetZ(i));
-        params.push_back(sh->GetRmin(i));
-        params.push_back(sh->GetRmax(i));
+        params.emplace_back(sh->GetZ(i));
+        params.emplace_back(sh->GetRmin(i));
+        params.emplace_back(sh->GetRmax(i));
       }
       log << cl->GetName() << "* shape_" << pvoid << " = "
           << "new " << cl->GetName() << "(" << &params[0] << ");" << newline;
@@ -477,8 +477,8 @@ namespace {
           << "{" << newline
           << "\tstd::vector<double> vertices_" << pvoid << ";" << newline;
       for(int i=0; i<8; ++i) {
-        log << "\tvertices_" << pvoid << ".push_back(" << *v << ");" << newline; ++v;
-        log << "\tvertices_" << pvoid << ".push_back(" << *v << ");" << newline; ++v;
+        log << "\tvertices_" << pvoid << ".emplace_back(" << *v << ");" << newline; ++v;
+        log << "\tvertices_" << pvoid << ".emplace_back(" << *v << ");" << newline; ++v;
       }
       log << "\tshape_" << pvoid << " = new " << cl->GetName()
           << "(\"" << sh->GetName() << '"'
@@ -493,7 +493,7 @@ namespace {
           << "{" << newline
           << "\tstd::vector<double> param_" << pvoid << ";" << newline;
       for( auto p : pars)
-        log << "\tparam_" << pvoid << ".push_back(" << p << ");" << newline;
+        log << "\tparam_" << pvoid << ".emplace_back(" << p << ");" << newline;
       log << "\tshape_" << pvoid << " = new " << cl->GetName()
           << "( &param_" << pvoid << "[0]);" << newline;
       log << "shape_" << pvoid << "->SetName(\"" << sh->GetName() << "\");" << newline;
diff --git a/DDCore/src/plugins/VisProcessor.cpp b/DDCore/src/plugins/VisProcessor.cpp
index 4cd69779a..654e681ff 100644
--- a/DDCore/src/plugins/VisProcessor.cpp
+++ b/DDCore/src/plugins/VisProcessor.cpp
@@ -194,17 +194,17 @@ static void* create_object(Detector& description, int argc, char** argv)   {
       }
       else if ( ::strncmp(argv[i],"-elt-active",6) == 0 )   {
         Atom atom = helper.element(argv[++i]);
-        if ( atom.isValid() ) proc->activeElements.push_back(atom);
+        if ( atom.isValid() ) proc->activeElements.emplace_back(atom);
         continue;
       }
       else if ( ::strncmp(argv[i],"-mat-active",6) == 0 )   {
         Material mat = helper.material(argv[++i]);
-        if ( mat.isValid() ) proc->activeMaterials.push_back(mat);
+        if ( mat.isValid() ) proc->activeMaterials.emplace_back(mat);
         continue;
       }
       else if ( ::strncmp(argv[i],"-mat-inactive",6) == 0 )   {
         Material mat = helper.material(argv[++i]);
-        if ( mat.isValid() ) proc->inactiveMaterials.push_back(mat);
+        if ( mat.isValid() ) proc->inactiveMaterials.emplace_back(mat);
         continue;
       }
       else if ( ::strncmp(argv[i],"-all-inactive",6) == 0 )   {
diff --git a/DDCore/src/plugins/VolumeMgrTest.cpp b/DDCore/src/plugins/VolumeMgrTest.cpp
index 2f5516070..7cb265dec 100644
--- a/DDCore/src/plugins/VolumeMgrTest.cpp
+++ b/DDCore/src/plugins/VolumeMgrTest.cpp
@@ -95,7 +95,7 @@ VolIDTest::VolIDTest(Detector& description, DetElement sdet, size_t depth) : m_m
   PlacedVolume pv  = sdet.placement();
   VolIDs       ids = pv.volIDs();
   Chain        chain;
-  chain.push_back(pv);
+  chain.emplace_back(pv);
   checkVolume(sdet, pv, ids, chain);
   walkVolume(sdet, pv, ids, chain, 1, depth);
 }
@@ -286,7 +286,7 @@ void VolIDTest::walkVolume(DetElement detector, PlacedVolume pv, VolIDs ids, con
       Chain  child_chain(chain);
 
       place.access(); // Test validity
-      child_chain.push_back(place);
+      child_chain.emplace_back(place);
       child_ids.insert(child_ids.end(), place.volIDs().begin(), place.volIDs().end());
       //bool is_sensitive = place.volume().isSensitive();
       //if ( is_sensitive || !child_ids.empty() )  {
diff --git a/DDCore/src/python/PythonPlugin.cpp b/DDCore/src/python/PythonPlugin.cpp
index 67ecee0f9..1a0e2beae 100644
--- a/DDCore/src/python/PythonPlugin.cpp
+++ b/DDCore/src/python/PythonPlugin.cpp
@@ -56,17 +56,17 @@ namespace  {
       vector<pair<string, string> > commands;
       for(int i = 0; i < argc && argv[i]; ++i)  {
         if ( 0 == ::strncmp("-import",argv[i],2) )
-          commands.push_back(make_pair("import",argv[++i]));
+          commands.emplace_back(make_pair("import",argv[++i]));
         else if ( 0 == ::strncmp("-dd4hep", argv[i],2) )
-          commands.push_back(make_pair("exec","import dd4hep"));
+          commands.emplace_back(make_pair("exec","import dd4hep"));
         else if ( 0 == ::strncmp("-macro", argv[i],2) )
-          commands.push_back(make_pair("macro",argv[++i]));
+          commands.emplace_back(make_pair("macro",argv[++i]));
         else if ( 0 == ::strncmp("-exec", argv[i],2) )
-          commands.push_back(make_pair("exec",argv[++i]));
+          commands.emplace_back(make_pair("exec",argv[++i]));
         else if ( 0 == ::strncmp("-eval", argv[i],2) )
-          commands.push_back(make_pair("calc",argv[++i]));
+          commands.emplace_back(make_pair("calc",argv[++i]));
         else if ( 0 == ::strncmp("-prompt", argv[i],2) )
-          commands.push_back(make_pair("prompt",""));
+          commands.emplace_back(make_pair("prompt",""));
         else
           usage(argc, argv);
       }
diff --git a/DDCore/src/segmentations/BitFieldCoder.cpp b/DDCore/src/segmentations/BitFieldCoder.cpp
index 26ca35fc6..d0d45ab96 100644
--- a/DDCore/src/segmentations/BitFieldCoder.cpp
+++ b/DDCore/src/segmentations/BitFieldCoder.cpp
@@ -148,8 +148,7 @@ namespace DDSegmentation {
   void BitFieldCoder::addField( const std::string& name,  unsigned offset, int width ){
 
       
-    _fields.push_back( BitFieldElement( name, offset, width ) ) ;
-    
+    _fields.emplace_back(name, offset, width);
     BitFieldElement& bfv = _fields.back() ;
 
     _map[ name ] = _fields.size()-1 ;
diff --git a/DDCore/src/segmentations/MultiSegmentation.cpp b/DDCore/src/segmentations/MultiSegmentation.cpp
index c04d1a4b5..3c3241896 100644
--- a/DDCore/src/segmentations/MultiSegmentation.cpp
+++ b/DDCore/src/segmentations/MultiSegmentation.cpp
@@ -50,7 +50,7 @@ namespace dd4hep {
       e.key_min = key_min;
       e.key_max = key_max;
       e.segmentation = entry;
-      m_segmentations.push_back(e);
+      m_segmentations.emplace_back(e);
     }
 
     /// Set the underlying decoder
diff --git a/DDCore/src/segmentations/Segmentation.cpp b/DDCore/src/segmentations/Segmentation.cpp
index 52039388e..83ccd74eb 100644
--- a/DDCore/src/segmentations/Segmentation.cpp
+++ b/DDCore/src/segmentations/Segmentation.cpp
@@ -111,7 +111,7 @@ namespace dd4hep {
     Parameters Segmentation::parameters() const {
       Parameters pars;
       for ( const auto& it : _parameters )
-        pars.push_back(it.second);
+        pars.emplace_back(it.second);
       return pars;
     }
 
diff --git a/DDCore/src/segmentations/SegmentationFactory.cpp b/DDCore/src/segmentations/SegmentationFactory.cpp
index 163a6d83e..4806a4475 100644
--- a/DDCore/src/segmentations/SegmentationFactory.cpp
+++ b/DDCore/src/segmentations/SegmentationFactory.cpp
@@ -44,7 +44,7 @@ vector<std::string> SegmentationFactory::registeredSegmentations() const {
 	vector<std::string> segmentationNames;
 	map<std::string, SegmentationCreatorBase*>::const_iterator it;
 	for (it = _segmentations.begin(); it != _segmentations.end(); ++ it) {
-		segmentationNames.push_back(it->first);
+		segmentationNames.emplace_back(it->first);
 	}
 	return segmentationNames;
 }
diff --git a/DDCore/src/segmentations/TiledLayerSegmentation.cpp b/DDCore/src/segmentations/TiledLayerSegmentation.cpp
index c79f44c18..d2997687c 100644
--- a/DDCore/src/segmentations/TiledLayerSegmentation.cpp
+++ b/DDCore/src/segmentations/TiledLayerSegmentation.cpp
@@ -86,9 +86,9 @@ void TiledLayerSegmentation::setLayerDimensions(int layerIndex, double x, double
 	}
 	vector<int>::iterator it = find(_layerIndices.begin(), _layerIndices.end(), layerIndex);
 	if (it == _layerIndices.end()) {
-		_layerIndices.push_back(layerIndex);
-		_layerDimensionsX.push_back(x);
-		_layerDimensionsY.push_back(y);
+		_layerIndices.emplace_back(layerIndex);
+		_layerDimensionsX.emplace_back(x);
+		_layerDimensionsY.emplace_back(y);
 	} else {
 		size_t index = it - _layerIndices.begin();
 		_layerDimensionsX[index] = x;
diff --git a/DDDigi/include/DDDigi/DigiAction.h b/DDDigi/include/DDDigi/DigiAction.h
index ff7b98976..a752ead24 100644
--- a/DDDigi/include/DDDigi/DigiAction.h
+++ b/DDDigi/include/DDDigi/DigiAction.h
@@ -113,7 +113,7 @@ namespace dd4hep {
         ~Actors()  = default;
         size_t size()    const        { return m_v.size();              }
         void clear()                  { m_v.clear();                    }
-        void add(T* obj)              { m_v.push_back(obj);             }
+        void add(T* obj)              { m_v.emplace_back(obj);          }
         void add_front(T* obj)        { m_v.insert(m_v.begin(), obj);   }
         const typename _V::value_type& operator[](size_t i)  const
         {  return m_v[i];}
diff --git a/DDG4/include/DDG4/Geant4Action.h b/DDG4/include/DDG4/Geant4Action.h
index 4837f0ec8..fa83db1e8 100644
--- a/DDG4/include/DDG4/Geant4Action.h
+++ b/DDG4/include/DDG4/Geant4Action.h
@@ -150,7 +150,7 @@ namespace dd4hep {
         Actors() = default;
         ~Actors()  = default;
         void clear()                  { m_v.clear();                    }
-        void add(T* obj)              { m_v.push_back(obj);             }
+        void add(T* obj)              { m_v.emplace_back(obj);          }
         void add_front(T* obj)        { m_v.insert(m_v.begin(), obj);   }
         operator const _V&() const    { return m_v;                     }
         operator _V&()                { return m_v;                     }
diff --git a/DDG4/include/DDG4/Geant4HitCollection.h b/DDG4/include/DDG4/Geant4HitCollection.h
index ccbb19509..dde711f12 100644
--- a/DDG4/include/DDG4/Geant4HitCollection.h
+++ b/DDG4/include/DDG4/Geant4HitCollection.h
@@ -333,7 +333,7 @@ namespace dd4hep {
       template <typename TYPE> void add(TYPE* hit_pointer) {
         Geant4HitWrapper w(m_manipulator->castHit(hit_pointer));
         m_lastHit = m_hits.size();
-        m_hits.push_back(w);
+        m_hits.emplace_back(w);
       }
       /// Add a new hit with a check, that the hit is of the same type
       template <typename TYPE> void add(VolumeID key, TYPE* hit_pointer) {
@@ -341,7 +341,7 @@ namespace dd4hep {
         std::pair<Keys::iterator,bool> ret = m_keys.insert(std::make_pair(key,m_lastHit));
         if ( ret.second )  {
           Geant4HitWrapper w(m_manipulator->castHit(hit_pointer));
-          m_hits.push_back(w);
+          m_hits.emplace_back(w);
           return;
         }
         throw std::runtime_error("Attempt to insert hit with same key to G4 hit-collection "+GetName());
diff --git a/DDG4/plugins/Geant4EventReaderHepMC.cpp b/DDG4/plugins/Geant4EventReaderHepMC.cpp
index 13444f3e3..40101c561 100644
--- a/DDG4/plugins/Geant4EventReaderHepMC.cpp
+++ b/DDG4/plugins/Geant4EventReaderHepMC.cpp
@@ -233,7 +233,7 @@ Geant4EventReaderHepMC::readParticles(int /* ev_id */,
   //fg: for now we create exactly one event vertex here ( as before )
   //    this needs revisiting as HepMC allows to have more than one vertex ...
   Geant4Vertex* primary_vertex = new Geant4Vertex ;
-  vertices.push_back( primary_vertex );
+  vertices.emplace_back( primary_vertex );
   primary_vertex->x = 0;
   primary_vertex->y = 0;
   primary_vertex->z = 0;
@@ -269,7 +269,7 @@ Geant4EventReaderHepMC::readParticles(int /* ev_id */,
                p->psx/MeV,p->psy/MeV,p->psz/MeV,p->time/ns,
                p->daughters.size(),
                p->parents.size());
-      //output.push_back(p);
+      //output.emplace_back(p);
 
       //add particles to the 'primary vertex'
       if ( p->parents.size() == 0 )  {
@@ -317,33 +317,32 @@ void HepMC::fix_particles(EventStream& info)  {
       }
     }
   }
-  EventStream::Vertices::iterator j;
-  for(j=verts.begin(); j != verts.end(); ++j)  {
-    Geant4Vertex* v = (*j).second;
-    for (ip=v->out.begin(); ip!=v->out.end();++ip)   {
-      EventStream::Particles::iterator ipp = parts.find(*ip);
+  for(const auto& iv : verts)   {
+    Geant4Vertex* v = iv.second;
+    for (int pout : v->out)   {
+      EventStream::Particles::iterator ipp = parts.find(pout);
       Geant4Particle* p = (*ipp).second;
-      for (id=v->in.begin(); id!=v->in.end();++id)  {
-        p->parents.insert(*id);
+      for (int d : v->in)   {
+        p->parents.insert(d);
       }
     }
   }
   /// Particles originating from the beam (=no parents) must be
   /// be stripped off their parents and the status set to G4PARTICLE_GEN_DECAYED!
   vector<Geant4Particle*> beam;
-  for(i=parts.begin(); i != parts.end(); ++i)  {
-    Geant4ParticleHandle p((*i).second);
+  for(const auto& ipart : parts)   {
+    Geant4ParticleHandle p(ipart.second);
     if ( p->parents.size() == 0 )  {
-      for(id=p->daughters.begin(); id!=p->daughters.end();++id)  {
-        Geant4Particle *pp = parts[*id];
-        beam.push_back(pp);
+      for(int d : p->daughters)   {
+        Geant4Particle *pp = parts[d];
+        beam.emplace_back(pp);
       }
     }
   }
-  for(vector<Geant4Particle*>::iterator ipp=beam.begin(); ipp!=beam.end();++ipp)  {
+  for(auto* ipp : beam)   {
     //cout << "Clear parents of " << (*ipp)->id << endl;
-    (*ipp)->parents.clear();
-    (*ipp)->status = G4PARTICLE_GEN_DECAYED;
+    ipp->parents.clear();
+    ipp->status = G4PARTICLE_GEN_DECAYED;
   }
 }
 
diff --git a/DDG4/plugins/Geant4HitExtractor.cpp b/DDG4/plugins/Geant4HitExtractor.cpp
index cce859bec..4bdb77376 100644
--- a/DDG4/plugins/Geant4HitExtractor.cpp
+++ b/DDG4/plugins/Geant4HitExtractor.cpp
@@ -63,12 +63,12 @@ static void* _convertHitCollection(const char* source)  {
     for(std::vector<SimpleHit*>::const_iterator k=c->begin(); k!=c->end(); ++k)   {
       SimpleTracker::Hit* trh = dynamic_cast<SimpleTracker::Hit*>(*k);
       if ( trh )   {
-        pv->push_back(SimulationHit(trh->position, trh->energyDeposit));
+        pv->emplace_back(SimulationHit(trh->position, trh->energyDeposit));
         continue;
       }
       SimpleCalorimeter::Hit* cah = dynamic_cast<SimpleCalorimeter::Hit*>(*k);
       if ( cah )   {
-        pv->push_back(SimulationHit(cah->position, cah->energyDeposit));
+        pv->emplace_back(SimulationHit(cah->position, cah->energyDeposit));
         continue;
       }
     }
diff --git a/DDG4/plugins/Geant4MaterialScanner.cpp b/DDG4/plugins/Geant4MaterialScanner.cpp
index 284e050f7..cb9ff0a48 100644
--- a/DDG4/plugins/Geant4MaterialScanner.cpp
+++ b/DDG4/plugins/Geant4MaterialScanner.cpp
@@ -146,7 +146,7 @@ void Geant4MaterialScanner::operator()(const G4Step* step, G4SteppingManager*) {
   string postPath = post_handler.path();
 #endif
   G4LogicalVolume* logVol = h.logvol(h.pre);
-  m_steps.push_back(new StepInfo(h.prePos(), h.postPos(), logVol));
+  m_steps.emplace_back(new StepInfo(h.prePos(), h.postPos(), logVol));
 }
 
 /// Registered callback on Begin-event
diff --git a/DDG4/plugins/Geant4SDActions.cpp b/DDG4/plugins/Geant4SDActions.cpp
index ef5f0d6e1..1f809d9c8 100644
--- a/DDG4/plugins/Geant4SDActions.cpp
+++ b/DDG4/plugins/Geant4SDActions.cpp
@@ -169,7 +169,7 @@ namespace dd4hep {
           except("+++ Invalid CELL ID for hit!");
         }
       }
-      hit->truth.push_back(contrib);
+      hit->truth.emplace_back(contrib);
       hit->energyDeposit += contrib.deposit;
       mark(step);
       return true;
@@ -228,7 +228,7 @@ namespace dd4hep {
           }
         }
         hit->energyDeposit += contrib.deposit;
-        hit->truth.push_back(contrib);
+        hit->truth.emplace_back(contrib);
         track->SetTrackStatus(fStopAndKill); // don't step photon any further
         mark(h.track);
         return true;
@@ -303,7 +303,7 @@ namespace dd4hep {
           except("+++ Invalid CELL ID for hit!");
         }
       }
-      hit->truth.push_back(contrib);
+      hit->truth.emplace_back(contrib);
       hit->energyDeposit += contrib.deposit;
       mark(step);
       return true;
diff --git a/DDG4/plugins/Geant4SensDet.cpp b/DDG4/plugins/Geant4SensDet.cpp
index 85ff4ae81..79d8f6040 100644
--- a/DDG4/plugins/Geant4SensDet.cpp
+++ b/DDG4/plugins/Geant4SensDet.cpp
@@ -136,7 +136,7 @@ namespace dd4hep {
         if ( coll.empty() ) {
           except("Geant4Sensitive: No collection defined for %s [Invalid name]",c_name());
         }
-        collectionName.push_back(coll);
+        collectionName.emplace_back(coll);
         return collectionName.size()-1;
       }
 
diff --git a/DDG4/plugins/Geant4XMLSetup.cpp b/DDG4/plugins/Geant4XMLSetup.cpp
index 55d2fe640..9d68abe97 100644
--- a/DDG4/plugins/Geant4XMLSetup.cpp
+++ b/DDG4/plugins/Geant4XMLSetup.cpp
@@ -383,7 +383,7 @@ namespace dd4hep {
       p.ordAtRestDoIt     = proc.attr<int>(_Unicode(ordAtRestDoIt));
       p.ordAlongSteptDoIt = proc.attr<int>(_Unicode(ordAlongSteptDoIt));
       p.ordPostStepDoIt   = proc.attr<int>(_Unicode(ordPostStepDoIt));
-      procs.push_back(p);
+      procs.emplace_back(p);
       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);
     }
@@ -405,7 +405,7 @@ namespace dd4hep {
     Geant4PhysicsList::ParticleConstructors& parts = _object<Geant4PhysicsList>().particles();
     xml_comp_t part(e);
     string n = part.nameStr();
-    parts.push_back(n);
+    parts.emplace_back(n);
     printout(INFO,"Geant4Setup","+++ ParticleConstructor: Add Geant4 particle constructor '%s'",n.c_str());
   }
 
@@ -422,7 +422,7 @@ namespace dd4hep {
     Geant4PhysicsList::PhysicsConstructors& parts = _object<Geant4PhysicsList>().physics();
     xml_comp_t part(e);
     string n = part.nameStr();
-    parts.push_back(n);
+    parts.emplace_back(n);
     printout(INFO,"Geant4Setup","+++ PhysicsConstructor: Add Geant4 physics constructor '%s'",n.c_str());
   }
 
diff --git a/DDG4/src/Geant4ActionPhase.cpp b/DDG4/src/Geant4ActionPhase.cpp
index d27f4c38f..68d53e5af 100644
--- a/DDG4/src/Geant4ActionPhase.cpp
+++ b/DDG4/src/Geant4ActionPhase.cpp
@@ -57,7 +57,7 @@ Geant4ActionPhase::~Geant4ActionPhase() {
 /// Add a new member to the phase
 bool Geant4ActionPhase::add(Geant4Action* action, Callback callback) {
   action->addRef();
-  m_members.push_back(make_pair(action,callback));
+  m_members.emplace_back(action,callback);
   return true;
 }
 
diff --git a/DDG4/src/Geant4Converter.cpp b/DDG4/src/Geant4Converter.cpp
index fd6a629c7..384573d1f 100644
--- a/DDG4/src/Geant4Converter.cpp
+++ b/DDG4/src/Geant4Converter.cpp
@@ -155,7 +155,7 @@ void Geant4AssemblyVolume::imprint(Geant4GeometryInfo& info,
   for( unsigned int i = 0; i < triplets.size(); i++ )  {
     const TGeoNode* node = pAssembly->m_entries[i];
     Chain new_chain = chain;
-    new_chain.push_back(node);
+    new_chain.emplace_back(node);
     //cout << " Assembly: Entry: " << detail::tools::placementPath(new_chain) << endl;
 
     G4Transform3D Ta( *(triplets[i].GetRotation()),
@@ -202,8 +202,8 @@ void Geant4AssemblyVolume::imprint(Geant4GeometryInfo& info,
 
       // Register the physical volume created by us so we can delete it later
       //
-      //fPVStore.push_back( pvPlaced.first );
-      info.g4VolumeImprints[vol].push_back(make_pair(new_chain,pvPlaced.first));
+      //fPVStore.emplace_back( pvPlaced.first );
+      info.g4VolumeImprints[vol].emplace_back(make_pair(new_chain,pvPlaced.first));
 #if 0
       cout << " Assembly:Parent:" << parent->GetName() << " " << node->GetName()
            << " " <<  (void*)node << " G4:" << pvName.str() << " Daughter:"
@@ -214,7 +214,7 @@ void Geant4AssemblyVolume::imprint(Geant4GeometryInfo& info,
       if ( pvPlaced.second )  {
         G4Exception("G4AssemblyVolume::MakeImprint(..)", "GeomVol0003", FatalException,
                     "Fancy construct popping new mother from the stack!");
-        //fPVStore.push_back( pvPlaced.second );
+        //fPVStore.emplace_back( pvPlaced.second );
       }
     }
     else if ( triplets[i].GetAssembly() )  {
@@ -623,10 +623,10 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c
       z.reserve(nz);
       polygon.reserve(nz);
       for(size_t i=0; i<nz; ++i)   {
-        z.push_back(G4ExtrudedSolid::ZSection(sh->GetZ(i) * CM_2_MM,
+        z.emplace_back(G4ExtrudedSolid::ZSection(sh->GetZ(i) * CM_2_MM,
                                               {sh->GetXOffset(i), sh->GetYOffset(i)},
                                               sh->GetScale(i)));
-        polygon.push_back(G4TwoVector(sh->GetX(i) * CM_2_MM,sh->GetY(i) * CM_2_MM));
+        polygon.emplace_back(G4TwoVector(sh->GetX(i) * CM_2_MM,sh->GetY(i) * CM_2_MM));
       }
       solid = new G4ExtrudedSolid(name, polygon, z);
     }
@@ -636,9 +636,9 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c
       double phi_total = (sh->GetDphi() + sh->GetPhi1()) * DEGREE_2_RAD;
       vector<double> rmin, rmax, z;
       for (Int_t i = 0; i < sh->GetNz(); ++i) {
-        rmin.push_back(sh->GetRmin(i) * CM_2_MM);
-        rmax.push_back(sh->GetRmax(i) * CM_2_MM);
-        z.push_back(sh->GetZ(i) * CM_2_MM);
+        rmin.emplace_back(sh->GetRmin(i) * CM_2_MM);
+        rmax.emplace_back(sh->GetRmax(i) * CM_2_MM);
+        z.emplace_back(sh->GetZ(i) * CM_2_MM);
       }
       solid = new G4Polyhedra(name, phi_start, phi_total, sh->GetNedges(), sh->GetNz(), &z[0], &rmin[0], &rmax[0]);
     }
@@ -648,9 +648,9 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c
       double phi_total = (sh->GetDphi() + sh->GetPhi1()) * DEGREE_2_RAD;
       vector<double> rmin, rmax, z;
       for (Int_t i = 0; i < sh->GetNz(); ++i) {
-        rmin.push_back(sh->GetRmin(i) * CM_2_MM);
-        rmax.push_back(sh->GetRmax(i) * CM_2_MM);
-        z.push_back(sh->GetZ(i) * CM_2_MM);
+        rmin.emplace_back(sh->GetRmin(i) * CM_2_MM);
+        rmax.emplace_back(sh->GetRmax(i) * CM_2_MM);
+        z.emplace_back(sh->GetZ(i) * CM_2_MM);
       }
       solid = new G4Polycone(name, phi_start, phi_total, sh->GetNz(), &z[0], &rmin[0], &rmax[0]);
     }
@@ -697,7 +697,7 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c
       TGeoTrap* sh = (TGeoTrap*) shape;
       Double_t* vtx_xy = sh->GetVertices();
       for ( size_t i=0; i<8; ++i, vtx_xy +=2 )
-        vertices.push_back(G4TwoVector(vtx_xy[0] * CM_2_MM,vtx_xy[1] * CM_2_MM));
+        vertices.emplace_back(G4TwoVector(vtx_xy[0] * CM_2_MM,vtx_xy[1] * CM_2_MM));
       solid = new G4GenericTrap(name, sh->GetDz() * CM_2_MM, vertices);
     }
     else if (shape->IsA() == TGeoCompositeShape::Class()) {
@@ -983,7 +983,7 @@ void* Geant4Converter::handlePlacement(const string& name, const TGeoNode* node)
                  transform.dx(), transform.dy(), transform.dz());
         Geant4AssemblyVolume* ass = (Geant4AssemblyVolume*)info.g4AssemblyVolumes[node];
         Geant4AssemblyVolume::Chain chain;
-        chain.push_back(node);
+        chain.emplace_back(node);
         ass->imprint(info,node,chain,ass,(*volIt).second, transform, copy, checkOverlaps);
         return 0;
       }
@@ -1205,8 +1205,8 @@ void* Geant4Converter::handleMaterialProperties(TObject* matrix) const    {
     g4->bins.reserve(rows);
     g4->values.reserve(rows);
     for(size_t i=0; i<rows; ++i)  {
-      g4->bins.push_back(m->Get(i,0)  /*   *CLHEP::eV/units::eV   */);
-      g4->values.push_back(m->Get(i,1));
+      g4->bins.emplace_back(m->Get(i,0)  /*   *CLHEP::eV/units::eV   */);
+      g4->values.emplace_back(m->Get(i,1));
     }
     printout(lvl, "Geant4Converter", "++ Successfully converted material property:%s : %s [%ld rows]",
              m->GetName(), m->GetTitle(), rows);
diff --git a/DDG4/src/Geant4HitCollection.cpp b/DDG4/src/Geant4HitCollection.cpp
index 87a9d3383..6c18230d0 100644
--- a/DDG4/src/Geant4HitCollection.cpp
+++ b/DDG4/src/Geant4HitCollection.cpp
@@ -132,13 +132,14 @@ Geant4HitWrapper* Geant4HitCollection::findHitByKey(VolumeID key)   {
 
 /// Release all hits from the Geant4 container and pass ownership to the caller
 void Geant4HitCollection::releaseData(const ComponentCast& cast, std::vector<void*>* result) {
+  result->reserve(m_hits.size());
   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());
+      result->emplace_back(w.release());
     else
-      result->push_back(m->cast.apply_downCast(cast, w.release()));
+      result->emplace_back(m->cast.apply_downCast(cast, w.release()));
   }
   m_lastHit = ULONG_MAX;
   m_keys.clear();
@@ -146,21 +147,23 @@ void Geant4HitCollection::releaseData(const ComponentCast& cast, std::vector<voi
 
 /// Release all hits from the Geant4 container. Ownership stays with the container
 void Geant4HitCollection::getData(const ComponentCast& cast, std::vector<void*>* result) {
+  result->reserve(m_hits.size());
   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());
+      result->emplace_back(w.data());
     else
-      result->push_back(m->cast.apply_downCast(cast, w.data()));
+      result->emplace_back(m->cast.apply_downCast(cast, w.data()));
   }
 }
 
 /// Release all hits from the Geant4 container and pass ownership to the caller
 void Geant4HitCollection::releaseHitsUnchecked(std::vector<void*>& result) {
+  result.reserve(m_hits.size());
   for (size_t j = 0, n = m_hits.size(); j < n; ++j) {
     Geant4HitWrapper& w = m_hits.at(j);
-    result.push_back(w.release());
+    result.emplace_back(w.release());
   }
   m_lastHit = ULONG_MAX;
   m_keys.clear();
@@ -168,8 +171,9 @@ void Geant4HitCollection::releaseHitsUnchecked(std::vector<void*>& result) {
 
 /// Release all hits from the Geant4 container. Ownership stays with the container
 void Geant4HitCollection::getHitsUnchecked(std::vector<void*>& result) {
+  result.reserve(m_hits.size());
   for (size_t j = 0, n = m_hits.size(); j < n; ++j) {
     Geant4HitWrapper& w = m_hits.at(j);
-    result.push_back(w.data());
+    result.emplace_back(w.data());
   }
 }
diff --git a/DDG4/src/Geant4InputAction.cpp b/DDG4/src/Geant4InputAction.cpp
index 537696bf9..d2c061a6a 100644
--- a/DDG4/src/Geant4InputAction.cpp
+++ b/DDG4/src/Geant4InputAction.cpp
@@ -250,12 +250,12 @@ void Geant4InputAction::operator()(G4Event* event)   {
   
 
   for(size_t i=0; i<vertices.size(); ++i )   {
-    inter->vertices[m_mask].push_back( vertices[i] ); 
+    inter->vertices[m_mask].emplace_back( vertices[i] ); 
   }
 
   // build collection of MCParticles
-  for(size_t i=0; i<primaries.size(); ++i )   {
-    Geant4ParticleHandle p(primaries[i]);
+  for(auto* primPart : primaries)   {
+    Geant4ParticleHandle p(primPart);
     const double mom_scale = m_momScale;
     PropertyMask status(p->status);
     p->psx  = mom_scale*p->psx;
@@ -270,11 +270,7 @@ void Geant4InputAction::operator()(G4Event* event)   {
     // //     vtx->out.insert(p->id); // Stuff, to be given to Geant4 together with daughters
     // // }
 
-
     inter->particles.insert(make_pair(p->id,p));
     p.dumpWithMomentumAndVertex(outputLevel()-1,name(),"->");
   }
-
-
-
 }
diff --git a/DDG4/src/Geant4InputHandling.cpp b/DDG4/src/Geant4InputHandling.cpp
index 24383ac35..e1cc9fb19 100644
--- a/DDG4/src/Geant4InputHandling.cpp
+++ b/DDG4/src/Geant4InputHandling.cpp
@@ -110,7 +110,7 @@ static void collectPrimaries(Geant4PrimaryMap*         pm,
     dv->mask = mask;
     dv->in.insert(p->id);
 
-    interaction->vertices[vid].push_back(dv) ;
+    interaction->vertices[vid].emplace_back(dv) ;
 
     for(; dau; dau = dau->GetNext())
       collectPrimaries(pm, interaction, dv, dau);
@@ -129,7 +129,7 @@ dd4hep::sim::createPrimary(int mask,
   interaction->locked = true;
   interaction->mask = mask;
   v->mask = mask;
-  interaction->vertices[vid].push_back(v);
+  interaction->vertices[vid].emplace_back(v);
 
   for (G4PrimaryParticle *gp = gv->GetPrimary(); gp; gp = gp->GetNext() )
     collectPrimaries(pm, interaction, v, gp);
@@ -186,7 +186,7 @@ static void appendInteraction(const Geant4Action* caller,
                        "Cannot handle 2 interactions with identical identifiers!");
     }
     for(Geant4Vertex* vtx :  (*iv).second )
-      output->vertices[(*iv).first].push_back( vtx->addRef() );
+      output->vertices[(*iv).first].emplace_back( vtx->addRef() );
   }
 }
 
@@ -370,7 +370,7 @@ getRelevant(set<int>& visited,
     if ( prim.find(p->id) == prim.end() )  {
       G4PrimaryParticle* p4 = createG4Primary(p);
       prim[p->id] = p4;
-      res.push_back(make_pair(p,p4));
+      res.emplace_back(p,p4);
     }
   }
   else if ( p->daughters.size() > 0 )  {
@@ -406,7 +406,7 @@ getRelevant(set<int>& visited,
         for(Primaries::iterator i=daughters.begin(); i!=daughters.end(); ++i)
           p4->SetDaughter((*i).second);
       }
-      res.push_back(make_pair(p,p4));
+      res.emplace_back(p,p4);
     }
     else  {
       for(Geant4Particle::Particles::const_iterator i=dau.begin(); i!=dau.end(); ++i)  {
diff --git a/DDG4/src/Geant4Output2ROOT.cpp b/DDG4/src/Geant4Output2ROOT.cpp
index af5cef884..03b05dcac 100644
--- a/DDG4/src/Geant4Output2ROOT.cpp
+++ b/DDG4/src/Geant4Output2ROOT.cpp
@@ -150,8 +150,9 @@ void Geant4Output2ROOT::saveEvent(OutputContext<G4Event>& /* ctxt */) {
       Manip* manipulator = Geant4HitWrapper::manipulator<Geant4Particle>();
       const ParticleMap& pm = parts->particles();
       vector<void*> particles;
-      for(ParticleMap::const_iterator i=pm.begin(); i!=pm.end(); ++i)    {
-        particles.push_back((ParticleMap::mapped_type*)(*i).second);
+      particles.reserve(pm.size());
+      for ( const auto& i : pm )   {
+        particles.emplace_back((ParticleMap::mapped_type*)i.second);
       }
       fill("MCParticles",manipulator->vec_type,&particles);
     }
@@ -172,6 +173,7 @@ void Geant4Output2ROOT::saveCollection(OutputContext<G4Event>& /* ctxt */, G4VHi
     coll->getHitsUnchecked(hits);
     size_t nhits = coll->GetSize();
     if ( m_handleMCTruth && m_truth && nhits > 0 )   {
+      hits.reserve(nhits);
       try  {
         for(size_t i=0; i<nhits; ++i)   {
           Geant4HitData* h = coll->hit(i);
diff --git a/DDG4/src/Geant4Particle.cpp b/DDG4/src/Geant4Particle.cpp
index ae2e83d64..a257a2fdb 100644
--- a/DDG4/src/Geant4Particle.cpp
+++ b/DDG4/src/Geant4Particle.cpp
@@ -174,7 +174,7 @@ std::vector<G4ParticleDefinition*> Geant4ParticleHandle::g4DefinitionsRegEx(cons
     G4ParticleDefinition* p = iter->value();
     ret = ::regexec(&reg, p->GetParticleName().c_str(), 0, NULL, 0);
     if (!ret)
-      results.push_back(p);
+      results.emplace_back(p);
     else if (ret == REG_NOMATCH)
       continue;
     else {
diff --git a/DDG4/src/Geant4ParticleGenerator.cpp b/DDG4/src/Geant4ParticleGenerator.cpp
index 2927dbfa7..f3002c529 100644
--- a/DDG4/src/Geant4ParticleGenerator.cpp
+++ b/DDG4/src/Geant4ParticleGenerator.cpp
@@ -80,21 +80,20 @@ void Geant4ParticleGenerator::printInteraction(int mask)  const  {
 
 /// Print single particle interaction identified by it's reference
 void Geant4ParticleGenerator::printInteraction(Geant4PrimaryInteraction* inter)  const  {
-  typedef Geant4PrimaryInteraction::VertexMap _V;
   int count = 0;
   if ( !inter )   {
     warning("printInteraction: Invalid interaction pointer [NULL-Pointer].");
     return;
   }
-  for(_V::const_iterator iv=inter->vertices.begin(); iv!=inter->vertices.end(); ++iv)  {
-    for( Geant4Vertex* v : (*iv).second ){
+  for(const auto& iv : inter->vertices )   {
+    for( Geant4Vertex* v : iv.second ){
       print("+-> Interaction [%d] %.3f GeV %s pos:(%.3f %.3f %.3f)[mm]",
-	    count, m_energy/CLHEP::GeV, m_particleName.c_str(),
-	    v->x/CLHEP::mm, v->y/CLHEP::mm, v->z/CLHEP::mm);
+            count, m_energy/CLHEP::GeV, m_particleName.c_str(),
+            v->x/CLHEP::mm, v->y/CLHEP::mm, v->z/CLHEP::mm);
       ++count;
-      for(set<int>::const_iterator i=v->out.begin(); i!=v->out.end(); ++i)  {
-	Geant4ParticleHandle p = inter->particles[*i];
-	p.dumpWithVertex(outputLevel(),name(),"  +->");
+      for ( int i : v->out )  {
+        Geant4ParticleHandle p = inter->particles[i];
+        p.dumpWithVertex(outputLevel(),name(),"  +->");
       }
     }
   }
@@ -125,7 +124,7 @@ void Geant4ParticleGenerator::operator()(G4Event*) {
   vtx->x = position.X();
   vtx->y = position.Y();
   vtx->z = position.Z();
-  inter->vertices[m_mask].push_back( vtx );
+  inter->vertices[m_mask].emplace_back( vtx );
   for(int i=0; i<m_multiplicity; ++i)   {
     double momentum = m_energy;
     Particle* p = new Particle();
@@ -154,7 +153,7 @@ void Geant4ParticleGenerator::operator()(G4Event*) {
     // p->vex        = vtx->x;
     // p->vey        = vtx->y;
     // p->vez        = vtx->z;
-    inter->particles.insert(make_pair(p->id,p));
+    inter->particles.emplace(p->id,p);
     vtx->out.insert(p->id);
     printout(INFO,name(),"Particle [%d] %s %.3f GeV direction:(%6.3f %6.3f %6.3f)",
              p->id, m_particleName.c_str(), momentum/CLHEP::GeV, 
diff --git a/DDG4/src/Geant4PhysicsList.cpp b/DDG4/src/Geant4PhysicsList.cpp
index 2fd52f920..3b84e549f 100644
--- a/DDG4/src/Geant4PhysicsList.cpp
+++ b/DDG4/src/Geant4PhysicsList.cpp
@@ -135,12 +135,12 @@ void Geant4PhysicsList::dump()    {
 
 /// Add physics particle constructor by name
 void Geant4PhysicsList::addParticleConstructor(const std::string& part_name)   {
-  particles().push_back(part_name);
+  particles().emplace_back(part_name);
 }
 
 /// Add physics particle constructor by name
 void Geant4PhysicsList::addParticleGroup(const std::string& part_name)   {
-  particlegroups().push_back(part_name);
+  particlegroups().emplace_back(part_name);
 }
 
 /// Add particle process by name with arguments
@@ -155,7 +155,7 @@ void Geant4PhysicsList::addParticleProcess(const std::string& part_name,
   p.ordAtRestDoIt     = ordAtRestDoIt;
   p.ordAlongSteptDoIt = ordAlongSteptDoIt;
   p.ordPostStepDoIt   = ordPostStepDoIt;
-  processes(part_name).push_back(p);
+  processes(part_name).emplace_back(p);
 }
 
 /// Add discrete particle process by name with arguments
@@ -164,12 +164,12 @@ void Geant4PhysicsList::addDiscreteParticleProcess(const std::string& part_name,
 {
   Process p;
   p.name = proc_name;
-  discreteProcesses(part_name).push_back(p);
+  discreteProcesses(part_name).emplace_back(p);
 }
 
 /// Add PhysicsConstructor by name
 void Geant4PhysicsList::addPhysicsConstructor(const std::string& phys_name)  {
-  physics().push_back(phys_name);
+  physics().emplace_back(phys_name);
 }
 
 /// Access processes for one particle type
@@ -220,7 +220,7 @@ void Geant4PhysicsList::adoptPhysicsConstructor(Geant4Action* action)  {
       PhysicsConstructor ctor(action->name());
       ctor.pointer = p;
       action->addRef();
-      m_physics.push_back(ctor);
+      m_physics.emplace_back(ctor);
       return;
     }
     except("Failed to adopt action object %s as physics constructor. [Invalid-Base]",action->c_name());
diff --git a/DDG4/src/Geant4Primary.cpp b/DDG4/src/Geant4Primary.cpp
index 311a708cb..0682ab7e5 100644
--- a/DDG4/src/Geant4Primary.cpp
+++ b/DDG4/src/Geant4Primary.cpp
@@ -12,6 +12,7 @@
 //==========================================================================
 
 // Framework include files
+#include "DD4hep/Printout.h"
 #include "DD4hep/Primitives.h"
 #include "DD4hep/InstanceCount.h"
 #include "DDG4/Geant4Primary.h"
@@ -54,10 +55,8 @@ const Geant4Particle* Geant4PrimaryMap::get(const G4PrimaryParticle* particle) c
 
 /// Default destructor
 Geant4PrimaryInteraction::~Geant4PrimaryInteraction()   {
-
-  Geant4PrimaryInteraction::VertexMap::iterator iv, ivend;
-  for( iv=vertices.begin(), ivend=vertices.end(); iv != ivend; ++iv ){
-    for( Geant4Vertex* vtx : (*iv).second ) 
+  for(const auto& iv : vertices)  {
+    for( Geant4Vertex* vtx : iv.second ) 
       detail::ReleaseObject<Geant4Vertex*>()( vtx ); 
   } 
   detail::releaseObjects(particles);
@@ -75,19 +74,14 @@ void Geant4PrimaryInteraction::setNextPID(int new_value)   {
 
 /// Apply mask to all contained vertices and particles
 bool Geant4PrimaryInteraction::applyMask()   {
-
-  Geant4PrimaryInteraction::ParticleMap::iterator ip, ipend;
-  for( ip=particles.begin(), ipend=particles.end(); ip != ipend; ++ip )
-    (*ip).second->mask = mask;
+  for(auto& ip : particles)
+    ip.second->mask = mask;
   
-  Geant4PrimaryInteraction::VertexMap::iterator iv, ivend;
-  for( iv=vertices.begin(), ivend=vertices.end(); iv != ivend; ++iv ){
-    for( auto vtx : (*iv).second )
+  for(auto& iv : vertices )  {
+    for(auto* vtx : iv.second )
       vtx->mask = mask;
   }
-
   return true;
-  
 }
 
 /// Default destructor
@@ -101,31 +95,27 @@ void Geant4PrimaryEvent::add(int id, Geant4PrimaryInteraction* interaction)   {
     Interactions::iterator i = m_interactions.find(id);
     if ( i == m_interactions.end() )  {
       interaction->mask = id;
-      m_interactions.insert(std::make_pair(id,interaction));
+      m_interactions.emplace(id,interaction);
       return;
     }
-    char text[132];
-    ::snprintf(text,sizeof(text),"Geant4PrimaryEvent: Interaction with ID '%d' "
-               "exists and cannot be added twice!",id);
-    throw std::runtime_error(text);
+    except("Geant4PrimaryEvent","+++ Interaction with ID '%d' "
+           "exists and cannot be added twice!",id);
   }
-  throw std::runtime_error("Geant4PrimaryEvent: CANNOT add invalid Interaction!");
+  except("Geant4PrimaryEvent","+++ CANNOT add invalid Interaction!");
 }
 
 /// Retrieve an interaction by it's ID
 Geant4PrimaryEvent::Interaction* Geant4PrimaryEvent::get(int mask) const   {
   Interactions::const_iterator i = m_interactions.find(mask);
-  if ( i != m_interactions.end() )  {
-    return (*i).second;
-  }
-  return 0;
+  return (i != m_interactions.end()) ? (*i).second : 0;
 }
 
 /// Retrieve all intractions
 std::vector<Geant4PrimaryEvent::Interaction*> Geant4PrimaryEvent::interactions() const   {
   std::vector<Interaction*> v;
-  for(Interactions::const_iterator i=m_interactions.begin(); i!=m_interactions.end(); ++i)
-    v.push_back((*i).second);
+  v.reserve(m_interactions.size());
+  for(const auto& i : m_interactions)
+    v.emplace_back(i.second);
   return v;
 }
 
diff --git a/DDG4/src/Geant4SensDetAction.cpp b/DDG4/src/Geant4SensDetAction.cpp
index 401489015..9b3afa58f 100644
--- a/DDG4/src/Geant4SensDetAction.cpp
+++ b/DDG4/src/Geant4SensDetAction.cpp
@@ -299,7 +299,7 @@ void Geant4SensDetActionSequence::adopt(Geant4Filter* filter) {
 
 /// Initialize the usage of a hit collection. Returns the collection identifier
 size_t Geant4SensDetActionSequence::defineCollection(Geant4Sensitive* owner, const std::string& collection_name, create_t func) {
-  m_collections.push_back(make_pair(collection_name, make_pair(owner,func)));
+  m_collections.emplace_back(collection_name, make_pair(owner,func));
   return m_collections.size() - 1;
 }
 
diff --git a/DDG4/src/Geant4TouchableHandler.cpp b/DDG4/src/Geant4TouchableHandler.cpp
index 56e387b38..b15d568ad 100644
--- a/DDG4/src/Geant4TouchableHandler.cpp
+++ b/DDG4/src/Geant4TouchableHandler.cpp
@@ -47,7 +47,7 @@ Geant4TouchableHandler::Geant4PlacementPath Geant4TouchableHandler::placementPat
     path_val.reserve(n);
     for (i=0; i < n; ++i) {
       G4VPhysicalVolume* pv = touchable->GetVolume(i);
-      path_val.push_back(pv);
+      path_val.emplace_back(pv);
     }
     return path_val;
   }
diff --git a/DDG4/src/Geant4VolumeManager.cpp b/DDG4/src/Geant4VolumeManager.cpp
index b3ac6ca8a..00f6bcca7 100644
--- a/DDG4/src/Geant4VolumeManager.cpp
+++ b/DDG4/src/Geant4VolumeManager.cpp
@@ -58,15 +58,15 @@ namespace {
     /// Populate the Volume manager
     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;
+      for (const auto& i : c)  {
+        DetElement de = i.second;
         PlacedVolume pv = de.placement();
         if (pv.isValid()) {
           Chain chain;
           SensitiveDetector sd;
           PlacedVolume::VolIDs ids;
           m_entries.clear();
-          chain.push_back(m_detDesc.world().placement().ptr());
+          chain.emplace_back(m_detDesc.world().placement().ptr());
           scanPhysicalVolume(pv.ptr(), ids, sd, chain);
           continue;
         }
@@ -80,7 +80,7 @@ namespace {
       Volume vol = pv.volume();
       PlacedVolume::VolIDs pv_ids = pv.volIDs();
 
-      chain.push_back(node);
+      chain.emplace_back(node);
       ids.PlacedVolume::VolIDs::Base::insert(ids.end(), pv_ids.begin(), pv_ids.end());
       if (vol.isSensitive()) {
         sd = vol.sensitiveDetector();
@@ -125,7 +125,7 @@ namespace {
           node = *(k);
           PlacementMap::const_iterator g4pit = m_geo.g4Placements.find(node);
           if (g4pit != m_geo.g4Placements.end()) {
-            path.push_back((*g4pit).second);
+            path.emplace_back((*g4pit).second);
             printout(print_chain, "Geant4VolumeManager", "+++     Chain: Node OK: %s [%s]",
                      node->GetName(), (*g4pit).second->GetName().c_str());
             continue;
@@ -136,13 +136,13 @@ namespace {
           if ( iVolImp != m_geo.g4VolumeImprints.end() )   {
             const Imprints& imprints = (*iVolImp).second;
             //size_t len = kend-k;
-            for(Imprints::const_iterator iImp=imprints.begin(); iImp != imprints.end(); ++iImp)  {
-              const VolumeChain& c = (*iImp).first;
+            for(const auto& imp : imprints )   {
+              const VolumeChain& c = imp.first;
               if ( c.size() <= control.size() && control == c )   {
-                path.push_back((*iImp).second);
+                path.emplace_back(imp.second);
                 printout(print_chain, "Geant4VolumeManager", "+++     Chain: Node OK: %s %s -> %s",
                          node->GetName(), detail::tools::placementPath(c,false).c_str(),
-                         (*iImp).second->GetName().c_str());
+                         imp.second->GetName().c_str());
                 control.clear();
                 break;
               }
diff --git a/UtilityApps/src/converter.cpp b/UtilityApps/src/converter.cpp
index f36b6a8a6..c0131baeb 100644
--- a/UtilityApps/src/converter.cpp
+++ b/UtilityApps/src/converter.cpp
@@ -64,7 +64,7 @@ namespace {
         else if ( strncmp(argv[i],"-compact2vis",12)==0 )
           compact2vis = true;
         else if ( strncmp(argv[i],"-input",2)==0 )
-          geo_files.push_back(argv[++i]);
+          geo_files.emplace_back(argv[++i]);
         else if ( strncmp(argv[i],"-output",2)==0 )
           output = ++i;
         else if ( strncmp(argv[i],"-ascii",5)==0 )
diff --git a/UtilityApps/src/display.cpp b/UtilityApps/src/display.cpp
index f3e33ad79..f4fa3643a 100644
--- a/UtilityApps/src/display.cpp
+++ b/UtilityApps/src/display.cpp
@@ -20,23 +20,23 @@ int main(int argc,char** argv)  {
   std::string level, visopt, opt, detector;
   bool dry = false;
   for(int i=0; i<argc; ++i)  {
-    if ( i==1 && argv[i][0] != '-' ) av.push_back("-input");
-    if      ( strncmp(argv[i],"-load-only",4) == 0 ) dry = true, av.push_back(argv[i]);
-    else if ( strncmp(argv[i],"-dry-run",4)   == 0 ) dry = true, av.push_back(argv[i]);
+    if ( i==1 && argv[i][0] != '-' ) av.emplace_back("-input");
+    if      ( strncmp(argv[i],"-load-only",4) == 0 ) dry = true, av.emplace_back(argv[i]);
+    else if ( strncmp(argv[i],"-dry-run",4)   == 0 ) dry = true, av.emplace_back(argv[i]);
     else if ( strncmp(argv[i],"-visopt",4)    == 0 ) visopt   = argv[++i];
     else if ( strncmp(argv[i],"-level", 4)    == 0 ) level    = argv[++i];
     else if ( strncmp(argv[i],"-option",4)    == 0 ) opt      = argv[++i];
     else if ( strncmp(argv[i],"-detector",4)  == 0 ) detector = argv[++i];
-    else av.push_back(argv[i]);
+    else av.emplace_back(argv[i]);
   }
   if ( !dry )   {
-    av.push_back("-interactive");
-    av.push_back("-plugin");
-    av.push_back("DD4hep_GeometryDisplay");
-    if ( !opt.empty()      ) av.push_back("-opt"),      av.push_back(opt.c_str());
-    if ( !level.empty()    ) av.push_back("-level"),    av.push_back(level.c_str());
-    if ( !visopt.empty()   ) av.push_back("-visopt"),   av.push_back(visopt.c_str());
-    if ( !detector.empty() ) av.push_back("-detector"), av.push_back(detector.c_str());
+    av.emplace_back("-interactive");
+    av.emplace_back("-plugin");
+    av.emplace_back("DD4hep_GeometryDisplay");
+    if ( !opt.empty()      ) av.emplace_back("-opt"),      av.emplace_back(opt.c_str());
+    if ( !level.empty()    ) av.emplace_back("-level"),    av.emplace_back(level.c_str());
+    if ( !visopt.empty()   ) av.emplace_back("-visopt"),   av.emplace_back(visopt.c_str());
+    if ( !detector.empty() ) av.emplace_back("-detector"), av.emplace_back(detector.c_str());
   }
   return dd4hep::execute::main_plugins("DD4hep_GeometryDisplay", av.size(), (char**)&av[0]);
 }
diff --git a/UtilityApps/src/dumpdetector.cpp b/UtilityApps/src/dumpdetector.cpp
index aad5ac5fc..afd3bf5b6 100644
--- a/UtilityApps/src/dumpdetector.cpp
+++ b/UtilityApps/src/dumpdetector.cpp
@@ -172,14 +172,14 @@ static int invoke_dump_detector(int argc, char** argv ){
   std::list< DetElement > dets ;
   std::list< DetElement > daugs ; 
   std::list< DetElement > gdaugs ; 
-  daugs.push_back( world ) ;
+  daugs.emplace_back( world ) ;
   while( ! daugs.empty() ) {
     for( std::list< DetElement >::iterator li=daugs.begin() ; li != daugs.end() ; ++li ){
       DetElement dau = *li ;
       DetElement::Children chMap = dau.children() ;
       for ( DetElement::Children::const_iterator it=chMap.begin() ; it != chMap.end() ; ++it ){
         DetElement de = (*it).second ;
-        gdaugs.push_back( de ) ;
+        gdaugs.emplace_back( de ) ;
       }  
     }
     dets.splice( dets.end() , daugs ) ;
diff --git a/UtilityApps/src/materialBudget.cpp b/UtilityApps/src/materialBudget.cpp
index 798675b96..8e74a00e4 100644
--- a/UtilityApps/src/materialBudget.cpp
+++ b/UtilityApps/src/materialBudget.cpp
@@ -136,7 +136,7 @@ int main_wrapper(int argc, char** argv)   {
     else if( token == "subdet" ){
       SDetHelper det ;
       iss >>  det.name >> det.r0 >> det.z0 >> det.r1 >> det.z1 ;
-      subdets.push_back( det );
+      subdets.emplace_back( det );
     }
 
     if ( !iss.eof() || iss.fail() ){
diff --git a/UtilityApps/src/run_plugin.h b/UtilityApps/src/run_plugin.h
index ac2701b82..f0d534c4e 100644
--- a/UtilityApps/src/run_plugin.h
+++ b/UtilityApps/src/run_plugin.h
@@ -136,13 +136,13 @@ namespace {
     //____________________________________________________________________________
     int handle(int& i, int argc, char** argv)    {
       if ( ::strncmp(argv[i],"-compact",5)==0 || ::strncmp(argv[i],"-input",4)==0 )  {
-        geo_files.push_back(argv[++i]);
+        geo_files.emplace_back(argv[++i]);
         if ( argc>i+2 && ::strncmp(argv[i+1],"-build_type",6)==0 )  {
-          build_types.push_back(argv[i+2]);
+          build_types.emplace_back(argv[i+2]);
           i += 2;
         }
         else  {
-          build_types.push_back("BUILD_DEFAULT");
+          build_types.emplace_back("BUILD_DEFAULT");
         }
       }
       else if ( ::strncmp(argv[i],"-load_only",5)==0 )
@@ -173,14 +173,14 @@ namespace {
         ui = false;
       else if ( ::strncmp(argv[i],"-plugin",5)==0 )   {
         // Need to interprete plugin args here locally.....
-        plugins.push_back(std::vector<const char*>());
-        plugins.back().push_back(argv[++i]);
+        plugins.emplace_back(std::vector<const char*>());
+        plugins.back().emplace_back(argv[++i]);
         for( ++i; i < argc; ++i )   {
           if ( ::strncmp(argv[i],"-plugin",5)==0 ) { --i; break; }
           if ( ::strncmp(argv[i],"-end-plugin",4)==0 )  { break; }
-          plugins.back().push_back(argv[i]);
+          plugins.back().emplace_back(argv[i]);
         }
-        plugins.back().push_back(0);
+        plugins.back().emplace_back(nullptr);
       }
       else 
         return 0;
@@ -246,8 +246,8 @@ namespace dd4hep  {
             usage_default(name);
         }
         else {  // This is the default
-          args.geo_files.push_back(argv[i]);
-          args.build_types.push_back("BUILD_DEFAULT");
+          args.geo_files.emplace_back(argv[i]);
+          args.build_types.emplace_back("BUILD_DEFAULT");
         }
       }
       if ( args.geo_files.empty() )
-- 
GitLab