diff --git a/Reconstruction/HeavyIonRec/HIGlobal/HIGlobal/IHIEventShapeFiller.h b/Reconstruction/HeavyIonRec/HIGlobal/HIGlobal/IHIEventShapeFiller.h
index 7e46cc4ad1857ca2dc027a08bc13919804919a4e..42b04a57bf703f9b900bfaf4072c8eca8a129ada 100644
--- a/Reconstruction/HeavyIonRec/HIGlobal/HIGlobal/IHIEventShapeFiller.h
+++ b/Reconstruction/HeavyIonRec/HIGlobal/HIGlobal/IHIEventShapeFiller.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef __INTERFACE_HIEVENTSHAPEMODIFIER_H__
@@ -34,7 +34,7 @@ public:
 
   virtual StatusCode fillCollectionFromCells(std::unique_ptr<xAOD::HIEventShapeContainer>& evtShape, const SG::ReadHandleKey<CaloCellContainer>& m_cell_container_key, const EventContext& ctx) const = 0;
 
-  inline std::string getContainerName() const { return m_outputContainerName; };
+  inline const std::string& getContainerName() const { return m_outputContainerName; };
   inline void setContainerName(const std::string& cname) { m_outputContainerName = cname; };
 
 private:
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h
index 7f609069f9d82e31e109e4a33b708b7840c9c9a9..17593d85d4f27978b895dea96738c7b84a23df15 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 */
 
 // HIJetConstituentSubtractionTool.h
@@ -90,7 +90,7 @@ protected:
   inline SG::ReadHandleKey< xAOD::HIEventShapeContainer > EventShapeKey()  { return m_eventShapeKey; };
   //That looks useless. commented out for the moment
   //inline std::string ModulationKey() const {return m_modulation_key;};
-  inline std::string momentName() const { return m_momentName; };
+  inline const std::string& momentName() const { return m_momentName; };
   inline bool momentOnly() const { return m_momentOnly; };
 
   inline void setEventShapeKey( const SG::ReadHandleKey< xAOD::HIEventShapeContainer >& key ) { m_eventShapeKey=key; };