diff --git a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx
index daaf7ed8e147b4183247f343adc9da83927f3d0c..1b21638c2dd88e19fc3f37b21063a24410cb8726 100644
--- a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx
+++ b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx
@@ -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
 */
 
 // Class header
@@ -177,7 +177,7 @@ bool TRTProcessingOfBarrelHits::ProcessHit(G4Step* pStep)
           std::cout << "!!!!! Barrel. Error in local coordinates of hits!" << std::endl;
           std::cout << "  barrelID=" << hitID << "  ringID=" << ringID
                     << "  moduleID=" << moduleID << "  strawID=" << strawID
-                    << "  trackID=" << trHelp.GetBarcode() << std::endl;
+                    << "  trackID=" << trHelp.GetUniqueID() << std::endl;
           std::cout << "  particleEncoding=" << particleEncoding;
 
           if (kineticEnergy < 0.0001)
diff --git a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfEndCapHits.cxx b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfEndCapHits.cxx
index d127c85a5a38a3feae10a127aa9efba766bb377c..5114626f4a46bde9a943eeea82fca9f80b8838c7 100644
--- a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfEndCapHits.cxx
+++ b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfEndCapHits.cxx
@@ -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
 */
 
 // Class header
@@ -166,7 +166,7 @@ bool TRTProcessingOfEndCapHits::ProcessHit(G4Step* pStep)
           std::cout << "!!!!! End-caps. Error in local coordinates of hits!" << std::endl;
           std::cout << "  endCapID=" << endCapID << "  wheelID=" << wheelID
                     << "  planeID=" << planeID << "  strawID=" << strawID
-                    << "  trackID=" << trHelp.GetBarcode() << std::endl;
+                    << "  trackID=" << trHelp.GetUniqueID() << std::endl;
           std::cout << "  particleEncoding=" << particleEncoding;
 
           if (kineticEnergy < 0.0001)