diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h b/AtlasGeometryCommon/BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h
index 5893b3e9d33c9e3a482c7cfd3c195bab9f37784d..f0d4ce146290d2dfa561a9d26d0df42492c4f7bd 100755
--- a/AtlasGeometryCommon/BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h
@@ -27,7 +27,7 @@ class BeamPipeDetectorManager : public GeoVDetectorManager
   virtual PVConstLink getTreeTop(unsigned int i) const;
 
   // Add a Tree top:
-  void addTreeTop(PVConstLink);
+  void addTreeTop(const PVConstLink&);
 
  private:  
 
diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx
index 25c704107bb5376fe706a4062afc51a80c2b1bf4..ce3b81d22f44bfd45eaef69d670318b0f612f365 100755
--- a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx
@@ -33,16 +33,15 @@
 
 BeamPipeDetectorFactory::BeamPipeDetectorFactory(StoreGateSvc *detStore,
 						 IRDBAccessSvc *pAccess)
-  :m_detectorManager(0),
-   m_materialManager(0),
+  :m_detectorManager(nullptr),
+   m_materialManager(nullptr),
    m_detectorStore(detStore),
    m_access(pAccess),
    m_centralRegionZMax(1500*Gaudi::Units::mm)
 {}
 
 BeamPipeDetectorFactory::~BeamPipeDetectorFactory()
-{
-}
+= default;
 
 void BeamPipeDetectorFactory::create(GeoPhysVol *world)
 {
@@ -163,7 +162,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
 
   // Sections 2 & 3 are placed in section 1. 
   // pvMotherSection will point to section 1.
-  GeoPhysVol* pvMotherSection = 0;
+  GeoPhysVol* pvMotherSection = nullptr;
   bool addToFirstSection = true;
   double rminSec1 = 0;
   double rmaxSec1 = 0;
@@ -234,7 +233,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
     }
 
     const GeoMaterial* mat = m_materialManager->getMaterial(material);
