diff --git a/DDRec/include/DDRec/CellIDPositionConverter.h b/DDRec/include/DDRec/CellIDPositionConverter.h index 5a9b2fbc52d793067f501ad9078be664147a8521..7aace1d098e934c3b467ddb2818f4325826ac038 100644 --- a/DDRec/include/DDRec/CellIDPositionConverter.h +++ b/DDRec/include/DDRec/CellIDPositionConverter.h @@ -48,7 +48,7 @@ namespace dd4hep { public: /// The constructor - takes the main description object. - CellIDPositionConverter( Detector& description ) : _description( &description ) { + CellIDPositionConverter(const Detector& description ) : _description( &description ) { _volumeManager = VolumeManager::getVolumeManager(description); } diff --git a/DDRec/include/DDRec/MaterialScan.h b/DDRec/include/DDRec/MaterialScan.h index 512619026396562a5443ac6b74d5a06b7d8b9964..31dc4ebc56067d738937a48925526f72fa7b8e8c 100644 --- a/DDRec/include/DDRec/MaterialScan.h +++ b/DDRec/include/DDRec/MaterialScan.h @@ -53,7 +53,7 @@ namespace dd4hep { private: /// Reference to detector setup - Detector& m_detector; + const Detector& m_detector; /// Material manager std::unique_ptr<MaterialManager> m_materialMgr; //! /// Local cache: subdetector placements @@ -64,7 +64,7 @@ namespace dd4hep { public: /// Standard constructor for the master instance - MaterialScan(Detector& description); + MaterialScan(const Detector& description); /// Default destructor virtual ~MaterialScan(); diff --git a/DDRec/include/DDRec/SurfaceManager.h b/DDRec/include/DDRec/SurfaceManager.h index 227645725bae3ff1c2568616144bf35ac50bc807..eb6d5b21002ea64ea1eeadbec3bd1975803402ce 100644 --- a/DDRec/include/DDRec/SurfaceManager.h +++ b/DDRec/include/DDRec/SurfaceManager.h @@ -38,7 +38,7 @@ namespace dd4hep { public: /// The constructor - SurfaceManager(Detector& theDetector); + SurfaceManager(const Detector& theDetector); /// No default constructor #if defined(G__ROOT) @@ -69,7 +69,7 @@ namespace dd4hep { /// initialize all known surface maps - void initialize(Detector& theDetector) ; + void initialize(const Detector& theDetector) ; SurfaceMapsMap _map ; }; diff --git a/DDRec/src/MaterialScan.cpp b/DDRec/src/MaterialScan.cpp index d2969755c43e7598a7167d0889e055f535028fd4..cf1e7849e4370ed494fed3c96686059491c66085 100644 --- a/DDRec/src/MaterialScan.cpp +++ b/DDRec/src/MaterialScan.cpp @@ -35,7 +35,7 @@ MaterialScan::MaterialScan() } /// Default constructor -MaterialScan::MaterialScan(Detector& description) +MaterialScan::MaterialScan(const Detector& description) : m_detector(description) { m_materialMgr.reset(new MaterialManager(m_detector.world().volume())); diff --git a/DDRec/src/SurfaceManager.cpp b/DDRec/src/SurfaceManager.cpp index fd83a4d0825205f875227a28a029f31dd56660d0..2576ebb41fde88629ea79be163bc16b0115a4742 100644 --- a/DDRec/src/SurfaceManager.cpp +++ b/DDRec/src/SurfaceManager.cpp @@ -25,7 +25,7 @@ namespace dd4hep { namespace rec { - SurfaceManager::SurfaceManager(Detector& theDetector){ + SurfaceManager::SurfaceManager(const Detector& theDetector){ // have to make sure the volume manager is populated once in order to have // the volumeIDs attached to the DetElements @@ -52,7 +52,7 @@ namespace dd4hep { return 0 ; } - void SurfaceManager::initialize(Detector& description) { + void SurfaceManager::initialize(const Detector& description) { const std::vector<std::string>& types = description.detectorTypes() ;