-    if (mat == 0) {
+    if (mat == nullptr) {
       // For backward compatibility - older geometry versions didn't specify the
       // material namespace
       // std::cout << "Material """ << material << """ not found. Trying  std::" << material << std::endl;
@@ -263,7 +262,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
     }
 	     
 
-    GeoTransform* tfSection = 0;
+    GeoTransform* tfSection = nullptr;
     if (znew != 0 && (secNum==1 || !addToFirstSection)) tfSection = new GeoTransform(GeoTrf::TranslateZ3D(znew));
     GeoIntrusivePtr<GeoNameTag> ntSection{new GeoNameTag(name)};
 
@@ -287,7 +286,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
     // Not needed, but just in case in the future we have +/- sections in central region
     if(central && z!=0.) {
       // add rotated section as well
-      GeoTransform* tfSectionRot = 0;
+      GeoTransform* tfSectionRot = nullptr;
       if (isTube) { 
 	// No need for rotation.
 	tfSectionRot = new GeoTransform(GeoTrf::TranslateZ3D(-znew));
@@ -336,16 +335,16 @@ BeamPipeDetectorFactory::makeEnvelope(const IRDBRecordset_ptr& bpipeEnvelope)
   }
 
   double rFwd = 0;
-  if (fwdEntry.size()) {
+  if (!fwdEntry.empty()) {
     rFwd = fwdEntry[0].r();    
-  } else if (centralEntry.size()) {
+  } else if (!centralEntry.empty()) {
     rFwd = centralEntry[0].r();    
   } else {
     std::cout << "Unexpected condition when building beam pipe." << std::endl;
   }
  
   // central
-  if (centralEntry.size() == 0) {
+  if (centralEntry.empty()) {
     envelopes.centralShape  = new GeoTube(0, rFwd, m_centralRegionZMax);
   } else {
     // This case probably will never get used and is untested.
@@ -371,7 +370,7 @@ BeamPipeDetectorFactory::makeEnvelope(const IRDBRecordset_ptr& bpipeEnvelope)
   {
     GeoRef<GeoPcon> pcone (new GeoPcon(0, 360*Gaudi::Units::deg));
     pcone->addPlane(m_centralRegionZMax,0,rFwd);
-    if (fwdEntry.size() == 0) { 
+    if (fwdEntry.empty()) { 
       // Unlikely case but for completeness
       // we make small fwd region if everything is in central region.
       pcone->addPlane(m_centralRegionZMax+0.1*Gaudi::Units::mm,0,rFwd);
diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorManager.cxx b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorManager.cxx
index 6202dc83fa5c0bb964bfc7f37ac2824731e4dbc3..c62f673002b2cec9dbe180174eee2ff3617ff441 100755
--- a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorManager.cxx
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorManager.cxx
@@ -22,7 +22,7 @@ PVConstLink BeamPipeDetectorManager::getTreeTop(unsigned int i) const
   return m_volume[i];
 }
 
-void  BeamPipeDetectorManager::addTreeTop(PVConstLink vol)
+void  BeamPipeDetectorManager::addTreeTop(const PVConstLink& vol)
 {
   m_volume.push_back(vol);
 }
diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx
index bcb716008df12b005dea6ed5810f806412d5fdb5..53321033fdc5016d7b4024a35359e3e002aa60b0 100755
--- a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx
@@ -1,11 +1,11 @@
 /*
-  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "BeamPipeDetectorTool.h"
-#include "BeamPipeDetectorFactory.h" 
-#include "BeamPipeDetectorFactory_Lite.h" 
-#include "BeamPipeGeoModel/BeamPipeDetectorManager.h" 
+#include "BeamPipeDetectorFactory.h"
+#include "BeamPipeDetectorFactory_Lite.h"
+#include "BeamPipeGeoModel/BeamPipeDetectorManager.h"
 
 #include "GeoModelInterfaces/IGeoDbTagSvc.h"
 #include "GeoModelUtilities/GeoModelExperiment.h"
@@ -21,24 +21,22 @@
 
 #include "GeoModelKernel/GeoVolumeCursor.h"
 
-BeamPipeDetectorTool::BeamPipeDetectorTool( const std::string& type, 
-					    const std::string& name, 
-					    const IInterface* parent ): 
+BeamPipeDetectorTool::BeamPipeDetectorTool( const std::string& type,
+					    const std::string& name,
+					    const IInterface* parent ):
   GeoModelTool(type,name,parent),
-  m_manager(0),
+  m_manager(nullptr),
   m_mode("BeamPipe")
 {
     declareProperty("BeamPipeMode",            m_mode); //m_mode="BeamPipe" by default, setting m_mode="AssemblyBeamPipe" will trigger optimised implementation using assembly volume
 }
 
-BeamPipeDetectorTool::~BeamPipeDetectorTool()
-{
-}
+BeamPipeDetectorTool::~BeamPipeDetectorTool() = default;
 
 
 StatusCode BeamPipeDetectorTool::create()
-{ 
-  MsgStream log(msgSvc(), name()); 
+{
+  MsgStream log(msgSvc(), name());
 
   log << MSG::INFO << "Building Beam Pipe" << endmsg;
 
@@ -48,64 +46,64 @@ StatusCode BeamPipeDetectorTool::create()
     log << MSG::FATAL << "Could not locate GeoDbTagSvc" << endmsg;
     return StatusCode::FAILURE;
   }
-    
+
 
   std::string atlasVersion = geoDbTag->atlasVersion();
   if(atlasVersion == "AUTO")
     atlasVersion = "ATLAS-00";
   std::string versionNode = "ATLAS";
 
-  GeoModelExperiment * theExpt; 
-  if (StatusCode::SUCCESS != detStore()->retrieve( theExpt, "ATLAS" )) { 
-    log << MSG::ERROR 
-	<< "Could not find GeoModelExperiment ATLAS" 
-	<< endmsg; 
-    return (StatusCode::FAILURE); 
-  } 
+  GeoModelExperiment * theExpt;
+  if (StatusCode::SUCCESS != detStore()->retrieve( theExpt, "ATLAS" )) {
+    log << MSG::ERROR
+	<< "Could not find GeoModelExperiment ATLAS"
+	<< endmsg;
+    return (StatusCode::FAILURE);
+  }
 
-  if ( 0 == m_detector ) 
+  if ( nullptr == m_detector )
     {
       GeoPhysVol *world=&*theExpt->getPhysVol();
-      
-      
+
+
       ServiceHandle<IRDBAccessSvc> accessSvc(geoDbTag->getParamSvcName(),name());
       ATH_CHECK( accessSvc.retrieve());
 
-      
+
       GeoModelIO::ReadGeoModel* sqliteReader  = geoDbTag->getSqliteReader();
       if (sqliteReader) {
 	BeamPipeDetectorFactory_Lite theBeamPipeFactory;
 	theBeamPipeFactory.create(world);
 	m_manager = theBeamPipeFactory.getDetectorManager();
-	
+
       }
       else {
-	
-	
+
+
 	// Check we have the beampipe and print its version
 	// Print the  version tag:
 	std::string beampipeVersionTag;
 	beampipeVersionTag = accessSvc->getChildTag("BeamPipe", atlasVersion,versionNode);
 	log << MSG::DEBUG << "Beampipe Version: " << beampipeVersionTag << endmsg;
-	
-	if (beampipeVersionTag.empty()) { 
+
+	if (beampipeVersionTag.empty()) {
 	  log << MSG::INFO << "No BeamPipe Version. Beam pipe will not be built." << endmsg;
-	}	
+	}
 	else {
 	  BeamPipeDetectorFactory theBeamPipeFactory(detStore().operator->(),accessSvc.operator->());
 	  theBeamPipeFactory.setTagNode(atlasVersion,versionNode,m_mode);
 	  theBeamPipeFactory.create(world);
-	  
+
 	  m_manager = theBeamPipeFactory.getDetectorManager();
 	}
       }
 
-      if (m_manager) {    
+      if (m_manager) {
 	theExpt->addManager(m_manager);
 	sc = detStore()->record(m_manager,m_manager->getName());
 	if (sc.isFailure()) {
 	  log << MSG::ERROR << "Could not register BeamPipe detector manager" << endmsg;
-	  return (StatusCode::FAILURE); 
+	  return (StatusCode::FAILURE);
 	}
 	return StatusCode::SUCCESS;
       }
@@ -118,7 +116,7 @@ StatusCode BeamPipeDetectorTool::clear()
   SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<BeamPipeDetectorManager>::ID(),m_manager->getName());
   if(proxy) {
     proxy->reset();
-    m_manager = 0;
+    m_manager = nullptr;
   }
   return StatusCode::SUCCESS;
 }
diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx
index a5ec519e77818933096912327d442cf9e9dd3c0d..849de2194489867737f301b92c1b39faf8230b53 100755
--- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx
+++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx
@@ -6,12 +6,12 @@
 
 #include "GeoModelInterfaces/StoredMaterialManager.h"
 
-#include "GeoModelKernel/GeoMaterial.h"  
-#include "GeoModelKernel/GeoTube.h"  
+#include "GeoModelKernel/GeoMaterial.h"
+#include "GeoModelKernel/GeoTube.h"
 #include "GeoModelKernel/GeoBox.h"
-#include "GeoModelKernel/GeoTubs.h"  
-#include "GeoModelKernel/GeoLogVol.h"  
-#include "GeoModelKernel/GeoNameTag.h"  
+#include "GeoModelKernel/GeoTubs.h"
+#include "GeoModelKernel/GeoLogVol.h"
+#include "GeoModelKernel/GeoNameTag.h"
 #include "GeoModelKernel/GeoPhysVol.h"
 #include "GeoModelKernel/GeoShape.h"
 #include "GeoModelKernel/GeoShapeShift.h"
@@ -21,29 +21,30 @@
 #include "GaudiKernel/SystemOfUnits.h"
 #include "StoreGate/StoreGateSvc.h"
 
+#include "RDBAccessSvc/IRDBAccessSvc.h"
 #include "RDBAccessSvc/IRDBRecord.h"
 #include "RDBAccessSvc/IRDBRecordset.h"
-#include "RDBAccessSvc/IRDBAccessSvc.h"
-#include <string>
 #include <map>
+#include <string>
+#include <utility>
 
 CavernInfraDetectorFactory::CavernInfraDetectorFactory(ServiceHandle<StoreGateSvc> detStore,
 						       ServiceHandle<IRDBAccessSvc> pAccess)
-  : m_detectorStore(detStore)
-  , m_access(pAccess)
+  : m_detectorStore(std::move(detStore))
+  , m_access(std::move(pAccess))
 {
 }
 
 void CavernInfraDetectorFactory::create(GeoPhysVol *world)
-{ 
+{
   m_detectorManager=new CavernInfraDetectorManager();
 
   StoredMaterialManager* materialManager = nullptr;
   if (StatusCode::SUCCESS != m_detectorStore->retrieve(materialManager, std::string("MATERIALS"))) {
-    return; 
-  } 
+    return;
+  }
 
-   // Get the materials  
+   // Get the materials
   const GeoMaterial *air        = materialManager->getMaterial("std::Air");
   const GeoMaterial *rock       = materialManager->getMaterial("std::Rock");
   const GeoMaterial *conc       = materialManager->getMaterial("std::Concrete");
@@ -51,14 +52,14 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
 
   // Get Recordset CavernElements.
   IRDBRecordset_ptr cavernElements = m_access->getRecordsetPtr("CavernElements",m_versionTag,m_versionNode);
- 
+
   std::map<std::string, unsigned int> elementMap;
- 
+
   for (unsigned int i=0; i<cavernElements->size(); i++) {
     std::string key = (*cavernElements)[i]->getString("ELEMENT");
     elementMap[key] = i;
   }
- 
+
   unsigned int recordIndex;
  //// -------------------------Build mother volume Point1--------------------------------
 
@@ -66,13 +67,13 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
  // -- first get index of the record in cavernElements recordset
  // which corresponds to Point1 element
  // -- get numbers from record
-  
-  recordIndex = elementMap["Point1"]; 
+
+  recordIndex = elementMap["Point1"];
 
   GeoNameTag *tag = new GeoNameTag("CavernInfra");
 
  //// -----------------------------------Build SX1------------------------------------------
- 
+
   recordIndex = elementMap["SX1"];
   double SX1Xpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
   double SX1Ypos = (*cavernElements)[recordIndex]->getDouble("YPOS")*Gaudi::Units::m;
@@ -80,11 +81,11 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
   double SX1HalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
   double SX1HalfWidth  = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double SX1HalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  
+
   recordIndex = elementMap["SX1Air"];
   double SX1AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*Gaudi::Units::m;
-  double SX1AirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;  
-  double SX1AirHalfWidth  = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;   
+  double SX1AirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
+  double SX1AirHalfWidth  = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double SX1AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
 
   GeoTransform *s1XYZt = new GeoTransform(GeoTrf::Translate3D(SX1Xpos,SX1Ypos,SX1Zpos)); //1.7  -8.7
@@ -92,9 +93,9 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
   GeoBox     *SX1        = new GeoBox(SX1HalfWidth ,SX1HalfHeight, SX1HalfLength); //  11.7, 6.5, 42.3
   GeoLogVol  *lvsx1s     = new GeoLogVol("SX1Steel",SX1,shieldSteel);
   GeoPhysVol *sx1        = new GeoPhysVol(lvsx1s);
-  world->add(tag);                                                                             
+  world->add(tag);
   world->add(sx1);
-   
+
 
   GeoTransform *s1z = new GeoTransform(GeoTrf::TranslateY3D(SX1AirYpos));
   sx1->add(s1z);
@@ -102,59 +103,59 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
   GeoLogVol  *lvsx1a     = new GeoLogVol("SX1Air",SX1Air,air);
   GeoPhysVol *sx1a       = new GeoPhysVol(lvsx1a);
   sx1->add(sx1a);
- 
- 
+
+
  //// ------------------First: Build cavern with concrete-----------------------------
 
   recordIndex = elementMap["WallACConc"];
   double WallACConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double WallACConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double WallACConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double WallACConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
   double WallACConcSphi= (*cavernElements)[recordIndex]->getDouble("SPHI");
-  double WallACConcDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); 
+  double WallACConcDphi= (*cavernElements)[recordIndex]->getDouble("DPHI");
 
   recordIndex = elementMap["BoxConc"];
-  double BoxConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m; 
-  double BoxConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;  
+  double BoxConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
+  double BoxConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double BoxConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
 
   recordIndex = elementMap["VaultConc"];
-  double VaultConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double VaultConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double VaultConcYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
   double VaultConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double VaultConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double VaultConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double VaultConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
   double VaultConcSphi= (*cavernElements)[recordIndex]->getDouble("SPHI");
   double VaultConcDphi= (*cavernElements)[recordIndex]->getDouble("DPHI");
 
   recordIndex = elementMap["HallConc"];
-  double HallConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m; 
-  double HallConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;  
+  double HallConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
+  double HallConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double HallConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
 
   recordIndex = elementMap["BoxConcW"];
-  double BoxConcWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double BoxConcWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double BoxConcWYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
 
   recordIndex = elementMap["BoxConcVleft"];
-  double BoxConcVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double BoxConcVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double BoxConcVleftYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
 
   recordIndex = elementMap["BoxConcVright"];
-  double BoxConcVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double BoxConcVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double BoxConcVrightYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
 
   recordIndex = elementMap["SurfaceFloor"];
   double SurfaceFloorXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
-  double SurfaceFloorZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
-  double SurfaceFloorHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m; 
-  double SurfaceFloorHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;  
+  double SurfaceFloorZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
+  double SurfaceFloorHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
+  double SurfaceFloorHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double SurfaceFloorHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
 
-   
-  GeoTubs *WallACConcrete      = new GeoTubs(WallACConcMinR, WallACConcMaxR, WallACConcHalfHeight, WallACConcSphi, WallACConcDphi);    
+
+  GeoTubs *WallACConcrete      = new GeoTubs(WallACConcMinR, WallACConcMaxR, WallACConcHalfHeight, WallACConcSphi, WallACConcDphi);
   GeoBox  *BoxConc             = new GeoBox(BoxConcHalfLength, BoxConcHalfWidth, BoxConcHalfHeight);
-  GeoTubs *VaultConcrete       = new GeoTubs(VaultConcMinR, VaultConcMaxR, VaultConcHalfHeight , VaultConcSphi, VaultConcDphi);        
+  GeoTubs *VaultConcrete       = new GeoTubs(VaultConcMinR, VaultConcMaxR, VaultConcHalfHeight , VaultConcSphi, VaultConcDphi);
   GeoBox  *HallConcrete        = new GeoBox(HallConcHalfLength, HallConcHalfWidth, HallConcHalfHeight);
   GeoBox  *SurfaceFloor        = new GeoBox(SurfaceFloorHalfLength, SurfaceFloorHalfWidth, SurfaceFloorHalfHeight);
 
@@ -182,46 +183,46 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
         subtract((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) );
   const GeoShape & CutVaultConc  = (*VaultConcrete).subtract((*BoxConc) << GeoTrf::Transform3D(BoxCutVaultLeftConc)).
                                                     subtract((*BoxConc) << GeoTrf::Transform3D(BoxCutVaulRightConc));
- 
+
   recordIndex = elementMap["ShaftCut"];
-  double ShaftCutZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double ShaftCutZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double ShaftCutYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
   double ShaftCutHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double ShaftCutMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double ShaftCutMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double ShaftCutMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
 
   recordIndex = elementMap["PX14Conc"];
-  double PX14ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m; 
+  double PX14ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
   double PX14ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*Gaudi::Units::m;
   double PX14ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double PX14ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double PX14ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double PX14ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
 
   recordIndex = elementMap["PX16Conc"];
-  double PX16ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m; 
+  double PX16ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
   double PX16ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*Gaudi::Units::m;
   double PX16ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double PX16ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double PX16ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double PX16ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
 
   //--------------- Build concrete shafts------------------------------.
   GeoTube     *ShaftCut  = new GeoTube(ShaftCutMinR, ShaftCutMaxR, ShaftCutHalfHeight);
   GeoTube     *PX14Conc  = new GeoTube(PX14ConcMinR, PX14ConcMaxR, PX14ConcHalfHeight);
   GeoTube     *PX16Conc  = new GeoTube(PX16ConcMinR, PX16ConcMaxR, PX16ConcHalfHeight);
-      
+
   const GeoShape & ShaftsConc=
 	((*PX14Conc)           << GeoTrf::TranslateX3D(PX14ConcXpos)*GeoTrf::TranslateY3D(PX14ConcYpos)).
 	add((*PX16Conc)        << GeoTrf::TranslateX3D(PX16ConcXpos)*GeoTrf::TranslateY3D(PX16ConcYpos)).
 	subtract((*ShaftCut)   << GeoTrf::TranslateZ3D(ShaftCutZpos)*GeoTrf::RotateY3D(ShaftCutYrotate));
- 
+
   recordIndex = elementMap["WallCConc"];
   double WallCConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
-  double WallCConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m; 
+  double WallCConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
   double WallCConcZrotate = (*cavernElements)[recordIndex]->getDouble("ZROTATE");
 
   recordIndex = elementMap["WallAConc"];
   double WallAConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
-  double WallAConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m; 
+  double WallAConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
 
   recordIndex = elementMap["ShaftsConc"];
   double ShaftsConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
@@ -278,57 +279,57 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
 //        subtract((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) );
 //        subtract((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) );
 
-	
+
  //// -----------------------Second: Build cavern with air-------------------------------
 
   // Create variables for Concrete Cavern and get index of the record in cavernElements
    recordIndex = elementMap["WallACAir"];
   double WallACAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double WallACAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double WallACAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double WallACAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
   double WallACAirSphi= (*cavernElements)[recordIndex]->getDouble("SPHI");
-  double WallACAirDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); 
- 
+  double WallACAirDphi= (*cavernElements)[recordIndex]->getDouble("DPHI");
+
   recordIndex = elementMap["BoxAir"];
-  double BoxAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m; 
-  double BoxAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;  
+  double BoxAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
+  double BoxAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double BoxAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
- 
+
   recordIndex = elementMap["VaultAir"];
-  double VaultAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double VaultAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double VaultAirYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
   double VaultAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double VaultAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double VaultAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double VaultAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
   double VaultAirSphi= (*cavernElements)[recordIndex]->getDouble("SPHI");
   double VaultAirDphi= (*cavernElements)[recordIndex]->getDouble("DPHI");
- 
+
   recordIndex = elementMap["HallAir"];
-  double HallAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m; 
-  double HallAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;  
+  double HallAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
+  double HallAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double HallAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
- 
+
   recordIndex = elementMap["BaseAir"];
-  double BaseAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
-  double BaseAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m; 
-  double BaseAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;  
+  double BaseAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
+  double BaseAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
+  double BaseAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double BaseAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
- 
+
   recordIndex = elementMap["BoxAirW"];
-  double BoxAirWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double BoxAirWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double BoxAirWYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
 
   recordIndex = elementMap["BoxAirVleft"];
-  double BoxAirVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double BoxAirVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double BoxAirVleftYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
- 
+
   recordIndex = elementMap["BoxAirVright"];
-  double BoxAirVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m; 
+  double BoxAirVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*Gaudi::Units::m;
   double BoxAirVrightYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
 
-  GeoTubs *WallACAir         = new GeoTubs(WallACAirMinR, WallACAirMaxR, WallACAirHalfHeight, WallACAirSphi, WallACAirDphi);        
+  GeoTubs *WallACAir         = new GeoTubs(WallACAirMinR, WallACAirMaxR, WallACAirHalfHeight, WallACAirSphi, WallACAirDphi);
   GeoBox  *BoxAir            = new GeoBox(BoxAirHalfLength, BoxAirHalfWidth, BoxAirHalfHeight);
-  GeoTubs *VaultAir          = new GeoTubs(VaultAirMinR, VaultAirMaxR, VaultAirHalfHeight, VaultAirSphi, VaultAirDphi);      
+  GeoTubs *VaultAir          = new GeoTubs(VaultAirMinR, VaultAirMaxR, VaultAirHalfHeight, VaultAirSphi, VaultAirDphi);
   GeoBox  *HallAir           = new GeoBox(HallAirHalfLength, HallAirHalfWidth, HallAirHalfHeight);
   GeoBox  *BaseAir           = new GeoBox(BaseAirHalfLength, BaseAirHalfWidth, BaseAirHalfHeight);
   GeoTrf::Transform3D BoxCutWallAir      = GeoTrf::TranslateZ3D(BoxAirWZpos)*GeoTrf::RotateY3D(BoxAirWYrotate);
@@ -342,20 +343,20 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
 
   //--------------- Build air shafts------------------------------.
   recordIndex = elementMap["PX14Air"];
-  double PX14AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m; 
+  double PX14AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
   double PX14AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*Gaudi::Units::m;
   double PX14AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double PX14AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double PX14AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double PX14AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
- 
+
   recordIndex = elementMap["PX16Air"];
-  double PX16AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m; 
+  double PX16AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
   double PX16AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*Gaudi::Units::m;
   double PX16AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
-  double PX16AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;     
+  double PX16AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*Gaudi::Units::m;
   double PX16AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*Gaudi::Units::m;
 
-  GeoTube     *PX14Air   = new GeoTube(PX14AirMinR, PX14AirMaxR, PX14AirHalfHeight);  
+  GeoTube     *PX14Air   = new GeoTube(PX14AirMinR, PX14AirMaxR, PX14AirHalfHeight);
   GeoTube     *PX16Air   = new GeoTube(PX16AirMinR, PX16AirMaxR, PX16AirHalfHeight);
 
   recordIndex = elementMap["CavShaftsConc"];
@@ -363,10 +364,10 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
   double CavShaftsXrotate = (*cavernElements)[recordIndex]->getDouble("XROTATE");
   double CavShaftsYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE");
 
-  const GeoShape & ShaftsAir= 
+  const GeoShape & ShaftsAir=
 	  ((*PX14Air)     << GeoTrf::TranslateX3D(PX14AirXpos)*GeoTrf::TranslateY3D(PX14AirYpos)).
 	  add((*PX16Air)  << GeoTrf::TranslateX3D(PX16AirXpos)*GeoTrf::TranslateY3D(PX16AirYpos));
- 
+
   //----------------Assemble everything--------------------------------.
   const GeoShape & CavernAir = (*HallAir).
 //      add((*AirJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
@@ -395,16 +396,16 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
   const GeoShape & AirHall=
           ((CavernAir     << GeoTrf::TranslateZ3D(CavernAirZpos))).
           add((ShaftsAir  << GeoTrf::TranslateZ3D(ShaftsAirZpos)));     //allows for a built-in 2m thick plugs for both PX14 & PX16
- 
+
  //// -----------------------Build BedRock for Shafts and Cavern-------------------------------
- 
+
   recordIndex = elementMap["Rock"];
-  double RockHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m; 
-  double RockHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;  
+  double RockHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*Gaudi::Units::m;
+  double RockHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*Gaudi::Units::m;
   double RockHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*Gaudi::Units::m;
   double RockXPos = (*cavernElements)[recordIndex]->getDouble("XPOS")*Gaudi::Units::m;
   double RockYPos = (*cavernElements)[recordIndex]->getDouble("YPOS")*Gaudi::Units::m;
-  
+
   GeoBox     *Rockbox     = new GeoBox( RockHalfWidth, RockHalfHeight, RockHalfLength); // 300, 50.75, 300
   const GeoShape & BedRock = ((*Rockbox) .
 			      subtract((AirHall) <<GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate))).
@@ -421,18 +422,18 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
   const GeoShape & CavConcrete = ((Concrete).
 //        add((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
         subtract(AirHall));
-  
-  GeoTransform* xfTop = new GeoTransform(GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate)); 
+
+  GeoTransform* xfTop = new GeoTransform(GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate));
   bedrock->add(xfTop);
   GeoLogVol  *lvcsc              = new GeoLogVol("CAV_SHAFTS_CONC",&CavConcrete,conc);
   GeoPhysVol *CavShaftsConc      = new GeoPhysVol(lvcsc);
   bedrock->add(CavShaftsConc);
-  
+
 
   //// NOW INSERT ALL OF THIS INTO THE WORLD.
   m_detectorManager->addTreeTop(sx1);
-  m_detectorManager->addTreeTop(bedrock);  
-  
+  m_detectorManager->addTreeTop(bedrock);
+
 }
 
 const CavernInfraDetectorManager * CavernInfraDetectorFactory::getDetectorManager() const
diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.h b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.h
index 7268481b8458dcfe24035cdc0b73b99d16bb90f3..d5b314681d3469bf4d731d456d07b0e09015660d 100755
--- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.h
+++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.h
@@ -12,39 +12,39 @@
 
 #include <string>
 
-class CavernInfraDetectorFactory : public GeoVDetectorFactory  
+class CavernInfraDetectorFactory : public GeoVDetectorFactory
 {
  public:
   // Constructor:
   CavernInfraDetectorFactory(ServiceHandle<StoreGateSvc> pDetStore,
 			     ServiceHandle<IRDBAccessSvc> pAccess);
-  
+
   // Illegal operations:
   const CavernInfraDetectorFactory & operator=(const CavernInfraDetectorFactory &right) = delete;
   CavernInfraDetectorFactory(const CavernInfraDetectorFactory &right) = delete;
-  
+
   // Destructor:
   ~CavernInfraDetectorFactory() = default;
-  
+
   // Creation of geometry:
   virtual void create(GeoPhysVol *world) override;
-  
+
   // Access to the results:
   virtual const CavernInfraDetectorManager* getDetectorManager() const override;
-  
+
   // Set version Tag and Node
   void setTagNode(const std::string& tag, const std::string& node);
-  
- private:  
+
+ private:
   // The manager:
   CavernInfraDetectorManager*  m_detectorManager{nullptr};
-  
+
   ServiceHandle<StoreGateSvc>  m_detectorStore;
   ServiceHandle<IRDBAccessSvc> m_access;
   std::string              m_versionTag;
   std::string              m_versionNode;
 };
 
-// Class CavernInfraDetectorFactory 
+// Class CavernInfraDetectorFactory
 #endif
 
diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorManager.cxx b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorManager.cxx
index a765ea1e6e37ba24c2f087056966f50a5f213e7e..ff2af0da0063dfed3e5c77e860bee93765cefa46 100755
--- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorManager.cxx
+++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorManager.cxx
@@ -26,7 +26,7 @@ PVConstLink CavernInfraDetectorManager::getTreeTop(unsigned int i) const
     return nullptr;
 }
 
-void  CavernInfraDetectorManager::addTreeTop(PVLink link) 
+void  CavernInfraDetectorManager::addTreeTop(const PVLink& link)
 {
   m_treeTops.push_back(link);
 }
diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorManager.h b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorManager.h
index 5d9a1d1e727694e5ef993d50abab1152bf25d0be..449f1d3453b6f6cf4587de4b661d8412a198b3d4 100755
--- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorManager.h
+++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorManager.h
@@ -9,29 +9,29 @@
 #include "GeoModelKernel/GeoVDetectorManager.h"
 #include <vector>
 
-class CavernInfraDetectorManager : public GeoVDetectorManager  
+class CavernInfraDetectorManager : public GeoVDetectorManager
 {
  public:
   CavernInfraDetectorManager();
 
   const CavernInfraDetectorManager & operator=(const CavernInfraDetectorManager &right) = delete;
   CavernInfraDetectorManager(const CavernInfraDetectorManager &right) = delete;
-  
+
   ~CavernInfraDetectorManager();
 
   // Access to raw geometry:
   virtual unsigned int getNumTreeTops() const override;
   virtual PVConstLink getTreeTop(unsigned int i) const override;
- 
-  void addTreeTop(PVLink);      // Add a Tree top:
 
- private:  
+  void addTreeTop(const PVLink&);      // Add a Tree top:
+
+ private:
   // Tree Tops
   std::vector<PVLink> m_treeTops;
 };
 
 #ifndef GAUDI_NEUTRAL
-#include "AthenaKernel/CLASS_DEF.h" 
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF(CavernInfraDetectorManager, 1500000300, 1)
 #endif
 
diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorTool.cxx b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorTool.cxx
index 5c40b98d1a8d007d27a001800d20b2d2ea77c336..094c14b8ce4e8b7cd5b1aa610f5d6c667fe1ee3f 100755
--- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorTool.cxx
+++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorTool.cxx
@@ -3,15 +3,15 @@
 */
 
 #include "CavernInfraDetectorTool.h"
-#include "CavernInfraDetectorFactory.h" 
-#include "CavernInfraDetectorManager.h" 
+#include "CavernInfraDetectorFactory.h"
+#include "CavernInfraDetectorManager.h"
 
 #include "GeoModelInterfaces/IGeoDbTagSvc.h"
 #include "GeoModelUtilities/GeoModelExperiment.h"
 #include "RDBAccessSvc/IRDBAccessSvc.h"
 
 
-CavernInfraDetectorTool::CavernInfraDetectorTool( const std::string& type, 
+CavernInfraDetectorTool::CavernInfraDetectorTool( const std::string& type,
 						  const std::string& name,
 						  const IInterface* parent )
   : GeoModelTool( type, name, parent )
@@ -19,7 +19,7 @@ CavernInfraDetectorTool::CavernInfraDetectorTool( const std::string& type,
 }
 
 StatusCode CavernInfraDetectorTool::create()
-{ 
+{
   ServiceHandle<IGeoDbTagSvc> geoDbTag("GeoDbTagSvc", name());
   ATH_CHECK(geoDbTag.retrieve());
 
@@ -36,7 +36,7 @@ StatusCode CavernInfraDetectorTool::create()
 
   GeoModelExperiment* theExpt = nullptr;
   ATH_CHECK(detStore()->retrieve(theExpt,"ATLAS"));
- 
+
   GeoPhysVol *world=theExpt->getPhysVol();
   ServiceHandle<IRDBAccessSvc> raccess("RDBAccessSvc",name());
   ATH_CHECK(raccess.retrieve());
diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorTool.h b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorTool.h
index 070654971b2803a528f18f13982bb47cc07bf035..fec220dcb0d159ee294f5b8fb1a26a7370c127ca 100755
--- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorTool.h
+++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorTool.h
@@ -8,7 +8,7 @@
 #include "GeoModelUtilities/GeoModelTool.h"
 class CavernInfraDetectorManager;
 
-class CavernInfraDetectorTool final : public GeoModelTool 
+class CavernInfraDetectorTool final : public GeoModelTool
 {
  public:
   CavernInfraDetectorTool( const std::string& type, const std::string& name, const IInterface* parent );
@@ -16,9 +16,9 @@ class CavernInfraDetectorTool final : public GeoModelTool
 
   virtual StatusCode create() override;
   virtual StatusCode clear() override;
-  
+
  private:
   const CavernInfraDetectorManager* m_manager{nullptr};
 };
 
-#endif 
+#endif
diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/GeoModelEnvelopes/ForDetEnvelopeManager.h b/AtlasGeometryCommon/GeoModelEnvelopes/GeoModelEnvelopes/ForDetEnvelopeManager.h
index 67c235ecfcc10fef057523a63534ef093daadaaa..c014cc78db90f449e8fe776b08d5ae47d24f2d8d 100755
--- a/AtlasGeometryCommon/GeoModelEnvelopes/GeoModelEnvelopes/ForDetEnvelopeManager.h
+++ b/AtlasGeometryCommon/GeoModelEnvelopes/GeoModelEnvelopes/ForDetEnvelopeManager.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ForDetEnvelopeManager_h
@@ -10,7 +10,7 @@
 
 #include <vector>
 
-class ForDetEnvelopeManager : public GeoVDetectorManager  
+class ForDetEnvelopeManager : public GeoVDetectorManager
 {
  public:
 
@@ -22,19 +22,19 @@ class ForDetEnvelopeManager : public GeoVDetectorManager
 
   // Access to raw geometry:
   virtual unsigned int getNumTreeTops() const;
-  
+
   // Access to raw geometry:
   virtual PVConstLink getTreeTop(unsigned int i) const;
 
   // Add a Tree top:
-  void addTreeTop(PVLink);
+  void addTreeTop(const PVLink&);
 
- private:  
+ private:
 
   const ForDetEnvelopeManager & operator=(const ForDetEnvelopeManager &right);
   ForDetEnvelopeManager(const ForDetEnvelopeManager &right);
-  
-  std::vector<PVLink> m_volume;  
+
+  std::vector<PVLink> m_volume;
 
 };
 
diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.cxx b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.cxx
index 350ff7c83085522ac69742146ab2a44e0f0bfa57..12f49e1e360889b039f96fac1e219961cfe69b11 100755
--- a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.cxx
+++ b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.cxx
@@ -1,16 +1,16 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "ForDetEnvelopeFactory.h"
 
 #include "GeoModelInterfaces/StoredMaterialManager.h"
-#include "GeoModelKernel/GeoMaterial.h"  
-#include "GeoModelKernel/GeoTube.h"  
-#include "GeoModelKernel/GeoLogVol.h"  
-#include "GeoModelKernel/GeoNameTag.h"  
-#include "GeoModelKernel/GeoPhysVol.h"  
-#include "GeoModelKernel/GeoShapeShift.h"  
+#include "GeoModelKernel/GeoMaterial.h"
+#include "GeoModelKernel/GeoTube.h"
+#include "GeoModelKernel/GeoLogVol.h"
+#include "GeoModelKernel/GeoNameTag.h"
+#include "GeoModelKernel/GeoPhysVol.h"
+#include "GeoModelKernel/GeoShapeShift.h"
 #include "GeoModelKernel/GeoShapeUnion.h"
 
 #include "StoreGate/StoreGateSvc.h"
@@ -20,23 +20,20 @@
 
 
 ForDetEnvelopeFactory::ForDetEnvelopeFactory(StoreGateSvc *detStore)
-  : m_detectorManager(0),
-    m_materialManager(0),
+  : m_detectorManager(nullptr),
+    m_materialManager(nullptr),
     m_detectorStore(detStore)
 {
 }
 
-ForDetEnvelopeFactory::~ForDetEnvelopeFactory()
-{
-}
 
 void ForDetEnvelopeFactory::create(GeoPhysVol *world)
 {
   if (StatusCode::SUCCESS != m_detectorStore->retrieve(m_materialManager, std::string("MATERIALS"))) {
-    return; 
-  } 
-  
-  // Get the materials  
+    return;
+  }
+
+  // Get the materials
   const GeoMaterial* air = m_materialManager->getMaterial("std::Air");
 
   // Build boolean shape: union of two tubes
@@ -47,7 +44,7 @@ void ForDetEnvelopeFactory::create(GeoPhysVol *world)
 
   const GeoShapeShift& envShape1 = (*tube1)<<xfRelativeA;
   const GeoShapeUnion& envShape = envShape1.add((*tube2)<<xfRelativeC);
-  
+
   GeoLogVol* lvEnv = new GeoLogVol("ForDetEnvelope",&envShape,air);
   GeoPhysVol* pvEnv = new GeoPhysVol(lvEnv);
 
diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.h b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.h
index 30ad7042025745a311a6bcc756531435d8d7d5d0..1d035f30442e4d4209881f61b970fe7cbb2fb249 100755
--- a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.h
+++ b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef GEOMODELENVELOPES_FORDETENVELOPEFACTORY_H
@@ -12,36 +12,36 @@ class StoreGateSvc;
 class StoredMaterialManager;
 class GeoShape;
 
-class ForDetEnvelopeFactory final : public GeoVDetectorFactory  
+class ForDetEnvelopeFactory final : public GeoVDetectorFactory
 {
  public:
-  
+
   // Constructor:
   ForDetEnvelopeFactory(StoreGateSvc *pDetStore);
-  
+
   // Destructor:
-  ~ForDetEnvelopeFactory();
-  
+  ~ForDetEnvelopeFactory() = default;
+
   // Creation of geometry:
   virtual void create(GeoPhysVol *world) override;
-  
+
   // Access to the results:
   virtual const ForDetEnvelopeManager * getDetectorManager() const override;
-  
- private:  
+
+ private:
 
   // Illegal operations:
   const ForDetEnvelopeFactory & operator=(const ForDetEnvelopeFactory &right);
   ForDetEnvelopeFactory(const ForDetEnvelopeFactory &right);
-  
+
   // The manager:
   ForDetEnvelopeManager*   m_detectorManager;
-   
+
   StoredMaterialManager* m_materialManager;
   StoreGateSvc*             m_detectorStore;
 };
 
-// Class ForDetEnvelopeFactory 
+// Class ForDetEnvelopeFactory
 #endif
 
 
diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeManager.cxx b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeManager.cxx
index be4f5c7fd11f6fb303e160165c9aff36213c012b..06d90a95f58500a9308e9dcd1802abd1340df0d1 100755
--- a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeManager.cxx
+++ b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "GeoModelEnvelopes/ForDetEnvelopeManager.h"
@@ -23,7 +23,7 @@ PVConstLink ForDetEnvelopeManager::getTreeTop(unsigned int i) const
   return m_volume[i];
 }
 
-void  ForDetEnvelopeManager::addTreeTop(PVLink vol)
+void  ForDetEnvelopeManager::addTreeTop(const PVLink& vol)
 {
   m_volume.push_back(vol);
 }
diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.cxx b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.cxx
index a411572137a65c446c52b00cb761ed39d9236c84..d6f3b8c1ce643025727a4b55158b2de9beb9e0e5 100755
--- a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.cxx
+++ b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.cxx
@@ -1,10 +1,10 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "ForDetEnvelopeTool.h"
-#include "ForDetEnvelopeFactory.h" 
-#include "GeoModelEnvelopes/ForDetEnvelopeManager.h" 
+#include "ForDetEnvelopeFactory.h"
+#include "GeoModelEnvelopes/ForDetEnvelopeManager.h"
 #include "GeoModelUtilities/GeoModelExperiment.h"
 
 #include "StoreGate/StoreGateSvc.h"
@@ -12,30 +12,25 @@
 #include "AthenaKernel/ClassID_traits.h"
 #include "SGTools/DataProxy.h"
 
-ForDetEnvelopeTool::ForDetEnvelopeTool(const std::string& type, 
-				       const std::string& name, 
-				       const IInterface* parent): 
+ForDetEnvelopeTool::ForDetEnvelopeTool(const std::string& type,
+				       const std::string& name,
+				       const IInterface* parent):
   GeoModelTool(type,name,parent),
-  m_manager(0)
+  m_manager(nullptr)
 {
 }
 
-ForDetEnvelopeTool::~ForDetEnvelopeTool()
-{
-}
-
-
 StatusCode ForDetEnvelopeTool::create()
-{ 
+{
   ATH_MSG_INFO("Building Forward Detectors Envelope");
 
-  GeoModelExperiment* theExpt; 
-  if (StatusCode::SUCCESS != detStore()->retrieve(theExpt,"ATLAS")) { 
+  GeoModelExperiment* theExpt;
+  if (StatusCode::SUCCESS != detStore()->retrieve(theExpt,"ATLAS")) {
     ATH_MSG_ERROR("Could not find GeoModelExperiment ATLAS");
-    return StatusCode::FAILURE; 
-  } 
+    return StatusCode::FAILURE;
+  }
 
-  if(0==m_manager) {
+  if(nullptr==m_manager) {
     GeoPhysVol *world=&*theExpt->getPhysVol();
 
     ForDetEnvelopeFactory theFactory(detStore().operator->());
@@ -45,10 +40,10 @@ StatusCode ForDetEnvelopeTool::create()
     theExpt->addManager(m_manager);
     StatusCode sc = detStore()->record(m_manager,
 			  m_manager->getName());
-    
+
     if (sc.isFailure()) {
       ATH_MSG_ERROR("Could not register ForDetEnvelope detector manager");
-      return StatusCode::FAILURE; 
+      return StatusCode::FAILURE;
     }
     return StatusCode::SUCCESS;
   }
@@ -60,7 +55,7 @@ StatusCode ForDetEnvelopeTool::clear()
   SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<ForDetEnvelopeManager>::ID(),m_manager->getName());
   if(proxy) {
     proxy->reset();
-    m_manager = 0;
+    m_manager = nullptr;
   }
   return StatusCode::SUCCESS;
 }
diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.h b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.h
index eb1d2009dd280f7a25daa9edd8a7510cbc5e64d4..25b762d013457d6933b3278cd7babb449a2fb82e 100755
--- a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.h
+++ b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.h
@@ -1,14 +1,14 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef ForDetEnvelopeTool_h 
+#ifndef ForDetEnvelopeTool_h
 #define ForDetEnvelopeTool_h 1
 
 #include "GeoModelUtilities/GeoModelTool.h"
 class ForDetEnvelopeManager;
 
-class ForDetEnvelopeTool final : public GeoModelTool 
+class ForDetEnvelopeTool final : public GeoModelTool
 {
  public:
 
@@ -16,7 +16,7 @@ class ForDetEnvelopeTool final : public GeoModelTool
   ForDetEnvelopeTool( const std::string& type, const std::string& name, const IInterface* parent );
 
   // Standard Destructor
-  virtual ~ForDetEnvelopeTool() override final;
+  virtual ~ForDetEnvelopeTool() override final = default;
 
   virtual StatusCode create() override final;
   virtual StatusCode clear() override final;
@@ -24,4 +24,4 @@ class ForDetEnvelopeTool final : public GeoModelTool
   const ForDetEnvelopeManager* m_manager;
 };
 
-#endif 
+#endif
diff --git a/AtlasGeometryCommon/SubDetectorEnvelopes/src/DetDescrDBEnvelopeSvc.cxx b/AtlasGeometryCommon/SubDetectorEnvelopes/src/DetDescrDBEnvelopeSvc.cxx
index 72d439597d79ae10f273f0ea274ffbeb2b4a4f0e..de2036af9e60fee598a0deeda8e6ea3aede012ef 100644
--- a/AtlasGeometryCommon/SubDetectorEnvelopes/src/DetDescrDBEnvelopeSvc.cxx
+++ b/AtlasGeometryCommon/SubDetectorEnvelopes/src/DetDescrDBEnvelopeSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -258,7 +258,7 @@ StatusCode DetDescrDBEnvelopeSvc::retrieveRZBoundary( std::string  &node,
     double curR = (*recIt)->getDouble("R") * CLHEP::mm;
     double curZ = (*recIt)->getDouble("Z") * CLHEP::mm;
     // store (r,z) duplet locally
-    rzVec.push_back( RZPair(curR, curZ) );
+    rzVec.emplace_back(curR, curZ );
   }
 
   return StatusCode::SUCCESS;
@@ -286,7 +286,7 @@ StatusCode DetDescrDBEnvelopeSvc::fallbackRZBoundary( FallbackDoubleVector &r,
     double curR = r[pos];
     double curZ = z[pos];
     // store (r,z) duplet locally
-    rzVec.push_back( RZPair(curR, curZ) );
+    rzVec.emplace_back(curR, curZ );
   }
 
   return StatusCode::SUCCESS;